Squashed 'yocto-poky/' changes from b1f23d1..8358e54

Upgrade subtree to Yocto-2.1.

6c1c013 build-appliance-image: Update to krogoth head revision
5f84d65 syslinux.bbclass: Remove APPEND from variable dependency
d9dd864 bitbake: toaster-tests: tests for build dashboard
1cf8f21 bitbake: toaster: add modal to select custom image for editing
a40a3e6 bitbake: toaster: add build dashboard buttons to edit/create custom images
e65c980 bitbake: toaster-tests: make helper click on input before entering text
484cbf8 bitbake: toaster-tests: add tests for new custom image page
437b728 bitbake: toaster: prevent exception when Project.release is null
cfc22d3 bitbake: toaster: only prevent duplicate custom image names within a project
3036413 bitbake: toaster: disable/enable "Add layer" button according to input's content
040dbf6 bitbake: toaster: fix sorting after hiding a column in build tables
1b11b79 bitbake: toaster: ensure ToasterTable headings are reset when order by changes
9855840 image.bbclass: The wrong name is being used for the debug filesystem
38c7e2d image_types: Ensure rootfs dependencies cover DEBUGFS
0c3eaa7 syslinux.bbclass: The AUTO_SYSLINUXMENU value needs to be boolean
9c8a049 perf: pass DESTDIR in EXTRA_OEMAKE
9de7324 buildtools-tarball: set INHIBIT_DEFAULT_DEPS
ef09105 xf86-video-omapfb: remove EXTRA_OECONF_armv7a
c2f7da2 base.bbclass: Introduce PACKAGECONFIG_CONFARGS variable
e1c6890 git: update to 2.7.4
98bf7de license.bbclass: do write_deploy_manifest in image postprocessing
519600c devtool: sdk-update: fix handling of UNINATIVE_CHECKSUM changes
c7980b6 bitbake: main: fix processing of BBEVENTLOG
ee25d0e toasterconf.json: Update for krogoth release
b8e5de2 toasterconf.json: Remove fido from supported configurations
c59771e toasterconf.json: Update for krogoth release
d0bce0b toasterconf.json: Remove fido from supported configurations
d25eea3 poky-tiny.conf: set PREFERRED_VERSION_linux-yocto-tiny to 4.4
9f970b6 dev-manual, profile-manual, ref-manual: Purging Oprofile stuff
1d93104 ref-manual: Added description for the testsdk.bbclass.
db47094 ref-manual: Updated the remove-libtool.bbclass description.
a16eeca ref-manual: Added gobject-introspection.bbclass description.
3e761b4 ref-manual: Added reference for npm.bbclass.
5e50157 ref-manual: Fixed typo in the nopackages.bbclass description
f7b68c7 ref-manual: Added description for bash-completion.bbclass
ece900a ref-manual: Added nopackages.bbclass description. Fixed stray typo.
9143e9e ref-manual: Added description for the INSTALL_TIMEZONE_FILE variable.
6391dbf ref-manual: Updated the PREFERRED_PROVIDER variable with a note.
6d86f7a ref-manual: Dropped references to the autotools_stage class
4d5ff5e ref-manual, dev-manual: Scrubbed boot-directdisk and bootimg classes
cd2aaaa ref-manual: Updated the uninative.bbclass description.
e975d26 documentation: Converted "meta-yocto" to "meta-poky"
84452ee bsp-guide: Updated yocto-bsp create example output.
e00a62c ref-manual: Added the migration section for 2.1
02db9e6 yocto-project-qs, ref-manual: Upgraded minimum Git requirement
989841f ref-manual: Added rootfs-postcommands class description.
d06b343 ref-manual: Updated the EXTRA_OEMAKE variable description.
ecb2eb6 dev-manual: Updated "Additional Implementation Details" section
004b939 bitbake: lib/bb/utils: add docstring for contains()
524d04c ca-certificates: support Toybox
ecaf12e oetest: make console output more verbose
4946ecf dhcp: CVE-2016-2774
c219c6d buildtools-tarball: fix perl being included when building with ipk
9fe7738 buildtools-tarball.bb: fix unexpected operator
ed07f43 lib/oeqa/selftest/base.py: Correct a reference to meta/lib/oeqa/selftest
8953d83 oe-selftest: Correct the usage examples
dee47ad devtool: sdk-update: reset git metadata on update
396e64d build-appliance-image: Load TUN at startup
55068b1 default-providers.inc: set openssl PREFERRED_PROVIDER to openssl
74ab080 bind: CVE-2016-2088
d488d78 rpm: Disable __sync_add_and_fetch_8 on nios2
9d2d1ae kernel: fitimage: Fix do_deploy taskhash mismatch
4693593 images: zero out the rootfs_extra_space in initramfs images
8beb671 ext-sdk-prepare.py: exclude do_rm_work from unexpected output; create unit test
0262bc5 bitbake: bitbake-user-manual: Updated the 'bitbake -h' output example.
890ccd3 bitbake: bitbake-user-manual: Updated "Conditional Metadata" section
20a0121 bitbake: bitbake-user-manual: Updated discussion about using "inherit"
9f374c4 bitbake: providers: Add PREFERRED_RPROVIDER support
4b8b110 bitbake: providers: We don't depend on previous build results
8e7282c bitbake: cooker/knotty: Prefix parse logs with filename being parsed
1131303 bitbake: cooker: pass exception to finishAsyncCommand
ffa2ca0 fs-perms.txt: fix ROOT_HOME's permission
fd66a38 Revert "fs-perms.txt: fix ROOT_HOME's permission"
9ec9557 buildstats: Fix tracebacks for early task failures
7f9d01e default-providers: Update to use PREFERRED_RPROVIDER
76f4bbc oeqa/selftest/sstatetests: fix no-op sstate test
6326812 buildhistory: don't alter SDK creation stamps
bb40b5e dhcp: Enable update-rc.d service
27e202f meta/classes/qemu.bbclass: set -cpu of ppce5500/ppce6500 to e500mc
7c5823a shadow: Disable syslog for more commands
60a8719 devtool: upgrade: handle recipes where source is not first entry in SRC_URI
8353557 devtool: update-recipe: handle where SRC_URI is appended to with +=
aab3c8d linux-yocto: make aufs4 optional
d75d2be linux-yocto: tiny and pin ctrl config updates
8547cbf linux-yocto/4.4: BXT enablement
ffad386 linux-yocto/4.1: mainline SPI backports
4ba33a3 linux-yocto/4.4: gpio-pca953x: fix the "drive" property cannot read/write
86571db devtool: don't copy .git when building the eSDK
83eac65 package.bbclass: improve permission handling
eeae2ac fs-perms.txt: fix ROOT_HOME's permission
1db3dc8 runqemu: let ramfs equal to cpio.gz
a8c8e81 gcc-common.inc: String format tweak for available tunes
a7c426a pbzip2: fix LIC_FILES_CHKSUM following 1.1.12 -> 1.1.13 upgrade
1229009 pbzip2: don't skip do_configure
1e4ee30 useradd_base.bbclass: remove flock option '-w'
cb45ef3 matchbox-keyboard: Hide desktop launcher
69e20ca npm.bbclass: Stop packagenames containing underscores from being generated
c3c55478 bind: CVE-2016-1285 CVE-2016-1286
c4387a8 image.bbclass: add DEB_{PRE, POST}PROCESS_COMMANDS to rootfs_command_variables list
967bc74 rootfs.py: apply ROOTFS_POSTINSTALL_COMMAND to all package formats
f7352ca wic: fix bug in handling fsoptions
b2f5de5 buildtools-tarball.bb: set TOOLCHAIN_NEED_CONFIGSITE_CACHE to null
a460b04 rpm: more verbose errors in rpmTempFile
a43991d rootfs-postcommands: handle broken links when writing manifest
2c81e17 socat: Use c_ispeed and c_ospeed based upon libc
5c8124d archiver: Improve debug output
e912c46 kbd: remove uclibc-stdarg.patch
965fd3c image.bbclass: use max() instead of indexing booleans
6d85874 linux-yocto-tiny: fix KBRANCH
440d949 sudo: fix pam config on systemd systems
3fd5a6d sysvinit: make lastb.1 an alternative
175263e lib/oe/lsb: sanitise the distro identifier
9262d2f package.bbclass: handle links in sorted order
29cf263 sanity: allow sftp and ssh mirrors
f503317 toaster.bbclass: improve package information collection
88f4178 rsync: remove upstream's rebuild logic
8d59d06 rsync: pass cached configure values through the right variable
384e41c rsync: don't install acinclude.m4
e80800e Revert "oeqa/selftest/wic: add test case for sparse images"
45c0763 Revert "wic/utils/partitionedfs.py: assemble .wic images as sparse files"
e0e5426 bitbake: runqueue: Improve 'mulitiple .bb files are due to be built' message
380004b archiver: Ensure sstate-inputdir directory is created
3ad70a5 linux-yocto-tiny: fix COMPATIBLE_MACHINE
0e59727 glib-2.0: Put glib-compile-schemas back in -utils
d27ca36 oeqa/runexported.py: Fix exported test
85dbd7b oeqa/selftest/sstatetests: split 32/64 build host from no-op action tests
57be6dd util-linux: take ownership of hwclock if installed
acc1f96 meta: remove redundant ac_cv_sizeof_off_t assignments
92759d8 meta/site: remove sizeof_off_t
5602f64 archiver: Fix ASSUME_PROVIDED issues
fab626c distrodata: Exclude DATETIME reference from sstate checksum
faaeaf9 build-appliance-image: Support for VirtualBox guest additions
778121a local.conf.sample: Make it possible to override EXTRA_IMAGE_FEATURES
f947c27 poky.conf: add Fedora 23 to supported distros
f33a110 maintainers.inc: remove adt-installer
83d4fab local.conf.sample: remove reference to adt
52cfdb6 bitbake: toaster: fixes for customimage package not found
dae4ffb bitbake: data_smart: Restrict expansion regexp to not include : characters
7e739ac bitbake: tests/utils.py: test origvalue in a callback matches what is expected
e1e459e bitbake: lib/bb/utils.py: Fix a bug in edit_metadata() that could corrupt vars
43150ab oeqa/selftest/wic: add test case for sparse images
29bc2f7 wic/utils/partitionedfs.py: assemble .wic images as sparse files
7fdb061 image-vm.bbclass/image_types.bbclass: IMAGE_NAME -> IMAGE_LINK_NAME
04e1978 image_types.bbclass: fix elf
513ea49 image_types.bbclass: set nodesize for btrfs
bad434b libxml2: fix AM_PATH_XML2
9fe3d01 useradd_base.bbclass: prevent variable expansion in $opts
fb8e5f9 extrausers.bbclass: drop retry count for perform_user/group* calls
f737af4 build-perf-test: add eSDK installed size to metrics
50f5ca3 rpm: brace expansion is a bashism
66ecbd3 openssl.inc: minor packaging cleanup
e38ec0c systemd-systemctl-native: fix unit detection
4019058 apr-util: fix path in rules.mk for nativesdk
bdf453f bdwgc: installed-vs-shipped for nativesdk
12ca8df libsolv: fix installed-vs-shipped for nativesdk
c88c894 desktop-file-utils-native: disable emacs
d4f6c0e toaster: add DL_DIR and SSTATE_DIR to oe toasterconf
69b3f87 toaster.bbclass: strip task from the target
aa45c75 x11-common: Add PACKAGECONFIG for screen blanking
d366a33 opkg-utils: re-do find/ls code to not fail on filenames with spaces
5e360ca image-live.bbclass: fix iso + efi only
f5adb23 Add missing runtime dependency to python-pygobject
0720425 devtool: Create unlocked-sigs.inc containing items in the workspace
64cca7e sstatesig.py: Add a method to "unlock" recipes
1cb99dd populate_sdk_ext.bbclass: Enable locked sigs errors
2431ed7 sstatesig.py: Improve the SIGGEN_LOCKEDSIGS_TASKSIG_CHECK message
7e90280 sstatesig.py: Split single locked sigs check into multiple checks
7ce800c toasterconf.json: Set default distro to nodistro
1b7b548 dev-manual: Updated poky-floating-revisions file snippit example.
8d9e233 dev-manual: set correct task name for do_kernel_configme
6971029 poky-floating-revisions: Fix typo
14e2b90 toasterconf.json: Add DL_DIR and SSTATE_DIR to poky toasterconf
296dfbc build-appliance-image: Update to master head revision
00c4c9b poky: Convetion is 2.1, not 2.1.0
8cd1dec build-appliance-image: Update to master head revision
ecd58bb poky.conf: Bump version for 2.1.0 krogoth release
e955b5d bitbake: Update version to 1.30.0
4fd14e3 build-appliance-image: Update to master head revision
133224f documentation: Fixed references using the DISTRO_NAME variable
3831ca0 documentation: Updated release date in manual history tables.
b590fab dev-manual, ref-manual, sdk-manual: Removing oprofile references.
d2084cc Makefile: Removed adt-manual support
2677098 mega-manual: Removed the adt title .PNG file.
d9b4c80 README: Updated to remove the ADT manual and add the SDK manual.
9796cbb mega-manual.sed: Removed adt-manual processing
aa4b72b yocto-project-qs: Updated the minnowboard example.
f2505af poky.ent: Added lower-case distro name variable.
ee42a9b kernel-dev: Applied review comments to "Adding Recipe-Space Kernel Features"
d57fe7c ref-manual: Updated the PREFERRED_VERSION variable description.
53bade8 dev-manual: Added new section describing hardware and non-hardware config
763ae4e ref-manual: Updated verbiage on proxy handling
a1295ed ref-manual: Updated PREFERRED_VERSION variable description
879eec2 ref-manual: Updated debugging tips and tricks
23dbf81 kernel-dev: Added new "Adding Recipe-Space Kernel Features" section.
f30bfe9 kernel-dev: Updated the "Kernel Metadata Location" section.
53729bc sdk-manual: Removed three sections of writer notes.
9f0c571 sdk-manual: Applied review edits.
d4bdafa sdk-manual: Added sections in Appendix B.
d94fa00 dev-manual, profile-manual: Removed oprofile section and link
4f3dfa8 bitbake: bitbake: update LICENSE file with QUnit details
013984d bitbake: tests: browser Add test to run the js unit tests
7609888 bitbake: toaster: views jsunittest Add MACHINE and an extra layer to test project
fbc2c5d bitbake: toaster: tests Set MACHINE for the test projects
cb6b4eb bitbake: toaster: Add quint to project so that it can be used offline
18cb7fe bitbake: toaster: add rev dep column to image detail pages
7a309d9 bitbake: buildinfohelper: work around unicode exceptions
860cba8 bitbake: toasterui: update build in internal state
acb9407 bitbake: buildinfohelper: fix KeyError
52c8740 bitbake: toaster: get bitbake location from BBBASEDIR
f5d3ef6 bitbake: toaster: export BBBASEDIR variable
71ff9b9 bitbake: toaster: update projectconf.html for DL_DIR and SSTATE_DIR
705d44f bitbake: toaster: update view to support DL_DIR and SSTATE_DIR
4aafcae bitbake: toaster: use empty token
5ce4665 bitbake: toaster: runbuilds Clean up runbuilds
55b6fab bitbake: toaster: runbuilds Make runbuilds aware of the build CANCELLED state
f4cee88 bitbake: toaster: models Exclude the CANCELLED builds from get_number_of_builds
296d373 bitbake: toaster: mrb_section template Add build cancel button
f1b49dc bitbake: toaster: tables BuildsTable exclude cancelled builds
22242ae bitbake: buildinfohelper: Add handler for cancelling a build
9dcb9cb bitbake: toaster: bldcontrol models Add a cancelling state the BuildRequest
dfa8510 bitbake: toaster: models Add cancelled state to build outcome
5f862bb bitbake: toaster: update BuildEnvironmentController and BitbakeController
0db62c5 bitbake: toaster: libtoaster Update implementation of startABuild and cancelABuild
afab95c bitbake: toaster: xhr Update the implementation of the build cancellation request
eead032 bitbake: toaster: Move xhr calls for starting and stopping builds
f5aa970 bitbake: toaster: bldcontrol Add forceShutDown function to BitbakeController
d6992a8 bitbake: toasterui: shutdown on BuildCompleted event
c4ae028 bitbake: toaster: use bash explicitly
4adddfd bitbake: toaster: fix jethro build
b1a919a bitbake: toaster: update conf/local.conf
590a815 bitbake: toaster: stop bitbake server after the build
a8f6001 bitbake: toaster: add new parameter to _shellcmd
a43a16b bitbake: toaster: reimplement triggerBuild
ab18c20 bitbake: toaster: modified setLayers API
22fba9b bitbake: toaster: add brbe parameter to triggerBuild
829a0bd bitbake: toaster: remove release API
7068e8a bitbake: toaster: remove startBBServer API
9d4c62d bitbake: toasterui: fix brbe reporting
5bcce68 bitbake: buildinfohelper: improve handling of providermap
61b6b98 bitbake: uievent: improve BBUIEventQueue code
0b0d754 bitbake: toasterui: add brbe parameter to buildinfohelper
94ac3f0 bitbake: toaster: set BITBAKE_UI environment variable
e23a23b bitbake: toaster: get rid of noui option
f77baec bitbake: toaster: don't start bitbake server
4127fef image_types: use compress framework to produce checksums for images
60786b8 runqemu-gen-tapdevs: Add note about NetworkManager & tap devices
634aeed libtool: fix contaminated path to lt_truncate_bin
298d875 create-pull-request: fix for newer git
4faeff9 wget: fix build when len(TMPDIR) == 410
b667f4d sanity.bbclass: fix a hardcode in check_path_length()
94b3583 grub: remove unused 0001-Fix-build-with-glibc-2.20.patch
ef163ab glibc: remove unused CVE patches
b050ab2 clutter-gst-3.0: remove unused enable-tests.patch
064ebd5 cmake: remove unused dont-run-cross-binaries.patch
a71db4c tcl: remove unused fix-configure.patch
476eeea rpm: remove two unused patch
3d56864 ffmpeg, gstreamer1.0-libav: add textrel INSANE_SKIPs
8cc10a9 ffmpeg: Make configure options explicit
45c1944 bzip2: set correct soname
cbe33ec useradd.bbclass: remove user/group created by the package in clean* task
c115740 bitbake: fetch2/git.py: remove .indirectiondir workaround
4f07c22 bitbake: persist_data: Return str instead of unicode for sqlite3 text queries
d8f1f42 scripts/oe-selftest: avoid the creation of coverage file when coverage not installed
6e5e225 scripts/oe-selftest: remove coverage file if any coverage option is given
5edfec4 scripts/oe-selftest: remove unneeded coverage warning
8109e93 patch.bbclass: remove useless path assignment
7963613 gstreamer: remove now-redundant expansion in do_split_packages
37f4f5b package: do_split_packages: expand variables in extra_depends
2ed2089 xf86-video-intel: Add patch to fix some poor image quality
c1436b3 sanity: Increase minimum git version to 1.8.3.1
672545b scripts/oe-buildenv-internal: Fix regression in BB_ENV_EXTRAWHITE setting
f7fed7c license.bbclass: fix warnings when run in unprivileged "container" env
43071a0 externalsrc: avoid race in temporary git index file
f4f1d20 scripts/lib/bsp/help.py: Typo in help for yocto-bsp create
1bd2c8e bdwgc: use github repo for source location
0e6743b xf86-video-intel: Add patch to allow UXA to build
21e31c2 package_manager.py: better error handling in opkg's package listing
f2d5e20 systemd: make systemd-serialgetty optional
e699404 ncurses: reorder PACKAGES
f94ad4d bluez5.inc: remove obsolete workaround
a0cd8c0 buildtools-tarball: Add texinfo (for makeinfo)
9877795 cogl: fix G-I .typelib installation
b13184c classes/buildhistory: fix grammar in comments
e5c0a9f classes/buildhistory: fix filtering of depends-nokernel.dot
4d364f2 classes/buildhistory: optimise getting package size list
af5f423 bitbake: siggen: Ensure tainted stamps are accounted for with writing custom stamps
47e9e12 bitbake: siggen: Fix nostamp taint handling
8033627 bitbake: siggen: Add checksum recalculation/checking code
3e1b5e0 bitbake: siggen: Fix check calculation problem with file_checksums
39b637c bitbake: siggen: Drop misleading duplicate method
2c722e2 bitbake: tests/fetch.py: Improve unit tests for trusted network check
cf6d12d bitbake: fetch2: BB_ALLOWED_NETWORKS should not care about port numbers
158575c bitbake: toaster: orm better detect requires during CustomImageRecipe generation
c634473 bitbake: toaster: Correct typo on build form help text
c9ad1e6 bitbake: toaster: buildinfohelper Add additional metadata to the built layer
072a0b3 poky: Exclude DATE from DISTRO/SDK_VERSION checksums
f3c029f build-appliance-image: Exclude DDATETIME from task signature
7833eb4 image-vm: Exclude DISK_SIGNATURE_GENERATED from task signature
85ff4ff populate_sdk_ext: Exclude BBTASKDEPDATA from task signature
66412ab opkg-utils: opkg-build exit when fail to list files.
6b8f8a4 kernel-yocto: enforce SRC_URI specified branch
6ebd43c linux-yocto/4.4: UVC: Add support for R200 depth camera
6d2299f linux-yocto/4.4: fix PAT for 32bit x86
5559301 Revert "linux-yocto: Work around PAT issue on qemux86"
686c74f linux-yocto-dev: bump to v4.6-rcX
b3ba813 linux-yocto/4.1: ahci: backport AHCI runtime PM
8f7bbea linux-yocto/4.4: gpio-pca953x: add PCAL9535 interrupt support
4a50c05 linux-yocto/4.1: telemetry and dmaengine backports
31a10cb wic/isoimage-isohybrid.py: change cpio generated uid&gid to root
5cabf3b wic/isoimage-isohybrid.py: use glob to find initramfs location
5c60c36 bluez5: add ptest support
fc8b24d oe/patch: print cleaner error message when patch fails to apply
bf14014 oe/patch: more detailed error reporting
a2bf9e3 insane.bbclass: avoid false positives on library location
1f2f43c grub-efi.bbclass: use GRUB_ROOT rather than APPEND for root device
bf58526 bitbake.conf: Add BB_WORKERCONTEXT to HASHBASE_WHITELIST
1c1e851 gdb-cross-canadian: use PACKAGECONFIG for python and readline
370a50a base: Fixup PACKAGECONFIG incorrect mappings
dea3423 classes/packagegroup: Refactor code to be simpler
5defbcd default-distrovars.inc: remove libassuan from LGPLv2_WHITELIST_GPL-3.0
58d8123 libassuan: use package specific licensing
1f2a01b init-install-efi.sh: remove all root=foo from grub.cfg
3ce7d8c init-install.sh: fix disk_size
46eed0a ltp: fix test_proc_kill hanging
207ee90 ltp: add periodic output for memcg stress test
feafad1 epiphany: Depend on intltool-native for configure
2510239 image: Fix debugfs image type recursion loop
7dcb4c4 bitbake: toaster: tests Migrate landing page tests to Selenium
5b848fa bitbake: toaster: tests Migrate all projects page tests to Selenium
f2a38ea bitbake: toaster: tests Migrate project builds page tests to Selenium
961cd90 bitbake: toaster: tests Migrate all builds page and project page tests to Selenium
f859a3d bitbake: toaster: tests Migrate to Selenium for UI tests
965c72c yocto-bsp: Set correct default branches and branches base for i386, qemu and x86_64 archs
d110eba selftest/signing: Use packagedata to obtain PR value for signing test
34f11b5 lib/oe/packagedata: Add import os
0012b90 base.bbclass: avoid duplicate call to d.getVar('LICENSE', True)
efe73cb base.bbclass: drop obsolete HOSTTOOLS_WHITELIST_GPL-3.0
5293b83 man: use BUILD_CC and target include files for configure
5121705 scripts, lib: Don't limit traceback lengths to arbitrary values
3168134 bitbake: bitbake: Don't limit traceback lengths to arbitrary values
88ea0b9 image-vm.bbclass: remove invalid code
4d1df2c image-live.bbclass/image-vm.bbclass: remove duplicated code
d6d7526 bootimg.bbclass: merge it into image-live.bbclass
723fa56 boot-directdisk.bbclass: merge it into image-vm.bbclass
9e588481 man: fix several annoying compile/build warnings
aa13b97 image.bbclass: Make unneeded packages for a read-only rootfs configurable
4dde12f relocate_sdk: additional error checks
22bd875 systemd: fix build with gcrypt PACKAGECONFIG disabled
4b77909 devtool: modify: call shutdown on tinfoil when done
43da712 toolchain-shar-extract.sh: ensure all_proxy is allowed through
2aec71e oe-publish-sdk: exclude sstate-cache if publishing minimal SDK
8ef7016 oe-publish-sdk: prevent specifying a directory for the SDK argument
591b97c classes/populate_sdk_ext: support setting vars from environment at build time
c37d542 scripts, lib: Don't limit traceback lengths to arbitrary values
8049f25 pyton-numpy: Add definition of off_t size
b75505e image-live.bbclass: DEPENDS on syslinux
3ece012 ldconfig-native: Fix ELF flags on 64-bit binaries
d492aec recipes-support/rng-tools: Change runlevel start from S to 2, 3, 4, 5.
ab5c62e oeqa/runtime/parselogs.py: Add systemd unit circular dependencies errors.
9be3fb2 systemd-serialgetty: allow baud rate overriding
cf6788c psmisc: Remove including sys/user.h and __WORDSIZE
ede11b6 selftest: Added testcase decorator to tests
ccfe48c linux-yocto: add overlayfs feature
6ae0224 linux-yocto/4.4: broxton and usb type-c backports
e1ae3ee linux-yocto/4.4: drm/i915/skl: Fix DMC load on Skylake J0 and K0
0a1d621 linux-yocto/4.1: Intel Broxton: pwm backports
6ce8802 linux-yocto/4.1: Apollo Lake/Broxton mmc backports
a256628 linux-yocto/4.1: i2c: designware: Backport i2c patches
fbd209d linux-yocto/4.1: device property backports
ccf1b33 linux-yocto/qemuarm64: enable 32 bit compatibility
dacf9f2 linux-yocto/4.1: SMBus/iTCO backports
ab6fd48 default-distrovars.inc: remove gnutls + libtasn1 from LGPLv2_WHITELIST_GPL-3.0
2123a7e sanity.bbclass: Use pythonexception to raise real exceptions without backtraces
6af88d8 sanity: Require bitbake 1.29.1
1b2df6e uninative: Switch md5sum -> sha256
f719386 bitbake: cookerdata.py: remove slash in the end
e26087f bitbake: Bump version to 1.29.1
d73da22 bitbake: build/utils: Allow python functions to execute with real exception handling
672c07d bitbake: fetch2: Ensure that incorrect checksumed files are always renamed
2554be4 bitbake: cooker: fix CookerParser.shutdown()
53b5dc0 gcc: Fix musl ldso name for mips64
dd31bca selftest/buildoptions.py: use INHERIT +=
71db079 archiver.bbclass: addtask do_deploy_archives_setscene
1ca71e5 bitbake: cooker: Ensure bbappend order is deterministic
292c3e8 bitbake: checksum: In FileChecksumCache don't follow directory symlinks
326fc29 gcc-5.3/gcc-4.9: -fdebug-prefix-map support to remap relative path
9e20f94 ptest-runner_2.0.bb: Update recipe to point git.yoctoproject.org repo.
437841c man: fix src/Makefile to work with parallel make
abb5b46 oeqa/selftest/bbtests: Test bbappend order
ddbeb56 bitbake: cookerdata: Improve handling of ParseError
6dff639 gcc: Backport fixes for musl ssp configuration
ab20659 siteinfo: Fix musl 64bit targets
cd16b65 musl: Update to tip
0883aff buildhistory.bbclass: create image directory when needed
c093f7c runqemu: fix for iso
f1f9f89 init-live.sh: fix overlay fs
4e7eaed init-live.sh: fix ROOT_MOUNT
1622077 no-static-libs.inc: build static libusb1-native
b3e4a31 sstatesig: Ensure we keep native depends for allarch recipes
528a890 oe-selftest: generate .env only in test_image_env
21823cb build-appliance-image: Update to master head revision
7d251f7 build-appliance-image: Fix permissions
60656d0 bitbake: fetch2/wget.py: _check_latest_version_by_dir fix prefix detection
45ee2b1 bitbake: fetch2/wget.py: _check_latest_version_by_dir use group names
55cd35b conf/bitbake.conf package.bbclass: fix dbg package not contain sources while -fdebug-prefix-map used
e2b919c externalsrc: remove nostamp from do_configure
bbfc210 externalsrc: do not use do_configure[nostamp] for git srctrees
9ee403b archiver.bbclass: Just archive gcc-source for all gcc recipes
37683ef oeqa/utils/ftools: improve remove_from_file algorithm
3a934a8 scripts:/oe-selftest: Use timestamp instead of test names in coverage data file
71304d8 xcursor-transparent-theme: upgrade to latest git revision
7c5343a gdb: Fix build on mips64/musl
856be1f libunwind: Fix build on mips/mips64 for musl targets
dd61341 toolchain-shar-extract.sh: check the length for target_sdk_dir
c3c793b relocate_sdk: fixed .gccrelocprefix section handling
cc97d57 glib-2.0: Fix packaging
cef8bc9 gio-module-cache: Add class for Gio modules
0cda9d8 glib-2.0: Install gio-querymodules in main package
9ac1b6f oe-git-proxy: support username / password in http proxy
a15541d oe-git-proxy: also check all_proxy and http_proxy env variables
92b2bc5 wic: Update after task ordering changes
d6cb46c image.bbclass: run wicenv task only for wic images
5cb7705 wic: fix type of no-table option
1209eb2 matchbox-desktop: Do not close desktop on alt-F4
0361676 rootfs-postcommands: don't write manifest when IMAGE_MANIFEST empty
abd5b24 bitbake.conf: rename 'gobject-introspection-data' machine feature to 'qemu-usermode'
f81065f selftest/devtool: Update after make PROVIDER changes
25a04ee make, remake: make them properly exclude each other
f3a92ff kernel.bbclass: consider .csp firmware files
0569b69 tzdata: update to 2016c
a7e726a tzcode: update to 2016c
201d9d3 icecc.bbclass: replace icc with icecc
da00f6c icecc.bbclass: expand package arch
3f1702c icecc.bbclass: add icc_is_allarch inherit check
39170fe classes/sanity: use proper multi-line string literals
33a6135 oe-buildenv-internal: simplify derivation of BB_ENV_EXTRAWHITE
c6ab828 u-boot.inc: Add sub-dir support for SPL_BINARY
ddedab4 quilt: run ptest as normal user
afa4d5e site: Cache config vars for ccache
04344eb gdb-cross: use PACKAGECONFIG for python and readline
5005cab add !meta-poky to .gitignore file
1dd9348 scripts/lib/bsp/help.py: Add missing options to yocto-bsp help and usage
54eca75 poky-sanity.bbclass: update conf/templateconf.cfg for existing installations
2b992f3 site.conf.sample: fix reference to oe-git-proxy script
af63b49 conf-notes: remove reference to adt-installer
1d219ce linux-yocto: Update SRCREV for genericx86* for 4.4
8d4f43e linux-yocto: Update SRCREV for genericx86* for 4.1
84d5924 bitbake: fetch2: Handle lockfiles for file:// urls redirected to mirrors
b036afb bitbake: toaster: get all dependents for pkg for removal
9bf98a9 bitbake: toaster: new customise package-remove modal dlg
d5a419d bitbake: toaster: show full list of dependents to remove
fda94f4 bitbake: bitbake: fetch2/gitsm: Fix fetch when the repository contains nested submodules
1341c17 pseudo: backport a patch to fix xattr removal
07f0af3 uninative: don't try to relocate static binaries
c3c0d0a lib/oe/qa: add method to check if static or dynamic linked
10b6037 uninative: ensure patchelf errors are visible
86d7e44 libmad: remove use of obsolete _thumb over-ride
e7395c8 perf: package python modules into perf-python
b47225f perf: fix python scripts QA errors
ea8b914 linux-yocto/4.1: MFD backports
b6563a1 linux-yocto/4.1: device property : Backport device property patches
46baceb linux-yocto: ktypes/standard: Add tmpfs-posix-acl feature
bdf6b20 linux-firmware: Break out some additional firmware
6d8141f linux-firmware: Clean-up and sync license data
cea2a21 linux-firmware: Collapse iwlwifi firmware blobs for 7260 and 7265
3b3fe1d linux-firmware: Update to latest HEAD
d7cf2c3 archiver.bbclass: Fix tar name for git repositories
2cb4cb7 archiver.bbclass: Fix gcc-source corner case
c29eea0 archiver.bbclass: Fix use of ARCHIVER_WORKDIR and ARCHIVER_OUTDIR
8b7ee6e archiver.bbclass: Don't expand python functions in dumpdata
bc100b3 bind: /var/cache/bind
04d883c sysvinit: downgrade ALTERNATIVE_PRIORITY[mountpoint]
688d9a6 util-linux: split out util-linux-mountpoint
85ff75d gconf: fix buildpaths QA issue
7f7c9ab python-pygobject: use Python 2 instead of Python 3
e33124f sanity.bbclass: check host tool dependencies on change in NATIVELSBSTRING
4fe64d7 libunwind: Fix build with fstack-protector on musl
4aa08b8 ltp: Fix build on x86/musl
959b7f2 package.bbclass: Treat .node files same as .so when checking what to strip
e0bc781 bootimg.bbclass: only inherit syslinux when pcbios
1b1de89 grub-efi.bbclass: make it can build vm and live together
4ebaeb2 bootimg.bbclass: fix settings for grub-efi.bbclass
af1f77a pixz: Fix build on big-endian/musl systems
421289c sanity.bbclass cleanup
93e411e matchbox-wm: Update to fix XChangeProperty datatype issue
c843022 matchbox-panel-2: Fix Home-button icon load issue
01f6818 gstreamer1.0: fix introspection support also for git recipes
171adb1 gstreamer1.0-plugins-bad: fix incorrect handling of Cflags in gstreamer-gl.pc file
6462d08 x86-base.inc: suggest the latest kernel
c5c9ed6 at: fix configure option with/without-selinux
9b2b1f0 no-static-libs: just like target and native, nativesk-libcap doesn't like unrecognised options
bf90d0c linux-firmware: package firmware for Marvell 88W8688
cd17ab0 tune-arm926ejs: Handle missing thumb suffix
5b70c7e nativesdk-coreutils: a lot of warnings fixed
b47c53b runqemu-internal: split the code into functions
fae732f runqemu-internal: cleanup unsed code
e469bb7 runqemu: simplify checking for iso and ramfs
3610329 runqemu: add support for qcow2 and vdi
d85ca4a runqemu: remove ISO and RAMFS from help text
58bc854 runqemu: simplify the checking for vm images
6716eb2 runqemu: fix ROOTFS for vmdk
258cfa8 python(3): Disable tkinter
5988b5c selftest/signing.py: RPM_GPG_PASSPHRASE_FILE -> RPM_GPG_PASSPHRASE
3e5c5fe gpg_sign.py: get rid of pexpect
05d7e0d rpm: check _gpg_passphrase before ask for input
13a31b1 oe-publish-sdk: fix remote publishing
9926425 oe-publish-sdk: improve help output slightly
905286c oe-publish-sdk: drop SDK installer file from published output
0523378 devtool: add: create git repository if URL specified as positional argument
11c1d30 devtool: add: delete externalsrc files on npm recipe do_install
552a68a devtool: configure-help: fix error if do_configure not already run
eab3f06 bitbake.conf: whitelist proxy variables in config hash
58d2e56 classes/populate_sdk_ext: parse metadata on minimal SDK install
0684572 devtool: sdk-install: add option to allow building from source
50addfb classes/distutils*: don't hide logs when setup script fails
0ec30c7 classes/packagegroup: drop complementary -ptest if ptest not in DISTRO_FEATURES
d96ea29 classes/packagegroup: fix dbg/dev/ptest complementary packages
b58e5b1 bitbake: bitbake: xmlrpc: set single use mode differently
2df514b sdk-manual: Added note for running remote apps with SSH port forw enabled.
12f5c25 poky.ent: Added code name for 2.1 release to the variable
64241e0 sdk-manual: Applied more review edits to the manual per Eggleton.
b44d9e5 ref-manual: Created distrodata and checkpkg tasks, updated distrodata class
54050ff sdk-manual: Applied 2nd round of review edits.
6db8cbc sdk-manual: Applied review edits to the manual.
922eaeb sdk-manual: Updated the SDK devtool modify flow diagram.
2bbf77a dev-manual: Fixed a grammar error
286b76f sdk-manual, mega-manual: Updated the SDK devtool modify diagram
c3946bc dev-manual, profile-manual, ref-manual: Updates to remove meta-toolchain
7233e35 sdk-manual: Edits to add extensible SDK configuration sections.
b31bf7c ref-manual, sdk-manual: Changed section heading.
670735e ref-manual: Added some SDK manual support to introduction
266742b profile-manual: Updated screen output for oe-init-build-env
0654224 kernel-dev: Changed a link from an example to in-text.
19e3648 dev-manual: Edits from a 2.1 read-through.
a389684 poky.ent: Fixed a typo in one of the variables "ftar" to "tar"
b5d3065 poky.ent, bsp-guide: Removed eMenlow example and updated 2.1 variables
884b528 yocto-project-qs: Performed a read-through edit.
4b42385 poky.ent: Updated copyright year and version variables.
ae48b1f mega-manual: Added two new sections for the sdk manual
815d686 sdk-manual: Added some intro stuff about the SDK
4c5157f ref-manual: Resolving a conflict
4306f7f sdk-manual, mega-manual: Added new figure for Eclipse flow.
0bb6e48 sdk-manual: WIP on the book.
5a64701 sdk-manual, mega-manual, Makefile: Added new figures
32629e0 Makefile: Resolving a conflict
af40e9a sdk-manual: Added a new figure for installed extensible sdk directory.
62477889 sdk-manual: Applied some "red" text formatting to indicate notes
7ab8afa Makefile: Added the ".png" part to a figure I forgot.
fc43555 sdk-manual: Added a red-text "role" to the style sheet.
d07100d sdk-manual: Added new section detailing installed SDK directory.
b750729 sdk-manual-customization: Fixed XSL Appendix numbering parameter
ad7a994 Makefile: Updated the figure list for the mega-manual.
890f721 sdk-manual: WIP - Various small edits as WIP
f15f96c sdk-manual: New content for outline purposes.
4643b04 sdk-manual: Updated with two new appendices for new files.
d05566b sdk-manual: Added sdk-environment.png diagram.
0936eed sdk-manual: Added two appendix files to SDK Manual.
6996a1c Makefile: Added sdk-environment.png to figure list for SDK Manual
6cdb356 toaster-manual: Edits to a previous patch.
77594c0 mega-manual, Makefile: Added support for three new toaster figures.
00fe95d toaster-manual: Explain the local release
d06c7b8 documentation: remove all references to Hob
be8af37 ref-manual: Updated COREBASE_FILES variable.
5c7e5aa bitbake: bitbake-user-manual: include/require checks current directory
7ec8f28 bitbake: bitbake-user-manual: Updated the "inherit Directive" section.
75cba54 bitbake: bitbake-user-manual: Updated the copyright year to 2016
2918b50 bitbake: toasterui: remove ParseStarted from the event list
ab2abd4 bitbake: toasterui: Remove the excessive exception logging
d8137be bitbake: cache: Make BB_DONT_CACHE variable external
1d1aaa2 bitbake: toaster: orm generate CustomImageRecipe contents try secondary path
5c49230 bitbake: toaster: localhostbecontroller put generated layer in the builddir
b60c994 bitbake: toaster: localhostbecontroller Allow file:/// uri type for git repo
3025092 bitbake: toaster: orm Add a constant for the CustomImageRecipe's layer name
3df6551 bitbake: toaster: localhostbecontroller Don't clear out toaster custom layer dir
2f2f784 parselogs: add new whitelist entries to address 4.4.3 issues
8037ba4 bitbake: bb/tests/fetch: Update cups url
dab6d59 oe-buildenv-internal: Correct the sed expression which updates $PATH
068afc5 tzdata: update to 2016b
e140272 tzcode: update to 2016b
c0b3667 ffmpeg: Remove RSUGGEST=mplayer
e528a0a lttng-tools: Remove lttng-ust from PACKAGECONFIG for musl
42b9bdf packagegroup: Disable packages not available on musl
f148a2e world-broken: Add packages broken on musl
624ca6a siteinfo: Move apr configure cache to common-linux
90234f1 parselogs: add new whitelist entries to address 4.4.3 issues
13a2a3f u-boot: Upgrade to 2016.03 release
ecf3396 grub: add -Wno-error=trampolines to native CFLAGS
07515b0 dhcpd: create dhcpd user for dhcp dameon
b9ad80d valgrind: fix buildpath QA issue
7985006 gcc-5.3/gcc-4.9:Reuse -fdebug-prefix-map to replace -ffile-prefix-map
2faa718 gcc-5.3/gcc-4.9:replace build path with target path in __FILE__
76f10fd oe-buildenv-internal: Some clean up
4d1efc3 oe-buildenv-internal: Add variables individually to BB_ENV_EXTRAWHITE
39ac332 oe-buildenv-internal: Add paths to $PATH individually
dd5f2f7 oe-init-build-env*: Make them actually return failures
ea28de6 oe-init-build-env*: Remove unnecessary differences between the scripts
51aa00f oe-init-build-env*: Update/correct comment about specifying arguments
16fb9b8 oe-init-build-env*: Allow $OEROOT to be predefined
3173979 bluez5: allow D-Bus to spawn obexd in systems without systemd
10ef68f oeqa: remove RPM 4 self test
d915965 lib/package_manager: remove RPM4 support code
03fce73 smartpm: remove rpm4 patch
1e9de52 rpm: remove RPM 4
a7dd04d grub: fix documentation rebuilds
ee4f61b oe-selftest: Fixed --list-tests-by tag option
068e898 gcc-runtime.inc: set LICENSE for all gcc-runtime packages
788dfdd ParaTypeFFL-1.3: Add license file
62ddde6 externalsrc: use shared stamp directory if B=S
1969332 rpm: fix error when 'lua' is enabled
a31301e matchbox-keyboard: Update to latest HEAD to fix 64bit issue
40a55f1 oeqa/selftest/buildoptions: test read-only-rootfs
f64fdd2 oeqa/selftest/sstatetests: verify more variables don't impact the hash
ac347da gobject-introspection.bbclass: wrap comments at 80 columns
ae63b88 qemuarm64.conf: don't clear MACHINE_FEATURES
cad415d sanity.bbclass: allow customizing config file update error messages
96a5cb4 sanity.bbclass: fix success message when config file was updated
805aca8 sanity.bbclass: expand error messages for version checks
7d6801c lighttpd: fix /usr/lib/mod_cgi.so: undefined symbol: chunkqueue_written
5f7b9f0 valgrind: Disable nios2 support
aaaccc4 systemtap: Disable nios2 support
5857b20 lttng-modules: Add nios2 support
26248cd kexec: Disable on nios2
3e4d99b packagegroup-core-sdk: Disable sanitizers for nios2
797ffc8 bdgwc: Backport nios2 support
238e2c1 libatomic-ops: Backport nios2 support
7e83af3 selftest/buildoptions: Renamed one test case
0d9f515 python-numpy: Fix build on musl
e1f3f4c socat: Access c_ispeed and c_ospeed via APIs
bb4e6e0 watchdog: Disable nfs on musl targets
f00cca8 bdwgc: Check for getcontext() API during configure
51464e7 devtool: change config symlink name to .config.new
8c0148f systemd: Fix and expand ptests
427e369 oeqa/utils/testexport.py: add functionality for exporting binaries
2191623 init-live : make it easier to add custom boot targets
57a525c useradd_base.bbclass: replace retry logic with flock
5d06f00 image.bbclass: track ROOTFS_POSTUNINSTALL_COMMAND in do_rootfs vardeps
6129d86 eudev: split eudev-hwdb from eudev
9aa27fe openssl: don't move libcrypto to base_libdir
370419e xcb-util-image: Fix build with clang
8727975 musl: Update to get mips64 port
4653fdd dhcp: enable gentle shutdown
e382d96 coreutils: fix reporting 'unknown' by `uname -p' and `uname -i'
3b8cd1d ncurses_6: Improve installation
9cc65ed Revert "selftest: Added MACHINE = "qemux86" to tests that use runqemu"
3c5ee61 busybox: Drop -r passthrough patch
2c666af linux-yocto/4.1: usb: add usb_otg_caps to usb_gadget structure.
8dc9162 linux-yocto/4.1: Intel Broxton and Sunrisepoint-H: pinctrl and drm
99ad4c9 linux-yocto/4.1: powercap/RAPL: Backport powercap/RAPL
c4f544e linux-yocto/4.1: Thermal: Enable Broxton SoC thermal reporting device
123c2c6 linux-yocto/4.1: usb backports for Apollo Lake/Broxton
600b700 recipetool: create: don't create extra files directory unconditionally
8debfea local.conf.sample: Disable prelink by default
efa0881 oeqa/selftest/recipetool: Fix test_recipetool_create_simple
c9d269c Revert "packagegroup-core-x11-sato: add python-pygobject and gtk+3"
d24a39a oeqa/recipetool: Fix syntax error
55a1e52 oeqa/recipetool: Improve debugging output by adding dirlist
637b3c8 uninative: Add a fix for icu-native to use the correct ABI
9dbfbe9 scripts/oe-selftest: Add short names to most common options
681a452 gcc: Fix the license on GNU OpenMP
15c5b2a Revert "gcc: Fix the license on GNU OpenMP"
d5cdb48 perl: fix missing dependency for perl-misc
0eb52b9 classes/buildhistory: record a few more variables for extensible SDK
cbb4c5b package-deb: Ignore circular dependencies
fcc7ff0 package_deb: Fix python runtime error
9155b24 python-numpy: fix buildpaths QA issue
9e69963 python: move ast module into python-core
1a35166 xserver: require sufficiently new libdrm
36bf666 package_manager.py: Fix race condition in OpkgIndexer.write_index()
35be679 scripts/oe-selftest: Add search expression matching to run/list options
4489ef1 glib-2.0: relocate the GIO module directory for native builds
cf3402e image-buildinfo.bbclass: fix performance problems
e2fe28c linux-yocto/4.4: gpio-pca953x: add "drive" property
3d45853 python3: fix do_configure check platform triplet error
03b167d ncurses_6: Fix an install race condition
09eab6b build-appliance: make the inclusion of downloaded sources optional
8ea5cdc builder: remove hob from autostart
ff5d9f7 Revert "gstreamer1.0-plugins-XXX: move inherit gettext into common .inc file"
c99da8d musl: disable building of gobject introspection data
0dea50e machine/include/arch-x86: Make x32 ABI not supporting gobject-introspection-data
8c14c74 bitbake.conf: add 'gobject-introspection-data' to DISTRO/MACHINE_FEATURES_BACKFILL
2e27994 packagegroup-core-x11-sato: add python-pygobject and gtk+3
8b1fa2a webkitgtk: enable gobject introspection
7bd32b9 recipes-gnome: fix introspection support
efd37c5 python-pygobject: update to 3.18.2
ff3500b gnomebase.bbclass: do not disable gobject introspection
ac5cc0c gstreamer: enable gobject introspection
03cd714 libsoup-2.4: enable gobject introspection
c1d67e4 clutter: enable gobject introspection
0ec412b gtk+3: enable gobject-introspection
d6f8028 gtk+: enable gobject introspection
0d1e4b2 avahi: enable gobject-introspection
d2e0dc1 python-pygtk: remove the recipe
0c6d7cb avahi-ui: remove the dependency on python-pygtk by disabling avahi-discover
4fbf761 vala.bbclass: remove pre-packaged vapigen.m4 from tarballs
235455d vala: enable the use of vapigen by packages with vala support
d1b96f1 gobject-introspection.bbclass: add a class that enables gobject introspection
96b5847 gtk-doc-stub: remove introspection stubs
3a1d9fb gobject-introspection: Override GIO_MODULE_DIR when scanning
10e9977 gobject-introspection: add the recipe
3c66619 bitbake: fetch2/npm: fix ud.registry so that alternative registries can be handled
0155472 ref-manual: Updated "Application Development SDK" section.
4438460 ref-manual: Applied review edits to several SDK variables.
3c727ff ref-manual: Updated "Cross-Development Toolchain Development" section.
af1517c ref-manual: Updated "Build History SDK Information" section.
d9fc04b dev-manual, mega-manual: Updated "Application Development SDK" section.
357aa33 ref-manual, mega-manual: Updated "SDK Generation" section.
54490c0 ref-manual: Added several extensible SDK variables to glossary.
6dfd441 ref-manual: Updated IMAGE_PKGTYPE variable.
77f002c ref-manual: Updated "Cross-Development Toolchain Generation"
ee90cc6 ref-manual: Updated the "Build History SDK Information" section.
53dd8a0 dev-manual: Moved "Optionally Using an External Toolchain" to Tasks chapter.
9d76cfe meta: toolchain-shar-relocate.sh: Fix for extracting SDK in the same directory as SDK script.
054abad nettle: The variable named p in the patch file was incorrectly named.
93a5417 valgrind: Make dep on glibc-utils conditional on TCLIBC = glibc
40c9774 make 4.1: fix segfault when ttyname fails
7f27713 gcc: Disable libitm for MicroBlaze
81d58d6 sign_package_feed: add feed signature type
42f612c package_manager: sign IPK package feeds
c637783 signing-keys: create ipk package
14e809e gpg_sign: export_pubkey: add signature type support
0b088e0 gpg_sign: detach_sign: fix gpg > 2.1 STDIN file descriptor
2fccd8a gpg_sign: add local ipk package signing functionality
6bd6a2b systemd: add comment stating that resolved needs gcrypt
a5fd57d selftest/bblayers.py: Remove harcoded recipe files
dce7290 selftest/prservice.py: Sanitize package version when looking for stamp
cbd87f3 lsof: update UPSTREAM_CHECK_URI
57fb05a eudev: provide UPSTREAM_CHECK_URI
3f8d5bf toaster.bbclass: show packages that were setscened into existence too
39e1351 gcc: Fix the license on GNU OpenMP
c6aeef3 linux-yocto/4.4: Galileo updates
37b61b0 siteinfo: Add ppc64le support.
0265fcc nettle: disable static for 2.7.1
8660cd1 nettle: Security fix CVE-2015-8804
dae5715 nettle: Security fix CVE-2015-8803 and CVE-2015-8805
24aea3a glib-2.0: silence warnings when parsing headers for introspection
3331992 qemu: Limit paths searched during user mode emulation
b578a06 image-mklibs: handle position independent binaries
c706b5e libpam: define limits.conf as CONFFILES of package libpam-runtime
82dec46 perl-rdepends: Remove circular dependencies
815c36f rpm: Sync CVS to regular version
775f22e rpm: Fix musl integration with RPM5
001bdef gcc: Disable libitm for nios2
d53413d bitbake: server/process: Try connecting 4 times before giving up
0f01059 bitbake: toaster: models List only have the specified project's imported layers
0dcab02 bitbake: toaster: rework task buildstats storage and display
cc74a8a bitbake: toaster: use force_bytes to display non-ascii project names
aebc22d bitbake: fetch2: Make SRC_URI[md5sum] and SRC_URI[sha256sum] expand their values
d405f97 bitbake: xmlrpc: fix bug in setting XMLRPCServer.single_use
c50bdb3 bitbake: fetch2/npm: add missing URL argument to ParameterError
fbf27c4 bitbake: fetch2/npm: properly handle npm dependencies
ef6a451 bitbake: fetch2/npm: fix errors with some version specifications
ad50ce9 populate_sdk_ext: Correct commit 8b81bb56c69aabdea984352f8e267a9783c0bdbc
bc0e99d recipetool: create: shrinkwrap and lockdown npm modules
309b2e6 recipetool: create: support creation of additional files by plugins
2279eb2 recipetool: create: check if npm available if npm:// URL specified
9145500 recipetool: create: split npm module dependencies into packages
d46827c recipetool: create: add license file crunching
3fd244b recipetool: create: match *LICENSE* as a license file
2b6a352 recipetool: create: improve mapping for autotools program macros
1607fac recipetool: create: be more tolerant of spacing in configure.ac
9dca5c8 lib/sstatesig: skip shared_workdir when checking locked sigs
142bad3 python3: fix patching get_python_lib() in distutils/sysconfig.py
50d07e9 python3-native: use the previous version of python-config script
5dce2e3 qemu.bbclass: add qemu_wrapper_cmdline()
8b5afcd db: remove the NO_UPDATE_REASON and replace it a comment about RPM
5699c67 rpmresolve: It is not necessary to manually specify -lpopt
8ea55ba rpm: A number of the patches have been submitted upstream
6833c5d rpm: Enable specific crypto and digest settings via variables
59a4d99 security_flags.inc: Special flags are needed for RPM
007c284 rpm: Uprev to rpm-5.4.16 (pre) and rpm-5.4+cvs to current CVS head
a27ca6d yocto-bsp: Update templates to 4.4 kernel
2d0933c conf/distro/include: drop old recipes
1fd183e bblayers.conf.sample: remove BBLAYERS_NON_REMOVABLE
477b8fb poky: Enable uninative
1b7cc9c linux-yocto/4.4: explicitly enable ftrace in tracing fragment
aee7482 linux-yocto/4.4: iwlwifi: mvm: don't allow sched scans without matches to be started
2408f49 linux-yocto/kernel-meta: ktype refactoring: move DEBUG_KERNEL, EXPERT and EMBEDDED
9ac029b xmlto: tell xmlto where cp is
6d89b52 toaster.bbclass: improve how we gather buildstats for Toaster
4dd3e40 image-prelink: use STAGING_*_NATIVE variables
2193e9d strace: Backport fixes for compiling with clang
ee8ff42 ghostscript: 9.16 -> 9.18
3f5725c fontconfig: Revert changes made to FcConfigAppFontAddDir() recently
433d866 populate_sdk_ext: Make populate_sdk_ext nostamp
e186d6d systemd: binfmt should be added to SYSTEMD_PACKAGES only if binfmt is enabled
b051a95 license.bbclass: fix host contamination warnings for license files
f8a9774 oeqa/selftest/buildoptions: Test build does not fail without git rev
656aeff busybox.inc: add tail symlink so busybox can commit suicide cleanly
a321f4e avahi-ui: add dbus to PACKAGECONFIG
1bd4b72 avahi: add missing intltool-native build dependency
72f9e39 avahi: make dbus optional but default
424466b oe-setup-builddir: tidy up local.conf and bblayers.conf commentary
07919e9 net-tools: Add SCTP option support
e8254bc tune-corei7.inc: Fix PACKAGE_EXTRA_ARCHS for corei7-32
5346675 eudev: remove redundant udev_run assignment
adad264 xcursor-transparent-theme: use a version glob in the selftest bbappend
946d00c populate_sdk_ext: Update after uninative changes
ba57ba1 image.bbclass: support chaining compression (aka conversion) commands
5ac3dc7 image.bbclass: fix incomplete .rootfs customization
3322fa7 bitbake: toasterui: fix warning 'Unknown event'
621cbc8 bitbake: toasterui: exit on final events
8e138b7 bitbake: toasterui: make toasterui to work in build mode
0a61306 bitbake: toasterui: check if setEventMask succeeded
ac941ac bitbake: command: make setEventMask readonly
dd3da9a bitbake: toasterui: update list of events
f56fa5d bitbake: toasterui: reformat list of events
a71d32a bitbake: toaster: remove sshbecontroller module
3db71b4 bitbake: toaster: don't use sshbecontroller
790b2d1 bitbake: toaster: raise NotImplementedError
96535ba bitbake: toaster: bring back the strict directive
5b8b399 bitbake: toaster: change 'revision' to 'Git revision'
07ead98 bitbake: toaster: views api Package info return both kinds of RDEPENDS
9cda2ab bitbake: toaster: fixup dependency excludes for customimage
a54cebe bitbake: fetch2/npm: ignore unknown headers in tarballs
0cd1be1 bitbake: fetch2/npm: handle alternative dependency syntax
d999927 bitbake: fetch2/npm: fix indentation
26ee4dd image creation: allow overriding .rootfs suffix
e43fcdf scripts/hob: drop
59b4cef classes/packageinfo: remove
bbf2a5d conf/documentation.conf: remove BBLAYERS_NON_REMOVABLE
7054882 yocto-uninative: Add common include for uninative
d2c96ca mtools: Drop GCONV_PATH manipulation
d27644e uninative: Handle relocate of GCONV_PATH in libc
0523499 uninative: Add checksum support
73265d1 uninative: Refactor common code
4feb00d uninative: Use CXX11 ABI for interoperation between gcc4 and gcc5
013dd24 uninative: correctly enable uninative
034618d glibc: Add relocation of GCONV_PATH
8dca343 uninative-tarball: Add glibc-gconv-iso8859-1 for guile
1f50f29 dkpg: Use tar everywhere (not gtar)
b158d6c gtk3+: Add missing DEPENDS on wayland-native
e395e81 tune-cortexa17.inc: apply changes similar to a15
ea53d1e sstate: Allow late expansion of NATIVELSBSTRING
bd3a1d5 linux-yocto: Update SRCREV for genericx86* for 4.4
70c6df2 linux-yocto: Update SRCREV for genericx86* for 4.1
ae85c4b linuxloader/image-prelink/image-mklibs: Fix non-standard path prelinking
0b84897 insane/prelink: Handle nonstandard library paths
6b564ae ext-sdk-prepare: Catch setscene tasks which should have run but didn't
d8efd2e createrepo: Fix stat floating timestamps
ce5a9df xmlto: ensure /bin/bash is used as bash
70b4f36 openssl: add a patch to fix parallel builds
1632742 xdg-utils: remove trailing whitespace in multiline string
816391a btrfs-tools: Add libgcc to RDEPENDS
e467156 bitbake.conf: Add libgcc-native to ASSUME_PROVIDED
a91713f net-tools: Override CFLAGS/LDFLAGS in do_install too
fb0c3c5 nspr: Fix build regression on musl from last upgrade
37f5fb9 gdb: fix builds with internal readline and no static libraries
6518db4 feature-arm-thumb.inc: Fix thumb tune override warning
afb1d09 recipetool: create: fix support for AX_CHECK_LIBRARY
463fd5e formfactor: assume a keyboard is plugged in
e2107f5 acl: Fix re pattern in test cases
82a8064 gcc-runtime.inc: disable libitm for little endian MIPS too
25d9c4e devtool: add build-sdk subcommand
41eb36d devtool: build-image: rename module
82d0c8a oeqa/buildoptions: Improve unsafe references tests
4284fdf insane.bbclass: make the checking stricter for unsafe references in scripts
5cd71fe yocto-project-qs: Updated flow to mention Toaster
cd041b7 dev-manual: Applied review comments to the devshell section.
f54fe56 ref-manual: Updates for nativesdk clarifications.
a882267 dev-manual: Fixed typo in the devshell section.
70c7e36 dev-manual: Created devtool upgrade section.
b2b22d5 dev-manual, mega-manual, Makefile: Added support for new upgrade flow
0b7d8a4 dev-manual, mega-manual: Updated the workspace directory structure image
050e021 dev-manual: Applied review changes to the devtool section.
09ecf38 dev-manual, mega-manual: Updated three figures for devtool
f33ffaa dev-manual: Applied more review comments to the section.
fe70eb2 dev-manual, mega-manual: Updated the devtool modify flow diagram.
eb3b414 dev-manual, mega-manual: Updated the devtool add flow diagram.
4c5bd3f dev-manual, mega-manual: Updated the devtool workspace figure.
9cee16b dev-manual: Applied review comments to the devtool section
c678d1a dev-manual: Updated the devtool add section.
a09238a dev-manual, mega-manual: Updated devtool add flow diagram
7699f0a dev-manual: Added section for devtool modify flow
1eecaea dev-manual, mega-manual: Added new figure for devtool modify flow
9582da6 dev-manual: Edits to the devtool-add section.
740369f dev-manual, mega-manual: Updated the devtool add flow figure
a848e9f dev-manual, mega-manual: Updated the workflow layer content figure.
34e08b3 dev-manual: Added new "writernotes" style.
17a21e6 Makefile, dev-manual, mega-manual: Added new figure support
d346c35 dev-manual: Applied review comments to devshell section.
3b41049 ref-manual, dev-manual: Clarifying "native" and "sdknative"
a1970eb dev-manual: Updated devshell section.
a58cde0 toaster-manual: Updated how manage.py createsuperuser command is run
c5b4f69 ref-manual, dev-manual: Clarification of "native" and "sdknative"
952bcc7 toaster-manual: Removed prompts for json file.
34c75fa ref-manual: Updated the S variable description with feedback
2b2ced0 ref-manual: Updated the staging.bbclass description
b9dddd5 ref-manual: Updated the S variable description.
41e9f7c dev-manual, ref-manual: Updated licensing text information.
5066fbc ref-manual: Added order information for conf file parsing.
ad6b2f2 toaster-manual: Removed typo - double "allow" words.
c8c533e ref-manual: Updated the do_populate_sysroot task.
2a3942b dev-manual: Updated section on adding license text.
77b3d06 ref-manual: Updated the S variable entry in the glossary.
a1a4808 toaster-manual: Applied a patch to weed out build mode (modes).
353b755 bitbake: bitbake-user-manual: Added expand() function to list.
638ad17 bitbake: bitbake-user-manual: Added note for Python variable ref expansion.
da22add bitbake: bitbake-user-manual: Enhance environment variable discussion.
f11de9d e2fsprogs: do not enable non-stable features by default
b04280a sdk_update.py: Enable local sdk-update tests
14dd07c sdk.py: Fix undefined variable
c12e919 eudev: recipe formatting improvements
73a43fc openssl: Security fix Drown via 1.0.2g update
ed14aef layer.conf: Update after replacement of udev with eudev
e72233a bootimg: set default value for LABELS variable
4eaef67 sanity: Do not mistake meta-yocto-bsp for meta-yocto
86759de sanity.bbclass: remove conflict checking for image vm and live
bb1c719 syslinux.bbclass: make vm and live can be built together
5c5c13d recipetool: create: add basic support for new npm fetcher/class
2be37a9 recipetool: create: add basic support for generating linux kernel recipes
5cf15ff recipetool: create: add support for out-of-tree kernel modules
937ecd0 bitbake: toaster: cleanup of bin/toaster startup code
a7d1b95 bitbake: ui: remove the puccho ui
a9dc72f bitbake: hob: removal of hob ui and associated ui files
27468db bitbake: fetch2/npm: Add missing ParameterError import
44e3461 bitbake: npm: in cases where shrinkwrap resolved a git URL, ignore it and grab dist.tarball
2a73181 bitbake: fetch2: Fix unpack for absolute file urls
865d2fe bitbake: fetch2: fixes copying of file://dir; subdir=foo, bug 6128 and bug 6129
fb437d3 meta-yocto-bsp: bump to linux-yocto 4.4 for the non-x86 BSPs
fbedac4 maintainers.inc: Add new eudev package and change maintainership for udev
0138874 gcc: Add support for atomic opertions (libitm) where available
70153b4 classes/externalsrc: fix symlinking if symlink exists pointing to another path
eac4061 populate_sdk_ext: Only write LCONF_VERSION to bblayers if it is set
c366343 automake: don't delete .pyc files
d6e63be cracklib: fix Python packaging
a005d25 populate_sdk_base: handle empty SDK_PACKAGING_FUNC
ec3be9f linux-yocto/4.4: update to 4.4.3
6ed16ff linux-yocto/4.1: iwlwifi: mvm: don't allow sched scans without matches to be started
2497e80 linux-yocto/4.4: update to -stable 4.4.2
aa2c1f7 linux-yocto: braswell: Remove feature and move DRM_I915_PRELIMINARY_HW_SUPPORT option
702701d linux-yocto/4.4: yaffs2 build fixes
c2152b8 linux-yocto/4.1: update to 4.1.18
45d4cd7 linux-yocto/4.1: clkdev updates
79ecef6 linux-yocto/4.1: Galileo updates
5f61693 usbutils: Fix for new eudev implementation
c89b777 libgudev: Fix for new eudev implementation
3e5e540 eudev: Replaces udev with eudev for compatibility when using sysvinit on newer kernels
674e55f populate_sdk_ext: Delete the buildtools tar file after installation
d8acef2 libarchive: Set xattrs after setting times
431c1e1 combo-layer: handle empty commits during "init --history"
695cc45 classes/populate_sdk_ext: prepend to PATH rather than appending
b145480 classes/module: allow substitution of the modules_install target name
b03936c grub2.inc: drop bogus dependency on xz
7328765 grub2.inc: avoid passing -isystem to native builds
576587d grub2.inc: dont export TARGET_CFLAGS etc to grub2 configure
97a3322 harfbuzz: update 1.2.1 -> 1.2.3
edf93a0 gstreamer1.0-plugins-bad.inc: limit ARM_INSTRUCTION_SET over-rides to armv4/armv5
89140b0 dhcp: CVE-2015-8605
6ccd8cd sato/images: Add ptest image
f38debb layer.conf: Whitelist cantarell-fonts fontconfig dependency
b307937 pango: make ${PN}-ptest RDEPENDS on cantarell-fonts
0c80f29 cantarell-fonts: Add recipe
4006a7f sanity: Fix int verses string reference
2e27c4b bitbake: fetch2/npm: Enable fetcher
1c060d7 pseudo: Increase number of retries
030d920 bitbake: providers: Fix PREFERRED_VERSION lookup for '_' in PN
c679a3d bitbake: fetch2: Skip lockfiles and donestamps for local files
d01042e bitbake: fetch2/__init__.py: Error if lockfile path invalid
ab7b7bf bitbake: fetch2/__init__: Fix decodeurl to better handle urls without paths
06b4d8f bitbake: fetch2/wget: Set localfile for directories
8d7e799 genericx86-common: Update PREFERRED_VERSION_linux-yocto to 4.4
65d6a62 gstreamer1.0-plugins-bad.inc: enable webp PACKAGECONFIG by default
cd00748 gettext: Delete libintl.la file from install
b33efa9 systemctl: handle RequiredBy dependencies
8caa592 ffmpeg: add bzlib, lzma and xv PACKAGECONFIGs
0011760 rootfs-postcommands: fix ssh_allow_empty_password checking
96f5f89 musl: Add linux-libc-headers to deps
3354878 mesa: Fix build on musl
7651342 dosfstools_2.11: fix build following removal of -e from EXTRA_OEMAKE
6c8abea uclibc support for rng-tools
c7e5a38 oeqa/sdkext: Add sdk_update.SDKUpdateTest class.
738bd1a classes/testsdk: Pass tcname to SDK and SDKExt contexts
2a410b2 classes/testsdk: Move the removal of bitbake PATH to eSDK context only
eb1f8b9 classes/testsdk: Move code for avoid PATHs to oeqa.utils
55d4849 gstreamer1.0-plugins-XXX: control orc PACKAGECONFIG via GSTREAMER_ORC
083c63d boost.inc: fix BJAM_OPTS --build-dir option
f4e17c6 shared-mime-info: update to 1.6
4ffdfdf vala: update to 0.30.1
f53f374 python-git: update to 1.0.2
ec73437 pax-utils: update to 1.1.5
447ddb9 nettle: update to 3.2
26a3d25 ncurses: update to revision 20160213
dc42d30 libdrm: update to 2.4.67
0296e0a gtk+3: update to 3.18.8
e08ad62 gtk-icon-utils-native: update to 3.18.8
9daf153 git: update to 2.7.2
927dfaf gnupg: update to 2.1.11
2c39358 clutter-gst-3.0: update to 3.0.16
b8a1e59 ccache: update to 3.2.4
4d4aa1f libsolv: update to 0.6.19
8c2e420 ffmpeg: update to 3.0
afce247 nspr: update to 4.12
b19dbe5 pcmanfm: update to 1.2.4
6b41608 libfm: update to 1.2.4
325a9d3 epiphany: update to 3.18.4
d4da534 wic: don't throw away our created swap partition
5f82d17 automake: set test-driver path relative to top_builddir
b41862d uninative-tarball: respect SDKMACHINE when building
4d1c14f boost.inc: enable more verbose build logs
7f84ad0 gstreamer1.0-plugins-XXX: move inherit gettext into common .inc file
2ce48e6 gstreamer1.0.inc: add explicit PACKAGECONFIG init
935d88a gstreamer1.0-libav: move LIBAV_EXTRA_CONFIGURE_COMMON_ARG into .inc
3a8ff19 gstreamer1.0-libav_git: add --ranlib option to LIBAV_EXTRA_CONFIGURE_COMMON_ARG
b8bdb99 boost.inc: limit ARM_INSTRUCTION_SET over-rides to armv4/armv5
9ca8f30 populate_sdk_ext: Add images to SDK_INSTALL_TARGETS
07dc765 boot-directdisk.bbclass: drop IS_VM chechking
a87574c image-live/boot-directdisk.bbclass: remove AUTO_SYSLINUXCFG
76eb815 testimage.bbclass: reuse generic test suites
6571a84 testimage.bbclass: add generic, image test suites
8c45747 gconf: remove redundant dependencies
a74c389 gtk-doc-stub: don't inherit autotools
2269f90 os-release: sanitise VERSION_ID field
9d86b26 apr-util: add ldap crypto and sqlite3 to PACKAGECONFIG
d8d2f57 apr-util: fix loadable module packaging
77cfa2b glibc.inc: improve optimisation level sanity checking
04c4719 rsync: add native variant
2c20fe4 core-tools-profile: add lttng tools for aarch64
8a0b997 lttng-ust: add support for aarch64_be
6081c35 liburcu: add support for aarch64_be
07a3c71 harfbuzz: add explicit dependency on fontconfig
73cc8b8 harfbuzz: update 1.2.0 -> 1.2.1
bb151b8 fontconfig: Don't add font directories from host
e9f5134 musl: Upgrade to 1.1.14
bf4d380 oe-selftest: devtool: add an additional test for devtool upgrade
4bae2f2 oe-selftest: devtool: rework devtool upgrade test
10290f2 devtool: upgrade: print new recipe name
5cd3be3 devtool: upgrade: drop PR on upgrade
e6f684b devtool: upgrade: eliminate unnecessary datastore copy
860574e devtool: upgrade: fix several issues with extraction of new source
66a781c devtool: upgrade: fix constructing new branch from tarball releases
d30cc76 devtool: upgrade: fix renaming of recipe if PV is not in name
75eeeab devtool: upgrade: fix moving version-specific files directory
81ebb0b devtool: upgrade: fix version argument checking
e953b57 devtool: upgrade: drop superfluous call to validate_pn
492b1eb devtool: upgrade: make source tree path optional
942ae25 devtool: modify: fix source tree default name when mapping virtuals
e2334e1 devtool: add: tweak auto-determining name failure message
55ae566 uninative.bbclass: if the loader can't be found disable instead of failing
50b8740 uninative: use check_output instead of Popen directly
4495e8b lib/oe/qa: add explicit exception for 'file isn't an ELF'
4553bb1 libdrm: fix build with uclibc
4e5a871 strace: fix ptest execution
e8e0489 clutter-1.0: Fix confgure test errors found by clang
b748f40 oeqa/parselogs: Updated whitelist
4b32351 buildstats.bbclass: Don't assume /proc/<pid>/io present
07e1f10 sysvinit-inittab: Move start_getty scrip to base_bindir.
8d07e14 oeqa/selftest/prservice: Added new TC: check pr-server starts and stop correctly on localhost.
d2a563c oe-selftest: Add support for lib/oeqa/selftest subdirectories
7f58b92 musl: Upgrade to 1.1.14
73bf792 devtool: update-recipe: create config fragment
2fbd1d7 devtool: sync: update kernel config
26f951b git: fix installed-vs-shipped QA Issue
033db24 btrfs-tools: fix symlink creation multiple times
9af773f bison/gettext: add --with-bisonlocaledir to assign BISON_LOCALEDIR
b14e2ae gcc: use relative path for configure script
1f00fb2 depmodwrapper-cross: nopackages to avoid QA [buildpaths] issue
00a6f5a oeqa/utils: added new network module
3f7aa6f scripts/oe-selftest: Use site.USER_SITE to run coverage configuration code for sub-process
1c6c76e scripts/oe-selftest: Add filtering to the coverage data gathered by oe-selftest
4a21827 oeqa/selftest/signing: Added test for locked signatures
604dc1c package: check inherit instead of PN to decide if a recipe is a packagegroup
b4df005 tune-cortexa9.inc: add vfpv3 tunes
889a5cc mirrors/own-mirrors/sanity: Updates after npm fetcher addition
28d17cf npm.bbclass: Add npm class to match fetcher
bc5a1d1 base: Add nodejs-native dependency for npm:// urls
9d5483c meta-yocto: Rename to meta-poky to better match its purpose
ab3a718 adt-installer: Drop since its replaced by the extensible SDK
c1c6a9d sanity: Improve configuration upgrade capabilities (support meta-yocto -> poky transition)
2587101 image: Run do_rootfs_wicenv after do_image
e0fd964 bitbake: toaster: change 'delete layer' to 'remove layer'
6e82820 bitbake: toaster: rename 'run again' button
c8dd72c bitbake: toaster: fix banner after customimage package add
149f574 bitbake: toaster: custom breadcrumb for the default project
4a12865 bitbake: prserv: Add dump_db()
bdb51ab bitbake: toaster: remove custom images from Image Recipes
98d462c bitbake: toaster: show suffix for image files and basename for artifact files
88b5660 bitbake: toaster: add missing link to image recipe details
25b179d bitbake: toaster: adjust the search field width
a97081b bitbake: toaster: make 'configuration' the first tab
e1fc319 bitbake: toaster: link to configuration in all breadcrumbs
df2808f bitbake: toaster: reduce max height of modal dialogs
6c51f08 bitbake: toaster: disable add layer button on click
d4a663a bitbake: toaster: apply error class to name field
48f0ae2 bitbake: toaster: fix custom image name form
07eb4f2 bitbake: toaster: comment out project release change
12ade9b bitbake: fetch2/npm: Add mirroring support for npm fetcher
ca5b6d6 bitbake: fetch2/npm: Add npm fetcher
813bd1f bitbake: utils.py: Add sha1_file call
7bb9e8d signing-keys: Make signing keys the only publisher of keys
64ab17b systemd: Upgrade to 229
44248af harfbuzz: update to version 1.2.0
f4f5573 perf: add sysroot handling to subcmd
7a95c2c oeqa/selftest/buildoptions: build -minimal instead of -sato images
2980ac0 bitbake.conf: add findutils-native to ASSUME_PROVIDED
2e152ff findutils: upgrade to 4.6.0
951ce18 mesa: add missing space to RRECOMMENDS append
2305610 uclibc: Do not use immediate expansion operator
aab3900 security_flags: Disable ssp when compiling uclibc
afb954e rpm: fix building rpm 5 with internal beecrypt
069cdbe alsa-lib: topology: Add missing include sys/stat.h
b879aed libsdl2: Fix patch after upgrade
3d4f71d gstreamer1.0-libav_git: update 1.7.1 -> 1.7.2
9d83a3e gstreamer1.0-plugins-ugly_git: update 1.7.1 -> 1.7.2
6456a6f gstreamer1.0-plugins-bad_git: update 1.7.1 -> 1.7.2
821498f gstreamer1.0-plugins-good_git: update 1.7.1 -> 1.7.2
04e77c1 gstreamer1.0-plugins-base_git: update 1.7.1 -> 1.7.2
e67c91d gstreamer1.0_git: update 1.7.1 -> 1.7.2
ea8c34e libnewt: Fix build with PIE flags
66a833a pseudo: Fix build when security flags are enabled
91a1baa glibc: Upgrade to 2.23
c1f9507 no-static-libs: remove eglinfo
0ab67d6 freetype: use autotools instead of a manual do_configure
4883ccc classes/populate_sdk_ext: add a better config extension mechanism
524ee08 recipetool: create: improve CMake package mapping
7b6e5b0 recipetool: create: add additional extension mechanisms
b2d4472 devtool: modify: tweak help description for behaviour change
a8e0e5e devtool: deploy-target: preserve existing files
2059a34 devtool: undeploy-target: support undeploying all recipes
b95c72c devtool: deploy-target: write deployed files list to target
62989ef devtool: sdk-update: tweak command-line handling of updateserver
cada5a8 devtool: (un)deploy-target: add help descriptions
6bd88e6 scripts/lib/argparse_oe: tweak title above options
32ef523 devtool: categorise and order subcommands in help output
9f7df76 devtool: update-recipe: don't show workspace recipe warning if no update
51972ed devtool: reset: fix preserving patches/other files next to recipes
e54f9c1 devtool / recipetool: use common code for launching editor
dd35f69 devtool: minor fix for error message
41242a2 staging.bbclass: remove trail slash from SYSROOT_DESTDIR
aeb8964 terminal.bbclass: import oe.terminal for oe.terminal.prioritized()
bee556a recipe_sanity.bbclass: skip DataSmart in recipe_sanity_eh()
2d293bd image.bbclass: fix circular dependency when IMAGE_FSTYPES append hddimg
a332360 toolchain-scripts.bbclass: add three other path to PATH in env.sh
4d2910f libsoup-2.4: disable libsoup-gnome by default
619f6c6 libsoup-2.4: prevent PACKAGECONFIG dependant package renaming
13e726f libsoup-2.4: minor formatting improvements
dd0ef3c populate_sdk_ext.bbclass: Add SDK_RECRDEP_TASKS variable
4c5c40d devtool: Don't recursively look for .devtoolbase in --basepath
0220180 populate_sdk_ext: Don't ignore SDK_TARGETS value
8c0ba8d bitbake: toaster: toastergui Fix invalid char test and implementation
913e9b1 bitbake: toaster: PackagesTable show only installed packages
94bca58 bitbake: toaster: toastergui unit tests convert to use fixtures
8796ac8 bitbake: toaster: SoftwareRecipesTable apply default order_by
8469e58 bitbake: toaster: orm migrations Sort out migrations mess
78b6109 cml1/sstate: Fix missing getVar parameter
7e19f88 linux-yocto/4.1: capabilities backports
54bfbcc waf.bbclass: Remove --disable-static from EXTRA_OECONF
51fc304 gcc-5.3: backport fix for PR-target-65358
ed20c6c epiphany: Add libxml2-native to DEPENDS
2021f63 libsdl2: update to 2.0.4
947b3bf cmake: Update to 3.4.3.
4699483 sstate.bbclass: use oe.gpg_sign for gpg signing
db7c7c2 oe/gpg_sign: add 'passphrase' argument to detach_sign method
e845b75 sign_rpm.bbclass: do not store key details in signer instance
d5be866 oe/gpg_sign: add 'armor' argument to detach_sign()
03554b7 oe/gpg_sign: add verify() method
af7e516 ruby: break out ri-docs and rdoc into separate packages
8bcf139 insane.bbclass: print more info for build-deps and file-rdeps
5f3dfea curl: re-enable proxy support by default
1f61888 libtool: Don't hardcode grep paths
a3b996a cml1.bbclass: fix do_menuconfig
91bfe50 cups: upgrade to 2.1.3
eeac0a9 coreutils: upgrade to 8.25
01dc859 findutils: upgrade to 4.5.19
bf7d5f6 diffstat: upgrade to 1.61
247f3b4 grep: upgrade to 2.23
4e5e501 bitbake: data_smart: Drop default expand=False to getVarFlag [API change]
c7610aa bitbake: data_smart: Drop default expand=False to getVar [API change]
4f0ab27 bitbake: SignatureGeneratorBasic: make checksum cache file configurable
0cdf193 bitbake: MultiProcessCache: make cache filename configurable
ca552bb bitbake: FileChecksumCache: add get_checksums() method
8f61f2d bitbake: bb/runqueue: save task file dependency cache onto disk
5177b1e bitbake: SignatureGenerator: add method for saving the file checksum cache
97617fd bitbake: bb/cache: drop some unused arguments
5a87d8c bitbake: Allow Hob to run images on a custom simulator, other than qemu
7fc38ea gma500-gfx-check: Fixes infinite calling to modprobe gma500_gfx
be7b52a pulseaudio: 6.0 -> 8.0
c52b8f6 alsa-plugins: 1.0.29 -> 1.1.0
a231a4e alsa-utils: 1.0.29 -> 1.1.0
1adbb73 alsa-tools: 1.0.29 -> 1.1.0
3a82e2e avahi: update to version 0.6.32
14daeb5 no-static-libs.inc: Add libcap-native
c001863 libsdl2: Fix build with static libraries disabled
a46dc87 uboot-inc: Backport patch to fix Beaglebone Black bootloader
c7355b9 busybox: drop patches that are not valid anymore
47d0119 pcmciautils: Update SRC_URI
f37ac5b debianutils: Upgrade 4.5.1 -> 4.7
adfcaf2 busybox: Add musl config for _git recipe
46824dc debianutils: Fix SRC_URI to use debian snapshot
3df8701 nfs-utils: bugfix: adjust name of statd service unit
c15bf55 musl: Upgrade to 1.1.13+
07e7879 dpkg: Update to 1.18.4
5794b56 glew: upgrade to 1.13.0.
aea0746 glew: rewrite to use upstream build system
0b1c324 socat: Fix build with musl
04c6a48 binutils: Fix useless rpaths QA warning
eb6d14e image/populate_sdk: seprate variables to fix dependency
c9e5e34 gcc: Backport nios2 r31 fix
012460d sqlite3: update 3.10.2 -> 3.11.0
f770a6e insane: wrap autotools checks in inherits_class(autotools) checks
35011d9 cmake: don't inherit autotools
9cd64ed oeqa/selftest/bbtests: Test bitbake --setscene-only option
7e5b451 glew: don't put our CFLAGS into the pkgconfig file
b1145cc dbus: update large file patch
fad63e3 coreutils: fix problem with acl for 6.9 version
351039f gcc-4.9/5.3: Ignore -fdebug-prefix-map in producer string
7a11650 bitbake.conf: use target path as compile dir in debugging info
ef30119 glibc: Security fix CVE-2015-7547
c834ebc glibc: CVE-2015-8776
842177a glibc: CVE-2015-9761
efa1ae5 glibc: CVE-2015-8779
aefe1fa glibc: CVE-2015-8777.patch
152914f oeqa/parselogs: Whitelist dmi firmware failure message in 4.4 kernels
683ea31 rng-tools: Fix underquoted m4 and libgcrypt floating dependency
7a700f5 lib/qa.py: raise ValueError if file isn't an ELF
334e1b5 lib/oe/qa: ELFFile: check that a path is a file before opening it
11359e9 rng-tools: fix the build with musl
a258589 bitbake: bb.ui.knotty: prefix task messages with recipe/task
4bf8b21 bitbake: Move bb.{debug,note,..} into their own logging domain
3b35de3 layer.conf: Add gstreamer1.0-meta-base to SIGGEN_EXCLUDERECIPES_ABISAFE
14e9385 sstate: Add ca-certificates-native to postinst recipes list
73e53e4 nss: define RPATH variable for nss-native
6e4e9f7 Revert "lsbinitscripts: fix the path for mountpoint"
6db39e1 libunwind: Fix build on ppc
47896a7 dbus-glib: 0.104 -> 0.106
93d8fc1 conf/no-static-libs: add explicit rule for libical
637b44c runtime/systemd: Fix for boot time string parse error
ef5b8b4 security_flags: Add SECURITY_CFLAGS to TARGET_CC_ARCH for binutils
1387785 binutils: Use tip of 2.26 branch
da13f0b buildhistory.bbclass: remove out-dated information on request
a56da4a Remove obsolete references to exmap
8b21720 bitbake: knotty: Set exit failure code on runQueueTaskFailed events
a9223e2 bitbake: taskdata: Fix traceback issue with missing provider
7593756 bitbake: cooker: Improve cache handling
9cb38c1 poky: Disable static libs by default
f852014 bitbake.conf: Remove unhelpful default value for EXTRA_OEMAKE
b050c50 apmd: fix build with static libraries disabled
d585a71 oeqa: Update to handle domain specific references in build logs
9300749 libpng12: Handle no static libs
67ea65e ed_0.5: Handle --disable-static option
438d6d6 conf/distro/include: Add no-static-libs.inc
2eb19cc classes/buildhistory: fix for python function parsing change
1a3204c valgrind: Fix build with musl
e8b0da1 rpm: Fix build with musl
48144e0 gstreamer1.0-meta-base: Mark as machine specific due to COMBINED_FEATURES
ff8ca89 gdb-cross-canadian: Add missing virtual/* DEPENDS
120a160 e2fsprogs: Update to upstream version of a patch
5394ada gdb: Rationalise PACKAGECONFIG
ce0f8ab insane: Add --disable-static to UNKNOWN_CONFIGURE_WHITELIST
94abdb2 linux-yocto: Work around PAT issue on qemux86
6fb493a libgcrypt: update 1.6.4 -> 1.6.5
bf9ad22 musl: Upgrade to tip of tree
5d156bc oe-selftest: don't use specific tasks
80e8928 oe-selftest: pylinted wic tests
9b6dc9b wic-image-minimal: use uuid for root partition
ab7cb65 wic: fix processing of --use-uuid
51e0a8a oe-selftest: add new wic testcase
2100f82 wic-image-minimal: update .wks to boot by qemu
4b26601 wic-image-minimal: change IMAGE_FSTYPES
f799e21 oeqa/targetcontrol: support wic image type
7066f16 oeqa/targetcontrol: make ssh control optional
0ade658 qemurunner: add parameter to method 'start'
d083fec oe-selftest: remove unused parameter
c26a9c3 runqemu: support path/to/<image>-<machine>.wic
c7f0578 runqemu: don't set KERNEL for wic images
2c3a009 runqemu: add support for wic images
64d2f13 scripts/sstate-cache-management.sh: Change wording
6740dd5 qemu.inc: Add rng-tools to qemu images
ce3df21 rng-tools: Import recipe from meta-openembedded
36b43b2 lib/oe/terminal: set workdir for konsole terminal
03e1950 mmc-utils: upgrade to latest git version
b5b8003 ltp: Upgrade to 20160126 and fix build on musl
f6b3957 initscripts: start urandom after populate-volatiles
85ac8eb initscripts: populate-volatiles.sh: add mount-bind feature
be5b72c libdrm: don't detect components that have been disabled
5fc5996 buildhistory: Fix regex to handle versions without spaces
7c3d4c0 debian: Fix superfluous setting for RPROVIDES
2eba066 autotools: Fix interaction with bitbake -b
9c8fee9 autotools: Correct dependency search logic error
971fafb maintainers.inc: include libjpeg-turbo and mmc-utils
4e0b334 scripts/runqemu-internal: Work around qemux86 PAT bugs in linux 4.4.1
283a302 sanity: Bump minimum version to 1.29.0
1c2d632 bitbake: Bump version post release to 1.29.0
a12dcc4 base.bbclass: fix support for gitsm://
bc72f64 linux-yocto: Update SRCREV for genericx86* for 4.4
be89a1d linux-yocto: Update SRCREV for genericx86* for 4.1
4a8d20a poky: update qemu* to prefer 4.4 kernel
d255f4f linux-yocto/4.1: galileo backports and support
fdcb373 linux-yocto/4.1: update to v4.1.17
5688cab linux-yocto/4.4: update to v4.4.1
f9f93ae bitbake: cooker: gracefully shutdown parsers
1f7f077 bitbake: buildinfohelper: unset brbe variable when build finishes
9a6cb10 nativesdk-buildtools-perl-dummy.bb: Fix variable expansion in python code
5e978d7 classes/testsdk: do_testsdkext avoid STAGING_DIR/BASE_WORKDIR in PATH
f56e9aa freetype: update 2.6.2 -> 2.6.3
1ba1aa3 freetype: minor formatting improvements
0d5e611 piglit: upgrade SRCREV
72c6b62 libbsd: Security fix and update 0.8.2
78be954 gstreamer1.0-plugins-bad_git: fix gst_structure_get() etc compiler warnings
fdd8979 gstreamer1.0-plugins-good_git: fix gst_structure_get() compiler warning
a23a50e python-setuptools: Add python-compile on RDEPENDS
914ff14 qemu: Security fix CVE-2016-2198
0938353 qemu: Security fix CVE-2016-2197
1f3e1d1 curl: add PACKAGECONFIG options for less common / legacy protocols
19045ba toaster: tests Remove symlinks from toasteruitest folder
738a9b7 classes/sanity: check_perl_modules provide output when fail
e64ce73 oe-selftest: devtool: add another devtool add test
a5095d1 recipetool: create: set S when we set SRC_URI from local git repo
ca5a36c recipetool: create: convert http git URLs that don't end in .git but contain /git/
4c71afb recipetool: create: ensure URL parameters don't make it into the name
86f3464 devtool: add: fix adding from a local source directory
fa50153 devtool: modify: make -x the default behaviour
f767757 recipetool: create: determine name/version from github/bitbucket URLs
d94c7e3 recipetool: create: support cmake find_library directive
ddfe744 devtool: commit for extra tasks that modify source when extracting
e36cb6c classes/externalsrc: create symlinks for workdir and logs
20034c3 classes/externalsrc: disable rm_work when active
c38f253 uninative.bbclass: capture stdout/err from patchelf-uninative
9065222 db: update HOMEPAGE
f0d5478 mdadm: update to version 3.4
79d5041 iproute2: update to version 4.4.0
21e3b2a image_types_uboot: add cpio.gz.uboot to supported IMAGE_TYPES
6fab5fc recipetool.newappend: add -e/--edit argument
252f97e liburcu: Add nios2 support
e72ab70 strace: Fix build for arc, metag, nios2, or1k, tile
691277f udhcpc: specify full path for ip command calls
f141f0b alsa-lib: avoid including <sys/poll.h> directly
a1ad3d0 oprofile: Add nios2 support
fd7dd07 nspr: Add nios2 support
954dc45 guile: Fix nios2 support
611e3d8 binutils: Repair nios2 PLT and GP handling
027eac5 gstreamer1.0-meta-base: make gstreamer1.0-plugins-base-alsa conditional
056d82c curl: drop obsolete pkgconfig_fix.patch
0e62f01 iproute2: update to version 4.4.0
216e618 quota: update to version 4.03
25d2956 oeqa/selftest/sstatetests.py: check that PARALLEL_MAKE doesn't change signatures
2966016 bitbake.conf: remove unused ALLOWED_FLAGS
3bdeda5 libproxy: remove GPLv3 logic and spurious exports
86994fd libproxy: add PACKAGECONFIG control for gnome3
033d754 libproxy: replace PACKAGECONFIG equivalent with the real thing
e65a29e openssh: Properly skip ptrace test if tools are missing
e1a1e0b openssh: Fix regex that sets sftp-server path for tests
d7faf67 insane.bbclass: Support MicroBlaze with musl
9937c93 hdparm: Explicitly set EXTRA_OEMAKE as required
7475c4c qemu: Security fix CVE-2016-1568
4857511 xserver-xorg: Add PACKAGECONFIG for crypto libraries
34798fa mesa: upgrade 10.6.3 -> 11.1.1
7edea7c initrdscripts: fix mmc device as install target
c3ef2bb libsoup-2.4: Remove unnecessary gnutls dependency
04454b2 wpa-supplicant: Only depend on libgcrypt when needed
4de0ee6 systemd: Don't depend on gcrypt unnecessarily
0da96bf buildstats.bbclass: remove dead URL from comment
326592d Remove obsolete references to exmap
a0cc1c3 curl: update 7.47.0 -> 7.47.1
a0d3eb9 sign_package_feed.bbclass: fix task dependencies
8cb1e83 oe/gpg_sign: fix incorrect variable name
902a68f meta/conf/layer.conf: adapt to more flexible initramfs-framework RDEPENDS
5b2b343 tune-corei7.inc: tell qemu to emulate a matching processor
5b70ee4 pixz: fix upstream version check
62a6f97 webkitgtk: update to 2.10.7
1cd6912 libwnck3: update to 3.14.1
e53eef9 iso-codes: update to 3.65
30cf8aa bash-completion: fix upstream version check
8098256 gstreamer1.0: fix upstream check for unstable versions from git
c24b0ab ffmpeg: update to 2.8.6
9237097 python: merge python-elementtree into python-xml
5ac4172 piglit: add missing dependency on python-xml
4d3ca42 systemd: tighten timesyncd and journal-gateway user accounts
6be3031 systemd: extend PACKAGECONFIG flags
85728ec systemd: rename systemd-zsh to systemd-zsh-completion
22a2866 systemd: move some tools into systemd-extra-utils package
9909104 classes/useradd: handle whitespace only USERADD/GROUPADD/GROUPMEMS
e485686 systemd: realign packages list
41d0f83 systemd: move bash completion into separate package
9a80afd nettle.inc: drop duplicate LIC_FILES_CHKSUM and SRC_URI hashes
72ec267 gdb: drop unnecessary CC_FOR_BUILD etc exports
00d6b67 gdb: build fix for MIPS + musl libc
40e4e8c strace: build fix for MIPS + musl libc
299b426 uclibc: fetch from master branch not 1.0
4ac4d28 uclibc-ng: Bump up to 1.0.12 release
70bfd4c musl: Upgrade to tip of tree
d1496b4 e2fsprogs: Fix multiple xattr handling
9d4b526 cdrtools-native: Explicitly set EXTRA_OEMAKE as required
864797a oeqa/prservice: Fix whitespace problem
7cd8351 pseudo: uprev to 1.7.5
246b02e ptest-runner: Explicitly set EXTRA_OEMAKE as required
7932525 unzip: Explicitly set EXTRA_OEMAKE as required
4ef055c sysklogd: Explicitly set EXTRA_OEMAKE as required
625066b stat: Explicitly set EXTRA_OEMAKE as required
07e81c8 pigz: Explicitly set EXTRA_OEMAKE as required
936223b iputils: Explicitly set EXTRA_OEMAKE as required
1e3fdbb ed: Explicitly set EXTRA_OEMAKE as required
ef36b6f gptfdisk: Explicitly set EXTRA_OEMAKE as required
59ee206 dmidecode: Explicitly set EXTRA_OEMAKE as required
d17758a libacpi: Explicitly set EXTRA_OEMAKE as required
44e8d0f apmd: Explicitly set EXTRA_OEMAKE as required
961d898 perl: Explicitly set EXTRA_OEMAKE as required
ecb9c34 oeqa: Improve test failure messages
ae2f3a3 sstate: Ensure populate_lic sstate objects are cleaned
26f26e5 package_deb: Ensure allarch deb packages aren't target specific
b3a2065 base: Make do_cleansstate nostamp
37357ab classes/testimage: Fix exportTests function.
f895a61 classes/testsdk: Add help information on how to run tests.
e22fbce oeqa/sdkext/devtool.py: Add location test to ensure that devtool is the eSDK one.
92d0cc5 oeqa/sdkext: Add devtool basic tests for eSDK.
a619ea2 oeqa/oetest: Fix compatibility SDK tests using eSDK.
062dbd6 classes/populate_sdk_ext: Add SDK_EXT_TARGET_MANIFEST and SDK_EXT_HOST_MANIFEST
4cfdf17 testsdkext: Add skeleton for support Extensible SDK tests.
5580d7b classes/testsdk: Add compatibility SDK testsuite to eSDK
7181da7 oeqa/oetest: oeSDKTest when run a command redirect env output to null
f3c2ce2 classes/testsdk: Add function run_test_context
3577c35 oetest.py/TestContext: Move loadTests and runTests inside it.
8009418 testimage/testsdk: Move get test suites routine inside TestContext.
b588b80 testimage/testsdk: Modularize TestContext.
59791d1 toolchain-shar-extract.sh: Add proxy variable to new env.
abd8158 classes/testsdk: Add call to export_proxies on testsdkext.
42f2ac4 classes/testsdk: Add testsdkext task only install.
90590ab get_test_suites: Add sdkext type for load test suites.
2ecc319 populate_sdk_ext: Set TOOLCHAINEXT_OUTPUTNAME.
7b459be classes/testimage: Add defeault inherit for testsdk.
24326a9 classes/testsdk: Add new class testsdk.
3d1d30b testimage: Modularize helper functions for get test lists.
8b5ee36 bitbake.conf/base: Improve handling of SRCPV
947e526 oeqa: setup bitbake logger after tinfoil.shutdown
400f530 bitbake: build: Improve python execution tracebacks
aece748 bitbake: build/data: Don't expand python functions before execution [API change]
e39cfb1 bitbake: cooker: Don't expand python functions in variable dumps
f652b6b bitbake: data: Don't expand python functions for variable dependencies
d3e0c44 bitbake: data_smart: Avoid expanding anonymous python functions
e0eb2ea bitbake: toaster: models Remove manual transaction control from lsupdates
48622e1 bitbake: toaster: build section Improve display of builds when > 1 targets
4d0ba0f bitbake: toaster: templates make build data breadcrumb consistent
99184d7 bitbake: BBHandler/ast: Merge handMethod and handleMethodFlags
6ba69b4 bitbake: utils: Drop datastore function inspection during exception
f8a44b1 bitbake: cooker: extended dot styling
30c132b bitbake: toaster: Enable Image Customisation feature
5e14a8f bitbake: toaster: xhr_customrecipe_packages Add dependencies to included packages
749f5a6 bitbake: toaster: orm generate_recipe_content only exclude locale packages
6269411 bitbake: toaster: customrecipe page Add last successful build link and conditionals
8d5b61e bitbake: toaster: models Add update_package_list for CustomImageRecipe
86db0bd bitbake: toaster: orm Add last_updated field to CustomImageRecipe
18d8b17 bitbake: toaster: models add get_last_successful_built_target method
8885b7b bitbake: toaster: pkg_dependencies_popover just show direct dependencies
40f6eff bitbake: toaster: models add all_depends method for Package_DependencyManager
a8ab1c6 bitbake: toaster: buildinfohelper CustomImagePackage update dependency info
0fee829 bitbake: toaster: newcustomimage_modal add frontend name validation
cb6d290 bitbake: toaster: API CustomImageRecipe check the recipe name supplied is valid
5634a25 bitbake: toaster: views CustomRecipe API add size information to the package lists
6fbceb0 bitbake: toaster: models Invalidate ToasterTables cache when a m2m field changes
998f9af bitbake: toaster: customrecipe Add dependency tracking to package selection
9976e4f bitbake: toaster: tables move template logic into the pkg_add_rm_btn
d77c247 bitbake: toaster: CustomImageRecipe generate overwrite IMAGE_FEATURES
481dc11 bitbake: toaster: make locale packages uneditable in custom image page
a757d39 bitbake: toaster: include locale and packagegroup packages in custom image
baac458 bitbake: toaster: update custom image package table filters
efbffe3 bitbake: toaster: move recent builds query to model
b514785 bitbake: toaster: update customimagerecipe migration
df58f5b bitbake: toaster: add merge migration to resolve conflict
38f4913 bitbake: toaster: orm generate_recipe_file_contents Handler for require recipe
769017e bitbake: toaster: project builds Poll the server to get latest progress for build
971d65c bitbake: toaster: localhostbectrl Update the dirpath of customrecipe's base layer
6d9f342 bitbake: toaster: tables Check layer presence in project for customise_btn
76c0008 bitbake: toaster: toastergui tests Add addtional data to the setUp for new tables
70a078e bitbake: toaster: tables SelectPackagesTable rename recipe_id to custrecipeid
7e4c231 bitbake: toaster: toastergui tests Update package test to use CustomImagePackage
4b3c9d6 bitbake: toaster: customrecipe Add further front end features using new API
b213907 bitbake: toaster: xhr_customrecipe_packages add GET info for package response
a9668ee bitbake: toaster: xhr_customrecipe_id change to use CustomImagePackage
439314c bitbake: toaster: API allow CustomImageRecipe to be updated after creation
9ea4de6 bitbake: toaster: tables Change SelectPackagesTable to use ProjectPackage
20f400b bitbake: toaster: tables add recipe download link to CustomImagesTable
1c9ce1c bitbake: toaster: newcustomimage_modal use libtoaster method for new CustomRecipe
8b1d043 bitbake: toaster: libtoaster Add createCustomRecipe method
32048fa bitbake: toaster: orm Add convenience method to get all pkgs in a CustomImageRecipe
c80b7df bitbake: toaster: orm get_project_layer_versions to return layer_version objects
796e348 bitbake: toaster: toastergui tests Add unit test for download custom recipe
04d8c94 bitbake: toaster: toastergui tests Update to reflect changes to CustomImageRecipe
4e8a0aa bitbake: toaster: views xhr_customrecipe_packages clean up API
66b5608 bitbake: toaster: toastertable remove title from Show all in table
ce72896 bitbake: toaster: Add recipe details page
5f52614 bitbake: toaster: newcustomimage Move modal dialog out of newcustomimage template
2a3dd32 bitbake: toaster: Continue front end features to custom image recipe page.
d6e7e4a bitbake: toaster: tables Add table for Packages and update SelectPackagesTable
43f0a05 bitbake: toaster: views Add view to download custom recipe
2cf55af bitbake: toaster: move CustomImageRecipe generation to API entry point
c402ac2 bitbake: toaster: orm add CustomImageRecipe generate contents function
a6e4f94 bitbake: toaster: buildinfohelper Add the concept of CustomImagePackage
e1bfe1c bitbake: toaster: orm: Add db migration for new CustomImagePackage table
f760a78 bitbake: toaster: orm Add CustomImagePackage table
4117af2 bitbake: toaster: orm: Add db migration for new CustomImageRecipe inheritance change
1f10289 bitbake: toaster: orm make CustomImageRecipe inherit from Recipe
648753b bitbake: toaster: orm Add sum of dependencies size function to PackageDependencyManager
a92fc30 bitbake: toaster: tablejs Add an event handler to manually trigger a data reload
4c82878 bitbake: toaster: ToasterTables simplify filter function move common part to widget
3e1e8e6 bitbake: toaster: models fall back to a sensible string for no vcs reference
14d09c8 bitbake: toaster: localhostbecontroller CustomRecipe now base_recipe is Recipe
7d5d8d0 scripts/lib/bsp/engine: trailing whitespace cleanup
dfeda17 scripts/lib/bsp/engine: fix path separator
d482d84 maintainers: remove gtk-theme-torturer and gnome-mime-data
d0d85a4 bitbake: bb/fetch2: Move export_proxies function from wget to utils.
7226ce2 glibc-locale: fix QA warning
4a2f42f formfactor: add machconfig for Beaglebone
eb53c54 sstatetests: Fix after change to sstate populate_lic SWSPEC
a43b9ef gstreamer1.0-plugins-base: move freetype dependency into 1.6.3 recipe
fb4f05b gstreamer1.0-plugins-base_git: update to git master 1.7.1-79-g6414289
fc81c80 gstreamer1.0-plugins-bad_git: avoid including <sys/poll.h> directly
3f02474 gstreamer1.0-plugins-good_git: avoid including <sys/poll.h> directly
9b0a74a gstreamer1.0: avoid including <sys/poll.h> directly
f9e565e gmp_4.2.1: fix build for MIPS
6d570c8 gmp.inc: limit ARM_INSTRUCTION_SET over-rides to armv4/armv5
3aecdd9 gmp: move BBCLASSEXTEND = "native nativesdk" from gmp.inc into 6.1.0 recipe
263a65d gmp: move SRC_URI out of gmp.inc + minor reformatting
aacae25 image_types.bbclass: Embed IMAGE_NAME in ubinize config file
9c0d4ec toolchain-scripts: drop PYTHONHOME
6560f80 python: set PYTHONHOME for nativesdk
92ae4e2 gcc: musl related fixes for ppc/secure-plt and gthr
9e5222c gcc: Assume libssp and dl_iterate_phdr on musl
281bd41 security_flags: wipe security flags for gcc/glibc and related libraries
61a5875 security_flags: use -fstack-protector-strong
a07f2fd security_flags: ensure security flags only apply to target builds
8d57d1d gcc: Fix build on musl with -fstack-protector
eb134c6 isoimage-isohybrid.py: fix cpio working directory
8bedf76 glib-2.0: use the system libpcre
1ae132e libpcre: enable unicode properties by default
3adb8d5 python3: remove optimize by default patch
1df1ac9 security_flags.inc: don't do -pie for syslinux
562c75c neon: convert to PACKAGECONFIG
6228cf8 bitbake: toaster: reinstate ID on edit columns button
916c73d bitbake: cooker: shutdown cooker parser on shutdown
8857498 bitbake: fetch2/osc: Clean up old variable syntax
54da829 bitbake: fetch2/osc: Remove hardcoded url
c57ba52 cross-localedef-native: add ABI breaking glibc patch
0cc825f uninative: Improve error handling
576a248 patchelf: Add patch to handle large files
bbdbe00 package_manager.py: fix python indentation bug (opkg)
ea40a0b populate_sdk_ext: Make populate_sdk_ext depend on sdk_extra_conf
4f7656a populate_sdk_ext: Add support for a "minimal" type
71bb332 populate_sdk_ext: Don't set sdk_update_targets in the config
5b7a43e toolchain-scripts.bbclass: Use PYTHONPATH instead of PYTHONHOME
f1f8447 copy_buildsystem.py: Pass the nativelsb argument to gen-lockedsig-cache
b130805 gnome-mime-data: remove
12d5fa8 gtk-theme-torturer: remove from oe-core
659d755 openssl.inc: drop obsolete mtx-1 and mtx-2 over-rides
32b498c scripts/devtool: Add getVarFlag expand argument
ed5daa1 bitbake.conf/native/nativesdk: Set PKG_CONFIG_SYSTEM_ at top level
8fa2d52 pango: unset LDFLAGS when building gen_all_unicode
edfaa04 pango: merge bb and inc
00ccf51 e2fsprogs: Ensure we use the right mke2fs.conf when restoring from sstate
66a6ec2 nativesdk: Set PKG_CONFIG_SYSTEM_ variables
34e95b0 local.conf.sample.extended: Document HOW-TO enable systemd or busbox for init system
077d32e local.conf.sample: Remove trailing whitespaces
6ae662a bitbake: parse/ast: Mark anonymous functions as python functions
9913fd8 bitbake: codeparser: Improve handling of data.expand() dependencies
4628fe1 bitbake: lib/bb: Add expansion parameter to getVarFlag
b98866d bitbake: fetch2/gitsm: Fix when repository change submodules
390c2c1 bitbake: data_smart: Add missing expand parameter to getVar call
56454f6 bitbake: bitbake: prserv: do not clear umask when daemonizing
abf8a8f bitbake: bitbake: prserv: SIGTERM handling hung process
be032fc bitbake: bitbake: prserv: -wal and -shm sqlite lost when daemonizing
1e95ebd poky-tiny: Use musl for default system C library
6594bd5 maintainers.inc: Set me as Maintainer of QEMU.
86851d5 insane: Fix populate_sysroot sanity test path
d09a25e socat: upgrade to 1.7.3.1
fad264b libffi: move from recipes-gnome to recipes-support
d3753dd libffi: ensure sysroot paths are not in libffi.pc
c72614b syslinux: remove LDFLAGS manipulation
8ad11fc lttng-tools: Fix ptest installed la files
66ed16b gnutls: update 3.4.8 -> 3.4.9
149cb17 python-distutils: add missing dependency on python-email
3473962 nss-myhostname: Fix build on musl
42e37d7 linux-firmware: update to latest revision 52442afee
ce1bed7 license.bbclass: add LICENSE_CREATE_PACKAGE to perform_packagecopy vardeps
e43504b i2c-tools: point SRC_URI at Yocto source mirrors
2d7622c gnutls.inc: allow libidn support to be controlled via PACKAGECONFIG
60ebe1c gnutls.inc: add gmp to DEPENDS
935aa96 gnutls.inc: minor formatting improvements
3fa1c54 Revert "kernel/kernel-arch: Explicitly mapping between i386/x86_64 and x86 for kernel ARCH"
0b82af2 wic: isoimage-isohybrid: check for syslinux-native
9699441 formfactor: add machconfig for qemumips64
4701dc9 ncurses: use closing curly brackets in FILES_${PN}-tools variable
9d9f233 util-linux: Change ALTERNATIVE_PRIORITY above busybox
8f2306c mktemp: lower the priority of standalone mktemp package
6251846 libxsettings-client: drop obsolete disable_Os_option.patch
7894633 wic: default to empty bootloader config
090fb51 copy_buildsystem: add ability to exclude layers
8dc600f toaster.bbclass: reinstate scan for artifacts in the sdk directory
eee675b toaster.bbclass: attach image file scan postfunc to do_image_complete
0c0b072 meta: add ASSUME_PROVIDED dependency on wget-native for http fetches
f926610 gtk+3: Tweak getVar to use True, not 1
7fa6eeb classes/lib: Add expand parameter to getVarFlag
252e645 python-pycurl: remove unnecessary exports
9fd214d sstate: Fix SSTATE_SWSPEC only used by populate_lic tasks
4ea6a64 package.bbclass: Add data expansion to do_split_packages()
6ab5001 busybox/gtk/perl/base-passwd: Ensure data is correctly expanded
e8860f7 ref-manual: Fixed typo in FAQ 14.15 section.
9d2925e ref-manual: Updated FAQ entry regarding Proxy for SOCKS
29a44da ref-manual: Fixed type in LICENSE_CREATE_PACKAGE variable description
4181e58 ref-manual: Updated warning regarding libexecdir
0d8bd7d ref-manual: Added description for LICENSE_CREATE_PACKAGE variable.
6aca5b8 ref-manual: Added remove-libtool class
5e2201e toaster-manual: Updated the "Installation" to have TOASTER_DIR information
3aa162a p11-kit: fix packaging warnings
60c9759 piglit: don't use /tmp to write generated sources to
b33e440 libical: Work around hardcoded paths in pkgconfig file
a131b6e documentation.conf: align the documentation for DEBUG_OPTIMIZATION and FULL_OPTIMIZATION with bitbake.conf
974a8c0 pciutils: Explicitly set EXTRA_OEMAKE as required
2d3e6f3 openssl: Explicitly set EXTRA_OEMAKE as required
b07e161 dbus: add user sessions support
877eae1 dbus: use ${systemd_system_unitdir}
6010088 populate_sdk_ext: Add SSTATE_MIRRORS to config blacklist
70ec867 insane: add test for -dev packaging containing real libraries
38d6f1f python3: set INSANE_SKIP as libpython3.so is a trampoline library
4ac4023 p11-kit: fix module packaging
9a27010 libnl: package the libnl-cli modules in libnl-cli
111af1d remove-libtool: add new class
333dce4 gtk-immodules-cache.bbclass: fix immodules-cache path
b1e41f4 Revert "matchbox-keyboard: export GTK_IM_MODULE_FILE location"
ac1f311 directfb: use Yocto source mirrors for SRC_URI
4d80f7a gcc-configure-common.inc: drop --enable-target-optspace from configure
654eddc machine/include: drop tune-cortexm*.inc and tune-cortexr4.inc
322015a liboil: drop recipe from oe-core
41d50f9 boost: Fix build on soft-float ABI arm systems
07a91a6 libnss-mdns: Check for nss.h before using
1b34f55 db: Use cross libtool
64089c6 libtool-cross: Unset pre|post dep objects
457f417 docbook-xsl-stylesheets: create a link for easy refer
1ba62f9 pth: Remove dead code
a4a5d1f3 bitbake: cooker, bitbake-worker: Fix spelling of "received"
8f6b9c7 bitbake: cooker: Only start as many parse threads as we need
602da7c bitbake: knotty: Don't show errors for universe provider issues
1dd2d76 linux-yocto: Adds new genericx86 and genericx86-64 SRCREVs for kernel 4.4
b8fa9d3 poky: Add poky-world-exclude.inc and add qwt-as
5503a22 sstate: Revert using -m option to tar in sstate
6023798 libarchive-native: Disable libxml2 support
b09b054 pcmciautils: Fix makefile race
89df5f1 binutils: Use target provided zlib
c85c54f binutils: Upgrade to 2.26
ba2fdcd native.bbclass: Set CXXFLAGS from BUILD_CXXFLAGS not BUILD_CFLAGS
2394b15 gstreamer1.0-plugins-base: Add video crop supporting when convert frame
2724908 gstreamer1.0-plugins-bad: Fix memory leak of navigation thread
db81fc9 lib/oe/package_manager: remove package feed lists
c43da12 externalsrc: use shared CONFIGURESTAMPFILE if B=S
c6b8227 Make sure that the directory for CONFIGURESTAMPFILE exists
ca06179 autotools.bbclass: use oe_runmake instead of ${MAKE}
f4f9f2f gcc, qemuppc: Explicitly disable forcing SPE flags
691f7e4 pango.inc: misc dependency fixes
70efb8d pango.inc: limit ptest specific do_compile_prepend to target builds
c1273d4 systemtap_git.inc: do not immediate expand SELECTED_OPTIMIZATION
e631be2 glibc.inc: do not immediate expand SELECTED_OPTIMIZATION
770d9ff mkelfimage: fix target cflags leaks to host
c936bf0 base: Move COMPATIBLE_MACHINE out the scope of SOURCE_MIRROR_FETCH
3072361 bitbake: bitbake: BBUIHelper: Remove function findServerDetails
28c041c bitbake: fetch2: Simplify logic in verify_checksum()
5375e64 bitbake: bitbake: Set process names to be meaninful
5b234d1 bitbake: utils: Add ability to change the process name
0b06924 bitbake: data.py: avoid double newlines at the end of functions in emit_var()
68600ae bitbake: build.py: minor shell_trap_code() formatting tweaks
423a264 conf/distro/poky.conf: use example.com for connectivity check
6c058ce curl: update 7.46.0 -> 7.47.0 ( CVE-2016-0754 CVE-2016-0755 )
adbe63d openssl: update 1.0.2e -> 1.0.2f ( CVE-2016-0701 CVE-2015-3197 )
85b6679 autotools.bbclass: don't create subshell to delete configure scripts
2f1bcc1 sstate: Add back packagedata on packagedata dependencies
346b225 libical: update to 2.0.0
b696bb3 kexec: package kdump init script/configuration file correctly
51cebbf connman: fix crash with iptables 1.6
7f54fab autotools_stage.bbclass: remove it
07c4bc1 gdb-common.inc: add PACKAGECONFIG for readline
5869e35 tzdata: update to 2016a
c9cc707 tzcode: update to 2016a
aff2f58 glibc-testing.inc: drop pruning of PATCH_GET from the testglibc script
dfb9d41 gcc-cross.inc: drop pruning of PATCH_GET from the testgcc script
9e7d929 bitbake.conf: stop exporting PATCH_GET = "0"
5410aff sstate: Improve handling of useradd dependencies
9823802 gtk-icon-utils-native: Drop problematic dependency
6c04e0d glib.inc: limit ARM_INSTRUCTION_SET over-rides to armv4/armv5
83476b5 glib-2.0: drop add-march-i486-into-CFLAGS-automatically.patch
fab76ae glib-2.0: refresh configure-libtool.patch
593dcd4 systemd: fix systemctl enable script for template units
3c90507 glib: use bash-completion.bbclass
d88ed5d kmod: use bash-completion.bbclass
0f3780c git: use bash-completion.bbclass
9d20661 util-linux: use bash-completion.bbclass
0e5b0bf dbus-glib: use bash-completion.bbclass
9cddc0a bash-completion.bbclass: add class
ddb786c bash-completion: move in recipe from meta-oe
74e2f68 ffmpeg: add a recipe, and remove the libav recipe
eb7e554 lib/oe/patch: Make GitApplyTree._applypatch() support read-only .git/hooks
3ed566e gcc: fix hidden weak symbols by removing buggy gcc patch
51d9ba6 dpkg: fix CVE-2015-0860
f80d16e qemu.bbclass: clarify QEMU_EXTRAOPTIONS
3dca294 pango.inc: drop obsolete dependency on qemu-native
a16e9a2f dbus: upgrade to 1.10.6
7081458 buildhistory: fix the check for existence of a git repo
d74325e connman: tidy up connman-conf usage
79f4495 connman-conf: convert to systemd oneshot
5c35883 bitbake-whatchanged: avoid double do_ task name prefix
7881c02 netbase: add ipv6 host to /etc/hosts
93fcee6 linux-yocto/4.4: CVEs and preempt-rt update
07c182f linux-yocto/4.1: update to 4.1.16
7003698 gstreamer1.0-plugins-bad: fix compiler warnings with -Os in 1.7.1
6e90145 gstreamer1.0-plugins-good: fix compiler warnings with -Os in 1.7.1
3cd70c8 libsoup-2.4: add glib-2.0-native dependency
d5b3b97 libtirpc: remove stray .orig file from Use-netbsd-queue.h.patch
209066c ptest-runner: Add ptest-runner_2.0 recipe.
4953e26 musl: Upgrade to tip of tree
52413d0 libdrm: Refresh patch to match upstream submission
66e215f fts: Correct LIC_FILES_CHKSUM
be4c446 pth: Delete
df95988 elfutils: Fix build with uclibc/musl
047ad2c grub: Backport fix for largefile detection/use
956be0c oeqa/runtime/rpm: be more verbose if test_rpm_query_nonroot fails
3b5288f libc-package.bbclass: add LOCALE_UTF8_IS_DEFAULT
4f3ef90 ref-manual: Updated the BBMASK variable description.
b2b7214 dev-manual: Restored ptest-runner2 to ptest-runner
d484e58 ref-manual: Removed obsolete do_deploy statement from "Shared State"
7705b87 toaster-manual: Updated instructions for production setup.
4b4a8a6 ref-manual: Updated the SDK figure.
d7481ce ref-manual: Added do_image and do_image_complete tasks
d39e9d1 ref-manual: Rewrite of "Image Generation" and devtool text.
1e7735e ref-manual, mega-manual: Updated the Image Creation figure
fded4fa ref-manual: Updated configuration of auto.conf in closer look
9f192c8 dev-manual: Updated the devtool help examples.
4bbd39d dev-manual: Grammar fix to kickstart section.
75078dd dev-manual: Updated wic reference section
9ed7881 poky-ent: Grouped Fedora perl packages for niceness
3ac0416 local.conf.sample.extended: Update the info about BBMASK
d61d290 bitbake: bitbake-user-manual-ref-variables: Update the help for BBMASK
a948f52 bitbake: cooker: Allow BBMASK to contain multiple regular expressions
e82101a bitbake: bitbake-user-manual-metadata: Updated 'dir' flag
100d6c2 bitbake: bitbake-user-manual: Updated the example BitBake directory
11be341 documentation.conf: Update the help for BBMASK
3d2c0f5 cmake: update to 3.4.2
4364850 at-spi2-core: update to 2.18.3
c763940 webkitgtk: update to 2.10.5
1e95815 libsecret: update to 0.18.4
9259a43 freetype: update to 2.6.2
5ec6dbb gdk-pixbuf: update to 2.32.3
9c84fbc glib-2.0: update to 2.46.2
bd7278c gtk+3: update to 3.18.6
d609cd5 gtk+: update to 2.24.29
6197313 gtk-icon-utils-native: update to 3.18.6
1556f0e libsoup-2.4: update to 2.52.2
dff038a waffle: update to 1.5.2
89bd19f vala: update to 0.30.0
6c02099 rxvt-unicode: update to 9.22
245af2b btrfs-tools: Disable backtrace on musl
fa01d37 bsd-headers: Fix LICENCE and dev package RDEPENDS
05e11a5 gdb: Fix build failures on musl
72c1aa2 ltp: Add rdep on ldd
1d0332d argp-standalone: Fix build when S != B
9f22898 bitbake: fetch2/wget: fallback to GET if HEAD is rejected in checkstatus()
d11cc29 busybox: fix stop -vs- start typo in rcS script
9f4b088 mtools: keep v3.9.9 recipe in sync with the v4.0.18 version
2c14be3 gen-lockedsig-cache: fix bad destination path joining
9dea876 distutils-common-base: do not set PACKAGES - use defaults from bitbake.conf
4ead707 insane: remove unused variable assignment
44e9c3b meta: fix capitalisation in Upstream-Status
06b4572 pixman: only check even upstream versions
0f74387 gcr: check only even upstream versions
a2848ee avahi: Add patch to fix Win10 mDNS issues
04ef34f xf86-input-libinput: initial add 0.16.0
8a2dfa1 image.bbclass: check INITRAMFS_MAXSIZE
962cc37 systemd: make TEST_DIR configurable
9967746 bind: update to 9.10.3-P3
cac47db uninative: handle UNINATIVE_URL being file:///
9995814 uninative: fix path to patchelf-uninative
2495dfa scripts/wipe-sysroot: also delete uninative sysroot
bb97157 meta/lib: new module for handling GPG signing
aadb879 devtool: extract: use the correct datastore for builddir
fa801e7 busybox: backport upstream truncate open mode fix
6996b26 gstreamer1.0-plugins-base.inc: drop obsolete dependency on liboil
1c4a8cc e2fsprogs: disable blkid
0de8766 pango.inc: drop obsolete FULL_OPTIMIZATION over-ride
89a7ed5 devtool: add configure-help subcommand
84720c8 devtool: properly handle bb.build.FuncFailed when extracting source
c3f0f7b devtool: add: warn if modified recipe found in attic directory
e559b66 devtool: build-image: allow specifying packages to add to image
e00eac8 devtool: move edit-recipe to a separate module
6720bda image: Don't create tasks with '.' in the name
88ca227 rootfs-postcommands: fix allow-empty-password on read-only rootfs
fdac363 kernel: Clean DEPLOYDIR before do_deploy runs
c2231de gcc-cross-canadian: Add missing DEPENDS on virtual/${HOST_PREFIX}gcc-crosssdk
5fdedb6 libtirpc: Drop unneeded xz-native dependency
7a98fb7 libuser: Drop unneeded xz-native dependency
72f98ba bitbake: toaster: Update UI test runner
c192bd6 Revert "xz: Allow to work with ASSUME_PROVIDED xz-native"
6df607b acpid: upgrade to 2.0.26
7a52f67 build-perf-test.sh: add eSDK testing
5c367ec build-perf-test.sh: more generic timing function
44fee2b python3-pip: Upgrade to 8.0.0
9d95a9d orc: update HOMEPAGE
0c1c93e gstreamer1.0-plugins.inc: drop obsolete ${S}/po/Makefile.in.in workaround
be145ad busybox: Add support for busybox-init
716fa93 pulseaudio.inc: drop obsolete dependency on liboil
55bfaa2 sqlite3: update 3.10.0 -> 3.10.2
6bb1dd1 sqlite3.inc: add PACKAGECONFIG to support building against libedit
39f6a9e sqlite3.inc: dynamically link the sqlite3 command-line utility
9b2835e sqlite: formatting improvements, move more stuff into sqlite3.inc
89ed462 sqlite3.inc: drop obsolete config_BUILD_CC, etc exports
6188419 sqlite3.inc: fix readline PACKAGECONFIG
939de8d sqlite3: fix the parallel build fix patch
a304b82 weston: Add missing DEPENDS on wayland-native
4a5458f bitbake: fetch2: Don't show checksum warnings if a single checksum was supplied
e66599f uninative: Fix conflicts with normal sysroot
4833bee insane: Drop do_stage test
861c916 populate_sdk: Use pixz instead of xz
a1c35f3 lib/oe/sdk: Partially revert "sdk.py: fix conflicts of packages"
29c5eda uninative: Add fetch capability
b54fa25 pixz: Add 1.0.6
d47572d xz: Allow to work with ASSUME_PROVIDED xz-native
0aeb33f lib/oe/package_manager: prevent testing an undefined variable
c1f4e92 recipetool: create: better fix for fetch error handling
10c8d14 recipetool: create: fix extraction of name from URLs ending in /
b307e0a recipetool: create: extract SRC_URI from local git repositories
50e40fc devtool / recipetool: support specifying a subdirectory within the fetched source
7e1691d recipetool: create: strip quotes from values extracted from CMakeLists.txt
477fa84 gen-lockedsig-cache: copy correct native sstate into ext SDK
204e4ab toolchain-shar-extract.sh: improve behaviour when xz is not installed
979c8fb classes/populate_sdk*: add dependencies on script files
f220abc classes/populate_sdk_ext: drop ext-sdk-prepare.py when installing
b435225 devtool: add sdk-install subcommand
44d1a2a devtool: sdk-update: improve SDK update process robustness
3360baa devtool: sdk-update: improve temp directory handling
d193531 devtool: build: ensure pkgdata is written out
d3a4f72 classes/populate_sdk_ext: add option to bring in pkgdata for world
a9dfced linux-libc-headers: Port patches for linux-headers for musl
3cffa6d libsolv: Update to 0.6.17+
d9134cf glib-2.0: Fix locale location on musl
527cd95 syslinux: Set LD to avoid using build host ld
136db70 binutils: Fix gold linking errors due to unresolved R_ARM_MOVW_ABS_NC
704e342 puzzles: Silence warning on arm with clang
bee65f9 eglinfo: Fix build on raspberrypi
6296c0f mdadm: Fix build with musl
67eef11 gpgme: Define __error_t_defined on musl
368e838 console-tools: Fix header inclusion when not using glibc
5a8c935 uclibc: Update to 1.0.11
1113d58 unfs3: Depend on libtirpc when building on musl
2ecfc02 guile: Fix build with musl
2df08b8 bsd-headers: Package cdefs.h
29deaf0 musl: Create ld.so as a relative symlink
2d028b3 fts: Fix linker hash-style option
8dd1aa8 dosfstools: Correct cross-compile CFLAGS and fix build with musl
21550d1 nss: Undefine HAVE_SYS_CDEFS_H
92e6a7a apmd: Fix build with musl
5d661c5 pcmciautils: Fix parallel build and include sys/types.h
86795ff kexec-tools: Define _GNU_SOURCE for getting loff_t definition
ff8006f systemd: Skip parsing on musl based targets
f2856a1 oprofile: fix build with musl
226c450 portmap: Point to tirpc headers and libraries on musl
5512c2f nfs-utils: Disable tcp-wrappers for musl
06d0204 bsd-headers,musl: Add recipe for bsd missing features
c2c9202 tcf-agent: Implement canonicalize_file_name() for musl as well
f294813 chkconfig: Avoid using caddr_t
b2aca09 nspr: Drop older glibc code
c0976fc irda-utils: Fix header inclusions
a3f9721 iproute2: Fix build with musl
22333f0 libuser: Fix build when secure getenv is not there
ea9dc99 iputils: Use member based initialization for mrghdr struct
b207868 pax: Fix build with musl
1076499 tar: Fix build for musl based targets
e451023 rt-tests: Fix build with non-gcc compilers
68da390 webkitgtk: Fix build with clang/musl
da81635 console-tools: Include sys/types.h for u_char and u_short defs
205a07a sysklogd: untangle header inclusion maze
9f40dba babeltrace: Add missing header for MAXNAMLEN define
2458850 libunwind: backtrace APIs are glibc specific
abdfacb apt: Add support for building for musl targets
ec187d3 puzzles: Zero'ise structs before use
3cd0a8c dpkg: Add musleabi to known architectures
aaa8516 xinetd: Fix build with musl
93fb408 watchdog: Fix build with musl
7509ffd gzip: Fix build with musl
1d28cbc directfb: Fix build with musl
7b6b312 net-tools: Link with libintl on uclibc
ee1bfdb parted: Fix build with uclibc
ed5da2a mtools: Fix build with uclibc
5384f08 gnutls: Link with libuargp on uclibc
493e557 guile: Fix build with uclibc
1636f6f packagegroup-self-hosted.bb: Move glibc-gconv-ibm850 to glibc only case
3e7d7ab util-linux: Fix ptest builds on musl
77825f8 gnutls: Link with libargp on musl and depend on argp-standalone
1a6fe71 argp-standalone: Add recipe
a7d780c gdk-pixbuf: Fix latent build issue exposed by musl
f2cf5d3 xserver-xorg: Fix build with musl
b8de631 libcgroup: Add dependency on fts when building on musl
87c3e98 connman: include config.h for HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR
cc55fc7 fts: Add recipe
6e3950b tcp-wrappers: Fix build with musl
68f88a5 ppp: Fix build with musl
4972edd blktrace: Include <sys/types.h for dev_t
d629fa1 powertop: Include right headers for timval struct
063dc38 update-alternatives: when warning about alt_link==alt_target, say what PN
6baafa1 python-setuptools: Unify and upgrade python-setuptools and python3-setuptools to 19.4
f0e500e gstreamer1.0-libav: update git recipe to 1.7.1
90cbdfb gstreamer1.0-plugins-ugly: update git recipe to 1.7.1
6752484 gstreamer1.0-plugins-bad: update git recipe to 1.7.1
ad8f201 gstreamer1.0-plugins-good: update git recipe to 1.7.1
2ca9f20 gstreamer1.0-plugins-base: update git recipe to 1.7.1
3c7f2b8 gstreamer1.0: update git recipe to 1.7.1
7c810d0 gstreamer1.0-libav: update 1.6.2 -> 1.6.3
a4b8e9a gstreamer1.0-plugins-ugly: update 1.6.2 -> 1.6.3
8170e06 gstreamer1.0-plugins-bad: update 1.6.2 -> 1.6.3
497ebc9 gstreamer1.0-plugins-good: update 1.6.2 -> 1.6.3
3d87902 gstreamer1.0-plugins-base: update 1.6.2 -> 1.6.3
1e256ee gstreamer1.0: update 1.6.2 -> 1.6.3
dacf2aa gst-plugins-package.inc: drop perl RDEPEND for XXX-apps packages
676275f gstreamer1.0-plugins.inc: don't set base SRC_URI via python
852f098 gstreamer1.0-plugins.inc: drop obsolete lib-link.m4 workaround
a32ac26 gstreamer1.0-plugins-bad.inc: update hls dependency gnutls -> nettle
97e0752 gstreamer1.0-plugins-bad.inc: don't set ${S} or apply version specific patch
78e9361 gstreamer1.0-plugins-good.inc: remove duplicate --disable-examples
0edabfd gstreamer1.0-plugins.inc: convert GSTREAMER_1_0_DEBUG to a PACKAGECONFIG
81cd227 gstreamer1.0-plugins.inc: add missing glib-2.0-native dependency
a0b1e66 gstreamer1.0.inc: add missing glib-2.0-native dependency
e5fb79d gstreamer1.0-rtsp-server.inc: minor formatting improvements
434aa8e gstreamer1.0-omx: minor formatting improvements + update HOMEPAGE
69bcd33 gstreamer1.0-libav: minor formatting improvements + update HOMEPAGE
1d6e61a gstreamer1.0-plugins-ugly: minor formatting improvements
c45ce26 gstreamer1.0-plugins-bad: minor formatting improvements
c1ea981 gstreamer1.0-plugins-good: minor formatting improvements
beb8091 gstreamer1.0-plugins-base: minor formatting improvements
61f30b4 gstreamer1.0-plugins.inc: minor formatting improvements
981145a gstreamer1.0: minor formatting improvements
9f1a943 gst-plugins-package.inc: minor formatting improvements
9e08b69 gst-player: minor formatting improvements
a8ed2c8 valgrind: remove unused valgrind-remove-rpath.patch
e24123d emptytest: exclude from world builds
6808035 build-appliance-image: bump version to 14.0.0
eb418c3 insane.bbclass: fix package_qa_walk()
e185004 insane.bbclass: print all the QA messages
95fa36e weston: upgrade 1.8.0 -> 1.9.0
1bc0c89 wayland: upgrade 1.8.1 -> 1.9.0
03dae8e glib-2.0: fix the ptest
68c5e6d insane.bbclass:buildpaths: ignore ipkg/dpkg's CONTROL dir
258676b sstate: display the sysroot name when cleaning for clarity
f35b2e2 bitbake: set default libexecdir to $prefix/libexec
40f0c2d gawk: fix libexecdir/libdir/BPN confusion
2458f41 mesa: update SRC_URI
fdb12f9 e2fsprogs: set PV to 1.42.99+1.43+git${SRCPV}
9cf1ec0 valgrind: avoid neon for targets which don't support it
b191f58 valgrind: re-enable ARM intdiv and vcvt_fixed_float_VFP tests
b0b3412 valgrind: let valgrind determine its own optimisation flags
92abb5f meta/files/toolchain-shar-relocate.sh: Detect different python binaries and select one that exists.
924e2c3 python-nose: upgrade to 1.3.7
02440b5 python-native: Make python-native also RPROVIDE python-unittest-native
b7ca05d linux-libc-headers: update to 4.4
f73ee59 libpng12: upgrade to 1.2.56
3a59486 libpng: upgrade to 1.6.21
63a49f8 libtirpc: remove redundant va_list patch
55a8df2 perl: Upgrade to 5.22.1
a840588 oeqa/selftest/signing: use temporary rpmdb
65c1de9 kexec-tools: inherit update-rc.d
ba837f1 autotools: don't output the full config.log on configure failure
3e3cb62 bitbake.conf: Remove horrible variable expansion hacks
b963efb mesa: add missing wayland-native build dependency
9dd6c81 maintainers.inc: Correct maintainership for several packages
bd1a534 bitbake: toaster: run bitbake server with --read option
76a281c bitbake: taskdata: add the ability to access world targets list
11a1f49 bitbake: cache.py: check existence before add to cachedata.rproviders
05c1775 bitbake: taskdata.py: add RuntimeProviders to close matches
cf9cb65 bitbake: data_smart: Don't show exceptions for EOL literals
b80219e udev: Add 2 patches to support 4.4 kernel
1013385 gcc-runtime.inc: provide libquadmath
60b237f kexec: update supported architecture list
92a0032 strace: update 4.10 -> 4.11
0aa8169 strace: fix ARCH definition in tests/Makefile
2408149 strace: remove need for git-version-gen script
9ca6a5f strace: fix --disable-aio configure option
dd90f32 strace: drop unnecessary dependency on acl
aadae7b libnewt: Fix linking error due missing symbols
571289d lib/oe/package_manager.py: Remove list() from PkgsList class
6ebda8e lib/oe/rootfs: Use list_pkgs() instead of list()
03075f6 lib/oe/utils: Add function format_pkg_list()
c708411 lib/oe/package_manager: Add list_pkgs() to PkgsList class
113e136 python3: Minor upgrade 3.5.0 -> 3.5.1
918149d python-numpy: upgrade to 1.10.4
eae7584 swig: upgrade to 3.0.8
21f7677 python-scons: upgrade to 2.4.1
7721652 python-pycurl: upgrade to 7.21.5
2ef401f python-mako: upgrade to 1.0.3
2a608cc python-setuptools: Upgrade to 19.2
6395bc8 python3-setuptools: upgrade to 19.2
40738af python: Upgrade 2.7.9 > 2.7.11
35855a0 wic: pylinted ksparser module
e3b3bcf wic: add help for 'include' command
bfaabe5 wic: move parts of canned .wks into common.wks.inc
50a3dc5 wic: implement search of includes
15ea180 wic: refactor get_boot_config
d304162 wic: ksparser: add support for include
3fc6aaa wic: do not remove build dir in source plugins
8d34eea wic: use unique partition number
43b4058 wic: move wks parsing code to KickStart._parse
3860640 nss: update to 3.21
ea39ad0 libjpeg-turbo: fix upstream version check (sort of)
48a8a89 libical: fix upstream version check
c6f71c5 gnutls: update to 3.4.8
7a80f84 sysstat: fix upstream version check
2aabf9a pbzip2: update to 1.1.13
77aee28 ncurses: fix upstream version check
56e4ff6 libsolv: fix upstream version check
d46bc77 e2fsprogs: fix upstream version check
0436e3f build-appliance-image: bump version to 14.0
a206a19 btrfs-tools: update to 4.4
a1790bc bootchart2: update to 0.14.8
68c7113 poky.conf: Delete BB_SIGNATURE_HANDLER settings
0916235 rpm: remove bashisms: [ x == x ] -> [ x = x ]
2dbd61f uclibc: remove a use of immediate expansion and oe_filter_out ()
32eeb00 gcc-runtime: switch to removal override syntax to modify CXXFLAGS
c886a78 bitbake: tests/codeparser.py: Add filename/lineno flags to test variable
f130033 bitbake: toaster: write variables to toaster.conf
1835768 sstate: replace verbose manifest removal with a single count
d4c721a libdrm: Upgrade 2.4.65 -> 2.4.66
b5508a8 slang: Add dependency on ncurses
27b2df2 valgrind: make it explicit that valgrind supports armv7a and above
5dc38a3 sign_rpm.bbclass: fix task dependencies
27c39c4 opkg-utils: store alternatives in nonarch_libdir
77fde15 security_flags.inc: remove obsolete workarounds for curl
31ce027 cups: update systemd support
a4b48c2 coreutils: Add xattr PACKAGECONFIG
7a0b1c1 oeqa/runtime/parselogs: use -F to search fixed strings for grep
b8e11e2 libinput: Upgrade 0.21.0 -> 1.1.4
a9f2e87 postinst-intercepts: always use set -e
de0848f maintainers: mark Khem as nominal owner for uclibc
3235f5e formfactor: remove unused beagleboard configuration
6c64700 alsa-state: remove beagleboard configuration
f0d47a6 bitbake: Revert "runqueue.py: Ensure one setscene function doesn't mask out another which needs to run"
9e867ef sstate: Add packagedata to list of tasks not to recurse
5e881c1 classes/populate_sdk_ext: fix task dependency regression
2e9f092 image: Handle image types containing '-' correctly
0612ca4 oe-selftest: devtool: fix test_devtool_add_library if python was built first
c1492c4 recipetool: create: add a couple more license checksums
2c8c9fe recipetool: create: add basic support for extracting dependencies from cmake
3eb397f recipetool: create: force GL libraries to virtual/*
726dbda recipetool: create: move dependency mapping code to RecipeHandler
788e4bb recipetool: create: fix overzealous mapping of git URLs
ece0a2e recipetool: create: support additional autoconf macros from autoconf-archive
903d471 recipetool: create: detect flex/bison dependency
a66f4ac recipetool: create: pick up boost macros in configure.ac
dbe91a3 recipetool: create: improve extraction of pkg-config / lib deps
e7bedb9 wic: rename kickstarter.py -> ksparser.py
3bb6ea6 wic: override ArgumentParser.error
d652203 wic: removed unused imports
d2090a6 wic: improve processing of parseing errors
1ed97cc wic: catch KickStartError
bda77fd wic: add custom exception KickStartError
ef211a5 bootimg/image-vm/image-live: Improve image dependencies
0910bc6 image: Always run do_rootfs_wicenv
12e37e7 selftest/buildhistory: Improve test to remove sources of error
05716dd bootimg/image: Enhance bootimg to respect RM_OLD_IMAGE
1c869a9 rootfs-postcommands: Ensure license manifests respect RM_OLD_IMAGE
d27491b image: Ensure we don't expand TMPDIR in image commands
ce8a206 image: Fix instability of do_image_* checksums
fb1654f image: Fix wic environment issues
1da8f52 insane: Start to clean up do_configure_qa code
dd28695 insane: Clean up horrible return value processing code
839fb18 e2fsprogs: fix PV
b1236dc e2fsprogs: add PACKAGECONFIG for fuse
f98e11c bitbake: toastergui: make artifact download more robust
68f3e1e bitbake: toasterui: log OSErrorException metadata events
fb94754 bitbake: toasterui: listen for bb.event.MetadataEvent
a2f23fa openssh: CVE-2016-1907
320a319 license.bbclass: fix license manifest
4339a82 wic/help.py: document requirements for valid fstab generation
d688df8 glib-2.0: add dependency glib-2.0-native back
76e35f1 kernel-yocto.bbclass: move do_kernel_link_vmlinux() into kernel.bbclass
d453fa1 kernel-yocto.bbclass: remove do_kernel_link_vmlinux from SRCTREECOVEREDTASKS
2b92f88 libarchive: Add bsdtar and bsdcpio packages
e246905 toaster.bbclass: Separate artifact dump from image file dump
4f481bc pax-utils: 1.0.5 -> 1.1.4
f9974f2 sqlite3: upgrade to version 3.10.0
cd7910d connman: upgrade to 1.31
b9169b7 python3: add missing dependency on PN-misc to PN-modules
4b4dea7 useradd-staticids.bbclass: Remove unnecessary spaces
4f2c352 useradd-staticids.bbclass: Read passwd/group files before parsing
4cbdb15 useradd-staticids.bbclass: Simplify the logic for when to add groups
b18e40c useradd-staticids.bbclass: Simplify some logic
b689aa0 useradd-staticids.bbclass: Make --no-user-group have effect
c03ea8d useradd-staticids.bbclass: Treat mutually exclusive options as such
af8b005 wic: get rid of 2 getters
2573e28 wic: get rid of set_size and set_source_file setters
5cd222b wic: get rid of get_rootfs and set_rootfs
4d5d5dd wic: get rid of get_timeout getter
26fb2a1 wic: adjust code for new data structure
c827238 wic: remove pykickstart code
c15ea82 wic: use new kickstart parser
f572f44 wic: add kickstart parser module
e5e1905 wic: add partition module
180f170 alsa-lib: 1.0.29 -> 1.1.0
a8c25af matchbox-keyboard: export GTK_IM_MODULE_FILE location
d75cb1f xf86-input-evdev: upgrade to 2.10.1
2283732 menu-cache: upgrade to 1.0.1
ec7e406 libxi: upgrade to 1.7.6
86f3f25 librsvg: upgrade to 2.40.13
72dd806 libgpg-error: upgrade to 1.21
3c02fe0 libevdev: upgrade to 1.4.6
33e9930 libcroco: upgrade to 0.6.11
5b63c44 gsettings-desktop-schemas: upgrade to 3.19.3
dfff167 gpgme: upgrade to 1.6.0
5abb691 u-boot: Update to 2016.01 release
e9280d1 linux-yocto: introduce v4.4 standard/preempt-rt/standard kernel
8c3276e e2fsprogs: 1.42.9 -> 1.43 (master)
b248e55 bitbake.conf: rename python-native-runtime
65d0bfc net-tools_1.60-26.bb: Fix do_patch dependency error
99923fc ncurses: 5.9 0 -> 6.0
44d283a autotools.bbclass: use relative path to run configure script
b2f1de3 glibc-initial.inc: use relative path to run configure
0fe6e2d bitbake: toaster: increase timeout
a5f34bc poky.ent: Added "perl-bignum" package for Fedora
afc6cba dev-manual: Updated "Running ptset" section
ec047ad yocto-project-qs: Updated the "Next Steps" section
57ddbe8 ref-manual: Removed all variables related to "QMAKE"
7814b33 ref-manual: Updates to cull out qt4 stuff.
bf81969 toaster-manual: Updates on how to start Toaster.
798e8b8 bitbake: toastergui: code formatting and clean-up
c4b5011 bitbake: toaster tests: fix Django tests for new ToasterTable pages
88a262c bitbake: toastergui: remove unused views and template code
059a274 bitbake: toastergui: fix error and warning counts for builds
4103e0c bitbake: toastergui: make "Apply" button state depend on filter range
6c2d88f bitbake: toastergui: mute label for filter actions with no records
f08730a bitbake: toastergui: set default visible and hideable columns
112f374 bitbake: toastergui: serialise decimals correctly
e024aab bitbake: toastergui: streamline construction of filter objects
fcb20f9 bitbake: toastergui: ensure filter_value updates
f9c46f5 bitbake: toastergui: don't hide all elements with .col class
eaae82a bitbake: toastergui: convert project builds page to ToasterTable
33b011c bitbake: toastergui: implement "today" and "yesterday" filters
f8d383d bitbake: toastergui: implement date range filters for builds
b929889 bitbake: toastergui: show recent builds on all builds page
1a4b203 bitbake: toastergui: switch off filter highlights when inactive
809046c bitbake: toastergui: refactor ToasterTable filtering
294579b bitbake: toastergui: convert all builds page to ToasterTable
6c12ca7 bitbake: toastergui: use event delegates for hover help elements
ef93dce bitbake: toastergui: switch projects/ view to ToasterTable
417f1d3 bitbake: toaster: check inferred file suffixes against list of known types
c02ee05 bitbake: toaster: move image file suffix list to model
d29e4cd bitbake: toastergui: use ToasterTable for projects page
b1256db openssh: update to 7.1p2
c0e9f2d kernel/kernel-arch: Explicitly mapping between i386/x86_64 and x86 for kernel ARCH
f8508de bitbake: Revert "fetch/git: Change to use clearer ssh url syntax for broken servers"
b567235 image/image-live: Add back IMAGE_TYPES_MASKED support
e914e2a image.bbclass: Handle image base type dependency properly
ad32f65 autoconf: add missing perl-module-file-find to RDEPENDS
d83dfe6 ca-certificates: update to 20160104
4440560 epiphany: upgrade to 3.18.3
dcf54b4 iso-codes: upgrade to 3.64
d7bee35 lighttpd: upgrade to 1.4.39
08c8923 libwebp: upgrade to 0.5.0
cf0aea7 classes/populate_sdk_ext: avoid unnecessary sstate being brought in
ea29bec insane/package: Fix cases where QA errors aren't fatal
2e620a4 classes/populate_sdk_ext: check that extensible SDK prepared correctly
4685c33 classes/buildhistory: save auto.conf and bblayers.conf for extensible SDK
39f6472 classes/populate_sdk_ext: support auto.conf
91877aa classes/populate_sdk_ext.bbclass: handle if local.conf doesn't end with a newline
764c927 util-linux: create util-linux-runuser iff pam in DISTRO_FEATURES
95dce70 rsync: 3.1.1 -> 3.1.2
38aa0fc less: 479 -> 481
4cb2269 iputils: s20121221 -> s20151218
fe47dd7 wget: 1.17 -> 1.17.1
79886e9 git: 2.5.0 -> 2.7.0
d3e16b8 file: 5.24 -> 5.25
3549abc autogen-native: 5.18.5 -> 5.18.6
fb14627 curl: upgrade to 7.46
eaf88d7 xz: upgrade to 5.2.2
8516ff7 sysstat: upgrade to 11.2.0
ae73be1 at: upgrade to 3.18
21efab7 kmod: upgrade to 22
c88efae resolvconf: upgrade to 1.78
6729889 pciutils: upgrade to 3.4.1
edd319c gnupg: 2.1.7 -> 2.1.10
78b58b8 help2man-native: 1.47.1 -> 1.47.3
ac0e0d5 man-pages: 4.02 -> 4.04
1e0cbb9 libgcrypt: 1.6.3 -> 1.6.4
372c23d xmlto: 0.0.26 -> 0.0.28
aaafe33 elfutils: 0.163 -> 0.164
38901a7 dhcp: 4.3.2 -> 4.3.3
ea05e05 image.bbclass: Unconditional includes of populate_sdk_ext fails
c08f272 tcmode-default.inc: Fix preferred provider nativesdk-sdk_prefix-libc-initial
5d2f783 dhcp: search libxml2 for bind
b69652d tzdata: remove bashism
7c7c249 harfbuzz: update 1.1.2 -> 1.1.3
84623dc libpostproc: duplicate armv7a over-rides for armv7ve
1744198 libav.inc: duplicate armv7a over-rides for armv7ve
102dfa1 gcc-configure-common.inc: duplicate armv7a over-ride for armv7ve
b08dfb5 subversion: Upgrade 1.9.2 -> 1.9.3
d6fae0c lttng-ust: Upgrade to 2.7.1
a9cc9b5 lttng-tools: Upgrade to 2.7.1
6b02575 lttng-modules: Upgrade to 2.7.1
a378430 gdb: upgrade to 7.10.1
92cc02f linux-yocto: Update Genericx86* BSPs to 4.1.15
da43a56 bitbake: Revert "fetch2/local.py: avoid using PREMIRROR"
96a34e7 conf/distro/poky-tiny: correctly disable python in opkg-utils
1724ffd bitbake: fetch2/git.py: Add missing "errno" module import.
74fa824 bitbake: bitbake: clean up stamp-base related codes
f3f769a local.conf.sample: add qemumips64
43328fe bitbake: runqueue: Fix setscene task dependencies
7b905ca bitbake: toaster: settings Add uid to the toaster cache dir
dff7a27 bitbake: toaster: show 'satisfied via' text for reverse deps
89f4932 bitbake: toaster: show 'satisfied via' text for build deps
febb898 bitbake: toaster: show list of provides for the recipe
2ff4ccb bitbake: buildinfohelper: add provides info to the db
16a81fb bitbake: toaster: add Provider model
6a28ed3 bitbake: buildinfohelper: use providermap
f2b7252 bitbake: cooker: add providermap to dep_tree
7e380d4 bitbake: taskdata: refactor get_providermap
46731da bitbake: main/runqueue: Add --setscene-only option to bitbake
34f8db9 update_font_cache: only scan system font directories
e5c011b Add "CVE:" tag to current patches in OE-core
f04fb88 scripts/create-pull-request: fix git request-pull syntax
928ceb6 qt4: fix-for-mips-n32.patch: remove it
c4a3258 util-linux: create util-linux-runuser package
554ca68 valgrind: include aarch64 in COMPATIBLE_HOST
0ce775a valgrind: update to 3.11.0
21a94f6 valgrind: don't restrict to armv7a
b8ebac9 DpkgRootfs: Fix logcheck_error false-positive when use multilib
e265fbb package_deb.bbclass: add 'Multi-Arch: foreign' tag to allarch packages
4aeb69d package_manager.py: fixes for multilib deb packaging builds
9ea7428 package_deb.bbclass, cross-canadian.bbclass: DPKG_ARCH mapping function
72e6932 connman.inc: add missing RDEPENDS
675ff42 meta: rename perl-native-runtime
3f4fb39 dbus: support large-file for stat64
0d5e41f freetype: enable out-of-tree builds, and use host zlib
8f2ab19 bluez5: upgrade to 5.37
11f5a42 cogl-1.0: fix may be used uninitialized error
235606f oeqa/runtime/logrotate: fix hardcoded root directory
cce6c3e oeqa/runtime/smart: fix hardcoded root directory
cd2cf1f boost: update to 1.60.0
afc0255 bitbake.conf: remove 'stamp-base'
c8fef7f gcc5: Fix build on NIOS2
eda3947 rpmresolve.c: Fix unfreed pointers that keep DB opened
3c8a451 tzdata: Make /etc/timezone optional
b80da02 systemd: arrange for volatile /etc/resolv.conf
5548a76 systemd: add myhostname to nsswitch.conf
d6bc841 opkg-utils: add update-alternatives PACKAGECONFIG
c3b96ff linux-dtb.inc: use absolute upd-alt paths
3ad08c0 uclibc: Upgrade to 1.0.10
74c3667 populate_sdk_ext: Pass excluded_targets as a list to prune_lockedsigs
e306d54 populate_sdk_ext: Change to include siginfo and non sstate task sigs
e1a558a populate_sdk: Switch from bzip2 to xz
3341f3f classes: Fix do_rootfs references
0a4e1f9 image: Create separate tasks for rootfs construction
fdced52 image: Move pre/post process commands to bbclass
cdc0aee image.bbclass: Separate out image generation into a new task, do_image
0269219 populate_sdk_ext: Use new --setscene-only option to bitbake instead of workarounds
1ee0842 sstatesig: Handle special case of gcc-source shared-workdir for printdiff
d93c212 bitbake.conf: add virtual/libiconv-native to ASSUME_PROVIDED
b2fe2a8 devtool: build: support using BBCLASSEXTENDed names
38ed039 devtool: reset: support recipes with BBCLASSEXTEND
532f429 devtool: refactor code for getting local recipe file
ec90168 devtool: add: support adding a native variant
99e3872 devtool: reset: do clean for multiple recipes at once with -a
5ef716c recipetool: create: support creating standalone native/nativesdk recipes
1e503c0 recipetool: create: lower case name when determining from filename
4deed25 devtool: sdk-update: add option to skip preparation step
d586a11 devtool: sdk-update: fix error checking
c1b7d83 devtool: sdk-update: fix metadata update step
efead10 devtool: sdk-update: fix not using updateserver config file option
9348c91 classes/populate_sdk_ext: disable signature warnings
d44dcd7 classes/populate_sdk_ext: fix cascading from preparation failure
d11051c scripts/oe-publish-sdk: add missing call to git update-server-info
fbc2147 libbsd: upgrade to 0.8.1
221d864 bitbake: fetch/git: Change to use clearer ssh url syntax for broken servers
46d62d0 bitbake: knotty: Use non-interactive mode as fallback for dumb terminals
bfa7859 bitbake: cooker: fix findFilesMatchingInDir documentation
3d42737 bitbake: cooker: use in instead of count
0e83229 maintainers.inc: remove x11vnc
d914c7f meta-yocto: drop qt4 references
0f3ad7c scripts/yocto-layer: Avoids duplication of "meta-" prefix
220ef32 poky-lsb/poky-tiny: update preferred kernel to 4.1
b82e228 yocto-bsp: remove 3.14 and 3.19 bbappends
685daeb conf/local.conf.sample: comment out ASSUME_PROVIDED=libsdl-native
2c5e7e0 image: Really remove lockfiles flag
a500e3a boost: ensure boost to remain an empty metapackage
b151506 image_types.bbclass: Rebuild when WICVARS change
eb4159c gccmakedep: fix buildpaths qa check
f54e53c bash: fix buildpaths qa check error
6d111c8 testimage: remove VNC test, x11vnc isn't in oe-core anymore
8bec5c5 x11vnc: remove all references to moved package
8f865e2 x11vnc: move recipe to meta-oe
ae1fc96 classes/buildhistory: actually use KiB in extensible SDK sizes files
84f66b5 x11vnc: move recipe to meta-oe
c44599d readline: move inputrc into readline
f29d642 tune-*: use mcpu instead of mtune for ARM tunes
c6a1991 arch-armv7ve: add tune include for armv7ve and use it from cortexa7 and cortexa15
21d61fa cortexa{7,15,17}: add VFPv4 tunes
7f2cb68 feature-arm-vfp.inc: Further simplify with TUNE_CCARGS_MFLOAT
e9b2ffc feature-arm-{neon,vfp}.inc: refactor and fix issues
45f726c arch-armv7a.inc: add vfpv4 support also to softfp and big endiand tunes
ebe8358 arch-armv7a.inc: Fix PACKAGE_EXTRA_ARCHS for tune-armv7atb-vfpv3, tune-armv7atb-vfpv3d16, cortexa7thf-neon-vfpv4
9280a8e arch-armv5.inc: drop duplicate ARMPKGSFX_DSP and PACKAGE_EXTRA_ARCHS_tune-armv5tehf-vfp
46d6b0e arch-armv[456]*.inc: improve indentation like armv7a
860663a arm/arch-arm*, tune-cortexa*, tune-thunderx.inc, powerpac/arch-powerpc64.inc: Use normal assignment
8c483a1 arch-armv7a, tune-cortexa*: improve indentation
7498b91 arch-armv7a, tune-cortexa*: improve comment VFP -> HF
bb9b581 arch-armv7a: add missing space before ?=
15f8344 tune-cortexr4.inc: fix PACKAGE_EXTRA_ARCHS
e2736f7 sanity.bbclass: add more information to error message about TUNE_PKGARCH missing in PACKAGE_ARCHS
b68d947 mkefidisk.sh: add boot log on console
62d7c97 mkefidisk.sh: add startup script for automated boot
5aa3b93 oeqa/selftest/recipetool: update for libjpeg-turbo migration
ffa7469 libjpeg: Replace libjpeg with libjpeg-turbo
29d273f python3: fix installed-vs-shipped when 64bit + multilib
db7cee6 pulseaudio: add PACKAGECONFIG for lirc
b900ec8 sstate-sysroot-cruft.sh: Extend the whitelist
20843fa iptables: upgrade to 1.6.0
c2bda6c scripts/oe-selftest: Allow to run tests on random/all MACHINEs
8e1435e selftest: Added testcase decorators for 2 tests
32f332c oe-selftest: New option --list-tests
17d886b oe-selftest: Improved --list-classes when determining test names
4ec2da7 selftest: moved tc test_buildhistory_does_not_change_signatures
02d259c scripts/oe-selftest: Remove extra coverage data added to unittests
30c06a4 expat: CVE-2015-1283
315bdc8 packagegroup-core-x11-sato: enable pcmanfm on mips
a3e26f9 wic: rawcopy: Copy source file to build folder
d6e0da4 grub2: Fix CVE-2015-8370
bb663b0 systemd: enable compatibility libraries by default
3fea163 systemd: add more compression and importd PACKAGECONFIGs
d462b70 gcc-sanitizers: link directly against sysroot libstc++
3eb6135 openjade: Fix build if not installing libtool .la files
6308c47 valgrind: Define __UCLIBC__ for uclibc based systems
3d19a1e security_flags.inc: disable -fstack-protector-XXX for valgrind
807ed8a meta/conf/layer.conf: bump layer version due to Qt4 removal
4fb3e05 packagegroup-core-lsb: treat qt4 packages same as qt3 packages
8b11ed8 qt4: remove recipes and classes
0baadc8 toaster-manual: Updates to toaster use chapter.
908bbff ref-manual: Updated the list of supported image types.
5d27451 dev-manual: Added the --configfile bootloader option.
7b3b1f9 dev-manual: Added three new wic option descriptions.
eeffa64 dev-manual: Added the --overhead-factor wic option description.
2beb19b dev-manual: Added the --extra-space wic option description.
95851df dev-manual: Added wic --notable option description.
88a2794 dev-manual:
8bdc707 sdk-manual: Initial Manual framework
f1f7625 bsp-guide: Updated the license statement.
6686a31 dev-manual: Correction to the KVM stuff in the runqemu commands.
ccc830d documentation: Prepare for 2.1 builds
7af9314 mega-manual: Added four new figures for GUI example.
f8185ff bitbake: ast: Add filename/lineno to mapped functions
a178c5a bitbake: main: kill server without queue setup
773700d bitbake: xmplrpc: split connect method
05b4fbc bitbake: uievent: refactor retry loop
ebc169c bitbake: uievent: get rid of EventHandler attribute
4e0de6e bitbake: uievent: add error to registerEventHandler return
01419d5 bitbake: cooker: add state.get_name method
763506d bitbake: fetch2/__init__.py: Add support for 7-Zip
f5bfc1c bitbake: utils: Remove double compile from better_compile
b4141f6 bitbake: fetch2/local.py: avoid using PREMIRROR
1ad3595 bitbake: siggen: Change exception note into a warning
4ba49ac bitbake: data: Drop misleading ExpansionError exception
2c94311 bitbake: cooker: Drop useless parsing exception
a16b543 bitbake: data: Pass lineno/filename data from build_dependencies
958f0ff bitbake: codeparser: Add support for correct linenumbers
db4376e udev-extraconf: introduce multiple blacklist files for more complex setups
a8fb429 uclibc: disable parallel builds
401c632 image: Condense do_rootfs function/flags
0051510 image/rootfs-postcommands: Separate out post rootfs commands to separate class
3428edd image: Remove pointless rootfs lock
eb5bb0e packagegroup-core-boot:replace busybox to variable
cc7bb6c initramfs-framework_1.0:replace busybox for variable.
d9ffa59 core-image-minimal-initramfs: replace base-utils
9349f42 base-utils:flexible dependency for command utilities
c44b76a orc: Add missing PACKAGES_DYNAMIC
2cd061a bluez5: include the patch only for 5.36
4c35473 meta-yocto-bsp: remove 3.14 and 3.19 bbappends
6af8981 meta-yocto-bsp: Remove uvesafb (v86d) from generic x86 features
614e9ec qemu: add PACKAGECONFIG for Nettle crypto support
09705a4 oeqa/selftest: support sets in devtool comparisons
4b543f7 packagegroup-core-x11-sato: include pulseaudio-misc
23302ee devtool: use cp instead of shutil.copytree
d6e7b5b xorg-lib: allow native building without x11 DISTRO_FEATURES
4cba706 busybox: generalize recipe to work with arbitrary install directories
9d001ae cairo: update 1.14.4 -> 1.14.6
6d561fb libdrm: Upgrade to 2.4.65
0f516f0 image-vm.bbclass: uses IMAGE_LINK_NAME
c851096 image-live.bbclass: uses IMAGE_LINK_NAME
907b87d rpm: Generate per distribution and multilib macro files
c910789 package_manager.py: add debugging support for rpm scriptlet execution
8dd27ef xinput-calibrator: get screen geometry when calibrating
e8d36f4 scripts: hand the TEMPLATECONF local over to setup-builddir
0f4fb26 util-linux: Fix floating dependency upon 'readline'
2cb434a linux-firmware: package Broadcom BCM43340 firmware
f70d46f rpcbind: Fix build with libtirpc 1.0.1
866c693 libtirpc: upgrade to 1.0.1
5754b83 gstreamer1.0-libav: upgrade to version 1.6.2
6ac601f gstreamer1.0-rtsp-server: upgrade to version 1.6.2
3ac3d33 gstreamer1.0-plugins-ugly: upgrade to version 1.6.2
823b623 gstreamer1.0-plugins-bad: upgrade to version 1.6.2
6d13f30 gstreamer1.0-plugins-good: upgrade to version 1.6.2
05896a5 gstreamer1.0-plugins-base: upgrade to version 1.6.2
a8eb77b gstreamer1.0: upgrade to version 1.6.2
dd5756b mirrors: add archive.apache.org to Apache mirrors
cfbd804 guile: remove redundant replacement of .pc file
c2e8079 bind: 9.10.2-P4 -> 9.10.3-P2
7204a0f libsndfile1: enable FLAC/Ogg/Vorbis support
35bd254 buildhistory: improve support for extensible SDK
ea0abcd buildhistory: fix not recording SDK information
b6d191d scripts/oe-selftest: Add support for selftest log with timestamp
ab79287 selftest: Added MACHINE = "qemux86" to tests that use runqemu
b09080d ncurses: fixes wrong paths in BINCONFIG
8df88fb xcb: don't build-depend on python-native
d7759a5 tcmode-default: Use glibc for nativesdk version even on uclibc and musl
a7eadc3 qemu: upgrade to 2.5.0
9988ab3 webkitgtk: update to 2.10.4
cedb027 epiphany: update to 3.18.2
6e27dd8 libwebp: update to 0.4.4
efcf4b4 libsecret: update to 0.18.3
0112274 gnome-desktop3: update to 3.18.2
88a656e gcr: update to 3.18.0
883193a linux-yocto: remove 3.14 and 3.19 recipes
4487e3a kernel-yocto: fix checkout bare-cloned kernel repositories
5161944 linux-yocto/4.1: update to v4.1.15
a462d16 linux-yocto-dev: bump to 4.4-rcX
862b3b3 lttng-modules: fix build issue against kernel 4.4
9563aa8 yaffs2: fix checkpoint functionality
cefc24d mobile-broadband-provider-info: update to tagged release 20151214
04aa27c icu: fix upstream version check
2865e5f btrfs-tools: update to 4.3.1
5beb3bc iso-codes: update to 3.63
503c08d kexec-tools: update to 2.0.11
4fa2e4b lighttpd: update to 1.4.38
f7a7796 tiff: update to 4.0.6
2498065 libassuan: update to 2.4.2
f2192fa msmtp: update to 1.6.3
7fc3066 liburcu: update to 0.9.1
10d14bc trace-cmd: update to 2.6
fc774e9 python3-pip: update to 7.1.2
c3330aa pytnon-pexpect: update to 4.0.1
aa90b5d ifupdown: update to 0.8.2
4c98105 gptfdisk: update to 1.0.1
edde9af cryptodev: update to 1.8
9da9308 oe-selftest: devtool: add more explicit check for ls output
c2435b1 oe-selftest: add tests for simple devtool add / recipetool create URL case
8916731 recipetool: create: fix error when extracting source to a specified directory
fe28c25 recipetool: create: improve autotools support
498e483 devtool: sync: tweak help / messages
b272c51 devtool: reset: print message about leaving source tree behind
95a234e devtool: status: list recipe file within workspace if one exists
e116739 devtool: modify: default source tree path
110f433 devtool: add: allow specifying URL as positional argument
ceaa4bf devtool: add: figure out recipe name from recipetool
ee0d5a1 devtool: add: allow source tree to be omitted
0d8751f scripts/lib/argparse_oe: handle intermixing of optional positional arguments
1bd7793 devtool: update-recipe: use correct method to get bbappend filename
2074654 devtool: split out function for naming bbappend
6acbdc9 devtool: add: tweak help text
316b57b devtool: edit-recipe: add new subcommand
ebe5f0b recipetool: create: basic extraction of name/version from filename
db5f964 recipetool: create: support extracting name and version from build scripts
6a7661b recipetool: create: set up priority system for recipe handlers
38803e3 recipetool: create: detect when specified URL returns a web page
e78a039 recipetool: create: prevent attempting to unpack entire DL_DIR
e61645b recipetool: create: minor fix for potential issue in python handling
ae2141b recipetool: create: fix do_install handling for makefile-only software
c2f1742 recipetool: create: avoid traceback on fetch error
470f20b recipetool: create: handle https://....git URLs
8e0a84c scripts: print usage in argparse-using scripts when a command-line error occurs
548d433 directfb.inc: enable bfd linker workaround for all arm targets
2381f4a devtool: sdk-update: fix traceback without update server set
7540550 classes/populate_sdk_ext: error out of install if buildtools install fails
ecce3d3 classes/populate_sdk_ext: hide build configuration in devtool build* output
fd84d0f classes/base: don't print header if BUILDCFG_HEADER not set
a4f496a classes/populate_sdk_ext: use uninative to set NATIVELSBSTRING
a6f8a3f toaster.bbclass: fix TypeError when parsing build stats
937b7fd libxcb: Add a workaround for gcc5 bug on mips
86c8b8b flex: update to 2.6.0
dad130b opkg: upgrade to v0.3.1
d2b770c systemd: remove merge conflicts accidently left in
ca69643 wic/help.py: document that mountpoint is optional for part command
5628dde pixman: check neon support via TUNE_FEATURES, not the _armv7a over-ride
9a74388 xdg-utils: Do not build the in-script documentation
520b37d gettext: Upgrade 0.19.4 -> 0.19.6
cae0e0f gcc-configure-common.inc: add gcc-runtime ABI fixes for armv7m and armv7r
cba8fb3 tune-cortexr4.inc: provide an _armv7r over-ride via MACHINEOVERRIDES
fd10723 tune-cortexm3.inc: provide an _armv7m over-ride via MACHINEOVERRIDES
b6fe440 feature-arm-thumb.inc: drop 'no-thumb-interwork' tuning feature
1d5a4cf feature-arm-thumb.inc: drop legacy _thumb and _thumb-interwork over-rides
ca64c16 feature-arm-thumb.inc: drop ARM -vs- thumb comments
95a79a5 rpm: Fix support for db5 and db6
75cec07 oe-buildenv-internal: fix return code
606c9e7 staging.bbclass: make already-stripped can be skipped
647e0e4 buildhistory-collect-srcrevs: hide empty sections
d4b5a1f selftest/buildhistory.py: Test buildhistory does not change sigs
4b83f1f gcc5: Upgrade gcc-5.2 -> gcc-5.3
0381b78 bitbake: event/utils/methodpool: Add a cache of compiled code objects
c61c1eb bitbake: BBHandler: Improve IN_PYTHON_EOF handling
2a94194 bitbake.conf: Add filename and lineno to BB_SIGNATURE_EXCLUDE_FLAGS
5f40691 bitbake: toaster: remove 2 confusing parameters
3960b6e bitbake: toaster: move setting of default values
b194c0c bitbake: toaster: move startup checks to a better place
064d2c7 bitbake: toaster: remove 2 unused functions
c505f24 bitbake: toaster: remove addtoConfiguration function
c7e4404 bitbake: toaster: updated header of the toaster script
af34920 bitbake: toaster: add MANAGE variable
563b786 bitbake: toaster: remove unused variable
aa3cc12 bitbake: toaster: split long lines, add/remove whitespace
8e4acac bitbake: toaster: check if address:port is in use
847b935 bitbake: toaster: implement checksocket command
9f3681d buildstats-summary/toaster: Cope with removal of get_bn()
522dcaa bitbake: knotty: Improve exception error message
01d67bf bitbake: knotty: Fix row/column function return value issue
6c12efa bitbake: buildinfohelper: Update for buildstats layout change
28ea1a1 bitbake: fetch: use orig localpath when calling orig method
5cb6d83 bitbake: utils: Improve traceback from better_exec internal errors
0019edc bitbake: ast/event/utils: Improve tracebacks to include file and line numbers more correctly
b14ccb2 bitbake: runqueue: Add support for <task>- syntax
5069ab6 m4: Drop unused/unreferenced patch
d7e766b toaster: Update for buildstats changes
adfdca4 buildstats: Improve to add getrusage data and corrected IO stats
3187647 buildstats: Separate out the build and task data to allow improvements
38a2553 buildstats: Clean up e.data and bb.data references
7b1e48f buildstats: Drop get_bn/set_pn and just use BUILDNAME
7837162 buildstats: Drop disk data from buildstats
030c033 nativesdk-buildtools-perl-dummy: Bump PR
e6f2761 combo-layer: Stop using filterdiff
f1f3716 meta: more removals of redunant FILES_${PN}-dbg
5fb8fea clutter-gst-3.0: add dependency on libgudev
54f01ca systemd: Upgrade to 228
63bdadc uclibc: Switch to using uclibc-ng
0b5cddd cdrtools-native: update to 3.01 final
c4dfb92 grep: update to 2.22
d8608bc procps: update to 3.3.11
52f6a01 babeltrace: update to 1.3.1
0c705d6 powertop: update to 2.8
516d8c9 nfs-utils: update to 1.3.3
9c39a4f systemtap: update to 2.9
fef0ec6 kbd: update to 2.0.3
8668e17 gmp: update to 6.1.0
86e02d0 docbook-xsl-stylesheets: fix UPSTREAM_CHECK_REGEX
f065766 mtd-utils: update to 1.5.2
5d32aeb unfs3: update to r497
4e653b5 python-numpy: update to 1.10.1
90b7212 libxml-simple-perl: update to 2.22
689db13 dmidecode: update to 3.0
d301451 cpio: update to 2.12
2bea006 puzzles: update to current commit
2d04c83 gnutls: update to 3.4.7
cf1eb2b libidn: add native and nativesdk support
dd58b3b libpng: Update SRC_URI to use GENTOO_MIRROR
b763668 libpng12: Upgrade 1.2.54 -> 1.2.55
91c92fc libical: Upgrade 1.0.0 -> 1.0.1
5c6ff26 libxslt: use proper SRC_URI
a444eb5 kexec-tools: added the script kdump
be9f7f9 ltp: Upgrade 20150420 -> 20150903
81f1e41 musl: Update to latest 1.1.12 release
c529e66 util-linux: Upgrade to 2.27.1
bdbc5ee packagegroup-core-sdk: Disable sanitizers for uclibc
692853d libsolv: add new recipe
8bba7de curl: upgrade to 7.45
2e3a172 libsndfile1: 1.0.25 -> 1.0.26
df18352 wget: Upgrade 1.16.3 -> 1.17
81eb101 unifdef: upgrade to 2.11
19c76ad sstate-sysroot-cruft: Add php, python, lua, fontcache generated files to whitelist
f80f8ba oeqa/selftest: Added testcase decorators for 2 testcases
a5dd1dd uninative.bbclass: Choose the correct loader based on BUILD_ARCH
388e580 license: Fix BB_TASKDEPDATA references
f19e8de coreutils/procps: Revert priority change since coreutils > busybox
455ff32 meta: more removals of redunant FILES_${PN}-dbg
e0890b6 meta: Drop now pointless manual -dbg packaging
b7766e4 package: Add auto package splitting of .debug files
89f13c7 meta/conf/toasterconf.json: remove SDKMACHINE variable as it no longer used
03d715e bitbake: toaster: tables Set a default order for the software recipes table
4ff0d60 bitbake: toaster: rework checking of Django version
4a78416 bitbake: toaster: monkey patch Queryset
c1c8eff bitbake: toaster: removed extra calls of migrate
507aafb bitbake: toaster: work around 'database is locked' error
322b470 bitbake: toaster: fixed format strings
84daa40 bitbake: toaster: use OneToOneField instead of ForeignKey
c464f34 bitbake: toaster: Amend regex for MySQL database URLs
f001a4a bitbake: toaster: Remove compatible_layerversions() method
0adffdf bitbake: toaster: Check Django version against toaster-requirements.txt
8d058cf bitbake: toaster: Update deprecated manage.py command
717c636 bitbake: toaster: Prevent deprecation warnings for RedirectView
0f602c1 bitbake: toaster: Update API used to make runbuilds methods run in transactions
93f5738 bitbake: toaster: rename get_query_set -> get_queryset
23c4806 bitbake: toaster: Start Django machinery for database access
7a0c45e bitbake: toaster: Create default project with get_or_create* method
9de8dfa bitbake: toaster: Fix references to app paths
535fc9b bitbake: toaster: Remove South migrations
8ca4664 bitbake: toaster: Upgrade to Django 1.8.6 and remove South
b322dec bitbake: toasterui: process SetBRBE event
0274b68 bitbake: toaster: trigger SetBRBE event
fdb8e74 bitbake: toaster: implement BitbakeController.triggerEvent
5de3800 bitbake: event: Fix subprocess event error traceback failures
0da1d71 nopackages: Add class for recipes which don't generate packages
5003d14 sstate: Ensure populate_lic dependencies are not followed
48aad51 populate_sdk_ext/sign_rpm/sign_package_feed: Add missing getVar parameter
98dcdcb autoconf: Disable macro which causes excessive delays when using dash as sh
28fa304 automake: Remove delays in configure scripts using automake
f5e681d site/common-linux: Add some macros to avoid sleeps during configure
93adf46 meta-yocto/conf/toasterconf.json: remove SDKMACHINE variable as it no longer used
b3d6872 lttng-tools: Revert wrong enforcement of Python 3.0 use
2c11bdd attr: Add patch to account for use of internal glibc header
f1c034b libpam: Fix build with musl
33bab59 openssl: Add musl configuration support
c4207ee busybox: Add config for musl
083d9d1 gettext: Delete libintl.h and charset.alias
3a0797f sysvinit: Fix build with musl
fd21402 musl: Add recipe
781d34f mtools: Use proper glibc override to add glibc packages to recommendations
1b90d67 squashfs-tools: Define FNM_EXTMATCH if not defined
36a709a mtd-utils: Backport and create patches to support musl
41fd73f gdb: Fix build with musl
1ee97d8 autoconf: Add musl support
a2ea58b gcc: Add support for building musl configuration
37c74e2 gstreamer1.0: Split bash completion information into separate package
fc32a3b attr: add attr dependency to attr-ptest
9205f0a valgrind: import Debian link_tool patch for MIPS
c27bbb4 slang: update upstream URI to (official) jedsoft.org
21e35df subversion: update to 1.9.2
39260c3 json-c: add manual upstream version check
4ff0017 mirrors: replace references to archive.apache.org
1672a18 mobile-broadband-provider-info: update to current commit
b699b15 nspr: update to 4.11
dec8d20 python-setuptools: update to 18.7.1
b3535e2 openssl: update to 1.0.2e
fce2ee7 dropbear.inc: drop legacy CFLAGS and LD tweaks
f87063b dropbear: update 2015.70 -> 2015.71
a520495 texinfo: don't create dependency on INHERIT variable
2b2774b sudo: upgrade to 1.8.15
5eb0e90 linux-firmware: update to latest revision bbe4917
c147782 bluez5: upgrade to 5.36
64c3a09 sudo: remove libdir INSANE_SKIP
b407a80 libsdl: expand PACKAGECONFIG and enable native builds
39facf9 buildtools-tarball.bb: 32bit tools need pseudo 32bit library
bc26a7d rpm: fix file conflicts for MIPS64 N32
01c0285 rpm: Enable MIPS64 N32 transactions
a742586 bash: fix testcase run-coproc/run-execscript/run-test/run-heredoc failed
a6bb872 cpio: fix test case of symlink-bad-length
787d82b linux-libc-headers: update default KORG_ARCHIVE_COMPRESSION bz2 -> xz
94c0332 linux-libc-headers.inc: remove '-e MAKEFLAGS=' from EXTRA_OEMAKE
c7ad779 gcc-4.9: import patch fixing compilation in thumb mode
1260ded gcc-5.2: import patch fixing compilation in thumb mode
b4db53a dropbear: Upgrade 2015.68 -> 2015.70
e0162c1 gcc-cross-initial: make dependency on gnu-config-native and autoconf-native explicit
fccb128 weston-init: add a native systemd unit file
a1fa8d9 python: Fix cross compiling issue
c9fdc1b icu: Upgrade 55.1 -> 56.1
95909bc kernel.bbclass: drop unnecessary 'eval' from kernel_do_configure()
ec79a19 insane: in libdir test allow libraries in libexecdir
9c0186f rootfs.py: Change logic to unistall packages
23083e7 oeqa/systemd: get runtest target boot time and log
c6330a2 oeqa/systemd: journalctl helper function
220a78b scripts: oe-selftest Added new features.
98d2485 oe-buildenv-internal: preserve existing BB_ENV_EXTRAWHITE
9cab798 toolchain-shar-extract.sh: fix ~ not working in path
f27401d nativesdk-buildtools-perl-dummy: properly set PACKAGE_ARCH
5e3e2e0 poky.conf: Bump for 2.1 development
7e8ff7b bitbake: toaster: toasterui Add ParseStarted/ParseProgress events to mask
f823601 build-appliance-image: Update to master head revision
992e577 linux-yocto: Update genericx86* BSPs to v4.1.13
b4f6950 cmake: Add nios2 support
27b9f04 boost: adjust hard-coded path after python3 upgrade
639cadd sdk.py / OpkgSdk: remove_packaging_data() after install
fd4894f devtool: extract: update SRCTREECOVEREDTASKS for kernel
34f1d81 devtool: extract: copy kernel config to srctree
6650357 lib/oe/package_manager: Introducing PACKAGE_FEED_BASE_PATHS/PACKAGE_FEED_ARCHS
d7baeb5 selftest/wic.py: Add test for custom bootloader config
8612f26 directdisk-bootloader-config.wks: Add example for custom bootloader config
c59dc3b wic/help.py: Document the new option "configfile"
7033873 wic: Allow to use a custom config for bootloaders
f95f729 wic/utils/misc.py: Added function to search for files in canned-wks
9773faa wic: Prepare wicboot to allow custom bootloader config
4515186 package_ipk: allow to specify OPKG_ARGS in local.conf
7cf7156 systemd.bbclass: Allow enabling of parameterised services
551cda0 base: check for existing prefix when expanding names in PACKAGECONFIG
c093fd8 linux-yocto/4.1: Fix kernel oops on qemuarm boot
cda3905 toolchain-shar-extract.sh: ensure cleaned environment will work for ext SDK
f9384b0 bitbake: knotty: Enforce terminal line limit to stop crazy scrolling
7a775a1 initramfs-framework: create directory /var/run
2861399 libpcre: drop UPSTREAM_CHECK_ variables
35c28e3 libpcre: upgrade to 8.38
d50ef65 libpng: update 1.6.19 -> 1.6.20 (CVE-2015-8126)
2b736f2 ghostscript: add dependency for pnglibconf.h
976f0e3 package_regex.inc: split the rest of the entries to their recipes
74bfa62 package_regex.inc: split entries which blacklist specific versions to their recipes
75c6929 package_regex.inc: split sourceforge related entries to their own recipes
cefeac2 package_regex.inc: split PyPi related entries to their own recipes
aa5df2a package_regex.inc: split Debian-related entries into their own recipes
12ba5cc package_regex.inc: split GITTAGREGEX entries into recipe files
642e92f package_regex.inc: split entries with odd-even versioning into their own recipes
96eac69 package_regex.inc: deprecate the file
b0bbea5 gstreamer: really fix the helper install race
b822216 neard: fix libdir/libexecdir confusion
cbfccc6 glibc: fix libdir/libexecdir path confusion
d0577f9 sudo: handle libexecdir != libdir/PN.
6f837cc util-linux: Add ptest
dbd02bd libav: Correctly handle prefix=""
fda9859 libav: Add PACKAGECONFIG options: avdevice, avfilter, avplay, gpl
7ba85f1 libav: Remove deprecated --disable-avserver
2739ed0 busybox: backport upstream fixes for unzip
6decbbb qt4-4.8.7: fix build for mips n32
f1e8938 gstreamer1.0: Convert tests and valgrind config opts to PACKAGECONFIGs
11b9524 cracklib: fix for base_libdir == libdir
d9f73ca libbsd: Upgrade to 0.8.0
10d6dc4 libcroco: Upgrade 0.6.8 -> 0.6.9
79b823a shared-mime-info: Upgrade 1.4 -> 1.5
f6ec8a4 xdg-utils: Upgrade to 1.1.1
a3f63f9 gsettings-desktop-schemas: Upgrade 2.16.1 -> 3.18.1
754f6b6 gnome-common: Upgrade 3.14.0 -> 3.18.0
75aba18 clutter-gtk-1.0: Upgrade 1.6.2 -> 1.6.6
c6a6212 clutter-gst-3.0: Upgrade 3.0.8 -> 3.0.14
2da6cd5 clutter-1.0: Upgrade 1.24.2
148c953 cogl-1.0: Upgrade 1.20.0 -> 1.22.0
f54d4e4 ghostscript: Add NIOS2 support
21ba42b harfbuzz: update 1.1.0 -> 1.1.2
058b91e xvideo-tests: move to the latest release
70d459c scripts/oe-pkgdata-util: sort the packages in list-pkg-files
80e3919 wic: insert local Python paths at front
9d788d7 toolchain-scripts.bbclass: unset command_not_found_handle
82ab99f waf.bbclass: remove unused parameter from get_waf_parallel_make()
68d3dfe toolchain-shar-extract.sh: proper fix for additional env setup scripts
0c5d239 base: Improve handling of switching virtual/x providers
3745479 bitbake: bitbake: rename REGEX, REGEX_URI, and GITTAGREGEX.
dd282d4 bitbake: toaster: return back 'New project' button
2a8e970 bitbake: toaster: tests Update UI tests to work with 2.0 changes
fe8a0a3 bitbake: toaster: tests Automated build-mode backend tests
0497b57 bitbake: toaster: unset environment variables
8b7a548 bitbake: toaster: get rid of complicated heuristics
556b8b6 bitbake: toaster: remove SDKMACHINE from project variables
4186f5b bitbake: toaster: stop using toaster-pre.conf
361faa3 bitbake: toaster: remove writeConfFile API
fcbba5a bitbake: toaster: set varibales on bitbake server
993bc7e bitbake: toaster: implement BitbakeController.getVariable
53e981e bitbake: toaster: buildinfohelper Broaden the toaster created recipe data case
57e5f24 bitbake: toaster: do not create duplicate HelpText objects
4c1e5ec bitbake: toaster: remove usage of BUILD_MODE variable
9902895 bitbake: toaster: do not terminate bb server
58765a8 bitbake: toaster: remove stopBBServer API
95a3cf7 bitbake: toaster: reimplemented startBBServer method
76d53b5 bitbake: toaster: remove _setupBE function
87b2f95 bitbake: toaster: implement 'toaster restart-bitbake'
891484a bitbake: toaster: implement start_bitbake function
bf25471 bitbake: toaster: implement stop_bitbake function
7c2b225 bitbake: toaster: update brbe and project attributes
de812d0 bitbake: toaster: start 'manage.py runbuilds' in the script
28e8ccf bitbake: toaster: make runbuilds to loop
a3871a3 bitbake: toaster: use parent of the build dir
2a96d35 bitbake: toaster: check for toaster configuration later
d87a534 bitbake: toaster: remove unused variable
dc6a489 bitbake: toaster: change toasterconf.json logic to use TEMPLATECONF, like oe-setup-builddir
5a42c2d bitbake: toaster: run bitbake the same way
cac91db bitbake: toaster: set DATABASE_URL in toaster script
a464bf2 bitbake: toaster: implement get-dburl command
e473151 bitbake: toaster: don't allow to run toaster as a script
4de214f bitbake: lib/bb/utils: improve edit_bblayers_conf() handling of bblayers.conf formatting
0debb11 bitbake: lib/bb/utils: fix error in edit_metadata() when deleting first line
9d19dd9 bitbake: wget.py: parse only <a> tags
71ede7b bitbake: toaster: toastergui tests Add generic test for ToasterTables widget
34b22cf bitbake: toaster: tables Fix invalid field name on NewCustomImagesTable
1c59846 bitbake: toaster: tables Add default_orderby field where it was missing or unset
d82c541 bitbake: toaster: CustomImageRecipe add search_allowed_fields to this model
bdf6241 bitbake: toaster: machines table Fix missing layers information needed for filter
b90a8dc bitbake: toaster: tablejs Make sure click handlers consume click event
c075bcf bitbake: toaster: projectpage Make sure build targets are space separated
698c74c libsdl: remove redundant configure_tweak patch
35945fd iw: upgrade to version 4.3
15969ae gstreamer1.0-plugins-good: fix PACKAGECONFIG for gudev and add one for v4l2 and libv4l2
e601b38 gstreamer1.0-plugins-bad: fix dependencies for uvch264 PACKAGECONFIG
ddf2501 gudev: Add from meta-oe
e406fa8 lsb: fix installed-vs-shipped for mips
39ecdce rpm: fix for N32 MIPS64
09b4da6 glibc/0029-fix-getmnt-empty-lines.patch: fix getmntent()
1781a9a init-install-efi: fix script for eMMC installation
f808747 init-install-efi: fix script for gummiboot loader
2a55036 linux-firmware: rtl8192cx: Add latest available firmware
b60af3b libsdl2: add missing dependency on libxkbcommon for PACKAGECONFIG[wayland]
ed31874 libxml2: upgrade to 2.9.3
ecb1c71 libxml2: merge pointless bb/inc split
19a626d openssh: redesign ssh-agent.sh regression test case
81b59e7 gcr: Require x11 DISTRO_FEATURE
934e486 psplash: update to latest git version
ccb2a57 sysvinit-inittab: Add wrapper script to verify console exists
b7f610d linux-yocto/4.1: Bluetooth:Fix the connection fail of 6lowpan over BT LE
d08e761 linux-yocto-rt/4.1: update to -rt15
6aa464c linux-yocto/4.1: fsl-mpc8315e-rdb: Enable EEPROM
bd29006 linux-yocto/4.1: update to v4.1.13
5561407 uClibc: enable utmp for shadow compatibility
533fc01 glibc: Backported a patch to fix glibc's bug(18589)
598e372 ncurses: update SRC_URI
51b64ee openssl: enable parallel make
88e45cd busybox: enable resize applet
87de4a1 busybox: disable support for mounting NFS file systems on Linux < 2.6.23
73cc839 busybox: update 1.23.2 -> 1.24.1
f8ac408 busybox: re-order defconfig to align with busybox 1.24.1
3648a37 busybox.inc: remove '-e MAKEFLAGS=' from EXTRA_OEMAKE
bf28ea9 busybox.inc: set CC=${CC} via make command line
f21dce1 busybox.inc: fix CONFIG_EXTRA_CFLAGS configmangle
6167669 busybox.inc: don't set .config CROSS_COMPILER_PREFIX
e1ecccd busybox: move EXTRA_OEMAKE etc into busybox.inc
0e63300 busybox.inc: don't export EXTRA_OEMAKE
3735776 busybox_git: Enable getopt applet
b1774f4 harfbuzz: update 1.0.6 -> 1.1.0
31f803a sqlite3: update 3.9.0 -> 3.9.2
7e3474c readline: apply missing upstream patches
99b9d52 readline: prepare for readline6.3 upstream patches
e0b6d0c dbus: merge .bb and .inc
d99958a pulseaudio: Fix HDMI profile selection
2ba954f initscripts: hide the error in case system is not writeable
4ed84ff nativesdk-buildtools-perl-dummy: fix rebuilding when SDKMACHINE changes
b8fdd09 xf86-video-vmware: Add vmwgfx PACKAGECONFIG option
dfd5c4d pkgconfig: merge .bb and .inc
61c6887 pkgconfig: upgrade to version 0.29
744e89f ofono: upgrade to version 1.17
996f843 libxml2: remove legacy LDFLAGS += "-ldl" workaround
dedabc1 apr: fix LTFLAGS to make it work with ccache
9470956 iproute2: install bridge tool by default
1b8f6a2 lttng-tools: add libgcc to RDEPENDS
22dd6e7 lttng-tools: Upgrade to 2.7 release
ef73f21 lttng-tools: Drop unused patch
c375976 lttng-ust: Upgrade to 2.7 release
f5c1b57 lttng-modules: Upgrade to 2.7 release
8d708a5 libunistring: upgrade to version 0.9.6
f840e59 libtasn1: upgrade to 4.7
012ca02 wpa-supplicant: upgrade to 2.5
872e153 mesa: Make gl libraries RRECOMMEND mesa-megadriver
a62fa23 directfb.inc: force bfd linker for armv7a
9b075ca libpng12: update to 1.2.54
6d1eb34 libpng: update to 1.6.19
92a881f orc: update to 0.4.24
2f479b1 libpcap: update to 1.7.4
bd4058f apr-util: add missing RDEPENDS for ptest
1408642 iproute2: update to 4.3.0
e677c25 ruby-native: Depend on openssl-native
9e37812 db: fix race issue for libdb-6.0.la
c19036a pango: use ptest-gnome
43b29d9 gst-plugins-bad: improve FILES variables
9fc877f gstreamer1.0-plugins-base: add PACKAGECONFIG for libvisual
7a2bb0d python3: fix building nativesdk-python3
2268a70 python3: Upgrade from 3.4.3 to 3.5
ed8d1be python-git: Add missing dependency
dee2a8c guile, mailx, gcc, opensp, gstreamer1.0-libav, libunwind: disable thumb where it fails for qemuarm
c0b822f icu: force arm mode
f42ef3f rpcbind: Security Advisory - rpcbind - CVE-2015-7236
04034e7 subversion: fix CVE-2015-3187
f91aedf subversion: fix CVE-2015-3184
40cd228 oeqa/sshcontrol: don't source profile
d39192a oeqa/runtime/multilib: refactor ELF class extraction
cc34104 oe-selftest: Enable code coverage on unit tests
06859de meta/conf/machine: use ' inside quoted values
6be94ec runqemu-internal: Replace wacom-tablet with tablet for usbdevice
0cc3810 recipetool: make plugin registration function name consistent with devtool
b381f80 recipetool: add setvar subcommand
1fbd760 lib/oe/recipeutils: refactor patch_recipe_file() to use edit_metadata()
0b850cb devtool: clarify help text
5001f23 devtool: build: enable showing default task in help
f79022d devtool: build: use bbappend to set PARALLEL_MAKE
21481bc lib/oe/recipeutils: check in validate_pn() for names instead of filenames
671f41e devtool: ensure we change back to the original dir on error
74505b4 devtool: search: print SUMMARY value
3f46af2 devtool: drop unused plugin_init() functions
176211a devtool: package: use DEPLOY_DIR_<pkgtype> to get deploy directory
0fe7426 devtool: disable creating workspace for extract and search subcommands
a360fa7 lib/oe/patch: improve extraction of patch header
f79cc4d devtool: upgrade: provide a means to update the source branch
b4d4d21 devtool: upgrade: fetch remote repository before checking out new revision
9b7d45c devtool: upgrade: remove erroneous error when not renaming recipe
9a70444 devtool: upgrade: fix updating PV and SRCREV
6a52c73 devtool: upgrade: fix removing other recipes from workspace on reset
44ef78a devtool: include do_patch in SRCTREECOVEREDTASKS
804f5b8 image.py: avoid mkdir race when building multiple images
312862f package_manager.py: define info_dir and status_file when OPKGLIBDIR isn't the default
b00f734 image.py: Avoid creating empty .env file in _write_wic_env
a88505b lib/oe/terminal: use C locale when determining version
8d784ba toolchain-shar-extract.sh: Ensure it's ran in clean environment
7f3c20f toolchain-shar-extract.sh: do not allow $ in paths for ext SDK
2d21e5d create-pull-request: handle empty ODIR
c63b36f scripts/gen-lockedsig-cache: improve output
67af6d6 wic: exec_native_cmd: implement support for pseudo
8ffba25 toolchain-shar-relocate: don't assume last state of env_setup_script is good
b8ee7ae sanity: don't enforce DISPLAY for testimage
b364183 oeqa/qemurunner: pass nographic to runqemu if DISPLAY isn't set
46755cc base: add automatic dependency on lzip-native for .lz SRC_URI
6ea39c2 base: decode SRC_URI before adding implicit fetch dependencies
eded9c2 buildhistory.bbclass: support extending the content of the build history
d95df11 license.bbclass: Create image license manifest
efdab52 license.bbclass: Add function get_deployed_files
cc0d044 license.bbclass: Added function get_deployed_dependencies
d45e10e license.bbclass: Added get_boot_dependencies function
8b1e7bc license.bbclass: Split license create manifest
1a210e6 license.bbclass: Write recipeinfo file in license folder
74c7cd5 populate_sdk_ext.bbclass: Be more permissive on the name of the buildtools
5ba6382 populate_sdk_base: Add sysroot symlink check
7fed655 classes/populate_sdk_ext: fail if SDK_ARCH != BUILD_ARCH
2948169 classes/populate_sdk_ext: tweak reporting of workspace exclusion
28a2ea7 classes/populate_sdk_ext: make it clear when SDK installation has failed
124c6aa classes/populate_sdk_ext: tidy up preparation log file writing
d348624 boot-directdisk.bbclass: remove HDDIMG before create
03f15e5 sstate: Ensure siginfo and sig files are also touched
615ccae weston: Add PACKAGECONFIG option for colord CMS
cdad67c opkg: add cache filename length fixes
2ec77de openjade-native: statically link local libs
29747d4 sysklogd: inhibit updatercd for non-sysvinit
add3451 connman: depend on readline
7a557a2 latencytop: obey LDFLAGS
8aeec87 tcf-agent: obey LDFLAGS
9025d2e blkspace: fix ldflags for iowatcher
1732a8a bluez5: enable sysvinit support
160fdd8 sysprof: use packageconfig for the gui
425d020 mc: upgrade to 4.8.15
7386647 packagegroup-core-directfb: Don't depend on pango-modules
ac5ed8e xkeyboard-config: Upgrade 2.15 -> 2.16
3a71fab xkbcomp: Upgrade 1.3.0 -> 1.3.1
b7cb308 xinput: Upgrade 1.6.1 -> 1.6.2
05eca73 xf86-video-omap: Upgrade 0.4.3 -> 0.4.4
cfcc5e5 xf86-input-synaptics: Upgrade 1.8.2 -> 1.8.3
4c9256f xf86-input-evdev: Upgrade 2.9.2 -> 2.10.0
96ddcc5 xorg-driver-input: add xorg configuration to FILES
a1003f5 xserver-xorg: Upgrade 1.17.2 -> 1.18.0
a336b8a libxcb: Remove unused git-version of the recipe
05ba0db libxcb: Upgrade 1.11 -> 1.11.1
44233d3 pixman: Upgrade 0.32.6 -> 0.32.8
7ab0466 libxi: Upgrade 1.7.4 -> 1.7.5
63feef0 gtk-icon-utils-native: Upgrade 3.16.6 -> 3.18.2
38924d9 package_regex.inc: Add gtk-icon-utils-native
060b482 gtk+3: Upgrade 3.16.6 -> 3.18.2
4f3d2b3 adwaita-icon-theme: Upgrade 3.16.2.1 -> 3.18.0
c8849ac librsvg: Upgrade 2.40.10 -> 2.40.11
81769ca pango: add RPROVIDES for removed packages
c9b06f5 pango: Upgrade 1.36.8 -> 1.38.1
ced8d49 gdk-pixbuf: Upgrade 2.30.8 -> 2.32.1
918c773 libsoup-2.4: Upgrade 2.50.0 -> 2.52.1
5bd9305 at-spi2-atk: Upgrade 2.16.0 -> 2.18.1
8eb0c8f atk-spi2-core: Upgrade 2.16.0 -> 2.18.1
78130eb atk: Upgrade 2.16.0 -> 2.18.0
e7141ab glib-networking: Upgrade 2.44.0 -> 2.46.1
fcd7494 glib-2.0: build dependency cleanup
5357764 glib-2.0: Enable more tests while cross-compiling
1e271af glib-2.0: Upgrade 2.44.1 -> 2.46.1
bc1be07 qemu: Backport malloc-trace disabling
bca5a7a logrotate: do not move binary logrotate to /usr/bin
0069c0d systemd: drop unneeded $D check in prerm
cd1f2b4 systemd: chown hwdb.bin to root:root for do_rootfs
7ca8cd9 systemd: for valgrind, define VALGRIND=1
46fa8ab systemd: make coredump a PACKAGECONFIG
ac34784 systemd: add machine-id to conffiles
04937cc systemd: ignore .so filenames in systemd-doc
6821854 systemd: fix Upstream-Status tag
82107b1 mdadm: fix CFLAGS and ptest issues
d8adfd2 gcc-4.9: Fix various _FOR_BUILD and related variables
8ae27fa devtool: add sync command
6bfa1dc boost.inc: remove unused parameter from get_boost_parallel_make()
16d7bfd wireless-tools: remove unused files
ee923bf gstreamer1.0: fix install race
0ae52c8 gcc-multilib-config: make aarch64 support multilib
8514d21 libxml2: fix CVE-2015-7942 and CVE-2015-8035
e864f71 terminal: Open a new window instead of split on older tmux versions (<1.9)
5056581 flex: fix test-bison-yylval and test-bison-yylloc failed
c54540e gdbm 1.8.3: install libgdbm_compat
b9f87ed harfbuzz: update to 1.0.6
3f75537 ethtool: bump version to 4.2
9a4da3c openssl: fix ptest issues
9163a5d base-files: stage /etc/skel
d60c5ff mktemp: raise the priority to avoid conflicting with coreutils
b06eacd libunwind: fix build for qemuarm
c4acace gma500_gfx: Avoid inserting gma500_gfx module for certain devices
6c3f680 libsndfile: fix CVE-2014-9756
aa07eb1 python-pycurl: update version to 7.19.5.2
696aa7e rt-tests: upgrade to version 0.96
6ec7dc2 rpcbind: don't use '-w' for starting rpcbind
eddd88f libsecret: add dependency on intltool-native
2e8efb1 openssl: use subdir= instead of moving files in do_configure_prepend()
036d2dc openssl: sanity check that the bignum module is present
cf366d8 libsdl2: require GLES when building Wayland support
4b38be6 meta: add some missing Upstream-Status tags to patches
42c75cd weston: delete unused patch
521fac6 glibc: fix Upstream-Status tag
44a7bbc linux-firmware: package Broadcom BCM4339 firmware
f9d51cd libusb1: fix make install race
cb01f6d libusb1: upgrade from 1.0.19 to 1.0.20
b4e6f63 perl: fix spaces in brackets while using CC version
a59d019 u-boot: Update to 2015.10 release
e67c5b0 bitbake-prserv-tool: check file name
4e2c5e1 recipetool.append: don't choke on a trailing ; in a url
a35f79d yocto-bsp: Set SRCREV meta/machine revisions to AUTOREV
9d585b5 yocto-bsp: Set KTYPE to user selected base branch
1542c2a yocto-bsp: Typo on the file extension
f674ffa yocto-bsp: Avoid duplication of user patches ({{=machine}}-user-patches.scc)
49a465c package_manager.py: Delete installed_pkgs.txt file
ace895d rootfs.py: Stop using installed_pkgs.txt
ccb1616 lib/oe/distro_check: don't set empty proxy keys
8137a84 lib/oe/copy_buildsystem: Don't expand BB_TASKDEPDATA
a6c68d8 oeqa/selftest/sstatetests: prettier output for allarch test
92328b4 oeqa/selftest/signing: Added new test for signing sstate.
fbb03a8 oeqa/selftest/signing: New test for Signing packages in the package feeds.
13a4c38 qemu.bbclass: fix vardeps of QEMU_OPTIONS
51bd011 qemu.bbclass: correct the fsl ppc QEMU_EXTRAOPTIONS
753f31e autotools: Allow recipe-individual configure scripts
e281791 allarch: Force TARGET_*FLAGS variable values
e28e17e distro/maintainers.inc: include stress package details
76d2e46 image_types: improve wks path specification
70ae7a6 insane.bbclass: Avoid libdir QA check if PACKAGE_DEBUG_SPLIT_STYLE='debug-file-directory'
cf0dfdb classes/cpan-base: fix libdir for nativesdk
a205c4c bbclass: fix spelling mistakes
cf218e5 rootfs_*.bbclass: don't add BUILDNAME to do_rootfs vardepsexclude
7d8616c insane: Don't depend on BB_TASKDEPDATA
a9cc27e kernel: fix race condition between compile_kernelmodules and shared_workdir
fecb077 classes: Ensure pass setVar/setVarFlag strings, not integers
9167f20 classes/license: fix intermittent license collection warning
43c8867 classes/metadata_scm: fix git errors showing up on non-git repositories
59b27d5 sstate: respect GPG_BIN and GPG_HOME
4415dc5 archiver.bbclass: add bbappend when do_ar_recipe kernel and gcc packages
2f0ff3a archiver.bbclass: fix previous issue regarding work-shared for linux-yocto
0cc4eef waf.bbclass: filter out non -j from PARALLEL_MAKE
95719b0 ptest-gnome: extend EXTRA_OECONF in all builds, not just target
1b25a70 yocto-project-qs, ref-manual, poky.ent: CentOS Package updates
2e649d7 dev-manual: Updated runqemu command options list
bd62289 toaster-manual: Removed SDKMACHINE from the json file example.
c674cd7 ref-manual: Updated list of supported distros.
33d8cff ref-manual: Updated the GCC 5 migration section for 2.0
d9aabf9 gcc: Drop 4.8
2cb1aee layer.conf: Correct gcc-cross dependency
88f9310 bitbake: toaster: builds pages Fix the download cooker log link
d04af8b bitbake: toaster: project pages Link to image recipes table in notifications
70465c7 bitbake: toaster: tests: Re-write some cases to make them more maintainable
536b73f bitbake: data_smart: Only support lowercase OVERRIDES
fb01a66 bitbake: fetch2: Remove crazy code in unpack
7db88aa bitbake: parse: Don't try to expand __base_depends/__depends
4c04ce0 bitbake: cache: Don't try to expand __inherit_data
9d8e36a bitbake: toaster: localhostbectrl Pass DATABASE_URL in via the process environment
4677d8b bitbake: toaster: Remove the new-build-input button widget
55f4494 bitbake: toaster: projecttopbar Use the project in context to get num builds
e9d4962 bitbake: toaster: projectpage Disable/Enable build input if we have 0 layers
5fa4c73 bitbake: toaster: orm Fix get_number_of_builds to count all apart from IN_PROGRESS
c4032f4 bitbake: codeparser: Only load the codeparser cache once
e3b66c1 maintainers: mass reassign and cleanup
37ddd3e Revert "local.conf.sample: Disable image-prelink by default"
9cc221d yocto-bsp: Default kernel version to 4.1 on x86_64
7100c42 scripts: runqemu: remove QEMUARCH from help message
f47e4ad cairo: update 1.14.2 -> 1.14.4
603b4de cairo.inc: drop obsolete CFLAGS += "-ffat-lto-objects" workaround
e8833a6 cmake: update 3.3.1 -> 3.3.2
8b2b068 oe-selftest: add test for bitbake-layers show-recipes
480bbae oeqa/selftest/layerappend: fix test if build directory is not inside COREBASE
a301f6e oeqa/selftest/devtool: fix test if build directory is not inside COREBASE
fd6bf77 classes/distrodata: split SRC_URI properly before determining type
7cebff6 classes/buildhistory: split package history values only once
10fc534 conf/distro/include: drop old recipes from include files
37cfd80 gitignore: fix overzealous exclusion
1f6599b meta: Fix typos in Upstream-Status labels
7cace4c meta/conf/layer.conf: fix typo
ca8e1e5 texinfo-dummy-native: set SUMMARY instead of DESCRIPTION
64cd113 gstreamer1.0-meta-base: set SUMMARY instead of DESCRIPTION
1d42d59 mmc-utils: set SUMMARY instead of DESCRIPTION
6692540 swig: set SUMMARY instead of DESCRIPTION
47ae8eb alsa-plugins: set SUMMARY instead of DESCRIPTION
eac5fa9 tzcode-native: set SUMMARY instead of DESCRIPTION
0a30a1f linux-yocto.inc: set SUMMARY instead of DESCRIPTION
19e1a73 python-nose: add SUMMARY
b5f58c1 stress: add SUMMARY
5f9392a libunwind: add SUMMARY
1460e01 gptfdisk: add SUMMARY
0821c36 verify-homepage: fix recipe file selection
0c48921 verify-homepage: tidy up output and comments
0e348e7 verify-homepage: get expanded HOMEPAGE value
caaca00 verify-homepage: use scriptpath to find bitbake path
649b6bc libaio: don't disable linking to the system libraries
11a9c24 runqemu: don't specify IP when starting a VNC server
3b95964 qemurunner: Remove the timeout in run_serial
bbd6d07 libxslt: CVE-2015-7995
a0d2ea9 gstreamer1.0-rtsp-server: upgrade to version 1.6.1
2459ec2 gstreamer1.0-libav: upgrade to version 1.6.1
bce06e7 gstreamer1.0-plugins-ugly: upgrade to version 1.6.1
0ec3c62 gstreamer1.0-plugins-bad: upgrade to version 1.6.1
ba1bc63 gstreamer1.0-plugins-good: upgrade to version 1.6.1
4a55d12 gstreamer1.0-plugins-base: upgrade to version 1.6.1
8360f23 gstreamer1.0: upgrade to version 1.6.1
8800033 prelink: Fix various prelink issues on IA32, ARM, and MIPS.
920fb96 gcc: Update default Power GCC settings to use secure-plt
7b1763a glibc: Fix ld.so / prelink interface for ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA
e63e191 qemurunner: Enable timestamps on kernel boot-up
a1ca788 openssl: fix mips64 configure support
5a10a6f at: modify sources in do_patch
78e0598 unzip: rename patch to reflect CVE fix
b80935a readline: rename patch to contain CVE reference
86d84ff qemu: upgrade to 2.4.0.1
4f0d756 gnome-desktop-testing: fix ptest output format
834de84 default-distrovars: remove less from WHITELIST_GPL-3.0
29bba95 lsof: don't export EXTRA_OEMAKE
3d37768 cmake.bbclass: don't duplicate CMAKE_C_FLAGS in CMAKE_C_FLAGS_RELEASE
efc07c2 rm_work.bbclass: Exclude do_rootfs stamp removal
5f9d16b cairo: fix license for cairo-script-interpreter
7328479 openssh: enable X11Forwarding if distro feature x11 is set
adeb820 acpid: Upgrade to 2.0.25
781dfd8 libidn: 1.30 -> 1.32
351c69a sqlite: 3.8.10.2 -> 3.9.0
c0fe43c rt-tests: bump to v0.94
cf972f9 gbm: Fix "configure: error: gbm requires --enable-dri"
17733cc xinetd: install xinetd supported services configuration
aa1844e combo-layer: introduce ability to exclude component from mass update
dcc446f linux-dtb.inc: refactor common code to function get_real_dtb_path_in_kernel
af9c7a4 linux-dtb.inc: refactor common code to function normalize_dtb
7eecb81 linux-dtb.inc: explicit test for empty string not needed
54df911 ptest-runner: Allow running of specific tests
54325b2 oeqa/testimage: Add support for test folder export.
ecbe135 oeqa/runtime/multilib: run the arch tests on connmand not connman-applet
2d1071e oeqa/runtime: remove dmesg test
42a5378 nfs-utils/statd: fix a segfault
77e3246 qemu: enable user mode for mips64 and mips64el
70600fb gnupg: fix find-version for beta checking
ab123ef rpm: define EM_AARCH64 for debugedit
af8c136 xserver-xorg: drop empty ${PN}-security-policy package
b667067 xserver-xorg: add Xwayland RRECOMMENDS
80f4d71 weston: add a PACKAGECONFIG option for xwayland support
883ab0f systemd: make dbus an optional build time dependency
2c5047f weston: add PACKAGECONFIG to build with systemd-login support
65ffeb5 systemd: add PACKAGECONFIG to build with compatibility libraries
4b29c80 os-release: put double-quotes around variable contents
0f516a5 cpio: fix testcase symlink-bad-lengths [ LIN8-947 ]
bceb9cb cpio: Fix symlink-bad-length test for 64-bit [ LIN8-947 ] architectures.
0ff3fc7 gtk+3: fix ALTERNATIVE_PRIORITY conflict with gtk+
eca12a6 coreutils: fix ALTERNATIVE_PRIORITY conflict with procps and mktemp
8de5315 util-linux: fix ALTERNATIVE_PRIORITY conflict with ncurses procps and e2fsprogs
3befb43 console-tools: fix ALTERNATIVE_PRIORITY conflict with kbd
5385ea8 debianutils: fix ALTERNATIVE_PRIORITY conflict with which
3a0bd40 linux-dtb.inc: use same variable name DTB for all elements of KERNEL_DEVICETREE
a879312 linux-dtb.inc: remove unneeded 'cd'
a23d1ca webkitgtk: Add upstream patch to fix build problem
69836e8 python: don't append -D__SOFTFP__ to TARGET_CC_ARCH for armv6/armv7a
38d1d63 prexport.bbclass: avoid export for native and crosssdk
d3da006 recipes: add distro_features_check for some packages
63690f0 scons.bbclass: SCons packages don't require do_configure
bffdc65 busybox: Schedule mdev after mountall
13ce7c2 busybox: Fix mdev block device automounting
b09f0f2 libarchive: rename patch to reflect CVE
116360f binutils: Fix XLP / Octeon 3 instruction clash
fd4f4d2 binutils: Fix octeon3 disassembly patch
REVERT: b1f23d1 build-appliance-image: Update to jethro head revision
REVERT: 7fe17a2 qemu: Security fix CVE-2016-2198
REVERT: 50700a7 qemu: Security fix CVE-2016-2197
REVERT: 1f0e615 libgcrypt: Security fix CVE-2015-7511
REVERT: dc5f155 uclibc: Security fix CVE-2016-2225
REVERT: ef13511 uclibc: Security fix CVE-2016-2224
REVERT: ae57ea0 libbsd: Security fix CVE-2016-2090
REVERT: eb9666a glibc: Security fix CVE-2015-7547
REVERT: 5b12268 build-appliance-image: Update to jethro head revision
REVERT: a3a374a curl: Secuirty fix CVE-2016-0755
REVERT: f4341a9 curl: Security fix CVE-2016-0754
REVERT: 35f4306 nettle: Security fix CVE-2015-8804
REVERT: 3e8a07b nettle: Security fix CVE-2015-8803 and CVE-2015-8805
REVERT: 5ffc326 socat: Security fix CVE-2016-2217
REVERT: 5cc5f99 libpng: Security fix CVE-2015-8472
REVERT: 21a816c libpng: Security fix CVE-2015-8126
REVERT: 6a0fbfa foomatic-filters: Security fixes CVE-2015-8327
REVERT: d57aaf7 foomatic-filters: Security fix CVE-2015-8560
REVERT: 941874a build-appliance-image: Update to jethro head revision
REVERT: d74a3cb cross-localedef-native: add ABI breaking glibc patch
REVERT: 12fae23 build-appliance-image: Update to jethro head revision
REVERT: 67ac9d6 e2fsprogs: Ensure we use the right mke2fs.conf when restoring from sstate
REVERT: 5812fc9 build-appliance-image: Update to jethro head revision
REVERT: 3de2492 ref-manual: Updated host package install requirements CentOS
REVERT: 79de8cf toaster-manual: Updated the "Installation" to have TOASTER_DIR information
REVERT: a23d262 toaster-manual: Updated instructions for production setup.
REVERT: b6def81 linux-yocto: Update SRCREV for genericx86* for 4.1, fixes CVE-2016-0728
REVERT: db0f8ac linux-yocto: Update SRCREV for genericx86* for 3.19, fixes CVE-2016-0728
REVERT: c8122a0 linux-yocto: Update SRCREV for genericx86* for 3.14, fixes CVE-2016-0728
REVERT: cdeb241 meta-yocto-bsp: Remove uvesafb (v86d) from generic x86 features
REVERT: 52cd219 yocto-bsp: Set SRCREV meta/machine revisions to AUTOREV
REVERT: a88d6cb yocto-bsp: Set KTYPE to user selected base branch
REVERT: 4e74b36 yocto-bsp: Avoid duplication of user patches ({{=machine}}-user-patches.scc)
REVERT: 6680773 yocto-bsp: Default kernel version to 4.1 on x86_64
REVERT: 4c075e7 piglit: don't use /tmp to write generated sources to
REVERT: ee52ac6 gen-lockedsig-cache: fix bad destination path joining
REVERT: e9f95df linux-yocto: Update SRCREV for qemux86* for 4.1, fixes CVE-2016-0728
REVERT: e63bab1 linux-yocto: Update SRCREV for qemux86* for 3.19, fixes CVE-2016-0728
REVERT: 64a4920 linux-yocto: Update SRCREV for qemux86* for 3.14, fixes CVE-2016-0728
REVERT: 5b043da libpng12: update URL that no longer exists
REVERT: 655c8a5 libpng: update URL that no longer exists
REVERT: 96fda8c busybox: fix build of last applet
REVERT: ae037d9 ghostscript: add dependency for pnglibconf.h
REVERT: 26eb877 gcr: Require x11 DISTRO_FEATURE
REVERT: e632cdb uClibc: enable utmp for shadow compatibility
REVERT: e8c9613 git: Security fix CVE-2015-7545
REVERT: 108ea6d glibc-locale: fix QA warning
REVERT: 9a88c1d grub: Security fix CVE-2015-8370
REVERT: 443b09a gdk-pixbuf: Security fix CVE-2015-7674
REVERT: 6c91068 librsvg: Security fix CVE-2015-7558
REVERT: 9fd2349 bind: Security fix CVE-2015-8461
REVERT: 5a40d9f bind: Security fix CVE-2015-8000
REVERT: 1bbf183 libxml2: Security fix CVE-2015-8710
REVERT: 2ec6d1d libxml2: Security fix CVE-2015-8241
REVERT: 55aafb5 dpkg: Security fix CVE-2015-0860
REVERT: 029948b tzdata: update to 2016a
REVERT: 2bcf141 tzcode: update to 2016a
REVERT: cc3a391 kernel-yocto: fix checkout bare-cloned kernel repositories
REVERT: 049be17 libpcre: bug fixes include security
REVERT: 5e94ac7 qemu: Security fix CVE-2015-7295
REVERT: 7ee1828 qemu: Security fix CVE-2016-1568
REVERT: ca6ec2e qemu: Security fix CVE-2015-8345
REVERT: b55a677 qemu: Security fix CVE-2015-7512
REVERT: 4922f47 qemu: Security fix CVE-2015-7504
REVERT: 3ec0e95 qemu: Security fix CVE-2015-8504
REVERT: 942ce53 openssl: Security fix CVE-2016-0701
REVERT: ce8ae1c openssl: Security fix CVE-2015-3197
REVERT: 080e027 tiff: Security fix CVE-2015-8784
REVERT: c6ae9c1 tiff: Security fix CVE-2015-8781
REVERT: 049b7db bind: CVE-2015-8704 and CVE-2015-8705
REVERT: d632a92 rpmresolve.c: Fix unfreed pointers that keep DB opened
REVERT: 5b993ed openssh: CVE-2016-1907
REVERT: 27ee5b4 glibc: CVE-2015-8776
REVERT: a4134af glibc: CVE-2015-9761
REVERT: e10ec6f glibc: CVE-2015-8779
REVERT: a5a965d glibc: CVE-2015-8777.patch
REVERT: 2fb7ee2 bitbake: toaster: make runbuilds loop
REVERT: b9ad87b nativesdk-buildtools-perl-dummy: Bump PR
REVERT: 0a1c63a nativesdk-buildtools-perl-dummy: properly set PACKAGE_ARCH
REVERT: d4b400e nativesdk-buildtools-perl-dummy: fix rebuilding when SDKMACHINE changes
REVERT: 8c8c4ed Revert "gstreamer1.0-plugins-good.inc: add gudev back to PACKAGECONFIG"
REVERT: b832202 Revert "gstreamer: Deal with merge conflict which breaks systemd builds"
REVERT: dd0ba9e build-appliance-image: Update to jethro head revision
REVERT: 325d205 gstreamer: Deal with merge conflict which breaks systemd builds
REVERT: 53b114b build-appliance-image: Update to jethro head revision
REVERT: 02be35d poky.conf: Bump version for 2.0.1 jethro release
REVERT: f5551f8 ref-manual: Updated the list of supported image types.
REVERT: aa179ae dev-manual: Added three new wic option descriptions.
REVERT: 20007c8 dev-manual: Added the --overhead-factor wic option description.
REVERT: 2dd7f46 dev-manual: Added the --extra-space wic option description.
REVERT: 81cc737 dev-manual: Added wic --notable option description.
REVERT: 2b1dce5 dev-manual:
REVERT: a6f5293 kernel/kernel-arch: Explicitly mapping between i386/x86_64 and x86 for kernel ARCH
REVERT: e79a538 openssh: update to 7.1p2
REVERT: b171076 devtool: reset: do clean for multiple recipes at once with -a
REVERT: 255115f devtool: sdk-update: fix error checking
REVERT: 3f69105 devtool: sdk-update: fix metadata update step
REVERT: 5ba94af devtool: sdk-update: fix not using updateserver config file option
REVERT: d03d145 classes/populate_sdk_ext: disable signature warnings
REVERT: 00ff950 classes/populate_sdk_ext: fix cascading from preparation failure
REVERT: 22446c6 scripts/oe-publish-sdk: add missing call to git update-server-info
REVERT: 8597a61 devtool: use cp instead of shutil.copytree
REVERT: 95cc641 buildhistory: fix not recording SDK information
REVERT: 84d48ac recipetool: create: fix error when extracting source to a specified directory
REVERT: 4369329 recipetool: create: detect when specified URL returns a web page
REVERT: 4c3191f recipetool: create: prevent attempting to unpack entire DL_DIR
REVERT: caca77e recipetool: create: fix do_install handling for makefile-only software
REVERT: 383159e recipetool: create: avoid traceback on fetch error
REVERT: be40baa recipetool: create: handle https://....git URLs
REVERT: a897bfd devtool: sdk-update: fix traceback without update server set
REVERT: 9c4b61e classes/populate_sdk_ext: error out of install if buildtools install fails
REVERT: 4c07dd2 gstreamer1.0-plugins-good.inc: add gudev back to PACKAGECONFIG
REVERT: 83b72d8 linux-yocto: Update Genericx86* BSP to 4.1.15 kernel
REVERT: 44639bd libaio: don't disable linking to the system libraries
REVERT: a0be9bd linux-yocto/4.1: update to v4.1.15
REVERT: 53f0290 libxml2: security fix CVE-2015-5312
REVERT: f4b0c49 libxml2: security fix CVE-2015-8242
REVERT: fb409c9 libxml2: security fix CVE-2015-7500
REVERT: 55d097a libxml2: security fix CVE-2015-7499
REVERT: 8e6b2d6 libxml2: security fix CVE-2015-7497
REVERT: 332eb1d libxml2: security fix CVE-2015-7498
REVERT: cbc4e83 libxml2: security fix CVE-2015-8035
REVERT: c4b71e1 libxml2: security fix CVE-2015-7942
REVERT: fdea03d libxml2: security fix CVE-2015-8317
REVERT: 6fc1109 libxml2: security fix CVE-2015-7941
REVERT: 9eb4ce0 openssl: fix for CVE-2015-3195
REVERT: 6880f82 openssl: fix for CVE-2015-3194
REVERT: 7dcaa84 openssl: fix for CVE-2015-3193
REVERT: 435139b logrotate: do not move binary logrotate to /usr/bin
REVERT: 5f49c0a cairo: fix license for cairo-script-interpreter
REVERT: a29ec81 glibc: Fix ld.so / prelink interface for ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA
REVERT: b1e980f gcc: Update default Power GCC settings to use secure-plt
REVERT: ed82690 prelink: Fix various prelink issues on IA32, ARM, and MIPS.
REVERT: 9a620da autotools: Allow recipe-individual configure scripts
REVERT: f828071 toolchain-scripts.bbclass: unset command_not_found_handle
REVERT: 49858bd devtool: upgrade: fetch remote repository before checking out new revision
REVERT: d213452 devtool: upgrade: remove erroneous error when not renaming recipe
REVERT: fec97f6 devtool: upgrade: fix updating PV and SRCREV
REVERT: 3b4f659 devtool: upgrade: fix removing other recipes from workspace on reset
REVERT: 61a7de0 devtool: include do_patch in SRCTREECOVEREDTASKS
REVERT: 82c0072 toolchain-shar-extract.sh: do not allow $ in paths for ext SDK
REVERT: f181e72 scripts/gen-lockedsig-cache: improve output
REVERT: 4b5d4ca toolchain-shar-extract.sh: proper fix for additional env setup scripts
REVERT: d2ea8f1 toolchain-shar-relocate: don't assume last state of env_setup_script is good
REVERT: 02ef437 populate_sdk_ext.bbclass: Be more permissive on the name of the buildtools
REVERT: 3653b17 classes/populate_sdk_ext: fail if SDK_ARCH != BUILD_ARCH
REVERT: 8879571 classes/populate_sdk_ext: tweak reporting of workspace exclusion
REVERT: eeda3c6 classes/populate_sdk_ext: make it clear when SDK installation has failed
REVERT: dee9fbe classes/populate_sdk_ext: tidy up preparation log file writing
REVERT: d001d46 classes/license: fix intermittent license collection warning
REVERT: 777451c classes/metadata_scm: fix git errors showing up on non-git repositories
REVERT: cb0ca72 oeqa/selftest/layerappend: fix test if build directory is not inside COREBASE
REVERT: 8970ad6 oeqa/selftest/devtool: fix test if build directory is not inside COREBASE
REVERT: 4f7fdd0 classes/distrodata: split SRC_URI properly before determining type
REVERT: 3b7df55 uninative.bbclass: Choose the correct loader based on BUILD_ARCH
REVERT: f3d7c3f openssl: sanity check that the bignum module is present
REVERT: 96b1b5c glibc: Backported a patch to fix glibc's bug(18589)
REVERT: 7aecb57 directfb.inc: force bfd linker for armv7a
REVERT: 75ca2c8 texinfo: don't create dependency on INHERIT variable
REVERT: 02c7b3f package_manager.py: define info_dir and status_file when OPKGLIBDIR isn't the default
REVERT: 003c94f libsdl2: require GLES when building Wayland support
REVERT: ad6db01 gst-plugins-bad: add PACKAGECONFIGs for voamrwbenc, voaacenc, resindvd
REVERT: f0d87fe gstreamer1.0-plugins-good: fix PACKAGECONFIG for gudev and add one for v4l2 and libv4l2
REVERT: 35f34a6 gstreamer1.0-plugins-bad: fix dependencies for uvch264 PACKAGECONFIG
REVERT: 3b77e20 gstreamer1.0-plugins-{base,good}: update PACKAGECONFIGs
REVERT: e2d4412 libunwind: fix build for qemuarm
REVERT: ef69078 guile, mailx, gcc, opensp, gstreamer1.0-libav, libunwind: disable thumb where it fails for qemuarm
REVERT: 4700e40 icu: force arm mode
REVERT: 743ee04 libxcb: Add a workaround for gcc5 bug on mips
REVERT: 8a3deca bitbake: fetch: use orig localpath when calling orig method
REVERT: 0073b23 yocto-bsp: Typo on the file extension
REVERT: 71dbbcd bsp-guide: Updated the license statement.
REVERT: 41f1026 dev-manual: Correction to the KVM stuff in the runqemu commands.
REVERT: 38e3c6e mega-manual: Added four new figures for GUI example.
REVERT: b99ec28 poky.ent: Fixed POKYVERSION variable.
REVERT: c670dc7 yocto-project-qs, ref-manual, poky.ent: CentOS Package updates
REVERT: b968190 dev-manual: Updated runqemu command options list
REVERT: 1278753 toaster-manual: Removed SDKMACHINE from the json file example.
REVERT: 7b25b70 ref-manual: Updated list of supported distros.
REVERT: d9423fb ref-manual: Updated the GCC 5 migration section for 2.0
REVERT: 347347a bitbake: lib/bb/utils: improve edit_bblayers_conf() handling of bblayers.conf formatting
REVERT: 5935783 bitbake: lib/bb/utils: fix error in edit_metadata() when deleting first line
REVERT: 7fdad70 rpcbind: Security Advisory - rpcbind - CVE-2015-7236
REVERT: 0cb2fa5 subversion: fix CVE-2015-3187
REVERT: 5b52e9b subversion: fix CVE-2015-3184
REVERT: 59bdde4 linux-firmware: rtl8192cx: Add latest available firmware
REVERT: 8ad2bcc init-install-efi: fix script for gummiboot loader
REVERT: c3087bd init-install-efi: fix script for eMMC installation
REVERT: d2bf9fb pulseaudio: Fix HDMI profile selection
REVERT: 0556c58 allarch: Force TARGET_*FLAGS variable values
REVERT: e683dac libsndfile: fix CVE-2014-9756
REVERT: 092757e libxslt: CVE-2015-7995
REVERT: dab5555 unzip: rename patch to reflect CVE fix
REVERT: 1753d4a readline: rename patch to contain CVE reference
REVERT: 9dd3422 libarchive: rename patch to reflect CVE
REVERT: 1401976 binutils: Fix octeon3 disassembly patch
REVERT: a54a0db opkg: add cache filename length fixes

git-subtree-dir: yocto-poky
git-subtree-split: 8358e543ab95a1d2b1d19c1e944275daa17378c1
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/yocto-poky/.gitignore b/yocto-poky/.gitignore
index 4235831..94894d4 100644
--- a/yocto-poky/.gitignore
+++ b/yocto-poky/.gitignore
@@ -1,7 +1,7 @@
 *.pyc
 *.pyo
 /*.patch
-build*/
+/build*/
 pyshtables.py
 pstage/
 scripts/oe-git-proxy-socks
@@ -14,6 +14,7 @@
 *.orig
 *.rej
 *~
+!meta-poky
 !meta-yocto
 !meta-yocto-bsp
 !meta-yocto-imported
diff --git a/yocto-poky/.templateconf b/yocto-poky/.templateconf
index 0650a46..0fe6f82 100644
--- a/yocto-poky/.templateconf
+++ b/yocto-poky/.templateconf
@@ -1,2 +1,2 @@
 # Template settings
-TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}
+TEMPLATECONF=${TEMPLATECONF:-meta-poky/conf}
diff --git a/yocto-poky/README b/yocto-poky/README
index 2449309..9a52677 100644
--- a/yocto-poky/README
+++ b/yocto-poky/README
@@ -42,7 +42,7 @@
     Git repository: http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/
     Mailing list: yocto@yoctoproject.org
 
-meta-yocto(-bsp):
+meta-poky, meta-yocto-bsp:
     Git repository: http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto(-bsp)
     Mailing list: poky@yoctoproject.org
 
diff --git a/yocto-poky/bitbake/LICENSE b/yocto-poky/bitbake/LICENSE
index 350140c..a57f9a4 100644
--- a/yocto-poky/bitbake/LICENSE
+++ b/yocto-poky/bitbake/LICENSE
@@ -8,3 +8,5 @@
 * Twitter Bootstrap (including Glyphicons), redistributed under the Apache License 2.0.
 
 * jQuery is redistributed under the MIT license.
+
+* QUnit is redistributed under the MIT license.
diff --git a/yocto-poky/bitbake/bin/bitbake b/yocto-poky/bitbake/bin/bitbake
index 981b2c0..b03683e 100755
--- a/yocto-poky/bitbake/bin/bitbake
+++ b/yocto-poky/bitbake/bin/bitbake
@@ -35,7 +35,7 @@
 from bb import cookerdata
 from bb.main import bitbake_main, BitBakeConfigParameters, BBMainException
 
-__version__ = "1.28.0"
+__version__ = "1.30.0"
 
 if __name__ == "__main__":
     if __version__ != bb.__version__:
diff --git a/yocto-poky/bitbake/bin/bitbake-layers b/yocto-poky/bitbake/bin/bitbake-layers
index fb13044..d47a669 100755
--- a/yocto-poky/bitbake/bin/bitbake-layers
+++ b/yocto-poky/bitbake/bin/bitbake-layers
@@ -1068,5 +1068,5 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
diff --git a/yocto-poky/bitbake/bin/bitbake-prserv b/yocto-poky/bitbake/bin/bitbake-prserv
index a8d7acb..0382144 100755
--- a/yocto-poky/bitbake/bin/bitbake-prserv
+++ b/yocto-poky/bitbake/bin/bitbake-prserv
@@ -50,6 +50,6 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
 
diff --git a/yocto-poky/bitbake/bin/bitbake-worker b/yocto-poky/bitbake/bin/bitbake-worker
index 3390f63..767a1c0 100755
--- a/yocto-poky/bitbake/bin/bitbake-worker
+++ b/yocto-poky/bitbake/bin/bitbake-worker
@@ -18,7 +18,7 @@
     sys.exit(1)
 
 profiling = False
-if sys.argv[1] == "decafbadbad":
+if sys.argv[1].startswith("decafbadbad"):
     profiling = True
     try:
         import cProfile as profile
@@ -202,6 +202,8 @@
                 the_data = bb.cache.Cache.loadDataFull(fn, appends, data)
                 the_data.setVar('BB_TASKHASH', workerdata["runq_hash"][task])
 
+                bb.utils.set_process_name("%s:%s" % (the_data.getVar("PN", True), taskname.replace("do_", "")))
+
                 # exported_vars() returns a generator which *cannot* be passed to os.environ.update() 
                 # successfully. We also need to unset anything from the environment which shouldn't be there 
                 exports = bb.data.exported_vars(the_data)
@@ -296,12 +298,16 @@
         signal.signal(signal.SIGTERM, self.sigterm_exception)
         # Let SIGHUP exit as SIGTERM
         signal.signal(signal.SIGHUP, self.sigterm_exception)
+        if "beef" in sys.argv[1]:
+            bb.utils.set_process_name("Worker (Fakeroot)")
+        else:
+            bb.utils.set_process_name("Worker")
 
     def sigterm_exception(self, signum, stackframe):
         if signum == signal.SIGTERM:
-            bb.warn("Worker recieved SIGTERM, shutting down...")
+            bb.warn("Worker received SIGTERM, shutting down...")
         elif signum == signal.SIGHUP:
-            bb.warn("Worker recieved SIGHUP, shutting down...")
+            bb.warn("Worker received SIGHUP, shutting down...")
         self.handle_finishnow(None)
         signal.signal(signal.SIGTERM, signal.SIG_DFL)
         os.kill(os.getpid(), signal.SIGTERM)
diff --git a/yocto-poky/bitbake/bin/bitdoc b/yocto-poky/bitbake/bin/bitdoc
index 576d88b..defb3dd 100755
--- a/yocto-poky/bitbake/bin/bitdoc
+++ b/yocto-poky/bitbake/bin/bitdoc
@@ -462,7 +462,7 @@
     state_group = 2
 
     for key in bb.data.keys(documentation):
-        data   = documentation.getVarFlag(key, "doc")
+        data   = documentation.getVarFlag(key, "doc", False)
         if not data:
             continue
 
diff --git a/yocto-poky/bitbake/bin/image-writer b/yocto-poky/bitbake/bin/image-writer
index 7d71167..e30ab45 100755
--- a/yocto-poky/bitbake/bin/image-writer
+++ b/yocto-poky/bitbake/bin/image-writer
@@ -119,4 +119,4 @@
         gtk.main()
     except Exception:
         import traceback
-        traceback.print_exc(3)
+        traceback.print_exc()
diff --git a/yocto-poky/bitbake/bin/toaster b/yocto-poky/bitbake/bin/toaster
index 2c3432c..70c66d2 100755
--- a/yocto-poky/bitbake/bin/toaster
+++ b/yocto-poky/bitbake/bin/toaster
@@ -1,5 +1,8 @@
-#!/bin/sh
-# (c) 2013 Intel Corp.
+#!/bin/echo ERROR: This script needs to be sourced. Please run as .
+
+# toaster - shell script to start Toaster
+
+# Copyright (C) 2013-2015 Intel Corp.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -12,32 +15,24 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+# along with this program. If not, see http://www.gnu.org/licenses/.
 
-
-# This script can be run in two modes.
-
-# When used with "source", from a build directory,
-# it enables toaster event logging and starts the bitbake resident server.
-# use as:  source toaster [start|stop] [noweb] [noui]
-
-# When it is called as a stand-alone script, it starts just the
-# web server, and the building shall be done through the web interface.
-# As script, it will not return to the command prompt. Stop with Ctrl-C.
+# Usage: source toaster [start|stop]
+#                       [webport=<port>] [noui] [noweb]
 
 # Helper function to kill a background toaster development server
 
 webserverKillAll()
 {
     local pidfile
-    for pidfile in ${BUILDDIR}/.toastermain.pid; do
+    for pidfile in ${BUILDDIR}/.toastermain.pid ${BUILDDIR}/.runbuilds.pid; do
         if [ -f ${pidfile} ]; then
             pid=`cat ${pidfile}`
             while kill -0 $pid 2>/dev/null; do
                 kill -SIGTERM -$pid 2>/dev/null
                 sleep 1
-                # Kill processes if they are still running - may happen in interactive shells
+                # Kill processes if they are still running - may happen
+                # in interactive shells
                 ps fux | grep "python.*manage.py runserver" | awk '{print $2}' | xargs kill
             done
             rm  ${pidfile}
@@ -55,35 +50,15 @@
 
     retval=0
     # you can always add a superuser later via
-    # python bitbake/lib/toaster/manage.py python manage.py createsuperuser --username=<ME>
-    python $BBBASEDIR/lib/toaster/manage.py syncdb --noinput || retval=1
-
-    python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=2
+    # ../bitbake/lib/toaster/manage.py createsuperuser --username=<ME>
+    $MANAGE migrate --noinput || retval=1
 
     if [ $retval -eq 1 ]; then
-        echo "Failed db sync, aborting system start" 1>&2
+        echo "Failed migrations, aborting system start" 1>&2
         return $retval
     fi
 
-    python $BBBASEDIR/lib/toaster/manage.py migrate orm || retval=1
-
-    if [ $retval -eq 1 ]; then
-        printf "\nError on orm migration, rolling back...\n"
-        python $BBBASEDIR/lib/toaster/manage.py migrate orm 0001_initial --fake
-        return $retval
-    fi
-
-    python $BBBASEDIR/lib/toaster/manage.py migrate bldcontrol || retval=1
-
-    if [ $retval -eq 1 ]; then
-        printf "\nError on bldcontrol migration, rolling back...\n"
-        python $BBBASEDIR/lib/toaster/manage.py migrate bldcontrol 0001_initial --fake
-        return $retval
-    fi
-
-    if [ "$TOASTER_MANAGED" = '1' ]; then
-        python $BBBASEDIR/lib/toaster/manage.py checksettings --traceback || retval=1
-    fi
+    $MANAGE checksettings --traceback || retval=1
 
     if [ $retval -eq 1 ]; then
         printf "\nError while checking settings; aborting\n"
@@ -92,7 +67,9 @@
 
     echo "Starting webserver..."
 
-    python $BBBASEDIR/lib/toaster/manage.py runserver "0.0.0.0:$WEB_PORT" </dev/null >>${BUILDDIR}/toaster_web.log 2>&1 & echo $! >${BUILDDIR}/.toastermain.pid
+    $MANAGE runserver "0.0.0.0:$WEB_PORT" \
+           </dev/null >>${BUILDDIR}/toaster_web.log 2>&1 \
+           & echo $! >${BUILDDIR}/.toastermain.pid
 
     sleep 1
 
@@ -106,16 +83,6 @@
     return $retval
 }
 
-# Helper functions to add a special configuration file
-
-addtoConfiguration()
-{
-    file=$1
-    shift
-    echo "#Created by toaster start script" > ${BUILDDIR}/conf/$file
-    for var in "$@"; do echo $var >> ${BUILDDIR}/conf/$file; done
-}
-
 INSTOPSYSTEM=0
 
 # define the stop command
@@ -128,45 +95,34 @@
         kill `cat ${BUILDDIR}/.toasterui.pid` 2>/dev/null
         rm ${BUILDDIR}/.toasterui.pid
     fi
-    BBSERVER=0.0.0.0:-1 bitbake -m
-    unset BBSERVER
     webserverKillAll
-    # force stop any misbehaving bitbake server
-    lsof bitbake.lock | awk '{print $2}' | grep "[0-9]\+" | xargs -n1 -r kill
+    # unset exported variables
+    unset DATABASE_URL
+    unset TOASTER_CONF
+    unset TOASTER_DIR
+    unset BITBAKE_UI
+    unset BBBASEDIR
     trap - SIGHUP
     #trap - SIGCHLD
     INSTOPSYSTEM=0
 }
 
-check_pidbyfile() {
-    [ -e $1 ] && kill -0 `cat $1` 2>/dev/null
-}
-
-
-notify_chldexit() {
-    if [ $NOTOASTERUI -eq 0 ]; then
-        check_pidbyfile ${BUILDDIR}/.toasterui.pid && return
-        stop_system
-    fi
-}
-
-
 verify_prereq() {
-    # Verify prerequisites
-
-    if ! echo "import django; print (1,) == django.VERSION[0:1] and django.VERSION[1:2][0] in (6,)" | python 2>/dev/null | grep True >/dev/null; then
-        printf "This program needs Django 1.6. Please install with\n\npip install django==1.6\n"
+    # Verify Django version
+    reqfile=$(python -c "import os; print os.path.realpath('$BBBASEDIR/toaster-requirements.txt')")
+    exp='s/Django\([><=]\+\)\([^,]\+\),\([><=]\+\)\(.\+\)/'
+    exp=$exp'import sys,django;version=django.get_version().split(".");'
+    exp=$exp'sys.exit(not (version \1 "\2".split(".") and version \3 "\4".split(".")))/p'
+    if ! sed -n "$exp" $reqfile | python - ; then
+        req=`grep ^Django $reqfile`
+        echo "This program needs $req"
+        echo "Please install with pip install -r $reqfile"
         return 2
     fi
 
-    if ! echo "import south; print reduce(lambda x, y: 2 if x==2 else 0 if x == 0 else y, map(lambda x: 1+cmp(x[1]-x[0],0), zip([0,8,4], map(int,south.__version__.split(\".\"))))) > 0" | python 2>/dev/null | grep True >/dev/null; then
-        printf "This program needs South 0.8.4. Please install with\n\npip install south==0.8.4\n"
-        return 2
-    fi
     return 0
 }
 
-
 # read command line parameters
 if [ -n "$BASH_SOURCE" ] ; then
     TOASTER=${BASH_SOURCE}
@@ -176,33 +132,42 @@
     TOASTER=$0
 fi
 
-[ `basename \"$0\"` = `basename \"${TOASTER}\"` ] && TOASTER_MANAGED=1
+export BBBASEDIR=`dirname $TOASTER`/..
+MANAGE=$BBBASEDIR/lib/toaster/manage.py
+OEROOT=`dirname $TOASTER`/../..
 
-BBBASEDIR=`dirname $TOASTER`/..
-
-RUNNING=0
-
-NOTOASTERUI=0
-WEBSERVER=1
-TOASTER_BRBE=""
-if [ "$WEB_PORT" = "" ]; then
-    WEB_PORT="8000"
-fi
 # this is the configuraton file we are using for toaster
-# note default is assuming yocto. Override this if you are
-# running in a pure OE environment and use the toasterconf.json
-# in meta/conf/toasterconf.json
-# note: for future there are a number of relative path assumptions
-# in the local layers that currently prevent using an arbitrary
-# toasterconf.json
+# we are using the same logic that oe-setup-builddir uses
+# (based on TEMPLATECONF and .templateconf) to determine
+# which toasterconf.json to use.
+# note: There are a number of relative path assumptions
+# in the local layers that currently make using an arbitrary
+# toasterconf.json difficult.
+
+. $OEROOT/.templateconf
+if [ -n "$TEMPLATECONF" ]; then
+    if [ ! -d "$TEMPLATECONF" ]; then
+        # Allow TEMPLATECONF=meta-xyz/conf as a shortcut
+        if [ -d "$OEROOT/$TEMPLATECONF" ]; then
+            TEMPLATECONF="$OEROOT/$TEMPLATECONF"
+        fi
+        if [ ! -d "$TEMPLATECONF" ]; then
+            echo >&2 "Error: '$TEMPLATECONF' must be a directory containing toasterconf.json"
+            return 1
+        fi
+    fi
+fi
+
 if [ "$TOASTER_CONF" = "" ]; then
-    TOASTER_CONF="$(dirname $TOASTER)/../../meta-yocto/conf/toasterconf.json"
+    TOASTER_CONF="$TEMPLATECONF/toasterconf.json"
     export TOASTER_CONF=$(python -c "import os; print os.path.realpath('$TOASTER_CONF')")
 fi
+
 if [ ! -f $TOASTER_CONF ]; then
-    echo "$TOASTER_CONF configuration file not found. set TOASTER_CONF to specify a path"
-    [ "$TOASTER_MANAGED" = '1' ] && exit 1 || return 1
+    echo "$TOASTER_CONF configuration file not found. Set TOASTER_CONF to specify file or fix .templateconf"
+    return 1
 fi
+
 # this defines the dir toaster will use for
 # 1) clones of layers (in _toaster_clones )
 # 2) the build dir (in build)
@@ -212,102 +177,31 @@
 # make sure that the toaster.sqlite file doesn't default to `pwd` like it currently does.
 export TOASTER_DIR=`pwd`
 
-
-NOBROWSER=0
-
+WEBSERVER=1
+WEB_PORT="8000"
+unset CMD
 for param in $*; do
     case $param in
-    noui )
-            NOTOASTERUI=1
-    ;;
     noweb )
             WEBSERVER=0
     ;;
-    nobrowser )
-            NOBROWSER=1
+    start )
+            CMD=$param
     ;;
-    brbe=* )
-            TOASTER_BRBE=$'\n'"TOASTER_BRBE=\""${param#*=}"\""
+    stop )
+            CMD=$param
     ;;
     webport=*)
             WEB_PORT="${param#*=}"
     esac
 done
 
-if [ "$TOASTER_MANAGED" = '1' ]; then
-    # We are called as standalone. We refuse to run in a build environment - we need the interactive mode for that.
-    # Start just the web server, point the web browser to the interface, and start any Django services.
-
-    if ! verify_prereq; then
-        echo "Error: Could not verify that the needed dependencies are installed. Please use virtualenv and pip to install dependencies listed in toaster-requirements.txt" 1>&2
-        exit 1
-    fi
-
-    if [ -n "$BUILDDIR" ]; then
-        printf "Error: It looks like you sourced oe-init-build-env. Toaster cannot start in build mode from an oe-core build environment.\n You should be starting Toaster from a new terminal window.\n" 1>&2
-        exit 1
-    fi
-
-    # Define a fake builddir where only the pid files are actually created. No real builds will take place here.
-    BUILDDIR=/tmp/toaster_$$
-    if [ -d "$BUILDDIR" ]; then
-        echo "Previous toaster run directory $BUILDDIR found, cowardly refusing to start. Please remove the directory when that toaster instance is over" 2>&1
-        exit 1
-    fi
-
-    mkdir -p "$BUILDDIR"
-
-    RUNNING=1
-    trap_ctrlc() {
-        echo "** Stopping system"
-        webserverKillAll
-        RUNNING=0
-    }
-
-    do_cleanup() {
-        find "$BUILDDIR" -type f | xargs rm
-        rmdir "$BUILDDIR"
-    }
-    cleanup() {
-        if grep -ir error "$BUILDDIR" >/dev/null; then
-            if grep -irn "That port is already in use" "$BUILDDIR"; then
-                echo "You can use the \"webport=PORTNUMBER\" parameter to start Toaster on a different port (port $WEB_PORT is already in use)"
-                do_cleanup
-            else
-                printf "\nErrors found in the Toaster log files present in '$BUILDDIR'. Directory will not be cleaned.\n Please review the errors and notify toaster@yoctoproject.org or submit a bug https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Toaster"
-            fi
-        else
-            echo "No errors found, removing the run directory '$BUILDDIR'"
-            do_cleanup
-        fi
-    }
-    export TOASTER_MANAGED=1
-    if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
-        echo "Failed to start the web server, stopping" 1>&2
-        cleanup
-        exit 1
-    fi
-    if [ $WEBSERVER -gt 0 ] && [ $NOBROWSER -eq 0 ]  ; then
-        echo "Starting browser..."
-        xdg-open http://127.0.0.1:$WEB_PORT/ >/dev/null 2>&1 &
-    fi
-    trap trap_ctrlc 2
-    echo "Toaster is now running. You can stop it with Ctrl-C"
-    while [ $RUNNING -gt 0 ]; do
-        python $BBBASEDIR/lib/toaster/manage.py runbuilds 2>&1 | tee -a "$BUILDDIR/toaster.log"
-        sleep 1
-    done
-    cleanup
-    echo "**** Exit"
-    exit 0
-fi
-
-
-if ! verify_prereq; then
-    echo "Error: Could not verify that the needed dependencies are installed. Please use virtualenv and pip to install dependencies listed in toaster-requirements.txt" 1>&2
+if [ `basename \"$0\"` = `basename \"${TOASTER}\"` ]; then
+    echo "Error: This script needs to be sourced. Please run as . $TOASTER"
     return 1
 fi
 
+verify_prereq || return 1
 
 # We make sure we're running in the current shell and in a good environment
 if [ -z "$BUILDDIR" ] ||  ! which bitbake >/dev/null 2>&1 ; then
@@ -315,11 +209,23 @@
     return 2
 fi
 
+# this defines the dir toaster will use for
+# 1) clones of layers (in _toaster_clones )
+# 2) the build dir (in build)
+# 3) the sqlite db if that is being used.
+# 4) pid's we need to clean up on exit/shutdown
+# note: for future. in order to make this an arbitrary directory, we need to
+# make sure that the toaster.sqlite file doesn't default to `pwd`
+# like it currently does.
+export TOASTER_DIR=`dirname $BUILDDIR`
 
 # Determine the action. If specified by arguments, fine, if not, toggle it
-if [ "$1" = 'start' ] || [ "$1" = 'stop' ]; then
-    CMD="$1"
-else
+if [ "$CMD" = "start" ] ; then
+    if [ -n "$BBSERVER" ]; then
+	echo " Toaster is already running. Exiting..."
+	return 1
+fi
+elif [ "$CMD" = "" ]; then
     if [ -z "$BBSERVER" ]; then
         CMD="start"
     else
@@ -329,70 +235,42 @@
 
 echo "The system will $CMD."
 
-# Make sure it's safe to run by checking bitbake lock
-
-lock=1
-if [ -e $BUILDDIR/bitbake.lock ]; then
-    python -c "import fcntl; fcntl.flock(open(\"$BUILDDIR/bitbake.lock\"), fcntl.LOCK_EX|fcntl.LOCK_NB)" 2>/dev/null || lock=0
-fi
-
-if [ ${CMD} = 'start' ] && [ $lock -eq 0 ]; then
-    echo "Error: bitbake lock state error. File locks show that the system is on." 1>&2
-    echo "Please wait for the current build to finish, stop and then start the system again." 1>&2
-    return 3
-fi
-
-if [ ${CMD} = 'start' ] && [ -e $BUILDDIR/.toastermain.pid ] && kill -0 `cat $BUILDDIR/.toastermain.pid`; then
-    echo "Warning: bitbake appears to be dead, but the Toaster web server is running. Something fishy is going on." 1>&2
-    echo "Cleaning up the web server to start from a clean slate."
-    webserverKillAll
-fi
-
-
 # Execute the commands
 
 case $CMD in
     start )
-        start_success=1
-        addtoConfiguration toaster.conf "INHERIT+=\"toaster buildhistory\"" $TOASTER_BRBE
+        # check if addr:port is not in use
+        if [ "$CMD" == 'start' ]; then
+             $MANAGE checksocket "0.0.0.0:$WEB_PORT" || return 1
+        fi
+
+        # kill Toaster web server if it's alive
+        if [ -e $BUILDDIR/.toastermain.pid ] && kill -0 `cat $BUILDDIR/.toastermain.pid`; then
+            echo "Warning: bitbake appears to be dead, but the Toaster web server is running." 1>&2
+            echo " Something fishy is going on." 1>&2
+            echo "Cleaning up the web server to start from a clean slate."
+            webserverKillAll
+        fi
+
+        # Create configuration file
+        conf=${BUILDDIR}/conf/local.conf
+        line='INHERIT+="toaster buildhistory"'
+        grep -q "$line" $conf || echo $line >> $conf
+
         if [ $WEBSERVER -gt 0 ] && ! webserverStartAll; then
             echo "Failed ${CMD}."
             return 4
         fi
-        unset BBSERVER
-        PREREAD=""
-        if [ -e ${BUILDDIR}/conf/toaster-pre.conf ]; then
-            rm ${BUILDDIR}/conf/toaster-pre.conf
-        fi
-        bitbake $PREREAD --postread conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0
-        if [ $? -ne 0 ]; then
-            start_success=0
-            echo "Bitbake server start failed"
-        else
-            export BBSERVER=0.0.0.0:-1
-            if [ $NOTOASTERUI -eq 0 ]; then        # we start the TOASTERUI only if not inhibited
-                bitbake --observe-only -u toasterui >>${BUILDDIR}/toaster_ui.log 2>&1 & echo $! >${BUILDDIR}/.toasterui.pid
-            fi
-        fi
-        if [ $start_success -eq 1 ]; then
-            # set fail safe stop system on terminal exit
-            trap stop_system SIGHUP
-            echo "Successful ${CMD}."
-            return 0
-        else
-            # failed start, do stop
-            stop_system
-            echo "Failed ${CMD}."
-            return 1
-        fi
-        # stop system on terminal exit
-        set -o monitor
+        export BITBAKE_UI='toasterui'
+        export DATABASE_URL=`$MANAGE get-dburl`
+        $MANAGE runbuilds & echo $! >${BUILDDIR}/.runbuilds.pid
+        # set fail safe stop system on terminal exit
         trap stop_system SIGHUP
-        #trap notify_chldexit SIGCHLD
+        echo "Successful ${CMD}."
+        return 0
     ;;
     stop )
         stop_system
         echo "Successful ${CMD}."
     ;;
 esac
-
diff --git a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
index fa52e29..b1b72e0 100644
--- a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
+++ b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-execution.xml
@@ -42,9 +42,9 @@
                 <literallayout class='monospaced'>
      $ grep processor /proc/cpuinfo
                 </literallayout>
-                This command returns the number of processors, which takes into 
-                account hyper-threading. 
-                Thus, a quad-core build host with hyper-threading most likely 
+                This command returns the number of processors, which takes into
+                account hyper-threading.
+                Thus, a quad-core build host with hyper-threading most likely
                 shows eight processors, which is the value you would then assign to
                 <filename>BB_NUMBER_THREADS</filename>.
             </para>
@@ -116,16 +116,35 @@
             Prior to parsing configuration files, Bitbake looks
             at certain variables, including:
             <itemizedlist>
-                <listitem><para><link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</filename></link></para></listitem>
-                <listitem><para><link linkend='var-BB_PRESERVE_ENV'><filename>BB_PRESERVE_ENV</filename></link></para></listitem>
-                <listitem><para><link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link></para></listitem>
+                <listitem><para>
+                    <link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</filename></link>
+                    </para></listitem>
+                <listitem><para>
+                    <link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link>
+                    </para></listitem>
+                <listitem><para>
+                    <link linkend='var-BB_PRESERVE_ENV'><filename>BB_PRESERVE_ENV</filename></link>
+                    </para></listitem>
+                <listitem><para>
+                    <link linkend='var-BB_ORIGENV'><filename>BB_ORIGENV</filename></link>
+                    </para></listitem>
                 <listitem><para>
                     <link linkend='var-BITBAKE_UI'><filename>BITBAKE_UI</filename></link>
                     </para></listitem>
             </itemizedlist>
-            You can find information on how to pass environment variables into the BitBake
-            execution environment in the
-            "<link linkend='passing-information-into-the-build-task-environment'>Passing Information Into the Build Task Environment</link>" section.
+            The first four variables in this list relate to how BitBake treats shell
+            environment variables during task execution.
+            By default, BitBake cleans the environment variables and provides tight
+            control over the shell execution environment.
+            However, through the use of these first four variables, you can
+            apply your control regarding the
+            environment variables allowed to be used by BitBake in the shell
+            during execution of tasks.
+            See the
+            "<link linkend='passing-information-into-the-build-task-environment'>Passing Information Into the Build Task Environment</link>"
+            section and the information about these variables in the
+            variable glossary for more information on how they work and
+            on how to use them.
         </para>
 
         <para>
diff --git a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml
index f3628cf..f6d82b4 100644
--- a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml
+++ b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-hello.xml
@@ -47,7 +47,6 @@
      -rw-rw-r--. 1 wmat wmat   849 Nov 26 04:55 HEADER
      drwxrwxr-x. 5 wmat wmat  4096 Jan 31 13:44 lib
      -rw-rw-r--. 1 wmat wmat   195 Nov 26 04:55 MANIFEST.in
-     -rwxrwxr-x. 1 wmat wmat  3195 Jan 31 11:57 setup.py
      -rw-rw-r--. 1 wmat wmat  2887 Nov 26 04:55 TODO
             </literallayout>
         </para>
diff --git a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml
index 2188655..7a37edd 100644
--- a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml
+++ b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-intro.xml
@@ -471,7 +471,7 @@
                 Following is the usage and syntax for BitBake:
                 <literallayout class='monospaced'>
      $ bitbake -h
-     Usage: bitbake [options] [recipename/target ...]
+     Usage: bitbake [options] [recipename/target recipe:do_task ...]
 
          Executes the specified task (default is 'build') for a given set of target recipes (.bb files).
          It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which
@@ -529,9 +529,11 @@
        -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
                              Show debug logging for the specified logging domains
        -P, --profile         Profile the command and save reports.
-       -u UI, --ui=UI        The user interface to use (e.g. knotty, hob, depexp).
+       -u UI, --ui=UI        The user interface to use (depexp, goggle, hob, knotty
+                             or ncurses - default knotty).
        -t SERVERTYPE, --servertype=SERVERTYPE
-                             Choose which server to use, process or xmlrpc.
+                             Choose which server type to use (process or xmlrpc -
+                             default process).
        --token=XMLRPCTOKEN   Specify the connection token to be used when
                              connecting to a remote server.
        --revisions-changed   Set the exit code depending on whether upstream
@@ -546,6 +548,10 @@
        -m, --kill-server     Terminate the remote server.
        --observe-only        Connect to a server as an observing-only client.
        --status-only         Check the status of the remote bitbake server.
+       -w WRITEEVENTLOG, --write-log=WRITEEVENTLOG
+                             Writes the event log of the build to a bitbake event
+                             json file. Use '' (empty string) to assign the name
+                             automatically.
                 </literallayout>
             </para>
         </section>
diff --git a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
index 1b9d800..6329cd6 100644
--- a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
+++ b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml
@@ -379,6 +379,12 @@
                 You can use <filename>OVERRIDES</filename> to conditionally select
                 a specific version of a variable and to conditionally
                 append or prepend the value of a variable.
+                <note>
+                    Overrides can only use lower-case characters.
+                    Additionally, underscores are not permitted in override names
+                    as they are used to separate overrides from each other and
+                    from the variable name.
+                </note>
                 <itemizedlist>
                     <listitem><para><emphasis>Selecting a Variable:</emphasis>
                         The <filename>OVERRIDES</filename> variable is
@@ -603,8 +609,13 @@
                 BitBake uses the
                 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
                 variable to locate needed include and class files.
-                The <filename>BBPATH</filename> variable is analogous to
-                the environment variable <filename>PATH</filename>.
+                Additionally, BitBake searches the current directory for
+                <filename>include</filename> and <filename>require</filename>
+                directives.
+                <note>
+                    The <filename>BBPATH</filename> variable is analogous to
+                    the environment variable <filename>PATH</filename>.
+                </note>
             </para>
 
             <para>
@@ -652,6 +663,51 @@
                     after the "inherit" statement.
                 </note>
             </para>
+
+            <para>
+                If necessary, it is possible to inherit a class
+                conditionally by using
+                a variable expression after the <filename>inherit</filename>
+                statement.
+                Here is an example:
+                <literallayout class='monospaced'>
+     inherit ${VARNAME}
+                </literallayout>
+                If <filename>VARNAME</filename> is going to be set, it needs
+                to be set before the <filename>inherit</filename> statement
+                is parsed.
+                One way to achieve a conditional inherit in this case is to use
+                overrides:
+                <literallayout class='monospaced'>
+     VARIABLE = ""
+     VARIABLE_someoverride = "myclass"
+                </literallayout>
+            </para>
+
+            <para>
+                Another method is by using anonymous Python.
+                Here is an example:
+                <literallayout class='monospaced'>
+     python () {
+         if condition == value:
+             d.setVar('VARIABLE', 'myclass')
+         else:
+             d.setVar('VARIABLE', '')
+     }
+                </literallayout>
+            </para>
+
+            <para>
+                Alternatively, you could use an in-line Python expression
+                in the following form:
+                <literallayout class='monospaced'>
+     inherit ${@'classname' if condition else ''}
+     inherit ${@functionname(params)}
+                </literallayout>
+                In all cases, if the expression evaluates to an empty
+                string, the statement does not trigger a syntax error
+                because it becomes a no-op.
+            </para>
         </section>
 
         <section id='include-directive'>
@@ -759,6 +815,16 @@
                     <filename>INHERIT</filename> to inherit a class effectively
                     inherits the class globally (i.e. for all recipes).
                 </note>
+                If you want to use the directive to inherit
+                multiple classes, you can provide them on the same line in the
+                <filename>local.conf</filename> file.
+                Use spaces to separate the classes.
+                The following example shows how to inherit both the
+                <filename>autotools</filename> and <filename>pkgconfig</filename>
+                classes:
+                <literallayout class='monospaced'>
+     inherit autotools pkgconfig
+                </literallayout>
             </para>
         </section>
     </section>
@@ -840,6 +906,18 @@
                 is a global variable and is always automatically
                 available.
            </para>
+
+           <note>
+                Variable expressions (e.g. <filename>${X}</filename>) are no
+                longer expanded within Python functions.
+                This behavior is intentional in order to allow you to freely
+                set variable values to expandable expressions without having
+                them expanded prematurely.
+                If you do wish to expand a variable within a Python function,
+                use <filename>d.getVar("X", True)</filename>.
+                Or, for more complicated expressions, use
+                <filename>d.expand()</filename>.
+           </note>
         </section>
 
         <section id='python-functions'>
@@ -1107,10 +1185,18 @@
             <title>Passing Information Into the Build Task Environment</title>
 
             <para>
-                When running a task, BitBake tightly controls the execution
+                When running a task, BitBake tightly controls the shell execution
                 environment of the build tasks to make
                 sure unwanted contamination from the build machine cannot
                 influence the build.
+                <note>
+                    By default, BitBake cleans the environment to include only those
+                    things exported or listed in its whitelist to ensure that the build
+                    environment is reproducible and consistent.
+                    You can prevent this "cleaning" by setting the
+                    <link linkend='var-BB_PRESERVE_ENV'><filename>BB_PRESERVE_ENV</filename></link>
+                    variable.
+                </note>
                 Consequently, if you do want something to get passed into the
                 build task environment, you must take these two steps:
                 <orderedlist>
@@ -1118,14 +1204,16 @@
                         Tell BitBake to load what you want from the environment
                         into the datastore.
                         You can do so through the
+                        <link linkend='var-BB_ENV_WHITELIST'><filename>BB_ENV_WHITELIST</filename></link>
+                        and
                         <link linkend='var-BB_ENV_EXTRAWHITE'><filename>BB_ENV_EXTRAWHITE</filename></link>
-                        variable.
+                        variables.
                         For example, assume you want to prevent the build system from
                         accessing your <filename>$HOME/.ccache</filename>
                         directory.
-                        The following command tells BitBake to load
-                        <filename>CCACHE_DIR</filename> from the environment into
-                        the datastore:
+                        The following command "whitelists" the environment variable
+                        <filename>CCACHE_DIR</filename> causing BitBack to allow that
+                        variable into the datastore:
                         <literallayout class='monospaced'>
      export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
                         </literallayout></para></listitem>
@@ -1174,12 +1262,6 @@
                 The previous example returns <filename>BAR</filename> from the original
                 execution environment.
             </para>
-
-            <para>
-                By default, BitBake cleans the environment to include only those
-                things exported or listed in its whitelist to ensure that the build
-                environment is reproducible and consistent.
-            </para>
         </section>
     </section>
 
@@ -1234,6 +1316,8 @@
                     </para></listitem>
                 <listitem><para><emphasis>dirs:</emphasis>
                     Directories that should be created before the task runs.
+                    The last directory listed will be used as the work directory
+                    for the task.
                     </para></listitem>
                 <listitem><para><emphasis>lockfiles:</emphasis>
                      Specifies one or more lockfiles to lock while the task
@@ -1765,6 +1849,10 @@
                             <entry align="left"><filename>d.delVarFlags("X")</filename></entry>
                             <entry align="left">Deletes all the flags for the variable "X".</entry>
                         </row>
+                        <row>
+                            <entry align="left"><filename>d.expand(expression)</filename></entry>
+                            <entry align="left">Expands variable references in the specified string expression.</entry>
+                        </row>
                     </tbody>
                 </tgroup>
             </informaltable>
diff --git a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml
index e5aeffc..ae7e4ce 100644
--- a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml
+++ b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.xml
@@ -1142,14 +1142,14 @@
                     to "hide" these <filename>.bb</filename> and
                     <filename>.bbappend</filename> files.
                     BitBake ignores any recipe or recipe append files that
-                    match the expression.
+                    match any of the expressions.
                     It is as if BitBake does not see them at all.
                     Consequently, matching files are not parsed or otherwise
                     used by BitBake.</para>
                 <para>
-                    The value you provide is passed to Python's regular
+                    The values you provide are passed to Python's regular
                     expression compiler.
-                    The expression is compared against the full paths to
+                    The expressions are compared against the full paths to
                     the files.
                     For complete syntax information, see Python's
                     documentation at
@@ -1165,18 +1165,16 @@
      BBMASK = "meta-ti/recipes-misc/"
                     </literallayout>
                     If you want to mask out multiple directories or recipes,
-                    use the vertical bar to separate the regular expression
-                    fragments.
+                    you can specify multiple regular expression fragments.
                     This next example masks out multiple directories and
                     individual recipes:
                     <literallayout class='monospaced'>
-     BBMASK = "meta-ti/recipes-misc/|meta-ti/recipes-ti/packagegroup/"
-     BBMASK .= "|.*meta-oe/recipes-support/"
-     BBMASK .= "|.*openldap"
-     BBMASK .= "|.*opencv"
-     BBMASK .= "|.*lzma"
+     BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
+     BBMASK += "/meta-oe/recipes-support/"
+     BBMASK += "/meta-foo/.*/openldap"
+     BBMASK += "opencv.*\.bbappend"
+     BBMASK += "lzma"
                     </literallayout>
-                    Notice how the vertical bar is used to append the fragments.
                     <note>
                         When specifying a directory name, use the trailing
                         slash character to ensure you match just that directory
diff --git a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml
index 7fff933..4aef4e7 100644
--- a/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml
+++ b/yocto-poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual.xml
@@ -56,7 +56,7 @@
 -->
 
         <copyright>
-            <year>2004-2015</year>
+            <year>2004-2016</year>
             <holder>Richard Purdie</holder>
             <holder>Chris Larson</holder>
             <holder>and Phil Blundell</holder>
diff --git a/yocto-poky/bitbake/lib/bb/__init__.py b/yocto-poky/bitbake/lib/bb/__init__.py
index ac62d26..502ad83 100644
--- a/yocto-poky/bitbake/lib/bb/__init__.py
+++ b/yocto-poky/bitbake/lib/bb/__init__.py
@@ -21,7 +21,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-__version__ = "1.28.0"
+__version__ = "1.30.0"
 
 import sys
 if sys.version_info < (2, 7, 3):
@@ -70,6 +70,8 @@
 logger.addHandler(NullHandler())
 logger.setLevel(logging.DEBUG - 2)
 
+mainlogger = logging.getLogger("BitBake.Main")
+
 # This has to be imported after the setLoggerClass, as the import of bb.msg
 # can result in construction of the various loggers.
 import bb.msg
@@ -79,26 +81,26 @@
 
 # Messaging convenience functions
 def plain(*args):
-    logger.plain(''.join(args))
+    mainlogger.plain(''.join(args))
 
 def debug(lvl, *args):
     if isinstance(lvl, basestring):
-        logger.warn("Passed invalid debug level '%s' to bb.debug", lvl)
+        mainlogger.warn("Passed invalid debug level '%s' to bb.debug", lvl)
         args = (lvl,) + args
         lvl = 1
-    logger.debug(lvl, ''.join(args))
+    mainlogger.debug(lvl, ''.join(args))
 
 def note(*args):
-    logger.info(''.join(args))
+    mainlogger.info(''.join(args))
 
 def warn(*args):
-    logger.warn(''.join(args))
+    mainlogger.warn(''.join(args))
 
 def error(*args, **kwargs):
-    logger.error(''.join(args), extra=kwargs)
+    mainlogger.error(''.join(args), extra=kwargs)
 
 def fatal(*args, **kwargs):
-    logger.critical(''.join(args), extra=kwargs)
+    mainlogger.critical(''.join(args), extra=kwargs)
     raise BBHandledException()
 
 def deprecated(func, name=None, advice=""):
diff --git a/yocto-poky/bitbake/lib/bb/build.py b/yocto-poky/bitbake/lib/bb/build.py
index 22428a6..db5072c 100644
--- a/yocto-poky/bitbake/lib/bb/build.py
+++ b/yocto-poky/bitbake/lib/bb/build.py
@@ -156,7 +156,12 @@
     def flush(self):
         self.outfile.flush()
 
-def exec_func(func, d, dirs = None):
+#
+# pythonexception allows the python exceptions generated to be raised
+# as the real exceptions (not FuncFailed) and without a backtrace at the 
+# origin of the failure.
+#
+def exec_func(func, d, dirs = None, pythonexception=False):
     """Execute a BB 'function'"""
 
     body = d.getVar(func, False)
@@ -224,22 +229,18 @@
 
     with bb.utils.fileslocked(lockfiles):
         if ispython:
-            exec_func_python(func, d, runfile, cwd=adir)
+            exec_func_python(func, d, runfile, cwd=adir, pythonexception=pythonexception)
         else:
             exec_func_shell(func, d, runfile, cwd=adir)
 
 _functionfmt = """
-def {function}(d):
-{body}
-
 {function}(d)
 """
 logformatter = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
-def exec_func_python(func, d, runfile, cwd=None):
+def exec_func_python(func, d, runfile, cwd=None, pythonexception=False):
     """Execute a python BB 'function'"""
 
-    bbfile = d.getVar('FILE', True)
-    code = _functionfmt.format(function=func, body=d.getVar(func, True))
+    code = _functionfmt.format(function=func)
     bb.utils.mkdirhier(os.path.dirname(runfile))
     with open(runfile, 'w') as script:
         bb.data.emit_func_python(func, script, d)
@@ -254,11 +255,18 @@
     bb.debug(2, "Executing python function %s" % func)
 
     try:
-        comp = utils.better_compile(code, func, bbfile)
-        utils.better_exec(comp, {"d": d}, code, bbfile)
+        text = "def %s(d):\n%s" % (func, d.getVar(func, False))
+        fn = d.getVarFlag(func, "filename", False)
+        lineno = int(d.getVarFlag(func, "lineno", False))
+        bb.methodpool.insert_method(func, text, fn, lineno - 1)
+
+        comp = utils.better_compile(code, func, "exec_python_func() autogenerated")
+        utils.better_exec(comp, {"d": d}, code, "exec_python_func() autogenerated", pythonexception=pythonexception)
     except (bb.parse.SkipRecipe, bb.build.FuncFailed):
         raise
     except:
+        if pythonexception:
+            raise
         raise FuncFailed(func, None)
     finally:
         bb.debug(2, "Python function %s finished" % func)
@@ -277,9 +285,8 @@
     case $ret in
     0)  ;;
     *)  case $BASH_VERSION in
-        "")   echo "WARNING: exit code $ret from a shell command.";;
-        *)    echo "WARNING: ${BASH_SOURCE[0]}:${BASH_LINENO[0]} exit $ret from
-  \"$BASH_COMMAND\"";;
+        "") echo "WARNING: exit code $ret from a shell command.";;
+        *)  echo "WARNING: ${BASH_SOURCE[0]}:${BASH_LINENO[0]} exit $ret from '$BASH_COMMAND'";;
         esac
         exit $ret
     esac
@@ -319,7 +326,7 @@
     os.chmod(runfile, 0775)
 
     cmd = runfile
-    if d.getVarFlag(func, 'fakeroot'):
+    if d.getVarFlag(func, 'fakeroot', False):
         fakerootcmd = d.getVar('FAKEROOT', True)
         if fakerootcmd:
             cmd = [fakerootcmd, runfile]
@@ -394,7 +401,7 @@
     Execution of a task involves a bit more setup than executing a function,
     running it with its own local metadata, and with some useful variables set.
     """
-    if not d.getVarFlag(task, 'task'):
+    if not d.getVarFlag(task, 'task', False):
         event.fire(TaskInvalid(task, d), d)
         logger.error("No such task: %s" % task)
         return 1
@@ -533,7 +540,7 @@
             bb.utils.remove(loglink)
     event.fire(TaskSucceeded(task, logfn, localdata), localdata)
 
-    if not localdata.getVarFlag(task, 'nostamp') and not localdata.getVarFlag(task, 'selfstamp'):
+    if not localdata.getVarFlag(task, 'nostamp', False) and not localdata.getVarFlag(task, 'selfstamp', False):
         make_stamp(task, localdata)
 
     return 0
@@ -541,7 +548,7 @@
 def exec_task(fn, task, d, profile = False):
     try:
         quieterr = False
-        if d.getVarFlag(task, "quieterrors") is not None:
+        if d.getVarFlag(task, "quieterrors", False) is not None:
             quieterr = True
 
         if profile:
@@ -582,10 +589,10 @@
         taskflagname = taskname.replace("_setscene", "")
 
     if file_name:
-        stamp = d.stamp_base[file_name].get(taskflagname) or d.stamp[file_name]
+        stamp = d.stamp[file_name]
         extrainfo = d.stamp_extrainfo[file_name].get(taskflagname) or ""
     else:
-        stamp = d.getVarFlag(taskflagname, 'stamp-base', True) or d.getVar('STAMP', True)
+        stamp = d.getVar('STAMP', True)
         file_name = d.getVar('BB_FILENAME', True)
         extrainfo = d.getVarFlag(taskflagname, 'stamp-extra-info', True) or ""
 
@@ -616,10 +623,10 @@
         taskflagname = taskname.replace("_setscene", "")
 
     if file_name:
-        stamp = d.stamp_base_clean[file_name].get(taskflagname) or d.stampclean[file_name]
+        stamp = d.stampclean[file_name]
         extrainfo = d.stamp_extrainfo[file_name].get(taskflagname) or ""
     else:
-        stamp = d.getVarFlag(taskflagname, 'stamp-base-clean', True) or d.getVar('STAMPCLEAN', True)
+        stamp = d.getVar('STAMPCLEAN', True)
         file_name = d.getVar('BB_FILENAME', True)
         extrainfo = d.getVarFlag(taskflagname, 'stamp-extra-info', True) or ""
 
@@ -746,7 +753,7 @@
         bbtasks.append(task)
     d.setVar('__BBTASKS', bbtasks)
 
-    existing = d.getVarFlag(task, "deps") or []
+    existing = d.getVarFlag(task, "deps", False) or []
     if after is not None:
         # set up deps for function
         for entry in after.split():
@@ -756,7 +763,7 @@
     if before is not None:
         # set up things that depend on this func
         for entry in before.split():
-            existing = d.getVarFlag(entry, "deps") or []
+            existing = d.getVarFlag(entry, "deps", False) or []
             if task not in existing:
                 d.setVarFlag(entry, "deps", [task] + existing)
 
@@ -771,7 +778,7 @@
 
     d.delVarFlag(task, 'deps')
     for bbtask in d.getVar('__BBTASKS', False) or []:
-        deps = d.getVarFlag(bbtask, 'deps') or []
+        deps = d.getVarFlag(bbtask, 'deps', False) or []
         if task in deps:
             deps.remove(task)
             d.setVarFlag(bbtask, 'deps', deps)
diff --git a/yocto-poky/bitbake/lib/bb/cache.py b/yocto-poky/bitbake/lib/bb/cache.py
index ab09b08..af5b9fb 100644
--- a/yocto-poky/bitbake/lib/bb/cache.py
+++ b/yocto-poky/bitbake/lib/bb/cache.py
@@ -43,7 +43,7 @@
     logger.info("Importing cPickle failed. "
                 "Falling back to a very slow implementation.")
 
-__cache_version__ = "148"
+__cache_version__ = "149"
 
 def getCacheFile(path, filename, data_hash):
     return os.path.join(path, filename + "." + data_hash)
@@ -85,8 +85,8 @@
             return out_dict
 
     @classmethod
-    def getvar(cls, var, metadata):
-        return metadata.getVar(var, True) or ''
+    def getvar(cls, var, metadata, expand = True):
+        return metadata.getVar(var, expand) or ''
 
 
 class CoreRecipeInfo(RecipeInfoCommon):
@@ -99,7 +99,7 @@
         self.timestamp = bb.parse.cached_mtime(filename)
         self.variants = self.listvar('__VARIANTS', metadata) + ['']
         self.appends = self.listvar('__BBAPPEND', metadata)
-        self.nocache = self.getvar('__BB_DONT_CACHE', metadata)
+        self.nocache = self.getvar('BB_DONT_CACHE', metadata)
 
         self.skipreason = self.getvar('__SKIPPED', metadata)
         if self.skipreason:
@@ -129,8 +129,6 @@
         self.not_world = self.getvar('EXCLUDE_FROM_WORLD', metadata)
         self.stamp = self.getvar('STAMP', metadata)
         self.stampclean = self.getvar('STAMPCLEAN', metadata)        
-        self.stamp_base = self.flaglist('stamp-base', self.tasks, metadata)
-        self.stamp_base_clean = self.flaglist('stamp-base-clean', self.tasks, 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)
@@ -142,10 +140,11 @@
         self.rprovides_pkg    = self.pkgvar('RPROVIDES', self.packages, metadata)
         self.rdepends_pkg     = self.pkgvar('RDEPENDS', self.packages, metadata)
         self.rrecommends_pkg  = self.pkgvar('RRECOMMENDS', self.packages, metadata)
-        self.inherits         = self.getvar('__inherit_cache', metadata)
+        self.inherits         = self.getvar('__inherit_cache', metadata, expand=False)
         self.fakerootenv      = self.getvar('FAKEROOTENV', metadata)
         self.fakerootdirs     = self.getvar('FAKEROOTDIRS', metadata)
         self.fakerootnoenv    = self.getvar('FAKEROOTNOENV', metadata)
+        self.extradepsfunc    = self.getvar('calculate_extra_depends', metadata)
 
     @classmethod
     def init_cacheData(cls, cachedata):
@@ -158,8 +157,6 @@
 
         cachedata.stamp = {}
         cachedata.stampclean = {}
-        cachedata.stamp_base = {}
-        cachedata.stamp_base_clean = {}
         cachedata.stamp_extrainfo = {}
         cachedata.file_checksums = {}
         cachedata.fn_provides = {}
@@ -183,6 +180,7 @@
         cachedata.fakerootenv = {}
         cachedata.fakerootnoenv = {}
         cachedata.fakerootdirs = {}
+        cachedata.extradepsfunc = {}
 
     def add_cacheData(self, cachedata, fn):
         cachedata.task_deps[fn] = self.task_deps
@@ -192,8 +190,6 @@
         cachedata.pkg_dp[fn] = self.defaultpref
         cachedata.stamp[fn] = self.stamp
         cachedata.stampclean[fn] = self.stampclean
-        cachedata.stamp_base[fn] = self.stamp_base
-        cachedata.stamp_base_clean[fn] = self.stamp_base_clean
         cachedata.stamp_extrainfo[fn] = self.stamp_extrainfo
         cachedata.file_checksums[fn] = self.file_checksums
 
@@ -220,7 +216,8 @@
             rprovides += self.rprovides_pkg[package]
 
         for rprovide in rprovides:
-            cachedata.rproviders[rprovide].append(fn)
+            if fn not in cachedata.rproviders[rprovide]:
+                cachedata.rproviders[rprovide].append(fn)
 
         for package in self.packages_dynamic:
             cachedata.packages_dynamic[package].append(fn)
@@ -251,6 +248,7 @@
         cachedata.fakerootenv[fn] = self.fakerootenv
         cachedata.fakerootnoenv[fn] = self.fakerootnoenv
         cachedata.fakerootdirs[fn] = self.fakerootdirs
+        cachedata.extradepsfunc[fn] = self.extradepsfunc
 
 
 
@@ -757,13 +755,14 @@
         self.cachedata = self.create_cachedata()
         self.cachedata_extras = self.create_cachedata()
 
-    def init_cache(self, d):
+    def init_cache(self, d, cache_file_name=None):
         cachedir = (d.getVar("PERSISTENT_DIR", True) or
                     d.getVar("CACHE", True))
         if cachedir in [None, '']:
             return
         bb.utils.mkdirhier(cachedir)
-        self.cachefile = os.path.join(cachedir, self.__class__.cache_file_name)
+        self.cachefile = os.path.join(cachedir,
+                                      cache_file_name or self.__class__.cache_file_name)
         logger.debug(1, "Using cache in '%s'", self.cachefile)
 
         glf = bb.utils.lockfile(self.cachefile + ".lock")
@@ -787,7 +786,7 @@
         data = [{}]
         return data
 
-    def save_extras(self, d):
+    def save_extras(self):
         if not self.cachefile:
             return
 
@@ -817,7 +816,7 @@
                 if h not in dest[j]:
                     dest[j][h] = source[j][h]
 
-    def save_merge(self, d):
+    def save_merge(self):
         if not self.cachefile:
             return
 
diff --git a/yocto-poky/bitbake/lib/bb/checksum.py b/yocto-poky/bitbake/lib/bb/checksum.py
index 514ff0b..2ec964d 100644
--- a/yocto-poky/bitbake/lib/bb/checksum.py
+++ b/yocto-poky/bitbake/lib/bb/checksum.py
@@ -15,6 +15,8 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
+import glob
+import operator
 import os
 import stat
 import bb.utils
@@ -88,3 +90,50 @@
                     dest[0][h] = source[0][h]
             else:
                 dest[0][h] = source[0][h]
+
+    def get_checksums(self, filelist, pn):
+        """Get checksums for a list of files"""
+
+        def checksum_file(f):
+            try:
+                checksum = self.get_checksum(f)
+            except OSError as e:
+                bb.warn("Unable to get checksum for %s SRC_URI entry %s: %s" % (pn, os.path.basename(f), e))
+                return None
+            return checksum
+
+        def checksum_dir(pth):
+            # Handle directories recursively
+            dirchecksums = []
+            for root, dirs, files in os.walk(pth):
+                for name in files:
+                    fullpth = os.path.join(root, name)
+                    checksum = checksum_file(fullpth)
+                    if checksum:
+                        dirchecksums.append((fullpth, checksum))
+            return dirchecksums
+
+        checksums = []
+        for pth in filelist.split():
+            exist = pth.split(":")[1]
+            if exist == "False":
+                continue
+            pth = pth.split(":")[0]
+            if '*' in pth:
+                # Handle globs
+                for f in glob.glob(pth):
+                    if os.path.isdir(f):
+                        if not os.path.islink(f):
+                            checksums.extend(checksum_dir(f))
+                    else:
+                        checksum = checksum_file(f)
+                        checksums.append((f, checksum))
+            elif os.path.isdir(pth):
+                if not os.path.islink(pth):
+                    checksums.extend(checksum_dir(pth))
+            else:
+                checksum = checksum_file(pth)
+                checksums.append((pth, checksum))
+
+        checksums.sort(key=operator.itemgetter(1))
+        return checksums
diff --git a/yocto-poky/bitbake/lib/bb/codeparser.py b/yocto-poky/bitbake/lib/bb/codeparser.py
index 82a3af4..3ee4d56 100644
--- a/yocto-poky/bitbake/lib/bb/codeparser.py
+++ b/yocto-poky/bitbake/lib/bb/codeparser.py
@@ -28,6 +28,10 @@
         return codestr
 
     if codestr[i-1] == "\t" or codestr[i-1] == " ":
+        if codestr[0] == "\n":
+            # Since we're adding a line, we need to remove one line of any empty padding
+            # to ensure line numbers are correct
+            codestr = codestr[1:]
         return "if 1:\n" + codestr
 
     return codestr
@@ -144,6 +148,10 @@
         return cacheline
 
     def init_cache(self, d):
+        # Check if we already have the caches
+        if self.pythoncache:
+            return
+
         MultiProcessCache.init_cache(self, d)
 
         # cachedata gets re-assigned in the parent
@@ -159,11 +167,11 @@
 def parser_cache_init(d):
     codeparsercache.init_cache(d)
 
-def parser_cache_save(d):
-    codeparsercache.save_extras(d)
+def parser_cache_save():
+    codeparsercache.save_extras()
 
-def parser_cache_savemerge(d):
-    codeparsercache.save_merge(d)
+def parser_cache_savemerge():
+    codeparsercache.save_merge()
 
 Logger = logging.getLoggerClass()
 class BufferedLogger(Logger):
@@ -213,6 +221,17 @@
                     self.references.add(node.args[0].s)
             else:
                 self.warn(node.func, node.args[0])
+        elif name and name.endswith(".expand"):
+            if isinstance(node.args[0], ast.Str):
+                value = node.args[0].s
+                d = bb.data.init()
+                parser = d.expandWithRefs(value, self.name)
+                self.references |= parser.references
+                self.execs |= parser.execs
+                for varname in parser.contains:
+                    if varname not in self.contains:
+                        self.contains[varname] = set()
+                    self.contains[varname] |= parser.contains[varname]
         elif name in self.execfuncs:
             if isinstance(node.args[0], ast.Str):
                 self.var_execs.add(node.args[0].s)
@@ -235,6 +254,7 @@
                 break
 
     def __init__(self, name, log):
+        self.name = name
         self.var_execs = set()
         self.contains = {}
         self.execs = set()
@@ -244,7 +264,7 @@
         self.unhandled_message = "in call of %s, argument '%s' is not a string literal"
         self.unhandled_message = "while parsing %s, %s" % (name, self.unhandled_message)
 
-    def parse_python(self, node):
+    def parse_python(self, node, lineno=0, filename="<string>"):
         if not node or not node.strip():
             return
 
@@ -266,7 +286,9 @@
                 self.contains[i] = set(codeparsercache.pythoncacheextras[h].contains[i])
             return
 
-        code = compile(check_indent(str(node)), "<string>", "exec",
+        # We can't add to the linenumbers for compile, we can pad to the correct number of blank lines though
+        node = "\n" * int(lineno) + node
+        code = compile(check_indent(str(node)), filename, "exec",
                        ast.PyCF_ONLY_AST)
 
         for n in ast.walk(code):
diff --git a/yocto-poky/bitbake/lib/bb/command.py b/yocto-poky/bitbake/lib/bb/command.py
index 74106d1..0559ffc 100644
--- a/yocto-poky/bitbake/lib/bb/command.py
+++ b/yocto-poky/bitbake/lib/bb/command.py
@@ -279,6 +279,7 @@
         mask = params[3]
         return bb.event.set_UIHmask(handlerNum, llevel, debug_domains, mask)
     setEventMask.needconfig = False
+    setEventMask.readonly = True
 
     def setFeatures(self, command, params):
         """
diff --git a/yocto-poky/bitbake/lib/bb/cooker.py b/yocto-poky/bitbake/lib/bb/cooker.py
index 4df8881..9b565fc 100644
--- a/yocto-poky/bitbake/lib/bb/cooker.py
+++ b/yocto-poky/bitbake/lib/bb/cooker.py
@@ -67,6 +67,14 @@
 class state:
     initial, parsing, running, shutdown, forceshutdown, stopped, error = range(7)
 
+    @classmethod
+    def get_name(cls, code):
+        for name in dir(cls):
+            value = getattr(cls, name)
+            if type(value) == type(cls.initial) and value == code:
+                return name
+        raise ValueError("Invalid status code: %s" % code)
+
 
 class SkippedPackage:
     def __init__(self, info = None, reason = None):
@@ -136,6 +144,10 @@
         self.watcher.bbwatchedfiles = []
         self.notifier = pyinotify.Notifier(self.watcher, self.notifications)
 
+        # If being called by something like tinfoil, we need to clean cached data 
+        # which may now be invalid
+        bb.parse.__mtime_cache = {}
+        bb.parse.BBHandler.cached_statements = {}
 
         self.initConfigurationData()
 
@@ -189,13 +201,13 @@
     def config_notifications(self, event):
         if not event.pathname in self.configwatcher.bbwatchedfiles:
             return
-        if not event.path in self.inotify_modified_files:
-            self.inotify_modified_files.append(event.path)
+        if not event.pathname in self.inotify_modified_files:
+            self.inotify_modified_files.append(event.pathname)
         self.baseconfig_valid = False
 
     def notifications(self, event):
-        if not event.path in self.inotify_modified_files:
-            self.inotify_modified_files.append(event.path)
+        if not event.pathname in self.inotify_modified_files:
+            self.inotify_modified_files.append(event.pathname)
         self.parsecache_valid = False
 
     def add_filewatch(self, deps, watcher=None):
@@ -234,9 +246,9 @@
 
     def sigterm_exception(self, signum, stackframe):
         if signum == signal.SIGTERM:
-            bb.warn("Cooker recieved SIGTERM, shutting down...")
+            bb.warn("Cooker received SIGTERM, shutting down...")
         elif signum == signal.SIGHUP:
-            bb.warn("Cooker recieved SIGHUP, shutting down...")
+            bb.warn("Cooker received SIGHUP, shutting down...")
         self.state = state.forceshutdown
 
     def setFeatures(self, features):
@@ -645,7 +657,7 @@
         data.expandKeys(envdata)
         for e in envdata.keys():
             if data.getVarFlag( e, 'python', envdata ):
-                logger.plain("\npython %s () {\n%s}\n", e, envdata.getVar(e, True))
+                logger.plain("\npython %s () {\n%s}\n", e, envdata.getVar(e, False))
 
 
     def buildTaskData(self, pkgs_to_build, task, abort, allowincomplete=False):
@@ -717,8 +729,15 @@
         depend_tree["packages"] = {}
         depend_tree["rdepends-pkg"] = {}
         depend_tree["rrecs-pkg"] = {}
+        depend_tree['providermap'] = {}
         depend_tree["layer-priorities"] = self.recipecache.bbfile_config_priorities
 
+        for name, fn in taskdata.get_providermap().iteritems():
+            pn = self.recipecache.pkg_fn[fn]
+            if name != pn:
+                version = "%s:%s-%s" % self.recipecache.pkg_pepvpr[fn]
+                depend_tree['providermap'][name] = (pn, version)
+
         for task in xrange(len(rq.rqdata.runq_fnid)):
             taskname = rq.rqdata.runq_task[task]
             fnid = rq.rqdata.runq_fnid[task]
@@ -893,7 +912,7 @@
         logger.info("PN build list saved to 'pn-buildlist'")
         for pn in depgraph["depends"]:
             for depend in depgraph["depends"][pn]:
-                print('"%s" -> "%s"' % (pn, depend), file=depends_file)
+                print('"%s" -> "%s" [style=solid]' % (pn, depend), file=depends_file)
         for pn in depgraph["rdepends-pn"]:
             for rdepend in depgraph["rdepends-pn"][pn]:
                 print('"%s" -> "%s" [style=dashed]' % (pn, rdepend), file=depends_file)
@@ -911,13 +930,13 @@
             else:
                 print('"%s" [label="%s(%s) %s\\n%s"]' % (package, package, pn, version, fn), file=depends_file)
             for depend in depgraph["depends"][pn]:
-                print('"%s" -> "%s"' % (package, depend), file=depends_file)
+                print('"%s" -> "%s" [style=solid]' % (package, depend), file=depends_file)
         for package in depgraph["rdepends-pkg"]:
             for rdepend in depgraph["rdepends-pkg"][package]:
                 print('"%s" -> "%s" [style=dashed]' % (package, rdepend), file=depends_file)
         for package in depgraph["rrecs-pkg"]:
             for rdepend in depgraph["rrecs-pkg"][package]:
-                print('"%s" -> "%s" [style=dashed]' % (package, rdepend), file=depends_file)
+                print('"%s" -> "%s" [style=dotted]' % (package, rdepend), file=depends_file)
         print("}", file=depends_file)
         logger.info("Package dependencies saved to 'package-depends.dot'")
 
@@ -1019,22 +1038,21 @@
 
     def findFilesMatchingInDir(self, filepattern, directory):
         """
-        Searches for files matching the regex 'pattern' which are children of
+        Searches for files containing the substring 'filepattern' which are children of
         'directory' in each BBPATH. i.e. to find all rootfs package classes available
         to BitBake one could call findFilesMatchingInDir(self, 'rootfs_', 'classes')
         or to find all machine configuration files one could call:
-        findFilesMatchingInDir(self, 'conf/machines', 'conf')
+        findFilesMatchingInDir(self, '.conf', 'conf/machine')
         """
 
         matches = []
-        p = re.compile(re.escape(filepattern))
         bbpaths = self.data.getVar('BBPATH', True).split(':')
         for path in bbpaths:
             dirpath = os.path.join(path, directory)
             if os.path.exists(dirpath):
                 for root, dirs, files in os.walk(dirpath):
                     for f in files:
-                        if p.search(f):
+                        if filepattern in f:
                             matches.append(f)
 
         if matches:
@@ -1072,7 +1090,7 @@
 
         for pfn in self.recipecache.pkg_fn:
             inherits = self.recipecache.inherits.get(pfn, None)
-            if inherits and inherits.count(klass) > 0:
+            if inherits and klass in inherits:
                 pkg_list.append(self.recipecache.pkg_fn[pfn])
 
         return pkg_list
@@ -1095,28 +1113,6 @@
         tree = self.generatePkgDepTreeData(pkgs, 'build')
         bb.event.fire(bb.event.TargetsTreeGenerated(tree), self.data)
 
-    def buildWorldTargetList(self):
-        """
-         Build package list for "bitbake world"
-        """
-        parselog.debug(1, "collating packages for \"world\"")
-        for f in self.recipecache.possible_world:
-            terminal = True
-            pn = self.recipecache.pkg_fn[f]
-
-            for p in self.recipecache.pn_provides[pn]:
-                if p.startswith('virtual/'):
-                    parselog.debug(2, "World build skipping %s due to %s provider starting with virtual/", f, p)
-                    terminal = False
-                    break
-                for pf in self.recipecache.providers[p]:
-                    if self.recipecache.pkg_fn[pf] != pn:
-                        parselog.debug(2, "World build skipping %s due to both us and %s providing %s", f, pf, p)
-                        terminal = False
-                        break
-            if terminal:
-                self.recipecache.world_target.add(pn)
-
     def interactiveMode( self ):
         """Drop off into a shell"""
         try:
@@ -1353,7 +1349,7 @@
                 failures += len(exc.args)
                 retval = False
             except SystemExit as exc:
-                self.command.finishAsyncCommand()
+                self.command.finishAsyncCommand(str(exc))
                 return False
 
             if not retval:
@@ -1389,7 +1385,7 @@
                 failures += len(exc.args)
                 retval = False
             except SystemExit as exc:
-                self.command.finishAsyncCommand()
+                self.command.finishAsyncCommand(str(exc))
                 return False
 
             if not retval:
@@ -1437,14 +1433,21 @@
         dump = {}
         for k in self.data.keys():
             try:
-                v = self.data.getVar(k, True)
+                expand = True
+                flags = self.data.getVarFlags(k)
+                if flags and "func" in flags and "python" in flags:
+                    expand = False
+                v = self.data.getVar(k, expand)
                 if not k.startswith("__") and not isinstance(v, bb.data_smart.DataSmart):
                     dump[k] = {
     'v' : v ,
     'history' : self.data.varhistory.variable(k),
                     }
                     for d in flaglist:
-                        dump[k][d] = self.data.getVarFlag(k, d)
+                        if flags and d in flags:
+                            dump[k][d] = flags[d]
+                        else:
+                            dump[k][d] = None
             except Exception as e:
                 print(e)
         return dump
@@ -1506,6 +1509,8 @@
         # reload files for which we got notifications
         for p in self.inotify_modified_files:
             bb.parse.update_cache(p)
+            if p in bb.parse.BBHandler.cached_statements:
+                del bb.parse.BBHandler.cached_statements[p]
         self.inotify_modified_files = []
 
         if not self.baseconfig_valid:
@@ -1577,7 +1582,7 @@
                 parselog.warn("Explicit target \"%s\" is in ASSUME_PROVIDED, ignoring" % pkg)
 
         if 'world' in pkgs_to_build:
-            self.buildWorldTargetList()
+            bb.providers.buildWorldTargetList(self.recipecache)
             pkgs_to_build.remove('world')
             for t in self.recipecache.world_target:
                 pkgs_to_build.append(t)
@@ -1643,6 +1648,9 @@
         else:
             self.state = state.shutdown
 
+        if self.parser:
+            self.parser.shutdown(clean=not force, force=force)
+
     def finishcommand(self):
         self.state = state.initial
 
@@ -1760,18 +1768,32 @@
                 globbed = glob.glob(f)
                 if not globbed and os.path.exists(f):
                     globbed = [f]
-                for g in globbed:
+                # glob gives files in order on disk. Sort to be deterministic.
+                for g in sorted(globbed):
                     if g not in newfiles:
                         newfiles.append(g)
 
         bbmask = config.getVar('BBMASK', True)
 
         if bbmask:
+            # First validate the individual regular expressions and ignore any
+            # that do not compile
+            bbmasks = []
+            for mask in bbmask.split():
+                try:
+                    re.compile(mask)
+                    bbmasks.append(mask)
+                except sre_constants.error:
+                    collectlog.critical("BBMASK contains an invalid regular expression, ignoring: %s" % mask)
+
+            # Then validate the combined regular expressions. This should never
+            # fail, but better safe than sorry...
+            bbmask = "|".join(bbmasks)
             try:
                 bbmask_compiled = re.compile(bbmask)
             except sre_constants.error:
-                collectlog.critical("BBMASK is not a valid regular expression, ignoring.")
-                return list(newfiles), 0
+                collectlog.critical("BBMASK is not a valid regular expression, ignoring: %s" % bbmask)
+                bbmask = None
 
         bbfiles = []
         bbappend = []
@@ -1948,9 +1970,17 @@
 
     def parse(self, filename, appends, caches_array):
         try:
+            # Record the filename we're parsing into any events generated
+            def parse_filter(self, record):
+                record.taskpid = bb.event.worker_pid
+                record.fn = filename
+                return True
+
             # Reset our environment and handlers to the original settings
             bb.utils.set_context(self.context.copy())
             bb.event.set_class_handlers(self.handlers.copy())
+            bb.event.LogHandler.filter = parse_filter
+
             return True, bb.cache.Cache.parse(filename, appends, self.cfg, caches_array)
         except Exception as exc:
             tb = sys.exc_info()[2]
@@ -1981,8 +2011,6 @@
         self.total = len(filelist)
 
         self.current = 0
-        self.num_processes = int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or
-                                 multiprocessing.cpu_count())
         self.process_names = []
 
         self.bb_cache = bb.cache.Cache(self.cfgdata, self.cfghash, cooker.caches_array)
@@ -1997,6 +2025,9 @@
         self.toparse = self.total - len(self.fromcache)
         self.progress_chunk = max(self.toparse / 100, 1)
 
+        self.num_processes = min(int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or
+                                 multiprocessing.cpu_count()), len(self.willparse))
+
         self.start()
         self.haveshutdown = False
 
@@ -2007,8 +2038,9 @@
             bb.event.fire(bb.event.ParseStarted(self.toparse), self.cfgdata)
             def init():
                 Parser.cfg = self.cfgdata
-                multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, args=(self.cfgdata,), exitpriority=1)
-                multiprocessing.util.Finalize(None, bb.fetch.fetcher_parse_save, args=(self.cfgdata,), exitpriority=1)
+                bb.utils.set_process_name(multiprocessing.current_process().name)
+                multiprocessing.util.Finalize(None, bb.codeparser.parser_cache_save, exitpriority=1)
+                multiprocessing.util.Finalize(None, bb.fetch.fetcher_parse_save, exitpriority=1)
 
             self.feeder_quit = multiprocessing.Queue(maxsize=1)
             self.parser_quit = multiprocessing.Queue(maxsize=self.num_processes)
@@ -2040,7 +2072,7 @@
             bb.event.fire(event, self.cfgdata)
             self.feeder_quit.put(None)
             for process in self.processes:
-                self.jobs.put(None)
+                self.parser_quit.put(None)
         else:
             self.feeder_quit.put('cancel')
 
@@ -2061,8 +2093,8 @@
         sync = threading.Thread(target=self.bb_cache.sync)
         sync.start()
         multiprocessing.util.Finalize(None, sync.join, exitpriority=-100)
-        bb.codeparser.parser_cache_savemerge(self.cooker.data)
-        bb.fetch.fetcher_parse_done(self.cooker.data)
+        bb.codeparser.parser_cache_savemerge()
+        bb.fetch.fetcher_parse_done()
         if self.cooker.configuration.profile:
             profiles = []
             for i in self.process_names:
@@ -2125,11 +2157,6 @@
             logger.error('ExpansionError during parsing %s: %s', value.recipe, str(exc))
             self.shutdown(clean=False)
             return False
-        except SyntaxError as exc:
-            self.error += 1
-            logger.error('Unable to parse %s', exc.recipe)
-            self.shutdown(clean=False)
-            return False
         except Exception as exc:
             self.error += 1
             etype, value, tb = sys.exc_info()
diff --git a/yocto-poky/bitbake/lib/bb/cookerdata.py b/yocto-poky/bitbake/lib/bb/cookerdata.py
index 671c0cb..50259a9 100644
--- a/yocto-poky/bitbake/lib/bb/cookerdata.py
+++ b/yocto-poky/bitbake/lib/bb/cookerdata.py
@@ -137,6 +137,7 @@
         self.force = False
         self.profile = False
         self.nosetscene = False
+        self.setsceneonly = False
         self.invalidate_stamp = False
         self.dump_signatures = []
         self.dry_run = False
@@ -181,7 +182,7 @@
             parselog.critical(traceback.format_exc())
             parselog.critical("Unable to parse %s: %s" % (fn, exc))
             sys.exit(1)
-        except (bb.parse.ParseError, bb.data_smart.ExpansionError) as exc:
+        except bb.data_smart.ExpansionError as exc:
             import traceback
 
             bbdir = os.path.dirname(__file__) + os.sep
@@ -192,6 +193,8 @@
                 if not fn.startswith(bbdir):
                     break
             parselog.critical("Unable to parse %s", fn, exc_info=(exc_class, exc, tb))
+        except bb.parse.ParseError as exc:
+            parselog.critical(str(exc))
             sys.exit(1)
     return wrapped
 
@@ -289,6 +292,8 @@
                 parselog.debug(2, "Adding layer %s", layer)
                 if 'HOME' in approved and '~' in layer:
                     layer = os.path.expanduser(layer)
+                if layer.endswith('/'):
+                    layer = layer.rstrip('/')
                 data.setVar('LAYERDIR', layer)
                 data = parse_config_file(os.path.join(layer, "conf", "layer.conf"), data)
                 data.expandVarref('LAYERDIR')
@@ -317,7 +322,9 @@
         # Nomally we only register event handlers at the end of parsing .bb files
         # We register any handlers we've found so far here...
         for var in data.getVar('__BBHANDLERS', False) or []:
-            bb.event.register(var, data.getVar(var, False),  (data.getVarFlag(var, "eventmask", True) or "").split())
+            handlerfn = data.getVarFlag(var, "filename", False)
+            handlerln = int(data.getVarFlag(var, "lineno", False))
+            bb.event.register(var, data.getVar(var, False),  (data.getVarFlag(var, "eventmask", True) or "").split(), handlerfn, handlerln)
 
         if data.getVar("BB_WORKERCONTEXT", False) is None:
             bb.fetch.fetcher_init(data)
diff --git a/yocto-poky/bitbake/lib/bb/data.py b/yocto-poky/bitbake/lib/bb/data.py
index f6415a4..dbc6dea 100644
--- a/yocto-poky/bitbake/lib/bb/data.py
+++ b/yocto-poky/bitbake/lib/bb/data.py
@@ -107,7 +107,7 @@
 
 def getVarFlag(var, flag, d):
     """Gets given flag from given var"""
-    return d.getVarFlag(var, flag)
+    return d.getVarFlag(var, flag, False)
 
 def delVarFlag(var, flag, d):
     """Removes a given flag from the variable's flags"""
@@ -182,12 +182,12 @@
 
 def emit_var(var, o=sys.__stdout__, d = init(), all=False):
     """Emit a variable to be sourced by a shell."""
-    if d.getVarFlag(var, "python"):
+    if d.getVarFlag(var, "python", False):
         return False
 
-    export = d.getVarFlag(var, "export")
-    unexport = d.getVarFlag(var, "unexport")
-    func = d.getVarFlag(var, "func")
+    export = d.getVarFlag(var, "export", False)
+    unexport = d.getVarFlag(var, "unexport", False)
+    func = d.getVarFlag(var, "func", False)
     if not all and not export and not unexport and not func:
         return False
 
@@ -227,6 +227,7 @@
 
     if func:
         # NOTE: should probably check for unbalanced {} within the var
+        val = val.rstrip('\n')
         o.write("%s() {\n%s\n}\n" % (varExpanded, val))
         return 1
 
@@ -244,7 +245,7 @@
 def emit_env(o=sys.__stdout__, d = init(), all=False):
     """Emits all items in the data store in a format such that it can be sourced by a shell."""
 
-    isfunc = lambda key: bool(d.getVarFlag(key, "func"))
+    isfunc = lambda key: bool(d.getVarFlag(key, "func", False))
     keys = sorted((key for key in d.keys() if not key.startswith("__")), key=isfunc)
     grouped = groupby(keys, isfunc)
     for isfunc, keys in grouped:
@@ -253,8 +254,8 @@
 
 def exported_keys(d):
     return (key for key in d.keys() if not key.startswith('__') and
-                                      d.getVarFlag(key, 'export') and
-                                      not d.getVarFlag(key, 'unexport'))
+                                      d.getVarFlag(key, 'export', False) and
+                                      not d.getVarFlag(key, 'unexport', False))
 
 def exported_vars(d):
     for key in exported_keys(d):
@@ -269,7 +270,7 @@
 def emit_func(func, o=sys.__stdout__, d = init()):
     """Emits all items in the data store in a format such that it can be sourced by a shell."""
 
-    keys = (key for key in d.keys() if not key.startswith("__") and not d.getVarFlag(key, "func"))
+    keys = (key for key in d.keys() if not key.startswith("__") and not d.getVarFlag(key, "func", False))
     for key in keys:
         emit_var(key, o, d, False)
 
@@ -283,7 +284,7 @@
         seen |= deps
         newdeps = set()
         for dep in deps:
-            if d.getVarFlag(dep, "func") and not d.getVarFlag(dep, "python"):
+            if d.getVarFlag(dep, "func", False) and not d.getVarFlag(dep, "python", False):
                emit_var(dep, o, d, False) and o.write('\n')
                newdeps |=  bb.codeparser.ShellParser(dep, logger).parse_shell(d.getVar(dep, True))
                newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split())
@@ -297,7 +298,7 @@
     """Emits all items in the data store in a format such that it can be sourced by a shell."""
 
     def write_func(func, o, call = False):
-        body = d.getVar(func, True)
+        body = d.getVar(func, False)
         if not body.startswith("def"):
             body = _functionfmt.format(function=func, body=body)
 
@@ -307,7 +308,7 @@
 
     write_func(func, o, True)
     pp = bb.codeparser.PythonParser(func, logger)
-    pp.parse_python(d.getVar(func, True))
+    pp.parse_python(d.getVar(func, False))
     newdeps = pp.execs
     newdeps |= set((d.getVarFlag(func, "vardeps", True) or "").split())
     seen = set()
@@ -316,10 +317,10 @@
         seen |= deps
         newdeps = set()
         for dep in deps:
-            if d.getVarFlag(dep, "func") and d.getVarFlag(dep, "python"):
+            if d.getVarFlag(dep, "func", False) and d.getVarFlag(dep, "python", False):
                write_func(dep, o)
                pp = bb.codeparser.PythonParser(dep, logger)
-               pp.parse_python(d.getVar(dep, True))
+               pp.parse_python(d.getVar(dep, False))
                newdeps |= pp.execs
                newdeps |= set((d.getVarFlag(dep, "vardeps", True) or "").split())
         newdeps -= seen
@@ -338,7 +339,7 @@
             deps |= parser.references
             deps = deps | (keys & parser.execs)
             return deps, value
-        varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "vardepvalueexclude", "postfuncs", "prefuncs"]) or {}
+        varflags = d.getVarFlags(key, ["vardeps", "vardepvalue", "vardepsexclude", "vardepvalueexclude", "postfuncs", "prefuncs", "lineno", "filename"]) or {}
         vardeps = varflags.get("vardeps")
         value = d.getVar(key, False)
 
@@ -361,27 +362,27 @@
            value = varflags.get("vardepvalue")
         elif varflags.get("func"):
             if varflags.get("python"):
-                parsedvar = d.expandWithRefs(value, key)
                 parser = bb.codeparser.PythonParser(key, logger)
-                if parsedvar.value and "\t" in parsedvar.value:
+                if value and "\t" in value:
                     logger.warn("Variable %s contains tabs, please remove these (%s)" % (key, d.getVar("FILE", True)))
-                parser.parse_python(parsedvar.value)
+                parser.parse_python(value, filename=varflags.get("filename"), lineno=varflags.get("lineno"))
                 deps = deps | parser.references
+                deps = deps | (keys & parser.execs)
                 value = handle_contains(value, parser.contains, d)
             else:
                 parsedvar = d.expandWithRefs(value, key)
                 parser = bb.codeparser.ShellParser(key, logger)
                 parser.parse_shell(parsedvar.value)
                 deps = deps | shelldeps
+                deps = deps | parsedvar.references
+                deps = deps | (keys & parser.execs) | (keys & parsedvar.execs)
+                value = handle_contains(value, parsedvar.contains, d)
             if vardeps is None:
                 parser.log.flush()
             if "prefuncs" in varflags:
                 deps = deps | set(varflags["prefuncs"].split())
             if "postfuncs" in varflags:
                 deps = deps | set(varflags["postfuncs"].split())
-            deps = deps | parsedvar.references
-            deps = deps | (keys & parser.execs) | (keys & parsedvar.execs)
-            value = handle_contains(value, parsedvar.contains, d)
         else:
             parser = d.expandWithRefs(value, key)
             deps |= parser.references
@@ -406,7 +407,8 @@
         deps |= set((vardeps or "").split())
         deps -= set(varflags.get("vardepsexclude", "").split())
     except Exception as e:
-        raise bb.data_smart.ExpansionError(key, None, e)
+        bb.warn("Exception during build_dependencies for %s" % key)
+        raise
     return deps, value
     #bb.note("Variable %s references %s and calls %s" % (key, str(deps), str(execs)))
     #d.setVarFlag(key, "vardeps", deps)
@@ -414,7 +416,7 @@
 def generate_dependencies(d):
 
     keys = set(key for key in d if not key.startswith("__"))
-    shelldeps = set(key for key in d.getVar("__exportlist", False) if d.getVarFlag(key, "export") and not d.getVarFlag(key, "unexport"))
+    shelldeps = set(key for key in d.getVar("__exportlist", False) if d.getVarFlag(key, "export", False) and not d.getVarFlag(key, "unexport", False))
     varflagsexcl = d.getVar('BB_SIGNATURE_EXCLUDE_FLAGS', True)
 
     deps = {}
diff --git a/yocto-poky/bitbake/lib/bb/data_smart.py b/yocto-poky/bitbake/lib/bb/data_smart.py
index 70558c1..fa1e794 100644
--- a/yocto-poky/bitbake/lib/bb/data_smart.py
+++ b/yocto-poky/bitbake/lib/bb/data_smart.py
@@ -40,7 +40,7 @@
 
 __setvar_keyword__ = ["_append", "_prepend", "_remove"]
 __setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>.*))?$')
-__expand_var_regexp__ = re.compile(r"\${[^{}@\n\t ]+}")
+__expand_var_regexp__ = re.compile(r"\${[^{}@\n\t :]+}")
 __expand_python_regexp__ = re.compile(r"\${@.+?}")
 
 def infer_caller_details(loginfo, parent = False, varval = True):
@@ -147,7 +147,7 @@
 
     def __missing__(self, key):
         value = self.metadata.getVar(key, True)
-        if value is None or self.metadata.getVarFlag(key, 'func'):
+        if value is None or self.metadata.getVarFlag(key, 'func', False):
             raise KeyError(key)
         else:
             return value
@@ -384,7 +384,12 @@
             olds = s
             try:
                 s = __expand_var_regexp__.sub(varparse.var_sub, s)
-                s = __expand_python_regexp__.sub(varparse.python_sub, s)
+                try:
+                    s = __expand_python_regexp__.sub(varparse.python_sub, s)
+                except SyntaxError as e:
+                    # Likely unmatched brackets, just don't expand the expression
+                    if e.msg != "EOL while scanning string literal":
+                        raise
                 if s == olds:
                     break
             except ExpansionError:
@@ -475,7 +480,7 @@
             base = match.group('base')
             keyword = match.group("keyword")
             override = match.group('add')
-            l = self.getVarFlag(base, keyword) or []
+            l = self.getVarFlag(base, keyword, False) or []
             l.append([value, override])
             self.setVarFlag(base, keyword, l, ignore=True)
             # And cause that to be recorded:
@@ -547,7 +552,7 @@
         # aka pay the cookie monster
         override = var[var.rfind('_')+1:]
         shortvar = var[:var.rfind('_')]
-        while override:
+        while override and override.islower():
             if shortvar not in self.overridedata:
                 self.overridedata[shortvar] = []
             if [var, override] not in self.overridedata[shortvar]:
@@ -561,7 +566,7 @@
                 if len(shortvar) == 0:
                     override = None
 
-    def getVar(self, var, expand=False, noweakdefault=False, parsing=False):
+    def getVar(self, var, expand, noweakdefault=False, parsing=False):
         return self.getVarFlag(var, "_content", expand, noweakdefault, parsing)
 
     def renameVar(self, key, newkey, **loginfo):
@@ -577,11 +582,11 @@
             self.setVar(newkey, val, ignore=True, parsing=True)
 
         for i in (__setvar_keyword__):
-            src = self.getVarFlag(key, i)
+            src = self.getVarFlag(key, i, False)
             if src is None:
                 continue
 
-            dest = self.getVarFlag(newkey, i) or []
+            dest = self.getVarFlag(newkey, i, False) or []
             dest.extend(src)
             self.setVarFlag(newkey, i, dest, ignore=True)
 
@@ -621,7 +626,7 @@
         if '_' in var:
             override = var[var.rfind('_')+1:]
             shortvar = var[:var.rfind('_')]
-            while override:
+            while override and override.islower():
                 try:
                     if shortvar in self.overridedata:
                         # Force CoW by recreating the list first
@@ -658,7 +663,7 @@
                 self.dict["__exportlist"]["_content"] = set()
             self.dict["__exportlist"]["_content"].add(var)
 
-    def getVarFlag(self, var, flag, expand=False, noweakdefault=False, parsing=False):
+    def getVarFlag(self, var, flag, expand, noweakdefault=False, parsing=False):
         local_var = self._findVar(var)
         value = None
         if flag == "_content" and var in self.overridedata and not parsing:
@@ -687,7 +692,7 @@
                             match = active[a]
                             del active[a]
             if match:
-                value = self.getVar(match)
+                value = self.getVar(match, False)
 
         if local_var is not None and value is None:
             if flag in local_var:
@@ -957,7 +962,7 @@
 
             if key == "__BBANONFUNCS":
                 for i in bb_list:
-                    value = d.getVar(i, True) or ""
+                    value = d.getVar(i, False) or ""
                     data.update({i:value})
 
         data_str = str([(k, data[k]) for k in sorted(data.keys())])
diff --git a/yocto-poky/bitbake/lib/bb/event.py b/yocto-poky/bitbake/lib/bb/event.py
index 366bc41..5ffe89e 100644
--- a/yocto-poky/bitbake/lib/bb/event.py
+++ b/yocto-poky/bitbake/lib/bb/event.py
@@ -31,6 +31,7 @@
 import logging
 import atexit
 import traceback
+import ast
 import bb.utils
 import bb.compat
 import bb.exceptions
@@ -177,7 +178,7 @@
     fire_ui_handlers(event, d)
 
 noop = lambda _: None
-def register(name, handler, mask=None):
+def register(name, handler, mask=None, filename=None, lineno=None):
     """Register an Event handler"""
 
     # already registered
@@ -189,7 +190,15 @@
         if isinstance(handler, basestring):
             tmp = "def %s(e):\n%s" % (name, handler)
             try:
-                code = compile(tmp, "%s(e)" % name, "exec")
+                code = bb.methodpool.compile_cache(tmp)
+                if not code:
+                    if filename is None:
+                        filename = "%s(e)" % name
+                    code = compile(tmp, filename, "exec", ast.PyCF_ONLY_AST)
+                    if lineno is not None:
+                        ast.increment_lineno(code, lineno-1)
+                    code = compile(code, filename, "exec")
+                    bb.methodpool.compile_cache_add(tmp, code)
             except SyntaxError:
                 logger.error("Unable to register event handler '%s':\n%s", name,
                              ''.join(traceback.format_exc(limit=0)))
@@ -595,6 +604,8 @@
             etype, value, tb = record.exc_info
             if hasattr(tb, 'tb_next'):
                 tb = list(bb.exceptions.extract_traceback(tb, context=3))
+            # Need to turn the value into something the logging system can pickle
+            value = str(value)
             record.bb_exc_info = (etype, value, tb)
             record.exc_info = None
         fire(record, None)
diff --git a/yocto-poky/bitbake/lib/bb/fetch2/__init__.py b/yocto-poky/bitbake/lib/bb/fetch2/__init__.py
index a9c044b..1fa6702 100644
--- a/yocto-poky/bitbake/lib/bb/fetch2/__init__.py
+++ b/yocto-poky/bitbake/lib/bb/fetch2/__init__.py
@@ -29,11 +29,9 @@
 from __future__ import print_function
 import os, re
 import signal
-import glob
 import logging
 import urllib
 import urlparse
-import operator
 import bb.persist_data, bb.utils
 import bb.checksum
 from bb import data
@@ -329,7 +327,7 @@
     def path(self, path):
         self._path = path
 
-        if re.compile("^/").match(path):
+        if not path or re.compile("^/").match(path):
             self.relative = False
         else:
             self.relative = True
@@ -377,9 +375,12 @@
     if locidx != -1 and type.lower() != 'file':
         host = location[:locidx]
         path = location[locidx:]
-    else:
+    elif type.lower() == 'file':
         host = ""
         path = location
+    else:
+        host = location
+        path = ""
     if user:
         m = re.compile('(?P<user>[^:]+)(:?(?P<pswd>.*))').match(user)
         if m:
@@ -515,13 +516,13 @@
         if hasattr(m, "init"):
             m.init(d)
 
-def fetcher_parse_save(d):
-    _checksum_cache.save_extras(d)
+def fetcher_parse_save():
+    _checksum_cache.save_extras()
 
-def fetcher_parse_done(d):
-    _checksum_cache.save_merge(d)
+def fetcher_parse_done():
+    _checksum_cache.save_merge()
 
-def fetcher_compare_revisions(d):
+def fetcher_compare_revisions():
     """
     Compare the revisions in the persistant cache with current values and
     return true/false on whether they've changed.
@@ -574,10 +575,10 @@
     else:
         sha256data = bb.utils.sha256_file(ud.localpath)
 
-    if ud.method.recommends_checksum(ud):
+    if ud.method.recommends_checksum(ud) and not ud.md5_expected and not ud.sha256_expected:
         # If strict checking enabled and neither sum defined, raise error
         strict = d.getVar("BB_STRICT_CHECKSUM", True) or "0"
-        if (strict == "1") and not (ud.md5_expected or ud.sha256_expected):
+        if strict == "1":
             logger.error('No checksum specified for %s, please add at least one to the recipe:\n'
                              'SRC_URI[%s] = "%s"\nSRC_URI[%s] = "%s"' %
                              (ud.localpath, ud.md5_name, md5data,
@@ -585,34 +586,22 @@
             raise NoChecksumError('Missing SRC_URI checksum', ud.url)
 
         # Log missing sums so user can more easily add them
-        if not ud.md5_expected:
-            logger.warn('Missing md5 SRC_URI checksum for %s, consider adding to the recipe:\n'
-                        'SRC_URI[%s] = "%s"',
-                        ud.localpath, ud.md5_name, md5data)
-
-        if not ud.sha256_expected:
-            logger.warn('Missing sha256 SRC_URI checksum for %s, consider adding to the recipe:\n'
-                        'SRC_URI[%s] = "%s"',
-                        ud.localpath, ud.sha256_name, sha256data)
-
-    md5mismatch = False
-    sha256mismatch = False
-
-    if ud.md5_expected != md5data:
-        md5mismatch = True
-
-    if ud.sha256_expected != sha256data:
-        sha256mismatch = True
+        logger.warn('Missing md5 SRC_URI checksum for %s, consider adding to the recipe:\n'
+                    'SRC_URI[%s] = "%s"',
+                    ud.localpath, ud.md5_name, md5data)
+        logger.warn('Missing sha256 SRC_URI checksum for %s, consider adding to the recipe:\n'
+                    'SRC_URI[%s] = "%s"',
+                    ud.localpath, ud.sha256_name, sha256data)
 
     # We want to alert the user if a checksum is defined in the recipe but
     # it does not match.
     msg = ""
     mismatch = False
-    if md5mismatch and ud.md5_expected:
+    if ud.md5_expected and ud.md5_expected != md5data:
         msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected" % (ud.localpath, 'md5', md5data, ud.md5_expected)
         mismatch = True;
 
-    if sha256mismatch and ud.sha256_expected:
+    if ud.sha256_expected and ud.sha256_expected != sha256data:
         msg = msg + "\nFile: '%s' has %s checksum %s when %s was expected" % (ud.localpath, 'sha256', sha256data, ud.sha256_expected)
         mismatch = True;
 
@@ -637,6 +626,9 @@
     Returns True, if the donestamp exists and is valid, False otherwise. When
     returning False, any existing done stamps are removed.
     """
+    if not ud.needdonestamp:
+        return True
+
     if not os.path.exists(ud.donestamp):
         return False
 
@@ -685,7 +677,8 @@
         # incorrect stamp file.
         logger.warn("Checksum mismatch for local file %s\n"
                     "Cleaning and trying again." % ud.localpath)
-        rename_bad_checksum(ud, e.checksum)
+        if os.path.exists(ud.localpath):
+            rename_bad_checksum(ud, e.checksum)
         bb.utils.remove(ud.donestamp)
     return False
 
@@ -695,6 +688,9 @@
         donestamp is file stamp indicating the whole fetching is done
         this function update the stamp after verifying the checksum
     """
+    if not ud.needdonestamp:
+        return
+
     if os.path.exists(ud.donestamp):
         # Touch the done stamp file to show active use of the download
         try:
@@ -703,11 +699,21 @@
             # Errors aren't fatal here
             pass
     else:
-        checksums = verify_checksum(ud, d)
-        # Store the checksums for later re-verification against the recipe
-        with open(ud.donestamp, "wb") as cachefile:
-            p = pickle.Pickler(cachefile, pickle.HIGHEST_PROTOCOL)
-            p.dump(checksums)
+        try:
+            checksums = verify_checksum(ud, d)
+            # Store the checksums for later re-verification against the recipe
+            with open(ud.donestamp, "wb") as cachefile:
+                p = pickle.Pickler(cachefile, pickle.HIGHEST_PROTOCOL)
+                p.dump(checksums)
+        except ChecksumError as e:
+            # Checksums failed to verify, trigger re-download and remove the
+            # incorrect stamp file.
+            logger.warn("Checksum mismatch for local file %s\n"
+                        "Cleaning and trying again." % ud.localpath)
+            if os.path.exists(ud.localpath):
+                rename_bad_checksum(ud, e.checksum)
+            bb.utils.remove(ud.donestamp)
+            raise
 
 def subprocess_setup():
     # Python installs a SIGPIPE handler by default. This is usually not what
@@ -718,7 +724,7 @@
 def get_autorev(d):
     #  only not cache src rev in autorev case
     if d.getVar('BB_SRCREV_POLICY', True) != "cache":
-        d.setVar('__BB_DONT_CACHE', '1')
+        d.setVar('BB_DONT_CACHE', '1')
     return "AUTOINC"
 
 def get_srcrev(d, method_name='sortable_revision'):
@@ -920,6 +926,10 @@
 def try_mirror_url(fetch, origud, ud, ld, check = False):
     # Return of None or a value means we're finished
     # False means try another url
+
+    if ud.lockfile and ud.lockfile != origud.lockfile:
+        lf = bb.utils.lockfile(ud.lockfile)
+
     try:
         if check:
             found = ud.method.checkstatus(fetch, ud, ld)
@@ -946,8 +956,9 @@
         if origud.mirrortarball and os.path.basename(ud.localpath) == os.path.basename(origud.mirrortarball) \
                 and os.path.basename(ud.localpath) != os.path.basename(origud.localpath):
             # Create donestamp in old format to avoid triggering a re-download
-            bb.utils.mkdirhier(os.path.dirname(ud.donestamp))
-            open(ud.donestamp, 'w').close()
+            if ud.donestamp:
+                bb.utils.mkdirhier(os.path.dirname(ud.donestamp))
+                open(ud.donestamp, 'w').close()
             dest = os.path.join(dldir, os.path.basename(ud.localpath))
             if not os.path.exists(dest):
                 os.symlink(ud.localpath, dest)
@@ -973,7 +984,8 @@
         if isinstance(e, ChecksumError):
             logger.warn("Mirror checksum failure for url %s (original url: %s)\nCleaning and trying again." % (ud.url, origud.url))
             logger.warn(str(e))
-            rename_bad_checksum(ud, e.checksum)
+            if os.path.exists(ud.localpath):
+                rename_bad_checksum(ud, e.checksum)
         elif isinstance(e, NoChecksumError):
             raise
         else:
@@ -984,6 +996,10 @@
         except UnboundLocalError:
             pass
         return False
+    finally:
+        if ud.lockfile and ud.lockfile != origud.lockfile:
+            bb.utils.unlockfile(lf)
+
 
 def try_mirrors(fetch, d, origud, mirrors, check = False):
     """
@@ -1014,7 +1030,7 @@
         return True
 
     pkgname = d.expand(d.getVar('PN', False))
-    trusted_hosts = d.getVarFlag('BB_ALLOWED_NETWORKS', pkgname)
+    trusted_hosts = d.getVarFlag('BB_ALLOWED_NETWORKS', pkgname, False)
 
     if not trusted_hosts:
         trusted_hosts = d.getVar('BB_ALLOWED_NETWORKS', True)
@@ -1028,6 +1044,7 @@
     if not network:
         return True
 
+    network = network.split(':')[0]
     network = network.lower()
 
     for host in trusted_hosts.split(" "):
@@ -1120,48 +1137,7 @@
     it proceeds
 
     """
-
-    def checksum_file(f):
-        try:
-            checksum = _checksum_cache.get_checksum(f)
-        except OSError as e:
-            bb.warn("Unable to get checksum for %s SRC_URI entry %s: %s" % (pn, os.path.basename(f), e))
-            return None
-        return checksum
-
-    def checksum_dir(pth):
-        # Handle directories recursively
-        dirchecksums = []
-        for root, dirs, files in os.walk(pth):
-            for name in files:
-                fullpth = os.path.join(root, name)
-                checksum = checksum_file(fullpth)
-                if checksum:
-                    dirchecksums.append((fullpth, checksum))
-        return dirchecksums
-
-    checksums = []
-    for pth in filelist.split():
-        exist = pth.split(":")[1]
-        if exist == "False":
-            continue
-        pth = pth.split(":")[0]
-        if '*' in pth:
-            # Handle globs
-            for f in glob.glob(pth):
-                if os.path.isdir(f):
-                    checksums.extend(checksum_dir(f))
-                else:
-                    checksum = checksum_file(f)
-                    checksums.append((f, checksum))
-        elif os.path.isdir(pth):
-            checksums.extend(checksum_dir(pth))
-        else:
-            checksum = checksum_file(pth)
-            checksums.append((pth, checksum))
-
-    checksums.sort(key=operator.itemgetter(1))
-    return checksums
+    return _checksum_cache.get_checksums(filelist, pn)
 
 
 class FetchData(object):
@@ -1171,6 +1147,7 @@
     def __init__(self, url, d, localonly = False):
         # localpath is the location of a downloaded result. If not set, the file is local.
         self.donestamp = None
+        self.needdonestamp = True
         self.localfile = ""
         self.localpath = None
         self.lockfile = None
@@ -1197,13 +1174,13 @@
         elif self.type not in ["http", "https", "ftp", "ftps", "sftp"]:
             self.md5_expected = None
         else:
-            self.md5_expected = d.getVarFlag("SRC_URI", self.md5_name)
+            self.md5_expected = d.getVarFlag("SRC_URI", self.md5_name, True)
         if self.sha256_name in self.parm:
             self.sha256_expected = self.parm[self.sha256_name]
         elif self.type not in ["http", "https", "ftp", "ftps", "sftp"]:
             self.sha256_expected = None
         else:
-            self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name)
+            self.sha256_expected = d.getVarFlag("SRC_URI", self.sha256_name, True)
         self.ignore_checksums = False
 
         self.names = self.parm.get("name",'default').split(',')
@@ -1235,13 +1212,20 @@
             self.localpath = self.method.localpath(self, d)
 
         dldir = d.getVar("DL_DIR", True)
+
+        if not self.needdonestamp:
+            return
+
         # Note: .done and .lock files should always be in DL_DIR whereas localpath may not be.
         if self.localpath and self.localpath.startswith(dldir):
             basepath = self.localpath
         elif self.localpath:
             basepath = dldir + os.sep + os.path.basename(self.localpath)
-        else:
+        elif self.basepath or self.basename:
             basepath = dldir + os.sep + (self.basepath or self.basename)
+        else:
+             bb.fatal("Can't determine lock path for url %s" % url)
+
         self.donestamp = basepath + '.done'
         self.lockfile = basepath + '.lock'
 
@@ -1355,6 +1339,11 @@
         iterate = False
         file = urldata.localpath
 
+        # Localpath can't deal with 'dir/*' entries, so it converts them to '.',
+        # but it must be corrected back for local files copying
+        if urldata.basename == '*' and file.endswith('/.'):
+            file = '%s/%s' % (file.rstrip('/.'), urldata.path)
+
         try:
             unpack = bb.utils.to_boolean(urldata.parm.get('unpack'), True)
         except ValueError as exc:
@@ -1407,51 +1396,40 @@
                     cmd = 'rpm2cpio.sh %s | cpio -id' % (file)
             elif file.endswith('.deb') or file.endswith('.ipk'):
                 cmd = 'ar -p %s data.tar.gz | zcat | tar --no-same-owner -xpf -' % file
+            elif file.endswith('.tar.7z'):
+                cmd = '7z x -so %s | tar xf - ' % file
+            elif file.endswith('.7z'):
+                cmd = '7za x -y %s 1>/dev/null' % file
+
+        # If 'subdir' param exists, create a dir and use it as destination for unpack cmd
+        if 'subdir' in urldata.parm:
+            unpackdir = '%s/%s' % (rootdir, urldata.parm.get('subdir'))
+            bb.utils.mkdirhier(unpackdir)
+        else:
+            unpackdir = rootdir
 
         if not unpack or not cmd:
             # If file == dest, then avoid any copies, as we already put the file into dest!
-            dest = os.path.join(rootdir, os.path.basename(file))
-            if (file != dest) and not (os.path.exists(dest) and os.path.samefile(file, dest)):
-                if os.path.isdir(file):
-                    # If for example we're asked to copy file://foo/bar, we need to unpack the result into foo/bar
-                    basepath = getattr(urldata, "basepath", None)
-                    destdir = "."
-                    if basepath and basepath.endswith("/"):
-                        basepath = basepath.rstrip("/")
-                    elif basepath:
-                        basepath = os.path.dirname(basepath)
-                    if basepath and basepath.find("/") != -1:
-                        destdir = basepath[:basepath.rfind('/')]
-                        destdir = destdir.strip('/')
-                    if destdir != "." and not os.access("%s/%s" % (rootdir, destdir), os.F_OK):
-                        os.makedirs("%s/%s" % (rootdir, destdir))
-                    cmd = 'cp -fpPR %s %s/%s/' % (file, rootdir, destdir)
-                    #cmd = 'tar -cf - -C "%d" -ps . | tar -xf - -C "%s/%s/"' % (file, rootdir, destdir)
-                else:
-                    # The "destdir" handling was specifically done for FILESPATH
-                    # items.  So, only do so for file:// entries.
-                    if urldata.type == "file" and urldata.path.find("/") != -1:
-                       destdir = urldata.path.rsplit("/", 1)[0]
-                       if urldata.parm.get('subdir') != None:
-                          destdir = urldata.parm.get('subdir') + "/" + destdir
-                    else:
-                       if urldata.parm.get('subdir') != None:
-                          destdir = urldata.parm.get('subdir')
-                       else:
-                          destdir = "."
-                    bb.utils.mkdirhier("%s/%s" % (rootdir, destdir))
-                    cmd = 'cp -f %s %s/%s/' % (file, rootdir, destdir)
+            dest = os.path.join(unpackdir, os.path.basename(file))
+            if file != dest and not (os.path.exists(dest) and os.path.samefile(file, dest)):
+                destdir = '.'
+                # For file:// entries all intermediate dirs in path must be created at destination
+                if urldata.type == "file":
+                    # Trailing '/' does a copying to wrong place
+                    urlpath = urldata.path.rstrip('/')
+                    # Want files places relative to cwd so no leading '/'
+                    urlpath = urlpath.lstrip('/')
+                    if urlpath.find("/") != -1:
+                        destdir = urlpath.rsplit("/", 1)[0] + '/'
+                        bb.utils.mkdirhier("%s/%s" % (unpackdir, destdir))
+                cmd = 'cp -fpPR %s %s' % (file, destdir)
 
         if not cmd:
             return
 
-        # Change to subdir before executing command
+        # Change to unpackdir before executing command
         save_cwd = os.getcwd();
-        os.chdir(rootdir)
-        if 'subdir' in urldata.parm:
-            newdir = ("%s/%s" % (rootdir, urldata.parm.get('subdir')))
-            bb.utils.mkdirhier(newdir)
-            os.chdir(newdir)
+        os.chdir(unpackdir)
 
         path = data.getVar('PATH', True)
         if path:
@@ -1578,7 +1556,8 @@
             m = ud.method
             localpath = ""
 
-            lf = bb.utils.lockfile(ud.lockfile)
+            if ud.lockfile:
+                lf = bb.utils.lockfile(ud.lockfile)
 
             try:
                 self.d.setVar("BB_NO_NETWORK", network)
@@ -1617,7 +1596,8 @@
                         if isinstance(e, ChecksumError):
                             logger.warn("Checksum failure encountered with download of %s - will attempt other sources if available" % u)
                             logger.debug(1, str(e))
-                            rename_bad_checksum(ud, e.checksum)
+                            if os.path.exists(ud.localpath):
+                                rename_bad_checksum(ud, e.checksum)
                         elif isinstance(e, NoChecksumError):
                             raise
                         else:
@@ -1644,7 +1624,8 @@
                 raise
 
             finally:
-                bb.utils.unlockfile(lf)
+                if ud.lockfile:
+                    bb.utils.unlockfile(lf)
 
     def checkstatus(self, urls=None):
         """
@@ -1686,9 +1667,6 @@
             ud = self.ud[u]
             ud.setup_localpath(self.d)
 
-            if self.d.expand(self.localpath) is None:
-                continue
-
             if ud.lockfile:
                 lf = bb.utils.lockfile(ud.lockfile)
 
@@ -1775,6 +1753,7 @@
 from . import osc
 from . import repo
 from . import clearcase
+from . import npm
 
 methods.append(local.Local())
 methods.append(wget.Wget())
@@ -1791,3 +1770,4 @@
 methods.append(osc.Osc())
 methods.append(repo.Repo())
 methods.append(clearcase.ClearCase())
+methods.append(npm.Npm())
diff --git a/yocto-poky/bitbake/lib/bb/fetch2/git.py b/yocto-poky/bitbake/lib/bb/fetch2/git.py
index 9bd87ad..526668b 100644
--- a/yocto-poky/bitbake/lib/bb/fetch2/git.py
+++ b/yocto-poky/bitbake/lib/bb/fetch2/git.py
@@ -70,6 +70,7 @@
 import os
 import re
 import bb
+import errno
 from   bb    import data
 from   bb.fetch2 import FetchMethod
 from   bb.fetch2 import runfetchcmd
@@ -261,23 +262,7 @@
         if ud.bareclone:
             cloneflags += " --mirror"
 
-        # Versions of git prior to 1.7.9.2 have issues where foo.git and foo get confused
-        # and you end up with some horrible union of the two when you attempt to clone it
-        # The least invasive workaround seems to be a symlink to the real directory to
-        # fool git into ignoring any .git version that may also be present.
-        #
-        # The issue is fixed in more recent versions of git so we can drop this hack in future
-        # when that version becomes common enough.
-        clonedir = ud.clonedir
-        if not ud.path.endswith(".git"):
-            indirectiondir = destdir[:-1] + ".indirectionsymlink"
-            if os.path.exists(indirectiondir):
-                os.remove(indirectiondir)
-            bb.utils.mkdirhier(os.path.dirname(indirectiondir))
-            os.symlink(ud.clonedir, indirectiondir)
-            clonedir = indirectiondir
-
-        runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, clonedir, destdir), d)
+        runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, ud.clonedir, destdir), d)
         os.chdir(destdir)
         repourl = self._get_repo_url(ud)
         runfetchcmd("%s remote set-url origin %s" % (ud.basecmd, repourl), d)
@@ -379,7 +364,7 @@
         """
         pupver = ('', '')
 
-        tagregex = re.compile(d.getVar('GITTAGREGEX', True) or "(?P<pver>([0-9][\.|_]?)+)")
+        tagregex = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX', True) or "(?P<pver>([0-9][\.|_]?)+)")
         try:
             output = self._lsremote(ud, d, "refs/tags/*")
         except bb.fetch2.FetchError or bb.fetch2.NetworkAccess:
diff --git a/yocto-poky/bitbake/lib/bb/fetch2/gitsm.py b/yocto-poky/bitbake/lib/bb/fetch2/gitsm.py
index 0392e48..752f1d3 100644
--- a/yocto-poky/bitbake/lib/bb/fetch2/gitsm.py
+++ b/yocto-poky/bitbake/lib/bb/fetch2/gitsm.py
@@ -110,8 +110,7 @@
         os.chdir(tmpclonedir)
         runfetchcmd(ud.basecmd + " reset --hard", d)
         runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
-        runfetchcmd(ud.basecmd + " submodule init", d)
-        runfetchcmd(ud.basecmd + " submodule update", d)
+        runfetchcmd(ud.basecmd + " submodule update --init --recursive", d)
         self._set_relative_paths(tmpclonedir)
         runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*false/bare = true/'", d)
         os.rename(gitdir, ud.clonedir,)
@@ -131,7 +130,5 @@
         os.chdir(ud.destdir)
         submodules = self.uses_submodules(ud, d)
         if submodules:
-            runfetchcmd("cp -r " + ud.clonedir + "/modules " + ud.destdir + "/.git/", d)
-            runfetchcmd(ud.basecmd + " submodule init", d)
-            runfetchcmd(ud.basecmd + " submodule update", d)
-
+            runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d)
+            runfetchcmd(ud.basecmd + " submodule update --init --recursive", d)
diff --git a/yocto-poky/bitbake/lib/bb/fetch2/local.py b/yocto-poky/bitbake/lib/bb/fetch2/local.py
index 2d921f7..303a52b 100644
--- a/yocto-poky/bitbake/lib/bb/fetch2/local.py
+++ b/yocto-poky/bitbake/lib/bb/fetch2/local.py
@@ -45,6 +45,7 @@
         ud.decodedurl = urllib.unquote(ud.url.split("://")[1].split(";")[0])
         ud.basename = os.path.basename(ud.decodedurl)
         ud.basepath = ud.decodedurl
+        ud.needdonestamp = False
         return
 
     def localpath(self, urldata, d):
diff --git a/yocto-poky/bitbake/lib/bb/fetch2/npm.py b/yocto-poky/bitbake/lib/bb/fetch2/npm.py
new file mode 100644
index 0000000..e8d9b11
--- /dev/null
+++ b/yocto-poky/bitbake/lib/bb/fetch2/npm.py
@@ -0,0 +1,284 @@
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+"""
+BitBake 'Fetch' NPM implementation
+
+The NPM fetcher is used to retrieve files from the npmjs repository
+
+Usage in the recipe:
+
+    SRC_URI = "npm://registry.npmjs.org/;name=${PN};version=${PV}"
+    Suported SRC_URI options are:
+
+    - name
+    - version
+
+    npm://registry.npmjs.org/${PN}/-/${PN}-${PV}.tgz  would become npm://registry.npmjs.org;name=${PN};ver=${PV}
+    The fetcher all triggers off the existence of ud.localpath. If that exists and has the ".done" stamp, its assumed the fetch is good/done
+
+"""
+
+import os
+import sys
+import urllib
+import json
+import subprocess
+import signal
+import bb
+from   bb import data
+from   bb.fetch2 import FetchMethod
+from   bb.fetch2 import FetchError
+from   bb.fetch2 import ChecksumError
+from   bb.fetch2 import runfetchcmd
+from   bb.fetch2 import logger
+from   bb.fetch2 import UnpackError
+from   bb.fetch2 import ParameterError
+from   distutils import spawn
+
+def subprocess_setup():
+    # Python installs a SIGPIPE handler by default. This is usually not what
+    # non-Python subprocesses expect.
+    # SIGPIPE errors are known issues with gzip/bash
+    signal.signal(signal.SIGPIPE, signal.SIG_DFL)
+
+class Npm(FetchMethod):
+
+    """Class to fetch urls via 'npm'"""
+    def init(self, d):
+        pass
+
+    def supports(self, ud, d):
+        """
+        Check to see if a given url can be fetched with npm
+        """
+        return ud.type in ['npm']
+
+    def debug(self, msg):
+        logger.debug(1, "NpmFetch: %s", msg)
+
+    def clean(self, ud, d):
+        logger.debug(2, "Calling cleanup %s" % ud.pkgname)
+        bb.utils.remove(ud.localpath, False)
+        bb.utils.remove(ud.pkgdatadir, True)
+        bb.utils.remove(ud.fullmirror, False)
+
+    def urldata_init(self, ud, d):
+        """
+        init NPM specific variable within url data
+        """
+        if 'downloadfilename' in ud.parm:
+            ud.basename = ud.parm['downloadfilename']
+        else:
+            ud.basename = os.path.basename(ud.path)
+
+        # can't call it ud.name otherwise fetcher base class will start doing sha1stuff
+        # TODO: find a way to get an sha1/sha256 manifest of pkg & all deps
+        ud.pkgname = ud.parm.get("name", None)
+        if not ud.pkgname:
+            raise ParameterError("NPM fetcher requires a name parameter", ud.url)
+        ud.version = ud.parm.get("version", None)
+        if not ud.version:
+            raise ParameterError("NPM fetcher requires a version parameter", ud.url)
+        ud.bbnpmmanifest = "%s-%s.deps.json" % (ud.pkgname, ud.version)
+        ud.registry = "http://%s" % (ud.url.replace('npm://', '', 1).split(';'))[0]
+        prefixdir = "npm/%s" % ud.pkgname
+        ud.pkgdatadir = d.expand("${DL_DIR}/%s" % prefixdir)
+        if not os.path.exists(ud.pkgdatadir):
+            bb.utils.mkdirhier(ud.pkgdatadir)
+        ud.localpath = d.expand("${DL_DIR}/npm/%s" % ud.bbnpmmanifest)
+
+        self.basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -O -t 2 -T 30 -nv --passive-ftp --no-check-certificate "
+        self.basecmd += " --directory-prefix=%s " % prefixdir
+
+        ud.write_tarballs = ((data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) or "0") != "0")
+        ud.mirrortarball = 'npm_%s-%s.tar.xz' % (ud.pkgname, ud.version)
+        ud.fullmirror = os.path.join(d.getVar("DL_DIR", True), ud.mirrortarball)
+
+    def need_update(self, ud, d):
+        if os.path.exists(ud.localpath):
+            return False
+        return True
+
+    def _runwget(self, ud, d, command, quiet):
+        logger.debug(2, "Fetching %s using command '%s'" % (ud.url, command))
+        bb.fetch2.check_network_access(d, command)
+        runfetchcmd(command, d, quiet)
+
+    def _unpackdep(self, ud, pkg, data, destdir, dldir, d):
+        file = data[pkg]['tgz']
+        logger.debug(2, "file to extract is %s" % file)
+        if file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
+            cmd = 'tar xz --strip 1 --no-same-owner --warning=no-unknown-keyword -f %s/%s' % (dldir, file)
+        else:
+            bb.fatal("NPM package %s downloaded not a tarball!" % file)
+
+        # Change to subdir before executing command
+        save_cwd = os.getcwd()
+        if not os.path.exists(destdir):
+            os.makedirs(destdir)
+        os.chdir(destdir)
+        path = d.getVar('PATH', True)
+        if path:
+            cmd = "PATH=\"%s\" %s" % (path, cmd)
+        bb.note("Unpacking %s to %s/" % (file, os.getcwd()))
+        ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True)
+        os.chdir(save_cwd)
+
+        if ret != 0:
+            raise UnpackError("Unpack command %s failed with return value %s" % (cmd, ret), ud.url)
+
+        if 'deps' not in data[pkg]:
+            return
+        for dep in data[pkg]['deps']:
+            self._unpackdep(ud, dep, data[pkg]['deps'], "%s/node_modules/%s" % (destdir, dep), dldir, d)
+
+
+    def unpack(self, ud, destdir, d):
+        dldir = d.getVar("DL_DIR", True)
+        depdumpfile = "%s-%s.deps.json" % (ud.pkgname, ud.version)
+        with open("%s/npm/%s" % (dldir, depdumpfile)) as datafile:
+            workobj = json.load(datafile)
+        dldir = "%s/%s" % (os.path.dirname(ud.localpath), ud.pkgname)
+
+        self._unpackdep(ud, ud.pkgname, workobj,  "%s/npmpkg" % destdir, dldir, d)
+
+    def _parse_view(self, output):
+        '''
+        Parse the output of npm view --json; the last JSON result
+        is assumed to be the one that we're interested in.
+        '''
+        pdata = None
+        outdeps = {}
+        datalines = []
+        bracelevel = 0
+        for line in output.splitlines():
+            if bracelevel:
+                datalines.append(line)
+            elif '{' in line:
+                datalines = []
+                datalines.append(line)
+            bracelevel = bracelevel + line.count('{') - line.count('}')
+        if datalines:
+            pdata = json.loads('\n'.join(datalines))
+        return pdata
+
+    def _getdependencies(self, pkg, data, version, d, ud, optional=False):
+        pkgfullname = pkg
+        if version != '*' and not '/' in version:
+            pkgfullname += "@'%s'" % version
+        logger.debug(2, "Calling getdeps on %s" % pkg)
+        fetchcmd = "npm view %s --json --registry %s" % (pkgfullname, ud.registry)
+        output = runfetchcmd(fetchcmd, d, True)
+        pdata = self._parse_view(output)
+        if not pdata:
+            raise FetchError("The command '%s' returned no output" % fetchcmd)
+        if optional:
+            pkg_os = pdata.get('os', None)
+            if pkg_os:
+                if not isinstance(pkg_os, list):
+                    pkg_os = [pkg_os]
+                if 'linux' not in pkg_os or '!linux' in pkg_os:
+                    logger.debug(2, "Skipping %s since it's incompatible with Linux" % pkg)
+                    return
+        #logger.debug(2, "Output URL is %s - %s - %s" % (ud.basepath, ud.basename, ud.localfile))
+        outputurl = pdata['dist']['tarball']
+        data[pkg] = {}
+        data[pkg]['tgz'] = os.path.basename(outputurl)
+        self._runwget(ud, d, "%s %s" % (self.basecmd, outputurl), False)
+
+        dependencies = pdata.get('dependencies', {})
+        optionalDependencies = pdata.get('optionalDependencies', {})
+        depsfound = {}
+        optdepsfound = {}
+        data[pkg]['deps'] = {}
+        for dep in dependencies:
+            if dep in optionalDependencies:
+                optdepsfound[dep] = dependencies[dep]
+            else:
+                depsfound[dep] = dependencies[dep]
+        for dep, version in optdepsfound.iteritems():
+            self._getdependencies(dep, data[pkg]['deps'], version, d, ud, optional=True)
+        for dep, version in depsfound.iteritems():
+            self._getdependencies(dep, data[pkg]['deps'], version, d, ud)
+
+    def _getshrinkeddependencies(self, pkg, data, version, d, ud, lockdown, manifest):
+        logger.debug(2, "NPM shrinkwrap file is %s" % data)
+        outputurl = "invalid"
+        if ('resolved' not in data) or (not data['resolved'].startswith('http')):
+            # will be the case for ${PN}
+            fetchcmd = "npm view %s@%s dist.tarball --registry %s" % (pkg, version, ud.registry)
+            logger.debug(2, "Found this matching URL: %s" % str(fetchcmd))
+            outputurl = runfetchcmd(fetchcmd, d, True)
+        else:
+            outputurl = data['resolved']
+        self._runwget(ud, d, "%s %s" % (self.basecmd, outputurl), False)
+        manifest[pkg] = {}
+        manifest[pkg]['tgz'] = os.path.basename(outputurl).rstrip()
+        manifest[pkg]['deps'] = {}
+
+        if pkg in lockdown:
+            sha1_expected = lockdown[pkg][version]
+            sha1_data = bb.utils.sha1_file("npm/%s/%s" % (ud.pkgname, manifest[pkg]['tgz']))
+            if sha1_expected != sha1_data:
+                msg = "\nFile: '%s' has %s checksum %s when %s was expected" % (manifest[pkg]['tgz'], 'sha1', sha1_data, sha1_expected)
+                raise ChecksumError('Checksum mismatch!%s' % msg)
+        else:
+            logger.debug(2, "No lockdown data for %s@%s" % (pkg, version))
+
+        if 'dependencies' in data:
+            for obj in data['dependencies']:
+                logger.debug(2, "Found dep is %s" % str(obj))
+                self._getshrinkeddependencies(obj, data['dependencies'][obj], data['dependencies'][obj]['version'], d, ud, lockdown, manifest[pkg]['deps'])
+
+    def download(self, ud, d):
+        """Fetch url"""
+        jsondepobj = {}
+        shrinkobj = {}
+        lockdown = {}
+
+        if not os.listdir(ud.pkgdatadir) and os.path.exists(ud.fullmirror):
+            dest = d.getVar("DL_DIR", True)
+            bb.utils.mkdirhier(dest)
+            save_cwd = os.getcwd()
+            os.chdir(dest)
+            runfetchcmd("tar -xJf %s" % (ud.fullmirror), d)
+            os.chdir(save_cwd)
+            return
+
+        shwrf = d.getVar('NPM_SHRINKWRAP', True)
+        logger.debug(2, "NPM shrinkwrap file is %s" % shwrf)
+        try:
+            with open(shwrf) as datafile:
+                shrinkobj = json.load(datafile)
+        except:
+            logger.warn('Missing shrinkwrap file in NPM_SHRINKWRAP for %s, this will lead to unreliable builds!' % ud.pkgname)
+        lckdf = d.getVar('NPM_LOCKDOWN', True)
+        logger.debug(2, "NPM lockdown file is %s" % lckdf)
+        try:
+            with open(lckdf) as datafile:
+                lockdown = json.load(datafile)
+        except:
+            logger.warn('Missing lockdown file in NPM_LOCKDOWN for %s, this will lead to unreproducible builds!' % ud.pkgname)
+
+        if ('name' not in shrinkobj):
+            self._getdependencies(ud.pkgname, jsondepobj, ud.version, d, ud)
+        else:
+            self._getshrinkeddependencies(ud.pkgname, shrinkobj, ud.version, d, ud, lockdown, jsondepobj)
+
+        with open(ud.localpath, 'w') as outfile:
+            json.dump(jsondepobj, outfile)
+
+    def build_mirror_data(self, ud, d):
+        # Generate a mirror tarball if needed
+        if ud.write_tarballs and not os.path.exists(ud.fullmirror):
+            # it's possible that this symlink points to read-only filesystem with PREMIRROR
+            if os.path.islink(ud.fullmirror):
+                os.unlink(ud.fullmirror)
+
+            save_cwd = os.getcwd()
+            os.chdir(d.getVar("DL_DIR", True))
+            logger.info("Creating tarball of npm data")
+            runfetchcmd("tar -cJf %s npm/%s npm/%s" % (ud.fullmirror, ud.bbnpmmanifest, ud.pkgname), d)
+            runfetchcmd("touch %s.done" % (ud.fullmirror), d)
+            os.chdir(save_cwd)
+
diff --git a/yocto-poky/bitbake/lib/bb/fetch2/osc.py b/yocto-poky/bitbake/lib/bb/fetch2/osc.py
index 3d87796..d051dfd 100644
--- a/yocto-poky/bitbake/lib/bb/fetch2/osc.py
+++ b/yocto-poky/bitbake/lib/bb/fetch2/osc.py
@@ -34,13 +34,13 @@
 
         # Create paths to osc checkouts
         relpath = self._strip_leading_slashes(ud.path)
-        ud.pkgdir = os.path.join(data.expand('${OSCDIR}', d), ud.host)
+        ud.pkgdir = os.path.join(d.getVar('OSCDIR', True), ud.host)
         ud.moddir = os.path.join(ud.pkgdir, relpath, ud.module)
 
         if 'rev' in ud.parm:
             ud.revision = ud.parm['rev']
         else:
-            pv = data.getVar("PV", d, 0)
+            pv = d.getVar("PV", False)
             rev = bb.fetch2.srcrev_internal_helper(ud, d)
             if rev and rev != True:
                 ud.revision = rev
@@ -84,7 +84,7 @@
 
         logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'")
 
-        if os.access(os.path.join(data.expand('${OSCDIR}', d), ud.path, ud.module), os.R_OK):
+        if os.access(os.path.join(d.getVar('OSCDIR', True), ud.path, ud.module), os.R_OK):
             oscupdatecmd = self._buildosccommand(ud, d, "update")
             logger.info("Update "+ ud.url)
             # update sources there
@@ -114,7 +114,7 @@
         Generate a .oscrc to be used for this run.
         """
 
-        config_path = os.path.join(data.expand('${OSCDIR}', d), "oscrc")
+        config_path = os.path.join(d.getVar('OSCDIR', True), "oscrc")
         if (os.path.exists(config_path)):
             os.remove(config_path)
 
@@ -123,8 +123,8 @@
         f.write("apisrv = %s\n" % ud.host)
         f.write("scheme = http\n")
         f.write("su-wrapper = su -c\n")
-        f.write("build-root = %s\n" % data.expand('${WORKDIR}', d))
-        f.write("urllist = http://moblin-obs.jf.intel.com:8888/build/%(project)s/%(repository)s/%(buildarch)s/:full/%(name)s.rpm\n")
+        f.write("build-root = %s\n" % d.getVar('WORKDIR', True))
+        f.write("urllist = %s\n" % d.getVar("OSCURLLIST", True))
         f.write("extra-pkgs = gzip\n")
         f.write("\n")
         f.write("[%s]\n" % ud.host)
diff --git a/yocto-poky/bitbake/lib/bb/fetch2/wget.py b/yocto-poky/bitbake/lib/bb/fetch2/wget.py
index bd2a897..8bc9e93 100644
--- a/yocto-poky/bitbake/lib/bb/fetch2/wget.py
+++ b/yocto-poky/bitbake/lib/bb/fetch2/wget.py
@@ -37,7 +37,9 @@
 from   bb.fetch2 import FetchError
 from   bb.fetch2 import logger
 from   bb.fetch2 import runfetchcmd
+from   bb.utils import export_proxies
 from   bs4 import BeautifulSoup
+from   bs4 import SoupStrainer
 
 class Wget(FetchMethod):
     """Class to fetch urls via 'wget'"""
@@ -61,6 +63,8 @@
             ud.basename = os.path.basename(ud.path)
 
         ud.localfile = data.expand(urllib.unquote(ud.basename), d)
+        if not ud.localfile:
+            ud.localfile = data.expand(urllib.unquote(ud.host + ud.path).replace("/", "."), d)
 
         self.basecmd = d.getVar("FETCHCMD_wget", True) or "/usr/bin/env wget -t 2 -T 30 -nv --passive-ftp --no-check-certificate"
 
@@ -218,54 +222,64 @@
 
                 return resp
 
-        def export_proxies(d):
-            variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY',
-                            'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY']
-            exported = False
+        class HTTPMethodFallback(urllib2.BaseHandler):
+            """
+            Fallback to GET if HEAD is not allowed (405 HTTP error)
+            """
+            def http_error_405(self, req, fp, code, msg, headers):
+                fp.read()
+                fp.close()
 
-            for v in variables:
-                if v in os.environ.keys():
-                    exported = True
-                else:
-                    v_proxy = d.getVar(v, True)
-                    if v_proxy is not None:
-                        os.environ[v] = v_proxy
-                        exported = True
+                newheaders = dict((k,v) for k,v in req.headers.items()
+                                  if k.lower() not in ("content-length", "content-type"))
+                return self.parent.open(urllib2.Request(req.get_full_url(),
+                                                        headers=newheaders,
+                                                        origin_req_host=req.get_origin_req_host(),
+                                                        unverifiable=True))
 
-            return exported
+            """
+            Some servers (e.g. GitHub archives, hosted on Amazon S3) return 403
+            Forbidden when they actually mean 405 Method Not Allowed.
+            """
+            http_error_403 = http_error_405
 
-        def head_method(self):
-            return "HEAD"
+            """
+            Some servers (e.g. FusionForge) returns 406 Not Acceptable when they
+            actually mean 405 Method Not Allowed.
+            """
+            http_error_406 = http_error_405
 
+        class FixedHTTPRedirectHandler(urllib2.HTTPRedirectHandler):
+            """
+            urllib2.HTTPRedirectHandler resets the method to GET on redirect,
+            when we want to follow redirects using the original method.
+            """
+            def redirect_request(self, req, fp, code, msg, headers, newurl):
+                newreq = urllib2.HTTPRedirectHandler.redirect_request(self, req, fp, code, msg, headers, newurl)
+                newreq.get_method = lambda: req.get_method()
+                return newreq
         exported_proxies = export_proxies(d)
 
+        handlers = [FixedHTTPRedirectHandler, HTTPMethodFallback]
+        if export_proxies:
+            handlers.append(urllib2.ProxyHandler())
+        handlers.append(CacheHTTPHandler())
         # XXX: Since Python 2.7.9 ssl cert validation is enabled by default
         # see PEP-0476, this causes verification errors on some https servers
         # so disable by default.
         import ssl
-        ssl_context = None
         if hasattr(ssl, '_create_unverified_context'):
-            ssl_context = ssl._create_unverified_context()
-
-        if exported_proxies == True and ssl_context is not None:
-            opener = urllib2.build_opener(urllib2.ProxyHandler, CacheHTTPHandler,
-                    urllib2.HTTPSHandler(context=ssl_context))
-        elif exported_proxies == False and ssl_context is not None:
-            opener = urllib2.build_opener(CacheHTTPHandler,
-                    urllib2.HTTPSHandler(context=ssl_context))
-        elif exported_proxies == True and ssl_context is None:
-            opener = urllib2.build_opener(urllib2.ProxyHandler, CacheHTTPHandler)
-        else:
-            opener = urllib2.build_opener(CacheHTTPHandler)
-
-        urllib2.Request.get_method = head_method
-        urllib2.install_opener(opener)
-
-        uri = ud.url.split(";")[0]
+            handlers.append(urllib2.HTTPSHandler(context=ssl._create_unverified_context()))
+        opener = urllib2.build_opener(*handlers)
 
         try:
-            urllib2.urlopen(uri)
-        except:
+            uri = ud.url.split(";")[0]
+            r = urllib2.Request(uri)
+            r.get_method = lambda: "HEAD"
+            opener.open(r)
+        except urllib2.URLError as e:
+            # debug for now to avoid spamming the logs in e.g. remote sstate searches
+            logger.debug(2, "checkstatus() urlopen failed: %s" % e)
             return False
         return True
 
@@ -367,7 +381,7 @@
         version = ['', '', '']
 
         bb.debug(3, "VersionURL: %s" % (url))
-        soup = BeautifulSoup(self._fetch_index(url, ud, d))
+        soup = BeautifulSoup(self._fetch_index(url, ud, d), "html.parser", parse_only=SoupStrainer("a"))
         if not soup:
             bb.debug(3, "*** %s NO SOUP" % (url))
             return ""
@@ -406,10 +420,10 @@
         version_dir = ['', '', '']
         version = ['', '', '']
 
-        dirver_regex = re.compile("(\D*)((\d+[\.\-_])+(\d+))")
+        dirver_regex = re.compile("(?P<pfx>\D*)(?P<ver>(\d+[\.\-_])+(\d+))")
         s = dirver_regex.search(dirver)
         if s:
-            version_dir[1] = s.group(2)
+            version_dir[1] = s.group('ver')
         else:
             version_dir[1] = dirver
 
@@ -417,16 +431,26 @@
                 ud.path.split(dirver)[0], ud.user, ud.pswd, {}])
         bb.debug(3, "DirURL: %s, %s" % (dirs_uri, package))
 
-        soup = BeautifulSoup(self._fetch_index(dirs_uri, ud, d))
+        soup = BeautifulSoup(self._fetch_index(dirs_uri, ud, d), "html.parser", parse_only=SoupStrainer("a"))
         if not soup:
             return version[1]
 
         for line in soup.find_all('a', href=True):
             s = dirver_regex.search(line['href'].strip("/"))
             if s:
-                version_dir_new = ['', s.group(2), '']
+                sver = s.group('ver')
+
+                # When prefix is part of the version directory it need to
+                # ensure that only version directory is used so remove previous
+                # directories if exists.
+                #
+                # Example: pfx = '/dir1/dir2/v' and version = '2.5' the expected
+                # result is v2.5.
+                spfx = s.group('pfx').split('/')[-1]
+
+                version_dir_new = ['', sver, '']
                 if self._vercmp(version_dir, version_dir_new) <= 0:
-                    dirver_new = s.group(1) + s.group(2)
+                    dirver_new = spfx + sver
                     path = ud.path.replace(dirver, dirver_new, True) \
                         .split(package)[0]
                     uri = bb.fetch.encodeurl([ud.type, ud.host, path,
@@ -480,7 +504,7 @@
         self.suffix_regex_comp = re.compile(psuffix_regex)
 
         # compile regex, can be specific by package or generic regex
-        pn_regex = d.getVar('REGEX', True)
+        pn_regex = d.getVar('UPSTREAM_CHECK_REGEX', True)
         if pn_regex:
             package_custom_regex_comp = re.compile(pn_regex)
         else:
@@ -516,7 +540,7 @@
         bb.debug(3, "latest_versionstring, regex: %s" % (package_regex.pattern))
 
         uri = ""
-        regex_uri = d.getVar("REGEX_URI", True)
+        regex_uri = d.getVar("UPSTREAM_CHECK_URI", True)
         if not regex_uri:
             path = ud.path.split(package)[0]
 
diff --git a/yocto-poky/bitbake/lib/bb/main.py b/yocto-poky/bitbake/lib/bb/main.py
index c8530fc..e302173 100755
--- a/yocto-poky/bitbake/lib/bb/main.py
+++ b/yocto-poky/bitbake/lib/bb/main.py
@@ -219,6 +219,9 @@
         parser.add_option("", "--no-setscene", help = "Do not run any setscene tasks. sstate will be ignored and everything needed, built.",
                    action = "store_true", dest = "nosetscene", default = False)
 
+        parser.add_option("", "--setscene-only", help = "Only run setscene tasks, don't run any real tasks.",
+                   action = "store_true", dest = "setsceneonly", default = False)
+
         parser.add_option("", "--remote-server", help = "Connect to the specified server.",
                    action = "store", dest = "remote_server", default = False)
 
@@ -244,7 +247,7 @@
         if "BBTOKEN" in os.environ:
             options.xmlrpctoken = os.environ["BBTOKEN"]
 
-        if "BBEVENTLOG" is os.environ:
+        if "BBEVENTLOG" in os.environ:
             options.writeeventlog = os.environ["BBEVENTLOG"]
 
         # fill in proper log name if not supplied
@@ -279,12 +282,13 @@
 
 def start_server(servermodule, configParams, configuration, features):
     server = servermodule.BitBakeServer()
+    single_use = not configParams.server_only
     if configParams.bind:
         (host, port) = configParams.bind.split(':')
-        server.initServer((host, int(port)))
+        server.initServer((host, int(port)), single_use)
         configuration.interface = [ server.serverImpl.host, server.serverImpl.port ]
     else:
-        server.initServer()
+        server.initServer(single_use=single_use)
         configuration.interface = []
 
     try:
@@ -406,6 +410,13 @@
         except Exception as e:
             bb.fatal("Could not connect to server %s: %s" % (configParams.remote_server, str(e)))
 
+        if configParams.kill_server:
+            server_connection.connection.terminateServer()
+            bb.event.ui_queue = []
+            return 0
+
+        server_connection.setupEventQueue()
+
         # Restore the environment in case the UI needs it
         for k in cleanedvars:
             os.environ[k] = cleanedvars[k]
@@ -417,11 +428,6 @@
             server_connection.terminate()
             return 0
 
-        if configParams.kill_server:
-            server_connection.connection.terminateServer()
-            bb.event.ui_queue = []
-            return 0
-
         try:
             return ui_module.main(server_connection.connection, server_connection.events, configParams)
         finally:
diff --git a/yocto-poky/bitbake/lib/bb/methodpool.py b/yocto-poky/bitbake/lib/bb/methodpool.py
index bf2e9f5..49aed33 100644
--- a/yocto-poky/bitbake/lib/bb/methodpool.py
+++ b/yocto-poky/bitbake/lib/bb/methodpool.py
@@ -19,11 +19,22 @@
 
 from bb.utils import better_compile, better_exec
 
-def insert_method(modulename, code, fn):
+def insert_method(modulename, code, fn, lineno):
     """
     Add code of a module should be added. The methods
     will be simply added, no checking will be done
     """
-    comp = better_compile(code, modulename, fn )
+    comp = better_compile(code, modulename, fn, lineno=lineno)
     better_exec(comp, None, code, fn)
 
+compilecache = {}
+
+def compile_cache(code):
+    h = hash(code)
+    if h in compilecache:
+        return compilecache[h]
+    return None
+
+def compile_cache_add(code, compileobj):
+    h = hash(code)
+    compilecache[h] = compileobj
diff --git a/yocto-poky/bitbake/lib/bb/parse/__init__.py b/yocto-poky/bitbake/lib/bb/parse/__init__.py
index 67ec71f..26ae7ea 100644
--- a/yocto-poky/bitbake/lib/bb/parse/__init__.py
+++ b/yocto-poky/bitbake/lib/bb/parse/__init__.py
@@ -161,8 +161,8 @@
 def get_file_depends(d):
     '''Return the dependent files'''
     dep_files = []
-    depends = d.getVar('__base_depends', True) or []
-    depends = depends + (d.getVar('__depends', True) or [])
+    depends = d.getVar('__base_depends', False) or []
+    depends = depends + (d.getVar('__depends', False) or [])
     for (fn, _) in depends:
         dep_files.append(os.path.abspath(fn))
     return " ".join(dep_files)
diff --git a/yocto-poky/bitbake/lib/bb/parse/ast.py b/yocto-poky/bitbake/lib/bb/parse/ast.py
index 11db180..5f55af5 100644
--- a/yocto-poky/bitbake/lib/bb/parse/ast.py
+++ b/yocto-poky/bitbake/lib/bb/parse/ast.py
@@ -83,7 +83,7 @@
 
     def getFunc(self, key, data):
         if 'flag' in self.groupd and self.groupd['flag'] != None:
-            return data.getVarFlag(key, self.groupd['flag'], noweakdefault=True)
+            return data.getVarFlag(key, self.groupd['flag'], expand=False, noweakdefault=True)
         else:
             return data.getVar(key, False, noweakdefault=True, parsing=True)
 
@@ -141,24 +141,37 @@
 class MethodNode(AstNode):
     tr_tbl = string.maketrans('/.+-@%&', '_______')
 
-    def __init__(self, filename, lineno, func_name, body):
+    def __init__(self, filename, lineno, func_name, body, python, fakeroot):
         AstNode.__init__(self, filename, lineno)
         self.func_name = func_name
         self.body = body
+        self.python = python
+        self.fakeroot = fakeroot
 
     def eval(self, data):
         text = '\n'.join(self.body)
+        funcname = self.func_name
         if self.func_name == "__anonymous":
             funcname = ("__anon_%s_%s" % (self.lineno, self.filename.translate(MethodNode.tr_tbl)))
+            self.python = True
             text = "def %s(d):\n" % (funcname) + text
-            bb.methodpool.insert_method(funcname, text, self.filename)
+            bb.methodpool.insert_method(funcname, text, self.filename, self.lineno - len(self.body))
             anonfuncs = data.getVar('__BBANONFUNCS', False) or []
             anonfuncs.append(funcname)
             data.setVar('__BBANONFUNCS', anonfuncs)
-            data.setVar(funcname, text, parsing=True)
-        else:
-            data.setVarFlag(self.func_name, "func", 1)
-            data.setVar(self.func_name, text, parsing=True)
+        if data.getVar(funcname, False):
+            # clean up old version of this piece of metadata, as its
+            # flags could cause problems
+            data.delVarFlag(funcname, 'python')
+            data.delVarFlag(funcname, 'fakeroot')
+        if self.python:
+            data.setVarFlag(funcname, "python", "1")
+        if self.fakeroot:
+            data.setVarFlag(funcname, "fakeroot", "1")
+        data.setVarFlag(funcname, "func", 1)
+        data.setVar(funcname, text, parsing=True)
+        data.setVarFlag(funcname, 'filename', self.filename)
+        data.setVarFlag(funcname, 'lineno', str(self.lineno - len(self.body)))
 
 class PythonMethodNode(AstNode):
     def __init__(self, filename, lineno, function, modulename, body):
@@ -172,31 +185,12 @@
         # 'this' file. This means we will not parse methods from
         # bb classes twice
         text = '\n'.join(self.body)
-        bb.methodpool.insert_method(self.modulename, text, self.filename)
+        bb.methodpool.insert_method(self.modulename, text, self.filename, self.lineno - len(self.body) - 1)
         data.setVarFlag(self.function, "func", 1)
         data.setVarFlag(self.function, "python", 1)
         data.setVar(self.function, text, parsing=True)
-
-class MethodFlagsNode(AstNode):
-    def __init__(self, filename, lineno, key, m):
-        AstNode.__init__(self, filename, lineno)
-        self.key = key
-        self.m = m
-
-    def eval(self, data):
-        if data.getVar(self.key, False):
-            # clean up old version of this piece of metadata, as its
-            # flags could cause problems
-            data.setVarFlag(self.key, 'python', None)
-            data.setVarFlag(self.key, 'fakeroot', None)
-        if self.m.group("py") is not None:
-            data.setVarFlag(self.key, "python", "1")
-        else:
-            data.delVarFlag(self.key, "python")
-        if self.m.group("fr") is not None:
-            data.setVarFlag(self.key, "fakeroot", "1")
-        else:
-            data.delVarFlag(self.key, "fakeroot")
+        data.setVarFlag(self.function, 'filename', self.filename)
+        data.setVarFlag(self.function, 'lineno', str(self.lineno - len(self.body) - 1))
 
 class ExportFuncsNode(AstNode):
     def __init__(self, filename, lineno, fns, classname):
@@ -209,7 +203,7 @@
         for func in self.n:
             calledfunc = self.classname + "_" + func
 
-            if data.getVar(func, False) and not data.getVarFlag(func, 'export_func'):
+            if data.getVar(func, False) and not data.getVarFlag(func, 'export_func', False):
                 continue
 
             if data.getVar(func, False):
@@ -217,13 +211,15 @@
                 data.setVarFlag(func, 'func', None)
 
             for flag in [ "func", "python" ]:
-                if data.getVarFlag(calledfunc, flag):
-                    data.setVarFlag(func, flag, data.getVarFlag(calledfunc, flag))
+                if data.getVarFlag(calledfunc, flag, False):
+                    data.setVarFlag(func, flag, data.getVarFlag(calledfunc, flag, False))
             for flag in [ "dirs" ]:
-                if data.getVarFlag(func, flag):
-                    data.setVarFlag(calledfunc, flag, data.getVarFlag(func, flag))
+                if data.getVarFlag(func, flag, False):
+                    data.setVarFlag(calledfunc, flag, data.getVarFlag(func, flag, False))
+            data.setVarFlag(func, "filename", "autogenerated")
+            data.setVarFlag(func, "lineno", 1)
 
-            if data.getVarFlag(calledfunc, "python"):
+            if data.getVarFlag(calledfunc, "python", False):
                 data.setVar(func, "    bb.build.exec_func('" + calledfunc + "', d)\n", parsing=True)
             else:
                 if "-" in self.classname:
@@ -278,15 +274,12 @@
 def handleData(statements, filename, lineno, groupd):
     statements.append(DataNode(filename, lineno, groupd))
 
-def handleMethod(statements, filename, lineno, func_name, body):
-    statements.append(MethodNode(filename, lineno, func_name, body))
+def handleMethod(statements, filename, lineno, func_name, body, python, fakeroot):
+    statements.append(MethodNode(filename, lineno, func_name, body, python, fakeroot))
 
 def handlePythonMethod(statements, filename, lineno, funcname, modulename, body):
     statements.append(PythonMethodNode(filename, lineno, funcname, modulename, body))
 
-def handleMethodFlags(statements, filename, lineno, key, m):
-    statements.append(MethodFlagsNode(filename, lineno, key, m))
-
 def handleExportFuncs(statements, filename, lineno, m, classname):
     statements.append(ExportFuncsNode(filename, lineno, m.group(1), classname))
 
@@ -317,7 +310,9 @@
     all_handlers = {}
     for var in d.getVar('__BBHANDLERS', False) or []:
         # try to add the handler
-        bb.event.register(var, d.getVar(var, False), (d.getVarFlag(var, "eventmask", True) or "").split())
+        handlerfn = d.getVarFlag(var, "filename", False)
+        handlerln = int(d.getVarFlag(var, "lineno", False))
+        bb.event.register(var, d.getVar(var, False), (d.getVarFlag(var, "eventmask", True) or "").split(), handlerfn, handlerln)
 
     bb.event.fire(bb.event.RecipePreFinalise(fn), d)
 
diff --git a/yocto-poky/bitbake/lib/bb/parse/parse_py/BBHandler.py b/yocto-poky/bitbake/lib/bb/parse/parse_py/BBHandler.py
index ec097ba..ef72c37 100644
--- a/yocto-poky/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/yocto-poky/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -47,7 +47,6 @@
 __def_regexp__           = re.compile( r"def\s+(\w+).*:" )
 __python_func_regexp__   = re.compile( r"(\s+.*)|(^$)" )
 
-
 __infunc__ = []
 __inpython__ = False
 __body__   = []
@@ -55,15 +54,6 @@
 
 cached_statements = {}
 
-# We need to indicate EOF to the feeder. This code is so messy that
-# factoring it out to a close_parse_file method is out of question.
-# We will use the IN_PYTHON_EOF as an indicator to just close the method
-#
-# The two parts using it are tightly integrated anyway
-IN_PYTHON_EOF = -9999999999999
-
-
-
 def supports(fn, d):
     """Return True if fn has a supported extension"""
     return os.path.splitext(fn)[-1] in [".bb", ".bbclass", ".inc"]
@@ -110,7 +100,7 @@
         file.close()
         if __inpython__:
             # add a blank line to close out any python definition
-            feeder(IN_PYTHON_EOF, "", filename, base_name, statements)
+            feeder(lineno, "", filename, base_name, statements, eof=True)
 
         if filename.endswith(".bbclass") or filename.endswith(".inc"):
             cached_statements[absolute_filename] = statements
@@ -171,12 +161,12 @@
 
     return d
 
-def feeder(lineno, s, fn, root, statements):
+def feeder(lineno, s, fn, root, statements, eof=False):
     global __func_start_regexp__, __inherit_regexp__, __export_func_regexp__, __addtask_regexp__, __addhandler_regexp__, __def_regexp__, __python_func_regexp__, __inpython__, __infunc__, __body__, bb, __residue__, __classname__
     if __infunc__:
         if s == '}':
             __body__.append('')
-            ast.handleMethod(statements, fn, lineno, __infunc__[0], __body__)
+            ast.handleMethod(statements, fn, lineno, __infunc__[0], __body__, __infunc__[3], __infunc__[4])
             __infunc__ = []
             __body__ = []
         else:
@@ -185,7 +175,7 @@
 
     if __inpython__:
         m = __python_func_regexp__.match(s)
-        if m and lineno != IN_PYTHON_EOF:
+        if m and not eof:
             __body__.append(s)
             return
         else:
@@ -194,7 +184,7 @@
             __body__ = []
             __inpython__ = False
 
-            if lineno == IN_PYTHON_EOF:
+            if eof:
                 return
 
     if s and s[0] == '#':
@@ -221,8 +211,7 @@
 
     m = __func_start_regexp__.match(s)
     if m:
-        __infunc__ = [m.group("func") or "__anonymous", fn, lineno]
-        ast.handleMethodFlags(statements, fn, lineno, __infunc__[0], m)
+        __infunc__ = [m.group("func") or "__anonymous", fn, lineno, m.group("py") is not None, m.group("fr") is not None]
         return
 
     m = __def_regexp__.match(s)
diff --git a/yocto-poky/bitbake/lib/bb/persist_data.py b/yocto-poky/bitbake/lib/bb/persist_data.py
index 5795bc8..e450423 100644
--- a/yocto-poky/bitbake/lib/bb/persist_data.py
+++ b/yocto-poky/bitbake/lib/bb/persist_data.py
@@ -201,6 +201,7 @@
 def connect(database):
     connection = sqlite3.connect(database, timeout=5, isolation_level=None)
     connection.execute("pragma synchronous = off;")
+    connection.text_factory = str
     return connection
 
 def persist(domain, d):
diff --git a/yocto-poky/bitbake/lib/bb/providers.py b/yocto-poky/bitbake/lib/bb/providers.py
index 637e1fa..563a091 100644
--- a/yocto-poky/bitbake/lib/bb/providers.py
+++ b/yocto-poky/bitbake/lib/bb/providers.py
@@ -121,11 +121,14 @@
     preferred_file = None
     preferred_ver = None
 
-    localdata = data.createCopy(cfgData)
-    localdata.setVar('OVERRIDES', "%s:pn-%s:%s" % (data.getVar('OVERRIDES', localdata), pn, pn))
-    bb.data.update_data(localdata)
+    # pn can contain '_', e.g. gcc-cross-x86_64 and an override cannot
+    # hence we do this manually rather than use OVERRIDES
+    preferred_v = cfgData.getVar("PREFERRED_VERSION_pn-%s" % pn, True)
+    if not preferred_v:
+        preferred_v = cfgData.getVar("PREFERRED_VERSION_%s" % pn, True)
+    if not preferred_v:
+        preferred_v = cfgData.getVar("PREFERRED_VERSION", True)
 
-    preferred_v = localdata.getVar('PREFERRED_VERSION', True)
     if preferred_v:
         m = re.match('(\d+:)*(.*)(_.*)*', preferred_v)
         if m:
@@ -223,7 +226,7 @@
 def _filterProviders(providers, item, cfgData, dataCache):
     """
     Take a list of providers and filter/reorder according to the
-    environment variables and previous build results
+    environment variables
     """
     eligible = []
     preferred_versions = {}
@@ -280,7 +283,7 @@
 def filterProviders(providers, item, cfgData, dataCache):
     """
     Take a list of providers and filter/reorder according to the
-    environment variables and previous build results
+    environment variables
     Takes a "normal" target item
     """
 
@@ -308,38 +311,56 @@
 def filterProvidersRunTime(providers, item, cfgData, dataCache):
     """
     Take a list of providers and filter/reorder according to the
-    environment variables and previous build results
+    environment variables
     Takes a "runtime" target item
     """
 
     eligible = _filterProviders(providers, item, cfgData, dataCache)
 
-    # Should use dataCache.preferred here?
-    preferred = []
-    preferred_vars = []
-    pns = {}
-    for p in eligible:
-        pns[dataCache.pkg_fn[p]] = p
-    for p in eligible:
-        pn = dataCache.pkg_fn[p]
-        provides = dataCache.pn_provides[pn]
-        for provide in provides:
-            prefervar = cfgData.getVar('PREFERRED_PROVIDER_%s' % provide, True)
-            #logger.debug(1, "checking PREFERRED_PROVIDER_%s (value %s) against %s", provide, prefervar, pns.keys())
-            if prefervar in pns and pns[prefervar] not in preferred:
-                var = "PREFERRED_PROVIDER_%s = %s" % (provide, prefervar)
-                logger.verbose("selecting %s to satisfy runtime %s due to %s", prefervar, item, var)
-                preferred_vars.append(var)
-                pref = pns[prefervar]
-                eligible.remove(pref)
-                eligible = [pref] + eligible
-                preferred.append(pref)
+    # First try and match any PREFERRED_RPROVIDER entry
+    prefervar = cfgData.getVar('PREFERRED_RPROVIDER_%s' % item, True)
+    foundUnique = False
+    if prefervar:
+        for p in eligible:
+            pn = dataCache.pkg_fn[p]
+            if prefervar == pn:
+                logger.verbose("selecting %s to satisfy %s due to PREFERRED_RPROVIDER", pn, item)
+                eligible.remove(p)
+                eligible = [p] + eligible
+                foundUnique = True
+                numberPreferred = 1
                 break
 
-    numberPreferred = len(preferred)
+    # If we didn't find an RPROVIDER entry, try and infer the provider from PREFERRED_PROVIDER entries
+    # by looking through the provides of each eligible recipe and seeing if a PREFERRED_PROVIDER was set.
+    # This is most useful for virtual/ entries rather than having a RPROVIDER per entry.
+    if not foundUnique:
+        # Should use dataCache.preferred here?
+        preferred = []
+        preferred_vars = []
+        pns = {}
+        for p in eligible:
+            pns[dataCache.pkg_fn[p]] = p
+        for p in eligible:
+            pn = dataCache.pkg_fn[p]
+            provides = dataCache.pn_provides[pn]
+            for provide in provides:
+                prefervar = cfgData.getVar('PREFERRED_PROVIDER_%s' % provide, True)
+                #logger.debug(1, "checking PREFERRED_PROVIDER_%s (value %s) against %s", provide, prefervar, pns.keys())
+                if prefervar in pns and pns[prefervar] not in preferred:
+                    var = "PREFERRED_PROVIDER_%s = %s" % (provide, prefervar)
+                    logger.verbose("selecting %s to satisfy runtime %s due to %s", prefervar, item, var)
+                    preferred_vars.append(var)
+                    pref = pns[prefervar]
+                    eligible.remove(pref)
+                    eligible = [pref] + eligible
+                    preferred.append(pref)
+                    break
+
+        numberPreferred = len(preferred)
 
     if numberPreferred > 1:
-        logger.error("Trying to resolve runtime dependency %s resulted in conflicting PREFERRED_PROVIDER entries being found.\nThe providers found were: %s\nThe PREFERRED_PROVIDER entries resulting in this conflict were: %s", item, preferred, preferred_vars)
+        logger.error("Trying to resolve runtime dependency %s resulted in conflicting PREFERRED_PROVIDER entries being found.\nThe providers found were: %s\nThe PREFERRED_PROVIDER entries resulting in this conflict were: %s. You could set PREFERRED_RPROVIDER_%s" % (item, preferred, preferred_vars, item))
 
     logger.debug(1, "sorted runtime providers for %s are: %s", item, eligible)
 
@@ -379,3 +400,29 @@
             logger.debug(1, "Assuming %s is a dynamic package, but it may not exist" % rdepend)
 
     return rproviders
+
+
+def buildWorldTargetList(dataCache):
+    """
+    Build package list for "bitbake world"
+    """
+    if dataCache.world_target:
+        return
+
+    logger.debug(1, "collating packages for \"world\"")
+    for f in dataCache.possible_world:
+        terminal = True
+        pn = dataCache.pkg_fn[f]
+
+        for p in dataCache.pn_provides[pn]:
+            if p.startswith('virtual/'):
+                logger.debug(2, "World build skipping %s due to %s provider starting with virtual/", f, p)
+                terminal = False
+                break
+            for pf in dataCache.providers[p]:
+                if dataCache.pkg_fn[pf] != pn:
+                    logger.debug(2, "World build skipping %s due to both us and %s providing %s", f, pf, p)
+                    terminal = False
+                    break
+        if terminal:
+            dataCache.world_target.add(pn)
diff --git a/yocto-poky/bitbake/lib/bb/runqueue.py b/yocto-poky/bitbake/lib/bb/runqueue.py
index 878028a..e1b9b2e 100644
--- a/yocto-poky/bitbake/lib/bb/runqueue.py
+++ b/yocto-poky/bitbake/lib/bb/runqueue.py
@@ -261,6 +261,13 @@
         taskname = self.runq_task[task] + task_name_suffix
         return "%s, %s" % (fn, taskname)
 
+    def get_short_user_idstring(self, task, task_name_suffix = ""):
+        fn = self.taskData.fn_index[self.runq_fnid[task]]
+        pn = self.dataCache.pkg_fn[fn]
+        taskname = self.runq_task[task] + task_name_suffix
+        return "%s:%s" % (pn, taskname)
+
+
     def get_task_id(self, fnid, taskname):
         for listid in xrange(len(self.runq_fnid)):
             if self.runq_fnid[listid] == fnid and self.runq_task[listid] == taskname:
@@ -634,23 +641,33 @@
 
             fnid = taskData.build_targets[targetid][0]
             fn = taskData.fn_index[fnid]
-            self.target_pairs.append((fn, target[1]))
+            task = target[1]
+            parents = False
+            if task.endswith('-'):
+                parents = True
+                task = task[:-1]
+
+            self.target_pairs.append((fn, task))
 
             if fnid in taskData.failed_fnids:
                 continue
 
-            if target[1] not in taskData.tasks_lookup[fnid]:
+            if task not in taskData.tasks_lookup[fnid]:
                 import difflib
-                close_matches = difflib.get_close_matches(target[1], taskData.tasks_lookup[fnid], cutoff=0.7)
+                close_matches = difflib.get_close_matches(task, taskData.tasks_lookup[fnid], cutoff=0.7)
                 if close_matches:
                     extra = ". Close matches:\n  %s" % "\n  ".join(close_matches)
                 else:
                     extra = ""
-                bb.msg.fatal("RunQueue", "Task %s does not exist for target %s%s" % (target[1], target[0], extra))
-
-            listid = taskData.tasks_lookup[fnid][target[1]]
-
-            mark_active(listid, 1)
+                bb.msg.fatal("RunQueue", "Task %s does not exist for target %s%s" % (task, target[0], extra))
+  
+            # For tasks called "XXXX-", ony run their dependencies
+            listid = taskData.tasks_lookup[fnid][task]
+            if parents:
+                for i in self.runq_depends[listid]:
+                    mark_active(i, 1)
+            else:
+                mark_active(listid, 1)
 
         # Step C - Prune all inactive tasks
         #
@@ -743,11 +760,72 @@
                         seen_pn.append(pn)
                     else:
                         bb.fatal("Multiple versions of %s are due to be built (%s). Only one version of a given PN should be built in any given build. You likely need to set PREFERRED_VERSION_%s to select the correct version or don't depend on multiple versions." % (pn, " ".join(prov_list[prov]), pn))
-                msg = "Multiple .bb files are due to be built which each provide %s (%s)." % (prov, " ".join(prov_list[prov]))
+                msg = "Multiple .bb files are due to be built which each provide %s:\n  %s" % (prov, "\n  ".join(prov_list[prov]))
+                #
+                # Construct a list of things which uniquely depend on each provider
+                # since this may help the user figure out which dependency is triggering this warning
+                #
+                msg += "\nA list of tasks depending on these providers is shown and may help explain where the dependency comes from."
+                deplist = {}
+                commondeps = None
+                for provfn in prov_list[prov]:
+                    deps = set()
+                    for task, fnid in enumerate(self.runq_fnid):
+                        fn = taskData.fn_index[fnid]
+                        if fn != provfn:
+                            continue
+                        for dep in self.runq_revdeps[task]:
+                            fn = taskData.fn_index[self.runq_fnid[dep]]
+                            if fn == provfn:
+                                continue
+                            deps.add(self.get_short_user_idstring(dep))
+                    if not commondeps:
+                        commondeps = set(deps)
+                    else:
+                        commondeps &= deps
+                    deplist[provfn] = deps
+                for provfn in deplist:
+                    msg += "\n%s has unique dependees:\n  %s" % (provfn, "\n  ".join(deplist[provfn] - commondeps))
+                #
+                # Construct a list of provides and runtime providers for each recipe
+                # (rprovides has to cover RPROVIDES, PACKAGES, PACKAGES_DYNAMIC)
+                #
+                msg += "\nIt could be that one recipe provides something the other doesn't and should. The following provider and runtime provider differences may be helpful."
+                provide_results = {}
+                rprovide_results = {}
+                commonprovs = None
+                commonrprovs = None
+                for provfn in prov_list[prov]:
+                    provides = set(self.dataCache.fn_provides[provfn])
+                    rprovides = set()
+                    for rprovide in self.dataCache.rproviders:
+                        if provfn in self.dataCache.rproviders[rprovide]:
+                            rprovides.add(rprovide)
+                    for package in self.dataCache.packages:
+                        if provfn in self.dataCache.packages[package]:
+                            rprovides.add(package)
+                    for package in self.dataCache.packages_dynamic:
+                        if provfn in self.dataCache.packages_dynamic[package]:
+                            rprovides.add(package)
+                    if not commonprovs:
+                        commonprovs = set(provides)
+                    else:
+                        commonprovs &= provides
+                    provide_results[provfn] = provides
+                    if not commonrprovs:
+                        commonrprovs = set(rprovides)
+                    else:
+                        commonrprovs &= rprovides
+                    rprovide_results[provfn] = rprovides
+                #msg += "\nCommon provides:\n  %s" % ("\n  ".join(commonprovs))
+                #msg += "\nCommon rprovides:\n  %s" % ("\n  ".join(commonrprovs))
+                for provfn in prov_list[prov]:
+                    msg += "\n%s has unique provides:\n  %s" % (provfn, "\n  ".join(provide_results[provfn] - commonprovs))
+                    msg += "\n%s has unique rprovides:\n  %s" % (provfn, "\n  ".join(rprovide_results[provfn] - commonrprovs))
+
                 if self.warn_multi_bb:
                     logger.warn(msg)
                 else:
-                    msg += "\n This usually means one provides something the other doesn't and should."
                     logger.error(msg)
 
         # Create a whitelist usable by the stamp checks
@@ -798,7 +876,7 @@
                     invalidate_task(fn, st, True)
 
         # Create and print to the logs a virtual/xxxx -> PN (fn) table
-        virtmap = taskData.get_providermap()
+        virtmap = taskData.get_providermap(prefix="virtual/")
         virtpnmap = {}
         for v in virtmap:
             virtpnmap[v] = self.dataCache.pkg_fn[virtmap[v]]
@@ -819,6 +897,7 @@
                         procdep.append(self.taskData.fn_index[self.runq_fnid[dep]] + "." + self.runq_task[dep])
                     self.runq_hash[task] = bb.parse.siggen.get_taskhash(self.taskData.fn_index[self.runq_fnid[task]], self.runq_task[task], procdep, self.dataCache)
 
+        bb.parse.siggen.writeout_file_checksum_cache()
         return len(self.runq_fnid)
 
     def dump_data(self, taskQueue):
@@ -874,6 +953,7 @@
         if self.cooker.configuration.profile:
             magic = "decafbadbad"
         if fakeroot:
+            magic = magic + "beef"
             fakerootcmd = self.cfgData.getVar("FAKEROOTCMD", True)
             fakerootenv = (self.cfgData.getVar("FAKEROOTBASEENV", True) or "").split()
             env = os.environ.copy()
@@ -1067,9 +1147,12 @@
             retval = self.rqexe.execute()
 
         if self.state is runQueueRunInit:
-            logger.info("Executing RunQueue Tasks")
-            self.rqexe = RunQueueExecuteTasks(self)
-            self.state = runQueueRunning
+            if self.cooker.configuration.setsceneonly:
+                self.state = runQueueComplete
+            else:
+                logger.info("Executing RunQueue Tasks")
+                self.rqexe = RunQueueExecuteTasks(self)
+                self.state = runQueueRunning
 
         if self.state is runQueueRunning:
             retval = self.rqexe.execute()
@@ -1388,7 +1471,7 @@
                 self.runq_buildable.append(1)
             else:
                 self.runq_buildable.append(0)
-            if len(self.rqdata.runq_revdeps[task]) > 0 and self.rqdata.runq_revdeps[task].issubset(self.rq.scenequeue_covered) and task not in self.rq.scenequeue_notcovered:
+            if len(self.rqdata.runq_revdeps[task]) > 0 and self.rqdata.runq_revdeps[task].issubset(self.rq.scenequeue_covered):
                 self.rq.scenequeue_covered.add(task)
 
         found = True
@@ -1399,7 +1482,7 @@
                     continue
                 logger.debug(1, 'Considering %s (%s): %s' % (task, self.rqdata.get_user_idstring(task), str(self.rqdata.runq_revdeps[task])))
 
-                if len(self.rqdata.runq_revdeps[task]) > 0 and self.rqdata.runq_revdeps[task].issubset(self.rq.scenequeue_covered) and task not in self.rq.scenequeue_notcovered:
+                if len(self.rqdata.runq_revdeps[task]) > 0 and self.rqdata.runq_revdeps[task].issubset(self.rq.scenequeue_covered):
                     found = True
                     self.rq.scenequeue_covered.add(task)
 
@@ -1708,6 +1791,7 @@
                 sq_revdeps_new[point] = set()
                 if point in self.rqdata.runq_setscene:
                     sq_revdeps_new[point] = tasks
+                    tasks = set()
                 for dep in self.rqdata.runq_depends[point]:
                     if point in sq_revdeps[dep]:
                         sq_revdeps[dep].remove(point)
@@ -2014,9 +2098,6 @@
         self.rq.scenequeue_covered = set()
         for task in oldcovered:
             self.rq.scenequeue_covered.add(self.rqdata.runq_setscene[task])
-        self.rq.scenequeue_notcovered = set()
-        for task in self.scenequeue_notcovered:
-            self.rq.scenequeue_notcovered.add(self.rqdata.runq_setscene[task])
 
         logger.debug(1, 'We can skip tasks %s', sorted(self.rq.scenequeue_covered))
 
diff --git a/yocto-poky/bitbake/lib/bb/server/__init__.py b/yocto-poky/bitbake/lib/bb/server/__init__.py
index da5e480..538a633 100644
--- a/yocto-poky/bitbake/lib/bb/server/__init__.py
+++ b/yocto-poky/bitbake/lib/bb/server/__init__.py
@@ -63,6 +63,9 @@
     def terminate(self):
         pass
 
+    def setupEventQueue(self):
+        pass
+
 
 """ BitBakeBaseServer class is the common ancestor to all Bitbake servers
 
diff --git a/yocto-poky/bitbake/lib/bb/server/process.py b/yocto-poky/bitbake/lib/bb/server/process.py
index 5fca350..a3078a8 100644
--- a/yocto-poky/bitbake/lib/bb/server/process.py
+++ b/yocto-poky/bitbake/lib/bb/server/process.py
@@ -53,10 +53,12 @@
         while True:
             # don't let the user ctrl-c while we're waiting for a response
             try:
-                if self.connection.poll(20):
-                    return self.connection.recv()
-                else:
-                    bb.fatal("Timeout while attempting to communicate with bitbake server")
+                for idx in range(0,4): # 0, 1, 2, 3
+                    if self.connection.poll(5):
+                        return self.connection.recv()
+                    else:
+                        bb.warn("Timeout while attempting to communicate with bitbake server")
+                bb.fatal("Gave up; Too many tries: timeout while attempting to communicate with bitbake server")
             except KeyboardInterrupt:
                 pass
 
@@ -106,6 +108,7 @@
         # the UI and communicated to us
         self.quitin.close()
         signal.signal(signal.SIGINT, signal.SIG_IGN)
+        bb.utils.set_process_name("Cooker")
         while not self.quit:
             try:
                 if self.command_channel.poll():
@@ -212,6 +215,7 @@
     def __init__(self, maxsize):
         multiprocessing.queues.Queue.__init__(self, maxsize)
         self.exit = False
+        bb.utils.set_process_name("ProcessEQueue")
 
     def setexit(self):
         self.exit = True
@@ -238,7 +242,7 @@
 
 
 class BitBakeServer(BitBakeBaseServer):
-    def initServer(self):
+    def initServer(self, single_use=True):
         # establish communication channels.  We use bidirectional pipes for
         # ui <--> server command/response pairs
         # and a queue for server -> ui event notifications
diff --git a/yocto-poky/bitbake/lib/bb/server/xmlrpc.py b/yocto-poky/bitbake/lib/bb/server/xmlrpc.py
index b7647c1..ace1cf6 100644
--- a/yocto-poky/bitbake/lib/bb/server/xmlrpc.py
+++ b/yocto-poky/bitbake/lib/bb/server/xmlrpc.py
@@ -97,10 +97,10 @@
 
         # we don't allow connections if the cooker is running
         if (self.cooker.state in [bb.cooker.state.parsing, bb.cooker.state.running]):
-            return None
+            return None, "Cooker is busy: %s" % bb.cooker.state.get_name(self.cooker.state)
 
         self.event_handle = bb.event.register_UIHhandler(s, True)
-        return self.event_handle
+        return self.event_handle, 'OK'
 
     def unregisterEventHandler(self, handlerNum):
         """
@@ -186,13 +186,12 @@
     # remove this when you're done with debugging
     # allow_reuse_address = True
 
-    def __init__(self, interface):
+    def __init__(self, interface, single_use=False):
         """
         Constructor
         """
         BaseImplServer.__init__(self)
-        if (interface[1] == 0):     # anonymous port, not getting reused
-            self.single_use = True
+        self.single_use = single_use
         # Use auto port configuration
         if (interface[1] == -1):
             interface = (interface[0], 0)
@@ -205,7 +204,6 @@
         self.commands = BitBakeServerCommands(self)
         self.autoregister_all_functions(self.commands, "")
         self.interface = interface
-        self.single_use = False
 
     def addcooker(self, cooker):
         BaseImplServer.addcooker(self, cooker)
@@ -302,7 +300,9 @@
             return None
 
         self.transport.set_connection_token(token)
+        return self
 
+    def setupEventQueue(self):
         self.events = uievent.BBUIEventQueue(self.connection, self.clientinfo)
         for event in bb.event.ui_queue:
             self.events.queue_event(event)
@@ -314,8 +314,6 @@
             # no need to log it here, the error shall be sent to the client
             raise BaseException(error)
 
-        return self
-
     def removeClient(self):
         if not self.observer_only:
             self.connection.removeClient()
@@ -334,9 +332,9 @@
             pass
 
 class BitBakeServer(BitBakeBaseServer):
-    def initServer(self, interface = ("localhost", 0)):
+    def initServer(self, interface = ("localhost", 0), single_use = False):
         self.interface = interface
-        self.serverImpl = XMLRPCServer(interface)
+        self.serverImpl = XMLRPCServer(interface, single_use)
 
     def detach(self):
         daemonize.createDaemon(self.serverImpl.serve_forever, "bitbake-cookerdaemon.log")
diff --git a/yocto-poky/bitbake/lib/bb/siggen.py b/yocto-poky/bitbake/lib/bb/siggen.py
index 0352e45..88fc0f1 100644
--- a/yocto-poky/bitbake/lib/bb/siggen.py
+++ b/yocto-poky/bitbake/lib/bb/siggen.py
@@ -4,6 +4,7 @@
 import re
 import tempfile
 import bb.data
+from bb.checksum import FileChecksumCache
 
 logger = logging.getLogger('BitBake.SigGen')
 
@@ -37,6 +38,7 @@
         self.taskhash = {}
         self.runtaskdeps = {}
         self.file_checksum_values = {}
+        self.taints = {}
 
     def finalise(self, fn, d, varient):
         return
@@ -44,7 +46,8 @@
     def get_taskhash(self, fn, task, deps, dataCache):
         return "0"
 
-    def set_taskdata(self, hashes, deps, checksum):
+    def writeout_file_checksum_cache(self):
+        """Write/update the file checksum cache onto disk"""
         return
 
     def stampfile(self, stampbase, file_name, taskname, extrainfo):
@@ -63,10 +66,10 @@
         return
 
     def get_taskdata(self):
-       return (self.runtaskdeps, self.taskhash, self.file_checksum_values)
+       return (self.runtaskdeps, self.taskhash, self.file_checksum_values, self.taints)
 
     def set_taskdata(self, data):
-        self.runtaskdeps, self.taskhash, self.file_checksum_values = data
+        self.runtaskdeps, self.taskhash, self.file_checksum_values, self.taints = data
 
 
 class SignatureGeneratorBasic(SignatureGenerator):
@@ -87,6 +90,12 @@
         self.basewhitelist = set((data.getVar("BB_HASHBASE_WHITELIST", True) or "").split())
         self.taskwhitelist = None
         self.init_rundepcheck(data)
+        checksum_cache_file = data.getVar("BB_HASH_CHECKSUM_CACHE_FILE", True)
+        if checksum_cache_file:
+            self.checksum_cache = FileChecksumCache()
+            self.checksum_cache.init_cache(data, checksum_cache_file)
+        else:
+            self.checksum_cache = None
 
     def init_rundepcheck(self, data):
         self.taskwhitelist = data.getVar("BB_HASHTASK_WHITELIST", True) or None
@@ -146,7 +155,7 @@
         try:
             taskdeps = self._build_data(fn, d)
         except:
-            bb.note("Error during finalise of %s" % fn)
+            bb.warn("Error during finalise of %s" % fn)
             raise
 
         #Slow but can be useful for debugging mismatched basehashes
@@ -178,8 +187,9 @@
         k = fn + "." + task
         data = dataCache.basetaskhash[k]
         self.runtaskdeps[k] = []
-        self.file_checksum_values[k] = {}
+        self.file_checksum_values[k] = []
         recipename = dataCache.pkg_fn[fn]
+
         for dep in sorted(deps, key=clean_basepath):
             depname = dataCache.pkg_fn[self.pkgnameextract.search(dep).group('fn')]
             if not self.rundep_check(fn, recipename, task, dep, depname, dataCache):
@@ -190,9 +200,12 @@
             self.runtaskdeps[k].append(dep)
 
         if task in dataCache.file_checksums[fn]:
-            checksums = bb.fetch2.get_file_checksums(dataCache.file_checksums[fn][task], recipename)
+            if self.checksum_cache:
+                checksums = self.checksum_cache.get_checksums(dataCache.file_checksums[fn][task], recipename)
+            else:
+                checksums = bb.fetch2.get_file_checksums(dataCache.file_checksums[fn][task], recipename)
             for (f,cs) in checksums:
-                self.file_checksum_values[k][f] = cs
+                self.file_checksum_values[k].append((f,cs))
                 if cs:
                     data = data + cs
 
@@ -215,10 +228,22 @@
         #d.setVar("BB_TASKHASH_task-%s" % task, taskhash[task])
         return h
 
+    def writeout_file_checksum_cache(self):
+        """Write/update the file checksum cache onto disk"""
+        if self.checksum_cache:
+            self.checksum_cache.save_extras()
+            self.checksum_cache.save_merge()
+        else:
+            bb.fetch2.fetcher_parse_save()
+            bb.fetch2.fetcher_parse_done()
+
     def dump_sigtask(self, fn, task, stampbase, runtime):
+
         k = fn + "." + task
-        if runtime == "customfile":
+        referencestamp = stampbase
+        if isinstance(runtime, str) and runtime.startswith("customfile"):
             sigfile = stampbase
+            referencestamp = runtime[11:]
         elif runtime and k in self.taskhash:
             sigfile = stampbase + "." + task + ".sigdata" + "." + self.taskhash[k]
         else:
@@ -227,6 +252,7 @@
         bb.utils.mkdirhier(os.path.dirname(sigfile))
 
         data = {}
+        data['task'] = task
         data['basewhitelist'] = self.basewhitelist
         data['taskwhitelist'] = self.taskwhitelist
         data['taskdeps'] = self.taskdeps[fn][task]
@@ -242,12 +268,13 @@
 
         if runtime and k in self.taskhash:
             data['runtaskdeps'] = self.runtaskdeps[k]
-            data['file_checksum_values'] = [(os.path.basename(f), cs) for f,cs in self.file_checksum_values[k].items()]
+            data['file_checksum_values'] = [(os.path.basename(f), cs) for f,cs in self.file_checksum_values[k]]
             data['runtaskhashes'] = {}
             for dep in data['runtaskdeps']:
                 data['runtaskhashes'][dep] = self.taskhash[dep]
+            data['taskhash'] = self.taskhash[k]
 
-        taint = self.read_taint(fn, task, stampbase)
+        taint = self.read_taint(fn, task, referencestamp)
         if taint:
             data['taint'] = taint
 
@@ -269,6 +296,15 @@
                 pass
             raise err
 
+        computed_basehash = calc_basehash(data)
+        if computed_basehash != self.basehash[k]:
+            bb.error("Basehash mismatch %s verses %s for %s" % (computed_basehash, self.basehash[k], k))
+        if k in self.taskhash:
+            computed_taskhash = calc_taskhash(data)
+            if computed_taskhash != self.taskhash[k]:
+                bb.error("Taskhash mismatch %s verses %s for %s" % (computed_taskhash, self.taskhash[k], k))
+
+
     def dump_sigs(self, dataCache, options):
         for fn in self.taskdeps:
             for task in self.taskdeps[fn]:
@@ -308,7 +344,8 @@
     import bb.parse
     fn = d.getVar("BB_FILENAME", True)
     task = "do_" + d.getVar("BB_CURRENTTASK", True)
-    bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile")
+    referencestamp = bb.build.stamp_internal(task, d, None, True)
+    bb.parse.siggen.dump_sigtask(fn, task, outfile, "customfile:" + referencestamp)
 
 def clean_basepath(a):
     b = a.rsplit("/", 2)[1] + a.rsplit("/", 2)[2]
@@ -485,6 +522,40 @@
     return output
 
 
+def calc_basehash(sigdata):
+    task = sigdata['task']
+    basedata = sigdata['varvals'][task]
+
+    if basedata is None:
+        basedata = ''
+
+    alldeps = sigdata['taskdeps']
+    for dep in alldeps:
+        basedata = basedata + dep
+        val = sigdata['varvals'][dep]
+        if val is not None:
+            basedata = basedata + str(val)
+
+    return hashlib.md5(basedata).hexdigest()
+
+def calc_taskhash(sigdata):
+    data = sigdata['basehash']
+
+    for dep in sigdata['runtaskdeps']:
+        data = data + sigdata['runtaskhashes'][dep]
+
+    for c in sigdata['file_checksum_values']:
+        data = data + c[1]
+
+    if 'taint' in sigdata:
+        if 'nostamp:' in sigdata['taint']:
+            data = data + sigdata['taint'][8:]
+        else:
+            data = data + sigdata['taint']
+
+    return hashlib.md5(data).hexdigest()
+
+
 def dump_sigfile(a):
     output = []
 
@@ -518,17 +589,13 @@
     if 'taint' in a_data:
         output.append("Tainted (by forced/invalidated task): %s" % a_data['taint'])
 
-    data = a_data['basehash']
-    for dep in a_data['runtaskdeps']:
-        data = data + a_data['runtaskhashes'][dep]
+    if 'task' in a_data:
+        computed_basehash = calc_basehash(a_data)
+        output.append("Computed base hash is %s and from file %s" % (computed_basehash, a_data['basehash']))
+    else:
+        output.append("Unable to compute base hash")
 
-    for c in a_data['file_checksum_values']:
-        data = data + c[1]
-
-    if 'taint' in a_data:
-        data = data + a_data['taint']
-
-    h = hashlib.md5(data).hexdigest()
-    output.append("Computed Hash is %s" % h)
+    computed_taskhash = calc_taskhash(a_data)
+    output.append("Computed task hash is %s" % computed_taskhash)
 
     return output
diff --git a/yocto-poky/bitbake/lib/bb/taskdata.py b/yocto-poky/bitbake/lib/bb/taskdata.py
index 4d12b33..9ae52d7 100644
--- a/yocto-poky/bitbake/lib/bb/taskdata.py
+++ b/yocto-poky/bitbake/lib/bb/taskdata.py
@@ -172,6 +172,8 @@
         if fnid in self.tasks_fnid:
             return
 
+        self.add_extra_deps(fn, dataCache)
+
         for task in task_deps['tasks']:
 
             # Work out task dependencies
@@ -242,6 +244,21 @@
                 self.fail_fnid(fnid)
                 return
 
+    def add_extra_deps(self, fn, dataCache):
+        func = dataCache.extradepsfunc.get(fn, None)
+        if func:
+            bb.providers.buildWorldTargetList(dataCache)
+            pn = dataCache.pkg_fn[fn]
+            params = {'deps': dataCache.deps[fn],
+                      'world_target': dataCache.world_target,
+                      'pkg_pn': dataCache.pkg_pn,
+                      'self_pn': pn}
+            funcname = '_%s_calculate_extra_depends' % pn.replace('-', '_')
+            paramlist = ','.join(params.keys())
+            func = 'def %s(%s):\n%s\n\n%s(%s)' % (funcname, paramlist, func, funcname, paramlist)
+            bb.utils.better_exec(func, params)
+
+
     def have_build_target(self, target):
         """
         Have we a build target matching this name?
@@ -429,7 +446,14 @@
             return
 
         if not item in dataCache.providers:
-            bb.event.fire(bb.event.NoProvider(item, dependees=self.get_dependees_str(item), reasons=self.get_reasons(item), close_matches=self.get_close_matches(item, dataCache.providers.keys())), cfgData)
+            close_matches = self.get_close_matches(item, dataCache.providers.keys())
+            # Is it in RuntimeProviders ?
+            all_p = bb.providers.getRuntimeProviders(dataCache, item)
+            for fn in all_p:
+                new = dataCache.pkg_fn[fn] + " RPROVIDES " + item
+                if new not in close_matches:
+                    close_matches.append(new)
+            bb.event.fire(bb.event.NoProvider(item, dependees=self.get_dependees_str(item), reasons=self.get_reasons(item), close_matches=close_matches), cfgData)
             raise bb.providers.NoProvider(item)
 
         if self.have_build_target(item):
@@ -612,17 +636,16 @@
                 break
         # self.dump_data()
 
-    def get_providermap(self):
-        virts = []
-        virtmap = {}
-
+    def get_providermap(self, prefix=None):
+        provmap = {}
         for name in self.build_names_index:
-            if name.startswith("virtual/"):
-                virts.append(name)
-        for v in virts:
-            if self.have_build_target(v):
-                virtmap[v] = self.fn_index[self.get_provider(v)[0]]
-        return virtmap
+            if prefix and not name.startswith(prefix):
+                continue
+            if self.have_build_target(name):
+                provider = self.get_provider(name)
+                if provider:
+                    provmap[name] = self.fn_index[provider[0]]
+        return provmap
 
     def dump_data(self):
         """
diff --git a/yocto-poky/bitbake/lib/bb/tests/codeparser.py b/yocto-poky/bitbake/lib/bb/tests/codeparser.py
index 4454bc5..bb820e4 100644
--- a/yocto-poky/bitbake/lib/bb/tests/codeparser.py
+++ b/yocto-poky/bitbake/lib/bb/tests/codeparser.py
@@ -293,7 +293,12 @@
     def test_python(self):
         self.d.setVar("FOO", self.pydata)
         self.setEmptyVars(["inexpand", "a", "test2", "test"])
-        self.d.setVarFlags("FOO", {"func": True, "python": True})
+        self.d.setVarFlags("FOO", {
+            "func": True,
+            "python": True,
+            "lineno": 1,
+            "filename": "example.bb",
+        })
 
         deps, values = bb.data.build_dependencies("FOO", set(self.d.keys()), set(), set(), self.d)
 
diff --git a/yocto-poky/bitbake/lib/bb/tests/data.py b/yocto-poky/bitbake/lib/bb/tests/data.py
index e9aab57..1223230 100644
--- a/yocto-poky/bitbake/lib/bb/tests/data.py
+++ b/yocto-poky/bitbake/lib/bb/tests/data.py
@@ -80,6 +80,11 @@
         val = self.d.expand("${@d.getVar('foo', True) + ' ${bar}'}")
         self.assertEqual(str(val), "value_of_foo value_of_bar")
 
+    def test_python_unexpanded(self):
+        self.d.setVar("bar", "${unsetvar}")
+        val = self.d.expand("${@d.getVar('foo', True) + ' ${bar}'}")
+        self.assertEqual(str(val), "${@d.getVar('foo', True) + ' ${unsetvar}'}")
+
     def test_python_snippet_syntax_error(self):
         self.d.setVar("FOO", "${@foo = 5}")
         self.assertRaises(bb.data_smart.ExpansionError, self.d.getVar, "FOO", True)
@@ -394,13 +399,13 @@
         self.d.setVarFlag("foo", "flag2", "value of flag2")
 
     def test_setflag(self):
-        self.assertEqual(self.d.getVarFlag("foo", "flag1"), "value of flag1")
-        self.assertEqual(self.d.getVarFlag("foo", "flag2"), "value of flag2")
+        self.assertEqual(self.d.getVarFlag("foo", "flag1", False), "value of flag1")
+        self.assertEqual(self.d.getVarFlag("foo", "flag2", False), "value of flag2")
 
     def test_delflag(self):
         self.d.delVarFlag("foo", "flag2")
-        self.assertEqual(self.d.getVarFlag("foo", "flag1"), "value of flag1")
-        self.assertEqual(self.d.getVarFlag("foo", "flag2"), None)
+        self.assertEqual(self.d.getVarFlag("foo", "flag1", False), "value of flag1")
+        self.assertEqual(self.d.getVarFlag("foo", "flag2", False), None)
 
 
 class Contains(unittest.TestCase):
diff --git a/yocto-poky/bitbake/lib/bb/tests/fetch.py b/yocto-poky/bitbake/lib/bb/tests/fetch.py
index 94173c1..4ba688b 100644
--- a/yocto-poky/bitbake/lib/bb/tests/fetch.py
+++ b/yocto-poky/bitbake/lib/bb/tests/fetch.py
@@ -228,7 +228,38 @@
             'params': {},
             'query': {},
             'relative': False
+        },
+        "http://somesite.net;someparam=1": {
+            'uri': 'http://somesite.net;someparam=1',
+            'scheme': 'http',
+            'hostname': 'somesite.net',
+            'port': None,
+            'hostport': 'somesite.net',
+            'path': '',
+            'userinfo': '',
+            'userinfo': '',
+            'username': '',
+            'password': '',
+            'params': {"someparam" : "1"},
+            'query': {},
+            'relative': False
+        },
+        "file://somelocation;someparam=1": {
+            'uri': 'file:somelocation;someparam=1',
+            'scheme': 'file',
+            'hostname': '',
+            'port': None,
+            'hostport': '',
+            'path': 'somelocation',
+            'userinfo': '',
+            'userinfo': '',
+            'username': '',
+            'password': '',
+            'params': {"someparam" : "1"},
+            'query': {},
+            'relative': True
         }
+
     }
 
     def test_uri(self):
@@ -451,9 +482,7 @@
 
     def test_local_wildcard(self):
         tree = self.fetchUnpack(['file://a', 'file://dir/*'])
-        # FIXME: this is broken - it should return ['a', 'dir/c', 'dir/d', 'dir/subdir/e']
-        # see https://bugzilla.yoctoproject.org/show_bug.cgi?id=6128
-        self.assertEqual(tree, ['a', 'b', 'dir/c', 'dir/d', 'dir/subdir/e'])
+        self.assertEqual(tree, ['a',  'dir/c', 'dir/d', 'dir/subdir/e'])
 
     def test_local_dir(self):
         tree = self.fetchUnpack(['file://a', 'file://dir'])
@@ -461,17 +490,15 @@
 
     def test_local_subdir(self):
         tree = self.fetchUnpack(['file://dir/subdir'])
-        # FIXME: this is broken - it should return ['dir/subdir/e']
-        # see https://bugzilla.yoctoproject.org/show_bug.cgi?id=6129
-        self.assertEqual(tree, ['subdir/e'])
+        self.assertEqual(tree, ['dir/subdir/e'])
 
     def test_local_subdir_file(self):
         tree = self.fetchUnpack(['file://dir/subdir/e'])
         self.assertEqual(tree, ['dir/subdir/e'])
 
     def test_local_subdirparam(self):
-        tree = self.fetchUnpack(['file://a;subdir=bar'])
-        self.assertEqual(tree, ['bar/a'])
+        tree = self.fetchUnpack(['file://a;subdir=bar', 'file://dir;subdir=foo/moo'])
+        self.assertEqual(tree, ['bar/a', 'foo/moo/dir/c', 'foo/moo/dir/d', 'foo/moo/dir/subdir/e'])
 
     def test_local_deepsubdirparam(self):
         tree = self.fetchUnpack(['file://dir/subdir/e;subdir=bar'])
@@ -584,42 +611,49 @@
             os.chdir(os.path.dirname(self.unpackdir))
             fetcher.unpack(self.unpackdir)
 
-        def test_trusted_network(self):
-            # Ensure trusted_network returns False when the host IS in the list.
-            url = "git://Someserver.org/foo;rev=1"
-            self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org someserver.org server2.org server3.org")
-            self.assertTrue(bb.fetch.trusted_network(self.d, url))
 
-        def test_wild_trusted_network(self):
-            # Ensure trusted_network returns true when the *.host IS in the list.
-            url = "git://Someserver.org/foo;rev=1"
-            self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org *.someserver.org server2.org server3.org")
-            self.assertTrue(bb.fetch.trusted_network(self.d, url))
+class TrustedNetworksTest(FetcherTest):
+    def test_trusted_network(self):
+        # Ensure trusted_network returns False when the host IS in the list.
+        url = "git://Someserver.org/foo;rev=1"
+        self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org someserver.org server2.org server3.org")
+        self.assertTrue(bb.fetch.trusted_network(self.d, url))
 
-        def test_prefix_wild_trusted_network(self):
-            # Ensure trusted_network returns true when the prefix matches *.host.
-            url = "git://git.Someserver.org/foo;rev=1"
-            self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org *.someserver.org server2.org server3.org")
-            self.assertTrue(bb.fetch.trusted_network(self.d, url))
+    def test_wild_trusted_network(self):
+        # Ensure trusted_network returns true when the *.host IS in the list.
+        url = "git://Someserver.org/foo;rev=1"
+        self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org *.someserver.org server2.org server3.org")
+        self.assertTrue(bb.fetch.trusted_network(self.d, url))
 
-        def test_two_prefix_wild_trusted_network(self):
-            # Ensure trusted_network returns true when the prefix matches *.host.
-            url = "git://something.git.Someserver.org/foo;rev=1"
-            self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org *.someserver.org server2.org server3.org")
-            self.assertTrue(bb.fetch.trusted_network(self.d, url))
+    def test_prefix_wild_trusted_network(self):
+        # Ensure trusted_network returns true when the prefix matches *.host.
+        url = "git://git.Someserver.org/foo;rev=1"
+        self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org *.someserver.org server2.org server3.org")
+        self.assertTrue(bb.fetch.trusted_network(self.d, url))
 
-        def test_untrusted_network(self):
-            # Ensure trusted_network returns False when the host is NOT in the list.
-            url = "git://someserver.org/foo;rev=1"
-            self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org server2.org server3.org")
-            self.assertFalse(bb.fetch.trusted_network(self.d, url))
+    def test_two_prefix_wild_trusted_network(self):
+        # Ensure trusted_network returns true when the prefix matches *.host.
+        url = "git://something.git.Someserver.org/foo;rev=1"
+        self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org *.someserver.org server2.org server3.org")
+        self.assertTrue(bb.fetch.trusted_network(self.d, url))
 
-        def test_wild_untrusted_network(self):
-            # Ensure trusted_network returns False when the host is NOT in the list.
-            url = "git://*.someserver.org/foo;rev=1"
-            self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org server2.org server3.org")
-            self.assertFalse(bb.fetch.trusted_network(self.d, url))
+    def test_port_trusted_network(self):
+        # Ensure trusted_network returns True, even if the url specifies a port.
+        url = "git://someserver.org:8080/foo;rev=1"
+        self.d.setVar("BB_ALLOWED_NETWORKS", "someserver.org")
+        self.assertTrue(bb.fetch.trusted_network(self.d, url))
 
+    def test_untrusted_network(self):
+        # Ensure trusted_network returns False when the host is NOT in the list.
+        url = "git://someserver.org/foo;rev=1"
+        self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org server2.org server3.org")
+        self.assertFalse(bb.fetch.trusted_network(self.d, url))
+
+    def test_wild_untrusted_network(self):
+        # Ensure trusted_network returns False when the host is NOT in the list.
+        url = "git://*.someserver.org/foo;rev=1"
+        self.d.setVar("BB_ALLOWED_NETWORKS", "server1.org server2.org server3.org")
+        self.assertFalse(bb.fetch.trusted_network(self.d, url))
 
 class URLHandle(unittest.TestCase):
 
@@ -627,11 +661,18 @@
        "http://www.google.com/index.html" : ('http', 'www.google.com', '/index.html', '', '', {}),
        "cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}),
        "cvs://anoncvs:anonymous@cvs.handhelds.org/cvs;tag=V0-99-81;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', 'anonymous', {'tag': 'V0-99-81', 'module': 'familiar/dist/ipkg'}),
-       "git://git.openembedded.org/bitbake;branch=@foo" : ('git', 'git.openembedded.org', '/bitbake', '', '', {'branch': '@foo'})
+       "git://git.openembedded.org/bitbake;branch=@foo" : ('git', 'git.openembedded.org', '/bitbake', '', '', {'branch': '@foo'}),
+       "file://somelocation;someparam=1": ('file', '', 'somelocation', '', '', {'someparam': '1'}),
     }
+    # we require a pathname to encodeurl but users can still pass such urls to 
+    # decodeurl and we need to handle them
+    decodedata = datatable.copy()
+    decodedata.update({
+       "http://somesite.net;someparam=1": ('http', 'somesite.net', '', '', '', {'someparam': '1'}),
+    })
 
     def test_decodeurl(self):
-        for k, v in self.datatable.items():
+        for k, v in self.decodedata.items():
             result = bb.fetch.decodeurl(k)
             self.assertEqual(result, v)
 
@@ -663,7 +704,7 @@
         # version pattern "yyyymmdd"
         ("mobile-broadband-provider-info", "git://git.gnome.org/mobile-broadband-provider-info", "4ed19e11c2975105b71b956440acdb25d46a347d", "")
             : "20120614",
-        # packages with a valid GITTAGREGEX
+        # packages with a valid UPSTREAM_CHECK_GITTAGREGEX
         ("xf86-video-omap", "git://anongit.freedesktop.org/xorg/driver/xf86-video-omap", "ae0394e687f1a77e966cf72f895da91840dffb8f", "(?P<pver>(\d+\.(\d\.?)*))")
             : "0.4.3",
         ("build-appliance-image", "git://git.yoctoproject.org/poky", "b37dd451a52622d5b570183a81583cc34c2ff555", "(?P<pver>(([0-9][\.|_]?)+[0-9]))")
@@ -692,8 +733,8 @@
             : "5.0",
         ("xserver-xorg", "http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.15.1.tar.bz2", "", "")
             : "1.15.1",
-        # packages with valid REGEX_URI and REGEX
-        ("cups", "http://www.cups.org/software/1.7.2/cups-1.7.2-source.tar.bz2", "http://www.cups.org/software.php", "(?P<name>cups\-)(?P<pver>((\d+[\.\-_]*)+))\-source\.tar\.gz")
+        # packages with valid UPSTREAM_CHECK_URI and UPSTREAM_CHECK_REGEX
+        ("cups", "http://www.cups.org/software/1.7.2/cups-1.7.2-source.tar.bz2", "https://github.com/apple/cups/releases", "(?P<name>cups\-)(?P<pver>((\d+[\.\-_]*)+))\-source\.tar\.gz")
             : "2.0.0",
         ("db", "http://download.oracle.com/berkeley-db/db-5.3.21.tar.gz", "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html", "http://download.oracle.com/otn/berkeley-db/(?P<name>db-)(?P<pver>((\d+[\.\-_]*)+))\.tar\.gz")
             : "6.1.19",
@@ -705,7 +746,7 @@
             for k, v in self.test_git_uris.items():
                 self.d.setVar("PN", k[0])
                 self.d.setVar("SRCREV", k[2])
-                self.d.setVar("GITTAGREGEX", k[3])
+                self.d.setVar("UPSTREAM_CHECK_GITTAGREGEX", k[3])
                 ud = bb.fetch2.FetchData(k[1], self.d)
                 pupver= ud.method.latest_versionstring(ud, self.d)
                 verstring = pupver[0]
@@ -715,8 +756,8 @@
         def test_wget_latest_versionstring(self):
             for k, v in self.test_wget_uris.items():
                 self.d.setVar("PN", k[0])
-                self.d.setVar("REGEX_URI", k[2])
-                self.d.setVar("REGEX", k[3])
+                self.d.setVar("UPSTREAM_CHECK_URI", k[2])
+                self.d.setVar("UPSTREAM_CHECK_REGEX", k[3])
                 ud = bb.fetch2.FetchData(k[1], self.d)
                 pupver = ud.method.latest_versionstring(ud, self.d)
                 verstring = pupver[0]
@@ -738,6 +779,8 @@
                       "ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz",
                       "ftp://ftp.gnu.org/gnu/chess/gnuchess-5.08.tar.gz",
                       "ftp://ftp.gnu.org/gnu/gmp/gmp-4.0.tar.gz",
+                      # GitHub releases are hosted on Amazon S3, which doesn't support HEAD
+                      "https://github.com/kergoth/tslib/releases/download/1.1/tslib-1.1.tar.xz"
                       ]
 
     if os.environ.get("BB_SKIP_NETTESTS") == "yes":
diff --git a/yocto-poky/bitbake/lib/bb/tests/utils.py b/yocto-poky/bitbake/lib/bb/tests/utils.py
index a035ccf..2f4ccf3 100644
--- a/yocto-poky/bitbake/lib/bb/tests/utils.py
+++ b/yocto-poky/bitbake/lib/bb/tests/utils.py
@@ -23,6 +23,7 @@
 import bb
 import os
 import tempfile
+import re
 
 class VerCmpString(unittest.TestCase):
 
@@ -176,7 +177,7 @@
         # Test file doesn't get modified with some the same values
         self._testeditfile({'THIS': ('that', None, 0, True),
                         'OTHER': ('anothervalue', None, 0, True),
-                        'MULTILINE3': ('               c1               c2               c3', None, 4, False)}, self._origfile)
+                        'MULTILINE3': ('               c1               c2               c3 ', None, 4, False)}, self._origfile)
 
     def test_edit_metadata_file_1(self):
 
@@ -377,6 +378,27 @@
         self.assertTrue(updated, 'List should be updated but isn\'t')
         self.assertEqual(newlines, newfile5.splitlines(True))
 
+    # Make sure the orig value matches what we expect it to be
+    def test_edit_metadata_origvalue(self):
+        origfile = """
+MULTILINE = "  stuff \\
+    morestuff"
+"""
+        expected_value = "stuff morestuff"
+        global value_in_callback
+        value_in_callback = ""
+
+        def handle_var(varname, origvalue, op, newlines):
+            global value_in_callback
+            value_in_callback = origvalue
+            return (origvalue, op, -1, False)
+
+        bb.utils.edit_metadata(origfile.splitlines(True),
+                               ['MULTILINE'],
+                               handle_var)
+
+        testvalue = re.sub('\s+', ' ', value_in_callback.strip())
+        self.assertEqual(expected_value, testvalue)
 
 class EditBbLayersConf(unittest.TestCase):
 
diff --git a/yocto-poky/bitbake/lib/bb/ui/buildinfohelper.py b/yocto-poky/bitbake/lib/bb/ui/buildinfohelper.py
index 78f1e92..9397905 100644
--- a/yocto-poky/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/yocto-poky/bitbake/lib/bb/ui/buildinfohelper.py
@@ -24,6 +24,7 @@
 os.environ["DJANGO_SETTINGS_MODULE"] = "toaster.toastermain.settings"
 
 
+import django
 from django.utils import timezone
 
 
@@ -33,20 +34,23 @@
     sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'toaster'))
 _configure_toaster()
 
-from toaster.orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage, HelpText
-from toaster.orm.models import Target_Image_File, BuildArtifact
-from toaster.orm.models import Variable, VariableHistory
-from toaster.orm.models import Package, Package_File, Target_Installed_Package, Target_File
-from toaster.orm.models import Task_Dependency, Package_Dependency
-from toaster.orm.models import Recipe_Dependency
+django.setup()
 
-from toaster.orm.models import Project
+from orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage, HelpText
+from orm.models import Target_Image_File, BuildArtifact
+from orm.models import Variable, VariableHistory
+from orm.models import Package, Package_File, Target_Installed_Package, Target_File
+from orm.models import Task_Dependency, Package_Dependency
+from orm.models import Recipe_Dependency, Provides
+from orm.models import Project, CustomImagePackage, CustomImageRecipe
+
 from bldcontrol.models import BuildEnvironment, BuildRequest
 
 from bb.msg import BBLogFormatter as formatter
 from django.db import models
 from pprint import pformat
 import logging
+from datetime import datetime, timedelta
 
 from django.db import transaction, connection
 
@@ -117,6 +121,12 @@
 
         return vars(self)[dictname][key]
 
+    def _timestamp_to_datetime(self, secs):
+        """
+        Convert timestamp in seconds to Python datetime
+        """
+        return datetime(1970, 1, 1) + timedelta(seconds=secs)
+
     # pylint: disable=no-self-use
     # we disable detection of no self use in functions because the methods actually work on the object
     # even if they don't touch self anywhere
@@ -146,7 +156,7 @@
             prj = Project.objects.get(pk = project_id)
 
         else:                           # this build was triggered by a legacy system, or command line interactive mode
-            prj = Project.objects.get_default_project()
+            prj = Project.objects.get_or_create_default_project()
             logger.debug(1, "buildinfohelper: project is not specified, defaulting to %s" % prj)
 
 
@@ -208,6 +218,15 @@
         assert isinstance(errors, int)
         assert isinstance(warnings, int)
 
+        if build.outcome == Build.CANCELLED:
+            return
+        try:
+            if build.buildrequest.state == BuildRequest.REQ_CANCELLING:
+                return
+        except AttributeError:
+            # We may not have a buildrequest if this is a command line build
+            pass
+
         outcome = Build.SUCCEEDED
         if errors or taskfailures:
             outcome = Build.FAILED
@@ -220,6 +239,30 @@
         target.license_manifest_path = license_manifest_path
         target.save()
 
+    def update_task_object(self, build, task_name, recipe_name, task_stats):
+        """
+        Find the task for build which matches the recipe and task name
+        to be stored
+        """
+        task_to_update = Task.objects.get(
+            build = build,
+            task_name = task_name,
+            recipe__name = recipe_name
+        )
+
+        if 'started' in task_stats and 'ended' in task_stats:
+            task_to_update.started = self._timestamp_to_datetime(task_stats['started'])
+            task_to_update.ended = self._timestamp_to_datetime(task_stats['ended'])
+            task_to_update.elapsed_time = (task_stats['ended'] - task_stats['started'])
+        task_to_update.cpu_time_user = task_stats.get('cpu_time_user')
+        task_to_update.cpu_time_system = task_stats.get('cpu_time_system')
+        if 'disk_io_read' in task_stats and 'disk_io_write' in task_stats:
+            task_to_update.disk_io_read = task_stats['disk_io_read']
+            task_to_update.disk_io_write = task_stats['disk_io_write']
+            task_to_update.disk_io = task_stats['disk_io_read'] + task_stats['disk_io_write']
+
+        task_to_update.save()
+
     def get_update_task_object(self, task_information, must_exist = False):
         assert 'build' in task_information
         assert 'recipe' in task_information
@@ -256,14 +299,6 @@
                 task_object.sstate_result = Task.SSTATE_FAILED
                 object_changed = True
 
-        # mark down duration if we have a start time and a current time
-        if 'start_time' in task_information.keys() and 'end_time' in task_information.keys():
-            duration = task_information['end_time'] - task_information['start_time']
-            task_object.elapsed_time = duration
-            object_changed = True
-            del task_information['start_time']
-            del task_information['end_time']
-
         if object_changed:
             task_object.save()
         return task_object
@@ -304,18 +339,27 @@
                 break
 
 
-        # If we're in analysis mode then we are wholly responsible for the data
+        # If we're in analysis mode or if this is a custom recipe
+        # then we are wholly responsible for the data
         # and therefore we return the 'real' recipe rather than the build
         # history copy of the recipe.
         if  recipe_information['layer_version'].build is not None and \
             recipe_information['layer_version'].build.project == \
-                Project.objects.get_default_project():
+                Project.objects.get_or_create_default_project():
+            return recipe
+
+        if built_recipe is None:
             return recipe
 
         return built_recipe
 
     def get_update_layer_version_object(self, build_obj, layer_obj, layer_version_information):
         if isinstance(layer_obj, Layer_Version):
+            # Special case the toaster-custom-images layer which is created
+            # on the fly so don't update the values which may cause the layer
+            # to be duplicated on a future get_or_create
+            if layer_obj.layer.name == CustomImageRecipe.LAYER_NAME:
+                return layer_obj
             # We already found our layer version for this build so just
             # update it with the new build information
             logger.debug("We found our layer from toaster")
@@ -325,12 +369,17 @@
 
             # create a new copy of this layer version as a snapshot for
             # historical purposes
-            layer_copy, c = Layer_Version.objects.get_or_create(build=build_obj,
-                            layer=layer_obj.layer,
-                            commit=layer_version_information['commit'],
-                            local_path = layer_version_information['local_path'],
-                            )
-            logger.info("created new historical layer version %d", layer_copy.pk)
+            layer_copy, c = Layer_Version.objects.get_or_create(
+                build=build_obj,
+                layer=layer_obj.layer,
+                up_branch=layer_obj.up_branch,
+                branch=layer_version_information['branch'],
+                commit=layer_version_information['commit'],
+                local_path=layer_version_information['local_path'],
+            )
+
+            logger.info("created new historical layer version %d",
+                        layer_copy.pk)
 
             self.layer_version_built.append(layer_copy)
 
@@ -346,7 +395,7 @@
         # If we're doing a command line build then associate this new layer with the
         # project to avoid it 'contaminating' toaster data
         project = None
-        if build_obj.project == Project.objects.get_default_project():
+        if build_obj.project == Project.objects.get_or_create_default_project():
             project = build_obj.project
 
         layer_version_object, _ = Layer_Version.objects.get_or_create(
@@ -445,7 +494,7 @@
             parent_obj = self._cached_get(Target_File, target = target_obj, path = parent_path, inodetype = Target_File.ITYPE_DIRECTORY)
             tf_obj = Target_File.objects.create(
                         target = target_obj,
-                        path = path,
+                        path = unicode(path, 'utf-8'),
                         size = size,
                         inodetype = Target_File.ITYPE_DIRECTORY,
                         permission = permission,
@@ -470,7 +519,7 @@
 
             tf_obj = Target_File.objects.create(
                         target = target_obj,
-                        path = path,
+                        path = unicode(path, 'utf-8'),
                         size = size,
                         inodetype = inodetype,
                         permission = permission,
@@ -501,7 +550,9 @@
                 filetarget_path = "/".join(fcpl)
 
             try:
-                filetarget_obj = Target_File.objects.get(target = target_obj, path = filetarget_path)
+                filetarget_obj = Target_File.objects.get(
+                                     target = target_obj,
+                                     path = unicode(filetarget_path, 'utf-8'))
             except Target_File.DoesNotExist:
                 # we might have an invalid link; no way to detect this. just set it to None
                 filetarget_obj = None
@@ -510,7 +561,7 @@
 
             tf_obj = Target_File.objects.create(
                         target = target_obj,
-                        path = path,
+                        path = unicode(path, 'utf-8'),
                         size = size,
                         inodetype = Target_File.ITYPE_SYMLINK,
                         permission = permission,
@@ -520,12 +571,14 @@
                         sym_target = filetarget_obj)
 
 
-    def save_target_package_information(self, build_obj, target_obj, packagedict, pkgpnmap, recipes):
+    def save_target_package_information(self, build_obj, target_obj, packagedict, pkgpnmap, recipes, built_package=False):
         assert isinstance(build_obj, Build)
         assert isinstance(target_obj, Target)
 
         errormsg = ""
         for p in packagedict:
+            # Search name swtiches round the installed name vs package name
+            # by default installed name == package name
             searchname = p
             if p not in pkgpnmap:
                 logger.warning("Image packages list contains %p, but is"
@@ -536,11 +589,38 @@
             if 'OPKGN' in pkgpnmap[p].keys():
                 searchname = pkgpnmap[p]['OPKGN']
 
-            packagedict[p]['object'], created = Package.objects.get_or_create( build = build_obj, name = searchname )
+            built_recipe = recipes[pkgpnmap[p]['PN']]
+
+            if built_package:
+                packagedict[p]['object'], created = Package.objects.get_or_create( build = build_obj, name = searchname )
+                recipe = built_recipe
+            else:
+                packagedict[p]['object'], created = \
+                        CustomImagePackage.objects.get_or_create(name=searchname)
+                # Clear the Package_Dependency objects as we're going to update
+                # the CustomImagePackage with the latest dependency information
+                packagedict[p]['object'].package_dependencies_target.all().delete()
+                packagedict[p]['object'].package_dependencies_source.all().delete()
+                try:
+                    recipe = self._cached_get(
+                        Recipe,
+                        name=built_recipe.name,
+                        layer_version__build=None,
+                        layer_version__up_branch=
+                        built_recipe.layer_version.up_branch,
+                        file_path=built_recipe.file_path,
+                        version=built_recipe.version
+                    )
+                except (Recipe.DoesNotExist,
+                        Recipe.MultipleObjectsReturned) as e:
+                    logger.info("We did not find one recipe for the"
+                                "configuration data package %s %s" % (p, e))
+                    continue
+
             if created or packagedict[p]['object'].size == -1:    # save the data anyway we can, not just if it was not created here; bug [YOCTO #6887]
                 # fill in everything we can from the runtime-reverse package data
                 try:
-                    packagedict[p]['object'].recipe = recipes[pkgpnmap[p]['PN']]
+                    packagedict[p]['object'].recipe = recipe
                     packagedict[p]['object'].version = pkgpnmap[p]['PV']
                     packagedict[p]['object'].installed_name = p
                     packagedict[p]['object'].revision = pkgpnmap[p]['PR']
@@ -566,7 +646,8 @@
             packagedict[p]['object'].installed_size = packagedict[p]['size']
             packagedict[p]['object'].save()
 
-            Target_Installed_Package.objects.create(target = target_obj, package = packagedict[p]['object'])
+            if built_package:
+                Target_Installed_Package.objects.create(target = target_obj, package = packagedict[p]['object'])
 
         packagedeps_objs = []
         for p in packagedict:
@@ -627,19 +708,37 @@
         return log_object.save()
 
 
-    def save_build_package_information(self, build_obj, package_info, recipes):
-        assert isinstance(build_obj, Build)
+    def save_build_package_information(self, build_obj, package_info, recipes,
+                                       built_package):
+       # assert isinstance(build_obj, Build)
 
         # create and save the object
         pname = package_info['PKG']
+        built_recipe = recipes[package_info['PN']]
         if 'OPKGN' in package_info.keys():
             pname = package_info['OPKGN']
 
-        bp_object, _ = Package.objects.get_or_create( build = build_obj,
-                                       name = pname )
+        if built_package:
+            bp_object, _ = Package.objects.get_or_create( build = build_obj,
+                                                         name = pname )
+            recipe = built_recipe
+        else:
+            bp_object, created = \
+                    CustomImagePackage.objects.get_or_create(name=pname)
+            try:
+                recipe = self._cached_get(Recipe,
+                                          name=built_recipe.name,
+                                          layer_version__build=None,
+                                          file_path=built_recipe.file_path,
+                                          version=built_recipe.version)
+
+            except (Recipe.DoesNotExist, Recipe.MultipleObjectsReturned):
+                logger.debug("We did not find one recipe for the configuration"
+                             "data package %s" % pname)
+                return
 
         bp_object.installed_name = package_info['PKG']
-        bp_object.recipe = recipes[package_info['PN']]
+        bp_object.recipe = recipe
         bp_object.version = package_info['PKGV']
         bp_object.revision = package_info['PKGR']
         bp_object.summary = package_info['SUMMARY']
@@ -659,7 +758,12 @@
             Package_File.objects.bulk_create(packagefile_objects)
 
         def _po_byname(p):
-            pkg, created = Package.objects.get_or_create(build = build_obj, name = p)
+            if built_package:
+                pkg, created = Package.objects.get_or_create(build=build_obj,
+                                                             name=p)
+            else:
+                pkg, created = CustomImagePackage.objects.get_or_create(name=p)
+
             if created:
                 pkg.size = -1
                 pkg.save()
@@ -700,7 +804,6 @@
     def save_build_variables(self, build_obj, vardump):
         assert isinstance(build_obj, Build)
 
-        helptext_objects = []
         for k in vardump:
             desc = vardump[k]['doc']
             if desc is None:
@@ -711,10 +814,9 @@
             if desc is None:
                 desc = ''
             if len(desc):
-                helptext_objects.append(HelpText(build=build_obj,
-                    area=HelpText.VARIABLE,
-                    key=k,
-                    text=desc))
+                HelpText.objects.get_or_create(build=build_obj,
+                                               area=HelpText.VARIABLE,
+                                               key=k, text=desc)
             if not bool(vardump[k]['func']):
                 value = vardump[k]['v']
                 if value is None:
@@ -734,8 +836,6 @@
                 if len(varhist_objects):
                     VariableHistory.objects.bulk_create(varhist_objects)
 
-        HelpText.objects.bulk_create(helptext_objects)
-
 
 class MockEvent(object):
     """ This object is used to create event, for which normal event-processing methods can
@@ -762,7 +862,7 @@
     # pylint: disable=bad-continuation
     # we do not follow the python conventions for continuation indentation due to long lines here
 
-    def __init__(self, server, has_build_history = False):
+    def __init__(self, server, has_build_history = False, brbe = None):
         self.internal_state = {}
         self.internal_state['taskdata'] = {}
         self.internal_state['targets'] = []
@@ -775,8 +875,13 @@
         self.orm_wrapper = ORMWrapper()
         self.has_build_history = has_build_history
         self.tmp_dir = self.server.runCommand(["getVariable", "TMPDIR"])[0]
-        self.brbe    = self.server.runCommand(["getVariable", "TOASTER_BRBE"])[0]
-        self.project = self.server.runCommand(["getVariable", "TOASTER_PROJECT"])[0]
+
+        # this is set for Toaster-triggered builds by localhostbecontroller
+        # via toasterui
+        self.brbe = brbe
+
+        self.project = None
+
         logger.debug(1, "buildinfohelper: Build info helper inited %s" % vars(self))
 
 
@@ -786,8 +891,6 @@
 
     def _get_build_information(self, build_log_path):
         build_info = {}
-        # Generate an identifier for each new build
-
         build_info['machine'] = self.server.runCommand(["getVariable", "MACHINE"])[0]
         build_info['distro'] = self.server.runCommand(["getVariable", "DISTRO"])[0]
         build_info['distro_version'] = self.server.runCommand(["getVariable", "DISTRO_VERSION"])[0]
@@ -796,7 +899,7 @@
         build_info['cooker_log_path'] = build_log_path
         build_info['build_name'] = self.server.runCommand(["getVariable", "BUILDNAME"])[0]
         build_info['bitbake_version'] = self.server.runCommand(["getVariable", "BB_VERSION"])[0]
-
+        build_info['project'] = self.project = self.server.runCommand(["getVariable", "TOASTER_PROJECT"])[0]
         return build_info
 
     def _get_task_information(self, event, recipe):
@@ -818,44 +921,15 @@
         assert path.startswith("/")
         assert 'build' in self.internal_state
 
-        if self.brbe is None:
-            def _slkey_interactive(layer_version):
-                assert isinstance(layer_version, Layer_Version)
-                return len(layer_version.local_path)
+        def _slkey_interactive(layer_version):
+            assert isinstance(layer_version, Layer_Version)
+            return len(layer_version.local_path)
 
-            # Heuristics: we always match recipe to the deepest layer path in the discovered layers
-            for lvo in sorted(self.orm_wrapper.layer_version_objects, reverse=True, key=_slkey_interactive):
-                # we can match to the recipe file path
-                if path.startswith(lvo.local_path):
-                    return lvo
-
-        else:
-            br_id, be_id = self.brbe.split(":")
-            from bldcontrol.bbcontroller import getBuildEnvironmentController
-            bc = getBuildEnvironmentController(pk = be_id)
-
-            def _slkey_managed(layer_version):
-                return len(bc.getGitCloneDirectory(layer_version.giturl, layer_version.commit) + layer_version.dirpath)
-
-            # Heuristics: we match the path to where the layers have been checked out
-            for brl in sorted(BuildRequest.objects.get(pk = br_id).brlayer_set.all(), reverse = True, key = _slkey_managed):
-                localdirname = os.path.join(bc.getGitCloneDirectory(brl.giturl, brl.commit), brl.dirpath)
-                # we get a relative path, unless running in HEAD mode where the path is absolute
-                if not localdirname.startswith("/"):
-                    localdirname = os.path.join(bc.be.sourcedir, localdirname)
-                if path.startswith(localdirname):
-                    # If the build request came from toaster this field
-                    # should contain the information from the layer_version
-                    # That created this build request.
-                    if brl.layer_version:
-                        return brl.layer_version
-
-                    #logger.warn("-- managed: matched path %s with layer %s " % (path, localdirname))
-                    # we matched the BRLayer, but we need the layer_version that generated this br
-
-                    for lvo in self.orm_wrapper.layer_version_objects:
-                        if brl.name == lvo.layer.name:
-                            return lvo
+        # Heuristics: we always match recipe to the deepest layer path in the discovered layers
+        for lvo in sorted(self.orm_wrapper.layer_version_objects, reverse=True, key=_slkey_interactive):
+            # we can match to the recipe file path
+            if path.startswith(lvo.local_path):
+                return lvo
 
         #if we get here, we didn't read layers correctly; dump whatever information we have on the error log
         logger.warn("Could not match layer version for recipe path %s : %s", path, self.orm_wrapper.layer_version_objects)
@@ -890,12 +964,10 @@
 
     def _get_path_information(self, task_object):
         assert isinstance(task_object, Task)
-        build_stats_format = "{tmpdir}/buildstats/{target}-{machine}/{buildname}/{package}/"
+        build_stats_format = "{tmpdir}/buildstats/{buildname}/{package}/"
         build_stats_path = []
 
         for t in self.internal_state['targets']:
-            target = t.target
-            machine = self.internal_state['build'].machine
             buildname = self.internal_state['build'].build_name
             pe, pv = task_object.recipe.version.split(":",1)
             if len(pe) > 0:
@@ -903,8 +975,8 @@
             else:
                 package = task_object.recipe.name + "-" + pv
 
-            build_stats_path.append(build_stats_format.format(tmpdir=self.tmp_dir, target=target,
-                                                     machine=machine, buildname=buildname,
+            build_stats_path.append(build_stats_format.format(tmpdir=self.tmp_dir,
+                                                     buildname=buildname,
                                                      package=package))
 
         return build_stats_path
@@ -938,6 +1010,9 @@
         assert '_pkgs' in vars(event)
         build_information = self._get_build_information(build_log_path)
 
+        # Update brbe and project as they can be changed for every build
+        self.project = build_information['project']
+
         build_obj = self.orm_wrapper.create_build_object(build_information, self.brbe, self.project)
 
         self.internal_state['build'] = build_obj
@@ -1059,31 +1134,11 @@
 
 
     def store_tasks_stats(self, event):
-        for (taskfile, taskname, taskstats, recipename) in BuildInfoHelper._get_data_from_event(event):
-            localfilepath = taskfile.split(":")[-1]
-            assert localfilepath.startswith("/")
+        task_data = BuildInfoHelper._get_data_from_event(event)
 
-            recipe_information = self._get_recipe_information_from_taskfile(taskfile)
-            try:
-                if recipe_information['file_path'].startswith(recipe_information['layer_version'].local_path):
-                    recipe_information['file_path'] = recipe_information['file_path'][len(recipe_information['layer_version'].local_path):].lstrip("/")
-
-                recipe_object = Recipe.objects.get(layer_version = recipe_information['layer_version'],
-                            file_path__endswith = recipe_information['file_path'],
-                            name = recipename)
-            except Recipe.DoesNotExist:
-                logger.error("Could not find recipe for recipe_information %s name %s" , pformat(recipe_information), recipename)
-                raise
-
-            task_information = {}
-            task_information['build'] = self.internal_state['build']
-            task_information['recipe'] = recipe_object
-            task_information['task_name'] = taskname
-            task_information['cpu_usage'] = taskstats['cpu_usage']
-            task_information['disk_io'] = taskstats['disk_io']
-            if 'elapsed_time' in taskstats:
-                task_information['elapsed_time'] = taskstats['elapsed_time']
-            self.orm_wrapper.get_update_task_object(task_information)
+        for (task_file, task_name, task_stats, recipe_name) in task_data:
+            build = self.internal_state['build']
+            self.orm_wrapper.update_task_object(build, task_name, recipe_name, task_stats)
 
     def update_and_store_task(self, event):
         assert 'taskfile' in vars(event)
@@ -1105,13 +1160,6 @@
         recipe = self.orm_wrapper.get_update_recipe_object(recipe_information, True)
         task_information = self._get_task_information(event,recipe)
 
-        if 'time' in vars(event):
-            if not 'start_time' in self.internal_state['taskdata'][identifier]:
-                self.internal_state['taskdata'][identifier]['start_time'] = event.time
-            else:
-                task_information['end_time'] = event.time
-                task_information['start_time'] = self.internal_state['taskdata'][identifier]['start_time']
-
         task_information['outcome'] = self.internal_state['taskdata'][identifier]['outcome']
 
         if 'logfile' in vars(event):
@@ -1185,11 +1233,12 @@
         for target in self.internal_state['targets']:
             if target.is_image:
                 pkgdata = BuildInfoHelper._get_data_from_event(event)['pkgdata']
-                imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'][target.target]
-                filedata = BuildInfoHelper._get_data_from_event(event)['filedata'][target.target]
+                imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'].get(target.target, {})
+                filedata = BuildInfoHelper._get_data_from_event(event)['filedata'].get(target.target, {})
 
                 try:
-                    self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata, pkgdata, self.internal_state['recipes'])
+                    self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata, pkgdata, self.internal_state['recipes'], built_package=True)
+                    self.orm_wrapper.save_target_package_information(self.internal_state['build'], target, imgdata.copy(), pkgdata, self.internal_state['recipes'], built_package=False)
                 except KeyError as e:
                     logger.warn("KeyError in save_target_package_information"
                                 "%s ", e)
@@ -1269,6 +1318,9 @@
                 for cls in event._depgraph['pn'][pn]['inherits']:
                     if cls.endswith('/image.bbclass'):
                         recipe.is_image = True
+                        recipe_info['is_image'] = True
+                        # Save the is_image state to the relevant recipe objects
+                        self.orm_wrapper.get_update_recipe_object(recipe_info)
                         break
             if recipe.is_image:
                 for t in self.internal_state['targets']:
@@ -1285,15 +1337,27 @@
         # buildtime
         recipedeps_objects = []
         for recipe in event._depgraph['depends']:
-            try:
-                target = self.internal_state['recipes'][recipe]
-                for dep in event._depgraph['depends'][recipe]:
+           target = self.internal_state['recipes'][recipe]
+           for dep in event._depgraph['depends'][recipe]:
+                if dep in assume_provided:
+                    continue
+                via = None
+                if 'providermap' in event._depgraph and dep in event._depgraph['providermap']:
+                    deprecipe = event._depgraph['providermap'][dep][0]
+                    dependency = self.internal_state['recipes'][deprecipe]
+                    via = Provides.objects.get_or_create(name=dep,
+                                                         recipe=dependency)[0]
+                elif dep in self.internal_state['recipes']:
                     dependency = self.internal_state['recipes'][dep]
-                    recipedeps_objects.append(Recipe_Dependency( recipe = target,
-                            depends_on = dependency, dep_type = Recipe_Dependency.TYPE_DEPENDS))
-            except KeyError as e:
-                if e not in assume_provided and not str(e).startswith("virtual/"):
-                    errormsg += "  stpd: KeyError saving recipe dependency for %s, %s \n" % (recipe, e)
+                else:
+                    errormsg += "  stpd: KeyError saving recipe dependency for %s, %s \n" % (recipe, dep)
+                    continue
+                recipe_dep = Recipe_Dependency(recipe=target,
+                                               depends_on=dependency,
+                                               via=via,
+                                               dep_type=Recipe_Dependency.TYPE_DEPENDS)
+                recipedeps_objects.append(recipe_dep)
+
         Recipe_Dependency.objects.bulk_create(recipedeps_objects)
 
         # save all task information
@@ -1333,10 +1397,17 @@
 
     def store_build_package_information(self, event):
         package_info = BuildInfoHelper._get_data_from_event(event)
-        self.orm_wrapper.save_build_package_information(self.internal_state['build'],
-                            package_info,
-                            self.internal_state['recipes'],
-                            )
+        self.orm_wrapper.save_build_package_information(
+            self.internal_state['build'],
+            package_info,
+            self.internal_state['recipes'],
+            built_package=True)
+
+        self.orm_wrapper.save_build_package_information(
+            self.internal_state['build'],
+            package_info,
+            self.internal_state['recipes'],
+            built_package=False)
 
     def _store_build_done(self, errorcode):
         logger.info("Build exited with errorcode %d", errorcode)
@@ -1345,9 +1416,18 @@
         be.lock = BuildEnvironment.LOCK_LOCK
         be.save()
         br = BuildRequest.objects.get(pk = br_id)
+
+        # if we're 'done' because we got cancelled update the build outcome
+        if br.state == BuildRequest.REQ_CANCELLING:
+            logger.info("Build cancelled")
+            br.build.outcome = Build.CANCELLED
+            br.build.save()
+            self.internal_state['build'] = br.build
+            errorcode = 0
+
         if errorcode == 0:
             # request archival of the project artifacts
-            br.state = BuildRequest.REQ_ARCHIVE
+            br.state = BuildRequest.REQ_COMPLETED
         else:
             br.state = BuildRequest.REQ_FAILED
         br.save()
@@ -1434,3 +1514,8 @@
 
         if not connection.features.autocommits_when_autocommit_is_off:
             transaction.set_autocommit(True)
+
+        # unset the brbe; this is to prevent subsequent command-line builds
+        # being incorrectly attached to the previous Toaster-triggered build;
+        # see https://bugzilla.yoctoproject.org/show_bug.cgi?id=9021
+        self.brbe = None
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/builddetailspage.py
deleted file mode 100755
index 7fc690e..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/builddetailspage.py
+++ /dev/null
@@ -1,437 +0,0 @@
-#!/usr/bin/env python
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2012        Intel Corporation
-#
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import gtk
-import pango
-import gobject
-import bb.process
-from bb.ui.crumbs.progressbar import HobProgressBar
-from bb.ui.crumbs.hobwidget import hic, HobNotebook, HobAltButton, HobWarpCellRendererText, HobButton, HobInfoButton
-from bb.ui.crumbs.runningbuild import RunningBuildTreeView
-from bb.ui.crumbs.runningbuild import BuildFailureTreeView
-from bb.ui.crumbs.hobpages import HobPage
-from bb.ui.crumbs.hobcolor import HobColors
-
-class BuildConfigurationTreeView(gtk.TreeView):
-    def __init__ (self):
-        gtk.TreeView.__init__(self)
-        self.set_rules_hint(False)
-        self.set_headers_visible(False)
-        self.set_property("hover-expand", True)
-        self.get_selection().set_mode(gtk.SELECTION_SINGLE)
-
-        # The icon that indicates whether we're building or failed.
-        renderer0 = gtk.CellRendererText()
-        renderer0.set_property('font-desc', pango.FontDescription('courier bold 12'))
-        col0 = gtk.TreeViewColumn ("Name", renderer0, text=0)
-        self.append_column (col0)
-
-        # The message of configuration.
-        renderer1 = HobWarpCellRendererText(col_number=1)
-        col1 = gtk.TreeViewColumn ("Values", renderer1, text=1)
-        self.append_column (col1)
-
-    def set_vars(self, key="", var=[""]):
-        d = {}
-        if type(var) == str:
-            d = {key: [var]}
-        elif type(var) == list and len(var) > 1:
-            #create the sub item line
-            l = []
-            text = ""
-            for item in var:
-                text = " - " + item
-                l.append(text)
-            d = {key: var}
-
-        return d
-
-    def set_config_model(self, show_vars):
-        listmodel = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
-        parent = None
-        for var in show_vars:
-            for subitem in var.items():
-                name = subitem[0]
-                is_parent = True
-                for value in subitem[1]:
-                    if is_parent:
-                        parent = listmodel.append(parent, (name, value))
-                        is_parent = False
-                    else:
-                        listmodel.append(parent, (None, value))
-                    name = "     - "
-                parent = None
-        # renew the tree model after get the configuration messages
-        self.set_model(listmodel)
-
-    def show(self, src_config_info, src_params):
-        vars = []
-        vars.append(self.set_vars("BB version:", src_params.bb_version))
-        vars.append(self.set_vars("Target arch:", src_params.target_arch))
-        vars.append(self.set_vars("Target OS:", src_params.target_os))
-        vars.append(self.set_vars("Machine:", src_config_info.curr_mach))
-        vars.append(self.set_vars("Distro:", src_config_info.curr_distro))
-        vars.append(self.set_vars("Distro version:", src_params.distro_version))
-        vars.append(self.set_vars("SDK machine:", src_config_info.curr_sdk_machine))
-        vars.append(self.set_vars("Tune features:", src_params.tune_pkgarch))
-        vars.append(self.set_vars("Layers:", src_config_info.layers))
-
-        for path in src_config_info.layers:
-            import os, os.path
-            if os.path.exists(path):
-                branch = bb.process.run('cd %s; git branch | grep "^* " | tr -d "* "' % path)[0]
-                if branch.startswith("fatal:"):
-                    branch = "(unknown)"
-                if branch:
-                    branch = branch.strip('\n')
-                    vars.append(self.set_vars("Branch:", branch))
-                break
-
-        self.set_config_model(vars)
-
-    def reset(self):
-        self.set_model(None)
-
-#
-# BuildDetailsPage
-#
-
-class BuildDetailsPage (HobPage):
-
-    def __init__(self, builder):
-        super(BuildDetailsPage, self).__init__(builder, "Building ...")
-
-        self.num_of_issues = 0
-        self.endpath = (0,)
-        # create visual elements
-        self.create_visual_elements()
-
-    def create_visual_elements(self):
-        # create visual elements
-        self.vbox = gtk.VBox(False, 12)
-
-        self.progress_box = gtk.VBox(False, 12)
-        self.task_status = gtk.Label("\n") # to ensure layout is correct
-        self.task_status.set_alignment(0.0, 0.5)
-        self.progress_box.pack_start(self.task_status, expand=False, fill=False)
-        self.progress_hbox = gtk.HBox(False, 6)
-        self.progress_box.pack_end(self.progress_hbox, expand=True, fill=True)
-        self.progress_bar = HobProgressBar()
-        self.progress_hbox.pack_start(self.progress_bar, expand=True, fill=True)
-        self.stop_button = HobAltButton("Stop")
-        self.stop_button.connect("clicked", self.stop_button_clicked_cb)
-        self.stop_button.set_sensitive(False)
-        self.progress_hbox.pack_end(self.stop_button, expand=False, fill=False)
-
-        self.notebook = HobNotebook()
-        self.config_tv = BuildConfigurationTreeView()
-        self.scrolled_view_config = gtk.ScrolledWindow ()
-        self.scrolled_view_config.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
-        self.scrolled_view_config.add(self.config_tv)
-        self.notebook.append_page(self.scrolled_view_config, "Build configuration")
-
-        self.failure_tv = BuildFailureTreeView()
-        self.failure_model = self.builder.handler.build.model.failure_model()
-        self.failure_tv.set_model(self.failure_model)
-        self.scrolled_view_failure = gtk.ScrolledWindow ()
-        self.scrolled_view_failure.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
-        self.scrolled_view_failure.add(self.failure_tv)
-        self.notebook.append_page(self.scrolled_view_failure, "Issues")
-
-        self.build_tv = RunningBuildTreeView(readonly=True, hob=True)
-        self.build_tv.set_model(self.builder.handler.build.model)
-        self.scrolled_view_build = gtk.ScrolledWindow ()
-        self.scrolled_view_build.set_policy(gtk.POLICY_NEVER, gtk.POLICY_ALWAYS)
-        self.scrolled_view_build.add(self.build_tv)
-        self.notebook.append_page(self.scrolled_view_build, "Log")
-
-        self.builder.handler.build.model.connect_after("row-changed", self.scroll_to_present_row, self.scrolled_view_build.get_vadjustment(), self.build_tv)
-
-        self.button_box = gtk.HBox(False, 6)
-        self.back_button = HobAltButton('&lt;&lt; Back')
-        self.back_button.connect("clicked", self.back_button_clicked_cb)
-        self.button_box.pack_start(self.back_button, expand=False, fill=False)
-
-    def update_build_status(self, current, total, task):
-        recipe_path, recipe_task = task.split(", ")
-        recipe = os.path.basename(recipe_path).rstrip(".bb")
-        tsk_msg = "<b>Running task %s of %s:</b> %s\n<b>Recipe:</b> %s" % (current, total, recipe_task, recipe)
-        self.task_status.set_markup(tsk_msg)
-        self.stop_button.set_sensitive(True)
-
-    def reset_build_status(self):
-        self.task_status.set_markup("\n") # to ensure layout is correct
-        self.endpath = (0,)
-
-    def show_issues(self):
-        self.num_of_issues += 1
-        self.notebook.show_indicator_icon("Issues", self.num_of_issues)
-        self.notebook.queue_draw()
-
-    def reset_issues(self):
-        self.num_of_issues = 0
-        self.notebook.hide_indicator_icon("Issues")
-
-    def _remove_all_widget(self):
-        children = self.vbox.get_children() or []
-        for child in children:
-            self.vbox.remove(child)
-        children = self.box_group_area.get_children() or []
-        for child in children:
-            self.box_group_area.remove(child)
-        children = self.get_children() or []
-        for child in children:
-            self.remove(child)
-
-    def add_build_fail_top_bar(self, actions, log_file=None):
-        primary_action = "Edit %s" % actions
-
-        color = HobColors.ERROR
-        build_fail_top = gtk.EventBox()
-        #build_fail_top.set_size_request(-1, 200)
-        build_fail_top.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(color))
-
-        build_fail_tab = gtk.Table(14, 46, True)
-        build_fail_top.add(build_fail_tab)
-
-        icon = gtk.Image()
-        icon_pix_buffer = gtk.gdk.pixbuf_new_from_file(hic.ICON_INDI_ERROR_FILE)
-        icon.set_from_pixbuf(icon_pix_buffer)
-        build_fail_tab.attach(icon, 1, 4, 0, 6)
-
-        label = gtk.Label()
-        label.set_alignment(0.0, 0.5)
-        label.set_markup("<span size='x-large'><b>%s</b></span>" % self.title)
-        build_fail_tab.attach(label, 4, 26, 0, 6)
-
-        label = gtk.Label()
-        label.set_alignment(0.0, 0.5)
-        # Ensure variable disk_full is defined
-        if not hasattr(self.builder, 'disk_full'):
-            self.builder.disk_full = False
-
-        if self.builder.disk_full:
-            markup = "<span size='medium'>There is no disk space left, so Hob cannot finish building your image. Free up some disk space\n"
-            markup += "and restart the build. Check the \"Issues\" tab for more details</span>"
-            label.set_markup(markup)
-        else:
-            label.set_markup("<span size='medium'>Check the \"Issues\" information for more details</span>")
-        build_fail_tab.attach(label, 4, 40, 4, 9)
-
-        # create button 'Edit packages'
-        action_button = HobButton(primary_action)
-        #action_button.set_size_request(-1, 40)
-        action_button.set_tooltip_text("Edit the %s parameters" % actions)
-        action_button.connect('clicked', self.failure_primary_action_button_clicked_cb, primary_action)
-
-        if log_file:
-            open_log_button = HobAltButton("Open log")
-            open_log_button.set_relief(gtk.RELIEF_HALF)
-            open_log_button.set_tooltip_text("Open the build's log file")
-            open_log_button.connect('clicked', self.open_log_button_clicked_cb, log_file)
-
-        attach_pos = (24 if log_file else 14)
-        file_bug_button = HobAltButton('File a bug')
-        file_bug_button.set_relief(gtk.RELIEF_HALF)
-        file_bug_button.set_tooltip_text("Open the Yocto Project bug tracking website")
-        file_bug_button.connect('clicked', self.failure_activate_file_bug_link_cb)
-
-        if not self.builder.disk_full:
-            build_fail_tab.attach(action_button, 4, 13, 9, 12)
-            if log_file:
-                build_fail_tab.attach(open_log_button, 14, 23, 9, 12)
-            build_fail_tab.attach(file_bug_button, attach_pos, attach_pos + 9, 9, 12)
-
-        else:
-            restart_build = HobButton("Restart the build")
-            restart_build.set_tooltip_text("Restart the build")
-            restart_build.connect('clicked', self.restart_build_button_clicked_cb)
-
-            build_fail_tab.attach(restart_build, 4, 13, 9, 12)
-            build_fail_tab.attach(action_button, 14, 23, 9, 12)
-            if log_file:
-                build_fail_tab.attach(open_log_button, attach_pos, attach_pos + 9, 9, 12)
-
-        self.builder.disk_full = False
-        return build_fail_top
-
-    def show_fail_page(self, title):
-        self._remove_all_widget()
-        self.title = "Hob cannot build your %s" % title
-
-        self.build_fail_bar = self.add_build_fail_top_bar(title, self.builder.current_logfile)
-
-        self.pack_start(self.group_align, expand=True, fill=True)
-        self.box_group_area.pack_start(self.build_fail_bar, expand=False, fill=False)
-        self.box_group_area.pack_start(self.vbox, expand=True, fill=True)
-
-        self.vbox.pack_start(self.notebook, expand=True, fill=True)
-        self.show_all()
-        self.notebook.set_page("Issues")
-        self.back_button.hide()
-
-    def add_build_stop_top_bar(self, action, log_file=None):
-        color = HobColors.LIGHT_GRAY
-        build_stop_top = gtk.EventBox()
-        #build_stop_top.set_size_request(-1, 200)
-        build_stop_top.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(color))
-        build_stop_top.set_flags(gtk.CAN_DEFAULT)
-        build_stop_top.grab_default()
-
-        build_stop_tab = gtk.Table(11, 46, True)
-        build_stop_top.add(build_stop_tab)
-
-        icon = gtk.Image()
-        icon_pix_buffer = gtk.gdk.pixbuf_new_from_file(hic.ICON_INFO_HOVER_FILE)
-        icon.set_from_pixbuf(icon_pix_buffer)
-        build_stop_tab.attach(icon, 1, 4, 0, 6)
-
-        label = gtk.Label()
-        label.set_alignment(0.0, 0.5)
-        label.set_markup("<span size='x-large'><b>%s</b></span>" % self.title)
-        build_stop_tab.attach(label, 4, 26, 0, 6)
-
-        action_button = HobButton("Edit %s" % action)
-        action_button.set_size_request(-1, 40)
-        if action == "image":
-            action_button.set_tooltip_text("Edit the image parameters")
-        elif action == "recipes":
-            action_button.set_tooltip_text("Edit the included recipes")
-        elif action == "packages":
-            action_button.set_tooltip_text("Edit the included packages")
-        action_button.connect('clicked', self.stop_primary_action_button_clicked_cb, action)
-        build_stop_tab.attach(action_button, 4, 13, 6, 9)
-
-        if log_file:
-            open_log_button = HobAltButton("Open log")
-            open_log_button.set_relief(gtk.RELIEF_HALF)
-            open_log_button.set_tooltip_text("Open the build's log file")
-            open_log_button.connect('clicked', self.open_log_button_clicked_cb, log_file)
-            build_stop_tab.attach(open_log_button, 14, 23, 6, 9)
-
-        attach_pos = (24 if log_file else 14)
-        build_button = HobAltButton("Build new image")
-        #build_button.set_size_request(-1, 40)
-        build_button.set_tooltip_text("Create a new image from scratch")
-        build_button.connect('clicked', self.new_image_button_clicked_cb)
-        build_stop_tab.attach(build_button, attach_pos, attach_pos + 9, 6, 9)
-
-        return build_stop_top, action_button
-
-    def show_stop_page(self, action):
-        self._remove_all_widget()
-        self.title = "Build stopped"
-        self.build_stop_bar, action_button = self.add_build_stop_top_bar(action, self.builder.current_logfile)
-
-        self.pack_start(self.group_align, expand=True, fill=True)
-        self.box_group_area.pack_start(self.build_stop_bar, expand=False, fill=False)
-        self.box_group_area.pack_start(self.vbox, expand=True, fill=True)
-
-        self.vbox.pack_start(self.notebook, expand=True, fill=True)
-        self.show_all()
-        self.back_button.hide()
-        return action_button
-
-    def show_page(self, step):
-        self._remove_all_widget()
-        if step == self.builder.PACKAGE_GENERATING or step == self.builder.FAST_IMAGE_GENERATING:
-            self.title = "Building packages ..."
-        else:
-            self.title = "Building image ..."
-        self.build_details_top = self.add_onto_top_bar(None)
-        self.pack_start(self.build_details_top, expand=False, fill=False)
-        self.pack_start(self.group_align, expand=True, fill=True)
-
-        self.box_group_area.pack_start(self.vbox, expand=True, fill=True)
-
-        self.progress_bar.reset()
-        self.config_tv.reset()
-        self.vbox.pack_start(self.progress_box, expand=False, fill=False)
-
-        self.vbox.pack_start(self.notebook, expand=True, fill=True)
-
-        self.box_group_area.pack_end(self.button_box, expand=False, fill=False)
-        self.show_all()
-        self.notebook.set_page("Log")
-        self.back_button.hide()
-
-        self.reset_build_status()
-        self.reset_issues()
-
-    def update_progress_bar(self, title, fraction, status=None):
-        self.progress_bar.update(fraction)
-        self.progress_bar.set_title(title)
-        self.progress_bar.set_rcstyle(status)
-
-    def back_button_clicked_cb(self, button):
-        self.builder.show_configuration()
-
-    def new_image_button_clicked_cb(self, button):
-        self.builder.reset()
-
-    def show_back_button(self):
-        self.back_button.show()
-
-    def stop_button_clicked_cb(self, button):
-        self.builder.stop_build()
-
-    def hide_stop_button(self):
-        self.stop_button.set_sensitive(False)
-        self.stop_button.hide()
-
-    def scroll_to_present_row(self, model, path, iter, v_adj, treeview):
-        if treeview and v_adj:
-            if path[0] > self.endpath[0]: # check the event is a new row append or not
-                self.endpath = path
-                # check the gtk.adjustment position is at end boundary or not
-                if (v_adj.upper <= v_adj.page_size) or (v_adj.value == v_adj.upper - v_adj.page_size):
-                    treeview.scroll_to_cell(path)
-
-    def show_configurations(self, configurations, params):
-        self.config_tv.show(configurations, params)
-
-    def failure_primary_action_button_clicked_cb(self, button, action):
-        if "Edit recipes" in action:
-            self.builder.show_recipes()
-        elif "Edit packages" in action:
-            self.builder.show_packages()
-        elif "Edit image" in action:
-            self.builder.show_configuration()
-
-    def restart_build_button_clicked_cb(self, button):
-        self.builder.just_bake()
-
-    def stop_primary_action_button_clicked_cb(self, button, action):
-        if "recipes" in action:
-            self.builder.show_recipes()
-        elif "packages" in action:
-            self.builder.show_packages()
-        elif "image" in action:
-            self.builder.show_configuration()
-
-    def open_log_button_clicked_cb(self, button, log_file):
-        if log_file:
-            log_file = "file:///" + log_file
-            gtk.show_uri(screen=button.get_screen(), uri=log_file, timestamp=0)
-
-    def failure_activate_file_bug_link_cb(self, button):
-        button.child.emit('activate-link', "http://bugzilla.yoctoproject.org")
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/builder.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/builder.py
deleted file mode 100755
index dcc4104..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/builder.py
+++ /dev/null
@@ -1,1475 +0,0 @@
-#!/usr/bin/env python
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2011-2012   Intel Corporation
-#
-# Authored by Joshua Lock <josh@linux.intel.com>
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import glib
-import gtk, gobject
-import copy
-import os
-import subprocess
-import shlex
-import re
-import logging
-import sys
-import signal
-import time
-from bb.ui.crumbs.imageconfigurationpage import ImageConfigurationPage
-from bb.ui.crumbs.recipeselectionpage import RecipeSelectionPage
-from bb.ui.crumbs.packageselectionpage import PackageSelectionPage
-from bb.ui.crumbs.builddetailspage import BuildDetailsPage
-from bb.ui.crumbs.imagedetailspage import ImageDetailsPage
-from bb.ui.crumbs.sanitycheckpage import SanityCheckPage
-from bb.ui.crumbs.hobwidget import hwc, HobButton, HobAltButton
-from bb.ui.crumbs.persistenttooltip import PersistentTooltip
-import bb.ui.crumbs.utils
-from bb.ui.crumbs.hig.crumbsmessagedialog import CrumbsMessageDialog
-from bb.ui.crumbs.hig.simplesettingsdialog import SimpleSettingsDialog
-from bb.ui.crumbs.hig.advancedsettingsdialog import AdvancedSettingsDialog
-from bb.ui.crumbs.hig.deployimagedialog import DeployImageDialog
-from bb.ui.crumbs.hig.layerselectiondialog import LayerSelectionDialog
-from bb.ui.crumbs.hig.imageselectiondialog import ImageSelectionDialog
-from bb.ui.crumbs.hig.parsingwarningsdialog import ParsingWarningsDialog
-from bb.ui.crumbs.hig.propertydialog import PropertyDialog
-
-hobVer = 20120808
-
-class Configuration:
-    '''Represents the data structure of configuration.'''
-
-    @classmethod
-    def parse_proxy_string(cls, proxy):
-        pattern = "^\s*((http|https|ftp|socks|cvs)://)?((\S+):(\S+)@)?([^\s:]+)(:(\d+))?/?"
-        match = re.search(pattern, proxy)
-        if match:
-            return match.group(2), match.group(4), match.group(5), match.group(6), match.group(8)
-        else:
-            return None, None, None, "", ""
-
-    @classmethod
-    def make_host_string(cls, prot, user, passwd, host, default_prot=""):
-        if host == None or host == "":
-            return ""
-
-        passwd = passwd or ""
-
-        if user != None and user != "":
-            if prot == None or prot == "":
-                prot = default_prot
-            return prot + "://" + user + ":" + passwd + "@" + host
-        else:
-            if prot == None or prot == "":
-                return host
-            else:
-                return prot + "://" + host
-
-    @classmethod
-    def make_port_string(cls, port):
-        port = port or ""
-        return port
-
-    @classmethod
-    def make_proxy_string(cls, prot, user, passwd, host, port, default_prot=""):
-        if host == None or host == "":# or port == None or port == "":
-            return ""
-
-        return Configuration.make_host_string(prot, user, passwd, host, default_prot) + (":" + Configuration.make_port_string(port) if port else "")
-
-    def __init__(self):
-        self.curr_mach = ""
-        self.selected_image = None
-        # settings
-        self.curr_distro = ""
-        self.dldir = self.sstatedir = self.sstatemirror = ""
-        self.pmake = self.bbthread = 0
-        self.curr_package_format = ""
-        self.image_rootfs_size = self.image_extra_size = 0
-        self.image_overhead_factor = 1
-        self.incompat_license = ""
-        self.curr_sdk_machine = ""
-        self.conf_version = self.lconf_version = ""
-        self.extra_setting = {}
-        self.toolchain_build = False
-        self.image_fstypes = ""
-        self.image_size = None
-        self.image_packages = []
-        # bblayers.conf
-        self.layers = []
-        # image/recipes/packages
-        self.clear_selection()
-
-        self.user_selected_packages = []
-
-        self.default_task = "build"
-
-        # proxy settings
-        self.enable_proxy = None
-        self.same_proxy = False
-        self.proxies = {
-            "http"  : [None, None, None, "", ""],  # protocol : [prot, user, passwd, host, port]
-            "https" : [None, None, None, "", ""],
-            "ftp"   : [None, None, None, "", ""],
-            "socks" : [None, None, None, "", ""],
-            "cvs"   : [None, None, None, "", ""],
-        }
-
-    def clear_selection(self):
-        self.selected_recipes = []
-        self.selected_packages = []
-        self.initial_selected_image = None
-        self.initial_selected_packages = []
-        self.initial_user_selected_packages = []
-
-    def split_proxy(self, protocol, proxy):
-        entry = []
-        prot, user, passwd, host, port = Configuration.parse_proxy_string(proxy)
-        entry.append(prot)
-        entry.append(user)
-        entry.append(passwd)
-        entry.append(host)
-        entry.append(port)
-        self.proxies[protocol] = entry
-
-    def combine_proxy(self, protocol):
-        entry = self.proxies[protocol]
-        return Configuration.make_proxy_string(entry[0], entry[1], entry[2], entry[3], entry[4], protocol)
-
-    def combine_host_only(self, protocol):
-        entry = self.proxies[protocol]
-        return Configuration.make_host_string(entry[0], entry[1], entry[2], entry[3], protocol)
-
-    def combine_port_only(self, protocol):
-        entry = self.proxies[protocol]
-        return Configuration.make_port_string(entry[4])
-
-    def update(self, params):
-        # settings
-        self.curr_distro = params["distro"]
-        self.dldir = params["dldir"]
-        self.sstatedir = params["sstatedir"]
-        self.sstatemirror = params["sstatemirror"]
-        self.pmake = int(params["pmake"].split()[1])
-        self.bbthread = params["bbthread"]
-        self.curr_package_format = " ".join(params["pclass"].split("package_")).strip()
-        self.image_rootfs_size = params["image_rootfs_size"]
-        self.image_extra_size = params["image_extra_size"]
-        self.image_overhead_factor = params['image_overhead_factor']
-        self.incompat_license = params["incompat_license"]
-        self.curr_sdk_machine = params["sdk_machine"]
-        self.conf_version = params["conf_version"]
-        self.lconf_version = params["lconf_version"]
-        self.image_fstypes = params["image_fstypes"]
-        # self.extra_setting/self.toolchain_build
-        # bblayers.conf
-        self.layers = params["layer"].split()
-        self.layers_non_removable = params["layers_non_removable"].split()
-        self.default_task = params["default_task"]
-
-        # proxy settings
-        self.enable_proxy = params["http_proxy"] != "" or params["https_proxy"] != "" \
-            or params["ftp_proxy"] != "" or params["socks_proxy"] != "" \
-            or params["cvs_proxy_host"] != "" or params["cvs_proxy_port"] != ""
-        self.split_proxy("http", params["http_proxy"])
-        self.split_proxy("https", params["https_proxy"])
-        self.split_proxy("ftp", params["ftp_proxy"])
-        self.split_proxy("socks", params["socks_proxy"])
-        self.split_proxy("cvs", params["cvs_proxy_host"] + ":" + params["cvs_proxy_port"])
-
-    def save(self, handler, defaults=False):
-        # bblayers.conf
-        handler.set_var_in_file("BBLAYERS", self.layers, "bblayers.conf")
-        # local.conf
-        if not defaults:
-            handler.early_assign_var_in_file("MACHINE", self.curr_mach, "local.conf")
-        handler.set_var_in_file("DISTRO", self.curr_distro, "local.conf")
-        handler.set_var_in_file("DL_DIR", self.dldir, "local.conf")
-        handler.set_var_in_file("SSTATE_DIR", self.sstatedir, "local.conf")
-        sstate_mirror_list = self.sstatemirror.split("\\n ")
-        sstate_mirror_list_modified = []
-        for mirror in sstate_mirror_list:
-            if mirror != "":
-                mirror = mirror + "\\n"
-                sstate_mirror_list_modified.append(mirror)
-        handler.set_var_in_file("SSTATE_MIRRORS", sstate_mirror_list_modified, "local.conf")
-        handler.set_var_in_file("PARALLEL_MAKE", "-j %s" % self.pmake, "local.conf")
-        handler.set_var_in_file("BB_NUMBER_THREADS", self.bbthread, "local.conf")
-        handler.set_var_in_file("PACKAGE_CLASSES", " ".join(["package_" + i for i in self.curr_package_format.split()]), "local.conf")
-        handler.set_var_in_file("IMAGE_ROOTFS_SIZE", self.image_rootfs_size, "local.conf")
-        handler.set_var_in_file("IMAGE_EXTRA_SPACE", self.image_extra_size, "local.conf")
-        handler.set_var_in_file("INCOMPATIBLE_LICENSE", self.incompat_license, "local.conf")
-        handler.set_var_in_file("SDKMACHINE", self.curr_sdk_machine, "local.conf")
-        handler.set_var_in_file("CONF_VERSION", self.conf_version, "local.conf")
-        handler.set_var_in_file("LCONF_VERSION", self.lconf_version, "bblayers.conf")
-        handler.set_extra_config(self.extra_setting)
-        handler.set_var_in_file("TOOLCHAIN_BUILD", self.toolchain_build, "local.conf")
-        handler.set_var_in_file("IMAGE_FSTYPES", self.image_fstypes, "local.conf")
-        if not defaults:
-            # image/recipes/packages
-            handler.set_var_in_file("__SELECTED_IMAGE__", self.selected_image, "local.conf")
-            handler.set_var_in_file("DEPENDS", self.selected_recipes, "local.conf")
-            handler.set_var_in_file("IMAGE_INSTALL", self.user_selected_packages, "local.conf")
-        # proxy
-        if self.enable_proxy == True:
-            handler.set_var_in_file("http_proxy", self.combine_proxy("http"), "local.conf")
-            handler.set_var_in_file("https_proxy", self.combine_proxy("https"), "local.conf")
-            handler.set_var_in_file("ftp_proxy", self.combine_proxy("ftp"), "local.conf")
-            handler.set_var_in_file("all_proxy", self.combine_proxy("socks"), "local.conf")
-            handler.set_var_in_file("CVS_PROXY_HOST", self.combine_host_only("cvs"), "local.conf")
-            handler.set_var_in_file("CVS_PROXY_PORT", self.combine_port_only("cvs"), "local.conf")
-        else:
-            handler.set_var_in_file("http_proxy", "", "local.conf")
-            handler.set_var_in_file("https_proxy", "", "local.conf")
-            handler.set_var_in_file("ftp_proxy", "", "local.conf")
-            handler.set_var_in_file("all_proxy", "", "local.conf")
-            handler.set_var_in_file("CVS_PROXY_HOST", "", "local.conf")
-            handler.set_var_in_file("CVS_PROXY_PORT", "", "local.conf")
-
-    def __str__(self):
-        s = "VERSION: '%s', BBLAYERS: '%s', MACHINE: '%s', DISTRO: '%s', DL_DIR: '%s'," % \
-            (hobVer, " ".join(self.layers), self.curr_mach, self.curr_distro, self.dldir )
-        s += "SSTATE_DIR: '%s', SSTATE_MIRROR: '%s', PARALLEL_MAKE: '-j %s', BB_NUMBER_THREADS: '%s', PACKAGE_CLASSES: '%s', " % \
-            (self.sstatedir, self.sstatemirror, self.pmake, self.bbthread, " ".join(["package_" + i for i in self.curr_package_format.split()]))
-        s += "IMAGE_ROOTFS_SIZE: '%s', IMAGE_EXTRA_SPACE: '%s', INCOMPATIBLE_LICENSE: '%s', SDKMACHINE: '%s', CONF_VERSION: '%s', " % \
-            (self.image_rootfs_size, self.image_extra_size, self.incompat_license, self.curr_sdk_machine, self.conf_version)
-        s += "LCONF_VERSION: '%s', EXTRA_SETTING: '%s', TOOLCHAIN_BUILD: '%s', IMAGE_FSTYPES: '%s', __SELECTED_IMAGE__: '%s', " % \
-            (self.lconf_version, self.extra_setting, self.toolchain_build, self.image_fstypes, self.selected_image)
-        s += "DEPENDS: '%s', IMAGE_INSTALL: '%s', enable_proxy: '%s', use_same_proxy: '%s', http_proxy: '%s', " % \
-            (self.selected_recipes, self.user_selected_packages, self.enable_proxy, self.same_proxy, self.combine_proxy("http"))
-        s += "https_proxy: '%s', ftp_proxy: '%s', all_proxy: '%s', CVS_PROXY_HOST: '%s', CVS_PROXY_PORT: '%s'" % \
-            (self.combine_proxy("https"), self.combine_proxy("ftp"), self.combine_proxy("socks"),
-             self.combine_host_only("cvs"), self.combine_port_only("cvs"))
-        return s
-
-class Parameters:
-    '''Represents other variables like available machines, etc.'''
-
-    def __init__(self):
-        # Variables
-        self.max_threads = 65535
-        self.core_base = ""
-        self.image_addr = ""
-        self.image_types = []
-        self.runnable_image_types = []
-        self.runnable_machine_patterns = []
-        self.deployable_image_types = []
-        self.tmpdir = ""
-
-        self.all_machines = []
-        self.all_package_formats = []
-        self.all_distros = []
-        self.all_sdk_machines = []
-        self.all_layers = []
-        self.image_names = []
-        self.image_white_pattern = ""
-        self.image_black_pattern = ""
-
-        # for build log to show
-        self.bb_version = ""
-        self.target_arch = ""
-        self.target_os = ""
-        self.distro_version = ""
-        self.tune_pkgarch = ""
-
-    def update(self, params):
-        self.max_threads = params["max_threads"]
-        self.core_base = params["core_base"]
-        self.image_addr = params["image_addr"]
-        self.image_types = params["image_types"].split()
-        self.runnable_image_types = params["runnable_image_types"].split()
-        self.runnable_machine_patterns = params["runnable_machine_patterns"].split()
-        self.deployable_image_types = params["deployable_image_types"].split()
-        self.tmpdir = params["tmpdir"]
-        self.image_white_pattern = params["image_white_pattern"]
-        self.image_black_pattern = params["image_black_pattern"]
-        self.kernel_image_type = params["kernel_image_type"]
-        # for build log to show
-        self.bb_version = params["bb_version"]
-        self.target_arch = params["target_arch"]
-        self.target_os = params["target_os"]
-        self.distro_version = params["distro_version"]
-        self.tune_pkgarch = params["tune_pkgarch"]
-
-def hob_conf_filter(fn, data):
-    if fn.endswith("/local.conf"):
-        distro = data.getVar("DISTRO_HOB", False)
-        if distro:
-            if distro != "defaultsetup":
-                data.setVar("DISTRO", distro)
-            else:
-                data.delVar("DISTRO")
-
-        keys = ["MACHINE_HOB", "SDKMACHINE_HOB", "PACKAGE_CLASSES_HOB", \
-                "BB_NUMBER_THREADS_HOB", "PARALLEL_MAKE_HOB", "DL_DIR_HOB", \
-                "SSTATE_DIR_HOB", "SSTATE_MIRRORS_HOB", "INCOMPATIBLE_LICENSE_HOB"]
-        for key in keys:
-            var_hob = data.getVar(key, False)
-            if var_hob:
-                data.setVar(key.split("_HOB")[0], var_hob)
-        return
-
-    if fn.endswith("/bblayers.conf"):
-        layers = data.getVar("BBLAYERS_HOB", False)
-        if layers:
-            data.setVar("BBLAYERS", layers)
-        return
-
-class Builder(gtk.Window):
-
-    (INITIAL_CHECKS,
-     MACHINE_SELECTION,
-     RCPPKGINFO_POPULATING,
-     RCPPKGINFO_POPULATED,
-     BASEIMG_SELECTED,
-     RECIPE_SELECTION,
-     PACKAGE_GENERATING,
-     PACKAGE_GENERATED,
-     PACKAGE_SELECTION,
-     FAST_IMAGE_GENERATING,
-     IMAGE_GENERATING,
-     IMAGE_GENERATED,
-     MY_IMAGE_OPENED,
-     BACK,
-     END_NOOP) = range(15)
-
-    (SANITY_CHECK,
-     IMAGE_CONFIGURATION,
-     RECIPE_DETAILS,
-     BUILD_DETAILS,
-     PACKAGE_DETAILS,
-     IMAGE_DETAILS,
-     END_TAB) = range(7)
-
-    __step2page__ = {
-        INITIAL_CHECKS        : SANITY_CHECK,
-        MACHINE_SELECTION     : IMAGE_CONFIGURATION,
-        RCPPKGINFO_POPULATING : IMAGE_CONFIGURATION,
-        RCPPKGINFO_POPULATED  : IMAGE_CONFIGURATION,
-        BASEIMG_SELECTED      : IMAGE_CONFIGURATION,
-        RECIPE_SELECTION      : RECIPE_DETAILS,
-        PACKAGE_GENERATING    : BUILD_DETAILS,
-        PACKAGE_GENERATED     : PACKAGE_DETAILS,
-        PACKAGE_SELECTION     : PACKAGE_DETAILS,
-        FAST_IMAGE_GENERATING : BUILD_DETAILS,
-        IMAGE_GENERATING      : BUILD_DETAILS,
-        IMAGE_GENERATED       : IMAGE_DETAILS,
-        MY_IMAGE_OPENED       : IMAGE_DETAILS,
-        END_NOOP              : None,
-    }
-
-    SANITY_CHECK_MIN_DISPLAY_TIME = 5
-
-    def __init__(self, hobHandler, recipe_model, package_model):
-        super(Builder, self).__init__()
-
-        self.hob_image = "hob-image"
-
-        # handler
-        self.handler = hobHandler
-
-        # logger
-        self.logger = logging.getLogger("BitBake")
-        self.consolelog = None
-        self.current_logfile = None
-
-        # configuration and parameters
-        self.configuration = Configuration()
-        self.parameters = Parameters()
-
-        # build step
-        self.current_step = None
-        self.previous_step = None
-
-        self.stopping = False
-
-        # recipe model and package model
-        self.recipe_model = recipe_model
-        self.package_model = package_model
-
-        # Indicate whether user has customized the image
-        self.customized = False
-
-        # Indicate whether the UI is working
-        self.sensitive = True
-
-        # Indicate whether the sanity check ran
-        self.sanity_checked = False
-
-        # save parsing warnings
-        self.parsing_warnings = []
-
-        # create visual elements
-        self.create_visual_elements()
-
-        # connect the signals to functions
-        self.connect("delete-event", self.destroy_window_cb)
-        self.recipe_model.connect ("recipe-selection-changed",  self.recipelist_changed_cb)
-        self.package_model.connect("package-selection-changed", self.packagelist_changed_cb)
-        self.handler.connect("config-updated",           self.handler_config_updated_cb)
-        self.handler.connect("package-formats-updated",  self.handler_package_formats_updated_cb)
-        self.handler.connect("parsing-started",          self.handler_parsing_started_cb)
-        self.handler.connect("parsing",                  self.handler_parsing_cb)
-        self.handler.connect("parsing-completed",        self.handler_parsing_completed_cb)
-        self.handler.build.connect("build-started",      self.handler_build_started_cb)
-        self.handler.build.connect("build-succeeded",    self.handler_build_succeeded_cb)
-        self.handler.build.connect("build-failed",       self.handler_build_failed_cb)
-        self.handler.build.connect("build-aborted",      self.handler_build_aborted_cb)
-        self.handler.build.connect("task-started",       self.handler_task_started_cb)
-        self.handler.build.connect("disk-full",          self.handler_disk_full_cb)
-        self.handler.build.connect("log-error",          self.handler_build_failure_cb)
-        self.handler.build.connect("log-warning",        self.handler_build_failure_cb)
-        self.handler.build.connect("log",                self.handler_build_log_cb)
-        self.handler.build.connect("no-provider",        self.handler_no_provider_cb)
-        self.handler.connect("generating-data",          self.handler_generating_data_cb)
-        self.handler.connect("data-generated",           self.handler_data_generated_cb)
-        self.handler.connect("command-succeeded",        self.handler_command_succeeded_cb)
-        self.handler.connect("command-failed",           self.handler_command_failed_cb)
-        self.handler.connect("parsing-warning",          self.handler_parsing_warning_cb)
-        self.handler.connect("sanity-failed",            self.handler_sanity_failed_cb)
-        self.handler.connect("recipe-populated",         self.handler_recipe_populated_cb)
-        self.handler.connect("package-populated",        self.handler_package_populated_cb)
-
-        self.handler.append_to_bbfiles("${TOPDIR}/recipes/images/custom/*.bb")
-        self.handler.append_to_bbfiles("${TOPDIR}/recipes/images/*.bb")
-        self.initiate_new_build_async()
-
-        signal.signal(signal.SIGINT, self.event_handle_SIGINT)
-
-    def create_visual_elements(self):
-        self.set_title("Hob")
-        self.set_icon_name("applications-development")
-        self.set_resizable(True)
-
-        try:
-            window_width = self.get_screen().get_width()
-            window_height = self.get_screen().get_height()
-        except AttributeError:
-            print "Please set DISPLAY variable before running Hob."
-            sys.exit(1)
-
-        if window_width >= hwc.MAIN_WIN_WIDTH:
-            window_width = hwc.MAIN_WIN_WIDTH
-            window_height = hwc.MAIN_WIN_HEIGHT
-        self.set_size_request(window_width, window_height)
-
-        self.vbox = gtk.VBox(False, 0)
-        self.vbox.set_border_width(0)
-        self.add(self.vbox)
-
-        # create pages
-        self.image_configuration_page = ImageConfigurationPage(self)
-        self.recipe_details_page      = RecipeSelectionPage(self)
-        self.build_details_page       = BuildDetailsPage(self)
-        self.package_details_page     = PackageSelectionPage(self)
-        self.image_details_page       = ImageDetailsPage(self)
-        self.sanity_check_page        = SanityCheckPage(self)
-        self.display_sanity_check = False
-        self.sanity_check_post_func = False
-        self.had_network_error = False
-
-        self.nb = gtk.Notebook()
-        self.nb.set_show_tabs(False)
-        self.nb.insert_page(self.sanity_check_page,        None, self.SANITY_CHECK)
-        self.nb.insert_page(self.image_configuration_page, None, self.IMAGE_CONFIGURATION)
-        self.nb.insert_page(self.recipe_details_page,      None, self.RECIPE_DETAILS)
-        self.nb.insert_page(self.build_details_page,       None, self.BUILD_DETAILS)
-        self.nb.insert_page(self.package_details_page,     None, self.PACKAGE_DETAILS)
-        self.nb.insert_page(self.image_details_page,       None, self.IMAGE_DETAILS)
-        self.vbox.pack_start(self.nb, expand=True, fill=True)
-
-        self.show_all()
-        self.nb.set_current_page(0)
-
-    def sanity_check_timeout(self):
-        # The minimum time for showing the 'sanity check' page has passe
-        # If someone set the 'sanity_check_post_step' meanwhile, execute it now
-        self.display_sanity_check = False
-        if self.sanity_check_post_func:
-          temp = self.sanity_check_post_func
-          self.sanity_check_post_func = None
-          temp()
-        return False
-
-    def show_sanity_check_page(self):
-        # This window must stay on screen for at least 5 seconds, according to the design document
-        self.nb.set_current_page(self.SANITY_CHECK)
-        self.sanity_check_post_step = None
-        self.display_sanity_check = True
-        self.sanity_check_page.start()
-        gobject.timeout_add(self.SANITY_CHECK_MIN_DISPLAY_TIME * 1000, self.sanity_check_timeout)
-
-    def execute_after_sanity_check(self, func):
-        if not self.display_sanity_check:
-          func()
-        else:
-          self.sanity_check_post_func = func
-
-    def generate_configuration(self):
-        if not self.sanity_checked:
-            self.show_sanity_check_page()
-        self.handler.generate_configuration()
-
-    def initiate_new_build_async(self):
-        self.configuration.selected_image = None
-        self.switch_page(self.MACHINE_SELECTION)
-        self.handler.init_cooker()
-        self.handler.set_extra_inherit("image_types")
-        self.generate_configuration()
-
-    def update_config_async(self):
-        self.set_user_config()
-        self.generate_configuration()
-        self.switch_page(self.MACHINE_SELECTION)
-
-    def sanity_check(self):
-        self.handler.trigger_sanity_check()
-
-    def populate_recipe_package_info_async(self):
-        self.switch_page(self.RCPPKGINFO_POPULATING)
-        # Parse recipes
-        self.set_user_config()
-        self.handler.generate_recipes()
-
-    def generate_packages_async(self, log = False):
-        self.switch_page(self.PACKAGE_GENERATING)
-        if log:
-            self.current_logfile = self.handler.get_logfile()
-            self.do_log(self.current_logfile)
-        # Build packages
-        _, all_recipes = self.recipe_model.get_selected_recipes()
-        self.set_user_config()
-        self.handler.reset_build()
-        self.handler.generate_packages(all_recipes, self.configuration.default_task)
-
-    def restore_initial_selected_packages(self):
-        self.package_model.set_selected_packages(self.configuration.initial_user_selected_packages, True)
-        self.package_model.set_selected_packages(self.configuration.initial_selected_packages)
-        for package in self.configuration.selected_packages:
-            if package not in self.configuration.initial_selected_packages:
-                self.package_model.exclude_item(self.package_model.find_path_for_item(package))
-
-    def fast_generate_image_async(self, log = False):
-        self.switch_page(self.FAST_IMAGE_GENERATING)
-        if log:
-            self.current_logfile = self.handler.get_logfile()
-            self.do_log(self.current_logfile)
-        # Build packages
-        _, all_recipes = self.recipe_model.get_selected_recipes()
-        self.set_user_config()
-        self.handler.reset_build()
-        self.handler.generate_packages(all_recipes, self.configuration.default_task)
-
-    def generate_image_async(self, cont = False):
-        self.switch_page(self.IMAGE_GENERATING)
-        self.handler.reset_build()
-        if not cont:
-            self.current_logfile = self.handler.get_logfile()
-            self.do_log(self.current_logfile)
-        # Build image
-        self.set_user_config()
-        toolchain_packages = []
-        base_image = None
-        if self.configuration.toolchain_build:
-            toolchain_packages = self.package_model.get_selected_packages_toolchain()
-        if self.configuration.selected_image == self.recipe_model.__custom_image__:
-            packages = self.package_model.get_selected_packages()
-            image = self.hob_image
-            base_image = self.configuration.initial_selected_image
-        else:
-            packages = []
-            image = self.configuration.selected_image
-        self.handler.generate_image(image,
-                                    base_image,
-                                    packages,
-                                    toolchain_packages,
-                                    self.configuration.default_task)
-
-    def generate_new_image(self, image, description):
-        base_image = self.configuration.initial_selected_image
-        if base_image == self.recipe_model.__custom_image__:
-            base_image = None
-        packages = self.package_model.get_selected_packages()
-        self.handler.generate_new_image(image, base_image, packages, description)
-
-    def ensure_dir(self, directory):
-        self.handler.ensure_dir(directory)
-
-    def get_parameters_sync(self):
-        return self.handler.get_parameters()
-
-    def request_package_info_async(self):
-        self.handler.request_package_info()
-
-    def cancel_build_sync(self, force=False):
-        self.handler.cancel_build(force)
-
-    def cancel_parse_sync(self):
-        self.handler.cancel_parse()
-
-    def switch_page(self, next_step):
-        # Main Workflow (Business Logic)
-        self.nb.set_current_page(self.__step2page__[next_step])
-
-        if next_step == self.MACHINE_SELECTION: # init step
-            self.image_configuration_page.show_machine()
-
-        elif next_step == self.RCPPKGINFO_POPULATING:
-            # MACHINE CHANGED action or SETTINGS CHANGED
-            # show the progress bar
-            self.image_configuration_page.show_info_populating()
-
-        elif next_step == self.RCPPKGINFO_POPULATED:
-            self.image_configuration_page.show_info_populated()
-
-        elif next_step == self.BASEIMG_SELECTED:
-            self.image_configuration_page.show_baseimg_selected()
-
-        elif next_step == self.RECIPE_SELECTION:
-            if self.recipe_model.get_selected_image() == self.recipe_model.__custom_image__:
-                self.recipe_details_page.set_recipe_curr_tab(self.recipe_details_page.ALL)
-            else:
-                self.recipe_details_page.set_recipe_curr_tab(self.recipe_details_page.INCLUDED)
-
-        elif next_step == self.PACKAGE_SELECTION:
-            self.configuration.initial_selected_packages = self.configuration.selected_packages
-            self.configuration.initial_user_selected_packages = self.configuration.user_selected_packages
-            self.package_details_page.set_title("Edit packages")
-            if self.recipe_model.get_selected_image() == self.recipe_model.__custom_image__:
-                self.package_details_page.set_packages_curr_tab(self.package_details_page.ALL)
-            else:
-                self.package_details_page.set_packages_curr_tab(self.package_details_page.INCLUDED)
-            self.package_details_page.show_page(self.current_logfile)
-
-
-        elif next_step == self.PACKAGE_GENERATING or next_step == self.FAST_IMAGE_GENERATING:
-            # both PACKAGE_GENERATING and FAST_IMAGE_GENERATING share the same page
-            self.build_details_page.show_page(next_step)
-
-        elif next_step == self.PACKAGE_GENERATED:
-            self.package_details_page.set_title("Step 2 of 2: Edit packages")
-            if self.recipe_model.get_selected_image() == self.recipe_model.__custom_image__:
-                self.package_details_page.set_packages_curr_tab(self.package_details_page.ALL)
-            else:
-                self.package_details_page.set_packages_curr_tab(self.package_details_page.INCLUDED)
-            self.package_details_page.show_page(self.current_logfile)
-
-        elif next_step == self.IMAGE_GENERATING:
-            # after packages are generated, selected_packages need to
-            # be updated in package_model per selected_image in recipe_model
-            self.build_details_page.show_page(next_step)
-
-        elif next_step == self.IMAGE_GENERATED:
-            self.image_details_page.show_page(next_step)
-
-        elif next_step == self.MY_IMAGE_OPENED:
-            self.image_details_page.show_page(next_step)
-
-        self.previous_step = self.current_step
-        self.current_step = next_step
-
-    def set_user_config_proxies(self):
-        if self.configuration.enable_proxy == True:
-            self.handler.set_http_proxy(self.configuration.combine_proxy("http"))
-            self.handler.set_https_proxy(self.configuration.combine_proxy("https"))
-            self.handler.set_ftp_proxy(self.configuration.combine_proxy("ftp"))
-            self.handler.set_socks_proxy(self.configuration.combine_proxy("socks"))
-            self.handler.set_cvs_proxy(self.configuration.combine_host_only("cvs"), self.configuration.combine_port_only("cvs"))
-        elif self.configuration.enable_proxy == False:
-            self.handler.set_http_proxy("")
-            self.handler.set_https_proxy("")
-            self.handler.set_ftp_proxy("")
-            self.handler.set_socks_proxy("")
-            self.handler.set_cvs_proxy("", "")
-
-    def set_user_config_extra(self):
-        self.handler.set_rootfs_size(self.configuration.image_rootfs_size)
-        self.handler.set_extra_size(self.configuration.image_extra_size)
-        self.handler.set_incompatible_license(self.configuration.incompat_license)
-        self.handler.set_sdk_machine(self.configuration.curr_sdk_machine)
-        self.handler.set_image_fstypes(self.configuration.image_fstypes)
-        self.handler.set_extra_config(self.configuration.extra_setting)
-        self.handler.set_extra_inherit("packageinfo image_types")
-        self.set_user_config_proxies()
-
-    def set_user_config(self):
-        # set bb layers
-        self.handler.set_bblayers(self.configuration.layers)
-        # set local configuration
-        self.handler.set_machine(self.configuration.curr_mach)
-        self.handler.set_package_format(self.configuration.curr_package_format)
-        self.handler.set_distro(self.configuration.curr_distro)
-        self.handler.set_dl_dir(self.configuration.dldir)
-        self.handler.set_sstate_dir(self.configuration.sstatedir)
-        self.handler.set_sstate_mirrors(self.configuration.sstatemirror)
-        self.handler.set_pmake(self.configuration.pmake)
-        self.handler.set_bbthreads(self.configuration.bbthread)
-        self.set_user_config_extra()
-
-    def update_recipe_model(self, selected_image, selected_recipes):
-        self.recipe_model.set_selected_image(selected_image)
-        self.recipe_model.set_selected_recipes(selected_recipes)
-
-    def update_package_model(self, selected_packages, user_selected_packages=None):
-        if user_selected_packages:
-            left = self.package_model.set_selected_packages(user_selected_packages, True)
-            self.configuration.user_selected_packages += left
-        left = self.package_model.set_selected_packages(selected_packages)
-        self.configuration.selected_packages += left
-
-    def update_configuration_parameters(self, params):
-        if params:
-            self.configuration.update(params)
-            self.parameters.update(params)
-
-    def set_base_image(self):
-        self.configuration.initial_selected_image = self.configuration.selected_image
-        if self.configuration.selected_image != self.recipe_model.__custom_image__:
-            self.hob_image = self.configuration.selected_image + "-edited"
-
-    def reset(self):
-        self.configuration.curr_mach = ""
-        self.configuration.clear_selection()
-        self.image_configuration_page.switch_machine_combo()
-        self.switch_page(self.MACHINE_SELECTION)
-
-    # Callback Functions
-    def handler_config_updated_cb(self, handler, which, values):
-        if which == "distro":
-            self.parameters.all_distros = values
-        elif which == "machine":
-            self.parameters.all_machines = values
-            self.image_configuration_page.update_machine_combo()
-        elif which == "machine-sdk":
-            self.parameters.all_sdk_machines = values
-
-    def handler_package_formats_updated_cb(self, handler, formats):
-        self.parameters.all_package_formats = formats
-
-    def switch_to_image_configuration_helper(self):
-        self.sanity_check_page.stop()
-        self.switch_page(self.IMAGE_CONFIGURATION)
-        self.image_configuration_page.switch_machine_combo()
-
-    def show_network_error_dialog_helper(self):
-        self.sanity_check_page.stop()
-        self.show_network_error_dialog()
-
-    def handler_command_succeeded_cb(self, handler, initcmd):
-        if initcmd == self.handler.GENERATE_CONFIGURATION:
-            if not self.configuration.curr_mach:
-                self.configuration.curr_mach = self.handler.runCommand(["getVariable", "HOB_MACHINE"]) or ""
-            self.update_configuration_parameters(self.get_parameters_sync())
-            if not self.sanity_checked:
-                self.sanity_check()
-                self.sanity_checked = True
-        elif initcmd == self.handler.SANITY_CHECK:
-            if self.had_network_error:
-                self.had_network_error = False
-                self.execute_after_sanity_check(self.show_network_error_dialog_helper)
-            else:
-                # Switch to the 'image configuration' page now, but we might need
-                # to wait for the minimum display time of the sanity check page
-                self.execute_after_sanity_check(self.switch_to_image_configuration_helper)
-        elif initcmd in [self.handler.GENERATE_RECIPES,
-                         self.handler.GENERATE_PACKAGES,
-                         self.handler.GENERATE_IMAGE]:
-            self.update_configuration_parameters(self.get_parameters_sync())
-            self.request_package_info_async()
-        elif initcmd == self.handler.POPULATE_PACKAGEINFO:
-            if self.current_step == self.RCPPKGINFO_POPULATING:
-                self.switch_page(self.RCPPKGINFO_POPULATED)
-                self.rcppkglist_populated()
-                return
-
-            self.rcppkglist_populated()
-            if self.current_step == self.FAST_IMAGE_GENERATING:
-                self.generate_image_async(True)
-
-    def show_error_dialog(self, msg):
-        lbl = "<b>Hob found an error</b>"
-        dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_ERROR, msg)
-        button = dialog.add_button("Close", gtk.RESPONSE_OK)
-        HobButton.style_button(button)
-        response = dialog.run()
-        dialog.destroy()
-
-    def show_warning_dialog(self):
-        dialog = ParsingWarningsDialog(title = "View warnings",
-                warnings = self.parsing_warnings,
-                parent = None,
-                flags = gtk.DIALOG_DESTROY_WITH_PARENT
-                       | gtk.DIALOG_NO_SEPARATOR)
-        response = dialog.run()
-        dialog.destroy()
-
-    def show_network_error_dialog(self):
-        lbl = "<b>Hob cannot connect to the network</b>"
-        msg = msg + "Please check your network connection. If you are using a proxy server, please make sure it is configured correctly."
-        dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_ERROR, msg)
-        button = dialog.add_button("Close", gtk.RESPONSE_OK)
-        HobButton.style_button(button)
-        button = dialog.add_button("Proxy settings", gtk.RESPONSE_CANCEL)
-        HobButton.style_button(button)
-        res = dialog.run()
-        dialog.destroy()
-        if res == gtk.RESPONSE_CANCEL:
-            res, settings_changed = self.show_simple_settings_dialog(SimpleSettingsDialog.PROXIES_PAGE_ID)
-            if not res:
-                return
-            if settings_changed:
-                self.reparse_post_adv_settings()
-
-    def handler_command_failed_cb(self, handler, msg):
-        if msg:
-            self.show_error_dialog(msg)
-        self.reset()
-
-    def handler_parsing_warning_cb(self, handler, warn_msg):
-        self.parsing_warnings.append(warn_msg)
-
-    def handler_sanity_failed_cb(self, handler, msg, network_error):
-        self.reset()
-        if network_error:
-            # Mark this in an internal field. The "network error" dialog will be
-            # shown later, when a SanityCheckPassed event will be handled
-            # (as sent by sanity.bbclass)
-            self.had_network_error = True
-        else:
-            msg = msg.replace("your local.conf", "Settings")
-            self.show_error_dialog(msg)
-            self.reset()
-
-    def window_sensitive(self, sensitive):
-        self.image_configuration_page.machine_combo.set_sensitive(sensitive)
-        self.image_configuration_page.machine_combo.child.set_sensitive(sensitive)
-        self.image_configuration_page.image_combo.set_sensitive(sensitive)
-        self.image_configuration_page.image_combo.child.set_sensitive(sensitive)
-        self.image_configuration_page.layer_button.set_sensitive(sensitive)
-        self.image_configuration_page.layer_info_icon.set_sensitive(sensitive)
-        self.image_configuration_page.toolbar.set_sensitive(sensitive)
-        self.image_configuration_page.view_adv_configuration_button.set_sensitive(sensitive)
-        self.image_configuration_page.config_build_button.set_sensitive(sensitive)
-
-        self.recipe_details_page.set_sensitive(sensitive)
-        self.package_details_page.set_sensitive(sensitive)
-        self.build_details_page.set_sensitive(sensitive)
-        self.image_details_page.set_sensitive(sensitive)
-
-        if sensitive:
-            self.window.set_cursor(None)
-        else:
-            self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
-        self.sensitive = sensitive
-
-
-    def handler_generating_data_cb(self, handler):
-        self.window_sensitive(False)
-
-    def handler_data_generated_cb(self, handler):
-        self.window_sensitive(True)
-
-    def rcppkglist_populated(self):
-        selected_image = self.configuration.selected_image
-        selected_recipes = self.configuration.selected_recipes[:]
-        selected_packages = self.configuration.selected_packages[:]
-        user_selected_packages = self.configuration.user_selected_packages[:]
-
-        self.image_configuration_page.update_image_combo(self.recipe_model, selected_image)
-        self.image_configuration_page.update_image_desc()
-        self.update_recipe_model(selected_image, selected_recipes)
-        self.update_package_model(selected_packages, user_selected_packages)
-
-    def recipelist_changed_cb(self, recipe_model):
-        self.recipe_details_page.refresh_selection()
-
-    def packagelist_changed_cb(self, package_model):
-        self.package_details_page.refresh_selection()
-
-    def handler_recipe_populated_cb(self, handler):
-        self.image_configuration_page.update_progress_bar("Populating recipes", 0.99)
-
-    def handler_package_populated_cb(self, handler):
-        self.image_configuration_page.update_progress_bar("Populating packages", 1.0)
-
-    def handler_parsing_started_cb(self, handler, message):
-        if self.current_step != self.RCPPKGINFO_POPULATING:
-            return
-
-        fraction = 0
-        if message["eventname"] == "TreeDataPreparationStarted":
-            fraction = 0.6 + fraction
-            self.image_configuration_page.stop_button.set_sensitive(False)
-            self.image_configuration_page.update_progress_bar("Generating dependency tree", fraction)
-        else:
-            self.image_configuration_page.stop_button.set_sensitive(True)
-            self.image_configuration_page.update_progress_bar(message["title"], fraction)
-
-    def handler_parsing_cb(self, handler, message):
-        if self.current_step != self.RCPPKGINFO_POPULATING:
-            return
-
-        fraction = message["current"] * 1.0/message["total"]
-        if message["eventname"] == "TreeDataPreparationProgress":
-            fraction = 0.6 + 0.38 * fraction
-            self.image_configuration_page.update_progress_bar("Generating dependency tree", fraction)
-        else:
-            fraction = 0.6 * fraction
-            self.image_configuration_page.update_progress_bar(message["title"], fraction)
-
-    def handler_parsing_completed_cb(self, handler, message):
-        if self.current_step != self.RCPPKGINFO_POPULATING:
-            return
-
-        if message["eventname"] == "TreeDataPreparationCompleted":
-            fraction = 0.98
-        else:
-            fraction = 0.6
-        self.image_configuration_page.update_progress_bar("Generating dependency tree", fraction)
-
-    def handler_build_started_cb(self, running_build):
-        if self.current_step == self.FAST_IMAGE_GENERATING:
-            fraction = 0
-        elif self.current_step == self.IMAGE_GENERATING:
-            if self.previous_step == self.FAST_IMAGE_GENERATING:
-                fraction = 0.9
-            else:
-                fraction = 0
-        elif self.current_step == self.PACKAGE_GENERATING:
-            fraction = 0
-        self.build_details_page.update_progress_bar("Build Started: ", fraction)
-        self.build_details_page.show_configurations(self.configuration, self.parameters)
-
-    def build_succeeded(self):
-        if self.current_step == self.FAST_IMAGE_GENERATING:
-            fraction = 0.9
-        elif self.current_step == self.IMAGE_GENERATING:
-            fraction = 1.0
-            version = ""
-            self.parameters.image_names = []
-            selected_image = self.recipe_model.get_selected_image()
-            if selected_image == self.recipe_model.__custom_image__:
-                if self.configuration.initial_selected_image != selected_image:
-                    version = self.recipe_model.get_custom_image_version()
-                linkname = self.hob_image + version + "-" + self.configuration.curr_mach
-            else:
-                linkname = selected_image + '-' + self.configuration.curr_mach
-            image_extension = self.get_image_extension()
-            for image_type in self.parameters.image_types:
-                if image_type in image_extension:
-                    real_types = image_extension[image_type]
-                else:
-                    real_types = [image_type]
-                for real_image_type in real_types:
-                    linkpath = self.parameters.image_addr + '/' + linkname + '.' + real_image_type
-                    if os.path.exists(linkpath):
-                        self.parameters.image_names.append(os.readlink(linkpath))
-        elif self.current_step == self.PACKAGE_GENERATING:
-            fraction = 1.0
-        self.build_details_page.update_progress_bar("Build Completed: ", fraction)
-        self.handler.build_succeeded_async()
-        self.stopping = False
-
-        if self.current_step == self.PACKAGE_GENERATING:
-            self.switch_page(self.PACKAGE_GENERATED)
-        elif self.current_step == self.IMAGE_GENERATING:
-            self.switch_page(self.IMAGE_GENERATED)
-
-    def build_failed(self):
-        if self.stopping:
-            status = "stop"
-            message = "Build stopped: "
-            fraction = self.build_details_page.progress_bar.get_fraction()
-            stop_to_next_edit = ""
-            if self.current_step == self.FAST_IMAGE_GENERATING:
-                stop_to_next_edit = "image configuration"
-            elif self.current_step == self.IMAGE_GENERATING:
-                if self.previous_step == self.FAST_IMAGE_GENERATING:
-                    stop_to_next_edit = "image configuration"
-                else:
-                    stop_to_next_edit = "packages"
-            elif self.current_step == self.PACKAGE_GENERATING:
-                stop_to_next_edit = "recipes"
-            button = self.build_details_page.show_stop_page(stop_to_next_edit.split(' ')[0])
-            self.set_default(button)
-        else:
-            fail_to_next_edit = ""
-            if self.current_step == self.FAST_IMAGE_GENERATING:
-                fail_to_next_edit = "image configuration"
-                fraction = 0.9
-            elif self.current_step == self.IMAGE_GENERATING:
-                if self.previous_step == self.FAST_IMAGE_GENERATING:
-                    fail_to_next_edit = "image configuration"
-                else:
-                    fail_to_next_edit = "packages"
-                fraction = 1.0
-            elif self.current_step == self.PACKAGE_GENERATING:
-                fail_to_next_edit = "recipes"
-                fraction = 1.0
-            self.build_details_page.show_fail_page(fail_to_next_edit.split(' ')[0])
-            status = "fail"
-            message = "Build failed: "
-        self.build_details_page.update_progress_bar(message, fraction, status)
-        self.build_details_page.show_back_button()
-        self.build_details_page.hide_stop_button()
-        self.handler.build_failed_async()
-        self.stopping = False
-
-    def handler_build_succeeded_cb(self, running_build):
-        if not self.stopping:
-            self.build_succeeded()
-        else:
-            self.build_failed()
-
-
-    def handler_build_failed_cb(self, running_build):
-        self.build_failed()
-
-    def handler_build_aborted_cb(self, running_build):
-        self.build_failed()
-
-    def handler_no_provider_cb(self, running_build, msg):
-        dialog = CrumbsMessageDialog(self, glib.markup_escape_text(msg), gtk.MESSAGE_INFO)
-        button = dialog.add_button("Close", gtk.RESPONSE_OK)
-        HobButton.style_button(button)
-        dialog.run()
-        dialog.destroy()
-        self.build_failed()
-
-    def handler_task_started_cb(self, running_build, message): 
-        fraction = message["current"] * 1.0/message["total"]
-        title = "Build packages"
-        if self.current_step == self.FAST_IMAGE_GENERATING:
-            if message["eventname"] == "sceneQueueTaskStarted":
-                fraction = 0.27 * fraction
-            elif message["eventname"] == "runQueueTaskStarted":
-                fraction = 0.27 + 0.63 * fraction
-        elif self.current_step == self.IMAGE_GENERATING:
-            title = "Build image"
-            if self.previous_step == self.FAST_IMAGE_GENERATING:
-                if message["eventname"] == "sceneQueueTaskStarted":
-                    fraction = 0.27 + 0.63 + 0.03 * fraction
-                elif message["eventname"] == "runQueueTaskStarted":
-                    fraction = 0.27 + 0.63 + 0.03 + 0.07 * fraction
-            else:
-                if message["eventname"] == "sceneQueueTaskStarted":
-                    fraction = 0.2 * fraction
-                elif message["eventname"] == "runQueueTaskStarted":
-                    fraction = 0.2 + 0.8 * fraction
-        elif self.current_step == self.PACKAGE_GENERATING:
-            if message["eventname"] == "sceneQueueTaskStarted":
-                fraction = 0.2 * fraction
-            elif message["eventname"] == "runQueueTaskStarted":
-                fraction = 0.2 + 0.8 * fraction
-        self.build_details_page.update_progress_bar(title + ": ", fraction)
-        self.build_details_page.update_build_status(message["current"], message["total"], message["task"])
-
-    def handler_disk_full_cb(self, running_build):
-        self.disk_full = True
-
-    def handler_build_failure_cb(self, running_build):
-        self.build_details_page.show_issues()
-
-    def handler_build_log_cb(self, running_build, func, obj):
-        if hasattr(self.logger, func):
-            getattr(self.logger, func)(obj)
-
-    def destroy_window_cb(self, widget, event):
-        if not self.sensitive:
-            return True
-        elif self.handler.building:
-            self.stop_build()
-            return True
-        else:
-            gtk.main_quit()
-
-    def event_handle_SIGINT(self, signal, frame):
-        for w in gtk.window_list_toplevels():
-            if w.get_modal():
-                w.response(gtk.RESPONSE_DELETE_EVENT)
-        sys.exit(0)
-
-    def build_packages(self):
-        _, all_recipes = self.recipe_model.get_selected_recipes()
-        if not all_recipes:
-            lbl = "<b>No selections made</b>"
-            msg = "You have not made any selections"
-            msg = msg + " so there isn't anything to bake at this time."
-            dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO, msg)
-            button = dialog.add_button("Close", gtk.RESPONSE_OK)
-            HobButton.style_button(button)
-            dialog.run()
-            dialog.destroy()
-            return
-        self.generate_packages_async(True)
-
-    def build_image(self):
-        selected_packages = self.package_model.get_selected_packages()
-        if not selected_packages:      
-            lbl = "<b>No selections made</b>"
-            msg = "You have not made any selections"
-            msg = msg + " so there isn't anything to bake at this time."
-            dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO, msg)
-            button = dialog.add_button("Close", gtk.RESPONSE_OK)
-            HobButton.style_button(button)
-            dialog.run()
-            dialog.destroy()
-            return
-        self.generate_image_async(True)
-
-    def just_bake(self):
-        selected_image = self.recipe_model.get_selected_image()
-        selected_packages = self.package_model.get_selected_packages() or []
-
-        # If no base image and no selected packages don't build anything
-        if not (selected_packages or selected_image != self.recipe_model.__custom_image__):
-            lbl = "<b>No selections made</b>"
-            msg = "You have not made any selections"
-            msg = msg + " so there isn't anything to bake at this time."
-            dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO, msg)
-            button = dialog.add_button("Close", gtk.RESPONSE_OK)
-            HobButton.style_button(button)
-            dialog.run()
-            dialog.destroy()
-            return
-
-        self.fast_generate_image_async(True)
-
-    def show_recipe_property_dialog(self, properties):
-        information = {}
-        dialog = PropertyDialog(title = properties["name"] +' '+ "properties",
-                      parent = self,
-                      information = properties,
-                      flags = gtk.DIALOG_DESTROY_WITH_PARENT
-                          | gtk.DIALOG_NO_SEPARATOR)
-
-        dialog.set_modal(False)
-
-        button = dialog.add_button("Close", gtk.RESPONSE_NO)
-        HobAltButton.style_button(button)
-        button.connect("clicked", lambda w: dialog.destroy())
-
-        dialog.run()
-
-    def show_packages_property_dialog(self, properties):
-        information = {}
-        dialog = PropertyDialog(title = properties["name"] +' '+ "properties",
-                      parent = self,
-                      information = properties,
-                      flags = gtk.DIALOG_DESTROY_WITH_PARENT
-                          | gtk.DIALOG_NO_SEPARATOR)
-
-        dialog.set_modal(False)
-
-        button = dialog.add_button("Close", gtk.RESPONSE_NO)
-        HobAltButton.style_button(button)
-        button.connect("clicked", lambda w: dialog.destroy())
-
-        dialog.run()
-
-    def show_layer_selection_dialog(self):
-        dialog = LayerSelectionDialog(title = "Layers",
-                     layers = copy.deepcopy(self.configuration.layers),
-                     layers_non_removable = copy.deepcopy(self.configuration.layers_non_removable),
-                     all_layers = self.parameters.all_layers,
-                     parent = self,
-                     flags = gtk.DIALOG_MODAL
-                         | gtk.DIALOG_DESTROY_WITH_PARENT
-                         | gtk.DIALOG_NO_SEPARATOR)
-        button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
-        HobAltButton.style_button(button)
-        button = dialog.add_button("OK", gtk.RESPONSE_YES)
-        HobButton.style_button(button)
-        response = dialog.run()
-        if response == gtk.RESPONSE_YES:
-            self.configuration.layers = dialog.layers
-            # DO refresh layers
-            if dialog.layers_changed:
-                self.update_config_async()
-        dialog.destroy()
-
-    def get_image_extension(self):
-        image_extension = {}
-        for type in self.parameters.image_types:
-            ext = self.handler.runCommand(["getVariable", "IMAGE_EXTENSION_%s" % type])
-            if ext:
-                image_extension[type] = ext.split(' ')
-
-        return image_extension
-
-    def show_load_my_images_dialog(self):
-        image_extension = self.get_image_extension()
-        dialog = ImageSelectionDialog(self.parameters.image_addr, self.parameters.image_types,
-                                      "Open My Images", self,
-                                       gtk.FILE_CHOOSER_ACTION_SAVE, None,
-                                       image_extension)
-        button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
-        HobAltButton.style_button(button)
-        button = dialog.add_button("Open", gtk.RESPONSE_YES)
-        HobButton.style_button(button)
-        response = dialog.run()
-        if response == gtk.RESPONSE_YES:
-            if not dialog.image_names:
-                lbl = "<b>No selections made</b>"
-                msg = "You have not made any selections"
-                crumbs_dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO, msg)
-                button = crumbs_dialog.add_button("Close", gtk.RESPONSE_OK)
-                HobButton.style_button(button)
-                crumbs_dialog.run()
-                crumbs_dialog.destroy()
-                dialog.destroy()
-                return
-
-            self.parameters.image_addr = dialog.image_folder
-            self.parameters.image_names = dialog.image_names[:]
-            self.switch_page(self.MY_IMAGE_OPENED)
-
-        dialog.destroy()
-
-    def show_adv_settings_dialog(self, tab=None):
-        dialog = AdvancedSettingsDialog(title = "Advanced configuration",
-            configuration = copy.deepcopy(self.configuration),
-            all_image_types = self.parameters.image_types,
-            all_package_formats = self.parameters.all_package_formats,
-            all_distros = self.parameters.all_distros,
-            all_sdk_machines = self.parameters.all_sdk_machines,
-            max_threads = self.parameters.max_threads,
-            parent = self,
-            flags = gtk.DIALOG_MODAL
-                    | gtk.DIALOG_DESTROY_WITH_PARENT
-                    | gtk.DIALOG_NO_SEPARATOR)
-        button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
-        HobAltButton.style_button(button)
-        button = dialog.add_button("Save", gtk.RESPONSE_YES)
-        HobButton.style_button(button)
-        dialog.set_save_button(button)
-        response = dialog.run()
-        settings_changed = False
-        if response == gtk.RESPONSE_YES:
-            self.configuration = dialog.configuration
-            self.configuration.save(self.handler, True) # remember settings
-            settings_changed = dialog.settings_changed
-        dialog.destroy()
-        return response == gtk.RESPONSE_YES, settings_changed
-
-    def show_simple_settings_dialog(self, tab=None):
-        dialog = SimpleSettingsDialog(title = "Settings",
-            configuration = copy.deepcopy(self.configuration),
-            all_image_types = self.parameters.image_types,
-            all_package_formats = self.parameters.all_package_formats,
-            all_distros = self.parameters.all_distros,
-            all_sdk_machines = self.parameters.all_sdk_machines,
-            max_threads = self.parameters.max_threads,
-            parent = self,
-            flags = gtk.DIALOG_MODAL
-                    | gtk.DIALOG_DESTROY_WITH_PARENT
-                    | gtk.DIALOG_NO_SEPARATOR,
-            handler = self.handler)
-        button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
-        HobAltButton.style_button(button)
-        button = dialog.add_button("Save", gtk.RESPONSE_YES)
-        HobButton.style_button(button)
-        if tab:
-            dialog.switch_to_page(tab)
-        response = dialog.run()
-        settings_changed = False
-        if response == gtk.RESPONSE_YES:
-            self.configuration = dialog.configuration
-            self.configuration.save(self.handler, True) # remember settings
-            settings_changed = dialog.settings_changed
-            if dialog.proxy_settings_changed:
-                self.set_user_config_proxies()
-        elif dialog.proxy_test_ran:
-            # The user might have modified the proxies in the "Proxy"
-            # tab, which in turn made the proxy settings modify in bb.
-            # If "Cancel" was pressed, restore the previous proxy
-            # settings inside bb.
-            self.set_user_config_proxies()
-        dialog.destroy()
-        return response == gtk.RESPONSE_YES, settings_changed
-
-    def reparse_post_adv_settings(self):
-        if not self.configuration.curr_mach:
-            self.update_config_async()
-        else:
-            self.configuration.clear_selection()
-            # DO reparse recipes
-            self.populate_recipe_package_info_async()
-
-    def deploy_image(self, image_name):
-        if not image_name:
-            lbl = "<b>Please select an image to deploy.</b>"
-            dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO)
-            button = dialog.add_button("Close", gtk.RESPONSE_OK)
-            HobButton.style_button(button)
-            dialog.run()
-            dialog.destroy()
-            return
-
-        image_path = os.path.join(self.parameters.image_addr, image_name)
-        dialog = DeployImageDialog(title = "Usb Image Maker",
-            image_path = image_path,
-            parent = self,
-            flags = gtk.DIALOG_MODAL
-                    | gtk.DIALOG_DESTROY_WITH_PARENT
-                    | gtk.DIALOG_NO_SEPARATOR)
-        button = dialog.add_button("Close", gtk.RESPONSE_NO)
-        HobAltButton.style_button(button)
-        button = dialog.add_button("Make usb image", gtk.RESPONSE_YES)
-        HobButton.style_button(button)
-        response = dialog.run()
-        dialog.destroy()
-
-    def show_load_kernel_dialog(self):
-        dialog = gtk.FileChooserDialog("Load Kernel Files", self,
-                                       gtk.FILE_CHOOSER_ACTION_SAVE)
-        button = dialog.add_button("Cancel", gtk.RESPONSE_NO)
-        HobAltButton.style_button(button)
-        button = dialog.add_button("Open", gtk.RESPONSE_YES)
-        HobButton.style_button(button)
-        filter = gtk.FileFilter()
-        filter.set_name("Kernel Files")
-        filter.add_pattern("*.bin")
-        dialog.add_filter(filter)
-
-        dialog.set_current_folder(self.parameters.image_addr)
-
-        response = dialog.run()
-        kernel_path = ""
-        if response == gtk.RESPONSE_YES:
-            kernel_path = dialog.get_filename()
-
-        dialog.destroy()
-
-        return kernel_path
-
-    def runqemu_image(self, image_name, kernel_name):
-        if not image_name or not kernel_name:
-            lbl = "<b>Please select %s to launch in QEMU.</b>" % ("a kernel" if image_name else "an image")
-            dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_INFO)
-            button = dialog.add_button("Close", gtk.RESPONSE_OK)
-            HobButton.style_button(button)
-            dialog.run()
-            dialog.destroy()
-            return
-
-        kernel_path = os.path.join(self.parameters.image_addr, kernel_name)
-        image_path = os.path.join(self.parameters.image_addr, image_name)
-
-        source_env_path = os.path.join(self.parameters.core_base, "oe-init-build-env")
-        tmp_path = self.parameters.tmpdir
-        cmdline = bb.ui.crumbs.utils.which_terminal()
-        if os.path.exists(image_path) and os.path.exists(kernel_path) \
-           and os.path.exists(source_env_path) and os.path.exists(tmp_path) \
-           and cmdline:
-            cmdline += "\' bash -c \"export OE_TMPDIR=" + tmp_path + "; "
-            cmdline += "source " + source_env_path + " " + os.getcwd() + "; "
-            cmdline += "runqemu " + kernel_path + " " + image_path + "\"\'"
-            subprocess.Popen(shlex.split(cmdline))
-        else:
-            lbl = "<b>Path error</b>"
-            msg = "One of your paths is wrong,"
-            msg = msg + " please make sure the following paths exist:\n"
-            msg = msg + "image path:" + image_path + "\n"
-            msg = msg + "kernel path:" + kernel_path + "\n"
-            msg = msg + "source environment path:" + source_env_path + "\n"
-            msg = msg + "tmp path: " + tmp_path + "."
-            msg = msg + "You may be missing either xterm or vte for terminal services."
-            dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_ERROR, msg)
-            button = dialog.add_button("Close", gtk.RESPONSE_OK)
-            HobButton.style_button(button)
-            dialog.run()
-            dialog.destroy()
-
-    def show_packages(self):
-        self.package_details_page.refresh_tables()
-        self.switch_page(self.PACKAGE_SELECTION)
-
-    def show_recipes(self):
-        self.switch_page(self.RECIPE_SELECTION)
-
-    def show_image_details(self):
-        self.switch_page(self.IMAGE_GENERATED)
-
-    def show_configuration(self):
-        self.switch_page(self.BASEIMG_SELECTED)
-
-    def stop_build(self):
-        if self.stopping:
-            lbl = "<b>Force Stop build?</b>"
-            msg = "You've already selected Stop once,"
-            msg = msg + " would you like to 'Force Stop' the build?\n\n"
-            msg = msg + "This will stop the build as quickly as possible but may"
-            msg = msg + " well leave your build directory in an  unusable state"
-            msg = msg + " that requires manual steps to fix."
-            dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_WARNING, msg)
-            button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL)
-            HobAltButton.style_button(button)
-            button = dialog.add_button("Force Stop", gtk.RESPONSE_YES)
-            HobButton.style_button(button)
-        else:
-            lbl = "<b>Stop build?</b>"
-            msg = "Are you sure you want to stop this"
-            msg = msg + " build?\n\n'Stop' will stop the build as soon as all in"
-            msg = msg + " progress build tasks are finished. However if a"
-            msg = msg + " lengthy compilation phase is in progress this may take"
-            msg = msg + " some time.\n\n"
-            msg = msg + "'Force Stop' will stop the build as quickly as"
-            msg = msg + " possible but may well leave your build directory in an"
-            msg = msg + " unusable state that requires manual steps to fix."
-            dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_WARNING, msg)
-            button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL)
-            HobAltButton.style_button(button)
-            button = dialog.add_button("Force stop", gtk.RESPONSE_YES)
-            HobAltButton.style_button(button)
-            button = dialog.add_button("Stop", gtk.RESPONSE_OK)
-            HobButton.style_button(button)
-        response = dialog.run()
-        dialog.destroy()
-        if response != gtk.RESPONSE_CANCEL:
-            self.stopping = True
-        if response == gtk.RESPONSE_OK:
-            self.build_details_page.progress_bar.set_stop_title("Stopping the build....")
-            self.build_details_page.progress_bar.set_rcstyle("stop")
-            self.cancel_build_sync()
-        elif response == gtk.RESPONSE_YES:
-            self.cancel_build_sync(True)
-
-    def do_log(self, consolelogfile = None):
-        if consolelogfile:
-            bb.utils.mkdirhier(os.path.dirname(consolelogfile))
-            if self.consolelog:
-                self.logger.removeHandler(self.consolelog)
-                self.consolelog = None
-            self.consolelog = logging.FileHandler(consolelogfile)
-            bb.msg.addDefaultlogFilter(self.consolelog)
-            format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
-            self.consolelog.setFormatter(format)
-
-            self.logger.addHandler(self.consolelog)
-
-    def get_topdir(self):
-        return self.handler.get_topdir()
-
-    def wait(self, delay):
-        time_start = time.time()
-        time_end = time_start + delay
-        while time_end > time.time():
-            while gtk.events_pending():
-                gtk.main_iteration()
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/buildmanager.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/buildmanager.py
deleted file mode 100644
index e858d75..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/buildmanager.py
+++ /dev/null
@@ -1,455 +0,0 @@
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2008        Intel Corporation
-#
-# Authored by Rob Bradford <rob@linux.intel.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.
-
-import gtk
-import gobject
-import threading
-import os
-import datetime
-import time
-
-class BuildConfiguration:
-    """ Represents a potential *or* historic *or* concrete build. It
-    encompasses all the things that we need to tell bitbake to do to make it
-    build what we want it to build.
-
-    It also stored the metadata URL and the set of possible machines (and the
-    distros / images / uris for these. Apart from the metdata URL these are
-    not serialised to file (since they may be transient). In some ways this
-    functionality might be shifted to the loader class."""
-
-    def __init__ (self):
-        self.metadata_url = None
-
-        # Tuple of (distros, image, urls)
-        self.machine_options = {}
-
-        self.machine = None
-        self.distro = None
-        self.image = None
-        self.urls = []
-        self.extra_urls = []
-        self.extra_pkgs = []
-
-    def get_machines_model (self):
-        model = gtk.ListStore (gobject.TYPE_STRING)
-        for machine in self.machine_options.keys():
-            model.append ([machine])
-
-        return model
-
-    def get_distro_and_images_models (self, machine):
-        distro_model = gtk.ListStore (gobject.TYPE_STRING)
-
-        for distro in self.machine_options[machine][0]:
-            distro_model.append ([distro])
-
-        image_model = gtk.ListStore (gobject.TYPE_STRING)
-
-        for image in self.machine_options[machine][1]:
-            image_model.append ([image])
-
-        return (distro_model, image_model)
-
-    def get_repos (self):
-        self.urls = self.machine_options[self.machine][2]
-        return self.urls
-
-    # It might be a lot lot better if we stored these in like, bitbake conf
-    # file format.
-    @staticmethod
-    def load_from_file (filename):
-
-        conf = BuildConfiguration()
-        with open(filename, "r") as f:
-            for line in f:
-                data = line.split (";")[1]
-                if (line.startswith ("metadata-url;")):
-                    conf.metadata_url = data.strip()
-                    continue
-                if (line.startswith ("url;")):
-                    conf.urls += [data.strip()]
-                    continue
-                if (line.startswith ("extra-url;")):
-                    conf.extra_urls += [data.strip()]
-                    continue
-                if (line.startswith ("machine;")):
-                    conf.machine = data.strip()
-                    continue
-                if (line.startswith ("distribution;")):
-                    conf.distro = data.strip()
-                    continue
-                if (line.startswith ("image;")):
-                    conf.image = data.strip()
-                    continue
-
-        return conf
-
-    # Serialise to a file. This is part of the build process and we use this
-    # to be able to repeat a given build (using the same set of parameters)
-    # but also so that we can include the details of the image / machine /
-    # distro in the build manager tree view.
-    def write_to_file (self, filename):
-        f = open (filename, "w")
-
-        lines = []
-
-        if (self.metadata_url):
-            lines += ["metadata-url;%s\n" % (self.metadata_url)]
-
-        for url in self.urls:
-            lines += ["url;%s\n" % (url)]
-
-        for url in self.extra_urls:
-            lines += ["extra-url;%s\n" % (url)]
-
-        if (self.machine):
-            lines += ["machine;%s\n" % (self.machine)]
-
-        if (self.distro):
-            lines += ["distribution;%s\n" % (self.distro)]
-
-        if (self.image):
-            lines += ["image;%s\n" % (self.image)]
-
-        f.writelines (lines)
-        f.close ()
-
-class BuildResult(gobject.GObject):
-    """ Represents an historic build. Perhaps not successful. But it includes
-    things such as the files that are in the directory (the output from the
-    build) as well as a deserialised BuildConfiguration file that is stored in
-    ".conf" in the directory for the build.
-
-    This is GObject so that it can be included in the TreeStore."""
-
-    (STATE_COMPLETE, STATE_FAILED, STATE_ONGOING) = \
-        (0, 1, 2)
-
-    def __init__ (self, parent, identifier):
-        gobject.GObject.__init__ (self)
-        self.date = None
-
-        self.files = []
-        self.status = None
-        self.identifier = identifier
-        self.path = os.path.join (parent, identifier)
-
-        # Extract the date, since the directory name is of the
-        # format build-<year><month><day>-<ordinal> we can easily
-        # pull it out.
-        # TODO: Better to stat a file?
-        (_, date, revision) = identifier.split ("-")
-        print(date)
-
-        year = int (date[0:4])
-        month = int (date[4:6])
-        day = int (date[6:8])
-
-        self.date = datetime.date (year, month, day)
-
-        self.conf = None
-
-        # By default builds are STATE_FAILED unless we find a "complete" file
-        # in which case they are STATE_COMPLETE
-        self.state = BuildResult.STATE_FAILED
-        for file in os.listdir (self.path):
-            if (file.startswith (".conf")):
-                conffile = os.path.join (self.path, file)
-                self.conf = BuildConfiguration.load_from_file (conffile)
-            elif (file.startswith ("complete")):
-                self.state = BuildResult.STATE_COMPLETE
-            else:
-                self.add_file (file)
-
-    def add_file (self, file):
-        # Just add the file for now. Don't care about the type.
-        self.files += [(file, None)]
-
-class BuildManagerModel (gtk.TreeStore):
-    """ Model for the BuildManagerTreeView. This derives from gtk.TreeStore
-    but it abstracts nicely what the columns mean and the setup of the columns
-    in the model. """
-
-    (COL_IDENT, COL_DESC, COL_MACHINE, COL_DISTRO, COL_BUILD_RESULT, COL_DATE, COL_STATE) = \
-        (0, 1, 2, 3, 4, 5, 6)
-
-    def __init__ (self):
-        gtk.TreeStore.__init__ (self,
-            gobject.TYPE_STRING,
-            gobject.TYPE_STRING,
-            gobject.TYPE_STRING,
-            gobject.TYPE_STRING,
-            gobject.TYPE_OBJECT,
-            gobject.TYPE_INT64,
-            gobject.TYPE_INT)
-
-class BuildManager (gobject.GObject):
-    """ This class manages the historic builds that have been found in the
-    "results" directory but is also used for starting a new build."""
-
-    __gsignals__ = {
-        'population-finished' : (gobject.SIGNAL_RUN_LAST,
-                                 gobject.TYPE_NONE,
-                                 ()),
-        'populate-error' : (gobject.SIGNAL_RUN_LAST,
-                            gobject.TYPE_NONE,
-                            ())
-    }
-
-    def update_build_result (self, result, iter):
-        # Convert the date into something we can sort by.
-        date = long (time.mktime (result.date.timetuple()))
-
-        # Add a top level entry for the build
-
-        self.model.set (iter,
-            BuildManagerModel.COL_IDENT, result.identifier,
-            BuildManagerModel.COL_DESC, result.conf.image,
-            BuildManagerModel.COL_MACHINE, result.conf.machine,
-            BuildManagerModel.COL_DISTRO, result.conf.distro,
-            BuildManagerModel.COL_BUILD_RESULT, result,
-            BuildManagerModel.COL_DATE, date,
-            BuildManagerModel.COL_STATE, result.state)
-
-        # And then we use the files in the directory as the children for the
-        # top level iter.
-        for file in result.files:
-            self.model.append (iter, (None, file[0], None, None, None, date, -1))
-
-    # This function is called as an idle by the BuildManagerPopulaterThread
-    def add_build_result (self, result):
-        gtk.gdk.threads_enter()
-        self.known_builds += [result]
-
-        self.update_build_result (result, self.model.append (None))
-
-        gtk.gdk.threads_leave()
-
-    def notify_build_finished (self):
-        # This is a bit of a hack. If we have a running build running then we
-        # will have a row in the model in STATE_ONGOING. Find it and make it
-        # as if it was a proper historic build (well, it is completed now....)
-
-        # We need to use the iters here rather than the Python iterator
-        # interface to the model since we need to pass it into
-        # update_build_result
-
-        iter = self.model.get_iter_first()
-
-        while (iter):
-            (ident, state) = self.model.get(iter,
-                BuildManagerModel.COL_IDENT,
-                BuildManagerModel.COL_STATE)
-
-            if state == BuildResult.STATE_ONGOING:
-                result = BuildResult (self.results_directory, ident)
-                self.update_build_result (result, iter)
-            iter = self.model.iter_next(iter)
-
-    def notify_build_succeeded (self):
-        # Write the "complete" file so that when we create the BuildResult
-        # object we put into the model
-
-        complete_file_path = os.path.join (self.cur_build_directory, "complete")
-        f = file (complete_file_path, "w")
-        f.close()
-        self.notify_build_finished()
-
-    def notify_build_failed (self):
-        # Without a "complete" file then this will mark the build as failed:
-        self.notify_build_finished()
-
-    # This function is called as an idle
-    def emit_population_finished_signal (self):
-        gtk.gdk.threads_enter()
-        self.emit ("population-finished")
-        gtk.gdk.threads_leave()
-
-    class BuildManagerPopulaterThread (threading.Thread):
-        def __init__ (self, manager, directory):
-            threading.Thread.__init__ (self)
-            self.manager = manager
-            self.directory = directory
-
-        def run (self):
-            # For each of the "build-<...>" directories ..
-
-            if os.path.exists (self.directory):
-                for directory in os.listdir (self.directory):
-
-                    if not directory.startswith ("build-"):
-                        continue
-
-                    build_result = BuildResult (self.directory, directory)
-                    self.manager.add_build_result (build_result)
-
-            gobject.idle_add (BuildManager.emit_population_finished_signal,
-                self.manager)
-
-    def __init__ (self, server, results_directory):
-        gobject.GObject.__init__ (self)
-
-        # The builds that we've found from walking the result directory
-        self.known_builds = []
-
-        # Save out the bitbake server, we need this for issuing commands to
-        # the cooker:
-        self.server = server
-
-        # The TreeStore that we use
-        self.model = BuildManagerModel ()
-
-        # The results directory is where we create (and look for) the
-        # build-<xyz>-<n> directories. We need to populate ourselves from
-        # directory
-        self.results_directory = results_directory
-        self.populate_from_directory (self.results_directory)
-
-    def populate_from_directory (self, directory):
-        thread = BuildManager.BuildManagerPopulaterThread (self, directory)
-        thread.start()
-
-    # Come up with the name for the next build ident by combining "build-"
-    # with the date formatted as yyyymmdd and then an ordinal. We do this by
-    # an optimistic algorithm incrementing the ordinal if we find that it
-    # already exists.
-    def get_next_build_ident (self):
-        today = datetime.date.today ()
-        datestr = str (today.year) + str (today.month) + str (today.day)
-
-        revision = 0
-        test_name = "build-%s-%d" % (datestr, revision)
-        test_path = os.path.join (self.results_directory, test_name)
-
-        while (os.path.exists (test_path)):
-            revision += 1
-            test_name = "build-%s-%d" % (datestr, revision)
-            test_path = os.path.join (self.results_directory, test_name)
-
-        return test_name
-
-    # Take a BuildConfiguration and then try and build it based on the
-    # parameters of that configuration. S
-    def do_build (self, conf):
-        server = self.server
-
-        # Work out the build directory. Note we actually create the
-        # directories here since we need to write the ".conf" file. Otherwise
-        # we could have relied on bitbake's builder thread to actually make
-        # the directories as it proceeds with the build.
-        ident = self.get_next_build_ident ()
-        build_directory = os.path.join (self.results_directory,
-            ident)
-        self.cur_build_directory = build_directory
-        os.makedirs (build_directory)
-
-        conffile = os.path.join (build_directory, ".conf")
-        conf.write_to_file (conffile)
-
-        # Add a row to the model representing this ongoing build. It's kinda a
-        # fake entry. If this build completes or fails then this gets updated
-        # with the real stuff like the historic builds
-        date = long (time.time())
-        self.model.append (None, (ident, conf.image, conf.machine, conf.distro,
-            None, date, BuildResult.STATE_ONGOING))
-        try:
-            server.runCommand(["setVariable", "BUILD_IMAGES_FROM_FEEDS", 1])
-            server.runCommand(["setVariable", "MACHINE", conf.machine])
-            server.runCommand(["setVariable", "DISTRO", conf.distro])
-            server.runCommand(["setVariable", "PACKAGE_CLASSES", "package_ipk"])
-            server.runCommand(["setVariable", "BBFILES", \
-              """${OEROOT}/meta/packages/*/*.bb ${OEROOT}/meta-moblin/packages/*/*.bb"""])
-            server.runCommand(["setVariable", "TMPDIR", "${OEROOT}/build/tmp"])
-            server.runCommand(["setVariable", "IPK_FEED_URIS", \
-                " ".join(conf.get_repos())])
-            server.runCommand(["setVariable", "DEPLOY_DIR_IMAGE",
-                build_directory])
-            server.runCommand(["buildTargets", [conf.image], "rootfs"])
-
-        except Exception as e:
-            print(e)
-
-class BuildManagerTreeView (gtk.TreeView):
-    """ The tree view for the build manager. This shows the historic builds
-    and so forth. """
-
-    # We use this function to control what goes in the cell since we store
-    # the date in the model as seconds since the epoch (for sorting) and so we
-    # need to make it human readable.
-    def date_format_custom_cell_data_func (self, col, cell, model, iter):
-        date = model.get (iter, BuildManagerModel.COL_DATE)[0]
-        datestr = time.strftime("%A %d %B %Y", time.localtime(date))
-        cell.set_property ("text", datestr)
-
-    # This format function controls what goes in the cell. We use this to map
-    # the integer state to a string and also to colourise the text
-    def state_format_custom_cell_data_fun (self, col, cell, model, iter):
-        state = model.get (iter, BuildManagerModel.COL_STATE)[0]
-
-        if (state == BuildResult.STATE_ONGOING):
-            cell.set_property ("text", "Active")
-            cell.set_property ("foreground", "#000000")
-        elif (state == BuildResult.STATE_FAILED):
-            cell.set_property ("text", "Failed")
-            cell.set_property ("foreground", "#ff0000")
-        elif (state == BuildResult.STATE_COMPLETE):
-            cell.set_property ("text", "Complete")
-            cell.set_property ("foreground", "#00ff00")
-        else:
-            cell.set_property ("text", "")
-
-    def __init__ (self):
-        gtk.TreeView.__init__(self)
-
-        # Misc descriptiony thing
-        renderer = gtk.CellRendererText ()
-        col = gtk.TreeViewColumn (None, renderer,
-            text=BuildManagerModel.COL_DESC)
-        self.append_column (col)
-
-        # Machine
-        renderer = gtk.CellRendererText ()
-        col = gtk.TreeViewColumn ("Machine", renderer,
-            text=BuildManagerModel.COL_MACHINE)
-        self.append_column (col)
-
-        # distro
-        renderer = gtk.CellRendererText ()
-        col = gtk.TreeViewColumn ("Distribution", renderer,
-            text=BuildManagerModel.COL_DISTRO)
-        self.append_column (col)
-
-        # date (using a custom function for formatting the cell contents it
-        # takes epoch -> human readable string)
-        renderer = gtk.CellRendererText ()
-        col = gtk.TreeViewColumn ("Date", renderer,
-            text=BuildManagerModel.COL_DATE)
-        self.append_column (col)
-        col.set_cell_data_func (renderer,
-            self.date_format_custom_cell_data_func)
-
-        # For status.
-        renderer = gtk.CellRendererText ()
-        col = gtk.TreeViewColumn ("Status", renderer,
-            text = BuildManagerModel.COL_STATE)
-        self.append_column (col)
-        col.set_cell_data_func (renderer,
-            self.state_format_custom_cell_data_fun)
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/advancedsettingsdialog.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/advancedsettingsdialog.py
deleted file mode 100644
index e0b3553..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/advancedsettingsdialog.py
+++ /dev/null
@@ -1,341 +0,0 @@
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2011-2012   Intel Corporation
-#
-# Authored by Joshua Lock <josh@linux.intel.com>
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import gtk
-import hashlib
-from bb.ui.crumbs.hobwidget import HobInfoButton, HobButton
-from bb.ui.crumbs.progressbar import HobProgressBar
-from bb.ui.crumbs.hig.settingsuihelper import SettingsUIHelper
-from bb.ui.crumbs.hig.crumbsdialog import CrumbsDialog
-from bb.ui.crumbs.hig.crumbsmessagedialog import CrumbsMessageDialog
-from bb.ui.crumbs.hig.proxydetailsdialog import ProxyDetailsDialog
-
-"""
-The following are convenience classes for implementing GNOME HIG compliant
-BitBake GUI's
-In summary: spacing = 12px, border-width = 6px
-"""
-
-class AdvancedSettingsDialog (CrumbsDialog, SettingsUIHelper):
-    
-    def details_cb(self, button, parent, protocol):
-        dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
-            user = self.configuration.proxies[protocol][1],
-            passwd = self.configuration.proxies[protocol][2],
-            parent = parent,
-            flags = gtk.DIALOG_MODAL
-                    | gtk.DIALOG_DESTROY_WITH_PARENT
-                    | gtk.DIALOG_NO_SEPARATOR)
-        dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_OK)
-        response = dialog.run()
-        if response == gtk.RESPONSE_OK:
-            self.configuration.proxies[protocol][1] = dialog.user
-            self.configuration.proxies[protocol][2] = dialog.passwd
-            self.refresh_proxy_components()
-        dialog.destroy()
-
-    def set_save_button(self, button):
-        self.save_button = button
-
-    def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox):
-        combo_item = self.rootfs_combo.get_active_text()
-        modified = False
-        for child in check_hbox.get_children():
-            if isinstance(child, gtk.CheckButton):
-                check_hbox.remove(child)
-                modified = True
-        for format in all_package_format:
-            if format != combo_item:
-                check_button = gtk.CheckButton(format)
-                check_hbox.pack_start(check_button, expand=False, fill=False)
-                modified = True
-        if modified:
-            check_hbox.remove(self.pkgfmt_info)
-            check_hbox.pack_start(self.pkgfmt_info, expand=False, fill=False)
-        check_hbox.show_all()
-
-    def gen_pkgfmt_widget(self, curr_package_format, all_package_format, tooltip_combo="", tooltip_extra=""):
-        pkgfmt_vbox = gtk.VBox(False, 6)
-
-        label = self.gen_label_widget("Root file system package format")
-        pkgfmt_vbox.pack_start(label, expand=False, fill=False)
-
-        rootfs_format = ""
-        if curr_package_format:
-            rootfs_format = curr_package_format.split()[0]
-
-        rootfs_format_widget, rootfs_combo = self.gen_combo_widget(rootfs_format, all_package_format, tooltip_combo)
-        pkgfmt_vbox.pack_start(rootfs_format_widget, expand=False, fill=False)
-
-        label = self.gen_label_widget("Additional package formats")
-        pkgfmt_vbox.pack_start(label, expand=False, fill=False)
-
-        check_hbox = gtk.HBox(False, 12)
-        pkgfmt_vbox.pack_start(check_hbox, expand=False, fill=False)
-        for format in all_package_format:
-            if format != rootfs_format:
-                check_button = gtk.CheckButton(format)
-                is_active = (format in curr_package_format.split())
-                check_button.set_active(is_active)
-                check_hbox.pack_start(check_button, expand=False, fill=False)
-
-        self.pkgfmt_info = HobInfoButton(tooltip_extra, self)
-        check_hbox.pack_start(self.pkgfmt_info, expand=False, fill=False)
-
-        rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox)
-
-        pkgfmt_vbox.show_all()
-
-        return pkgfmt_vbox, rootfs_combo, check_hbox
-
-    def __init__(self, title, configuration, all_image_types,
-            all_package_formats, all_distros, all_sdk_machines,
-            max_threads, parent, flags, buttons=None):
-        super(AdvancedSettingsDialog, self).__init__(title, parent, flags, buttons)
-
-        # class members from other objects
-        # bitbake settings from Builder.Configuration
-        self.configuration = configuration
-        self.image_types = all_image_types
-        self.all_package_formats = all_package_formats
-        self.all_distros = all_distros[:]
-        self.all_sdk_machines = all_sdk_machines
-        self.max_threads = max_threads
-
-        # class members for internal use
-        self.distro_combo = None
-        self.dldir_text = None
-        self.sstatedir_text = None
-        self.sstatemirror_text = None
-        self.bb_spinner = None
-        self.pmake_spinner = None
-        self.rootfs_size_spinner = None
-        self.extra_size_spinner = None
-        self.gplv3_checkbox = None
-        self.sdk_checkbox = None
-        self.image_types_checkbuttons = {}
-
-        self.md5 = self.config_md5()
-        self.settings_changed = False
-
-        # create visual elements on the dialog
-        self.save_button = None
-        self.create_visual_elements()
-        self.connect("response", self.response_cb)
-
-    def _get_sorted_value(self, var):
-        return " ".join(sorted(str(var).split())) + "\n"
-
-    def config_md5(self):
-        data = ""
-        data += ("PACKAGE_CLASSES: "      + self.configuration.curr_package_format + '\n')
-        data += ("DISTRO: "               + self._get_sorted_value(self.configuration.curr_distro))
-        data += ("IMAGE_ROOTFS_SIZE: "    + self._get_sorted_value(self.configuration.image_rootfs_size))
-        data += ("IMAGE_EXTRA_SIZE: "     + self._get_sorted_value(self.configuration.image_extra_size))
-        data += ("INCOMPATIBLE_LICENSE: " + self._get_sorted_value(self.configuration.incompat_license))
-        data += ("SDK_MACHINE: "          + self._get_sorted_value(self.configuration.curr_sdk_machine))
-        data += ("TOOLCHAIN_BUILD: "      + self._get_sorted_value(self.configuration.toolchain_build))
-        data += ("IMAGE_FSTYPES: "        + self._get_sorted_value(self.configuration.image_fstypes))
-        return hashlib.md5(data).hexdigest()
-
-    def create_visual_elements(self):
-        self.nb = gtk.Notebook()
-        self.nb.set_show_tabs(True)
-        self.nb.append_page(self.create_image_types_page(), gtk.Label("Image types"))
-        self.nb.append_page(self.create_output_page(), gtk.Label("Output"))
-        self.nb.set_current_page(0)
-        self.vbox.pack_start(self.nb, expand=True, fill=True)
-        self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True)
-
-        self.show_all()
-
-    def get_num_checked_image_types(self):
-        total = 0
-        for b in self.image_types_checkbuttons.values():
-            if b.get_active():
-              total = total + 1
-        return total
-
-    def set_save_button_state(self):
-        if self.save_button:
-            self.save_button.set_sensitive(self.get_num_checked_image_types() > 0)
-
-    def image_type_checkbutton_clicked_cb(self, button):
-        self.set_save_button_state()
-        if self.get_num_checked_image_types() == 0:
-            # Show an error dialog
-            lbl = "<b>Select an image type</b>"
-            msg = "You need to select at least one image type."
-            dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_WARNING, msg)
-            button = dialog.add_button("OK", gtk.RESPONSE_OK)
-            HobButton.style_button(button)
-            response = dialog.run()
-            dialog.destroy()
-
-    def create_image_types_page(self):
-        main_vbox = gtk.VBox(False, 16)
-        main_vbox.set_border_width(6)
-
-        advanced_vbox = gtk.VBox(False, 6)
-        advanced_vbox.set_border_width(6)
-
-        distro_vbox = gtk.VBox(False, 6)        
-        label = self.gen_label_widget("Distro:")
-        tooltip = "Selects the Yocto Project distribution you want"
-        try:
-            i = self.all_distros.index( "defaultsetup" )
-        except ValueError:
-            i = -1
-        if i != -1:
-            self.all_distros[ i ] = "Default"
-            if self.configuration.curr_distro == "defaultsetup":
-                self.configuration.curr_distro = "Default"
-        distro_widget, self.distro_combo = self.gen_combo_widget(self.configuration.curr_distro, self.all_distros,"<b>Distro</b>" + "*" + tooltip)
-        distro_vbox.pack_start(label, expand=False, fill=False)
-        distro_vbox.pack_start(distro_widget, expand=False, fill=False)
-        main_vbox.pack_start(distro_vbox, expand=False, fill=False)
-
-
-        rows = (len(self.image_types)+1)/3
-        table = gtk.Table(rows + 1, 10, True)
-        advanced_vbox.pack_start(table, expand=False, fill=False)
-
-        tooltip = "Image file system types you want."
-        info = HobInfoButton("<b>Image types</b>" + "*" + tooltip, self)
-        label = self.gen_label_widget("Image types:")
-        align = gtk.Alignment(0, 0.5, 0, 0)
-        table.attach(align, 0, 4, 0, 1)
-        align.add(label)
-        table.attach(info, 4, 5, 0, 1)
-
-        i = 1
-        j = 1
-        for image_type in sorted(self.image_types):
-            self.image_types_checkbuttons[image_type] = gtk.CheckButton(image_type)
-            self.image_types_checkbuttons[image_type].connect("toggled", self.image_type_checkbutton_clicked_cb)
-            article = ""
-            if image_type.startswith(("a", "e", "i", "o", "u")):
-                article = "n"
-            if image_type == "live":
-                self.image_types_checkbuttons[image_type].set_tooltip_text("Build iso and hddimg images")
-            else:
-                self.image_types_checkbuttons[image_type].set_tooltip_text("Build a%s %s image" % (article, image_type))
-            table.attach(self.image_types_checkbuttons[image_type], j - 1, j + 3, i, i + 1)
-            if image_type in self.configuration.image_fstypes.split():
-                self.image_types_checkbuttons[image_type].set_active(True)
-            i += 1
-            if i > rows:
-                i = 1
-                j = j + 4
-
-        main_vbox.pack_start(advanced_vbox, expand=False, fill=False)
-        self.set_save_button_state()
-        
-        return main_vbox
-
-    def create_output_page(self):
-        advanced_vbox = gtk.VBox(False, 6)
-        advanced_vbox.set_border_width(6)
-
-        advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Package format</span>'), expand=False, fill=False)
-        sub_vbox = gtk.VBox(False, 6)
-        advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
-        tooltip_combo = "Selects the package format used to generate rootfs."
-        tooltip_extra = "Selects extra package formats to build"
-        pkgfmt_widget, self.rootfs_combo, self.check_hbox = self.gen_pkgfmt_widget(self.configuration.curr_package_format, self.all_package_formats,"<b>Root file system package format</b>" + "*" + tooltip_combo,"<b>Additional package formats</b>" + "*" + tooltip_extra)
-        sub_vbox.pack_start(pkgfmt_widget, expand=False, fill=False)
-
-        advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Image size</span>'), expand=False, fill=False)
-        sub_vbox = gtk.VBox(False, 6)
-        advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
-        label = self.gen_label_widget("Image basic size (in MB)")
-        tooltip = "Defines the size for the generated image. The OpenEmbedded build system determines the final size for the generated image using an algorithm that takes into account the initial disk space used for the generated image, the Image basic size value, and the Additional free space value.\n\nFor more information, check the <a href=\"http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#var-IMAGE_ROOTFS_SIZE\">Yocto Project Reference Manual</a>."
-        rootfs_size_widget, self.rootfs_size_spinner = self.gen_spinner_widget(int(self.configuration.image_rootfs_size*1.0/1024), 0, 65536,"<b>Image basic size</b>" + "*" + tooltip)
-        sub_vbox.pack_start(label, expand=False, fill=False)
-        sub_vbox.pack_start(rootfs_size_widget, expand=False, fill=False)
-
-        sub_vbox = gtk.VBox(False, 6)
-        advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
-        label = self.gen_label_widget("Additional free space (in MB)")
-        tooltip = "Sets extra free disk space to be added to the generated image. Use this variable when you want to ensure that a specific amount of free disk space is available on a device after an image is installed and running."
-        extra_size_widget, self.extra_size_spinner = self.gen_spinner_widget(int(self.configuration.image_extra_size*1.0/1024), 0, 65536,"<b>Additional free space</b>" + "*" + tooltip)
-        sub_vbox.pack_start(label, expand=False, fill=False)
-        sub_vbox.pack_start(extra_size_widget, expand=False, fill=False)
-
-        advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Licensing</span>'), expand=False, fill=False)
-        self.gplv3_checkbox = gtk.CheckButton("Exclude GPLv3 packages")
-        self.gplv3_checkbox.set_tooltip_text("Check this box to prevent GPLv3 packages from being included in your image")
-        if "GPLv3" in self.configuration.incompat_license.split():
-            self.gplv3_checkbox.set_active(True)
-        else:
-            self.gplv3_checkbox.set_active(False)
-        advanced_vbox.pack_start(self.gplv3_checkbox, expand=False, fill=False)
-
-        advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">SDK</span>'), expand=False, fill=False)
-        sub_hbox = gtk.HBox(False, 6)
-        advanced_vbox.pack_start(sub_hbox, expand=False, fill=False)
-        self.sdk_checkbox = gtk.CheckButton("Populate SDK")
-        tooltip = "Check this box to generate an SDK tarball that consists of the cross-toolchain and a sysroot that contains development packages for your image."
-        self.sdk_checkbox.set_tooltip_text(tooltip)
-        self.sdk_checkbox.set_active(self.configuration.toolchain_build)
-        sub_hbox.pack_start(self.sdk_checkbox, expand=False, fill=False)
-
-        tooltip = "Select the host platform for which you want to run the toolchain contained in the SDK tarball."
-        sdk_machine_widget, self.sdk_machine_combo = self.gen_combo_widget(self.configuration.curr_sdk_machine, self.all_sdk_machines,"<b>Populate SDK</b>" + "*" + tooltip)
-        sub_hbox.pack_start(sdk_machine_widget, expand=False, fill=False)
-
-        return advanced_vbox
-
-    def response_cb(self, dialog, response_id):
-        package_format = []
-        package_format.append(self.rootfs_combo.get_active_text())
-        for child in self.check_hbox:
-            if isinstance(child, gtk.CheckButton) and child.get_active():
-                package_format.append(child.get_label())
-        self.configuration.curr_package_format = " ".join(package_format)
-
-        distro = self.distro_combo.get_active_text()
-        if distro == "Default":
-            distro = "defaultsetup"
-        self.configuration.curr_distro = distro
-        self.configuration.image_rootfs_size = self.rootfs_size_spinner.get_value_as_int() * 1024
-        self.configuration.image_extra_size = self.extra_size_spinner.get_value_as_int() * 1024
-
-        self.configuration.image_fstypes = ""
-        for image_type in self.image_types:
-            if self.image_types_checkbuttons[image_type].get_active():
-                self.configuration.image_fstypes += (" " + image_type)
-        self.configuration.image_fstypes.strip()
-
-        if self.gplv3_checkbox.get_active():
-            if "GPLv3" not in self.configuration.incompat_license.split():
-                self.configuration.incompat_license += " GPLv3"
-        else:
-            if "GPLv3" in self.configuration.incompat_license.split():
-                self.configuration.incompat_license = self.configuration.incompat_license.split().remove("GPLv3")
-                self.configuration.incompat_license = " ".join(self.configuration.incompat_license or [])
-        self.configuration.incompat_license = self.configuration.incompat_license.strip()
-
-        self.configuration.toolchain_build = self.sdk_checkbox.get_active()
-        self.configuration.curr_sdk_machine = self.sdk_machine_combo.get_active_text()
-        md5 = self.config_md5()
-        self.settings_changed = (self.md5 != md5)
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/parsingwarningsdialog.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/parsingwarningsdialog.py
deleted file mode 100644
index 33bac39..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/parsingwarningsdialog.py
+++ /dev/null
@@ -1,163 +0,0 @@
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2011-2012   Intel Corporation
-#
-# Authored by Cristiana Voicu <cristiana.voicu@intel.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.
-
-import gtk
-import gobject
-from bb.ui.crumbs.hobwidget import HobAltButton
-from bb.ui.crumbs.hig.crumbsdialog import CrumbsDialog
-
-"""
-The following are convenience classes for implementing GNOME HIG compliant
-BitBake GUI's
-In summary: spacing = 12px, border-width = 6px
-"""
-
-#
-# ParsingWarningsDialog
-#
-class ParsingWarningsDialog (CrumbsDialog):
-
-    def __init__(self, title, warnings, parent, flags, buttons=None):
-        super(ParsingWarningsDialog, self).__init__(title, parent, flags, buttons)
-
-        self.warnings = warnings
-        self.warning_on = 0
-        self.warn_nb = len(warnings)
-
-        # create visual elements on the dialog
-        self.create_visual_elements()
-
-    def cancel_button_cb(self, button):
-        self.destroy()
-
-    def previous_button_cb(self, button):
-        self.warning_on = self.warning_on - 1
-        self.refresh_components()
-
-    def next_button_cb(self, button):
-        self.warning_on = self.warning_on + 1
-        self.refresh_components()
-
-    def refresh_components(self):
-        lbl = self.warnings[self.warning_on]
-        #when the warning text has more than 400 chars, it uses a scroll bar
-        if 0<= len(lbl) < 400:
-            self.warning_label.set_size_request(320, 230)
-            self.warning_label.set_use_markup(True)
-            self.warning_label.set_line_wrap(True)
-            self.warning_label.set_markup(lbl)
-            self.warning_label.set_property("yalign", 0.00)
-        else:
-            self.textWindow.set_shadow_type(gtk.SHADOW_IN)
-            self.textWindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-            self.msgView = gtk.TextView()
-            self.msgView.set_editable(False)
-            self.msgView.set_wrap_mode(gtk.WRAP_WORD)
-            self.msgView.set_cursor_visible(False)
-            self.msgView.set_size_request(320, 230)
-            self.buf = gtk.TextBuffer()
-            self.buf.set_text(lbl)
-            self.msgView.set_buffer(self.buf)
-            self.textWindow.add(self.msgView)
-            self.msgView.show()
-
-        if self.warning_on==0:
-            self.previous_button.set_sensitive(False)
-        else:
-            self.previous_button.set_sensitive(True)
-
-        if self.warning_on==self.warn_nb-1:
-            self.next_button.set_sensitive(False)
-        else:
-            self.next_button.set_sensitive(True)
-
-        if self.warn_nb>1:
-            self.heading = "Warning " + str(self.warning_on + 1) + " of " + str(self.warn_nb)
-            self.heading_label.set_markup('<span weight="bold">%s</span>' % self.heading)
-        else:
-            self.heading = "Warning"
-            self.heading_label.set_markup('<span weight="bold">%s</span>' % self.heading)
-
-        self.show_all()
-
-        if 0<= len(lbl) < 400:
-            self.textWindow.hide()
-        else:
-            self.warning_label.hide()
-
-    def create_visual_elements(self):
-        self.set_size_request(350, 350)
-        self.heading_label = gtk.Label()
-        self.heading_label.set_alignment(0, 0)
-        self.warning_label = gtk.Label()
-        self.warning_label.set_selectable(True)
-        self.warning_label.set_alignment(0, 0)
-        self.textWindow = gtk.ScrolledWindow()
-
-        table = gtk.Table(1, 10, False)
-
-        cancel_button = gtk.Button()
-        cancel_button.set_label("Close")
-        cancel_button.connect("clicked", self.cancel_button_cb)
-        cancel_button.set_size_request(110, 30)
-
-        self.previous_button = gtk.Button()
-        image1 = gtk.image_new_from_stock(gtk.STOCK_GO_BACK, gtk.ICON_SIZE_BUTTON)
-        image1.show()
-        box = gtk.HBox(False, 6)
-        box.show()
-        self.previous_button.add(box)
-        lbl = gtk.Label("Previous")
-        lbl.show()
-        box.pack_start(image1, expand=False, fill=False, padding=3)
-        box.pack_start(lbl, expand=True, fill=True, padding=3)
-        self.previous_button.connect("clicked", self.previous_button_cb)
-        self.previous_button.set_size_request(110, 30)
-
-        self.next_button = gtk.Button()
-        image2 = gtk.image_new_from_stock(gtk.STOCK_GO_FORWARD, gtk.ICON_SIZE_BUTTON)
-        image2.show()
-        box = gtk.HBox(False, 6)
-        box.show()
-        self.next_button.add(box)
-        lbl = gtk.Label("Next")
-        lbl.show()
-        box.pack_start(lbl, expand=True, fill=True, padding=3)
-        box.pack_start(image2, expand=False, fill=False, padding=3)
-        self.next_button.connect("clicked", self.next_button_cb)
-        self.next_button.set_size_request(110, 30)
-
-        #when there more than one warning, we need "previous" and "next" button
-        if self.warn_nb>1:
-            self.vbox.pack_start(self.heading_label, expand=False, fill=False)
-            self.vbox.pack_start(self.warning_label, expand=False, fill=False)
-            self.vbox.pack_start(self.textWindow, expand=False, fill=False)
-            table.attach(cancel_button, 6, 7, 0, 1, xoptions=gtk.SHRINK)
-            table.attach(self.previous_button, 7, 8, 0, 1, xoptions=gtk.SHRINK)
-            table.attach(self.next_button, 8, 9, 0, 1, xoptions=gtk.SHRINK)
-            self.vbox.pack_end(table, expand=False, fill=False)
-        else:
-            self.vbox.pack_start(self.heading_label, expand=False, fill=False)
-            self.vbox.pack_start(self.warning_label, expand=False, fill=False)
-            self.vbox.pack_start(self.textWindow, expand=False, fill=False)
-            cancel_button = self.add_button("Close", gtk.RESPONSE_CANCEL)
-            HobAltButton.style_button(cancel_button)
-
-        self.refresh_components()
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/proxydetailsdialog.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/proxydetailsdialog.py
deleted file mode 100644
index 69e7dff..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/proxydetailsdialog.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2011-2012   Intel Corporation
-#
-# Authored by Joshua Lock <josh@linux.intel.com>
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import gtk
-from bb.ui.crumbs.hig.crumbsdialog import CrumbsDialog
-
-"""
-The following are convenience classes for implementing GNOME HIG compliant
-BitBake GUI's
-In summary: spacing = 12px, border-width = 6px
-"""
-
-class ProxyDetailsDialog (CrumbsDialog):
-
-    def __init__(self, title, user, passwd, parent, flags, buttons=None):
-        super(ProxyDetailsDialog, self).__init__(title, parent, flags, buttons)
-        self.connect("response", self.response_cb)
-
-        self.auth = not (user == None or passwd == None or user == "")
-        self.user = user or ""
-        self.passwd = passwd or ""
-
-        # create visual elements on the dialog
-        self.create_visual_elements()
-
-    def create_visual_elements(self):
-        self.auth_checkbox = gtk.CheckButton("Use authentication")
-        self.auth_checkbox.set_tooltip_text("Check this box to set the username and the password")
-        self.auth_checkbox.set_active(self.auth)
-        self.auth_checkbox.connect("toggled", self.auth_checkbox_toggled_cb)
-        self.vbox.pack_start(self.auth_checkbox, expand=False, fill=False)
-
-        hbox = gtk.HBox(False, 6)
-        self.user_label = gtk.Label("Username:")
-        self.user_text = gtk.Entry()
-        self.user_text.set_text(self.user)
-        hbox.pack_start(self.user_label, expand=False, fill=False)
-        hbox.pack_end(self.user_text, expand=False, fill=False)
-        self.vbox.pack_start(hbox, expand=False, fill=False)
-
-        hbox = gtk.HBox(False, 6)
-        self.passwd_label = gtk.Label("Password:")
-        self.passwd_text = gtk.Entry()
-        self.passwd_text.set_text(self.passwd)
-        hbox.pack_start(self.passwd_label, expand=False, fill=False)
-        hbox.pack_end(self.passwd_text, expand=False, fill=False)
-        self.vbox.pack_start(hbox, expand=False, fill=False)
-
-        self.refresh_auth_components()
-        self.show_all()
-
-    def refresh_auth_components(self):
-        self.user_label.set_sensitive(self.auth)
-        self.user_text.set_editable(self.auth)
-        self.user_text.set_sensitive(self.auth)
-        self.passwd_label.set_sensitive(self.auth)
-        self.passwd_text.set_editable(self.auth)
-        self.passwd_text.set_sensitive(self.auth)
-
-    def auth_checkbox_toggled_cb(self, button):
-        self.auth = self.auth_checkbox.get_active()
-        self.refresh_auth_components()
-
-    def response_cb(self, dialog, response_id):
-        if response_id == gtk.RESPONSE_OK:
-            if self.auth:
-                self.user = self.user_text.get_text()
-                self.passwd = self.passwd_text.get_text()
-            else:
-                self.user = None
-                self.passwd = None
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/retrieveimagedialog.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/retrieveimagedialog.py
deleted file mode 100644
index 9017139..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/retrieveimagedialog.py
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2013   Intel Corporation
-#
-# Authored by Cristiana Voicu <cristiana.voicu@intel.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.
-
-import gtk
-
-class RetrieveImageDialog (gtk.FileChooserDialog):
-    """
-    This class is used to create a dialog that permits to retrieve
-    a custom image saved previously from Hob.
-    """
-    def __init__(self, directory,title, parent, flags, buttons=None):
-        super(RetrieveImageDialog, self).__init__(title, None, gtk.FILE_CHOOSER_ACTION_OPEN,
-            (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN, gtk.RESPONSE_OK))
-        self.directory = directory
-
-        # create visual elements on the dialog
-        self.create_visual_elements()
-
-    def create_visual_elements(self):
-        self.set_show_hidden(True)
-        self.set_default_response(gtk.RESPONSE_OK)
-        self.set_current_folder(self.directory)
-
-        vbox = self.get_children()[0].get_children()[0].get_children()[0]
-        for child in vbox.get_children()[0].get_children()[0].get_children()[0].get_children():
-            vbox.get_children()[0].get_children()[0].get_children()[0].remove(child)
-
-        label1 = gtk.Label()
-        label1.set_text("File system" + self.directory)
-        label1.show()
-        vbox.get_children()[0].get_children()[0].get_children()[0].pack_start(label1, expand=False, fill=False, padding=0)
-        vbox.get_children()[0].get_children()[1].get_children()[0].hide()
-
-        self.get_children()[0].get_children()[1].get_children()[0].set_label("Select")
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py
deleted file mode 100644
index 4195f70..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/saveimagedialog.py
+++ /dev/null
@@ -1,159 +0,0 @@
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2013   Intel Corporation
-#
-# Authored by Cristiana Voicu <cristiana.voicu@intel.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.
-
-import gtk
-import glib
-from bb.ui.crumbs.hig.crumbsdialog import CrumbsDialog
-from bb.ui.crumbs.hig.crumbsmessagedialog import CrumbsMessageDialog
-from bb.ui.crumbs.hobwidget import HobButton
-
-class SaveImageDialog (CrumbsDialog):
-    """
-    This class is used to create a dialog that permits to save
-    a custom image in a predefined directory.
-    """
-    def __init__(self, directory, name, description, title, parent, flags, buttons=None):
-        super(SaveImageDialog, self).__init__(title, parent, flags, buttons)
-        self.directory = directory
-        self.builder = parent
-        self.name_field = name
-        self.description_field = description
-
-        # create visual elements on the dialog
-        self.create_visual_elements()
-
-    def create_visual_elements(self):
-        self.set_default_response(gtk.RESPONSE_OK)
-        self.vbox.set_border_width(6)
-
-        sub_vbox = gtk.VBox(False, 12)
-        self.vbox.pack_start(sub_vbox, expand=False, fill=False)
-        label = gtk.Label()
-        label.set_alignment(0, 0)
-        label.set_markup("<b>Name</b>")
-        sub_label = gtk.Label()
-        sub_label.set_alignment(0, 0)
-        content = "Image recipe names should be all lowercase and include only alphanumeric\n"
-        content += "characters. The only special character you can use is the ASCII hyphen (-)."
-        sub_label.set_markup(content)
-        self.name_entry = gtk.Entry()
-        self.name_entry.set_text(self.name_field)
-        self.name_entry.set_size_request(350,30)
-        self.name_entry.connect("changed", self.name_entry_changed)
-        sub_vbox.pack_start(label, expand=False, fill=False)
-        sub_vbox.pack_start(sub_label, expand=False, fill=False)
-        sub_vbox.pack_start(self.name_entry, expand=False, fill=False)
-
-        sub_vbox = gtk.VBox(False, 12)
-        self.vbox.pack_start(sub_vbox, expand=False, fill=False)
-        label = gtk.Label()
-        label.set_alignment(0, 0)
-        label.set_markup("<b>Description</b> (optional)")
-        sub_label = gtk.Label()
-        sub_label.set_alignment(0, 0)
-        sub_label.set_markup("The description should be less than 150 characters long.")
-        self.description_entry = gtk.TextView()
-        description_buffer = self.description_entry.get_buffer()
-        description_buffer.set_text(self.description_field)
-        description_buffer.connect("insert-text", self.limit_description_length)
-        self.description_entry.set_wrap_mode(gtk.WRAP_WORD)
-        self.description_entry.set_size_request(350,50)
-        sub_vbox.pack_start(label, expand=False, fill=False)
-        sub_vbox.pack_start(sub_label, expand=False, fill=False)
-        sub_vbox.pack_start(self.description_entry, expand=False, fill=False)
-
-        sub_vbox = gtk.VBox(False, 12)
-        self.vbox.pack_start(sub_vbox, expand=False, fill=False)
-        label = gtk.Label()
-        label.set_alignment(0, 0)
-        label.set_markup("Your image recipe will be saved to:")
-        sub_label = gtk.Label()
-        sub_label.set_alignment(0, 0)
-        sub_label.set_markup(self.directory)
-        sub_vbox.pack_start(label, expand=False, fill=False)
-        sub_vbox.pack_start(sub_label, expand=False, fill=False)
-
-        table = gtk.Table(1, 4, True)
-
-        cancel_button = gtk.Button()
-        cancel_button.set_label("Cancel")
-        cancel_button.connect("clicked", self.cancel_button_cb)
-        cancel_button.set_size_request(110, 30)
-
-        self.save_button = gtk.Button()
-        self.save_button.set_label("Save")
-        self.save_button.connect("clicked", self.save_button_cb)
-        self.save_button.set_size_request(110, 30)
-        if self.name_entry.get_text() == '':
-            self.save_button.set_sensitive(False)
-
-        table.attach(cancel_button, 2, 3, 0, 1)
-        table.attach(self.save_button, 3, 4, 0, 1)
-        self.vbox.pack_end(table, expand=False, fill=False)
-
-        self.show_all()
-
-    def limit_description_length(self, textbuffer, iter, text, length):
-        buffer_bounds = textbuffer.get_bounds()
-        entire_text = textbuffer.get_text(*buffer_bounds)
-        entire_text += text
-        if len(entire_text)>150 or text=="\n":
-            textbuffer.emit_stop_by_name("insert-text")
-
-    def name_entry_changed(self, entry):
-        text = entry.get_text()
-        if text == '':
-            self.save_button.set_sensitive(False)
-        else:
-            self.save_button.set_sensitive(True)
-
-    def cancel_button_cb(self, button):
-        self.destroy()
-
-    def save_button_cb(self, button):
-        text = self.name_entry.get_text()
-        new_text = text.replace("-","")
-        description_buffer = self.description_entry.get_buffer()
-        description = description_buffer.get_text(description_buffer.get_start_iter(),description_buffer.get_end_iter())
-        if new_text.islower() and new_text.isalnum():
-            self.builder.image_details_page.image_saved = True
-            self.builder.customized = False
-            self.builder.generate_new_image(self.directory+text, description)
-            self.builder.recipe_model.set_in_list(text, description)
-            self.builder.recipe_model.set_selected_image(text)
-            self.builder.image_details_page.show_page(self.builder.IMAGE_GENERATED)
-            self.builder.image_details_page.name_field_template = text
-            self.builder.image_details_page.description_field_template = description
-            self.destroy()
-        else:
-            self.show_invalid_input_error_dialog()
-
-    def show_invalid_input_error_dialog(self):
-        lbl = "<b>Invalid characters in image recipe name</b>"
-        msg = "Image recipe names should be all lowercase and\n"
-        msg += "include only alphanumeric characters. The only\n"
-        msg += "special character you can use is the ASCII hyphen (-)."
-        dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_ERROR, msg)
-        button = dialog.add_button("Close", gtk.RESPONSE_OK)
-        HobButton.style_button(button)
-
-        res = dialog.run()
-        self.name_entry.grab_focus()
-        dialog.destroy()
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py
deleted file mode 100644
index b5eb3d8..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/hig/simplesettingsdialog.py
+++ /dev/null
@@ -1,891 +0,0 @@
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2011-2012   Intel Corporation
-#
-# Authored by Joshua Lock <josh@linux.intel.com>
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import gtk
-import gobject
-import hashlib
-from bb.ui.crumbs.hobwidget import hic, HobInfoButton, HobButton, HobAltButton 
-from bb.ui.crumbs.progressbar import HobProgressBar
-from bb.ui.crumbs.hig.settingsuihelper import SettingsUIHelper
-from bb.ui.crumbs.hig.crumbsdialog import CrumbsDialog
-from bb.ui.crumbs.hig.crumbsmessagedialog import CrumbsMessageDialog
-from bb.ui.crumbs.hig.proxydetailsdialog import ProxyDetailsDialog
-
-"""
-The following are convenience classes for implementing GNOME HIG compliant
-BitBake GUI's
-In summary: spacing = 12px, border-width = 6px
-"""
-
-class SimpleSettingsDialog (CrumbsDialog, SettingsUIHelper):
-
-    (BUILD_ENV_PAGE_ID,
-     SHARED_STATE_PAGE_ID,
-     PROXIES_PAGE_ID,
-     OTHERS_PAGE_ID) = range(4)
-
-    (TEST_NETWORK_NONE,
-     TEST_NETWORK_INITIAL,
-     TEST_NETWORK_RUNNING,
-     TEST_NETWORK_PASSED,
-     TEST_NETWORK_FAILED,
-     TEST_NETWORK_CANCELED) = range(6)
-
-    TARGETS = [
-        ("MY_TREE_MODEL_ROW", gtk.TARGET_SAME_WIDGET, 0),
-        ("text/plain", 0, 1),
-        ("TEXT", 0, 2),
-        ("STRING", 0, 3),
-        ]
-
-    def __init__(self, title, configuration, all_image_types,
-            all_package_formats, all_distros, all_sdk_machines,
-            max_threads, parent, flags, handler, buttons=None):
-        super(SimpleSettingsDialog, self).__init__(title, parent, flags, buttons)
-
-        # class members from other objects
-        # bitbake settings from Builder.Configuration
-        self.configuration = configuration
-        self.image_types = all_image_types
-        self.all_package_formats = all_package_formats
-        self.all_distros = all_distros
-        self.all_sdk_machines = all_sdk_machines
-        self.max_threads = max_threads
-
-        # class members for internal use
-        self.dldir_text = None
-        self.sstatedir_text = None
-        self.sstatemirrors_list = []
-        self.sstatemirrors_changed = 0
-        self.bb_spinner = None
-        self.pmake_spinner = None
-        self.rootfs_size_spinner = None
-        self.extra_size_spinner = None
-        self.gplv3_checkbox = None
-        self.toolchain_checkbox = None
-        self.setting_store = None
-        self.image_types_checkbuttons = {}
-
-        self.md5 = self.config_md5()
-        self.proxy_md5 = self.config_proxy_md5()
-        self.settings_changed = False
-        self.proxy_settings_changed = False
-        self.handler = handler
-        self.proxy_test_ran = False
-        self.selected_mirror_row = 0
-        self.new_mirror = False
-
-        # create visual elements on the dialog
-        self.create_visual_elements()
-        self.connect("response", self.response_cb)
-
-    def _get_sorted_value(self, var):
-        return " ".join(sorted(str(var).split())) + "\n"
-
-    def config_proxy_md5(self):
-        data = ("ENABLE_PROXY: "         + self._get_sorted_value(self.configuration.enable_proxy))
-        if self.configuration.enable_proxy:
-            for protocol in self.configuration.proxies.keys():
-                data += (protocol + ": " + self._get_sorted_value(self.configuration.combine_proxy(protocol)))
-        return hashlib.md5(data).hexdigest()
-
-    def config_md5(self):
-        data = ""
-        for key in self.configuration.extra_setting.keys():
-            data += (key + ": " + self._get_sorted_value(self.configuration.extra_setting[key]))
-        return hashlib.md5(data).hexdigest()
-
-    def gen_proxy_entry_widget(self, protocol, parent, need_button=True, line=0):
-        label = gtk.Label(protocol.upper() + " proxy")
-        self.proxy_table.attach(label, 0, 1, line, line+1, xpadding=24)
-
-        proxy_entry = gtk.Entry()
-        proxy_entry.set_size_request(300, -1)
-        self.proxy_table.attach(proxy_entry, 1, 2, line, line+1, ypadding=4)
-
-        self.proxy_table.attach(gtk.Label(":"), 2, 3, line, line+1, xpadding=12, ypadding=4)
-
-        port_entry = gtk.Entry()
-        port_entry.set_size_request(60, -1)
-        self.proxy_table.attach(port_entry, 3, 4, line, line+1, ypadding=4)
-
-        details_button = HobAltButton("Details")
-        details_button.connect("clicked", self.details_cb, parent, protocol)
-        self.proxy_table.attach(details_button, 4, 5, line, line+1, xpadding=4, yoptions=gtk.EXPAND)
-
-        return proxy_entry, port_entry, details_button
-
-    def refresh_proxy_components(self):
-        self.same_checkbox.set_sensitive(self.configuration.enable_proxy)
-
-        self.http_proxy.set_text(self.configuration.combine_host_only("http"))
-        self.http_proxy.set_editable(self.configuration.enable_proxy)
-        self.http_proxy.set_sensitive(self.configuration.enable_proxy)
-        self.http_proxy_port.set_text(self.configuration.combine_port_only("http"))
-        self.http_proxy_port.set_editable(self.configuration.enable_proxy)
-        self.http_proxy_port.set_sensitive(self.configuration.enable_proxy)
-        self.http_proxy_details.set_sensitive(self.configuration.enable_proxy)
-
-        self.https_proxy.set_text(self.configuration.combine_host_only("https"))
-        self.https_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.https_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.https_proxy_port.set_text(self.configuration.combine_port_only("https"))
-        self.https_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.https_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.https_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-
-        self.ftp_proxy.set_text(self.configuration.combine_host_only("ftp"))
-        self.ftp_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.ftp_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.ftp_proxy_port.set_text(self.configuration.combine_port_only("ftp"))
-        self.ftp_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.ftp_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.ftp_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-
-        self.socks_proxy.set_text(self.configuration.combine_host_only("socks"))
-        self.socks_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.socks_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.socks_proxy_port.set_text(self.configuration.combine_port_only("socks"))
-        self.socks_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.socks_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.socks_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-
-        self.cvs_proxy.set_text(self.configuration.combine_host_only("cvs"))
-        self.cvs_proxy.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.cvs_proxy.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.cvs_proxy_port.set_text(self.configuration.combine_port_only("cvs"))
-        self.cvs_proxy_port.set_editable(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.cvs_proxy_port.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-        self.cvs_proxy_details.set_sensitive(self.configuration.enable_proxy and (not self.configuration.same_proxy))
-
-        if self.configuration.same_proxy:
-            if self.http_proxy.get_text():
-                [w.set_text(self.http_proxy.get_text()) for w in self.same_proxy_addresses]
-            if self.http_proxy_port.get_text():
-                [w.set_text(self.http_proxy_port.get_text()) for w in self.same_proxy_ports]
-
-    def proxy_checkbox_toggled_cb(self, button):
-        self.configuration.enable_proxy = self.proxy_checkbox.get_active()
-        if not self.configuration.enable_proxy:
-            self.configuration.same_proxy = False
-            self.same_checkbox.set_active(self.configuration.same_proxy)
-        self.save_proxy_data()
-        self.refresh_proxy_components()
-
-    def same_checkbox_toggled_cb(self, button):
-        self.configuration.same_proxy = self.same_checkbox.get_active()
-        self.save_proxy_data()
-        self.refresh_proxy_components()
-
-    def save_proxy_data(self):
-        self.configuration.split_proxy("http", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
-        if self.configuration.same_proxy:
-            self.configuration.split_proxy("https", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
-            self.configuration.split_proxy("ftp", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
-            self.configuration.split_proxy("socks", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
-            self.configuration.split_proxy("cvs", self.http_proxy.get_text() + ":" + self.http_proxy_port.get_text())
-        else:
-            self.configuration.split_proxy("https", self.https_proxy.get_text() + ":" + self.https_proxy_port.get_text())
-            self.configuration.split_proxy("ftp", self.ftp_proxy.get_text() + ":" + self.ftp_proxy_port.get_text())
-            self.configuration.split_proxy("socks", self.socks_proxy.get_text() + ":" + self.socks_proxy_port.get_text())
-            self.configuration.split_proxy("cvs", self.cvs_proxy.get_text() + ":" + self.cvs_proxy_port.get_text())       
-
-    def response_cb(self, dialog, response_id):
-        if response_id == gtk.RESPONSE_YES:
-            if self.proxy_checkbox.get_active():
-                # Check that all proxy entries have a corresponding port
-                for proxy, port in zip(self.all_proxy_addresses, self.all_proxy_ports):
-                    if proxy.get_text() and not port.get_text():
-                        lbl = "<b>Enter all port numbers</b>"
-                        msg = "Proxy servers require a port number. Please make sure you have entered a port number for each proxy server."
-                        dialog = CrumbsMessageDialog(self, lbl, gtk.MESSAGE_WARNING, msg)
-                        button = dialog.add_button("Close", gtk.RESPONSE_OK)
-                        HobButton.style_button(button)
-                        response = dialog.run()
-                        dialog.destroy()
-                        self.emit_stop_by_name("response")
-                        return
-
-        self.configuration.dldir = self.dldir_text.get_text()
-        self.configuration.sstatedir = self.sstatedir_text.get_text()
-        self.configuration.sstatemirror = ""
-        for mirror in self.sstatemirrors_list:
-            if mirror[1] != "" and mirror[2].startswith("file://"):
-                smirror = mirror[2] + " " + mirror[1] + " \\n "
-                self.configuration.sstatemirror += smirror
-        self.configuration.bbthread = self.bb_spinner.get_value_as_int()
-        self.configuration.pmake = self.pmake_spinner.get_value_as_int()
-        self.save_proxy_data()
-        self.configuration.extra_setting = {}
-        it = self.setting_store.get_iter_first()
-        while it:
-            key = self.setting_store.get_value(it, 0)
-            value = self.setting_store.get_value(it, 1)
-            self.configuration.extra_setting[key] = value
-            it = self.setting_store.iter_next(it)
-
-        md5 = self.config_md5()
-        self.settings_changed = (self.md5 != md5)
-        self.proxy_settings_changed = (self.proxy_md5 != self.config_proxy_md5())
-
-    def create_build_environment_page(self):
-        advanced_vbox = gtk.VBox(False, 6)
-        advanced_vbox.set_border_width(6)
-
-        advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Parallel threads</span>'), expand=False, fill=False)
-        sub_vbox = gtk.VBox(False, 6)
-        advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
-        label = self.gen_label_widget("BitBake parallel threads")
-        tooltip = "Sets the number of threads that BitBake tasks can simultaneously run. See the <a href=\""
-        tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
-        tooltip += "poky-ref-manual.html#var-BB_NUMBER_THREADS\">Poky reference manual</a> for information"
-        bbthread_widget, self.bb_spinner = self.gen_spinner_widget(self.configuration.bbthread, 1, self.max_threads,"<b>BitBake prallalel threads</b>" + "*" + tooltip)
-        sub_vbox.pack_start(label, expand=False, fill=False)
-        sub_vbox.pack_start(bbthread_widget, expand=False, fill=False)
-
-        sub_vbox = gtk.VBox(False, 6)
-        advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
-        label = self.gen_label_widget("Make parallel threads")
-        tooltip = "Sets the maximum number of threads the host can use during the build. See the <a href=\""
-        tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
-        tooltip += "poky-ref-manual.html#var-PARALLEL_MAKE\">Poky reference manual</a> for information"
-        pmake_widget, self.pmake_spinner = self.gen_spinner_widget(self.configuration.pmake, 1, self.max_threads,"<b>Make parallel threads</b>" + "*" + tooltip)
-        sub_vbox.pack_start(label, expand=False, fill=False)
-        sub_vbox.pack_start(pmake_widget, expand=False, fill=False)
-
-        advanced_vbox.pack_start(self.gen_label_widget('<span weight="bold">Downloaded source code</span>'), expand=False, fill=False)
-        sub_vbox = gtk.VBox(False, 6)
-        advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
-        label = self.gen_label_widget("Downloads directory")
-        tooltip = "Select a folder that caches the upstream project source code"
-        dldir_widget, self.dldir_text = self.gen_entry_widget(self.configuration.dldir, self,"<b>Downloaded source code</b>" + "*" + tooltip)
-        sub_vbox.pack_start(label, expand=False, fill=False)
-        sub_vbox.pack_start(dldir_widget, expand=False, fill=False)
-
-        return advanced_vbox
-
-    def create_shared_state_page(self):
-        advanced_vbox = gtk.VBox(False)
-        advanced_vbox.set_border_width(12)
-
-        sub_vbox = gtk.VBox(False)
-        advanced_vbox.pack_start(sub_vbox, expand=False, fill=False, padding=24)
-        content = "<span>Shared state directory</span>"
-        tooltip = "Select a folder that caches your prebuilt results"
-        label = self.gen_label_info_widget(content,"<b>Shared state directory</b>" + "*" + tooltip)
-        sstatedir_widget, self.sstatedir_text = self.gen_entry_widget(self.configuration.sstatedir, self)
-        sub_vbox.pack_start(label, expand=False, fill=False)
-        sub_vbox.pack_start(sstatedir_widget, expand=False, fill=False, padding=6)
-
-        content = "<span weight=\"bold\">Shared state mirrors</span>"
-        tooltip = "URLs pointing to pre-built mirrors that will speed your build. "
-        tooltip += "Select the \'Standard\' configuration if the structure of your "
-        tooltip += "mirror replicates the structure of your local shared state directory. "
-        tooltip += "For more information on shared state mirrors, check the <a href=\""
-        tooltip += "http://www.yoctoproject.org/docs/current/poky-ref-manual/"
-        tooltip += "poky-ref-manual.html#shared-state\">Yocto Project Reference Manual</a>."
-        table = self.gen_label_info_widget(content,"<b>Shared state mirrors</b>" + "*" + tooltip)
-        advanced_vbox.pack_start(table, expand=False, fill=False, padding=6)
-
-        sub_vbox = gtk.VBox(False)
-        advanced_vbox.pack_start(sub_vbox, gtk.TRUE, gtk.TRUE, 0)
-
-        if self.sstatemirrors_changed == 0:
-            self.sstatemirrors_changed = 1
-            sstatemirrors = self.configuration.sstatemirror
-            if sstatemirrors == "":
-                sm_list = ["Standard", "", "file://(.*)"]
-                self.sstatemirrors_list.append(sm_list)
-            else:
-                sstatemirrors = [x for x in sstatemirrors.split('\\n')]
-                for sstatemirror in sstatemirrors:
-                    sstatemirror_fields = [x for x in sstatemirror.split(' ') if x.strip()]
-                    if len(sstatemirror_fields) == 2:
-                        if sstatemirror_fields[0] == "file://(.*)" or sstatemirror_fields[0] == "file://.*":
-                            sm_list = ["Standard", sstatemirror_fields[1], sstatemirror_fields[0]]
-                        else:
-                            sm_list = ["Custom", sstatemirror_fields[1], sstatemirror_fields[0]]
-                        self.sstatemirrors_list.append(sm_list)
-
-        sstatemirrors_widget, sstatemirrors_store = self.gen_shared_sstate_widget(self.sstatemirrors_list, self)
-        sub_vbox.pack_start(sstatemirrors_widget, expand=True, fill=True)
-
-        table = gtk.Table(1, 10, False)
-        table.set_col_spacings(6)
-        add_mirror_button = HobAltButton("Add mirror")
-        add_mirror_button.connect("clicked", self.add_mirror)
-        add_mirror_button.set_size_request(120,30)
-        table.attach(add_mirror_button, 1, 2, 0, 1, xoptions=gtk.SHRINK)
-
-        self.delete_button = HobAltButton("Delete mirror")
-        self.delete_button.connect("clicked", self.delete_cb)
-        self.delete_button.set_size_request(120, 30)
-        table.attach(self.delete_button, 3, 4, 0, 1, xoptions=gtk.SHRINK)
-
-        advanced_vbox.pack_start(table, expand=False, fill=False, padding=6)
-
-        return advanced_vbox
-
-    def gen_shared_sstate_widget(self, sstatemirrors_list, window):
-        hbox = gtk.HBox(False)
-
-        sstatemirrors_store = gtk.ListStore(str, str, str)
-        for sstatemirror in sstatemirrors_list:
-            sstatemirrors_store.append(sstatemirror)
-
-        self.sstatemirrors_tv = gtk.TreeView()
-        self.sstatemirrors_tv.set_rules_hint(True)
-        self.sstatemirrors_tv.set_headers_visible(True)
-        tree_selection = self.sstatemirrors_tv.get_selection()
-        tree_selection.set_mode(gtk.SELECTION_SINGLE)
-
-        # Allow enable drag and drop of rows including row move
-        self.sstatemirrors_tv.enable_model_drag_source( gtk.gdk.BUTTON1_MASK,
-            self.TARGETS,
-            gtk.gdk.ACTION_DEFAULT|
-            gtk.gdk.ACTION_MOVE)
-        self.sstatemirrors_tv.enable_model_drag_dest(self.TARGETS,
-            gtk.gdk.ACTION_DEFAULT)
-        self.sstatemirrors_tv.connect("drag_data_get", self.drag_data_get_cb)
-        self.sstatemirrors_tv.connect("drag_data_received", self.drag_data_received_cb)
-
-
-        self.scroll = gtk.ScrolledWindow()
-        self.scroll.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC)
-        self.scroll.set_shadow_type(gtk.SHADOW_IN)
-        self.scroll.connect('size-allocate', self.scroll_changed)
-        self.scroll.add(self.sstatemirrors_tv)
-
-        #list store for cell renderer
-        m = gtk.ListStore(gobject.TYPE_STRING)
-        m.append(["Standard"])
-        m.append(["Custom"])
-
-        cell0 = gtk.CellRendererCombo()
-        cell0.set_property("model",m)
-        cell0.set_property("text-column", 0)
-        cell0.set_property("editable", True)
-        cell0.set_property("has-entry", False)
-        col0 = gtk.TreeViewColumn("Configuration")
-        col0.pack_start(cell0, False)
-        col0.add_attribute(cell0, "text", 0)
-        col0.set_cell_data_func(cell0, self.configuration_field)
-        self.sstatemirrors_tv.append_column(col0)
-
-        cell0.connect("edited", self.combo_changed, sstatemirrors_store)
-
-        self.cell1 = gtk.CellRendererText()
-        self.cell1.set_padding(5,2)
-        col1 = gtk.TreeViewColumn('Regex', self.cell1)
-        col1.set_cell_data_func(self.cell1, self.regex_field)
-        self.sstatemirrors_tv.append_column(col1)
-
-        self.cell1.connect("edited", self.regex_changed, sstatemirrors_store)
-
-        cell2 = gtk.CellRendererText()
-        cell2.set_padding(5,2)
-        cell2.set_property("editable", True)
-        col2 = gtk.TreeViewColumn('URL', cell2)
-        col2.set_cell_data_func(cell2, self.url_field)
-        self.sstatemirrors_tv.append_column(col2)
-
-        cell2.connect("edited", self.url_changed, sstatemirrors_store)
-
-        self.sstatemirrors_tv.set_model(sstatemirrors_store)
-        self.sstatemirrors_tv.set_cursor(self.selected_mirror_row)
-        hbox.pack_start(self.scroll, expand=True, fill=True)
-        hbox.show_all()
-
-        return hbox, sstatemirrors_store
-
-    def drag_data_get_cb(self, treeview, context, selection, target_id, etime):
-        treeselection = treeview.get_selection()
-        model, iter = treeselection.get_selected()
-        data = model.get_string_from_iter(iter)
-        selection.set(selection.target, 8, data)
-
-    def drag_data_received_cb(self, treeview, context, x, y, selection, info, etime):
-        model = treeview.get_model()
-        data = []
-        tree_iter = model.get_iter_from_string(selection.data)
-        data.append(model.get_value(tree_iter, 0))
-        data.append(model.get_value(tree_iter, 1))
-        data.append(model.get_value(tree_iter, 2))
-
-        drop_info = treeview.get_dest_row_at_pos(x, y)
-        if drop_info:
-            path, position = drop_info
-            iter = model.get_iter(path)
-            if (position == gtk.TREE_VIEW_DROP_BEFORE or position == gtk.TREE_VIEW_DROP_INTO_OR_BEFORE):
-                model.insert_before(iter, data)
-            else:
-                model.insert_after(iter, data)
-        else:
-            model.append(data)
-        if context.action == gtk.gdk.ACTION_MOVE:
-            context.finish(True, True, etime)
-        return
-
-    def delete_cb(self, button):
-        selection = self.sstatemirrors_tv.get_selection()
-        tree_model, tree_iter = selection.get_selected()
-        index = int(tree_model.get_string_from_iter(tree_iter))
-        if index == 0:
-            self.selected_mirror_row = index
-        else:
-            self.selected_mirror_row = index - 1
-        self.sstatemirrors_list.pop(index)
-        self.refresh_shared_state_page()
-        if not self.sstatemirrors_list:
-            self.delete_button.set_sensitive(False)
-
-    def add_mirror(self, button):
-        self.new_mirror = True
-        tooltip = "Select the pre-built mirror that will speed your build"
-        index = len(self.sstatemirrors_list)
-        self.selected_mirror_row = index
-        sm_list = ["Standard", "", "file://(.*)"]
-        self.sstatemirrors_list.append(sm_list)
-        self.refresh_shared_state_page()
-
-    def scroll_changed(self, widget, event, data=None):
-        if self.new_mirror == True:
-            adj = widget.get_vadjustment()
-            adj.set_value(adj.upper - adj.page_size)
-            self.new_mirror = False
-
-    def combo_changed(self, widget, path, text, model):
-        model[path][0] = text
-        selection = self.sstatemirrors_tv.get_selection()
-        tree_model, tree_iter = selection.get_selected()
-        index = int(tree_model.get_string_from_iter(tree_iter))
-        self.sstatemirrors_list[index][0] = text
-
-    def regex_changed(self, cell, path, new_text, user_data):
-        user_data[path][2] = new_text
-        selection = self.sstatemirrors_tv.get_selection()
-        tree_model, tree_iter = selection.get_selected()
-        index = int(tree_model.get_string_from_iter(tree_iter))
-        self.sstatemirrors_list[index][2] = new_text
-        return
-
-    def url_changed(self, cell, path, new_text, user_data):
-        if new_text!="Enter the mirror URL" and new_text!="Match regex and replace it with this URL":
-            user_data[path][1] = new_text
-            selection = self.sstatemirrors_tv.get_selection()
-            tree_model, tree_iter = selection.get_selected()
-            index = int(tree_model.get_string_from_iter(tree_iter))
-            self.sstatemirrors_list[index][1] = new_text
-        return
-
-    def configuration_field(self, column, cell, model, iter):
-        cell.set_property('text', model.get_value(iter, 0))
-        if model.get_value(iter, 0) == "Standard":
-            self.cell1.set_property("sensitive", False)
-            self.cell1.set_property("editable", False)
-        else:
-            self.cell1.set_property("sensitive", True)
-            self.cell1.set_property("editable", True)
-        return
-
-    def regex_field(self, column, cell, model, iter):
-        cell.set_property('text', model.get_value(iter, 2))
-        return
-
-    def url_field(self, column, cell, model, iter):
-        text = model.get_value(iter, 1)
-        if text == "":
-            if model.get_value(iter, 0) == "Standard":
-                text = "Enter the mirror URL"
-            else:
-                text = "Match regex and replace it with this URL"
-        cell.set_property('text', text)
-        return
-
-    def refresh_shared_state_page(self):
-        page_num = self.nb.get_current_page()
-        self.nb.remove_page(page_num);
-        self.nb.insert_page(self.create_shared_state_page(), gtk.Label("Shared state"),page_num)
-        self.show_all()
-        self.nb.set_current_page(page_num)
-
-    def test_proxy_ended(self, passed):
-        self.proxy_test_running = False
-        self.set_test_proxy_state(self.TEST_NETWORK_PASSED if passed else self.TEST_NETWORK_FAILED)
-        self.set_sensitive(True)
-        self.refresh_proxy_components()
-
-    def timer_func(self):
-        self.test_proxy_progress.pulse()
-        return self.proxy_test_running
-
-    def test_network_button_cb(self, b):
-        self.set_test_proxy_state(self.TEST_NETWORK_RUNNING)
-        self.set_sensitive(False)
-        self.save_proxy_data()
-        if self.configuration.enable_proxy == True:
-            self.handler.set_http_proxy(self.configuration.combine_proxy("http"))
-            self.handler.set_https_proxy(self.configuration.combine_proxy("https"))
-            self.handler.set_ftp_proxy(self.configuration.combine_proxy("ftp"))
-            self.handler.set_socks_proxy(self.configuration.combine_proxy("socks"))
-            self.handler.set_cvs_proxy(self.configuration.combine_host_only("cvs"), self.configuration.combine_port_only("cvs"))
-        elif self.configuration.enable_proxy == False:
-            self.handler.set_http_proxy("")
-            self.handler.set_https_proxy("")
-            self.handler.set_ftp_proxy("")
-            self.handler.set_socks_proxy("")
-            self.handler.set_cvs_proxy("", "")
-        self.proxy_test_ran = True
-        self.proxy_test_running = True
-        gobject.timeout_add(100, self.timer_func)
-        self.handler.trigger_network_test()
-
-    def test_proxy_focus_event(self, w, direction):
-        if self.test_proxy_state in [self.TEST_NETWORK_PASSED, self.TEST_NETWORK_FAILED]:
-            self.set_test_proxy_state(self.TEST_NETWORK_INITIAL)
-        return False
-
-    def http_proxy_changed(self, e):
-        if not self.configuration.same_proxy:
-            return
-        if e == self.http_proxy:
-            [w.set_text(self.http_proxy.get_text()) for w in self.same_proxy_addresses]
-        else:
-            [w.set_text(self.http_proxy_port.get_text()) for w in self.same_proxy_ports]
-
-    def proxy_address_focus_out_event(self, w, direction):
-        text = w.get_text()
-        if not text:
-            return False
-        if text.find("//") == -1:
-            w.set_text("http://" + text)
-        return False
-
-    def set_test_proxy_state(self, state):
-        if self.test_proxy_state == state:
-            return
-        [self.proxy_table.remove(w) for w in self.test_gui_elements]
-        if state == self.TEST_NETWORK_INITIAL:
-            self.proxy_table.attach(self.test_network_button, 1, 2, 5, 6)
-            self.test_network_button.show()
-        elif state == self.TEST_NETWORK_RUNNING:
-            self.test_proxy_progress.set_rcstyle("running")
-            self.test_proxy_progress.set_text("Testing network configuration")
-            self.proxy_table.attach(self.test_proxy_progress, 0, 5, 5, 6, xpadding=4)
-            self.test_proxy_progress.show()
-        else: # passed or failed
-            self.dummy_progress.update(1.0)
-            if state == self.TEST_NETWORK_PASSED:
-                self.dummy_progress.set_text("Your network is properly configured")
-                self.dummy_progress.set_rcstyle("running")
-            else:
-                self.dummy_progress.set_text("Network test failed")
-                self.dummy_progress.set_rcstyle("fail")
-            self.proxy_table.attach(self.dummy_progress, 0, 4, 5, 6)
-            self.proxy_table.attach(self.retest_network_button, 4, 5, 5, 6, xpadding=4)
-            self.dummy_progress.show()
-            self.retest_network_button.show()
-        self.test_proxy_state = state
-
-    def create_network_page(self):
-        advanced_vbox = gtk.VBox(False, 6)
-        advanced_vbox.set_border_width(6)
-        self.same_proxy_addresses = []
-        self.same_proxy_ports = []
-        self.all_proxy_ports = []
-        self.all_proxy_addresses = []
-
-        sub_vbox = gtk.VBox(False, 6)
-        advanced_vbox.pack_start(sub_vbox, expand=False, fill=False)
-        label = self.gen_label_widget("<span weight=\"bold\">Set the proxies used when fetching source code</span>")
-        tooltip = "Set the proxies used when fetching source code.  A blank field uses a direct internet connection."
-        info = HobInfoButton("<span weight=\"bold\">Set the proxies used when fetching source code</span>" + "*" + tooltip, self)
-        hbox = gtk.HBox(False, 12)
-        hbox.pack_start(label, expand=True, fill=True)
-        hbox.pack_start(info, expand=False, fill=False)
-        sub_vbox.pack_start(hbox, expand=False, fill=False)
-
-        proxy_test_focus = []
-        self.direct_checkbox = gtk.RadioButton(None, "Direct network connection")
-        proxy_test_focus.append(self.direct_checkbox)
-        self.direct_checkbox.set_tooltip_text("Check this box to use a direct internet connection with no proxy")
-        self.direct_checkbox.set_active(not self.configuration.enable_proxy)
-        sub_vbox.pack_start(self.direct_checkbox, expand=False, fill=False)
-
-        self.proxy_checkbox = gtk.RadioButton(self.direct_checkbox, "Manual proxy configuration")
-        proxy_test_focus.append(self.proxy_checkbox)
-        self.proxy_checkbox.set_tooltip_text("Check this box to manually set up a specific proxy")
-        self.proxy_checkbox.set_active(self.configuration.enable_proxy)
-        sub_vbox.pack_start(self.proxy_checkbox, expand=False, fill=False)
-
-        self.same_checkbox = gtk.CheckButton("Use the HTTP proxy for all protocols")
-        proxy_test_focus.append(self.same_checkbox)
-        self.same_checkbox.set_tooltip_text("Check this box to use the HTTP proxy for all five proxies")
-        self.same_checkbox.set_active(self.configuration.same_proxy)
-        hbox = gtk.HBox(False, 12)
-        hbox.pack_start(self.same_checkbox, expand=False, fill=False, padding=24)
-        sub_vbox.pack_start(hbox, expand=False, fill=False)
-
-        self.proxy_table = gtk.Table(6, 5, False)
-        self.http_proxy, self.http_proxy_port, self.http_proxy_details = self.gen_proxy_entry_widget(
-            "http", self, True, 0)
-        proxy_test_focus +=[self.http_proxy, self.http_proxy_port]
-        self.http_proxy.connect("changed", self.http_proxy_changed)
-        self.http_proxy_port.connect("changed", self.http_proxy_changed)
-
-        self.https_proxy, self.https_proxy_port, self.https_proxy_details = self.gen_proxy_entry_widget(
-            "https", self, True, 1)
-        proxy_test_focus += [self.https_proxy, self.https_proxy_port]
-        self.same_proxy_addresses.append(self.https_proxy)
-        self.same_proxy_ports.append(self.https_proxy_port)
-
-        self.ftp_proxy, self.ftp_proxy_port, self.ftp_proxy_details = self.gen_proxy_entry_widget(
-            "ftp", self, True, 2)
-        proxy_test_focus += [self.ftp_proxy, self.ftp_proxy_port]
-        self.same_proxy_addresses.append(self.ftp_proxy)
-        self.same_proxy_ports.append(self.ftp_proxy_port)
-
-        self.socks_proxy, self.socks_proxy_port, self.socks_proxy_details = self.gen_proxy_entry_widget(
-            "socks", self, True, 3)
-        proxy_test_focus += [self.socks_proxy, self.socks_proxy_port]
-        self.same_proxy_addresses.append(self.socks_proxy)
-        self.same_proxy_ports.append(self.socks_proxy_port)
-
-        self.cvs_proxy, self.cvs_proxy_port, self.cvs_proxy_details = self.gen_proxy_entry_widget(
-            "cvs", self, True, 4)
-        proxy_test_focus += [self.cvs_proxy, self.cvs_proxy_port]
-        self.same_proxy_addresses.append(self.cvs_proxy)
-        self.same_proxy_ports.append(self.cvs_proxy_port)
-        self.all_proxy_ports = self.same_proxy_ports + [self.http_proxy_port]
-        self.all_proxy_addresses = self.same_proxy_addresses + [self.http_proxy]
-        sub_vbox.pack_start(self.proxy_table, expand=False, fill=False)
-        self.proxy_table.show_all()
-
-        # Create the graphical elements for the network test feature, but don't display them yet
-        self.test_network_button = HobAltButton("Test network configuration")
-        self.test_network_button.connect("clicked", self.test_network_button_cb)
-        self.test_proxy_progress = HobProgressBar()
-        self.dummy_progress = HobProgressBar()
-        self.retest_network_button = HobAltButton("Retest")
-        self.retest_network_button.connect("clicked", self.test_network_button_cb)
-        self.test_gui_elements = [self.test_network_button, self.test_proxy_progress, self.dummy_progress, self.retest_network_button]
-        # Initialize the network tester
-        self.test_proxy_state = self.TEST_NETWORK_NONE
-        self.set_test_proxy_state(self.TEST_NETWORK_INITIAL)
-        self.proxy_test_passed_id = self.handler.connect("network-passed", lambda h:self.test_proxy_ended(True))
-        self.proxy_test_failed_id = self.handler.connect("network-failed", lambda h:self.test_proxy_ended(False))
-        [w.connect("focus-in-event", self.test_proxy_focus_event) for w in proxy_test_focus]
-        [w.connect("focus-out-event", self.proxy_address_focus_out_event) for w in self.all_proxy_addresses]
-
-        self.direct_checkbox.connect("toggled", self.proxy_checkbox_toggled_cb)
-        self.proxy_checkbox.connect("toggled", self.proxy_checkbox_toggled_cb)
-        self.same_checkbox.connect("toggled", self.same_checkbox_toggled_cb)
-
-        self.refresh_proxy_components()
-        return advanced_vbox
-
-    def switch_to_page(self, page_id):
-        self.nb.set_current_page(page_id)
-
-    def details_cb(self, button, parent, protocol):
-        self.save_proxy_data()
-        dialog = ProxyDetailsDialog(title = protocol.upper() + " Proxy Details",
-            user = self.configuration.proxies[protocol][1],
-            passwd = self.configuration.proxies[protocol][2],
-            parent = parent,
-            flags = gtk.DIALOG_MODAL
-                    | gtk.DIALOG_DESTROY_WITH_PARENT
-                    | gtk.DIALOG_NO_SEPARATOR)
-        dialog.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_OK)
-        response = dialog.run()
-        if response == gtk.RESPONSE_OK:
-            self.configuration.proxies[protocol][1] = dialog.user
-            self.configuration.proxies[protocol][2] = dialog.passwd
-            self.refresh_proxy_components()
-        dialog.destroy()    
-
-    def rootfs_combo_changed_cb(self, rootfs_combo, all_package_format, check_hbox):
-        combo_item = self.rootfs_combo.get_active_text()
-        for child in check_hbox.get_children():
-            if isinstance(child, gtk.CheckButton):
-                check_hbox.remove(child)
-        for format in all_package_format:
-            if format != combo_item:
-                check_button = gtk.CheckButton(format)
-                check_hbox.pack_start(check_button, expand=False, fill=False)
-        check_hbox.show_all()
-
-    def gen_pkgfmt_widget(self, curr_package_format, all_package_format, tooltip_combo="", tooltip_extra=""):
-        pkgfmt_hbox = gtk.HBox(False, 24)
-
-        rootfs_vbox = gtk.VBox(False, 6)
-        pkgfmt_hbox.pack_start(rootfs_vbox, expand=False, fill=False)
-
-        label = self.gen_label_widget("Root file system package format")
-        rootfs_vbox.pack_start(label, expand=False, fill=False)
-
-        rootfs_format = ""
-        if curr_package_format:
-            rootfs_format = curr_package_format.split()[0]
-
-        rootfs_format_widget, rootfs_combo = self.gen_combo_widget(rootfs_format, all_package_format, tooltip_combo)
-        rootfs_vbox.pack_start(rootfs_format_widget, expand=False, fill=False)
-
-        extra_vbox = gtk.VBox(False, 6)
-        pkgfmt_hbox.pack_start(extra_vbox, expand=False, fill=False)
-
-        label = self.gen_label_widget("Additional package formats")
-        extra_vbox.pack_start(label, expand=False, fill=False)
-
-        check_hbox = gtk.HBox(False, 12)
-        extra_vbox.pack_start(check_hbox, expand=False, fill=False)
-        for format in all_package_format:
-            if format != rootfs_format:
-                check_button = gtk.CheckButton(format)
-                is_active = (format in curr_package_format.split())
-                check_button.set_active(is_active)
-                check_hbox.pack_start(check_button, expand=False, fill=False)
-
-        info = HobInfoButton(tooltip_extra, self)
-        check_hbox.pack_end(info, expand=False, fill=False)
-
-        rootfs_combo.connect("changed", self.rootfs_combo_changed_cb, all_package_format, check_hbox)
-
-        pkgfmt_hbox.show_all()
-
-        return pkgfmt_hbox, rootfs_combo, check_hbox
-
-    def editable_settings_cell_edited(self, cell, path_string, new_text, model):
-        it = model.get_iter_from_string(path_string)
-        column = cell.get_data("column")
-        model.set(it, column, new_text)
-
-    def editable_settings_add_item_clicked(self, button, model):
-        new_item = ["##KEY##", "##VALUE##"]
-
-        iter = model.append()
-        model.set (iter,
-            0, new_item[0],
-            1, new_item[1],
-       )
-
-    def editable_settings_remove_item_clicked(self, button, treeview):
-        selection = treeview.get_selection()
-        model, iter = selection.get_selected()
-
-        if iter:
-            path = model.get_path(iter)[0]
-            model.remove(iter)
- 
-    def gen_editable_settings(self, setting, tooltip=""):
-        setting_hbox = gtk.HBox(False, 12)
-
-        vbox = gtk.VBox(False, 12)
-        setting_hbox.pack_start(vbox, expand=True, fill=True)
-
-        setting_store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
-        for key in setting.keys():
-            setting_store.set(setting_store.append(), 0, key, 1, setting[key])
-
-        setting_tree = gtk.TreeView(setting_store)
-        setting_tree.set_headers_visible(True)
-        setting_tree.set_size_request(300, 100)
-
-        col = gtk.TreeViewColumn('Key')
-        col.set_min_width(100)
-        col.set_max_width(150)
-        col.set_resizable(True)
-        col1 = gtk.TreeViewColumn('Value')
-        col1.set_min_width(100)
-        col1.set_max_width(150)
-        col1.set_resizable(True)
-        setting_tree.append_column(col)
-        setting_tree.append_column(col1)
-        cell = gtk.CellRendererText()
-        cell.set_property('width-chars', 10)
-        cell.set_property('editable', True)
-        cell.set_data("column", 0)
-        cell.connect("edited", self.editable_settings_cell_edited, setting_store)
-        cell1 = gtk.CellRendererText()
-        cell1.set_property('width-chars', 10)
-        cell1.set_property('editable', True)
-        cell1.set_data("column", 1)
-        cell1.connect("edited", self.editable_settings_cell_edited, setting_store)
-        col.pack_start(cell, True)
-        col1.pack_end(cell1, True)
-        col.set_attributes(cell, text=0)
-        col1.set_attributes(cell1, text=1)
-
-        scroll = gtk.ScrolledWindow()
-        scroll.set_shadow_type(gtk.SHADOW_IN)
-        scroll.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
-        scroll.add(setting_tree)
-        vbox.pack_start(scroll, expand=True, fill=True)
-
-        # some buttons
-        hbox = gtk.HBox(True, 6)
-        vbox.pack_start(hbox, False, False)
-
-        button = gtk.Button(stock=gtk.STOCK_ADD)
-        button.connect("clicked", self.editable_settings_add_item_clicked, setting_store)
-        hbox.pack_start(button)
-
-        button = gtk.Button(stock=gtk.STOCK_REMOVE)
-        button.connect("clicked", self.editable_settings_remove_item_clicked, setting_tree)
-        hbox.pack_start(button)
-
-        info = HobInfoButton(tooltip, self)
-        setting_hbox.pack_start(info, expand=False, fill=False)
-
-        return setting_hbox, setting_store
-
-    def create_others_page(self):
-        advanced_vbox = gtk.VBox(False, 6)
-        advanced_vbox.set_border_width(6)
-
-        sub_vbox = gtk.VBox(False, 6)
-        advanced_vbox.pack_start(sub_vbox, expand=True, fill=True)
-        label = self.gen_label_widget("<span weight=\"bold\">Add your own variables:</span>")
-        tooltip = "These are key/value pairs for your extra settings. Click \'Add\' and then directly edit the key and the value"
-        setting_widget, self.setting_store = self.gen_editable_settings(self.configuration.extra_setting,"<b>Add your own variables</b>" + "*" + tooltip)
-        sub_vbox.pack_start(label, expand=False, fill=False)
-        sub_vbox.pack_start(setting_widget, expand=True, fill=True)
-
-        return advanced_vbox
-
-    def create_visual_elements(self):
-        self.nb = gtk.Notebook()
-        self.nb.set_show_tabs(True)        
-        self.nb.append_page(self.create_build_environment_page(), gtk.Label("Build environment"))
-        self.nb.append_page(self.create_shared_state_page(), gtk.Label("Shared state"))
-        self.nb.append_page(self.create_network_page(), gtk.Label("Network"))        
-        self.nb.append_page(self.create_others_page(), gtk.Label("Others"))
-        self.nb.set_current_page(0)
-        self.vbox.pack_start(self.nb, expand=True, fill=True)
-        self.vbox.pack_end(gtk.HSeparator(), expand=True, fill=True)
-
-        self.show_all()
-
-    def destroy(self):
-        self.handler.disconnect(self.proxy_test_passed_id)
-        self.handler.disconnect(self.proxy_test_failed_id)
-        super(SimpleSettingsDialog, self).destroy()
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
deleted file mode 100644
index b71fb33..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/hobeventhandler.py
+++ /dev/null
@@ -1,645 +0,0 @@
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2011        Intel Corporation
-#
-# Authored by Joshua Lock <josh@linux.intel.com>
-# Authored by Dongxiao Xu <dongxiao.xu@intel.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.
-
-import gobject
-import logging
-import ast
-from bb.ui.crumbs.runningbuild import RunningBuild
-
-class HobHandler(gobject.GObject):
-
-    """
-    This object does BitBake event handling for the hob gui.
-    """
-    __gsignals__ = {
-         "package-formats-updated" : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     (gobject.TYPE_PYOBJECT,)),
-         "config-updated"          : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     (gobject.TYPE_STRING, gobject.TYPE_PYOBJECT,)),
-         "command-succeeded"       : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     (gobject.TYPE_INT,)),
-         "command-failed"          : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     (gobject.TYPE_STRING,)),
-         "parsing-warning"         : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     (gobject.TYPE_STRING,)),
-         "sanity-failed"           : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     (gobject.TYPE_STRING, gobject.TYPE_INT)),
-         "generating-data"         : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     ()),
-         "data-generated"          : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     ()),
-         "parsing-started"         : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     (gobject.TYPE_PYOBJECT,)),
-         "parsing"                 : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     (gobject.TYPE_PYOBJECT,)),
-         "parsing-completed"       : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     (gobject.TYPE_PYOBJECT,)),
-         "recipe-populated"        : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     ()),
-         "package-populated"       : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     ()),
-         "network-passed"          : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     ()),
-         "network-failed"          : (gobject.SIGNAL_RUN_LAST,
-                                      gobject.TYPE_NONE,
-                                     ()),
-    }
-
-    (GENERATE_CONFIGURATION, GENERATE_RECIPES, GENERATE_PACKAGES, GENERATE_IMAGE, POPULATE_PACKAGEINFO, SANITY_CHECK, NETWORK_TEST) = range(7)
-    (SUB_PATH_LAYERS, SUB_FILES_DISTRO, SUB_FILES_MACH, SUB_FILES_SDKMACH, SUB_MATCH_CLASS, SUB_PARSE_CONFIG, SUB_SANITY_CHECK,
-     SUB_GNERATE_TGTS, SUB_GENERATE_PKGINFO, SUB_BUILD_RECIPES, SUB_BUILD_IMAGE, SUB_NETWORK_TEST) = range(12)
-
-    def __init__(self, server, recipe_model, package_model):
-        super(HobHandler, self).__init__()
-
-        self.build = RunningBuild(sequential=True)
-
-        self.recipe_model = recipe_model
-        self.package_model = package_model
-
-        self.commands_async = []
-        self.generating = False
-        self.current_phase = None
-        self.building = False
-        self.recipe_queue = []
-        self.package_queue = []
-
-        self.server = server
-        self.error_msg = ""
-        self.initcmd = None
-        self.parsing = False
-
-    def set_busy(self):
-        if not self.generating:
-            self.emit("generating-data")
-            self.generating = True
-
-    def clear_busy(self):
-        if self.generating:
-            self.emit("data-generated")
-            self.generating = False
-
-    def runCommand(self, commandline):
-        try:
-            result, error = self.server.runCommand(commandline)
-            if error:
-                raise Exception("Error running command '%s': %s" % (commandline, error))
-            return result
-        except Exception as e:
-            self.commands_async = []
-            self.clear_busy()
-            self.emit("command-failed", "Hob Exception - %s" % (str(e)))
-            return None
-
-    def run_next_command(self, initcmd=None):
-        if initcmd != None:
-            self.initcmd = initcmd
-
-        if self.commands_async:
-            self.set_busy()
-            next_command = self.commands_async.pop(0)
-        else:
-            self.clear_busy()
-            if self.initcmd != None:
-                self.emit("command-succeeded", self.initcmd)
-            return
-
-        if next_command == self.SUB_PATH_LAYERS:
-            self.runCommand(["findConfigFilePath", "bblayers.conf"])
-        elif next_command == self.SUB_FILES_DISTRO:
-            self.runCommand(["findConfigFiles", "DISTRO"])
-        elif next_command == self.SUB_FILES_MACH:
-            self.runCommand(["findConfigFiles", "MACHINE"])
-        elif next_command == self.SUB_FILES_SDKMACH:
-            self.runCommand(["findConfigFiles", "MACHINE-SDK"])
-        elif next_command == self.SUB_MATCH_CLASS:
-            self.runCommand(["findFilesMatchingInDir", "rootfs_", "classes"])
-        elif next_command == self.SUB_PARSE_CONFIG:
-            self.runCommand(["resetCooker"])
-        elif next_command == self.SUB_GNERATE_TGTS:
-            self.runCommand(["generateTargetsTree", "classes/image.bbclass", []])
-        elif next_command == self.SUB_GENERATE_PKGINFO:
-            self.runCommand(["triggerEvent", "bb.event.RequestPackageInfo()"])
-        elif next_command == self.SUB_SANITY_CHECK:
-            self.runCommand(["triggerEvent", "bb.event.SanityCheck()"])
-        elif next_command == self.SUB_NETWORK_TEST:
-            self.runCommand(["triggerEvent", "bb.event.NetworkTest()"])
-        elif next_command == self.SUB_BUILD_RECIPES:
-            self.clear_busy()
-            self.building = True
-            self.runCommand(["buildTargets", self.recipe_queue, self.default_task])
-            self.recipe_queue = []
-        elif next_command == self.SUB_BUILD_IMAGE:
-            self.clear_busy()
-            self.building = True
-            target = self.image
-
-            if self.base_image:
-                # Request the build of a custom image
-                self.generate_hob_base_image(target)
-                self.set_var_in_file("LINGUAS_INSTALL", "", "local.conf")
-                hobImage = self.runCommand(["matchFile", target + ".bb"])
-                if self.base_image != self.recipe_model.__custom_image__:
-                    baseImage = self.runCommand(["matchFile", self.base_image + ".bb"])
-                    version = self.runCommand(["generateNewImage", hobImage, baseImage, self.package_queue, True, ""])
-                    target += version
-                    self.recipe_model.set_custom_image_version(version)
-
-            targets = [target]
-            if self.toolchain_packages:
-                self.set_var_in_file("TOOLCHAIN_TARGET_TASK", " ".join(self.toolchain_packages), "local.conf")
-                targets.append(target + ":do_populate_sdk")
-
-            self.runCommand(["buildTargets", targets, self.default_task])
-
-    def display_error(self):
-        self.clear_busy()
-        self.emit("command-failed", self.error_msg)
-        self.error_msg = ""
-        if self.building:
-            self.building = False
-
-    def handle_event(self, event):
-        if not event:
-            return
-        if self.building:
-            self.current_phase = "building"
-            self.build.handle_event(event)
-
-        if isinstance(event, bb.event.PackageInfo):
-            self.package_model.populate(event._pkginfolist)
-            self.emit("package-populated")
-            self.run_next_command()
-
-        elif isinstance(event, bb.event.SanityCheckPassed):
-            reparse = self.runCommand(["getVariable", "BB_INVALIDCONF"]) or None
-            if reparse is True:
-                self.set_var_in_file("BB_INVALIDCONF", False, "local.conf")
-                self.runCommand(["setPrePostConfFiles", "conf/.hob.conf", ""])
-                self.commands_async.prepend(self.SUB_PARSE_CONFIG)
-            self.run_next_command()
-
-        elif isinstance(event, bb.event.SanityCheckFailed):
-            self.emit("sanity-failed", event._msg, event._network_error)
-
-        elif isinstance(event, logging.LogRecord):
-            if not self.building:
-                if event.levelno >= logging.ERROR:
-                    formatter = bb.msg.BBLogFormatter()
-                    msg = formatter.format(event)
-                    self.error_msg += msg + '\n'
-                elif event.levelno >= logging.WARNING and self.parsing == True:
-                    formatter = bb.msg.BBLogFormatter()
-                    msg = formatter.format(event)
-                    warn_msg = msg + '\n'
-                    self.emit("parsing-warning", warn_msg)
-
-        elif isinstance(event, bb.event.TargetsTreeGenerated):
-            self.current_phase = "data generation"
-            if event._model:
-                self.recipe_model.populate(event._model)
-                self.emit("recipe-populated")
-        elif isinstance(event, bb.event.ConfigFilesFound):
-            self.current_phase = "configuration lookup"
-            var = event._variable
-            values = event._values
-            values.sort()
-            self.emit("config-updated", var, values)
-        elif isinstance(event, bb.event.ConfigFilePathFound):
-            self.current_phase = "configuration lookup"
-        elif isinstance(event, bb.event.FilesMatchingFound):
-            self.current_phase = "configuration lookup"
-            # FIXME: hard coding, should at least be a variable shared between
-            # here and the caller
-            if event._pattern == "rootfs_":
-                formats = []
-                for match in event._matches:
-                    classname, sep, cls = match.rpartition(".")
-                    fs, sep, format = classname.rpartition("_")
-                    formats.append(format)
-                formats.sort()
-                self.emit("package-formats-updated", formats)
-        elif isinstance(event, bb.command.CommandCompleted):
-            self.current_phase = None
-            self.run_next_command()
-        elif isinstance(event, bb.command.CommandFailed):
-            if event.error not in ("Forced shutdown", "Stopped build"):
-                self.error_msg += event.error
-            self.commands_async = []
-            self.display_error()
-        elif isinstance(event, (bb.event.ParseStarted,
-                 bb.event.CacheLoadStarted,
-                 bb.event.TreeDataPreparationStarted,
-                 )):
-            message = {}
-            message["eventname"] = bb.event.getName(event)
-            message["current"] = 0
-            message["total"] = None
-            message["title"] = "Parsing recipes"
-            self.emit("parsing-started", message)
-            if isinstance(event, bb.event.ParseStarted):
-                self.parsing = True
-        elif isinstance(event, (bb.event.ParseProgress,
-                bb.event.CacheLoadProgress,
-                bb.event.TreeDataPreparationProgress)):
-            message = {}
-            message["eventname"] = bb.event.getName(event)
-            message["current"] = event.current
-            message["total"] = event.total
-            message["title"] = "Parsing recipes"
-            self.emit("parsing", message)
-        elif isinstance(event, (bb.event.ParseCompleted,
-                bb.event.CacheLoadCompleted,
-                bb.event.TreeDataPreparationCompleted)):
-            message = {}
-            message["eventname"] = bb.event.getName(event)
-            message["current"] = event.total
-            message["total"] = event.total
-            message["title"] = "Parsing recipes"
-            self.emit("parsing-completed", message)
-            if isinstance(event, bb.event.ParseCompleted):
-                self.parsing = False
-        elif isinstance(event, bb.event.NetworkTestFailed):
-            self.emit("network-failed")
-            self.run_next_command()
-        elif isinstance(event, bb.event.NetworkTestPassed):
-            self.emit("network-passed")
-            self.run_next_command()
-
-        if self.error_msg and not self.commands_async:
-            self.display_error()
-
-        return
-
-    def init_cooker(self):
-        self.runCommand(["createConfigFile", ".hob.conf"])
-
-    def set_extra_inherit(self, bbclass):
-        self.append_var_in_file("INHERIT", bbclass, ".hob.conf")
-
-    def set_bblayers(self, bblayers):
-        self.set_var_in_file("BBLAYERS", " ".join(bblayers), "bblayers.conf")
-
-    def set_machine(self, machine):
-        if machine:
-            self.early_assign_var_in_file("MACHINE", machine, "local.conf")
-
-    def set_sdk_machine(self, sdk_machine):
-        self.set_var_in_file("SDKMACHINE", sdk_machine, "local.conf")
-
-    def set_image_fstypes(self, image_fstypes):
-        self.set_var_in_file("IMAGE_FSTYPES", image_fstypes, "local.conf")
-
-    def set_distro(self, distro):
-        self.set_var_in_file("DISTRO", distro, "local.conf")
-
-    def set_package_format(self, format):
-        package_classes = ""
-        for pkgfmt in format.split():
-            package_classes += ("package_%s" % pkgfmt + " ")
-        self.set_var_in_file("PACKAGE_CLASSES", package_classes, "local.conf")
-
-    def set_bbthreads(self, threads):
-        self.set_var_in_file("BB_NUMBER_THREADS", threads, "local.conf")
-
-    def set_pmake(self, threads):
-        pmake = "-j %s" % threads
-        self.set_var_in_file("PARALLEL_MAKE", pmake, "local.conf")
-
-    def set_dl_dir(self, directory):
-        self.set_var_in_file("DL_DIR", directory, "local.conf")
-
-    def set_sstate_dir(self, directory):
-        self.set_var_in_file("SSTATE_DIR", directory, "local.conf")
-
-    def set_sstate_mirrors(self, url):
-        self.set_var_in_file("SSTATE_MIRRORS", url, "local.conf")
-
-    def set_extra_size(self, image_extra_size):
-        self.set_var_in_file("IMAGE_ROOTFS_EXTRA_SPACE", str(image_extra_size), "local.conf")
-
-    def set_rootfs_size(self, image_rootfs_size):
-        self.set_var_in_file("IMAGE_ROOTFS_SIZE", str(image_rootfs_size), "local.conf")
-
-    def set_incompatible_license(self, incompat_license):
-        self.set_var_in_file("INCOMPATIBLE_LICENSE", incompat_license, "local.conf")
-
-    def set_extra_setting(self, extra_setting):
-        self.set_var_in_file("EXTRA_SETTING", extra_setting, "local.conf")
-
-    def set_extra_config(self, extra_setting):
-        old_extra_setting = self.runCommand(["getVariable", "EXTRA_SETTING"]) or {}
-        old_extra_setting = str(old_extra_setting)
-
-        old_extra_setting = ast.literal_eval(old_extra_setting)
-        if not type(old_extra_setting) == dict:
-            old_extra_setting = {}
-
-        # settings not changed
-        if old_extra_setting == extra_setting:
-            return
-
-        # remove the old EXTRA SETTING variable
-        self.remove_var_from_file("EXTRA_SETTING")
-
-        # remove old settings from conf
-        for key in old_extra_setting.keys():
-            if key not in extra_setting:
-                self.remove_var_from_file(key)
-
-        # add new settings
-        for key, value in extra_setting.iteritems():
-            self.set_var_in_file(key, value, "local.conf")
-
-        if extra_setting:
-            self.set_var_in_file("EXTRA_SETTING", extra_setting, "local.conf")
-
-    def set_http_proxy(self, http_proxy):
-        self.set_var_in_file("http_proxy", http_proxy, "local.conf")
-
-    def set_https_proxy(self, https_proxy):
-        self.set_var_in_file("https_proxy", https_proxy, "local.conf")
-
-    def set_ftp_proxy(self, ftp_proxy):
-        self.set_var_in_file("ftp_proxy", ftp_proxy, "local.conf")
-
-    def set_socks_proxy(self, socks_proxy):
-        self.set_var_in_file("all_proxy", socks_proxy, "local.conf")
-
-    def set_cvs_proxy(self, host, port):
-        self.set_var_in_file("CVS_PROXY_HOST", host, "local.conf")
-        self.set_var_in_file("CVS_PROXY_PORT", port, "local.conf")
-
-    def request_package_info(self):
-        self.commands_async.append(self.SUB_GENERATE_PKGINFO)
-        self.run_next_command(self.POPULATE_PACKAGEINFO)
-
-    def trigger_sanity_check(self):
-        self.commands_async.append(self.SUB_SANITY_CHECK)
-        self.run_next_command(self.SANITY_CHECK)
-
-    def trigger_network_test(self):
-        self.commands_async.append(self.SUB_NETWORK_TEST)
-        self.run_next_command(self.NETWORK_TEST)
-
-    def generate_configuration(self):
-        self.runCommand(["setPrePostConfFiles", "conf/.hob.conf", ""])
-        self.commands_async.append(self.SUB_PARSE_CONFIG)
-        self.commands_async.append(self.SUB_PATH_LAYERS)
-        self.commands_async.append(self.SUB_FILES_DISTRO)
-        self.commands_async.append(self.SUB_FILES_MACH)
-        self.commands_async.append(self.SUB_FILES_SDKMACH)
-        self.commands_async.append(self.SUB_MATCH_CLASS)
-        self.run_next_command(self.GENERATE_CONFIGURATION)
-
-    def generate_recipes(self):
-        self.runCommand(["setPrePostConfFiles", "conf/.hob.conf", ""])
-        self.commands_async.append(self.SUB_PARSE_CONFIG)
-        self.commands_async.append(self.SUB_GNERATE_TGTS)
-        self.run_next_command(self.GENERATE_RECIPES)
-
-    def generate_packages(self, tgts, default_task="build"):
-        targets = []
-        targets.extend(tgts)
-        self.recipe_queue = targets
-        self.default_task = default_task
-        self.runCommand(["setPrePostConfFiles", "conf/.hob.conf", ""])
-        self.commands_async.append(self.SUB_PARSE_CONFIG)
-        self.commands_async.append(self.SUB_BUILD_RECIPES)
-        self.run_next_command(self.GENERATE_PACKAGES)
-
-    def generate_image(self, image, base_image, image_packages=None, toolchain_packages=None, default_task="build"):
-        self.image = image
-        self.base_image = base_image
-        if image_packages:
-            self.package_queue = image_packages
-        else:
-            self.package_queue = []
-        if toolchain_packages:
-            self.toolchain_packages = toolchain_packages
-        else:
-            self.toolchain_packages = []
-        self.default_task = default_task
-        self.runCommand(["setPrePostConfFiles", "conf/.hob.conf", ""])
-        self.commands_async.append(self.SUB_PARSE_CONFIG)
-        self.commands_async.append(self.SUB_BUILD_IMAGE)
-        self.run_next_command(self.GENERATE_IMAGE)
-
-    def generate_new_image(self, image, base_image, package_queue, description):
-        if base_image:
-            base_image = self.runCommand(["matchFile", self.base_image + ".bb"])
-        self.runCommand(["generateNewImage", image, base_image, package_queue, False, description])
-
-    def generate_hob_base_image(self, hob_image):
-        image_dir = self.get_topdir() + "/recipes/images/"
-        recipe_name = hob_image + ".bb"
-        self.ensure_dir(image_dir)
-        self.generate_new_image(image_dir + recipe_name, None, [], "")
-
-    def ensure_dir(self, directory):
-        self.runCommand(["ensureDir", directory])
-
-    def build_succeeded_async(self):
-        self.building = False
-
-    def build_failed_async(self):
-        self.initcmd = None
-        self.commands_async = []
-        self.building = False
-
-    def cancel_parse(self):
-        self.runCommand(["stateForceShutdown"])
-
-    def cancel_build(self, force=False):
-        if force:
-            # Force the cooker to stop as quickly as possible
-            self.runCommand(["stateForceShutdown"])
-        else:
-            # Wait for tasks to complete before shutting down, this helps
-            # leave the workdir in a usable state
-            self.runCommand(["stateShutdown"])
-
-    def reset_build(self):
-        self.build.reset()
-
-    def get_logfile(self):
-        return self.server.runCommand(["getVariable", "BB_CONSOLELOG"])[0]
-
-    def get_topdir(self):
-        return self.runCommand(["getVariable", "TOPDIR"]) or ""
-
-    def _remove_redundant(self, string):
-        ret = []
-        for i in string.split():
-            if i not in ret:
-                ret.append(i)
-        return " ".join(ret)
-
-    def set_var_in_file(self, var, val, default_file=None):
-        self.runCommand(["enableDataTracking"])
-        self.server.runCommand(["setVarFile", var, val, default_file, "set"])
-        self.runCommand(["disableDataTracking"])
-
-    def early_assign_var_in_file(self, var, val, default_file=None):
-        self.runCommand(["enableDataTracking"])
-        self.server.runCommand(["setVarFile", var, val, default_file, "earlyAssign"])
-        self.runCommand(["disableDataTracking"])
-
-    def remove_var_from_file(self, var):
-        self.server.runCommand(["removeVarFile", var])
-
-    def append_var_in_file(self, var, val, default_file=None):
-        self.server.runCommand(["setVarFile", var, val, default_file, "append"])
-
-    def append_to_bbfiles(self, val):
-        bbfiles = self.runCommand(["getVariable", "BBFILES", "False"]) or ""
-        bbfiles = bbfiles.split()
-        if val not in bbfiles:
-            self.append_var_in_file("BBFILES", val, "bblayers.conf")
-
-    def get_parameters(self):
-        # retrieve the parameters from bitbake
-        params = {}
-        params["core_base"] = self.runCommand(["getVariable", "COREBASE"]) or ""
-        params["layer"] = self.runCommand(["getVariable", "BBLAYERS"]) or ""
-        params["layers_non_removable"] = self.runCommand(["getVariable", "BBLAYERS_NON_REMOVABLE"]) or ""
-        params["dldir"] = self.runCommand(["getVariable", "DL_DIR"]) or ""
-        params["machine"] = self.runCommand(["getVariable", "MACHINE"]) or ""
-        params["distro"] = self.runCommand(["getVariable", "DISTRO"]) or "defaultsetup"
-        params["pclass"] = self.runCommand(["getVariable", "PACKAGE_CLASSES"]) or ""
-        params["sstatedir"] = self.runCommand(["getVariable", "SSTATE_DIR"]) or ""
-        params["sstatemirror"] = self.runCommand(["getVariable", "SSTATE_MIRRORS"]) or ""
-
-        num_threads = self.runCommand(["getCpuCount"])
-        if not num_threads:
-            num_threads = 1
-            max_threads = 65536
-        else:
-            try:
-                num_threads = int(num_threads)
-                max_threads = 16 * num_threads
-            except:
-                num_threads = 1
-                max_threads = 65536
-        params["max_threads"] = max_threads
-
-        bbthread = self.runCommand(["getVariable", "BB_NUMBER_THREADS"])
-        if not bbthread:
-            bbthread = num_threads
-        else:
-            try:
-                bbthread = int(bbthread)
-            except:
-                bbthread = num_threads
-        params["bbthread"] = bbthread
-
-        pmake = self.runCommand(["getVariable", "PARALLEL_MAKE"])
-        if not pmake:
-            pmake = num_threads
-        elif isinstance(pmake, int):
-            pass
-        else:
-            try:
-                pmake = int(pmake.lstrip("-j "))
-            except:
-                pmake = num_threads
-        params["pmake"] = "-j %s" % pmake
-
-        params["image_addr"] = self.runCommand(["getVariable", "DEPLOY_DIR_IMAGE"]) or ""
-
-        image_extra_size = self.runCommand(["getVariable", "IMAGE_ROOTFS_EXTRA_SPACE"])
-        if not image_extra_size:
-            image_extra_size = 0
-        else:
-            try:
-                image_extra_size = int(image_extra_size)
-            except:
-                image_extra_size = 0
-        params["image_extra_size"] = image_extra_size
-
-        image_rootfs_size = self.runCommand(["getVariable", "IMAGE_ROOTFS_SIZE"])
-        if not image_rootfs_size:
-            image_rootfs_size = 0
-        else:
-            try:
-                image_rootfs_size = int(image_rootfs_size)
-            except:
-                image_rootfs_size = 0
-        params["image_rootfs_size"] = image_rootfs_size
-
-        image_overhead_factor = self.runCommand(["getVariable", "IMAGE_OVERHEAD_FACTOR"])
-        if not image_overhead_factor:
-            image_overhead_factor = 1
-        else:
-            try:
-                image_overhead_factor = float(image_overhead_factor)
-            except:
-                image_overhead_factor = 1
-        params['image_overhead_factor'] = image_overhead_factor
-
-        params["incompat_license"] = self._remove_redundant(self.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) or "")
-        params["sdk_machine"] = self.runCommand(["getVariable", "SDKMACHINE"]) or self.runCommand(["getVariable", "SDK_ARCH"]) or ""
-
-        params["image_fstypes"] = self._remove_redundant(self.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "")
-
-        params["image_types"] = self._remove_redundant(self.runCommand(["getVariable", "IMAGE_TYPES"]) or "")
-
-        params["conf_version"] = self.runCommand(["getVariable", "CONF_VERSION"]) or ""
-        params["lconf_version"] = self.runCommand(["getVariable", "LCONF_VERSION"]) or ""
-
-        params["runnable_image_types"] = self._remove_redundant(self.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "")
-        params["runnable_machine_patterns"] = self._remove_redundant(self.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "")
-        params["deployable_image_types"] = self._remove_redundant(self.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or "")
-        params["kernel_image_type"] = self.runCommand(["getVariable", "KERNEL_IMAGETYPE"]) or ""
-        params["tmpdir"] = self.runCommand(["getVariable", "TMPDIR"]) or ""
-        params["distro_version"] = self.runCommand(["getVariable", "DISTRO_VERSION"]) or ""
-        params["target_os"] = self.runCommand(["getVariable", "TARGET_OS"]) or ""
-        params["target_arch"] = self.runCommand(["getVariable", "TARGET_ARCH"]) or ""
-        params["tune_pkgarch"] = self.runCommand(["getVariable", "TUNE_PKGARCH"])  or ""
-        params["bb_version"] = self.runCommand(["getVariable", "BB_MIN_VERSION"]) or ""
-
-        params["default_task"] = self.runCommand(["getVariable", "BB_DEFAULT_TASK"]) or "build"
-
-        params["socks_proxy"] = self.runCommand(["getVariable", "all_proxy"]) or ""
-        params["http_proxy"] = self.runCommand(["getVariable", "http_proxy"]) or ""
-        params["ftp_proxy"] = self.runCommand(["getVariable", "ftp_proxy"]) or ""
-        params["https_proxy"] = self.runCommand(["getVariable", "https_proxy"]) or ""
-
-        params["cvs_proxy_host"] = self.runCommand(["getVariable", "CVS_PROXY_HOST"]) or ""
-        params["cvs_proxy_port"] = self.runCommand(["getVariable", "CVS_PROXY_PORT"]) or ""
-
-        params["image_white_pattern"] = self.runCommand(["getVariable", "BBUI_IMAGE_WHITE_PATTERN"]) or ""
-        params["image_black_pattern"] = self.runCommand(["getVariable", "BBUI_IMAGE_BLACK_PATTERN"]) or ""
-        return params
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/hoblistmodel.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
deleted file mode 100644
index 50df156..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/hoblistmodel.py
+++ /dev/null
@@ -1,903 +0,0 @@
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2011        Intel Corporation
-#
-# Authored by Joshua Lock <josh@linux.intel.com>
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import gtk
-import gobject
-from bb.ui.crumbs.hobpages import HobPage
-
-#
-# PackageListModel
-#
-class PackageListModel(gtk.ListStore):
-    """
-    This class defines an gtk.ListStore subclass which will convert the output
-    of the bb.event.TargetsTreeGenerated event into a gtk.ListStore whilst also
-    providing convenience functions to access gtk.TreeModel subclasses which
-    provide filtered views of the data.
-    """
-
-    (COL_NAME, COL_VER, COL_REV, COL_RNM, COL_SEC, COL_SUM, COL_RDEP, COL_RPROV, COL_SIZE, COL_RCP, COL_BINB, COL_INC, COL_FADE_INC, COL_FONT, COL_FLIST) = range(15)
-
-    __gsignals__ = {
-        "package-selection-changed" : (gobject.SIGNAL_RUN_LAST,
-                                gobject.TYPE_NONE,
-                                ()),
-    }
-
-    __toolchain_required_packages__ = ["packagegroup-core-standalone-sdk-target", "packagegroup-core-standalone-sdk-target-dbg"]
-
-    def __init__(self):
-        self.rprov_pkg = {}
-        gtk.ListStore.__init__ (self,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_BOOLEAN,
-                                gobject.TYPE_BOOLEAN,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING)
-        self.sort_column_id, self.sort_order = PackageListModel.COL_NAME, gtk.SORT_ASCENDING
-
-    """
-    Find the model path for the item_name
-    Returns the path in the model or None
-    """
-    def find_path_for_item(self, item_name):
-        pkg = item_name
-        if item_name not in self.pn_path.keys():
-            if item_name not in self.rprov_pkg.keys():
-                return None
-            pkg = self.rprov_pkg[item_name]
-            if pkg not in self.pn_path.keys():
-                return None
-
-        return self.pn_path[pkg]
-
-    def find_item_for_path(self, item_path):
-        return self[item_path][self.COL_NAME]
-
-    """
-    Helper function to determine whether an item is an item specified by filter
-    """
-    def tree_model_filter(self, model, it, filter):
-        name = model.get_value(it, self.COL_NAME)
-
-        for key in filter.keys():
-            if key == self.COL_NAME:
-                if filter[key] != 'Search packages by name':
-                    if name and filter[key] not in name:
-                        return False
-            else:
-                if model.get_value(it, key) not in filter[key]:
-                    return False
-        self.filtered_nb += 1
-        return True
-
-    """
-    Create, if required, and return a filtered gtk.TreeModelSort
-    containing only the items specified by filter
-    """
-    def tree_model(self, filter, excluded_items_ahead=False, included_items_ahead=False, search_data=None, initial=False):
-        model = self.filter_new()
-        self.filtered_nb = 0
-        model.set_visible_func(self.tree_model_filter, filter)
-
-        sort = gtk.TreeModelSort(model)
-        sort.connect ('sort-column-changed', self.sort_column_changed_cb)
-        if initial:
-            sort.set_sort_column_id(PackageListModel.COL_NAME, gtk.SORT_ASCENDING)
-            sort.set_default_sort_func(None)
-        elif excluded_items_ahead:
-            sort.set_default_sort_func(self.exclude_item_sort_func, search_data)
-        elif included_items_ahead:
-            sort.set_default_sort_func(self.include_item_sort_func, search_data)
-        else:
-            if search_data and search_data!='Search recipes by name' and search_data!='Search package groups by name':
-                sort.set_default_sort_func(self.sort_func, search_data)
-            else:
-                sort.set_sort_column_id(self.sort_column_id, self.sort_order)
-                sort.set_default_sort_func(None)
-
-        sort.set_sort_func(PackageListModel.COL_INC, self.sort_column, PackageListModel.COL_INC)
-        sort.set_sort_func(PackageListModel.COL_SIZE, self.sort_column, PackageListModel.COL_SIZE)
-        sort.set_sort_func(PackageListModel.COL_BINB, self.sort_binb_column)
-        sort.set_sort_func(PackageListModel.COL_RCP, self.sort_column, PackageListModel.COL_RCP)
-        return sort
-
-    def sort_column_changed_cb (self, data):
-        self.sort_column_id, self.sort_order = data.get_sort_column_id ()
-
-    def sort_column(self, model, row1, row2, col):
-        value1 = model.get_value(row1, col)
-        value2 = model.get_value(row2, col)
-        if col==PackageListModel.COL_SIZE:
-            value1 = HobPage._string_to_size(value1)
-            value2 = HobPage._string_to_size(value2)
-
-        cmp_res = cmp(value1, value2)
-        if cmp_res!=0:
-            if col==PackageListModel.COL_INC:
-                return -cmp_res
-            else:
-                return cmp_res
-        else:
-            name1 = model.get_value(row1, PackageListModel.COL_NAME)
-            name2 = model.get_value(row2, PackageListModel.COL_NAME)
-            return cmp(name1,name2)
-
-    def sort_binb_column(self, model, row1, row2):
-        value1 = model.get_value(row1, PackageListModel.COL_BINB)
-        value2 = model.get_value(row2, PackageListModel.COL_BINB)
-        value1_list = value1.split(', ')
-        value2_list = value2.split(', ')
-
-        value1 = value1_list[0]
-        value2 = value2_list[0]
-
-        cmp_res = cmp(value1, value2)
-        if cmp_res==0:
-            cmp_size = cmp(len(value1_list), len(value2_list))
-            if cmp_size==0:
-                name1 = model.get_value(row1, PackageListModel.COL_NAME)
-                name2 = model.get_value(row2, PackageListModel.COL_NAME)
-                return cmp(name1,name2)
-            else:
-                return cmp_size
-        else:
-            return cmp_res
-
-    def exclude_item_sort_func(self, model, iter1, iter2, user_data=None):
-        if user_data:
-            val1 = model.get_value(iter1, PackageListModel.COL_NAME)
-            val2 = model.get_value(iter2, PackageListModel.COL_NAME)
-            return self.cmp_vals(val1, val2, user_data)
-        else:
-            val1 = model.get_value(iter1, PackageListModel.COL_FADE_INC)
-            val2 = model.get_value(iter2, PackageListModel.COL_INC)
-            return ((val1 == True) and (val2 == False))
-
-    def include_item_sort_func(self, model, iter1, iter2, user_data=None):
-        if user_data:
-            val1 = model.get_value(iter1, PackageListModel.COL_NAME)
-            val2 = model.get_value(iter2, PackageListModel.COL_NAME)
-            return self.cmp_vals(val1, val2, user_data)
-        else:
-            val1 = model.get_value(iter1, PackageListModel.COL_INC)
-            val2 = model.get_value(iter2, PackageListModel.COL_INC)
-            return ((val1 == False) and (val2 == True))
-
-    def sort_func(self, model, iter1, iter2, user_data):
-        val1 = model.get_value(iter1, PackageListModel.COL_NAME)
-        val2 = model.get_value(iter2, PackageListModel.COL_NAME)
-        return self.cmp_vals(val1, val2, user_data)
-
-    def cmp_vals(self, val1, val2, user_data):
-        if val1 is None or val2 is None:
-            return 0
-        elif val1.startswith(user_data) and not val2.startswith(user_data):
-            return -1
-        elif not val1.startswith(user_data) and val2.startswith(user_data):
-            return 1
-        else:
-            return cmp(val1, val2)
-
-    def convert_vpath_to_path(self, view_model, view_path):
-        # view_model is the model sorted
-        # get the path of the model filtered
-        filtered_model_path = view_model.convert_path_to_child_path(view_path)
-        # get the model filtered
-        filtered_model = view_model.get_model()
-        # get the path of the original model
-        path = filtered_model.convert_path_to_child_path(filtered_model_path)
-        return path
-
-    def convert_path_to_vpath(self, view_model, path):
-        it = view_model.get_iter_first()
-        while it:
-            name = self.find_item_for_path(path)
-            view_name = view_model.get_value(it, PackageListModel.COL_NAME)
-            if view_name == name:
-                view_path = view_model.get_path(it)
-                return view_path
-            it = view_model.iter_next(it)
-        return None
-
-    """
-    The populate() function takes as input the data from a
-    bb.event.PackageInfo event and populates the package list.
-    """
-    def populate(self, pkginfolist):
-        # First clear the model, in case repopulating
-        self.clear()
-
-        def getpkgvalue(pkgdict, key, pkgname, defaultval = None):
-            value = pkgdict.get('%s_%s' % (key, pkgname), None)
-            if not value:
-                value = pkgdict.get(key, defaultval)
-            return value
-
-        for pkginfo in pkginfolist:
-            pn = pkginfo['PN']
-            pv = pkginfo['PV']
-            pr = pkginfo['PR']
-            pkg = pkginfo['PKG']
-            pkgv = getpkgvalue(pkginfo, 'PKGV', pkg)
-            pkgr = getpkgvalue(pkginfo, 'PKGR', pkg)
-            # PKGSIZE is artificial, will always be overridden with the package name if present
-            pkgsize = int(pkginfo.get('PKGSIZE_%s' % pkg, "0"))
-            # PKG_%s is the renamed version
-            pkg_rename = pkginfo.get('PKG_%s' % pkg, "")
-            # The rest may be overridden or not
-            section = getpkgvalue(pkginfo, 'SECTION', pkg, "")
-            summary = getpkgvalue(pkginfo, 'SUMMARY', pkg, "")
-            rdep = getpkgvalue(pkginfo, 'RDEPENDS', pkg, "")
-            rrec = getpkgvalue(pkginfo, 'RRECOMMENDS', pkg, "")
-            rprov = getpkgvalue(pkginfo, 'RPROVIDES', pkg, "")
-            files_list = getpkgvalue(pkginfo, 'FILES_INFO', pkg, "")
-            for i in rprov.split():
-                self.rprov_pkg[i] = pkg
-
-            recipe = pn + '-' + pv + '-' + pr
-
-            allow_empty = getpkgvalue(pkginfo, 'ALLOW_EMPTY', pkg, "")
-
-            if pkgsize == 0 and not allow_empty:
-                continue
-
-            size = HobPage._size_to_string(pkgsize)
-            self.set(self.append(), self.COL_NAME, pkg, self.COL_VER, pkgv,
-                     self.COL_REV, pkgr, self.COL_RNM, pkg_rename,
-                     self.COL_SEC, section, self.COL_SUM, summary,
-                     self.COL_RDEP, rdep + ' ' + rrec,
-                     self.COL_RPROV, rprov, self.COL_SIZE, size,
-                     self.COL_RCP, recipe, self.COL_BINB, "",
-                     self.COL_INC, False, self.COL_FONT, '10', self.COL_FLIST, files_list)
-
-        self.pn_path = {}
-        it = self.get_iter_first()
-        while it:
-            pn = self.get_value(it, self.COL_NAME)
-            path = self.get_path(it)
-            self.pn_path[pn] = path
-            it = self.iter_next(it)
-
-    """
-    Update the model, send out the notification.
-    """
-    def selection_change_notification(self):
-        self.emit("package-selection-changed")
-
-    """
-    Check whether the item at item_path is included or not
-    """
-    def path_included(self, item_path):
-        return self[item_path][self.COL_INC]
-
-    """
-    Add this item, and any of its dependencies, to the image contents
-    """
-    def include_item(self, item_path, binb=""):
-        if self.path_included(item_path):
-            return
-
-        item_name = self[item_path][self.COL_NAME]
-        item_deps = self[item_path][self.COL_RDEP]
-
-        self[item_path][self.COL_INC] = True
-
-        item_bin = self[item_path][self.COL_BINB].split(', ')
-        if binb and not binb in item_bin:
-            item_bin.append(binb)
-            self[item_path][self.COL_BINB] = ', '.join(item_bin).lstrip(', ')
-
-        if item_deps:
-            # Ensure all of the items deps are included and, where appropriate,
-            # add this item to their COL_BINB
-            for dep in item_deps.split(" "):
-                if dep.startswith('('):
-                    continue
-                # If the contents model doesn't already contain dep, add it
-                dep_path = self.find_path_for_item(dep)
-                if not dep_path:
-                    continue
-                dep_included = self.path_included(dep_path)
-
-                if dep_included and not dep in item_bin:
-                    # don't set the COL_BINB to this item if the target is an
-                    # item in our own COL_BINB
-                    dep_bin = self[dep_path][self.COL_BINB].split(', ')
-                    if not item_name in dep_bin:
-                        dep_bin.append(item_name)
-                        self[dep_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ')
-                elif not dep_included:
-                    self.include_item(dep_path, binb=item_name)
-
-    def exclude_item(self, item_path):
-        if not self.path_included(item_path):
-            return
-
-        self[item_path][self.COL_INC] = False
-
-        item_name = self[item_path][self.COL_NAME]
-        item_deps = self[item_path][self.COL_RDEP]
-        if item_deps:
-            for dep in item_deps.split(" "):
-                if dep.startswith('('):
-                    continue
-                dep_path = self.find_path_for_item(dep)
-                if not dep_path:
-                    continue
-                dep_bin = self[dep_path][self.COL_BINB].split(', ')
-                if item_name in dep_bin:
-                    dep_bin.remove(item_name)
-                    self[dep_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ')
-
-        item_bin = self[item_path][self.COL_BINB].split(', ')
-        if item_bin:
-            for binb in item_bin:
-                binb_path = self.find_path_for_item(binb)
-                if not binb_path:
-                    continue
-                self.exclude_item(binb_path)
-
-    """
-    Empty self.contents by setting the include of each entry to None
-    """
-    def reset(self):
-        it = self.get_iter_first()
-        while it:
-            self.set(it,
-                     self.COL_INC, False,
-                     self.COL_BINB, "")
-            it = self.iter_next(it)
-
-        self.selection_change_notification()
-
-    def get_selected_packages(self):
-        packagelist = []
-
-        it = self.get_iter_first()
-        while it:
-            if self.get_value(it, self.COL_INC):
-                name = self.get_value(it, self.COL_NAME)
-                packagelist.append(name)
-            it = self.iter_next(it)
-
-        return packagelist
-
-    def get_user_selected_packages(self):
-        packagelist = []
-
-        it = self.get_iter_first()
-        while it:
-            if self.get_value(it, self.COL_INC):
-                binb = self.get_value(it, self.COL_BINB)
-                if binb == "User Selected":
-                    name = self.get_value(it, self.COL_NAME)
-                    packagelist.append(name)
-            it = self.iter_next(it)
-
-        return packagelist
-
-    def get_selected_packages_toolchain(self):
-        packagelist = []
-
-        it = self.get_iter_first()
-        while it:
-            if self.get_value(it, self.COL_INC):
-                name = self.get_value(it, self.COL_NAME)
-                if name.endswith("-dev") or name.endswith("-dbg"):
-                    packagelist.append(name)
-            it = self.iter_next(it)
-
-        return list(set(packagelist + self.__toolchain_required_packages__));
-
-    """
-    Package model may be incomplete, therefore when calling the
-    set_selected_packages(), some packages will not be set included.
-    Return the un-set packages list.
-    """
-    def set_selected_packages(self, packagelist, user_selected=False):
-        left = []
-        binb = 'User Selected' if user_selected else ''
-        for pn in packagelist:
-            if pn in self.pn_path.keys():
-                path = self.pn_path[pn]
-                self.include_item(item_path=path, binb=binb)
-            else:
-                left.append(pn)
-
-        self.selection_change_notification()
-        return left
-
-    """
-    Return the selected package size, unit is B.
-    """
-    def get_packages_size(self):
-        packages_size = 0
-        it = self.get_iter_first()
-        while it:
-            if self.get_value(it, self.COL_INC):
-                str_size = self.get_value(it, self.COL_SIZE)
-                if not str_size:
-                    continue
-
-                packages_size += HobPage._string_to_size(str_size)
-
-            it = self.iter_next(it)
-        return packages_size
-
-    """
-    Resync the state of included items to a backup column before performing the fadeout visible effect
-    """
-    def resync_fadeout_column(self, model_first_iter=None):
-        it = model_first_iter
-        while it:
-            active = self.get_value(it, self.COL_INC)
-            self.set(it, self.COL_FADE_INC, active)
-            it = self.iter_next(it)
-
-#
-# RecipeListModel
-#
-class RecipeListModel(gtk.ListStore):
-    """
-    This class defines an gtk.ListStore subclass which will convert the output
-    of the bb.event.TargetsTreeGenerated event into a gtk.ListStore whilst also
-    providing convenience functions to access gtk.TreeModel subclasses which
-    provide filtered views of the data.
-    """
-    (COL_NAME, COL_DESC, COL_LIC, COL_GROUP, COL_DEPS, COL_BINB, COL_TYPE, COL_INC, COL_IMG, COL_INSTALL, COL_PN, COL_FADE_INC, COL_SUMMARY, COL_VERSION,
-     COL_REVISION, COL_HOMEPAGE, COL_BUGTRACKER, COL_FILE) = range(18)
-
-    __custom_image__ = "Start with an empty image recipe"
-
-    __gsignals__ = {
-        "recipe-selection-changed" : (gobject.SIGNAL_RUN_LAST,
-                                  gobject.TYPE_NONE,
-                                 ()),
-        }
-
-    """
-    """
-    def __init__(self):
-        gtk.ListStore.__init__ (self,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_BOOLEAN,
-                                gobject.TYPE_BOOLEAN,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_BOOLEAN,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING,
-                                gobject.TYPE_STRING)
-        self.sort_column_id, self.sort_order = RecipeListModel.COL_NAME, gtk.SORT_ASCENDING
-
-    """
-    Find the model path for the item_name
-    Returns the path in the model or None
-    """
-    def find_path_for_item(self, item_name):
-        if self.non_target_name(item_name) or item_name not in self.pn_path.keys():
-            return None
-        else:
-            return self.pn_path[item_name]
-
-    def find_item_for_path(self, item_path):
-        return self[item_path][self.COL_NAME]
-
-    """
-    Helper method to determine whether name is a target pn
-    """
-    def non_target_name(self, name):
-        if name and ('-native' in name):
-            return True
-        return False
-
-    """
-    Helper function to determine whether an item is an item specified by filter
-    """
-    def tree_model_filter(self, model, it, filter):
-        name = model.get_value(it, self.COL_NAME)
-        if self.non_target_name(name):
-            return False
-
-        for key in filter.keys():
-            if key == self.COL_NAME:
-                if filter[key] != 'Search recipes by name' and filter[key] != 'Search package groups by name':
-                    if filter[key] not in name:
-                        return False
-            else:
-                if model.get_value(it, key) not in filter[key]:
-                    return False
-        self.filtered_nb += 1
-
-        return True
-
-    def exclude_item_sort_func(self, model, iter1, iter2, user_data=None):
-        if user_data:
-            val1 = model.get_value(iter1, RecipeListModel.COL_NAME)
-            val2 = model.get_value(iter2, RecipeListModel.COL_NAME)
-            return self.cmp_vals(val1, val2, user_data)
-        else:
-            val1 = model.get_value(iter1, RecipeListModel.COL_FADE_INC)
-            val2 = model.get_value(iter2, RecipeListModel.COL_INC)
-            return ((val1 == True) and (val2 == False))
-
-    def include_item_sort_func(self, model, iter1, iter2, user_data=None):
-        if user_data:
-            val1 = model.get_value(iter1, RecipeListModel.COL_NAME)
-            val2 = model.get_value(iter2, RecipeListModel.COL_NAME)
-            return self.cmp_vals(val1, val2, user_data)
-        else:
-            val1 = model.get_value(iter1, RecipeListModel.COL_INC)
-            val2 = model.get_value(iter2, RecipeListModel.COL_INC)
-            return ((val1 == False) and (val2 == True))
-
-    def sort_func(self, model, iter1, iter2, user_data):
-        val1 = model.get_value(iter1, RecipeListModel.COL_NAME)
-        val2 = model.get_value(iter2, RecipeListModel.COL_NAME)
-        return self.cmp_vals(val1, val2, user_data)
-
-    def cmp_vals(self, val1, val2, user_data):
-        if val1 is None or val2 is None:
-            return 0
-        elif val1.startswith(user_data) and not val2.startswith(user_data):
-            return -1
-        elif not val1.startswith(user_data) and val2.startswith(user_data):
-            return 1
-        else:
-            return cmp(val1, val2)
-
-    """
-    Create, if required, and return a filtered gtk.TreeModelSort
-    containing only the items specified by filter
-    """
-    def tree_model(self, filter, excluded_items_ahead=False, included_items_ahead=False, search_data=None, initial=False):
-        model = self.filter_new()
-        self.filtered_nb = 0
-        model.set_visible_func(self.tree_model_filter, filter)
-
-        sort = gtk.TreeModelSort(model)
-        sort.connect ('sort-column-changed', self.sort_column_changed_cb)
-        if initial:
-            sort.set_sort_column_id(RecipeListModel.COL_NAME, gtk.SORT_ASCENDING)
-            sort.set_default_sort_func(None)
-        elif excluded_items_ahead:
-            sort.set_default_sort_func(self.exclude_item_sort_func, search_data)
-        elif included_items_ahead:
-            sort.set_default_sort_func(self.include_item_sort_func, search_data)
-        else:
-            if search_data and search_data!='Search recipes by name' and search_data!='Search package groups by name':
-                sort.set_default_sort_func(self.sort_func, search_data)
-            else:
-                sort.set_sort_column_id(self.sort_column_id, self.sort_order)
-                sort.set_default_sort_func(None)
-
-        sort.set_sort_func(RecipeListModel.COL_INC, self.sort_column, RecipeListModel.COL_INC)
-        sort.set_sort_func(RecipeListModel.COL_GROUP, self.sort_column, RecipeListModel.COL_GROUP)
-        sort.set_sort_func(RecipeListModel.COL_BINB, self.sort_binb_column)
-        sort.set_sort_func(RecipeListModel.COL_LIC, self.sort_column, RecipeListModel.COL_LIC)
-        return sort
-
-    def sort_column_changed_cb (self, data):
-        self.sort_column_id, self.sort_order = data.get_sort_column_id ()
-
-    def sort_column(self, model, row1, row2, col):
-        value1 = model.get_value(row1, col)
-        value2 = model.get_value(row2, col)
-        cmp_res = cmp(value1, value2)
-        if cmp_res!=0:
-            if col==RecipeListModel.COL_INC:
-                return -cmp_res
-            else:
-                return cmp_res
-        else:
-            name1 = model.get_value(row1, RecipeListModel.COL_NAME)
-            name2 = model.get_value(row2, RecipeListModel.COL_NAME)
-            return cmp(name1,name2)
-
-    def sort_binb_column(self, model, row1, row2):
-        value1 = model.get_value(row1, RecipeListModel.COL_BINB)
-        value2 = model.get_value(row2, RecipeListModel.COL_BINB)
-        value1_list = value1.split(', ')
-        value2_list = value2.split(', ')
-
-        value1 = value1_list[0]
-        value2 = value2_list[0]
-
-        cmp_res = cmp(value1, value2)
-        if cmp_res==0:
-            cmp_size = cmp(len(value1_list), len(value2_list))
-            if cmp_size==0:
-                name1 = model.get_value(row1, RecipeListModel.COL_NAME)
-                name2 = model.get_value(row2, RecipeListModel.COL_NAME)
-                return cmp(name1,name2)
-            else:
-                return cmp_size
-        else:
-            return cmp_res
-
-    def convert_vpath_to_path(self, view_model, view_path):
-        filtered_model_path = view_model.convert_path_to_child_path(view_path)
-        filtered_model = view_model.get_model()
-
-        # get the path of the original model
-        path = filtered_model.convert_path_to_child_path(filtered_model_path)
-        return path
-
-    def convert_path_to_vpath(self, view_model, path):
-        it = view_model.get_iter_first()
-        while it:
-            name = self.find_item_for_path(path)
-            view_name = view_model.get_value(it, RecipeListModel.COL_NAME)
-            if view_name == name:
-                view_path = view_model.get_path(it)
-                return view_path
-            it = view_model.iter_next(it)
-        return None
-
-    """
-    The populate() function takes as input the data from a
-    bb.event.TargetsTreeGenerated event and populates the RecipeList.
-    """
-    def populate(self, event_model):
-        # First clear the model, in case repopulating
-        self.clear()
-
-        # dummy image for prompt
-        self.set_in_list(self.__custom_image__,  "Use 'Edit image recipe' to customize recipes and packages " \
-                                "to be included in your image ")
-
-        for item in event_model["pn"]:
-            name = item
-            desc = event_model["pn"][item]["description"]
-            lic = event_model["pn"][item]["license"]
-            group = event_model["pn"][item]["section"]
-            inherits = event_model["pn"][item]["inherits"]
-            summary = event_model["pn"][item]["summary"]
-            version = event_model["pn"][item]["version"]
-            revision = event_model["pn"][item]["prevision"]
-            homepage = event_model["pn"][item]["homepage"]
-            bugtracker = event_model["pn"][item]["bugtracker"]
-            filename = event_model["pn"][item]["filename"]
-            install = []
-
-            depends = event_model["depends"].get(item, []) + event_model["rdepends-pn"].get(item, [])
-
-            if ('packagegroup.bbclass' in " ".join(inherits)):
-                atype = 'packagegroup'
-            elif ('/image.bbclass' in " ".join(inherits)):
-                if "edited" not in name:
-                    atype = 'image'
-                    install = event_model["rdepends-pkg"].get(item, []) + event_model["rrecs-pkg"].get(item, [])
-            elif ('meta-' in name):
-                atype = 'toolchain'
-            elif (name == 'dummy-image' or name == 'dummy-toolchain'):
-                atype = 'dummy'
-            else:
-                atype = 'recipe'
-
-            self.set(self.append(), self.COL_NAME, item, self.COL_DESC, desc,
-                     self.COL_LIC, lic, self.COL_GROUP, group,
-                     self.COL_DEPS, " ".join(depends), self.COL_BINB, "",
-                     self.COL_TYPE, atype, self.COL_INC, False,
-                     self.COL_IMG, False, self.COL_INSTALL, " ".join(install), self.COL_PN, item,
-                     self.COL_SUMMARY, summary, self.COL_VERSION, version, self.COL_REVISION, revision,
-                     self.COL_HOMEPAGE, homepage, self.COL_BUGTRACKER, bugtracker,
-                     self.COL_FILE, filename)
-
-        self.pn_path = {}
-        it = self.get_iter_first()
-        while it:
-            pn = self.get_value(it, self.COL_NAME)
-            path = self.get_path(it)
-            self.pn_path[pn] = path
-            it = self.iter_next(it)
-
-    def set_in_list(self, item, desc):
-        self.set(self.append(), self.COL_NAME, item,
-                 self.COL_DESC, desc,
-                 self.COL_LIC, "", self.COL_GROUP, "",
-                 self.COL_DEPS, "", self.COL_BINB, "",
-                 self.COL_TYPE, "image", self.COL_INC, False,
-                 self.COL_IMG, False, self.COL_INSTALL, "", self.COL_PN, item,
-                 self.COL_SUMMARY, "", self.COL_VERSION, "", self.COL_REVISION, "",
-                 self.COL_HOMEPAGE, "", self.COL_BUGTRACKER, "")
-        self.pn_path = {}
-        it = self.get_iter_first()
-        while it:
-            pn = self.get_value(it, self.COL_NAME)
-            path = self.get_path(it)
-            self.pn_path[pn] = path
-            it = self.iter_next(it)
-
-    """
-    Update the model, send out the notification.
-    """
-    def selection_change_notification(self):
-        self.emit("recipe-selection-changed")
-
-    def path_included(self, item_path):
-        return self[item_path][self.COL_INC]
-
-    """
-    Add this item, and any of its dependencies, to the image contents
-    """
-    def include_item(self, item_path, binb="", image_contents=False):
-        if self.path_included(item_path):
-            return
-
-        item_name = self[item_path][self.COL_NAME]
-        item_deps = self[item_path][self.COL_DEPS]
-
-        self[item_path][self.COL_INC] = True
-
-        item_bin = self[item_path][self.COL_BINB].split(', ')
-        if binb and not binb in item_bin:
-            item_bin.append(binb)
-            self[item_path][self.COL_BINB] = ', '.join(item_bin).lstrip(', ')
-
-        # We want to do some magic with things which are brought in by the
-        # base image so tag them as so
-        if image_contents:
-            self[item_path][self.COL_IMG] = True
-
-        if item_deps:
-            # Ensure all of the items deps are included and, where appropriate,
-            # add this item to their COL_BINB
-            for dep in item_deps.split(" "):
-                # If the contents model doesn't already contain dep, add it
-                dep_path = self.find_path_for_item(dep)
-                if not dep_path:
-                    continue
-                dep_included = self.path_included(dep_path)
-
-                if dep_included and not dep in item_bin:
-                    # don't set the COL_BINB to this item if the target is an
-                    # item in our own COL_BINB
-                    dep_bin = self[dep_path][self.COL_BINB].split(', ')
-                    if not item_name in dep_bin:
-                        dep_bin.append(item_name)
-                        self[dep_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ')
-                elif not dep_included:
-                    self.include_item(dep_path, binb=item_name, image_contents=image_contents)
-        dep_bin = self[item_path][self.COL_BINB].split(', ')
-        if self[item_path][self.COL_NAME] in dep_bin:
-            dep_bin.remove(self[item_path][self.COL_NAME])
-        self[item_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ')
-
-    def exclude_item(self, item_path):
-        if not self.path_included(item_path):
-            return
-
-        self[item_path][self.COL_INC] = False
-
-        item_name = self[item_path][self.COL_NAME]
-        item_deps = self[item_path][self.COL_DEPS]
-        if item_deps:
-            for dep in item_deps.split(" "):
-                dep_path = self.find_path_for_item(dep)
-                if not dep_path:
-                    continue
-                dep_bin = self[dep_path][self.COL_BINB].split(', ')
-                if item_name in dep_bin:
-                    dep_bin.remove(item_name)
-                    self[dep_path][self.COL_BINB] = ', '.join(dep_bin).lstrip(', ')
-
-        item_bin = self[item_path][self.COL_BINB].split(', ')
-        if item_bin:
-            for binb in item_bin:
-                binb_path = self.find_path_for_item(binb)
-                if not binb_path:
-                    continue
-                self.exclude_item(binb_path)
-
-    def reset(self):
-        it = self.get_iter_first()
-        while it:
-            self.set(it,
-                     self.COL_INC, False,
-                     self.COL_BINB, "",
-                     self.COL_IMG, False)
-            it = self.iter_next(it)
-
-        self.selection_change_notification()
-
-    """
-    Returns two lists. One of user selected recipes and the other containing
-    all selected recipes
-    """
-    def get_selected_recipes(self):
-        allrecipes = []
-        userrecipes = []
-
-        it = self.get_iter_first()
-        while it:
-            if self.get_value(it, self.COL_INC):
-                name = self.get_value(it, self.COL_PN)
-                type = self.get_value(it, self.COL_TYPE)
-                if type != "image":
-                    allrecipes.append(name)
-                    sel = "User Selected" in self.get_value(it, self.COL_BINB)
-                    if sel:
-                        userrecipes.append(name)
-            it = self.iter_next(it)
-
-        return list(set(userrecipes)), list(set(allrecipes))
-
-    def set_selected_recipes(self, recipelist):
-        for pn in recipelist:
-            if pn in self.pn_path.keys():
-                path = self.pn_path[pn]
-                self.include_item(item_path=path,
-                                  binb="User Selected")
-        self.selection_change_notification()
-
-    def get_selected_image(self):
-        it = self.get_iter_first()
-        while it:
-            if self.get_value(it, self.COL_INC):
-                name = self.get_value(it, self.COL_PN)
-                type = self.get_value(it, self.COL_TYPE)
-                if type == "image":
-                    sel = "User Selected" in self.get_value(it, self.COL_BINB)
-                    if sel:
-                        return name
-            it = self.iter_next(it)
-        return None
-
-    def set_selected_image(self, img):
-        if not img:
-            return
-        self.reset()
-        path = self.find_path_for_item(img)
-        self.include_item(item_path=path,
-                          binb="User Selected",
-                          image_contents=True)
-        self.selection_change_notification()
-
-    def set_custom_image_version(self, version):
-        self.custom_image_version = version
-
-    def get_custom_image_version(self):
-        return self.custom_image_version
-
-    def is_custom_image(self):
-        return self.get_selected_image() == self.__custom_image__
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/hobpages.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/hobpages.py
deleted file mode 100755
index 0fd3598..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/hobpages.py
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/env python
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2012        Intel Corporation
-#
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import gtk
-from bb.ui.crumbs.hobcolor import HobColors
-from bb.ui.crumbs.hobwidget import hwc
-
-#
-# HobPage: the super class for all Hob-related pages
-#    
-class HobPage (gtk.VBox):
-
-    def __init__(self, builder, title = None):
-        super(HobPage, self).__init__(False, 0)
-        self.builder = builder
-        self.builder_width, self.builder_height = self.builder.size_request()
-
-        if not title:
-            self.title = "Hob -- Image Creator"
-        else:
-            self.title = title
-        self.title_label = gtk.Label()
-
-        self.box_group_area = gtk.VBox(False, 12)
-        self.box_group_area.set_size_request(self.builder_width - 73 - 73, self.builder_height - 88 - 15 - 15)
-        self.group_align = gtk.Alignment(xalign = 0, yalign=0.5, xscale=1, yscale=1)
-        self.group_align.set_padding(15, 15, 73, 73)
-        self.group_align.add(self.box_group_area)
-        self.box_group_area.set_homogeneous(False)
-
-    def set_title(self, title):
-        self.title = title
-        self.title_label.set_markup("<span size='x-large'>%s</span>" % self.title)
-
-    def add_onto_top_bar(self, widget = None, padding = 0):
-        # the top button occupies 1/7 of the page height
-        # setup an event box
-        eventbox = gtk.EventBox()
-        style = eventbox.get_style().copy()
-        style.bg[gtk.STATE_NORMAL] = eventbox.get_colormap().alloc_color(HobColors.LIGHT_GRAY, False, False)
-        eventbox.set_style(style)
-        eventbox.set_size_request(-1, 88)
-
-        hbox = gtk.HBox()
-
-        self.title_label = gtk.Label()
-        self.title_label.set_markup("<span size='x-large'>%s</span>" % self.title)
-        hbox.pack_start(self.title_label, expand=False, fill=False, padding=20)
-
-        if widget:
-            # add the widget in the event box
-            hbox.pack_end(widget, expand=False, fill=False, padding=padding)
-        eventbox.add(hbox)
-
-        return eventbox
-
-    def span_tag(self, size="medium", weight="normal", forground="#1c1c1c"):
-        span_tag = "weight='%s' foreground='%s' size='%s'" % (weight, forground, size)
-        return span_tag
-
-    def append_toolbar_button(self, toolbar, buttonname, icon_disp, icon_hovor, tip, cb):
-        # Create a button and append it on the toolbar according to button name
-        icon = gtk.Image()
-        icon_display = icon_disp
-        icon_hover = icon_hovor
-        pix_buffer = gtk.gdk.pixbuf_new_from_file(icon_display)
-        icon.set_from_pixbuf(pix_buffer)
-        tip_text = tip
-        button = toolbar.append_item(buttonname, tip, None, icon, cb)
-        return button
-
-    @staticmethod
-    def _size_to_string(size):
-        try:
-            if not size:
-                size_str = "0 B"
-            else:
-                if len(str(int(size))) > 6:
-                    size_str = '%.1f' % (size*1.0/(1024*1024)) + ' MB'
-                elif len(str(int(size))) > 3:
-                    size_str = '%.1f' % (size*1.0/1024) + ' KB'
-                else:
-                    size_str = str(size) + ' B'
-        except:
-            size_str = "0 B"
-        return size_str
-
-    @staticmethod
-    def _string_to_size(str_size):
-        try:
-            if not str_size:
-                size = 0
-            else:
-                unit = str_size.split()
-                if len(unit) > 1:
-                    if unit[1] == 'MB':
-                        size = float(unit[0])*1024*1024
-                    elif unit[1] == 'KB':
-                        size = float(unit[0])*1024
-                    elif unit[1] == 'B':
-                        size = float(unit[0])
-                    else:
-                        size = 0
-                else:
-                    size = float(unit[0])
-        except:
-            size = 0
-        return size
-
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
deleted file mode 100644
index 2766bea..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ /dev/null
@@ -1,561 +0,0 @@
-#!/usr/bin/env python
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2012        Intel Corporation
-#
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import gtk
-import glib
-import re
-from bb.ui.crumbs.progressbar import HobProgressBar
-from bb.ui.crumbs.hobcolor import HobColors
-from bb.ui.crumbs.hobwidget import hic, HobImageButton, HobInfoButton, HobAltButton, HobButton
-from bb.ui.crumbs.hoblistmodel import RecipeListModel
-from bb.ui.crumbs.hobpages import HobPage
-from bb.ui.crumbs.hig.retrieveimagedialog import RetrieveImageDialog
-
-#
-# ImageConfigurationPage
-#
-class ImageConfigurationPage (HobPage):
-
-    __dummy_machine__ = "--select a machine--"
-    __dummy_image__   = "--select an image recipe--"
-    __custom_image__  = "Select from my image recipes"
-
-    def __init__(self, builder):
-        super(ImageConfigurationPage, self).__init__(builder, "Image configuration")
-
-        self.image_combo_id = None
-        # we use machine_combo_changed_by_manual to identify the machine is changed by code
-        # or by manual. If by manual, all user's recipe selection and package selection are
-        # cleared.
-        self.machine_combo_changed_by_manual = True
-        self.stopping = False
-        self.warning_shift = 0
-        self.custom_image_selected = None
-        self.create_visual_elements()
-
-    def create_visual_elements(self):
-        # create visual elements
-        self.toolbar = gtk.Toolbar()
-        self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
-        self.toolbar.set_style(gtk.TOOLBAR_BOTH)
-
-        my_images_button = self.append_toolbar_button(self.toolbar,
-            "Images",
-            hic.ICON_IMAGES_DISPLAY_FILE,
-            hic.ICON_IMAGES_HOVER_FILE,
-            "Open previously built images",
-            self.my_images_button_clicked_cb)
-        settings_button = self.append_toolbar_button(self.toolbar,
-            "Settings",
-            hic.ICON_SETTINGS_DISPLAY_FILE,
-            hic.ICON_SETTINGS_HOVER_FILE,
-            "View additional build settings",
-            self.settings_button_clicked_cb)
-
-        self.config_top_button = self.add_onto_top_bar(self.toolbar)
-
-        self.gtable = gtk.Table(40, 40, True)
-        self.create_config_machine()
-        self.create_config_baseimg()
-        self.config_build_button = self.create_config_build_button()
-
-    def _remove_all_widget(self):
-        children = self.gtable.get_children() or []
-        for child in children:
-            self.gtable.remove(child)
-        children = self.box_group_area.get_children() or []
-        for child in children:
-            self.box_group_area.remove(child)
-        children = self.get_children() or []
-        for child in children:
-            self.remove(child)
-
-    def _pack_components(self, pack_config_build_button = False):
-        self._remove_all_widget()
-        self.pack_start(self.config_top_button, expand=False, fill=False)
-        self.pack_start(self.group_align, expand=True, fill=True)
-
-        self.box_group_area.pack_start(self.gtable, expand=True, fill=True)
-        if pack_config_build_button:
-            self.box_group_area.pack_end(self.config_build_button, expand=False, fill=False)
-        else:
-            box = gtk.HBox(False, 6)
-            box.show()
-            subbox = gtk.HBox(False, 0)
-            subbox.set_size_request(205, 49)
-            subbox.show()
-            box.add(subbox)
-            self.box_group_area.pack_end(box, False, False)
-
-    def show_machine(self):
-        self.progress_bar.reset()
-        self._pack_components(pack_config_build_button = False)
-        self.set_config_machine_layout(show_progress_bar = False)
-        self.show_all()
-
-    def update_progress_bar(self, title, fraction, status=None):
-        if self.stopping == False:
-            self.progress_bar.update(fraction)
-            self.progress_bar.set_text(title)
-            self.progress_bar.set_rcstyle(status)
-
-    def show_info_populating(self):
-        self._pack_components(pack_config_build_button = False)
-        self.set_config_machine_layout(show_progress_bar = True)
-        self.show_all()
-
-    def show_info_populated(self):
-        self.progress_bar.reset()
-        self._pack_components(pack_config_build_button = False)
-        self.set_config_machine_layout(show_progress_bar = False)
-        self.set_config_baseimg_layout()
-        self.show_all()
-
-    def show_baseimg_selected(self):
-        self.progress_bar.reset()
-        self._pack_components(pack_config_build_button = True)
-        self.set_config_machine_layout(show_progress_bar = False)
-        self.set_config_baseimg_layout()
-        self.show_all()
-        if self.builder.recipe_model.get_selected_image() == self.builder.recipe_model.__custom_image__:
-            self.just_bake_button.hide()
-
-    def add_warnings_bar(self):
-        #create the warnings bar shown when recipes parsing generates warnings
-        color = HobColors.KHAKI
-        warnings_bar = gtk.EventBox()
-        warnings_bar.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse(color))
-        warnings_bar.set_flags(gtk.CAN_DEFAULT)
-        warnings_bar.grab_default()
-
-        build_stop_tab = gtk.Table(10, 20, True)
-        warnings_bar.add(build_stop_tab)
-
-        icon = gtk.Image()
-        icon_pix_buffer = gtk.gdk.pixbuf_new_from_file(hic.ICON_INDI_ALERT_FILE)
-        icon.set_from_pixbuf(icon_pix_buffer)
-        build_stop_tab.attach(icon, 0, 2, 0, 10)
-
-        label = gtk.Label()
-        label.set_alignment(0.0, 0.5)
-        warnings_nb = len(self.builder.parsing_warnings)
-        if warnings_nb == 1:
-            label.set_markup("<span size='x-large'><b>1 recipe parsing warning</b></span>")
-        else:
-            label.set_markup("<span size='x-large'><b>%s recipe parsing warnings</b></span>" % warnings_nb)
-        build_stop_tab.attach(label, 2, 12, 0, 10)
-
-        view_warnings_button = HobButton("View warnings")
-        view_warnings_button.connect('clicked', self.view_warnings_button_clicked_cb)
-        build_stop_tab.attach(view_warnings_button, 15, 19, 1, 9)
-
-        return warnings_bar
-
-    def disable_warnings_bar(self):
-        if self.builder.parsing_warnings:
-            if hasattr(self, 'warnings_bar'):
-                self.warnings_bar.hide_all()
-            self.builder.parsing_warnings = []
-
-    def create_config_machine(self):
-        self.machine_title = gtk.Label()
-        self.machine_title.set_alignment(0.0, 0.5)
-        mark = "<span %s>Select a machine</span>" % self.span_tag('x-large', 'bold')
-        self.machine_title.set_markup(mark)
-
-        self.machine_title_desc = gtk.Label()
-        self.machine_title_desc.set_alignment(0.0, 0.5)
-        mark = ("<span %s>Your selection is the profile of the target machine for which you"
-        " are building the image.\n</span>") % (self.span_tag('medium'))
-        self.machine_title_desc.set_markup(mark)
-
-        self.machine_combo = gtk.combo_box_new_text()
-        self.machine_combo.connect("changed", self.machine_combo_changed_cb)
-
-        icon_file = hic.ICON_LAYERS_DISPLAY_FILE
-        hover_file = hic.ICON_LAYERS_HOVER_FILE
-        self.layer_button = HobImageButton("Layers", "Add support for machines, software, etc.",
-                                icon_file, hover_file)
-        self.layer_button.connect("clicked", self.layer_button_clicked_cb)
-
-        markup = "Layers are a powerful mechanism to extend the Yocto Project "
-        markup += "with your own functionality.\n"
-        markup += "For more on layers, check the <a href=\""
-        markup += "http://www.yoctoproject.org/docs/current/dev-manual/"
-        markup += "dev-manual.html#understanding-and-using-layers\">reference manual</a>."
-        self.layer_info_icon = HobInfoButton("<b>Layers</b>" + "*" + markup, self.get_parent())
-        self.progress_bar = HobProgressBar()
-        self.stop_button = HobAltButton("Stop")
-        self.stop_button.connect("clicked", self.stop_button_clicked_cb)
-        self.machine_separator = gtk.HSeparator()
-
-    def set_config_machine_layout(self, show_progress_bar = False):
-        self.gtable.attach(self.machine_title, 0, 40, 0, 4)
-        self.gtable.attach(self.machine_title_desc, 0, 40, 4, 6)
-        self.gtable.attach(self.machine_combo, 0, 12, 7, 10)
-        self.gtable.attach(self.layer_button, 14, 36, 7, 12)
-        self.gtable.attach(self.layer_info_icon, 36, 40, 7, 11)
-        if show_progress_bar:
-            #self.gtable.attach(self.progress_box, 0, 40, 15, 18)
-            self.gtable.attach(self.progress_bar, 0, 37, 15, 18)
-            self.gtable.attach(self.stop_button, 37, 40, 15, 18, 0, 0)
-        if self.builder.parsing_warnings:
-            self.warnings_bar = self.add_warnings_bar()
-            self.gtable.attach(self.warnings_bar, 0, 40, 14, 18)
-            self.warning_shift = 4
-        else:
-            self.warning_shift = 0
-        self.gtable.attach(self.machine_separator, 0, 40, 13, 14)
-
-    def create_config_baseimg(self):
-        self.image_title = gtk.Label()
-        self.image_title.set_alignment(0, 1.0)
-        mark = "<span %s>Select an image recipe</span>" % self.span_tag('x-large', 'bold')
-        self.image_title.set_markup(mark)
-
-        self.image_title_desc = gtk.Label()
-        self.image_title_desc.set_alignment(0, 0.5)
-
-        mark = ("<span %s>Image recipes are a starting point for the type of image you want. "
-                "You can build them as \n"
-                "they are or edit them to suit your needs.\n</span>") % self.span_tag('medium')
-        self.image_title_desc.set_markup(mark)
-
-        self.image_combo = gtk.combo_box_new_text()
-        self.image_combo.set_row_separator_func(self.combo_separator_func, None)
-        self.image_combo_id = self.image_combo.connect("changed", self.image_combo_changed_cb)
-
-        self.image_desc = gtk.Label()
-        self.image_desc.set_alignment(0.0, 0.5)
-        self.image_desc.set_size_request(256, -1)
-        self.image_desc.set_justify(gtk.JUSTIFY_LEFT)
-        self.image_desc.set_line_wrap(True)
-
-        # button to view recipes
-        icon_file = hic.ICON_RCIPE_DISPLAY_FILE
-        hover_file = hic.ICON_RCIPE_HOVER_FILE
-        self.view_adv_configuration_button = HobImageButton("Advanced configuration",
-                                                                 "Select image types, package formats, etc",
-                                                                 icon_file, hover_file)        
-        self.view_adv_configuration_button.connect("clicked", self.view_adv_configuration_button_clicked_cb)
-
-        self.image_separator = gtk.HSeparator()
-
-    def combo_separator_func(self, model, iter, user_data):
-        name = model.get_value(iter, 0)
-        if name == "--Separator--":
-            return True
-
-    def set_config_baseimg_layout(self):
-        self.gtable.attach(self.image_title, 0, 40, 15+self.warning_shift, 17+self.warning_shift)
-        self.gtable.attach(self.image_title_desc, 0, 40, 18+self.warning_shift, 22+self.warning_shift)
-        self.gtable.attach(self.image_combo, 0, 12, 23+self.warning_shift, 26+self.warning_shift)
-        self.gtable.attach(self.image_desc, 0, 12, 27+self.warning_shift, 33+self.warning_shift)
-        self.gtable.attach(self.view_adv_configuration_button, 14, 36, 23+self.warning_shift, 28+self.warning_shift)
-        self.gtable.attach(self.image_separator, 0, 40, 35+self.warning_shift, 36+self.warning_shift)
-
-    def create_config_build_button(self):
-        # Create the "Build packages" and "Build image" buttons at the bottom
-        button_box = gtk.HBox(False, 6)
-
-        # create button "Build image"
-        self.just_bake_button = HobButton("Build image")
-        self.just_bake_button.set_tooltip_text("Build the image recipe as it is")
-        self.just_bake_button.connect("clicked", self.just_bake_button_clicked_cb)
-        button_box.pack_end(self.just_bake_button, expand=False, fill=False)
-
-        # create button "Edit image recipe"
-        self.edit_image_button = HobAltButton("Edit image recipe")
-        self.edit_image_button.set_tooltip_text("Customize the recipes and packages to be included in your image")
-        self.edit_image_button.connect("clicked", self.edit_image_button_clicked_cb)
-        button_box.pack_end(self.edit_image_button, expand=False, fill=False)
-
-        return button_box
-
-    def stop_button_clicked_cb(self, button):
-        self.stopping = True
-        self.progress_bar.set_text("Stopping recipe parsing")
-        self.progress_bar.set_rcstyle("stop")
-        self.builder.cancel_parse_sync()
-
-    def view_warnings_button_clicked_cb(self, button):
-        self.builder.show_warning_dialog()
-
-    def machine_combo_changed_idle_cb(self):
-        self.builder.window.set_cursor(None)
-
-    def machine_combo_changed_cb(self, machine_combo):
-        self.stopping = False
-        self.builder.parsing_warnings = []
-        combo_item = machine_combo.get_active_text()
-        if not combo_item or combo_item == self.__dummy_machine__:
-            return
-
-        self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
-        self.builder.wait(0.1) #wait for combo and cursor to update
-
-        # remove __dummy_machine__ item from the store list after first user selection
-        # because it is no longer valid
-        combo_store = machine_combo.get_model()
-        if len(combo_store) and (combo_store[0][0] == self.__dummy_machine__):
-            machine_combo.remove_text(0)
-
-        self.builder.configuration.curr_mach = combo_item
-        if self.machine_combo_changed_by_manual:
-            self.builder.configuration.clear_selection()
-        # reset machine_combo_changed_by_manual
-        self.machine_combo_changed_by_manual = True
-
-        self.builder.configuration.selected_image = None
-
-        # Do reparse recipes
-        self.builder.populate_recipe_package_info_async()
-
-        glib.idle_add(self.machine_combo_changed_idle_cb)
-
-    def update_machine_combo(self):
-        self.disable_warnings_bar()
-        all_machines = [self.__dummy_machine__] + self.builder.parameters.all_machines
-
-        model = self.machine_combo.get_model()
-        model.clear()
-        for machine in all_machines:
-            self.machine_combo.append_text(machine)
-        self.machine_combo.set_active(0)
-
-    def switch_machine_combo(self):
-        self.disable_warnings_bar()
-        self.machine_combo_changed_by_manual = False
-        model = self.machine_combo.get_model()
-        active = 0
-        while active < len(model):
-            if model[active][0] == self.builder.configuration.curr_mach:
-                self.machine_combo.set_active(active)
-                return
-            active += 1
-
-        if model[0][0] != self.__dummy_machine__:
-            self.machine_combo.insert_text(0, self.__dummy_machine__)
-
-        self.machine_combo.set_active(0)
-
-    def update_image_desc(self):
-        desc = ""
-        selected_image = self.image_combo.get_active_text()
-        if selected_image and selected_image in self.builder.recipe_model.pn_path.keys():
-            image_path = self.builder.recipe_model.pn_path[selected_image]
-            image_iter = self.builder.recipe_model.get_iter(image_path)
-            desc = self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_DESC)
-
-        mark = ("<span %s>%s</span>\n") % (self.span_tag('small'), desc)
-        self.image_desc.set_markup(mark)
-
-    def image_combo_changed_idle_cb(self, selected_image, selected_recipes, selected_packages):
-        self.builder.update_recipe_model(selected_image, selected_recipes)
-        self.builder.update_package_model(selected_packages)
-        self.builder.window_sensitive(True)
-
-    def image_combo_changed_cb(self, combo):
-        self.builder.window_sensitive(False)
-        selected_image = self.image_combo.get_active_text()
-        if selected_image == self.__custom_image__:
-            topdir = self.builder.get_topdir()
-            images_dir = topdir + "/recipes/images/custom/"
-            self.builder.ensure_dir(images_dir)
-
-            dialog = RetrieveImageDialog(images_dir, "Select from my image recipes",
-                            self.builder, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)
-            response = dialog.run()
-            if response == gtk.RESPONSE_OK:
-                image_name = dialog.get_filename()
-                head, tail = os.path.split(image_name)
-                selected_image = os.path.splitext(tail)[0]
-                self.custom_image_selected = selected_image
-                self.update_image_combo(self.builder.recipe_model, selected_image)
-            else:
-                selected_image = self.__dummy_image__
-                self.update_image_combo(self.builder.recipe_model, None)
-            dialog.destroy()
-        else:
-            if self.custom_image_selected:
-                self.custom_image_selected = None
-                self.update_image_combo(self.builder.recipe_model, selected_image)
-
-        if not selected_image or (selected_image == self.__dummy_image__):
-            self.builder.window_sensitive(True)
-            self.just_bake_button.hide()
-            self.edit_image_button.hide()
-            return
-
-        # remove __dummy_image__ item from the store list after first user selection
-        # because it is no longer valid
-        combo_store = combo.get_model()
-        if len(combo_store) and (combo_store[0][0] == self.__dummy_image__):
-            combo.remove_text(0)
-
-        self.builder.customized = False
-
-        selected_recipes = []
-
-        image_path = self.builder.recipe_model.pn_path[selected_image]
-        image_iter = self.builder.recipe_model.get_iter(image_path)
-        selected_packages = self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_INSTALL).split()
-        self.update_image_desc()
-
-        self.builder.recipe_model.reset()
-        self.builder.package_model.reset()
-
-        self.show_baseimg_selected()
-
-        if selected_image == self.builder.recipe_model.__custom_image__:
-            self.just_bake_button.hide()
-
-        glib.idle_add(self.image_combo_changed_idle_cb, selected_image, selected_recipes, selected_packages)
-
-    def _image_combo_connect_signal(self):
-        if not self.image_combo_id:
-            self.image_combo_id = self.image_combo.connect("changed", self.image_combo_changed_cb)
-
-    def _image_combo_disconnect_signal(self):
-        if self.image_combo_id:
-            self.image_combo.disconnect(self.image_combo_id)
-            self.image_combo_id = None
-
-    def update_image_combo(self, recipe_model, selected_image):
-        # Update the image combo according to the images in the recipe_model
-        # populate image combo
-        filter = {RecipeListModel.COL_TYPE : ['image']}
-        image_model = recipe_model.tree_model(filter)
-        image_model.set_sort_column_id(recipe_model.COL_NAME, gtk.SORT_ASCENDING)
-        active = 0
-        cnt = 0
-
-        white_pattern = []
-        if self.builder.parameters.image_white_pattern:
-            for i in self.builder.parameters.image_white_pattern.split():
-                white_pattern.append(re.compile(i))
-
-        black_pattern = []
-        if self.builder.parameters.image_black_pattern:
-            for i in self.builder.parameters.image_black_pattern.split():
-                black_pattern.append(re.compile(i))
-        black_pattern.append(re.compile("hob-image"))
-        black_pattern.append(re.compile("edited(-[0-9]*)*.bb$"))
-
-        it = image_model.get_iter_first()
-        self._image_combo_disconnect_signal()
-        model = self.image_combo.get_model()
-        model.clear()
-        # Set a indicator text to combo store when first open
-        if not selected_image:
-            self.image_combo.append_text(self.__dummy_image__)
-            cnt = cnt + 1
-
-        self.image_combo.append_text(self.__custom_image__)
-        self.image_combo.append_text("--Separator--")
-        cnt = cnt + 2
-
-        topdir = self.builder.get_topdir()
-        # append and set active
-        while it:
-            path = image_model.get_path(it)
-            it = image_model.iter_next(it)
-            image_name = image_model[path][recipe_model.COL_NAME]
-            if image_name == self.builder.recipe_model.__custom_image__:
-                continue
-
-            if black_pattern:
-                allow = True
-                for pattern in black_pattern:
-                    if pattern.search(image_name):
-                        allow = False
-                        break
-            elif white_pattern:
-                allow = False
-                for pattern in white_pattern:
-                    if pattern.search(image_name):
-                        allow = True
-                        break
-            else:
-                allow = True
-
-            file_name = image_model[path][recipe_model.COL_FILE]
-            if file_name and topdir in file_name:
-                allow = False
-
-            if allow:
-                self.image_combo.append_text(image_name)
-                if image_name == selected_image:
-                    active = cnt
-                cnt = cnt + 1
-        self.image_combo.append_text(self.builder.recipe_model.__custom_image__)
-
-        if selected_image == self.builder.recipe_model.__custom_image__:
-            active = cnt
-
-        if self.custom_image_selected:
-            self.image_combo.append_text("--Separator--")
-            self.image_combo.append_text(self.custom_image_selected)
-            cnt = cnt + 2
-            if self.custom_image_selected == selected_image:
-                active = cnt
-
-        self.image_combo.set_active(active)
-
-        if active != 0:
-            self.show_baseimg_selected()
-
-        self._image_combo_connect_signal()
-
-    def layer_button_clicked_cb(self, button):
-        # Create a layer selection dialog
-        self.builder.show_layer_selection_dialog()
-
-    def view_adv_configuration_button_clicked_cb(self, button):
-        # Create an advanced settings dialog
-        response, settings_changed = self.builder.show_adv_settings_dialog()
-        if not response:
-            return
-        if settings_changed:
-            self.builder.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.WATCH))
-            self.builder.wait(0.1) #wait for adv_settings_dialog to terminate
-            self.builder.reparse_post_adv_settings()
-            self.builder.window.set_cursor(None)
-
-    def just_bake_button_clicked_cb(self, button):
-        self.builder.parsing_warnings = []
-        self.builder.just_bake()
-
-    def edit_image_button_clicked_cb(self, button):
-        self.builder.set_base_image()
-        self.builder.show_recipes()
-
-    def my_images_button_clicked_cb(self, button):
-        self.builder.show_load_my_images_dialog()
-
-    def settings_button_clicked_cb(self, button):
-        # Create an advanced settings dialog
-        response, settings_changed = self.builder.show_simple_settings_dialog()
-        if not response:
-            return
-        if settings_changed:
-            self.builder.reparse_post_adv_settings()
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/imagedetailspage.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
deleted file mode 100755
index 352e948..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/imagedetailspage.py
+++ /dev/null
@@ -1,669 +0,0 @@
-#!/usr/bin/env python
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2012        Intel Corporation
-#
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import gobject
-import gtk
-from bb.ui.crumbs.hobcolor import HobColors
-from bb.ui.crumbs.hobwidget import hic, HobViewTable, HobAltButton, HobButton
-from bb.ui.crumbs.hobpages import HobPage
-import subprocess
-from bb.ui.crumbs.hig.crumbsdialog import CrumbsDialog
-from bb.ui.crumbs.hig.saveimagedialog import SaveImageDialog
-
-#
-# ImageDetailsPage
-#
-class ImageDetailsPage (HobPage):
-
-    class DetailBox (gtk.EventBox):
-        def __init__(self, widget = None, varlist = None, vallist = None, icon = None, button = None, button2=None, color = HobColors.LIGHT_GRAY):
-            gtk.EventBox.__init__(self)
-
-            # set color
-            style = self.get_style().copy()
-            style.bg[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(color, False, False)
-            self.set_style(style)
-
-            self.row = gtk.Table(1, 2, False)
-            self.row.set_border_width(10)
-            self.add(self.row)
-        
-            total_rows = 0
-            if widget:
-                total_rows = 10
-            if varlist and vallist:
-                # pack the icon and the text on the left
-                total_rows += len(varlist)
-            self.table = gtk.Table(total_rows, 20, True)
-            self.table.set_row_spacings(6)
-            self.table.set_size_request(100, -1)
-            self.row.attach(self.table, 0, 1, 0, 1, xoptions=gtk.FILL|gtk.EXPAND, yoptions=gtk.FILL)
-            
-            colid = 0
-            rowid = 0
-            self.line_widgets = {}
-            if icon:
-                self.table.attach(icon, colid, colid + 2, 0, 1)
-                colid = colid + 2
-            if widget:
-                self.table.attach(widget, colid, 20, 0, 10)
-                rowid = 10
-            if varlist and vallist:
-                for row in range(rowid, total_rows):
-                    index = row - rowid
-                    self.line_widgets[varlist[index]] = self.text2label(varlist[index], vallist[index])
-                    self.table.attach(self.line_widgets[varlist[index]], colid, 20, row, row + 1)
-            # pack the button on the right
-            if button:
-                self.bbox = gtk.VBox()
-                self.bbox.pack_start(button, expand=True, fill=False)
-                if button2:
-                    self.bbox.pack_start(button2, expand=True, fill=False)
-                self.bbox.set_size_request(150,-1)
-                self.row.attach(self.bbox, 1, 2, 0, 1, xoptions=gtk.FILL, yoptions=gtk.EXPAND)
-                
-        def update_line_widgets(self, variable, value):
-            if len(self.line_widgets) == 0:
-                return
-            if not isinstance(self.line_widgets[variable], gtk.Label):
-                return
-            self.line_widgets[variable].set_markup(self.format_line(variable, value))
-
-        def wrap_line(self, inputs):
-            # wrap the long text of inputs
-            wrap_width_chars = 75
-            outputs = ""
-            tmps = inputs
-            less_chars = len(inputs)
-            while (less_chars - wrap_width_chars) > 0:
-                less_chars -= wrap_width_chars
-                outputs += tmps[:wrap_width_chars] + "\n               "
-                tmps = inputs[less_chars:]
-            outputs += tmps
-            return outputs
-
-        def format_line(self, variable, value):
-            wraped_value = self.wrap_line(value)
-            markup = "<span weight=\'bold\'>%s</span>" % variable
-            markup += "<span weight=\'normal\' foreground=\'#1c1c1c\' font_desc=\'14px\'>%s</span>" % wraped_value
-            return markup
-
-        def text2label(self, variable, value):
-            # append the name:value to the left box
-            # such as "Name: hob-core-minimal-variant-2011-12-15-beagleboard"
-            label = gtk.Label()
-            label.set_alignment(0.0, 0.5)
-            label.set_markup(self.format_line(variable, value))
-            return label
-
-    class BuildDetailBox (gtk.EventBox):
-        def __init__(self, varlist = None, vallist = None, icon = None, color = HobColors.LIGHT_GRAY):
-            gtk.EventBox.__init__(self)
-
-            # set color
-            style = self.get_style().copy()
-            style.bg[gtk.STATE_NORMAL] = self.get_colormap().alloc_color(color, False, False)
-            self.set_style(style)
-
-            self.hbox = gtk.HBox()
-            self.hbox.set_border_width(10)
-            self.add(self.hbox)
-
-            total_rows = 0
-            if varlist and vallist:
-                # pack the icon and the text on the left
-                total_rows += len(varlist)
-            self.table = gtk.Table(total_rows, 20, True)
-            self.table.set_row_spacings(6)
-            self.table.set_size_request(100, -1)
-            self.hbox.pack_start(self.table, expand=True, fill=True, padding=15)
-
-            colid = 0
-            rowid = 0
-            self.line_widgets = {}
-            if icon:
-                self.table.attach(icon, colid, colid + 2, 0, 1)
-                colid = colid + 2
-            if varlist and vallist:
-                for row in range(rowid, total_rows):
-                    index = row - rowid
-                    self.line_widgets[varlist[index]] = self.text2label(varlist[index], vallist[index])
-                    self.table.attach(self.line_widgets[varlist[index]], colid, 20, row, row + 1)
-                
-        def update_line_widgets(self, variable, value):
-            if len(self.line_widgets) == 0:
-                return
-            if not isinstance(self.line_widgets[variable], gtk.Label):
-                return
-            self.line_widgets[variable].set_markup(self.format_line(variable, value))
-
-        def wrap_line(self, inputs):
-            # wrap the long text of inputs
-            wrap_width_chars = 75
-            outputs = ""
-            tmps = inputs
-            less_chars = len(inputs)
-            while (less_chars - wrap_width_chars) > 0:
-                less_chars -= wrap_width_chars
-                outputs += tmps[:wrap_width_chars] + "\n               "
-                tmps = inputs[less_chars:]
-            outputs += tmps
-            return outputs
-
-        def format_line(self, variable, value):
-            wraped_value = self.wrap_line(value)
-            markup = "<span weight=\'bold\'>%s</span>" % variable
-            markup += "<span weight=\'normal\' foreground=\'#1c1c1c\' font_desc=\'14px\'>%s</span>" % wraped_value
-            return markup
-
-        def text2label(self, variable, value):
-            # append the name:value to the left box
-            # such as "Name: hob-core-minimal-variant-2011-12-15-beagleboard"
-            label = gtk.Label()
-            label.set_alignment(0.0, 0.5)
-            label.set_markup(self.format_line(variable, value))
-            return label
-
-    def __init__(self, builder):
-        super(ImageDetailsPage, self).__init__(builder, "Image details")
-
-        self.image_store = []
-        self.button_ids = {}
-        self.details_bottom_buttons = gtk.HBox(False, 6)
-        self.image_saved = False
-        self.create_visual_elements()
-        self.name_field_template = ""
-        self.description_field_template = ""
-
-    def create_visual_elements(self):
-        # create visual elements
-        # create the toolbar
-        self.toolbar = gtk.Toolbar()
-        self.toolbar.set_orientation(gtk.ORIENTATION_HORIZONTAL)
-        self.toolbar.set_style(gtk.TOOLBAR_BOTH)
-
-        my_images_button = self.append_toolbar_button(self.toolbar,
-            "Images",
-            hic.ICON_IMAGES_DISPLAY_FILE,
-            hic.ICON_IMAGES_HOVER_FILE,
-            "Open previously built images",
-            self.my_images_button_clicked_cb)
-        settings_button = self.append_toolbar_button(self.toolbar,
-            "Settings",
-            hic.ICON_SETTINGS_DISPLAY_FILE,
-            hic.ICON_SETTINGS_HOVER_FILE,
-            "View additional build settings",
-            self.settings_button_clicked_cb)
-
-        self.details_top_buttons = self.add_onto_top_bar(self.toolbar)
-
-    def _remove_all_widget(self):
-        children = self.get_children() or []
-        for child in children:
-            self.remove(child)
-        children = self.box_group_area.get_children() or []
-        for child in children:
-            self.box_group_area.remove(child)
-        children = self.details_bottom_buttons.get_children() or []
-        for child in children:
-            self.details_bottom_buttons.remove(child)
-
-    def show_page(self, step):
-        self.build_succeeded = (step == self.builder.IMAGE_GENERATED)
-        image_addr = self.builder.parameters.image_addr
-        image_names = self.builder.parameters.image_names
-        if self.build_succeeded:
-            machine = self.builder.configuration.curr_mach
-            base_image = self.builder.recipe_model.get_selected_image()
-            layers = self.builder.configuration.layers
-            pkg_num = "%s" % len(self.builder.package_model.get_selected_packages())
-            log_file = self.builder.current_logfile
-        else:
-            pkg_num = "N/A"
-            log_file = None
-
-        # remove
-        for button_id, button in self.button_ids.items():
-            button.disconnect(button_id)
-        self._remove_all_widget()
-
-        # repack
-        self.pack_start(self.details_top_buttons, expand=False, fill=False)
-        self.pack_start(self.group_align, expand=True, fill=True)
-
-        self.build_result = None
-        if self.image_saved or (self.build_succeeded and self.builder.current_step == self.builder.IMAGE_GENERATING):
-            # building is the previous step
-            icon = gtk.Image()
-            pixmap_path = hic.ICON_INDI_CONFIRM_FILE
-            color = HobColors.RUNNING
-            pix_buffer = gtk.gdk.pixbuf_new_from_file(pixmap_path)
-            icon.set_from_pixbuf(pix_buffer)
-            varlist = [""]
-            if self.image_saved:
-                vallist = ["Your image recipe has been saved"]
-            else:
-                vallist = ["Your image is ready"]
-            self.build_result = self.BuildDetailBox(varlist=varlist, vallist=vallist, icon=icon, color=color)
-            self.box_group_area.pack_start(self.build_result, expand=False, fill=False)
-
-        self.buttonlist = ["Build new image", "Save image recipe", "Run image", "Deploy image"]
-
-        # Name
-        self.image_store = []
-        self.toggled_image = ""
-        default_image_size = 0
-        self.num_toggled = 0
-        i = 0
-        for image_name in image_names:
-            image_size = HobPage._size_to_string(os.stat(os.path.join(image_addr, image_name)).st_size)
-
-            image_attr = ("run" if (self.test_type_runnable(image_name) and self.test_mach_runnable(image_name)) else \
-                          ("deploy" if self.test_deployable(image_name) else ""))
-            is_toggled = (image_attr != "")
-
-            if not self.toggled_image:
-                if i == (len(image_names) - 1):
-                    is_toggled = True
-                if is_toggled:
-                    default_image_size = image_size
-                    self.toggled_image = image_name
-
-            split_stuff = image_name.split('.')
-            if "rootfs" in split_stuff:
-                image_type = image_name[(len(split_stuff[0]) + len(".rootfs") + 1):]
-            else:
-                image_type = image_name[(len(split_stuff[0]) + 1):]
-
-            self.image_store.append({'name': image_name,
-                                    'type': image_type,
-                                    'size': image_size,
-                                    'is_toggled': is_toggled,
-                                    'action_attr': image_attr,})
-
-            i = i + 1
-            self.num_toggled += is_toggled
-
-        is_runnable = self.create_bottom_buttons(self.buttonlist, self.toggled_image)
-
-        # Generated image files info
-        varlist = ["Name: ", "Files created: ", "Directory: "]
-        vallist = []
-
-        vallist.append(image_name.split('.')[0])
-        vallist.append(',  '.join(fileitem['type'] for fileitem in self.image_store))
-        vallist.append(image_addr)
-
-        view_files_button = HobAltButton("View files")
-        view_files_button.connect("clicked", self.view_files_clicked_cb, image_addr)
-        view_files_button.set_tooltip_text("Open the directory containing the image files")
-        open_log_button = None
-        if log_file:
-            open_log_button = HobAltButton("Open log")
-            open_log_button.connect("clicked", self.open_log_clicked_cb, log_file)
-            open_log_button.set_tooltip_text("Open the build's log file")
-        self.image_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=view_files_button, button2=open_log_button)
-        self.box_group_area.pack_start(self.image_detail, expand=False, fill=True)
-
-        # The default kernel box for the qemu images
-        self.sel_kernel = ""
-        self.kernel_detail = None
-        if 'qemu' in image_name:
-            self.sel_kernel = self.get_kernel_file_name()
-
-        #    varlist = ["Kernel: "]
-        #    vallist = []
-        #    vallist.append(self.sel_kernel)
-
-        #    change_kernel_button = HobAltButton("Change")
-        #    change_kernel_button.connect("clicked", self.change_kernel_cb)
-        #    change_kernel_button.set_tooltip_text("Change qemu kernel file")
-        #    self.kernel_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=change_kernel_button)
-        #    self.box_group_area.pack_start(self.kernel_detail, expand=True, fill=True)
-
-        # Machine, Image recipe and Layers
-        layer_num_limit = 15
-        varlist = ["Machine: ", "Image recipe: ", "Layers: "]
-        vallist = []
-        self.setting_detail = None
-        if self.build_succeeded:
-            vallist.append(machine)
-            if self.builder.recipe_model.is_custom_image():
-                if self.builder.configuration.initial_selected_image == self.builder.recipe_model.__custom_image__:
-                    base_image ="New image recipe"
-                else:
-                    base_image = self.builder.configuration.initial_selected_image + " (edited)"
-            vallist.append(base_image)
-            i = 0
-            for layer in layers:
-                if i > layer_num_limit:
-                    break
-                varlist.append(" - ")
-                i += 1
-            vallist.append("")
-            i = 0
-            for layer in layers:
-                if i > layer_num_limit:
-                    break
-                elif i == layer_num_limit:
-                    vallist.append("and more...")
-                else:
-                    vallist.append(layer)
-                i += 1
-
-            edit_config_button = HobAltButton("Edit configuration")
-            edit_config_button.set_tooltip_text("Edit machine and image recipe")
-            edit_config_button.connect("clicked", self.edit_config_button_clicked_cb)
-            self.setting_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=edit_config_button)
-            self.box_group_area.pack_start(self.setting_detail, expand=True, fill=True)
-
-        # Packages included, and Total image size
-        varlist = ["Packages included: ", "Total image size: "]
-        vallist = []
-        vallist.append(pkg_num)
-        vallist.append(default_image_size)
-        self.builder.configuration.image_size = default_image_size
-        self.builder.configuration.image_packages = self.builder.configuration.selected_packages
-        if self.build_succeeded:
-            edit_packages_button = HobAltButton("Edit packages")
-            edit_packages_button.set_tooltip_text("Edit the packages included in your image")
-            edit_packages_button.connect("clicked", self.edit_packages_button_clicked_cb)
-        else: # get to this page from "My images"
-            edit_packages_button = None
-        self.package_detail = self.DetailBox(varlist=varlist, vallist=vallist, button=edit_packages_button)
-        self.box_group_area.pack_start(self.package_detail, expand=True, fill=True)
-
-        # pack the buttons at the bottom, at this time they are already created.
-        if self.build_succeeded:
-            self.box_group_area.pack_end(self.details_bottom_buttons, expand=False, fill=False)
-        else: # for "My images" page
-            self.details_separator = gtk.HSeparator()
-            self.box_group_area.pack_start(self.details_separator, expand=False, fill=False)
-            self.box_group_area.pack_start(self.details_bottom_buttons, expand=False, fill=False)
-
-        self.show_all()
-        if self.kernel_detail and (not is_runnable):
-            self.kernel_detail.hide()
-        self.image_saved = False
-
-    def view_files_clicked_cb(self, button, image_addr):
-        subprocess.call("xdg-open /%s" % image_addr, shell=True)
-
-    def open_log_clicked_cb(self, button, log_file):
-        if log_file:
-            log_file = "file:///" + log_file
-            gtk.show_uri(screen=button.get_screen(), uri=log_file, timestamp=0)
-
-    def refresh_package_detail_box(self, image_size):
-        self.package_detail.update_line_widgets("Total image size: ", image_size)
-
-    def test_type_runnable(self, image_name):
-        type_runnable = False
-        for t in self.builder.parameters.runnable_image_types:
-            if image_name.endswith(t):
-                type_runnable = True
-                break
-        return type_runnable
-
-    def test_mach_runnable(self, image_name):
-        mach_runnable = False
-        for t in self.builder.parameters.runnable_machine_patterns:
-            if t in image_name:
-                mach_runnable = True
-                break
-        return mach_runnable
-
-    def test_deployable(self, image_name):
-        if self.builder.configuration.curr_mach.startswith("qemu"):
-            return False
-        deployable = False
-        for t in self.builder.parameters.deployable_image_types:
-            if image_name.endswith(t):
-                deployable = True
-                break
-        return deployable
-
-    def get_kernel_file_name(self, kernel_addr=""):
-        kernel_name = ""
-
-        if not kernel_addr:
-            kernel_addr = self.builder.parameters.image_addr
-
-        files = [f for f in os.listdir(kernel_addr) if f[0] <> '.']
-        for check_file in files:
-            if check_file.endswith(".bin"):
-                name_splits = check_file.split(".")[0]
-                if self.builder.parameters.kernel_image_type in name_splits.split("-"):
-                    kernel_name = check_file
-                    break
-
-        return kernel_name
-
-    def show_builded_images_dialog(self, widget, primary_action=""):
-        title = primary_action if primary_action else "Your builded images"
-        dialog = CrumbsDialog(title, self.builder,
-                              gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)
-        dialog.set_border_width(12)
-
-        label = gtk.Label()
-        label.set_use_markup(True)
-        label.set_alignment(0.0, 0.5)
-        label.set_padding(12,0)
-        if primary_action == "Run image":
-            label.set_markup("<span font_desc='12'>Select the image file you want to run:</span>")
-        elif primary_action == "Deploy image":
-            label.set_markup("<span font_desc='12'>Select the image file you want to deploy:</span>")
-        else:
-            label.set_markup("<span font_desc='12'>Select the image file you want to %s</span>" % primary_action)
-        dialog.vbox.pack_start(label, expand=False, fill=False)
-
-        # filter created images as action attribution (deploy or run)
-        action_attr = ""
-        action_images = []
-        for fileitem in self.image_store:
-            action_attr = fileitem['action_attr']
-            if  (action_attr == 'run' and primary_action == "Run image") \
-             or (action_attr == 'deploy' and primary_action == "Deploy image"):
-                action_images.append(fileitem)
-
-        # pack the corresponding 'runnable' or 'deploy' radio_buttons, if there has no more than one file.
-        # assume that there does not both have 'deploy' and 'runnable' files in the same building result
-        # in possible as design.
-        curr_row = 0
-        rows = (len(action_images)) if len(action_images) < 10 else 10
-        table = gtk.Table(rows, 10, True)
-        table.set_row_spacings(6)
-        table.set_col_spacing(0, 12)
-        table.set_col_spacing(5, 12)
-
-        sel_parent_btn = None
-        for fileitem in action_images:
-            sel_btn = gtk.RadioButton(sel_parent_btn, fileitem['type'])
-            sel_parent_btn = sel_btn if not sel_parent_btn else sel_parent_btn
-            sel_btn.set_active(fileitem['is_toggled'])
-            sel_btn.connect('toggled', self.table_selected_cb, fileitem)
-            if curr_row < 10:
-                table.attach(sel_btn, 0, 4, curr_row, curr_row + 1, xpadding=24)
-            else:
-                table.attach(sel_btn, 5, 9, curr_row - 10, curr_row - 9, xpadding=24)
-            curr_row += 1
-
-        dialog.vbox.pack_start(table, expand=False, fill=False, padding=6)
-
-        button = dialog.add_button("Cancel", gtk.RESPONSE_CANCEL)
-        HobAltButton.style_button(button)
-
-        if primary_action:
-            button = dialog.add_button(primary_action, gtk.RESPONSE_YES)
-            HobButton.style_button(button)
-
-        dialog.show_all()
-
-        response = dialog.run()
-        dialog.destroy()
-
-        if response != gtk.RESPONSE_YES:
-            return
-
-        for fileitem in self.image_store:
-            if fileitem['is_toggled']:
-                if fileitem['action_attr'] == 'run':
-                    self.builder.runqemu_image(fileitem['name'], self.sel_kernel)
-                elif fileitem['action_attr'] == 'deploy':
-                    self.builder.deploy_image(fileitem['name'])
-
-    def table_selected_cb(self, tbutton, image):
-        image['is_toggled'] = tbutton.get_active()
-        if image['is_toggled']:
-            self.toggled_image = image['name']
-
-    def change_kernel_cb(self, widget):
-        kernel_path = self.builder.show_load_kernel_dialog()
-        if kernel_path and self.kernel_detail:
-            import os.path
-            self.sel_kernel = os.path.basename(kernel_path)
-            markup = self.kernel_detail.format_line("Kernel: ", self.sel_kernel)
-            label = ((self.kernel_detail.get_children()[0]).get_children()[0]).get_children()[0]
-            label.set_markup(markup)
-
-    def create_bottom_buttons(self, buttonlist, image_name):
-        # Create the buttons at the bottom
-        created = False
-        packed = False
-        self.button_ids = {}
-        is_runnable = False
-
-        # create button "Deploy image"
-        name = "Deploy image"
-        if name in buttonlist and self.test_deployable(image_name):
-            deploy_button = HobButton('Deploy image')
-            #deploy_button.set_size_request(205, 49)
-            deploy_button.set_tooltip_text("Burn a live image to a USB drive or flash memory")
-            deploy_button.set_flags(gtk.CAN_DEFAULT)
-            button_id = deploy_button.connect("clicked", self.deploy_button_clicked_cb)
-            self.button_ids[button_id] = deploy_button
-            self.details_bottom_buttons.pack_end(deploy_button, expand=False, fill=False)
-            created = True
-            packed = True
-
-        name = "Run image"
-        if name in buttonlist and self.test_type_runnable(image_name) and self.test_mach_runnable(image_name):
-            if created == True:
-                # separator
-                #label = gtk.Label(" or ")
-                #self.details_bottom_buttons.pack_end(label, expand=False, fill=False)
-
-                # create button "Run image"
-                run_button = HobAltButton("Run image")
-            else:
-                # create button "Run image" as the primary button
-                run_button = HobButton("Run image")
-                #run_button.set_size_request(205, 49)
-                run_button.set_flags(gtk.CAN_DEFAULT)
-                packed = True
-            run_button.set_tooltip_text("Start up an image with qemu emulator")
-            button_id = run_button.connect("clicked", self.run_button_clicked_cb)
-            self.button_ids[button_id] = run_button
-            self.details_bottom_buttons.pack_end(run_button, expand=False, fill=False)
-            created = True
-            is_runnable = True
-
-        name = "Save image recipe"
-        if name in buttonlist and self.builder.recipe_model.is_custom_image():
-            save_button = HobAltButton("Save image recipe")
-            save_button.set_tooltip_text("Keep your changes saving them as an image recipe")
-            save_button.set_sensitive(not self.image_saved)
-            button_id = save_button.connect("clicked", self.save_button_clicked_cb)
-            self.button_ids[button_id] = save_button
-            self.details_bottom_buttons.pack_end(save_button, expand=False, fill=False)
-
-        name = "Build new image"
-        if name in buttonlist:
-            # create button "Build new image"
-            if packed:
-                build_new_button = HobAltButton("Build new image")
-            else:
-                build_new_button = HobButton("Build new image")
-                build_new_button.set_flags(gtk.CAN_DEFAULT)
-            #build_new_button.set_size_request(205, 49)
-            self.details_bottom_buttons.pack_end(build_new_button, expand=False, fill=False)
-            build_new_button.set_tooltip_text("Create a new image from scratch")
-            button_id = build_new_button.connect("clicked", self.build_new_button_clicked_cb)
-            self.button_ids[button_id] = build_new_button
-
-        return is_runnable
-
-    def deploy_button_clicked_cb(self, button):
-        if self.toggled_image:
-            if self.num_toggled > 1:
-                self.set_sensitive(False)
-                self.show_builded_images_dialog(None, "Deploy image")
-                self.set_sensitive(True)
-            else:
-                self.builder.deploy_image(self.toggled_image)
-
-    def run_button_clicked_cb(self, button):
-        if self.toggled_image:
-            if self.num_toggled > 1:
-                self.set_sensitive(False)
-                self.show_builded_images_dialog(None, "Run image")
-                self.set_sensitive(True)
-            else:
-                self.builder.runqemu_image(self.toggled_image, self.sel_kernel)
-
-    def save_button_clicked_cb(self, button):
-        topdir = self.builder.get_topdir()
-        images_dir = topdir + "/recipes/images/custom/"
-        self.builder.ensure_dir(images_dir)
-
-        self.name_field_template = self.builder.image_configuration_page.custom_image_selected
-        if self.name_field_template:
-            image_path = self.builder.recipe_model.pn_path[self.name_field_template]
-            image_iter = self.builder.recipe_model.get_iter(image_path)
-            self.description_field_template = self.builder.recipe_model.get_value(image_iter, self.builder.recipe_model.COL_DESC)
-        else:
-            self.name_field_template = ""
-
-        dialog = SaveImageDialog(images_dir, self.name_field_template, self.description_field_template,
-                 "Save image recipe", self.builder, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)
-        response = dialog.run()
-        dialog.destroy()
-
-    def build_new_button_clicked_cb(self, button):
-        self.builder.initiate_new_build_async()
-
-    def edit_config_button_clicked_cb(self, button):
-        self.builder.show_configuration()
-
-    def edit_packages_button_clicked_cb(self, button):
-        self.builder.show_packages()
-
-    def my_images_button_clicked_cb(self, button):
-        self.builder.show_load_my_images_dialog()
-
-    def settings_button_clicked_cb(self, button):
-        # Create an advanced settings dialog
-        response, settings_changed = self.builder.show_simple_settings_dialog()
-        if not response:
-            return
-        if settings_changed:
-            self.builder.reparse_post_adv_settings()
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/packageselectionpage.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
deleted file mode 100755
index 7c62b36..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/packageselectionpage.py
+++ /dev/null
@@ -1,355 +0,0 @@
-#!/usr/bin/env python
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2012        Intel Corporation
-#
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import gtk
-import glib
-from bb.ui.crumbs.hobcolor import HobColors
-from bb.ui.crumbs.hobwidget import HobViewTable, HobNotebook, HobAltButton, HobButton
-from bb.ui.crumbs.hoblistmodel import PackageListModel
-from bb.ui.crumbs.hobpages import HobPage
-
-#
-# PackageSelectionPage
-#
-class PackageSelectionPage (HobPage):
-
-    pages = [
-        {
-         'name'      : 'Included packages',
-         'tooltip'   : 'The packages currently included for your image',
-         'filter'    : { PackageListModel.COL_INC : [True] },
-         'search'    : 'Search packages by name',
-         'searchtip' : 'Enter a package name to find it',
-         'columns'   : [{
-                       'col_name' : 'Package name',
-                       'col_id'   : PackageListModel.COL_NAME,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 300,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Size',
-                       'col_id'   : PackageListModel.COL_SIZE,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 300,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Recipe',
-                       'col_id'   : PackageListModel.COL_RCP,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 250,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Brought in by (+others)',
-                       'col_id'   : PackageListModel.COL_BINB,
-                       'col_style': 'binb',
-                       'col_min'  : 100,
-                       'col_max'  : 350,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Included',
-                       'col_id'   : PackageListModel.COL_INC,
-                       'col_style': 'check toggle',
-                       'col_min'  : 100,
-                       'col_max'  : 100
-                     }]
-        }, {
-         'name'      : 'All packages',
-         'tooltip'   : 'All packages that have been built',
-         'filter'    : {},
-         'search'    : 'Search packages by name',
-         'searchtip' : 'Enter a package name to find it',
-         'columns'   : [{
-                       'col_name' : 'Package name',
-                       'col_id'   : PackageListModel.COL_NAME,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 400,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Size',
-                       'col_id'   : PackageListModel.COL_SIZE,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 500,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Recipe',
-                       'col_id'   : PackageListModel.COL_RCP,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 250,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Included',
-                       'col_id'   : PackageListModel.COL_INC,
-                       'col_style': 'check toggle',
-                       'col_min'  : 100,
-                       'col_max'  : 100
-                      }]
-        }
-    ]
-    
-    (INCLUDED,
-     ALL) = range(2)
-
-    def __init__(self, builder):
-        super(PackageSelectionPage, self).__init__(builder, "Edit packages")
-
-        # set invisible members
-        self.recipe_model = self.builder.recipe_model
-        self.package_model = self.builder.package_model
-
-        # create visual elements
-        self.create_visual_elements()
-
-    def included_clicked_cb(self, button):
-        self.ins.set_current_page(self.INCLUDED)
-
-    def create_visual_elements(self):
-        self.label = gtk.Label("Packages included: 0\nSelected packages size: 0 MB")
-        self.eventbox = self.add_onto_top_bar(self.label, 73)
-        self.pack_start(self.eventbox, expand=False, fill=False)
-        self.pack_start(self.group_align, expand=True, fill=True)
-
-        # set visible members
-        self.ins = HobNotebook()
-        self.tables = [] # we need to modify table when the dialog is shown
-
-        search_names = []
-        search_tips = []
-        # append the tab
-        for page in self.pages:
-            columns = page['columns']
-            name = page['name']
-            tab = HobViewTable(columns, name)
-            search_names.append(page['search'])
-            search_tips.append(page['searchtip'])
-            filter = page['filter']
-            sort_model = self.package_model.tree_model(filter, initial=True)
-            tab.set_model(sort_model)
-            tab.connect("toggled", self.table_toggled_cb, name)
-            tab.connect("button-release-event", self.button_click_cb)
-            tab.connect("cell-fadeinout-stopped", self.after_fadeout_checkin_include, filter)
-            self.ins.append_page(tab, page['name'], page['tooltip'])
-            self.tables.append(tab)
-
-        self.ins.set_entry(search_names, search_tips)
-        self.ins.search.connect("changed", self.search_entry_changed)
-
-        # add all into the dialog
-        self.box_group_area.pack_start(self.ins, expand=True, fill=True)
-
-        self.button_box = gtk.HBox(False, 6)
-        self.box_group_area.pack_start(self.button_box, expand=False, fill=False)
-
-        self.build_image_button = HobButton('Build image')
-        #self.build_image_button.set_size_request(205, 49)
-        self.build_image_button.set_tooltip_text("Build target image")
-        self.build_image_button.set_flags(gtk.CAN_DEFAULT)
-        self.build_image_button.grab_default()
-        self.build_image_button.connect("clicked", self.build_image_clicked_cb)
-        self.button_box.pack_end(self.build_image_button, expand=False, fill=False)
-
-        self.back_button = HobAltButton('Cancel')
-        self.back_button.connect("clicked", self.back_button_clicked_cb)
-        self.button_box.pack_end(self.back_button, expand=False, fill=False)
-
-    def search_entry_changed(self, entry):
-        text = entry.get_text()
-        if self.ins.search_focus:
-            self.ins.search_focus = False
-        elif self.ins.page_changed:
-            self.ins.page_change = False
-            self.filter_search(entry)
-        elif text not in self.ins.search_names:
-            self.filter_search(entry)
-
-    def filter_search(self, entry):
-        text = entry.get_text()
-        current_tab = self.ins.get_current_page()
-        filter = self.pages[current_tab]['filter']
-        filter[PackageListModel.COL_NAME] = text
-        self.tables[current_tab].set_model(self.package_model.tree_model(filter, search_data=text))
-        if self.package_model.filtered_nb == 0:
-            if not self.ins.get_nth_page(current_tab).top_bar:
-                self.ins.get_nth_page(current_tab).add_no_result_bar(entry)
-                self.ins.get_nth_page(current_tab).top_bar.set_no_show_all(True)
-            self.ins.get_nth_page(current_tab).top_bar.show()
-            self.ins.get_nth_page(current_tab).scroll.hide()
-        else:
-            if self.ins.get_nth_page(current_tab).top_bar:
-                self.ins.get_nth_page(current_tab).top_bar.hide()
-            self.ins.get_nth_page(current_tab).scroll.show()
-        if entry.get_text() == '':
-            entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY, False)
-        else:
-            entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY, True)
-
-    def button_click_cb(self, widget, event):
-        path, col = widget.table_tree.get_cursor()
-        tree_model = widget.table_tree.get_model()
-        if path and col.get_title() != 'Included': # else activation is likely a removal
-            properties = {'binb': '' , 'name': '', 'size':'', 'recipe':'', 'files_list':''}
-            properties['binb'] = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_BINB)
-            properties['name'] = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_NAME)
-            properties['size'] = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_SIZE)
-            properties['recipe'] = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_RCP)
-            properties['files_list'] = tree_model.get_value(tree_model.get_iter(path), PackageListModel.COL_FLIST)
-
-            self.builder.show_recipe_property_dialog(properties)
-
-    def open_log_clicked_cb(self, button, log_file):
-        if log_file:
-            log_file = "file:///" + log_file
-            gtk.show_uri(screen=button.get_screen(), uri=log_file, timestamp=0)
-
-    def show_page(self, log_file):
-        children = self.button_box.get_children() or []
-        for child in children:
-            self.button_box.remove(child)
-        # re-packed the buttons as request, add the 'open log' button if build success
-        self.button_box.pack_end(self.build_image_button, expand=False, fill=False)
-        if log_file:
-            open_log_button = HobAltButton("Open log")
-            open_log_button.connect("clicked", self.open_log_clicked_cb, log_file)
-            open_log_button.set_tooltip_text("Open the build's log file")
-            self.button_box.pack_end(open_log_button, expand=False, fill=False)
-        self.button_box.pack_end(self.back_button, expand=False, fill=False)
-        self.show_all()
-
-    def build_image_clicked_cb(self, button):
-        self.builder.parsing_warnings = []
-        self.builder.build_image()
-
-    def refresh_tables(self):
-        self.ins.reset_entry(self.ins.search, 0)
-        for tab in self.tables:
-            index = self.tables.index(tab)
-            filter = self.pages[index]['filter']
-            tab.set_model(self.package_model.tree_model(filter, initial=True))
-
-    def back_button_clicked_cb(self, button):
-        if self.builder.previous_step ==  self.builder.IMAGE_GENERATED:
-            self.builder.restore_initial_selected_packages()
-            self.refresh_selection()
-            self.builder.show_image_details()
-        else:
-            self.builder.show_configuration()
-        self.refresh_tables()
-
-    def refresh_selection(self):
-        self.builder.configuration.selected_packages = self.package_model.get_selected_packages()
-        self.builder.configuration.user_selected_packages = self.package_model.get_user_selected_packages()
-        selected_packages_num = len(self.builder.configuration.selected_packages)
-        selected_packages_size = self.package_model.get_packages_size()
-        selected_packages_size_str = HobPage._size_to_string(selected_packages_size)
-
-        if self.builder.configuration.image_packages == self.builder.configuration.selected_packages:
-            image_total_size_str = self.builder.configuration.image_size
-        else:
-            image_overhead_factor = self.builder.configuration.image_overhead_factor
-            image_rootfs_size = self.builder.configuration.image_rootfs_size / 1024 # image_rootfs_size is KB
-            image_extra_size = self.builder.configuration.image_extra_size / 1024 # image_extra_size is KB
-            base_size = image_overhead_factor * selected_packages_size
-            image_total_size = max(base_size, image_rootfs_size) + image_extra_size
-            if "zypper" in self.builder.configuration.selected_packages:
-                image_total_size += (51200 * 1024)
-            image_total_size_str = HobPage._size_to_string(image_total_size)
-
-        self.label.set_label("Packages included: %s\nSelected packages size: %s\nEstimated image size: %s" %
-                            (selected_packages_num, selected_packages_size_str, image_total_size_str))
-        self.ins.show_indicator_icon("Included packages", selected_packages_num)
-
-    def toggle_item_idle_cb(self, path, view_tree, cell, pagename):
-        if not self.package_model.path_included(path):
-            self.package_model.include_item(item_path=path, binb="User Selected")
-        else:
-            self.pre_fadeout_checkout_include(view_tree)
-            self.package_model.exclude_item(item_path=path)
-            self.render_fadeout(view_tree, cell)
-
-        self.refresh_selection()
-        if not self.builder.customized:
-            self.builder.customized = True
-            self.builder.set_base_image()
-            self.builder.configuration.selected_image = self.recipe_model.__custom_image__
-            self.builder.rcppkglist_populated()
-
-        self.builder.window_sensitive(True)
-        view_model = view_tree.get_model()
-        vpath = self.package_model.convert_path_to_vpath(view_model, path)
-        view_tree.set_cursor(vpath)
-
-    def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree, pagename):
-        # Click to include a package
-        self.builder.window_sensitive(False)
-        view_model = view_tree.get_model()
-        path = self.package_model.convert_vpath_to_path(view_model, view_path)
-        glib.idle_add(self.toggle_item_idle_cb, path, view_tree, cell, pagename)
-
-    def pre_fadeout_checkout_include(self, tree):
-        #after the fadeout the table will be sorted as before
-        self.sort_column_id = self.package_model.sort_column_id
-        self.sort_order = self.package_model.sort_order
-
-        self.package_model.resync_fadeout_column(self.package_model.get_iter_first())
-        # Check out a model which base on the column COL_FADE_INC,
-        # it's save the prev state of column COL_INC before do exclude_item
-        filter = { PackageListModel.COL_FADE_INC  : [True]}
-        new_model = self.package_model.tree_model(filter, excluded_items_ahead=True)
-        tree.set_model(new_model)
-        tree.expand_all()
-
-    def get_excluded_rows(self, to_render_cells, model, it):
-        while it:
-            path = model.get_path(it)
-            prev_cell_is_active = model.get_value(it, PackageListModel.COL_FADE_INC)
-            curr_cell_is_active = model.get_value(it, PackageListModel.COL_INC)
-            if (prev_cell_is_active == True) and (curr_cell_is_active == False):
-                to_render_cells.append(path)
-            if model.iter_has_child(it):
-                self.get_excluded_rows(to_render_cells, model, model.iter_children(it))
-            it = model.iter_next(it)
-
-        return to_render_cells
-
-    def render_fadeout(self, tree, cell):
-        if (not cell) or (not tree):
-            return
-        to_render_cells = []
-        view_model = tree.get_model()
-        self.get_excluded_rows(to_render_cells, view_model, view_model.get_iter_first())
-
-        cell.fadeout(tree, 1000, to_render_cells)
-
-    def after_fadeout_checkin_include(self, table, ctrl, cell, tree, filter):
-        self.package_model.sort_column_id = self.sort_column_id
-        self.package_model.sort_order = self.sort_order
-        tree.set_model(self.package_model.tree_model(filter))
-        tree.expand_all()
-
-    def set_packages_curr_tab(self, curr_page):
-        self.ins.set_current_page(curr_page)
-
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
deleted file mode 100755
index 58db43f..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/recipeselectionpage.py
+++ /dev/null
@@ -1,335 +0,0 @@
-#!/usr/bin/env python
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2012        Intel Corporation
-#
-# Authored by Dongxiao Xu <dongxiao.xu@intel.com>
-# Authored by Shane Wang <shane.wang@intel.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.
-
-import gtk
-import glib
-from bb.ui.crumbs.hobcolor import HobColors
-from bb.ui.crumbs.hobwidget import HobViewTable, HobNotebook, HobAltButton, HobButton
-from bb.ui.crumbs.hoblistmodel import RecipeListModel
-from bb.ui.crumbs.hobpages import HobPage
-
-#
-# RecipeSelectionPage
-#
-class RecipeSelectionPage (HobPage):
-    pages = [
-        {
-         'name'      : 'Included recipes',
-         'tooltip'   : 'The recipes currently included for your image',
-         'filter'    : { RecipeListModel.COL_INC  : [True],
-                       RecipeListModel.COL_TYPE : ['recipe', 'packagegroup'] },
-         'search'    : 'Search recipes by name',
-         'searchtip' : 'Enter a recipe name to find it',
-         'columns'   : [{
-                       'col_name' : 'Recipe name',
-                       'col_id'   : RecipeListModel.COL_NAME,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 400,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Group',
-                       'col_id'   : RecipeListModel.COL_GROUP,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 300,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Brought in by (+others)',
-                       'col_id'   : RecipeListModel.COL_BINB,
-                       'col_style': 'binb',
-                       'col_min'  : 100,
-                       'col_max'  : 500,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Included',
-                       'col_id'   : RecipeListModel.COL_INC,
-                       'col_style': 'check toggle',
-                       'col_min'  : 100,
-                       'col_max'  : 100
-                      }]
-        }, {
-         'name'      : 'All recipes',
-         'tooltip'   : 'All recipes in your configured layers',
-         'filter'    : { RecipeListModel.COL_TYPE : ['recipe'] },
-         'search'    : 'Search recipes by name',
-         'searchtip' : 'Enter a recipe name to find it',
-         'columns'   : [{
-                       'col_name' : 'Recipe name',
-                       'col_id'   : RecipeListModel.COL_NAME,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 400,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Group',
-                       'col_id'   : RecipeListModel.COL_GROUP,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 400,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'License',
-                       'col_id'   : RecipeListModel.COL_LIC,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 400,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Included',
-                       'col_id'   : RecipeListModel.COL_INC,
-                       'col_style': 'check toggle',
-                       'col_min'  : 100,
-                       'col_max'  : 100
-                      }]
-        }, {
-         'name'      : 'Package Groups',
-         'tooltip'   : 'All package groups in your configured layers',
-         'filter'    : { RecipeListModel.COL_TYPE : ['packagegroup'] },
-         'search'    : 'Search package groups by name',
-         'searchtip' : 'Enter a package group name to find it',
-         'columns'   : [{
-                       'col_name' : 'Package group name',
-                       'col_id'   : RecipeListModel.COL_NAME,
-                       'col_style': 'text',
-                       'col_min'  : 100,
-                       'col_max'  : 400,
-                       'expand'   : 'True'
-                      }, {
-                       'col_name' : 'Included',
-                       'col_id'   : RecipeListModel.COL_INC,
-                       'col_style': 'check toggle',
-                       'col_min'  : 100,
-                       'col_max'  : 100
-                      }]
-        }
-    ]
-    
-    (INCLUDED,
-     ALL,
-     TASKS) = range(3)
-
-    def __init__(self, builder = None):
-        super(RecipeSelectionPage, self).__init__(builder, "Step 1 of 2: Edit recipes")
-
-        # set invisible members
-        self.recipe_model = self.builder.recipe_model
-
-        # create visual elements
-        self.create_visual_elements()
-
-    def included_clicked_cb(self, button):
-        self.ins.set_current_page(self.INCLUDED)
-
-    def create_visual_elements(self):
-        self.eventbox = self.add_onto_top_bar(None, 73)
-        self.pack_start(self.eventbox, expand=False, fill=False)
-        self.pack_start(self.group_align, expand=True, fill=True)
-
-        # set visible members
-        self.ins = HobNotebook()
-        self.tables = [] # we need modify table when the dialog is shown
-
-        search_names = []
-        search_tips = []
-        # append the tabs in order
-        for page in self.pages:
-            columns = page['columns']
-            name = page['name']
-            tab = HobViewTable(columns, name)
-            search_names.append(page['search'])
-            search_tips.append(page['searchtip'])
-            filter = page['filter']
-            sort_model = self.recipe_model.tree_model(filter, initial=True)
-            tab.set_model(sort_model)
-            tab.connect("toggled", self.table_toggled_cb, name)
-            tab.connect("button-release-event", self.button_click_cb)
-            tab.connect("cell-fadeinout-stopped", self.after_fadeout_checkin_include, filter)
-            self.ins.append_page(tab, page['name'], page['tooltip'])
-            self.tables.append(tab)
-
-        self.ins.set_entry(search_names, search_tips)
-        self.ins.search.connect("changed", self.search_entry_changed)
-
-        # add all into the window
-        self.box_group_area.pack_start(self.ins, expand=True, fill=True)
-
-        button_box = gtk.HBox(False, 6)
-        self.box_group_area.pack_end(button_box, expand=False, fill=False)
-
-        self.build_packages_button = HobButton('Build packages')
-        #self.build_packages_button.set_size_request(205, 49)
-        self.build_packages_button.set_tooltip_text("Build selected recipes into packages")
-        self.build_packages_button.set_flags(gtk.CAN_DEFAULT)
-        self.build_packages_button.grab_default()
-        self.build_packages_button.connect("clicked", self.build_packages_clicked_cb)
-        button_box.pack_end(self.build_packages_button, expand=False, fill=False)
-
-        self.back_button = HobAltButton('Cancel')
-        self.back_button.connect("clicked", self.back_button_clicked_cb)
-        button_box.pack_end(self.back_button, expand=False, fill=False)
-
-    def search_entry_changed(self, entry):
-        text = entry.get_text()
-        if self.ins.search_focus:
-            self.ins.search_focus = False
-        elif self.ins.page_changed:
-            self.ins.page_change = False
-            self.filter_search(entry)
-        elif text not in self.ins.search_names:
-            self.filter_search(entry)
-
-    def filter_search(self, entry):
-        text = entry.get_text()
-        current_tab = self.ins.get_current_page()
-        filter = self.pages[current_tab]['filter']
-        filter[RecipeListModel.COL_NAME] = text
-        self.tables[current_tab].set_model(self.recipe_model.tree_model(filter, search_data=text))
-        if self.recipe_model.filtered_nb == 0:
-            if not self.ins.get_nth_page(current_tab).top_bar:
-                self.ins.get_nth_page(current_tab).add_no_result_bar(entry)
-                self.ins.get_nth_page(current_tab).top_bar.set_no_show_all(True)
-            self.ins.get_nth_page(current_tab).top_bar.show()
-            self.ins.get_nth_page(current_tab).scroll.hide()
-        else:
-            if self.ins.get_nth_page(current_tab).top_bar:
-                self.ins.get_nth_page(current_tab).top_bar.hide()
-            self.ins.get_nth_page(current_tab).scroll.show()
-        if entry.get_text() == '':
-            entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY, False)
-        else:
-            entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY, True)
-
-    def button_click_cb(self, widget, event):
-        path, col = widget.table_tree.get_cursor()
-        tree_model = widget.table_tree.get_model()
-        if path and col.get_title() != 'Included': # else activation is likely a removal
-            properties = {'summary': '', 'name': '', 'version': '', 'revision': '', 'binb': '', 'group': '', 'license': '', 'homepage': '', 'bugtracker': '', 'description': ''}
-            properties['summary'] = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_SUMMARY)
-            properties['name'] = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_NAME)
-            properties['version'] = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_VERSION)
-            properties['revision'] = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_REVISION)
-            properties['binb'] = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_BINB)
-            properties['group'] = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_GROUP)
-            properties['license'] = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_LIC)
-            properties['homepage'] = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_HOMEPAGE)
-            properties['bugtracker'] = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_BUGTRACKER)
-            properties['description'] = tree_model.get_value(tree_model.get_iter(path), RecipeListModel.COL_DESC)
-            self.builder.show_recipe_property_dialog(properties)
-
-    def build_packages_clicked_cb(self, button):
-        self.refresh_tables()
-        self.builder.build_packages()
-
-    def refresh_tables(self):
-        self.ins.reset_entry(self.ins.search, 0)
-        for tab in self.tables:
-            index = self.tables.index(tab)
-            filter = self.pages[index]['filter']
-            tab.set_model(self.recipe_model.tree_model(filter, search_data="", initial=True))
-
-    def back_button_clicked_cb(self, button):
-        self.builder.recipe_model.set_selected_image(self.builder.configuration.initial_selected_image)
-        self.builder.image_configuration_page.update_image_combo(self.builder.recipe_model, self.builder.configuration.initial_selected_image)
-        self.builder.image_configuration_page.update_image_desc()
-        self.builder.show_configuration()
-        self.refresh_tables()
-
-    def refresh_selection(self):
-        self.builder.configuration.selected_image = self.recipe_model.get_selected_image()
-        _, self.builder.configuration.selected_recipes = self.recipe_model.get_selected_recipes()
-        self.ins.show_indicator_icon("Included recipes", len(self.builder.configuration.selected_recipes))
-
-    def toggle_item_idle_cb(self, path, view_tree, cell, pagename):
-        if not self.recipe_model.path_included(path):
-            self.recipe_model.include_item(item_path=path, binb="User Selected", image_contents=False)
-        else:
-            self.pre_fadeout_checkout_include(view_tree, pagename)
-            self.recipe_model.exclude_item(item_path=path)
-            self.render_fadeout(view_tree, cell)
-
-        self.refresh_selection()
-        if not self.builder.customized:
-            self.builder.customized = True
-            self.builder.configuration.selected_image = self.recipe_model.__custom_image__
-            self.builder.rcppkglist_populated()
-
-        self.builder.window_sensitive(True)
-
-        view_model = view_tree.get_model()
-        vpath = self.recipe_model.convert_path_to_vpath(view_model, path)
-        view_tree.set_cursor(vpath)
-
-    def table_toggled_cb(self, table, cell, view_path, toggled_columnid, view_tree, pagename):
-        # Click to include a recipe
-        self.builder.window_sensitive(False)
-        view_model = view_tree.get_model()
-        path = self.recipe_model.convert_vpath_to_path(view_model, view_path)
-        glib.idle_add(self.toggle_item_idle_cb, path, view_tree, cell, pagename)
-
-    def pre_fadeout_checkout_include(self, tree, pagename):
-        #after the fadeout the table will be sorted as before
-        self.sort_column_id = self.recipe_model.sort_column_id
-        self.sort_order = self.recipe_model.sort_order
-
-        #resync the included items to a backup fade include column
-        it = self.recipe_model.get_iter_first()
-        while it:
-            active = self.recipe_model.get_value(it, self.recipe_model.COL_INC)
-            self.recipe_model.set(it, self.recipe_model.COL_FADE_INC, active)
-            it = self.recipe_model.iter_next(it)
-        # Check out a model which base on the column COL_FADE_INC,
-        # it's save the prev state of column COL_INC before do exclude_item
-        filter = { RecipeListModel.COL_FADE_INC:[True] }
-        if pagename == "Included recipes":
-            filter[RecipeListModel.COL_TYPE] = ['recipe', 'packagegroup']
-        elif pagename == "All recipes":
-            filter[RecipeListModel.COL_TYPE] = ['recipe']
-        else:
-            filter[RecipeListModel.COL_TYPE] = ['packagegroup']
-
-        new_model = self.recipe_model.tree_model(filter, excluded_items_ahead=True)
-        tree.set_model(new_model)
-
-    def render_fadeout(self, tree, cell):
-        if (not cell) or (not tree):
-            return
-        to_render_cells = []
-        model = tree.get_model()
-        it = model.get_iter_first()
-        while it:
-            path = model.get_path(it)
-            prev_cell_is_active = model.get_value(it, RecipeListModel.COL_FADE_INC)
-            curr_cell_is_active = model.get_value(it, RecipeListModel.COL_INC)
-            if (prev_cell_is_active == True) and (curr_cell_is_active == False):
-                to_render_cells.append(path)
-            it = model.iter_next(it)
-
-        cell.fadeout(tree, 1000, to_render_cells)
-
-    def after_fadeout_checkin_include(self, table, ctrl, cell, tree, filter):
-        self.recipe_model.sort_column_id = self.sort_column_id
-        self.recipe_model.sort_order = self.sort_order
-        tree.set_model(self.recipe_model.tree_model(filter))
-
-    def set_recipe_curr_tab(self, curr_page):
-        self.ins.set_current_page(curr_page)
diff --git a/yocto-poky/bitbake/lib/bb/ui/crumbs/sanitycheckpage.py b/yocto-poky/bitbake/lib/bb/ui/crumbs/sanitycheckpage.py
deleted file mode 100644
index 76ce2ec..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/crumbs/sanitycheckpage.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/env python
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2012        Intel Corporation
-#
-# Authored by Bogdan Marinescu <bogdan.a.marinescu@intel.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.
-
-import gtk, gobject
-from bb.ui.crumbs.progressbar import HobProgressBar
-from bb.ui.crumbs.hobwidget import hic
-from bb.ui.crumbs.hobpages import HobPage
-
-#
-# SanityCheckPage
-#
-class SanityCheckPage (HobPage):
-
-    def __init__(self, builder):
-        super(SanityCheckPage, self).__init__(builder)
-        self.running = False
-        self.create_visual_elements()
-        self.show_all()
-
-    def make_label(self, text, bold=True):
-        label = gtk.Label()
-        label.set_alignment(0.0, 0.5)
-        mark = "<span %s>%s</span>" % (self.span_tag('x-large', 'bold') if bold else self.span_tag('medium'), text)
-        label.set_markup(mark)
-        return label
-
-    def start(self):
-        if not self.running:
-          self.running = True
-          gobject.timeout_add(100, self.timer_func)
-
-    def stop(self):
-        self.running = False
-
-    def is_running(self):
-        return self.running
-
-    def timer_func(self):
-        self.progress_bar.pulse()
-        return self.running
-
-    def create_visual_elements(self):
-        # Table'd layout. 'rows' and 'cols' give the table size
-        rows, cols = 30, 50
-        self.table = gtk.Table(rows, cols, True)
-        self.pack_start(self.table, expand=False, fill=False)
-        sx, sy = 2, 2
-        # 'info' icon
-        image = gtk.Image()
-        image.set_from_file(hic.ICON_INFO_DISPLAY_FILE)
-        self.table.attach(image, sx, sx + 2, sy, sy + 3 )
-        image.show()
-        # 'Checking' message
-        label = self.make_label('Hob is checking for correct build system setup')
-        self.table.attach(label, sx + 2, cols, sy, sy + 3, xpadding=5 )
-        label.show()
-        # 'Shouldn't take long' message.
-        label = self.make_label("The check shouldn't take long.", False)
-        self.table.attach(label, sx + 2, cols, sy + 3, sy + 4, xpadding=5)
-        label.show()
-        # Progress bar
-        self.progress_bar = HobProgressBar()
-        self.table.attach(self.progress_bar, sx + 2, cols - 3, sy + 5, sy + 7, xpadding=5)
-        self.progress_bar.show()
-        # All done
-        self.table.show()
-
diff --git a/yocto-poky/bitbake/lib/bb/ui/hob.py b/yocto-poky/bitbake/lib/bb/ui/hob.py
deleted file mode 100755
index da5b411..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/hob.py
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/usr/bin/env python
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2011        Intel Corporation
-#
-# Authored by Joshua Lock <josh@linux.intel.com>
-# Authored by Dongxiao Xu <dongxiao.xu@intel.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.
-
-import sys
-import os
-requirements = "FATAL: Hob requires Gtk+ 2.20.0 or higher, PyGtk 2.21.0 or higher"
-try:
-    import gobject
-    import gtk
-    import pygtk
-    pygtk.require('2.0') # to be certain we don't have gtk+ 1.x !?!
-    gtkver = gtk.gtk_version
-    pygtkver = gtk.pygtk_version
-    if gtkver  < (2, 20, 0) or pygtkver < (2, 21, 0):
-        sys.exit("%s,\nYou have Gtk+ %s and PyGtk %s." % (requirements,
-                ".".join(map(str, gtkver)),
-                ".".join(map(str, pygtkver))))
-except ImportError as exc:
-    sys.exit("%s (%s)." % (requirements, str(exc)))
-sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
-try:
-    import bb
-except RuntimeError as exc:
-    sys.exit(str(exc))
-from bb.ui import uihelper
-from bb.ui.crumbs.hoblistmodel import RecipeListModel, PackageListModel
-from bb.ui.crumbs.hobeventhandler import HobHandler
-from bb.ui.crumbs.builder import Builder
-
-featureSet = [bb.cooker.CookerFeatures.HOB_EXTRA_CACHES, bb.cooker.CookerFeatures.BASEDATASTORE_TRACKING]
-
-def event_handle_idle_func(eventHandler, hobHandler):
-    # Consume as many messages as we can in the time available to us
-    if not eventHandler:
-        return False
-    event = eventHandler.getEvent()
-    while event:
-        hobHandler.handle_event(event)
-        event = eventHandler.getEvent()
-    return True
-
-_evt_list = [ "bb.runqueue.runQueueExitWait", "bb.event.LogExecTTY", "logging.LogRecord",
-              "bb.build.TaskFailed", "bb.build.TaskBase", "bb.event.ParseStarted",
-              "bb.event.ParseProgress", "bb.event.ParseCompleted", "bb.event.CacheLoadStarted",
-              "bb.event.CacheLoadProgress", "bb.event.CacheLoadCompleted", "bb.command.CommandFailed",
-              "bb.command.CommandExit", "bb.command.CommandCompleted",  "bb.cooker.CookerExit",
-              "bb.event.MultipleProviders", "bb.event.NoProvider", "bb.runqueue.sceneQueueTaskStarted",
-              "bb.runqueue.runQueueTaskStarted", "bb.runqueue.runQueueTaskFailed", "bb.runqueue.sceneQueueTaskFailed",
-              "bb.event.BuildBase", "bb.build.TaskStarted", "bb.build.TaskSucceeded", "bb.build.TaskFailedSilent",
-              "bb.event.SanityCheckPassed", "bb.event.SanityCheckFailed", "bb.event.PackageInfo",
-              "bb.event.TargetsTreeGenerated", "bb.event.ConfigFilesFound", "bb.event.ConfigFilePathFound",
-              "bb.event.FilesMatchingFound", "bb.event.NetworkTestFailed", "bb.event.NetworkTestPassed",
-              "bb.event.BuildStarted", "bb.event.BuildCompleted", "bb.event.DiskFull"]
-
-def main (server, eventHandler, params):
-    params.updateFromServer(server)
-    gobject.threads_init()
-
-    # That indicates whether the Hob and the bitbake server are
-    # running on different machines
-    # recipe model and package model
-    recipe_model = RecipeListModel()
-    package_model = PackageListModel()
-
-    llevel, debug_domains = bb.msg.constructLogOptions()
-    server.runCommand(["setEventMask", server.getEventHandle(), llevel, debug_domains, _evt_list])
-    hobHandler = HobHandler(server, recipe_model, package_model)
-    builder = Builder(hobHandler, recipe_model, package_model)
-
-    # This timeout function regularly probes the event queue to find out if we
-    # have any messages waiting for us.
-    gobject.timeout_add(10, event_handle_idle_func, eventHandler, hobHandler)
-
-    try:
-        gtk.main()
-    except EnvironmentError as ioerror:
-        # ignore interrupted io
-        if ioerror.args[0] == 4:
-            pass
-    finally:
-        hobHandler.cancel_build(force = True)
-
-if __name__ == "__main__":
-    try:
-        ret = main()
-    except Exception:
-        ret = 1
-        import traceback
-        traceback.print_exc(15)
-    sys.exit(ret)
diff --git a/yocto-poky/bitbake/lib/bb/ui/knotty.py b/yocto-poky/bitbake/lib/bb/ui/knotty.py
index 90c3183..2685627 100644
--- a/yocto-poky/bitbake/lib/bb/ui/knotty.py
+++ b/yocto-poky/bitbake/lib/bb/ui/knotty.py
@@ -104,10 +104,11 @@
         return True
 
 class TerminalFilter(object):
+    rows = 25
     columns = 80
 
     def sigwinch_handle(self, signum, frame):
-        self.columns = self.getTerminalColumns()
+        self.rows, self.columns = self.getTerminalColumns()
         if self._sigwinch_default:
             self._sigwinch_default(signum, frame)
 
@@ -131,7 +132,7 @@
                 cr = (env['LINES'], env['COLUMNS'])
             except:
                 cr = (25, 80)
-        return cr[1]
+        return cr
 
     def __init__(self, main, helper, console, errconsole, format):
         self.main = main
@@ -170,9 +171,13 @@
                 signal.signal(signal.SIGWINCH, self.sigwinch_handle)
             except:
                 pass
-            self.columns = self.getTerminalColumns()
+            self.rows, self.columns = self.getTerminalColumns()
         except:
             self.cuu = None
+        if not self.cuu:
+            self.interactive = False
+            bb.note("Unable to use interactive mode for this terminal, using fallback")
+            return
         console.addFilter(InteractConsoleLogFilter(self, format))
         errconsole.addFilter(InteractConsoleLogFilter(self, format))
 
@@ -207,7 +212,7 @@
             content = "Currently %s running tasks (%s of %s):" % (len(activetasks), self.helper.tasknumber_current, self.helper.tasknumber_total)
         print(content)
         lines = 1 + int(len(content) / (self.columns + 1))
-        for tasknum, task in enumerate(tasks):
+        for tasknum, task in enumerate(tasks[:(self.rows - 2)]):
             content = "%s: %s" % (tasknum, task)
             print(content)
             lines = lines + 1 + int(len(content) / (self.columns + 1))
@@ -267,6 +272,8 @@
     logger.addHandler(console)
     logger.addHandler(errconsole)
 
+    bb.utils.set_process_name("KnottyUI")
+
     if params.options.remote_server and params.options.kill_server:
         server.terminateServer()
         return
@@ -282,6 +289,7 @@
     llevel, debug_domains = bb.msg.constructLogOptions()
     server.runCommand(["setEventMask", server.getEventHandle(), llevel, debug_domains, _evt_list])
 
+    universe = False
     if not params.observe_only:
         params.updateFromServer(server)
         params.updateToServer(server, os.environ.copy())
@@ -292,6 +300,8 @@
         if 'msg' in cmdline and cmdline['msg']:
             logger.error(cmdline['msg'])
             return 1
+        if cmdline['action'][0] == "buildTargets" and "universe" in cmdline['action'][1]:
+            universe = True
 
         ret, error = server.runCommand(cmdline['action'])
         if error:
@@ -349,11 +359,20 @@
                     return_value = 1
                 elif event.levelno == format.WARNING:
                     warnings = warnings + 1
-                # For "normal" logging conditions, don't show note logs from tasks
-                # but do show them if the user has changed the default log level to
-                # include verbose/debug messages
-                if event.taskpid != 0 and event.levelno <= format.NOTE and (event.levelno < llevel or (event.levelno == format.NOTE and llevel != format.VERBOSE)):
-                    continue
+
+                if event.taskpid != 0:
+                    # For "normal" logging conditions, don't show note logs from tasks
+                    # but do show them if the user has changed the default log level to
+                    # include verbose/debug messages
+                    if event.levelno <= format.NOTE and (event.levelno < llevel or (event.levelno == format.NOTE and llevel != format.VERBOSE)):
+                        continue
+
+                    # Prefix task messages with recipe/task
+                    if event.taskpid in helper.running_tasks:
+                        taskinfo = helper.running_tasks[event.taskpid]
+                        event.msg = taskinfo['title'] + ': ' + event.msg
+                if hasattr(event, 'fn'):
+                        event.msg = event.fn + ': ' + event.msg
                 logger.handle(event)
                 continue
 
@@ -434,11 +453,12 @@
                 logger.info("multiple providers are available for %s%s (%s)", event._is_runtime and "runtime " or "",
                             event._item,
                             ", ".join(event._candidates))
-                logger.info("consider defining a PREFERRED_PROVIDER entry to match %s", event._item)
+                rtime = ""
+                if event._is_runtime:
+                    rtime = "R"
+                logger.info("consider defining a PREFERRED_%sPROVIDER entry to match %s" % (rtime, event._item))
                 continue
             if isinstance(event, bb.event.NoProvider):
-                return_value = 1
-                errors = errors + 1
                 if event._runtime:
                     r = "R"
                 else:
@@ -449,13 +469,20 @@
                     if event._close_matches:
                         extra = ". Close matches:\n  %s" % '\n  '.join(event._close_matches)
 
+                # For universe builds, only show these as warnings, not errors
+                h = logger.warning
+                if not universe:
+                    return_value = 1
+                    errors = errors + 1
+                    h = logger.error
+
                 if event._dependees:
-                    logger.error("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s", r, event._item, ", ".join(event._dependees), r, extra)
+                    h("Nothing %sPROVIDES '%s' (but %s %sDEPENDS on or otherwise requires it)%s", r, event._item, ", ".join(event._dependees), r, extra)
                 else:
-                    logger.error("Nothing %sPROVIDES '%s'%s", r, event._item, extra)
+                    h("Nothing %sPROVIDES '%s'%s", r, event._item, extra)
                 if event._reasons:
                     for reason in event._reasons:
-                        logger.error("%s", reason)
+                        h("%s", reason)
                 continue
 
             if isinstance(event, bb.runqueue.sceneQueueTaskStarted):
@@ -475,6 +502,7 @@
                 continue
 
             if isinstance(event, bb.runqueue.runQueueTaskFailed):
+                return_value = 1
                 taskfailures.append(event.taskstring)
                 logger.error("Task %s (%s) failed with exit code '%s'",
                              event.taskid, event.taskstring, event.exitcode)
@@ -532,10 +560,12 @@
             main.shutdown = main.shutdown + 1
             pass
         except Exception as e:
-            sys.stderr.write(str(e))
+            import traceback
+            sys.stderr.write(traceback.format_exc())
             if not params.observe_only:
                 _, error = server.runCommand(["stateForceShutdown"])
             main.shutdown = 2
+            return_value = 1
     try:
         summary = ""
         if taskfailures:
diff --git a/yocto-poky/bitbake/lib/bb/ui/puccho.py b/yocto-poky/bitbake/lib/bb/ui/puccho.py
deleted file mode 100644
index 3ce4590..0000000
--- a/yocto-poky/bitbake/lib/bb/ui/puccho.py
+++ /dev/null
@@ -1,425 +0,0 @@
-#
-# BitBake Graphical GTK User Interface
-#
-# Copyright (C) 2008        Intel Corporation
-#
-# Authored by Rob Bradford <rob@linux.intel.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.
-
-import gtk
-import gobject
-import gtk.glade
-import threading
-import urllib2
-import os
-import contextlib
-
-from bb.ui.crumbs.buildmanager import BuildManager, BuildConfiguration
-from bb.ui.crumbs.buildmanager import BuildManagerTreeView
-
-from bb.ui.crumbs.runningbuild import RunningBuild, RunningBuildTreeView
-
-# The metadata loader is used by the BuildSetupDialog to download the
-# available options to populate the dialog
-class MetaDataLoader(gobject.GObject):
-    """ This class provides the mechanism for loading the metadata (the
-    fetching and parsing) from a given URL. The metadata encompasses details
-    on what machines are available. The distribution and images available for
-    the machine and the the uris to use for building the given machine."""
-    __gsignals__ = {
-        'success' : (gobject.SIGNAL_RUN_LAST,
-                     gobject.TYPE_NONE,
-                     ()),
-        'error' : (gobject.SIGNAL_RUN_LAST,
-                   gobject.TYPE_NONE,
-                   (gobject.TYPE_STRING,))
-        }
-
-    # We use these little helper functions to ensure that we take the gdk lock
-    # when emitting the signal. These functions are called as idles (so that
-    # they happen in the gtk / main thread's main loop.
-    def emit_error_signal (self, remark):
-        gtk.gdk.threads_enter()
-        self.emit ("error", remark)
-        gtk.gdk.threads_leave()
-
-    def emit_success_signal (self):
-        gtk.gdk.threads_enter()
-        self.emit ("success")
-        gtk.gdk.threads_leave()
-
-    def __init__ (self):
-        gobject.GObject.__init__ (self)
-
-    class LoaderThread(threading.Thread):
-        """ This class provides an asynchronous loader for the metadata (by
-        using threads and signals). This is useful since the metadata may be
-        at a remote URL."""
-        class LoaderImportException (Exception):
-            pass
-
-        def __init__(self, loader, url):
-            threading.Thread.__init__ (self)
-            self.url = url
-            self.loader = loader
-
-        def run (self):
-            result = {}
-            try:
-                with contextlib.closing (urllib2.urlopen (self.url)) as f:
-                    # Parse the metadata format. The format is....
-                    # <machine>;<default distro>|<distro>...;<default image>|<image>...;<type##url>|...
-                    for line in f:
-                        components = line.split(";")
-                        if (len (components) < 4):
-                            raise MetaDataLoader.LoaderThread.LoaderImportException
-                        machine = components[0]
-                        distros = components[1].split("|")
-                        images = components[2].split("|")
-                        urls = components[3].split("|")
-
-                        result[machine] = (distros, images, urls)
-
-                # Create an object representing this *potential*
-                # configuration. It can become concrete if the machine, distro
-                # and image are all chosen in the UI
-                configuration = BuildConfiguration()
-                configuration.metadata_url = self.url
-                configuration.machine_options = result
-                self.loader.configuration = configuration
-
-                # Emit that we've actually got a configuration
-                gobject.idle_add (MetaDataLoader.emit_success_signal,
-                    self.loader)
-
-            except MetaDataLoader.LoaderThread.LoaderImportException as e:
-                gobject.idle_add (MetaDataLoader.emit_error_signal, self.loader,
-                    "Repository metadata corrupt")
-            except Exception as e:
-                gobject.idle_add (MetaDataLoader.emit_error_signal, self.loader,
-                    "Unable to download repository metadata")
-                print(e)
-
-    def try_fetch_from_url (self, url):
-        # Try and download the metadata. Firing a signal if successful
-        thread = MetaDataLoader.LoaderThread(self, url)
-        thread.start()
-
-class BuildSetupDialog (gtk.Dialog):
-    RESPONSE_BUILD = 1
-
-    # A little helper method that just sets the states on the widgets based on
-    # whether we've got good metadata or not.
-    def set_configurable (self, configurable):
-        if (self.configurable == configurable):
-            return
-
-        self.configurable = configurable
-        for widget in self.conf_widgets:
-            widget.set_sensitive (configurable)
-
-        if not configurable:
-            self.machine_combo.set_active (-1)
-            self.distribution_combo.set_active (-1)
-            self.image_combo.set_active (-1)
-
-    # GTK widget callbacks
-    def refresh_button_clicked (self, button):
-        # Refresh button clicked.
-
-        url = self.location_entry.get_chars (0, -1)
-        self.loader.try_fetch_from_url(url)
-
-    def repository_entry_editable_changed (self, entry):
-        if (len (entry.get_chars (0, -1)) > 0):
-            self.refresh_button.set_sensitive (True)
-        else:
-            self.refresh_button.set_sensitive (False)
-            self.clear_status_message()
-
-        # If we were previously configurable we are no longer since the
-        # location entry has been changed
-        self.set_configurable (False)
-
-    def machine_combo_changed (self, combobox):
-        active_iter = combobox.get_active_iter()
-
-        if not active_iter:
-            return
-
-        model = combobox.get_model()
-
-        if model:
-            chosen_machine = model.get (active_iter, 0)[0]
-
-        (distros_model, images_model) = \
-            self.loader.configuration.get_distro_and_images_models (chosen_machine)
-
-        self.distribution_combo.set_model (distros_model)
-        self.image_combo.set_model (images_model)
-
-    # Callbacks from the loader
-    def loader_success_cb (self, loader):
-        self.status_image.set_from_icon_name ("info",
-            gtk.ICON_SIZE_BUTTON)
-        self.status_image.show()
-        self.status_label.set_label ("Repository metadata successfully downloaded")
-
-        # Set the models on the combo boxes based on the models generated from
-        # the configuration that the loader has created
-
-        # We just need to set the machine here, that then determines the
-        # distro and image options. Cunning huh? :-)
-
-        self.configuration = self.loader.configuration
-        model = self.configuration.get_machines_model ()
-        self.machine_combo.set_model (model)
-
-        self.set_configurable (True)
-
-    def loader_error_cb (self, loader, message):
-        self.status_image.set_from_icon_name ("error",
-            gtk.ICON_SIZE_BUTTON)
-        self.status_image.show()
-        self.status_label.set_text ("Error downloading repository metadata")
-        for widget in self.conf_widgets:
-            widget.set_sensitive (False)
-
-    def clear_status_message (self):
-        self.status_image.hide()
-        self.status_label.set_label (
-            """<i>Enter the repository location and press _Refresh</i>""")
-
-    def __init__ (self):
-        gtk.Dialog.__init__ (self)
-
-        # Cancel
-        self.add_button (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
-
-        # Build
-        button = gtk.Button ("_Build", None, True)
-        image = gtk.Image ()
-        image.set_from_stock (gtk.STOCK_EXECUTE, gtk.ICON_SIZE_BUTTON)
-        button.set_image (image)
-        self.add_action_widget (button, BuildSetupDialog.RESPONSE_BUILD)
-        button.show_all ()
-
-        # Pull in *just* the table from the Glade XML data.
-        gxml = gtk.glade.XML (os.path.dirname(__file__) + "/crumbs/puccho.glade",
-            root = "build_table")
-        table = gxml.get_widget ("build_table")
-        self.vbox.pack_start (table, True, False, 0)
-
-        # Grab all the widgets that we need to turn on/off when we refresh...
-        self.conf_widgets = []
-        self.conf_widgets += [gxml.get_widget ("machine_label")]
-        self.conf_widgets += [gxml.get_widget ("distribution_label")]
-        self.conf_widgets += [gxml.get_widget ("image_label")]
-        self.conf_widgets += [gxml.get_widget ("machine_combo")]
-        self.conf_widgets += [gxml.get_widget ("distribution_combo")]
-        self.conf_widgets += [gxml.get_widget ("image_combo")]
-
-        # Grab the status widgets
-        self.status_image = gxml.get_widget ("status_image")
-        self.status_label = gxml.get_widget ("status_label")
-
-        # Grab the refresh button and connect to the clicked signal
-        self.refresh_button = gxml.get_widget ("refresh_button")
-        self.refresh_button.connect ("clicked", self.refresh_button_clicked)
-
-        # Grab the location entry and connect to editable::changed
-        self.location_entry = gxml.get_widget ("location_entry")
-        self.location_entry.connect ("changed",
-            self.repository_entry_editable_changed)
-
-        # Grab the machine combo and hook onto the changed signal. This then
-        # allows us to populate the distro and image combos
-        self.machine_combo = gxml.get_widget ("machine_combo")
-        self.machine_combo.connect ("changed", self.machine_combo_changed)
-
-        # Setup the combo
-        cell = gtk.CellRendererText()
-        self.machine_combo.pack_start(cell, True)
-        self.machine_combo.add_attribute(cell, 'text', 0)
-
-        # Grab the distro and image combos. We need these to populate with
-        # models once the machine is chosen
-        self.distribution_combo = gxml.get_widget ("distribution_combo")
-        cell = gtk.CellRendererText()
-        self.distribution_combo.pack_start(cell, True)
-        self.distribution_combo.add_attribute(cell, 'text', 0)
-
-        self.image_combo = gxml.get_widget ("image_combo")
-        cell = gtk.CellRendererText()
-        self.image_combo.pack_start(cell, True)
-        self.image_combo.add_attribute(cell, 'text', 0)
-
-        # Put the default descriptive text in the status box
-        self.clear_status_message()
-
-        # Mark as non-configurable, this is just greys out the widgets the
-        # user can't yet use
-        self.configurable = False
-        self.set_configurable(False)
-
-        # Show the table
-        table.show_all ()
-
-        # The loader and some signals connected to it to update the status
-        # area
-        self.loader = MetaDataLoader()
-        self.loader.connect ("success", self.loader_success_cb)
-        self.loader.connect ("error", self.loader_error_cb)
-
-    def update_configuration (self):
-        """ A poorly named function but it updates the internal configuration
-        from the widgets. This can make that configuration concrete and can
-        thus be used for building """
-        # Extract the chosen machine from the combo
-        model = self.machine_combo.get_model()
-        active_iter = self.machine_combo.get_active_iter()
-        if (active_iter):
-            self.configuration.machine = model.get(active_iter, 0)[0]
-
-        # Extract the chosen distro from the combo
-        model = self.distribution_combo.get_model()
-        active_iter = self.distribution_combo.get_active_iter()
-        if (active_iter):
-            self.configuration.distro = model.get(active_iter, 0)[0]
-
-        # Extract the chosen image from the combo
-        model = self.image_combo.get_model()
-        active_iter = self.image_combo.get_active_iter()
-        if (active_iter):
-            self.configuration.image = model.get(active_iter, 0)[0]
-
-# This function operates to pull events out from the event queue and then push
-# them into the RunningBuild (which then drives the RunningBuild which then
-# pushes through and updates the progress tree view.)
-#
-# TODO: Should be a method on the RunningBuild class
-def event_handle_timeout (eventHandler, build):
-    # Consume as many messages as we can ...
-    event = eventHandler.getEvent()
-    while event:
-        build.handle_event (event)
-        event = eventHandler.getEvent()
-    return True
-
-class MainWindow (gtk.Window):
-
-    # Callback that gets fired when the user hits a button in the
-    # BuildSetupDialog.
-    def build_dialog_box_response_cb (self, dialog, response_id):
-        conf = None
-        if (response_id == BuildSetupDialog.RESPONSE_BUILD):
-            dialog.update_configuration()
-            print(dialog.configuration.machine, dialog.configuration.distro, \
-                dialog.configuration.image)
-            conf = dialog.configuration
-
-        dialog.destroy()
-
-        if conf:
-            self.manager.do_build (conf)
-
-    def build_button_clicked_cb (self, button):
-        dialog = BuildSetupDialog ()
-
-        # For some unknown reason Dialog.run causes nice little deadlocks ... :-(
-        dialog.connect ("response", self.build_dialog_box_response_cb)
-        dialog.show()
-
-    def __init__ (self):
-        gtk.Window.__init__ (self)
-
-        # Pull in *just* the main vbox from the Glade XML data and then pack
-        # that inside the window
-        gxml = gtk.glade.XML (os.path.dirname(__file__) + "/crumbs/puccho.glade",
-            root = "main_window_vbox")
-        vbox = gxml.get_widget ("main_window_vbox")
-        self.add (vbox)
-
-        # Create the tree views for the build manager view and the progress view
-        self.build_manager_view = BuildManagerTreeView()
-        self.running_build_view = RunningBuildTreeView()
-
-        # Grab the scrolled windows that we put the tree views into
-        self.results_scrolledwindow = gxml.get_widget ("results_scrolledwindow")
-        self.progress_scrolledwindow = gxml.get_widget ("progress_scrolledwindow")
-
-        # Put the tree views inside ...
-        self.results_scrolledwindow.add (self.build_manager_view)
-        self.progress_scrolledwindow.add (self.running_build_view)
-
-        # Hook up the build button...
-        self.build_button = gxml.get_widget ("main_toolbutton_build")
-        self.build_button.connect ("clicked", self.build_button_clicked_cb)
-
-# I'm not very happy about the current ownership of the RunningBuild. I have
-# my suspicions that this object should be held by the BuildManager since we
-# care about the signals in the manager
-
-def running_build_succeeded_cb (running_build, manager):
-    # Notify the manager that a build has succeeded. This is necessary as part
-    # of the 'hack' that we use for making the row in the model / view
-    # representing the ongoing build change into a row representing the
-    # completed build. Since we know only one build can be running a time then
-    # we can handle this.
-
-    # FIXME: Refactor all this so that the RunningBuild is owned by the
-    # BuildManager. It can then hook onto the signals directly and drive
-    # interesting things it cares about.
-    manager.notify_build_succeeded ()
-    print("build succeeded")
-
-def running_build_failed_cb (running_build, manager):
-    # As above
-    print("build failed")
-    manager.notify_build_failed ()
-
-def main (server, eventHandler):
-    # Initialise threading...
-    gobject.threads_init()
-    gtk.gdk.threads_init()
-
-    main_window = MainWindow ()
-    main_window.show_all ()
-
-    # Set up the build manager stuff in general
-    builds_dir = os.path.join (os.getcwd(),  "results")
-    manager = BuildManager (server, builds_dir)
-    main_window.build_manager_view.set_model (manager.model)
-
-    # Do the running build setup
-    running_build = RunningBuild ()
-    main_window.running_build_view.set_model (running_build.model)
-    running_build.connect ("build-succeeded", running_build_succeeded_cb,
-        manager)
-    running_build.connect ("build-failed", running_build_failed_cb, manager)
-
-    # We need to save the manager into the MainWindow so that the toolbar
-    # button can use it.
-    # FIXME: Refactor ?
-    main_window.manager = manager
-
-    # Use a timeout function for probing the event queue to find out if we
-    # have a message waiting for us.
-    gobject.timeout_add (200,
-                         event_handle_timeout,
-                         eventHandler,
-                         running_build)
-
-    gtk.main()
diff --git a/yocto-poky/bitbake/lib/bb/ui/toasterui.py b/yocto-poky/bitbake/lib/bb/ui/toasterui.py
index 3d26150..6bf4c1f 100644
--- a/yocto-poky/bitbake/lib/bb/ui/toasterui.py
+++ b/yocto-poky/bitbake/lib/bb/ui/toasterui.py
@@ -92,6 +92,43 @@
         build_log.close()
         logger.removeHandler(build_log)
 
+_evt_list = [
+    "bb.build.TaskBase",
+    "bb.build.TaskFailed",
+    "bb.build.TaskFailedSilent",
+    "bb.build.TaskStarted",
+    "bb.build.TaskSucceeded",
+    "bb.command.CommandCompleted",
+    "bb.command.CommandExit",
+    "bb.command.CommandFailed",
+    "bb.cooker.CookerExit",
+    "bb.event.BuildCompleted",
+    "bb.event.BuildStarted",
+    "bb.event.CacheLoadCompleted",
+    "bb.event.CacheLoadProgress",
+    "bb.event.CacheLoadStarted",
+    "bb.event.ConfigParsed",
+    "bb.event.DepTreeGenerated",
+    "bb.event.LogExecTTY",
+    "bb.event.MetadataEvent",
+    "bb.event.MultipleProviders",
+    "bb.event.NoProvider",
+    "bb.event.ParseCompleted",
+    "bb.event.ParseProgress",
+    "bb.event.RecipeParsed",
+    "bb.event.SanityCheck",
+    "bb.event.SanityCheckPassed",
+    "bb.event.TreeDataPreparationCompleted",
+    "bb.event.TreeDataPreparationStarted",
+    "bb.runqueue.runQueueTaskCompleted",
+    "bb.runqueue.runQueueTaskFailed",
+    "bb.runqueue.runQueueTaskSkipped",
+    "bb.runqueue.runQueueTaskStarted",
+    "bb.runqueue.sceneQueueTaskCompleted",
+    "bb.runqueue.sceneQueueTaskFailed",
+    "bb.runqueue.sceneQueueTaskStarted",
+    "logging.LogRecord"]
+
 def main(server, eventHandler, params):
     # set to a logging.FileHandler instance when a build starts;
     # see _open_build_log()
@@ -115,6 +152,11 @@
     console.setFormatter(formatter)
     logger.addHandler(console)
     logger.setLevel(logging.INFO)
+    llevel, debug_domains = bb.msg.constructLogOptions()
+    result, error = server.runCommand(["setEventMask", server.getEventHandle(), llevel, debug_domains, _evt_list])
+    if not result or error:
+        logger.error("can't set event mask: %s", error)
+        return 1
 
     # verify and warn
     build_history_enabled = True
@@ -125,8 +167,23 @@
         build_history_enabled = False
 
     if not params.observe_only:
-        logger.error("ToasterUI can only work in observer mode")
-        return 1
+        params.updateFromServer(server)
+        params.updateToServer(server, os.environ.copy())
+        cmdline = params.parseActions()
+        if not cmdline:
+            print("Nothing to do.  Use 'bitbake world' to build everything, or run 'bitbake --help' for usage information.")
+            return 1
+        if 'msg' in cmdline and cmdline['msg']:
+            logger.error(cmdline['msg'])
+            return 1
+
+        ret, error = server.runCommand(cmdline['action'])
+        if error:
+            logger.error("Command '%s' failed: %s" % (cmdline, error))
+            return 1
+        elif ret != True:
+            logger.error("Command '%s' failed: returned %s" % (cmdline, ret))
+            return 1
 
     # set to 1 when toasterui needs to shut down
     main.shutdown = 0
@@ -138,7 +195,8 @@
     taskfailures = []
     first = True
 
-    buildinfohelper = BuildInfoHelper(server, build_history_enabled)
+    buildinfohelper = BuildInfoHelper(server, build_history_enabled,
+                                      os.getenv('TOASTER_BRBE'))
 
     # write our own log files into bitbake's log directory;
     # we're only interested in the path to the parent directory of
@@ -182,12 +240,11 @@
                 continue
 
             if isinstance(event, bb.event.BuildStarted):
-                # command-line builds don't fire a ParseStarted event,
-                # so we have to start the log file for those on BuildStarted instead
                 if not (build_log and build_log_file_path):
                     build_log, build_log_file_path = _open_build_log(log_dir)
 
                 buildinfohelper.store_started_build(event, build_log_file_path)
+                continue
 
             if isinstance(event, (bb.build.TaskStarted, bb.build.TaskSucceeded, bb.build.TaskFailedSilent)):
                 buildinfohelper.update_and_store_task(event)
@@ -315,28 +372,30 @@
 
                 # update the build info helper on BuildCompleted, not on CommandXXX
                 buildinfohelper.update_build_information(event, errors, warnings, taskfailures)
+
+                brbe = buildinfohelper.brbe
                 buildinfohelper.close(errorcode)
-                # mark the log output; controllers may kill the toasterUI after seeing this log
-                logger.info("ToasterUI build done 1, brbe: %s", buildinfohelper.brbe )
 
                 # we start a new build info
-                if buildinfohelper.brbe is not None:
-                    logger.debug("ToasterUI under BuildEnvironment management - exiting after the build")
-                    server.terminateServer()
-                else:
+                if params.observe_only:
                     logger.debug("ToasterUI prepared for new build")
                     errors = 0
                     warnings = 0
                     taskfailures = []
                     buildinfohelper = BuildInfoHelper(server, build_history_enabled)
+                else:
+                    main.shutdown = 1
 
-                logger.info("ToasterUI build done 2")
+                logger.info("ToasterUI build done, brbe: %s", brbe)
                 continue
 
             if isinstance(event, (bb.command.CommandCompleted,
                                   bb.command.CommandFailed,
                                   bb.command.CommandExit)):
-                errorcode = 0
+                if params.observe_only:
+                    errorcode = 0
+                else:
+                    main.shutdown = 1
 
                 continue
 
@@ -357,6 +416,10 @@
                     buildinfohelper.update_artifact_image_file(event)
                 elif event.type == "LicenseManifestPath":
                     buildinfohelper.store_license_manifest_path(event)
+                elif event.type == "SetBRBE":
+                    buildinfohelper.brbe = buildinfohelper._get_data_from_event(event)
+                elif event.type == "OSErrorException":
+                    logger.error(event)
                 else:
                     logger.error("Unprocessed MetadataEvent %s ", str(event))
                 continue
@@ -366,19 +429,6 @@
                 main.shutdown = 1
                 continue
 
-            # ignore
-            if isinstance(event, (bb.event.BuildBase,
-                                  bb.event.StampUpdate,
-                                  bb.event.RecipePreFinalise,
-                                  bb.runqueue.runQueueEvent,
-                                  bb.runqueue.runQueueExitWait,
-                                  bb.event.OperationProgress,
-                                  bb.command.CommandFailed,
-                                  bb.command.CommandExit,
-                                  bb.command.CommandCompleted,
-                                  bb.event.ReachableStamps)):
-                continue
-
             if isinstance(event, bb.event.DepTreeGenerated):
                 buildinfohelper.store_dependency_information(event)
                 continue
@@ -399,13 +449,6 @@
             exception_data = traceback.format_exc()
             logger.error("%s\n%s" , e, exception_data)
 
-            _, _, tb = sys.exc_info()
-            if tb is not None:
-                curr = tb
-                while curr is not None:
-                    logger.error("Error data dump %s\n%s\n" , traceback.format_tb(curr,1), pformat(curr.tb_frame.f_locals))
-                    curr = curr.tb_next
-
             # save them to database, if possible; if it fails, we already logged to console.
             try:
                 buildinfohelper.store_log_exception("%s\n%s" % (str(e), exception_data))
diff --git a/yocto-poky/bitbake/lib/bb/ui/uievent.py b/yocto-poky/bitbake/lib/bb/ui/uievent.py
index 7fc50c7..df093c5 100644
--- a/yocto-poky/bitbake/lib/bb/ui/uievent.py
+++ b/yocto-poky/bitbake/lib/bb/ui/uievent.py
@@ -24,7 +24,7 @@
 client/server deadlocks.
 """
 
-import socket, threading, pickle
+import socket, threading, pickle, collections
 from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler
 
 class BBUIEventQueue:
@@ -44,27 +44,32 @@
         server.register_function( self.send_event, "event.sendpickle" )
         server.socket.settimeout(1)
 
-        self.EventHandler = None
-        count_tries = 0
+        self.EventHandle = None
 
         # the event handler registration may fail here due to cooker being in invalid state
         # this is a transient situation, and we should retry a couple of times before
         # giving up
 
-        while self.EventHandler == None and count_tries < 5:
-            self.EventHandle = self.BBServer.registerEventHandler(self.host, self.port)
+        for count_tries in range(5):
+            ret = self.BBServer.registerEventHandler(self.host, self.port)
 
-            if (self.EventHandle != None):
+            if isinstance(ret, collections.Iterable):
+                self.EventHandle, error = ret
+            else:
+                self.EventHandle = ret
+                error = ""
+
+            if self.EventHandle != None:
                 break
 
-            bb.warn("Could not register UI event handler %s:%d, retry" % (self.host, self.port))
-            count_tries += 1
+            errmsg = "Could not register UI event handler. Error: %s, host %s, "\
+                     "port %d" % (error, self.host, self.port)
+            bb.warn("%s, retry" % errmsg)
+
             import time
             time.sleep(1)
-
-
-        if self.EventHandle == None:
-            raise Exception("Could not register UI event handler")
+        else:
+            raise Exception(errmsg)
 
         self.server = server
 
@@ -105,6 +110,7 @@
     def startCallbackHandler(self):
 
         self.server.timeout = 1
+        bb.utils.set_process_name("UIEventQueue")
         while not self.server.quit:
             try:
                 self.server.handle_request()
diff --git a/yocto-poky/bitbake/lib/bb/ui/uihelper.py b/yocto-poky/bitbake/lib/bb/ui/uihelper.py
index a703387..db70b76 100644
--- a/yocto-poky/bitbake/lib/bb/ui/uihelper.py
+++ b/yocto-poky/bitbake/lib/bb/ui/uihelper.py
@@ -57,44 +57,3 @@
         self.needUpdate = False
         return (self.running_tasks, self.failed_tasks)
 
-    def findServerDetails(self):
-        import sys
-        import optparse
-        from bb.server.xmlrpc import BitbakeServerInfo, BitBakeServerConnection
-        host = ""
-        port = 0
-        bind = ""
-        parser = optparse.OptionParser(
-            usage = """%prog -H host -P port -B bindaddr""")
-
-        parser.add_option("-H", "--host", help = "Bitbake server's IP address",
-                   action = "store", dest = "host", default = None)
-
-        parser.add_option("-P", "--port", help = "Bitbake server's Port number",
-                   action = "store", dest = "port", default = None)
-
-        parser.add_option("-B", "--bind", help = "Hob2 local bind address",
-                   action = "store", dest = "bind", default = None)
-
-        options, args = parser.parse_args(sys.argv)
-        for key, val in options.__dict__.items():
-            if key == 'host' and val:
-                host = val
-            elif key == 'port' and val:
-                port = int(val)
-            elif key == 'bind' and val:
-                bind = val
-
-        if not host or not port or not bind:
-            parser.print_usage()
-            sys.exit(1)
-
-        serverinfo = BitbakeServerInfo(host, port)
-        clientinfo = (bind, 0)
-        connection = BitBakeServerConnection(serverinfo, clientinfo)
-
-        server = connection.connection
-        eventHandler = connection.events
-
-        return server, eventHandler, host, bind
-
diff --git a/yocto-poky/bitbake/lib/bb/utils.py b/yocto-poky/bitbake/lib/bb/utils.py
index 31ec2b7..3544bbe 100644
--- a/yocto-poky/bitbake/lib/bb/utils.py
+++ b/yocto-poky/bitbake/lib/bb/utils.py
@@ -33,6 +33,7 @@
 import traceback
 import errno
 import signal
+import ast
 from commands import getstatusoutput
 from contextlib import contextmanager
 from ctypes import cdll
@@ -291,19 +292,26 @@
             error.append('     %.4d:%s' % (i, body[i-1].rstrip()))
     return error
 
-def better_compile(text, file, realfile, mode = "exec"):
+def better_compile(text, file, realfile, mode = "exec", lineno = 0):
     """
     A better compile method. This method
     will print the offending lines.
     """
     try:
-        return compile(text, file, mode)
+        cache = bb.methodpool.compile_cache(text)
+        if cache:
+            return cache
+        # We can't add to the linenumbers for compile, we can pad to the correct number of blank lines though
+        text2 = "\n" * int(lineno) + text
+        code = compile(text2, realfile, mode)
+        bb.methodpool.compile_cache_add(text, code)
+        return code
     except Exception as e:
         error = []
         # split the text into lines again
         body = text.split('\n')
-        error.append("Error in compiling python function in %s:\n" % realfile)
-        if e.lineno:
+        error.append("Error in compiling python function in %s, line %s:\n" % (realfile, lineno))
+        if hasattr(e, "lineno"):
             error.append("The code lines resulting in this error were:")
             error.extend(_print_trace(body, e.lineno))
         else:
@@ -323,8 +331,10 @@
         exception = traceback.format_exception_only(t, value)
         error.append('Error executing a python function in %s:\n' % realfile)
 
-        # Strip 'us' from the stack (better_exec call)
-        tb = tb.tb_next
+        # Strip 'us' from the stack (better_exec call) unless that was where the 
+        # error came from
+        if tb.tb_next is not None:
+            tb = tb.tb_next
 
         textarray = text.split('\n')
 
@@ -353,15 +363,6 @@
                         error.extend(_print_trace(text, tbextract[level+1][1]))
                 except:
                     error.append(tbformat[level+1])
-            elif "d" in context and tbextract[level+1][2]:
-                # Try and find the code in the datastore based on the functionname
-                d = context["d"]
-                functionname = tbextract[level+1][2]
-                text = d.getVar(functionname, True)
-                if text:
-                    error.extend(_print_trace(text.split('\n'), tbextract[level+1][1]))
-                else:
-                    error.append(tbformat[level+1])
             else:
                 error.append(tbformat[level+1])
             nexttb = tb.tb_next
@@ -371,7 +372,7 @@
     finally:
         logger.error("\n".join(error))
 
-def better_exec(code, context, text = None, realfile = "<code>"):
+def better_exec(code, context, text = None, realfile = "<code>", pythonexception=False):
     """
     Similiar to better_compile, better_exec will
     print the lines that are responsible for the
@@ -388,6 +389,8 @@
         # Error already shown so passthrough, no need for traceback
         raise
     except Exception as e:
+        if pythonexception:
+            raise
         (t, value, tb) = sys.exc_info()
         try:
             _print_exception(t, value, tb, realfile, text, context)
@@ -533,6 +536,21 @@
             s.update(line)
     return s.hexdigest()
 
+def sha1_file(filename):
+    """
+    Return the hex string representation of the SHA1 checksum of the filename
+    """
+    try:
+        import hashlib
+    except ImportError:
+        return None
+
+    s = hashlib.sha1()
+    with open(filename, "rb") as f:
+        for line in f:
+            s.update(line)
+    return s.hexdigest()
+
 def preserved_envvars_exported():
     """Variables which are taken from the environment and placed in and exported
     from the metadata"""
@@ -621,7 +639,7 @@
     """
     import bb.data
     for var in bb.data.keys(d):
-        export = d.getVarFlag(var, "export")
+        export = d.getVarFlag(var, "export", False)
         if export:
             os.environ[var] = d.getVar(var, True) or ""
 
@@ -906,6 +924,24 @@
         raise ValueError("Invalid value for to_boolean: %s" % string)
 
 def contains(variable, checkvalues, truevalue, falsevalue, d):
+    """Check if a variable contains all the values specified.
+
+    Arguments:
+
+    variable -- the variable name. This will be fetched and expanded (using
+    d.getVar(variable, True)) and then split into a set().
+
+    checkvalues -- if this is a string it is split on whitespace into a set(),
+    otherwise coerced directly into a set().
+
+    truevalue -- the value to return if checkvalues is a subset of variable.
+
+    falsevalue -- the value to return if variable is empty or if checkvalues is
+    not a subset of variable.
+
+    d -- the data store.
+    """
+
     val = d.getVar(variable, True)
     if not val:
         return falsevalue
@@ -914,7 +950,7 @@
         checkvalues = set(checkvalues.split())
     else:
         checkvalues = set(checkvalues)
-    if checkvalues.issubset(val): 
+    if checkvalues.issubset(val):
         return truevalue
     return falsevalue
 
@@ -1140,7 +1176,7 @@
                 if in_var.endswith('()'):
                     if full_value.count('{') - full_value.count('}') >= 0:
                         continue
-                full_value = full_value[:-1]
+                    full_value = full_value[:-1]
                 if handle_var_end():
                     updated = True
                     checkspc = True
@@ -1385,3 +1421,33 @@
             raise ValueError("Unable to set ioprio, syscall returned %s" % rc)
     else:
         bb.warn("Unable to set IO Prio for arch %s" % _unamearch)
+
+def set_process_name(name):
+    from ctypes import cdll, byref, create_string_buffer
+    # This is nice to have for debugging, not essential
+    try:
+        libc = cdll.LoadLibrary('libc.so.6')
+        buff = create_string_buffer(len(name)+1)
+        buff.value = name
+        libc.prctl(15, byref(buff), 0, 0, 0)
+    except:
+        pass
+
+# export common proxies variables from datastore to environment
+def export_proxies(d):
+    import os
+
+    variables = ['http_proxy', 'HTTP_PROXY', 'https_proxy', 'HTTPS_PROXY',
+                    'ftp_proxy', 'FTP_PROXY', 'no_proxy', 'NO_PROXY']
+    exported = False
+
+    for v in variables:
+        if v in os.environ.keys():
+            exported = True
+        else:
+            v_proxy = d.getVar(v, True)
+            if v_proxy is not None:
+                os.environ[v] = v_proxy
+                exported = True
+
+    return exported
diff --git a/yocto-poky/bitbake/lib/prserv/db.py b/yocto-poky/bitbake/lib/prserv/db.py
index 36c9f7b..2a86184 100644
--- a/yocto-poky/bitbake/lib/prserv/db.py
+++ b/yocto-poky/bitbake/lib/prserv/db.py
@@ -231,6 +231,14 @@
                 datainfo.append(col)
         return (metainfo, datainfo)
 
+    def dump_db(self, fd):
+        writeCount = 0
+        for line in self.conn.iterdump():
+            writeCount = writeCount + len(line) + 1
+            fd.write(line)
+            fd.write('\n')
+        return writeCount
+
 class PRData(object):
     """Object representing the PR database"""
     def __init__(self, filename, nohist=True):
diff --git a/yocto-poky/bitbake/lib/prserv/serv.py b/yocto-poky/bitbake/lib/prserv/serv.py
index eafc3aa..affccd9 100644
--- a/yocto-poky/bitbake/lib/prserv/serv.py
+++ b/yocto-poky/bitbake/lib/prserv/serv.py
@@ -4,6 +4,7 @@
 import threading
 import Queue
 import socket
+import StringIO
 
 try:
     import sqlite3
@@ -59,12 +60,10 @@
         self.register_function(self.quit, "quit")
         self.register_function(self.ping, "ping")
         self.register_function(self.export, "export")
+        self.register_function(self.dump_db, "dump_db")
         self.register_function(self.importone, "importone")
         self.register_introspection_functions()
 
-        self.db = prserv.db.PRData(self.dbfile)
-        self.table = self.db["PRMAIN"]
-
         self.requestqueue = Queue.Queue()
         self.handlerthread = threading.Thread(target = self.process_request_thread)
         self.handlerthread.daemon = False
@@ -79,6 +78,8 @@
         # 60 iterations between syncs or sync if dirty every ~30 seconds
         iterations_between_sync = 60
 
+        bb.utils.set_process_name("PRServ Handler")
+
         while not self.quit:
             try:
                 (request, client_address) = self.requestqueue.get(True, 30)
@@ -98,11 +99,13 @@
             self.table.sync_if_dirty()
 
     def sigint_handler(self, signum, stack):
-        self.table.sync()
+        if self.table:
+            self.table.sync()
 
     def sigterm_handler(self, signum, stack):
-        self.table.sync()
-        raise SystemExit
+        if self.table:
+            self.table.sync()
+        self.quit=True
 
     def process_request(self, request, client_address):
         self.requestqueue.put((request, client_address))
@@ -114,6 +117,26 @@
             logger.error(str(exc))
             return None
 
+    def dump_db(self):
+        """
+        Returns a script (string) that reconstructs the state of the
+        entire database at the time this function is called. The script
+        language is defined by the backing database engine, which is a
+        function of server configuration.
+        Returns None if the database engine does not support dumping to
+        script or if some other error is encountered in processing.
+        """
+        buff = StringIO.StringIO()
+        try:
+            self.table.sync()
+            self.table.dump_db(buff)
+            return buff.getvalue()
+        except Exception as exc:
+            logger.error(str(exc))
+            return None
+        finally:
+            buff.close()
+
     def importone(self, version, pkgarch, checksum, value):
         return self.table.importone(version, pkgarch, checksum, value)
 
@@ -141,6 +164,12 @@
         self.quit = False
         self.timeout = 0.5
 
+        bb.utils.set_process_name("PRServ")
+
+        # DB connection must be created after all forks
+        self.db = prserv.db.PRData(self.dbfile)
+        self.table = self.db["PRMAIN"]
+
         logger.info("Started PRServer with DBfile: %s, IP: %s, PORT: %s, PID: %s" %
                      (self.dbfile, self.host, self.port, str(os.getpid())))
 
@@ -209,7 +238,6 @@
     def cleanup_handles(self):
         signal.signal(signal.SIGINT, self.sigint_handler)
         signal.signal(signal.SIGTERM, self.sigterm_handler)
-        os.umask(0)
         os.chdir("/")
 
         sys.stdout.flush()
@@ -282,6 +310,9 @@
     def export(self,version=None, pkgarch=None, checksum=None, colinfo=True):
         return self.connection.export(version, pkgarch, checksum, colinfo)
 
+    def dump_db(self):
+        return self.connection.dump_db()
+
     def importone(self, version, pkgarch, checksum, value):
         return self.connection.importone(version, pkgarch, checksum, value)
 
diff --git a/yocto-poky/bitbake/lib/toaster/bldcollector/urls.py b/yocto-poky/bitbake/lib/toaster/bldcollector/urls.py
index 144387b..64722f2 100644
--- a/yocto-poky/bitbake/lib/toaster/bldcollector/urls.py
+++ b/yocto-poky/bitbake/lib/toaster/bldcollector/urls.py
@@ -18,7 +18,6 @@
 
 
 from django.conf.urls import patterns, include, url
-from django.views.generic import RedirectView
 
 urlpatterns = patterns('bldcollector.views',
         # landing point for pushing a bitbake_eventlog.json file to this toaster instace
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py
index ad70ac8..d09ac17 100644
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py
+++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/bbcontroller.py
@@ -37,11 +37,12 @@
         It is outside the scope of this class on how the server is started and aquired
     """
 
-    def __init__(self, connection):
-        self.connection = connection
+    def __init__(self, be):
+        self.connection = bb.server.xmlrpc._create_server(be.bbaddress,
+                                                          int(be.bbport))[0]
 
     def _runCommand(self, command):
-        result, error = self.connection.connection.runCommand(command)
+        result, error = self.connection.runCommand(command)
         if error:
             raise Exception(error)
         return result
@@ -52,11 +53,20 @@
     def setVariable(self, name, value):
         return self._runCommand(["setVariable", name, value])
 
+    def getVariable(self, name):
+        return self._runCommand(["getVariable", name])
+
+    def triggerEvent(self, event):
+        return self._runCommand(["triggerEvent", event])
+
     def build(self, targets, task = None):
         if task is None:
             task = "build"
         return self._runCommand(["buildTargets", targets, task])
 
+    def forceShutDown(self):
+        return self._runCommand(["stateForceShutdown"])
+
 
 
 def getBuildEnvironmentController(**kwargs):
@@ -70,13 +80,10 @@
     """
 
     from localhostbecontroller import LocalhostBEController
-    from sshbecontroller    import SSHBEController
 
     be = BuildEnvironment.objects.filter(Q(**kwargs))[0]
     if be.betype == BuildEnvironment.TYPE_LOCAL:
         return LocalhostBEController(be)
-    elif be.betype == BuildEnvironment.TYPE_SSH:
-        return SSHBEController(be)
     else:
         raise Exception("FIXME: Implement BEC for type %s" % str(be.betype))
 
@@ -99,9 +106,6 @@
         on the local machine, with the "build/" directory under the "poky/" source checkout directory.
         Bash is expected to be available.
 
-            * SSH controller will run the Toaster BE on a remote machine, where the current user
-        can connect without raise Exception("FIXME: implement")word (set up with either ssh-agent or raise Exception("FIXME: implement")phrase-less key authentication)
-
     """
     def __init__(self, be):
         """ Takes a BuildEnvironment object as parameter that points to the settings of the BE.
@@ -109,89 +113,25 @@
         self.be = be
         self.connection = None
 
-    @staticmethod
-    def _updateBBLayers(bblayerconf, layerlist):
-        conflines = open(bblayerconf, "r").readlines()
-
-        bblayerconffile = open(bblayerconf, "w")
-        skip = 0
-        for i in xrange(len(conflines)):
-            if skip > 0:
-                skip =- 1
-                continue
-            if conflines[i].startswith("# line added by toaster"):
-                skip = 1
-            else:
-                bblayerconffile.write(conflines[i])
-
-        bblayerconffile.write("# line added by toaster build control\nBBLAYERS = \"" + " ".join(layerlist) + "\"")
-        bblayerconffile.close()
-
-
-    def writeConfFile(self, variable_list = None, raw = None):
-        """ Writes a configuration file in the build directory. Override with buildenv-specific implementation. """
-        raise Exception("FIXME: Must override to actually write a configuration file")
-
-
-    def startBBServer(self):
-        """ Starts a  BB server with Toaster toasterui set up to record the builds, an no controlling UI.
-            After this method executes, self.be bbaddress/bbport MUST point to a running and free server,
-            and the bbstate MUST be  updated to "started".
-        """
-        raise Exception("FIXME: Must override in order to actually start the BB server")
-
-    def stopBBServer(self):
-        """ Stops the currently running BB server.
-            The bbstate MUST be updated to "stopped".
-            self.connection must be none.
-        """
-        raise Exception("FIXME: Must override stoBBServer")
-
-    def setLayers(self, bbs, ls):
+    def setLayers(self, bitbake, ls):
         """ Checks-out bitbake executor and layers from git repositories.
             Sets the layer variables in the config file, after validating local layer paths.
-            The bitbakes must be a 1-length list of BRBitbake
+            bitbake must be a single BRBitbake instance
             The layer paths must be in a list of BRLayer object
 
             a word of attention: by convention, the first layer for any build will be poky!
         """
-        raise Exception("FIXME: Must override setLayers")
-
-
-    def getBBController(self):
-        """ returns a BitbakeController to an already started server; this is the point where the server
-            starts if needed; or reconnects to the server if we can
-        """
-        if not self.connection:
-            self.startBBServer()
-            self.be.lock = BuildEnvironment.LOCK_RUNNING
-            self.be.save()
-
-        server = bb.server.xmlrpc.BitBakeXMLRPCClient()
-        server.initServer()
-        server.saveConnectionDetails("%s:%s" % (self.be.bbaddress, self.be.bbport))
-        self.connection = server.establishConnection([])
-
-        self.be.bbtoken = self.connection.transport.connection_token
-        self.be.save()
-
-        return BitbakeController(self.connection)
+        raise NotImplementedError("FIXME: Must override setLayers")
 
     def getArtifact(self, path):
         """ This call returns an artifact identified by the 'path'. How 'path' is interpreted as
             up to the implementing BEC. The return MUST be a REST URL where a GET will actually return
             the content of the artifact, e.g. for use as a "download link" in a web UI.
         """
-        raise Exception("Must return the REST URL of the artifact")
-
-    def release(self):
-        """ This stops the server and releases any resources. After this point, all resources
-            are un-available for further reference
-        """
-        raise Exception("Must override BE release")
+        raise NotImplementedError("Must return the REST URL of the artifact")
 
     def triggerBuild(self, bitbake, layers, variables, targets):
-        raise Exception("Must override BE release")
+        raise NotImplementedError("Must override BE release")
 
 class ShellCmdException(Exception):
     pass
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
index b5cf559..7def1f3 100644
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
+++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/localhostbecontroller.py
@@ -32,7 +32,7 @@
 
 from toastermain import settings
 
-from bbcontroller import BuildEnvironmentController, ShellCmdException, BuildSetupException
+from bbcontroller import BuildEnvironmentController, ShellCmdException, BuildSetupException, BitbakeController
 
 import logging
 logger = logging.getLogger("toaster")
@@ -48,16 +48,17 @@
 
     def __init__(self, be):
         super(LocalhostBEController, self).__init__(be)
-        self.dburl = settings.getDATABASE_URL()
         self.pokydirname = None
         self.islayerset = False
 
-    def _shellcmd(self, command, cwd = None):
+    def _shellcmd(self, command, cwd=None, nowait=False):
         if cwd is None:
             cwd = self.be.sourcedir
 
         logger.debug("lbc_shellcmmd: (%s) %s" % (cwd, command))
         p = subprocess.Popen(command, cwd = cwd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+        if nowait:
+            return
         (out,err) = p.communicate()
         p.wait()
         if p.returncode:
@@ -71,115 +72,6 @@
             logger.debug("localhostbecontroller: shellcmd success")
             return out
 
-    def _setupBE(self):
-        assert self.pokydirname and os.path.exists(self.pokydirname)
-        path = self.be.builddir
-        if not path:
-            raise Exception("Invalid path creation specified.")
-        if not os.path.exists(path):
-            os.makedirs(path, 0755)
-        self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, path))
-        # delete the templateconf.cfg; it may come from an unsupported layer configuration
-        os.remove(os.path.join(path, "conf/templateconf.cfg"))
-
-
-    def writeConfFile(self, file_name, variable_list = None, raw = None):
-        filepath = os.path.join(self.be.builddir, file_name)
-        with open(filepath, "w") as conffile:
-            if variable_list is not None:
-                for i in variable_list:
-                    conffile.write("%s=\"%s\"\n" % (i.name, i.value))
-            if raw is not None:
-                conffile.write(raw)
-
-
-    def startBBServer(self):
-        assert self.pokydirname and os.path.exists(self.pokydirname)
-        assert self.islayerset
-
-        # find our own toasterui listener/bitbake
-        from toaster.bldcontrol.management.commands.loadconf import _reduce_canon_path
-
-        own_bitbake = _reduce_canon_path(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../../bin/bitbake"))
-
-        assert os.path.exists(own_bitbake) and os.path.isfile(own_bitbake)
-
-        logger.debug("localhostbecontroller: running the listener at %s" % own_bitbake)
-
-        toaster_ui_log_filepath = os.path.join(self.be.builddir, "toaster_ui.log")
-        # get the file length; we need to detect the _last_ start of the toaster UI, not the first
-        toaster_ui_log_filelength = 0
-        if os.path.exists(toaster_ui_log_filepath):
-            with open(toaster_ui_log_filepath, "w") as f:
-                f.seek(0, 2)    # jump to the end
-                toaster_ui_log_filelength = f.tell()
-
-        cmd = "bash -c \"source %s/oe-init-build-env %s 2>&1 >toaster_server.log && bitbake --read %s/conf/toaster-pre.conf --postread %s/conf/toaster.conf --server-only -t xmlrpc -B 0.0.0.0:0 2>&1 >>toaster_server.log \"" % (self.pokydirname, self.be.builddir, self.be.builddir, self.be.builddir)
-
-        port = "-1"
-        logger.debug("localhostbecontroller: starting builder \n%s\n" % cmd)
-
-        cmdoutput = self._shellcmd(cmd)
-        with open(self.be.builddir + "/toaster_server.log", "r") as f:
-            for i in f.readlines():
-                if i.startswith("Bitbake server address"):
-                    port = i.split(" ")[-1]
-                    logger.debug("localhostbecontroller: Found bitbake server port %s" % port)
-
-        cmd = "bash -c \"source %s/oe-init-build-env-memres -1 %s && DATABASE_URL=%s %s --observe-only -u toasterui --remote-server=0.0.0.0:-1 -t xmlrpc\"" % (self.pokydirname, self.be.builddir, self.dburl, own_bitbake)
-        with open(toaster_ui_log_filepath, "a+") as f:
-            p = subprocess.Popen(cmd, cwd = self.be.builddir, shell=True, stdout=f, stderr=f)
-
-        def _toaster_ui_started(filepath, filepos = 0):
-            if not os.path.exists(filepath):
-                return False
-            with open(filepath, "r") as f:
-                f.seek(filepos)
-                for line in f:
-                    if line.startswith("NOTE: ToasterUI waiting for events"):
-                        return True
-            return False
-
-        retries = 0
-        started = False
-        while not started and retries < 50:
-            started = _toaster_ui_started(toaster_ui_log_filepath, toaster_ui_log_filelength)
-            import time
-            logger.debug("localhostbecontroller: Waiting bitbake server to start")
-            time.sleep(0.5)
-            retries += 1
-
-        if not started:
-            toaster_ui_log = open(os.path.join(self.be.builddir, "toaster_ui.log"), "r").read()
-            toaster_server_log = open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read()
-            raise BuildSetupException("localhostbecontroller: Bitbake server did not start in 25 seconds, aborting (Error: '%s' '%s')" % (toaster_ui_log, toaster_server_log))
-
-        logger.debug("localhostbecontroller: Started bitbake server")
-
-        while port == "-1":
-            # the port specification is "autodetect"; read the bitbake.lock file
-            with open("%s/bitbake.lock" % self.be.builddir, "r") as f:
-                for line in f.readlines():
-                    if ":" in line:
-                        port = line.split(":")[1].strip()
-                        logger.debug("localhostbecontroller: Autodetected bitbake port %s", port)
-                        break
-
-        assert self.be.sourcedir and os.path.exists(self.be.builddir)
-        self.be.bbaddress = "localhost"
-        self.be.bbport = port
-        self.be.bbstate = BuildEnvironment.SERVER_STARTED
-        self.be.save()
-
-    def stopBBServer(self):
-        assert self.pokydirname and os.path.exists(self.pokydirname)
-        assert self.islayerset
-        self._shellcmd("bash -c \"source %s/oe-init-build-env %s && %s source toaster stop\"" %
-            (self.pokydirname, self.be.builddir, (lambda: "" if self.be.bbtoken is None else "BBTOKEN=%s" % self.be.bbtoken)()))
-        self.be.bbstate = BuildEnvironment.SERVER_STOPPED
-        self.be.save()
-        logger.debug("localhostbecontroller: Stopped bitbake server")
-
     def getGitCloneDirectory(self, url, branch):
         """Construct unique clone directory name out of url and branch."""
         if branch != "HEAD":
@@ -193,22 +85,22 @@
         return local_checkout_path
 
 
-    def setLayers(self, bitbakes, layers, targets):
+    def setLayers(self, bitbake, layers, targets):
         """ a word of attention: by convention, the first layer for any build will be poky! """
 
         assert self.be.sourcedir is not None
-        assert len(bitbakes) == 1
         # set layers in the layersource
 
         # 1. get a list of repos with branches, and map dirpaths for each layer
         gitrepos = {}
 
-        gitrepos[(bitbakes[0].giturl, bitbakes[0].commit)] = []
-        gitrepos[(bitbakes[0].giturl, bitbakes[0].commit)].append( ("bitbake", bitbakes[0].dirpath) )
+        gitrepos[(bitbake.giturl, bitbake.commit)] = []
+        gitrepos[(bitbake.giturl, bitbake.commit)].append( ("bitbake", bitbake.dirpath) )
 
         for layer in layers:
-            # we don't process local URLs
-            if layer.giturl.startswith("file://"):
+            # We don't need to git clone the layer for the CustomImageRecipe
+            # as it's generated by us layer on if needed
+            if CustomImageRecipe.LAYER_NAME in layer.name:
                 continue
             if not (layer.giturl, layer.commit) in gitrepos:
                 gitrepos[(layer.giturl, layer.commit)] = []
@@ -276,7 +168,7 @@
                 # make sure we have a working bitbake
                 if not os.path.exists(os.path.join(self.pokydirname, 'bitbake')):
                     logger.debug("localhostbecontroller: checking bitbake into the poky dirname %s " % self.pokydirname)
-                    self._shellcmd("git clone -b \"%s\" \"%s\" \"%s\" " % (bitbakes[0].commit, bitbakes[0].giturl, os.path.join(self.pokydirname, 'bitbake')))
+                    self._shellcmd("git clone -b \"%s\" \"%s\" \"%s\" " % (bitbake.commit, bitbake.giturl, os.path.join(self.pokydirname, 'bitbake')))
 
             # verify our repositories
             for name, dirpath in gitrepos[(giturl, commit)]:
@@ -290,23 +182,13 @@
 
         logger.debug("localhostbecontroller: current layer list %s " % pformat(layerlist))
 
-        # 4. configure the build environment, so we have a conf/bblayers.conf
-        assert self.pokydirname is not None
-        self._setupBE()
-
-        # 5. update the bblayers.conf
-        bblayerconf = os.path.join(self.be.builddir, "conf/bblayers.conf")
-        if not os.path.exists(bblayerconf):
-            raise BuildSetupException("BE is not consistent: bblayers.conf file missing at %s" % bblayerconf)
-
-        # 6. create custom layer and add custom recipes to it
-        layerpath = os.path.join(self.be.sourcedir, "_meta-toaster-custom")
-        if os.path.isdir(layerpath):
-            shutil.rmtree(layerpath) # remove leftovers from previous builds
+        # 5. create custom layer and add custom recipes to it
+        layerpath = os.path.join(self.be.builddir,
+                                 CustomImageRecipe.LAYER_NAME)
         for target in targets:
             try:
                 customrecipe = CustomImageRecipe.objects.get(name=target.target,
-                                                             project=bitbakes[0].req.project)
+                                                             project=bitbake.req.project)
             except CustomImageRecipe.DoesNotExist:
                 continue # not a custom recipe, skip
 
@@ -322,60 +204,129 @@
                 with open(config, "w") as conf:
                     conf.write('BBPATH .= ":${LAYERDIR}"\nBBFILES += "${LAYERDIR}/recipes/*.bb"\n')
 
+            # Update the Layer_Version dirpath that has our base_recipe in
+            # to be able to read the base recipe to then  generate the
+            # custom recipe.
+            br_layer_base_recipe = layers.get(
+                layer_version=customrecipe.base_recipe.layer_version)
+
+            br_layer_base_dirpath = \
+                    os.path.join(self.be.sourcedir,
+                                 self.getGitCloneDirectory(
+                                     br_layer_base_recipe.giturl,
+                                     br_layer_base_recipe.commit),
+                                 customrecipe.base_recipe.layer_version.dirpath
+                                )
+
+            customrecipe.base_recipe.layer_version.dirpath = \
+                         br_layer_base_dirpath
+
+            customrecipe.base_recipe.layer_version.save()
+
             # create recipe
-            recipe = os.path.join(layerpath, "recipes", "%s.bb" % target.target)
-            with open(recipe, "w") as recipef:
-                recipef.write("require %s\n" % customrecipe.base_recipe.recipe.file_path)
-                packages = [pkg.name for pkg in customrecipe.packages.all()]
-                if packages:
-                    recipef.write('IMAGE_INSTALL = "%s"\n' % ' '.join(packages))
+            recipe_path = \
+                    os.path.join(layerpath, "recipes", "%s.bb" % target.target)
+            with open(recipe_path, "w") as recipef:
+                recipef.write(customrecipe.generate_recipe_file_contents())
+
+            # Update the layer and recipe objects
+            customrecipe.layer_version.dirpath = layerpath
+            customrecipe.layer_version.save()
+
+            customrecipe.file_path = recipe_path
+            customrecipe.save()
 
             # create *Layer* objects needed for build machinery to work
-            layer = Layer.objects.get_or_create(name="Toaster Custom layer",
-                                                summary="Layer for custom recipes",
-                                                vcs_url="file://%s" % layerpath)[0]
-            breq = target.req
-            lver = Layer_Version.objects.get_or_create(project=breq.project, layer=layer,
-                                                       dirpath=layerpath, build=breq.build)[0]
-            ProjectLayer.objects.get_or_create(project=breq.project, layercommit=lver,
-                                               optional=False)
-            BRLayer.objects.get_or_create(req=breq, name=layer.name, dirpath=layerpath,
+            BRLayer.objects.get_or_create(req=target.req,
+                                          name=layer.name,
+                                          dirpath=layerpath,
                                           giturl="file://%s" % layerpath)
         if os.path.isdir(layerpath):
             layerlist.append(layerpath)
 
-        BuildEnvironmentController._updateBBLayers(bblayerconf, layerlist)
-
         self.islayerset = True
-        return True
+        return layerlist
 
     def readServerLogFile(self):
         return open(os.path.join(self.be.builddir, "toaster_server.log"), "r").read()
 
-    def release(self):
-        assert self.be.sourcedir and os.path.exists(self.be.builddir)
-        import shutil
-        shutil.rmtree(os.path.join(self.be.sourcedir, "build"))
-        assert not os.path.exists(self.be.builddir)
 
+    def triggerBuild(self, bitbake, layers, variables, targets, brbe):
+        layers = self.setLayers(bitbake, layers, targets)
 
-    def triggerBuild(self, bitbake, layers, variables, targets):
-        # set up the buid environment with the needed layers
-        self.setLayers(bitbake, layers, targets)
-        self.writeConfFile("conf/toaster-pre.conf", variables)
-        self.writeConfFile("conf/toaster.conf", raw = "INHERIT+=\"toaster buildhistory\"")
+        # init build environment from the clone
+        builddir = '%s-toaster-%d' % (self.be.builddir, bitbake.req.project.id)
+        oe_init = os.path.join(self.pokydirname, 'oe-init-build-env')
+        # init build environment
+        self._shellcmd("bash -c 'source %s %s'" % (oe_init, builddir),
+                       self.be.sourcedir)
 
-        # get the bb server running with the build req id and build env id
-        bbctrl = self.getBBController()
+        # update bblayers.conf
+        bblconfpath = os.path.join(builddir, "conf/bblayers.conf")
+        conflines = open(bblconfpath, "r").readlines()
+        skip = False
+        with open(bblconfpath, 'w') as bblayers:
+            for line in conflines:
+                if line.startswith("# line added by toaster"):
+                    skip = True
+                    continue
+                if skip:
+                    skip = False
+                else:
+                    bblayers.write(line)
 
-        # trigger the build command
-        task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, targets))
-        if len(task) == 0:
-            task = None
+            bblayers.write('# line added by toaster build control\n'
+                           'BBLAYERS = "%s"' % ' '.join(layers))
 
-        bbctrl.build(list(map(lambda x:x.target, targets)), task)
+        # write configuration file
+        confpath = os.path.join(builddir, 'conf/toaster.conf')
+        with open(confpath, 'w') as conf:
+            for var in variables:
+                conf.write('%s="%s"\n' % (var.name, var.value))
+            conf.write('INHERIT+="toaster buildhistory"')
 
-        logger.debug("localhostbecontroller: Build launched, exiting. Follow build logs at %s/toaster_ui.log" % self.be.builddir)
+        # run bitbake server from the clone
+        bitbake = os.path.join(self.pokydirname, 'bitbake', 'bin', 'bitbake')
+        self._shellcmd('bash -c \"source %s %s; BITBAKE_UI="" %s --read %s '
+                       '--server-only -t xmlrpc -B 0.0.0.0:0\"' % (oe_init,
+                       builddir, bitbake, confpath), self.be.sourcedir)
 
-        # disconnect from the server
-        bbctrl.disconnect()
+        # read port number from bitbake.lock
+        self.be.bbport = ""
+        bblock = os.path.join(builddir, 'bitbake.lock')
+        with open(bblock) as fplock:
+            for line in fplock:
+                if ":" in line:
+                    self.be.bbport = line.split(":")[-1].strip()
+                    logger.debug("localhostbecontroller: bitbake port %s", self.be.bbport)
+                    break
+
+        if not self.be.bbport:
+            raise BuildSetupException("localhostbecontroller: can't read bitbake port from %s" % bblock)
+
+        self.be.bbaddress = "localhost"
+        self.be.bbstate = BuildEnvironment.SERVER_STARTED
+        self.be.lock = BuildEnvironment.LOCK_RUNNING
+        self.be.save()
+
+        bbtargets = ''
+        for target in targets:
+            task = target.task
+            if task:
+                if not task.startswith('do_'):
+                    task = 'do_' + task
+                task = ':%s' % task
+            bbtargets += '%s%s ' % (target.target, task)
+
+        # run build with local bitbake. stop the server after the build.
+        log = os.path.join(builddir, 'toaster_ui.log')
+        local_bitbake = os.path.join(os.path.dirname(os.getenv('BBBASEDIR')),
+                                     'bitbake')
+        self._shellcmd(['bash -c \"(TOASTER_BRBE="%s" BBSERVER="0.0.0.0:-1" '
+                        '%s %s -u toasterui --token="" >>%s 2>&1;'
+                        'BITBAKE_UI="" BBSERVER=0.0.0.0:-1 %s -m)&\"' \
+                        % (brbe, local_bitbake, bbtargets, log, bitbake)],
+                        builddir, nowait=True)
+
+        logger.debug('localhostbecontroller: Build launched, exiting. '
+                     'Follow build logs at %s' % log)
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index 48dc618..27289be 100644
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -1,43 +1,50 @@
 from django.core.management.base import NoArgsCommand, CommandError
 from django.db import transaction
+from django.db.models import Q
+
+from bldcontrol.bbcontroller import getBuildEnvironmentController
+from bldcontrol.bbcontroller import ShellCmdException, BuildSetupException
+from bldcontrol.models import BuildRequest, BuildEnvironment
+from bldcontrol.models import BRError, BRVariable
+
 from orm.models import Build, ToasterSetting, LogMessage, Target
-from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException, BuildSetupException
-from bldcontrol.models import BuildRequest, BuildEnvironment, BRError, BRVariable
+
 import os
 import logging
 import time
+import sys
+import traceback
 
-logger = logging.getLogger("ToasterScheduler")
+logger = logging.getLogger("toaster")
 
 class Command(NoArgsCommand):
     args    = ""
-    help    = "Schedules and executes build requests as possible. Does not return (interrupt with Ctrl-C)"
+    help    = "Schedules and executes build requests as possible."
+    "Does not return (interrupt with Ctrl-C)"
 
 
-    @transaction.commit_on_success
+    @transaction.atomic
     def _selectBuildEnvironment(self):
         bec = getBuildEnvironmentController(lock = BuildEnvironment.LOCK_FREE)
         bec.be.lock = BuildEnvironment.LOCK_LOCK
         bec.be.save()
         return bec
 
-    @transaction.commit_on_success
+    @transaction.atomic
     def _selectBuildRequest(self):
-        br = BuildRequest.objects.filter(state = BuildRequest.REQ_QUEUED).order_by('pk')[0]
-        br.state = BuildRequest.REQ_INPROGRESS
-        br.save()
+        br = BuildRequest.objects.filter(state=BuildRequest.REQ_QUEUED).first()
         return br
 
     def schedule(self):
-        import traceback
         try:
-            br = None
-            try:
-                # select the build environment and the request to build
-                br = self._selectBuildRequest()
-            except IndexError as e:
-                #logger.debug("runbuilds: No build request")
+            # select the build environment and the request to build
+            br = self._selectBuildRequest()
+            if br:
+                br.state = BuildRequest.REQ_INPROGRESS
+                br.save()
+            else:
                 return
+
             try:
                 bec = self._selectBuildEnvironment()
             except IndexError as e:
@@ -47,17 +54,17 @@
                 logger.debug("runbuilds: No build env")
                 return
 
-            logger.debug("runbuilds: starting build %s, environment %s" % (br, bec.be))
-
-            # write the build identification variable
-            BRVariable.objects.create(req = br, name="TOASTER_BRBE", value="%d:%d" % (br.pk, bec.be.pk))
+            logger.debug("runbuilds: starting build %s, environment %s" % \
+                         (str(br).decode('utf-8'), bec.be))
 
             # let the build request know where it is being executed
             br.environment = bec.be
             br.save()
 
             # this triggers an async build
-            bec.triggerBuild(br.brbitbake_set.all(), br.brlayer_set.all(), br.brvariable_set.all(), br.brtarget_set.all())
+            bec.triggerBuild(br.brbitbake, br.brlayer_set.all(),
+                             br.brvariable_set.all(), br.brtarget_set.all(),
+                             "%d:%d" % (br.pk, bec.be.pk))
 
         except Exception as e:
             logger.error("runbuilds: Error launching build %s" % e)
@@ -88,29 +95,41 @@
     def cleanup(self):
         from django.utils import timezone
         from datetime import timedelta
-        # environments locked for more than 30 seconds - they should be unlocked
-        BuildEnvironment.objects.filter(buildrequest__state__in=[BuildRequest.REQ_FAILED, BuildRequest.REQ_COMPLETED]).filter(lock=BuildEnvironment.LOCK_LOCK).filter(updated__lt = timezone.now() - timedelta(seconds = 30)).update(lock = BuildEnvironment.LOCK_FREE)
+        # environments locked for more than 30 seconds
+        # they should be unlocked
+        BuildEnvironment.objects.filter(
+            Q(buildrequest__state__in=[BuildRequest.REQ_FAILED,
+                                       BuildRequest.REQ_COMPLETED,
+                                       BuildRequest.REQ_CANCELLING]) &
+            Q(lock=BuildEnvironment.LOCK_LOCK) &
+            Q(updated__lt=timezone.now() - timedelta(seconds = 30))
+        ).update(lock=BuildEnvironment.LOCK_FREE)
 
 
-        # update all Builds that failed to start
-
-        for br in BuildRequest.objects.filter(state = BuildRequest.REQ_FAILED, build__outcome = Build.IN_PROGRESS):
+        # update all Builds that were in progress and failed to start
+        for br in BuildRequest.objects.filter(
+            state=BuildRequest.REQ_FAILED,
+            build__outcome=Build.IN_PROGRESS):
             # transpose the launch errors in ToasterExceptions
             br.build.outcome = Build.FAILED
             for brerror in br.brerror_set.all():
                 logger.debug("Saving error %s" % brerror)
-                LogMessage.objects.create(build = br.build, level = LogMessage.EXCEPTION, message = brerror.errmsg)
+                LogMessage.objects.create(build=br.build,
+                                          level=LogMessage.EXCEPTION,
+                                          message=brerror.errmsg)
             br.build.save()
 
-            # we don't have a true build object here; hence, toasterui didn't have a change to release the BE lock
+            # we don't have a true build object here; hence, toasterui
+            # didn't have a change to release the BE lock
             br.environment.lock = BuildEnvironment.LOCK_FREE
             br.environment.save()
 
 
-
         # update all BuildRequests without a build created
         for br in BuildRequest.objects.filter(build = None):
-            br.build = Build.objects.create(project = br.project, completed_on = br.updated, started_on = br.created)
+            br.build = Build.objects.create(project=br.project,
+                                            completed_on=br.updated,
+                                            started_on=br.created)
             br.build.outcome = Build.FAILED
             try:
                 br.build.machine = br.brvariable_set.get(name='MACHINE').value
@@ -119,22 +138,42 @@
             br.save()
             # transpose target information
             for brtarget in br.brtarget_set.all():
-                Target.objects.create(build=br.build, target=brtarget.target, task=brtarget.task)
+                Target.objects.create(build=br.build,
+                                      target=brtarget.target,
+                                      task=brtarget.task)
             # transpose the launch errors in ToasterExceptions
             for brerror in br.brerror_set.all():
-                LogMessage.objects.create(build = br.build, level = LogMessage.EXCEPTION, message = brerror.errmsg)
+                LogMessage.objects.create(build=br.build,
+                                          level=LogMessage.EXCEPTION,
+                                          message=brerror.errmsg)
 
             br.build.save()
-        pass
+
+        # Make sure the LOCK is removed for builds which have been fully
+        # cancelled
+        for br in BuildRequest.objects.filter(
+            Q(build__outcome=Build.CANCELLED) &
+            Q(state=BuildRequest.REQ_CANCELLING) &
+            ~Q(environment=None)):
+            br.environment.lock = BuildEnvironment.LOCK_FREE
+            br.environment.save()
 
 
     def handle_noargs(self, **options):
         while True:
             try:
                 self.cleanup()
+            except Exception as e:
+                logger.warn("runbuilds: cleanup exception %s" % str(e))
+
+            try:
                 self.archive()
+            except Exception as e:
+                logger.warn("runbuilds: archive exception %s" % str(e))
+
+            try:
                 self.schedule()
-            except:
-                pass
+            except Exception as e:
+                logger.warn("runbuilds: schedule exception %s" % str(e))
 
             time.sleep(1)
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py
index a7e6350..67db378 100644
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py
+++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0001_initial.py
@@ -1,154 +1,113 @@
 # -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
+from __future__ import unicode_literals
+
+from django.db import migrations, models
 
 
-class Migration(SchemaMigration):
+class Migration(migrations.Migration):
 
-    def forwards(self, orm):
-        # Adding model 'BuildEnvironment'
-        db.create_table(u'bldcontrol_buildenvironment', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('address', self.gf('django.db.models.fields.CharField')(max_length=254)),
-            ('betype', self.gf('django.db.models.fields.IntegerField')()),
-            ('bbaddress', self.gf('django.db.models.fields.CharField')(max_length=254, blank=True)),
-            ('bbport', self.gf('django.db.models.fields.IntegerField')(default=-1)),
-            ('bbtoken', self.gf('django.db.models.fields.CharField')(max_length=126, blank=True)),
-            ('bbstate', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('lock', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
-            ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
-        ))
-        db.send_create_signal(u'bldcontrol', ['BuildEnvironment'])
+    dependencies = [
+        ('orm', '0001_initial'),
+    ]
 
-        # Adding model 'BuildRequest'
-        db.create_table(u'bldcontrol_buildrequest', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'])),
-            ('build', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'], null=True)),
-            ('state', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
-            ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
-        ))
-        db.send_create_signal(u'bldcontrol', ['BuildRequest'])
-
-        # Adding model 'BRLayer'
-        db.create_table(u'bldcontrol_brlayer', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('req', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildRequest'])),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('giturl', self.gf('django.db.models.fields.CharField')(max_length=254)),
-            ('commit', self.gf('django.db.models.fields.CharField')(max_length=254)),
-        ))
-        db.send_create_signal(u'bldcontrol', ['BRLayer'])
-
-        # Adding model 'BRVariable'
-        db.create_table(u'bldcontrol_brvariable', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('req', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildRequest'])),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('value', self.gf('django.db.models.fields.TextField')(blank=True)),
-        ))
-        db.send_create_signal(u'bldcontrol', ['BRVariable'])
-
-        # Adding model 'BRTarget'
-        db.create_table(u'bldcontrol_brtarget', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('req', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildRequest'])),
-            ('target', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('task', self.gf('django.db.models.fields.CharField')(max_length=100, null=True)),
-        ))
-        db.send_create_signal(u'bldcontrol', ['BRTarget'])
-
-
-    def backwards(self, orm):
-        # Deleting model 'BuildEnvironment'
-        db.delete_table(u'bldcontrol_buildenvironment')
-
-        # Deleting model 'BuildRequest'
-        db.delete_table(u'bldcontrol_buildrequest')
-
-        # Deleting model 'BRLayer'
-        db.delete_table(u'bldcontrol_brlayer')
-
-        # Deleting model 'BRVariable'
-        db.delete_table(u'bldcontrol_brvariable')
-
-        # Deleting model 'BRTarget'
-        db.delete_table(u'bldcontrol_brtarget')
-
-
-    models = {
-        u'bldcontrol.brlayer': {
-            'Meta': {'object_name': 'BRLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
-        },
-        u'bldcontrol.brtarget': {
-            'Meta': {'object_name': 'BRTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'bldcontrol.brvariable': {
-            'Meta': {'object_name': 'BRVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'bldcontrol.buildenvironment': {
-            'Meta': {'object_name': 'BuildEnvironment'},
-            'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
-            'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
-            'betype': ('django.db.models.fields.IntegerField', [], {}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'bldcontrol.buildrequest': {
-            'Meta': {'object_name': 'BuildRequest'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        }
-    }
-
-    complete_apps = ['bldcontrol']
+    operations = [
+        migrations.CreateModel(
+            name='BRBitbake',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('giturl', models.CharField(max_length=254)),
+                ('commit', models.CharField(max_length=254)),
+                ('dirpath', models.CharField(max_length=254)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='BRError',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('errtype', models.CharField(max_length=100)),
+                ('errmsg', models.TextField()),
+                ('traceback', models.TextField()),
+            ],
+        ),
+        migrations.CreateModel(
+            name='BRLayer',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=100)),
+                ('giturl', models.CharField(max_length=254)),
+                ('commit', models.CharField(max_length=254)),
+                ('dirpath', models.CharField(max_length=254)),
+                ('layer_version', models.ForeignKey(to='orm.Layer_Version', null=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='BRTarget',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('target', models.CharField(max_length=100)),
+                ('task', models.CharField(max_length=100, null=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='BRVariable',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=100)),
+                ('value', models.TextField(blank=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='BuildEnvironment',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('address', models.CharField(max_length=254)),
+                ('betype', models.IntegerField(choices=[(0, b'local'), (1, b'ssh')])),
+                ('bbaddress', models.CharField(max_length=254, blank=True)),
+                ('bbport', models.IntegerField(default=-1)),
+                ('bbtoken', models.CharField(max_length=126, blank=True)),
+                ('bbstate', models.IntegerField(default=0, choices=[(0, b'stopped'), (1, b'started')])),
+                ('sourcedir', models.CharField(max_length=512, blank=True)),
+                ('builddir', models.CharField(max_length=512, blank=True)),
+                ('lock', models.IntegerField(default=0, choices=[(0, b'free'), (1, b'lock'), (2, b'running')])),
+                ('created', models.DateTimeField(auto_now_add=True)),
+                ('updated', models.DateTimeField(auto_now=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='BuildRequest',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('state', models.IntegerField(default=0, choices=[(0, b'created'), (1, b'queued'), (2, b'in progress'), (3, b'completed'), (4, b'failed'), (5, b'deleted'), (6, b'archive')])),
+                ('created', models.DateTimeField(auto_now_add=True)),
+                ('updated', models.DateTimeField(auto_now=True)),
+                ('build', models.OneToOneField(null=True, to='orm.Build')),
+                ('environment', models.ForeignKey(to='bldcontrol.BuildEnvironment', null=True)),
+                ('project', models.ForeignKey(to='orm.Project')),
+            ],
+        ),
+        migrations.AddField(
+            model_name='brvariable',
+            name='req',
+            field=models.ForeignKey(to='bldcontrol.BuildRequest'),
+        ),
+        migrations.AddField(
+            model_name='brtarget',
+            name='req',
+            field=models.ForeignKey(to='bldcontrol.BuildRequest'),
+        ),
+        migrations.AddField(
+            model_name='brlayer',
+            name='req',
+            field=models.ForeignKey(to='bldcontrol.BuildRequest'),
+        ),
+        migrations.AddField(
+            model_name='brerror',
+            name='req',
+            field=models.ForeignKey(to='bldcontrol.BuildRequest'),
+        ),
+        migrations.AddField(
+            model_name='brbitbake',
+            name='req',
+            field=models.OneToOneField(to='bldcontrol.BuildRequest'),
+        ),
+    ]
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py
new file mode 100644
index 0000000..0c2475a
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0002_auto_20160120_1250.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('bldcontrol', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='buildenvironment',
+            name='betype',
+            field=models.IntegerField(choices=[(0, b'local')]),
+        ),
+    ]
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py
deleted file mode 100644
index f522a50..0000000
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0002_auto__add_field_buildenvironment_sourcedir__add_field_buildenvironment.py
+++ /dev/null
@@ -1,106 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'BuildEnvironment.sourcedir'
-        db.add_column(u'bldcontrol_buildenvironment', 'sourcedir',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=512, blank=True),
-                      keep_default=False)
-
-        # Adding field 'BuildEnvironment.builddir'
-        db.add_column(u'bldcontrol_buildenvironment', 'builddir',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=512, blank=True),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'BuildEnvironment.sourcedir'
-        db.delete_column(u'bldcontrol_buildenvironment', 'sourcedir')
-
-        # Deleting field 'BuildEnvironment.builddir'
-        db.delete_column(u'bldcontrol_buildenvironment', 'builddir')
-
-
-    models = {
-        u'bldcontrol.brlayer': {
-            'Meta': {'object_name': 'BRLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
-        },
-        u'bldcontrol.brtarget': {
-            'Meta': {'object_name': 'BRTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'bldcontrol.brvariable': {
-            'Meta': {'object_name': 'BRVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'bldcontrol.buildenvironment': {
-            'Meta': {'object_name': 'BuildEnvironment'},
-            'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
-            'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
-            'betype': ('django.db.models.fields.IntegerField', [], {}),
-            'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'bldcontrol.buildrequest': {
-            'Meta': {'object_name': 'BuildRequest'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        }
-    }
-
-    complete_apps = ['bldcontrol']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0003_add_cancelling_state.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0003_add_cancelling_state.py
new file mode 100644
index 0000000..eec9216
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0003_add_cancelling_state.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('bldcontrol', '0002_auto_20160120_1250'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='buildrequest',
+            name='state',
+            field=models.IntegerField(default=0, choices=[(0, b'created'), (1, b'queued'), (2, b'in progress'), (3, b'completed'), (4, b'failed'), (5, b'deleted'), (6, b'cancelling'), (7, b'archive')]),
+        ),
+    ]
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py
deleted file mode 100644
index b9ba838..0000000
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0003_auto__add_field_brlayer_dirpath.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'BRLayer.dirpath'
-        db.add_column(u'bldcontrol_brlayer', 'dirpath',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=254),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'BRLayer.dirpath'
-        db.delete_column(u'bldcontrol_brlayer', 'dirpath')
-
-
-    models = {
-        u'bldcontrol.brlayer': {
-            'Meta': {'object_name': 'BRLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
-        },
-        u'bldcontrol.brtarget': {
-            'Meta': {'object_name': 'BRTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'bldcontrol.brvariable': {
-            'Meta': {'object_name': 'BRVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'bldcontrol.buildenvironment': {
-            'Meta': {'object_name': 'BuildEnvironment'},
-            'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
-            'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
-            'betype': ('django.db.models.fields.IntegerField', [], {}),
-            'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'bldcontrol.buildrequest': {
-            'Meta': {'object_name': 'BuildRequest'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        }
-    }
-
-    complete_apps = ['bldcontrol']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0004_loadinitialdata.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0004_loadinitialdata.py
deleted file mode 100644
index d908578..0000000
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0004_loadinitialdata.py
+++ /dev/null
@@ -1,104 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-class Migration(DataMigration):
-
-    def forwards(self, orm):
-        "Write your forwards methods here."
-        # Note: Don't use "from appname.models import ModelName".
-        # Use orm.ModelName to refer to models in this application,
-        # and orm['appname.ModelName'] for models in other applications.
-        try:
-            orm.BuildEnvironment.objects.get(pk = 1)
-        except:
-            from django.utils import timezone
-            orm.BuildEnvironment.objects.create(pk = 1,
-                created = timezone.now(),
-                updated = timezone.now(),
-                betype = 0)
-
-    def backwards(self, orm):
-        "Write your backwards methods here."
-
-    models = {
-        u'bldcontrol.brlayer': {
-            'Meta': {'object_name': 'BRLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
-        },
-        u'bldcontrol.brtarget': {
-            'Meta': {'object_name': 'BRTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'bldcontrol.brvariable': {
-            'Meta': {'object_name': 'BRVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'bldcontrol.buildenvironment': {
-            'Meta': {'object_name': 'BuildEnvironment'},
-            'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
-            'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
-            'betype': ('django.db.models.fields.IntegerField', [], {}),
-            'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'bldcontrol.buildrequest': {
-            'Meta': {'object_name': 'BuildRequest'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        }
-    }
-
-    complete_apps = ['bldcontrol']
-    symmetrical = True
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0005_auto__add_brerror.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0005_auto__add_brerror.py
deleted file mode 100644
index 98aeb41..0000000
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0005_auto__add_brerror.py
+++ /dev/null
@@ -1,112 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding model 'BRError'
-        db.create_table(u'bldcontrol_brerror', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('req', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildRequest'])),
-            ('errtype', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('errmsg', self.gf('django.db.models.fields.TextField')()),
-            ('traceback', self.gf('django.db.models.fields.TextField')()),
-        ))
-        db.send_create_signal(u'bldcontrol', ['BRError'])
-
-
-    def backwards(self, orm):
-        # Deleting model 'BRError'
-        db.delete_table(u'bldcontrol_brerror')
-
-
-    models = {
-        u'bldcontrol.brerror': {
-            'Meta': {'object_name': 'BRError'},
-            'errmsg': ('django.db.models.fields.TextField', [], {}),
-            'errtype': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'traceback': ('django.db.models.fields.TextField', [], {})
-        },
-        u'bldcontrol.brlayer': {
-            'Meta': {'object_name': 'BRLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
-        },
-        u'bldcontrol.brtarget': {
-            'Meta': {'object_name': 'BRTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'bldcontrol.brvariable': {
-            'Meta': {'object_name': 'BRVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'bldcontrol.buildenvironment': {
-            'Meta': {'object_name': 'BuildEnvironment'},
-            'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
-            'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
-            'betype': ('django.db.models.fields.IntegerField', [], {}),
-            'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'bldcontrol.buildrequest': {
-            'Meta': {'object_name': 'BuildRequest'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        }
-    }
-
-    complete_apps = ['bldcontrol']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0006_auto__add_brbitbake.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0006_auto__add_brbitbake.py
deleted file mode 100644
index 74388f8..0000000
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0006_auto__add_brbitbake.py
+++ /dev/null
@@ -1,128 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding model 'BRBitbake'
-        db.create_table(u'bldcontrol_brbitbake', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('req', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildRequest'], unique=True)),
-            ('giturl', self.gf('django.db.models.fields.CharField')(max_length=254)),
-            ('commit', self.gf('django.db.models.fields.CharField')(max_length=254)),
-            ('dirpath', self.gf('django.db.models.fields.CharField')(max_length=254)),
-        ))
-        db.send_create_signal(u'bldcontrol', ['BRBitbake'])
-
-
-    def backwards(self, orm):
-        # Deleting model 'BRBitbake'
-        db.delete_table(u'bldcontrol_brbitbake')
-
-
-    models = {
-        u'bldcontrol.brbitbake': {
-            'Meta': {'object_name': 'BRBitbake'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']", 'unique': 'True'})
-        },
-        u'bldcontrol.brerror': {
-            'Meta': {'object_name': 'BRError'},
-            'errmsg': ('django.db.models.fields.TextField', [], {}),
-            'errtype': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'traceback': ('django.db.models.fields.TextField', [], {})
-        },
-        u'bldcontrol.brlayer': {
-            'Meta': {'object_name': 'BRLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
-        },
-        u'bldcontrol.brtarget': {
-            'Meta': {'object_name': 'BRTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'bldcontrol.brvariable': {
-            'Meta': {'object_name': 'BRVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'bldcontrol.buildenvironment': {
-            'Meta': {'object_name': 'BuildEnvironment'},
-            'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
-            'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
-            'betype': ('django.db.models.fields.IntegerField', [], {}),
-            'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'bldcontrol.buildrequest': {
-            'Meta': {'object_name': 'BuildRequest'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        }
-    }
-
-    complete_apps = ['bldcontrol']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py
deleted file mode 100644
index 70677a2..0000000
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0007_auto__add_field_buildrequest_environment__chg_field_buildrequest_build.py
+++ /dev/null
@@ -1,145 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'BuildRequest.environment'
-        db.add_column(u'bldcontrol_buildrequest', 'environment',
-                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['bldcontrol.BuildEnvironment'], null=True),
-                      keep_default=False)
-
-
-        # Changing field 'BuildRequest.build'
-        db.alter_column(u'bldcontrol_buildrequest', 'build_id', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['orm.Build'], unique=True, null=True))
-        # Adding unique constraint on 'BuildRequest', fields ['build']
-        db.create_unique(u'bldcontrol_buildrequest', ['build_id'])
-
-
-    def backwards(self, orm):
-        # Removing unique constraint on 'BuildRequest', fields ['build']
-        db.delete_unique(u'bldcontrol_buildrequest', ['build_id'])
-
-        # Deleting field 'BuildRequest.environment'
-        db.delete_column(u'bldcontrol_buildrequest', 'environment_id')
-
-
-        # Changing field 'BuildRequest.build'
-        db.alter_column(u'bldcontrol_buildrequest', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'], null=True))
-
-    models = {
-        u'bldcontrol.brbitbake': {
-            'Meta': {'object_name': 'BRBitbake'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']", 'unique': 'True'})
-        },
-        u'bldcontrol.brerror': {
-            'Meta': {'object_name': 'BRError'},
-            'errmsg': ('django.db.models.fields.TextField', [], {}),
-            'errtype': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'traceback': ('django.db.models.fields.TextField', [], {})
-        },
-        u'bldcontrol.brlayer': {
-            'Meta': {'object_name': 'BRLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
-        },
-        u'bldcontrol.brtarget': {
-            'Meta': {'object_name': 'BRTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'bldcontrol.brvariable': {
-            'Meta': {'object_name': 'BRVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'bldcontrol.buildenvironment': {
-            'Meta': {'object_name': 'BuildEnvironment'},
-            'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
-            'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
-            'betype': ('django.db.models.fields.IntegerField', [], {}),
-            'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'bldcontrol.buildrequest': {
-            'Meta': {'object_name': 'BuildRequest'},
-            'build': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['orm.Build']", 'unique': 'True', 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'environment': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildEnvironment']", 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        }
-    }
-
-    complete_apps = ['bldcontrol']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0008_brarchive.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0008_brarchive.py
deleted file mode 100644
index f546960..0000000
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0008_brarchive.py
+++ /dev/null
@@ -1,138 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-class Migration(DataMigration):
-    # ids that cannot be imported from BuildRequest
-
-    def forwards(self, orm):
-        REQ_COMPLETED = 3
-        REQ_ARCHIVE = 6
-        "Write your forwards methods here."
-        # Note: Don't use "from appname.models import ModelName".
-        # Use orm.ModelName to refer to models in this application,
-        # and orm['appname.ModelName'] for models in other applications.
-        orm.BuildRequest.objects.filter(state=REQ_COMPLETED).update(state=REQ_ARCHIVE)
-
-    def backwards(self, orm):
-        REQ_COMPLETED = 3
-        REQ_ARCHIVE = 6
-        "Write your backwards methods here."
-        orm.BuildRequest.objects.filter(state=REQ_ARCHIVE).update(state=REQ_COMPLETED)
-
-    models = {
-        u'bldcontrol.brbitbake': {
-            'Meta': {'object_name': 'BRBitbake'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']", 'unique': 'True'})
-        },
-        u'bldcontrol.brerror': {
-            'Meta': {'object_name': 'BRError'},
-            'errmsg': ('django.db.models.fields.TextField', [], {}),
-            'errtype': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'traceback': ('django.db.models.fields.TextField', [], {})
-        },
-        u'bldcontrol.brlayer': {
-            'Meta': {'object_name': 'BRLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
-        },
-        u'bldcontrol.brtarget': {
-            'Meta': {'object_name': 'BRTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'bldcontrol.brvariable': {
-            'Meta': {'object_name': 'BRVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'bldcontrol.buildenvironment': {
-            'Meta': {'object_name': 'BuildEnvironment'},
-            'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
-            'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
-            'betype': ('django.db.models.fields.IntegerField', [], {}),
-            'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'bldcontrol.buildrequest': {
-            'Meta': {'object_name': 'BuildRequest'},
-            'build': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['orm.Build']", 'unique': 'True', 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'environment': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildEnvironment']", 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        }
-    }
-
-    complete_apps = ['bldcontrol']
-    symmetrical = True
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0009_auto__add_field_brlayer_layer_version.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0009_auto__add_field_brlayer_layer_version.py
deleted file mode 100644
index 9b50bc1..0000000
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/migrations/0009_auto__add_field_brlayer_layer_version.py
+++ /dev/null
@@ -1,180 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'BRLayer.layer_version'
-        db.add_column(u'bldcontrol_brlayer', 'layer_version',
-                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer_Version'], null=True),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'BRLayer.layer_version'
-        db.delete_column(u'bldcontrol_brlayer', 'layer_version_id')
-
-
-    models = {
-        u'bldcontrol.brbitbake': {
-            'Meta': {'object_name': 'BRBitbake'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']", 'unique': 'True'})
-        },
-        u'bldcontrol.brerror': {
-            'Meta': {'object_name': 'BRError'},
-            'errmsg': ('django.db.models.fields.TextField', [], {}),
-            'errtype': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'traceback': ('django.db.models.fields.TextField', [], {})
-        },
-        u'bldcontrol.brlayer': {
-            'Meta': {'object_name': 'BRLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"})
-        },
-        u'bldcontrol.brtarget': {
-            'Meta': {'object_name': 'BRTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'bldcontrol.brvariable': {
-            'Meta': {'object_name': 'BRVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'req': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildRequest']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'bldcontrol.buildenvironment': {
-            'Meta': {'object_name': 'BuildEnvironment'},
-            'address': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'bbaddress': ('django.db.models.fields.CharField', [], {'max_length': '254', 'blank': 'True'}),
-            'bbport': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'bbstate': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'bbtoken': ('django.db.models.fields.CharField', [], {'max_length': '126', 'blank': 'True'}),
-            'betype': ('django.db.models.fields.IntegerField', [], {}),
-            'builddir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'lock': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'sourcedir': ('django.db.models.fields.CharField', [], {'max_length': '512', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'bldcontrol.buildrequest': {
-            'Meta': {'object_name': 'BuildRequest'},
-            'build': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['orm.Build']", 'unique': 'True', 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            'environment': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['bldcontrol.BuildEnvironment']", 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'state': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': "'/'", 'max_length': '1024'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        }
-    }
-
-    complete_apps = ['bldcontrol']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/models.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/models.py
index ab41105..cb49a58 100644
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/models.py
+++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/models.py
@@ -1,7 +1,11 @@
+from __future__ import unicode_literals
 from django.db import models
 from django.core.validators import MaxValueValidator, MinValueValidator
+from django.utils.encoding import force_bytes
 from orm.models import Project, ProjectLayer, ProjectVariable, ProjectTarget, Build, Layer_Version
 
+import logging
+logger = logging.getLogger("toaster")
 # a BuildEnvironment is the equivalent of the "build/" directory on the localhost
 class BuildEnvironment(models.Model):
     SERVER_STOPPED = 0
@@ -12,10 +16,8 @@
     )
 
     TYPE_LOCAL = 0
-    TYPE_SSH   = 1
     TYPE = (
         (TYPE_LOCAL, "local"),
-        (TYPE_SSH, "ssh"),
     )
 
     LOCK_FREE = 0
@@ -42,13 +44,17 @@
     def get_artifact(self, path):
         if self.betype == BuildEnvironment.TYPE_LOCAL:
             return open(path, "r")
-        raise Exception("FIXME: artifact download not implemented for build environment type %s" % self.get_betype_display())
+        raise NotImplementedError("FIXME: artifact download not implemented "\
+                                  "for build environment type %s" % \
+                                  self.get_betype_display())
 
     def has_artifact(self, path):
         import os
         if self.betype == BuildEnvironment.TYPE_LOCAL:
             return os.path.exists(path)
-        raise Exception("FIXME: has artifact not implemented for build environment type %s" % self.get_betype_display())
+        raise NotImplementedError("FIXME: has artifact not implemented for "\
+                                  "build environment type %s" % \
+                                  self.get_betype_display())
 
 # a BuildRequest is a request that the scheduler will build using a BuildEnvironment
 # the build request queue is the table itself, ordered by state
@@ -60,7 +66,8 @@
     REQ_COMPLETED = 3
     REQ_FAILED = 4
     REQ_DELETED = 5
-    REQ_ARCHIVE = 6
+    REQ_CANCELLING = 6
+    REQ_ARCHIVE = 7
 
     REQUEST_STATE = (
         (REQ_CREATED, "created"),
@@ -69,6 +76,7 @@
         (REQ_COMPLETED, "completed"),
         (REQ_FAILED, "failed"),
         (REQ_DELETED, "deleted"),
+        (REQ_CANCELLING, "cancelling"),
         (REQ_ARCHIVE, "archive"),
     )
 
@@ -81,6 +89,27 @@
     created     = models.DateTimeField(auto_now_add = True)
     updated     = models.DateTimeField(auto_now = True)
 
+    def __init__(self, *args, **kwargs):
+        super(BuildRequest, self).__init__(*args, **kwargs)
+        # Save the old state incase it's about to be modified
+        self.old_state = self.state
+
+    def save(self, *args, **kwargs):
+        # Check that the state we're trying to set is not going backwards
+        # e.g. from REQ_FAILED to REQ_INPROGRESS
+        if self.old_state != self.state and self.old_state > self.state:
+            logger.warn("Invalid state change requested: "
+                        "Cannot go from %s to %s - ignoring request" %
+                        (BuildRequest.REQUEST_STATE[self.old_state][1],
+                         BuildRequest.REQUEST_STATE[self.state][1])
+                       )
+            # Set property back to the old value
+            self.state = self.old_state
+            return
+
+        super(BuildRequest, self).save(*args, **kwargs)
+
+
     def get_duration(self):
         return (self.updated - self.created).total_seconds()
 
@@ -92,7 +121,7 @@
         return self.brvariable_set.get(name="MACHINE").value
 
     def __str__(self):
-        return "%s %s" % (self.project, self.get_state_display())
+        return force_bytes('%s %s' % (self.project, self.get_state_display()))
 
 # These tables specify the settings for running an actual build.
 # They MUST be kept in sync with the tables in orm.models.Project*
@@ -106,7 +135,7 @@
     layer_version = models.ForeignKey(Layer_Version, null=True)
 
 class BRBitbake(models.Model):
-    req         = models.ForeignKey(BuildRequest, unique = True)    # only one bitbake for a request
+    req         = models.OneToOneField(BuildRequest)    # only one bitbake for a request
     giturl      = models.CharField(max_length =254)
     commit      = models.CharField(max_length = 254)
     dirpath     = models.CharField(max_length = 254)
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/sshbecontroller.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/sshbecontroller.py
deleted file mode 100644
index 8ef434b..0000000
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/sshbecontroller.py
+++ /dev/null
@@ -1,179 +0,0 @@
-#
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# BitBake Toaster Implementation
-#
-# Copyright (C) 2014        Intel Corporation
-#
-# 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.
-
-
-import sys
-import re
-from django.db import transaction
-from django.db.models import Q
-from bldcontrol.models import BuildEnvironment, BRLayer, BRVariable, BRTarget, BRBitbake
-import subprocess
-
-from toastermain import settings
-
-from bbcontroller import BuildEnvironmentController, ShellCmdException, BuildSetupException
-
-class NotImplementedException(Exception):
-    pass
-
-def DN(path):
-    return "/".join(path.split("/")[0:-1])
-
-class SSHBEController(BuildEnvironmentController):
-    """ Implementation of the BuildEnvironmentController for the localhost;
-        this controller manages the default build directory,
-        the server setup and system start and stop for the localhost-type build environment
-
-    """
-
-    def __init__(self, be):
-        super(SSHBEController, self).__init__(be)
-        self.dburl = settings.getDATABASE_URL()
-        self.pokydirname = None
-        self.islayerset = False
-
-    def _shellcmd(self, command, cwd = None):
-        if cwd is None:
-            cwd = self.be.sourcedir
-
-        p = subprocess.Popen("ssh %s 'cd %s && %s'" % (self.be.address, cwd, command), stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
-        (out,err) = p.communicate()
-        if p.returncode:
-            if len(err) == 0:
-                err = "command: %s \n%s" % (command, out)
-            else:
-                err = "command: %s \n%s" % (command, err)
-            raise ShellCmdException(err)
-        else:
-            return out.strip()
-
-    def _pathexists(self, path):
-        try:
-            self._shellcmd("test -e \"%s\"" % path)
-            return True
-        except ShellCmdException as e:
-            return False
-
-    def _pathcreate(self, path):
-        self._shellcmd("mkdir -p \"%s\"" % path)
-
-    def _setupBE(self):
-        assert self.pokydirname and self._pathexists(self.pokydirname)
-        self._pathcreate(self.be.builddir)
-        self._shellcmd("bash -c \"source %s/oe-init-build-env %s\"" % (self.pokydirname, self.be.builddir))
-
-    def startBBServer(self, brbe):
-        assert self.pokydirname and self._pathexists(self.pokydirname)
-        assert self.islayerset
-        cmd = self._shellcmd("bash -c \"source %s/oe-init-build-env %s && DATABASE_URL=%s source toaster start noweb brbe=%s\"" % (self.pokydirname, self.be.builddir, self.dburl, brbe))
-
-        port = "-1"
-        for i in cmd.split("\n"):
-            if i.startswith("Bitbake server address"):
-                port = i.split(" ")[-1]
-                print "Found bitbake server port ", port
-
-
-        assert self.be.sourcedir and self._pathexists(self.be.builddir)
-        self.be.bbaddress = self.be.address.split("@")[-1]
-        self.be.bbport = port
-        self.be.bbstate = BuildEnvironment.SERVER_STARTED
-        self.be.save()
-
-    def stopBBServer(self):
-        assert self.pokydirname and self._pathexists(self.pokydirname)
-        assert self.islayerset
-        print self._shellcmd("bash -c \"source %s/oe-init-build-env %s && %s source toaster stop\"" %
-            (self.pokydirname, self.be.builddir, (lambda: "" if self.be.bbtoken is None else "BBTOKEN=%s" % self.be.bbtoken)()))
-        self.be.bbstate = BuildEnvironment.SERVER_STOPPED
-        self.be.save()
-        print "Stopped server"
-
-
-    def _copyFile(self, filepath1, filepath2):
-        p = subprocess.Popen("scp '%s' '%s'" % (filepath1, filepath2), stdout=subprocess.PIPE, stderr = subprocess.PIPE, shell=True)
-        (out, err) = p.communicate()
-        if p.returncode:
-            raise ShellCmdException(err)
-
-    def pullFile(self, local_filename, remote_filename):
-        _copyFile(local_filename, "%s:%s" % (self.be.address, remote_filename))
-
-    def pushFile(self, local_filename, remote_filename):
-        _copyFile("%s:%s" % (self.be.address, remote_filename), local_filename)
-
-    def setLayers(self, bitbakes, layers):
-        """ a word of attention: by convention, the first layer for any build will be poky! """
-
-        assert self.be.sourcedir is not None
-        assert len(bitbakes) == 1
-        # set layers in the layersource
-
-
-        raise NotImplementedException("Not implemented: SSH setLayers")
-        # 3. configure the build environment, so we have a conf/bblayers.conf
-        assert self.pokydirname is not None
-        self._setupBE()
-
-        # 4. update the bblayers.conf
-        bblayerconf = os.path.join(self.be.builddir, "conf/bblayers.conf")
-        if not self._pathexists(bblayerconf):
-            raise BuildSetupException("BE is not consistent: bblayers.conf file missing at %s" % bblayerconf)
-
-        import uuid
-        local_bblayerconf = "/tmp/" + uuid.uuid4() + "-bblayer.conf"
-
-        self.pullFile(bblayerconf, local_bblayerconf)
-
-        BuildEnvironmentController._updateBBLayers(local_bblayerconf, layerlist)
-        self.pushFile(local_bblayerconf, bblayerconf)
-
-        os.unlink(local_bblayerconf)
-
-        self.islayerset = True
-        return True
-
-    def release(self):
-        assert self.be.sourcedir and self._pathexists(self.be.builddir)
-        import shutil
-        shutil.rmtree(os.path.join(self.be.sourcedir, "build"))
-        assert not self._pathexists(self.be.builddir)
-
-    def triggerBuild(self, bitbake, layers, variables, targets):
-        # set up the buid environment with the needed layers
-        self.setLayers(bitbake, layers)
-        self.writeConfFile("conf/toaster-pre.conf", )
-        self.writeConfFile("conf/toaster.conf", raw = "INHERIT+=\"toaster buildhistory\"")
-
-        # get the bb server running with the build req id and build env id
-        bbctrl = self.getBBController()
-
-        # trigger the build command
-        task = reduce(lambda x, y: x if len(y)== 0 else y, map(lambda y: y.task, targets))
-        if len(task) == 0:
-            task = None
-
-        bbctrl.build(list(map(lambda x:x.target, targets)), task)
-
-        logger.debug("localhostbecontroller: Build launched, exiting. Follow build logs at %s/toaster_ui.log" % self.be.builddir)
-
-        # disconnect from the server
-        bbctrl.disconnect()
diff --git a/yocto-poky/bitbake/lib/toaster/bldcontrol/tests.py b/yocto-poky/bitbake/lib/toaster/bldcontrol/tests.py
index 5dbc77f..f20cc7d 100644
--- a/yocto-poky/bitbake/lib/toaster/bldcontrol/tests.py
+++ b/yocto-poky/bitbake/lib/toaster/bldcontrol/tests.py
@@ -9,7 +9,6 @@
 
 from bldcontrol.bbcontroller import BitbakeController, BuildSetupException
 from bldcontrol.localhostbecontroller import LocalhostBEController
-from bldcontrol.sshbecontroller import SSHBEController
 from bldcontrol.models import BuildEnvironment, BuildRequest
 from bldcontrol.management.commands.runbuilds import Command
 
@@ -18,7 +17,7 @@
 import os
 
 # standard poky data hardcoded for testing
-BITBAKE_LAYERS = [type('bitbake_info', (object,), { "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "", "commit": "HEAD"})]
+BITBAKE_LAYER = type('bitbake_info', (object,), { "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "", "commit": "HEAD"})
 POKY_LAYERS = [
     type('poky_info', (object,), { "name": "meta", "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "meta", "commit": "HEAD"}),
     type('poky_info', (object,), { "name": "meta-yocto", "giturl": "git://git.yoctoproject.org/poky.git", "dirpath": "meta-yocto", "commit": "HEAD"}),
@@ -48,13 +47,12 @@
         self.assertTrue(err == '', "bitbake server pid %s not stopped" % err)
 
     def test_serverStartAndStop(self):
-        from bldcontrol.sshbecontroller import NotImplementedException
         obe =  self._getBuildEnvironment()
         bc = self._getBEController(obe)
         try:
             # setting layers, skip any layer info
-            bc.setLayers(BITBAKE_LAYERS, POKY_LAYERS)
-        except NotImplementedException,  e:
+            bc.setLayers(BITBAKE_LAYER, POKY_LAYERS)
+        except NotImplementedError:
             print "Test skipped due to command not implemented yet"
             return True
         # We are ok with the exception as we're handling the git already exists
@@ -71,20 +69,16 @@
 
         self.assertFalse(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, int(bc.be.bbport))), "Server not answering")
 
-        bc.stopBBServer()
-        self.assertTrue(socket.socket(socket.AF_INET, socket.SOCK_STREAM).connect_ex((hostname, int(bc.be.bbport))), "Server not stopped")
-
         self._serverForceStop(bc)
 
     def test_getBBController(self):
-        from bldcontrol.sshbecontroller import NotImplementedException
         obe = self._getBuildEnvironment()
         bc = self._getBEController(obe)
         layerSet = False
         try:
             # setting layers, skip any layer info
-            layerSet = bc.setLayers(BITBAKE_LAYERS, POKY_LAYERS)
-        except NotImplementedException:
+            layerSet = bc.setLayers(BITBAKE_LAYER, POKY_LAYERS)
+        except NotImplementedError:
             print "Test skipped due to command not implemented yet"
             return True
         # We are ok with the exception as we're handling the git already exists
@@ -96,7 +90,6 @@
 
         bbc = bc.getBBController()
         self.assertTrue(isinstance(bbc, BitbakeController))
-        bc.stopBBServer()
 
         self._serverForceStop(bc)
 
@@ -116,29 +109,6 @@
     def _getBEController(self, obe):
         return LocalhostBEController(obe)
 
-class SSHBEControllerTests(TestCase, BEControllerTests):
-    def __init__(self, *args):
-        super(SSHBEControllerTests, self).__init__(*args)
-
-    def _getBuildEnvironment(self):
-        return BuildEnvironment.objects.create(
-                lock = BuildEnvironment.LOCK_FREE,
-                betype = BuildEnvironment.TYPE_SSH,
-                address = test_address,
-                sourcedir = test_sourcedir,
-                builddir = test_builddir )
-
-    def _getBEController(self, obe):
-        return SSHBEController(obe)
-
-    def test_pathExists(self):
-        obe = BuildEnvironment.objects.create(betype = BuildEnvironment.TYPE_SSH, address= test_address)
-        sbc = SSHBEController(obe)
-        self.assertTrue(sbc._pathexists("/"))
-        self.assertFalse(sbc._pathexists("/.deadbeef"))
-        self.assertTrue(sbc._pathexists(sbc._shellcmd("pwd")))
-
-
 class RunBuildsCommandTests(TestCase):
     def test_bec_select(self):
         """
diff --git a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/.gitignore b/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/.gitignore
deleted file mode 100644
index c45652d..0000000
--- a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/.gitignore
+++ /dev/null
@@ -1,10 +0,0 @@
-*.pyc
-*.swp
-*.swo
-*.kpf
-*.egg-info/
-.idea
-.tox
-tmp/
-dist/
-.DS_Store
diff --git a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/.travis.yml b/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/.travis.yml
deleted file mode 100644
index a920f39..0000000
--- a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/.travis.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-language: python
-python:
-  - "2.7"
-  - "3.4"
-services:
-  - mysql
-  - postgresql
-env:
-  - DJANGO=1.4 DB=sqlite
-  - DJANGO=1.4 DB=mysql
-  - DJANGO=1.4 DB=postgres
-  - DJANGO=1.5 DB=sqlite
-  - DJANGO=1.5 DB=mysql
-  - DJANGO=1.5 DB=postgres
-  - DJANGO=1.6 DB=sqlite
-  - DJANGO=1.6 DB=mysql
-  - DJANGO=1.6 DB=postgres
-  - DJANGO=1.7 DB=sqlite
-  - DJANGO=1.7 DB=mysql
-  - DJANGO=1.7 DB=postgres
-
-matrix:
-  exclude:
-    - python: "3.4"
-      env: DJANGO=1.4 DB=sqlite
-    - python: "3.4"
-      env: DJANGO=1.4 DB=mysql
-    - python: "3.4"
-      env: DJANGO=1.4 DB=postgres
-    - python: "3.4"
-      env: DJANGO=1.5 DB=sqlite
-    - python: "3.4"
-      env: DJANGO=1.5 DB=mysql
-    - python: "3.4"
-      env: DJANGO=1.5 DB=postgres
-    - python: "3.4"
-      env: DJANGO=1.6 DB=mysql
-    - python: "3.4"
-      env: DJANGO=1.7 DB=mysql
-
-before_script:
-  - mysql -e 'create database aggregation;'
-  - psql -c 'create database aggregation;' -U postgres
-install:
-  - pip install six
-  - if [ "$DB" == "mysql" ]; then pip install mysql-python; fi
-  - if [ "$DB" == "postgres" ]; then pip install psycopg2; fi
-  - pip install -q Django==$DJANGO --use-mirrors
-script:
-  - ./runtests.py --settings=tests.test_$DB
diff --git a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/LICENSE b/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/LICENSE
deleted file mode 100644
index 6b7c3b1..0000000
--- a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License
-
-Copyright (c) 2012 Henrique Bastos
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/README.rst b/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/README.rst
deleted file mode 100644
index 739d4da..0000000
--- a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/README.rst
+++ /dev/null
@@ -1,156 +0,0 @@
-Django Aggregate If: Condition aggregates for Django
-====================================================
-
-.. image:: https://travis-ci.org/henriquebastos/django-aggregate-if.png?branch=master
-    :target: https://travis-ci.org/henriquebastos/django-aggregate-if
-    :alt: Test Status
-
-.. image:: https://landscape.io/github/henriquebastos/django-aggregate-if/master/landscape.png
-    :target: https://landscape.io/github/henriquebastos/django-aggregate-if/master
-    :alt: Code Helth
-
-.. image:: https://pypip.in/v/django-aggregate-if/badge.png
-    :target: https://crate.io/packages/django-aggregate-if/
-    :alt: Latest PyPI version
-
-.. image:: https://pypip.in/d/django-aggregate-if/badge.png
-    :target: https://crate.io/packages/django-aggregate-if/
-    :alt: Number of PyPI downloads
-
-*Aggregate-if* adds conditional aggregates to Django.
-
-Conditional aggregates can help you reduce the ammount of queries to obtain
-aggregated information, like statistics for example.
-
-Imagine you have a model ``Offer`` like this one:
-
-.. code-block:: python
-
-    class Offer(models.Model):
-        sponsor = models.ForeignKey(User)
-        price = models.DecimalField(max_digits=9, decimal_places=2)
-        status = models.CharField(max_length=30)
-        expire_at = models.DateField(null=True, blank=True)
-        created_at = models.DateTimeField(auto_now_add=True)
-        updated_at = models.DateTimeField(auto_now=True)
-
-        OPEN = "OPEN"
-        REVOKED = "REVOKED"
-        PAID = "PAID"
-
-Let's say you want to know:
-
-#. How many offers exists in total;
-#. How many of them are OPEN, REVOKED or PAID;
-#. How much money was offered in total;
-#. How much money is in OPEN, REVOKED and PAID offers;
-
-To get these informations, you could query:
-
-.. code-block:: python
-
-    from django.db.models import Count, Sum
-
-    Offer.objects.count()
-    Offer.objects.filter(status=Offer.OPEN).aggregate(Count('pk'))
-    Offer.objects.filter(status=Offer.REVOKED).aggregate(Count('pk'))
-    Offer.objects.filter(status=Offer.PAID).aggregate(Count('pk'))
-    Offer.objects.aggregate(Sum('price'))
-    Offer.objects.filter(status=Offer.OPEN).aggregate(Sum('price'))
-    Offer.objects.filter(status=Offer.REVOKED).aggregate(Sum('price'))
-    Offer.objects.filter(status=Offer.PAID).aggregate(Sum('price'))
-
-In this case, **8 queries** were needed to retrieve the desired information.
-
-With conditional aggregates you can get it all with only **1 query**:
-
-.. code-block:: python
-
-    from django.db.models import Q
-    from aggregate_if import Count, Sum
-
-    Offer.objects.aggregate(
-        pk__count=Count('pk'),
-        pk__open__count=Count('pk', only=Q(status=Offer.OPEN)),
-        pk__revoked__count=Count('pk', only=Q(status=Offer.REVOKED)),
-        pk__paid__count=Count('pk', only=Q(status=Offer.PAID)),
-        pk__sum=Sum('price'),
-        pk__open__sum=Sum('price', only=Q(status=Offer.OPEN)),
-        pk__revoked__sum=Sum('price'), only=Q(status=Offer.REVOKED)),
-        pk__paid__sum=Sum('price'), only=Q(status=Offer.PAID))
-    )
-
-Installation
-------------
-
-*Aggregate-if* works with Django 1.4, 1.5, 1.6 and 1.7.
-
-To install it, simply:
-
-.. code-block:: bash
-
-    $ pip install django-aggregate-if
-
-Inspiration
------------
-
-There is a 5 years old `ticket 11305`_ that will (*hopefully*) implement this feature into
-Django 1.8.
-
-Using Django 1.6, I still wanted to avoid creating custom queries for very simple
-conditional aggregations. So I've cherry picked those ideas and others from the
-internet and built this library.
-
-This library uses the same API and tests proposed on `ticket 11305`_, so when the
-new feature is available you can easily replace ``django-aggregate-if``.
-
-Limitations
------------
-
-Conditions involving joins with aliases are not supported yet. If you want to
-help adding this feature, you're welcome to check the `first issue`_.
-
-Contributors
-------------
-
-* `Henrique Bastos <http://github.com/henriquebastos>`_
-* `Iuri de Silvio <https://github.com/iurisilvio>`_
-* `Hampus Stjernhav <https://github.com/champ>`_
-* `Bradley Martsberger <https://github.com/martsberger>`_
-* `Markus Bertheau <https://github.com/mbertheau>`_
-* `end0 <https://github.com/end0>`_
-* `Scott Sexton <https://github.com/scottsexton>`_
-* `Mauler <https://github.com/mauler>`_
-* `trbs <https://github.com/trbs>`_
-
-Changelog
----------
-
-0.5
-    - Support for Django 1.7
-
-0.4
-    - Use tox to run tests.
-    - Add support for Django 1.6.
-    - Add support for Python3.
-    - The ``only`` parameter now freely supports joins independent of the main query.
-    - Adds support for alias relabeling permitting excludes and updates with aggregates filtered on remote foreign key relations.
-
-0.3.1
-    - Fix quotation escaping.
-    - Fix boolean casts on Postgres.
-
-0.2
-    - Fix postgres issue with LIKE conditions.
-
-0.1
-    - Initial release.
-
-
-License
-=======
-
-The MIT License.
-
-.. _ticket 11305: https://code.djangoproject.com/ticket/11305
-.. _first issue: https://github.com/henriquebastos/django-aggregate-if/issues/1
diff --git a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/aggregate_if.py b/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/aggregate_if.py
deleted file mode 100644
index d5f3427..0000000
--- a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/aggregate_if.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# coding: utf-8
-'''
-Implements conditional aggregates.
-
-This code was based on the work of others found on the internet:
-
-1. http://web.archive.org/web/20101115170804/http://www.voteruniverse.com/Members/jlantz/blog/conditional-aggregates-in-django
-2. https://code.djangoproject.com/ticket/11305
-3. https://groups.google.com/forum/?fromgroups=#!topic/django-users/cjzloTUwmS0
-4. https://groups.google.com/forum/?fromgroups=#!topic/django-users/vVprMpsAnPo
-'''
-from __future__ import unicode_literals
-from django.utils import six
-import django
-from django.db.models.aggregates import Aggregate as DjangoAggregate
-from django.db.models.sql.aggregates import Aggregate as DjangoSqlAggregate
-
-
-VERSION = django.VERSION[:2]
-
-
-class SqlAggregate(DjangoSqlAggregate):
-    conditional_template = '%(function)s(CASE WHEN %(condition)s THEN %(field)s ELSE null END)'
-
-    def __init__(self, col, source=None, is_summary=False, condition=None, **extra):
-        super(SqlAggregate, self).__init__(col, source, is_summary, **extra)
-        self.condition = condition
-
-    def relabel_aliases(self, change_map):
-        if VERSION < (1, 7):
-            super(SqlAggregate, self).relabel_aliases(change_map)
-        if self.has_condition:
-            condition_change_map = dict((k, v) for k, v in \
-                change_map.items() if k in self.condition.query.alias_map
-            )
-            self.condition.query.change_aliases(condition_change_map)
-
-    def relabeled_clone(self, change_map):
-        self.relabel_aliases(change_map)
-        return super(SqlAggregate, self).relabeled_clone(change_map)
-
-    def as_sql(self, qn, connection):
-        if self.has_condition:
-            self.sql_template = self.conditional_template
-            self.extra['condition'] = self._condition_as_sql(qn, connection)
-
-        return super(SqlAggregate, self).as_sql(qn, connection)
-
-    @property
-    def has_condition(self):
-        # Warning: bool(QuerySet) will hit the database
-        return self.condition is not None
-
-    def _condition_as_sql(self, qn, connection):
-        '''
-        Return sql for condition.
-        '''
-        def escape(value):
-            if isinstance(value, bool):
-                value = str(int(value))
-            if isinstance(value, six.string_types):
-                # Escape params used with LIKE
-                if '%' in value:
-                    value = value.replace('%', '%%')
-                # Escape single quotes
-                if "'" in value:
-                    value = value.replace("'", "''")
-                # Add single quote to text values
-                value = "'" + value + "'"
-            return value
-
-        sql, param = self.condition.query.where.as_sql(qn, connection)
-        param = map(escape, param)
-
-        return sql % tuple(param)
-
-
-class SqlSum(SqlAggregate):
-    sql_function = 'SUM'
-
-
-class SqlCount(SqlAggregate):
-    is_ordinal = True
-    sql_function = 'COUNT'
-    sql_template = '%(function)s(%(distinct)s%(field)s)'
-    conditional_template = '%(function)s(%(distinct)sCASE WHEN %(condition)s THEN %(field)s ELSE null END)'
-
-    def __init__(self, col, distinct=False, **extra):
-        super(SqlCount, self).__init__(col, distinct=distinct and 'DISTINCT ' or '', **extra)
-
-
-class SqlAvg(SqlAggregate):
-    is_computed = True
-    sql_function = 'AVG'
-
-
-class SqlMax(SqlAggregate):
-    sql_function = 'MAX'
-
-
-class SqlMin(SqlAggregate):
-    sql_function = 'MIN'
-
-
-class Aggregate(DjangoAggregate):
-    def __init__(self, lookup, only=None, **extra):
-        super(Aggregate, self).__init__(lookup, **extra)
-        self.only = only
-        self.condition = None
-
-    def _get_fields_from_Q(self, q):
-        fields = []
-        for child in q.children:
-            if hasattr(child, 'children'):
-                fields.extend(self._get_fields_from_Q(child))
-            else:
-                fields.append(child)
-        return fields
-
-    def add_to_query(self, query, alias, col, source, is_summary):
-        if self.only:
-            self.condition = query.model._default_manager.filter(self.only)
-            for child in self._get_fields_from_Q(self.only):
-                field_list = child[0].split('__')
-                # Pop off the last field if it's a query term ('gte', 'contains', 'isnull', etc.)
-                if field_list[-1] in query.query_terms:
-                    field_list.pop()
-                # setup_joins have different returns in Django 1.5 and 1.6, but the order of what we need remains.
-                result = query.setup_joins(field_list, query.model._meta, query.get_initial_alias(), None)
-                join_list = result[3]
-
-                fname = 'promote_alias_chain' if VERSION < (1, 5) else 'promote_joins'
-                args = (join_list, True) if VERSION < (1, 7) else (join_list,)
-
-                promote = getattr(query, fname)
-                promote(*args)
-
-        aggregate = self.sql_klass(col, source=source, is_summary=is_summary, condition=self.condition, **self.extra)
-        query.aggregates[alias] = aggregate
-
-
-class Sum(Aggregate):
-    name = 'Sum'
-    sql_klass = SqlSum
-
-
-class Count(Aggregate):
-    name = 'Count'
-    sql_klass = SqlCount
-
-
-class Avg(Aggregate):
-    name = 'Avg'
-    sql_klass = SqlAvg
-
-
-class Max(Aggregate):
-    name = 'Max'
-    sql_klass = SqlMax
-
-
-class Min(Aggregate):
-    name = 'Min'
-    sql_klass = SqlMin
diff --git a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/runtests.py b/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/runtests.py
deleted file mode 100755
index 2e55864..0000000
--- a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/runtests.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-from optparse import OptionParser
-
-
-def parse_args():
-    parser = OptionParser()
-    parser.add_option('-s', '--settings', help='Define settings.')
-    parser.add_option('-t', '--unittest', help='Define which test to run. Default all.')
-    options, args = parser.parse_args()
-
-    if not options.settings:
-        parser.print_help()
-        sys.exit(1)
-
-    if not options.unittest:
-        options.unittest = ['aggregation']
-
-    return options
-
-
-def get_runner(settings_module):
-    '''
-    Asks Django for the TestRunner defined in settings or the default one.
-    '''
-    os.environ['DJANGO_SETTINGS_MODULE'] = settings_module
-
-    import django
-    from django.test.utils import get_runner
-    from django.conf import settings
-
-    if hasattr(django, 'setup'):
-        django.setup()
-
-    return get_runner(settings)
-
-
-def runtests():
-    options = parse_args()
-    TestRunner = get_runner(options.settings)
-    runner = TestRunner(verbosity=1, interactive=True, failfast=False)
-    sys.exit(runner.run_tests([]))
-
-
-if __name__ == '__main__':
-    runtests()
diff --git a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/setup.py b/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/setup.py
deleted file mode 100644
index aed3db1..0000000
--- a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/setup.py
+++ /dev/null
@@ -1,33 +0,0 @@
-# coding: utf-8
-from setuptools import setup
-import os
-
-
-setup(name='django-aggregate-if',
-      version='0.5',
-      description='Conditional aggregates for Django, just like the famous SumIf in Excel.',
-      long_description=open(os.path.join(os.path.dirname(__file__), "README.rst")).read(),
-      author="Henrique Bastos", author_email="henrique@bastos.net",
-      license="MIT",
-      py_modules=['aggregate_if'],
-      install_requires=[
-          'six>=1.6.1',
-      ],
-      zip_safe=False,
-      platforms='any',
-      include_package_data=True,
-      classifiers=[
-          'Development Status :: 5 - Production/Stable',
-          'Framework :: Django',
-          'Intended Audience :: Developers',
-          'License :: OSI Approved :: MIT License',
-          'Natural Language :: English',
-          'Operating System :: OS Independent',
-          'Programming Language :: Python',
-          'Programming Language :: Python :: 2.7',
-          'Programming Language :: Python :: 3',
-          'Topic :: Database',
-          'Topic :: Software Development :: Libraries',
-      ],
-      url='http://github.com/henriquebastos/django-aggregate-if/',
-)
diff --git a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/tox.ini b/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/tox.ini
deleted file mode 100644
index 78beb14..0000000
--- a/yocto-poky/bitbake/lib/toaster/contrib/django-aggregate-if-master/tox.ini
+++ /dev/null
@@ -1,198 +0,0 @@
-[tox]
-envlist =
-    py27-django1.4-sqlite,
-    py27-django1.4-postgres,
-    py27-django1.4-mysql,
-
-    py27-django1.5-sqlite,
-    py27-django1.5-postgres,
-    py27-django1.5-mysql,
-
-    py27-django1.6-sqlite,
-    py27-django1.6-postgres,
-    py27-django1.6-mysql,
-
-    py27-django1.7-sqlite,
-    py27-django1.7-postgres,
-    py27-django1.7-mysql,
-
-    py34-django1.6-sqlite,
-    py34-django1.6-postgres,
-    #py34-django1.6-mysql
-
-    py34-django1.7-sqlite,
-    py34-django1.7-postgres,
-    #py34-django1.7-mysql
-
-[testenv]
-whitelist_externals=
-    mysql
-    psql
-
-# Python 2.7
-# Django 1.4
-[testenv:py27-django1.4-sqlite]
-basepython = python2.7
-deps =
-    django==1.4
-commands = python runtests.py --settings tests.test_sqlite
-
-[testenv:py27-django1.4-postgres]
-basepython = python2.7
-deps =
-    django==1.4
-    psycopg2
-commands =
-    psql -c 'create database aggregation;' postgres
-    python runtests.py --settings tests.test_postgres
-    psql -c 'drop database aggregation;' postgres
-
-[testenv:py27-django1.4-mysql]
-basepython = python2.7
-deps =
-    django==1.4
-    mysql-python
-commands =
-    mysql -e 'create database aggregation;'
-    python runtests.py --settings tests.test_mysql
-    mysql -e 'drop database aggregation;'
-
-# Django 1.5
-[testenv:py27-django1.5-sqlite]
-basepython = python2.7
-deps =
-    django==1.5
-commands = python runtests.py --settings tests.test_sqlite
-
-[testenv:py27-django1.5-postgres]
-basepython = python2.7
-deps =
-    django==1.5
-    psycopg2
-commands =
-    psql -c 'create database aggregation;' postgres
-    python runtests.py --settings tests.test_postgres
-    psql -c 'drop database aggregation;' postgres
-
-[testenv:py27-django1.5-mysql]
-basepython = python2.7
-deps =
-    django==1.5
-    mysql-python
-commands =
-    mysql -e 'create database aggregation;'
-    python runtests.py --settings tests.test_mysql
-    mysql -e 'drop database aggregation;'
-
-# Django 1.6
-[testenv:py27-django1.6-sqlite]
-basepython = python2.7
-deps =
-    django==1.6
-commands = python runtests.py --settings tests.test_sqlite
-
-[testenv:py27-django1.6-postgres]
-basepython = python2.7
-deps =
-    django==1.6
-    psycopg2
-commands =
-    psql -c 'create database aggregation;' postgres
-    python runtests.py --settings tests.test_postgres
-    psql -c 'drop database aggregation;' postgres
-
-[testenv:py27-django1.6-mysql]
-basepython = python2.7
-deps =
-    django==1.6
-    mysql-python
-commands =
-    mysql -e 'create database aggregation;'
-    python runtests.py --settings tests.test_mysql
-    mysql -e 'drop database aggregation;'
-
-
-# Python 2.7 and Django 1.7
-[testenv:py27-django1.7-sqlite]
-basepython = python2.7
-deps =
-    django==1.7
-commands = python runtests.py --settings tests.test_sqlite
-
-[testenv:py27-django1.7-postgres]
-basepython = python2.7
-deps =
-    django==1.7
-    psycopg2
-commands =
-    psql -c 'create database aggregation;' postgres
-    python runtests.py --settings tests.test_postgres
-    psql -c 'drop database aggregation;' postgres
-
-[testenv:py27-django1.7-mysql]
-basepython = python2.7
-deps =
-    django==1.7
-    mysql-python
-commands =
-    mysql -e 'create database aggregation;'
-    python runtests.py --settings tests.test_mysql
-    mysql -e 'drop database aggregation;'
-
-
-# Python 3.4
-# Django 1.6
-[testenv:py34-django1.6-sqlite]
-basepython = python3.4
-deps =
-    django==1.6
-commands = python runtests.py --settings tests.test_sqlite
-
-[testenv:py34-django1.6-postgres]
-basepython = python3.4
-deps =
-    django==1.6
-    psycopg2
-commands =
-    psql -c 'create database aggregation;' postgres
-    python runtests.py --settings tests.test_postgres
-    psql -c 'drop database aggregation;' postgres
-
-[testenv:py34-django1.6-mysql]
-basepython = python3.4
-deps =
-    django==1.6
-    mysql-python3
-commands =
-    mysql -e 'create database aggregation;'
-    python runtests.py --settings tests.test_mysql
-    mysql -e 'drop database aggregation;'
-
-
-# Python 3.4
-# Django 1.7
-[testenv:py34-django1.7-sqlite]
-basepython = python3.4
-deps =
-    django==1.7
-commands = python runtests.py --settings tests.test_sqlite
-
-[testenv:py34-django1.7-postgres]
-basepython = python3.4
-deps =
-    django==1.7
-    psycopg2
-commands =
-    psql -c 'create database aggregation;' postgres
-    python runtests.py --settings tests.test_postgres
-    psql -c 'drop database aggregation;' postgres
-
-[testenv:py34-django1.7-mysql]
-basepython = python3.4
-deps =
-    django==1.7
-    mysql-python3
-commands =
-    mysql -e 'create database aggregation;'
-    python runtests.py --settings tests.test_mysql
-    mysql -e 'drop database aggregation;'
diff --git a/yocto-poky/bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py b/yocto-poky/bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py
index 880487c..754636f 100755
--- a/yocto-poky/bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py
+++ b/yocto-poky/bitbake/lib/toaster/contrib/tts/toasteruitest/run_toastertests.py
@@ -28,60 +28,128 @@
 # put chromedriver in PATH, (e.g. /usr/bin/, bear in mind to chmod)
 # For windows host, you may put chromedriver.exe in the same directory as chrome.exe
 
-
-import unittest, time, re, sys, getopt, os, logging, platform
+import unittest, sys, os, platform
 import ConfigParser
-import subprocess
+import argparse
+from toaster_automation_test import toaster_cases
 
 
-class toaster_run_all():
-    def __init__(self):
-        # in case this script is called from other directory
-        os.chdir(os.path.abspath(sys.path[0]))
-        self.starttime = time.strptime(time.ctime())
-        self.parser = ConfigParser.SafeConfigParser()
-        found = self.parser.read('toaster_test.cfg')
-        self.host_os = platform.system().lower()
-        self.run_all_cases()
-        self.collect_log()
+def get_args_parser():
+    description = "Script that runs toaster auto tests."
+    parser = argparse.ArgumentParser(description=description)
+    parser.add_argument('--run-all-tests', required=False, action="store_true", dest="run_all_tests", default=False,
+                       help='Run all tests.')
+    parser.add_argument('--run-suite', required=False, dest='run_suite', default=False,
+                       help='run suite (defined in cfg file)')
 
-    def get_test_cases(self):
-        # we have config groups for different os type in toaster_test.cfg
-        cases_to_run = eval(self.parser.get('toaster_test_' + self.host_os, 'test_cases'))
-        return cases_to_run
+    return parser
 
 
-    def run_all_cases(self):
-        cases_temp = self.get_test_cases()
-        for case in cases_temp:
-            single_case_cmd = "python -m unittest toaster_automation_test.toaster_cases.test_" + str(case)
-            print single_case_cmd
-            subprocess.call(single_case_cmd, shell=True)
+def get_tests():
+    testslist = []
 
-    def collect_log(self):
-        """
-        the log files are temporarily stored in ./log/tmp/..
-        After all cases are done, they should be transfered to ./log/$TIMESTAMP/
-        """
-        def comple(number):
-            if number < 10:
-                return str(0) + str(number)
-            else:
-                return str(number)
-        now = self.starttime
-        now_str = comple(now.tm_year) + comple(now.tm_mon) + comple(now.tm_mday) + \
-                  comple(now.tm_hour) + comple(now.tm_min) + comple(now.tm_sec)
-        log_dir = os.path.abspath(sys.path[0]) + os.sep + 'log' + os.sep + now_str
-        log_tmp_dir = os.path.abspath(sys.path[0]) + os.sep + 'log' + os.sep + 'tmp'
+    prefix = 'toaster_automation_test.toaster_cases'
+
+    for t in dir(toaster_cases):
+        if t.startswith('test_'):
+            testslist.append('.'.join((prefix, t)))
+
+    return testslist
+
+
+def get_tests_from_cfg(suite=None):
+
+    testslist = []
+    config = ConfigParser.SafeConfigParser()
+    config.read('toaster_test.cfg')
+
+    if suite is not None:
+        target_suite = suite.lower()
+
+        # TODO: if suite is valid suite
+
+    else:
+        target_suite = platform.system().lower()
+
+    try:
+        tests_from_cfg = eval(config.get('toaster_test_' + target_suite, 'test_cases'))
+    except:
+        print 'Failed to get test cases from cfg file. Make sure the format is correct.'
+        return None
+
+    prefix = 'toaster_automation_test.toaster_cases.test_'
+    for t in tests_from_cfg:
+        testslist.append(prefix + str(t))
+
+    return testslist
+
+def main():
+
+    # In case this script is called from other directory
+    os.chdir(os.path.abspath(sys.path[0]))
+
+    parser = get_args_parser()
+    args = parser.parse_args()
+
+    if args.run_all_tests:
+        testslist = get_tests()
+    elif args.run_suite:
+        testslist = get_tests_from_cfg(args.run_suite)
+        os.environ['TOASTER_SUITE'] = args.run_suite
+    else:
+        testslist = get_tests_from_cfg()
+
+    if not testslist:
+        print 'Failed to get test cases.'
+        exit(1)
+
+    suite = unittest.TestSuite()
+    loader = unittest.TestLoader()
+    loader.sortTestMethodsUsing = None
+    runner = unittest.TextTestRunner(verbosity=2, resultclass=buildResultClass(args))
+
+    for test in testslist:
         try:
-            os.renames(log_tmp_dir, log_dir)
-        except OSError :
-            logging.error(" Cannot create log dir(timestamp)  under log, please check your privilege")
+            suite.addTests(loader.loadTestsFromName(test))
+        except:
+            return 1
+
+    result = runner.run(suite)
+
+    if result.wasSuccessful():
+        return 0
+    else:
+        return 1
+
+
+def buildResultClass(args):
+    """Build a Result Class to use in the testcase execution"""
+
+    class StampedResult(unittest.TextTestResult):
+        """
+        Custom TestResult that prints the time when a test starts.  As toaster-auto
+        can take a long time (ie a few hours) to run, timestamps help us understand
+        what tests are taking a long time to execute.
+        """
+        def startTest(self, test):
+            import time
+            self.stream.write(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + " - ")
+            super(StampedResult, self).startTest(test)
+
+    return StampedResult
 
 
 if __name__ == "__main__":
-    toaster_run_all()
 
-
+    try:
+        ret = main()
+    except:
+        ret = 1
+        import traceback
+        traceback.print_exc()
+    finally:
+        if os.getenv('TOASTER_SUITE'):
+            del os.environ['TOASTER_SUITE']
+    sys.exit(ret)
 
 
diff --git a/yocto-poky/bitbake/lib/toaster/contrib/tts/toasteruitest/toaster_automation_test.py b/yocto-poky/bitbake/lib/toaster/contrib/tts/toasteruitest/toaster_automation_test.py
index eac167b..d8f838a 100755
--- a/yocto-poky/bitbake/lib/toaster/contrib/tts/toasteruitest/toaster_automation_test.py
+++ b/yocto-poky/bitbake/lib/toaster/contrib/tts/toasteruitest/toaster_automation_test.py
@@ -23,13 +23,14 @@
 # step 2 - 3 needs to be run manually
 
 import unittest, time, re, sys, getopt, os, logging, string, errno, exceptions
-import shutil, argparse, ConfigParser, platform
+import shutil, argparse, ConfigParser, platform, json
 from selenium import webdriver
 from selenium.common.exceptions import NoSuchElementException
 from selenium import selenium
 from selenium.webdriver.common.by import By
 from selenium.webdriver.common.keys import Keys
 from selenium.webdriver.support.ui import Select
+import sqlite3 as sqlite
 
 
 ###########################################
@@ -229,78 +230,98 @@
 def LogResults(original_class):
     orig_method = original_class.run
 
+    from time import strftime, gmtime
+    caller = 'toaster'
+    timestamp = strftime('%Y%m%d%H%M%S',gmtime())
+    logfile = os.path.join(os.getcwd(),'results-'+caller+'.'+timestamp+'.log')
+    linkfile = os.path.join(os.getcwd(),'results-'+caller+'.log')
+
     #rewrite the run method of unittest.TestCase to add testcase logging
     def run(self, result, *args, **kws):
         orig_method(self, result, *args, **kws)
         passed = True
         testMethod = getattr(self, self._testMethodName)
-
         #if test case is decorated then use it's number, else use it's name
         try:
             test_case = testMethod.test_case
         except AttributeError:
             test_case = self._testMethodName
 
+        class_name = str(testMethod.im_class).split("'")[1]
+
         #create custom logging level for filtering.
         custom_log_level = 100
         logging.addLevelName(custom_log_level, 'RESULTS')
-        caller = os.path.basename(sys.argv[0])
 
         def results(self, message, *args, **kws):
             if self.isEnabledFor(custom_log_level):
                 self.log(custom_log_level, message, *args, **kws)
         logging.Logger.results = results
 
-        logging.basicConfig(filename=os.path.join(os.getcwd(),'results-'+caller+'.log'),
+        logging.basicConfig(filename=logfile,
                             filemode='w',
                             format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
                             datefmt='%H:%M:%S',
                             level=custom_log_level)
         for handler in logging.root.handlers:
             handler.addFilter(NoParsingFilter())
-#        local_log = logging.getLogger(caller)
-        local_log = logging.getLogger()
+        local_log = logging.getLogger(caller)
 
         #check status of tests and record it
+
         for (name, msg) in result.errors:
-            if self._testMethodName == str(name).split(' ')[0]:
+            if (self._testMethodName == str(name).split(' ')[0]) and (class_name in str(name).split(' ')[1]):
                 local_log.results("Testcase "+str(test_case)+": ERROR")
-                local_log.results("Testcase "+str(test_case)+":\n"+msg+"\n\n\n")
+                local_log.results("Testcase "+str(test_case)+":\n"+msg)
                 passed = False
         for (name, msg) in result.failures:
-            if self._testMethodName == str(name).split(' ')[0]:
+            if (self._testMethodName == str(name).split(' ')[0]) and (class_name in str(name).split(' ')[1]):
                 local_log.results("Testcase "+str(test_case)+": FAILED")
-                local_log.results("Testcase "+str(test_case)+":\n"+msg+"\n\n\n")
+                local_log.results("Testcase "+str(test_case)+":\n"+msg)
                 passed = False
         for (name, msg) in result.skipped:
-            if self._testMethodName == str(name).split(' ')[0]:
-                local_log.results("Testcase "+str(test_case)+": SKIPPED"+"\n\n\n")
+            if (self._testMethodName == str(name).split(' ')[0]) and (class_name in str(name).split(' ')[1]):
+                local_log.results("Testcase "+str(test_case)+": SKIPPED")
                 passed = False
         if passed:
-            local_log.results("Testcase "+str(test_case)+": PASSED"+"\n\n\n")
+            local_log.results("Testcase "+str(test_case)+": PASSED")
+
+        # Create symlink to the current log
+        if os.path.exists(linkfile):
+            os.remove(linkfile)
+        os.symlink(logfile, linkfile)
 
     original_class.run = run
+
     return original_class
 
 
-
-
 ###########################################
 #                                         #
 # PART II: base class                     #
 #                                         #
 ###########################################
 
+@LogResults
 class toaster_cases_base(unittest.TestCase):
 
+    @classmethod
+    def setUpClass(cls):
+        cls.log = cls.logger_create()
+
     def setUp(self):
         self.screenshot_sequence = 1
         self.verificationErrors = []
         self.accept_next_alert = True
         self.host_os = platform.system().lower()
+        if os.getenv('TOASTER_SUITE'):
+            self.target_suite = os.getenv('TOASTER_SUITE')
+        else:
+            self.target_suite = self.host_os
+
         self.parser = ConfigParser.SafeConfigParser()
-        configs = self.parser.read('toaster_test.cfg')
-        self.base_url = eval(self.parser.get('toaster_test_' + self.host_os, 'toaster_url'))
+        self.parser.read('toaster_test.cfg')
+        self.base_url = eval(self.parser.get('toaster_test_' + self.target_suite, 'toaster_url'))
 
         # create log dir . Currently , we put log files in log/tmp. After all
         # test cases are done, move them to log/$datetime dir
@@ -309,37 +330,37 @@
             mkdir_p(self.log_tmp_dir)
         except OSError :
             logging.error("%(asctime)s Cannot create tmp dir under log, please check your privilege")
-        self.log = self.logger_create()
+        # self.log = self.logger_create()
         # driver setup
         self.setup_browser()
 
-    def logger_create(self):
-        """
-        we use root logger for every testcase.
-        The reason why we don't use TOASTERXXX_logger is to avoid setting respective level for
-        root logger and TOASTERXXX_logger
-        To Be Discussed
-        """
-        log_level_dict = {'CRITICAL':logging.CRITICAL, 'ERROR':logging.ERROR, 'WARNING':logging.WARNING, \
-                          'INFO':logging.INFO, 'DEBUG':logging.DEBUG, 'NOTSET':logging.NOTSET}
-        log = logging.getLogger()
-#        log = logging.getLogger('TOASTER_' + str(self.case_no))
-        self.logging_level = eval(self.parser.get('toaster_test_' + self.host_os, 'logging_level'))
-        key = self.logging_level.upper()
-        log.setLevel(log_level_dict[key])
-        fh = logging.FileHandler(filename=self.log_tmp_dir + os.sep + 'case_all' + '.log', mode='a')
+    @staticmethod
+    def logger_create():
+        log_file = "toaster-auto-" + time.strftime("%Y%m%d%H%M%S") + ".log"
+        if os.path.exists("toaster-auto.log"): os.remove("toaster-auto.log")
+        os.symlink(log_file, "toaster-auto.log")
+
+        log = logging.getLogger("toaster")
+        log.setLevel(logging.DEBUG)
+
+        fh = logging.FileHandler(filename=log_file, mode='w')
+        fh.setLevel(logging.DEBUG)
+
         ch = logging.StreamHandler(sys.stdout)
-        formatter = logging.Formatter('%(pathname)s - %(lineno)d - %(asctime)s \n  \
-             %(name)s - %(levelname)s - %(message)s')
+        ch.setLevel(logging.INFO)
+
+        formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
         fh.setFormatter(formatter)
         ch.setFormatter(formatter)
+
         log.addHandler(fh)
         log.addHandler(ch)
+
         return log
 
 
     def setup_browser(self, *browser_path):
-        self.browser = eval(self.parser.get('toaster_test_' + self.host_os, 'test_browser'))
+        self.browser = eval(self.parser.get('toaster_test_' + self.target_suite, 'test_browser'))
         print self.browser
         if self.browser == "firefox":
             driver = webdriver.Firefox()
@@ -596,7 +617,7 @@
     def is_text_present (self, patterns):
         for pattern in patterns:
             if str(pattern) not in self.driver.page_source:
-                print pattern
+                print 'Text "'+pattern+'" is missing'
                 return False
         return True
 
@@ -605,6 +626,7 @@
         try:
             self.driver.find_element(how, what)
         except NoSuchElementException, e:
+            print 'Could not find element '+str(what)+' by ' + str(how)
             return False
         return True
 
@@ -658,7 +680,7 @@
 # Note: to comply with the unittest framework, we call these test_xxx functions
 # from run_toastercases.py to avoid calling setUp() and tearDown() multiple times
 
-@LogResults
+
 class toaster_cases(toaster_cases_base):
         ##############
         #  CASE 901  #
@@ -743,7 +765,7 @@
         self.driver.find_element_by_id("started_on").click()
         self.driver.find_element_by_id("edit-columns-button").click()
         # step 4
-        items = ["Outcome", "Completed on", "Started on", "Failed tasks", "Errors", "Warnings"]
+        items = ["Outcome", "Completed on", "Started on"]
         for item in items:
             try:
                 temp_element = self.find_element_by_text_in_table('otable', item)
@@ -787,8 +809,6 @@
         self.driver.get(self.base_url)
         self.driver.find_element_by_partial_link_text("core-image").click()
         self.driver.find_element_by_link_text("Tasks").click()
-#        self.driver.find_element_by_link_text("All builds").click()
-#        self.driver.back()
         self.table_name = 'otable'
         # This is how we find the "default" rows-number!
         rows_displayed = int(Select(self.driver.find_element_by_css_selector("select.pagesize")).first_selected_option.text)
@@ -811,24 +831,23 @@
         self.driver.find_element_by_id("edit-columns-button").click()
         self.driver.find_element_by_id("cpu_used").click()
         self.driver.find_element_by_id("disk_io").click()
-        self.driver.find_element_by_id("task_log").click()
         self.driver.find_element_by_id("recipe_version").click()
         self.driver.find_element_by_id("time_taken").click()
-        self.driver.find_element_by_css_selector("edit-columns-button").click()
+        self.driver.find_element_by_id("edit-columns-button").click()
         # The operation is the same as case901
         # dict: {lint text name : actual class name}
         table_head_dict = {'Order':'order', 'Recipe':'recipe_name', 'Task':'task_name', 'Executed':'executed', \
                            'Outcome':'outcome', 'Cache attempt':'cache_attempt', 'Time (secs)':'time_taken', 'CPU usage':'cpu_used', \
                            'Disk I/O (ms)':'disk_io'}
         for key in table_head_dict:
-# This is tricky here: we are doing so because there may be more than 1
-# same-name link_text in one page. So we only find element inside the table
+        # This is tricky here: we are doing so because there may be more than 1
+        # same-name link_text in one page. So we only find element inside the table
             self.find_element_by_link_text_in_table(self.table_name, key).click()
             column_list = self.get_table_column_text("class", table_head_dict[key])
-# after 1st click, the list should be either sequenced or inverted, but we don't have a "default order" here
-# the point is, after another click, it should be another order
-# the first case is special:this means every item in column_list is the same, so
-# after one click, either sequenced or inverted will be fine
+        # after 1st click, the list should be either sequenced or inverted, but we don't have a "default order" here
+        # the point is, after another click, it should be another order
+        # the first case is special:this means every item in column_list is the same, so
+        # after one click, either sequenced or inverted will be fine
             if (is_list_inverted(column_list) and is_list_sequenced(column_list)) \
                 or (not column_list) :
                 self.find_element_by_link_text_in_table(self.table_name, key).click()
@@ -844,7 +863,7 @@
                 self.find_element_by_link_text_in_table(self.table_name, key).click()
                 column_list = self.get_table_column_text("class", table_head_dict[key])
                 self.assertTrue(is_list_inverted(column_list), msg=("%s column not inverted" % key))
-# step 8-10
+        # step 8-10
         # filter dict: {link text name : filter table name in xpath}
         filter_dict = {'Executed':'filter_executed', 'Outcome':'filter_outcome', 'Cache attempt':'filter_cache_attempt'}
         for key in filter_dict:
@@ -864,11 +883,19 @@
                 self.save_screenshot(screenshot_type='selenium', append_name='step8')
                 # after the last option was clicked, we don't need operation below anymore
                 if number < len(avail_options)-1:
-                     temp_element = self.find_element_by_link_text_in_table(self.table_name, key)
-                     temp_element.find_element_by_xpath("..//*[@class='icon-filter filtered']").click()
-                     avail_options = self.driver.find_elements_by_xpath("//*[@id='" + filter_dict[key] + "']//*[@name='filter'][not(@disabled)]")
+                     try:
+                        temp_element = self.find_element_by_link_text_in_table(self.table_name, key)
+                        temp_element.find_element_by_xpath("..//*[@class='icon-filter filtered']").click()
+                        avail_options = self.driver.find_elements_by_xpath("//*[@id='" + filter_dict[key] + "']//*[@name='filter'][not(@disabled)]")
+                     except:
+                        print "in exception"
+                        self.find_element_by_text("Show all tasks").click()
+#                        self.driver.find_element_by_xpath("//*[@id='searchform']/button[2]").click()
+                        temp_element = self.find_element_by_link_text_in_table(self.table_name, key)
+                        temp_element.find_element_by_xpath("..//*[@class='icon-filter filtered']").click()
+                        avail_options = self.driver.find_elements_by_xpath("//*[@id='" + filter_dict[key] + "']//*[@name='filter'][not(@disabled)]")
                      self.browser_delay()
-# step 11
+        # step 11
         for item in ['order', 'task_name', 'executed', 'outcome', 'recipe_name', 'recipe_version']:
             try:
                 self.find_element_by_xpath_in_table(self.table_name, "./tbody/tr[1]/*[@class='" + item + "']/a").click()
@@ -878,7 +905,7 @@
             # insert screen shot here
             self.save_screenshot(screenshot_type='selenium', append_name='step11')
             self.driver.back()
-# step 12-14
+        # step 12-14
         # about test_dict: please refer to testcase 904 requirement step 12-14
         test_dict = {
             'Time':{
@@ -926,14 +953,14 @@
         # find "bash" in first column (Packages)
         self.driver.find_element_by_xpath("//*[@id='otable']//td[1]//*[text()='bash']").click()
         # save sceen here to observe...
-# step 6
+        # step 6
         self.driver.find_element_by_partial_link_text("Generated files").click()
         head_list = self.get_table_head_text('otable')
         for item in ['File', 'Size']:
             self.assertTrue(item in head_list, msg=("%s not in head row" % item))
         c_list = self.get_table_column_text('class', 'path')
         self.assertTrue(is_list_sequenced(c_list), msg=("column not in order"))
-# step 7
+        # step 7
         self.driver.find_element_by_partial_link_text("Runtime dependencies").click()
         # save sceen here to observe...
         # note that here table name is not 'otable'
@@ -943,11 +970,8 @@
         c_list = self.get_table_column_text_by_column_number('dependencies', 1)
         self.assertTrue(is_list_sequenced(c_list), msg=("list not in order"))
         texts = ['Size', 'License', 'Recipe', 'Recipe version', 'Layer', \
-                     'Layer branch', 'Layer commit']
-        time.sleep(1)
-#        for text in texts:
-#            self.assertTrue(self.is_text_present(text), msg=("text %s not in page" % text))
-        self.assertTrue(self.is_text_present(texts), msg=("text  not in page"))
+                     'Layer commit']
+        self.failUnless(self.is_text_present(texts))
 
 
         ##############
@@ -1049,7 +1073,7 @@
                 self.assertTrue(is_list_sequenced(column_search_list))
                 self.driver.find_element_by_css_selector("i.icon-remove").click()
             else:
-                self.assertTrue(is_list_sequenced(column_list))
+                self.assertTrue(is_list_sequenced(column_list),  msg=("list %s not sequenced" % key))
                 self.find_element_by_link_text_in_table(self.table_name, key).click()
                 column_list = self.get_table_column_text("class", table_head_dict[key])
                 self.assertTrue(is_list_inverted(column_list))
@@ -1102,21 +1126,22 @@
         self.driver.get(self.base_url)
         self.driver.find_element_by_link_text("core-image-minimal").click()
         self.find_element_by_link_text_in_table('nav', 'Recipes').click()
-# step 3-5
+        # step 3-5
         self.driver.find_element_by_id("search").clear()
         self.driver.find_element_by_id("search").send_keys("lib")
         self.driver.find_element_by_id("search-button").click()
         # save screen here for observation
         self.save_screenshot(screenshot_type='selenium', append_name='step5')
-# step 6
+        # step 6
         self.driver.find_element_by_css_selector("i.icon-remove").click()
         self.driver.find_element_by_id("search").clear()
         # we deliberately want "no result" here
         self.driver.find_element_by_id("search").send_keys("no such input")
         self.driver.find_element_by_id("search-button").click()
-        self.find_element_by_text("Show all recipes").click()
-        self.driver.quit()
-
+        try:
+            self.find_element_by_text("Show all recipes").click()
+        except:
+            self.fail(msg='Could not identify blank page elements')
 
         ##############
         #  CASE 912  #
@@ -1124,7 +1149,6 @@
     def test_912(self):
         self.case_no = self.get_case_number()
         self.log.info(' CASE %s log: ' % str(self.case_no))
-        self.driver = self.setup_browser(self)
         self.driver.maximize_window()
         self.driver.get(self.base_url)
         self.driver.find_element_by_link_text("core-image-minimal").click()
@@ -1200,10 +1224,10 @@
 
         self.table_name = 'information'
 
-        tasks_row_count = len(driver.find_elements_by_xpath("/html/body/div[2]/div/div[3]/div/div[1]/table/tbody/tr/td[1]"))
-        tasks_column_count = len(driver.find_elements_by_xpath("/html/body/div[2]/div/div[3]/div/div[1]/table/tbody/tr[1]/td"))
-        print tasks_row_count
-        print tasks_column_count
+        tasks_row_count = len(driver.find_elements_by_xpath("//*[@id='"+self.table_name+"']/table/tbody/tr/td[1]"))
+        tasks_column_count = len(driver.find_elements_by_xpath("//*[@id='"+self.table_name+"']/table/tbody/tr[1]/td"))
+        print 'rows: '+str(tasks_row_count)
+        print 'columns: '+str(tasks_column_count)
 
         Tasks_column = self.get_table_column_text_by_column_number(self.table_name, 2)
         print ("Tasks_column=", Tasks_column)
@@ -1230,21 +1254,26 @@
         driver.find_element_by_partial_link_text("Packages (").click()
         packages_name = driver.find_element_by_partial_link_text("Packages (").text
         print packages_name
-        packages_num = string.atoi(filter(str.isdigit, repr(packages_name)))
+        packages_num = int(filter(str.isdigit, repr(packages_name)))
         print packages_num
 
-        packages_row_count = len(driver.find_elements_by_xpath("/html/body/div[2]/div/div[3]/div/div[2]/table/tbody/tr/td[1]"))
+        #switch the table to show more than 10 rows at a time
+        self.driver.find_element_by_xpath("//*[@id='packages-built']/div[1]/div/select").click()
+        Select(driver.find_element_by_xpath("//*[@id='packages-built']/div[1]/div/select")).select_by_value('150')
+        self.driver.find_element_by_xpath("//*[@id='packages-built']/div[1]/div/select").send_keys(Keys.ENTER)
+
+        packages_row_count = len(driver.find_elements_by_xpath("//*[@id='otable']/tbody/tr/td[1]"))
         print packages_row_count
 
         if packages_num != packages_row_count:
             print ("Error! The packages number is not correct")
         else:
-            print ("The pakcages number is correct")
+            print ("The packages number is correct")
 
         driver.find_element_by_partial_link_text("Build dependencies (").click()
         depends_name = driver.find_element_by_partial_link_text("Build dependencies (").text
         print depends_name
-        depends_num = string.atoi(filter(str.isdigit, repr(depends_name)))
+        depends_num = int(filter(str.isdigit, repr(depends_name)))
         print depends_num
 
         if depends_num == 0:
@@ -1255,7 +1284,7 @@
             else:
                 print ("The message is expected")
         else:
-            depends_row_count = len(driver.find_elements_by_xpath("/html/body/div[2]/div/div[3]/div/div[3]/table/tbody/tr/td[1]"))
+            depends_row_count = len(driver.find_elements_by_xpath("//*[@id='dependencies']/table/tbody/tr/td[1]"))
             print depends_row_count
             if depends_num != depends_row_count:
                 print ("Error! The dependent packages number is not correct")
@@ -1265,7 +1294,7 @@
         driver.find_element_by_partial_link_text("Reverse build dependencies (").click()
         rdepends_name = driver.find_element_by_partial_link_text("Reverse build dependencies (").text
         print rdepends_name
-        rdepends_num = string.atoi(filter(str.isdigit, repr(rdepends_name)))
+        rdepends_num = int(filter(str.isdigit, repr(rdepends_name)))
         print rdepends_num
 
         if rdepends_num == 0:
@@ -1288,8 +1317,8 @@
         driver.find_element_by_link_text("Recipes").click()
         driver.find_element_by_link_text(test_package3).click()
 
-        native_tasks_row_count = len(driver.find_elements_by_xpath("/html/body/div[2]/div/div[3]/div/div[1]/table/tbody/tr/td[1]"))
-        native_tasks_column_count = len(driver.find_elements_by_xpath("/html/body/div[2]/div/div[3]/div/div[1]/table/tbody/tr[1]/td"))
+        native_tasks_row_count = len(driver.find_elements_by_xpath("//*[@id='information']/table/tbody/tr/td[1]"))
+        native_tasks_column_count = len(driver.find_elements_by_xpath("//*[@id='information']/table/tbody/tr[1]/td"))
         print native_tasks_row_count
         print native_tasks_column_count
 
@@ -1318,13 +1347,13 @@
         driver.find_element_by_partial_link_text("Packages (").click()
         native_packages_name = driver.find_element_by_partial_link_text("Packages (").text
         print native_packages_name
-        native_packages_num = string.atoi(filter(str.isdigit, repr(native_packages_name)))
+        native_packages_num = int(filter(str.isdigit, repr(native_packages_name)))
         print native_packages_num
 
         if native_packages_num != 0:
             print ("Error! Native task shouldn't have any packages.")
         else:
-            native_package_message = repr(driver.find_element_by_css_selector("div.alert.alert-info").text)
+            native_package_message = repr(driver.find_element_by_css_selector("#packages-built > div.alert.alert-info").text)
             print native_package_message
             if native_package_message.find("does not build any packages.") < 0:
                 print ("Error! The message for native task isn't expected.")
@@ -1334,10 +1363,10 @@
         driver.find_element_by_partial_link_text("Build dependencies (").click()
         native_depends_name = driver.find_element_by_partial_link_text("Build dependencies (").text
         print native_depends_name
-        native_depends_num = string.atoi(filter(str.isdigit, repr(native_depends_name)))
+        native_depends_num = int(filter(str.isdigit, repr(native_depends_name)))
         print native_depends_num
 
-        native_depends_row_count = len(driver.find_elements_by_xpath("/html/body/div[2]/div/div[3]/div/div[3]/table/tbody/tr/td[1]"))
+        native_depends_row_count = len(driver.find_elements_by_xpath("//*[@id='dependencies']/table/tbody/tr/td[1]"))
         print native_depends_row_count
 
         if native_depends_num != native_depends_row_count:
@@ -1348,10 +1377,10 @@
         driver.find_element_by_partial_link_text("Reverse build dependencies (").click()
         native_rdepends_name = driver.find_element_by_partial_link_text("Reverse build dependencies (").text
         print native_rdepends_name
-        native_rdepends_num = string.atoi(filter(str.isdigit, repr(native_rdepends_name)))
+        native_rdepends_num = int(filter(str.isdigit, repr(native_rdepends_name)))
         print native_rdepends_num
 
-        native_rdepends_row_count = len(driver.find_elements_by_xpath("/html/body/div[2]/div/div[3]/div/div[4]/table/tbody/tr/td[1]"))
+        native_rdepends_row_count = len(driver.find_elements_by_xpath("//*[@id='brought-in-by']/table/tbody/tr/td[1]"))
         print native_rdepends_row_count
 
         if native_rdepends_num != native_rdepends_row_count:
@@ -1371,24 +1400,24 @@
         self.driver.maximize_window()
         self.driver.get(self.base_url)
         self.driver.find_element_by_link_text("core-image-minimal").click()
-# step 3
+        # step 3
         self.find_element_by_link_text_in_table('nav', 'Configuration').click()
         self.driver.find_element_by_link_text("BitBake variables").click()
-# step 4
+        # step 4
         self.driver.find_element_by_id("search").clear()
         self.driver.find_element_by_id("search").send_keys("lib")
         self.driver.find_element_by_id("search-button").click()
         # save screen to see result
         self.browser_delay()
         self.save_screenshot(screenshot_type='selenium', append_name='step4')
-# step 5
+        # step 5
         self.driver.find_element_by_css_selector("i.icon-remove").click()
         head_list = self.get_table_head_text('otable')
         print head_list
         print len(head_list)
         self.assertTrue(head_list == ['Variable', 'Value', 'Set in file', 'Description'], \
                         msg=("head row contents wrong"))
-# step 8
+        # step 8
         # search other string. and click "Variable" to re-sort, check if table
         # head is still the same
         self.driver.find_element_by_id("search").clear()
@@ -1413,17 +1442,17 @@
         self.driver.maximize_window()
         self.driver.get(self.base_url)
         self.driver.find_element_by_link_text("core-image-minimal").click()
-# step 2-3
+        # step 2-3
         self.find_element_by_link_text_in_table('nav', 'Configuration').click()
         self.driver.find_element_by_link_text("BitBake variables").click()
         variable_list = self.get_table_column_text('class', 'variable_name')
         self.assertTrue(is_list_sequenced(variable_list), msg=("list not in order"))
-# step 4
+        # step 4
         self.find_element_by_link_text_in_table('otable', 'Variable').click()
         variable_list = self.get_table_column_text('class', 'variable_name')
         self.assertTrue(is_list_inverted(variable_list), msg=("list not inverted"))
         self.find_element_by_link_text_in_table('otable', 'Variable').click()
-# step 5
+        # step 5
         # searching won't change the sequentiality
         self.driver.find_element_by_id("search").clear()
         self.driver.find_element_by_id("search").send_keys("lib")
@@ -1447,12 +1476,11 @@
         # step 3
         self.driver.find_element_by_id("edit-columns-button").click()
         self.driver.find_element_by_id("started_on").click()
-        self.driver.find_element_by_id("log").click()
         self.driver.find_element_by_id("time").click()
         self.driver.find_element_by_id("edit-columns-button").click()
         head_list = self.get_table_head_text('otable')
-        for item in ['Outcome', 'Recipe', 'Machine', 'Started on', 'Completed on', 'Failed tasks', 'Errors', 'Warnings', 'Warnings', 'Time']:
-            self.assertTrue(item in head_list, msg=("item %s not in head row" % item))
+        for item in ['Outcome', 'Recipe', 'Machine', 'Started on', 'Completed on', 'Failed tasks', 'Errors', 'Warnings', 'Time', "Image files", "Project"]:
+            self.failUnless(item in head_list, msg=item+' is missing from table head.')
 
 
         ##############
@@ -1470,10 +1498,11 @@
         # Step 4
         # click Errors , order in "Completed on" should be disturbed. Then hide
         # error column to check if order in "Completed on" can be restored
-        self.find_element_by_link_text_in_table('otable', 'Errors').click()
-        self.driver.find_element_by_id("edit-columns-button").click()
-        self.driver.find_element_by_id("errors_no").click()
-        self.driver.find_element_by_id("edit-columns-button").click()
+#THIS TEST IS NO LONGER VALID DUE TO DESIGN CHANGES. LEAVING IN PENDING UPDATES TO DESIGN
+        #self.find_element_by_link_text_in_table('otable', 'Errors').click()
+        #self.driver.find_element_by_id("edit-columns-button").click()
+        #self.driver.find_element_by_id("errors_no").click()
+        #self.driver.find_element_by_id("edit-columns-button").click()
         # Note: without time.sleep here, there'll be unpredictable error..TBD
         time.sleep(1)
         c_list = self.get_table_column_text('class', 'completed_on')
@@ -1489,12 +1518,12 @@
         self.driver.maximize_window()
         self.driver.get(self.base_url)
         self.driver.find_element_by_link_text("core-image-minimal").click()
-# Step 2-3
+        # Step 2-3
         self.find_element_by_link_text_in_table('nav', 'Packages').click()
         check_head_list = ['Package', 'Package version', 'Size', 'Recipe']
         head_list = self.get_table_head_text('otable')
         self.assertTrue(head_list == check_head_list, msg=("head row not as expected"))
-# Step 4
+        # Step 4
         # pulldown menu
         option_ids = ['recipe__layer_version__layer__name', 'recipe__layer_version__branch', \
                       'recipe__layer_version__layer__commit', 'license', 'recipe__version']
@@ -1583,7 +1612,7 @@
         # otable is the recipes table here
         otable_head_text = self.get_table_head_text('otable')
         for item in ["Layer", "Layer branch", "Layer commit"]:
-            self.assertFalse(item not in otable_head_text, msg=("item %s should be in head row" % item))
+            self.failIf(item not in otable_head_text, msg=item+' not in table head.')
         # click the fist recipe, whatever it is
         self.get_table_element("otable", 1, 1).click()
         self.assertTrue(self.is_text_present(["Layer", "Layer branch", "Layer commit", "Recipe file"]), \
@@ -1626,8 +1655,8 @@
         self.driver.back()
         self.driver.find_element_by_link_text("Configuration").click()
         otable_head_text = self.get_table_head_text()
-        for item in ["Layer", "Layer branch", "Layer commit"]:
-            self.assertTrue(item not in otable_head_text, msg=("item %s should not be in head row" % item))
+        self.assertTrue(self.is_text_present(["Layer", "Layer branch", "Layer commit"]), \
+                        msg=("text not in web page"))
 
 
         ##############
@@ -1637,14 +1666,14 @@
         self.case_no = self.get_case_number()
         self.log.info(' CASE %s log: ' % str(self.case_no))
         self.driver.maximize_window()
-        for items in ["Packages", "Recipes", "Tasks"]:
+        for item in ["Packages", "Recipes", "Tasks"]:
             self.driver.get(self.base_url)
             self.driver.find_element_by_link_text("core-image-minimal").click()
             self.driver.find_element_by_link_text(items).click()
 
             # this may be page specific. If future page content changes, try to replace it with new xpath
-            xpath_showrows = "/html/body/div[2]/div/div[2]/div[2]/div[2]/div/div/div[2]/select"
-            xpath_table = "/html/body/div[2]/div/div[2]/div[2]/table/tbody"
+            xpath_showrows = "/html/body/div[4]/div/div/div[2]/div[2]/div[2]/div/div/div[2]/select"
+            xpath_table = "html/body/div[4]/div/div/div[2]/div[2]/table/tbody"#"id=('otable')/tbody"
             self.driver.find_element_by_xpath(xpath_showrows).click()
             rows_displayed = int(self.driver.find_element_by_xpath(xpath_showrows + "/option[2]").text)
 
@@ -1652,14 +1681,18 @@
             # Sure we can use driver.get(url) to refresh page, but since page will vary, we use click link text here
             self.driver.find_element_by_link_text(items).click()
             Select(self.driver.find_element_by_css_selector("select.pagesize")).select_by_visible_text(str(rows_displayed))
-            self.assertTrue(self.is_element_present(By.XPATH, xpath_table + "/tr[" + str(rows_displayed) +"]"))
-            self.assertFalse(self.is_element_present(By.XPATH, xpath_table + "/tr[" + str(rows_displayed+1) +"]"))
+            self.failUnless(self.is_element_present(By.XPATH, xpath_table + "/tr[" + str(rows_displayed) +"]"))
+            self.failIf(self.is_element_present(By.XPATH, xpath_table + "/tr[" + str(rows_displayed+1) +"]"))
 
             # click 1st package, then go back to check if it's still those rows shown.
-            self.driver.find_element_by_xpath(xpath_table + "/tr[1]/td[1]").click()
-            self.driver.find_element_by_link_text(items).click()
-            self.assertTrue(self.is_element_present(By.XPATH, xpath_table + "/tr[" + str(rows_displayed) +"]"))
-            self.assertFalse(self.is_element_present(By.XPATH, xpath_table + "/tr[" + str(rows_displayed+1) +"]"))
+            self.driver.find_element_by_xpath(xpath_otable + "/tr[1]/td[1]/a").click()
+            time.sleep(3)
+            self.driver.find_element_by_link_text(item).click()
+            self.assertTrue(self.is_element_present(By.XPATH, xpath_otable + "/tr[" + str(option_tobeselected) +"]"),\
+                            msg=("Row %d should exist" %option_tobeselected))
+            self.assertFalse(self.is_element_present(By.XPATH, xpath_otable + "/tr[" + str(option_tobeselected+1) +"]"),\
+                            msg=("Row %d should not exist" %(option_tobeselected+1)))
+
 
 
         ##############
@@ -1944,7 +1977,400 @@
         # step 2-3 need to run manually
         self.log.info("step 2-3: checking the help message when you hover on help icon of target,\
                        tasks, recipes, packages need to run manually")
-        self.driver.find_element_by_partial_link_text("Toaster manual").click()
-        if not self.is_text_present("Toaster Manual"):
-            self.assertFalse(True, msg=("please check [Toaster manual] link on page"))
+        self.driver.find_element_by_partial_link_text("Manual").click()
+        if not self.is_text_present("Manual"):
+            self.log.error("please check [Toaster manual] link on page")
+            self.failIf(True)
 
+####################################################################################################
+# Starting backend tests ###########################################################################
+####################################################################################################
+
+        ##############
+        #  CASE 1066 #
+        ##############
+    def test_1066(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select count(name) from orm_project a, auth_user b where a.user_id = b.id and b.username='_anonuser';"
+        cursor.execute(query)
+        data = cursor.fetchone()
+        self.failUnless(data >= 1)
+
+
+        ##############
+        #  CASE 1071 #
+        ##############
+    def test_1071(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select name from orm_release;"
+        cursor.execute(query)
+        data = cursor.fetchall()
+        for i in range(0,4):
+            data[i] = data[i][0]
+        data.sort()
+        print data
+        json_parse = json.loads(open('toasterconf.json').read())
+        json_data = []
+        for i in range (0,4):
+            json_data.append(json_parse['releases'][i]['name'])
+        json_data.sort()
+        print json_data
+        self.failUnless(data == json_data)
+
+        ##############
+        #  CASE 1072 #
+        ##############
+    def test_1072(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select value from orm_toastersetting where name like 'DEFCONF%';"
+        cursor.execute(query)
+        data = cursor.fetchall()
+        for i in range(0,6):
+            data[i] = data[i][0]
+        print data
+        json_parse = json.loads(open('toasterconf.json').read())
+        json_data=json_parse['config']
+        json_data = json_data.values()
+        print json_data
+        self.failUnless(data == json_data)
+
+
+        ##############
+        #  CASE 1074 #
+        ##############
+    def test_1074(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select name from orm_layersource;"
+        cursor.execute(query)
+        data = cursor.fetchall()
+        for i in range(0,3):
+            data[i] = data[i][0]
+        print data
+        json_parse = json.loads(open('toasterconf.json').read())
+        json_data = []
+        for i in range(0,3):
+            json_data.append(json_parse['layersources'][i]['name'])
+        print json_data
+        self.failUnless(set(data) == set(json_data))
+
+        ##############
+        #  CASE 1075 #
+        ##############
+    def test_1075(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select value from orm_toastersetting where name like 'DEFAULT_RELEASE';"
+        cursor.execute(query)
+        data = cursor.fetchall()
+        data = data[0][0]
+        print data
+        json_parse = json.loads(open('toasterconf.json').read())
+        json_data = json_parse['defaultrelease']
+        print json_data
+        self.failUnless(set(data) == set(json_data))
+
+        ##############
+        #  CASE 1076 #
+        ##############
+    def test_1076(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+
+        print 'Checking branches for "Local Yocto Project"'
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select name from orm_branch where layer_source_id=1;"
+        cursor.execute(query)
+        data = cursor.fetchall()
+        lenght = len(data)
+        try:
+            for i in range(0,lenght):
+                data[i] = data[i][0]
+        except:
+            pass
+        print data
+        json_parse = json.loads(open('toasterconf.json').read())
+        json_location = json_parse['layersources'][0]['name']
+        print json_location
+        json_data = json_parse['layersources'][0]['branches']
+        print json_data
+        self.failUnless(set(data) == set(json_data))
+
+        print 'Checking branches for "OpenEmbedded"'
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select name from orm_branch where layer_source_id=3;"
+        cursor.execute(query)
+        data = cursor.fetchall()
+        lenght = len(data)
+        for i in range(0,lenght):
+            data[i] = data[i][0]
+        print data
+        json_parse = json.loads(open('toasterconf.json').read())
+        json_location = json_parse['layersources'][1]['name']
+        print json_location
+        json_data = json_parse['layersources'][1]['branches']
+        print json_data
+        self.failUnless(set(data) == set(json_data))
+
+        print 'Checking branches for "Imported layers"'
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select name from orm_branch where layer_source_id=2;"
+        cursor.execute(query)
+        data = cursor.fetchall()
+        lenght = len(data)
+        for i in range(0,lenght):
+            data[i] = data[i][0]
+        print data
+        json_parse = json.loads(open('toasterconf.json').read())
+        json_location = json_parse['layersources'][2]['name']
+        print json_location
+        json_data = json_parse['layersources'][2]['branches']
+        print json_data
+        self.failUnless(set(data) == set(json_data))
+
+
+        ##############
+        #  CASE 1077 #
+        ##############
+    def test_1077(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select name from orm_bitbakeversion;"
+        cursor.execute(query)
+        data = cursor.fetchall()
+        for i in range(0,4):
+            data[i] = data[i][0]
+        print data
+        json_parse = json.loads(open('toasterconf.json').read())
+        json_data = []
+        for i in range(0,4):
+            json_data.append(json_parse['bitbake'][i]['name'])
+        print json_data
+        self.failUnless(set(data) == set(json_data))
+
+        ##############
+        #  CASE 1083 #
+        ##############
+    def test_1083(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        self.driver.maximize_window()
+        self.driver.get(self.base_url)
+        self.driver.find_element_by_id("new-project-button").click()
+        self.driver.find_element_by_id("new-project-name").send_keys("new-test-project")
+        self.driver.find_element_by_id("create-project-button").click()
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select count(name) from orm_project where name = 'new-test-project';"
+        cursor.execute(query)
+        data = cursor.fetchone()
+        print 'data: %s' % data
+        self.failUnless(data >= 1)
+
+        ##############
+        #  CASE 1084 #
+        ##############
+    def test_1084(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        self.driver.maximize_window()
+        self.driver.get(self.base_url)
+        self.driver.find_element_by_id("new-project-button").click()
+        self.driver.find_element_by_id("new-project-name").send_keys("new-default-project")
+        self.driver.find_element_by_id("create-project-button").click()
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select a.name from orm_release a, orm_project b where a.id = b.release_id and b.name = 'new-default-project' limit 1;"
+        cursor.execute(query)
+        db_data = str(cursor.fetchone()[0])
+        json_parse = json.loads(open('toasterconf.json').read())
+        json_data = str(json_parse['defaultrelease'])
+        self.failUnless(db_data == json_data)
+
+        ##############
+        #  CASE 1088 #
+        ##############
+    def test_1088(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        self.driver.maximize_window()
+        self.driver.get(self.base_url)
+        self.driver.find_element_by_css_selector("a[href='/toastergui/projects/']").click()
+        self.driver.find_element_by_link_text('new-default-project').click()
+        self.driver.find_element_by_id('project-change-form-toggle').click()
+        self.driver.find_element_by_id('project-name-change-input').clear()
+        self.driver.find_element_by_id('project-name-change-input').send_keys('new-name')
+        self.driver.find_element_by_id('project-name-change-btn').click()
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select count(name) from orm_project where name = 'new-name';"
+        cursor.execute(query)
+        data = cursor.fetchone()[0]
+        self.failUnless(data == 1)
+        #reseting project name
+        self.driver.find_element_by_id('project-change-form-toggle').click()
+        self.driver.find_element_by_id('project-name-change-input').clear()
+        self.driver.find_element_by_id('project-name-change-input').send_keys('new-default-project')
+        self.driver.find_element_by_id('project-name-change-btn').click()
+
+
+        ##############
+        #  CASE 1089 #
+        ##############
+    def test_1089(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        self.driver.maximize_window()
+        self.driver.get(self.base_url)
+        self.driver.find_element_by_css_selector("a[href='/toastergui/projects/']").click()
+        self.driver.find_element_by_link_text('new-default-project').click()
+        self.driver.find_element_by_id('change-machine-toggle').click()
+        self.driver.find_element_by_id('machine-change-input').clear()
+        self.driver.find_element_by_id('machine-change-input').send_keys('qemuarm64')
+#        self.driver.find_element_by_id('machine-change-input').send_keys(Keys.RETURN)
+        self.driver.find_element_by_id('machine-change-btn').click()
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select count(id) from orm_projectvariable where name like 'machine' and value like 'qemuarm64';"
+        cursor.execute(query)
+        data = cursor.fetchone()[0]
+        self.failUnless(data == 1)
+        #resetting machine to default value
+        self.driver.find_element_by_id('change-machine-toggle').click()
+        self.driver.find_element_by_id('machine-change-input').clear()
+        self.driver.find_element_by_id('machine-change-input').send_keys('qemux86')
+        self.driver.find_element_by_id('machine-change-input').send_keys(Keys.RETURN)
+        self.driver.find_element_by_id('machine-change-btn').click()
+
+        ##############
+        #  CASE 1090 #
+        ##############
+    def test_1090(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select username from auth_user where is_superuser = 1;"
+        cursor.execute(query)
+        data = cursor.fetchall()
+        try:
+            data = data[0][0]
+        except:
+            pass
+        print data
+        self.failUnless(data == 'toaster_admin')
+
+        ##############
+        #  CASE 1091 #
+        ##############
+    def test_1091(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        self.driver.maximize_window()
+        self.driver.get(self.base_url)
+        self.driver.find_element_by_css_selector("a[href='/toastergui/projects/']").click()
+        self.driver.find_element_by_link_text('new-default-project').click()
+        self.driver.find_element_by_id('release-change-toggle').click()
+        dropdown = self.driver.find_element_by_css_selector('select')
+        for option in dropdown.find_elements_by_tag_name('option'):
+            if option.text == 'Local Yocto Project':
+                option.click()
+        self.driver.find_element_by_id('change-release-btn').click()
+        #wait for the changes to register in the DB
+        time.sleep(1)
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select count(*) from orm_layer_version a, orm_projectlayer b, orm_project c where a.\"commit\"=\"HEAD\" and a.id = b.layercommit_id and b.project_id=c.id and c.name='new-default-project';"
+        cursor.execute(query)
+        data = cursor.fetchone()[0]
+        #resetting release to default
+        self.driver.find_element_by_id('release-change-toggle').click()
+        dropdown = self.driver.find_element_by_css_selector('select')
+        for option in dropdown.find_elements_by_tag_name('option'):
+            if option.text == 'Yocto Project master':
+                option.click()
+        self.driver.find_element_by_id('change-release-btn').click()
+        #wait for the changes to register in the DB
+        time.sleep(1)
+        self.failUnless(data == 3)
+
+        ##############
+        #  CASE 1092 #
+        ##############
+    def test_1092(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+        self.driver.maximize_window()
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select a.name, a.value from orm_projectvariable a, orm_project b where a.project_id = b.id and b.name = 'new-default-project';"
+        cursor.execute(query)
+        data = dict(cursor.fetchall())
+        print data
+        default_values = {u'IMAGE_INSTALL_append': u'', u'PACKAGE_CLASSES': u'package_rpm', u'MACHINE': u'qemux86', u'SDKMACHINE': u'x86_64', u'DISTRO': u'poky', u'IMAGE_FSTYPES': u'ext3 jffs2 tar.bz2'}
+        self.failUnless(data == default_values)
+
+        ##############
+        #  CASE 1093 #
+        ##############
+    def test_1093(self):
+        self.case_no = self.get_case_number()
+        self.log.info(' CASE %s log: ' % str(self.case_no))
+
+        #get initial values
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select layercommit_id from orm_projectlayer a, orm_project b where a.project_id=b.id and b.name='new-default-project';"
+        cursor.execute(query)
+        data_initial = cursor.fetchall()
+        print data_initial
+
+        self.driver.maximize_window()
+        self.driver.get('localhost:8000')#self.base_url)
+        self.driver.find_element_by_css_selector("a[href='/toastergui/projects/']").click()
+        self.driver.find_element_by_link_text('new-default-project').click()
+        self.driver.find_element_by_id('release-change-toggle').click()
+        dropdown = self.driver.find_element_by_css_selector('select')
+        for option in dropdown.find_elements_by_tag_name('option'):
+            if option.text == 'Local Yocto Project':
+                option.click()
+        self.driver.find_element_by_id('change-release-btn').click()
+        #wait for the changes to register in the DB
+        time.sleep(1)
+
+        #get changed values
+        con=sqlite.connect('toaster.sqlite')
+        cursor = con.cursor()
+        query = "select layercommit_id from orm_projectlayer a, orm_project b where a.project_id=b.id and b.name='new-default-project';"
+        cursor.execute(query)
+        data_changed = cursor.fetchall()
+        print data_changed
+
+        #resetting release to default
+        self.driver.find_element_by_id('release-change-toggle').click()
+        dropdown = self.driver.find_element_by_css_selector('select')
+        for option in dropdown.find_elements_by_tag_name('option'):
+            if option.text == 'Yocto Project master':
+                option.click()
+        self.driver.find_element_by_id('change-release-btn').click()
+        #wait for the changes to register in the DB
+        time.sleep(1)
+        self.failUnless(data_initial != data_changed)
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0001_initial.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0001_initial.py
index dedeef8..760462f 100644
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0001_initial.py
+++ b/yocto-poky/bitbake/lib/toaster/orm/migrations/0001_initial.py
@@ -1,400 +1,504 @@
 # -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
+from __future__ import unicode_literals
+
+from django.db import migrations, models
 
 
-class Migration(SchemaMigration):
+class Migration(migrations.Migration):
 
-    def forwards(self, orm):
-        # Adding model 'Build'
-        db.create_table(u'orm_build', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('machine', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('image_fstypes', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('distro', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('distro_version', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('started_on', self.gf('django.db.models.fields.DateTimeField')()),
-            ('completed_on', self.gf('django.db.models.fields.DateTimeField')()),
-            ('outcome', self.gf('django.db.models.fields.IntegerField')(default=2)),
-            ('errors_no', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('warnings_no', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('cooker_log_path', self.gf('django.db.models.fields.CharField')(max_length=500)),
-            ('build_name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('bitbake_version', self.gf('django.db.models.fields.CharField')(max_length=50)),
-        ))
-        db.send_create_signal(u'orm', ['Build'])
+    dependencies = [
+    ]
 
-        # Adding model 'Target'
-        db.create_table(u'orm_target', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('build', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'])),
-            ('target', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('is_image', self.gf('django.db.models.fields.BooleanField')(default=False)),
-            ('file_name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('file_size', self.gf('django.db.models.fields.IntegerField')()),
-        ))
-        db.send_create_signal(u'orm', ['Target'])
-
-        # Adding model 'Task'
-        db.create_table(u'orm_task', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('build', self.gf('django.db.models.fields.related.ForeignKey')(related_name='task_build', to=orm['orm.Build'])),
-            ('order', self.gf('django.db.models.fields.IntegerField')(null=True)),
-            ('task_executed', self.gf('django.db.models.fields.BooleanField')(default=False)),
-            ('outcome', self.gf('django.db.models.fields.IntegerField')(default=5)),
-            ('sstate_checksum', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)),
-            ('path_to_sstate_obj', self.gf('django.db.models.fields.FilePathField')(max_length=500, blank=True)),
-            ('recipe', self.gf('django.db.models.fields.related.ForeignKey')(related_name='build_recipe', to=orm['orm.Recipe'])),
-            ('task_name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('source_url', self.gf('django.db.models.fields.FilePathField')(max_length=255, blank=True)),
-            ('work_directory', self.gf('django.db.models.fields.FilePathField')(max_length=255, blank=True)),
-            ('script_type', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('line_number', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('disk_io', self.gf('django.db.models.fields.IntegerField')(null=True)),
-            ('cpu_usage', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=6, decimal_places=2)),
-            ('elapsed_time', self.gf('django.db.models.fields.CharField')(default=0, max_length=50)),
-            ('sstate_result', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('message', self.gf('django.db.models.fields.CharField')(max_length=240)),
-            ('logfile', self.gf('django.db.models.fields.FilePathField')(max_length=255, blank=True)),
-        ))
-        db.send_create_signal(u'orm', ['Task'])
-
-        # Adding model 'Task_Dependency'
-        db.create_table(u'orm_task_dependency', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('task', self.gf('django.db.models.fields.related.ForeignKey')(related_name='task_dependencies_task', to=orm['orm.Task'])),
-            ('depends_on', self.gf('django.db.models.fields.related.ForeignKey')(related_name='task_dependencies_depends', to=orm['orm.Task'])),
-        ))
-        db.send_create_signal(u'orm', ['Task_Dependency'])
-
-        # Adding model 'Package'
-        db.create_table(u'orm_package', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('build', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'])),
-            ('recipe', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Recipe'], null=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('version', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)),
-            ('revision', self.gf('django.db.models.fields.CharField')(max_length=32, blank=True)),
-            ('summary', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)),
-            ('description', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)),
-            ('size', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('installed_size', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('section', self.gf('django.db.models.fields.CharField')(max_length=80, blank=True)),
-            ('license', self.gf('django.db.models.fields.CharField')(max_length=80, blank=True)),
-        ))
-        db.send_create_signal(u'orm', ['Package'])
-
-        # Adding model 'Package_Dependency'
-        db.create_table(u'orm_package_dependency', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('package', self.gf('django.db.models.fields.related.ForeignKey')(related_name='package_dependencies_source', to=orm['orm.Package'])),
-            ('depends_on', self.gf('django.db.models.fields.related.ForeignKey')(related_name='package_dependencies_target', to=orm['orm.Package'])),
-            ('dep_type', self.gf('django.db.models.fields.IntegerField')()),
-            ('target', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Target'], null=True)),
-        ))
-        db.send_create_signal(u'orm', ['Package_Dependency'])
-
-        # Adding model 'Target_Installed_Package'
-        db.create_table(u'orm_target_installed_package', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('target', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Target'])),
-            ('package', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Package'])),
-        ))
-        db.send_create_signal(u'orm', ['Target_Installed_Package'])
-
-        # Adding model 'Package_File'
-        db.create_table(u'orm_package_file', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('package', self.gf('django.db.models.fields.related.ForeignKey')(related_name='buildfilelist_package', to=orm['orm.Package'])),
-            ('path', self.gf('django.db.models.fields.FilePathField')(max_length=255, blank=True)),
-            ('size', self.gf('django.db.models.fields.IntegerField')()),
-        ))
-        db.send_create_signal(u'orm', ['Package_File'])
-
-        # Adding model 'Recipe'
-        db.create_table(u'orm_recipe', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)),
-            ('version', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)),
-            ('layer_version', self.gf('django.db.models.fields.related.ForeignKey')(related_name='recipe_layer_version', to=orm['orm.Layer_Version'])),
-            ('summary', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)),
-            ('description', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)),
-            ('section', self.gf('django.db.models.fields.CharField')(max_length=100, blank=True)),
-            ('license', self.gf('django.db.models.fields.CharField')(max_length=200, blank=True)),
-            ('licensing_info', self.gf('django.db.models.fields.TextField')(blank=True)),
-            ('homepage', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)),
-            ('bugtracker', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)),
-            ('file_path', self.gf('django.db.models.fields.FilePathField')(max_length=255)),
-        ))
-        db.send_create_signal(u'orm', ['Recipe'])
-
-        # Adding model 'Recipe_Dependency'
-        db.create_table(u'orm_recipe_dependency', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('recipe', self.gf('django.db.models.fields.related.ForeignKey')(related_name='r_dependencies_recipe', to=orm['orm.Recipe'])),
-            ('depends_on', self.gf('django.db.models.fields.related.ForeignKey')(related_name='r_dependencies_depends', to=orm['orm.Recipe'])),
-            ('dep_type', self.gf('django.db.models.fields.IntegerField')()),
-        ))
-        db.send_create_signal(u'orm', ['Recipe_Dependency'])
-
-        # Adding model 'Layer'
-        db.create_table(u'orm_layer', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('local_path', self.gf('django.db.models.fields.FilePathField')(max_length=255)),
-            ('layer_index_url', self.gf('django.db.models.fields.URLField')(max_length=200)),
-        ))
-        db.send_create_signal(u'orm', ['Layer'])
-
-        # Adding model 'Layer_Version'
-        db.create_table(u'orm_layer_version', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('build', self.gf('django.db.models.fields.related.ForeignKey')(related_name='layer_version_build', to=orm['orm.Build'])),
-            ('layer', self.gf('django.db.models.fields.related.ForeignKey')(related_name='layer_version_layer', to=orm['orm.Layer'])),
-            ('branch', self.gf('django.db.models.fields.CharField')(max_length=50)),
-            ('commit', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('priority', self.gf('django.db.models.fields.IntegerField')()),
-        ))
-        db.send_create_signal(u'orm', ['Layer_Version'])
-
-        # Adding model 'Variable'
-        db.create_table(u'orm_variable', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('build', self.gf('django.db.models.fields.related.ForeignKey')(related_name='variable_build', to=orm['orm.Build'])),
-            ('variable_name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('variable_value', self.gf('django.db.models.fields.TextField')(blank=True)),
-            ('changed', self.gf('django.db.models.fields.BooleanField')(default=False)),
-            ('human_readable_name', self.gf('django.db.models.fields.CharField')(max_length=200)),
-            ('description', self.gf('django.db.models.fields.TextField')(blank=True)),
-        ))
-        db.send_create_signal(u'orm', ['Variable'])
-
-        # Adding model 'VariableHistory'
-        db.create_table(u'orm_variablehistory', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('variable', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Variable'])),
-            ('file_name', self.gf('django.db.models.fields.FilePathField')(max_length=255)),
-            ('line_number', self.gf('django.db.models.fields.IntegerField')(null=True)),
-            ('operation', self.gf('django.db.models.fields.CharField')(max_length=16)),
-        ))
-        db.send_create_signal(u'orm', ['VariableHistory'])
-
-        # Adding model 'LogMessage'
-        db.create_table(u'orm_logmessage', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('build', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'])),
-            ('level', self.gf('django.db.models.fields.IntegerField')(default=0)),
-            ('message', self.gf('django.db.models.fields.CharField')(max_length=240)),
-            ('pathname', self.gf('django.db.models.fields.FilePathField')(max_length=255, blank=True)),
-            ('lineno', self.gf('django.db.models.fields.IntegerField')(null=True)),
-        ))
-        db.send_create_signal(u'orm', ['LogMessage'])
-
-
-    def backwards(self, orm):
-        # Deleting model 'Build'
-        db.delete_table(u'orm_build')
-
-        # Deleting model 'Target'
-        db.delete_table(u'orm_target')
-
-        # Deleting model 'Task'
-        db.delete_table(u'orm_task')
-
-        # Deleting model 'Task_Dependency'
-        db.delete_table(u'orm_task_dependency')
-
-        # Deleting model 'Package'
-        db.delete_table(u'orm_package')
-
-        # Deleting model 'Package_Dependency'
-        db.delete_table(u'orm_package_dependency')
-
-        # Deleting model 'Target_Installed_Package'
-        db.delete_table(u'orm_target_installed_package')
-
-        # Deleting model 'Package_File'
-        db.delete_table(u'orm_package_file')
-
-        # Deleting model 'Recipe'
-        db.delete_table(u'orm_recipe')
-
-        # Deleting model 'Recipe_Dependency'
-        db.delete_table(u'orm_recipe_dependency')
-
-        # Deleting model 'Layer'
-        db.delete_table(u'orm_layer')
-
-        # Deleting model 'Layer_Version'
-        db.delete_table(u'orm_layer_version')
-
-        # Deleting model 'Variable'
-        db.delete_table(u'orm_variable')
-
-        # Deleting model 'VariableHistory'
-        db.delete_table(u'orm_variablehistory')
-
-        # Deleting model 'LogMessage'
-        db.delete_table(u'orm_logmessage')
-
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_fstypes': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'licensing_info': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.CharField', [], {'default': '0', 'max_length': '50'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '5'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
+    operations = [
+        migrations.CreateModel(
+            name='BitbakeVersion',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(unique=True, max_length=32)),
+                ('giturl', models.URLField()),
+                ('branch', models.CharField(max_length=32)),
+                ('dirpath', models.CharField(max_length=255)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Branch',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('up_id', models.IntegerField(default=None, null=True)),
+                ('up_date', models.DateTimeField(default=None, null=True)),
+                ('name', models.CharField(max_length=50)),
+                ('short_description', models.CharField(max_length=50, blank=True)),
+            ],
+            options={
+                'verbose_name_plural': 'Branches',
+            },
+        ),
+        migrations.CreateModel(
+            name='Build',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('machine', models.CharField(max_length=100)),
+                ('distro', models.CharField(max_length=100)),
+                ('distro_version', models.CharField(max_length=100)),
+                ('started_on', models.DateTimeField()),
+                ('completed_on', models.DateTimeField()),
+                ('outcome', models.IntegerField(default=2, choices=[(0, b'Succeeded'), (1, b'Failed'), (2, b'In Progress')])),
+                ('cooker_log_path', models.CharField(max_length=500)),
+                ('build_name', models.CharField(max_length=100)),
+                ('bitbake_version', models.CharField(max_length=50)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='BuildArtifact',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('file_name', models.FilePathField()),
+                ('file_size', models.IntegerField()),
+                ('build', models.ForeignKey(to='orm.Build')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='HelpText',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('area', models.IntegerField(choices=[(0, b'variable')])),
+                ('key', models.CharField(max_length=100)),
+                ('text', models.TextField()),
+                ('build', models.ForeignKey(related_name='helptext_build', to='orm.Build')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Layer',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('up_id', models.IntegerField(default=None, null=True)),
+                ('up_date', models.DateTimeField(default=None, null=True)),
+                ('name', models.CharField(max_length=100)),
+                ('layer_index_url', models.URLField()),
+                ('vcs_url', models.URLField(default=None, null=True)),
+                ('vcs_web_url', models.URLField(default=None, null=True)),
+                ('vcs_web_tree_base_url', models.URLField(default=None, null=True)),
+                ('vcs_web_file_base_url', models.URLField(default=None, null=True)),
+                ('summary', models.TextField(default=None, help_text=b'One-line description of the layer', null=True)),
+                ('description', models.TextField(default=None, null=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Layer_Version',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('up_id', models.IntegerField(default=None, null=True)),
+                ('up_date', models.DateTimeField(default=None, null=True)),
+                ('branch', models.CharField(max_length=80)),
+                ('commit', models.CharField(max_length=100)),
+                ('dirpath', models.CharField(default=None, max_length=255, null=True)),
+                ('priority', models.IntegerField(default=0)),
+                ('local_path', models.FilePathField(default=b'/', max_length=1024)),
+                ('build', models.ForeignKey(related_name='layer_version_build', default=None, to='orm.Build', null=True)),
+                ('layer', models.ForeignKey(related_name='layer_version_layer', to='orm.Layer')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='LayerSource',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(unique=True, max_length=63)),
+                ('sourcetype', models.IntegerField(choices=[(0, b'local'), (1, b'layerindex'), (2, b'imported')])),
+                ('apiurl', models.CharField(default=None, max_length=255, null=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='LayerVersionDependency',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('up_id', models.IntegerField(default=None, null=True)),
+                ('depends_on', models.ForeignKey(related_name='dependees', to='orm.Layer_Version')),
+                ('layer_source', models.ForeignKey(default=None, to='orm.LayerSource', null=True)),
+                ('layer_version', models.ForeignKey(related_name='dependencies', to='orm.Layer_Version')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='LogMessage',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('level', models.IntegerField(default=0, choices=[(0, b'info'), (1, b'warn'), (2, b'error'), (3, b'critical'), (-1, b'toaster exception')])),
+                ('message', models.TextField(null=True, blank=True)),
+                ('pathname', models.FilePathField(max_length=255, blank=True)),
+                ('lineno', models.IntegerField(null=True)),
+                ('build', models.ForeignKey(to='orm.Build')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Machine',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('up_id', models.IntegerField(default=None, null=True)),
+                ('up_date', models.DateTimeField(default=None, null=True)),
+                ('name', models.CharField(max_length=255)),
+                ('description', models.CharField(max_length=255)),
+                ('layer_source', models.ForeignKey(default=None, to='orm.LayerSource', null=True)),
+                ('layer_version', models.ForeignKey(to='orm.Layer_Version')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Package',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=100)),
+                ('installed_name', models.CharField(default=b'', max_length=100)),
+                ('version', models.CharField(max_length=100, blank=True)),
+                ('revision', models.CharField(max_length=32, blank=True)),
+                ('summary', models.TextField(blank=True)),
+                ('description', models.TextField(blank=True)),
+                ('size', models.IntegerField(default=0)),
+                ('installed_size', models.IntegerField(default=0)),
+                ('section', models.CharField(max_length=80, blank=True)),
+                ('license', models.CharField(max_length=80, blank=True)),
+                ('build', models.ForeignKey(to='orm.Build', null=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Package_Dependency',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('dep_type', models.IntegerField(choices=[(0, b'depends'), (1, b'depends'), (3, b'recommends'), (2, b'recommends'), (4, b'suggests'), (5, b'provides'), (6, b'replaces'), (7, b'conflicts')])),
+                ('depends_on', models.ForeignKey(related_name='package_dependencies_target', to='orm.Package')),
+                ('package', models.ForeignKey(related_name='package_dependencies_source', to='orm.Package')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Package_File',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('path', models.FilePathField(max_length=255, blank=True)),
+                ('size', models.IntegerField()),
+                ('package', models.ForeignKey(related_name='buildfilelist_package', to='orm.Package')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Project',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=100)),
+                ('short_description', models.CharField(max_length=50, blank=True)),
+                ('created', models.DateTimeField(auto_now_add=True)),
+                ('updated', models.DateTimeField(auto_now=True)),
+                ('user_id', models.IntegerField(null=True)),
+                ('is_default', models.BooleanField(default=False)),
+                ('bitbake_version', models.ForeignKey(to='orm.BitbakeVersion', null=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='ProjectLayer',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('optional', models.BooleanField(default=True)),
+                ('layercommit', models.ForeignKey(to='orm.Layer_Version', null=True)),
+                ('project', models.ForeignKey(to='orm.Project')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='ProjectTarget',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('target', models.CharField(max_length=100)),
+                ('task', models.CharField(max_length=100, null=True)),
+                ('project', models.ForeignKey(to='orm.Project')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='ProjectVariable',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=100)),
+                ('value', models.TextField(blank=True)),
+                ('project', models.ForeignKey(to='orm.Project')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Recipe',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('up_id', models.IntegerField(default=None, null=True)),
+                ('up_date', models.DateTimeField(default=None, null=True)),
+                ('name', models.CharField(max_length=100, blank=True)),
+                ('version', models.CharField(max_length=100, blank=True)),
+                ('summary', models.TextField(blank=True)),
+                ('description', models.TextField(blank=True)),
+                ('section', models.CharField(max_length=100, blank=True)),
+                ('license', models.CharField(max_length=200, blank=True)),
+                ('homepage', models.URLField(blank=True)),
+                ('bugtracker', models.URLField(blank=True)),
+                ('file_path', models.FilePathField(max_length=255)),
+                ('pathflags', models.CharField(max_length=200, blank=True)),
+                ('is_image', models.BooleanField(default=False)),
+                ('layer_source', models.ForeignKey(default=None, to='orm.LayerSource', null=True)),
+                ('layer_version', models.ForeignKey(related_name='recipe_layer_version', to='orm.Layer_Version')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Recipe_Dependency',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('dep_type', models.IntegerField(choices=[(0, b'depends'), (1, b'rdepends')])),
+                ('depends_on', models.ForeignKey(related_name='r_dependencies_depends', to='orm.Recipe')),
+                ('recipe', models.ForeignKey(related_name='r_dependencies_recipe', to='orm.Recipe')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Release',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(unique=True, max_length=32)),
+                ('description', models.CharField(max_length=255)),
+                ('branch_name', models.CharField(default=b'', max_length=50)),
+                ('helptext', models.TextField(null=True)),
+                ('bitbake_version', models.ForeignKey(to='orm.BitbakeVersion')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='ReleaseDefaultLayer',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('layer_name', models.CharField(default=b'', max_length=100)),
+                ('release', models.ForeignKey(to='orm.Release')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='ReleaseLayerSourcePriority',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('priority', models.IntegerField(default=0)),
+                ('layer_source', models.ForeignKey(to='orm.LayerSource')),
+                ('release', models.ForeignKey(to='orm.Release')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Target',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('target', models.CharField(max_length=100)),
+                ('task', models.CharField(max_length=100, null=True)),
+                ('is_image', models.BooleanField(default=False)),
+                ('image_size', models.IntegerField(default=0)),
+                ('license_manifest_path', models.CharField(max_length=500, null=True)),
+                ('build', models.ForeignKey(to='orm.Build')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Target_File',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('path', models.FilePathField()),
+                ('size', models.IntegerField()),
+                ('inodetype', models.IntegerField(choices=[(1, b'regular'), (2, b'directory'), (3, b'symlink'), (4, b'socket'), (5, b'fifo'), (6, b'character'), (7, b'block')])),
+                ('permission', models.CharField(max_length=16)),
+                ('owner', models.CharField(max_length=128)),
+                ('group', models.CharField(max_length=128)),
+                ('directory', models.ForeignKey(related_name='directory_set', to='orm.Target_File', null=True)),
+                ('sym_target', models.ForeignKey(related_name='symlink_set', to='orm.Target_File', null=True)),
+                ('target', models.ForeignKey(to='orm.Target')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Target_Image_File',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('file_name', models.FilePathField(max_length=254)),
+                ('file_size', models.IntegerField()),
+                ('target', models.ForeignKey(to='orm.Target')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Target_Installed_Package',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('package', models.ForeignKey(related_name='buildtargetlist_package', to='orm.Package')),
+                ('target', models.ForeignKey(to='orm.Target')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Task',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('order', models.IntegerField(null=True)),
+                ('task_executed', models.BooleanField(default=False)),
+                ('outcome', models.IntegerField(default=-1, choices=[(-1, b'Not Available'), (0, b'Succeeded'), (1, b'Covered'), (2, b'Cached'), (3, b'Prebuilt'), (4, b'Failed'), (5, b'Empty')])),
+                ('sstate_checksum', models.CharField(max_length=100, blank=True)),
+                ('path_to_sstate_obj', models.FilePathField(max_length=500, blank=True)),
+                ('task_name', models.CharField(max_length=100)),
+                ('source_url', models.FilePathField(max_length=255, blank=True)),
+                ('work_directory', models.FilePathField(max_length=255, blank=True)),
+                ('script_type', models.IntegerField(default=0, choices=[(0, b'N/A'), (2, b'Python'), (3, b'Shell')])),
+                ('line_number', models.IntegerField(default=0)),
+                ('disk_io', models.IntegerField(null=True)),
+                ('cpu_usage', models.DecimalField(null=True, max_digits=8, decimal_places=2)),
+                ('elapsed_time', models.DecimalField(null=True, max_digits=8, decimal_places=2)),
+                ('sstate_result', models.IntegerField(default=0, choices=[(0, b'Not Applicable'), (1, b'File not in cache'), (2, b'Failed'), (3, b'Succeeded')])),
+                ('message', models.CharField(max_length=240)),
+                ('logfile', models.FilePathField(max_length=255, blank=True)),
+                ('build', models.ForeignKey(related_name='task_build', to='orm.Build')),
+                ('recipe', models.ForeignKey(related_name='tasks', to='orm.Recipe')),
+            ],
+            options={
+                'ordering': ('order', 'recipe'),
+            },
+        ),
+        migrations.CreateModel(
+            name='Task_Dependency',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('depends_on', models.ForeignKey(related_name='task_dependencies_depends', to='orm.Task')),
+                ('task', models.ForeignKey(related_name='task_dependencies_task', to='orm.Task')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='ToasterSetting',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=63)),
+                ('helptext', models.TextField()),
+                ('value', models.CharField(max_length=255)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Variable',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('variable_name', models.CharField(max_length=100)),
+                ('variable_value', models.TextField(blank=True)),
+                ('changed', models.BooleanField(default=False)),
+                ('human_readable_name', models.CharField(max_length=200)),
+                ('description', models.TextField(blank=True)),
+                ('build', models.ForeignKey(related_name='variable_build', to='orm.Build')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='VariableHistory',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('value', models.TextField(blank=True)),
+                ('file_name', models.FilePathField(max_length=255)),
+                ('line_number', models.IntegerField(null=True)),
+                ('operation', models.CharField(max_length=64)),
+                ('variable', models.ForeignKey(related_name='vhistory', to='orm.Variable')),
+            ],
+        ),
+        migrations.AddField(
+            model_name='project',
+            name='release',
+            field=models.ForeignKey(to='orm.Release', null=True),
+        ),
+        migrations.AddField(
+            model_name='package_dependency',
+            name='target',
+            field=models.ForeignKey(to='orm.Target', null=True),
+        ),
+        migrations.AddField(
+            model_name='package',
+            name='recipe',
+            field=models.ForeignKey(to='orm.Recipe', null=True),
+        ),
+        migrations.AddField(
+            model_name='logmessage',
+            name='task',
+            field=models.ForeignKey(blank=True, to='orm.Task', null=True),
+        ),
+        migrations.AlterUniqueTogether(
+            name='layersource',
+            unique_together=set([('sourcetype', 'apiurl')]),
+        ),
+        migrations.AddField(
+            model_name='layer_version',
+            name='layer_source',
+            field=models.ForeignKey(default=None, to='orm.LayerSource', null=True),
+        ),
+        migrations.AddField(
+            model_name='layer_version',
+            name='project',
+            field=models.ForeignKey(default=None, to='orm.Project', null=True),
+        ),
+        migrations.AddField(
+            model_name='layer_version',
+            name='up_branch',
+            field=models.ForeignKey(default=None, to='orm.Branch', null=True),
+        ),
+        migrations.AddField(
+            model_name='layer',
+            name='layer_source',
+            field=models.ForeignKey(default=None, to='orm.LayerSource', null=True),
+        ),
+        migrations.AddField(
+            model_name='build',
+            name='project',
+            field=models.ForeignKey(to='orm.Project'),
+        ),
+        migrations.AddField(
+            model_name='branch',
+            name='layer_source',
+            field=models.ForeignKey(default=True, to='orm.LayerSource', null=True),
+        ),
+        migrations.CreateModel(
+            name='ImportedLayerSource',
+            fields=[
+            ],
+            options={
+                'proxy': True,
+            },
+            bases=('orm.layersource',),
+        ),
+        migrations.CreateModel(
+            name='LayerIndexLayerSource',
+            fields=[
+            ],
+            options={
+                'proxy': True,
+            },
+            bases=('orm.layersource',),
+        ),
+        migrations.CreateModel(
+            name='LocalLayerSource',
+            fields=[
+            ],
+            options={
+                'proxy': True,
+            },
+            bases=('orm.layersource',),
+        ),
+        migrations.AlterUniqueTogether(
+            name='task',
+            unique_together=set([('build', 'recipe', 'task_name')]),
+        ),
+        migrations.AlterUniqueTogether(
+            name='releaselayersourcepriority',
+            unique_together=set([('release', 'layer_source')]),
+        ),
+        migrations.AlterUniqueTogether(
+            name='recipe',
+            unique_together=set([('layer_version', 'file_path', 'pathflags')]),
+        ),
+        migrations.AlterUniqueTogether(
+            name='projectlayer',
+            unique_together=set([('project', 'layercommit')]),
+        ),
+        migrations.AlterUniqueTogether(
+            name='machine',
+            unique_together=set([('layer_source', 'up_id')]),
+        ),
+        migrations.AlterUniqueTogether(
+            name='layerversiondependency',
+            unique_together=set([('layer_source', 'up_id')]),
+        ),
+        migrations.AlterUniqueTogether(
+            name='layer_version',
+            unique_together=set([('layer_source', 'up_id')]),
+        ),
+        migrations.AlterUniqueTogether(
+            name='layer',
+            unique_together=set([('layer_source', 'up_id'), ('layer_source', 'name')]),
+        ),
+        migrations.AlterUniqueTogether(
+            name='branch',
+            unique_together=set([('layer_source', 'up_id'), ('layer_source', 'name')]),
+        ),
+    ]
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0002_auto__add_field_build_timespent.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0002_auto__add_field_build_timespent.py
deleted file mode 100644
index 61421ca..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0002_auto__add_field_build_timespent.py
+++ /dev/null
@@ -1,180 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'Build.timespent'
-        db.add_column(u'orm_build', 'timespent',
-                      self.gf('django.db.models.fields.IntegerField')(default=0),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'Build.timespent'
-        db.delete_column(u'orm_build', 'timespent')
-
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_fstypes': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'licensing_info': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.CharField', [], {'default': '0', 'max_length': '50'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '5'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py
new file mode 100644
index 0000000..9cec82e
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('orm', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='CustomImageRecipe',
+            fields=[
+                ('recipe_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Recipe')),
+                ('last_updated', models.DateTimeField(default=None, null=True)),
+                ('base_recipe', models.ForeignKey(related_name='based_on_recipe', to='orm.Recipe')),
+                ('project', models.ForeignKey(to='orm.Project')),
+            ],
+            bases=('orm.recipe',),
+        ),
+    ]
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py
new file mode 100644
index 0000000..b027f66
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('orm', '0002_customimagerecipe'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='CustomImagePackage',
+            fields=[
+                ('package_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Package')),
+                ('recipe_appends', models.ManyToManyField(related_name='appends_set', to='orm.CustomImageRecipe')),
+                ('recipe_excludes', models.ManyToManyField(related_name='excludes_set', to='orm.CustomImageRecipe')),
+                ('recipe_includes', models.ManyToManyField(related_name='includes_set', to='orm.CustomImageRecipe')),
+            ],
+            bases=('orm.package',),
+        ),
+    ]
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0003_timespent.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0003_timespent.py
deleted file mode 100644
index 9600f9e..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0003_timespent.py
+++ /dev/null
@@ -1,182 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import DataMigration
-from django.db import models
-
-class Migration(DataMigration):
-
-    def forwards(self, orm):
-        "Write your forwards methods here."
-        # Note: Don't use "from appname.models import ModelName".
-        # Use orm.ModelName to refer to models in this application,
-        # and orm['appname.ModelName'] for models in other applications.
-
-        for build in orm.Build.objects.all():
-            build.timespent = int((build.completed_on - build.started_on).total_seconds())
-            build.save()
-
-    def backwards(self, orm):
-        "Write your backwards methods here."
-        raise RuntimeError("Cannot reverse this migration.")
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_fstypes': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'licensing_info': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.CharField', [], {'default': '0', 'max_length': '50'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '5'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
-    symmetrical = True
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0004_auto__add_field_package_installed_name.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0004_auto__add_field_package_installed_name.py
deleted file mode 100644
index 134445b..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0004_auto__add_field_package_installed_name.py
+++ /dev/null
@@ -1,181 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'Package.installed_name'
-        db.add_column(u'orm_package', 'installed_name',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=100),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'Package.installed_name'
-        db.delete_column(u'orm_package', 'installed_name')
-
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_fstypes': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'licensing_info': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.CharField', [], {'default': '0', 'max_length': '50'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '5'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0004_provides.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0004_provides.py
new file mode 100644
index 0000000..dfde2d1
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/orm/migrations/0004_provides.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('orm', '0003_customimagepackage'),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Provides',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
+                ('name', models.CharField(max_length=100)),
+                ('recipe', models.ForeignKey(to='orm.Recipe')),
+            ],
+        ),
+        migrations.AddField(
+            model_name='recipe_dependency',
+            name='via',
+            field=models.ForeignKey(null=True, default=None, to='orm.Provides'),
+        ),
+    ]
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py
deleted file mode 100644
index 7be7ac3..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0005_auto__add_target_image_file__add_target_file__add_field_variablehistor.py
+++ /dev/null
@@ -1,281 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding model 'Target_File'
-        db.create_table(u'orm_target_file', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('target', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Target'])),
-            ('path', self.gf('django.db.models.fields.FilePathField')(max_length=100)),
-            ('size', self.gf('django.db.models.fields.IntegerField')()),
-            ('inodetype', self.gf('django.db.models.fields.IntegerField')()),
-            ('permission', self.gf('django.db.models.fields.IntegerField')()),
-            ('owner', self.gf('django.db.models.fields.CharField')(max_length=128)),
-            ('group', self.gf('django.db.models.fields.CharField')(max_length=128)),
-            ('directory', self.gf('django.db.models.fields.related.ForeignKey')(related_name='directory_set', to=orm['orm.Target_File'])),
-            ('sym_target', self.gf('django.db.models.fields.related.ForeignKey')(related_name='symlink_set', blank=True, to=orm['orm.Target_File'])),
-        ))
-        db.send_create_signal(u'orm', ['Target_File'])
-
-        # Adding model 'Target_Image_File'
-        db.create_table(u'orm_target_image_file', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('target', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Target'])),
-            ('file_name', self.gf('django.db.models.fields.FilePathField')(max_length=100)),
-            ('file_size', self.gf('django.db.models.fields.IntegerField')()),
-        ))
-        db.send_create_signal(u'orm', ['Target_Image_File'])
-
-        # Adding field 'VariableHistory.value'
-        db.add_column(u'orm_variablehistory', 'value',
-                      self.gf('django.db.models.fields.TextField')(default='', blank=True),
-                      keep_default=False)
-
-        # Deleting field 'Recipe.licensing_info'
-        db.delete_column(u'orm_recipe', 'licensing_info')
-
-        # Deleting field 'Target.file_name'
-        db.delete_column(u'orm_target', 'file_name')
-
-        # Deleting field 'Target.file_size'
-        db.delete_column(u'orm_target', 'file_size')
-
-        # Deleting field 'Build.image_fstypes'
-        db.delete_column(u'orm_build', 'image_fstypes')
-
-        # Adding field 'LogMessage.task'
-        db.add_column(u'orm_logmessage', 'task',
-                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Task'], null=True, blank=True),
-                      keep_default=False)
-
-
-        # Changing field 'Task.elapsed_time'
-        db.alter_column(u'orm_task', 'elapsed_time', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=6, decimal_places=2))
-        # Adding unique constraint on 'Task', fields ['build', 'recipe', 'task_name']
-        db.create_unique(u'orm_task', ['build_id', 'recipe_id', 'task_name'])
-
-
-    def backwards(self, orm):
-        # Removing unique constraint on 'Task', fields ['build', 'recipe', 'task_name']
-        db.delete_unique(u'orm_task', ['build_id', 'recipe_id', 'task_name'])
-
-        # Deleting model 'Target_File'
-        db.delete_table(u'orm_target_file')
-
-        # Deleting model 'Target_Image_File'
-        db.delete_table(u'orm_target_image_file')
-
-        # Deleting field 'VariableHistory.value'
-        db.delete_column(u'orm_variablehistory', 'value')
-
-        # Adding field 'Recipe.licensing_info'
-        db.add_column(u'orm_recipe', 'licensing_info',
-                      self.gf('django.db.models.fields.TextField')(default='', blank=True),
-                      keep_default=False)
-
-        # Adding field 'Target.file_name'
-        db.add_column(u'orm_target', 'file_name',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=100),
-                      keep_default=False)
-
-        # Adding field 'Target.file_size'
-        db.add_column(u'orm_target', 'file_size',
-                      self.gf('django.db.models.fields.IntegerField')(default=0),
-                      keep_default=False)
-
-        # Adding field 'Build.image_fstypes'
-        db.add_column(u'orm_build', 'image_fstypes',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=100),
-                      keep_default=False)
-
-        # Deleting field 'LogMessage.task'
-        db.delete_column(u'orm_logmessage', 'task_id')
-
-
-        # Changing field 'Task.elapsed_time'
-        db.alter_column(u'orm_task', 'elapsed_time', self.gf('django.db.models.fields.CharField')(max_length=50))
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.IntegerField', [], {}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'blank': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0005_task_field_separation.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0005_task_field_separation.py
new file mode 100644
index 0000000..fb1196b
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/orm/migrations/0005_task_field_separation.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('orm', '0004_provides'),
+    ]
+
+    operations = [
+        migrations.RemoveField(
+            model_name='task',
+            name='cpu_usage',
+        ),
+        migrations.AddField(
+            model_name='task',
+            name='cpu_time_system',
+            field=models.DecimalField(null=True, max_digits=8, decimal_places=2),
+        ),
+        migrations.AddField(
+            model_name='task',
+            name='cpu_time_user',
+            field=models.DecimalField(null=True, max_digits=8, decimal_places=2),
+        ),
+        migrations.AddField(
+            model_name='task',
+            name='disk_io_read',
+            field=models.IntegerField(null=True),
+        ),
+        migrations.AddField(
+            model_name='task',
+            name='disk_io_write',
+            field=models.IntegerField(null=True),
+        ),
+        migrations.AddField(
+            model_name='task',
+            name='ended',
+            field=models.DateTimeField(null=True),
+        ),
+        migrations.AddField(
+            model_name='task',
+            name='started',
+            field=models.DateTimeField(null=True),
+        ),
+    ]
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0006_add_cancelled_state.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0006_add_cancelled_state.py
new file mode 100644
index 0000000..91a32a9
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/orm/migrations/0006_add_cancelled_state.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('orm', '0005_task_field_separation'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='build',
+            name='outcome',
+            field=models.IntegerField(default=2, choices=[(0, b'Succeeded'), (1, b'Failed'), (2, b'In Progress'), (3, b'Cancelled')]),
+        ),
+    ]
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0006_auto__add_field_target_image_size__add_field_target_license_manifest_p.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0006_auto__add_field_target_image_size__add_field_target_license_manifest_p.py
deleted file mode 100644
index b2be30a..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0006_auto__add_field_target_image_size__add_field_target_license_manifest_p.py
+++ /dev/null
@@ -1,235 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'Target.image_size'
-        db.add_column(u'orm_target', 'image_size',
-                      self.gf('django.db.models.fields.IntegerField')(default=0),
-                      keep_default=False)
-
-        # Adding field 'Target.license_manifest_path'
-        db.add_column(u'orm_target', 'license_manifest_path',
-                      self.gf('django.db.models.fields.CharField')(max_length=500, null=True),
-                      keep_default=False)
-
-
-        # Changing field 'Target_File.permission'
-        db.alter_column(u'orm_target_file', 'permission', self.gf('django.db.models.fields.CharField')(max_length=16))
-
-        # Changing field 'Target_File.sym_target'
-        db.alter_column(u'orm_target_file', 'sym_target_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['orm.Target_File']))
-
-        # Changing field 'Target_File.directory'
-        db.alter_column(u'orm_target_file', 'directory_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['orm.Target_File']))
-
-    def backwards(self, orm):
-        # Deleting field 'Target.image_size'
-        db.delete_column(u'orm_target', 'image_size')
-
-        # Deleting field 'Target.license_manifest_path'
-        db.delete_column(u'orm_target', 'license_manifest_path')
-
-
-        # Changing field 'Target_File.permission'
-        db.alter_column(u'orm_target_file', 'permission', self.gf('django.db.models.fields.IntegerField')())
-
-        # User chose to not deal with backwards NULL issues for 'Target_File.sym_target'
-        raise RuntimeError("Cannot reverse this migration. 'Target_File.sym_target' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration
-        # Changing field 'Target_File.sym_target'
-        db.alter_column(u'orm_target_file', 'sym_target_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Target_File']))
-
-        # User chose to not deal with backwards NULL issues for 'Target_File.directory'
-        raise RuntimeError("Cannot reverse this migration. 'Target_File.directory' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration
-        # Changing field 'Target_File.directory'
-        db.alter_column(u'orm_target_file', 'directory_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Target_File']))
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0007_auto__add_helptext.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0007_auto__add_helptext.py
deleted file mode 100644
index 1e4c536..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0007_auto__add_helptext.py
+++ /dev/null
@@ -1,214 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding model 'HelpText'
-        db.create_table(u'orm_helptext', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('build', self.gf('django.db.models.fields.related.ForeignKey')(related_name='helptext_build', to=orm['orm.Build'])),
-            ('area', self.gf('django.db.models.fields.IntegerField')()),
-            ('key', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('text', self.gf('django.db.models.fields.TextField')()),
-        ))
-        db.send_create_signal(u'orm', ['HelpText'])
-
-
-    def backwards(self, orm):
-        # Deleting model 'HelpText'
-        db.delete_table(u'orm_helptext')
-
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0008_auto__chg_field_variablehistory_operation__chg_field_recipe_descriptio.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0008_auto__chg_field_variablehistory_operation__chg_field_recipe_descriptio.py
deleted file mode 100644
index ece408a..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0008_auto__chg_field_variablehistory_operation__chg_field_recipe_descriptio.py
+++ /dev/null
@@ -1,225 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-
-        # Changing field 'VariableHistory.operation'
-        db.alter_column(u'orm_variablehistory', 'operation', self.gf('django.db.models.fields.CharField')(max_length=64))
-
-        # Changing field 'Recipe.description'
-        db.alter_column(u'orm_recipe', 'description', self.gf('django.db.models.fields.TextField')())
-
-        # Changing field 'Target_Image_File.file_name'
-        db.alter_column(u'orm_target_image_file', 'file_name', self.gf('django.db.models.fields.FilePathField')(max_length=254))
-
-        # Changing field 'Package.description'
-        db.alter_column(u'orm_package', 'description', self.gf('django.db.models.fields.TextField')())
-
-    def backwards(self, orm):
-
-        # Changing field 'VariableHistory.operation'
-        db.alter_column(u'orm_variablehistory', 'operation', self.gf('django.db.models.fields.CharField')(max_length=16))
-
-        # Changing field 'Recipe.description'
-        db.alter_column(u'orm_recipe', 'description', self.gf('django.db.models.fields.CharField')(max_length=100))
-
-        # Changing field 'Target_Image_File.file_name'
-        db.alter_column(u'orm_target_image_file', 'file_name', self.gf('django.db.models.fields.FilePathField')(max_length=100))
-
-        # Changing field 'Package.description'
-        db.alter_column(u'orm_package', 'description', self.gf('django.db.models.fields.CharField')(max_length=200))
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0009_auto__add_projectvariable__add_projectlayer__add_projecttarget__add_pr.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0009_auto__add_projectvariable__add_projectlayer__add_projecttarget__add_pr.py
deleted file mode 100644
index 7a58dc2..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0009_auto__add_projectvariable__add_projectlayer__add_projecttarget__add_pr.py
+++ /dev/null
@@ -1,286 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding model 'ProjectVariable'
-        db.create_table(u'orm_projectvariable', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'])),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('value', self.gf('django.db.models.fields.TextField')(blank=True)),
-        ))
-        db.send_create_signal(u'orm', ['ProjectVariable'])
-
-        # Adding model 'ProjectLayer'
-        db.create_table(u'orm_projectlayer', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'])),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('giturl', self.gf('django.db.models.fields.CharField')(max_length=254)),
-            ('commit', self.gf('django.db.models.fields.CharField')(max_length=254)),
-        ))
-        db.send_create_signal(u'orm', ['ProjectLayer'])
-
-        # Adding model 'ProjectTarget'
-        db.create_table(u'orm_projecttarget', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'])),
-            ('target', self.gf('django.db.models.fields.CharField')(max_length=100)),
-        ))
-        db.send_create_signal(u'orm', ['ProjectTarget'])
-
-        # Adding model 'Project'
-        db.create_table(u'orm_project', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
-            ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
-        ))
-        db.send_create_signal(u'orm', ['Project'])
-
-        # Adding field 'Build.project'
-        db.add_column(u'orm_build', 'project',
-                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'], null=True),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting model 'ProjectVariable'
-        db.delete_table(u'orm_projectvariable')
-
-        # Deleting model 'ProjectLayer'
-        db.delete_table(u'orm_projectlayer')
-
-        # Deleting model 'ProjectTarget'
-        db.delete_table(u'orm_projecttarget')
-
-        # Deleting model 'Project'
-        db.delete_table(u'orm_project')
-
-        # Deleting field 'Build.project'
-        db.delete_column(u'orm_build', 'project_id')
-
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'object_name': 'ProjectLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0010_auto__add_field_project_branch__add_field_project_short_description__a.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0010_auto__add_field_project_branch__add_field_project_short_description__a.py
deleted file mode 100644
index aa1ce1f..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0010_auto__add_field_project_branch__add_field_project_short_description__a.py
+++ /dev/null
@@ -1,257 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'Project.branch'
-        db.add_column(u'orm_project', 'branch',
-                      self.gf('django.db.models.fields.CharField')(default='master', max_length=50),
-                      keep_default=False)
-
-        # Adding field 'Project.short_description'
-        db.add_column(u'orm_project', 'short_description',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=50, blank=True),
-                      keep_default=False)
-
-        # Adding field 'Project.user_id'
-        db.add_column(u'orm_project', 'user_id',
-                      self.gf('django.db.models.fields.IntegerField')(null=True),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'Project.branch'
-        db.delete_column(u'orm_project', 'branch')
-
-        # Deleting field 'Project.short_description'
-        db.delete_column(u'orm_project', 'short_description')
-
-        # Deleting field 'Project.user_id'
-        db.delete_column(u'orm_project', 'user_id')
-
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'object_name': 'ProjectLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0011_auto__add_field_projectlayer_dirpath.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0011_auto__add_field_projectlayer_dirpath.py
deleted file mode 100644
index 8a65221..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0011_auto__add_field_projectlayer_dirpath.py
+++ /dev/null
@@ -1,242 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'ProjectLayer.dirpath'
-        db.add_column(u'orm_projectlayer', 'dirpath',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=254),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'ProjectLayer.dirpath'
-        db.delete_column(u'orm_projectlayer', 'dirpath')
-
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'object_name': 'ProjectLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0012_auto__add_field_projectlayer_optional__add_field_projecttarget_task.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0012_auto__add_field_projectlayer_optional__add_field_projecttarget_task.py
deleted file mode 100644
index 9e483f5..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0012_auto__add_field_projectlayer_optional__add_field_projecttarget_task.py
+++ /dev/null
@@ -1,252 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'ProjectLayer.optional'
-        db.add_column(u'orm_projectlayer', 'optional',
-                      self.gf('django.db.models.fields.BooleanField')(default=True),
-                      keep_default=False)
-
-        # Adding field 'ProjectTarget.task'
-        db.add_column(u'orm_projecttarget', 'task',
-                      self.gf('django.db.models.fields.CharField')(max_length=100, null=True),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'ProjectLayer.optional'
-        db.delete_column(u'orm_projectlayer', 'optional')
-
-        # Deleting field 'ProjectTarget.task'
-        db.delete_column(u'orm_projecttarget', 'task')
-
-
-    models = {
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'object_name': 'Layer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_build'", 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'object_name': 'ProjectLayer'},
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            'giturl': ('django.db.models.fields.CharField', [], {'max_length': '254'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0013_auto__add_release__add_layerversiondependency__add_unique_layerversion.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0013_auto__add_release__add_layerversiondependency__add_unique_layerversion.py
deleted file mode 100644
index 7c954e6..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0013_auto__add_release__add_layerversiondependency__add_unique_layerversion.py
+++ /dev/null
@@ -1,710 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding model 'Release'
-        db.create_table(u'orm_release', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=32)),
-            ('description', self.gf('django.db.models.fields.CharField')(max_length=255)),
-            ('bitbake_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.BitbakeVersion'])),
-            ('branch', self.gf('django.db.models.fields.CharField')(max_length=32)),
-        ))
-        db.send_create_signal(u'orm', ['Release'])
-
-        # Adding model 'LayerVersionDependency'
-        db.create_table(u'orm_layerversiondependency', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('layer_source', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.LayerSource'], null=True)),
-            ('up_id', self.gf('django.db.models.fields.IntegerField')(default=None, null=True)),
-            ('layer_version', self.gf('django.db.models.fields.related.ForeignKey')(related_name='dependencies', to=orm['orm.Layer_Version'])),
-            ('depends_on', self.gf('django.db.models.fields.related.ForeignKey')(related_name='dependees', to=orm['orm.Layer_Version'])),
-        ))
-        db.send_create_signal(u'orm', ['LayerVersionDependency'])
-
-        # Adding unique constraint on 'LayerVersionDependency', fields ['layer_source', 'up_id']
-        db.create_unique(u'orm_layerversiondependency', ['layer_source_id', 'up_id'])
-
-        # Adding model 'ToasterSetting'
-        db.create_table(u'orm_toastersetting', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=63)),
-            ('helptext', self.gf('django.db.models.fields.TextField')()),
-            ('value', self.gf('django.db.models.fields.CharField')(max_length=255)),
-        ))
-        db.send_create_signal(u'orm', ['ToasterSetting'])
-
-        # Adding model 'Machine'
-        db.create_table(u'orm_machine', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('layer_source', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.LayerSource'], null=True)),
-            ('up_id', self.gf('django.db.models.fields.IntegerField')(default=None, null=True)),
-            ('up_date', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True)),
-            ('layer_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer_Version'])),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
-            ('description', self.gf('django.db.models.fields.CharField')(max_length=255)),
-        ))
-        db.send_create_signal(u'orm', ['Machine'])
-
-        # Adding unique constraint on 'Machine', fields ['layer_source', 'up_id']
-        db.create_unique(u'orm_machine', ['layer_source_id', 'up_id'])
-
-        # Adding model 'ReleaseDefaultLayer'
-        db.create_table(u'orm_releasedefaultlayer', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('release', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Release'])),
-            ('layer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer'])),
-        ))
-        db.send_create_signal(u'orm', ['ReleaseDefaultLayer'])
-
-        # Adding model 'BitbakeVersion'
-        db.create_table(u'orm_bitbakeversion', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=32)),
-            ('giturl', self.gf('django.db.models.fields.URLField')(max_length=200)),
-            ('branch', self.gf('django.db.models.fields.CharField')(max_length=32)),
-            ('dirpath', self.gf('django.db.models.fields.CharField')(max_length=255)),
-        ))
-        db.send_create_signal(u'orm', ['BitbakeVersion'])
-
-        # Adding model 'Branch'
-        db.create_table(u'orm_branch', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('layer_source', self.gf('django.db.models.fields.related.ForeignKey')(default=True, to=orm['orm.LayerSource'], null=True)),
-            ('up_id', self.gf('django.db.models.fields.IntegerField')(default=None, null=True)),
-            ('up_date', self.gf('django.db.models.fields.DateTimeField')(default=None, null=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=50)),
-            ('bitbake_branch', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)),
-            ('short_description', self.gf('django.db.models.fields.CharField')(max_length=50, blank=True)),
-        ))
-        db.send_create_signal(u'orm', ['Branch'])
-
-        # Adding unique constraint on 'Branch', fields ['layer_source', 'name']
-        db.create_unique(u'orm_branch', ['layer_source_id', 'name'])
-
-        # Adding unique constraint on 'Branch', fields ['layer_source', 'up_id']
-        db.create_unique(u'orm_branch', ['layer_source_id', 'up_id'])
-
-        # Adding model 'ToasterSettingDefaultLayer'
-        db.create_table(u'orm_toastersettingdefaultlayer', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('layer_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer_Version'])),
-        ))
-        db.send_create_signal(u'orm', ['ToasterSettingDefaultLayer'])
-
-        # Adding model 'LayerSource'
-        db.create_table(u'orm_layersource', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=63)),
-            ('sourcetype', self.gf('django.db.models.fields.IntegerField')()),
-            ('apiurl', self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True)),
-        ))
-        db.send_create_signal(u'orm', ['LayerSource'])
-
-        # Adding unique constraint on 'LayerSource', fields ['sourcetype', 'apiurl']
-        db.create_unique(u'orm_layersource', ['sourcetype', 'apiurl'])
-
-        # Deleting field 'ProjectLayer.name'
-        db.delete_column(u'orm_projectlayer', 'name')
-
-        # Deleting field 'ProjectLayer.dirpath'
-        db.delete_column(u'orm_projectlayer', 'dirpath')
-
-        # Deleting field 'ProjectLayer.commit'
-        db.delete_column(u'orm_projectlayer', 'commit')
-
-        # Deleting field 'ProjectLayer.giturl'
-        db.delete_column(u'orm_projectlayer', 'giturl')
-
-        # Adding field 'ProjectLayer.layercommit'
-        db.add_column(u'orm_projectlayer', 'layercommit',
-                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer_Version'], null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer_Version.layer_source'
-        db.add_column(u'orm_layer_version', 'layer_source',
-                      self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.LayerSource'], null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer_Version.up_id'
-        db.add_column(u'orm_layer_version', 'up_id',
-                      self.gf('django.db.models.fields.IntegerField')(default=None, null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer_Version.up_date'
-        db.add_column(u'orm_layer_version', 'up_date',
-                      self.gf('django.db.models.fields.DateTimeField')(default=None, null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer_Version.up_branch'
-        db.add_column(u'orm_layer_version', 'up_branch',
-                      self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.Branch'], null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer_Version.dirpath'
-        db.add_column(u'orm_layer_version', 'dirpath',
-                      self.gf('django.db.models.fields.CharField')(default=None, max_length=255, null=True),
-                      keep_default=False)
-
-
-        # Changing field 'Layer_Version.build'
-        db.alter_column(u'orm_layer_version', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['orm.Build']))
-
-        # Changing field 'Layer_Version.branch'
-        db.alter_column(u'orm_layer_version', 'branch', self.gf('django.db.models.fields.CharField')(max_length=80))
-        # Adding unique constraint on 'Layer_Version', fields ['layer_source', 'up_id']
-        db.create_unique(u'orm_layer_version', ['layer_source_id', 'up_id'])
-
-        # Adding field 'Recipe.layer_source'
-        db.add_column(u'orm_recipe', 'layer_source',
-                      self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.LayerSource'], null=True),
-                      keep_default=False)
-
-        # Adding field 'Recipe.up_id'
-        db.add_column(u'orm_recipe', 'up_id',
-                      self.gf('django.db.models.fields.IntegerField')(default=None, null=True),
-                      keep_default=False)
-
-        # Adding field 'Recipe.up_date'
-        db.add_column(u'orm_recipe', 'up_date',
-                      self.gf('django.db.models.fields.DateTimeField')(default=None, null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer.layer_source'
-        db.add_column(u'orm_layer', 'layer_source',
-                      self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.LayerSource'], null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer.up_id'
-        db.add_column(u'orm_layer', 'up_id',
-                      self.gf('django.db.models.fields.IntegerField')(default=None, null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer.up_date'
-        db.add_column(u'orm_layer', 'up_date',
-                      self.gf('django.db.models.fields.DateTimeField')(default=None, null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer.vcs_url'
-        db.add_column(u'orm_layer', 'vcs_url',
-                      self.gf('django.db.models.fields.URLField')(default=None, max_length=200, null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer.vcs_web_file_base_url'
-        db.add_column(u'orm_layer', 'vcs_web_file_base_url',
-                      self.gf('django.db.models.fields.URLField')(default=None, max_length=200, null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer.summary'
-        db.add_column(u'orm_layer', 'summary',
-                      self.gf('django.db.models.fields.CharField')(default=None, max_length=200, null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer.description'
-        db.add_column(u'orm_layer', 'description',
-                      self.gf('django.db.models.fields.TextField')(default=None, null=True),
-                      keep_default=False)
-
-
-        # Changing field 'Layer.local_path'
-        db.alter_column(u'orm_layer', 'local_path', self.gf('django.db.models.fields.FilePathField')(max_length=255, null=True))
-        # Adding unique constraint on 'Layer', fields ['layer_source', 'up_id']
-        db.create_unique(u'orm_layer', ['layer_source_id', 'up_id'])
-
-        # Adding unique constraint on 'Layer', fields ['layer_source', 'name']
-        db.create_unique(u'orm_layer', ['layer_source_id', 'name'])
-
-        # Deleting field 'Project.branch'
-        db.delete_column(u'orm_project', 'branch')
-
-        # Adding field 'Project.bitbake_version'
-        db.add_column(u'orm_project', 'bitbake_version',
-                      self.gf('django.db.models.fields.related.ForeignKey')(default=-1, to=orm['orm.BitbakeVersion']),
-                      keep_default=False)
-
-        # Adding field 'Project.release'
-        db.add_column(u'orm_project', 'release',
-                      self.gf('django.db.models.fields.related.ForeignKey')(default=-1, to=orm['orm.Release']),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Removing unique constraint on 'Layer', fields ['layer_source', 'name']
-        db.delete_unique(u'orm_layer', ['layer_source_id', 'name'])
-
-        # Removing unique constraint on 'Layer', fields ['layer_source', 'up_id']
-        db.delete_unique(u'orm_layer', ['layer_source_id', 'up_id'])
-
-        # Removing unique constraint on 'Layer_Version', fields ['layer_source', 'up_id']
-        db.delete_unique(u'orm_layer_version', ['layer_source_id', 'up_id'])
-
-        # Removing unique constraint on 'LayerSource', fields ['sourcetype', 'apiurl']
-        db.delete_unique(u'orm_layersource', ['sourcetype', 'apiurl'])
-
-        # Removing unique constraint on 'Branch', fields ['layer_source', 'up_id']
-        db.delete_unique(u'orm_branch', ['layer_source_id', 'up_id'])
-
-        # Removing unique constraint on 'Branch', fields ['layer_source', 'name']
-        db.delete_unique(u'orm_branch', ['layer_source_id', 'name'])
-
-        # Removing unique constraint on 'Machine', fields ['layer_source', 'up_id']
-        db.delete_unique(u'orm_machine', ['layer_source_id', 'up_id'])
-
-        # Removing unique constraint on 'LayerVersionDependency', fields ['layer_source', 'up_id']
-        db.delete_unique(u'orm_layerversiondependency', ['layer_source_id', 'up_id'])
-
-        # Deleting model 'Release'
-        db.delete_table(u'orm_release')
-
-        # Deleting model 'LayerVersionDependency'
-        db.delete_table(u'orm_layerversiondependency')
-
-        # Deleting model 'ToasterSetting'
-        db.delete_table(u'orm_toastersetting')
-
-        # Deleting model 'Machine'
-        db.delete_table(u'orm_machine')
-
-        # Deleting model 'ReleaseDefaultLayer'
-        db.delete_table(u'orm_releasedefaultlayer')
-
-        # Deleting model 'BitbakeVersion'
-        db.delete_table(u'orm_bitbakeversion')
-
-        # Deleting model 'Branch'
-        db.delete_table(u'orm_branch')
-
-        # Deleting model 'ToasterSettingDefaultLayer'
-        db.delete_table(u'orm_toastersettingdefaultlayer')
-
-        # Deleting model 'LayerSource'
-        db.delete_table(u'orm_layersource')
-
-
-        # User chose to not deal with backwards NULL issues for 'ProjectLayer.name'
-        raise RuntimeError("Cannot reverse this migration. 'ProjectLayer.name' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration        # Adding field 'ProjectLayer.name'
-        db.add_column(u'orm_projectlayer', 'name',
-                      self.gf('django.db.models.fields.CharField')(max_length=100),
-                      keep_default=False)
-
-
-        # User chose to not deal with backwards NULL issues for 'ProjectLayer.dirpath'
-        raise RuntimeError("Cannot reverse this migration. 'ProjectLayer.dirpath' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration        # Adding field 'ProjectLayer.dirpath'
-        db.add_column(u'orm_projectlayer', 'dirpath',
-                      self.gf('django.db.models.fields.CharField')(max_length=254),
-                      keep_default=False)
-
-
-        # User chose to not deal with backwards NULL issues for 'ProjectLayer.commit'
-        raise RuntimeError("Cannot reverse this migration. 'ProjectLayer.commit' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration        # Adding field 'ProjectLayer.commit'
-        db.add_column(u'orm_projectlayer', 'commit',
-                      self.gf('django.db.models.fields.CharField')(max_length=254),
-                      keep_default=False)
-
-
-        # User chose to not deal with backwards NULL issues for 'ProjectLayer.giturl'
-        raise RuntimeError("Cannot reverse this migration. 'ProjectLayer.giturl' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration        # Adding field 'ProjectLayer.giturl'
-        db.add_column(u'orm_projectlayer', 'giturl',
-                      self.gf('django.db.models.fields.CharField')(max_length=254),
-                      keep_default=False)
-
-        # Deleting field 'ProjectLayer.layercommit'
-        db.delete_column(u'orm_projectlayer', 'layercommit_id')
-
-        # Deleting field 'Layer_Version.layer_source'
-        db.delete_column(u'orm_layer_version', 'layer_source_id')
-
-        # Deleting field 'Layer_Version.up_id'
-        db.delete_column(u'orm_layer_version', 'up_id')
-
-        # Deleting field 'Layer_Version.up_date'
-        db.delete_column(u'orm_layer_version', 'up_date')
-
-        # Deleting field 'Layer_Version.up_branch'
-        db.delete_column(u'orm_layer_version', 'up_branch_id')
-
-        # Deleting field 'Layer_Version.dirpath'
-        db.delete_column(u'orm_layer_version', 'dirpath')
-
-
-        # User chose to not deal with backwards NULL issues for 'Layer_Version.build'
-        raise RuntimeError("Cannot reverse this migration. 'Layer_Version.build' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration
-        # Changing field 'Layer_Version.build'
-        db.alter_column(u'orm_layer_version', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build']))
-
-        # Changing field 'Layer_Version.branch'
-        db.alter_column(u'orm_layer_version', 'branch', self.gf('django.db.models.fields.CharField')(max_length=50))
-        # Deleting field 'Recipe.layer_source'
-        db.delete_column(u'orm_recipe', 'layer_source_id')
-
-        # Deleting field 'Recipe.up_id'
-        db.delete_column(u'orm_recipe', 'up_id')
-
-        # Deleting field 'Recipe.up_date'
-        db.delete_column(u'orm_recipe', 'up_date')
-
-        # Deleting field 'Layer.layer_source'
-        db.delete_column(u'orm_layer', 'layer_source_id')
-
-        # Deleting field 'Layer.up_id'
-        db.delete_column(u'orm_layer', 'up_id')
-
-        # Deleting field 'Layer.up_date'
-        db.delete_column(u'orm_layer', 'up_date')
-
-        # Deleting field 'Layer.vcs_url'
-        db.delete_column(u'orm_layer', 'vcs_url')
-
-        # Deleting field 'Layer.vcs_web_file_base_url'
-        db.delete_column(u'orm_layer', 'vcs_web_file_base_url')
-
-        # Deleting field 'Layer.summary'
-        db.delete_column(u'orm_layer', 'summary')
-
-        # Deleting field 'Layer.description'
-        db.delete_column(u'orm_layer', 'description')
-
-
-        # User chose to not deal with backwards NULL issues for 'Layer.local_path'
-        raise RuntimeError("Cannot reverse this migration. 'Layer.local_path' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration
-        # Changing field 'Layer.local_path'
-        db.alter_column(u'orm_layer', 'local_path', self.gf('django.db.models.fields.FilePathField')(max_length=255))
-
-        # User chose to not deal with backwards NULL issues for 'Project.branch'
-        raise RuntimeError("Cannot reverse this migration. 'Project.branch' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration        # Adding field 'Project.branch'
-        db.add_column(u'orm_project', 'branch',
-                      self.gf('django.db.models.fields.CharField')(max_length=50),
-                      keep_default=False)
-
-        # Deleting field 'Project.bitbake_version'
-        db.delete_column(u'orm_project', 'bitbake_version_id')
-
-        # Deleting field 'Project.release'
-        db.delete_column(u'orm_project', 'release_id')
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            'bitbake_branch': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer']"}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.toastersettingdefaultlayer': {
-            'Meta': {'object_name': 'ToasterSettingDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_field_re.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_field_re.py
deleted file mode 100644
index 7945f15..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0014_auto__chg_field_package_summary__chg_field_layer_summary__chg_field_re.py
+++ /dev/null
@@ -1,336 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-
-        # Changing field 'Package.summary'
-        db.alter_column(u'orm_package', 'summary', self.gf('django.db.models.fields.TextField')())
-
-        # Changing field 'Layer.summary'
-        db.alter_column(u'orm_layer', 'summary', self.gf('django.db.models.fields.TextField')(null=True))
-
-        # Changing field 'Recipe.summary'
-        db.alter_column(u'orm_recipe', 'summary', self.gf('django.db.models.fields.TextField')())
-
-    def backwards(self, orm):
-
-        # Changing field 'Package.summary'
-        db.alter_column(u'orm_package', 'summary', self.gf('django.db.models.fields.CharField')(max_length=200))
-
-        # Changing field 'Layer.summary'
-        db.alter_column(u'orm_layer', 'summary', self.gf('django.db.models.fields.CharField')(max_length=200, null=True))
-
-        # Changing field 'Recipe.summary'
-        db.alter_column(u'orm_recipe', 'summary', self.gf('django.db.models.fields.CharField')(max_length=100))
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            'bitbake_branch': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer']"}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.toastersettingdefaultlayer': {
-            'Meta': {'object_name': 'ToasterSettingDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0015_auto__add_field_layer_vcs_web_url__add_field_layer_vcs_web_tree_base_u.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0015_auto__add_field_layer_vcs_web_url__add_field_layer_vcs_web_tree_base_u.py
deleted file mode 100644
index 6e664c9..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0015_auto__add_field_layer_vcs_web_url__add_field_layer_vcs_web_tree_base_u.py
+++ /dev/null
@@ -1,336 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'Layer.vcs_web_url'
-        db.add_column(u'orm_layer', 'vcs_web_url',
-                      self.gf('django.db.models.fields.URLField')(default=None, max_length=200, null=True),
-                      keep_default=False)
-
-        # Adding field 'Layer.vcs_web_tree_base_url'
-        db.add_column(u'orm_layer', 'vcs_web_tree_base_url',
-                      self.gf('django.db.models.fields.URLField')(default=None, max_length=200, null=True),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'Layer.vcs_web_url'
-        db.delete_column(u'orm_layer', 'vcs_web_url')
-
-        # Deleting field 'Layer.vcs_web_tree_base_url'
-        db.delete_column(u'orm_layer', 'vcs_web_tree_base_url')
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            'bitbake_branch': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer']"}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.toastersettingdefaultlayer': {
-            'Meta': {'object_name': 'ToasterSettingDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0016_auto__add_field_release_helptext__chg_field_release_branch__add_index_.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0016_auto__add_field_release_helptext__chg_field_release_branch__add_index_.py
deleted file mode 100644
index 545c0ba..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0016_auto__add_field_release_helptext__chg_field_release_branch__add_index_.py
+++ /dev/null
@@ -1,359 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'Release.helptext'
-        db.add_column(u'orm_release', 'helptext',
-                      self.gf('django.db.models.fields.TextField')(null=True),
-                      keep_default=False)
-
-
-        # Renaming column for 'Release.branch' to match new field type.
-        db.delete_column(u'orm_release', 'branch')
-
-        # Changing field 'Release.branch'
-        db.add_column(u'orm_release', 'branch', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Branch'], default=-1))
-
-        # Deleting field 'Branch.bitbake_branch'
-        db.delete_column(u'orm_branch', 'bitbake_branch')
-
-        # Adding unique constraint on 'Recipe', fields ['layer_version', 'file_path']
-        db.create_unique(u'orm_recipe', ['layer_version_id', 'file_path'])
-
-        # Adding unique constraint on 'ProjectLayer', fields ['project', 'layercommit']
-        db.create_unique(u'orm_projectlayer', ['project_id', 'layercommit_id'])
-
-
-    def backwards(self, orm):
-        # Removing unique constraint on 'ProjectLayer', fields ['project', 'layercommit']
-        db.delete_unique(u'orm_projectlayer', ['project_id', 'layercommit_id'])
-
-        # Removing unique constraint on 'Recipe', fields ['layer_version', 'file_path']
-        db.delete_unique(u'orm_recipe', ['layer_version_id', 'file_path'])
-
-        # Deleting field 'Release.helptext'
-        db.delete_column(u'orm_release', 'helptext')
-
-        # Renaming column for 'Release.branch' to match new field type.
-        db.rename_column(u'orm_release', 'branch_id', 'branch')
-        # Changing field 'Release.branch'
-        db.alter_column(u'orm_release', 'branch', self.gf('django.db.models.fields.CharField')(max_length=32))
-        # Adding field 'Branch.bitbake_branch'
-        db.add_column(u'orm_branch', 'bitbake_branch',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=50, blank=True),
-                      keep_default=False)
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Branch']"}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer']"}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.toastersettingdefaultlayer': {
-            'Meta': {'object_name': 'ToasterSettingDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0017_auto__del_toastersettingdefaultlayer__add_releaselayersourcepriority__.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0017_auto__del_toastersettingdefaultlayer__add_releaselayersourcepriority__.py
deleted file mode 100644
index 6685b55..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0017_auto__del_toastersettingdefaultlayer__add_releaselayersourcepriority__.py
+++ /dev/null
@@ -1,396 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Deleting model 'ToasterSettingDefaultLayer'
-        db.delete_table(u'orm_toastersettingdefaultlayer')
-
-        # Adding model 'ReleaseLayerSourcePriority'
-        db.create_table(u'orm_releaselayersourcepriority', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('release', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Release'])),
-            ('layer_source', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.LayerSource'])),
-            ('priority', self.gf('django.db.models.fields.IntegerField')(default=0)),
-        ))
-        db.send_create_signal(u'orm', ['ReleaseLayerSourcePriority'])
-
-        # Adding unique constraint on 'ReleaseLayerSourcePriority', fields ['release', 'layer_source']
-        db.create_unique(u'orm_releaselayersourcepriority', ['release_id', 'layer_source_id'])
-
-        # Deleting field 'Release.branch'
-        db.delete_column(u'orm_release', 'branch_id')
-
-        # Adding field 'Release.branch_name'
-        db.add_column(u'orm_release', 'branch_name',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=50),
-                      keep_default=False)
-
-        # Adding unique constraint on 'LayerSource', fields ['name']
-        db.create_unique(u'orm_layersource', ['name'])
-
-        # Deleting field 'ReleaseDefaultLayer.layer'
-        db.delete_column(u'orm_releasedefaultlayer', 'layer_id')
-
-        # Adding field 'ReleaseDefaultLayer.layer_name'
-        db.add_column(u'orm_releasedefaultlayer', 'layer_name',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=100),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Removing unique constraint on 'LayerSource', fields ['name']
-        db.delete_unique(u'orm_layersource', ['name'])
-
-        # Removing unique constraint on 'ReleaseLayerSourcePriority', fields ['release', 'layer_source']
-        db.delete_unique(u'orm_releaselayersourcepriority', ['release_id', 'layer_source_id'])
-
-        # Adding model 'ToasterSettingDefaultLayer'
-        db.create_table(u'orm_toastersettingdefaultlayer', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('layer_version', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer_Version'])),
-        ))
-        db.send_create_signal(u'orm', ['ToasterSettingDefaultLayer'])
-
-        # Deleting model 'ReleaseLayerSourcePriority'
-        db.delete_table(u'orm_releaselayersourcepriority')
-
-
-        # User chose to not deal with backwards NULL issues for 'Release.branch'
-        raise RuntimeError("Cannot reverse this migration. 'Release.branch' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration        # Adding field 'Release.branch'
-        db.add_column(u'orm_release', 'branch',
-                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Branch']),
-                      keep_default=False)
-
-        # Deleting field 'Release.branch_name'
-        db.delete_column(u'orm_release', 'branch_name')
-
-
-        # User chose to not deal with backwards NULL issues for 'ReleaseDefaultLayer.layer'
-        raise RuntimeError("Cannot reverse this migration. 'ReleaseDefaultLayer.layer' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration        # Adding field 'ReleaseDefaultLayer.layer'
-        db.add_column(u'orm_releasedefaultlayer', 'layer',
-                      self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Layer']),
-                      keep_default=False)
-
-        # Deleting field 'ReleaseDefaultLayer.layer_name'
-        db.delete_column(u'orm_releasedefaultlayer', 'layer_name')
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0018_auto__add_field_layer_version_project.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0018_auto__add_field_layer_version_project.py
deleted file mode 100644
index 7284bb8..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0018_auto__add_field_layer_version_project.py
+++ /dev/null
@@ -1,331 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'Layer_Version.project'
-        db.add_column(u'orm_layer_version', 'project',
-                      self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.Project'], null=True),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'Layer_Version.project'
-        db.delete_column(u'orm_layer_version', 'project_id')
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0019_auto__add_buildartifact.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0019_auto__add_buildartifact.py
deleted file mode 100644
index 0dce9ea..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0019_auto__add_buildartifact.py
+++ /dev/null
@@ -1,342 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding model 'BuildArtifact'
-        db.create_table(u'orm_buildartifact', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('build', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'])),
-            ('file_name', self.gf('django.db.models.fields.FilePathField')(max_length=100)),
-            ('file_size', self.gf('django.db.models.fields.IntegerField')()),
-        ))
-        db.send_create_signal(u'orm', ['BuildArtifact'])
-
-
-    def backwards(self, orm):
-        # Deleting model 'BuildArtifact'
-        db.delete_table(u'orm_buildartifact')
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']", 'null': 'True'}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.buildartifact': {
-            'Meta': {'object_name': 'BuildArtifact'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '6', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'build_recipe'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0020_auto__add_field_layer_version_local_path__add_field_recipe_pathflags__.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0020_auto__add_field_layer_version_local_path__add_field_recipe_pathflags__.py
deleted file mode 100644
index 0ec5795..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0020_auto__add_field_layer_version_local_path__add_field_recipe_pathflags__.py
+++ /dev/null
@@ -1,361 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Removing unique constraint on 'Recipe', fields ['layer_version', 'file_path']
-        db.delete_unique(u'orm_recipe', ['layer_version_id', 'file_path'])
-
-        # Adding field 'Layer_Version.local_path'
-        db.add_column(u'orm_layer_version', 'local_path',
-                      self.gf('django.db.models.fields.FilePathField')(default="/", max_length=1024),
-                      keep_default=False)
-
-        # Adding field 'Recipe.pathflags'
-        db.add_column(u'orm_recipe', 'pathflags',
-                      self.gf('django.db.models.fields.CharField')(default='', max_length=200, blank=True),
-                      keep_default=False)
-
-        # Adding unique constraint on 'Recipe', fields ['layer_version', 'file_path', 'pathflags']
-        db.create_unique(u'orm_recipe', ['layer_version_id', 'file_path', 'pathflags'])
-
-        # Migrate data from Layer.local_path to Layer_Version.local_path
-        if not db.dry_run:
-            for lv in orm.Layer_Version.objects.all():
-                if lv.layer.local_path is not None:
-                    lv.local_path = lv.layer.local_path
-                else:
-                    lv.local_path = "/"
-                lv.save()
-
-        db.delete_column(u'orm_layer', 'local_path')
-
-
-    def backwards(self, orm):
-        raise RuntimeError("Cannot reverse this migration")
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.buildartifact': {
-            'Meta': {'object_name': 'BuildArtifact'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path', 'pathflags'), ('file_path', 'pathflags'))", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'pathflags': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tasks'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0021_auto__chg_field_build_project__chg_field_project_bitbake_version__chg_.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0021_auto__chg_field_build_project__chg_field_project_bitbake_version__chg_.py
deleted file mode 100644
index a62ddb7..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0021_auto__chg_field_build_project__chg_field_project_bitbake_version__chg_.py
+++ /dev/null
@@ -1,371 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    no_dry_run = True
-
-    def forwards(self, orm):
-
-        # Changing field 'Build.project'
-        db.alter_column(u'orm_build', 'project_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project']))
-
-        # Changing field 'Project.bitbake_version'
-        db.alter_column(u'orm_project', 'bitbake_version_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.BitbakeVersion'], null=True))
-
-        # Changing field 'Project.release'
-        db.alter_column(u'orm_project', 'release_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Release'], null=True))
-
-        # Changing field 'Task.cpu_usage'
-        db.alter_column(u'orm_task', 'cpu_usage', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=8, decimal_places=2))
-
-        # Changing field 'Task.elapsed_time'
-        db.alter_column(u'orm_task', 'elapsed_time', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=8, decimal_places=2))
-
-    def backwards(self, orm):
-
-        # Changing field 'Build.project'
-        db.alter_column(u'orm_build', 'project_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'], null=True))
-
-        # User chose to not deal with backwards NULL issues for 'Project.bitbake_version'
-        raise RuntimeError("Cannot reverse this migration. 'Project.bitbake_version' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration
-        # Changing field 'Project.bitbake_version'
-        db.alter_column(u'orm_project', 'bitbake_version_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.BitbakeVersion']))
-
-        # User chose to not deal with backwards NULL issues for 'Project.release'
-        raise RuntimeError("Cannot reverse this migration. 'Project.release' and its values cannot be restored.")
-        
-        # The following code is provided here to aid in writing a correct migration
-        # Changing field 'Project.release'
-        db.alter_column(u'orm_project', 'release_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Release']))
-
-        # Changing field 'Task.cpu_usage'
-        db.alter_column(u'orm_task', 'cpu_usage', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=6, decimal_places=2))
-
-        # Changing field 'Task.elapsed_time'
-        db.alter_column(u'orm_task', 'elapsed_time', self.gf('django.db.models.fields.DecimalField')(null=True, max_digits=6, decimal_places=2))
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.buildartifact': {
-            'Meta': {'object_name': 'BuildArtifact'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': "'/'", 'max_length': '1024'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path', 'pathflags'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'pathflags': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tasks'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0022_auto__add_field_target_task__add_field_layer_version_local_path__del_f.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0022_auto__add_field_target_task__add_field_layer_version_local_path__del_f.py
deleted file mode 100644
index 3dec391..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0022_auto__add_field_target_task__add_field_layer_version_local_path__del_f.py
+++ /dev/null
@@ -1,343 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'Target.task'
-        db.add_column(u'orm_target', 'task',
-                      self.gf('django.db.models.fields.CharField')(max_length=100, null=True),
-                      keep_default=False)
-
-
-
-
-
-    def backwards(self, orm):
-        # Deleting field 'Target.task'
-        db.delete_column(u'orm_target', 'task')
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'errors_no': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'timespent': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'warnings_no': ('django.db.models.fields.IntegerField', [], {'default': '0'})
-        },
-        u'orm.buildartifact': {
-            'Meta': {'object_name': 'BuildArtifact'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': "'/'", 'max_length': '1024'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path', 'pathflags'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'pathflags': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tasks'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0023_auto__del_field_build_warnings_no__del_field_build_errors_no__del_fiel.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0023_auto__del_field_build_warnings_no__del_field_build_errors_no__del_fiel.py
deleted file mode 100644
index b5b200c..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0023_auto__del_field_build_warnings_no__del_field_build_errors_no__del_fiel.py
+++ /dev/null
@@ -1,353 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Deleting field 'Build.warnings_no'
-        db.delete_column(u'orm_build', 'warnings_no')
-
-        # Deleting field 'Build.errors_no'
-        db.delete_column(u'orm_build', 'errors_no')
-
-        # Deleting field 'Build.timespent'
-        db.delete_column(u'orm_build', 'timespent')
-
-
-    def backwards(self, orm):
-        # Adding field 'Build.warnings_no'
-        db.add_column(u'orm_build', 'warnings_no',
-                      self.gf('django.db.models.fields.IntegerField')(default=0),
-                      keep_default=False)
-
-        # Adding field 'Build.errors_no'
-        db.add_column(u'orm_build', 'errors_no',
-                      self.gf('django.db.models.fields.IntegerField')(default=0),
-                      keep_default=False)
-
-        # Adding field 'Build.timespent'
-        db.add_column(u'orm_build', 'timespent',
-                      self.gf('django.db.models.fields.IntegerField')(default=0),
-                      keep_default=False)
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {})
-        },
-        u'orm.buildartifact': {
-            'Meta': {'object_name': 'BuildArtifact'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': "'/'", 'max_length': '1024'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path', 'pathflags'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'pathflags': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tasks'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0024_auto__add_field_recipe_is_image.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0024_auto__add_field_recipe_is_image.py
deleted file mode 100644
index 88f60a9..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0024_auto__add_field_recipe_is_image.py
+++ /dev/null
@@ -1,338 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding field 'Recipe.is_image'
-        db.add_column(u'orm_recipe', 'is_image',
-                      self.gf('django.db.models.fields.BooleanField')(default=False),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'Recipe.is_image'
-        db.delete_column(u'orm_recipe', 'is_image')
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {})
-        },
-        u'orm.buildartifact': {
-            'Meta': {'object_name': 'BuildArtifact'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': "'/'", 'max_length': '1024'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path', 'pathflags'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'pathflags': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tasks'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0025_auto__add_field_project_is_default.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0025_auto__add_field_project_is_default.py
deleted file mode 100644
index e76990d..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0025_auto__add_field_project_is_default.py
+++ /dev/null
@@ -1,346 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # work-around for http://south.aeracode.org/ticket/578:
-        # SQLite boolean fields aren't set to the correct default value
-        # (needs to be 0 or 1, rather than True or False)
-        default = False
-        if db.backend_name == 'sqlite3':
-           default = 0
-
-        # Adding field 'Project.is_default'
-        db.add_column(u'orm_project', 'is_default',
-                      self.gf('django.db.models.fields.BooleanField')(default=default),
-                      keep_default=False)
-
-
-    def backwards(self, orm):
-        # Deleting field 'Project.is_default'
-        db.delete_column(u'orm_project', 'is_default')
-
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {})
-        },
-        u'orm.buildartifact': {
-            'Meta': {'object_name': 'BuildArtifact'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': "'/'", 'max_length': '1024'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path', 'pathflags'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'pathflags': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tasks'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0026_set_default_project.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0026_set_default_project.py
deleted file mode 100644
index 6240abd..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0026_set_default_project.py
+++ /dev/null
@@ -1,374 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-# data-only migration to set the is_default field correctly
-# across all projects, so it has the correct value on a single
-# record only; this will add or amend default project (marked with
-# is_default = True)
-class Migration(SchemaMigration):
-
-    no_dry_run = True
-
-    # work-around for http://south.aeracode.org/ticket/578:
-    # SQLite boolean fields aren't set to the correct default value
-    # when added to existing records (value needs to be 0 or 1, rather
-    # than True or False), so manually update that field for all
-    # existing records
-    def _sqlite_update_all_projects_is_default(self, orm):
-        if db.backend_name == 'sqlite3':
-            for project in orm.Project.objects.all():
-                project.is_default = 0
-                project.save()
-
-    def forwards(self, orm):
-        # fix is_default field
-        self._sqlite_update_all_projects_is_default(orm)
-
-        # now create or modify the default project
-        project = None
-
-        # check for existing default project with ID 0 which has
-        # already been added in code
-        projects = orm.Project.objects.filter(pk = 0)
-
-        if len(projects) == 1:
-            project = projects[0]
-        else:
-            # create default project
-            options = {
-                "name": "Command line builds",
-                "short_description": "Project for builds started outside Toaster"
-            }
-            project = orm.Project.objects.create(**options)
-
-        project.is_default = True
-        project.save()
-
-    def backwards(self, orm):
-        # don't do anything when reversing this migration, as we can safely
-        # keep any generated default project which has builds attached;
-        # it's just that the old code won't use that project as the
-        # container for any new builds, as it doesn't have an ID of 0
-        pass
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {})
-        },
-        u'orm.buildartifact': {
-            'Meta': {'object_name': 'BuildArtifact'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': "'/'", 'max_length': '1024'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path', 'pathflags'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'pathflags': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tasks'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0027_auto__add_customimagerecipe__add_unique_customimagerecipe_name_project.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0027_auto__add_customimagerecipe__add_unique_customimagerecipe_name_project.py
deleted file mode 100644
index 6030605..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0027_auto__add_customimagerecipe__add_unique_customimagerecipe_name_project.py
+++ /dev/null
@@ -1,375 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-        # Adding model 'CustomImageRecipe'
-        db.create_table(u'orm_customimagerecipe', (
-            (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
-            ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
-            ('base_recipe', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Recipe'])),
-            ('project', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Project'])),
-        ))
-        db.send_create_signal(u'orm', ['CustomImageRecipe'])
-
-        # Adding M2M table for field packages on 'CustomImageRecipe'
-        m2m_table_name = db.shorten_name(u'orm_customimagerecipe_packages')
-        db.create_table(m2m_table_name, (
-            ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
-            ('customimagerecipe', models.ForeignKey(orm[u'orm.customimagerecipe'], null=False)),
-            ('package', models.ForeignKey(orm[u'orm.package'], null=False))
-        ))
-        db.create_unique(m2m_table_name, ['customimagerecipe_id', 'package_id'])
-
-        # Adding unique constraint on 'CustomImageRecipe', fields ['name', 'project']
-        db.create_unique(u'orm_customimagerecipe', ['name', 'project_id'])
-
-
-        # Changing field 'Package.build'
-        db.alter_column(u'orm_package', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['orm.Build'], null=True))
-
-    def backwards(self, orm):
-        # Removing unique constraint on 'CustomImageRecipe', fields ['name', 'project']
-        db.delete_unique(u'orm_customimagerecipe', ['name', 'project_id'])
-
-        # Deleting model 'CustomImageRecipe'
-        db.delete_table(u'orm_customimagerecipe')
-
-        # Removing M2M table for field packages on 'CustomImageRecipe'
-        db.delete_table(db.shorten_name(u'orm_customimagerecipe_packages'))
-
-
-        # Changing field 'Package.build'
-        db.alter_column(u'orm_package', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(default=None, to=orm['orm.Build']))
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {})
-        },
-        u'orm.buildartifact': {
-            'Meta': {'object_name': 'BuildArtifact'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
-        },
-        u'orm.customimagerecipe': {
-            'Meta': {'unique_together': "(('name', 'project'),)", 'object_name': 'CustomImageRecipe'},
-            'base_recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'packages': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['orm.Package']", 'symmetrical': 'False'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': "'/'", 'max_length': '1024'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path', 'pathflags'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'pathflags': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tasks'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/migrations/0028_auto__chg_field_logmessage_message.py b/yocto-poky/bitbake/lib/toaster/orm/migrations/0028_auto__chg_field_logmessage_message.py
deleted file mode 100644
index a2f8661..0000000
--- a/yocto-poky/bitbake/lib/toaster/orm/migrations/0028_auto__chg_field_logmessage_message.py
+++ /dev/null
@@ -1,345 +0,0 @@
-# -*- coding: utf-8 -*-
-from south.utils import datetime_utils as datetime
-from south.db import db
-from south.v2 import SchemaMigration
-from django.db import models
-
-
-class Migration(SchemaMigration):
-
-    def forwards(self, orm):
-
-        # Changing field 'LogMessage.message'
-        db.alter_column(u'orm_logmessage', 'message', self.gf('django.db.models.fields.TextField')(null=True))
-
-    def backwards(self, orm):
-
-        # Changing field 'LogMessage.message'
-        db.alter_column(u'orm_logmessage', 'message', self.gf('django.db.models.fields.CharField')(default='', max_length=240))
-
-    models = {
-        u'orm.bitbakeversion': {
-            'Meta': {'object_name': 'BitbakeVersion'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'giturl': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.branch': {
-            'Meta': {'unique_together': "(('layer_source', 'name'), ('layer_source', 'up_id'))", 'object_name': 'Branch'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'True', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.build': {
-            'Meta': {'object_name': 'Build'},
-            'bitbake_version': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
-            'build_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'completed_on': ('django.db.models.fields.DateTimeField', [], {}),
-            'cooker_log_path': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
-            'distro': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'distro_version': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'machine': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '2'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'started_on': ('django.db.models.fields.DateTimeField', [], {})
-        },
-        u'orm.buildartifact': {
-            'Meta': {'object_name': 'BuildArtifact'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
-        },
-        u'orm.customimagerecipe': {
-            'Meta': {'unique_together': "(('name', 'project'),)", 'object_name': 'CustomImageRecipe'},
-            'base_recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'packages': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['orm.Package']", 'symmetrical': 'False'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.helptext': {
-            'Meta': {'object_name': 'HelpText'},
-            'area': ('django.db.models.fields.IntegerField', [], {}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'key': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'text': ('django.db.models.fields.TextField', [], {})
-        },
-        u'orm.layer': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'), ('layer_source', 'name'))", 'object_name': 'Layer'},
-            'description': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_index_url': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'summary': ('django.db.models.fields.TextField', [], {'default': 'None', 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'vcs_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_file_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_tree_base_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'}),
-            'vcs_web_url': ('django.db.models.fields.URLField', [], {'default': 'None', 'max_length': '200', 'null': 'True'})
-        },
-        u'orm.layer_version': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Layer_Version'},
-            'branch': ('django.db.models.fields.CharField', [], {'max_length': '80'}),
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'layer_version_build'", 'null': 'True', 'to': u"orm['orm.Build']"}),
-            'commit': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'dirpath': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'layer_version_layer'", 'to': u"orm['orm.Layer']"}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'local_path': ('django.db.models.fields.FilePathField', [], {'default': "'/'", 'max_length': '1024'}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Project']", 'null': 'True'}),
-            'up_branch': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.Branch']", 'null': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.layersource': {
-            'Meta': {'unique_together': "(('sourcetype', 'apiurl'),)", 'object_name': 'LayerSource'},
-            'apiurl': ('django.db.models.fields.CharField', [], {'default': 'None', 'max_length': '255', 'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '63'}),
-            'sourcetype': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.layerversiondependency': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'LayerVersionDependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependees'", 'to': u"orm['orm.Layer_Version']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'dependencies'", 'to': u"orm['orm.Layer_Version']"}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.logmessage': {
-            'Meta': {'object_name': 'LogMessage'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'level': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'lineno': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'message': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
-            'pathname': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Task']", 'null': 'True', 'blank': 'True'})
-        },
-        u'orm.machine': {
-            'Meta': {'unique_together': "(('layer_source', 'up_id'),)", 'object_name': 'Machine'},
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']"}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'})
-        },
-        u'orm.package': {
-            'Meta': {'object_name': 'Package'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']", 'null': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'installed_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'installed_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Recipe']", 'null': 'True'}),
-            'revision': ('django.db.models.fields.CharField', [], {'max_length': '32', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '80', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.package_dependency': {
-            'Meta': {'object_name': 'Package_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_target'", 'to': u"orm['orm.Package']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'package_dependencies_source'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']", 'null': 'True'})
-        },
-        u'orm.package_file': {
-            'Meta': {'object_name': 'Package_File'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildfilelist_package'", 'to': u"orm['orm.Package']"}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'size': ('django.db.models.fields.IntegerField', [], {})
-        },
-        u'orm.project': {
-            'Meta': {'object_name': 'Project'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']", 'null': 'True'}),
-            'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']", 'null': 'True'}),
-            'short_description': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
-            'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
-            'user_id': ('django.db.models.fields.IntegerField', [], {'null': 'True'})
-        },
-        u'orm.projectlayer': {
-            'Meta': {'unique_together': "(('project', 'layercommit'),)", 'object_name': 'ProjectLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layercommit': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Layer_Version']", 'null': 'True'}),
-            'optional': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"})
-        },
-        u'orm.projecttarget': {
-            'Meta': {'object_name': 'ProjectTarget'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.projectvariable': {
-            'Meta': {'object_name': 'ProjectVariable'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'project': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Project']"}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.recipe': {
-            'Meta': {'unique_together': "(('layer_version', 'file_path', 'pathflags'),)", 'object_name': 'Recipe'},
-            'bugtracker': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'file_path': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            'homepage': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'to': u"orm['orm.LayerSource']", 'null': 'True'}),
-            'layer_version': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'recipe_layer_version'", 'to': u"orm['orm.Layer_Version']"}),
-            'license': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'pathflags': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
-            'section': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'up_date': ('django.db.models.fields.DateTimeField', [], {'default': 'None', 'null': 'True'}),
-            'up_id': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'null': 'True'}),
-            'version': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
-        },
-        u'orm.recipe_dependency': {
-            'Meta': {'object_name': 'Recipe_Dependency'},
-            'dep_type': ('django.db.models.fields.IntegerField', [], {}),
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_depends'", 'to': u"orm['orm.Recipe']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'r_dependencies_recipe'", 'to': u"orm['orm.Recipe']"})
-        },
-        u'orm.release': {
-            'Meta': {'object_name': 'Release'},
-            'bitbake_version': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.BitbakeVersion']"}),
-            'branch_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '50'}),
-            'description': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
-            'helptext': ('django.db.models.fields.TextField', [], {'null': 'True'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'})
-        },
-        u'orm.releasedefaultlayer': {
-            'Meta': {'object_name': 'ReleaseDefaultLayer'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '100'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.releaselayersourcepriority': {
-            'Meta': {'unique_together': "(('release', 'layer_source'),)", 'object_name': 'ReleaseLayerSourcePriority'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'layer_source': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.LayerSource']"}),
-            'priority': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Release']"})
-        },
-        u'orm.target': {
-            'Meta': {'object_name': 'Target'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Build']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'image_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'is_image': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'license_manifest_path': ('django.db.models.fields.CharField', [], {'max_length': '500', 'null': 'True'}),
-            'target': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'task': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'})
-        },
-        u'orm.target_file': {
-            'Meta': {'object_name': 'Target_File'},
-            'directory': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'directory_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'group': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'inodetype': ('django.db.models.fields.IntegerField', [], {}),
-            'owner': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
-            'path': ('django.db.models.fields.FilePathField', [], {'max_length': '100'}),
-            'permission': ('django.db.models.fields.CharField', [], {'max_length': '16'}),
-            'size': ('django.db.models.fields.IntegerField', [], {}),
-            'sym_target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'symlink_set'", 'null': 'True', 'to': u"orm['orm.Target_File']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_image_file': {
-            'Meta': {'object_name': 'Target_Image_File'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '254'}),
-            'file_size': ('django.db.models.fields.IntegerField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.target_installed_package': {
-            'Meta': {'object_name': 'Target_Installed_Package'},
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'package': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'buildtargetlist_package'", 'to': u"orm['orm.Package']"}),
-            'target': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['orm.Target']"})
-        },
-        u'orm.task': {
-            'Meta': {'ordering': "('order', 'recipe')", 'unique_together': "(('build', 'recipe', 'task_name'),)", 'object_name': 'Task'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_build'", 'to': u"orm['orm.Build']"}),
-            'cpu_usage': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            'disk_io': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'elapsed_time': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '8', 'decimal_places': '2'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'logfile': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'message': ('django.db.models.fields.CharField', [], {'max_length': '240'}),
-            'order': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'outcome': ('django.db.models.fields.IntegerField', [], {'default': '-1'}),
-            'path_to_sstate_obj': ('django.db.models.fields.FilePathField', [], {'max_length': '500', 'blank': 'True'}),
-            'recipe': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tasks'", 'to': u"orm['orm.Recipe']"}),
-            'script_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'source_url': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'}),
-            'sstate_checksum': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
-            'sstate_result': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
-            'task_executed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'task_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'work_directory': ('django.db.models.fields.FilePathField', [], {'max_length': '255', 'blank': 'True'})
-        },
-        u'orm.task_dependency': {
-            'Meta': {'object_name': 'Task_Dependency'},
-            'depends_on': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_depends'", 'to': u"orm['orm.Task']"}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'task': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'task_dependencies_task'", 'to': u"orm['orm.Task']"})
-        },
-        u'orm.toastersetting': {
-            'Meta': {'object_name': 'ToasterSetting'},
-            'helptext': ('django.db.models.fields.TextField', [], {}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'name': ('django.db.models.fields.CharField', [], {'max_length': '63'}),
-            'value': ('django.db.models.fields.CharField', [], {'max_length': '255'})
-        },
-        u'orm.variable': {
-            'Meta': {'object_name': 'Variable'},
-            'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'variable_build'", 'to': u"orm['orm.Build']"}),
-            'changed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
-            'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'human_readable_name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'variable_name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
-            'variable_value': ('django.db.models.fields.TextField', [], {'blank': 'True'})
-        },
-        u'orm.variablehistory': {
-            'Meta': {'object_name': 'VariableHistory'},
-            'file_name': ('django.db.models.fields.FilePathField', [], {'max_length': '255'}),
-            u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
-            'line_number': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
-            'operation': ('django.db.models.fields.CharField', [], {'max_length': '64'}),
-            'value': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
-            'variable': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'vhistory'", 'to': u"orm['orm.Variable']"})
-        }
-    }
-
-    complete_apps = ['orm']
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/orm/models.py b/yocto-poky/bitbake/lib/toaster/orm/models.py
index 3832905..0b83b99 100644
--- a/yocto-poky/bitbake/lib/toaster/orm/models.py
+++ b/yocto-poky/bitbake/lib/toaster/orm/models.py
@@ -19,9 +19,12 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
+from __future__ import unicode_literals
+
 from django.db import models, IntegrityError
-from django.db.models import F, Q, Avg, Max
+from django.db.models import F, Q, Avg, Max, Sum
 from django.utils import timezone
+from django.utils.encoding import force_bytes
 
 from django.core.urlresolvers import reverse
 
@@ -29,10 +32,62 @@
 from django.conf import settings
 import django.db.models.signals
 
+import os.path
+import re
+import itertools
 
 import logging
 logger = logging.getLogger("toaster")
 
+if 'sqlite' in settings.DATABASES['default']['ENGINE']:
+    from django.db import transaction, OperationalError
+    from time import sleep
+
+    _base_save = models.Model.save
+    def save(self, *args, **kwargs):
+        while True:
+            try:
+                with transaction.atomic():
+                    return _base_save(self, *args, **kwargs)
+            except OperationalError as err:
+                if 'database is locked' in str(err):
+                    logger.warning("%s, model: %s, args: %s, kwargs: %s",
+                                   err, self.__class__, args, kwargs)
+                    sleep(0.5)
+                    continue
+                raise
+
+    models.Model.save = save
+
+    # HACK: Monkey patch Django to fix 'database is locked' issue
+
+    from django.db.models.query import QuerySet
+    _base_insert = QuerySet._insert
+    def _insert(self,  *args, **kwargs):
+        with transaction.atomic(using=self.db, savepoint=False):
+            return _base_insert(self, *args, **kwargs)
+    QuerySet._insert = _insert
+
+    from django.utils import six
+    def _create_object_from_params(self, lookup, params):
+        """
+        Tries to create an object using passed params.
+        Used by get_or_create and update_or_create
+        """
+        try:
+            obj = self.create(**params)
+            return obj, True
+        except IntegrityError:
+            exc_info = sys.exc_info()
+            try:
+                return self.get(**lookup), False
+            except self.model.DoesNotExist:
+                pass
+            six.reraise(*exc_info)
+
+    QuerySet._create_object_from_params = _create_object_from_params
+
+    # end of HACK
 
 class GitURLValidator(validators.URLValidator):
     import re
@@ -91,18 +146,25 @@
 
         return prj
 
-    def create(self, *args, **kwargs):
-        raise Exception("Invalid call to Project.objects.create. Use Project.objects.create_project() to create a project")
-
     # return single object with is_default = True
-    def get_default_project(self):
+    def get_or_create_default_project(self):
         projects = super(ProjectManager, self).filter(is_default = True)
+
         if len(projects) > 1:
-            raise Exception("Inconsistent project data: multiple " +
-                            "default projects (i.e. with is_default=True)")
+            raise Exception('Inconsistent project data: multiple ' +
+                            'default projects (i.e. with is_default=True)')
         elif len(projects) < 1:
-            raise Exception("Inconsistent project data: no default project found")
-        return projects[0]
+            options = {
+                'name': 'Command line builds',
+                'short_description': 'Project for builds started outside Toaster',
+                'is_default': True
+            }
+            project = Project.objects.create(**options)
+            project.save()
+
+            return project
+        else:
+            return projects[0]
 
 class Project(models.Model):
     search_allowed_fields = ['name', 'short_description', 'release__name', 'release__branch_name']
@@ -130,13 +192,15 @@
         try:
             return self.projectvariable_set.get(name="MACHINE").value
         except (ProjectVariable.DoesNotExist,IndexError):
-            return( "None" );
+            return None;
 
     def get_number_of_builds(self):
-        try:
-            return len(Build.objects.filter( project = self.id ))
-        except (Build.DoesNotExist,IndexError):
-            return( 0 )
+        """Return the number of builds which have ended"""
+
+        return self.build_set.exclude(
+            Q(outcome=Build.IN_PROGRESS) |
+            Q(outcome=Build.CANCELLED)
+        ).count()
 
     def get_last_build_id(self):
         try:
@@ -180,6 +244,14 @@
         except (Build.DoesNotExist,IndexError):
             return( "not_found" )
 
+    def get_last_build_extensions(self):
+        """
+        Get list of file name extensions for images produced by the most
+        recent build
+        """
+        last_build = Build.objects.get(pk = self.get_last_build_id())
+        return last_build.get_image_file_extensions()
+
     def get_last_imgfiles(self):
         build_id = self.get_last_build_id
         if (-1 == build_id):
@@ -189,40 +261,32 @@
         except (Variable.DoesNotExist,IndexError):
             return( "not_found" )
 
-    # returns a queryset of compatible layers for a project
-    def compatible_layerversions(self, release = None, layer_name = None):
-        logger.warning("This function is deprecated")
-        if release == None:
-            release = self.release
-        # layers on the same branch or layers specifically set for this project
-        queryset = Layer_Version.objects.filter(((Q(up_branch__name = release.branch_name) & Q(project = None)) | Q(project = self)) & Q(build__isnull=True))
-
-        if layer_name is not None:
-            # we select only a layer name
-            queryset = queryset.filter(layer__name = layer_name)
-
-        # order by layer version priority
-        queryset = queryset.filter(Q(layer_source=None) | Q(layer_source__releaselayersourcepriority__release = release)).select_related('layer_source', 'layer', 'up_branch', "layer_source__releaselayersourcepriority__priority").order_by("-layer_source__releaselayersourcepriority__priority")
-
-        return queryset
-
     def get_all_compatible_layer_versions(self):
         """ Returns Queryset of all Layer_Versions which are compatible with
         this project"""
-        queryset = Layer_Version.objects.filter(
-            (Q(up_branch__name=self.release.branch_name) & Q(build=None))
-            | Q(project=self))
+        queryset = None
+
+        # guard on release, as it can be null
+        if self.release:
+            queryset = Layer_Version.objects.filter(
+                (Q(up_branch__name=self.release.branch_name) &
+                 Q(build=None) &
+                 Q(project=None)) |
+                 Q(project=self))
+        else:
+            queryset = Layer_Version.objects.none()
 
         return queryset
 
     def get_project_layer_versions(self, pk=False):
         """ Returns the Layer_Versions currently added to this project """
-        layer_versions = self.projectlayer_set.all().values('layercommit')
+        layer_versions = self.projectlayer_set.all().values_list('layercommit',
+                                                                 flat=True)
 
         if pk is False:
-            return layer_versions
+            return Layer_Version.objects.filter(pk__in=layer_versions)
         else:
-            return layer_versions.values_list('layercommit__pk', flat=True)
+            return layer_versions
 
 
     def get_available_machines(self):
@@ -303,11 +367,13 @@
     SUCCEEDED = 0
     FAILED = 1
     IN_PROGRESS = 2
+    CANCELLED = 3
 
     BUILD_OUTCOME = (
         (SUCCEEDED, 'Succeeded'),
         (FAILED, 'Failed'),
         (IN_PROGRESS, 'In Progress'),
+        (CANCELLED, 'Cancelled'),
     )
 
     search_allowed_fields = ['machine', 'cooker_log_path', "target__target", "target__target_image_file__file_name"]
@@ -323,11 +389,40 @@
     build_name = models.CharField(max_length=100)
     bitbake_version = models.CharField(max_length=50)
 
+    @staticmethod
+    def get_recent(project=None):
+        """
+        Return recent builds as a list; if project is set, only return
+        builds for that project
+        """
+
+        builds = Build.objects.all()
+
+        if project:
+            builds = builds.filter(project=project)
+
+        finished_criteria = \
+                Q(outcome=Build.SUCCEEDED) | \
+                Q(outcome=Build.FAILED) | \
+                Q(outcome=Build.CANCELLED)
+
+        recent_builds = list(itertools.chain(
+            builds.filter(outcome=Build.IN_PROGRESS).order_by("-started_on"),
+            builds.filter(finished_criteria).order_by("-completed_on")[:3]
+        ))
+
+        # add percentage done property to each build; this is used
+        # to show build progress in mrb_section.html
+        for build in recent_builds:
+            build.percentDone = build.completeper()
+
+        return recent_builds
+
     def completeper(self):
         tf = Task.objects.filter(build = self)
         tfc = tf.count()
         if tfc > 0:
-            completeper = tf.exclude(order__isnull=True).count()*100/tf.count()
+            completeper = tf.exclude(order__isnull=True).count()*100/tfc
         else:
             completeper = 0
         return completeper
@@ -339,15 +434,117 @@
             eta += ((eta - self.started_on)*(100-completeper))/completeper
         return eta
 
+    def get_image_file_extensions(self):
+        """
+        Get list of file name extensions for images produced by this build
+        """
+        targets = Target.objects.filter(build_id = self.id)
+        extensions = []
+
+        # pattern to match against file path for building extension string
+        pattern = re.compile('\.([^\.]+?)$')
+
+        for target in targets:
+            if (not target.is_image):
+                continue
+
+            target_image_files = Target_Image_File.objects.filter(target_id = target.id)
+
+            for target_image_file in target_image_files:
+                file_name = os.path.basename(target_image_file.file_name)
+                suffix = ''
+
+                continue_matching = True
+
+                # incrementally extract the suffix from the file path,
+                # checking it against the list of valid suffixes at each
+                # step; if the path is stripped of all potential suffix
+                # parts without matching a valid suffix, this returns all
+                # characters after the first '.' in the file name
+                while continue_matching:
+                    matches = pattern.search(file_name)
+
+                    if None == matches:
+                        continue_matching = False
+                        suffix = re.sub('^\.', '', suffix)
+                        continue
+                    else:
+                        suffix = matches.group(1) + suffix
+
+                    if suffix in Target_Image_File.SUFFIXES:
+                        continue_matching = False
+                        continue
+                    else:
+                        # reduce the file name and try to find the next
+                        # segment from the path which might be part
+                        # of the suffix
+                        file_name = re.sub('.' + matches.group(1), '', file_name)
+                        suffix = '.' + suffix
+
+                if not suffix in extensions:
+                    extensions.append(suffix)
+
+        return ', '.join(extensions)
 
     def get_sorted_target_list(self):
         tgts = Target.objects.filter(build_id = self.id).order_by( 'target' );
         return( tgts );
 
+    def get_recipes(self):
+        """
+        Get the recipes related to this build;
+        note that the related layer versions and layers are also prefetched
+        by this query, as this queryset can be sorted by these objects in the
+        build recipes view; prefetching them here removes the need
+        for another query in that view
+        """
+        layer_versions = Layer_Version.objects.filter(build=self)
+        criteria = Q(layer_version__id__in=layer_versions)
+        return Recipe.objects.filter(criteria) \
+                             .select_related('layer_version', 'layer_version__layer')
+
+    def get_image_recipes(self):
+        """
+        Returns a list of image Recipes (custom and built-in) related to this
+        build, sorted by name; note that this has to be done in two steps, as
+        there's no way to get all the custom image recipes and image recipes
+        in one query
+        """
+        custom_image_recipes = self.get_custom_image_recipes()
+        custom_image_recipe_names = custom_image_recipes.values_list('name', flat=True)
+
+        not_custom_image_recipes = ~Q(name__in=custom_image_recipe_names) & \
+                                   Q(is_image=True)
+
+        built_image_recipes = self.get_recipes().filter(not_custom_image_recipes)
+
+        # append to the custom image recipes and sort
+        customisable_image_recipes = list(
+            itertools.chain(custom_image_recipes, built_image_recipes)
+        )
+
+        return sorted(customisable_image_recipes, key=lambda recipe: recipe.name)
+
+    def get_custom_image_recipes(self):
+        """
+        Returns a queryset of CustomImageRecipes related to this build,
+        sorted by name
+        """
+        built_recipe_names = self.get_recipes().values_list('name', flat=True)
+        criteria = Q(name__in=built_recipe_names) & Q(project=self.project)
+        queryset = CustomImageRecipe.objects.filter(criteria).order_by('name')
+        return queryset
+
     def get_outcome_text(self):
         return Build.BUILD_OUTCOME[int(self.outcome)][1]
 
     @property
+    def failed_tasks(self):
+        """ Get failed tasks for the build """
+        tasks = self.task_build.all()
+        return tasks.filter(order__gt=0, outcome=Task.OUTCOME_FAILED)
+
+    @property
     def errors(self):
         return (self.logmessage_set.filter(level=LogMessage.ERROR) |
                 self.logmessage_set.filter(level=LogMessage.EXCEPTION) |
@@ -358,8 +555,26 @@
         return self.logmessage_set.filter(level=LogMessage.WARNING)
 
     @property
+    def timespent(self):
+        return self.completed_on - self.started_on
+
+    @property
     def timespent_seconds(self):
-        return (self.completed_on - self.started_on).total_seconds()
+        return self.timespent.total_seconds()
+
+    @property
+    def target_labels(self):
+        """
+        Sorted (a-z) "target1:task, target2, target3" etc. string for all
+        targets in this build
+        """
+        targets = self.target_set.all()
+        target_labels = [target.target +
+                         (':' + target.task if target.task else '')
+                         for target in targets]
+        target_labels.sort()
+
+        return target_labels
 
     def get_current_status(self):
         """
@@ -399,6 +614,8 @@
 
         return self.file_name
 
+    def get_basename(self):
+        return os.path.basename(self.file_name)
 
     def is_available(self):
         return self.build.buildrequest.environment.has_artifact(self.file_name)
@@ -424,10 +641,25 @@
         return self.target
 
 class Target_Image_File(models.Model):
+    # valid suffixes for image files produced by a build
+    SUFFIXES = {
+        'btrfs', 'cpio', 'cpio.gz', 'cpio.lz4', 'cpio.lzma', 'cpio.xz',
+        'cramfs', 'elf', 'ext2', 'ext2.bz2', 'ext2.gz', 'ext2.lzma', 'ext4',
+        'ext4.gz', 'ext3', 'ext3.gz', 'hddimg', 'iso', 'jffs2', 'jffs2.sum',
+        'squashfs', 'squashfs-lzo', 'squashfs-xz', 'tar.bz2', 'tar.lz4',
+        'tar.xz', 'tartar.gz', 'ubi', 'ubifs', 'vmdk'
+    }
+
     target = models.ForeignKey(Target)
     file_name = models.FilePathField(max_length=254)
     file_size = models.IntegerField()
 
+    @property
+    def suffix(self):
+        filename, suffix = os.path.splitext(self.file_name)
+        suffix = suffix.lstrip('.')
+        return suffix
+
 class Target_File(models.Model):
     ITYPE_REGULAR = 1
     ITYPE_DIRECTORY = 2
@@ -552,9 +784,23 @@
     work_directory = models.FilePathField(max_length=255, blank=True)
     script_type = models.IntegerField(choices=TASK_CODING, default=CODING_NA)
     line_number = models.IntegerField(default=0)
-    disk_io = models.IntegerField(null=True)
-    cpu_usage = models.DecimalField(max_digits=8, decimal_places=2, null=True)
+
+    # start/end times
+    started = models.DateTimeField(null=True)
+    ended = models.DateTimeField(null=True)
+
+    # in seconds; this is stored to enable sorting
     elapsed_time = models.DecimalField(max_digits=8, decimal_places=2, null=True)
+
+    # in bytes; note that disk_io is stored to enable sorting
+    disk_io = models.IntegerField(null=True)
+    disk_io_read = models.IntegerField(null=True)
+    disk_io_write = models.IntegerField(null=True)
+
+    # in seconds
+    cpu_time_user = models.DecimalField(max_digits=8, decimal_places=2, null=True)
+    cpu_time_system = models.DecimalField(max_digits=8, decimal_places=2, null=True)
+
     sstate_result = models.IntegerField(choices=SSTATE_RESULT, default=SSTATE_NA)
     message = models.CharField(max_length=240)
     logfile = models.FilePathField(max_length=255, blank=True)
@@ -589,11 +835,55 @@
     section = models.CharField(max_length=80, blank=True)
     license = models.CharField(max_length=80, blank=True)
 
+    @property
+    def is_locale_package(self):
+        """ Returns True if this package is identifiable as a locale package """
+        if self.name.find('locale') != -1:
+            return True
+        return False
+
+    @property
+    def is_packagegroup(self):
+        """ Returns True is this package is identifiable as a packagegroup """
+        if self.name.find('packagegroup') != -1:
+            return True
+        return False
+
+class CustomImagePackage(Package):
+    # CustomImageRecipe fields to track pacakges appended,
+    # included and excluded from a CustomImageRecipe
+    recipe_includes = models.ManyToManyField('CustomImageRecipe',
+                                             related_name='includes_set')
+    recipe_excludes = models.ManyToManyField('CustomImageRecipe',
+                                             related_name='excludes_set')
+    recipe_appends = models.ManyToManyField('CustomImageRecipe',
+                                            related_name='appends_set')
+
+
+
 class Package_DependencyManager(models.Manager):
     use_for_related_fields = True
 
-    def get_query_set(self):
-        return super(Package_DependencyManager, self).get_query_set().exclude(package_id = F('depends_on__id'))
+    def get_queryset(self):
+        return super(Package_DependencyManager, self).get_queryset().exclude(package_id = F('depends_on__id'))
+
+    def get_total_source_deps_size(self):
+        """ Returns the total file size of all the packages that depend on
+        thispackage.
+        """
+        return self.all().aggregate(Sum('depends_on__size'))
+
+    def get_total_revdeps_size(self):
+        """ Returns the total file size of all the packages that depend on
+        this package.
+        """
+        return self.all().aggregate(Sum('package_id__size'))
+
+
+    def all_depends(self):
+        """ Returns just the depends packages and not any other dep_type """
+        return self.filter(Q(dep_type=Package_Dependency.TYPE_RDEPENDS) |
+                           Q(dep_type=Package_Dependency.TYPE_TRDEPENDS))
 
 class Package_Dependency(models.Model):
     TYPE_RDEPENDS = 0
@@ -693,8 +983,12 @@
 class Recipe_DependencyManager(models.Manager):
     use_for_related_fields = True
 
-    def get_query_set(self):
-        return super(Recipe_DependencyManager, self).get_query_set().exclude(recipe_id = F('depends_on__id'))
+    def get_queryset(self):
+        return super(Recipe_DependencyManager, self).get_queryset().exclude(recipe_id = F('depends_on__id'))
+
+class Provides(models.Model):
+    name = models.CharField(max_length=100)
+    recipe = models.ForeignKey(Recipe)
 
 class Recipe_Dependency(models.Model):
     TYPE_DEPENDS = 0
@@ -706,6 +1000,7 @@
     )
     recipe = models.ForeignKey(Recipe, related_name='r_dependencies_recipe')
     depends_on = models.ForeignKey(Recipe, related_name='r_dependencies_depends')
+    via = models.ForeignKey(Provides, null=True, default=None)
     dep_type = models.IntegerField(choices=DEPENDS_TYPE)
     objects = Recipe_DependencyManager()
 
@@ -895,8 +1190,7 @@
 
         # update layers
         layers_info = _get_json_response(apilinks['layerItems'])
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(False)
+
         for li in layers_info:
             # Special case for the openembedded-core layer
             if li['name'] == oe_core_layer:
@@ -928,17 +1222,12 @@
             l.description = li['description']
             l.save()
 
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(True)
-
         # update layerbranches/layer_versions
         logger.debug("Fetching layer information")
         layerbranches_info = _get_json_response(apilinks['layerBranches']
                 + "?filter=branch:%s" % "OR".join(map(lambda x: str(x.up_id), [i for i in Branch.objects.filter(layer_source = self) if i.up_id is not None] ))
             )
 
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(False)
         for lbi in layerbranches_info:
             lv, created = Layer_Version.objects.get_or_create(layer_source = self,
                     up_id = lbi['id'],
@@ -951,14 +1240,10 @@
             lv.commit = lbi['actual_branch']
             lv.dirpath = lbi['vcs_subdir']
             lv.save()
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(True)
 
         # update layer dependencies
         layerdependencies_info = _get_json_response(apilinks['layerDependencies'])
         dependlist = {}
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(False)
         for ldi in layerdependencies_info:
             try:
                 lv = Layer_Version.objects.get(layer_source = self, up_id = ldi['layerbranch'])
@@ -976,8 +1261,6 @@
             LayerVersionDependency.objects.filter(layer_version = lv).delete()
             for lvd in dependlist[lv]:
                 LayerVersionDependency.objects.get_or_create(layer_version = lv, depends_on = lvd)
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(True)
 
 
         # update machines
@@ -986,8 +1269,6 @@
                 + "?filter=layerbranch:%s" % "OR".join(map(lambda x: str(x.up_id), Layer_Version.objects.filter(layer_source = self)))
             )
 
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(False)
         for mi in machines_info:
             mo, created = Machine.objects.get_or_create(layer_source = self, up_id = mi['id'], layer_version = Layer_Version.objects.get(layer_source = self, up_id = mi['layerbranch']))
             mo.up_date = mi['updated']
@@ -995,16 +1276,11 @@
             mo.description = mi['description']
             mo.save()
 
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(True)
-
         # update recipes; paginate by layer version / layer branch
         logger.debug("Fetching target information")
         recipes_info = _get_json_response(apilinks['recipes']
                 + "?filter=layerbranch:%s" % "OR".join(map(lambda x: str(x.up_id), Layer_Version.objects.filter(layer_source = self)))
             )
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(False)
         for ri in recipes_info:
             try:
                 ro, created = Recipe.objects.get_or_create(layer_source = self, up_id = ri['id'], layer_version = Layer_Version.objects.get(layer_source = self, up_id = ri['layerbranch']))
@@ -1026,8 +1302,6 @@
             except IntegrityError as e:
                 logger.debug("Failed saving recipe, ignoring: %s (%s:%s)" % (e, ro.layer_version, ri['filepath']+"/"+ri['filename']))
                 ro.delete()
-        if not connection.features.autocommits_when_autocommit_is_off:
-            transaction.set_autocommit(True)
 
 class BitbakeVersion(models.Model):
 
@@ -1110,6 +1384,9 @@
 
 # LayerCommit class is synced with layerindex.LayerBranch
 class Layer_Version(models.Model):
+    """
+    A Layer_Version either belongs to a single project or no project
+    """
     search_allowed_fields = ["layer__name", "layer__summary", "layer__description", "layer__vcs_url", "dirpath", "up_branch__name", "commit", "branch"]
     build = models.ForeignKey(Build, related_name='layer_version_build', default = None, null = True)
     layer = models.ForeignKey(Layer, related_name='layer_version_layer')
@@ -1178,7 +1455,9 @@
         return self._handle_url_path(self.layer.vcs_web_tree_base_url, '')
 
     def get_equivalents_wpriority(self, project):
-        return project.compatible_layerversions(layer_name = self.layer.name)
+        layer_versions = project.get_all_compatible_layer_versions()
+        filtered = layer_versions.filter(layer__name = self.layer.name)
+        return filtered.order_by("-layer_source__releaselayersourcepriority__priority")
 
     def get_vcs_reference(self):
         if self.branch is not None and len(self.branch) > 0:
@@ -1187,7 +1466,7 @@
             return self.up_branch.name
         if self.commit is not None and len(self.commit) > 0:
             return self.commit
-        return ("Cannot determine the vcs_reference for layer version %s" % vars(self))
+        return 'N/A'
 
     def get_detailspage_url(self, project_id):
         return reverse('layerdetails', args=(project_id, self.pk))
@@ -1238,14 +1517,142 @@
     class Meta:
         unique_together = (("project", "layercommit"),)
 
-class CustomImageRecipe(models.Model):
-    name = models.CharField(max_length=100)
-    base_recipe = models.ForeignKey(Recipe)
-    packages = models.ManyToManyField(Package)
-    project = models.ForeignKey(Project)
+class CustomImageRecipe(Recipe):
 
-    class Meta:
-        unique_together = ("name", "project")
+    # CustomImageRecipe's belong to layers called:
+    LAYER_NAME = "toaster-custom-images"
+
+    search_allowed_fields = ['name']
+    base_recipe = models.ForeignKey(Recipe, related_name='based_on_recipe')
+    project = models.ForeignKey(Project)
+    last_updated = models.DateTimeField(null=True, default=None)
+
+    def get_last_successful_built_target(self):
+        """ Return the last successful built target object if one exists
+        otherwise return None """
+        return Target.objects.filter(Q(build__outcome=Build.SUCCEEDED) &
+                                     Q(build__project=self.project) &
+                                     Q(target=self.name)).last()
+
+    def update_package_list(self):
+        """ Update the package list from the last good build of this
+        CustomImageRecipe
+        """
+        # Check if we're aldready up-to-date or not
+        target = self.get_last_successful_built_target()
+        if target == None:
+            # So we've never actually built this Custom recipe but what about
+            # the recipe it's based on?
+            target = \
+                Target.objects.filter(Q(build__outcome=Build.SUCCEEDED) &
+                                      Q(build__project=self.project) &
+                                      Q(target=self.base_recipe.name)).last()
+            if target == None:
+                return
+
+        if target.build.completed_on == self.last_updated:
+            return
+
+        self.includes_set.clear()
+
+        excludes_list = self.excludes_set.values_list('name', flat=True)
+        appends_list = self.appends_set.values_list('name', flat=True)
+
+        built_packages_list = \
+            target.target_installed_package_set.values_list('package__name',
+                                                            flat=True)
+        for built_package in built_packages_list:
+            # Is the built package in the custom packages list?
+            if built_package in excludes_list:
+                continue
+
+            if built_package in appends_list:
+                continue
+
+            cust_img_p = \
+                    CustomImagePackage.objects.get(name=built_package)
+            self.includes_set.add(cust_img_p)
+
+
+        self.last_updated = target.build.completed_on
+        self.save()
+
+    def get_all_packages(self):
+        """Get the included packages and any appended packages"""
+        self.update_package_list()
+
+        return CustomImagePackage.objects.filter((Q(recipe_appends=self) |
+                                                  Q(recipe_includes=self)) &
+                                                 ~Q(recipe_excludes=self))
+
+
+    def generate_recipe_file_contents(self):
+        """Generate the contents for the recipe file."""
+        # If we have no excluded packages we only need to _append
+        if self.excludes_set.count() == 0:
+            packages_conf = "IMAGE_INSTALL_append = \" "
+
+            for pkg in self.appends_set.all():
+                packages_conf += pkg.name+' '
+        else:
+            packages_conf = "IMAGE_FEATURES =\"\"\nIMAGE_INSTALL = \""
+            # We add all the known packages to be built by this recipe apart
+            # from locale packages which are are controlled with IMAGE_LINGUAS.
+            for pkg in self.get_all_packages().exclude(
+                name__icontains="locale"):
+                packages_conf += pkg.name+' '
+
+        packages_conf += "\""
+        try:
+            base_recipe = open("%s/%s" %
+                               (self.base_recipe.layer_version.dirpath,
+                                self.base_recipe.file_path), 'r').read()
+        except IOError:
+            # The path may now be the full path if the recipe has been built
+            base_recipe = open(self.base_recipe.file_path, 'r').read()
+
+        # Add a special case for when the recipe we have based a custom image
+        # recipe on requires another recipe.
+        # For example:
+        # "require core-image-minimal.bb" is changed to:
+        # "require recipes-core/images/core-image-minimal.bb"
+
+        req_search = re.search(r'(require\s+)(.+\.bb\s*$)',
+                                   base_recipe,
+                                   re.MULTILINE)
+        if req_search:
+            require_filename = req_search.group(2).strip()
+
+            corrected_location = Recipe.objects.filter(
+                Q(layer_version=self.base_recipe.layer_version) &
+                Q(file_path__icontains=require_filename)).last().file_path
+
+            new_require_line = "require %s" % corrected_location
+
+            base_recipe = \
+                    base_recipe.replace(req_search.group(0), new_require_line)
+
+
+        info = {"date" : timezone.now().strftime("%Y-%m-%d %H:%M:%S"),
+                "base_recipe" : base_recipe,
+                "recipe_name" : self.name,
+                "base_recipe_name" : self.base_recipe.name,
+                "license" : self.license,
+                "summary" : self.summary,
+                "description" : self.description,
+                "packages_conf" : packages_conf.strip(),
+               }
+
+        recipe_contents = ("# Original recipe %(base_recipe_name)s \n"
+                           "%(base_recipe)s\n\n"
+                           "# Recipe %(recipe_name)s \n"
+                           "# Customisation Generated by Toaster on %(date)s\n"
+                           "SUMMARY = \"%(summary)s\"\n"
+                           "DESCRIPTION = \"%(description)s\"\n"
+                           "LICENSE = \"%(license)s\"\n"
+                           "%(packages_conf)s") % info
+
+        return recipe_contents
 
 class ProjectVariable(models.Model):
     project = models.ForeignKey(Project)
@@ -1301,7 +1708,7 @@
     lineno = models.IntegerField(null=True)
 
     def __str__(self):
-        return "%s %s %s" % (self.get_level_display(), self.message, self.build)
+        return force_bytes('%s %s %s' % (self.get_level_display(), self.message, self.build))
 
 def invalidate_cache(**kwargs):
     from django.core.cache import cache
@@ -1312,3 +1719,4 @@
 
 django.db.models.signals.post_save.connect(invalidate_cache)
 django.db.models.signals.post_delete.connect(invalidate_cache)
+django.db.models.signals.m2m_changed.connect(invalidate_cache)
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/__init__.py b/yocto-poky/bitbake/lib/toaster/tests/__init__.py
similarity index 100%
rename from yocto-poky/scripts/lib/wic/3rdparty/pykickstart/__init__.py
rename to yocto-poky/bitbake/lib/toaster/tests/__init__.py
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/README b/yocto-poky/bitbake/lib/toaster/tests/browser/README
new file mode 100644
index 0000000..63e8169
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/README
@@ -0,0 +1,41 @@
+# Running Toaster's browser-based test suite
+
+These tests require Selenium to be installed in your Python environment.
+
+The simplest way to install this is via pip:
+
+  pip install selenium
+
+Alternatively, if you used pip to install the libraries required by Toaster,
+selenium will already be installed.
+
+To run tests against Chrome:
+
+* Download chromedriver for your host OS from
+  https://code.google.com/p/chromedriver/downloads/list
+* On *nix systems, put chromedriver on PATH
+* On Windows, put chromedriver.exe in the same directory as chrome.exe
+
+To run tests against PhantomJS (headless):
+
+* Download and install PhantomJS:
+  http://phantomjs.org/download.html
+* On *nix systems, put phantomjs on PATH
+* Not tested on Windows
+
+Firefox should work without requiring additional software to be installed.
+
+The test case will instantiate a Selenium driver set by the
+TOASTER_TESTS_BROWSER environment variable, or Chrome if this is not specified.
+
+Available drivers:
+
+* chrome (default)
+* firefox
+* ie
+* phantomjs
+
+e.g. to run the test suite with phantomjs where you have phantomjs installed
+in /home/me/apps/phantomjs:
+
+PATH=/home/me/apps/phantomjs/bin:$PATH TOASTER_TESTS_BROWSER=phantomjs manage.py test tests.browser
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/__init__.py b/yocto-poky/bitbake/lib/toaster/tests/browser/__init__.py
similarity index 100%
copy from yocto-poky/scripts/lib/wic/3rdparty/pykickstart/__init__.py
copy to yocto-poky/bitbake/lib/toaster/tests/browser/__init__.py
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py b/yocto-poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py
new file mode 100644
index 0000000..56dbe2b
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/selenium_helpers.py
@@ -0,0 +1,204 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# 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.
+#
+# The Wait class and some of SeleniumDriverHelper and SeleniumTestCase are
+# modified from Patchwork, released under the same licence terms as Toaster:
+# https://github.com/dlespiau/patchwork/blob/master/patchwork/tests.browser.py
+
+"""
+Helper methods for creating Toaster Selenium tests which run within
+the context of Django unit tests.
+"""
+
+import os
+import time
+
+from django.contrib.staticfiles.testing import StaticLiveServerTestCase
+from selenium import webdriver
+from selenium.webdriver.support.ui import WebDriverWait
+from selenium.common.exceptions import NoSuchElementException, \
+        StaleElementReferenceException, TimeoutException
+
+def create_selenium_driver(browser='chrome'):
+    # set default browser string based on env (if available)
+    env_browser = os.environ.get('TOASTER_TESTS_BROWSER')
+    if env_browser:
+        browser = env_browser
+
+    if browser == 'chrome':
+        return webdriver.Chrome(
+            service_args=["--verbose", "--log-path=selenium.log"]
+        )
+    elif browser == 'firefox':
+        return webdriver.Firefox()
+    elif browser == 'ie':
+        return webdriver.Ie()
+    elif browser == 'phantomjs':
+        return webdriver.PhantomJS()
+    else:
+        msg = 'Selenium driver for browser %s is not available' % browser
+        raise RuntimeError(msg)
+
+class Wait(WebDriverWait):
+    """
+    Subclass of WebDriverWait with predetermined timeout and poll
+    frequency. Also deals with a wider variety of exceptions.
+    """
+    _TIMEOUT = 10
+    _POLL_FREQUENCY = 0.5
+
+    def __init__(self, driver):
+        super(Wait, self).__init__(driver, self._TIMEOUT, self._POLL_FREQUENCY)
+
+    def until(self, method, message=''):
+        """
+        Calls the method provided with the driver as an argument until the
+        return value is not False.
+        """
+
+        end_time = time.time() + self._timeout
+        while True:
+            try:
+                value = method(self._driver)
+                if value:
+                    return value
+            except NoSuchElementException:
+                pass
+            except StaleElementReferenceException:
+                pass
+
+            time.sleep(self._poll)
+            if time.time() > end_time:
+                break
+
+        raise TimeoutException(message)
+
+    def until_not(self, method, message=''):
+        """
+        Calls the method provided with the driver as an argument until the
+        return value is False.
+        """
+
+        end_time = time.time() + self._timeout
+        while True:
+            try:
+                value = method(self._driver)
+                if not value:
+                    return value
+            except NoSuchElementException:
+                return True
+            except StaleElementReferenceException:
+                pass
+
+            time.sleep(self._poll)
+            if time.time() > end_time:
+                break
+
+        raise TimeoutException(message)
+
+class SeleniumTestCase(StaticLiveServerTestCase):
+    """
+    NB StaticLiveServerTestCase is used as the base test case so that
+    static files are served correctly in a Selenium test run context; see
+    https://docs.djangoproject.com/en/1.9/ref/contrib/staticfiles/#specialized-test-case-to-support-live-testing
+    """
+
+    @classmethod
+    def setUpClass(cls):
+        """ Create a webdriver driver at the class level """
+
+        super(SeleniumTestCase, cls).setUpClass()
+
+        # instantiate the Selenium webdriver once for all the test methods
+        # in this test case
+        cls.driver = create_selenium_driver()
+
+    @classmethod
+    def tearDownClass(cls):
+        """ Clean up webdriver driver """
+
+        cls.driver.quit()
+        super(SeleniumTestCase, cls).tearDownClass()
+
+    def get(self, url):
+        """
+        Selenium requires absolute URLs, so convert Django URLs returned
+        by resolve() or similar to absolute ones and get using the
+        webdriver instance.
+
+        url: a relative URL
+        """
+        abs_url = '%s%s' % (self.live_server_url, url)
+        self.driver.get(abs_url)
+
+    def find(self, selector):
+        """ Find single element by CSS selector """
+        return self.driver.find_element_by_css_selector(selector)
+
+    def find_all(self, selector):
+        """ Find all elements matching CSS selector """
+        return self.driver.find_elements_by_css_selector(selector)
+
+    def focused_element(self):
+        """ Return the element which currently has focus on the page """
+        return self.driver.switch_to.active_element
+
+    def wait_until_present(self, selector):
+        """ Wait until element matching CSS selector is on the page """
+        is_present = lambda driver: self.find(selector)
+        msg = 'An element matching "%s" should be on the page' % selector
+        element = Wait(self.driver).until(is_present, msg)
+        return element
+
+    def wait_until_visible(self, selector):
+        """ Wait until element matching CSS selector is visible on the page """
+        is_visible = lambda driver: self.find(selector).is_displayed()
+        msg = 'An element matching "%s" should be visible' % selector
+        Wait(self.driver).until(is_visible, msg)
+        return self.find(selector)
+
+    def wait_until_focused(self, selector):
+        """ Wait until element matching CSS selector has focus """
+        is_focused = \
+            lambda driver: self.find(selector) == self.focused_element()
+        msg = 'An element matching "%s" should be focused' % selector
+        Wait(self.driver).until(is_focused, msg)
+        return self.find(selector)
+
+    def enter_text(self, selector, value):
+        """ Insert text into element matching selector """
+        # note that keyup events don't occur until the element is clicked
+        # (in the case of <input type="text"...>, for example), so simulate
+        # user clicking the element before inserting text into it
+        field = self.click(selector)
+
+        field.send_keys(value)
+        return field
+
+    def click(self, selector):
+        """ Click on element which matches CSS selector """
+        element = self.wait_until_visible(selector)
+        element.click()
+        return element
+
+    def get_page_source(self):
+        """ Get raw HTML for the current page """
+        return self.driver.page_source
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py b/yocto-poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
new file mode 100644
index 0000000..e4223f4
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/test_all_builds_page.py
@@ -0,0 +1,143 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# 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.
+
+import re
+
+from django.core.urlresolvers import reverse
+from django.utils import timezone
+from tests.browser.selenium_helpers import SeleniumTestCase
+
+from orm.models import BitbakeVersion, Release, Project, Build, Target
+
+class TestAllBuildsPage(SeleniumTestCase):
+    """ Tests for all builds page /builds/ """
+
+    PROJECT_NAME = 'test project'
+    CLI_BUILDS_PROJECT_NAME = 'command line builds'
+
+    def setUp(self):
+        bbv = BitbakeVersion.objects.create(name='bbv1', giturl='/tmp/',
+                                            branch='master', dirpath='')
+        release = Release.objects.create(name='release1',
+                                         bitbake_version=bbv)
+        self.project1 = Project.objects.create_project(name=self.PROJECT_NAME,
+                                                       release=release)
+        self.default_project = Project.objects.create_project(
+            name=self.CLI_BUILDS_PROJECT_NAME,
+            release=release
+        )
+        self.default_project.is_default = True
+        self.default_project.save()
+
+        # parameters for builds to associate with the projects
+        now = timezone.now()
+
+        self.project1_build_success = {
+            'project': self.project1,
+            'started_on': now,
+            'completed_on': now,
+            'outcome': Build.SUCCEEDED
+        }
+
+        self.default_project_build_success = {
+            'project': self.default_project,
+            'started_on': now,
+            'completed_on': now,
+            'outcome': Build.SUCCEEDED
+        }
+
+    def test_show_tasks_with_suffix(self):
+        """ Task should be shown as suffix on build name """
+        build = Build.objects.create(**self.project1_build_success)
+        target = 'bash'
+        task = 'clean'
+        Target.objects.create(build=build, target=target, task=task)
+
+        url = reverse('all-builds')
+        self.get(url)
+        self.wait_until_present('td[class="target"]')
+
+        cell = self.find('td[class="target"]')
+        content = cell.get_attribute('innerHTML')
+        expected_text = '%s:%s' % (target, task)
+
+        self.assertTrue(re.search(expected_text, content),
+                        '"target" cell should contain text %s' % expected_text)
+
+    def test_rebuild_buttons(self):
+        """
+        Test 'Rebuild' buttons in recent builds section
+
+        'Rebuild' button should not be shown for command-line builds,
+        but should be shown for other builds
+        """
+        build1 = Build.objects.create(**self.project1_build_success)
+        default_build = Build.objects.create(**self.default_project_build_success)
+
+        url = reverse('all-builds')
+        self.get(url)
+
+        # shouldn't see a run again button for command-line builds
+        selector = 'div[data-latest-build-result="%s"] button' % default_build.id
+        run_again_button = self.find_all(selector)
+        self.assertEqual(len(run_again_button), 0,
+                         'should not see a run again button for cli builds')
+
+        # should see a run again button for non-command-line builds
+        selector = 'div[data-latest-build-result="%s"] button' % build1.id
+        run_again_button = self.find_all(selector)
+        self.assertEqual(len(run_again_button), 1,
+                         'should see a run again button for non-cli builds')
+
+    def test_tooltips_on_project_name(self):
+        """
+        Test tooltips shown next to project name in the main table
+
+        A tooltip should be present next to the command line
+        builds project name in the all builds page, but not for
+        other projects
+        """
+        Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.default_project_build_success)
+
+        url = reverse('all-builds')
+        self.get(url)
+
+        # get the project name cells from the table
+        cells = self.find_all('#allbuildstable td[class="project"]')
+
+        selector = 'i.get-help'
+
+        for cell in cells:
+            content = cell.get_attribute('innerHTML')
+            help_icons = cell.find_elements_by_css_selector(selector)
+
+            if re.search(self.PROJECT_NAME, content):
+                # no help icon next to non-cli project name
+                msg = 'should not be a help icon for non-cli builds name'
+                self.assertEqual(len(help_icons), 0, msg)
+            elif re.search(self.CLI_BUILDS_PROJECT_NAME, content):
+                # help icon next to cli project name
+                msg = 'should be a help icon for cli builds name'
+                self.assertEqual(len(help_icons), 1, msg)
+            else:
+                msg = 'found unexpected project name cell in all builds table'
+                self.fail(msg)
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py b/yocto-poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
new file mode 100644
index 0000000..ed8e620
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/test_all_projects_page.py
@@ -0,0 +1,214 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# 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.
+
+import re
+
+from django.core.urlresolvers import reverse
+from django.utils import timezone
+from tests.browser.selenium_helpers import SeleniumTestCase
+
+from orm.models import BitbakeVersion, Release, Project, Build
+from orm.models import ProjectVariable
+
+class TestAllProjectsPage(SeleniumTestCase):
+    """ Browser tests for projects page /projects/ """
+
+    PROJECT_NAME = 'test project'
+    CLI_BUILDS_PROJECT_NAME = 'command line builds'
+    MACHINE_NAME = 'delorean'
+
+    def setUp(self):
+        """ Add default project manually """
+        project = Project.objects.create_project(self.CLI_BUILDS_PROJECT_NAME, None)
+        self.default_project = project
+        self.default_project.is_default = True
+        self.default_project.save()
+
+        # this project is only set for some of the tests
+        self.project = None
+
+        self.release = None
+
+    def _add_build_to_default_project(self):
+        """ Add a build to the default project (not used in all tests) """
+        now = timezone.now()
+        build = Build.objects.create(project=self.default_project,
+                                     started_on=now,
+                                     completed_on=now)
+        build.save()
+
+    def _add_non_default_project(self):
+        """ Add another project """
+        bbv = BitbakeVersion.objects.create(name='test bbv', giturl='/tmp/',
+                                            branch='master', dirpath='')
+        self.release = Release.objects.create(name='test release',
+                                              branch_name='master',
+                                              bitbake_version=bbv)
+        self.project = Project.objects.create_project(self.PROJECT_NAME, self.release)
+        self.project.is_default = False
+        self.project.save()
+
+        # fake the MACHINE variable
+        project_var = ProjectVariable.objects.create(project=self.project,
+                                                     name='MACHINE',
+                                                     value=self.MACHINE_NAME)
+        project_var.save()
+
+    def _get_row_for_project(self, project_name):
+        """ Get the HTML row for a project, or None if not found """
+        self.wait_until_present('#projectstable tbody tr')
+        rows = self.find_all('#projectstable tbody tr')
+
+        # find the row with a project name matching the one supplied
+        found_row = None
+        for row in rows:
+            if re.search(project_name, row.get_attribute('innerHTML')):
+                found_row = row
+                break
+
+        return found_row
+
+    def test_default_project_hidden(self):
+        """
+        The default project should be hidden if it has no builds
+        and we should see the "no results" area
+        """
+        url = reverse('all-projects')
+        self.get(url)
+        self.wait_until_visible('#no-results-projectstable')
+
+        rows = self.find_all('#projectstable tbody tr')
+        self.assertEqual(len(rows), 0, 'should be no projects displayed')
+
+    def test_default_project_has_build(self):
+        """ The default project should be shown if it has builds """
+        self._add_build_to_default_project()
+
+        url = reverse('all-projects')
+        self.get(url)
+
+        default_project_row = self._get_row_for_project(self.default_project.name)
+
+        self.assertNotEqual(default_project_row, None,
+                            'default project "cli builds" should be in page')
+
+    def test_default_project_release(self):
+        """
+        The release for the default project should display as
+        'Not applicable'
+        """
+        # need a build, otherwise project doesn't display at all
+        self._add_build_to_default_project()
+
+        # another project to test, which should show release
+        self._add_non_default_project()
+
+        self.get(reverse('all-projects'))
+
+        # find the row for the default project
+        default_project_row = self._get_row_for_project(self.default_project.name)
+
+        # check the release text for the default project
+        selector = 'span[data-project-field="release"] span.muted'
+        element = default_project_row.find_element_by_css_selector(selector)
+        text = element.text.strip()
+        self.assertEqual(text, 'Not applicable',
+                         'release should be "not applicable" for default project')
+
+        # find the row for the default project
+        other_project_row = self._get_row_for_project(self.project.name)
+
+        # check the link in the release cell for the other project
+        selector = 'span[data-project-field="release"] a'
+        element = other_project_row.find_element_by_css_selector(selector)
+        text = element.text.strip()
+        self.assertEqual(text, self.release.name,
+                         'release name should be shown for non-default project')
+
+    def test_default_project_machine(self):
+        """
+        The machine for the default project should display as
+        'Not applicable'
+        """
+        # need a build, otherwise project doesn't display at all
+        self._add_build_to_default_project()
+
+        # another project to test, which should show machine
+        self._add_non_default_project()
+
+        self.get(reverse('all-projects'))
+
+        # find the row for the default project
+        default_project_row = self._get_row_for_project(self.default_project.name)
+
+        # check the machine cell for the default project
+        selector = 'span[data-project-field="machine"] span.muted'
+        element = default_project_row.find_element_by_css_selector(selector)
+        text = element.text.strip()
+        self.assertEqual(text, 'Not applicable',
+                         'machine should be not applicable for default project')
+
+        # find the row for the default project
+        other_project_row = self._get_row_for_project(self.project.name)
+
+        # check the link in the machine cell for the other project
+        selector = 'span[data-project-field="machine"] a'
+        element = other_project_row.find_element_by_css_selector(selector)
+        text = element.text.strip()
+        self.assertEqual(text, self.MACHINE_NAME,
+                         'machine name should be shown for non-default project')
+
+    def test_project_page_links(self):
+        """
+        Test that links for the default project point to the builds
+        page /projects/X/builds for that project, and that links for
+        other projects point to their configuration pages /projects/X/
+        """
+
+        # need a build, otherwise project doesn't display at all
+        self._add_build_to_default_project()
+
+        # another project to test
+        self._add_non_default_project()
+
+        self.get(reverse('all-projects'))
+
+        # find the row for the default project
+        default_project_row = self._get_row_for_project(self.default_project.name)
+
+        # check the link on the name field
+        selector = 'span[data-project-field="name"] a'
+        element = default_project_row.find_element_by_css_selector(selector)
+        link_url = element.get_attribute('href').strip()
+        expected_url = reverse('projectbuilds', args=(self.default_project.id,))
+        msg = 'link on default project name should point to builds but was %s' % link_url
+        self.assertTrue(link_url.endswith(expected_url), msg)
+
+        # find the row for the other project
+        other_project_row = self._get_row_for_project(self.project.name)
+
+        # check the link for the other project
+        selector = 'span[data-project-field="name"] a'
+        element = other_project_row.find_element_by_css_selector(selector)
+        link_url = element.get_attribute('href').strip()
+        expected_url = reverse('project', args=(self.project.id,))
+        msg = 'link on project name should point to configuration but was %s' % link_url
+        self.assertTrue(link_url.endswith(expected_url), msg)
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py b/yocto-poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
new file mode 100644
index 0000000..5e08749
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/test_builddashboard_page.py
@@ -0,0 +1,251 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# 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.
+
+from django.core.urlresolvers import reverse
+from django.utils import timezone
+
+from selenium_helpers import SeleniumTestCase
+
+from orm.models import Project, Release, BitbakeVersion, Build, LogMessage
+from orm.models import Layer, Layer_Version, Recipe, CustomImageRecipe
+
+class TestBuildDashboardPage(SeleniumTestCase):
+    """ Tests for the build dashboard /build/X """
+
+    def setUp(self):
+        bbv = BitbakeVersion.objects.create(name='bbv1', giturl='/tmp/',
+                                            branch='master', dirpath="")
+        release = Release.objects.create(name='release1',
+                                         bitbake_version=bbv)
+        project = Project.objects.create_project(name='test project',
+                                                 release=release)
+
+        now = timezone.now()
+
+        self.build1 = Build.objects.create(project=project,
+                                           started_on=now,
+                                           completed_on=now)
+
+        self.build2 = Build.objects.create(project=project,
+                                           started_on=now,
+                                           completed_on=now)
+
+        # exception
+        msg1 = 'an exception was thrown'
+        self.exception_message = LogMessage.objects.create(
+            build=self.build1,
+            level=LogMessage.EXCEPTION,
+            message=msg1
+        )
+
+        # critical
+        msg2 = 'a critical error occurred'
+        self.critical_message = LogMessage.objects.create(
+            build=self.build1,
+            level=LogMessage.CRITICAL,
+            message=msg2
+        )
+
+        # recipes related to the build, for testing the edit custom image/new
+        # custom image buttons
+        layer = Layer.objects.create(name='alayer')
+        layer_version = Layer_Version.objects.create(
+            layer=layer, build=self.build1
+        )
+
+        # image recipes
+        self.image_recipe1 = Recipe.objects.create(
+            name='recipeA',
+            layer_version=layer_version,
+            file_path='/foo/recipeA.bb',
+            is_image=True
+        )
+        self.image_recipe2 = Recipe.objects.create(
+            name='recipeB',
+            layer_version=layer_version,
+            file_path='/foo/recipeB.bb',
+            is_image=True
+        )
+
+        # custom image recipes for this project
+        self.custom_image_recipe1 = CustomImageRecipe.objects.create(
+            name='customRecipeY',
+            project=project,
+            layer_version=layer_version,
+            file_path='/foo/customRecipeY.bb',
+            base_recipe=self.image_recipe1,
+            is_image=True
+        )
+        self.custom_image_recipe2 = CustomImageRecipe.objects.create(
+            name='customRecipeZ',
+            project=project,
+            layer_version=layer_version,
+            file_path='/foo/customRecipeZ.bb',
+            base_recipe=self.image_recipe2,
+            is_image=True
+        )
+
+        # custom image recipe for a different project (to test filtering
+        # of image recipes and custom image recipes is correct: this shouldn't
+        # show up in either query against self.build1)
+        self.custom_image_recipe3 = CustomImageRecipe.objects.create(
+            name='customRecipeOmega',
+            project=Project.objects.create(name='baz', release=release),
+            layer_version=Layer_Version.objects.create(
+                layer=layer, build=self.build2
+            ),
+            file_path='/foo/customRecipeOmega.bb',
+            base_recipe=self.image_recipe2,
+            is_image=True
+        )
+
+        # another non-image recipe (to test filtering of image recipes and
+        # custom image recipes is correct: this shouldn't show up in either
+        # for any build)
+        self.non_image_recipe = Recipe.objects.create(
+            name='nonImageRecipe',
+            layer_version=layer_version,
+            file_path='/foo/nonImageRecipe.bb',
+            is_image=False
+        )
+
+    def _get_build_dashboard(self, build):
+        """
+        Navigate to the build dashboard for build
+        """
+        url = reverse('builddashboard', args=(build.id,))
+        self.get(url)
+
+    def _get_build_dashboard_errors(self, build):
+        """
+        Get a list of HTML fragments representing the errors on the
+        dashboard for the Build object build
+        """
+        self._get_build_dashboard(build)
+        return self.find_all('#errors div.alert-error')
+
+    def _check_for_log_message(self, build, log_message):
+        """
+        Check whether the LogMessage instance <log_message> is
+        represented as an HTML error in the dashboard page for the Build object
+        build
+        """
+        errors = self._get_build_dashboard_errors(build)
+        self.assertEqual(len(errors), 2)
+
+        expected_text = log_message.message
+        expected_id = str(log_message.id)
+
+        found = False
+        for error in errors:
+            error_text = error.find_element_by_tag_name('pre').text
+            text_matches = (error_text == expected_text)
+
+            error_id = error.get_attribute('data-error')
+            id_matches = (error_id == expected_id)
+
+            if text_matches and id_matches:
+                found = True
+                break
+
+        template_vars = (expected_text, error_text,
+                         expected_id, error_id)
+        assertion_error_msg = 'exception not found as error: ' \
+            'expected text "%s" and got "%s"; ' \
+            'expected ID %s and got %s' % template_vars
+        self.assertTrue(found, assertion_error_msg)
+
+    def _check_labels_in_modal(self, modal, expected):
+        """
+        Check that the text values of the <label> elements inside
+        the WebElement modal match the list of text values in expected
+        """
+        # labels containing the radio buttons we're testing for
+        labels = modal.find_elements_by_tag_name('label')
+
+        # because the label content has the structure
+        #   label text
+        #   <input...>
+        # we have to regex on its innerHTML, as we can't just retrieve the
+        # "label text" on its own via the Selenium API
+        labels_text = sorted(map(
+            lambda label: label.get_attribute('innerHTML'), labels
+        ))
+
+        expected = sorted(expected)
+
+        self.assertEqual(len(labels_text), len(expected))
+
+        for idx, label_text in enumerate(labels_text):
+            self.assertRegexpMatches(label_text, expected[idx])
+
+    def test_exceptions_show_as_errors(self):
+        """
+        LogMessages with level EXCEPTION should display in the errors
+        section of the page
+        """
+        self._check_for_log_message(self.build1, self.exception_message)
+
+    def test_criticals_show_as_errors(self):
+        """
+        LogMessages with level CRITICAL should display in the errors
+        section of the page
+        """
+        self._check_for_log_message(self.build1, self.critical_message)
+
+    def test_edit_custom_image_button(self):
+        """
+        A build which built two custom images should present a modal which lets
+        the user choose one of them to edit
+        """
+        self._get_build_dashboard(self.build1)
+        modal = self.driver.find_element_by_id('edit-custom-image-modal')
+
+        # recipes we expect to see in the edit custom image modal
+        expected_recipes = [
+            self.custom_image_recipe1.name,
+            self.custom_image_recipe2.name
+        ]
+
+        self._check_labels_in_modal(modal, expected_recipes)
+
+    def test_new_custom_image_button(self):
+        """
+        Check that a build with multiple images and custom images presents
+        all of them as options for creating a new custom image from
+        """
+        self._get_build_dashboard(self.build1)
+
+        # click the "new custom image" button, which populates the modal
+        selector = '[data-role="new-custom-image-trigger"] button'
+        self.click(selector)
+
+        modal = self.driver.find_element_by_id('new-custom-image-modal')
+
+        # recipes we expect to see in the new custom image modal
+        expected_recipes = [
+            self.image_recipe1.name,
+            self.image_recipe2.name,
+            self.custom_image_recipe1.name,
+            self.custom_image_recipe2.name
+        ]
+
+        self._check_labels_in_modal(modal, expected_recipes)
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py b/yocto-poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
new file mode 100644
index 0000000..e63da8e
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/test_js_unit_tests.py
@@ -0,0 +1,57 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# 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.
+
+"""
+Run the js unit tests
+"""
+
+from django.core.urlresolvers import reverse
+from tests.browser.selenium_helpers import SeleniumTestCase
+import logging
+
+logger = logging.getLogger("toaster")
+
+
+class TestJsUnitTests(SeleniumTestCase):
+    """ Test landing page shows the Toaster brand """
+
+    fixtures = ['toastergui-unittest-data']
+
+    def test_that_js_unit_tests_pass(self):
+        url = reverse('js-unit-tests')
+        self.get(url)
+        self.wait_until_present('#tests-failed')
+
+        failed = self.find("#tests-failed").text
+        passed = self.find("#tests-passed").text
+        total = self.find("#tests-total").text
+
+        logger.info("Js unit tests completed %s out of %s passed, %s failed",
+                    passed,
+                    total,
+                    failed)
+
+        failed_tests = self.find_all("li .fail .test-message")
+        for fail in failed_tests:
+            logger.error("JS unit test failed: %s" % fail.text)
+
+        self.assertEqual(failed, '0',
+                         "%s JS unit tests failed" % failed)
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/test_landing_page.py b/yocto-poky/bitbake/lib/toaster/tests/browser/test_landing_page.py
new file mode 100644
index 0000000..4d4cd66
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/test_landing_page.py
@@ -0,0 +1,108 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# 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.
+
+from django.core.urlresolvers import reverse
+from django.utils import timezone
+from tests.browser.selenium_helpers import SeleniumTestCase
+
+from orm.models import Project, Build
+
+class TestLandingPage(SeleniumTestCase):
+    """ Tests for redirects on the landing page """
+
+    PROJECT_NAME = 'test project'
+    LANDING_PAGE_TITLE = 'This is Toaster'
+    CLI_BUILDS_PROJECT_NAME = 'command line builds'
+
+    def setUp(self):
+        """ Add default project manually """
+        self.project = Project.objects.create_project(
+            self.CLI_BUILDS_PROJECT_NAME,
+            None
+        )
+        self.project.is_default = True
+        self.project.save()
+
+    def test_only_default_project(self):
+        """
+        No projects except default
+        => should see the landing page
+        """
+        self.get(reverse('landing'))
+        self.assertTrue(self.LANDING_PAGE_TITLE in self.get_page_source())
+
+    def test_default_project_has_build(self):
+        """
+        Default project has a build, no other projects
+        => should see the builds page
+        """
+        now = timezone.now()
+        build = Build.objects.create(project=self.project,
+                                     started_on=now,
+                                     completed_on=now)
+        build.save()
+
+        self.get(reverse('landing'))
+
+        elements = self.find_all('#allbuildstable')
+        self.assertEqual(len(elements), 1, 'should redirect to builds')
+        content = self.get_page_source()
+        self.assertFalse(self.PROJECT_NAME in content,
+                         'should not show builds for project %s' % self.PROJECT_NAME)
+        self.assertTrue(self.CLI_BUILDS_PROJECT_NAME in content,
+                        'should show builds for cli project')
+
+    def test_user_project_exists(self):
+        """
+        User has added a project (without builds)
+        => should see the projects page
+        """
+        user_project = Project.objects.create_project('foo', None)
+        user_project.save()
+
+        self.get(reverse('landing'))
+
+        elements = self.find_all('#projectstable')
+        self.assertEqual(len(elements), 1, 'should redirect to projects')
+
+    def test_user_project_has_build(self):
+        """
+        User has added a project (with builds), command line builds doesn't
+        => should see the builds page
+        """
+        user_project = Project.objects.create_project(self.PROJECT_NAME, None)
+        user_project.save()
+
+        now = timezone.now()
+        build = Build.objects.create(project=user_project,
+                                     started_on=now,
+                                     completed_on=now)
+        build.save()
+
+        self.get(reverse('landing'))
+
+        elements = self.find_all('#allbuildstable')
+        self.assertEqual(len(elements), 1, 'should redirect to builds')
+        content = self.get_page_source()
+        self.assertTrue(self.PROJECT_NAME in content,
+                        'should show builds for project %s' % self.PROJECT_NAME)
+        self.assertFalse(self.CLI_BUILDS_PROJECT_NAME in content,
+                         'should not show builds for cli project')
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py b/yocto-poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
new file mode 100644
index 0000000..8906cb2
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/test_new_custom_image_page.py
@@ -0,0 +1,160 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# 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.
+
+from django.core.urlresolvers import reverse
+from tests.browser.selenium_helpers import SeleniumTestCase
+
+from orm.models import BitbakeVersion, Release, Project, ProjectLayer, Layer
+from orm.models import Layer_Version, Recipe, CustomImageRecipe
+
+class TestNewCustomImagePage(SeleniumTestCase):
+    CUSTOM_IMAGE_NAME = 'roopa-doopa'
+
+    def setUp(self):
+        release = Release.objects.create(
+            name='baz',
+            bitbake_version=BitbakeVersion.objects.create(name='v1')
+        )
+
+        # project to add new custom images to
+        self.project = Project.objects.create(name='foo', release=release)
+
+        # layer associated with the project
+        layer = Layer.objects.create(name='bar')
+        layer_version = Layer_Version.objects.create(
+            layer=layer,
+            project=self.project
+        )
+
+        # properly add the layer to the project
+        ProjectLayer.objects.create(
+            project=self.project,
+            layercommit=layer_version,
+            optional=False
+        )
+
+        # add a fake image recipe to the layer that can be customised
+        self.recipe = Recipe.objects.create(
+            name='core-image-minimal',
+            layer_version=layer_version,
+            is_image=True
+        )
+
+        # another project with a custom image already in it
+        project2 = Project.objects.create(name='whoop', release=release)
+        layer_version2 = Layer_Version.objects.create(
+            layer=layer,
+            project=project2
+        )
+        ProjectLayer.objects.create(
+            project=project2,
+            layercommit=layer_version2,
+            optional=False
+        )
+        recipe2 = Recipe.objects.create(
+            name='core-image-minimal',
+            layer_version=layer_version2,
+            is_image=True
+        )
+        CustomImageRecipe.objects.create(
+            name=self.CUSTOM_IMAGE_NAME,
+            base_recipe=recipe2,
+            layer_version=layer_version2,
+            file_path='/1/2',
+            project=project2
+        )
+
+    def _create_custom_image(self, new_custom_image_name):
+        """
+        1. Go to the 'new custom image' page
+        2. Click the button for the fake core-image-minimal
+        3. Wait for the dialog box for setting the name of the new custom
+           image
+        4. Insert new_custom_image_name into that dialog's text box
+        """
+        url = reverse('newcustomimage', args=(self.project.id,))
+        self.get(url)
+
+        self.click('button[data-recipe="%s"]' % self.recipe.id)
+
+        selector = '#new-custom-image-modal input[type="text"]'
+        self.enter_text(selector, new_custom_image_name)
+
+        self.click('#create-new-custom-image-btn')
+
+    def _check_for_custom_image(self, image_name):
+        """
+        Fetch the list of custom images for the project and check the
+        image with name image_name is listed there
+        """
+        url = reverse('projectcustomimages', args=(self.project.id,))
+        self.get(url)
+
+        self.wait_until_visible('#customimagestable')
+
+        element = self.find('#customimagestable td[class="name"] a')
+        msg = 'should be a custom image link with text %s' % image_name
+        self.assertEqual(element.text.strip(), image_name, msg)
+
+    def test_new_image(self):
+        """
+        Should be able to create a new custom image
+        """
+        custom_image_name = 'boo-image'
+        self._create_custom_image(custom_image_name)
+        self.wait_until_visible('#image-created-notification')
+        self._check_for_custom_image(custom_image_name)
+
+    def test_new_duplicates_other_project_image(self):
+        """
+        Should be able to create a new custom image if its name is the same
+        as a custom image in another project
+        """
+        self._create_custom_image(self.CUSTOM_IMAGE_NAME)
+        self.wait_until_visible('#image-created-notification')
+        self._check_for_custom_image(self.CUSTOM_IMAGE_NAME)
+
+    def test_new_duplicates_non_image_recipe(self):
+        """
+        Should not be able to create a new custom image whose name is the
+        same as an existing non-image recipe
+        """
+        self._create_custom_image(self.recipe.name)
+        element = self.wait_until_visible('#invalid-name-help')
+        self.assertRegexpMatches(element.text.strip(),
+                                 'recipe with this name already exists')
+
+    def test_new_duplicates_project_image(self):
+        """
+        Should not be able to create a new custom image whose name is the same
+        as a custom image in this project
+        """
+        # create the image
+        custom_image_name = 'doh-image'
+        self._create_custom_image(custom_image_name)
+        self.wait_until_visible('#image-created-notification')
+        self._check_for_custom_image(custom_image_name)
+
+        # try to create an image with the same name
+        self._create_custom_image(custom_image_name)
+        element = self.wait_until_visible('#invalid-name-help')
+        expected = 'An image with this name already exists in this project'
+        self.assertRegexpMatches(element.text.strip(), expected)
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py b/yocto-poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py
new file mode 100644
index 0000000..9fe91ab
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/test_project_builds_page.py
@@ -0,0 +1,168 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# 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.
+
+import re
+
+from django.core.urlresolvers import reverse
+from django.utils import timezone
+from tests.browser.selenium_helpers import SeleniumTestCase
+
+from orm.models import BitbakeVersion, Release, Project, Build, Target
+
+class TestProjectBuildsPage(SeleniumTestCase):
+    """ Test data at /project/X/builds is displayed correctly """
+
+    PROJECT_NAME = 'test project'
+    CLI_BUILDS_PROJECT_NAME = 'command line builds'
+
+    def setUp(self):
+        bbv = BitbakeVersion.objects.create(name='bbv1', giturl='/tmp/',
+                                            branch='master', dirpath='')
+        release = Release.objects.create(name='release1',
+                                         bitbake_version=bbv)
+        self.project1 = Project.objects.create_project(name=self.PROJECT_NAME,
+                                                       release=release)
+        self.project1.save()
+
+        self.project2 = Project.objects.create_project(name=self.PROJECT_NAME,
+                                                       release=release)
+        self.project2.save()
+
+        self.default_project = Project.objects.create_project(
+            name=self.CLI_BUILDS_PROJECT_NAME,
+            release=release
+        )
+        self.default_project.is_default = True
+        self.default_project.save()
+
+        # parameters for builds to associate with the projects
+        now = timezone.now()
+
+        self.project1_build_success = {
+            'project': self.project1,
+            'started_on': now,
+            'completed_on': now,
+            'outcome': Build.SUCCEEDED
+        }
+
+        self.project1_build_in_progress = {
+            'project': self.project1,
+            'started_on': now,
+            'completed_on': now,
+            'outcome': Build.IN_PROGRESS
+        }
+
+        self.project2_build_success = {
+            'project': self.project2,
+            'started_on': now,
+            'completed_on': now,
+            'outcome': Build.SUCCEEDED
+        }
+
+        self.project2_build_in_progress = {
+            'project': self.project2,
+            'started_on': now,
+            'completed_on': now,
+            'outcome': Build.IN_PROGRESS
+        }
+
+    def _get_rows_for_project(self, project_id):
+        """
+        Helper to retrieve HTML rows for a project's builds,
+        as shown in the main table of the page
+        """
+        url = reverse('projectbuilds', args=(project_id,))
+        self.get(url)
+        self.wait_until_present('#projectbuildstable tbody tr')
+        return self.find_all('#projectbuildstable tbody tr')
+
+    def test_show_builds_for_project(self):
+        """ Builds for a project should be displayed in the main table """
+        Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
+        build_rows = self._get_rows_for_project(self.project1.id)
+        self.assertEqual(len(build_rows), 2)
+
+    def test_show_builds_project_only(self):
+        """ Builds for other projects should be excluded """
+        Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
+
+        # shouldn't see these two
+        Build.objects.create(**self.project2_build_success)
+        Build.objects.create(**self.project2_build_in_progress)
+
+        build_rows = self._get_rows_for_project(self.project1.id)
+        self.assertEqual(len(build_rows), 3)
+
+    def test_builds_exclude_in_progress(self):
+        """ "in progress" builds should not be shown in main table """
+        Build.objects.create(**self.project1_build_success)
+        Build.objects.create(**self.project1_build_success)
+
+        # shouldn't see this one
+        Build.objects.create(**self.project1_build_in_progress)
+
+        # shouldn't see these two either, as they belong to a different project
+        Build.objects.create(**self.project2_build_success)
+        Build.objects.create(**self.project2_build_in_progress)
+
+        build_rows = self._get_rows_for_project(self.project1.id)
+        self.assertEqual(len(build_rows), 2)
+
+    def test_show_tasks_with_suffix(self):
+        """ Task should be shown as suffixes on build names """
+        build = Build.objects.create(**self.project1_build_success)
+        target = 'bash'
+        task = 'clean'
+        Target.objects.create(build=build, target=target, task=task)
+
+        url = reverse('projectbuilds', args=(self.project1.id,))
+        self.get(url)
+        self.wait_until_present('td[class="target"]')
+
+        cell = self.find('td[class="target"]')
+        content = cell.get_attribute('innerHTML')
+        expected_text = '%s:%s' % (target, task)
+
+        self.assertTrue(re.search(expected_text, content),
+                        '"target" cell should contain text %s' % expected_text)
+
+    def test_cli_builds_hides_tabs(self):
+        """
+        Display for command line builds should hide tabs
+        """
+        url = reverse('projectbuilds', args=(self.default_project.id,))
+        self.get(url)
+        tabs = self.find_all('#project-topbar')
+        self.assertEqual(len(tabs), 0,
+                         'should be no top bar shown for command line builds')
+
+    def test_non_cli_builds_has_tabs(self):
+        """
+        Non-command-line builds projects should show the tabs
+        """
+        url = reverse('projectbuilds', args=(self.project1.id,))
+        self.get(url)
+        tabs = self.find_all('#project-topbar')
+        self.assertEqual(len(tabs), 1,
+                         'should be a top bar shown for non-command-line builds')
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/test_project_page.py b/yocto-poky/bitbake/lib/toaster/tests/browser/test_project_page.py
new file mode 100644
index 0000000..786bef1
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/test_project_page.py
@@ -0,0 +1,59 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# 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.
+
+from django.core.urlresolvers import reverse
+from django.utils import timezone
+from tests.browser.selenium_helpers import SeleniumTestCase
+
+from orm.models import Build, Project
+
+class TestProjectPage(SeleniumTestCase):
+    """ Test project data at /project/X/ is displayed correctly """
+
+    CLI_BUILDS_PROJECT_NAME = 'Command line builds'
+
+    def test_cli_builds_in_progress(self):
+        """
+        In progress builds should not cause an error to be thrown
+        when navigating to "command line builds" project page;
+        see https://bugzilla.yoctoproject.org/show_bug.cgi?id=8277
+        """
+
+        # add the "command line builds" default project; this mirrors what
+        # we do with get_or_create_default_project()
+        default_project = Project.objects.create_project(self.CLI_BUILDS_PROJECT_NAME, None)
+        default_project.is_default = True
+        default_project.save()
+
+        # add an "in progress" build for the default project
+        now = timezone.now()
+        Build.objects.create(project=default_project,
+                             started_on=now,
+                             completed_on=now,
+                             outcome=Build.IN_PROGRESS)
+
+        # navigate to the project page for the default project
+        url = reverse("project", args=(default_project.id,))
+        self.get(url)
+
+        # check that we get a project page with the correct heading
+        project_name = self.find('#project-name').text.strip()
+        self.assertEqual(project_name, self.CLI_BUILDS_PROJECT_NAME)
diff --git a/yocto-poky/bitbake/lib/toaster/tests/browser/test_sample.py b/yocto-poky/bitbake/lib/toaster/tests/browser/test_sample.py
new file mode 100644
index 0000000..7bb8b97
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/browser/test_sample.py
@@ -0,0 +1,41 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2013-2016 Intel Corporation
+#
+# 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.
+
+"""
+A small example test demonstrating the basics of writing a test with
+Toaster's SeleniumTestCase; this just fetches the Toaster home page
+and checks it has the word "Toaster" in the brand link
+
+New test files should follow this structure, should be named "test_*.py",
+and should be in the same directory as this sample.
+"""
+
+from django.core.urlresolvers import reverse
+from tests.browser.selenium_helpers import SeleniumTestCase
+
+class TestSample(SeleniumTestCase):
+    """ Test landing page shows the Toaster brand """
+
+    def test_landing_page_has_brand(self):
+        url = reverse('landing')
+        self.get(url)
+        brand_link = self.find('span.brand a')
+        self.assertEqual(brand_link.text.strip(), 'Toaster')
diff --git a/yocto-poky/bitbake/lib/toaster/tests/toaster-tests-requirements.txt b/yocto-poky/bitbake/lib/toaster/tests/toaster-tests-requirements.txt
new file mode 100644
index 0000000..4f9fcc4
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/tests/toaster-tests-requirements.txt
@@ -0,0 +1 @@
+selenium==2.49.2
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/api.py b/yocto-poky/bitbake/lib/toaster/toastergui/api.py
new file mode 100644
index 0000000..42901f7
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/api.py
@@ -0,0 +1,110 @@
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2016        Intel Corporation
+#
+# 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.
+
+
+# Temporary home for the UI's misc API
+
+from orm.models import Project, ProjectTarget, Build
+from bldcontrol.models import BuildRequest
+from bldcontrol import bbcontroller
+from django.http import HttpResponse, JsonResponse
+from django.views.generic import View
+
+
+class XhrBuildRequest(View):
+
+    def get(self, request, *args, **kwargs):
+        return HttpResponse()
+
+    def post(self, request, *args, **kwargs):
+        """
+          Build control
+
+          Entry point: /xhr_buildrequest/<project_id>
+          Method: POST
+
+          Args:
+              id: id of build to change
+              buildCancel = build_request_id ...
+              buildDelete = id ...
+              targets = recipe_name ...
+
+          Returns:
+              {"error": "ok"}
+            or
+              {"error": <error message>}
+        """
+
+        project = Project.objects.get(pk=kwargs['pid'])
+
+        if 'buildCancel' in request.POST:
+            for i in request.POST['buildCancel'].strip().split(" "):
+                try:
+                    br = BuildRequest.objects.get(project=project, pk=i)
+
+                    try:
+                        bbctrl = bbcontroller.BitbakeController(br.environment)
+                        bbctrl.forceShutDown()
+                    except:
+                        # We catch a bunch of exceptions here because
+                        # this is where the server has not had time to start up
+                        # and the build request or build is in transit between
+                        # processes.
+                        # We can safely just set the build as cancelled
+                        # already as it never got started
+                        build = br.build
+                        build.outcome = Build.CANCELLED
+                        build.save()
+
+                    # We now hand over to the buildinfohelper to update the
+                    # build state once we've finished cancelling
+                    br.state = BuildRequest.REQ_CANCELLING
+                    br.save()
+
+                except BuildRequest.DoesNotExist:
+                    return JsonResponse({'error':'No such build id %s' % i})
+
+            return JsonResponse({'error': 'ok'})
+
+        if 'buildDelete' in request.POST:
+            for i in request.POST['buildDelete'].strip().split(" "):
+                try:
+                    BuildRequest.objects.select_for_update().get(project = project, pk = i, state__lte = BuildRequest.REQ_DELETED).delete()
+                except BuildRequest.DoesNotExist:
+                    pass
+            return JsonResponse({'error': 'ok' })
+
+        if 'targets' in request.POST:
+            ProjectTarget.objects.filter(project = project).delete()
+            s = str(request.POST['targets'])
+            for t in s.translate(None, ";%|\"").split(" "):
+                if ":" in t:
+                    target, task = t.split(":")
+                else:
+                    target = t
+                    task = ""
+                ProjectTarget.objects.create(project = project,
+                                             target = target,
+                                             task = task)
+            project.schedule_build()
+
+            return JsonResponse({'error': 'ok' })
+
+        response = HttpResponse()
+        response.status_code = 500
+        return response
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml b/yocto-poky/bitbake/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml
new file mode 100644
index 0000000..cf35be4
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml
@@ -0,0 +1,446 @@
+<?xml version="1.0" encoding="utf-8"?>
+<django-objects version="1.0">
+  <object pk="1" model="orm.project">
+    <field type="CharField" name="name">a test project</field>
+    <field type="CharField" name="short_description"></field>
+    <field to="orm.bitbakeversion" name="bitbake_version" rel="ManyToOneRel">1</field>
+    <field to="orm.release" name="release" rel="ManyToOneRel">1</field>
+    <field type="DateTimeField" name="created">2016-02-15T18:46:20.098248+00:00</field>
+    <field type="DateTimeField" name="updated">2016-02-15T18:46:20.098392+00:00</field>
+    <field type="IntegerField" name="user_id"><None></None></field>
+    <field type="BooleanField" name="is_default">False</field>
+  </object>
+  <object pk="2" model="orm.project">
+    <field type="CharField" name="name">z test project</field>
+    <field type="CharField" name="short_description"></field>
+    <field to="orm.bitbakeversion" name="bitbake_version" rel="ManyToOneRel">1</field>
+    <field to="orm.release" name="release" rel="ManyToOneRel">2</field>
+    <field type="DateTimeField" name="created">2016-02-15T18:46:20.107936+00:00</field>
+    <field type="DateTimeField" name="updated">2016-02-15T18:46:20.108066+00:00</field>
+    <field type="IntegerField" name="user_id"><None></None></field>
+    <field type="BooleanField" name="is_default">False</field>
+  </object>
+  <object pk="1" model="orm.ProjectVariable">
+    <field to="orm.project" name="project" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="name">MACHINE</field>
+    <field type="TextField" name="value">qemux86</field>
+  </object>
+  <object pk="2" model="orm.ProjectVariable">
+    <field to="orm.project" name="project" rel="ManyToOneRel">2</field>
+    <field type="CharField" name="name">MACHINE</field>
+    <field type="TextField" name="value">qemux86</field>
+  </object>
+  <object pk="1" model="orm.build">
+    <field to="orm.project" name="project" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="machine">x12</field>
+    <field type="CharField" name="distro"></field>
+    <field type="CharField" name="distro_version"></field>
+    <field type="DateTimeField" name="started_on">2016-02-14T18:46:20.114530+00:00</field>
+    <field type="DateTimeField" name="completed_on">2016-02-14T18:46:20.114530+00:00</field>
+    <field type="IntegerField" name="outcome">0</field>
+    <field type="CharField" name="cooker_log_path"></field>
+    <field type="CharField" name="build_name">a</field>
+    <field type="CharField" name="bitbake_version"></field>
+  </object>
+  <object pk="2" model="orm.build">
+    <field to="orm.project" name="project" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="machine">raspberrypi2</field>
+    <field type="CharField" name="distro"></field>
+    <field type="CharField" name="distro_version"></field>
+    <field type="DateTimeField" name="started_on">2016-02-13T18:46:20.114530+00:00</field>
+    <field type="DateTimeField" name="completed_on">2016-02-13T18:46:20.114530+00:00</field>
+    <field type="IntegerField" name="outcome">0</field>
+    <field type="CharField" name="cooker_log_path"></field>
+    <field type="CharField" name="build_name">b</field>
+    <field type="CharField" name="bitbake_version"></field>
+  </object>
+  <object pk="3" model="orm.build">
+    <field to="orm.project" name="project" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="machine">qemux86</field>
+    <field type="CharField" name="distro"></field>
+    <field type="CharField" name="distro_version"></field>
+    <field type="DateTimeField" name="started_on">2016-02-12T18:46:20.114530+00:00</field>
+    <field type="DateTimeField" name="completed_on">2016-02-12T18:46:20.114530+00:00</field>
+    <field type="IntegerField" name="outcome">1</field>
+    <field type="CharField" name="cooker_log_path"></field>
+    <field type="CharField" name="build_name">c</field>
+    <field type="CharField" name="bitbake_version"></field>
+  </object>
+  <object pk="4" model="orm.build">
+    <field to="orm.project" name="project" rel="ManyToOneRel">2</field>
+    <field type="CharField" name="machine">qemux86</field>
+    <field type="CharField" name="distro"></field>
+    <field type="CharField" name="distro_version"></field>
+    <field type="DateTimeField" name="started_on">2016-02-11T18:46:20.114530+00:00</field>
+    <field type="DateTimeField" name="completed_on">2016-02-11T18:46:20.114530+00:00</field>
+    <field type="IntegerField" name="outcome">0</field>
+    <field type="CharField" name="cooker_log_path"></field>
+    <field type="CharField" name="build_name">d</field>
+    <field type="CharField" name="bitbake_version"></field>
+  </object>
+  <object pk="1" model="orm.target">
+    <field to="orm.build" name="build" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="target">a image recipe</field>
+    <field type="CharField" name="task"><None></None></field>
+    <field type="BooleanField" name="is_image">False</field>
+    <field type="IntegerField" name="image_size">0</field>
+    <field type="CharField" name="license_manifest_path"><None></None></field>
+  </object>
+  <object pk="2" model="orm.target">
+    <field to="orm.build" name="build" rel="ManyToOneRel">2</field>
+    <field type="CharField" name="target">z something</field>
+    <field type="CharField" name="task"><None></None></field>
+    <field type="BooleanField" name="is_image">False</field>
+    <field type="IntegerField" name="image_size">0</field>
+    <field type="CharField" name="license_manifest_path"><None></None></field>
+  </object>
+  <object pk="3" model="orm.target">
+    <field to="orm.build" name="build" rel="ManyToOneRel">3</field>
+    <field type="CharField" name="target">h recipe</field>
+    <field type="CharField" name="task"><None></None></field>
+    <field type="BooleanField" name="is_image">False</field>
+    <field type="IntegerField" name="image_size">0</field>
+    <field type="CharField" name="license_manifest_path"><None></None></field>
+  </object>
+  <object pk="1" model="orm.package">
+    <field to="orm.build" name="build" rel="ManyToOneRel">1</field>
+    <field to="orm.recipe" name="recipe" rel="ManyToOneRel">2</field>
+    <field type="CharField" name="name">b pkg</field>
+    <field type="CharField" name="installed_name"></field>
+    <field type="CharField" name="version"></field>
+    <field type="CharField" name="revision"></field>
+    <field type="TextField" name="summary"></field>
+    <field type="TextField" name="description"></field>
+    <field type="IntegerField" name="size">777</field>
+    <field type="IntegerField" name="installed_size">0</field>
+    <field type="CharField" name="section"></field>
+    <field type="CharField" name="license">a license</field>
+  </object>
+  <object pk="2" model="orm.package">
+    <field to="orm.build" name="build" rel="ManyToOneRel">1</field>
+    <field to="orm.recipe" name="recipe" rel="ManyToOneRel">2</field>
+    <field type="CharField" name="name">f pkg</field>
+    <field type="CharField" name="installed_name"></field>
+    <field type="CharField" name="version"></field>
+    <field type="CharField" name="revision"></field>
+    <field type="TextField" name="summary"></field>
+    <field type="TextField" name="description"></field>
+    <field type="IntegerField" name="size">4</field>
+    <field type="IntegerField" name="installed_size">10</field>
+    <field type="CharField" name="section"></field>
+    <field type="CharField" name="license">z license</field>
+  </object>
+  <object pk="3" model="orm.package">
+    <field to="orm.build" name="build" rel="ManyToOneRel"><None></None></field>
+    <field to="orm.recipe" name="recipe" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="name">a custom image pkg</field>
+    <field type="CharField" name="installed_name"></field>
+    <field type="CharField" name="version"></field>
+    <field type="CharField" name="revision"></field>
+    <field type="TextField" name="summary"></field>
+    <field type="TextField" name="description"></field>
+    <field type="IntegerField" name="size">10</field>
+    <field type="IntegerField" name="installed_size">0</field>
+    <field type="CharField" name="section"></field>
+    <field type="CharField" name="license">h license</field>
+  </object>
+  <object pk="4" model="orm.package">
+    <field to="orm.build" name="build" rel="ManyToOneRel"><None></None></field>
+    <field to="orm.recipe" name="recipe" rel="ManyToOneRel">2</field>
+    <field type="CharField" name="name">z custom image pkg</field>
+    <field type="CharField" name="installed_name"></field>
+    <field type="CharField" name="version"></field>
+    <field type="CharField" name="revision"></field>
+    <field type="TextField" name="summary"></field>
+    <field type="TextField" name="description"></field>
+    <field type="IntegerField" name="size">5</field>
+    <field type="IntegerField" name="installed_size">0</field>
+    <field type="CharField" name="section"></field>
+    <field type="CharField" name="license">z license</field>
+  </object>
+  <object pk="5" model="orm.package">
+    <field to="orm.build" name="build" rel="ManyToOneRel">1</field>
+    <field to="orm.recipe" name="recipe" rel="ManyToOneRel">4</field>
+    <field type="CharField" name="name">a custom image pkg</field>
+    <field type="CharField" name="installed_name"></field>
+    <field type="CharField" name="version"></field>
+    <field type="CharField" name="revision"></field>
+    <field type="TextField" name="summary"></field>
+    <field type="TextField" name="description"></field>
+    <field type="IntegerField" name="size">2</field>
+    <field type="IntegerField" name="installed_size">0</field>
+    <field type="CharField" name="section"></field>
+    <field type="CharField" name="license">h licence</field>
+  </object>
+  <object pk="1" model="orm.target_installed_package">
+    <field to="orm.target" name="target" rel="ManyToOneRel">1</field>
+    <field to="orm.package" name="package" rel="ManyToOneRel">1</field>
+  </object>
+  <object pk="2" model="orm.target_installed_package">
+    <field to="orm.target" name="target" rel="ManyToOneRel">1</field>
+    <field to="orm.package" name="package" rel="ManyToOneRel">2</field>
+  </object>
+  <object pk="3" model="orm.target_installed_package">
+    <field to="orm.target" name="target" rel="ManyToOneRel">1</field>
+    <field to="orm.package" name="package" rel="ManyToOneRel">3</field>
+  </object>
+  <!-- Note that these augment the existing orm.package of the same pk -->
+  <object pk="4" model="orm.customimagepackage">
+    <field to="orm.customimagerecipe" name="recipe_includes" rel="ManyToManyRel"></field>
+    <field to="orm.customimagerecipe" name="recipe_excludes" rel="ManyToManyRel"></field>
+    <field to="orm.customimagerecipe" name="recipe_appends" rel="ManyToManyRel"><object pk="3"></object></field>
+  </object>
+  <object pk="5" model="orm.customimagepackage">
+    <field to="orm.customimagerecipe" name="recipe_includes" rel="ManyToManyRel"></field>
+    <field to="orm.customimagerecipe" name="recipe_excludes" rel="ManyToManyRel"></field>
+    <field to="orm.customimagerecipe" name="recipe_appends" rel="ManyToManyRel"><object pk="3"></object></field>
+  </object>
+  <object pk="1" model="orm.recipe">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field type="CharField" name="name">z recipe</field>
+    <field type="CharField" name="version">5.2</field>
+    <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field>
+    <field type="TextField" name="summary">z recipe</field>
+    <field type="TextField" name="description">z recipe</field>
+    <field type="CharField" name="section">z section</field>
+    <field type="CharField" name="license">z license</field>
+    <field type="CharField" name="homepage"></field>
+    <field type="CharField" name="bugtracker"></field>
+    <field type="FilePathField" name="file_path"></field>
+    <field type="CharField" name="pathflags"></field>
+    <field type="BooleanField" name="is_image">False</field>
+  </object>
+  <object pk="2" model="orm.recipe">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field type="CharField" name="name">a recipe</field>
+    <field type="CharField" name="version">1.2</field>
+    <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">1</field>
+    <field type="TextField" name="summary">a recipe</field>
+    <field type="TextField" name="description">a recipe</field>
+    <field type="CharField" name="section">a section</field>
+    <field type="CharField" name="license">a license</field>
+    <field type="CharField" name="homepage"></field>
+    <field type="CharField" name="bugtracker"></field>
+    <field type="FilePathField" name="file_path">a_recipe.bb</field>
+    <field type="CharField" name="pathflags"></field>
+    <field type="BooleanField" name="is_image">False</field>
+  </object>
+  <object pk="3" model="orm.recipe">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field type="CharField" name="name">a custom recipe</field>
+    <field type="CharField" name="version"></field>
+    <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field>
+    <field type="TextField" name="summary"></field>
+    <field type="TextField" name="description"></field>
+    <field type="CharField" name="section"></field>
+    <field type="CharField" name="license"></field>
+    <field type="CharField" name="homepage"></field>
+    <field type="CharField" name="bugtracker"></field>
+    <field type="FilePathField" name="file_path">custr</field>
+    <field type="CharField" name="pathflags"></field>
+    <field type="BooleanField" name="is_image">False</field>
+  </object>
+  <object pk="4" model="orm.recipe">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field type="CharField" name="name">a image recipe</field>
+    <field type="CharField" name="version">1.2</field>
+    <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">1</field>
+    <field type="TextField" name="summary">one recipe</field>
+    <field type="TextField" name="description">recipe</field>
+    <field type="CharField" name="section">A</field>
+    <field type="CharField" name="license">A</field>
+    <field type="CharField" name="homepage"></field>
+    <field type="CharField" name="bugtracker"></field>
+    <field type="FilePathField" name="file_path">/one/</field>
+    <field type="CharField" name="pathflags"></field>
+    <field type="BooleanField" name="is_image">True</field>
+  </object>
+  <object pk="5" model="orm.recipe">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field type="CharField" name="name">z image recipe</field>
+    <field type="CharField" name="version">1.3</field>
+    <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field>
+    <field type="TextField" name="summary">two image recipe</field>
+    <field type="TextField" name="description">recipe two</field>
+    <field type="CharField" name="section">B</field>
+    <field type="CharField" name="license">Z</field>
+    <field type="CharField" name="homepage"></field>
+    <field type="CharField" name="bugtracker"></field>
+    <field type="FilePathField" name="file_path">/two/</field>
+    <field type="CharField" name="pathflags"></field>
+    <field type="BooleanField" name="is_image">True</field>
+  </object>
+  <object pk="6" model="orm.recipe">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field type="CharField" name="name">z custom recipe</field>
+    <field type="CharField" name="version"></field>
+    <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field>
+    <field type="TextField" name="summary"></field>
+    <field type="TextField" name="description"></field>
+    <field type="CharField" name="section"></field>
+    <field type="CharField" name="license"></field>
+    <field type="CharField" name="homepage"></field>
+    <field type="CharField" name="bugtracker"></field>
+    <field type="FilePathField" name="file_path">zzzz</field>
+    <field type="CharField" name="pathflags"></field>
+    <field type="BooleanField" name="is_image">False</field>
+  </object>
+  <object pk="1" model="orm.machine">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="name">a machine</field>
+    <field type="CharField" name="description">a machine</field>
+  </object>
+  <object pk="2" model="orm.machine">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field>
+    <field type="CharField" name="name">z machine</field>
+    <field type="CharField" name="description">z machine</field>
+  </object>
+  <object pk="3" model="orm.machine">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="name">g machine</field>
+    <field type="CharField" name="description">g machine</field>
+  </object>
+  <object pk="1" model="orm.layersource">
+    <field type="CharField" name="name">local</field>
+    <field type="IntegerField" name="sourcetype">1</field>
+    <field type="CharField" name="apiurl"></field>
+  </object>
+  <object pk="1" model="orm.bitbakeversion">
+    <field type="CharField" name="name">test bbv</field>
+    <field type="CharField" name="giturl">/tmp/</field>
+    <field type="CharField" name="branch">master</field>
+    <field type="CharField" name="dirpath"></field>
+  </object>
+  <object pk="1" model="orm.release">
+    <field type="CharField" name="name">test release</field>
+    <field type="CharField" name="description"></field>
+    <field to="orm.bitbakeversion" name="bitbake_version" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="branch_name">master</field>
+    <field type="TextField" name="helptext"><None></None></field>
+  </object>
+  <object pk="2" model="orm.release">
+    <field type="CharField" name="name">test release 2</field>
+    <field type="CharField" name="description"></field>
+    <field to="orm.bitbakeversion" name="bitbake_version" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="branch_name">master</field>
+    <field type="TextField" name="helptext"><None></None></field>
+  </object>
+  <object pk="1" model="orm.releaselayersourcepriority">
+    <field to="orm.release" name="release" rel="ManyToOneRel">1</field>
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field>
+    <field type="IntegerField" name="priority">0</field>
+  </object>
+  <object pk="1" model="orm.branch">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field type="CharField" name="name">master</field>
+    <field type="CharField" name="short_description"></field>
+  </object>
+  <object pk="1" model="orm.layer">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field type="CharField" name="name">a layer</field>
+    <field type="CharField" name="layer_index_url"></field>
+    <field type="CharField" name="vcs_url">/tmp/</field>
+    <field type="CharField" name="vcs_web_url"><None></None></field>
+    <field type="CharField" name="vcs_web_tree_base_url"><None></None></field>
+    <field type="CharField" name="vcs_web_file_base_url"><None></None></field>
+    <field type="TextField" name="summary"><None></None></field>
+    <field type="TextField" name="description"><None></None></field>
+  </object>
+  <object pk="2" model="orm.layer">
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field type="CharField" name="name">z layer</field>
+    <field type="CharField" name="layer_index_url"></field>
+    <field type="CharField" name="vcs_url">git://two/</field>
+    <field type="CharField" name="vcs_web_url"><None></None></field>
+    <field type="CharField" name="vcs_web_tree_base_url"><None></None></field>
+    <field type="CharField" name="vcs_web_file_base_url"><None></None></field>
+    <field type="TextField" name="summary"><None></None></field>
+    <field type="TextField" name="description"><None></None></field>
+  </object>
+  <object pk="1" model="orm.layer_version">
+    <field to="orm.build" name="build" rel="ManyToOneRel"><None></None></field>
+    <field to="orm.layer" name="layer" rel="ManyToOneRel">1</field>
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field to="orm.branch" name="up_branch" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="branch"></field>
+    <field type="CharField" name="commit">master</field>
+    <field type="CharField" name="dirpath">/tmp/</field>
+    <field type="IntegerField" name="priority">0</field>
+    <field type="FilePathField" name="local_path">/</field>
+    <field to="orm.project" name="project" rel="ManyToOneRel">1</field>
+  </object>
+  <object pk="2" model="orm.layer_version">
+    <field to="orm.build" name="build" rel="ManyToOneRel"><None></None></field>
+    <field to="orm.layer" name="layer" rel="ManyToOneRel">2</field>
+    <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field>
+    <field type="IntegerField" name="up_id"><None></None></field>
+    <field type="DateTimeField" name="up_date"><None></None></field>
+    <field to="orm.branch" name="up_branch" rel="ManyToOneRel">1</field>
+    <field type="CharField" name="branch"></field>
+    <field type="CharField" name="commit">master</field>
+    <field type="CharField" name="dirpath"><None></None></field>
+    <field type="IntegerField" name="priority">0</field>
+    <field type="FilePathField" name="local_path">/</field>
+    <field to="orm.project" name="project" rel="ManyToOneRel"><None></None></field>
+  </object>
+  <object pk="1" model="orm.projectlayer">
+    <field to="orm.project" name="project" rel="ManyToOneRel">1</field>
+    <field to="orm.layer_version" name="layercommit" rel="ManyToOneRel">1</field>
+    <field type="BooleanField" name="optional">True</field>
+  </object>
+  <object pk="3" model="orm.customimagerecipe">
+    <field to="orm.recipe" name="base_recipe" rel="ManyToOneRel">2</field>
+    <field to="orm.project" name="project" rel="ManyToOneRel">1</field>
+    <field type="DateTimeField" name="last_updated"><None></None></field>
+  </object>
+  <object pk="6" model="orm.customimagerecipe">
+    <field to="orm.recipe" name="base_recipe" rel="ManyToOneRel">4</field>
+    <field to="orm.project" name="project" rel="ManyToOneRel">1</field>
+    <field type="DateTimeField" name="last_updated"><None></None></field>
+  </object>
+  <object pk="1" model="orm.logmessage">
+    <field to="orm.build" name="build" rel="ManyToOneRel">2</field>
+    <field to="orm.task" name="task" rel="ManyToOneRel"><None></None></field>
+    <field type="IntegerField" name="level">1</field>
+    <field type="TextField" name="message"><None></None></field>
+    <field type="FilePathField" name="pathname"></field>
+    <field type="IntegerField" name="lineno"><None></None></field>
+  </object>
+  <object pk="2" model="orm.logmessage">
+    <field to="orm.build" name="build" rel="ManyToOneRel">2</field>
+    <field to="orm.task" name="task" rel="ManyToOneRel"><None></None></field>
+    <field type="IntegerField" name="level">2</field>
+    <field type="TextField" name="message"><None></None></field>
+    <field type="FilePathField" name="pathname"></field>
+    <field type="IntegerField" name="lineno"><None></None></field>
+  </object>
+</django-objects>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/css/default.css b/yocto-poky/bitbake/lib/toaster/toastergui/static/css/default.css
index bc8a97b..b024d96 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/static/css/default.css
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/css/default.css
@@ -10,7 +10,6 @@
 
 /* Style the breadcrumb */
 .breadcrumb { display: inline-block; background-color: transparent; }
-.breadcrumb li:first-child { padding-right: 10px; }
 
 /* Styles for the help information */
 .get-help { color: #CCCCCC; }
@@ -51,6 +50,7 @@
 /* Style the filter modal dialogs */
 .modal { width: 800px; margin-left: -400px; }
 .modal-footer .btn { float: left; }
+.modal-body { max-height: 300px; }
 
 /* Hover style for the clear search icon */
 .icon-remove-sign:hover { color: #999999; cursor: pointer; }
@@ -114,6 +114,7 @@
 /* Styles for the navbar actions */
 .btn-group + .btn-group { margin-right: 10px; }
 .navbar-inner > .btn-group { margin-top: 6px; }
+[id^="search-input-"], #search { width: 80%; }
 
 /* Styles for the parent item in the left navigation */
 
@@ -153,6 +154,9 @@
 /* make tables Chrome-happy (me, not so much) */
 table { table-layout: fixed; word-wrap: break-word; }
 
+table p { margin-bottom: 0 }
+.table td { vertical-align: middle; }
+
 /* styles for the new build button */
 .new-build .btn-primary { padding: 4px 30px; }
 .new-build .alert { margin-top: 10px; }
@@ -194,7 +198,7 @@
 .configuration-alert p { margin-bottom: 0px; }
 .project-form { margin-top: 10px; }
 .add-layers .btn-block + .btn-block, .build .btn-block + .btn-block { margin-top: 0px; }
-input.huge { font-size: 17.5px; padding: 11px 19px; }
+input.huge { font-size: 17.5px; padding: 11px; min-width: 60%; }
 .build-form { margin-bottom: 0px; }
 .build-form .input-append { margin-bottom: 0px; }
 .build-form .btn-large { padding: 11px 35px; }
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/css/qunit-1.18.0.css b/yocto-poky/bitbake/lib/toaster/toastergui/static/css/qunit-1.18.0.css
new file mode 100644
index 0000000..28cca1c
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/css/qunit-1.18.0.css
@@ -0,0 +1 @@
+/**//**/#qunit-tests,#qunit-header,#qunit-banner,#qunit-testrunner-toolbar,#qunit-userAgent,#qunit-testresult{font-family:"Helvetica Neue Light","HelveticaNeue-Light","Helvetica Neue",Calibri,Helvetica,Arial,sans-serif;}#qunit-testrunner-toolbar,#qunit-userAgent,#qunit-testresult,#qunit-tests li{font-size:small;}#qunit-tests{font-size:smaller;}/**/#qunit-tests,#qunit-header,#qunit-banner,#qunit-userAgent,#qunit-testresult,#qunit-modulefilter{margin:0;padding:0;}/**/#qunit-header{padding:0.5em 0 0.5em 1em;color:#8699A4;background-color:#0D3349;font-size:1.5em;line-height:1em;font-weight:400;border-radius:5px 5px 0 0;}#qunit-header a{text-decoration:none;color:#C2CCD1;}#qunit-header a:hover,#qunit-header a:focus{color:#FFF;}#qunit-testrunner-toolbar label{display:inline-block;padding:0 0.5em 0 0.1em;}#qunit-banner{height:5px;}#qunit-testrunner-toolbar{padding:0.5em 1em 0.5em 1em;color:#5E740B;background-color:#EEE;overflow:hidden;}#qunit-userAgent{padding:0.5em 1em 0.5em 1em;background-color:#2B81AF;color:#FFF;text-shadow:rgba(0,0,0,0.5) 2px 2px 1px;}#qunit-modulefilter-container{float:right;padding:0.2em;}.qunit-url-config{display:inline-block;padding:0.1em;}.qunit-filter{display:block;float:right;margin-left:1em;}/**/#qunit-tests{list-style-position:inside;}#qunit-tests li{padding:0.4em 1em 0.4em 1em;border-bottom:1px solid #FFF;list-style-position:inside;}#qunit-tests>li{display:none;}#qunit-tests li.running,#qunit-tests li.pass,#qunit-tests li.fail,#qunit-tests li.skipped{display:list-item;}#qunit-tests.hidepass li.running,#qunit-tests.hidepass li.pass{visibility:hidden;position:absolute;width:0px;height:0px;padding:0;border:0;margin:0;}#qunit-tests li strong{cursor:pointer;}#qunit-tests li.skipped strong{cursor:default;}#qunit-tests li a{padding:0.5em;color:#C2CCD1;text-decoration:none;}#qunit-tests li p a{padding:0.25em;color:#6B6464;}#qunit-tests li a:hover,#qunit-tests li a:focus{color:#000;}#qunit-tests li .runtime{float:right;font-size:smaller;}.qunit-assert-list{margin-top:0.5em;padding:0.5em;background-color:#FFF;border-radius:5px;}.qunit-collapsed{display:none;}#qunit-tests table{border-collapse:collapse;margin-top:0.2em;}#qunit-tests th{text-align:right;vertical-align:top;padding:0 0.5em 0 0;}#qunit-tests td{vertical-align:top;}#qunit-tests pre{margin:0;white-space:pre-wrap;word-wrap:break-word;}#qunit-tests del{background-color:#E0F2BE;color:#374E0C;text-decoration:none;}#qunit-tests ins{background-color:#FFCACA;color:#500;text-decoration:none;}/**/#qunit-tests b.counts{color:#000;}#qunit-tests b.passed{color:#5E740B;}#qunit-tests b.failed{color:#710909;}#qunit-tests li li{padding:5px;background-color:#FFF;border-bottom:none;list-style-position:inside;}/**/#qunit-tests li li.pass{color:#3C510C;background-color:#FFF;border-left:10px solid #C6E746;}#qunit-tests .pass{color:#528CE0;background-color:#D2E0E6;}#qunit-tests .pass .test-name{color:#366097;}#qunit-tests .pass .test-actual,#qunit-tests .pass .test-expected{color:#999;}#qunit-banner.qunit-pass{background-color:#C6E746;}/**/#qunit-tests li li.fail{color:#710909;background-color:#FFF;border-left:10px solid #EE5757;white-space:pre;}#qunit-tests>li:last-child{border-radius:0 0 5px 5px;}#qunit-tests .fail{color:#000;background-color:#EE5757;}#qunit-tests .fail .test-name,#qunit-tests .fail .module-name{color:#000;}#qunit-tests .fail .test-actual{color:#EE5757;}#qunit-tests .fail .test-expected{color:#008000;}#qunit-banner.qunit-fail{background-color:#EE5757;}/**/#qunit-tests .skipped{background-color:#EBECE9;}#qunit-tests .qunit-skipped-label{background-color:#F4FF77;display:inline-block;font-style:normal;color:#366097;line-height:1.8em;padding:0 0.5em;margin:-0.4em 0.4em -0.4em 0;}/**/#qunit-testresult{padding:0.5em 1em 0.5em 1em;color:#2B81AF;background-color:#D2E0E6;border-bottom:1px solid #FFF;}#qunit-testresult .module-name{font-weight:700;}/**/#qunit-fixture{position:absolute;top:-10000px;left:-10000px;width:1000px;height:1000px;}
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/base.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/base.js
deleted file mode 100644
index ed22a4e..0000000
--- a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/base.js
+++ /dev/null
@@ -1,229 +0,0 @@
-'use strict';
-
-function basePageInit(ctx) {
-
-  var newBuildButton = $("#new-build-button");
-  var newBuildTargetInput;
-  var newBuildTargetBuildBtn;
-  var projectNameForm = $("#project-name-change-form");
-  var projectNameContainer = $("#project-name-container");
-  var projectName = $("#project-name");
-  var projectNameFormToggle = $("#project-change-form-toggle");
-  var projectNameChangeCancel = $("#project-name-change-cancel");
-
-  /* initially the current project is used unless overridden by the new build
-   * button in top right nav
-   */
-  var selectedProject = libtoaster.ctx;
-
-  var selectedTarget;
-
-  var newBuildProjectInput = $("#new-build-button #project-name-input");
-  var newBuildProjectSaveBtn = $("#new-build-button #save-project-button");
-
-  /* Project name change functionality */
-  projectNameFormToggle.click(function(e){
-    e.preventDefault();
-    projectNameContainer.hide();
-    projectNameForm.fadeIn();
-  });
-
-  projectNameChangeCancel.click(function(e){
-    e.preventDefault();
-    projectNameForm.hide();
-    projectNameContainer.fadeIn();
-  });
-
-  $("#project-name-change-btn").click(function(e){
-    var newProjectName = $("#project-name-change-input").val();
-
-    libtoaster.editCurrentProject({ projectName: newProjectName }, function (){
-      projectName.html(newProjectName);
-      libtoaster.ctx.projectName = newProjectName;
-      projectNameChangeCancel.click();
-    });
-  });
-
-  _checkProjectBuildable();
-
-  $("#project-topbar .nav li a").each(function(){
-    if (window.location.pathname === $(this).attr('href'))
-      $(this).parent().addClass('active');
-    else
-      $(this).parent().removeClass('active');
-  });
-
-  if ($(".total-builds").length !== 0){
-    libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){
-      if (prjInfo.completedbuilds)
-        $(".total-builds").text(prjInfo.completedbuilds.length);
-    });
-  }
-
-  /* Hide the button if we're on the project,newproject or importlyaer page
-   * or if there are no projects yet defined
-   * only show if there isn't already a build-target-input already
-   */
-  if (ctx.numProjects > 0 &&
-      ctx.currentUrl.search('newproject') < 0 &&
-      $(".build-target-input").length === 1) {
-
-    newBuildTargetInput = $("#new-build-button .build-target-input");
-    newBuildTargetBuildBtn = $("#new-build-button").find(".build-button");
-
-    _setupNewBuildButton();
-    newBuildButton.show();
-  } else if ($(".build-target-input").length > 0) {
-    newBuildTargetInput = $("#project-topbar .build-target-input");
-    newBuildTargetBuildBtn = $("#project-topbar .build-button");
-  } else {
-    return;
-  }
-
-  /* Hide the change project icon when there is only one project */
-  if (ctx.numProjects === 1) {
-    $('#project .icon-pencil').hide();
-  }
-
-  /* If we have a project setup the typeahead */
-  if (selectedProject.recipesTypeAheadUrl){
-    libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.recipesTypeAheadUrl, { format: "json" }, function (item) {
-      selectedTarget = item;
-      newBuildTargetBuildBtn.removeAttr("disabled");
-    });
-  }
-
-  newBuildTargetInput.on('input', function () {
-    if ($(this).val().length === 0) {
-      newBuildTargetBuildBtn.attr("disabled", "disabled");
-    } else {
-      newBuildTargetBuildBtn.removeAttr("disabled");
-    }
-  });
-
-  newBuildTargetBuildBtn.click(function (e) {
-    e.preventDefault();
-
-    if (!newBuildTargetInput.val()) {
-      return;
-    }
-
-    /* We use the value of the input field so as to maintain any command also
-     * added e.g. core-image-minimal:clean
-     */
-    selectedTarget = { name: newBuildTargetInput.val() };
-
-    /* Fire off the build */
-    libtoaster.startABuild(selectedProject.projectBuildsUrl,
-      selectedProject.projectId, selectedTarget.name, function(){
-      window.location.replace(selectedProject.projectBuildsUrl);
-    }, null);
-  });
-
-  function _checkProjectBuildable() {
-    if (selectedProject.projectId === undefined || selectedProject.projectIsDefault) {
-      return;
-    }
-
-    libtoaster.getProjectInfo(selectedProject.projectPageUrl,
-      function (data) {
-        if (data.machine === null || data.machine.name === undefined || data.layers.length === 0) {
-          /* we can't build anything without a machine and some layers */
-          $("#new-build-button #targets-form").hide();
-          $("#new-build-button .alert").show();
-        } else {
-          $("#new-build-button #targets-form").show();
-          $("#new-build-button .alert").hide();
-
-          /* we can build this project; enable input fields */
-          newBuildTargetInput.removeAttr("disabled");
-       }
-      }, null);
-  }
-
-  /* Setup New build button in the top nav bar */
-  function _setupNewBuildButton() {
-
-    /* If we don't have a current project then present the set project
-     * form.
-     */
-    if (selectedProject.projectId === undefined || selectedProject.projectIsDefault) {
-      $('#change-project-form').show();
-      $('#project .icon-pencil').hide();
-    }
-
-    libtoaster.makeTypeahead(newBuildProjectInput, selectedProject.projectsTypeAheadUrl, { format : "json" }, function (item) {
-      /* successfully selected a project */
-      newBuildProjectSaveBtn.removeAttr("disabled");
-      selectedProject = item;
-    });
-
-    /* Any typing in the input apart from enter key is going to invalidate
-     * the value that has been set by selecting a suggestion from the typeahead
-     */
-    newBuildProjectInput.on('input', function (event) {
-      if (event.keyCode === 13) {
-        return;
-      }
-      newBuildProjectSaveBtn.attr("disabled", "disabled");
-    });
-
-
-    newBuildProjectSaveBtn.click(function () {
-      selectedProject.projectId = selectedProject.id;
-      /* Update the typeahead project_id paramater */
-      _checkProjectBuildable();
-
-      newBuildTargetInput.removeAttr("disabled");
-
-      /* We've got a new project so now we need to update the
-       * target urls. We can get this from the new project's info
-       */
-      $.getJSON(selectedProject.projectPageUrl, { format: "json" },
-        function(projectInfo){
-          /* Update the typeahead to use the new selectedProject */
-          selectedProject = projectInfo;
-
-          libtoaster.makeTypeahead(newBuildTargetInput, selectedProject.recipesTypeAheadUrl, { format: "json" }, function (item) {
-              /* successfully selected a target */
-              selectedTarget = item;
-              newBuildTargetBuildBtn.removeAttr("disabled");
-          });
-
-      });
-      newBuildTargetInput.val("");
-
-      /* set up new form aspect */
-      $("#new-build-button #project a").text(selectedProject.name).attr('href', selectedProject.projectPageUrl);
-      $("#new-build-button .alert a").attr('href', selectedProject.projectPageUrl);
-      $("#project .icon-pencil").show();
-
-      $("#change-project-form").slideUp({ 'complete' : function () {
-          $("#new-build-button #project").show();
-      }});
-    });
-
-    $('#new-build-button #project .icon-pencil').click(function () {
-      newBuildProjectSaveBtn.attr("disabled", "disabled");
-      newBuildProjectInput.val($("#new-build-button #project a").text());
-      $("#cancel-change-project").show();
-      $(this).parent().hide();
-      $("#change-project-form").slideDown();
-    });
-
-    $("#new-build-button #cancel-change-project").click(function () {
-      $("#change-project-form").hide(function () {
-        $('#new-build-button #project').show();
-      });
-
-      newBuildProjectInput.val("");
-      newBuildProjectSaveBtn.attr("disabled", "disabled");
-    });
-
-    /* Keep the dropdown open even unless we click outside the dropdown area */
-    $(".new-build").click (function (event) {
-      event.stopPropagation();
-    });
-  };
-
-}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/customrecipe.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/customrecipe.js
index 4f6b304..1c0ef9e 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/customrecipe.js
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/customrecipe.js
@@ -3,48 +3,282 @@
 function customRecipePageInit(ctx) {
 
   var urlParams = libtoaster.parseUrlParams();
+  var customiseTable = $("#selectpackagestable");
+  var addPkgDepsModalBtn = $("#add-package-deps-modal-btn");
+  var rmdPkgReverseDepsModalBtn = $("#rm-package-reverse-deps-modal-btn");
 
-  (function notificationRequest(){
-    if (urlParams.hasOwnProperty('notify') && urlParams.notify === 'new'){
-      $("#image-created-notification").show();
-    }
-  })();
+  if (urlParams.hasOwnProperty('notify') && urlParams.notify === 'new'){
+    $("#image-created-notification").show();
+  }
 
-  $("#recipeselection").on('table-done', function(e, total, tableParams){
+  customiseTable.on('table-done', function(e, total){
     /* Table is done so now setup the click handler for the package buttons */
     $(".add-rm-package-btn").click(function(e){
       e.preventDefault();
-      addRemovePackage($(this), tableParams);
+      var targetPkg = $(this).data();
+
+       checkPackageDeps(targetPkg, function(pkgData){
+         if (targetPkg.directive === 'add'){
+           /* If we're adding a package we may need to show the modal to advise
+            * on dependencies for this package.
+            */
+           if (pkgData.unsatisfied_dependencies.length === 0){
+             addRemovePackage(targetPkg);
+           } else {
+             showPackageDepsModal(targetPkg, pkgData);
+           }
+         } else if (targetPkg.directive === 'remove') {
+           if (pkgData.reverse_dependencies.length === 0){
+             addRemovePackage(targetPkg);
+           } else {
+             showPackageReverseDepsModal(targetPkg, pkgData);
+           }
+           }
+        });
     });
   });
 
-  function addRemovePackage(pkgBtn, tableParams){
-    var pkgBtnData = pkgBtn.data();
-    var method;
-    var buttonToShow;
+  function checkPackageDeps(targetPkg, doneCb){
+    $.ajax({
+        type: 'GET',
+        url: targetPkg.packageUrl,
+        headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+        success: function(data){
+          if (data.error !== 'ok'){
+            console.warn(data.error);
+            return;
+          }
+          doneCb(data);
+        }
+    });
+  }
 
-    if (pkgBtnData.directive == 'add') {
+  function showPackageDepsModal(targetPkg, pkgData){
+    var modal = $("#package-deps-modal");
+    var depsList = modal.find("#package-add-dep-list");
+    var deps = pkgData.unsatisfied_dependencies;
+
+    modal.find(".package-to-add-name").text(targetPkg.name);
+
+    depsList.text("");
+
+    for (var i in deps){
+      var li = $('<li></li>').text(deps[i].name);
+      li.append($('<span></span>').text(" ("+
+            deps[i].size_formatted+")"));
+      depsList.append(li);
+    }
+
+    modal.find("#package-deps-total-size").text(
+      pkgData.unsatisfied_dependencies_size_formatted);
+
+    targetPkg.depsAdded = deps;
+
+    addPkgDepsModalBtn.data(targetPkg);
+    modal.modal('show');
+  }
+
+  addPkgDepsModalBtn.click(function(e){
+    e.preventDefault();
+
+    addRemovePackage($(this).data(), null);
+  });
+
+  function showPackageReverseDepsModal(targetPkg, pkgData){
+    var modal = $("#package-reverse-deps-modal");
+    var depsList = modal.find("#package-reverse-dep-list");
+    var deps = pkgData.reverse_dependencies;
+
+    var depsCount = deps.length;
+    var vDepends = "depends";
+    var vPackage = "package";
+    var vThis = "this";
+    if (depsCount > 1) {
+      vDepends = "depend";
+      vPackage = "packages";
+      vThis = "these";
+    }
+    modal.find(".package-to-rm-name").text(targetPkg.name);
+    modal.find(".reverse-deps-count").text(depsCount);
+    modal.find(".reverse-deps-count-plus1").text((depsCount+1) + " packages");
+    modal.find(".reverse-deps-depends").text(vDepends);
+    modal.find(".reverse-deps-package").text(vPackage);
+    modal.find(".reverse-deps-this").text(vThis);
+
+    depsList.text("");
+
+    for (var i in deps){
+      var li = $('<li></li>').text(deps[i].name);
+      li.append($('<span></span>').text(" ("+
+            deps[i].size_formatted+")"));
+      depsList.append(li);
+    }
+
+    modal.find("#package-reverse-deps-total-size").text(
+      pkgData.reverse_dependencies_size_formatted);
+
+    targetPkg.depsRemoved = deps;
+
+    rmdPkgReverseDepsModalBtn.data(targetPkg);
+    modal.modal('show');
+  }
+
+  rmdPkgReverseDepsModalBtn.click(function(e){
+    e.preventDefault();
+
+    addRemovePackage($(this).data(), null);
+  });
+
+
+  function addRemovePackage(targetPkg, tableParams){
+    var method;
+    var msg = "You have ";
+
+    var btnCell = $("#package-btn-cell-" + targetPkg.id);
+    var inlineNotify = btnCell.children(".inline-notification");
+
+    var i;
+    var dep;
+    var depBtnCell;
+
+    if (targetPkg.directive === 'add') {
       method = 'PUT';
-      buttonToShow = '#package-rm-btn-' + pkgBtnData.package;
-    } else if (pkgBtnData.directive == 'remove') {
+      /* If the package had dependencies also notify that they were added */
+      if (targetPkg.hasOwnProperty('depsAdded') &&
+        targetPkg.depsAdded.length > 0) {
+
+        msg += "added ";
+        msg += "<strong>" + (targetPkg.depsAdded.length + 1) + "</strong>";
+        msg += " packages to " + ctx.recipe.name + ": ";
+        msg += "<strong>" + targetPkg.name + "</strong> and its dependencies";
+
+        for (i in targetPkg.depsAdded){
+          dep = targetPkg.depsAdded[i];
+
+          msg += " <strong>" + dep.name + "</strong>";
+
+          /* Add any cells currently in view to the list of cells which get
+           * an inline notification inside them and which change add/rm state
+           */
+          depBtnCell = $("#package-btn-cell-" + dep.pk);
+          btnCell = btnCell.add(depBtnCell);
+
+          inlineNotify = inlineNotify.add(
+            depBtnCell.children(".inline-notification"));
+        }
+
+        inlineNotify.text(
+          (targetPkg.depsAdded.length + 1) + " packages added");
+
+      } else {
+        msg += "added <strong>1</strong>";
+        msg += " package to " + ctx.recipe.name + ": ";
+        msg += "<strong>" + targetPkg.name + "</strong>";
+        inlineNotify.text("1 package added");
+      }
+
+    } else if (targetPkg.directive === 'remove') {
       method = 'DELETE';
-      buttonToShow = '#package-add-btn-' + pkgBtnData.package;
+      var numPackageString = "1 package ";
+      var revDepList = "";
+      if (targetPkg.hasOwnProperty('depsRemoved') &&
+              targetPkg.depsRemoved.length > 0) {
+        var depsRemovedLength = targetPkg.depsRemoved.length;
+        var ending = "y: ";
+        var maxRevDepsDisplayed  = 5;
+        var d = 0;
+        if (depsRemovedLength > 1) {
+            ending = "ies: ";
+        }
+        numPackageString = (depsRemovedLength + 1) + " packages";
+        revDepList = " and its " + depsRemovedLength + " reverse dependenc" + ending;
+        for (i in targetPkg.depsRemoved){
+          /* include up to maxRevDepsDisplayed rev deps on the page notification */
+          var notShownCount = depsRemovedLength - maxRevDepsDisplayed;
+          dep = targetPkg.depsRemoved[i];
+          if (d < maxRevDepsDisplayed) {
+            if (d > 0) {
+                revDepList += ", ";
+            }
+            revDepList += dep.name;
+            d++;
+            if ((d === maxRevDepsDisplayed) && (notShownCount > 0)) {
+                revDepList += " and " + notShownCount + " more";
+            }
+          }
+
+          /* Add any cells currently in view to the list of cells which get
+           * an inline notification inside them and which change add/rm state
+           */
+          depBtnCell = $("#package-btn-cell-" + dep.pk);
+          btnCell = btnCell.add(depBtnCell);
+
+          inlineNotify = inlineNotify.add(
+            depBtnCell.children(".inline-notification"));
+        }
+      }
+      msg+= "removed " + numPackageString + " from " + ctx.recipe.name + ":";
+      msg += " <strong>" + targetPkg.name + "</strong>";
+      msg += revDepList;
+
+      inlineNotify.text(numPackageString + " removed");
     } else {
       throw("Unknown package directive: should be add or remove");
     }
 
     $.ajax({
         type: method,
-        url: pkgBtnData.packageUrl,
+        url: targetPkg.packageUrl,
         headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
         success: function(data){
-          /* Invalidate the Add | Rm package table's current cache */
-          tableParams.nocache = true;
-          $.get(ctx.tableApiUrl, tableParams);
-          /* Swap the buttons around */
-          pkgBtn.hide();
-          $(buttonToShow).show();
+          if (data.error !== 'ok'){
+            console.warn(data.error);
+            return;
+          }
+
+          libtoaster.showChangeNotification(msg);
+
+          /* do the in-cell/inline notification to swap buttoms from add to
+           * remove
+           */
+          btnCell.children("button").fadeOut().promise().done(function(){
+            inlineNotify.fadeIn().delay(500).fadeOut(function(){
+              if (targetPkg.directive === 'add')
+                btnCell.children("button[data-directive=remove]").fadeIn();
+              else
+                btnCell.children("button[data-directive=add]").fadeIn();
+            });
+          });
+
+          /* Update the total num packages */
+          $.ajax({
+            type: "GET",
+            url: ctx.recipe.xhrPackageListUrl,
+            headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+            success: function(data){
+              console.log(data);
+              $("#total-num-packages").text(data.total);
+              $("#total-size-packages").text(data.total_size_formatted);
+            }
+          });
         }
     });
   }
+
+  $("#no-results-show-all-packages").click(function(){
+    $(".no-results-search-input").val("");
+  });
+
+  $("#no-results-remove-search-btn").click(function(){
+      $(".no-results-search-input").val("");
+      $(this).hide();
+  });
+
+  /* Trigger a build of your custom image */
+  $(".build-custom-image").click(function(){
+    libtoaster.startABuild(null, ctx.recipe.name,
+      function(){
+        window.location.replace(libtoaster.ctx.projectBuildsUrl);
+    });
+  });
 }
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/importlayer.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/importlayer.js
index c68f366..5a59799 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/importlayer.js
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/importlayer.js
@@ -18,10 +18,38 @@
 
   libtoaster.makeTypeahead(layerDepInput, libtoaster.ctx.layersTypeAheadUrl, { include_added: "true" }, function(item){
     currentLayerDepSelection = item;
-
-    layerDepBtn.removeAttr("disabled");
   });
 
+  // choices available in the typeahead
+  var layerDepsChoices = {};
+
+  // when the typeahead choices change, store an array of the available layer
+  // choices locally, to use for enabling/disabling the "Add layer" button
+  layerDepInput.on("typeahead-choices-change", function (event, data) {
+    layerDepsChoices = {};
+
+    if (data.choices) {
+      data.choices.forEach(function (item) {
+        layerDepsChoices[item.name] = item;
+      });
+    }
+  });
+
+  // disable the "Add layer" button when the layer input typeahead is empty
+  // or not in the typeahead choices
+  layerDepInput.on("input change", function () {
+    // get the choices from the typeahead
+    var choice = layerDepsChoices[$(this).val()];
+
+    if (choice) {
+      layerDepBtn.removeAttr("disabled");
+      currentLayerDepSelection = choice;
+    }
+    else {
+      layerDepBtn.attr("disabled", "disabled");
+      currentLayerDepSelection = undefined;
+    }
+  });
 
   /* We automatically add "openembedded-core" layer for convenience as a
    * dependency as pretty much all layers depend on this one
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/layerBtn.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
index 7318b3f..259271d 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/layerBtn.js
@@ -42,7 +42,7 @@
           });
         });
       } else {
-        notification.text("1 layer deleted");
+        notification.text("1 layer removed");
         /* Deleting a layer we only hanlde the one button */
         thisBtn.fadeOut(function(){
           notification.fadeIn().delay(500).fadeOut(function(){
@@ -60,8 +60,7 @@
     e.preventDefault();
     var recipe = $(this).data('recipe-name');
 
-    libtoaster.startABuild(libtoaster.ctx.projectBuildsUrl,
-      libtoaster.ctx.projectId, recipe,
+    libtoaster.startABuild(null, recipe,
       function(){
         /* Success */
         window.location.replace(libtoaster.ctx.projectBuildsUrl);
@@ -77,7 +76,8 @@
     if (imgCustomModal.length == 0)
       throw("Modal new-custom-image not found");
 
-    imgCustomModal.data('recipe', $(this).data('recipe'));
+    var recipe = {id: $(this).data('recipe'), name: null}
+    newCustomImageModalSetRecipes([recipe]);
     imgCustomModal.modal('show');
   });
 }
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/layerdetails.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
index 8c2ec4c..d545406 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/layerdetails.js
@@ -32,21 +32,6 @@
     }
   });
 
-
-  $(".breadcrumb li:first a").click(function(e){
-    e.preventDefault();
-    /* By default this link goes to the project configuration page. However
-     * if we have some builds we go there instead of the default href
-     */
-    libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl, function(prjInfo){
-      if (prjInfo.builds && prjInfo.builds.length > 0) {
-        window.location.replace(libtoaster.ctx.projectBuildsUrl);
-      } else {
-        window.location.replace(libtoaster.ctx.projectPageUrl);
-      }
-    });
-  });
-
   function addRemoveDep(depLayerId, add, doneCb) {
     var data = { layer_version_id : ctx.layerVersion.id };
     if (add)
@@ -258,7 +243,7 @@
       $(".select-machine-btn").removeAttr("disabled");
       addRmLayerBtn.addClass("btn-danger");
       addRmLayerBtn.data('directive', "remove");
-      addRmLayerBtn.text(" Delete the "+ctx.layerVersion.name+" layer from your project");
+      addRmLayerBtn.text(" Remove the "+ctx.layerVersion.name+" layer from your project");
       addRmLayerBtn.prepend("<span class=\"icon-trash\"></span>");
 
     } else {
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
index c04f7ab..43930a2 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/libtoaster.js
@@ -21,6 +21,9 @@
     var xhrReq;
 
     jQElement.typeahead({
+        // each time the typeahead's choices change, a
+        // "typeahead-choices-change" event is fired with an object
+        // containing the available choices in a "choices" property
         source: function(query, process){
           xhrParams.search = query;
 
@@ -36,6 +39,8 @@
 
             xhrReq = null;
 
+            jQElement.trigger("typeahead-choices-change", {choices: data.results});
+
             return process(data.results);
           });
         },
@@ -90,27 +95,35 @@
     jQElement.data('typeahead').render = customRenderFunc;
   }
 
-  /*
-   * url - the url of the xhr build */
-  function _startABuild (url, project_id, targets, onsuccess, onfail) {
+  /* startABuild:
+   * url: xhr_buildrequest or null for current project
+   * targets: an array or space separated list of targets to build
+   * onsuccess: callback for successful execution
+   * onfail: callback for failed execution
+   */
+  function _startABuild (url, targets, onsuccess, onfail) {
 
-    var data = {
-      project_id : project_id,
-      targets : targets,
+    if (!url)
+      url = libtoaster.ctx.xhrBuildRequestUrl;
+
+    /* Flatten the array of targets into a space spearated list */
+    if (targets instanceof Array){
+      targets = targets.reduce(function(prevV, nextV){
+        return prev + ' ' + next;
+      });
     }
 
     $.ajax( {
         type: "POST",
         url: url,
-        data: data,
+        data: { 'targets' : targets },
         headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
         success: function (_data) {
-          /* No proper reponse YOCTO #7995
           if (_data.error !== "ok") {
             console.warn(_data.error);
-          } else { */
+          } else {
             if (onsuccess !== undefined) onsuccess(_data);
-        //  }
+          }
         },
         error: function (_data) {
           console.warn("Call failed");
@@ -120,22 +133,25 @@
   }
 
   /* cancelABuild:
-   * url: projectbuilds
-   * builds_ids: space separated list of build request ids
+   * url: xhr_buildrequest url or null for current project
+   * buildRequestIds: space separated list of build request ids
    * onsuccess: callback for successful execution
    * onfail: callback for failed execution
    */
-  function _cancelABuild(url, build_ids, onsuccess, onfail){
+  function _cancelABuild(url, buildRequestIds, onsuccess, onfail){
+    if (!url)
+      url = libtoaster.ctx.xhrBuildRequestUrl;
+
     $.ajax( {
         type: "POST",
         url: url,
-        data: { 'buildCancel': build_ids },
+        data: { 'buildCancel': buildRequestIds },
         headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
         success: function (_data) {
           if (_data.error !== "ok") {
             console.warn(_data.error);
           } else {
-            if (onsuccess !== undefined) onsuccess(_data);
+            if (onsuccess) onsuccess(_data);
           }
         },
         error: function (_data) {
@@ -316,7 +332,7 @@
     } else if (layerDepsList.length === 0 && add === true) {
       alertMsg = $("<span>You have added <strong>1</strong> layer to your project: <a id=\"layer-affected-name\"></a></span></span>");
     } else if (add === false) {
-      alertMsg = $("<span>You have deleted <strong>1</strong> layer from your project: <a id=\"layer-affected-name\"></a></span>");
+      alertMsg = $("<span>You have removed <strong>1</strong> layer from your project: <a id=\"layer-affected-name\"></a></span>");
     }
 
     alertMsg.children("#layer-affected-name").text(layer.name);
@@ -332,6 +348,32 @@
     $("#change-notification, #change-notification *").fadeIn();
   }
 
+  function _createCustomRecipe(name, baseRecipeId, doneCb){
+    var data = {
+      'name' : name,
+      'project' : libtoaster.ctx.projectId,
+      'base' : baseRecipeId,
+    };
+
+    $.ajax({
+        type: "POST",
+        url: libtoaster.ctx.xhrCustomRecipeUrl,
+        data: data,
+        headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
+        success: function (ret) {
+          if (doneCb){
+            doneCb(ret);
+          } else if (ret.error !== "ok") {
+            console.warn(ret.error);
+          }
+        },
+        error: function (ret) {
+          console.warn("Call failed");
+          console.warn(ret);
+        }
+    });
+  }
+
 
   return {
     reload_params : reload_params,
@@ -347,6 +389,7 @@
     addRmLayer : _addRmLayer,
     makeLayerAddRmAlertMsg : _makeLayerAddRmAlertMsg,
     showChangeNotification : _showChangeNotification,
+    createCustomRecipe: _createCustomRecipe,
   };
 })();
 
@@ -443,15 +486,21 @@
         $('.tooltip').hide();
     });
 
-    // enable help information tooltip
-    $(".get-help").tooltip({container:'body', html:true, delay:{show:300}});
+    /* Initialise bootstrap tooltips */
+    $(".get-help, [data-toggle=tooltip]").tooltip({
+      container : 'body',
+      html : true,
+      delay: { show : 300 }
+    });
 
     // show help bubble only on hover inside tables
     $(".hover-help").css("visibility","hidden");
-    $("th, td").hover(function () {
+
+    $("table").on("mouseover", "th, td", function () {
         $(this).find(".hover-help").css("visibility","visible");
     });
-    $("th, td").mouseleave(function () {
+
+    $("table").on("mouseleave", "th, td", function () {
         $(this).find(".hover-help").css("visibility","hidden");
     });
 
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/mrbsection.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/mrbsection.js
new file mode 100644
index 0000000..09117e1
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/mrbsection.js
@@ -0,0 +1,95 @@
+
+function mrbSectionInit(ctx){
+
+  var projectBuilds;
+
+  if (ctx.mrbType === 'project')
+    projectBuilds = true;
+
+  $(".cancel-build-btn").click(function(e){
+    e.preventDefault();
+
+    var url = $(this).data('request-url');
+    var buildReqIds = $(this).data('buildrequest-id');
+    var banner = $(this).parents(".alert");
+
+    banner.find(".progress-info").fadeOut().promise().done(function(){
+      $("#cancelling-msg-" + buildReqIds).show();
+      console.log("cancel build");
+      libtoaster.cancelABuild(url, buildReqIds, function(){
+        if (projectBuilds == false){
+          /* the all builds page is not 'self updating' like thei
+           * project Builds
+           */
+          window.location.reload();
+        }
+      }, null);
+    });
+  });
+
+  $(".run-again-btn").click(function(e){
+    e.preventDefault();
+
+    var url = $(this).data('request-url');
+    var target = $(this).data('target');
+
+    libtoaster.startABuild(url, target, function(){
+      window.location.reload();
+    }, null);
+  });
+
+
+  var progressTimer;
+
+  if (projectBuilds === true){
+    progressTimer = window.setInterval(function() {
+      libtoaster.getProjectInfo(libtoaster.ctx.projectPageUrl,
+        function(prjInfo){
+          /* These two are needed because a build can be 100% and still
+           * in progress due to the fact that the % done is updated at the
+           * start of a task so it can be doing the last task at 100%
+           */
+          var inProgress = 0;
+          var allPercentDone = 0;
+          if (prjInfo.builds.length === 0)
+            return
+
+          for (var i in prjInfo.builds){
+            var build = prjInfo.builds[i];
+
+            if (build.outcome === "In Progress" ||
+               $(".progress .bar").length > 0){
+              /* Update the build progress */
+              var percentDone;
+
+              if (build.outcome !== "In Progress"){
+                /* We have to ignore the value when it's Succeeded because it
+                *   goes back to 0
+                */
+                percentDone = 100;
+              } else {
+                percentDone = build.percentDone;
+                inProgress++;
+              }
+
+              $("#build-pc-done-" + build.id).text(percentDone);
+              $("#build-pc-done-title-" + build.id).attr("title", percentDone);
+              $("#build-pc-done-bar-" + build.id).css("width",
+                String(percentDone) + "%");
+
+              allPercentDone += percentDone;
+            }
+          }
+
+          if (allPercentDone === (100 * prjInfo.builds.length) && !inProgress)
+            window.location.reload();
+
+          /* Our progress bar is not still showing so shutdown the polling. */
+          if ($(".progress .bar").length === 0)
+            window.clearInterval(progressTimer);
+
+      });
+    }, 1500);
+  }
+}
+
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/newcustomimage.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/newcustomimage.js
deleted file mode 100644
index 935b21e..0000000
--- a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/newcustomimage.js
+++ /dev/null
@@ -1,49 +0,0 @@
-"use strict";
-
-function newCustomImagePageInit(ctx){
-
-  var newCustomImgBtn = $("#create-new-custom-image-btn");
-  var imgCustomModal = $("#new-custom-image-modal");
-
-  newCustomImgBtn.click(function(e){
-    e.preventDefault();
-
-    var name = imgCustomModal.find('input').val();
-    var baseRecipeId = imgCustomModal.data('recipe');
-
-    if (name.length > 0) {
-      createCustomRecipe(name, baseRecipeId);
-      imgCustomModal.modal('hide');
-    } else {
-      console.warn("TODO No name supplied");
-    }
-  });
-
-  function createCustomRecipe(name, baseRecipeId){
-    var data = {
-      'name' : name,
-      'project' : libtoaster.ctx.projectId,
-      'base' : baseRecipeId,
-    };
-
-    $.ajax({
-        type: "POST",
-        url: ctx.xhrCustomRecipeUrl,
-        data: data,
-        headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
-        success: function (ret) {
-          if (ret.error !== "ok") {
-            console.warn(ret.error);
-          } else {
-            window.location.replace(ret.url + '?notify=new');
-          }
-        },
-        error: function (ret) {
-          console.warn("Call failed");
-          console.warn(ret);
-        }
-    });
-  }
-
-
-}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js
new file mode 100644
index 0000000..cb9ed4d
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/newcustomimage_modal.js
@@ -0,0 +1,148 @@
+"use strict";
+
+/*
+Used for the newcustomimage_modal actions
+
+The .data('recipe') value on the outer element determines which
+recipe ID is used as the basis for the new custom image recipe created via
+this modal.
+
+Use newCustomImageModalSetRecipes() to set the recipes available as a base
+for the new custom image. This will manage the addition of radio buttons
+to select the base image (or remove the radio buttons, if there is only a
+single base image available).
+*/
+
+function newCustomImageModalInit(){
+
+  var newCustomImgBtn = $("#create-new-custom-image-btn");
+  var imgCustomModal = $("#new-custom-image-modal");
+  var invalidNameHelp = $("#invalid-name-help");
+  var invalidRecipeHelp = $("#invalid-recipe-help");
+  var nameInput = imgCustomModal.find('input');
+
+  var invalidNameMsg = "Image names cannot contain spaces or capital letters. The only allowed special character is dash (-).";
+  var duplicateNameMsg = "A recipe with this name already exists. Image names must be unique.";
+  var duplicateImageInProjectMsg = "An image with this name already exists in this project."
+  var invalidBaseRecipeIdMsg = "Please select an image to customise.";
+
+  // capture clicks on radio buttons inside the modal; when one is selected,
+  // set the recipe on the modal
+  imgCustomModal.on("click", "[name='select-image']", function (e) {
+    clearRecipeError();
+
+    var recipeId = $(e.target).attr('data-recipe');
+    imgCustomModal.data('recipe', recipeId);
+  });
+
+  newCustomImgBtn.click(function(e){
+    e.preventDefault();
+
+    var baseRecipeId = imgCustomModal.data('recipe');
+
+    if (!baseRecipeId) {
+      showRecipeError(invalidBaseRecipeIdMsg);
+      return;
+    }
+
+    if (nameInput.val().length > 0) {
+      libtoaster.createCustomRecipe(nameInput.val(), baseRecipeId,
+      function(ret) {
+        if (ret.error !== "ok") {
+          console.warn(ret.error);
+          if (ret.error === "invalid-name") {
+            showNameError(invalidNameMsg);
+            return;
+          } else if (ret.error === "recipe-already-exists") {
+            showNameError(duplicateNameMsg);
+            return;
+          } else if (ret.error === "image-already-exists") {
+            showNameError(duplicateImageInProjectMsg);
+            return;
+          }
+        } else {
+          imgCustomModal.modal('hide');
+          window.location.replace(ret.url + '?notify=new');
+        }
+      });
+    }
+  });
+
+  function showNameError(text){
+    invalidNameHelp.text(text);
+    invalidNameHelp.show();
+    nameInput.parent().addClass('error');
+  }
+
+  function showRecipeError(text){
+    invalidRecipeHelp.text(text);
+    invalidRecipeHelp.show();
+  }
+
+  function clearRecipeError(){
+    invalidRecipeHelp.hide();
+  }
+
+  nameInput.on('keyup', function(){
+    if (nameInput.val().length === 0){
+      newCustomImgBtn.prop("disabled", true);
+      return
+    }
+
+    if (nameInput.val().search(/[^a-z|0-9|-]/) != -1){
+      showNameError(invalidNameMsg);
+      newCustomImgBtn.prop("disabled", true);
+      nameInput.parent().addClass('error');
+    } else {
+      invalidNameHelp.hide();
+      newCustomImgBtn.prop("disabled", false);
+      nameInput.parent().removeClass('error');
+    }
+  });
+}
+
+// Set the image recipes which can used as the basis for the custom
+// image recipe the user is creating
+//
+// baseRecipes: a list of one or more recipes which can be
+// used as the base for the new custom image recipe in the format:
+// [{'id': <recipe ID>, 'name': <recipe name>'}, ...]
+//
+// if recipes is a single recipe, just show the text box to set the
+// name for the new custom image; if recipes contains multiple recipe objects,
+// show a set of radio buttons so the user can decide which to use as the
+// basis for the new custom image
+function newCustomImageModalSetRecipes(baseRecipes) {
+  var imgCustomModal = $("#new-custom-image-modal");
+  var imageSelector = $('#new-custom-image-modal [data-role="image-selector"]');
+  var imageSelectRadiosContainer = $('#new-custom-image-modal [data-role="image-selector-radios"]');
+
+  // remove any existing radio buttons + labels
+  imageSelector.remove('[data-role="image-radio"]');
+
+  if (baseRecipes.length === 1) {
+    // hide the radio button container
+    imageSelector.hide();
+
+    // set the single recipe ID on the modal as it's the only one
+    // we can build from
+    imgCustomModal.data('recipe', baseRecipes[0].id);
+  }
+  else {
+    // add radio buttons; note that the handlers for the radio buttons
+    // are set in newCustomImageModalInit via event delegation
+    for (var i = 0; i < baseRecipes.length; i++) {
+      var recipe = baseRecipes[i];
+      imageSelectRadiosContainer.append(
+        '<label class="radio" data-role="image-radio">' +
+        recipe.name +
+        '<input type="radio" class="form-control" name="select-image" ' +
+        'data-recipe="' + recipe.id + '">' +
+        '</label>'
+      );
+    }
+
+    // show the radio button container
+    imageSelector.show();
+  }
+}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/projectpage.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/projectpage.js
index e742ef2..3013416 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/projectpage.js
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/projectpage.js
@@ -116,6 +116,8 @@
     addRmLayer(layerObj, true);
     /* Reset the text input */
     layerAddInput.val("");
+    /* Disable the add layer button*/
+    layerAddBtn.attr("disabled", "disabled");
   });
 
   function addRmLayer(layerObj, add){
@@ -143,7 +145,7 @@
     for (var i in layers){
       var layerObj = layers[i];
 
-      var projectLayer = $("<li><a></a><span class=\"icon-trash\" data-toggle=\"tooltip\" title=\"Delete\"></span></li>");
+      var projectLayer = $("<li><a></a><span class=\"icon-trash\" data-toggle=\"tooltip\" title=\"Remove\"></span></li>");
 
       projectLayer.data('layer', layerObj);
       projectLayer.children("span").tooltip();
@@ -175,11 +177,18 @@
 
   function updateLayersCount(){
     var count = $("#layers-in-project-list").children().length;
+    var noLayerMsg = $("#no-layers-in-project");
+    var buildInput = $("#build-input");
 
-    if (count === 0)
+
+    if (count === 0) {
+      noLayerMsg.fadeIn();
       $("#no-layers-in-project").fadeIn();
-    else
-      $("#no-layers-in-project").hide();
+      buildInput.attr("disabled", "disabled");
+    } else {
+      noLayerMsg.hide();
+      buildInput.removeAttr("disabled");
+    }
 
     $("#project-layers-count").text(count);
 
@@ -218,17 +227,19 @@
 
     var toBuild = "";
     freqBuildList.find(":checked").each(function(){
-      toBuild += $(this).val();
+      toBuild += $(this).val() + ' ';
     });
 
-    libtoaster.startABuild(libtoaster.ctx.projectBuildsUrl, libtoaster.ctx.projectId, toBuild, function(){
-      /* Build started */
-      window.location.replace(libtoaster.ctx.projectBuildsUrl);
-    },
-    function(){
-      /* Build start failed */
-      /* [YOCTO #7995] */
-      window.location.replace(libtoaster.ctx.projectBuildsUrl);
+    toBuild = toBuild.trim();
+
+    libtoaster.startABuild(null, toBuild,
+      function(){
+        /* Build request started */
+        window.location.replace(libtoaster.ctx.projectBuildsUrl);
+      },
+      function(){
+        /* Build request failed */
+        console.warn("Build request failed to be created");
     });
   });
 
@@ -380,7 +391,7 @@
     /* Layers removed */
     if (layersToRm && layersToRm.length > 0){
       if (layersToRm.length == 1)
-        li = '<li><strong>1</strong> layer deleted: '+layersToRm[0].name+'</li>';
+        li = '<li><strong>1</strong> layer removed: '+layersToRm[0].name+'</li>';
       else
         li = '<li><strong>'+layersToRm.length+'</strong> layers deleted: '+layersDelList+'</li>';
 
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js
new file mode 100644
index 0000000..b09f974
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/projecttopbar.js
@@ -0,0 +1,90 @@
+'use strict';
+
+function projectTopBarInit(ctx) {
+
+  var projectNameForm = $("#project-name-change-form");
+  var projectNameContainer = $("#project-name-container");
+  var projectName = $("#project-name");
+  var projectNameFormToggle = $("#project-change-form-toggle");
+  var projectNameChangeCancel = $("#project-name-change-cancel");
+
+  // this doesn't exist for command-line builds
+  var newBuildTargetInput = $("#build-input");
+
+  var newBuildTargetBuildBtn = $("#build-button");
+  var selectedTarget;
+
+  /* Project name change functionality */
+  projectNameFormToggle.click(function(e){
+    e.preventDefault();
+    projectNameContainer.hide();
+    projectNameForm.fadeIn();
+  });
+
+  projectNameChangeCancel.click(function(e){
+    e.preventDefault();
+    projectNameForm.hide();
+    projectNameContainer.fadeIn();
+  });
+
+  $("#project-name-change-btn").click(function(){
+    var newProjectName = $("#project-name-change-input").val();
+
+    libtoaster.editCurrentProject({ projectName: newProjectName }, function (){
+      projectName.html(newProjectName);
+      libtoaster.ctx.projectName = newProjectName;
+      projectNameChangeCancel.click();
+    });
+  });
+
+  /* Nav bar activate state switcher */
+  $("#project-topbar .nav li a").each(function(){
+    if (window.location.pathname === $(this).attr('href'))
+      $(this).parent().addClass('active');
+    else
+      $(this).parent().removeClass('active');
+  });
+
+  if (!newBuildTargetInput.length) {
+    return;
+  }
+
+  /* the following only applies for non-command-line projects */
+
+  /* Recipe build input functionality */
+  if (ctx.numProjectLayers > 0 && ctx.machine){
+    newBuildTargetInput.removeAttr("disabled");
+  }
+
+  libtoaster.makeTypeahead(newBuildTargetInput,
+    libtoaster.ctx.recipesTypeAheadUrl, {}, function (item) {
+     selectedTarget = item;
+     newBuildTargetBuildBtn.removeAttr("disabled");
+  });
+
+  newBuildTargetInput.on('input', function () {
+    if ($(this).val().length === 0) {
+      newBuildTargetBuildBtn.attr("disabled", "disabled");
+    } else {
+      newBuildTargetBuildBtn.removeAttr("disabled");
+    }
+  });
+
+  newBuildTargetBuildBtn.click(function (e) {
+    e.preventDefault();
+    if (!newBuildTargetInput.val()) {
+      return;
+    }
+    /* We use the value of the input field so as to maintain any command also
+     * added e.g. core-image-minimal:clean and because we can build targets
+     * that toaster doesn't yet know about
+     */
+    selectedTarget = { name: newBuildTargetInput.val() };
+
+    /* Fire off the build */
+    libtoaster.startABuild(null, selectedTarget.name,
+      function(){
+        window.location.replace(libtoaster.ctx.projectBuildsUrl);
+    }, null);
+  });
+}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/qunit-1.18.0.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/qunit-1.18.0.js
new file mode 100644
index 0000000..fadd340
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/qunit-1.18.0.js
@@ -0,0 +1,347 @@
+(function(window){var QUnit,config,onErrorFnPrev,loggingCallbacks={},fileName=(sourceFromStacktrace(0)||"").replace(/(:\d+)+\)?/,"").replace(/.+\//,""),toString=Object.prototype.toString,hasOwn=Object.prototype.hasOwnProperty,Date=window.Date,now=Date.now||function(){return new Date().getTime();},globalStartCalled=false,runStarted=false,setTimeout=window.setTimeout,clearTimeout=window.clearTimeout,defined={document:window.document!==undefined,setTimeout:window.setTimeout!==undefined,sessionStorage:(function(){var x="qunit-test-string";try{sessionStorage.setItem(x,x);sessionStorage.removeItem(x);return true;}catch(e){return false;}}())},errorString=function(error){var name,message,errorString=error.toString();if(errorString.substring(0,7)==="[object"){name=error.name?error.name.toString():"Error";message=error.message?error.message.toString():"";if(name&&message){return name+": "+message;}else if(name){return name;}else if(message){return message;}else{return "Error";}}else{return errorString;}},objectValues =function(obj){var key,val,vals=QUnit.is("array",obj)?[]:{};for(key in obj){if(hasOwn.call(obj,key)){val=obj[key];vals[key]=val===Object(val)?objectValues(val):val;}}
+return vals;};QUnit={};config={queue:[],blocking:true,reorder:true,altertitle:true,scrolltop:true,requireExpects:false,maxDepth:5,urlConfig:[{id:"hidepassed",label:"Hide passed tests",tooltip:"Only show tests and assertions that fail. Stored as query-strings."},{id:"noglobals",label:"Check for Globals",tooltip:"Enabling this will test if any test introduces new properties on the "+
+"`window` object. Stored as query-strings."},{id:"notrycatch",label:"No try-catch",tooltip:"Enabling this will run tests outside of a try-catch block. Makes debugging "+
+"exceptions in IE reasonable. Stored as query-strings."}],modules:[],currentModule:{name:"",tests:[]},callbacks:{}};config.modules.push(config.currentModule);(function(){var i,current,location=window.location||{search:"",protocol:"file:"},params=location.search.slice(1).split("&"),length=params.length,urlParams={};if(params[0]){for(i=0;i<length;i++){current=params[i].split("=");current[0]=decodeURIComponent(current[0]);current[1]=current[1]?decodeURIComponent(current[1]):true;if(urlParams[current[0]]){urlParams[current[0]]=[].concat(urlParams[current[0]],current[1]);}else{urlParams[current[0]]=current[1];}}}
+if(urlParams.filter===true){delete urlParams.filter;}
+QUnit.urlParams=urlParams;config.filter=urlParams.filter;if(urlParams.maxDepth){config.maxDepth=parseInt(urlParams.maxDepth,10)===-1?Number.POSITIVE_INFINITY:urlParams.maxDepth;}
+config.testId=[];if(urlParams.testId){urlParams.testId=decodeURIComponent(urlParams.testId).split(",");for(i=0;i<urlParams.testId.length;i++){config.testId.push(urlParams.testId[i]);}}
+QUnit.isLocal=location.protocol==="file:";QUnit.version="1.18.0";}());extend(QUnit,{module:function(name,testEnvironment){var currentModule={name:name,testEnvironment:testEnvironment,tests:[]};if(testEnvironment&&testEnvironment.setup){testEnvironment.beforeEach=testEnvironment.setup;delete testEnvironment.setup;}
+if(testEnvironment&&testEnvironment.teardown){testEnvironment.afterEach=testEnvironment.teardown;delete testEnvironment.teardown;}
+config.modules.push(currentModule);config.currentModule=currentModule;},asyncTest:function(testName,expected,callback){if(arguments.length===2){callback=expected;expected=null;}
+QUnit.test(testName,expected,callback,true);},test:function(testName,expected,callback,async){var test;if(arguments.length===2){callback=expected;expected=null;}
+test=new Test({testName:testName,expected:expected,async:async,callback:callback});test.queue();},skip:function(testName){var test=new Test({testName:testName,skip:true});test.queue();},//
+start:function(count){var globalStartAlreadyCalled=globalStartCalled;if(!config.current){globalStartCalled=true;if(runStarted){throw new Error("Called start() outside of a test context while already started");}else if(globalStartAlreadyCalled||count>1){throw new Error("Called start() outside of a test context too many times");}else if(config.autostart){throw new Error("Called start() outside of a test context when "+
+"QUnit.config.autostart was true");}else if(!config.pageLoaded){config.autostart=true;return;}}else{config.current.semaphore-=count||1;if(config.current.semaphore>0){return;}
+if(config.current.semaphore<0){config.current.semaphore=0;QUnit.pushFailure("Called start() while already started (test's semaphore was 0 already)",sourceFromStacktrace(2));return;}}
+resumeProcessing();},stop:function(count){if(!config.current){throw new Error("Called stop() outside of a test context");}
+config.current.semaphore+=count||1;pauseProcessing();},config:config,is:function(type,obj){return QUnit.objectType(obj)===type;},objectType:function(obj){if(typeof obj==="undefined"){return "undefined";}//
+if(obj===null){return "null";}
+var match=toString.call(obj).match(/^\[object\s(.*)\]$/),type=match&&match[1]||"";switch(type){case "Number":if(isNaN(obj)){return "nan";}
+return "number";case "String":case "Boolean":case "Array":case "Date":case "RegExp":case "Function":return type.toLowerCase();}
+if(typeof obj==="object"){return "object";}
+return undefined;},extend:extend,load:function(){config.pageLoaded=true;extend(config,{stats:{all:0,bad:0},moduleStats:{all:0,bad:0},started:0,updateRate:1000,autostart:true,filter:""},true);config.blocking=false;if(config.autostart){resumeProcessing();}}});(function(){var i,l,key,callbacks=["begin","done","log","testStart","testDone","moduleStart","moduleDone"];function registerLoggingCallback(key){var loggingCallback=function(callback){if(QUnit.objectType(callback)!=="function"){throw new Error("QUnit logging methods require a callback function as their first parameters.");}
+config.callbacks[key].push(callback);};loggingCallbacks[key]=loggingCallback;return loggingCallback;}
+for(i=0,l=callbacks.length;i<l;i++){key=callbacks[i];if(QUnit.objectType(config.callbacks[key])==="undefined"){config.callbacks[key]=[];}
+QUnit[key]=registerLoggingCallback(key);}})();onErrorFnPrev=window.onerror;//
+window.onerror=function(error,filePath,linerNr){var ret=false;if(onErrorFnPrev){ret=onErrorFnPrev(error,filePath,linerNr);}
+if(ret!==true){if(QUnit.config.current){if(QUnit.config.current.ignoreGlobalErrors){return true;}
+QUnit.pushFailure(error,filePath+":"+linerNr);}else{QUnit.test("global failure",extend(function(){QUnit.pushFailure(error,filePath+":"+linerNr);},{validTest:true}));}
+return false;}
+return ret;};function done(){var runtime,passed;config.autorun=true;if(config.previousModule){runLoggingCallbacks("moduleDone",{name:config.previousModule.name,tests:config.previousModule.tests,failed:config.moduleStats.bad,passed:config.moduleStats.all-config.moduleStats.bad,total:config.moduleStats.all,runtime:now()-config.moduleStats.started});}
+delete config.previousModule;runtime=now()-config.started;passed=config.stats.all-config.stats.bad;runLoggingCallbacks("done",{failed:config.stats.bad,passed:passed,total:config.stats.all,runtime:runtime});}
+function extractStacktrace(e,offset){offset=offset===undefined?4:offset;var stack,include,i;if(e.stack){stack=e.stack.split("\n");if(/^error$/i.test(stack[0])){stack.shift();}
+if(fileName){include=[];for(i=offset;i<stack.length;i++){if(stack[i].indexOf(fileName)!==-1){break;}
+include.push(stack[i]);}
+if(include.length){return include.join("\n");}}
+return stack[offset];//
+}else if(e.sourceURL){if(/qunit.js$/.test(e.sourceURL)){return;}
+return e.sourceURL+":"+e.line;}}
+function sourceFromStacktrace(offset){var error=new Error();if(!error.stack){try{throw error;}catch(err){error=err;}}
+return extractStacktrace(error,offset);}
+function synchronize(callback,last){if(QUnit.objectType(callback)==="array"){while(callback.length){synchronize(callback.shift());}
+return;}
+config.queue.push(callback);if(config.autorun&&!config.blocking){process(last);}}
+function process(last){function next(){process(last);}
+var start=now();config.depth=(config.depth||0)+1;while(config.queue.length&&!config.blocking){if(!defined.setTimeout||config.updateRate<=0||((now()-start)<config.updateRate)){if(config.current){config.current.usedAsync=false;}
+config.queue.shift()();}else{setTimeout(next,13);break;}}
+config.depth--;if(last&&!config.blocking&&!config.queue.length&&config.depth===0){done();}}
+function begin(){var i,l,modulesLog=[];if(!config.started){config.started=now();verifyLoggingCallbacks();if(config.modules[0].name===""&&config.modules[0].tests.length===0){config.modules.shift();}
+for(i=0,l=config.modules.length;i<l;i++){modulesLog.push({name:config.modules[i].name,tests:config.modules[i].tests});}
+runLoggingCallbacks("begin",{totalTests:Test.count,modules:modulesLog});}
+config.blocking=false;process(true);}
+function resumeProcessing(){runStarted=true;if(defined.setTimeout){setTimeout(function(){if(config.current&&config.current.semaphore>0){return;}
+if(config.timeout){clearTimeout(config.timeout);}
+begin();},13);}else{begin();}}
+function pauseProcessing(){config.blocking=true;if(config.testTimeout&&defined.setTimeout){clearTimeout(config.timeout);config.timeout=setTimeout(function(){if(config.current){config.current.semaphore=0;QUnit.pushFailure("Test timed out",sourceFromStacktrace(2));}else{throw new Error("Test timed out");}
+resumeProcessing();},config.testTimeout);}}
+function saveGlobal(){config.pollution=[];if (config.noglobals){for(var key in window){if(hasOwn.call(window,key)){if(/^qunit-test-output/.test(key)){continue;}
+config.pollution.push(key);}}}}
+function checkPollution(){var newGlobals,deletedGlobals,old=config.pollution;saveGlobal();newGlobals=diff(config.pollution,old);if(newGlobals.length>0){QUnit.pushFailure("Introduced global variable(s): "+newGlobals.join(", "));}
+deletedGlobals=diff(old,config.pollution);if(deletedGlobals.length>0){QUnit.pushFailure("Deleted global variable(s): "+deletedGlobals.join(", "));}}
+function diff(a,b){var i,j,result=a.slice();for(i=0;i<result.length;i++){for(j=0;j<b.length;j++){if(result[i]===b[j]){result.splice(i,1);i--;break;}}}
+return result;}
+function extend(a,b,undefOnly){for(var prop in b){if(hasOwn.call(b,prop)){if(!(prop==="constructor"&&a===window)){if(b[prop]===undefined){delete a[prop];}else if(!(undefOnly&&typeof a[prop]!=="undefined")){a[prop]=b[prop];}}}}
+return a;}
+function runLoggingCallbacks(key,args){var i,l,callbacks;callbacks=config.callbacks[key];for(i=0,l=callbacks.length;i<l;i++){callbacks[i](args);}}
+function verifyLoggingCallbacks(){var loggingCallback,userCallback;for(loggingCallback in loggingCallbacks){if(QUnit[loggingCallback]!==loggingCallbacks[loggingCallback]){userCallback=QUnit[loggingCallback];QUnit[loggingCallback]=loggingCallbacks[loggingCallback];QUnit[loggingCallback](userCallback);if(window.console&&window.console.warn){window.console.warn("QUnit."+loggingCallback+" was replaced with a new value.\n"+
+"Please, check out the documentation on how to apply logging callbacks.\n"+
+"Reference: http://api.qunitjs.com/category/callbacks/");}}}}
+function inArray(elem,array){if(array.indexOf){return array.indexOf(elem);}
+for(var i=0,length=array.length;i<length;i++){if(array[i]===elem){return i;}}
+return-1;}
+function Test(settings){var i,l;++Test.count;extend(this,settings);this.assertions=[];this.semaphore=0;this.usedAsync=false;this.module=config.currentModule;this.stack=sourceFromStacktrace(3);for(i=0,l=this.module.tests;i<l.length;i++){if(this.module.tests[i].name===this.testName){this.testName+=" ";}}
+this.testId=generateHash(this.module.name,this.testName);this.module.tests.push({name:this.testName,testId:this.testId});if(settings.skip){this.callback=function(){};this.async=false;this.expected=0;}else{this.assert=new Assert(this);}}
+Test.count=0;Test.prototype={before:function(){if(this.module!==config.previousModule||//
+!hasOwn.call(config,"previousModule")){if(hasOwn.call(config,"previousModule")){runLoggingCallbacks("moduleDone",{name:config.previousModule.name,tests:config.previousModule.tests,failed:config.moduleStats.bad,passed:config.moduleStats.all-config.moduleStats.bad,total:config.moduleStats.all,runtime:now()-config.moduleStats.started});}
+config.previousModule=this.module;config.moduleStats={all:0,bad:0,started:now()};runLoggingCallbacks("moduleStart",{name:this.module.name,tests:this.module.tests});}
+config.current=this;this.testEnvironment=extend({},this.module.testEnvironment);delete this.testEnvironment.beforeEach;delete this.testEnvironment.afterEach;this.started=now();runLoggingCallbacks("testStart",{name:this.testName,module:this.module.name,testId:this.testId});if(!config.pollution){saveGlobal();}},run:function(){var promise;config.current=this;if(this.async){QUnit.stop();}
+this.callbackStarted=now();if(config.notrycatch){promise=this.callback.call(this.testEnvironment,this.assert);this.resolvePromise(promise);return;}
+try{promise=this.callback.call(this.testEnvironment,this.assert);this.resolvePromise(promise);}catch(e){this.pushFailure("Died on test #"+(this.assertions.length+1)+" "+
+this.stack+": "+(e.message||e),extractStacktrace(e,0));saveGlobal();if(config.blocking){QUnit.start();}}},after:function(){checkPollution();},queueHook:function(hook,hookName){var promise,test=this;return function runHook(){config.current=test;if(config.notrycatch){promise=hook.call(test.testEnvironment,test.assert);test.resolvePromise(promise,hookName);return;}
+try{promise=hook.call(test.testEnvironment,test.assert);test.resolvePromise(promise,hookName);}catch(error){test.pushFailure(hookName+" failed on "+test.testName+": "+(error.message||error),extractStacktrace(error,0));}};},hooks:function(handler){var hooks=[];if(this.skip){return hooks;}
+if(this.module.testEnvironment&&QUnit.objectType(this.module.testEnvironment[handler])==="function"){hooks.push(this.queueHook(this.module.testEnvironment[handler],handler));}
+return hooks;},finish:function(){config.current=this;if(config.requireExpects&&this.expected===null){this.pushFailure("Expected number of assertions to be defined, but expect() was "+
+"not called.",this.stack);}else if(this.expected!==null&&this.expected!==this.assertions.length){this.pushFailure("Expected "+this.expected+" assertions, but "+
+this.assertions.length+" were run",this.stack);}else if(this.expected===null&&!this.assertions.length){this.pushFailure("Expected at least one assertion, but none were run - call "+
+"expect(0) to accept zero assertions.",this.stack);}
+var i,bad=0;this.runtime=now()-this.started;config.stats.all+=this.assertions.length;config.moduleStats.all+=this.assertions.length;for(i=0;i<this.assertions.length;i++){if(!this.assertions[i].result){bad++;config.stats.bad++;config.moduleStats.bad++;}}
+runLoggingCallbacks("testDone",{name:this.testName,module:this.module.name,skipped:!!this.skip,failed:bad,passed:this.assertions.length-bad,total:this.assertions.length,runtime:this.runtime,assertions:this.assertions,testId:this.testId,duration:this.runtime});QUnit.reset();config.current=undefined;},queue:function(){var bad,test=this;if(!this.valid()){return;}
+function run(){synchronize([function(){test.before();},test.hooks("beforeEach"),function(){test.run();},test.hooks("afterEach").reverse(),function(){test.after();},function(){test.finish();}]);}
+bad=QUnit.config.reorder&&defined.sessionStorage&&+sessionStorage.getItem("qunit-test-"+this.module.name+"-"+this.testName);if(bad){run();}else{synchronize(run,true);}},push:function(result,actual,expected,message){var source,details={module:this.module.name,name:this.testName,result:result,message:message,actual:actual,expected:expected,testId:this.testId,runtime:now()-this.started};if(!result){source=sourceFromStacktrace();if(source){details.source=source;}}
+runLoggingCallbacks("log",details);this.assertions.push({result:!!result,message:message});},pushFailure:function(message,source,actual){if(!this instanceof Test){throw new Error("pushFailure() assertion outside test context, was "+
+sourceFromStacktrace(2));}
+var details={module:this.module.name,name:this.testName,result:false,message:message||"error",actual:actual||null,testId:this.testId,runtime:now()-this.started};if(source){details.source=source;}
+runLoggingCallbacks("log",details);this.assertions.push({result:false,message:message});},resolvePromise:function(promise,phase){var then,message,test=this;if(promise!=null){then=promise.then;if(QUnit.objectType(then)==="function"){QUnit.stop();then.call(promise,QUnit.start,function(error){message="Promise rejected "+(!phase?"during":phase.replace(/Each$/,""))+
+" "+test.testName+": "+(error.message||error);test.pushFailure(message,extractStacktrace(error,0));saveGlobal();QUnit.start();});}}},valid:function(){var include,filter=config.filter&&config.filter.toLowerCase(),module=QUnit.urlParams.module&&QUnit.urlParams.module.toLowerCase(),fullName=(this.module.name+": "+this.testName).toLowerCase();if(this.callback&&this.callback.validTest){return true;}
+if(config.testId.length>0&&inArray(this.testId,config.testId)<0){return false;}
+if(module&&(!this.module.name||this.module.name.toLowerCase()!==module)){return false;}
+if(!filter){return true;}
+include=filter.charAt(0)!=="!";if(!include){filter=filter.slice(1);}
+if(fullName.indexOf(filter)!==-1){return include;}
+return!include;}};QUnit.reset=function(){if(typeof window==="undefined"){return;}
+var fixture=defined.document&&document.getElementById&&document.getElementById("qunit-fixture");if(fixture){fixture.innerHTML=config.fixture;}};QUnit.pushFailure=function(){if(!QUnit.config.current){throw new Error("pushFailure() assertion outside test context, in "+
+sourceFromStacktrace(2));}
+var currentTest=QUnit.config.current;return currentTest.pushFailure.apply(currentTest,arguments);};function generateHash(module,testName){var hex,i=0,hash=0,str=module+"\x1C"+testName,len=str.length;for(;i<len;i++){hash=((hash<<5)-hash)+str.charCodeAt(i);hash|=0;}
+hex=(0x100000000+hash).toString(16);if(hex.length<8){hex="0000000"+hex;}
+return hex.slice(-8);}
+function Assert(testContext){this.test=testContext;}
+QUnit.assert=Assert.prototype={expect:function(asserts){if(arguments.length===1){this.test.expected=asserts;}else{return this.test.expected;}},async:function(){var test=this.test,popped=false;test.semaphore+=1;test.usedAsync=true;pauseProcessing();return function done(){if(!popped){test.semaphore-=1;popped=true;resumeProcessing();}else{test.pushFailure("Called the callback returned from `assert.async` more than once",sourceFromStacktrace(2));}};},push:function(){var assert=this,currentTest=(assert instanceof Assert&&assert.test)||QUnit.config.current;if(!currentTest){throw new Error("assertion outside test context, in "+sourceFromStacktrace(2));}
+if(currentTest.usedAsync===true&&currentTest.semaphore===0){currentTest.pushFailure("Assertion after the final `assert.async` was resolved",sourceFromStacktrace(2));}
+if(!(assert instanceof Assert)){assert=currentTest.assert;}
+return assert.test.push.apply(assert.test,arguments);},ok:function(result,message){message=message||(result?"okay":"failed, expected argument to be truthy, was: "+
+QUnit.dump.parse(result));this.push(!!result,result,true,message);},notOk:function(result,message){message=message||(!result?"okay":"failed, expected argument to be falsy, was: "+
+QUnit.dump.parse(result));this.push(!result,result,false,message);},equal:function(actual,expected,message){this.push(expected==actual,actual,expected,message);},notEqual:function(actual,expected,message){this.push(expected!=actual,actual,expected,message);},propEqual:function(actual,expected,message){actual=objectValues(actual);expected=objectValues(expected);this.push(QUnit.equiv(actual,expected),actual,expected,message);},notPropEqual:function(actual,expected,message){actual=objectValues(actual);expected=objectValues(expected);this.push(!QUnit.equiv(actual,expected),actual,expected,message);},deepEqual:function(actual,expected,message){this.push(QUnit.equiv(actual,expected),actual,expected,message);},notDeepEqual:function(actual,expected,message){this.push(!QUnit.equiv(actual,expected),actual,expected,message);},strictEqual:function(actual,expected,message){this.push(expected===actual,actual,expected,message);},notStrictEqual:function(actual,expected,message){this.push(expected!==actual,actual,expected,message);},"throws":function(block,expected,message){var actual,expectedType,expectedOutput=expected,ok=false,currentTest=(this instanceof Assert&&this.test)||QUnit.config.current;if(message==null&&typeof expected==="string"){message=expected;expected=null;}
+currentTest.ignoreGlobalErrors=true;try{block.call(currentTest.testEnvironment);}catch(e){actual=e;}
+currentTest.ignoreGlobalErrors=false;if(actual){expectedType=QUnit.objectType(expected);if(!expected){ok=true;expectedOutput=null;}else if(expectedType==="regexp"){ok=expected.test(errorString(actual));}else if(expectedType==="string"){ok=expected===errorString(actual);}else if(expectedType==="function"&&actual instanceof expected){ok=true;}else if(expectedType==="object"){ok=actual instanceof expected.constructor&&actual.name===expected.name&&actual.message===expected.message;}else if(expectedType==="function"&&expected.call({},actual)===true){expectedOutput= null;ok=true;}}
+currentTest.assert.push(ok,actual,expectedOutput,message);}};(function(){Assert.prototype.raises=Assert.prototype["throws"];}());QUnit.equiv=(function(){function bindCallbacks(o,callbacks,args){var prop=QUnit.objectType(o);if(prop){if(QUnit.objectType(callbacks[prop])==="function"){return callbacks[prop].apply(callbacks,args);}else{return callbacks[prop];}}}
+var innerEquiv,callers=[],parents=[],parentsB=[],getProto=Object.getPrototypeOf||function(obj){return obj.__proto__;},callbacks=(function(){function useStrictEquality(b,a){if(b instanceof a.constructor||a instanceof b.constructor){return a==b;}else{return a===b;}}
+return{"string":useStrictEquality,"boolean":useStrictEquality,"number":useStrictEquality,"null":useStrictEquality,"undefined":useStrictEquality,"nan":function(b){return isNaN(b);},"date":function(b,a){return QUnit.objectType(b)==="date"&&a.valueOf()===b.valueOf();},"regexp":function(b,a){return QUnit.objectType(b)==="regexp"&&a.source===b.source&&a.global===b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline&&a.sticky===b.sticky;},"function":function(){var caller=callers[callers.length-1];return caller!==Object&&typeof caller!=="undefined";},"array":function(b,a){var i,j,len,loop,aCircular,bCircular;if(QUnit.objectType(b)!=="array"){return false;}
+len=a.length;if(len!==b.length){return false;}
+parents.push(a);parentsB.push(b);for(i=0;i<len;i++){loop=false;for(j=0;j<parents.length;j++){aCircular=parents[j]===a[i];bCircular=parentsB[j]===b[i];if(aCircular||bCircular){ if(a[i]===b[i]||aCircular&&bCircular){loop=true;}else{parents.pop();parentsB.pop();return false;}}}
+if(!loop&&!innerEquiv(a[i],b[i])){parents.pop();parentsB.pop();return false;}}
+parents.pop();parentsB.pop();return true;},"object":function(b,a){var i,j,loop,aCircular,bCircular,eq=true,aProperties=[],bProperties=[];if(a.constructor!==b.constructor){if(!((getProto(a)===null&&getProto(b)===Object.prototype)||(getProto(b)===null&&getProto(a)===Object.prototype))){return false;}}
+callers.push(a.constructor);parents.push(a);parentsB.push(b);for(i in a){loop=false;for(j=0;j<parents.length;j++){aCircular=parents[j]===a[i];bCircular=parentsB[j]===b[i];if(aCircular||bCircular){if(a[i]===b[i]||aCircular&&bCircular){loop=true;}else{eq=false;break;}}}
+aProperties.push(i);if(!loop&&!innerEquiv(a[i],b[i])){eq=false;break;}}
+parents.pop();parentsB.pop();callers.pop();for(i in b){bProperties.push(i);}
+return eq&&innerEquiv(aProperties.sort(),bProperties.sort());}};}());innerEquiv=function(){var args=[].slice.apply(arguments);if(args.length<2){return true;}
+return((function(a,b){if(a===b){return true;}else if(a===null||b===null||typeof a==="undefined"||typeof b==="undefined"||QUnit.objectType(a)!==QUnit.objectType(b)){return false;}else{return bindCallbacks(a,callbacks,[b,a]);}}(args[0],args[1]))&&innerEquiv.apply(this,args.splice(1,args.length-1)));};return innerEquiv;}());QUnit.dump=(function(){function quote(str){return "\""+str.toString().replace(/"/g,"\\\"")+"\"";}
+function literal(o){return o+"";}
+function join(pre,arr,post){var s=dump.separator(),base=dump.indent(),inner=dump.indent(1);if(arr.join){arr=arr.join(","+s+inner);}
+if(!arr){return pre+post;}
+return[pre,inner+arr,base+post].join(s);}
+function array(arr,stack){var i=arr.length,ret=new Array(i);if(dump.maxDepth&&dump.depth>dump.maxDepth){return "[object Array]";}
+this.up();while(i--){ret[i]=this.parse(arr[i],undefined,stack);}
+this.down();return join("[",ret,"]");}
+var reName=/^function (\w+)/,dump={parse:function(obj,objType,stack){stack=stack||[];var res,parser,parserType,inStack=inArray(obj,stack);if(inStack!==-1){return "recursion("+(inStack-stack.length)+")";}
+objType=objType||this.typeOf(obj);parser=this.parsers[objType];parserType=typeof parser;if(parserType==="function"){stack.push(obj);res=parser.call(this,obj,stack);stack.pop();return res;}
+return(parserType==="string")?parser:this.parsers.error;},typeOf:function(obj){var type;if(obj===null){type="null";}else if(typeof obj==="undefined"){type="undefined";}else if(QUnit.is("regexp",obj)){type="regexp";}else if(QUnit.is("date",obj)){type="date";}else if(QUnit.is("function",obj)){type="function";}else if(obj.setInterval!==undefined&&obj.document!==undefined&&obj.nodeType===undefined){type="window";}else if(obj.nodeType===9){type="document";}else if(obj.nodeType){type="node";}else if(toString.call(obj)==="[object Array]"||(typeof obj.length==="number"&&obj.item!==undefined&&(obj.length?obj.item(0)===obj[ 0]:(obj.item(0)===null&&obj[0]===undefined)))){type="array";}else if(obj.constructor===Error.prototype.constructor){type="error";}else{type=typeof obj;}
+return type;},separator:function(){return this.multiline?this.HTML?"<br />":"\n":this.HTML?"&#160;":" ";},indent:function(extra){if(!this.multiline){return "";}
+var chr=this.indentChar;if(this.HTML){chr=chr.replace(/\t/g,"   ").replace(/ /g,"&#160;");}
+return new Array(this.depth+(extra||0)).join(chr);},up:function(a){this.depth+=a||1;},down:function(a){this.depth-=a||1;},setParser:function(name,parser){this.parsers[name]=parser;},quote:quote,literal:literal,join:join,depth:1,maxDepth:QUnit.config.maxDepth,parsers:{window:"[Window]",document:"[Document]",error:function(error){return "Error(\""+error.message+"\")";},unknown:"[Unknown]","null":"null","undefined":"undefined","function":function(fn){var ret="function",name="name" in fn?fn.name:(reName.exec(fn)||[])[1];if(name){ret+=" "+name;}
+ret+="( ";ret=[ret,dump.parse(fn,"functionArgs"),"){"].join("");return join(ret,dump.parse(fn,"functionCode"),"}");},array:array,nodelist:array,"arguments":array,object:function(map,stack){var keys,key,val,i,nonEnumerableProperties,ret=[];if(dump.maxDepth&&dump.depth>dump.maxDepth){return "[object Object]";}
+dump.up(); keys=[];for(key in map){keys.push(key);}
+nonEnumerableProperties=["message","name"];for(i in nonEnumerableProperties){key=nonEnumerableProperties[i];if(key in map&&inArray(key,keys)<0){keys.push(key);}}
+keys.sort();for(i=0;i<keys.length;i++){key=keys[i];val=map[key];ret.push(dump.parse(key,"key")+": "+
+dump.parse(val,undefined,stack));}
+dump.down();return join("{",ret,"}");},node:function(node){var len,i,val,open=dump.HTML?"&lt;":"<",close=dump.HTML?"&gt;":">",tag=node.nodeName.toLowerCase(),ret=open+tag,attrs=node.attributes;if(attrs){for(i=0,len=attrs.length;i<len;i++){val=attrs[i].nodeValue;if(val&&val!=="inherit"){ret+=" "+attrs[i].nodeName+"="+
+dump.parse(val,"attribute");}}}
+ret+=close;if(node.nodeType===3||node.nodeType===4){ret+=node.nodeValue;}
+return ret+open+"/"+tag+close;},functionArgs:function(fn){var args,l=fn.length;if(!l){return "";}
+args=new Array(l);while(l--){args[l]=String.fromCharCode(97+l);}
+return " "+args.join(", ")+" ";},key:quote,functionCode:"[code]",attribute:quote,string:quote,date:quote,regexp:literal,number:literal,"boolean":literal},HTML:false,indentChar:"  ",multiline:true};return dump;}());QUnit.jsDump=QUnit.dump;if(typeof window!=="undefined"){(function(){var i,assertions=Assert.prototype;function applyCurrent(current){return function(){var assert=new Assert(QUnit.config.current);current.apply(assert,arguments);};}
+for(i in assertions){QUnit[i]=applyCurrent(assertions[i]);}})();(function(){var i,l,keys=["test","module","expect","asyncTest","start","stop","ok","notOk","equal","notEqual","propEqual","notPropEqual","deepEqual","notDeepEqual","strictEqual","notStrictEqual","throws"];for(i=0,l=keys.length;i<l;i++){window[keys[i]]=QUnit[keys[i]];}})();window.QUnit=QUnit;}
+if(typeof module!=="undefined"&&module&&module.exports){module.exports=QUnit;module.exports.QUnit=QUnit;}
+if(typeof exports!=="undefined"&&exports){exports.QUnit=QUnit;}
+if(typeof define==="function"&&define.amd){define(function(){return QUnit;});QUnit.config.autostart=false;}}((function(){return this;})()));//
+/**/
+QUnit.diff=(function(){function DiffMatchPatch(){this.DiffTimeout=1.0;this.DiffEditCost=4;}
+var DIFF_DELETE=-1,DIFF_INSERT=1,DIFF_EQUAL=0;DiffMatchPatch.prototype.DiffMain=function(text1,text2,optChecklines,optDeadline){var deadline,checklines,commonlength,commonprefix,commonsuffix,diffs;if(typeof optDeadline==="undefined"){if(this.DiffTimeout<=0){optDeadline=Number.MAX_VALUE;}else{ optDeadline=(new Date()).getTime()+this.DiffTimeout*1000;}}
+deadline=optDeadline;if(text1===null||text2===null){throw new Error("Null input. (DiffMain)");}
+if(text1===text2){if(text1){return[[DIFF_EQUAL,text1]];}
+return[];}
+if(typeof optChecklines==="undefined"){optChecklines=true;}
+checklines=optChecklines;commonlength=this.diffCommonPrefix(text1,text2);commonprefix=text1.substring(0,commonlength);text1=text1.substring(commonlength);text2=text2.substring(commonlength);commonlength=this.diffCommonSuffix(text1,text2);commonsuffix=text1.substring(text1.length-commonlength);text1=text1.substring(0,text1.length-commonlength);text2=text2.substring(0,text2.length-commonlength);diffs=this.diffCompute(text1,text2,checklines,deadline);if(commonprefix){diffs.unshift([DIFF_EQUAL,commonprefix]);}
+if(commonsuffix){diffs.push([DIFF_EQUAL,commonsuffix]);}
+this.diffCleanupMerge(diffs);return diffs;};DiffMatchPatch.prototype.diffCleanupEfficiency=function(diffs){var changes,equalities,equalitiesLength,lastequality,pointer,preIns,preDel,postIns,postDel;changes=false;equalities=[];equalitiesLength=0;lastequality=null;pointer=0;preIns=false;preDel=false;postIns=false;postDel=false;while(pointer<diffs.length){if(diffs[pointer][0]===DIFF_EQUAL){if(diffs[pointer][1].length<this.DiffEditCost&&(postIns||postDel)){equalities[equalitiesLength++]=pointer;preIns=postIns;preDel=postDel;lastequality=diffs[pointer][1];}else{equalitiesLength=0;lastequality=null;}
+postIns=postDel=false;}else{if(diffs[pointer][0]===DIFF_DELETE){postDel=true;}else{postIns=true;}
+if(lastequality&&((preIns&&preDel&&postIns&&postDel)||((lastequality.length<this.DiffEditCost/2)&&(preIns+preDel+postIns+postDel)===3))){diffs.splice(equalities[equalitiesLength-1],0,[DIFF_DELETE,lastequality]);diffs[equalities[equalitiesLength-1]+1][0]=DIFF_INSERT;equalitiesLength--;lastequality=null;if(preIns&&preDel){postIns=postDel=true;equalitiesLength=0;}else{equalitiesLength--;pointer=equalitiesLength>0?equalities[equalitiesLength-1]:-1;postIns=postDel=false;}
+changes=true;}}
+pointer++;}
+if(changes){this.diffCleanupMerge(diffs);}};DiffMatchPatch.prototype.diffPrettyHtml=function(diffs){var op,data,x,html=[];for(x=0;x<diffs.length;x++){op=diffs[x][0];data=diffs[x][1];switch(op){case DIFF_INSERT:html[x]="<ins>"+data+"</ins>";break;case DIFF_DELETE:html[x]="<del>"+data+"</del>";break;case DIFF_EQUAL:html[x]="<span>"+data+"</span>";break;}}
+return html.join("");};DiffMatchPatch.prototype.diffCommonPrefix=function(text1,text2){var pointermid,pointermax,pointermin,pointerstart;if(!text1||!text2||text1.charAt(0)!==text2.charAt(0)){return 0;}
+pointermin=0;pointermax=Math.min(text1.length,text2.length);pointermid=pointermax;pointerstart=0;while(pointermin<pointermid){if(text1.substring(pointerstart,pointermid)===text2.substring(pointerstart,pointermid)){pointermin=pointermid;pointerstart=pointermin;}else{pointermax=pointermid;}
+pointermid=Math.floor((pointermax-pointermin)/2+pointermin);}
+return pointermid;};DiffMatchPatch.prototype.diffCommonSuffix=function(text1,text2){var pointermid,pointermax,pointermin,pointerend;if(!text1||!text2||text1.charAt(text1.length-1)!==text2.charAt(text2.length-1)){return 0;}
+pointermin=0;pointermax=Math.min(text1.length,text2.length);pointermid=pointermax;pointerend=0;while(pointermin<pointermid){if(text1.substring(text1.length-pointermid,text1.length-pointerend)===text2.substring(text2.length-pointermid,text2.length-pointerend)){pointermin=pointermid;pointerend=pointermin;}else{pointermax=pointermid;}
+pointermid=Math.floor((pointermax-pointermin)/2+pointermin);}
+return pointermid;};/**/
+DiffMatchPatch.prototype.diffCompute=function(text1,text2,checklines,deadline){var diffs,longtext,shorttext,i,hm,text1A,text2A,text1B,text2B,midCommon,diffsA,diffsB;if(!text1){return[[DIFF_INSERT,text2]];}
+if(!text2){return[[DIFF_DELETE,text1]];}
+longtext=text1.length>text2.length?text1:text2;shorttext=text1.length>text2.length?text2:text1;i=longtext.indexOf(shorttext);if(i!==-1){diffs=[[DIFF_INSERT,longtext.substring(0,i)],[DIFF_EQUAL,shorttext],[DIFF_INSERT,longtext.substring(i+shorttext.length)]];if(text1.length>text2.length){diffs[0][0]=diffs[2][0]=DIFF_DELETE;}
+return diffs;}
+if(shorttext.length===1){return[[DIFF_DELETE,text1],[DIFF_INSERT,text2]];}
+hm =this.diffHalfMatch(text1,text2);if(hm){text1A=hm[0];text1B=hm[1];text2A=hm[2];text2B=hm[3];midCommon=hm[4];diffsA=this.DiffMain(text1A,text2A,checklines,deadline);diffsB=this.DiffMain(text1B,text2B,checklines,deadline);return diffsA.concat([[DIFF_EQUAL,midCommon]],diffsB);}
+if(checklines&&text1.length>100&&text2.length>100){return this.diffLineMode(text1,text2,deadline);}
+return this.diffBisect(text1,text2,deadline);};DiffMatchPatch.prototype.diffHalfMatch=function(text1,text2){var longtext,shorttext,dmp,text1A,text2B,text2A,text1B,midCommon,hm1,hm2,hm;if(this.DiffTimeout<=0){return null;}
+longtext=text1.length>text2.length?text1:text2;shorttext=text1.length>text2.length?text2:text1;if(longtext.length<4||shorttext.length*2<longtext.length){return null;}
+dmp=this;/**/
+function diffHalfMatchI(longtext,shorttext,i){var seed,j,bestCommon,prefixLength,suffixLength,bestLongtextA,bestLongtextB,bestShorttextA,bestShorttextB;seed=longtext.substring(i,i+Math.floor(longtext.length/4));j=-1;bestCommon="";while((j=shorttext.indexOf(seed,j+1))!==-1){prefixLength=dmp.diffCommonPrefix(longtext.substring(i),shorttext.substring(j));suffixLength=dmp.diffCommonSuffix(longtext.substring(0,i),shorttext.substring(0,j));if(bestCommon.length<suffixLength+prefixLength){bestCommon=shorttext.substring(j-suffixLength,j)+
+shorttext.substring(j,j+prefixLength);bestLongtextA=longtext.substring(0,i-suffixLength);bestLongtextB=longtext.substring(i+prefixLength);bestShorttextA=shorttext.substring(0,j-suffixLength);bestShorttextB=shorttext.substring(j+prefixLength);}}
+if(bestCommon.length*2>=longtext.length){return[bestLongtextA,bestLongtextB,bestShorttextA,bestShorttextB,bestCommon
+];}else{return null;}}
+hm1=diffHalfMatchI(longtext,shorttext,Math.ceil(longtext.length/4));hm2=diffHalfMatchI(longtext,shorttext,Math.ceil(longtext.length/2));if(!hm1&&!hm2){return null;}else if(!hm2){hm=hm1;}else if(!hm1){hm=hm2;}else{hm=hm1[4].length>hm2[4].length?hm1:hm2;}
+text1A,text1B,text2A,text2B;if(text1.length>text2.length){text1A=hm[0];text1B=hm[1];text2A=hm[2];text2B=hm[3];}else{text2A=hm[0];text2B=hm[1];text1A=hm[2];text1B=hm[3];}
+midCommon=hm[4];return[text1A,text1B,text2A,text2B,midCommon];};DiffMatchPatch.prototype.diffLineMode=function(text1,text2,deadline){var a,diffs,linearray,pointer,countInsert,countDelete,textInsert,textDelete,j;a=this.diffLinesToChars(text1,text2);text1=a.chars1;text2=a.chars2;linearray=a.lineArray;diffs=this.DiffMain(text1,text2,false,deadline);
+this.diffCharsToLines(diffs,linearray);this.diffCleanupSemantic(diffs);diffs.push([DIFF_EQUAL,""]);pointer=0;countDelete=0;countInsert=0;textDelete="";textInsert="";while(pointer<diffs.length){switch(diffs[pointer][0]){case DIFF_INSERT:countInsert++;textInsert+=diffs[pointer][1];break;case DIFF_DELETE:countDelete++;textDelete+=diffs[pointer][1];break;case DIFF_EQUAL:if(countDelete>=1&&countInsert>=1){diffs.splice(pointer-countDelete-countInsert,countDelete+countInsert);pointer=pointer-countDelete-countInsert;a=this.DiffMain(textDelete,textInsert,false,deadline);for(j=a.length-1;j>=0;j--){diffs.splice(pointer,0,a[j]);}
+pointer=pointer+a.length;}
+countInsert=0;countDelete=0;textDelete="";textInsert="";break;}
+pointer++;}
+diffs.pop();return diffs;};DiffMatchPatch.prototype.diffBisect=function(text1,text2,deadline){var text1Length,text2Length,maxD,vOffset,vLength,v1,v2,x,delta,front,k1start,k1end,k2start,k2end,k2Offset,k1Offset,x1,x2,y1,y2,d,k1,k2;text1Length=text1.length;text2Length=text2.length;maxD=Math.ceil((text1Length+text2Length)/2);vOffset=maxD;vLength=2*maxD;v1=new Array(vLength);v2=new Array(vLength);for(x=0;x<vLength;x++){v1[x]=-1;v2[x]=-1;}
+ v1[vOffset+1]=0;v2[vOffset+1]=0;delta=text1Length-text2Length;front=(delta%2!==0);k1start=0;k1end=0;k2start=0;k2end=0;for(d=0;d<maxD;d++){if((new Date()).getTime()>deadline){break;}
+for(k1=-d+k1start;k1<=d-k1end;k1+=2){k1Offset=vOffset+k1;if(k1===-d||(k1!==d&&v1[k1Offset-1]<v1[k1Offset+1])){x1=v1[k1Offset+1];}else{x1=v1[k1Offset-1]+1;}
+y1=x1-k1;while(x1<text1Length&&y1<text2Length&&text1.charAt(x1)===text2.charAt(y1)){x1++;y1++;}
+v1[k1Offset]=x1;if(x1>text1Length){k1end+=2;}else if(y1>text2Length){k1start+=2;}else if(front){k2Offset=vOffset+delta-k1;if(k2Offset>=0&&k2Offset<vLength&&v2[k2Offset]!==-1){x2=text1Length-v2[k2Offset];if(x1>=x2){return this.diffBisectSplit(text1,text2,x1,y1,deadline);}}
+}}
+for(k2=-d+k2start;k2<=d-k2end;k2+=2){k2Offset=vOffset+k2;if(k2===-d||(k2!==d&&v2[k2Offset-1]<v2[k2Offset+1])){x2=v2[k2Offset+1];}else{x2=v2[k2Offset-1]+1;}
+y2=x2-k2;while(x2<text1Length&&y2<text2Length&&text1.charAt(text1Length-x2-1)===text2.charAt(text2Length-y2-1)){x2++;y2++;}
+v2[k2Offset]=x2;if(x2>text1Length){k2end+=2;}else if(y2>text2Length){k2start+=2;}else if(!front){k1Offset=vOffset+delta-k2;if(k1Offset>=0&&k1Offset<vLength&&v1[k1Offset]!==-1){x1=v1[k1Offset];y1=vOffset+x1-k1Offset;x2=text1Length-x2;if(x1>=x2){return this.diffBisectSplit(text1,text2,x1,y1,deadline);}}}}}
+return[[DIFF_DELETE,text1],[DIFF_INSERT,text2]];};/**/
+DiffMatchPatch.prototype.diffBisectSplit=function(text1,text2,x,y,deadline){var text1a,text1b,text2a,text2b,diffs,diffsb;text1a=text1.substring(0,x);text2a=text2.substring(0,y);text1b=text1.substring(x);text2b=text2.substring(y);diffs=this.DiffMain(text1a,text2a,false,deadline);diffsb=this.DiffMain(text1b,text2b,false,deadline);return diffs.concat(diffsb);};DiffMatchPatch.prototype.diffCleanupSemantic=function(diffs){var changes,equalities,equalitiesLength,lastequality,pointer,lengthInsertions2,lengthDeletions2,lengthInsertions1,lengthDeletions1,deletion,insertion,overlapLength1,overlapLength2;changes=false;equalities=[];equalitiesLength=0;lastequality=null;pointer=0;lengthInsertions1=0;lengthDeletions1=0;lengthInsertions2=0;lengthDeletions2=0;while(pointer<diffs.length){if(diffs[pointer][0]===DIFF_EQUAL){equalities[equalitiesLength++]=pointer;lengthInsertions1=lengthInsertions2;lengthDeletions1=lengthDeletions2;lengthInsertions2=0;lengthDeletions2=0;lastequality=diffs[pointer][1];}else{if(diffs[pointer][0]===DIFF_INSERT){lengthInsertions2+=diffs[pointer][1].length;}else{lengthDeletions2+=diffs[pointer][1].length;}
+if(lastequality&&(lastequality.length<=Math.max(lengthInsertions1,lengthDeletions1))&&(lastequality.length<=Math.max(lengthInsertions2,lengthDeletions2))){diffs.splice(equalities[equalitiesLength-1],0,[DIFF_DELETE,lastequality]);diffs[equalities[equalitiesLength-1]+1][0]=DIFF_INSERT;equalitiesLength--;equalitiesLength--;pointer=equalitiesLength>0?equalities[equalitiesLength-1]:-1;lengthInsertions1=0;lengthDeletions1=0;lengthInsertions2=0;lengthDeletions2=0;lastequality=null;changes=true;}}
+pointer++;}
+if(changes){this.diffCleanupMerge(diffs);}
+pointer=1;while(pointer<diffs.length){if(diffs[pointer-1][0]===DIFF_DELETE&&diffs[pointer][0]===DIFF_INSERT){deletion=diffs[pointer-1][1];insertion=diffs[pointer][1];overlapLength1=this.diffCommonOverlap(deletion,insertion);overlapLength2=this.diffCommonOverlap(insertion,deletion);if(overlapLength1>=overlapLength2){if(overlapLength1>=deletion.length/2||overlapLength1>=insertion.length/2){diffs.splice(pointer,0,[DIFF_EQUAL,insertion.substring(0,overlapLength1)]);diffs[pointer-1][1]=deletion.substring(0,deletion.length-overlapLength1);diffs[pointer+1][1]=insertion.substring(overlapLength1);pointer++;}}else{if(overlapLength2>=deletion.length/2||overlapLength2>=insertion.length/2){diffs.splice(pointer,0,[DIFF_EQUAL,deletion.substring(0,overlapLength2)]);diffs[pointer-1][0]=DIFF_INSERT;diffs[pointer-1][1]=insertion.substring(0,insertion.length-overlapLength2);diffs[pointer+1][0]=DIFF_DELETE;diffs[pointer+1][1]=deletion.substring(overlapLength2);pointer++;}}
+pointer++;}
+pointer++;}};DiffMatchPatch.prototype.diffCommonOverlap=function(text1,text2){var text1Length,text2Length,textLength,best,length,pattern,found;text1Length=text1.length;text2Length=text2.length;if(text1Length===0||text2Length===0){return 0;}
+if(text1Length>text2Length){text1=text1.substring(text1Length-text2Length);}else if(text1Length<text2Length){ text2=text2.substring(0,text1Length);}
+textLength=Math.min(text1Length,text2Length);if(text1===text2){return textLength;}
+best=0;length=1;while(true){pattern=text1.substring(textLength-length);found=text2.indexOf(pattern);if(found===-1){return best;}
+length+=found;if(found===0||text1.substring(textLength-length)===text2.substring(0,length)){best=length;length++;}}};/**/
+DiffMatchPatch.prototype.diffLinesToChars=function(text1,text2){var lineArray,lineHash,chars1,chars2;lineArray=[];lineHash={};lineArray[0]="";function diffLinesToCharsMunge(text){var chars,lineStart,lineEnd,lineArrayLength,line;chars="";lineStart=0;lineEnd=-1;lineArrayLength=lineArray.length;while(lineEnd<text.length-1){lineEnd=text.indexOf("\n",lineStart);if(lineEnd===-1){lineEnd=text.length-1;}
+line=text.substring(lineStart,lineEnd+1);lineStart=lineEnd+1;if(lineHash.hasOwnProperty?lineHash.hasOwnProperty(line):(lineHash[line]!==undefined)){chars+=String.fromCharCode(lineHash[line]);}else{chars+=String.fromCharCode(lineArrayLength);lineHash[line]=lineArrayLength;lineArray[lineArrayLength++]=line;}}
+return chars;}
+chars1=diffLinesToCharsMunge(text1);chars2=diffLinesToCharsMunge(text2);return{chars1:chars1,chars2:chars2,lineArray:lineArray};};DiffMatchPatch.prototype.diffCharsToLines=function(diffs,lineArray){var x,chars,text,y;for(x=0;x<diffs.length;x++){chars=diffs[x][1];text=[];for(y=0;y<chars.length;y++){text[y]=lineArray[chars.charCodeAt(y)];}
+diffs[x][1]=text.join("");}};DiffMatchPatch.prototype.diffCleanupMerge=function(diffs){var pointer,countDelete,countInsert,textInsert,textDelete,commonlength,changes;diffs.push([DIFF_EQUAL,""]);pointer=0;countDelete=0;countInsert=0;textDelete="";textInsert="";commonlength;while(pointer<diffs.length){switch(diffs[pointer][0]){case DIFF_INSERT:countInsert++;textInsert+=diffs[pointer][1];pointer++;break;case DIFF_DELETE:countDelete++;textDelete+=diffs[pointer][1];pointer++;break;case DIFF_EQUAL:if(countDelete+countInsert>1){if(countDelete!==0&&countInsert!==0){commonlength=this.diffCommonPrefix(textInsert,textDelete);if(commonlength!==0){if((pointer-countDelete-countInsert)>0&&diffs[pointer-countDelete-countInsert-1][0]===
+ DIFF_EQUAL){diffs[pointer-countDelete-countInsert-1][1]+=textInsert.substring(0,commonlength);}else{diffs.splice(0,0,[DIFF_EQUAL,textInsert.substring(0,commonlength)]);pointer++;}
+textInsert=textInsert.substring(commonlength);textDelete=textDelete.substring(commonlength);}
+commonlength=this.diffCommonSuffix(textInsert,textDelete);if(commonlength!==0){diffs[pointer][1]=textInsert.substring(textInsert.length-
+commonlength)+diffs[pointer][1];textInsert=textInsert.substring(0,textInsert.length-
+commonlength);textDelete=textDelete.substring(0,textDelete.length-
+commonlength);}}
+if(countDelete===0){diffs.splice(pointer-countInsert,countDelete+countInsert,[DIFF_INSERT,textInsert]);}else if(countInsert===0){diffs.splice(pointer-countDelete,countDelete+countInsert,[DIFF_DELETE,textDelete]);}else{diffs.splice(pointer-countDelete-countInsert, countDelete+countInsert,[DIFF_DELETE,textDelete],[DIFF_INSERT,textInsert]);}
+pointer=pointer-countDelete-countInsert+(countDelete?1:0)+(countInsert?1:0)+1;}else if(pointer!==0&&diffs[pointer-1][0]===DIFF_EQUAL){diffs[pointer-1][1]+=diffs[pointer][1];diffs.splice(pointer,1);}else{pointer++;}
+countInsert=0;countDelete=0;textDelete="";textInsert="";break;}}
+if(diffs[diffs.length-1][1]===""){diffs.pop();}
+changes=false;pointer=1;while(pointer<diffs.length-1){if(diffs[pointer-1][0]===DIFF_EQUAL&&diffs[pointer+1][0]===DIFF_EQUAL){if(diffs[pointer][1].substring(diffs[pointer][1].length-
+diffs[pointer-1][1].length)===diffs[pointer-1][1]){diffs[pointer][1]=diffs[pointer-1][1]+
+diffs[pointer][1].substring(0,diffs[pointer][1].length-
+diffs[pointer-1][1].length);diffs[pointer+1][1]=diffs[pointer-1][1]+diffs[pointer+1][1];diffs.splice(pointer-1,1);changes=true;}else if(diffs[pointer][1].substring(0,diffs[pointer+1][1].length)===diffs[pointer+1][1]){diffs[pointer-1][1]+=diffs[pointer+1][1];diffs[pointer][1]=diffs[pointer][1].substring(diffs[pointer+1][1].length)+
+diffs[pointer+1][1];diffs.splice(pointer+1,1);changes=true;}}
+pointer++;}
+if(changes){this.diffCleanupMerge(diffs);}};return function(o,n){var diff,output,text;diff=new DiffMatchPatch();output=diff.DiffMain(o,n);diff.diffCleanupEfficiency(output);text=diff.diffPrettyHtml(output);return text;};}());//
+(function(){QUnit.init=function(){var tests,banner,result,qunit,config=QUnit.config;config.stats={all:0,bad:0};config.moduleStats={all:0,bad:0};config.started=0;config.updateRate=1000;config.blocking=false;config.autostart=true;config.autorun=false;config.filter="";config.queue=[];if(typeof window==="undefined"){return;}
+qunit=id("qunit");if(qunit){qunit.innerHTML="<h1 id='qunit-header'>"+escapeText(document.title)+"</h1>"+
+"<h2 id='qunit-banner'></h2>"+
+"<div id='qunit-testrunner-toolbar'></div>"+
+"<h2 id='qunit-userAgent'></h2>"+
+"<ol id='qunit-tests'></ol>";}
+tests=id("qunit-tests");banner=id("qunit-banner");result=id("qunit-testresult");if(tests){tests.innerHTML="";}
+if(banner){banner.className="";}
+if(result){result.parentNode.removeChild(result);}
+if(tests){result=document.createElement("p");result.id="qunit-testresult";result.className="result";tests.parentNode.insertBefore(result,tests);result.innerHTML="Running...<br />&#160;";}};if(typeof window==="undefined"){return;}
+var config=QUnit.config,hasOwn=Object.prototype.hasOwnProperty,defined={document:window.document!==undefined,sessionStorage:(function(){var x="qunit-test-string";try{sessionStorage.setItem(x,x);sessionStorage.removeItem(x);return true;}catch(e){return false;}}())},modulesList=[];function escapeText(s){if(!s){return "";}
+s=s+"";return s.replace(/['"<>&]/g,function(s){switch(s){case "'":return "&#039;";case "\"":return "&quot;";case "<":return "&lt;";case ">":return "&gt;";case "&":return "&amp;";}});}
+function addEvent(elem,type,fn){if(elem.addEventListener){elem.addEventListener(type,fn,false);}else if(elem.attachEvent){elem.attachEvent("on"+type,function(){var event=window.event;if(!event.target){event.target=event.srcElement||document;}
+fn.call(elem,event);});}}
+function addEvents(elems,type,fn){var i=elems.length;while(i--){addEvent(elems[i],type,fn);}}
+function hasClass(elem,name){return(" "+elem.className+" ").indexOf(" "+name+" ")>=0;}
+function addClass(elem,name){if(!hasClass(elem,name)){elem.className+=(elem.className?" ":"")+name;}}
+function toggleClass(elem,name){if(hasClass(elem,name)){removeClass(elem,name);}else{addClass(elem,name);}}
+function removeClass(elem,name){var set=" "+elem.className+" ";while(set.indexOf(" "+name+" ")>=0){set=set.replace(" "+name+" "," ");}
+elem.className=typeof set.trim==="function"?set.trim():set.replace(/^\s+|\s+$/g,"");}
+function id(name){return defined.document&&document.getElementById&&document.getElementById(name);}
+function getUrlConfigHtml(){var i,j,val,escaped,escapedTooltip,selection=false,len=config.urlConfig.length,urlConfigHtml="";for(i=0;i<len;i++){val=config.urlConfig[i];if(typeof val==="string"){val={id:val,label:val};}
+escaped=escapeText(val.id);escapedTooltip=escapeText(val.tooltip);if(config[val.id]===undefined){config[val.id]=QUnit.urlParams[val.id];}
+if(!val.value||typeof val.value==="string"){urlConfigHtml+="<input id='qunit-urlconfig-"+escaped+
+"' name='"+escaped+"' type='checkbox'"+(val.value?" value='"+escapeText(val.value)+"'":"")+(config[val.id]?" checked='checked'":"")+
+" title='"+escapedTooltip+"' /><label for='qunit-urlconfig-"+escaped+
+"' title='"+escapedTooltip+"'>"+val.label+"</label>";}else{urlConfigHtml+="<label for='qunit-urlconfig-"+escaped+
+"' title='"+escapedTooltip+"'>"+val.label+
+": </label><select id='qunit-urlconfig-"+escaped+
+"' name='"+escaped+"' title='"+escapedTooltip+"'><option></option>";if(QUnit.is("array",val.value)){for(j=0;j<val.value.length;j++){escaped=escapeText(val.value[j]);urlConfigHtml+="<option value='"+escaped+"'"+(config[val.id]===val.value[j]?(selection=true)&&" selected='selected'":"")+
+">"+escaped+"</option>";}}else{for(j in val.value){if(hasOwn.call(val.value,j)){urlConfigHtml+="<option value='"+escapeText(j)+"'"+(config[val.id]===j?(selection=true)&&" selected='selected'":"")+
+">"+escapeText(val.value[j])+"</option>";}}}
+if(config[val.id]&&!selection){escaped=escapeText(config[val.id]);urlConfigHtml+="<option value='"+escaped+
+"' selected='selected' disabled='disabled'>"+escaped+"</option>";}
+urlConfigHtml+="</select>";}}
+return urlConfigHtml;}
+function toolbarChanged(){var updatedUrl,value,field=this,params={};//
+if("selectedIndex" in field){value=field.options[field.selectedIndex].value||undefined;}else{value=field.checked?(field.defaultValue||true):undefined;}
+params[field.name]=value;updatedUrl=setUrl(params);if("hidepassed"===field.name&&"replaceState" in window.history){config[field.name]=value||false;if(value){addClass(id("qunit-tests"),"hidepass");}else{removeClass(id("qunit-tests"),"hidepass");}
+window.history.replaceState(null,"",updatedUrl);}else{window.location=updatedUrl;}}
+function setUrl(params){var key,querystring="?";params=QUnit.extend(QUnit.extend({},QUnit.urlParams),params);for(key in params){if(hasOwn.call(params,key)){if(params[key]===undefined){continue;}
+querystring+=encodeURIComponent(key);if(params[key]!==true){querystring+="="+encodeURIComponent(params[key]);}
+querystring+="&";}}
+return location.protocol+"//"+location.host+
+location.pathname+querystring.slice(0,-1);}
+function applyUrlParams(){var selectedModule,modulesList=id("qunit-modulefilter"),filter=id("qunit-filter-input").value;selectedModule=modulesList?decodeURIComponent(modulesList.options[modulesList.selectedIndex].value):undefined;window.location=setUrl({module:(selectedModule==="")?undefined:selectedModule,filter:(filter==="")?undefined:filter,testId:undefined});}
+function toolbarUrlConfigContainer(){var urlConfigContainer=document.createElement("span");urlConfigContainer.innerHTML=getUrlConfigHtml();addClass(urlConfigContainer,"qunit-url-config");addEvents(urlConfigContainer.getElementsByTagName("input"),"click",toolbarChanged);addEvents(urlConfigContainer.getElementsByTagName("select"),"change",toolbarChanged);return urlConfigContainer;}
+function toolbarLooseFilter(){var filter=document.createElement("form"),label=document.createElement("label"),input=document.createElement("input"),button=document.createElement("button");addClass(filter,"qunit-filter");label.innerHTML="Filter: ";input.type="text";input.value=config.filter||"";input.name="filter";input.id="qunit-filter-input";button.innerHTML="Go";label.appendChild(input);filter.appendChild(label);filter.appendChild(button);addEvent(filter,"submit",function(ev){applyUrlParams();if(ev&&ev.preventDefault){ev.preventDefault();}
+return false;});return filter;}
+function toolbarModuleFilterHtml(){var i,moduleFilterHtml="";if(!modulesList.length){return false;}
+modulesList.sort(function(a,b){return a.localeCompare(b);});moduleFilterHtml+="<label for='qunit-modulefilter'>Module: </label>"+
+"<select id='qunit-modulefilter' name='modulefilter'><option value='' "+(QUnit.urlParams.module===undefined?"selected='selected'":"")+
+">< All Modules ></option>";for(i=0;i<modulesList.length;i++){moduleFilterHtml+="<option value='"+
+escapeText(encodeURIComponent(modulesList[i]))+"' "+(QUnit.urlParams.module===modulesList[i]?"selected='selected'":"")+
+">"+escapeText(modulesList[i])+"</option>";}
+moduleFilterHtml+="</select>";return moduleFilterHtml;}
+function toolbarModuleFilter(){var toolbar=id("qunit-testrunner-toolbar"),moduleFilter=document.createElement("span"),moduleFilterHtml=toolbarModuleFilterHtml();if(!toolbar||!moduleFilterHtml){return false;}
+moduleFilter.setAttribute("id","qunit-modulefilter-container");moduleFilter.innerHTML=moduleFilterHtml;addEvent(moduleFilter.lastChild,"change",applyUrlParams);toolbar.appendChild(moduleFilter);}
+function appendToolbar(){var toolbar=id("qunit-testrunner-toolbar");if(toolbar){toolbar.appendChild(toolbarUrlConfigContainer());toolbar.appendChild(toolbarLooseFilter());}}
+function appendHeader(){var header=id("qunit-header");if(header){header.innerHTML="<a href='"+
+setUrl({filter:undefined,module:undefined,testId:undefined})+
+"'>"+header.innerHTML+"</a> ";}}
+function appendBanner(){var banner=id("qunit-banner");if(banner){banner.className="";}}
+function appendTestResults(){var tests=id("qunit-tests"),result=id("qunit-testresult");if(result){result.parentNode.removeChild(result);}
+if(tests){tests.innerHTML="";result=document.createElement("p");result.id="qunit-testresult";result.className="result";tests.parentNode.insertBefore(result,tests);result.innerHTML="Running...<br />&#160;";}}
+function storeFixture(){var fixture=id("qunit-fixture");if(fixture){config.fixture=fixture.innerHTML;}}
+function appendUserAgent(){var userAgent=id("qunit-userAgent");if(userAgent){userAgent.innerHTML="";userAgent.appendChild(document.createTextNode("QUnit "+QUnit.version+"; "+navigator.userAgent));}}
+function appendTestsList(modules){var i,l,x,z,test,moduleObj;for(i=0,l=modules.length;i<l;i++){moduleObj=modules[i];if(moduleObj.name){modulesList.push(moduleObj.name);}
+for(x=0,z=moduleObj.tests.length;x<z;x++){test=moduleObj.tests[x];appendTest(test.name,test.testId,moduleObj.name);}}}
+function appendTest(name,testId,moduleName){var title,rerunTrigger,testBlock,assertList,tests=id("qunit-tests");if(!tests){return;}
+title=document.createElement("strong");title.innerHTML=getNameHtml(name,moduleName);rerunTrigger=document.createElement("a");rerunTrigger.innerHTML="Rerun";rerunTrigger.href=setUrl({testId:testId});testBlock=document.createElement("li");testBlock.appendChild(title);testBlock.appendChild(rerunTrigger);testBlock.id="qunit-test-output-"+testId;assertList=document.createElement("ol");assertList.className="qunit-assert-list";testBlock.appendChild(assertList);tests.appendChild(testBlock);}
+QUnit.begin(function(details){var qunit=id("qunit");storeFixture();if(qunit){qunit.innerHTML="<h1 id='qunit-header'>"+escapeText(document.title)+"</h1>"+
+"<h2 id='qunit-banner'></h2>"+
+"<div id='qunit-testrunner-toolbar'></div>"+
+"<h2 id='qunit-userAgent'></h2>"+
+"<ol id='qunit-tests'></ol>";}
+appendHeader();appendBanner();appendTestResults();appendUserAgent();appendToolbar();appendTestsList(details.modules);toolbarModuleFilter();if(qunit&&config.hidepassed){addClass(qunit.lastChild,"hidepass");}});QUnit.done(function(details){var i,key,banner=id("qunit-banner"),tests=id("qunit-tests"),html=["Tests completed in ",details.runtime," milliseconds.<br />","<span class='passed'>",details.passed,"</span> assertions of <span class='total'>",details.total,"</span> passed, <span class='failed'>",details.failed,"</span> failed."].join("");if(banner){banner.className=details.failed?"qunit-fail":"qunit-pass";}
+if(tests){id("qunit-testresult").innerHTML=html;}
+if(config.altertitle&&defined.document&&document.title){document.title=[(details.failed?"\u2716":"\u2714"),document.title.replace(/^[\u2714\u2716] /i,"")].join(" ");}
+if(config.reorder&&defined.sessionStorage&&details.failed===0){for(i=0;i<sessionStorage.length;i++){key=sessionStorage.key(i++);if(key.indexOf("qunit-test-")===0){sessionStorage.removeItem(key);}}}
+if(config.scrolltop&&window.scrollTo){window.scrollTo(0,0);}});function getNameHtml(name,module){var nameHtml="";if(module){nameHtml="<span class='module-name'>"+escapeText(module)+"</span>: ";}
+nameHtml+="<span class='test-name'>"+escapeText(name)+"</span>";return nameHtml;}
+QUnit.testStart(function(details){var running,testBlock,bad;testBlock=id("qunit-test-output-"+details.testId);if(testBlock){testBlock.className="running";}else{appendTest(details.name,details.testId,details.module);}
+running=id("qunit-testresult");if(running){bad=QUnit.config.reorder&&defined.sessionStorage&&+sessionStorage.getItem("qunit-test-"+details.module+"-"+details.name);running.innerHTML=(bad?"Rerunning previously failed test: <br />":"Running: <br />")+
+getNameHtml(details.name,details.module);}});QUnit.log(function(details){var assertList,assertLi,message,expected,actual,testItem=id("qunit-test-output-"+details.testId);if(!testItem){return;}
+message=escapeText(details.message)||(details.result?"okay":"failed");message="<span class='test-message'>"+message+"</span>";message+="<span class='runtime'>@ "+details.runtime+" ms</span>";if(!details.result&&hasOwn.call(details,"expected")){expected=escapeText(QUnit.dump.parse(details.expected));actual=escapeText(QUnit.dump.parse(details.actual));message+="<table><tr class='test-expected'><th>Expected: </th><td><pre>"+
+expected+
+"</pre></td></tr>";if(actual!==expected){message+="<tr class='test-actual'><th>Result: </th><td><pre>"+
+actual+"</pre></td></tr>"+
+"<tr class='test-diff'><th>Diff: </th><td><pre>"+
+QUnit.diff(expected,actual)+"</pre></td></tr>";}else{if(expected.indexOf("[object Array]")!==-1||expected.indexOf("[object Object]")!==-1){message+="<tr class='test-message'><th>Message: </th><td>"+
+"Diff suppressed as the depth of object is more than current max depth ("+
+QUnit.config.maxDepth+").<p>Hint: Use <code>QUnit.dump.maxDepth</code> to "+
+" run with a higher max depth or <a href='"+setUrl({maxDepth:-1})+"'>"+
+"Rerun</a> without max depth.</p></td></tr>";}}
+if(details.source){message+="<tr class='test-source'><th>Source: </th><td><pre>"+
+escapeText(details.source)+"</pre></td></tr>";}
+message+="</table>";}else if(!details.result&&details.source){message+="<table>"+
+"<tr class='test-source'><th>Source: </th><td><pre>"+
+escapeText(details.source)+"</pre></td></tr>"+
+"</table>";}
+assertList=testItem.getElementsByTagName("ol")[0];assertLi=document.createElement("li");assertLi.className=details.result?"pass":"fail";assertLi.innerHTML=message;assertList.appendChild(assertLi);});QUnit.testDone(function(details){var testTitle,time,testItem,assertList,good,bad,testCounts,skipped,tests=id("qunit-tests");if(!tests){return;}
+testItem=id("qunit-test-output-"+details.testId);assertList=testItem.getElementsByTagName("ol")[0];good=details.passed;bad=details.failed;if(config.reorder&&defined.sessionStorage){if(bad){sessionStorage.setItem("qunit-test-"+details.module+"-"+details.name,bad);}else{sessionStorage.removeItem("qunit-test-"+ details.module+"-"+details.name);}}
+if(bad===0){addClass(assertList,"qunit-collapsed");}
+testTitle=testItem.firstChild;testCounts=bad?"<b class='failed'>"+bad+"</b>, "+"<b class='passed'>"+good+"</b>, ":"";testTitle.innerHTML+=" <b class='counts'>("+testCounts+
+details.assertions.length+")</b>";if(details.skipped){testItem.className="skipped";skipped=document.createElement("em");skipped.className="qunit-skipped-label";skipped.innerHTML="skipped";testItem.insertBefore(skipped,testTitle);}else{addEvent(testTitle,"click",function(){toggleClass(assertList,"qunit-collapsed");});testItem.className=bad?"fail":"pass";time=document.createElement("span");time.className="runtime";time.innerHTML=details.runtime+" ms";testItem.insertBefore(time,assertList);}});if(defined.document){if(document.readyState==="complete"){QUnit.load();}else{addEvent(window,"load",QUnit.load);}}else{config.pageLoaded=true;config.autorun=true;}})();
\ No newline at end of file
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/recipedetails.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/recipedetails.js
new file mode 100644
index 0000000..604db5f
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/recipedetails.js
@@ -0,0 +1,51 @@
+"use strict";
+
+function recipeDetailsPageInit(ctx){
+
+  $(".customise-btn").click(function(e){
+    e.preventDefault();
+    var imgCustomModal = $("#new-custom-image-modal");
+
+    if (imgCustomModal.length === 0)
+      throw("Modal new-custom-image not found");
+
+    var recipe = {id: $(this).data('recipe'), name: null}
+    newCustomImageModalSetRecipes([recipe]);
+    imgCustomModal.modal('show');
+  });
+
+  $("#add-layer-btn").click(function(){
+    var btn = $(this);
+
+    libtoaster.addRmLayer(ctx.recipe.layer_version,
+      true,
+      function (layersList){
+        var msg = libtoaster.makeLayerAddRmAlertMsg(ctx.recipe.layer_version,
+          layersList,
+          true);
+
+        libtoaster.showChangeNotification(msg);
+
+        var toShow = $("#customise-build-btns");
+
+        /* If we have no packages built yet also fade in the build packages
+         * hint message
+         */
+        if (ctx.recipe.totalPackages === 0){
+          toShow = toShow.add("#build-to-get-packages-msg");
+        }
+
+        $("#packages-alert").add(btn).fadeOut(function(){
+          toShow.fadeIn();
+        });
+    });
+  });
+
+  /* Trigger a build of your custom image */
+  $(".build-recipe-btn").click(function(){
+    libtoaster.startABuild(null, ctx.recipe.name,
+      function(){
+        window.location.replace(libtoaster.ctx.projectBuildsUrl);
+    });
+  });
+}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/table.js b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/table.js
index 40b5022..f738144 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/static/js/table.js
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/static/js/table.js
@@ -33,6 +33,10 @@
 
   loadData(tableParams);
 
+  // clicking on this set of elements removes the search
+  var clearSearchElements = $('.remove-search-btn-'+ctx.tableName +
+                              ', .show-all-'+ctx.tableName);
+
   function loadData(tableParams){
     $.ajax({
         type: "GET",
@@ -62,31 +66,27 @@
     paginationBtns.html("");
 
     if (tableParams.search)
-      $('.remove-search-btn-'+ctx.tableName).show();
+      clearSearchElements.show();
     else
-      $('.remove-search-btn-'+ctx.tableName).hide();
+      clearSearchElements.hide();
 
     $('.table-count-' + ctx.tableName).text(tableData.total);
     tableTotal = tableData.total;
 
     if (tableData.total === 0){
       tableContainer.hide();
-      /* If we were searching show the new search bar and return */
-      if (tableParams.search){
+      if ($("#no-results-special-"+ctx.tableName).length > 0) {
+        /* use this page's special no-results form instead of the default */
+        $("#no-results-search-input-"+ctx.tableName).val(tableParams.search);
+        $("#no-results-special-"+ctx.tableName).show();
+        $("#results-found-"+ctx.tableName).hide();
+      } else {
         $("#new-search-input-"+ctx.tableName).val(tableParams.search);
         $("#no-results-"+ctx.tableName).show();
       }
       table.trigger("table-done", [tableData.total, tableParams]);
 
       return;
-
-    /* We don't want to clutter the place with the table chrome if there
-     * are only a few results */
-    } else if (tableData.total <= 10 &&
-               !tableParams.filter &&
-               !tableParams.search){
-      $("#table-chrome-"+ctx.tableName).hide();
-      pagination.hide();
     } else {
       tableContainer.show();
       $("#no-results-"+ctx.tableName).hide();
@@ -239,16 +239,19 @@
           }
         }
 
+       if (col.field_name === tableData.default_orderby){
+         title.addClass("default-orderby");
+       }
+
       } else {
         /* Not orderable */
-        header.addClass("muted");
         header.css("font-weight", "normal");
-        header.append(col.title+' ');
+        header.append('<span class="muted">' + col.title + '</span> ');
       }
 
       /* Setup the filter button */
       if (col.filter_name){
-        var filterBtn = $('<a href="#" role="button" class="pull-right btn btn-mini" data-toggle="modal"><i class="icon-filter filtered"></i></a>');
+        var filterBtn = $('<a href="#" role="button" data-filter-on="' + col.filter_name + '" class="pull-right btn btn-mini" data-toggle="modal"><i class="icon-filter filtered"></i></a>');
 
         filterBtn.data('filter-name', col.filter_name);
         filterBtn.prop('id', col.filter_name);
@@ -324,7 +327,7 @@
       $("#"+ctx.tableName+" th").each(function(){
         for (var i in cols_hidden){
           if ($(this).hasClass(cols_hidden[i])){
-            $("."+cols_hidden[i]).hide();
+            table.find("."+cols_hidden[i]).hide();
             $("#checkbox-"+cols_hidden[i]).removeAttr("checked");
           }
         }
@@ -334,13 +337,14 @@
          * user setting.
          */
         for (var i in defaultHiddenCols) {
-          $("."+defaultHiddenCols[i]).hide();
+          table.find("."+defaultHiddenCols[i]).hide();
           $("#checkbox-"+defaultHiddenCols[i]).removeAttr("checked");
         }
     }
   }
 
-  function sortColumnClicked(){
+  function sortColumnClicked(e){
+    e.preventDefault();
 
     /* We only have one sort at a time so remove any existing sort indicators */
     $("#"+ctx.tableName+" th .icon-caret-down").hide();
@@ -377,14 +381,14 @@
     var disabled_cols = [];
 
     if ($(this).prop("checked")) {
-      $("."+col).show();
+      table.find("."+col).show();
     }  else {
-      $("."+col).hide();
+      table.find("."+col).hide();
       /* If we're ordered by the column we're hiding remove the order by */
       if (col === tableParams.orderby ||
           '-' + col === tableParams.orderby){
         tableParams.orderby = null;
-        loadData(tableParams);
+        $("#"+ctx.tableName +" .default-orderby").click();
       }
     }
 
@@ -396,11 +400,182 @@
     $.cookie("cols", JSON.stringify(disabled_cols));
   }
 
+  /**
+   * Create the DOM/JS for the client side of a TableFilterActionToggle
+   * or TableFilterActionDay
+   *
+   * filterName: (string) internal name for the filter action
+   * filterActionData: (object)
+   * filterActionData.count: (number) The number of items this filter will
+   * show when selected
+   *
+   * NB this triggers a filtervalue event each time its radio button is checked
+   */
+  function createActionRadio(filterName, filterActionData) {
+    var hasNoRecords = (Number(filterActionData.count) == 0);
+
+    var actionStr = '<div class="radio">' +
+                    '<input type="radio" name="filter"' +
+                    '       value="' + filterName + '"';
+
+    if (hasNoRecords) {
+      actionStr += ' disabled="disabled"';
+    }
+
+    actionStr += ' id="' + filterName + '">' +
+                 '<input type="hidden" name="filter_value" value="on"' +
+                 '       data-value-for="' + filterName + '">' +
+                 '<label class="filter-title' +
+                 (hasNoRecords ? ' muted' : '') + '"' +
+                 '       for="' + filterName + '">' +
+                 filterActionData.title +
+                 ' (' + filterActionData.count + ')' +
+                 '</label>' +
+                 '</div>';
+
+    var action = $(actionStr);
+
+    // fire the filtervalue event from this action when the radio button
+    // is active so that the apply button can be enabled
+    action.find('[type="radio"]').change(function () {
+      if ($(this).is(':checked')) {
+        action.trigger('filtervalue', 'on');
+      }
+    });
+
+    return action;
+  }
+
+  /**
+   * Create the DOM/JS for the client side of a TableFilterActionDateRange
+   *
+   * filterName: (string) internal name for the filter action
+   * filterValue: (string) from,to date range in format yyyy-mm-dd,yyyy-mm-dd;
+   * used to select the current values for the from/to datepickers;
+   * if this is partial (e.g. "yyyy-mm-dd,") only the applicable datepicker
+   * will have a date pre-selected; if empty, neither will
+   * filterActionData: (object) data for generating the action's HTML
+   * filterActionData.title: label for the radio button
+   * filterActionData.max: (string) maximum date for the pickers, in ISO 8601
+   * datetime format
+   * filterActionData.min: (string) minimum date for the pickers, ISO 8601
+   * datetime
+   *
+   * NB this triggers a filtervalue event each time its radio button is checked
+   */
+  function createActionDateRange(filterName, filterValue, filterActionData) {
+    var action = $('<div class="radio">' +
+                   '<input type="radio" name="filter"' +
+                   '       value="' + filterName + '" ' +
+                   '       id="' + filterName + '">' +
+                   '<input type="hidden" name="filter_value" value=""' +
+                   '       data-value-for="' + filterName + '">' +
+                   '<label class="filter-title"' +
+                   '       for="' + filterName + '">' +
+                   filterActionData.title +
+                   '</label>' +
+                   '<input type="text" maxlength="10" class="input-small"' +
+                   '       data-date-from-for="' + filterName + '">' +
+                   '<span class="help-inline">to</span>' +
+                   '<input type="text" maxlength="10" class="input-small"' +
+                   '       data-date-to-for="' + filterName + '">' +
+                   '<span class="help-inline get-help">(yyyy-mm-dd)</span>' +
+                   '</div>');
+
+    var radio = action.find('[type="radio"]');
+    var value = action.find('[data-value-for]');
+
+    // make the datepickers for the range
+    var options = {
+      dateFormat: 'yy-mm-dd',
+      maxDate: new Date(filterActionData.max),
+      minDate: new Date(filterActionData.min)
+    };
+
+    // create date pickers, setting currently-selected from and to dates
+    var selectedFrom = null;
+    var selectedTo = null;
+
+    var selectedFromAndTo = [];
+    if (filterValue) {
+      selectedFromAndTo = filterValue.split(',');
+    }
+
+    if (selectedFromAndTo.length == 2) {
+      selectedFrom = selectedFromAndTo[0];
+      selectedTo = selectedFromAndTo[1];
+    }
+
+    options.defaultDate = selectedFrom;
+    var inputFrom =
+      action.find('[data-date-from-for]').datepicker(options);
+    inputFrom.val(selectedFrom);
+
+    options.defaultDate = selectedTo;
+    var inputTo =
+      action.find('[data-date-to-for]').datepicker(options);
+    inputTo.val(selectedTo);
+
+    // set filter_value based on date pickers when
+    // one of their values changes; if either from or to are unset,
+    // the new value is null;
+    // this triggers a 'filter_value-change' event on the action's element,
+    // which is used to determine the disabled/enabled state of the "Apply"
+    // button
+    var changeHandler = function () {
+      var fromValue = inputFrom.val();
+      var toValue = inputTo.val();
+
+      var newValue = undefined;
+      if (fromValue !== '' && toValue !== '') {
+        newValue = fromValue + ',' + toValue;
+      }
+
+      value.val(newValue);
+
+      // if this action is selected, fire an event for the new range
+      if (radio.is(':checked')) {
+        action.trigger('filtervalue', newValue);
+      }
+    };
+
+    inputFrom.change(changeHandler);
+    inputTo.change(changeHandler);
+
+    // check the associated radio button on clicking a date picker
+    var checkRadio = function () {
+      radio.prop('checked', 'checked');
+
+      // checking the radio button this way doesn't cause the "change"
+      // event to fire, so we manually call the changeHandler
+      changeHandler();
+    };
+
+    inputFrom.focus(checkRadio);
+    inputTo.focus(checkRadio);
+
+    // selecting a date in a picker constrains the date you can
+    // set in the other picker
+    inputFrom.change(function () {
+      inputTo.datepicker('option', 'minDate', inputFrom.val());
+    });
+
+    inputTo.change(function () {
+      inputFrom.datepicker('option', 'maxDate', inputTo.val());
+    });
+
+    // checking the radio input causes the "Apply" button disabled state to
+    // change, depending on which from/to dates are supplied
+    radio.change(changeHandler);
+
+    return action;
+  }
+
   function filterOpenClicked(){
     var filterName = $(this).data('filter-name');
 
-    /* We need to pass in the curren search so that the filter counts take
-     * into account the current search filter
+    /* We need to pass in the current search so that the filter counts take
+     * into account the current search term
      */
     var params = {
       'name' : filterName,
@@ -414,38 +589,92 @@
         data: params,
         headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
         success: function (filterData) {
-          var filterActionRadios = $('#filter-actions-'+ctx.tableName);
+          /*
+            filterData structure:
 
-          $('#filter-modal-title-'+ctx.tableName).text(filterData.title);
-
-          filterActionRadios.text("");
-
-          for (var i in filterData.filter_actions){
-            var filterAction = filterData.filter_actions[i];
-
-            var action = $('<label class="radio"><input type="radio" name="filter" value=""><span class="filter-title"></span></label>');
-            var actionTitle = filterAction.title + ' (' + filterAction.count + ')';
-
-            var radioInput = action.children("input");
-
-            if (Number(filterAction.count) == 0){
-              radioInput.attr("disabled", "disabled");
+            {
+              title: '<title for the filter popup>',
+              filter_actions: [
+                {
+                  title: '<label for radio button inside the popup>',
+                  name: '<name of the filter action>',
+                  count: <number of items this filter will show>,
+                  ... additional data for the action ...
+                }
+              ]
             }
 
-            action.children(".filter-title").text(actionTitle);
+            each filter_action gets a radio button; the value of this is
+            set to filterName + ':' + filter_action.name; e.g.
 
-            radioInput.val(filterName + ':' + filterAction.name);
+              in_current_project:in_project
 
-            /* Setup the current selected filter, default to 'all' if
-             * no current filter selected.
-             */
-            if ((tableParams.filter &&
-                tableParams.filter === radioInput.val()) ||
-                filterAction.name == 'all') {
-                radioInput.attr("checked", "checked");
+            specifies the "in_project" action of the "in_current_project"
+            filter
+
+            the filterName is set on the column filter icon, and corresponds
+            to a value in the table's filter map
+
+            when the filter popup's "Apply" button is clicked, the
+            value for the radio button which is checked is passed in the
+            querystring, along with a filter_value, and applied to the
+            queryset on the table
+          */
+          var filterActionRadios = $('#filter-actions-' + ctx.tableName);
+          var filterApplyBtn = $('[data-role="filter-apply"]');
+
+          var setApplyButtonState = function (e, filterActionValue) {
+            if (filterActionValue !== undefined) {
+              filterApplyBtn.removeAttr('disabled');
+            }
+            else {
+              filterApplyBtn.attr('disabled', 'disabled');
+            }
+          };
+
+          $('#filter-modal-title-' + ctx.tableName).text(filterData.title);
+
+          filterActionRadios.empty();
+
+          // create a radio button + form elements for each action associated
+          // with the filter on this column of the table
+          for (var i in filterData.filter_actions) {
+            var action = null;
+            var filterActionData = filterData.filter_actions[i];
+            var filterName = filterData.name + ':' +
+                             filterActionData.action_name;
+
+            if (filterActionData.type === 'toggle' ||
+                filterActionData.type === 'day') {
+              action = createActionRadio(filterName, filterActionData);
+            }
+            else if (filterActionData.type === 'daterange') {
+              // current values for the from/to dates
+              var filterValue = tableParams.filter_value;
+
+              action = createActionDateRange(
+                filterName,
+                filterValue,
+                filterActionData
+              );
             }
 
-            filterActionRadios.append(action);
+            if (action) {
+              // Setup the current selected filter; default to 'all' if
+              // no current filter selected
+              var radioInput = action.children('input[name="filter"]');
+              if ((tableParams.filter &&
+                  tableParams.filter === radioInput.val()) ||
+                  filterActionData.action_name == 'all') {
+                  radioInput.prop("checked", "checked");
+              }
+
+              filterActionRadios.append(action);
+
+              // if the action's filter_value changes but is falsy, disable
+              // the "Apply" button
+              action.on('filtervalue', setApplyButtonState);
+            }
           }
 
           $('#filter-modal-'+ctx.tableName).modal('show');
@@ -453,6 +682,13 @@
     });
   }
 
+  /* Allow pages to trigger reload event */
+  table.on('reload', function(e, newTableParams){
+    if (newTableParams)
+      loadData(newTableParams);
+    else
+      loadData(tableParams)
+  });
 
   $(".get-help").tooltip({container:'body', html:true, delay:{show:300}});
 
@@ -476,6 +712,7 @@
   });
 
   $("#search-submit-"+ctx.tableName).click(function(e){
+    e.preventDefault();
     var searchTerm = $("#search-input-"+ctx.tableName).val();
 
     tableParams.page = 1;
@@ -489,11 +726,9 @@
     }
 
     loadData(tableParams);
-
-    e.preventDefault();
   });
 
-  $('.remove-search-btn-'+ctx.tableName).click(function(e){
+  clearSearchElements.click(function(e){
     e.preventDefault();
 
     tableParams.page = 1;
@@ -514,7 +749,9 @@
     e.preventDefault();
   });
 
-  $("#clear-filter-btn-"+ctx.tableName).click(function(){
+  $("#clear-filter-btn-"+ctx.tableName).click(function(e){
+    e.preventDefault();
+
     var filterBtn = $("#" + tableParams.filter.split(":")[0]);
     filterBtnActive(filterBtn, false);
 
@@ -525,15 +762,27 @@
   $("#filter-modal-form-"+ctx.tableName).submit(function(e){
     e.preventDefault();
 
-    tableParams.filter = $(this).find("input[type='radio']:checked").val();
+    /* remove active status from all filter buttons so that only one filter
+       can be active at a time */
+    $('[data-filter-on]').each(function (index, filterBtn) {
+      filterBtnActive($(filterBtn), false);
+    });
 
-    var filterBtn = $("#" + tableParams.filter.split(":")[0]);
+    // checked radio button
+    var checkedFilter = $(this).find("input[name='filter']:checked");
+    tableParams.filter = checkedFilter.val();
+
+    // hidden field holding the value for the checked filter
+    var checkedFilterValue = $(this).find("input[data-value-for='" +
+                                          tableParams.filter + "']");
+    tableParams.filter_value = checkedFilterValue.val();
 
     /* All === remove filter */
     if (tableParams.filter.match(":all$")) {
       tableParams.filter = null;
-      filterBtnActive(filterBtn, false);
+      tableParams.filter_value = null;
     } else {
+      var filterBtn = $("#" + tableParams.filter.split(":")[0]);
       filterBtnActive(filterBtn, true);
     }
 
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/tablefilter.py b/yocto-poky/bitbake/lib/toaster/toastergui/tablefilter.py
new file mode 100644
index 0000000..9d15bcf
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/tablefilter.py
@@ -0,0 +1,292 @@
+#
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2015        Intel Corporation
+#
+# 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.
+
+from django.db.models import Q, Max, Min
+from django.utils import dateparse, timezone
+from datetime import timedelta
+
+class TableFilter(object):
+    """
+    Stores a filter for a named field, and can retrieve the action
+    requested from the set of actions for that filter;
+    the order in which actions are added governs the order in which they
+    are returned in the JSON for the filter
+    """
+
+    def __init__(self, name, title):
+        self.name = name
+        self.title = title
+        self.__filter_action_map = {}
+
+        # retains the ordering of actions
+        self.__filter_action_keys = []
+
+    def add_action(self, action):
+        self.__filter_action_keys.append(action.name)
+        self.__filter_action_map[action.name] = action
+
+    def get_action(self, action_name):
+        return self.__filter_action_map[action_name]
+
+    def to_json(self, queryset):
+        """
+        Dump all filter actions as an object which can be JSON serialised;
+        this is used to generate the JSON for processing in
+        table.js / filterOpenClicked()
+        """
+        filter_actions = []
+
+        # add the "all" pseudo-filter action, which just selects the whole
+        # queryset
+        filter_actions.append({
+            'action_name' : 'all',
+            'title' : 'All',
+            'type': 'toggle',
+            'count' : queryset.count()
+        })
+
+        # add other filter actions
+        for action_name in self.__filter_action_keys:
+            filter_action = self.__filter_action_map[action_name]
+            obj = filter_action.to_json(queryset)
+            obj['action_name'] = action_name
+            filter_actions.append(obj)
+
+        return {
+            'name': self.name,
+            'title': self.title,
+            'filter_actions': filter_actions
+        }
+
+class TableFilterQueryHelper(object):
+    def dateStringsToQ(self, field_name, date_from_str, date_to_str):
+        """
+        Convert the date strings from_date_str and to_date_str into a
+        set of args in the form
+
+          {'<field_name>__gte': <date from>, '<field_name>__lte': <date to>}
+
+        where date_from and date_to are Django-timezone-aware dates; then
+        convert that into a Django Q object
+
+        Returns the Q object based on those criteria
+        """
+
+        # one of the values required for the filter is missing, so set
+        # it to the one which was supplied
+        if date_from_str == '':
+            date_from_str = date_to_str
+        elif date_to_str == '':
+            date_to_str = date_from_str
+
+        date_from_naive = dateparse.parse_datetime(date_from_str + ' 00:00:00')
+        date_to_naive = dateparse.parse_datetime(date_to_str + ' 23:59:59')
+
+        tz = timezone.get_default_timezone()
+        date_from = timezone.make_aware(date_from_naive, tz)
+        date_to = timezone.make_aware(date_to_naive, tz)
+
+        args = {}
+        args[field_name + '__gte'] = date_from
+        args[field_name + '__lte'] = date_to
+
+        return Q(**args)
+
+class TableFilterAction(object):
+    """
+    A filter action which displays in the filter popup for a ToasterTable
+    and uses an associated QuerysetFilter to filter the queryset for that
+    ToasterTable
+    """
+
+    def __init__(self, name, title, criteria):
+        self.name = name
+        self.title = title
+        self.criteria = criteria
+
+        # set in subclasses
+        self.type = None
+
+    def set_filter_params(self, params):
+        """
+        params: (str) a string of extra parameters for the action;
+        the structure of this string depends on the type of action;
+        it's ignored for a toggle filter action, which is just on or off
+        """
+        pass
+
+    def filter(self, queryset):
+        if self.criteria:
+            return queryset.filter(self.criteria)
+        else:
+            return queryset
+
+    def to_json(self, queryset):
+        """ Dump as a JSON object """
+        return {
+            'title': self.title,
+            'type': self.type,
+            'count': self.filter(queryset).count()
+        }
+
+class TableFilterActionToggle(TableFilterAction):
+    """
+    A single filter action which will populate one radio button of
+    a ToasterTable filter popup; this filter can either be on or off and
+    has no other parameters
+    """
+
+    def __init__(self, *args):
+        super(TableFilterActionToggle, self).__init__(*args)
+        self.type = 'toggle'
+
+class TableFilterActionDay(TableFilterAction):
+    """
+    A filter action which filters according to the named datetime field and a
+    string representing a day ("today" or "yesterday")
+    """
+
+    TODAY = 'today'
+    YESTERDAY = 'yesterday'
+
+    def __init__(self, name, title, field, day,
+    query_helper = TableFilterQueryHelper()):
+        """
+        field: (string) the datetime field to filter by
+        day: (string) "today" or "yesterday"
+        """
+        super(TableFilterActionDay, self).__init__(name, title, None)
+        self.type = 'day'
+        self.field = field
+        self.day = day
+        self.query_helper = query_helper
+
+    def filter(self, queryset):
+        """
+        Apply the day filtering before returning the queryset;
+        this is done here as the value of the filter criteria changes
+        depending on when the filtering is applied
+        """
+
+        now = timezone.now()
+
+        if self.day == self.YESTERDAY:
+            increment = timedelta(days=1)
+            wanted_date = now - increment
+        else:
+            wanted_date = now
+
+        wanted_date_str = wanted_date.strftime('%Y-%m-%d')
+
+        self.criteria = self.query_helper.dateStringsToQ(
+            self.field,
+            wanted_date_str,
+            wanted_date_str
+        )
+
+        return queryset.filter(self.criteria)
+
+class TableFilterActionDateRange(TableFilterAction):
+    """
+    A filter action which will filter the queryset by a date range.
+    The date range can be set via set_params()
+    """
+
+    def __init__(self, name, title, field,
+    query_helper = TableFilterQueryHelper()):
+        """
+        field: (string) the field to find the max/min range from in the queryset
+        """
+        super(TableFilterActionDateRange, self).__init__(
+            name,
+            title,
+            None
+        )
+
+        self.type = 'daterange'
+        self.field = field
+        self.query_helper = query_helper
+
+    def set_filter_params(self, params):
+        """
+        This filter depends on the user selecting some input, so it needs
+        to have its parameters set before its queryset is filtered
+
+        params: (str) a string of extra parameters for the filtering
+        in the format "2015-12-09,2015-12-11" (from,to); this is passed in the
+        querystring and used to set the criteria on the QuerysetFilter
+        associated with this action
+        """
+
+        # if params are invalid, return immediately, resetting criteria
+        # on the QuerysetFilter
+        try:
+            date_from_str, date_to_str = params.split(',')
+        except ValueError:
+            self.criteria = None
+            return
+
+        # one of the values required for the filter is missing, so set
+        # it to the one which was supplied
+        self.criteria = self.query_helper.dateStringsToQ(
+            self.field,
+            date_from_str,
+            date_to_str
+        )
+
+    def to_json(self, queryset):
+        """ Dump as a JSON object """
+        data = super(TableFilterActionDateRange, self).to_json(queryset)
+
+        # additional data about the date range covered by the queryset's
+        # records, retrieved from its <field> column
+        data['min'] = queryset.aggregate(Min(self.field))[self.field + '__min']
+        data['max'] = queryset.aggregate(Max(self.field))[self.field + '__max']
+
+        # a range filter has a count of None, as the number of records it
+        # will select depends on the date range entered and we don't know
+        # that ahead of time
+        data['count'] = None
+
+        return data
+
+class TableFilterMap(object):
+    """
+    Map from field names to TableFilter objects for those fields
+    """
+
+    def __init__(self):
+        self.__filters = {}
+
+    def add_filter(self, filter_name, table_filter):
+        """ table_filter is an instance of Filter """
+        self.__filters[filter_name] = table_filter
+
+    def get_filter(self, filter_name):
+        return self.__filters[filter_name]
+
+    def to_json(self, queryset):
+        data = {}
+
+        for filter_name, table_filter in self.__filters.iteritems():
+            data[filter_name] = table_filter.to_json()
+
+        return data
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/tables.py b/yocto-poky/bitbake/lib/toaster/toastergui/tables.py
index 9c9cda4..2cc2f4e 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/tables.py
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/tables.py
@@ -21,29 +21,27 @@
 
 from toastergui.widgets import ToasterTable
 from orm.models import Recipe, ProjectLayer, Layer_Version, Machine, Project
-from orm.models import CustomImageRecipe, Package
-from django.db.models import Q, Max
+from orm.models import CustomImageRecipe, Package, Target, Build, LogMessage, Task
+from orm.models import CustomImagePackage
+from django.db.models import Q, Max, Sum, Count, When, Case, Value, IntegerField
 from django.conf.urls import url
-from django.core.urlresolvers import reverse
+from django.core.urlresolvers import reverse, resolve
+from django.http import HttpResponse
 from django.views.generic import TemplateView
 
+from toastergui.tablefilter import TableFilter
+from toastergui.tablefilter import TableFilterActionToggle
+from toastergui.tablefilter import TableFilterActionDateRange
+from toastergui.tablefilter import TableFilterActionDay
 
-class ProjectFiltersMixin(object):
-    """Common mixin for recipe, machine in project filters"""
+class ProjectFilters(object):
+    @staticmethod
+    def in_project(project_layers):
+        return Q(layer_version__in=project_layers)
 
-    def filter_in_project(self, count_only=False):
-        query = self.queryset.filter(layer_version__in=self.project_layers)
-        if count_only:
-            return query.count()
-
-        self.queryset = query
-
-    def filter_not_in_project(self, count_only=False):
-        query = self.queryset.exclude(layer_version__in=self.project_layers)
-        if count_only:
-            return query.count()
-
-        self.queryset = query
+    @staticmethod
+    def not_in_project(project_layers):
+        return ~(ProjectFilters.in_project(project_layers))
 
 class LayersTable(ToasterTable):
     """Table of layers in Toaster"""
@@ -61,33 +59,32 @@
 
         return context
 
-
     def setup_filters(self, *args, **kwargs):
         project = Project.objects.get(pk=kwargs['pid'])
         self.project_layers = ProjectLayer.objects.filter(project=project)
 
+        in_current_project_filter = TableFilter(
+            "in_current_project",
+            "Filter by project layers"
+        )
 
-        self.add_filter(title="Filter by project layers",
-                        name="in_current_project",
-                        filter_actions=[
-                            self.make_filter_action("in_project", "Layers added to this project", self.filter_in_project),
-                            self.make_filter_action("not_in_project", "Layers not added to this project", self.filter_not_in_project)
-                        ])
+        criteria = Q(projectlayer__in=self.project_layers)
 
-    def filter_in_project(self, count_only=False):
-        query = self.queryset.filter(projectlayer__in=self.project_layers)
-        if count_only:
-            return query.count()
+        in_project_action = TableFilterActionToggle(
+            "in_project",
+            "Layers added to this project",
+            criteria
+        )
 
-        self.queryset = query
+        not_in_project_action = TableFilterActionToggle(
+            "not_in_project",
+            "Layers not added to this project",
+            ~criteria
+        )
 
-    def filter_not_in_project(self, count_only=False):
-        query = self.queryset.exclude(projectlayer__in=self.project_layers)
-        if count_only:
-            return query.count()
-
-        self.queryset = query
-
+        in_current_project_filter.add_action(in_project_action)
+        in_current_project_filter.add_action(not_in_project_action)
+        self.add_filter(in_current_project_filter)
 
     def setup_queryset(self, *args, **kwargs):
         prj = Project.objects.get(pk = kwargs['pid'])
@@ -161,7 +158,7 @@
         {% endwith %}
         '''
 
-        self.add_column(title="Revision",
+        self.add_column(title="Git revision",
                         help_text="The Git branch, tag or commit. For the layers from the OpenEmbedded layer source, the revision is always the branch compatible with the Yocto Project version you selected for this project",
                         static_data_name="revision",
                         static_data_template=revision_template)
@@ -186,8 +183,8 @@
                         static_data_name="dependencies",
                         static_data_template=deps_template)
 
-        self.add_column(title="Add | Delete",
-                        help_text="Add or delete layers to / from your project",
+        self.add_column(title="Add | Remove",
+                        help_text="Add or remove layers to / from your project",
                         hideable=False,
                         filter_name="in_current_project",
                         static_data_name="add-del-layers",
@@ -205,7 +202,7 @@
                         computation = lambda x: x.layer.name)
 
 
-class MachinesTable(ToasterTable, ProjectFiltersMixin):
+class MachinesTable(ToasterTable):
     """Table of Machines in Toaster"""
 
     def __init__(self, *args, **kwargs):
@@ -217,25 +214,41 @@
     def get_context_data(self, **kwargs):
         context = super(MachinesTable, self).get_context_data(**kwargs)
         context['project'] = Project.objects.get(pk=kwargs['pid'])
-        context['projectlayers'] = map(lambda prjlayer: prjlayer.layercommit.id, ProjectLayer.objects.filter(project=context['project']))
         return context
 
     def setup_filters(self, *args, **kwargs):
         project = Project.objects.get(pk=kwargs['pid'])
-        self.project_layers = project.get_project_layer_versions()
 
-        self.add_filter(title="Filter by project machines",
-                        name="in_current_project",
-                        filter_actions=[
-                            self.make_filter_action("in_project", "Machines provided by layers added to this project", self.filter_in_project),
-                            self.make_filter_action("not_in_project", "Machines provided by layers not added to this project", self.filter_not_in_project)
-                        ])
+        in_current_project_filter = TableFilter(
+            "in_current_project",
+            "Filter by project machines"
+        )
+
+        in_project_action = TableFilterActionToggle(
+            "in_project",
+            "Machines provided by layers added to this project",
+            ProjectFilters.in_project(self.project_layers)
+        )
+
+        not_in_project_action = TableFilterActionToggle(
+            "not_in_project",
+            "Machines provided by layers not added to this project",
+            ProjectFilters.not_in_project(self.project_layers)
+        )
+
+        in_current_project_filter.add_action(in_project_action)
+        in_current_project_filter.add_action(not_in_project_action)
+        self.add_filter(in_current_project_filter)
 
     def setup_queryset(self, *args, **kwargs):
         prj = Project.objects.get(pk = kwargs['pid'])
         self.queryset = prj.get_all_compatible_machines()
         self.queryset = self.queryset.order_by(self.default_orderby)
 
+        self.static_context_extra['current_layers'] = \
+                self.project_layers = \
+                prj.get_project_layer_versions(pk=True)
+
     def setup_columns(self, *args, **kwargs):
 
         self.add_column(title="Machine",
@@ -256,7 +269,7 @@
                         static_data_template=layer_link_template,
                         orderable=True)
 
-        self.add_column(title="Revision",
+        self.add_column(title="Git revision",
                         help_text="The Git branch, tag or commit. For the layers from the OpenEmbedded layer source, the revision is always the branch compatible with the Yocto Project version you selected for this project",
                         hidden=True,
                         field_name="layer_version__get_vcs_reference")
@@ -293,6 +306,7 @@
         MachinesTable.setup_queryset(self, *args, **kwargs)
 
         self.queryset = self.queryset.filter(layer_version__pk=int(kwargs['layerid']))
+        self.queryset = self.queryset.order_by(self.default_orderby)
         self.static_context_extra['in_prj'] = ProjectLayer.objects.filter(Q(project=kwargs['pid']) & Q(layercommit=kwargs['layerid'])).count()
 
     def setup_columns(self, *args, **kwargs):
@@ -311,13 +325,12 @@
                         static_data_template=select_btn_template)
 
 
-class RecipesTable(ToasterTable, ProjectFiltersMixin):
+class RecipesTable(ToasterTable):
     """Table of All Recipes in Toaster"""
 
     def __init__(self, *args, **kwargs):
         super(RecipesTable, self).__init__(*args, **kwargs)
         self.empty_state = "Toaster has no recipe information. To generate recipe information you can configure a layer source then run a build."
-        self.default_orderby = "name"
 
     build_col = { 'title' : "Build",
             'help_text' : "Add or delete recipes to and from your project",
@@ -337,12 +350,26 @@
         return context
 
     def setup_filters(self, *args, **kwargs):
-        self.add_filter(title="Filter by project recipes",
-                        name="in_current_project",
-                        filter_actions=[
-                            self.make_filter_action("in_project", "Recipes provided by layers added to this project", self.filter_in_project),
-                            self.make_filter_action("not_in_project", "Recipes provided by layers not added to this project", self.filter_not_in_project)
-                        ])
+        table_filter = TableFilter(
+            'in_current_project',
+            'Filter by project recipes'
+        )
+
+        in_project_action = TableFilterActionToggle(
+            'in_project',
+            'Recipes provided by layers added to this project',
+            ProjectFilters.in_project(self.project_layers)
+        )
+
+        not_in_project_action = TableFilterActionToggle(
+            'not_in_project',
+            'Recipes provided by layers not added to this project',
+            ProjectFilters.not_in_project(self.project_layers)
+        )
+
+        table_filter.add_action(in_project_action)
+        table_filter.add_action(not_in_project_action)
+        self.add_filter(table_filter)
 
     def setup_queryset(self, *args, **kwargs):
         prj = Project.objects.get(pk = kwargs['pid'])
@@ -354,7 +381,6 @@
         self.static_context_extra['current_layers'] = self.project_layers
 
         self.queryset = prj.get_all_compatible_recipes()
-        self.queryset = self.queryset.order_by(self.default_orderby)
 
 
     def setup_columns(self, *args, **kwargs):
@@ -402,7 +428,7 @@
                         orderable=True,
                         field_name="license")
 
-        self.add_column(title="Revision",
+        self.add_column(title="Git revision",
                         hidden=True,
                         field_name="layer_version__get_vcs_reference")
 
@@ -412,6 +438,7 @@
 
     def __init__(self, *args, **kwargs):
         super(LayerRecipesTable, self).__init__(*args, **kwargs)
+        self.default_orderby = "name"
 
     def get_context_data(self, **kwargs):
         context = super(LayerRecipesTable, self).get_context_data(**kwargs)
@@ -423,6 +450,7 @@
         self.queryset = \
                 Recipe.objects.filter(layer_version__pk=int(kwargs['layerid']))
 
+        self.queryset = self.queryset.order_by(self.default_orderby)
         self.static_context_extra['in_prj'] = ProjectLayer.objects.filter(Q(project=kwargs['pid']) & Q(layercommit=kwargs['layerid'])).count()
 
     def setup_columns(self, *args, **kwargs):
@@ -449,18 +477,19 @@
     def __init__(self, *args, **kwargs):
         super(CustomImagesTable, self).__init__(*args, **kwargs)
         self.title = "Custom images"
+        self.default_orderby = "name"
 
     def get_context_data(self, **kwargs):
         context = super(CustomImagesTable, self).get_context_data(**kwargs)
         project = Project.objects.get(pk=kwargs['pid'])
+        # TODO put project into the ToasterTable base class
         context['project'] = project
-        context['projectlayers'] = map(lambda prjlayer: prjlayer.layercommit.id, ProjectLayer.objects.filter(project=context['project']))
         return context
 
     def setup_queryset(self, *args, **kwargs):
         prj = Project.objects.get(pk = kwargs['pid'])
         self.queryset = CustomImageRecipe.objects.filter(project=prj)
-        self.queryset = self.queryset.order_by('name')
+        self.queryset = self.queryset.order_by(self.default_orderby)
 
     def setup_columns(self, *args, **kwargs):
 
@@ -472,22 +501,37 @@
 
         self.add_column(title="Custom image",
                         hideable=False,
+                        orderable=True,
+                        field_name="name",
                         static_data_name="name",
                         static_data_template=name_link_template)
 
-        self.add_column(title="Recipe file",
-                        static_data_name='recipe_file',
-                        static_data_template='')
+        recipe_file_template = '''
+        <code>{{data.name}}_{{data.version}}.bb</code>
+        <a href="{% url 'customrecipedownload' extra.pid data.pk %}">
+        <i class="icon-download-alt" data-original-title="Download recipe
+        file"></i>
+        </a>'''
 
-        approx_packages_template = '<a href="#imagedetails">{{data.packages.all|length}}</a>'
+        self.add_column(title="Recipe file",
+                        static_data_name='recipe_file_download',
+                        static_data_template=recipe_file_template)
+
+        approx_packages_template = '''
+        <a href="{% url 'customrecipe' extra.pid data.id %}">
+          {{data.get_all_packages.count}}
+        </a>'''
+
         self.add_column(title="Approx packages",
                         static_data_name='approx_packages',
                         static_data_template=approx_packages_template)
 
 
-        build_btn_template = '''<button data-recipe-name="{{data.name}}"
+        build_btn_template = '''
+        <button data-recipe-name="{{data.name}}"
         class="btn btn-block build-recipe-btn" style="margin-top: 5px;" >
-        Build</button>'''
+        Build
+        </button>'''
 
         self.add_column(title="Build",
                         hideable=False,
@@ -500,20 +544,32 @@
     def __init__(self, *args, **kwargs):
         super(ImageRecipesTable, self).__init__(*args, **kwargs)
         self.title = "Compatible image recipes"
+        self.default_orderby = "name"
 
     def setup_queryset(self, *args, **kwargs):
         super(ImageRecipesTable, self).setup_queryset(*args, **kwargs)
 
-        self.queryset = self.queryset.filter(is_image=True)
+        custom_image_recipes = CustomImageRecipe.objects.filter(
+                project=kwargs['pid'])
+        self.queryset = self.queryset.filter(
+                Q(is_image=True) & ~Q(pk__in=custom_image_recipes))
+        self.queryset = self.queryset.order_by(self.default_orderby)
 
 
     def setup_columns(self, *args, **kwargs):
+
+        name_link_template = '''
+        <a href="{% url 'recipedetails' extra.pid data.pk %}">{{data.name}}</a>
+        '''
+
         self.add_column(title="Image recipe",
                         help_text="When you build an image recipe, you get an "
                                   "image: a root file system you can"
                                   "deploy to a machine",
                         hideable=False,
                         orderable=True,
+                        static_data_name="name",
+                        static_data_template=name_link_template,
                         field_name="name")
 
         super(ImageRecipesTable, self).setup_columns(*args, **kwargs)
@@ -529,17 +585,27 @@
 
     def setup_queryset(self, *args, **kwargs):
         super(ImageRecipesTable, self).setup_queryset(*args, **kwargs)
+        prj = Project.objects.get(pk = kwargs['pid'])
+        self.static_context_extra['current_layers'] = \
+                prj.get_project_layer_versions(pk=True)
 
         self.queryset = self.queryset.filter(is_image=True)
 
     def setup_columns(self, *args, **kwargs):
+
+        name_link_template = '''
+        <a href="{% url 'recipedetails' extra.pid data.pk %}">{{data.name}}</a>
+        '''
+
         self.add_column(title="Image recipe",
                         help_text="When you build an image recipe, you get an "
                                   "image: a root file system you can"
                                   "deploy to a machine",
                         hideable=False,
                         orderable=True,
-                        field_name="recipe__name")
+                        static_data_name="name",
+                        static_data_template=name_link_template,
+                        field_name="name")
 
         super(ImageRecipesTable, self).setup_columns(*args, **kwargs)
 
@@ -555,11 +621,13 @@
     def __init__(self, *args, **kwargs):
         super(SoftwareRecipesTable, self).__init__(*args, **kwargs)
         self.title = "Compatible software recipes"
+        self.default_orderby = "name"
 
     def setup_queryset(self, *args, **kwargs):
         super(SoftwareRecipesTable, self).setup_queryset(*args, **kwargs)
 
         self.queryset = self.queryset.filter(is_image=False)
+        self.queryset = self.queryset.order_by(self.default_orderby)
 
 
     def setup_columns(self, *args, **kwargs):
@@ -576,34 +644,61 @@
 
         self.add_column(**RecipesTable.build_col)
 
-
-class SelectPackagesTable(ToasterTable):
-    """ Table to display the packages to add and remove from an image """
+class PackagesTable(ToasterTable):
+    """ Table to display the packages in a recipe from it's last successful
+    build"""
 
     def __init__(self, *args, **kwargs):
-        super(SelectPackagesTable, self).__init__(*args, **kwargs)
-        self.title = "Add | Remove packages"
+        super(PackagesTable, self).__init__(*args, **kwargs)
+        self.title = "Packages included"
+        self.packages = None
+        self.default_orderby = "name"
+
+    def create_package_list(self, recipe, project_id):
+        """Creates a list of packages for the specified recipe by looking for
+        the last SUCCEEDED build of ther recipe"""
+
+        target = Target.objects.filter(Q(target=recipe.name) &
+                                       Q(build__project_id=project_id) &
+                                       Q(build__outcome=Build.SUCCEEDED)
+                                      ).last()
+
+        if target:
+            pkgs = target.target_installed_package_set.values_list('package',
+                                                                   flat=True)
+            return Package.objects.filter(pk__in=pkgs)
+
+        # Target/recipe never successfully built so empty queryset
+        return Package.objects.none()
+
+    def get_context_data(self, **kwargs):
+        """Context for rendering the sidebar and other items on the recipe
+        details page """
+        context = super(PackagesTable, self).get_context_data(**kwargs)
+
+        recipe = Recipe.objects.get(pk=kwargs['recipe_id'])
+        project = Project.objects.get(pk=kwargs['pid'])
+
+        in_project = (recipe.layer_version.pk in
+                      project.get_project_layer_versions(pk=True))
+
+        packages = self.create_package_list(recipe, project.pk)
+
+        context.update({'project': project,
+                        'recipe' : recipe,
+                        'packages': packages,
+                        'approx_pkg_size' : packages.aggregate(Sum('size')),
+                        'in_project' : in_project,
+                       })
+
+        return context
 
     def setup_queryset(self, *args, **kwargs):
-        cust_recipe = CustomImageRecipe.objects.get(pk=kwargs['recipeid'])
-        prj = Project.objects.get(pk = kwargs['pid'])
+        recipe = Recipe.objects.get(pk=kwargs['recipe_id'])
 
-        current_packages = cust_recipe.packages.all()
-
-        # Get all the packages that are in the custom image
-        # Get all the packages built by builds in the current project
-        # but not those ones that are already in the custom image
-        self.queryset = Package.objects.filter(
-                            Q(pk__in=current_packages) |
-                            (Q(build__project=prj) &
-                            ~Q(name__in=current_packages.values_list('name'))))
-
+        self.queryset = self.create_package_list(recipe, kwargs['pid'])
         self.queryset = self.queryset.order_by('name')
 
-        self.static_context_extra['recipe_id'] = kwargs['recipeid']
-        self.static_context_extra['current_packages'] = \
-                cust_recipe.packages.values_list('pk', flat=True)
-
     def setup_columns(self, *args, **kwargs):
         self.add_column(title="Package",
                         hideable=False,
@@ -611,18 +706,798 @@
                         field_name="name")
 
         self.add_column(title="Package Version",
-                        field_name="version")
+                        field_name="version",
+                        hideable=False)
 
         self.add_column(title="Approx Size",
                         orderable=True,
                         static_data_name="size",
                         static_data_template="{% load projecttags %} \
                         {{data.size|filtered_filesizeformat}}")
-        self.add_column(title="summary",
-                        field_name="summary")
+
+        self.add_column(title="License",
+                        field_name="license",
+                        orderable=True)
+
+
+        self.add_column(title="Dependencies",
+                        static_data_name="dependencies",
+                        static_data_template='\
+                        {% include "snippets/pkg_dependencies_popover.html" %}')
+
+        self.add_column(title="Reverse dependencies",
+                        static_data_name="reverse_dependencies",
+                        static_data_template='\
+                        {% include "snippets/pkg_revdependencies_popover.html" %}',
+                        hidden=True)
+
+        self.add_column(title="Recipe",
+                        field_name="recipe__name",
+                        orderable=True,
+                        hidden=True)
+
+        self.add_column(title="Recipe version",
+                        field_name="recipe__version",
+                        hidden=True)
+
+
+class SelectPackagesTable(PackagesTable):
+    """ Table to display the packages to add and remove from an image """
+
+    def __init__(self, *args, **kwargs):
+        super(SelectPackagesTable, self).__init__(*args, **kwargs)
+        self.title = "Add | Remove packages"
+
+    def setup_queryset(self, *args, **kwargs):
+        self.cust_recipe =\
+            CustomImageRecipe.objects.get(pk=kwargs['custrecipeid'])
+        prj = Project.objects.get(pk = kwargs['pid'])
+
+        current_packages = self.cust_recipe.get_all_packages()
+
+        current_recipes = prj.get_available_recipes()
+
+        # only show packages where recipes->layers are in the project
+        self.queryset = CustomImagePackage.objects.filter(
+                ~Q(recipe=None) &
+                Q(recipe__in=current_recipes))
+
+        self.queryset = self.queryset.order_by('name')
+
+        self.static_context_extra['recipe_id'] = kwargs['custrecipeid']
+        self.static_context_extra['current_packages'] = \
+                current_packages.values_list('pk', flat=True)
+
+    def get_context_data(self, **kwargs):
+        # to reuse the Super class map the custrecipeid to the recipe_id
+        kwargs['recipe_id'] = kwargs['custrecipeid']
+        context = super(SelectPackagesTable, self).get_context_data(**kwargs)
+        custom_recipe = \
+            CustomImageRecipe.objects.get(pk=kwargs['custrecipeid'])
+
+        context['recipe'] = custom_recipe
+        context['approx_pkg_size'] = \
+                        custom_recipe.get_all_packages().aggregate(Sum('size'))
+        return context
+
+
+    def setup_columns(self, *args, **kwargs):
+        super(SelectPackagesTable, self).setup_columns(*args, **kwargs)
+
+        add_remove_template = '{% include "pkg_add_rm_btn.html" %}'
 
         self.add_column(title="Add | Remove",
+                        hideable=False,
                         help_text="Use the add and remove buttons to modify "
-                        "the package content of you custom image",
+                        "the package content of your custom image",
                         static_data_name="add_rm_pkg_btn",
-                        static_data_template='{% include "pkg_add_rm_btn.html" %}')
+                        static_data_template=add_remove_template,
+                        filter_name='in_current_image_filter')
+
+    def setup_filters(self, *args, **kwargs):
+        in_current_image_filter = TableFilter(
+            'in_current_image_filter',
+            'Filter by added packages'
+        )
+
+        in_image_action = TableFilterActionToggle(
+            'in_image',
+            'Packages in %s' % self.cust_recipe.name,
+            Q(pk__in=self.static_context_extra['current_packages'])
+        )
+
+        not_in_image_action = TableFilterActionToggle(
+            'not_in_image',
+            'Packages not added to %s' % self.cust_recipe.name,
+            ~Q(pk__in=self.static_context_extra['current_packages'])
+        )
+
+        in_current_image_filter.add_action(in_image_action)
+        in_current_image_filter.add_action(not_in_image_action)
+        self.add_filter(in_current_image_filter)
+
+class ProjectsTable(ToasterTable):
+    """Table of projects in Toaster"""
+
+    def __init__(self, *args, **kwargs):
+        super(ProjectsTable, self).__init__(*args, **kwargs)
+        self.default_orderby = '-updated'
+        self.title = 'All projects'
+        self.static_context_extra['Build'] = Build
+
+    def get_context_data(self, **kwargs):
+        return super(ProjectsTable, self).get_context_data(**kwargs)
+
+    def setup_queryset(self, *args, **kwargs):
+        queryset = Project.objects.all()
+
+        # annotate each project with its number of builds
+        queryset = queryset.annotate(num_builds=Count('build'))
+
+        # exclude the command line builds project if it has no builds
+        q_default_with_builds = Q(is_default=True) & Q(num_builds__gt=0)
+        queryset = queryset.filter(Q(is_default=False) |
+                                   q_default_with_builds)
+
+        # order rows
+        queryset = queryset.order_by(self.default_orderby)
+
+        self.queryset = queryset
+
+    # columns: last activity on (updated) - DEFAULT, project (name), release,
+    # machine, number of builds, last build outcome, recipe (name),  errors,
+    # warnings, image files
+    def setup_columns(self, *args, **kwargs):
+        name_template = '''
+        {% load project_url_tag %}
+        <span data-project-field="name">
+          <a href="{% project_url data %}">
+            {{data.name}}
+          </a>
+        </span>
+        '''
+
+        last_activity_on_template = '''
+        {% load project_url_tag %}
+        <span data-project-field="updated">
+          <a href="{% project_url data %}">
+            {{data.updated | date:"d/m/y H:i"}}
+          </a>
+        </span>
+        '''
+
+        release_template = '''
+        <span data-project-field="release">
+          {% if data.release %}
+            <a href="{% url 'project' data.id %}#project-details">
+                {{data.release.name}}
+            </a>
+          {% elif data.is_default %}
+            <span class="muted">Not applicable</span>
+            <i class="icon-question-sign get-help hover-help"
+               data-original-title="This project does not have a release set.
+               It simply collects information about the builds you start from
+               the command line while Toaster is running"
+               style="visibility: hidden;">
+            </i>
+          {% else %}
+            No release available
+          {% endif %}
+        </span>
+        '''
+
+        machine_template = '''
+        <span data-project-field="machine">
+          {% if data.is_default %}
+            <span class="muted">Not applicable</span>
+            <i class="icon-question-sign get-help hover-help"
+               data-original-title="This project does not have a machine
+               set. It simply collects information about the builds you
+               start from the command line while Toaster is running"
+               style="visibility: hidden;"></i>
+          {% else %}
+            <a href="{% url 'project' data.id %}#machine-distro">
+              {{data.get_current_machine_name}}
+            </a>
+          {% endif %}
+        </span>
+        '''
+
+        number_of_builds_template = '''
+        {% if data.get_number_of_builds > 0 %}
+          <a href="{% url 'projectbuilds' data.id %}">
+            {{data.get_number_of_builds}}
+          </a>
+        {% else %}
+          <span class="muted">0</span>
+        {% endif %}
+        '''
+
+        last_build_outcome_template = '''
+        {% if data.get_number_of_builds > 0 %}
+          <a href="{% url 'builddashboard' data.get_last_build_id %}">
+            {% if data.get_last_outcome == extra.Build.SUCCEEDED %}
+              <i class="icon-ok-sign success"></i>
+            {% elif data.get_last_outcome == extra.Build.FAILED %}
+              <i class="icon-minus-sign error"></i>
+            {% endif %}
+          </a>
+        {% endif %}
+        '''
+
+        recipe_template = '''
+        {% if data.get_number_of_builds > 0 %}
+          <a href="{% url "builddashboard" data.get_last_build_id %}">
+            {{data.get_last_target}}
+          </a>
+        {% endif %}
+        '''
+
+        errors_template = '''
+        {% if data.get_number_of_builds > 0 and data.get_last_errors > 0 %}
+          <a class="errors.count error"
+             href="{% url "builddashboard" data.get_last_build_id %}#errors">
+            {{data.get_last_errors}} error{{data.get_last_errors | pluralize}}
+          </a>
+        {% endif %}
+        '''
+
+        warnings_template = '''
+        {% if data.get_number_of_builds > 0 and data.get_last_warnings > 0 %}
+          <a class="warnings.count warning"
+             href="{% url "builddashboard" data.get_last_build_id %}#warnings">
+            {{data.get_last_warnings}} warning{{data.get_last_warnings | pluralize}}
+          </a>
+        {% endif %}
+        '''
+
+        image_files_template = '''
+        {% if data.get_number_of_builds > 0 and data.get_last_outcome == extra.Build.SUCCEEDED %}
+          <a href="{% url "builddashboard" data.get_last_build_id %}#images">
+            {{data.get_last_build_extensions}}
+          </a>
+        {% endif %}
+        '''
+
+        self.add_column(title='Project',
+                        hideable=False,
+                        orderable=True,
+                        static_data_name='name',
+                        static_data_template=name_template)
+
+        self.add_column(title='Last activity on',
+                        help_text='Starting date and time of the \
+                                   last project build. If the project has no \
+                                   builds, this shows the date the project was \
+                                   created.',
+                        hideable=False,
+                        orderable=True,
+                        static_data_name='updated',
+                        static_data_template=last_activity_on_template)
+
+        self.add_column(title='Release',
+                        help_text='The version of the build system used by \
+                                   the project',
+                        hideable=False,
+                        orderable=True,
+                        static_data_name='release',
+                        static_data_template=release_template)
+
+        self.add_column(title='Machine',
+                        help_text='The hardware currently selected for the \
+                                   project',
+                        hideable=False,
+                        orderable=False,
+                        static_data_name='machine',
+                        static_data_template=machine_template)
+
+        self.add_column(title='Number of builds',
+                        help_text='The number of builds which have been run \
+                                   for the project',
+                        hideable=False,
+                        orderable=False,
+                        static_data_name='number_of_builds',
+                        static_data_template=number_of_builds_template)
+
+        self.add_column(title='Last build outcome',
+                        help_text='Indicates whether the last project build \
+                                   completed successfully or failed',
+                        hideable=True,
+                        orderable=False,
+                        static_data_name='last_build_outcome',
+                        static_data_template=last_build_outcome_template)
+
+        self.add_column(title='Recipe',
+                        help_text='The last recipe which was built in this \
+                                   project',
+                        hideable=True,
+                        orderable=False,
+                        static_data_name='recipe_name',
+                        static_data_template=recipe_template)
+
+        self.add_column(title='Errors',
+                        help_text='The number of errors encountered during \
+                                   the last project build (if any)',
+                        hideable=True,
+                        orderable=False,
+                        static_data_name='errors',
+                        static_data_template=errors_template)
+
+        self.add_column(title='Warnings',
+                        help_text='The number of warnings encountered during \
+                                   the last project build (if any)',
+                        hideable=True,
+                        hidden=True,
+                        orderable=False,
+                        static_data_name='warnings',
+                        static_data_template=warnings_template)
+
+        self.add_column(title='Image files',
+                        help_text='The root file system types produced by \
+                                   the last project build',
+                        hideable=True,
+                        hidden=True,
+                        orderable=False,
+                        static_data_name='image_files',
+                        static_data_template=image_files_template)
+
+class BuildsTable(ToasterTable):
+    """Table of builds in Toaster"""
+
+    def __init__(self, *args, **kwargs):
+        super(BuildsTable, self).__init__(*args, **kwargs)
+        self.default_orderby = '-completed_on'
+        self.static_context_extra['Build'] = Build
+        self.static_context_extra['Task'] = Task
+
+        # attributes that are overridden in subclasses
+
+        # title for the page
+        self.title = ''
+
+        # 'project' or 'all'; determines how the mrb (most recent builds)
+        # section is displayed
+        self.mrb_type = ''
+
+    def get_builds(self):
+        """
+        overridden in ProjectBuildsTable to return builds for a
+        single project
+        """
+        return Build.objects.all()
+
+    def get_context_data(self, **kwargs):
+        context = super(BuildsTable, self).get_context_data(**kwargs)
+
+        # should be set in subclasses
+        context['mru'] = []
+
+        context['mrb_type'] = self.mrb_type
+
+        return context
+
+    def setup_queryset(self, *args, **kwargs):
+        """
+        The queryset is annotated so that it can be sorted by number of
+        errors and number of warnings; but note that the criteria for
+        finding the log messages to populate these fields should match those
+        used in the Build model (orm/models.py) to populate the errors and
+        warnings properties
+        """
+        queryset = self.get_builds()
+
+        # Don't include in progress builds pr cancelled builds
+        queryset = queryset.exclude(Q(outcome=Build.IN_PROGRESS) |
+                                    Q(outcome=Build.CANCELLED))
+
+        # sort
+        queryset = queryset.order_by(self.default_orderby)
+
+        # annotate with number of ERROR, EXCEPTION and CRITICAL log messages
+        criteria = (Q(logmessage__level=LogMessage.ERROR) |
+                    Q(logmessage__level=LogMessage.EXCEPTION) |
+                    Q(logmessage__level=LogMessage.CRITICAL))
+
+        queryset = queryset.annotate(
+            errors_no=Count(
+                Case(
+                    When(criteria, then=Value(1)),
+                    output_field=IntegerField()
+                )
+            )
+        )
+
+        # annotate with number of WARNING log messages
+        queryset = queryset.annotate(
+            warnings_no=Count(
+                Case(
+                    When(logmessage__level=LogMessage.WARNING, then=Value(1)),
+                    output_field=IntegerField()
+                )
+            )
+        )
+
+        self.queryset = queryset
+
+    def setup_columns(self, *args, **kwargs):
+        outcome_template = '''
+        <a href="{% url "builddashboard" data.id %}">
+            {% if data.outcome == data.SUCCEEDED %}
+                <i class="icon-ok-sign success"></i>
+            {% elif data.outcome == data.FAILED %}
+                <i class="icon-minus-sign error"></i>
+            {% endif %}
+        </a>
+
+        {% if data.cooker_log_path %}
+            &nbsp;
+            <a href="{% url "build_artifact" data.id "cookerlog" data.id %}">
+               <i class="icon-download-alt get-help"
+               data-original-title="Download build log"></i>
+            </a>
+        {% endif %}
+        '''
+
+        recipe_template = '''
+        {% for target_label in data.target_labels %}
+            <a href="{% url "builddashboard" data.id %}">
+                {{target_label}}
+            </a>
+            <br />
+        {% endfor %}
+        '''
+
+        machine_template = '''
+        <a href="{% url "builddashboard" data.id %}">
+            {{data.machine}}
+        </a>
+        '''
+
+        started_on_template = '''
+        <a href="{% url "builddashboard" data.id %}">
+            {{data.started_on | date:"d/m/y H:i"}}
+        </a>
+        '''
+
+        completed_on_template = '''
+        <a href="{% url "builddashboard" data.id %}">
+            {{data.completed_on | date:"d/m/y H:i"}}
+        </a>
+        '''
+
+        failed_tasks_template = '''
+        {% if data.failed_tasks.count == 1 %}
+            <a href="{% url "task" data.id data.failed_tasks.0.id %}">
+                <span class="error">
+                    {{data.failed_tasks.0.recipe.name}}.{{data.failed_tasks.0.task_name}}
+                </span>
+            </a>
+            <a href="{% url "build_artifact" data.id "tasklogfile" data.failed_tasks.0.id %}">
+                <i class="icon-download-alt"
+                   data-original-title="Download task log file">
+                </i>
+            </a>
+        {% elif data.failed_tasks.count > 1 %}
+            <a href="{% url "tasks" data.id %}?filter=outcome%3A{{extra.Task.OUTCOME_FAILED}}">
+                <span class="error">{{data.failed_tasks.count}} tasks</span>
+            </a>
+        {% endif %}
+        '''
+
+        errors_template = '''
+        {% if data.errors_no %}
+            <a class="errors.count error" href="{% url "builddashboard" data.id %}#errors">
+                {{data.errors_no}} error{{data.errors_no|pluralize}}
+            </a>
+        {% endif %}
+        '''
+
+        warnings_template = '''
+        {% if data.warnings_no %}
+            <a class="warnings.count warning" href="{% url "builddashboard" data.id %}#warnings">
+                {{data.warnings_no}} warning{{data.warnings_no|pluralize}}
+            </a>
+        {% endif %}
+        '''
+
+        time_template = '''
+        {% load projecttags %}
+        <a href="{% url "buildtime" data.id %}">
+            {{data.timespent_seconds | sectohms}}
+        </a>
+        '''
+
+        image_files_template = '''
+        {% if data.outcome == extra.Build.SUCCEEDED %}
+          <a href="{% url "builddashboard" data.id %}#images">
+            {{data.get_image_file_extensions}}
+          </a>
+        {% endif %}
+        '''
+
+        self.add_column(title='Outcome',
+                        help_text='Final state of the build (successful \
+                                   or failed)',
+                        hideable=False,
+                        orderable=True,
+                        filter_name='outcome_filter',
+                        static_data_name='outcome',
+                        static_data_template=outcome_template)
+
+        self.add_column(title='Recipe',
+                        help_text='What was built (i.e. one or more recipes \
+                                   or image recipes)',
+                        hideable=False,
+                        orderable=False,
+                        static_data_name='target',
+                        static_data_template=recipe_template)
+
+        self.add_column(title='Machine',
+                        help_text='Hardware for which you are building a \
+                                   recipe or image recipe',
+                        hideable=False,
+                        orderable=True,
+                        static_data_name='machine',
+                        static_data_template=machine_template)
+
+        self.add_column(title='Started on',
+                        help_text='The date and time when the build started',
+                        hideable=True,
+                        hidden=True,
+                        orderable=True,
+                        filter_name='started_on_filter',
+                        static_data_name='started_on',
+                        static_data_template=started_on_template)
+
+        self.add_column(title='Completed on',
+                        help_text='The date and time when the build finished',
+                        hideable=False,
+                        orderable=True,
+                        filter_name='completed_on_filter',
+                        static_data_name='completed_on',
+                        static_data_template=completed_on_template)
+
+        self.add_column(title='Failed tasks',
+                        help_text='The number of tasks which failed during \
+                                   the build',
+                        hideable=True,
+                        orderable=False,
+                        filter_name='failed_tasks_filter',
+                        static_data_name='failed_tasks',
+                        static_data_template=failed_tasks_template)
+
+        self.add_column(title='Errors',
+                        help_text='The number of errors encountered during \
+                                   the build (if any)',
+                        hideable=True,
+                        orderable=True,
+                        static_data_name='errors_no',
+                        static_data_template=errors_template)
+
+        self.add_column(title='Warnings',
+                        help_text='The number of warnings encountered during \
+                                   the build (if any)',
+                        hideable=True,
+                        orderable=True,
+                        static_data_name='warnings_no',
+                        static_data_template=warnings_template)
+
+        self.add_column(title='Time',
+                        help_text='How long the build took to finish',
+                        hideable=True,
+                        hidden=True,
+                        orderable=False,
+                        static_data_name='time',
+                        static_data_template=time_template)
+
+        self.add_column(title='Image files',
+                        help_text='The root file system types produced by \
+                                   the build',
+                        hideable=True,
+                        orderable=False,
+                        static_data_name='image_files',
+                        static_data_template=image_files_template)
+
+    def setup_filters(self, *args, **kwargs):
+        # outcomes
+        outcome_filter = TableFilter(
+            'outcome_filter',
+            'Filter builds by outcome'
+        )
+
+        successful_builds_action = TableFilterActionToggle(
+            'successful_builds',
+            'Successful builds',
+            Q(outcome=Build.SUCCEEDED)
+        )
+
+        failed_builds_action = TableFilterActionToggle(
+            'failed_builds',
+            'Failed builds',
+            Q(outcome=Build.FAILED)
+        )
+
+        outcome_filter.add_action(successful_builds_action)
+        outcome_filter.add_action(failed_builds_action)
+        self.add_filter(outcome_filter)
+
+        # started on
+        started_on_filter = TableFilter(
+            'started_on_filter',
+            'Filter by date when build was started'
+        )
+
+        started_today_action = TableFilterActionDay(
+            'today',
+            'Today\'s builds',
+            'started_on',
+            'today'
+        )
+
+        started_yesterday_action = TableFilterActionDay(
+            'yesterday',
+            'Yesterday\'s builds',
+            'started_on',
+            'yesterday'
+        )
+
+        by_started_date_range_action = TableFilterActionDateRange(
+            'date_range',
+            'Build date range',
+            'started_on'
+        )
+
+        started_on_filter.add_action(started_today_action)
+        started_on_filter.add_action(started_yesterday_action)
+        started_on_filter.add_action(by_started_date_range_action)
+        self.add_filter(started_on_filter)
+
+        # completed on
+        completed_on_filter = TableFilter(
+            'completed_on_filter',
+            'Filter by date when build was completed'
+        )
+
+        completed_today_action = TableFilterActionDay(
+            'today',
+            'Today\'s builds',
+            'completed_on',
+            'today'
+        )
+
+        completed_yesterday_action = TableFilterActionDay(
+            'yesterday',
+            'Yesterday\'s builds',
+            'completed_on',
+            'yesterday'
+        )
+
+        by_completed_date_range_action = TableFilterActionDateRange(
+            'date_range',
+            'Build date range',
+            'completed_on'
+        )
+
+        completed_on_filter.add_action(completed_today_action)
+        completed_on_filter.add_action(completed_yesterday_action)
+        completed_on_filter.add_action(by_completed_date_range_action)
+        self.add_filter(completed_on_filter)
+
+        # failed tasks
+        failed_tasks_filter = TableFilter(
+            'failed_tasks_filter',
+            'Filter builds by failed tasks'
+        )
+
+        criteria = Q(task_build__outcome=Task.OUTCOME_FAILED)
+
+        with_failed_tasks_action = TableFilterActionToggle(
+            'with_failed_tasks',
+            'Builds with failed tasks',
+            criteria
+        )
+
+        without_failed_tasks_action = TableFilterActionToggle(
+            'without_failed_tasks',
+            'Builds without failed tasks',
+            ~criteria
+        )
+
+        failed_tasks_filter.add_action(with_failed_tasks_action)
+        failed_tasks_filter.add_action(without_failed_tasks_action)
+        self.add_filter(failed_tasks_filter)
+
+
+class AllBuildsTable(BuildsTable):
+    """ Builds page for all builds """
+
+    def __init__(self, *args, **kwargs):
+        super(AllBuildsTable, self).__init__(*args, **kwargs)
+        self.title = 'All builds'
+        self.mrb_type = 'all'
+
+    def setup_columns(self, *args, **kwargs):
+        """
+        All builds page shows a column for the project
+        """
+
+        super(AllBuildsTable, self).setup_columns(*args, **kwargs)
+
+        project_template = '''
+        {% load project_url_tag %}
+        <a href="{% project_url data.project %}">
+            {{data.project.name}}
+        </a>
+        {% if data.project.is_default %}
+            <i class="icon-question-sign get-help hover-help" title=""
+               data-original-title="This project shows information about
+               the builds you start from the command line while Toaster is
+               running" style="visibility: hidden;"></i>
+        {% endif %}
+        '''
+
+        self.add_column(title='Project',
+                        hideable=True,
+                        orderable=True,
+                        static_data_name='project',
+                        static_data_template=project_template)
+
+    def get_context_data(self, **kwargs):
+        """ Get all builds for the recent builds area """
+        context = super(AllBuildsTable, self).get_context_data(**kwargs)
+        context['mru'] = Build.get_recent()
+        return context
+
+class ProjectBuildsTable(BuildsTable):
+    """
+    Builds page for a single project; a BuildsTable, with the queryset
+    filtered by project
+    """
+
+    def __init__(self, *args, **kwargs):
+        super(ProjectBuildsTable, self).__init__(*args, **kwargs)
+        self.title = 'All project builds'
+        self.mrb_type = 'project'
+
+        # set from the querystring
+        self.project_id = None
+
+    def setup_columns(self, *args, **kwargs):
+        """
+        Project builds table doesn't show the machines column by default
+        """
+
+        super(ProjectBuildsTable, self).setup_columns(*args, **kwargs)
+
+        # hide the machine column
+        self.set_column_hidden('Machine', True)
+
+        # allow the machine column to be hidden by the user
+        self.set_column_hideable('Machine', True)
+
+    def setup_queryset(self, *args, **kwargs):
+        """
+        NOTE: self.project_id must be set before calling super(),
+        as it's used in setup_queryset()
+        """
+        self.project_id = kwargs['pid']
+        super(ProjectBuildsTable, self).setup_queryset(*args, **kwargs)
+
+        project = Project.objects.get(pk=self.project_id)
+        self.queryset = self.queryset.filter(project=project)
+
+    def get_context_data(self, **kwargs):
+        """
+        Get recent builds for this project, and the project itself
+
+        NOTE: self.project_id must be set before calling super(),
+        as it's used in get_context_data()
+        """
+        self.project_id = kwargs['pid']
+        context = super(ProjectBuildsTable, self).get_context_data(**kwargs)
+
+        project = Project.objects.get(pk=self.project_id)
+        context['mru'] = Build.get_recent(project)
+        context['project'] = project
+
+        return context
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/base.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/base.html
index 11ac2a0..210cf33 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/base.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/base.html
@@ -3,15 +3,15 @@
 {% load projecttags %}
 {% load project_url_tag %}
 <html lang="en">
-    <head>
-        <title>
-          {% block title %} Toaster {% endblock %}
-        </title>
-<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css"/>
-<link rel="stylesheet" href="{% static 'css/bootstrap-responsive.min.css' %}" type='text/css'/>
-<link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'/>
-<link rel="stylesheet" href="{% static 'css/prettify.css' %}" type='text/css'/>
-<link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'/>
+  <head>
+    <title>
+      {% block title %} Toaster {% endblock %}
+    </title>
+    <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}" type="text/css"/>
+    <link rel="stylesheet" href="{% static 'css/bootstrap-responsive.min.css' %}" type='text/css'/>
+    <link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'/>
+    <link rel="stylesheet" href="{% static 'css/prettify.css' %}" type='text/css'/>
+    <link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'/>
 
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
@@ -40,48 +40,35 @@
         projectId : {{project.id}},
         projectPageUrl : {% url 'project' project.id as purl %}{{purl|json}},
         projectName : {{project.name|json}},
-        projectIsDefault: {% if project.is_default %}true{% else %}false{% endif %},
         recipesTypeAheadUrl: {% url 'xhr_recipestypeahead' project.id as paturl%}{{paturl|json}},
         layersTypeAheadUrl: {% url 'xhr_layerstypeahead' project.id as paturl%}{{paturl|json}},
         machinesTypeAheadUrl: {% url 'xhr_machinestypeahead' project.id as paturl%}{{paturl|json}},
-
         projectBuildsUrl: {% url 'projectbuilds' project.id as pburl %}{{pburl|json}},
+        xhrCustomRecipeUrl : "{% url 'xhr_customrecipe' %}",
         projectId : {{project.id}},
+        xhrBuildRequestUrl: "{% url 'xhr_buildrequest' project.id %}",
         {% else %}
         projectId : undefined,
         projectPageUrl : undefined,
         projectName : undefined,
-        projectIsDefault: false,
         {% endif %}
       };
     </script>
-    <script src="{% static 'js/base.js' %}"></script>
-    <script>
-      $(document).ready(function () {
-        /* Vars needed for base.js */
-        var ctx = {};
-        ctx.numProjects = {{projects|length}};
-        ctx.currentUrl = "{{request.path|escapejs}}";
+    {% block extraheadcontent %}
+    {% endblock %}
+  </head>
 
-        basePageInit(ctx);
-      });
-    </script>
+  <body style="height: 100%">
 
-{% block extraheadcontent %}
-{% endblock %}
-    </head>
+    {% csrf_token %}
+    <div id="loading-notification" class="alert lead text-center" style="display:none">
+      Loading <i class="fa-pulse icon-spinner"></i>
+    </div>
 
-<body style="height: 100%">
-
-  {% csrf_token %}
-  <div id="loading-notification" class="alert lead text-center" style="display:none">
-    Loading <i class="fa-pulse icon-spinner"></i>
-  </div>
-
-  <div id="change-notification" class="alert lead alert-info" style="display:none">
-    <button type="button" class="close" id="hide-alert">&times;</button>
-    <span id="change-notification-msg"></span>
-  </div>
+    <div id="change-notification" class="alert lead alert-info" style="display:none">
+      <button type="button" class="close" id="hide-alert">&times;</button>
+      <span id="change-notification-msg"></span>
+    </div>
 
     <div class="navbar navbar-fixed-top">
       <div class="navbar-inner">
@@ -90,10 +77,10 @@
           <span class="brand">
             <a href="/">Toaster</a>
             {% if DEBUG %}
-            <i class="icon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Revision</dt><dd>{{TOASTER_REVISION}}</dd></dl>"></i>
+            <i class="icon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Git branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Git revision</dt><dd>{{TOASTER_REVISION}}</dd></dl>"></i>
             {% endif %}
           </span>
-          {% if BUILD_MODE and request.resolver_match.url_name != 'landing' and request.resolver_match.url_name != 'newproject' %}
+          {% if request.resolver_match.url_name != 'landing' and request.resolver_match.url_name != 'newproject' %}
           <ul class="nav">
             <li {% if request.resolver_match.url_name == 'all-builds' %}
                 class="active"
@@ -122,75 +109,18 @@
             </li>
           </ul>
           <span class="pull-right divider-vertical"></span>
-
-          <!-- new project button; only show in build mode -->
-          {% if BUILD_MODE %}
-            <div class="btn-group pull-right">
-              <a class="btn" id="new-project-button" href="{% url 'newproject' %}">New project</a>
-            </div>
-          {% endif %}
-
-          <!--
-          New build popover; only shown if there is at least one user-created project
-          and we're in build mode
-          -->
-          {% if BUILD_MODE and non_cli_projects.count > 0 %}
-            <div class="btn-group pull-right" id="new-build-button" style="display:none">
-              <button class="btn dropdown-toggle" data-toggle="dropdown">
-                New build
-                <i class="icon-caret-down"></i>
-              </button>
-              <ul class="dropdown-menu new-build multi-select">
-                <li>
-                  <h3>New build</h3>
-                  <h6>
-                    Project:
-                    <span id="project">
-                      {% if project.id and not project.is_default %}
-                        <a class="lead" href="{% project_url project %}">{{project.name}}</a>
-                      {% else %}
-                        <a class="lead" href="#"></a>
-                      {% endif %}
-                      <i class="icon-pencil"></i>
-                    </span>
-                  </h6>
-                  <form id="change-project-form" style="display:none;">
-                    <div class="input-append">
-                      <input type="text" class="input-medium" id="project-name-input" placeholder="Type a project name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead"/>
-                      <button id="save-project-button" class="btn" type="button">Save</button>
-                      <a href="#" id="cancel-change-project" class="btn btn-link" style="display: none">Cancel</a>
-                    </div>
-                    <p><a id="view-all-projects" href="{% url 'all-projects' %}">View all projects</a></p>
-                  </form>
-                </li>
-                <li>
-                  <div class="alert" style="display:none;">
-                    <p>This project configuration is incomplete, so you cannot run builds.</p>
-                    <p><a href="{% if project.id %}{% url 'project' project.id %}{% endif %}">View project configuration</a></p>
-                  </div>
-                </li>
-                <li id="targets-form">
-                  <h6>Recipe(s):</h6>
-                  <form>
-                    <input type="text" class="input-xlarge build-target-input" placeholder="Type a recipe name" autocomplete="off" data-minLength="1" data-autocomplete="off" data-provide="typeahead" disabled/>
-                    <div class="row-fluid">
-                      <button class="btn btn-primary build-button" disabled>Build</button>
-                    </div>
-                  </form>
-                </li>
-              </ul>
-            </div>
-          {% endif %}
+          <div class="btn-group pull-right">
+            <a class="btn" id="new-project-button" href="{% url 'newproject' %}">New project</a>
+          </div>
+        </div>
+      </div>
     </div>
- </div>
-</div>
 
-<div class="container-fluid top-padded">
-<div class="row-fluid">
-{% block pagecontent %}
-{% endblock %}
-</div>
-</div>
-</body>
+    <div class="container-fluid top-padded">
+      <div class="row-fluid">
+        {% block pagecontent %}
+        {% endblock %}
+      </div>
+    </div>
+  </body>
 </html>
-
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
index 22ca50c..a62e0b1 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuilddetailpage.html
@@ -1,4 +1,5 @@
 {% extends "base.html" %}
+{% load project_url_tag %}
 {% load humanize %}
 {% block pagecontent %}
 
@@ -6,16 +7,18 @@
 <!-- Breadcrumbs -->
     <div class="section">
         <ul class="breadcrumb" id="breadcrumb">
-            <li class="muted">{{build.project.name}}:</li>
-            <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
-            <li><a href="{%url 'builddashboard' build.pk%}">{{build.target_set.all.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
+            <li><a href="{% project_url build.project %}">{{build.project.name}}</a></li>
+            {% if not build.project.is_default %}
+                <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
+            {% endif %}
+            <li><a href="{%url 'builddashboard' build.pk%}">{{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})</a></li>
             {% block localbreadcrumb %}{% endblock %}
         </ul>
         <script>
         $( function () {
             $('#breadcrumb > li').append('<span class="divider">&rarr;</span>');
             $('#breadcrumb > li:last').addClass("active");
-            $('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove();
+            $('#breadcrumb > li:last > span').remove();
         });
         </script>
     </div> <!--section-->
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuildpage.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
index d441df8..0d8c882 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basebuildpage.html
@@ -1,88 +1,157 @@
 {% extends "base.html" %}
 {% load projecttags %}
+{% load project_url_tag %}
+{% load objects_to_dictionaries_filter %}
 {% load humanize %}
 {% block pagecontent %}
-
-
- <div class="">
-<!-- Breadcrumbs -->
-    <div class="section">
-        <ul class="breadcrumb" id="breadcrumb">
-            <li class="muted">{{build.project.name}}:</li>
-            <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
-            <li>
-            {% block parentbreadcrumb %}
-            <a href="{%url 'builddashboard' build.pk%}">
-                {{build.get_sorted_target_list.0.target}} {%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} ({{build.completed_on|date:"d/m/y H:i"}})
-            </a>
-            {% endblock %}
-            </li>
-            {% block localbreadcrumb %}{% endblock %}
-        </ul>
-        <script>
-        $( function () {
-            $('#breadcrumb > li').append('<span class="divider">&rarr;</span>');
-            $('#breadcrumb > li:last').addClass("active");
-            $('#breadcrumb > li:last > span, #breadcrumb > li:first > span').remove();
-	    console.log("done");
-        });
-        </script>
-    </div>
-
-    <div class="row-fluid">
-
-        <!-- begin left sidebar container -->
-        <div id="nav" class="span2">
-            <ul class="nav nav-list well">
-              <li
-                {% if request.resolver_match.url_name == 'builddashboard'  %}
-                  class="active"
-                {% endif %} >
-                <a class="nav-parent" href="{% url 'builddashboard' build.pk %}">Build summary</a>
-              </li>
-              {% if build.target_set.all.0.is_image and build.outcome == 0 %}
-                <li class="nav-header">Images</li>
-                {% block nav-target %}
-                  {% for t in build.get_sorted_target_list %}
-                    <li><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li>
-                  {% endfor %}
-                {% endblock %}
-              {% endif %}
-              <li class="nav-header">Build</li>
-              {% block nav-configuration %}
-                  <li><a href="{% url 'configuration' build.pk %}">Configuration</a></li>
-              {% endblock %}
-              {% block nav-tasks %}
-                  <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
-              {% endblock %}
-              {% block nav-recipes %}
-                  <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li>
-              {% endblock %}
-              {% block nav-packages %}
-                  <li><a href="{% url 'packages' build.pk %}">Packages</a></li>
-              {% endblock %}
-                  <li class="nav-header">Performance</li>
-              {% block nav-buildtime %}
-                  <li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
-              {% endblock %}
-              {% block nav-cpuusage %}
-                  <li><a href="{% url 'cpuusage' build.pk %}">CPU usage</a></li>
-              {% endblock %}
-              {% block nav-diskio %}
-                  <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
-              {% endblock %}
-            </ul>
-        </div>
-        <!-- end left sidebar container -->
-
-        <!-- Begin right container -->
-        {% block buildinfomain %}{% endblock %}
-        <!-- End right container -->
-
-
-    </div>
+  <!-- breadcrumbs -->
+  <div class="section">
+    <ul class="breadcrumb" id="breadcrumb">
+      <li><a href="{% project_url build.project %}">{{build.project.name}}</a></li>
+      {% if not build.project.is_default %}
+        <li><a href="{% url 'projectbuilds' build.project.id %}">Builds</a></li>
+      {% endif %}
+      <li>
+        {% block parentbreadcrumb %}
+          <a href="{%url 'builddashboard' build.pk%}">
+            {{build.get_sorted_target_list.0.target}} {% if build.target_set.all.count > 1 %}(+{{build.target_set.all.count|add:"-1"}}){% endif %} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
+          </a>
+        {% endblock %}
+      </li>
+      {% block localbreadcrumb %}{% endblock %}
+    </ul>
+    <script>
+      $( function () {
+        $('#breadcrumb > li').append('<span class="divider">&rarr;</span>');
+        $('#breadcrumb > li:last').addClass("active");
+        $('#breadcrumb > li:last > span').remove();
+      });
+    </script>
   </div>
 
+  <div class="row-fluid">
+    <!-- begin left sidebar container -->
+    <div id="nav" class="span2">
+      <ul class="nav nav-list well">
+        <li
+          {% if request.resolver_match.url_name == 'builddashboard'  %}
+            class="active"
+          {% endif %} >
+          <a class="nav-parent" href="{% url 'builddashboard' build.pk %}">Build summary</a>
+        </li>
+        {% if build.target_set.all.0.is_image and build.outcome == 0 %}
+          <li class="nav-header">Images</li>
+          {% block nav-target %}
+            {% for t in build.get_sorted_target_list %}
+              <li><a href="{% url 'target' build.pk t.pk %}">{{t.target}}</a><li>
+            {% endfor %}
+          {% endblock %}
+        {% endif %}
+        <li class="nav-header">Build</li>
+        {% block nav-configuration %}
+          <li><a href="{% url 'configuration' build.pk %}">Configuration</a></li>
+        {% endblock %}
+        {% block nav-tasks %}
+          <li><a href="{% url 'tasks' build.pk %}">Tasks</a></li>
+        {% endblock %}
+        {% block nav-recipes %}
+          <li><a href="{% url 'recipes' build.pk %}">Recipes</a></li>
+        {% endblock %}
+        {% block nav-packages %}
+          <li><a href="{% url 'packages' build.pk %}">Packages</a></li>
+        {% endblock %}
+          <li class="nav-header">Performance</li>
+        {% block nav-buildtime %}
+          <li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
+        {% endblock %}
+        {% block nav-cputime %}
+          <li><a href="{% url 'cputime' build.pk %}">CPU usage</a></li>
+        {% endblock %}
+        {% block nav-diskio %}
+          <li><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
+        {% endblock %}
 
+        <li class="divider"></li>
+
+        <li>
+          <p class="navbar-btn">
+            <a class="btn btn-block" href="{% url 'build_artifact' build.id 'cookerlog' build.id %}">
+              Download build log
+            </a>
+          </p>
+        </li>
+
+        {% with build.get_custom_image_recipes as custom_image_recipes %}
+          {% if custom_image_recipes.count > 0 %}
+            <!-- edit custom image built during this build -->
+            <li>
+              <p class="navbar-btn" data-role="edit-custom-image-trigger">
+                <button class="btn btn-block">Edit custom image</button>
+                {% include 'editcustomimage_modal.html' %}
+                <script>
+                  var editableCustomImageRecipes = {{ custom_image_recipes | objects_to_dictionaries:"id,name" | json }};
+
+                  $(document).ready(function () {
+                    var editCustomImageTrigger = $('[data-role="edit-custom-image-trigger"]');
+                    var editCustomImageModal = $('#edit-custom-image-modal');
+
+                    // edit custom image which was built during this build
+                    editCustomImageTrigger.click(function () {
+                      // single editable custom image: redirect to the edit page
+                      // for that image
+                      if (editableCustomImageRecipes.length === 1) {
+                        var url = '{% url "customrecipe" build.project.id custom_image_recipes.first.id %}';
+                        document.location.href = url;
+                      }
+                      // multiple editable custom images: show modal to select
+                      // one of them for editing
+                      else {
+                        editCustomImageModal.modal('show');
+                      }
+                    });
+                  });
+                </script>
+              </p>
+            </li>
+          {% endif %}
+        {% endwith %}
+
+        <li>
+          <!-- new custom image from image recipe in this build -->
+          <p class="navbar-btn" data-role="new-custom-image-trigger">
+            <button class="btn btn-block">New custom image</button>
+          </p>
+          {% include 'newcustomimage_modal.html' %}
+          <script>
+            // imageRecipes includes both custom image recipes and built-in
+            // image recipes, any of which can be used as the basis for a
+            // new custom image
+            var imageRecipes = {{ build.get_image_recipes | objects_to_dictionaries:"id,name" | json }};
+
+            $(document).ready(function () {
+              var newCustomImageModal = $('#new-custom-image-modal');
+              var newCustomImageTrigger = $('[data-role="new-custom-image-trigger"]');
+
+              // show create new custom image modal to select an image built
+              // during this build as the basis for the custom recipe
+              newCustomImageTrigger.click(function () {
+                if (!imageRecipes.length) {
+                  return;
+                }
+
+                newCustomImageModalSetRecipes(imageRecipes);
+                newCustomImageModal.modal('show');
+              });
+            });
+          </script>
+        </li>
+      </ul>
+
+    </div>
+    <!-- end left sidebar container -->
+
+    <!-- begin right container -->
+    {% block buildinfomain %}{% endblock %}
+    <!-- end right container -->
+  </div>
 {% endblock %}
-
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
index 1f45be4..8778305 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/baseprojectpage.html
@@ -1,4 +1,5 @@
 {% extends "base.html" %}
+
 {% load projecttags %}
 {% load humanize %}
 
@@ -26,9 +27,7 @@
     <ul class="nav nav-list well">
       <li><a class="nav-parent" href="{% url 'project' project.id %}">Configuration</a></li>
       <li class="nav-header">Compatible metadata</li>
-      {% if CUSTOM_IMAGE %}
       <li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a></li>
-      {% endif %}
       <li><a href="{% url 'projectimagerecipes' project.id %}">Image recipes</a></li>
       <li><a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a></li>
       <li><a href="{% url 'projectmachines' project.id %}">Machines</a></li>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basetable_top.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basetable_top.html
index 33ede66..0ddd749 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/basetable_top.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/basetable_top.html
@@ -161,8 +161,8 @@
 <!-- control header -->
 <div class="navbar">
     <div class="navbar-inner">
-        <form class="navbar-search input-append pull-left" id="searchform">
-            <input class="input-xxlarge" id="search" name="search" type="text" placeholder="Search {%if object_search_display %}{{object_search_display}}{%else%}{{objectname}}{%endif%}" value="{%if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{%endif%}
+        <form class="navbar-search input-append pull-left span6" id="searchform">
+            <input id="search" name="search" type="text" placeholder="Search {%if object_search_display %}{{object_search_display}}{%else%}{{objectname}}{%endif%}" value="{%if request.GET.search %}{{request.GET.search}}{% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{%endif%}
             <input type="hidden" name="orderby" value="{{request.GET.orderby}}">
             <input type="hidden" name="page" value="1">
             <button class="btn" id="search-button" type="submit" value="Search">Search</button>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/builddashboard.html
index 323bbbb..a0da71e 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/builddashboard.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/builddashboard.html
@@ -6,10 +6,9 @@
 {% block parentbreadcrumb %}
 {% if build.get_sorted_target_list.count > 0 %}
   {{build.get_sorted_target_list.0.target}}
-  &nbsp;
 {% endif %}
 
-{%if build.target_set.all.count > 1%}(+ {{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
+{%if build.target_set.all.count > 1%}(+{{build.target_set.all.count|add:"-1"}}){%endif%} {{build.machine}} ({{build.completed_on|date:"d/m/y H:i"}})
 {% endblock %}
 
 {% block buildinfomain %}
@@ -111,7 +110,7 @@
                                   </p>
                     </div>
                 </div>
-                        {% else %}
+        {% else %}
             <dt>
                 <i class="icon-question-sign get-help" title="The location in disk of the license manifest, a document listing all packages installed in your image and their licenses"></i>
 
@@ -126,18 +125,18 @@
             </dt>
             <dd>
                 <ul>
-                                  {% for i in target.imageFiles %}
-            {% if build.project %}
-                    <li><a href="{% url 'build_artifact' build.pk 'imagefile' i.id %}">{{i.path}}</a>
-            {% else %}
-                    <li>{{i.path}}
-            {% endif %}
-                    ({{i.size|filtered_filesizeformat}})</li>
-                                  {% endfor %}
+                    {% for i in target.imageFiles %}
+                        <li>
+                            <a href="{% url 'build_artifact' build.pk 'imagefile' i.id %}">
+                                {{i.suffix}}
+                            </a>
+                            &nbsp;({{i.size|filtered_filesizeformat}})
+                        </li>
+                    {% endfor %}
                 </ul>
             </dd>
         </dl>
-                        {% endif %}
+        {% endif %}
     </div>
         {% endif %}
     {% endfor %}
@@ -161,7 +160,7 @@
             <dd><div>
               {% for ba in build.buildartifact_set.all|dictsort:"file_name" %}
                 <a href="{%url 'build_artifact' build.id 'buildartifact' ba.id %}">
-                    {{ba.get_local_file_name}}
+                    {{ba.get_basename}}
                 </a>
 
                 ({{ba.file_size|filtered_filesizeformat}}) <br/>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html
new file mode 100644
index 0000000..bf13a66
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds-toastertable.html
@@ -0,0 +1,48 @@
+{% extends 'base.html' %}
+{% load static %}
+
+{% block extraheadcontent %}
+  <link rel="stylesheet" href="{% static 'css/jquery-ui.min.css' %}" type='text/css'>
+  <link rel="stylesheet" href="{% static 'css/jquery-ui.structure.min.css' %}" type='text/css'>
+  <link rel="stylesheet" href="{% static 'css/jquery-ui.theme.min.css' %}" type='text/css'>
+  <script src="{% static 'js/jquery-ui.min.js' %}">
+  </script>
+{% endblock %}
+
+{% block title %} All builds - Toaster {% endblock %}
+
+{% block pagecontent %}
+
+  <div class="row-fluid">
+    {% with mru=mru mrb_type=mrb_type %}
+      {% include 'mrb_section.html' %}
+    {% endwith %}
+
+    <h1 class="page-header top-air" data-role="page-title"></h1>
+
+    {% url 'builds' as xhr_table_url %}
+    {% include 'toastertable.html' %}
+  </div>
+
+  <script>
+    $(document).ready(function () {
+      var tableElt = $("#{{table_name}}");
+      var titleElt = $("[data-role='page-title']");
+
+      tableElt.on("table-done", function (e, total, tableParams) {
+        var title = "All builds";
+
+        if (tableParams.search || tableParams.filter) {
+          if (total === 0) {
+            title = "No builds found";
+          }
+          else if (total > 0) {
+            title = total + " build" + (total > 1 ? 's' : '') + " found";
+          }
+        }
+
+        titleElt.text(title);
+      });
+    });
+  </script>
+{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds.html
deleted file mode 100644
index a27a121..0000000
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/builds.html
+++ /dev/null
@@ -1,119 +0,0 @@
-{% extends "base.html" %}
-
-{% load static %}
-{% load projecttags %}
-{% load project_url_tag %}
-{% load humanize %}
-
-{% block title %} All builds - Toaster {% endblock %}
-{% block extraheadcontent %}
-<link rel="stylesheet" href="/static/css/jquery-ui.min.css" type='text/css'>
-<link rel="stylesheet" href="/static/css/jquery-ui.structure.min.css" type='text/css'>
-<link rel="stylesheet" href="/static/css/jquery-ui.theme.min.css" type='text/css'>
-<script src="/static/js/jquery-ui.min.js"></script>
-<script src="/static/js/filtersnippet.js"></script>
-{% endblock %}
-
-{% block pagecontent %}
-
-{% if last_date_from and last_date_to %}
-<script>
-    // initialize the date range controls
-    $(document).ready(function () {
-        date_init('started_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_started_on}}','{{dateMax_started_on}}','{{daterange_selected}}');
-        date_init('completed_on','{{last_date_from}}','{{last_date_to}}','{{dateMin_completed_on}}','{{dateMax_completed_on}}','{{daterange_selected}}');
-    });
-</script>
-{%endif%} {# last_date_from and last_date_to #}
-
-<div class="row-fluid">
-
-  {% include "mrb_section.html" %}
-
-  <div class="page-header top-air">
-     <h1>
-      {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
-          {{objects.paginator.count}} build{{objects.paginator.count|pluralize}} found
-      {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
-          No builds found
-      {%else%}
-          All builds
-      {%endif%}
-     </h1>
-  </div>
-
-  {% if objects.paginator.count == 0 %}
-    <div class="row-fluid">
-      <div class="alert">
-        <form class="no-results input-append" id="searchform">
-            <input id="search" name="search" class="input-xxlarge" type="text" value="
-            {% if request.GET.search %}
-                {{request.GET.search}}
-        {% endif %}"/>
-            {% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
-            <button class="btn" type="submit" value="Search">Search</button>
-            <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all builds</button>
-        </form>
-      </div>
-    </div>
-  {% else %}
-  {% include "basetable_top.html" %}
-        <!-- Table data rows; the order needs to match the order of "tablecols" definitions; and the <td class value needs to match the tablecols clclass value for show/hide buttons to work -->
-        {% for build in objects %}
-        <tr class="data" data-table-build-result="{{ build.id }}">
-            <td class="outcome">
-                <a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a> &nbsp;
-            </td>
-            <td class="target">
-                {% for t in build.target_set.all %}
-                    <a href="{% url "builddashboard" build.id %}">
-                        {% if t.task %}
-                            {{t.target}}:{{t.task}}
-                        {% else %}
-                            {{t.target}}
-                        {% endif %}
-                    </a> <br />
-                {% endfor %}
-            </td>
-            <td class="machine"><a href="{% url "builddashboard" build.id %}">{{build.machine}}</a></td>
-            <td class="started_on"><a href="{% url "builddashboard" build.id %}">{{build.started_on|date:"d/m/y H:i"}}</a></td>
-            <td class="completed_on"><a href="{% url "builddashboard" build.id %}">{{build.completed_on|date:"d/m/y H:i"}}</a></td>
-            <td class="failed_tasks error">
-                {% query build.task_build outcome=4 order__gt=0 as exectask%}
-                    {% if exectask.count == 1 %}
-                        <a href="{% url "task" build.id exectask.0.id %}">{{exectask.0.recipe.name}}.{{exectask.0.task_name}}</a>
-                        <a href="{% url 'build_artifact' build.id "tasklogfile" exectask.0.id %}">
-                            <i class="icon-download-alt" title="" data-original-title="Download task log file"></i>
-                        </a>
-                    {% elif exectask.count > 1%}
-                        <a href="{% url "tasks" build.id %}?filter=outcome%3A4">{{exectask.count}} task{{exectask.count|pluralize}}</a>
-                    {%endif%}
-            </td>
-            <td class="errors.count errors_no">
-                {% if  build.errors.count %}
-                    <a class="errors.count error" href="{% url "builddashboard" build.id %}#errors">{{build.errors.count}} error{{build.errors.count|pluralize}}</a>
-                {%endif%}
-            </td>
-            <td class="warnings.count warnings_no">{% if  build.warnings.count %}<a class="warnings.count warning" href="{% url "builddashboard" build.id %}#warnings">{{build.warnings.count}} warning{{build.warnings.count|pluralize}}</a>{%endif%}</td>
-            <td class="time"><a href="{% url "buildtime" build.id %}">{{build.timespent_seconds|sectohms}}</a></td>
-            <td class="output">
-              {% if build.outcome == build.SUCCEEDED %}
-              <a href="{%url "builddashboard" build.id%}#images">{{fstypes|get_dict_value:build.id}}</a>
-              {% endif %}
-            </td>
-            <td class="project-name">
-                <a href="{% project_url build.project %}">{{build.project.name}}</a>
-                {% if build.project.is_default %}
-                    <i class="icon-question-sign get-help hover-help" title="" data-original-title="This project shows information about the builds you start from the command line while Toaster is running" style="visibility: hidden;"></i>
-                {% endif %}
-            </td>
-        </tr>
-
-        {% endfor %}
-
-
-  {% include "basetable_bottom.html" %}
-  {% endif %} {# objects.paginator.count #}
-</div><!-- end row-fluid-->
-
-{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/customise_btn.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/customise_btn.html
index 54d05f9..2e54a9d 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/customise_btn.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/customise_btn.html
@@ -1,9 +1,15 @@
-<button class="btn btn-block layer-exists-{{data.layer_version.id}} customise-btn" style="display:none;" data-recipe="{{data.id}}">
+<button class="btn btn-block layer-exists-{{data.layer_version.pk}} customise-btn"  data-recipe="{{data.pk}}"
+    {% if data.layer_version.pk not in extra.current_layers %}
+    style="display:none;"
+    {% endif %}
+  >
   Customise
 </button>
-
-<button class="btn btn-block layer-add-{{data.layer_version.id}} layerbtn" data-layer='{ "id": {{data.layer_version.id}}, "name": "{{data.layer_version.layer.name}}", "layerdetailurl": "{% url 'layerdetails' extra.pid data.layer_version.id %}"}' data-directive="add">
+<button class="btn btn-block layer-add-{{data.layer_version.pk}} layerbtn" data-layer='{ "id": {{data.layer_version.pk}}, "name":  "{{data.layer_version.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.pk%}"}' data-directive="add"
+    {% if data.layer_version.pk in extra.current_layers %}
+    style="display:none;"
+    {% endif %}
+  >
   <i class="icon-plus"></i>
   Add layer
 </button>
-
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html
index 823bbd8..ea3c9c7 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/customrecipe.html
@@ -4,13 +4,32 @@
 {% load static %}
 {% block pagecontent %}
 
-{% include "projecttopbar.html" %}
+<div class="section">
+  <ul class="breadcrumb">
+    <li>
+      <a href="{% url 'project' project.id %}">{{project.name}}</a>
+      <span class="divider">&rarr;</span>
+    </li>
+    <li><a href="{% url 'projectcustomimages' project.id %}">Custom images</a>
+      <span class="divider">&rarr;</span>
+    </li>
+    <li class="active">
+      {{recipe.name}} ({{recipe.layer_version.layer.name}})
+    </li>
+  </ul>
+</div>
 
 <script src="{% static 'js/customrecipe.js' %}"></script>
 <script>
   $(document).ready(function (){
     var ctx = {
-      tableApiUrl: "{% url 'recipeselectpackages' project.id recipe.pk %}?format=json"
+      recipe : {
+        id: {{recipe.pk}},
+        name: "{{recipe.name}}",
+        includedPackagesCount: {{recipe.includes_set.count}},
+        baseRecipeId: {{recipe.base_recipe.pk}},
+        xhrPackageListUrl: "{% url 'xhr_customrecipe_packages' recipe.pk %}",
+      }
     };
 
     try {
@@ -21,6 +40,45 @@
     }
   });
 </script>
+<!-- package dependencies modal -->
+<div style="display:none" id="package-deps-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
+  <div class="modal-header">
+    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+    <h3><span class="package-to-add-name"></span> dependencies</h3>
+  </div>
+  <div class="modal-body">
+    <p>Based on information from a previous build it is likely that adding <strong class="package-to-add-name"></strong> will also add the following packages to your custom image:</p>
+    <ul id="package-add-dep-list">
+    </ul>
+  </div>
+  <div class="modal-footer">
+    <p class="help-block text-left">Total package size: <strong id="package-deps-total-size"></strong></p>
+    <button id="add-package-deps-modal-btn" type="submit" class="btn btn-primary" data-dismiss="modal">Add package</button>
+    <button class="btn" data-dismiss="modal">Cancel</button>
+  </div>
+</div>
+<!-- end package dependencies modal -->
+
+<!-- package reverse dependencies modal -->
+<div style="display:none" id="package-reverse-deps-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
+  <div class="modal-header">
+    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
+    <h3><span class="package-to-rm-name"></span> reverse dependencies</h3>
+  </div>
+  <div class="modal-body">
+    <p> <strong class="reverse-deps-count"></strong> <span class="reverse-deps-package"></span> in your image <span class="reverse-deps-depends"></span> on <strong class="package-to-rm-name"></strong>:</p>
+    <ul id="package-reverse-dep-list">
+    </ul>
+    <p>In order to remove <strong class="package-to-rm-name"></strong>, you must remove <span class="reverse-deps-this"></span> <strong class="reverse-deps-count"></strong> <span class="reverse-deps-package"></span> as well.</p>
+  </div>
+  <div class="modal-footer">
+    <p class="help-block text-left">Total package size: <strong id="package-reverse-deps-total-size"></strong></p>
+    <button id="rm-package-reverse-deps-modal-btn" type="submit" class="btn btn-primary" data-dismiss="modal">Remove all <span class="reverse-deps-count-plus1"></button>
+    <button class="btn" data-dismiss="modal">Cancel</button>
+  </div>
+</div>
+<!-- end package dependencies modal -->
+
 
 <div class="row-fluid span11">
   <div class="alert alert-success lead" id="image-created-notification" style="margin-top: 15px; display: none">
@@ -30,7 +88,7 @@
   <div class="page-header air">
     <h1>
       {{recipe.name}}
-      <small>({{recipe.base_recipe.name}})</small>
+      <small>({{recipe.layer_version.layer.name}})</small>
     </h1>
   </div>
 </div>
@@ -38,44 +96,49 @@
 <div class="row-fluid span11">
   <div class="span8">
     <div class="button-place btn-group" style="width: 100%">
-      <a class="btn btn-large span6" href="#" id="build-custom-image" style="width: 50%">
+      <a class="btn btn-large span6 build-custom-image" href="#" style="width: 50%">
         Build {{recipe.name}}
       </a>
-      <button class="btn btn-large span6" data-toggle="modal" data-target="#download-file" id="download" style="width: 50%">
-      Download recipe file
-    </button>
-  </div>
-  <div id="no-package-results" class="air" style="display:none;">
-    <div class="alert">
-      <h3>No packages found</h3>
-      <p>You might consider <a href="all-software-recipes.html">searching the list of recipes</a> instead. If you find a recipe that matches the name of the package you want:</p>
-      <ol>
-        <li>Add the layer providing the recipe to your project</li>
-        <li>Build the recipe</li>
-        <li>Once the build completes, come back to this page and search for the package</li>
-      </ol>
-      <form class="input-append no-results">
-        <input type="text" class="input-xlarge" value="search query">
-          <a href="#" class="add-on btn">
+      <a href="{% url 'customrecipedownload' project.id recipe.id %}" class="btn btn-large span6" style="width: 50%">
+        Download recipe file
+      </a>
+    </div>
+    <div id="no-results-special-{{table_name}}" class="air" style="display:none;">
+      <div class="alert">
+        <h3>No packages found</h3>
+        <p>You might consider <a href={% url 'projectsoftwarerecipes' project.id %}>searching the list of recipes</a> instead. If you find a recipe that matches the name of the package you want:</p>
+        <ol>
+          <li>Add the layer providing the recipe to your project</li>
+          <li>Build the recipe</li>
+          <li>Once the build completes, come back to this page and search for the package</li>
+        </ol>
+        <form class="input-append no-results">
+          <input type="text" class="input-xlarge no-results-search-input" id="no-results-search-input-{{table_name}}" name="search" placeholder="Search {{title|lower}}" />
+          <a href="#" class="add-on btn" id="no-results-remove-search-btn" tabindex="-1">
             <i class="icon-remove"></i>
           </a>
-          <button class="btn">Search</button>
-          <button class="btn btn-link" id="show-all">Show all packages</button>
+          <button class="btn search-submit-{{table_name}}">Search</button>
+          <button class="btn btn-link" id="no-results-show-all-packages">Show all packages</button>
         </form>
       </div>
+      </div>
+      <div id="results-found-{{table_name}}">
+      <div id="packages-table">
+        {% if recipe.get_all_packages.count == 0 and last_build == None %}
+        <h2> Add | Remove packages </h2>
+        <div class="alert alert-info air">
+          <p class="lead">Toaster has no package information for {{recipe.name}}. To generate package information, build {{recipe.name}}</p>
+          <button class="btn btn-info btn-large build-custom-image" style="margin:20px 0 10px 0;">Build {{recipe.name}}</button>
+        </div>
+        {% else %}
+        {# ToasterTable for Adding remove packages #}
+        {% url 'recipeselectpackages' project.id recipe.id as xhr_table_url %}
+        <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>) </h2>
+        {% include "toastertable.html" %}
+        {% endif %}
+      </div>
+      </div>
     </div>
-    <div id="packages-table">
-      {% url 'recipeselectpackages' project.id recipe.id as xhr_table_url %}
-      {% with 'recipeselection' as table_name %}
-      {% with 'Add | Remove packages' as  title %}
-
-      <h2>{{title}} (<span class="table-count-{{table_name}}"></span>) </h2>
-
-      {% include "toastertable.html" %}
-      {% endwith %}
-      {% endwith %}
-    </div>
-  </div>
     <div class="span4 well">
       <h2 style="margin-bottom:20px;">About {{recipe.name}}</h2>
 
@@ -84,59 +147,77 @@
           Approx. packages included
           <i class="icon-question-sign get-help" title="" data-original-title="The number of packages included is based on information from previous builds and from parsing layers, so we can never be sure it is 100% accurate"></i>
         </dt>
-        <dd class="no-packages">{{recipe.packages.count}}</dd>
-        <!-- <dt>
+        <dd id="total-num-packages">{{recipe.get_all_packages.count}}</dd>
+        <dt>
           Approx. package size
           <i class="icon-question-sign get-help" title="" data-original-title="Package size is based on information from previous builds, so we can never be sure it is 100% accurate"></i>
         </dt>
-        <dd>244.3 MB</dd>
+        <dd id="total-size-packages">{{approx_pkg_size.size__sum|filtered_filesizeformat}}</dd>
+        {% if last_build %}
         <dt>Last build</dt>
         <dd>
           <i class="icon-ok-sign success"></i>
-          <a href="build-dashboard.html">11/06/15 15:22</a>
+          <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a>
         </dd>
+        {% endif %}
+        <dt>Layer</dt>
+        <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
+        <dt>Based on</dt>
+        <dd><a href="{% url 'recipedetails' project.id recipe.base_recipe.pk %}">{{recipe.base_recipe.name}}</a></dd>
+        {% if recipe.get_last_successful_built_target %}
+        {% with recipe.get_last_successful_built_target as last_build_target %}
+        <dt>Last build</dt>
+        <dd>
+          <i class="icon-ok-sign success"></i>
+          <a href="{% url 'builddashboard' last_build_target.build.pk %}">
+            {{last_build_target.build.completed_on|date:"d/m/y H:i"}}</a>
+        </dd>
+        {% endwith %}
+        {% endif %}
         <dt>Recipe file</dt>
         <dd>
-          <code>custom-image-name.bb</code>
-          <a href="#download-file" data-toggle="modal"><i class="icon-download-alt" title="" data-original-title="Download recipe file"></i></a>
-          </dd> -->
+          <code>{{recipe.name}}_{{recipe.version}}.bb</code>
+          <a href="{% url 'customrecipedownload' project.pk recipe.pk %}"><i class="icon-share" title="" data-original-title="View recipe file"></i></a>
+        </dd>
         <dt>Layer</dt>
-        <!-- TODO recipe details page -->
-        <dd><a href="{% url 'layerdetails' project.id recipe.base_recipe.layer_version.pk %}">{{recipe.base_recipe.layer_version.layer.name}}</a></dd>
-        <!--<dt>
+        <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
+        {% if recipe.summary %}
+        <dt>
           Summary
         </dt>
         <dd>
-          <span class="muted">Not set</span>
-          <i class="icon-pencil" data-original-title="" title=""></i>
+          {{recipe.summary}}
         </dd>
+        {% endif %}
+        {% if recipe.description %}
         <dt>
           Description
         </dt>
         <dd>
-          <span class="muted">Not set</span>
-          <i class="icon-pencil" data-original-title="" title=""></i>
+          {{recipe.description}}
         </dd>
+        {% endif %}
         <dt>Version</dt>
         <dd>
-          1.0
-          <i class="icon-pencil" data-original-title="" title=""></i>
+          {{recipe.version}}
         </dd>
+        {% if recipe.section %}
         <dt>Section</dt>
         <dd>
-          base
-          <i class="icon-pencil" data-original-title="" title=""></i>
-          <i class="icon-trash" data-original-title="" title=""></i>
+          {{recipe.section}}
         </dd>
+        {% endif %}
         <dt>License</dt>
         <dd>
-          MIT
+          {{recipe.license}}
           <i class="icon-question-sign get-help" title="" data-original-title="All custom images have their license set to MIT. This is because the license applies only to the recipe (.bb) file, and not to the image itself. To see which licenses apply to the image you must check the license manifest generated with each build"></i>
-          </dd> -->
+          </dd>
       </dl>
+      <!--
       <i class="icon-trash no-tooltip"></i>
       <a href="#" class="error" id="delete">Delete custom image</a>
+        -->
     </div>
-</div>
+  </div>
 
   {% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/editcustomimage_modal.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/editcustomimage_modal.html
new file mode 100644
index 0000000..8046c08
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/editcustomimage_modal.html
@@ -0,0 +1,71 @@
+<!--
+modal dialog shown on the build dashboard, for editing an existing custom image;
+only shown if more than one custom image was built, so the user needs to
+choose which one to edit
+
+required context:
+  build - a Build object
+-->
+<div class="modal hide fade in" aria-hidden="false" id="edit-custom-image-modal">
+  <div class="modal-header">
+    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+    <h3>Which image do you want to edit?</h3>
+  </div>
+
+  <div class="modal-body">
+    <div class="row-fluid">
+      {% for recipe in build.get_custom_image_recipes %}
+        <label class="radio">
+          {{recipe.name}}
+          <input type="radio" class="form-control" name="select-custom-image"
+                 data-url="{% url 'customrecipe' build.project.id recipe.id %}">
+        </label>
+      {% endfor %}
+    </div>
+    <span class="help-block error" id="invalid-custom-image-help" style="display:none">
+      Please select a custom image to edit.
+    </span>
+  </div>
+
+  <div class="modal-footer">
+    <button class="btn btn-primary btn-large" data-url="#"
+       data-action="edit-custom-image" disabled>
+      Edit custom image
+    </button>
+  </div>
+</div>
+
+<script>
+$(document).ready(function () {
+  var editCustomImageButton = $('[data-action="edit-custom-image"]');
+  var error = $('#invalid-custom-image-help');
+  var radios = $('[name="select-custom-image"]');
+
+  // return custom image radio buttons which are selected
+  var getSelectedRadios = function () {
+    return $('[name="select-custom-image"]:checked');
+  };
+
+  radios.change(function () {
+    if (getSelectedRadios().length === 1) {
+      editCustomImageButton.removeAttr('disabled');
+      error.hide();
+    }
+    else {
+      editCustomImageButton.attr('disabled', 'disabled');
+      error.show();
+    }
+  });
+
+  editCustomImageButton.click(function () {
+    var selectedRadios = getSelectedRadios();
+
+    if (selectedRadios.length === 1) {
+      document.location.href = selectedRadios.first().attr('data-url');
+    }
+    else {
+      error.show();
+    }
+  });
+});
+</script>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/importlayer.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/importlayer.html
index 033f0ae..1848f41 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/importlayer.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/importlayer.html
@@ -89,7 +89,7 @@
                         <input type="text"  id="layer-subdir">
 
                           <div class="control-group" id="layer-revision-ctrl">
-                            <label class="control-label project-form" for="layer-git-ref">Revision
+                            <label class="control-label project-form" for="layer-git-ref">Git revision
                               <span class="icon-question-sign get-help" title="You can provide a Git branch, a tag or a commit SHA as the revision"></span>
                             </label>
                             <div class="controls">
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html
index 8d65f33..94ad4f8 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/js-unit-tests.html
@@ -4,9 +4,9 @@
 {% load static %}
 {% block pagecontent %}
 
-<link rel="stylesheet" href="//code.jquery.com/qunit/qunit-1.18.0.css" />
+<link rel="stylesheet" href="{% static 'css/qunit-1.18.0.css' %}" />
 
-<script src="//code.jquery.com/qunit/qunit-1.18.0.js"></script>
+<script src="{% static 'js/qunit-1.18.0.js' %}"></script>
 
 <script src="{% static 'js/layerDepsModal.js' %}"></script>
 <script src="{% static 'js/projectpage.js' %}"></script>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/landing.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/landing.html
index cafaa1a..a1b5cdc 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/landing.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/landing.html
@@ -6,9 +6,6 @@
 
 {% block title %} Welcome to Toaster {% endblock %}
 {% block pagecontent %}
-
-  {% if BUILD_MODE %}
-    <!-- build mode -->
     <div class="container-fluid">
       <div class="row-fluid">
         <div class="hero-unit span12 well-transparent">
@@ -62,11 +59,4 @@
         </div>
       </div>
     </div>
-  {% else %}
-    <!-- analysis mode -->
-    <div class="alert alert-info lead top-air">
-      Toaster has not recorded any builds yet. Run a build from the command line to see it here.
-    </div>
-  {% endif %}
-
 {% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/layer_btn.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/layer_btn.html
index 314eec7..10de37d 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/layer_btn.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/layer_btn.html
@@ -4,7 +4,7 @@
     {% endif %}
   >
   <i class="icon-trash"></i>
-  Delete layer
+  Remove layer
 </button>
 <button class="btn btn-block layer-add-{{data.pk}} layerbtn" data-layer='{ "id": {{data.pk}}, "name":  "{{data.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.pk%}"}' data-directive="add"
     {% if data.pk in extra.current_layers %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/layerdetails.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/layerdetails.html
index 7fe365d..82be370 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/layerdetails.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/layerdetails.html
@@ -8,9 +8,8 @@
 
 <div class="section">
   <ul class="breadcrumb">
-    <li class="muted">{{project.name}}:</li>
     <li>
-      <a href="{% url 'project' project.id %}">Configuration</a>
+      <a href="{% url 'project' project.id %}">{{project.name}}</a>
       <span class="divider">&rarr;</span>
     </li>
     <li><a href="{% url 'projectlayers' project.id %}">Compatible layers</a>
@@ -46,7 +45,6 @@
 
   $(document).ready(function (){
     var ctx = {
-      projectBuildsUrl : "{% url 'projectbuilds' project.id %}",
       xhrUpdateLayerUrl : "{% url 'xhr_updatelayer' %}",
       layerVersion : {
         name : "{{layerversion.layer.name}}",
@@ -108,7 +106,7 @@
       {% else %}
       <button id="add-remove-layer-btn" data-directive="remove" class="btn btn-block btn-large btn-danger">
         <span class="icon-trash"></span>
-        Delete the {{layerversion.layer.name}} layer from your project
+        Remove the {{layerversion.layer.name}} layer from your project
       </button>
       {% endif %}
     </span>
@@ -156,7 +154,7 @@
             </dd>
             <dt>
               <i class="icon-question-sign get-help" title="The Git branch, tag or commit"></i>
-              Revision
+              Git revision
             </dt>
             <dd>
               <span class="current-value">{{layerversion.get_vcs_reference}}</span>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/machine_btn.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/machine_btn.html
index d2cb55b..7b08f6a 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/machine_btn.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/machine_btn.html
@@ -1,6 +1,14 @@
-<a href="{% url 'project' extra.pid %}?setMachine={{data.name}}" class="btn btn-block layer-exists-{{data.layer_version.id}}" style="margin-top: 5px; display:none">
+<a href="{% url 'project' extra.pid %}?setMachine={{data.name}}" class="btn btn-block layer-exists-{{data.layer_version.id}}"
+    {% if data.layer_version.pk not in extra.current_layers %}
+    style="display:none;"
+    {% endif %}
+>
   Select machine</a>
-<button class="btn btn-block layerbtn layer-add-{{data.layer_version.id}}" data-layer='{ "id": {{data.layer_version.id}}, "name":  "{{data.layer_version.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.id %}"}' data-directive="add">
+<button class="btn btn-block layerbtn layer-add-{{data.layer_version.id}}" data-layer='{ "id": {{data.layer_version.id}}, "name":  "{{data.layer_version.layer.name}}", "layerdetailurl": "{%url 'layerdetails' extra.pid data.layer_version.id %}"}' data-directive="add"
+    {% if data.layer_version.pk in extra.current_layers %}
+    style="display:none;"
+    {% endif %}
+>
   <i class="icon-plus"></i>
   Add layer
   <i title="" class="icon-question-sign get-help" data-original-title="To enable this machine, you must first add the {{data.layer_version.layer.name}} layer to your project"></i>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/mrb_section.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/mrb_section.html
index bd8f991..b5e798d 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/mrb_section.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/mrb_section.html
@@ -2,11 +2,26 @@
 {% load projecttags %}
 {% load project_url_tag %}
 {% load humanize %}
+<script src="{% static 'js/mrbsection.js' %}"></script>
+<script>
+  $(document).ready(function () {
+    var ctx = {
+      mrbType : "{{mrb_type}}",
+    }
+
+    try {
+      mrbSectionInit(ctx);
+    } catch (e) {
+      document.write("Sorry, An error has occurred loading this page");
+      console.warn(e);
+    }
+  });
+</script>
 
 {%if mru and mru.count > 0%}
 
   {%if mrb_type == 'project' %}
-      <h2>
+      <h2 class="page-header">
       Latest project builds
 
       {% if project.is_default %}
@@ -14,7 +29,7 @@
       {% endif %}
       </h2>
   {% else %}
-    <div class="page-header">
+    <div class="page-header top-air">
       <h1>
       Latest builds
       </h1>
@@ -38,8 +53,9 @@
             {% if build.target_set.all.count > 0 %}
                 <span data-toggle="tooltip"
                   {% if build.target_set.all.count > 1 %}
-                    title="Targets:
-                    {% for target in build.target_set.all %}
+                    {{build.get_sorted_target_list.0.target}}
+                    title="Recipes:
+                    {% for target in build.get_sorted_target_list %}
                         {% if target.task %}
                             {{target.target}}:{{target.task}}
                         {% else %}
@@ -49,12 +65,12 @@
                   {% endif %}
                 >
                 {% if build.target_set.all.0.task %}
-                    {{build.target_set.all.0.target}}:{{build.target_set.all.0.task}}
+                    {{build.get_sorted_target_list.0.target}}:{{build.target_set.all.0.task}}
                 {% else %}
-                    {{build.target_set.all.0.target}}
+                    {{build.get_sorted_target_list.0.target}}
                 {% endif %}
                 {% if build.target_set.all.count > 1 %}
-                    (+ {{build.target_set.all.count|add:"-1"}})
+                    (+{{build.target_set.all.count|add:"-1"}})
                 {% endif %}
                 </span>
              {% endif %}
@@ -98,7 +114,7 @@
                   " title="Builds in this project cannot be started from Toaster: they are started from the command line">
                   </i>
               {% else %}
-                  <button class="btn
+                  <button class="run-again-btn btn
                       {% if build.outcome == build.SUCCEEDED %}
                           btn-success
                       {% elif build.outcome == build.FAILED %}
@@ -107,54 +123,56 @@
                           btn-info
                       {%endif%}
                       pull-right"
-                      onclick='scheduleBuild({% url 'projectbuilds' build.project.id as bpi %}{{bpi|json}},
-                        {{build.project.name|json}},
-                        {% url 'project' build.project.id as purl %}{{purl|json}},
-                        {{build.target_set.all|get_tasks|json}})'>
+                      data-request-url="{% url 'xhr_buildrequest' build.project.pk %}"
+                      data-target='{{build.target_set.all|get_tasks|json}}'>
 
-                        Run again
+
+                        Rebuild
                   </button>
               {% endif %}
             </div>
     {%endif%}
     {%if build.outcome == build.IN_PROGRESS %}
-            <div class="span4 offset1">
-                <div class="progress" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete">
-                    <div style="width: {{build.completeper}}%;" class="bar"></div>
-                </div>
-            </div>
-            <div class="lead pull-right">{{build.completeper}}% of tasks complete</div>
-    {%endif%}
-        </div>
+    <div class="span4" style="display:none" id="cancelling-msg-{{build.buildrequest.pk}}">
+      <p class="lead">Cancelling the build ...</p>
     </div>
+    <div class="span4 offset1 progress-info">
+      <div class="progress" id="build-pc-done-title-{{build.pk}}" style="margin-top:5px;" data-toggle="tooltip" title="{{build.completeper}}% of tasks complete">
+        <div id="build-pc-done-bar-{{build.pk}}" style="width: {{build.completeper}}%;" class="bar"></div>
+      </div>
+    </div>
+    <div class="lead span3 progress-info"><span id="build-pc-done-{{build.pk}}">{{build.completeper}}</span>% of tasks complete</div>
+    {# No build cancel for command line builds project #}
+    {% if build.project.is_default %}
+    <i class="icon-question-sign get-help get-help-blue pull-right" title="" data-original-title="Builds in this project cannot be cancelled from Toaster: they can only be cancalled from the command line"></i>
+    {% else %}
+    <div class="lead pull-right progress-info">
+      <button class="cancel-build-btn btn btn-info pull-right"
+          data-buildrequest-id={{build.buildrequest.pk}}
+          data-request-url="{% url 'xhr_buildrequest' build.project.pk %}" >
+        Cancel
+      </button>
+    </div>
+    {% endif %}
+
+    {%endif%} {# end if in progress #}
+
+    {% if build.outcome == build.CANCELLED %}
+    <div class="span4">
+      <p class="lead">Build cancelled</p>
+    </div>
+    <button class="btn btn-info pull-right run-again-btn"
+        data-request-url="{% url 'xhr_buildrequest' build.project.pk %}"
+        data-target='{{build.target_set.all|get_tasks|json}}'>
+      Rebuild
+
+    </button>
+    {% endif %}
+  </div>
+</div>
 
   {% endfor %}
   </div>
 
-<script>
-
-function scheduleBuild(url, projectName, projectUrl, buildlist) {
-  console.log("scheduleBuild");
-  libtoaster.startABuild(url, null, buildlist.join(" "), function(){
-    console.log("reloading page");
-    window.location.reload();
-  }, null);
-}
-
-$(document).ready(function(){
-
-  $(".cancel-build-btn").click(function (){
-    var url = $(this).data('request-url');
-    var buildIds = $(this).data('build-id');
-    var btn = $(this);
-
-    libtoaster.cancelABuild(url, buildIds, function(){
-      btn.parents(".alert").fadeOut();
-    }, null);
-  });
-});
-
-</script>
-
 {%endif%}
 
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage.html
index 4487b3e..46aed90 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage.html
@@ -4,51 +4,11 @@
 {% load static %}
 {% block pagecontent %}
 
-<script src="{% static 'js/newcustomimage.js' %}"></script>
-<script>
-  $(document).ready(function (){
-    var ctx = {
-      xhrCustomRecipeUrl : "{% url 'xhr_customrecipe' %}",
-    };
-
-    try {
-      newCustomImagePageInit(ctx);
-    } catch (e) {
-      document.write("Sorry, An error has occurred loading this page");
-      console.warn(e);
-    }
-  });
-</script>
-
-</script>
-<div class="modal hide fade in" id="new-custom-image-modal" aria-hidden="false">
-  <div class="modal-header">
-    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
-    <h3>Name your custom image</h3>
-  </div>
-  <div class="modal-body">
-    <div class="row-fluid">
-      <span class="help-block span8">Image names must be unique. They should not contain spaces or capital letters, and the only allowed special character is dash (-).<p></p>
-      </span></div>
-    <div class="control-group controls">
-      <input type="text" class="huge span5" placeholder="Type the name, something like 'core-image-myimage'">
-        <span class="help-block" style="display:none">Image names cannot contain spaces or capital letters. The only allowed special character is dash (-)</span>
-        <span class="help-block" style="display: none">An image with this name already exists. Image names must be unique: try a different one.</span>
-      </div>
-    </div>
-    <div class="modal-footer">
-      <a href="#" id="create-new-custom-image-btn" class="btn btn-primary btn-large" data-original-title="" title="">Create custom image</a>
-    </div>
-</div>
-
+{% include "newcustomimage_modal.html" %}
 {% include "projecttopbar.html" %}
 
-
 {% url table_name project.id as xhr_table_url %}
+<h2>{{title}} (<span class="table-count-{{table_name}}">0</span>)</h2>
 {% include "toastertable.html" %}
 
-
-
 {% endblock %}
-
-
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html
new file mode 100644
index 0000000..caeb302
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/newcustomimage_modal.html
@@ -0,0 +1,48 @@
+{% load static %}
+
+<script src="{% static 'js/newcustomimage_modal.js' %}"></script>
+<script>
+  $(document).ready(function (){
+    try {
+      newCustomImageModalInit();
+    } catch (e) {
+      document.write("Sorry, An error has occurred loading this page");
+      console.warn(e);
+    }
+  });
+</script>
+
+<div class="modal hide fade in" id="new-custom-image-modal" aria-hidden="false">
+  <div class="modal-header">
+    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
+    <h3>New custom image</h3>
+  </div>
+
+  <div class="modal-body">
+    <!--
+    this container is visible if there are multiple image recipes which could
+    be used as a basis for the new custom image; radio buttons are added to it
+    via newCustomImageModalSetRecipes() as required
+    -->
+    <div data-role="image-selector" style="display:none;">
+      <h4>Which image do you want to customise?</h4>
+      <div data-role="image-selector-radios"></div>
+      <span class="help-block error" id="invalid-recipe-help" style="display:none"></span>
+      <div class="air"></div>
+    </div>
+
+    <h4>Name your custom image</h4>
+
+    <div class="row-fluid">
+      <span class="help-block span8">Image names must be unique. They should not contain spaces or capital letters, and the only allowed special character is dash (-).<p></p>
+      </span></div>
+    <div class="control-group controls">
+      <input type="text" class="huge" placeholder="Type the custom image name" required>
+      <span class="help-block error" id="invalid-name-help" style="display:none"></span>
+    </div>
+  </div>
+
+  <div class="modal-footer">
+    <button id="create-new-custom-image-btn" class="btn btn-primary btn-large" data-original-title="" title="" disabled>Create custom image</button>
+  </div>
+</div>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html
index b766aea..0aefc56 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/pkg_add_rm_btn.html
@@ -1,16 +1,34 @@
-<button class="btn btn-block btn-danger add-rm-package-btn" id="package-rm-btn-{{data.pk}}" data-directive="remove" data-package="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" style="
-  {% if data.pk not in extra.current_packages %}
-    display:none
-  {% endif %}
-  ">
-  <i class="icon-trash no-tooltip"></i>
-  Remove package
-</a>
-<button class="btn btn-block add-rm-package-btn" data-directive="add" id="package-add-btn-{{data.pk}}" data-package="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" style="
-  {% if data.pk in extra.current_packages %}
-    display:none
-  {% endif %}
-    ">
-<i class="icon-plus"></i>
- Add package
-</button>
+{# TODO move to snippets dir #}
+{% if data.is_locale_package %}
+<p class="text-center">
+  <span class="muted">Locale package</span>
+  <i class="icon-question-sign get-help hover-help" title=""
+      data-original-title="This package is included in your image
+      based on the locale specified in the IMAGE_LINGUAS variable"
+      style="visibility: hidden;">
+  </i>
+</p>
+
+{% else %}
+
+<div id="package-btn-cell-{{data.pk}}">
+  <div style="display: none; font-size: 11px; line-height: 1.3;" class="tooltip-inner inline-notification"></div>
+  <button class="btn btn-block btn-danger add-rm-package-btn" data-directive="remove" data-id="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" data-name="{{data.name}}" style="
+      {% if data.pk not in extra.current_packages %}
+      display:none
+      {% endif %}
+      ">
+    <i class="icon-trash no-tooltip"></i>
+    Remove package
+  </button>
+  <button class="btn btn-block add-rm-package-btn" data-directive="add" data-id="{{data.pk}}" data-package-url="{% url 'xhr_customrecipe_packages' extra.recipe_id data.pk %}" data-name="{{data.name}}" style="
+      {% if data.pk in extra.current_packages %}
+      display:none
+      {% endif %}
+      ">
+    <i class="icon-plus"></i>
+    Add package
+  </button>
+</div>
+
+{% endif %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/project.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/project.html
index 4e83981..1256768 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/project.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/project.html
@@ -24,7 +24,9 @@
   });
 </script>
 
-<div id="change-release-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="change-release-modal" aria-hidden="false">
+<!-- Comment out the ability to change the project release, until we decide what to do this functionality -->
+
+<!--div id="change-release-modal" class="modal hide fade in" tabindex="-1" role="dialog" aria-labelledby="change-release-modal" aria-hidden="false">
   <div class="modal-header">
     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
     <h3>Changing Yocto Project release to <span class="proposed-release-change-name"></span></h3>
@@ -39,7 +41,7 @@
     <button id="change-release-and-rm-layers" data-dismiss="modal" type="submit" class="btn btn-primary">Change release and delete layers</button>
     <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
   </div>
-</div>
+</div-->
 
 
 <div class="row-fluid" id="project-page" style="display:none">
@@ -68,7 +70,7 @@
 
       <div class="alert alert-info" style="display:none" id="no-most-built">
         <span class="lead">You haven't built any recipes yet</span>
-        <p style="margin-top: 10px;"><a href="{% url 'projectsoftwarerecipes' project.id %}">Choose a recipe to build</a></p>
+        <p style="margin-top: 10px;"><a href="{% url 'projectimagerecipes' project.id %}">Choose a recipe to build</a></p>
       </div>
 
       <ul class="unstyled configuration-list" id="freq-build-list">
@@ -79,12 +81,19 @@
     <div class="well well-transparent">
       <h3>Project release</h3>
 
-      <p class="lead"><span id="project-release-title"></span> <i title="" data-original-title="" id="release-change-toggle" class="icon-pencil"></i></p>
+      <p class="lead"><span id="project-release-title"></span>
 
-      <form class="form-inline" id="change-release-form" style="display:none;">
+      <!-- Comment out the ability to change the project release, until we decide what to do with this functionality -->
+
+      <!--i title="" data-original-title="" id="release-change-toggle" class="icon-pencil"></i-->
+      </p>
+
+      <!-- Comment out the ability to change the project release, until we decide what to do with this functionality -->
+
+      <!--form class="form-inline" id="change-release-form" style="display:none;">
         <select></select>
         <button class="btn" style="margin-left:5px;" id="change-release-btn">Change</button> <a href="#" id="cancel-release-change" class="btn btn-link">Cancel</a>
-      </form>
+      </form-->
     </div>
   </div>
 
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html
new file mode 100644
index 0000000..6d7e10b
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds-toastertable.html
@@ -0,0 +1,56 @@
+{% extends 'base.html' %}
+
+{% load static %}
+
+{% block extraheadcontent %}
+  <link rel="stylesheet" href="{% static 'css/jquery-ui.min.css' %}" type='text/css'>
+  <link rel="stylesheet" href="{% static 'css/jquery-ui.structure.min.css' %}" type='text/css'>
+  <link rel="stylesheet" href="{% static 'css/jquery-ui.theme.min.css' %}" type='text/css'>
+  <script src="{% static 'js/jquery-ui.min.js' %}">
+  </script>
+{% endblock %}
+
+{% block title %} {{title}} - {{project.name}} - Toaster {% endblock %}
+
+{% block pagecontent %}
+
+  {% include "projecttopbar.html" %}
+
+  <div class="row-fluid">
+    {% with mru=mru mrb_type=mrb_type %}
+      {% include 'mrb_section.html' %}
+    {% endwith %}
+
+    <h2 class="page-header top-air" data-role="page-title"></h2>
+
+    {% url 'projectbuilds' project.id as xhr_table_url %}
+    {% include 'toastertable.html' %}
+  </div>
+
+  <script>
+    $(document).ready(function () {
+      // title
+      var tableElt = $("#{{table_name}}");
+      var titleElt = $("[data-role='page-title']");
+
+      tableElt.on("table-done", function (e, total, tableParams) {
+        var title = "All project builds";
+
+        if (tableParams.search || tableParams.filter) {
+          if (total === 0) {
+            title = "No project builds found";
+          }
+          else if (total > 0) {
+            title = total + " project build" + (total > 1 ? 's' : '') + " found";
+          }
+        }
+
+        titleElt.text(title);
+      });
+
+      // highlight builds tab
+      $("#topbar-builds-tab").addClass("active")
+    });
+  </script>
+
+{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
index bb38284..3402fc4 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectbuilds.html
@@ -63,11 +63,12 @@
         {% for build in objects %} {# if we have a build, just display it #}
         <tr class="data">
             <td class="outcome"><a href="{% url "builddashboard" build.id %}">{%if build.outcome == build.SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif build.outcome == build.FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a>
-                   {% if build.project %}
-                        &nbsp; <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
-                            <i class="icon-download-alt" title="" data-original-title="Download build log"></i>
-                        </a>
-                    {% endif %}
+              {% if build.cooker_log_path %}
+                &nbsp;
+                <a href="{% url 'build_artifact' build.id "cookerlog" build.id %}">
+                  <i class="icon-download-alt" title="Download build log"></i>
+                </a>
+              {% endif %}
             </td>
 
             <td class="target">
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectconf.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectconf.html
index 30fd03e..27a898b 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectconf.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projectconf.html
@@ -31,6 +31,28 @@
             </dd>
             {% endif %}
 
+            {% if dl_dir_defined %}
+            <dt>
+                <span class="js-config-var-name js-config-var-managed-name">DL_DIR</span>
+                <i class="icon-question-sign get-help" title="Absolute path to the directory used to store downloads required for your builds. By default, Toaster projects share the same downloads directory.<br /><a href='http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-DL_DIR' target='_blank'>Read more in the manual</a>"></i>
+            </dt>
+            <dd class="lead">
+                <span id="dl_dir"{% if dl_dir %}{%else%} class="muted"{%endif%}>{% if dl_dir %}{{dl_dir}}{%else%}Not set{%endif%}</span>
+                <i class="icon-pencil" id="change-dl_dir-icon"></i>
+                <form id="change-dl_dir-form" style="display:none;">
+                    <div class="row-fluid">
+                        <span class="help-block span4">To set DL_DIR type the absolute path of the download folder.</span>
+                    </div>
+                    <div class="input-append" id="validate-dl_dir">
+                        <input type="text" class="input-xlarge" id="new-dl_dir" placeholder="Type absolute path of the DL_DIR folder">
+                        <button id="apply-change-dl_dir" class="btn" type="button">Save</button>
+                        <button id="cancel-change-dl_dir" type="button" class="btn btn-link">Cancel</button>
+			</br><span class="help-block error" id="hintError-dl_dir">A valid directory cannot include spaces or any of these characters: . \ ? % * : | " " < ></span>
+                    </div>
+                </form>
+            </dd>
+            {% endif %}
+
             {% if fstypes_defined %}
             <dt>
                 <span class="js-config-var-name js-config-var-managed-name">IMAGE_FSTYPES</span>
@@ -108,31 +130,28 @@
             </dd>
             {% endif %}
 
-            {% if sdk_machine_defined %}
+            {% if sstate_dir_defined %}
             <dt>
-                <span class="js-config-var-name js-config-var-managed-name">SDKMACHINE</span>
-                <i class="icon-question-sign get-help" title="Specifies the architecture (i.e. i686 or x86_64) for which to build SDK and ADT items <br /><a href='http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-SDKMACHINE' target='_blank'>Read more in the manual</a>"></i>
+                <span class="js-config-var-name js-config-var-managed-name">SSTATE_DIR</span>
+                <i class="icon-question-sign get-help" title="Absolute path to the directory used to store shared state cache files. These files are reused across the builds, which makes the builds faster. By default, Toaster projects share the same cache directory.<br /><a href='http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-SSTATE_DIR' target='_blank'>Read more in the manual</a>"></i>
             </dt>
             <dd class="lead">
-                <span id="sdkmachine">{{sdk_machine}}</span>
-                <i id="change-sdkmachine-icon" class="icon-pencil"></i>
-                <form id="change-sdkmachine-form" style="display:none;">
-                    <label class="radio">
-                        <input type="radio" name="sdkmachine" value="i686">
-                        i686
-                    </label>
-                    <label class="radio">
-                        <input type="radio" name="sdkmachine" value="x86_64">
-                        x86_64
-                    </label>
-                    <div style="padding-top:10px;">
-                        <button id="apply-change-sdkmachine" type="button" class="btn">Save</button>
-                        <button id="cancel-change-sdkmachine" type="button" class="btn btn-link">Cancel</button>
+                <span id="sstate_dir"{% if sstate_dir %}{%else%} class="muted"{%endif%}>{% if sstate_dir %}{{sstate_dir}}{%else%}Not set{%endif%}</span>
+                <i class="icon-pencil" id="change-sstate_dir-icon"></i>
+                <form id="change-sstate_dir-form" style="display:none;">
+                    <div class="row-fluid">
+                        <span class="help-block span4">To set SSTATE_DIR type the absolute path of the download folder.</span>
+                    </div>
+                    <div class="input-append" id="validate-sstate_dir">
+                        <input type="text" class="input-xlarge" id="new-sstate_dir" placeholder="Type absolute path of the SSTATE_DIR folder">
+                        <span class="error">A valid directory name required</span>
+                        <button id="apply-change-sstate_dir" class="btn" type="button">Save</button>
+                        <button id="cancel-change-sstate_dir" type="button" class="btn btn-link">Cancel</button>
+			</br><p class="help-block error" id="hintError-sstate_dir">A valid directory cannot include spaces or any of these characters: . \ ? % * : | " " < ></span>
                     </div>
                 </form>
             </dd>
             {% endif %}
-
         </dl>
 
         <!-- <ul class="unstyled configuration-list" id="configvar-list"> -->
@@ -182,9 +201,7 @@
                     <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-BB_NUMBER_THREADS" target="_blank">BB_NUMBER_THREADS</a></code>
                     <code>CVS_PROXY_HOST</code>
                     <code>CVS_PROXY_PORT</code>
-                    <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-DL_DIR" target="_blank">DL_DIR</a></code>
                     <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-PARALLEL_MAKE" target="_blank">PARALLEL_MAKE</a></code>
-                    <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-SSTATE_DIR" target="_blank">SSTATE_DIR</a></code>
                     <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-SSTATE_MIRRORS" target="_blank">SSTATE_MIRRORS</a></code>
                     <code><a href="http://www.yoctoproject.org/docs/1.6.1/ref-manual/ref-manual.html#var-TMPDIR" target="_blank">TMPDIR</a></code></p>
                     <p>Plus the following standard shell environment variables:</p>
@@ -527,6 +544,61 @@
             });
             {% endif %}
 
+            {% if dl_dir_defined %}
+
+            // change DL_DIR variable
+            $('#change-dl_dir-icon').click(function() {
+                $('#hintError-dl_dir').hide();
+	        // preset the edit value
+                var current_val = $("span#dl_dir").text().trim();
+                if (current_val == "Not set") {
+                    current_val="";
+                    $("#apply-change-dl_dir").attr("disabled","disabled");
+                }
+                $("input#new-dl_dir").val(current_val);
+
+                $('#change-dl_dir-icon, #dl_dir').hide();
+                $("#change-dl_dir-form").slideDown();
+            });
+
+            $('#cancel-change-dl_dir').click(function(){
+                $("#change-dl_dir-form").slideUp(function() {
+                    $('#dl_dir, #change-dl_dir-icon').show();
+                });
+            });
+
+            $("#new-dl_dir").on('input', function(){
+	        if ($(this).val().trim().length == 0) {
+                    $("#apply-change-dl_dir").attr("disabled","disabled");
+                }
+                else {
+                    var input = $(this);
+                    var re = /^\/([^ <>\\|":\.%\?\*]+)$/;
+	            var invalidDir = re.test(input.val());
+		    console.log(invalidDir);
+                    if ( invalidDir ) {
+                        $('#validate-dl_dir').removeClass('control-group error');
+			$("#apply-change-dl_dir").removeAttr("disabled");
+                        $('#hintError-dl_dir').hide();
+                    } else {
+                        $('#validate-dl_dir').addClass('control-group error');
+			$("#apply-change-dl_dir").attr("disabled","disabled");
+                        $('#hintError-dl_dir').show();
+                    }
+                }
+            });
+
+            $('#apply-change-dl_dir').click(function(){
+                var value = $('#new-dl_dir').val().trim();
+                postEditAjaxRequest({"configvarChange" : 'DL_DIR:'+value});
+                $('#dl_dir').text(value);
+                $('#dl_dir').removeClass('muted');
+                $("#change-dl_dir-form").slideUp(function () {
+                    $('#dl_dir, #change-dl_dir-icon').show();
+               });
+            });
+
+            {% endif %}
 
             {% if fstypes_defined %}
             // change IMAGE_FSTYPES variable
@@ -774,48 +846,62 @@
             });
             {% endif %}
 
+            {% if sstate_dir_defined %}
 
-            {% if sdk_machine_defined %}
-            // change SDKMACHINE variable
-            $('#change-sdkmachine-icon').click(function() {
-                var current_value = document.getElementById("sdkmachine").innerHTML;
-                var radios = document.getElementsByName('sdkmachine');
-                for (var i = 0, length = radios.length; i < length; i++) {
-                    radios[i].checked = false;
-                    if (radios[i].value == current_value) {
-                        radios[i].checked = true;
-                    }
+            // change SSTATE_DIR variable
+            $('#change-sstate_dir-icon').click(function() {
+                $('#hintError-sstate_dir').hide();
+                // preset the edit value
+                var current_val = $("span#sstate_dir").text().trim();
+                if (current_val == "Not set") {
+                    current_val="";
+                    $("#apply-change-sstate_dir").attr("disabled","disabled");
                 }
-                $('#change-sdkmachine-icon, #sdkmachine').hide();
-                $("#change-sdkmachine-form").slideDown();
+                $("input#new-sstate_dir").val(current_val);
+
+                $('#change-sstate_dir-icon, #sstate_dir').hide();
+                $("#change-sstate_dir-form").slideDown();
             });
 
-            $('#cancel-change-sdkmachine').click(function(){
-                $("#change-sdkmachine-form").slideUp(function() {
-                    $('#sdkmachine, #change-sdkmachine-icon').show();
+            $('#cancel-change-sstate_dir').click(function(){
+                $("#change-sstate_dir-form").slideUp(function() {
+                    $('#sstate_dir, #change-sstate_dir-icon').show();
                 });
             });
 
-            $('#apply-change-sdkmachine').click(function(){
-                var value="";
-                var radios = document.getElementsByName('sdkmachine');
-                for (var i = 0, length = radios.length; i < length; i++) {
-                    if (radios[i].checked) {
-                        // do whatever you want with the checked radio
-                        value=radios[i].value;
-                        break;
+            $("#new-sstate_dir").on('input', function(){
+                if ($(this).val().trim().length == 0) {
+                    $("#apply-change-sstate_dir").attr("disabled","disabled");
+                }
+                else {
+                    var input = $(this);
+                    var re = /^\/([^ <>\\|":\.%\?\*]+)$/;
+	            var invalidDir = re.test(input.val());
+		    console.log(invalidDir);
+                    if ( invalidDir ) {
+                        $('#validate-sstate_dir').removeClass('control-group error');
+			$("#apply-change-sstate_dir").removeAttr("disabled");
+                        $('#hintError-sstate_dir').hide();
+                    } else {
+                        $('#validate-sstate_dir').addClass('control-group error');
+			$("#apply-change-sstate_dir").attr("disabled","disabled");
+                        $('#hintError-sstate_dir').show();
                     }
                 }
-                postEditAjaxRequest({"configvarChange" : 'SDKMACHINE:'+value});
-                $('#sdkmachine').text(value);
-                $("#change-sdkmachine-form").slideUp(function() {
-                    $('#sdkmachine, #change-sdkmachine-icon').show();
-                });
-
             });
+
+            $('#apply-change-sstate_dir').click(function(){
+                var value = $('#new-sstate_dir').val().trim();
+                postEditAjaxRequest({"configvarChange" : 'SSTATE_DIR:'+value});
+                $('#sstate_dir').text(value);
+                $('#sstate_dir').removeClass('muted');
+                $("#change-sstate_dir-form").slideUp(function () {
+                    $('#sstate_dir, #change-sstate_dir-icon').show();
+               });
+            });
+
             {% endif %}
 
-
             // add new variable
             $("button#add-configvar-button").click( function (evt) {
                 var variable = $("input#variable").val();
@@ -830,7 +916,7 @@
                 $(".save").attr("disabled","disabled");
 
                 // Reload page if admin-removed core managed value is manually added back in
-                if (0 <= " DISTRO IMAGE_FSTYPES IMAGE_INSTALL_append PACKAGE_CLASSES SDKMACHINE ".indexOf( " "+variable+" " )) {
+                if (0 <= " DISTRO DL_DIR IMAGE_FSTYPES IMAGE_INSTALL_append PACKAGE_CLASSES SSTATE_DIR ".indexOf( " "+variable+" " )) {
                     // delayed reload to avoid race condition with postEditAjaxRequest
                     do_reload=true;
                 }
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html
new file mode 100644
index 0000000..5814f32
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects-toastertable.html
@@ -0,0 +1,36 @@
+{% extends 'base.html' %}
+
+{% block title %} All projects - Toaster {% endblock %}
+
+{% block pagecontent %}
+
+  <div class="page-header top-air">
+    <h1 data-role="page-title"></h1>
+  </div>
+
+  {% url 'projects' as xhr_table_url %}
+  {% include 'toastertable.html' %}
+
+  <script>
+    $(document).ready(function () {
+      var tableElt = $("#{{table_name}}");
+      var titleElt = $("[data-role='page-title']");
+
+      tableElt.on("table-done", function (e, total, tableParams) {
+        var title = "All projects";
+
+        if (tableParams.search || tableParams.filter) {
+          if (total === 0) {
+            title = "No projects found";
+          }
+          else if (total > 0) {
+            title = total + " project" + (total > 1 ? 's' : '') + " found";
+          }
+        }
+
+        titleElt.text(title);
+      });
+    });
+  </script>
+
+{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects.html
deleted file mode 100644
index 678a796..0000000
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projects.html
+++ /dev/null
@@ -1,92 +0,0 @@
-{% extends "base.html" %}
-
-{% load static %}
-{% load projecttags %}
-{% load project_url_tag %}
-{% load humanize %}
-
-{% block title %} All projects - Toaster {% endblock %}
-
-{% block pagecontent %}
-
-
-  <div class="page-header top-air">
-      <h1>
-      {% if request.GET.filter and objects.paginator.count > 0 or request.GET.search and objects.paginator.count > 0 %}
-          {{objects.paginator.count}} project{{objects.paginator.count|pluralize}} found
-      {%elif request.GET.filter and objects.paginator.count == 0 or request.GET.search and objects.paginator.count == 0 %}
-          No projects found
-      {%else%}
-          All projects
-      {%endif%}
-       </h1>
-  </div>
-
-  {% if objects.paginator.count == 0 %}
-    <div class="row-fluid">
-      <div class="alert">
-        <form class="no-results input-append" id="searchform">
-            <input id="search" name="search" class="input-xxlarge" type="text" value="
-                {% if request.GET.search %}
-                    {{request.GET.search}}
-                {% endif %}"/>{% if request.GET.search %}<a href="javascript:$('#search').val('');searchform.submit()" class="add-on btn" tabindex="-1"><i class="icon-remove"></i></a>{% endif %}
-            <button class="btn" type="submit" value="Search">Search</button>
-            <button class="btn btn-link" onclick="javascript:$('#search').val('');searchform.submit()">Show all projects</button>
-        </form>
-      </div>
-    </div>
-
-  {% else %} {# We have builds to display #}
-  {% include "basetable_top.html" %}
-  {% for o in objects %}
-    <tr class="data" data-project="{{ o.id }}">
-      <td data-project-field="name">
-          <a href="{% project_url o %}">{{o.name}}</a>
-      </td>
-      <td class="updated"><a href="{% project_url o %}">{{o.updated|date:"d/m/y H:i"}}</a></td>
-      <td data-project-field="release">
-        {% if o.release %}
-            <a href="{% url 'project' o.id %}#project-details">{{o.release.name}}</a>
-        {% elif o.is_default %}
-            <span class="muted">Not applicable</span>
-            <i class="icon-question-sign get-help hover-help" title="" data-original-title="This project does not have a release set. It simply collects information about the builds you start from the command line while Toaster is running" style="visibility: hidden;"></i>
-        {% else %}
-            No release available
-        {% endif %}
-      </td>
-      <td data-project-field="machine">
-        {% if o.is_default %}
-            <span class="muted">Not applicable</span>
-            <i class="icon-question-sign get-help hover-help" title="" data-original-title="This project does not have a machine set. It simply collects information about the builds you start from the command line while Toaster is running" style="visibility: hidden;"></i>
-        {% else %}
-            <a href="{% url 'project' o.id %}#machine-distro">{{o.get_current_machine_name}}</a>
-        {% endif %}
-      </td>
-      {% if o.get_number_of_builds == 0 %}
-      <td class="muted">{{o.get_number_of_builds}}</td>
-      <td class="loutcome"></td>
-      <td class="ltarget"></td>
-      <td class="lerrors"></td>
-      <td class="lwarnings"></td>
-      <td class="limagefiles"></td>
-      {% else %}
-      <td><a href="{% url 'projectbuilds' o.id %}">{{o.get_number_of_builds}}</a></td>
-      <td class="loutcome"><a href="{% url "builddashboard" o.get_last_build_id %}">{%if o.get_last_outcome == build_SUCCEEDED%}<i class="icon-ok-sign success"></i>{%elif o.get_last_outcome == build_FAILED%}<i class="icon-minus-sign error"></i>{%else%}{%endif%}</a></td>
-      <td class="ltarget"><a href="{% url "builddashboard" o.get_last_build_id %}">{{o.get_last_target}} </a></td>
-      <td class="lerrors">{% if o.get_last_errors %}<a class="errors.count error" href="{% url "builddashboard" o.get_last_build_id %}#errors">{{o.get_last_errors}} error{{o.get_last_errors|pluralize}}</a>{%endif%}</td>
-      <td class="lwarnings">{% if o.get_last_warnings %}<a class="warnings.count warning" href="{% url "builddashboard" o.get_last_build_id %}#warnings">{{o.get_last_warnings}} warning{{o.get_last_warnings|pluralize}}</a>{%endif%}</td>
-      <td class="limagefiles">
-        {% if o.get_last_outcome == build_SUCCEEDED %}
-        <a href="{%url "builddashboard" o.get_last_build_id %}#images">{{fstypes|get_dict_value:o.id}}</a>
-        {% endif %}
-      </td>
-
-      {% endif %}
-    </tr>
-  {% endfor %}
-  {% include "basetable_bottom.html" %}
-  {% endif %} {# empty #}
-
-{% endblock %}
-
-
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projecttopbar.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
index ee86b54..007de06 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/projecttopbar.html
@@ -1,6 +1,24 @@
+{% load static %}
+<script src="{% static 'js/projecttopbar.js' %}"></script>
+<script>
+  $(document).ready(function () {
+    var ctx = {
+      numProjectLayers : {{project.get_project_layer_versions.count}},
+      machine : "{{project.get_current_machine_name|default_if_none:""}}",
+    }
+
+    try {
+      projectTopBarInit(ctx);
+    } catch (e) {
+      document.write("Sorry, An error has occurred loading this page");
+      console.warn(e);
+    }
+  });
+</script>
+
 <div class="alert alert-success lead" id="project-created-notification" style="margin-top:15px; display:none">
   <button type="button" class="close" data-dismiss="alert">×</button>
-  Your project <strong>{{project.name}}</strong> has been created. You can now <a href="{% url 'projectmachines' project.id %}">select your target machine</a> and <a href="{% url 'projectsoftwarerecipes' project.id %}">choose image recipes</a> to build.
+  Your project <strong>{{project.name}}</strong> has been created. You can now <a href="{% url 'projectmachines' project.id %}">select your target machine</a> and <a href="{% url 'projectimagerecipes' project.id %}">choose image recipes</a> to build.
 </div>
 
 <!-- project name -->
@@ -26,31 +44,29 @@
 {% if not project.is_default %}
   <div id="project-topbar">
     <ul class="nav nav-pills">
-      <li>
-        <a href="{% url 'projectbuilds' project.id %}">
-          Builds (<span class="total-builds">0</span>)
-        </a>
-      </li>
       <li id="topbar-configuration-tab">
         <a href="{% url 'project' project.id %}">
           Configuration
         </a>
       </li>
       <li>
+        <a href="{% url 'projectbuilds' project.id %}">
+          Builds ({{project.get_number_of_builds}})
+        </a>
+      </li>
+      <li>
         <a href="{% url 'importlayer' project.id %}">
           Import layer
         </a>
       </li>
-      {% if CUSTOM_IMAGE %}
       <li>
         <a href="{% url 'newcustomimage' project.id %}">
           New custom image
         </a>
       </li>
-      {% endif %}
       <li class="pull-right">
         <form class="form-inline" style="margin-bottom:0px;">
-          <i class="icon-question-sign get-help heading-help" data-placement="left" title="" data-original-title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a semicolon and a task name to the recipe name, like so: <code>busybox:clean</code>"></i>
+          <i class="icon-question-sign get-help heading-help" data-placement="left" title="" data-original-title="Type the name of one or more recipes you want to build, separated by a space. You can also specify a task by appending a colon and a task name to the recipe name, like so: <code>busybox:clean</code>"></i>
           <div class="input-append">
             <input id="build-input" type="text" class="input-xlarge input-lg build-target-input" placeholder="Type the recipe you want to build" autocomplete="off" disabled>
             <button id="build-button" class="btn btn-primary btn-large build-button" data-project-id="{{project.id}}" disabled>Build</button>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipe.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipe.html
index c6ae2f3..1d6d64e 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipe.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipe.html
@@ -71,6 +71,16 @@
                     Layer commit
                 </dt>
                 <dd class="iscommit">{{layer_version.commit}}</dd>
+                {% if object.provides_set.all %}
+                <dt>
+                    <i class="icon-question-sign get-help"
+                     title="A list of aliases by which a particular recipe can be known. The additional aliases are
+                           synonyms for the recipe and can be useful satisfying dependencies of other recipes during
+                           the build"></i>
+                    PROVIDES
+                </dt>
+                 <dd><code>{% for provider in object.provides_set.all %}{{ provider.name }}&nbsp;{% endfor %}</code></dd>
+                {% endif %}
             </dl>
 
             <h2 class="details">Tasks</h2>
@@ -162,7 +172,14 @@
 
                     {% for rr in object.r_dependencies_recipe.all|dictsort:"depends_on.name" %}
                     <tr>
-                        <td><a href="{% url "recipe" build.pk rr.depends_on.pk %}">{{rr.depends_on.name}}</a></td>
+                        <td><a href="{% url "recipe" build.pk rr.depends_on.pk %}">{{rr.depends_on.name}}</a>
+                            {% if rr.via %}
+                                <span class="muted">satisfied via {{rr.via.name}}</span>
+                                <i class="icon-question-sign get-help hover-help"
+                                 title="This dependency is satisfied by the PROVIDES value
+                                       {{rr.via.name}} in the {{rr.depends_on.name}} recipe"></i>
+                            {% endif %}
+                        </td>
                         <td><a href="{% url "recipe" build.pk rr.depends_on.pk %}">{{rr.depends_on.version}}</a></td>
                     </tr>
                     {% endfor %}
@@ -194,7 +211,14 @@
 
                     {% for rr in object.r_dependencies_depends.all|dictsort:"recipe.name" %}
                     <tr>
-                        <td><a href="{% url "recipe" build.pk rr.recipe.pk %}">{{rr.recipe.name}}</a></td>
+                        <td><a href="{% url "recipe" build.pk rr.recipe.pk %}">{{rr.recipe.name}}</a>
+                        {% if rr.via %}
+                            <span class="muted"> satisfied via {{rr.via.name}}</span>
+                            <i class="icon-question-sign get-help hover-help"
+                             title="This dependency is satisfied by the PROVIDES value
+                            {{rr.via.name}} in the {{rr.depends_on.name}} recipe"></i>
+                        {% endif %}
+                        </td>
                         <td><a href="{% url "recipe" build.pk rr.recipe.pk %}">{{rr.recipe.version}}</a></td>
                     </tr>
                     {% endfor %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipedetails.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipedetails.html
new file mode 100644
index 0000000..23aa171
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/recipedetails.html
@@ -0,0 +1,177 @@
+{% extends "base.html" %}
+{% load projecttags %}
+{% load humanize %}
+{% load static %}
+{% block pagecontent %}
+
+<div class="section">
+  <ul class="breadcrumb">
+    <li>
+      <a href="{% url 'project' project.id %}">{{project.name}}</a>
+      <span class="divider">&rarr;</span>
+    </li>
+    <li>
+      {% if recipe.is_image %}
+      <a href="{% url 'projectimagerecipes' project.id %}">Image recipes</a>
+      {% else %}
+      <a href="{% url 'projectsoftwarerecipes' project.id %}">Software recipes</a>
+      {% endif %}
+      <span class="divider">&rarr;</span>
+    </li>
+    <li class="active">
+      {{recipe.name}} ({{recipe.layer_version.layer.name}})
+    </li>
+  </ul>
+</div>
+
+<script src="{% static 'js/recipedetails.js' %}"></script>
+<script>
+  $(document).ready(function (){
+    var ctx = {
+      recipe : {
+        id: {{recipe.pk}},
+        name: "{{recipe.name}}",
+        totalPackages: {{packages.count}},
+        layer_version : {
+         id: {{recipe.layer_version.pk}},
+         name: "{{recipe.layer_version.layer.name}}",
+         layerdetailurl: "{% url 'layerdetails' project.pk recipe.layer_version.pk %}"
+        }
+      }
+    };
+
+    try {
+      recipeDetailsPageInit(ctx);
+    } catch (e) {
+      document.write("Sorry, An error has occurred loading this page");
+      console.warn(e);
+    }
+  });
+</script>
+
+{% include 'newcustomimage_modal.html' %}
+
+<div class="row-fluid span11">
+  <div class="alert alert-success lead" id="image-created-notification" style="margin-top: 15px; display: none">
+    <button type="button" data-dismiss="alert" class="close">x</button>
+    Your custom image <strong>{{recipe.name}}</strong> has been created. You can now add or remove packages as needed.
+  </div>
+  <div class="page-header air">
+    <h1>
+      {{recipe.name}}
+      <small>({{recipe.layer_version.layer.name}})</small>
+    </h1>
+  </div>
+</div>
+
+<div class="row-fluid span11">
+  <div class="span8">
+    <div class="button-place btn-group" id="customise-build-btns"
+        style="width: 100%;
+      {% if not in_project %}
+      display:none;
+      {% endif %}">
+      <button class="btn btn-large span6 build-recipe-btn" style="width: 50%">
+        Build {{recipe.name}}
+      </button>
+      {% if recipe.is_image %}
+      <button class="btn btn-large span6 customise-btn" data-recipe="{{recipe.pk}}" style="width: 50%">
+        Customise {{recipe.name}}
+      </button>
+      {% endif %}
+    </div>
+    <div class="button-place">
+      <button class="btn btn-block btn-large" id="add-layer-btn"
+          style="width:100%;
+          {% if in_project %}
+          display:none;
+          {% endif %}">
+        <i class="icon-plus"></i>
+        Add the {{recipe.layer_version.layer.name}} layer to your project to build or customise this image recipe
+      </button>
+    </div>
+
+    <div id="packages-table">
+      {% if  packages.count %}
+       {% url 'recipepackages' project.id recipe.id as xhr_table_url %}
+       <h2>{{title}} (<span class="table-count-{{table_name}}">0</span>) </h2>
+       {% include "toastertable.html" %}
+      {% else %}
+       <h2>{{title}}</h2>
+      {% endif %}
+
+      <div class="alert alert-info air" id="build-to-get-packages-msg"
+      {# if there are packages and it's in the project don't show this msg #}
+      {% if packages.count or not packages.count and not in_project %}
+       style="display:none"
+      {% endif %} >
+        <p class="lead">Toaster has no package information for {{recipe.name}}. To generate package information, build {{recipe.name}}</p>
+        <button class="btn btn-info btn-large build-recipe-btn" style="margin:20px 0 10px 0;">Build {{recipe.name}}</button>
+      </div>
+
+      <div class="alert alert-info air" id="packages-alert"
+      {% if packages.count or  in_project %}
+      style="display:none"
+      {% endif %}
+      >
+        <p class="lead">Toaster has no package information for {{recipe.name}}
+        </p>
+      </div>
+    </div>
+  </div>
+  <div class="span4 well">
+    <h2 style="margin-bottom:20px;">About {{recipe.name}}</h2>
+    <dl>
+      <dt>
+        Approx. packages included
+        <i class="icon-question-sign get-help" title="" data-original-title="The number of packages included is based on information from previous builds and from parsing layers, so we can never be sure it is 100% accurate"></i>
+      </dt>
+      <dd class="no-packages">{{packages.count}}</dd>
+      <dt>
+        Approx. package size
+        <i class="icon-question-sign get-help" title="" data-original-title="Package size is based on information from previous builds, so we can never be sure it is 100% accurate"></i>
+      </dt>
+      <dd>{{approx_pkg_size.size__sum|filtered_filesizeformat}}</dd>
+      {% if last_build %}
+      <dt>Last build</dt>
+      <dd>
+        <i class="icon-ok-sign success"></i>
+        <a href="{% url 'projectbuilds' project.id%}">{{last_build.completed_on|date:"d/m/y H:i"}}</a>
+      </dd>
+      {% endif %}
+      <dt>Recipe file</dt>
+      <dd>
+        <code>{{recipe.file_path|cut_path_prefix:recipe.layer_version.local_path}}</code>
+        <a href="{{recipe.get_vcs_recipe_file_link_url}}"><i class="icon-share" title="" data-original-title="View recipe file"></i></a>
+      </dd> 
+      <dt>Layer</dt>
+      <dd><a href="{% url 'layerdetails' project.id recipe.layer_version.pk %}">{{recipe.layer_version.layer.name}}</a></dd>
+      <dt>
+        Summary
+      </dt>
+      <dd>
+        {{recipe.summary}}
+      </dd>
+      <dt>
+        Description
+      </dt>
+      <dd>
+        {{recipe.description}}
+      </dd>
+      <dt>Version</dt>
+      <dd>
+        {{recipe.version}}
+      </dd>
+      <dt>Section</dt>
+      <dd>
+        {{recipe.section}}
+      </dd>
+      <dt>License</dt>
+      <dd>
+        {{recipe.license}}
+      </dd>
+    </dl>
+  </div>
+</div>
+
+{% endblock %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html
new file mode 100644
index 0000000..a3fcdb0
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html
@@ -0,0 +1,14 @@
+{# Popover that displays the dependences and sizes of a package 'data' used in the Packages table #}
+{% with data.package_dependencies_source.all_depends.count as dep_count %}
+{% load projecttags %}
+{% if dep_count %}
+ <a data-content="<ul class='unstyled'>
+   {% for dep in data.package_dependencies_source.all_depends %}
+  <li>{{dep.depends_on.name}} {% if dep.depends_on.size > 0 %}({{dep.depends_on.size|filtered_filesizeformat}}){% endif %}</li>
+    {% endfor %}
+  </ul>" title="" class="btn" data-original-title="
+  <strong>{{data.name}}</strong> dependencies - <strong>{{data.package_dependencies_source.get_total_source_deps_size.depends_on__size__sum|filtered_filesizeformat}}</strong>">
+    {{dep_count}}
+</a>
+{% endif %}
+{% endwith %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
new file mode 100644
index 0000000..453a9d0
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html
@@ -0,0 +1,14 @@
+{# Popover that displays the reverse dependencies and sizes of a package 'data' used in the Packages table #}
+{% with data.package_dependencies_target.all_depends.count as dep_count %}
+{% load projecttags %}
+{% if dep_count %}
+ <a data-content="<ul class='unstyled'>
+   {% for dep in data.package_dependencies_target.all_depends|dictsort:'package.name' %}
+  <li>{{dep.package.name}} {% if dep.package.size > 0 %}({{dep.package.size|filtered_filesizeformat}}){% endif %}</li>
+    {% endfor %}
+  </ul>" title="" class="btn" data-original-title="
+  <strong>{{data.name}}</strong> reverse dependencies - <strong>{{data.package_dependencies_target.get_total_revdeps_size.package_id__size__sum|filtered_filesizeformat}}</strong>">
+    {{dep_count}}
+</a>
+{% endif %}
+{% endwith %}
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/task.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/task.html
index ef628d9..5768262 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/task.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/task.html
@@ -238,7 +238,7 @@
 </dl>
 
 {# Performance section - shown only for executed tasks #}
-{%if task.elapsed_time or task.cpu_usage or task.disk_io %}
+{%if task.elapsed_time or task.cpu_time_user or task.cpu_time_system or task.disk_io %}
     <h2 class="details">Performance</h2>
 {% endif %}
     <dl class="dl-horizontal">
@@ -249,19 +249,26 @@
         </dt>
         <dd>{{task.elapsed_time|format_none_and_zero|floatformat:2}}</dd>
         {% endif %}
-        {% if task.cpu_usage > 0 %}
+        {% if task.cpu_time_user > 0 %}
         <dt>
-            <i class="icon-question-sign get-help" title="The percentage of task CPU utilization"></i>
-            CPU usage
+            <i class="icon-question-sign get-help" title="Total amount of time spent executing in user mode, in seconds. Note that this time can be greater than the task time due to parallel execution."></i>
+            User CPU time (secs)
         </dt>
-        <dd>{{task.cpu_usage|format_none_and_zero|floatformat:2}}%</dd>
+        <dd>{{task.cpu_time_user|format_none_and_zero|floatformat:2}}</dd>
+        {% endif %}
+        {% if task.cpu_time_system > 0 %}
+        <dt>
+            <i class="icon-question-sign get-help" title="Total amount of time spent executing in kernel mode, in seconds. Note that this time can be greater than the task time due to parallel execution."></i>
+            System CPU time (secs)
+        </dt>
+        <dd>{{task.cpu_time_system|format_none_and_zero|floatformat:2}}</dd>
         {% endif %}
         {% if task.disk_io > 0 %}
         <dt>
-            <i class="icon-question-sign get-help" title="Number of miliseconds the task spent doing disk input and output"></i>
-            Disk I/O (ms)
+            <i class="icon-question-sign get-help" title="Number of bytes written to and read from the disk during the task"></i>
+            Disk I/O (bytes)
         </dt>
-        <dd>{{task.disk_io|format_none_and_zero}}</dd>
+        <dd>{{task.disk_io|format_none_and_zero|intcomma}}</dd>
         {% endif %}
     </dl>
 
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/tasks.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/tasks.html
index 353410f..84bc103 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/tasks.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/tasks.html
@@ -1,4 +1,5 @@
 {% extends "basebuildpage.html" %}
+{% load humanize %}
 {% load projecttags %}
 
 {% block title %} {{mainheading}} - {{build.target_set.all|dictsort:"target"|join:", "}} {{build.machine}} - {{build.project.name}} - Toaster{% endblock %}
@@ -20,13 +21,15 @@
     <li><a href="{% url 'buildtime' build.pk %}">Time</a></li>
   {% endif %}
 {% endblock %}
-{% block nav-cpuusage %}
-  {% if 'CPU usage' == mainheading %}
-    <li class="active"><a href="{% url 'cpuusage' build.pk %}">CPU usage</a></li>
+
+{% block nav-cputime %}
+  {% if 'CPU time' == mainheading %}
+    <li class="active"><a href="{% url 'cputime' build.pk %}">CPU time</a></li>
   {% else %}
-    <li><a href="{% url 'cpuusage' build.pk %}">CPU usage</a></li>
+    <li><a href="{% url 'cputime' build.pk %}">CPU time</a></li>
   {% endif %}
 {% endblock %}
+
 {% block nav-diskio %}
   {% if 'Disk I/O' == mainheading %}
     <li class="active"><a href="{% url 'diskio' build.pk %}">Disk I/O</a></li>
@@ -107,11 +110,14 @@
             <td class="time_taken">
                 {{task.elapsed_time|format_none_and_zero|floatformat:2}}
             </td>
-            <td class="cpu_used">
-                {{task.cpu_usage|format_none_and_zero|floatformat:2}}{% if task.cpu_usage %}%{% endif %}
+            <td class="cpu_time_system">
+                {{task.cpu_time_system|format_none_and_zero|floatformat:2}}
+            </td>
+            <td class="cpu_time_user">
+                {{task.cpu_time_user|format_none_and_zero|floatformat:2}}
             </td>
             <td class="disk_io">
-                {{task.disk_io|format_none_and_zero}}
+                {{task.disk_io|format_none_and_zero|intcomma}}
             </td>
 
         </tr>
@@ -125,7 +131,7 @@
 <script type="text/javascript">
 
     $(document).ready(function() {
-        // enable blue hightlight animation for the order link
+        // highlight heading on the column for the field used for ordering
         if (location.href.search('#') > -1) {
             var task_order = location.href.split('#')[1];
             $("#" + task_order).addClass("highlight");
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable-filter.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable-filter.html
index 7c8dc49..4d28793 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable-filter.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable-filter.html
@@ -10,7 +10,9 @@
       <span id="filter-actions-{{table_name}}"></span>
     </div>
     <div class="modal-footer">
-      <button class="btn btn-primary" type="submit">Apply</button>
+      <button class="btn btn-primary" type="submit" data-role="filter-apply">
+        Apply
+      </button>
     </div>
   </form>
 </div>
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable.html
index 98a715f..21c3d36 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/toastertable.html
@@ -32,8 +32,11 @@
       <a href="#" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
         <i class="icon-remove"></i>
       </a>
-      <button class="btn search-submit-{{table_name}}" >Search</button>
-      <button class="btn btn-link remove-search-btn-{{table_name}}">Show {{title|lower}}
+      <button class="btn search-submit-{{table_name}}">
+        Search
+      </button>
+      <button class="btn btn-link show-all-{{table_name}} remove-search-btn-{{table_name}}">
+        Show all
       </button>
     </form>
   </div>
@@ -43,9 +46,9 @@
   <!-- control header -->
   <div class="navbar" id="table-chrome-{{table_name}}">
     <div class="navbar-inner">
-      <div class="navbar-search input-append pull-left">
+      <div class="navbar-search input-append pull-left span6">
 
-        <input class="input-xxlarge" id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>
+        <input id="search-input-{{table_name}}" name="search" type="text" placeholder="Search {{title|lower}}" value="{%if request.GET.search%}{{request.GET.search}}{%endif%}"/>
         <a href="#" style="display:none" class="add-on btn remove-search-btn-{{table_name}}" tabindex="-1">
           <i class="icon-remove"></i>
         </a>
@@ -54,7 +57,7 @@
 
       <div class="pull-right">
         <div class="btn-group">
-          <button class="btn dropdown-toggle" data-toggle="dropdown">Edit columns
+          <button id="edit-columns-button" class="btn dropdown-toggle" data-toggle="dropdown">Edit columns
             <span class="caret"></span>
           </button>
           <ul class="dropdown-menu editcol">
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templates/unavailable_artifact.html b/yocto-poky/bitbake/lib/toaster/toastergui/templates/unavailable_artifact.html
index 0301a6c..2d3d02c 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/templates/unavailable_artifact.html
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templates/unavailable_artifact.html
@@ -3,15 +3,14 @@
 {% load humanize %}
 {% load static %}
 
-{% block title %} Build artifact no longer exists - Toaster {% endblock %}
+{% block title %} Build artifact does not exist - Toaster {% endblock %}
 
 {% block pagecontent %}
-
-<div class="row-fluid air">
-    <div class="alert alert-info span8 lead">
-        <p"> The build artifact you are trying to download no longer exists.</p>
-        <p><a href="javascript:window.history.back()">Back to previous page</a></p>
+    <div class="row-fluid air">
+        <div class="alert alert-info span8 lead">
+            <p>The build artifact you are trying to download does not exist.</p>
+            <p><a href="javascript:window.history.back()">Back to previous page</a></p>
+        </div>
     </div>
-</div>
 {% endblock %}
 
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py b/yocto-poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py
new file mode 100644
index 0000000..0dcc7d2
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/templatetags/objects_to_dictionaries_filter.py
@@ -0,0 +1,35 @@
+from django import template
+import json
+
+register = template.Library()
+
+def objects_to_dictionaries(iterable, fields):
+    """
+    Convert an iterable into a list of dictionaries; fields should be set
+    to a comma-separated string of properties for each item included in the
+    resulting list; e.g. for a queryset:
+
+        {{ queryset | objects_to_dictionaries:"id,name" }}
+
+    will return a list like
+
+        [{'id': 1, 'name': 'foo'}, ...]
+
+    providing queryset has id and name fields
+
+    This is mostly to support serialising querysets or lists of model objects
+    to JSON
+    """
+    objects = []
+
+    if fields:
+        fields_list = [field.strip() for field in fields.split(',')]
+        for item in iterable:
+            out = {}
+            for field in fields_list:
+                out[field] = getattr(item, field)
+            objects.append(out)
+
+    return objects
+
+register.filter('objects_to_dictionaries', objects_to_dictionaries)
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/tests.py b/yocto-poky/bitbake/lib/toaster/toastergui/tests.py
index 9e6c46a..a4cab58 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/tests.py
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/tests.py
@@ -30,90 +30,45 @@
 from orm.models import ReleaseLayerSourcePriority, LayerSource, Layer, Build
 from orm.models import Layer_Version, Recipe, Machine, ProjectLayer, Target
 from orm.models import CustomImageRecipe, ProjectVariable
-from orm.models import Branch
+from orm.models import Branch, CustomImagePackage
 
 import toastermain
+import inspect
+import toastergui
 
 from toastergui.tables import SoftwareRecipesTable
 import json
+from datetime import timedelta
 from bs4 import BeautifulSoup
 import re
+import string
+import json
 
 PROJECT_NAME = "test project"
+PROJECT_NAME2 = "test project 2"
 CLI_BUILDS_PROJECT_NAME = 'Command line builds'
 
-# by default, tests are run in build mode; to run in analysis mode,
-# set this to False in individual test cases
-toastermain.settings.BUILD_MODE = True
-
 class ViewTests(TestCase):
     """Tests to verify view APIs."""
 
+    fixtures = ['toastergui-unittest-data']
+
     def setUp(self):
-        bbv = BitbakeVersion.objects.create(name="test bbv", giturl="/tmp/",
-                                            branch="master", dirpath="")
-        release = Release.objects.create(name="test release",
-                                         branch_name="master",
-                                         bitbake_version=bbv)
-        self.project = Project.objects.create_project(name=PROJECT_NAME,
-                                                      release=release)
-        now = timezone.now()
 
-        build = Build.objects.create(project=self.project,
-                                     started_on=now,
-                                     completed_on=now)
-
-        layersrc = LayerSource.objects.create(sourcetype=LayerSource.TYPE_IMPORTED)
-        self.priority = ReleaseLayerSourcePriority.objects.create(release=release,
-                                                                  layer_source=layersrc)
-        layer = Layer.objects.create(name="base-layer", layer_source=layersrc,
-                                     vcs_url="/tmp/")
-
-        branch = Branch.objects.create(name="master", layer_source=layersrc)
-
-        lver = Layer_Version.objects.create(layer=layer, project=self.project,
-                                            layer_source=layersrc, commit="master",
-                                            up_branch=branch)
-
-        self.recipe1 = Recipe.objects.create(layer_source=layersrc,
-                                             name="base-recipe",
-                                             version="1.2",
-                                             summary="one recipe",
-                                             description="recipe",
-                                             layer_version=lver)
-
-        Machine.objects.create(layer_version=lver, name="wisk",
-                               description="wisking machine")
-
-        ProjectLayer.objects.create(project=self.project, layercommit=lver)
-
-
-        self.customr = CustomImageRecipe.objects.create(\
-                           name="custom recipe", project=self.project,
-                           base_recipe=self.recipe1)
-
-        self.package = Package.objects.create(name='pkg1', recipe=self.recipe1,
-                                              build=build)
-
-
-        # recipe with project for testing AvailableRecipe table
-        self.recipe2 = Recipe.objects.create(layer_source=layersrc,
-                                             name="fancy-recipe",
-                                             version="1.4",
-                                             summary="a fancy recipe",
-                                             description="fancy recipe",
-                                             layer_version=lver,
-                                             file_path='/home/foo')
-
-        self.assertTrue(lver in self.project.compatible_layerversions())
+        self.project = Project.objects.first()
+        self.recipe1 = Recipe.objects.get(pk=2)
+        self.recipe2 = Recipe.objects.last()
+        self.customr = CustomImageRecipe.objects.first()
+        self.cust_package = CustomImagePackage.objects.first()
+        self.package = Package.objects.first()
+        self.lver = Layer_Version.objects.first()
 
     def test_get_base_call_returns_html(self):
         """Basic test for all-projects view"""
         response = self.client.get(reverse('all-projects'), follow=True)
         self.assertEqual(response.status_code, 200)
         self.assertTrue(response['Content-Type'].startswith('text/html'))
-        self.assertTemplateUsed(response, "projects.html")
-        self.assertTrue(PROJECT_NAME in response.content)
+        self.assertTemplateUsed(response, "projects-toastertable.html")
 
     def test_get_json_call_returns_json(self):
         """Test for all projects output in json format"""
@@ -128,16 +83,9 @@
         self.assertEqual(data["error"], "ok")
         self.assertTrue("rows" in data)
 
-        self.assertTrue(PROJECT_NAME in [x["name"] for x in data["rows"]])
+        self.assertTrue(self.project.name in [x["name"] for x in data["rows"]])
         self.assertTrue("id" in data["rows"][0])
 
-        self.assertEqual(sorted(data["rows"][0]),
-                         ['bitbake_version_id', 'created', 'id',
-                          'is_default', 'layersTypeAheadUrl', 'name',
-                          'num_builds', 'projectBuildsUrl', 'projectPageUrl',
-                          'recipesTypeAheadUrl', 'release_id',
-                          'short_description', 'updated', 'user_id'])
-
     def test_typeaheads(self):
         """Test typeahead ReST API"""
         layers_url = reverse('xhr_layerstypeahead', args=(self.project.id,))
@@ -181,7 +129,6 @@
 
             return False
 
-        import string
 
         for url in urls:
             results = False
@@ -198,15 +145,17 @@
 
     def test_xhr_import_layer(self):
         """Test xhr_importlayer API"""
+        LayerSource.objects.create(sourcetype=LayerSource.TYPE_IMPORTED)
         #Test for importing an already existing layer
         args = {'vcs_url' : "git://git.example.com/test",
                 'name' : "base-layer",
                 'git_ref': "c12b9596afd236116b25ce26dbe0d793de9dc7ce",
-                'project_id': 1, 'dir_path' : "/path/in/repository"}
+                'project_id': self.project.id,
+                'dir_path' : "/path/in/repository"}
         response = self.client.post(reverse('xhr_importlayer'), args)
         data = json.loads(response.content)
         self.assertEqual(response.status_code, 200)
-        self.assertNotEqual(data["error"], "ok")
+        self.assertEqual(data["error"], "ok")
 
         #Test to verify import of a layer successful
         args['name'] = "meta-oe"
@@ -272,13 +221,12 @@
 
     def test_xhr_custom_details(self):
         """Test getting custom recipe details"""
-        name = "custom recipe"
         url = reverse('xhr_customrecipe_id', args=(self.customr.id,))
         response = self.client.get(url)
         self.assertEqual(response.status_code, 200)
         expected = {"error": "ok",
                     "info": {'id': self.customr.id,
-                             'name': name,
+                             'name': self.customr.name,
                              'base_recipe_id': self.recipe1.id,
                              'project_id': self.project.id,
                             }
@@ -290,7 +238,9 @@
         name = "to be deleted"
         recipe = CustomImageRecipe.objects.create(\
                      name=name, project=self.project,
-                     base_recipe=self.recipe1)
+                     base_recipe=self.recipe1,
+                     file_path="/tmp/testing",
+                     layer_version=self.customr.layer_version)
         url = reverse('xhr_customrecipe_id', args=(recipe.id,))
         response = self.client.delete(url)
         self.assertEqual(response.status_code, 200)
@@ -303,20 +253,34 @@
 
     def test_xhr_custom_packages(self):
         """Test adding and deleting package to a custom recipe"""
-        url = reverse('xhr_customrecipe_packages',
-                      args=(self.customr.id, self.package.id))
-        # add self.package1 to recipe
-        response = self.client.put(url)
+        # add self.package to recipe
+        response = self.client.put(reverse('xhr_customrecipe_packages',
+                                           args=(self.customr.id,
+                                                 self.cust_package.id)))
+
         self.assertEqual(response.status_code, 200)
-        self.assertEqual(json.loads(response.content), {"error": "ok"})
-        self.assertEqual(self.customr.packages.all()[0].id, self.package.id)
+        self.assertEqual(json.loads(response.content),
+                         {"error": "ok"})
+        self.assertEqual(self.customr.appends_set.first().name,
+                         self.cust_package.name)
         # delete it
-        response = self.client.delete(url)
+        to_delete = self.customr.appends_set.first().pk
+        del_url = reverse('xhr_customrecipe_packages',
+                          args=(self.customr.id, to_delete))
+
+        response = self.client.delete(del_url)
         self.assertEqual(response.status_code, 200)
         self.assertEqual(json.loads(response.content), {"error": "ok"})
-        self.assertFalse(self.customr.packages.all())
-        # delete it again to test error condition
-        response = self.client.delete(url)
+        all_packages = self.customr.get_all_packages().values_list('pk',
+                                                                   flat=True)
+
+        self.assertFalse(to_delete in all_packages)
+        # delete invalid package to test error condition
+        del_url = reverse('xhr_customrecipe_packages',
+                          args=(self.customr.id,
+                                99999))
+
+        response = self.client.delete(del_url)
         self.assertEqual(response.status_code, 200)
         self.assertNotEqual(json.loads(response.content)["error"], "ok")
 
@@ -332,6 +296,18 @@
                 self.assertNotEqual(json.loads(response.content),
                                     {"error": "ok"})
 
+    def test_download_custom_recipe(self):
+        """Download the recipe file generated for the custom image"""
+
+        # Create a dummy recipe file for the custom image generation to read
+        open("/tmp/a_recipe.bb", 'wa').close()
+        response = self.client.get(reverse('customrecipedownload',
+                                           args=(self.project.id,
+                                                 self.customr.id)))
+
+        self.assertEqual(response.status_code, 200)
+
+
     def test_software_recipes_table(self):
         """Test structure returned for Software RecipesTable"""
         table = SoftwareRecipesTable()
@@ -344,7 +320,6 @@
         row2 = next(x for x in rows if x['name'] == self.recipe2.name)
 
         self.assertEqual(response.status_code, 200, 'should be 200 OK status')
-        self.assertEqual(len(rows), 2, 'should be 2 recipes')
 
         # check other columns have been populated correctly
         self.assertEqual(row1['name'], self.recipe1.name)
@@ -360,568 +335,160 @@
         self.assertEqual(row2['layer_version__layer__name'],
                          self.recipe2.layer_version.layer.name)
 
-class LandingPageTests(TestCase):
-    """ Tests for redirects on the landing page """
-    # disable bogus pylint message error:
-    # "Instance of 'WSGIRequest' has no 'url' member (no-member)"
-    # (see https://github.com/landscapeio/pylint-django/issues/42)
-    # pylint: disable=E1103
+    def test_toaster_tables(self):
+        """Test all ToasterTables instances"""
+        current_recipes = self.project.get_available_recipes()
 
-    LANDING_PAGE_TITLE = 'This is Toaster'
+        def get_data(table, options={}):
+            """Send a request and parse the json response"""
+            options['format'] = "json"
+            options['nocache'] = "true"
+            request = RequestFactory().get('/', options)
 
-    def setUp(self):
-        """ Add default project manually """
-        self.project = Project.objects.create_project('foo', None)
-        self.project.is_default = True
-        self.project.save()
+            # This is the image recipe needed for a package list for
+            # PackagesTable do this here to throw a non exist exception
+            image_recipe = Recipe.objects.get(pk=4)
 
-    def test_only_default_project(self):
-        """
-        No projects except default
-        => get the landing page
-        """
-        response = self.client.get(reverse('landing'))
-        self.assertTrue(self.LANDING_PAGE_TITLE in response.content)
+            # Add any kwargs that are needed by any of the possible tables
+            args = {'pid': self.project.id,
+                    'layerid': self.lver.pk,
+                    'recipeid': self.recipe1.pk,
+                    'recipe_id': image_recipe.pk,
+                    'custrecipeid': self.customr.pk
+                   }
 
-    def test_default_project_has_build(self):
-        """
-        Default project has a build, no other projects
-        => get the builds page
-        """
-        now = timezone.now()
-        build = Build.objects.create(project=self.project,
-                                     started_on=now,
-                                     completed_on=now)
-        build.save()
+            response = table.get(request, **args)
+            return json.loads(response.content)
 
-        response = self.client.get(reverse('landing'))
-        self.assertEqual(response.status_code, 302,
-                         'response should be a redirect')
-        self.assertTrue('/builds' in response.url,
-                        'should redirect to builds')
+        # Get a list of classes in tables module
+        tables = inspect.getmembers(toastergui.tables, inspect.isclass)
 
-    def test_user_project_exists(self):
-        """
-        User has added a project (without builds)
-        => get the projects page
-        """
-        user_project = Project.objects.create_project('foo', None)
-        user_project.save()
+        for name, table_cls in tables:
+            # Filter out the non ToasterTables from the tables module
+            if not issubclass(table_cls, toastergui.widgets.ToasterTable) or \
+                table_cls == toastergui.widgets.ToasterTable:
+                continue
 
-        response = self.client.get(reverse('landing'))
-        self.assertEqual(response.status_code, 302,
-                         'response should be a redirect')
-        self.assertTrue('/projects' in response.url,
-                        'should redirect to projects')
+            # Get the table data without any options, this also does the
+            # initialisation of the table i.e. setup_columns,
+            # setup_filters and setup_queryset that we can use later
+            table = table_cls()
+            all_data = get_data(table)
 
-    def test_user_project_has_build(self):
-        """
-        User has added a project (with builds)
-        => get the builds page
-        """
-        user_project = Project.objects.create_project('foo', None)
-        user_project.save()
+            self.assertTrue(len(all_data['rows']) > 1,
+                            "Cannot test on a %s table with < 1 row" % name)
 
-        now = timezone.now()
-        build = Build.objects.create(project=user_project,
-                                     started_on=now,
-                                     completed_on=now)
-        build.save()
+            if table.default_orderby:
+                row_one = all_data['rows'][0][table.default_orderby.strip("-")]
+                row_two = all_data['rows'][1][table.default_orderby.strip("-")]
 
-        response = self.client.get(reverse('landing'))
-        self.assertEqual(response.status_code, 302,
-                         'response should be a redirect')
-        self.assertTrue('/builds' in response.url,
-                        'should redirect to builds')
+                if '-' in table.default_orderby:
+                    self.assertTrue(row_one >= row_two,
+                                    "Default ordering not working on %s"
+                                    " '%s' should be >= '%s'" %
+                                    (name, row_one, row_two))
+                else:
+                    self.assertTrue(row_one <= row_two,
+                                    "Default ordering not working on %s"
+                                    " '%s' should be <= '%s'" %
+                                    (name, row_one, row_two))
 
-class AllProjectsPageTests(TestCase):
-    """ Tests for projects page /projects/ """
+            # Test the column ordering and filtering functionality
+            for column in table.columns:
+                if column['orderable']:
+                    # If a column is orderable test it in both order
+                    # directions ordering on the columns field_name
+                    ascending = get_data(table_cls(),
+                                         {"orderby" : column['field_name']})
 
-    MACHINE_NAME = 'delorean'
+                    row_one = ascending['rows'][0][column['field_name']]
+                    row_two = ascending['rows'][1][column['field_name']]
 
-    def setUp(self):
-        """ Add default project manually """
-        project = Project.objects.create_project(CLI_BUILDS_PROJECT_NAME, None)
-        self.default_project = project
-        self.default_project.is_default = True
-        self.default_project.save()
+                    self.assertTrue(row_one <= row_two,
+                                    "Ascending sort applied but row 0 is less "
+                                    "than row 1 %s %s " %
+                                    (column['field_name'], name))
 
-        # this project is only set for some of the tests
-        self.project = None
 
-        self.release = None
+                    descending = get_data(table_cls(),
+                                          {"orderby" :
+                                           '-'+column['field_name']})
 
-    def _add_build_to_default_project(self):
-        """ Add a build to the default project (not used in all tests) """
-        now = timezone.now()
-        build = Build.objects.create(project=self.default_project,
-                                     started_on=now,
-                                     completed_on=now)
-        build.save()
+                    row_one = descending['rows'][0][column['field_name']]
+                    row_two = descending['rows'][1][column['field_name']]
 
-    def _add_non_default_project(self):
-        """ Add another project """
-        bbv = BitbakeVersion.objects.create(name="test bbv", giturl="/tmp/",
-                                            branch="master", dirpath="")
-        self.release = Release.objects.create(name="test release",
-                                              branch_name="master",
-                                              bitbake_version=bbv)
-        self.project = Project.objects.create_project(PROJECT_NAME, self.release)
-        self.project.is_default = False
-        self.project.save()
+                    self.assertTrue(row_one >= row_two,
+                                    "Descending sort applied but row 0 is "
+                                    "greater than row 1 %s %s" %
+                                    (column['field_name'], name))
 
-        # fake the MACHINE variable
-        project_var = ProjectVariable.objects.create(project=self.project,
-                                                     name='MACHINE',
-                                                     value=self.MACHINE_NAME)
-        project_var.save()
+                    # If the two start rows are the same we haven't actually
+                    # changed the order
+                    self.assertNotEqual(ascending['rows'][0],
+                                        descending['rows'][0],
+                                        "An orderby %s has not changed the "
+                                        "order of the data in table %s" %
+                                        (column['field_name'], name))
 
-    def test_default_project_hidden(self):
-        """ The default project should be hidden if it has no builds """
-        params = {"count": 10, "orderby": "updated:-", "page": 1}
-        response = self.client.get(reverse('all-projects'), params)
+                if column['filter_name']:
+                    # If a filter is available for the column get the filter
+                    # info. This contains what filter actions are defined.
+                    filter_info = get_data(table_cls(),
+                                           {"cmd": "filterinfo",
+                                            "name": column['filter_name']})
+                    self.assertTrue(len(filter_info['filter_actions']) > 0,
+                                    "Filter %s was defined but no actions "
+                                    "added to it" % column['filter_name'])
 
-        self.assertTrue(not('tr class="data"' in response.content),
-                        'should be no project rows in the page')
-        self.assertTrue(not(CLI_BUILDS_PROJECT_NAME in response.content),
-                        'default project "cli builds" should not be in page')
+                    for filter_action in filter_info['filter_actions']:
+                        # filter string to pass as the option
+                        # This is the name of the filter:action
+                        # e.g. project_filter:not_in_project
+                        filter_string = "%s:%s" % (column['filter_name'],
+                                                   filter_action['action_name'])
+                        # Now get the data with the filter applied
+                        filtered_data = get_data(table_cls(),
+                                                 {"filter" : filter_string})
 
-    def test_default_project_has_build(self):
-        """ The default project should be shown if it has builds """
-        self._add_build_to_default_project()
+                        # date range filter actions can't specify the
+                        # number of results they return, so their count is 0
+                        if filter_action['count'] != None:
+                            self.assertEqual(len(filtered_data['rows']),
+                                             int(filter_action['count']),
+                                             "We added a table filter for %s but "
+                                             "the number of rows returned was not "
+                                             "what the filter info said there "
+                                             "would be" % name)
 
-        params = {"count": 10, "orderby": "updated:-", "page": 1}
-        response = self.client.get(reverse('all-projects'), params)
 
-        self.assertTrue('tr class="data"' in response.content,
-                        'should be a project row in the page')
-        self.assertTrue(CLI_BUILDS_PROJECT_NAME in response.content,
-                        'default project "cli builds" should be in page')
+            # Test search functionality on the table
+            something_found = False
+            for search in list(string.ascii_letters):
+                search_data = get_data(table_cls(), {'search' : search})
 
-    def test_default_project_release(self):
-        """
-        The release for the default project should display as
-        'Not applicable'
-        """
-        # need a build, otherwise project doesn't display at all
-        self._add_build_to_default_project()
+                if len(search_data['rows']) > 0:
+                    something_found = True
+                    break
 
-        # another project to test, which should show release
-        self._add_non_default_project()
+            self.assertTrue(something_found,
+                            "We went through the whole alphabet and nothing"
+                            " was found for the search of table %s" % name)
 
-        response = self.client.get(reverse('all-projects'), follow=True)
-        soup = BeautifulSoup(response.content)
+            # Test the limit functionality on the table
+            limited_data = get_data(table_cls(), {'limit' : "1"})
+            self.assertEqual(len(limited_data['rows']),
+                             1,
+                             "Limit 1 set on table %s but not 1 row returned"
+                             % name)
 
-        # check the release cell for the default project
-        attrs = {'data-project': str(self.default_project.id)}
-        rows = soup.find_all('tr', attrs=attrs)
-        self.assertEqual(len(rows), 1, 'should be one row for default project')
-        cells = rows[0].find_all('td', attrs={'data-project-field': 'release'})
-        self.assertEqual(len(cells), 1, 'should be one release cell')
-        text = cells[0].select('span.muted')[0].text
-        self.assertEqual(text, 'Not applicable',
-                         'release should be not applicable for default project')
+            # Test the pagination functionality on the table
+            page_one_data = get_data(table_cls(), {'limit' : "1",
+                                                   "page": "1"})['rows'][0]
 
-        # check the link in the release cell for the other project
-        attrs = {'data-project': str(self.project.id)}
-        rows = soup.find_all('tr', attrs=attrs)
-        cells = rows[0].find_all('td', attrs={'data-project-field': 'release'})
-        text = cells[0].select('a')[0].text
-        self.assertEqual(text, self.release.name,
-                         'release name should be shown for non-default project')
+            page_two_data = get_data(table_cls(), {'limit' : "1",
+                                                   "page": "2"})['rows'][0]
 
-    def test_default_project_machine(self):
-        """
-        The machine for the default project should display as
-        'Not applicable'
-        """
-        # need a build, otherwise project doesn't display at all
-        self._add_build_to_default_project()
-
-        # another project to test, which should show machine
-        self._add_non_default_project()
-
-        response = self.client.get(reverse('all-projects'), follow=True)
-        soup = BeautifulSoup(response.content)
-
-        # check the machine cell for the default project
-        attrs = {'data-project': str(self.default_project.id)}
-        rows = soup.find_all('tr', attrs=attrs)
-        self.assertEqual(len(rows), 1, 'should be one row for default project')
-        cells = rows[0].find_all('td', attrs={'data-project-field': 'machine'})
-        self.assertEqual(len(cells), 1, 'should be one machine cell')
-        text = cells[0].select('span.muted')[0].text
-        self.assertEqual(text, 'Not applicable',
-                         'machine should be not applicable for default project')
-
-        # check the link in the machine cell for the other project
-        attrs = {'data-project': str(self.project.id)}
-        rows = soup.find_all('tr', attrs=attrs)
-        cells = rows[0].find_all('td', attrs={'data-project-field': 'machine'})
-        text = cells[0].select('a')[0].text
-        self.assertEqual(text, self.MACHINE_NAME,
-                         'machine name should be shown for non-default project')
-
-    def test_project_page_links(self):
-        """
-        Test that links for the default project point to the builds
-        page /projects/X/builds for that project, and that links for
-        other projects point to their configuration pages /projects/X/
-        """
-
-        # need a build, otherwise project doesn't display at all
-        self._add_build_to_default_project()
-
-        # another project to test, which should show machine
-        self._add_non_default_project()
-
-        response = self.client.get(reverse('all-projects'), follow=True)
-        soup = BeautifulSoup(response.content)
-
-        # link for default project
-        row = soup.find('tr', attrs={'data-project': self.default_project.id})
-        cell = row.find('td', attrs={'data-project-field': 'name'})
-        expected_url = reverse('projectbuilds', args=(self.default_project.id,))
-        self.assertEqual(cell.find('a')['href'], expected_url,
-                         'link on default project name should point to builds')
-
-        # link for other project
-        row = soup.find('tr', attrs={'data-project': self.project.id})
-        cell = row.find('td', attrs={'data-project-field': 'name'})
-        expected_url = reverse('project', args=(self.project.id,))
-        self.assertEqual(cell.find('a')['href'], expected_url,
-                         'link on project name should point to configuration')
-
-class ProjectBuildsPageTests(TestCase):
-    """ Test data at /project/X/builds is displayed correctly """
-
-    def setUp(self):
-        bbv = BitbakeVersion.objects.create(name="bbv1", giturl="/tmp/",
-                                            branch="master", dirpath="")
-        release = Release.objects.create(name="release1",
-                                         bitbake_version=bbv)
-        self.project1 = Project.objects.create_project(name=PROJECT_NAME,
-                                                       release=release)
-        self.project1.save()
-
-        self.project2 = Project.objects.create_project(name=PROJECT_NAME,
-                                                       release=release)
-        self.project2.save()
-
-        self.default_project = Project.objects.create_project(
-            name=CLI_BUILDS_PROJECT_NAME,
-            release=release
-        )
-        self.default_project.is_default = True
-        self.default_project.save()
-
-        # parameters for builds to associate with the projects
-        now = timezone.now()
-
-        self.project1_build_success = {
-            "project": self.project1,
-            "started_on": now,
-            "completed_on": now,
-            "outcome": Build.SUCCEEDED
-        }
-
-        self.project1_build_in_progress = {
-            "project": self.project1,
-            "started_on": now,
-            "completed_on": now,
-            "outcome": Build.IN_PROGRESS
-        }
-
-        self.project2_build_success = {
-            "project": self.project2,
-            "started_on": now,
-            "completed_on": now,
-            "outcome": Build.SUCCEEDED
-        }
-
-        self.project2_build_in_progress = {
-            "project": self.project2,
-            "started_on": now,
-            "completed_on": now,
-            "outcome": Build.IN_PROGRESS
-        }
-
-    def _get_rows_for_project(self, project_id):
-        """ Helper to retrieve HTML rows for a project """
-        url = reverse("projectbuilds", args=(project_id,))
-        response = self.client.get(url, follow=True)
-        soup = BeautifulSoup(response.content)
-        return soup.select('tr[class="data"]')
-
-    def test_show_builds_for_project(self):
-        """ Builds for a project should be displayed """
-        Build.objects.create(**self.project1_build_success)
-        Build.objects.create(**self.project1_build_success)
-        build_rows = self._get_rows_for_project(self.project1.id)
-        self.assertEqual(len(build_rows), 2)
-
-    def test_show_builds_project_only(self):
-        """ Builds for other projects should be excluded """
-        Build.objects.create(**self.project1_build_success)
-        Build.objects.create(**self.project1_build_success)
-        Build.objects.create(**self.project1_build_success)
-
-        # shouldn't see these two
-        Build.objects.create(**self.project2_build_success)
-        Build.objects.create(**self.project2_build_in_progress)
-
-        build_rows = self._get_rows_for_project(self.project1.id)
-        self.assertEqual(len(build_rows), 3)
-
-    def test_builds_exclude_in_progress(self):
-        """ "in progress" builds should not be shown """
-        Build.objects.create(**self.project1_build_success)
-        Build.objects.create(**self.project1_build_success)
-
-        # shouldn't see this one
-        Build.objects.create(**self.project1_build_in_progress)
-
-        # shouldn't see these two either, as they belong to a different project
-        Build.objects.create(**self.project2_build_success)
-        Build.objects.create(**self.project2_build_in_progress)
-
-        build_rows = self._get_rows_for_project(self.project1.id)
-        self.assertEqual(len(build_rows), 2)
-
-    def test_tasks_in_projectbuilds(self):
-        """ Task should be shown as suffix on build name """
-        build = Build.objects.create(**self.project1_build_success)
-        Target.objects.create(build=build, target='bash', task='clean')
-        url = reverse("projectbuilds", args=(self.project1.id,))
-        response = self.client.get(url, follow=True)
-        result = re.findall('^ +bash:clean$', response.content, re.MULTILINE)
-        self.assertEqual(len(result), 2)
-
-    def test_cli_builds_hides_tabs(self):
-        """
-        Display for command line builds should hide tabs;
-        note that the latest builds section is already tested in
-        AllBuildsPageTests, as the template is the same
-        """
-        url = reverse("projectbuilds", args=(self.default_project.id,))
-        response = self.client.get(url, follow=True)
-        soup = BeautifulSoup(response.content)
-        tabs = soup.select('#project-topbar')
-        self.assertEqual(len(tabs), 0,
-                         'should be no top bar shown for command line builds')
-
-    def test_non_cli_builds_has_tabs(self):
-        """
-        Non-command-line builds projects should show the tabs
-        """
-        url = reverse("projectbuilds", args=(self.project1.id,))
-        response = self.client.get(url, follow=True)
-        soup = BeautifulSoup(response.content)
-        tabs = soup.select('#project-topbar')
-        self.assertEqual(len(tabs), 1,
-                         'should be a top bar shown for non-command-line builds')
-
-class AllBuildsPageTests(TestCase):
-    """ Tests for all builds page /builds/ """
-
-    def setUp(self):
-        bbv = BitbakeVersion.objects.create(name="bbv1", giturl="/tmp/",
-                                            branch="master", dirpath="")
-        release = Release.objects.create(name="release1",
-                                         bitbake_version=bbv)
-        self.project1 = Project.objects.create_project(name=PROJECT_NAME,
-                                                       release=release)
-        self.default_project = Project.objects.create_project(
-            name=CLI_BUILDS_PROJECT_NAME,
-            release=release
-        )
-        self.default_project.is_default = True
-        self.default_project.save()
-
-        # parameters for builds to associate with the projects
-        now = timezone.now()
-
-        self.project1_build_success = {
-            "project": self.project1,
-            "started_on": now,
-            "completed_on": now,
-            "outcome": Build.SUCCEEDED
-        }
-
-        self.default_project_build_success = {
-            "project": self.default_project,
-            "started_on": now,
-            "completed_on": now,
-            "outcome": Build.SUCCEEDED
-        }
-
-    def test_show_tasks_in_allbuilds(self):
-        """ Task should be shown as suffix on build name """
-        build = Build.objects.create(**self.project1_build_success)
-        Target.objects.create(build=build, target='bash', task='clean')
-        url = reverse('all-builds')
-        response = self.client.get(url, follow=True)
-        result = re.findall('bash:clean', response.content, re.MULTILINE)
-        self.assertEqual(len(result), 3)
-
-    def test_no_run_again_for_cli_build(self):
-        """ "Run again" button should not be shown for command-line builds """
-        build = Build.objects.create(**self.default_project_build_success)
-        url = reverse('all-builds')
-        response = self.client.get(url, follow=True)
-        soup = BeautifulSoup(response.content)
-
-        attrs = {'data-latest-build-result': build.id}
-        result = soup.find('div', attrs=attrs)
-
-        # shouldn't see a run again button for command-line builds
-        run_again_button = result.select('button')
-        self.assertEqual(len(run_again_button), 0)
-
-        # should see a help icon for command-line builds
-        help_icon = result.select('i.get-help-green')
-        self.assertEqual(len(help_icon), 1)
-
-    def test_tooltips_on_project_name(self):
-        """
-        A tooltip should be present next to the command line
-        builds project name in the all builds page, but not for
-        other projects
-        """
-        build1 = Build.objects.create(**self.project1_build_success)
-        default_build = Build.objects.create(**self.default_project_build_success)
-
-        url = reverse('all-builds')
-        response = self.client.get(url, follow=True)
-        soup = BeautifulSoup(response.content)
-
-        # no help icon on non-default project name
-        result = soup.find('tr', attrs={'data-table-build-result': build1.id})
-        name = result.select('td.project-name')[0]
-        icons = name.select('i.get-help')
-        self.assertEqual(len(icons), 0,
-                         'should not be a help icon for non-cli builds name')
-
-        # help icon on default project name
-        result = soup.find('tr', attrs={'data-table-build-result': default_build.id})
-        name = result.select('td.project-name')[0]
-        icons = name.select('i.get-help')
-        self.assertEqual(len(icons), 1,
-                         'should be a help icon for cli builds name')
-
-class ProjectPageTests(TestCase):
-    """ Test project data at /project/X/ is displayed correctly """
-    CLI_BUILDS_PROJECT_NAME = 'Command line builds'
-
-    def test_command_line_builds_in_progress(self):
-        """
-        In progress builds should not cause an error to be thrown
-        when navigating to "command line builds" project page;
-        see https://bugzilla.yoctoproject.org/show_bug.cgi?id=8277
-        """
-
-        # add the "command line builds" default project; this mirrors what
-        # we do in migration 0026_set_default_project.py
-        default_project = Project.objects.create_project(self.CLI_BUILDS_PROJECT_NAME, None)
-        default_project.is_default = True
-        default_project.save()
-
-        # add an "in progress" build for the default project
-        now = timezone.now()
-        build = Build.objects.create(project=default_project,
-                                     started_on=now,
-                                     completed_on=now,
-                                     outcome=Build.IN_PROGRESS)
-
-        # navigate to the project page for the default project
-        url = reverse("project", args=(default_project.id,))
-        response = self.client.get(url, follow=True)
-
-        self.assertEqual(response.status_code, 200)
-
-class BuildDashboardTests(TestCase):
-    """ Tests for the build dashboard /build/X """
-
-    def setUp(self):
-        bbv = BitbakeVersion.objects.create(name="bbv1", giturl="/tmp/",
-                                            branch="master", dirpath="")
-        release = Release.objects.create(name="release1",
-                                         bitbake_version=bbv)
-        project = Project.objects.create_project(name=PROJECT_NAME,
-                                                 release=release)
-
-        now = timezone.now()
-
-        self.build1 = Build.objects.create(project=project,
-                                           started_on=now,
-                                           completed_on=now)
-
-        # exception
-        msg1 = 'an exception was thrown'
-        self.exception_message = LogMessage.objects.create(
-            build=self.build1,
-            level=LogMessage.EXCEPTION,
-            message=msg1
-        )
-
-        # critical
-        msg2 = 'a critical error occurred'
-        self.critical_message = LogMessage.objects.create(
-            build=self.build1,
-            level=LogMessage.CRITICAL,
-            message=msg2
-        )
-
-    def _get_build_dashboard_errors(self):
-        """
-        Get a list of HTML fragments representing the errors on the
-        build dashboard
-        """
-        url = reverse('builddashboard', args=(self.build1.id,))
-        response = self.client.get(url)
-        soup = BeautifulSoup(response.content)
-        return soup.select('#errors div.alert-error')
-
-    def _check_for_log_message(self, log_message):
-        """
-        Check whether the LogMessage instance <log_message> is
-        represented as an HTML error in the build dashboard page
-        """
-        errors = self._get_build_dashboard_errors()
-        self.assertEqual(len(errors), 2)
-
-        expected_text = log_message.message
-        expected_id = str(log_message.id)
-
-        found = False
-        for error in errors:
-            error_text = error.find('pre').text
-            text_matches = (error_text == expected_text)
-
-            error_id = error['data-error']
-            id_matches = (error_id == expected_id)
-
-            if text_matches and id_matches:
-                found = True
-                break
-
-        template_vars = (expected_text, error_text,
-                         expected_id, error_id)
-        assertion_error_msg = 'exception not found as error: ' \
-            'expected text "%s" and got "%s"; ' \
-            'expected ID %s and got %s' % template_vars
-        self.assertTrue(found, assertion_error_msg)
-
-    def test_exceptions_show_as_errors(self):
-        """
-        LogMessages with level EXCEPTION should display in the errors
-        section of the page
-        """
-        self._check_for_log_message(self.exception_message)
-
-    def test_criticals_show_as_errors(self):
-        """
-        LogMessages with level CRITICAL should display in the errors
-        section of the page
-        """
-        self._check_for_log_message(self.critical_message)
+            self.assertNotEqual(page_one_data,
+                                page_two_data,
+                                "Changed page on table %s but first row is the "
+                                "same as the previous page" % name)
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/urls.py b/yocto-poky/bitbake/lib/toaster/toastergui/urls.py
index a1adbb7..27b0baa 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/urls.py
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/urls.py
@@ -22,12 +22,16 @@
 from django.http import HttpResponseBadRequest
 from toastergui import tables
 from toastergui import typeaheads
+from toastergui import api
 
 urlpatterns = patterns('toastergui.views',
         # landing page
         url(r'^landing/$', 'landing', name='landing'),
 
-        url(r'^builds/$', 'builds', name='all-builds'),
+        url(r'^builds/$',
+            tables.AllBuildsTable.as_view(template_name="builds-toastertable.html"),
+            name='all-builds'),
+
         # build info navigation
         url(r'^build/(?P<build_id>\d+)$', 'builddashboard', name="builddashboard"),
 
@@ -61,7 +65,7 @@
         url(r'^build/(?P<build_id>\d+)/configuration$', 'configuration', name='configuration'),
         url(r'^build/(?P<build_id>\d+)/configvars$', 'configvars', name='configvars'),
         url(r'^build/(?P<build_id>\d+)/buildtime$', 'buildtime', name='buildtime'),
-        url(r'^build/(?P<build_id>\d+)/cpuusage$', 'cpuusage', name='cpuusage'),
+        url(r'^build/(?P<build_id>\d+)/cputime$', 'cputime', name='cputime'),
         url(r'^build/(?P<build_id>\d+)/diskio$', 'diskio', name='diskio'),
 
         # image information dir
@@ -74,12 +78,15 @@
         # project URLs
         url(r'^newproject/$', 'newproject', name='newproject'),
 
-
-        url(r'^projects/$', 'projects', name='all-projects'),
+        url(r'^projects/$',
+            tables.ProjectsTable.as_view(template_name="projects-toastertable.html"),
+            name='all-projects'),
 
         url(r'^project/(?P<pid>\d+)/$', 'project', name='project'),
         url(r'^project/(?P<pid>\d+)/configuration$', 'projectconf', name='projectconf'),
-        url(r'^project/(?P<pid>\d+)/builds/$', 'projectbuilds', name='projectbuilds'),
+        url(r'^project/(?P<pid>\d+)/builds/$',
+            tables.ProjectBuildsTable.as_view(template_name="projectbuilds-toastertable.html"),
+            name='projectbuilds'),
 
         # the import layer is a project-specific functionality;
         url(r'^project/(?P<pid>\d+)/importlayer$', 'importlayer', name='importlayer'),
@@ -103,13 +110,10 @@
             tables.NewCustomImagesTable.as_view(template_name="newcustomimage.html"),
             name="newcustomimage"),
 
-
         url(r'^project/(?P<pid>\d+)/layers/$',
             tables.LayersTable.as_view(template_name="generic-toastertable-page.html"),
             name="projectlayers"),
 
-
-
         url(r'^project/(?P<pid>\d+)/layer/(?P<layerid>\d+)$',
             'layerdetails', name='layerdetails'),
 
@@ -126,15 +130,21 @@
             name=tables.LayerMachinesTable.__name__.lower()),
 
 
-        url(r'^project/(?P<pid>\d+)/customrecipe/(?P<recipeid>\d+)/selectpackages/$',
-            tables.SelectPackagesTable.as_view(template_name="generic-toastertable-page.html"), name="recipeselectpackages"),
+        url(r'^project/(?P<pid>\d+)/customrecipe/(?P<custrecipeid>\d+)/selectpackages/$',
+            tables.SelectPackagesTable.as_view(), name="recipeselectpackages"),
 
 
-        url(r'^project/(?P<pid>\d+)/customrecipe/(?P<recipe_id>\d+)$',
-            'customrecipe',
+        url(r'^project/(?P<pid>\d+)/customrecipe/(?P<custrecipeid>\d+)$',
+            tables.SelectPackagesTable.as_view(template_name="customrecipe.html"),
             name="customrecipe"),
 
+        url(r'^project/(?P<pid>\d+)/customrecipe/(?P<recipe_id>\d+)/download$',
+            'customrecipe_download',
+            name="customrecipedownload"),
 
+        url(r'^project/(?P<pid>\d+)/recipe/(?P<recipe_id>\d+)$',
+            tables.PackagesTable.as_view(template_name="recipedetails.html"),
+            name="recipedetails"),
 
         # typeahead api end points
         url(r'^xhr_typeahead/(?P<pid>\d+)/layers$',
@@ -162,11 +172,19 @@
         # image customisation functionality
         url(r'^xhr_customrecipe/(?P<recipe_id>\d+)/packages/(?P<package_id>\d+|)$',
             'xhr_customrecipe_packages', name='xhr_customrecipe_packages'),
+
+        url(r'^xhr_customrecipe/(?P<recipe_id>\d+)/packages/$',
+            'xhr_customrecipe_packages', name='xhr_customrecipe_packages'),
+
         url(r'^xhr_customrecipe/(?P<recipe_id>\d+)$', 'xhr_customrecipe_id',
             name='xhr_customrecipe_id'),
         url(r'^xhr_customrecipe/', 'xhr_customrecipe',
             name='xhr_customrecipe'),
 
+        url(r'^xhr_buildrequest/project/(?P<pid>\d+)$',
+           api.XhrBuildRequest.as_view(),
+            name='xhr_buildrequest'),
+
           # default redirection
-        url(r'^$', RedirectView.as_view( url= 'landing')),
+        url(r'^$', RedirectView.as_view(url='landing', permanent=True)),
 )
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/views.py b/yocto-poky/bitbake/lib/toaster/toastergui/views.py
index 0e255f1..bd5bf63 100755
--- a/yocto-poky/bitbake/lib/toaster/toastergui/views.py
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/views.py
@@ -27,15 +27,15 @@
 
 from django.db.models import F, Q, Sum, Count, Max
 from django.db import IntegrityError, Error
-from django.shortcuts import render, redirect
+from django.shortcuts import render, redirect, get_object_or_404
 from orm.models import Build, Target, Task, Layer, Layer_Version, Recipe, LogMessage, Variable
 from orm.models import Task_Dependency, Recipe_Dependency, Package, Package_File, Package_Dependency
-from orm.models import Target_Installed_Package, Target_File, Target_Image_File, BuildArtifact
+from orm.models import Target_Installed_Package, Target_File, Target_Image_File, BuildArtifact, CustomImagePackage
 from orm.models import BitbakeVersion, CustomImageRecipe
 from bldcontrol import bbcontroller
 from django.views.decorators.cache import cache_control
 from django.core.urlresolvers import reverse, resolve
-from django.core.exceptions import MultipleObjectsReturned
+from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
 from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
 from django.http import HttpResponseBadRequest, HttpResponseNotFound
 from django.utils import timezone
@@ -43,7 +43,9 @@
 from datetime import timedelta, datetime
 from django.utils import formats
 from toastergui.templatetags.projecttags import json as jsonfilter
+from decimal import Decimal
 import json
+import os
 from os.path import dirname
 from functools import wraps
 import itertools
@@ -73,13 +75,9 @@
 def landing(request):
     # in build mode, we redirect to the command-line builds page
     # if there are any builds for the default (cli builds) project
-    default_project = Project.objects.get_default_project()
+    default_project = Project.objects.get_or_create_default_project()
     default_project_builds = Build.objects.filter(project = default_project)
 
-    if (not toastermain.settings.BUILD_MODE) and default_project_builds.count() > 0:
-        args = (default_project.id,)
-        return redirect(reverse('projectbuilds', args = args), permanent = False)
-
     # we only redirect to projects page if there is a user-generated project
     num_builds = Build.objects.all().count()
     user_projects = Project.objects.filter(is_default = False)
@@ -95,52 +93,6 @@
 
     return render(request, 'landing.html', context)
 
-# returns a list for most recent builds;
-def _get_latest_builds(prj=None):
-    queryset = Build.objects.all()
-
-    if prj is not None:
-        queryset = queryset.filter(project = prj)
-
-    if not toastermain.settings.BUILD_MODE:
-        queryset = queryset.exclude(project__is_default=False)
-
-    return list(itertools.chain(
-        queryset.filter(outcome=Build.IN_PROGRESS).order_by("-started_on"),
-        queryset.filter(outcome__lt=Build.IN_PROGRESS).order_by("-started_on")[:3] ))
-
-
-# a JSON-able dict of recent builds; for use in the Project page, xhr_ updates,  and other places, as needed
-def _project_recent_build_list(prj):
-    data = []
-    # take the most recent 3 completed builds, plus any builds in progress
-    for x in _get_latest_builds(prj):
-        d = {
-            "id":  x.pk,
-            "targets" : map(lambda y: {"target": y.target, "task": y.task }, x.target_set.all()), # TODO: create the task entry in the Target table
-            "status": x.get_current_status(),
-            "errors": map(lambda y: {"type": y.lineno, "msg": y.message, "tb": y.pathname}, (x.logmessage_set.filter(level__gte=LogMessage.WARNING)|x.logmessage_set.filter(level=LogMessage.EXCEPTION))),
-            "updated": x.completed_on.strftime('%s')+"000",
-            "command_time": (x.completed_on - x.started_on).total_seconds(),
-            "br_page_url": reverse('builddashboard', args=(x.pk,) ),
-            "build" : map( lambda y: {"id": y.pk,
-                        "status": y.get_outcome_display(),
-                        "completed_on" : y.completed_on.strftime('%s')+"000",
-                        "build_time" : (y.completed_on - y.started_on).total_seconds(),
-                        "build_page_url" : reverse('builddashboard', args=(y.pk,)),
-                        'build_time_page_url': reverse('buildtime', args=(y.pk,)),
-                        "errors": y.errors.count(),
-                        "warnings": y.warnings.count(),
-                        "completeper": y.completeper() if y.outcome == Build.IN_PROGRESS else "0",
-                        "eta": y.eta().strftime('%s')+"000" if y.outcome == Build.IN_PROGRESS else "0",
-                        }, [x]),
-            }
-        data.append(d)
-
-    return data
-
-
-
 def objtojson(obj):
     from django.db.models.query import QuerySet
     from django.db.models import Model
@@ -151,6 +103,8 @@
         return obj.total_seconds()
     elif isinstance(obj, QuerySet) or isinstance(obj, set):
         return list(obj)
+    elif isinstance(obj, Decimal):
+        return str(obj)
     elif type(obj).__name__ == "RelatedManager":
         return [x.pk for x in obj.all()]
     elif hasattr( obj, '__dict__') and isinstance(obj, Model):
@@ -509,7 +463,7 @@
     for t in tgts:
         elem = { }
         elem[ 'target' ] = t
-        if ( t.is_image ):
+        if t.is_image:
             hasImages = True
         npkg = 0
         pkgsz = 0
@@ -527,9 +481,13 @@
             if ( ndx < 0 ):
                 ndx = 0;
             f = i.file_name[ ndx + 1: ]
-            imageFiles.append({ 'id': i.id, 'path': f, 'size' : i.file_size })
-        if ( t.is_image and
-             (( len( imageFiles ) <= 0 ) or ( len( t.license_manifest_path ) <= 0 ))):
+            imageFiles.append({
+                'id': i.id,
+                'path': f,
+                'size': i.file_size,
+                'suffix': i.suffix
+            })
+        if t.is_image and (len(imageFiles) <= 0 or len(t.license_manifest_path) <= 0):
             targetHasNoImages = True
         elem[ 'imageFiles' ] = imageFiles
         elem[ 'targetHasNoImages' ] = targetHasNoImages
@@ -549,6 +507,7 @@
 
     context = {
             'build'           : build,
+            'project'         : build.project,
             'hasImages'       : hasImages,
             'ntargets'        : ntargets,
             'targets'         : targets,
@@ -705,7 +664,9 @@
 
 def target_common( request, build_id, target_id, variant ):
     template = "target.html"
-    (pagesize, orderby) = _get_parameters_values(request, 25, 'name:+')
+    default_orderby = 'name:+'
+
+    (pagesize, orderby) = _get_parameters_values(request, 25, default_orderby)
     mandatory_parameters = { 'count': pagesize,  'page' : 1, 'orderby': orderby }
     retval = _verify_parameters( request.GET, mandatory_parameters )
     if retval:
@@ -725,8 +686,6 @@
     queryset = queryset.select_related("recipe", "recipe__layer_version", "recipe__layer_version__layer")
     packages = _build_page_range( Paginator(queryset, pagesize), request.GET.get( 'page', 1 ))
 
-
-
     build = Build.objects.get( pk = build_id )
 
     # bring in package dependencies
@@ -839,11 +798,12 @@
     context = {
         'objectname': variant,
         'build'                : build,
+        'project'              : build.project,
         'target'               : Target.objects.filter( pk = target_id )[ 0 ],
         'objects'              : packages,
         'packages_sum'         : packages_sum[ 'installed_size__sum' ],
         'object_search_display': "packages included",
-        'default_orderby'      : orderby,
+        'default_orderby'      : default_orderby,
         'tablecols'            : [
                     tc_package,
                     tc_packageVersion,
@@ -979,7 +939,10 @@
             if head != sep:
                 dir_list.insert(0, head)
 
-    context = { 'build': Build.objects.get(pk=build_id),
+    build = Build.objects.get(pk=build_id)
+
+    context = { 'build': build,
+                'project': build.project,
                 'target': Target.objects.get(pk=target_id),
                 'packages_sum': packages_sum['installed_size__sum'],
                 'objects': objects,
@@ -1038,29 +1001,29 @@
         anchor=task_anchor
 
     # default ordering depends on variant
-    if   'buildtime' == variant:
-        title_variant='Time'
-        object_search_display="time data"
-        filter_search_display="tasks"
-        (pagesize, orderby) = _get_parameters_values(request, 25, 'elapsed_time:-')
-    elif 'diskio'    == variant:
-        title_variant='Disk I/O'
-        object_search_display="disk I/O data"
-        filter_search_display="tasks"
-        (pagesize, orderby) = _get_parameters_values(request, 25, 'disk_io:-')
-    elif 'cpuusage'  == variant:
-        title_variant='CPU usage'
-        object_search_display="CPU usage data"
-        filter_search_display="tasks"
-        (pagesize, orderby) = _get_parameters_values(request, 25, 'cpu_usage:-')
-    else :
-        title_variant='Tasks'
-        object_search_display="tasks"
-        filter_search_display="tasks"
-        (pagesize, orderby) = _get_parameters_values(request, 25, 'order:+')
+    default_orderby = None
+    filter_search_display = 'tasks'
 
+    if 'buildtime' == variant:
+        default_orderby = 'elapsed_time:-'
+        title_variant = 'Time'
+        object_search_display = 'time data'
+    elif 'diskio' == variant:
+        default_orderby = 'disk_io:-'
+        title_variant = 'Disk I/O'
+        object_search_display = 'disk I/O data'
+    elif 'cputime' == variant:
+        default_orderby = 'cpu_time_system:-'
+        title_variant='CPU time'
+        object_search_display = 'CPU time data'
+    else:
+        default_orderby = 'order:+'
+        title_variant = 'Tasks'
+        object_search_display = 'tasks'
 
-    mandatory_parameters = { 'count': pagesize,  'page' : 1, 'orderby': orderby }
+    (pagesize, orderby) = _get_parameters_values(request, 25, default_orderby)
+
+    mandatory_parameters = {'count': pagesize, 'page' : 1, 'orderby': orderby}
 
     template = 'tasks.html'
     retval = _verify_parameters( request.GET, mandatory_parameters )
@@ -1204,23 +1167,38 @@
         del tc_time['clclass']
         tc_cache['hidden']='1'
 
-    tc_cpu={
-        'name':'CPU usage',
-        'qhelp':'The percentage of task CPU utilization',
-        'orderfield': _get_toggle_order(request, "cpu_usage", True),
-        'ordericon':_get_toggle_order_icon(request, "cpu_usage"),
-        'orderkey' : 'cpu_usage',
-        'clclass': 'cpu_used', 'hidden' : 1,
+    tc_cpu_time_system={
+        'name':'System CPU time (secs)',
+        'qhelp':'Total amount of time spent executing in kernel mode, in ' +
+                'seconds. Note that this time can be greater than the task ' +
+                'time due to parallel execution.',
+        'orderfield': _get_toggle_order(request, "cpu_time_system", True),
+        'ordericon':_get_toggle_order_icon(request, "cpu_time_system"),
+        'orderkey' : 'cpu_time_system',
+        'clclass': 'cpu_time_system', 'hidden' : 1,
     }
 
-    if  'cpuusage' == variant:
-        tc_cpu['hidden']='0'
-        del tc_cpu['clclass']
+    tc_cpu_time_user={
+        'name':'User CPU time (secs)',
+        'qhelp':'Total amount of time spent executing in user mode, in seconds. ' +
+                'Note that this time can be greater than the task time due to ' +
+                'parallel execution.',
+        'orderfield': _get_toggle_order(request, "cpu_time_user", True),
+        'ordericon':_get_toggle_order_icon(request, "cpu_time_user"),
+        'orderkey' : 'cpu_time_user',
+        'clclass': 'cpu_time_user', 'hidden' : 1,
+    }
+
+    if 'cputime' == variant:
+        tc_cpu_time_system['hidden']='0'
+        tc_cpu_time_user['hidden']='0'
+        del tc_cpu_time_system['clclass']
+        del tc_cpu_time_user['clclass']
         tc_cache['hidden']='1'
 
     tc_diskio={
-        'name':'Disk I/O (ms)',
-        'qhelp':'Number of miliseconds the task spent doing disk input and output',
+        'name':'Disk I/O (bytes)',
+        'qhelp':'Number of bytes written to and read from the disk during the task',
         'orderfield': _get_toggle_order(request, "disk_io", True),
         'ordericon':_get_toggle_order_icon(request, "disk_io"),
         'orderkey' : 'disk_io',
@@ -1238,8 +1216,9 @@
                 'filter_search_display': filter_search_display,
                 'mainheading': title_variant,
                 'build': build,
+                'project': build.project,
                 'objects': task_objects,
-                'default_orderby' : orderby,
+                'default_orderby' : default_orderby,
                 'search_term': search_term,
                 'total_count': queryset_with_search.count(),
                 'tablecols':[
@@ -1251,7 +1230,8 @@
                     tc_outcome,
                     tc_cache,
                     tc_time,
-                    tc_cpu,
+                    tc_cpu_time_system,
+                    tc_cpu_time_user,
                     tc_diskio,
                 ]}
 
@@ -1272,9 +1252,8 @@
 def diskio(request, build_id):
     return tasks_common(request, build_id, 'diskio', '')
 
-def cpuusage(request, build_id):
-    return tasks_common(request, build_id, 'cpuusage', '')
-
+def cputime(request, build_id):
+    return tasks_common(request, build_id, 'cputime', '')
 
 def recipes(request, build_id):
     template = 'recipes.html'
@@ -1284,7 +1263,10 @@
     if retval:
         return _redirect_parameters( 'recipes', request.GET, mandatory_parameters, build_id = build_id)
     (filter_string, search_term, ordering_string) = _search_tuple(request, Recipe)
-    queryset = Recipe.objects.filter(layer_version__id__in=Layer_Version.objects.filter(build=build_id)).select_related("layer_version", "layer_version__layer")
+
+    build = Build.objects.get(pk=build_id)
+
+    queryset = build.get_recipes()
     queryset = _get_queryset(Recipe, queryset, filter_string, search_term, ordering_string, 'name')
 
     recipes = _build_page_range(Paginator(queryset, pagesize),request.GET.get('page', 1))
@@ -1303,11 +1285,10 @@
             revlist.append(recipe_dep)
         revs[recipe.id] = revlist
 
-    build = Build.objects.get(pk=build_id)
-
     context = {
         'objectname': 'recipes',
         'build': build,
+        'project': build.project,
         'objects': recipes,
         'default_orderby' : 'name:+',
         'recipe_deps' : deps,
@@ -1392,10 +1373,12 @@
                  'MACHINE', 'DISTRO', 'DISTRO_VERSION', 'TUNE_FEATURES', 'TARGET_FPU')
     context = dict(Variable.objects.filter(build=build_id, variable_name__in=var_names)\
                                            .values_list('variable_name', 'variable_value'))
+    build = Build.objects.get(pk=build_id)
     context.update({'objectname': 'configuration',
                     'object_search_display':'variables',
                     'filter_search_display':'variables',
-                    'build': Build.objects.get(pk=build_id),
+                    'build': build,
+                    'project': build.project,
                     'targets': Target.objects.filter(build=build_id)})
     return render(request, template, context)
 
@@ -1432,12 +1415,15 @@
         file_filter += '/bitbake.conf'
     build_dir=re.sub("/tmp/log/.*","",Build.objects.get(pk=build_id).cooker_log_path)
 
+    build = Build.objects.get(pk=build_id)
+
     context = {
                 'objectname': 'configvars',
                 'object_search_display':'BitBake variables',
                 'filter_search_display':'variables',
                 'file_filter': file_filter,
-                'build': Build.objects.get(pk=build_id),
+                'build': build,
+                'project': build.project,
                 'objects' : variables,
                 'total_count':queryset_with_search.count(),
                 'default_orderby' : 'variable_name:+',
@@ -1506,6 +1492,7 @@
     context = {
         'objectname': 'packages built',
         'build': build,
+        'project': build.project,
         'objects' : packages,
         'default_orderby' : 'name:+',
         'tablecols':[
@@ -1580,7 +1567,12 @@
 def bfile(request, build_id, package_id):
     template = 'bfile.html'
     files = Package_File.objects.filter(package = package_id)
-    context = {'build': Build.objects.get(pk=build_id), 'objects' : files}
+    build = Build.objects.get(pk=build_id)
+    context = {
+        'build': build,
+        'project': build.project,
+        'objects' : files
+    }
     return render(request, template, context)
 
 
@@ -1893,11 +1885,6 @@
         "projects": projects,
         "non_cli_projects": projects.exclude(is_default=True),
         "DEBUG" : toastermain.settings.DEBUG,
-
-        # True if Toaster is in build mode, False otherwise
-        "BUILD_MODE": toastermain.settings.BUILD_MODE,
-
-        "CUSTOM_IMAGE" : toastermain.settings.CUSTOM_IMAGE,
         "TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH,
         "TOASTER_REVISION" : toastermain.settings.TOASTER_REVISION,
     }
@@ -1908,6 +1895,7 @@
 import toastermain.settings
 
 from orm.models import Project, ProjectLayer, ProjectTarget, ProjectVariable
+from bldcontrol.models import  BuildEnvironment
 
 # we have a set of functions if we're in managed mode, or
 # a default "page not available" simple functions for interactive mode
@@ -1926,263 +1914,6 @@
         ''' The exception raised on invalid POST requests '''
         pass
 
-    # shows the "all builds" page for managed mode; it displays build requests (at least started!) instead of actual builds
-    # WARNING _build_list_helper() may raise a RedirectException, which
-    # will set the GET parameters and redirect back to the
-    # all-builds or projectbuilds page as appropriate;
-    # TODO don't use exceptions to control program flow
-    @_template_renderer("builds.html")
-    def builds(request):
-        # define here what parameters the view needs in the GET portion in order to
-        # be able to display something.  'count' and 'page' are mandatory for all views
-        # that use paginators.
-
-        queryset = Build.objects.all()
-
-        # if in analysis mode, exclude builds for all projects except
-        # command line builds
-        if not toastermain.settings.BUILD_MODE:
-            queryset = queryset.exclude(project__is_default=False)
-
-        redirect_page = resolve(request.path_info).url_name
-
-        context, pagesize, orderby = _build_list_helper(request,
-                                                        queryset,
-                                                        redirect_page)
-        # all builds page as a Project column
-        context['tablecols'].append({
-            'name': 'Project',
-            'clclass': 'project_column'
-        })
-
-        _set_parameters_values(pagesize, orderby, request)
-        return context
-
-
-    # helper function, to be used on "all builds" and "project builds" pages
-    def _build_list_helper(request, queryset_all, redirect_page, pid=None):
-        default_orderby = 'completed_on:-'
-        (pagesize, orderby) = _get_parameters_values(request, 10, default_orderby)
-        mandatory_parameters = { 'count': pagesize,  'page' : 1, 'orderby' : orderby }
-        retval = _verify_parameters( request.GET, mandatory_parameters )
-        if retval:
-            params = {}
-            if pid:
-                params = {'pid': pid}
-            raise RedirectException(redirect_page,
-                                    request.GET,
-                                    mandatory_parameters,
-                                    **params)
-
-        # boilerplate code that takes a request for an object type and returns a queryset
-        # for that object type. copypasta for all needed table searches
-        (filter_string, search_term, ordering_string) = _search_tuple(request, Build)
-
-        # post-process any date range filters
-        filter_string, daterange_selected = _modify_date_range_filter(filter_string)
-
-        # don't show "in progress" builds in "all builds" or "project builds"
-        queryset_all = queryset_all.exclude(outcome = Build.IN_PROGRESS)
-
-        # append project info
-        queryset_all = queryset_all.select_related("project")
-
-        # annotate with number of ERROR and EXCEPTION log messages
-        queryset_all = queryset_all.annotate(
-            errors_no = Count(
-                'logmessage',
-                only=Q(logmessage__level=LogMessage.ERROR) |
-                     Q(logmessage__level=LogMessage.EXCEPTION)
-            )
-        )
-
-        # annotate with number of warnings
-        q_warnings = Q(logmessage__level=LogMessage.WARNING)
-        queryset_all = queryset_all.annotate(
-            warnings_no = Count('logmessage', only=q_warnings)
-        )
-
-        # add timespent field
-        timespent = 'completed_on - started_on'
-        queryset_all = queryset_all.extra(select={'timespent': timespent})
-
-        queryset_with_search = _get_queryset(Build, queryset_all,
-                                             None, search_term,
-                                             ordering_string, '-completed_on')
-
-        queryset = _get_queryset(Build, queryset_all,
-                                 filter_string, search_term,
-                                 ordering_string, '-completed_on')
-
-        # retrieve the objects that will be displayed in the table; builds a paginator and gets a page range to display
-        build_info = _build_page_range(Paginator(queryset, pagesize), request.GET.get('page', 1))
-
-        # build view-specific information; this is rendered specifically in the builds page, at the top of the page (i.e. Recent builds)
-        build_mru = _get_latest_builds()[:3]
-
-        # calculate the exact begining of local today and yesterday, append context
-        context_date,today_begin,yesterday_begin = _add_daterange_context(queryset_all, request, {'started_on','completed_on'})
-
-        # set up list of fstypes for each build
-        fstypes_map = {};
-        for build in build_info:
-            targets = Target.objects.filter( build_id = build.id )
-            comma = "";
-            extensions = "";
-            for t in targets:
-                if ( not t.is_image ):
-                    continue
-                tif = Target_Image_File.objects.filter( target_id = t.id )
-                for i in tif:
-                    s=re.sub('.*tar.bz2', 'tar.bz2', i.file_name)
-                    if s == i.file_name:
-                        s=re.sub('.*\.', '', i.file_name)
-                    if None == re.search(s,extensions):
-                        extensions += comma + s
-                        comma = ", "
-            fstypes_map[build.id]=extensions
-
-        # send the data to the template
-        context = {
-                # specific info for
-                    'mru' : build_mru,
-                # TODO: common objects for all table views, adapt as needed
-                    'objects' : build_info,
-                    'objectname' : "builds",
-                    'default_orderby' : default_orderby,
-                    'fstypes' : fstypes_map,
-                    'search_term' : search_term,
-                    'total_count' : queryset_with_search.count(),
-                    'daterange_selected' : daterange_selected,
-                # Specifies the display of columns for the table, appearance in "Edit columns" box, toggling default show/hide, and specifying filters for columns
-                    'tablecols' : [
-                    {'name': 'Outcome',                                                # column with a single filter
-                     'qhelp' : "The outcome tells you if a build successfully completed or failed",     # the help button content
-                     'dclass' : "span2",                                                # indication about column width; comes from the design
-                     'orderfield': _get_toggle_order(request, "outcome"),               # adds ordering by the field value; default ascending unless clicked from ascending into descending
-                     'ordericon':_get_toggle_order_icon(request, "outcome"),
-                      # filter field will set a filter on that column with the specs in the filter description
-                      # the class field in the filter has no relation with clclass; the control different aspects of the UI
-                      # still, it is recommended for the values to be identical for easy tracking in the generated HTML
-                     'filter' : {'class' : 'outcome',
-                                 'label': 'Show:',
-                                 'options' : [
-                                             ('Successful builds', 'outcome:' + str(Build.SUCCEEDED), queryset_with_search.filter(outcome=str(Build.SUCCEEDED)).count()),  # this is the field search expression
-                                             ('Failed builds', 'outcome:'+ str(Build.FAILED), queryset_with_search.filter(outcome=str(Build.FAILED)).count()),
-                                             ]
-                                }
-                    },
-                    {'name': 'Recipe',                                                 # default column, disabled box, with just the name in the list
-                     'qhelp': "What you built (i.e. one or more recipes or image recipes)",
-                     'orderfield': _get_toggle_order(request, "target__target"),
-                     'ordericon':_get_toggle_order_icon(request, "target__target"),
-                    },
-                    {'name': 'Machine',
-                     'qhelp': "The machine is the hardware for which you are building a recipe or image recipe",
-                     'orderfield': _get_toggle_order(request, "machine"),
-                     'ordericon':_get_toggle_order_icon(request, "machine"),
-                     'dclass': 'span3'
-                    },                           # a slightly wider column
-                    {'name': 'Started on', 'clclass': 'started_on', 'hidden' : 1,      # this is an unchecked box, which hides the column
-                     'qhelp': "The date and time you started the build",
-                     'orderfield': _get_toggle_order(request, "started_on", True),
-                     'ordericon':_get_toggle_order_icon(request, "started_on"),
-                     'orderkey' : "started_on",
-                     'filter' : {'class' : 'started_on',
-                                 'label': 'Show:',
-                                 'options' : [
-                                             ("Today's builds" , 'started_on__gte:'+today_begin.strftime("%Y-%m-%d"), queryset_all.filter(started_on__gte=today_begin).count()),
-                                             ("Yesterday's builds",
-                                                 'started_on__gte!started_on__lt:'
-                                                     +yesterday_begin.strftime("%Y-%m-%d")+'!'
-                                                     +today_begin.strftime("%Y-%m-%d"),
-                                                 queryset_all.filter(
-                                                     started_on__gte=yesterday_begin,
-                                                     started_on__lt=today_begin
-                                                     ).count()),
-                                             ("Build date range", 'daterange', 1, '', 'started_on'),
-                                             ]
-                                }
-                     },
-                    {'name': 'Completed on',
-                     'qhelp': "The date and time the build finished",
-                     'orderfield': _get_toggle_order(request, "completed_on", True),
-                     'ordericon':_get_toggle_order_icon(request, "completed_on"),
-                     'orderkey' : 'completed_on',
-                     'filter' : {'class' : 'completed_on',
-                                 'label': 'Show:',
-                                 'options' : [
-                                             ("Today's builds" , 'completed_on__gte:'+today_begin.strftime("%Y-%m-%d"), queryset_all.filter(completed_on__gte=today_begin).count()),
-                                             ("Yesterday's builds",
-                                                 'completed_on__gte!completed_on__lt:'
-                                                     +yesterday_begin.strftime("%Y-%m-%d")+'!'
-                                                     +today_begin.strftime("%Y-%m-%d"),
-                                                 queryset_all.filter(
-                                                     completed_on__gte=yesterday_begin,
-                                                     completed_on__lt=today_begin
-                                                     ).count()),
-                                             ("Build date range", 'daterange', 1, '', 'completed_on'),
-                                             ]
-                                }
-                    },
-                    {'name': 'Failed tasks', 'clclass': 'failed_tasks',                # specifing a clclass will enable the checkbox
-                     'qhelp': "How many tasks failed during the build",
-                     'filter' : {'class' : 'failed_tasks',
-                                 'label': 'Show:',
-                                 'options' : [
-                                             ('Builds with failed tasks', 'task_build__outcome:4', queryset_with_search.filter(task_build__outcome=4).count()),
-                                             ('Builds without failed tasks', 'task_build__outcome:NOT4', queryset_with_search.filter(~Q(task_build__outcome=4)).count()),
-                                             ]
-                                }
-                    },
-                    {'name': 'Errors', 'clclass': 'errors_no',
-                     'qhelp': "How many errors were encountered during the build (if any)",
-                     # Comment out sorting and filter until YOCTO #8131 is fixed
-                     #'orderfield': _get_toggle_order(request, "errors_no", True),
-                     #'ordericon':_get_toggle_order_icon(request, "errors_no"),
-                     #'orderkey' : 'errors_no',
-                     #'filter' : {'class' : 'errors_no',
-                     #            'label': 'Show:',
-                     #            'options' : [
-                     #                        ('Builds with errors', 'errors_no__gte:1', queryset_with_search.filter(errors_no__gte=1).count()),
-                     #                        ('Builds without errors', 'errors_no:0', queryset_with_search.filter(errors_no=0).count()),
-                     #                        ]
-                     #           }
-                    },
-                    {'name': 'Warnings', 'clclass': 'warnings_no',
-                     'qhelp': "How many warnings were encountered during the build (if any)",
-                     # Comment out sorting and filter until YOCTO #8131 is fixed
-                     #'orderfield': _get_toggle_order(request, "warnings_no", True),
-                     #'ordericon':_get_toggle_order_icon(request, "warnings_no"),
-                     #'orderkey' : 'warnings_no',
-                     #'filter' : {'class' : 'warnings_no',
-                     #            'label': 'Show:',
-                     #            'options' : [
-                     #                        ('Builds with warnings','warnings_no__gte:1', queryset_with_search.filter(warnings_no__gte=1).count()),
-                     #                        ('Builds without warnings','warnings_no:0', queryset_with_search.filter(warnings_no=0).count()),
-                     #                        ]
-                     #           }
-                    },
-                    {'name': 'Time', 'clclass': 'time', 'hidden' : 1,
-                     'qhelp': "How long it took the build to finish",
-                     # Comment out sorting until YOCTO #8131 is fixed
-                     #'orderfield': _get_toggle_order(request, "timespent", True),
-                     #'ordericon':_get_toggle_order_icon(request, "timespent"),
-                     #'orderkey' : 'timespent',
-                    },
-                    {'name': 'Image files', 'clclass': 'output',
-                     'qhelp': "The root file system types produced by the build. You can find them in your <code>/build/tmp/deploy/images/</code> directory",
-                        # TODO: compute image fstypes from Target_Image_File
-                    }
-                    ]
-                }
-
-        # merge daterange values
-        context.update(context_date)
-        return context, pagesize, orderby
-
-
-
     # new project
     def newproject(request):
         template = "newproject.html"
@@ -2280,16 +2011,17 @@
                 prj.bitbake_version = prj.release.bitbake_version
                 prj.save()
                 # we need to change the layers
-                for i in prj.projectlayer_set.all():
+                for project in prj.projectlayer_set.all():
                     # find and add a similarly-named layer on the new branch
                     try:
-                        lv = prj.compatible_layerversions(layer_name = i.layercommit.layer.name)[0]
-                        ProjectLayer.objects.get_or_create(project = prj, layercommit = lv)
+                        layer_versions = prj.get_all_compatible_layer_versions()
+                        layer_versions = layer_versions.filter(layer__name = project.layercommit.layer.name)
+                        ProjectLayer.objects.get_or_create(project = prj, layercommit = layer_versions.first())
                     except IndexError:
                         pass
                     finally:
                         # get rid of the old entry
-                        i.delete()
+                        project.delete()
 
             if 'machineName' in request.POST:
                 machinevar = prj.projectvariable_set.get(name="MACHINE")
@@ -2316,7 +2048,7 @@
             "completedbuilds": Build.objects.exclude(outcome = Build.IN_PROGRESS).filter(project_id = pid),
             "prj" : {"name": prj.name, },
             "buildrequests" : prj.build_set.filter(outcome=Build.IN_PROGRESS),
-            "builds" : _project_recent_build_list(prj),
+            "builds" : Build.get_recent(prj),
             "layers" :  map(lambda x: {
                         "id": x.layercommit.pk,
                         "orderid": x.pk,
@@ -2371,13 +2103,23 @@
 
         name = "_js_unit_test_prj_"
 
-        # If there is an existing project by this name delete it. We don't want
-        # Lots of duplicates cluttering up the projects.
+        # If there is an existing project by this name delete it.
+        # We don't want Lots of duplicates cluttering up the projects.
         Project.objects.filter(name=name).delete()
 
-        new_project = Project.objects.create_project(name=name, release=release)
+        new_project = Project.objects.create_project(name=name,
+                                                     release=release)
+        # Add a layer
+        layer = new_project.get_all_compatible_layer_versions().first()
 
-        context = { 'project' : new_project }
+        ProjectLayer.objects.get_or_create(layercommit=layer,
+                                           project=new_project)
+
+        # make sure we have a machine set for this project
+        ProjectVariable.objects.get_or_create(project=new_project,
+                                              name="MACHINE",
+                                              value="qemux86")
+        context = {'project': new_project}
         return render(request, "js-unit-tests.html", context)
 
     from django.views.decorators.csrf import csrf_exempt
@@ -2399,12 +2141,17 @@
 
             retval = []
 
-            for i in prj.projectlayer_set.all():
-                lv = prj.compatible_layerversions(release = Release.objects.get(pk=new_release_id)).filter(layer__name = i.layercommit.layer.name)
+            for project in prj.projectlayer_set.all():
+                release = Release.objects.get(pk = new_release_id)
+
+                layer_versions = prj.get_all_compatible_layer_versions()
+                layer_versions = layer_versions.filter(release = release)
+                layer_versions = layer_versions.filter(layer__name = project.layercommit.layer.name)
+
                 # there is no layer_version with the new release id,
                 # and the same name
-                if lv.count() < 1:
-                    retval.append(i)
+                if layer_versions.count() < 1:
+                    retval.append(project)
 
             return response({"error":"ok",
                              "rows" : map( _lv_to_dict(prj),
@@ -2461,6 +2208,10 @@
             except ProjectVariable.DoesNotExist:
                 pass
             try:
+                return_data['dl_dir'] = ProjectVariable.objects.get(project = prj, name = "DL_DIR").value,
+            except ProjectVariable.DoesNotExist:
+                pass
+            try:
                 return_data['fstypes'] = ProjectVariable.objects.get(project = prj, name = "IMAGE_FSTYPES").value,
             except ProjectVariable.DoesNotExist:
                 pass
@@ -2473,7 +2224,7 @@
             except ProjectVariable.DoesNotExist:
                 pass
             try:
-                return_data['sdk_machine'] = ProjectVariable.objects.get(project = prj, name = "SDKMACHINE").value,
+                return_data['sstate_dir'] = ProjectVariable.objects.get(project = prj, name = "SSTATE_DIR").value,
             except ProjectVariable.DoesNotExist:
                 pass
 
@@ -2493,8 +2244,11 @@
         layers_added = [];
 
         # Rudimentary check for any possible html tags
-        if "<" in request.POST:
-          return HttpResponse(jsonfilter({"error": "Invalid character <"}), content_type = "application/json")
+        for val in request.POST.values():
+            if "<" in val:
+                return HttpResponse(jsonfilter(
+                    {"error": "Invalid character <"}),
+                    content_type="application/json")
 
         prj = Project.objects.get(pk=request.POST['project_id'])
 
@@ -2669,33 +2423,106 @@
 
         # create custom recipe
         try:
-            recipe = CustomImageRecipe.objects.create(
-                         name=request.POST["name"],
-                         base_recipe=params["base"],
-                         project=params["project"])
+
+            # Only allowed chars in name are a-z, 0-9 and -
+            if re.search(r'[^a-z|0-9|-]', request.POST["name"]):
+                return {"error": "invalid-name"}
+
+            custom_images = CustomImageRecipe.objects.all()
+
+            # Are there any recipes with this name already in our project?
+            existing_image_recipes_in_project = custom_images.filter(
+                name=request.POST["name"], project=params["project"])
+
+            if existing_image_recipes_in_project.count() > 0:
+                return {"error": "image-already-exists"}
+
+            # Are there any recipes with this name which aren't custom
+            # image recipes?
+            custom_image_ids = custom_images.values_list('id', flat=True)
+            existing_non_image_recipes = Recipe.objects.filter(
+                Q(name=request.POST["name"]) & ~Q(pk__in=custom_image_ids)
+            )
+
+            if existing_non_image_recipes.count() > 0:
+                return {"error": "recipe-already-exists"}
+
+            # create layer 'Custom layer' and verion if needed
+            layer = Layer.objects.get_or_create(
+                name=CustomImageRecipe.LAYER_NAME,
+                summary="Layer for custom recipes",
+                vcs_url="file:///toaster_created_layer")[0]
+
+            # Check if we have a layer version already
+            # We don't use get_or_create here because the dirpath will change
+            # and is a required field
+            lver = Layer_Version.objects.filter(Q(project=params['project']) &
+                                                Q(layer=layer) &
+                                                Q(build=None)).last()
+            if lver == None:
+                lver, created = Layer_Version.objects.get_or_create(
+                    project=params['project'],
+                    layer=layer,
+                    dirpath="toaster_created_layer")
+
+            # Add a dependency on our layer to the base recipe's layer
+            LayerVersionDependency.objects.get_or_create(
+                layer_version=lver,
+                depends_on=params["base"].layer_version)
+
+            # Add it to our current project if needed
+            ProjectLayer.objects.get_or_create(project=params['project'],
+                                               layercommit=lver,
+                                               optional=False)
+
+            # Create the actual recipe
+            recipe, created = CustomImageRecipe.objects.get_or_create(
+                name=request.POST["name"],
+                base_recipe=params["base"],
+                project=params["project"],
+                layer_version=lver,
+                is_image=True)
+
+            # If we created the object then setup these fields. They may get
+            # overwritten later on and cause the get_or_create to create a
+            # duplicate if they've changed.
+            if created:
+                recipe.file_path = request.POST["name"]
+                recipe.license = "MIT"
+                recipe.version = "0.1"
+                recipe.save()
+
         except Error as err:
             return {"error": "Can't create custom recipe: %s" % err}
 
         # Find the package list from the last build of this recipe/target
-        build = Build.objects.filter(target__target=params['base'].name,
-                    project=params['project']).last()
-
-        if build:
+        target = Target.objects.filter(Q(build__outcome=Build.SUCCEEDED) &
+                                       Q(build__project=params['project']) &
+                                       (Q(target=params['base'].name) |
+                                        Q(target=recipe.name))).last()
+        if target:
             # Copy in every package
             # We don't want these packages to be linked to anything because
             # that underlying data may change e.g. delete a build
-            for package in build.package_set.all():
-                # Create the duplicate
-                package.pk = None
-                package.save()
-                # Disassociate the package from the build
-                package.build = None
-                package.save()
-                recipe.packages.add(package)
-        else:
-            logger.warn("No packages found for this base recipe")
+            for tpackage in target.target_installed_package_set.all():
+                try:
+                    built_package = tpackage.package
+                    # The package had no recipe information so is a ghost
+                    # package skip it
+                    if built_package.recipe == None:
+                        continue;
+
+                    config_package = CustomImagePackage.objects.get(
+                        name=built_package.name)
+
+                    recipe.includes_set.add(config_package)
+                except Exception as e:
+                    logger.warning("Error adding package %s %s" %
+                                   (tpackage.package.name, e))
+                    pass
 
         return {"error": "ok",
+                "packages" : recipe.get_all_packages().count(),
                 "url": reverse('customrecipe', args=(params['project'].pk,
                                                      recipe.id))}
 
@@ -2720,34 +2547,105 @@
             or
             {"error": <error message>}
         """
-        objects = CustomImageRecipe.objects.filter(id=recipe_id)
-        if not objects:
+        try:
+            custom_recipe = CustomImageRecipe.objects.get(id=recipe_id)
+        except CustomImageRecipe.DoesNotExist:
             return {"error": "Custom recipe with id=%s "
                              "not found" % recipe_id}
+
         if request.method == 'GET':
-            values = CustomImageRecipe.objects.filter(id=recipe_id).values()
-            if values:
-                return {"error": "ok", "info": values[0]}
-            else:
-                return {"error": "Custom recipe with id=%s "
-                                 "not found" % recipe_id}
-            return {"error": "ok", "info": objects.values()[0]}
+            info = {"id" : custom_recipe.id,
+                    "name" : custom_recipe.name,
+                    "base_recipe_id": custom_recipe.base_recipe.id,
+                    "project_id": custom_recipe.project.id,
+                   }
+
+            return {"error": "ok", "info": info}
+
         elif request.method == 'DELETE':
-            objects.delete()
+            custom_recipe.delete()
             return {"error": "ok"}
         else:
             return {"error": "Method %s is not supported" % request.method}
 
+    def customrecipe_download(request, pid, recipe_id):
+        recipe = get_object_or_404(CustomImageRecipe, pk=recipe_id)
+
+        file_data = recipe.generate_recipe_file_contents()
+
+        response = HttpResponse(file_data, content_type='text/plain')
+        response['Content-Disposition'] = \
+                'attachment; filename="%s_%s.bb"' % (recipe.name,
+                                                     recipe.version)
+
+        return response
+
+    def _traverse_dependents(next_package_id, rev_deps, all_current_packages, tree_level=0):
+        """
+        Recurse through reverse dependency tree for next_package_id.
+        Limit the reverse dependency search to packages not already scanned,
+        that is, not already in rev_deps.
+        Limit the scan to a depth (tree_level) not exceeding the count of
+        all packages in the custom image, and if that depth is exceeded
+        return False, pop out of the recursion, and write a warning
+        to the log, but this is unlikely, suggesting a dependency loop
+        not caught by bitbake.
+        On return, the input/output arg rev_deps is appended with queryset
+        dictionary elements, annotated for use in the customimage template.
+        The list has unsorted, but unique elements.
+        """
+        max_dependency_tree_depth = all_current_packages.count()
+        if tree_level >= max_dependency_tree_depth:
+            logger.warning(
+                "The number of reverse dependencies "
+                "for this package exceeds " + max_dependency_tree_depth +
+                " and the remaining reverse dependencies will not be removed")
+            return True
+
+        package = CustomImagePackage.objects.get(id=next_package_id)
+        dependents = \
+            package.package_dependencies_target.annotate(
+                name=F('package__name'),
+                pk=F('package__pk'),
+                size=F('package__size'),
+            ).values("name", "pk", "size").exclude(
+                ~Q(pk__in=all_current_packages)
+            )
+
+        for pkg in dependents:
+            if pkg in rev_deps:
+                # already seen, skip dependent search
+                continue
+
+            rev_deps.append(pkg)
+            if (_traverse_dependents(
+                pkg["pk"], rev_deps, all_current_packages, tree_level+1)):
+                return True
+
+        return False
+
+    def _get_all_dependents(package_id, all_current_packages):
+        """
+        Returns sorted list of recursive reverse dependencies for package_id,
+        as a list of dictionary items, by recursing through dependency
+        relationships.
+        """
+        rev_deps = []
+        _traverse_dependents(package_id, rev_deps, all_current_packages)
+        rev_deps = sorted(rev_deps, key=lambda x: x["name"])
+        return rev_deps
+
     @xhr_response
     def xhr_customrecipe_packages(request, recipe_id, package_id):
         """
         ReST API to add/remove packages to/from custom recipe.
 
-        Entry point: /xhr_customrecipe/<recipe_id>/packages/
+        Entry point: /xhr_customrecipe/<recipe_id>/packages/<package_id>
 
         Methods:
             PUT - Add package to the recipe
             DELETE - Delete package from the recipe
+            GET - Get package information
 
         Returns:
             {"error": "ok"}
@@ -2760,26 +2658,149 @@
             return {"error": "Custom recipe with id=%s "
                              "not found" % recipe_id}
 
-        if request.method == 'GET' and not package_id:
-            return {"error": "ok",
-                    "packages": list(recipe.packages.values_list('id'))}
+        if package_id:
+            try:
+                package = CustomImagePackage.objects.get(id=package_id)
+            except Package.DoesNotExist:
+                return {"error": "Package with id=%s "
+                        "not found" % package_id}
 
-        try:
-            package = Package.objects.get(id=package_id)
-        except Package.DoesNotExist:
-            return {"error": "Package with id=%s "
-                             "not found" % package_id}
+        if request.method == 'GET':
+            # If no package_id then list the current packages
+            if not package_id:
+                total_size = 0
+                packages = recipe.get_all_packages().values("id",
+                                                            "name",
+                                                            "version",
+                                                            "size")
+                for package in packages:
+                    package['size_formatted'] = \
+                            filtered_filesizeformat(package['size'])
+                    total_size += package['size']
+
+                return {"error": "ok",
+                        "packages" : list(packages),
+                        "total" : len(packages),
+                        "total_size" : total_size,
+                        "total_size_formatted" :
+                        filtered_filesizeformat(total_size)
+                       }
+            else:
+                all_current_packages = recipe.get_all_packages()
+
+                # Dependencies for package which aren't satisfied by the
+                # current packages in the custom image recipe
+                deps = package.package_dependencies_source.annotate(
+                    name=F('depends_on__name'),
+                    pk=F('depends_on__pk'),
+                    size=F('depends_on__size'),
+                ).values("name", "pk", "size").filter(
+                    # There are two depends types we don't know why
+                    (Q(dep_type=Package_Dependency.TYPE_TRDEPENDS) |
+                    Q(dep_type=Package_Dependency.TYPE_RDEPENDS)) &
+                    ~Q(pk__in=all_current_packages)
+                )
+
+                # Reverse dependencies which are needed by packages that are
+                # in the image. Recursive search providing all dependents,
+                # not just immediate dependents.
+                reverse_deps = _get_all_dependents(package_id, all_current_packages)
+                total_size_deps = 0
+                total_size_reverse_deps = 0
+
+                for dep in deps:
+                    dep['size_formatted'] = \
+                            filtered_filesizeformat(dep['size'])
+                    total_size_deps += dep['size']
+
+                for dep in reverse_deps:
+                    dep['size_formatted'] = \
+                            filtered_filesizeformat(dep['size'])
+                    total_size_reverse_deps += dep['size']
+
+
+                return {"error": "ok",
+                        "id": package.pk,
+                        "name": package.name,
+                        "version": package.version,
+                        "unsatisfied_dependencies": list(deps),
+                        "unsatisfied_dependencies_size": total_size_deps,
+                        "unsatisfied_dependencies_size_formatted":
+                        filtered_filesizeformat(total_size_deps),
+                        "reverse_dependencies": list(reverse_deps),
+                        "reverse_dependencies_size": total_size_reverse_deps,
+                        "reverse_dependencies_size_formatted":
+                        filtered_filesizeformat(total_size_reverse_deps)}
+
+        included_packages = recipe.includes_set.values_list('pk', flat=True)
 
         if request.method == 'PUT':
-            recipe.packages.add(package)
-            return {"error": "ok"}
-        elif request.method == 'DELETE':
-            if package in recipe.packages.all():
-                recipe.packages.remove(package)
-                return {"error": "ok"}
+            # If we're adding back a package which used to be included in this
+            # image all we need to do is remove it from the excludes
+            if package.pk in included_packages:
+                try:
+                   recipe.excludes_set.remove(package)
+                   return {"error": "ok"}
+                except Package.DoesNotExist:
+                   return {"error":
+                           "Package %s not found in excludes but was in "
+                           "included list" % package.name}
+
             else:
-                return {"error": "Package '%s' is not in the recipe '%s'" % \
-                                 (package.name, recipe.name)}
+                recipe.appends_set.add(package)
+                # Make sure that package is not in the excludes set
+                try:
+                    recipe.excludes_set.remove(package)
+                except:
+                    pass
+                # Add the dependencies we think will be added to the recipe
+                # as a result of appending this package.
+                # TODO this should recurse down the entire deps tree
+                for dep in package.package_dependencies_source.all_depends():
+                    try:
+                        cust_package = CustomImagePackage.objects.get(
+                                           name=dep.depends_on.name)
+
+                        recipe.includes_set.add(cust_package)
+                        try:
+                            # When adding the pre-requisite package, make
+                            # sure it's not in the excluded list from a
+                            # prior removal.
+                            recipe.excludes_set.remove(cust_package)
+                        except Package.DoesNotExist:
+                            # Don't care if the package had never been excluded
+                            pass
+                    except:
+                        logger.warning("Could not add package's suggested"
+                                       "dependencies to the list")
+
+            return {"error": "ok"}
+
+        elif request.method == 'DELETE':
+            try:
+                # If we're deleting a package which is included we need to
+                # Add it to the excludes list.
+                if package.pk in included_packages:
+                    recipe.excludes_set.add(package)
+                else:
+                    recipe.appends_set.remove(package)
+                all_current_packages = recipe.get_all_packages()
+                reverse_deps_dictlist = _get_all_dependents(package.pk, all_current_packages)
+                ids = [entry['pk'] for entry in reverse_deps_dictlist]
+                reverse_deps = CustomImagePackage.objects.filter(id__in=ids)
+                for r in reverse_deps:
+                    try:
+                        if r.id in included_packages:
+                            recipe.excludes_set.add(r)
+                        else:
+                            recipe.appends_set.remove(r)
+                    except:
+                        pass
+
+                return {"error": "ok"}
+            except CustomImageRecipe.DoesNotExist:
+                return {"error": "Tried to remove package that wasn't present"}
+
         else:
             return {"error": "Method %s is not supported" % request.method}
 
@@ -2816,30 +2837,16 @@
         }
 
         vars_blacklist  = {
-            'DL_DR','PARALLEL_MAKE','BB_NUMBER_THREADS','SSTATE_DIR',
+            'PARALLEL_MAKE','BB_NUMBER_THREADS',
             'BB_DISKMON_DIRS','BB_NUMBER_THREADS','CVS_PROXY_HOST','CVS_PROXY_PORT',
-            'DL_DIR','PARALLEL_MAKE','SSTATE_DIR','SSTATE_DIR','SSTATE_MIRRORS','TMPDIR',
+            'PARALLEL_MAKE','SSTATE_MIRRORS','TMPDIR',
             'all_proxy','ftp_proxy','http_proxy ','https_proxy'
             }
 
-        vars_fstypes  = {
-            'btrfs','cpio','cpio.gz','cpio.lz4','cpio.lzma','cpio.xz','cramfs',
-            'elf','ext2','ext2.bz2','ext2.gz','ext2.lzma', 'ext4', 'ext4.gz', 'ext3','ext3.gz','hddimg',
-            'iso','jffs2','jffs2.sum','squashfs','squashfs-lzo','squashfs-xz','tar.bz2',
-            'tar.lz4','tar.xz','tartar.gz','ubi','ubifs','vmdk'
-        }
+        vars_fstypes = Target_Image_File.SUFFIXES
 
         return(vars_managed,sorted(vars_fstypes),vars_blacklist)
 
-    def customrecipe(request, pid, recipe_id):
-        project = Project.objects.get(pk=pid)
-        context = {'project' : project,
-                   'projectlayers': [],
-                   'recipe' : CustomImageRecipe.objects.get(pk=recipe_id)
-                  }
-
-        return render(request, "customrecipe.html", context)
-
     @_template_renderer("projectconf.html")
     def projectconf(request, pid):
 
@@ -2870,6 +2877,19 @@
         except ProjectVariable.DoesNotExist:
             pass
         try:
+            if ProjectVariable.objects.get(project = prj, name = "DL_DIR").value == "${TOPDIR}/../downloads":
+                be = BuildEnvironment.objects.get(pk = str(1))
+                dl_dir = os.path.join(dirname(be.builddir), "downloads")
+                context['dl_dir'] =  dl_dir
+                pv, created = ProjectVariable.objects.get_or_create(project = prj, name = "DL_DIR")
+                pv.value = dl_dir
+                pv.save()
+            else:
+                context['dl_dir'] = ProjectVariable.objects.get(project = prj, name = "DL_DIR").value
+            context['dl_dir_defined'] = "1"
+        except ProjectVariable.DoesNotExist,BuildEnvironment.DoesNotExist:
+            pass
+        try:
             context['fstypes'] =  ProjectVariable.objects.get(project = prj, name = "IMAGE_FSTYPES").value
             context['fstypes_defined'] = "1"
         except ProjectVariable.DoesNotExist:
@@ -2885,268 +2905,78 @@
         except ProjectVariable.DoesNotExist:
             pass
         try:
-            context['sdk_machine'] =  ProjectVariable.objects.get(project = prj, name = "SDKMACHINE").value
-            context['sdk_machine_defined'] = "1"
-        except ProjectVariable.DoesNotExist:
+            if ProjectVariable.objects.get(project = prj, name = "SSTATE_DIR").value == "${TOPDIR}/../sstate-cache":
+                be = BuildEnvironment.objects.get(pk = str(1))
+                sstate_dir = os.path.join(dirname(be.builddir), "sstate-cache")
+                context['sstate_dir'] = sstate_dir
+                pv, created = ProjectVariable.objects.get_or_create(project = prj, name = "SSTATE_DIR")
+                pv.value = sstate_dir
+                pv.save()
+            else:
+                context['sstate_dir'] = ProjectVariable.objects.get(project = prj, name = "SSTATE_DIR").value
+            context['sstate_dir_defined'] = "1"
+        except ProjectVariable.DoesNotExist, BuildEnvironment.DoesNotExist:
             pass
 
         return context
 
-    # WARNING _build_list_helper() may raise a RedirectException, which
-    # will set the GET parameters and redirect back to the
-    # all-builds or projectbuilds page as appropriate;
-    # TODO don't use exceptions to control program flow
-    @_template_renderer('projectbuilds.html')
-    def projectbuilds(request, pid):
-        prj = Project.objects.get(id = pid)
-
-        if request.method == "POST":
-            # process any build request
-
-            if 'buildCancel' in request.POST:
-                for i in request.POST['buildCancel'].strip().split(" "):
-                    try:
-                        br = BuildRequest.objects.select_for_update().get(project = prj, pk = i, state__lte = BuildRequest.REQ_QUEUED)
-                        br.state = BuildRequest.REQ_DELETED
-                        br.save()
-                    except BuildRequest.DoesNotExist:
-                        pass
-
-            if 'buildDelete' in request.POST:
-                for i in request.POST['buildDelete'].strip().split(" "):
-                    try:
-                        BuildRequest.objects.select_for_update().get(project = prj, pk = i, state__lte = BuildRequest.REQ_DELETED).delete()
-                    except BuildRequest.DoesNotExist:
-                        pass
-
-            if 'targets' in request.POST:
-                ProjectTarget.objects.filter(project = prj).delete()
-                s = str(request.POST['targets'])
-                for t in s.translate(None, ";%|\"").split(" "):
-                    if ":" in t:
-                        target, task = t.split(":")
-                    else:
-                        target = t
-                        task = ""
-                    ProjectTarget.objects.create(project = prj,
-                                                 target = target,
-                                                 task = task)
-                prj.schedule_build()
-
-        queryset = Build.objects.filter(project_id = pid)
-
-        redirect_page = resolve(request.path_info).url_name
-
-        context, pagesize, orderby = _build_list_helper(request,
-                                                        queryset,
-                                                        redirect_page,
-                                                        pid)
-
-        context['project'] = prj
-        _set_parameters_values(pagesize, orderby, request)
-
-        # add the most recent builds for this project
-        context['mru'] = _get_latest_builds(prj)
-
-        return context
-
-
-    def _file_name_for_artifact(b, artifact_type, artifact_id):
+    def _file_names_for_artifact(build, artifact_type, artifact_id):
+        """
+        Return a tuple (file path, file name for the download response) for an
+        artifact of type artifact_type with ID artifact_id for build; if
+        artifact type is not supported, returns (None, None)
+        """
         file_name = None
-        # Target_Image_File file_name
-        if artifact_type == "imagefile":
-            file_name = Target_Image_File.objects.get(target__build = b, pk = artifact_id).file_name
+        response_file_name = None
+
+        if artifact_type == "cookerlog":
+            file_name = build.cooker_log_path
+            response_file_name = "cooker.log"
+
+        elif artifact_type == "imagefile":
+            file_name = Target_Image_File.objects.get(target__build = build, pk = artifact_id).file_name
 
         elif artifact_type == "buildartifact":
-            file_name = BuildArtifact.objects.get(build = b, pk = artifact_id).file_name
+            file_name = BuildArtifact.objects.get(build = build, pk = artifact_id).file_name
 
-        elif artifact_type ==  "licensemanifest":
-            file_name = Target.objects.get(build = b, pk = artifact_id).license_manifest_path
+        elif artifact_type == "licensemanifest":
+            file_name = Target.objects.get(build = build, pk = artifact_id).license_manifest_path
 
         elif artifact_type == "tasklogfile":
-            file_name = Task.objects.get(build = b, pk = artifact_id).logfile
+            file_name = Task.objects.get(build = build, pk = artifact_id).logfile
 
         elif artifact_type == "logmessagefile":
-            file_name = LogMessage.objects.get(build = b, pk = artifact_id).pathname
-        else:
-            raise Exception("FIXME: artifact type %s not implemented" % (artifact_type))
+            file_name = LogMessage.objects.get(build = build, pk = artifact_id).pathname
 
-        return file_name
+        if file_name and not response_file_name:
+            response_file_name = os.path.basename(file_name)
 
+        return (file_name, response_file_name)
 
     def build_artifact(request, build_id, artifact_type, artifact_id):
-        if artifact_type in ["cookerlog"]:
-            try:
-                build = Build.objects.get(pk = build_id)
-                file_name = build.cooker_log_path
+        """
+        View which returns a build artifact file as a response
+        """
+        file_name = None
+        response_file_name = None
+
+        try:
+            build = Build.objects.get(pk = build_id)
+            file_name, response_file_name = _file_names_for_artifact(
+                build, artifact_type, artifact_id
+            )
+
+            if file_name and response_file_name:
                 fsock = open(file_name, "r")
                 content_type = MimeTypeFinder.get_mimetype(file_name)
 
                 response = HttpResponse(fsock, content_type = content_type)
 
-                disposition = 'attachment; filename=cooker.log'
-                response['Content-Disposition'] = disposition
+                disposition = "attachment; filename=" + response_file_name
+                response["Content-Disposition"] = disposition
 
                 return response
-            except IOError:
-                context = {
-                    'build' : Build.objects.get(pk = build_id),
-                }
-                return render(request, "unavailable_artifact.html", context)
-
-        else:
-            # retrieve the artifact directly from the build environment
-            return _get_be_artifact(request, build_id, artifact_type, artifact_id)
-
-
-    def _get_be_artifact(request, build_id, artifact_type, artifact_id):
-        try:
-            b = Build.objects.get(pk=build_id)
-            if b.buildrequest is None or b.buildrequest.environment is None:
-                raise Exception("Artifact not available for download (missing build request or build environment)")
-
-            file_name = _file_name_for_artifact(b, artifact_type, artifact_id)
-            fsock = None
-            content_type='application/force-download'
-
-            if file_name is None:
-                raise Exception("Could not handle artifact %s id %s" % (artifact_type, artifact_id))
             else:
-                content_type = MimeTypeFinder.get_mimetype(file_name)
-                fsock = b.buildrequest.environment.get_artifact(file_name)
-                file_name = os.path.basename(file_name) # we assume that the build environment system has the same path conventions as host
-
-            response = HttpResponse(fsock, content_type = content_type)
-
-            # returns a file from the environment
-            response['Content-Disposition'] = 'attachment; filename=' + file_name
-            return response
-        except IOError:
-            context = {
-                'build' : Build.objects.get(pk = build_id),
-            }
-            return render(request, "unavailable_artifact.html", context)
-
-
-
-
-    @_template_renderer("projects.html")
-    def projects(request):
-        (pagesize, orderby) = _get_parameters_values(request, 10, 'updated:-')
-        mandatory_parameters = { 'count': pagesize,  'page' : 1, 'orderby' : orderby }
-        retval = _verify_parameters( request.GET, mandatory_parameters )
-        if retval:
-            raise RedirectException( 'all-projects', request.GET, mandatory_parameters )
-
-        queryset_all = Project.objects.all()
-
-        # annotate each project with its number of builds
-        queryset_all = queryset_all.annotate(num_builds=Count('build'))
-
-        # exclude the command line builds project if it has no builds
-        q_default_with_builds = Q(is_default=True) & Q(num_builds__gt=0)
-        queryset_all = queryset_all.filter(Q(is_default=False) |
-                                           q_default_with_builds)
-
-        # if in BUILD_MODE, exclude everything but the command line builds project
-        if not toastermain.settings.BUILD_MODE:
-            queryset_all = queryset_all.exclude(is_default=False)
-
-        # boilerplate code that takes a request for an object type and returns a queryset
-        # for that object type. copypasta for all needed table searches
-        (filter_string, search_term, ordering_string) = _search_tuple(request, Project)
-        queryset_with_search = _get_queryset(Project, queryset_all, None, search_term, ordering_string, '-updated')
-        queryset = _get_queryset(Project, queryset_all, filter_string, search_term, ordering_string, '-updated')
-
-        # retrieve the objects that will be displayed in the table; projects a paginator and gets a page range to display
-        project_info = _build_page_range(Paginator(queryset, pagesize), request.GET.get('page', 1))
-
-        # add fields needed in JSON dumps for API call support
-        for p in project_info.object_list:
-            p.id = p.pk
-            p.projectPageUrl = reverse('project', args=(p.id,))
-            p.layersTypeAheadUrl = reverse('xhr_layerstypeahead', args=(p.id,))
-            p.recipesTypeAheadUrl = reverse('xhr_recipestypeahead', args=(p.id,))
-            p.projectBuildsUrl = reverse('projectbuilds', args=(p.id,))
-
-        # build view-specific information; this is rendered specifically in the builds page, at the top of the page (i.e. Recent builds)
-        build_mru = _get_latest_builds()
-
-        # translate the project's build target strings
-        fstypes_map = {};
-        for project in project_info:
-            try:
-                targets = Target.objects.filter( build_id = project.get_last_build_id() )
-                comma = "";
-                extensions = "";
-                for t in targets:
-                    if ( not t.is_image ):
-                        continue
-                    tif = Target_Image_File.objects.filter( target_id = t.id )
-                    for i in tif:
-                        s=re.sub('.*tar.bz2', 'tar.bz2', i.file_name)
-                        if s == i.file_name:
-                            s=re.sub('.*\.', '', i.file_name)
-                        if None == re.search(s,extensions):
-                            extensions += comma + s
-                            comma = ", "
-                fstypes_map[project.id]=extensions
-            except (Target.DoesNotExist,IndexError):
-                fstypes_map[project.id]=project.get_last_imgfiles
-
-        context = {
-                'mru' : build_mru,
-
-                'objects' : project_info,
-                'objectname' : "projects",
-                'default_orderby' : 'id:-',
-                'search_term' : search_term,
-                'total_count' : queryset_with_search.count(),
-                'fstypes' : fstypes_map,
-                'build_FAILED' : Build.FAILED,
-                'build_SUCCEEDED' : Build.SUCCEEDED,
-                'tablecols': [
-                    {'name': 'Project',
-                    'orderfield': _get_toggle_order(request, "name"),
-                    'ordericon':_get_toggle_order_icon(request, "name"),
-                    'orderkey' : 'name',
-                    },
-                    {'name': 'Last activity on',
-                    'clclass': 'updated',
-                    'qhelp': "Shows the starting date and time of the last project build. If the project has no builds, it shows the date the project was created",
-                    'orderfield': _get_toggle_order(request, "updated", True),
-                    'ordericon':_get_toggle_order_icon(request, "updated"),
-                    'orderkey' : 'updated',
-                    },
-                    {'name': 'Release',
-                    'qhelp' : "The version of the build system used by the project",
-                    'orderfield': _get_toggle_order(request, "release__name"),
-                    'ordericon':_get_toggle_order_icon(request, "release__name"),
-                    'orderkey' : 'release__name',
-                    },
-                    {'name': 'Machine',
-                    'qhelp': "The hardware currently selected for the project",
-                    },
-                    {'name': 'Number of builds',
-                    'qhelp': "How many builds have been run for the project",
-                    },
-                    {'name': 'Last build outcome', 'clclass': 'loutcome',
-                    'qhelp': "Tells you if the last project build completed successfully or failed",
-                    },
-                    {'name': 'Recipe', 'clclass': 'ltarget',
-                    'qhelp': "The last recipe that was built in this project",
-                    },
-                    {'name': 'Errors', 'clclass': 'lerrors',
-                    'qhelp': "How many errors were encountered during the last project build (if any)",
-                    },
-                    {'name': 'Warnings', 'clclass': 'lwarnings',
-                    'qhelp': "How many warnigns were encountered during the last project build (if any)",
-                    },
-                    {'name': 'Image files', 'clclass': 'limagefiles', 'hidden': 1,
-                    'qhelp': "The root file system types produced by the last project build",
-                    },
-                    ]
-            }
-
-        _set_parameters_values(pagesize, orderby, request)
-        return context
+                return render(request, "unavailable_artifact.html")
+        except ObjectDoesNotExist, IOError:
+            return render(request, "unavailable_artifact.html")
diff --git a/yocto-poky/bitbake/lib/toaster/toastergui/widgets.py b/yocto-poky/bitbake/lib/toaster/toastergui/widgets.py
index 6bb3889..d2ef5d3 100644
--- a/yocto-poky/bitbake/lib/toaster/toastergui/widgets.py
+++ b/yocto-poky/bitbake/lib/toaster/toastergui/widgets.py
@@ -38,11 +38,13 @@
 import collections
 import operator
 import re
+import urllib
 
 import logging
 logger = logging.getLogger("toaster")
 
 from toastergui.views import objtojson
+from toastergui.tablefilter import TableFilterMap
 
 class ToasterTable(TemplateView):
     def __init__(self, *args, **kwargs):
@@ -52,10 +54,12 @@
         self.title = "Table"
         self.queryset = None
         self.columns = []
-        self.filters = {}
+
+        # map from field names to Filter instances
+        self.filter_map = TableFilterMap()
+
         self.total_count = 0
         self.static_context_extra = {}
-        self.filter_actions = {}
         self.empty_state = "Sorry - no data found"
         self.default_orderby = ""
 
@@ -65,7 +69,7 @@
                         orderable=True,
                         field_name="id")
 
-        # prevent HTTP caching of table data
+    # prevent HTTP caching of table data
     @cache_control(must_revalidate=True, max_age=0, no_store=True, no_cache=True)
     def dispatch(self, *args, **kwargs):
         return super(ToasterTable, self).dispatch(*args, **kwargs)
@@ -107,26 +111,10 @@
             self.apply_search(search)
 
         name = request.GET.get("name", None)
-        if name is None:
-            data = json.dumps(self.filters,
-                              indent=2,
-                              cls=DjangoJSONEncoder)
-        else:
-            for actions in self.filters[name]['filter_actions']:
-                actions['count'] = self.filter_actions[actions['name']](count_only=True)
-
-            # Add the "All" items filter action
-            self.filters[name]['filter_actions'].insert(0, {
-                'name' : 'all',
-                'title' : 'All',
-                'count' : self.queryset.count(),
-            })
-
-            data = json.dumps(self.filters[name],
-                              indent=2,
-                              cls=DjangoJSONEncoder)
-
-            return data
+        table_filter = self.filter_map.get_filter(name)
+        return json.dumps(table_filter.to_json(self.queryset),
+                          indent=2,
+                          cls=DjangoJSONEncoder)
 
     def setup_columns(self, *args, **kwargs):
         """ function to implement in the subclass which sets up the columns """
@@ -138,30 +126,13 @@
         """ function to implement in the subclass which sets up the queryset"""
         pass
 
-    def add_filter(self, name, title, filter_actions):
+    def add_filter(self, table_filter):
         """Add a filter to the table.
 
         Args:
-            name (str): Unique identifier of the filter.
-            title (str): Title of the filter.
-            filter_actions: Actions for all the filters.
+            table_filter: Filter instance
         """
-        self.filters[name] = {
-          'title' : title,
-          'filter_actions' : filter_actions,
-        }
-
-    def make_filter_action(self, name, title, action_function):
-        """ Utility to make a filter_action """
-
-        action = {
-          'title' : title,
-          'name' : name,
-        }
-
-        self.filter_actions[name] = action_function
-
-        return action
+        self.filter_map.add_filter(table_filter.name, table_filter)
 
     def add_column(self, title="", help_text="",
                    orderable=False, hideable=True, hidden=False,
@@ -197,6 +168,24 @@
                              'computation': computation,
                             })
 
+    def set_column_hidden(self, title, hidden):
+        """
+        Set the hidden state of the column to the value of hidden
+        """
+        for col in self.columns:
+            if col['title'] == title:
+                col['hidden'] = hidden
+                break
+
+    def set_column_hideable(self, title, hideable):
+        """
+        Set the hideable state of the column to the value of hideable
+        """
+        for col in self.columns:
+            if col['title'] == title:
+                col['hideable'] = hideable
+                break
+
     def render_static_data(self, template, row):
         """Utility function to render the static data template"""
 
@@ -210,19 +199,35 @@
 
         return template.render(context)
 
-    def apply_filter(self, filters, **kwargs):
+    def apply_filter(self, filters, filter_value, **kwargs):
+        """
+        Apply a filter submitted in the querystring to the ToasterTable
+
+        filters: (str) in the format:
+          '<filter name>:<action name>'
+        filter_value: (str) parameters to pass to the named filter
+
+        <filter name> and <action name> are used to look up the correct filter
+        in the ToasterTable's filter map; the <action params> are set on
+        TableFilterAction* before its filter is applied and may modify the
+        queryset returned by the filter
+        """
         self.setup_filters(**kwargs)
 
         try:
-            filter_name, filter_action = filters.split(':')
+            filter_name, action_name = filters.split(':')
+            action_params = urllib.unquote_plus(filter_value)
         except ValueError:
             return
 
-        if "all" in filter_action:
+        if "all" in action_name:
             return
 
         try:
-            self.filter_actions[filter_action]()
+            table_filter = self.filter_map.get_filter(filter_name)
+            action = table_filter.get_action(action_name)
+            action.set_filter_params(action_params)
+            self.queryset = action.filter(self.queryset)
         except KeyError:
             # pass it to the user - programming error here
             raise
@@ -251,13 +256,20 @@
 
 
     def get_data(self, request, **kwargs):
-        """Returns the data for the page requested with the specified
-        parameters applied"""
+        """
+        Returns the data for the page requested with the specified
+        parameters applied
+
+        filters: filter and action name, e.g. "outcome:build_succeeded"
+        filter_value: value to pass to the named filter+action, e.g. "on"
+        (for a toggle filter) or "2015-12-11,2015-12-12" (for a date range filter)
+        """
 
         page_num = request.GET.get("page", 1)
         limit = request.GET.get("limit", 10)
         search = request.GET.get("search", None)
         filters = request.GET.get("filter", None)
+        filter_value = request.GET.get("filter_value", "on")
         orderby = request.GET.get("orderby", None)
         nocache = request.GET.get("nocache", None)
 
@@ -289,7 +301,7 @@
         if search:
             self.apply_search(search)
         if filters:
-            self.apply_filter(filters, **kwargs)
+            self.apply_filter(filters, filter_value, **kwargs)
         if orderby:
             self.apply_orderby(orderby)
 
diff --git a/yocto-poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py b/yocto-poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py
new file mode 100644
index 0000000..0399b86
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastermain/management/commands/checksocket.py
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2015 Intel Corporation
+#
+# 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.
+
+"""Custom management command checksocket."""
+
+import errno
+import socket
+
+from django.core.management.base import BaseCommand, CommandError
+from django.utils.encoding import force_text
+
+DEFAULT_ADDRPORT = "0.0.0.0:8000"
+
+class Command(BaseCommand):
+    """Custom management command."""
+
+    help = 'Check if Toaster can listen on address:port'
+
+    def add_arguments(self, parser):
+        parser.add_argument('addrport', nargs='?', default=DEFAULT_ADDRPORT,
+                            help='ipaddr:port to check, %s by default' % \
+                                 DEFAULT_ADDRPORT)
+
+    def handle(self, *args, **options):
+        addrport = options['addrport']
+        if ':' not in addrport:
+            raise CommandError('Invalid addr:port specified: %s' % addrport)
+        splitted = addrport.split(':')
+        try:
+            splitted[1] = int(splitted[1])
+        except ValueError:
+            raise CommandError('Invalid port specified: %s' % splitted[1])
+        self.stdout.write('Check if toaster can listen on %s' % addrport)
+        try:
+            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+            sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
+            sock.bind(tuple(splitted))
+        except (socket.error, OverflowError) as err:
+            errors = {
+                errno.EACCES: 'You don\'t have permission to access port %s' \
+                              % splitted[1],
+                errno.EADDRINUSE: 'Port %s is already in use' % splitted[1],
+                errno.EADDRNOTAVAIL: 'IP address can\'t be assigned to',
+            }
+            if hasattr(err, 'errno') and err.errno in errors:
+                errtext = errors[err.errno]
+            else:
+                errtext = force_text(err)
+            raise CommandError(errtext)
+
+        self.stdout.write("OK")
diff --git a/yocto-poky/bitbake/lib/toaster/toastermain/management/commands/get-dburl.py b/yocto-poky/bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
new file mode 100644
index 0000000..22b3eb7
--- /dev/null
+++ b/yocto-poky/bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
@@ -0,0 +1,9 @@
+from toastermain.settings import getDATABASE_URL
+from django.core.management.base import NoArgsCommand
+
+class Command(NoArgsCommand):
+    args    = ""
+    help    = "get database url"
+
+    def handle_noargs(self,**options):
+        print getDATABASE_URL()
diff --git a/yocto-poky/bitbake/lib/toaster/toastermain/settings.py b/yocto-poky/bitbake/lib/toaster/toastermain/settings.py
index b28ddb2..74ab604 100644
--- a/yocto-poky/bitbake/lib/toaster/toastermain/settings.py
+++ b/yocto-poky/bitbake/lib/toaster/toastermain/settings.py
@@ -23,11 +23,6 @@
 
 import os, re
 
-# Temporary toggle for Image customisation
-CUSTOM_IMAGE = False
-if os.environ.get("CUSTOM_IMAGE", None) is not None:
-    CUSTOM_IMAGE = True
-
 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
 
@@ -64,6 +59,7 @@
 
 if 'DATABASE_URL' in os.environ:
     dburl = os.environ['DATABASE_URL']
+
     if dburl.startswith('sqlite3://'):
         result = re.match('sqlite3://(.*)', dburl)
         if result is None:
@@ -78,7 +74,7 @@
         }
     elif dburl.startswith('mysql://'):
         # URL must be in this form: mysql://user:pass@host:port/name
-        result = re.match(r"mysql://([^:]*):([^@]*)@([^:]*):(\d+)/([^/]*)", dburl)
+        result = re.match(r"mysql://([^:]*):([^@]*)@([^:]*):(\d*)/([^/]*)", dburl)
         if result is None:
             raise Exception("ERROR: Could not read mysql database url: %s" % dburl)
         DATABASES['default'] = {
@@ -92,9 +88,6 @@
     else:
         raise Exception("FIXME: Please implement missing database url schema for url: %s" % dburl)
 
-BUILD_MODE = False
-if 'TOASTER_MANAGED' in os.environ and os.environ['TOASTER_MANAGED'] == "1":
-    BUILD_MODE = True
 
 # Allows current database settings to be exported as a DATABASE_URL environment variable value
 
@@ -231,7 +224,7 @@
     #        },
            'default': {
                'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
-               'LOCATION': '/tmp/django-default-cache',
+               'LOCATION': '/tmp/toaster_cache_%d' % os.getuid(),
                'TIMEOUT': 1,
             }
           }
@@ -279,7 +272,6 @@
     'django.contrib.humanize',
     'bldcollector',
     'toastermain',
-    'south',
 )
 
 
@@ -402,12 +394,3 @@
             "Undefined variable or unknown value for: \"%s\"" % other)
 
 TEMPLATE_STRING_IF_INVALID = InvalidString("%s")
-
-import sys
-sys.path.append(
-    os.path.join(
-    os.path.join(
-        os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
-            "contrib"),
-            "django-aggregate-if-master")
-    )
diff --git a/yocto-poky/bitbake/lib/toaster/toastermain/urls.py b/yocto-poky/bitbake/lib/toaster/toastermain/urls.py
index 6c4a953..534679d 100644
--- a/yocto-poky/bitbake/lib/toaster/toastermain/urls.py
+++ b/yocto-poky/bitbake/lib/toaster/toastermain/urls.py
@@ -45,7 +45,7 @@
     url(r'^orm/eventfile$', 'bldcollector.views.eventfile'),
 
     # if no application is selected, we have the magic toastergui app here
-    url(r'^$', never_cache(RedirectView.as_view(url='/toastergui/'))),
+    url(r'^$', never_cache(RedirectView.as_view(url='/toastergui/', permanent=True))),
 )
 
 import toastermain.settings
@@ -59,12 +59,11 @@
     urlpatterns.insert(1, url(r'', include(debug_toolbar.urls)))
     #logger.info("Enabled django_toolbar extension")
 
+urlpatterns = [
+    # Uncomment the next line to enable the admin:
+    url(r'^admin/', include(admin.site.urls)),
+] + urlpatterns
 
-if toastermain.settings.BUILD_MODE:
-    urlpatterns = [
-        # Uncomment the next line to enable the admin:
-        url(r'^admin/', include(admin.site.urls)),
-    ] + urlpatterns
 # Automatically discover urls.py in various apps, beside our own
 # and map module directories to the patterns
 
diff --git a/yocto-poky/bitbake/toaster-requirements.txt b/yocto-poky/bitbake/toaster-requirements.txt
index 1d7d21b..0e8c742 100644
--- a/yocto-poky/bitbake/toaster-requirements.txt
+++ b/yocto-poky/bitbake/toaster-requirements.txt
@@ -1,5 +1,4 @@
-Django==1.6
-South==0.8.4
+Django>1.8,<1.9
 argparse==1.2.1
 wsgiref==0.1.2
 beautifulsoup4>=4.4.0
diff --git a/yocto-poky/documentation/Makefile b/yocto-poky/documentation/Makefile
index 99adea2..418d3ca 100644
--- a/yocto-poky/documentation/Makefile
+++ b/yocto-poky/documentation/Makefile
@@ -128,12 +128,14 @@
            figures/wip.png
         else
 TARFILES = dev-style.css dev-manual.html \
-           figures/app-dev-flow.png figures/bsp-dev-flow.png \
+           figures/bsp-dev-flow.png \
            figures/dev-title.png figures/git-workflow.png \
            figures/index-downloads.png figures/kernel-dev-flow.png \
            figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
            figures/source-repos.png figures/yp-download.png \
            figures/recipe-workflow.png figures/build-workspace-directory.png \
+           figures/devtool-add-flow.png figures/devtool-modify-flow.png \
+           figures/devtool-upgrade-flow.png \
            eclipse
 	endif
 
@@ -198,9 +200,9 @@
 	figures/using-a-pre-built-image.png \
 	figures/poky-title.png figures/buildhistory.png \
         figures/buildhistory-web.png \
-	figures/adt-title.png figures/bsp-title.png \
+	figures/sdk-title.png figures/bsp-title.png \
 	figures/kernel-dev-title.png figures/kernel-architecture-overview.png \
-	figures/app-dev-flow.png figures/bsp-dev-flow.png \
+	figures/bsp-dev-flow.png \
         figures/dev-title.png \
 	figures/git-workflow.png figures/index-downloads.png \
         figures/kernel-dev-flow.png \
@@ -242,7 +244,12 @@
 	figures/sdk-generation.png figures/recipe-workflow.png \
 	figures/build-workspace-directory.png figures/mega-title.png \
 	figures/toaster-title.png figures/hosted-service.png \
-	figures/simple-configuration.png
+	figures/simple-configuration.png figures/devtool-add-flow.png \
+	figures/devtool-modify-flow.png figures/devtool-upgrade-flow.png \
+	figures/compatible-layers.png figures/import-layer.png figures/new-project.png \
+	figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \
+	figures/sdk-devtool-add-flow.png figures/sdk-installed-extensible-sdk-directory.png \
+	figures/sdk-devtool-modify-flow.png figures/sdk-eclipse-dev-flow.png
 	endif
 
 MANUALS = $(DOC)/$(DOC).html
@@ -268,12 +275,13 @@
 STYLESHEET = $(DOC)/*.css
 endif
 
-
-ifeq ($(DOC),adt-manual)
+ifeq ($(DOC),sdk-manual)
 XSLTOPTS = --xinclude
 ALLPREQ = html eclipse tarball
-TARFILES = adt-manual.html adt-style.css figures/adt-title.png \
-           figures/using-a-pre-built-image.png \
+TARFILES = sdk-manual.html sdk-style.css figures/sdk-title.png \
+           figures/sdk-environment.png figures/sdk-installed-standard-sdk-directory.png \
+	   figures/sdk-installed-extensible-sdk-directory.png figures/sdk-devtool-add-flow.png \
+	   figures/sdk-devtool-modify-flow.png figures/sdk-eclipse-dev-flow.png \
            eclipse
 MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
 FIGURES = figures
@@ -332,7 +340,8 @@
 ALLPREQ = html tarball
 TARFILES = toaster-manual.html toaster-manual-style.css \
 	   figures/toaster-title.png figures/simple-configuration.png \
-	   figures/hosted-service.png
+	   figures/hosted-service.png \
+	   figures/compatible-layers.png figures/import-layer.png figures/new-project.png
 MANUALS = $(DOC)/$(DOC).html
 FIGURES = figures
 STYLESHEET = $(DOC)/*.css
@@ -394,11 +403,11 @@
 .PHONY : eclipse-generate eclipse-resolve-links
 
 eclipse-generate:
-ifeq ($(filter $(DOC), adt-manual bsp-guide dev-manual kernel-dev profile-manual ref-manual yocto-project-qs),)
+ifeq ($(filter $(DOC), sdk-manual bsp-guide dev-manual kernel-dev profile-manual ref-manual yocto-project-qs),)
 	@echo " "
 	@echo "ERROR: You can only create eclipse documentation"
 	@echo "       of the following documentation parts:"
-	@echo "       - adt-manual"
+	@echo "       - sdk-manual"
 	@echo "       - bsp-guide"
 	@echo "       - dev-manual"
 	@echo "       - kernel-dev"
diff --git a/yocto-poky/documentation/README b/yocto-poky/documentation/README
index d01678d..a4e70a8 100644
--- a/yocto-poky/documentation/README
+++ b/yocto-poky/documentation/README
@@ -34,14 +34,16 @@
 
 Folders exist for individual manuals as follows:
 
-* adt-manual       - The Yocto Project Application Developer's Guide.
+* sdk-manual       - The Yocto Project Software Development Kit (SDK) Developer's Guide.
 * bsp-guide        - The Yocto Project Board Support Package (BSP) Developer's Guide
 * dev-manual       - The Yocto Project Development Manual
 * kernel-dev       - The Yocto Project Linux Kernel Development Manual
 * ref-manual       - The Yocto Project Reference Manual
 * yocto-project-qs - The Yocto Project Quick Start
-* mega-manual      - An aggregated manual comprised of all YP manuals and guides
+* mega-manual      - The Yocto Project Mega-Manual, which is an aggregated manual comprised
+                     of all YP manuals and guides
 * profile-manual   - The Yocto Project Profile and Tracing Manual
+* toaster-manual   - The Toaster Manual
 
 Each folder is self-contained regarding content and figures.  Note that there
 is a sed file needed to process the links of the mega-manual.  The sed file
@@ -68,10 +70,10 @@
 To build a manual, you run the make command and pass it the name
 of the folder containing the manual's contents.
 For example, the following command run from the documentation directory
-creates an HTML and a PDF version of the ADT manual.
+creates an HTML version of the SDK manual.
 The DOC variable specifies the manual you are making:
 
-     $ make DOC=adt-manual
+     $ make DOC=sdk-manual
 
 poky.ent
 ========
diff --git a/yocto-poky/documentation/adt-manual/adt-manual.xml b/yocto-poky/documentation/adt-manual/adt-manual.xml
index 67b330a..972f8bf 100644
--- a/yocto-poky/documentation/adt-manual/adt-manual.xml
+++ b/yocto-poky/documentation/adt-manual/adt-manual.xml
@@ -91,6 +91,11 @@
                 <date>October 2015</date>
                 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
             </revision>
+            <revision>
+                <revnumber>2.1</revnumber>
+                <date>Sometime in 2016</date>
+                <revremark>Released with the future Yocto Project 2.1 Release.</revremark>
+            </revision>
        </revhistory>
 
     <copyright>
diff --git a/yocto-poky/documentation/bsp-guide/bsp-guide.xml b/yocto-poky/documentation/bsp-guide/bsp-guide.xml
index d9bcc3f..c00b345 100644
--- a/yocto-poky/documentation/bsp-guide/bsp-guide.xml
+++ b/yocto-poky/documentation/bsp-guide/bsp-guide.xml
@@ -22,11 +22,11 @@
 
         <authorgroup>
             <author>
-                <firstname>Tom</firstname> <surname>Zanussi</surname>
+                <firstname>Saul</firstname> <surname>Wold</surname>
                 <affiliation>
                     <orgname>Intel Corporation</orgname>
                 </affiliation>
-                <email>tom.zanussi@intel.com</email>
+                <email>saul.wold@intel.com</email>
             </author>
             <author>
                 <firstname>Richard</firstname> <surname>Purdie</surname>
@@ -103,6 +103,11 @@
                 <date>October 2015</date>
                 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
             </revision>
+            <revision>
+                <revnumber>2.1</revnumber>
+                <date>April 2016</date>
+                <revremark>Released with the Yocto Project 2.1 Release.</revremark>
+            </revision>
         </revhistory>
 
     <copyright>
diff --git a/yocto-poky/documentation/bsp-guide/bsp.xml b/yocto-poky/documentation/bsp-guide/bsp.xml
index ec39ec9..b0562c7 100644
--- a/yocto-poky/documentation/bsp-guide/bsp.xml
+++ b/yocto-poky/documentation/bsp-guide/bsp.xml
@@ -60,16 +60,28 @@
                 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>.
                 If you go to that interface, you will find near the bottom of the list
                 under "Yocto Metadata Layers" several BSP layers all of which are
-                supported by the Yocto Project (e.g. <filename>meta-minnow</filename>,
-                <filename>meta-raspberrypi</filename>, and
+                supported by the Yocto Project (e.g. <filename>meta-raspberrypi</filename> and
                 <filename>meta-intel</filename>).
                 Each of these layers is a repository unto itself and clicking on a
                 layer reveals information that includes two links from which you can choose
                 to set up a clone of the layer's repository on your local host system.
-                Here is an example that clones the MinnowBoard BSP layer:
+                Here is an example that clones the Raspberry Pi BSP layer:
                 <literallayout class='monospaced'>
-     $ git clone git://git.yoctoproject.org/meta-minnow
+     $ git clone git://git.yoctoproject.org/meta-raspberrypi
                 </literallayout>
+            </para>
+
+            <para>
+                In addition to BSP layers near the bottom of that referenced
+                Yocto Project Source Repository, the
+                <filename>meta-yocto-bsp</filename> layer is part of the
+                shipped <filename>poky</filename> repository.
+                The <filename>meta-yocto-bsp</filename> layer maintains several
+                BSPs such as the Beaglebone, EdgeRouter, and generic versions of
+                both 32 and 64-bit IA machines.
+            </para>
+
+            <para>
                 For information on the BSP development workflow, see the
                 "<ulink url='&YOCTO_DOCS_DEV_URL;#developing-a-board-support-package-bsp'>Developing a Board Support Package (BSP)</ulink>"
                 section in the Yocto Project Development Manual.
@@ -80,8 +92,9 @@
             </para>
 
             <para>
-                The layer's base directory (<filename>meta-<replaceable>bsp_name</replaceable></filename>) is the root
-                of the BSP Layer.
+                The layer's base directory
+                (<filename>meta-<replaceable>bsp_name</replaceable></filename>)
+                is the root of the BSP Layer.
                 This root is what you add to the
                 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
                 variable in the <filename>conf/bblayers.conf</filename> file found in the
@@ -97,7 +110,7 @@
                 <literallayout class='monospaced'>
      BBLAYERS ?= " \
        /usr/local/src/yocto/meta \
-       /usr/local/src/yocto/meta-yocto \
+       /usr/local/src/yocto/meta-poky \
        /usr/local/src/yocto/meta-yocto-bsp \
        /usr/local/src/yocto/meta-mylayer \
        "
@@ -121,6 +134,8 @@
                 An example of this type of layer is the <filename>meta-intel</filename> layer,
                 which contains a number of individual BSP sub-layers, as well as a directory
                 named <filename>common/</filename> full of common content across those layers.
+                Another example is the <filename>meta-yocto-bsp</filename> layer mentioned
+                earlier.
             </para>
 
             <para>
@@ -130,7 +145,6 @@
             </para>
         </section>
 
-
         <section id="bsp-filelayout">
             <title>Example Filesystem Layout</title>
 
@@ -194,33 +208,142 @@
             </para>
 
             <para>
-                Below is an example of the eMenlow BSP:
+                Below is an example of the Raspberry Pi BSP:
 
                 <literallayout class='monospaced'>
-     meta-emenlow/COPYING.MIT
-     meta-emenlow/README
-     meta-emenlow/README.sources
-     meta-emenlow/binary/
-     meta-emenlow/conf/
-     meta-emenlow/conf/layer.conf
-     meta-emenlow/conf/machine/
-     meta-emenlow/conf/machine/emenlow-noemgd.conf
-     meta-emenlow/recipes-bsp/
-     meta-emenlow/recipes-bsp/formfactor/
-     meta-emenlow/recipes-bsp/formfactor/formfactor/
-     meta-emenlow/recipes-bsp/formfactor/formfactor_0.0.bbappend
-     meta-emenlow/recipes-bsp/formfactor/formfactor/emenlow-noemgd/
-     meta-emenlow/recipes-bsp/formfactor/formfactor/emenlow-noemgd/machconfig
-     meta-emenlow/recipes-graphics/
-     meta-emenlow/recipes-graphics/xorg-xserver
-     meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config
-     meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
-     meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config/emenlow-noemgd
-     meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config/emenlow-noemgd/xorg.config
-     meta-emenlow/recipes-kernel/
-     meta-emenlow/recipes-kernel/linux/
-     meta-emenlow/recipes-kernel/linux/linux-yocto-dev.bbappend
-     meta-emenlow/recipes-kernel/linux/linux-yocto_3.14.bbappend
+     meta-raspberrypi/COPYING.MIT
+     meta-raspberrypi/README
+     meta-raspberrypi/classes
+     meta-raspberrypi/classes/linux-raspberrypi-base.bbclass
+     meta-raspberrypi/classes/sdcard_image-rpi.bbclass
+     meta-raspberrypi/conf/
+     meta-raspberrypi/conf/layer.conf
+     meta-raspberrypi/conf/machine/
+     meta-raspberrypi/conf/machine/raspberrypi.conf
+     meta-raspberrypi/conf/machine/raspberrypi0.conf
+     meta-raspberrypi/conf/machine/raspberrypi2.conf
+     meta-raspberrypi/conf/machine/raspberrypi3.conf
+     meta-raspberrypi/conf/machine/include
+     meta-raspberrypi/conf/machine/include/rpi-base.inc
+     meta-raspberrypi/conf/machine/include/rpi-default-providers.inc
+     meta-raspberrypi/conf/machine/include/rpi-default-settings.inc
+     meta-raspberrypi/conf/machine/include/rpi-default-versions.inc
+     meta-raspberrypi/conf/machine/include/rpi-tune-arm1176jzf-s.inc
+     meta-raspberrypi/files
+     meta-raspberrypi/files/custom-licenses
+     meta-raspberrypi/files/custom-licenses/Broadcom
+     meta-raspberrypi/recipes-bsp
+     meta-raspberrypi/recipes-bsp/bootfiles
+     meta-raspberrypi/recipes-bsp/bootfiles/bcm2835-bootfiles.bb
+     meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb
+     meta-raspberrypi/recipes-bsp/common
+     meta-raspberrypi/recipes-bsp/common/firmware.inc
+     meta-raspberrypi/recipes-bsp/formfactor_00.bbappend
+     meta-raspberrypi/recipes-bsp/formfactor/raspberrypi/machconfig
+     meta-raspberrypi/recipes-bsp/rpi-mkimage_git.bb
+     meta-raspberrypi/recipes-bsp/rpi-mkimage/License
+     meta-raspberrypi/recipes-bsp/rpi-mkimage/open-files-relative-to-script.patch
+     meta-raspberrypi/recipes-bsp/u-boot/u-boot-rpi_git.bb
+     meta-raspberrypi/recipes-core
+     meta-raspberrypi/recipes-core/images
+     meta-raspberrypi/recipes-core/images/rpi-basic-image.bb
+     meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb
+     meta-raspberrypi/recipes-core/images/rpi-test-image.bb
+     meta-raspberrypi/recipes-core/packagegroups
+     meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb
+     meta-raspberrypi/recipes-core/psplash
+     meta-raspberrypi/recipes-core/psplash/files
+     meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend
+     meta-raspberrypi/recipes-core/psplash/files/psplash-raspberrypi-img.h
+     meta-raspberrypi/recipes-devtools
+     meta-raspberrypi/recipes-devtools/bcm2835
+     meta-raspberrypi/recipes-devtools/bcm2835/bcm2835_1.46.bb
+     meta-raspberrypi/recipes-devtools/pi-blaster
+     meta-raspberrypi/recipes-devtools/pi-blaster/files
+     meta-raspberrypi/recipes-devtools/pi-blaster/*.patch
+     meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster.inc
+     meta-raspberrypi/recipes-devtools/pi-blaster/pi-blaster_git.bb
+     meta-raspberrypi/recipes-devtools/python
+     meta-raspberrypi/recipes-devtools/python/python-rtimu
+     meta-raspberrypi/recipes-devtools/python/python-rtimu/*.patch
+     meta-raspberrypi/recipes-devtools/python/python-rtimu_git.bb
+     meta-raspberrypi/recipes-devtools/python/python-sense-hat_2.1.0.bb
+     meta-raspberrypi/recipes-devtools/python/rpi-gpio
+     meta-raspberrypi/recipes-devtools/python/rpi-gpio/*.patch
+     meta-raspberrypi/recipes-devtools/python/rpi-gpio_0.6.1.bb
+     meta-raspberrypi/recipes-devtools/python/rpio
+     meta-raspberrypi/recipes-devtools/python/rpio/*.patch
+     meta-raspberrypi/recipes-devtools/python/rpio_0.10.0.bb
+     meta-raspberrypi/recipes-devtools/wiringPi
+     meta-raspberrypi/recipes-devtools/wiringPi/files
+     meta-raspberrypi/recipes-devtools/wiringPi/files/*.patch
+     meta-raspberrypi/recipes-devtools/wiringPi/wiringpi
+     meta-raspberrypi/recipes-devtools/wiringPi/wiringpi/*.patch
+     meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb
+     meta-raspberrypi/recipes-graphics
+     meta-raspberrypi/recipes-graphics/eglinfo
+     meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-fb_%.bbappend
+     meta-raspberrypi/recipes-graphics/eglinfo/eglinfo-x11_%.bbappend
+     meta-raspberrypi/recipes-graphics/userland
+     meta-raspberrypi/recipes-graphics/userland/userland
+     meta-raspberrypi/recipes-graphics/userland/userland/*.patch
+     meta-raspberrypi/recipes-graphics/userland/userland_git.bb
+     meta-raspberrypi/recipes-graphics/vc-graphics
+     meta-raspberrypi/recipes-graphics/vc-graphics/files
+     meta-raspberrypi/recipes-graphics/vc-graphics/files/egl.pc
+     meta-raspberrypi/recipes-graphics/vc-graphics/files/vchiq.sh
+     meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics-hardfp.bb
+     meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.bb
+     meta-raspberrypi/recipes-graphics/vc-graphics/vc-graphics.inc
+     meta-raspberrypi/recipes-graphics/wayland
+     meta-raspberrypi/recipes-graphics/wayland/weston_%.bbappend
+     meta-raspberrypi/recipes-graphics/weston
+     meta-raspberrypi/recipes-graphics/weston/weston_%.bbappend
+     meta-raspberrypi/recipes-graphics/xorg-xserver
+     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config
+     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi
+     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf
+     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d
+     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/10-evdev.conf
+     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
+     meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
+     meta-raspberrypi/recipes-kernel
+     meta-raspberrypi/recipes-kernel/linux-firmware
+     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware
+     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware/LICENSE.broadcom_brcm80211
+     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.bin
+     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware/brcmfmac43430-sdio.txt
+     meta-raspberrypi/recipes-kernel/linux-firmware/linux-firmware_git.bbappend
+     meta-raspberrypi/recipes-kernel/linux
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-3.14
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-3.14/*.patch
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-3.18
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-3.18/*.patch
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-4.1
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-4.1/*.patch
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi/defconfig
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_3.14.bb
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_3.18.bb
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.1.bb
+     meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.4.bb
+     meta-raspberrypi/recipes-kernel/linux/linux.inc
+     meta-raspberrypi/recipes-multimedia
+     meta-raspberrypi/recipes-multimedia/gstreamer
+     meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx
+     meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx/*.patch
+     meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-omx_%.bbappend
+     meta-raspberrypi/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
+     meta-raspberrypi/recipes-multimedia/omxplayer
+     meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer
+     meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer/*.patch
+     meta-raspberrypi/recipes-multimedia/omxplayer/omxplayer_git.bb
+     meta-raspberrypi/scripts
+     meta-raspberrypi/scripts/lib
+     meta-raspberrypi/scripts/lib/image
+     meta-raspberrypi/scripts/lib/image/canned-wks
+     meta-raspberrypi/scripts/lib/image/canned-wks/sdimage-raspberrypi.wks
                 </literallayout>
             </para>
 
@@ -241,7 +364,7 @@
             <para>
                 These optional files satisfy licensing requirements for the BSP.
                 The type or types of files here can vary depending on the licensing requirements.
-                For example, in the eMenlow BSP all licensing requirements are handled with the
+                For example, in the Raspberry Pi BSP all licensing requirements are handled with the
                 <filename>COPYING.MIT</filename> file.
             </para>
 
@@ -363,7 +486,7 @@
 
      # We have a recipes directory, add to BBFILES
      BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
-             ${LAYERDIR}/recipes-*/*/*.bbappend"
+                 ${LAYERDIR}/recipes-*/*/*.bbappend"
 
      BBFILE_COLLECTIONS += "<replaceable>bsp</replaceable>"
      BBFILE_PATTERN_<replaceable>bsp</replaceable> = "^${LAYERDIR}/"
@@ -375,20 +498,21 @@
 
             <para>
                 To illustrate the string substitutions, here are the corresponding statements
-                from the eEmenlow <filename>conf/layer.conf</filename> file:
+                from the Raspberry Pi <filename>conf/layer.conf</filename> file:
                <literallayout class='monospaced'>
-     # We have a conf and classes directory, add to BBPATH
+     # We have a conf and classes directory, append to BBPATH
      BBPATH .= ":${LAYERDIR}"
 
-     # We have recipes-* directories, add to BBFILES
-     BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
-	     ${LAYERDIR}/recipes-*/*/*.bbappend"
+     # We have a recipes directory containing .bb and .bbappend files, add to BBFILES
+     BBFILES += "${LAYERDIR}/recipes*/*/*.bb \
+                 ${LAYERDIR}/recipes*/*/*.bbappend"
 
-     BBFILE_COLLECTIONS += "emenlow"
-     BBFILE_PATTERN_emenlow := "^${LAYERDIR}/"
-     BBFILE_PRIORITY_emenlow = "6"
+     BBFILE_COLLECTIONS += "raspberrypi"
+     BBFILE_PATTERN_raspberrypi := "^${LAYERDIR}/"
+     BBFILE_PRIORITY_raspberrypi = "9"
 
-     LAYERDEPENDS_emenlow = "intel"
+     # Additional license directories.
+     LICENSE_PATH += "${LAYERDIR}/files/custom-licenses"
                 </literallayout>
             </para>
 
@@ -450,13 +574,11 @@
             <para>
                 To use an include file, you simply include them in the
                 machine configuration file.
-                For example, the eEmenlow BSP
-                <filename>emenlow-noemgd.conf</filename> contains the
-                following statements:
+                For example, the Raspberry Pi BSP
+                <filename>raspberrypi3.conf</filename> contains the
+                following statement:
                 <literallayout class='monospaced'>
-     require conf/machine/include/intel-core2-32-common.inc
-     require conf/machine/include/intel-common-pkgarch.inc
-     require conf/machine/include/meta-intel.inc
+     include conf/machine/raspberrypi2.conf
                 </literallayout>
             </para>
             </section>
@@ -474,20 +596,22 @@
                 This optional directory contains miscellaneous recipe files for
                 the BSP.
                 Most notably would be the formfactor files.
-                For example, in the eMenlow BSP there is the
+                For example, in the Raspberry Pi BSP there is the
                 <filename>formfactor_0.0.bbappend</filename> file, which is an
                 append file used to augment the recipe that starts the build.
                 Furthermore, there are machine-specific settings used during
                 the build that are defined by the
                 <filename>machconfig</filename> file further down in the
                 directory.
-                In the eMenlow example, the <filename>machconfig</filename>
-                file supports the Video Electronics Standards Association
-                (VESA) graphics driver:
+                Here is the <filename>machconfig</filename>
+                file for the Raspberry Pi BSP:
                 <literallayout class='monospaced'>
-     # Assume a USB mouse and keyboard are connected
      HAVE_TOUCHSCREEN=0
      HAVE_KEYBOARD=1
+
+     DISPLAY_CAN_ROTATE=0
+     DISPLAY_ORIENTATION=0
+     DISPLAY_DPI=133
                 </literallayout>
             </para>
 
@@ -515,18 +639,6 @@
                 special requirements for graphics support.
                 All files that are needed for the BSP to support a display are
                 kept here.
-                For example, the <filename>meta-emenlow</filename> layer,
-                which supports the eMenlow platform consisting of the
-                <trademark class='registered'>Intel</trademark>
-                <trademark class='trade'>Atom</trademark>
-                Z5xx processor with the
-                <trademark class='registered'>Intel</trademark>
-                System Controller Hub US15W, uses these files for supporting
-                the Video Electronics Standards Association (VESA) graphics:
-                <literallayout class='monospaced'>
-     meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
-     meta-emenlow/recipes-graphics/xorg-xserver/xserver-xf86-config/emenlow-noemgd/xorg.conf
-                </literallayout>
             </para>
             </section>
 
@@ -551,47 +663,63 @@
                 the <filename>meta-<replaceable>bsp_name</replaceable>/recipes-kernel/linux</filename> directory).
             </para>
             <para>
-                Suppose you are using the <filename>linux-yocto_3.14.bb</filename> recipe to build
+                Suppose you are using the <filename>linux-yocto_4.4.bb</filename> recipe to build
                 the kernel.
                 In other words, you have selected the kernel in your
                 <replaceable>bsp_name</replaceable><filename>.conf</filename> file by adding these types
                 of statements:
                 <literallayout class='monospaced'>
      PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
-     PREFERRED_VERSION_linux-yocto ?= "3.14%"
+     PREFERRED_VERSION_linux-yocto ?= "4.4%"
                 </literallayout>
                 <note>
                     When the preferred provider is assumed by default, the
                     <filename>PREFERRED_PROVIDER</filename> statement does not appear in the
                     <replaceable>bsp_name</replaceable><filename>.conf</filename> file.
                 </note>
-                You would use the <filename>linux-yocto_3.14.bbappend</filename> file to append
-                specific BSP settings to the kernel, thus configuring the kernel for your particular BSP.
+                You would use the <filename>linux-yocto_4.4.bbappend</filename>
+                file to append specific BSP settings to the kernel, thus
+                configuring the kernel for your particular BSP.
             </para>
+
             <para>
-                As an example, look at the existing eMenlow BSP.
-                The append file used is:
+                As an example, consider the following append file
+                used by the BSPs in <filename>meta-yocto-bsp</filename>:
                 <literallayout class='monospaced'>
-     meta-emenlow/recipes-kernel/linux/linux-yocto_3.14.bbappend
+     meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend
                 </literallayout>
                 The following listing shows the file.
-                Be aware that the actual commit ID strings in this example listing might be different
-                than the actual strings in the file from the <filename>meta-intel</filename>
-                Git source repository.
+                Be aware that the actual commit ID strings in this
+                example listing might be different than the actual strings
+                in the file from the <filename>meta-yocto-bsp</filename>
+                layer upstream.
                 <literallayout class='monospaced'>
-     FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+     KBRANCH_genericx86  = "standard/base"
+     KBRANCH_genericx86-64  = "standard/base"
 
-     COMPATIBLE_MACHINE_emenlow-noemgd = "emenlow-noemgd"
-     KMACHINE_emenlow-noemgd = "emenlow"
-     KBRANCH_emenlow-noemgd = "standard/base"
-     KERNEL_FEATURES_append_emenlow-noemgd = " features/drm-gma500/drm-gma500.scc"
+     KMACHINE_genericx86 ?= "common-pc"
+     KMACHINE_genericx86-64 ?= "common-pc-64"
+     KBRANCH_edgerouter = "standard/edgerouter"
+     KBRANCH_beaglebone = "standard/beaglebone"
+     KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
 
-     LINUX_VERSION_emenlow-noemgd = "3.14.19"
-     SRCREV_machine_emenlow-noemgd = "902f34d36102a4b2008b776ecae686f80d307e12"
-     SRCREV_meta_emenlow-noemgd = "28e39741b8b3018334021d981369d3fd61f18f5b"
+     SRCREV_machine_genericx86    ?= "ff4c4ef15b51f45b9106d71bf1f62fe7c02e63c2"
+     SRCREV_machine_genericx86-64 ?= "ff4c4ef15b51f45b9106d71bf1f62fe7c02e63c2"
+     SRCREV_machine_edgerouter ?= "ff4c4ef15b51f45b9106d71bf1f62fe7c02e63c2"
+     SRCREV_machine_beaglebone ?= "ff4c4ef15b51f45b9106d71bf1f62fe7c02e63c2"
+     SRCREV_machine_mpc8315e-rdb ?= "df00877ef9387b38b9601c82db57de2a1b23ce53"
+
+     COMPATIBLE_MACHINE_genericx86 = "genericx86"
+     COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
+     COMPATIBLE_MACHINE_edgerouter = "edgerouter"
+     COMPATIBLE_MACHINE_beaglebone = "beaglebone"
+     COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
+
+     LINUX_VERSION_genericx86 = "4.4.3"
+     LINUX_VERSION_genericx86-64 = "4.4.3"
                 </literallayout>
-                This append file contains statements used to support the
-                eMenlow BSP.
+                This append file contains statements used to support
+                several BSPs that ship with the Yocto Project.
                 The file defines machines using the
                 <ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>
                 variable and uses the
@@ -602,25 +730,31 @@
                 The file also uses the optional
                 <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink>
                 variable to ensure the build process uses the
-                <filename>standard/emenlow</filename> kernel branch.
-                The
+                appropriate kernel branch.
+            </para>
+
+            <para>
+                Although this particular example does not use it, the
                 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
-                variable enables features specific to the kernel
-                (e.g. Intel GMA-500 DRM Driver in this case).
+                variable could be used to enable features specific to
+                the kernel.
                 The append file points to specific commits in the
                 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
                 Git repository and the <filename>meta</filename> Git repository
                 branches to identify the exact kernel needed to build the
-                eMenlow BSP.
+                BSP.
             </para>
 
             <para>
-                One thing missing in this particular BSP, which you will typically need when
-                developing a BSP, is the kernel configuration file (<filename>.config</filename>) for your BSP.
-                When developing a BSP, you probably have a kernel configuration file or a set of kernel
-                configuration files that, when taken together, define the kernel configuration for your BSP.
-                You can accomplish this definition by putting the configurations in a file or a set of files
-                inside a directory located at the same level as your kernel's append file and having the same
+                One thing missing in this particular BSP, which you will
+                typically need when developing a BSP, is the kernel configuration
+                file (<filename>.config</filename>) for your BSP.
+                When developing a BSP, you probably have a kernel configuration
+                file or a set of kernel configuration files that, when taken
+                together, define the kernel configuration for your BSP.
+                You can accomplish this definition by putting the configurations
+                in a file or a set of files inside a directory located at the
+                same level as your kernel's append file and having the same
                 name as the kernel's main recipe file.
                 With all these conditions met, simply reference those files in the
                 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
@@ -628,37 +762,42 @@
             </para>
 
             <para>
-                For example, suppose you had some configuration options in a file called
-                <filename>network_configs.cfg</filename>.
-                You can place that file inside a directory named <filename>linux-yocto</filename> and then add
-                a <filename>SRC_URI</filename> statement such as the following to the append file.
-                When the OpenEmbedded build system builds the kernel, the configuration options are
-                picked up and applied.
+                For example, suppose you had some configuration options
+                in a file called <filename>network_configs.cfg</filename>.
+                You can place that file inside a directory named
+                <filename>linux-yocto</filename> and then add
+                a <filename>SRC_URI</filename> statement such as the
+                following to the append file.
+                When the OpenEmbedded build system builds the kernel, the
+                configuration options are picked up and applied.
                 <literallayout class='monospaced'>
      SRC_URI += "file://network_configs.cfg"
                 </literallayout>
             </para>
 
             <para>
-                To group related configurations into multiple files, you perform a similar procedure.
-                Here is an example that groups separate configurations specifically for Ethernet and graphics
-                into their own files and adds the configurations
-                by using a <filename>SRC_URI</filename> statement like the following in your append file:
+                To group related configurations into multiple files, you
+                perform a similar procedure.
+                Here is an example that groups separate configurations
+                specifically for Ethernet and graphics into their own
+                files and adds the configurations by using a
+                <filename>SRC_URI</filename> statement like the following
+                in your append file:
                 <literallayout class='monospaced'>
      SRC_URI += "file://myconfig.cfg \
-            file://eth.cfg \
-            file://gfx.cfg"
+                 file://eth.cfg \
+                 file://gfx.cfg"
                 </literallayout>
             </para>
 
             <para>
-                The <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
-                variable is in boilerplate form in the
-                previous example in order to make it easy to do that.
-                This variable must be in your layer or BitBake will not find the patches or
-                configurations even if you have them in your <filename>SRC_URI</filename>.
-                The <filename>FILESEXTRAPATHS</filename> variable enables the build process to
-                find those configuration files.
+                Another variable you can use in your kernel recipe append
+                file is the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
+                variable.
+                When you use this statement, you are extending the locations
+                used by the OpenEmbedded system to look for files and
+                patches as the recipe is processed.
             </para>
 
             <note>
@@ -711,7 +850,7 @@
                             "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding
                             and Creating Layers"</ulink> in the Yocto Project Development Manual.</para></listitem>
                         <listitem><para>The requirements in this section apply regardless of how you
-                            ultimately package a BSP.
+                            package a BSP.
                             You should consult the packaging and distribution guidelines for your
                             specific release process.
                             For an example of packaging and distribution requirements, see the
@@ -731,7 +870,7 @@
                 </para>
 
                 <para>
-                    Following are the requirements for a released BSP that conforms to the
+                    Following are the requirements for a released BSP that conform to the
                     Yocto Project:
                     <itemizedlist>
                         <listitem><para><emphasis>Layer Name:</emphasis>
@@ -777,15 +916,16 @@
                             You must specify which license to use since there is no
                             default license if one is not specified.
                             See the
-                            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fri2/COPYING.MIT'><filename>COPYING.MIT</filename></ulink>
-                            file for the Fish River Island 2 BSP in the <filename>meta-fri2</filename> BSP layer
-                            as an example.</para></listitem>
+                            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-raspberrypi/tree/COPYING.MIT'><filename>COPYING.MIT</filename></ulink>
+                            file for the Raspberry Pi BSP in the
+                            <filename>meta-raspberrypi</filename> BSP layer as an example.
+                            </para></listitem>
                         <listitem><para><emphasis>README File:</emphasis>
                             You must include a <filename>README</filename> file in the
                             <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
                             See the
-                            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fri2/README'><filename>README</filename></ulink>
-                            file for the Fish River Island 2 BSP in the <filename>meta-fri2</filename> BSP layer
+                            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-raspberrypi/tree/README'><filename>README</filename></ulink>
+                            file for the Raspberry Pi BSP in the <filename>meta-raspberrypi</filename> BSP layer
                             as an example.</para>
                             <para>At a minimum, the <filename>README</filename> file should
                             contain the following:
@@ -828,10 +968,7 @@
                             This file specifies exactly where you can find the sources used to
                             generate the binary images contained in the
                             <filename>binary</filename> directory, if present.
-                            See the
-                            <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fri2/README.sources'><filename>README.sources</filename></ulink>
-                            file for the Fish River Island 2 BSP in the <filename>meta-fri2</filename> BSP layer
-                            as an example.</para></listitem>
+                            </para></listitem>
                         <listitem><para><emphasis>Layer Configuration File:</emphasis>
                             You must include a <filename>conf/layer.conf</filename> in the
                             <filename>meta-<replaceable>bsp_name</replaceable></filename> directory.
@@ -1175,13 +1312,14 @@
                     for that sub-command:
                     <literallayout class='monospaced'>
      $ yocto-bsp create
+     ERROR:root:Wrong number of arguments, exiting
 
      Usage:
 
       Create a new Yocto BSP
 
       usage: yocto-bsp create &lt;bsp-name&gt; &lt;karch&gt; [-o &lt;DIRNAME&gt; | --outdir &lt;DIRNAME&gt;]
-             [-i &lt;JSON PROPERTY FILE&gt; | --infile &lt;JSON PROPERTY_FILE&gt;]
+            [-i &lt;JSON PROPERTY FILE&gt; | --infile &lt;JSON PROPERTY_FILE&gt;]
 
       This command creates a Yocto BSP based on the specified parameters.
       The new BSP will be a new Yocto BSP layer contained by default within
@@ -1189,6 +1327,12 @@
       can be used to place the BSP layer in a directory with a different
       name and location.
 
+      The value of the 'karch' parameter determines the set of files that
+      will be generated for the BSP, along with the specific set of
+      'properties' that will be used to fill out the BSP-specific portions
+      of the BSP.  The possible values for the 'karch' parameter can be
+      listed via 'yocto-bsp list karch'.
+
       ...
                     </literallayout>
                 </para>
@@ -1203,7 +1347,7 @@
          yocto-bsp create - Create a new Yocto BSP
 
      SYNOPSIS
-         yocto-bsp create &lt;bsp-name&gt; &lt;karch&gt; [-o &lt;DIRNAME&gt; | --outdir &lt;DIRNAME&gt;]
+         yocto-bsp create &lt;bsp-name> &lt;karch&gt; [-o &lt;DIRNAME&gt; | --outdir &lt;DIRNAME&gt;]
              [-i &lt;JSON PROPERTY FILE&gt; | --infile &lt;JSON PROPERTY_FILE&gt;]
 
      DESCRIPTION
@@ -1213,12 +1357,6 @@
          'meta-bsp-name'.  The -o option can be used to place the BSP layer
          in a directory with a different name and location.
 
-         The value of the 'karch' parameter determines the set of files
-         that will be generated for the BSP, along with the specific set of
-         'properties' that will be used to fill out the BSP-specific
-         portions of the BSP.  The possible values for the 'karch' parameter
-         can be listed via 'yocto-bsp list karch'.
-
          ...
                     </literallayout>
                 </para>
@@ -1280,13 +1418,13 @@
                     <literallayout class='monospaced'>
      $ yocto-bsp list karch
      Architectures available:
-         qemu
-         mips64
          powerpc
          x86_64
-         arm
-         mips
          i386
+         arm
+         qemu
+         mips
+         mips64
                     </literallayout>
                 </para>
 
@@ -1320,35 +1458,34 @@
      $ yocto-bsp create myarm qemu
      Checking basic git connectivity...
      Done.
+
      Which qemu architecture would you like to use? [default: i386]
-         1) i386    (32-bit)
-         2) x86_64  (64-bit)
-         3) ARM     (32-bit)
-         4) PowerPC (32-bit)
-         5) MIPS    (32-bit)
-         6) MIPS64  (64-bit)
+	     1) i386    (32-bit)
+	     2) x86_64  (64-bit)
+	     3) ARM     (32-bit)
+	     4) PowerPC (32-bit)
+	     5) MIPS    (32-bit)
+	     6) MIPS64  (64-bit)
      3
-     Would you like to use the default (3.19) kernel? (y/n) [default: y] y
+     Would you like to use the default (4.1) kernel? (y/n) [default: y]
      Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n] [default: y]
-     Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.19.git...
+     Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-4.1.git...
      Please choose a machine branch to base your new BSP branch on: [default: standard/base]
-         1) standard/arm-versatile-926ejs
-         2) standard/base
-         3) standard/beagleboard
-         4) standard/beaglebone
-         5) standard/ck
-         6) standard/common-pc
-         7) standard/crownbay
-         8) standard/edgerouter
-         9) standard/fsl-mpc8315e-rdb
-         10) standard/mti-malta32
-         11) standard/mti-malta64
-         12) standard/qemuarm64
-         13) standard/qemuppc
+	     1) standard/arm-versatile-926ejs
+	     2) standard/base
+	     3) standard/beagleboard
+	     4) standard/beaglebone
+	     5) standard/edgerouter
+	     6) standard/fsl-mpc8315e-rdb
+	     7) standard/mti-malta32
+	     8) standard/mti-malta64
+	     9) standard/qemuarm64
+	     10) standard/qemuppc
      1
      Would you like SMP support? (y/n) [default: y]
      Does your BSP have a touchscreen? (y/n) [default: n]
      Does your BSP have a keyboard? (y/n) [default: y]
+
      New qemu BSP created in meta-myarm
                     </literallayout>
                     Take a closer look at the example now:
@@ -1358,7 +1495,7 @@
                             In the example, we use the ARM architecture.
                             </para></listitem>
                         <listitem><para>The script then prompts you for the kernel.
-                            The default 3.19 kernel is acceptable.
+                            The default 4.4 kernel is acceptable.
                             So, the example accepts the default.
                             If you enter 'n', the script prompts you to further enter the kernel
                             you do want to use.</para></listitem>
@@ -1399,15 +1536,10 @@
                     <literallayout class='monospaced'>
      BBLAYERS = ? " \
         /usr/local/src/yocto/meta \
-        /usr/local/src/yocto/meta-yocto \
+        /usr/local/src/yocto/meta-poky \
         /usr/local/src/yocto/meta-yocto-bsp \
         /usr/local/src/yocto/meta-myarm \
         "
-
-     BBLAYERS_NON_REMOVABLE ?= " \
-        /usr/local/src/yocto/meta \
-        /usr/local/src/yocto/meta-yocto \
-        "
                     </literallayout>
                     Adding the layer to this file allows the build system to build the BSP and
                     the <filename>yocto-kernel</filename> tool to be able to find the layer and
@@ -1438,8 +1570,11 @@
                     <literallayout class='monospaced'>
      $ yocto-kernel --help
      Usage:
+
       Modify and list Yocto BSP kernel config items and patches.
+
       usage: yocto-kernel [--version] [--help] COMMAND [ARGS]
+
       Current 'yocto-kernel' commands are:
         config list       List the modifiable set of bare kernel config options for a BSP
         config add        Add or modify bare kernel config options for a BSP
@@ -1454,7 +1589,11 @@
         feature describe  Describe a particular feature
         feature create    Create a new BSP-local feature
         feature destroy   Remove a BSP-local feature
+
       See 'yocto-kernel help COMMAND' for more information on a specific command.
+
+
+
      Options:
        --version    show program's version number and exit
        -h, --help   show this help message and exit
diff --git a/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml b/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml
index f0836e8..f926f1d 100644
--- a/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/yocto-poky/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -72,7 +72,7 @@
                 <filename>meta</filename>,
                 <filename>meta-skeleton</filename>,
                 <filename>meta-selftest</filename>,
-                <filename>meta-yocto</filename>, and
+                <filename>meta-poky</filename>, and
                 <filename>meta-yocto-bsp</filename>.
                 Each of these folders represents a distinct layer.
             </para>
@@ -165,12 +165,12 @@
                                     directory to the
                                     <filename>BBPATH</filename>.
                                     On the other hand, distro layers, such as
-                                    <filename>meta-yocto</filename>, can choose
+                                    <filename>meta-poky</filename>, can choose
                                     to enforce their own precedence over
                                     <filename>BBPATH</filename>.
                                     For an example of that syntax, see the
                                     <filename>layer.conf</filename> file for
-                                    the <filename>meta-yocto</filename> layer.
+                                    the <filename>meta-poky</filename> layer.
                                 </note></para></listitem>
                             <listitem><para>The recipes for the layers are
                                 appended to
@@ -336,11 +336,12 @@
      DEPENDS_append_one = " foo"
      DEPENDS_prepend_one = "foo "
                             </literallayout>
-                            As an actual example, here's a line from the recipe for
-                            the OProfile profiler, which lists an extra build-time
-                            dependency when building specifically for 64-bit PowerPC:
+                            As an actual example, here's a line from the recipe
+                            for gnutls, which adds dependencies on
+                            "argp-standalone" when building with the musl C
+                            library:
                             <literallayout class='monospaced'>
-     DEPENDS_append_powerpc64 = " libpfm4"
+     DEPENDS_append_libc-musl = " argp-standalone"
                             </literallayout>
                             <note>
                                 Avoiding "+=" and "=+" and using
@@ -444,7 +445,7 @@
 
      BBLAYERS ?= " \
        $HOME/poky/meta \
-       $HOME/poky/meta-yocto \
+       $HOME/poky/meta-poky \
        $HOME/poky/meta-yocto-bsp \
        $HOME/poky/meta-mylayer \
        "
@@ -550,8 +551,8 @@
             <para>
                 Following is the append file, which is named
                 <filename>formfactor_0.0.bbappend</filename> and is from the
-                Emenlow BSP Layer named
-                <filename>meta-intel/meta-emenlow</filename>.
+                Raspberry Pi BSP Layer named
+                <filename>meta-raspberrypi</filename>.
                 The file is in <filename>recipes-bsp/formfactor</filename>:
                 <literallayout class='monospaced'>
      FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
@@ -577,7 +578,7 @@
                 which resolves to a directory named
                 <filename>formfactor</filename> in the same directory
                 in which the append file resides (i.e.
-                <filename>meta-intel/meta-emenlow/recipes-bsp/formfactor/formfactor</filename>.
+                <filename>meta-raspberrypi/recipes-bsp/formfactor/formfactor</filename>.
                 This implies that you must have the supporting directory
                 structure set up that will contain any files or patches you
                 will be including from the layer.
@@ -870,7 +871,7 @@
                 <literallayout class='monospaced'>
      BBLAYERS = ?" \
         /usr/local/src/yocto/meta \
-        /usr/local/src/yocto/meta-yocto \
+        /usr/local/src/yocto/meta-poky \
         /usr/local/src/yocto/meta-yocto-bsp \
         /usr/local/src/yocto/meta-mylayer \
         "
@@ -3495,14 +3496,7 @@
             </para>
 
             <para>
-                This section overviews the Multilib process only.
-                For more details on how to implement Multilib, see the
-                <ulink url='&YOCTO_WIKI_URL;/wiki/Multilib'>Multilib</ulink> wiki
-                page.
-            </para>
-
-            <para>
-                Aside from this wiki page, several examples exist in the
+                Several examples exist in the
                 <filename>meta-skeleton</filename> layer found in the
                <link linkend='source-directory'>Source Directory</link>:
                 <itemizedlist>
@@ -3603,8 +3597,39 @@
                 <title>Additional Implementation Details</title>
 
                 <para>
-                    Different packaging systems have different levels of native Multilib
-                    support.
+                    Generic implementation details as well as details that are
+                    specific to package management systems exist.
+                    Following are implementation details that exist regardless
+                    of the package management system:
+                    <itemizedlist>
+                        <listitem><para>The typical convention used for the
+                            class extension code as used by
+                            Multilib assumes that all package names specified
+                            in
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>
+                            that contain <filename>${PN}</filename> have
+                            <filename>${PN}</filename> at the start of the name.
+                            When that convention is not followed and
+                            <filename>${PN}</filename> appears at
+                            the middle or the end of a name, problems occur.
+                            </para></listitem>
+                        <listitem><para>The
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_VENDOR'><filename>TARGET_VENDOR</filename></ulink>
+                            value under Multilib will be extended to
+                            "-<replaceable>vendor</replaceable>ml<replaceable>multilib</replaceable>"
+                            (e.g. "-pokymllib32" for a "lib32" Multilib with
+                            Poky).
+                            The reason for this slightly unwieldy contraction
+                            is that any "-" characters in the vendor
+                            string presently break Autoconf's
+                            <filename>config.sub</filename>, and
+                            other separators are problematic for different
+                            reasons.
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+'
+                <para>
                     For the RPM Package Management System, the following implementation details
                     exist:
                     <itemizedlist>
@@ -3701,6 +3726,46 @@
         </section>
     </section>
 
+    <section id='dev-optionally-using-an-external-toolchain'>
+        <title>Optionally Using an External Toolchain</title>
+
+        <para>
+            You might want to use an external toolchain as part of your
+            development.
+            If this is the case, the fundamental steps you need to accomplish
+            are as follows:
+            <itemizedlist>
+                <listitem><para>
+                    Understand where the installed toolchain resides.
+                    For cases where you need to build the external toolchain,
+                    you would need to take separate steps to build and install
+                    the toolchain.
+                    </para></listitem>
+                <listitem><para>
+                    Make sure you add the layer that contains the toolchain to
+                    your <filename>bblayers.conf</filename> file through the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
+                    variable.
+                    </para></listitem>
+                <listitem><para>
+                    Set the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNAL_TOOLCHAIN'><filename>EXTERNAL_TOOLCHAIN</filename></ulink>
+                    variable in your <filename>local.conf</filename> file
+                    to the location in which you installed the toolchain.
+                    </para></listitem>
+            </itemizedlist>
+            A good example of an external toolchain used with the Yocto Project
+            is <trademark class='registered'>Mentor Graphics</trademark>
+            Sourcery G++ Toolchain.
+            You can see information on how to use that particular layer in the
+            <filename>README</filename> file at
+            <ulink url='http://github.com/MentorEmbedded/meta-sourcery/'></ulink>.
+            You can find further information by reading about the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-TCMODE'><filename>TCMODE</filename></ulink>
+            variable in the Yocto Project Reference Manual's variable glossary.
+        </para>
+    </section>
+
     <section id='creating-partitioned-images'>
         <title>Creating Partitioned Images</title>
 
@@ -3779,8 +3844,8 @@
                         standalone utility that initially provides
                         easier-to-use and more flexible replacements for a
                         couple bits of existing functionality in OE Core's
-                        <filename>boot-directdisk.bbclass</filename> and
-                        <filename>mkefidisk.sh</filename> scripts.
+                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-image-live'><filename>image-live</filename></ulink>
+                        class and <filename>mkefidisk.sh</filename> script.
                         The difference between
                         <filename>wic</filename> and those examples is
                         that with <filename>wic</filename> the
@@ -3823,7 +3888,8 @@
                         in the form generated by the build system.
                         </para></listitem>
                     <listitem><para>
-                        You must build several native tools:
+                        You must build several native tools, which are tools
+                        built to run on the build system:
                         <literallayout class='monospaced'>
      $ bitbake parted-native dosfstools-native mtools-native
                         </literallayout>
@@ -4102,8 +4168,8 @@
                 </para>
 
                 <para>
-                    The output specifies the exact created as well as where
-                    it was created.
+                    The output specifies the exact image created as well as
+                    where it was created.
                     The output also names the artifacts used and the exact
                     <filename>.wks</filename> script that was used to generate
                     the image.
@@ -4491,11 +4557,18 @@
                 <title>Command: part or partition</title>
 
                 <para>
-                This command creates a partition on the system and uses the
-                following syntax:
+                Either of these commands create a partition on the system
+                and uses the following syntax:
                     <literallayout class='monospaced'>
-     part <replaceable>mntpoint</replaceable>
+     part [<replaceable>mntpoint</replaceable>]
+     partition [<replaceable>mntpoint</replaceable>]
                     </literallayout>
+                    If you do not provide
+                    <replaceable>mntpoint</replaceable>, wic creates a partition
+                    but does not mount it.
+                </para>
+
+                <para>
                     The <filename><replaceable>mntpoint</replaceable></filename>
                     is where the
                     partition will be mounted and must be of one of the
@@ -4503,16 +4576,36 @@
                     <itemizedlist>
                         <listitem><para><filename>/<replaceable>path</replaceable></filename>:
                             For example, <filename>/</filename>,
-                            <filename>/usr</filename>, and
+                            <filename>/usr</filename>, or
                             <filename>/home</filename></para></listitem>
                         <listitem><para><filename>swap</filename>:
-                            The partition will be used as swap space.
+                            The created partition is used as swap space.
                             </para></listitem>
                     </itemizedlist>
                 </para>
 
                 <para>
-                    Following are the supported options:
+                    Specifying a <replaceable>mntpoint</replaceable> causes
+                    the partition to automatically be mounted.
+                    Wic achieves this by adding entries to the filesystem
+                    table (fstab) during image generation.
+                    In order for wic to generate a valid fstab, you must
+                    also provide one of the <filename>--ondrive</filename>,
+                    <filename>--ondisk</filename>, or
+                    <filename>--use-uuid</filename> partition options as part
+                    of the command.
+                    Here is an example using "/" as the mountpoint.
+                    The command uses "--ondisk" to force the partition onto
+                    the <filename>sdb</filename> disk:
+                    <literallayout class='monospaced'>
+     part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
+                    </literallayout>
+                </para>
+
+                <para>
+                    Here is a list that describes other supported options you
+                    can use with the <filename>part</filename> and
+                    <filename>partition</filename> commands:
                     <itemizedlist>
                         <listitem><para><emphasis><filename>--size</filename>:</emphasis>
                             The minimum partition size in MBytes.
@@ -4684,6 +4777,14 @@
                             <filename>APPEND</filename> or
                             <filename>grub</filename> kernel command line.
                             </para></listitem>
+                        <listitem><para><emphasis><filename>--configfile</filename>:</emphasis>
+                            Specifies a user-defined configuration file for
+                            the bootloader.
+                            You can provide a full pathname for the file or
+                            a file that exists in the
+                            <filename>canned-wks</filename> folder.
+                            This option overrides all other bootloader options.
+                            </para></listitem>
                     </itemizedlist>
                 </para>
             </section>
@@ -5013,7 +5114,7 @@
                         This configuration file will be your baseline.
                         </para></listitem>
                     <listitem><para>Separately run the
-                        <filename>do_configme</filename> and
+                        <filename>do_kernel_configme</filename> and
                         <filename>do_kernel_configcheck</filename> tasks.
                         </para></listitem>
                     <listitem><para>Take the resulting list of files from the
@@ -5041,7 +5142,7 @@
                     <listitem><para>
                         After you have worked through the output of the kernel
                         configuration audit, you can re-run the
-                        <filename>do_configme</filename> and
+                        <filename>do_kernel_configme</filename> and
                         <filename>do_kernel_configcheck</filename> tasks to
                         see the results of your changes.
                         If you have more issues, you can deal with them as
@@ -5057,6 +5158,112 @@
                 Yocto kernel.
             </para>
         </section>
+
+        <section id='determining-hardware-and-non-hardware-features-for-the-kernel-configuration-audit-phase'>
+            <title>Determining Hardware and Non-Hardware Features for the Kernel Configuration Audit Phase</title>
+
+            <para>
+                This section describes part of the kernel configuration audit
+                phase that most developers can ignore.
+                During this part of the audit phase, the contents of the final
+                <filename>.config</filename> file are compared against the
+                fragments specified by the system.
+                These fragments can be system fragments, distro fragments,
+                or user specified configuration elements.
+                Regardless of their origin, the OpenEmbedded build system
+                warns the user if a specific option is not included in the
+                final kernel configuration.
+            </para>
+
+            <para>
+                In order to not overwhelm the user with configuration warnings,
+                by default the system only reports on missing "hardware"
+                options because a missing hardware option could mean a boot
+                failure or that important hardware is not available.
+            </para>
+
+            <para>
+                To determine whether or not a given option is "hardware" or
+                "non-hardware", the kernel Metadata contains files that
+                classify individual or groups of options as either hardware
+                or non-hardware.
+                To better show this, consider a situation where the
+                Yocto Project kernel cache contains the following files:
+                <literallayout class='monospaced'>
+     kernel-cache/features/drm-psb/hardware.cfg
+     kernel-cache/features/kgdb/hardware.cfg
+     kernel-cache/ktypes/base/hardware.cfg
+     kernel-cache/bsp/mti-malta32/hardware.cfg
+     kernel-cache/bsp/fsl-mpc8315e-rdb/hardware.cfg
+     kernel-cache/bsp/qemu-ppc32/hardware.cfg
+     kernel-cache/bsp/qemuarma9/hardware.cfg
+     kernel-cache/bsp/mti-malta64/hardware.cfg
+     kernel-cache/bsp/arm-versatile-926ejs/hardware.cfg
+     kernel-cache/bsp/common-pc/hardware.cfg
+     kernel-cache/bsp/common-pc-64/hardware.cfg
+     kernel-cache/features/rfkill/non-hardware.cfg
+     kernel-cache/ktypes/base/non-hardware.cfg
+     kernel-cache/features/aufs/non-hardware.kcf
+     kernel-cache/features/ocf/non-hardware.kcf
+     kernel-cache/ktypes/base/non-hardware.kcf
+     kernel-cache/ktypes/base/hardware.kcf
+     kernel-cache/bsp/qemu-ppc32/hardware.kcf
+                </literallayout>
+                The following list provides explanations for the various
+                files:
+                <itemizedlist>
+                    <listitem><para><filename>hardware.kcf</filename>:
+                        Specifies a list of kernel Kconfig files that contain
+                        hardware options only.
+                        </para></listitem>
+                    <listitem><para><filename>non-hardware.kcf</filename>:
+                        Specifies a list of kernel Kconfig files that contain
+                        non-hardware options only.
+                        </para></listitem>
+                    <listitem><para><filename>hardware.cfg</filename>:
+                        Specifies a list of kernel
+                        <filename>CONFIG_</filename> options that are hardware,
+                        regardless of whether or not they are within a Kconfig
+                        file specified by a hardware or non-hardware
+                        Kconfig file (i.e. <filename>hardware.kcf</filename> or
+                        <filename>non-hardware.kcf</filename>).
+                        </para></listitem>
+                    <listitem><para><filename>non-hardware.cfg</filename>:
+                        Specifies a list of kernel
+                        <filename>CONFIG_</filename> options that are
+                        not hardware, regardless of whether or not they are
+                        within a Kconfig file specified by a hardware or
+                        non-hardware Kconfig file (i.e.
+                        <filename>hardware.kcf</filename> or
+                        <filename>non-hardware.kcf</filename>).
+                        </para></listitem>
+                </itemizedlist>
+                Here is a specific example using the
+                <filename>kernel-cache/bsp/mti-malta32/hardware.cfg</filename>:
+                <literallayout class='monospaced'>
+     CONFIG_SERIAL_8250
+     CONFIG_SERIAL_8250_CONSOLE
+     CONFIG_SERIAL_8250_NR_UARTS
+     CONFIG_SERIAL_8250_PCI
+     CONFIG_SERIAL_CORE
+     CONFIG_SERIAL_CORE_CONSOLE
+     CONFIG_VGA_ARB
+                </literallayout>
+                The kernel configuration audit automatically detects these
+                files (hence the names must be exactly the ones discussed here),
+                and uses them as inputs when generating warnings about the
+                final <filename>.config</filename> file.
+            </para>
+
+            <para>
+                A user-specified kernel Metadata repository, or recipe space
+                feature, can use these same files to classify options that are
+                found within its <filename>.cfg</filename> files as hardware
+                or non-hardware, to prevent the OpenEmbedded build system from
+                producing an error or warning when an option is not in the
+                final <filename>.config</filename> file.
+            </para>
+        </section>
     </section>
 
     <section id="patching-the-kernel">
@@ -5305,14 +5512,14 @@
                         <filename>poky/build/conf</filename> directory needs to have the path to your local
                         <filename>meta-mylayer</filename> layer.
                         By default, the <filename>BBLAYERS</filename> variable contains paths to
-                        <filename>meta</filename>, <filename>meta-yocto</filename>, and
+                        <filename>meta</filename>, <filename>meta-poky</filename>, and
                         <filename>meta-yocto-bsp</filename> in the
                         <filename>poky</filename> Git repository.
                         Add the path to your <filename>meta-mylayer</filename> location:
                         <literallayout class='monospaced'>
      BBLAYERS ?= " \
        $HOME/poky/meta \
-       $HOME/poky/meta-yocto \
+       $HOME/poky/meta-poky \
        $HOME/poky/meta-yocto-bsp \
        $HOME/poky/meta-mylayer \
        "
@@ -5416,10 +5623,6 @@
                     "<ulink url='http://elinux.org/images/6/6f/Security-issues.pdf'>Security Issues for Embedded Devices</ulink>"</emphasis>
                     by Jake Edge
                     </para></listitem>
-                <listitem><para><emphasis>
-                    "<ulink url='https://www.nccgroup.com/media/18475/exploiting_security_gateways_via_their_web_interfaces.pdf'>They ought to know better: Exploiting Security Gateways via their Web Interfaces</ulink>"</emphasis>
-                    by Ben Williams
-                    </para></listitem>
             </itemizedlist>
         </para>
 
@@ -5785,7 +5988,7 @@
             By default, <filename>TEMPLATECONF</filename> is set as
             follows in the <filename>poky</filename> repository:
             <literallayout class='monospaced'>
-     TEMPLATECONF=${TEMPLATECONF:-meta-yocto/conf}
+     TEMPLATECONF=${TEMPLATECONF:-meta-poky/conf}
             </literallayout>
             This is the directory used by the build system to find templates
             from which to build some key configuration files.
@@ -5837,7 +6040,7 @@
         <para>
             Aside from the <filename>*.sample</filename> configuration files,
             the <filename>conf-notes.txt</filename> also resides in the
-            default <filename>meta-yocto/conf</filename> directory.
+            default <filename>meta-poky/conf</filename> directory.
             The scripts that set up the build environment
             (i.e.
             <ulink url="&YOCTO_DOCS_REF_URL;#structure-core-script"><filename>&OE_INIT_FILE;</filename></ulink>
@@ -5860,7 +6063,6 @@
          core-image-minimal
          core-image-sato
          meta-toolchain
-         adt-installer
          meta-ide-support
             </literallayout>
         </para>
@@ -7544,13 +7746,16 @@
                             Consequently, you usually need to add a
                             cross-compilation function to the package.
                             </para>
+
                             <para>Many packages based on Automake compile and
                             run the test suite by using a single command
                             such as <filename>make check</filename>.
-                            However, the native <filename>make check</filename>
+                            However, the host <filename>make check</filename>
                             builds and runs on the same computer, while
                             cross-compiling requires that the package is built
-                            on the host but executed on the target.
+                            on the host but executed for the target
+                            architecture (though often, as in the case for
+                            ptest, the execution occurs on the host).
                             The built version of Automake that ships with the
                             Yocto Project includes a patch that separates
                             building and execution.
@@ -7999,21 +8204,22 @@
             This line pulls in the listed include file that contains
             numerous lines of exactly that form:
             <literallayout class='monospaced'>
+     #SRCREV_pn-opkg-native ?= "${AUTOREV}"
+     #SRCREV_pn-opkg-sdk ?= "${AUTOREV}"
+     #SRCREV_pn-opkg ?= "${AUTOREV}"
+     #SRCREV_pn-opkg-utils-native ?= "${AUTOREV}"
+     #SRCREV_pn-opkg-utils ?= "${AUTOREV}"
      SRCREV_pn-gconf-dbus ?= "${AUTOREV}"
      SRCREV_pn-matchbox-common ?= "${AUTOREV}"
      SRCREV_pn-matchbox-config-gtk ?= "${AUTOREV}"
      SRCREV_pn-matchbox-desktop ?= "${AUTOREV}"
      SRCREV_pn-matchbox-keyboard ?= "${AUTOREV}"
-     SRCREV_pn-matchbox-panel ?= "${AUTOREV}"
      SRCREV_pn-matchbox-panel-2 ?= "${AUTOREV}"
      SRCREV_pn-matchbox-themes-extra ?= "${AUTOREV}"
      SRCREV_pn-matchbox-terminal ?= "${AUTOREV}"
      SRCREV_pn-matchbox-wm ?= "${AUTOREV}"
-     SRCREV_pn-matchbox-wm-2 ?= "${AUTOREV}"
      SRCREV_pn-settings-daemon ?= "${AUTOREV}"
      SRCREV_pn-screenshot ?= "${AUTOREV}"
-     SRCREV_pn-libfakekey ?= "${AUTOREV}"
-     SRCREV_pn-oprofileui ?= "${AUTOREV}"
           .
           .
           .
@@ -8134,7 +8340,8 @@
                         specific to or dependent on the target
                         architecture:</emphasis>
                         You can work around these attempts by using native
-                        tools to accomplish the same tasks, or
+                        tools, which run on the host system,
+                        to accomplish the same tasks, or
                         by alternatively running the processes under QEMU,
                         which has the <filename>qemu_run_binary</filename>
                         function.
@@ -9080,11 +9287,8 @@
                 Before you can initiate a remote debugging session, you need
                 to be sure you have set up the cross-development environment,
                 toolchain, and sysroot.
-                The "<ulink url='&YOCTO_DOCS_ADT_URL;#adt-prepare'>Preparing for Application Development</ulink>"
-                chapter of the Yocto Project Application Developer's Guide
+                The <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>
                 describes this process.
-                Be sure you have read that chapter and have set up
-                your environment.
             </para>
         </section>
 
@@ -9193,9 +9397,8 @@
                     location is at <filename>/opt/poky/&DISTRO;</filename>
                     and begins with the string "environment-setup".
                     For more information, see the
-                    "<ulink url='&YOCTO_DOCS_ADT_URL;#setting-up-the-cross-development-environment'>Setting Up the Cross-Development Environment</ulink>"
-                    section in the Yocto Project Application Developer's
-                    Guide.
+                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's
+                    Guide</ulink>.
                 </para>
 
                 <para>
@@ -9533,6 +9736,7 @@
         </section>
     </section>
 
+<!--
     <section id="platdev-oprofile">
         <title>Profiling with OProfile</title>
 
@@ -9594,14 +9798,14 @@
 
             <para>
                 <literallayout class='monospaced'>
-     # opcontrol --reset
-     # opcontrol --start --separate=lib --no-vmlinux -c 5
+     # opcontrol &dash;&dash;reset
+     # opcontrol &dash;&dash;start &dash;&dash;separate=lib &dash;&dash;no-vmlinux -c 5
               .
               .
         [do whatever is being profiled]
               .
               .
-     # opcontrol --stop
+     # opcontrol &dash;&dash;stop
      $ opreport -cl
                 </literallayout>
             </para>
@@ -9614,7 +9818,7 @@
                 five levels deep.
                 <note>
                     To profile the kernel, you would specify the
-                    <filename>--vmlinux=/path/to/vmlinux</filename> option.
+                    <filename>&dash;&dash;vmlinux=/path/to/vmlinux</filename> option.
                     The <filename>vmlinux</filename> file is usually in the source directory in the
                     <filename>/boot/</filename> directory and must match the running kernel.
                 </note>
@@ -9677,7 +9881,7 @@
                     With this connection, you just need to run "oprofile-server" on the device.
                     By default, OProfile listens on port 4224.
                     <note>
-                        You can change the port using the <filename>--port</filename> command-line
+                        You can change the port using the <filename>&dash;&dash;port</filename> command-line
                         option.
                     </note>
                 </para>
@@ -9767,14 +9971,14 @@
                     If network access to the target is unavailable, you can generate
                     an archive for processing in <filename>oprofile-viewer</filename> as follows:
                     <literallayout class='monospaced'>
-     # opcontrol --reset
-     # opcontrol --start --separate=lib --no-vmlinux -c 5
+     # opcontrol &dash;&dash;reset
+     # opcontrol &dash;&dash;start &dash;&dash;separate=lib &dash;&dash;no-vmlinux -c 5
             .
             .
      [do whatever is being profiled]
             .
             .
-     # opcontrol --stop
+     # opcontrol &dash;&dash;stop
      # oparchive -o my_archive
                     </literallayout>
                 </para>
@@ -9789,6 +9993,7 @@
             </section>
         </section>
     </section>
+-->
 
     <section id='maintaining-open-source-license-compliance-during-your-products-lifecycle'>
         <title>Maintaining Open Source License Compliance During Your Product's Lifecycle</title>
@@ -9937,10 +10142,33 @@
                 <literallayout class='monospaced'>
      COPY_LIC_MANIFEST = "1"
      COPY_LIC_DIRS = "1"
+     LICENSE_CREATE_PACKAGE = "1"
                 </literallayout>
                 Adding these statements to the configuration file ensures
                 that the licenses collected during package generation
                 are included on your image.
+                <note>
+                    <para>Setting all three variables to "1" results in the
+                    image having two copies of the same license file.
+                    One copy resides in
+                    <filename>/usr/share/common-licenses</filename> and
+                    the other resides in
+                    <filename>/usr/share/license</filename>.</para>
+
+                    <para>The reason for this behavior is because
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></ulink>
+                    and
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></ulink>
+                    add a copy of the license when the image is built but do not
+                    offer a path for adding licenses for newly installed packages
+                    to an image.
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></ulink>
+                    adds a separate package and an upgrade path for adding
+                    licenses to an image.</para>
+                </note>
+            </para>
+
+            <para>
                 As the source archiver has already archived the original
                 unmodified source that contains the license files,
                 you would have already met the requirements for inclusion
@@ -9979,8 +10207,8 @@
                 during your build.
                 Here is an example:
                 <literallayout class='monospaced'>
-     # We built using the &DISTRO_NAME; branch of the poky repo
-     $ git clone -b &DISTRO_NAME; git://git.yoctoproject.org/poky
+     # We built using the &DISTRO_NAME_NO_CAP; branch of the poky repo
+     $ git clone -b &DISTRO_NAME_NO_CAP; git://git.yoctoproject.org/poky
      $ cd poky
      # We built using the release_branch for our layers
      $ git clone -b release_branch git://git.mycompany.com/meta-my-bsp-layer
@@ -9990,7 +10218,7 @@
                 </literallayout>
                 One thing a development organization might want to consider
                 for end-user convenience is to modify
-                <filename>meta-yocto/conf/bblayers.conf.sample</filename> to
+                <filename>meta-poky/conf/bblayers.conf.sample</filename> to
                 ensure that when the end user utilizes the released build
                 system to build an image, the development organization's
                 layers are included in the <filename>bblayers.conf</filename>
@@ -10005,7 +10233,7 @@
 
      BBLAYERS ?= " \
        ##OEROOT##/meta \
-       ##OEROOT##/meta-yocto \
+       ##OEROOT##/meta-poky \
        ##OEROOT##/meta-yocto-bsp \
        ##OEROOT##/meta-mylayer \
        "
diff --git a/yocto-poky/documentation/dev-manual/dev-manual-intro.xml b/yocto-poky/documentation/dev-manual/dev-manual-intro.xml
index e350882..caa066e 100644
--- a/yocto-poky/documentation/dev-manual/dev-manual-intro.xml
+++ b/yocto-poky/documentation/dev-manual/dev-manual-intro.xml
@@ -29,8 +29,8 @@
         <para>
             The Yocto Project Development Manual does, however, provide
             guidance and examples on how to change the kernel source code,
-            reconfigure the kernel, and develop an application using the
-            popular <trademark class='trade'>Eclipse</trademark> IDE.
+            reconfigure the kernel, and develop an application using
+            <filename>devtool</filename>.
         </para>
 
         <note>
@@ -86,17 +86,21 @@
             <itemizedlist>
                 <listitem><para><emphasis>Step-by-step instructions when those instructions exist in other Yocto
                     Project documentation:</emphasis>
-                    For example, the Yocto Project Application Developer's Guide contains detailed
-                    instructions on how to run the
-                    <ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>ADT Installer</ulink>,
-                    which is used to set up a cross-development environment.</para></listitem>
+                    For example, the
+                    <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>
+                    manual contains detailed instructions on how to install an
+                    SDK, which is used to develop applications for target
+                    hardware.
+                    </para></listitem>
                 <listitem><para><emphasis>Reference material:</emphasis>
                     This type of material resides in an appropriate reference manual.
                     For example, system variables are documented in the
-                    <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>.</para></listitem>
+                    <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>.
+                    </para></listitem>
                 <listitem><para><emphasis>Detailed public information that is not specific to the Yocto Project:</emphasis>
                     For example, exhaustive information on how to use Git is covered better through the
-                    Internet than in this manual.</para></listitem>
+                    Internet than in this manual.
+                    </para></listitem>
             </itemizedlist>
         </para>
     </section>
@@ -126,10 +130,12 @@
                     The build system is sometimes referred to as "Poky".
                     </para></listitem>
                 <listitem><para><emphasis>
-                    <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>:</emphasis>
-                    This guide provides information that lets you get going with the Application
-                    Development Toolkit (ADT) and stand-alone cross-development toolchains to
-                    develop projects using the Yocto Project.
+                    <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>:</emphasis>
+                    This guide provides information that lets you get going
+                    with the standard or extensible SDK.
+                    An SDK, with its cross-development toolchains, allows you
+                    to develop projects inside or outside of the Yocto Project
+                    environment.
                     </para></listitem>
                 <listitem><para><emphasis>
                     <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:</emphasis>
@@ -169,11 +175,6 @@
                     release of the Yocto Project.
                     </para></listitem>
                 <listitem><para><emphasis>
-                    <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>:</emphasis>
-                    A graphical user interface for BitBake.
-                    Hob's primary goal is to enable a user to perform common tasks more easily.
-                    </para></listitem>
-                <listitem><para><emphasis>
                     <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/toaster'>Toaster</ulink>:</emphasis>
                     An Application Programming Interface (API) and web-based
                     interface to the OpenEmbedded build system, which uses
diff --git a/yocto-poky/documentation/dev-manual/dev-manual-model.xml b/yocto-poky/documentation/dev-manual/dev-manual-model.xml
index 6e42c7b..ff44a3f 100644
--- a/yocto-poky/documentation/dev-manual/dev-manual-model.xml
+++ b/yocto-poky/documentation/dev-manual/dev-manual-model.xml
@@ -27,11 +27,10 @@
              that you intend to run on target hardware.
              For information on how to set up your host development system for
              user-space application development, see the
-             <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>.
+             <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
              For a simple example of user-space application development using
              the <trademark class='trade'>Eclipse</trademark> IDE, see the
-             "<link linkend='application-development-workflow'>Application
-             Development Workflow</link>" section.
+             "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-developing-applications-using-eclipse'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></ulink>" section.
              </para></listitem>
          <listitem><para><emphasis>Temporary Source Code Modification:</emphasis>
              Direct modification of temporary source code is a convenient
@@ -48,14 +47,10 @@
              Toaster provides an efficient interface to the OpenEmbedded build
              that allows you to start builds and examine build statistics.
              </para></listitem>
-         <listitem><para><emphasis>Image Development using Hob:</emphasis>
-             You can use the <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>
-             to build custom operating system images within the build
-             environment.
-             Hob provides an efficient interface to the OpenEmbedded build system.
-             </para></listitem>
          <listitem><para><emphasis>Using a Development Shell:</emphasis>
-             You can use a <filename>devshell</filename> to efficiently debug
+             You can use a
+             <link linkend='platdev-appdev-devshell'><filename>devshell</filename></link>
+             to efficiently debug
              commands or simply edit packages.
              Working inside a development shell is a quick way to set up the
              OpenEmbedded build environment to work on parts of a project.
@@ -154,38 +149,60 @@
                     "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
                     section in the Yocto Project Board Support (BSP) Developer's Guide.
                     </para>
+
                     <para>
-                    Another example that illustrates a layer is an application.
-                    Suppose you are creating an application that has library or other dependencies in
-                    order for it to compile and run.
-                    The layer, in this case, would be where all the recipes that define those dependencies
-                    are kept.
-                    The key point for a layer is that it is an isolated area that contains
-                    all the relevant information for the project that the OpenEmbedded build
-                    system knows about.
-                    For more information on layers, see the
-                    "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>"
-                    section.
-                    For more information on BSP layers, see the
-                    "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" section in the
-                    Yocto Project Board Support Package (BSP) Developer's Guide.</para>
-                    <note>Five BSPs exist that are part of the
-                    Yocto Project release: <filename>genericx86</filename>, <filename>genericx86-64</filename>,
-                    <filename>beaglebone</filename> (ARM),
-                    <filename>mpc8315e</filename> (PowerPC),
-                    and <filename>edgerouter</filename> (MIPS).
-                    The recipes and configurations for these five BSPs are located and dispersed
-                    within the <link linkend='source-directory'>Source Directory</link>.
-                    On the other hand, the <filename>meta-intel</filename> layer
-                    contains BSP layers for many supported BSPs (e.g.
-                    Crystal Forest, Emenlow, Fish River Island 2, Haswell,
-                    Jasper Forest, and so forth).
-                    Aside from the BSPs in the <filename>meta-intel</filename>
-                    layer, the
-                    <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink>
-                    contain additional BSP layers such as
-                    <filename>meta-minnow</filename> and
-                    <filename>meta-raspberrypi</filename>.</note>
+                        Another example that illustrates a layer
+                        is an application.
+                        Suppose you are creating an application that has
+                        library or other dependencies in order for it to
+                        compile and run.
+                        The layer, in this case, would be where all the
+                        recipes that define those dependencies are kept.
+                        The key point for a layer is that it is an isolated
+                        area that contains all the relevant information for
+                        the project that the OpenEmbedded build system knows
+                        about.
+                        For more information on layers, see the
+                        "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>"
+                        section.
+                        For more information on BSP layers, see the
+                        "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
+                        section in the Yocto Project Board Support Package (BSP)
+                        Developer's Guide.
+                        <note>
+                            <para>
+                                Five BSPs exist that are part of the Yocto Project release:
+                                <filename>beaglebone</filename> (ARM),
+                                <filename>mpc8315e</filename> (PowerPC),
+                                and <filename>edgerouter</filename> (MIPS).
+                                The recipes and configurations for these five BSPs
+                                are located and dispersed within the
+                                <link linkend='source-directory'>Source Directory</link>.
+                            </para>
+
+                            <para>
+                                Three core Intel BSPs exist as part of the Yocto
+                                Project release in the
+                                <filename>meta-intel</filename> layer:
+                                <itemizedlist>
+                                    <listitem><para><filename>intel-core2-32</filename>,
+                                        which is a BSP optimized for the Core2 family of CPUs
+                                        as well as all CPUs prior to the Silvermont core.
+                                        </para></listitem>
+                                    <listitem><para><filename>intel-corei7-64</filename>,
+                                        which is a BSP optimized for Nehalem and later
+                                        Core and Xeon CPUs as well as Silvermont and later
+                                        Atom CPUs, such as the Baytrail SoCs.
+                                        </para></listitem>
+                                    <listitem><para><filename>intel-quark</filename>,
+                                        which is a BSP optimized for the Intel Galileo
+                                        gen1 &amp; gen2 development boards.
+                                        </para></listitem>
+                                </itemizedlist>
+                            </para>
+                        </note>
+                    </para>
+
                     <para>When you set up a layer for a new BSP, you should follow a standard layout.
                     This layout is described in the
                     "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
@@ -296,18 +313,6 @@
                 the Yocto Project:
                 <itemizedlist>
                     <listitem><para><emphasis>
-                        <filename>linux-yocto-3.8</filename></emphasis> - The
-                        stable Yocto Project kernel to use with the Yocto
-                        Project Release 1.4. This kernel is based on the
-                        Linux 3.8 released kernel.
-                        </para></listitem>
-                    <listitem><para><emphasis>
-                        <filename>linux-yocto-3.10</filename></emphasis> - An
-                        additional, unsupported Yocto Project kernel used with
-                        the Yocto Project Release 1.5.
-                        This kernel is based on the Linux 3.10 released kernel.
-                        </para></listitem>
-                    <listitem><para><emphasis>
                         <filename>linux-yocto-3.14</filename></emphasis> - The
                         stable Yocto Project kernel to use with the Yocto
                         Project Releases 1.6 and 1.7.
@@ -326,11 +331,35 @@
                         This kernel is based on the Linux 3.19 released kernel.
                         </para></listitem>
                     <listitem><para><emphasis>
+                        <filename>linux-yocto-4.1</filename></emphasis> - The
+                        stable Yocto Project kernel to use with the Yocto
+                        Project Release 2.0.
+                        This kernel is based on the Linux 4.1 released kernel.
+                        </para></listitem>
+                    <listitem><para><emphasis>
+                        <filename>linux-yocto-4.4</filename></emphasis> - The
+                        stable Yocto Project kernel to use with the Yocto
+                        Project Release 2.1.
+                        This kernel is based on the Linux 4.4 released kernel.
+                        </para></listitem>
+                    <listitem><para><emphasis>
                         <filename>linux-yocto-dev</filename></emphasis> - A
                         development kernel based on the latest upstream release
                         candidate available.
                         </para></listitem>
                 </itemizedlist>
+                <note>
+                    Long Term Support Initiative (LTSI) for Yocto Project kernels
+                    is as follows:
+                    <itemizedlist>
+                        <listitem><para>For Yocto Project releases 1.7, 1.8, and 2.0,
+                            the LTSI kernel is <filename>linux-yocto-3.14</filename>.
+                            </para></listitem>
+                        <listitem><para>For Yocto Project release 2.1, the
+                            LTSI kernel is <filename>linux-yocto-4.1</filename>.
+                            </para></listitem>
+                    </itemizedlist>
+                </note>
             </para>
 
             <para>
@@ -535,1161 +564,18 @@
     </section>
 </section>
 
-<section id='application-development-workflow'>
-    <title>Application Development Workflow</title>
+<section id='application-development-workflow-using-an-sdk'>
+    <title>Application Development Workflow Using an SDK</title>
 
     <para>
-        Application development involves creating an application that you want
-        to run on your target hardware, which is running a kernel image created using the
-        OpenEmbedded build system.
-        The Yocto Project provides an
-        <ulink url='&YOCTO_DOCS_ADT_URL;#adt-intro'>Application Development Toolkit (ADT)</ulink>
-        and stand-alone
-        <ulink url='&YOCTO_DOCS_ADT_URL;#the-cross-development-toolchain'>cross-development toolchains</ulink>
-        that facilitate quick development and integration of your application into its runtime environment.
-        Using the ADT and toolchains, you can compile and link your application.
-        You can then deploy your application to the actual hardware or to the QEMU emulator for testing.
-        If you are familiar with the popular <trademark class='trade'>Eclipse</trademark> IDE,
-        you can use an Eclipse Yocto Plug-in to
-        allow you to develop, deploy, and test your application all from within Eclipse.
+        Standard and extensible Software Development Kits (SDK) make it easy
+        to develop applications inside or outside of the Yocto Project
+        development environment.
+        Tools exist to help the application developer during any phase
+        of development.
+        For information on how to install and use an SDK, see the
+        <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
     </para>
-
-    <para>
-        While we strongly suggest using the ADT to develop your application, this option might not
-        be best for you.
-        If this is the case, you can still use pieces of the Yocto Project for your development process.
-        However, because the process can vary greatly, this manual does not provide detail on the process.
-    </para>
-
-    <section id='workflow-using-the-adt-and-eclipse'>
-        <title>Workflow Using the ADT and <trademark class='trade'>Eclipse</trademark></title>
-
-        <para>
-            To help you understand how application development works using the ADT, this section
-            provides an overview of the general development process and a detailed example of the process
-            as it is used from within the Eclipse IDE.
-        </para>
-
-        <para>
-            The following illustration and list summarize the application development general workflow.
-        </para>
-
-        <para>
-            <imagedata fileref="figures/app-dev-flow.png"
-                width="7in" depth="8in" align="center" scale="100" />
-        </para>
-
-        <para>
-            <orderedlist>
-                <listitem><para><emphasis>Prepare the host system for the Yocto Project</emphasis>:
-                    See
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
-                    and
-                    "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>" sections both
-                    in the Yocto Project Reference Manual for requirements.
-                    In particular, be sure your host system has the
-                    <filename>xterm</filename> package installed.
-                    </para></listitem>
-                <listitem><para><emphasis>Secure the Yocto Project kernel target image</emphasis>:
-                    You must have a target kernel image that has been built using the OpenEmbedded
-                    build system.</para>
-                    <para>Depending on whether the Yocto Project has a pre-built image that matches your target
-                    architecture and where you are going to run the image while you develop your application
-                    (QEMU or real hardware), the area from which you get the image differs.
-                        <itemizedlist>
-                            <listitem><para>Download the image from
-                                <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
-                                if your target architecture is supported and you are going to develop
-                                and test your application on actual hardware.</para></listitem>
-                            <listitem><para>Download the image from
-                                <ulink url='&YOCTO_QEMU_DL_URL;'>
-                                <filename>machines/qemu</filename></ulink> if your target architecture is supported
-                                and you are going to develop and test your application using the QEMU
-                                emulator.</para></listitem>
-                            <listitem><para>Build your image if you cannot find a pre-built image that matches
-                                your target architecture.
-                                If your target architecture is similar to a supported architecture, you can
-                                modify the kernel image before you build it.
-                                See the
-                                "<link linkend='patching-the-kernel'>Patching the Kernel</link>"
-                                section for an example.</para></listitem>
-                        </itemizedlist></para>
-                    <para>For information on pre-built kernel image naming schemes for images
-                    that can run on the QEMU emulator, see the
-                    "<ulink url='&YOCTO_DOCS_QS_URL;#downloading-the-pre-built-linux-kernel'>Downloading the Pre-Built Linux Kernel</ulink>"
-                    section in the Yocto Project Application Developer's Guide.</para></listitem>
-                <listitem><para><emphasis>Install the ADT</emphasis>:
-                    The ADT provides a target-specific cross-development toolchain, the root filesystem,
-                    the QEMU emulator, and other tools that can help you develop your application.
-                    While it is possible to get these pieces separately, the ADT Installer provides an
-                    easy, inclusive method.
-                    You can get these pieces by running an ADT installer script, which is configurable.
-                    For information on how to install the ADT, see the
-                    "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Using the ADT Installer</ulink>"
-                    section
-                    in the Yocto Project Application Developer's Guide.</para></listitem>
-                <listitem><para><emphasis>If applicable, secure the target root filesystem
-                    and the Cross-development toolchain</emphasis>:
-                    If you choose not to install the ADT using the ADT Installer,
-                    you need to find and download the appropriate root filesystem and
-                    the cross-development toolchain.</para>
-                    <para>You can find the tarballs for the root filesystem in the same area used
-                    for the kernel image.
-                    Depending on the type of image you are running, the root filesystem you need differs.
-                    For example, if you are developing an application that runs on an image that
-                    supports Sato, you need to get a root filesystem that supports Sato.</para>
-                    <para>You can find the cross-development toolchains at
-                    <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'><filename>toolchains</filename></ulink>.
-                    Be sure to get the correct toolchain for your development host and your
-                    target architecture.
-                    See the "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>"
-                    section in the Yocto Project Application Developer's Guide for information
-                    and the
-                    "<ulink url='&YOCTO_DOCS_QS_URL;#installing-the-toolchain'>Installing the Toolchain</ulink>"
-                    in the Yocto Project Application Developer's Guide for information on finding and installing
-                    the correct toolchain based on your host development system and your target
-                    architecture.
-                    </para></listitem>
-                <listitem><para><emphasis>Create and build your application</emphasis>:
-                    At this point, you need to have source files for your application.
-                    Once you have the files, you can use the Eclipse IDE to import them and build the
-                    project.
-                    If you are not using Eclipse, you need to use the cross-development tools you have
-                    installed to create the image.</para></listitem>
-                <listitem><para><emphasis>Deploy the image with the application</emphasis>:
-                    If you are using the Eclipse IDE, you can deploy your image to the hardware or to
-                    QEMU through the project's preferences.
-                    If you are not using the Eclipse IDE, then you need to deploy the application
-                    to the hardware using other methods.
-                    Or, if you are using QEMU, you need to use that tool and
-                    load your image in for testing.
-                    See the
-                    "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
-                    chapter for information on using QEMU.
-                    </para></listitem>
-                <listitem><para><emphasis>Test and debug the application</emphasis>:
-                    Once your application is deployed, you need to test it.
-                    Within the Eclipse IDE, you can use the debugging environment along with the
-                    set of user-space tools installed along with the ADT to debug your application.
-                    Of course, the same user-space tools are available separately if you choose
-                    not to use the Eclipse IDE.</para></listitem>
-           </orderedlist>
-        </para>
-    </section>
-
-    <section id='adt-eclipse'>
-        <title>Working Within Eclipse</title>
-
-        <para>
-            The Eclipse IDE is a popular development environment and it fully
-            supports development using the Yocto Project.
-            <note>
-                This release of the Yocto Project supports both the Luna
-                and Kepler versions of the Eclipse IDE.
-                Thus, the following information provides setup information for
-                both versions.
-            </note>
-        </para>
-
-        <para>
-            When you install and configure the Eclipse Yocto Project Plug-in
-            into the Eclipse IDE, you maximize your Yocto Project experience.
-            Installing and configuring the Plug-in results in an environment
-            that has extensions specifically designed to let you more easily
-            develop software.
-            These extensions allow for cross-compilation, deployment, and
-            execution of your output into a QEMU emulation session as well as
-            actual target hardware.
-            You can also perform cross-debugging and profiling.
-            The environment also supports a suite of tools that allows you
-            to perform remote profiling, tracing, collection of power data,
-            collection of latency data, and collection of performance data.
-        </para>
-
-        <para>
-            This section describes how to install and configure the Eclipse IDE
-            Yocto Plug-in and how to use it to develop your application.
-        </para>
-
-        <section id='setting-up-the-eclipse-ide'>
-            <title>Setting Up the Eclipse IDE</title>
-
-            <para>
-                To develop within the Eclipse IDE, you need to do the following:
-                <orderedlist>
-                    <listitem><para>Install the optimal version of the Eclipse
-                       IDE.</para></listitem>
-                    <listitem><para>Configure the Eclipse IDE.
-                       </para></listitem>
-                    <listitem><para>Install the Eclipse Yocto Plug-in.
-                       </para></listitem>
-                    <listitem><para>Configure the Eclipse Yocto Plug-in.
-                       </para></listitem>
-                </orderedlist>
-                <note>
-                    Do not install Eclipse from your distribution's package
-                    repository.
-                    Be sure to install Eclipse from the official Eclipse
-                    download site as directed in the next section.
-                </note>
-            </para>
-
-            <section id='installing-eclipse-ide'>
-                <title>Installing the Eclipse IDE</title>
-
-                <para>
-                    It is recommended that you have the Luna SR2 (4.4.2)
-                    version of the Eclipse IDE installed on your development
-                    system.
-                    However, if you currently have the Kepler 4.3.2 version
-                    installed and you do not want to upgrade the IDE, you can
-                    configure Kepler to work with the Yocto Project.
-                </para>
-
-                <para>
-                    If you do not have the Luna SR2 (4.4.2) Eclipse IDE
-                    installed, you can find the tarball at
-                    <ulink url='&ECLIPSE_MAIN_URL;'></ulink>.
-                    From that site, choose the appropriate download from the
-                    "Eclipse IDE for C/C++ Developers".
-                    This version contains the Eclipse Platform, the Java
-                    Development Tools (JDT), and the Plug-in Development
-                    Environment.
-                </para>
-
-                <para>
-                    Once you have downloaded the tarball, extract it into a
-                    clean directory.
-                    For example, the following commands unpack and install the
-                    downloaded Eclipse IDE tarball into a clean directory
-                    using the default name <filename>eclipse</filename>:
-                    <literallayout class='monospaced'>
-     $ cd ~
-     $ tar -xzvf ~/Downloads/eclipse-cpp-luna-SR2-linux-gtk-x86_64.tar.gz
-                    </literallayout>
-                </para>
-            </section>
-
-            <section id='configuring-the-eclipse-ide'>
-                <title>Configuring the Eclipse IDE</title>
-
-                <para>
-                    This section presents the steps needed to configure the
-                    Eclipse IDE.
-                </para>
-
-                <para>
-                    Before installing and configuring the Eclipse Yocto Plug-in,
-                    you need to configure the Eclipse IDE.
-                    Follow these general steps:
-                    <orderedlist>
-                        <listitem><para>Start the Eclipse IDE.</para></listitem>
-                        <listitem><para>Make sure you are in your Workbench and
-                            select "Install New Software" from the "Help"
-                            pull-down menu.</para></listitem>
-                        <listitem><para>Select
-                            <filename>Luna - &ECLIPSE_LUNA_URL;</filename>
-                            from the "Work with:" pull-down menu.
-                            <note>
-                                For Kepler, select
-                                <filename>Kepler - &ECLIPSE_KEPLER_URL;</filename>
-                            </note>
-                            </para></listitem>
-                        <listitem><para>Expand the box next to "Linux Tools"
-                            and select the
-                            <filename>Linux Tools LTTng Tracer Control</filename>,
-                            <filename>Linux Tools LTTng Userspace Analysis</filename>,
-                            and
-                            <filename>LTTng Kernel Analysis</filename> boxes.
-                            If these selections do not appear in the list,
-                            that means the items are already installed.
-                            <note>
-                                For Kepler, select
-                                <filename>LTTng - Linux Tracing Toolkit</filename>
-                                box.
-                            </note>
-                            </para></listitem>
-                        <listitem><para>Expand the box next to "Mobile and
-                            Device Development" and select the following boxes.
-                            Again, if any of the following items are not
-                            available for selection, that means the items are
-                            already installed:
-                            <itemizedlist>
-                                <listitem><para><filename>C/C++ Remote Launch (Requires RSE Remote System Explorer)</filename></para></listitem>
-                                <listitem><para><filename>Remote System Explorer End-user Runtime</filename></para></listitem>
-                                <listitem><para><filename>Remote System Explorer User Actions</filename></para></listitem>
-                                <listitem><para><filename>Target Management Terminal (Core SDK)</filename></para></listitem>
-                                <listitem><para><filename>TCF Remote System Explorer add-in</filename></para></listitem>
-                                <listitem><para><filename>TCF Target Explorer</filename></para></listitem>
-                            </itemizedlist></para></listitem>
-                        <listitem><para>Expand the box next to "Programming
-                            Languages" and select the
-                            <filename>C/C++ Autotools Support</filename>
-                            and <filename>C/C++ Development Tools</filename>
-                            boxes.
-                            For Luna, these items do not appear on the list
-                            as they are already installed.
-                            </para></listitem>
-                        <listitem><para>Complete the installation and restart
-                            the Eclipse IDE.</para></listitem>
-                    </orderedlist>
-                </para>
-            </section>
-
-            <section id='installing-the-eclipse-yocto-plug-in'>
-                <title>Installing or Accessing the Eclipse Yocto Plug-in</title>
-
-                <para>
-                    You can install the Eclipse Yocto Plug-in into the Eclipse
-                    IDE one of two ways:  use the Yocto Project's Eclipse
-                    Update site to install the pre-built plug-in or build and
-                    install the plug-in from the latest source code.
-                </para>
-
-                <section id='new-software'>
-                    <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
-
-                    <para>
-                        To install the Eclipse Yocto Plug-in from the update
-                        site, follow these steps:
-                        <orderedlist>
-                            <listitem><para>Start up the Eclipse IDE.
-                                </para></listitem>
-                            <listitem><para>In Eclipse, select "Install New
-                                Software" from the "Help" menu.
-                                </para></listitem>
-                            <listitem><para>Click "Add..." in the "Work with:"
-                                area.</para></listitem>
-                           <listitem><para>Enter
-                                <filename>&ECLIPSE_DL_PLUGIN_URL;/luna</filename>
-                                in the URL field and provide a meaningful name
-                                in the "Name" field.
-                                <note>
-                                    If you are using Kepler, use
-                                    <filename>&ECLIPSE_DL_PLUGIN_URL;/kepler</filename>
-                                    in the URL field.
-                                </note></para></listitem>
-                            <listitem><para>Click "OK" to have the entry added
-                                to the "Work with:" drop-down list.
-                                </para></listitem>
-                            <listitem><para>Select the entry for the plug-in
-                                from the "Work with:" drop-down list.
-                                </para></listitem>
-                            <listitem><para>Check the boxes next to
-                                <filename>Yocto Project ADT Plug-in</filename>,
-                                <filename>Yocto Project Bitbake Commander Plug-in</filename>,
-                                and
-                                <filename>Yocto Project Documentation plug-in</filename>.
-                                </para></listitem>
-                            <listitem><para>Complete the remaining software
-                                installation steps and then restart the Eclipse
-                                IDE to finish the installation of the plug-in.
-                                <note>
-                                    You can click "OK" when prompted about
-                                    installing software that contains unsigned
-                                    content.
-                                </note>
-                                </para></listitem>
-                        </orderedlist>
-                    </para>
-                </section>
-
-               <section id='zip-file-method'>
-                   <title>Installing the Plug-in Using the Latest Source Code</title>
-
-                   <para>
-                        To install the Eclipse Yocto Plug-in from the latest
-                        source code, follow these steps:
-                        <orderedlist>
-                            <listitem><para>Be sure your development system
-                                is not using OpenJDK to build the plug-in
-                                by doing the following:
-                                <orderedlist>
-                                    <listitem><para>Use the Oracle JDK.
-                                        If you don't have that, go to
-                                        <ulink url='http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html'></ulink>
-                                        and download the latest appropriate
-                                        Java SE Development Kit tarball for
-                                        your development system and
-                                        extract it into your home directory.
-                                        </para></listitem>
-                                    <listitem><para>In the shell you are going
-                                        to do your work, export the location of
-                                        the Oracle Java.
-                                        The previous step creates a new folder
-                                        for the extracted software.
-                                        You need to use the following
-                                        <filename>export</filename> command
-                                        and provide the specific location:
-                                        <literallayout class='monospaced'>
-     export PATH=~/<replaceable>extracted_jdk_location</replaceable>/bin:$PATH
-                                        </literallayout>
-                                        </para></listitem>
-                                </orderedlist>
-                                </para></listitem>
-                            <listitem><para>In the same shell, create a Git
-                                repository with:
-                                <literallayout class='monospaced'>
-     $ cd ~
-     $ git clone git://git.yoctoproject.org/eclipse-poky
-                                </literallayout>
-                                </para></listitem>
-                            <listitem><para>Be sure to checkout the correct
-                                tag.
-                                For example, if you are using Luna, do the
-                                following:
-                                <literallayout class='monospaced'>
-     $ git checkout luna/yocto-&DISTRO;
-                                </literallayout>
-                                This puts you in a detached HEAD state, which
-                                is fine since you are only going to be building
-                                and not developing.
-                                <note>
-                                    If you are building kepler, checkout the
-                                    <filename>kepler/yocto-&DISTRO;</filename>
-                                    branch.
-                                </note>
-                                </para></listitem>
-                            <listitem><para>Change to the
-                                <filename>scripts</filename>
-                                directory within the Git repository:
-                                <literallayout class='monospaced'>
-     $ cd scripts
-                                </literallayout>
-                                </para></listitem>
-                            <listitem><para>Set up the local build environment
-                                by running the setup script:
-                                <literallayout class='monospaced'>
-     $ ./setup.sh
-                                </literallayout>
-                                </para></listitem>
-                            <listitem><para>When the script finishes execution,
-                                it prompts you with instructions on how to run
-                                the <filename>build.sh</filename> script, which
-                                is also in the <filename>scripts</filename>
-                                directory of the Git repository created
-                                earlier.
-                                </para></listitem>
-                            <listitem><para>Run the <filename>build.sh</filename>
-                                script as directed.
-                                Be sure to provide the tag name, documentation
-                                branch, and a release name.
-                                Here is an example that uses the
-                                <filename>luna/yocto-&DISTRO;</filename> tag, the
-                                <filename>master</filename> documentation
-                                branch, and
-                                <filename>&DISTRO_NAME;</filename> for the
-                                release name:
-                                <literallayout class='monospaced'>
-     $ ECLIPSE_HOME=/home/scottrif/eclipse-poky/scripts/eclipse ./build.sh luna/yocto-&DISTRO; master &DISTRO_NAME; 2>&amp;1 | tee -a build.log
-                                </literallayout>
-                                After running the script, the file
-                                <filename>org.yocto.sdk-</filename><replaceable>release</replaceable><filename>-</filename><replaceable>date</replaceable><filename>-archive.zip</filename>
-                                is in the current directory.
-                                </para></listitem>
-                            <listitem><para>If necessary, start the Eclipse IDE
-                                and be sure you are in the Workbench.
-                                </para></listitem>
-                            <listitem><para>Select "Install New Software" from
-                                the "Help" pull-down menu.
-                                </para></listitem>
-                            <listitem><para>Click "Add".</para></listitem>
-                            <listitem><para>Provide anything you want in the
-                                "Name" field.
-                                </para></listitem>
-                            <listitem><para>Click "Archive" and browse to the
-                                ZIP file you built in step eight.
-                                This ZIP file should not be "unzipped", and must
-                                be the <filename>*archive.zip</filename> file
-                                created by running the
-                                <filename>build.sh</filename> script.
-                                </para></listitem>
-                            <listitem><para>Click the "OK" button.
-                                </para></listitem>
-                            <listitem><para>Check the boxes that appear in
-                                the installation window to install the
-                                <filename>Yocto Project ADT Plug-in</filename>,
-                                <filename>Yocto Project Bitbake Commander Plug-in</filename>,
-                                and the
-                                <filename>Yocto Project Documentation plug-in</filename>.
-                                </para></listitem>
-                            <listitem><para>Finish the installation by clicking
-                                through the appropriate buttons.
-                                You can click "OK" when prompted about
-                                installing software that contains unsigned
-                                content.
-                                </para></listitem>
-                            <listitem><para>Restart the Eclipse IDE if
-                                necessary.
-                                </para></listitem>
-                        </orderedlist>
-                    </para>
-
-                    <para>
-                        At this point you should be able to configure the
-                        Eclipse Yocto Plug-in as described in the
-                        "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>"
-                        section.</para>
-                </section>
-            </section>
-
-            <section id='configuring-the-eclipse-yocto-plug-in'>
-                <title>Configuring the Eclipse Yocto Plug-in</title>
-
-                <para>
-                    Configuring the Eclipse Yocto Plug-in involves setting the
-                    Cross Compiler options and the Target options.
-                    The configurations you choose become the default settings
-                    for all projects.
-                    You do have opportunities to change them later when
-                    you configure the project (see the following section).
-                </para>
-
-                <para>
-                    To start, you need to do the following from within the
-                    Eclipse IDE:
-                    <itemizedlist>
-                        <listitem><para>Choose "Preferences" from the
-                            "Window" menu to display the Preferences Dialog.
-                            </para></listitem>
-                        <listitem><para>Click "Yocto Project ADT" to display
-                            the configuration screen.
-                            </para></listitem>
-                    </itemizedlist>
-                </para>
-
-                <section id='configuring-the-cross-compiler-options'>
-                    <title>Configuring the Cross-Compiler Options</title>
-
-                    <para>
-                        To configure the Cross Compiler Options, you must select
-                        the type of toolchain, point to the toolchain, specify
-                        the sysroot location, and select the target
-                        architecture.
-                        <itemizedlist>
-                            <listitem><para><emphasis>Selecting the Toolchain Type:</emphasis>
-                                Choose between
-                                <filename>Standalone pre-built toolchain</filename>
-                                and
-                                <filename>Build system derived toolchain</filename>
-                                for Cross Compiler Options.
-                                    <itemizedlist>
-                                        <listitem><para><emphasis>
-                                            <filename>Standalone Pre-built Toolchain:</filename></emphasis>
-                                            Select this mode when you are using
-                                            a stand-alone cross-toolchain.
-                                            For example, suppose you are an
-                                            application developer and do not
-                                            need to build a target image.
-                                            Instead, you just want to use an
-                                            architecture-specific toolchain on
-                                            an existing kernel and target root
-                                            filesystem.</para></listitem>
-                                       <listitem><para><emphasis>
-                                            <filename>Build System Derived Toolchain:</filename></emphasis>
-                                            Select this mode if the
-                                            cross-toolchain has been installed
-                                            and built as part of the
-                                            <link linkend='build-directory'>Build Directory</link>.
-                                            When you select
-                                            <filename>Build system derived toolchain</filename>,
-                                            you are using the toolchain bundled
-                                            inside the Build Directory.
-                                            </para></listitem>
-                                    </itemizedlist>
-                                </para></listitem>
-                            <listitem><para><emphasis>Point to the Toolchain:</emphasis>
-                                If you are using a stand-alone pre-built
-                                toolchain, you should be pointing to where it is
-                                installed.
-                                If you used the ADT Installer script and
-                                accepted the default installation directory, the
-                                toolchain will be installed in the
-                                <filename>&YOCTO_ADTPATH_DIR;</filename>
-                                directory.
-                                Sections "<ulink url='&YOCTO_DOCS_ADT_URL;#configuring-and-running-the-adt-installer-script'>Configuring and Running the ADT Installer Script</ulink>"
-                                and
-                                "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>"
-                                in the Yocto Project Application Developer's
-                                Guide describe how to install a stand-alone
-                                cross-toolchain.</para>
-                                <para>If you are using a system-derived
-                                toolchain, the path you provide for the
-                                <filename>Toolchain Root Location</filename>
-                                field is the
-                                <link linkend='build-directory'>Build Directory</link>.
-                                See the
-                                "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Build Directory</ulink>"
-                                section in the Yocto Project Application
-                                Developer's Guide for information on how to
-                                install the toolchain into the Build
-                                Directory.</para></listitem>
-                            <listitem><para><emphasis>Specify the Sysroot Location:</emphasis>
-                                This location is where the root filesystem for
-                                the target hardware resides.
-                                If you used the ADT Installer script and
-                                accepted the default installation directory,
-                                then the location in your home directory
-                                in a folder named
-                                <filename>test-yocto/</filename><replaceable>target_arch</replaceable>.
-                                Additionally, when you use the ADT Installer
-                                script, the
-                                <filename>/opt/poky/&DISTRO;/sysroots</filename>
-                                location is used for the QEMU
-                                user-space tools and the NFS boot process.
-                                </para>
-                                <para>If you used either of the other two
-                                methods to install the toolchain or did not
-                                accept the ADT Installer script's default
-                                installation directory, then the location of
-                                the sysroot filesystem depends on where you
-                                separately extracted and installed the
-                                filesystem.</para>
-                                <para>For information on how to install the
-                                toolchain and on how to extract and install the
-                                sysroot filesystem, see the
-                                "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
-                                section in the Yocto Project Application
-                                Developer's Guide.
-                                </para></listitem>
-                            <listitem><para><emphasis>Select the Target Architecture:</emphasis>
-                                The target architecture is the type of hardware
-                                you are going to use or emulate.
-                                Use the pull-down
-                                <filename>Target Architecture</filename> menu
-                                to make your selection.
-                                The pull-down menu should have the supported
-                                architectures.
-                                If the architecture you need is not listed in
-                                the menu, you will need to build the image.
-                                See the
-                                "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
-                                section of the Yocto Project Quick Start for
-                                more information.</para></listitem>
-                        </itemizedlist>
-                    </para>
-                </section>
-
-                <section id='configuring-the-target-options'>
-                    <title>Configuring the Target Options</title>
-
-                    <para>
-                        You can choose to emulate hardware using the QEMU
-                        emulator, or you can choose to run your image on actual
-                        hardware.
-                        <itemizedlist>
-                            <listitem><para><emphasis>QEMU:</emphasis>
-                                Select this option if you will be using the
-                                QEMU emulator.
-                                If you are using the emulator, you also need to
-                                locate the kernel and specify any custom
-                                options.</para>
-                                <para>If you selected
-                                <filename>Build system derived toolchain</filename>,
-                                the target kernel you built will be located in
-                                the Build Directory in
-                                <filename>tmp/deploy/images/<replaceable>machine</replaceable></filename>
-                                directory.
-                                If you selected
-                                <filename>Standalone pre-built toolchain</filename>,
-                                the pre-built image you downloaded is located
-                                in the directory you specified when you
-                                downloaded the image.</para>
-                                <para>Most custom options are for advanced QEMU
-                                users to further customize their QEMU instance.
-                                These options are specified between paired
-                                angled brackets.
-                                Some options must be specified outside the
-                                brackets.
-                                In particular, the options
-                                <filename>serial</filename>,
-                                <filename>nographic</filename>, and
-                                <filename>kvm</filename> must all be outside the
-                                brackets.
-                                Use the <filename>man qemu</filename> command
-                                to get help on all the options and their use.
-                                The following is an example:
-                               <literallayout class='monospaced'>
-    serial ‘&lt;-m 256 -full-screen&gt;’
-                                </literallayout></para>
-                                <para>
-                                Regardless of the mode, Sysroot is already
-                                defined as part of the Cross-Compiler Options
-                                configuration in the
-                                <filename>Sysroot Location:</filename> field.
-                                </para></listitem>
-                            <listitem><para><emphasis>External HW:</emphasis>
-                                Select this option if you will be using actual
-                                hardware.</para></listitem>
-                        </itemizedlist>
-                    </para>
-
-                    <para>
-                        Click the "OK" to save your plug-in configurations.
-                    </para>
-                </section>
-            </section>
-        </section>
-
-        <section id='creating-the-project'>
-            <title>Creating the Project</title>
-
-            <para>
-                You can create two types of projects:  Autotools-based, or
-                Makefile-based.
-                This section describes how to create Autotools-based projects
-                from within the Eclipse IDE.
-                For information on creating Makefile-based projects in a
-                terminal window, see the section
-                "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-command-line'>Using the Command Line</ulink>"
-                in the Yocto Project Application Developer's Guide.
-                <note>
-                    Do not use special characters in project names
-                    (e.g. spaces, underscores, etc.).  Doing so can
-                    cause configuration to fail.
-                </note>
-            </para>
-
-            <para>
-                To create a project based on a Yocto template and then display
-                the source code, follow these steps:
-                <orderedlist>
-                    <listitem><para>Select "Project" from the "File -> New" menu.
-                        </para></listitem>
-                    <listitem><para>Double click <filename>CC++</filename>.
-                        </para></listitem>
-                    <listitem><para>Double click <filename>C Project</filename>
-                        to create the project.</para></listitem>
-                    <listitem><para>Expand <filename>Yocto Project ADT Autotools Project</filename>.
-                        </para></listitem>
-                    <listitem><para>Select <filename>Hello World ANSI C Autotools Project</filename>.
-                        This is an Autotools-based project based on a Yocto
-                        template.</para></listitem>
-                    <listitem><para>Put a name in the <filename>Project name:</filename>
-                        field.
-                        Do not use hyphens as part of the name.
-                        </para></listitem>
-                    <listitem><para>Click "Next".</para></listitem>
-                    <listitem><para>Add information in the
-                        <filename>Author</filename> and
-                        <filename>Copyright notice</filename> fields.
-                        </para></listitem>
-                    <listitem><para>Be sure the <filename>License</filename>
-                        field is correct.</para></listitem>
-                    <listitem><para>Click "Finish".</para></listitem>
-                    <listitem><para>If the "open perspective" prompt appears,
-                        click "Yes" so that you in the C/C++ perspective.
-                        </para></listitem>
-                    <listitem><para>The left-hand navigation pane shows your
-                        project.
-                        You can display your source by double clicking the
-                        project's source file.</para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='configuring-the-cross-toolchains'>
-            <title>Configuring the Cross-Toolchains</title>
-
-            <para>
-                The earlier section,
-                "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>",
-                sets up the default project configurations.
-                You can override these settings for a given project by following
-                these steps:
-                <orderedlist>
-                    <listitem><para>Select "Change Yocto Project Settings" from
-                        the "Project" menu.
-                        This selection brings up the Yocto Project Settings
-                        Dialog and allows you to make changes specific to an
-                        individual project.</para>
-                        <para>By default, the Cross Compiler Options and Target
-                        Options for a project are inherited from settings you
-                        provided using the Preferences Dialog as described
-                        earlier in the
-                        "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>" section.
-                        The Yocto Project Settings Dialog allows you to override
-                        those default settings for a given project.
-                        </para></listitem>
-                    <listitem><para>Make your configurations for the project
-                        and click "OK".
-                        </para></listitem>
-                    <listitem><para>Right-click in the navigation pane and
-                        select "Reconfigure Project" from the pop-up menu.
-                        This selection reconfigures the project by running
-                        <filename>autogen.sh</filename> in the workspace for
-                        your project.
-                        The script also runs <filename>libtoolize</filename>,
-                        <filename>aclocal</filename>,
-                        <filename>autoconf</filename>,
-                        <filename>autoheader</filename>,
-                        <filename>automake --a</filename>, and
-                        <filename>./configure</filename>.
-                        Click on the "Console" tab beneath your source code to
-                        see the results of reconfiguring your project.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='building-the-project'>
-            <title>Building the Project</title>
-
-            <para>
-                To build the project select "Build Project" from the
-                "Project" menu.
-                The console should update and you can note the cross-compiler
-                you are using.
-                <note>
-                    When building "Yocto Project ADT Autotools" projects, the Eclipse
-                    IDE might display error messages for Functions/Symbols/Types
-                    that cannot be "resolved", even when the related include file
-                    is listed at the project navigator and when the project is
-                    able to build.
-                    For these cases only, it is recommended to add a new linked
-                    folder to the appropriate sysroot.
-                    Use these steps to add the linked folder:
-                    <orderedlist>
-                        <listitem><para>
-                            Select the project.
-                            </para></listitem>
-                        <listitem><para>
-                            Select "Folder" from the
-                            <filename>File > New</filename> menu.
-                            </para></listitem>
-                        <listitem><para>
-                            In the "New Folder" Dialog, select "Link to alternate
-                            location (linked folder)".
-                            </para></listitem>
-                        <listitem><para>
-                            Click "Browse" to navigate to the include folder inside
-                            the same sysroot location selected in the Yocto Project
-                            configuration preferences.
-                            </para></listitem>
-                        <listitem><para>
-                            Click "OK".
-                            </para></listitem>
-                        <listitem><para>
-                            Click "Finish" to save the linked folder.
-                            </para></listitem>
-                    </orderedlist>
-                </note>
-            </para>
-        </section>
-
-        <section id='starting-qemu-in-user-space-nfs-mode'>
-            <title>Starting QEMU in User-Space NFS Mode</title>
-
-            <para>
-                To start the QEMU emulator from within Eclipse, follow these
-                steps:
-                <note>
-                    See the
-                    "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
-                    chapter for more information on using QEMU.
-                </note>
-                <orderedlist>
-                    <listitem><para>Expose and select "External Tools" from
-                        the "Run" menu.
-                        Your image should appear as a selectable menu item.
-                        </para></listitem>
-                    <listitem><para>Select your image from the menu to launch
-                        the emulator in a new window.
-                        </para></listitem>
-                    <listitem><para>If needed, enter your host root password in
-                        the shell window at the prompt.
-                        This sets up a <filename>Tap 0</filename> connection
-                        needed for running in user-space NFS mode.
-                        </para></listitem>
-                    <listitem><para>Wait for QEMU to launch.</para></listitem>
-                    <listitem><para>Once QEMU launches, you can begin operating
-                        within that environment.
-                        One useful task at this point would be to determine the
-                        IP Address for the user-space NFS by using the
-                       <filename>ifconfig</filename> command.
-                       </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='deploying-and-debugging-the-application'>
-            <title>Deploying and Debugging the Application</title>
-
-            <para>
-                Once the QEMU emulator is running the image, you can deploy
-                your application using the Eclipse IDE and then use
-                the emulator to perform debugging.
-                Follow these steps to deploy the application.
-                <orderedlist>
-                    <listitem><para>Select "Debug Configurations..." from the
-                        "Run" menu.</para></listitem>
-                    <listitem><para>In the left area, expand
-                        <filename>C/C++Remote Application</filename>.
-                        </para></listitem>
-                    <listitem><para>Locate your project and select it to bring
-                        up a new tabbed view in the Debug Configurations Dialog.
-                        </para></listitem>
-                    <listitem><para>Enter the absolute path into which you want
-                        to deploy the application.
-                        Use the "Remote Absolute File Path for
-                        C/C++Application:" field.
-                        For example, enter
-                        <filename>/usr/bin/<replaceable>programname</replaceable></filename>.
-                        </para></listitem>
-                    <listitem><para>Click on the "Debugger" tab to see the
-                        cross-tool debugger you are using.</para></listitem>
-                    <listitem><para>Click on the "Main" tab.</para></listitem>
-                    <listitem><para>Create a new connection to the QEMU instance
-                        by clicking on "new".</para></listitem>
-                    <listitem><para>Select <filename>TCF</filename>, which means
-                        Target Communication Framework.</para></listitem>
-                    <listitem><para>Click "Next".</para></listitem>
-                    <listitem><para>Clear out the "host name" field and enter
-                        the IP Address determined earlier.</para></listitem>
-                    <listitem><para>Click "Finish" to close the
-                        New Connections Dialog.</para></listitem>
-                    <listitem><para>Use the drop-down menu now in the
-                        "Connection" field and pick the IP Address you entered.
-                         </para></listitem>
-                    <listitem><para>Click "Debug" to bring up a login screen
-                        and login.</para></listitem>
-                    <listitem><para>Accept the debug perspective.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='running-user-space-tools'>
-            <title>Running User-Space Tools</title>
-
-            <para>
-                As mentioned earlier in the manual, several tools exist that
-                enhance your development experience.
-                These tools are aids in developing and debugging applications
-                and images.
-                You can run these user-space tools from within the Eclipse
-                IDE through the "YoctoProjectTools" menu.
-            </para>
-
-            <para>
-                Once you pick a tool, you need to configure it for the remote
-                target.
-                Every tool needs to have the connection configured.
-                You must select an existing TCF-based RSE connection to the
-                remote target.
-                If one does not exist, click "New" to create one.
-            </para>
-
-            <para>
-                Here are some specifics about the remote tools:
-                <itemizedlist>
-                    <listitem><para><emphasis><filename>OProfile</filename>:</emphasis>
-                        Selecting this tool causes the
-                        <filename>oprofile-server</filename> on the remote
-                        target to launch on the local host machine.
-                        The <filename>oprofile-viewer</filename> must be
-                        installed on the local host machine and the
-                        <filename>oprofile-server</filename> must be installed
-                        on the remote target, respectively, in order to use.
-                        You must compile and install the
-                        <filename>oprofile-viewer</filename> from the source
-                        code on your local host machine.
-                        Furthermore, in order to convert the target's sample
-                        format data into a form that the host can use, you must
-                        have OProfile version 0.9.4 or greater installed on the
-                        host.</para>
-                        <para>You can locate both the viewer and server from
-                        <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/oprofileui/'></ulink>.
-                        You can also find more information on setting up and
-                        using this tool in the
-                        "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-oprofile'>oprofile</ulink>"
-                        section of the Yocto Project Profiling and Tracing
-                        Manual.
-                        <note>The <filename>oprofile-server</filename> is
-                        installed by default on the
-                        <filename>core-image-sato-sdk</filename> image.</note>
-                        </para></listitem>
-                    <listitem><para><emphasis><filename>Lttng2.0 trace import</filename>:</emphasis>
-                        Selecting this tool transfers the remote target's
-                        <filename>Lttng</filename> tracing data back to the
-                        local host machine and uses the Lttng Eclipse plug-in
-                        to graphically display the output.
-                        For information on how to use Lttng to trace an
-                        application,
-                        see <ulink url='http://lttng.org/documentation'></ulink>
-                        and the
-                        "<ulink url='&YOCTO_DOCS_PROF_URL;#lttng-linux-trace-toolkit-next-generation'>LTTng (Linux Trace Toolkit, next generation)</ulink>"
-                        section, which is in the Yocto Project Profiling and
-                        Tracing Manual.
-                        <note>Do not use
-                            <filename>Lttng-user space (legacy)</filename> tool.
-                            This tool no longer has any upstream support.</note>
-                        </para>
-                        <para>Before you use the
-                        <filename>Lttng2.0 trace import</filename> tool,
-                        you need to setup the Lttng Eclipse plug-in and create a
-                        Tracing project.
-                        Do the following:
-                        <orderedlist>
-                            <listitem><para>Select "Open Perspective" from the
-                                "Window" menu and then select "Other..." to
-                                bring up a menu of other perspectives.
-                                Choose "Tracing".
-                                </para></listitem>
-                            <listitem><para>Click "OK" to change the Eclipse
-                                perspective into the Tracing perspective.
-                                </para></listitem>
-                            <listitem><para>Create a new Tracing project by
-                                selecting "Project" from the "File -> New" menu.
-                                </para></listitem>
-                            <listitem><para>Choose "Tracing Project" from the
-                                "Tracing" menu and click "Next".
-                                </para></listitem>
-                            <listitem><para>Provide a name for your tracing
-                                project and click "Finish".
-                                </para></listitem>
-                            <listitem><para>Generate your tracing data on the
-                                remote target.</para></listitem>
-                            <listitem><para>Select "Lttng2.0 trace import"
-                                from the "Yocto Project Tools" menu to
-                                start the data import process.</para></listitem>
-                            <listitem><para>Specify your remote connection name.
-                                </para></listitem>
-                            <listitem><para>For the Ust directory path, specify
-                                the location of your remote tracing data.
-                                Make sure the location ends with
-                                <filename>ust</filename> (e.g.
-                                <filename>/usr/mysession/ust</filename>).
-                                </para></listitem>
-                            <listitem><para>Click "OK" to complete the import
-                                process.
-                                The data is now in the local tracing project
-                                you created.</para></listitem>
-                            <listitem><para>Right click on the data and then use
-                                the menu to Select "Generic CTF Trace" from the
-                                "Trace Type... -> Common Trace Format" menu to
-                                map the tracing type.</para></listitem>
-                            <listitem><para>Right click the mouse and select
-                                "Open" to bring up the Eclipse Lttng Trace
-                                Viewer so you view the tracing data.
-                                </para></listitem>
-                        </orderedlist></para></listitem>
-                    <listitem><para><emphasis><filename>PowerTOP</filename>:</emphasis>
-                        Selecting this tool runs PowerTOP on the remote target
-                        machine and displays the results in a new view called
-                        PowerTOP.</para>
-                        <para>The "Time to gather data(sec):" field is the time
-                        passed in seconds before data is gathered from the
-                        remote target for analysis.</para>
-                        <para>The "show pids in wakeups list:" field corresponds
-                        to the <filename>-p</filename> argument passed to
-                        <filename>PowerTOP</filename>.</para></listitem>
-                    <listitem><para><emphasis><filename>LatencyTOP and Perf</filename>:</emphasis>
-                        LatencyTOP identifies system latency, while
-                        Perf monitors the system's performance counter
-                        registers.
-                        Selecting either of these tools causes an RSE terminal
-                        view to appear from which you can run the tools.
-                        Both tools refresh the entire screen to display results
-                        while they run.
-                        For more information on setting up and using
-                        <filename>perf</filename>, see the
-                        "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-perf'>perf</ulink>"
-                        section in the Yocto Project Profiling and Tracing
-                        Manual.
-                        </para></listitem>
-                    <listitem><para><emphasis><filename>SystemTap</filename>:</emphasis>
-                        Systemtap is a tool that lets you create and reuse
-                        scripts to examine the activities of a live Linux
-                        system.
-                        You can easily extract, filter, and summarize data
-                        that helps you diagnose complex performance or
-                        functional problems.
-                        For more information on setting up and using
-                        <filename>SystemTap</filename>, see the
-                        <ulink url='https://sourceware.org/systemtap/documentation.html'>SystemTap Documentation</ulink>.
-                        </para></listitem>
-                    <listitem><para><emphasis><filename>yocto-bsp</filename>:</emphasis>
-                        The <filename>yocto-bsp</filename> tool lets you
-                        quickly set up a Board Support Package (BSP) layer.
-                        The tool requires a Metadata location, build location,
-                        BSP name, BSP output location, and a kernel
-                        architecture.
-                        For more information on the
-                        <filename>yocto-bsp</filename> tool outside of Eclipse,
-                        see the
-                        "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a new BSP Layer Using the yocto-bsp Script</ulink>"
-                        section in the Yocto Project Board Support Package
-                        (BSP) Developer's Guide.
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
-    </section>
-
-    <section id='workflow-using-stand-alone-cross-development-toolchains'>
-        <title>Workflow Using Stand-Alone Cross-Development Toolchains</title>
-
-        <para>
-            If you want to develop an application without prior installation
-            of the ADT, you still can employ the
-            <link linkend='cross-development-toolchain'>Cross Development Toolchain</link>,
-            the QEMU emulator, and a number of supported  target image files.
-            You just need to follow these general steps:
-            <orderedlist>
-                <listitem><para><emphasis>Install the cross-development
-                    toolchain for your target hardware:</emphasis>
-                    For information on how to install the toolchain, see the
-                    "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>"
-                    section in the Yocto Project Application Developer's
-                    Guide.</para></listitem>
-                <listitem><para><emphasis>Download the Target Image:</emphasis>
-                    The Yocto Project supports several target architectures
-                    and has many pre-built kernel images and root filesystem
-                    images.</para>
-                    <para>If you are going to develop your application on
-                    hardware, go to the
-                    <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
-                    download area and choose a target machine area
-                    from which to download the kernel image and root filesystem.
-                    This download area could have several files in it that
-                    support development using actual hardware.
-                    For example, the area might contain
-                    <filename>.hddimg</filename> files that combine the
-                    kernel image with the filesystem, boot loaders, and
-                    so forth.
-                    Be sure to get the files you need for your particular
-                    development process.</para>
-                    <para>If you are going to develop your application and
-                    then run and test it using the QEMU emulator, go to the
-                    <ulink url='&YOCTO_QEMU_DL_URL;'><filename>machines/qemu</filename></ulink>
-                    download area.
-                    From this area, go down into the directory for your
-                    target architecture (e.g. <filename>qemux86_64</filename>
-                    for an <trademark class='registered'>Intel</trademark>-based
-                    64-bit architecture).
-                    Download kernel, root filesystem, and any other files you
-                    need for your process.
-                    <note>In order to use the root filesystem in QEMU, you
-                    need to extract it.
-                    See the
-                    "<ulink url='&YOCTO_DOCS_ADT_URL;#extracting-the-root-filesystem'>Extracting the Root Filesystem</ulink>"
-                    section for information on how to extract the root
-                    filesystem.</note></para></listitem>
-                <listitem><para><emphasis>Develop and Test your
-                    Application:</emphasis>  At this point, you have the tools
-                    to develop your application.
-                    If you need to separately install and use the QEMU
-                    emulator, you can go to
-                    <ulink url='http://wiki.qemu.org/Main_Page'>QEMU Home Page</ulink>
-                    to download and learn about the emulator.
-                    You can see the
-                    "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
-                    chapter for information on using QEMU within the Yocto
-                    Project.</para></listitem>
-            </orderedlist>
-        </para>
-    </section>
 </section>
 
 <section id="dev-modifying-source-code">
@@ -1719,7 +605,7 @@
                 describes this workflow.
                 If you want more information that showcases the workflow, click
                 <ulink url='https://drive.google.com/a/linaro.org/file/d/0B3KGzY5fW7laTDVxUXo3UDRvd2s/view'>here</ulink>
-                for an excellent presentation by Trevor Woerner that
+                for a presentation by Trevor Woerner that, while somewhat dated,
                 provides detailed background information and a complete
                 working tutorial.
                 </para></listitem>
@@ -1743,212 +629,647 @@
             As mentioned earlier, <filename>devtool</filename> helps
             you easily develop projects whose build output must be part of
             an image built using the OpenEmbedded build system.
-            The remainder of this section presents the workflow you would
-            use that includes <filename>devtool</filename>.
-            <footnote>
-                <para>
-                    Kudos and thanks to
-                    <ulink url='mailto:twoerner@gmail.com'>Trevor Woerner</ulink>
-                    whose
-                    "<ulink url='https://drive.google.com/file/d/0B3KGzY5fW7laTDVxUXo3UDRvd2s/view'>Yocto Project Developer Workflow Tutorial</ulink>"
-                    paper contributed nicely towards the development of this
-                    section.
-                </para>
-            </footnote>
         </para>
 
         <para>
-            The steps in this section assume you have a previously built
-            image that is already either running in QEMU or running on actual
-            hardware.
-            Also, it is assumed that for deployment of the image to the
-            target, SSH is installed in the image and if the image is running
-            on real hardware that you have network access to and from your
-            development machine.
+            Three entry points exist that allow you to develop using
+            <filename>devtool</filename>:
+            <itemizedlist>
+                <listitem><para><emphasis><filename>devtool add</filename></emphasis>
+                    </para></listitem>
+                <listitem><para><emphasis><filename>devtool modify</filename></emphasis>
+                    </para></listitem>
+                <listitem><para><emphasis><filename>devtool upgrade</filename></emphasis>
+                    </para></listitem>
+            </itemizedlist>
         </para>
 
-        <section id='update-your-external-source'>
-            <title>Update Your External Source</title>
+        <para>
+            The remainder of this section presents these workflows.
+        </para>
+
+        <section id='use-devtool-to-integrate-new-code'>
+            <title>Use <filename>devtool add</filename> to Integrate New Code</title>
 
             <para>
-                Part of the development flow using
-                <filename>devtool</filename> of course involves updating
-                your source files.
-                Several opportunities exist in the workflow to extract and
-                work on the files.
-                For now, just realize that you need to be able to have
-                access to and edit files.
-                One obvious solution is to initially extract the code into an
-                isolated area in preparation for modification.
+                The <filename>devtool add</filename> command generates
+                a new recipe based on existing source code.
+                This command takes advantage of the
+                <link linkend='devtool-the-workspace-layer-structure'>workspace</link>
+                layer that many <filename>devtool</filename> commands
+                use.
+                The command is flexible enough to allow you to extract source
+                code into both the workspace or a separate local Git repository
+                and to use existing code that does not need to be extracted.
             </para>
 
             <para>
-                Another option is to use the
-                <filename>devtool modify</filename> command.
-                This command makes use of a "workspace" layer where much of
-                the transitional work occurs, which is needed for setting up
-                Metadata used by the OpenEmbedded build system that lets you
-                build your software.
-                Options (i.e. "-x") exist using <filename>devtool</filename>
-                that enable you to use the tool to extract source code.
+                Depending on your particular scenario, the arguments and options
+                you use with <filename>devtool add</filename> form different
+                combinations.
+                The following diagram shows common development flows
+                you would use with the <filename>devtool add</filename>
+                command:
+            </para>
+
+            <para>
+                <imagedata fileref="figures/devtool-add-flow.png" align="center" />
+            </para>
+
+            <para>
+                <orderedlist>
+                    <listitem><para><emphasis>Generating the New Recipe</emphasis>:
+                        The top part of the flow shows three scenarios by which
+                        you could use <filename>devtool add</filename> to
+                        generate a recipe based on existing source code.</para>
+
+                        <para>In a shared development environment, it is
+                        typical where other developers are responsible for
+                        various areas of source code.
+                        As a developer, you are probably interested in using
+                        that source code as part of your development using
+                        the Yocto Project.
+                        All you need is access to the code, a recipe, and a
+                        controlled area in which to do your work.</para>
+
+                        <para>Within the diagram, three possible scenarios
+                        feed into the <filename>devtool add</filename> workflow:
+                        <itemizedlist>
+                            <listitem><para><emphasis>Left</emphasis>:
+                                The left scenario represents a common situation
+                                where the source code does not exist locally
+                                and needs to be extracted.
+                                In this situation, you just let it get
+                                extracted to the default workspace - you do not
+                                want it in some specific location outside of the
+                                workspace.
+                                Thus, everything you need will be located in the
+                                workspace:
+                                <literallayout class='monospaced'>
+     $ devtool add <replaceable>recipe fetchuri</replaceable>
+                                </literallayout>
+                                With this command, <filename>devtool</filename>
+                                creates a recipe and an append file in the
+                                workspace as well as extracts the upstream
+                                source files into a local Git repository also
+                                within the <filename>sources</filename> folder.
+                                </para></listitem>
+                            <listitem><para><emphasis>Middle</emphasis>:
+                                The middle scenario also represents a situation where
+                                the source code does not exist locally.
+                                In this case, the code is again upstream
+                                and needs to be extracted to some
+                                local area - this time outside of the default
+                                workspace.
+                                As always, if required <filename>devtool</filename> creates
+                                a Git repository locally during the extraction.
+                                Furthermore, the first positional argument
+                                <replaceable>srctree</replaceable> in this case
+                                identifies where the
+                                <filename>devtool add</filename> command
+                                will locate the extracted code outside of the
+                                workspace:
+                                <literallayout class='monospaced'>
+     $ devtool add <replaceable>recipe srctree fetchuri</replaceable>
+                                </literallayout>
+                                In summary, the source code is pulled from
+                                <replaceable>fetchuri</replaceable> and extracted
+                                into the location defined by
+                                <replaceable>srctree</replaceable> as a local
+                                Git repository.</para>
+
+                                <para>Within workspace, <filename>devtool</filename>
+                                creates both the recipe and an append file
+                                for the recipe.
+                                </para></listitem>
+                            <listitem><para><emphasis>Right</emphasis>:
+                                The right scenario represents a situation
+                                where the source tree (srctree) has been
+                                previously prepared outside of the
+                                <filename>devtool</filename> workspace.
+                                </para>
+
+                                <para>The following command names the recipe
+                                and identifies where the existing source tree
+                                is located:
+                                <literallayout class='monospaced'>
+     $ devtool add <replaceable>recipe srctree</replaceable>
+                                </literallayout>
+                                The command examines the source code and creates
+                                a recipe for it placing the recipe into the
+                                workspace.</para>
+
+                                <para>Because the extracted source code already exists,
+                                <filename>devtool</filename> does not try to
+                                relocate it into the workspace - just the new
+                                the recipe is placed in the workspace.</para>
+
+                                <para>Aside from a recipe folder, the command
+                                also creates an append folder and places an initial
+                                <filename>*.bbappend</filename> within.
+                                </para></listitem>
+                        </itemizedlist>
+                        </para></listitem>
+                    <listitem><para><emphasis>Edit the Recipe</emphasis>:
+                        At this point, you can use <filename>devtool edit-recipe</filename>
+                        to open up the editor as defined by the
+                        <filename>$EDITOR</filename> environment variable
+                        and modify the file:
+                        <literallayout class='monospaced'>
+     $ devtool edit-recipe <replaceable>recipe</replaceable>
+                        </literallayout>
+                        From within the editor, you can make modifications to the
+                        recipe that take affect when you build it later.
+                        </para></listitem>
+                    <listitem><para><emphasis>Build the Recipe or Rebuild the Image</emphasis>:
+                        At this point in the flow, the next step you
+                        take depends on what you are going to do with
+                        the new code.</para>
+                        <para>If you need to take the build output and eventually
+                        move it to the target hardware, you would use
+                        <filename>devtool build</filename>:
+                        <note>
+                            You could use <filename>bitbake</filename> to build
+                            the recipe as well.
+                        </note>
+                        <literallayout class='monospaced'>
+     $ devtool build <replaceable>recipe</replaceable>
+                        </literallayout></para>
+                        <para>On the other hand, if you want an image to
+                        contain the recipe's packages for immediate deployment
+                        onto a device (e.g. for testing purposes), you can use
+                        the <filename>devtool build-image</filename> command:
+                        <literallayout class='monospaced'>
+     $ devtool build-image <replaceable>image</replaceable>
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para><emphasis>Deploy the Build Output</emphasis>:
+                        When you use the <filename>devtool build</filename>
+                        command to build out your recipe, you probably want to
+                        see if the resulting build output works as expected on target
+                        hardware.
+                        <note>
+                            This step assumes you have a previously built
+                            image that is already either running in QEMU or
+                            running on actual hardware.
+                            Also, it is assumed that for deployment of the image
+                            to the target, SSH is installed in the image and if
+                            the image is running on real hardware that you have
+                            network access to and from your development machine.
+                        </note>
+                        You can deploy your build output to that target hardware by
+                        using the <filename>devtool deploy-target</filename> command:
+                        <literallayout class='monospaced'>
+     $ devtool deploy-target <replaceable>recipe target</replaceable>
+                        </literallayout>
+                        The <replaceable>target</replaceable> is a live target machine
+                        running as an SSH server.</para>
+
+                        <para>You can, of course, also deploy the image you build
+                        using the <filename>devtool build-image</filename> command
+                        to actual hardware.
+                        However, <filename>devtool</filename> does not provide a
+                        specific command that allows you to do this.
+                        </para></listitem>
+                    <listitem><para><emphasis>Optionally Update the Recipe With Patch Files</emphasis>:
+                        Once you are satisfied with the recipe, if you have made
+                        any changes to the source tree that you want to have
+                        applied by the recipe, you need to generate patches
+                        from those changes.
+                        You do this before moving the recipe
+                        to its final layer and cleaning up the workspace area
+                        <filename>devtool</filename> uses.
+                        This optional step is especially relevant if you are
+                        using or adding third-party software.</para>
+                        <para>To convert commits created using Git to patch files,
+                        use the <filename>devtool update-recipe</filename> command.
+                        <note>
+                            Any changes you want to turn into patches must be
+                            committed to the Git repository in the source tree.
+                        </note>
+                        <literallayout class='monospaced'>
+     $ devtool update-recipe <replaceable>recipe</replaceable>
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para><emphasis>Move the Recipe to its Permanent Layer</emphasis>:
+                        Before cleaning up the workspace, you need to move the
+                        final recipe to its permanent layer.
+                        You must do this before using the
+                        <filename>devtool reset</filename> command if you want to
+                        retain the recipe.
+                        </para></listitem>
+                    <listitem><para><emphasis>Reset the Recipe</emphasis>:
+                        As a final step, you can restore the state such that
+                        standard layers and the upstream source is used to build
+                        the recipe rather than data in the workspace.
+                        To reset the recipe, use the <filename>devtool reset</filename>
+                        command:
+                        <literallayout class='monospaced'>
+     $ devtool reset <replaceable>recipe</replaceable>
+                        </literallayout>
+                        </para></listitem>
+                </orderedlist>
             </para>
         </section>
 
-        <section id='use-devtool-to-integrate-your-code-with-the-image'>
-            <title>Use <filename>devtool add</filename> to Integrate Your Code with the Image</title>
+        <section id='devtool-use-devtool-modify-to-enable-work-on-code-associated-with-an-existing-recipe'>
+            <title>Use <filename>devtool modify</filename> to Enable Work on Code Associated with an Existing Recipe</title>
 
             <para>
-                The <filename>devtool add</filename> command automatically
-                generates the needed Metadata that allows the OpenEmbedded
-                build system to build your code into the image.
-                <note>
-                    If a package or packages produced by the recipe on which
-                    you are working are not already in
-                    <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
-                    for the image, you must add them.
-                    The <filename>devtool add</filename> command does not
-                    add them for you.
-                </note>
-                Use the following command form:
-                <literallayout class='monospaced'>
-     $ devtool add <replaceable>your-project-name</replaceable>&nbsp;<replaceable>path-to-source</replaceable>
-                </literallayout>
+                The <filename>devtool modify</filename> command prepares the
+                way to work on existing code that already has a recipe in
+                place.
+                The command is flexible enough to allow you to extract code,
+                specify the existing recipe, and keep track of and gather any
+                patch files from other developers that are
+                associated with the code.
             </para>
 
             <para>
-                Running <filename>devtool</filename> for the first time
-                creates a workspace layer through the
-                <filename>bblayers.conf</filename> file that
-                is based on your project's location:
-                <literallayout class='monospaced'>
-     <replaceable>path-to-source</replaceable>/<replaceable>build-directory</replaceable>/<replaceable>workspace-layer</replaceable>
-                </literallayout>
-                By default, the name of the workspace layer is "workspace".
+                Depending on your particular scenario, the arguments and options
+                you use with <filename>devtool modify</filename> form different
+                combinations.
+                The following diagram shows common development flows
+                you would use with the <filename>devtool modify</filename>
+                command:
             </para>
 
             <para>
-                For details on the workspace layer created in the
-                <replaceable>build-directory</replaceable>,
-                see the
-                "<link linkend='devtool-adding-a-new-recipe-to-the-workspace'>Adding a New Recipe to the Workspace Layer</link>"
-                section.
-            </para>
-
-<!--
-            <para>
-                Of course, each layer must have a
-                <filename>layer.conf</filename> configuration file.
-                <filename>devtool</filename> also creates this configuration
-                file:
-                <literallayout class='monospaced'>
-     $ cat workspace/conf/layer.conf
-     # ### workspace layer auto­generated by devtool ###
-     BBPATH =. "${LAYERDIR}:"
-     BBFILES += "${LAYERDIR}/recipes/*/*.bb \
-                 ${LAYERDIR}/appends/*.bbappend"
-     BBFILE_COLLECTIONS += "workspacelayer"
-     BBFILE_PATTERN_workspacelayer = "^${LAYERDIR}/"
-     BBFILE_PATTERN_IGNORE_EMPTY_workspacelayer = "1"
-     BBFILE_PRIORITY_workspacelayer = "99"
-                </literallayout>
-            </para>
--->
-
-            <para>
-                Running <filename>devtool add</filename> automatically
-                generates your recipe:
-                <literallayout class='monospaced'>
-     $ cat workspace/recipes/<replaceable>your-project-name</replaceable>/<replaceable>your-project-name</replaceable>.bb
-     # Recipe created by recipetool
-     # This is the basis of a recipe and may need further editing in order to be fully functional.
-     # (Feel free to remove these comments when editing.)
-     #
-     # Unable to find any files that looked like license statements. Check the accompanying
-     # documentation and source headers and set LICENSE and LIC_FILES_CHKSUM accordingly.
-     LICENSE = "CLOSED"
-     LIC_FILES_CHKSUM = ""
-
-     # No information for SRC_URI yet (only an external source tree was
-     # specified)
-     SRC_URI = ""
-
-     DEPENDS = "libx11"
-     # NOTE: if this software is not capable of being built in a separate build directory
-     # from the source, you should replace autotools with autotools­-brokensep in the
-     # inherit line
-     inherit autotools
-
-     # Specify any options you want to pass to the configure script using EXTRA_OECONF:
-     EXTRA_OECONF = ""
-                </literallayout>
+                <imagedata fileref="figures/devtool-modify-flow.png" align="center" />
             </para>
 
             <para>
-                Lastly, the <filename>devtool add</filename> command creates the
-                <filename>.bbappend</filename> file:
-                <literallayout class='monospaced'>
-     $ cat workspace/appends/<replaceable>your-project-name</replaceable>.bbappend
-     inherit externalsrc
-     EXTERNALSRC = "/<replaceable>path-to-source</replaceable>/<replaceable>your-project-name</replaceable>"
+                <orderedlist>
+                    <listitem><para><emphasis>Preparing to Modify the Code</emphasis>:
+                        The top part of the flow shows three scenarios by which
+                        you could use <filename>devtool modify</filename> to
+                        prepare to work on source files.
+                        Each scenario assumes the following:
+                        <itemizedlist>
+                            <listitem><para>The recipe exists in some layer external
+                                to the <filename>devtool</filename> workspace.
+                                </para></listitem>
+                            <listitem><para>The source files exist upstream in an
+                                un-extracted state or locally in a previously
+                                extracted state.
+                                </para></listitem>
+                        </itemizedlist>
+                        The typical situation is where another developer has
+                        created some layer for use with the Yocto Project and
+                        their recipe already resides in that layer.
+                        Furthermore, their source code is readily available
+                        either upstream or locally.
+                        <itemizedlist>
+                            <listitem><para><emphasis>Left</emphasis>:
+                                The left scenario represents a common situation
+                                where the source code does not exist locally
+                                and needs to be extracted.
+                                In this situation, the source is extracted
+                                into the default workspace location.
+                                The recipe, in this scenario, is in its own
+                                layer outside the workspace
+                                (i.e.
+                                <filename>meta-</filename><replaceable>layername</replaceable>).
+                                </para>
 
-     # initial_rev: <replaceable>commit-ID</replaceable>
-                </literallayout>
+                                <para>The following command identifies the recipe
+                                and by default extracts the source files:
+                                <literallayout class='monospaced'>
+     $ devtool modify <replaceable>recipe</replaceable>
+                                </literallayout>
+                                Once <filename>devtool</filename>locates the recipe,
+                                it uses the
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                                variable to locate the source code and
+                                any local patch files from other developers are
+                                located.
+                                <note>
+                                    You cannot provide an URL for
+                                    <replaceable>srctree</replaceable> when using the
+                                    <filename>devtool modify</filename> command.
+                                </note>
+                                With this scenario, however, since no
+                                <replaceable>srctree</replaceable> argument exists, the
+                                <filename>devtool modify</filename> command by default
+                                extracts the source files to a Git structure.
+                                Furthermore, the location for the extracted source is the
+                                default area within the workspace.
+                                The result is that the command sets up both the source
+                                code and an append file within the workspace with the
+                                recipe remaining in its original location.
+                                </para></listitem>
+                            <listitem><para><emphasis>Middle</emphasis>:
+                                The middle scenario represents a situation where
+                                the source code also does not exist locally.
+                                In this case, the code is again upstream
+                                and needs to be extracted to some
+                                local area as a Git repository.
+                                The recipe, in this scenario, is again in its own
+                                layer outside the workspace.</para>
+
+                                <para>The following command tells
+                                <filename>devtool</filename> what recipe with
+                                which to work and, in this case, identifies a local
+                                area for the extracted source files that is outside
+                                of the default workspace:
+                                <literallayout class='monospaced'>
+     $ devtool modify <replaceable>recipe srctree</replaceable>
+                                </literallayout>
+                                As with all extractions, the command uses
+                                the recipe's <filename>SRC_URI</filename> to locate the
+                                source files.
+                                Once the files are located, the command by default
+                                extracts them.
+                                Providing the <replaceable>srctree</replaceable>
+                                argument instructs <filename>devtool</filename> where
+                                place the extracted source.</para>
+
+                                <para>Within workspace, <filename>devtool</filename>
+                                creates an append file for the recipe.
+                                The recipe remains in its original location but
+                                the source files are extracted to the location you
+                                provided with <replaceable>srctree</replaceable>.
+                                </para></listitem>
+                            <listitem><para><emphasis>Right</emphasis>:
+                                The right scenario represents a situation
+                                where the source tree
+                                (<replaceable>srctree</replaceable>) exists as a
+                                previously extracted Git structure outside of
+                                the <filename>devtool</filename> workspace.
+                                In this example, the recipe also exists
+                                elsewhere in its own layer.
+                                </para>
+
+                                <para>The following command tells
+                                <filename>devtool</filename> the recipe
+                                with which to work, uses the "-n" option to indicate
+                                source does not need to be extracted, and uses
+                                <replaceable>srctree</replaceable> to point to the
+                                previously extracted source files:
+                                <literallayout class='monospaced'>
+     $ devtool modify -n <replaceable>recipe srctree</replaceable>
+                                </literallayout>
+                                </para>
+
+                                <para>Once the command finishes, it creates only
+                                an append file for the recipe in the workspace.
+                                The recipe and the source code remain in their
+                                original locations.
+                                </para></listitem>
+                            </itemizedlist>
+                        </para></listitem>
+                    <listitem><para><emphasis>Edit the Source</emphasis>:
+                        Once you have used the <filename>devtool modify</filename>
+                        command, you are free to make changes to the source
+                        files.
+                        You can use any editor you like to make and save
+                        your source code modifications.
+                        </para></listitem>
+                    <listitem><para><emphasis>Build the Recipe</emphasis>:
+                        Once you have updated the source files, you can build
+                        the recipe.
+                        You can either use <filename>devtool build</filename> or
+                        <filename>bitbake</filename>.
+                        Either method produces build output that is stored
+                        in
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>.
+                        </para></listitem>
+                    <listitem><para><emphasis>Deploy the Build Output</emphasis>:
+                        When you use the <filename>devtool build</filename>
+                        command or <filename>bitbake</filename> to build out your
+                        recipe, you probably want to see if the resulting build
+                        output works as expected on target hardware.
+                        <note>
+                            This step assumes you have a previously built
+                            image that is already either running in QEMU or
+                            running on actual hardware.
+                            Also, it is assumed that for deployment of the image
+                            to the target, SSH is installed in the image and if
+                            the image is running on real hardware that you have
+                            network access to and from your development machine.
+                        </note>
+                        You can deploy your build output to that target hardware by
+                        using the <filename>devtool deploy-target</filename> command:
+                        <literallayout class='monospaced'>
+     $ devtool deploy-target <replaceable>recipe target</replaceable>
+                        </literallayout>
+                        The <replaceable>target</replaceable> is a live target machine
+                        running as an SSH server.</para>
+
+                        <para>You can, of course, also deploy the image you build
+                        using the <filename>devtool build-image</filename> command
+                        to actual hardware.
+                        However, <filename>devtool</filename> does not provide a
+                        specific command that allows you to do this.
+                        </para></listitem>
+                    <listitem><para><emphasis>Optionally Create Patch Files for Your Changes</emphasis>:
+                        After you have debugged your changes, you can
+                        use <filename>devtool update-recipe</filename> to
+                        generate patch files for all the commits you have
+                        made.
+                        <note>
+                            Patch files are generated only for changes
+                            you have committed.
+                        </note>
+                        <literallayout class='monospaced'>
+     $ devtool update-recipe <replaceable>recipe</replaceable>
+                        </literallayout>
+                        By default, the
+                        <filename>devtool update-recipe</filename> command
+                        creates the patch files in a folder named the same
+                        as the recipe beneath the folder in which the recipe
+                        resides, and updates the recipe's
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                        statement to point to the generated patch files.
+                        <note>
+                            You can use the
+                            "--append <replaceable>LAYERDIR</replaceable>"
+                            option to cause the command to create append files
+                            in a specific layer rather than the default
+                            recipe layer.
+                        </note>
+                        </para></listitem>
+                    <listitem><para><emphasis>Restore the Workspace</emphasis>:
+                        The <filename>devtool reset</filename> restores the
+                        state so that standard layers and upstream sources are
+                        used to build the recipe rather than what is in the
+                        workspace.
+                        <literallayout class='monospaced'>
+     $ devtool reset <replaceable>recipe</replaceable>
+                        </literallayout>
+                        </para></listitem>
+                </orderedlist>
             </para>
         </section>
 
-        <section id='build-your-project'>
-            <title>Build Your Project</title>
+        <section id='devtool-use-devtool-upgrade-to-create-a-version-of-the-recipe-that-supports-a-newer-version-of-the-software'>
+            <title>Use <filename>devtool upgrade</filename> to Create a Version of the Recipe that Supports a Newer Version of the Software</title>
 
             <para>
-                You can use BitBake or <filename>devtool build</filename> to
-                build your modified project.
+                The <filename>devtool upgrade</filename> command updates
+                an existing recipe so that you can build it for an updated
+                set of source files.
+                The command is flexible enough to allow you to specify
+                source code revision and versioning schemes, extract code into
+                or out of the <filename>devtool</filename> workspace, and
+                work with any source file forms that the fetchers support.
             </para>
 
             <para>
-                To use BitBake, use the following:
-                <literallayout class='monospaced'>
-     $ bitbake <replaceable>your-project-name</replaceable>
-                </literallayout>
-                Alternatively, you can use
-                <filename>devtool build</filename>, which is equivalent to
-                <filename>bitbake -c populate_sysroot</filename>.
-                For example:
-                <literallayout class='monospaced'>
-     $ devtool build <replaceable>your-project-name</replaceable>
-                </literallayout>
+                Depending on your particular scenario, the arguments and options
+                you use with <filename>devtool upgrade</filename> form different
+                combinations.
+                The following diagram shows a common development flow
+                you would use with the <filename>devtool modify</filename>
+                command:
+            </para>
+
+            <para>
+                <imagedata fileref="figures/devtool-upgrade-flow.png" align="center" />
+            </para>
+
+            <para>
+                <orderedlist>
+                    <listitem><para><emphasis>Initiate the Upgrade</emphasis>:
+                        The top part of the flow shows a typical scenario by which
+                        you could use <filename>devtool upgrade</filename>.
+                        The following conditions exist:
+                        <itemizedlist>
+                            <listitem><para>The recipe exists in some layer external
+                                to the <filename>devtool</filename> workspace.
+                                </para></listitem>
+                            <listitem><para>The source files for the new release
+                                exist adjacent to the same location pointed to by
+                                <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                                in the recipe (e.g. a tarball with the new version
+                                number in the name, or as a different revision in
+                                the upstream Git repository).
+                                </para></listitem>
+                        </itemizedlist>
+                        A common situation is where third-party software has
+                        undergone a revision so that it has been upgraded.
+                        The recipe you have access to is likely in your own layer.
+                        Thus, you need to upgrade the recipe to use the
+                        newer version of the software:
+                        <literallayout class='monospaced'>
+     $ devtool upgrade -V <replaceable>version recipe</replaceable>
+                        </literallayout>
+                        By default, the <filename>devtool upgrade</filename> command
+                        extracts source code into the <filename>sources</filename>
+                        directory in the workspace.
+                        If you want the code extracted to any other location, you
+                        need to provide the <replaceable>srctree</replaceable>
+                        positional argument with the command as follows:
+                        <literallayout class='monospaced'>
+     $ devtool upgrade -V <replaceable>version recipe srctree</replaceable>
+                        </literallayout>
+                        Also, in this example, the "-V" option is used to specify
+                        the new version.
+                        If the source files pointed to by the
+                        <filename>SRC_URI</filename> statement in the recipe are
+                        in a Git repository, you must provide the "-S" option and
+                        specify a revision for the software.</para>
+
+                        <para>Once <filename>devtool</filename> locates the recipe,
+                        it uses the <filename>SRC_URI</filename> variable to locate
+                        the source code and any local patch files from other
+                        developers are located.
+                        The result is that the command sets up the source
+                        code, the new version of the recipe, and an append file
+                        all within the workspace.
+                        </para></listitem>
+                    <listitem><para><emphasis>Resolve any Conflicts created by the Upgrade</emphasis>:
+                        At this point, there could be some conflicts due to the
+                        software being upgraded to a new version.
+                        This would occur if your recipe specifies some patch files in
+                        <filename>SRC_URI</filename> that conflict with changes
+                        made in the new version of the software.
+                        If this is the case, you need to resolve the conflicts
+                        by editing the source and following the normal
+                        <filename>git rebase</filename> conflict resolution
+                        process.</para>
+
+                        <para>Before moving onto the next step, be sure to resolve any
+                        such conflicts created through use of a newer or different
+                        version of the software.
+                        </para></listitem>
+                    <listitem><para><emphasis>Build the Recipe</emphasis>:
+                        Once you have your recipe in order, you can build it.
+                        You can either use <filename>devtool build</filename> or
+                        <filename>bitbake</filename>.
+                        Either method produces build output that is stored
+                        in
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>.
+                        </para></listitem>
+                    <listitem><para><emphasis>Deploy the Build Output</emphasis>:
+                        When you use the <filename>devtool build</filename>
+                        command or <filename>bitbake</filename> to build out your
+                        recipe, you probably want to see if the resulting build
+                        output works as expected on target hardware.
+                        <note>
+                            This step assumes you have a previously built
+                            image that is already either running in QEMU or
+                            running on actual hardware.
+                            Also, it is assumed that for deployment of the image
+                            to the target, SSH is installed in the image and if
+                            the image is running on real hardware that you have
+                            network access to and from your development machine.
+                        </note>
+                        You can deploy your build output to that target hardware by
+                        using the <filename>devtool deploy-target</filename> command:
+                        <literallayout class='monospaced'>
+     $ devtool deploy-target <replaceable>recipe target</replaceable>
+                        </literallayout>
+                        The <replaceable>target</replaceable> is a live target machine
+                        running as an SSH server.</para>
+
+                        <para>You can, of course, also deploy the image you build
+                        using the <filename>devtool build-image</filename> command
+                        to actual hardware.
+                        However, <filename>devtool</filename> does not provide a
+                        specific command that allows you to do this.
+                        </para></listitem>
+                    <listitem><para><emphasis>Optionally Create Patch Files for Your Changes</emphasis>:
+                        After you have debugged your changes, you can
+                        use <filename>devtool update-recipe</filename> to
+                        generate patch files for all the commits you have
+                        made.
+                        <note>
+                            Patch files are generated only for changes
+                            you have committed.
+                        </note>
+                        <literallayout class='monospaced'>
+     $ devtool update-recipe <replaceable>recipe</replaceable>
+                        </literallayout>
+                        By default, the
+                        <filename>devtool update-recipe</filename> command
+                        creates the patch files in a folder named the same
+                        as the recipe beneath the folder in which the recipe
+                        resides, and updates the recipe's
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                        statement to point to the generated patch files.
+                        </para></listitem>
+                    <listitem><para><emphasis>Move the Recipe to its Permanent Layer</emphasis>:
+                        Before cleaning up the workspace, you need to move the
+                        final recipe to its permanent layer.
+                        You can either overwrite the original recipe or you can
+                        overlay the upgraded recipe into a separate layer.
+                        You must do this before using the
+                        <filename>devtool reset</filename> command if you want to
+                        retain the upgraded recipe.
+                        </para></listitem>
+                    <listitem><para><emphasis>Restore the Workspace</emphasis>:
+                        The <filename>devtool reset</filename> restores the
+                        state so that standard layers and upstream sources are
+                        used to build the recipe rather than what is in the
+                        workspace.
+                        <literallayout class='monospaced'>
+     $ devtool reset <replaceable>recipe</replaceable>
+                        </literallayout>
+                        </para></listitem>
+                </orderedlist>
             </para>
         </section>
-
-<!--
-        <section id='dev-build-the-image'>
-            <title>Build the Image</title>
-
-            <para>
-                The final step before testing is to rebuild the base image
-                with your project changes as part of the image.
-                Simply run BitBake again on your image.
-                Here is an example:
-                <literallayout class='monospaced'>
-     $ bitbake <replaceable>image</replaceable>
-                </literallayout>
-            </para>
-        </section>
-
-        <section id='dev-testing-the-image'>
-            <title>Testing the Image</title>
-
-            <para>
-                Once you have the image, you can test it using QEMU.
-                Here is an example assuming "qemux86":
-                <literallayout class='monospaced'>
-     $ runqemu qemux86 <replaceable>image</replaceable>
-                </literallayout>
-                For information on how to test an image using QEMU, see the
-                "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
-                section.
-            </para>
-        </section>
--->
     </section>
 
     <section id='devtool-quick-reference'>
@@ -1959,7 +1280,7 @@
             adding a new recipe and the supporting Metadata to a temporary
             workspace layer.
             This section provides a short reference on
-            <filename>devtool</filename> for most of the commands.
+            <filename>devtool</filename> and its commands.
         </para>
 
         <section id='devtool-getting-help'>
@@ -1970,32 +1291,43 @@
                 <filename>devtool</filename> command is using the
                 <filename>--help</filename> option:
                 <literallayout class='monospaced'>
-     $ devtool --help
-     usage: devtool [-h] [--basepath BASEPATH] [-d] [-q] [--color COLOR]
-               &lt;subcommand&gt; ...
+     usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q]
+                    [--color COLOR] [-h]
+                    &lt;subcommand&gt; ...
 
      OpenEmbedded development tool
 
      optional arguments:
-       -h, --help           show this help message and exit
        --basepath BASEPATH  Base directory of SDK / build directory
+       --bbpath BBPATH      Explicitly specify the BBPATH, rather than getting it
+                            from the metadata
        -d, --debug          Enable debug output
        -q, --quiet          Print only errors
        --color COLOR        Colorize output (where COLOR is auto, always, never)
+       -h, --help           show this help message and exit
 
      subcommands:
-       &lt;subcommand&gt;
-         create-workspace   Set up a workspace
-         deploy-target      Deploy recipe output files to live target machine
-         undeploy-target    Undeploy recipe output files in live target machine
-         add                Add a new recipe
-         modify             Modify the source for an existing recipe
-         extract            Extract the source for an existing recipe
-         update-recipe      Apply changes from external source tree to recipe
-         status             Show workspace status
-         build              Build a recipe
-         reset              Remove a recipe from your workspace
-
+       Beginning work on a recipe:
+         add                  Add a new recipe
+         modify               Modify the source for an existing recipe
+         upgrade              Upgrade an existing recipe
+       Getting information:
+         status               Show workspace status
+         search               Search available recipes
+       Working on a recipe in the workspace:
+         build                Build a recipe
+         edit-recipe          Edit a recipe file in your workspace
+         configure-help       Get help on configure script options
+         update-recipe        Apply changes from external source tree to recipe
+         reset                Remove a recipe from your workspace
+       Testing changes on target:
+         deploy-target        Deploy recipe output files to live target machine
+         undeploy-target      Undeploy recipe output files in live target machine
+         build-image          Build image including workspace recipe packages
+       Advanced:
+         create-workspace     Set up workspace in an alternative location
+         extract              Extract the source for an existing recipe
+         sync                 Synchronize the source tree for an existing recipe
      Use devtool &lt;subcommand&gt; --help to get help on a specific command
                 </literallayout>
             </para>
@@ -2006,22 +1338,95 @@
                 name and using <filename>--help</filename>:
                 <literallayout class='monospaced'>
      $ devtool add --help
-     usage: devtool add [-h] [--same-dir] [--fetch URI] [--version VERSION]
-                        recipename srctree
+     usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI]
+                        [--version VERSION] [--no-git] [--binary] [--also-native]
+                        [--src-subdir SUBDIR]
+                        [recipename] [srctree] [fetchuri]
 
-     Adds a new recipe
+     Adds a new recipe to the workspace to build a specified source tree. Can
+     optionally fetch a remote URI and unpack it to create the source tree.
 
      positional arguments:
-       recipename            Name for new recipe to add
-       srctree               Path to external source tree
+       recipename            Name for new recipe to add (just name - no version,
+                             path or extension). If not specified, will attempt to
+                             auto-detect it.
+       srctree               Path to external source tree. If not specified, a
+                             subdirectory of
+                             /home/scottrif/poky/build/workspace/sources will be
+                             used.
+       fetchuri              Fetch the specified URI and extract it to create the
+                             source tree
 
      optional arguments:
        -h, --help            show this help message and exit
        --same-dir, -s        Build in same directory as source
+       --no-same-dir         Force build in a separate build directory
        --fetch URI, -f URI   Fetch the specified URI and extract it to create the
-                             source tree
+                             source tree (deprecated - pass as positional argument
+                             instead)
        --version VERSION, -V VERSION
                              Version to use within recipe (PV)
+       --no-git, -g          If fetching source, do not set up source tree as a git
+                             repository
+       --binary, -b          Treat the source tree as something that should be
+                             installed verbatim (no compilation, same directory
+                             structure). Useful with binary packages e.g. RPMs.
+       --also-native         Also add native variant (i.e. support building recipe
+                             for the build host as well as the target machine)
+       --src-subdir SUBDIR   Specify subdirectory within source tree to use
+                </literallayout>
+            </para>
+        </section>
+
+        <section id='devtool-the-workspace-layer-structure'>
+            <title>The Workspace Layer Structure</title>
+
+            <para>
+                <filename>devtool</filename> uses a "Workspace" layer
+                in which to accomplish builds.
+                This layer is not specific to any single
+                <filename>devtool</filename> command but is rather a common
+                working area used across the tool.
+            </para>
+
+            <para>
+                The following figure shows the workspace structure:
+            </para>
+
+            <para>
+                <imagedata fileref="figures/build-workspace-directory.png"
+                    width="6in" depth="5in" align="left" scale="70" />
+            </para>
+
+            <para>
+                <literallayout class='monospaced'>
+     attic - A directory created if devtool believes it preserve
+             anything when you run "devtool reset".  For example, if you
+             run "devtool add", make changes to the recipe, and then
+             run "devtool reset", devtool takes notice that the file has
+             been changed and moves it into the attic should you still
+             want the recipe.
+
+     README - Provides information on what is in workspace layer and how to
+              manage it.
+
+     .devtool_md5 - A checksum file used by devtool.
+
+     appends - A directory that contains *.bbappend files, which point to
+               external source.
+
+     conf - A configuration directory that contains the layer.conf file.
+
+     recipes - A directory containing recipes.  This directory contains a
+               folder for each directory added whose name matches that of the
+               added recipe.  devtool places the <replaceable>recipe</replaceable>.bb file
+               within that sub-directory.
+
+     sources - A directory containing a working copy of the source files used
+               when building the recipe.  This is the default directory used
+               as the location of the source tree when you do not provide a
+               source tree path.  This directory contains a folder for each
+               set of source files matched to a corresponding recipe.
                 </literallayout>
             </para>
         </section>
@@ -2040,54 +1445,72 @@
 
             <para>
                 The following example creates and adds a new recipe named
-                <filename>jackson</filename> to the workspace layer.
+                <filename>jackson</filename> to a workspace layer the tool creates.
                 The source code built by the recipes resides in
                 <filename>/home/scottrif/sources/jackson</filename>:
                 <literallayout class='monospaced'>
      $ devtool add jackson /home/scottrif/sources/jackson
                 </literallayout>
-                <note>
-                    For complete syntax, use the
-                    <filename>devtool add --help</filename> command.
-                </note>
             </para>
 
             <para>
                 If you add a recipe and the workspace layer does not exist,
-                the command creates the layer and populates it as follows:
-            </para>
-
-            <para>
-                <imagedata fileref="figures/build-workspace-directory.png"
-                    width="6in" depth="4in" align="center" scale="100" />
-            </para>
-
-            <para>
-                <literallayout class='monospaced'>
-     README - Provides information on what is in workspace layer and how to
-              manage it.
-
-     appends - A directory that contains *.bbappend files, which point to
-               external source.
-
-     conf - A configuration directory that contains the layer.conf file.
-
-     recipes - A directory containing recipes.  This directory contains a
-               folder for each directory added whose name matches that of the
-               added recipe.  devtool places the <replaceable>recipe</replaceable>.bb file
-               within that sub-directory.
-                </literallayout>
+                the command creates the layer and populates it as
+                described in
+                "<link linkend='devtool-the-workspace-layer-structure'>The Workspace Layer Structure</link>"
+                section.
             </para>
 
             <para>
                 Running <filename>devtool add</filename> when the
-                workspace layer exists causes the tool to add the recipe
-                and append files into the existing workspace layer.
+                workspace layer exists causes the tool to add the recipe,
+                append files, and source files into the existing workspace layer.
                 The <filename>.bbappend</filename> file is created to point
                 to the external source tree.
             </para>
         </section>
 
+        <section id='devtool-extracting-the-source-for-an-existing-recipe'>
+            <title>Extracting the Source for an Existing Recipe</title>
+
+            <para>
+                Use the <filename>devtool extract</filename> command to
+                extract the source for an existing recipe.
+                When you use this command, you must supply the root name
+                of the recipe (i.e. no version, paths, or extensions), and
+                you must supply the directory to which you want the source
+                extracted.
+            </para>
+
+            <para>
+                Additional command options let you control the name of a
+                development branch into which you can checkout the source
+                and whether or not to keep a temporary directory, which is
+                useful for debugging.
+            </para>
+        </section>
+
+        <section id='devtool-synchronizing-a-recipes-extracted-source-tree'>
+            <title>Synchronizing a Recipe's Extracted Source Tree</title>
+
+            <para>
+                Use the <filename>devtool sync</filename> command to
+                synchronize a previously extracted source tree for an
+                existing recipe.
+                When you use this command, you must supply the root name
+                of the recipe (i.e. no version, paths, or extensions), and
+                you must supply the directory to which you want the source
+                extracted.
+            </para>
+
+            <para>
+                Additional command options let you control the name of a
+                development branch into which you can checkout the source
+                and whether or not to keep a temporary directory, which is
+                useful for debugging.
+            </para>
+        </section>
+
         <section id='devtool-modifying-a-recipe'>
             <title>Modifying an Existing Recipe</title>
 
@@ -2110,14 +1533,37 @@
                 You can use the following command to checkout the source
                 files:
                 <literallayout class='monospaced'>
-     $ devtool modify -x <replaceable>recipe</replaceable>&nbsp;<replaceable>path-to-source</replaceable>
+     $ devtool modify <replaceable>recipe</replaceable>
                 </literallayout>
-                Using the above command form, the default development branch
-                would be "devtool".
-                <note>
-                    For complete syntax, use the
-                    <filename>devtool modify --help</filename> command.
-                </note>
+                Using the above command form, <filename>devtool</filename> uses
+                the existing recipe's
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                statement to locate the upstream source, extracts the source
+                into the default sources location in the workspace.
+                The default development branch used is "devtool".
+            </para>
+        </section>
+
+        <section id='devtool-edit-an-existing-recipe'>
+            <title>Edit an Existing Recipe</title>
+
+            <para>
+                Use the <filename>devtool edit-recipe</filename> command
+                to run the default editor, which is identified using the
+                <filename>EDITOR</filename> variable, on the specified recipe.
+            </para>
+
+            <para>
+                When you use the <filename>devtool edit-recipe</filename>
+                command, you must supply the root name of the recipe
+                (i.e. no version, paths, or extensions).
+                Also, the recipe file itself must reside in the workspace
+                as a result of the <filename>devtool add</filename> or
+                <filename>devtool upgrade</filename> commands.
+                However, you can override that requirement by using the
+                "-a" or "--any-recipe" option.
+                Using either of these options allows you to edit any recipe
+                regardless of its location.
             </para>
         </section>
 
@@ -2167,10 +1613,32 @@
                  file.
                  If an append file already exists, the command updates it
                  appropriately.
-                <note>
-                    For complete syntax, use the
-                    <filename>devtool update-recipe --help</filename> command.
-                </note>
+            </para>
+        </section>
+
+        <section id='devtool-upgrading-a-recipe'>
+            <title>Upgrading a Recipe</title>
+
+            <para>
+                Use the <filename>devtool upgrade</filename> command
+                to upgrade an existing recipe to a new upstream version.
+                The command puts the upgraded recipe file into the
+                workspace along with any associated files, and extracts
+                the source tree to a specified location should patches
+                need rebased or added to as a result of the upgrade.
+            </para>
+
+            <para>
+                When you use the <filename>devtool upgrade</filename> command,
+                you must supply the root name of the recipe (i.e. no version,
+                paths, or extensions), and you must supply the directory
+                to which you want the source extracted.
+                Additional command options let you control things such as
+                the version number to which you want to upgrade (i.e. the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>),
+                the source revision to which you want to upgrade (i.e. the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>,
+                whether or not to apply patches, and so forth.
             </para>
         </section>
 
@@ -2195,32 +1663,64 @@
                 the recipe or the append files have been modified, the
                 command preserves the modified files in a separate "attic"
                 subdirectory under the workspace layer.
-                <note>
-                    For complete syntax, use the
-                    <filename>devtool reset --help</filename> command.
-                </note>
+            </para>
+
+            <para>
+                Here is an example that resets the workspace directory that
+                contains the <filename>mtr</filename> recipe:
+                <literallayout class='monospaced'>
+     $ devtool reset mtr
+     NOTE: Cleaning sysroot for recipe mtr...
+     NOTE: Leaving source tree /home/scottrif/poky/build/workspace/sources/mtr as-is; if you no
+        longer need it then please delete it manually
+     $
+                </literallayout>
             </para>
         </section>
 
-        <section id='devtool-building-your-software'>
-            <title>Building Your Software</title>
+        <section id='devtool-building-your-recipe'>
+            <title>Building Your Recipe</title>
 
             <para>
                 Use the <filename>devtool build</filename> command to cause the
-                OpenEmbedded build system to build your software based
-                on the recipe file.
+                OpenEmbedded build system to build your recipe.
                 The <filename>devtool build</filename> command is equivalent to
                 <filename>bitbake -c populate_sysroot</filename>.
+            </para>
+
+            <para>
+                When you use the <filename>devtool build</filename> command,
+                you must supply the root name of the recipe (i.e. no version,
+                paths, or extensions).
+                You can use either the "-s" or the "--disable-parallel-make"
+                option to disable parallel makes during the build.
                 Here is an example:
                 <literallayout class='monospaced'>
      $ devtool build <replaceable>recipe</replaceable>
                 </literallayout>
-                <note>
-                    For complete syntax, use the
-                    <filename>devtool build --help</filename> command.
-                </note>
-                Building your software using <filename>devtool build</filename>
-                is identical to using BitBake to build the software.
+            </para>
+        </section>
+
+        <section id='devtool-building-your-image'>
+            <title>Building Your Image</title>
+
+            <para>
+                Use the <filename>devtool build-image</filename> command
+                to build an image, extending it to include packages from
+                recipes in the workspace.
+                Using this command is useful when you want an image that
+                ready for immediate deployment onto a device for testing.
+                For proper integration into a final image, you need to
+                edit your custom image recipe appropriately.
+            </para>
+
+            <para>
+                When you use the <filename>devtool build-image</filename>
+                command, you must supply the name of the image.
+                This command has no command line options:
+                <literallayout class='monospaced'>
+     $ devtool build-image <replaceable>image</replaceable>
+                </literallayout>
             </para>
         </section>
 
@@ -2252,12 +1752,6 @@
                         You should never use it to update an image that will be
                         used in production.
                     </para>
-
-                    <para>
-                        For complete syntax, use the
-                        <filename>devtool deploy-target --help</filename>
-                        command.
-                    </para>
                 </note>
             </para>
         </section>
@@ -2278,10 +1772,6 @@
                 The <replaceable>target</replaceable> is the address of the
                 target machine, which must be running an SSH server (i.e.
                 <filename>user@hostname</filename>).
-                <note>
-                    For complete syntax, use the
-                    <filename>devtool undeploy-target --help</filename> command.
-                </note>
             </para>
         </section>
 
@@ -2304,10 +1794,6 @@
                 <literallayout class='monospaced'>
      $ devtool create-workspace
                 </literallayout>
-                <note>
-                    For complete syntax, use the
-                    <filename>devtool create-workspace --help</filename> command.
-                </note>
             </para>
 
             <para>
@@ -2320,6 +1806,54 @@
                 </literallayout>
             </para>
         </section>
+
+        <section id='devtool-get-the-status-of-the-recipes-in-your-workspace'>
+            <title>Get the Status of the Recipes in Your Workspace</title>
+
+            <para>
+                Use the <filename>devtool status</filename> command to
+                list the recipes currently in your workspace.
+                Information includes the paths to their respective
+                external source trees.
+            </para>
+
+            <para>
+                The <filename>devtool status</filename> command has no
+                command-line options:
+                <literallayout class='monospaced'>
+     devtool status
+                </literallayout>
+                Following is sample output after using
+                <link linkend='devtool-adding-a-new-recipe-to-the-workspace'><filename>devtool add</filename></link>
+                to create and add the <filename>mtr_0.86.bb</filename> recipe
+                to the <filename>workspace</filename> directory:
+                <literallayout class='monospaced'>
+     $ devtool status
+     mtr: /home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb)
+     $
+                </literallayout>
+            </para>
+        </section>
+
+        <section id='devtool-search-for-available-target-recipes'>
+            <title>Search for Available Target Recipes</title>
+
+            <para>
+                Use the <filename>devtool search</filename> command to
+                search for available target recipes.
+                The command matches the recipe name, package name,
+                description, and installed files.
+                The command displays the recipe name as a result of a
+                match.
+            </para>
+
+            <para>
+                When you use the <filename>devtool search</filename> command,
+                you must supply a <replaceable>keyword</replaceable>.
+                The command uses the <replaceable>keyword</replaceable> when
+                searching for a match.
+            </para>
+        </section>
     </section>
 
     <section id="using-a-quilt-workflow">
@@ -2541,56 +2075,19 @@
     </para>
 </section>
 
-<section id='image-development-using-hob'>
-    <title>Image Development Using Hob</title>
-
-    <para>
-        The <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink> is a graphical user interface for the
-        OpenEmbedded build system, which is based on BitBake.
-        You can use the Hob to build custom operating system images within the Yocto Project build environment.
-        Hob simply provides a friendly interface over the build system used during development.
-        In other words, building images with the Hob lets you take care of common build tasks more easily.
-    </para>
-
-    <para>
-        For a better understanding of Hob, see the project page at
-        <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'></ulink>
-        on the Yocto Project website.
-        If you follow the "Documentation" link from the Hob page, you will
-        find a short introductory training video on Hob.
-        The following lists some features of Hob:
-        <itemizedlist>
-            <listitem><para>You can setup and run Hob using these commands:
-            <literallayout class='monospaced'>
-     $ source oe-init-build-env
-     $ hob
-            </literallayout></para></listitem>
-            <listitem><para>You can set the
-                <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
-                for which you are building the image.</para></listitem>
-            <listitem><para>You can modify various policy settings such as the
-                package format with which to build,
-                the parallelism BitBake uses, whether or not to build an
-                external toolchain, and which host to build against.
-                </para></listitem>
-            <listitem><para>You can manage
-                <link linkend='understanding-and-creating-layers'>layers</link>.</para></listitem>
-            <listitem><para>You can select a base image and then add extra packages for your custom build.
-                </para></listitem>
-            <listitem><para>You can launch and monitor the build from within Hob.</para></listitem>
-        </itemizedlist>
-    </para>
-</section>
-
 <section id="platdev-appdev-devshell">
     <title>Using a Development Shell</title>
 
     <para>
         When debugging certain commands or even when just editing packages,
         <filename>devshell</filename> can be a useful tool.
-        When you invoke <filename>devshell</filename>, source files are
-        extracted into your working directory and patches are applied.
-        Then, a new terminal is opened and you are placed in the working directory.
+        When you invoke <filename>devshell</filename>, all tasks up to and
+        including
+        <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-patch'><filename>do_patch</filename></ulink>
+        are run for the specified target.
+        Then, a new terminal is opened and you are placed in
+        <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink><filename>}</filename>,
+        the source directory.
         In the new terminal, all the OpenEmbedded build-related environment variables are
         still defined so you can use commands such as <filename>configure</filename> and
         <filename>make</filename>.
@@ -2634,24 +2131,64 @@
     </para>
 
     <para>
-        When you are finished, you just exit the shell or close the terminal window.
+        To manually run a specific task using <filename>devshell</filename>,
+        run the corresponding <filename>run.*</filename> script in
+        the
+        <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/temp</filename>
+        directory (e.g.,
+        <filename>run.do_configure.</filename><replaceable>pid</replaceable>).
+        If a task's script does not exist, which would be the case if the task was
+        skipped by way of the sstate cache, you can create the task by first running
+        it outside of the <filename>devshell</filename>:
+        <literallayout class='monospaced'>
+     $ bitbake -c <replaceable>task</replaceable>
+        </literallayout>
+        <note><title>Notes</title>
+            <itemizedlist>
+                <listitem><para>Execution of a task's <filename>run.*</filename>
+                    script and BitBake's execution of a task are identical.
+                    In other words, running the script re-runs the task
+                    just as it would be run using the
+                    <filename>bitbake -c</filename> command.
+                    </para></listitem>
+                <listitem><para>Any <filename>run.*</filename> file that does not
+                    have a <filename>.pid</filename> extension is a
+                    symbolic link (symlink) to the most recent version of that
+                    file.
+                    </para></listitem>
+            </itemizedlist>
+        </note>
     </para>
 
-    <note>
-        <para>
-            It is worth remembering that when using <filename>devshell</filename>
-            you need to use the full compiler name such as <filename>arm-poky-linux-gnueabi-gcc</filename>
-            instead of just using <filename>gcc</filename>.
-            The same applies to other applications such as <filename>binutils</filename>,
-            <filename>libtool</filename> and so forth.
-            BitBake sets up environment variables such as <filename>CC</filename>
-            to assist applications, such as <filename>make</filename> to find the correct tools.
-        </para>
+    <para>
+        Remember, that the <filename>devshell</filename> is a mechanism that allows
+        you to get into the BitBake task execution environment.
+        And as such, all commands must be called just as BitBake would call them.
+        That means you need to provide the appropriate options for
+        cross-compilation and so forth as applicable.
+    </para>
 
-        <para>
-            It is also worth noting that <filename>devshell</filename> still works over
-            X11 forwarding and similar situations.
-        </para>
+    <para>
+        When you are finished using <filename>devshell</filename>, exit the shell
+        or close the terminal window.
+    </para>
+
+    <note><title>Notes</title>
+        <itemizedlist>
+            <listitem><para>
+                It is worth remembering that when using <filename>devshell</filename>
+                you need to use the full compiler name such as <filename>arm-poky-linux-gnueabi-gcc</filename>
+                instead of just using <filename>gcc</filename>.
+                The same applies to other applications such as <filename>binutils</filename>,
+                <filename>libtool</filename> and so forth.
+                BitBake sets up environment variables such as <filename>CC</filename>
+                to assist applications, such as <filename>make</filename> to find the correct tools.
+                </para></listitem>
+            <listitem><para>
+                It is also worth noting that <filename>devshell</filename> still works over
+                X11 forwarding and similar situations.
+                </para></listitem>
+        </itemizedlist>
     </note>
 </section>
 
diff --git a/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml b/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml
index 70fa969..75c992f 100644
--- a/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml
+++ b/yocto-poky/documentation/dev-manual/dev-manual-newbie.xml
@@ -96,7 +96,10 @@
             <para>
                 For developers who mainly do application level work
                 on top of an existing software stack,
-                here are some practices that work best:
+                the following list shows practices that work best.
+                For information on using a Software Development Kit (SDK), see
+                the
+                <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>:
                 <itemizedlist>
                     <listitem><para>Use a pre-built toolchain that
                         contains the software stack itself.
@@ -106,12 +109,9 @@
                         isolated applications.</para></listitem>
                     <listitem><para>When possible, use the Yocto Project
                         plug-in for the <trademark class='trade'>Eclipse</trademark> IDE
-                        and other pieces of Application Development
-                        Technology (ADT).
+                        and SDK development practices.
                         For more information, see the
-                        "<link linkend='application-development-workflow'>Application
-                        Development Workflow</link>" section as well as the
-                        <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>.
+                        "<ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>".
                         </para></listitem>
                     <listitem><para>Keep your cross-development toolchains
                         updated.
@@ -603,7 +603,7 @@
                 the
                 <link linkend='build-directory'>Build Directory</link>
                 contains user-defined variables that affect every build.
-                The <filename>meta-yocto/conf/distro/poky.conf</filename>
+                The <filename>meta-poky/conf/distro/poky.conf</filename>
                 configuration file defines Yocto "distro" configuration
                 variables used only when building with this policy.
                 Machine configuration files, which
@@ -636,8 +636,6 @@
                         <listitem><para>A relocatable toolchain used outside of
                             BitBake by developers when developing applications
                             that will run on a targeted device.
-                            Sometimes this relocatable cross-development
-                            toolchain is referred to as the meta-toolchain.
                             </para></listitem>
                     </itemizedlist>
                 </para>
@@ -650,8 +648,7 @@
                     section in the Yocto Project Reference Manual.
                     You can also find more information on using the
                     relocatable toolchain in the
-                    <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project
-                    Application Developer's Guide</ulink>.
+                    <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
                 </para></listitem>
             <listitem><para><emphasis>Image:</emphasis>
                 An image is an artifact of the BitBake build process given
@@ -667,10 +664,6 @@
                 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
                 section in the Yocto Project Board Support Packages (BSP)
                 Developer's Guide.</para></listitem>
-            <listitem><para id='meta-toolchain'><emphasis>Meta-Toolchain:</emphasis>
-                A term sometimes used for
-                <link linkend='cross-development-toolchain'>Cross-Development Toolchain</link>.
-                </para></listitem>
             <listitem><para id='metadata'><emphasis>Metadata:</emphasis>
                 The files that BitBake parses when building an image.
                 In general, Metadata includes recipes, classes, and
@@ -983,7 +976,7 @@
             Git uses "branches" to organize different development efforts.
             For example, the <filename>poky</filename> repository has
             several branches that include the current
-            <filename>&DISTRO_NAME;</filename> branch, the
+            <filename>&DISTRO_NAME_NO_CAP;</filename> branch, the
             <filename>master</filename> branch, and many branches for past
             Yocto Project releases.
             You can see all the branches by going to
@@ -1015,14 +1008,14 @@
      $ cd ~
      $ git clone git://git.yoctoproject.org/poky
      $ cd poky
-     $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
+     $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
             </literallayout>
             In this example, the name of the top-level directory of your local
             <link linkend='source-directory'>Source Directory</link>
             is "poky" and the name of that local working area (local branch)
-            you just created and checked out is "&DISTRO_NAME;".
+            you just created and checked out is "&DISTRO_NAME_NO_CAP;".
             The files in your local repository now reflect the same files that
-            are in the "&DISTRO_NAME;" development branch of the
+            are in the "&DISTRO_NAME_NO_CAP;" development branch of the
             Yocto Project's "poky" upstream repository.
             It is important to understand that when you create and checkout a
             local working branch based on a branch name,
@@ -1030,7 +1023,7 @@
             at the time you created your local branch, which could be
             different from the files at the time of a similarly named release.
             In other words, creating and checking out a local branch based on
-            the "&DISTRO_NAME;" branch name is not the same as
+            the "&DISTRO_NAME_NO_CAP;" branch name is not the same as
             cloning and checking out the "master" branch.
             Keep reading to see how you create a local snapshot of a Yocto
             Project Release.
@@ -1049,10 +1042,11 @@
         </para>
 
         <para>
-            Some key tags are <filename>dylan-9.0.4</filename>,
-            <filename>dora-10.0.4</filename>, <filename>daisy-11.0.2</filename>,
-            <filename>dizzy-12.0.0</filename>, and
-            <filename>&DISTRO_NAME;-&POKYVERSION;</filename>.
+            Some key tags are
+            <filename>dizzy-12.0.0</filename>,
+            <filename>fido-13.0.0</filename>,
+            <filename>jethro-14.0.0</filename>, and
+            <filename>&DISTRO_NAME_NO_CAP;-&POKYVERSION;</filename>.
             These tags represent Yocto Project releases.
         </para>
 
@@ -1070,14 +1064,14 @@
      $ cd ~
      $ git clone git://git.yoctoproject.org/poky
      $ cd poky
-     $ git checkout -b my-&DISTRO_NAME;-&POKYVERSION; &DISTRO_NAME;-&POKYVERSION;
+     $ git checkout -b my-&DISTRO_NAME_NO_CAP;-&POKYVERSION; &DISTRO_NAME_NO_CAP;-&POKYVERSION;
             </literallayout>
             In this example, the name of the top-level directory of your local Yocto Project
             Files Git repository is <filename>poky</filename>.
             And, the name of the local branch you have created and checked out is
-            <filename>my-&DISTRO_NAME;-&POKYVERSION;</filename>.
+            <filename>my-&DISTRO_NAME_NO_CAP;-&POKYVERSION;</filename>.
             The files in your repository now exactly match the Yocto Project &DISTRO;
-            Release tag (<filename>&DISTRO_NAME;-&POKYVERSION;</filename>).
+            Release tag (<filename>&DISTRO_NAME_NO_CAP;-&POKYVERSION;</filename>).
             It is important to understand that when you create and checkout a local
             working branch based on a tag, your environment matches a specific point
             in time and not the entire development branch.
@@ -1131,20 +1125,20 @@
                     into the project’s upstream (or master) repository.</para></listitem>
                 <listitem><para><emphasis><filename>git status</filename>:</emphasis> Reports any modified files that
                     possibly need to be staged and committed.</para></listitem>
-                <listitem><para><emphasis><filename>git checkout &lt;branch-name&gt;</filename>:</emphasis> Changes
+                <listitem><para><emphasis><filename>git checkout</filename> <replaceable>branch-name</replaceable>:</emphasis> Changes
                     your working branch.
                     This command is analogous to "cd".</para></listitem>
-                <listitem><para><emphasis><filename>git checkout –b &lt;working-branch&gt;</filename>:</emphasis> Creates
+                <listitem><para><emphasis><filename>git checkout –b</filename> <replaceable>working-branch</replaceable>:</emphasis> Creates
                     a working branch on your local machine where you can isolate work.
                     It is a good idea to use local branches when adding specific features or changes.
                     This way if you do not like what you have done you can easily get rid of the work.</para></listitem>
                 <listitem><para><emphasis><filename>git branch</filename>:</emphasis> Reports
                     existing local branches and
                     tells you the branch in which you are currently working.</para></listitem>
-                <listitem><para><emphasis><filename>git branch -D &lt;branch-name&gt;</filename>:</emphasis>
+                <listitem><para><emphasis><filename>git branch -D</filename> <replaceable>branch-name</replaceable>:</emphasis>
                     Deletes an existing local branch.
                     You need to be in a local branch other than the one you are deleting
-                    in order to delete <filename>&lt;branch-name&gt;</filename>.</para></listitem>
+                    in order to delete <replaceable>branch-name</replaceable>.</para></listitem>
                 <listitem><para><emphasis><filename>git pull</filename>:</emphasis> Retrieves information
                     from an upstream Git
                     repository and places it in your local Git repository.
@@ -1410,7 +1404,7 @@
                 Examine the <filename>maintainers.inc</filename> file, which is
                 located in the
                 <link linkend='source-directory'>Source Directory</link>
-                at <filename>meta-yocto/conf/distro/include</filename>, to
+                at <filename>meta-poky/conf/distro/include</filename>, to
                 see who is responsible for code.
                 </para></listitem>
             <listitem><para><emphasis>Board Support Package (BSP) README Files:</emphasis>
@@ -1454,7 +1448,7 @@
             <listitem><para>For changes to BitBake (anything under the <filename>bitbake</filename>
                 directory), send your patch to the
                 <ulink url='&OE_LISTS_URL;/listinfo/bitbake-devel'>bitbake-devel</ulink> mailing list.</para></listitem>
-            <listitem><para>For changes to <filename>meta-yocto</filename>, send your patch to the
+            <listitem><para>For changes to <filename>meta-poky</filename>, send your patch to the
                 <ulink url='&YOCTO_LISTS_URL;/listinfo/poky'>poky</ulink> mailing list.</para></listitem>
             <listitem><para>For changes to other layers hosted on
                 <filename>yoctoproject.org</filename> (unless the
diff --git a/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml b/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml
index 903028f..41c1829 100644
--- a/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml
+++ b/yocto-poky/documentation/dev-manual/dev-manual-qemu.xml
@@ -47,11 +47,10 @@
 
     <para>
         QEMU is made available with the Yocto Project a number of ways.
-        The easiest and recommended method for getting QEMU is to run the
-        ADT installer.  For more information on how to make sure you have
+        One method is to install a Software Development Kit (SDK).
+        For more information on how to make sure you have
         QEMU available, see the
-        "<ulink url='&YOCTO_DOCS_ADT_URL;#the-qemu-emulator'>The QEMU Emulator</ulink>"
-        section in the Yocto Project Application Developer's Guide.
+        <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
     </para>
 </section>
 
diff --git a/yocto-poky/documentation/dev-manual/dev-manual-start.xml b/yocto-poky/documentation/dev-manual/dev-manual-start.xml
index db989b7..23bf8eb 100644
--- a/yocto-poky/documentation/dev-manual/dev-manual-start.xml
+++ b/yocto-poky/documentation/dev-manual/dev-manual-start.xml
@@ -221,10 +221,8 @@
                 </literallayout>
                 where <replaceable>bsp_name</replaceable> is the recognized
                 BSP name.
-                Here are some examples:
+                Here is an example:
                 <literallayout class='monospaced'>
-     meta-crownbay
-     meta-emenlow
      meta-raspberrypi
                 </literallayout>
                 See the
@@ -263,11 +261,12 @@
      $ cd ~/poky
      $ git clone git://git.yoctoproject.org/meta-intel.git
      Cloning into 'meta-intel'...
-     remote: Counting objects: 8844, done.
-     remote: Compressing objects: 100% (2864/2864), done.
-     remote: Total 8844 (delta 4931), reused 8780 (delta 4867)
-     Receiving objects: 100% (8844/8844), 2.48 MiB | 264 KiB/s, done.
-     Resolving deltas: 100% (4931/4931), done.
+     remote: Counting objects: 11917, done.
+     remote: Compressing objects: 100% (3842/3842), done.
+     remote: Total 11917 (delta 6840), reused 11699 (delta 6622)
+     Receiving objects: 100% (11917/11917), 2.92 MiB | 2.88 MiB/s, done.
+     Resolving deltas: 100% (6840/6840), done.
+     Checking connectivity... done.
                 </literallayout></para>
 
                 <para>The same
@@ -279,8 +278,9 @@
                 applications using the Eclipse Integrated Development Environment (IDE),
                 you will need this plug-in.
                 See the
-                "<link linkend='setting-up-the-eclipse-ide'>Setting up the Eclipse IDE</link>"
-                section for more information.</para></listitem>
+                "<ulink url='&YOCTO_DOCS_SDK_URL;#setting-up-the-eclipse-ide'>Setting up the Eclipse IDE</ulink>"
+                section in the Yocto Project Software Development Kit (SDK)
+                Developer's Guide for more information.</para></listitem>
         </itemizedlist>
     </para>
 </section>
@@ -341,14 +341,17 @@
     </para>
 
     <para>
-        Using a pre-built binary is ideal for developing software applications to run on your
-        target hardware.
-        To do this, you need to be able to access the appropriate cross-toolchain tarball for
-        the architecture on which you are developing.
-        If you are using an SDK type image, the image ships with the complete toolchain native to
-        the architecture.
-        If you are not using an SDK type image, you need to separately download and
-        install the stand-alone Yocto Project cross-toolchain tarball.
+        Using a pre-built binary is ideal for developing software
+        applications to run on your target hardware.
+        To do this, you need to be able to access the appropriate
+        cross-toolchain tarball for the architecture on which you are
+        developing.
+        If you are using an SDK type image, the image ships with the complete
+        toolchain native to the architecture (i.e. a toolchain designed to
+        run on the
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>).
+        If you are not using an SDK type image, you need to separately download
+        and install the stand-alone Yocto Project cross-toolchain tarball.
     </para>
 
     <para>
@@ -363,8 +366,7 @@
         by sourcing an environment setup script.
         Finally, you start the QEMU emulator.
         You can find details on all these steps in the
-        "<ulink url='&YOCTO_DOCS_QS_URL;#using-pre-built'>Example Using Pre-Built Binaries and QEMU</ulink>"
-        section of the Yocto Project Application Developer's Guide.
+        <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
         You can learn more about using QEMU with the Yocto Project in the
         "<link linkend='dev-manual-qemu'>Using the Quick EMUlator (QEMU)</link>"
         section.
diff --git a/yocto-poky/documentation/dev-manual/dev-manual.xml b/yocto-poky/documentation/dev-manual/dev-manual.xml
index 3ddd01f..791a8cb 100644
--- a/yocto-poky/documentation/dev-manual/dev-manual.xml
+++ b/yocto-poky/documentation/dev-manual/dev-manual.xml
@@ -81,6 +81,11 @@
                 <date>October 2015</date>
                 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
             </revision>
+            <revision>
+                <revnumber>2.1</revnumber>
+                <date>April 2016</date>
+                <revremark>Released with the Yocto Project 2.1 Release.</revremark>
+            </revision>
         </revhistory>
 
     <copyright>
diff --git a/yocto-poky/documentation/dev-manual/dev-style.css b/yocto-poky/documentation/dev-manual/dev-style.css
index b900ffc..6d0aa8e 100644
--- a/yocto-poky/documentation/dev-manual/dev-style.css
+++ b/yocto-poky/documentation/dev-manual/dev-style.css
@@ -730,6 +730,10 @@
   border-color: black;
 }
 
+.writernotes {
+  color: red;
+}
+
 
   /*********** /
  /  graphics  /
diff --git a/yocto-poky/documentation/dev-manual/figures/app-dev-flow.png b/yocto-poky/documentation/dev-manual/figures/app-dev-flow.png
deleted file mode 100644
index ec93374..0000000
--- a/yocto-poky/documentation/dev-manual/figures/app-dev-flow.png
+++ /dev/null
Binary files differ
diff --git a/yocto-poky/documentation/dev-manual/figures/build-workspace-directory.png b/yocto-poky/documentation/dev-manual/figures/build-workspace-directory.png
index f561f8f..5387d33 100644
--- a/yocto-poky/documentation/dev-manual/figures/build-workspace-directory.png
+++ b/yocto-poky/documentation/dev-manual/figures/build-workspace-directory.png
Binary files differ
diff --git a/yocto-poky/documentation/dev-manual/figures/devtool-add-flow.png b/yocto-poky/documentation/dev-manual/figures/devtool-add-flow.png
new file mode 100644
index 0000000..c09e60e
--- /dev/null
+++ b/yocto-poky/documentation/dev-manual/figures/devtool-add-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/dev-manual/figures/devtool-modify-flow.png b/yocto-poky/documentation/dev-manual/figures/devtool-modify-flow.png
new file mode 100644
index 0000000..cd7f4d0
--- /dev/null
+++ b/yocto-poky/documentation/dev-manual/figures/devtool-modify-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/dev-manual/figures/devtool-upgrade-flow.png b/yocto-poky/documentation/dev-manual/figures/devtool-upgrade-flow.png
new file mode 100644
index 0000000..d25168c
--- /dev/null
+++ b/yocto-poky/documentation/dev-manual/figures/devtool-upgrade-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml b/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml
index 4fdb853..9e15f17 100644
--- a/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml
+++ b/yocto-poky/documentation/kernel-dev/kernel-dev-advanced.xml
@@ -29,8 +29,8 @@
         source Git repositories.
         This Metadata defines Board Support Packages (BSPs) that
         correspond to definitions in linux-yocto recipes for the same BSPs.
-        A BSP consists of an aggregation of kernel policy and hardware-specific
-        feature enablements.
+        A BSP consists of an aggregation of kernel policy and enabled
+        hardware-specific features.
         The BSP can be influenced from within the linux-yocto recipe.
         <note>
             Linux kernel source that contains kernel Metadata is said to be
@@ -171,8 +171,8 @@
     <title>Kernel Metadata Location</title>
 
     <para>
-        Kernel Metadata can be defined in either the kernel recipe
-        (recipe-space) or in the kernel tree (in-tree).
+        Kernel Metadata always exists outside of the kernel tree either
+        defined in a kernel recipe (recipe-space) or outside of the recipe.
         Where you choose to define the Metadata depends on what you want
         to do and how you intend to work.
         Regardless of where you define the kernel Metadata, the syntax used
@@ -195,10 +195,10 @@
     <para>
         Conversely, if you are actively developing a kernel and are already
         maintaining a Linux kernel Git repository of your own, you might find
-        it more convenient to work with the kernel Metadata in the same
-        repository as the Linux kernel sources.
-        This method can make iterative development of the Linux kernel
-        more efficient outside of the BitBake environment.
+        it more convenient to work with kernel Metadata kept outside the
+        recipe-space.
+        Working with Metadata in this area can make iterative development of
+        the Linux kernel more efficient outside of the BitBake environment.
     </para>
 
     <section id='recipe-space-metadata'>
@@ -249,38 +249,52 @@
         </para>
     </section>
 
-    <section id='in-tree-metadata'>
-        <title>In-Tree Metadata</title>
+    <section id='metadata-outside-the-recipe-space'>
+        <title>Metadata Outside the Recipe-Space</title>
 
         <para>
-            When stored in-tree, the kernel Metadata files reside in the
-            <filename>meta</filename> directory of the Linux kernel sources.
-            The <filename>meta</filename> directory can be present in the
-            same repository branch as the sources,
-            such as "master", or <filename>meta</filename> can be its own
-            orphan branch.
-            <note>
-                An orphan branch in Git is a branch with unique history and
-                content to the other branches in the repository.
-                Orphan branches are useful to track Metadata changes
-                independently from the sources of the Linux kernel, while
-                still keeping them together in the same repository.
-            </note>
-            For the purposes of this document, we will discuss all
-            in-tree Metadata as residing below the
-            <filename>meta/cfg/kernel-cache</filename> directory.
+            When stored outside of the recipe-space, the kernel Metadata
+            files reside in a separate repository.
+            The OpenEmbedded build system adds the Metadata to the build as
+            a "ktype=meta" repository through the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+            variable.
+            As an example, consider the following <filename>SRC_URI</filename>
+            statement from the <filename>linux-yocto_4.4.bb</filename>
+            kernel recipe:
+            <literallayout class='monospaced'>
+     SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \
+                git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
+            </literallayout>
+            <filename>${KMETA}</filename>, in this context, is simply used to
+            name the directory into which the Git fetcher places the Metadata.
+            This behavior is no different than any multi-repository
+            <filename>SRC_URI</filename> statement used in a recipe.
         </para>
 
         <para>
+            You can keep kernel Metadata in a "kernel-cache", which is a
+            directory containing configuration fragments.
+            As with any Metadata kept outside the recipe-space, you simply
+            need to use the <filename>SRC_URI</filename> statement with the
+            "type=kmeta" attribute.
+            Doing so makes the kernel Metadata available during the
+            configuration phase.
+        </para>
+
+<!--
+
+
+        <para>
             Following is an example that shows how a trivial tree of Metadata
             is stored in a custom Linux kernel Git repository:
             <literallayout class='monospaced'>
      meta/
-     `-- cfg
-         `-- kernel-cache
-             |-- bsp-standard.scc
-             |-- bsp.cfg
-             `-- standard.cfg
+     `&dash;&dash; cfg
+         `&dash;&dash; kernel-cache
+             |&dash;&dash; bsp-standard.scc
+             |&dash;&dash; bsp.cfg
+             `&dash;&dash; standard.cfg
             </literallayout>
         </para>
 
@@ -301,16 +315,15 @@
             orphan <filename>meta</filename> branch, use these commands
             from within your Linux kernel Git repository:
             <literallayout class='monospaced'>
-     $ git checkout --orphan meta
+     $ git checkout &dash;&dash;orphan meta
      $ git rm -rf .
-     $ git commit --allow-empty -m "Create orphan meta branch"
+     $ git commit &dash;&dash;allow-empty -m "Create orphan meta branch"
             </literallayout>
         </para>
+-->
 
         <para>
-            If you modify the Metadata in the linux-yocto
-            <filename>meta</filename> branch, you must not forget to update
-            the
+            If you modify the Metadata, you must not forget to update the
             <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
             statements in the kernel's recipe.
             In particular, you need to update the
@@ -437,7 +450,7 @@
         if you are creating Metadata in
         <link linkend='recipe-space-metadata'>recipe-space</link>,
         or <filename>meta/cfg/kernel-cache/</filename> if you are creating
-        Metadata <link linkend='in-tree-metadata'>in-tree</link>.
+        <link linkend='metadata-outside-the-recipe-space'>Metadata outside of the recipe-space</link>.
     </para>
 
     <section id='configuration'>
diff --git a/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml b/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml
index ab7f80f..261471c 100644
--- a/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml
+++ b/yocto-poky/documentation/kernel-dev/kernel-dev-common.xml
@@ -270,11 +270,12 @@
                 edit the recipe that builds your kernel so that it has the
                 following command form:
                 <literallayout class='monospaced'>
-     KBUILD_DEFCONFIG_<ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'>KMACHINE</ulink> ?= <replaceable>defconfig_file</replaceable>
+     KBUILD_DEFCONFIG_KMACHINE ?= <replaceable>defconfig_file</replaceable>
                 </literallayout>
                 You need to append the variable with
-                <filename>KMACHINE</filename> and then supply the path to
-                your "in-tree" <filename>defconfig</filename> file.
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>
+                and then supply the path to your "in-tree"
+                <filename>defconfig</filename> file.
             </para>
 
             <para>
@@ -1031,6 +1032,127 @@
             </para>
         </section>
     </section>
+
+    <section id='adding-recipe-space-kernel-features'>
+        <title>Adding Recipe-Space Kernel Features</title>
+
+        <para>
+            You can add kernel features in the
+            <link linkend='recipe-space-metadata'>recipe-space</link> by
+            using the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
+            variable and by specifying the feature's <filename>.scc</filename>
+            file path in the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+            statement.
+            When you add features using this method, the OpenEmbedded build
+            system checks to be sure the features are present.
+            If the features are not present, the build stops.
+            Kernel features are the last elements processed for configuring
+            and patching the kernel.
+            Therefore, adding features in this manner is a way
+            to enforce specific features are present and enabled
+            without needing to do a full audit of any other layer's additions
+            to the <filename>SRC_URI</filename> statement.
+        </para>
+
+        <para>
+            You add a kernel feature by providing the feature as part of the
+            <filename>KERNEL_FEATURES</filename> variable and by providing the
+            path to the feature's <filename>.scc</filename> file, which is
+            relative to the root of the kernel Metadata.
+            The OpenEmbedded build system searches all forms of kernel
+            Metadata on the <filename>SRC_URI</filename> statement regardless
+            of whether the Metadata is in the "kernel-cache", system kernel
+            Metadata, or a recipe-space Metadata.
+            See the
+            "<link linkend='kernel-metadata-location'>Kernel Metadata Location</link>"
+            section for additional information.
+        </para>
+
+        <para>
+            When you specify the feature's <filename>.scc</filename> file
+            on the <filename>SRC_URI</filename> statement, the OpenEmbedded
+            build system adds the directory of that
+            <filename>.scc</filename> file along with all its subdirectories
+            to the kernel feature search path.
+            Because subdirectories are searched, you can reference a single
+            <filename>.scc</filename> file in the
+            <filename>SRC_URI</filename> statement to reference multiple kernel
+            features.
+        </para>
+
+        <para>
+            Consider the following example that adds the "test.scc" feature
+            to the build.
+            <orderedlist>
+                <listitem><para>
+                    Create a <filename>.scc</filename> file and locate it
+                    just as you would any other patch file,
+                    <filename>.cfg</filename> file, or fetcher item
+                    you specify in the <filename>SRC_URI</filename>
+                    statement.
+                    <note><title>Notes</title>
+                        <itemizedlist>
+                            <listitem><para>
+                                You must add the directory of the
+                                <filename>.scc</filename> file to the fetcher's
+                                search path in the same manner as you would
+                                add a <filename>.patch</filename> file.
+                                </para></listitem>
+                            <listitem><para>
+                                You can create additional
+                                <filename>.scc</filename> files beneath the
+                                directory that contains the file you are
+                                adding.
+                                All subdirectories are searched during the
+                                build as potential feature directories.
+                                </para></listitem>
+                        </itemizedlist>
+                    </note>
+                    Continuing with the example, suppose the "test.scc"
+                    feature you are adding has a
+                    <filename>test.scc</filename> file in the following
+                    directory:
+                    <literallayout class='monospaced'>
+     <replaceable>my_recipe</replaceable>
+        |
+        +-linux-yocto
+           |
+           +-test.cfg
+           +-test.scc
+                    </literallayout>
+                    In this example, the <filename>linux-yocto</filename>
+                    directory has both the feature
+                    <filename>test.scc</filename> file and a similarly
+                    named configuration fragment file
+                    <filename>test.cfg</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    Add the <filename>.scc</filename> file to the
+                    recipe's <filename>SRC_URI</filename> statement:
+                    <literallayout class='monospaced'>
+     SRC_URI_append = " file://test.scc"
+                    </literallayout>
+                    The leading space before the path is important as the
+                    path is appended to the existing path.
+                    </para></listitem>
+                <listitem><para>
+                    Specify the feature as a kernel feature:
+                    <literallayout class='monospaced'>
+     KERNEL_FEATURES_append = " test.scc"
+                    </literallayout>
+                    The OpenEmbedded build system processes the kernel feature
+                    when it builds the kernel.
+                    <note>
+                        If other features are contained below "test.scc",
+                        then their directories are relative to the directory
+                        containing the <filename>test.scc</filename> file.
+                    </note>
+                    </para></listitem>
+            </orderedlist>
+        </para>
+    </section>
 </chapter>
 <!--
 vim: expandtab tw=80 ts=4
diff --git a/yocto-poky/documentation/kernel-dev/kernel-dev.xml b/yocto-poky/documentation/kernel-dev/kernel-dev.xml
index 38850fa..fb11dd1 100644
--- a/yocto-poky/documentation/kernel-dev/kernel-dev.xml
+++ b/yocto-poky/documentation/kernel-dev/kernel-dev.xml
@@ -66,6 +66,11 @@
                 <date>October 2015</date>
                 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
             </revision>
+            <revision>
+                <revnumber>2.1</revnumber>
+                <date>April 2016</date>
+                <revremark>Released with the Yocto Project 2.1 Release.</revremark>
+            </revision>
         </revhistory>
 
     <copyright>
diff --git a/yocto-poky/documentation/mega-manual/figures/adt-title.png b/yocto-poky/documentation/mega-manual/figures/adt-title.png
deleted file mode 100644
index 6e71e41..0000000
--- a/yocto-poky/documentation/mega-manual/figures/adt-title.png
+++ /dev/null
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/app-dev-flow.png b/yocto-poky/documentation/mega-manual/figures/app-dev-flow.png
deleted file mode 100644
index 4927b93..0000000
--- a/yocto-poky/documentation/mega-manual/figures/app-dev-flow.png
+++ /dev/null
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/build-workspace-directory.png b/yocto-poky/documentation/mega-manual/figures/build-workspace-directory.png
index f561f8f..5387d33 100644
--- a/yocto-poky/documentation/mega-manual/figures/build-workspace-directory.png
+++ b/yocto-poky/documentation/mega-manual/figures/build-workspace-directory.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/compatible-layers.png b/yocto-poky/documentation/mega-manual/figures/compatible-layers.png
new file mode 100644
index 0000000..38436b0
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/compatible-layers.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/devtool-add-flow.png b/yocto-poky/documentation/mega-manual/figures/devtool-add-flow.png
new file mode 100644
index 0000000..c09e60e
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/devtool-add-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/devtool-modify-flow.png b/yocto-poky/documentation/mega-manual/figures/devtool-modify-flow.png
new file mode 100644
index 0000000..cd7f4d0
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/devtool-modify-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/devtool-upgrade-flow.png b/yocto-poky/documentation/mega-manual/figures/devtool-upgrade-flow.png
new file mode 100644
index 0000000..d25168c
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/devtool-upgrade-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/image-generation.png b/yocto-poky/documentation/mega-manual/figures/image-generation.png
index ab96258..71a48dc 100644
--- a/yocto-poky/documentation/mega-manual/figures/image-generation.png
+++ b/yocto-poky/documentation/mega-manual/figures/image-generation.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/import-layer.png b/yocto-poky/documentation/mega-manual/figures/import-layer.png
new file mode 100644
index 0000000..436ec7a
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/import-layer.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/new-project.png b/yocto-poky/documentation/mega-manual/figures/new-project.png
new file mode 100644
index 0000000..dbc50b9
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/new-project.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/sdk-devtool-add-flow.png b/yocto-poky/documentation/mega-manual/figures/sdk-devtool-add-flow.png
new file mode 100644
index 0000000..c09e60e
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/sdk-devtool-add-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/sdk-devtool-modify-flow.png b/yocto-poky/documentation/mega-manual/figures/sdk-devtool-modify-flow.png
new file mode 100644
index 0000000..cd06c01
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/sdk-devtool-modify-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/sdk-eclipse-dev-flow.png b/yocto-poky/documentation/mega-manual/figures/sdk-eclipse-dev-flow.png
new file mode 100644
index 0000000..9f986e0
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/sdk-eclipse-dev-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/sdk-environment.png b/yocto-poky/documentation/mega-manual/figures/sdk-environment.png
new file mode 100644
index 0000000..78b8cad
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/sdk-environment.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/sdk-generation.png b/yocto-poky/documentation/mega-manual/figures/sdk-generation.png
old mode 100644
new mode 100755
index c37e274..adbe1f4
--- a/yocto-poky/documentation/mega-manual/figures/sdk-generation.png
+++ b/yocto-poky/documentation/mega-manual/figures/sdk-generation.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/sdk-installed-extensible-sdk-directory.png b/yocto-poky/documentation/mega-manual/figures/sdk-installed-extensible-sdk-directory.png
new file mode 100644
index 0000000..99e07ce
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/sdk-installed-extensible-sdk-directory.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/sdk-installed-standard-sdk-directory.png b/yocto-poky/documentation/mega-manual/figures/sdk-installed-standard-sdk-directory.png
new file mode 100644
index 0000000..d4af850
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/sdk-installed-standard-sdk-directory.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/sdk-title.png b/yocto-poky/documentation/mega-manual/figures/sdk-title.png
new file mode 100644
index 0000000..e9d5b34
--- /dev/null
+++ b/yocto-poky/documentation/mega-manual/figures/sdk-title.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/sdk.png b/yocto-poky/documentation/mega-manual/figures/sdk.png
index a539cc5..5c36b75 100644
--- a/yocto-poky/documentation/mega-manual/figures/sdk.png
+++ b/yocto-poky/documentation/mega-manual/figures/sdk.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/figures/user-configuration.png b/yocto-poky/documentation/mega-manual/figures/user-configuration.png
old mode 100644
new mode 100755
index f2b3f8e..c298401
--- a/yocto-poky/documentation/mega-manual/figures/user-configuration.png
+++ b/yocto-poky/documentation/mega-manual/figures/user-configuration.png
Binary files differ
diff --git a/yocto-poky/documentation/mega-manual/mega-manual.xml b/yocto-poky/documentation/mega-manual/mega-manual.xml
index 5c1faec..154e369 100644
--- a/yocto-poky/documentation/mega-manual/mega-manual.xml
+++ b/yocto-poky/documentation/mega-manual/mega-manual.xml
@@ -50,6 +50,11 @@
                 <date>October 2015</date>
                 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
             </revision>
+            <revision>
+                <revnumber>2.1</revnumber>
+                <date>April 2016</date>
+                <revremark>Released with the Yocto Project 2.1 Release.</revremark>
+            </revision>
        </revhistory>
 
     <copyright>
@@ -97,22 +102,22 @@
     <xi:include
         xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual-qemu.xml"/>
 
-<!-- Includes adt-manual title image and then adt-manual chapters -->
+<!-- Includes sdk-manual title image and then sdk-manual chapters -->
 
     <para>
-        <imagedata fileref="figures/adt-title.png" width="100%" align="left" scalefit="1" />
+        <imagedata fileref="figures/sdk-title.png" width="100%" align="left" scalefit="1" />
     </para>
 
     <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../adt-manual/adt-manual-intro.xml"/>
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-intro.xml"/>
     <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../adt-manual/adt-intro.xml"/>
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-using.xml"/>
     <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../adt-manual/adt-prepare.xml"/>
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-extensible.xml"/>
     <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../adt-manual/adt-package.xml"/>
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-obtain.xml"/>
     <xi:include
-        xmlns:xi="http://www.w3.org/2003/XInclude" href="../adt-manual/adt-command.xml"/>
+        xmlns:xi="http://www.w3.org/2003/XInclude" href="../sdk-manual/sdk-appendix-customizing.xml"/>
 
 <!-- Includes bsp-guide title image and then bsp-guide chapters -->
 
diff --git a/yocto-poky/documentation/poky.ent b/yocto-poky/documentation/poky.ent
index 33d52c0..673ab23 100644
--- a/yocto-poky/documentation/poky.ent
+++ b/yocto-poky/documentation/poky.ent
@@ -1,11 +1,12 @@
-<!ENTITY DISTRO "2.0">
-<!ENTITY DISTRO_COMPRESSED "20">
-<!ENTITY DISTRO_NAME "jethro">
-<!ENTITY YOCTO_DOC_VERSION "2.0">
-<!ENTITY POKYVERSION "14.0.0">
-<!ENTITY POKYVERSION_COMPRESSED "1400">
-<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
-<!ENTITY COPYRIGHT_YEAR "2010-2015">
+<!ENTITY DISTRO "2.1">
+<!ENTITY DISTRO_COMPRESSED "21">
+<!ENTITY DISTRO_NAME_NO_CAP "krogoth">
+<!ENTITY DISTRO_NAME "Krogoth">
+<!ENTITY YOCTO_DOC_VERSION "2.1">
+<!ENTITY POKYVERSION "15.0.0">
+<!ENTITY POKYVERSION_COMPRESSED "1500">
+<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;">
+<!ENTITY COPYRIGHT_YEAR "2010-2016">
 <!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
 <!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
 <!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">
@@ -14,7 +15,7 @@
 <!ENTITY YOCTO_AB_URL "http://autobuilder.yoctoproject.org">
 <!ENTITY YOCTO_GIT_URL "http://git.yoctoproject.org">
 <!ENTITY YOCTO_ADTREPO_URL "http://adtrepo.yoctoproject.org">
-<!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/downloads/core/&DISTRO_NAME;&DISTRO_COMPRESSED;">
+<!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/downloads/core/&DISTRO_NAME_NO_CAP;&DISTRO_COMPRESSED;">
 <!ENTITY OE_HOME_URL "http://www.openembedded.org">
 <!ENTITY OE_LISTS_URL "http://lists.openembedded.org/mailman">
 <!ENTITY OE_DOCS_URL "http://docs.openembedded.org">
@@ -54,6 +55,7 @@
 <!ENTITY YOCTO_DOCS_MM_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/mega-manual/mega-manual.html">
 <!ENTITY YOCTO_DOCS_BB_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/bitbake-user-manual/bitbake-user-manual.html">
 <!ENTITY YOCTO_DOCS_TOAST_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/toaster-manual/toaster-manual.html">
+<!ENTITY YOCTO_DOCS_SDK_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/sdk-manual/sdk-manual.html">
 <!ENTITY YOCTO_ADTPATH_DIR "/opt/poky/&DISTRO;">
 <!ENTITY YOCTO_POKY_TARBALL "&YOCTO_POKY;.tar.bz2">
 <!ENTITY OE_INIT_PATH "&YOCTO_POKY;/oe-init-build-env">
@@ -62,7 +64,7 @@
      build-essential chrpath socat">
 <!ENTITY FEDORA_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch \
      diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
-     ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue socat \
+     ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue perl-bignum socat \
      findutils which">
 <!ENTITY OPENSUSE_HOST_PACKAGES_ESSENTIAL "python gcc gcc-c++ git chrpath make wget python-xml \
      diffstat makeinfo python-curses patch socat">
diff --git a/yocto-poky/documentation/profile-manual/profile-manual-usage.xml b/yocto-poky/documentation/profile-manual/profile-manual-usage.xml
index 95ad739..310e8f0 100644
--- a/yocto-poky/documentation/profile-manual/profile-manual-usage.xml
+++ b/yocto-poky/documentation/profile-manual/profile-manual-usage.xml
@@ -2169,16 +2169,16 @@
 
      ### Shell environment set up for builds. ###
 
-     You can now run 'bitbake <replaceable>target</replaceable>'
+     You can now run 'bitbake &lt;target&gt;'
 
      Common targets are:
-         core-image-minimal
-         core-image-sato
-         meta-toolchain
-         adt-installer
-         meta-ide-support
+              core-image-minimal
+              core-image-sato
+              meta-toolchain
+              meta-ide-support
 
      You can also run generated qemu images with a command like 'runqemu qemux86'
+
             </literallayout>
             Once you've done that, you can cd to whatever directory
             contains your scripts and use 'crosstap' to run the script:
@@ -2228,541 +2228,6 @@
     </section>
 </section>
 
-<section id='profile-manual-oprofile'>
-    <title>oprofile</title>
-
-    <para>
-        oprofile itself is a command-line application that runs on the
-        target system.
-    </para>
-
-    <section id='oprofile-setup'>
-        <title>Setup</title>
-
-        <para>
-            For this section, we'll assume you've already performed the
-            basic setup outlined in the
-            "<link linkend='profile-manual-general-setup'>General Setup</link>"
-            section.
-        </para>
-
-        <para>
-            For the section that deals with running oprofile from the command-line,
-            we assume you've ssh'ed to the host and will be running
-            oprofile on the target.
-        </para>
-
-        <para>
-            oprofileui (oprofile-viewer) is a GUI-based program that runs
-            on the host and interacts remotely with the target.
-            See the oprofileui section for the exact steps needed to
-            install oprofileui on the host.
-        </para>
-    </section>
-
-    <section id='oprofile-basic-usage'>
-        <title>Basic Usage</title>
-
-        <para>
-            Oprofile as configured in Yocto is a system-wide profiler
-            (i.e. the version in Yocto doesn't yet make use of the
-            perf_events interface which would allow it to profile
-            specific processes and workloads). It relies on hardware
-            counter support in the hardware (but can fall back to a
-            timer-based mode), which means that it doesn't take
-            advantage of tracepoints or other event sources for example.
-        </para>
-
-        <para>
-            It consists of a kernel module that collects samples and a
-            userspace daemon that writes the sample data to disk.
-        </para>
-
-        <para>
-            The 'opcontrol' shell script is used for transparently
-            managing these components and starting and stopping
-            profiles, and the 'opreport' command is used to
-            display the results.
-        </para>
-
-        <para>
-            The oprofile daemon should already be running, but before
-            you start profiling, you may need to change some settings
-            and some of these settings may require the daemon to not
-            be running. One of these settings is the path to the
-            vmlinux file, which you'll want to set using the --vmlinux
-            option if you want the kernel profiled:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opcontrol --vmlinux=/boot/vmlinux-`uname -r`
-     The profiling daemon is currently active, so changes to the configuration
-     will be used the next time you restart oprofile after a --shutdown or --deinit.
-            </literallayout>
-            You can check if vmlinux file: is set using opcontrol --status:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opcontrol --status
-     Daemon paused: pid 1334
-     Separate options: library
-     vmlinux file: none
-     Image filter: none
-     Call-graph depth: 6
-            </literallayout>
-            If it's not, you need to shutdown the daemon, add the setting
-            and restart the daemon:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opcontrol --shutdown
-     Killing daemon.
-
-     root@crownbay:~# opcontrol --vmlinux=/boot/vmlinux-`uname -r`
-     root@crownbay:~# opcontrol --start-daemon
-     Using default event: CPU_CLK_UNHALTED:100000:0:1:1
-     Using 2.6+ OProfile kernel interface.
-     Reading module info.
-     Using log file /var/lib/oprofile/samples/oprofiled.log
-     Daemon started.
-            </literallayout>
-            If we check the status again we now see our updated settings:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opcontrol --status
-     Daemon paused: pid 1649
-     Separate options: library
-     vmlinux file: /boot/vmlinux-3.4.11-yocto-standard
-     Image filter: none
-     Call-graph depth: 6
-            </literallayout>
-            We're now in a position to run a profile. For that we use
-            'opcontrol --start':
-            <literallayout class='monospaced'>
-     root@crownbay:~# opcontrol --start
-     Profiler running.
-            </literallayout>
-            In another window, run our wget workload:
-            <literallayout class='monospaced'>
-     root@crownbay:~# rm linux-2.6.19.2.tar.bz2; wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>; sync
-     Connecting to downloads.yoctoproject.org (140.211.169.59:80)
-     linux-2.6.19.2.tar.b 100% |*******************************| 41727k  0:00:00 ETA
-            </literallayout>
-            To stop the profile we use 'opcontrol --shutdown', which not
-            only stops the profile but shuts down the daemon as well:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opcontrol --shutdown
-     Stopping profiling.
-     Killing daemon.
-            </literallayout>
-            Oprofile writes sample data to /var/lib/oprofile/samples,
-            which you can look at if you're interested in seeing how the
-            samples are structured. This is also interesting because
-            it's related to how you dive down to get further details
-            about specific executables in OProfile.
-        </para>
-
-        <para>
-            To see the default display output for a profile, simply type
-            'opreport', which will show the results using the data in
-            /var/lib/oprofile/samples:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opreport
-
-     WARNING! The OProfile kernel driver reports sample buffer overflows.
-     Such overflows can result in incorrect sample attribution, invalid sample
-     files and other symptoms.  See the oprofiled.log for details.
-     You should adjust your sampling frequency to eliminate (or at least minimize)
-     these overflows.
-     CPU: Intel Architectural Perfmon, speed 1.3e+06 MHz (estimated)
-     Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
-     CPU_CLK_UNHALT...|
-      samples|      %|
-     ------------------
-       464365 79.8156 vmlinux-3.4.11-yocto-standard
-        65108 11.1908 oprofiled
-	     CPU_CLK_UNHALT...|
-	       samples|      %|
- 	     ------------------
- 	         64416 98.9372 oprofiled
- 	           692  1.0628 libc-2.16.so
-        36959  6.3526 no-vmlinux
-         4378  0.7525 busybox
-	     CPU_CLK_UNHALT...|
-	       samples|      %|
-	     ------------------
-	          2844 64.9612 libc-2.16.so
-	          1337 30.5391 busybox
-	           193  4.4084 ld-2.16.so
-	             2  0.0457 libnss_compat-2.16.so
-	             1  0.0228 libnsl-2.16.so
-	             1  0.0228 libnss_files-2.16.so
-         4344  0.7467 bash
-	     CPU_CLK_UNHALT...|
-	       samples|      %|
-	     ------------------
-	          2657 61.1648 bash
-	          1665 38.3287 libc-2.16.so
-	            18  0.4144 ld-2.16.so
-	             3  0.0691 libtinfo.so.5.9
-	             1  0.0230 libdl-2.16.so
-         3118  0.5359 nf_conntrack
-          686  0.1179 matchbox-terminal
-	     CPU_CLK_UNHALT...|
-	       samples|      %|
-	     ------------------
-	           214 31.1953 libglib-2.0.so.0.3200.4
-	           114 16.6181 libc-2.16.so
-	            79 11.5160 libcairo.so.2.11200.2
-	            78 11.3703 libgdk-x11-2.0.so.0.2400.8
-	            51  7.4344 libpthread-2.16.so
-	            45  6.5598 libgobject-2.0.so.0.3200.4
-	            29  4.2274 libvte.so.9.2800.2
-	            25  3.6443 libX11.so.6.3.0
-	            19  2.7697 libxcb.so.1.1.0
-	            17  2.4781 libgtk-x11-2.0.so.0.2400.8
-	            12  1.7493 librt-2.16.so
-	             3  0.4373 libXrender.so.1.3.0
-          671  0.1153 emgd
-          411  0.0706 nf_conntrack_ipv4
-          391  0.0672 iptable_nat
-          378  0.0650 nf_nat
-          263  0.0452 Xorg
-	     CPU_CLK_UNHALT...|
-	       samples|      %|
-	     ------------------
-	           106 40.3042 Xorg
-	            53 20.1521 libc-2.16.so
-	            31 11.7871 libpixman-1.so.0.27.2
-	            26  9.8859 emgd_drv.so
-	            16  6.0837 libemgdsrv_um.so.1.5.15.3226
-	            11  4.1825 libEMGD2d.so.1.5.15.3226
-	             9  3.4221 libfb.so
-	             7  2.6616 libpthread-2.16.so
-	             1  0.3802 libudev.so.0.9.3
-	             1  0.3802 libdrm.so.2.4.0
-	             1  0.3802 libextmod.so
-	             1  0.3802 mouse_drv.so
-     .
-     .
-     .
-           9  0.0015 connmand
-	     CPU_CLK_UNHALT...|
-	       samples|      %|
-	     ------------------
-	             4 44.4444 libglib-2.0.so.0.3200.4
-	             2 22.2222 libpthread-2.16.so
-	             1 11.1111 connmand
-	             1 11.1111 libc-2.16.so
-	             1 11.1111 librt-2.16.so
-            6  0.0010 oprofile-server
-     	 CPU_CLK_UNHALT...|
-	       samples|      %|
-	     ------------------
-	             3 50.0000 libc-2.16.so
-	             1 16.6667 oprofile-server
-	             1 16.6667 libpthread-2.16.so
-	             1 16.6667 libglib-2.0.so.0.3200.4
-           5 8.6e-04 gconfd-2
-	     CPU_CLK_UNHALT...|
-	       samples|      %|
-	     ------------------
-	             2 40.0000 libdbus-1.so.3.7.2
-	             2 40.0000 libglib-2.0.so.0.3200.4
-	             1 20.0000 libc-2.16.so
-            </literallayout>
-            The output above shows the breakdown or samples by both
-            number of samples and percentage for each executable.
-            Within an executable, the sample counts are broken down
-            further into executable and shared libraries (DSOs) used
-            by the executable.
-        </para>
-
-        <para>
-            To get even more detailed breakdowns by function, we need to
-            have the full paths to the DSOs, which we can get by
-            using -f with opreport:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opreport -f
-
-     CPU: Intel Architectural Perfmon, speed 1.3e+06 MHz (estimated)
-     Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
-     CPU_CLK_UNHALT...|
-      samples|      %|
-
-       464365 79.8156 /boot/vmlinux-3.4.11-yocto-standard
-       65108 11.1908 /usr/bin/oprofiled
-	     CPU_CLK_UNHALT...|
-	       samples|      %|
-	     ------------------
-	         64416 98.9372 /usr/bin/oprofiled
-	           692  1.0628 /lib/libc-2.16.so
-        36959  6.3526 /no-vmlinux
-         4378  0.7525 /bin/busybox
-	     CPU_CLK_UNHALT...|
-	       samples|      %|
-	     ------------------
-	          2844 64.9612 /lib/libc-2.16.so
-	          1337 30.5391 /bin/busybox
-	           193  4.4084 /lib/ld-2.16.so
-	             2  0.0457 /lib/libnss_compat-2.16.so
-	             1  0.0228 /lib/libnsl-2.16.so
-	             1  0.0228 /lib/libnss_files-2.16.so
-         4344  0.7467 /bin/bash
-	     CPU_CLK_UNHALT...|
-	       samples|      %|
-	     ------------------
-	          2657 61.1648 /bin/bash
-	          1665 38.3287 /lib/libc-2.16.so
-	            18  0.4144 /lib/ld-2.16.so
-	             3  0.0691 /lib/libtinfo.so.5.9
-	             1  0.0230 /lib/libdl-2.16.so
-     .
-     .
-     .
-            </literallayout>
-            Using the paths shown in the above output and the -l option to
-            opreport, we can see all the functions that have hits in the
-            profile and their sample counts and percentages. Here's a
-            portion of what we get for the kernel:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opreport -l /boot/vmlinux-3.4.11-yocto-standard
-
-     CPU: Intel Architectural Perfmon, speed 1.3e+06 MHz (estimated)
-     Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
-     samples  %        symbol name
-     233981   50.3873  intel_idle
-     15437     3.3243  rb_get_reader_page
-     14503     3.1232  ring_buffer_consume
-     14092     3.0347  mutex_spin_on_owner
-     13024     2.8047  read_hpet
-     8039      1.7312  sub_preempt_count
-     7096      1.5281  ioread32
-     6997      1.5068  add_preempt_count
-     3985      0.8582  rb_advance_reader
-     3488      0.7511  add_event_entry
-     3303      0.7113  get_parent_ip
-     3104      0.6684  rb_buffer_peek
-     2960      0.6374  op_cpu_buffer_read_entry
-     2614      0.5629  sync_buffer
-     2545      0.5481  debug_smp_processor_id
-     2456      0.5289  ohci_irq
-     2397      0.5162  memset
-     2349      0.5059  __copy_to_user_ll
-     2185      0.4705  ring_buffer_event_length
-     1918      0.4130  in_lock_functions
-     1850      0.3984  __schedule
-     1767      0.3805  __copy_from_user_ll_nozero
-     1575      0.3392  rb_event_data_length
-     1256      0.2705  memcpy
-     1233      0.2655  system_call
-     1213      0.2612  menu_select
-            </literallayout>
-            Notice that above we see an entry for the __copy_to_user_ll()
-            function that we've looked at with other profilers as well.
-        </para>
-
-        <para>
-            Here's what we get when we do the same thing for the
-            busybox executable:
-            <literallayout class='monospaced'>
-     CPU: Intel Architectural Perfmon, speed 1.3e+06 MHz (estimated)
-     Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
-     samples  %        image name               symbol name
-     349       8.4198  busybox                  retrieve_file_data
-     308       7.4306  libc-2.16.so             _IO_file_xsgetn
-     283       6.8275  libc-2.16.so             __read_nocancel
-     235       5.6695  libc-2.16.so             syscall
-     233       5.6212  libc-2.16.so             clearerr
-     215       5.1870  libc-2.16.so             fread
-     181       4.3667  libc-2.16.so             __write_nocancel
-     158       3.8118  libc-2.16.so             __underflow
-     151       3.6429  libc-2.16.so             _dl_addr
-     150       3.6188  busybox                  progress_meter
-     150       3.6188  libc-2.16.so             __poll_nocancel
-     148       3.5706  libc-2.16.so             _IO_file_underflow@@GLIBC_2.1
-     137       3.3052  busybox                  safe_poll
-     125       3.0157  busybox                  bb_progress_update
-     122       2.9433  libc-2.16.so             __x86.get_pc_thunk.bx
-     95        2.2919  busybox                  full_write
-     81        1.9542  busybox                  safe_write
-     77        1.8577  busybox                  xwrite
-     72        1.7370  libc-2.16.so             _IO_file_read
-     71        1.7129  libc-2.16.so             _IO_sgetn
-     67        1.6164  libc-2.16.so             poll
-     52        1.2545  libc-2.16.so             _IO_switch_to_get_mode
-     45        1.0856  libc-2.16.so             read
-     34        0.8203  libc-2.16.so             write
-     32        0.7720  busybox                  monotonic_sec
-     25        0.6031  libc-2.16.so             vfprintf
-     22        0.5308  busybox                  get_mono
-     14        0.3378  ld-2.16.so               strcmp
-     14        0.3378  libc-2.16.so             __x86.get_pc_thunk.cx
-     .
-     .
-     .
-            </literallayout>
-            Since we recorded the profile with a callchain depth of 6, we
-            should be able to see our __copy_to_user_ll() callchains in
-            the output, and indeed we can if we search around a bit in
-            the 'opreport --callgraph' output:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opreport --callgraph /boot/vmlinux-3.4.11-yocto-standard
-
-       392       6.9639  vmlinux-3.4.11-yocto-standard sock_aio_read
-       736      13.0751  vmlinux-3.4.11-yocto-standard __generic_file_aio_write
-       3255     57.8255  vmlinux-3.4.11-yocto-standard inet_recvmsg
-     785       0.1690  vmlinux-3.4.11-yocto-standard tcp_recvmsg
-       1790     31.7940  vmlinux-3.4.11-yocto-standard local_bh_enable
-       1238     21.9893  vmlinux-3.4.11-yocto-standard __kfree_skb
-       992      17.6199  vmlinux-3.4.11-yocto-standard lock_sock_nested
-       785      13.9432  vmlinux-3.4.11-yocto-standard tcp_recvmsg [self]
-       525       9.3250  vmlinux-3.4.11-yocto-standard release_sock
-       112       1.9893  vmlinux-3.4.11-yocto-standard tcp_cleanup_rbuf
-       72        1.2789  vmlinux-3.4.11-yocto-standard skb_copy_datagram_iovec
-
-     170       0.0366  vmlinux-3.4.11-yocto-standard skb_copy_datagram_iovec
-       1491     73.3038  vmlinux-3.4.11-yocto-standard memcpy_toiovec
-       327      16.0767  vmlinux-3.4.11-yocto-standard skb_copy_datagram_iovec
-       170       8.3579  vmlinux-3.4.11-yocto-standard skb_copy_datagram_iovec [self]
-       20        0.9833  vmlinux-3.4.11-yocto-standard copy_to_user
-
-       2588     98.2909  vmlinux-3.4.11-yocto-standard copy_to_user
-     2349      0.5059  vmlinux-3.4.11-yocto-standard __copy_to_user_ll
-       2349     89.2138  vmlinux-3.4.11-yocto-standard __copy_to_user_ll [self]
-       166       6.3046  vmlinux-3.4.11-yocto-standard do_page_fault
-            </literallayout>
-            Remember that by default OProfile sessions are cumulative
-            i.e. if you start and stop a profiling session, then start a
-            new one, the new one will not erase the previous run(s) but
-            will build on it. If you want to restart a profile from scratch,
-            you need to reset:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opcontrol --reset
-            </literallayout>
-        </para>
-    </section>
-
-    <section id='oprofileui-a-gui-for-oprofile'>
-        <title>OProfileUI - A GUI for OProfile</title>
-
-        <para>
-            Yocto also supports a graphical UI for controlling and viewing
-            OProfile traces, called OProfileUI. To use it, you first need
-            to clone the oprofileui git repo, then configure, build, and
-            install it:
-            <literallayout class='monospaced'>
-     [trz@empanada tmp]$ git clone git://git.yoctoproject.org/oprofileui
-     [trz@empanada tmp]$ cd oprofileui
-     [trz@empanada oprofileui]$ ./autogen.sh
-     [trz@empanada oprofileui]$ sudo make install
-            </literallayout>
-            OprofileUI replaces the 'opreport' functionality with a GUI,
-            and normally doesn't require the user to use 'opcontrol' either.
-            If you want to profile the kernel, however, you need to either
-            use the UI to specify a vmlinux or use 'opcontrol' to specify
-            it on the target:
-        </para>
-
-        <para>
-            First, on the target, check if vmlinux file: is set:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opcontrol --status
-            </literallayout>
-            If not:
-            <literallayout class='monospaced'>
-     root@crownbay:~# opcontrol --shutdown
-     root@crownbay:~# opcontrol --vmlinux=/boot/vmlinux-`uname -r`
-     root@crownbay:~# opcontrol --start-daemon
-            </literallayout>
-            Now, start the oprofile UI on the host system:
-            <literallayout class='monospaced'>
-     [trz@empanada oprofileui]$ oprofile-viewer
-            </literallayout>
-            To run a profile on the remote system, first connect to the
-            remote system by pressing the 'Connect' button and supplying
-            the IP address and port of the remote system (the default
-            port is 4224).
-        </para>
-
-        <para>
-            The oprofile server should automatically be started already.
-            If not, the connection will fail and you either typed in the
-            wrong IP address and port (see below), or you need to start
-            the server yourself:
-            <literallayout class='monospaced'>
-     root@crownbay:~# oprofile-server
-            </literallayout>
-            Or, to specify a specific port:
-            <literallayout class='monospaced'>
-     root@crownbay:~# oprofile-server --port 8888
-            </literallayout>
-            Once connected, press the 'Start' button and then run the
-            wget workload on the remote system:
-            <literallayout class='monospaced'>
-     root@crownbay:~# rm linux-2.6.19.2.tar.bz2; wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>; sync
-     Connecting to downloads.yoctoproject.org (140.211.169.59:80)
-     linux-2.6.19.2.tar.b 100% |*******************************| 41727k  0:00:00 ETA
-            </literallayout>
-            Once the workload completes, press the 'Stop' button. At that
-            point the OProfile viewer will download the profile files it's
-            collected (this may take some time, especially if the kernel
-            was profiled). While it downloads the files, you should see
-            something like the following:
-        </para>
-
-        <para>
-            <imagedata fileref="figures/oprofileui-downloading.png" width="6in" depth="7in" align="center" scalefit="1" />
-        </para>
-
-        <para>
-            Once the profile files have been retrieved, you should see a
-            list of the processes that were profiled:
-        </para>
-
-        <para>
-            <imagedata fileref="figures/oprofileui-processes.png" width="6in" depth="7in" align="center" scalefit="1" />
-        </para>
-
-        <para>
-            If you select one of them, you should see all the symbols that
-            were hit during the profile. Selecting one of them will show a
-            list of callers and callees of the chosen function in two
-            panes below the top pane. For example, here's what we see
-            when we select __copy_to_user_ll():
-        </para>
-
-        <para>
-            <imagedata fileref="figures/oprofileui-copy-to-user.png" width="6in" depth="7in" align="center" scalefit="1" />
-        </para>
-
-        <para>
-            As another example, we can look at the busybox process and see
-            that the progress meter made a system call:
-        </para>
-
-        <para>
-            <imagedata fileref="figures/oprofileui-busybox.png" width="6in" depth="7in" align="center" scalefit="1" />
-        </para>
-    </section>
-
-    <section id='oprofile-documentation'>
-        <title>Documentation</title>
-
-        <para>
-            Yocto already has some information on setting up and using
-            OProfile and oprofileui. As this document doesn't cover
-            everything in detail, it may be worth taking a look at the
-            "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-oprofile'>Profiling with OProfile</ulink>"
-            section in the Yocto Project Development Manual
-        </para>
-
-        <para>
-            The OProfile manual can be found here:
-            <ulink url='http://oprofile.sourceforge.net/doc/index.html'>OProfile manual</ulink>
-        </para>
-
-        <para>
-            The OProfile website contains links to the above manual and
-            bunch of other items including an extensive set of examples:
-            <ulink url='http://oprofile.sourceforge.net/about/'>About OProfile</ulink>
-        </para>
-    </section>
-</section>
-
 <section id='profile-manual-sysprof'>
     <title>Sysprof</title>
 
diff --git a/yocto-poky/documentation/profile-manual/profile-manual.xml b/yocto-poky/documentation/profile-manual/profile-manual.xml
index 7f9b2c4..1e0ccc1 100644
--- a/yocto-poky/documentation/profile-manual/profile-manual.xml
+++ b/yocto-poky/documentation/profile-manual/profile-manual.xml
@@ -66,6 +66,11 @@
                 <date>October 2015</date>
                 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
             </revision>
+            <revision>
+                <revnumber>2.1</revnumber>
+                <date>April 2016</date>
+                <revremark>Released with the Yocto Project 2.1 Release.</revremark>
+            </revision>
         </revhistory>
 
     <copyright>
diff --git a/yocto-poky/documentation/ref-manual/closer-look.xml b/yocto-poky/documentation/ref-manual/closer-look.xml
index 45dcd9b..84ff584 100644
--- a/yocto-poky/documentation/ref-manual/closer-look.xml
+++ b/yocto-poky/documentation/ref-manual/closer-look.xml
@@ -73,7 +73,7 @@
         </para>
 
         <para>
-            <imagedata fileref="figures/user-configuration.png" align="center" width="5.5in" depth="3.5in" />
+            <imagedata fileref="figures/user-configuration.png" align="center" />
         </para>
 
         <para>
@@ -100,7 +100,7 @@
         </para>
 
         <para>
-            The <filename>meta-yocto</filename> layer inside Poky contains
+            The <filename>meta-poky</filename> layer inside Poky contains
             a <filename>conf</filename> directory that has example
             configuration files.
             These example files are used as a basis for creating actual
@@ -158,7 +158,7 @@
             To see the default configurations in a <filename>local.conf</filename>
             file created by the build environment script, see the
             <filename>local.conf.sample</filename> in the
-            <filename>meta-yocto</filename> layer:
+            <filename>meta-poky</filename> layer:
             <itemizedlist>
                 <listitem><para><emphasis>Parallelism Options:</emphasis>
                     Controlled by the
@@ -208,8 +208,10 @@
             The files <filename>site.conf</filename> and
             <filename>auto.conf</filename> are not created by the environment
             initialization script.
-            If you want these configuration files, you must create them
-            yourself:
+            If you want the <filename>site.conf</filename> file, you need to
+            create that yourself.
+            The <filename>auto.conf</filename> file is typically created by
+            an autobuilder:
             <itemizedlist>
                 <listitem><para><emphasis><filename>site.conf</filename>:</emphasis>
                     You can use the <filename>conf/site.conf</filename>
@@ -235,8 +237,7 @@
                     directory's <filename>conf/local.conf</filename> file.
                     </para></listitem>
                 <listitem><para><emphasis><filename>auto.conf</filename>:</emphasis>
-                    This file is not hand-created.
-                    Rather, the file is usually created and written to by
+                    The file is usually created and written to by
                     an autobuilder.
                     The settings put into the file are typically the same as
                     you would find in the <filename>conf/local.conf</filename>
@@ -254,9 +255,24 @@
 
         <para>
             When you launch your build with the
-            <filename>bitbake <replaceable>target</replaceable></filename> command, BitBake
-            sorts out the configurations to ultimately define your build
-            environment.
+            <filename>bitbake <replaceable>target</replaceable></filename>
+            command, BitBake sorts out the configurations to ultimately
+            define your build environment.
+            It is important to understand that the OpenEmbedded build system
+            reads the configuration files in a specific order:
+            <filename>site.conf</filename>, <filename>auto.conf</filename>,
+            and <filename>local.conf</filename>.
+            And, the build system applies the normal assignment statement
+            rules.
+            Because the files are parsed in a specific order, variable
+            assignments for the same variable could be affected.
+            For example, if the <filename>auto.conf</filename> file and
+            the <filename>local.conf</filename> set
+            <replaceable>variable1</replaceable> to different values, because
+            the build system parses <filename>local.conf</filename> after
+            <filename>auto.conf</filename>,
+            <replaceable>variable1</replaceable> is assigned the value from
+            the <filename>local.conf</filename> file.
         </para>
     </section>
 
@@ -992,11 +1008,13 @@
 
             <para>
                 The image generation process consists of several stages and
-                depends on many variables.
+                depends on several tasks and variables.
                 The
                 <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
-                task uses these key variables
-                to help create the list of packages to actually install:
+                task creates the root filesystem (file and directory structure)
+                for an image.
+                This task uses several key variables to help create the list
+                of packages to actually install:
                 <itemizedlist>
                     <listitem><para><link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>:
                         Lists out the base set of packages to install from
@@ -1016,23 +1034,34 @@
                         Determines the language(s) for which additional
                         language support packages are installed.
                         </para></listitem>
+                    <listitem><para><link linkend='var-PACKAGE_INSTALL'><filename>PACKAGE_INSTALL</filename></link>:
+                        The final list of packages passed to the package manager
+                        for installation into the image.
+                        </para></listitem>
                 </itemizedlist>
             </para>
 
             <para>
+                With
+                <link linkend='var-IMAGE_ROOTFS'><filename>IMAGE_ROOTFS</filename></link>
+                pointing to the location of the filesystem under construction and
+                the <filename>PACKAGE_INSTALL</filename> variable providing the
+                final list of packages to install, the root file system is
+                created.
+            </para>
+
+            <para>
                 Package installation is under control of the package manager
                 (e.g. smart/rpm, opkg, or apt/dpkg) regardless of whether or
                 not package management is enabled for the target.
                 At the end of the process, if package management is not
                 enabled for the target, the package manager's data files
                 are deleted from the root filesystem.
-            </para>
-
-            <para>
-                During image generation, the build system attempts to run
-                all post-installation scripts.
-                Any that fail to run on the build host are run on the
-                target when the target system is first booted.
+                As part of the final stage of package installation, postinstall
+                scripts that are part of the packages are run.
+                Any scripts that fail to run
+                on the build host are run on the target when the target system
+                is first booted.
                 If you are using a
                 <ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>read-only root filesystem</ulink>,
                 all the post installation scripts must succeed during the
@@ -1041,24 +1070,17 @@
             </para>
 
             <para>
-                During Optimization, optimizing processes are run across
-                the image.
-                These processes include <filename>mklibs</filename> and
-                <filename>prelink</filename>.
-                The <filename>mklibs</filename> process optimizes the size
-                of the libraries.
-                A <filename>prelink</filename> process optimizes the dynamic
-                linking of shared libraries to reduce start up time of
-                executables.
+                The final stages of the <filename>do_rootfs</filename> task
+                handle post processing.
+                Post processing includes creation of a manifest file and
+                optimizations.
             </para>
 
             <para>
-                Along with writing out the root filesystem image, the
-                <filename>do_rootfs</filename> task creates a manifest file
-                (<filename>.manifest</filename>) in the same directory as
-                the root filesystem image that lists out, line-by-line, the
-                installed packages.
-                This manifest file is useful for the
+                The manifest file (<filename>.manifest</filename>) resides
+                in the same directory as the root filesystem image.
+                This file lists out, line-by-line, the installed packages.
+                The manifest file is useful for the
                 <link linkend='ref-classes-testimage*'><filename>testimage</filename></link>
                 class, for example, to determine whether or not to run
                 specific tests.
@@ -1068,21 +1090,54 @@
             </para>
 
             <para>
-                Part of the image generation process includes compressing the
-                root filesystem image.
-                Compression is accomplished through several optimization
-                routines designed to reduce the overall size of the image.
+                Optimizing processes run across the image include
+                <filename>mklibs</filename>, <filename>prelink</filename>,
+                and any other post-processing commands as defined by the
+                <link linkend='var-ROOTFS_POSTPROCESS_COMMAND'><filename>ROOTFS_POSTPROCESS_COMMAND</filename></link>
+                variable.
+                The <filename>mklibs</filename> process optimizes the size
+                of the libraries, while the
+                <filename>prelink</filename> process optimizes the dynamic
+                linking of shared libraries to reduce start up time of
+                executables.
             </para>
 
             <para>
-                After the root filesystem has been constructed, the image
-                generation process turns everything into an image file or
-                a set of image files.
+                After the root filesystem is built, processing begins on
+                the image through the <filename>do_image</filename> task.
+                The build system runs any pre-processing commands as defined
+                by the
+                <link linkend='var-IMAGE_PREPROCESS_COMMAND'><filename>IMAGE_PREPROCESS_COMMAND</filename></link>
+                variable.
+                This variable specifies a list of functions to call before
+                the OpenEmbedded build system creates the final image output
+                files.
+            </para>
+
+            <para>
+                The <filename>do_image</filename> task dynamically creates
+                other <filename>do_image_*</filename> tasks as needed, which
+                include compressing the root filesystem image to reduce the
+                overall size of the image.
+                The process turns everything into an image file or a set of
+                image files.
                 The formats used for the root filesystem depend on the
                 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
                 variable.
             </para>
 
+            <para>
+                The final task involved in image creation is the
+                <filename>do_image_complete</filename> task.
+                This task completes the image by applying any image
+                post processing as defined through the
+                <link linkend='var-IMAGE_POSTPROCESS_COMMAND'><filename>IMAGE_POSTPROCESS_COMMAND</filename></link>
+                variable.
+                The variable specifies a list of functions to call once the
+                OpenEmbedded build system has created the final image output
+                files.
+            </para>
+
             <note>
                 The entire image generation process is run under Pseudo.
                 Running under Pseudo ensures that the files in the root
@@ -1095,8 +1150,9 @@
 
             <para>
                 The OpenEmbedded build system uses BitBake to generate the
-                Software Development Kit (SDK) installer script:
-                <imagedata fileref="figures/sdk-generation.png" align="center" width="6in" depth="7in" />
+                Software Development Kit (SDK) installer script for both the
+                standard and extensible SDKs:
+                <imagedata fileref="figures/sdk-generation.png" align="center" />
             </para>
 
             <note>
@@ -1108,14 +1164,16 @@
                 cross-development toolchain using the
                 <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
                 task, see the
-                "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
-                section in the Yocto Project Application Developer's Guide.
+                "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
+                section in the Yocto Project Software Development Kit (SDK)
+                Developer's Guide.
             </note>
 
             <para>
                 Like image generation, the SDK script process consists of
                 several stages and depends on many variables.
-                The <filename>do_populate_sdk</filename> task uses these
+                The <filename>do_populate_sdk</filename> and
+                <filename>do_populate_sdk_ext</filename> tasks use these
                 key variables to help create the list of packages to actually
                 install.
                 For information on the variables listed in the figure, see the
@@ -1124,8 +1182,9 @@
             </para>
 
             <para>
-                The <filename>do_populate_sdk</filename> task handles two
-                parts: a target part and a host part.
+                The <filename>do_populate_sdk</filename> task helps create
+                the standard SDK and handles two parts: a target part and a
+                host part.
                 The target part is the part built for the target hardware and
                 includes libraries and headers.
                 The host part is the part of the SDK that runs on the
@@ -1133,16 +1192,19 @@
             </para>
 
             <para>
-                Once both parts are constructed, the
-                <filename>do_populate_sdk</filename> task performs some cleanup
-                on both parts.
-                After the cleanup, the task creates a cross-development
-                environment setup script and any configuration files that
-                might be needed.
+                The <filename>do_populate_sdk_ext</filename> task helps create
+                the extensible SDK and handles host and target parts
+                differently than its counter part does for the standard SDK.
+                For the extensible SDK, the task encapsulates the build system,
+                which includes everything needed (host and target) for the SDK.
             </para>
 
             <para>
-                The final output of the task is the Cross-development
+                Regardless of the type of SDK being constructed, the
+                tasks perform some cleanup after which a cross-development
+                environment setup script and any needed configuration files
+                are created.
+                The final output is the Cross-development
                 toolchain installation script (<filename>.sh</filename> file),
                 which includes the environment setup script.
             </para>
@@ -1239,8 +1301,13 @@
             <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
             the output labeled "Application Development SDK" represents an
             SDK.
+            The SDK generation process differs depending on whether you build
+            a standard SDK
+            (e.g. <filename>bitbake -c populate_sdk</filename> <replaceable>imagename</replaceable>)
+            or an extensible SDK
+            (e.g. <filename>bitbake -c populate_sdk_ext</filename> <replaceable>imagename</replaceable>).
             This section is going to take a closer look at this output:
-            <imagedata fileref="figures/sdk.png" align="center" width="5in" depth="4in" />
+            <imagedata fileref="figures/sdk.png" align="center" width="9in" depth="7.25in" />
         </para>
 
         <para>
@@ -1255,20 +1322,16 @@
             part because it runs on the SDK machine.
             You can think of the libraries and headers as the "target"
             part because they are built for the target hardware.
-            The setup script is added so that you can initialize the
-            environment before using the tools.
+            The environment setup script is added so that you can initialize
+            the environment before using the tools.
         </para>
 
         <note>
             <para>
                 The Yocto Project supports several methods by which you can
                 set up this cross-development environment.
-                These methods include downloading pre-built SDK installers,
-                building and installing your own SDK installer, or running
-                an Application Development Toolkit (ADT) installer to
-                install not just cross-development toolchains
-                but also additional tools to help in this type of
-                development.
+                These methods include downloading pre-built SDK installers
+                or building and installing your own SDK installer.
             </para>
 
             <para>
@@ -1278,8 +1341,7 @@
                 section.
                 For information on setting up a cross-development
                 environment, see the
-                "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
-                section in the Yocto Project Application Developer's Guide.
+                <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
             </para>
         </note>
 
@@ -1288,7 +1350,10 @@
             <filename>deploy/sdk</filename> folder inside the
             <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
             as shown in the figure at the beginning of this section.
-            Several variables exist that help configure these files:
+            Depending on the type of SDK, several variables exist that help
+            configure these files.
+            The following list shows the variables associated with a standard
+            SDK:
             <itemizedlist>
                 <listitem><para><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
                     Points to the <filename>deploy</filename>
@@ -1322,6 +1387,36 @@
                     installation script.
                     </para></listitem>
             </itemizedlist>
+            This next list, shows the variables associated with an extensible
+            SDK:
+            <itemizedlist>
+                <listitem><para><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
+                    Points to the <filename>deploy</filename> directory.
+                    </para></listitem>
+                <listitem><para><link linkend='var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></link>:
+                    Controls whether or not shared state artifacts are copied
+                    into the extensible SDK.
+                    By default, all required shared state artifacts are copied
+                    into the SDK.
+                    </para></listitem>
+                <listitem><para><link linkend='var-SDK_INCLUDE_PKGDATA'><filename>SDK_INCLUDE_PKGDATA</filename></link>:
+                    Specifies whether or not packagedata will be included in
+                    the extensible SDK for all recipes in the "world" target.
+                    </para></listitem>
+                <listitem><para><link linkend='var-SDK_LOCAL_CONF_WHITELIST'><filename>SDK_LOCAL_CONF_WHITELIST</filename></link>:
+                    A list of variables allowed through from the build system
+                    configuration into the extensible SDK configuration.
+                    </para></listitem>
+                <listitem><para><link linkend='var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></link>:
+                    A list of variables not allowed through from the build
+                    system configuration into the extensible SDK configuration.
+                    </para></listitem>
+                <listitem><para><link linkend='var-SDK_INHERIT_BLACKLIST'><filename>SDK_INHERIT_BLACKLIST</filename></link>:
+                    A list of classes to remove from the
+                    <link linkend='var-INHERIT'><filename>INHERIT</filename></link>
+                    value globally within the extensible SDK configuration.
+                    </para></listitem>
+            </itemizedlist>
         </para>
     </section>
 
diff --git a/yocto-poky/documentation/ref-manual/faq.xml b/yocto-poky/documentation/ref-manual/faq.xml
index 197d490..d2e4e8e 100644
--- a/yocto-poky/documentation/ref-manual/faq.xml
+++ b/yocto-poky/documentation/ref-manual/faq.xml
@@ -280,23 +280,42 @@
 
     <qandaentry>
         <question>
-            <para>
+            <para id='i-am-behind-a-firewall-and-need-to-use-a-proxy-server'>
                 I'm behind a firewall and need to use a proxy server. How do I do that?
             </para>
         </question>
         <answer>
             <para>
-                Most source fetching by the OpenEmbedded build system is done by <filename>wget</filename>
-                and you therefore need to specify the proxy settings in a
-                <filename>.wgetrc</filename> file in your home directory.
-                Here are some example settings:
+                Most source fetching by the OpenEmbedded build system is done
+                by <filename>wget</filename> and you therefore need to specify
+                the proxy settings in a <filename>.wgetrc</filename> file,
+                which can be in your home directory if you are a single user
+                or can be in <filename>/usr/local/etc/wgetrc</filename> as
+                a global user file.
+            </para>
+
+            <para>
+                Following is the applicable code for setting various proxy
+                types in the <filename>.wgetrc</filename> file.
+                By default, these settings are disabled with comments.
+                To use them, remove the comments:
                 <literallayout class='monospaced'>
-     http_proxy = http://proxy.yoyodyne.com:18023/
-     ftp_proxy = http://proxy.yoyodyne.com:18023/
+     # You can set the default proxies for Wget to use for http, https, and ftp.
+     # They will override the value in the environment.
+     #https_proxy = http://proxy.yoyodyne.com:18023/
+     #http_proxy = http://proxy.yoyodyne.com:18023/
+     #ftp_proxy = http://proxy.yoyodyne.com:18023/
+
+     # If you do not want to use proxy at all, set this to off.
+     #use_proxy = on
                 </literallayout>
                 The Yocto Project also includes a
-                <filename>site.conf.sample</filename> file that shows how to
-                configure CVS and Git proxy servers if needed.
+                <filename>meta-poky/conf/site.conf.sample</filename> file that
+                shows how to configure CVS and Git proxy servers if needed.
+                For more information on setting up various proxy types and
+                configuring proxy servers, see the
+                "<ulink url='&YOCTO_WIKI_URL;/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
+                Wiki page.
             </para>
         </answer>
     </qandaentry>
@@ -367,7 +386,7 @@
 
             <para>
                 This issue is just a single manifestation of "system
-                leakage" issues caused when the OpenEbedded build system
+                leakage" issues caused when the OpenEmbedded build system
                 finds and uses previously installed files during a native
                 build.
                 This type of issue might not be limited to
@@ -782,7 +801,7 @@
     <qandaentry>
         <question>
             <para>
-                The files provided by my <filename>-native</filename> recipe do
+                The files provided by my <filename>*-native</filename> recipe do
                 not appear to be available to other recipes.
                 Files are missing from the native sysroot, my recipe is
                 installing to the wrong place, or I am getting permissions
diff --git a/yocto-poky/documentation/ref-manual/figures/image-generation.png b/yocto-poky/documentation/ref-manual/figures/image-generation.png
index ab96258..71a48dc 100644
--- a/yocto-poky/documentation/ref-manual/figures/image-generation.png
+++ b/yocto-poky/documentation/ref-manual/figures/image-generation.png
Binary files differ
diff --git a/yocto-poky/documentation/ref-manual/figures/sdk-generation.png b/yocto-poky/documentation/ref-manual/figures/sdk-generation.png
old mode 100644
new mode 100755
index c37e274..adbe1f4
--- a/yocto-poky/documentation/ref-manual/figures/sdk-generation.png
+++ b/yocto-poky/documentation/ref-manual/figures/sdk-generation.png
Binary files differ
diff --git a/yocto-poky/documentation/ref-manual/figures/sdk.png b/yocto-poky/documentation/ref-manual/figures/sdk.png
index a539cc5..5c36b75 100644
--- a/yocto-poky/documentation/ref-manual/figures/sdk.png
+++ b/yocto-poky/documentation/ref-manual/figures/sdk.png
Binary files differ
diff --git a/yocto-poky/documentation/ref-manual/figures/user-configuration.png b/yocto-poky/documentation/ref-manual/figures/user-configuration.png
old mode 100644
new mode 100755
index f2b3f8e..c298401
--- a/yocto-poky/documentation/ref-manual/figures/user-configuration.png
+++ b/yocto-poky/documentation/ref-manual/figures/user-configuration.png
Binary files differ
diff --git a/yocto-poky/documentation/ref-manual/introduction.xml b/yocto-poky/documentation/ref-manual/introduction.xml
index 0b16544..ce8fa5c 100644
--- a/yocto-poky/documentation/ref-manual/introduction.xml
+++ b/yocto-poky/documentation/ref-manual/introduction.xml
@@ -9,19 +9,26 @@
     <title>Introduction</title>
 
     <para>
-        This manual provides reference information for the current release of the Yocto Project.
-        The Yocto Project is an open-source collaboration project focused on embedded Linux
-        developers.
-        Amongst other things, the Yocto Project uses the OpenEmbedded build system, which
-        is based on the Poky project, to construct complete Linux images.
-        You can find complete introductory and getting started information on the Yocto Project
-        by reading the
+        This manual provides reference information for the current release
+        of the Yocto Project.
+        The Yocto Project is an open-source collaboration project focused
+        on embedded Linux developers.
+        Amongst other things, the Yocto Project uses the OpenEmbedded build
+        system, which is based on the Poky project, to construct complete
+        Linux images.
+        You can find complete introductory and getting started information
+        on the Yocto Project by reading the
         <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
+    </para>
+
+    <para>
         For task-based information using the Yocto Project, see the
         <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Manual</ulink>
         and the <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
         For Board Support Package (BSP) structure information, see the
         <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
+        For information on how to use a Software Development Kit, (SDK), see the
+        <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
         You can find information on tracing and profiling in the
         <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
         For information on BitBake, which is the task execution tool the
@@ -40,7 +47,7 @@
             <listitem><para><emphasis>
                 <link linkend='usingpoky'>Using the Yocto Project</link>:</emphasis>
                 Provides an overview of the components that make up the Yocto Project
-                followed by information about debugging images created in the Yocto Project.
+                followed by information about debugng images created in the Yocto Project.
                 </para></listitem>
             <listitem><para><emphasis>
                 <link linkend='closer-look'>A Closer Look at the Yocto Project Development Environment</link>:</emphasis>
@@ -192,10 +199,6 @@
             supported Linux distribution, instances might exist where you
             encounter a problem while using the Yocto Project on a specific
             distribution.
-            For example, the CentOS 6.4 distribution does not include the
-            Gtk+ 2.20.0 and PyGtk 2.21.0 (or higher) packages, which are
-            required to run
-            <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>.
         </note>
     </section>
 
@@ -249,9 +252,9 @@
                         <literallayout class='monospaced'>
      $ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
                         </literallayout></para></listitem>
-                    <listitem><para><emphasis>ADT Installer Extras:</emphasis>
+                    <listitem><para><emphasis>SDK Installer Extras:</emphasis>
                         Packages needed if you are going to be using the
-                        <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
+                        the standard or extensible SDK:
                         <literallayout class='monospaced'>
      $ sudo apt-get install autoconf automake libtool libglib2.0-dev libarchive-dev
                         </literallayout></para></listitem>
@@ -293,9 +296,9 @@
      $ sudo dnf install make docbook-style-dsssl docbook-style-xsl \
      docbook-dtds docbook-utils fop libxslt dblatex xmlto xsltproc
                         </literallayout></para></listitem>
-                    <listitem><para><emphasis>ADT Installer Extras:</emphasis>
+                    <listitem><para><emphasis>SDK Installer Extras:</emphasis>
                         Packages needed if you are going to be using the
-                        <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
+                        standard or extensible SDK:
                         <literallayout class='monospaced'>
      $ sudo dnf install autoconf automake libtool glib2-devel libarchive-devel
                         </literallayout></para></listitem>
@@ -336,9 +339,9 @@
                         <literallayout class='monospaced'>
      $ sudo zypper install make fop xsltproc dblatex xmlto
                         </literallayout></para></listitem>
-                    <listitem><para><emphasis>ADT Installer Extras:</emphasis>
+                    <listitem><para><emphasis>SDK Installer Extras:</emphasis>
                         Packages needed if you are going to be using the
-                        <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
+                        standard or extensible SDK:
                         <literallayout class='monospaced'>
      $ sudo zypper install autoconf automake libtool glib2-devel libarchive-devel
                         </literallayout></para></listitem>
@@ -359,14 +362,14 @@
                 The following list shows the required packages by function
                 given a supported CentOS Linux distribution:
                 <note>
-                    For CentOS 6.x, some of the versions
-                    of the components provided by the distribution are
-                    too old (e.g. Git, Python, and tar).
-                    It is recommended that you install the buildtools
-                    in order to provide versions that will work with
-                    the OpenEmbedded build system.
-                    For information on how to install the buildtools
-                    tarball, see the
+                    For CentOS 6.x, some of the versions of the components
+                    provided by the distribution are too old (e.g. Git, Python,
+                    and tar).
+                    It is recommended that you install the buildtools in order
+                    to provide versions that will work with the OpenEmbedded
+                    build system.
+                    For information on how to install the buildtools tarball,
+                    see the
                     "<link linkend='required-git-tar-and-python-versions'>Required Git, Tar, and Python Versions</link>"
                     section.
                 </note>
@@ -391,21 +394,12 @@
      $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
      docbook-dtds docbook-utils fop libxslt dblatex xmlto xsltproc
                         </literallayout></para></listitem>
-                    <listitem><para><emphasis>ADT Installer Extras:</emphasis>
+                    <listitem><para><emphasis>SDK Installer Extras:</emphasis>
                         Packages needed if you are going to be using the
-                        <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
+                        standard or extensible SDK:
                         <literallayout class='monospaced'>
      $ sudo yum install autoconf automake libtool glib2-devel libarchive-devel
-                        </literallayout>
-                        <note>
-                            For CentOS 6.x, in order for the
-                            ADT installer script to work, you must have
-                            installed the <filename>liblzma5</filename>,
-                            <filename>libarchive3.x</filename>, and
-                            <filename>libarchive-devel-3.1.3</filename>
-                            (or older) packages, in that order.
-                        </note>
-                        </para></listitem>
+                        </literallayout></para></listitem>
                     <listitem><para><emphasis>OpenEmbedded Self-Test (<filename>oe-selftest</filename>):</emphasis>
                         Packages needed if you are going to run
                         <filename>oe-selftest</filename>:
@@ -426,7 +420,7 @@
             must meet the following version requirements for Git, tar, and
             Python:
             <itemizedlist>
-                <listitem><para>Git 1.7.8 or greater</para></listitem>
+                <listitem><para>Git 1.8.3.1 or greater</para></listitem>
                 <listitem><para>tar 1.24 or greater</para></listitem>
                 <listitem><para>Python 2.7.3 or greater not including
                     Python 3.x, which is not supported.</para></listitem>
@@ -597,8 +591,8 @@
             <listitem><para><emphasis>Nightly Builds:</emphasis> These
                 tarball releases are available at
                 <ulink url='&YOCTO_AB_NIGHTLY_URL;'/>.
-                These builds include Yocto Project releases, meta-toolchain
-                tarball installation scripts, and experimental builds.
+                These builds include Yocto Project releases, SDK installation
+                scripts, and experimental builds.
                 </para></listitem>
             <listitem><para><emphasis>Yocto Project Website:</emphasis> You can
                 find tarball releases of the Yocto Project and supported BSPs
diff --git a/yocto-poky/documentation/ref-manual/migration.xml b/yocto-poky/documentation/ref-manual/migration.xml
index 21763e3..e6c0aa3 100644
--- a/yocto-poky/documentation/ref-manual/migration.xml
+++ b/yocto-poky/documentation/ref-manual/migration.xml
@@ -97,13 +97,14 @@
 
             <para>
                 The shared state cache (sstate-cache), as pointed to by
-                <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>, by default
-                now has two-character subdirectories to prevent issues arising
-                from too many files in the same directory.
-                Also, native sstate-cache packages will go into a subdirectory named using
+                <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>,
+                by default now has two-character subdirectories to prevent
+                issues arising from too many files in the same directory.
+                Also, native sstate-cache packages, which are built to run
+                on the host system, will go into a subdirectory named using
                 the distro ID string.
-                If you copy the newly structured sstate-cache to a mirror location
-                (either local or remote) and then point to it in
+                If you copy the newly structured sstate-cache to a mirror
+                location (either local or remote) and then point to it in
                 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>,
                 you need to append "PATH" to the end of the mirror URL so that
                 the path used by BitBake before the mirror substitution is
@@ -124,7 +125,7 @@
                 reference hardware Board Support Packages (BSPs), respectively:
                 <filename>meta-yocto</filename> and
                 <filename>meta-yocto-bsp</filename>.
-                When running BitBake or Hob for the first time after upgrading,
+                When running BitBake for the first time after upgrading,
                 your <filename>conf/bblayers.conf</filename> file will be
                 updated to handle this change and you will be asked to
                 re-run or restart for the changes to take effect.
@@ -191,8 +192,10 @@
                 The suffix <filename>nativesdk</filename> is now implemented
                 as a prefix, which simplifies a lot of the packaging code for
                 <filename>nativesdk</filename> recipes.
-                All custom <filename>nativesdk</filename> recipes and any
-                references need to be updated to use
+                All custom <filename>nativesdk</filename> recipes, which are
+                relocatable packages that are native to
+                <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>,
+                and any references need to be updated to use
                 <filename>nativesdk-*</filename> instead of
                 <filename>*-nativesdk</filename>.
             </para>
@@ -1443,18 +1446,6 @@
         </section>
     </section>
 
-    <section id='migration-1.6-directory-layout-changes'>
-        <title>Directory Layout Changes</title>
-
-        <para>
-            The <filename>meta-hob</filename> layer has been removed from
-            the top-level of the
-            <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
-            The contents of this layer are no longer needed by the Hob
-            user interface for building images and toolchains.
-        </para>
-    </section>
-
     <section id='migration-1.6-package-test-ptest'>
         <title>Package Test (ptest)</title>
 
@@ -2456,9 +2447,10 @@
                     </literallayout>
                     </para></listitem>
                 <listitem><para>
-                    <filename>d.delVar('VARNAME')</filename> and
-                    <filename>d.setVar('VARNAME', None)</filename> result
-                    in the variable and all of its overrides being cleared out.
+                    <filename>d.delVar('</filename><replaceable>varname</replaceable><filename>')</filename> and
+                    <filename>d.setVar('</filename><replaceable>varname</replaceable><filename>', None)</filename>
+                    result in the variable and all of its overrides being
+                    cleared out.
                     Before the change, only the non-overridden values
                     were cleared.
                     </para></listitem>
@@ -2735,6 +2727,558 @@
     </section>
 </section>
 
+<section id='moving-to-the-yocto-project-2.1-release'>
+    <title>Moving to the Yocto Project 2.1 Release</title>
+
+    <para>
+        This section provides migration information for moving to the
+        Yocto Project 2.1 Release from the prior release.
+    </para>
+
+    <section id='migration-2.1-variable-expansion-in-python-functions'>
+        <title>Variable Expansion in Python Functions</title>
+
+        <para>
+            Variable expressions, such as
+            <filename>${</filename><replaceable>varname</replaceable><filename>}</filename>
+            no longer expand automatically within Python functions.
+            Suppressing expansion was done to allow Python functions to
+            construct shell scripts or other code for situations in which you
+            do not want such expressions expanded.
+            For any existing code that relies on these expansions, you need to
+            change the expansions to either expand the value of individual
+            variables through <filename>d.getVar()</filename>.
+            To alternatively expand more complex expressions,
+            use <filename>d.expand()</filename>.
+        </para>
+    </section>
+
+    <section id='migration-2.1-overrides-must-now-be-lower-case'>
+        <title>Overrides Must Now be Lower-Case</title>
+
+        <para>
+            The convention for overrides has always been for them to be
+            lower-case characters.
+            This practice is now a requirement as BitBake's datastore now
+            assumes lower-case characters in order to give a slight performance
+            boost during parsing.
+            In practical terms, this requirement means that anything that ends
+            up in
+            <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
+            must now appear in lower-case characters (e.g. values for
+            <filename>MACHINE</filename>, <filename>TARGET_ARCH</filename>,
+            <filename>DISTRO</filename>, and also recipe names if
+            <filename>_pn-</filename><replaceable>recipename</replaceable>
+            overrides are to be effective).
+        </para>
+    </section>
+
+    <section id='migration-2.1-expand-parameter-to-getvar-and-getvarflag-now-mandatory'>
+        <title>Expand Parameter to <filename>getVar()</filename> and
+            <filename>getVarFlag()</filename> is Now Mandatory</title>
+
+        <para>
+            The expand parameter to <filename>getVar()</filename> and
+            <filename>getVarFlag()</filename> previously defaulted to
+            False if not specified.
+            Now, however, no default exists so one must be specified.
+            You must change any <filename>getVar()</filename> calls that
+            do not specify the final expand parameter to calls that do specify
+            the parameter.
+            You can run the following <filename>sed</filename> command at the
+            base of a layer to make this change:
+            <literallayout class='monospaced'>
+     sed -e 's:\(\.getVar([^,()]*\)):\1, False):g' -i `grep -ril getVar *`
+     sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, False):g' -i `grep -ril getVarFlag *`
+            </literallayout>
+            <note>
+                The reason for this change is that it prepares the way for
+                changing the default to True in a future Yocto Project release.
+                This future change is a much more sensible default than False.
+                However, the change needs to be made gradually as a sudden
+                change of the default would potentially cause side-effects
+                that would be difficult to detect.
+            </note>
+        </para>
+    </section>
+
+    <section id='migration-2.1-makefile-environment-changes'>
+        <title>Makefile Environment Changes</title>
+
+        <para>
+            <link linkend='var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></link>
+            now defaults to "" instead of "-e MAKEFLAGS=".
+            Setting <filename>EXTRA_OEMAKE</filename> to "-e MAKEFLAGS=" by
+            default was a historical accident that has required many classes
+            (e.g. <filename>autotools</filename>, <filename>module</filename>)
+            and recipes to override this default in order to work with
+            sensible build systems.
+            When upgrading to the release, you must edit any recipe that
+            relies upon this old default by either setting
+            <filename>EXTRA_OEMAKE</filename> back to "-e MAKEFLAGS=" or by
+            explicitly setting any required variable value overrides using
+            <filename>EXTRA_OEMAKE</filename>, which is typically only needed
+            when a Makefile sets a default value for a variable that is
+            inappropriate for cross-compilation using the "=" operator rather
+            than the "?=" operator.
+        </para>
+    </section>
+
+    <section id='migration-2.1-libexecdir-reverted-to-prefix-libexec'>
+        <title><filename>libexecdir</filename> Reverted to <filename>${prefix}/libexec</filename></title>
+
+        <para>
+            The use of <filename>${libdir}/${BPN}</filename> as
+            <filename>libexecdir</filename> is different as compared to all
+            other mainstream distributions, which either uses
+            <filename>${prefix}/libexec</filename> or
+            <filename>${libdir}</filename>.
+            The use is also contrary to the GNU Coding Standards
+            (i.e. <ulink url='https://www.gnu.org/prep/standards/html_node/Directory-Variables.html'></ulink>)
+            that suggest <filename>${prefix}/libexec</filename> and also
+            notes that any package-specific nesting should be done by the
+            package itself.
+            Finally, having <filename>libexecdir</filename> change between
+            recipes makes it very difficult for different recipes to invoke
+            binaries that have been installed into
+            <filename>libexecdir</filename>.
+            The Filesystem Hierarchy Standard
+            (i.e. <ulink url='http://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s07.html'></ulink>)
+            now recognizes the use of <filename>${prefix}/libexec/</filename>,
+            giving distributions the choice between
+            <filename>${prefix}/lib</filename> or
+            <filename>${prefix}/libexec</filename> without breaking FHS.
+        </para>
+    </section>
+
+    <section id='migration-2.1-ac-cv-sizeof-off-t-no-longer-cached-in-site-files'>
+        <title><filename>ac_cv_sizeof_off_t</filename> is No Longer Cached in Site Files</title>
+
+        <para>
+            For recipes inheriting the
+            <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
+            class, <filename>ac_cv_sizeof_off_t</filename> is no longer cached
+            in the site files for <filename>autoconf</filename>.
+            The reason for this change is because the
+            <filename>ac_cv_sizeof_off_t</filename> value is not necessarily
+            static per architecture as was previously assumed.
+            Rather, the value changes based on whether large file support is
+            enabled.
+            For most software that uses <filename>autoconf</filename>, this
+            change should not be a problem.
+            However, if you have a recipe that bypasses the standard
+            <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
+            task from the <filename>autotools</filename> class and the software
+            the recipe is building uses a very old version of
+            <filename>autoconf</filename>, the recipe might be incapable of
+            determining the correct size of <filename>off_t</filename> during
+            <filename>do_configure</filename>.
+        </para>
+
+        <para>
+            The best course of action is to patch the software as necessary
+            to allow the default implementation from the
+            <filename>autotools</filename> class to work such that
+            <filename>autoreconf</filename> succeeds and produces a working
+            configure script), and to remove the
+            overridden <filename>do_configure</filename> task such that the
+            default implementation does get used.
+        </para>
+    </section>
+
+    <section id='migration-2.1-image-generation-split-out-from-filesystem-generation'>
+        <title>Image Generation is Now Split Out from Filesystem Generation</title>
+
+        <para>
+            Previously, for image recipes the
+            <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
+            task assembled the filesystem and then from that filesystem
+            generated images.
+            With this Yocto Project release, image generation is split into
+            separate
+            <link linkend='ref-tasks-image'><filename>do_image_*</filename></link>
+            tasks for clarity both in operation and in the code.
+        </para>
+
+        <para>
+            For most cases, this change does not present any problems.
+            However, if you have made customizations that directly modify the
+            <filename>do_rootfs</filename> task or that mention
+            <filename>do_rootfs</filename>, you might need to update those
+            changes.
+            In particular, if you had added any tasks after
+            <filename>do_rootfs</filename>, you should make edits so that
+            those tasks are after the
+            <link linkend='ref-tasks-image-complete'><filename>do_image_complete</filename></link>
+            task rather than before the task so that the your added tasks
+            run at the correct time.
+        </para>
+
+        <para>
+            A minor part of this restructuring is that the post-processing
+            definitions and functions have been moved from the
+            <link linkend='ref-classes-image'><filename>image</filename></link>
+            class to the
+            <link linkend='ref-classes-rootfs*'><filename>rootfs-postcommands</filename></link>
+            class.
+            Functionally, however, they remain unchanged.
+        </para>
+    </section>
+
+    <section id='migration-2.1-removed-recipes'>
+        <title>Removed Recipes</title>
+
+        <para>
+            The following recipes have been removed in the 2.1 release:
+            <itemizedlist>
+                <listitem><para><filename>gcc</filename> version 4.8:
+                    Versions 4.9 and 5.3 remain.
+                    </para></listitem>
+                <listitem><para><filename>qt4</filename>:
+                    All support for Qt 4.x has been moved out to a separate
+                    <filename>meta-qt4</filename> layer because Qt 4 is no
+                    longer supported upstream.
+                    </para></listitem>
+                <listitem><para><filename>x11vnc</filename>:
+                    Moved to the <filename>meta-oe</filename> layer.
+                    </para></listitem>
+                <listitem><para><filename>linux-yocto-3.14</filename>:
+                    No longer supported.
+                    </para></listitem>
+                <listitem><para><filename>linux-yocto-3.19</filename>:
+                    No longer supported.
+                    </para></listitem>
+                <listitem><para><filename>libjpeg</filename>:
+                    Replaced by the <filename>libjpeg-turbo</filename> recipe.
+                    </para></listitem>
+                <listitem><para><filename>pth</filename>:
+                    Became obsolete.
+                    </para></listitem>
+                <listitem><para><filename>liboil</filename>:
+                    Recipe is no longer needed and has been moved to the
+                    <filename>meta-multimedia</filename> layer.
+                    </para></listitem>
+                <listitem><para><filename>gtk-theme-torturer</filename>:
+                    Recipe is no longer needed and has been moved to the
+                    <filename>meta-gnome</filename> layer.
+                    </para></listitem>
+                <listitem><para><filename>gnome-mime-data</filename>:
+                    Recipe is no longer needed and has been moved to the
+                    <filename>meta-gnome</filename> layer.
+                    </para></listitem>
+                <listitem><para><filename>udev</filename>:
+                    Replaced by the <filename>eudev</filename> recipe for
+                    compatibility when using <filename>sysvinit</filename>
+                    with newer kernels.
+                    </para></listitem>
+                <listitem><para><filename>python-pygtk</filename>:
+                    Recipe became obsolete.
+                    </para></listitem>
+                <listitem><para><filename>adt-installer</filename>:
+                    Recipe became obsolete.
+                    See the
+                    "<link linkend='migration-2.1-adt-removed'>ADT Removed</link>"
+                    section for more information.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='migration-2.1-class-changes'>
+        <title>Class Changes</title>
+
+        <para>
+            The following classes have changed:
+            <itemizedlist>
+                <listitem><para><filename>autotools_stage</filename>:
+                    Removed because the
+                    <link linkend='ref-classes-autotools'><filename>autotools</filename></link>
+                    class now provides its functionality.
+                    Recipes that inherited from
+                    <filename>autotools_stage</filename> should now inherit
+                    from <filename>autotools</filename> instead.
+                    </para></listitem>
+                <listitem><para><filename>boot-directdisk</filename>:
+                    Merged into the
+                    <link linkend='ref-classes-image-vm'><filename>image-vm</filename></link>
+                    class.
+                    The <filename>boot-directdisk</filename> class was rarely
+                    directly used.
+                    Consequently, this change should not cause any issues.
+                    </para></listitem>
+                <listitem><para><filename>bootimg</filename>:
+                    Merged into the
+                    <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
+                    class.
+                    The <filename>bootimg</filename> class was rarely
+                    directly used.
+                    Consequently, this change should not cause any issues.
+                    </para></listitem>
+                <listitem><para><filename>packageinfo</filename>:
+                    Removed due to its limited use by the Hob UI, which has
+                    itself been removed.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='migration-2.1-build-system-ui-changes'>
+        <title>Build System User Interface Changes</title>
+
+        <para>
+            The following changes have been made to the build system user
+            interface:
+            <itemizedlist>
+                <listitem><para><emphasis>Hob GTK+-based UI</emphasis>:
+                    Removed because it is unmaintained and based on the
+                    outdated GTK+ 2 library.
+                    The Toaster web-based UI is much more capable and is
+                    actively maintained.
+                    See the
+                    "<ulink url='&YOCTO_DOCS_TOAST_URL;#using-the-toaster-web-interface'>Using the Toaster Web Interface</ulink>"
+                    section in the Yocto Project Toaster User Manual for more
+                    information on this interface.
+                    </para></listitem>
+                <listitem><para><emphasis>"puccho" BitBake UI</emphasis>:
+                    Removed because is unmaintained and no longer useful.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='migration-2.1-adt-removed'>
+        <title>ADT Removed</title>
+
+        <para>
+            The Application Development Toolkit (ADT) has been removed
+            because its functionality almost completely overlapped with the
+            <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-using-the-standard-sdk'>standard SDK</ulink>
+            and the
+            <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>extensible SDK</ulink>.
+            For information on these SDKs and how to build and use them, see the
+            <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
+        </para>
+    </section>
+
+    <section id='migration-2.1-poky-reference-distribution-changes'>
+        <title>Poky Reference Distribution Changes</title>
+
+        <para>
+            The following changes have been made for the Poky distribution:
+            <itemizedlist>
+                <listitem><para>
+                    The <filename>meta-yocto</filename> layer has been renamed
+                    to <filename>meta-poky</filename> to better match its
+                    purpose, which is to provide the Poky reference
+                    distribution.
+                    The <filename>meta-yocto-bsp</filename> layer retains its
+                    original name since it provides reference machines for
+                    the Yocto Project and it is otherwise unrelated to Poky.
+                    References to <filename>meta-yocto</filename> in your
+                    <filename>conf/bblayers.conf</filename> should
+                    automatically be updated, so you should not need to change
+                    anything unless you are relying on this naming elsewhere.
+                    </para></listitem>
+                <listitem><para>
+                    The
+                    <link linkend='ref-classes-uninative'><filename>uninative</filename></link>
+                    class is now enabled by default in Poky.
+                    This class attempts to isolate the build system from the
+                    host distribution's C library and makes re-use of native
+                    shared state artifacts across different host distributions
+                    practical.
+                    With this class enabled, a tarball containing a pre-built
+                    C library is downloaded at the start of the build.</para>
+
+                    <para>The <filename>uninative</filename> class is enabled
+                    through the
+                    <filename>meta/conf/distro/include/yocto-uninative.inc</filename>
+                    file, which for those not using the Poky distribution, can
+                    include to easily enable the same functionality.</para>
+
+                    <para>Alternatively, if you wish to build your own
+                    <filename>uninative</filename> tarball, you can do so by
+                    building the <filename>uninative-tarball</filename> recipe,
+                    making it available to your build machines
+                    (e.g. over HTTP/HTTPS) and setting a similar configuration
+                    as the one set by <filename>yocto-uninative.inc</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    Static library generation, for most cases, is now disabled
+                    by default in the Poky distribution.
+                    Disabling this generation saves some build time as well
+                    as the size used for build output artifacts.</para>
+
+                    <para>Disabling this library generation is accomplished
+                    through a
+                    <filename>meta/conf/distro/include/no-static-libs.inc</filename>,
+                    which for those not using the Poky distribution can
+                    easily include to enable the same functionality.</para>
+
+                    <para>Any recipe that needs to opt-out of having the
+                    "--disable-static" option specified on the configure
+                    command line either because it is not a supported option
+                    for the configure script or because static libraries are
+                    needed should set the following variable:
+                    <literallayout class='monospaced'>
+     DISABLE_STATIC = ""
+                    </literallayout>
+                    </para></listitem>
+                <listitem><para>
+                    The separate <filename>poky-tiny</filename> distribution
+                    now uses the musl C library instead of a heavily pared
+                    down <filename>glibc</filename>.
+                    Using <filename>glibc</filename> results in a smaller
+                    distribution and facilitates much greater maintainability
+                    because musl is designed to have a small footprint.</para>
+
+                    <para>If you have used <filename>poky-tiny</filename> and
+                    have customized the <filename>glibc</filename>
+                    configuration you will need to redo those customizations
+                    with musl when upgrading to the new release.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='migration-2.1-packaging-changes'>
+        <title>Packaging Changes</title>
+
+        <para>
+            The following changes have been made to packaging:
+            <itemizedlist>
+                <listitem><para>
+                    The <filename>runuser</filename> and
+                    <filename>mountpoint</filename> binaries, which were
+                    previously in the main <filename>util-linux</filename>
+                    package, have been split out into the
+                    <filename>util-linux-runuser</filename> and
+                    <filename>util-linux-mountpoint</filename> packages,
+                    respectively.
+                    </para></listitem>
+                <listitem><para>
+                    The <filename>python-elementtree</filename> package has
+                    been merged into the <filename>python-xml</filename>
+                    package.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='migration-2.1-tuning-file-changes'>
+        <title>Tuning File Changes</title>
+
+        <para>
+            The following changes have been made to the tuning files:
+            <itemizedlist>
+                <listitem><para>
+                    The "no-thumb-interwork" tuning feature has been dropped
+                    from the ARM tune include files.
+                    Because interworking is required for ARM EABI, attempting
+                    to disable it through a tuning feature no longer makes
+                    sense.
+                    <note>
+                        Support for ARM OABI was deprecated in gcc 4.7.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    The <filename>tune-cortexm*.inc</filename> and
+                    <filename>tune-cortexr4.inc</filename> files have been
+                    removed because they are poorly tested.
+                    Until the OpenEmbedded build system officially gains
+                    support for CPUs without an MMU, these tuning files would
+                    probably be better maintained in a separate layer
+                    if needed.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='migration-2.1-miscellaneous-changes'>
+        <title>Miscellaneous Changes</title>
+
+        <para>
+            These additional changes exist:
+            <itemizedlist>
+                <listitem><para>
+                    The minimum Git version has been increased to 1.8.3.1.
+                    If your host distribution does not provide a sufficiently
+                    recent version, you can install the buildtools, which
+                    will provide it.
+                    </para></listitem>
+                <listitem><para>
+                    The buggy and incomplete support for the RPM version 4
+                    package manager has been removed.
+                    The well-tested and maintained support for RPM version 5
+                    remains.
+                    </para></listitem>
+                <listitem><para>
+                    The
+                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component'><filename>devtool modify</filename></ulink>
+                    command now defaults to extracting the source since that
+                    is most commonly expected.
+                    The "-x" or "--extract" options are now no-ops.
+                    If you wish to provide your own existing source tree, you
+                    will now need to specify either the "-n" or
+                    "--no-extract" option when running
+                    <filename>devtool modify</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    If the formfactor for a machine is either not supplied
+                    or does not specify whether a keyboard is attached, then
+                    the default is to assume a keyboard is attached rather
+                    than assume no keyboard.
+                    <note>
+                        This change primarily affects the Sato UI.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    The <filename>.debug</filename> directory packaging is
+                    now automatic.
+                    If your recipe builds software that installs binaries into
+                    directories other than the standard ones, you no longer
+                    need to take care of setting
+                    <filename>FILES_${PN}-dbg</filename> to pick up the
+                    resulting <filename>.debug</filename> directories as these
+                    directories are automatically found and added.
+                    </para></listitem>
+                <listitem><para>
+                    Inaccurate disk and CPU percentage data has been dropped
+                    from <filename>buildstats</filename> output.
+                    This data has been replaced with
+                    <filename>getrusage()</filename> data and corrected IO
+                    statistics.
+                    You will probably need to update code that reads the
+                    <filename>buildstats</filename> data.
+                    </para></listitem>
+                <listitem><para>
+                    The
+                    <filename>meta/conf/distro/include/package_regex.inc</filename>
+                    is now deprecated.
+                    The contents of this file have been moved to individual
+                    recipes.
+                    <note><title>Tip</title>
+                        Because this file will likely be removed in a future
+                        Yocto Project release, it is suggested that you remove
+                        any references to the file that might be in your
+                        configuration.
+                    </note>
+                    </para></listitem>
+                <listitem><para>
+                    The <filename>v86d/uvesafb</filename> has been removed from
+                    the <filename>genericx86</filename> and
+                    <filename>genericx86-64</filename> reference machines,
+                    which are provided by the
+                    <filename>meta-yocto-bsp</filename> layer.
+                    Most modern x86 boards do not rely on this file and it only
+                    adds kernel error messages during startup.
+                    If you do still need the file, you can simply add
+                    <filename>v86d</filename> to your image.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+</section>
 
 </chapter>
 <!--
diff --git a/yocto-poky/documentation/ref-manual/ref-bitbake.xml b/yocto-poky/documentation/ref-manual/ref-bitbake.xml
index dc402db..1de1148 100644
--- a/yocto-poky/documentation/ref-manual/ref-bitbake.xml
+++ b/yocto-poky/documentation/ref-manual/ref-bitbake.xml
@@ -414,7 +414,7 @@
   -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
                         Show debug logging for the specified logging domains
   -P, --profile         Profile the command and save reports.
-  -u UI, --ui=UI        The user interface to use (e.g. knotty, hob, depexp).
+  -u UI, --ui=UI        The user interface to use (e.g. knotty and depexp).
   -t SERVERTYPE, --servertype=SERVERTYPE
                         Choose which server to use, process or xmlrpc.
   --revisions-changed   Set the exit code depending on whether upstream
diff --git a/yocto-poky/documentation/ref-manual/ref-classes.xml b/yocto-poky/documentation/ref-manual/ref-classes.xml
index b2941b8..e919bd7 100644
--- a/yocto-poky/documentation/ref-manual/ref-classes.xml
+++ b/yocto-poky/documentation/ref-manual/ref-classes.xml
@@ -128,8 +128,7 @@
     <para>
         By default, the <filename>autotools*</filename> classes
         use out-of-tree builds (i.e.
-        <filename>autotools.bbclass</filename> and
-        <filename>autotools_stage.bbclass</filename>).
+        <filename>autotools.bbclass</filename>).
         (<link linkend='var-B'><filename>B</filename></link> <filename>!=</filename>
         <link linkend='var-S'><filename>S</filename></link>).
     </para>
@@ -139,8 +138,7 @@
         using out-of-tree builds, you should have the recipe inherit the
         <filename>autotools-brokensep</filename> class.
         The <filename>autotools-brokensep</filename> class behaves the same
-        as the <filename>autotools</filename> and
-        <filename>autotools_stage</filename> classes but builds with
+        as the <filename>autotools</filename> class but builds with
         <link linkend='var-B'><filename>B</filename></link> ==
         <link linkend='var-S'><filename>S</filename></link>.
         This method is useful when out-of-tree build support is either not
@@ -201,6 +199,15 @@
     </para>
 </section>
 
+<section id='ref-classes-bash-completion'>
+    <title><filename>bash-completion.bbclass</filename></title>
+
+    <para>
+        Sets up packaging and dependencies appropriate for recipes that
+        build software that includes bash-completion data.
+    </para>
+</section>
+
 <section id='ref-classes-bin-package'>
     <title><filename>bin_package.bbclass</filename></title>
 
@@ -319,64 +326,6 @@
     </para>
 </section>
 
-<section id='ref-classes-boot-directdisk'>
-    <title><filename>boot-directdisk.bbclass</filename></title>
-
-    <para>
-        The <filename>boot-directdisk</filename> class
-        creates an image that can be placed directly onto a hard disk using
-        <filename>dd</filename> and then booted.
-        The image uses SYSLINUX.
-    </para>
-
-    <para>
-        The end result is a 512 boot sector populated with a
-        Master Boot Record (MBR) and partition table followed by an MSDOS
-        FAT16 partition containing SYSLINUX and a Linux kernel completed by
-        the <filename>ext2</filename> and <filename>ext3</filename>
-        root filesystems.
-    </para>
-</section>
-
-<section id='ref-classes-bootimg'>
-    <title><filename>bootimg.bbclass</filename></title>
-
-    <para>
-        The <filename>bootimg</filename> class creates a bootable
-        image using SYSLINUX, your kernel, and an optional initial RAM disk
-        (<filename>initrd</filename>).
-    </para>
-
-    <para>
-        When you use this class, two things happen:
-        <itemizedlist>
-            <listitem><para>
-                A <filename>.hddimg</filename> file is created.
-                This file is an MSDOS filesystem that contains SYSLINUX,
-                a kernel, an <filename>initrd</filename>, and a root filesystem
-                image.
-                All three of these can be written to hard drives directly and
-                also booted on a USB flash disks using <filename>dd</filename>.
-                </para></listitem>
-            <listitem><para>
-                A CD <filename>.iso</filename> image is created.
-                When this file is booted, the <filename>initrd</filename>
-                boots and processes the label selected in SYSLINUX.
-                Actions based on the label are then performed (e.g. installing
-                to a hard drive).</para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        The <filename>bootimg</filename> class supports the
-        <link linkend='var-INITRD'><filename>INITRD</filename></link>,
-        <link linkend='var-NOISO'><filename>NOISO</filename></link>,
-        <link linkend='var-NOHDD'><filename>NOHDD</filename></link>, and
-        <link linkend='var-ROOTFS'><filename>ROOTFS</filename></link>
-        variables.
-    </para>
-</section>
-
 <section id='ref-classes-bugzilla'>
     <title><filename>bugzilla.bbclass</filename></title>
 
@@ -714,7 +663,9 @@
         provides for automatic checking for upstream recipe updates.
         The class creates a comma-separated value (CSV) spreadsheet that
         contains information about the recipes.
-        The information provides the <filename>do_distrodata</filename> and
+        The information provides the
+        <link linkend='ref-tasks-distrodata'><filename>do_distrodata</filename></link>
+        and
         <filename>do_distro_check</filename> tasks, which do upstream checking
         and also verify if a package is used in multiple major distributions.
     </para>
@@ -728,6 +679,13 @@
      INHERIT+= "distrodata"
         </literallayout>
     </para>
+
+    <para>
+        The <filename>distrodata</filename> class also provides the
+        <link linkend='ref-tasks-checkpkg'><filename>do_checkpkg</filename></link>
+        task, which can be used against a simple recipe or against an
+        image to get all its recipe information.
+    </para>
 </section>
 
 <section id='ref-classes-distutils'>
@@ -999,6 +957,28 @@
     </para>
 </section>
 
+<section id='ref-classes-gobject-introspection'>
+    <title><filename>gobject-introspection.bbclass</filename></title>
+
+    <para>
+        Provides support for recipes building software that
+        supports GObject introspection.
+        This functionality is only enabled if the
+        "gobject-introspection-data" feature is in
+        <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
+        as well as "qemu-usermode" being in
+        <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>.
+        <note>
+            This functionality is backfilled by default and,
+            if not applicable, should be disabled through
+            <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
+            or
+            <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>,
+            respectively.
+        </note>
+    </para>
+</section>
+
 <section id='ref-classes-grub-efi'>
     <title><filename>grub-efi.bbclass</filename></title>
 
@@ -1146,8 +1126,8 @@
     <title><filename>gzipnative.bbclass</filename></title>
 
     <para>
-        The <filename>gzipnative</filename>
-        class enables the use of native versions of <filename>gzip</filename>
+        The <filename>gzipnative</filename> class enables the use of
+        different native versions of <filename>gzip</filename>
         and <filename>pigz</filename> rather than the versions of these tools
         from the build host.
     </para>
@@ -2284,6 +2264,29 @@
     </para>
 </section>
 
+<section id='ref-classes-nopackages'>
+    <title><filename>nopackages.bbclass</filename></title>
+
+    <para>
+        Disables packaging tasks for those recipes and classes where
+        packaging is not needed.
+    </para>
+</section>
+
+<section id='ref-classes-npm'>
+    <title><filename>npm.bbclass</filename></title>
+
+    <para>
+        Provides support for building Node.js software fetched using the npm
+        package manager.
+        <note>
+            Currently, recipes inheriting this class must use the
+            <filename>npm://</filename> fetcher to have dependencies fetched
+            and packaged automatically.
+        </note>
+    </para>
+</section>
+
 <section id='ref-classes-oelint'>
     <title><filename>oelint.bbclass</filename></title>
 
@@ -2558,22 +2561,6 @@
     </para>
 </section>
 
-<section id='ref-classes-packageinfo'>
-    <title><filename>packageinfo.bbclass</filename></title>
-
-    <para>
-        The <filename>packageinfo</filename> class
-        gives a BitBake user interface the ability to retrieve information
-        about output packages from the <filename>pkgdata</filename> files.
-    </para>
-
-    <para>
-        This class is enabled automatically when using the
-        <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>
-        user interface.
-    </para>
-</section>
-
 <section id='ref-classes-patch'>
     <title><filename>patch.bbclass</filename></title>
 
@@ -2654,8 +2641,8 @@
         toolchain using the
         <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
         task, see the
-        "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
-        section in the Yocto Project Application Developer's Guide.
+        "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
+        section in the Yocto Project Software Development Kit (SDK) Developer's Guide.
     </para>
 </section>
 
@@ -2734,8 +2721,9 @@
         cross-development toolchain using the
         <link linkend='ref-tasks-populate_sdk'><filename>do_populate_sdk</filename></link>
         task, see the
-        "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
-        section in the Yocto Project Application Developer's Guide.
+        "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
+        section in the Yocto Project Software Development Kit (SDK) Developer's
+        Guide.
     </para>
 </section>
 
@@ -2869,66 +2857,6 @@
     </para>
 </section>
 
-<section id='ref-classes-qmake*'>
-    <title><filename>qmake*.bbclass</filename></title>
-
-    <para>
-        The <filename>qmake*</filename> classes support recipes that
-        need to build software that uses Qt's <filename>qmake</filename>
-        build system and are comprised of the following:
-        <itemizedlist>
-            <listitem><para><emphasis><filename>qmake_base</filename>:</emphasis>
-                Provides base functionality for all versions of
-                <filename>qmake</filename>.</para></listitem>
-            <listitem><para><emphasis><filename>qmake2</filename>:</emphasis>
-                Extends base functionality for <filename>qmake</filename> 2.x as
-                used by Qt 4.x.</para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        If you need to set any configuration variables or pass any options to
-        <filename>qmake</filename>, you can add these to the
-        <link linkend='var-EXTRA_QMAKEVARS_PRE'><filename>EXTRA_QMAKEVARS_PRE</filename></link>
-        or
-        <link linkend='var-EXTRA_QMAKEVARS_POST'><filename>EXTRA_QMAKEVARS_POST</filename></link>
-        variables, depending on whether the arguments need to be before or
-        after the <filename>.pro</filename> file list on the command line,
-        respectively.
-    </para>
-
-    <para>
-        By default, all <filename>.pro</filename> files are built.
-        If you want to specify your own subset of <filename>.pro</filename>
-        files to be built, specify them in the
-        <link linkend='var-QMAKE_PROFILES'><filename>QMAKE_PROFILES</filename></link>
-        variable.
-    </para>
-</section>
-
-<section id='ref-classes-qt4*'>
-    <title><filename>qt4*.bbclass</filename></title>
-
-    <para>
-        The <filename>qt4*</filename> classes support recipes that need to
-        build software that uses the Qt development framework version 4.x
-        and consist of the following:
-        <itemizedlist>
-            <listitem><para><emphasis><filename>qt4e</filename>:</emphasis>
-                Supports building against Qt/Embedded, which uses the
-                framebuffer for graphical output.</para></listitem>
-            <listitem><para><emphasis><filename>qt4x11</filename>:</emphasis>
-                Supports building against Qt/X11.</para></listitem>
-        </itemizedlist>
-    </para>
-
-    <para>
-        The classes inherit the
-        <link linkend='ref-classes-qmake*'><filename>qmake2</filename></link>
-        class.
-    </para>
-</section>
-
 <section id='ref-classes-recipe_sanity'>
     <title><filename>recipe_sanity.bbclass</filename></title>
 
@@ -2958,6 +2886,33 @@
     </para>
 </section>
 
+<section id='ref-classes-remove-libtool'>
+    <title><filename>remove-libtool.bbclass</filename></title>
+
+    <para>
+        The <filename>remove-libtool</filename> class adds a post function
+        to the
+        <link linkend='ref-tasks-install'><filename>do_install</filename></link>
+        task to remove all <filename>.la</filename> files installed by
+        <filename>libtool</filename>.
+        Removing these files results in them being absent from both the
+        sysroot and target packages.
+    </para>
+
+    <para>
+        If a recipe needs the <filename>.la</filename> files to be installed,
+        then the recipe can override the removal by setting
+        <filename>REMOVE_LIBTOOL_LA</filename> to "0" as follows:
+        <literallayout class='monospaced'>
+     REMOVE_LIBTOOL_LA = "0"
+        </literallayout>
+        <note>
+            The <filename>remove-libtool</filename> class is not enabled by
+            default.
+        </note>
+    </para>
+</section>
+
 <section id='ref-classes-report-error'>
     <title><filename>report-error.bbclass</filename></title>
 
@@ -3026,6 +2981,10 @@
         the root filesystem for an image and consist of the following classes:
         <itemizedlist>
             <listitem><para>
+                The <filename>rootfs-postcommands</filename> class, which
+                defines filesystem post-processing functions for image recipes.
+                </para></listitem>
+            <listitem><para>
                 The <filename>rootfs_deb</filename> class, which supports
                 creation of root filesystems for images built using
                 <filename>.deb</filename> packages.</para></listitem>
@@ -3225,10 +3184,10 @@
     <title><filename>staging.bbclass</filename></title>
 
     <para>
-        The <filename>staging</filename> class provides support for staging
-        files into the sysroot during the
+        The <filename>staging</filename> class provides the
         <link linkend='ref-tasks-populate_sysroot'><filename>do_populate_sysroot</filename></link>
-        task.
+        task, which stages files into the sysroot to make them available to
+        other recipes at build time.
         The class is enabled by default because it is inherited by the
         <link linkend='ref-classes-base'><filename>base</filename></link>
         class.
@@ -3398,6 +3357,20 @@
     </para>
 </section>
 
+<section id='ref-classes-testsdk'>
+    <title><filename>testsdk.bbclass</filename></title>
+
+    <para>
+        This class supports running automated tests against
+        software development kits (SDKs).
+        The <filename>testsdk</filename> class runs tests on an SDK when
+        called using the following:
+        <literallayout class='monospaced'>
+     $ bitbake -c testsdk image
+        </literallayout>
+    </para>
+</section>
+
 <section id='ref-classes-texinfo'>
     <title><filename>texinfo.bbclass</filename></title>
 
@@ -3498,14 +3471,23 @@
     <title><filename>uninative.bbclass</filename></title>
 
     <para>
-        Provides a means of reusing <filename>native/cross</filename> over
-        multiple distros.
-        <note>
-            Currently, the method used by the <filename>uninative</filename>
-            class is experimental.
-        </note>
-        For more information, see the commit message
-        <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=e66c96ae9c7ba21ebd04a4807390f0031238a85a'>here</ulink>.
+        Attempts to isolate the build system from the host
+        distribution's C library in order to make re-use of native shared state
+        artifacts across different host distributions practical.
+        With this class enabled, a tarball containing a pre-built C library
+        is downloaded at the start of the build.
+        In the Poky reference distribution this is enabled by default
+        through
+        <filename>meta/conf/distro/include/yocto-uninative.inc</filename>.
+        Other distributions that do not derive from poky can also
+        "<filename>require conf/distro/include/yocto-uninative.inc</filename>"
+        to use this.
+        Alternatively if you prefer, you can build the uninative-tarball recipe
+        yourself, publish the resulting tarball (e.g. via HTTP) and set
+        <filename>UNINATIVE_URL</filename> and
+        <filename>UNINATIVE_CHECKSUM</filename> appropriately.
+        For an example, see the
+        <filename>meta/conf/distro/include/yocto-uninative.inc</filename>.
     </para>
 </section>
 
diff --git a/yocto-poky/documentation/ref-manual/ref-features.xml b/yocto-poky/documentation/ref-manual/ref-features.xml
index 798e0a2..fd76935 100644
--- a/yocto-poky/documentation/ref-manual/ref-features.xml
+++ b/yocto-poky/documentation/ref-manual/ref-features.xml
@@ -308,8 +308,12 @@
                 <listitem><para><emphasis>nfs-server:</emphasis>
                     Installs an NFS server.
                     </para></listitem>
-                <listitem><para><emphasis>qt4-pkgs:</emphasis>
-                    Supports Qt4/X11 and demo applications.
+                <listitem><para><emphasis>perf:</emphasis>
+                    Installs profiling tools such as
+                    <filename>perf</filename>, <filename>systemtap</filename>,
+                    and <filename>LTTng</filename>.
+                    For general information on user-space tools, see the
+                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
                     </para></listitem>
                 <listitem><para><emphasis>ssh-server-dropbear:</emphasis>
                     Installs the Dropbear minimal SSH server.
@@ -331,15 +335,6 @@
                     For information on tracing and profiling, see the
                     <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
                     </para></listitem>
-                <listitem><para><emphasis>tools-profile:</emphasis>
-                    Installs profiling tools such as
-                    <filename>oprofile</filename>, <filename>exmap</filename>,
-                    and <filename>LTTng</filename>.
-                    For general information on user-space tools, see the
-                    "<ulink url='&YOCTO_DOCS_ADT_URL;#user-space-tools'>User-Space Tools</ulink>"
-                    section in the Yocto Project Application Developer's
-                    Guide.
-                    </para></listitem>
                 <listitem><para><emphasis>tools-sdk:</emphasis>
                     Installs a full SDK that runs on the device.
                     </para></listitem>
diff --git a/yocto-poky/documentation/ref-manual/ref-images.xml b/yocto-poky/documentation/ref-manual/ref-images.xml
index d15ca5b..69b58f6 100644
--- a/yocto-poky/documentation/ref-manual/ref-images.xml
+++ b/yocto-poky/documentation/ref-manual/ref-images.xml
@@ -80,7 +80,7 @@
                 </para></listitem>
             <listitem><para><filename>core-image-lsb-sdk</filename>:
                 A <filename>core-image-lsb</filename> that includes everything in
-                meta-toolchain but also includes development headers and libraries
+                the cross-toolchain but also includes development headers and libraries
                 to form a complete standalone SDK.
                 This image requires a distribution configuration that
                 enables LSB compliance (e.g. <filename>poky-lsb</filename>).
@@ -114,7 +114,7 @@
                 tools appropriate for real-time use.</para></listitem>
             <listitem><para><filename>core-image-rt-sdk</filename>:
                 A <filename>core-image-rt</filename> image that includes everything in
-                <filename>meta-toolchain</filename>.
+                the cross-toolchain.
                 The image also includes development headers and libraries to form a complete
                 stand-alone SDK and is suitable for development using the target.
                 </para></listitem>
@@ -132,7 +132,8 @@
                 This image was formerly <filename>core-image-sdk</filename>.
                 </para></listitem>
             <listitem><para><filename>core-image-sato-sdk</filename>:
-                A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
+                A <filename>core-image-sato</filename> image that includes everything in
+                the cross-toolchain.
                 The image also includes development headers and libraries to form a complete standalone SDK
                 and is suitable for development using the target.</para></listitem>
             <listitem><para><filename>core-image-testmaster</filename>:
@@ -158,9 +159,6 @@
             <listitem><para><filename>core-image-x11</filename>:
                 A very basic X11 image with a terminal.
                 </para></listitem>
-            <listitem><para><filename>qt4e-demo-image</filename>:
-                An image that launches into the demo application for the embedded
-                (not based on X11) version of Qt.</para></listitem>
         </itemizedlist>
     </para>
 </chapter>
diff --git a/yocto-poky/documentation/ref-manual/ref-manual.xml b/yocto-poky/documentation/ref-manual/ref-manual.xml
index a296b9b..6834d5f 100644
--- a/yocto-poky/documentation/ref-manual/ref-manual.xml
+++ b/yocto-poky/documentation/ref-manual/ref-manual.xml
@@ -97,6 +97,11 @@
                 <date>October 2015</date>
                 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
             </revision>
+            <revision>
+                <revnumber>2.1</revnumber>
+                <date>April 2016</date>
+                <revremark>Released with the Yocto Project 2.1 Release.</revremark>
+            </revision>
         </revhistory>
 
     <copyright>
diff --git a/yocto-poky/documentation/ref-manual/ref-qa-checks.xml b/yocto-poky/documentation/ref-manual/ref-qa-checks.xml
index 38689b9..4fcf1db 100644
--- a/yocto-poky/documentation/ref-manual/ref-qa-checks.xml
+++ b/yocto-poky/documentation/ref-manual/ref-qa-checks.xml
@@ -81,11 +81,13 @@
 
                 <para>
                     The specified package contains files in
-                    <filename>/usr/libexec</filename>.
-                    By default, <filename>libexecdir</filename> is set to
-                    "${libdir}/${BPN}" rather than to "/usr/libexec".
-                    Thus, installing to <filename>/usr/libexec</filename>
-                    is likely not desirable.
+                    <filename>/usr/libexec</filename> when the distro
+                    configuration uses a different path for
+                    <filename>&lt;libexecdir&gt;</filename>
+                    By default, <filename>&lt;libexecdir&gt;</filename> is
+                    <filename>$prefix/libexec</filename>.
+                    However, this default can be changed (e.g.
+                    <filename>${libdir}</filename>).
                 </para>
 
                 <para>
diff --git a/yocto-poky/documentation/ref-manual/ref-structure.xml b/yocto-poky/documentation/ref-manual/ref-structure.xml
index 48e3921..e51ceb1 100644
--- a/yocto-poky/documentation/ref-manual/ref-structure.xml
+++ b/yocto-poky/documentation/ref-manual/ref-structure.xml
@@ -123,8 +123,8 @@
         </para>
     </section>
 
-    <section id='structure-core-meta-yocto'>
-        <title><filename>meta-yocto/</filename></title>
+    <section id='structure-core-meta-poky'>
+        <title><filename>meta-poky/</filename></title>
 
         <para>
             This directory contains the configuration for the Poky
@@ -227,14 +227,13 @@
          core-image-minimal
          core-image-sato
          meta-toolchain
-         adt-installer
          meta-ide-support
 
      You can also run generated qemu images with a command like 'runqemu qemux86'
             </literallayout>
             The script gets its default list of common targets from the
             <filename>conf-notes.txt</filename> file, which is found in the
-            <filename>meta-yocto</filename> directory within the
+            <filename>meta-poky</filename> directory within the
             <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
             Should you have custom distributions, it is very easy to modify
             this configuration file to include your targets for your
@@ -261,7 +260,7 @@
             </literallayout>
             The OpenEmbedded build system uses the template configuration
             files, which are found by default in the
-            <filename>meta-yocto/conf</filename> directory in the
+            <filename>meta-poky/conf</filename> directory in the
             <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
             See the
             "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
@@ -366,7 +365,6 @@
          core-image-minimal
          core-image-sato
          meta-toolchain
-         adt-installer
          meta-ide-support
 
      You can also run generated qemu images with a command like 'runqemu qemux86'
@@ -375,7 +373,7 @@
             </literallayout>
             The script gets its default list of common targets from the
             <filename>conf-notes.txt</filename> file, which is found in the
-            <filename>meta-yocto</filename> directory within the
+            <filename>meta-poky</filename> directory within the
             <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
             Should you have custom distributions, it is very easy to modify
             this configuration file to include your targets for your
@@ -411,7 +409,7 @@
         <para>
             The OpenEmbedded build system uses the template configuration
             files, which are found by default in the
-            <filename>meta-yocto/conf</filename> directory in the
+            <filename>meta-poky/conf</filename> directory in the
             <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
             See the
             "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-custom-template-configuration-directory'>Creating a Custom Template Configuration Directory</ulink>"
@@ -515,7 +513,7 @@
         <para>
             The source <filename>local.conf.sample</filename> file used
             depends on the <filename>$TEMPLATECONF</filename> script variable,
-            which defaults to <filename>meta-yocto/conf</filename>
+            which defaults to <filename>meta-poky/conf</filename>
             when you are building from the Yocto Project development
             environment and defaults to <filename>meta/conf</filename> when
             you are building from the OpenEmbedded Core environment.
@@ -538,7 +536,7 @@
                 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
                 You can find the Yocto Project version of the
                 <filename>local.conf.sample</filename> file in the
-                <filename>meta-yocto/conf</filename> directory.
+                <filename>meta-poky/conf</filename> directory.
             </note>
         </para>
     </section>
@@ -569,7 +567,7 @@
         <para>
             The source <filename>bblayers.conf.sample</filename> file used
             depends on the <filename>$TEMPLATECONF</filename> script variable,
-            which defaults to <filename>meta-yocto/conf</filename>
+            which defaults to <filename>meta-poky/conf</filename>
             when you are building from the Yocto Project development
             environment and defaults to <filename>meta/conf</filename> when
             you are building from the OpenEmbedded Core environment.
@@ -590,7 +588,7 @@
                 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
                 You can find the Yocto Project version of the
                 <filename>bblayers.conf.sample</filename> file in the
-                <filename>meta-yocto/conf</filename> directory.
+                <filename>meta-poky/conf</filename> directory.
             </note>
         </para>
     </section>
@@ -738,8 +736,7 @@
         <para>
             Be careful when deleting files in this directory.
             You can safely delete old images from this directory (e.g.
-            <filename>core-image-*</filename>, <filename>hob-image-*</filename>,
-            etc.).
+            <filename>core-image-*</filename>).
             However, the kernel (<filename>*zImage*</filename>, <filename>*uImage*</filename>, etc.),
             bootloader and other supplementary files might be deployed here prior to building an
             image.
@@ -767,8 +764,8 @@
             toolchain installer scripts, which when executed, install the
             sysroot that matches your target hardware.
             You can find out more about these installers in the
-            "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
-            section in the Yocto Project Application Developer's Guide.
+            "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
+            section in the Yocto Project Software Development Kit (SDK) Developer's Guide.
         </para>
     </section>
 
@@ -1091,14 +1088,6 @@
         </para>
     </section>
 
-    <section id='structure-meta-recipes-qt'>
-        <title><filename>meta/recipes-qt/</filename></title>
-
-        <para>
-            This directory contains all things related to the Qt application framework.
-        </para>
-    </section>
-
     <section id='structure-meta-recipes-rt'>
         <title><filename>meta/recipes-rt/</filename></title>
 
diff --git a/yocto-poky/documentation/ref-manual/ref-tasks.xml b/yocto-poky/documentation/ref-manual/ref-tasks.xml
index 21403c0..c46debb 100644
--- a/yocto-poky/documentation/ref-manual/ref-tasks.xml
+++ b/yocto-poky/documentation/ref-manual/ref-tasks.xml
@@ -31,6 +31,36 @@
         </para>
     </section>
 
+    <section id='ref-tasks-checkpkg'>
+        <title><filename>do_checkpkg</filename></title>
+
+        <para>
+            Provides information about the recipe including its upstream
+            version and status.
+            The upstream version and status reveals whether or not a version
+            of the recipe exists upstream and a status of not updated, updated,
+            or unknown.
+        </para>
+
+        <para>
+            The <filename>checkpkg</filename> task is included as part of the
+            <link linkend='ref-classes-distrodata'><filename>distrodata</filename></link>
+            class.
+        </para>
+
+        <para>
+            To build the <filename>checkpkg</filename> task, use the
+            <filename>bitbake</filename> command with the "-c" option and
+            task name:
+            <literallayout class='monospaced'>
+     $ bitbake core-image-minimal -c checkpkg
+            </literallayout>
+            By default, the results are stored in
+            <link linkend='var-LOG_DIR'><filename>$LOG_DIR</filename></link>
+            (e.g. <filename>$BUILD_DIR/tmp/log</filename>).
+        </para>
+    </section>
+
     <section id='ref-tasks-compile'>
         <title><filename>do_compile</filename></title>
 
@@ -87,6 +117,32 @@
         </para>
     </section>
 
+    <section id='ref-tasks-distrodata'>
+        <title><filename>do_distrodata</filename></title>
+
+        <para>
+            Provides information about the recipe.
+        </para>
+
+        <para>
+            The <filename>distrodata</filename> task is included as part of the
+            <link linkend='ref-classes-distrodata'><filename>distrodata</filename></link>
+            class.
+        </para>
+
+        <para>
+            To build the <filename>distrodata</filename> task, use the
+            <filename>bitbake</filename> command with the "-c" option and
+            task name:
+            <literallayout class='monospaced'>
+     $ bitbake core-image-minimal -c distrodata
+            </literallayout>
+            By default, the results are stored in
+            <link linkend='var-LOG_DIR'><filename>$LOG_DIR</filename></link>
+            (e.g. <filename>$BUILD_DIR/tmp/log</filename>).
+        </para>
+    </section>
+
     <section id='ref-tasks-fetch'>
         <title><filename>do_fetch</filename></title>
 
@@ -99,6 +155,60 @@
         </para>
     </section>
 
+    <section id='ref-tasks-image'>
+        <title><filename>do_image</filename></title>
+
+        <para>
+            Starts the image generation process.
+            The <filename>do_image</filename> task runs after the
+            OpenEmbedded build system has run the
+            <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>
+            task during which packages are identified for installation into
+            the image and the root filesystem is created, complete with
+            post-processing.
+        </para>
+
+        <para>
+            The <filename>do_image</filename> task performs pre-processing
+            on the image through the
+            <link linkend='var-IMAGE_PREPROCESS_COMMAND'><filename>IMAGE_PREPROCESS_COMMAND</filename></link>
+            and dynamically generates supporting
+            <filename>do_image_*</filename> tasks as needed.
+        </para>
+
+        <para>
+            For more information on image creation, see the
+            "<link linkend='image-generation-dev-environment'>Image Generation</link>"
+            section.
+        </para>
+    </section>
+
+    <section id='ref-tasks-image-complete'>
+        <title><filename>do_image_complete</filename></title>
+
+        <para>
+            Completes the image generation process.
+            The <filename>do_image_complete</filename> task runs after the
+            OpenEmbedded build system has run the
+            <link linkend='ref-tasks-rootfs'><filename>do_image</filename></link>
+            task during which image pre-processing occurs and through
+            dynamically generated <filename>do_image_*</filename> tasks the
+            image is constructed.
+        </para>
+
+        <para>
+            The <filename>do_image_complete</filename> task performs
+            post-processing on the image through the
+            <link linkend='var-IMAGE_POSTPROCESS_COMMAND'><filename>IMAGE_POSTPROCESS_COMMAND</filename></link>.
+        </para>
+
+        <para>
+            For more information on image creation, see the
+            "<link linkend='image-generation-dev-environment'>Image Generation</link>"
+            section.
+        </para>
+    </section>
+
     <section id='ref-tasks-install'>
         <title><filename>do_install</filename></title>
 
@@ -239,10 +349,16 @@
         <title><filename>do_populate_sysroot</filename></title>
 
         <para>
-            Copies a subset of files installed by the
+            Copies a subset of the files installed by the
             <link linkend='ref-tasks-install'><filename>do_install</filename></link>
-            task into the sysroot in order to make them available to other
-            recipes.
+            task into the sysroot to make them available to other recipes.
+            Files that would typically not be needed by other recipes at build
+            time are skipped.
+            Skipped files include files installed into
+            <filename>/etc.</filename>
+            For information on what files are copied, see the
+            <link linkend='ref-classes-staging'><filename>staging</filename></link>
+            class.
         </para>
 
         <para>
@@ -700,15 +816,6 @@
         The following sections describe miscellaneous tasks.
     </para>
 
-    <section id='ref-tasks-generate_qt_config_file'>
-        <title><filename>do_generate_qt_config_file</filename></title>
-
-        <para>
-            Writes a <filename>qt.conf</filename> configuration
-            file used for building a Qt-based application.
-        </para>
-    </section>
-
     <section id='ref-tasks-spdx'>
         <title><filename>do_spdx</filename></title>
 
diff --git a/yocto-poky/documentation/ref-manual/ref-variables.xml b/yocto-poky/documentation/ref-manual/ref-variables.xml
index 0b2c426..d55bccd 100644
--- a/yocto-poky/documentation/ref-manual/ref-variables.xml
+++ b/yocto-poky/documentation/ref-manual/ref-variables.xml
@@ -32,7 +32,7 @@
 <!--               <link linkend='var-glossary-n'>N</link> -->
        <link linkend='var-OBJCOPY'>O</link>
        <link linkend='var-P'>P</link>
-       <link linkend='var-QMAKE_PROFILES'>Q</link>
+<!--               <link linkend='var-glossary-q'>Q</link> -->
        <link linkend='var-RANLIB'>R</link>
        <link linkend='var-S'>S</link>
        <link linkend='var-T'>T</link>
@@ -1130,24 +1130,11 @@
                     <literallayout class='monospaced'>
      BBLAYERS = " \
        /home/scottrif/poky/meta \
-       /home/scottrif/poky/meta-yocto \
+       /home/scottrif/poky/meta-poky \
        /home/scottrif/poky/meta-yocto-bsp \
        /home/scottrif/poky/meta-mykernel \
        "
-
-     BBLAYERS_NON_REMOVABLE ?= " \
-       /home/scottrif/poky/meta \
-       /home/scottrif/poky/meta-yocto \
-       "
                     </literallayout>
-                    <note>
-                        The
-                        <link linkend='var-BBLAYERS_NON_REMOVABLE'><filename>BBLAYERS_NON_REMOVABLE</filename></link>
-                        variable exists only for
-                        <ulink url='https://www.yoctoproject.org/tools-resources/projects/hob'>Hob</ulink>.
-                        The OpenEmbedded build system does not use this
-                        variable.
-                    </note>
                 </para>
 
                 <para>
@@ -1157,60 +1144,15 @@
             </glossdef>
         </glossentry>
 
-        <glossentry id='var-BBLAYERS_NON_REMOVABLE'><glossterm>BBLAYERS_NON_REMOVABLE</glossterm>
-            <info>
-                BBLAYERS_NON_REMOVABLE[doc] = "Lists core layers that cannot be removed from the bblayers.conf file."
-            </info>
-            <glossdef>
-                <para role="glossdeffirst">
-<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Lists core layers that cannot be removed from the
-                    <filename>bblayers.conf</filename> file during a build
-                    using the
-                    <ulink url='https://www.yoctoproject.org/tools-resources/projects/hob'>Hob</ulink>.
-                    <note>
-                        When building an image outside of Hob, the OpenEmbedded
-                        build system ignores this variable.
-                    </note>
-                </para>
-
-                <para>
-                    In order for BitBake to build your image using Hob, your
-                    <filename>bblayers.conf</filename> file must include the
-                    <filename>meta</filename> and <filename>meta-yocto</filename>
-                    core layers.
-                    Here is an example that shows these two layers listed in
-                    the <filename>BBLAYERS_NON_REMOVABLE</filename> statement:
-                    <literallayout class='monospaced'>
-     BBLAYERS = " \
-       /home/scottrif/poky/meta \
-       /home/scottrif/poky/meta-yocto \
-       /home/scottrif/poky/meta-yocto-bsp \
-       /home/scottrif/poky/meta-mykernel \
-       "
-
-     BBLAYERS_NON_REMOVABLE ?= " \
-       /home/scottrif/poky/meta \
-       /home/scottrif/poky/meta-yocto \
-       "
-                    </literallayout>
-                </para>
-            </glossdef>
-        </glossentry>
-
         <glossentry id='var-BBMASK'><glossterm>BBMASK</glossterm>
             <info>
-                BBMASK[doc] = "Prevents BitBake from processing specific recipes or recipe append files. Use the BBMASK variable from within conf/local.conf."
+                BBMASK[doc] = "Prevents BitBake from processing specific recipes or recipe append files."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Prevents BitBake from processing recipes and recipe
                     append files.
-                    Use the <filename>BBMASK</filename> variable from within the
-                    <filename>conf/local.conf</filename> file found
-                    in the
-                    <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
                 </para>
 
                 <para>
@@ -1218,14 +1160,14 @@
                     to "hide" these <filename>.bb</filename> and
                     <filename>.bbappend</filename> files.
                     BitBake ignores any recipe or recipe append files that
-                    match the expression.
+                    match any of the expressions.
                     It is as if BitBake does not see them at all.
                     Consequently, matching files are not parsed or otherwise
                     used by BitBake.</para>
                 <para>
-                    The value you provide is passed to Python's regular
+                    The values you provide are passed to Python's regular
                     expression compiler.
-                    The expression is compared against the full paths to
+                    The expressions are compared against the full paths to
                     the files.
                     For complete syntax information, see Python's
                     documentation at
@@ -1241,18 +1183,16 @@
      BBMASK = "meta-ti/recipes-misc/"
                     </literallayout>
                     If you want to mask out multiple directories or recipes,
-                    use the vertical bar to separate the regular expression
-                    fragments.
+                    you can specify multiple regular expression fragments.
                     This next example masks out multiple directories and
                     individual recipes:
                     <literallayout class='monospaced'>
-     BBMASK = "meta-ti/recipes-misc/|meta-ti/recipes-ti/packagegroup/"
-     BBMASK .= "|.*meta-oe/recipes-support/"
-     BBMASK .= "|.*openldap"
-     BBMASK .= "|.*opencv"
-     BBMASK .= "|.*lzma"
+     BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
+     BBMASK += "/meta-oe/recipes-support/"
+     BBMASK += "/meta-foo/.*/openldap"
+     BBMASK += "opencv.*\.bbappend"
+     BBMASK += "lzma"
                     </literallayout>
-                    Notice how the vertical bar is used to append the fragments.
                     <note>
                         When specifying a directory name, use the trailing
                         slash character to ensure you match just that directory
@@ -1402,15 +1342,22 @@
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     The bare name of the recipe.
-                    This variable is a version of the <link linkend='var-PN'><filename>PN</filename></link> variable
-                    but removes common suffixes such as "-native" and "-cross" as well
-                    as removes common prefixes such as multilib's "lib64-" and "lib32-".
+                    This variable is a version of the
+                    <link linkend='var-PN'><filename>PN</filename></link>
+                    variable but removes common suffixes such as
+                    <filename>-native</filename> and
+                    <filename>-cross</filename> as well
+                    as removes common prefixes such as multilib's
+                    <filename>lib64-</filename> and
+                    <filename>lib32-</filename>.
                     The exact list of suffixes removed is specified by the
-                    <link linkend='var-SPECIAL_PKGSUFFIX'><filename>SPECIAL_PKGSUFFIX</filename></link> variable.
+                    <link linkend='var-SPECIAL_PKGSUFFIX'><filename>SPECIAL_PKGSUFFIX</filename></link>
+                    variable.
                     The exact list of prefixes removed is specified by the
-                    <link linkend='var-MLPREFIX'><filename>MLPREFIX</filename></link> variable.
+                    <link linkend='var-MLPREFIX'><filename>MLPREFIX</filename></link>
+                    variable.
                     Prefixes are removed for <filename>multilib</filename>
-                    and <filename>nativesdk</filename> cases.
+                    and <filename>nativesdk-</filename> cases.
                 </para>
             </glossdef>
         </glossentry>
@@ -1473,7 +1420,7 @@
                     Specifies the flags to pass to the C pre-processor
                     (i.e. to both the C and the C++ compilers) when building
                     for the build host.
-                    When building in the <filename>native</filename> context,
+                    When building in the <filename>-native</filename> context,
                     <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
                     is set to the value of this variable by default.
                 </para>
@@ -1489,7 +1436,7 @@
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies the flags to pass to the C++ compiler when
                     building for the build host.
-                    When building in the <filename>native</filename> context,
+                    When building in the <filename>-native</filename> context,
                     <link linkend='var-CXXFLAGS'><filename>CXXFLAGS</filename></link>
                     is set to the value of this variable by default.
                 </para>
@@ -1564,7 +1511,7 @@
                     The OpenEmbedded build system uses the
                     <filename>BUILD_PREFIX</filename> value to set the
                     <link linkend='var-TARGET_PREFIX'><filename>TARGET_PREFIX</filename></link>
-                    when building for native recipes.
+                    when building for <filename>native</filename> recipes.
                 </para>
             </glossdef>
         </glossentry>
@@ -1845,7 +1792,7 @@
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies the flags to pass to the C compiler when building
                     for the SDK.
-                    When building in the <filename>nativesdk</filename>
+                    When building in the <filename>nativesdk-</filename>
                     context,
                     <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
                     is set to the value of this variable by default.
@@ -1863,7 +1810,7 @@
                     Specifies the flags to pass to the C pre-processor
                     (i.e. to both the C and the C++ compilers) when building
                     for the SDK.
-                    When building in the <filename>nativesdk</filename>
+                    When building in the <filename>nativesdk-</filename>
                     context,
                     <link linkend='var-CPPFLAGS'><filename>CPPFLAGS</filename></link>
                     is set to the value of this variable by default.
@@ -1880,7 +1827,7 @@
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies the flags to pass to the C++ compiler when
                     building for the SDK.
-                    When building in the <filename>nativesdk</filename>
+                    When building in the <filename>nativesdk-</filename>
                     context,
                     <link linkend='var-CXXFLAGS'><filename>CXXFLAGS</filename></link>
                     is set to the value of this variable by default.
@@ -2037,7 +1984,7 @@
                     and then can be used as an override.
                     Here is an example where "python-native" is added to
                     <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
-                    only when building for the native case:
+                    only when building for the <filename>-native</filename> case:
                     <literallayout class='monospaced'>
      DEPENDS_append_class-native = " python-native"
                     </literallayout>
@@ -2354,7 +2301,20 @@
                     <filename>/usr/share/common-licenses</filename>,
                     for each package.
                     The license files are placed
-                    in directories within the image itself.
+                    in directories within the image itself during build time.
+                    <note>
+                        The <filename>COPY_LIC_DIRS</filename> does not
+                        offer a path for adding licenses for newly installed
+                        packages to an image, which might be most suitable
+                        for read-only filesystems that cannot be upgraded.
+                        See the
+                        <link linkend='var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></link>
+                        variable for additional information.
+                        You can also reference the
+                        "<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
+                        section in the Yocto Project Development Manual for
+                        information on providing license text.
+                    </note>
                 </para>
             </glossdef>
         </glossentry>
@@ -2369,7 +2329,20 @@
                     If set to "1", the OpenEmbedded build system copies
                     the license manifest for the image to
                     <filename>/usr/share/common-licenses/license.manifest</filename>
-                    within the image itself.
+                    within the image itself during build time.
+                    <note>
+                        The <filename>COPY_LIC_MANIFEST</filename> does not
+                        offer a path for adding licenses for newly installed
+                        packages to an image, which might be most suitable
+                        for read-only filesystems that cannot be upgraded.
+                        See the
+                        <link linkend='var-LICENSE_CREATE_PACKAGE'><filename>LICENSE_CREATE_PACKAGE</filename></link>
+                        variable for additional information.
+                        You can also reference the
+                        "<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
+                        section in the Yocto Project Development Manual for
+                        information on providing license text.
+                    </note>
                 </para>
             </glossdef>
         </glossentry>
@@ -2420,6 +2393,35 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-COREBASE_FILES'><glossterm>COREBASE_FILES</glossterm>
+            <info>
+                COREBASE_FILES[doc] = "Lists files from the COREBASE directory that should be copied other than the layers listed in the bblayers.conf file."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    Lists files from the
+                    <link linkend='var-COREBASE'><filename>COREBASE</filename></link>
+                    directory that should be copied other than the layers
+                    listed in the <filename>bblayers.conf</filename> file.
+                    The <filename>COREBASE_FILES</filename> variable exists
+                    for the purpose of copying metadata from the
+                    OpenEmbedded build system into the extensible
+                    SDK.
+                </para>
+
+                <para>
+                    Explicitly listing files in <filename>COREBASE</filename>
+                    is needed because it typically contains build
+                    directories and other files that should not normally
+                    be copied into the extensible SDK.
+                    Consequently, the value of
+                    <filename>COREBASE_FILES</filename> is used in order to
+                    only copy the files that are actually needed.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-CPP'><glossterm>CPP</glossterm>
             <info>
                 CPP[doc] = "Minimum command and arguments to run the C preprocessor."
@@ -2547,7 +2549,7 @@
                         <listitem><para>
                             <link linkend='var-BUILDSDK_CXXFLAGS'><filename>BUILDSDK_CXXFLAGS</filename></link>
                             when building for an SDK (i.e.
-                            <filename>nativesdk</filename>)
+                            <filename>nativesdk-</filename>)
                             </para></listitem>
                     </itemizedlist>
                 </para>
@@ -3110,7 +3112,7 @@
                     For example, the distribution configuration file for the
                     Poky distribution is named <filename>poky.conf</filename>
                     and resides in the
-                    <filename>meta-yocto/conf/distro</filename> directory of
+                    <filename>meta-poky/conf/distro</filename> directory of
                     the
                     <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
                 </para>
@@ -3413,6 +3415,9 @@
                     see this specific question in the
                     "<link linkend='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</link>"
                     chapter.
+                    You can also refer to the
+                    "<ulink url='&YOCTO_WIKI_URL;/wiki/Working_Behind_a_Network_Proxy'>Working Behind a Network Proxy</ulink>"
+                    Wiki page.
                 </para>
             </glossdef>
         </glossentry>
@@ -3814,9 +3819,6 @@
 "tools-debug" - Adds debugging tools such as gdb and
                 strace.
 
-"tools-profile" - Adds profiling tools such as oprofile,
-                  exmap, lttng and valgrind (x86 only).
-
 "tools-sdk" - Adds development tools such as gcc, make,
               pkgconfig and so forth.
 
@@ -3924,6 +3926,12 @@
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Additional GNU <filename>make</filename> options.
                 </para>
+
+                <para>
+                    Because the <filename>EXTRA_OEMAKE</filename> defaults to
+                    "", you need to set the variable to specify any required
+                    GNU options.
+                </para>
             </glossdef>
         </glossentry>
 
@@ -3943,50 +3951,6 @@
             </glossdef>
         </glossentry>
 
-        <glossentry id='var-EXTRA_QMAKEVARS_POST'><glossterm>EXTRA_QMAKEVARS_POST</glossterm>
-            <info>
-                EXTRA_QMAKEVARS_POST[doc] = "Configuration variables or options you want to pass to qmake when the arguments need to be after the .pro file list on the command line."
-            </info>
-            <glossdef>
-                <para role="glossdeffirst">
-<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Configuration variables or options you want to pass to
-                    <filename>qmake</filename>.
-                    Use this variable when the arguments need to be after the
-                    <filename>.pro</filename> file list on the command line.
-                </para>
-
-                <para>
-                    This variable is used with recipes that inherit the
-                    <link linkend='ref-classes-qmake*'><filename>qmake_base</filename></link>
-                    class or other classes that inherit
-                    <filename>qmake_base</filename>.
-                </para>
-            </glossdef>
-        </glossentry>
-
-       <glossentry id='var-EXTRA_QMAKEVARS_PRE'><glossterm>EXTRA_QMAKEVARS_PRE</glossterm>
-            <info>
-                EXTRA_QMAKEVARS_PRE[doc] = "Configuration variables or options you want to pass to qmake when the arguments need to be before the .pro file list on the command line."
-            </info>
-            <glossdef>
-                <para role="glossdeffirst">
-<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Configuration variables or options you want to pass to
-                    <filename>qmake</filename>.
-                    Use this variable when the arguments need to be before the
-                    <filename>.pro</filename> file list on the command line.
-                </para>
-
-                <para>
-                    This variable is used with recipes that inherit the
-                    <link linkend='ref-classes-qmake*'><filename>qmake_base</filename></link>
-                    class or other classes that inherit
-                    <filename>qmake_base</filename>.
-                </para>
-            </glossdef>
-        </glossentry>
-
         <glossentry id='var-EXTRA_USERS_PARAMS'><glossterm>EXTRA_USERS_PARAMS</glossterm>
             <info>
                 EXTRA_USERS_PARAMS[doc] = "When a recipe inherits the extrausers class, this variable provides image level user and group operations."
@@ -4760,12 +4724,12 @@
                         <listitem><para>
                             <filename>BUILD_CC_ARCH</filename>
                             when building for the build host (i.e.
-                            <filename>native</filename>)
+                            <filename>-native</filename>)
                             </para></listitem>
                         <listitem><para>
                             <filename>BUILDSDK_CC_ARCH</filename>
                             when building for an SDK (i.e.
-                            <filename>nativesdk</filename>)
+                            <filename>nativesdk-</filename>)
                             </para></listitem>
                     </itemizedlist>
                 </para>
@@ -5523,7 +5487,7 @@
 
                 <para>
                     The
-                    <link linkend='ref-classes-populate-sdk-*'><filename>package_sdk_base</filename></link>
+                    <link linkend='ref-classes-populate-sdk-*'><filename>populate_sdk_*</filename></link>
                     and
                     <link linkend='ref-classes-image'><filename>image</filename></link>
                     classes use the <filename>IMAGE_PKGTYPE</filename> for
@@ -5916,6 +5880,43 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-INHERIT'><glossterm>INHERIT</glossterm>
+            <info>
+                INHERIT[doc] = "Causes the named class to be inherited at this point during parsing. The variable is only valid in configuration files."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    Causes the named class to be inherited at
+                    this point during parsing.
+                    The variable is only valid in configuration files.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-INHERIT_DISTRO'><glossterm>INHERIT_DISTRO</glossterm>
+            <info>
+                INHERIT_DISTRO[doc] = "Lists classes that will be inherited at the distribution level. It is unlikely that you want to edit this variable."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    Lists classes that will be inherited at the
+                    distribution level.
+                    It is unlikely that you want to edit this variable.
+                </para>
+
+                <para>
+                    The default value of the variable is set as follows in the
+                    <filename>meta/conf/distro/defaultsetup.conf</filename>
+                    file:
+                    <literallayout class='monospaced'>
+     INHERIT_DISTRO ?= "debian devshell sstate license"
+                    </literallayout>
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-INHIBIT_DEFAULT_DEPS'><glossterm>INHIBIT_DEFAULT_DEPS</glossterm>
             <info>
                 INHIBIT_DEFAULT_DEPS[doc] = "Prevents the default dependencies, namely the C compiler and standard C library (libc), from being added to DEPENDS."
@@ -5980,43 +5981,6 @@
             </glossdef>
         </glossentry>
 
-        <glossentry id='var-INHERIT'><glossterm>INHERIT</glossterm>
-            <info>
-                INHERIT[doc] = "Causes the named class to be inherited at this point during parsing. The variable is only valid in configuration files."
-            </info>
-            <glossdef>
-                <para role="glossdeffirst">
-<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Causes the named class to be inherited at
-                    this point during parsing.
-                    The variable is only valid in configuration files.
-                </para>
-            </glossdef>
-        </glossentry>
-
-        <glossentry id='var-INHERIT_DISTRO'><glossterm>INHERIT_DISTRO</glossterm>
-            <info>
-                INHERIT_DISTRO[doc] = "Lists classes that will be inherited at the distribution level. It is unlikely that you want to edit this variable."
-            </info>
-            <glossdef>
-                <para role="glossdeffirst">
-<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Lists classes that will be inherited at the
-                    distribution level.
-                    It is unlikely that you want to edit this variable.
-                </para>
-
-                <para>
-                    The default value of the variable is set as follows in the
-                    <filename>meta/conf/distro/defaultsetup.conf</filename>
-                    file:
-                    <literallayout class='monospaced'>
-     INHERIT_DISTRO ?= "debian devshell sstate license"
-                    </literallayout>
-                </para>
-            </glossdef>
-        </glossentry>
-
         <glossentry id='var-INITRAMFS_FSTYPES'><glossterm>INITRAMFS_FSTYPES</glossterm>
             <info>
                 INITRAMFS_FSTYPES[doc] = "Defines the format for the output image of an initial RAM disk (initramfs), which is used during boot."
@@ -6071,7 +6035,7 @@
 
                 <para>
                     See the
-                    <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto/conf/local.conf.sample.extended'><filename>local.conf.sample.extended</filename></ulink>
+                    <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-poky/conf/local.conf.sample.extended'><filename>local.conf.sample.extended</filename></ulink>
                     file for additional information.
                     You can also reference the
                     <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/kernel.bbclass'><filename>kernel.bbclass</filename></ulink>
@@ -6125,7 +6089,7 @@
                         You cannot set the variable in a recipe file.
                     </note>
                     See the
-                    <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-yocto/conf/local.conf.sample.extended'><filename>local.conf.sample.extended</filename></ulink>
+                    <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta-poky/conf/local.conf.sample.extended'><filename>local.conf.sample.extended</filename></ulink>
                     file for additional information.
                 </para>
             </glossdef>
@@ -6145,7 +6109,7 @@
                 <para>
                     The <filename>INITRD</filename> variable is an optional
                     variable used with the
-                    <link linkend='ref-classes-bootimg'><filename>bootimg</filename></link>
+                    <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
                     class.
                 </para>
             </glossdef>
@@ -6277,6 +6241,22 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-INSTALL_TIMEZONE_FILE'><glossterm>INSTALL_TIMEZONE_FILE</glossterm>
+            <info>
+                INSTALL_TIMEZONE_FILE[doc] = "Enables installation of the /etc/timezone file."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    By default, the <filename>tzdata</filename> recipe packages
+                    an <filename>/etc/timezone</filename> file.
+                    Set the <filename>INSTALL_TIMEZONE_FILE</filename>
+                    variable to "0" at the configuration level to disable this
+                    behavior.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-IPK_FEED_URIS'><glossterm>IPK_FEED_URIS</glossterm>
             <info>
                 IPK_FEED_URIS[doc] = "List of ipkg feed records to put into generated image."
@@ -7179,6 +7159,49 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-LICENSE_CREATE_PACKAGE'><glossterm>LICENSE_CREATE_PACKAGE</glossterm>
+            <info>
+                LICENSE_CREATE_PACKAGE[doc] = "Creates an extra package (i.e. ${PN}-lic) for each recipe and adds that package to the RRECOMMENDS+${PN}."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                        Setting <filename>LICENSE_CREATE_PACKAGE</filename>
+                        to "1" causes the OpenEmbedded build system to create
+                        an extra package (i.e.
+                        <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}-lic</filename>)
+                        for each recipe and to add those packages to the
+                        <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link><filename>_${PN}</filename>.
+                </para>
+
+                <para>
+                    The <filename>${PN}-lic</filename> package installs a
+                    directory in <filename>/usr/share/licenses</filename>
+                    named <filename>${PN}</filename>, which is the recipe's
+                    base name, and installs files in that directory that
+                    contain license and copyright information (i.e. copies of
+                    the appropriate license files from
+                    <filename>meta/common-licenses</filename> that match the
+                    licenses specified in the
+                    <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
+                    variable of the recipe metadata and copies of files marked
+                    in
+                    <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>
+                    as containing license text).
+                </para>
+
+                <para>
+                    For related information on providing license text, see the
+                    <link linkend='var-COPY_LIC_DIRS'><filename>COPY_LIC_DIRS</filename></link>
+                    variable, the
+                    <link linkend='var-COPY_LIC_MANIFEST'><filename>COPY_LIC_MANIFEST</filename></link>
+                    variable, and the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#providing-license-text'>Providing License Text</ulink>"
+                    section in the Yocto Project Development Manual.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-LICENSE_FLAGS'><glossterm>LICENSE_FLAGS</glossterm>
             <info>
                 LICENSE_FLAGS[doc] = "Specifies additional flags for a recipe you must whitelist through LICENSE_FLAGS_WHITELIST in order to allow the recipe to be built."
@@ -7774,7 +7797,7 @@
                     is "poky", the default value for
                     <filename>MIRRORS</filename> is defined in the
                     <filename>conf/distro/poky.conf</filename> file in the
-                    <filename>meta-yocto</filename> Git repository.
+                    <filename>meta-poky</filename> Git repository.
                 </para>
             </glossdef>
         </glossentry>
@@ -8066,7 +8089,7 @@
                     Causes the OpenEmbedded build system to skip building the
                     <filename>.hddimg</filename> image.
                     The <filename>NOHDD</filename> variable is used with the
-                    <link linkend='ref-classes-bootimg'><filename>bootimg</filename></link>
+                    <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
                     class.
                     Set the variable to "1" to prevent the
                     <filename>.hddimg</filename> image from being built.
@@ -8084,7 +8107,7 @@
                     Causes the OpenEmbedded build system to skip building the
                     ISO image.
                     The <filename>NOISO</filename> variable is used with the
-                    <link linkend='ref-classes-bootimg'><filename>bootimg</filename></link>
+                    <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
                     class.
                     Set the variable to "1" to prevent the ISO image from
                     being built.
@@ -8176,6 +8199,28 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-OE_INIT_ENV_SCRIPT'><glossterm>OE_INIT_ENV_SCRIPT</glossterm>
+            <info>
+                OE_INIT_ENV_SCRIPT[doc] = "The name of the build environment setup script for the purposes of setting up the environment within the extensible SDK."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    The name of the build environment setup script for the
+                    purposes of setting up the environment within the
+                    extensible SDK.
+                    The default value is "oe-init-build-env".
+                </para>
+
+                <para>
+                    If you use a custom script to set up your build
+                    environment, set the
+                    <filename>OE_INIT_ENV_SCRIPT</filename> variable to its
+                    name.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-OE_TERMINAL'><glossterm>OE_TERMINAL</glossterm>
             <info>
                 OE_TERMINAL[doc] = "Controls how the OpenEmbedded build system spawns interactive terminals on the host development system."
@@ -9539,6 +9584,17 @@
      PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
      PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
                     </literallayout>
+                    <note>
+                        If you set <filename>PREFERRED_PROVIDER</filename>
+                        for a <filename>virtual/*</filename> item, then any
+                        recipe that
+                        <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
+                        that item that is not selected by
+                        <filename>PREFERRED_PROVIDER</filename> is prevented
+                        from building, which is usually desirable since this
+                        mechanism is designed to select between mutually
+                        exclusive alternative providers.
+                    </note>
                 </para>
             </glossdef>
         </glossentry>
@@ -9566,6 +9622,23 @@
      PREFERRED_VERSION_python = "2.7.3"
      PREFERRED_VERSION_linux-yocto = "3.19%"
                     </literallayout>
+                    Sometimes the <filename>PREFERRED_VERSION</filename>
+                    variable can be set by configuration files in a way that
+                    is hard to change.
+                    You can use
+                    <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
+                    to set a machine-specific override.
+                    Here is an example:
+                    <literallayout class='monospaced'>
+     PREFERRED_VERSION_linux-yocto_qemux86 = "3.4%"
+                    </literallayout>
+                    Although not recommended, worst case, you can also use the
+                    "forcevariable" override, which is the strongest override
+                    possible.
+                    Here is an example:
+                    <literallayout class='monospaced'>
+     PREFERRED_VERSION_linux-yocto_forcevariable = "3.4%"
+                    </literallayout>
                 </para>
             </glossdef>
         </glossentry>
@@ -9594,7 +9667,7 @@
                     is "poky", the default value for
                     <filename>PREMIRRORS</filename> is defined in the
                     <filename>conf/distro/poky.conf</filename> file in the
-                    <filename>meta-yocto</filename> Git repository.
+                    <filename>meta-poky</filename> Git repository.
                 </para>
 
                 <para>
@@ -9854,35 +9927,6 @@
 
     </glossdiv>
 
-    <glossdiv id='var-glossary-q'><title>Q</title>
-
-        <glossentry id='var-QMAKE_PROFILES'><glossterm>QMAKE_PROFILES</glossterm>
-            <info>
-                QMAKE_PROFILES[doc] = "Specifies your own subset of .pro files to be built for use with qmake."
-            </info>
-            <glossdef>
-                <para role="glossdeffirst">
-<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    Specifies your own subset of <filename>.pro</filename>
-                    files to be built for use with
-                    <filename>qmake</filename>.
-                    If you do not set this variable, all
-                    <filename>.pro</filename> files in the directory pointed to
-                    by <link linkend='var-S'><filename>S</filename></link>
-                    will be built by default.
-                </para>
-
-                <para>
-                    This variable is used with recipes that inherit the
-                    <link linkend='ref-classes-qmake*'><filename>qmake_base</filename></link>
-                    class or other classes that inherit
-                    <filename>qmake_base</filename>.
-                </para>
-            </glossdef>
-        </glossentry>
-
-    </glossdiv>
-
     <glossdiv id='var-glossary-r'><title>R</title>
 
         <glossentry id='var-RANLIB'><glossterm>RANLIB</glossterm>
@@ -10195,7 +10239,7 @@
                 <para>
                     The <filename>ROOTFS</filename> variable is an optional
                     variable used with the
-                    <link linkend='ref-classes-bootimg'><filename>bootimg</filename></link>
+                    <link linkend='ref-classes-image-live'><filename>image-live</filename></link>
                     class.
                 </para>
             </glossdef>
@@ -10532,17 +10576,16 @@
                     The location in the
                     <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
                     where unpacked recipe source code resides.
-                    This location is within the work directory
-                    (<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>),
-                    which is not static.
-                    The unpacked source location depends on the recipe name
-                    (<filename><link linkend='var-PN'>PN</link></filename>) and
-                    recipe version
-                    (<filename><link linkend='var-PV'>PV</link></filename>) as
-                    follows:
-                    <literallayout class='monospaced'>
-     ${WORKDIR}/${PN}-${PV}
-                    </literallayout>
+                    By default, this directory is
+                    <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}/${</filename><link linkend='var-BPN'><filename>BPN</filename></link><filename>}-${</filename><link linkend='var-PV'><filename>PV</filename></link><filename>}</filename>,
+                    where <filename>${BPN}</filename> is the base recipe name
+                    and <filename>${PV}</filename> is the recipe version.
+                    If the source tarball extracts the code to a directory
+                    named anything other than <filename>${BPN}-${PV}</filename>,
+                    or if the source code if fetched from an SCM such as
+                    Git or Subversion, then you must set <filename>S</filename>
+                    in the recipe so that the OpenEmbedded build system
+                    knows where to find the unpacked source.
                 </para>
 
                 <para>
@@ -10556,6 +10599,22 @@
                     <literallayout class='monospaced'>
      poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
                     </literallayout>
+                    The unpacked source code resides in the
+                    <filename>db-5.1.19</filename> folder.
+                </para>
+
+                <para>
+                    This next example assumes a Git repository.
+                    By default, Git repositories are cloned to
+                    <filename>${WORKDIR}/git</filename> during
+                    <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link>.
+                    Since this path is different from the default value of
+                    <filename>S</filename>, you must set it specifically
+                    so the source can be located:
+                    <literallayout class='monospaced'>
+     SRC_URI = "git://path/to/repo.git"
+     S = "${WORKDIR}/git"
+                    </literallayout>
                 </para>
             </glossdef>
         </glossentry>
@@ -10661,6 +10720,30 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-SDK_EXT_TYPE'><glossterm>SDK_EXT_TYPE</glossterm>
+            <info>
+                SDK_EXT_TYPE[doc] = "Controls whether or not shared state artifacts are copied into the extensible SDK."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    Controls whether or not shared state artifacts are copied
+                    into the extensible SDK.
+                    The default value of "full" copies all of the required
+                    shared state artifacts into the extensible SDK.
+                    The value "minimal" leaves these artifacts out of the
+                    SDK.
+                    <note>
+                        If you set the variable to "minimal", you need to
+                        ensure
+                        <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
+                        is set in the SDK's configuration to enable the
+                        artifacts to be fetched as needed.
+                    </note>
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-SDK_HOST_MANIFEST'><glossterm>SDK_HOST_MANIFEST</glossterm>
             <info>
                 SDK_HOST_MANIFEST[doc] = "The manifest file for the host part of the SDK. This file lists all the installed packages that make up the host part of the SDK."
@@ -10694,6 +10777,88 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-SDK_INCLUDE_PKGDATA'><glossterm>SDK_INCLUDE_PKGDATA</glossterm>
+            <info>
+                SDK_INCLUDE_PKGDATA[doc] = "When set to "1", specifies to include the packagedata for all recipes in the "world" target in the extensible SDK."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    When set to "1", specifies to include the packagedata for
+                    all recipes in the "world" target in the extensible SDK.
+                    Including this data allows the
+                    <filename>devtool search</filename> command to find these
+                    recipes in search results, as well as allows the
+                    <filename>devtool add</filename> command to map
+                    dependencies more effectively.
+                    <note>
+                        Enabling the <filename>SDK_INCLUDE_PKGDATA</filename>
+                        variable significantly increases build time because
+                        all of world needs to be built.
+                        Enabling the variable also slightly increases the size
+                        of the extensible SDK.
+                    </note>
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-SDK_INHERIT_BLACKLIST'><glossterm>SDK_INHERIT_BLACKLIST</glossterm>
+            <info>
+                SDK_INHERIT_BLACKLIST[doc] = "A list of classes to remove from the INHERIT value globally within the extensible SDK configuration."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    A list of classes to remove from the
+                    <link linkend='var-INHERIT'><filename>INHERIT</filename></link>
+                    value globally within the extensible SDK configuration.
+                    The default value is "buildhistory icecc".
+                </para>
+
+                <para>
+                    Some classes are not generally applicable within
+                    the extensible SDK context and you can use this variable
+                    to disable them.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-SDK_LOCAL_CONF_BLACKLIST'><glossterm>SDK_LOCAL_CONF_BLACKLIST</glossterm>
+            <info>
+                SDK_LOCAL_CONF_BLACKLIST[doc] = "A list of variables not allowed through from the build system configuration into the extensible SDK configuration."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    A list of variables not allowed through from the build
+                    system configuration into the extensible SDK configuration.
+                    Usually, these are variables that are specific to the
+                    machine on which the build system is running and thus
+                    would be potentially problematic within the extensible SDK.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-SDK_LOCAL_CONF_WHITELIST'><glossterm>SDK_LOCAL_CONF_WHITELIST</glossterm>
+            <info>
+                SDK_LOCAL_CONF_WHITELIST[doc] = "A list of variables allowed through from the build system configuration into the extensible SDK configuration."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    A list of variables allowed through from the build system
+                    configuration into the extensible SDK configuration.
+                    This list overrides the variables specified using the
+                    <link linkend='var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></link>
+                    variable as well as any variables identified by automatic
+                    blacklisting due to the "/" character being found at the
+                    start of the value, which is usually indicative of being a
+                    path and thus might not be valid on the system where the
+                    SDK is installed.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-SDK_NAME'><glossterm>SDK_NAME</glossterm>
             <info>
                 SDK_NAME[doc] = "The base name for SDK output files."
@@ -10814,7 +10979,8 @@
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    The toolchain binary prefix used for nativesdk recipes.
+                    The toolchain binary prefix used for
+                    <filename>nativesdk</filename> recipes.
                     The OpenEmbedded build system uses the
                     <filename>SDK_PREFIX</filename> value to set the
                     <link linkend='var-TARGET_PREFIX'><filename>TARGET_PREFIX</filename></link>
@@ -10824,6 +10990,33 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-SDK_RECRDEP_TASKS'><glossterm>SDK_RECRDEP_TASKS</glossterm>
+            <info>
+                SDK_RECRDEP_TASKS[doc] = "A list of shared state tasks added to the extensible SDK."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    A list of shared state tasks added to the extensible SDK.
+                    By default, the following tasks are added:
+                    <literallayout class='monospaced'>
+     do_populate_lic
+     do_package_qa
+     do_populate_sysroot
+     do_deploy
+                    </literallayout>
+                    Despite the default value of "" for the
+                    <filename>SDK_RECRDEP_TASKS</filename> variable, the
+                    above four tasks are always added to the SDK.
+                    To specify tasks beyond these four, you need to use
+                    the <filename>SDK_RECRDEP_TASKS</filename> variable (e.g.
+                    you are defining additional tasks that are needed in
+                    order to build
+                    <link linkend='var-SDK_TARGETS'><filename>SDK_TARGETS</filename></link>).
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-SDK_SYS'><glossterm>SDK_SYS</glossterm>
             <info>
                 SDK_SYS[doc] = "Specifies the system, including the architecture and the operating system, for which the SDK will be built."
@@ -10881,6 +11074,64 @@
             </glossdef>
         </glossentry>
 
+        <glossentry id='var-SDK_TARGETS'><glossterm>SDK_TARGETS</glossterm>
+            <info>
+                SDK_TARGETS[doc] = "A list of targets to install from shared state as part of the standard or extensible SDK installation."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    A list of targets to install from shared state as part of
+                    the standard or extensible SDK installation.
+                    The default value is "${PN}" (i.e. the image from which
+                    the SDK is built).
+                </para>
+
+                <para>
+                    The <filename>SDK_TARGETS</filename> variable is an
+                    internal variable and typically would not be changed.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-SDK_TITLE'><glossterm>SDK_TITLE</glossterm>
+            <info>
+                SDK_TITLE[doc] = "Specifies a title to be printed when running the SDK installer."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    Specifies a title to be printed when running the SDK
+                    installer.
+                    The <filename>SDK_TITLE</filename> variable defaults to
+                    "<replaceable>distro</replaceable> SDK" for the standard
+                    SDK and "<replaceable>distro</replaceable> Extensible SDK"
+                    for the extensible SDK, where
+                    <replaceable>distro</replaceable> is the first one of
+                    <link linkend='var-DISTRO_NAME'><filename>DISTRO_NAME</filename></link>
+                    or
+                    <link linkend='var-DISTRO'><filename>DISTRO</filename></link>
+                    that is set in your configuration.
+                </para>
+            </glossdef>
+        </glossentry>
+
+        <glossentry id='var-SDK_UPDATE_URL'><glossterm>SDK_UPDATE_URL</glossterm>
+            <info>
+                SDK_UPDATE_URL[doc] = "An optional URL for an update server for the extensible SDK."
+            </info>
+            <glossdef>
+                <para role="glossdeffirst">
+<!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
+                    An optional URL for an update server for the extensible
+                    SDK.
+                    If set, the value is used as the default update server when
+                    running <filename>devtool sdk-update</filename> within the
+                    extensible SDK.
+                </para>
+            </glossdef>
+        </glossentry>
+
         <glossentry id='var-SDK_VENDOR'><glossterm>SDK_VENDOR</glossterm>
             <info>
                 SDK_VENDOR[doc] = "Specifies the name of the SDK vendor."
@@ -10902,7 +11153,7 @@
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
                     Specifies the version of the SDK.
                     The distribution configuration file (e.g.
-                    <filename>/meta-yocto/conf/distro/poky.conf</filename>)
+                    <filename>/meta-poky/conf/distro/poky.conf</filename>)
                     defines the <filename>SDK_VERSION</filename> as follows:
                     <literallayout class='monospaced'>
      SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
@@ -10939,14 +11190,13 @@
 
         <glossentry id='var-SDKMACHINE'><glossterm>SDKMACHINE</glossterm>
             <info>
-                SDKMACHINE[doc] = "Specifies the architecture (i.e. i686 or x86_64) for which to build SDK and ADT items."
+                SDKMACHINE[doc] = "Specifies the architecture (i.e. i686 or x86_64) for which to build SDK items."
             </info>
             <glossdef>
                 <para role="glossdeffirst">
 <!--                <para role="glossdeffirst"><imagedata fileref="figures/define-generic.png" /> -->
-                    The machine for which the Application Development Toolkit
-                    (ADT) or SDK is built.
-                    In other words, the SDK or ADT is built such that it
+                    The machine for which the SDK is built.
+                    In other words, the SDK is built such that it
                     runs on the target you specify with the
                     <filename>SDKMACHINE</filename> value.
                     The value points to a corresponding
@@ -11892,14 +12142,14 @@
                         <listitem><para>For recipes building for the target
                            machine, the value is "${STAGING_DIR}/${MACHINE}".
                            </para></listitem>
-                        <listitem><para>For <filename>native</filename>
-                           recipes building
+                        <listitem><para>For native recipes building
                            for the build host, the value is empty given the
                            assumption that when building for the build host,
                            the build host's own directories should be used.
                            </para></listitem>
-                        <listitem><para>For <filename>nativesdk</filename>
-                           recipes that build for the SDK, the value is
+                        <listitem><para>For native SDK
+                           recipes that build for the SDK
+                           (<filename>nativesdk</filename>), the value is
                            "${STAGING_DIR}/${MULTIMACH_HOST_SYS}".
                            </para></listitem>
                     </itemizedlist>
@@ -12707,12 +12957,13 @@
                             "${<link linkend='var-TARGET_SYS'>TARGET_SYS</link>}-".
                             </para></listitem>
                         <listitem><para>
-                            For <filename>native</filename> recipes, the build
-                            system sets the variable to the value of
+                            For native recipes, the build system sets the
+                            variable to the value of
                             <filename>BUILD_PREFIX</filename>.
                             </para></listitem>
                         <listitem><para>
-                            For <filename>nativesdk</filename> recipes, the
+                            For native SDK recipes
+                            (<filename>nativesdk</filename>), the
                             build system sets the variable to the value of
                             <filename>SDK_PREFIX</filename>.
                             </para></listitem>
@@ -12751,9 +13002,8 @@
                     Consider these two examples:
                     <itemizedlist>
                         <listitem><para>
-                            Given a <filename>native</filename> recipe on a
-                            32-bit, x86 machine running Linux, the value is
-                            "i686-linux".
+                            Given a native recipe on a 32-bit, x86 machine
+                            running Linux, the value is "i686-linux".
                             </para></listitem>
                         <listitem><para>
                             Given a recipe being built for a little-endian,
@@ -13359,11 +13609,14 @@
                     toolchain set that runs on the
                     <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
                     and each package should usually have the prefix
-                    "nativesdk-".
-                    When building an SDK using
-                    <filename>bitbake -c populate_sdk &lt;imagename&gt;</filename>,
-                    a default list of packages is set in this variable, but
-                    you can add additional packages to the list.
+                    <filename>nativesdk-</filename>.
+                    For example, consider the following command when
+                    building an SDK:
+                    <literallayout class='monospaced'>
+     $ bitbake -c populate_sdk <replaceable>imagename</replaceable>
+                    </literallayout>
+                    In this case, a default list of packages is set in this
+                    variable, but you can add additional packages to the list.
                 </para>
 
                 <para>
@@ -13373,8 +13626,7 @@
                     section.
                     For information on setting up a cross-development
                     environment, see the
-                    "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
-                    section in the Yocto Project Application Developer's Guide.
+                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
                 </para>
             </glossdef>
         </glossentry>
@@ -13425,8 +13677,7 @@
                     section.
                     For information on setting up a cross-development
                     environment, see the
-                    "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
-                    section in the Yocto Project Application Developer's Guide.
+                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
                 </para>
             </glossdef>
         </glossentry>
@@ -14121,7 +14372,7 @@
      USER_CLASSES ?= "buildstats image-mklibs image-prelink"
                     </literallayout>
                     For more information, see
-                    <filename>meta-yocto/conf/local.conf.sample</filename> in
+                    <filename>meta-poky/conf/local.conf.sample</filename> in
                     the
                     <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
                 </para>
diff --git a/yocto-poky/documentation/ref-manual/technical-details.xml b/yocto-poky/documentation/ref-manual/technical-details.xml
index 2df3652..f06382a 100644
--- a/yocto-poky/documentation/ref-manual/technical-details.xml
+++ b/yocto-poky/documentation/ref-manual/technical-details.xml
@@ -187,7 +187,7 @@
         This section provides some technical background on how
         cross-development toolchains are created and used.
         For more information on toolchains, you can also see the
-        <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>.
+        <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
     </para>
 
     <para>
@@ -219,6 +219,12 @@
         You can think of <filename>gcc-cross</filename> simply as an
         automatically generated cross-compiler that is used internally within
         BitBake only.
+        <note>
+            The extensible SDK does not use
+            <filename>gcc-cross-canadian</filename> since this SDK
+            ships a copy of the OpenEmbedded build system and the sysroot
+            within it contains <filename>gcc-cross</filename>.
+        </note>
     </para>
 
     <para>
@@ -282,8 +288,10 @@
         the development tools (e.g., the
         <filename>gcc-cross-canadian</filename>),
         <filename>binutils-cross-canadian</filename>, and other
-        <filename>nativesdk-*</filename> tools you need to cross-compile and
-        test your software.
+        <filename>nativesdk-*</filename> tools,
+        which are tools native to the SDK (i.e. native to
+        <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>),
+        you need to cross-compile and test your software.
         The figure shows the commands you use to easily build out this
         toolchain.
         This cross-development toolchain is built to execute on the
@@ -363,8 +371,9 @@
     <note>
         For information on advantages gained when building a
         cross-development toolchain installer, see the
-        "<ulink url='&YOCTO_DOCS_ADT_URL;#optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</ulink>"
-        section in the Yocto Project Application Developer's Guide.
+        "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-building-an-sdk-installer'>Building an SDK Installer</ulink>"
+        section in the Yocto Project Software Development Kit (SDK) Developer's
+        Guide.
     </note>
 </section>
 
@@ -470,17 +479,24 @@
         </para>
 
         <para>
-            To complicate the problem, there are things that should not be included in
-            the checksum.
+            To complicate the problem, there are things that should not be
+            included in the checksum.
             First, there is the actual specific build path of a given task -
             the <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
-            It does not matter if the work directory changes because it should not
-            affect the output for target packages.
-            Also, the build process has the objective of making native or cross packages relocatable.
-            The checksum therefore needs to exclude <filename>WORKDIR</filename>.
+            It does not matter if the work directory changes because it should
+            not affect the output for target packages.
+            Also, the build process has the objective of making native
+            or cross packages relocatable.
+            <note>
+                Both native and cross packages run on the build host.
+                However, cross packages generate output for the target
+                architecture.
+            </note>
+            The checksum therefore needs to exclude
+            <filename>WORKDIR</filename>.
             The simplistic approach for excluding the work directory is to set
-            <filename>WORKDIR</filename> to some fixed value and create the checksum
-            for the "run" script.
+            <filename>WORKDIR</filename> to some fixed value and create the
+            checksum for the "run" script.
         </para>
 
         <para>
@@ -665,7 +681,6 @@
             <literallayout class='monospaced'>
      DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
      SSTATETASKS += "do_deploy"
-     do_deploy[sstate-name] = "deploy"
      do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"
      do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
 
@@ -770,22 +785,49 @@
                 Because of this, the Yocto Project includes strong debugging
                 tools:
                 <itemizedlist>
-                    <listitem><para>Whenever a shared state package is written out, so is a
-                        corresponding <filename>.siginfo</filename> file.
-                        This practice results in a pickled Python database of all
-                        the metadata that went into creating the hash for a given shared state
-                        package.</para></listitem>
-                    <listitem><para>If you run BitBake with the <filename>--dump-signatures</filename>
-                        (or <filename>-S</filename>) option, BitBake dumps out
-                        <filename>.siginfo</filename> files in
-                        the stamp directory for every task it would have executed instead of
-                        building the specified target package.</para></listitem>
-                    <listitem><para>There is a <filename>bitbake-diffsigs</filename> command that
-                        can process <filename>.siginfo</filename> files.
-                        If you specify one of these files, BitBake dumps out the dependency
-                        information in the file.
-                        If you specify two files, BitBake compares the two files and dumps out
-                        the differences between the two.
+                    <listitem><para>Whenever a shared state package is written
+                        out into the
+                        <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>,
+                        a corresponding <filename>.siginfo</filename> file is
+                        also written.
+                        This file contains a pickled Python database of all
+                        the Metadata that went into creating the hash for a
+                        given shared state package.
+                        Whenever a stamp is written into the stamp directory
+                        <link linkend='var-STAMP'><filename>STAMP</filename></link>,
+                        a corresponding <filename>.sigdata</filename> file
+                        is created that contains the same hash data that
+                        represented the executed task.
+                        </para></listitem>
+                    <listitem><para>You can use BitBake to dump out the
+                        signature construction information without executing
+                        tasks by using either of the following BitBake
+                        command-line options:
+                        <literallayout class='monospaced'>
+     &dash;&dash;dump-signatures=<replaceable>SIGNATURE_HANDLER</replaceable>
+     -S <replaceable>SIGNATURE_HANDLER</replaceable>
+                        </literallayout>
+                        <note>
+                            Two common values for
+                            <replaceable>SIGNATURE_HANDLER</replaceable> are
+                            "none" and "printdiff" to only dump the signature
+                            or to compare the dumped signature with the
+                            cached one, respectively.
+                        </note>
+                        Using BitBake with either of these options causes
+                        BitBake to dump out <filename>.sigdata</filename> files
+                        in the stamp directory for every task it would have
+                        executed instead of building the specified target
+                        package.
+                        </para></listitem>
+                    <listitem><para>There is a
+                        <filename>bitbake-diffsigs</filename> command that
+                        can process <filename>.sigdata</filename> and
+                        <filename>.siginfo</filename> files.
+                        If you specify one of these files, BitBake dumps out
+                        the dependency information in the file.
+                        If you specify two files, BitBake compares the two
+                        files and dumps out the differences between the two.
                         This more easily helps answer the question of "What
                         changed between X and Y?"</para></listitem>
                 </itemizedlist>
@@ -1378,7 +1420,6 @@
                 <literallayout class='monospaced'>
      COMMERCIAL_AUDIO_PLUGINS ?= ""
      COMMERCIAL_VIDEO_PLUGINS ?= ""
-     COMMERCIAL_QT = ""
                 </literallayout>
                 If you want to enable these components, you can do so by making sure you have
                 statements similar to the following
@@ -1388,7 +1429,6 @@
         gst-plugins-ugly-mpegaudioparse"
      COMMERCIAL_VIDEO_PLUGINS = "gst-plugins-ugly-mpeg2dec \
         gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
-     COMMERCIAL_QT ?= "qmmp"
      LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly commercial_gst-plugins-bad commercial_qmmp"
                 </literallayout>
                 Of course, you could also create a matching whitelist
@@ -1406,9 +1446,8 @@
                 Specifying audio and video plug-ins as part of the
                 <filename>COMMERCIAL_AUDIO_PLUGINS</filename> and
                 <filename>COMMERCIAL_VIDEO_PLUGINS</filename> statements
-                or commercial Qt components as part of
-                the <filename>COMMERCIAL_QT</filename> statement (along
-                with the enabling <filename>LICENSE_FLAGS_WHITELIST</filename>) includes the
+                (along with the enabling
+                <filename>LICENSE_FLAGS_WHITELIST</filename>) includes the
                 plug-ins or components into built images, thus adding
                 support for media formats or components.
             </para>
diff --git a/yocto-poky/documentation/ref-manual/usingpoky.xml b/yocto-poky/documentation/ref-manual/usingpoky.xml
index ca87962..a7bf32d 100644
--- a/yocto-poky/documentation/ref-manual/usingpoky.xml
+++ b/yocto-poky/documentation/ref-manual/usingpoky.xml
@@ -113,8 +113,7 @@
         <filename class="directory">tmp/deploy/images</filename>.
         For information on how to run pre-built images such as <filename>qemux86</filename>
         and <filename>qemuarm</filename>, see the
-        "<ulink url='&YOCTO_DOCS_QS_URL;#using-pre-built'>Example Using Pre-Built Binaries and QEMU</ulink>"
-        section in the Yocto Project Application Developer's Guide.
+        <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
         For information about how to install these images, see the documentation for your
         particular board or machine.
     </para>
@@ -150,10 +149,11 @@
 
     <para>
         For discussions on debugging, see the
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
-        and
-        "<ulink url='&YOCTO_DOCS_DEV_URL;#adt-eclipse'>Working within Eclipse</ulink>"
-        sections in the Yocto Project Development Manual.
+        "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>" section
+        in the Yocto Project Developer's Manual
+        and the
+        "<ulink url='&YOCTO_DOCS_SDK_URL;#adt-eclipse'>Working within Eclipse</ulink>"
+        section in the Yocto Project Software Development Kit (SDK) Developer's Guide.
     </para>
 
     <note>
@@ -799,12 +799,18 @@
 
         <section id='build-history-sdk-information'>
             <title>Build History SDK Information</title>
+
             <para>
                 Build history collects similar information on the contents
-                of SDKs (e.g. <filename>meta-toolchain</filename>
-                or <filename>bitbake -c populate_sdk imagename</filename>)
+                of SDKs
+                (e.g. <filename>bitbake -c populate_sdk imagename</filename>)
                 as compared to information it collects for images.
-                The following list shows the files produced for each SDK:
+                Furthermore, this information differs depending on whether an
+                extensible or standard SDK is being produced.
+            </para>
+
+            <para>
+                The following list shows the files produced for SDKs:
                 <itemizedlist>
                     <listitem><para><filename>files-in-sdk.txt:</filename>
                         A list of files in the SDK with permissions,
@@ -817,11 +823,49 @@
                         about the SDK.
                         See the following listing example for more information.
                         </para></listitem>
+                    <listitem><para><filename>sstate-task-sizes.txt:</filename>
+                        A text file containing name-value pairs with information
+                        about task group sizes
+                        (e.g. <filename>do_populate_sysroot</filename> tasks
+                        have a total size).
+                        The <filename>sstate-task-sizes.txt</filename> file
+                        exists only when an extensible SDK is created.
+                        </para></listitem>
+                    <listitem><para><filename>sstate-package-sizes.txt:</filename>
+                        A text file containing name-value pairs with information
+                        for the shared-state packages and sizes in the SDK.
+                        The <filename>sstate-package-sizes.txt</filename> file
+                        exists only when an extensible SDK is created.
+                        </para></listitem>
+                    <listitem><para><filename>sdk-files:</filename>
+                        A folder that contains copies of the files mentioned in
+                        <filename>BUILDHISTORY_SDK_FILES</filename> if the
+                        files are present in the output.
+                        Additionally, the default value of
+                        <filename>BUILDHISTORY_SDK_FILES</filename> is specific
+                        to the extensible SDK although you can set it
+                        differently if you would like to pull in specific files
+                        from the standard SDK.</para>
+                        <para>The default files are
+                        <filename>conf/local.conf</filename>,
+                        <filename>conf/bblayers.conf</filename>,
+                        <filename>conf/auto.conf</filename>,
+                        <filename>conf/locked-sigs.inc</filename>, and
+                        <filename>conf/devtool.conf</filename>.
+                        Thus, for an extensible SDK, these files get copied
+                        into the <filename>sdk-files</filename> directory.
+                        </para></listitem>
                     <listitem><para>The following information appears under
                         each of the <filename>host</filename>
                         and <filename>target</filename> directories
                         for the portions of the SDK that run on the host and
                         on the target, respectively:
+                        <note>
+                            The following files for the most part are empty
+                            when producing an extensible SDK because this
+                            type of SDK is not constructed from packages as is
+                            the standard SDK.
+                        </note>
                         <itemizedlist>
                             <listitem><para><filename>depends.dot:</filename>
                                 Dependency graph for the SDK that is
diff --git a/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-add-flow.png b/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-add-flow.png
new file mode 100644
index 0000000..c09e60e
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-add-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-modify-flow.png b/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-modify-flow.png
new file mode 100644
index 0000000..cd06c01
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/figures/sdk-devtool-modify-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/sdk-manual/figures/sdk-eclipse-dev-flow.png b/yocto-poky/documentation/sdk-manual/figures/sdk-eclipse-dev-flow.png
new file mode 100644
index 0000000..9f986e0
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/figures/sdk-eclipse-dev-flow.png
Binary files differ
diff --git a/yocto-poky/documentation/sdk-manual/figures/sdk-environment.png b/yocto-poky/documentation/sdk-manual/figures/sdk-environment.png
new file mode 100644
index 0000000..78b8cad
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/figures/sdk-environment.png
Binary files differ
diff --git a/yocto-poky/documentation/sdk-manual/figures/sdk-installed-extensible-sdk-directory.png b/yocto-poky/documentation/sdk-manual/figures/sdk-installed-extensible-sdk-directory.png
new file mode 100644
index 0000000..99e07ce
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/figures/sdk-installed-extensible-sdk-directory.png
Binary files differ
diff --git a/yocto-poky/documentation/sdk-manual/figures/sdk-installed-standard-sdk-directory.png b/yocto-poky/documentation/sdk-manual/figures/sdk-installed-standard-sdk-directory.png
new file mode 100644
index 0000000..d4af850
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/figures/sdk-installed-standard-sdk-directory.png
Binary files differ
diff --git a/yocto-poky/documentation/sdk-manual/figures/sdk-title.png b/yocto-poky/documentation/sdk-manual/figures/sdk-title.png
new file mode 100644
index 0000000..e9d5b34
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/figures/sdk-title.png
Binary files differ
diff --git a/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml b/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml
new file mode 100644
index 0000000..7932607
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/sdk-appendix-customizing.xml
@@ -0,0 +1,388 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<appendix id='sdk-appendix-customizing'>
+
+<title>Customizing the SDK</title>
+
+<para>
+    This appendix presents customizations you can apply to both the standard
+    and extensible SDK.
+    Each subsection identifies the type of SDK to which the section applies.
+</para>
+
+<section id='sdk-configuring-the-extensible-sdk'>
+    <title>Configuring the Extensible SDK</title>
+
+    <para>
+        The extensible SDK primarily consists of a pre-configured copy of
+        the OpenEmbedded build system from which it was produced.
+        Thus, the SDK's configuration is derived using that build system and
+        the following filters, which the OpenEmbedded build system applies
+        against <filename>local.conf</filename> and
+        <filename>auto.conf</filename> if they are present:
+        <itemizedlist>
+            <listitem><para>
+                Variables whose values start with "/" are excluded since the
+                assumption is that those values are paths that are likely to
+                be specific to the build host.
+                </para></listitem>
+            <listitem><para>
+                Variables listed in
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_BLACKLIST'><filename>SDK_LOCAL_CONF_BLACKLIST</filename></ulink>
+                are excluded.
+                The default value blacklists
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-CONF_VERSION'><filename>CONF_VERSION</filename></ulink>,
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></ulink>,
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink>,
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-PRSERV_HOST'><filename>PRSERV_HOST</filename></ulink>,
+                and
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></ulink>.
+                </para></listitem>
+            <listitem><para>
+                Variables listed in
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_LOCAL_CONF_WHITELIST'><filename>SDK_LOCAL_CONF_WHITELIST</filename></ulink>
+                are included.
+                Including a variable in the value of
+                <filename>SDK_LOCAL_CONF_WHITELIST</filename> overrides either
+                of the above two conditions.
+                The default value is blank.
+                </para></listitem>
+            <listitem><para>
+                Classes inherited globally with
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-INHERIT'><filename>INHERIT</filename></ulink>
+                that are listed in
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INHERIT_BLACKLIST'><filename>SDK_INHERIT_BLACKLIST</filename></ulink>
+                are disabled.
+                Using <filename>SDK_INHERIT_BLACKLIST</filename> to disable
+                these classes is is the typical method to disable classes that
+                are problematic or unnecessary in the SDK context.
+                The default value blacklists the
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-buildhistory'><filename>buildhistory</filename></ulink>
+                and
+                <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-icecc'><filename>icecc</filename></ulink>
+                classes.
+                </para></listitem>
+        </itemizedlist>
+        Additionally, the contents of <filename>conf/sdk-extra.conf</filename>,
+        when present, are appended to the end of
+        <filename>conf/local.conf</filename> within the produced SDK, without
+        any filtering.
+        The <filename>sdk-extra.conf</filename> file is particularly useful
+        if you want to set a variable value just for the SDK and not the
+        OpenEmbedded build system used to create the SDK.
+    </para>
+</section>
+
+<section id='adjusting-the-extensible-sdk-to-suit-your-build-system-setup'>
+    <title>Adjusting the Extensible SDK to Suit Your Build System Setup</title>
+
+    <para>
+        In most cases, the extensible SDK defaults should work.
+        However, some cases exist for which you might consider making
+        adjustments:
+        <itemizedlist>
+            <listitem><para>
+                If your SDK configuration inherits additional classes
+                using the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-INHERIT'><filename>INHERIT</filename></ulink>
+                variable and you do not need or want those classes enabled in
+                the SDK, you can blacklist them by adding them to the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INHERIT_BLACKLIST'><filename>SDK_INHERIT_BLACKLIST</filename></ulink>
+                variable.
+                The default value of <filename>SDK_INHERIT_BLACKLIST</filename>
+                is set using the "?=" operator.
+                Consequently, you will need to either set the complete value
+                using "=" or append the value using "_append".
+                </para></listitem>
+            <listitem><para>
+                If you have classes or recipes that add additional tasks to
+                the standard build flow (i.e. that execute as part of building
+                the recipe as opposed to needing to be called explicitly), then
+                you need to do one of the following:
+                <itemizedlist>
+                    <listitem><para>
+                        Ensure the tasks are shared state tasks (i.e. their
+                        output is saved to and can be restored from the shared
+                        state cache), or that the tasks are able to be
+                        produced quickly from a task that is a shared state
+                        task and add the task name to the value of
+                        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_RECRDEP_TASKS'><filename>SDK_RECRDEP_TASKS</filename></ulink>.
+                        </para></listitem>
+                    <listitem><para>
+                        Disable the tasks if they are added by a class and
+                        you do not need the functionality the class provides
+                        in the extensible SDK.
+                        To disable the tasks, add the class to
+                        <filename>SDK_INHERIT_BLACKLIST</filename> as previously
+                        described.
+                        </para></listitem>
+                </itemizedlist>
+                </para></listitem>
+            <listitem><para>
+                Generally, you want to have a shared state mirror set up so
+                users of the SDK can add additional items to the SDK after
+                installation without needing to build the items from source.
+                See the
+                "<link linkend='sdk-providing-additional-installable-extensible-sdk-content'>Providing Additional Installable Extensible SDK Content</link>"
+                section for information.
+                </para></listitem>
+            <listitem><para>
+                If you want users of the SDK to be able to easily update the
+                SDK, you need to set the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_UPDATE_URL'><filename>SDK_UPDATE_URL</filename></ulink>
+                variable.
+                For more information, see the
+                "<link linkend='sdk-providing-updates-after-installing-the-extensible-sdk'>Providing Updates After Installing the Extensible SDK</link>"
+                section.
+                </para></listitem>
+            <listitem><para>
+                If you have adjusted the list of files and directories that
+                appear in
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-COREBASE'><filename>COREBASE</filename></ulink>
+                (other than layers that are enabled through
+                <filename>bblayers.conf</filename>), then you must list these
+                files in
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-COREBASE_FILES'><filename>COREBASE_FILES</filename></ulink>
+                so that the files are copied into the SDK.
+                </para></listitem>
+            <listitem><para>
+                If your OpenEmbedded build system setup uses a different
+                environment setup script other than
+                <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
+                or
+                <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>,
+                then you must set
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_INIT_ENV_SCRIPT'><filename>OE_INIT_ENV_SCRIPT</filename></ulink>
+                to point to the environment setup script you use.
+                <note>
+                    You must also reflect this change in the value used for the
+                    <filename>COREBASE_FILES</filename> variable as previously
+                    described.
+                </note>
+                </para></listitem>
+        </itemizedlist>
+    </para>
+</section>
+
+<section id='sdk-changing-the-appearance-of-the-extensible-sdk'>
+    <title>Changing the Appearance of the Extensible SDK</title>
+
+    <para>
+        You can change the title shown by the SDK installer by setting the
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_TITLE'><filename>SDK_TITLE</filename></ulink>
+        variable.
+        By default, this title is derived from
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_NAME'><filename>DISTRO_NAME</filename></ulink>
+        when it is set.
+        If the <filename>DISTRO_NAME</filename> variable is not set, the title
+        is derived from the
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
+        variable.
+    </para>
+</section>
+
+<section id='sdk-providing-updates-after-installing-the-extensible-sdk'>
+    <title>Providing Updates After Installing the Extensible SDK</title>
+
+    <para>
+        When you make changes to your configuration or to the metadata and
+        if you want those changes to be reflected in installed SDKs, you need
+        to perform additional steps to make it possible for those that use
+        the SDK to update their installations with the
+        <filename>devtool sdk-update</filename> command:
+        <orderedlist>
+            <listitem><para>
+                Arrange to be created a directory that can be shared over
+                HTTP or HTTPS.
+                </para></listitem>
+            <listitem><para>
+                Set the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_UPDATE_URL'><filename>SDK_UPDATE_URL</filename></ulink>
+                variable to point to the corresponding HTTP or HTTPS URL.
+                Setting this variable causes any SDK built to default to that
+                URL and thus, the user does not have to pass the URL to the
+                <filename>devtool sdk-update</filename> command.
+                </para></listitem>
+            <listitem><para>
+                Build the extensible SDK normally (i.e., use the
+                <filename>bitbake -c populate_sdk_ext</filename> <replaceable>imagename</replaceable>
+                command).
+                </para></listitem>
+            <listitem><para>
+                Publish the SDK using the following command:
+                <literallayout class='monospaced'>
+     $ oe-publish-sdk <replaceable>some_path</replaceable>/sdk-installer.sh <replaceable>path_to_shared/http_directory</replaceable>
+                </literallayout>
+                You must repeat this step each time you rebuild the SDK
+                with changes that you want to make available through the
+                update mechanism.
+                </para></listitem>
+        </orderedlist>
+    </para>
+
+    <para>
+        Completing the above steps allows users of the existing SDKs to
+        simply run <filename>devtool sdk-update</filename> to retrieve the
+        latest updates.
+        See the
+        "<link linkend='sdk-updating-the-extensible-sdk'>Updating the Extensible SDK</link>"
+        section for further information.
+    </para>
+</section>
+
+<section id='sdk-providing-additional-installable-extensible-sdk-content'>
+    <title>Providing Additional Installable Extensible SDK Content</title>
+
+    <para>
+        If you want the users of the extensible SDK you are building to be
+        able to add items to the SDK without needing to build the
+        items from source, you need to do a number of things:
+        <orderedlist>
+            <listitem><para>
+                Ensure the additional items you want the user to be able to
+                install are actually built.
+                You can ensure these items are built a number of different
+                ways: 1) Build them explicitly, perhaps using one or more
+                "meta" recipes that depend on lists of other recipes to keep
+                things tidy, or 2) Build the "world" target and set
+                <filename>EXCLUDE_FROM_WORLD_pn-</filename><replaceable>recipename</replaceable>
+                for the recipes you do not want built.
+                See the
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-EXCLUDE_FROM_WORLD'><filename>EXCLUDE_FROM_WORLD</filename></ulink>
+                variable for additional information.
+                </para></listitem>
+            <listitem><para>
+                Expose the <filename>sstate-cache</filename> directory
+                produced by the build.
+                Typically, you expose this directory over HTTP or HTTPS.
+                </para></listitem>
+            <listitem><para>
+                Set the appropriate configuration so that the produced SDK
+                knows how to find the configuration.
+                The variable you need to set is
+                <ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></ulink>:
+                <literallayout class='monospaced'>
+     SSTATE_MIRRORS = "file://.*  http://<replaceable>example</replaceable>.com/<replaceable>some_path</replaceable>/sstate-cache/PATH"
+                </literallayout>
+                You can set the <filename>SSTATE_MIRRORS</filename> variable
+                in two different places:
+                <itemizedlist>
+                    <listitem><para>
+                        If the mirror value you are setting is appropriate to
+                        be set for both the OpenEmbedded build system that is
+                        actually building the SDK and the SDK itself (i.e. the
+                        mirror is accessible in both places or it will fail
+                        quickly on the OpenEmbedded build system side, and its
+                        contents will not interfere with the build), then you
+                        can set the variable in your
+                        <filename>local.conf</filename> or custom distro
+                        configuration file.
+                        You can then "whitelist" the variable through
+                        to the SDK by adding the following:
+                        <literallayout class='monospaced'>
+     SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
+                        </literallayout>
+                        </para></listitem>
+                    <listitem><para>
+                        Alternatively, if you just want to set the
+                        <filename>SSTATE_MIRRORS</filename> variable's value
+                        for the SDK alone, create a
+                        <filename>conf/sdk-extra.conf</filename> either in
+                        your
+                        <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+                        or within any layer and put your
+                        <filename>SSTATE_MIRRORS</filename> setting within
+                        that file.
+                        <note>
+                            This second option is the safest option should
+                            you have any doubts as to which method to use when
+                            setting <filename>SSTATE_MIRRORS</filename>.
+                        </note>
+                        </para></listitem>
+                </itemizedlist>
+                </para></listitem>
+        </orderedlist>
+    </para>
+</section>
+
+<section id='sdk-minimizing-the-size-of-the-extensible-sdk-installer-download'>
+    <title>Minimizing the Size of the Extensible SDK Installer Download</title>
+
+    <para>
+        By default, the extensible SDK bundles the shared state artifacts for
+        everything needed to reconstruct the image for which the SDK was built.
+        This bundling can lead to an SDK installer file that is a Gigabyte or
+        more in size.
+        If the size of this file causes a problem, you can build an SDK that
+        has just enough in it to install and provide access to the
+        <filename>devtool command</filename> by setting the following in your
+        configuration:
+        <literallayout class='monospaced'>
+     SDK_EXT_TYPE = "minimal"
+        </literallayout>
+        Setting
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_EXT_TYPE'><filename>SDK_EXT_TYPE</filename></ulink>
+        to "minimal" produces an SDK installer that is around 35 Mbytes in
+        size, which downloads and installs quickly.
+        You need to realize, though, that the minimal installer does not
+        install any libraries or tools out of the box.
+        These must be installed either "on the fly" or through actions you
+        perform using <filename>devtool</filename> or explicitly with the
+        <filename>devtool sdk-install</filename> command.
+    </para>
+
+    <para>
+        In most cases, when building a minimal SDK you will need to also enable
+        bringing in the information on a wider range of packages produced by
+        the system.
+        This is particularly true so that <filename>devtool add</filename>
+        is able to effectively map dependencies it discovers in a source tree
+        to the appropriate recipes.
+        Also so that the <filename>devtool search</filename> command
+        is able to return useful results.
+    </para>
+
+    <para>
+        To facilitate this wider range of information, you would additionally
+        set the following:
+        <literallayout class='monospaced'>
+     SDK_INCLUDE_PKGDATA = "1"
+        </literallayout>
+        See the
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDK_INCLUDE_PKGDATA'><filename>SDK_INCLUDE_PKGDATA</filename></ulink>
+        variable for additional information.
+    </para>
+
+    <para>
+        Setting the <filename>SDK_INCLUDE_PKGDATA</filename> variable as
+        shown causes the "world" target to be built so that information
+        for all of the recipes included within it are available.
+        Having these recipes available increases build time significantly and
+        increases the size of the SDK installer by 30-80 Mbytes depending on
+        how many recipes are included in your configuration.
+    </para>
+
+    <para>
+        You can use
+        <filename>EXCLUDE_FROM_WORLD_pn-</filename><replaceable>recipename</replaceable>
+        for recipes you want to exclude.
+        However, it is assumed that you would need to be building the "world"
+        target if you want to provide additional items to the SDK.
+        Consequently, building for "world" should not represent undue
+        overhead in most cases.
+        <note>
+            If you set <filename>SDK_EXT_TYPE</filename> to "minimal",
+            then providing a shared state mirror is mandatory so that items
+            can be installed as needed.
+            See the
+            "<link linkend='sdk-providing-additional-installable-extensible-sdk-content'>Providing Additional Installable Extensible SDK Content</link>"
+            section for more information.
+        </note>
+    </para>
+</section>
+</appendix>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml b/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml
new file mode 100644
index 0000000..3d4e364
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/sdk-appendix-obtain.xml
@@ -0,0 +1,252 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<appendix id='sdk-appendix-obtain'>
+
+<title>Obtaining the SDK</title>
+
+<section id='sdk-locating-pre-built-sdk-installers'>
+    <title>Locating Pre-Built SDK Installers</title>
+
+    <para>
+        You can use existing, pre-built toolchains by locating and running
+        an SDK installer script that ships with the Yocto Project.
+        Using this method, you select and download an architecture-specific
+        toolchain installer and then run the script to hand-install the
+        toolchain.
+    </para>
+
+    <para>
+        You can find SDK installers here:
+        <itemizedlist>
+            <listitem><para><emphasis>Standard SDK Installers</emphasis>
+                Go to <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>
+                and find the folder that matches your host development system
+                (i.e. <filename>i686</filename> for 32-bit machines or
+                <filename>x86_64</filename> for 64-bit machines).</para>
+
+                <para>Go into that folder and download the toolchain installer
+                whose name includes the appropriate target architecture.
+                The toolchains provided by the Yocto Project are based off of
+                the <filename>core-image-sato</filename> image and contain
+                libraries appropriate for developing against that image.
+                For example, if your host development system is a 64-bit x86
+                system and you are going to use your cross-toolchain for a
+                32-bit x86 target, go into the <filename>x86_64</filename>
+                folder and download the following installer:
+                <literallayout class='monospaced'>
+     poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
+                </literallayout>
+                </para></listitem>
+            <listitem><para><emphasis>Extensible SDK Installers</emphasis>
+                Installers for the extensible SDK are in
+                <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>.
+                </para></listitem>
+        </itemizedlist>
+    </para>
+</section>
+
+<section id='sdk-building-an-sdk-installer'>
+    <title>Building an SDK Installer</title>
+
+    <para>
+        As an alternative to locating and downloading a toolchain installer,
+        you can build the toolchain installer assuming you have first sourced
+        the environment setup script.
+        See the
+        "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
+        section in the Yocto Project Quick Start for steps that show you
+        how to set up the Yocto Project environment.
+        In particular, you need to be sure the
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
+        variable matches the architecture for which you are building and that
+        the
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>
+        variable is correctly set if you are building a toolchain designed to
+        run on an architecture that differs from your current development host
+        machine (i.e. the build machine).
+    </para>
+
+    <para>
+        To build the toolchain installer for a standard SDK and populate
+        the SDK image, use the following command:
+        <literallayout class='monospaced'>
+     $ bitbake <replaceable>image</replaceable> -c populate_sdk
+        </literallayout>
+        You can do the same for the extensible SDK using this command:
+        <literallayout class='monospaced'>
+     $ bitbake <replaceable>image</replaceable> -c populate_sdk_ext
+        </literallayout>
+        These commands result in a toolchain installer that contains the sysroot
+        that matches your target root filesystem.
+    </para>
+
+    <para>
+        When the <filename>bitbake</filename> command completes, the toolchain
+        installer will be in
+        <filename>tmp/deploy/sdk</filename> in the Build Directory.
+        <note>
+            By default, this toolchain does not build static binaries.
+            If you want to use the toolchain to build these types of libraries,
+            you need to be sure your image has the appropriate static
+            development libraries.
+            Use the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
+            variable inside your <filename>local.conf</filename> file to
+            install the appropriate library packages.
+            Following is an example using <filename>glibc</filename> static
+            development libraries:
+            <literallayout class='monospaced'>
+     IMAGE_INSTALL_append = " glibc-staticdev"
+            </literallayout>
+        </note>
+    </para>
+</section>
+
+<section id='sdk-extracting-the-root-filesystem'>
+    <title>Extracting the Root Filesystem</title>
+
+    <para>
+        After installing the toolchain, for some use cases you
+        might need to separately extract a root filesystem:
+        <itemizedlist>
+            <listitem><para>You want to boot the image using NFS.
+                </para></listitem>
+            <listitem><para>You want to use the root filesystem as the
+                target sysroot.
+                For example, the Eclipse IDE environment with the Eclipse
+                Yocto Plug-in installed allows you to use QEMU to boot
+                under NFS.</para></listitem>
+            <listitem><para>You want to develop your target application
+                using the root filesystem as the target sysroot.
+                </para></listitem>
+        </itemizedlist>
+    </para>
+
+    <para>
+        To extract the root filesystem, first <filename>source</filename>
+        the cross-development environment setup script to establish
+        necessary environment variables.
+        If you built the toolchain in the Build Directory, you will find
+        the toolchain environment script in the
+        <filename>tmp</filename> directory.
+        If you installed the toolchain by hand, the environment setup
+        script is located in <filename>/opt/poky/&DISTRO;</filename>.
+    </para>
+
+    <para>
+        After sourcing the environment script, use the
+        <filename>runqemu-extract-sdk</filename> command and provide the
+        filesystem image.
+    </para>
+
+    <para>
+        Following is an example.
+        The second command sets up the environment.
+        In this case, the setup script is located in the
+        <filename>/opt/poky/&DISTRO;</filename> directory.
+        The third command extracts the root filesystem from a previously
+        built filesystem that is located in the
+        <filename>~/Downloads</filename> directory.
+        Furthermore, this command extracts the root filesystem into the
+        <filename>qemux86-sato</filename> directory:
+        <literallayout class='monospaced'>
+     $ cd ~
+     $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
+     $ runqemu-extract-sdk \
+        ~/Downloads/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \
+        $HOME/qemux86-sato
+        </literallayout>
+        You could now point to the target sysroot at
+        <filename>qemux86-sato</filename>.
+    </para>
+</section>
+
+<section id='sdk-installed-standard-sdk-directory-structure'>
+    <title>Installed Standard SDK Directory Structure</title>
+
+    <para>
+        The following figure shows the resulting directory structure after
+        you install the Standard SDK by running the <filename>.sh</filename>
+        SDK installation script:
+    </para>
+
+    <para>
+        <imagedata fileref="figures/sdk-installed-standard-sdk-directory.png" scale="60" align="center" />
+    </para>
+
+    <para>
+        The installed SDK consists of an environment setup script for the SDK,
+        a configuration file for the target, a version file for the target,
+        and the root filesystem (<filename>sysroots</filename>) needed to
+        develop objects for the target system.
+    </para>
+
+    <para>
+        Within the figure, italicized text is used to indicate replaceable
+        portions of the file or directory name.
+        For example,
+        <replaceable>install_dir</replaceable>/<replaceable>version</replaceable>
+        is the directory where the SDK is installed.
+        By default, this directory is <filename>/opt/poky/</filename>.
+        And, <replaceable>version</replaceable> represents the specific
+        snapshot of the SDK (e.g. <filename>&DISTRO;+snapshot</filename>).
+        Furthermore, <replaceable>target</replaceable> represents the target
+        architecture (e.g. <filename>i586</filename>) and
+        <replaceable>host</replaceable> represents the development system's
+        architecture (e.g. <filename>x86_64</filename>).
+        Thus, the complete names of the two directories within the
+        <filename>sysroots</filename> could be
+        <filename>i586-poky-linux</filename> and
+        <filename>x86_64-pokysdk-linux</filename> for the target and host,
+        respectively.
+    </para>
+</section>
+
+<section id='sdk-installed-extensible-sdk-directory-structure'>
+    <title>Installed Extensible SDK Directory Structure</title>
+
+    <para>
+        The following figure shows the resulting directory structure after
+        you install the Extensible SDK by running the <filename>.sh</filename>
+        SDK installation script:
+    </para>
+
+    <para>
+        <imagedata fileref="figures/sdk-installed-extensible-sdk-directory.png" scale="60" align="center" />
+    </para>
+
+    <para>
+        The installed directory structure for the extensible SDK is quite
+        different than the installed structure for the standard SDK.
+        The extensible SDK does not separate host and target parts in the
+        same manner as does the standard SDK.
+        The extensible SDK uses an embedded copy of the OpenEmbedded
+        build system, which has its own sysroots.
+    </para>
+
+    <para>
+        Of note in the directory structure are an environment setup script
+        for the SDK, a configuration file for the target, a version file for
+        the target, and a log file for the OpenEmbedded build system
+        preparation script run by the installer.
+    </para>
+
+    <para>
+        Within the figure, italicized text is used to indicate replaceable
+        portions of the file or directory name.
+        For example,
+        <replaceable>install_dir</replaceable> is the directory where the SDK
+        is installed, which is <filename>poky_sdk</filename> by default.
+        <replaceable>target</replaceable> represents the target
+        architecture (e.g. <filename>i586</filename>) and
+        <replaceable>host</replaceable> represents the development system's
+        architecture (e.g. <filename>x86_64</filename>).
+    </para>
+</section>
+
+</appendix>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/yocto-poky/documentation/sdk-manual/sdk-extensible.xml b/yocto-poky/documentation/sdk-manual/sdk-extensible.xml
new file mode 100644
index 0000000..3e11fc9
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/sdk-extensible.xml
@@ -0,0 +1,1304 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='sdk-extensible'>
+
+<title>Using the Extensible SDK</title>
+
+<para>
+    This chapter describes the extensible SDK and how to use it.
+    The extensible SDK makes it easy to add new applications and libraries
+    to an image, modify the source for an existing component, test
+    changes on the target hardware, and ease integration into the rest of the
+    <ulink url='&YOCTO_DOCS_DEV_URL;#build-system-term'>OpenEmbedded build system</ulink>.
+</para>
+
+<para>
+    Information in this chapter covers features that are not part of the
+    standard SDK.
+    In other words, the chapter presents information unique to the
+    extensible SDK only.
+    For information on how to use the standard SDK, see the
+    "<link linkend='sdk-using-the-standard-sdk'>Using the Standard SDK</link>"
+    chapter.
+</para>
+
+<section id='sdk-setting-up-to-use-the-extensible-sdk'>
+    <title>Setting Up to Use the Extensible SDK</title>
+
+    <para>
+        Getting set up to use the extensible SDK is identical to getting set
+        up to use the standard SDK.
+        You still need to locate and run the installer and then run the
+        environment setup script.
+        See the
+        "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
+        and the
+        "<link linkend='sdk-running-the-sdk-environment-setup-script'>Running the SDK Environment Setup Script</link>"
+        sections for general information.
+        The following items highlight the only differences between getting
+        set up to use the extensible SDK as compared to the standard SDK:
+        <itemizedlist>
+            <listitem><para><emphasis>Default Installation Directory:</emphasis>
+                By default, the extensible SDK installs into the
+                <filename>poky_sdk</filename> folder of your home directory.
+                As with the standard SDK, you can choose to install the
+                extensible SDK in any location when you run the installer.
+                However, unlike the standard SDK, the location you choose needs
+                to be writable for whichever users need to use the SDK,
+                since files will need to be written under that directory during
+                the normal course of operation.
+                </para></listitem>
+            <listitem><para><emphasis>Build Tools and Build System:</emphasis>
+                The extensible SDK installer performs additional tasks as
+                compared to the standard SDK installer.
+                The extensible SDK installer extracts build tools specific
+                to the SDK and the installer also prepares the internal build
+                system within the SDK.
+                Here is example output for running the extensible SDK
+                installer:
+                <literallayout class='monospaced'>
+     $ ./poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.1+snapshot.sh
+     Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.1+snapshot
+     ===================================================================================
+     Enter target directory for SDK (default: ~/poky_sdk):
+     You are about to install the SDK to "/home/scottrif/poky_sdk". Proceed[Y/n]? Y
+     Extracting SDK......................................................................done
+     Setting it up...
+     Extracting buildtools...
+     Preparing build system...
+     done
+     SDK has been successfully set up and is ready to be used.
+     Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
+      $ . /home/scottrif/poky_sdk/environment-setup-core2-64-poky-linux
+                </literallayout>
+                </para></listitem>
+        </itemizedlist>
+    </para>
+
+    <para>
+        After installing the SDK, you need to run the SDK environment setup
+        script.
+        Here is the output:
+        <literallayout class='monospaced'>
+     $ source environment-setup-core2-64-poky-linux
+     SDK environment now set up; additionally you may now run devtool to perform development tasks.
+     Run devtool --help for further details.
+        </literallayout>
+        Once you run the environment setup script, you have
+        <filename>devtool</filename> available.
+    </para>
+</section>
+
+<section id='using-devtool-in-your-sdk-workflow'>
+    <title>Using <filename>devtool</filename> in Your SDK Workflow</title>
+
+    <para>
+        The cornerstone of the extensible SDK is a command-line tool
+        called <filename>devtool</filename>.
+        This tool provides a number of features that help
+        you build, test and package software within the extensible SDK, and
+        optionally integrate it into an image built by the OpenEmbedded build
+        system.
+    </para>
+
+    <para>
+        The <filename>devtool</filename> command line is organized similarly
+        to
+        <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> in that it has a
+        number of sub-commands for each function.
+        You can run <filename>devtool --help</filename> to see all the
+        commands.
+    </para>
+
+    <para>
+        Two <filename>devtool</filename> subcommands that provide
+        entry-points into development are:
+        <itemizedlist>
+            <listitem><para><emphasis><filename>devtool add</filename></emphasis>:
+                Assists in adding new software to be built.
+                </para></listitem>
+            <listitem><para><emphasis><filename>devtool modify</filename></emphasis>:
+                Sets up an environment to enable you to modify the source of
+                an existing component.
+                </para></listitem>
+        </itemizedlist>
+        As with the OpenEmbedded build system, "recipes" represent software
+        packages within <filename>devtool</filename>.
+        When you use <filename>devtool add</filename>, a recipe is
+        automatically created.
+        When you use <filename>devtool modify</filename>, the specified
+        existing recipe is used in order to determine where to get the source
+        code and how to patch it.
+        In both cases, an environment is set up so that when you build the
+        recipe a source tree that is under your control is used in order to
+        allow you to make changes to the source as desired.
+        By default, both new recipes and the source go into a "workspace"
+        directory under the SDK.
+    </para>
+
+    <para>
+        The remainder of this section presents the
+        <filename>devtool add</filename> and
+        <filename>devtool modify</filename> workflows.
+    </para>
+
+    <section id='sdk-use-devtool-to-add-an-application'>
+        <title>Use <filename>devtool add</filename> to Add an Application</title>
+
+        <para>
+            The <filename>devtool add</filename> command generates
+            a new recipe based on existing source code.
+            This command takes advantage of the
+            <ulink url='&YOCTO_DOCS_DEV_URL;#devtool-the-workspace-layer-structure'>workspace</ulink>
+            layer that many <filename>devtool</filename> commands
+            use.
+            The command is flexible enough to allow you to extract source
+            code into both the workspace or a separate local Git repository
+            and to use existing code that does not need to be extracted.
+        </para>
+
+        <para>
+            Depending on your particular scenario, the arguments and options
+            you use with <filename>devtool add</filename> form different
+            combinations.
+            The following diagram shows common development flows
+            you would use with the <filename>devtool add</filename>
+            command:
+        </para>
+
+        <para>
+            <imagedata fileref="figures/sdk-devtool-add-flow.png" align="center" />
+        </para>
+
+        <para>
+            <orderedlist>
+                <listitem><para><emphasis>Generating the New Recipe</emphasis>:
+                    The top part of the flow shows three scenarios by which
+                    you could use <filename>devtool add</filename> to
+                    generate a recipe based on existing source code.</para>
+
+                    <para>In a shared development environment, it is
+                    typical where other developers are responsible for
+                    various areas of source code.
+                    As a developer, you are probably interested in using
+                    that source code as part of your development using
+                    the Yocto Project.
+                    All you need is access to the code, a recipe, and a
+                    controlled area in which to do your work.</para>
+
+                    <para>Within the diagram, three possible scenarios
+                    feed into the <filename>devtool add</filename> workflow:
+                    <itemizedlist>
+                        <listitem><para><emphasis>Left</emphasis>:
+                            The left scenario represents a common situation
+                            where the source code does not exist locally
+                            and needs to be extracted.
+                            In this situation, you just let it get
+                            extracted to the default workspace - you do not
+                            want it in some specific location outside of the
+                            workspace.
+                            Thus, everything you need will be located in the
+                            workspace:
+                            <literallayout class='monospaced'>
+     $ devtool add <replaceable>recipe fetchuri</replaceable>
+                            </literallayout>
+                            With this command, <filename>devtool</filename>
+                            creates a recipe and an append file in the
+                            workspace as well as extracts the upstream
+                            source files into a local Git repository also
+                            within the <filename>sources</filename> folder.
+                            </para></listitem>
+                        <listitem><para><emphasis>Middle</emphasis>:
+                            The middle scenario also represents a situation where
+                            the source code does not exist locally.
+                            In this case, the code is again upstream
+                            and needs to be extracted to some
+                            local area - this time outside of the default
+                            workspace.
+                            As always, if required <filename>devtool</filename> creates
+                            a Git repository locally during the extraction.
+                            Furthermore, the first positional argument
+                            <replaceable>srctree</replaceable> in this case
+                            identifies where the
+                            <filename>devtool add</filename> command
+                            will locate the extracted code outside of the
+                            workspace:
+                            <literallayout class='monospaced'>
+     $ devtool add <replaceable>recipe srctree fetchuri</replaceable>
+                            </literallayout>
+                            In summary, the source code is pulled from
+                            <replaceable>fetchuri</replaceable> and extracted
+                            into the location defined by
+                            <replaceable>srctree</replaceable> as a local
+                            Git repository.</para>
+
+                            <para>Within workspace, <filename>devtool</filename>
+                            creates both the recipe and an append file
+                            for the recipe.
+                            </para></listitem>
+                        <listitem><para><emphasis>Right</emphasis>:
+                            The right scenario represents a situation
+                            where the source tree (srctree) has been
+                            previously prepared outside of the
+                            <filename>devtool</filename> workspace.
+                            </para>
+
+                            <para>The following command names the recipe
+                            and identifies where the existing source tree
+                            is located:
+                            <literallayout class='monospaced'>
+     $ devtool add <replaceable>recipe srctree</replaceable>
+                            </literallayout>
+                            The command examines the source code and creates
+                            a recipe for it placing the recipe into the
+                            workspace.</para>
+
+                            <para>Because the extracted source code already exists,
+                            <filename>devtool</filename> does not try to
+                            relocate it into the workspace - just the new
+                            the recipe is placed in the workspace.</para>
+
+                            <para>Aside from a recipe folder, the command
+                            also creates an append folder and places an initial
+                            <filename>*.bbappend</filename> within.
+                            </para></listitem>
+                    </itemizedlist>
+                    </para></listitem>
+                <listitem><para><emphasis>Edit the Recipe</emphasis>:
+                    At this point, you can use <filename>devtool edit-recipe</filename>
+                    to open up the editor as defined by the
+                    <filename>$EDITOR</filename> environment variable
+                    and modify the file:
+                    <literallayout class='monospaced'>
+     $ devtool edit-recipe <replaceable>recipe</replaceable>
+                    </literallayout>
+                    From within the editor, you can make modifications to the
+                    recipe that take affect when you build it later.
+                    </para></listitem>
+                <listitem><para><emphasis>Build the Recipe or Rebuild the Image</emphasis>:
+                    At this point in the flow, the next step you
+                    take depends on what you are going to do with
+                    the new code.</para>
+                    <para>If you need to take the build output and eventually
+                    move it to the target hardware, you would use
+                    <filename>devtool build</filename>:
+                    <literallayout class='monospaced'>
+     $ devtool build <replaceable>recipe</replaceable>
+                    </literallayout></para>
+                    <para>On the other hand, if you want an image to
+                    contain the recipe's packages for immediate deployment
+                    onto a device (e.g. for testing purposes), you can use
+                    the <filename>devtool build-image</filename> command:
+                    <literallayout class='monospaced'>
+     $ devtool build-image <replaceable>image</replaceable>
+                    </literallayout>
+                    </para></listitem>
+                <listitem><para><emphasis>Deploy the Build Output</emphasis>:
+                    When you use the <filename>devtool build</filename>
+                    command to build out your recipe, you probably want to
+                    see if the resulting build output works as expected on target
+                    hardware.
+                    <note>
+                        This step assumes you have a previously built
+                        image that is already either running in QEMU or
+                        running on actual hardware.
+                        Also, it is assumed that for deployment of the image
+                        to the target, SSH is installed in the image and if
+                        the image is running on real hardware that you have
+                        network access to and from your development machine.
+                    </note>
+                    You can deploy your build output to that target hardware by
+                    using the <filename>devtool deploy-target</filename> command:
+                    <literallayout class='monospaced'>
+     $ devtool deploy-target <replaceable>recipe target</replaceable>
+                    </literallayout>
+                    The <replaceable>target</replaceable> is a live target machine
+                    running as an SSH server.</para>
+
+                    <para>You can, of course, also deploy the image you build
+                    using the <filename>devtool build-image</filename> command
+                    to actual hardware.
+                    However, <filename>devtool</filename> does not provide a
+                    specific command that allows you to do this.
+                    </para></listitem>
+                <listitem><para><emphasis>Optionally Update the Recipe With Patch Files</emphasis>:
+                    Once you are satisfied with the recipe, if you have made
+                    any changes to the source tree that you want to have
+                    applied by the recipe, you need to generate patches
+                    from those changes.
+                    You do this before moving the recipe
+                    to its final layer and cleaning up the workspace area
+                    <filename>devtool</filename> uses.
+                    This optional step is especially relevant if you are
+                    using or adding third-party software.</para>
+                    <para>To convert commits created using Git to patch files,
+                    use the <filename>devtool update-recipe</filename> command.
+                    <note>
+                        Any changes you want to turn into patches must be
+                        committed to the Git repository in the source tree.
+                    </note>
+                    <literallayout class='monospaced'>
+     $ devtool update-recipe <replaceable>recipe</replaceable>
+                    </literallayout>
+                    </para></listitem>
+                <listitem><para><emphasis>Move the Recipe to its Permanent Layer</emphasis>:
+                    Before cleaning up the workspace, you need to move the
+                    final recipe to its permanent layer.
+                    You must do this before using the
+                    <filename>devtool reset</filename> command if you want to
+                    retain the recipe.
+                    </para></listitem>
+                <listitem><para><emphasis>Reset the Recipe</emphasis>:
+                    As a final step, you can restore the state such that
+                    standard layers and the upstream source is used to build
+                    the recipe rather than data in the workspace.
+                    To reset the recipe, use the <filename>devtool reset</filename>
+                    command:
+                    <literallayout class='monospaced'>
+     $ devtool reset <replaceable>recipe</replaceable>
+                    </literallayout>
+                    </para></listitem>
+            </orderedlist>
+        </para>
+    </section>
+
+    <section id='sdk-devtool-use-devtool-modify-to-modify-the-source-of-an-existing-component'>
+        <title>Use <filename>devtool modify</filename> to Modify the Source of an Existing Component</title>
+
+        <para>
+            The <filename>devtool modify</filename> command prepares the
+            way to work on existing code that already has a recipe in
+            place.
+            The command is flexible enough to allow you to extract code,
+            specify the existing recipe, and keep track of and gather any
+            patch files from other developers that are
+            associated with the code.
+        </para>
+
+        <para>
+            Depending on your particular scenario, the arguments and options
+            you use with <filename>devtool modify</filename> form different
+            combinations.
+            The following diagram shows common development flows
+            you would use with the <filename>devtool modify</filename>
+            command:
+        </para>
+
+        <para>
+            <imagedata fileref="figures/sdk-devtool-modify-flow.png" align="center" />
+        </para>
+
+        <para>
+            <orderedlist>
+                <listitem><para><emphasis>Preparing to Modify the Code</emphasis>:
+                    The top part of the flow shows three scenarios by which
+                    you could use <filename>devtool modify</filename> to
+                    prepare to work on source files.
+                    Each scenario assumes the following:
+                    <itemizedlist>
+                        <listitem><para>The recipe exists in some layer external
+                            to the <filename>devtool</filename> workspace.
+                            </para></listitem>
+                        <listitem><para>The source files exist upstream in an
+                            un-extracted state or locally in a previously
+                            extracted state.
+                            </para></listitem>
+                    </itemizedlist>
+                    The typical situation is where another developer has
+                    created some layer for use with the Yocto Project and
+                    their recipe already resides in that layer.
+                    Furthermore, their source code is readily available
+                    either upstream or locally.
+                    <itemizedlist>
+                        <listitem><para><emphasis>Left</emphasis>:
+                            The left scenario represents a common situation
+                            where the source code does not exist locally
+                            and needs to be extracted.
+                            In this situation, the source is extracted
+                            into the default workspace location.
+                            The recipe, in this scenario, is in its own
+                            layer outside the workspace
+                            (i.e.
+                            <filename>meta-</filename><replaceable>layername</replaceable>).
+                            </para>
+
+                            <para>The following command identifies the recipe
+                            and by default extracts the source files:
+                            <literallayout class='monospaced'>
+     $ devtool modify <replaceable>recipe</replaceable>
+                            </literallayout>
+                            Once <filename>devtool</filename>locates the recipe,
+                            it uses the
+                            <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                            variable to locate the source code and
+                            any local patch files from other developers are
+                            located.
+                            <note>
+                                You cannot provide an URL for
+                                <replaceable>srctree</replaceable> when using the
+                                <filename>devtool modify</filename> command.
+                            </note>
+                            With this scenario, however, since no
+                            <replaceable>srctree</replaceable> argument exists, the
+                            <filename>devtool modify</filename> command by default
+                            extracts the source files to a Git structure.
+                            Furthermore, the location for the extracted source is the
+                            default area within the workspace.
+                            The result is that the command sets up both the source
+                            code and an append file within the workspace with the
+                            recipe remaining in its original location.
+                            </para></listitem>
+                        <listitem><para><emphasis>Middle</emphasis>:
+                            The middle scenario represents a situation where
+                            the source code also does not exist locally.
+                            In this case, the code is again upstream
+                            and needs to be extracted to some
+                            local area as a Git repository.
+                            The recipe, in this scenario, is again in its own
+                            layer outside the workspace.</para>
+
+                            <para>The following command tells
+                            <filename>devtool</filename> what recipe with
+                            which to work and, in this case, identifies a local
+                            area for the extracted source files that is outside
+                            of the default workspace:
+                            <literallayout class='monospaced'>
+     $ devtool modify <replaceable>recipe srctree</replaceable>
+                            </literallayout>
+                            As with all extractions, the command uses
+                            the recipe's <filename>SRC_URI</filename> to locate the
+                            source files.
+                            Once the files are located, the command by default
+                            extracts them.
+                            Providing the <replaceable>srctree</replaceable>
+                            argument instructs <filename>devtool</filename> where
+                            place the extracted source.</para>
+
+                            <para>Within workspace, <filename>devtool</filename>
+                            creates an append file for the recipe.
+                            The recipe remains in its original location but
+                            the source files are extracted to the location you
+                            provided with <replaceable>srctree</replaceable>.
+                            </para></listitem>
+                        <listitem><para><emphasis>Right</emphasis>:
+                            The right scenario represents a situation
+                            where the source tree
+                            (<replaceable>srctree</replaceable>) exists as a
+                            previously extracted Git structure outside of
+                            the <filename>devtool</filename> workspace.
+                            In this example, the recipe also exists
+                            elsewhere in its own layer.
+                            </para>
+
+                            <para>The following command tells
+                            <filename>devtool</filename> the recipe
+                            with which to work, uses the "-n" option to indicate
+                            source does not need to be extracted, and uses
+                            <replaceable>srctree</replaceable> to point to the
+                            previously extracted source files:
+                            <literallayout class='monospaced'>
+     $ devtool modify -n <replaceable>recipe srctree</replaceable>
+                            </literallayout>
+                            </para>
+
+                            <para>Once the command finishes, it creates only
+                            an append file for the recipe in the workspace.
+                            The recipe and the source code remain in their
+                            original locations.
+                            </para></listitem>
+                        </itemizedlist>
+                    </para></listitem>
+                <listitem><para><emphasis>Edit the Source</emphasis>:
+                    Once you have used the <filename>devtool modify</filename>
+                    command, you are free to make changes to the source
+                    files.
+                    You can use any editor you like to make and save
+                    your source code modifications.
+                    </para></listitem>
+                <listitem><para><emphasis>Build the Recipe</emphasis>:
+                    Once you have updated the source files, you can build
+                    the recipe.
+                    </para></listitem>
+                <listitem><para><emphasis>Deploy the Build Output</emphasis>:
+                    When you use the <filename>devtool build</filename>
+                    command to build out your recipe, you probably want to see
+                    if the resulting build output works as expected on target
+                    hardware.
+                    <note>
+                        This step assumes you have a previously built
+                        image that is already either running in QEMU or
+                        running on actual hardware.
+                        Also, it is assumed that for deployment of the image
+                        to the target, SSH is installed in the image and if
+                        the image is running on real hardware that you have
+                        network access to and from your development machine.
+                    </note>
+                    You can deploy your build output to that target hardware by
+                    using the <filename>devtool deploy-target</filename> command:
+                    <literallayout class='monospaced'>
+     $ devtool deploy-target <replaceable>recipe target</replaceable>
+                    </literallayout>
+                    The <replaceable>target</replaceable> is a live target machine
+                    running as an SSH server.</para>
+
+                    <para>You can, of course, also deploy the image you build
+                    using the <filename>devtool build-image</filename> command
+                    to actual hardware.
+                    However, <filename>devtool</filename> does not provide a
+                    specific command that allows you to do this.
+                    </para></listitem>
+                <listitem><para><emphasis>Optionally Create Patch Files for Your Changes</emphasis>:
+                    After you have debugged your changes, you can
+                    use <filename>devtool update-recipe</filename> to
+                    generate patch files for all the commits you have
+                    made.
+                    <note>
+                        Patch files are generated only for changes
+                        you have committed.
+                    </note>
+                    <literallayout class='monospaced'>
+     $ devtool update-recipe <replaceable>recipe</replaceable>
+                    </literallayout>
+                    By default, the
+                    <filename>devtool update-recipe</filename> command
+                    creates the patch files in a folder named the same
+                    as the recipe beneath the folder in which the recipe
+                    resides, and updates the recipe's
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
+                    statement to point to the generated patch files.
+                    <note>
+                        You can use the
+                        "--append <replaceable>LAYERDIR</replaceable>"
+                        option to cause the command to create append files
+                        in a specific layer rather than the default
+                        recipe layer.
+                    </note>
+                    </para></listitem>
+                <listitem><para><emphasis>Restore the Workspace</emphasis>:
+                    The <filename>devtool reset</filename> restores the
+                    state so that standard layers and upstream sources are
+                    used to build the recipe rather than what is in the
+                    workspace.
+                    <literallayout class='monospaced'>
+     $ devtool reset <replaceable>recipe</replaceable>
+                    </literallayout>
+                    </para></listitem>
+            </orderedlist>
+        </para>
+    </section>
+</section>
+
+<section id='sdk-a-closer-look-at-devtool-add'>
+    <title>A Closer Look at <filename>devtool add</filename></title>
+
+    <para>
+        The <filename>devtool add</filename> command automatically creates a
+        recipe based on the source tree with which you provide it.
+        Currently, the command has support for the following:
+        <itemizedlist>
+            <listitem><para>
+                Autotools (<filename>autoconf</filename> and
+                <filename>automake</filename>)
+                </para></listitem>
+            <listitem><para>
+                CMake
+                </para></listitem>
+            <listitem><para>
+                Scons
+                </para></listitem>
+            <listitem><para>
+                <filename>qmake</filename>
+                </para></listitem>
+            <listitem><para>
+                Plain <filename>Makefile</filename>
+                </para></listitem>
+            <listitem><para>
+                Out-of-tree kernel module
+                </para></listitem>
+            <listitem><para>
+                Binary package (i.e. "-b" option)
+                </para></listitem>
+            <listitem><para>
+                Node.js module through
+                <filename>npm</filename>
+                </para></listitem>
+            <listitem><para>
+                Python modules that use <filename>setuptools</filename>
+                or <filename>distutils</filename>
+                </para></listitem>
+        </itemizedlist>
+    </para>
+
+    <para>
+        Apart from binary packages, the determination of how a source tree
+        should be treated is automatic based on the files present within
+        that source tree.
+        For example, if a <filename>CMakeLists.txt</filename> file is found,
+        then the source tree is assumed to be using
+        CMake and is treated accordingly.
+        <note>
+            In most cases, you need to edit the automatically generated
+            recipe in order to make it build properly.
+            Typically, you would go through several edit and build cycles
+            until you can build the recipe.
+            Once the recipe can be built, you could use possible further
+            iterations to test the recipe on the target device.
+        </note>
+    </para>
+
+    <para>
+        The remainder of this section covers specifics regarding how parts
+        of the recipe are generated.
+    </para>
+
+    <section id='sdk-name-and-version'>
+        <title>Name and Version</title>
+
+        <para>
+            If you do not specify a name and version on the command
+            line, <filename>devtool add</filename> attempts to determine
+            the name and version of the software being built from
+            various metadata within the source tree.
+            Furthermore, the command sets the name of the created recipe
+            file accordingly.
+            If the name or version cannot be determined, the
+            <filename>devtool add</filename> command prints an error and
+            you must re-run the command with both the name and version
+            or just the name or version specified.
+        </para>
+
+        <para>
+            Sometimes the name or version determined from the source tree
+            might be incorrect.
+            For such a case, you must reset the recipe:
+            <literallayout class='monospaced'>
+     $ devtool reset -n <replaceable>recipename</replaceable>
+            </literallayout>
+            After running the <filename>devtool reset</filename> command,
+            you need to run <filename>devtool add</filename> again and
+            provide the name or the version.
+        </para>
+    </section>
+
+    <section id='sdk-dependency-detection-and-mapping'>
+        <title>Dependency Detection and Mapping</title>
+
+        <para>
+            The <filename>devtool add</filename> command attempts to
+            detect build-time dependencies and map them to other recipes
+            in the system.
+            During this mapping, the command fills in the names of those
+            recipes in the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
+            value within the recipe.
+            If a dependency cannot be mapped, then a comment is placed in
+            the recipe indicating such.
+            The inability to map a dependency might be caused because the
+            naming is not recognized or because the dependency simply is
+            not available.
+            For cases where the dependency is not available, you must use
+            the <filename>devtool add</filename> command to add an
+            additional recipe to satisfy the dependency and then come
+            back to the first recipe and add its name to
+            <filename>DEPENDS</filename>.
+        </para>
+
+        <para>
+            If you need to add runtime dependencies, you can do so by
+            adding the following to your recipe:
+            <literallayout class='monospaced'>
+     RDEPENDS_${PN} += "dependency1 dependency2 ..."
+            </literallayout>
+            <note>
+                The <filename>devtool add</filename> command often cannot
+                distinguish between mandatory and optional dependencies.
+                Consequently, some of the detected dependencies might
+                in fact be optional.
+                When in doubt, consult the documentation or the configure
+                script for the software the recipe is building for further
+                details.
+                In some cases, you might find you can substitute the
+                dependency for an option to disable the associated
+                functionality passed to the configure script.
+            </note>
+        </para>
+    </section>
+
+    <section id='sdk-license-detection'>
+        <title>License Detection</title>
+
+        <para>
+            The <filename>devtool add</filename> command attempts to
+            determine if the software you are adding is able to be
+            distributed under a common open-source license and sets the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
+            value accordingly.
+            You should double-check this value against the documentation
+            or source files for the software you are building and update
+            that <filename>LICENSE</filename> value if necessary.
+        </para>
+
+        <para>
+            The <filename>devtool add</filename> command also sets the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></ulink>
+            value to point to all files that appear to be license-related.
+            However, license statements often appear in comments at the top
+            of source files or within documentation.
+            Consequently, you might need to amend the
+            <filename>LIC_FILES_CHKSUM</filename> variable to point to one
+            or more of those comments if present.
+            Setting <filename>LIC_FILES_CHKSUM</filename> is particularly
+            important for third-party software.
+            The mechanism attempts to ensure correct licensing should you
+            upgrade the recipe to a newer upstream version in future.
+            Any change in licensing is detected and you receive an error
+            prompting you to check the license text again.
+        </para>
+
+        <para>
+            If the <filename>devtool add</filename> command cannot
+            determine licensing information, the
+            <filename>LICENSE</filename> value is set to "CLOSED" and the
+            <filename>LIC_FILES_CHKSUM</filename> vaule remains unset.
+            This behavior allows you to continue with development but is
+            unlikely to be correct in all cases.
+            Consequently, you should check the documentation or source
+            files for the software you are building to determine the actual
+            license.
+        </para>
+    </section>
+
+    <section id='sdk-adding-makefile-only-software'>
+        <title>Adding Makefile-Only Software</title>
+
+        <para>
+            The use of <filename>make</filename> by itself is very common
+            in both proprietary and open source software.
+            Unfortunately, Makefiles are often not written with
+            cross-compilation in mind.
+            Thus, <filename>devtool add</filename> often cannot do very
+            much to ensure that these Makefiles build correctly.
+            It is very common, for example, to explicitly call
+            <filename>gcc</filename> instead of using the
+            <filename>CC</filename> variable.
+            Usually, in a cross-compilation environment,
+            <filename>gcc</filename> is the compiler for the build host
+            and the cross-compiler is named something similar to
+            <filename>arm-poky-linux-gnueabi-gcc</filename> and might
+            require some arguments (e.g. to point to the associated sysroot
+            for the target machine).
+        </para>
+
+        <para>
+            When writing a recipe for Makefile-only software, keep the
+            following in mind:
+            <itemizedlist>
+                <listitem><para>
+                    You probably need to patch the Makefile to use
+                    variables instead of hardcoding tools within the
+                    toolchain such as <filename>gcc</filename> and
+                    <filename>g++</filename>.
+                    </para></listitem>
+                <listitem><para>
+                    The environment in which <filename>make</filename> runs
+                    is set up with various standard variables for
+                    compilation (e.g. <filename>CC</filename>,
+                    <filename>CXX</filename>, and so forth) in a similar
+                    manner to the environment set up by the SDK's
+                    environment setup script.
+                    One easy way to see these variables is to run the
+                    <filename>devtool build</filename> command on the
+                    recipe and then look in
+                    <filename>oe-logs/run.do_compile</filename>.
+                    Towards the top of this file you will see a list of
+                    environment variables that are being set.
+                    You can take advantage of these variables within the
+                    Makefile.
+                    </para></listitem>
+                <listitem><para>
+                    If the Makefile sets a default for a variable using "=",
+                    that default overrides the value set in the environment,
+                    which is usually not desirable.
+                    In this situation, you can either patch the Makefile
+                    so it sets the default using the "?=" operator, or
+                    you can alternatively force the value on the
+                    <filename>make</filename> command line.
+                    To force the value on the command line, add the
+                    variable setting to
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OEMAKE'><filename>EXTRA_OEMAKE</filename></ulink>
+                    within the recipe as follows:
+                    <literallayout class='monospaced'>
+     EXTRA_OEMAKE += "'CC=${CC}' 'CXX=${CXX}'"
+                    </literallayout>
+                    In the above example, single quotes are used around the
+                    variable settings as the values are likely to contain
+                    spaces because required default options are passed to
+                    the compiler.
+                    </para></listitem>
+                <listitem><para>
+                    Hardcoding paths inside Makefiles is often problematic
+                    in a cross-compilation environment.
+                    This is particularly true because those hardcoded paths
+                    often point to locations on the build host and thus
+                    will either be read-only or will introduce
+                    contamination into the cross-compilation by virtue of
+                    being specific to the build host rather than the target.
+                    Patching the Makefile to use prefix variables or other
+                    path variables is usually the way to handle this.
+                    </para></listitem>
+                <listitem><para>
+                    Sometimes a Makefile runs target-specific commands such
+                    as <filename>ldconfig</filename>.
+                    For such cases, you might be able to simply apply
+                    patches that remove these commands from the Makefile.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='sdk-adding-native-tools'>
+        <title>Adding Native Tools</title>
+
+        <para>
+            Often, you need to build additional tools that run on the
+            build host system as opposed to the target.
+            You should indicate this using one of the following methods
+            when you run <filename>devtool add</filename>:
+            <itemizedlist>
+                <listitem><para>
+                    Specify the name of the recipe such that it ends
+                    with "-native".
+                    Specifying the name like this produces a recipe that
+                    only builds for the build host.
+                    </para></listitem>
+                <listitem><para>
+                    Specify the "&dash;&dash;also-native" option with the
+                    <filename>devtool add</filename> command.
+                    Specifying this option creates a recipe file that still
+                    builds for the target but also creates a variant with
+                    a "-native" suffix that builds for the build host.
+                    </para></listitem>
+            </itemizedlist>
+            <note>
+                If you need to add a tool that is shipped as part of a
+                source tree that builds code for the target, you can
+                typically accomplish this by building the native and target
+                parts separately rather than within the same compilation
+                process.
+                Realize though that with the "&dash;&dash;also-native" option, you
+                can add the tool using just one recipe file.
+            </note>
+        </para>
+    </section>
+
+    <section id='sdk-adding-node-js-modules'>
+        <title>Adding Node.js Modules</title>
+
+        <para>
+            You can use the <filename>devtool add</filename> command in the
+            following form to add Node.js modules:
+            <literallayout class='monospaced'>
+     $ devtool add "npm://registry.npmjs.org;name=forever;version=0.15.1"
+            </literallayout>
+            The name and version parameters are mandatory.
+            Lockdown and shrinkwrap files are generated and pointed to by
+            the recipe in order to freeze the version that is fetched for
+            the dependencies according to the first time.
+            This also saves checksums that are verified on future fetches.
+            Together, these behaviors ensure the reproducibility and
+            integrity of the build.
+            <note><title>Notes</title>
+                <itemizedlist>
+                    <listitem><para>
+                        You must use quotes around the URL.
+                        The <filename>devtool add</filename> does not require
+                        the quotes, but the shell considers ";" as a splitter
+                        between multiple commands.
+                        Thus, without the quotes,
+                        <filename>devtool add</filename> does not receive the
+                        other parts, which results in several "command not
+                        found" errors.
+                        </para></listitem>
+                    <listitem><para>
+                        In order to support adding
+                        Node.js modules, a
+                        <filename>nodejs</filename> recipe must be part of your
+                        SDK in order to provide Node.js
+                        itself.
+                        </para></listitem>
+                </itemizedlist>
+            </note>
+        </para>
+    </section>
+</section>
+
+<section id='sdk-working-with-recipes'>
+    <title>Working With Recipes</title>
+
+    <para>
+        When building a recipe with <filename>devtool build</filename> the
+        typical build progression is as follows:
+        <orderedlist>
+            <listitem><para>
+                Fetch the source
+                </para></listitem>
+            <listitem><para>
+                Unpack the source
+                </para></listitem>
+            <listitem><para>
+                Configure the source
+                </para></listitem>
+            <listitem><para>
+                Compiling the source
+                </para></listitem>
+            <listitem><para>
+                Install the build output
+                </para></listitem>
+            <listitem><para>
+                Package the installed output
+                </para></listitem>
+        </orderedlist>
+        For recipes in the workspace, fetching and unpacking is disabled
+        as the source tree has already been prepared and is persistent.
+        Each of these build steps is defined as a function, usually with a
+        "do_" prefix.
+        These functions are typically shell scripts but can instead be written
+        in Python.
+    </para>
+
+    <para>
+        If you look at the contents of a recipe, you will see that the
+        recipe does not include complete instructions for building the
+        software.
+        Instead, common functionality is encapsulated in classes inherited
+        with the <filename>inherit</filename> directive, leaving the recipe
+        to describe just the things that are specific to the software to be
+        built.
+        A <ulink url='ref-classes-base'><filename>base</filename></ulink>
+        class exists that is implicitly inherited by all recipes and provides
+        the functionality that most typical recipes need.
+    </para>
+
+    <para>
+        The remainder of this section presents information useful when
+        working with recipes.
+    </para>
+
+    <section id='sdk-finding-logs-and-work-files'>
+        <title>Finding Logs and Work Files</title>
+
+        <para>
+            When you are debugging a recipe that you previously created using
+            <filename>devtool add</filename> or whose source you are modifying
+            by using the <filename>devtool modify</filename> command, after
+            the first run of <filename>devtool build</filename>, you will
+            find some symbolic links created within the source tree:
+            <filename>oe-logs</filename>, which points to the directory in
+            which log files and run scripts for each build step are created
+            and <filename>oe-workdir</filename>, which points to the temporary
+            work area for the recipe.
+            You can use these links to get more information on what is
+            happening at each build step.
+        </para>
+
+        <para>
+            These locations under <filename>oe-workdir</filename> are
+            particularly useful:
+            <itemizedlist>
+                <listitem><para><filename>image/</filename>:
+                    Contains all of the files installed at the
+                    <ulink url='&YOCTO_DOCS_REF_URL;ref-tasks-install'><filename>do_install</filename></ulink>
+                    stage.
+                    Within a recipe, this directory is referred to by the
+                    expression
+                    <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>.
+                    </para></listitem>
+                <listitem><para><filename>sysroot-destdir/</filename>:
+                    Contains a subset of files installed within
+                    <filename>do_install</filename> that have been put into the
+                    shared sysroot.
+                    For more information, see the
+                    "<link linkend='sdk-sharing-files-between-recipes'>Sharing Files Between Recipes</link>"
+                    section.
+                    </para></listitem>
+                <listitem><para><filename>packages-split/</filename>:
+                    Contains subdirectories for each package produced by the
+                    recipe.
+                    For more information, see the
+                    "<link linkend='sdk-packaging'>Packaging</link>" section.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='sdk-setting-configure-arguments'>
+        <title>Setting Configure Arguments</title>
+
+        <para>
+            If the software your recipe is building uses GNU autoconf,
+            then a fixed set of arguments is passed to it to enable
+            cross-compilation plus any extras specified by
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></ulink>
+            set within the recipe.
+            If you wish to pass additional options, add them to
+            <filename>EXTRA_OECONF</filename>.
+            Other supported build tools have similar variables
+            (e.g.
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OECMAKE'><filename>EXTRA_OECMAKE</filename></ulink>
+            for CMake,
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OESCONS'><filename>EXTRA_OESCONS</filename></ulink>
+            for Scons, and so forth).
+            If you need to pass anything on the <filename>make</filename>
+            command line, you can use <filename>EXTRA_OEMAKE</filename> to do
+            so.
+        </para>
+
+        <para>
+            You can use the <filename>devtool configure-help</filename> command
+            to help you set the arguments listed in the previous paragraph.
+            The command determines the exact options being passed, and shows
+            them to you along with any custom arguments specified through
+            <filename>EXTRA_OECONF</filename>.
+            If applicable, the command also shows you the output of the
+            configure script's "&dash;&dash;help" option as a reference.
+        </para>
+    </section>
+
+    <section id='sdk-sharing-files-between-recipes'>
+        <title>Sharing Files Between Recipes</title>
+
+        <para>
+            Recipes often need to use files provided by other recipes on
+            the build host.
+            For example, an application linking to a common library needs
+            access to the library itself and its associated headers.
+            The way this access is accomplished within the extensible SDK is
+            through the sysroot.
+            One sysroot exists per "machine" for which the SDK is being built.
+            In practical terms, this means a sysroot exists for the target
+            machine, and a sysroot exists for the build host.
+        </para>
+
+        <para>
+            Recipes should never write files directly into the sysroot.
+            Instead, files should be installed into standard locations
+            during the
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
+            task within the
+            <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink><filename>}</filename>
+            directory.
+            A subset of these files automatically go into the sysroot.
+            The reason for this limitation is that almost all files that go
+            into the sysroot are cataloged in manifests in order to ensure
+            they can be removed later when a recipe is modified or removed.
+            Thus, the sysroot is able to remain free from stale files.
+        </para>
+    </section>
+
+    <section id='sdk-packaging'>
+        <title>Packaging</title>
+
+        <para>
+            Packaging is not always particularly relevant within the
+            extensible SDK.
+            However, if you examine how build output gets into the final image
+            on the target device, it is important to understand packaging
+            because the contents of the image are expressed in terms of
+            packages and not recipes.
+        </para>
+
+        <para>
+            During the
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-package'><filename>do_package</filename></ulink>
+            task, files installed during the
+            <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks-install'><filename>do_install</filename></ulink>
+            task are split into one main package, which is almost always named
+            the same as the recipe, and several other packages.
+            This separation is done because not all of those installed files
+            are always useful in every image.
+            For example, you probably do not need any of the documentation
+            installed in a production image.
+            Consequently, for each recipe the documentation files are separated
+            into a <filename>-doc</filename> package.
+            Recipes that package software that has optional modules or
+            plugins might do additional package splitting as well.
+        </para>
+
+        <para>
+            After building a recipe you can see where files have gone by
+            looking in the <filename>oe-workdir/packages-split</filename>
+            directory, which contains a subdirectory for each package.
+            Apart from some advanced cases, the
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>
+            and
+            <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES</filename></ulink>
+            variables controls splitting.
+            The <filename>PACKAGES</filename> variable lists all of the
+            packages to be produced, while the <filename>FILES</filename>
+            variable specifies which files to include in each package,
+            using an override to specify the package.
+            For example, <filename>FILES_${PN}</filename> specifies the files
+            to go into the main package (i.e. the main package is named the
+            same as the recipe and
+            <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
+            evaluates to the recipe name).
+            The order of the <filename>PACKAGES</filename> value is significant.
+            For each installed file, the first package whose
+            <filename>FILES</filename> value matches the file is the package
+            into which the file goes.
+            Defaults exist for both the <filename>PACKAGES</filename> and
+            <filename>FILES</filename> variables.
+            Consequently, you might find you do not even need to set these
+            variables in your recipe unless the software the recipe is
+            building installs files into non-standard locations.
+        </para>
+    </section>
+</section>
+
+<section id='sdk-restoring-the-target-device-to-its-original-state'>
+    <title>Restoring the Target Device to its Original State</title>
+
+    <para>
+        If you use the <filename>devtool deploy-target</filename>
+        command to write a recipe's build output to the target, and
+        you are working on an existing component of the system, then you
+        might find yourself in a situation where you need to restore the
+        original files that existed prior to running the
+        <filename>devtool deploy-target</filename> command.
+        Because the <filename>devtool deploy-target</filename> command
+        backs up any files it overwrites, you can use the
+        <filename>devtool undeploy-target</filename> to restore those files
+        and remove any other files the recipe deployed.
+        Consider the following example:
+        <literallayout class='monospaced'>
+     $ devtool undeploy-target lighttpd root@192.168.7.2
+        </literallayout>
+        If you have deployed multiple applications, you can remove them
+        all at once thus restoring the target device back to its
+        original state:
+        <literallayout class='monospaced'>
+     $ devtool undeploy-target -a root@192.168.7.2
+        </literallayout>
+        Information about files deployed to the target as well as any
+        backed up files are stored on the target itself.
+        This storage of course requires some additional space
+        on the target machine.
+        <note>
+            The <filename>devtool deploy-target</filename> and
+            <filename>devtool undeploy-target</filename> command do not
+            currently interact with any package management system on the
+            target device (e.g. RPM or OPKG).
+            Consequently, you should not intermingle operations
+            <filename>devtool deploy-target</filename> and the package
+            manager operations on the target device.
+            Doing so could result in a conflicting set of files.
+        </note>
+    </para>
+</section>
+
+<section id='sdk-installing-additional-items-into-the-extensible-sdk'>
+    <title>Installing Additional Items Into the Extensible SDK</title>
+
+    <para>
+        The extensible SDK typically only comes with a small number of tools
+        and libraries out of the box.
+        If you have a minimal SDK, then it starts mostly empty and is
+        populated on-demand.
+        However, sometimes you will need to explicitly install extra items
+        into the SDK.
+        If you need these extra items, you can first search for the items
+        using the <filename>devtool search</filename> command.
+        For example, suppose you need to link to libGL but you are not sure
+        which recipe provides it.
+        You can use the following command to find out:
+        <literallayout class='monospaced'>
+     $ devtool search libGL
+     mesa                  A free implementation of the OpenGL API
+        </literallayout>
+        Once you know the recipe (i.e. <filename>mesa</filename> in this
+        example), you can install it:
+        <literallayout class='monospaced'>
+     $ devtool sdk-install mesa
+        </literallayout>
+        By default, the <filename>devtool sdk-install</filename> assumes the
+        item is available in pre-built form from your SDK provider.
+        If the item is not available and it is acceptable to build the item
+        from source, you can add the "-s" option as follows:
+        <literallayout class='monospaced'>
+     $ devtool sdk-install -s mesa
+        </literallayout>
+        It is important to remember that building the item from source takes
+        significantly longer than installing the pre-built artifact.
+        Also, if no recipe exists for the item you want to add to the SDK, you
+        must instead add it using the <filename>devtool add</filename> command.
+    </para>
+</section>
+
+<section id='sdk-updating-the-extensible-sdk'>
+     <title>Updating the Extensible SDK</title>
+
+     <para>
+         If you are working with an extensible SDK that gets occasionally
+         updated (e.g. typically when that SDK has been provided to you by
+         another party), then you will need to manually pull down those
+         updates to your installed SDK.
+     </para>
+
+     <para>
+         To update your installed SDK, run the following:
+         <literallayout class='monospaced'>
+     $ devtool sdk-update
+         </literallayout>
+         The previous command assumes your SDK provider has set the default
+         update URL for you.
+         If that URL has not been set, you need to specify it yourself as
+         follows:
+         <literallayout class='monospaced'>
+     $ devtool sdk-update <replaceable>path_to_update_directory</replaceable>
+         </literallayout>
+         <note>
+             The URL needs to point specifically to a published SDK and not an
+             SDK installer that you would download and install.
+         </note>
+    </para>
+</section>
+
+<section id='sdk-creating-a-derivative-sdk-with-additional-components'>
+    <title>Creating a Derivative SDK With Additional Components</title>
+
+    <para>
+        You might need to produce an SDK that contains your own custom
+        libraries for sending to a third party (e.g., if you are a vendor with
+        customers needing to build their own software for the target platform).
+        If that is the case, then you can produce a derivative SDK based on
+        the currently installed SDK fairly easily.
+        Use these steps:
+        <orderedlist>
+            <listitem><para>If necessary, install an extensible SDK that
+                you want to use as a base for your derivative SDK.
+                </para></listitem>
+            <listitem><para>Source the environment script for the SDK.
+                </para></listitem>
+            <listitem><para>Add the extra libraries or other components
+                you want by using the <filename>devtool add</filename>
+                command.
+                </para></listitem>
+            <listitem><para>Run the <filename>devtool build-sdk</filename>
+                command.
+                </para></listitem>
+        </orderedlist>
+        The above procedure takes the recipes added to the workspace and
+        constructs a new SDK installer containing those recipes and the
+        resulting binary artifacts.
+        The recipes go into their own separate layer in the constructed
+        derivative SDK, leaving the workspace clean and ready for users
+        to add their own recipes.
+    </para>
+</section>
+
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/yocto-poky/documentation/sdk-manual/sdk-intro.xml b/yocto-poky/documentation/sdk-manual/sdk-intro.xml
new file mode 100644
index 0000000..88ae778
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/sdk-intro.xml
@@ -0,0 +1,338 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='sdk-intro'>
+<title>Introduction</title>
+
+<section id='sdk-manual-intro'>
+    <title>Introduction</title>
+
+    <para>
+        Welcome to the Yocto Project Software Development Kit (SDK)
+        Developer's Guide.
+        This manual provides information that lets you use both the standard
+        Yocto Project SDK and an extensible SDK to develop applications and
+        images using the Yocto Project.
+        Additionally, the manual also provides information on how to use
+        the popular <trademark class='trade'>Eclipse</trademark> IDE as part
+        of your application development workflow.
+    </para>
+
+    <para>
+        Prior to the 2.0 Release of the Yocto Project, application
+        development was primarily accomplished through the use of the
+        Application Development Toolkit (ADT) and the availability
+        of stand-alone cross-development toolchains and other tools.
+        With the 2.1 Release of the Yocto Project, application development
+        has transitioned to within a more traditional SDK and extensible
+        SDK.
+    </para>
+
+    <para>
+        A standard SDK consists of a cross-development toolchain that contains
+        a compiler, debugger, and various miscellaneous tools; libraries,
+        headers, and symbols to match an image; and environment setup script.
+        You can use this SDK to independently develop and test code that is
+        destined to run on some target machine.
+    </para>
+
+    <para>
+        An extensible SDK consists of everything that the standard SDK has plus
+        tools that allow you to easily add new applications and libraries to
+        an image, modify the source of an existing component, test changes on
+        the target hardware, and easily integrate an application into the
+        <ulink url='&YOCTO_DOCS_DEV_URL;#build-system-term'>OpenEmbedded build system</ulink>.
+    </para>
+
+    <para>
+        SDKs are completely self-contained.
+        The binaries are linked against their own copy of
+        <filename>libc</filename>, which results in no dependencies
+        on the target system.
+        To achieve this, the pointer to the dynamic loader is
+        configured at install time since that path cannot be dynamically
+        altered.
+        This is the reason for a wrapper around the
+        <filename>populate_sdk</filename> and
+        <filename>populate_sdk_ext</filename> archives.
+    </para>
+
+    <para>
+        Another feature for the SDKs is that only one set of cross-canadian
+        toolchain binaries are produced per architecture.
+        This feature takes advantage of the fact that the target hardware can
+        be passed to <filename>gcc</filename> as a set of compiler options.
+        Those options are set up by the environment script and contained in
+        variables such as
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink>
+        and
+        <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'><filename>LD</filename></ulink>.
+        This reduces the space needed for the tools.
+        Understand, however, that a sysroot is still needed for every target
+        since those binaries are target-specific.
+    </para>
+
+    <para>
+        Going beyond the actual SDK, the SDK development environment consists
+        of the following:
+        <itemizedlist>
+            <listitem><para>An architecture-specific cross-toolchain and
+                matching sysroots (target and native) all built by the
+                OpenEmbedded build system.
+                The toolchain and sysroots are based on a
+                <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
+                configuration and extensions,
+                which allows you to cross-develop on the host machine for the
+                target hardware.
+                </para></listitem>
+            <listitem><para>The Quick EMUlator (QEMU), which lets you simulate
+                target hardware.
+                QEMU is not literally part of the SDK.
+                You must build and include this emulator separately.
+                However, QEMU plays an important role in the development
+                process that revolves around use of and SDK.
+                </para></listitem>
+            <listitem><para>The Eclipse IDE Yocto Plug-in.
+                This plug-in is also available for you if you are an Eclipse
+                user.
+                In the same manner as QEMU, the plug-in is not literally part
+                of the SDK but is rather available for use as part of the
+                development process.
+                </para></listitem>
+            <listitem><para>Various user-space tools that greatly enhance
+                your application development experience.
+                These tools are also separate from the actual SDK but can be
+                independently obtained and used in the development process.
+                </para></listitem>
+        </itemizedlist>
+    </para>
+
+    <section id='the-cross-development-toolchain'>
+        <title>The Cross-Development Toolchain</title>
+
+        <para>
+            The
+            <ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>Cross-Development Toolchain</ulink>
+            consists of a cross-compiler, cross-linker, and cross-debugger
+            that are used to develop user-space applications for targeted
+            hardware.
+            This toolchain is created by running a toolchain installer script
+            or through a
+            <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
+            that is based on your Metadata configuration or extension for
+            your targeted device.
+            The cross-toolchain works with a matching target sysroot.
+        </para>
+    </section>
+
+    <section id='sysroot'>
+        <title>Sysroots</title>
+
+        <para>
+            The native and target sysroots contain needed headers and libraries
+            for generating binaries that run on the target architecture.
+            The target sysroot is based on the target root filesystem image
+            that is built by the OpenEmbedded build system and uses the same
+            Metadata configuration used to build the cross-toolchain.
+        </para>
+    </section>
+
+    <section id='the-qemu-emulator'>
+        <title>The QEMU Emulator</title>
+
+        <para>
+            The QEMU emulator allows you to simulate your hardware while
+            running your application or image.
+            QEMU is not part of the SDK but is made available a number of ways:
+            <itemizedlist>
+                <listitem><para>
+                    If you have cloned the <filename>poky</filename> Git
+                    repository to create a
+                    <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+                    and you have sourced the environment setup script, QEMU is
+                    installed and automatically available.
+                    </para></listitem>
+                <listitem><para>
+                    If you have downloaded a Yocto Project release and unpacked
+                    it to create a
+                    <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
+                    and you have sourced the environment setup script, QEMU is
+                    installed and automatically available.
+                    </para></listitem>
+                <listitem><para>
+                    If you have installed the cross-toolchain tarball and you
+                    have sourced the toolchain's setup environment script, QEMU
+                    is also installed and automatically available.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+
+    <section id='eclipse-overview'>
+        <title>Eclipse Yocto Plug-in</title>
+
+        <para>
+            The Eclipse IDE is a popular development environment and it fully
+            supports development using the Yocto Project.
+            When you install and configure the Eclipse Yocto Project Plug-in
+            into the Eclipse IDE, you maximize your Yocto Project experience.
+            Installing and configuring the Plug-in results in an environment
+            that has extensions specifically designed to let you more easily
+            develop software.
+            These extensions allow for cross-compilation, deployment, and
+            execution of your output into a QEMU emulation session.
+            You can also perform cross-debugging and profiling.
+            The environment also supports a suite of tools that allows you to
+            perform remote profiling, tracing, collection of power data,
+            collection of latency data, and collection of performance data.
+        </para>
+
+        <para>
+            For information about the application development workflow that
+            uses the Eclipse IDE and for a detailed example of how to install
+            and configure the Eclipse Yocto Project Plug-in, see the
+            "<link link='sdk-developing-applications-using-eclipse'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></link>"
+            section.
+        </para>
+    </section>
+
+    <section id='user-space-tools'>
+        <title>User-Space Tools</title>
+
+        <para>
+            User-space tools are available as part of the SDK development
+            process and can be helpful.
+            The tools include LatencyTOP, PowerTOP, Perf, SystemTap,
+            and Lttng-ust.
+            These tools are common development tools for the Linux platform.
+            <itemizedlist>
+                <listitem><para><emphasis>LatencyTOP:</emphasis> LatencyTOP
+                    focuses on latency that causes skips in audio, stutters in
+                    your desktop experience, or situations that overload your
+                    server even when you have plenty of CPU power left.
+                    </para></listitem>
+                <listitem><para><emphasis>PowerTOP:</emphasis> Helps you
+                    determine what software is using the most power.
+                    You can find out more about PowerTOP at
+                    <ulink url='https://01.org/powertop/'></ulink>.</para></listitem>
+                <listitem><para><emphasis>Perf:</emphasis> Performance counters
+                    for Linux used to keep track of certain types of hardware
+                    and software events.
+                    For more information on these types of counters see
+                    <ulink url='https://perf.wiki.kernel.org/'></ulink>.
+                    For examples on how to setup and use this tool, see the
+                    "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-perf'>perf</ulink>"
+                    section in the Yocto Project Profiling and Tracing Manual.
+                    </para></listitem>
+                <listitem><para><emphasis>SystemTap:</emphasis> A free software
+                    infrastructure that simplifies information gathering about
+                    a running Linux system.
+                    This information helps you diagnose performance or
+                    functional problems.
+                    SystemTap is not available as a user-space tool through
+                    the Eclipse IDE Yocto Plug-in.
+                    See <ulink url='http://sourceware.org/systemtap'></ulink>
+                    for more information on SystemTap.
+                    For examples on how to setup and use this tool, see the
+                    "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-systemtap'>SystemTap</ulink>"
+                    section in the Yocto Project Profiling and Tracing Manual.
+                    </para></listitem>
+                <listitem><para><emphasis>Lttng-ust:</emphasis> A User-space
+                    Tracer designed to provide detailed information on
+                    user-space activity.
+                    See <ulink url='http://lttng.org/ust'></ulink> for more
+                    information on Lttng-ust.
+                    </para></listitem>
+            </itemizedlist>
+        </para>
+    </section>
+</section>
+
+<section id='sdk-development-model'>
+    <title>SDK Development Model</title>
+
+    <para>
+        Fundamentally, the SDK fits into the development process as follows:
+        <imagedata fileref="figures/sdk-environment.png" align="center" width="6in" depth="5in" scalefit="100" />
+        The SDK is installed on any machine and can be used to develop
+        applications, images, and kernels.
+        An SDK can even be used by a QA Engineer or Release Engineer.
+        The fundamental concept is that the machine that has the SDK installed
+        does not have to be associated with the machine that has the
+        Yocto Project installed.
+        A developer can independently compile and test an object on their
+        machine and then, when the object is ready for integration into an
+        image, they can simply make it available to the machine that has the
+        the Yocto Project.
+        Once the object is available, the image can be rebuilt using the
+        Yocto Project to produce the modified image.
+    </para>
+
+    <para>
+        You just need to follow these general steps:
+        <orderedlist>
+            <listitem><para><emphasis>Install the SDK for your target hardware:</emphasis>
+                For information on how to install the SDK, see the
+                "<link url='sdk-installing-the-sdk'>Installing the SDK</link>"
+                section.</para></listitem>
+            <listitem><para><emphasis>Download the Target Image:</emphasis>
+                The Yocto Project supports several target architectures
+                and has many pre-built kernel images and root filesystem
+                images.</para>
+                <para>If you are going to develop your application on
+                hardware, go to the
+                <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
+                download area and choose a target machine area
+                from which to download the kernel image and root filesystem.
+                This download area could have several files in it that
+                support development using actual hardware.
+                For example, the area might contain
+                <filename>.hddimg</filename> files that combine the
+                kernel image with the filesystem, boot loaders, and
+                so forth.
+                Be sure to get the files you need for your particular
+                development process.</para>
+                <para>If you are going to develop your application and
+                then run and test it using the QEMU emulator, go to the
+                <ulink url='&YOCTO_QEMU_DL_URL;'><filename>machines/qemu</filename></ulink>
+                download area.
+                From this area, go down into the directory for your
+                target architecture (e.g. <filename>qemux86_64</filename>
+                for an <trademark class='registered'>Intel</trademark>-based
+                64-bit architecture).
+                Download kernel, root filesystem, and any other files you
+                need for your process.
+                <note>In order to use the root filesystem in QEMU, you
+                need to extract it.
+                See the
+                "<link url='sdk-extracting-the-root-filesystem'>Extracting the Root Filesystem</link>"
+                section for information on how to extract the root
+                filesystem.</note></para></listitem>
+            <listitem><para><emphasis>Develop and Test your
+                Application:</emphasis>  At this point, you have the tools
+                to develop your application.
+                If you need to separately install and use the QEMU
+                emulator, you can go to
+                <ulink url='http://wiki.qemu.org/Main_Page'>QEMU Home Page</ulink>
+                to download and learn about the emulator.
+                You can see the
+                "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
+                chapter in the Yocto Project Development Manual
+                for information on using QEMU within the Yocto
+                Project.</para></listitem>
+        </orderedlist>
+    </para>
+
+    <para>
+        The remainder of this manual describes how to use both the standard
+        SDK and the extensible SDK.
+        Information also exists in appendix form that describes how you can
+        build, install, and modify an SDK.
+    </para>
+</section>
+
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/yocto-poky/documentation/sdk-manual/sdk-manual-customization.xsl b/yocto-poky/documentation/sdk-manual/sdk-manual-customization.xsl
new file mode 100644
index 0000000..dae992c
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/sdk-manual-customization.xsl
@@ -0,0 +1,27 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
+
+<!--  <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
+-->
+
+  <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/xhtml/docbook.xsl" />
+
+<!--
+  <xsl:import href="http://docbook.sourceforge.net/release/xsl/1.76.1/xhtml/docbook.xsl" />
+
+-->
+
+  <xsl:include href="../template/permalinks.xsl"/>
+  <xsl:include href="../template/section.title.xsl"/>
+  <xsl:include href="../template/component.title.xsl"/>
+  <xsl:include href="../template/division.title.xsl"/>
+  <xsl:include href="../template/formal.object.heading.xsl"/>
+
+  <xsl:param name="html.stylesheet" select="'sdk-style.css'" />
+  <xsl:param name="chapter.autolabel" select="1" />
+  <xsl:param name="appendix.autolabel">A</xsl:param>
+  <xsl:param name="section.autolabel" select="1" />
+  <xsl:param name="section.label.includes.component.label" select="1" />
+  <xsl:param name="generate.id.attributes" select="1" />
+
+</xsl:stylesheet>
diff --git a/yocto-poky/documentation/sdk-manual/sdk-manual-eclipse-customization.xsl b/yocto-poky/documentation/sdk-manual/sdk-manual-eclipse-customization.xsl
new file mode 100644
index 0000000..03555d6
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/sdk-manual-eclipse-customization.xsl
@@ -0,0 +1,37 @@
+<?xml version='1.0'?>
+<xsl:stylesheet
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:fo="http://www.w3.org/1999/XSL/Format"
+	version="1.0">
+
+<!--
+  <xsl:import href="http://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-xsl-1.76.1/eclipse/eclipse3.xsl" />
+-->
+
+  <xsl:import href="../template/1.76.1/docbook-xsl-1.76.1/eclipse/eclipse3.xsl" />
+
+<!--
+
+  <xsl:import
+	  href="http://docbook.sourceforge.net/release/xsl/1.76.1/eclipse/eclipse3.xsl" />
+
+-->
+
+  <xsl:param name="chunker.output.indent" select="'yes'"/>
+  <xsl:param name="chunk.quietly" select="1"/>
+  <xsl:param name="chunk.first.sections" select="1"/>
+  <xsl:param name="chunk.section.depth" select="10"/>
+  <xsl:param name="use.id.as.filename" select="1"/>
+  <xsl:param name="ulink.target" select="'_self'" />
+  <xsl:param name="base.dir" select="'html/adt-manual/'"/>
+  <xsl:param name="html.stylesheet" select="'../book.css'"/>
+  <xsl:param name="eclipse.manifest" select="0"/>
+  <xsl:param name="create.plugin.xml" select="0"/>
+  <xsl:param name="suppress.navigation" select="1"/>
+  <xsl:param name="generate.index" select="0"/>
+  <xsl:param name="chapter.autolabel" select="1" />
+  <xsl:param name="appendix.autolabel" select="1" />
+  <xsl:param name="section.autolabel" select="1" />
+  <xsl:param name="section.label.includes.component.label" select="1" />
+</xsl:stylesheet>
diff --git a/yocto-poky/documentation/sdk-manual/sdk-manual.xml b/yocto-poky/documentation/sdk-manual/sdk-manual.xml
new file mode 100644
index 0000000..c860782
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/sdk-manual.xml
@@ -0,0 +1,80 @@
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<book id='sdk-manual' lang='en'
+      xmlns:xi="http://www.w3.org/2003/XInclude"
+      xmlns="http://docbook.org/ns/docbook"
+      >
+    <bookinfo>
+
+        <mediaobject>
+            <imageobject>
+                <imagedata fileref='figures/sdk-title.png'
+                    format='SVG'
+                    align='left' scalefit='1' width='100%'/>
+            </imageobject>
+        </mediaobject>
+
+        <title>
+            Yocto Project Software Development Kit (SDK) Developer's Guide
+        </title>
+
+        <authorgroup>
+            <author>
+                <firstname>Scott</firstname> <surname>Rifenbark</surname>
+                <affiliation>
+                    <orgname>Scotty's Documentation Services, LLC</orgname>
+                </affiliation>
+                <email>srifenbark@gmail.com</email>
+            </author>
+        </authorgroup>
+
+        <revhistory>
+            <revision>
+                <revnumber>2.1</revnumber>
+                <date>April 2016</date>
+                <revremark>Released with the Yocto Project 2.1 Release.</revremark>
+            </revision>
+       </revhistory>
+
+    <copyright>
+      <year>&COPYRIGHT_YEAR;</year>
+      <holder>Linux Foundation</holder>
+    </copyright>
+
+    <legalnotice>
+      <para>
+        Permission is granted to copy, distribute and/or modify this document under
+        the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
+      </para>
+      <note>
+          For the latest version of this manual associated with this
+          Yocto Project release, see the
+          <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>
+          from the Yocto Project website.
+      </note>
+
+    </legalnotice>
+
+    </bookinfo>
+
+    <xi:include href="sdk-intro.xml"/>
+
+    <xi:include href="sdk-using.xml"/>
+
+    <xi:include href="sdk-extensible.xml"/>
+
+    <xi:include href="sdk-appendix-obtain.xml"/>
+
+    <xi:include href="sdk-appendix-customizing.xml"/>
+
+<!--    <index id='index'>
+      <title>Index</title>
+    </index>
+-->
+
+</book>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/yocto-poky/documentation/sdk-manual/sdk-style.css b/yocto-poky/documentation/sdk-manual/sdk-style.css
new file mode 100644
index 0000000..5251896
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/sdk-style.css
@@ -0,0 +1,988 @@
+/*
+   Generic XHTML / DocBook XHTML CSS Stylesheet.
+
+   Browser wrangling and typographic design by
+      Oyvind Kolas / pippin@gimp.org
+
+   Customised for Poky by
+      Matthew Allum / mallum@o-hand.com
+
+   Thanks to:
+     Liam R. E. Quin
+     William Skaggs
+     Jakub Steiner
+
+   Structure
+   ---------
+
+   The stylesheet is divided into the following sections:
+
+       Positioning
+          Margins, paddings, width, font-size, clearing.
+       Decorations
+          Borders, style
+       Colors
+          Colors
+       Graphics
+          Graphical backgrounds
+       Nasty IE tweaks
+          Workarounds needed to make it work in internet explorer,
+          currently makes the stylesheet non validating, but up until
+          this point it is validating.
+       Mozilla extensions
+          Transparency for footer
+	  Rounded corners on boxes
+
+*/
+
+
+  /*************** /
+ /  Positioning   /
+/ ***************/
+
+body {
+  font-family: Verdana, Sans, sans-serif;
+
+  min-width: 640px;
+  width: 80%;
+  margin:  0em auto;
+  padding: 2em 5em 5em 5em;
+  color: #333;
+}
+
+h1,h2,h3,h4,h5,h6,h7 {
+  font-family: Arial, Sans;
+  color: #00557D;
+  clear: both;
+}
+
+h1 {
+  font-size: 2em;
+  text-align: left;
+  padding: 0em 0em 0em 0em;
+  margin: 2em 0em 0em 0em;
+}
+
+h2.subtitle {
+  margin: 0.10em 0em 3.0em 0em;
+  padding: 0em 0em 0em 0em;
+  font-size: 1.8em;
+  padding-left: 20%;
+  font-weight: normal;
+  font-style: italic;
+}
+
+h2 {
+  margin: 2em 0em 0.66em 0em;
+  padding: 0.5em 0em 0em 0em;
+  font-size: 1.5em;
+  font-weight: bold;
+}
+
+h3.subtitle {
+  margin: 0em 0em 1em 0em;
+  padding: 0em 0em 0em 0em;
+  font-size: 142.14%;
+  text-align: right;
+}
+
+h3 {
+  margin: 1em 0em 0.5em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 140%;
+  font-weight: bold;
+}
+
+h4 {
+  margin: 1em 0em 0.5em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 120%;
+  font-weight: bold;
+}
+
+h5 {
+  margin: 1em 0em 0.5em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 110%;
+  font-weight: bold;
+}
+
+h6 {
+  margin: 1em 0em 0em 0em;
+  padding: 1em 0em 0em 0em;
+  font-size: 110%;
+  font-weight: bold;
+}
+
+.authorgroup {
+  background-color: transparent;
+  background-repeat: no-repeat;
+  padding-top: 256px;
+  background-image: url("figures/sdk-title.png");
+  background-position: left top;
+  margin-top: -256px;
+  padding-right: 50px;
+  margin-left: 0px;
+  text-align: right;
+  width: 740px;
+}
+
+h3.author {
+  margin: 0em 0me 0em 0em;
+  padding: 0em 0em 0em 0em;
+  font-weight: normal;
+  font-size: 100%;
+  color: #333;
+  clear: both;
+}
+
+.author tt.email {
+  font-size: 66%;
+}
+
+.titlepage hr {
+  width: 0em;
+  clear: both;
+}
+
+.revhistory {
+  padding-top: 2em;
+  clear: both;
+}
+
+.toc,
+.list-of-tables,
+.list-of-examples,
+.list-of-figures {
+  padding: 1.33em 0em 2.5em 0em;
+  color: #00557D;
+}
+
+.toc p,
+.list-of-tables p,
+.list-of-figures p,
+.list-of-examples p {
+  padding: 0em 0em 0em 0em;
+  padding: 0em 0em 0.3em;
+  margin: 1.5em 0em 0em 0em;
+}
+
+.toc p b,
+.list-of-tables p b,
+.list-of-figures p b,
+.list-of-examples p b{
+  font-size: 100.0%;
+  font-weight: bold;
+}
+
+.toc dl,
+.list-of-tables dl,
+.list-of-figures dl,
+.list-of-examples dl {
+  margin: 0em 0em 0.5em 0em;
+  padding: 0em 0em 0em 0em;
+}
+
+.toc dt {
+  margin: 0em 0em 0em 0em;
+  padding: 0em 0em 0em 0em;
+}
+
+.toc dd {
+  margin: 0em 0em 0em 2.6em;
+  padding: 0em 0em 0em 0em;
+}
+
+div.glossary dl,
+div.variablelist dl {
+}
+
+.glossary dl dt,
+.variablelist dl dt,
+.variablelist dl dt span.term {
+  font-weight: normal;
+  width: 20em;
+  text-align: right;
+}
+
+.variablelist dl dt {
+  margin-top: 0.5em;
+}
+
+.glossary dl dd,
+.variablelist dl dd {
+  margin-top: -1em;
+  margin-left: 25.5em;
+}
+
+.glossary dd p,
+.variablelist dd p {
+  margin-top: 0em;
+  margin-bottom: 1em;
+}
+
+
+div.calloutlist table td {
+  padding: 0em 0em 0em 0em;
+  margin: 0em 0em 0em 0em;
+}
+
+div.calloutlist table td p {
+  margin-top: 0em;
+  margin-bottom: 1em;
+}
+
+div p.copyright {
+  text-align: left;
+}
+
+div.legalnotice p.legalnotice-title {
+  margin-bottom: 0em;
+}
+
+p {
+  line-height: 1.5em;
+  margin-top: 0em;
+
+}
+
+dl {
+  padding-top: 0em;
+}
+
+hr {
+  border: solid 1px;
+}
+
+
+.mediaobject,
+.mediaobjectco {
+  text-align: center;
+}
+
+img {
+  border: none;
+}
+
+ul {
+  padding: 0em 0em 0em 1.5em;
+}
+
+ul li {
+  padding: 0em 0em 0em 0em;
+}
+
+ul li p {
+  text-align: left;
+}
+
+table {
+  width :100%;
+}
+
+th {
+  padding: 0.25em;
+  text-align: left;
+  font-weight: normal;
+  vertical-align: top;
+}
+
+td {
+  padding: 0.25em;
+  vertical-align: top;
+}
+
+p a[id] {
+  margin: 0px;
+  padding: 0px;
+  display: inline;
+  background-image: none;
+}
+
+a {
+  text-decoration: underline;
+  color: #444;
+}
+
+pre {
+    overflow: auto;
+}
+
+a:hover {
+  text-decoration: underline;
+  /*font-weight: bold;*/
+}
+
+/* This style defines how the permalink character
+   appears by itself and when hovered over with
+   the mouse. */
+
+[alt='Permalink'] { color: #eee; }
+[alt='Permalink']:hover { color: black; }
+
+
+div.informalfigure,
+div.informalexample,
+div.informaltable,
+div.figure,
+div.table,
+div.example {
+  margin: 1em 0em;
+  padding: 1em;
+  page-break-inside: avoid;
+}
+
+
+div.informalfigure p.title b,
+div.informalexample p.title b,
+div.informaltable p.title b,
+div.figure p.title b,
+div.example p.title b,
+div.table p.title b{
+    padding-top: 0em;
+    margin-top: 0em;
+    font-size: 100%;
+    font-weight: normal;
+}
+
+.mediaobject .caption,
+.mediaobject .caption p  {
+  text-align: center;
+  font-size: 80%;
+  padding-top: 0.5em;
+  padding-bottom: 0.5em;
+}
+
+.epigraph {
+  padding-left: 55%;
+  margin-bottom: 1em;
+}
+
+.epigraph p {
+  text-align: left;
+}
+
+.epigraph .quote {
+  font-style: italic;
+}
+.epigraph .attribution {
+  font-style: normal;
+  text-align: right;
+}
+
+span.application {
+  font-style: italic;
+}
+
+.programlisting {
+  font-family: monospace;
+  font-size: 80%;
+  white-space: pre;
+  margin: 1.33em 0em;
+  padding: 1.33em;
+}
+
+.tip,
+.warning,
+.caution,
+.note {
+  margin-top: 1em;
+  margin-bottom: 1em;
+
+}
+
+/* force full width of table within div */
+.tip table,
+.warning table,
+.caution table,
+.note table {
+  border: none;
+  width: 100%;
+}
+
+
+.tip table th,
+.warning table th,
+.caution table th,
+.note table th {
+  padding: 0.8em 0.0em 0.0em 0.0em;
+  margin : 0em 0em 0em 0em;
+}
+
+.tip p,
+.warning p,
+.caution p,
+.note p {
+  margin-top: 0.5em;
+  margin-bottom: 0.5em;
+  padding-right: 1em;
+  text-align: left;
+}
+
+.acronym {
+  text-transform: uppercase;
+}
+
+b.keycap,
+.keycap {
+  padding: 0.09em 0.3em;
+  margin: 0em;
+}
+
+.itemizedlist li {
+  clear: none;
+}
+
+.filename {
+  font-size: medium;
+  font-family: Courier, monospace;
+}
+
+
+div.navheader, div.heading{
+  position: absolute;
+  left: 0em;
+  top: 0em;
+  width: 100%;
+  background-color: #cdf;
+  width: 100%;
+}
+
+div.navfooter, div.footing{
+  position: fixed;
+  left: 0em;
+  bottom: 0em;
+  background-color: #eee;
+  width: 100%;
+}
+
+
+div.navheader td,
+div.navfooter td {
+  font-size: 66%;
+}
+
+div.navheader table th {
+  /*font-family: Georgia, Times, serif;*/
+  /*font-size: x-large;*/
+  font-size: 80%;
+}
+
+div.navheader table {
+  border-left: 0em;
+  border-right: 0em;
+  border-top: 0em;
+  width: 100%;
+}
+
+div.navfooter table {
+  border-left: 0em;
+  border-right: 0em;
+  border-bottom: 0em;
+  width: 100%;
+}
+
+div.navheader table td a,
+div.navfooter table td a {
+  color: #777;
+  text-decoration: none;
+}
+
+/* normal text in the footer */
+div.navfooter table td {
+  color: black;
+}
+
+div.navheader table td a:visited,
+div.navfooter table td a:visited {
+  color: #444;
+}
+
+
+/* links in header and footer */
+div.navheader table td a:hover,
+div.navfooter table td a:hover {
+  text-decoration: underline;
+  background-color: transparent;
+  color: #33a;
+}
+
+div.navheader hr,
+div.navfooter hr {
+  display: none;
+}
+
+
+.qandaset tr.question td p {
+  margin: 0em 0em 1em 0em;
+  padding: 0em 0em 0em 0em;
+}
+
+.qandaset tr.answer td p {
+  margin: 0em 0em 1em 0em;
+  padding: 0em 0em 0em 0em;
+}
+.answer td {
+  padding-bottom: 1.5em;
+}
+
+.emphasis {
+  font-weight: bold;
+}
+
+
+  /************* /
+ / decorations  /
+/ *************/
+
+.titlepage {
+}
+
+.part .title {
+}
+
+.subtitle {
+    border: none;
+}
+
+/*
+h1 {
+  border: none;
+}
+
+h2 {
+  border-top: solid 0.2em;
+  border-bottom: solid 0.06em;
+}
+
+h3 {
+  border-top: 0em;
+  border-bottom: solid 0.06em;
+}
+
+h4 {
+  border: 0em;
+  border-bottom: solid 0.06em;
+}
+
+h5 {
+  border: 0em;
+}
+*/
+
+.programlisting {
+  border: solid 1px;
+}
+
+div.figure,
+div.table,
+div.informalfigure,
+div.informaltable,
+div.informalexample,
+div.example {
+  border: 1px solid;
+}
+
+
+
+.tip,
+.warning,
+.caution,
+.note {
+  border: 1px solid;
+}
+
+.tip table th,
+.warning table th,
+.caution table th,
+.note table th {
+  border-bottom: 1px solid;
+}
+
+.question td {
+  border-top: 1px solid black;
+}
+
+.answer {
+}
+
+
+b.keycap,
+.keycap {
+  border: 1px solid;
+}
+
+
+div.navheader, div.heading{
+  border-bottom: 1px solid;
+}
+
+
+div.navfooter, div.footing{
+  border-top: 1px solid;
+}
+
+  /********* /
+ /  colors  /
+/ *********/
+
+body {
+  color: #333;
+  background: white;
+}
+
+a {
+  background: transparent;
+}
+
+a:hover {
+  background-color: #dedede;
+}
+
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+h7,
+h8 {
+  background-color: transparent;
+}
+
+hr {
+  border-color: #aaa;
+}
+
+
+.tip, .warning, .caution, .note {
+  border-color: #fff;
+}
+
+
+.tip table th,
+.warning table th,
+.caution table th,
+.note table th {
+  border-bottom-color: #fff;
+}
+
+
+.warning {
+  background-color: #f0f0f2;
+}
+
+.caution {
+  background-color: #f0f0f2;
+}
+
+.tip {
+  background-color: #f0f0f2;
+}
+
+.note {
+  background-color: #f0f0f2;
+}
+
+.writernotes {
+  color: #ff0000;
+}
+
+.glossary dl dt,
+.variablelist dl dt,
+.variablelist dl dt span.term {
+  color: #044;
+}
+
+div.figure,
+div.table,
+div.example,
+div.informalfigure,
+div.informaltable,
+div.informalexample {
+  border-color: #aaa;
+}
+
+pre.programlisting {
+  color: black;
+  background-color: #fff;
+  border-color: #aaa;
+  border-width: 2px;
+}
+
+.guimenu,
+.guilabel,
+.guimenuitem {
+  background-color: #eee;
+}
+
+
+b.keycap,
+.keycap {
+  background-color: #eee;
+  border-color: #999;
+}
+
+
+div.navheader {
+  border-color: black;
+}
+
+
+div.navfooter {
+  border-color: black;
+}
+
+
+  /*********** /
+ /  graphics  /
+/ ***********/
+
+/*
+body {
+  background-image: url("images/body_bg.jpg");
+  background-attachment: fixed;
+}
+
+.navheader,
+.note,
+.tip {
+  background-image: url("images/note_bg.jpg");
+  background-attachment: fixed;
+}
+
+.warning,
+.caution {
+  background-image: url("images/warning_bg.jpg");
+  background-attachment: fixed;
+}
+
+.figure,
+.informalfigure,
+.example,
+.informalexample,
+.table,
+.informaltable {
+  background-image: url("images/figure_bg.jpg");
+  background-attachment: fixed;
+}
+
+*/
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+h7{
+}
+
+/*
+Example of how to stick an image as part of the title.
+
+div.article .titlepage .title
+{
+  background-image: url("figures/white-on-black.png");
+  background-position: center;
+  background-repeat: repeat-x;
+}
+*/
+
+div.preface .titlepage .title,
+div.colophon .title,
+div.chapter .titlepage .title,
+div.article .titlepage .title
+{
+}
+
+div.section div.section .titlepage .title,
+div.sect2 .titlepage .title {
+    background: none;
+}
+
+
+h1.title {
+  background-color: transparent;
+  background-repeat: no-repeat;
+  height: 256px;
+  text-indent: -9000px;
+  overflow:hidden;
+}
+
+h2.subtitle {
+  background-color: transparent;
+  text-indent: -9000px;
+  overflow:hidden;
+  width: 0px;
+  display: none;
+}
+
+  /*************************************** /
+ /  pippin.gimp.org specific alterations  /
+/ ***************************************/
+
+/*
+div.heading, div.navheader {
+  color: #777;
+  font-size: 80%;
+  padding: 0;
+  margin: 0;
+  text-align: left;
+  position: absolute;
+  top: 0px;
+  left: 0px;
+  width: 100%;
+  height: 50px;
+  background: url('/gfx/heading_bg.png') transparent;
+  background-repeat: repeat-x;
+  background-attachment: fixed;
+  border: none;
+}
+
+div.heading a {
+  color: #444;
+}
+
+div.footing, div.navfooter {
+  border: none;
+  color: #ddd;
+  font-size: 80%;
+  text-align:right;
+
+  width: 100%;
+  padding-top: 10px;
+  position: absolute;
+  bottom: 0px;
+  left: 0px;
+
+  background: url('/gfx/footing_bg.png') transparent;
+}
+*/
+
+
+
+  /****************** /
+ /  nasty ie tweaks  /
+/ ******************/
+
+/*
+div.heading, div.navheader {
+  width:expression(document.body.clientWidth + "px");
+}
+
+div.footing, div.navfooter {
+  width:expression(document.body.clientWidth + "px");
+  margin-left:expression("-5em");
+}
+body {
+  padding:expression("4em 5em 0em 5em");
+}
+*/
+
+  /**************************************** /
+ / mozilla vendor specific css extensions  /
+/ ****************************************/
+/*
+div.navfooter, div.footing{
+  -moz-opacity: 0.8em;
+}
+
+div.figure,
+div.table,
+div.informalfigure,
+div.informaltable,
+div.informalexample,
+div.example,
+.tip,
+.warning,
+.caution,
+.note {
+  -moz-border-radius: 0.5em;
+}
+
+b.keycap,
+.keycap {
+  -moz-border-radius: 0.3em;
+}
+*/
+
+table tr td table tr td {
+  display: none;
+}
+
+
+hr {
+  display: none;
+}
+
+table {
+  border: 0em;
+}
+
+ .photo {
+  float: right;
+  margin-left:   1.5em;
+  margin-bottom: 1.5em;
+  margin-top: 0em;
+  max-width:      17em;
+  border:     1px solid gray;
+  padding:    3px;
+  background: white;
+}
+ .seperator {
+   padding-top: 2em;
+   clear: both;
+  }
+
+  #validators {
+      margin-top: 5em;
+      text-align: right;
+      color: #777;
+  }
+  @media print {
+      body {
+          font-size: 8pt;
+      }
+      .noprint {
+          display: none;
+      }
+  }
+
+
+.tip,
+.note {
+   background: #f0f0f2;
+   color: #333;
+   padding: 20px;
+   margin: 20px;
+}
+
+.tip h3,
+.note h3 {
+   padding: 0em;
+   margin: 0em;
+   font-size: 2em;
+   font-weight: bold;
+   color: #333;
+}
+
+.tip a,
+.note a {
+   color: #333;
+   text-decoration: underline;
+}
+
+.footnote {
+   font-size: small;
+   color: #333;
+}
+
+/* Changes the announcement text */
+.tip h3,
+.warning h3,
+.caution h3,
+.note h3 {
+   font-size:large;
+   color: #00557D;
+}
diff --git a/yocto-poky/documentation/sdk-manual/sdk-using.xml b/yocto-poky/documentation/sdk-manual/sdk-using.xml
new file mode 100644
index 0000000..1ea47d3
--- /dev/null
+++ b/yocto-poky/documentation/sdk-manual/sdk-using.xml
@@ -0,0 +1,1466 @@
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
+[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
+
+<chapter id='sdk-using-the-standard-sdk'>
+
+<title>Using the Standard SDK</title>
+
+<para>
+    This chapter describes the standard SDK and how to use it.
+    Information covers the pieces of the SDK, how to install it, and presents
+    several task-based procedures common for developing with a standard SDK.
+    <note>
+        The tasks you can perform using a standard SDK are also applicable
+        when you are using an extensible SDK.
+        For information on the differences when using an extensible SDK as
+        compared to an extensible SDK, see the
+        "<link linkend='sdk-extensible'>Using the Extensible SDK</link>"
+        chapter.
+    </note>
+</para>
+
+<section id='sdk-standard-sdk-intro'>
+    <title>Why use the Standard SDK and What is in It?</title>
+
+    <para>
+        The Standard SDK provides a cross-development toolchain and libraries
+        tailored to the contents of a specific image.
+        You would use the Standard SDK if you want a more traditional toolchain
+        experience.
+    </para>
+
+    <para>
+        The installed Standard SDK consists of several files and directories.
+        Basically, it contains an SDK environment setup script, some
+        configuration files, and host and target root filesystems to support
+        usage.
+        You can see the directory structure in the
+        "<link linkend='sdk-installed-standard-sdk-directory-structure'>Installed Standard SDK Directory Structure</link>"
+        section.
+    </para>
+</section>
+
+<section id='sdk-installing-the-sdk'>
+    <title>Installing the SDK</title>
+
+    <para>
+        The first thing you need to do is install the SDK on your host
+        development machine by running the <filename>.sh</filename>
+        installation script.
+    </para>
+
+    <para>
+        You can download a tarball installer, which includes the
+        pre-built toolchain, the <filename>runqemu</filename>
+        script, and support files from the appropriate directory under
+        <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>.
+        Toolchains are available for 32-bit and 64-bit x86 development
+        systems from the <filename>i686</filename> and
+        <filename>x86_64</filename> directories, respectively.
+        The toolchains the Yocto Project provides are based off the
+        <filename>core-image-sato</filename> image and contain
+        libraries appropriate for developing against that image.
+        Each type of development system supports five or more target
+        architectures.
+    </para>
+
+    <para>
+        The names of the tarball installer scripts are such that a
+        string representing the host system appears first in the
+        filename and then is immediately followed by a string
+        representing the target architecture.
+        <literallayout class='monospaced'>
+     poky-glibc-<replaceable>host_system</replaceable>-<replaceable>image_type</replaceable>-<replaceable>arch</replaceable>-toolchain-<replaceable>release_version</replaceable>.sh
+
+     Where:
+         <replaceable>host_system</replaceable> is a string representing your development system:
+
+                    i686 or x86_64.
+
+         <replaceable>image_type</replaceable> is the image for which the SDK was built.
+
+         <replaceable>arch</replaceable> is a string representing the tuned target architecture:
+
+                    i586, x86_64, powerpc, mips, armv7a or armv5te
+
+         <replaceable>release_version</replaceable> is a string representing the release number of the
+                Yocto Project:
+
+                    &DISTRO;, &DISTRO;+snapshot
+        </literallayout>
+        For example, the following toolchain installer is for a 64-bit
+        development host system and a i586-tuned target architecture
+        based off the SDK for <filename>core-image-sato</filename> and
+        using the current &DISTRO; snapshot:
+        <literallayout class='monospaced'>
+     poky-glibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
+        </literallayout>
+    </para>
+
+    <para>
+        The SDK and toolchains are self-contained and by default are installed
+        into <filename>/opt/poky</filename>.
+        However, when you run the SDK installer, you can choose an
+        installation directory.
+        <note>
+            You must change the permissions on the toolchain
+            installer script so that it is executable:
+            <literallayout class='monospaced'>
+     $ chmod +x poky-glibc-x86_64-core-image-sato-i586-toolchain-2.1.sh
+            </literallayout>
+        </note>
+    </para>
+
+    <para>
+        The following command shows how to run the installer given a
+        toolchain tarball for a 64-bit x86 development host system and
+        a 32-bit x86 target architecture.
+        The example assumes the toolchain installer is located in
+        <filename>~/Downloads/</filename>.
+        <note>
+            If you do not have write permissions for the directory
+            into which you are installing the SDK, the installer
+            notifies you and exits.
+            Be sure you have write permissions in the directory and
+            run the installer again.
+        </note>
+        <literallayout class='monospaced'>
+     $ ./poky-glibc-x86_64-core-image-sato-i586-toolchain-2.1.sh
+     Poky (Yocto Project Reference Distro) SDK installer version 2.0
+     ===============================================================
+     Enter target directory for SDK (default: /opt/poky/2.1):
+     You are about to install the SDK to "/opt/poky/2.1". Proceed[Y/n]? Y
+     Extracting SDK.......................................................................done
+     Setting it up...done
+     SDK has been successfully set up and is ready to be used.
+     Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
+      $ . /opt/poky/2.1/environment-setup-i586-poky-linux
+        </literallayout>
+    </para>
+
+    <para>
+        Again, reference the
+        "<link linkend='sdk-installed-standard-sdk-directory-structure'>Installed Standard SDK Directory Structure</link>"
+        section for more details on the resulting directory structure of
+        the installed SDK.
+    </para>
+</section>
+
+<section id='sdk-running-the-sdk-environment-setup-script'>
+    <title>Running the SDK Environment Setup Script</title>
+
+    <para>
+        Once you have the SDK installed, you must run the SDK environment
+        setup script before you can actually use it.
+        This setup script resides in the directory you chose when you installed
+        the SDK.
+        For information on where this setup script can reside, see the
+        "<link linkend='sdk-appendix-obtain'>Obtaining the SDK</link>"
+        Appendix.
+    </para>
+
+    <para>
+        Before running the script, be sure it is the one that matches the
+        architecture for which you are developing.
+        Environment setup scripts begin with the string
+        "<filename>environment-setup</filename>" and include as part of their
+        name the tuned target architecture.
+        For example, the command to source a setup script for an IA-based
+        target machine using i586 tuning and located in the default SDK
+        installation directory is as follows:
+        <literallayout class='monospaced'>
+     $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
+        </literallayout>
+        When you run the setup script, many environment variables are
+        defined:
+        <literallayout class='monospaced'>
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKTARGETSYSROOT'><filename>SDKTARGETSYSROOT</filename></ulink> - The path to the sysroot used for cross-compilation
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-PKG_CONFIG_PATH'><filename>PKG_CONFIG_PATH</filename></ulink> - The path to the target pkg-config files
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIG_SITE'><filename>CONFIG_SITE</filename></ulink> - A GNU autoconf site file preconfigured for the target
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'><filename>CC</filename></ulink> - The minimal command and arguments to run the C compiler
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CXX'><filename>CXX</filename></ulink> - The minimal command and arguments to run the C++ compiler
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CPP'><filename>CPP</filename></ulink> - The minimal command and arguments to run the C preprocessor
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-AS'><filename>AS</filename></ulink> - The minimal command and arguments to run the assembler
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'><filename>LD</filename></ulink> - The minimal command and arguments to run the linker
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-GDB'><filename>GDB</filename></ulink> - The minimal command and arguments to run the GNU Debugger
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-STRIP'><filename>STRIP</filename></ulink> - The minimal command and arguments to run 'strip', which strips symbols
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-RANLIB'><filename>RANLIB</filename></ulink> - The minimal command and arguments to run 'ranlib'
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-OBJCOPY'><filename>OBJCOPY</filename></ulink> - The minimal command and arguments to run 'objcopy'
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-OBJDUMP'><filename>OBJDUMP</filename></ulink> - The minimal command and arguments to run 'objdump'
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-AR'><filename>AR</filename></ulink> - The minimal command and arguments to run 'ar'
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-NM'><filename>NM</filename></ulink> - The minimal command and arguments to run 'nm'
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_PREFIX'><filename>TARGET_PREFIX</filename></ulink> - The toolchain binary prefix for the target tools
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CROSS_COMPILE'><filename>CROSS_COMPILE</filename></ulink> - The toolchain binary prefix for the target tools
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS'><filename>CONFIGURE_FLAGS</filename></ulink> - The minimal arguments for GNU configure
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CFLAGS'><filename>CFLAGS</filename></ulink> - Suggested C flags
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CXXFLAGS'><filename>CXXFLAGS</filename></ulink> - Suggested C++ flags
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-LDFLAGS'><filename>LDFLAGS</filename></ulink> - Suggested linker flags when you use CC to link
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CPPFLAGS'><filename>CPPFLAGS</filename></ulink> - Suggested preprocessor flags
+        </literallayout>
+    </para>
+</section>
+
+<section id='autotools-based-projects'>
+    <title>Autotools-Based Projects</title>
+
+    <para>
+        Once you have a suitable cross-toolchain installed, it is very easy to
+        develop a project outside of the OpenEmbedded build system.
+        This section presents a simple "Helloworld" example that shows how
+        to set up, compile, and run the project.
+    </para>
+
+    <section id='creating-and-running-a-project-based-on-gnu-autotools'>
+        <title>Creating and Running a Project Based on GNU Autotools</title>
+
+        <para>
+            Follow these steps to create a simple Autotools-based project:
+            <orderedlist>
+                <listitem><para><emphasis>Create your directory:</emphasis>
+                    Create a clean directory for your project and then make
+                    that directory your working location:
+                    <literallayout class='monospaced'>
+     $ mkdir $HOME/helloworld
+     $ cd $HOME/helloworld
+                    </literallayout></para></listitem>
+                <listitem><para><emphasis>Populate the directory:</emphasis>
+                    Create <filename>hello.c</filename>, <filename>Makefile.am</filename>,
+                    and <filename>configure.in</filename> files as follows:
+                    <itemizedlist>
+                        <listitem><para>For <filename>hello.c</filename>, include
+                            these lines:
+                            <literallayout class='monospaced'>
+     #include &lt;stdio.h&gt;
+
+     main()
+        {
+           printf("Hello World!\n");
+        }
+                            </literallayout></para></listitem>
+                        <listitem><para>For <filename>Makefile.am</filename>,
+                            include these lines:
+                            <literallayout class='monospaced'>
+     bin_PROGRAMS = hello
+     hello_SOURCES = hello.c
+                            </literallayout></para></listitem>
+                        <listitem><para>For <filename>configure.in</filename>,
+                            include these lines:
+                            <literallayout class='monospaced'>
+     AC_INIT(hello.c)
+     AM_INIT_AUTOMAKE(hello,0.1)
+     AC_PROG_CC
+     AC_PROG_INSTALL
+     AC_OUTPUT(Makefile)
+                            </literallayout></para></listitem>
+                    </itemizedlist></para></listitem>
+                <listitem><para><emphasis>Source the cross-toolchain
+                    environment setup file:</emphasis>
+                    Installation of the cross-toolchain creates a cross-toolchain
+                    environment setup script in the directory that the SDK
+                    was installed.
+                    Before you can use the tools to develop your project, you must
+                    source this setup script.
+                    The script begins with the string "environment-setup" and contains
+                    the machine architecture, which is followed by the string
+                    "poky-linux".
+                    Here is an example that sources a script from the
+                    default SDK installation directory that uses the
+                    32-bit Intel x86 Architecture and the
+                    &DISTRO_NAME; Yocto Project release:
+                    <literallayout class='monospaced'>
+     $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
+                    </literallayout></para></listitem>
+                <listitem><para><emphasis>Generate the local aclocal.m4
+                    files and create the configure script:</emphasis>
+                    The following GNU Autotools generate the local
+                    <filename>aclocal.m4</filename> files and create the
+                    configure script:
+                    <literallayout class='monospaced'>
+     $ aclocal
+     $ autoconf
+                    </literallayout></para></listitem>
+                <listitem><para><emphasis>Generate files needed by GNU
+                    coding standards:</emphasis>
+                    GNU coding standards require certain files in order for the
+                    project to be compliant.
+                    This command creates those files:
+                    <literallayout class='monospaced'>
+     $ touch NEWS README AUTHORS ChangeLog
+                    </literallayout></para></listitem>
+                <listitem><para><emphasis>Generate the configure
+                    file:</emphasis>
+                    This command generates the <filename>configure</filename>:
+                    <literallayout class='monospaced'>
+     $ automake -a
+                    </literallayout></para></listitem>
+                <listitem><para><emphasis>Cross-compile the project:</emphasis>
+                    This command compiles the project using the cross-compiler.
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#var-CONFIGURE_FLAGS'><filename>CONFIGURE_FLAGS</filename></ulink>
+                    environment variable provides the minimal arguments for
+                    GNU configure:
+                    <literallayout class='monospaced'>
+     $ ./configure ${CONFIGURE_FLAGS}
+                    </literallayout></para></listitem>
+                <listitem><para><emphasis>Make and install the project:</emphasis>
+                    These two commands generate and install the project into the
+                    destination directory:
+                    <literallayout class='monospaced'>
+     $ make
+     $ make install DESTDIR=./tmp
+                    </literallayout></para></listitem>
+                <listitem><para><emphasis>Verify the installation:</emphasis>
+                    This command is a simple way to verify the installation
+                    of your project.
+                    Running the command prints the architecture on which
+                    the binary file can run.
+                    This architecture should be the same architecture that
+                    the installed cross-toolchain supports.
+                    <literallayout class='monospaced'>
+     $ file ./tmp/usr/local/bin/hello
+                    </literallayout></para></listitem>
+                <listitem><para><emphasis>Execute your project:</emphasis>
+                    To execute the project in the shell, simply enter the name.
+                    You could also copy the binary to the actual target hardware
+                    and run the project there as well:
+                    <literallayout class='monospaced'>
+     $ ./hello
+                    </literallayout>
+                    As expected, the project displays the "Hello World!" message.
+                    </para></listitem>
+            </orderedlist>
+        </para>
+    </section>
+
+    <section id='passing-host-options'>
+        <title>Passing Host Options</title>
+
+        <para>
+            For an Autotools-based project, you can use the cross-toolchain by just
+            passing the appropriate host option to <filename>configure.sh</filename>.
+            The host option you use is derived from the name of the environment setup
+            script found in the directory in which you installed the cross-toolchain.
+            For example, the host option for an ARM-based target that uses the GNU EABI
+            is <filename>armv5te-poky-linux-gnueabi</filename>.
+            You will notice that the name of the script is
+            <filename>environment-setup-armv5te-poky-linux-gnueabi</filename>.
+            Thus, the following command works to update your project and
+            rebuild it using the appropriate cross-toolchain tools:
+            <literallayout class='monospaced'>
+     $ ./configure --host=armv5te-poky-linux-gnueabi \
+        --with-libtool-sysroot=<replaceable>sysroot_dir</replaceable>
+            </literallayout>
+            <note>
+                If the <filename>configure</filename> script results in problems recognizing the
+                <filename>--with-libtool-sysroot=</filename><replaceable>sysroot-dir</replaceable> option,
+                regenerate the script to enable the support by doing the following and then
+                run the script again:
+                <literallayout class='monospaced'>
+     $ libtoolize --automake
+     $ aclocal -I ${OECORE_NATIVE_SYSROOT}/usr/share/aclocal \
+        [-I <replaceable>dir_containing_your_project-specific_m4_macros</replaceable>]
+     $ autoconf
+     $ autoheader
+     $ automake -a
+                </literallayout>
+            </note>
+        </para>
+    </section>
+</section>
+
+<section id='makefile-based-projects'>
+    <title>Makefile-Based Projects</title>
+
+    <para>
+        For Makefile-based projects, the cross-toolchain environment variables
+        established by running the cross-toolchain environment setup script
+        are subject to general <filename>make</filename> rules.
+    </para>
+
+    <para>
+        To illustrate this, consider the following four cross-toolchain
+        environment variables:
+        <literallayout class='monospaced'>
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CC'>CC</ulink>=i586-poky-linux-gcc -m32 -march=i586 --sysroot=/opt/poky/1.8/sysroots/i586-poky-linux
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-LD'>LD</ulink>=i586-poky-linux-ld --sysroot=/opt/poky/1.8/sysroots/i586-poky-linux
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CFLAGS'>CFLAGS</ulink>=-O2 -pipe -g -feliminate-unused-debug-types
+     <ulink url='&YOCTO_DOCS_REF_URL;#var-CXXFLAGS'>CXXFLAGS</ulink>=-O2 -pipe -g -feliminate-unused-debug-types
+        </literallayout>
+        Now, consider the following three cases:
+        <itemizedlist>
+            <listitem><para><emphasis>Case 1 - No Variables Set in the <filename>Makefile</filename>:</emphasis>
+                Because these variables are not specifically set in the
+                <filename>Makefile</filename>, the variables retain their
+                values based on the environment.
+                </para></listitem>
+            <listitem><para><emphasis>Case 2 - Variables Set in the <filename>Makefile</filename>:</emphasis>
+                Specifically setting variables in the
+                <filename>Makefile</filename> during the build results in the
+                environment settings of the variables being overwritten.
+                </para></listitem>
+            <listitem><para><emphasis>Case 3 - Variables Set when the <filename>Makefile</filename> is Executed from the Command Line:</emphasis>
+                Executing the <filename>Makefile</filename> from the command
+                line results in the variables being overwritten with
+                command-line content regardless of what is being set in the
+                <filename>Makefile</filename>.
+                In this case, environment variables are not considered unless
+                you use the "-e" flag during the build:
+                <literallayout class='monospaced'>
+     $ make -e <replaceable>file</replaceable>
+                </literallayout>
+                If you use this flag, then the environment values of the
+                variables override any variables specifically set in the
+                <filename>Makefile</filename>.
+                </para></listitem>
+        </itemizedlist>
+        <note>
+            For the list of variables set up by the cross-toolchain environment
+            setup script, see the
+            "<link linkend='sdk-running-the-sdk-environment-setup-script'>Running the SDK Environment Setup Script</link>"
+            section.
+        </note>
+    </para>
+</section>
+
+<section id='sdk-developing-applications-using-eclipse'>
+    <title>Developing Applications Using <trademark class='trade'>Eclipse</trademark></title>
+
+    <para>
+        If you are familiar with the popular Eclipse IDE, you can use an
+        Eclipse Yocto Plug-in to allow you to develop, deploy, and test your
+        application all from within Eclipse.
+        This section describes general workflow using the SDK and Eclipse
+        and how to configure and set up Eclipse.
+    </para>
+
+    <section id='workflow-using-eclipse'>
+
+        <title>Workflow Using <trademark class='trade'>Eclipse</trademark></title>
+
+        <para>
+            The following figure and supporting list summarize the application
+            development general workflow that employs both the SDK Eclipse.
+        </para>
+
+        <para>
+            <imagedata fileref="figures/sdk-eclipse-dev-flow.png"
+                width="7in" depth="7in" align="center" scale="100" />
+        </para>
+
+        <para>
+            <orderedlist>
+                <listitem><para><emphasis>Prepare the host system for the Yocto Project</emphasis>:
+                    See
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
+                    and
+                    "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>" sections both
+                    in the Yocto Project Reference Manual for requirements.
+                    In particular, be sure your host system has the
+                    <filename>xterm</filename> package installed.
+                    </para></listitem>
+                <listitem><para><emphasis>Secure the Yocto Project kernel target image</emphasis>:
+                    You must have a target kernel image that has been built using the OpenEmbedded
+                    build system.</para>
+                    <para>Depending on whether the Yocto Project has a pre-built image that matches your target
+                    architecture and where you are going to run the image while you develop your application
+                    (QEMU or real hardware), the area from which you get the image differs.
+                        <itemizedlist>
+                            <listitem><para>Download the image from
+                                <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
+                                if your target architecture is supported and you are going to develop
+                                and test your application on actual hardware.</para></listitem>
+                            <listitem><para>Download the image from
+                                <ulink url='&YOCTO_QEMU_DL_URL;'>
+                                <filename>machines/qemu</filename></ulink> if your target architecture is supported
+                                and you are going to develop and test your application using the QEMU
+                                emulator.</para></listitem>
+                            <listitem><para>Build your image if you cannot find a pre-built image that matches
+                                your target architecture.
+                                If your target architecture is similar to a supported architecture, you can
+                                modify the kernel image before you build it.
+                                See the
+                                "<ulink url='&YOCTO_DOCS_DEV_URL;#patching-the-kernel'>Patching the Kernel</ulink>"
+                                section in the Yocto Project Development
+                                manual for an example.</para></listitem>
+                        </itemizedlist></para>
+                    <para>For information on pre-built kernel image naming schemes for images
+                    that can run on the QEMU emulator, see the
+                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-manual'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>.
+                    </para></listitem>
+                <listitem><para><emphasis>Install the SDK</emphasis>:
+                    The SDK provides a target-specific cross-development toolchain, the root filesystem,
+                    the QEMU emulator, and other tools that can help you develop your application.
+                    For information on how to install the SDK, see the
+                    "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
+                    section.
+                    </para></listitem>
+                <listitem><para><emphasis>Secure the target root filesystem
+                    and the Cross-development toolchain</emphasis>:
+                    You need to find and download the appropriate root filesystem and
+                    the cross-development toolchain.</para>
+                    <para>You can find the tarballs for the root filesystem in the same area used
+                    for the kernel image.
+                    Depending on the type of image you are running, the root filesystem you need differs.
+                    For example, if you are developing an application that runs on an image that
+                    supports Sato, you need to get a root filesystem that supports Sato.</para>
+                    <para>You can find the cross-development toolchains at
+                    <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'><filename>toolchains</filename></ulink>.
+                    Be sure to get the correct toolchain for your development host and your
+                    target architecture.
+                    See the "<link linkend='sdk-locating-pre-built-sdk-installers'>Locating Pre-Built SDK Installers</link>"
+                    section for information and the
+                    "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
+                    section for installation information.
+                    </para></listitem>
+                <listitem><para><emphasis>Create and build your application</emphasis>:
+                    At this point, you need to have source files for your application.
+                    Once you have the files, you can use the Eclipse IDE to import them and build the
+                    project.
+                    If you are not using Eclipse, you need to use the cross-development tools you have
+                    installed to create the image.</para></listitem>
+                <listitem><para><emphasis>Deploy the image with the application</emphasis>:
+                    If you are using the Eclipse IDE, you can deploy your image to the hardware or to
+                    QEMU through the project's preferences.
+                    If you are not using the Eclipse IDE, then you need to deploy the application
+                    to the hardware using other methods.
+                    Or, if you are using QEMU, you need to use that tool and
+                    load your image in for testing.
+                    See the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
+                    chapter in the Yocto Project Development Manual
+                    for information on using QEMU.
+                    </para></listitem>
+                <listitem><para><emphasis>Test and debug the application</emphasis>:
+                    Once your application is deployed, you need to test it.
+                    Within the Eclipse IDE, you can use the debugging environment along with the
+                    set of installed user-space tools to debug your application.
+                    Of course, the same user-space tools are available separately if you choose
+                    not to use the Eclipse IDE.</para></listitem>
+           </orderedlist>
+        </para>
+    </section>
+
+    <section id='adt-eclipse'>
+        <title>Working Within Eclipse</title>
+
+        <para>
+            The Eclipse IDE is a popular development environment and it fully
+            supports development using the Yocto Project.
+            <note>
+                This release of the Yocto Project supports both the Luna
+                and Kepler versions of the Eclipse IDE.
+                Thus, the following information provides setup information for
+                both versions.
+            </note>
+        </para>
+
+        <para>
+            When you install and configure the Eclipse Yocto Project Plug-in
+            into the Eclipse IDE, you maximize your Yocto Project experience.
+            Installing and configuring the Plug-in results in an environment
+            that has extensions specifically designed to let you more easily
+            develop software.
+            These extensions allow for cross-compilation, deployment, and
+            execution of your output into a QEMU emulation session as well as
+            actual target hardware.
+            You can also perform cross-debugging and profiling.
+            The environment also supports a suite of tools that allows you
+            to perform remote profiling, tracing, collection of power data,
+            collection of latency data, and collection of performance data.
+        </para>
+
+        <para>
+            This section describes how to install and configure the Eclipse IDE
+            Yocto Plug-in and how to use it to develop your application.
+        </para>
+
+        <section id='setting-up-the-eclipse-ide'>
+            <title>Setting Up the Eclipse IDE</title>
+
+            <para>
+                To develop within the Eclipse IDE, you need to do the following:
+                <orderedlist>
+                    <listitem><para>Install the optimal version of the Eclipse
+                       IDE.</para></listitem>
+                    <listitem><para>Configure the Eclipse IDE.
+                       </para></listitem>
+                    <listitem><para>Install the Eclipse Yocto Plug-in.
+                       </para></listitem>
+                    <listitem><para>Configure the Eclipse Yocto Plug-in.
+                       </para></listitem>
+                </orderedlist>
+                <note>
+                    Do not install Eclipse from your distribution's package
+                    repository.
+                    Be sure to install Eclipse from the official Eclipse
+                    download site as directed in the next section.
+                </note>
+            </para>
+
+            <section id='installing-eclipse-ide'>
+                <title>Installing the Eclipse IDE</title>
+
+                <para>
+                    It is recommended that you have the Luna SR2 (4.4.2)
+                    version of the Eclipse IDE installed on your development
+                    system.
+                    However, if you currently have the Kepler 4.3.2 version
+                    installed and you do not want to upgrade the IDE, you can
+                    configure Kepler to work with the Yocto Project.
+                </para>
+
+                <para>
+                    If you do not have the Luna SR2 (4.4.2) Eclipse IDE
+                    installed, you can find the tarball at
+                    <ulink url='&ECLIPSE_MAIN_URL;'></ulink>.
+                    From that site, choose the appropriate download from the
+                    "Eclipse IDE for C/C++ Developers".
+                    This version contains the Eclipse Platform, the Java
+                    Development Tools (JDT), and the Plug-in Development
+                    Environment.
+                </para>
+
+                <para>
+                    Once you have downloaded the tarball, extract it into a
+                    clean directory.
+                    For example, the following commands unpack and install the
+                    downloaded Eclipse IDE tarball into a clean directory
+                    using the default name <filename>eclipse</filename>:
+                    <literallayout class='monospaced'>
+     $ cd ~
+     $ tar -xzvf ~/Downloads/eclipse-cpp-luna-SR2-linux-gtk-x86_64.tar.gz
+                    </literallayout>
+                </para>
+            </section>
+
+            <section id='configuring-the-eclipse-ide'>
+                <title>Configuring the Eclipse IDE</title>
+
+                <para>
+                    This section presents the steps needed to configure the
+                    Eclipse IDE.
+                </para>
+
+                <para>
+                    Before installing and configuring the Eclipse Yocto Plug-in,
+                    you need to configure the Eclipse IDE.
+                    Follow these general steps:
+                    <orderedlist>
+                        <listitem><para>Start the Eclipse IDE.</para></listitem>
+                        <listitem><para>Make sure you are in your Workbench and
+                            select "Install New Software" from the "Help"
+                            pull-down menu.</para></listitem>
+                        <listitem><para>Select
+                            <filename>Luna - &ECLIPSE_LUNA_URL;</filename>
+                            from the "Work with:" pull-down menu.
+                            <note>
+                                For Kepler, select
+                                <filename>Kepler - &ECLIPSE_KEPLER_URL;</filename>
+                            </note>
+                            </para></listitem>
+                        <listitem><para>Expand the box next to "Linux Tools"
+                            and select the
+                            <filename>Linux Tools LTTng Tracer Control</filename>,
+                            <filename>Linux Tools LTTng Userspace Analysis</filename>,
+                            and
+                            <filename>LTTng Kernel Analysis</filename> boxes.
+                            If these selections do not appear in the list,
+                            that means the items are already installed.
+                            <note>
+                                For Kepler, select
+                                <filename>LTTng - Linux Tracing Toolkit</filename>
+                                box.
+                            </note>
+                            </para></listitem>
+                        <listitem><para>Expand the box next to "Mobile and
+                            Device Development" and select the following boxes.
+                            Again, if any of the following items are not
+                            available for selection, that means the items are
+                            already installed:
+                            <itemizedlist>
+                                <listitem><para><filename>C/C++ Remote Launch (Requires RSE Remote System Explorer)</filename></para></listitem>
+                                <listitem><para><filename>Remote System Explorer End-user Runtime</filename></para></listitem>
+                                <listitem><para><filename>Remote System Explorer User Actions</filename></para></listitem>
+                                <listitem><para><filename>Target Management Terminal (Core SDK)</filename></para></listitem>
+                                <listitem><para><filename>TCF Remote System Explorer add-in</filename></para></listitem>
+                                <listitem><para><filename>TCF Target Explorer</filename></para></listitem>
+                            </itemizedlist></para></listitem>
+                        <listitem><para>Expand the box next to "Programming
+                            Languages" and select the
+                            <filename>C/C++ Autotools Support</filename>
+                            and <filename>C/C++ Development Tools</filename>
+                            boxes.
+                            For Luna, these items do not appear on the list
+                            as they are already installed.
+                            </para></listitem>
+                        <listitem><para>Complete the installation and restart
+                            the Eclipse IDE.</para></listitem>
+                    </orderedlist>
+                </para>
+            </section>
+
+            <section id='installing-the-eclipse-yocto-plug-in'>
+                <title>Installing or Accessing the Eclipse Yocto Plug-in</title>
+
+                <para>
+                    You can install the Eclipse Yocto Plug-in into the Eclipse
+                    IDE one of two ways:  use the Yocto Project's Eclipse
+                    Update site to install the pre-built plug-in or build and
+                    install the plug-in from the latest source code.
+                </para>
+
+                <section id='new-software'>
+                    <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
+
+                    <para>
+                        To install the Eclipse Yocto Plug-in from the update
+                        site, follow these steps:
+                        <orderedlist>
+                            <listitem><para>Start up the Eclipse IDE.
+                                </para></listitem>
+                            <listitem><para>In Eclipse, select "Install New
+                                Software" from the "Help" menu.
+                                </para></listitem>
+                            <listitem><para>Click "Add..." in the "Work with:"
+                                area.</para></listitem>
+                           <listitem><para>Enter
+                                <filename>&ECLIPSE_DL_PLUGIN_URL;/luna</filename>
+                                in the URL field and provide a meaningful name
+                                in the "Name" field.
+                                <note>
+                                    If you are using Kepler, use
+                                    <filename>&ECLIPSE_DL_PLUGIN_URL;/kepler</filename>
+                                    in the URL field.
+                                </note></para></listitem>
+                            <listitem><para>Click "OK" to have the entry added
+                                to the "Work with:" drop-down list.
+                                </para></listitem>
+                            <listitem><para>Select the entry for the plug-in
+                                from the "Work with:" drop-down list.
+                                </para></listitem>
+                            <listitem><para>Check the boxes next to
+                                <filename>Yocto Project ADT Plug-in</filename>,
+                                <filename>Yocto Project Bitbake Commander Plug-in</filename>,
+                                and
+                                <filename>Yocto Project Documentation plug-in</filename>.
+                                </para></listitem>
+                            <listitem><para>Complete the remaining software
+                                installation steps and then restart the Eclipse
+                                IDE to finish the installation of the plug-in.
+                                <note>
+                                    You can click "OK" when prompted about
+                                    installing software that contains unsigned
+                                    content.
+                                </note>
+                                </para></listitem>
+                        </orderedlist>
+                    </para>
+                </section>
+
+               <section id='zip-file-method'>
+                   <title>Installing the Plug-in Using the Latest Source Code</title>
+
+                   <para>
+                        To install the Eclipse Yocto Plug-in from the latest
+                        source code, follow these steps:
+                        <orderedlist>
+                            <listitem><para>Be sure your development system
+                                is not using OpenJDK to build the plug-in
+                                by doing the following:
+                                <orderedlist>
+                                    <listitem><para>Use the Oracle JDK.
+                                        If you don't have that, go to
+                                        <ulink url='http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html'></ulink>
+                                        and download the latest appropriate
+                                        Java SE Development Kit tarball for
+                                        your development system and
+                                        extract it into your home directory.
+                                        </para></listitem>
+                                    <listitem><para>In the shell you are going
+                                        to do your work, export the location of
+                                        the Oracle Java.
+                                        The previous step creates a new folder
+                                        for the extracted software.
+                                        You need to use the following
+                                        <filename>export</filename> command
+                                        and provide the specific location:
+                                        <literallayout class='monospaced'>
+     export PATH=~/<replaceable>extracted_jdk_location</replaceable>/bin:$PATH
+                                        </literallayout>
+                                        </para></listitem>
+                                </orderedlist>
+                                </para></listitem>
+                            <listitem><para>In the same shell, create a Git
+                                repository with:
+                                <literallayout class='monospaced'>
+     $ cd ~
+     $ git clone git://git.yoctoproject.org/eclipse-poky
+                                </literallayout>
+                                </para></listitem>
+                            <listitem><para>Be sure to checkout the correct
+                                tag.
+                                For example, if you are using Luna, do the
+                                following:
+                                <literallayout class='monospaced'>
+     $ git checkout luna/yocto-&DISTRO;
+                                </literallayout>
+                                This puts you in a detached HEAD state, which
+                                is fine since you are only going to be building
+                                and not developing.
+                                <note>
+                                    If you are building kepler, checkout the
+                                    <filename>kepler/yocto-&DISTRO;</filename>
+                                    branch.
+                                </note>
+                                </para></listitem>
+                            <listitem><para>Change to the
+                                <filename>scripts</filename>
+                                directory within the Git repository:
+                                <literallayout class='monospaced'>
+     $ cd scripts
+                                </literallayout>
+                                </para></listitem>
+                            <listitem><para>Set up the local build environment
+                                by running the setup script:
+                                <literallayout class='monospaced'>
+     $ ./setup.sh
+                                </literallayout>
+                                </para></listitem>
+                            <listitem><para>When the script finishes execution,
+                                it prompts you with instructions on how to run
+                                the <filename>build.sh</filename> script, which
+                                is also in the <filename>scripts</filename>
+                                directory of the Git repository created
+                                earlier.
+                                </para></listitem>
+                            <listitem><para>Run the <filename>build.sh</filename>
+                                script as directed.
+                                Be sure to provide the tag name, documentation
+                                branch, and a release name.
+                                Here is an example that uses the
+                                <filename>luna/yocto-&DISTRO;</filename> tag, the
+                                <filename>master</filename> documentation
+                                branch, and
+                                <filename>&DISTRO_NAME_NO_CAP;</filename> for the
+                                release name:
+                                <literallayout class='monospaced'>
+     $ ECLIPSE_HOME=/home/scottrif/eclipse-poky/scripts/eclipse ./build.sh luna/yocto-&DISTRO; master &DISTRO_NAME_NO_CAP; 2>&amp;1 | tee -a build.log
+                                </literallayout>
+                                After running the script, the file
+                                <filename>org.yocto.sdk-</filename><replaceable>release</replaceable><filename>-</filename><replaceable>date</replaceable><filename>-archive.zip</filename>
+                                is in the current directory.
+                                </para></listitem>
+                            <listitem><para>If necessary, start the Eclipse IDE
+                                and be sure you are in the Workbench.
+                                </para></listitem>
+                            <listitem><para>Select "Install New Software" from
+                                the "Help" pull-down menu.
+                                </para></listitem>
+                            <listitem><para>Click "Add".</para></listitem>
+                            <listitem><para>Provide anything you want in the
+                                "Name" field.
+                                </para></listitem>
+                            <listitem><para>Click "Archive" and browse to the
+                                ZIP file you built in step eight.
+                                This ZIP file should not be "unzipped", and must
+                                be the <filename>*archive.zip</filename> file
+                                created by running the
+                                <filename>build.sh</filename> script.
+                                </para></listitem>
+                            <listitem><para>Click the "OK" button.
+                                </para></listitem>
+                            <listitem><para>Check the boxes that appear in
+                                the installation window to install the
+                                <filename>Yocto Project ADT Plug-in</filename>,
+                                <filename>Yocto Project Bitbake Commander Plug-in</filename>,
+                                and the
+                                <filename>Yocto Project Documentation plug-in</filename>.
+                                </para></listitem>
+                            <listitem><para>Finish the installation by clicking
+                                through the appropriate buttons.
+                                You can click "OK" when prompted about
+                                installing software that contains unsigned
+                                content.
+                                </para></listitem>
+                            <listitem><para>Restart the Eclipse IDE if
+                                necessary.
+                                </para></listitem>
+                        </orderedlist>
+                    </para>
+
+                    <para>
+                        At this point you should be able to configure the
+                        Eclipse Yocto Plug-in as described in the
+                        "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>"
+                        section.</para>
+                </section>
+            </section>
+
+            <section id='configuring-the-eclipse-yocto-plug-in'>
+                <title>Configuring the Eclipse Yocto Plug-in</title>
+
+                <para>
+                    Configuring the Eclipse Yocto Plug-in involves setting the
+                    Cross Compiler options and the Target options.
+                    The configurations you choose become the default settings
+                    for all projects.
+                    You do have opportunities to change them later when
+                    you configure the project (see the following section).
+                </para>
+
+                <para>
+                    To start, you need to do the following from within the
+                    Eclipse IDE:
+                    <itemizedlist>
+                        <listitem><para>Choose "Preferences" from the
+                            "Window" menu to display the Preferences Dialog.
+                            </para></listitem>
+                        <listitem><para>Click "Yocto Project ADT" to display
+                            the configuration screen.
+                            </para></listitem>
+                    </itemizedlist>
+                </para>
+
+                <section id='configuring-the-cross-compiler-options'>
+                    <title>Configuring the Cross-Compiler Options</title>
+
+                    <para>
+                        To configure the Cross Compiler Options, you must select
+                        the type of toolchain, point to the toolchain, specify
+                        the sysroot location, and select the target
+                        architecture.
+                        <itemizedlist>
+                            <listitem><para><emphasis>Selecting the Toolchain Type:</emphasis>
+                                Choose between
+                                <filename>Standalone pre-built toolchain</filename>
+                                and
+                                <filename>Build system derived toolchain</filename>
+                                for Cross Compiler Options.
+                                    <itemizedlist>
+                                        <listitem><para><emphasis>
+                                            <filename>Standalone Pre-built Toolchain:</filename></emphasis>
+                                            Select this mode when you are using
+                                            a stand-alone cross-toolchain.
+                                            For example, suppose you are an
+                                            application developer and do not
+                                            need to build a target image.
+                                            Instead, you just want to use an
+                                            architecture-specific toolchain on
+                                            an existing kernel and target root
+                                            filesystem.</para></listitem>
+                                       <listitem><para><emphasis>
+                                            <filename>Build System Derived Toolchain:</filename></emphasis>
+                                            Select this mode if the
+                                            cross-toolchain has been installed
+                                            and built as part of the
+                                            <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+                                            When you select
+                                            <filename>Build system derived toolchain</filename>,
+                                            you are using the toolchain bundled
+                                            inside the Build Directory.
+                                            </para></listitem>
+                                    </itemizedlist>
+                                </para></listitem>
+                            <listitem><para><emphasis>Point to the Toolchain:</emphasis>
+                                If you are using a stand-alone pre-built
+                                toolchain, you should be pointing to where it is
+                                installed.
+                                See the
+                                "<link linkend='sdk-installing-the-sdk'>Installing the SDK</link>"
+                                section for information about how the SDK is
+                                installed.</para>
+                                <para>If you are using a system-derived
+                                toolchain, the path you provide for the
+                                <filename>Toolchain Root Location</filename>
+                                field is the
+                                <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
+                                See the
+                                "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
+                                section.</para></listitem>
+                            <listitem><para><emphasis>Specify the Sysroot Location:</emphasis>
+                                This location is where the root filesystem for
+                                the target hardware resides.
+                                </para>
+                                <para>The location of
+                                the sysroot filesystem depends on where you
+                                separately extracted and installed the
+                                filesystem.</para>
+                                <para>For information on how to install the
+                                toolchain and on how to extract and install the
+                                sysroot filesystem, see the
+                                "<link linkend='sdk-building-an-sdk-installer'>Building an SDK Installer</link>"
+                                section.
+                                </para></listitem>
+                            <listitem><para><emphasis>Select the Target Architecture:</emphasis>
+                                The target architecture is the type of hardware
+                                you are going to use or emulate.
+                                Use the pull-down
+                                <filename>Target Architecture</filename> menu
+                                to make your selection.
+                                The pull-down menu should have the supported
+                                architectures.
+                                If the architecture you need is not listed in
+                                the menu, you will need to build the image.
+                                See the
+                                "<ulink url='&YOCTO_DOCS_QS_URL;#qs-building-images'>Building Images</ulink>"
+                                section of the Yocto Project Quick Start for
+                                more information.</para></listitem>
+                        </itemizedlist>
+                    </para>
+                </section>
+
+                <section id='configuring-the-target-options'>
+                    <title>Configuring the Target Options</title>
+
+                    <para>
+                        You can choose to emulate hardware using the QEMU
+                        emulator, or you can choose to run your image on actual
+                        hardware.
+                        <itemizedlist>
+                            <listitem><para><emphasis>QEMU:</emphasis>
+                                Select this option if you will be using the
+                                QEMU emulator.
+                                If you are using the emulator, you also need to
+                                locate the kernel and specify any custom
+                                options.</para>
+                                <para>If you selected
+                                <filename>Build system derived toolchain</filename>,
+                                the target kernel you built will be located in
+                                the Build Directory in
+                                <filename>tmp/deploy/images/<replaceable>machine</replaceable></filename>
+                                directory.
+                                If you selected
+                                <filename>Standalone pre-built toolchain</filename>,
+                                the pre-built image you downloaded is located
+                                in the directory you specified when you
+                                downloaded the image.</para>
+                                <para>Most custom options are for advanced QEMU
+                                users to further customize their QEMU instance.
+                                These options are specified between paired
+                                angled brackets.
+                                Some options must be specified outside the
+                                brackets.
+                                In particular, the options
+                                <filename>serial</filename>,
+                                <filename>nographic</filename>, and
+                                <filename>kvm</filename> must all be outside the
+                                brackets.
+                                Use the <filename>man qemu</filename> command
+                                to get help on all the options and their use.
+                                The following is an example:
+                               <literallayout class='monospaced'>
+    serial ‘&lt;-m 256 -full-screen&gt;’
+                                </literallayout></para>
+                                <para>
+                                Regardless of the mode, Sysroot is already
+                                defined as part of the Cross-Compiler Options
+                                configuration in the
+                                <filename>Sysroot Location:</filename> field.
+                                </para></listitem>
+                            <listitem><para><emphasis>External HW:</emphasis>
+                                Select this option if you will be using actual
+                                hardware.</para></listitem>
+                        </itemizedlist>
+                    </para>
+
+                    <para>
+                        Click the "OK" to save your plug-in configurations.
+                    </para>
+                </section>
+            </section>
+        </section>
+
+        <section id='creating-the-project'>
+            <title>Creating the Project</title>
+
+            <para>
+                You can create two types of projects:  Autotools-based, or
+                Makefile-based.
+                This section describes how to create Autotools-based projects
+                from within the Eclipse IDE.
+                For information on creating Makefile-based projects in a
+                terminal window, see the
+                "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
+                section.
+                <note>
+                    Do not use special characters in project names
+                    (e.g. spaces, underscores, etc.).  Doing so can
+                    cause configuration to fail.
+                </note>
+            </para>
+
+            <para>
+                To create a project based on a Yocto template and then display
+                the source code, follow these steps:
+                <orderedlist>
+                    <listitem><para>Select "Project" from the "File -> New" menu.
+                        </para></listitem>
+                    <listitem><para>Double click <filename>CC++</filename>.
+                        </para></listitem>
+                    <listitem><para>Double click <filename>C Project</filename>
+                        to create the project.</para></listitem>
+                    <listitem><para>Expand <filename>Yocto Project ADT Autotools Project</filename>.
+                        </para></listitem>
+                    <listitem><para>Select <filename>Hello World ANSI C Autotools Project</filename>.
+                        This is an Autotools-based project based on a Yocto
+                        template.</para></listitem>
+                    <listitem><para>Put a name in the <filename>Project name:</filename>
+                        field.
+                        Do not use hyphens as part of the name.
+                        </para></listitem>
+                    <listitem><para>Click "Next".</para></listitem>
+                    <listitem><para>Add information in the
+                        <filename>Author</filename> and
+                        <filename>Copyright notice</filename> fields.
+                        </para></listitem>
+                    <listitem><para>Be sure the <filename>License</filename>
+                        field is correct.</para></listitem>
+                    <listitem><para>Click "Finish".</para></listitem>
+                    <listitem><para>If the "open perspective" prompt appears,
+                        click "Yes" so that you in the C/C++ perspective.
+                        </para></listitem>
+                    <listitem><para>The left-hand navigation pane shows your
+                        project.
+                        You can display your source by double clicking the
+                        project's source file.</para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+
+        <section id='configuring-the-cross-toolchains'>
+            <title>Configuring the Cross-Toolchains</title>
+
+            <para>
+                The earlier section,
+                "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>",
+                sets up the default project configurations.
+                You can override these settings for a given project by following
+                these steps:
+                <orderedlist>
+                    <listitem><para>Select "Change Yocto Project Settings" from
+                        the "Project" menu.
+                        This selection brings up the Yocto Project Settings
+                        Dialog and allows you to make changes specific to an
+                        individual project.</para>
+                        <para>By default, the Cross Compiler Options and Target
+                        Options for a project are inherited from settings you
+                        provided using the Preferences Dialog as described
+                        earlier in the
+                        "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>" section.
+                        The Yocto Project Settings Dialog allows you to override
+                        those default settings for a given project.
+                        </para></listitem>
+                    <listitem><para>Make your configurations for the project
+                        and click "OK".
+                        </para></listitem>
+                    <listitem><para>Right-click in the navigation pane and
+                        select "Reconfigure Project" from the pop-up menu.
+                        This selection reconfigures the project by running
+                        <filename>autogen.sh</filename> in the workspace for
+                        your project.
+                        The script also runs <filename>libtoolize</filename>,
+                        <filename>aclocal</filename>,
+                        <filename>autoconf</filename>,
+                        <filename>autoheader</filename>,
+                        <filename>automake --a</filename>, and
+                        <filename>./configure</filename>.
+                        Click on the "Console" tab beneath your source code to
+                        see the results of reconfiguring your project.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+
+        <section id='building-the-project'>
+            <title>Building the Project</title>
+
+            <para>
+                To build the project select "Build Project" from the
+                "Project" menu.
+                The console should update and you can note the cross-compiler
+                you are using.
+                <note>
+                    When building "Yocto Project ADT Autotools" projects, the Eclipse
+                    IDE might display error messages for Functions/Symbols/Types
+                    that cannot be "resolved", even when the related include file
+                    is listed at the project navigator and when the project is
+                    able to build.
+                    For these cases only, it is recommended to add a new linked
+                    folder to the appropriate sysroot.
+                    Use these steps to add the linked folder:
+                    <orderedlist>
+                        <listitem><para>
+                            Select the project.
+                            </para></listitem>
+                        <listitem><para>
+                            Select "Folder" from the
+                            <filename>File > New</filename> menu.
+                            </para></listitem>
+                        <listitem><para>
+                            In the "New Folder" Dialog, select "Link to alternate
+                            location (linked folder)".
+                            </para></listitem>
+                        <listitem><para>
+                            Click "Browse" to navigate to the include folder inside
+                            the same sysroot location selected in the Yocto Project
+                            configuration preferences.
+                            </para></listitem>
+                        <listitem><para>
+                            Click "OK".
+                            </para></listitem>
+                        <listitem><para>
+                            Click "Finish" to save the linked folder.
+                            </para></listitem>
+                    </orderedlist>
+                </note>
+            </para>
+        </section>
+
+        <section id='starting-qemu-in-user-space-nfs-mode'>
+            <title>Starting QEMU in User-Space NFS Mode</title>
+
+            <para>
+                To start the QEMU emulator from within Eclipse, follow these
+                steps:
+                <note>
+                    See the
+                    "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-qemu'>Using the Quick EMUlator (QEMU)</ulink>"
+                    chapter in the Yocto Project Development Manual
+                    for more information on using QEMU.
+                </note>
+                <orderedlist>
+                    <listitem><para>Expose and select "External Tools" from
+                        the "Run" menu.
+                        Your image should appear as a selectable menu item.
+                        </para></listitem>
+                    <listitem><para>Select your image from the menu to launch
+                        the emulator in a new window.
+                        </para></listitem>
+                    <listitem><para>If needed, enter your host root password in
+                        the shell window at the prompt.
+                        This sets up a <filename>Tap 0</filename> connection
+                        needed for running in user-space NFS mode.
+                        </para></listitem>
+                    <listitem><para>Wait for QEMU to launch.</para></listitem>
+                    <listitem><para>Once QEMU launches, you can begin operating
+                        within that environment.
+                        One useful task at this point would be to determine the
+                        IP Address for the user-space NFS by using the
+                       <filename>ifconfig</filename> command.
+                       </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+
+        <section id='deploying-and-debugging-the-application'>
+            <title>Deploying and Debugging the Application</title>
+
+            <para>
+                Once the QEMU emulator is running the image, you can deploy
+                your application using the Eclipse IDE and then use
+                the emulator to perform debugging.
+                Follow these steps to deploy the application.
+                <note>
+                    Currently, Eclipse does not support SSH port forwarding.
+                    Consequently, if you need to run or debug a remote
+                    application using the host display, you must create a
+                    tunneling connection from outside Eclipse and keep
+                    that connection alive during your work.
+                    For example, in a new terminal, run the following:
+                    <literallayout class='monospaced'>
+     ssh -XY user_name@remote_host_ip
+                    </literallayout>
+                    After running the command, add the command to be executed
+                    in Eclipse's run configuration before the application
+                    as follows:
+                    <literallayout class='monospaced'>
+     export DISPLAY=:10.0
+                    </literallayout>
+                </note>
+                <orderedlist>
+                    <listitem><para>Select "Debug Configurations..." from the
+                        "Run" menu.</para></listitem>
+                    <listitem><para>In the left area, expand
+                        <filename>C/C++Remote Application</filename>.
+                        </para></listitem>
+                    <listitem><para>Locate your project and select it to bring
+                        up a new tabbed view in the Debug Configurations Dialog.
+                        </para></listitem>
+                    <listitem><para>Enter the absolute path into which you want
+                        to deploy the application.
+                        Use the "Remote Absolute File Path for
+                        C/C++Application:" field.
+                        For example, enter
+                        <filename>/usr/bin/<replaceable>programname</replaceable></filename>.
+                        </para></listitem>
+                    <listitem><para>Click on the "Debugger" tab to see the
+                        cross-tool debugger you are using.</para></listitem>
+                    <listitem><para>Click on the "Main" tab.</para></listitem>
+                    <listitem><para>Create a new connection to the QEMU instance
+                        by clicking on "new".</para></listitem>
+                    <listitem><para>Select <filename>TCF</filename>, which means
+                        Target Communication Framework.</para></listitem>
+                    <listitem><para>Click "Next".</para></listitem>
+                    <listitem><para>Clear out the "host name" field and enter
+                        the IP Address determined earlier.</para></listitem>
+                    <listitem><para>Click "Finish" to close the
+                        New Connections Dialog.</para></listitem>
+                    <listitem><para>Use the drop-down menu now in the
+                        "Connection" field and pick the IP Address you entered.
+                         </para></listitem>
+                    <listitem><para>Click "Debug" to bring up a login screen
+                        and login.</para></listitem>
+                    <listitem><para>Accept the debug perspective.
+                        </para></listitem>
+                </orderedlist>
+            </para>
+        </section>
+
+        <section id='running-user-space-tools'>
+            <title>Running User-Space Tools</title>
+
+            <para>
+                As mentioned earlier in the manual, several tools exist that
+                enhance your development experience.
+                These tools are aids in developing and debugging applications
+                and images.
+                You can run these user-space tools from within the Eclipse
+                IDE through the "YoctoProjectTools" menu.
+            </para>
+
+            <para>
+                Once you pick a tool, you need to configure it for the remote
+                target.
+                Every tool needs to have the connection configured.
+                You must select an existing TCF-based RSE connection to the
+                remote target.
+                If one does not exist, click "New" to create one.
+            </para>
+
+            <para>
+                Here are some specifics about the remote tools:
+                <itemizedlist>
+                    <listitem><para><emphasis><filename>Lttng2.0 trace import</filename>:</emphasis>
+                        Selecting this tool transfers the remote target's
+                        <filename>Lttng</filename> tracing data back to the
+                        local host machine and uses the Lttng Eclipse plug-in
+                        to graphically display the output.
+                        For information on how to use Lttng to trace an
+                        application,
+                        see <ulink url='http://lttng.org/documentation'></ulink>
+                        and the
+                        "<ulink url='&YOCTO_DOCS_PROF_URL;#lttng-linux-trace-toolkit-next-generation'>LTTng (Linux Trace Toolkit, next generation)</ulink>"
+                        section, which is in the Yocto Project Profiling and
+                        Tracing Manual.
+                        <note>Do not use
+                            <filename>Lttng-user space (legacy)</filename> tool.
+                            This tool no longer has any upstream support.</note>
+                        </para>
+                        <para>Before you use the
+                        <filename>Lttng2.0 trace import</filename> tool,
+                        you need to setup the Lttng Eclipse plug-in and create a
+                        Tracing project.
+                        Do the following:
+                        <orderedlist>
+                            <listitem><para>Select "Open Perspective" from the
+                                "Window" menu and then select "Other..." to
+                                bring up a menu of other perspectives.
+                                Choose "Tracing".
+                                </para></listitem>
+                            <listitem><para>Click "OK" to change the Eclipse
+                                perspective into the Tracing perspective.
+                                </para></listitem>
+                            <listitem><para>Create a new Tracing project by
+                                selecting "Project" from the "File -> New" menu.
+                                </para></listitem>
+                            <listitem><para>Choose "Tracing Project" from the
+                                "Tracing" menu and click "Next".
+                                </para></listitem>
+                            <listitem><para>Provide a name for your tracing
+                                project and click "Finish".
+                                </para></listitem>
+                            <listitem><para>Generate your tracing data on the
+                                remote target.</para></listitem>
+                            <listitem><para>Select "Lttng2.0 trace import"
+                                from the "Yocto Project Tools" menu to
+                                start the data import process.</para></listitem>
+                            <listitem><para>Specify your remote connection name.
+                                </para></listitem>
+                            <listitem><para>For the Ust directory path, specify
+                                the location of your remote tracing data.
+                                Make sure the location ends with
+                                <filename>ust</filename> (e.g.
+                                <filename>/usr/mysession/ust</filename>).
+                                </para></listitem>
+                            <listitem><para>Click "OK" to complete the import
+                                process.
+                                The data is now in the local tracing project
+                                you created.</para></listitem>
+                            <listitem><para>Right click on the data and then use
+                                the menu to Select "Generic CTF Trace" from the
+                                "Trace Type... -> Common Trace Format" menu to
+                                map the tracing type.</para></listitem>
+                            <listitem><para>Right click the mouse and select
+                                "Open" to bring up the Eclipse Lttng Trace
+                                Viewer so you view the tracing data.
+                                </para></listitem>
+                        </orderedlist></para></listitem>
+                    <listitem><para><emphasis><filename>PowerTOP</filename>:</emphasis>
+                        Selecting this tool runs PowerTOP on the remote target
+                        machine and displays the results in a new view called
+                        PowerTOP.</para>
+                        <para>The "Time to gather data(sec):" field is the time
+                        passed in seconds before data is gathered from the
+                        remote target for analysis.</para>
+                        <para>The "show pids in wakeups list:" field corresponds
+                        to the <filename>-p</filename> argument passed to
+                        <filename>PowerTOP</filename>.</para></listitem>
+                    <listitem><para><emphasis><filename>LatencyTOP and Perf</filename>:</emphasis>
+                        LatencyTOP identifies system latency, while
+                        Perf monitors the system's performance counter
+                        registers.
+                        Selecting either of these tools causes an RSE terminal
+                        view to appear from which you can run the tools.
+                        Both tools refresh the entire screen to display results
+                        while they run.
+                        For more information on setting up and using
+                        <filename>perf</filename>, see the
+                        "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-perf'>perf</ulink>"
+                        section in the Yocto Project Profiling and Tracing
+                        Manual.
+                        </para></listitem>
+                    <listitem><para><emphasis><filename>SystemTap</filename>:</emphasis>
+                        Systemtap is a tool that lets you create and reuse
+                        scripts to examine the activities of a live Linux
+                        system.
+                        You can easily extract, filter, and summarize data
+                        that helps you diagnose complex performance or
+                        functional problems.
+                        For more information on setting up and using
+                        <filename>SystemTap</filename>, see the
+                        <ulink url='https://sourceware.org/systemtap/documentation.html'>SystemTap Documentation</ulink>.
+                        </para></listitem>
+                    <listitem><para><emphasis><filename>yocto-bsp</filename>:</emphasis>
+                        The <filename>yocto-bsp</filename> tool lets you
+                        quickly set up a Board Support Package (BSP) layer.
+                        The tool requires a Metadata location, build location,
+                        BSP name, BSP output location, and a kernel
+                        architecture.
+                        For more information on the
+                        <filename>yocto-bsp</filename> tool outside of Eclipse,
+                        see the
+                        "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a new BSP Layer Using the yocto-bsp Script</ulink>"
+                        section in the Yocto Project Board Support Package
+                        (BSP) Developer's Guide.
+                        </para></listitem>
+                </itemizedlist>
+            </para>
+        </section>
+    </section>
+</section>
+
+</chapter>
+<!--
+vim: expandtab tw=80 ts=4
+-->
diff --git a/yocto-poky/documentation/toaster-manual/figures/compatible-layers.png b/yocto-poky/documentation/toaster-manual/figures/compatible-layers.png
new file mode 100644
index 0000000..38436b0
--- /dev/null
+++ b/yocto-poky/documentation/toaster-manual/figures/compatible-layers.png
Binary files differ
diff --git a/yocto-poky/documentation/toaster-manual/figures/import-layer.png b/yocto-poky/documentation/toaster-manual/figures/import-layer.png
new file mode 100644
index 0000000..436ec7a
--- /dev/null
+++ b/yocto-poky/documentation/toaster-manual/figures/import-layer.png
Binary files differ
diff --git a/yocto-poky/documentation/toaster-manual/figures/new-project.png b/yocto-poky/documentation/toaster-manual/figures/new-project.png
new file mode 100644
index 0000000..dbc50b9
--- /dev/null
+++ b/yocto-poky/documentation/toaster-manual/figures/new-project.png
Binary files differ
diff --git a/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml b/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml
index 9f4c38b..ee1dcba 100644
--- a/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml
+++ b/yocto-poky/documentation/toaster-manual/toaster-manual-intro.xml
@@ -14,89 +14,25 @@
         remote build servers.
     </para>
 
-    <note>
-        <para>
-            This release of Toaster does allow you to configure and initiate
-            builds.
-            However, you cannot use Toaster to customize image recipes, which
-            still must either be done by hand or through
-            <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>.
-            As Toaster matures, it eventually will equal and surpass Hob
-            functionality, at which time Hob will be deprecated.
-        </para>
+    <section id='intro-features'>
+        <title>Toaster Features</title>
 
         <para>
-            For more information on Hob,
-            see the
-            "<ulink url='&YOCTO_DOCS_DEV_URL;#image-development-using-hob'>Image Development Using Hob</ulink>"
-           section in the Yocto Project Development Manual.
-        </para>
-    </note>
-
-    <section id='intro-modes'>
-        <title>Toaster Operational Modes</title>
-
-        <para>
-            You can use Toaster in Analysis Mode or Build Mode:
+            Toaster allows you to configure and run builds, and it
+            provides extensive information about the build process.
             <itemizedlist>
-                <listitem><para id='toaster-analysis-mode'><emphasis>Analysis Mode:</emphasis>
-                    In Analysis Mode, you can record builds and statistics.
-                    In this Mode, you directly access the
-                    <filename>bitbake</filename> command, which you then use to
-                    build images.</para>
-                    <para>Analysis Mode requires you to have first started
-                    Toaster and then to initiate your build using the
-                    <filename>bitbake</filename> command from the shell.
-                    Toaster must be started before the build or it will not
-                    collect build data.</para>
-                    <para>Toaster has the following capabilities in
-                    Analysis Mode:
-                    <itemizedlist>
-                        <listitem><para>
-                            See what was built (recipes and packages) and what
-                            packages were installed into your final image.
-                            </para></listitem>
-                        <listitem><para>
-                            Browse the directory structure of your image.
-                            </para></listitem>
-                        <listitem><para>
-                            See the value of all variables in your build
-                            configuration, and which files set each value.
-                            </para></listitem>
-                        <listitem><para>
-                            Examine error, warning and trace messages to aid
-                            in debugging.
-                            </para></listitem>
-                        <listitem><para>
-                            See information about the BitBake tasks executed
-                            and reused during your build, including those that
-                            used shared state.
-                            </para></listitem>
-                        <listitem><para>
-                            See dependency relationships between recipes,
-                            packages and tasks
-                            </para></listitem>
-                        <listitem><para>
-                            See performance information such as build time,
-                            task time, CPU usage, and disk I/O.
-                            </para></listitem>
-                    </itemizedlist>
-                    </para></listitem>
-                <listitem><para id='toaster-build-mode'><emphasis>Build Mode:</emphasis>
-                    In Build Mode, Toaster handles the build configuration,
-                    scheduling and execution.
-                    In this mode, all your interaction with the build system
-                    happens through the web interface.
-                    You do not have direct access to the
-                    <filename>bitbake</filename> command.</para>
-                    <para>Using this mode, you configure and start your builds
-                    within Toaster's GUI.
-                    Each project can be configured for a specific version
-                    of the build system.
-                    As shipped, Toaster supports Yocto Project Releases 1.7 and
-                    beyond.</para>
-                    <para>Toaster has all the same capabilities in Build Mode
-                    as it does in Analysis Mode plus the following:
+                <listitem><para id='toaster-build-features'>
+                    <emphasis>Configure and Run Builds:</emphasis>
+                    You can use the Toaster web interface to configure and
+                    start your builds.
+                    Builds started using the Toaster web interface are
+                    organized into projects.
+                    When you create a project, you are asked to select a
+                    release, or version of the build system you want to
+                    use for the project builds.
+                    As shipped, Toaster supports Yocto Project releases 1.8
+                    and beyond.
+                    With the Toaster web interface, you can:
                     <itemizedlist>
                         <listitem><para>
                             Browse layers listed in the various
@@ -106,6 +42,10 @@
                             <ulink url='http://layers.openembedded.org/layerindex/'></ulink>).
                             </para></listitem>
                         <listitem><para>
+                            Browse images, recipes, and machines provided by
+                            those layers.
+                            </para></listitem>
+                        <listitem><para>
                             Import your own layers for building.
                             </para></listitem>
                         <listitem><para>
@@ -121,6 +61,53 @@
                             Start your builds.
                             </para></listitem>
                     </itemizedlist>
+                    Toaster also allows you to configure and run your builds
+                    from the command line, and switch between the command line and
+                    the web interface at any time.
+                    Builds started from  the command line appear within a special
+                    Toaster project called "Command line builds".
+                    </para></listitem>
+                <listitem><para id='toaster-analysis-features'>
+                    <emphasis>Information About the Build Process:</emphasis>
+                    Toaster also records extensive information about your builds.
+                    Toaster collects data for builds you start from the web
+                    interface and from the command line as long as Toaster
+                    is running.
+                    <note>
+                        You must start Toaster before the build or it will not
+                        collect build data.
+                    </note></para>
+                    <para>With Toaster you can:
+                    <itemizedlist>
+                        <listitem><para>
+                            See what was built (recipes and packages) and what
+                            packages were installed into your final image.
+                            </para></listitem>
+                        <listitem><para>
+                            Browse the directory structure of your image.
+                            </para></listitem>
+                        <listitem><para>
+                            See the value of all variables in your build
+                            configuration, and which files set each value.
+                            </para></listitem>
+                        <listitem><para>
+                            Examine error, warning, and trace messages to aid
+                            in debugging.
+                            </para></listitem>
+                        <listitem><para>
+                            See information about the BitBake tasks executed
+                            and reused during your build, including those that
+                            used shared state.
+                            </para></listitem>
+                        <listitem><para>
+                            See dependency relationships between recipes,
+                            packages, and tasks.
+                            </para></listitem>
+                        <listitem><para>
+                            See performance information such as build time,
+                            task time, CPU usage, and disk I/O.
+                            </para></listitem>
+                    </itemizedlist>
                     </para></listitem>
             </itemizedlist>
         </para>
@@ -132,8 +119,6 @@
         <para>
             You can set Toaster up to run as a local instance or as a shared
             hosted service.
-            Regardless of how you set up Toaster, both Analysis and Build
-            Modes are available.
         </para>
 
         <para>
diff --git a/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml b/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml
index faca4ca..3a46b61 100644
--- a/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml
+++ b/yocto-poky/documentation/toaster-manual/toaster-manual-reference.xml
@@ -159,25 +159,24 @@
                     </para>
 
                     <para>
-                        When you set up Toaster in Build Mode, you are prompted
-                        to select a Toaster configuration file.
+                        The Toaster startup script in
+                        <filename>/bitbake/bin/toaster</filename> specifies
+                        the location of a Toaster configuration file
+                        <filename>toasterconf.json</filename> as the value of
+                        the <filename>TOASTER_CONF</filename> variable.
                         This configuration file is used to set up the initial
                         configuration values within the Toaster database
                         including the layer sources.
-                        Three versions of the configuration file exist:
+                        Two versions of the configuration file exist:
                         <itemizedlist>
                             <listitem><para>
                                 The first version of the file is found in the
                                 <filename>conf</filename> directory of the
-                                <filename>meta-yocto</filename> layer
+                                <filename>meta-poky</filename> layer
                                 (i.e.
-                                <filename>meta-yocto/conf/toasterconf.json</filename>).
+                                <filename>meta-poky/conf/toasterconf.json</filename>).
                                 This version contains the default Yocto Project
                                 configuration for Toaster.
-                                You are prompted to select this file during the
-                                Toaster set up process if you had cloned the
-                                <filename>poky</filename> repository (i.e.
-                                <filename>git://git.yoctoproject.org/poky</filename>).
                                 </para></listitem>
                             <listitem><para>
                                 The second version of the file is in the
@@ -186,19 +185,6 @@
                                 (i.e. <filename>meta/conf/toasterconf.json</filename>).
                                 This version contains the default OpenEmbedded
                                 configuration for Toaster.
-                                You are prompted to select this file during the
-                                Toaster set up process if you had cloned the
-                                <filename>openembedded-core</filename> repository
-                                (i.e.
-                                <filename>git://git.openembedded.org/openembedded-core</filename>).
-                                </para></listitem>
-                            <listitem><para>
-                                The third version is a sample configuration
-                                useful for when you want to set up a hosted
-                                service in Build Mode.
-                                You can find this version on the
-                                <ulink url='https://wiki.yoctoproject.org/wiki/File:Toasterconf.json.txt.patch'>File:Toasterconf.json.txt.patch</ulink>
-                                wiki page.
                                 </para></listitem>
                         </itemizedlist>
                     </para>
@@ -228,10 +214,10 @@
                     "dirpath": "meta"
                 },
                 {
-                    "name": "meta-yocto",
-                    "local_path": "meta-yocto",
+                    "name": "meta-poky",
+                    "local_path": "meta-poky",
                     "vcs_url": "remote:origin",
-                    "dirpath": "meta-yocto"
+                    "dirpath": "meta-poky"
                 },
                 {
                     "name": "meta-yocto-bsp",
@@ -307,10 +293,10 @@
                         <filename>toasterconf.json</filename> file you just edited.
                         For example, if you cloned the
                         <filename>poky</filename> repository and you edited the
-                        <filename>meta-yocto/conf/toasterconf.json</filename> file,
+                        <filename>meta-poky/conf/toasterconf.json</filename> file,
                         you would type something like the following:
                         <literallayout class='monospaced'>
-     $ bitbake/lib/toaster/manage.py loadconf /home/scottrif/poky/meta-yocto/conf/toasterconf.json
+     $ bitbake/lib/toaster/manage.py loadconf /home/scottrif/poky/meta-poky/conf/toasterconf.json
                         </literallayout>
                         After entering this command, you need to update the
                         Toaster database with the information coming from your
@@ -550,8 +536,7 @@
         <title>JSON Files</title>
 
         <para>
-            If you are going to be using Toaster in Build Mode, it must
-            be initially configured before use.
+            You must configure Toaster before using it.
             Configuration customizes layer source settings and Toaster defaults
             for all users and is performed by the person responsible for
             Toaster Configuration (i.e  the Toaster Administrator).
@@ -577,23 +562,22 @@
             <filename>toasterconf.json</filename>.
             The Toaster Administrator can customize the file prior to loading
             it into Toaster.
-            When you set up Toaster locally to run in Build Mode, the system
-            startup script actively looks for compatible configuration files
-            and prompts you to select a file to load if it detects that the
-            database has not been configured.
+            The <filename>TOASTER_CONF</filename> variable in the
+            Toaster startup script at <filename>bitbake/bin/toaster</filename>
+            specifies the location of the <filename>toasterconf.json</filename> file.
         </para>
 
         <section id='json-file-choices'>
             <title>Configuration File Choices</title>
 
             <para>
-                Three versions of the configuration file exist:
+                Two versions of the configuration file exist:
                 <itemizedlist>
                     <listitem><para>
                         The
-                        <filename>meta-yocto/conf/toasterconf.json</filename>
+                        <filename>meta-poky/conf/toasterconf.json</filename>
                         in the <filename>conf</filename> directory of the
-                        Yocto Project's <filename>meta-yocto</filename> layer.
+                        Yocto Project's <filename>meta-poky</filename> layer.
                         This version contains the default Yocto Project
                         configuration for Toaster.
                         You are prompted to select this file during the Toaster
@@ -613,15 +597,6 @@
                         <filename>openembedded-core</filename> repository (i.e.
                         <filename>git://git.openembedded.org/openembedded-core</filename>).
                         </para></listitem>
-                    <listitem><para>
-                        The <filename>Toasterconf.json.txt.patch</filename>
-                        located on the
-                        <ulink url='https://wiki.yoctoproject.org/wiki/File:Toasterconf.json.txt.patch'>File:Toasterconf.json.txt.patch</ulink>
-                        wiki page.
-                        This version of the file is useful as a sample
-                        configuration for when you want to set up Toaster as a
-                        hosted service in Build Mode.
-                        </para></listitem>
                 </itemizedlist>
             </para>
         </section>
@@ -723,10 +698,10 @@
                     "dirpath": "meta"
                 },
                 {
-                    "name": "meta-yocto",
-                    "local_path": "meta-yocto",
+                    "name": "meta-poky",
+                    "local_path": "meta-poky",
                     "vcs_url": "remote:origin",
-                    "dirpath": "meta-yocto"
+                    "dirpath": "meta-poky"
                 },
                 {
                     "name": "meta-yocto-bsp",
@@ -842,7 +817,7 @@
              "description": "Yocto Project master",
              "bitbake": "master",
              "branch": "master",
-             "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
+             "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
              "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
              "helptext": "Toaster will run your builds using the tip of the &lt;a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/\"&gt;Yocto Project master branch&lt;/a&gt;, where active development takes place. This is not a stable branch, so your builds might not work as expected."
          },
@@ -851,7 +826,7 @@
              "description": "Yocto Project 2.0 Jethro",
              "bitbake": "jethro",
              "branch": "jethro",
-             "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
+             "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
              "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
              "helptext": "Toaster will run your builds with the tip of the &lt;a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=jethro\"&gt;Yocto Project 2.0 \"Jethro\"&lt;/a&gt; branch."
          },
@@ -860,7 +835,7 @@
              "description": "Yocto Project 1.8 Fido",
              "bitbake": "fido",
              "branch": "fido",
-             "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
+             "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
              "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
              "helptext": "Toaster will run your builds with the tip of the &lt;a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=fido\"&gt;Yocto Project 1.8 \"Fido\"&lt;/a&gt; branch."
          },
@@ -869,7 +844,7 @@
              "description": "Local Yocto Project",
              "bitbake": "HEAD",
              "branch": "HEAD",
-             "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
+             "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
              "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
              "helptext": "Toaster will run your builds with the version of the Yocto Project you have cloned or downloaded to your computer."
          }
@@ -1008,7 +983,7 @@
                 <literallayout class='monospaced'>
      $ bitbake/lib/toaster/manage.py checksettings
                 </literallayout>
-                In Build Mode, Toaster uses settings that are based on the
+                Toaster uses settings that are based on the
                 database to configure the building tasks.
                 The <filename>checksettings</filename> command verifies that
                 the database settings are valid in the sense that they have
diff --git a/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml b/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml
index 2693569..963b211 100644
--- a/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml
+++ b/yocto-poky/documentation/toaster-manual/toaster-manual-setup-and-use.xml
@@ -17,32 +17,12 @@
         </para>
 
         <para>
-            If you want to configure and start your builds using the
-            Toaster web interface
-            (i.e. "<link linkend='toaster-build-mode'>Build Mode</link>"),
-            navigate to the root of your
+            Navigate to the root of your
             <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
             (e.g. <filename>poky</filename>):
             <literallayout class='monospaced'>
      $ cd poky
             </literallayout>
-            Next, start Toaster:
-            <literallayout class='monospaced'>
-     $ bitbake/bin/toaster
-            </literallayout>
-            Open your favourite browser and enter the following:
-            <literallayout class='monospaced'>
-     http://127.0.0.1:8000
-            </literallayout>
-            If you would rather configure and start your builds
-            using the command line
-            (i.e. <link linkend='toaster-analysis-mode'>Analysis Mode</link>),
-            you can get Toaster to "listen"
-            to your builds and collect information about them.
-            To do that, navigate to the root of your Source Directory:
-            <literallayout class='monospaced'>
-     $ cd poky
-            </literallayout>
             Once in that directory, source the build environment script:
             <literallayout class='monospaced'>
      $ source oe-init-build-env
@@ -53,12 +33,14 @@
             <literallayout class='monospaced'>
      $ source ../bitbake/bin/toaster
             </literallayout>
-            You can now run builds normally.
+            You can now run your builds from the command line, or with
+            Toaster as explained in section
+            "<link linkend='using-the-toaster-web-interface'>Using the Toaster Web Interface</link>".
         </para>
 
         <para>
-            To see the build information provided by Toaster, open your
-            favorite browser and enter the following:
+            To access the Toaster web interface, open your favorite
+            browser and enter the following:
             <literallayout class='monospaced'>
      http://127.0.0.1:8000
             </literallayout>
@@ -72,12 +54,7 @@
             By default, Toaster starts on port 8000.
             You can use the <filename>WEBPORT</filename> parameter to
             set a different port.
-            For example, either of the following commands sets the
-            port to "8400":
-            <literallayout class='monospaced'>
-     $ bitbake/bin/toaster webport=8400
-            </literallayout>
-            or
+            For example, the following command sets the port to "8400":
             <literallayout class='monospaced'>
      $ source ../bitbake/bin/toaster webport=8400
             </literallayout>
@@ -88,18 +65,10 @@
         <title>The Directory for Cloning Layers</title>
 
         <para>
-            If you are running Toaster in
-            <link linkend='toaster-build-mode'>Build Mode</link>,
             Toaster creates a <filename>_toaster_clones</filename>
             directory inside your Source Directory
-            (i.e. <filename>poky</filename>).
-            For example, suppose you use this command to start Toaster:
-            <literallayout class='monospaced'>
-     poky/bitbake/bin/toaster
-            </literallayout>
-            In this example, Toaster creates and uses the
-            <filename>poky/_toaster_clones</filename>
-            directory to clone any layers needed for your builds.
+            (i.e. <filename>poky</filename>) to clone any layers
+            needed for your builds.
         </para>
 
         <para>
@@ -117,17 +86,9 @@
         <title>The Build Directory</title>
 
         <para>
-            If you are running Toaster in
-            <link linkend='toaster-build-mode'>Build Mode</link>,
             Toaster creates a build directory within your Source
-            Directory (e.g. <filename>poky</filename>).
-            For example, suppose you use this command to start Toaster:
-            <literallayout class='monospaced'>
-     poky/bitbake/bin/toaster
-            </literallayout>
-            In this example, Toaster creates and uses the
-            <filename>poky/build</filename>
-            directory to execute the builds.
+            Directory (e.g. <filename>poky</filename>) to execute
+            the builds.
         </para>
 
         <para>
@@ -136,7 +97,7 @@
             the <filename>TOASTER_DIR</filename> environment variable,
             which takes precedence over your current working directory.
             Setting this environment variable causes Toaster to use
-            <filename>$TOASTER_DIR./build</filename> as the build directory.
+            <filename>$TOASTER_DIR/build</filename> as the build directory.
         </para>
     </section>
 
@@ -154,1267 +115,519 @@
             To access the Django administration interface, you must
             create a superuser by following these steps:
             <orderedlist>
-                <listitem><para>
-                    If you used <filename>virtualenv</filename>, which is
-                    recommended, to set up the Toaster system dependencies,
-                    you need be sure the virtual environment is activated.
-                    To activate this environment, use the following:
-                    <literallayout class='monospaced'>
-     $ source venv/bin/activate
-                    </literallayout>
-                    </para></listitem>
-                <listitem><para>
-                    From the root of your checkout directory, invoke the
-                    following command from <filename>manage.py</filename>:
-                    <literallayout class='monospaced'>
-     $ ./bitbake/lib/toaster/manage.py createsuperuser
-                    </literallayout>
-                    </para></listitem>
-                <listitem><para>
-                    Django prompts you for the username, which you need to
-                    provide.
-                    </para></listitem>
-                <listitem><para>
-                    Django prompts you for an email address, which is
-                    optional.
-                    </para></listitem>
-                <listitem><para>
-                    Django prompts you for a password, which you must provide.
-                    </para></listitem>
-                <listitem><para>
-                    Django prompts you to re-enter your password for verification.
-                    </para></listitem>
-            </orderedlist>
-            After completing these steps, the following confirmation message
-            appears:
-            <literallayout class='monospaced'>
-     Superuser created successfully.
-            </literallayout>
-        </para>
+              <listitem><para>
+                  If you used <filename>virtualenv</filename>, which is
+                  recommended, to set up the Toaster system dependencies,
+                  you need be sure the virtual environment is activated.
+                  To activate this environment, use the following command:
+                  <literallayout class='monospaced'>
+   $ source venv/bin/activate
+                  </literallayout>
+                  </para></listitem>
+              <listitem><para>
+                  From the directory containing the Toaster database,
+                  which by default is the
+                  <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
+                  invoke the <filename>createsuperuser</filename> command
+                  from <filename>manage.py</filename>:
+                  <literallayout class='monospaced'>
+   $ cd ~/poky/build
+   $ ../bitbake/lib/toaster/manage.py createsuperuser
+                  </literallayout>
+                  </para></listitem>
+              <listitem><para>
+                  Django prompts you for the username, which you need to
+                  provide.
+                  </para></listitem>
+              <listitem><para>
+                  Django prompts you for an email address, which is
+                  optional.
+                  </para></listitem>
+              <listitem><para>
+                  Django prompts you for a password, which you must provide.
+                  </para></listitem>
+              <listitem><para>
+                  Django prompts you to re-enter your password for verification.
+                  </para></listitem>
+          </orderedlist>
+          After completing these steps, the following confirmation message
+          appears:
+          <literallayout class='monospaced'>
+   Superuser created successfully.
+          </literallayout>
+      </para>
 
-        <para>
-            Creating a superuser allows you to access the Django administration
-            interface through a browser.
-            The URL for this interface is the same as the URL used for the
-            Toaster instance with "/admin" on the end.
-            For example, if you are running Toaster locally, use the
-            following URL:
-            <literallayout class='monospaced'>
-     http://127.0.0.1:8000/admin
-            </literallayout>
-            You can use the Django administration interface to set Toaster
-            configuration parameters such as the build directory, layer sources,
-            default variable values, and BitBake versions.
-        </para>
-    </section>
+      <para>
+          Creating a superuser allows you to access the Django administration
+          interface through a browser.
+          The URL for this interface is the same as the URL used for the
+          Toaster instance with "/admin" on the end.
+          For example, if you are running Toaster locally, use the
+          following URL:
+          <literallayout class='monospaced'>
+   http://127.0.0.1:8000/admin
+          </literallayout>
+          You can use the Django administration interface to set Toaster
+          configuration parameters such as the build directory, layer sources,
+          default variable values, and BitBake versions.
+      </para>
+  </section>
 
-    <section id='toaster-setting-up-a-production-instance-of-toaster'>
-        <title>Setting Up a Production Instance of Toaster</title>
+  <section id='toaster-setting-up-a-production-instance-of-toaster'>
+      <title>Setting Up a Production Instance of Toaster</title>
 
-        <para>
-            You can use a production instance of Toaster to share the
-            Toaster instance with remote users, multiple users, or both.
-            The production instance is also the setup that can cope with
-            heavier loads on the web service.
-            Use the instructions in the following sections to set up
-            Toaster in
-            <link linkend='toaster-build-mode'>Build Mode</link>
-            where builds and projects are run,
-            viewed, and defined through the Toaster web interface.
-        </para>
+      <para>
+          You can use a production instance of Toaster to share the
+          Toaster instance with remote users, multiple users, or both.
+          The production instance is also the setup that can handle
+          heavier loads on the web service.
+          Use the instructions in the following sections to set up
+          Toaster to run builds through the Toaster web interface.
+      </para>
 
-        <section id='toaster-production-instance-requirements'>
-            <title>Requirements</title>
+      <section id='toaster-production-instance-requirements'>
+          <title>Requirements</title>
 
-            <para>
-                Be sure you meet the following requirements:
-                <note>
-                    You must comply with all Apache,
-                    <filename>mod-wsgi</filename>, and Mysql requirements.
-                </note>
-                <itemizedlist>
-                    <listitem><para>
-                        Have all the build requirements as described in
-                        "<link linkend='toaster-setting-up-the-basic-system-requirements'>Setting Up the Basic System Requirements</link>"
-                        chapter.
-                        </para></listitem>
-                    <listitem><para>
-                        Have an Apache webserver.
-                        </para></listitem>
-                    <listitem><para>
-                        Have <filename>mod-wsgi</filename> for the Apache
-                        webserver.
-                        </para></listitem>
-                    <listitem><para>
-                        Use the Mysql database server.
-                        </para></listitem>
-                    <listitem><para>
-                        If you are using Ubuntu 14.04.3, run the following:
-                        <literallayout class='monospaced'>
-     $ sudo apt-get install apache2 libapache2-mod-wsgi mysql-server virtualenv libmysqlclient-dev
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        If you are using Fedora 22 or a RedHat distribution, run
-                        the following:
-                        <literallayout class='monospaced'>
-     $ sudo dnf install httpd mod_wsgi python-virtualenv gcc mysql-devel
-                        </literallayout>
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
+          <para>
+              Be sure you meet the following requirements:
+              <note>
+                  You must comply with all Apache,
+                  <filename>mod-wsgi</filename>, and Mysql requirements.
+              </note>
+              <itemizedlist>
+                  <listitem><para>
+                      Have all the build requirements as described in
+                      "<link linkend='toaster-setting-up-the-basic-system-requirements'>Setting Up the Basic System Requirements</link>"
+                      chapter.
+                      </para></listitem>
+                  <listitem><para>
+                      Have an Apache webserver.
+                      </para></listitem>
+                  <listitem><para>
+                      Have <filename>mod-wsgi</filename> for the Apache
+                      webserver.
+                      </para></listitem>
+                  <listitem><para>
+                      Use the Mysql database server.
+                      </para></listitem>
+                  <listitem><para>
+                      If you are using Ubuntu 14.04.3, run the following:
+                      <literallayout class='monospaced'>
+   $ sudo apt-get install apache2 libapache2-mod-wsgi mysql-server virtualenv libmysqlclient-dev
+                      </literallayout>
+                      </para></listitem>
+                  <listitem><para>
+                      If you are using Fedora 22 or a RedHat distribution, run
+                      the following:
+                      <literallayout class='monospaced'>
+   $ sudo dnf install httpd mod_wsgi python-virtualenv gcc mysql-devel
+                      </literallayout>
+                      </para></listitem>
+              </itemizedlist>
+          </para>
+      </section>
 
-        <section id='toaster-installation-steps'>
-            <title>Installation</title>
+      <section id='toaster-installation-steps'>
+          <title>Installation</title>
 
-            <para>
-                Perform the following steps to install Toaster:
-                <orderedlist>
-                    <listitem><para>
-                        Checkout a copy of <filename>poky</filename>
-                        into the web server directory.
-                        You will be using <filename>/var/www/toaster</filename>:
-                        <literallayout class='monospaced'>
-     $ mkdir -p /var/www/toaster
-     $ cd /var/www/toaster/
-     $ git clone git://git.yoctoproject.org/poky
-     $ git checkout &DISTRO_NAME;
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        Initialize a virtual environment and install Toaster
-                        dependencies.
-                        Using a virtual environment keeps the Python packages
-                        isolated from your system-provided packages:
-                        <literallayout class='monospaced'>
-     $ cd /var/www/toaster/
-     $ virtualenv venv
-     $ source ./venv/bin/activate
-     $ pip install -r ./poky/bitbake/toaster-requirements.txt
-     $ pip install mysql
-     $ pip install MySQL-python
-                        </literallayout>
-                        <note>
-                            Isolating these packages is not required but is
-                            recommended.
-                            Alternatively, you can use your operating system's
-                            package manager to install the packages.
-                        </note>
-                        </para></listitem>
-                    <listitem><para>
-                        Configure Toaster by editing
-                        <filename>/var/www/toaster/poky/bitbake/lib/toaster/toastermain/settings.py</filename>
-                        as follows:
-                        <itemizedlist>
-                            <listitem><para>
-                                Edit the <filename>DATABASE</filename> settings:
-                                <literallayout class='monospaced'>
-     DATABASES = {
-         'default': {
-             'ENGINE': 'django.db.backends.mysql',
-             'NAME': 'toaster_data',
-             'USER': 'toaster',
-             'PASSWORD': 'yourpasswordhere',
-             'HOST': 'localhost',
-             'PORT': '3306',
-        }
-     }
-                                </literallayout>
-                                </para></listitem>
-                            <listitem><para>
-                                Edit the <filename>SECRET_KEY</filename>:
-                                <literallayout class='monospaced'>
-     SECRET_KEY = '<replaceable>your_secret_key</replaceable>'
-                                </literallayout>
-                                </para></listitem>
-                            <listitem><para>
-                                Edit the <filename>STATIC_ROOT</filename>:
-                                <literallayout class='monospaced'>
-     STATIC_ROOT = '/var/www/toaster/static_files/'
-                                </literallayout>
-                                </para></listitem>
-                            <listitem><para>
-                                Enable Build Mode by adding the following
-                                line to <filename>settings.py</filename>:
-                                <literallayout class='monospaced'>
-     BUILD_MODE=True
-                                </literallayout>
-                                </para></listitem>
-                        </itemizedlist>
-                        </para></listitem>
-                    <listitem><para>
-                        Add the database and user to the <filename>mysql</filename>
-                        server defined earlier:
-                        <literallayout class='monospaced'>
-     $ mysql -u root -p
-     mysql> CREATE DATABASE toaster_data;
-     mysql> CREATE USER 'toaster'@'localhost' identified by 'yourpasswordhere';
-     mysql> GRANT all on toaster_data.* to 'toaster'@'localhost';
-     mysql> quit
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        Get Toaster to create the database schema,
-                        default data, and gather the statically-served files:
-                        <literallayout class='monospaced'>
-     $ cd  /var/www/toaster/poky/
-     $ ./bitbake/lib/toaster/manage.py syncdb
-     $ ./bitbake/lib/toaster/manage.py migrate
-     $ TOASTER_DIR=`pwd` TOASTER_CONF=./meta-yocto/conf/toasterconf.json ./bitbake/lib/toaster/manage.py checksettings
-     $ ./bitbake/lib/toaster/manage.py collectstatic
-                        </literallayout>
-                        </para>
+          <para>
+              Perform the following steps to install Toaster:
+              <orderedlist>
+                  <listitem><para>
+                      Checkout a copy of <filename>poky</filename>
+                      into the web server directory.
+                      You will be using <filename>/var/www/toaster</filename>:
+                      <literallayout class='monospaced'>
+   $ mkdir -p /var/www/toaster
+   $ cd /var/www/toaster/
+   $ git clone git://git.yoctoproject.org/poky
+   $ git checkout &DISTRO_NAME_NO_CAP;
+                      </literallayout>
+                      </para></listitem>
+                  <listitem><para>
+                      Initialize a virtual environment and install Toaster
+                      dependencies.
+                      Using a virtual environment keeps the Python packages
+                      isolated from your system-provided packages:
+                      <literallayout class='monospaced'>
+   $ cd /var/www/toaster/
+   $ virtualenv venv
+   $ source ./venv/bin/activate
+   $ pip install -r ./poky/bitbake/toaster-requirements.txt
+   $ pip install mysql
+   $ pip install MySQL-python
+                      </literallayout>
+                      <note>
+                          Isolating these packages is not required but is
+                          recommended.
+                          Alternatively, you can use your operating system's
+                          package manager to install the packages.
+                      </note>
+                      </para></listitem>
+                  <listitem><para>
+                      Configure Toaster by editing
+                      <filename>/var/www/toaster/poky/bitbake/lib/toaster/toastermain/settings.py</filename>
+                      as follows:
+                      <itemizedlist>
+                          <listitem><para>
+                              Edit the <filename>DATABASE</filename> settings:
+                              <literallayout class='monospaced'>
+   DATABASES = {
+       'default': {
+           'ENGINE': 'django.db.backends.mysql',
+           'NAME': 'toaster_data',
+           'USER': 'toaster',
+           'PASSWORD': 'yourpasswordhere',
+           'HOST': 'localhost',
+           'PORT': '3306',
+      }
+   }
+                              </literallayout>
+                              </para></listitem>
+                          <listitem><para>
+                              Edit the <filename>SECRET_KEY</filename>:
+                              <literallayout class='monospaced'>
+   SECRET_KEY = '<replaceable>your_secret_key</replaceable>'
+                              </literallayout>
+                              </para></listitem>
+                          <listitem><para>
+                              Edit the <filename>STATIC_ROOT</filename>:
+                              <literallayout class='monospaced'>
+   STATIC_ROOT = '/var/www/toaster/static_files/'
+                              </literallayout>
+                              </para></listitem>
+                      </itemizedlist>
+                      </para></listitem>
+                  <listitem><para>
+                      Add the database and user to the <filename>mysql</filename>
+                      server defined earlier:
+                      <literallayout class='monospaced'>
+   $ mysql -u root -p
+   mysql> CREATE DATABASE toaster_data;
+   mysql> CREATE USER 'toaster'@'localhost' identified by 'yourpasswordhere';
+   mysql> GRANT all on toaster_data.* to 'toaster'@'localhost';
+   mysql> quit
+                      </literallayout>
+                      </para></listitem>
+                  <listitem><para>
+                      Get Toaster to create the database schema,
+                      default data, and gather the statically-served files:
+                      <literallayout class='monospaced'>
+   $ cd  /var/www/toaster/poky/
+   $ ./bitbake/lib/toaster/manage.py syncdb
+   $ ./bitbake/lib/toaster/manage.py migrate
+   $ TOASTER_DIR=`pwd` TOASTER_CONF=./meta-poky/conf/toasterconf.json ./bitbake/lib/toaster/manage.py checksettings
+   $ ./bitbake/lib/toaster/manage.py collectstatic
+                      </literallayout>
+                      </para>
 
-                        <para>
-                            For the above set of commands, after moving to the
-                            <filename>poky</filename> directory,
-                            the <filename>syncdb</filename> and <filename>migrate</filename>
-                            commands ensure the database
-                            schema has had changes propagated correctly (i.e.
-                            migrations).
-                        </para>
+                      <para>
+                          For the above set of commands, after moving to the
+                          <filename>poky</filename> directory,
+                          the <filename>syncdb</filename> and <filename>migrate</filename>
+                          commands ensure the database
+                          schema has had changes propagated correctly (i.e.
+                          migrations).
+                      </para>
 
-                        <para>
-                            The next line sets the Toaster root directory
-                            <filename>TOASTER_DIR</filename> and the location of
-                            the Toaster configuration file
-                            <filename>TOASTER_CONF</filename>, which is
-                            relative to the Toaster root directory
-                            <filename>TOASTER_DIR</filename>.
-                            For more information on the Toaster configuration file
-                            <filename>TOASTER_CONF</filename>, see the
-                            <link linkend='toaster-json-files'>JSON Files</link>
-                            section of this manual.
-                        </para>
+                      <para>
+                          The next line sets the Toaster root directory
+                          <filename>TOASTER_DIR</filename> and the location of
+                          the Toaster configuration file
+                          <filename>TOASTER_CONF</filename>, which is
+                          relative to the Toaster root directory
+                          <filename>TOASTER_DIR</filename>.
+                          For more information on the Toaster configuration file
+                          <filename>TOASTER_CONF</filename>, see the
+                          <link linkend='toaster-json-files'>JSON Files</link>
+                          section of this manual.
+                      </para>
 
-                        <para>
-                            This line also runs the <filename>checksettings</filename>
-                            command, which configures the location of the Toaster
-                            <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build directory</ulink>.
-                            The Toaster root directory <filename>TOASTER_DIR</filename>
-                            determines where the Toaster build directory
-                            is created on the file system.
-                            In the example above,
-                            <filename>TOASTER_DIR</filename> is set as follows:
-                            <literallayout class="monospaced">
-     /var/www/toaster/poky
-                            </literallayout>
-                            This setting causes the Toaster build directory to be:
-                            <literallayout class="monospaced">
-     /var/www/toaster/poky/build
-                            </literallayout>
-                        </para>
+                      <para>
+                          This line also runs the <filename>checksettings</filename>
+                          command, which configures the location of the Toaster
+                          <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build directory</ulink>.
+                          The Toaster root directory <filename>TOASTER_DIR</filename>
+                          determines where the Toaster build directory
+                          is created on the file system.
+                          In the example above,
+                          <filename>TOASTER_DIR</filename> is set as follows:
+                          <literallayout class="monospaced">
+   /var/www/toaster/poky
+                          </literallayout>
+                          This setting causes the Toaster build directory to be:
+                          <literallayout class="monospaced">
+   /var/www/toaster/poky/build
+                          </literallayout>
+                      </para>
 
-                        <para>
-                            Finally, the <filename>collectstatic</filename> command
-                            is a Django framework command that collects all the
-                            statically served files into a designated directory to
-                            be served up by the Apache web server.
-                        </para></listitem>
-                    <listitem><para>
-                        Add an Apache configuration file for Toaster to your Apache web
-                        server's configuration directory.
-                        If you are using Ubuntu or Debian, put the file here:
-                        <literallayout class='monospaced'>
-     /etc/apache2/conf-available/toaster.conf
-                        </literallayout>
-                        If you are using Fedora or RedHat, put it here:
-                        <literallayout class='monospaced'>
-     /etc/httpd/conf.d/toaster.conf
-                        </literallayout>
-                        Following is a sample Apache configuration for Toaster
-                        you can follow:
-                        <literallayout class='monospaced'>
-     Alias /static /var/www/toaster/static_files
-     &lt;Directory /var/www/toaster/static_files&gt;
-             Order allow,deny
-             Allow from all
-             Require all granted
-     &lt;/Directory&gt;
+                      <para>
+                          Finally, the <filename>collectstatic</filename> command
+                          is a Django framework command that collects all the
+                          statically served files into a designated directory to
+                          be served up by the Apache web server.
+                      </para></listitem>
+                  <listitem><para>
+                      Add an Apache configuration file for Toaster to your Apache web
+                      server's configuration directory.
+                      If you are using Ubuntu or Debian, put the file here:
+                      <literallayout class='monospaced'>
+   /etc/apache2/conf-available/toaster.conf
+                      </literallayout>
+                      If you are using Fedora or RedHat, put it here:
+                      <literallayout class='monospaced'>
+   /etc/httpd/conf.d/toaster.conf
+                      </literallayout>
+                      Following is a sample Apache configuration for Toaster
+                      you can follow:
+                      <literallayout class='monospaced'>
+   Alias /static /var/www/toaster/static_files
+   &lt;Directory /var/www/toaster/static_files&gt;
+           Order allow,deny
+           Allow from all
+           Require all granted
+   &lt;/Directory&gt;
 
-     WSGIDaemonProcess toaster_wsgi python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/venv/lib/python2.7/site-packages
+   WSGIDaemonProcess toaster_wsgi python-path=/var/www/toaster/poky/bitbake/lib/toaster:/var/www/toaster/venv/lib/python2.7/site-packages
 
-     WSGIScriptAlias / "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py"
-     &lt;Location /&gt;
-         WSGIProcessGroup toastern_wsgi
-     &lt;/Location&gt;
-                        </literallayout>
-                        If you are using Ubuntu or Debian,
-                        you will need to enable the config and module for Apache:
-                        <literallayout class='monospaced'>
-     $ sudo a2enmod wsgi
-     $ sudo a2enconf toaster
-     $ chmod +x bitbake/lib/toaster/toastermain/wsgi.py
-                        </literallayout>
-                        Finally, restart Apache to make sure all new configuration
-                        is loaded.
-                        For Ubuntu and Debian use:
-                        <literallayout class='monospaced'>
-     $ sudo service apache2 restart
-                        </literallayout>
-                        For Fedora and RedHat use:
-                        <literallayout class='monospaced'>
-     $ sudo service httpd restart
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para>
-                        Install the build runner service.
-                        This service needs to be running in order to dispatch
-                        builds.
-                        Use this command:
-                        <literallayout class='monospaced'>
-     /var/www/toaster/poky/bitbake/lib/toaster/manage.py runbuilds
-                        </literallayout>
-                        Here is an example:
-                        <literallayout class='monospaced'>
-     #!/bin/sh
-     # toaster run builds dispatcher
-     cd /var/www/toaster/
-     source ./venv/bin/activate
-     ./bitbake/lib/toaster/manage.py runbuilds
-                        </literallayout>
-                        </para></listitem>
-                </orderedlist>
-                You can now open up a browser and start using Toaster.
-            </para>
-        </section>
-    </section>
+   WSGIScriptAlias / "/var/www/toaster/poky/bitbake/lib/toaster/toastermain/wsgi.py"
+   &lt;Location /&gt;
+       WSGIProcessGroup toastern_wsgi
+   &lt;/Location&gt;
+                      </literallayout>
+                      If you are using Ubuntu or Debian,
+                      you will need to enable the config and module for Apache:
+                      <literallayout class='monospaced'>
+   $ sudo a2enmod wsgi
+   $ sudo a2enconf toaster
+   $ chmod +x bitbake/lib/toaster/toastermain/wsgi.py
+                      </literallayout>
+                      Finally, restart Apache to make sure all new configuration
+                      is loaded.
+                      For Ubuntu and Debian use:
+                      <literallayout class='monospaced'>
+   $ sudo service apache2 restart
+                      </literallayout>
+                      For Fedora and RedHat use:
+                      <literallayout class='monospaced'>
+   $ sudo service httpd restart
+                      </literallayout>
+                      </para></listitem>
+                  <listitem><para>
+                      Install the build runner service.
+                      This service needs to be running in order to dispatch
+                      builds.
+                      Use this command:
+                      <literallayout class='monospaced'>
+   /var/www/toaster/poky/bitbake/lib/toaster/manage.py runbuilds
+                      </literallayout>
+                      Here is an example:
+                      <literallayout class='monospaced'>
+   #!/bin/sh
+   # toaster run builds dispatcher
+   cd /var/www/toaster/
+   source ./venv/bin/activate
+   ./bitbake/lib/toaster/manage.py runbuilds
+                      </literallayout>
+                      </para></listitem>
+              </orderedlist>
+              You can now open up a browser and start using Toaster.
+          </para>
+      </section>
+  </section>
 
+  <section id='using-the-toaster-web-interface'>
+      <title>Using the Toaster Web Interface</title>
 
+      <para>
+          The Toaster web interface allows you to do the following:
+          <itemizedlist>
+              <listitem><para>
+                  Browse published layers in the
+                  <ulink url='http://layers.openembedded.org'>OpenEmbedded Metadata Index</ulink>
+                  that are available for your selected version of the build
+                  system.
+                  </para></listitem>
+              <listitem><para>
+                  Import your own layers for building.
+                  </para></listitem>
+              <listitem><para>
+                  Add and remove layers from your configuration.
+                  </para></listitem>
+              <listitem><para>
+                  Set configuration variables.
+                  </para></listitem>
+              <listitem><para>
+                  Select a target or multiple targets to build.
+                  </para></listitem>
+              <listitem><para>
+                  Start your builds.
+                  </para></listitem>
+              <listitem><para>
+                  See what was built (recipes and packages) and what
+                  packages were installed into your final image.
+                  </para></listitem>
+              <listitem><para>
+                  Browse the directory structure of your image.
+                  </para></listitem>
+              <listitem><para>
+                  See the value of all variables in your build configuration,
+                  and which files set each value.
+                  </para></listitem>
+              <listitem><para>
+                  Examine error, warning and trace messages to aid in
+                  debugging.
+                  </para></listitem>
+              <listitem><para>
+                  See information about the BitBake tasks executed and
+                  reused during your build, including those that used
+                  shared state.
+                  </para></listitem>
+              <listitem><para>
+                  See dependency relationships between recipes, packages
+                  and tasks.
+                  </para></listitem>
+              <listitem><para>
+                  See performance information such as build time, task time,
+                  CPU usage, and disk I/O.
+                  </para></listitem>
+          </itemizedlist>
+      </para>
 
+      <section id='web-interface-videos'>
+          <title>Toaster Web Interface Videos</title>
 
-<!--    <section id='using-toaster-in-analysis-mode'>
-        <title>Using Toaster in Analysis Mode</title>
+          <para>
+              Following are several videos that show how to use the Toaster GUI:
+              <itemizedlist>
+                  <listitem><para><emphasis>Build Configuration:</emphasis>
+                      This
+                      <ulink url='https://www.youtube.com/watch?v=qYgDZ8YzV6w'>video</ulink>
+                      overviews and demonstrates build configuration for Toaster.
+                      </para></listitem>
+                  <listitem><para><emphasis>Build Custom Layers:</emphasis>
+                      This
+                      <ulink url='https://www.youtube.com/watch?v=QJzaE_XjX5c'>video</ulink>
+                      shows you how to build custom layers that are used with
+                      Toaster.
+                      </para></listitem>
+                  <listitem><para><emphasis>Toaster Homepage and Table Controls:</emphasis>
+                      This
+                      <ulink url='https://www.youtube.com/watch?v=QEARDnrR1Xw'>video</ulink>
+                      goes over the Toaster entry page, and provides
+                      an overview of the data manipulation capabilities of
+                      Toaster, which include search, sorting and filtering by
+                      different criteria.
+                      </para></listitem>
+                  <listitem><para><emphasis>Build Dashboard:</emphasis>
+                      This
+                      <ulink url='https://www.youtube.com/watch?v=KKqHYcnp2gE'>video</ulink>
+                      shows you the build dashboard, a page providing an
+                      overview of the information available for a selected build.
+                      </para></listitem>
+                  <listitem><para><emphasis>Image Information:</emphasis>
+                      This
+                      <ulink url='https://www.youtube.com/watch?v=XqYGFsmA0Rw'>video</ulink>
+                      walks through the information Toaster provides
+                      about images: packages installed and root file system.
+                      </para></listitem>
+                  <listitem><para><emphasis>Configuration:</emphasis>
+                      This
+                      <ulink url='https://www.youtube.com/watch?v=UW-j-T2TzIg'>video</ulink>
+                      provides Toaster build configuration information.
+                      </para></listitem>
+                  <listitem><para><emphasis>Tasks:</emphasis>
+                      This
+                      <ulink url='https://www.youtube.com/watch?v=D4-9vGSxQtw'>video</ulink>
+                      shows the information Toaster provides about the
+                      tasks run by the build system.
+                      </para></listitem>
+                  <listitem><para><emphasis>Recipes and Packages Built:</emphasis>
+                      This
+                      <ulink url='https://www.youtube.com/watch?v=x-6dx4huNnw'>video</ulink>
+                      shows the information Toaster provides about recipes
+                      and packages built.
+                      </para></listitem>
+                  <listitem><para><emphasis>Performance Data:</emphasis>
+                      This
+                      <ulink url='https://www.youtube.com/watch?v=qWGMrJoqusQ'>video</ulink>
+                      shows the build performance data provided by
+                      Toaster.
+                      </para></listitem>
+              </itemizedlist>
+          </para>
+      </section>
 
+      <section id='a-note-on-the-local-yocto-project-release'>
+          <title>Additional Information About the Local Yocto Project Release</title>
 
-        <para>
-            This section describes how to use Toaster in Analysis Mode
-            after setting Toaster up as a local instance or as a hosted
-            service.
-        </para>
+          <para>
+              This section only applies if you have set up Toaster
+              for local development, as explained in the
+              "<link linkend='starting-toaster-for-local-development'>Starting Toaster for Local Development</link>"
+              section.
+          </para>
 
-        <section id='setting-up-locally-and-running-in-analysis-mode'>
-            <title>Setting Up Locally and Running in Analysis Mode</title>
+          <para>
+              When you create a project in Toaster, you will be asked to
+              provide a name and to select a Yocto Project release.
+              One of the release options you will find is called
+              "Local Yocto Project".
+              <imagedata fileref="figures/new-project.png" align="center" width="9in" />
+          </para>
 
-            <para>
-                Follow these steps to set up a local instance of Toaster and
-                then run in Analysis Mode:
-                <orderedlist>
-                    <listitem><para><emphasis>Prepare your Build System:</emphasis>
-                        Be sure your system has the Toaster requirements
-                        by following the steps in the
-                        "<link linkend='toaster-establishing-toaster-system-dependencies'>Establishing Toaster System Dependencies</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><emphasis>Get Set Up to Use the Yocto Project:</emphasis>
-                        Get the requirements set up so that you can use the
-                        Yocto Project to build images.
-                        See the
-                        "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>"
-                        section in the Yocto Project Quick Start for information.
-                        </para></listitem>
-                    <listitem><para><emphasis>Source your Build Environment Setup Script:</emphasis>
-                        From your
-                        <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
-                        (e.g. <filename>poky/build</filename>), source the build
-                        environment setup script
-                        <ulink url="&YOCTO_DOCS_REF_URL;#structure-core-script"><filename>&OE_INIT_FILE;</filename></ulink>
-                        or
-                        <ulink url="&YOCTO_DOCS_REF_URL;#structure-memres-core-script"><filename>oe-init-build-env-memres</filename></ulink>.
-                        </para></listitem>
-                    <listitem><para><emphasis>Start Toaster:</emphasis>
-                        From the
-                        <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
-                        start Toaster:
-                        <literallayout class='monospaced'>
-     $ source toaster start
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Start Your Build Using BitBake:</emphasis>
-                        Use the <filename>bitbake</filename> command to start your
-                        build.
-                        Here is an example that builds the
-                        <filename>core-image-minimal</filename> image:
-                        <literallayout class='monospaced'>
-     $ bitbake core-image-minimal
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Open Your Browser:</emphasis>
-                        Open your browser and visit
-                        <filename>http://host:port/toastergui</filename>.
-                        For host and port values, see the output of the
-                        <filename>source toaster start</filename> command.
-                        For information on how to use Toaster, see the
-                        "<link linkend='using-the-toaster-web-interface'>Using the Toaster Web Interface</link>"
-                        section.
-                        </para></listitem>
-                </orderedlist>
-            </para>
+          <para>
+              When you select the "Local Yocto Project" release, Toaster
+              will run your builds using the local Yocto
+              Project clone you have in your computer: the same clone
+              you are using to run Toaster.
+              Unless you manually update
+              this clone, your builds will always use the same Git revision.
+          </para>
 
-            <para>
+          <para>
+              If you select any of the other release options, Toaster
+              will fetch the tip of your selected release from the upstream
+              <ulink url='https://git.yoctoproject.org'>Yocto Project repository</ulink>
+              every time you run a build.
+              Fetching this tip effectively
+              means that if your selected release is updated upstream, the
+              Git revision you are using for your builds will change.
+              If you are doing development locally, you might not want this
+              change to happen.
+              In that case, the "Local Yocto Project"
+              release might be the right choice.
+          </para>
 
-            </para>
-        </section>
+          <para>
+              However, the "Local Yocto Project" release
+              will not provide you with any compatible layers, other than the
+              three core layers that come with the Yocto Project:
+              <itemizedlist>
+                  <listitem><para>
+                      <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/openembedded-core/'>openembedded-core</ulink>
+                  </para></listitem>
+                  <listitem><para>
+                      <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/meta-poky/'>meta-poky</ulink>
+                  </para></listitem>
+                  <listitem><para>
+                      <ulink url='http://layers.openembedded.org/layerindex/branch/master/layer/meta-yocto-bsp/'>meta-yocto-bsp</ulink>
+                  </para></listitem>
+              </itemizedlist>
+              <imagedata fileref="figures/compatible-layers.png" align="center" width="9in" />
+          </para>
 
-        <section id='setting-up-a-hosted-service-and-running-in-analysis-mode'>
-            <title>Setting Up a Hosted Service and Running in Analysis Mode</title>
-
-            <para>
-                A hosted service resides on a shared server and allows
-                multiple users to take advantage of Toaster.
-            </para>
-
-            <para>
-                In a production environment, you might want to have multiple
-                local instances of the Toaster Logging Interface running on
-                various remote build machines, and have those local instances
-                access and use a single web server.
-                To do this, you need to do the following:
-                <itemizedlist>
-                    <listitem><para>
-                        Maintain a common SQL database.
-                        </para></listitem>
-                    <listitem><para>
-                        Set up separate instances of BitBake servers
-                        and Toaster Logging Interfaces for each of those
-                        separate BitBake servers.
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-
-            <para>
-                The common SQL database allows the Web server to show data from
-                all the various BitBake builds.
-                Setting the SQL database outside of any
-                <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
-                maintains a separation between the various builds.
-                The BitBake servers, the SQL server, and the Web server or
-                servers can be run on separate machines.
-            </para>
-
-            <para>
-                Follow these steps to set up and run a hosted service and run
-                Toaster in Analysis Mode:
-                <note>
-                    The steps assume a Toaster installation path of
-                    <filename>/opt/bitbake/</filename>.
-                </note>
-                <orderedlist>
-                    <listitem><para><emphasis>Prepare your Build System:</emphasis>
-                        Be sure your system has the Toaster requirements
-                        by following the steps in the
-                        "<link linkend='toaster-establishing-toaster-system-dependencies'>Establishing Toaster System Dependencies</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><emphasis>Get Set Up to Use the Yocto Project:</emphasis>
-                        Get the requirements set up so that you can use the
-                        Yocto Project to build images.
-                        See the
-                        "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>"
-                        section in the Yocto Project Quick Start for information.
-                        </para></listitem>
-                    <listitem><para><emphasis>Install and Set up the Database Server:</emphasis>
-                        You can use any SQL server out of the box.
-                        It is recommended that you use
-                        <filename>mysql-server</filename> because it has
-                        the advantages of advanced SQL features along with a
-                        fast and reliable database.
-                        However, setting up <filename>mysql-server</filename>
-                        is more complex and might require a Database
-                        Administrator to tune it.</para>
-                        <para>Another supported database backend is
-                        <filename>sqlite3</filename>.
-                        With <filename>sqlite3</filename>, you have the
-                        advantage of no configuration and an easy installation.
-                        However, Toaster still requires direct access to the
-                        backend.
-                        The <filename>sqlite</filename> backend is also slower
-                        as compared to <filename>mysql-server</filename>, and
-                        has no transactional support.</para>
-                        <para>You should set up proper username and password
-                        access on the shared database for everyone that will
-                        be using Toaster.
-                        You need administrator rights for the root account,
-                        which is not the same thing as root access on the
-                        machine.
-                        Here is an example that installs
-                        <filename>mysql-server</filename> and sets up
-                        some user accounts and the database.
-                        <literallayout class='monospaced'>
-     $ apt-get install mysql-server
-     $ mysql -u root
-     mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
-     mysql> GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
-     mysql> GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
-     mysql> CREATE DATABASE 'toaster';
-                        </literallayout>
-                        You need a separate clone of the
-                        <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>
-                        for the Database Server.
-                        This clone is only used for getting the latest Toaster
-                        files.
-                        You can set this up using the following Git command.
-                        Be sure to set up the directory outside of any
-                        Build Directories.
-                        <literallayout class='monospaced'>
-     $ git clone git://git.yoctoproject.org/poky
-                        </literallayout>
-                        In the separately cloned tree for the Database Server,
-                        edit the
-                        <filename>bitbake/lib/toaster/toastermain/settings.py</filename>
-                        file so that the <filename>DATABASES</filename> value
-                        points to the previously created database server.
-                        Use the username and password established
-                        earlier.
-                        Here is an example:
-                        <literallayout class='monospaced'>
-     $ cat /opt/bitbake/lib/toaster/toastermain/settings.py
-        ...
-     DATABASES = {
-         'default': {
-             'ENGINE': 'django.db.backends.mysql',
-             'NAME': 'toaster',
-             'USER': 'newuser',
-             'PASSWORD': 'password',
-             'HOST': '192.168.0.25',
-             'PORT': '3306',
-         }
-        ...
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Install and Set Up the Web Server:</emphasis>
-                        For a production environment, it is recommended that
-                        you install and set up a front-end web server.
-                        This server allows for load balancing and
-                        multi-threading over Toaster and
-                        <ulink url='https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/'><filename>django</filename> WSGI</ulink>.
-                        Here is an example that uses Apache web server.
-                        <literallayout class='monospaced'>
-     $ apt-get install apache2 libapache2-mod-wsgi
-     $ a2enmod wsgi
-     $ cat /etc/apache2/sites-available/000-default.conf
-
-        ...
-
-     # the WSGIPythonPath is global
-     WSGIPythonPath /opt/bitbake/lib/toaster/
-
-        ...
-
-     #snip - in VirtualHost
-     WSGIScriptAlias / /opt/bitbake/lib/toaster/toastermain/wsgi.py
-
-     &lt;Directory //opt/bitbake/lib/toaster/toastermain/&gt;
-         &lt;Files wsgi.py&gt;
-             Require all granted
-         &lt;/Files&gt;
-     &lt;/Directory&gt;
-
-        ...
-                        </literallayout>
-                        You need to collect static media from Toaster and
-                        continue configuring Apache to serve that static
-                        media:
-                        <literallayout class='monospaced'>
-     $ mkdir /var/www.html/static &amp;&amp; cd /var/www.html/static
-     $ /opt/bitbake/lib/toaster/manage.py collectstatic
-     $ cat /etc/apache2/sites-available/000-default.conf
-
-        ...
-
-     # in VirtualHost, AHEAD of the WSGIScriptAlias definition
-     Alias /static/ /var/www.html/static/
-
-     &lt;Directory /var/www.html/static/&gt;
-     Require all granted
-     &lt;/Directory&gt;
-
-        ...
-
-     WSGIScript Alias / /opt/bitbake/lib/toaster/toastermain/wsgi.py
-
-        ...
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Start Toaster:</emphasis>
-                        Synchronize the databases for toaster, and then start
-                        up the web server.
-                        Here is an example that continues with the assumed
-                        components from the previous steps:
-                        <literallayout class='monospaced'>
-     $ /opt/bitbake/lib/toaster/manage.py syncdb
-     $ /opt/bitbake/lib/toaster/manage.py migrate orm
-     $ /opt/bitbake/lib/toaster/manage.py migrate bldcontrol
-
-     $ service apache2 restart
-                        </literallayout>
-                        You can find general documentation on
-                        <filename>manage.py</filename> at the
-                        <ulink url='https://docs.djangoproject.com/en/1.7/ref/django-admin/'>Django</ulink>
-                        site.
-                        For reference information on Toaster-specific
-                        <filename>manage.py</filename> commands,
-                        see the
-                        "<link linkend='toaster-useful-commands'>Useful Commands</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><emphasis>Enable Build Logging to the Common SQL Server for Each Build Directory you are Using:</emphasis>
-                        You need to make sure that the
-                        <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-toaster'><filename>toaster</filename></ulink>
-                        class and build history are enabled.
-                        This is done in a
-                        <filename>toaster.conf</filename> file that is
-                        created automatically by the toaster
-                        <filename>start</filename> command,
-                        and that lives inside the
-                        <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
-                        in <filename>/conf/toaster.conf</filename>.</para>
-                        <para>That file should include the following line:
-                        <literallayout class='monospaced'>
-     INHERIT += "toaster buildhistory"
-                        </literallayout>
-                        For information on build history, see the
-                        "<ulink url='&YOCTO_DOCS_REF_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
-                        section in the Yocto Project Development
-                        Manual.</para>
-                        <para>You also need to point to the database that you set
-                        up in step 3.
-                        You can do this by exporting the <filename>DATABASE_URL</filename>
-                        variable as follows:
-                        <literallayout class='monospaced'>
-     export DATABASE_URL=mysql://newuser:password@192.168.0.25:3306/toaster
-                        </literallayout>
-                        This example assumes that you are using
-                        <filename>mysql-server</filename>.
-                        The IP address should be the IP address of your
-                        database server.
-                        </para></listitem>
-                    <listitem><para><emphasis>Source your Build Environment Setup Script:</emphasis>
-                        From your
-                        <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
-                        on each of the build systems,
-                        (e.g. <filename>poky/build</filename>), source the
-                        build environment setup script (i.e.
-                        <ulink url="&YOCTO_DOCS_REF_URL;#structure-core-script"><filename>&OE_INIT_FILE;</filename></ulink>
-                        or
-                        <ulink url="&YOCTO_DOCS_REF_URL;#structure-memres-core-script"><filename>oe-init-build-env-memres</filename></ulink>).
-                        </para></listitem>
-                    <listitem><para><emphasis>Start the BitBake Server:</emphasis>
-                        Start the BitBake server using the following command:
-                        <literallayout class='monospaced'>
-     $ bitbake &dash;&dash;postread conf/toaster.conf &dash;&dash;server-only -t xmlrpc -B localhost:0 &amp;&amp; export BBSERVER=localhost:-1
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Start the Logging Server:</emphasis>
-                        Start the Toaster Logging Interface using the following
-                        command:
-                        <literallayout class='monospaced'>
-     $ nohup bitbake &dash;&dash;observe-only -u toasterui >toaster_ui.log &amp;
-                        </literallayout>
-                        <note>
-                            No hard-coded ports are used in the BitBake options
-                            as there is enough code to run
-                            <filename>autodiscovery</filename> for BitBake
-                            ports.
-                            Doing so prevents collisions.
-                        </note>
-                        </para></listitem>
-                    <listitem><para><emphasis>Start Builds Using BitBake:</emphasis>
-                        Use the <filename>bitbake</filename> command to start a
-                        build on a build system.
-                        Here is an example that builds the
-                        <filename>core-image-minimal</filename> image:
-                        <literallayout class='monospaced'>
-     $ bitbake core-image-minimal
-                        </literallayout>
-                        When you are finished with a build in a given
-                        Build Directory, be sure to <filename>kill</filename>
-                        the BitBake server for that build area:
-                        <literallayout class='monospaced'>
-     $ bitbake -m
-                        </literallayout>
-                        </para></listitem>
-                </orderedlist>
-            </para>
-
-            <para>
-                For information on how to use the Toaster web interface,
-                see the
-                "<link linkend='using-the-toaster-web-interface'>Using the Toaster Web Interface</link>"
-                section.
-            </para>
-        </section>
-    </section>
-
-    <section id='using-toaster-in-build-mode'>
-        <title>Using Toaster in Build Mode</title>
-
-        <para>
-            This section describes how to use Toaster in Build Mode
-            after setting Toaster up as a local instance or as a hosted
-            service.
-        </para>
-
-        <section id='setting-up-locally-and-running-in-build-mode'>
-            <title>Setting Up Locally and Running in Build Mode</title>
-
-            <para>
-                Follow these steps to set up a local instance of Toaster and
-                then run in Build Mode:
-                <orderedlist>
-                    <listitem><para><emphasis>Prepare your Build System:</emphasis>
-                        Be sure your system has the Toaster requirements
-                        by following the steps in the
-                        "<link linkend='toaster-establishing-toaster-system-dependencies'>Establishing Toaster System Dependencies</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><emphasis>Get Set Up to Use the Yocto Project:</emphasis>
-                        Get the requirements set up so that you can use the
-                        Yocto Project to build images.
-                        See the
-                        "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>"
-                        section in the Yocto Project Quick Start for information.
-                        </para></listitem>
-                    <listitem><para><emphasis>Start Toaster:</emphasis>
-                        From the root of the source directory (e.g
-                        <filename>poky/</filename>), run the following command:
-                        <literallayout class='monospaced'>
-     $ bitbake/bin/toaster
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Create a Superuser:</emphasis>
-                        Django will ask you if you want to create a superuser.
-                        You can skip this step, but it is recommended that you
-                        create a superuser.
-                        You can use the superuser to access the Django
-                        administration interface and make changes to the
-                        Toaster configuration.
-                        </para></listitem>
-                    <listitem><para><emphasis>Select the Build Log Directory:</emphasis>
-                        Toaster asks you to specify the directory where you
-                        want to store the build log files.
-                        Choosing a directory for these files makes sure they
-                        are always available to you.
-                        If you do not choose a directory, the logs can
-                        disappear (e.g. deleting the Build Directory).</para>
-                        <para>When Toaster prompts you for the Build Log
-                        directory, you can select the suggested default
-                        or provide a path to a different directory.
-                        </para></listitem>
-                    <listitem><para><emphasis>Specify the Layer Checkout Directory:</emphasis>
-                        Toaster asks you to specify the directory into which
-                        layers are checked out.
-                        Toaster clones any layers needed for your builds
-                        inside this directory.</para>
-                        <para>When Toaster prompts you for the Layer
-                        checkout directory, you can select the suggested
-                        default or provide a path to a different directory.
-                        </para></listitem>
-                    <listitem><para><emphasis>Specify the Build Directory Path:</emphasis>
-                        Toaster asks you to specify the path to the
-                        Build Directory.
-                        You can select the suggested default or provide a
-                        path to a different directory.
-                        </para></listitem>
-                    <listitem><para><emphasis>Choose Whether or not to Import a Default Toaster Configuration File:</emphasis>
-                        Toaster asks you if you want to import a default
-                        Toaster configuration file.
-                        Toaster configurations are stored in
-                        JSON files called
-                        <filename>toasterconf.json</filename>.
-                        For information on JSON files, see the
-                        "<link linkend='toaster-json-files'>JSON Files</link>"
-                        section.</para>
-                        <para>You can skip importing a configuration file
-                        by entering "0" at the prompt.
-                        However, it is recommended that you import one of the
-                        configuration files listed during this step.
-                        You can always amend the imported configuration during
-                        a later stage through the Django administration
-                        interface.</para>
-                        <para>For general information on Django, see the
-                        available
-                        <ulink url='https://docs.djangoproject.com/en/1.7/'>documentation</ulink>.
-                        You can also find information on Toaster-specific
-                        <filename>manage.py</filename> commands in the
-                        "<link linkend='toaster-useful-commands'>Useful Commands</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><emphasis>Open the Browser:</emphasis>
-                        If no browser window appears, open your favorite
-                        browser and enter the following:
-                        <literallayout class='monospaced'>
-     http://localhost:8000/toastergui
-                        </literallayout>
-                        You can now use the Toaster web interface.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-
-        <section id='setting-up-a-hosted-service-and-running-in-build-mode'>
-            <title>Setting Up a Hosted Service and Running in Build Mode</title>
-
-            <para>
-                Follow these steps to set up a hosted service and run Toaster
-                in Build Mode:
-                <orderedlist>
-                    <listitem><para><emphasis>Prepare your Build System:</emphasis>
-                        Be sure your system has the Toaster requirements
-                        by following the steps in the
-                        "<link linkend='toaster-establishing-toaster-system-dependencies'>Establishing Toaster System Dependencies</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><emphasis>Get Set Up to Use the Yocto Project:</emphasis>
-                        Get the requirements set up so that you can use the
-                        Yocto Project to build images.
-                        See the
-                        "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>Setting Up to Use the Yocto Project</ulink>"
-                        section in the Yocto Project Quick Start for information.
-                        </para></listitem>
-                    <listitem><para><emphasis>Be Sure Management is Enabled:</emphasis>
-                        If you are running Toaster under Apache, you need to
-                        be sure management is enabled.
-                        To enable management, set
-                        <filename>MANAGED</filename> to "True" by adding
-                        the following to the
-                        <filename>bitbake/lib/toaster/settings.py</filename>
-                        file:
-                        <literallayout class='monospaced'>
-     MANAGED="True"
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Set Up Toaster for Normal Usage:</emphasis>
-                        You need to configure each build environment, layer
-                        sources, and BitBake versions.</para>
-                        <para>Verify that your releases have been loaded correctly by
-                        using the Toaster web interface to create a new
-                        project.
-                        Check the "Releases" dropdown menu to be sure your
-                        newly specified releases exist.</para>
-                        <para>If you want to use the administration interface
-                        for this step, here is a set of example commands
-                        with some descriptions as an example:
-                        <literallayout class='monospaced'>
-     # Create the user under which the builds will run
-     $ adduser poky
-
-     # Bring up the administration interface
-     $xdg-open http://<replaceable>server-address</replaceable>/admin/
-
-     # Login with the admin user previously created
-
-     # Go to the BuildEnvironment object in Build Environments and
-     # set address to local host, sourcedir to /home/poky, and
-     # builddir to /home/pokybuild.
-     #
-     # Save your changes and exit
-
-     # Go to Home, Layer Sources and select add Layer Source
-     # Name: OpenEmbedded, Sourcetype: layerindex,
-     # Apiurl: http://layers openembedded.org/layerindex/api/
-     # Save your changes and exit
-
-     # Go to Home, Bitbake Versions, Add bitbake version;
-     # Take version information from: http://git.openembedded.org/bitbake/refs/heads,
-     # This example assumes "master" version.
-     # set Name: master, Giturl git://git.openembedded.org/bitbake
-     # branch master, dirpath /
-     # Save your changes and exit
-                        </literallayout>
-                        You also need to configure the project releases, the
-                        default variables, and update information from the
-                        layer index.
-                        Continuing with the example:
-                        <literallayout class='monospaced'>
-     # Go to Home, Releases, Add release
-     # set Name: master, Description: Current master release, select Bitbake Version,
-     # and Branch: master
-     # Save your changes and exit
-
-     # Go to Home, Toaster Settings, select the Setting for DEFAULT_RELEASE
-     # set Helptext: This selects the default release., Value: master
-     # Save your changes and exit
-
-     # Go to Home, Bitbake Versions, Add bitbake version;
-     # take version information from : http://git.openembedded.org/bitbake/refs/heads,
-     # this manual assumes the master version
-     # set Name: master, Giturl git://git.openembedded.org/bitbake
-     # branch master, dirpath /
-     # Save your changes and exit
-
-     # Update the information
-     # bitbake/lib/toaster/manage.py lsupdates
-                        </literallayout>
-                        For reference information on Toaster-specific
-                        <filename>manage.py</filename> commands, see the
-                        "<link linkend='toaster-useful-commands'>Useful Commands</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><emphasis>Install and Set up the Database Server:</emphasis>
-                        You can use any SQL server out of the box.
-                        It is recommended that you use
-                        <filename>mysql-server</filename> because it has
-                        the advantages of advanced SQL features along with a
-                        fast and reliable database.
-                        However, setting up <filename>mysql-server</filename>
-                        is more complex and might require a Database
-                        Administrator to tune it.</para>
-                        <para>Another supported database backend is
-                        <filename>sqlite3</filename>.
-                        With <filename>sqlite3</filename>, you have the
-                        advantage of no configuration and an easy installation.
-                        However, Toaster still requires direct access to the
-                        backend.
-                        The <filename>sqlite</filename> backend is also slower
-                        as compared to <filename>mysql-server</filename>, and
-                        has no transactional support.</para>
-                        <para>You should set up proper username and password
-                        access on the shared database for everyone that will
-                        be using Toaster.
-                        You need administrator rights for the root account,
-                        which is not the same thing as root access on the
-                        machine.
-                        Here is an example that installs
-                        <filename>mysql-server</filename> and sets up
-                        some user accounts and the database.
-                        <literallayout class='monospaced'>
-     $ apt-get install mysql-server
-     $ mysql -u root
-     mysql> CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
-     mysql> GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
-     mysql> GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
-     mysql> CREATE DATABASE 'toaster';
-                        </literallayout>
-                        You need a separate clone of the
-                        <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>
-                        for the Database Server.
-                        This clone is only used for getting the latest Toaster
-                        files.
-                        You can set this up using the following Git command.
-                        Be sure to set up the directory outside of any
-                        Build Directories.
-                        <literallayout class='monospaced'>
-     $ git clone git://git.yoctoproject.org/poky
-                        </literallayout>
-                        In the separately cloned tree for the Database Server,
-                        edit the
-                        <filename>bitbake/lib/toaster/toastermain/settings.py</filename>
-                        file so that the <filename>DATABASES</filename> value
-                        points to the previously created database server.
-                        Use the username and password established
-                        earlier.
-                        Here is an example:
-                        <literallayout class='monospaced'>
-     $ cat /opt/bitbake/lib/toaster/toastermain/settings.py
-        ...
-     DATABASES = {
-         'default': {
-             'ENGINE': 'django.db.backends.mysql',
-             'NAME': 'toaster',
-             'USER': 'newuser',
-             'PASSWORD': 'password',
-             'HOST': '192.168.0.25',
-             'PORT': '3306',
-         }
-        ...
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Create the Database</emphasis>
-                        Use the following commands to create the default
-                        database structure:
-                        <literallayout class='monospaced'>
-     $ bitbake/lib/toaster/manage.py syncdb
-     $ bitbake/lib/toaster/manage.py migrate orm
-     $ bitbake/lib/toaster/manage.py migrate bldcontrol
-                        </literallayout>
-                        The interface asks you if you want to create a
-                        superuser.
-                        Do not skip this step.
-                        You will use the superuser account to access the
-                        administration interface and make changes to the
-                        Toaster configuration.
-                        </para></listitem>
-                    <listitem><para><emphasis>Select Where the Build Process Takes Place:</emphasis>
-                        You need to create three directories for storing
-                        build artifacts, downloading sources, and running
-                        builds.
-                        All three directories need to be writable by
-                        the user, which is "poky" in this example.
-                        The build artifacts directory needs to readable by the
-                        apache user.
-                        You also need free disk space in the range of
-                        100 Gbytes.
-                        Following are three suggested directories:
-                        <literallayout class='monospaced'>
-     /home/poky/buildartifacts/
-     /home/poky/build/
-     /home/poky/sources/
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Set Up the <filename>toasterconf.json</filename> File:</emphasis>
-                        <ulink url='https://wiki.yoctoproject.org/wiki/File:Toasterconf.json.txt.patch'>Download the hosted <filename>toasterconf.json</filename> file</ulink>
-                        from the Yocto Project wiki and edit it to suit your
-                        environment.
-                        For information on the relevant sections of the file,
-                        see the
-                        "<link linkend='toaster-json-files'>JSON Files</link>"
-                        section.</para>
-                        <para>After editing the file, load it by running
-                        the following:
-                        <literallayout class='monospaced'>
-     $ bitbake/lib/toaster/manage.py loadconf path-to-toasterconf.json-file
-                        </literallayout>
-                        For reference information on Toaster-specific
-                        <filename>manage.py</filename>, see the
-                        "<link linkend='toaster-useful-commands'>Useful Commands</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><emphasis>Check the Toaster Settings:</emphasis>
-                        Configure the build environment by running the
-                        following:
-                        <literallayout class='monospaced'>
-     $ bitbake/lib/toaster/manage.py checksettings
-                        </literallayout>
-                        When prompted, paste in the directory paths created
-                        previously during Step 7.
-                        For reference information on Toaster-specific
-                        <filename>manage.py</filename>, see the
-                        "<link linkend='toaster-useful-commands'>Useful Commands</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><emphasis>Install and Set Up the Web Server:</emphasis>
-                        For a production environment, it is recommended that
-                        you install and set up a front-end web server.
-                        This server allows for load balancing and
-                        multi-threading over Toaster and
-                        <ulink url='https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/'><filename>django</filename> WSGI</ulink>.
-                        Here is an example that uses Apache web server:
-                        <literallayout class='monospaced'>
-     $ apt-get install apache2 libapache2-mod-wsgi
-     $ a2enmod wsgi
-     $ cat /etc/apache2/sites-available/000-default.conf
-
-        ...
-
-     # the WSGIPythonPath is global
-     WSGIPythonPath /opt/bitbake/lib/toaster/
-
-        ...
-
-     #snip - in VirtualHost
-     WSGIScriptAlias / /opt/bitbake/lib/toaster/toastermain/wsgi.py
-
-     &lt;Directory //opt/bitbake/lib/toaster/toastermain/&gt;
-         &lt;Files wsgi.py&gt;
-             Require all granted
-         &lt;/Files&gt;
-     &lt;/Directory&gt;
-
-        ...
-                        </literallayout>
-                        You need to collect static media from Toaster and
-                        continue configuring Apache to serve that static
-                        media:
-                        <literallayout class='monospaced'>
-     $ mkdir /var/www.html/static &amp;&amp; cd /var/www.html/static
-     $ /opt bitbake/lib/toaster/manage.py collectstatic
-     $ cat /etc/apache2/sites-available/000-default.conf
-
-        ...
-
-     # in VirtualHost, AHEAD of the WSGIScriptAlias definition
-     Alias /static/ /var/www.html/static/
-
-     &lt;Directory /var/www.html/static/&gt;
-     Require all granted
-     &lt;/Directory&gt;
-
-        ...
-
-     WSGIScript Alias / /opt/bitbake/lib/toaster/toastermain/wsgi.py
-
-        ...
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Start Toaster:</emphasis>
-                        Synchronize the databases for Toaster, and then start
-                        up the web server.
-                        Here is an example that continues with the assumed
-                        components from the previous steps:
-                        <literallayout class='monospaced'>
-     $ /opt/bitbake/lib/toaster/manage.py syncdb
-     $ /opt/bitbake/lib/toaster/manage.py migrate orm
-     $ /opt/bitbake/lib/toaster/manage.py migrate bldcontrol
-
-     $ service apache2 restart
-                        </literallayout>
-                        For reference information on the
-                        <filename>manage.py</filename> commands used here,
-                        see the
-                        "<link linkend='toaster-useful-commands'>Useful Commands</link>"
-                        section.
-                        </para></listitem>
-                    <listitem><para><emphasis>Set up Build Control and Open the Web Interface:</emphasis>
-                        You need to run the build control manager.
-                        You can do this as shown in the following example:
-                        <literallayout class='monospaced'>
-     # as the "poky" user, start the runbuilds command in a loop (or put it in crontab!)
-     $ sudo -i -u poky
-     $ while true; do /opt/bitbake/lib/toaster/manage.py runbuilds; sleep 10; done
-
-     # open up the web interface
-     $ xdg-open http://[server-address]/toastergui/
-                        </literallayout>
-                        It is suggested that you enable build control by
-                        setting <filename>runbuilds</filename> in the
-                        <filename>crontab</filename> as follows:
-                        <literallayout class='monospaced'>
-     $ crontab -l
-     * * * * *  /opt/bitbake/lit/toaster/manage.py runbuilds
-                        </literallayout>
-                        </para></listitem>
-                    <listitem><para><emphasis>Open the Browser:</emphasis>
-                        Once the Apache server is running, connect to it with
-                        your favorite browser and verify that the Toaster
-                        interface comes up:
-                        <literallayout class='monospaced'>
-     http://localhost:8000/toastergui
-                        </literallayout>
-                        You can track accesses and errors in the Apache
-                        service logs.
-                        </para></listitem>
-                </orderedlist>
-            </para>
-        </section>
-    </section>
--->
-
-    <section id='using-the-toaster-web-interface'>
-        <title>Using the Toaster Web Interface</title>
-
-        <para>
-            The Toaster web interface allows you to do the following:
-            <itemizedlist>
-                <listitem><para>
-                    Browse published layers in the
-                    <ulink url='http://layers.openembedded.org'>OpenEmbedded Metadata Index</ulink>
-                    that are available for your selected version of the build
-                    system.
-                    </para></listitem>
-                <listitem><para>
-                    Import your own layers for building.
-                    </para></listitem>
-                <listitem><para>
-                    Add and remove layers from your configuration.
-                    </para></listitem>
-                <listitem><para>
-                    Set configuration variables.
-                    </para></listitem>
-                <listitem><para>
-                    Select a target or multiple targets to build.
-                    </para></listitem>
-                <listitem><para>
-                    Start your builds.
-                    </para></listitem>
-                <listitem><para>
-                    See what was built (recipes and packages) and what
-                    packages were installed into your final image.
-                    </para></listitem>
-                <listitem><para>
-                    Browse the directory structure of your image.
-                    </para></listitem>
-                <listitem><para>
-                    See the value of all variables in your build configuration,
-                    and which files set each value.
-                    </para></listitem>
-                <listitem><para>
-                    Examine error, warning and trace messages to aid in
-                    debugging.
-                    </para></listitem>
-                <listitem><para>
-                    See information about the BitBake tasks executed and
-                    reused during your build, including those that used
-                    shared state.
-                    </para></listitem>
-                <listitem><para>
-                    See dependency relationships between recipes, packages
-                    and tasks.
-                    </para></listitem>
-                <listitem><para>
-                    See performance information such as build time, task time,
-                    CPU usage, and disk I/O.
-                    </para></listitem>
-            </itemizedlist>
-        </para>
-
-        <section id='web-interface-videos'>
-            <title>Toaster Web Interface Videos</title>
+          <para>
+              If you want to build any other layers, you will need to
+              manually import them into your Toaster project, using the
+              "Import layer" page.
+              <imagedata fileref="figures/import-layer.png" align="center" width="9in" />
+          </para>
 
-            <para>
-                Following are several videos that show how to use the Toaster GUI:
-                <itemizedlist>
-                    <listitem><para><emphasis>Build Configuration:</emphasis>
-                        This
-                        <ulink url='https://www.youtube.com/watch?v=qYgDZ8YzV6w'>video</ulink>
-                        overviews and demonstrates build configuration for Toaster.
-                        </para></listitem>
-                    <listitem><para><emphasis>Build Custom Layers:</emphasis>
-                        This
-                        <ulink url='https://www.youtube.com/watch?v=QJzaE_XjX5c'>video</ulink>
-                        shows you how to build custom layers that are used with
-                        Toaster.
-                        </para></listitem>
-                    <listitem><para><emphasis>Toaster Homepage and Table Controls:</emphasis>
-                        This
-                        <ulink url='https://www.youtube.com/watch?v=QEARDnrR1Xw'>video</ulink>
-                        goes over the Toaster entry page, and provides
-                        an overview of the data manipulation capabilities of
-                        Toaster, which include search, sorting and filtering by
-                        different criteria.
-                        </para></listitem>
-                    <listitem><para><emphasis>Build Dashboard:</emphasis>
-                        This
-                        <ulink url='https://www.youtube.com/watch?v=KKqHYcnp2gE'>video</ulink>
-                        shows you the build dashboard, a page providing an
-                        overview of the information available for a selected build.
-                        </para></listitem>
-                    <listitem><para><emphasis>Image Information:</emphasis>
-                        This
-                        <ulink url='https://www.youtube.com/watch?v=XqYGFsmA0Rw'>video</ulink>
-                        walks through the information Toaster provides
-                        about images: packages installed and root file system.
-                        </para></listitem>
-                    <listitem><para><emphasis>Configuration:</emphasis>
-                        This
-                        <ulink url='https://www.youtube.com/watch?v=UW-j-T2TzIg'>video</ulink>
-                        provides Toaster build configuration information.
-                        </para></listitem>
-                    <listitem><para><emphasis>Tasks:</emphasis>
-                        This
-                        <ulink url='https://www.youtube.com/watch?v=D4-9vGSxQtw'>video</ulink>
-                        shows the information Toaster provides about the
-                        tasks run by the build system.
-                        </para></listitem>
-                    <listitem><para><emphasis>Recipes and Packages Built:</emphasis>
-                        This
-                        <ulink url='https://www.youtube.com/watch?v=x-6dx4huNnw'>video</ulink>
-                        shows the information Toaster provides about recipes
-                        and packages built.
-                        </para></listitem>
-                    <listitem><para><emphasis>Performance Data:</emphasis>
-                        This
-                        <ulink url='https://www.youtube.com/watch?v=qWGMrJoqusQ'>video</ulink>
-                        shows the build performance data provided by
-                        Toaster.
-                        </para></listitem>
-                </itemizedlist>
-            </para>
-        </section>
+      </section>
 
-        <section id='toaster-web-interface-preferred-version'>
-            <title>Building a Specific Recipe Given Multiple Versions</title>
+      <section id='toaster-web-interface-preferred-version'>
+          <title>Building a Specific Recipe Given Multiple Versions</title>
 
             <para>
                 Occasionally, a layer might provide more than one version of
@@ -1461,105 +674,4 @@
             </para>
         </section>
     </section>
-
-<!--
-        <section id='toaster-gui-vids-1'>
-            <title>Toaster Homepage and Table Controls</title>
-
-            <para>
-                This video goes over the Toaster entry page, and provides
-                an overview of the data manipulation capabilities of Toaster,
-                which include search, sorting and filtering by different
-                criteria.
-                <mediaobject>
-                    <videoobject>
-                        <videodata width="640" height="480" fileref="http://www.youtube.com/v/QEARDnrR1Xw"></videodata>
-                    </videoobject>
-                </mediaobject>
-            </para>
-        </section>
-
-        <section id='toaster-gui-vids-2'>
-            <title>Build Dashboard</title>
-
-            <para>
-                This video shows you the build dashboard, a page providing an
-                overview of the information available for a selected build.
-                <mediaobject>
-                    <videoobject>
-                        <videodata width="640px" height="480px" fileref="http://www.youtube.com/v/KKqHYcnp2gE"></videodata>
-                    </videoobject>
-                </mediaobject>
-            </para>
-        </section>
-
-        <section id='toaster-gui-vids-3'>
-            <title>Image Information</title>
-
-            <para>
-                This video walks through the information Toaster provides
-                about images: packages installed and root file system.
-                <mediaobject>
-                    <videoobject>
-                        <videodata width="640px" height="480px" fileref="http://www.youtube.com/v/XqYGFsmA0Rw"></videodata>
-                    </videoobject>
-                </mediaobject>
-            </para>
-        </section>
-
-        <section id='toaster-gui-vids-4'>
-            <title>Configuration</title>
-
-            <para>
-                This video shows the information Toaster provides about build
-                configuration.
-                <mediaobject>
-                    <videoobject>
-                        <videodata width="640px" height="480px" fileref="http://www.youtube.com/v/UW-j-T2TzIg"></videodata>
-                    </videoobject>
-                </mediaobject>
-            </para>
-        </section>
-
-        <section id='toaster-gui-vids-5'>
-            <title>Tasks</title>
-
-            <para>
-                This video shows the information Toaster provides about the
-                tasks run by the build system.
-                <mediaobject>
-                    <videoobject>
-                        <videodata width="640px" height="480px" fileref="http://www.youtube.com/v/D4-9vGSxQtw"></videodata>
-                    </videoobject>
-                </mediaobject>
-            </para>
-        </section>
-
-        <section id='toaster-gui-vids-6'>
-            <title>Recipes and Packages Built</title>
-
-            <para>
-                This video shows the information Toaster provides about recipes
-                and packages built.
-                <mediaobject>
-                    <videoobject>
-                        <videodata width="640px" height="480px" fileref="http://www.youtube.com/v/x-6dx4huNnw"></videodata>
-                    </videoobject>
-                </mediaobject>qYgDZ8YzV6w
-            </para>
-        </section>
-        <section id='toaster-gui-vids-7'>
-            <title>Performance Data</title>
-
-            <para>
-                This video shows the build performance data provided by
-                Toaster.
-                <mediaobject>
-                    <videoobject>
-                        <videodata width="640px" height="480px" fileref="http://www.youtube.com/v/qWGMrJoqusQ"></videodata>
-                    </videoobject>
-                </mediaobject>
-            </para>
-        </section>
--->
 </chapter>
diff --git a/yocto-poky/documentation/toaster-manual/toaster-manual.xml b/yocto-poky/documentation/toaster-manual/toaster-manual.xml
index 59dca8f..7a8912a 100644
--- a/yocto-poky/documentation/toaster-manual/toaster-manual.xml
+++ b/yocto-poky/documentation/toaster-manual/toaster-manual.xml
@@ -41,6 +41,11 @@
                 <date>October 2015</date>
                 <revremark>Released with the Yocto Project 2.0 Release.</revremark>
             </revision>
+            <revision>
+                <revnumber>2.1</revnumber>
+                <date>April 2016</date>
+                <revremark>Released with the Yocto Project 2.1 Release.</revremark>
+            </revision>
        </revhistory>
 
     <copyright>
diff --git a/yocto-poky/documentation/tools/mega-manual.sed b/yocto-poky/documentation/tools/mega-manual.sed
index 088a99b..5a3bdf9 100644
--- a/yocto-poky/documentation/tools/mega-manual.sed
+++ b/yocto-poky/documentation/tools/mega-manual.sed
@@ -2,32 +2,32 @@
 # This style is for manual folders like "yocto-project-qs" and "poky-ref-manual".
 # This is the old way that did it.  Can't do that now that we have "bitbake-user-manual" strings
 # in the mega-manual.
-# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
+# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/poky-ref-manual\/poky-ref-manual.html#/\"link\" href=\"#/g
 
 # Processes all other manuals (<word>-<word> style) except for the BitBake User Manual because
 # it is not included in the mega-manual.
 # This style is for manual folders that use two word, which is the standard now (e.g. "ref-manual").
 # This was the one-liner that worked before we introduced the BitBake User Manual, which is
 # not in the mega-manual.
-# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
+# s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
 
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/adt-manual\/adt-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/toaster-manual\/toaster-manual.html#/\"link\" href=\"#/g
-s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/sdk-manual\/sdk-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/bsp-guide\/bsp-guide.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/dev-manual\/dev-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/kernel-dev\/kernel-dev.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/profile-manual\/profile-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/ref-manual\/ref-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/toaster-manual\/toaster-manual.html#/\"link\" href=\"#/g
+s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/yocto-project-qs\/yocto-project-qs.html#/\"link\" href=\"#/g
 
 # Process cases where just an external manual is referenced without an id anchor
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
-s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.0\/toaster-manual\/toaster-manual.html\" target=\"_top\">Toaster User Manual<\/a>/Toaster User Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/sdk-manual\/sdk-manual.html\" target=\"_top\">Yocto Project Software Development Kit (SDK) Developer's Guide<\/a>/Yocto Project Software Development Kit (SDK) Developer's Guide/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/profile-manual\/profile-manual.html\" target=\"_top\">Yocto Project Profiling and Tracing Manual<\/a>/Yocto Project Profiling and Tracing Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
+s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/2.1\/toaster-manual\/toaster-manual.html\" target=\"_top\">Toaster User Manual<\/a>/Toaster User Manual/g
diff --git a/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml b/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml
index 5315dfe..c09e971 100644
--- a/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml
+++ b/yocto-poky/documentation/yocto-project-qs/yocto-project-qs.xml
@@ -60,7 +60,7 @@
         </para>
 
         <para>
-            This quick start is written so that you can quickly get a host
+            This quick start is written so that you can quickly get a
             build host set up to use the Yocto Project and then build some
             Linux images.
             Rather than go into great detail about the Yocto Project and its
@@ -71,7 +71,7 @@
             basic understanding of what the Yocto Project is and how to use
             some of its core components.
             You will also have worked through steps to produce two images:
-            one suitable for emulation and one that can be used on actual
+            one that is suitable for emulation and one that boots on actual
             hardware.
             The examples highlight the ease with which you can use the
             Yocto Project to create images for multiple types of hardware.
@@ -249,7 +249,7 @@
                 Git, tar, and Python.
                 <itemizedlist>
                     <listitem><para>
-                        Git 1.7.8 or greater
+                        Git 1.8.3.1 or greater
                         </para></listitem>
                     <listitem><para>
                         tar 1.24 or greater
@@ -360,7 +360,7 @@
      remote: Total 226790 (delta 165212), reused 225887 (delta 164327)
      Receiving objects: 100% (226790/226790), 100.98 MiB | 263 KiB/s, done.
      Resolving deltas: 100% (165212/165212), done.
-     $ git checkout &DISTRO_NAME;
+     $ git checkout &DISTRO_NAME_NO_CAP;
                 </literallayout>
                 You can also get the Yocto Project Files by downloading
                 Yocto Project releases from the
@@ -381,8 +381,19 @@
 
         <para>
             Now that you have your system requirements in order, you can give
-            the Yocto Project a try.
-            This section presents steps that let you do the following:
+            Yocto Project a try.
+            You can try out Yocto Project using either the command-line
+            interface or using Toaster, which uses a graphical user
+            interface.
+            If you want to try out the Yocto Project using a GUI, see the
+            <ulink url='&YOCTO_DOCS_TOAST_URL;'>Toaster User Manual</ulink>
+            for information on how to install and set up Toaster.
+        </para>
+
+        <para>
+            You can try out the Yocto Project using the command-line interface
+            by finishing this quick start, which presents steps that let you
+            do the following:
             <itemizedlist>
                 <listitem><para>
                     Build a <filename>qemux86</filename> reference image
@@ -453,12 +464,12 @@
                     Release:
                     <literallayout class='monospaced'>
      $ cd ~/poky
-     $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
+     $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP;
                     </literallayout>
                     Git's <filename>checkout</filename> command checks out
                     the current Yocto Project release into a local branch
                     whose name matches the release (i.e.
-                    <filename>&DISTRO_NAME;</filename>).
+                    <filename>&DISTRO_NAME_NO_CAP;</filename>).
                     The local branch tracks the upstream branch of the
                     same name.
                     Creating your own branch based on the released
@@ -539,7 +550,7 @@
                             in the target image.</para>
                             <para>For additional package manager selection
                             information, see the
-                            "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'><filename>package*.bbclass</filename></ulink>"
+                            "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'><filename>package.bbclass</filename></ulink>"
                             section in the Yocto Project Reference Manual.
                             </para></listitem>
                     </itemizedlist>
@@ -587,7 +598,7 @@
             </orderedlist>
         </para>
 
-        <para>
+        <para id='qs-minnowboard-example'>
             The following steps show how easy it is to set up to build an
             image for a new machine.
             These steps build an image for the MinnowBoard MAX, which is
@@ -610,17 +621,36 @@
                     Building an image for the MinnowBoard MAX requires the
                     <filename>meta-intel</filename> layer.
                     Use the <filename>git clone</filename> command to create
-                    a local copy of the repository:
+                    a local copy of the repository inside your
+                    <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
+                    which is <filename>poky</filename> in this example:
                     <literallayout class='monospaced'>
+     $ cd $HOME/poky
      $ git clone git://git.yoctoproject.org/meta-intel
      Cloning into 'meta-intel'...
-     remote: Counting objects: 10824, done.
-     remote: Compressing objects: 100% (3508/3508), done.
-     remote: Total 10824 (delta 6219), reused 10580 (delta 5975)
-     Receiving objects: 100% (10824/10824), 2.72 MiB | 482.00 KiB/s, done.
-     Resolving deltas: 100% (6219/6219), done.
+     remote: Counting objects: 11988, done.
+     remote: Compressing objects: 100% (3884/3884), done.
+     Receiving objects: 100% (11988/11988), 2.93 MiB | 2.51 MiB/s, done.
+     remote: Total 11988 (delta 6881), reused 11752 (delta 6645)
+     Resolving deltas: 100% (6881/6881), done.
      Checking connectivity... done.
                     </literallayout>
+                    By default when you clone a Git repository, the
+                    "master" branch is checked out.
+                    Before you build your image that uses the
+                    <filename>meta-intel</filename> layer, you must be
+                    sure that both repositories
+                    (<filename>meta-intel</filename> and
+                    <filename>poky</filename>) are using the same releases.
+                    Consequently, you need to checkout out the
+                    "<filename>&DISTRO_NAME_NO_CAP;</filename>" release after
+                    cloning <filename>meta-intel</filename>:
+                    <literallayout class='monospaced'>
+     $ cd $HOME/poky/meta-intel
+     $ git checkout &DISTRO_NAME_NO_CAP;
+     Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin.
+     Switched to a new branch '&DISTRO_NAME_NO_CAP;'
+                    </literallayout>
                     </para></listitem>
                 <listitem><para><emphasis>Configure the Build:</emphasis>
                     To configure the build, you edit the
@@ -639,7 +669,8 @@
                     <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
                     variable.
                     <literallayout class='monospaced'>
-     $ bitbake-layers add-layer "$HOME/source/poky/meta-intel"
+     $ cd $HOME/poky/build
+     $ bitbake-layers add-layer "$HOME/poky/meta-intel"
      $ echo 'MACHINE = "intel-corei7-64"' >> conf/local.conf
                     </literallayout>
                     <note><title>Notes</title>
@@ -725,7 +756,7 @@
 
         <para>
             If you completed all the steps in the previous section then
-            congratulations to you!
+            congratulations!
             What now?
         </para>
 
@@ -740,37 +771,42 @@
                     Visiting this site is a good way to familiarize yourself
                     with the overall project.
                     </para></listitem>
-                <listitem><para><emphasis>Explore Development Models:</emphasis>
-                    You can see the
-                    "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-model'>Common Development Models</ulink>"
-                    section in the Yocto Project Development Manual
-                    to get an overview of the various ways by which
-                    you can use the Yocto Project to develop projects.
+                <listitem><para><emphasis>Look Through the Yocto Project Development Manual:</emphasis>
+                    The
+                    <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-intro'>Yocto Project Development Manual</ulink>
+                    is a great place to get a feel for how to use the Yocto
+                    Project.
+                    The manual contains conceptual and procedural information
+                    that covers
+                    <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-model'>common development models</ulink>
+                    and introduces
+                    <ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-newbie'>the Yocto Project open source development environment</ulink>.
+                    The manual also contains several targeted sections that
+                    cover specific
+                    <ulink url='&YOCTO_DOCS_DEV_URL;#extendpoky'>common tasks</ulink>
+                    such as understanding and creating layers, customizing
+                    images, writing new recipes, working with libraries, and
+                    configuring and patching the kernel.
                     </para></listitem>
-                <listitem><para><emphasis>Learn Some Open Source Basics:</emphasis>
-                    If you are new to the open source environment, you might
-                    read the
-                    "<ulink url='&YOCTO_DOCS_DEV_URL;#dev-manual-newbie'>The Yocto Project Open Source Development Environment</ulink>"
-                    chapter of the Yocto Project Development Manual.
-                    This chapter presents overview material for open source
-                    development in the context of the Yocto Project.
-                    </para></listitem>
-                <listitem><para><emphasis>Learn About Application Development:</emphasis>
-                    If your primary interests lie in developing applications,
-                    you can reference the
-                    <ulink url='&YOCTO_DOCS_ADT_URL;#adt-manual-intro'>Yocto Project Application Developer's Guide</ulink>.
+                <listitem><para><emphasis>Look Through the Yocto Project Software Development Kit (SDK) Developer's Guide:</emphasis>
+                    The
+                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-intro'>Yocto Project Software Development Kit (SDK) Developer's Guide</ulink>
+                    describes how to use both the
+                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-using-the-standard-sdk'>standard SDK</ulink>
+                    and the
+                    <ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>extensible SDK</ulink>,
+                    which are used primarily for application development.
+                    This manual also provides an example workflow that uses
+                    the popular <trademark class='trade'>Eclipse</trademark>
+                    development environment.
+                    See the
+                    "<ulink url='&YOCTO_DOCS_SDK_URL;#workflow-using-eclipse'>Workflow using Eclipse™</ulink>"
+                    section.
                     </para></listitem>
                 <listitem><para><emphasis>Learn About Board Support Packages (BSPs):</emphasis>
                     If you want to learn about BSPs, see the
                     <ulink url='&YOCTO_DOCS_BSP_URL;#bsp'>Yocto Project Board Support Packages (BSP) Developer's Guide</ulink>.
                     </para></listitem>
-                <listitem><para><emphasis>Learn About Using Eclipse With the Yocto Project:</emphasis>
-                    If you are an Eclipse user, you can learn about using the
-                    Yocto Project in that development environment by reading
-                    the
-                    "<ulink url='&YOCTO_DOCS_DEV_URL;#workflow-using-the-adt-and-eclipse'>Workflow Using the ADT and Eclipse™</ulink>"
-                    section in the Yocto Project Development Manual.
-                    </para></listitem>
                 <listitem><para><emphasis>Learn About Toaster:</emphasis>
                     Toaster is a web interface to the Yocto Project's
                     OpenEmbedded build system.
@@ -778,13 +814,30 @@
                     create images, see the
                     <ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-intro'>Toaster User Manual</ulink>.
                     </para></listitem>
-                <listitem><para><emphasis>Explore Yocto Project Common Tasks and Technical Details:</emphasis>
-                    If you are interested in a mix of common tasks that have to
-                    do with project develop using the Yocto Project, see the
-                    "<ulink url='&YOCTO_DOCS_DEV_URL;#extendpoky'>Common Tasks</ulink>"
-                    section of the Yocto Project Development Manual.
-                    If you want more detail, see the
-                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-manual-intro'>Yocto Project Reference Manual</ulink>.
+                <listitem><para><emphasis>Have Available the Yocto Project Reference Manual</emphasis>
+                    The
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-manual-intro'>Yocto Project Reference Manual</ulink>,
+                    unlike the rest of the Yocto Project manual set, is
+                    comprised of material suited for reference rather than
+                    procedures.
+                    You can get
+                    <ulink url='&YOCTO_DOCS_REF_URL;#usingpoky'>build details</ulink>,
+                    a
+                    <ulink url='&YOCTO_DOCS_REF_URL;#closer-look'>closer look</ulink>
+                    at how the pieces of the Yocto Project development
+                    environment work together, information on various
+                    <ulink url='&YOCTO_DOCS_REF_URL;#technical-details'>technical details</ulink>,
+                    guidance on
+                    <ulink url='&YOCTO_DOCS_REF_URL;#migration'>migrating to a newer Yocto Project release</ulink>,
+                    reference material on the
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-structure'>directory structure</ulink>,
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes'>classes</ulink>,
+                    and
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-tasks'>tasks</ulink>.
+                    The Yocto Project Reference Manual also contains a fairly
+                    comprehensive
+                    <ulink url='&YOCTO_DOCS_REF_URL;#ref-variables-glossary'>glossary of variables</ulink>
+                    used within the Yocto Project.
                     </para></listitem>
             </itemizedlist>
         </para>
diff --git a/yocto-poky/meta-poky/classes/poky-sanity.bbclass b/yocto-poky/meta-poky/classes/poky-sanity.bbclass
new file mode 100644
index 0000000..81cd2eb
--- /dev/null
+++ b/yocto-poky/meta-poky/classes/poky-sanity.bbclass
@@ -0,0 +1,46 @@
+# Provide some extensions to sanity.bbclass to handle poky-specific conf file upgrades
+
+python poky_update_bblayersconf() {
+    current_version = int(d.getVar('POKY_BBLAYERS_CONF_VERSION', True) or -1)
+    latest_version = int(d.getVar('REQUIRED_POKY_BBLAYERS_CONF_VERSION', True) or -1)
+    if current_version == -1 or latest_version == -1:
+        # one or the other missing => malformed configuration
+        raise NotImplementedError("You need to update bblayers.conf manually for this version transition")
+
+    success = True
+
+    # check for out of date templateconf.cfg file
+    lines = []
+    fn = os.path.join(d.getVar('TOPDIR', True), 'conf/templateconf.cfg')
+
+    lines = sanity_conf_read(fn)
+    index, meta_yocto_line = sanity_conf_find_line(r'^meta-yocto/', lines)
+    if meta_yocto_line:
+        lines[index] = meta_yocto_line.replace('meta-yocto', 'meta-poky')
+        with open(fn, "w") as f:
+            f.write(''.join(lines))
+        bb.note("Your conf/templateconf.cfg file was updated from meta-yocto to meta-poky")
+
+    # add any additional layer checks/changes here
+
+    if success:
+        current_version = latest_version
+        bblayers_fn = bblayers_conf_file(d)
+        lines = sanity_conf_read(bblayers_fn)
+        # sanity_conf_update() will erroneously find a match when the var name
+        # is used in a comment, so do our own here. The code below can be
+        # removed when sanity_conf_update() is fixed in OE-Core.
+        #sanity_conf_update(bblayers_fn, lines, 'POKY_BBLAYERS_CONF_VERSION', current_version)
+        index, line = sanity_conf_find_line(r'^POKY_BBLAYERS_CONF_VERSION', lines)
+        lines[index] = 'POKY_BBLAYERS_CONF_VERSION = "%d"\n' % current_version
+        with open(bblayers_fn, "w") as f:
+            f.write(''.join(lines))
+        bb.note("Your conf/bblayers.conf has been automatically updated.")
+    if success:
+        return
+
+    raise NotImplementedError("You need to update bblayers.conf manually for this version transition")
+}
+
+# ensure our function runs after the OE-Core one
+BBLAYERS_CONF_UPDATE_FUNCS += "conf/bblayers.conf:POKY_BBLAYERS_CONF_VERSION:REQUIRED_POKY_BBLAYERS_CONF_VERSION:poky_update_bblayersconf"
diff --git a/yocto-poky/meta-poky/conf/bblayers.conf.sample b/yocto-poky/meta-poky/conf/bblayers.conf.sample
new file mode 100644
index 0000000..8b1cbdf
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/bblayers.conf.sample
@@ -0,0 +1,12 @@
+# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf
+# changes incompatibly
+POKY_BBLAYERS_CONF_VERSION = "2"
+
+BBPATH = "${TOPDIR}"
+BBFILES ?= ""
+
+BBLAYERS ?= " \
+  ##OEROOT##/meta \
+  ##OEROOT##/meta-poky \
+  ##OEROOT##/meta-yocto-bsp \
+  "
diff --git a/yocto-poky/meta-poky/conf/conf-notes.txt b/yocto-poky/meta-poky/conf/conf-notes.txt
new file mode 100644
index 0000000..2f2932b
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/conf-notes.txt
@@ -0,0 +1,7 @@
+Common targets are:
+    core-image-minimal
+    core-image-sato
+    meta-toolchain
+    meta-ide-support
+
+You can also run generated qemu images with a command like 'runqemu qemux86'
diff --git a/yocto-poky/meta-poky/conf/distro/include/maintainers.inc b/yocto-poky/meta-poky/conf/distro/include/maintainers.inc
new file mode 100644
index 0000000..dbc33fc
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/distro/include/maintainers.inc
@@ -0,0 +1,749 @@
+# Yocto Project / OpenEmbedded-Core (OE-Core) Maintainers File
+#
+# This file contains a list of recipe maintainers.
+#
+# Please submit any patches against recipes in meta to the 
+# OE-Core mail list (openembedded-core@lists.openembedded.org)
+# For recipes in meta-yocto please use the Poky list (poky@yoctoproject.org)
+#
+# If you have problems with or questions about a particular recipe, feel
+# free to contact the maintainer directly (cc:ing the appropriate mailing list
+# puts it in the archive and helps other people who might have the same
+# questions in the future), but please try to do the following first:
+#
+#  - look in the Yocto Project Bugzilla
+#    (http://bugzilla.yoctoproject.org/) to see if a problem has
+#    already been reported
+#
+# - look through recent entries of the appropriate mailing list archives
+#   (http://lists.linuxtogo.org/pipermail/openembedded-core or
+#    https://lists.yoctoproject.org/pipermail/poky/) to see if other
+#   people have run into similar problems or had similar questions
+#   answered.
+#
+# The format is as a bitbake variable override for each recipe
+#
+#	RECIPE_MAINTAINER_pn-<recipe name> = "Full Name <address@domain>"
+#
+# Please keep this list in alphabetical order.
+#
+RECIPE_MAINTAINER_pn-acl = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-acpid = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-adwaita-icon-theme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-alsa-lib = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-alsa-plugins = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-alsa-state = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-alsa-tools = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-alsa-utils = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-alsa-utils-scripts = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-apmd = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-apr = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-apr-util = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-apt = "Aníbal Limón <anibal.limon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-aspell = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-at = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-at-spi2-atk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-at-spi2-core = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-atk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-attr = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-augeas = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-autoconf = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-autogen-native = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-automake = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-avahi = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-avahi-ui = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-babeltrace = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-base-files = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-base-passwd = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-bash = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-bc = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-bdwgc = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-beecrypt = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-bigreqsproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-bind = "Kai Kang <kai.kang@windriver.com>"
+RECIPE_MAINTAINER_pn-binutils = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-bison = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-bjam-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-blktool = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-blktrace = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-bluez5 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-boost = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-btrfs-tools = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-build-appliance-image = "Cristian Iorga <cristian.iorga@intel.com>"
+RECIPE_MAINTAINER_pn-build-compare = "Randy Witt <randy.e.witt@linux.intel.com>"
+RECIPE_MAINTAINER_pn-builder = "Cristian Iorga <cristian.iorga@intel.com>"
+RECIPE_MAINTAINER_pn-buildtools-tarball = "Cristian Iorga <cristian.iorga@intel.com>"
+RECIPE_MAINTAINER_pn-busybox = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-byacc = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-bzip2 = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-ca-certificates = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-cairo = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-calibrateproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-ccache = "Wenzong Fan <wenzong.fan@windriver.com>"
+RECIPE_MAINTAINER_pn-cdrtools-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-chkconfig = "Wenzong Fan <wenzong.fan@windriver.com>"
+RECIPE_MAINTAINER_pn-chkconfig-alternatives-native = "Wenzong Fan <wenzong.fan@windriver.com>"
+RECIPE_MAINTAINER_pn-chrpath = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-gst-3.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-clutter-gtk-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-cmake = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-cogl-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-compositeproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-connman = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-connman-conf = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-connman-gnome = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-console-tools = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-consolekit = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-core-image-base = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-clutter = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-directfb = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-full-cmdline = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-kernel-dev = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-lsb = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-lsb-dev = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-lsb-sdk = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-minimal = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-minimal-dev = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-minimal-initramfs = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-minimal-mtdutils = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-rt = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-rt-sdk = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-sato = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-sato-dev = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-sato-sdk = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-core-image-x11 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-coreutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-cpio = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-cracklib = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-createrepo = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-cronie = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-cross-localedef-native = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-cups = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-curl = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-cwautomacros = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-damageproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-db = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-dbus = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-dbus-glib = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-dbus-test = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-dbus-wait = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-desktop-file-utils-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-dhcp = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-diffstat = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-diffutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-directfb = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-directfb-examples = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-distcc = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-distcc-config = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-dmxproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-docbook-dsssl-stylesheets-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-docbook-sgml-dtd-3.1-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-docbook-sgml-dtd-4.1-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-docbook-sgml-dtd-4.5-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-docbook-utils-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-docbook-xml-dtd4 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-docbook-xsl-stylesheets = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-dosfstools = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-dpkg = "Aníbal Limón <anibal.limon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-dri2proto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-dri3proto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-dropbear = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-dtc = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-e2fsprogs = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-ed = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-eee-acpi-scripts = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-efilinux = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-elfutils = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-enchant = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-encodings = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-epiphany = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-ethtool = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-eudev = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-expat = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-file = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-findutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-fixesproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-flac = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-flex = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-font-alias = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-font-util = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-fontconfig = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-fontsproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-foomatic-filters = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-formfactor = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-freetype = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-fstests = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-gawk = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-gcc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-gcc-runtime = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-gcc-sanitizers = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-gcc-source = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-gccmakedep = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-gconf = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gcr = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-gdb = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-gdbm = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-gdk-pixbuf = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gettext = "Wenzong Fan <wenzong.fan@windriver.com>"
+RECIPE_MAINTAINER_pn-gettext-minimal-native = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-ghostscript = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-git = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-glew = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-glib-2.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-glib-networking = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-glibc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-glibc-initial = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-glproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gmp = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-gnome-common = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-desktop-testing = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-desktop3 = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-gnome-doc-utils = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gnu-config = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-gnu-efi = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-gnupg = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-gnutls = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-gperf = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-gpgme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-grep = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-groff = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-grub = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gsettings-desktop-schemas = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gst-player = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-libav = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-omx = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-meta-base = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-bad = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-base = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-good = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-ugly = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gstreamer1.0-rtsp-server = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-gtk+ = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gtk+3 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gtk-doc-stub = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gtk-engines = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gtk-icon-utils-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-gtk-sato-engine = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-guile = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-guilt-native = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-gummiboot = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-gzip = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-harfbuzz = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-hdparm = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-help2man-native = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-hicolor-icon-theme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-hostap-conf = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-hostap-utils = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-hwlatdetect = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-icecc-create-env-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-icu = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-boot = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-framework = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-boot = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-initramfs-live-install-efi = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-initscripts = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-inputproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-intltool = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-iproute2 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-iptables = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-iputils = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-irda-utils = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-iso-codes = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-iw = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libjpeg-turbo = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-json-c = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-json-glib = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-kbd = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-kbproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-kconfig-frontends = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-kern-tools-native = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-kernelshark = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-kernel-devsrc = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-kexec-tools = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-keymaps = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-kmod = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-lame = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-latencytop = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-ldconfig-native = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-leafpad = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-less = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-liba52 = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libacpi = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libaio = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libarchive = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libart-lgpl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libassuan = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libatomic-ops = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libav = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libbsd = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libcap = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libcgroup = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libcheck = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libclass-isa-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libconvert-asn1-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libcroco = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libdaemon = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libdmx = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libdrm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libdumpvalue-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libenv-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libepoxy = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-liberation-fonts = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libevdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libevent = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libexif = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libfakekey = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libffi = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libfile-checktree-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libfm = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libfm-extra = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libfontenc = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libgcc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-libgcrypt = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libgfortran = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-libglade = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libglu = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libgpg-error = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libi18n-collate-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libical = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libice = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libiconv = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libid3tag = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libidn = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libinput = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libjson = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libksba = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libmad = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libmatchbox = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libmpc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-libnewt = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libnewt-python = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libnfsidmap = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libnl = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libnotify = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libnss-mdns = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libogg = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libomxil = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libowl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libpam = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libpcap = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libpciaccess = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libpcre = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libpfm4 = "Matthew McClintock <msm@freescale.com>"
+RECIPE_MAINTAINER_pn-libpng = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libpng12 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libpod-plainer-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libproxy = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libpthread-stubs = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-librsvg = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libsamplerate0 = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libsdl = "Kai Kang <kai.kang@windriver.com>"
+RECIPE_MAINTAINER_pn-libsdl2 = "Kai Kang <kai.kang@windriver.com>"
+RECIPE_MAINTAINER_pn-libsecret = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libsm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libsndfile1 = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libsoup-2.4 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libtasn1 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libtheora = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libtimedate-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libtirpc = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-libtool = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libunistring = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-liburcu = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-liburi-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libusb-compat = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libusb1 = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libuser = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-libvorbis = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-libwebp = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libwnck3 = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libx11 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libx11-diet = "Kai Kang <kai.kang@windriver.com>"
+RECIPE_MAINTAINER_pn-libxau = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxcalibrate = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxcb = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxcomposite = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxcursor = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxdamage = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxdmcp = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxext = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxfixes = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxfont = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxft = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxi = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxinerama = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxkbcommon = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxkbfile = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxml-namespacesupport-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-parser-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-sax-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml-simple-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-libxml2 = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-libxmu = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxpm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxrandr = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxrender = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxres = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxscrnsaver = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxsettings-client = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxshmfence = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxslt = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-libxt = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxtst = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxv = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxvmc = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxxf86dga = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxxf86misc = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libxxf86vm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-libyaml = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-lighttpd = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-linux-dummy = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-linux-firmware = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-linux-libc-headers = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-linux-yocto = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-linux-yocto-dev = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-linux-yocto-rt = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-linuxdoc-tools-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-logrotate = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-lrzsz = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-lsb = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-lsbinitscripts = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-lsbtest = "Yi Zhao <yi.zhao@windriver.com>"
+RECIPE_MAINTAINER_pn-lsof = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-ltp = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-lttng-modules = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-lttng-tools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-lttng-ust = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-lz4 = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-lzo = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-lzop = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-m4 = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-mailx = "Kai Kang <kai.kang@windriver.com>"
+RECIPE_MAINTAINER_pn-make = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-makedepend = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-makedevs = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-man = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-man-pages = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-matchbox-config-gtk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-desktop = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-desktop-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-keyboard = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-panel-2 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-session = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-session-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-terminal = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-theme-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-matchbox-wm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-mc = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-mdadm = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-menu-cache = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-mesa = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-mesa-demos = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-mesa-gl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-meta-ide-support = "Cristian Iorga <cristian.iorga@intel.com>"
+RECIPE_MAINTAINER_pn-meta-toolchain = "Cristian Iorga <cristian.iorga@intel.com>"
+RECIPE_MAINTAINER_pn-mingetty = "Kai Kang <kai.kang@windriver.com>"
+RECIPE_MAINTAINER_pn-mini-x-session = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-minicom = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-mkelfimage = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-mkfontdir = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-mkfontscale = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-mklibs-native = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-mktemp = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-mobile-broadband-provider-info = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-modutils-initscripts = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-mpeg2dec = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-mpfr = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-msmtp = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-mtd-utils = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-mtdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-mtools = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-mx-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-nasm = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-nativesdk-qemu-helper = "Aníbal Limón <anibal.limon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-ncurses = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-neard = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-neon = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-net-tools = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-netbase = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-nettle = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-nfs-export-root = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-nfs-utils = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-npth = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-nspr = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-nss = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-ofono = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-oh-puzzles = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-openjade-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-opensp = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-openssh = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-openssl = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-opkg = "Alejandro del Castillo <alejandro.delcastillo@ni.com>"
+RECIPE_MAINTAINER_pn-opkg-arch-config = "Alejandro del Castillo <alejandro.delcastillo@ni.com>"
+RECIPE_MAINTAINER_pn-opkg-keyrings = "Alejandro del Castillo <alejandro.delcastillo@ni.com>"
+RECIPE_MAINTAINER_pn-opkg-utils = "Alejandro del Castillo <alejandro.delcastillo@ni.com>"
+RECIPE_MAINTAINER_pn-oprofile = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-oprofileui = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-oprofileui-server = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-orc = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-ossp-uuid = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-p11-kit = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-package-index = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-base = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-boot = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-buildessential = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-clutter = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-device-devel = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-directfb = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-full-cmdline = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-lsb = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-nfs = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-sdk = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-ssh-dropbear = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-ssh-openssh = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-standalone-sdk-target = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-tools-debug = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-tools-profile = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-tools-testapps = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-x11 = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-x11-base = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-x11-sato = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-core-x11-xserver = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-packagegroup-self-hosted = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-pango = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-parted = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-patch = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-pax = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-pax-utils = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-pciutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-pcmanfm = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-pcmciautils = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-perf = "Bruce Ashfield <bruce.ashfield@windriver.com>"
+RECIPE_MAINTAINER_pn-perl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-perl-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-piglit = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-pigz = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-pinentry = "Armin Kuster <akuster808@gmail.com>"
+RECIPE_MAINTAINER_pn-pixman = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-pkgconfig = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-pm-utils = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-pointercal = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-pong-clock = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-popt = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-portmap = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-powertop = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-ppp = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-ppp-dialin = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-prelink = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-presentproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-procps = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-pseudo = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-psmisc = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-psplash = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-pulseaudio = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-pulseaudio-client-conf-sato = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-puzzles = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-python = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-async = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-dbus = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-distribute = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-docutils = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-git = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-gitdb = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-imaging = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-mako = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-nose = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-numpy = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-pexpect = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-pycairo = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-pycurl = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-pygobject = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-pygtk = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-pyrex = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-scons = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-scons-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-setuptools = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-smartpm = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python-smmap = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python3 = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python3-distribute = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python3-native = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python3-pip = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-python3-setuptools = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-qemu = "Aníbal Limón <anibal.limon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-qemu-helper-native = "Aníbal Limón <anibal.limon@linux.intel.com>"
+RECIPE_MAINTAINER_pn-quilt = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-quota = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-randrproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-readline = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-recordproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-remake = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-renderproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-resolvconf = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-resourceproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-rgb = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-rpcbind = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-rpm = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-rpmresolve = "Mark Hatle <mark.hatle@windriver.com>"
+RECIPE_MAINTAINER_pn-rsync = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-rt-tests = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-ruby = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-run-postinsts = "Cristian Iorga <cristian.iorga@intel.com>"
+RECIPE_MAINTAINER_pn-rxvt-unicode = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-sato-icon-theme = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-sato-screenshot = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-sbc = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-screen = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-scrnsaverproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-sed = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-setserial = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-settings-daemon = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-sgml-common = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-sgmlspl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-shadow = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-shadow-securetty = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-shadow-sysroot = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-shared-mime-info = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-shutdown-desktop = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-slang = "Kai Kang <kai.kang@windriver.com>"
+RECIPE_MAINTAINER_pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-speex = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-speexdsp = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-sqlite3 = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-squashfs-tools = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-startup-notification = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-stat = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-strace = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-subversion = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER_pn-sudo = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-swabber-native = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-swig = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-sysfsutils = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-sysklogd = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-syslinux = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-sysprof = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-sysstat = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-compat-units = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-serialgetty = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemd-systemctl-native = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-systemtap = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-systemtap-uprobes = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-sysvinit = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-sysvinit-inittab = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-taglib = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-tar = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-tcf-agent = "Randy Witt <randy.e.witt@linux.intel.com>"
+RECIPE_MAINTAINER_pn-tcl = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-tcp-wrappers = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-texi2html = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-texinfo = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-tiff = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-time = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-tiny-init = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-trace-cmd = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-tremor = "Tanu Kaskinen <tanuk@iki.fi>"
+RECIPE_MAINTAINER_pn-tslib = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-ttf-bitstream-vera = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-tzcode-native = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-tzdata = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-u-boot = "Denys Dmytriyenko <denis@denix.org>"
+RECIPE_MAINTAINER_pn-u-boot-fw-utils = "Denys Dmytriyenko <denis@denix.org>"
+RECIPE_MAINTAINER_pn-u-boot-mkimage = "Denys Dmytriyenko <denis@denix.org>"
+RECIPE_MAINTAINER_pn-ubootchart = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-uclibc = "Khem Raj <raj.khem@gmail.com>"
+RECIPE_MAINTAINER_pn-udev-extraconf = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-unfs3 = "Randy Witt <randy.e.witt@linux.intel.com>"
+RECIPE_MAINTAINER_pn-unifdef = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-unzip = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-update-rc.d = "Ross Burton <ross.burton@intel.com>"
+RECIPE_MAINTAINER_pn-usbinit = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-usbutils = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-util-macros = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-v86d = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-vala = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-valgrind = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-videoproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-vte = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-waffle = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-watchdog = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-wayland = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-webkitgtk = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-weston = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-weston-init = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-wget = "Robert Yang <liezhi.yang@windriver.com>"
+RECIPE_MAINTAINER_pn-which = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
+RECIPE_MAINTAINER_pn-wireless-tools = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-wpa-supplicant = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-x11-common = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-x11perf = "Alexander Kanavin <alexander.kanavin@intel.com>"
+RECIPE_MAINTAINER_pn-x264 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xauth = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xcb-proto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xcb-util = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xcb-util-image = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xcb-util-keysyms = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xcb-util-renderutil = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xcb-util-wm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xcmiscproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xcursor-transparent-theme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xdg-utils = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xdpyinfo = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xextproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xeyes = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-input-evdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-input-keyboard = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-input-mouse = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-input-synaptics = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-input-vmmouse = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-video-cirrus = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-video-fbdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-video-intel = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-video-omap = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-video-omapfb = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-video-vesa = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86-video-vmware = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86dgaproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86driproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86miscproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xf86vidmodeproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xhost = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xineramaproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xinetd = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-xinit = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xinput = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xinput-calibrator = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xkbcomp = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xkeyboard-config = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xmlto = "Hongxu Jia <hongxu.jia@windriver.com>"
+RECIPE_MAINTAINER_pn-xmodmap = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xorg-minimal-fonts = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xprop = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xrandr = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xrestop = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xserver-nodm-init = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xserver-xf86-config = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xserver-xorg = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xset = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xtrans = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xtscal = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xuser-account = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xvideo-tests = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-xvinfo = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xwininfo = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-xz = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-yasm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
+RECIPE_MAINTAINER_pn-zip = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-zlib = "Chen Qi <Qi.Chen@windriver.com>"
+RECIPE_MAINTAINER_pn-stress = "Maxin B. John <maxin.john@intel.com>"
+RECIPE_MAINTAINER_pn-mmc-utils = "Maxin B. John <maxin.john@intel.com>"
diff --git a/yocto-poky/meta-poky/conf/distro/include/poky-floating-revisions.inc b/yocto-poky/meta-poky/conf/distro/include/poky-floating-revisions.inc
new file mode 100644
index 0000000..e1abd3a
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/distro/include/poky-floating-revisions.inc
@@ -0,0 +1,59 @@
+#
+# Package Versions for cutting edge testing:
+#
+
+#SRCREV_pn-opkg-native ?= "${AUTOREV}"
+#SRCREV_pn-opkg-sdk ?= "${AUTOREV}"
+#SRCREV_pn-opkg ?= "${AUTOREV}"
+#SRCREV_pn-opkg-utils-native ?= "${AUTOREV}"
+#SRCREV_pn-opkg-utils ?= "${AUTOREV}"
+SRCREV_pn-gconf-dbus ?= "${AUTOREV}"
+SRCREV_pn-matchbox-common ?= "${AUTOREV}"
+SRCREV_pn-matchbox-config-gtk ?= "${AUTOREV}"
+SRCREV_pn-matchbox-desktop ?= "${AUTOREV}"
+SRCREV_pn-matchbox-keyboard ?= "${AUTOREV}"
+SRCREV_pn-matchbox-panel-2 ?= "${AUTOREV}"
+SRCREV_pn-matchbox-themes-extra ?= "${AUTOREV}"
+SRCREV_pn-matchbox-terminal ?= "${AUTOREV}"
+SRCREV_pn-matchbox-wm ?= "${AUTOREV}"
+SRCREV_pn-settings-daemon ?= "${AUTOREV}"
+SRCREV_pn-screenshot ?= "${AUTOREV}"
+SRCREV_pn-libfakekey ?= "${AUTOREV}"
+SRCREV_pn-oprofileui ?= "${AUTOREV}"
+SRCREV_pn-psplash ?= "${AUTOREV}"
+SRCREV_pn-gtk-sato-engine ?= "${AUTOREV}"
+SRCREV_pn-matchbox-theme-sato ?= "${AUTOREV}"
+SRCREV_pn-sato-icon-theme ?= "${AUTOREV}"
+SRCREV_pn-matchbox-desktop-sato ?= "${AUTOREV}"
+SRCREV_pn-oh-puzzles ?= "${AUTOREV}"
+SRCREV_pn-libowl ?= "${AUTOREV}"
+SRCREV_pn-fstests ?= "${AUTOREV}"
+SRCREV_pn-xvideo-tests ?= "${AUTOREV}"
+SRCREV_pn-clutter ?= "${AUTOREV}"
+SRCREV_pn-clutter-gst ?= "${AUTOREV}"
+SRCREV_pn-libmatchbox ?= "${AUTOREV}"
+SRCREV_pn-ofono ?= "${AUTOREV}"
+
+SRCREV_pn-dri2proto = "${AUTOREV}"
+#PREFERRED_VERSION_dri2proto ?= "1.99.1+git%"
+SRCREV_pn-libdrm = "${AUTOREV}"
+#PREFERRED_VERSION_libdrm ?= "2.4.0+git%"
+SRCREV_pn-libxcb = "${AUTOREV}"
+#PREFERRED_VERSION_libxcb ?= "1.1.90.1+gitr%"
+SRCREV_pn-lib-proto = "${AUTOREV}"
+#PREFERRED_VERSION_xcb-proto ?= "1.2+gitr%"
+SRCREV_pn-libxcb-sdk = "${AUTOREV}"
+#PREFERRED_VERSION_libxcb-sdk ?= "1.1.90.1+gitr%"
+SRCREV_pn-xf86-input-evdev = "${AUTOREV}"
+#PREFERRED_VERSION_xf86-input-evdev ?= "2.0.4"
+SRCREV_pn-xf86-input-mouse = "${AUTOREV}"
+#PREFERRED_VERSION_xf86-input-mouse ?= "1.3.0+git%"
+SRCREV_pn-xf86-input-keyboard = "${AUTOREV}"
+#PREFERRED_VERSION_xf86-input-keyboard ?= "1.3.1+git%"
+SRCREV_pn-xf86-input-synaptics = "${AUTOREV}"
+#PREFERRED_VERSION_xf86-input-synaptics ?= "0.15.2+git%"
+
+#SRCDATE_oprofile ?= "${DATE}"
+
+PREFERRED_VERSION_oprofile ?= "0.9.4+cvs${SRCDATE_oprofile}"
+
diff --git a/yocto-poky/meta-poky/conf/distro/include/poky-world-exclude.inc b/yocto-poky/meta-poky/conf/distro/include/poky-world-exclude.inc
new file mode 100644
index 0000000..5194ff1
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/distro/include/poky-world-exclude.inc
@@ -0,0 +1,6 @@
+#
+# Things we exlude fromw world testing within the reference distro
+#
+
+# qwt from meta-qt4, has poky-lsb QA warnings, qt4 for lsb only
+EXCLUDE_FROM_WORLD_pn-qwt = "1"
diff --git a/yocto-poky/meta-yocto/conf/distro/poky-bleeding.conf b/yocto-poky/meta-poky/conf/distro/poky-bleeding.conf
similarity index 100%
rename from yocto-poky/meta-yocto/conf/distro/poky-bleeding.conf
rename to yocto-poky/meta-poky/conf/distro/poky-bleeding.conf
diff --git a/yocto-poky/meta-poky/conf/distro/poky-lsb.conf b/yocto-poky/meta-poky/conf/distro/poky-lsb.conf
new file mode 100644
index 0000000..e7d6995
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/distro/poky-lsb.conf
@@ -0,0 +1,15 @@
+
+require conf/distro/poky.conf
+require conf/distro/include/security_flags.inc
+
+DISTRO = "poky-lsb"
+DISTROOVERRIDES = "poky:linuxstdbase"
+
+DISTRO_FEATURES_append = " pam largefile opengl"
+PREFERRED_PROVIDER_virtual/libx11 = "libx11"
+
+# Ensure the kernel nfs server is enabled
+KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
+
+# Use the LTSI Kernel for LSB Testing
+PREFERRED_VERSION_linux-yocto_linuxstdbase ?= "4.1%"
diff --git a/yocto-poky/meta-poky/conf/distro/poky-tiny.conf b/yocto-poky/meta-poky/conf/distro/poky-tiny.conf
new file mode 100644
index 0000000..ac05420
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/distro/poky-tiny.conf
@@ -0,0 +1,128 @@
+# Distribution definition for: poky-tiny
+#
+# Copyright (c) 2011, Intel Corporation.
+# All rights reserved.
+#
+# This file is released under the MIT license as described in
+# ../meta/COPYING.MIT.
+#
+# Poky-tiny is intended to define a tiny Linux system comprised of a
+# Linux kernel tailored to support each specific MACHINE and busybox.
+# Poky-tiny sets some basic policy to ensure a usable system while still
+# keeping the rootfs and kernel image as small as possible.
+#
+# The policies defined are intended to meet the following goals:
+# o Serial consoles only (no framebuffer or VGA console)
+# o Basic support for IPV4 networking
+# o Single user ash shell
+# o Static images (no support for adding packages or libraries later)
+# o Read-only or RAMFS root filesystem
+# o Combined Linux kernel + rootfs in under 4MB
+# o Allow the user to select between eglibc or uclibc with the TCLIBC variable
+#
+# This is currently a partial definition, the following tasks remain:
+# [ ] Integrate linux-yocto-tiny ktype into linux-yocto
+# [ ] Define linux-yocto-tiny configs for all supported BSPs
+# [ ] Drop ldconfig from the installation
+# [ ] Modify the runqemu scripts to work with ext2 parameter:
+#     runqemu qemux86 qemuparams="-nographic" bootparams="console=ttyS0,115200 root=0800"
+# [ ] Modify busybox to allow for DISTRO_FEATURES-like confiruration
+
+require conf/distro/poky.conf
+DISTRO = "poky-tiny"
+TCLIBC = "musl"
+# FIXME: consider adding a new "tiny" feature
+#DISTRO_FEATURES_append = " tiny"
+
+# Distro config is evaluated after the machine config, so we have to explicitly
+# set the kernel provider to override a machine config.
+PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny"
+PREFERRED_VERSION_linux-yocto-tiny ?= "4.4%"
+
+# We can use packagegroup-core-boot, but in the future we may need a new packagegroup-core-tiny
+#POKY_DEFAULT_EXTRA_RDEPENDS += "packagegroup-core-boot"
+# Drop kernel-module-af-packet from RRECOMMENDS
+POKY_DEFAULT_EXTRA_RRECOMMENDS = ""
+
+# FIXME: what should we do with this?
+TCLIBCAPPEND = ""
+
+# Disable wide char support for ncurses as we don't include it in
+# in the LIBC features below.
+# Leave native enable to avoid build failures
+ENABLE_WIDEC = "false"
+ENABLE_WIDEC_class-native = "true"
+
+# Drop native language support. This removes the
+# eglibc->bash->gettext->libc-posix-clang-wchar dependency.
+USE_NLS="no"
+
+# Comment out any of the lines below to disable them in the build
+# DISTRO_FEATURES options:
+# alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci
+DISTRO_FEATURES_TINY = "pci"
+DISTRO_FEATURES_NET = "ipv4 ipv6"
+DISTRO_FEATURES_USB = "usbhost"
+#DISTRO_FEATURES_USBGADGET = "usbgadget"
+#DISTRO_FEATURES_WIFI = "wifi"
+
+DISTRO_FEATURES = "${DISTRO_FEATURES_TINY} \
+                   ${DISTRO_FEATURES_NET} \
+                   ${DISTRO_FEATURES_USB} \
+                   ${DISTRO_FEATURES_USBGADGET} \
+                   ${DISTRO_FEATURES_WIFI} \
+                  "
+
+# Enable LFS - see bug YOCTO #5865
+DISTRO_FEATURES_append_libc-uclibc = " largefile"
+DISTRO_FEATURES_append_libc-musl = " largefile"
+
+DISTRO_FEATURES_class-native = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
+DISTRO_FEATURES_class-nativesdk = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
+
+# Use tmpdevfs and the busybox runtime services
+VIRTUAL-RUNTIME_dev_manager = ""
+VIRTUAL-RUNTIME_login_manager = ""
+VIRTUAL-RUNTIME_init_manager = "tiny-init"
+VIRTUAL-RUNTIME_keymaps = ""
+
+# FIXME: Consider adding "modules" to MACHINE_FEATURES and using that in
+# packagegroup-core-base to select modutils-initscripts or not.  Similar with "net" and
+# netbase.
+
+# By default we only support initramfs. We don't build live as that
+# pulls in a lot of dependencies for the live image and the installer, like
+# udev, grub, etc.  These pull in gettext, which fails to build with wide
+# character support.
+IMAGE_FSTYPES = "cpio.gz"
+
+# Drop v86d from qemu dependency list (we support serial)
+# Drop grub from meta-intel BSPs
+# FIXME: A different mechanism is needed here. We could define -tiny
+#        variants of all compatible machines, but that leads to a lot
+#        more machine configs to maintain long term.
+MACHINE_ESSENTIAL_EXTRA_RDEPENDS = ""
+
+# The mtrace script included by eglibc is a perl script. This means the system
+# will build perl in case this package is installed. Since we don't care about
+# this script for the purposes of tiny, remove the dependency from here.
+RDEPENDS_${PN}-mtrace_pn-eglibc = ""
+
+PNBLACKLIST[build-appliance-image] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-base] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-clutter] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-directfb] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-full-cmdline] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-lsb] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-lsb-dev] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-lsb-sdk] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-rt] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-rt-sdk] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-sato] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-sato-dev] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-sato-sdk] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-x11] = "not buildable with poky-tiny"
+PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny"
+
+# Disable python usage in opkg-utils since it won't build with tiny config
+PACKAGECONFIG_remove_pn-opkg-utils = "python"
diff --git a/yocto-poky/meta-poky/conf/distro/poky.conf b/yocto-poky/meta-poky/conf/distro/poky.conf
new file mode 100644
index 0000000..722bbf1
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/distro/poky.conf
@@ -0,0 +1,110 @@
+DISTRO = "poky"
+DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
+DISTRO_VERSION = "2.1"
+DISTRO_CODENAME = "krogoth"
+SDK_VENDOR = "-pokysdk"
+SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
+
+MAINTAINER = "Poky <poky@yoctoproject.org>"
+
+TARGET_VENDOR = "-poky"
+
+LOCALCONF_VERSION = "1"
+
+DISTRO_VERSION[vardepsexclude] = "DATE"
+SDK_VERSION[vardepsexclude] = "DATE"
+
+# Override these in poky based distros
+POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl ptest multiarch wayland"
+POKY_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot"
+POKY_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
+
+DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
+
+PREFERRED_VERSION_linux-yocto ?= "4.4%"
+PREFERRED_VERSION_linux-yocto_qemux86 ?= "4.4%"
+PREFERRED_VERSION_linux-yocto_qemux86-64 ?= "4.4%"
+PREFERRED_VERSION_linux-yocto_qemuarm ?= "4.4%"
+PREFERRED_VERSION_linux-yocto_qemumips ?= "4.4%"
+PREFERRED_VERSION_linux-yocto_qemumips64 ?= "4.4%"
+PREFERRED_VERSION_linux-yocto_qemuppc ?= "4.4%"
+
+SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
+SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"
+
+DISTRO_EXTRA_RDEPENDS += " ${POKY_DEFAULT_EXTRA_RDEPENDS}"
+DISTRO_EXTRA_RRECOMMENDS += " ${POKY_DEFAULT_EXTRA_RRECOMMENDS}"
+
+POKYQEMUDEPS = "${@bb.utils.contains("INCOMPATIBLE_LICENSE", "GPL-3.0", "", "packagegroup-core-device-devel",d)}"
+DISTRO_EXTRA_RDEPENDS_append_qemuarm = " ${POKYQEMUDEPS}"
+DISTRO_EXTRA_RDEPENDS_append_qemuarm64 = " ${POKYQEMUDEPS}"
+DISTRO_EXTRA_RDEPENDS_append_qemumips = " ${POKYQEMUDEPS}"
+DISTRO_EXTRA_RDEPENDS_append_qemuppc = " ${POKYQEMUDEPS}"
+DISTRO_EXTRA_RDEPENDS_append_qemux86 = " ${POKYQEMUDEPS}"
+DISTRO_EXTRA_RDEPENDS_append_qemux86-64 = " ${POKYQEMUDEPS}"
+
+TCLIBCAPPEND = ""
+
+QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 ppc x86_64"
+# Other QEMU_TARGETS "mips64el sh4"
+
+PREMIRRORS ??= "\
+bzr://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \n \
+cvs://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \n \
+git://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \n \
+gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
+hg://.*/.*    http://downloads.yoctoproject.org/mirror/sources/ \n \
+osc://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \n \
+p4://.*/.*    http://downloads.yoctoproject.org/mirror/sources/ \n \
+svn://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \n"
+
+MIRRORS =+ "\
+ftp://.*/.*      http://downloads.yoctoproject.org/mirror/sources/ \n \
+http://.*/.*     http://downloads.yoctoproject.org/mirror/sources/ \n \
+https://.*/.*    http://downloads.yoctoproject.org/mirror/sources/ \n"
+
+# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
+# fetch from the network (and warn you if not). To disable the test set
+# the variable to be empty.
+# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master
+CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/"
+
+SANITY_TESTED_DISTROS ?= " \
+            poky-1.7 \n \
+            poky-1.8 \n \
+            poky-2.0 \n \
+            Ubuntu-14.04 \n \
+            Ubuntu-14.10 \n \
+            Ubuntu-15.04 \n \
+            Ubuntu-15.10 \n \
+            Fedora-21 \n \
+            Fedora-22 \n \
+            Fedora-23 \n \
+            CentOS-6.* \n \
+            CentOS-7.* \n \
+            Debian-7.* \n \
+            Debian-8.* \n \
+            openSUSE-project-13.2 \n \
+            "
+#
+# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in 
+# an incompatible way. Such changes should usually be detailed in the commit
+# that breaks the format and have been previously discussed on the mailing list 
+# with general agreement from the core team.
+#
+OELAYOUT_ABI = "11"
+
+# add poky sanity bbclass
+INHERIT += "poky-sanity"
+
+# QA check settings - a little stricter than the OE-Core defaults
+WARN_TO_ERROR_QA = "already-stripped compile-host-path install-host-path \
+                    installed-vs-shipped ldflags pn-overrides rpaths staticdev \
+                    useless-rpaths"
+WARN_QA_remove = "${WARN_TO_ERROR_QA}"
+ERROR_QA_append = " ${WARN_TO_ERROR_QA}"
+
+require conf/distro/include/poky-world-exclude.inc
+require conf/distro/include/no-static-libs.inc
+require conf/distro/include/yocto-uninative.inc
+INHERIT += "uninative"
diff --git a/yocto-poky/meta-poky/conf/layer.conf b/yocto-poky/meta-poky/conf/layer.conf
new file mode 100644
index 0000000..8b7b33d
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/layer.conf
@@ -0,0 +1,18 @@
+# We have a conf and classes directory, add to BBPATH
+BBPATH =. "${LAYERDIR}:"
+
+# We have recipes-* directories, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
+            ${LAYERDIR}/recipes-*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "yocto"
+BBFILE_PATTERN_yocto = "^${LAYERDIR}/"
+BBFILE_PRIORITY_yocto = "5"
+
+# This should only be incremented on significant changes that will
+# cause compatibility issues with other layers
+LAYERVERSION_yocto = "3"
+
+LAYERDEPENDS_yocto = "core"
+
+REQUIRED_POKY_BBLAYERS_CONF_VERSION = "2"
diff --git a/yocto-poky/meta-poky/conf/local.conf.sample b/yocto-poky/meta-poky/conf/local.conf.sample
new file mode 100644
index 0000000..a7b2d80
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/local.conf.sample
@@ -0,0 +1,238 @@
+#
+# This file is your local configuration file and is where all local user settings
+# are placed. The comments in this file give some guide to the options a new user
+# to the system might want to change but pretty much any configuration option can
+# be set in this file. More adventurous users can look at local.conf.extended
+# which contains other examples of configuration which can be placed in this file
+# but new users likely won't need any of them initially.
+#
+# Lines starting with the '#' character are commented out and in some cases the
+# default values are provided as comments to show people example syntax. Enabling
+# the option is a question of removing the # character and making any change to the
+# variable as required.
+
+#
+# Machine Selection
+#
+# You need to select a specific machine to target the build with. There are a selection
+# of emulated machines available which can boot and run in the QEMU emulator:
+#
+#MACHINE ?= "qemuarm"
+#MACHINE ?= "qemuarm64"
+#MACHINE ?= "qemumips"
+#MACHINE ?= "qemumips64"
+#MACHINE ?= "qemuppc"
+#MACHINE ?= "qemux86"
+#MACHINE ?= "qemux86-64"
+#
+# There are also the following hardware board target machines included for 
+# demonstration purposes:
+#
+#MACHINE ?= "beaglebone"
+#MACHINE ?= "genericx86"
+#MACHINE ?= "genericx86-64"
+#MACHINE ?= "mpc8315e-rdb"
+#MACHINE ?= "edgerouter"
+#
+# This sets the default machine to be qemux86 if no other machine is selected:
+MACHINE ??= "qemux86"
+
+#
+# Where to place downloads
+#
+# During a first build the system will download many different source code tarballs
+# from various upstream projects. This can take a while, particularly if your network
+# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
+# can preserve this directory to speed up this part of subsequent builds. This directory
+# is safe to share between multiple builds on the same machine too.
+#
+# The default is a downloads directory under TOPDIR which is the build directory.
+#
+#DL_DIR ?= "${TOPDIR}/downloads"
+
+#
+# Where to place shared-state files
+#
+# BitBake has the capability to accelerate builds based on previously built output.
+# This is done using "shared state" files which can be thought of as cache objects
+# and this option determines where those files are placed.
+#
+# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
+# from these files if no changes were made to the configuration. If changes were made
+# to the configuration, only shared state files where the state was still valid would
+# be used (done using checksums).
+#
+# The default is a sstate-cache directory under TOPDIR.
+#
+#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
+
+#
+# Where to place the build output
+#
+# This option specifies where the bulk of the building work should be done and
+# where BitBake should place its temporary files and output. Keep in mind that
+# this includes the extraction and compilation of many applications and the toolchain
+# which can use Gigabytes of hard disk space.
+#
+# The default is a tmp directory under TOPDIR.
+#
+#TMPDIR = "${TOPDIR}/tmp"
+
+#
+# Default policy config
+#
+# The distribution setting controls which policy settings are used as defaults.
+# The default value is fine for general Yocto project use, at least initially.
+# Ultimately when creating custom policy, people will likely end up subclassing 
+# these defaults.
+#
+DISTRO ?= "poky"
+# As an example of a subclass there is a "bleeding" edge policy configuration
+# where many versions are set to the absolute latest code from the upstream 
+# source control systems. This is just mentioned here as an example, its not
+# useful to most new users.
+# DISTRO ?= "poky-bleeding"
+
+#
+# Package Management configuration
+#
+# This variable lists which packaging formats to enable. Multiple package backends
+# can be enabled at once and the first item listed in the variable will be used
+# to generate the root filesystems.
+# Options are:
+#  - 'package_deb' for debian style deb files
+#  - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
+#  - 'package_rpm' for rpm style packages
+# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
+# We default to rpm:
+PACKAGE_CLASSES ?= "package_rpm"
+
+#
+# SDK target architecture
+#
+# This variable specifies the architecture to build SDK items for and means
+# you can build the SDK packages for architectures other than the machine you are
+# running the build on (i.e. building i686 packages on an x86_64 host).
+# Supported values are i686 and x86_64
+#SDKMACHINE ?= "i686"
+
+#
+# Extra image configuration defaults
+#
+# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated
+# images. Some of these options are added to certain image types automatically. The
+# variable can contain the following options:
+#  "dbg-pkgs"       - add -dbg packages for all installed packages
+#                     (adds symbol information for debugging/profiling)
+#  "dev-pkgs"       - add -dev packages for all installed packages
+#                     (useful if you want to develop against libs in the image)
+#  "ptest-pkgs"     - add -ptest packages for all ptest-enabled packages
+#                     (useful if you want to run the package test suites)
+#  "tools-sdk"      - add development tools (gcc, make, pkgconfig etc.)
+#  "tools-debug"    - add debugging tools (gdb, strace)
+#  "eclipse-debug"  - add Eclipse remote debugging support
+#  "tools-profile"  - add profiling tools (oprofile, lttng, valgrind)
+#  "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
+#  "debug-tweaks"   - make an image suitable for development
+#                     e.g. ssh root access has a blank password
+# There are other application targets that can be used here too, see
+# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
+# We default to enabling the debugging tweaks.
+EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
+
+#
+# Additional image features
+#
+# The following is a list of additional classes to use when building images which
+# enable extra features. Some available options which can be included in this variable
+# are:
+#   - 'buildstats' collect build statistics
+#   - 'image-mklibs' to reduce shared library files size for an image
+#   - 'image-prelink' in order to prelink the filesystem image
+#   - 'image-swab' to perform host system intrusion detection
+# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
+# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
+# image-prelink disabled for now due to issues with IFUNC symbol relocation
+USER_CLASSES ?= "buildstats image-mklibs"
+
+#
+# Runtime testing of images
+#
+# The build system can test booting virtual machine images under qemu (an emulator)
+# after any root filesystems are created and run tests against those images. To
+# enable this uncomment this line. See classes/testimage(-auto).bbclass for
+# further details.
+#TEST_IMAGE = "1"
+#
+# Interactive shell configuration
+#
+# Under certain circumstances the system may need input from you and to do this it
+# can launch an interactive shell. It needs to do this since the build is
+# multithreaded and needs to be able to handle the case where more than one parallel
+# process may require the user's attention. The default is iterate over the available
+# terminal types to find one that works.
+#
+# Examples of the occasions this may happen are when resolving patches which cannot
+# be applied, to use the devshell or the kernel menuconfig
+#
+# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
+# Note: currently, Konsole support only works for KDE 3.x due to the way
+# newer Konsole versions behave
+#OE_TERMINAL = "auto"
+# By default disable interactive patch resolution (tasks will just fail instead):
+PATCHRESOLVE = "noop"
+
+#
+# Disk Space Monitoring during the build
+#
+# Monitor the disk space during the build. If there is less that 1GB of space or less
+# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
+# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort
+# of the build. The reason for this is that running completely out of space can corrupt
+# files and damages the build in ways which may not be easily recoverable.
+# It's necesary to monitor /tmp, if there is no space left the build will fail
+# with very exotic errors.
+BB_DISKMON_DIRS = "\
+    STOPTASKS,${TMPDIR},1G,100K \
+    STOPTASKS,${DL_DIR},1G,100K \
+    STOPTASKS,${SSTATE_DIR},1G,100K \
+    STOPTASKS,/tmp,100M,100K \
+    ABORT,${TMPDIR},100M,1K \
+    ABORT,${DL_DIR},100M,1K \
+    ABORT,${SSTATE_DIR},100M,1K \
+    ABORT,/tmp,10M,1K"
+
+#
+# Shared-state files from other locations
+#
+# As mentioned above, shared state files are prebuilt cache data objects which can
+# used to accelerate build time. This variable can be used to configure the system
+# to search other mirror locations for these objects before it builds the data itself.
+#
+# This can be a filesystem directory, or a remote url such as http or ftp. These
+# would contain the sstate-cache results from previous builds (possibly from other
+# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the
+# cache locations to check for the shared objects.
+# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
+# at the end as shown in the examples below. This will be substituted with the
+# correct path within the directory structure.
+#SSTATE_MIRRORS ?= "\
+#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
+#file://.* file:///some/local/dir/sstate/PATH"
+
+
+#
+# Qemu configuration
+#
+# By default qemu will build with a builtin VNC server where graphical output can be
+# seen. The two lines below enable the SDL backend too. By default libsdl-native will
+# be built, if you want to use your host's libSDL instead of the minimal libsdl built
+# by libsdl-native then uncomment the ASSUME_PROVIDED line below.
+PACKAGECONFIG_append_pn-qemu-native = " sdl"
+PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
+#ASSUME_PROVIDED += "libsdl-native"
+
+# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
+# track the version of this file when it was generated. This can safely be ignored if
+# this doesn't mean anything to you.
+CONF_VERSION = "1"
diff --git a/yocto-poky/meta-poky/conf/local.conf.sample.extended b/yocto-poky/meta-poky/conf/local.conf.sample.extended
new file mode 100644
index 0000000..aa7b42f
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/local.conf.sample.extended
@@ -0,0 +1,400 @@
+# BBMASK contains regular expressions that can be used to tell BitBake to ignore
+# certain recipes.
+#BBMASK = ""
+
+#
+# Parallelism Options
+#
+# These two options control how much parallelism BitBake should use. The first
+# option determines how many tasks bitbake should run in parallel:
+#
+#BB_NUMBER_THREADS ?= "4"
+#
+# Default to setting automatically based on cpu count
+#BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
+#
+# The second option controls how many processes make should run in parallel when
+# running compile tasks:
+#
+#PARALLEL_MAKE ?= "-j 4"
+#
+# Default to setting automatically based on cpu count
+#PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
+#
+# For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
+# be appropriate for example.
+
+
+# glibc configurability is used to reduce minimal image's size.
+# the all supported glibc options are listed in DISTRO_FEATURES_LIBC
+# and disabled by default. Uncomment and copy the DISTRO_FEATURES_LIBC
+# and DISTRO_FEATURES definitions to local.conf to enable the options.
+#DISTRO_FEATURES_LIBC = "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
+#               libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
+#               libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-locales libc-locale-code \
+#               libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
+#               libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
+#               libc-posix-wchar-io"
+
+#DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
+
+# If you want to get an image based on directfb without x11, Please copy this variable to build/conf/local.conf
+#DISTRO_FEATURES = "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g directfb ${DISTRO_FEATURES_LIBC}"
+
+# ENABLE_BINARY_LOCALE_GENERATION controls the generation of binary locale
+# packages at build time using qemu-native. Disabling it (by setting it to 0)
+# will save some build time at the expense of breaking i18n on devices with
+# less than 128MB RAM.
+#ENABLE_BINARY_LOCALE_GENERATION = "1"
+
+# Set GLIBC_GENERATE_LOCALES to the locales you wish to generate should you not
+# wish to perform the time-consuming step of generating all LIBC locales.
+# NOTE: If removing en_US.UTF-8 you will also need to uncomment, and set
+# appropriate value for IMAGE_LINGUAS.
+# WARNING: this may break localisation!
+#GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
+#IMAGE_LINGUAS ?= "en-gb"
+
+# The following are used to control options related to debugging.
+#
+# Uncomment this to change the optimization to make debugging easer, at the
+# possible cost of performance.
+# DEBUG_BUILD = "1"
+#
+# Uncomment this to disable the stripping of the installed binaries
+# INHIBIT_PACKAGE_STRIP = "1"
+#
+# Uncomment this to disable the split of the debug information into -dbg files
+# INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+#
+# When splitting debug information, the following controls the results of the
+# file splitting.
+#
+#  .debug (default):
+#    When splitting the debug information will be placed into
+#    a .debug directory in the same dirname of the binary produced:
+#      /bin/foo -> /bin/.debug/foo
+#
+#  debug-file-directory:
+#    When splitting the debug information will be placed into
+#    a central debug-file-directory, /usr/lib/debug:
+#      /bin/foo -> /usr/lib/debug/bin/foo.debug
+#
+#    Any source code referenced in the debug symbols will be copied
+#    and made available within the /usr/src/debug directory
+#
+#PACKAGE_DEBUG_SPLIT_STYLE = '.debug'
+# PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
+
+# Uncomment these to build a package such that you can use gprof to profile it.
+# NOTE: This will only work with 'linux' targets, not
+# 'linux-uclibc', as uClibc doesn't provide the necessary
+# object files.  Also, don't build glibc itself with these
+# flags, or it'll fail to build.
+#
+# PROFILE_OPTIMIZATION = "-pg"
+# SELECTED_OPTIMIZATION = "${PROFILE_OPTIMIZATION}"
+# LDFLAGS =+ "-pg"
+
+# TCMODE controls the characteristics of the generated packages/images by
+# telling poky which toolchain 'profile' to use.
+#
+# The default is "default" which uses the internal toolchain. With
+# additional layers, it is possible to set this to use a precompiled
+# external toolchain. One example is the Sourcery G++ Toolchain, support
+# for which is now in the separate meta-sourcery layer:
+#
+#  http://github.com/MentorEmbedded/meta-sourcery/
+#
+# meta-sourcery can be used as a template for adding support for other
+# external toolchains. See the link above for further details.
+#
+# TCMODE points the system to a file in conf/distro/include/tcmode-${TCMODE}.inc,
+# so for meta-sourcery which has conf/distro/include/tcmode-external-sourcery.inc
+# you would set it as follows:
+#
+# TCMODE ?= "external-sourcery"
+
+# mklibs library size optimization is more useful to smaller images,
+# and less useful for bigger images. Also mklibs library optimization
+# can break the ABI compatibility, so should not be applied to the
+# images which are to be extended or upgraded later.
+#This enabled mklibs library size optimization just for the specified image.
+#MKLIBS_OPTIMIZED_IMAGES ?= "core-image-minimal"
+#This enable mklibs library size optimization will be for all the images.
+#MKLIBS_OPTIMIZED_IMAGES ?= "all"
+
+# Uncomment this if your host distribution provides the help2man tool.
+#ASSUME_PROVIDED += "help2man-native"
+
+# This value is currently used by pseudo to determine if the recipe should
+# build both the 32-bit and 64-bit wrapper libraries on a 64-bit build system.
+#
+# Pseudo will attempt to determine if a 32-bit wrapper is necessary, but
+# it doesn't always guess properly.  If you have 32-bit executables on
+# your 64-bit build system, you likely want to set this to "0",
+# otherwise you could end up with incorrect file attributes on the
+# target filesystem.
+#
+# Default is to not build 32 bit libs on 64 bit systems, uncomment this
+# if you need the 32 bits libs
+#NO32LIBS = "0"
+
+# Uncomment the following lines to enable multilib builds
+#require conf/multilib.conf
+#MULTILIBS = "multilib:lib32"
+#DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
+
+# Set RPM_PREFER_ELF_ARCH to configure preferred ABI when using rpm packaging
+# backend to generate a rootfs, choices are:
+# 1: ELF32 wins
+# 2: ELF64 wins
+# 4: ELF64 N32 wins (for mips64 or mips64el only)
+#RPM_PREFER_ELF_ARCH ?= "2"
+
+# The network based PR service host and port
+# Uncomment the following lines to enable PRservice.
+# Set PRSERV_HOST to 'localhost:0' to automatically
+# start local PRService.
+# Set to other values to use remote PRService.
+#PRSERV_HOST = "localhost:0"
+
+# Additional image generation features
+#
+# The following is a list of classes to import to use in the generation of images
+# currently an example class is image_types_uboot
+# IMAGE_CLASSES = " image_types_uboot"
+
+# The following options will build a companion 'debug filesystem' in addition
+# to the normal deployable filesystem.  This companion system allows a
+# debugger to know the symbols and related sources.  It can be used to
+# debug a remote 'production' system without having to add the debug symbols
+# and sources to remote system.  If IMAGE_FSTYPES_DEBUGFS is not defined, it
+# defaults to IMAGE_FSTYPES.
+#IMAGE_GEN_DEBUGFS = "1"
+#IMAGE_FSTYPES_DEBUGFS = "tar.gz"
+
+# Incremental rpm image generation, the rootfs would be totally removed
+# and re-created in the second generation by default, but with
+# INC_RPM_IMAGE_GEN = "1", the rpm based rootfs would be kept, and will
+# do update(remove/add some pkgs) on it.  NOTE: This is not suggested
+# when you want to create a productive rootfs
+#INC_RPM_IMAGE_GEN = "1"
+
+# This is a list of packages that require a commercial license to ship
+# product. If shipped as part of an image these packages may have
+# implications so they are disabled by default.  To enable them,
+# un-comment the below as appropriate.
+#LICENSE_FLAGS_WHITELIST = "commercial_gst-fluendo-mp3 \
+#                           commercial_gst-openmax \
+#                           commercial_gst-plugins-ugly \
+#                           commercial_lame \
+#                           commercial_libmad \
+#                           commercial_libomxil \
+#                           commercial_mpeg2dec"
+
+
+#
+# Disk space monitor, take action when the disk space or the amount of
+# inode is running low, it is enabled when BB_DISKMON_DIRS is set.
+#
+# Set the directory for the monitor, the format is:
+# "action,directory,minimum_space,minimum_free_inode"
+#
+# The "action" must be set and should be one of:
+# ABORT: Immediately abort
+# STOPTASKS: The new tasks can't be executed any more, will stop the build
+#           when the running tasks have been done.
+# WARN: show warnings (see BB_DISKMON_WARNINTERVAL for more information)
+#
+# The "directory" must be set, any directory is OK.
+#
+# Either "minimum_space" or "minimum_free_inode" (or both of them)
+# should be set, otherwise the monitor would not be enabled,
+# the unit can be G, M, K or none, but do NOT use GB, MB or KB
+# (B is not needed).
+#BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
+#
+# Set disk space and inode interval (only works when the action is "WARN",
+# the unit can be G, M, or K, but do NOT use the GB, MB or KB
+# (B is not needed), the format is:
+# "disk_space_interval,disk_inode_interval", the default value is
+# "50M,5K" which means that it would warn when the free space is
+# lower than the minimum space(or inode), and would repeat the warning
+# when the disk space reduces 50M (or the amount of inode reduces 5k).
+#BB_DISKMON_WARNINTERVAL = "50M,5K"
+
+# Archive the source and put them to ${DEPLOY_DIR}/sources/.
+#
+#INHERIT += "archiver"
+#
+# The tarball for the patched source will be created by default, and you
+# can configure the archiver as follow:
+#
+# Create archive for:
+# 1) original (or unpacked) source:
+#ARCHIVER_MODE[src] = "original"
+# 2) patched source: (default)
+#ARCHIVER_MODE[src] = "patched"
+# 3) configured source:
+#ARCHIVER_MODE[src] = "configured"
+#
+# 4) the patches between do_unpack and do_patch:
+#ARCHIVER_MODE[diff] = "1"
+# set the files that you'd like to exclude from the diff:
+#ARCHIVER_MODE[diff-exclude] ?= ".pc autom4te.cache patches"
+#
+# 5) the environment data, similar to 'bitbake -e recipe':
+#ARCHIVER_MODE[dumpdata] = "1"
+#
+# 6) the recipe (.bb and .inc):
+#ARCHIVER_MODE[recipe] = "1"
+#
+# 7) Whether output the .src.rpm package:
+#ARCHIVER_MODE[srpm] = "1"
+#
+# 8) Filter the license, the recipe whose license in
+#    COPYLEFT_LICENSE_INCLUDE will be included, and in
+#    COPYLEFT_LICENSE_EXCLUDE will be excluded.
+#COPYLEFT_LICENSE_INCLUDE = 'GPL* LGPL*'
+#COPYLEFT_LICENSE_EXCLUDE = 'CLOSED Proprietary'
+#
+# 9) Config the recipe type that will be archived, the type can be
+#    target, native, nativesdk, cross, crosssdk and cross-canadian,
+#    you can set one or more types. Archive all types by default.
+#COPYLEFT_RECIPE_TYPES = 'target'
+#
+
+# Remove the old image before the new one generated to save disk space
+#RM_OLD_IMAGE = "1"
+
+#
+# GCC/LD FLAGS to enable more secure code generation
+#
+# By including the security_flags include file you enable flags
+# to the compiler and linker that cause them to generate more secure
+# code, this is enabled by default in the poky-lsb distro.
+# This does affect compile speed slightly.
+#
+# Use the following line to enable the security compiler and linker flags to your build
+#require conf/distro/include/security_flags.inc
+
+# Image level user/group configuration.
+# Inherit extrausers to make the setting of EXTRA_USERS_PARAMS effective.
+#INHERIT += "extrausers"
+# User / group settings
+# The settings are sperated by the ; character.
+# Each setting is actually a command. The supported commands are useradd,
+# groupadd, userdel, groupdel, usermod and groupmod.
+#EXTRA_USERS_PARAMS = "\
+#useradd -p '' tester; \
+#groupadd developers; \
+#userdel nobody; \
+#groupdel video; \
+#groupmod -g 1020 developers; \
+#usermod -s /bin/sh tester; \
+#"
+
+# Various packages dynamically add users and groups to the system at package
+# install time.  For programs that do not care what the uid/gid is of the
+# resulting users/groups, the order of the install will determine the final
+# uid/gid.  This can lead to non-deterministic uid/gid values from one build
+# to another.  Use the following settings to specify that all user/group adds
+# should be created based on a static passwd/group file.
+#
+# Note, if you enable or disable the useradd-staticids in a configured system,
+# the TMPDIR may contain incorrect uid/gid values.  Clearing the TMPDIR
+# will correct this condition.
+#
+# By default the system looks in the BBPATH for files/passwd and files/group
+# the default can be overriden by spefying USERADD_UID/GID_TABLES.
+#
+#USERADDEXTENSION = "useradd-staticids"
+#USERADD_UID_TABLES = "files/passwd"
+#USERADD_GID_TABLES = "files/group"
+#
+# In order to prevent generating a system where a dynamicly assigned uid/gid
+# can exist, you should enable the following setting.  This will force the
+# system to error out if the user/group name is not defined in the
+# files/passwd or files/group (or specified replacements.)
+#USERADD_ERROR_DYNAMIC = "1"
+
+# Enabling FORTRAN
+# Note this is not officially supported and is just illustrated here to
+# show an example of how it can be done
+# You'll also need your fortran recipe to depend on libgfortran
+#FORTRAN_forcevariable = ",fortran"
+#RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath"
+
+#
+# Kernel image features
+#
+# The INITRAMFS_IMAGE image variable will cause an additional recipe to
+# be built as a dependency to the what ever rootfs recipe you might be
+# using such as core-image-sato.  The initramfs might be needed for
+# the initial boot of of the target system such as to load kernel
+# modules prior to mounting the root file system.
+#
+# INITRAMFS_IMAGE_BUNDLE variable controls if the image recipe
+# specified by the INITRAMFS_IMAGE will be run through an extra pass
+# through the kernel compilation in order to build a single binary
+# which contains both the kernel image and the initramfs.  The
+# combined binary will be deposited into the tmp/deploy directory.
+# NOTE: You can set INITRAMFS_IMAGE in an image recipe, but
+#       INITRAMFS_IMAGE_BUNDLE can only be set in a conf file.
+#
+#INITRAMFS_IMAGE = "core-image-minimal-initramfs"
+#INITRAMFS_IMAGE_BUNDLE = "1"
+
+#
+# IPK Hierarchical feed
+#
+# In some cases it may be desirable not to have all package files in the same
+# directory. An example would be when package feeds are to be uploaded to a
+# shared webhosting service or transferred to a Windows machine which may have
+# problems with directories containing multiple thousands of files.
+#
+# If the IPK_HIERARCHICAL_FEED variable is set to "1", packages will be split
+# between subdirectories in a similar way to how Debian package feeds are
+# organised. In the hierarchical feed, package files are written to
+# <outdir>/<arch>/<pkg_prefix>/<pkg_subdir>, where pkg_prefix is the first
+# letter of the package file name for non-lib packages or "lib" plus the 4th
+# letter of the package file name for lib packages (eg, 'l' for less, 'libc' for
+# libc6).  pkg_subdir is the root of the package file name, discarding the
+# version and architecture parts and the common suffixes '-dbg', '-dev', '-doc',
+# '-staticdev', '-locale' and '-locale-*' which are listed in
+# meta/conf/bitbake.conf.
+#
+# If IPK_HIERARCHICAL_FEED is unset or set to any other value, the traditional
+# feed layout is used where package files are placed in <outdir>/<arch>/.
+#
+#IPK_HIERARCHICAL_FEED = "1"
+#
+
+# Using RPM4
+#
+# Currently the rootfs_rpm code has a hard depends on rpmresolve:do_populate_sysroot,
+# when using rpm4 the rpmresolve code will not compile due to a missing header file.
+# That dependency needs to be removed when using RPM4, also the PREFERRED_VERSION needs
+# to be set. This example shows how to enable rpm4
+# PREFERRED_VERSION_rpm = "4.11.2"
+# PREFERRED_VERSION_rpm-native = "4.11.2"
+# RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot"
+
+#
+# Use busybox/mdev for system initialization
+#
+#VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
+#VIRTUAL-RUNTIME_login_manager = "busybox"
+#VIRTUAL-RUNTIME_init_manager = "busybox"
+#VIRTUAL-RUNTIME_initscripts = "initscripts"
+#VIRTUAL-RUNTIME_keymaps = "keymaps"
+#DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
+
+#
+# Use systemd for system initialization
+#
+#DISTRO_FEATURES_append = " systemd"
+#DISTRO_FEATURES_BACKFILL_CONSIDERED += "sysvinit"
+#VIRTUAL-RUNTIME_init_manager = "systemd"
+#VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
diff --git a/yocto-poky/meta-poky/conf/site.conf.sample b/yocto-poky/meta-poky/conf/site.conf.sample
new file mode 100644
index 0000000..6cfefc5
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/site.conf.sample
@@ -0,0 +1,31 @@
+#
+# local.conf covers user settings, site.conf covers site specific information
+# such as proxy server addresses and optionally any shared download location
+#
+# SITE_CONF_VERSION is increased each time build/conf/site.conf
+# changes incompatibly
+SCONF_VERSION = "1"
+
+# Uncomment to cause CVS to use the proxy host specified
+#CVS_PROXY_HOST = "proxy.example.com"
+#CVS_PROXY_PORT = "81"
+
+# For svn, you need to create ~/.subversion/servers containing:
+#[global]
+#http-proxy-host = proxy.example.com
+#http-proxy-port = 81
+#
+
+# To use git with a proxy, you must use an external git proxy command, such as
+# the one provided by scripts/oe-git-proxy. To use this script, copy it to
+# your PATH and uncomment the following:
+#GIT_PROXY_COMMAND ?= "oe-git-proxy"
+#ALL_PROXY ?= "socks://socks.example.com:1080"
+#or
+#ALL_PROXY ?= "https://proxy.example.com:8080"
+# If you wish to use certain hosts without the proxy, specify them in NO_PROXY.
+# See the script for details on syntax.
+
+# Uncomment this to use a shared download directory
+#DL_DIR = "/some/shared/download/directory/"
+
diff --git a/yocto-poky/meta-poky/conf/toasterconf.json b/yocto-poky/meta-poky/conf/toasterconf.json
new file mode 100644
index 0000000..606aac7
--- /dev/null
+++ b/yocto-poky/meta-poky/conf/toasterconf.json
@@ -0,0 +1,120 @@
+{
+    "config": {
+        "MACHINE"      : "qemux86",
+        "DISTRO"       : "poky",
+        "DL_DIR"       : "${TOPDIR}/../downloads",
+        "IMAGE_FSTYPES": "ext3 jffs2 tar.bz2",
+        "IMAGE_INSTALL_append": "",
+        "PACKAGE_CLASSES": "package_rpm",
+        "SSTATE_DIR"   : "${TOPDIR}/../sstate-cache"
+    },
+    "layersources": [
+        {
+            "name": "Local Yocto Project",
+            "sourcetype": "local",
+            "apiurl": "../../",
+            "branches": ["HEAD" ],
+            "layers": [
+                {
+                    "name": "openembedded-core",
+                    "local_path": "meta",
+                    "vcs_url": "remote:origin",
+                    "dirpath": "meta"
+                },
+                {
+                    "name": "meta-poky",
+                    "local_path": "meta-poky",
+                    "vcs_url": "remote:origin",
+                    "dirpath": "meta-poky"
+                },
+                {
+                    "name": "meta-yocto-bsp",
+                    "local_path": "meta-yocto-bsp",
+                    "vcs_url": "remote:origin",
+                    "dirpath": "meta-yocto-bsp"
+                }
+
+            ]
+        },
+        {
+            "name": "OpenEmbedded",
+            "sourcetype": "layerindex",
+            "apiurl": "http://layers.openembedded.org/layerindex/api/",
+            "branches": ["master", "jethro", "krogoth"]
+        },
+        {
+            "name": "Imported layers",
+            "sourcetype": "imported",
+            "apiurl": "",
+            "branches": ["master", "jethro", "krogoth", "HEAD"]
+
+        }
+    ],
+    "bitbake" : [
+        {
+            "name": "master",
+            "giturl": "remote:origin",
+            "branch": "master",
+            "dirpath": "bitbake"
+        },
+        {
+            "name": "jethro",
+            "giturl": "remote:origin",
+            "branch": "jethro",
+            "dirpath": "bitbake"
+        },
+        {
+            "name": "krogoth",
+            "giturl": "remote:origin",
+            "branch": "krogoth",
+            "dirpath": "bitbake"
+        },
+        {
+            "name": "HEAD",
+            "giturl": "remote:origin",
+            "branch": "HEAD",
+            "dirpath": "bitbake"
+        }
+    ],
+
+    "defaultrelease": "master",
+
+    "releases": [
+        {
+            "name": "master",
+            "description": "Yocto Project master",
+            "bitbake": "master",
+            "branch": "master",
+            "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
+            "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
+            "helptext": "Toaster will run your builds using the tip of the <a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/\">Yocto Project master branch</a>, where active development takes place. This is not a stable branch, so your builds might not work as expected."
+        },
+        {
+            "name": "jethro",
+            "description": "Yocto Project 2.0 Jethro",
+            "bitbake": "jethro",
+            "branch": "jethro",
+            "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
+            "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
+            "helptext": "Toaster will run your builds with the tip of the <a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=jethro\">Yocto Project 2.0 \"Jethro\"</a> branch."
+        },
+        {
+            "name": "krogoth",
+            "description": "Yocto Project 2.1 Krogoth",
+            "bitbake": "krogoth",
+            "branch": "krogoth",
+            "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
+            "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
+            "helptext": "Toaster will run your builds with the tip of the <a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=krogoth\">Yocto Project 2.1 \"Krogoth\"</a> branch."
+        },
+        {
+            "name": "local",
+            "description": "Local Yocto Project",
+            "bitbake": "HEAD",
+            "branch": "HEAD",
+            "defaultlayers": [ "openembedded-core", "meta-poky", "meta-yocto-bsp"],
+            "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
+            "helptext": "Toaster will run your builds with the version of the Yocto Project you have cloned or downloaded to your computer."
+        }
+    ]
+}
diff --git a/yocto-poky/meta-yocto/recipes-core/busybox/busybox/poky-tiny/defconfig b/yocto-poky/meta-poky/recipes-core/busybox/busybox/poky-tiny/defconfig
similarity index 100%
rename from yocto-poky/meta-yocto/recipes-core/busybox/busybox/poky-tiny/defconfig
rename to yocto-poky/meta-poky/recipes-core/busybox/busybox/poky-tiny/defconfig
diff --git a/yocto-poky/meta-yocto/recipes-core/busybox/busybox_%.bbappend b/yocto-poky/meta-poky/recipes-core/busybox/busybox_%.bbappend
similarity index 100%
rename from yocto-poky/meta-yocto/recipes-core/busybox/busybox_%.bbappend
rename to yocto-poky/meta-poky/recipes-core/busybox/busybox_%.bbappend
diff --git a/yocto-poky/meta-yocto/recipes-core/psplash/files/psplash-poky-img.h b/yocto-poky/meta-poky/recipes-core/psplash/files/psplash-poky-img.h
similarity index 100%
rename from yocto-poky/meta-yocto/recipes-core/psplash/files/psplash-poky-img.h
rename to yocto-poky/meta-poky/recipes-core/psplash/files/psplash-poky-img.h
diff --git a/yocto-poky/meta-yocto/recipes-core/psplash/psplash_git.bbappend b/yocto-poky/meta-poky/recipes-core/psplash/psplash_git.bbappend
similarity index 100%
rename from yocto-poky/meta-yocto/recipes-core/psplash/psplash_git.bbappend
rename to yocto-poky/meta-poky/recipes-core/psplash/psplash_git.bbappend
diff --git a/yocto-poky/meta-yocto/recipes-core/tiny-init/files/init b/yocto-poky/meta-poky/recipes-core/tiny-init/files/init
similarity index 100%
rename from yocto-poky/meta-yocto/recipes-core/tiny-init/files/init
rename to yocto-poky/meta-poky/recipes-core/tiny-init/files/init
diff --git a/yocto-poky/meta-yocto/recipes-core/tiny-init/files/rc.local.sample b/yocto-poky/meta-poky/recipes-core/tiny-init/files/rc.local.sample
similarity index 100%
rename from yocto-poky/meta-yocto/recipes-core/tiny-init/files/rc.local.sample
rename to yocto-poky/meta-poky/recipes-core/tiny-init/files/rc.local.sample
diff --git a/yocto-poky/meta-yocto/recipes-core/tiny-init/tiny-init.bb b/yocto-poky/meta-poky/recipes-core/tiny-init/tiny-init.bb
similarity index 100%
rename from yocto-poky/meta-yocto/recipes-core/tiny-init/tiny-init.bb
rename to yocto-poky/meta-poky/recipes-core/tiny-init/tiny-init.bb
diff --git a/yocto-poky/meta-selftest/files/signing/key.pub b/yocto-poky/meta-selftest/files/signing/key.pub
new file mode 100644
index 0000000..e197bb3
--- /dev/null
+++ b/yocto-poky/meta-selftest/files/signing/key.pub
@@ -0,0 +1,30 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mQENBFYeMycBCADISkEj+u+3SkGbmC4b09StA3Fk4J8bKZrTTpQqUhOH4QFIQpso
+q96Q907h/ABAgB+IV0SGIeN866E7BqToqoXZ74X6EoyXWdndaMaFZSj+oNqqg6Gi
+hVsuGNpvRyyXSCYW8w9H2lFx09UufFrUxoSeP2iVdJJaUAmb8e00PCwkYrS2BZEa
+tO2VgllbaqczldmlUGnkIZt8YUSQSI/xZBDYUvbcZYBaOnDH1SDQl26f+bgyeIyS
+TW5TZb96o4tMfiifgPoqAapAxQLahG0WtjF/n1yNV5wUNQYsEQf6/h6W2rHGsCP5
+6FVFnr/ZPVam9iHUxL4lvJSI8dEH37s9GmarABEBAAG0LXRlc3R1c2VyIChub2Nv
+bW1lbnQpIDx0ZXN0dXNlckB0ZXN0ZW1haWwuY29tPokBOAQTAQIAIgUCVh4zJwIb
+AwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQezExa11krVLM2wf/fW1C8DPx
+tZEyl6iPXFjNotslo+t2TL6jPefC22KmbokJCtCnxcopBjQRuhUSNDTkXkUdVagy
+TaaYILV8XGajTmcVGQTaKeh+j6TM6CBGApQB5KhHvZCyvNBrGcNyuiex0Sm/rIhS
+fZre6ptZM/026W2kLwwJESXzHJEqCoFmU6aSOUCVyiDgMfcNw6c4NmEoqZtLdnxU
+B7Nac98o933AIvaaQMGtKIOcyOM7P/dyv8eMc38z2ew5bEB8E9aSdg5koXb3zIt5
+IKea631k4INAsFFyLMQNSmmKV7RK0miF5b4hGyekrYZRtiic5+dq5aWnVka4hBfi
+x31euxwQE87gQLkBDQRWHjMnAQgAt7C9QCFPWzLGQuQ/YaQub+8s2lYNQnmfwDHm
+5PuON+Wj/f5GyQhHKsbdUAPZ7GsjFIQnva7xNYYF/IvpC+0saB5NLMkBzjfIsg92
+6MkadAKlOR2o9gKlF59mulsJmJqNFTXiRcVXvpUnU8WB9ECmm321XfYHhk+4EMay
+H3OUZ0k6dEmvrWBTKNTR7M0z6j/jW+8J3vP3L9k1H+OV0EZwAKXfbh1lN4H467jY
+3gA7FU1WDmA06HphoSaFUEGTuXGtrRP0eksCUj3BtVygXnyQb379dISDOWcs/9Ke
+v3KMrZWgDnA4pH1eQpjycBhwKOCHYyhSSVOwCS3DGkaaklmQZwARAQABiQEfBBgB
+AgAJBQJWHjMnAhsMAAoJEHsxMWtdZK1SoPsIAKadG/tvS5COCyF8FuriL89Ysfov
+kMRKeb9hsMDbKX2lm3UtoS5ErmpkEUO/SbazQYm6/vYc8noQquqhkIdCljIvpWDv
+17tXEFfTGA493dlTTEWFt5bvzbQN6OhBu3904lAE4JGtlOOa9OKDeguwXbneLOyl
+dnlj2f7rw05cB9t/RDu7T11dTI39BMTUUm1lpWxYJk41o59b9g+fpJZkiIAJwnN3
+MwM1u9/AWfTqjNRgMAO5dIYceceTwGogujG+xz93flt+NjQhILG0T9jd0DFBgIAX
+Zq4PzX5aFDKjGoFaOOZ6r+kppBLH/HN6okMGIcfqaPPdnJI1MXFQvFzUNpo=
+=2cSJ
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/yocto-poky/meta-selftest/files/signing/key.secret b/yocto-poky/meta-selftest/files/signing/key.secret
new file mode 100644
index 0000000..d30d7cd
--- /dev/null
+++ b/yocto-poky/meta-selftest/files/signing/key.secret
@@ -0,0 +1,59 @@
+-----BEGIN PGP PRIVATE KEY BLOCK-----
+Version: GnuPG v1
+
+lQO+BFYeMycBCADISkEj+u+3SkGbmC4b09StA3Fk4J8bKZrTTpQqUhOH4QFIQpso
+q96Q907h/ABAgB+IV0SGIeN866E7BqToqoXZ74X6EoyXWdndaMaFZSj+oNqqg6Gi
+hVsuGNpvRyyXSCYW8w9H2lFx09UufFrUxoSeP2iVdJJaUAmb8e00PCwkYrS2BZEa
+tO2VgllbaqczldmlUGnkIZt8YUSQSI/xZBDYUvbcZYBaOnDH1SDQl26f+bgyeIyS
+TW5TZb96o4tMfiifgPoqAapAxQLahG0WtjF/n1yNV5wUNQYsEQf6/h6W2rHGsCP5
+6FVFnr/ZPVam9iHUxL4lvJSI8dEH37s9GmarABEBAAH+AwMCLgbvBp7KeMdgcmpy
+Eheo+Xi7oLtKh5qc2LsxJnvszt4Q+0+v+dO+nlsRBuZAAo6EryyzH/HcncEoTQeG
+FvB6Si0IA79a7sdWLz6GmI/gfQUYeR1A7amjbFTu/OGGZIxd9uUrsoNu3Hs5UbeI
+0KjrhDYQrEt3GktF0WfAWnOkO3sONbXTKRxATw0YqT96wfPHmTK22qHVKodi2O6O
+yNnQ2JotGTiSCYB9geQ0jrYMotJlFrMC0UqIAip2iP/zLwXpCMjEJud5hY4aEDtQ
+JkDtQjPb2ICO98AqY6H/I7v1UAzUXJq7tIHTtA2d/9FJ++4wXqWJl3v7pKOOW323
+xpYZgPCtG+Ebx1NAGhze8rncsP+AjtC3dbHWBr6xpVtfw+AJCuSMB9ZR2SXE5NJD
+SlTzjsDbbCiCcTvfb+PfIpsMuTadWt+B+sI+LUsK4AaKRItinUz8ozn6ym3gyKA3
+rasW+ZVo9p7LiTX2JjS1K8h+7Sim2WlqTMvk+IzSDdoVRf6SUQ5JXOyxs3p5V5Tb
+2EyOuWfN6Fw4Xt3Pso09mSXGg1w6wmqW4nAslsL7U9alTzfNp6wZs5BaXWHRwnyu
+LzHATIkHbKbHZYZTJXguZm2jDJiDAIcdX6gpkUYZJpY7c69aMRUe1Xb/3YK4BhbG
+qpY0ams3ZwOe0EUz9Y1WLOFz7GqiKC5MBJLwcI483e6frVMMWNnyAH2yYau+n9st
+zI/L0nsk8+wpt9ORNq+BT78SL6WznfUdl4OTaJUdzighjBEmlCX5s0hI/09HqpbA
+ZdwDrBXmqFlN4BknZ3FCgGecBcG1hrXu80wH+qzA9lFKwJeKyFVGYX2ZPFyMxKJs
+1q2emoEqLg0r/ePJvYXpgXIH9ENTphRGTY6z57m8ouMw+TvqI55SOyIqqPTSqgxU
+B7QtdGVzdHVzZXIgKG5vY29tbWVudCkgPHRlc3R1c2VyQHRlc3RlbWFpbC5jb20+
+iQE4BBMBAgAiBQJWHjMnAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRB7
+MTFrXWStUszbB/99bULwM/G1kTKXqI9cWM2i2yWj63ZMvqM958LbYqZuiQkK0KfF
+yikGNBG6FRI0NOReRR1VqDJNppggtXxcZqNOZxUZBNop6H6PpMzoIEYClAHkqEe9
+kLK80GsZw3K6J7HRKb+siFJ9mt7qm1kz/TbpbaQvDAkRJfMckSoKgWZTppI5QJXK
+IOAx9w3Dpzg2YSipm0t2fFQHs1pz3yj3fcAi9ppAwa0og5zI4zs/93K/x4xzfzPZ
+7DlsQHwT1pJ2DmShdvfMi3kgp5rrfWTgg0CwUXIsxA1KaYpXtErSaIXlviEbJ6St
+hlG2KJzn52rlpadWRriEF+LHfV67HBATzuBAnQO+BFYeMycBCAC3sL1AIU9bMsZC
+5D9hpC5v7yzaVg1CeZ/AMebk+4435aP9/kbJCEcqxt1QA9nsayMUhCe9rvE1hgX8
+i+kL7SxoHk0syQHON8iyD3boyRp0AqU5Haj2AqUXn2a6WwmYmo0VNeJFxVe+lSdT
+xYH0QKabfbVd9geGT7gQxrIfc5RnSTp0Sa+tYFMo1NHszTPqP+Nb7wne8/cv2TUf
+45XQRnAApd9uHWU3gfjruNjeADsVTVYOYDToemGhJoVQQZO5ca2tE/R6SwJSPcG1
+XKBefJBvfv10hIM5Zyz/0p6/coytlaAOcDikfV5CmPJwGHAo4IdjKFJJU7AJLcMa
+RpqSWZBnABEBAAH+AwMCLgbvBp7KeMdgJ20scZrWqLVyIfNqsfu0ATH/tYIBbry9
+8RsBTZ4PBs6/X44fjMGPet1XuEv1R7IOiWO75K8+grdrWPTI9sP502d8Zv0rL007
+K02rpairfWbjVe/wDCtYDvodOptRqVpj32OiZLpfdzxCNy5C5GYrcp84/zBC25C5
+OeDvOhTBJt6ZdkExQFl4/KvpkISs7HbXoawa8WRlAbc81BxMHV21FusNzH0jlieG
+tT4VW3kD2+FphfpmYMnY/e4IviFZ9QQrTA2ZYHd6M4MSTRzmOvC0I6akkKyITc1X
+xdlCBXLbHMJm69cUxkp8sPSl668KXtbfSDSGqT50LHYOImcDVGboUWcIB7FLl+lT
+lCeQv32O8J/wGYBIEPsBZsPdIEu8/rZPe97/BCyiurPf7s9JCpq6C2heUdTV5DS9
+PKbyTlp7HrYLTJvgyAPXPwKZ8Y5YHZTMljWIb04rc5p7yVOOWiu4RZH28dYF63BR
+yX+hKBjK1tyEqI3xf+/ukib/4VuvAOUCoH/BqyHelT40Qg1qt3P75fkH/ZRNq2gi
+O2axGdlH5xrTOmLh7qGgr+rCAq5wmh6S3RDGT0PE4q/biGOtB2CI+fYin6Z0VC4H
+9mVOMz0v9EW15Ra87JkAOA/PAxIlPOrq5SvHseBx7iTL3vWeQzvQfCqeTrJ48AQY
+a7A7fMjQOZKCO9UuRIWm87JwOFIKb3JtauOGRFEHFDnlze5FBObUAyKP/dHpLwmm
+O4k9smJSCid740UvNbpUpS4xAjen89dQTBtWXxipTpX/iXmsnSbrThUG1mYjEU+q
+k5EF54KGfYSe4OJtm4dw/b5XL56CZJ79qBcD2kkjBA8o+/fxJKtnfTvPxGi0NZ2g
+sg3EAxem8+SOvcRGr2RmFfWa28+Q1jNIXs+mL4kBHwQYAQIACQUCVh4zJwIbDAAK
+CRB7MTFrXWStUqD7CACmnRv7b0uQjgshfBbq4i/PWLH6L5DESnm/YbDA2yl9pZt1
+LaEuRK5qZBFDv0m2s0GJuv72HPJ6EKrqoZCHQpYyL6Vg79e7VxBX0xgOPd3ZU0xF
+hbeW7820DejoQbt/dOJQBOCRrZTjmvTig3oLsF253izspXZ5Y9n+68NOXAfbf0Q7
+u09dXUyN/QTE1FJtZaVsWCZONaOfW/YPn6SWZIiACcJzdzMDNbvfwFn06ozUYDAD
+uXSGHHnHk8BqILoxvsc/d35bfjY0ISCxtE/Y3dAxQYCAF2auD81+WhQyoxqBWjjm
+eq/pKaQSx/xzeqJDBiHH6mjz3ZySNTFxULxc1Daa
+=b+vR
+-----END PGP PRIVATE KEY BLOCK-----
diff --git a/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/0001-Add-a-note-line-to-the-quick-reference.patch b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/0001-Add-a-note-line-to-the-quick-reference.patch
new file mode 100644
index 0000000..4ea3d74
--- /dev/null
+++ b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1-1.5.3/0001-Add-a-note-line-to-the-quick-reference.patch
@@ -0,0 +1,25 @@
+From 1478846ebfac690684e9c48049d08e0065f97a36 Mon Sep 17 00:00:00 2001
+From: Paul Eggleton <paul.eggleton@linux.intel.com>
+Date: Wed, 24 Feb 2016 17:43:03 +1300
+Subject: [PATCH] Add a note line to the quick reference
+
+A test patch so we have a file to move around.
+---
+ doc/quickref.1.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/doc/quickref.1.in b/doc/quickref.1.in
+index 389008b..226615c 100644
+--- a/doc/quickref.1.in
++++ b/doc/quickref.1.in
+@@ -560,6 +560,7 @@ you want, at runtime, to change the parameters of.
+ .P
+ If you find any other problems, please report them.
+ 
++NOTE: this is an important note.
+ 
+ .SH REPORTING BUGS
+ Report bugs in
+-- 
+2.5.0
+
diff --git a/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb
new file mode 100644
index 0000000..e93b0d5
--- /dev/null
+++ b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb
@@ -0,0 +1,16 @@
+SUMMARY = "Pipe viewer test recipe for devtool upgrade test"
+LICENSE = "Artistic-2.0"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
+
+SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \
+           file://0001-Add-a-note-line-to-the-quick-reference.patch"
+
+SRC_URI[md5sum] = "9365d86bd884222b4bf1039b5a9ed1bd"
+SRC_URI[sha256sum] = "681bcca9784bf3cb2207e68236d1f68e2aa7b80f999b5750dc77dcd756e81fbc"
+
+PR = "r5"
+
+S = "${WORKDIR}/pv-${PV}"
+
+inherit autotools
+
diff --git a/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded
new file mode 100644
index 0000000..afcc4aa
--- /dev/null
+++ b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test1_1.5.3.bb.upgraded
@@ -0,0 +1,14 @@
+SUMMARY = "Pipe viewer test recipe for devtool upgrade test"
+LICENSE = "Artistic-2.0"
+LIC_FILES_CHKSUM = "file://doc/COPYING;md5=9c50db2589ee3ef10a9b7b2e50ce1d02"
+
+SRC_URI = "http://www.ivarch.com/programs/sources/pv-${PV}.tar.gz \
+           file://0001-Add-a-note-line-to-the-quick-reference.patch"
+
+SRC_URI[md5sum] = "062bca5ff33df1dd09472e7fc3bbe332"
+SRC_URI[sha256sum] = "9dd45391806b0ed215abee4c5ac1597d018c386fe9c1f5afd2f6bc3b07fd82c3"
+
+S = "${WORKDIR}/pv-${PV}"
+
+inherit autotools
+
diff --git a/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
new file mode 100644
index 0000000..9bfce0a
--- /dev/null
+++ b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb
@@ -0,0 +1,18 @@
+SUMMARY = "A simple tool to wait for a specific signal over DBus"
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait"
+SECTION = "base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "dbus"
+
+# Note: this is intentionally not the latest version in the original .bb
+SRCREV = "1a3e1343761b30750bed70e0fd688f6d3c7b3717"
+PV = "0.1+git${SRCPV}"
+PR = "r2"
+
+SRC_URI = "git://git.yoctoproject.org/dbus-wait"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
diff --git a/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
new file mode 100644
index 0000000..9b947ed
--- /dev/null
+++ b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade-test2_git.bb.upgraded
@@ -0,0 +1,17 @@
+SUMMARY = "A simple tool to wait for a specific signal over DBus"
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/dbus-wait"
+SECTION = "base"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "dbus"
+
+# Note: this is intentionally not the latest version in the original .bb
+SRCREV = "6cc6077a36fe2648a5f993fe7c16c9632f946517"
+PV = "0.1+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/dbus-wait"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
diff --git a/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade_0.1.bb b/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade_0.1.bb
deleted file mode 100644
index 33ffc88..0000000
--- a/yocto-poky/meta-selftest/recipes-test/devtool/devtool-upgrade_0.1.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# This file was derived from the 'Hello World!' example recipe in the
-# Yocto Project Development Manual.
-#
-
-DESCRIPTION = "Simple helloworld application used to test the devtool upgrade feature"
-SECTION = "devtool"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
-PR = "r0"
-
-SRC_URI = "file://${THISDIR}/files/${P}.tar.gz \
-           file://0001-helloword.c-exit-with-EXIT_SUCCESS-instead-of-a-magi.patch \
-           "
-
-S = "${WORKDIR}/${P}"
-
-do_compile() {
-	     ${CC} helloworld.c -o helloworld
-}
-
-do_install() {
-	     install -d ${D}${bindir}
-	     install -m 0755 helloworld ${D}${bindir}
-}
diff --git a/yocto-poky/meta-selftest/recipes-test/devtool/files/0001-helloword.c-exit-with-EXIT_SUCCESS-instead-of-a-magi.patch b/yocto-poky/meta-selftest/recipes-test/devtool/files/0001-helloword.c-exit-with-EXIT_SUCCESS-instead-of-a-magi.patch
deleted file mode 100644
index 2294a09..0000000
--- a/yocto-poky/meta-selftest/recipes-test/devtool/files/0001-helloword.c-exit-with-EXIT_SUCCESS-instead-of-a-magi.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 0f37affbc6e6c71687301d99d7259f1968e57c48 Mon Sep 17 00:00:00 2001
-From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
-Date: Wed, 26 Aug 2015 12:42:23 +0000
-Subject: [PATCH] helloword.c: exit with EXIT_SUCCESS instead of a magic number
-
----
- helloworld.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/helloworld.c b/helloworld.c
-index 71f2e46..54bf50b 100644
---- a/helloworld.c
-+++ b/helloworld.c
-@@ -1,8 +1,9 @@
- #include <stdio.h>
-+#include <stdlib.h>
- 
- int main(int argc, char **argv)
- {
-     printf("Hello World!\n");
- 
--    return 0;
-+    return EXIT_SUCCESS;
- }
--- 
-1.8.4.5
-
diff --git a/yocto-poky/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.1.tar.gz b/yocto-poky/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.1.tar.gz
deleted file mode 100644
index 06a1c49..0000000
--- a/yocto-poky/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.1.tar.gz
+++ /dev/null
Binary files differ
diff --git a/yocto-poky/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.2.tar.gz b/yocto-poky/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.2.tar.gz
deleted file mode 100644
index 9b0dcf4..0000000
--- a/yocto-poky/meta-selftest/recipes-test/devtool/files/devtool-upgrade-0.2.tar.gz
+++ /dev/null
Binary files differ
diff --git a/yocto-poky/meta-selftest/recipes-test/emptytest/emptytest.bb b/yocto-poky/meta-selftest/recipes-test/emptytest/emptytest.bb
index e87f4d7..905c669 100644
--- a/yocto-poky/meta-selftest/recipes-test/emptytest/emptytest.bb
+++ b/yocto-poky/meta-selftest/recipes-test/emptytest/emptytest.bb
@@ -3,3 +3,5 @@
 # Set LICENSE to something so that bitbake -p that is ran at the beginning
 # is successful since test_recipe.inc has not yet been modified.
 LICENSE = ""
+
+EXCLUDE_FROM_WORLD = "1"
diff --git a/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.bb b/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.bb
index 89451bd..a294ba7 100644
--- a/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.bb
+++ b/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.bb
@@ -4,14 +4,14 @@
 
 IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP}"
 
-IMAGE_FSTYPES = "wic.bz2"
+IMAGE_FSTYPES = "wic"
 RM_OLD_IMAGE = "1"
 
-DEPENDS = "syslinux syslinux-native parted-native dosfstools-native mtools-native"
+DEPENDS = "syslinux syslinux-native parted-native dosfstools-native mtools-native gptfdisk-native"
 
 # core-image-minimal is referenced in .wks, so we need its rootfs
 # to be ready before our rootfs
-do_rootfs[depends] += "core-image-minimal:do_rootfs"
+do_rootfs[depends] += "core-image-minimal:do_image core-image-minimal:do_rootfs_wicenv"
 
 IMAGE_ROOTFS_EXTRA_SPACE = "2000"
 
diff --git a/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.wks b/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.wks
index 8f9be09..d55075d 100644
--- a/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.wks
+++ b/yocto-poky/meta-selftest/recipes-test/images/wic-image-minimal.wks
@@ -2,9 +2,9 @@
 # long-description: This image contains boot partition and 3 rootfs partitions
 # created from core-image-minimal and wic-image-minimal image recipes.
 
-part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
-part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
-part /core --source rootfs --rootfs-dir=core-image-minimal --ondisk sda --fstype=ext4 --label core --align 1024
-part /backup --source rootfs --rootfs-dir=wic-image-minimal --ondisk sda --fstype=ext4 --label backup --align 1024
+part /boot --source bootimg-pcbios --ondisk vda --label boot --active --align 1024
+part / --source rootfs --ondisk vda --fstype=ext4 --label platform --align 1024 --use-uuid
+part /mnt --source rootfs --rootfs-dir=core-image-minimal --ondisk vda --fstype=ext4 --label core --align 1024
+part backup --source rootfs --rootfs-dir=wic-image-minimal --ondisk vda --fstype=ext4 --label backup --align 1024
 
-bootloader  --timeout=0  --append="rootwait console=tty0"
+bootloader --ptable gpt --timeout=0  --append="rootwait console=tty0"
diff --git a/yocto-poky/meta-selftest/recipes-test/xcursor-transparent-theme/xcursor-transparent-theme_0.1.1.bbappend b/yocto-poky/meta-selftest/recipes-test/xcursor-transparent-theme/xcursor-transparent-theme_%.bbappend
similarity index 100%
rename from yocto-poky/meta-selftest/recipes-test/xcursor-transparent-theme/xcursor-transparent-theme_0.1.1.bbappend
rename to yocto-poky/meta-selftest/recipes-test/xcursor-transparent-theme/xcursor-transparent-theme_%.bbappend
diff --git a/yocto-poky/meta-yocto-bsp/conf/machine/beaglebone.conf b/yocto-poky/meta-yocto-bsp/conf/machine/beaglebone.conf
index ff46fb2..179d135 100644
--- a/yocto-poky/meta-yocto-bsp/conf/machine/beaglebone.conf
+++ b/yocto-poky/meta-yocto-bsp/conf/machine/beaglebone.conf
@@ -22,7 +22,7 @@
 SERIAL_CONSOLE = "115200 ttyO0"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ?= "4.1%"
+PREFERRED_VERSION_linux-yocto ?= "4.4%"
 
 KERNEL_IMAGETYPE = "zImage"
 KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb"
diff --git a/yocto-poky/meta-yocto-bsp/conf/machine/edgerouter.conf b/yocto-poky/meta-yocto-bsp/conf/machine/edgerouter.conf
index 476e690..6343dfc 100644
--- a/yocto-poky/meta-yocto-bsp/conf/machine/edgerouter.conf
+++ b/yocto-poky/meta-yocto-bsp/conf/machine/edgerouter.conf
@@ -11,7 +11,7 @@
 KERNEL_IMAGE_STRIP_EXTRA_SECTIONS  = ".comment"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ?= "4.1%"
+PREFERRED_VERSION_linux-yocto ?= "4.4%"
 
 SERIAL_CONSOLE = "115200 ttyS0"
 USE_VT ?= "0"
diff --git a/yocto-poky/meta-yocto-bsp/conf/machine/genericx86.conf b/yocto-poky/meta-yocto-bsp/conf/machine/genericx86.conf
index 2642cab..798b62e 100644
--- a/yocto-poky/meta-yocto-bsp/conf/machine/genericx86.conf
+++ b/yocto-poky/meta-yocto-bsp/conf/machine/genericx86.conf
@@ -6,3 +6,5 @@
 DEFAULTTUNE ?= "core2-32"
 require conf/machine/include/tune-core2.inc
 require conf/machine/include/genericx86-common.inc
+
+MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "gma500-gfx-check"
diff --git a/yocto-poky/meta-yocto-bsp/conf/machine/include/genericx86-common.inc b/yocto-poky/meta-yocto-bsp/conf/machine/include/genericx86-common.inc
index 1588556..16b689d 100644
--- a/yocto-poky/meta-yocto-bsp/conf/machine/include/genericx86-common.inc
+++ b/yocto-poky/meta-yocto-bsp/conf/machine/include/genericx86-common.inc
@@ -2,7 +2,7 @@
 MACHINE_FEATURES += "wifi efi pcbios"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ?= "4.1%"
+PREFERRED_VERSION_linux-yocto ?= "4.4%"
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
 XSERVER ?= "${XSERVER_X86_BASE} \
             ${XSERVER_X86_EXT} \
diff --git a/yocto-poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf b/yocto-poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
index 036b05f..f3ad12d 100644
--- a/yocto-poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
+++ b/yocto-poky/meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf
@@ -14,7 +14,7 @@
 
 MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
 
-PREFERRED_VERSION_linux-yocto ?= "4.1%"
+PREFERRED_VERSION_linux-yocto ?= "4.4%"
 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
 
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
diff --git a/yocto-poky/meta-yocto-bsp/recipes-bsp/alsa-state/alsa-state.bbappend b/yocto-poky/meta-yocto-bsp/recipes-bsp/alsa-state/alsa-state.bbappend
deleted file mode 100644
index 72d991c..0000000
--- a/yocto-poky/meta-yocto-bsp/recipes-bsp/alsa-state/alsa-state.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
diff --git a/yocto-poky/meta-yocto-bsp/recipes-bsp/alsa-state/alsa-state/beagleboard/asound.state b/yocto-poky/meta-yocto-bsp/recipes-bsp/alsa-state/alsa-state/beagleboard/asound.state
deleted file mode 100644
index f924491..0000000
--- a/yocto-poky/meta-yocto-bsp/recipes-bsp/alsa-state/alsa-state/beagleboard/asound.state
+++ /dev/null
@@ -1,656 +0,0 @@
-state.omap3beagle {
-	control.1 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 'Option 2 (voice/audio)'
-		comment.item.1 'Option 1 (audio)'
-		iface MIXER
-		name 'Codec Operation Mode'
-		value 'Option 1 (audio)'
-	}
-	control.2 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 63'
-		comment.dbmin -6300
-		comment.dbmax 0
-		iface MIXER
-		name 'DAC1 Digital Fine Playback Volume'
-		value.0 0
-		value.1 0
-	}
-	control.3 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 63'
-		comment.dbmin -6300
-		comment.dbmax 0
-		iface MIXER
-		name 'DAC2 Digital Fine Playback Volume'
-		value.0 50
-		value.1 50
-	}
-	control.4 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 2'
-		comment.dbmin 0
-		comment.dbmax 1200
-		iface MIXER
-		name 'DAC1 Digital Coarse Playback Volume'
-		value.0 0
-		value.1 0
-	}
-	control.5 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 2'
-		comment.dbmin 0
-		comment.dbmax 1200
-		iface MIXER
-		name 'DAC2 Digital Coarse Playback Volume'
-		value.0 2
-		value.1 2
-	}
-	control.6 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 18'
-		comment.dbmin -2400
-		comment.dbmax 1200
-		iface MIXER
-		name 'DAC1 Analog Playback Volume'
-		value.0 0
-		value.1 0
-	}
-	control.7 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 18'
-		comment.dbmin -2400
-		comment.dbmax 1200
-		iface MIXER
-		name 'DAC2 Analog Playback Volume'
-		value.0 15
-		value.1 15
-	}
-	control.8 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 2
-		iface MIXER
-		name 'DAC1 Analog Playback Switch'
-		value.0 false
-		value.1 false
-	}
-	control.9 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 2
-		iface MIXER
-		name 'DAC2 Analog Playback Switch'
-		value.0 true
-		value.1 true
-	}
-	control.10 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 1
-		comment.range '0 - 49'
-		comment.dbmin -3700
-		comment.dbmax 1200
-		iface MIXER
-		name 'DAC Voice Digital Downlink Volume'
-		value 0
-	}
-	control.11 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 1
-		comment.range '0 - 18'
-		comment.dbmin -2400
-		comment.dbmax 1200
-		iface MIXER
-		name 'DAC Voice Analog Downlink Volume'
-		value 18
-	}
-	control.12 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'DAC Voice Analog Downlink Switch'
-		value false
-	}
-	control.13 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 3'
-		comment.dbmin -1200
-		comment.dbmax 600
-		iface MIXER
-		name 'PreDriv Playback Volume'
-		value.0 0
-		value.1 0
-	}
-	control.14 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 3'
-		comment.dbmin -1200
-		comment.dbmax 600
-		iface MIXER
-		name 'Headset Playback Volume'
-		value.0 3
-		value.1 3
-	}
-	control.15 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 3'
-		comment.dbmin -1200
-		comment.dbmax 600
-		iface MIXER
-		name 'Carkit Playback Volume'
-		value.0 0
-		value.1 0
-	}
-	control.16 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 1
-		comment.range '0 - 3'
-		comment.dbmin -600
-		comment.dbmax 1200
-		iface MIXER
-		name 'Earpiece Playback Volume'
-		value 0
-	}
-	control.17 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 31'
-		comment.dbmin 0
-		comment.dbmax 3100
-		iface MIXER
-		name 'TX1 Digital Capture Volume'
-		value.0 12
-		value.1 12
-	}
-	control.18 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 31'
-		comment.dbmin 0
-		comment.dbmax 3100
-		iface MIXER
-		name 'TX2 Digital Capture Volume'
-		value.0 0
-		value.1 0
-	}
-	control.19 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 2
-		comment.range '0 - 5'
-		comment.dbmin 0
-		comment.dbmax 3000
-		iface MIXER
-		name 'Analog Capture Volume'
-		value.0 0
-		value.1 0
-	}
-	control.20 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 'Voice high priority'
-		comment.item.1 'HiFi high priority'
-		iface MIXER
-		name 'AVADC Clock Priority'
-		value 'Voice high priority'
-	}
-	control.21 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 '27/20/14 ms'
-		comment.item.1 '55/40/27 ms'
-		comment.item.2 '109/81/55 ms'
-		comment.item.3 '218/161/109 ms'
-		comment.item.4 '437/323/218 ms'
-		comment.item.5 '874/645/437 ms'
-		comment.item.6 '1748/1291/874 ms'
-		comment.item.7 '3495/2581/1748 ms'
-		iface MIXER
-		name 'HS ramp delay'
-		value '27/20/14 ms'
-	}
-	control.22 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 'Vibra H-bridge direction'
-		comment.item.1 'Audio data MSB'
-		iface MIXER
-		name 'Vibra H-bridge mode'
-		value 'Vibra H-bridge direction'
-	}
-	control.23 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 'Positive polarity'
-		comment.item.1 'Negative polarity'
-		iface MIXER
-		name 'Vibra H-bridge direction'
-		value 'Positive polarity'
-	}
-	control.24 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Analog Right Sub Mic Capture Switch'
-		value false
-	}
-	control.25 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Analog Right AUXR Capture Switch'
-		value true
-	}
-	control.26 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Analog Left Main Mic Capture Switch'
-		value false
-	}
-	control.27 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Analog Left Headset Mic Capture Switch'
-		value false
-	}
-	control.28 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Analog Left AUXL Capture Switch'
-		value true
-	}
-	control.29 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Analog Left Carkit Mic Capture Switch'
-		value false
-	}
-	control.30 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 Analog
-		comment.item.1 Digimic1
-		iface MIXER
-		name 'TX2 Capture Route'
-		value Analog
-	}
-	control.31 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 Analog
-		comment.item.1 Digimic0
-		iface MIXER
-		name 'TX1 Capture Route'
-		value Analog
-	}
-	control.32 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 'Local vibrator'
-		comment.item.1 Audio
-		iface MIXER
-		name 'Vibra Route'
-		value 'Local vibrator'
-	}
-	control.33 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 AudioL1
-		comment.item.1 AudioR1
-		comment.item.2 AudioL2
-		comment.item.3 AudioR2
-		iface MIXER
-		name 'Vibra Mux'
-		value AudioL1
-	}
-	control.34 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'HandsfreeR Switch'
-		value false
-	}
-	control.35 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 Voice
-		comment.item.1 AudioR1
-		comment.item.2 AudioR2
-		comment.item.3 AudioL2
-		iface MIXER
-		name 'HandsfreeR Mux'
-		value Voice
-	}
-	control.36 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'HandsfreeL Switch'
-		value false
-	}
-	control.37 {
-		comment.access 'read write'
-		comment.type ENUMERATED
-		comment.count 1
-		comment.item.0 Voice
-		comment.item.1 AudioL1
-		comment.item.2 AudioL2
-		comment.item.3 AudioR2
-		iface MIXER
-		name 'HandsfreeL Mux'
-		value Voice
-	}
-	control.38 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'CarkitR Mixer Voice'
-		value false
-	}
-	control.39 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'CarkitR Mixer AudioR1'
-		value false
-	}
-	control.40 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'CarkitR Mixer AudioR2'
-		value false
-	}
-	control.41 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'CarkitL Mixer Voice'
-		value false
-	}
-	control.42 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'CarkitL Mixer AudioL1'
-		value false
-	}
-	control.43 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'CarkitL Mixer AudioL2'
-		value false
-	}
-	control.44 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'HeadsetR Mixer Voice'
-		value false
-	}
-	control.45 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'HeadsetR Mixer AudioR1'
-		value false
-	}
-	control.46 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'HeadsetR Mixer AudioR2'
-		value true
-	}
-	control.47 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'HeadsetL Mixer Voice'
-		value false
-	}
-	control.48 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'HeadsetL Mixer AudioL1'
-		value false
-	}
-	control.49 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'HeadsetL Mixer AudioL2'
-		value true
-	}
-	control.50 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'PredriveR Mixer Voice'
-		value false
-	}
-	control.51 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'PredriveR Mixer AudioR1'
-		value false
-	}
-	control.52 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'PredriveR Mixer AudioR2'
-		value false
-	}
-	control.53 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'PredriveR Mixer AudioL2'
-		value false
-	}
-	control.54 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'PredriveL Mixer Voice'
-		value false
-	}
-	control.55 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'PredriveL Mixer AudioL1'
-		value false
-	}
-	control.56 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'PredriveL Mixer AudioL2'
-		value false
-	}
-	control.57 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'PredriveL Mixer AudioR2'
-		value false
-	}
-	control.58 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Earpiece Mixer Voice'
-		value false
-	}
-	control.59 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Earpiece Mixer AudioL1'
-		value false
-	}
-	control.60 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Earpiece Mixer AudioL2'
-		value false
-	}
-	control.61 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Earpiece Mixer AudioR1'
-		value false
-	}
-	control.62 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 1
-		comment.range '0 - 41'
-		comment.dbmin -5100
-		comment.dbmax -1000
-		iface MIXER
-		name 'Voice Digital Loopback Volume'
-		value 0
-	}
-	control.63 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 1
-		comment.range '0 - 7'
-		comment.dbmin -2400
-		comment.dbmax 0
-		iface MIXER
-		name 'Right Digital Loopback Volume'
-		value 0
-	}
-	control.64 {
-		comment.access 'read write'
-		comment.type INTEGER
-		comment.count 1
-		comment.range '0 - 7'
-		comment.dbmin -2400
-		comment.dbmax 0
-		iface MIXER
-		name 'Left Digital Loopback Volume'
-		value 0
-	}
-	control.65 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Voice Analog Loopback Switch'
-		value false
-	}
-	control.66 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Left2 Analog Loopback Switch'
-		value false
-	}
-	control.67 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Right2 Analog Loopback Switch'
-		value false
-	}
-	control.68 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Left1 Analog Loopback Switch'
-		value false
-	}
-	control.69 {
-		comment.access 'read write'
-		comment.type BOOLEAN
-		comment.count 1
-		iface MIXER
-		name 'Right1 Analog Loopback Switch'
-		value false
-	}
-}
diff --git a/yocto-poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beagleboard/machconfig b/yocto-poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beagleboard/machconfig
deleted file mode 100755
index a46859f..0000000
--- a/yocto-poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beagleboard/machconfig
+++ /dev/null
@@ -1,3 +0,0 @@
-# Assume a USB mouse and touchscreen are connected
-HAVE_TOUCHSCREEN=0
-HAVE_KEYBOARD=1
diff --git a/yocto-poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone/machconfig b/yocto-poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone/machconfig
new file mode 100644
index 0000000..ffce012
--- /dev/null
+++ b/yocto-poky/meta-yocto-bsp/recipes-bsp/formfactor/formfactor/beaglebone/machconfig
@@ -0,0 +1,3 @@
+# Assume a USB mouse and keyboard are connected
+HAVE_TOUCHSCREEN=0
+HAVE_KEYBOARD=1
diff --git a/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf b/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf
new file mode 100644
index 0000000..74d33c8
--- /dev/null
+++ b/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf
@@ -0,0 +1,2 @@
+# Mimic modprobe's install funcitonality with busybox's modprobe
+install gma500_gfx dmesg | grep gma500_gfx_checked || { /etc/modprobe.d/gma500-gfx-check.sh || modprobe gma500_gfx; }
diff --git a/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh b/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh
new file mode 100644
index 0000000..75cda99
--- /dev/null
+++ b/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Check for devices we wish to avoid gma500_gfx for
+DEVICES="0x8119 0x4108"
+
+# Checked flag to avoid infinite modprobe
+echo "gma500_gfx_checked" >> /dev/kmsg;
+
+for DEVICE in $DEVICES; do
+    if udevadm trigger --subsystem-match=pci --verbose --attr-match=device=$DEVICE | grep "pci" >> /dev/null ; then
+        echo "Found $DEVICE, avoiding gma500_gfx module" >> /dev/kmsg;
+        exit 0
+    fi
+done
+exit 1
diff --git a/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb b/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb
new file mode 100644
index 0000000..00680de
--- /dev/null
+++ b/yocto-poky/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check_1.0.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Intel gma500_gfx fix for certain hardware"
+DESCRIPTION = "Avoid inserting gma500_gfx module for certain hardware devices."
+LICENSE="GPLv2"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+SRC_URI = "file://gma500-gfx-check.conf \
+	file://gma500-gfx-check.sh "
+
+do_install(){
+    install -d ${D}${sysconfdir}/modprobe.d/
+    install -m 755 ${WORKDIR}/gma500-gfx-check.sh ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.sh
+    install -m 644 ${WORKDIR}/gma500-gfx-check.conf ${D}${sysconfdir}/modprobe.d/gma500-gfx-check.conf
+}
+
+FILES_${PN}="${sysconfdir}/modprobe.d/gma500-gfx-check.conf \
+             ${sysconfdir}/modprobe.d/gma500-gfx-check.sh"
+
+COMPATIBLE_MACHINE = "genericx86"
diff --git a/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
deleted file mode 100644
index 52fd07f..0000000
--- a/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
+++ /dev/null
@@ -1,11 +0,0 @@
-KBRANCH_genericx86  = "standard/common-pc/base"
-KBRANCH_genericx86-64  = "standard/common-pc-64/base"
-
-KMACHINE_genericx86 ?= "common-pc"
-KMACHINE_genericx86-64 ?= "common-pc-64"
-
-SRCREV_machine_genericx86 ?= "bda175966009d5a94103559e6e6ae51279952f39"
-SRCREV_machine_genericx86-64 ?= "bda175966009d5a94103559e6e6ae51279952f39"
-
-COMPATIBLE_MACHINE_genericx86 = "genericx86"
-COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
diff --git a/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.14.bbappend b/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.14.bbappend
deleted file mode 100644
index 310aeb8..0000000
--- a/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.14.bbappend
+++ /dev/null
@@ -1,23 +0,0 @@
-KBRANCH_genericx86  = "standard/common-pc/base"
-KBRANCH_genericx86-64  = "standard/common-pc-64/base"
-KBRANCH_edgerouter = "standard/edgerouter"
-KBRANCH_beaglebone = "standard/beaglebone"
-KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
-
-KMACHINE_genericx86 ?= "common-pc"
-KMACHINE_genericx86-64 ?= "common-pc-64"
-
-SRCREV_machine_genericx86 ?= "d9bf859dfae6f88b88b157119c20ae4d5e51420a"
-SRCREV_machine_genericx86-64 ?= "93b2b800d85c1565af7d96f3776dc38c85ae1902"
-SRCREV_machine_edgerouter ?= "578602a722dbfb260801f3b37c6eafd2abb2340d"
-SRCREV_machine_beaglebone ?= "578602a722dbfb260801f3b37c6eafd2abb2340d"
-SRCREV_machine_mpc8315e-rdb ?= "1cb1bbaf63cecc918cf36c89819a7464af4c4b13"
-
-COMPATIBLE_MACHINE_genericx86 = "genericx86"
-COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
-COMPATIBLE_MACHINE_edgerouter = "edgerouter"
-COMPATIBLE_MACHINE_beaglebone = "beaglebone"
-COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
-
-LINUX_VERSION_genericx86 = "3.14.39"
-LINUX_VERSION_genericx86-64 = "3.14.39"
diff --git a/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.19.bbappend b/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.19.bbappend
deleted file mode 100644
index 396af14..0000000
--- a/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_3.19.bbappend
+++ /dev/null
@@ -1,20 +0,0 @@
-KBRANCH_genericx86  = "standard/common-pc"
-KBRANCH_genericx86-64  = "standard/common-pc-64/base"
-KBRANCH_edgerouter = "standard/edgerouter"
-KBRANCH_beaglebone = "standard/beaglebone"
-KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
-
-KMACHINE_genericx86 ?= "common-pc"
-KMACHINE_genericx86-64 ?= "common-pc-64"
-
-SRCREV_machine_genericx86 ?= "1583bf79b946cd5581d84d8c369b819a5ecb94b4"
-SRCREV_machine_genericx86-64 ?= "1583bf79b946cd5581d84d8c369b819a5ecb94b4"
-SRCREV_machine_edgerouter ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
-SRCREV_machine_beaglebone ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
-SRCREV_machine_mpc8315e-rdb ?= "2893f3e8ece72f6f47329714d6afe4c9c545bbf9"
-
-COMPATIBLE_MACHINE_genericx86 = "genericx86"
-COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
-COMPATIBLE_MACHINE_edgerouter = "edgerouter"
-COMPATIBLE_MACHINE_beaglebone = "beaglebone"
-COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
diff --git a/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.1.bbappend b/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.1.bbappend
index 571da39..b20a18b 100644
--- a/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.1.bbappend
+++ b/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.1.bbappend
@@ -7,8 +7,8 @@
 KMACHINE_genericx86 ?= "common-pc"
 KMACHINE_genericx86-64 ?= "common-pc-64"
 
-SRCREV_machine_genericx86 ?= "2e0ac7b6c4e3ada23a84756287e9b7051ace939a"
-SRCREV_machine_genericx86-64 ?= "2e0ac7b6c4e3ada23a84756287e9b7051ace939a"
+SRCREV_machine_genericx86    ?= "304caa9480f19875e717faf3cad8cb7ecd758733"
+SRCREV_machine_genericx86-64 ?= "304caa9480f19875e717faf3cad8cb7ecd758733"
 SRCREV_machine_edgerouter ?= "79a31b9d23db126f8a6be3eb88fd683056a213f1"
 SRCREV_machine_beaglebone ?= "efb6ffb2ca96a364f916c9890ad023fc595e0e6e"
 SRCREV_machine_mpc8315e-rdb ?= "79a31b9d23db126f8a6be3eb88fd683056a213f1"
@@ -19,5 +19,5 @@
 COMPATIBLE_MACHINE_beaglebone = "beaglebone"
 COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
 
-LINUX_VERSION_genericx86 = "4.1.17"
-LINUX_VERSION_genericx86-64 = "4.1.17"
+LINUX_VERSION_genericx86 = "4.1.18"
+LINUX_VERSION_genericx86-64 = "4.1.18"
diff --git a/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend b/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend
new file mode 100644
index 0000000..e31b0c8
--- /dev/null
+++ b/yocto-poky/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -0,0 +1,23 @@
+KBRANCH_genericx86  = "standard/base"
+KBRANCH_genericx86-64  = "standard/base"
+
+KMACHINE_genericx86 ?= "common-pc"
+KMACHINE_genericx86-64 ?= "common-pc-64"
+KBRANCH_edgerouter = "standard/edgerouter"
+KBRANCH_beaglebone = "standard/beaglebone"
+KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
+
+SRCREV_machine_genericx86    ?= "3d2455f9da30f923c6bd69014fad4cc4ea738be6"
+SRCREV_machine_genericx86-64 ?= "3d2455f9da30f923c6bd69014fad4cc4ea738be6"
+SRCREV_machine_edgerouter ?= "ff4c4ef15b51f45b9106d71bf1f62fe7c02e63c2"
+SRCREV_machine_beaglebone ?= "ff4c4ef15b51f45b9106d71bf1f62fe7c02e63c2"
+SRCREV_machine_mpc8315e-rdb ?= "df00877ef9387b38b9601c82db57de2a1b23ce53"
+
+COMPATIBLE_MACHINE_genericx86 = "genericx86"
+COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
+COMPATIBLE_MACHINE_edgerouter = "edgerouter"
+COMPATIBLE_MACHINE_beaglebone = "beaglebone"
+COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
+
+LINUX_VERSION_genericx86 = "4.4.3"
+LINUX_VERSION_genericx86-64 = "4.4.3"
diff --git a/yocto-poky/meta-yocto/classes/poky-sanity.bbclass b/yocto-poky/meta-yocto/classes/poky-sanity.bbclass
deleted file mode 100644
index 77c266e..0000000
--- a/yocto-poky/meta-yocto/classes/poky-sanity.bbclass
+++ /dev/null
@@ -1,28 +0,0 @@
-# Provide some extensions to sanity.bbclass to handle poky-specific conf file upgrades
-
-python poky_update_bblayersconf() {
-    current_version = int(d.getVar('LCONF_VERSION', True) or -1)
-    latest_version = int(d.getVar('LAYER_CONF_VERSION', True) or -1)
-
-    bblayers_fn = bblayers_conf_file(d)
-    lines = sanity_conf_read(bblayers_fn)
-
-    if current_version == 5 and latest_version > 5:
-        # Handle split out of meta-yocto-bsp from meta-yocto
-        if '/meta-yocto-bsp' not in d.getVar('BBLAYERS', True):
-            index, meta_yocto_line = sanity_conf_find_line('meta-yocto\s*\\\\\\n', lines)
-            if meta_yocto_line:
-                lines.insert(index + 1, meta_yocto_line.replace('meta-yocto',
-                                                                'meta-yocto-bsp'))
-            else:
-                sys.exit()
-
-        current_version += 1
-        sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_version)
-        return
-
-    sys.exit()
-}
-
-# Prepend to ensure our function runs before the OE-Core one
-BBLAYERS_CONF_UPDATE_FUNCS =+ "poky_update_bblayersconf"
diff --git a/yocto-poky/meta-yocto/conf/bblayers.conf.sample b/yocto-poky/meta-yocto/conf/bblayers.conf.sample
deleted file mode 100644
index 0eda565..0000000
--- a/yocto-poky/meta-yocto/conf/bblayers.conf.sample
+++ /dev/null
@@ -1,16 +0,0 @@
-# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
-# changes incompatibly
-LCONF_VERSION = "6"
-
-BBPATH = "${TOPDIR}"
-BBFILES ?= ""
-
-BBLAYERS ?= " \
-  ##OEROOT##/meta \
-  ##OEROOT##/meta-yocto \
-  ##OEROOT##/meta-yocto-bsp \
-  "
-BBLAYERS_NON_REMOVABLE ?= " \
-  ##OEROOT##/meta \
-  ##OEROOT##/meta-yocto \
-  "
diff --git a/yocto-poky/meta-yocto/conf/conf-notes.txt b/yocto-poky/meta-yocto/conf/conf-notes.txt
deleted file mode 100644
index 66e6319..0000000
--- a/yocto-poky/meta-yocto/conf/conf-notes.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-Common targets are:
-    core-image-minimal
-    core-image-sato
-    meta-toolchain
-    adt-installer
-    meta-ide-support
-
-You can also run generated qemu images with a command like 'runqemu qemux86'
diff --git a/yocto-poky/meta-yocto/conf/distro/include/maintainers.inc b/yocto-poky/meta-yocto/conf/distro/include/maintainers.inc
deleted file mode 100644
index df8b647..0000000
--- a/yocto-poky/meta-yocto/conf/distro/include/maintainers.inc
+++ /dev/null
@@ -1,761 +0,0 @@
-# Yocto Project / OpenEmbedded-Core (OE-Core) Maintainers File
-#
-# This file contains a list of recipe maintainers.
-#
-# Please submit any patches against recipes in meta to the 
-# OE-Core mail list (openembedded-core@lists.openembedded.org)
-# For recipes in meta-yocto please use the Poky list (poky@yoctoproject.org)
-#
-# If you have problems with or questions about a particular recipe, feel
-# free to contact the maintainer directly (cc:ing the appropriate mailing list
-# puts it in the archive and helps other people who might have the same
-# questions in the future), but please try to do the following first:
-#
-#  - look in the Yocto Project Bugzilla
-#    (http://bugzilla.yoctoproject.org/) to see if a problem has
-#    already been reported
-#
-# - look through recent entries of the appropriate mailing list archives
-#   (http://lists.linuxtogo.org/pipermail/openembedded-core or
-#    https://lists.yoctoproject.org/pipermail/poky/) to see if other
-#   people have run into similar problems or had similar questions
-#   answered.
-#
-# The format is as a bitbake variable override for each recipe
-#
-#	RECIPE_MAINTAINER_pn-<recipe name> = "Full Name <address@domain>"
-#
-# Please keep this list in alphabetical order.
-#
-RECIPE_MAINTAINER_pn-acl = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-acpid = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-adt-installer = "Jessica Zhang <jessica.zhang@intel.com>"
-RECIPE_MAINTAINER_pn-adwaita-icon-theme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-alsa-lib = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-alsa-plugins = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-alsa-state = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-alsa-tools = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-alsa-utils = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-alsa-utils-scripts = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-apmd = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-apr = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-apr-util = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-apt = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-aspell = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-atk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-at = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-at-spi2-atk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-at-spi2-core = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-attr = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-augeas = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-autoconf = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-autogen = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-automake = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-avahi-ui = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-avahi = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-babeltrace = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-base-files = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-base-passwd = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-bash = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-bc = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-bdwgc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-beecrypt = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-bigreqsproto = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-bind = "Kai Kang <kai.kang@windriver.com>"
-RECIPE_MAINTAINER_pn-binutils = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-bison = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-blktool = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-blktrace = "Tom Zanussi <tom.zanussi@intel.com>"
-RECIPE_MAINTAINER_pn-bluez5 = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-boost = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-btrfs-tools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-build-appliance-image = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-build-compare = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-builder = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-busybox = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-byacc = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-bzip2 = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-ca-certificates = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-cairo = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-calibrateproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-ccache = "Wenzong Fan <wenzong.fan@windriver.com>"
-RECIPE_MAINTAINER_pn-cdrtools = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-chkconfig = "Wenzong Fan <wenzong.fan@windriver.com>"
-RECIPE_MAINTAINER_pn-chkconfig-alternatives-native = "Wenzong Fan <wenzong.fan@windriver.com>"
-RECIPE_MAINTAINER_pn-chrpath = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-clutter-gst-3.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-clutter-gtk-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-clutter-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-cmake-native = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-cmake = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-cogl-1.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-compositeproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-connman = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-connman-gnome = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-consolekit = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-console-tools = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-core-image-base = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-clutter = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-directfb = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-full-cmdline = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-lsb-dev = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-lsb = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-lsb-sdk = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-minimal-dev = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-minimal-initramfs = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-minimal-mtdutils = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-minimal = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-rt = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-rt-sdk = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-sato-dev = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-sato = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-sato-sdk = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-core-image-x11 = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-coreutils = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-cpio = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-cracklib = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-createrepo = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-cronie = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-cross-localedef-native = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-cups = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-curl = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-cwautomacros = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-damageproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-db = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-dbus = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-dbus-glib = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-dbus-test = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-dbus-wait = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-desktop-file-utils-native = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-dhcp = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-diffstat = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-diffutils = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-directfb-examples = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-directfb = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-distcc = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-distcc-config = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-dmxproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-docbook-dsssl-stylesheet = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-docbook-dsssl-stylesheets-native = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-docbook-sgml-dtd-3.1-native = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-docbook-sgml-dtd-4.1-native = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-docbook-sgml-dtd-4.5-native = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-docbook-sgml-dtd = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-docbook-utils = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-dosfstools = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-dpkg = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-dri2proto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-dri3proto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-dropbear = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-dtc = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-e2fsprogs = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-ed = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-eee-acpi-scripts = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-elfutils = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-enchant = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-encodings = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-epiphany = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-ethtool = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-expat = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-file = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-findutils = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-fixesproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-flac = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-flex = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-font-alias = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-fontconfig = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-fontsproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-font-util = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-foomatic-filters = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-formfactor = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-fotowall = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-freetype = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-fstests = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-gaku = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-gawk = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-gcc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-gcc-source = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-gccmakedep = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-gcc-runtime = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-gconf = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gcr = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-gdb = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-gdbm = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-gdk-pixbuf = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-genext2fs = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-gettext-minimal-native = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-gettext = "Wenzong Fan <wenzong.fan@windriver.com>"
-RECIPE_MAINTAINER_pn-ghostscript = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-giflib = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-git = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-glew = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-glib-2.0 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-glibc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-glib-networking = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-glproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gmp = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-gnome-common = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-gnome-desktop = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-gnome-desktop-testing = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-desktop3 = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-gnome-doc-utils = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-gnome-mime-data = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-gnu-config = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-gnu-efi = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-gnupg = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-gnutls = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-gperf = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-gpgme = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-grep = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-groff = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-grub = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-gsettings-desktop-schemas = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0 = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-libav = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-bad = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-base = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-good = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-plugins-ugly = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-gstreamer1.0-rtsp-server = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-gst-player = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-doc-stub = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-doc = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-engines = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-sato-engine = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-theme-torturer = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk-icon-utils-native = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk+ = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-gtk+3 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-guile = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-guilt-native = "Bruce Ashfield <bruce.ashfield@windriver.com>"
-RECIPE_MAINTAINER_pn-gummiboot = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-gzip = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-harfbuzz = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-hdparm = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-help2man-native = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-hicolor-icon-theme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-hostap-conf = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-hostap-utils = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-hwlatdetect = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-icecc-create-env-native = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-icu = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-boot = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-framework = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-boot = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-install-efi = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initramfs-live-install = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-initscripts = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-inputproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-insserv = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-intltool = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-iproute2 = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-iptables = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-iputils = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-irda-utils = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-iso-codes = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-jpeg = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-json-glib = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-kbd = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-kbproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-kconfig-frontends = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-kernelshark = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-kern-tools-native = "Bruce Ashfield <bruce.ashfield@windriver.com>"
-RECIPE_MAINTAINER_pn-kexec-tools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-keymaps = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-kmod = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-lame = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-latencytop = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-ldconfig-native = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-leafpad = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-less = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-liba52 = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libacpi = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libaio = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libarchive = "Paul Barker <paul@paulbarker.me.uk>"
-RECIPE_MAINTAINER_pn-libart-lgpl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libassuan = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libatomics-ops = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-libav = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libbsd = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libcap = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libcgroup = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libcheck = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libclass-isa-perl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libconvert-asn1-perl = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libcroco = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libdaemon = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libdmx = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libdrm = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-libdumpvalue-perl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libenv-perl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libepoxy = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-liberation-fonts = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libevdev = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libevent = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libexif = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libfakekey = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libffi  = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libfile-checktree-perl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libfm = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libfontenc = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libgcc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-libgcrypt = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-libgfortran = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-libglade = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libglu = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libgpg-error = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libi18n-collate-perl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libical = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-libice = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libiconv = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libid3tag = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libidn = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libinput = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libjson = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-libksba = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libmad = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libmatchbox = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libmpc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-libnewt = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-libnewt-python = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-libnfsidmap = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libnl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libnotify = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libnss-mdns = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libogg = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-liboil = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libomxil = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-libowl-av = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libowl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libpam = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libpcap = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-libpciaccess = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-libpcre = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libpfm4 = "Matthew McClintock <msm@freescale.com>"
-RECIPE_MAINTAINER_pn-libpng = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libpng12 = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libpod-plainer-perl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libproxy = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-libpthread-stubs = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-librsvg = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libsamplerate0 = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libsdl = "Kai Kang <kai.kang@windriver.com>"
-RECIPE_MAINTAINER_pn-libsdl2 = "Kai Kang <kai.kang@windriver.com>"
-RECIPE_MAINTAINER_pn-libsecret = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libsm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libsndfile1 = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libsoup-2.4 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libtasn1 = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libtelepathy = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-libtheora = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libtimedate-perl = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libtirpc = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-libtool = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libunistring = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-liburcu = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-liburi-perl = "Kai Kang <kai.kang@windriver.com>"
-RECIPE_MAINTAINER_pn-libusb1 = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libusb-compat = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libuser = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-libvorbis = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-libwebp = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libwnck3 = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-libx11-diet = "Kai Kang <kai.kang@windriver.com>"
-RECIPE_MAINTAINER_pn-libx11 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxau = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxcalibrate = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxcb = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxcomposite = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxcursor = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxdamage = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxdmcp = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxext = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxfixes = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxfont = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxft = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxinerama = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxi = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxkbcommon = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxkbfile = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxml2 = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-libxml-namespacesupport-perl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libxml-parser-perl = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-libxml-perl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libxml-sax-perl = "Kai Kang <kai.kang@windriver.com>"
-RECIPE_MAINTAINER_pn-libxml-simple-perl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libxmu = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxpm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxp = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxrandr = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxrender = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxres = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxscrnsaver = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxsettings-client = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxshmfence = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxslt = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-libxt = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxtst = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxvmc = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxv = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxxf86dga = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxxf86misc = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libxxf86vm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-libyaml = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-lighttpd = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-linuxdoc-tools = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-linux-dummy = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-linux-firmware = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-linux-libc-headers = "Bruce Ashfield <bruce.ashfield@windriver.com>"
-RECIPE_MAINTAINER_pn-linux-libc-headers-yocto = "Bruce Ashfield <bruce.ashfield@windriver.com>"
-RECIPE_MAINTAINER_pn-linux-yocto = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-linux-yocto-dev = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-linux-yocto-rt = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-linux-yocto-tiny = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-logrotate = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-lrzsz = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-lsbinitscripts = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-lsbtest = "Yi Zhao <yi.zhao@windriver.com>"
-RECIPE_MAINTAINER_pn-lsb = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-lsof = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-ltp = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-lttng-modules = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-lttng-tools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-lttng-ust = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-lzop = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-lzo = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-lz4 = "Armin Kuster <akuster808@gmail.com>"
-RECIPE_MAINTAINER_pn-m4 = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-mailx = "Kai Kang <kai.kang@windriver.com>"
-RECIPE_MAINTAINER_pn-make = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-makedepend = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-makedevs = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-man-pages = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-man = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-matchbox-config-gtk = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-desktop-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-desktop = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-keyboard = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-panel-2 = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-session-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-session = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-terminal = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-theme-sato = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-matchbox-wm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-mc = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-mdadm = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-menu-cache = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-mesa = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-mesa-demos = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-mesa-gl = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-meta-ide-support = "Jessica Zhang <jessica.zhang@intel.com>"
-RECIPE_MAINTAINER_pn-meta-toolchain-qte = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-meta-toolchain = "Jessica Zhang <jessica.zhang@intel.com>"
-RECIPE_MAINTAINER_pn-mingetty = "Kai Kang <kai.kang@windriver.com>"
-RECIPE_MAINTAINER_pn-minicom = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-mini-x-session = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-mkelfimage = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-mkfontdir = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-mkfontscale = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-mklibs-native = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-mktemp = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-mobile-broadband-provider-info = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-modutils-initscripts = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-mpeg2dec = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-mpfr = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-msmtp = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-mtdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-mtd-utils = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-mtools = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-mx-1.0 = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-nasm = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-nativesdk-packagegroup-qte-toolchain-host = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-nativesdk-qemu-helper = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-nativesdk-qt4-tools = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-ncurses = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-neard = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-neon = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-netbase = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-nettle = "Armin Kuster <akuster808@gmail.com>"
-RECIPE_MAINTAINER_pn-net-tools = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-nfs-export-root = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-nfs-utils = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-npth = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-nspr = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-nss = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-ocf-linux = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-ofono = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-oh-puzzles = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-openjade = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-opensp = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-openssh = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-openssl = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-opkg-collateral = "Paul Barker <paul@paulbarker.me.uk>"
-RECIPE_MAINTAINER_pn-opkg-config-base = "Paul Barker <paul@paulbarker.me.uk>"
-RECIPE_MAINTAINER_pn-opkg = "Paul Barker <paul@paulbarker.me.uk>"
-RECIPE_MAINTAINER_pn-opkg-utils = "Paul Barker <paul@paulbarker.me.uk>"
-RECIPE_MAINTAINER_pn-oprofile = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-oprofileui = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-oprofileui-server = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-ossp-uuid = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-owl-video = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-p11-kit = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-base = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-boot = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-buildessential = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-clutter = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-device-devel = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-directfb = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-full-cmdline = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-lsb = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-nfs = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-qt4e = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-qt = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-sdk = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-ssh-dropbear = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-ssh-openssh = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-standalone-sdk-target = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-tools-debug = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-tools-profile = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-tools-testapps = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-x11-base = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-x11-sato = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-x11 = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-core-x11-xserver = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-qte-toolchain-target = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-packagegroup-self-hosted = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-package-index = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pango = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-parted = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-patch = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-pax-utils = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-pax = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-pciutils = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-pcmanfm = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-pcmciautils = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-perf = "Bruce Ashfield <bruce.ashfield@windriver.com>"
-RECIPE_MAINTAINER_pn-perl = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-piglit = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pigz = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-pinentry = "Armin Kuster <akuster808@gmail.com>"
-RECIPE_MAINTAINER_pn-pixman = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-pkgconfig = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-pm-utils = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-pointercal = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pong-clock = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-popt = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-portmap = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-powertop = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-ppp = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-ppp-dialin = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-prelink = "Mark Hatle <mark.hatle@windriver.com>"
-RECIPE_MAINTAINER_pn-presentproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-procps = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pseudo = "Mark Hatle <mark.hatle@windriver.com>"
-RECIPE_MAINTAINER_pn-psmisc = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-psplash = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-pth = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-pulseaudio = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-puzzles = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-python = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-async = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-dbus = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-distribute = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-docutils = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-git = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-python-gitdb = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-python-imaging = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-mako = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-python-nose = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-python-numpy = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-python-pycairo = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-pycurl = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-pygobject = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-pygtk = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-pyrex = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-scons = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-setuptools = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-python-smartpm = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python-smmap = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3 = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-python3-distribute = "Khem Raj <raj.khem@gmail.com>"
-RECIPE_MAINTAINER_pn-qemu-helper-native = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-qemu = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-qmmp = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-qt4e-demo-image = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qt4-embedded = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qt4-graphics-system = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qt4-native = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qt4-x11-free = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-qt-demo-init = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-quicky = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-quilt = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-quota = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-randrproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-readline = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-recordproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-remake = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-renderproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-resolvconf = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-resourceproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-rgb = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-rpcbind = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-rpm = "Mark Hatle <mark.hatle@windriver.com>"
-RECIPE_MAINTAINER_pn-rpmresolve = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-rsync = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-rt-tests = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-ruby = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-run-postinsts = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-rxvt-unicode = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-sato-icon-theme = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-sato-screenshot = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-sbc = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-screen = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-scrnsaverproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-sed = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-setserial = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-settings-daemon = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-sgml-common = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-sgmlspl = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-shadow = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-shadow-securetty = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-shadow-sysroot = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-shared-mime-info = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-shutdown-desktop = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-slang = "Kai Kang <kai.kang@windriver.com>"
-RECIPE_MAINTAINER_pn-socat = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-speex = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-speexdsp = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-sqlite3 = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-squashfs-tools = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-startup-notification = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-stat = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-strace = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-subversion = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-sudo = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-swabber-native = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-sysfsutils = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-sysklogd = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-syslinux = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-sysprof = "Tom Zanussi <tom.zanussi@intel.com>"
-RECIPE_MAINTAINER_pn-sysstat = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-systemd = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-systemtap = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-systemtap-uprobes = "Tom Zanussi <tom.zanussi@intel.com>"
-RECIPE_MAINTAINER_pn-sysvinit-inittab = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-sysvinit = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-taglib = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-tar-replacement-native = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-tar = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-tcf-agent = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-tcl = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-tcp-wrappers = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-tcp-wrappers = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-telepathy-glib = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-telepathy-idle = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-telepathy-mission-control = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-telepathy-python = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-texi2html = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-texinfo = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-tiff = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-time = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-tiny-init = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-trace-cmd = "Darren Hart <dvhart@linux.intel.com>"
-RECIPE_MAINTAINER_pn-tremor = "Tanu Kaskinen <tanu.kaskinen@linux.intel.com>"
-RECIPE_MAINTAINER_pn-tslib = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-ttf-bitstream-vera = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-tzcode-native = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-tzdata = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-u-boot = "Denys Dmytriyenko <denis@denix.org>"
-RECIPE_MAINTAINER_pn-u-boot-fw-utils = "Denys Dmytriyenko <denis@denix.org>"
-RECIPE_MAINTAINER_pn-u-boot-mkimage = "Denys Dmytriyenko <denis@denix.org>"
-RECIPE_MAINTAINER_pn-ubootchart = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-uclibc = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-udev-extraconf = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-udev = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-unifdef = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-unzip = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-update-rc.d = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-usbinit = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-usbutils = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-unfs3 = "Randy Witt <randy.e.witt@linux.intel.com>"
-RECIPE_MAINTAINER_pn-util-linux = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-util-macros = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-v86d = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-vala = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-valgrind = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-videoproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-vte = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-waffle = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-watchdog = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-wayland = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-webkitgtk = "Alexander Kanavin <alexander.kanavin@intel.com>"
-RECIPE_MAINTAINER_pn-web-webkit = "Ross Burton <ross.burton@intel.com>"
-RECIPE_MAINTAINER_pn-weston = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-wget = "Robert Yang <liezhi.yang@windriver.com>"
-RECIPE_MAINTAINER_pn-which = "Alejandro Hernandez <alejandro.hernandez@linux.intel.com>"
-RECIPE_MAINTAINER_pn-wireless-tools = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-wpa-supplicant = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-x11-common = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-x11perf = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-x11vnc = "Richard Purdie <richard.purdie@linuxfoundation.org>"
-RECIPE_MAINTAINER_pn-x264 = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-xauth = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xcb-proto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xcb-util-image = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xcb-util-keysyms = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xcb-util = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xcb-util-renderutil = "Jussi Kukkonen <jussi.jukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xcb-util-wm = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xcmiscproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xcursor-transparent-theme = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xdg-utils = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xdpyinfo = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xextproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xeyes = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86dgaproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86driproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-input-evdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-input-keyboard = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-input-mouse = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-input-synaptics = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-input-vmmouse = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86miscproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-video-cirrus = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-video-fbdev = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-video-intel = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-video-modesetting = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-video-omapfb = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-video-omap = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-video-vesa = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86-video-vmware = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xf86vidmodeproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xhost = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xineramaproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xinetd = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-xinit = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xinput = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xinput-calibrator = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xkbcomp = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xkeyboard-config = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xmlto = "Hongxu Jia <hongxu.jia@windriver.com>"
-RECIPE_MAINTAINER_pn-xmodmap = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xorg-minimal-fonts = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xprop = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xproto = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xrandr = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-xrestop = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xserver-nodm-init = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xserver-xf86-config = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xserver-xorg = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xset = "Aníbal Limón <anibal.limon@linux.intel.com>"
-RECIPE_MAINTAINER_pn-xtrans = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xtscal = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xvideo-tests = "Cristian Iorga <cristian.iorga@intel.com>"
-RECIPE_MAINTAINER_pn-xvinfo = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xwininfo = "Jussi Kukkonen <jussi.kukkonen@intel.com>"
-RECIPE_MAINTAINER_pn-xz = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-yasm = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-zaurusd = "Paul Eggleton <paul.eggleton@linux.intel.com>"
-RECIPE_MAINTAINER_pn-zip = "Chen Qi <Qi.Chen@windriver.com>"
-RECIPE_MAINTAINER_pn-zlib = "Chen Qi <Qi.Chen@windriver.com>"
diff --git a/yocto-poky/meta-yocto/conf/distro/include/poky-floating-revisions.inc b/yocto-poky/meta-yocto/conf/distro/include/poky-floating-revisions.inc
deleted file mode 100644
index b11f2cd..0000000
--- a/yocto-poky/meta-yocto/conf/distro/include/poky-floating-revisions.inc
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# Package Versions for cutting edge testing:
-#
-
-#SRCREV_pn-opkg-native ?= "${AUTOREV}"
-#SRCREV_pn-opkg-sdk ?= "${AUTOREV}"
-#SRCREV_pn-opkg ?= "${AUTOREV}"
-#SRCREV_pn-opkg-utils-naitve ?= "${AUTOREV}"
-#SRCREV_pn-opkg-utils ?= "${AUTOREV}"
-SRCREV_pn-gconf-dbus ?= "${AUTOREV}"
-SRCREV_pn-matchbox-common ?= "${AUTOREV}"
-SRCREV_pn-matchbox-config-gtk ?= "${AUTOREV}"
-SRCREV_pn-matchbox-desktop ?= "${AUTOREV}"
-SRCREV_pn-matchbox-keyboard ?= "${AUTOREV}"
-SRCREV_pn-matchbox-panel ?= "${AUTOREV}"
-SRCREV_pn-matchbox-panel-2 ?= "${AUTOREV}"
-SRCREV_pn-matchbox-themes-extra ?= "${AUTOREV}"
-SRCREV_pn-matchbox-terminal ?= "${AUTOREV}"
-SRCREV_pn-matchbox-wm ?= "${AUTOREV}"
-SRCREV_pn-matchbox-wm-2 ?= "${AUTOREV}"
-SRCREV_pn-settings-daemon ?= "${AUTOREV}"
-SRCREV_pn-screenshot ?= "${AUTOREV}"
-SRCREV_pn-libfakekey ?= "${AUTOREV}"
-SRCREV_pn-oprofileui ?= "${AUTOREV}"
-SRCREV_pn-zaurusd ?= "${AUTOREV}"
-SRCREV_pn-libowl-av ?= "${AUTOREV}"
-SRCREV_pn-owl-video ?= "${AUTOREV}"
-SRCREV_pn-psplash ?= "${AUTOREV}"
-SRCREV_pn-exmap-console ?= "${AUTOREV}"
-SRCREV_pn-gtk-sato-engine ?= "${AUTOREV}"
-SRCREV_pn-matchbox-theme-sato ?= "${AUTOREV}"
-SRCREV_pn-matchbox-theme-sato-2 ?= "${AUTOREV}"
-SRCREV_pn-sato-icon-theme ?= "${AUTOREV}"
-SRCREV_pn-matchbox-desktop-sato ?= "${AUTOREV}"
-SRCREV_pn-oh-puzzles ?= "${AUTOREV}"
-SRCREV_pn-libowl ?= "${AUTOREV}"
-SRCREV_pn-matchbox-applet-light ?= "${AUTOREV}"
-SRCREV_pn-fstests ?= "${AUTOREV}"
-SRCREV_pn-xvideo-tests ?= "${AUTOREV}"
-SRCREV_pn-clutter ?= "${AUTOREV}"
-SRCREV_pn-clutter-gst ?= "${AUTOREV}"
-SRCREV_pn-gaku ?= "${AUTOREV}"
-SRCREV_pn-gypsy ?= "${AUTOREV}"
-SRCREV_pn-aaina ?= "${AUTOREV}"
-SRCREV_pn-clutter-cairo ?= "${AUTOREV}"
-SRCREV_pn-table ?= "${AUTOREV}"
-SRCREV_pn-libmatchbox ?= "${AUTOREV}"
-SRCREV_pn-tasks ?= "${AUTOREV}"
-SRCREV_pn-ofono ?= "${AUTOREV}"
-
-SRCREV_pn-dri2proto = "${AUTOREV}"
-#PREFERRED_VERSION_dri2proto ?= "1.99.1+git%"
-SRCREV_pn-libdrm = "${AUTOREV}"
-#PREFERRED_VERSION_libdrm ?= "2.4.0+git%"
-SRCREV_pn-libxcb = "${AUTOREV}"
-#PREFERRED_VERSION_libxcb ?= "1.1.90.1+gitr%"
-SRCREV_pn-lib-proto = "${AUTOREV}"
-#PREFERRED_VERSION_xcb-proto ?= "1.2+gitr%"
-SRCREV_pn-libxcb-sdk = "${AUTOREV}"
-#PREFERRED_VERSION_libxcb-sdk ?= "1.1.90.1+gitr%"
-SRCREV_pn-xf86-input-evdev = "${AUTOREV}"
-#PREFERRED_VERSION_xf86-input-evdev ?= "2.0.4"
-SRCREV_pn-xf86-input-mouse = "${AUTOREV}"
-#PREFERRED_VERSION_xf86-input-mouse ?= "1.3.0+git%"
-SRCREV_pn-xf86-input-keyboard = "${AUTOREV}"
-#PREFERRED_VERSION_xf86-input-keyboard ?= "1.3.1+git%"
-SRCREV_pn-xf86-input-synaptics = "${AUTOREV}"
-#PREFERRED_VERSION_xf86-input-synaptics ?= "0.15.2+git%"
-
-#SRCDATE_oprofile ?= "${DATE}"
-
-PREFERRED_VERSION_oprofile ?= "0.9.4+cvs${SRCDATE_oprofile}"
-
diff --git a/yocto-poky/meta-yocto/conf/distro/poky-lsb.conf b/yocto-poky/meta-yocto/conf/distro/poky-lsb.conf
deleted file mode 100644
index 6f2be80..0000000
--- a/yocto-poky/meta-yocto/conf/distro/poky-lsb.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-
-require conf/distro/poky.conf
-require conf/distro/include/security_flags.inc
-
-DISTRO = "poky-lsb"
-DISTROOVERRIDES = "poky:linuxstdbase"
-
-DISTRO_FEATURES_append = " pam largefile opengl"
-PREFERRED_PROVIDER_virtual/libx11 = "libx11"
-
-# Ensure the kernel nfs server is enabled
-KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
-
-# Use the LTSI Kernel for LSB Testing
-PREFERRED_VERSION_linux-yocto_linuxstdbase ?= "3.14%"
diff --git a/yocto-poky/meta-yocto/conf/distro/poky-tiny.conf b/yocto-poky/meta-yocto/conf/distro/poky-tiny.conf
deleted file mode 100644
index b0227de..0000000
--- a/yocto-poky/meta-yocto/conf/distro/poky-tiny.conf
+++ /dev/null
@@ -1,144 +0,0 @@
-# Distribution definition for: poky-tiny
-#
-# Copyright (c) 2011, Intel Corporation.
-# All rights reserved.
-#
-# This file is released under the MIT license as described in
-# ../meta/COPYING.MIT.
-#
-# Poky-tiny is intended to define a tiny Linux system comprised of a
-# Linux kernel tailored to support each specific MACHINE and busybox.
-# Poky-tiny sets some basic policy to ensure a usable system while still
-# keeping the rootfs and kernel image as small as possible.
-#
-# The policies defined are intended to meet the following goals:
-# o Serial consoles only (no framebuffer or VGA console)
-# o Basic support for IPV4 networking
-# o Single user ash shell
-# o Static images (no support for adding packages or libraries later)
-# o Read-only or RAMFS root filesystem
-# o Combined Linux kernel + rootfs in under 4MB
-# o Allow the user to select between eglibc or uclibc with the TCLIBC variable
-#
-# This is currently a partial definition, the following tasks remain:
-# [ ] Integrate linux-yocto-tiny ktype into linux-yocto
-# [ ] Define linux-yocto-tiny configs for all supported BSPs
-# [ ] Drop ldconfig from the installation
-# [ ] Modify the runqemu scripts to work with ext2 parameter:
-#     runqemu qemux86 qemuparams="-nographic" bootparams="console=ttyS0,115200 root=0800" 
-# [ ] Modify busybox to allow for DISTRO_FEATURES-like confiruration
-
-require conf/distro/poky.conf
-DISTRO = "poky-tiny"
-
-# FIXME: consider adding a new "tiny" feature
-#DISTRO_FEATURES_append = " tiny"
-
-# Distro config is evaluated after the machine config, so we have to explicitly
-# set the kernel provider to override a machine config.
-PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-tiny"
-PREFERRED_VERSION_linux-yocto-tiny ?= "3.19%"
-
-# We can use packagegroup-core-boot, but in the future we may need a new packagegroup-core-tiny
-#POKY_DEFAULT_EXTRA_RDEPENDS += "packagegroup-core-boot"
-# Drop kernel-module-af-packet from RRECOMMENDS
-POKY_DEFAULT_EXTRA_RRECOMMENDS = ""
-
-# FIXME: what should we do with this?
-TCLIBCAPPEND = ""
-
-# Disable wide char support for ncurses as we don't include it in
-# in the LIBC features below.
-# Leave native enable to avoid build failures
-ENABLE_WIDEC = "false"
-ENABLE_WIDEC_class-native = "true"
-
-# Drop native language support. This removes the
-# eglibc->bash->gettext->libc-posix-clang-wchar dependency.
-USE_NLS="no"
-
-# Reconfigure eglibc for a smaller installation
-# Comment out any of the lines below to disable them in the build
-DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
-DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
-
-# Required for "who"
-DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-utmpx libc-getlogin"
-DISTRO_FEATURES_LIBC_REGEX = "libc-posix-regexp"
-DISTRO_FEATURES_LIBC_NET = "libc-inet libc-nis"
-
-DISTRO_FEATURES_LIBC = "${DISTRO_FEATURES_LIBC_TINY} \
-                        ${DISTRO_FEATURES_LIBC_MINIMAL} \
-                        ${DISTRO_FEATURES_LIBC_REGEX} \
-                        ${DISTRO_FEATURES_LIBC_NET} \
-                       "
-
-# Comment out any of the lines below to disable them in the build
-# DISTRO_FEATURES options:
-# alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci
-DISTRO_FEATURES_TINY = "pci"
-DISTRO_FEATURES_NET = "ipv4"
-DISTRO_FEATURES_USB = "usbhost"
-#DISTRO_FEATURES_USBGADGET = "usbgadget"
-#DISTRO_FEATURES_WIFI = "wifi"
-
-DISTRO_FEATURES = "${DISTRO_FEATURES_TINY} \
-                   ${DISTRO_FEATURES_NET} \
-                   ${DISTRO_FEATURES_USB} \
-                   ${DISTRO_FEATURES_USBGADGET} \
-                   ${DISTRO_FEATURES_WIFI} \
-                   ${DISTRO_FEATURES_LIBC} \
-                  "
-
-# Enable LFS - see bug YOCTO #5865
-DISTRO_FEATURES_append_libc-uclibc = " largefile"
-
-DISTRO_FEATURES_class-native = "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
-
-# Use tmpdevfs and the busybox runtime services
-VIRTUAL-RUNTIME_dev_manager = ""
-VIRTUAL-RUNTIME_login_manager = ""
-VIRTUAL-RUNTIME_init_manager = "tiny-init"
-VIRTUAL-RUNTIME_keymaps = ""
-
-# FIXME: Consider adding "modules" to MACHINE_FEATURES and using that in
-# packagegroup-core-base to select modutils-initscripts or not.  Similar with "net" and
-# netbase.
-
-# By default we only support initramfs. We don't build live as that
-# pulls in a lot of dependencies for the live image and the installer, like
-# udev, grub, etc.  These pull in gettext, which fails to build with wide
-# character support.
-IMAGE_FSTYPES = "cpio.gz"
-
-# Drop v86d from qemu dependency list (we support serial)
-# Drop grub from meta-intel BSPs
-# FIXME: A different mechanism is needed here. We could define -tiny
-#        variants of all compatible machines, but that leads to a lot
-#        more machine configs to maintain long term.
-MACHINE_ESSENTIAL_EXTRA_RDEPENDS = ""
-
-# The mtrace script included by eglibc is a perl script. This means the system
-# will build perl in case this package is installed. Since we don't care about
-# this script for the purposes of tiny, remove the dependency from here.
-RDEPENDS_${PN}-mtrace_pn-eglibc = ""
-
-PNBLACKLIST[build-appliance-image] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-base] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-clutter] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-directfb] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-full-cmdline] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-lsb] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-lsb-dev] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-lsb-sdk] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-rt] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-rt-sdk] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-sato] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-sato-dev] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-sato-sdk] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-x11] = "not buildable with poky-tiny"
-PNBLACKLIST[qt4e-demo-image] = "not buildable with poky-tiny"
-PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny"
-
-# Disable python usage in opkg-utils since it won't build with tiny config
-PACKAGECONFIG_pn-opkg-utils = ""
diff --git a/yocto-poky/meta-yocto/conf/distro/poky.conf b/yocto-poky/meta-yocto/conf/distro/poky.conf
deleted file mode 100644
index f654f9e..0000000
--- a/yocto-poky/meta-yocto/conf/distro/poky.conf
+++ /dev/null
@@ -1,107 +0,0 @@
-DISTRO = "poky"
-DISTRO_NAME = "Poky (Yocto Project Reference Distro)"
-DISTRO_VERSION = "2.0.1"
-DISTRO_CODENAME = "jethro"
-SDK_VENDOR = "-pokysdk"
-SDK_VERSION := "${@'${DISTRO_VERSION}'.replace('snapshot-${DATE}','snapshot')}"
-
-MAINTAINER = "Poky <poky@yoctoproject.org>"
-
-TARGET_VENDOR = "-poky"
-
-LOCALCONF_VERSION = "1"
-
-# Override these in poky based distros
-POKY_DEFAULT_DISTRO_FEATURES = "largefile opengl ptest multiarch wayland"
-POKY_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot"
-POKY_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
-
-DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${POKY_DEFAULT_DISTRO_FEATURES}"
-
-PREFERRED_VERSION_linux-yocto ?= "4.1%"
-PREFERRED_VERSION_linux-yocto_qemux86 ?= "4.1%"
-PREFERRED_VERSION_linux-yocto_qemux86-64 ?= "4.1%"
-PREFERRED_VERSION_linux-yocto_qemuarm ?= "4.1%"
-PREFERRED_VERSION_linux-yocto_qemumips ?= "4.1%"
-PREFERRED_VERSION_linux-yocto_qemumips64 ?= "4.1%"
-PREFERRED_VERSION_linux-yocto_qemuppc ?= "4.1%"
-
-SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
-SDKPATH = "/opt/${DISTRO}/${SDK_VERSION}"
-
-DISTRO_EXTRA_RDEPENDS += " ${POKY_DEFAULT_EXTRA_RDEPENDS}"
-DISTRO_EXTRA_RRECOMMENDS += " ${POKY_DEFAULT_EXTRA_RRECOMMENDS}"
-
-POKYQEMUDEPS = "${@bb.utils.contains("INCOMPATIBLE_LICENSE", "GPL-3.0", "", "packagegroup-core-device-devel",d)}"
-DISTRO_EXTRA_RDEPENDS_append_qemuarm = " ${POKYQEMUDEPS}"
-DISTRO_EXTRA_RDEPENDS_append_qemuarm64 = " ${POKYQEMUDEPS}"
-DISTRO_EXTRA_RDEPENDS_append_qemumips = " ${POKYQEMUDEPS}"
-DISTRO_EXTRA_RDEPENDS_append_qemuppc = " ${POKYQEMUDEPS}"
-DISTRO_EXTRA_RDEPENDS_append_qemux86 = " ${POKYQEMUDEPS}"
-DISTRO_EXTRA_RDEPENDS_append_qemux86-64 = " ${POKYQEMUDEPS}"
-
-TCLIBCAPPEND = ""
-
-QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 ppc x86_64"
-# Other QEMU_TARGETS "mips64el sh4"
-
-PREMIRRORS ??= "\
-bzr://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \n \
-cvs://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \n \
-git://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \n \
-gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
-hg://.*/.*    http://downloads.yoctoproject.org/mirror/sources/ \n \
-osc://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \n \
-p4://.*/.*    http://downloads.yoctoproject.org/mirror/sources/ \n \
-svn://.*/.*   http://downloads.yoctoproject.org/mirror/sources/ \n"
-
-MIRRORS =+ "\
-ftp://.*/.*      http://downloads.yoctoproject.org/mirror/sources/ \n \
-http://.*/.*     http://downloads.yoctoproject.org/mirror/sources/ \n \
-https://.*/.*    http://downloads.yoctoproject.org/mirror/sources/ \n"
-
-# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
-# fetch from the network (and warn you if not). To disable the test set
-# the variable to be empty.
-# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master
-
-CONNECTIVITY_CHECK_URIS ?= " \
-             https://eula-downloads.yoctoproject.org/index.php \
-             http://bugzilla.yoctoproject.org/report.cgi"
-
-SANITY_TESTED_DISTROS ?= " \
-            poky-1.7 \n \
-            poky-1.8 \n \
-            poky-2.0 \n \
-            Ubuntu-14.04 \n \
-            Ubuntu-14.10 \n \
-            Ubuntu-15.04 \n \
-            Ubuntu-15.10 \n \
-            Fedora-21 \n \
-            Fedora-22 \n \
-            CentOS-6.* \n \
-            CentOS-7.* \n \
-            Debian-7.* \n \
-            Debian-8.* \n \
-            openSUSE-project-13.2 \n \
-            "
-
-# Default hash policy for distro
-BB_SIGNATURE_HANDLER ?= 'OEBasicHash'
-#
-# OELAYOUT_ABI allows us to notify users when the format of TMPDIR changes in 
-# an incompatible way. Such changes should usually be detailed in the commit
-# that breaks the format and have been previously discussed on the mailing list 
-# with general agreement from the core team.
-#
-OELAYOUT_ABI = "11"
-
-# add poky sanity bbclass
-INHERIT += "poky-sanity"
-
-# QA check settings - a little stricter than the OE-Core defaults
-WARN_TO_ERROR_QA = "already-stripped compile-host-path install-host-path \
-                    installed-vs-shipped ldflags pn-overrides rpaths staticdev \
-                    useless-rpaths"
-WARN_QA_remove = "${WARN_TO_ERROR_QA}"
-ERROR_QA_append = " ${WARN_TO_ERROR_QA}"
diff --git a/yocto-poky/meta-yocto/conf/layer.conf b/yocto-poky/meta-yocto/conf/layer.conf
index 9942b51..9ed30ed 100644
--- a/yocto-poky/meta-yocto/conf/layer.conf
+++ b/yocto-poky/meta-yocto/conf/layer.conf
@@ -1,16 +1,2 @@
-# We have a conf and classes directory, add to BBPATH
-BBPATH =. "${LAYERDIR}:"
-
-# We have recipes-* directories, add to BBFILES
-BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
-            ${LAYERDIR}/recipes-*/*/*.bbappend"
-
-BBFILE_COLLECTIONS += "yocto"
-BBFILE_PATTERN_yocto = "^${LAYERDIR}/"
-BBFILE_PRIORITY_yocto = "5"
-
-# This should only be incremented on significant changes that will
-# cause compatibility issues with other layers
-LAYERVERSION_yocto = "2"
-
-LAYERDEPENDS_yocto = "core"
+# Dummy file to allow for meta-yocto -> meta-poky transition
+BBPATH =. "${LAYERDIR}/../meta-poky:"
diff --git a/yocto-poky/meta-yocto/conf/local.conf.sample b/yocto-poky/meta-yocto/conf/local.conf.sample
deleted file mode 100644
index bf6dd90..0000000
--- a/yocto-poky/meta-yocto/conf/local.conf.sample
+++ /dev/null
@@ -1,238 +0,0 @@
-#
-# This file is your local configuration file and is where all local user settings
-# are placed. The comments in this file give some guide to the options a new user
-# to the system might want to change but pretty much any configuration option can
-# be set in this file. More adventurous users can look at local.conf.extended 
-# which contains other examples of configuration which can be placed in this file
-# but new users likely won't need any of them initially.
-#
-# Lines starting with the '#' character are commented out and in some cases the 
-# default values are provided as comments to show people example syntax. Enabling
-# the option is a question of removing the # character and making any change to the
-# variable as required.
-
-#
-# Machine Selection
-#
-# You need to select a specific machine to target the build with. There are a selection
-# of emulated machines available which can boot and run in the QEMU emulator:
-#
-#MACHINE ?= "qemuarm"
-#MACHINE ?= "qemuarm64"
-#MACHINE ?= "qemumips"
-#MACHINE ?= "qemuppc"
-#MACHINE ?= "qemux86"
-#MACHINE ?= "qemux86-64"
-#
-# There are also the following hardware board target machines included for 
-# demonstration purposes:
-#
-#MACHINE ?= "beaglebone"
-#MACHINE ?= "genericx86"
-#MACHINE ?= "genericx86-64"
-#MACHINE ?= "mpc8315e-rdb"
-#MACHINE ?= "edgerouter"
-#
-# This sets the default machine to be qemux86 if no other machine is selected:
-MACHINE ??= "qemux86"
-
-#
-# Where to place downloads
-#
-# During a first build the system will download many different source code tarballs
-# from various upstream projects. This can take a while, particularly if your network
-# connection is slow. These are all stored in DL_DIR. When wiping and rebuilding you
-# can preserve this directory to speed up this part of subsequent builds. This directory
-# is safe to share between multiple builds on the same machine too.
-#
-# The default is a downloads directory under TOPDIR which is the build directory.
-#
-#DL_DIR ?= "${TOPDIR}/downloads"
-
-#
-# Where to place shared-state files
-#
-# BitBake has the capability to accelerate builds based on previously built output.
-# This is done using "shared state" files which can be thought of as cache objects
-# and this option determines where those files are placed.
-#
-# You can wipe out TMPDIR leaving this directory intact and the build would regenerate
-# from these files if no changes were made to the configuration. If changes were made
-# to the configuration, only shared state files where the state was still valid would
-# be used (done using checksums).
-#
-# The default is a sstate-cache directory under TOPDIR.
-#
-#SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
-
-#
-# Where to place the build output
-#
-# This option specifies where the bulk of the building work should be done and
-# where BitBake should place its temporary files and output. Keep in mind that
-# this includes the extraction and compilation of many applications and the toolchain
-# which can use Gigabytes of hard disk space.
-#
-# The default is a tmp directory under TOPDIR.
-#
-#TMPDIR = "${TOPDIR}/tmp"
-
-#
-# Default policy config
-#
-# The distribution setting controls which policy settings are used as defaults.
-# The default value is fine for general Yocto project use, at least initially.
-# Ultimately when creating custom policy, people will likely end up subclassing 
-# these defaults.
-#
-DISTRO ?= "poky"
-# As an example of a subclass there is a "bleeding" edge policy configuration
-# where many versions are set to the absolute latest code from the upstream 
-# source control systems. This is just mentioned here as an example, its not
-# useful to most new users.
-# DISTRO ?= "poky-bleeding"
-
-#
-# Package Management configuration
-#
-# This variable lists which packaging formats to enable. Multiple package backends 
-# can be enabled at once and the first item listed in the variable will be used 
-# to generate the root filesystems.
-# Options are:
-#  - 'package_deb' for debian style deb files
-#  - 'package_ipk' for ipk files are used by opkg (a debian style embedded package manager)
-#  - 'package_rpm' for rpm style packages
-# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
-# We default to rpm:
-PACKAGE_CLASSES ?= "package_rpm"
-
-#
-# SDK/ADT target architecture
-#
-# This variable specifies the architecture to build SDK/ADT items for and means
-# you can build the SDK packages for architectures other than the machine you are 
-# running the build on (i.e. building i686 packages on an x86_64 host).
-# Supported values are i686 and x86_64
-#SDKMACHINE ?= "i686"
-
-#
-# Extra image configuration defaults
-#
-# The EXTRA_IMAGE_FEATURES variable allows extra packages to be added to the generated 
-# images. Some of these options are added to certain image types automatically. The
-# variable can contain the following options:
-#  "dbg-pkgs"       - add -dbg packages for all installed packages
-#                     (adds symbol information for debugging/profiling)
-#  "dev-pkgs"       - add -dev packages for all installed packages
-#                     (useful if you want to develop against libs in the image)
-#  "ptest-pkgs"     - add -ptest packages for all ptest-enabled packages
-#                     (useful if you want to run the package test suites)
-#  "tools-sdk"      - add development tools (gcc, make, pkgconfig etc.)
-#  "tools-debug"    - add debugging tools (gdb, strace)
-#  "eclipse-debug"  - add Eclipse remote debugging support
-#  "tools-profile"  - add profiling tools (oprofile, exmap, lttng, valgrind)
-#  "tools-testapps" - add useful testing tools (ts_print, aplay, arecord etc.)
-#  "debug-tweaks"   - make an image suitable for development
-#                     e.g. ssh root access has a blank password
-# There are other application targets that can be used here too, see
-# meta/classes/image.bbclass and meta/classes/core-image.bbclass for more details.
-# We default to enabling the debugging tweaks.
-EXTRA_IMAGE_FEATURES = "debug-tweaks"
-
-#
-# Additional image features
-#
-# The following is a list of additional classes to use when building images which
-# enable extra features. Some available options which can be included in this variable 
-# are:
-#   - 'buildstats' collect build statistics
-#   - 'image-mklibs' to reduce shared library files size for an image
-#   - 'image-prelink' in order to prelink the filesystem image
-#   - 'image-swab' to perform host system intrusion detection
-# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
-# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
-# NOTE: image-prelink is currently broken due to problems with the prelinker.  It is advised
-# that you do NOT run the prelinker at this time. 
-USER_CLASSES ?= "buildstats image-mklibs"
-
-#
-# Runtime testing of images
-#
-# The build system can test booting virtual machine images under qemu (an emulator)
-# after any root filesystems are created and run tests against those images. To
-# enable this uncomment this line. See classes/testimage(-auto).bbclass for
-# further details.
-#TEST_IMAGE = "1"
-#
-# Interactive shell configuration
-#
-# Under certain circumstances the system may need input from you and to do this it 
-# can launch an interactive shell. It needs to do this since the build is 
-# multithreaded and needs to be able to handle the case where more than one parallel
-# process may require the user's attention. The default is iterate over the available
-# terminal types to find one that works.
-#
-# Examples of the occasions this may happen are when resolving patches which cannot
-# be applied, to use the devshell or the kernel menuconfig
-#
-# Supported values are auto, gnome, xfce, rxvt, screen, konsole (KDE 3.x only), none
-# Note: currently, Konsole support only works for KDE 3.x due to the way
-# newer Konsole versions behave
-#OE_TERMINAL = "auto"
-# By default disable interactive patch resolution (tasks will just fail instead):
-PATCHRESOLVE = "noop"
-
-#
-# Disk Space Monitoring during the build
-#
-# Monitor the disk space during the build. If there is less that 1GB of space or less
-# than 100K inodes in any key build location (TMPDIR, DL_DIR, SSTATE_DIR), gracefully
-# shutdown the build. If there is less that 100MB or 1K inodes, perform a hard abort
-# of the build. The reason for this is that running completely out of space can corrupt
-# files and damages the build in ways which may not be easily recoverable.
-# It's necesary to monitor /tmp, if there is no space left the build will fail
-# with very exotic errors.
-BB_DISKMON_DIRS = "\
-    STOPTASKS,${TMPDIR},1G,100K \
-    STOPTASKS,${DL_DIR},1G,100K \
-    STOPTASKS,${SSTATE_DIR},1G,100K \
-    STOPTASKS,/tmp,100M,100K \
-    ABORT,${TMPDIR},100M,1K \
-    ABORT,${DL_DIR},100M,1K \
-    ABORT,${SSTATE_DIR},100M,1K \
-    ABORT,/tmp,10M,1K"
-
-#
-# Shared-state files from other locations
-#
-# As mentioned above, shared state files are prebuilt cache data objects which can 
-# used to accelerate build time. This variable can be used to configure the system
-# to search other mirror locations for these objects before it builds the data itself.
-#
-# This can be a filesystem directory, or a remote url such as http or ftp. These
-# would contain the sstate-cache results from previous builds (possibly from other 
-# machines). This variable works like fetcher MIRRORS/PREMIRRORS and points to the 
-# cache locations to check for the shared objects.
-# NOTE: if the mirror uses the same structure as SSTATE_DIR, you need to add PATH
-# at the end as shown in the examples below. This will be substituted with the
-# correct path within the directory structure.
-#SSTATE_MIRRORS ?= "\
-#file://.* http://someserver.tld/share/sstate/PATH;downloadfilename=PATH \n \
-#file://.* file:///some/local/dir/sstate/PATH"
-
-
-#
-# Qemu configuration
-#
-# By default qemu will build with a builtin VNC server where graphical output can be
-# seen. The two lines below enable the SDL backend too. This assumes there is a
-# libsdl library available on your build system.
-PACKAGECONFIG_append_pn-qemu-native = " sdl"
-PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
-ASSUME_PROVIDED += "libsdl-native"
-
-
-# CONF_VERSION is increased each time build/conf/ changes incompatibly and is used to
-# track the version of this file when it was generated. This can safely be ignored if
-# this doesn't mean anything to you.
-CONF_VERSION = "1"
diff --git a/yocto-poky/meta-yocto/conf/local.conf.sample.extended b/yocto-poky/meta-yocto/conf/local.conf.sample.extended
deleted file mode 100644
index bc765a1..0000000
--- a/yocto-poky/meta-yocto/conf/local.conf.sample.extended
+++ /dev/null
@@ -1,383 +0,0 @@
-# BBMASK is a regular expression that can be used to tell BitBake to ignore
-# certain recipes.
-#BBMASK = ""
-
-#
-# Parallelism Options
-#
-# These two options control how much parallelism BitBake should use. The first
-# option determines how many tasks bitbake should run in parallel:
-#
-#BB_NUMBER_THREADS ?= "4"
-#
-# Default to setting automatically based on cpu count
-#BB_NUMBER_THREADS ?= "${@oe.utils.cpu_count()}"
-#
-# The second option controls how many processes make should run in parallel when
-# running compile tasks:
-#
-#PARALLEL_MAKE ?= "-j 4"
-#
-# Default to setting automatically based on cpu count
-#PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}"
-#
-# For a quad-core machine, BB_NUMBER_THREADS = "4", PARALLEL_MAKE = "-j 4" would
-# be appropriate for example.
-
-
-# glibc configurability is used to reduce minimal image's size.
-# the all supported glibc options are listed in DISTRO_FEATURES_LIBC
-# and disabled by default. Uncomment and copy the DISTRO_FEATURES_LIBC
-# and DISTRO_FEATURES definitions to local.conf to enable the options.
-#DISTRO_FEATURES_LIBC = "ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
-#               libc-crypt-ufc libc-db-aliases libc-envz libc-fcvt libc-fmtmsg libc-fstab libc-ftraverse \
-#               libc-getlogin libc-idn libc-inet libc-inet-anl libc-libm libc-locales libc-locale-code \
-#               libc-memusage libc-nis libc-nsswitch libc-rcmd libc-rtld-debug libc-spawn libc-streams libc-sunrpc \
-#               libc-utmp libc-utmpx libc-wordexp libc-posix-clang-wchar libc-posix-regexp libc-posix-regexp-glibc \
-#               libc-posix-wchar-io"
-
-#DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
-
-# If you want to get an image based on directfb without x11, Please copy this variable to build/conf/local.conf
-#DISTRO_FEATURES = "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g directfb ${DISTRO_FEATURES_LIBC}"
-
-# ENABLE_BINARY_LOCALE_GENERATION controls the generation of binary locale
-# packages at build time using qemu-native. Disabling it (by setting it to 0)
-# will save some build time at the expense of breaking i18n on devices with
-# less than 128MB RAM.
-#ENABLE_BINARY_LOCALE_GENERATION = "1"
-
-# Set GLIBC_GENERATE_LOCALES to the locales you wish to generate should you not
-# wish to perform the time-consuming step of generating all LIBC locales.
-# NOTE: If removing en_US.UTF-8 you will also need to uncomment, and set
-# appropriate value for IMAGE_LINGUAS.
-# WARNING: this may break localisation!
-#GLIBC_GENERATE_LOCALES = "en_GB.UTF-8 en_US.UTF-8"
-#IMAGE_LINGUAS ?= "en-gb"
-
-# The following are used to control options related to debugging.
-#
-# Uncomment this to change the optimization to make debugging easer, at the 
-# possible cost of performance.
-# DEBUG_BUILD = "1"
-#
-# Uncomment this to disable the stripping of the installed binaries
-# INHIBIT_PACKAGE_STRIP = "1"
-#
-# Uncomment this to disable the split of the debug information into -dbg files
-# INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-#
-# When splitting debug information, the following controls the results of the
-# file splitting.
-#
-#  .debug (default):
-#    When splitting the debug information will be placed into
-#    a .debug directory in the same dirname of the binary produced:
-#      /bin/foo -> /bin/.debug/foo
-#
-#  debug-file-directory:
-#    When splitting the debug information will be placed into
-#    a central debug-file-directory, /usr/lib/debug:
-#      /bin/foo -> /usr/lib/debug/bin/foo.debug
-#
-#    Any source code referenced in the debug symbols will be copied
-#    and made available within the /usr/src/debug directory
-#
-#PACKAGE_DEBUG_SPLIT_STYLE = '.debug'
-# PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
-
-# Uncomment these to build a package such that you can use gprof to profile it.
-# NOTE: This will only work with 'linux' targets, not
-# 'linux-uclibc', as uClibc doesn't provide the necessary
-# object files.  Also, don't build glibc itself with these
-# flags, or it'll fail to build.
-#
-# PROFILE_OPTIMIZATION = "-pg"
-# SELECTED_OPTIMIZATION = "${PROFILE_OPTIMIZATION}"
-# LDFLAGS =+ "-pg"
-
-# TCMODE controls the characteristics of the generated packages/images by
-# telling poky which toolchain 'profile' to use.
-#
-# The default is "default" which uses the internal toolchain. With
-# additional layers, it is possible to set this to use a precompiled
-# external toolchain. One example is the Sourcery G++ Toolchain, support
-# for which is now in the separate meta-sourcery layer:
-#
-#  http://github.com/MentorEmbedded/meta-sourcery/
-#
-# meta-sourcery can be used as a template for adding support for other
-# external toolchains. See the link above for further details.
-#
-# TCMODE points the system to a file in conf/distro/include/tcmode-${TCMODE}.inc,
-# so for meta-sourcery which has conf/distro/include/tcmode-external-sourcery.inc
-# you would set it as follows:
-#
-# TCMODE ?= "external-sourcery"
-
-# mklibs library size optimization is more useful to smaller images,
-# and less useful for bigger images. Also mklibs library optimization
-# can break the ABI compatibility, so should not be applied to the
-# images which are to be extended or upgraded later.
-#This enabled mklibs library size optimization just for the specified image.
-#MKLIBS_OPTIMIZED_IMAGES ?= "core-image-minimal"
-#This enable mklibs library size optimization will be for all the images.
-#MKLIBS_OPTIMIZED_IMAGES ?= "all"
-
-# Uncomment this if your host distribution provides the help2man tool.
-#ASSUME_PROVIDED += "help2man-native"
-
-# This value is currently used by pseudo to determine if the recipe should
-# build both the 32-bit and 64-bit wrapper libraries on a 64-bit build system.
-#
-# Pseudo will attempt to determine if a 32-bit wrapper is necessary, but
-# it doesn't always guess properly.  If you have 32-bit executables on 
-# your 64-bit build system, you likely want to set this to "0", 
-# otherwise you could end up with incorrect file attributes on the 
-# target filesystem.
-#
-# Default is to not build 32 bit libs on 64 bit systems, uncomment this
-# if you need the 32 bits libs
-#NO32LIBS = "0"
-
-# Uncomment the following lines to enable multilib builds
-#require conf/multilib.conf
-#MULTILIBS = "multilib:lib32"
-#DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
-
-# Set RPM_PREFER_ELF_ARCH to configure preferred ABI when using rpm packaging
-# backend to generate a rootfs, choices are:
-# 1: ELF32 wins
-# 2: ELF64 wins
-# 4: ELF64 N32 wins (for mips64 or mips64el only)
-#RPM_PREFER_ELF_ARCH ?= "2"
-
-# The network based PR service host and port
-# Uncomment the following lines to enable PRservice.
-# Set PRSERV_HOST to 'localhost:0' to automatically
-# start local PRService.
-# Set to other values to use remote PRService.
-#PRSERV_HOST = "localhost:0"
-
-# Additional image generation features
-#
-# The following is a list of classes to import to use in the generation of images
-# currently an example class is image_types_uboot
-# IMAGE_CLASSES = " image_types_uboot"
-
-# The following options will build a companion 'debug filesystem' in addition
-# to the normal deployable filesystem.  This companion system allows a
-# debugger to know the symbols and related sources.  It can be used to
-# debug a remote 'production' system without having to add the debug symbols
-# and sources to remote system.  If IMAGE_FSTYPES_DEBUGFS is not defined, it
-# defaults to IMAGE_FSTYPES.
-#IMAGE_GEN_DEBUGFS = "1"
-#IMAGE_FSTYPES_DEBUGFS = "tar.gz"
-
-# Incremental rpm image generation, the rootfs would be totally removed
-# and re-created in the second generation by default, but with
-# INC_RPM_IMAGE_GEN = "1", the rpm based rootfs would be kept, and will
-# do update(remove/add some pkgs) on it.  NOTE: This is not suggested
-# when you want to create a productive rootfs
-#INC_RPM_IMAGE_GEN = "1"
-
-# This is a list of packages that require a commercial license to ship
-# product. If shipped as part of an image these packages may have
-# implications so they are disabled by default.  To enable them,
-# un-comment the below as appropriate.
-#LICENSE_FLAGS_WHITELIST = "commercial_gst-fluendo-mp3 \
-#                           commercial_gst-openmax \
-#                           commercial_gst-plugins-ugly \
-#                           commercial_lame \
-#                           commercial_libmad \
-#                           commercial_libomxil \
-#                           commercial_mpeg2dec \
-#                           commercial_qmmp"
-
-
-#
-# Disk space monitor, take action when the disk space or the amount of
-# inode is running low, it is enabled when BB_DISKMON_DIRS is set.
-#
-# Set the directory for the monitor, the format is:
-# "action,directory,minimum_space,minimum_free_inode"
-#
-# The "action" must be set and should be one of:
-# ABORT: Immediately abort
-# STOPTASKS: The new tasks can't be executed any more, will stop the build
-#           when the running tasks have been done.
-# WARN: show warnings (see BB_DISKMON_WARNINTERVAL for more information)
-#
-# The "directory" must be set, any directory is OK.
-#
-# Either "minimum_space" or "minimum_free_inode" (or both of them)
-# should be set, otherwise the monitor would not be enabled,
-# the unit can be G, M, K or none, but do NOT use GB, MB or KB
-# (B is not needed).
-#BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
-#
-# Set disk space and inode interval (only works when the action is "WARN",
-# the unit can be G, M, or K, but do NOT use the GB, MB or KB
-# (B is not needed), the format is:
-# "disk_space_interval,disk_inode_interval", the default value is
-# "50M,5K" which means that it would warn when the free space is
-# lower than the minimum space(or inode), and would repeat the warning
-# when the disk space reduces 50M (or the amount of inode reduces 5k).
-#BB_DISKMON_WARNINTERVAL = "50M,5K"
-
-# Archive the source and put them to ${DEPLOY_DIR}/sources/.
-#
-#INHERIT += "archiver"
-#
-# The tarball for the patched source will be created by default, and you
-# can configure the archiver as follow:
-#
-# Create archive for:
-# 1) original (or unpacked) source:
-#ARCHIVER_MODE[src] = "original"
-# 2) patched source: (default)
-#ARCHIVER_MODE[src] = "patched"
-# 3) configured source:
-#ARCHIVER_MODE[src] = "configured"
-#
-# 4) the patches between do_unpack and do_patch:
-#ARCHIVER_MODE[diff] = "1"
-# set the files that you'd like to exclude from the diff:
-#ARCHIVER_MODE[diff-exclude] ?= ".pc autom4te.cache patches"
-#
-# 5) the environment data, similar to 'bitbake -e recipe':
-#ARCHIVER_MODE[dumpdata] = "1"
-#
-# 6) the recipe (.bb and .inc):
-#ARCHIVER_MODE[recipe] = "1"
-#
-# 7) Whether output the .src.rpm package:
-#ARCHIVER_MODE[srpm] = "1"
-#
-# 8) Filter the license, the recipe whose license in
-#    COPYLEFT_LICENSE_INCLUDE will be included, and in
-#    COPYLEFT_LICENSE_EXCLUDE will be excluded.
-#COPYLEFT_LICENSE_INCLUDE = 'GPL* LGPL*'
-#COPYLEFT_LICENSE_EXCLUDE = 'CLOSED Proprietary'
-#
-# 9) Config the recipe type that will be archived, the type can be
-#    target, native, nativesdk, cross, crosssdk and cross-canadian,
-#    you can set one or more types. Archive all types by default.
-#COPYLEFT_RECIPE_TYPES = 'target'
-#
-
-# Remove the old image before the new one generated to save disk space
-#RM_OLD_IMAGE = "1"
-
-#
-# GCC/LD FLAGS to enable more secure code generation
-# 
-# By including the security_flags include file you enable flags
-# to the compiler and linker that cause them to generate more secure
-# code, this is enabled by default in the poky-lsb distro.
-# This does affect compile speed slightly.
-#
-# Use the following line to enable the security compiler and linker flags to your build
-#require conf/distro/include/security_flags.inc
-
-# Image level user/group configuration.
-# Inherit extrausers to make the setting of EXTRA_USERS_PARAMS effective.
-#INHERIT += "extrausers"
-# User / group settings
-# The settings are sperated by the ; character.
-# Each setting is actually a command. The supported commands are useradd,
-# groupadd, userdel, groupdel, usermod and groupmod.
-#EXTRA_USERS_PARAMS = "\
-#useradd -p '' tester; \
-#groupadd developers; \
-#userdel nobody; \
-#groupdel video; \
-#groupmod -g 1020 developers; \
-#usermod -s /bin/sh tester; \
-#"
-
-# Various packages dynamically add users and groups to the system at package
-# install time.  For programs that do not care what the uid/gid is of the
-# resulting users/groups, the order of the install will determine the final
-# uid/gid.  This can lead to non-deterministic uid/gid values from one build
-# to another.  Use the following settings to specify that all user/group adds
-# should be created based on a static passwd/group file.
-#
-# Note, if you enable or disable the useradd-staticids in a configured system,
-# the TMPDIR may contain incorrect uid/gid values.  Clearing the TMPDIR
-# will correct this condition.
-#
-# By default the system looks in the BBPATH for files/passwd and files/group
-# the default can be overriden by spefying USERADD_UID/GID_TABLES.
-#
-#USERADDEXTENSION = "useradd-staticids"
-#USERADD_UID_TABLES = "files/passwd"
-#USERADD_GID_TABLES = "files/group"
-#
-# In order to prevent generating a system where a dynamicly assigned uid/gid
-# can exist, you should enable the following setting.  This will force the
-# system to error out if the user/group name is not defined in the
-# files/passwd or files/group (or specified replacements.)
-#USERADD_ERROR_DYNAMIC = "1"
-
-# Enabling FORTRAN
-# Note this is not officially supported and is just illustrated here to
-# show an example of how it can be done
-# You'll also need your fortran recipe to depend on libgfortran
-#FORTRAN_forcevariable = ",fortran"
-#RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath"
-
-#
-# Kernel image features
-#
-# The INITRAMFS_IMAGE image variable will cause an additional recipe to
-# be built as a dependency to the what ever rootfs recipe you might be
-# using such as core-image-sato.  The initramfs might be needed for
-# the initial boot of of the target system such as to load kernel
-# modules prior to mounting the root file system.
-#
-# INITRAMFS_IMAGE_BUNDLE variable controls if the image recipe
-# specified by the INITRAMFS_IMAGE will be run through an extra pass
-# through the kernel compilation in order to build a single binary
-# which contains both the kernel image and the initramfs.  The
-# combined binary will be deposited into the tmp/deploy directory.
-# NOTE: You can set INITRAMFS_IMAGE in an image recipe, but
-#       INITRAMFS_IMAGE_BUNDLE can only be set in a conf file.
-#
-#INITRAMFS_IMAGE = "core-image-minimal-initramfs"
-#INITRAMFS_IMAGE_BUNDLE = "1"
-
-#
-# IPK Hierarchical feed
-#
-# In some cases it may be desirable not to have all package files in the same
-# directory. An example would be when package feeds are to be uploaded to a
-# shared webhosting service or transferred to a Windows machine which may have
-# problems with directories containing multiple thousands of files.
-#
-# If the IPK_HIERARCHICAL_FEED variable is set to "1", packages will be split
-# between subdirectories in a similar way to how Debian package feeds are
-# organised. In the hierarchical feed, package files are written to
-# <outdir>/<arch>/<pkg_prefix>/<pkg_subdir>, where pkg_prefix is the first
-# letter of the package file name for non-lib packages or "lib" plus the 4th
-# letter of the package file name for lib packages (eg, 'l' for less, 'libc' for
-# libc6).  pkg_subdir is the root of the package file name, discarding the
-# version and architecture parts and the common suffixes '-dbg', '-dev', '-doc',
-# '-staticdev', '-locale' and '-locale-*' which are listed in
-# meta/conf/bitbake.conf.
-#
-# If IPK_HIERARCHICAL_FEED is unset or set to any other value, the traditional
-# feed layout is used where package files are placed in <outdir>/<arch>/.
-#
-#IPK_HIERARCHICAL_FEED = "1"
-#
-
-# Using RPM4
-#
-# Currently the rootfs_rpm code has a hard depends on rpmresolve:do_populate_sysroot,
-# when using rpm4 the rpmresolve code will not compile due to a missing header file.
-# That dependency needs to be removed when using RPM4, also the PREFRRED_VERSION needs
-# to be set. This example shows how to enable rpm4
-# PREFERRED_VERSION_rpm = "4.11.2"
-# PREFERRED_VERSION_rpm-native = "4.11.2"
-# RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot"
diff --git a/yocto-poky/meta-yocto/conf/site.conf.sample b/yocto-poky/meta-yocto/conf/site.conf.sample
deleted file mode 100644
index c551e8f..0000000
--- a/yocto-poky/meta-yocto/conf/site.conf.sample
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# local.conf covers user settings, site.conf covers site specific information
-# such as proxy server addresses and optionally any shared download location
-#
-# SITE_CONF_VERSION is increased each time build/conf/site.conf
-# changes incompatibly
-SCONF_VERSION = "1"
-
-# Uncomment to cause CVS to use the proxy host specified
-#CVS_PROXY_HOST = "proxy.example.com"
-#CVS_PROXY_PORT = "81"
-
-# For svn, you need to create ~/.subversion/servers containing:
-#[global]
-#http-proxy-host = proxy.example.com
-#http-proxy-port = 81
-#
-
-# To use git with a proxy, you must use an external git proxy command, such as
-# the one provided by scripts/oe-git-proxy.sh. To use this script, copy it to
-# your PATH and uncomment the following:
-#GIT_PROXY_COMMAND ?= "oe-git-proxy"
-#ALL_PROXY ?= "socks://socks.example.com:1080"
-#or
-#ALL_PROXY ?= "https://proxy.example.com:8080"
-# If you wish to use certain hosts without the proxy, specify them in NO_PROXY.
-# See the script for details on syntax.
-
-# Uncomment this to use a shared download directory
-#DL_DIR = "/some/shared/download/directory/"
-
diff --git a/yocto-poky/meta-yocto/conf/toasterconf.json b/yocto-poky/meta-yocto/conf/toasterconf.json
deleted file mode 100644
index 3df1703..0000000
--- a/yocto-poky/meta-yocto/conf/toasterconf.json
+++ /dev/null
@@ -1,119 +0,0 @@
-{
-    "config": {
-        "MACHINE"      : "qemux86",
-        "DISTRO"       : "poky",
-        "IMAGE_FSTYPES": "ext3 jffs2 tar.bz2",
-        "IMAGE_INSTALL_append": "",
-        "PACKAGE_CLASSES": "package_rpm",
-        "SDKMACHINE"   : "x86_64"
-    },
-    "layersources": [
-        {
-            "name": "Local Yocto Project",
-            "sourcetype": "local",
-            "apiurl": "../../",
-            "branches": ["HEAD" ],
-            "layers": [
-                {
-                    "name": "openembedded-core",
-                    "local_path": "meta",
-                    "vcs_url": "remote:origin",
-                    "dirpath": "meta"
-                },
-                {
-                    "name": "meta-yocto",
-                    "local_path": "meta-yocto",
-                    "vcs_url": "remote:origin",
-                    "dirpath": "meta-yocto"
-                },
-                {
-                    "name": "meta-yocto-bsp",
-                    "local_path": "meta-yocto-bsp",
-                    "vcs_url": "remote:origin",
-                    "dirpath": "meta-yocto-bsp"
-                }
-
-            ]
-        },
-        {
-            "name": "OpenEmbedded",
-            "sourcetype": "layerindex",
-            "apiurl": "http://layers.openembedded.org/layerindex/api/",
-            "branches": ["master", "jethro" ,"fido"]
-        },
-        {
-            "name": "Imported layers",
-            "sourcetype": "imported",
-            "apiurl": "",
-            "branches": ["master", "jethro","fido", "HEAD"]
-
-        }
-    ],
-    "bitbake" : [
-        {
-            "name": "master",
-            "giturl": "remote:origin",
-            "branch": "master",
-            "dirpath": "bitbake"
-        },
-        {
-            "name": "jethro",
-            "giturl": "remote:origin",
-            "branch": "jethro",
-            "dirpath": "bitbake"
-        },
-        {
-            "name": "fido",
-            "giturl": "remote:origin",
-            "branch": "fido",
-            "dirpath": "bitbake"
-        },
-        {
-            "name": "HEAD",
-            "giturl": "remote:origin",
-            "branch": "HEAD",
-            "dirpath": "bitbake"
-        }
-    ],
-
-    "defaultrelease": "master",
-
-    "releases": [
-        {
-            "name": "master",
-            "description": "Yocto Project master",
-            "bitbake": "master",
-            "branch": "master",
-            "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
-            "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
-            "helptext": "Toaster will run your builds using the tip of the <a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/\">Yocto Project master branch</a>, where active development takes place. This is not a stable branch, so your builds might not work as expected."
-        },
-        {
-            "name": "jethro",
-            "description": "Yocto Project 2.0 Jethro",
-            "bitbake": "jethro",
-            "branch": "jethro",
-            "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
-            "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
-            "helptext": "Toaster will run your builds with the tip of the <a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=jethro\">Yocto Project 2.0 \"Jethro\"</a> branch."
-        },
-        {
-            "name": "fido",
-            "description": "Yocto Project 1.8 Fido",
-            "bitbake": "fido",
-            "branch": "fido",
-            "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
-            "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
-            "helptext": "Toaster will run your builds with the tip of the <a href=\"http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=fido\">Yocto Project 1.8 \"Fido\"</a> branch."
-        },
-        {
-            "name": "local",
-            "description": "Local Yocto Project",
-            "bitbake": "HEAD",
-            "branch": "HEAD",
-            "defaultlayers": [ "openembedded-core", "meta-yocto", "meta-yocto-bsp"],
-            "layersourcepriority": { "Imported layers": 99, "Local Yocto Project" : 10, "OpenEmbedded" :  0 },
-            "helptext": "Toaster will run your builds with the version of the Yocto Project you have cloned or downloaded to your computer."
-        }
-    ]
-}
diff --git a/yocto-poky/meta/classes/allarch.bbclass b/yocto-poky/meta/classes/allarch.bbclass
index 4af38d7..208cde6 100644
--- a/yocto-poky/meta/classes/allarch.bbclass
+++ b/yocto-poky/meta/classes/allarch.bbclass
@@ -1,5 +1,5 @@
 #
-# This class is used for architecture independent recipes/data files (usally scripts)
+# This class is used for architecture independent recipes/data files (usually scripts)
 #
 
 # Expand STAGING_DIR_HOST since for cross-canadian/native/nativesdk, this will
diff --git a/yocto-poky/meta/classes/archiver.bbclass b/yocto-poky/meta/classes/archiver.bbclass
index 41a552c..2f3b278 100644
--- a/yocto-poky/meta/classes/archiver.bbclass
+++ b/yocto-poky/meta/classes/archiver.bbclass
@@ -53,6 +53,12 @@
 
 python () {
     pn = d.getVar('PN', True)
+    assume_provided = (d.getVar("ASSUME_PROVIDED", True) or "").split()
+    if pn in assume_provided:
+        for p in d.getVar("PROVIDES", True).split():
+            if p != pn:
+                pn = p
+                break
 
     included, reason = copyleft_should_include(d)
     if not included:
@@ -61,6 +67,12 @@
     else:
         bb.debug(1, 'archiver: %s is included: %s' % (pn, reason))
 
+    # We just archive gcc-source for all the gcc related recipes
+    if d.getVar('BPN', True) in ['gcc', 'libgcc'] \
+            and not pn.startswith('gcc-source'):
+        bb.debug(1, 'archiver: %s is excluded, covered by gcc-source' % pn)
+        return
+
     ar_src = d.getVarFlag('ARCHIVER_MODE', 'src', True)
     ar_dumpdata = d.getVarFlag('ARCHIVER_MODE', 'dumpdata', True)
     ar_recipe = d.getVarFlag('ARCHIVER_MODE', 'recipe', True)
@@ -73,8 +85,15 @@
         # We can't use "addtask do_ar_configured after do_configure" since it
         # will cause the deptask of do_populate_sysroot to run not matter what
         # archives we need, so we add the depends here.
-        d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn)
+
+        # There is a corner case with "gcc-source-${PV}" recipes, they don't have
+        # the "do_configure" task, so we need to use "do_preconfigure"
+        if pn.startswith("gcc-source-"):
+            d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_preconfigure' % pn)
+        else:
+            d.appendVarFlag('do_ar_configured', 'depends', ' %s:do_configure' % pn)
         d.appendVarFlag('do_deploy_archives', 'depends', ' %s:do_ar_configured' % pn)
+
     elif ar_src:
         bb.fatal("Invalid ARCHIVER_MODE[src]: %s" % ar_src)
 
@@ -119,21 +138,9 @@
         if os.path.isfile(local):
             shutil.copy(local, ar_outdir)
         elif os.path.isdir(local):
-            basename = os.path.basename(local)
-
             tmpdir = tempfile.mkdtemp(dir=d.getVar('ARCHIVER_WORKDIR', True))
             fetch.unpack(tmpdir, (url,))
-
-            os.chdir(tmpdir)
-            # We eliminate any AUTOINC+ in the revision.
-            try:
-                src_rev = bb.fetch2.get_srcrev(d).replace('AUTOINC+','')
-            except:
-                src_rev = 'NOREV'
-            tarname = os.path.join(ar_outdir, basename + '.' + src_rev + '.tar.gz')
-            tar = tarfile.open(tarname, 'w:gz')
-            tar.add('.')
-            tar.close()
+            create_tarball(d, tmpdir + '/.', '', ar_outdir)
 
     # Emit patch series files for 'original'
     bb.note('Writing patch series files...')
@@ -156,8 +163,9 @@
 
     # Get the ARCHIVER_OUTDIR before we reset the WORKDIR
     ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
+    ar_workdir = d.getVar('ARCHIVER_WORKDIR', True)
     bb.note('Archiving the patched source...')
-    d.setVar('WORKDIR', ar_outdir)
+    d.setVar('WORKDIR', ar_workdir)
     create_tarball(d, d.getVar('S', True), 'patched', ar_outdir)
 }
 
@@ -167,11 +175,18 @@
     ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
     if d.getVarFlag('ARCHIVER_MODE', 'src', True) == 'configured':
         bb.note('Archiving the configured source...')
+        pn = d.getVar('PN', True)
+        # "gcc-source-${PV}" recipes don't have "do_configure"
+        # task, so we need to run "do_preconfigure" instead
+        if pn.startswith("gcc-source-"):
+            d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True))
+            bb.build.exec_func('do_preconfigure', d)
+
         # The libtool-native's do_configure will remove the
         # ${STAGING_DATADIR}/aclocal/libtool.m4, so we can't re-run the
         # do_configure, we archive the already configured ${S} to
         # instead of.
-        if d.getVar('PN', True) != 'libtool-native':
+        elif pn != 'libtool-native':
             # Change the WORKDIR to make do_configure run in another dir.
             d.setVar('WORKDIR', d.getVar('ARCHIVER_WORKDIR', True))
             if bb.data.inherits_class('kernel-yocto', d):
@@ -203,12 +218,15 @@
     import tarfile
 
     # Make sure we are only creating a single tarball for gcc sources
-    if d.getVar('SRC_URI', True) == "" and 'gcc' in d.getVar('PN', True):
+    if (d.getVar('SRC_URI', True) == ""):
         return
 
     bb.utils.mkdirhier(ar_outdir)
-    tarname = os.path.join(ar_outdir, '%s-%s.tar.gz' % \
-            (d.getVar('PF', True), suffix))
+    if suffix:
+        filename = '%s-%s.tar.gz' % (d.getVar('PF', True), suffix)
+    else:
+        filename = '%s.tar.gz' % d.getVar('PF', True)
+    tarname = os.path.join(ar_outdir, filename)
 
     srcdir = srcdir.rstrip('/')
     dirname = os.path.dirname(srcdir)
@@ -250,21 +268,19 @@
             [ 'patched', 'configured'] and \
             d.getVarFlag('ARCHIVER_MODE', 'diff', True) != '1':
         return
-    # Change the WORKDIR to make do_unpack do_patch run in another dir.
     ar_outdir = d.getVar('ARCHIVER_OUTDIR', True)
-    d.setVar('WORKDIR', ar_outdir)
+    ar_workdir = d.getVar('ARCHIVER_WORKDIR', True)
 
-    # The changed 'WORKDIR' also casued 'B' changed, create dir 'B' for the
-    # possibly requiring of the following tasks (such as some recipes's
-    # do_patch required 'B' existed).
-    bb.utils.mkdirhier(d.getVar('B', True))
+    # The kernel class functions require it to be on work-shared, so we dont change WORKDIR
+    if not bb.data.inherits_class('kernel-yocto', d):
+        # Change the WORKDIR to make do_unpack do_patch run in another dir.
+        d.setVar('WORKDIR', ar_workdir)
 
-    # The kernel source is ready after do_validate_branches
-    if bb.data.inherits_class('kernel-yocto', d):
-        bb.build.exec_func('do_unpack', d)
-        bb.build.exec_func('do_kernel_checkout', d)
-        bb.build.exec_func('do_validate_branches', d)
-    else:
+        # The changed 'WORKDIR' also caused 'B' changed, create dir 'B' for the
+        # possibly requiring of the following tasks (such as some recipes's
+        # do_patch required 'B' existed).
+        bb.utils.mkdirhier(d.getVar('B', True))
+
         bb.build.exec_func('do_unpack', d)
 
     # Save the original source for creating the patches
@@ -273,8 +289,8 @@
         src_orig = '%s.orig' % src
         oe.path.copytree(src, src_orig)
 
-    # Make sure gcc sources are patched only once
-    if not ((d.getVar('SRC_URI', True) == "" and 'gcc' in d.getVar('PN', True))):
+    # Make sure gcc and kernel sources are patched only once
+    if not ((d.getVar('SRC_URI', True) == "" or bb.data.inherits_class('kernel-yocto', d))):
         bb.build.exec_func('do_patch', d)
 
     # Create the patches
@@ -299,6 +315,16 @@
     bb.utils.mkdirhier(outdir)
     shutil.copy(bbfile, outdir)
 
+    pn = d.getVar('PN', True)
+    bbappend_files = d.getVar('BBINCLUDED', True).split()
+    # If recipe name is aa, we need to match files like aa.bbappend and aa_1.1.bbappend
+    # Files like aa1.bbappend or aa1_1.1.bbappend must be excluded.
+    bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" %pn)
+    bbappend_re1 = re.compile( r".*/%s\.bbappend$" %pn)
+    for file in bbappend_files:
+        if bbappend_re.match(file) or bbappend_re1.match(file):
+            shutil.copy(file, outdir)
+
     dirname = os.path.dirname(bbfile)
     bbpath = '%s:%s' % (dirname, d.getVar('BBPATH', True))
     f = open(bbfile, 'r')
@@ -326,27 +352,29 @@
     dumpfile = os.path.join(d.getVar('ARCHIVER_OUTDIR', True), \
         '%s-showdata.dump' % d.getVar('PF', True))
     bb.note('Dumping metadata into %s' % dumpfile)
-    f = open(dumpfile, 'w')
-    # emit variables and shell functions
-    bb.data.emit_env(f, d, True)
-    # emit the metadata which isn't valid shell
-    for e in d.keys():
-        if bb.data.getVarFlag(e, 'python', d):
-            f.write("\npython %s () {\n%s}\n" % (e, bb.data.getVar(e, d, True)))
-    f.close()
+    with open(dumpfile, "w") as f:
+        # emit variables and shell functions
+        bb.data.emit_env(f, d, True)
+        # emit the metadata which isn't valid shell
+        for e in d.keys():
+            if d.getVarFlag(e, "python", False):
+                f.write("\npython %s () {\n%s}\n" % (e, d.getVar(e, False)))
 }
 
 SSTATETASKS += "do_deploy_archives"
 do_deploy_archives () {
-    echo "Deploying source archive files ..."
+    echo "Deploying source archive files from ${ARCHIVER_TOPDIR} to ${DEPLOY_DIR_SRC}."
 }
 python do_deploy_archives_setscene () {
     sstate_setscene(d)
 }
+do_deploy_archives[dirs] = "${ARCHIVER_TOPDIR}"
 do_deploy_archives[sstate-inputdirs] = "${ARCHIVER_TOPDIR}"
 do_deploy_archives[sstate-outputdirs] = "${DEPLOY_DIR_SRC}"
+addtask do_deploy_archives_setscene
 
 addtask do_ar_original after do_unpack
+addtask do_unpack_and_patch after do_patch
 addtask do_ar_patched after do_unpack_and_patch
 addtask do_ar_configured after do_unpack_and_patch
 addtask do_dumpdata
@@ -364,6 +392,4 @@
     # Add tasks in the correct order, specifically for linux-yocto to avoid race condition
     if bb.data.inherits_class('kernel-yocto', d):
         bb.build.addtask('do_kernel_configme', 'do_configure', 'do_unpack_and_patch', d)
-    else:
-        bb.build.addtask('do_unpack_and_patch', None, 'do_patch', d)
 }
diff --git a/yocto-poky/meta/classes/autotools.bbclass b/yocto-poky/meta/classes/autotools.bbclass
index d546a5c..6649f5d 100644
--- a/yocto-poky/meta/classes/autotools.bbclass
+++ b/yocto-poky/meta/classes/autotools.bbclass
@@ -83,17 +83,16 @@
 AUTOTOOLS_AUXDIR ?= "${AUTOTOOLS_SCRIPT_PATH}"
 
 oe_runconf () {
-	cfgscript="${CONFIGURE_SCRIPT}"
+	# Use relative path to avoid buildpaths in files
+	cfgscript_name="`basename ${CONFIGURE_SCRIPT}`"
+	cfgscript=`python -c "import os; print os.path.relpath(os.path.dirname('${CONFIGURE_SCRIPT}'), '.')"`/$cfgscript_name
 	if [ -x "$cfgscript" ] ; then
 		bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
-		set +e
-		${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"
-		if [ "$?" != "0" ]; then
-			echo "Configure failed. The contents of all config.log files follows to aid debugging"
-			find ${B} -ignore_readdir_race -name config.log -print -exec cat {} \;
-			die "oe_runconf failed"
+		if ! ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"; then
+			bbnote "The following config.log files may provide further information."
+			bbnote `find ${B} -ignore_readdir_race -type f -name config.log`
+			bbfatal_log "configure failed"
 		fi
-		set -e
 	else
 		bbfatal "no configure script found at $cfgscript"
 	fi
@@ -113,8 +112,7 @@
 				# regenerate them even if CFLAGS/LDFLAGS are different
 				cd ${S}
 				if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then
-					echo "Running \"${MAKE} clean\" in ${S}"
-					${MAKE} clean
+					oe_runmake clean
 				fi
 				find ${S} -ignore_readdir_race -name \*.la -delete
 			fi
@@ -124,6 +122,7 @@
 
 autotools_postconfigure(){
 	if [ -n "${CONFIGURESTAMPFILE}" ]; then
+		mkdir -p `dirname ${CONFIGURESTAMPFILE}`
 		echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
 	fi
 }
@@ -149,20 +148,26 @@
     bb.utils.mkdirhier(aclocaldir)
     start = None
     configuredeps = []
+    # Detect bitbake -b usage
+    # Everything but quilt-native would have dependencies
+    nodeps = (pn != "quilt-native")
 
     for dep in taskdepdata:
         data = taskdepdata[dep]
         if data[1] == "do_configure" and data[0] == pn:
             start = dep
+        if not nodeps and start:
             break
+        if nodeps and data[0] != pn:
+            nodeps = False
     if start is None:
         bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?")
 
     # We need to find configure tasks which are either from <target> -> <target>
     # or <native> -> <native> but not <target> -> <native> unless they're direct
     # dependencies. This mirrors what would get restored from sstate.
-    done = [dep]
-    next = [dep]
+    done = [start]
+    next = [start]
     while next:
         new = []
         for dep in next:
@@ -189,7 +194,11 @@
     #bb.warn(str(configuredeps2))
 
     cp = []
-    siteconf = []    
+    if nodeps:
+        bb.warn("autotools: Unable to find task dependencies, -b being used? Pulling in all m4 files")
+        for l in [d.expand("${STAGING_DATADIR_NATIVE}/aclocal/"), d.expand("${STAGING_DATADIR}/aclocal/")]:
+            cp.extend(os.path.join(l, f) for f in os.listdir(l))
+
     for c in configuredeps:
         if c.endswith("-native"):
             manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c)
@@ -227,9 +236,9 @@
 	# for a package whose autotools are old, on an x86_64 machine, which the old
 	# config.sub does not support.  Work around this by installing them manually
 	# regardless.
-	( for ac in `find ${S} -ignore_readdir_race -name configure.in -o -name configure.ac`; do
+	for ac in `find ${S} -ignore_readdir_race -name configure.in -o -name configure.ac`; do
 		rm -f `dirname $ac`/configure
-		done )
+	done
 	if [ -e ${AUTOTOOLS_SCRIPT_PATH}/configure.in -o -e ${AUTOTOOLS_SCRIPT_PATH}/configure.ac ]; then
 		olddir=`pwd`
 		cd ${AUTOTOOLS_SCRIPT_PATH}
diff --git a/yocto-poky/meta/classes/autotools_stage.bbclass b/yocto-poky/meta/classes/autotools_stage.bbclass
deleted file mode 100644
index b3c41e4..0000000
--- a/yocto-poky/meta/classes/autotools_stage.bbclass
+++ /dev/null
@@ -1,2 +0,0 @@
-inherit autotools
-
diff --git a/yocto-poky/meta/classes/base.bbclass b/yocto-poky/meta/classes/base.bbclass
index 9bd5499..a7ca3a6 100644
--- a/yocto-poky/meta/classes/base.bbclass
+++ b/yocto-poky/meta/classes/base.bbclass
@@ -204,7 +204,7 @@
         bb.fatal('The following variable(s) were not set: %s\nPlease set them directly, or choose a MACHINE or DISTRO that sets them.' % ', '.join(pesteruser))
 
 addhandler base_eventhandler
-base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.runqueue.sceneQueueComplete"
+base_eventhandler[eventmask] = "bb.event.ConfigParsed bb.event.BuildStarted bb.event.RecipePreFinalise bb.runqueue.sceneQueueComplete bb.event.RecipeParsed"
 python base_eventhandler() {
     import bb.runqueue
 
@@ -230,7 +230,8 @@
                     statuslines.extend(flines)
 
         statusheader = e.data.getVar('BUILDCFG_HEADER', True)
-        bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
+        if statusheader:
+            bb.plain('\n%s\n%s\n' % (statusheader, '\n'.join(statuslines)))
 
     # This code is to silence warnings where the SDK variables overwrite the 
     # target ones and we'd see dulpicate key names overwriting each other
@@ -254,6 +255,24 @@
             bb.debug(1, "Executing SceneQueue Completion commands: %s" % "\n".join(cmds))
             bb.build.exec_func("completion_function", e.data)
             os.remove(completions)
+
+    if isinstance(e, bb.event.RecipeParsed):
+        #
+        # If we have multiple providers of virtual/X and a PREFERRED_PROVIDER_virtual/X is set
+        # skip parsing for all the other providers which will mean they get uninstalled from the
+        # sysroot since they're now "unreachable". This makes switching virtual/kernel work in 
+        # particular.
+        #
+        pn = d.getVar('PN', True)
+        source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', False)
+        if not source_mirror_fetch:
+            provs = (d.getVar("PROVIDES", True) or "").split()
+            multiwhitelist = (d.getVar("MULTI_PROVIDER_WHITELIST", True) or "").split()
+            for p in provs:
+                if p.startswith("virtual/") and p not in multiwhitelist:
+                    profprov = d.getVar("PREFERRED_PROVIDER_" + p, True)
+                    if profprov and pn != profprov:
+                        raise bb.parse.SkipPackage("PREFERRED_PROVIDER_%s set to %s, not %s" % (p, profprov, pn))
 }
 
 CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
@@ -273,6 +292,7 @@
 		fi
 	fi
 	if [ -n "${CONFIGURESTAMPFILE}" ]; then
+		mkdir -p `dirname ${CONFIGURESTAMPFILE}`
 		echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
 	fi
 }
@@ -363,7 +383,10 @@
                     newappends.append(a)
                 elif a.startswith("virtual/"):
                     subs = a.split("/", 1)[1]
-                    newappends.append("virtual/" + prefix + subs + extension)
+                    if subs.startswith(prefix):
+                        newappends.append(a + extension)
+                    else:
+                        newappends.append("virtual/" + prefix + subs + extension)
                 else:
                     if a.startswith(prefix):
                         newappends.append(a + extension)
@@ -375,11 +398,11 @@
             if not appends:
                 return
             if varname.find("DEPENDS") != -1:
-                if pn.startswith("nativesdk-"):
+                if bb.data.inherits_class('nativesdk', d) or bb.data.inherits_class('cross-canadian', d) :
                     appends = expandFilter(appends, "", "nativesdk-")
-                if pn.endswith("-native"):
+                elif bb.data.inherits_class('native', d):
                     appends = expandFilter(appends, "-native", "")
-                if mlprefix:
+                elif mlprefix:
                     appends = expandFilter(appends, "", mlprefix)
             varname = d.expand(varname)
             d.appendVar(varname, " " + " ".join(appends))
@@ -405,9 +428,12 @@
                     extraconf.append(items[1])
         appendVar('DEPENDS', extradeps)
         appendVar('RDEPENDS_${PN}', extrardeps)
-        if bb.data.inherits_class('cmake', d):
-            appendVar('EXTRA_OECMAKE', extraconf)
-        else:
+        appendVar('PACKAGECONFIG_CONFARGS', extraconf)
+
+        # TODO: once all recipes/classes abusing EXTRA_OECONF
+        # to get PACKAGECONFIG options are fixed to use PACKAGECONFIG_CONFARGS
+        # move this appendVar to autotools.bbclass.
+        if not bb.data.inherits_class('cmake', d):
             appendVar('EXTRA_OECONF', extraconf)
 
     pn = d.getVar('PN', True)
@@ -431,15 +457,26 @@
         d.setVarFlag('do_configure', 'umask', '022')
         d.setVarFlag('do_compile', 'umask', '022')
         d.appendVarFlag('do_install', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
-        d.setVarFlag('do_install', 'fakeroot', 1)
+        d.setVarFlag('do_install', 'fakeroot', '1')
         d.setVarFlag('do_install', 'umask', '022')
         d.appendVarFlag('do_package', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
-        d.setVarFlag('do_package', 'fakeroot', 1)
+        d.setVarFlag('do_package', 'fakeroot', '1')
         d.setVarFlag('do_package', 'umask', '022')
-        d.setVarFlag('do_package_setscene', 'fakeroot', 1)
+        d.setVarFlag('do_package_setscene', 'fakeroot', '1')
         d.appendVarFlag('do_package_setscene', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
-        d.setVarFlag('do_devshell', 'fakeroot', 1)
+        d.setVarFlag('do_devshell', 'fakeroot', '1')
         d.appendVarFlag('do_devshell', 'depends', ' virtual/fakeroot-native:do_populate_sysroot')
+
+    need_machine = d.getVar('COMPATIBLE_MACHINE', True)
+    if need_machine:
+        import re
+        compat_machines = (d.getVar('MACHINEOVERRIDES', True) or "").split(":")
+        for m in compat_machines:
+            if re.match(need_machine, m):
+                break
+        else:
+            raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE', True))
+
     source_mirror_fetch = d.getVar('SOURCE_MIRROR_FETCH', 0)
     if not source_mirror_fetch:
         need_host = d.getVar('COMPATIBLE_HOST', True)
@@ -449,17 +486,6 @@
             if not re.match(need_host, this_host):
                 raise bb.parse.SkipPackage("incompatible with host %s (not in COMPATIBLE_HOST)" % this_host)
 
-        need_machine = d.getVar('COMPATIBLE_MACHINE', True)
-        if need_machine:
-            import re
-            compat_machines = (d.getVar('MACHINEOVERRIDES', True) or "").split(":")
-            for m in compat_machines:
-                if re.match(need_machine, m):
-                    break
-            else:
-                raise bb.parse.SkipPackage("incompatible with machine %s (not in COMPATIBLE_MACHINE)" % d.getVar('MACHINE', True))
-
-
         bad_licenses = (d.getVar('INCOMPATIBLE_LICENSE', True) or "").split()
 
         check_license = False if pn.startswith("nativesdk-") else True
@@ -476,31 +502,23 @@
 
             whitelist = []
             incompatwl = []
-            htincompatwl = []
             for lic in bad_licenses:
                 spdx_license = return_spdx(d, lic)
-                for w in ["HOSTTOOLS_WHITELIST_", "LGPLv2_WHITELIST_", "WHITELIST_"]:
+                for w in ["LGPLv2_WHITELIST_", "WHITELIST_"]:
                     whitelist.extend((d.getVar(w + lic, True) or "").split())
                     if spdx_license:
                         whitelist.extend((d.getVar(w + spdx_license, True) or "").split())
                     '''
-                    We need to track what we are whitelisting and why. If pn is 
-                    incompatible and is not HOSTTOOLS_WHITELIST_ we need to be 
-                    able to note that the image that is created may infact 
-                    contain incompatible licenses despite INCOMPATIBLE_LICENSE 
-                    being set.
+                    We need to track what we are whitelisting and why. If pn is
+                    incompatible we need to be able to note that the image that
+                    is created may infact contain incompatible licenses despite
+                    INCOMPATIBLE_LICENSE being set.
                     '''
-                    if "HOSTTOOLS" in w:
-                        htincompatwl.extend((d.getVar(w + lic, True) or "").split())
-                        if spdx_license:
-                            htincompatwl.extend((d.getVar(w + spdx_license, True) or "").split())
-                    else:
-                        incompatwl.extend((d.getVar(w + lic, True) or "").split())
-                        if spdx_license:
-                            incompatwl.extend((d.getVar(w + spdx_license, True) or "").split())
+                    incompatwl.extend((d.getVar(w + lic, True) or "").split())
+                    if spdx_license:
+                        incompatwl.extend((d.getVar(w + spdx_license, True) or "").split())
 
             if not pn in whitelist:
-                recipe_license = d.getVar('LICENSE', True)
                 pkgs = d.getVar('PACKAGES', True).split()
                 skipped_pkgs = []
                 unskipped_pkgs = []
@@ -512,54 +530,71 @@
                 all_skipped = skipped_pkgs and not unskipped_pkgs
                 if unskipped_pkgs:
                     for pkg in skipped_pkgs:
-                        bb.debug(1, "SKIPPING the package " + pkg + " at do_rootfs because it's " + recipe_license)
+                        bb.debug(1, "SKIPPING the package " + pkg + " at do_rootfs because it's " + license)
                         mlprefix = d.getVar('MLPREFIX', True)
                         d.setVar('LICENSE_EXCLUSION-' + mlprefix + pkg, 1)
                     for pkg in unskipped_pkgs:
                         bb.debug(1, "INCLUDING the package " + pkg)
                 elif all_skipped or incompatible_license(d, bad_licenses):
-                    bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, recipe_license))
-                    raise bb.parse.SkipPackage("incompatible with license %s" % recipe_license)
+                    bb.debug(1, "SKIPPING recipe %s because it's %s" % (pn, license))
+                    raise bb.parse.SkipPackage("incompatible with license %s" % license)
             elif pn in whitelist:
                 if pn in incompatwl:
                     bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted")
-                elif pn in htincompatwl:
-                    bb.note("INCLUDING " + pn + " as buildable despite INCOMPATIBLE_LICENSE because it has been whitelisted for HOSTTOOLS")
 
+    needsrcrev = False
     srcuri = d.getVar('SRC_URI', True)
-    # Svn packages should DEPEND on subversion-native
-    if "svn://" in srcuri:
-        d.appendVarFlag('do_fetch', 'depends', ' subversion-native:do_populate_sysroot')
+    for uri in srcuri.split():
+        (scheme, _ , path) = bb.fetch.decodeurl(uri)[:3]
 
-    # Git packages should DEPEND on git-native
-    if "git://" in srcuri:
-        d.appendVarFlag('do_fetch', 'depends', ' git-native:do_populate_sysroot')
+        # HTTP/FTP use the wget fetcher
+        if scheme in ("http", "https", "ftp"):
+            d.appendVarFlag('do_fetch', 'depends', ' wget-native:do_populate_sysroot')
 
-    # Mercurial packages should DEPEND on mercurial-native
-    elif "hg://" in srcuri:
-        d.appendVarFlag('do_fetch', 'depends', ' mercurial-native:do_populate_sysroot')
+        # Svn packages should DEPEND on subversion-native
+        if scheme == "svn":
+            needsrcrev = True
+            d.appendVarFlag('do_fetch', 'depends', ' subversion-native:do_populate_sysroot')
 
-    # OSC packages should DEPEND on osc-native
-    elif "osc://" in srcuri:
-        d.appendVarFlag('do_fetch', 'depends', ' osc-native:do_populate_sysroot')
+        # Git packages should DEPEND on git-native
+        elif scheme in ("git", "gitsm"):
+            needsrcrev = True
+            d.appendVarFlag('do_fetch', 'depends', ' git-native:do_populate_sysroot')
 
-    # *.lz4 should depends on lz4-native for unpacking
-    # Not endswith because of "*.patch.lz4;patch=1". Need bb.fetch.decodeurl in future
-    if '.lz4' in srcuri:
-        d.appendVarFlag('do_unpack', 'depends', ' lz4-native:do_populate_sysroot')
+        # Mercurial packages should DEPEND on mercurial-native
+        elif scheme == "hg":
+            needsrcrev = True
+            d.appendVarFlag('do_fetch', 'depends', ' mercurial-native:do_populate_sysroot')
 
-    # *.xz should depends on xz-native for unpacking
-    # Not endswith because of "*.patch.xz;patch=1". Need bb.fetch.decodeurl in future
-    if '.xz' in srcuri:
-        d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
+        # OSC packages should DEPEND on osc-native
+        elif scheme == "osc":
+            d.appendVarFlag('do_fetch', 'depends', ' osc-native:do_populate_sysroot')
 
-    # unzip-native should already be staged before unpacking ZIP recipes
-    if ".zip" in srcuri:
-        d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot')
+        elif scheme == "npm":
+            d.appendVarFlag('do_fetch', 'depends', ' nodejs-native:do_populate_sysroot')
 
-    # file is needed by rpm2cpio.sh
-    if ".src.rpm" in srcuri:
-        d.appendVarFlag('do_unpack', 'depends', ' file-native:do_populate_sysroot')
+        # *.lz4 should DEPEND on lz4-native for unpacking
+        if path.endswith('.lz4'):
+            d.appendVarFlag('do_unpack', 'depends', ' lz4-native:do_populate_sysroot')
+
+        # *.lz should DEPEND on lzip-native for unpacking
+        elif path.endswith('.lz'):
+            d.appendVarFlag('do_unpack', 'depends', ' lzip-native:do_populate_sysroot')
+
+        # *.xz should DEPEND on xz-native for unpacking
+        elif path.endswith('.xz'):
+            d.appendVarFlag('do_unpack', 'depends', ' xz-native:do_populate_sysroot')
+
+        # .zip should DEPEND on unzip-native for unpacking
+        elif path.endswith('.zip'):
+            d.appendVarFlag('do_unpack', 'depends', ' unzip-native:do_populate_sysroot')
+
+        # file is needed by rpm2cpio.sh
+        elif path.endswith('.src.rpm'):
+            d.appendVarFlag('do_unpack', 'depends', ' file-native:do_populate_sysroot')
+
+    if needsrcrev:
+        d.setVar("SRCPV", "${@bb.fetch2.get_srcrev(d)}")
 
     set_packagetriplet(d)
 
@@ -612,8 +647,9 @@
 python do_cleansstate() {
         sstate_clean_cachefiles(d)
 }
-
 addtask cleanall after do_cleansstate
+do_cleansstate[nostamp] = "1"
+
 python do_cleanall() {
     src_uri = (d.getVar('SRC_URI', True) or "").split()
     if len(src_uri) == 0:
diff --git a/yocto-poky/meta/classes/bash-completion.bbclass b/yocto-poky/meta/classes/bash-completion.bbclass
new file mode 100644
index 0000000..74a878e
--- /dev/null
+++ b/yocto-poky/meta/classes/bash-completion.bbclass
@@ -0,0 +1,5 @@
+PACKAGES += "${PN}-bash-completion"
+
+FILES_${PN}-bash-completion = "${datadir}/bash-completion ${sysconfdir}/bash_completion.d"
+
+RDEPENDS_${PN}-bash-completion = "bash-completion"
diff --git a/yocto-poky/meta/classes/boot-directdisk.bbclass b/yocto-poky/meta/classes/boot-directdisk.bbclass
deleted file mode 100644
index 600e21a..0000000
--- a/yocto-poky/meta/classes/boot-directdisk.bbclass
+++ /dev/null
@@ -1,194 +0,0 @@
-# boot-directdisk.bbclass
-# (loosly based off bootimg.bbclass Copyright (C) 2004, Advanced Micro Devices, Inc.)
-#
-# Create an image which can be placed directly onto a harddisk using dd and then
-# booted.
-#
-# This uses syslinux. extlinux would have been nice but required the ext2/3 
-# partition to be mounted. grub requires to run itself as part of the install 
-# process.
-#
-# The end result is a 512 boot sector populated with an MBR and partition table
-# followed by an msdos fat16 partition containing syslinux and a linux kernel
-# completed by the ext2/3 rootfs.
-#
-# We have to push the msdos parition table size > 16MB so fat 16 is used as parted
-# won't touch fat12 partitions.
-
-# External variables needed
-
-# ${ROOTFS} - the rootfs image to incorporate
-
-do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
-                               virtual/kernel:do_deploy \
-                               syslinux:do_populate_sysroot \
-                               syslinux-native:do_populate_sysroot \
-                               parted-native:do_populate_sysroot \
-                               mtools-native:do_populate_sysroot "
-
-PACKAGES = " "
-EXCLUDE_FROM_WORLD = "1"
-
-BOOTDD_VOLUME_ID   ?= "boot"
-BOOTDD_EXTRA_SPACE ?= "16384"
-
-EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
-EFI_PROVIDER ?= "grub-efi"
-EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}"
-
-# Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not
-# contain "efi". This way legacy is supported by default if neither is
-# specified, maintaining the original behavior.
-def pcbios(d):
-    pcbios = bb.utils.contains("MACHINE_FEATURES", "pcbios", "1", "0", d)
-    if pcbios == "0":
-        pcbios = bb.utils.contains("MACHINE_FEATURES", "efi", "0", "1", d)
-    return pcbios
-
-def pcbios_class(d):
-    if d.getVar("PCBIOS", True) == "1":
-        return "syslinux"
-    return ""
-
-PCBIOS = "${@pcbios(d)}"
-PCBIOS_CLASS = "${@pcbios_class(d)}"
-
-inherit ${PCBIOS_CLASS}
-inherit ${EFI_CLASS}
-
-# Get the build_syslinux_cfg() function from the syslinux class
-
-AUTO_SYSLINUXCFG = "1"
-DISK_SIGNATURE ?= "${DISK_SIGNATURE_GENERATED}"
-SYSLINUX_ROOT ?= "root=/dev/sda2"
-SYSLINUX_TIMEOUT ?= "10"
-
-IS_VM = '${@bb.utils.contains_any("IMAGE_FSTYPES", ["vmdk", "vdi", "qcow2"], "true", "false", d)}'
-
-boot_direct_populate() {
-	dest=$1
-	install -d $dest
-
-	# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
-	if [ -e ${DEPLOY_DIR_IMAGE}/bzImage ]; then
-		install -m 0644 ${DEPLOY_DIR_IMAGE}/bzImage $dest/vmlinuz
-	fi
-
-	# initrd is made of concatenation of multiple filesystem images
-	if [ -n "${INITRD}" ]; then
-		rm -f $dest/initrd
-		for fs in ${INITRD}
-		do
-			if [ -s "${fs}" ]; then
-				cat ${fs} >> $dest/initrd
-			else
-				bbfatal "${fs} is invalid. initrd image creation failed."
-			fi
-		done
-		chmod 0644 $dest/initrd
-	fi
-}
-
-build_boot_dd() {
-	HDDDIR="${S}/hdd/boot"
-	HDDIMG="${S}/hdd.image"
-	IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
-
-	boot_direct_populate $HDDDIR
-
-	if [ "${PCBIOS}" = "1" ]; then
-		syslinux_hddimg_populate $HDDDIR
-	fi
-	if [ "${EFI}" = "1" ]; then
-		efi_hddimg_populate $HDDDIR
-	fi
-
-	if [ "${IS_VM}" = "true" ]; then
-		if [ "x${AUTO_SYSLINUXMENU}" = "x1" ] ; then
-			install -m 0644 ${STAGING_DIR}/${MACHINE}/usr/share/syslinux/vesamenu.c32 $HDDDIR/${SYSLINUXDIR}/
-			if [ "x${SYSLINUX_SPLASH}" != "x" ] ; then
-				install -m 0644 ${SYSLINUX_SPLASH} $HDDDIR/${SYSLINUXDIR}/splash.lss
-			fi
-		fi
-	fi
-
-	BLOCKS=`du -bks $HDDDIR | cut -f 1`
-	BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
-
-	# Ensure total sectors is an integral number of sectors per
-	# track or mcopy will complain. Sectors are 512 bytes, and we
-	# generate images with 32 sectors per track. This calculation is
-	# done in blocks, thus the mod by 16 instead of 32.
-	BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
-
-	mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS 
-	mcopy -i $HDDIMG -s $HDDDIR/* ::/
-
-	if [ "${PCBIOS}" = "1" ]; then
-		syslinux_hdddirect_install $HDDIMG
-	fi	
-	chmod 644 $HDDIMG
-
-	ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1`
-	TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS`
-	END1=`expr $BLOCKS \* 1024`
-	END2=`expr $END1 + 512`
-	END3=`expr \( $ROOTFSBLOCKS \* 1024 \) + $END1`
-
-	echo $ROOTFSBLOCKS $TOTALSIZE $END1 $END2 $END3
-	rm -rf $IMAGE
-	dd if=/dev/zero of=$IMAGE bs=1024 seek=$TOTALSIZE count=1
-
-	parted $IMAGE mklabel msdos
-	parted $IMAGE mkpart primary fat16 0 ${END1}B
-	parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B
-	parted $IMAGE set 1 boot on 
-
-	parted $IMAGE print
-
-	awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \
-		dd of=$IMAGE bs=1 seek=440 conv=notrunc
-
-	OFFSET=`expr $END2 / 512`
-	if [ "${PCBIOS}" = "1" ]; then
-		dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
-	fi
-
-	dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
-	dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
-
-	cd ${DEPLOY_DIR_IMAGE}
-	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect
-	ln -s ${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect
-} 
-
-python do_bootdirectdisk() {
-    validate_disk_signature(d)
-    if d.getVar("PCBIOS", True) == "1":
-        bb.build.exec_func('build_syslinux_cfg', d)
-    if d.getVar("EFI", True) == "1":
-        bb.build.exec_func('build_efi_cfg', d)
-    bb.build.exec_func('build_boot_dd', d)
-}
-
-def generate_disk_signature():
-    import uuid
-
-    signature = str(uuid.uuid4())[:8]
-
-    if signature != '00000000':
-        return signature
-    else:
-        return 'ffffffff'
-
-def validate_disk_signature(d):
-    import re
-
-    disk_signature = d.getVar("DISK_SIGNATURE", True)
-
-    if not re.match(r'^[0-9a-fA-F]{8}$', disk_signature):
-        bb.fatal("DISK_SIGNATURE '%s' must be an 8 digit hex string" % disk_signature)
-
-DISK_SIGNATURE_GENERATED := "${@generate_disk_signature()}"
-
-addtask bootdirectdisk before do_build
diff --git a/yocto-poky/meta/classes/bootimg.bbclass b/yocto-poky/meta/classes/bootimg.bbclass
deleted file mode 100644
index ec9d0b7..0000000
--- a/yocto-poky/meta/classes/bootimg.bbclass
+++ /dev/null
@@ -1,303 +0,0 @@
-# Copyright (C) 2004, Advanced Micro Devices, Inc.  All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-
-# Creates a bootable image using syslinux, your kernel and an optional
-# initrd
-
-#
-# End result is two things:
-#
-# 1. A .hddimg file which is an msdos filesystem containing syslinux, a kernel,
-# an initrd and a rootfs image. These can be written to harddisks directly and
-# also booted on USB flash disks (write them there with dd).
-#
-# 2. A CD .iso image
-
-# Boot process is that the initrd will boot and process which label was selected
-# in syslinux. Actions based on the label are then performed (e.g. installing to
-# an hdd)
-
-# External variables (also used by syslinux.bbclass)
-# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
-# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
-# ${NOISO}  - skip building the ISO image if set to 1
-# ${NOHDD}  - skip building the HDD image if set to 1
-# ${HDDIMG_ID} - FAT image volume-id
-# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
-
-do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
-                        mtools-native:do_populate_sysroot \
-                        cdrtools-native:do_populate_sysroot \
-                        virtual/kernel:do_deploy \
-                        ${@oe.utils.ifelse(d.getVar('COMPRESSISO', False),'zisofs-tools-native:do_populate_sysroot','')}"
-
-PACKAGES = " "
-EXCLUDE_FROM_WORLD = "1"
-
-HDDDIR = "${S}/hddimg"
-ISODIR = "${S}/iso"
-EFIIMGDIR = "${S}/efi_img"
-COMPACT_ISODIR = "${S}/iso.z"
-COMPRESSISO ?= "0"
-
-BOOTIMG_VOLUME_ID   ?= "boot"
-BOOTIMG_EXTRA_SPACE ?= "512"
-
-EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
-EFI_PROVIDER ?= "grub-efi"
-EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}"
-
-KERNEL_IMAGETYPE ??= "bzImage"
-
-# Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not
-# contain "efi". This way legacy is supported by default if neither is
-# specified, maintaining the original behavior.
-def pcbios(d):
-    pcbios = bb.utils.contains("MACHINE_FEATURES", "pcbios", "1", "0", d)
-    if pcbios == "0":
-        pcbios = bb.utils.contains("MACHINE_FEATURES", "efi", "0", "1", d)
-    return pcbios
-
-PCBIOS = "${@pcbios(d)}"
-
-# The syslinux is required for the isohybrid command and boot catalog
-inherit syslinux
-inherit ${EFI_CLASS}
-
-populate() {
-	DEST=$1
-	install -d ${DEST}
-
-	# Install kernel, initrd, and rootfs.img in DEST for all loaders to use.
-	install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ${DEST}/vmlinuz
-	
-	# initrd is made of concatenation of multiple filesystem images
-	if [ -n "${INITRD}" ]; then
-		rm -f ${DEST}/initrd
-		for fs in ${INITRD}
-		do
-			if [ -s "${fs}" ]; then
-				cat ${fs} >> ${DEST}/initrd
-			else
-				bbfatal "${fs} is invalid. initrd image creation failed."
-			fi
-		done
-		chmod 0644 ${DEST}/initrd
-	fi
-
-	if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
-		install -m 0644 ${ROOTFS} ${DEST}/rootfs.img
-	fi
-
-}
-
-build_iso() {
-	# Only create an ISO if we have an INITRD and NOISO was not set
-	if [ -z "${INITRD}" ] || [ "${NOISO}" = "1" ]; then
-		bbnote "ISO image will not be created."
-		return
-	fi
-	# ${INITRD} is a list of multiple filesystem images
-	for fs in ${INITRD}
-	do
-		if [ ! -s "${fs}" ]; then
-			bbnote "ISO image will not be created. ${fs} is invalid."
-			return
-		fi
-	done
-
-
-	populate ${ISODIR}
-
-	if [ "${PCBIOS}" = "1" ]; then
-		syslinux_iso_populate ${ISODIR}
-	fi
-	if [ "${EFI}" = "1" ]; then
-		efi_iso_populate ${ISODIR}
-		build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img
-	fi
-
-	# EFI only
-	if [ "${PCBIOS}" != "1" ] && [ "${EFI}" = "1" ] ; then
-		# Work around bug in isohybrid where it requires isolinux.bin
-		# In the boot catalog, even though it is not used
-		mkdir -p ${ISODIR}/${ISOLINUXDIR}
-		install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
-	fi
-
-	if [ "${COMPRESSISO}" = "1" ] ; then
-		# create compact directory, compress iso
-		mkdir -p ${COMPACT_ISODIR}
-		mkzftree -z 9 -p 4 -F ${ISODIR}/rootfs.img ${COMPACT_ISODIR}/rootfs.img
-
-		# move compact iso to iso, then remove compact directory
-		mv ${COMPACT_ISODIR}/rootfs.img ${ISODIR}/rootfs.img
-		rm -Rf ${COMPACT_ISODIR}
-		mkisofs_compress_opts="-R -z -D -l"
-	else
-		mkisofs_compress_opts="-r"
-	fi
-
-	# Check the size of ${ISODIR}/rootfs.img, use mkisofs -iso-level 3
-	# when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need
-	# leave a few space for other files.
-	mkisofs_iso_level=""
-
-        if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
-		rootfs_img_size=`stat -c '%s' ${ISODIR}/rootfs.img`
-		# 4080218931 = 3.8 * 1024 * 1024 * 1024
-		if [ $rootfs_img_size -gt 4080218931 ]; then
-			bbnote "${ISODIR}/rootfs.img execeeds 3.8GB, using '-iso-level 3' for mkisofs"
-			mkisofs_iso_level="-iso-level 3"
-		fi
-	fi
-
-	if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then
-		# PCBIOS only media
-		mkisofs -V ${BOOTIMG_VOLUME_ID} \
-		        -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
-			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
-			$mkisofs_compress_opts \
-			${MKISOFS_OPTIONS} $mkisofs_iso_level ${ISODIR}
-	else
-		# EFI only OR EFI+PCBIOS
-		mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \
-		        -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
-			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
-			$mkisofs_compress_opts ${MKISOFS_OPTIONS} $mkisofs_iso_level \
-			-eltorito-alt-boot -eltorito-platform efi \
-			-b efi.img -no-emul-boot \
-			${ISODIR}
-		isohybrid_args="-u"
-	fi
-
-	isohybrid $isohybrid_args ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso
-
-	cd ${DEPLOY_DIR_IMAGE}
-	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso
-	ln -s ${IMAGE_NAME}.iso ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.iso
-}
-
-build_fat_img() {
-	FATSOURCEDIR=$1
-	FATIMG=$2
-
-	# Calculate the size required for the final image including the
-	# data and filesystem overhead.
-	# Sectors: 512 bytes
-	#  Blocks: 1024 bytes
-
-	# Determine the sector count just for the data
-	SECTORS=$(expr $(du --apparent-size -ks ${FATSOURCEDIR} | cut -f 1) \* 2)
-
-	# Account for the filesystem overhead. This includes directory
-	# entries in the clusters as well as the FAT itself.
-	# Assumptions:
-	#   FAT32 (12 or 16 may be selected by mkdosfs, but the extra
-	#   padding will be minimal on those smaller images and not
-	#   worth the logic here to caclulate the smaller FAT sizes)
-	#   < 16 entries per directory
-	#   8.3 filenames only
-
-	# 32 bytes per dir entry
-	DIR_BYTES=$(expr $(find ${FATSOURCEDIR} | tail -n +2 | wc -l) \* 32)
-	# 32 bytes for every end-of-directory dir entry
-	DIR_BYTES=$(expr $DIR_BYTES + $(expr $(find ${FATSOURCEDIR} -type d | tail -n +2 | wc -l) \* 32))
-	# 4 bytes per FAT entry per sector of data
-	FAT_BYTES=$(expr $SECTORS \* 4)
-	# 4 bytes per FAT entry per end-of-cluster list
-	FAT_BYTES=$(expr $FAT_BYTES + $(expr $(find ${FATSOURCEDIR} -type d | tail -n +2 | wc -l) \* 4))
-
-	# Use a ceiling function to determine FS overhead in sectors
-	DIR_SECTORS=$(expr $(expr $DIR_BYTES + 511) / 512)
-	# There are two FATs on the image
-	FAT_SECTORS=$(expr $(expr $(expr $FAT_BYTES + 511) / 512) \* 2)
-	SECTORS=$(expr $SECTORS + $(expr $DIR_SECTORS + $FAT_SECTORS))
-
-	# Determine the final size in blocks accounting for some padding
-	BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE})
-
-	# Ensure total sectors is an integral number of sectors per
-	# track or mcopy will complain. Sectors are 512 bytes, and we
-	# generate images with 32 sectors per track. This calculation is
-	# done in blocks, thus the mod by 16 instead of 32.
-	BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
-
-	# mkdosfs will sometimes use FAT16 when it is not appropriate,
-	# resulting in a boot failure from SYSLINUX. Use FAT32 for
-	# images larger than 512MB, otherwise let mkdosfs decide.
-	if [ $(expr $BLOCKS / 1024) -gt 512 ]; then
-		FATSIZE="-F 32"
-	fi
-
-	# mkdosfs will fail if ${FATIMG} exists. Since we are creating an
-	# new image, it is safe to delete any previous image.
-	if [ -e ${FATIMG} ]; then
-		rm ${FATIMG}
-	fi
-
-	if [ -z "${HDDIMG_ID}" ]; then
-		mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
-			${BLOCKS}
-	else
-		mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
-		${BLOCKS} -i ${HDDIMG_ID}
-	fi
-
-	# Copy FATSOURCEDIR recursively into the image file directly
-	mcopy -i ${FATIMG} -s ${FATSOURCEDIR}/* ::/
-}
-
-build_hddimg() {
-	# Create an HDD image
-	if [ "${NOHDD}" != "1" ] ; then
-		populate ${HDDDIR}
-
-		if [ "${PCBIOS}" = "1" ]; then
-			syslinux_hddimg_populate ${HDDDIR}
-		fi
-		if [ "${EFI}" = "1" ]; then
-			efi_hddimg_populate ${HDDDIR}
-		fi
-
-		# Check the size of ${HDDDIR}/rootfs.img, error out if it
-		# exceeds 4GB, it is the single file's max size of FAT fs.
-		if [ -f ${HDDDIR}/rootfs.img ]; then
-			rootfs_img_size=`stat -c '%s' ${HDDDIR}/rootfs.img`
-			max_size=`expr 4 \* 1024 \* 1024 \* 1024`
-			if [ $rootfs_img_size -gt $max_size ]; then
-				bberror "${HDDDIR}/rootfs.img execeeds 4GB,"
-				bberror "this doesn't work on FAT filesystem, you can try either of:"
-				bberror "1) Reduce the size of rootfs.img"
-				bbfatal "2) Use iso, vmdk or vdi to instead of hddimg\n"
-			fi
-		fi
-
-		build_fat_img ${HDDDIR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
-
-		if [ "${PCBIOS}" = "1" ]; then
-			syslinux_hddimg_install
-		fi
-
-		chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
-
-		cd ${DEPLOY_DIR_IMAGE}
-		rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
-		ln -s ${IMAGE_NAME}.hddimg ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hddimg
-	fi
-}
-
-python do_bootimg() {
-    if d.getVar("PCBIOS", True) == "1":
-        bb.build.exec_func('build_syslinux_cfg', d)
-    if d.getVar("EFI", True) == "1":
-        bb.build.exec_func('build_efi_cfg', d)
-    bb.build.exec_func('build_hddimg', d)
-    bb.build.exec_func('build_iso', d)
-}
-
-IMAGE_TYPEDEP_iso = "ext4"
-IMAGE_TYPEDEP_hddimg = "ext4"
-IMAGE_TYPES_MASKED += "iso hddimg"
-
-addtask bootimg before do_build
diff --git a/yocto-poky/meta/classes/buildhistory.bbclass b/yocto-poky/meta/classes/buildhistory.bbclass
index 5e2581f..581d532 100644
--- a/yocto-poky/meta/classes/buildhistory.bbclass
+++ b/yocto-poky/meta/classes/buildhistory.bbclass
@@ -3,7 +3,7 @@
 #
 # Based in part on testlab.bbclass and packagehistory.bbclass
 #
-# Copyright (C) 2011-2014 Intel Corporation
+# Copyright (C) 2011-2016 Intel Corporation
 # Copyright (C) 2007-2011 Koen Kooi <koen@openembedded.org>
 #
 
@@ -11,20 +11,54 @@
 BUILDHISTORY_DIR ?= "${TOPDIR}/buildhistory"
 BUILDHISTORY_DIR_IMAGE = "${BUILDHISTORY_DIR}/images/${MACHINE_ARCH}/${TCLIBC}/${IMAGE_BASENAME}"
 BUILDHISTORY_DIR_PACKAGE = "${BUILDHISTORY_DIR}/packages/${MULTIMACH_TARGET_SYS}/${PN}"
-BUILDHISTORY_DIR_SDK = "${BUILDHISTORY_DIR}/sdk/${SDK_NAME}/${IMAGE_BASENAME}"
+
+# Setting this to non-empty will remove the old content of the buildhistory as part of
+# the current bitbake invocation and replace it with information about what was built
+# during the build.
+#
+# This is meant to be used in continuous integration (CI) systems when invoking bitbake
+# for full world builds. The effect in that case is that information about packages
+# that no longer get build also gets removed from the buildhistory, which is not
+# the case otherwise.
+#
+# The advantage over manually cleaning the buildhistory outside of bitbake is that
+# the "version-going-backwards" check still works. When relying on that, be careful
+# about failed world builds: they will lead to incomplete information in the
+# buildhistory because information about packages that could not be built will
+# also get removed. A CI system should handle that by discarding the buildhistory
+# of failed builds.
+#
+# The expected usage is via auto.conf, but passing via the command line also works
+# with: BB_ENV_EXTRAWHITE=BUILDHISTORY_RESET BUILDHISTORY_RESET=1
+BUILDHISTORY_RESET ?= ""
+
+BUILDHISTORY_OLD_DIR = "${BUILDHISTORY_DIR}/${@ "old" if "${BUILDHISTORY_RESET}" else ""}"
+BUILDHISTORY_OLD_DIR_PACKAGE = "${BUILDHISTORY_OLD_DIR}/packages/${MULTIMACH_TARGET_SYS}/${PN}"
+BUILDHISTORY_DIR_SDK = "${BUILDHISTORY_DIR}/sdk/${SDK_NAME}${SDK_EXT}/${IMAGE_BASENAME}"
 BUILDHISTORY_IMAGE_FILES ?= "/etc/passwd /etc/group"
+BUILDHISTORY_SDK_FILES ?= "conf/local.conf conf/bblayers.conf conf/auto.conf conf/locked-sigs.inc conf/devtool.conf"
 BUILDHISTORY_COMMIT ?= "0"
 BUILDHISTORY_COMMIT_AUTHOR ?= "buildhistory <buildhistory@${DISTRO}>"
 BUILDHISTORY_PUSH_REPO ?= ""
 
 SSTATEPOSTINSTFUNCS_append = " buildhistory_emit_pkghistory"
-# We want to avoid influence the signatures of sstate tasks - first the function itself:
+# We want to avoid influencing the signatures of sstate tasks - first the function itself:
 sstate_install[vardepsexclude] += "buildhistory_emit_pkghistory"
 # then the value added to SSTATEPOSTINSTFUNCS:
 SSTATEPOSTINSTFUNCS[vardepvalueexclude] .= "| buildhistory_emit_pkghistory"
 
+# All items excepts those listed here will be removed from a recipe's
+# build history directory by buildhistory_emit_pkghistory(). This is
+# necessary because some of these items (package directories, files that
+# we no longer emit) might be obsolete.
 #
-# Write out metadata about this package for comparision when writing future packages
+# 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"
+
+#
+# Write out metadata about this package for comparison when writing future packages
 #
 python buildhistory_emit_pkghistory() {
     if not d.getVar('BB_CURRENTTASK', True) in ['packagedata', 'packagedata_setscene']:
@@ -38,6 +72,7 @@
     import errno
 
     pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE', True)
+    oldpkghistdir = d.getVar('BUILDHISTORY_OLD_DIR_PACKAGE', True)
 
     class RecipeInfo:
         def __init__(self, name):
@@ -80,7 +115,7 @@
         pkginfo = PackageInfo(pkg)
         with open(histfile, "r") as f:
             for line in f:
-                lns = line.split('=')
+                lns = line.split('=', 1)
                 name = lns[0].strip()
                 value = lns[1].strip(" \t\r\n").strip('"')
                 if name == "PE":
@@ -128,13 +163,13 @@
 
     def getlastpkgversion(pkg):
         try:
-            histfile = os.path.join(pkghistdir, pkg, "latest")
+            histfile = os.path.join(oldpkghistdir, pkg, "latest")
             return readPackageInfo(pkg, histfile)
         except EnvironmentError:
             return None
 
     def sortpkglist(string):
-        pkgiter = re.finditer(r'[a-zA-Z0-9.+-]+( \([><=]+ [^ )]+\))?', string, 0)
+        pkgiter = re.finditer(r'[a-zA-Z0-9.+-]+( \([><=]+[^)]+\))?', string, 0)
         pkglist = [p.group(0) for p in pkgiter]
         pkglist.sort()
         return ' '.join(pkglist)
@@ -165,12 +200,13 @@
             raise
 
     packagelist = packages.split()
+    preserve = d.getVar('BUILDHISTORY_PRESERVE', True).split()
     if not os.path.exists(pkghistdir):
         bb.utils.mkdirhier(pkghistdir)
     else:
         # Remove files for packages that no longer exist
         for item in os.listdir(pkghistdir):
-            if item != "latest" and item != "latest_srcrev":
+            if item not in preserve:
                 if item not in packagelist:
                     itempath = os.path.join(pkghistdir, item)
                     if os.path.isdir(itempath):
@@ -325,18 +361,21 @@
 def buildhistory_list_installed(d, rootfs_type="image"):
     from oe.rootfs import image_list_installed_packages
     from oe.sdk import sdk_list_installed_packages
+    from oe.utils import format_pkg_list
 
     process_list = [('file', 'bh_installed_pkgs.txt'),\
                     ('deps', 'bh_installed_pkgs_deps.txt')]
 
+    if rootfs_type == "image":
+        pkgs = image_list_installed_packages(d)
+    else:
+        pkgs = sdk_list_installed_packages(d, rootfs_type == "sdk_target")
+
     for output_type, output_file in process_list:
         output_file_full = os.path.join(d.getVar('WORKDIR', True), output_file)
 
         with open(output_file_full, 'w') as output:
-            if rootfs_type == "image":
-                output.write(image_list_installed_packages(d, output_type))
-            else:
-                output.write(sdk_list_installed_packages(d, rootfs_type == "sdk_target", output_type))
+            output.write(format_pkg_list(pkgs, output_type))
 
 python buildhistory_list_installed_image() {
     buildhistory_list_installed(d)
@@ -377,15 +416,8 @@
 	rm $1/depends.tmp
 
 	# Produce installed package sizes list
-	printf "" > $1/installed-package-sizes.tmp
-	cat $pkgcache | while read pkg pkgfile pkgarch
-	do
-		size=`oe-pkgdata-util -p ${PKGDATA_DIR} read-value "PKGSIZE" ${pkg}_${pkgarch}`
-		if [ "$size" != "" ] ; then
-			echo "$size $pkg" >> $1/installed-package-sizes.tmp
-		fi
-	done
-	cat $1/installed-package-sizes.tmp | sort -n -r | awk '{print $1 "\tKiB " $2}' > $1/installed-package-sizes.txt
+	oe-pkgdata-util -p ${PKGDATA_DIR} read-value "PKGSIZE" -n -f $pkgcache > $1/installed-package-sizes.tmp
+	cat $1/installed-package-sizes.tmp | awk '{print $2 "\tKiB " $1}' | sort -n -r > $1/installed-package-sizes.txt
 	rm $1/installed-package-sizes.tmp
 
 	# We're now done with the cache, delete it
@@ -393,7 +425,7 @@
 
 	if [ "$2" != "sdk" ] ; then
 		# Produce some cut-down graphs (for readability)
-		grep -v kernel_image $1/depends.dot | grep -v kernel-2 | grep -v kernel-3 > $1/depends-nokernel.dot
+		grep -v kernel-image $1/depends.dot | grep -v kernel-3 | grep -v kernel-4 > $1/depends-nokernel.dot
 		grep -v libc6 $1/depends-nokernel.dot | grep -v libgcc > $1/depends-nokernel-nolibc.dot
 		grep -v update- $1/depends-nokernel-nolibc.dot > $1/depends-nokernel-nolibc-noupdate.dot
 		grep -v kernel-module $1/depends-nokernel-nolibc-noupdate.dot > $1/depends-nokernel-nolibc-noupdate-nomodules.dot
@@ -465,6 +497,7 @@
 		return
 	fi
 
+        mkdir -p ${BUILDHISTORY_DIR_IMAGE}
 	buildhistory_list_files ${IMAGE_ROOTFS} ${BUILDHISTORY_DIR_IMAGE}/files-in-image.txt
 
 	# Collect files requested in BUILDHISTORY_IMAGE_FILES
@@ -499,6 +532,15 @@
 
 	buildhistory_list_files ${SDK_OUTPUT} ${BUILDHISTORY_DIR_SDK}/files-in-sdk.txt
 
+	# Collect files requested in BUILDHISTORY_SDK_FILES
+	rm -rf ${BUILDHISTORY_DIR_SDK}/sdk-files
+	for f in ${BUILDHISTORY_SDK_FILES}; do
+		if [ -f ${SDK_OUTPUT}/${SDKPATH}/$f ] ; then
+			mkdir -p ${BUILDHISTORY_DIR_SDK}/sdk-files/`dirname $f`
+			cp ${SDK_OUTPUT}/${SDKPATH}/$f ${BUILDHISTORY_DIR_SDK}/sdk-files/$f
+		fi
+	done
+
 	# Record some machine-readable meta-information about the SDK
 	printf ""  > ${BUILDHISTORY_DIR_SDK}/sdk-info.txt
 	cat >> ${BUILDHISTORY_DIR_SDK}/sdk-info.txt <<END
@@ -508,6 +550,30 @@
 	echo "SDKSIZE = $sdksize" >> ${BUILDHISTORY_DIR_SDK}/sdk-info.txt
 }
 
+python buildhistory_get_extra_sdkinfo() {
+    import operator
+    import math
+    if d.getVar('BB_CURRENTTASK', True) == 'populate_sdk_ext':
+        tasksizes = {}
+        filesizes = {}
+        for root, _, files in os.walk(d.expand('${SDK_OUTPUT}/${SDKPATH}/sstate-cache')):
+            for fn in files:
+                if fn.endswith('.tgz'):
+                    fsize = int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024))
+                    task = fn.rsplit(':', 1)[1].split('_', 1)[1].split('.')[0]
+                    origtotal = tasksizes.get(task, 0)
+                    tasksizes[task] = origtotal + fsize
+                    filesizes[fn] = fsize
+        with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-package-sizes.txt'), 'w') as f:
+            filesizes_sorted = sorted(filesizes.items(), key=operator.itemgetter(1), reverse=True)
+            for fn, size in filesizes_sorted:
+                f.write('%10d KiB %s\n' % (size, fn))
+        with open(d.expand('${BUILDHISTORY_DIR_SDK}/sstate-task-sizes.txt'), 'w') as f:
+            tasksizes_sorted = sorted(tasksizes.items(), key=operator.itemgetter(1), reverse=True)
+            for task, size in tasksizes_sorted:
+                f.write('%10d KiB %s\n' % (size, task))
+}
+
 # By using ROOTFS_POSTUNINSTALL_COMMAND we get in after uninstallation of
 # unneeded packages but before the removal of packaging files
 ROOTFS_POSTUNINSTALL_COMMAND += " buildhistory_list_installed_image ;\
@@ -516,12 +582,16 @@
 IMAGE_POSTPROCESS_COMMAND += " buildhistory_get_imageinfo ; "
 
 # We want these to be the last run so that we get called after complementary package installation
-POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_list_installed_sdk_target ;\
-                                            buildhistory_get_sdk_installed_target ; "
-POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_list_installed_sdk_host ;\
-                                          buildhistory_get_sdk_installed_host ; "
+POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_list_installed_sdk_target;"
+POPULATE_SDK_POST_TARGET_COMMAND_append = " buildhistory_get_sdk_installed_target;"
+POPULATE_SDK_POST_TARGET_COMMAND[vardepvalueexclude] .= "| buildhistory_list_installed_sdk_target;| buildhistory_get_sdk_installed_target;"
 
-SDK_POSTPROCESS_COMMAND_append = " buildhistory_get_sdkinfo ; "
+POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_list_installed_sdk_host;"
+POPULATE_SDK_POST_HOST_COMMAND_append = " buildhistory_get_sdk_installed_host;"
+POPULATE_SDK_POST_HOST_COMMAND[vardepvalueexclude] .= "| buildhistory_list_installed_sdk_host;| buildhistory_get_sdk_installed_host;"
+
+SDK_POSTPROCESS_COMMAND_append = " buildhistory_get_sdkinfo ; buildhistory_get_extra_sdkinfo; "
+SDK_POSTPROCESS_COMMAND[vardepvalueexclude] .= "| buildhistory_get_sdkinfo ; buildhistory_get_extra_sdkinfo; "
 
 def buildhistory_get_build_id(d):
     if d.getVar('BB_WORKERCONTEXT', True) != '1':
@@ -573,7 +643,10 @@
     if d.getVar('BB_WORKERCONTEXT', True) != '1':
         return ""
     sdkvars = "DISTRO DISTRO_VERSION SDK_NAME SDK_VERSION SDKMACHINE SDKIMAGE_FEATURES BAD_RECOMMENDATIONS NO_RECOMMENDATIONS PACKAGE_EXCLUDE"
-    listvars = "SDKIMAGE_FEATURES BAD_RECOMMENDATIONS PACKAGE_EXCLUDE"
+    if d.getVar('BB_CURRENTTASK', True) == 'populate_sdk_ext':
+        # Extensible SDK uses some additional variables
+        sdkvars += " SDK_LOCAL_CONF_WHITELIST SDK_LOCAL_CONF_BLACKLIST SDK_INHERIT_BLACKLIST SDK_UPDATE_URL SDK_EXT_TYPE SDK_RECRDEP_TASKS"
+    listvars = "SDKIMAGE_FEATURES BAD_RECOMMENDATIONS PACKAGE_EXCLUDE SDK_LOCAL_CONF_WHITELIST SDK_LOCAL_CONF_BLACKLIST SDK_INHERIT_BLACKLIST"
     return outputvars(sdkvars, listvars, d)
 
 
@@ -634,7 +707,7 @@
 
 	( cd ${BUILDHISTORY_DIR}/
 		# Initialise the repo if necessary
-		if [ ! -d .git ] ; then
+		if [ ! -e .git ] ; then
 			git init -q
 		else
 			git tag -f build-minus-3 build-minus-2 > /dev/null 2>&1 || true
@@ -672,17 +745,35 @@
 
 python buildhistory_eventhandler() {
     if e.data.getVar('BUILDHISTORY_FEATURES', True).strip():
-        if e.data.getVar("BUILDHISTORY_COMMIT", True) == "1":
-            bb.note("Writing buildhistory")
-            localdata = bb.data.createCopy(e.data)
-            localdata.setVar('BUILDHISTORY_BUILD_FAILURES', str(e._failures))
-            interrupted = getattr(e, '_interrupted', 0)
-            localdata.setVar('BUILDHISTORY_BUILD_INTERRUPTED', str(interrupted))
-            bb.build.exec_func("buildhistory_commit", localdata)
+        reset = e.data.getVar("BUILDHISTORY_RESET", True)
+        olddir = e.data.getVar("BUILDHISTORY_OLD_DIR", True)
+        if isinstance(e, bb.event.BuildStarted):
+            if reset:
+                import shutil
+                # Clean up after potentially interrupted build.
+                if os.path.isdir(olddir):
+                    shutil.rmtree(olddir)
+                rootdir = e.data.getVar("BUILDHISTORY_DIR", True)
+                entries = [ x for x in os.listdir(rootdir) if not x.startswith('.') ]
+                bb.utils.mkdirhier(olddir)
+                for entry in entries:
+                    os.rename(os.path.join(rootdir, entry),
+                              os.path.join(olddir, entry))
+        elif isinstance(e, bb.event.BuildCompleted):
+            if reset:
+                import shutil
+                shutil.rmtree(olddir)
+            if e.data.getVar("BUILDHISTORY_COMMIT", True) == "1":
+                bb.note("Writing buildhistory")
+                localdata = bb.data.createCopy(e.data)
+                localdata.setVar('BUILDHISTORY_BUILD_FAILURES', str(e._failures))
+                interrupted = getattr(e, '_interrupted', 0)
+                localdata.setVar('BUILDHISTORY_BUILD_INTERRUPTED', str(interrupted))
+                bb.build.exec_func("buildhistory_commit", localdata)
 }
 
 addhandler buildhistory_eventhandler
-buildhistory_eventhandler[eventmask] = "bb.event.BuildCompleted"
+buildhistory_eventhandler[eventmask] = "bb.event.BuildCompleted bb.event.BuildStarted"
 
 
 # FIXME this ought to be moved into the fetcher
diff --git a/yocto-poky/meta/classes/buildstats-summary.bbclass b/yocto-poky/meta/classes/buildstats-summary.bbclass
index 05ead9f..d73350b 100644
--- a/yocto-poky/meta/classes/buildstats-summary.bbclass
+++ b/yocto-poky/meta/classes/buildstats-summary.bbclass
@@ -3,8 +3,7 @@
     import collections
     import os.path
 
-    bn = get_bn(e)
-    bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
+    bsdir = e.data.expand("${BUILDSTATS_BASE}/${BUILDNAME}")
     if not os.path.exists(bsdir):
         return
 
diff --git a/yocto-poky/meta/classes/buildstats.bbclass b/yocto-poky/meta/classes/buildstats.bbclass
index 22ec571..34ecb03 100644
--- a/yocto-poky/meta/classes/buildstats.bbclass
+++ b/yocto-poky/meta/classes/buildstats.bbclass
@@ -1,135 +1,72 @@
 BUILDSTATS_BASE = "${TMPDIR}/buildstats/"
-BUILDSTATS_BNFILE = "${BUILDSTATS_BASE}/.buildname"
-BUILDSTATS_DEVFILE = "${BUILDSTATS_BASE}/.device"
 
 ################################################################################
 # Build statistics gathering.
 #
 # The CPU and Time gathering/tracking functions and bbevent inspiration
-# were written by Christopher Larson and can be seen here:
-# http://kergoth.pastey.net/142813
+# were written by Christopher Larson.
 #
 ################################################################################
 
-def get_process_cputime(pid):
+def get_buildprocess_cputime(pid):
     with open("/proc/%d/stat" % pid, "r") as f:
         fields = f.readline().rstrip().split()
     # 13: utime, 14: stime, 15: cutime, 16: cstime
     return sum(int(field) for field in fields[13:16])
 
+def get_process_cputime(pid):
+    import resource
+    with open("/proc/%d/stat" % pid, "r") as f:
+        fields = f.readline().rstrip().split()
+    stats = { 
+        'utime'  : fields[13],
+        'stime'  : fields[14], 
+        'cutime' : fields[15], 
+        'cstime' : fields[16],  
+    }
+    iostats = {}
+    if os.path.isfile("/proc/%d/io" % pid):
+        with open("/proc/%d/io" % pid, "r") as f:
+            while True:
+                i = f.readline().strip()
+                if not i:
+                    break
+                i = i.split(": ")
+                iostats[i[0]] = i[1]
+    resources = resource.getrusage(resource.RUSAGE_SELF)
+    childres = resource.getrusage(resource.RUSAGE_CHILDREN)
+    return stats, iostats, resources, childres
+
 def get_cputime():
     with open("/proc/stat", "r") as f:
         fields = f.readline().rstrip().split()[1:]
     return sum(int(field) for field in fields)
 
-def set_bn(e):
-    bn = e.getPkgs()[0] + "-" + e.data.getVar('MACHINE', True)
-    try:
-        os.remove(e.data.getVar('BUILDSTATS_BNFILE', True))
-    except:
-        pass
-    with open(e.data.getVar('BUILDSTATS_BNFILE', True), "w") as f:
-        f.write(os.path.join(bn, e.data.getVar('BUILDNAME', True)))
+def set_timedata(var, d, server_time):
+    d.setVar(var, server_time)
 
-def get_bn(e):
-    with open(e.data.getVar('BUILDSTATS_BNFILE', True)) as f:
-        bn = f.readline()
-    return bn
-
-def set_device(e):
-    tmpdir = e.data.getVar('TMPDIR', True)
-    devfile = e.data.getVar('BUILDSTATS_DEVFILE', True)
-    try:
-        os.remove(devfile)
-    except:
-        pass
-    ############################################################################
-    # We look for the volume TMPDIR lives on. To do all disks would make little
-    # sense and not give us any particularly useful data. In theory we could do
-    # something like stick DL_DIR on a different partition and this would
-    # throw stats gathering off. The same goes with SSTATE_DIR. However, let's
-    # get the basics in here and work on the cornercases later.
-    # A note. /proc/diskstats does not contain info on encryptfs, tmpfs, etc.
-    # If we end up hitting one of these fs, we'll just skip diskstats collection.
-    ############################################################################
-    device = os.stat(tmpdir)
-    majordev = os.major(long(device.st_dev))
-    minordev = os.minor(long(device.st_dev))
-    ############################################################################
-    # Bug 1700:
-    # Because tmpfs/encryptfs/ramfs etc inserts no entry in /proc/diskstats
-    # we set rdev to NoLogicalDevice and search for it later. If we find NLD
-    # we do not collect diskstats as the method to collect meaningful statistics
-    # for these fs types requires a bit more research.
-    ############################################################################
-    rdev = "NoLogicalDevice"
-    try:
-        with open("/proc/diskstats", "r") as f:
-            for line in f:
-                if majordev == int(line.split()[0]) and minordev == int(line.split()[1]):
-                    rdev = line.split()[2]
-    except:
-        pass
-    with open(devfile, "w") as f:
-        f.write(rdev)
-
-def get_device(e):
-    with open(e.data.getVar('BUILDSTATS_DEVFILE', True)) as f:
-        device = f.readline()
-    return device
-
-def get_diskstats(dev):
-    import itertools
-    ############################################################################
-    # For info on what these are, see kernel doc file iostats.txt
-    ############################################################################
-    DSTAT_KEYS = ['ReadsComp', 'ReadsMerged', 'SectRead', 'TimeReads', 'WritesComp', 'SectWrite', 'TimeWrite', 'IOinProgress', 'TimeIO', 'WTimeIO']
-    try:
-        with open("/proc/diskstats", "r") as f:
-            for x in f:
-                if dev in x:
-                    diskstats_val = x.rstrip().split()[4:]
-    except IOError as e:
+def get_timedata(var, d, end_time):
+    oldtime = d.getVar(var, False)
+    if oldtime is None:
         return
-    diskstats = dict(itertools.izip(DSTAT_KEYS, diskstats_val))
-    return diskstats
+    return end_time - oldtime
 
-def set_diskdata(var, dev, data):
-    data.setVar(var, get_diskstats(dev))
-
-def get_diskdata(var, dev, data):
-    olddiskdata = data.getVar(var, False)
-    diskdata = {}
-    if olddiskdata is None:
-        return
-    newdiskdata = get_diskstats(dev)
-    for key in olddiskdata.iterkeys():
-        diskdata["Start"+key] = str(int(olddiskdata[key]))
-        diskdata["End"+key] = str(int(newdiskdata[key]))
-    return diskdata
-
-def set_timedata(var, data, server_time=None):
+def set_buildtimedata(var, d):
     import time
-    if server_time:
-        time = server_time
-    else:
-        time = time.time()
+    time = time.time()
     cputime = get_cputime()
-    proctime = get_process_cputime(os.getpid())
-    data.setVar(var, (time, cputime, proctime))
+    proctime = get_buildprocess_cputime(os.getpid())
+    d.setVar(var, (time, cputime, proctime))
 
-def get_timedata(var, data, server_time=None):
+def get_buildtimedata(var, d):
     import time
-    timedata = data.getVar(var, False)
+    timedata = d.getVar(var, False)
     if timedata is None:
         return
     oldtime, oldcpu, oldproc = timedata
-    procdiff = get_process_cputime(os.getpid()) - oldproc
+    procdiff = get_buildprocess_cputime(os.getpid()) - oldproc
     cpudiff = get_cputime() - oldcpu
-    if server_time:
-        end_time = server_time
-    else:
-        end_time = time.time()
+    end_time = time.time()
     timediff = end_time - oldtime
     if cpudiff > 0:
         cpuperc = float(procdiff) * 100 / cpudiff
@@ -137,30 +74,27 @@
         cpuperc = None
     return timediff, cpuperc
 
-def write_task_data(status, logfile, dev, e):
-    bn = get_bn(e)
-    bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
+def write_task_data(status, logfile, e, d):
+    bn = d.getVar('BUILDNAME', True)
+    bsdir = os.path.join(d.getVar('BUILDSTATS_BASE', True), bn)
     with open(os.path.join(logfile), "a") as f:
-        timedata = get_timedata("__timedata_task", e.data, e.time)
-        if timedata:
-            elapsedtime, cpu = timedata
-            f.write(bb.data.expand("${PF}: %s: Elapsed time: %0.2f seconds \n" %
-                                    (e.task, elapsedtime), e.data))
+        elapsedtime = get_timedata("__timedata_task", d, e.time)
+        if elapsedtime:
+            f.write(d.expand("${PF}: %s: Elapsed time: %0.2f seconds \n" %
+                                    (e.task, elapsedtime)))
+            cpu, iostats, resources, childres = get_process_cputime(os.getpid())
             if cpu:
-                f.write("CPU usage: %0.1f%% \n" % cpu)
-        ############################################################################
-        # Here we gather up disk data. In an effort to avoid lying with stats
-        # I do a bare minimum of analysis of collected data.
-        # The simple fact is, doing disk io collection on a per process basis
-        # without effecting build time would be difficult.
-        # For the best information, running things with BB_TOTAL_THREADS = "1"
-        # would return accurate per task results.
-        ############################################################################
-        if dev != "NoLogicalDevice":
-            diskdata = get_diskdata("__diskdata_task", dev, e.data)
-            if diskdata:
-                for key in sorted(diskdata.iterkeys()):
-                    f.write(key + ": " + diskdata[key] + "\n")
+                f.write("utime: %s\n" % cpu['utime'])
+                f.write("stime: %s\n" % cpu['stime'])
+                f.write("cutime: %s\n" % cpu['cutime'])
+                f.write("cstime: %s\n" % cpu['cstime'])
+            for i in iostats:
+                f.write("IO %s: %s\n" % (i, iostats[i]))
+            rusages = ["ru_utime", "ru_stime", "ru_maxrss", "ru_minflt", "ru_majflt", "ru_inblock", "ru_oublock", "ru_nvcsw", "ru_nivcsw"]
+            for i in rusages:
+                f.write("rusage %s: %s\n" % (i, getattr(resources, i)))
+            for i in rusages:
+                f.write("Child rusage %s: %s\n" % (i, getattr(childres, i)))
         if status is "passed":
             f.write("Status: PASSED \n")
         else:
@@ -170,25 +104,26 @@
 python run_buildstats () {
     import bb.build
     import bb.event
-    import bb.data
     import time, subprocess, platform
 
+    bn = d.getVar('BUILDNAME', True)
+    bsdir = os.path.join(d.getVar('BUILDSTATS_BASE', True), bn)
+    taskdir = os.path.join(bsdir, d.getVar('PF', True))
+
     if isinstance(e, bb.event.BuildStarted):
         ########################################################################
-        # at first pass make the buildstats heriarchy and then
+        # If the kernel was not configured to provide I/O statistics, issue
+        # a one time warning.
+        ########################################################################
+        if not os.path.isfile("/proc/%d/io" % os.getpid()):
+            bb.warn("The Linux kernel on your build host was not configured to provide process I/O statistics. (CONFIG_TASK_IO_ACCOUNTING is not set)")
+
+        ########################################################################
+        # at first pass make the buildstats hierarchy and then
         # set the buildname
         ########################################################################
-        bb.utils.mkdirhier(e.data.getVar('BUILDSTATS_BASE', True))
-        set_bn(e)
-        bn = get_bn(e)
-        set_device(e)
-        device = get_device(e)
-
-        bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
         bb.utils.mkdirhier(bsdir)
-        if device != "NoLogicalDevice":
-            set_diskdata("__diskdata_build", device, e.data)
-        set_timedata("__timedata_build", e.data)
+        set_buildtimedata("__timedata_build", d)
         build_time = os.path.join(bsdir, "build_stats")
         # write start of build into build_time
         with open(build_time, "a") as f:
@@ -201,35 +136,21 @@
             f.write("Build Started: %0.2f \n" % time.time())
 
     elif isinstance(e, bb.event.BuildCompleted):
-        bn = get_bn(e)
-        device = get_device(e)
-        bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
         build_time = os.path.join(bsdir, "build_stats")
         with open(build_time, "a") as f:
             ########################################################################
             # Write build statistics for the build
             ########################################################################
-            timedata = get_timedata("__timedata_build", e.data)
+            timedata = get_buildtimedata("__timedata_build", d)
             if timedata:
                 time, cpu = timedata
                 # write end of build and cpu used into build_time
                 f.write("Elapsed time: %0.2f seconds \n" % (time))
                 if cpu:
                     f.write("CPU usage: %0.1f%% \n" % cpu)
-            if device != "NoLogicalDevice":
-                diskio = get_diskdata("__diskdata_build", device, e.data)
-                if diskio:
-                    for key in sorted(diskio.iterkeys()):
-                        f.write(key + ": " + diskio[key] + "\n")
 
     if isinstance(e, bb.build.TaskStarted):
-        bn = get_bn(e)
-        device = get_device(e)
-        bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
-        taskdir = os.path.join(bsdir, e.data.getVar('PF', True))
-        if device != "NoLogicalDevice":
-            set_diskdata("__diskdata_task", device, e.data)
-        set_timedata("__timedata_task", e.data, e.time)
+        set_timedata("__timedata_task", d, e.time)
         bb.utils.mkdirhier(taskdir)
         # write into the task event file the name and start time
         with open(os.path.join(taskdir, e.task), "a") as f:
@@ -237,24 +158,18 @@
             f.write("Started: %0.2f \n" % e.time)
 
     elif isinstance(e, bb.build.TaskSucceeded):
-        bn = get_bn(e)
-        device = get_device(e)
-        bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
-        taskdir = os.path.join(bsdir, e.data.getVar('PF', True))
-        write_task_data("passed", os.path.join(taskdir, e.task), device, e)
+        write_task_data("passed", os.path.join(taskdir, e.task), e, d)
         if e.task == "do_rootfs":
             bs = os.path.join(bsdir, "build_stats")
             with open(bs, "a") as f:
-                rootfs = e.data.getVar('IMAGE_ROOTFS', True)
+                rootfs = d.getVar('IMAGE_ROOTFS', True)
                 rootfs_size = subprocess.Popen(["du", "-sh", rootfs], stdout=subprocess.PIPE).stdout.read()
                 f.write("Uncompressed Rootfs size: %s" % rootfs_size)
 
     elif isinstance(e, bb.build.TaskFailed):
-        bn = get_bn(e)
-        device = get_device(e)
-        bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
-        taskdir = os.path.join(bsdir, e.data.getVar('PF', True))
-        write_task_data("failed", os.path.join(taskdir, e.task), device, e)
+        # Can have a failure before TaskStarted so need to mkdir here too
+        bb.utils.mkdirhier(taskdir)
+        write_task_data("failed", os.path.join(taskdir, e.task), e, d)
         ########################################################################
         # Lets make things easier and tell people where the build failed in
         # build_status. We do this here because BuildCompleted triggers no
@@ -262,7 +177,7 @@
         ########################################################################
         build_status = os.path.join(bsdir, "build_stats")
         with open(build_status, "a") as f:
-            f.write(e.data.expand("Failed at: ${PF} at task: %s \n" % e.task))
+            f.write(d.expand("Failed at: ${PF} at task: %s \n" % e.task))
 }
 
 addhandler run_buildstats
diff --git a/yocto-poky/meta/classes/chrpath.bbclass b/yocto-poky/meta/classes/chrpath.bbclass
index e9160af..9c68855 100644
--- a/yocto-poky/meta/classes/chrpath.bbclass
+++ b/yocto-poky/meta/classes/chrpath.bbclass
@@ -6,7 +6,7 @@
 
     p = sub.Popen([cmd, '-l', fpath],stdout=sub.PIPE,stderr=sub.PIPE)
     err, out = p.communicate()
-    # If returned succesfully, process stderr for results
+    # If returned successfully, process stderr for results
     if p.returncode != 0:
         return
 
@@ -45,7 +45,7 @@
 
     p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', fpath],stdout=sub.PIPE,stderr=sub.PIPE)
     err, out = p.communicate()
-    # If returned succesfully, process stderr for results
+    # If returned successfully, process stderr for results
     if p.returncode != 0:
         return
     for l in err.split("\n"):
diff --git a/yocto-poky/meta/classes/cmake.bbclass b/yocto-poky/meta/classes/cmake.bbclass
index ae3cc02..02f313a 100644
--- a/yocto-poky/meta/classes/cmake.bbclass
+++ b/yocto-poky/meta/classes/cmake.bbclass
@@ -7,9 +7,6 @@
 # We need to unset CCACHE otherwise cmake gets too confused
 CCACHE = ""
 
-# We want the staging and installing functions from autotools
-inherit autotools
-
 # C/C++ Compiler (without cpu arch/tune arguments)
 OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
 OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
@@ -18,8 +15,8 @@
 # Compiler flags
 OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CFLAGS}"
 OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS}"
-OECMAKE_C_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CFLAGS} -DNDEBUG"
-OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CXXFLAGS} -DNDEBUG"
+OECMAKE_C_FLAGS_RELEASE ?= "-DNDEBUG"
+OECMAKE_CXX_FLAGS_RELEASE ?= "-DNDEBUG"
 OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}"
 OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}"
 
@@ -30,6 +27,8 @@
 OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
 OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
 
+EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
+
 # CMake expects target architectures in the format of uname(2),
 # which do not always match TARGET_ARCH, so all the necessary
 # conversions should happen here.
@@ -53,9 +52,9 @@
 set( CMAKE_C_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "CFLAGS" )
 set( CMAKE_CXX_FLAGS "${OECMAKE_CXX_FLAGS}" CACHE STRING "CXXFLAGS" )
 set( CMAKE_ASM_FLAGS "${OECMAKE_C_FLAGS}" CACHE STRING "ASM FLAGS" )
-set( CMAKE_C_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "CFLAGS for release" )
-set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "CXXFLAGS for release" )
-set( CMAKE_ASM_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "ASM FLAGS for release" )
+set( CMAKE_C_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "Additional CFLAGS for release" )
+set( CMAKE_CXX_FLAGS_RELEASE "${OECMAKE_CXX_FLAGS_RELEASE}" CACHE STRING "Additional CXXFLAGS for release" )
+set( CMAKE_ASM_FLAGS_RELEASE "${OECMAKE_C_FLAGS_RELEASE}" CACHE STRING "Additional ASM FLAGS for release" )
 set( CMAKE_C_LINK_FLAGS "${OECMAKE_C_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
 set( CMAKE_CXX_LINK_FLAGS "${OECMAKE_CXX_LINK_FLAGS}" CACHE STRING "LDFLAGS" )
 
@@ -132,7 +131,7 @@
 
 cmake_do_install() {
 	cd ${B}
-	autotools_do_install
+	oe_runmake 'DESTDIR=${D}' install
 }
 
 EXPORT_FUNCTIONS do_configure do_compile do_install do_generate_toolchain_file
diff --git a/yocto-poky/meta/classes/cml1.bbclass b/yocto-poky/meta/classes/cml1.bbclass
index 95cf584..b5dc028 100644
--- a/yocto-poky/meta/classes/cml1.bbclass
+++ b/yocto-poky/meta/classes/cml1.bbclass
@@ -26,7 +26,8 @@
     except OSError:
         mtime = 0
 
-    oe_terminal("${SHELL} -c \"make ${KCONFIG_CONFIG_COMMAND}; if [ \$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"", '${PN} Configuration', d)
+    oe_terminal("${SHELL} -c \"make %s; if [ \$? -ne 0 ]; then echo 'Command failed.'; printf 'Press any key to continue... '; read r; fi\"" % d.getVar('KCONFIG_CONFIG_COMMAND', True),
+                d.getVar('PN', True ) + ' Configuration', d)
 
     # FIXME this check can be removed when the minimum bitbake version has been bumped
     if hasattr(bb.build, 'write_taint'):
diff --git a/yocto-poky/meta/classes/compress_doc.bbclass b/yocto-poky/meta/classes/compress_doc.bbclass
index 9b58d82..8073c17 100644
--- a/yocto-poky/meta/classes/compress_doc.bbclass
+++ b/yocto-poky/meta/classes/compress_doc.bbclass
@@ -40,8 +40,8 @@
     compress_cmds = {}
     decompress_cmds = {}
     for mode in compress_list:
-        compress_cmds[mode] = d.getVarFlag('DOC_COMPRESS_CMD', mode)
-        decompress_cmds[mode] = d.getVarFlag('DOC_DECOMPRESS_CMD', mode)
+        compress_cmds[mode] = d.getVarFlag('DOC_COMPRESS_CMD', mode, True)
+        decompress_cmds[mode] = d.getVarFlag('DOC_DECOMPRESS_CMD', mode, True)
 
     mandir = os.path.abspath(dvar + os.sep + d.getVar("mandir", True))
     if os.path.exists(mandir):
diff --git a/yocto-poky/meta/classes/core-image.bbclass b/yocto-poky/meta/classes/core-image.bbclass
index 8e340d9..705cad8 100644
--- a/yocto-poky/meta/classes/core-image.bbclass
+++ b/yocto-poky/meta/classes/core-image.bbclass
@@ -24,7 +24,6 @@
 # - nfs-client          - NFS client
 # - ssh-server-dropbear - SSH server (dropbear)
 # - ssh-server-openssh  - SSH server (openssh)
-# - qt4-pkgs            - Qt4/X11 and demo applications
 # - hwcodecs            - Install hardware acceleration codecs
 # - package-management  - installs package management tools and preserves the package manager database
 # - debug-tweaks        - makes an image suitable for development, e.g. allowing passwordless root logins
@@ -46,7 +45,6 @@
 FEATURE_PACKAGES_nfs-client = "packagegroup-core-nfs-client"
 FEATURE_PACKAGES_ssh-server-dropbear = "packagegroup-core-ssh-dropbear"
 FEATURE_PACKAGES_ssh-server-openssh = "packagegroup-core-ssh-openssh"
-FEATURE_PACKAGES_qt4-pkgs = "packagegroup-core-qt-demoapps"
 FEATURE_PACKAGES_hwcodecs = "${MACHINE_HWCODECS}"
 
 
diff --git a/yocto-poky/meta/classes/cpan-base.bbclass b/yocto-poky/meta/classes/cpan-base.bbclass
index 7810a4d..55ac052 100644
--- a/yocto-poky/meta/classes/cpan-base.bbclass
+++ b/yocto-poky/meta/classes/cpan-base.bbclass
@@ -29,31 +29,12 @@
             return m.group(1)
     return None
 
-# Determine where the library directories are
-def perl_get_libdirs(d):
-    libdir = d.getVar('libdir', True)
-    if is_target(d) == "no":
-        libdir += '/perl-native'
-    libdir += '/perl'
-    return libdir
-
 def is_target(d):
     if not bb.data.inherits_class('native', d):
         return "yes"
     return "no"
 
-PERLLIBDIRS := "${@perl_get_libdirs(d)}"
+PERLLIBDIRS = "${libdir}/perl"
+PERLLIBDIRS_class-native = "${libdir}/perl-native"
 PERLVERSION := "${@get_perl_version(d)}"
 PERLVERSION[vardepvalue] = ""
-
-FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \
-                    ${PERLLIBDIRS}/auto/*/*/.debug \
-                    ${PERLLIBDIRS}/auto/*/*/*/.debug \
-                    ${PERLLIBDIRS}/auto/*/*/*/*/.debug \
-                    ${PERLLIBDIRS}/auto/*/*/*/*/*/.debug \
-                    ${PERLLIBDIRS}/vendor_perl/${PERLVERSION}/auto/*/.debug \
-                    ${PERLLIBDIRS}/vendor_perl/${PERLVERSION}/auto/*/*/.debug \
-                    ${PERLLIBDIRS}/vendor_perl/${PERLVERSION}/auto/*/*/*/.debug \
-                    ${PERLLIBDIRS}/vendor_perl/${PERLVERSION}/auto/*/*/*/*/.debug \
-                    ${PERLLIBDIRS}/vendor_perl/${PERLVERSION}/auto/*/*/*/*/*/.debug \
-                    "
diff --git a/yocto-poky/meta/classes/cross-canadian.bbclass b/yocto-poky/meta/classes/cross-canadian.bbclass
index ea17f09..e07b1bd 100644
--- a/yocto-poky/meta/classes/cross-canadian.bbclass
+++ b/yocto-poky/meta/classes/cross-canadian.bbclass
@@ -103,7 +103,7 @@
 HOST_AS_ARCH = "${SDK_AS_ARCH}"
 
 #assign DPKG_ARCH
-DPKG_ARCH = "${SDK_ARCH}"
+DPKG_ARCH = "${@debian_arch_map(d.getVar('SDK_ARCH', True), '')}"
 
 CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
 CFLAGS = "${BUILDSDK_CFLAGS}"
@@ -143,9 +143,6 @@
 libexecdir = "${exec_prefix}/libexec/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
 
 FILES_${PN} = "${prefix}"
-FILES_${PN}-dbg += "${prefix}/.debug \
-                    ${prefix}/bin/.debug \
-                   "
 
 export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${layout_libdir}/pkgconfig"
 export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
diff --git a/yocto-poky/meta/classes/cross.bbclass b/yocto-poky/meta/classes/cross.bbclass
index 3eab5b9..81d1c9d 100644
--- a/yocto-poky/meta/classes/cross.bbclass
+++ b/yocto-poky/meta/classes/cross.bbclass
@@ -68,10 +68,4 @@
 
 USE_NLS = "no"
 
-deltask package
-deltask packagedata
-deltask package_qa
-deltask package_write_ipk
-deltask package_write_deb
-deltask package_write_rpm
-deltask package_write
+inherit nopackages
diff --git a/yocto-poky/meta/classes/crosssdk.bbclass b/yocto-poky/meta/classes/crosssdk.bbclass
index 87d5cf5..7315c38 100644
--- a/yocto-poky/meta/classes/crosssdk.bbclass
+++ b/yocto-poky/meta/classes/crosssdk.bbclass
@@ -30,7 +30,7 @@
 do_populate_sysroot[stamp-extra-info] = ""
 do_packagedata[stamp-extra-info] = ""
 
-# Need to force this to ensure consitency accross architectures
+# Need to force this to ensure consitency across architectures
 EXTRA_OECONF_GCC_FLOAT = ""
 
 USE_NLS = "no"
diff --git a/yocto-poky/meta/classes/debian.bbclass b/yocto-poky/meta/classes/debian.bbclass
index 1b6979a..be7cacc 100644
--- a/yocto-poky/meta/classes/debian.bbclass
+++ b/yocto-poky/meta/classes/debian.bbclass
@@ -53,7 +53,7 @@
         return (s[stat.ST_MODE] & stat.S_IEXEC)
 
     def add_rprovides(pkg, d):
-        newpkg = d.getVar('PKG_' + pkg, False)
+        newpkg = d.getVar('PKG_' + pkg, True)
         if newpkg and newpkg != pkg:
             provs = (d.getVar('RPROVIDES_' + pkg, True) or "").split()
             if pkg not in provs:
diff --git a/yocto-poky/meta/classes/devshell.bbclass b/yocto-poky/meta/classes/devshell.bbclass
index 4451436..341d9c0 100644
--- a/yocto-poky/meta/classes/devshell.bbclass
+++ b/yocto-poky/meta/classes/devshell.bbclass
@@ -3,7 +3,7 @@
 DEVSHELL = "${SHELL}"
 
 python do_devshell () {
-    if d.getVarFlag("do_devshell", "manualfakeroot"):
+    if d.getVarFlag("do_devshell", "manualfakeroot", True):
        d.prependVar("DEVSHELL", "pseudo ")
        fakeenv = d.getVar("FAKEROOTENV", True).split()
        for f in fakeenv:
@@ -27,7 +27,7 @@
 # be done as the normal user. We therfore carefully construct the envionment
 # manually
 python () {
-    if d.getVarFlag("do_devshell", "fakeroot"):
+    if d.getVarFlag("do_devshell", "fakeroot", True):
        # We need to signal our code that we want fakeroot however we
        # can't manipulate the environment and variables here yet (see YOCTO #4795)
        d.setVarFlag("do_devshell", "manualfakeroot", "1")
diff --git a/yocto-poky/meta/classes/distrodata.bbclass b/yocto-poky/meta/classes/distrodata.bbclass
index 44c06e1..51bfc1e 100644
--- a/yocto-poky/meta/classes/distrodata.bbclass
+++ b/yocto-poky/meta/classes/distrodata.bbclass
@@ -104,6 +104,7 @@
             line = line + "," + i
         bb.note("%s\n" % line)
 }
+do_distrodata_np[vardepsexclude] = "DATETIME"
 
 addtask distrodata
 do_distrodata[nostamp] = "1"
@@ -196,6 +197,7 @@
             f.close()
         bb.utils.unlockfile(lf)
 }
+do_distrodata[vardepsexclude] = "DATETIME"
 
 addtask distrodataall after do_distrodata
 do_distrodataall[recrdeptask] = "do_distrodataall do_distrodata"
diff --git a/yocto-poky/meta/classes/distutils-common-base.bbclass b/yocto-poky/meta/classes/distutils-common-base.bbclass
index 427275b..08511f5 100644
--- a/yocto-poky/meta/classes/distutils-common-base.bbclass
+++ b/yocto-poky/meta/classes/distutils-common-base.bbclass
@@ -5,8 +5,6 @@
 export STAGING_INCDIR
 export STAGING_LIBDIR
 
-PACKAGES = "${PN}-staticdev ${PN}-dev ${PN}-dbg ${PN}-doc ${PN}"
-
 FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*"
 
 FILES_${PN}-staticdev += "\
@@ -17,8 +15,3 @@
   ${libdir}/pkgconfig \
   ${PYTHON_SITEPACKAGES_DIR}/*.la \
 "
-FILES_${PN}-dbg += "\
-  ${PYTHON_SITEPACKAGES_DIR}/.debug \
-  ${PYTHON_SITEPACKAGES_DIR}/*/.debug \
-  ${PYTHON_SITEPACKAGES_DIR}/*/*/.debug \
-"
diff --git a/yocto-poky/meta/classes/distutils-tools.bbclass b/yocto-poky/meta/classes/distutils-tools.bbclass
index f43450e..8d9b3f7 100644
--- a/yocto-poky/meta/classes/distutils-tools.bbclass
+++ b/yocto-poky/meta/classes/distutils-tools.bbclass
@@ -10,14 +10,14 @@
          STAGING_LIBDIR=${STAGING_LIBDIR} \
          BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
          ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
-         bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
+         bbfatal_log "${PYTHON_PN} setup.py build_ext execution failed."
 }
 
 distutils_stage_headers() {
         install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
-        bbfatal "${PYTHON_PN} setup.py install_headers execution failed."
+        bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
 }
 
 distutils_stage_all() {
@@ -27,7 +27,7 @@
         PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
-        bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
+        bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed."
 }
 
 distutils_do_install() {
@@ -39,7 +39,7 @@
         PYTHONPATH=${D}/${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
-        bbfatal "${PYTHON_PN} setup.py install execution failed."
+        bbfatal_log "${PYTHON_PN} setup.py install execution failed."
 
         echo "Step 3 of ${PN} Install ..."
         # support filenames with *spaces*
diff --git a/yocto-poky/meta/classes/distutils.bbclass b/yocto-poky/meta/classes/distutils.bbclass
index cd06713..da48a2e 100644
--- a/yocto-poky/meta/classes/distutils.bbclass
+++ b/yocto-poky/meta/classes/distutils.bbclass
@@ -12,14 +12,14 @@
          STAGING_LIBDIR=${STAGING_LIBDIR} \
          BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
          ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py build ${DISTUTILS_BUILD_ARGS} || \
-         bbfatal "${PYTHON_PN} setup.py build execution failed."
+         bbfatal_log "${PYTHON_PN} setup.py build execution failed."
 }
 
 distutils_stage_headers() {
         install -d ${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR}
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
-        bbfatal "${PYTHON_PN} setup.py install_headers execution failed."
+        bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
 }
 
 distutils_stage_all() {
@@ -29,7 +29,7 @@
         PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
-        bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
+        bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed."
 }
 
 distutils_do_install() {
@@ -39,7 +39,7 @@
         PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
-        bbfatal "${PYTHON_PN} setup.py install execution failed."
+        bbfatal_log "${PYTHON_PN} setup.py install execution failed."
 
         # support filenames with *spaces*
         # only modify file if it contains path  and recompile it
diff --git a/yocto-poky/meta/classes/distutils3-base.bbclass b/yocto-poky/meta/classes/distutils3-base.bbclass
index af3aa00..2a093d3 100644
--- a/yocto-poky/meta/classes/distutils3-base.bbclass
+++ b/yocto-poky/meta/classes/distutils3-base.bbclass
@@ -1,7 +1,7 @@
 DEPENDS  += "${@["${PYTHON_PN}-native ${PYTHON_PN}", ""][(d.getVar('PACKAGES', True) == '')]}"
 RDEPENDS_${PN} += "${@['', '${PYTHON_PN}-core']['${CLASSOVERRIDE}' == 'class-target']}"
 
-PYTHON_BASEVERSION = "3.4"
+PYTHON_BASEVERSION = "3.5"
 PYTHON_ABI = "m"
 
 inherit distutils-common-base python3native
diff --git a/yocto-poky/meta/classes/distutils3-native-base.bbclass b/yocto-poky/meta/classes/distutils3-native-base.bbclass
index 1117101..db9a1a7 100644
--- a/yocto-poky/meta/classes/distutils3-native-base.bbclass
+++ b/yocto-poky/meta/classes/distutils3-native-base.bbclass
@@ -1,4 +1,4 @@
-PYTHON_BASEVERSION = "3.4"
+PYTHON_BASEVERSION = "3.5"
 PYTHON_ABI = "m"
 
 inherit distutils-native-base
diff --git a/yocto-poky/meta/classes/distutils3.bbclass b/yocto-poky/meta/classes/distutils3.bbclass
index 443bf3a..4f6ca44 100644
--- a/yocto-poky/meta/classes/distutils3.bbclass
+++ b/yocto-poky/meta/classes/distutils3.bbclass
@@ -19,7 +19,7 @@
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py \
         build ${DISTUTILS_BUILD_ARGS} || \
-        bbfatal "${PYTHON_PN} setup.py build_ext execution failed."
+        bbfatal_log "${PYTHON_PN} setup.py build_ext execution failed."
 }
 distutils3_do_compile[vardepsexclude] = "MACHINE"
 
@@ -32,7 +32,7 @@
         fi
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install_headers ${DISTUTILS_STAGE_HEADERS_ARGS} || \
-        bbfatal "${PYTHON_PN} setup.py install_headers execution failed."
+        bbfatal_log "${PYTHON_PN} setup.py install_headers execution failed."
 }
 distutils3_stage_headers[vardepsexclude] = "MACHINE"
 
@@ -48,7 +48,7 @@
         PYTHONPATH=${STAGING_DIR_HOST}${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install ${DISTUTILS_STAGE_ALL_ARGS} || \
-        bbfatal "${PYTHON_PN} setup.py install (stage) execution failed."
+        bbfatal_log "${PYTHON_PN} setup.py install (stage) execution failed."
 }
 distutils3_stage_all[vardepsexclude] = "MACHINE"
 
@@ -64,7 +64,7 @@
         PYTHONPATH=${D}${PYTHON_SITEPACKAGES_DIR} \
         BUILD_SYS=${BUILD_SYS} HOST_SYS=${SYS} \
         ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py install --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${DISTUTILS_INSTALL_ARGS} || \
-        bbfatal "${PYTHON_PN} setup.py install execution failed."
+        bbfatal_log "${PYTHON_PN} setup.py install execution failed."
 
         # support filenames with *spaces*
         find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e s:${D}::g {} \;
diff --git a/yocto-poky/meta/classes/externalsrc.bbclass b/yocto-poky/meta/classes/externalsrc.bbclass
index f7ed66d..da7eb47 100644
--- a/yocto-poky/meta/classes/externalsrc.bbclass
+++ b/yocto-poky/meta/classes/externalsrc.bbclass
@@ -25,6 +25,7 @@
 #
 
 SRCTREECOVEREDTASKS ?= "do_patch do_unpack do_fetch"
+EXTERNALSRC_SYMLINKS ?= "oe-workdir:${WORKDIR} oe-logs:${T}"
 
 python () {
     externalsrc = d.getVar('EXTERNALSRC', True)
@@ -51,7 +52,7 @@
             # Dummy value because the default function can't be called with blank SRC_URI
             d.setVar('SRCPV', '999')
 
-        tasks = filter(lambda k: d.getVarFlag(k, "task"), d.keys())
+        tasks = filter(lambda k: d.getVarFlag(k, "task", True), d.keys())
 
         for task in tasks:
             if task.endswith("_setscene"):
@@ -82,12 +83,72 @@
             bb.build.deltask(task, d)
 
         d.prependVarFlag('do_compile', 'prefuncs', "externalsrc_compile_prefunc ")
+        d.prependVarFlag('do_configure', 'prefuncs', "externalsrc_configure_prefunc ")
 
-        # Ensure compilation happens every time
-        d.setVarFlag('do_compile', 'nostamp', '1')
+        # Force the recipe to be always re-parsed so that the file_checksums
+        # function is run every time
+        d.setVar('BB_DONT_CACHE', '1')
+        d.setVarFlag('do_compile', 'file-checksums', '${@srctree_hash_files(d)}')
+
+        # We don't want the workdir to go away
+        d.appendVar('RM_WORK_EXCLUDE', ' ' + d.getVar('PN', True))
+
+        # If B=S the same builddir is used even for different architectures.
+        # Thus, use a shared CONFIGURESTAMPFILE and STAMP directory so that
+        # change of do_configure task hash is correctly detected and stamps are
+        # invalidated if e.g. MACHINE changes.
+        if d.getVar('S', True) == d.getVar('B', True):
+            configstamp = '${TMPDIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}/configure.sstate'
+            d.setVar('CONFIGURESTAMPFILE', configstamp)
+            d.setVar('STAMP', '${STAMPS_DIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}')
+}
+
+python externalsrc_configure_prefunc() {
+    # Create desired symlinks
+    symlinks = (d.getVar('EXTERNALSRC_SYMLINKS', True) or '').split()
+    for symlink in symlinks:
+        symsplit = symlink.split(':', 1)
+        lnkfile = os.path.join(d.getVar('S', True), symsplit[0])
+        target = d.expand(symsplit[1])
+        if len(symsplit) > 1:
+            if os.path.islink(lnkfile):
+                # Link already exists, leave it if it points to the right location already
+                if os.readlink(lnkfile) == target:
+                    continue
+                os.unlink(lnkfile)
+            elif os.path.exists(lnkfile):
+                # File/dir exists with same name as link, just leave it alone
+                continue
+            os.symlink(target, lnkfile)
 }
 
 python externalsrc_compile_prefunc() {
     # Make it obvious that this is happening, since forgetting about it could lead to much confusion
     bb.plain('NOTE: %s: compiling from external source tree %s' % (d.getVar('PN', True), d.getVar('EXTERNALSRC', True)))
 }
+
+def srctree_hash_files(d):
+    import shutil
+    import subprocess
+    import tempfile
+
+    s_dir = d.getVar('EXTERNALSRC', True)
+    git_dir = os.path.join(s_dir, '.git')
+    oe_hash_file = os.path.join(git_dir, 'oe-devtool-tree-sha1')
+
+    ret = " "
+    if os.path.exists(git_dir):
+        with tempfile.NamedTemporaryFile(dir=git_dir, prefix='oe-devtool-index') as tmp_index:
+            # Clone index
+            shutil.copy2(os.path.join(git_dir, 'index'), tmp_index.name)
+            # Update our custom index
+            env = os.environ.copy()
+            env['GIT_INDEX_FILE'] = tmp_index.name
+            subprocess.check_output(['git', 'add', '.'], cwd=s_dir, env=env)
+            sha1 = subprocess.check_output(['git', 'write-tree'], cwd=s_dir, env=env)
+        with open(oe_hash_file, 'w') as fobj:
+            fobj.write(sha1)
+        ret = oe_hash_file + ':True'
+    else:
+        ret = d.getVar('EXTERNALSRC', True) + '/*:True'
+    return ret
diff --git a/yocto-poky/meta/classes/extrausers.bbclass b/yocto-poky/meta/classes/extrausers.bbclass
index faf57b1..43900f3 100644
--- a/yocto-poky/meta/classes/extrausers.bbclass
+++ b/yocto-poky/meta/classes/extrausers.bbclass
@@ -33,22 +33,22 @@
 		# this setting is actually a serial process. So we only retry once.
 		case $cmd in
 			useradd)
-				perform_useradd "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" 1
+				perform_useradd "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts"
 				;;
 			groupadd)
-				perform_groupadd "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" 1
+				perform_groupadd "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts"
 				;;
 			userdel)
-				perform_userdel "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" 1
+				perform_userdel "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts"
 				;;
 			groupdel)
-				perform_groupdel "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" 1
+				perform_groupdel "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts"
 				;;
 			usermod)
-				perform_usermod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" 1
+				perform_usermod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts"
 				;;
 			groupmod)
-				perform_groupmod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" 1
+				perform_groupmod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts"
 				;;
 			*)
 				bbfatal "Invalid command in EXTRA_USERS_PARAMS: $cmd"
diff --git a/yocto-poky/meta/classes/gio-module-cache.bbclass b/yocto-poky/meta/classes/gio-module-cache.bbclass
new file mode 100644
index 0000000..91461b1
--- /dev/null
+++ b/yocto-poky/meta/classes/gio-module-cache.bbclass
@@ -0,0 +1,37 @@
+DEPENDS += "qemu-native"
+inherit qemu
+
+GIO_MODULE_PACKAGES ??= "${PN}"
+
+gio_module_cache_common() {
+if [ "x$D" != "x" ]; then
+    $INTERCEPT_DIR/postinst_intercept update_gio_module_cache ${PKG} \
+            mlprefix=${MLPREFIX} \
+            binprefix=${MLPREFIX} \
+            libdir=${libdir} \
+            base_libdir=${base_libdir} \
+            bindir=${bindir}
+else
+    ${libexecdir}/${MLPREFIX}gio-querymodules ${libdir}/gio/modules/
+fi
+}
+
+python populate_packages_append () {
+    packages = d.getVar('GIO_MODULE_PACKAGES', True).split()
+
+    for pkg in packages:
+        bb.note("adding gio-module-cache postinst and postrm scripts to %s" % pkg)
+
+        postinst = d.getVar('pkg_postinst_%s' % pkg, True)
+        if not postinst:
+            postinst = '#!/bin/sh\n'
+        postinst += d.getVar('gio_module_cache_common', True)
+        d.setVar('pkg_postinst_%s' % pkg, postinst)
+
+        postrm = d.getVar('pkg_postrm_%s' % pkg, True)
+        if not postrm:
+            postrm = '#!/bin/sh\n'
+        postrm += d.getVar('gio_module_cache_common', True)
+        d.setVar('pkg_postrm_%s' % pkg, postrm)
+}
+
diff --git a/yocto-poky/meta/classes/gnomebase.bbclass b/yocto-poky/meta/classes/gnomebase.bbclass
index d22ba5a..e5c6776 100644
--- a/yocto-poky/meta/classes/gnomebase.bbclass
+++ b/yocto-poky/meta/classes/gnomebase.bbclass
@@ -28,6 +28,3 @@
 	rm -f ${D}${datadir}/applications/*.cache
 }
 
-EXTRA_OECONF += "--disable-introspection"
-
-UNKNOWN_CONFIGURE_WHITELIST += "--disable-introspection"
diff --git a/yocto-poky/meta/classes/gobject-introspection-data.bbclass b/yocto-poky/meta/classes/gobject-introspection-data.bbclass
new file mode 100644
index 0000000..b1bdd26
--- /dev/null
+++ b/yocto-poky/meta/classes/gobject-introspection-data.bbclass
@@ -0,0 +1,9 @@
+# This variable is set to True if gobject-introspection-data is in
+# DISTRO_FEATURES and qemu-usermode is in MACHINE_FEATURES, and False otherwise.
+#
+# It should be used in recipes to determine whether introspection data should be built,
+# so that qemu use can be avoided when necessary.
+GI_DATA_ENABLED = "${@bb.utils.contains('DISTRO_FEATURES', 'gobject-introspection-data', \
+                      bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}"
+
+
diff --git a/yocto-poky/meta/classes/gobject-introspection.bbclass b/yocto-poky/meta/classes/gobject-introspection.bbclass
new file mode 100644
index 0000000..2d73e40
--- /dev/null
+++ b/yocto-poky/meta/classes/gobject-introspection.bbclass
@@ -0,0 +1,37 @@
+# Inherit this class in recipes to enable building their introspection files
+
+# This sets up autoconf-based recipes to build introspection data (or not),
+# depending on distro and machine features (see gobject-introspection-data class).
+inherit gobject-introspection-data
+EXTRA_OECONF_prepend = "${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection', '--disable-introspection', d)} "
+
+UNKNOWN_CONFIGURE_WHITELIST_append = " --enable-introspection --disable-introspection"
+
+# Generating introspection data depends on a combination of native and target
+# introspection tools, and qemu to run the target tools.
+DEPENDS_append = " gobject-introspection gobject-introspection-native qemu-native"
+
+# This is necessary for python scripts to succeed - distutils fails if these
+# are not set
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+# This is used by introspection tools to find .gir includes
+export XDG_DATA_DIRS = "${STAGING_DATADIR}"
+
+do_configure_prepend_class-target () {
+    # introspection.m4 pre-packaged with upstream tarballs does not yet
+    # have our fixes
+    mkdir -p ${S}/m4
+    cp ${STAGING_DIR_TARGET}/${datadir}/aclocal/introspection.m4 ${S}/m4
+}
+
+# .typelib files are needed at runtime and so they go to the main package (so
+# they'll be together with libraries they support).
+FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib" 
+    
+# .gir files go to dev package, as they're needed for developing (but not for
+# running) things that depends on introspection.
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
diff --git a/yocto-poky/meta/classes/grub-efi.bbclass b/yocto-poky/meta/classes/grub-efi.bbclass
index 9a4220a..4ce3d28 100644
--- a/yocto-poky/meta/classes/grub-efi.bbclass
+++ b/yocto-poky/meta/classes/grub-efi.bbclass
@@ -14,17 +14,21 @@
 # ${APPEND} - an override list of append strings for each label
 # ${GRUB_OPTS} - additional options to add to the config, ';' delimited # (optional)
 # ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
+# ${GRUB_ROOT} - grub's root device.
 
 do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
 do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy"
 
 GRUB_SERIAL ?= "console=ttyS0,115200"
-GRUBCFG = "${S}/grub.cfg"
+GRUB_CFG_VM = "${S}/grub_vm.cfg"
+GRUB_CFG_LIVE = "${S}/grub_live.cfg"
 GRUB_TIMEOUT ?= "10"
 #FIXME: build this from the machine config
 GRUB_OPTS ?= "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
 
 EFIDIR = "/EFI/BOOT"
+GRUB_ROOT ?= "${ROOT}"
+APPEND ?= ""
 
 # Need UUID utility code.
 inherit fs-uuid
@@ -42,7 +46,7 @@
 	fi
 	install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
 
-	install -m 0644 ${GRUBCFG} ${DEST}${EFIDIR}/grub.cfg
+	install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg
 }
 
 efi_iso_populate() {
@@ -82,9 +86,9 @@
         bb.debug(1, "No labels, nothing to do")
         return
 
-    cfile = d.getVar('GRUBCFG', True)
+    cfile = d.getVar('GRUB_CFG', True)
     if not cfile:
-        raise bb.build.FuncFailed('Unable to read GRUBCFG')
+        raise bb.build.FuncFailed('Unable to read GRUB_CFG')
 
     try:
          cfgfile = file(cfile, 'w')
@@ -106,6 +110,10 @@
     else:
         cfgfile.write('timeout=50\n')
 
+    root = d.getVar('GRUB_ROOT', True)
+    if not root:
+        raise bb.build.FuncFailed('GRUB_ROOT not defined')
+
     if gfxserial == "1":
         btypes = [ [ " graphics console", "" ],
             [ " serial console", d.getVar('GRUB_SERIAL', True) or "" ] ]
@@ -129,6 +137,8 @@
                 lb = "install-efi"
             cfgfile.write('linux /vmlinuz LABEL=%s' % (lb))
 
+            cfgfile.write(' %s' % replace_rootfs_uuid(d, root))
+
             append = localdata.getVar('APPEND', True)
             initrd = localdata.getVar('INITRD', True)
 
diff --git a/yocto-poky/meta/classes/gtk-immodules-cache.bbclass b/yocto-poky/meta/classes/gtk-immodules-cache.bbclass
index 0a6316d..c099cd3 100644
--- a/yocto-poky/meta/classes/gtk-immodules-cache.bbclass
+++ b/yocto-poky/meta/classes/gtk-immodules-cache.bbclass
@@ -10,47 +10,51 @@
 
 gtk_immodule_cache_postinst() {
 if [ "x$D" != "x" ]; then
-    for maj_ver in 2 3; do
-        if [ -x $D${bindir}/gtk-query-immodules-$maj_ver.0 ]; then
-            IMFILES=$(ls $D${libdir}/gtk-$maj_ver.0/*/immodules/*.so)
-            ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \
-                $IMFILES > $D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null &&
-                sed -i -e "s:$D::" $D/etc/gtk-$maj_ver.0/gtk.immodules
-
-            [ $? -ne 0 ] && exit 1
+        if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then
+            IMFILES=$(ls $D${libdir}/gtk-2.0/*/immodules/*.so)
+            ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \
+                $IMFILES > $D${libdir}/gtk-2.0/2.10.0/immodules.cache 2>/dev/null &&
+                sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
+        elif [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
+            IMFILES=$(ls $D${libdir}/gtk-3.0/*/immodules/*.so)
+            ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-3.0')} \
+                $IMFILES > $D${libdir}/gtk-3.0/3.0.0/immodules.cache 2>/dev/null &&
+                sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache
         fi
-    done
 
+    [ $? -ne 0 ] && exit 1
     exit 0
 fi
 if [ ! -z `which gtk-query-immodules-2.0` ]; then
-    gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
+    gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache
 fi
 if [ ! -z `which gtk-query-immodules-3.0` ]; then
-    gtk-query-immodules-3.0 > /etc/gtk-3.0/gtk.immodules
+    gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache
 fi
 }
 
 gtk_immodule_cache_postrm() {
 if [ "x$D" != "x" ]; then
-    for maj_ver in 2 3; do
-        if [ -x $D${bindir}/gtk-query-immodules-$maj_ver.0 ]; then
-            IMFILES=$(ls $D${libdir}/gtk-$maj_ver.0/*/immodules/*.so)
-            ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-$maj_ver.0')} \
-                $IMFILES > $D/etc/gtk-$maj_ver.0/gtk.immodules 2>/dev/null &&
-                sed -i -e "s:$D::" $D/etc/gtk-$maj_ver.0/gtk.immodules
-
-            [ $? -ne 0 ] && exit 1
+        if [ -x $D${bindir}/gtk-query-immodules-2.0 ]; then
+            IMFILES=$(ls $D${libdir}/gtk-2.0/*/immodules/*.so)
+            ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-2.0')} \
+                $IMFILES > $D${libdir}/gtk-2.0/2.10.0/immodules.cache 2>/dev/null &&
+                sed -i -e "s:$D::" $D${libdir}/gtk-2.0/2.10.0/immodules.cache
+        elif [ -x $D${bindir}/gtk-query-immodules-3.0 ]; then
+            IMFILES=$(ls $D${libdir}/gtk-3.0/*/immodules/*.so)
+            ${@qemu_run_binary(d, '$D', '${bindir}/gtk-query-immodules-3.0')} \
+                $IMFILES > $D${libdir}/gtk-3.0/3.0.0/immodules.cache 2>/dev/null &&
+                sed -i -e "s:$D::" $D${libdir}/gtk-3.0/3.0.0/immodules.cache
         fi
-    done
 
+    [ $? -ne 0 ] && exit 1
     exit 0
 fi
 if [ ! -z `which gtk-query-immodules-2.0` ]; then
-    gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules
+    gtk-query-immodules-2.0 > ${libdir}/gtk-2.0/2.10.0/immodules.cache
 fi
 if [ ! -z `which gtk-query-immodules-3.0` ]; then
-    gtk-query-immodules-3.0 > /etc/gtk-3.0/gtk.immodules
+    gtk-query-immodules-3.0 > ${libdir}/gtk-3.0/3.0.0/immodules.cache
 fi
 }
 
diff --git a/yocto-poky/meta/classes/gummiboot.bbclass b/yocto-poky/meta/classes/gummiboot.bbclass
index 9a97ac1..1ebb946 100644
--- a/yocto-poky/meta/classes/gummiboot.bbclass
+++ b/yocto-poky/meta/classes/gummiboot.bbclass
@@ -4,7 +4,7 @@
 
 # gummiboot.bbclass - equivalent of grub-efi.bbclass
 # Set EFI_PROVIDER = "gummiboot" to use gummiboot on your live images instead of grub-efi
-# (images built by bootimage.bbclass or boot-directdisk.bbclass)
+# (images built by image-live.bbclass or image-vm.bbclass)
 
 do_bootimg[depends] += "${MLPREFIX}gummiboot:do_deploy"
 do_bootdirectdisk[depends] += "${MLPREFIX}gummiboot:do_deploy"
diff --git a/yocto-poky/meta/classes/icecc.bbclass b/yocto-poky/meta/classes/icecc.bbclass
index 61b8bb1..e1c06c4 100644
--- a/yocto-poky/meta/classes/icecc.bbclass
+++ b/yocto-poky/meta/classes/icecc.bbclass
@@ -63,7 +63,7 @@
     Create Symlinks for the icecc in the staging directory
     """
     staging = os.path.join(d.expand('${STAGING_BINDIR}'), "ice")
-    if icc_is_kernel(bb, d):
+    if icecc_is_kernel(bb, d):
         staging += "-kernel"
 
     #check if the icecc path is set by the user
@@ -90,13 +90,13 @@
 
     return staging
 
-def use_icc(bb,d):
+def use_icecc(bb,d):
     if d.getVar('ICECC_DISABLED', False) == "1":
         # don't even try it, when explicitly disabled
         return "no"
 
     # allarch recipes don't use compiler
-    if icc_is_allarch(bb, d):
+    if icecc_is_allarch(bb, d):
         return "no"
 
     pn = d.getVar('PN', True)
@@ -137,29 +137,29 @@
 
     return "yes"
 
-def icc_is_allarch(bb, d):
-    return d.getVar("PACKAGE_ARCH", False) == "all"
+def icecc_is_allarch(bb, d):
+    return d.getVar("PACKAGE_ARCH", True) == "all" or bb.data.inherits_class('allarch', d)
 
-def icc_is_kernel(bb, d):
+def icecc_is_kernel(bb, d):
     return \
         bb.data.inherits_class("kernel", d);
 
-def icc_is_native(bb, d):
+def icecc_is_native(bb, d):
     return \
         bb.data.inherits_class("cross", d) or \
         bb.data.inherits_class("native", d);
 
 # Don't pollute allarch signatures with TARGET_FPU
-icc_version[vardepsexclude] += "TARGET_FPU"
-def icc_version(bb, d):
-    if use_icc(bb, d) == "no":
+icecc_version[vardepsexclude] += "TARGET_FPU"
+def icecc_version(bb, d):
+    if use_icecc(bb, d) == "no":
         return ""
 
     parallel = d.getVar('ICECC_PARALLEL_MAKE', False) or ""
     if not d.getVar('PARALLEL_MAKE', False) == "" and parallel:
         d.setVar("PARALLEL_MAKE", parallel)
 
-    if icc_is_native(bb, d):
+    if icecc_is_native(bb, d):
         archive_name = "local-host-env"
     elif d.expand('${HOST_PREFIX}') == "":
         bb.fatal(d.expand("${PN}"), " NULL prefix")
@@ -169,7 +169,7 @@
         target_sys = d.expand('${TARGET_SYS}')
         float = d.getVar('TARGET_FPU', False) or "hard"
         archive_name = prefix + distro + "-"        + target_sys + "-" + float
-        if icc_is_kernel(bb, d):
+        if icecc_is_kernel(bb, d):
             archive_name += "-kernel"
 
     import socket
@@ -178,29 +178,29 @@
 
     return tar_file
 
-def icc_path(bb,d):
-    if use_icc(bb, d) == "no":
+def icecc_path(bb,d):
+    if use_icecc(bb, d) == "no":
         # don't create unnecessary directories when icecc is disabled
         return
 
-    if icc_is_kernel(bb, d):
+    if icecc_is_kernel(bb, d):
         return create_path( [get_cross_kernel_cc(bb,d), ], bb, d)
 
     else:
         prefix = d.expand('${HOST_PREFIX}')
         return create_path( [prefix+"gcc", prefix+"g++"], bb, d)
 
-def icc_get_external_tool(bb, d, tool):
+def icecc_get_external_tool(bb, d, tool):
     external_toolchain_bindir = d.expand('${EXTERNAL_TOOLCHAIN}${bindir_cross}')
     target_prefix = d.expand('${TARGET_PREFIX}')
     return os.path.join(external_toolchain_bindir, '%s%s' % (target_prefix, tool))
 
 # Don't pollute native signatures with target TUNE_PKGARCH through STAGING_BINDIR_TOOLCHAIN
-icc_get_tool[vardepsexclude] += "STAGING_BINDIR_TOOLCHAIN"
-def icc_get_tool(bb, d, tool):
-    if icc_is_native(bb, d):
+icecc_get_tool[vardepsexclude] += "STAGING_BINDIR_TOOLCHAIN"
+def icecc_get_tool(bb, d, tool):
+    if icecc_is_native(bb, d):
         return bb.utils.which(os.getenv("PATH"), tool)
-    elif icc_is_kernel(bb, d):
+    elif icecc_is_kernel(bb, d):
         return bb.utils.which(os.getenv("PATH"), get_cross_kernel_cc(bb, d))
     else:
         ice_dir = d.expand('${STAGING_BINDIR_TOOLCHAIN}')
@@ -209,17 +209,17 @@
         if os.path.isfile(tool_bin):
             return tool_bin
         else:
-            external_tool_bin = icc_get_external_tool(bb, d, tool)
+            external_tool_bin = icecc_get_external_tool(bb, d, tool)
             if os.path.isfile(external_tool_bin):
                 return external_tool_bin
             else:
                 return ""
 
-def icc_get_and_check_tool(bb, d, tool):
+def icecc_get_and_check_tool(bb, d, tool):
     # Check that g++ or gcc is not a symbolic link to icecc binary in
     # PATH or icecc-create-env script will silently create an invalid
     # compiler environment package.
-    t = icc_get_tool(bb, d, tool)
+    t = icecc_get_tool(bb, d, tool)
     if t and os.popen("readlink -f %s" % t).read()[:-1] == get_icecc(d):
         bb.error("%s is a symlink to %s in PATH and this prevents icecc from working" % (t, get_icecc(d)))
         return ""
@@ -246,27 +246,27 @@
     return
 
 set_icecc_env() {
-    if [ "${@use_icc(bb, d)}" = "no" ]
+    if [ "${@use_icecc(bb, d)}" = "no" ]
     then
         return
     fi
-    ICECC_VERSION="${@icc_version(bb, d)}"
+    ICECC_VERSION="${@icecc_version(bb, d)}"
     if [ "x${ICECC_VERSION}" = "x" ]
     then
         bbwarn "Cannot use icecc: could not get ICECC_VERSION"
         return
     fi
 
-    ICE_PATH="${@icc_path(bb, d)}"
+    ICE_PATH="${@icecc_path(bb, d)}"
     if [ "x${ICE_PATH}" = "x" ]
     then
         bbwarn "Cannot use icecc: could not get ICE_PATH"
         return
     fi
 
-    ICECC_CC="${@icc_get_and_check_tool(bb, d, "gcc")}"
-    ICECC_CXX="${@icc_get_and_check_tool(bb, d, "g++")}"
-    # cannot use icc_get_and_check_tool here because it assumes as without target_sys prefix
+    ICECC_CC="${@icecc_get_and_check_tool(bb, d, "gcc")}"
+    ICECC_CXX="${@icecc_get_and_check_tool(bb, d, "g++")}"
+    # cannot use icecc_get_and_check_tool here because it assumes as without target_sys prefix
     ICECC_WHICH_AS="${@bb.utils.which(os.getenv('PATH'), 'as')}"
     if [ ! -x "${ICECC_CC}" -o ! -x "${ICECC_CXX}" ]
     then
diff --git a/yocto-poky/meta/classes/image-buildinfo.bbclass b/yocto-poky/meta/classes/image-buildinfo.bbclass
index aa17cc8..197b242 100644
--- a/yocto-poky/meta/classes/image-buildinfo.bbclass
+++ b/yocto-poky/meta/classes/image-buildinfo.bbclass
@@ -19,19 +19,24 @@
     ret = ""
     for var in vars:
         value = d.getVar(var, True) or ""
-        if (d.getVarFlag(var, 'type') == "list"):
+        if (d.getVarFlag(var, 'type', True) == "list"):
             value = oe.utils.squashspaces(value)
         ret += "%s = %s\n" % (var, value)
     return ret.rstrip('\n')
 
 # Gets git branch's status (clean or dirty)
 def get_layer_git_status(path):
-    f = os.popen("cd %s; git diff --stat 2>&1 | tail -n 1" % path)
-    data = f.read()
-    if f.close() is None:
-        if len(data) != 0:
-            return "-- modified"
-    return ""
+    import subprocess
+    try:
+        subprocess.check_output("cd %s; PSEUDO_UNLOAD=1 git diff --quiet --no-ext-diff" % path,
+                                shell=True,
+                                stderr=subprocess.STDOUT)
+        return ""
+    except subprocess.CalledProcessError, ex:
+        # Silently treat errors as "modified", without checking for the
+        # (expected) return code 1 in a modified git repo. For example, we get
+        # output and a 129 return code when a layer isn't a git repo at all.
+        return "-- modified"
 
 # Returns layer revisions along with their respective status
 def get_layer_revs(d):
@@ -53,17 +58,21 @@
         return image_buildinfo_outputvars(vars, listvars, d)
 
 # Write build information to target filesystem
-buildinfo () {
-cat > ${IMAGE_ROOTFS}${sysconfdir}/build << END
------------------------
+python buildinfo () {
+    with open(d.expand('${IMAGE_ROOTFS}${sysconfdir}/build'), 'w') as build:
+        build.writelines((
+            '''-----------------------
 Build Configuration:  |
 -----------------------
-${@buildinfo_target(d)}
+''',
+            buildinfo_target(d),
+            '''
 -----------------------
-Layer Revisions:      |   
+Layer Revisions:      |
 -----------------------
-${@get_layer_revs(d)}
-END
+''',
+            get_layer_revs(d)
+       ))
 }
 
 IMAGE_PREPROCESS_COMMAND += "buildinfo;"
diff --git a/yocto-poky/meta/classes/image-live.bbclass b/yocto-poky/meta/classes/image-live.bbclass
index 23e4a5c..c8a8610 100644
--- a/yocto-poky/meta/classes/image-live.bbclass
+++ b/yocto-poky/meta/classes/image-live.bbclass
@@ -1,18 +1,284 @@
+# Copyright (C) 2004, Advanced Micro Devices, Inc.  All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
 
-AUTO_SYSLINUXCFG = "1"
-INITRD_IMAGE ?= "core-image-minimal-initramfs"
-INITRD ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz"
-SYSLINUX_ROOT ?= "root=/dev/ram0"
-SYSLINUX_TIMEOUT ?= "50"
-SYSLINUX_LABELS ?= "boot install"
-LABELS_append = " ${SYSLINUX_LABELS} "
+# Creates a bootable image using syslinux, your kernel and an optional
+# initrd
 
-ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext4"
+#
+# End result is two things:
+#
+# 1. A .hddimg file which is an msdos filesystem containing syslinux, a kernel,
+# an initrd and a rootfs image. These can be written to harddisks directly and
+# also booted on USB flash disks (write them there with dd).
+#
+# 2. A CD .iso image
 
-do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs"
-do_bootimg[depends] += "${PN}:do_rootfs"
+# Boot process is that the initrd will boot and process which label was selected
+# in syslinux. Actions based on the label are then performed (e.g. installing to
+# an hdd)
 
-inherit bootimg
+# External variables (also used by syslinux.bbclass)
+# ${INITRD} - indicates a list of filesystem images to concatenate and use as an initrd (optional)
+# ${COMPRESSISO} - Transparent compress ISO, reduce size ~40% if set to 1
+# ${NOISO}  - skip building the ISO image if set to 1
+# ${NOHDD}  - skip building the HDD image if set to 1
+# ${HDDIMG_ID} - FAT image volume-id
+# ${ROOTFS} - indicates a filesystem image to include as the root filesystem (optional)
+
+inherit live-vm-common
+
+do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
+                        mtools-native:do_populate_sysroot \
+                        cdrtools-native:do_populate_sysroot \
+                        virtual/kernel:do_deploy \
+                        ${MLPREFIX}syslinux:do_populate_sysroot \
+                        syslinux-native:do_populate_sysroot \
+                        ${@oe.utils.ifelse(d.getVar('COMPRESSISO', False),'zisofs-tools-native:do_populate_sysroot','')} \
+                        ${PN}:do_image_ext4 \
+                        "
+
+
+LABELS_LIVE ?= "boot install"
+ROOT_LIVE ?= "root=/dev/ram0"
+INITRD_IMAGE_LIVE ?= "core-image-minimal-initramfs"
+INITRD_LIVE ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_LIVE}-${MACHINE}.cpio.gz"
+
+ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
 
 IMAGE_TYPEDEP_live = "ext4"
-IMAGE_TYPES_MASKED += "live"
+IMAGE_TYPEDEP_iso = "ext4"
+IMAGE_TYPEDEP_hddimg = "ext4"
+IMAGE_TYPES_MASKED += "live hddimg iso"
+
+python() {
+    image_b = d.getVar('IMAGE_BASENAME', True)
+    initrd_i = d.getVar('INITRD_IMAGE_LIVE', True)
+    if image_b == initrd_i:
+        bb.error('INITRD_IMAGE_LIVE %s cannot use image live, hddimg or iso.' % initrd_i)
+        bb.fatal('Check IMAGE_FSTYPES and INITRAMFS_FSTYPES settings.')
+    else:
+        d.appendVarFlag('do_bootimg', 'depends', ' %s:do_image_complete' % initrd_i)
+}
+
+HDDDIR = "${S}/hddimg"
+ISODIR = "${S}/iso"
+EFIIMGDIR = "${S}/efi_img"
+COMPACT_ISODIR = "${S}/iso.z"
+COMPRESSISO ?= "0"
+
+ISOLINUXDIR ?= "/isolinux"
+ISO_BOOTIMG = "isolinux/isolinux.bin"
+ISO_BOOTCAT = "isolinux/boot.cat"
+MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table"
+
+BOOTIMG_VOLUME_ID   ?= "boot"
+BOOTIMG_EXTRA_SPACE ?= "512"
+
+populate_live() {
+    populate_kernel $1
+	if [ -s "${ROOTFS}" ]; then
+		install -m 0644 ${ROOTFS} $1/rootfs.img
+	fi
+}
+
+build_iso() {
+	# Only create an ISO if we have an INITRD and NOISO was not set
+	if [ -z "${INITRD}" ] || [ "${NOISO}" = "1" ]; then
+		bbnote "ISO image will not be created."
+		return
+	fi
+	# ${INITRD} is a list of multiple filesystem images
+	for fs in ${INITRD}
+	do
+		if [ ! -s "$fs" ]; then
+			bbnote "ISO image will not be created. $fs is invalid."
+			return
+		fi
+	done
+
+	populate_live ${ISODIR}
+
+	if [ "${PCBIOS}" = "1" ]; then
+		syslinux_iso_populate ${ISODIR}
+	fi
+	if [ "${EFI}" = "1" ]; then
+		efi_iso_populate ${ISODIR}
+		build_fat_img ${EFIIMGDIR} ${ISODIR}/efi.img
+	fi
+
+	# EFI only
+	if [ "${PCBIOS}" != "1" ] && [ "${EFI}" = "1" ] ; then
+		# Work around bug in isohybrid where it requires isolinux.bin
+		# In the boot catalog, even though it is not used
+		mkdir -p ${ISODIR}/${ISOLINUXDIR}
+		install -m 0644 ${STAGING_DATADIR}/syslinux/isolinux.bin ${ISODIR}${ISOLINUXDIR}
+	fi
+
+	if [ "${COMPRESSISO}" = "1" ] ; then
+		# create compact directory, compress iso
+		mkdir -p ${COMPACT_ISODIR}
+		mkzftree -z 9 -p 4 -F ${ISODIR}/rootfs.img ${COMPACT_ISODIR}/rootfs.img
+
+		# move compact iso to iso, then remove compact directory
+		mv ${COMPACT_ISODIR}/rootfs.img ${ISODIR}/rootfs.img
+		rm -Rf ${COMPACT_ISODIR}
+		mkisofs_compress_opts="-R -z -D -l"
+	else
+		mkisofs_compress_opts="-r"
+	fi
+
+	# Check the size of ${ISODIR}/rootfs.img, use mkisofs -iso-level 3
+	# when it exceeds 3.8GB, the specification is 4G - 1 bytes, we need
+	# leave a few space for other files.
+	mkisofs_iso_level=""
+
+        if [ -n "${ROOTFS}" ] && [ -s "${ROOTFS}" ]; then
+		rootfs_img_size=`stat -c '%s' ${ISODIR}/rootfs.img`
+		# 4080218931 = 3.8 * 1024 * 1024 * 1024
+		if [ $rootfs_img_size -gt 4080218931 ]; then
+			bbnote "${ISODIR}/rootfs.img execeeds 3.8GB, using '-iso-level 3' for mkisofs"
+			mkisofs_iso_level="-iso-level 3"
+		fi
+	fi
+
+	if [ "${PCBIOS}" = "1" ] && [ "${EFI}" != "1" ] ; then
+		# PCBIOS only media
+		mkisofs -V ${BOOTIMG_VOLUME_ID} \
+		        -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
+			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
+			$mkisofs_compress_opts \
+			${MKISOFS_OPTIONS} $mkisofs_iso_level ${ISODIR}
+	else
+		# EFI only OR EFI+PCBIOS
+		mkisofs -A ${BOOTIMG_VOLUME_ID} -V ${BOOTIMG_VOLUME_ID} \
+		        -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \
+			-b ${ISO_BOOTIMG} -c ${ISO_BOOTCAT} \
+			$mkisofs_compress_opts ${MKISOFS_OPTIONS} $mkisofs_iso_level \
+			-eltorito-alt-boot -eltorito-platform efi \
+			-b efi.img -no-emul-boot \
+			${ISODIR}
+		isohybrid_args="-u"
+	fi
+
+	isohybrid $isohybrid_args ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso
+}
+
+build_fat_img() {
+	FATSOURCEDIR=$1
+	FATIMG=$2
+
+	# Calculate the size required for the final image including the
+	# data and filesystem overhead.
+	# Sectors: 512 bytes
+	#  Blocks: 1024 bytes
+
+	# Determine the sector count just for the data
+	SECTORS=$(expr $(du --apparent-size -ks ${FATSOURCEDIR} | cut -f 1) \* 2)
+
+	# Account for the filesystem overhead. This includes directory
+	# entries in the clusters as well as the FAT itself.
+	# Assumptions:
+	#   FAT32 (12 or 16 may be selected by mkdosfs, but the extra
+	#   padding will be minimal on those smaller images and not
+	#   worth the logic here to caclulate the smaller FAT sizes)
+	#   < 16 entries per directory
+	#   8.3 filenames only
+
+	# 32 bytes per dir entry
+	DIR_BYTES=$(expr $(find ${FATSOURCEDIR} | tail -n +2 | wc -l) \* 32)
+	# 32 bytes for every end-of-directory dir entry
+	DIR_BYTES=$(expr $DIR_BYTES + $(expr $(find ${FATSOURCEDIR} -type d | tail -n +2 | wc -l) \* 32))
+	# 4 bytes per FAT entry per sector of data
+	FAT_BYTES=$(expr $SECTORS \* 4)
+	# 4 bytes per FAT entry per end-of-cluster list
+	FAT_BYTES=$(expr $FAT_BYTES + $(expr $(find ${FATSOURCEDIR} -type d | tail -n +2 | wc -l) \* 4))
+
+	# Use a ceiling function to determine FS overhead in sectors
+	DIR_SECTORS=$(expr $(expr $DIR_BYTES + 511) / 512)
+	# There are two FATs on the image
+	FAT_SECTORS=$(expr $(expr $(expr $FAT_BYTES + 511) / 512) \* 2)
+	SECTORS=$(expr $SECTORS + $(expr $DIR_SECTORS + $FAT_SECTORS))
+
+	# Determine the final size in blocks accounting for some padding
+	BLOCKS=$(expr $(expr $SECTORS / 2) + ${BOOTIMG_EXTRA_SPACE})
+
+	# Ensure total sectors is an integral number of sectors per
+	# track or mcopy will complain. Sectors are 512 bytes, and we
+	# generate images with 32 sectors per track. This calculation is
+	# done in blocks, thus the mod by 16 instead of 32.
+	BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
+
+	# mkdosfs will sometimes use FAT16 when it is not appropriate,
+	# resulting in a boot failure from SYSLINUX. Use FAT32 for
+	# images larger than 512MB, otherwise let mkdosfs decide.
+	if [ $(expr $BLOCKS / 1024) -gt 512 ]; then
+		FATSIZE="-F 32"
+	fi
+
+	# mkdosfs will fail if ${FATIMG} exists. Since we are creating an
+	# new image, it is safe to delete any previous image.
+	if [ -e ${FATIMG} ]; then
+		rm ${FATIMG}
+	fi
+
+	if [ -z "${HDDIMG_ID}" ]; then
+		mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
+			${BLOCKS}
+	else
+		mkdosfs ${FATSIZE} -n ${BOOTIMG_VOLUME_ID} -S 512 -C ${FATIMG} \
+		${BLOCKS} -i ${HDDIMG_ID}
+	fi
+
+	# Copy FATSOURCEDIR recursively into the image file directly
+	mcopy -i ${FATIMG} -s ${FATSOURCEDIR}/* ::/
+}
+
+build_hddimg() {
+	# Create an HDD image
+	if [ "${NOHDD}" != "1" ] ; then
+		populate_live ${HDDDIR}
+
+		if [ "${PCBIOS}" = "1" ]; then
+			syslinux_hddimg_populate ${HDDDIR}
+		fi
+		if [ "${EFI}" = "1" ]; then
+			efi_hddimg_populate ${HDDDIR}
+		fi
+
+		# Check the size of ${HDDDIR}/rootfs.img, error out if it
+		# exceeds 4GB, it is the single file's max size of FAT fs.
+		if [ -f ${HDDDIR}/rootfs.img ]; then
+			rootfs_img_size=`stat -c '%s' ${HDDDIR}/rootfs.img`
+			max_size=`expr 4 \* 1024 \* 1024 \* 1024`
+			if [ $rootfs_img_size -gt $max_size ]; then
+				bberror "${HDDDIR}/rootfs.img execeeds 4GB,"
+				bberror "this doesn't work on FAT filesystem, you can try either of:"
+				bberror "1) Reduce the size of rootfs.img"
+				bbfatal "2) Use iso, vmdk or vdi to instead of hddimg\n"
+			fi
+		fi
+
+		build_fat_img ${HDDDIR} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
+
+		if [ "${PCBIOS}" = "1" ]; then
+			syslinux_hddimg_install
+		fi
+
+		chmod 644 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hddimg
+	fi
+}
+
+python do_bootimg() {
+    set_live_vm_vars(d, 'LIVE')
+    if d.getVar("PCBIOS", True) == "1":
+        bb.build.exec_func('build_syslinux_cfg', d)
+    if d.getVar("EFI", True) == "1":
+        bb.build.exec_func('build_efi_cfg', d)
+    bb.build.exec_func('build_hddimg', d)
+    bb.build.exec_func('build_iso', d)
+    bb.build.exec_func('create_symlinks', d)
+}
+do_bootimg[subimages] = "hddimg iso"
+do_bootimg[imgsuffix] = "."
+
+addtask bootimg before do_image_complete
diff --git a/yocto-poky/meta/classes/image-mklibs.bbclass b/yocto-poky/meta/classes/image-mklibs.bbclass
index cfb3ffc..5f6df1b 100644
--- a/yocto-poky/meta/classes/image-mklibs.bbclass
+++ b/yocto-poky/meta/classes/image-mklibs.bbclass
@@ -2,39 +2,24 @@
 
 IMAGE_PREPROCESS_COMMAND += "mklibs_optimize_image; "
 
+inherit linuxloader
+
 mklibs_optimize_image_doit() {
 	rm -rf ${WORKDIR}/mklibs
 	mkdir -p ${WORKDIR}/mklibs/dest
 	cd ${IMAGE_ROOTFS}
 	du -bs > ${WORKDIR}/mklibs/du.before.mklibs.txt
-	for i in `find .`; do file $i; done \
-		| grep ELF \
-		| grep "LSB *executable" \
-		| grep "dynamically linked" \
-		| sed "s/:.*//" \
-		| sed "s+^\./++" \
-		> ${WORKDIR}/mklibs/executables.list
 
-	case ${TARGET_ARCH} in
-		powerpc | mips | mipsel | microblaze )
-			dynamic_loader="${base_libdir}/ld.so.1"
-			;;
-		powerpc64)
-			dynamic_loader="${base_libdir}/ld64.so.1"
-			;;
-		x86_64)
-			dynamic_loader="${base_libdir}/ld-linux-x86-64.so.2"
-			;;
-		i*86 )
-			dynamic_loader="${base_libdir}/ld-linux.so.2"
-			;;
-		arm )
-			dynamic_loader="${base_libdir}/ld-linux.so.3"
-			;;
-		* )
-			dynamic_loader="/unknown_dynamic_linker"
-			;;
-	esac
+	# Build a list of dynamically linked executable ELF files.
+	# Omit libc/libpthread as a special case because it has an interpreter
+	# but is primarily what we intend to strip down.
+	for i in `find . -type f -executable ! -name 'libc-*' ! -name 'libpthread-*'`; do
+		file $i | grep -q ELF || continue
+		${HOST_PREFIX}readelf -l $i | grep -q INTERP || continue
+		echo $i
+	done > ${WORKDIR}/mklibs/executables.list
+
+	dynamic_loader=$(linuxloader)
 
 	mklibs -v \
 		--ldlib ${dynamic_loader} \
diff --git a/yocto-poky/meta/classes/image-prelink.bbclass b/yocto-poky/meta/classes/image-prelink.bbclass
index d4bb3ae..4157df0 100644
--- a/yocto-poky/meta/classes/image-prelink.bbclass
+++ b/yocto-poky/meta/classes/image-prelink.bbclass
@@ -1,6 +1,12 @@
 do_rootfs[depends] += "prelink-native:do_populate_sysroot"
 
-IMAGE_PREPROCESS_COMMAND += "prelink_image; "
+IMAGE_PREPROCESS_COMMAND += "prelink_setup; prelink_image; "
+
+python prelink_setup () {
+    oe.utils.write_ld_so_conf(d)
+}
+
+inherit linuxloader
 
 prelink_image () {
 #	export PSEUDO_DEBUG=4
@@ -13,21 +19,36 @@
 
 	# We need a prelink conf on the filesystem, add one if it's missing
 	if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf ]; then
-		cp ${STAGING_DIR_NATIVE}${sysconfdir_native}/prelink.conf \
+		cp ${STAGING_ETCDIR_NATIVE}/prelink.conf \
 			${IMAGE_ROOTFS}${sysconfdir}/prelink.conf
 		dummy_prelink_conf=true;
 	else
 		dummy_prelink_conf=false;
 	fi
 
+	# We need a ld.so.conf with pathnames in,prelink conf on the filesystem, add one if it's missing
+	ldsoconf=${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf
+	if [ -e $ldsoconf ]; then
+		cp $ldsoconf $ldsoconf.prelink
+	fi
+	cat ${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf >> $ldsoconf
+
+	dynamic_loader=$(linuxloader)
+
 	# prelink!
-	${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf
+	${STAGING_SBINDIR_NATIVE}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf --dynamic-linker $dynamic_loader
 
 	# Remove the prelink.conf if we had to add it.
 	if [ "$dummy_prelink_conf" = "true" ]; then
 		rm -f ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf
 	fi
 
+	if [ -e $ldsoconf.prelink ]; then
+		mv $ldsoconf.prelink $ldsoconf
+	else
+		rm $ldsoconf
+	fi
+
 	pre_prelink_size=`du -ks ${IMAGE_ROOTFS} | awk '{size = $1 ; print size }'`
 	echo "Size after prelinking $pre_prelink_size."
 }
diff --git a/yocto-poky/meta/classes/image-swab.bbclass b/yocto-poky/meta/classes/image-swab.bbclass
index 8931856..6b02cad 100644
--- a/yocto-poky/meta/classes/image-swab.bbclass
+++ b/yocto-poky/meta/classes/image-swab.bbclass
@@ -47,7 +47,7 @@
     # and cross packages which aren't swabber-native or one of its dependencies
     # I have ignored them for now...
     if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('nativesdk', d) and not bb.data.inherits_class('cross', d):
-        deps = (d.getVarFlag('do_setscene', 'depends') or "").split()
+        deps = (d.getVarFlag('do_setscene', 'depends', True) or "").split()
         deps.append('strace-native:do_populate_sysroot')
         d.setVarFlag('do_setscene', 'depends', " ".join(deps))
         logdir = d.expand("${TRACE_LOGDIR}")
diff --git a/yocto-poky/meta/classes/image-vm.bbclass b/yocto-poky/meta/classes/image-vm.bbclass
index 5ddd1cb..47f7326 100644
--- a/yocto-poky/meta/classes/image-vm.bbclass
+++ b/yocto-poky/meta/classes/image-vm.bbclass
@@ -1,19 +1,30 @@
+# image-vm.bbclass
+# (loosly based off image-live.bbclass Copyright (C) 2004, Advanced Micro Devices, Inc.)
+#
+# Create an image which can be placed directly onto a harddisk using dd and then
+# booted.
+#
+# This uses syslinux. extlinux would have been nice but required the ext2/3
+# partition to be mounted. grub requires to run itself as part of the install
+# process.
+#
+# The end result is a 512 boot sector populated with an MBR and partition table
+# followed by an msdos fat16 partition containing syslinux and a linux kernel
+# completed by the ext2/3 rootfs.
+#
+# We have to push the msdos parition table size > 16MB so fat 16 is used as parted
+# won't touch fat12 partitions.
 
-SYSLINUX_PROMPT ?= "0"
-SYSLINUX_LABELS = "boot"
-LABELS_append = " ${SYSLINUX_LABELS} "
+inherit live-vm-common
 
-# Using an initramfs is optional. Enable it by setting INITRD_IMAGE.
-INITRD_IMAGE ?= ""
-INITRD ?= "${@'${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE}' else ''}"
-do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE}:do_rootfs' if '${INITRD_IMAGE}' else ''}"
-
-# need to define the dependency and the ROOTFS for directdisk
-do_bootdirectdisk[depends] += "${PN}:do_rootfs"
-ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext4"
-
-# creating VM images relies on having a hddimg so ensure we inherit it here.
-inherit boot-directdisk
+do_bootdirectdisk[depends] += "dosfstools-native:do_populate_sysroot \
+                               virtual/kernel:do_deploy \
+                               syslinux:do_populate_sysroot \
+                               syslinux-native:do_populate_sysroot \
+                               parted-native:do_populate_sysroot \
+                               mtools-native:do_populate_sysroot \
+                               ${PN}:do_image_ext4 \
+                               "
 
 IMAGE_TYPEDEP_vmdk = "ext4"
 IMAGE_TYPEDEP_vdi = "ext4"
@@ -21,19 +32,133 @@
 IMAGE_TYPEDEP_hdddirect = "ext4"
 IMAGE_TYPES_MASKED += "vmdk vdi qcow2 hdddirect"
 
+ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.ext4"
+
+# Used by bootloader
+LABELS_VM ?= "boot"
+ROOT_VM ?= "root=/dev/sda2"
+# Using an initramfs is optional. Enable it by setting INITRD_IMAGE_VM.
+INITRD_IMAGE_VM ?= ""
+INITRD_VM ?= "${@'${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE_VM}-${MACHINE}.cpio.gz' if '${INITRD_IMAGE_VM}' else ''}"
+do_bootdirectdisk[depends] += "${@'${INITRD_IMAGE_VM}:do_image_complete' if '${INITRD_IMAGE_VM}' else ''}"
+
+BOOTDD_VOLUME_ID   ?= "boot"
+BOOTDD_EXTRA_SPACE ?= "16384"
+
+DISK_SIGNATURE ?= "${DISK_SIGNATURE_GENERATED}"
+DISK_SIGNATURE[vardepsexclude] = "DISK_SIGNATURE_GENERATED"
+
+build_boot_dd() {
+	HDDDIR="${S}/hdd/boot"
+	HDDIMG="${S}/hdd.image"
+	IMAGE=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect
+
+	populate_kernel $HDDDIR
+
+	if [ "${PCBIOS}" = "1" ]; then
+		syslinux_hddimg_populate $HDDDIR
+	fi
+	if [ "${EFI}" = "1" ]; then
+		efi_hddimg_populate $HDDDIR
+	fi
+
+	BLOCKS=`du -bks $HDDDIR | cut -f 1`
+	BLOCKS=`expr $BLOCKS + ${BOOTDD_EXTRA_SPACE}`
+
+	# Ensure total sectors is an integral number of sectors per
+	# track or mcopy will complain. Sectors are 512 bytes, and we
+	# generate images with 32 sectors per track. This calculation is
+	# done in blocks, thus the mod by 16 instead of 32.
+	BLOCKS=$(expr $BLOCKS + $(expr 16 - $(expr $BLOCKS % 16)))
+
+	# Remove it since mkdosfs would fail when it exists
+	rm -f $HDDIMG
+	mkdosfs -n ${BOOTDD_VOLUME_ID} -S 512 -C $HDDIMG $BLOCKS 
+	mcopy -i $HDDIMG -s $HDDDIR/* ::/
+
+	if [ "${PCBIOS}" = "1" ]; then
+		syslinux_hdddirect_install $HDDIMG
+	fi	
+	chmod 644 $HDDIMG
+
+	ROOTFSBLOCKS=`du -Lbks ${ROOTFS} | cut -f 1`
+	TOTALSIZE=`expr $BLOCKS + $ROOTFSBLOCKS`
+	END1=`expr $BLOCKS \* 1024`
+	END2=`expr $END1 + 512`
+	END3=`expr \( $ROOTFSBLOCKS \* 1024 \) + $END1`
+
+	echo $ROOTFSBLOCKS $TOTALSIZE $END1 $END2 $END3
+	rm -rf $IMAGE
+	dd if=/dev/zero of=$IMAGE bs=1024 seek=$TOTALSIZE count=1
+
+	parted $IMAGE mklabel msdos
+	parted $IMAGE mkpart primary fat16 0 ${END1}B
+	parted $IMAGE unit B mkpart primary ext2 ${END2}B ${END3}B
+	parted $IMAGE set 1 boot on 
+
+	parted $IMAGE print
+
+	awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \
+		dd of=$IMAGE bs=1 seek=440 conv=notrunc
+
+	OFFSET=`expr $END2 / 512`
+	if [ "${PCBIOS}" = "1" ]; then
+		dd if=${STAGING_DATADIR}/syslinux/mbr.bin of=$IMAGE conv=notrunc
+	fi
+
+	dd if=$HDDIMG of=$IMAGE conv=notrunc seek=1 bs=512
+	dd if=${ROOTFS} of=$IMAGE conv=notrunc seek=$OFFSET bs=512
+
+	cd ${DEPLOY_DIR_IMAGE}
+	rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect
+	ln -s ${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect
+} 
+
+python do_bootdirectdisk() {
+    validate_disk_signature(d)
+    set_live_vm_vars(d, 'VM')
+    if d.getVar("PCBIOS", True) == "1":
+        bb.build.exec_func('build_syslinux_cfg', d)
+    if d.getVar("EFI", True) == "1":
+        bb.build.exec_func('build_efi_cfg', d)
+    bb.build.exec_func('build_boot_dd', d)
+}
+
+def generate_disk_signature():
+    import uuid
+
+    signature = str(uuid.uuid4())[:8]
+
+    if signature != '00000000':
+        return signature
+    else:
+        return 'ffffffff'
+
+def validate_disk_signature(d):
+    import re
+
+    disk_signature = d.getVar("DISK_SIGNATURE", True)
+
+    if not re.match(r'^[0-9a-fA-F]{8}$', disk_signature):
+        bb.fatal("DISK_SIGNATURE '%s' must be an 8 digit hex string" % disk_signature)
+
+DISK_SIGNATURE_GENERATED := "${@generate_disk_signature()}"
+
+run_qemu_img (){
+    type="$1"
+    qemu-img convert -O $type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.$type
+    ln -sf ${IMAGE_NAME}.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type
+}
 create_vmdk_image () {
-    qemu-img convert -O vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk
-    ln -sf ${IMAGE_NAME}.vmdk ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vmdk
+    run_qemu_img vmdk
 }
 
 create_vdi_image () {
-    qemu-img convert -O vdi ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vdi
-    ln -sf ${IMAGE_NAME}.vdi ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.vdi
+    run_qemu_img vdi
 }
 
 create_qcow2_image () {
-    qemu-img convert -O qcow2 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.hdddirect ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.qcow2
-    ln -sf ${IMAGE_NAME}.qcow2 ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.qcow2
+    run_qemu_img qcow2
 }
 
 python do_vmimg() {
@@ -45,6 +170,6 @@
         bb.build.exec_func('create_qcow2_image', d)
 }
 
-addtask vmimg after do_bootdirectdisk before do_build
+addtask bootdirectdisk before do_vmimg
+addtask vmimg after do_bootdirectdisk before do_image_complete
 do_vmimg[depends] += "qemu-native:do_populate_sysroot"
-
diff --git a/yocto-poky/meta/classes/image.bbclass b/yocto-poky/meta/classes/image.bbclass
index d2f8105..8bfd241 100644
--- a/yocto-poky/meta/classes/image.bbclass
+++ b/yocto-poky/meta/classes/image.bbclass
@@ -1,6 +1,9 @@
 inherit rootfs_${IMAGE_PKGTYPE}
 
-inherit populate_sdk_ext
+# Only Linux SDKs support populate_sdk_ext, fall back to populate_sdk
+# in the non-Linux SDK_OS case, such as mingw32
+SDKEXTCLASS ?= "${@['populate_sdk', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS", True)]}"
+inherit ${SDKEXTCLASS}
 
 TOOLCHAIN_TARGET_TASK += "${PACKAGE_INSTALL}"
 TOOLCHAIN_TARGET_TASK_ATTEMPTONLY += "${PACKAGE_INSTALL_ATTEMPTONLY}"
@@ -30,6 +33,10 @@
 # rootfs bootstrap install
 ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
 
+# These packages will be removed from a read-only rootfs after all other
+# packages have been installed
+ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow ${VIRTUAL-RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}"
+
 # packages to install from features
 FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
 FEATURE_INSTALL[vardepvalue] = "${FEATURE_INSTALL}"
@@ -94,43 +101,25 @@
 "
 do_rootfs[recrdeptask] += "do_packagedata"
 
-def command_variables(d):
-    return ['ROOTFS_POSTPROCESS_COMMAND','ROOTFS_PREPROCESS_COMMAND','ROOTFS_POSTINSTALL_COMMAND','OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','IMAGE_POSTPROCESS_COMMAND',
-            'IMAGE_PREPROCESS_COMMAND','ROOTFS_POSTPROCESS_COMMAND','POPULATE_SDK_POST_HOST_COMMAND','POPULATE_SDK_POST_TARGET_COMMAND','SDK_POSTPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS',         
-            'RPM_POSTPROCESS_COMMANDS']
+def rootfs_command_variables(d):
+    return ['ROOTFS_POSTPROCESS_COMMAND','ROOTFS_PREPROCESS_COMMAND','ROOTFS_POSTINSTALL_COMMAND','ROOTFS_POSTUNINSTALL_COMMAND','OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','IMAGE_POSTPROCESS_COMMAND',
+            'IMAGE_PREPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS','RPM_POSTPROCESS_COMMANDS','DEB_PREPROCESS_COMMANDS','DEB_POSTPROCESS_COMMANDS']
 
 python () {
-    variables = command_variables(d)
+    variables = rootfs_command_variables(d) + sdk_command_variables(d)
     for var in variables:
         if d.getVar(var, False):
             d.setVarFlag(var, 'func', '1')
 }
 
-def fstype_variables(d):
-    import oe.image
-
-    image = oe.image.Image(d)
-    alltypes, fstype_groups, cimages = image._get_image_types()
-    fstype_vars = set()
-    for fstype_group in fstype_groups:
-        for fstype in fstype_group:
-            fstype_vars.add('IMAGE_CMD_' + fstype)
-            if fstype in cimages:
-                for ctype in cimages[fstype]:
-                    fstype_vars.add('COMPRESS_CMD_' + ctype)
-
-    return sorted(fstype_vars)
-
 def rootfs_variables(d):
     from oe.rootfs import variable_depends
     variables = ['IMAGE_DEVICE_TABLES','BUILD_IMAGES_FROM_FEEDS','IMAGE_TYPES_MASKED','IMAGE_ROOTFS_ALIGNMENT','IMAGE_OVERHEAD_FACTOR','IMAGE_ROOTFS_SIZE','IMAGE_ROOTFS_EXTRA_SPACE',
-                 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS','SDK_OS',
-                 'SDK_OUTPUT','SDKPATHNATIVE','SDKTARGETSYSROOT','SDK_DIR','SDK_VENDOR','SDKIMAGE_INSTALL_COMPLEMENTARY','SDK_PACKAGE_ARCHS','SDK_OUTPUT','SDKTARGETSYSROOT','MULTILIBRE_ALLOW_REP',
-                 'MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS','PACKAGE_ARCHS',
-                 'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS',
-                 'COMPRESSIONTYPES', 'IMAGE_GEN_DEBUGFS']
-    variables.extend(fstype_variables(d))
-    variables.extend(command_variables(d))
+                 'IMAGE_ROOTFS_MAXSIZE','IMAGE_NAME','IMAGE_LINK_NAME','IMAGE_MANIFEST','DEPLOY_DIR_IMAGE','RM_OLD_IMAGE','IMAGE_FSTYPES','IMAGE_INSTALL_COMPLEMENTARY','IMAGE_LINGUAS',
+                 'MULTILIBRE_ALLOW_REP','MULTILIB_TEMP_ROOTFS','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS',
+                 'PACKAGE_ARCHS','PACKAGE_CLASSES','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','OVERRIDES','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI','INTERCEPT_DIR','USE_DEVFS',
+                 'COMPRESSIONTYPES', 'IMAGE_GEN_DEBUGFS', 'ROOTFS_RO_UNNEEDED']
+    variables.extend(rootfs_command_variables(d))
     variables.extend(variable_depends(d))
     return " ".join(variables)
 
@@ -183,7 +172,7 @@
     initramfs_image = d.getVar('INITRAMFS_IMAGE', True) or ""
     if initramfs_image != "":
         d.appendVarFlag('do_build', 'depends', " %s:do_bundle_initramfs" %  d.getVar('PN', True))
-        d.appendVarFlag('do_bundle_initramfs', 'depends', " %s:do_rootfs" % initramfs_image)
+        d.appendVarFlag('do_bundle_initramfs', 'depends', " %s:do_image_complete" % initramfs_image)
 }
 
 IMAGE_CLASSES += "image_types"
@@ -191,32 +180,6 @@
 
 IMAGE_POSTPROCESS_COMMAND ?= ""
 
-# Zap the root password if debug-tweaks feature is not enabled
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}'
-
-# Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'
-
-# Enable postinst logging if debug-tweaks is enabled
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}'
-
-# Create /etc/timestamp during image construction to give a reasonably sane default time setting
-ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
-
-# Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
-
-# Write manifest
-IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
-ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
-# Set default postinst log file
-POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
-# Set default target for systemd images
-SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}'
-ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; ", "", d)}'
-
-ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;'
-
 # some default locales
 IMAGE_LINGUAS ?= "de-de fr-fr en-gb"
 
@@ -226,80 +189,16 @@
 # aren't yet available.
 PSEUDO_PASSWD = "${IMAGE_ROOTFS}:${STAGING_DIR_NATIVE}"
 
-do_rootfs[dirs] = "${TOPDIR}"
-do_rootfs[lockfiles] += "${IMAGE_ROOTFS}.lock"
-do_rootfs[cleandirs] += "${S}"
-
-# Must call real_do_rootfs() from inside here, rather than as a separate
-# task, so that we have a single fakeroot context for the whole process.
-do_rootfs[umask] = "022"
-
-# A hook function to support read-only-rootfs IMAGE_FEATURES
-read_only_rootfs_hook () {
-	# Tweak the mount option and fs_passno for rootfs in fstab
-	sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
-
-	# If we're using openssh and the /etc/ssh directory has no pre-generated keys,
-	# we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly
-	# and the keys under /var/run/ssh.
-	if [ -d ${IMAGE_ROOTFS}/etc/ssh ]; then
-		if [ -e ${IMAGE_ROOTFS}/etc/ssh/ssh_host_rsa_key ]; then
-			echo "SYSCONFDIR=/etc/ssh" >> ${IMAGE_ROOTFS}/etc/default/ssh
-			echo "SSHD_OPTS=" >> ${IMAGE_ROOTFS}/etc/default/ssh
-		else
-			echo "SYSCONFDIR=/var/run/ssh" >> ${IMAGE_ROOTFS}/etc/default/ssh
-			echo "SSHD_OPTS='-f /etc/ssh/sshd_config_readonly'" >> ${IMAGE_ROOTFS}/etc/default/ssh
-		fi
-	fi
-
-	# Also tweak the key location for dropbear in the same way.
-	if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then
-		if [ -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then
-			echo "DROPBEAR_RSAKEY_DIR=/etc/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear
-		else
-			echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear
-		fi
-	fi
-
-
-	if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then
-		# Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes
-		if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then
-			sed -i 's/ROOTFS_READ_ONLY=no/ROOTFS_READ_ONLY=yes/' ${IMAGE_ROOTFS}/etc/default/rcS
-		fi
-		# Run populate-volatile.sh at rootfs time to set up basic files
-		# and directories to support read-only rootfs.
-		if [ -x ${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh ]; then
-			${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh
-		fi
-	fi
-
-	if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", d)}; then
-	    # Update user database files so that services don't fail for a read-only systemd system
-	    for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
-		[ -e $conffile ] || continue
-		grep -v "^#" $conffile | sed -e '/^$/d' | while read type name id comment; do
-		    if [ "$type" = "u" ]; then
-			useradd_params=""
-			[ "$id" != "-" ] && useradd_params="$useradd_params --uid $id"
-			[ "$comment" != "-" ] && useradd_params="$useradd_params --comment $comment"
-			useradd_params="$useradd_params --system $name"
-			eval useradd --root ${IMAGE_ROOTFS} $useradd_params || true
-		    elif [ "$type" = "g" ]; then
-			groupadd_params=""
-			[ "$id" != "-" ] && groupadd_params="$groupadd_params --gid $id"
-			groupadd_params="$groupadd_params --system $name"
-			eval groupadd --root ${IMAGE_ROOTFS} $groupadd_params || true
-		    fi
-		done
-	    done
-	fi
-}
+inherit rootfs-postcommands
 
 PACKAGE_EXCLUDE ??= ""
 PACKAGE_EXCLUDE[type] = "list"
 
-python rootfs_process_ignore() {
+fakeroot python do_rootfs () {
+    from oe.rootfs import create_rootfs
+    from oe.manifest import create_manifest
+
+    # Handle package exclusions
     excl_pkgs = d.getVar("PACKAGE_EXCLUDE", True).split()
     inst_pkgs = d.getVar("PACKAGE_INSTALL", True).split()
     inst_attempt_pkgs = d.getVar("PACKAGE_INSTALL_ATTEMPTONLY", True).split()
@@ -318,194 +217,312 @@
 
     d.setVar("PACKAGE_INSTALL", ' '.join(inst_pkgs))
     d.setVar("PACKAGE_INSTALL_ATTEMPTONLY", ' '.join(inst_attempt_pkgs))
-}
-do_rootfs[prefuncs] += "rootfs_process_ignore"
 
-# We have to delay the runtime_mapping_rename until just before rootfs runs
-# otherwise, the multilib renaming could step in and squash any fixups that
-# may have occurred.
-python rootfs_runtime_mapping() {
+    # Ensure we handle package name remapping
+    # We have to delay the runtime_mapping_rename until just before rootfs runs
+    # otherwise, the multilib renaming could step in and squash any fixups that
+    # may have occurred.
     pn = d.getVar('PN', True)
     runtime_mapping_rename("PACKAGE_INSTALL", pn, d)
     runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", pn, d)
     runtime_mapping_rename("BAD_RECOMMENDATIONS", pn, d)
-}
-do_rootfs[prefuncs] += "rootfs_runtime_mapping"
 
-fakeroot python do_rootfs () {
-    from oe.rootfs import create_rootfs
-    from oe.image import create_image
-    from oe.manifest import create_manifest
-
-    # generate the initial manifest
+    # Generate the initial manifest
     create_manifest(d)
 
-    # generate rootfs
+    # Generate rootfs
     create_rootfs(d)
+}
+do_rootfs[dirs] = "${TOPDIR}"
+do_rootfs[cleandirs] += "${S}"
+do_rootfs[umask] = "022"
+addtask rootfs before do_build
 
-    # generate final images
-    create_image(d)
+fakeroot python do_image () {
+    from oe.utils import execute_pre_post_process
+
+    pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND", True)
+
+    execute_pre_post_process(d, pre_process_cmds)
+}
+do_image[dirs] = "${TOPDIR}"
+do_image[umask] = "022"
+addtask do_image after do_rootfs before do_build
+
+fakeroot python do_image_complete () {
+    from oe.utils import execute_pre_post_process
+
+    post_process_cmds = d.getVar("IMAGE_POSTPROCESS_COMMAND", True)
+
+    execute_pre_post_process(d, post_process_cmds)
+}
+do_image_complete[dirs] = "${TOPDIR}"
+do_image_complete[umask] = "022"
+addtask do_image_complete after do_image before do_build
+
+#
+# Write environment variables used by wic
+# to tmp/sysroots/<machine>/imgdata/<image>.env
+#
+python do_rootfs_wicenv () {
+    wicvars = d.getVar('WICVARS', True)
+    if not wicvars:
+        return
+
+    stdir = d.getVar('STAGING_DIR_TARGET', True)
+    outdir = os.path.join(stdir, 'imgdata')
+    bb.utils.mkdirhier(outdir)
+    basename = d.getVar('IMAGE_BASENAME', True)
+    with open(os.path.join(outdir, basename) + '.env', 'w') as envf:
+        for var in wicvars.split():
+            value = d.getVar(var, True)
+            if value:
+                envf.write('%s="%s"\n' % (var, value.strip()))
+}
+addtask do_rootfs_wicenv after do_image before do_image_wic
+do_rootfs_wicenv[vardeps] += "${WICVARS}"
+do_rootfs_wicenv[prefuncs] = 'set_image_size'
+
+def setup_debugfs_variables(d):
+    d.appendVar('IMAGE_ROOTFS', '-dbg')
+    d.appendVar('IMAGE_LINK_NAME', '-dbg')
+    d.appendVar('IMAGE_NAME','-dbg')
+    debugfs_image_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True)
+    if debugfs_image_fstypes:
+        d.setVar('IMAGE_FSTYPES', debugfs_image_fstypes)
+
+python setup_debugfs () {
+    setup_debugfs_variables(d)
 }
 
-insert_feed_uris () {
-	
-	echo "Building feeds for [${DISTRO}].."
+python () {
+    vardeps = set()
+    ctypes = d.getVar('COMPRESSIONTYPES', True).split()
+    old_overrides = d.getVar('OVERRIDES', 0)
 
-	for line in ${FEED_URIS}
-	do
-		# strip leading and trailing spaces/tabs, then split into name and uri
-		line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`"
-		feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`"
-		feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`"
-		
-		echo "Added $feed_name feed with URL $feed_uri"
-		
-		# insert new feed-sources
-		echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/opkg/${feed_name}-feed.conf
-	done
+    def _image_base_type(type):
+        basetype = type
+        for ctype in ctypes:
+            if type.endswith("." + ctype):
+                basetype = type[:-len("." + ctype)]
+                break
+
+        if basetype != type:
+            # New base type itself might be generated by a conversion command.
+            basetype = _image_base_type(basetype)
+
+        return basetype
+
+    basetypes = {}
+    alltypes = d.getVar('IMAGE_FSTYPES', True).split()
+    typedeps = {}
+
+    if d.getVar('IMAGE_GEN_DEBUGFS', True) == "1":
+        debugfs_fstypes = d.getVar('IMAGE_FSTYPES_DEBUGFS', True).split()
+        for t in debugfs_fstypes:
+            alltypes.append("debugfs_" + t)
+
+    def _add_type(t):
+        baset = _image_base_type(t)
+        input_t = t
+        if baset not in basetypes:
+            basetypes[baset]= []
+        if t not in basetypes[baset]:
+            basetypes[baset].append(t)
+        debug = ""
+        if t.startswith("debugfs_"):
+            t = t[8:]
+            debug = "debugfs_"
+        deps = (d.getVar('IMAGE_TYPEDEP_' + t, True) or "").split()
+        vardeps.add('IMAGE_TYPEDEP_' + t)
+        if baset not in typedeps:
+            typedeps[baset] = set()
+        deps = [debug + dep for dep in deps]
+        for dep in deps:
+            if dep not in alltypes:
+                alltypes.append(dep)
+            _add_type(dep)
+            basedep = _image_base_type(dep)
+            typedeps[baset].add(basedep)
+
+        if baset != input_t:
+            _add_type(baset)
+
+    for t in alltypes[:]:
+        _add_type(t)
+
+    d.appendVarFlag('do_image', 'vardeps', ' '.join(vardeps))
+
+    maskedtypes = (d.getVar('IMAGE_TYPES_MASKED', True) or "").split()
+
+    for t in basetypes:
+        vardeps = set()
+        cmds = []
+        subimages = []
+        realt = t
+
+        if t in maskedtypes:
+            continue
+
+        localdata = bb.data.createCopy(d)
+        debug = ""
+        if t.startswith("debugfs_"):
+            setup_debugfs_variables(localdata)
+            debug = "setup_debugfs "
+            realt = t[8:]
+        localdata.setVar('OVERRIDES', '%s:%s' % (realt, old_overrides))
+        bb.data.update_data(localdata)
+        localdata.setVar('type', realt)
+        # Delete DATETIME so we don't expand any references to it now
+        # This means the task's hash can be stable rather than having hardcoded
+        # date/time values. It will get expanded at execution time.
+        # Similarly TMPDIR since otherwise we see QA stamp comparision problems
+        localdata.delVar('DATETIME')
+        localdata.delVar('TMPDIR')
+
+        image_cmd = localdata.getVar("IMAGE_CMD", True)
+        vardeps.add('IMAGE_CMD_' + realt)
+        if image_cmd:
+            cmds.append("\t" + image_cmd)
+        else:
+            bb.fatal("No IMAGE_CMD defined for IMAGE_FSTYPES entry '%s' - possibly invalid type name or missing support class" % t)
+        cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
+
+        rm_tmp_images = set()
+        def gen_conversion_cmds(bt):
+            for ctype in ctypes:
+                if bt.endswith("." + ctype):
+                    type = bt[0:-len(ctype) - 1]
+                    if type.startswith("debugfs_"):
+                        type = type[8:]
+                    # Create input image first.
+                    gen_conversion_cmds(type)
+                    localdata.setVar('type', type)
+                    cmds.append("\t" + localdata.getVar("COMPRESS_CMD_" + ctype, True))
+                    vardeps.add('COMPRESS_CMD_' + ctype)
+                    subimages.append(type + "." + ctype)
+                    if type not in alltypes:
+                        rm_tmp_images.add(localdata.expand("${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"))
+
+        for bt in basetypes[t]:
+            gen_conversion_cmds(bt)
+
+        localdata.setVar('type', realt)
+        if t not in alltypes:
+            rm_tmp_images.add(localdata.expand("${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"))
+        else:
+            subimages.append(realt)
+
+        # Clean up after applying all conversion commands. Some of them might
+        # use the same input, therefore we cannot delete sooner without applying
+        # some complex dependency analysis.
+        for image in rm_tmp_images:
+            cmds.append("\trm " + image)
+
+        after = 'do_image'
+        for dep in typedeps[t]:
+            after += ' do_image_%s' % dep.replace("-", "_").replace(".", "_")
+
+        t = t.replace("-", "_").replace(".", "_")
+
+        d.setVar('do_image_%s' % t, '\n'.join(cmds))
+        d.setVarFlag('do_image_%s' % t, 'func', '1')
+        d.setVarFlag('do_image_%s' % t, 'fakeroot', '1')
+        d.setVarFlag('do_image_%s' % t, 'prefuncs', debug + 'set_image_size')
+        d.setVarFlag('do_image_%s' % t, 'postfuncs', 'create_symlinks')
+        d.setVarFlag('do_image_%s' % t, 'subimages', ' '.join(subimages))
+        d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps))
+        d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME')
+
+        bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after))
+        bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d)
+}
+
+#
+# Compute the rootfs size
+#
+def get_rootfs_size(d):
+    import subprocess
+
+    rootfs_alignment = int(d.getVar('IMAGE_ROOTFS_ALIGNMENT', True))
+    overhead_factor = float(d.getVar('IMAGE_OVERHEAD_FACTOR', True))
+    rootfs_req_size = int(d.getVar('IMAGE_ROOTFS_SIZE', True))
+    rootfs_extra_space = eval(d.getVar('IMAGE_ROOTFS_EXTRA_SPACE', True))
+    rootfs_maxsize = d.getVar('IMAGE_ROOTFS_MAXSIZE', True)
+    image_fstypes = d.getVar('IMAGE_FSTYPES', True) or ''
+    initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES', True) or ''
+    initramfs_maxsize = d.getVar('INITRAMFS_MAXSIZE', True)
+
+    output = subprocess.check_output(['du', '-ks',
+                                      d.getVar('IMAGE_ROOTFS', True)])
+    size_kb = int(output.split()[0])
+    base_size = size_kb * overhead_factor
+    base_size = max(base_size, rootfs_req_size) + rootfs_extra_space
+
+    if base_size != int(base_size):
+        base_size = int(base_size + 1)
+    else:
+        base_size = int(base_size)
+
+    base_size += rootfs_alignment - 1
+    base_size -= base_size % rootfs_alignment
+
+    # Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
+    if rootfs_maxsize:
+        rootfs_maxsize_int = int(rootfs_maxsize)
+        if base_size > rootfs_maxsize_int:
+            bb.fatal("The rootfs size %d(K) overrides IMAGE_ROOTFS_MAXSIZE: %d(K)" % \
+                (base_size, rootfs_maxsize_int))
+
+    # Check the initramfs size against INITRAMFS_MAXSIZE (if set)
+    if image_fstypes == initramfs_fstypes != ''  and initramfs_maxsize:
+        initramfs_maxsize_int = int(initramfs_maxsize)
+        if base_size > initramfs_maxsize_int:
+            bb.error("The initramfs size %d(K) overrides INITRAMFS_MAXSIZE: %d(K)" % \
+                (base_size, initramfs_maxsize_int))
+            bb.error("You can set INITRAMFS_MAXSIZE a larger value. Usually, it should")
+            bb.fatal("be less than 1/2 of ram size, or you may fail to boot it.\n")
+    return base_size
+
+python set_image_size () {
+        rootfs_size = get_rootfs_size(d)
+        d.setVar('ROOTFS_SIZE', str(rootfs_size))
+        d.setVarFlag('ROOTFS_SIZE', 'export', '1')
+}
+
+#
+# Create symlinks to the newly created image
+#
+python create_symlinks() {
+
+    deploy_dir = d.getVar('DEPLOY_DIR_IMAGE', True)
+    img_name = d.getVar('IMAGE_NAME', True)
+    link_name = d.getVar('IMAGE_LINK_NAME', True)
+    manifest_name = d.getVar('IMAGE_MANIFEST', True)
+    taskname = d.getVar("BB_CURRENTTASK", True)
+    subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split()
+    imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or d.expand("${IMAGE_NAME_SUFFIX}.")
+    os.chdir(deploy_dir)
+
+    if not link_name:
+        return
+    for type in subimages:
+        if os.path.exists(img_name + imgsuffix + type):
+            dst = deploy_dir + "/" + link_name + "." + type
+            src = img_name + imgsuffix + type
+            bb.note("Creating symlink: %s -> %s" % (dst, src))
+            if os.path.islink(dst):
+                if d.getVar('RM_OLD_IMAGE', True) == "1" and \
+                        os.path.exists(os.path.realpath(dst)):
+                    os.remove(os.path.realpath(dst))
+                os.remove(dst)
+            os.symlink(src, dst)
 }
 
 MULTILIBRE_ALLOW_REP =. "${base_bindir}|${base_sbindir}|${bindir}|${sbindir}|${libexecdir}|${sysconfdir}|${nonarch_base_libdir}/udev|/lib/modules/[^/]*/modules.*|"
 MULTILIB_CHECK_FILE = "${WORKDIR}/multilib_check.py"
 MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib"
 
-# This function is intended to disallow empty root password if 'debug-tweaks' is not in IMAGE_FEATURES.
-zap_empty_root_password () {
-	if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then
-		sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/shadow
-        fi
-	if [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then
-		sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/passwd
-	fi
-} 
-
-# allow dropbear/openssh to accept root logins and logins from accounts with an empty password string
-ssh_allow_empty_password () {
-	if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
-		sed -i 's/^[#[:space:]]*PermitRootLogin.*/PermitRootLogin yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
-		sed -i 's/^[#[:space:]]*PermitEmptyPasswords.*/PermitEmptyPasswords yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
-	fi
-
-	if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then
-		if grep -q DROPBEAR_EXTRA_ARGS ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear 2>/dev/null ; then
-			if ! grep -q "DROPBEAR_EXTRA_ARGS=.*-B" ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear ; then
-				sed -i 's/^DROPBEAR_EXTRA_ARGS="*\([^"]*\)"*/DROPBEAR_EXTRA_ARGS="\1 -B"/' ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear
-			fi
-		else
-			printf '\nDROPBEAR_EXTRA_ARGS="-B"\n' >> ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear
-		fi
-	fi
-
-	if [ -d ${IMAGE_ROOTFS}${sysconfdir}/pam.d ] ; then
-		sed -i 's/nullok_secure/nullok/' ${IMAGE_ROOTFS}${sysconfdir}/pam.d/*
-	fi
-}
-
-# Disable DNS lookups, the SSH_DISABLE_DNS_LOOKUP can be overridden to allow
-# distros to choose not to take this change
-SSH_DISABLE_DNS_LOOKUP ?= " ssh_disable_dns_lookup ; "
-ROOTFS_POSTPROCESS_COMMAND_append_qemuall = "${SSH_DISABLE_DNS_LOOKUP}"
-ssh_disable_dns_lookup () {
-	if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
-		sed -i -e 's:#UseDNS yes:UseDNS no:' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
-	fi
-}
-
-# Enable postinst logging if debug-tweaks is enabled
-postinst_enable_logging () {
-	mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/default
-	echo "POSTINST_LOGGING=1" >> ${IMAGE_ROOTFS}${sysconfdir}/default/postinst
-	echo "LOGFILE=${POSTINST_LOGFILE}" >> ${IMAGE_ROOTFS}${sysconfdir}/default/postinst
-}
-
-# Modify systemd default target
-set_systemd_default_target () {
-	if [ -d ${IMAGE_ROOTFS}${sysconfdir}/systemd/system -a -e ${IMAGE_ROOTFS}${systemd_unitdir}/system/${SYSTEMD_DEFAULT_TARGET} ]; then
-		ln -sf ${systemd_unitdir}/system/${SYSTEMD_DEFAULT_TARGET} ${IMAGE_ROOTFS}${sysconfdir}/systemd/system/default.target
-	fi
-}
-
-# If /var/volatile is not empty, we have seen problems where programs such as the
-# journal make assumptions based on the contents of /var/volatile. The journal
-# would then write to /var/volatile before it was mounted, thus hiding the
-# items previously written.
-#
-# This change is to attempt to fix those types of issues in a way that doesn't
-# affect users that may not be using /var/volatile.
-empty_var_volatile () {
-	if [ -e ${IMAGE_ROOTFS}/etc/fstab ]; then
-		match=`awk '$1 !~ "#" && $2 ~ /\/var\/volatile/{print $2}' ${IMAGE_ROOTFS}/etc/fstab 2> /dev/null`
-		if [ -n "$match" ]; then
-			find ${IMAGE_ROOTFS}/var/volatile -mindepth 1 -delete
-		fi
-	fi
-}
-
-# Turn any symbolic /sbin/init link into a file
-remove_init_link () {
-	if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then
-		LINKFILE=${IMAGE_ROOTFS}`readlink ${IMAGE_ROOTFS}/sbin/init`
-		rm ${IMAGE_ROOTFS}/sbin/init
-		cp $LINKFILE ${IMAGE_ROOTFS}/sbin/init
-	fi
-}
-
-make_zimage_symlink_relative () {
-	if [ -L ${IMAGE_ROOTFS}/boot/zImage ]; then
-		(cd ${IMAGE_ROOTFS}/boot/ && for i in `ls zImage-* | sort`; do ln -sf $i zImage; done)
-	fi
-}
-
-python write_image_manifest () {
-    from oe.rootfs import image_list_installed_packages
-    with open(d.getVar('IMAGE_MANIFEST', True), 'w+') as image_manifest:
-        image_manifest.write(image_list_installed_packages(d, 'ver'))
-        image_manifest.write("\n")
-}
-
-# Can be use to create /etc/timestamp during image construction to give a reasonably 
-# sane default time setting
-rootfs_update_timestamp () {
-	date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
-}
-
-# Prevent X from being started
-rootfs_no_x_startup () {
-	if [ -f ${IMAGE_ROOTFS}/etc/init.d/xserver-nodm ]; then
-		chmod a-x ${IMAGE_ROOTFS}/etc/init.d/xserver-nodm
-	fi
-}
-
-rootfs_trim_schemas () {
-	for schema in ${IMAGE_ROOTFS}/etc/gconf/schemas/*.schemas
-	do
-		# Need this in case no files exist
-		if [ -e $schema ]; then
-			oe-trim-schemas $schema > $schema.new
-			mv $schema.new $schema
-		fi
-	done
-}
-
-rootfs_check_host_user_contaminated () {
-	contaminated="${WORKDIR}/host-user-contaminated.txt"
-	HOST_USER_UID="$(PSEUDO_UNLOAD=1 id -u)"
-	HOST_USER_GID="$(PSEUDO_UNLOAD=1 id -g)"
-
-	find "${IMAGE_ROOTFS}" -wholename "${IMAGE_ROOTFS}/home" -prune \
-	    -user "$HOST_USER_UID" -o -group "$HOST_USER_GID" >"$contaminated"
-
-	if [ -s "$contaminated" ]; then
-		echo "WARNING: Paths in the rootfs are owned by the same user or group as the user running bitbake. See the logfile for the specific paths."
-		cat "$contaminated" | sed "s,^,  ,"
-	fi
-}
-
-# Make any absolute links in a sysroot relative
-rootfs_sysroot_relativelinks () {
-	sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT}
-}
-
 do_fetch[noexec] = "1"
 do_unpack[noexec] = "1"
 do_patch[noexec] = "1"
@@ -520,7 +537,6 @@
 do_package_write_deb[noexec] = "1"
 do_package_write_rpm[noexec] = "1"
 
-addtask rootfs before do_build
 # Allow the kernel to be repacked with the initramfs and boot image file as a single file
 do_bundle_initramfs[depends] += "virtual/kernel:do_bundle_initramfs"
 do_bundle_initramfs[nostamp] = "1"
@@ -528,4 +544,4 @@
 do_bundle_initramfs () {
 	:
 }
-addtask bundle_initramfs after do_rootfs
+addtask bundle_initramfs after do_image_complete
diff --git a/yocto-poky/meta/classes/image_types.bbclass b/yocto-poky/meta/classes/image_types.bbclass
index 5036919..53af7ca 100644
--- a/yocto-poky/meta/classes/image_types.bbclass
+++ b/yocto-poky/meta/classes/image_types.bbclass
@@ -1,3 +1,8 @@
+# IMAGE_NAME is the base name for everything produced when building images.
+# The actual image that contains the rootfs has an additional suffix (.rootfs
+# by default) followed by additional suffices which describe the format (.ext4,
+# .ext4.xz, etc.).
+IMAGE_NAME_SUFFIX ??= ".rootfs"
 
 # The default aligment of the size of the rootfs is set to 1KiB. In case
 # you're using the SD card emulation of a QEMU system simulator you may
@@ -12,7 +17,9 @@
 
     deps = []
     ctypes = d.getVar('COMPRESSIONTYPES', True).split()
-    for type in (d.getVar('IMAGE_FSTYPES', True) or "").split():
+    fstypes = set((d.getVar('IMAGE_FSTYPES', True) or "").split())
+    fstypes |= set((d.getVar('IMAGE_FSTYPES_DEBUGFS', True) or "").split())
+    for type in fstypes:
         if type in ["vmdk", "vdi", "qcow2", "hdddirect", "live", "iso", "hddimg"]:
             type = "ext4"
         basetype = type
@@ -36,9 +43,9 @@
 XZ_THREADS ?= "-T 0"
 
 JFFS2_SUM_EXTRA_ARGS ?= ""
-IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}"
+IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}"
 
-IMAGE_CMD_cramfs = "mkfs.cramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
+IMAGE_CMD_cramfs = "mkfs.cramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cramfs ${EXTRA_IMAGECMD}"
 
 oe_mkext234fs () {
 	fstype=$1
@@ -58,8 +65,8 @@
 		eval COUNT=\"$MIN_COUNT\"
 	fi
 	# Create a sparse image block
-	dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024
-	mkfs.$fstype -F $extra_imagecmd ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.$fstype -d ${IMAGE_ROOTFS}
+	dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024
+	mkfs.$fstype -F $extra_imagecmd ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}
 }
 
 IMAGE_CMD_ext2 = "oe_mkext234fs ext2 ${EXTRA_IMAGECMD}"
@@ -69,16 +76,16 @@
 MIN_BTRFS_SIZE ?= "16384"
 IMAGE_CMD_btrfs () {
 	if [ ${ROOTFS_SIZE} -gt ${MIN_BTRFS_SIZE} ]; then
-		dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs count=${ROOTFS_SIZE} bs=1024
-		mkfs.btrfs ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.btrfs
+		dd if=/dev/zero of=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs count=${ROOTFS_SIZE} bs=1024
+		mkfs.btrfs ${EXTRA_IMAGECMD} -r ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.btrfs
 	else
 		bbfatal "Rootfs is too small for BTRFS (Rootfs Actual Size: ${ROOTFS_SIZE}, BTRFS Minimum Size: ${MIN_BTRFS_SIZE})"
 	fi
 }
 
-IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend"
-IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz"
-IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
+IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs ${EXTRA_IMAGECMD} -noappend"
+IMAGE_CMD_squashfs-xz = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-xz ${EXTRA_IMAGECMD} -noappend -comp xz"
+IMAGE_CMD_squashfs-lzo = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.squashfs-lzo ${EXTRA_IMAGECMD} -noappend -comp lzo"
 
 # By default, tar from the host is used, which can be quite old. If
 # you need special parameters (like --xattrs) which are only supported
@@ -91,28 +98,29 @@
 # In practice, it turned out to be not needed when creating archives and
 # required when extracting, but it seems prudent to use it in both cases.
 IMAGE_CMD_TAR ?= "tar"
-IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar -C ${IMAGE_ROOTFS} ."
+IMAGE_CMD_tar = "${IMAGE_CMD_TAR} -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.tar -C ${IMAGE_ROOTFS} ."
 
-do_rootfs[cleandirs] += "${WORKDIR}/cpio_append"
+do_image_cpio[cleandirs] += "${WORKDIR}/cpio_append"
 IMAGE_CMD_cpio () {
-	(cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
+	(cd ${IMAGE_ROOTFS} && find . | cpio -o -H newc >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
 	if [ ! -L ${IMAGE_ROOTFS}/init -a ! -e ${IMAGE_ROOTFS}/init ]; then
 		if [ -L ${IMAGE_ROOTFS}/sbin/init -o -e ${IMAGE_ROOTFS}/sbin/init ]; then
 			ln -sf /sbin/init ${WORKDIR}/cpio_append/init
 		else
 			touch ${WORKDIR}/cpio_append/init
 		fi
-		(cd  ${WORKDIR}/cpio_append && echo ./init | cpio -oA -H newc -F ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio)
+		(cd  ${WORKDIR}/cpio_append && echo ./init | cpio -oA -H newc -F ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.cpio)
 	fi
 }
 
-ELF_KERNEL ?= "${STAGING_DIR_HOST}/usr/src/kernel/${KERNEL_IMAGETYPE}"
+ELF_KERNEL ?= "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}"
 ELF_APPEND ?= "ramdisk_size=32768 root=/dev/ram0 rw console="
 
 IMAGE_CMD_elf () {
-	test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf
-	mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
+	test -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf && rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf
+	mkelfImage --kernel=${ELF_KERNEL} --initrd=${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.cpio.gz --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.elf --append='${ELF_APPEND}' ${EXTRA_IMAGECMD}
 }
+
 IMAGE_TYPEDEP_elf = "cpio.gz"
 
 UBI_VOLNAME ?= "${MACHINE}-rootfs"
@@ -126,28 +134,28 @@
 		local vname="_$3"
 	fi
 
-	echo \[ubifs\] > ubinize${vname}.cfg
-	echo mode=ubi >> ubinize${vname}.cfg
-	echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}.rootfs.ubifs >> ubinize${vname}.cfg
-	echo vol_id=0 >> ubinize${vname}.cfg
-	echo vol_type=dynamic >> ubinize${vname}.cfg
-	echo vol_name=${UBI_VOLNAME} >> ubinize${vname}.cfg
-	echo vol_flags=autoresize >> ubinize${vname}.cfg
-	mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}.rootfs.ubifs ${mkubifs_args}
-	ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}.rootfs.ubi ${ubinize_args} ubinize${vname}.cfg
+	echo \[ubifs\] > ubinize${vname}-${IMAGE_NAME}.cfg
+	echo mode=ubi >> ubinize${vname}-${IMAGE_NAME}.cfg
+	echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs >> ubinize${vname}-${IMAGE_NAME}.cfg
+	echo vol_id=0 >> ubinize${vname}-${IMAGE_NAME}.cfg
+	echo vol_type=dynamic >> ubinize${vname}-${IMAGE_NAME}.cfg
+	echo vol_name=${UBI_VOLNAME} >> ubinize${vname}-${IMAGE_NAME}.cfg
+	echo vol_flags=autoresize >> ubinize${vname}-${IMAGE_NAME}.cfg
+	mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ${mkubifs_args}
+	ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubi ${ubinize_args} ubinize${vname}-${IMAGE_NAME}.cfg
 
 	# Cleanup cfg file
-	mv ubinize${vname}.cfg ${DEPLOY_DIR_IMAGE}/
+	mv ubinize${vname}-${IMAGE_NAME}.cfg ${DEPLOY_DIR_IMAGE}/
 
 	# Create own symlinks for 'named' volumes
 	if [ -n "$vname" ]; then
 		cd ${DEPLOY_DIR_IMAGE}
-		if [ -e ${IMAGE_NAME}${vname}.rootfs.ubifs ]; then
-			ln -sf ${IMAGE_NAME}${vname}.rootfs.ubifs \
+		if [ -e ${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs ]; then
+			ln -sf ${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubifs \
 			${IMAGE_LINK_NAME}${vname}.ubifs
 		fi
-		if [ -e ${IMAGE_NAME}${vname}.rootfs.ubi ]; then
-			ln -sf ${IMAGE_NAME}${vname}.rootfs.ubi \
+		if [ -e ${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubi ]; then
+			ln -sf ${IMAGE_NAME}${vname}${IMAGE_NAME_SUFFIX}.ubi \
 			${IMAGE_LINK_NAME}${vname}.ubi
 		fi
 		cd -
@@ -168,17 +176,39 @@
 	multiubi_mkfs "${MKUBIFS_ARGS}" "${UBINIZE_ARGS}"
 }
 
-IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS}"
+IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.ubifs ${MKUBIFS_ARGS}"
+
+WKS_FILE ?= "${IMAGE_BASENAME}.${MACHINE}.wks"
+WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
+WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l for l in '${BBPATH}:${COREBASE}'.split(':'))}"
+WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(), '${WKS_SEARCH_PATH}') or ''}"
+
+def wks_search(files, search_path):
+    for f in files:
+        if os.path.isabs(f):
+            if os.path.exists(f):
+                return f
+        else:
+            searched = bb.utils.which(search_path, f)
+            if searched:
+                return searched
 
 IMAGE_CMD_wic () {
-	out=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}
-	wks=${FILE_DIRNAME}/${IMAGE_BASENAME}.${MACHINE}.wks
-	[ -e $wks ] || wks=${FILE_DIRNAME}/${IMAGE_BASENAME}.wks
-	[ -e $wks ] || bbfatal "Kiskstart file $wks doesn't exist"
-	BUILDDIR=${TOPDIR} wic create $wks --vars ${STAGING_DIR_TARGET}/imgdata/ -e ${IMAGE_BASENAME} -o $out/
-	mv $out/build/${IMAGE_BASENAME}*.direct $out.rootfs.wic
-	rm -rf $out/
+	out="${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}"
+	wks="${WKS_FULL_PATH}"
+	if [ -z "$wks" ]; then
+		bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
+	fi
+
+	BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR_TARGET}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/"
+	mv "$out/build/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic"
+	rm -rf "$out/"
 }
+IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
+
+# Rebuild when the wks file or vars in WICVARS change
+USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${COMPRESSIONTYPES}'.split()), '1', '', d)}"
+do_image_wic[file-checksums] += "${@'${WKS_FULL_PATH}:%s' % os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
 
 EXTRA_IMAGECMD = ""
 
@@ -191,7 +221,7 @@
 EXTRA_IMAGECMD_ext2 ?= "-i 4096"
 EXTRA_IMAGECMD_ext3 ?= "-i 4096"
 EXTRA_IMAGECMD_ext4 ?= "-i 4096"
-EXTRA_IMAGECMD_btrfs ?= ""
+EXTRA_IMAGECMD_btrfs ?= "-n 4096"
 EXTRA_IMAGECMD_elf ?= ""
 
 IMAGE_DEPENDS = ""
@@ -232,13 +262,19 @@
     wic wic.gz wic.bz2 wic.lzma \
 "
 
-COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum"
-COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}.rootfs.${type}"
-COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.gz"
-COMPRESS_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}.rootfs.${type}"
-COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.xz"
-COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}.rootfs.${type} > ${IMAGE_NAME}.rootfs.${type}.lz4"
-COMPRESS_CMD_sum = "sumtool -i ${IMAGE_NAME}.rootfs.${type} -o ${IMAGE_NAME}.rootfs.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
+COMPRESSIONTYPES = "gz bz2 lzma xz lz4 sum md5sum sha1sum sha224sum sha256sum sha384sum sha512sum"
+COMPRESS_CMD_lzma = "lzma -k -f -7 ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
+COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.gz"
+COMPRESS_CMD_bz2 = "pbzip2 -f -k ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"
+COMPRESS_CMD_xz = "xz -f -k -c ${XZ_COMPRESSION_LEVEL} ${XZ_THREADS} --check=${XZ_INTEGRITY_CHECK} ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.xz"
+COMPRESS_CMD_lz4 = "lz4c -9 -c ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.lz4"
+COMPRESS_CMD_sum = "sumtool -i ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} -o ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sum ${JFFS2_SUM_EXTRA_ARGS}"
+COMPRESS_CMD_md5sum = "md5sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.md5sum"
+COMPRESS_CMD_sha1sum = "sha1sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha1sum"
+COMPRESS_CMD_sha224sum = "sha224sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha224sum"
+COMPRESS_CMD_sha256sum = "sha256sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha256sum"
+COMPRESS_CMD_sha384sum = "sha384sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha384sum"
+COMPRESS_CMD_sha512sum = "sha512sum ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type} > ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.sha512sum"
 COMPRESS_DEPENDS_lzma = "xz-native"
 COMPRESS_DEPENDS_gz = ""
 COMPRESS_DEPENDS_bz2 = "pbzip2-native"
diff --git a/yocto-poky/meta/classes/image_types_uboot.bbclass b/yocto-poky/meta/classes/image_types_uboot.bbclass
index 081bca2..19e4aa2 100644
--- a/yocto-poky/meta/classes/image_types_uboot.bbclass
+++ b/yocto-poky/meta/classes/image_types_uboot.bbclass
@@ -22,5 +22,5 @@
 COMPRESS_DEPENDS_lzma.u-boot = "u-boot-mkimage-native"
 COMPRESS_CMD_lzma.u-boot      = "${COMPRESS_CMD_lzma}; oe_mkimage ${IMAGE_NAME}.rootfs.${type}.lzma lzma clean"
 
-IMAGE_TYPES += "ext2.u-boot ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot ext3.gz.u-boot ext4.gz.u-boot"
+IMAGE_TYPES += "ext2.u-boot ext2.gz.u-boot ext2.bz2.u-boot ext2.lzma.u-boot ext3.gz.u-boot ext4.gz.u-boot cpio.gz.u-boot"
 
diff --git a/yocto-poky/meta/classes/insane.bbclass b/yocto-poky/meta/classes/insane.bbclass
index a77438d..c57b217 100644
--- a/yocto-poky/meta/classes/insane.bbclass
+++ b/yocto-poky/meta/classes/insane.bbclass
@@ -38,6 +38,7 @@
             perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
             split-strip packages-list pkgv-undefined var-undefined \
             version-going-backwards expanded-d invalid-chars \
+            license-checksum dev-elf \
             "
 FAKEROOT_QA = "host-user-contaminated"
 FAKEROOT_QA[doc] = "QA tests which need to run under fakeroot. If any \
@@ -45,7 +46,7 @@
 
 ALL_QA = "${WARN_QA} ${ERROR_QA}"
 
-UNKNOWN_CONFIGURE_WHITELIST ?= "--enable-nls --disable-nls --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot"
+UNKNOWN_CONFIGURE_WHITELIST ?= "--enable-nls --disable-nls --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot --disable-static"
 
 #
 # dictionary for elf headers
@@ -126,6 +127,9 @@
                         "mipsel":     (   8,     0,    0,          True,          32),
                         "mips64":     (   8,     0,    0,          False,         64),
                         "mips64el":   (   8,     0,    0,          True,          64),
+                        "microblaze":  (189,     0,    0,          False,         32),
+                        "microblazeeb":(189,     0,    0,          False,         32),
+                        "microblazeel":(189,     0,    0,          True,          32),
                       },
             "uclinux-uclibc" : {
                         "bfin":       ( 106,     0,    0,          True,         32),
@@ -189,6 +193,12 @@
         bb.note("QA Issue: %s [%s]" % (error_msg, error_class))
     return True
 
+def package_qa_add_message(messages, section, new_msg):
+    if section not in messages:
+        messages[section] = new_msg
+    else:
+        messages[section] = messages[section] + "\n" + new_msg
+
 QAPATHTEST[libexec] = "package_qa_check_libexec"
 def package_qa_check_libexec(path,name, d, elf, messages):
 
@@ -198,7 +208,7 @@
         return True
 
     if 'libexec' in path.split(os.path.sep):
-        messages["libexec"] = "%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d), libexec)
+        package_qa_add_message(messages, "libexec", "%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d), libexec))
         return False
 
     return True
@@ -226,7 +236,7 @@
             rpath = m.group(1)
             for dir in bad_dirs:
                 if dir in rpath:
-                    messages["rpaths"] = "package %s contains bad RPATH %s in file %s" % (name, rpath, file)
+                    package_qa_add_message(messages, "rpaths", "package %s contains bad RPATH %s in file %s" % (name, rpath, file))
 
 QAPATHTEST[useless-rpaths] = "package_qa_check_useless_rpaths"
 def package_qa_check_useless_rpaths(file, name, d, elf, messages):
@@ -256,7 +266,7 @@
             if rpath_eq(rpath, libdir) or rpath_eq(rpath, base_libdir):
                 # The dynamic linker searches both these places anyway.  There is no point in
                 # looking there again.
-                messages["useless-rpaths"] = "%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath)
+                package_qa_add_message(messages, "useless-rpaths", "%s: %s contains probably-redundant RPATH %s" % (name, package_qa_clean_path(file, d), rpath))
 
 QAPATHTEST[dev-so] = "package_qa_check_dev"
 def package_qa_check_dev(path, name, d, elf, messages):
@@ -265,8 +275,19 @@
     """
 
     if not name.endswith("-dev") and not name.endswith("-dbg") and not name.endswith("-ptest") and not name.startswith("nativesdk-") and path.endswith(".so") and os.path.islink(path):
-        messages["dev-so"] = "non -dev/-dbg/nativesdk- package contains symlink .so: %s path '%s'" % \
-                 (name, package_qa_clean_path(path,d))
+        package_qa_add_message(messages, "dev-so", "non -dev/-dbg/nativesdk- package contains symlink .so: %s path '%s'" % \
+                 (name, package_qa_clean_path(path,d)))
+
+QAPATHTEST[dev-elf] = "package_qa_check_dev_elf"
+def package_qa_check_dev_elf(path, name, d, elf, messages):
+    """
+    Check that -dev doesn't contain real shared libraries.  The test has to
+    check that the file is not a link and is an ELF object as some recipes
+    install link-time .so files that are linker scripts.
+    """
+    if name.endswith("-dev") and path.endswith(".so") and not os.path.islink(path) and elf:
+        package_qa_add_message(messages, "dev-elf", "-dev package contains non-symlink .so: %s path '%s'" % \
+                 (name, package_qa_clean_path(path,d)))
 
 QAPATHTEST[staticdev] = "package_qa_check_staticdev"
 def package_qa_check_staticdev(path, name, d, elf, messages):
@@ -278,8 +299,8 @@
     """
 
     if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a"):
-        messages["staticdev"] = "non -staticdev package contains static .a library: %s path '%s'" % \
-                 (name, package_qa_clean_path(path,d))
+        package_qa_add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \
+                 (name, package_qa_clean_path(path,d)))
 
 def package_qa_check_libdir(d):
     """
@@ -292,10 +313,14 @@
     pkgdest = d.getVar('PKGDEST', True)
     base_libdir = d.getVar("base_libdir",True) + os.sep
     libdir = d.getVar("libdir", True) + os.sep
+    libexecdir = d.getVar("libexecdir", True) + os.sep
     exec_prefix = d.getVar("exec_prefix", True) + os.sep
 
     messages = []
 
+    # The re's are purposely fuzzy, as some there are some .so.x.y.z files
+    # that don't follow the standard naming convention. It checks later
+    # that they are actual ELF files
     lib_re = re.compile("^/lib.+\.so(\..+)?$")
     exec_re = re.compile("^%s.*/lib.+\.so(\..+)?$" % exec_prefix)
 
@@ -307,6 +332,9 @@
                 if 'libdir' in (d.getVar('INSANE_SKIP_' + package, True) or "").split():
                     bb.note("Package %s skipping libdir QA test" % (package))
                     skippackages.append(package)
+                elif d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory' and package.endswith("-dbg"):
+                    bb.note("Package %s skipping libdir QA test for PACKAGE_DEBUG_SPLIT_STYLE equals debug-file-directory" % (package))
+                    skippackages.append(package)
             for package in skippackages:
                 dirs.remove(package)
         for file in files:
@@ -317,10 +345,22 @@
                 rel_path = os.sep + rel_path
                 if lib_re.match(rel_path):
                     if base_libdir not in rel_path:
-                        messages.append("%s: found library in wrong location: %s" % (package, rel_path))
+                        # make sure it's an actual ELF file
+                        elf = oe.qa.ELFFile(full_path)
+                        try:
+                            elf.open()
+                            messages.append("%s: found library in wrong location: %s" % (package, rel_path))
+                        except (oe.qa.NotELFFileError):
+                            pass
                 if exec_re.match(rel_path):
-                    if libdir not in rel_path:
-                        messages.append("%s: found library in wrong location: %s" % (package, rel_path))
+                    if libdir not in rel_path and libexecdir not in rel_path:
+                        # make sure it's an actual ELF file
+                        elf = oe.qa.ELFFile(full_path)
+                        try:
+                            elf.open()
+                            messages.append("%s: found library in wrong location: %s" % (package, rel_path))
+                        except (oe.qa.NotELFFileError):
+                            pass
 
     if messages:
         package_qa_handle_error("libdir", "\n".join(messages), d)
@@ -333,8 +373,8 @@
 
     if not "-dbg" in name and not "-ptest" in name:
         if '.debug' in path.split(os.path.sep):
-            messages["debug-files"] = "non debug package contains .debug directory: %s path %s" % \
-                     (name, package_qa_clean_path(path,d))
+            messages("debug-files", "non debug package contains .debug directory: %s path %s" % \
+                     (name, package_qa_clean_path(path,d)))
 
 QAPATHTEST[perms] = "package_qa_check_perm"
 def package_qa_check_perm(path,name,d, elf, messages):
@@ -403,7 +443,7 @@
         if bool(statinfo.st_mode & stat.S_IXUSR):
             # grep shell scripts for possible references to /exec_prefix/
             exec_prefix = d.getVar('exec_prefix', True)
-            statement = "grep -e '%s/' %s > /dev/null" % (exec_prefix, path)
+            statement = "grep -e '%s/[^ :]\{1,\}/[^ :]\{1,\}' %s > /dev/null" % (exec_prefix, path)
             if subprocess.call(statement, shell=True) == 0:
                 error_msg = pn + ": Found a reference to %s/ in %s" % (exec_prefix, path)
                 package_qa_handle_error("unsafe-references-in-scripts", error_msg, d)
@@ -465,7 +505,7 @@
 
     if target_arch == "allarch":
         pn = d.getVar('PN', True)
-        messages["arch"] = pn + ": Recipe inherits the allarch class, but has packaged architecture-specific binaries"
+        package_qa_add_message(messages, "arch", pn + ": Recipe inherits the allarch class, but has packaged architecture-specific binaries")
         return
 
     # FIXME: Cross package confuse this check, so just skip them
@@ -485,15 +525,15 @@
     # Check the architecture and endiannes of the binary
     if not ((machine == elf.machine()) or \
         ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
-        messages["arch"] = "Architecture did not match (%d to %d) on %s" % \
-                 (machine, elf.machine(), package_qa_clean_path(path,d))
+        package_qa_add_message(messages, "arch", "Architecture did not match (%d to %d) on %s" % \
+                 (machine, elf.machine(), package_qa_clean_path(path,d)))
     elif not ((bits == elf.abiSize()) or  \
         ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
-        messages["arch"] = "Bit size did not match (%d to %d) %s on %s" % \
-                 (bits, elf.abiSize(), bpn, package_qa_clean_path(path,d))
+        package_qa_add_message(messages, "arch", "Bit size did not match (%d to %d) %s on %s" % \
+                 (bits, elf.abiSize(), bpn, package_qa_clean_path(path,d)))
     elif not littleendian == elf.isLittleEndian():
-        messages["arch"] = "Endiannes did not match (%d to %d) on %s" % \
-                 (littleendian, elf.isLittleEndian(), package_qa_clean_path(path,d))
+        package_qa_add_message(messages, "arch", "Endiannes did not match (%d to %d) on %s" % \
+                 (littleendian, elf.isLittleEndian(), package_qa_clean_path(path,d)))
 
 QAPATHTEST[desktop] = "package_qa_check_desktop"
 def package_qa_check_desktop(path, name, d, elf, messages):
@@ -505,7 +545,7 @@
         output = os.popen("%s %s" % (desktop_file_validate, path))
         # This only produces output on errors
         for l in output:
-            messages["desktop"] = "Desktop file issue: " + l.strip()
+            package_qa_add_message(messages, "desktop", "Desktop file issue: " + l.strip())
 
 QAPATHTEST[textrel] = "package_qa_textrel"
 def package_qa_textrel(path, name, d, elf, messages):
@@ -529,7 +569,7 @@
             sane = False
 
     if not sane:
-        messages["textrel"] = "ELF binary '%s' has relocations in .text" % path
+        package_qa_add_message(messages, "textrel", "ELF binary '%s' has relocations in .text" % path)
 
 QAPATHTEST[ldflags] = "package_qa_hash_style"
 def package_qa_hash_style(path, name, d, elf, messages):
@@ -564,7 +604,7 @@
             sane = True
 
     if has_syms and not sane:
-        messages["ldflags"] = "No GNU_HASH in the elf binary: '%s'" % path
+        package_qa_add_message(messages, "ldflags", "No GNU_HASH in the elf binary: '%s'" % path)
 
 
 QAPATHTEST[buildpaths] = "package_qa_check_buildpaths"
@@ -580,11 +620,15 @@
     if os.path.islink(path):
         return
 
+    # Ignore ipk and deb's CONTROL dir
+    if path.find(name + "/CONTROL/") != -1 or path.find(name + "/DEBIAN/") != -1:
+        return
+
     tmpdir = d.getVar('TMPDIR', True)
     with open(path) as f:
         file_content = f.read()
         if tmpdir in file_content:
-            messages["buildpaths"] = "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d)
+            package_qa_add_message(messages, "buildpaths", "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d))
 
 
 QAPATHTEST[xorg-driver-abi] = "package_qa_check_xorg_driver_abi"
@@ -603,7 +647,7 @@
         for rdep in bb.utils.explode_deps(d.getVar('RDEPENDS_' + name, True) or ""):
             if rdep.startswith("%sxorg-abi-" % mlprefix):
                 return
-        messages["xorg-driver-abi"] = "Package %s contains Xorg driver (%s) but no xorg-abi- dependencies" % (name, os.path.basename(path))
+        package_qa_add_message(messages, "xorg-driver-abi", "Package %s contains Xorg driver (%s) but no xorg-abi- dependencies" % (name, os.path.basename(path)))
 
 QAPATHTEST[infodir] = "package_qa_check_infodir"
 def package_qa_check_infodir(path, name, d, elf, messages):
@@ -613,7 +657,7 @@
     infodir = d.expand("${infodir}/dir")
 
     if infodir in path:
-        messages["infodir"] = "The /usr/share/info/dir file is not meant to be shipped in a particular package."
+        package_qa_add_message(messages, "infodir", "The /usr/share/info/dir file is not meant to be shipped in a particular package.")
 
 QAPATHTEST[symlink-to-sysroot] = "package_qa_check_symlink_to_sysroot"
 def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
@@ -626,7 +670,8 @@
             tmpdir = d.getVar('TMPDIR', True)
             if target.startswith(tmpdir):
                 trimmed = path.replace(os.path.join (d.getVar("PKGDEST", True), name), "")
-                messages["symlink-to-sysroot"] = "Symlink %s in %s points to TMPDIR" % (trimmed, name)
+                package_qa_add_message(messages, "symlink-to-sysroot", "Symlink %s in %s points to TMPDIR" % (trimmed, name))
+
 def package_qa_check_license(workdir, d):
     """
     Check for changes in the license files 
@@ -639,11 +684,11 @@
     pn = d.getVar('PN', True)
 
     if lic == "CLOSED":
-        return True
+        return
 
     if not lic_files:
-        bb.error(pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)")
-        return False
+        package_qa_handle_error("license-checksum", pn + ": Recipe file does not have license file information (LIC_FILES_CHKSUM)", d)
+        return
 
     srcdir = d.getVar('S', True)
 
@@ -651,10 +696,12 @@
         try:
             (type, host, path, user, pswd, parm) = bb.fetch.decodeurl(url)
         except bb.fetch.MalformedUrl:
-            raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url)
+            package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM contains an invalid URL: " + url, d)
+            continue
         srclicfile = os.path.join(srcdir, path)
         if not os.path.isfile(srclicfile):
-            raise bb.build.FuncFailed( pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile)
+            package_qa_handle_error("license-checksum", pn + ": LIC_FILES_CHKSUM points to an invalid file: " + srclicfile, d)
+            continue
 
         recipemd5 = parm.get('md5', '')
         beginline, endline = 0, 0
@@ -689,8 +736,8 @@
             bb.note (pn + ": md5 checksum matched for ", url)
         else:
             if recipemd5:
-                bb.error(pn + ": md5 data is not matching for ", url)
-                bb.error(pn + ": The new md5 checksum is ", md5chksum)
+                msg = pn + ": The LIC_FILES_CHKSUM does not match for " + url
+                msg = msg + "\n" + pn + ": The new md5 checksum is " + md5chksum
                 if beginline:
                     if endline:
                         srcfiledesc = "%s (lines %d through to %d)" % (srclicfile, beginline, endline)
@@ -700,29 +747,26 @@
                     srcfiledesc = "%s (ending on line %d)" % (srclicfile, endline)
                 else:
                     srcfiledesc = srclicfile
-                bb.error(pn + ": Check if the license information has changed in %s to verify that the LICENSE value \"%s\" remains valid" % (srcfiledesc, lic))
-            else:
-                bb.error(pn + ": md5 checksum is not specified for ", url)
-                bb.error(pn + ": The md5 checksum is ", md5chksum)
-            sane = False
+                msg = msg + "\n" + pn + ": Check if the license information has changed in %s to verify that the LICENSE value \"%s\" remains valid" % (srcfiledesc, lic)
 
-    return sane
+            else:
+                msg = pn + ": LIC_FILES_CHKSUM is not specified for " +  url
+                msg = msg + "\n" + pn + ": The md5 checksum is " + md5chksum
+            package_qa_handle_error("license-checksum", msg, d)
 
 def package_qa_check_staged(path,d):
     """
-    Check staged la and pc files for sanity
-      -e.g. installed being false
+    Check staged la and pc files for common problems like references to the work
+    directory.
 
-        As this is run after every stage we should be able
-        to find the one responsible for the errors easily even
-        if we look at every .pc and .la file
+    As this is run after every stage we should be able to find the one
+    responsible for the errors easily even if we look at every .pc and .la file.
     """
 
     sane = True
     tmpdir = d.getVar('TMPDIR', True)
     workdir = os.path.join(tmpdir, "work")
 
-    installed = "installed=yes"
     if bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d):
         pkgconfigcheck = workdir
     else:
@@ -750,7 +794,7 @@
     return sane
 
 # Walk over all files in a directory and call func
-def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d):
+def package_qa_walk(warnfuncs, errorfuncs, skip, package, d):
     import oe.qa
 
     #if this will throw an exception, then fix the dict above
@@ -763,7 +807,8 @@
             elf = oe.qa.ELFFile(path)
             try:
                 elf.open()
-            except:
+            except (IOError, oe.qa.NotELFFileError):
+                # IOError can happen if the packaging control files disappear,
                 elf = None
             for func in warnfuncs:
                 func(path, package, d, elf, warnings)
@@ -775,15 +820,12 @@
     for e in errors:
         package_qa_handle_error(e, errors[e], d)
 
-    return len(errors) == 0
-
 def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
     # Don't do this check for kernel/module recipes, there aren't too many debug/development
     # packages and you can get false positives e.g. on kernel-module-lirc-dev
     if bb.data.inherits_class("kernel", d) or bb.data.inherits_class("module-base", d):
-        return True
+        return
 
-    sane = True
     if not "-dbg" in pkg and not "packagegroup-" in pkg and not "-image" in pkg:
         localdata = bb.data.createCopy(d)
         localdata.setVar('OVERRIDES', pkg)
@@ -797,10 +839,10 @@
             for rdepend in rdepends:
                 if "-dbg" in rdepend and "debug-deps" not in skip:
                     error_msg = "%s rdepends on %s" % (pkg,rdepend)
-                    sane = package_qa_handle_error("debug-deps", error_msg, d)
+                    package_qa_handle_error("debug-deps", error_msg, d)
                 if (not "-dev" in pkg and not "-staticdev" in pkg) and rdepend.endswith("-dev") and "dev-deps" not in skip:
                     error_msg = "%s rdepends on %s" % (pkg, rdepend)
-                    sane = package_qa_handle_error("dev-deps", error_msg, d)
+                    package_qa_handle_error("dev-deps", error_msg, d)
                 if rdepend not in packages:
                     rdep_data = oe.packagedata.read_subpkgdata(rdepend, d)
                     if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
@@ -817,8 +859,11 @@
                                 break
                     if rdep_data and 'PN' in rdep_data and rdep_data['PN'] in taskdeps:
                         continue
-                    error_msg = "%s rdepends on %s, but it isn't a build dependency?" % (pkg, rdepend)
-                    sane = package_qa_handle_error("build-deps", error_msg, d)
+                    if rdep_data and 'PN' in rdep_data:
+                        error_msg = "%s rdepends on %s, but it isn't a build dependency, missing %s in DEPENDS or PACKAGECONFIG?" % (pkg, rdepend, rdep_data['PN'])
+                    else:
+                        error_msg = "%s rdepends on %s, but it isn't a build dependency?" % (pkg, rdepend)
+                    package_qa_handle_error("build-deps", error_msg, d)
 
         if "file-rdeps" not in skip:
             ignored_file_rdeps = set(['/bin/sh', '/usr/bin/env', 'rtld(GNU_HASH)'])
@@ -883,21 +928,17 @@
                         break
             if filerdepends:
                 for key in filerdepends:
-                    error_msg = "%s contained in package %s requires %s, but no providers found in its RDEPENDS" % \
-                            (filerdepends[key],pkg, key)
-                sane = package_qa_handle_error("file-rdeps", error_msg, d)
-
-    return sane
+                    error_msg = "%s contained in package %s requires %s, but no providers found in RDEPENDS_%s?" % \
+                            (filerdepends[key].replace("_%s" % pkg, "").replace("@underscore@", "_"), pkg, key, pkg)
+                package_qa_handle_error("file-rdeps", error_msg, d)
 
 def package_qa_check_deps(pkg, pkgdest, skip, d):
-    sane = True
 
     localdata = bb.data.createCopy(d)
     localdata.setVar('OVERRIDES', pkg)
     bb.data.update_data(localdata)
 
     def check_valid_deps(var):
-        sane = True
         try:
             rvar = bb.utils.explode_dep_versions2(localdata.getVar(var, True) or "")
         except ValueError as e:
@@ -906,24 +947,14 @@
             for v in rvar[dep]:
                 if v and not v.startswith(('< ', '= ', '> ', '<= ', '>=')):
                     error_msg = "%s_%s is invalid: %s (%s)   only comparisons <, =, >, <=, and >= are allowed" % (var, pkg, dep, v)
-                    sane = package_qa_handle_error("dep-cmp", error_msg, d)
-        return sane
+                    package_qa_handle_error("dep-cmp", error_msg, d)
 
-    sane = True
-    if not check_valid_deps('RDEPENDS'):
-        sane = False
-    if not check_valid_deps('RRECOMMENDS'):
-        sane = False
-    if not check_valid_deps('RSUGGESTS'):
-        sane = False
-    if not check_valid_deps('RPROVIDES'):
-        sane = False
-    if not check_valid_deps('RREPLACES'):
-        sane = False
-    if not check_valid_deps('RCONFLICTS'):
-        sane = False
-
-    return sane
+    check_valid_deps('RDEPENDS')
+    check_valid_deps('RRECOMMENDS')
+    check_valid_deps('RSUGGESTS')
+    check_valid_deps('RPROVIDES')
+    check_valid_deps('RREPLACES')
+    check_valid_deps('RCONFLICTS')
 
 QAPATHTEST[expanded-d] = "package_qa_check_expanded_d"
 def package_qa_check_expanded_d(path,name,d,elf,messages):
@@ -945,10 +976,10 @@
                 # Bitbake expands ${D} within bbvar during the previous step, so we check for its expanded value
                 if expanded_d in bbvar:
                     if var == 'FILES':
-                        messages["expanded-d"] = "FILES in %s recipe should not contain the ${D} variable as it references the local build directory not the target filesystem, best solution is to remove the ${D} reference" % pak
+                        package_qa_add_message(messages, "expanded-d", "FILES in %s recipe should not contain the ${D} variable as it references the local build directory not the target filesystem, best solution is to remove the ${D} reference" % pak)
                         sane = False
                     else:
-                        messages["expanded-d"] = "%s in %s recipe contains ${D}, it should be replaced by $D instead" % (var, pak)
+                        package_qa_add_message(messages, "expanded-d", "%s in %s recipe contains ${D}, it should be replaced by $D instead" % (var, pak))
                         sane = False
     return sane
 
@@ -996,12 +1027,12 @@
         rootfs_path = path[len(dest):]
         check_uid = int(d.getVar('HOST_USER_UID', True))
         if stat.st_uid == check_uid:
-            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, rootfs_path, check_uid))
             return False
 
         check_gid = int(d.getVar('HOST_USER_GID', True))
         if stat.st_gid == check_gid:
-            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, rootfs_path, check_gid))
             return False
     return True
 
@@ -1068,9 +1099,6 @@
         taskdeps.add(taskdepdata[dep][0])
 
     g = globals()
-    walk_sane = True
-    rdepends_sane = True
-    deps_sane = True
     for package in packages:
         skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split()
         if skip:
@@ -1081,12 +1109,17 @@
                continue
             if w in testmatrix and testmatrix[w] in g:
                 warnchecks.append(g[testmatrix[w]])
+            if w == 'unsafe-references-in-binaries':
+                oe.utils.write_ld_so_conf(d)
+
         errorchecks = []
         for e in (d.getVar("ERROR_QA", True) or "").split():
             if e in skip:
                continue
             if e in testmatrix and testmatrix[e] in g:
                 errorchecks.append(g[testmatrix[e]])
+            if e == 'unsafe-references-in-binaries':
+                oe.utils.write_ld_so_conf(d)
 
         bb.note("Checking Package: %s" % package)
         # Check package name
@@ -1095,23 +1128,21 @@
                     "%s doesn't match the [a-z0-9.+-]+ regex" % package, d)
 
         path = "%s/%s" % (pkgdest, package)
-        if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d):
-            walk_sane  = False
-        if not package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d):
-            rdepends_sane = False
-        if not package_qa_check_deps(package, pkgdest, skip, d):
-            deps_sane = False
+        package_qa_walk(warnchecks, errorchecks, skip, package, d)
 
+        package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d)
+        package_qa_check_deps(package, pkgdest, skip, d)
 
     if 'libdir' in d.getVar("ALL_QA", True).split():
         package_qa_check_libdir(d)
 
     qa_sane = d.getVar("QA_SANE", True)
-    if not walk_sane or not rdepends_sane or not deps_sane or not qa_sane:
+    if not qa_sane:
         bb.fatal("QA run found fatal errors. Please consider fixing them.")
     bb.note("DONE with PACKAGE QA")
 }
 
+do_package_qa[vardepsexclude] = "BB_TASKDEPDATA"
 do_package_qa[rdeptask] = "do_packagedata"
 addtask do_package_qa after do_packagedata do_package before do_build
 
@@ -1126,7 +1157,7 @@
 python do_qa_staging() {
     bb.note("QA checking staging")
 
-    if not package_qa_check_staged(d.expand('${SYSROOT_DESTDIR}${STAGING_LIBDIR}'), d):
+    if not package_qa_check_staged(d.expand('${SYSROOT_DESTDIR}${libdir}'), d):
         bb.fatal("QA staging was broken by the package built above")
 }
 
@@ -1139,19 +1170,21 @@
 
     configs = []
     workdir = d.getVar('WORKDIR', True)
-    bb.note("Checking autotools environment for common misconfiguration")
-    for root, dirs, files in os.walk(workdir):
-        statement = "grep -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s > /dev/null" % \
-                    os.path.join(root,"config.log")
-        if "config.log" in files:
-            if subprocess.call(statement, shell=True) == 0:
-                bb.fatal("""This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
+
+    if bb.data.inherits_class('autotools', d):
+        bb.note("Checking autotools environment for common misconfiguration")
+        for root, dirs, files in os.walk(workdir):
+            statement = "grep -q -F -e 'CROSS COMPILE Badness:' -e 'is unsafe for cross-compilation' %s" % \
+                        os.path.join(root,"config.log")
+            if "config.log" in files:
+                if subprocess.call(statement, shell=True) == 0:
+                    bb.fatal("""This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
 Rerun configure task after fixing this.""")
 
-        if "configure.ac" in files:
-            configs.append(os.path.join(root,"configure.ac"))
-        if "configure.in" in files:
-            configs.append(os.path.join(root, "configure.in"))
+            if "configure.ac" in files:
+                configs.append(os.path.join(root,"configure.ac"))
+            if "configure.in" in files:
+                configs.append(os.path.join(root, "configure.in"))
 
     ###########################################################################
     # Check gettext configuration and dependencies are correct
@@ -1178,8 +1211,7 @@
     # Check license variables
     ###########################################################################
 
-    if not package_qa_check_license(workdir, d):
-        bb.fatal("Licensing Error: LIC_FILES_CHKSUM does not match, please fix")
+    package_qa_check_license(workdir, d)
 
     ###########################################################################
     # Check unrecognised configure options (with a white list)
@@ -1211,6 +1243,10 @@
                 pn = d.getVar('PN', True)
                 error_msg = "%s: invalid PACKAGECONFIG: %s" % (pn, pconfig)
                 package_qa_handle_error("invalid-packageconfig", error_msg, d)
+
+    qa_sane = d.getVar("QA_SANE", True)
+    if not qa_sane:
+        bb.fatal("Fatal QA errors found, failing task.")
 }
 
 python do_qa_unpack() {
@@ -1255,9 +1291,6 @@
         msg += "%s\n" % extrapaths
         bb.warn(msg)
 
-    if d.getVar('do_stage', True) is not None:
-        bb.fatal("Legacy staging found for %s as it has a do_stage function. This will need conversion to a do_install or often simply removal to work with OE-core" % d.getVar("FILE", True))
-
     overrides = d.getVar('OVERRIDES', True).split(':')
     pn = d.getVar('PN', True)
     if pn in overrides:
@@ -1280,4 +1313,7 @@
         d.setVarFlag('do_package_qa', 'rdeptask', '')
     for i in issues:
         package_qa_handle_error("pkgvarcheck", "%s: Variable %s is set as not being package specific, please fix this." % (d.getVar("FILE", True), i), d)
+    qa_sane = d.getVar("QA_SANE", True)
+    if not qa_sane:
+        bb.fatal("Fatal QA errors found, failing task.")
 }
diff --git a/yocto-poky/meta/classes/kernel-arch.bbclass b/yocto-poky/meta/classes/kernel-arch.bbclass
index d8b180e..3ed5986 100644
--- a/yocto-poky/meta/classes/kernel-arch.bbclass
+++ b/yocto-poky/meta/classes/kernel-arch.bbclass
@@ -21,9 +21,7 @@
 
     valid_archs = d.getVar('valid_archs', True).split()
 
-    if   re.match('i.86$', a):                  return 'i386'
-    elif re.match('x86.64$', a):                return 'x86_64'
-    elif re.match('athlon$', a):                return 'x86'
+    if   re.match('(i.86|athlon|x86.64)$', a):  return 'x86'
     elif re.match('armeb$', a):                 return 'arm'
     elif re.match('aarch64$', a):               return 'arm64'
     elif re.match('aarch64_be$', a):            return 'arm64'
diff --git a/yocto-poky/meta/classes/kernel-fitimage.bbclass b/yocto-poky/meta/classes/kernel-fitimage.bbclass
index 2a56a54..e5b75ed 100644
--- a/yocto-poky/meta/classes/kernel-fitimage.bbclass
+++ b/yocto-poky/meta/classes/kernel-fitimage.bbclass
@@ -14,7 +14,7 @@
 
         image = d.getVar('INITRAMFS_IMAGE', True)
         if image:
-            d.appendVarFlag('do_assemble_fitimage', 'depends', ' ${INITRAMFS_IMAGE}:do_rootfs')
+            d.appendVarFlag('do_assemble_fitimage', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
 }
 
 #
@@ -215,6 +215,7 @@
 
 addtask assemble_fitimage before do_install after do_compile
 
+kernel_do_deploy[vardepsexclude] = "DATETIME"
 kernel_do_deploy_append() {
 	# Update deploy directory
 	if test "x${KERNEL_IMAGETYPE}" = "xfitImage" ; then
diff --git a/yocto-poky/meta/classes/kernel-yocto.bbclass b/yocto-poky/meta/classes/kernel-yocto.bbclass
index c2d0d30..f86b3ef 100644
--- a/yocto-poky/meta/classes/kernel-yocto.bbclass
+++ b/yocto-poky/meta/classes/kernel-yocto.bbclass
@@ -1,5 +1,5 @@
 # remove tasks that modify the source tree in case externalsrc is inherited
-SRCTREECOVEREDTASKS += "do_kernel_link_vmlinux do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_shared_workdir do_fetch do_unpack do_patch"
+SRCTREECOVEREDTASKS += "do_kernel_configme do_validate_branches do_kernel_configcheck do_kernel_checkout do_shared_workdir do_fetch do_unpack do_patch"
 
 # returns local (absolute) path names for all valid patches in the
 # src_uri
@@ -170,6 +170,17 @@
 		fi
 	fi
 
+        current_branch=`git rev-parse --abbrev-ref HEAD`
+        machine_branch="${@ get_machine_branch(d, "${KBRANCH}" )}"
+        if [ "${current_branch}" != "${machine_branch}" ]; then
+            bbwarn "After meta data application, the kernel tree branch is ${current_branch}. The"
+            bbwarn "SRC_URI specified branch ${machine_branch}. The branch will be forced to ${machine_branch},"
+            bbwarn "but this means the board meta data (.scc files) do not match the SRC_URI specification."
+            bbwarn "The meta data and branch ${machine_branch} should be inspected to ensure the proper"
+            bbwarn "kernel is being built."
+            git checkout -f ${machine_branch}
+        fi
+
 	if [ "${machine_srcrev}" != "AUTOINC" ]; then
 		if ! [ "$(git rev-parse --verify ${machine_srcrev}~0)" = "$(git merge-base ${machine_srcrev} HEAD)" ]; then
 			bberror "SRCREV ${machine_srcrev} was specified, but is not reachable"
@@ -355,18 +366,6 @@
 	fi
 }
 
-# Many scripts want to look in arch/$arch/boot for the bootable
-# image. This poses a problem for vmlinux based booting. This 
-# task arranges to have vmlinux appear in the normalized directory
-# location.
-do_kernel_link_vmlinux() {
-	if [ ! -d "${B}/arch/${ARCH}/boot" ]; then
-		mkdir ${B}/arch/${ARCH}/boot
-	fi
-	cd ${B}/arch/${ARCH}/boot
-	ln -sf ../../../vmlinux
-}
-
 OE_TERMINAL_EXPORTS += "KBUILD_OUTPUT"
 KBUILD_OUTPUT = "${B}"
 
diff --git a/yocto-poky/meta/classes/kernel.bbclass b/yocto-poky/meta/classes/kernel.bbclass
index ee3e9a0..6e3e81e 100644
--- a/yocto-poky/meta/classes/kernel.bbclass
+++ b/yocto-poky/meta/classes/kernel.bbclass
@@ -25,7 +25,7 @@
 
     image = d.getVar('INITRAMFS_IMAGE', True)
     if image:
-        d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_rootfs')
+        d.appendVarFlag('do_bundle_initramfs', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete')
 
     # NOTE: setting INITRAMFS_TASK is for backward compatibility
     #       The preferred method is to set INITRAMFS_IMAGE, because
@@ -217,6 +217,14 @@
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
 	if (grep -q -i -e '^CONFIG_MODULES=y$' ${B}/.config); then
 		oe_runmake -C ${B} ${PARALLEL_MAKE} modules CC="${KERNEL_CC}" LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS}
+
+		# Module.symvers gets updated during the 
+		# building of the kernel modules. We need to
+		# update this in the shared workdir since some
+		# external kernel modules has a dependency on
+		# other kernel modules and will look at this
+		# file to do symbol lookups
+		cp Module.symvers ${STAGING_KERNEL_BUILDDIR}/
 	else
 		bbnote "no modules to compile"
 	fi
@@ -309,18 +317,9 @@
 		cp -fR include/generated/* $kerneldir/include/generated/
 	fi
 
-	# When ARCH is set to i386 or x86_64, we need to map ARCH to the real name of src
-	# dir (x86) under arch/ of kenrel tree, so that we can find correct source to copy.
-
-	if [ "${ARCH}" = "i386" ] || [ "${ARCH}" = "x86_64" ]; then
-		KERNEL_SRCARCH=x86
-	else
-		KERNEL_SRCARCH=${ARCH}
-	fi
-
-	if [ -d arch/${KERNEL_SRCARCH}/include/generated ]; then
-		mkdir -p $kerneldir/arch/${KERNEL_SRCARCH}/include/generated/
-		cp -fR arch/${KERNEL_SRCARCH}/include/generated/* $kerneldir/arch/${KERNEL_SRCARCH}/include/generated/
+	if [ -d arch/${ARCH}/include/generated ]; then
+		mkdir -p $kerneldir/arch/${ARCH}/include/generated/
+		cp -fR arch/${ARCH}/include/generated/* $kerneldir/arch/${ARCH}/include/generated/
 	fi
 }
 
@@ -347,7 +346,8 @@
 	if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
 		cp "${WORKDIR}/defconfig" "${B}/.config"
 	fi
-	eval ${KERNEL_CONFIG_COMMAND}
+
+	${KERNEL_CONFIG_COMMAND}
 }
 
 do_savedefconfig() {
@@ -405,7 +405,19 @@
 PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
 
 python split_kernel_packages () {
-    do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.(bin|fw|cis|dsp)$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
+    do_split_packages(d, root='/lib/firmware', file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='kernel-firmware-%s', description='Firmware for %s', recursive=True, extra_depends='')
+}
+
+# Many scripts want to look in arch/$arch/boot for the bootable
+# image. This poses a problem for vmlinux based booting. This 
+# task arranges to have vmlinux appear in the normalized directory
+# location.
+do_kernel_link_vmlinux() {
+	if [ ! -d "${B}/arch/${ARCH}/boot" ]; then
+		mkdir ${B}/arch/${ARCH}/boot
+	fi
+	cd ${B}/arch/${ARCH}/boot
+	ln -sf ../../../vmlinux
 }
 
 do_strip() {
@@ -490,6 +502,7 @@
 		ln -sf ${initramfs_base_name}.bin ${initramfs_symlink_name}.bin
 	fi
 }
+do_deploy[cleandirs] = "${DEPLOYDIR}"
 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
 do_deploy[prefuncs] += "package_get_auto_pr"
 
diff --git a/yocto-poky/meta/classes/libc-package.bbclass b/yocto-poky/meta/classes/libc-package.bbclass
index adb4230..467d567 100644
--- a/yocto-poky/meta/classes/libc-package.bbclass
+++ b/yocto-poky/meta/classes/libc-package.bbclass
@@ -332,6 +332,8 @@
         bb.build.exec_func("do_prep_locale_tree", d)
 
     utf8_only = int(d.getVar('LOCALE_UTF8_ONLY', True) or 0)
+    utf8_is_default = int(d.getVar('LOCALE_UTF8_IS_DEFAULT', True) or 0)
+
     encodings = {}
     for locale in to_generate:
         charset = supported[locale]
@@ -344,10 +346,11 @@
         else:
             base = locale
 
-        # Precompiled locales are kept as is, obeying SUPPORTED, while
-        # others are adjusted, ensuring that the non-suffixed locales
-        # are utf-8, while the suffixed are not.
-        if use_bin == "precompiled":
+        # Non-precompiled locales may be renamed so that the default
+        # (non-suffixed) encoding is always UTF-8, i.e., instead of en_US and
+        # en_US.UTF-8, we have en_US and en_US.ISO-8859-1. This implicitly
+        # contradicts SUPPORTED.
+        if use_bin == "precompiled" or not utf8_is_default:
             output_locale(locale, base, charset)
         else:
             if charset == 'UTF-8':
diff --git a/yocto-poky/meta/classes/license.bbclass b/yocto-poky/meta/classes/license.bbclass
index 8ad4614..43944e6 100644
--- a/yocto-poky/meta/classes/license.bbclass
+++ b/yocto-poky/meta/classes/license.bbclass
@@ -21,25 +21,28 @@
     license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}')
     bb.utils.mkdirhier(license_image_dir)
     from oe.rootfs import image_list_installed_packages
+    from oe.utils import format_pkg_list
+
+    pkgs = image_list_installed_packages(d)
+    output = format_pkg_list(pkgs)
     open(os.path.join(license_image_dir, 'package.manifest'),
-        'w+').write(image_list_installed_packages(d))
+        'w+').write(output)
+}
+
+python write_deploy_manifest() {
+    license_deployed_manifest(d)
 }
 
 python license_create_manifest() {
-    import re
     import oe.packagedata
     from oe.rootfs import image_list_installed_packages
 
-    bad_licenses = (d.getVar("INCOMPATIBLE_LICENSE", True) or "").split()
-    bad_licenses = map(lambda l: canonical_license(d, l), bad_licenses)
-    bad_licenses = expand_wildcard_licenses(d, bad_licenses)
-
     build_images_from_feeds = d.getVar('BUILD_IMAGES_FROM_FEEDS', True)
     if build_images_from_feeds == "1":
         return 0
 
     pkg_dic = {}
-    for pkg in image_list_installed_packages(d).splitlines():
+    for pkg in sorted(image_list_installed_packages(d)):
         pkg_info = os.path.join(d.getVar('PKGDATA_DIR', True),
                                 'runtime-reverse', pkg)
         pkg_name = os.path.basename(os.readlink(pkg_info))
@@ -49,8 +52,18 @@
             pkg_lic_name = "LICENSE_" + pkg_name
             pkg_dic[pkg_name]["LICENSE"] = pkg_dic[pkg_name][pkg_lic_name]
 
-    license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
+    rootfs_license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
                         d.getVar('IMAGE_NAME', True), 'license.manifest')
+    write_license_files(d, rootfs_license_manifest, pkg_dic)
+}
+
+def write_license_files(d, license_manifest, pkg_dic):
+    import re
+
+    bad_licenses = (d.getVar("INCOMPATIBLE_LICENSE", True) or "").split()
+    bad_licenses = map(lambda l: canonical_license(d, l), bad_licenses)
+    bad_licenses = expand_wildcard_licenses(d, bad_licenses)
+
     with open(license_manifest, "w") as license_file:
         for pkg in sorted(pkg_dic):
             if bad_licenses:
@@ -61,20 +74,28 @@
                 except oe.license.LicenseError as exc:
                     bb.fatal('%s: %s' % (d.getVar('P', True), exc))
             else:
-                pkg_dic[pkg]["LICENSES"] = re.sub('[|&()*]', '', pkg_dic[pkg]["LICENSE"])
+                pkg_dic[pkg]["LICENSES"] = re.sub('[|&()*]', ' ', pkg_dic[pkg]["LICENSE"])
                 pkg_dic[pkg]["LICENSES"] = re.sub('  *', ' ', pkg_dic[pkg]["LICENSES"])
                 pkg_dic[pkg]["LICENSES"] = pkg_dic[pkg]["LICENSES"].split()
 
-            license_file.write("PACKAGE NAME: %s\n" % pkg)
-            license_file.write("PACKAGE VERSION: %s\n" % pkg_dic[pkg]["PV"])
-            license_file.write("RECIPE NAME: %s\n" % pkg_dic[pkg]["PN"])
-            license_file.write("LICENSE: %s\n\n" % pkg_dic[pkg]["LICENSE"])
+            if not "IMAGE_MANIFEST" in pkg_dic[pkg]:
+                # Rootfs manifest
+                license_file.write("PACKAGE NAME: %s\n" % pkg)
+                license_file.write("PACKAGE VERSION: %s\n" % pkg_dic[pkg]["PV"])
+                license_file.write("RECIPE NAME: %s\n" % pkg_dic[pkg]["PN"])
+                license_file.write("LICENSE: %s\n\n" % pkg_dic[pkg]["LICENSE"])
 
-            # If the package doesn't contain any file, that is, its size is 0, the license
-            # isn't relevant as far as the final image is concerned. So doing license check
-            # doesn't make much sense, skip it.
-            if pkg_dic[pkg]["PKGSIZE_%s" % pkg] == "0":
-                continue
+                # If the package doesn't contain any file, that is, its size is 0, the license
+                # isn't relevant as far as the final image is concerned. So doing license check
+                # doesn't make much sense, skip it.
+                if pkg_dic[pkg]["PKGSIZE_%s" % pkg] == "0":
+                    continue
+            else:
+                # Image manifest
+                license_file.write("RECIPE NAME: %s\n" % pkg_dic[pkg]["PN"])
+                license_file.write("VERSION: %s\n" % pkg_dic[pkg]["PV"])
+                license_file.write("LICENSE: %s\n" % pkg_dic[pkg]["LICENSE"])
+                license_file.write("FILES: %s\n\n" % pkg_dic[pkg]["FILES"])
 
             for lic in pkg_dic[pkg]["LICENSES"]:
                 lic_file = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
@@ -98,15 +119,16 @@
     if copy_lic_manifest == "1":
         rootfs_license_dir = os.path.join(d.getVar('IMAGE_ROOTFS', 'True'), 
                                 'usr', 'share', 'common-licenses')
-        os.makedirs(rootfs_license_dir)
+        bb.utils.mkdirhier(rootfs_license_dir)
         rootfs_license_manifest = os.path.join(rootfs_license_dir,
-                                                'license.manifest')
-        os.link(license_manifest, rootfs_license_manifest)
+                os.path.split(license_manifest)[1])
+        if not os.path.exists(rootfs_license_manifest):
+            os.link(license_manifest, rootfs_license_manifest)
 
         if copy_lic_dirs == "1":
             for pkg in sorted(pkg_dic):
                 pkg_rootfs_license_dir = os.path.join(rootfs_license_dir, pkg)
-                os.makedirs(pkg_rootfs_license_dir)
+                bb.utils.mkdirhier(pkg_rootfs_license_dir)
                 pkg_license_dir = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
                                             pkg_dic[pkg]["PN"]) 
                 licenses = os.listdir(pkg_license_dir)
@@ -124,14 +146,145 @@
                         if not os.path.exists(rootfs_license):
                             os.link(pkg_license, rootfs_license)
 
-                        os.symlink(os.path.join('..', lic), pkg_rootfs_license)
+                        if not os.path.exists(pkg_rootfs_license):
+                            os.symlink(os.path.join('..', lic), pkg_rootfs_license)
                     else:
-                        if oe.license.license_ok(canonical_license(d,
-                            lic), bad_licenses) == False:
+                        if (oe.license.license_ok(canonical_license(d,
+                                lic), bad_licenses) == False or
+                                os.path.exists(pkg_rootfs_license)):
                             continue
 
                         os.link(pkg_license, pkg_rootfs_license)
-}
+
+
+def license_deployed_manifest(d):
+    """
+    Write the license manifest for the deployed recipes.
+    The deployed recipes usually includes the bootloader
+    and extra files to boot the target.
+    """
+
+    dep_dic = {}
+    man_dic = {}
+    lic_dir = d.getVar("LICENSE_DIRECTORY", True)
+
+    dep_dic = get_deployed_dependencies(d)
+    for dep in dep_dic.keys():
+        man_dic[dep] = {}
+        # It is necessary to mark this will be used for image manifest
+        man_dic[dep]["IMAGE_MANIFEST"] = True
+        man_dic[dep]["PN"] = dep
+        man_dic[dep]["FILES"] = \
+            " ".join(get_deployed_files(dep_dic[dep]))
+        with open(os.path.join(lic_dir, dep, "recipeinfo"), "r") as f:
+            for line in f.readlines():
+                key,val = line.split(": ", 1)
+                man_dic[dep][key] = val[:-1]
+
+    image_license_manifest = os.path.join(d.getVar('LICENSE_DIRECTORY', True),
+            d.getVar('IMAGE_NAME', True), 'image_license.manifest')
+    write_license_files(d, image_license_manifest, man_dic)
+
+def get_deployed_dependencies(d):
+    """
+    Get all the deployed dependencies of an image
+    """
+
+    deploy = {}
+    # Get all the dependencies for the current task (rootfs).
+    # Also get EXTRA_IMAGEDEPENDS because the bootloader is
+    # usually in this var and not listed in rootfs.
+    # At last, get the dependencies from boot classes because
+    # it might contain the bootloader.
+    taskdata = d.getVar("BB_TASKDEPDATA", False)
+    depends = list(set([dep[0] for dep
+                    in taskdata.itervalues()
+                    if not dep[0].endswith("-native")]))
+    extra_depends = d.getVar("EXTRA_IMAGEDEPENDS", True)
+    boot_depends = get_boot_dependencies(d)
+    depends.extend(extra_depends.split())
+    depends.extend(boot_depends)
+    depends = list(set(depends))
+
+    # To verify what was deployed it checks the rootfs dependencies against
+    # the SSTATE_MANIFESTS for "deploy" task.
+    # The manifest file name contains the arch. Because we are not running
+    # in the recipe context it is necessary to check every arch used.
+    sstate_manifest_dir = d.getVar("SSTATE_MANIFESTS", True)
+    sstate_archs = d.getVar("SSTATE_ARCHS", True)
+    extra_archs = d.getVar("PACKAGE_EXTRA_ARCHS", True)
+    archs = list(set(("%s %s" % (sstate_archs, extra_archs)).split()))
+    for dep in depends:
+        # Some recipes have an arch on their own, so we try that first.
+        special_arch = d.getVar("PACKAGE_ARCH_pn-%s" % dep, True)
+        if special_arch:
+            sstate_manifest_file = os.path.join(sstate_manifest_dir,
+                    "manifest-%s-%s.deploy" % (special_arch, dep))
+            if os.path.exists(sstate_manifest_file):
+                deploy[dep] = sstate_manifest_file
+                continue
+
+        for arch in archs:
+            sstate_manifest_file = os.path.join(sstate_manifest_dir,
+                    "manifest-%s-%s.deploy" % (arch, dep))
+            if os.path.exists(sstate_manifest_file):
+                deploy[dep] = sstate_manifest_file
+                break
+
+    return deploy
+get_deployed_dependencies[vardepsexclude] = "BB_TASKDEPDATA"
+
+def get_boot_dependencies(d):
+    """
+    Return the dependencies from boot tasks
+    """
+
+    depends = []
+    boot_depends_string = ""
+    taskdepdata = d.getVar("BB_TASKDEPDATA", False)
+    # Only bootimg and bootdirectdisk include the depends flag
+    boot_tasks = ["do_bootimg", "do_bootdirectdisk",]
+
+    for task in boot_tasks:
+        boot_depends_string = "%s %s" % (boot_depends_string,
+                d.getVarFlag(task, "depends", True) or "")
+    boot_depends = [dep.split(":")[0] for dep
+                in boot_depends_string.split()
+                if not dep.split(":")[0].endswith("-native")]
+    for dep in boot_depends:
+        info_file = os.path.join(d.getVar("LICENSE_DIRECTORY", True),
+                dep, "recipeinfo")
+        # If the recipe and dependency name is the same
+        if os.path.exists(info_file):
+            depends.append(dep)
+        # We need to search for the provider of the dependency
+        else:
+            for taskdep in taskdepdata.itervalues():
+                # The fifth field contains what the task provides
+                if dep in taskdep[4]:
+                    info_file = os.path.join(
+                            d.getVar("LICENSE_DIRECTORY", True),
+                            taskdep[0], "recipeinfo")
+                    if os.path.exists(info_file):
+                        depends.append(taskdep[0])
+                        break
+    return depends
+get_boot_dependencies[vardepsexclude] = "BB_TASKDEPDATA"
+
+def get_deployed_files(man_file):
+    """
+    Get the files deployed from the sstate manifest
+    """
+
+    dep_files = []
+    excluded_files = ["README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt"]
+    with open(man_file, "r") as manifest:
+        all_files = manifest.read()
+    for f in all_files.splitlines():
+        if ((not (os.path.islink(f) or os.path.isdir(f))) and
+                not os.path.basename(f) in excluded_files):
+            dep_files.append(os.path.basename(f))
+    return dep_files
 
 python do_populate_lic() {
     """
@@ -142,6 +295,10 @@
     # The base directory we wrangle licenses to
     destdir = os.path.join(d.getVar('LICSSTATEDIR', True), d.getVar('PN', True))
     copy_license_files(lic_files_paths, destdir)
+    info = get_recipe_info(d)
+    with open(os.path.join(destdir, "recipeinfo"), "w") as f:
+        for key in sorted(info.keys()):
+            f.write("%s: %s\n" % (key, info[key]))
 }
 
 # it would be better to copy them in do_install_append, but find_license_filesa is python
@@ -155,6 +312,14 @@
         copy_license_files(lic_files_paths, destdir)
         add_package_and_files(d)
 }
+perform_packagecopy[vardeps] += "LICENSE_CREATE_PACKAGE"
+
+def get_recipe_info(d):
+    info = {}
+    info["PV"] = d.getVar("PV", True)
+    info["PR"] = d.getVar("PR", True)
+    info["LICENSE"] = d.getVar("LICENSE", True)
+    return info
 
 def add_package_and_files(d):
     packages = d.getVar('PACKAGES', True)
@@ -185,6 +350,18 @@
                 os.remove(dst)
             if os.access(src, os.W_OK) and (os.stat(src).st_dev == os.stat(destdir).st_dev):
                 os.link(src, dst)
+                try:
+                    os.chown(dst,0,0)
+                except OSError as err:
+                    import errno
+                    if err.errno in (errno.EPERM, errno.EINVAL):
+                        # Suppress "Operation not permitted" error, as
+                        # sometimes this function is not executed under pseudo.
+                        # Also ignore "Invalid argument" errors that happen in
+                        # some (unprivileged) container environments (no root).
+                        pass
+                    else:
+                        raise
             else:
                 shutil.copyfile(src, dst)
         except Exception as e:
@@ -252,10 +429,10 @@
 
         for lic_dir in license_source_dirs:
             if not os.path.isfile(os.path.join(lic_dir, license_type)):
-                if d.getVarFlag('SPDXLICENSEMAP', license_type) != None:
+                if d.getVarFlag('SPDXLICENSEMAP', license_type, True) != None:
                     # Great, there is an SPDXLICENSEMAP. We can copy!
                     bb.debug(1, "We need to use a SPDXLICENSEMAP for %s" % (license_type))
-                    spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type)
+                    spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type, True)
                     license_source = lic_dir
                     break
             elif os.path.isfile(os.path.join(lic_dir, license_type)):
@@ -271,14 +448,14 @@
 
             # The user may attempt to use NO_GENERIC_LICENSE for a generic license which doesn't make sense
             # and should not be allowed, warn the user in this case.
-            if d.getVarFlag('NO_GENERIC_LICENSE', license_type):
+            if d.getVarFlag('NO_GENERIC_LICENSE', license_type, True):
                 bb.warn("%s: %s is a generic license, please don't use NO_GENERIC_LICENSE for it." % (pn, license_type))
 
-        elif d.getVarFlag('NO_GENERIC_LICENSE', license_type):
+        elif d.getVarFlag('NO_GENERIC_LICENSE', license_type, True):
             # if NO_GENERIC_LICENSE is set, we copy the license files from the fetched source
             # of the package rather than the license_source_dirs.
             for (basename, path) in lic_files_paths:
-                if d.getVarFlag('NO_GENERIC_LICENSE', license_type) == basename:
+                if d.getVarFlag('NO_GENERIC_LICENSE', license_type, True) == basename:
                     lic_files_paths.append(("generic_" + license_type, path))
                     break
         else:
@@ -346,7 +523,7 @@
     spdxmapkeys = d.getVarFlags('SPDXLICENSEMAP').keys()
     for wld_lic in wildcard_licenses:
         spdxflags = fnmatch.filter(spdxmapkeys, wld_lic)
-        licenses += [d.getVarFlag('SPDXLICENSEMAP', flag) for flag in spdxflags]
+        licenses += [d.getVarFlag('SPDXLICENSEMAP', flag, True) for flag in spdxflags]
 
     spdx_lics = (d.getVar('SRC_DISTRIBUTE_LICENSES', False) or '').split()
     for wld_lic in wildcard_licenses:
@@ -476,6 +653,9 @@
 ROOTFS_POSTPROCESS_COMMAND_prepend = "write_package_manifest; license_create_manifest; "
 do_rootfs[recrdeptask] += "do_populate_lic"
 
+IMAGE_POSTPROCESS_COMMAND_prepend = "write_deploy_manifest; "
+do_image[recrdeptask] += "do_populate_lic"
+
 do_populate_lic_setscene[dirs] = "${LICSSTATEDIR}/${PN}"
 do_populate_lic_setscene[cleandirs] = "${LICSSTATEDIR}"
 python do_populate_lic_setscene () {
diff --git a/yocto-poky/meta/classes/linuxloader.bbclass b/yocto-poky/meta/classes/linuxloader.bbclass
new file mode 100644
index 0000000..5c4dc5c
--- /dev/null
+++ b/yocto-poky/meta/classes/linuxloader.bbclass
@@ -0,0 +1,24 @@
+
+linuxloader () {
+	case ${TARGET_ARCH} in
+		powerpc | mips | mipsel | microblaze )
+			dynamic_loader="${base_libdir}/ld.so.1"
+			;;
+		powerpc64)
+			dynamic_loader="${base_libdir}/ld64.so.1"
+			;;
+		x86_64)
+			dynamic_loader="${base_libdir}/ld-linux-x86-64.so.2"
+			;;
+		i*86 )
+			dynamic_loader="${base_libdir}/ld-linux.so.2"
+			;;
+		arm )
+			dynamic_loader="${base_libdir}/ld-linux.so.3"
+			;;
+		* )
+			dynamic_loader="/unknown_dynamic_linker"
+			;;
+	esac
+	echo $dynamic_loader
+}
diff --git a/yocto-poky/meta/classes/live-vm-common.bbclass b/yocto-poky/meta/classes/live-vm-common.bbclass
new file mode 100644
index 0000000..c751385
--- /dev/null
+++ b/yocto-poky/meta/classes/live-vm-common.bbclass
@@ -0,0 +1,58 @@
+# Some of the vars for vm and live image are conflicted, this function
+# is used for fixing the problem.
+def set_live_vm_vars(d, suffix):
+    vars = ['GRUB_CFG', 'SYSLINUX_CFG', 'ROOT', 'LABELS', 'INITRD']
+    for var in vars:
+        var_with_suffix = var + '_' + suffix
+        if d.getVar(var, True):
+            bb.warn('Found potential conflicted var %s, please use %s rather than %s' % \
+                (var, var_with_suffix, var))
+        elif d.getVar(var_with_suffix, True):
+            d.setVar(var, d.getVar(var_with_suffix, True))
+
+
+EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
+EFI_PROVIDER ?= "grub-efi"
+EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "${EFI_PROVIDER}", "", d)}"
+
+# Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not
+# contain "efi". This way legacy is supported by default if neither is
+# specified, maintaining the original behavior.
+def pcbios(d):
+    pcbios = bb.utils.contains("MACHINE_FEATURES", "pcbios", "1", "0", d)
+    if pcbios == "0":
+        pcbios = bb.utils.contains("MACHINE_FEATURES", "efi", "0", "1", d)
+    return pcbios
+
+PCBIOS = "${@pcbios(d)}"
+PCBIOS_CLASS = "${@['','syslinux'][d.getVar('PCBIOS', True) == '1']}"
+
+inherit ${EFI_CLASS}
+inherit ${PCBIOS_CLASS}
+
+KERNEL_IMAGETYPE ??= "bzImage"
+
+populate_kernel() {
+	dest=$1
+	install -d $dest
+
+	# Install bzImage, initrd, and rootfs.img in DEST for all loaders to use.
+	if [ -e ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ]; then
+		install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} $dest/vmlinuz
+	fi
+
+	# initrd is made of concatenation of multiple filesystem images
+	if [ -n "${INITRD}" ]; then
+		rm -f $dest/initrd
+		for fs in ${INITRD}
+		do
+			if [ -s "$fs" ]; then
+				cat $fs >> $dest/initrd
+			else
+				bbfatal "$fs is invalid. initrd image creation failed."
+			fi
+		done
+		chmod 0644 $dest/initrd
+	fi
+}
+
diff --git a/yocto-poky/meta/classes/mirrors.bbclass b/yocto-poky/meta/classes/mirrors.bbclass
index b96c071..9e6d483 100644
--- a/yocto-poky/meta/classes/mirrors.bbclass
+++ b/yocto-poky/meta/classes/mirrors.bbclass
@@ -40,7 +40,8 @@
 ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/ \n \
 ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ \n \
 ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/  ftp://the.wiretapped.net/pub/security/host-security/lsof/ \n \
-http://www.apache.org/dist  http://archive.apache.org/dist \n \
+${APACHE_MIRROR}  http://www.us.apache.org/dist \n \
+${APACHE_MIRROR}  http://archive.apache.org/dist \n \
 http://downloads.sourceforge.net/watchdog/ http://fossies.org/linux/misc/ \n \
 ${SAVANNAH_GNU_MIRROR} http://download-mirror.savannah.gnu.org/releases \n \
 ${SAVANNAH_NONGNU_MIRROR} http://download-mirror.savannah.nongnu.org/releases \n \
@@ -53,6 +54,7 @@
 osc://.*/.*     http://downloads.yoctoproject.org/mirror/sources/ \n \
 https?$://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
 ftp://.*/.*     http://downloads.yoctoproject.org/mirror/sources/ \n \
+npm://.*/.*     http://downloads.yoctoproject.org/mirror/sources/ \n \
 cvs://.*/.*     http://sources.openembedded.org/ \n \
 svn://.*/.*     http://sources.openembedded.org/ \n \
 git://.*/.*     http://sources.openembedded.org/ \n \
@@ -62,6 +64,7 @@
 osc://.*/.*     http://sources.openembedded.org/ \n \
 https?$://.*/.* http://sources.openembedded.org/ \n \
 ftp://.*/.*     http://sources.openembedded.org/ \n \
+npm://.*/.*     http://sources.openembedded.org/ \n \
 ${CPAN_MIRROR}  http://cpan.metacpan.org/ \n \
 ${CPAN_MIRROR}  http://search.cpan.org/CPAN/ \n \
 "
diff --git a/yocto-poky/meta/classes/module-base.bbclass b/yocto-poky/meta/classes/module-base.bbclass
index 8be26c4..6fe77c0 100644
--- a/yocto-poky/meta/classes/module-base.bbclass
+++ b/yocto-poky/meta/classes/module-base.bbclass
@@ -1,7 +1,7 @@
 inherit kernel-arch
 
 # This is instead of DEPENDS = "virtual/kernel"
-do_configure[depends] += "virtual/kernel:do_shared_workdir"
+do_configure[depends] += "virtual/kernel:do_compile_kernelmodules"
 
 export OS = "${TARGET_OS}"
 export CROSS_COMPILE = "${TARGET_PREFIX}"
@@ -19,7 +19,7 @@
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 # Function to ensure the kernel scripts are created. Expected to
-# be called before do_compile. See module.bbclass for an exmaple.
+# be called before do_compile. See module.bbclass for an example.
 do_make_scripts() {
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS 
 	make CC="${KERNEL_CC}" LD="${KERNEL_LD}" AR="${KERNEL_AR}" \
diff --git a/yocto-poky/meta/classes/module.bbclass b/yocto-poky/meta/classes/module.bbclass
index 0952c0c..01c9309 100644
--- a/yocto-poky/meta/classes/module.bbclass
+++ b/yocto-poky/meta/classes/module.bbclass
@@ -6,6 +6,8 @@
 
 EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}"
 
+MODULES_INSTALL_TARGET ?= "modules_install"
+
 module_do_compile() {
 	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
 	oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR}   \
@@ -21,7 +23,7 @@
 	oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
 	           CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
 	           O=${STAGING_KERNEL_BUILDDIR} \
-	           modules_install
+	           ${MODULES_INSTALL_TARGET}
 }
 
 EXPORT_FUNCTIONS do_compile do_install
diff --git a/yocto-poky/meta/classes/multilib.bbclass b/yocto-poky/meta/classes/multilib.bbclass
index 052f911..d5a3128 100644
--- a/yocto-poky/meta/classes/multilib.bbclass
+++ b/yocto-poky/meta/classes/multilib.bbclass
@@ -59,7 +59,7 @@
     e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + override)
 
     # Expand the WHITELISTs with multilib prefix
-    for whitelist in ["HOSTTOOLS_WHITELIST_GPL-3.0", "WHITELIST_GPL-3.0", "LGPLv2_WHITELIST_GPL-3.0"]:
+    for whitelist in ["WHITELIST_GPL-3.0", "LGPLv2_WHITELIST_GPL-3.0"]:
         pkgs = e.data.getVar(whitelist, True)
         for pkg in pkgs.split():
             pkgs += " " + variant + "-" + pkg
diff --git a/yocto-poky/meta/classes/native.bbclass b/yocto-poky/meta/classes/native.bbclass
index bcbcd61..f67ef00 100644
--- a/yocto-poky/meta/classes/native.bbclass
+++ b/yocto-poky/meta/classes/native.bbclass
@@ -42,7 +42,7 @@
 
 CPPFLAGS = "${BUILD_CPPFLAGS}"
 CFLAGS = "${BUILD_CFLAGS}"
-CXXFLAGS = "${BUILD_CFLAGS}"
+CXXFLAGS = "${BUILD_CXXFLAGS}"
 LDFLAGS = "${BUILD_LDFLAGS}"
 LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE} "
 
@@ -106,6 +106,8 @@
 EXTRA_NATIVE_PKGCONFIG_PATH ?= ""
 PKG_CONFIG_PATH .= "${EXTRA_NATIVE_PKGCONFIG_PATH}"
 PKG_CONFIG_SYSROOT_DIR = ""
+PKG_CONFIG_SYSTEM_LIBRARY_PATH[unexport] = "1"
+PKG_CONFIG_SYSTEM_INCLUDE_PATH[unexport] = "1"
 
 # we dont want libc-uclibc or libc-glibc to kick in for native recipes
 LIBCOVERRIDE = ""
@@ -169,13 +171,7 @@
 addhandler native_virtclass_handler
 native_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise"
 
-deltask package
-deltask packagedata
-deltask package_qa
-deltask package_write_ipk
-deltask package_write_deb
-deltask package_write_rpm
-deltask package_write
+inherit nopackages
 
 do_packagedata[stamp-extra-info] = ""
 do_populate_sysroot[stamp-extra-info] = ""
diff --git a/yocto-poky/meta/classes/nopackages.bbclass b/yocto-poky/meta/classes/nopackages.bbclass
new file mode 100644
index 0000000..0c2761b
--- /dev/null
+++ b/yocto-poky/meta/classes/nopackages.bbclass
@@ -0,0 +1,6 @@
+deltask do_package
+deltask do_package_write_rpm
+deltask do_package_write_ipk
+deltask do_package_write_deb
+deltask do_package_qa
+deltask do_packagedata
diff --git a/yocto-poky/meta/classes/npm.bbclass b/yocto-poky/meta/classes/npm.bbclass
new file mode 100644
index 0000000..9843e87
--- /dev/null
+++ b/yocto-poky/meta/classes/npm.bbclass
@@ -0,0 +1,49 @@
+DEPENDS_prepend = "nodejs-native "
+S = "${WORKDIR}/npmpkg"
+
+NPM_INSTALLDIR = "${D}${libdir}/node_modules/${PN}"
+
+npm_do_compile() {
+	# changing the home directory to the working directory, the .npmrc will
+	# be created in this directory
+	export HOME=${WORKDIR}
+	npm config set dev false
+	npm set cache ${WORKDIR}/npm_cache
+	# clear cache before every build
+	npm cache clear
+	# Install pkg into ${S} without going to the registry
+	npm --arch=${TARGET_ARCH} --production --no-registry install
+}
+
+npm_do_install() {
+	mkdir -p ${NPM_INSTALLDIR}/
+	cp -a ${S}/* ${NPM_INSTALLDIR}/ --no-preserve=ownership
+}
+
+python populate_packages_prepend () {
+    instdir = d.expand('${D}${libdir}/node_modules/${PN}')
+    extrapackages = oe.package.npm_split_package_dirs(instdir)
+    pkgnames = extrapackages.keys()
+    d.prependVar('PACKAGES', '%s ' % ' '.join(pkgnames))
+    for pkgname in pkgnames:
+        pkgrelpath, pdata = extrapackages[pkgname]
+        pkgpath = '${libdir}/node_modules/${PN}/' + pkgrelpath
+        # package names can't have underscores but npm packages sometimes use them
+        oe_pkg_name = pkgname.replace('_', '-')
+        expanded_pkgname = d.expand(oe_pkg_name)
+        d.setVar('FILES_%s' % expanded_pkgname, pkgpath)
+        if pdata:
+            version = pdata.get('version', None)
+            if version:
+                d.setVar('PKGV_%s' % expanded_pkgname, version.encode("utf8"))
+            description = pdata.get('description', None)
+            if description:
+                d.setVar('SUMMARY_%s' % expanded_pkgname, description.replace(u"\u2018", "'").replace(u"\u2019", "'").encode("utf8"))
+    d.appendVar('RDEPENDS_%s' % d.getVar('PN', True), ' %s' % ' '.join(pkgnames).replace('_', '-'))
+}
+
+FILES_${PN} += " \
+    ${libdir}/node_modules/${PN} \
+"
+
+EXPORT_FUNCTIONS do_compile do_install
diff --git a/yocto-poky/meta/classes/own-mirrors.bbclass b/yocto-poky/meta/classes/own-mirrors.bbclass
index e235227..12b4267 100644
--- a/yocto-poky/meta/classes/own-mirrors.bbclass
+++ b/yocto-poky/meta/classes/own-mirrors.bbclass
@@ -9,4 +9,5 @@
 osc://.*/.*     ${SOURCE_MIRROR_URL}
 https?$://.*/.* ${SOURCE_MIRROR_URL}
 ftp://.*/.*     ${SOURCE_MIRROR_URL}
+npm://.*/.*     ${SOURCE_MIRROR_URL}
 }
diff --git a/yocto-poky/meta/classes/package.bbclass b/yocto-poky/meta/classes/package.bbclass
index a86b680..76b9f86 100644
--- a/yocto-poky/meta/classes/package.bbclass
+++ b/yocto-poky/meta/classes/package.bbclass
@@ -121,6 +121,9 @@
     """
 
     dvar = d.getVar('PKGD', True)
+    root = d.expand(root)
+    output_pattern = d.expand(output_pattern)
+    extra_depends = d.expand(extra_depends)
 
     # If the root directory doesn't exist, don't error out later but silently do
     # no splitting.
@@ -298,6 +301,15 @@
     os.chdir(cwd)
     return conf_list
 
+def checkbuildpath(file, d):
+    tmpdir = d.getVar('TMPDIR', True)
+    with open(file) as f:
+        file_content = f.read()
+        if tmpdir in file_content:
+            return True
+
+    return False
+
 def splitdebuginfo(file, debugfile, debugsrcdir, sourcefile, d):
     # Function to split a single file into two components, one is the stripped
     # target system binary, the other contains any debugging information. The
@@ -310,8 +322,6 @@
     dvar = d.getVar('PKGD', True)
     objcopy = d.getVar("OBJCOPY", True)
     debugedit = d.expand("${STAGING_LIBDIR_NATIVE}/rpm/bin/debugedit")
-    workdir = d.getVar("WORKDIR", True)
-    workparentdir = d.getVar("DEBUGSRC_OVERRIDE_PATH", True) or os.path.dirname(os.path.dirname(workdir))
 
     # We ignore kernel modules, we don't generate debug info files.
     if file.find("/lib/modules/") != -1 and file.endswith(".ko"):
@@ -325,7 +335,7 @@
 
     # We need to extract the debug src information here...
     if debugsrcdir:
-        cmd = "'%s' -b '%s' -d '%s' -i -l '%s' '%s'" % (debugedit, workparentdir, debugsrcdir, sourcefile, file)
+        cmd = "'%s' -i -l '%s' '%s'" % (debugedit, sourcefile, file)
         (retval, output) = oe.utils.getstatusoutput(cmd)
         if retval:
             bb.fatal("debugedit failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
@@ -364,6 +374,13 @@
         workparentdir = os.path.dirname(os.path.dirname(workdir))
         workbasedir = os.path.basename(os.path.dirname(workdir)) + "/" + os.path.basename(workdir)
 
+        # If build path exists in sourcefile, it means toolchain did not use
+        # -fdebug-prefix-map to compile
+        if checkbuildpath(sourcefile, d):
+            localsrc_prefix = workparentdir + "/"
+        else:
+            localsrc_prefix = "/usr/src/debug/"
+
         nosuchdir = []
         basepath = dvar
         for p in debugsrcdir.split("/"):
@@ -377,9 +394,11 @@
         # We need to ignore files that are not actually ours
         # we do this by only paying attention to items from this package
         processdebugsrc += "fgrep -zw '%s' | "
+        # Remove prefix in the source paths
+        processdebugsrc += "sed 's#%s##g' | "
         processdebugsrc += "(cd '%s' ; cpio -pd0mlL --no-preserve-owner '%s%s' 2>/dev/null)"
 
-        cmd = processdebugsrc % (sourcefile, workbasedir, workparentdir, dvar, debugsrcdir)
+        cmd = processdebugsrc % (sourcefile, workbasedir, localsrc_prefix, workparentdir, dvar, debugsrcdir)
         (retval, output) = oe.utils.getstatusoutput(cmd)
         # Can "fail" if internal headers/transient sources are attempted
         #if retval:
@@ -427,7 +446,7 @@
         if d.getVar(key, False) is None:
             continue
         d.setVarFlag(key, "type", "list")
-        if d.getVarFlag(key, "separator") is None:
+        if d.getVarFlag(key, "separator", True) is None:
             d.setVarFlag(key, "separator", "\\n")
         metadata_fields = [field.strip() for field in oe.data.typed_value(key, d)]
         return "\n".join(metadata_fields).strip()
@@ -708,6 +727,7 @@
     dvar = d.getVar('PKGD', True)
 
     fs_perms_table = {}
+    fs_link_table = {}
 
     # By default all of the standard directories specified in
     # bitbake.conf will get 0755 root:root.
@@ -754,24 +774,32 @@
                     continue
                 entry = fs_perms_entry(d.expand(line))
                 if entry and entry.path:
-                    fs_perms_table[entry.path] = entry
+                    if entry.link:
+                        fs_link_table[entry.path] = entry
+                        if entry.path in fs_perms_table:
+                            fs_perms_table.pop(entry.path)
+                    else:
+                        fs_perms_table[entry.path] = entry
+                        if entry.path in fs_link_table:
+                            fs_link_table.pop(entry.path)
             f.close()
 
     # Debug -- list out in-memory table
     #for dir in fs_perms_table:
     #    bb.note("Fixup Perms: %s: %s" % (dir, str(fs_perms_table[dir])))
+    #for link in fs_link_table:
+    #    bb.note("Fixup Perms: %s: %s" % (link, str(fs_link_table[link])))
 
     # We process links first, so we can go back and fixup directory ownership
     # for any newly created directories
-    for dir in fs_perms_table:
-        if not fs_perms_table[dir].link:
-            continue
-
+    # Process in sorted order so /run gets created before /run/lock, etc.
+    for entry in sorted(fs_link_table.values(), key=lambda x: x.link):
+        link = entry.link
+        dir = entry.path
         origin = dvar + dir
         if not (cpath.exists(origin) and cpath.isdir(origin) and not cpath.islink(origin)):
             continue
 
-        link = fs_perms_table[dir].link
         if link[0] == "/":
             target = dvar + link
             ptarget = link
@@ -791,9 +819,6 @@
         os.symlink(link, origin)
 
     for dir in fs_perms_table:
-        if fs_perms_table[dir].link:
-            continue
-
         origin = dvar + dir
         if not (cpath.exists(origin) and cpath.isdir(origin)):
             continue
@@ -905,7 +930,7 @@
                     continue
                 # Check its an excutable
                 if (s[stat.ST_MODE] & stat.S_IXUSR) or (s[stat.ST_MODE] & stat.S_IXGRP) or (s[stat.ST_MODE] & stat.S_IXOTH) \
-                        or ((file.startswith(libdir) or file.startswith(baselibdir)) and ".so" in f):
+                        or ((file.startswith(libdir) or file.startswith(baselibdir)) and (".so" in f or ".node" in f)):
                     # If it's a symlink, and points to an ELF file, we capture the readlink target
                     if cpath.islink(file):
                         target = os.readlink(file)
@@ -1039,6 +1064,8 @@
 
     bb.utils.mkdirhier(outdir)
     os.chdir(dvar)
+    
+    autodebug = not (d.getVar("NOAUTOPACKAGEDEBUG", True) or False)
 
     # Sanity check PACKAGES for duplicates
     # Sanity should be moved to sanity.bbclass once we have the infrastucture
@@ -1048,6 +1075,8 @@
         if pkg in package_list:
             msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg
             package_qa_handle_error("packages-list", msg, d)
+        elif autodebug and pkg.endswith("-dbg"):
+            package_list.insert(0, pkg)
         else:
             package_list.append(pkg)
     d.setVar('PACKAGES', ' '.join(package_list))
@@ -1058,6 +1087,16 @@
     # os.mkdir masks the permissions with umask so we have to unset it first
     oldumask = os.umask(0)
 
+    debug = []
+    for root, dirs, files in cpath.walk(dvar):
+        dir = root[len(dvar):]
+        if not dir:
+            dir = os.sep
+        for f in (files + dirs):
+            path = "." + os.path.join(dir, f)
+            if "/.debug/" in path or path.endswith("/.debug"):
+                debug.append(path)
+
     for pkg in package_list:
         root = os.path.join(pkgdest, pkg)
         bb.utils.mkdirhier(root)
@@ -1071,6 +1110,9 @@
         origfiles = filesvar.split()
         files = files_from_filevars(origfiles)
 
+        if autodebug and pkg.endswith("-dbg"):
+            files.extend(debug)
+
         for file in files:
             if (not cpath.islink(file)) and (not cpath.exists(file)):
                 continue
@@ -1513,7 +1555,7 @@
             rpath = []
             p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file],stdout=sub.PIPE,stderr=sub.PIPE)
             err, out = p.communicate()
-            # If returned succesfully, process stderr for results
+            # If returned successfully, process stderr for results
             if p.returncode == 0:
                 for l in err.split("\n"):
                     l = l.strip()
@@ -1522,7 +1564,7 @@
 
         p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file],stdout=sub.PIPE,stderr=sub.PIPE)
         err, out = p.communicate()
-        # If returned succesfully, process stderr for results
+        # If returned successfully, process stderr for results
         if p.returncode == 0:
             for l in err.split("\n"):
                 l = l.strip()
@@ -1892,12 +1934,11 @@
         for pkg in pkglibdeps:
             for k in pkglibdeps[pkg]:
                 add_dep(pkglibdeplist, k)
-        # FIXME this should not look at PN once all task recipes inherit from task.bbclass
-        dbgdefaultdeps = ((d.getVar('DEPCHAIN_DBGDEFAULTDEPS', True) == '1') or (d.getVar('PN', True) or '').startswith('packagegroup-'))
+        dbgdefaultdeps = ((d.getVar('DEPCHAIN_DBGDEFAULTDEPS', True) == '1') or (bb.data.inherits_class('packagegroup', d)))
 
     for suffix in pkgs:
         for pkg in pkgs[suffix]:
-            if d.getVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs'):
+            if d.getVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', True):
                 continue
             (base, func) = pkgs[suffix][pkg]
             if suffix == "-dev":
@@ -2035,6 +2076,10 @@
 
     for f in (d.getVar('PACKAGEFUNCS', True) or '').split():
         bb.build.exec_func(f, d)
+
+    qa_sane = d.getVar("QA_SANE", True)
+    if not qa_sane:
+        bb.fatal("Fatal QA errors found, failing task.")
 }
 
 do_package[dirs] = "${SHLIBSWORKDIR} ${PKGDESTWORK} ${D}"
diff --git a/yocto-poky/meta/classes/package_deb.bbclass b/yocto-poky/meta/classes/package_deb.bbclass
index d2fea4f..e1d05a7 100644
--- a/yocto-poky/meta/classes/package_deb.bbclass
+++ b/yocto-poky/meta/classes/package_deb.bbclass
@@ -6,7 +6,8 @@
 
 IMAGE_PKGTYPE ?= "deb"
 
-DPKG_ARCH ?= "${TARGET_ARCH}" 
+DPKG_ARCH ?= "${@debian_arch_map(d.getVar('TARGET_ARCH', True), d.getVar('TUNE_FEATURES', True))}"
+DPKG_ARCH[vardepvalue] = "${DPKG_ARCH}"
 
 PKGWRITEDIRDEB = "${WORKDIR}/deploy-debs"
 
@@ -14,6 +15,28 @@
 
 APT_ARGS = "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS", True) == "1"]}"
 
+def debian_arch_map(arch, tune):
+    tune_features = tune.split()
+    if arch in ["i586", "i686"]:
+        return "i386"
+    if arch == "x86_64":
+        if "mx32" in tune_features:
+            return "x32"
+        return "amd64"
+    if arch.startswith("mips"):
+        endian = ["el", ""]["bigendian" in tune_features]
+        if "n64" in tune_features:
+            return "mips64" + endian
+        if "n32" in tune_features:
+            return "mipsn32" + endian
+        return "mips" + endian
+    if arch == "powerpc":
+        return arch + ["", "spe"]["spe" in tune_features]
+    if arch == "aarch64":
+        return "arm64"
+    if arch == "arm":
+        return arch + ["el", "hf"]["callconvention-hard" in tune_features]
+    return arch
 #
 # install a bunch of packages using apt
 # the following shell variables needs to be set before calling this func:
@@ -21,7 +44,7 @@
 # INSTALL_BASEARCH_DEB - install base architecutre
 # INSTALL_ARCHS_DEB - list of available archs
 # INSTALL_PACKAGES_NORMAL_DEB - packages to be installed
-# INSTALL_PACKAGES_ATTEMPTONLY_DEB - packages attemped to be installed only
+# INSTALL_PACKAGES_ATTEMPTONLY_DEB - packages attempted to be installed only
 # INSTALL_PACKAGES_LINGUAS_DEB - additional packages for uclibc
 # INSTALL_TASK_DEB - task name
 
@@ -139,6 +162,8 @@
             return l2
 
         ctrlfile.write("Package: %s\n" % pkgname)
+        if d.getVar('PACKAGE_ARCH', True) == "all":
+            ctrlfile.write("Multi-Arch: foreign\n")
         # check for required fields
         try:
             for (c, fs) in fields:
@@ -209,12 +234,15 @@
 
         rdepends = bb.utils.explode_dep_versions2(localdata.getVar("RDEPENDS", True) or "")
         debian_cmp_remap(rdepends)
-        for dep in rdepends:
+        for dep in rdepends.keys():
+                if dep == pkg:
+                        del rdepends[dep]
+                        continue
                 if '*' in dep:
                         del rdepends[dep]
         rrecommends = bb.utils.explode_dep_versions2(localdata.getVar("RRECOMMENDS", True) or "")
         debian_cmp_remap(rrecommends)
-        for dep in rrecommends:
+        for dep in rrecommends.keys():
                 if '*' in dep:
                         del rrecommends[dep]
         rsuggests = bb.utils.explode_dep_versions2(localdata.getVar("RSUGGESTS", True) or "")
@@ -288,6 +316,8 @@
         cleanupcontrol(root)
         bb.utils.unlockfile(lf)
 }
+# Indirect references to these vars
+do_package_write_deb[vardeps] += "PKGV PKGR PKGV DESCRIPTION SECTION PRIORITY MAINTAINER DPKG_ARCH PN HOMEPAGE"
 # Otherwise allarch packages may change depending on override configuration
 do_package_deb[vardepsexclude] = "OVERRIDES"
 
@@ -311,15 +341,6 @@
         deps = ' dpkg-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot'
         d.appendVarFlag('do_package_write_deb', 'depends', deps)
         d.setVarFlag('do_package_write_deb', 'fakeroot', "1")
-
-    # Map TARGET_ARCH to Debian's ideas about architectures
-    darch = d.getVar('DPKG_ARCH', True)
-    if darch in ["x86", "i486", "i586", "i686", "pentium"]:
-         d.setVar('DPKG_ARCH', 'i386')
-    elif darch == "x86_64":
-         d.setVar('DPKG_ARCH', 'amd64')
-    elif darch == "arm":
-         d.setVar('DPKG_ARCH', 'armel')
 }
 
 python do_package_write_deb () {
diff --git a/yocto-poky/meta/classes/package_ipk.bbclass b/yocto-poky/meta/classes/package_ipk.bbclass
index 4dd7a7e..f1ad1d5 100644
--- a/yocto-poky/meta/classes/package_ipk.bbclass
+++ b/yocto-poky/meta/classes/package_ipk.bbclass
@@ -10,7 +10,7 @@
 # Program to be used to build opkg packages
 OPKGBUILDCMD ??= "opkg-build"
 
-OPKG_ARGS = "--force_postinstall --prefer-arch-to-version"
+OPKG_ARGS += "--force_postinstall --prefer-arch-to-version"
 OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS", True) == "1"]}"
 OPKG_ARGS += "${@['', '--add-exclude ' + ' --add-exclude '.join((d.getVar('PACKAGE_EXCLUDE', True) or "").split())][(d.getVar("PACKAGE_EXCLUDE", True) or "") != ""]}"
 
@@ -246,6 +246,11 @@
             bb.utils.unlockfile(lf)
             raise bb.build.FuncFailed("opkg-build execution failed")
 
+        if d.getVar('IPK_SIGN_PACKAGES', True) == '1':
+            ipkver = "%s-%s" % (d.getVar('PKGV', True), d.getVar('PKGR', True))
+            ipk_to_sign = "%s/%s_%s_%s.ipk" % (pkgoutdir, pkgname, ipkver, d.getVar('PACKAGE_ARCH', True))
+            sign_ipk(d, ipk_to_sign)
+
         cleanupcontrol(root)
         bb.utils.unlockfile(lf)
 
diff --git a/yocto-poky/meta/classes/package_rpm.bbclass b/yocto-poky/meta/classes/package_rpm.bbclass
index 1fa1634..7d523a1 100644
--- a/yocto-poky/meta/classes/package_rpm.bbclass
+++ b/yocto-poky/meta/classes/package_rpm.bbclass
@@ -743,7 +743,7 @@
     if d.getVar('PACKAGES', True) != '':
         deps = ' rpm-native:do_populate_sysroot virtual/fakeroot-native:do_populate_sysroot'
         d.appendVarFlag('do_package_write_rpm', 'depends', deps)
-        d.setVarFlag('do_package_write_rpm', 'fakeroot', 1)
+        d.setVarFlag('do_package_write_rpm', 'fakeroot', '1')
 }
 
 SSTATETASKS += "do_package_write_rpm"
diff --git a/yocto-poky/meta/classes/package_tar.bbclass b/yocto-poky/meta/classes/package_tar.bbclass
index f9e2292..854e645 100644
--- a/yocto-poky/meta/classes/package_tar.bbclass
+++ b/yocto-poky/meta/classes/package_tar.bbclass
@@ -53,7 +53,7 @@
 
 python () {
     if d.getVar('PACKAGES', True) != '':
-        deps = (d.getVarFlag('do_package_write_tar', 'depends') or "").split()
+        deps = (d.getVarFlag('do_package_write_tar', 'depends', True) or "").split()
         deps.append('tar-native:do_populate_sysroot')
         deps.append('virtual/fakeroot-native:do_populate_sysroot')
         d.setVarFlag('do_package_write_tar', 'depends', " ".join(deps))
diff --git a/yocto-poky/meta/classes/packagegroup.bbclass b/yocto-poky/meta/classes/packagegroup.bbclass
index 56cfead..38bdbd3 100644
--- a/yocto-poky/meta/classes/packagegroup.bbclass
+++ b/yocto-poky/meta/classes/packagegroup.bbclass
@@ -22,13 +22,15 @@
 # Also mark all packages as ALLOW_EMPTY
 python () {
     packages = d.getVar('PACKAGES', True).split()
-    genpackages = []
-    for pkg in packages:
-        d.setVar("ALLOW_EMPTY_%s" % pkg, "1")
-        for postfix in ['-dbg', '-dev', '-ptest']:
-            genpackages.append(pkg+postfix)
     if d.getVar('PACKAGEGROUP_DISABLE_COMPLEMENTARY', True) != '1':
-        d.setVar('PACKAGES', ' '.join(packages+genpackages))
+        types = ['', '-dbg', '-dev']
+        if bb.utils.contains('DISTRO_FEATURES', 'ptest', True, False, d):
+            types.append('-ptest')
+        packages = [pkg + suffix for pkg in packages
+                    for suffix in types]
+        d.setVar('PACKAGES', ' '.join(packages))
+    for pkg in packages:
+        d.setVar('ALLOW_EMPTY_%s' % pkg, '1')
 }
 
 # We don't want to look at shared library dependencies for the
diff --git a/yocto-poky/meta/classes/packageinfo.bbclass b/yocto-poky/meta/classes/packageinfo.bbclass
deleted file mode 100644
index 7d60ace..0000000
--- a/yocto-poky/meta/classes/packageinfo.bbclass
+++ /dev/null
@@ -1,22 +0,0 @@
-python packageinfo_handler () {
-    import oe.packagedata
-    pkginfolist = []
-
-    pkgdata_dir = e.data.getVar("PKGDATA_DIR", True) + '/runtime/'
-    if os.path.exists(pkgdata_dir):
-        for root, dirs, files in os.walk(pkgdata_dir):
-            for pkgname in files:
-                if pkgname.endswith('.packaged'):
-                    pkgname = pkgname[:-9]
-                    pkgdatafile = root + pkgname
-                    try:
-                        sdata = oe.packagedata.read_pkgdatafile(pkgdatafile)
-                        sdata['PKG'] = pkgname
-                        pkginfolist.append(sdata)
-                    except Exception as e:
-                        bb.warn("Failed to read pkgdata file %s: %s: %s" % (pkgdatafile, e.__class__, str(e)))
-    bb.event.fire(bb.event.PackageInfo(pkginfolist), e.data)
-}
-
-addhandler packageinfo_handler
-packageinfo_handler[eventmask] = "bb.event.RequestPackageInfo"
diff --git a/yocto-poky/meta/classes/patch.bbclass b/yocto-poky/meta/classes/patch.bbclass
index 1e2aab0..3d22ad8 100644
--- a/yocto-poky/meta/classes/patch.bbclass
+++ b/yocto-poky/meta/classes/patch.bbclass
@@ -136,7 +136,6 @@
 
     s = d.getVar('S', True)
 
-    path = os.getenv('PATH')
     os.putenv('PATH', d.getVar('PATH', True))
 
     # We must use one TMPDIR per process so that the "patch" processes
diff --git a/yocto-poky/meta/classes/populate_sdk_base.bbclass b/yocto-poky/meta/classes/populate_sdk_base.bbclass
index 35e129b..008bb57 100644
--- a/yocto-poky/meta/classes/populate_sdk_base.bbclass
+++ b/yocto-poky/meta/classes/populate_sdk_base.bbclass
@@ -40,7 +40,7 @@
 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
 
 SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
-SDK_DEPENDS = "virtual/fakeroot-native pbzip2-native"
+SDK_DEPENDS = "virtual/fakeroot-native pixz-native"
 
 # We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it
 # could be set to the MACHINE_ARCH
@@ -62,25 +62,30 @@
 SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
 python write_target_sdk_manifest () {
     from oe.sdk import sdk_list_installed_packages
+    from oe.utils import format_pkg_list
     sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST", True))
+    pkgs = sdk_list_installed_packages(d, True)
     if not os.path.exists(sdkmanifestdir):
         bb.utils.mkdirhier(sdkmanifestdir)
     with open(d.getVar('SDK_TARGET_MANIFEST', True), 'w') as output:
-        output.write(sdk_list_installed_packages(d, True, 'ver'))
+        output.write(format_pkg_list(pkgs, 'ver'))
 }
 
 python write_host_sdk_manifest () {
     from oe.sdk import sdk_list_installed_packages
+    from oe.utils import format_pkg_list
     sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST", True))
+    pkgs = sdk_list_installed_packages(d, False)
     if not os.path.exists(sdkmanifestdir):
         bb.utils.mkdirhier(sdkmanifestdir)
     with open(d.getVar('SDK_HOST_MANIFEST', True), 'w') as output:
-        output.write(sdk_list_installed_packages(d, False, 'ver'))
+        output.write(format_pkg_list(pkgs, 'ver'))
 }
 
 POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; "
 POPULATE_SDK_POST_HOST_COMMAND_append = " write_host_sdk_manifest; "
-SDK_POSTPROCESS_COMMAND = " create_sdk_files; tar_sdk; ${SDK_PACKAGING_FUNC}; "
+SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}"
+SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; ${SDK_PACKAGING_COMMAND} "
 
 # Some archs override this, we need the nativesdk version
 # turns out this is hard to get from the datastore due to TRANSLATED_TARGET_ARCH
@@ -120,13 +125,64 @@
 	sed -i -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:" ${SDK_OUTPUT}/${SDKPATH}/relocate_sdk.py
 }
 
+python check_sdk_sysroots() {
+    # Fails build if there are broken or dangling symlinks in SDK sysroots
+
+    if d.getVar('CHECK_SDK_SYSROOTS', True) != '1':
+        # disabled, bail out
+        return
+
+    def norm_path(path):
+        return os.path.abspath(path)
+
+    # Get scan root
+    SCAN_ROOT = norm_path("${SDK_OUTPUT}/${SDKPATH}/sysroots/")
+
+    bb.note('Checking SDK sysroots at ' + SCAN_ROOT)
+
+    def check_symlink(linkPath):
+        if not os.path.islink(linkPath):
+            return
+
+        linkDirPath = os.path.dirname(linkPath)
+
+        targetPath = os.readlink(linkPath)
+        if not os.path.isabs(targetPath):
+            targetPath = os.path.join(linkDirPath, targetPath)
+        targetPath = norm_path(targetPath)
+
+        if SCAN_ROOT != os.path.commonprefix( [SCAN_ROOT, targetPath] ):
+            bb.error("Escaping symlink {0!s} --> {1!s}".format(linkPath, targetPath))
+            return
+
+        if not os.path.exists(targetPath):
+            bb.error("Broken symlink {0!s} --> {1!s}".format(linkPath, targetPath))
+            return
+
+        if os.path.isdir(targetPath):
+            dir_walk(targetPath)
+
+    def walk_error_handler(e):
+        bb.error(str(e))
+
+    def dir_walk(rootDir):
+        for dirPath,subDirEntries,fileEntries in os.walk(rootDir, followlinks=False, onerror=walk_error_handler):
+            entries = subDirEntries + fileEntries
+            for e in entries:
+                ePath = os.path.join(dirPath, e)
+                check_symlink(ePath)
+
+    # start
+    dir_walk(SCAN_ROOT)
+}
+
 SDKTAROPTS = "--owner=root --group=root"
 
 fakeroot tar_sdk() {
 	# Package it up
 	mkdir -p ${SDK_DEPLOY}
 	cd ${SDK_OUTPUT}/${SDKPATH}
-	tar ${SDKTAROPTS} -cf - . | pbzip2 > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2
+	tar ${SDKTAROPTS} -cf - . | pixz > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
 }
 
 fakeroot create_shar() {
@@ -165,10 +221,10 @@
 	chmod +x ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
 
 	# append the SDK tarball
-	cat ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 >> ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
+	cat ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.xz >> ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
 
 	# delete the old tarball, we don't need it anymore
-	rm ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2
+	rm ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.xz
 }
 
 populate_sdk_log_check() {
@@ -188,6 +244,22 @@
 	done
 }
 
+def sdk_command_variables(d):
+    return ['OPKG_PREPROCESS_COMMANDS','OPKG_POSTPROCESS_COMMANDS','POPULATE_SDK_POST_HOST_COMMAND','POPULATE_SDK_POST_TARGET_COMMAND','SDK_POSTPROCESS_COMMAND','RPM_PREPROCESS_COMMANDS',
+            'RPM_POSTPROCESS_COMMANDS']
+
+def sdk_variables(d):
+    variables = ['BUILD_IMAGES_FROM_FEEDS','SDK_OS','SDK_OUTPUT','SDKPATHNATIVE','SDKTARGETSYSROOT','SDK_DIR','SDK_VENDOR','SDKIMAGE_INSTALL_COMPLEMENTARY','SDK_PACKAGE_ARCHS','SDK_OUTPUT',
+                 'SDKTARGETSYSROOT','MULTILIB_VARIANTS','MULTILIBS','ALL_MULTILIB_PACKAGE_ARCHS','MULTILIB_GLOBAL_VARIANTS','BAD_RECOMMENDATIONS','NO_RECOMMENDATIONS','PACKAGE_ARCHS',
+                 'PACKAGE_CLASSES','TARGET_VENDOR','TARGET_VENDOR','TARGET_ARCH','TARGET_OS','BBEXTENDVARIANT','FEED_DEPLOYDIR_BASE_URI']
+    variables.extend(sdk_command_variables(d))
+    return " ".join(variables)
+
+do_populate_sdk[vardeps] += "${@sdk_variables(d)}"
+
+do_populate_sdk[file-checksums] += "${COREBASE}/meta/files/toolchain-shar-relocate.sh:True \
+                                    ${COREBASE}/meta/files/toolchain-shar-extract.sh:True"
+
 do_populate_sdk[dirs] = "${PKGDATA_DIR} ${TOPDIR}"
 do_populate_sdk[depends] += "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_DEPENDS', True).split()])}  ${@d.getVarFlag('do_rootfs', 'depends', False)}"
 do_populate_sdk[rdepends] = "${@' '.join([x + ':do_populate_sysroot' for x in d.getVar('SDK_RDEPENDS', True).split()])}"
diff --git a/yocto-poky/meta/classes/populate_sdk_ext.bbclass b/yocto-poky/meta/classes/populate_sdk_ext.bbclass
index b9808bb..87518d1 100644
--- a/yocto-poky/meta/classes/populate_sdk_ext.bbclass
+++ b/yocto-poky/meta/classes/populate_sdk_ext.bbclass
@@ -15,12 +15,44 @@
 
 SDK_RELOCATE_AFTER_INSTALL_task-populate-sdk-ext = "0"
 
+SDK_EXT = ""
+SDK_EXT_task-populate-sdk-ext = "-ext"
+
+# Options are full or minimal
+SDK_EXT_TYPE ?= "full"
+
+SDK_RECRDEP_TASKS ?= ""
+
 SDK_LOCAL_CONF_WHITELIST ?= ""
-SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION BB_NUMBER_THREADS PARALLEL_MAKE PRSERV_HOST"
+SDK_LOCAL_CONF_BLACKLIST ?= "CONF_VERSION \
+                             BB_NUMBER_THREADS \
+                             PARALLEL_MAKE \
+                             PRSERV_HOST \
+                             SSTATE_MIRRORS \
+                            "
 SDK_INHERIT_BLACKLIST ?= "buildhistory icecc"
 SDK_UPDATE_URL ?= ""
 
 SDK_TARGETS ?= "${PN}"
+
+def get_sdk_install_targets(d):
+    sdk_install_targets = ''
+    if d.getVar('SDK_EXT_TYPE', True) != 'minimal':
+        sdk_install_targets = d.getVar('SDK_TARGETS', True)
+
+        depd = d.getVar('BB_TASKDEPDATA', False)
+        for v in depd.itervalues():
+            if v[1] == 'do_image_complete':
+                if v[0] not in sdk_install_targets:
+                    sdk_install_targets += ' {}'.format(v[0])
+
+    if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1':
+        sdk_install_targets += ' meta-world-pkgdata:do_allpackagedata'
+
+    return sdk_install_targets
+
+get_sdk_install_targets[vardepsexclude] = "BB_TASKDEPDATA"
+
 OE_INIT_ENV_SCRIPT ?= "oe-init-build-env"
 
 # The files from COREBASE that you want preserved in the COREBASE copied
@@ -36,12 +68,18 @@
 
 SDK_DIR_task-populate-sdk-ext = "${WORKDIR}/sdk-ext"
 B_task-populate-sdk-ext = "${SDK_DIR}"
-TOOLCHAIN_OUTPUTNAME_task-populate-sdk-ext = "${SDK_NAME}-toolchain-ext-${SDK_VERSION}"
+TOOLCHAINEXT_OUTPUTNAME = "${SDK_NAME}-toolchain-ext-${SDK_VERSION}"
+TOOLCHAIN_OUTPUTNAME_task-populate-sdk-ext = "${TOOLCHAINEXT_OUTPUTNAME}"
+
+SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manifest"
+SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest"
 
 SDK_TITLE_task-populate-sdk-ext = "${@d.getVar('DISTRO_NAME', True) or d.getVar('DISTRO', True)} Extensible SDK"
 
 python copy_buildsystem () {
     import re
+    import shutil
+    import glob
     import oe.copy_buildsystem
 
     oe_init_env_script = d.getVar('OE_INIT_ENV_SCRIPT', True)
@@ -53,7 +91,14 @@
     # Copy in all metadata layers + bitbake (as repositories)
     buildsystem = oe.copy_buildsystem.BuildSystem('extensible SDK', d)
     baseoutpath = d.getVar('SDK_OUTPUT', True) + '/' + d.getVar('SDKPATH', True)
-    layers_copied = buildsystem.copy_bitbake_and_layers(baseoutpath + '/layers')
+
+    # Determine if we're building a derivative extensible SDK (from devtool build-sdk)
+    derivative = (d.getVar('SDK_DERIVATIVE', True) or '') == '1'
+    if derivative:
+        workspace_name = 'orig-workspace'
+    else:
+        workspace_name = None
+    layers_copied = buildsystem.copy_bitbake_and_layers(baseoutpath + '/layers', workspace_name)
 
     sdkbblayers = []
     corebase = os.path.basename(d.getVar('COREBASE', True))
@@ -95,6 +140,10 @@
     with open(os.path.join(baseoutpath, 'conf', 'devtool.conf'), 'w') as f:
         config.write(f)
 
+    unlockedsigs =  os.path.join(baseoutpath, 'conf', 'unlocked-sigs.inc')
+    with open(unlockedsigs, 'w') as f:
+        pass
+
     # Create a layer for new recipes / appends
     bbpath = d.getVar('BBPATH', True)
     bb.process.run(['devtool', '--bbpath', bbpath, '--basepath', baseoutpath, 'create-workspace', '--create-only', os.path.join(baseoutpath, 'workspace')])
@@ -107,7 +156,12 @@
         f.write('# this configuration provides, it is strongly suggested that you set\n')
         f.write('# up a proper instance of the full build system and use that instead.\n\n')
 
-        f.write('LCONF_VERSION = "%s"\n\n' % d.getVar('LCONF_VERSION', False))
+        # LCONF_VERSION may not be set, for example when using meta-poky
+        # so don't error if it isn't found
+        lconf_version = d.getVar('LCONF_VERSION', False)
+        if lconf_version is not None:
+            f.write('LCONF_VERSION = "%s"\n\n' % lconf_version)
+
         f.write('BBPATH = "$' + '{TOPDIR}"\n')
         f.write('SDKBASEMETAPATH = "$' + '{TOPDIR}"\n')
         f.write('BBLAYERS := " \\\n')
@@ -116,74 +170,180 @@
         f.write('    $' + '{SDKBASEMETAPATH}/workspace \\\n')
         f.write('    "\n')
 
+    env_whitelist = (d.getVar('BB_ENV_EXTRAWHITE', True) or '').split()
+    env_whitelist_values = {}
+
     # Create local.conf
-    local_conf_whitelist = (d.getVar('SDK_LOCAL_CONF_WHITELIST', True) or '').split()
-    local_conf_blacklist = (d.getVar('SDK_LOCAL_CONF_BLACKLIST', True) or '').split()
-    def handle_var(varname, origvalue, op, newlines):
-        if varname in local_conf_blacklist or (origvalue.strip().startswith('/') and not varname in local_conf_whitelist):
-            newlines.append('# Removed original setting of %s\n' % varname)
-            return None, op, 0, True
-        else:
-            return origvalue, op, 0, True
-    varlist = ['[^#=+ ]*']
     builddir = d.getVar('TOPDIR', True)
-    with open(builddir + '/conf/local.conf', 'r') as f:
-        oldlines = f.readlines()
-    (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var)
+    if derivative:
+        shutil.copyfile(builddir + '/conf/local.conf', baseoutpath + '/conf/local.conf')
+    else:
+        local_conf_whitelist = (d.getVar('SDK_LOCAL_CONF_WHITELIST', True) or '').split()
+        local_conf_blacklist = (d.getVar('SDK_LOCAL_CONF_BLACKLIST', True) or '').split()
+        def handle_var(varname, origvalue, op, newlines):
+            if varname in local_conf_blacklist or (origvalue.strip().startswith('/') and not varname in local_conf_whitelist):
+                newlines.append('# Removed original setting of %s\n' % varname)
+                return None, op, 0, True
+            else:
+                if varname in env_whitelist:
+                    env_whitelist_values[varname] = origvalue
+                return origvalue, op, 0, True
+        varlist = ['[^#=+ ]*']
+        with open(builddir + '/conf/local.conf', 'r') as f:
+            oldlines = f.readlines()
+        (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var)
 
-    with open(baseoutpath + '/conf/local.conf', 'w') as f:
-        f.write('# WARNING: this configuration has been automatically generated and in\n')
-        f.write('# most cases should not be edited. If you need more flexibility than\n')
-        f.write('# this configuration provides, it is strongly suggested that you set\n')
-        f.write('# up a proper instance of the full build system and use that instead.\n\n')
-        for line in newlines:
-            if line.strip() and not line.startswith('#'):
+        with open(baseoutpath + '/conf/local.conf', 'w') as f:
+            f.write('# WARNING: this configuration has been automatically generated and in\n')
+            f.write('# most cases should not be edited. If you need more flexibility than\n')
+            f.write('# this configuration provides, it is strongly suggested that you set\n')
+            f.write('# up a proper instance of the full build system and use that instead.\n\n')
+            for line in newlines:
+                if line.strip() and not line.startswith('#'):
+                    f.write(line)
+            # Write a newline just in case there's none at the end of the original
+            f.write('\n')
+
+            f.write('INHERIT += "%s"\n\n' % 'uninative')
+            f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False))
+
+            # Some classes are not suitable for SDK, remove them from INHERIT
+            f.write('INHERIT_remove = "%s"\n' % d.getVar('SDK_INHERIT_BLACKLIST', False))
+
+            # Bypass the default connectivity check if any
+            f.write('CONNECTIVITY_CHECK_URIS = ""\n\n')
+
+            # This warning will come out if reverse dependencies for a task
+            # don't have sstate as well as the task itself. We already know
+            # this will be the case for the extensible sdk, so turn off the
+            # warning.
+            f.write('SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK = "none"\n\n')
+
+            # Error if the sigs in the locked-signature file don't match
+            # the sig computed from the metadata.
+            f.write('SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "error"\n\n')
+
+            # Hide the config information from bitbake output (since it's fixed within the SDK)
+            f.write('BUILDCFG_HEADER = ""\n')
+
+            # Allow additional config through sdk-extra.conf
+            fn = bb.cookerdata.findConfigFile('sdk-extra.conf', d)
+            if fn:
+                with open(fn, 'r') as xf:
+                    for line in xf:
+                        f.write(line)
+
+            # If you define a sdk_extraconf() function then it can contain additional config
+            # (Though this is awkward; sdk-extra.conf should probably be used instead)
+            extraconf = (d.getVar('sdk_extraconf', True) or '').strip()
+            if extraconf:
+                # Strip off any leading / trailing spaces
+                for line in extraconf.splitlines():
+                    f.write(line.strip() + '\n')
+
+            f.write('require conf/locked-sigs.inc\n')
+            f.write('require conf/unlocked-sigs.inc\n')
+
+    if os.path.exists(builddir + '/conf/auto.conf'):
+        if derivative:
+            shutil.copyfile(builddir + '/conf/auto.conf', baseoutpath + '/conf/auto.conf')
+        else:
+            with open(builddir + '/conf/auto.conf', 'r') as f:
+                oldlines = f.readlines()
+            (updated, newlines) = bb.utils.edit_metadata(oldlines, varlist, handle_var)
+            with open(baseoutpath + '/conf/auto.conf', 'w') as f:
+                f.write('# WARNING: this configuration has been automatically generated and in\n')
+                f.write('# most cases should not be edited. If you need more flexibility than\n')
+                f.write('# this configuration provides, it is strongly suggested that you set\n')
+                f.write('# up a proper instance of the full build system and use that instead.\n\n')
+                for line in newlines:
+                    if line.strip() and not line.startswith('#'):
+                        f.write(line)
+
+    # Ensure any variables set from the external environment (by way of
+    # BB_ENV_EXTRAWHITE) are set in the SDK's configuration
+    extralines = []
+    for name, value in env_whitelist_values.iteritems():
+        actualvalue = d.getVar(name, True) or ''
+        if value != actualvalue:
+            extralines.append('%s = "%s"\n' % (name, actualvalue))
+    if extralines:
+        with open(baseoutpath + '/conf/local.conf', 'a') as f:
+            f.write('\n')
+            f.write('# Extra settings from environment:\n')
+            for line in extralines:
                 f.write(line)
-
-        f.write('INHERIT += "%s"\n\n' % 'uninative')
-        f.write('CONF_VERSION = "%s"\n\n' % d.getVar('CONF_VERSION', False))
-
-        # Some classes are not suitable for SDK, remove them from INHERIT
-        f.write('INHERIT_remove = "%s"\n' % d.getVar('SDK_INHERIT_BLACKLIST'))
-
-        # Bypass the default connectivity check if any
-        f.write('CONNECTIVITY_CHECK_URIS = ""\n\n')
-
-        # Another hack, but we want the native part of sstate to be kept the same
-        # regardless of the host distro
-        fixedlsbstring = 'SDK-Fixed'
-        f.write('NATIVELSBSTRING_forcevariable = "%s"\n\n' % fixedlsbstring)
-
-        # Ensure locked sstate cache objects are re-used without error
-        f.write('SIGGEN_LOCKEDSIGS_CHECK_LEVEL = "none"\n\n')
-
-        # If you define a sdk_extraconf() function then it can contain additional config
-        extraconf = (d.getVar('sdk_extraconf', True) or '').strip()
-        if extraconf:
-            # Strip off any leading / trailing spaces
-            for line in extraconf.splitlines():
-                f.write(line.strip() + '\n')
-
-        f.write('require conf/locked-sigs.inc\n')
-
-    sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc'
-    oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
+            f.write('\n')
 
     # Filter the locked signatures file to just the sstate tasks we are interested in
-    allowed_tasks = ['do_populate_lic', 'do_populate_sysroot', 'do_packagedata', 'do_package_write_ipk', 'do_package_write_rpm', 'do_package_write_deb', 'do_package_qa', 'do_deploy']
     excluded_targets = d.getVar('SDK_TARGETS', True)
+    sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc'
     lockedsigs_pruned = baseoutpath + '/conf/locked-sigs.inc'
-    oe.copy_buildsystem.prune_lockedsigs(allowed_tasks,
-                                         excluded_targets,
+    oe.copy_buildsystem.prune_lockedsigs([],
+                                         excluded_targets.split(),
                                          sigfile,
                                          lockedsigs_pruned)
 
     sstate_out = baseoutpath + '/sstate-cache'
     bb.utils.remove(sstate_out, True)
-    oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_pruned,
-                                                   d.getVar('SSTATE_DIR', True),
-                                                   sstate_out, d,
-                                                   fixedlsbstring)
+    # uninative.bbclass sets NATIVELSBSTRING to 'universal'
+    fixedlsbstring = 'universal'
+
+    # Add packagedata if enabled
+    if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1':
+        lockedsigs_base = d.getVar('WORKDIR', True) + '/locked-sigs-base.inc'
+        lockedsigs_copy = d.getVar('WORKDIR', True) + '/locked-sigs-copy.inc'
+        shutil.move(lockedsigs_pruned, lockedsigs_base)
+        oe.copy_buildsystem.merge_lockedsigs(['do_packagedata'],
+                                             lockedsigs_base,
+                                             d.getVar('STAGING_DIR_HOST', True) + '/world-pkgdata/locked-sigs-pkgdata.inc',
+                                             lockedsigs_pruned,
+                                             lockedsigs_copy)
+
+    if d.getVar('SDK_EXT_TYPE', True) == 'minimal':
+        if derivative:
+            # Assume the user is not going to set up an additional sstate
+            # mirror, thus we need to copy the additional artifacts (from
+            # workspace recipes) into the derivative SDK
+            lockedsigs_orig = d.getVar('TOPDIR', True) + '/conf/locked-sigs.inc'
+            if os.path.exists(lockedsigs_orig):
+                lockedsigs_extra = d.getVar('WORKDIR', True) + '/locked-sigs-extra.inc'
+                oe.copy_buildsystem.merge_lockedsigs(None,
+                                                     lockedsigs_orig,
+                                                     lockedsigs_pruned,
+                                                     None,
+                                                     lockedsigs_extra)
+                oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_extra,
+                                                               d.getVar('SSTATE_DIR', True),
+                                                               sstate_out, d,
+                                                               fixedlsbstring)
+    else:
+        oe.copy_buildsystem.create_locked_sstate_cache(lockedsigs_pruned,
+                                                       d.getVar('SSTATE_DIR', True),
+                                                       sstate_out, d,
+                                                       fixedlsbstring)
+
+    # We don't need sstate do_package files
+    for root, dirs, files in os.walk(sstate_out):
+        for name in files:
+            if name.endswith("_package.tgz"):
+                f = os.path.join(root, name)
+                os.remove(f)
+
+    # Write manifest file
+    # Note: at the moment we cannot include the env setup script here to keep
+    # it updated, since it gets modified during SDK installation (see
+    # sdk_ext_postinst() below) thus the checksum we take here would always
+    # be different.
+    manifest_file_list = ['conf/*']
+    manifest_file = os.path.join(baseoutpath, 'conf', 'sdk-conf-manifest')
+    with open(manifest_file, 'w') as f:
+        for item in manifest_file_list:
+            for fn in glob.glob(os.path.join(baseoutpath, item)):
+                if fn == manifest_file:
+                    continue
+                chksum = bb.utils.sha256_file(fn)
+                f.write('%s\t%s\n' % (chksum, os.path.relpath(fn, baseoutpath)))
 }
 
 def extsdk_get_buildtools_filename(d):
@@ -195,14 +355,21 @@
 	lnr ${SDK_OUTPUT}/${SDKPATH}/${scriptrelpath}/recipetool ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/recipetool
 	touch ${SDK_OUTPUT}/${SDKPATH}/.devtoolbase
 
+	localconf=${SDK_OUTPUT}/${SDKPATH}/conf/local.conf
+
 	# find latest buildtools-tarball and install it
 	buildtools_path=`ls -t1 ${SDK_DEPLOY}/${@extsdk_get_buildtools_filename(d)} | head -n1`
 	install $buildtools_path ${SDK_OUTPUT}/${SDKPATH}
 
-	install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH}
+	# For now this is where uninative.bbclass expects the tarball
+	chksum=`sha256sum ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 | cut -f 1 -d ' '`
+	install -d ${SDK_OUTPUT}/${SDKPATH}/downloads/uninative/$chksum/
+	install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH}/downloads/uninative/$chksum/
+	echo "UNINATIVE_CHECKSUM[${BUILD_ARCH}] = '$chksum'" >> ${SDK_OUTPUT}/${SDKPATH}/conf/local.conf
 
-	install -m 0755 ${COREBASE}/meta/files/ext-sdk-prepare.sh ${SDK_OUTPUT}/${SDKPATH}
+	install -m 0644 ${COREBASE}/meta/files/ext-sdk-prepare.py ${SDK_OUTPUT}/${SDKPATH}
 }
+do_populate_sdk_ext[file-checksums] += "${COREBASE}/meta/files/ext-sdk-prepare.py:True"
 
 # Since bitbake won't run as root it doesn't make sense to try and install
 # the extensible sdk as root.
@@ -212,6 +379,12 @@
 		exit 1
 	fi
 	SDK_EXTENSIBLE="1"
+	if [ "$publish" = "1" ] ; then
+		EXTRA_TAR_OPTIONS="$EXTRA_TAR_OPTIONS --exclude=ext-sdk-prepare.py"
+		if [ "${SDK_EXT_TYPE}" = "minimal" ] ; then
+			EXTRA_TAR_OPTIONS="$EXTRA_TAR_OPTIONS --exclude=sstate-cache"
+		fi
+	fi
 }
 SDK_PRE_INSTALL_COMMAND_task-populate-sdk-ext = "${sdk_ext_preinst}"
 
@@ -221,6 +394,9 @@
 	cd $target_sdk_dir
 	printf "buildtools\ny" | ./*buildtools-nativesdk-standalone* > /dev/null || ( printf 'ERROR: buildtools installation failed\n' ; exit 1 )
 
+	# Delete the buildtools tar file since it won't be used again
+	rm ./*buildtools-nativesdk-standalone*.sh -f
+
 	# Make sure when the user sets up the environment, they also get
 	# the buildtools-tarball tools in their path.
 	env_setup_script="$target_sdk_dir/environment-setup-${REAL_MULTIMACH_TARGET_SYS}"
@@ -231,25 +407,22 @@
 
 	# A bit of another hack, but we need this in the path only for devtool
 	# so put it at the end of $PATH.
-	echo "export PATH=\$PATH:$target_sdk_dir/sysroots/${SDK_SYS}/${bindir_nativesdk}" >> $env_setup_script
+	echo "export PATH=$target_sdk_dir/sysroots/${SDK_SYS}${bindir_nativesdk}:\$PATH" >> $env_setup_script
 
 	echo "printf 'SDK environment now set up; additionally you may now run devtool to perform development tasks.\nRun devtool --help for further details.\n'" >> $env_setup_script
 
 	# Warn if trying to use external bitbake and the ext SDK together
 	echo "(which bitbake > /dev/null 2>&1 && echo 'WARNING: attempting to use the extensible SDK in an environment set up to run bitbake - this may lead to unexpected results. Please source this script in a new shell session instead.') || true" >> $env_setup_script
 
-	# For now this is where uninative.bbclass expects the tarball
-	mv *-nativesdk-libc.tar.* $target_sdk_dir/`dirname ${oe_init_build_env_path}`
-
 	if [ "$prepare_buildsystem" != "no" ]; then
 		printf "Preparing build system...\n"
 		# dash which is /bin/sh on Ubuntu will not preserve the
 		# current working directory when first ran, nor will it set $1 when
 		# sourcing a script. That is why this has to look so ugly.
 		LOGFILE="$target_sdk_dir/preparing_build_system.log"
-		sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && $target_sdk_dir/ext-sdk-prepare.sh $target_sdk_dir '${SDK_TARGETS}' >> $LOGFILE 2>&1" || { echo "ERROR: SDK preparation failed: see $LOGFILE"; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
+		sh -c ". buildtools/environment-setup* > $LOGFILE && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> $LOGFILE && python $target_sdk_dir/ext-sdk-prepare.py '${SDK_INSTALL_TARGETS}' >> $LOGFILE 2>&1" || { echo "ERROR: SDK preparation failed: see $LOGFILE"; echo "printf 'ERROR: this SDK was not fully installed and needs reinstalling\n'" >> $env_setup_script ; exit 1 ; }
+		rm $target_sdk_dir/ext-sdk-prepare.py
 	fi
-	rm -f $target_sdk_dir/ext-sdk-prepare.sh
 	echo done
 }
 
@@ -257,15 +430,37 @@
 
 SDK_POSTPROCESS_COMMAND_prepend_task-populate-sdk-ext = "copy_buildsystem; install_tools; "
 
+SDK_INSTALL_TARGETS = ""
 fakeroot python do_populate_sdk_ext() {
     # FIXME hopefully we can remove this restriction at some point, but uninative
     # currently forces this upon us
     if d.getVar('SDK_ARCH', True) != d.getVar('BUILD_ARCH', True):
         bb.fatal('The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is set to %s (likely via setting SDKMACHINE) which is different from the architecture of the build machine (%s). Unable to continue.' % (d.getVar('SDK_ARCH', True), d.getVar('BUILD_ARCH', True)))
 
+    d.setVar('SDK_INSTALL_TARGETS', get_sdk_install_targets(d))
+
     bb.build.exec_func("do_populate_sdk", d)
 }
 
+def get_ext_sdk_depends(d):
+    return d.getVarFlag('do_rootfs', 'depends', True) + ' ' + d.getVarFlag('do_build', 'depends', True)
+
+python do_sdk_depends() {
+    # We have to do this separately in its own task so we avoid recursing into
+    # dependencies we don't need to (e.g. buildtools-tarball) and bringing those
+    # into the SDK's sstate-cache
+    import oe.copy_buildsystem
+    sigfile = d.getVar('WORKDIR', True) + '/locked-sigs.inc'
+    oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
+}
+addtask sdk_depends
+
+do_sdk_depends[dirs] = "${WORKDIR}"
+do_sdk_depends[depends] = "${@get_ext_sdk_depends(d)}"
+do_sdk_depends[recrdeptask] = "${@d.getVarFlag('do_populate_sdk', 'recrdeptask', False)}"
+do_sdk_depends[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy ${SDK_RECRDEP_TASKS}"
+do_sdk_depends[rdepends] = "${@get_sdk_ext_rdepends(d)}"
+
 def get_sdk_ext_rdepends(d):
     localdata = d.createCopy()
     localdata.appendVar('OVERRIDES', ':task-populate-sdk-ext')
@@ -273,17 +468,20 @@
     return localdata.getVarFlag('do_populate_sdk', 'rdepends', True)
 
 do_populate_sdk_ext[dirs] = "${@d.getVarFlag('do_populate_sdk', 'dirs', False)}"
-do_populate_sdk_ext[depends] += "${@d.getVarFlag('do_populate_sdk', 'depends', False)}"
-do_populate_sdk_ext[rdepends] = "${@get_sdk_ext_rdepends(d)}"
-do_populate_sdk_ext[recrdeptask] += "${@d.getVarFlag('do_populate_sdk', 'recrdeptask', False)}"
 
-
-do_populate_sdk_ext[depends] += "buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk"
+do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', False)} \
+                                buildtools-tarball:do_populate_sdk uninative-tarball:do_populate_sdk \
+                                ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA', True) == '1' else ''}"
 
 do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS', True).split()])}"
-do_populate_sdk_ext[recrdeptask] += "do_populate_lic do_package_qa do_populate_sysroot do_deploy"
 
-# Make sure codes change in copy_buildsystem can result in rebuilt
-do_populate_sdk_ext[vardeps] += "copy_buildsystem"
+# Make sure code changes can result in rebuild
+do_populate_sdk_ext[vardeps] += "copy_buildsystem \
+                                 sdk_ext_postinst"
 
-addtask populate_sdk_ext
+# Since any change in the metadata of any layer should cause a rebuild of the
+# sdk(since the layers are put in the sdk) set the task to nostamp so it
+# always runs.
+do_populate_sdk_ext[nostamp] = "1"
+
+addtask populate_sdk_ext after do_sdk_depends
diff --git a/yocto-poky/meta/classes/prexport.bbclass b/yocto-poky/meta/classes/prexport.bbclass
index 5a1cb33..809ec10 100644
--- a/yocto-poky/meta/classes/prexport.bbclass
+++ b/yocto-poky/meta/classes/prexport.bbclass
@@ -8,7 +8,8 @@
 
 python prexport_handler () {
     import bb.event
-    if not e.data:
+    if not e.data or bb.data.inherits_class('native', e.data) or \
+        bb.data.inherits_class('crosssdk', e.data):
         return
 
     if isinstance(e, bb.event.RecipeParsed):
@@ -21,7 +22,7 @@
             bb.fatal("prexport_handler: export failed!")
         (metainfo, datainfo) = retval
         if not datainfo:
-            bb.warn("prexport_handler: No AUTOPR values found for %s" % ver)
+            bb.note("prexport_handler: No AUTOPR values found for %s" % ver)
             return
         oe.prservice.prserv_export_tofile(e.data, None, datainfo, False)
         if 'AUTOINC' in ver:
diff --git a/yocto-poky/meta/classes/ptest-gnome.bbclass b/yocto-poky/meta/classes/ptest-gnome.bbclass
index b2949af..478a334 100644
--- a/yocto-poky/meta/classes/ptest-gnome.bbclass
+++ b/yocto-poky/meta/classes/ptest-gnome.bbclass
@@ -1,6 +1,6 @@
 inherit ptest
 
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-installed-tests', '--disable-installed-tests', d)}"
+EXTRA_OECONF_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', '--enable-installed-tests', '--disable-installed-tests', d)}"
 
 FILES_${PN}-ptest += "${libexecdir}/installed-tests/ \
                       ${datadir}/installed-tests/"
diff --git a/yocto-poky/meta/classes/ptest.bbclass b/yocto-poky/meta/classes/ptest.bbclass
index 4dc5dbe..fa3561e 100644
--- a/yocto-poky/meta/classes/ptest.bbclass
+++ b/yocto-poky/meta/classes/ptest.bbclass
@@ -58,7 +58,7 @@
 
 python () {
     if not bb.data.inherits_class('native', d) and not bb.data.inherits_class('cross', d):
-        d.setVarFlag('do_install_ptest_base', 'fakeroot', 1)
+        d.setVarFlag('do_install_ptest_base', 'fakeroot', '1')
 
     # Remove all '*ptest_base' tasks when ptest is not enabled
     if not(d.getVar('PTEST_ENABLED', True) == "1"):
diff --git a/yocto-poky/meta/classes/python3native.bbclass b/yocto-poky/meta/classes/python3native.bbclass
index cf83017..8ec6b76 100644
--- a/yocto-poky/meta/classes/python3native.bbclass
+++ b/yocto-poky/meta/classes/python3native.bbclass
@@ -1,4 +1,4 @@
-PYTHON_BASEVERSION = "3.4"
+PYTHON_BASEVERSION = "3.5"
 
 inherit python-dir
 
diff --git a/yocto-poky/meta/classes/qemu.bbclass b/yocto-poky/meta/classes/qemu.bbclass
index 601f587..75739db 100644
--- a/yocto-poky/meta/classes/qemu.bbclass
+++ b/yocto-poky/meta/classes/qemu.bbclass
@@ -13,7 +13,19 @@
         target_arch = "ppc64"
 
     return "qemu-" + target_arch
-#
+
+def qemu_wrapper_cmdline(data, rootfs_path, library_paths):
+    import string
+
+    qemu_binary = qemu_target_binary(data)
+    if qemu_binary == "qemu-allarch":
+        qemu_binary = "qemuwrapper"
+
+    qemu_options = data.getVar("QEMU_OPTIONS", True)    
+
+    return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
+            + " -E LD_LIBRARY_PATH=" + ":".join(library_paths) + " "
+
 # Next function will return a string containing the command that is needed to
 # to run a certain binary through qemu. For example, in order to make a certain
 # postinstall scriptlet run at do_rootfs time and running the postinstall is
@@ -23,29 +35,25 @@
 # ${@qemu_run_binary(d, '$D', '/usr/bin/test_app')} [test_app arguments]
 #
 def qemu_run_binary(data, rootfs_path, binary):
-    qemu_binary = qemu_target_binary(data)
-    if qemu_binary == "qemu-allarch":
-        qemu_binary = "qemuwrapper"
-
     libdir = rootfs_path + data.getVar("libdir", False)
     base_libdir = rootfs_path + data.getVar("base_libdir", False)
-    qemu_options = data.getVar("QEMU_OPTIONS", True)
 
-    return "PSEUDO_UNLOAD=1 " + qemu_binary + " " + qemu_options + " -L " + rootfs_path\
-            + " -E LD_LIBRARY_PATH=" + libdir + ":" + base_libdir + " "\
-            + rootfs_path + binary
+    return qemu_wrapper_cmdline(data, rootfs_path, [libdir, base_libdir]) + rootfs_path + binary
 
-# QEMU_EXTRAOPTIONS is not meant to be directly used, the extensions are 
-# PACKAGE_ARCH, not overrides and hence have to do this dance. Simply being arch 
-# specific isn't good enough.
+# QEMU_EXTRAOPTIONS is not meant to be directly used, the extensions are
+# PACKAGE_ARCH, *NOT* overrides.
+# In some cases (e.g. ppc) simply being arch specific (apparently) isn't good
+# enough and a PACKAGE_ARCH specific -cpu option is needed (hence we have to do
+# this dance). For others (e.g. arm) a -cpu option is not necessary, since the
+# qemu-arm default CPU supports all required architecture levels.
+
 QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or ""}"
-QEMU_EXTRAOPTIONS_iwmmxt    = " -cpu pxa270-c5"
-QEMU_EXTRAOPTIONS_armv6     = " -cpu arm1136"
-QEMU_EXTRAOPTIONS_armv7a    = " -cpu cortex-a8"
-QEMU_EXTRAOPTIONS_e500v2    = " -cpu e500v2"
-QEMU_EXTRAOPTIONS_e500mc    = " -cpu e500mc"
-QEMU_EXTRAOPTIONS_e5500     = " -cpu e5500"
-QEMU_EXTRAOPTIONS_e5500-64b = " -cpu e5500"
-QEMU_EXTRAOPTIONS_e6500     = " -cpu e6500"
-QEMU_EXTRAOPTIONS_e6500-64b = " -cpu e6500"
-QEMU_EXTRAOPTIONS_ppc7400   = " -cpu 7400"
+QEMU_OPTIONS[vardeps] += "QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}"
+
+QEMU_EXTRAOPTIONS_ppce500v2 = " -cpu e500v2"
+QEMU_EXTRAOPTIONS_ppce500mc = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_ppce5500 = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_ppc7400 = " -cpu 7400"
diff --git a/yocto-poky/meta/classes/qmake2.bbclass b/yocto-poky/meta/classes/qmake2.bbclass
deleted file mode 100644
index 6e73ad2..0000000
--- a/yocto-poky/meta/classes/qmake2.bbclass
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# QMake variables for Qt4
-#
-inherit qmake_base
-
-DEPENDS_prepend = "qt4-tools-native "
-
-export QMAKESPEC = "${STAGING_DATADIR}/qt4/mkspecs/${TARGET_OS}-oe-g++"
-export OE_QMAKE_QT_CONFIG = "${STAGING_DATADIR}/qt4/mkspecs/qconfig.pri"
-export OE_QMAKE_UIC = "${STAGING_BINDIR_NATIVE}/uic4"
-export OE_QMAKE_UIC3 = "${STAGING_BINDIR_NATIVE}/uic34"
-export OE_QMAKE_MOC = "${STAGING_BINDIR_NATIVE}/moc4"
-export OE_QMAKE_RCC = "${STAGING_BINDIR_NATIVE}/rcc4"
-export OE_QMAKE_QDBUSCPP2XML = "${STAGING_BINDIR_NATIVE}/qdbuscpp2xml4"
-export OE_QMAKE_QDBUSXML2CPP = "${STAGING_BINDIR_NATIVE}/qdbusxml2cpp4"
-export OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}/qmake2"
-export OE_QMAKE_LINK = "${CXX}"
-export OE_QMAKE_CXXFLAGS = "${CXXFLAGS}"
-export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/qt4"
-export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}"
-export OE_QMAKE_LIBS_QT = "qt"
-export OE_QMAKE_LIBS_X11 = "-lXext -lX11 -lm"
-export OE_QMAKE_LIBS_X11SM = "-lSM -lICE"
-export OE_QMAKE_LCONVERT = "${STAGING_BINDIR_NATIVE}/lconvert4"
-export OE_QMAKE_LRELEASE = "${STAGING_BINDIR_NATIVE}/lrelease4"
-export OE_QMAKE_LUPDATE = "${STAGING_BINDIR_NATIVE}/lupdate4"
-export OE_QMAKE_XMLPATTERNS = "${STAGING_BINDIR_NATIVE}/xmlpatterns4"
diff --git a/yocto-poky/meta/classes/qmake_base.bbclass b/yocto-poky/meta/classes/qmake_base.bbclass
deleted file mode 100644
index dc98713..0000000
--- a/yocto-poky/meta/classes/qmake_base.bbclass
+++ /dev/null
@@ -1,119 +0,0 @@
-QMAKE_MKSPEC_PATH ?= "${STAGING_DATADIR_NATIVE}/qmake"
-
-OE_QMAKE_PLATFORM = "${TARGET_OS}-oe-g++"
-QMAKESPEC := "${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}"
-
-# We override this completely to eliminate the -e normally passed in
-EXTRA_OEMAKE = ""
-
-export OE_QMAKE_CC="${CC}"
-export OE_QMAKE_CFLAGS="${CFLAGS}"
-export OE_QMAKE_CXX="${CXX}"
-export OE_QMAKE_LDFLAGS="${LDFLAGS}"
-export OE_QMAKE_AR="${AR}"
-export OE_QMAKE_STRIP="echo"
-export OE_QMAKE_RPATH="-Wl,-rpath-link,"
-
-# default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11
-
-oe_qmake_mkspecs () {
-    mkdir -p mkspecs/${OE_QMAKE_PLATFORM}
-    for f in ${QMAKE_MKSPEC_PATH}/${OE_QMAKE_PLATFORM}/*; do
-        if [ -L $f ]; then
-            lnk=`readlink $f`
-            if [ -f mkspecs/${OE_QMAKE_PLATFORM}/$lnk ]; then
-                ln -s $lnk mkspecs/${OE_QMAKE_PLATFORM}/`basename $f`
-            else
-                cp $f mkspecs/${OE_QMAKE_PLATFORM}/
-            fi
-        else
-            cp $f mkspecs/${OE_QMAKE_PLATFORM}/
-        fi
-    done
-}
-
-do_generate_qt_config_file() {
-	export QT_CONF_PATH=${WORKDIR}/qt.conf
-	cat > ${WORKDIR}/qt.conf <<EOF
-[Paths]
-Prefix =
-Binaries = ${STAGING_BINDIR_NATIVE}
-Headers = ${STAGING_INCDIR}/${QT_DIR_NAME}
-Plugins = ${STAGING_LIBDIR}/${QT_DIR_NAME}/plugins/
-Mkspecs = ${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/
-EOF
-}
-
-addtask generate_qt_config_file after do_patch before do_configure
-
-qmake_base_do_configure() {
-	case ${QMAKESPEC} in
-	*linux-oe-g++|*linux-uclibc-oe-g++|*linux-gnueabi-oe-g++|*linux-uclibceabi-oe-g++|*linux-gnuspe-oe-g++|*linux-uclibcspe-oe-g++|*linux-gnun32-oe-g++)
-		;;
-	*-oe-g++)
-		die Unsupported target ${TARGET_OS} for oe-g++ qmake spec
-		;;
-	*)
-		bbnote Searching for qmake spec file
-		paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-${TARGET_ARCH}-g++"
-		paths="${QMAKE_MKSPEC_PATH}/${TARGET_OS}-g++ $paths"
-
-		if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then
-			paths="${QMAKE_MKSPEC_PATH}/qws/${TARGET_OS}-x86-g++ $paths"
-		fi
-		for i in $paths; do
-			if test -e $i; then
-				export QMAKESPEC=$i
-				break
-			fi
-		done
-		;;
-	esac
-
-	bbnote "using qmake spec in ${QMAKESPEC}, using profiles '${QMAKE_PROFILES}'"
-
-	if [ -z "${QMAKE_PROFILES}" ]; then 
-		PROFILES="`ls *.pro`"
-	else
-		PROFILES="${QMAKE_PROFILES}"
-	fi
-
-	if [ -z "$PROFILES" ]; then
-		die "QMAKE_PROFILES not set and no profiles found in $PWD"
-        fi
-
-	if [ ! -z "${EXTRA_QMAKEVARS_POST}" ]; then
-		AFTER="-after"
-		QMAKE_VARSUBST_POST="${EXTRA_QMAKEVARS_POST}"
-		bbnote "qmake postvar substitution: ${EXTRA_QMAKEVARS_POST}"
-	fi
-
-	if [ ! -z "${EXTRA_QMAKEVARS_PRE}" ]; then
-		QMAKE_VARSUBST_PRE="${EXTRA_QMAKEVARS_PRE}"
-		bbnote "qmake prevar substitution: ${EXTRA_QMAKEVARS_PRE}"
-	fi
-
-	# Hack .pro files to use OE utilities
-	LCONVERT_NAME=$(basename ${OE_QMAKE_LCONVERT})
-	LRELEASE_NAME=$(basename ${OE_QMAKE_LRELEASE})
-	LUPDATE_NAME=$(basename ${OE_QMAKE_LUPDATE})
-	XMLPATTERNS_NAME=$(basename ${OE_QMAKE_XMLPATTERNS})
-	find -name '*.pro' \
-	     -exec sed -i -e "s|\(=\s*.*\)/$LCONVERT_NAME|\1/lconvert|g" \
-	                  -e "s|\(=\s*.*\)/$LRELEASE_NAME|\1/lrelease|g" \
-	                  -e "s|\(=\s*.*\)/$LUPDATE_NAME|\1/lupdate|g" \
-	                  -e "s|\(=\s*.*\)/$XMLPATTERNS_NAME|\1/xmlpatterns|g" \
-	                  -e "s|\(=\s*.*\)/lconvert|\1/$LCONVERT_NAME|g" \
-	                  -e "s|\(=\s*.*\)/lrelease|\1/$LRELEASE_NAME|g" \
-	                  -e "s|\(=\s*.*\)/lupdate|\1/$LUPDATE_NAME|g" \
-	                  -e "s|\(=\s*.*\)/xmlpatterns|\1/$XMLPATTERNS_NAME|g" \
-	                  '{}' ';'
-
-#bbnote "Calling '${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST'"
-	unset QMAKESPEC || true
-	${OE_QMAKE_QMAKE} -makefile -spec ${QMAKESPEC} -o Makefile $QMAKE_VARSUBST_PRE $AFTER $PROFILES $QMAKE_VARSUBST_POST || die "Error calling ${OE_QMAKE_QMAKE} on $PROFILES"
-}
-
-EXPORT_FUNCTIONS do_configure
-
-addtask configure after do_unpack do_patch before do_compile
diff --git a/yocto-poky/meta/classes/qt4e.bbclass b/yocto-poky/meta/classes/qt4e.bbclass
deleted file mode 100644
index 13b1050..0000000
--- a/yocto-poky/meta/classes/qt4e.bbclass
+++ /dev/null
@@ -1,21 +0,0 @@
-QT4EDEPENDS ?= "qt4-embedded "
-DEPENDS_prepend = "${QT4EDEPENDS}"
-
-inherit qmake2
-
-QT_BASE_NAME = "qt4-embedded"
-QT_DIR_NAME = "qtopia"
-QT_LIBINFIX = "E"
-# override variables set by qmake-base to compile Qt/Embedded apps
-#
-export QMAKESPEC = "${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/${TARGET_OS}-oe-g++"
-export OE_QMAKE_QT_CONFIG = "${STAGING_DATADIR}/${QT_DIR_NAME}/mkspecs/qconfig.pri"
-export OE_QMAKE_INCDIR_QT = "${STAGING_INCDIR}/${QT_DIR_NAME}"
-export OE_QMAKE_LIBDIR_QT = "${STAGING_LIBDIR}"
-export OE_QMAKE_LIBS_QT = "qt"
-export OE_QMAKE_LIBS_X11 = ""
-export OE_QMAKE_EXTRA_MODULES = "network"
-EXTRA_QMAKEVARS_PRE += " QT_LIBINFIX=${QT_LIBINFIX} "
-
-# Qt4 uses atomic instructions not supported in thumb mode
-ARM_INSTRUCTION_SET = "arm"
diff --git a/yocto-poky/meta/classes/qt4x11.bbclass b/yocto-poky/meta/classes/qt4x11.bbclass
deleted file mode 100644
index 6f06d34..0000000
--- a/yocto-poky/meta/classes/qt4x11.bbclass
+++ /dev/null
@@ -1,14 +0,0 @@
-QT4DEPENDS ?= "qt4-x11 "
-DEPENDS_prepend = "${QT4DEPENDS}"
-
-# depends on qt4-x11
-REQUIRED_DISTRO_FEATURES += "x11"
-
-inherit qmake2 distro_features_check
-
-QT_BASE_NAME = "qt4"
-QT_DIR_NAME = "qt4"
-QT_LIBINFIX = ""
-
-# Qt4 uses atomic instructions not supported in thumb mode
-ARM_INSTRUCTION_SET = "arm"
diff --git a/yocto-poky/meta/classes/recipe_sanity.bbclass b/yocto-poky/meta/classes/recipe_sanity.bbclass
index ee04e33..295611f 100644
--- a/yocto-poky/meta/classes/recipe_sanity.bbclass
+++ b/yocto-poky/meta/classes/recipe_sanity.bbclass
@@ -143,9 +143,8 @@
 
     cfgdata = {}
     for k in d.keys():
-    #for k in ["S", "PR", "PV", "PN", "DESCRIPTION", "LICENSE", "DEPENDS",
-    #          "SECTION"]:
-        cfgdata[k] = d.getVar(k, 0)
+        if not isinstance(d.getVar(k, 0), bb.data_smart.DataSmart):
+            cfgdata[k] = d.getVar(k, 0)
 
     d.setVar("__recipe_sanity_cfgdata", cfgdata)
     #d.setVar("__recipe_sanity_cfgdata", d)
diff --git a/yocto-poky/meta/classes/remove-libtool.bbclass b/yocto-poky/meta/classes/remove-libtool.bbclass
new file mode 100644
index 0000000..3fd0cd5
--- /dev/null
+++ b/yocto-poky/meta/classes/remove-libtool.bbclass
@@ -0,0 +1,11 @@
+# This class removes libtool .la files after do_install
+
+REMOVE_LIBTOOL_LA ?= "1"
+
+remove_libtool_la() {
+	if [ "${REMOVE_LIBTOOL_LA}" != "0" ]; then
+		find "${D}" -ignore_readdir_race -name "*.la" -delete
+	fi
+}
+
+do_install[postfuncs] += "remove_libtool_la"
diff --git a/yocto-poky/meta/classes/rm_work.bbclass b/yocto-poky/meta/classes/rm_work.bbclass
index 5e9efc1..c647d88 100644
--- a/yocto-poky/meta/classes/rm_work.bbclass
+++ b/yocto-poky/meta/classes/rm_work.bbclass
@@ -63,6 +63,14 @@
                 i=dummy
                 break
                 ;;
+            *do_rootfs*)
+               i=dummy
+               break
+               ;;
+            *do_image*)
+               i=dummy
+               break
+               ;;
             *do_build*)
                 i=dummy
                 break
@@ -104,7 +112,7 @@
 }
 rm_work_populatesdk[cleandirs] = "${WORKDIR}/sdk"
 
-do_rootfs[postfuncs] += "rm_work_rootfs"
+do_image_complete[postfuncs] += "rm_work_rootfs"
 rm_work_rootfs () {
     :
 }
diff --git a/yocto-poky/meta/classes/rootfs-postcommands.bbclass b/yocto-poky/meta/classes/rootfs-postcommands.bbclass
new file mode 100644
index 0000000..95d28af
--- /dev/null
+++ b/yocto-poky/meta/classes/rootfs-postcommands.bbclass
@@ -0,0 +1,277 @@
+
+# Zap the root password if debug-tweaks feature is not enabled
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}'
+
+# Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks is enabled
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'
+
+# Enable postinst logging if debug-tweaks is enabled
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}'
+
+# Create /etc/timestamp during image construction to give a reasonably sane default time setting
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; "
+
+# Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
+
+# Write manifest
+IMAGE_MANIFEST = "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.manifest"
+ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
+# Set default postinst log file
+POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
+# Set default target for systemd images
+SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}'
+ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; ", "", d)}'
+
+ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;'
+
+# Disable DNS lookups, the SSH_DISABLE_DNS_LOOKUP can be overridden to allow
+# distros to choose not to take this change
+SSH_DISABLE_DNS_LOOKUP ?= " ssh_disable_dns_lookup ; "
+ROOTFS_POSTPROCESS_COMMAND_append_qemuall = "${SSH_DISABLE_DNS_LOOKUP}"
+
+
+
+#
+# A hook function to support read-only-rootfs IMAGE_FEATURES
+#
+read_only_rootfs_hook () {
+	# Tweak the mount option and fs_passno for rootfs in fstab
+	sed -i -e '/^[#[:space:]]*\/dev\/root/{s/defaults/ro/;s/\([[:space:]]*[[:digit:]]\)\([[:space:]]*\)[[:digit:]]$/\1\20/}' ${IMAGE_ROOTFS}/etc/fstab
+
+	# If we're using openssh and the /etc/ssh directory has no pre-generated keys,
+	# we should configure openssh to use the configuration file /etc/ssh/sshd_config_readonly
+	# and the keys under /var/run/ssh.
+	if [ -d ${IMAGE_ROOTFS}/etc/ssh ]; then
+		if [ -e ${IMAGE_ROOTFS}/etc/ssh/ssh_host_rsa_key ]; then
+			echo "SYSCONFDIR=/etc/ssh" >> ${IMAGE_ROOTFS}/etc/default/ssh
+			echo "SSHD_OPTS=" >> ${IMAGE_ROOTFS}/etc/default/ssh
+		else
+			echo "SYSCONFDIR=/var/run/ssh" >> ${IMAGE_ROOTFS}/etc/default/ssh
+			echo "SSHD_OPTS='-f /etc/ssh/sshd_config_readonly'" >> ${IMAGE_ROOTFS}/etc/default/ssh
+		fi
+	fi
+
+	# Also tweak the key location for dropbear in the same way.
+	if [ -d ${IMAGE_ROOTFS}/etc/dropbear ]; then
+		if [ -e ${IMAGE_ROOTFS}/etc/dropbear/dropbear_rsa_host_key ]; then
+			echo "DROPBEAR_RSAKEY_DIR=/etc/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear
+		else
+			echo "DROPBEAR_RSAKEY_DIR=/var/lib/dropbear" >> ${IMAGE_ROOTFS}/etc/default/dropbear
+		fi
+	fi
+
+
+	if ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "true", "false", d)}; then
+		# Change the value of ROOTFS_READ_ONLY in /etc/default/rcS to yes
+		if [ -e ${IMAGE_ROOTFS}/etc/default/rcS ]; then
+			sed -i 's/ROOTFS_READ_ONLY=no/ROOTFS_READ_ONLY=yes/' ${IMAGE_ROOTFS}/etc/default/rcS
+		fi
+		# Run populate-volatile.sh at rootfs time to set up basic files
+		# and directories to support read-only rootfs.
+		if [ -x ${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh ]; then
+			${IMAGE_ROOTFS}/etc/init.d/populate-volatile.sh
+		fi
+	fi
+
+	if ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "true", "false", d)}; then
+	    # Update user database files so that services don't fail for a read-only systemd system
+	    for conffile in ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd.conf ${IMAGE_ROOTFS}/usr/lib/sysusers.d/systemd-remote.conf; do
+		[ -e $conffile ] || continue
+		grep -v "^#" $conffile | sed -e '/^$/d' | while read type name id comment; do
+		    if [ "$type" = "u" ]; then
+			useradd_params=""
+			[ "$id" != "-" ] && useradd_params="$useradd_params --uid $id"
+			[ "$comment" != "-" ] && useradd_params="$useradd_params --comment $comment"
+			useradd_params="$useradd_params --system $name"
+			eval useradd --root ${IMAGE_ROOTFS} $useradd_params || true
+		    elif [ "$type" = "g" ]; then
+			groupadd_params=""
+			[ "$id" != "-" ] && groupadd_params="$groupadd_params --gid $id"
+			groupadd_params="$groupadd_params --system $name"
+			eval groupadd --root ${IMAGE_ROOTFS} $groupadd_params || true
+		    fi
+		done
+	    done
+	fi
+}
+
+#
+# This function is intended to disallow empty root password if 'debug-tweaks' is not in IMAGE_FEATURES.
+#
+zap_empty_root_password () {
+	if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then
+		sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/shadow
+        fi
+	if [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then
+		sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/passwd
+	fi
+} 
+
+#
+# allow dropbear/openssh to accept root logins and logins from accounts with an empty password string
+#
+ssh_allow_empty_password () {
+	for config in sshd_config sshd_config_readonly; do
+		if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config ]; then
+			sed -i 's/^[#[:space:]]*PermitRootLogin.*/PermitRootLogin yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config
+			sed -i 's/^[#[:space:]]*PermitEmptyPasswords.*/PermitEmptyPasswords yes/' ${IMAGE_ROOTFS}${sysconfdir}/ssh/$config
+		fi
+	done
+
+	if [ -e ${IMAGE_ROOTFS}${sbindir}/dropbear ] ; then
+		if grep -q DROPBEAR_EXTRA_ARGS ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear 2>/dev/null ; then
+			if ! grep -q "DROPBEAR_EXTRA_ARGS=.*-B" ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear ; then
+				sed -i 's/^DROPBEAR_EXTRA_ARGS="*\([^"]*\)"*/DROPBEAR_EXTRA_ARGS="\1 -B"/' ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear
+			fi
+		else
+			printf '\nDROPBEAR_EXTRA_ARGS="-B"\n' >> ${IMAGE_ROOTFS}${sysconfdir}/default/dropbear
+		fi
+	fi
+
+	if [ -d ${IMAGE_ROOTFS}${sysconfdir}/pam.d ] ; then
+		sed -i 's/nullok_secure/nullok/' ${IMAGE_ROOTFS}${sysconfdir}/pam.d/*
+	fi
+}
+
+ssh_disable_dns_lookup () {
+	if [ -e ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config ]; then
+		sed -i -e 's:#UseDNS yes:UseDNS no:' ${IMAGE_ROOTFS}${sysconfdir}/ssh/sshd_config
+	fi
+}
+
+#
+# Enable postinst logging if debug-tweaks is enabled
+#
+postinst_enable_logging () {
+	mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/default
+	echo "POSTINST_LOGGING=1" >> ${IMAGE_ROOTFS}${sysconfdir}/default/postinst
+	echo "LOGFILE=${POSTINST_LOGFILE}" >> ${IMAGE_ROOTFS}${sysconfdir}/default/postinst
+}
+
+#
+# Modify systemd default target
+#
+set_systemd_default_target () {
+	if [ -d ${IMAGE_ROOTFS}${sysconfdir}/systemd/system -a -e ${IMAGE_ROOTFS}${systemd_unitdir}/system/${SYSTEMD_DEFAULT_TARGET} ]; then
+		ln -sf ${systemd_unitdir}/system/${SYSTEMD_DEFAULT_TARGET} ${IMAGE_ROOTFS}${sysconfdir}/systemd/system/default.target
+	fi
+}
+
+# If /var/volatile is not empty, we have seen problems where programs such as the
+# journal make assumptions based on the contents of /var/volatile. The journal
+# would then write to /var/volatile before it was mounted, thus hiding the
+# items previously written.
+#
+# This change is to attempt to fix those types of issues in a way that doesn't
+# affect users that may not be using /var/volatile.
+empty_var_volatile () {
+	if [ -e ${IMAGE_ROOTFS}/etc/fstab ]; then
+		match=`awk '$1 !~ "#" && $2 ~ /\/var\/volatile/{print $2}' ${IMAGE_ROOTFS}/etc/fstab 2> /dev/null`
+		if [ -n "$match" ]; then
+			find ${IMAGE_ROOTFS}/var/volatile -mindepth 1 -delete
+		fi
+	fi
+}
+
+# Turn any symbolic /sbin/init link into a file
+remove_init_link () {
+	if [ -h ${IMAGE_ROOTFS}/sbin/init ]; then
+		LINKFILE=${IMAGE_ROOTFS}`readlink ${IMAGE_ROOTFS}/sbin/init`
+		rm ${IMAGE_ROOTFS}/sbin/init
+		cp $LINKFILE ${IMAGE_ROOTFS}/sbin/init
+	fi
+}
+
+make_zimage_symlink_relative () {
+	if [ -L ${IMAGE_ROOTFS}/boot/zImage ]; then
+		(cd ${IMAGE_ROOTFS}/boot/ && for i in `ls zImage-* | sort`; do ln -sf $i zImage; done)
+	fi
+}
+
+insert_feed_uris () {
+	
+	echo "Building feeds for [${DISTRO}].."
+
+	for line in ${FEED_URIS}
+	do
+		# strip leading and trailing spaces/tabs, then split into name and uri
+		line_clean="`echo "$line"|sed 's/^[ \t]*//;s/[ \t]*$//'`"
+		feed_name="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\1/p'`"
+		feed_uri="`echo "$line_clean" | sed -n 's/\(.*\)##\(.*\)/\2/p'`"
+		
+		echo "Added $feed_name feed with URL $feed_uri"
+		
+		# insert new feed-sources
+		echo "src/gz $feed_name $feed_uri" >> ${IMAGE_ROOTFS}/etc/opkg/${feed_name}-feed.conf
+	done
+}
+
+python write_image_manifest () {
+    from oe.rootfs import image_list_installed_packages
+    from oe.utils import format_pkg_list
+
+    deploy_dir = d.getVar('DEPLOY_DIR_IMAGE', True)
+    link_name = d.getVar('IMAGE_LINK_NAME', True)
+    manifest_name = d.getVar('IMAGE_MANIFEST', True)
+
+    if not manifest_name:
+        return
+
+    pkgs = image_list_installed_packages(d)
+    with open(manifest_name, 'w+') as image_manifest:
+        image_manifest.write(format_pkg_list(pkgs, "ver"))
+        image_manifest.write("\n")
+
+    if os.path.exists(manifest_name):
+        manifest_link = deploy_dir + "/" + link_name + ".manifest"
+        if os.path.lexists(manifest_link):
+            if d.getVar('RM_OLD_IMAGE', True) == "1" and \
+                    os.path.exists(os.path.realpath(manifest_link)):
+                os.remove(os.path.realpath(manifest_link))
+            os.remove(manifest_link)
+        os.symlink(os.path.basename(manifest_name), manifest_link)
+}
+
+# Can be use to create /etc/timestamp during image construction to give a reasonably 
+# sane default time setting
+rootfs_update_timestamp () {
+	date -u +%4Y%2m%2d%2H%2M%2S >${IMAGE_ROOTFS}/etc/timestamp
+}
+
+# Prevent X from being started
+rootfs_no_x_startup () {
+	if [ -f ${IMAGE_ROOTFS}/etc/init.d/xserver-nodm ]; then
+		chmod a-x ${IMAGE_ROOTFS}/etc/init.d/xserver-nodm
+	fi
+}
+
+rootfs_trim_schemas () {
+	for schema in ${IMAGE_ROOTFS}/etc/gconf/schemas/*.schemas
+	do
+		# Need this in case no files exist
+		if [ -e $schema ]; then
+			oe-trim-schemas $schema > $schema.new
+			mv $schema.new $schema
+		fi
+	done
+}
+
+rootfs_check_host_user_contaminated () {
+	contaminated="${WORKDIR}/host-user-contaminated.txt"
+	HOST_USER_UID="$(PSEUDO_UNLOAD=1 id -u)"
+	HOST_USER_GID="$(PSEUDO_UNLOAD=1 id -g)"
+
+	find "${IMAGE_ROOTFS}" -wholename "${IMAGE_ROOTFS}/home" -prune \
+	    -user "$HOST_USER_UID" -o -group "$HOST_USER_GID" >"$contaminated"
+
+	if [ -s "$contaminated" ]; then
+		echo "WARNING: Paths in the rootfs are owned by the same user or group as the user running bitbake. See the logfile for the specific paths."
+		cat "$contaminated" | sed "s,^,  ,"
+	fi
+}
+
+# Make any absolute links in a sysroot relative
+rootfs_sysroot_relativelinks () {
+	sysroot-relativelinks.py ${SDK_OUTPUT}/${SDKTARGETSYSROOT}
+}
diff --git a/yocto-poky/meta/classes/rootfs_deb.bbclass b/yocto-poky/meta/classes/rootfs_deb.bbclass
index d51b458..f79fca6 100644
--- a/yocto-poky/meta/classes/rootfs_deb.bbclass
+++ b/yocto-poky/meta/classes/rootfs_deb.bbclass
@@ -8,7 +8,6 @@
 do_rootfs[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot"
 do_populate_sdk[depends] += "dpkg-native:do_populate_sysroot apt-native:do_populate_sysroot bzip2-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_package_write_deb"
-rootfs_deb_do_rootfs[vardepsexclude] += "BUILDNAME"
 do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
 
 do_rootfs[lockfiles] += "${DEPLOY_DIR_DEB}/deb.lock"
diff --git a/yocto-poky/meta/classes/rootfs_ipk.bbclass b/yocto-poky/meta/classes/rootfs_ipk.bbclass
index dd144e4..d5c38fe 100644
--- a/yocto-poky/meta/classes/rootfs_ipk.bbclass
+++ b/yocto-poky/meta/classes/rootfs_ipk.bbclass
@@ -13,7 +13,6 @@
 do_populate_sdk[depends] += "opkg-native:do_populate_sysroot opkg-utils-native:do_populate_sysroot"
 do_rootfs[recrdeptask] += "do_package_write_ipk"
 do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
-rootfs_ipk_do_rootfs[vardepsexclude] += "BUILDNAME"
 
 do_rootfs[lockfiles] += "${WORKDIR}/ipk.lock"
 do_populate_sdk[lockfiles] += "${WORKDIR}/ipk.lock"
@@ -29,7 +28,7 @@
 python () {
 
     if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
-        flags = d.getVarFlag('do_rootfs', 'recrdeptask')
+        flags = d.getVarFlag('do_rootfs', 'recrdeptask', True)
         flags = flags.replace("do_package_write_ipk", "")
         flags = flags.replace("do_deploy", "")
         flags = flags.replace("do_populate_sysroot", "")
diff --git a/yocto-poky/meta/classes/rootfs_rpm.bbclass b/yocto-poky/meta/classes/rootfs_rpm.bbclass
index d85d001..0d2e897 100644
--- a/yocto-poky/meta/classes/rootfs_rpm.bbclass
+++ b/yocto-poky/meta/classes/rootfs_rpm.bbclass
@@ -22,7 +22,6 @@
 do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
 
 do_rootfs[recrdeptask] += "do_package_write_rpm"
-rootfs_rpm_do_rootfs[vardepsexclude] += "BUILDNAME"
 do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
 
 # RPM doesn't work with multiple rootfs generation at once due to collisions in the use of files 
@@ -32,7 +31,7 @@
 
 python () {
     if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
-        flags = d.getVarFlag('do_rootfs', 'recrdeptask')
+        flags = d.getVarFlag('do_rootfs', 'recrdeptask', True)
         flags = flags.replace("do_package_write_rpm", "")
         flags = flags.replace("do_deploy", "")
         flags = flags.replace("do_populate_sysroot", "")
diff --git a/yocto-poky/meta/classes/sanity.bbclass b/yocto-poky/meta/classes/sanity.bbclass
index ae86d26..77813e4 100644
--- a/yocto-poky/meta/classes/sanity.bbclass
+++ b/yocto-poky/meta/classes/sanity.bbclass
@@ -20,26 +20,83 @@
         if re.search(pattern, line)), (None, None))
 
 def sanity_conf_update(fn, lines, version_var_name, new_version):
-    index, line = sanity_conf_find_line(version_var_name, lines)
+    index, line = sanity_conf_find_line(r"^%s" % version_var_name, lines)
     lines[index] = '%s = "%d"\n' % (version_var_name, new_version)
     with open(fn, "w") as f:
         f.write(''.join(lines))
 
-# Functions added to this variable MUST throw an exception (or sys.exit()) unless they
-# successfully changed LCONF_VERSION in bblayers.conf
-BBLAYERS_CONF_UPDATE_FUNCS += "oecore_update_bblayers"
+# Functions added to this variable MUST throw a NotImplementedError exception unless 
+# they successfully changed the config version in the config file. Exceptions
+# are used since exec_func doesn't handle return values.
+BBLAYERS_CONF_UPDATE_FUNCS += " \
+    conf/bblayers.conf:LCONF_VERSION:LAYER_CONF_VERSION:oecore_update_bblayers \
+    conf/local.conf:CONF_VERSION:LOCALCONF_VERSION:oecore_update_localconf \
+    conf/site.conf:SCONF_VERSION:SITE_CONF_VERSION:oecore_update_siteconf \
+"
 
+SANITY_DIFF_TOOL ?= "meld"
+
+SANITY_LOCALCONF_SAMPLE ?= "${COREBASE}/meta*/conf/local.conf.sample"
+python oecore_update_localconf() {
+    # Check we are using a valid local.conf
+    current_conf  = d.getVar('CONF_VERSION', True)
+    conf_version =  d.getVar('LOCALCONF_VERSION', True)
+
+    failmsg = """Your version of local.conf was generated from an older/newer version of 
+local.conf.sample and there have been updates made to this file. Please compare the two 
+files and merge any changes before continuing.
+
+Matching the version numbers will remove this message.
+
+\"${SANITY_DIFF_TOOL} conf/local.conf ${SANITY_LOCALCONF_SAMPLE}\" 
+
+is a good way to visualise the changes."""
+    failmsg = d.expand(failmsg)
+
+    raise NotImplementedError(failmsg)
+}
+
+SANITY_SITECONF_SAMPLE ?= "${COREBASE}/meta*/conf/site.conf.sample"
+python oecore_update_siteconf() {
+    # If we have a site.conf, check it's valid
+    current_sconf = d.getVar('SCONF_VERSION', True)
+    sconf_version = d.getVar('SITE_CONF_VERSION', True)
+
+    failmsg = """Your version of site.conf was generated from an older version of 
+site.conf.sample and there have been updates made to this file. Please compare the two 
+files and merge any changes before continuing.
+
+Matching the version numbers will remove this message.
+
+\"${SANITY_DIFF_TOOL} conf/site.conf ${SANITY_SITECONF_SAMPLE}\" 
+
+is a good way to visualise the changes."""
+    failmsg = d.expand(failmsg)
+
+    raise NotImplementedError(failmsg)
+}
+
+SANITY_BBLAYERCONF_SAMPLE ?= "${COREBASE}/meta*/conf/bblayers.conf.sample"
 python oecore_update_bblayers() {
     # bblayers.conf is out of date, so see if we can resolve that
 
     current_lconf = int(d.getVar('LCONF_VERSION', True))
-    if not current_lconf:
-        sys.exit()
     lconf_version = int(d.getVar('LAYER_CONF_VERSION', True))
+
+    failmsg = """Your version of bblayers.conf has the wrong LCONF_VERSION (has ${LCONF_VERSION}, expecting ${LAYER_CONF_VERSION}).
+Please compare your file against bblayers.conf.sample and merge any changes before continuing.
+"${SANITY_DIFF_TOOL} conf/bblayers.conf ${SANITY_BBLAYERCONF_SAMPLE}" 
+
+is a good way to visualise the changes."""
+    failmsg = d.expand(failmsg)
+
+    if not current_lconf:
+        raise NotImplementedError(failmsg)
+
     lines = []
 
     if current_lconf < 4:
-        sys.exit()
+        raise NotImplementedError(failmsg)
 
     bblayers_fn = bblayers_conf_file(d)
     lines = sanity_conf_read(bblayers_fn)
@@ -58,25 +115,61 @@
                         lines[index] = (bbpath_line[:start + 1] +
                                     topdir_var + ':' + bbpath_line[start + 1:])
             else:
-                sys.exit()
+                raise NotImplementedError(failmsg)
         else:
             index, bbfiles_line = sanity_conf_find_line('BBFILES', lines)
             if bbfiles_line:
                 lines.insert(index, 'BBPATH = "' + topdir_var + '"\n')
             else:
-                sys.exit()
+                raise NotImplementedError(failmsg)
 
         current_lconf += 1
         sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf)
+        bb.note("Your conf/bblayers.conf has been automatically updated.")
         return
 
     elif current_lconf == 5 and lconf_version > 5:
         # Null update, to avoid issues with people switching between poky and other distros
         current_lconf = 6
         sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf)
+        bb.note("Your conf/bblayers.conf has been automatically updated.")
         return
 
-    sys.exit()
+        if not status.reparse:
+            status.addresult()
+
+    elif current_lconf == 6 and lconf_version > 6:
+        # Handle rename of meta-yocto -> meta-poky
+        # This marks the start of separate version numbers but code is needed in OE-Core
+        # for the migration, one last time.
+        layers = d.getVar('BBLAYERS', True).split()
+        layers = [ os.path.basename(path) for path in layers ]
+        if 'meta-yocto' in layers:
+            found = False
+            while True:
+                index, meta_yocto_line = sanity_conf_find_line(r'.*meta-yocto[\'"\s\n]', lines)
+                if meta_yocto_line:
+                    lines[index] = meta_yocto_line.replace('meta-yocto', 'meta-poky')
+                    found = True
+                else:
+                    break
+            if not found:
+                raise NotImplementedError(failmsg)
+            index, meta_yocto_line = sanity_conf_find_line('LCONF_VERSION.*\n', lines)
+            if meta_yocto_line:
+                lines[index] = 'POKY_BBLAYERS_CONF_VERSION = "1"\n'
+            else:
+                raise NotImplementedError(failmsg)
+            with open(bblayers_fn, "w") as f:
+                f.write(''.join(lines))
+            bb.note("Your conf/bblayers.conf has been automatically updated.")
+            return
+        current_lconf += 1
+        sanity_conf_update(bblayers_fn, lines, 'LCONF_VERSION', current_lconf)
+        bb.note("Your conf/bblayers.conf has been automatically updated.")
+        return
+
+    raise NotImplementedError(failmsg)
 }
 
 def raise_sanity_error(msg, d, network_error=False):
@@ -241,7 +334,7 @@
 
 def check_path_length(filepath, pathname, limit):
     if len(filepath) > limit:
-        return "The length of %s is longer than 410, this would cause unexpected errors, please use a shorter path.\n" % pathname
+        return "The length of %s is longer than %s, this would cause unexpected errors, please use a shorter path.\n" % (pathname, limit)
     return ""
 
 def get_filesystem_id(path):
@@ -329,6 +422,7 @@
     # Check that we don't have duplicate entries in PACKAGE_ARCHS & that TUNE_PKGARCH is in PACKAGE_ARCHS
     pkgarchs = sanity_data.getVar('PACKAGE_ARCHS', True)
     tunepkg = sanity_data.getVar('TUNE_PKGARCH', True)
+    defaulttune = sanity_data.getVar('DEFAULTTUNE', True)
     tunefound = False
     seen = {}
     dups = []
@@ -345,7 +439,7 @@
         messages = messages + "Error, the PACKAGE_ARCHS variable contains duplicates. The following archs are listed more than once: %s" % " ".join(dups)
 
     if tunefound == False:
-        messages = messages + "Error, the PACKAGE_ARCHS variable does not contain TUNE_PKGARCH (%s)." % tunepkg
+        messages = messages + "Error, the PACKAGE_ARCHS variable (%s) for DEFAULTTUNE (%s) does not contain TUNE_PKGARCH (%s)." % (pkgarchs, defaulttune, tunepkg)
 
     return messages
 
@@ -437,60 +531,46 @@
     return None
 
 # We use git parameters and functionality only found in 1.7.8 or later
+# The kernel tools assume git >= 1.8.3.1 (verified needed > 1.7.9.5) see #6162 
+# The git fetcher also had workarounds for git < 1.7.9.2 which we've dropped
 def check_git_version(sanity_data):
     from distutils.version import LooseVersion
     status, result = oe.utils.getstatusoutput("git --version 2> /dev/null")
     if status != 0:
         return "Unable to execute git --version, exit code %s\n" % status
     version = result.split()[2]
-    if LooseVersion(version) < LooseVersion("1.7.8"):
-        return "Your version of git is older than 1.7.8 and has bugs which will break builds. Please install a newer version of git.\n"
+    if LooseVersion(version) < LooseVersion("1.8.3.1"):
+        return "Your version of git is older than 1.8.3.1 and has bugs which will break builds. Please install a newer version of git.\n"
     return None
 
 # Check the required perl modules which may not be installed by default
 def check_perl_modules(sanity_data):
     ret = ""
     modules = ( "Text::ParseWords", "Thread::Queue", "Data::Dumper" )
+    errresult = ''
     for m in modules:
-        status, result = oe.utils.getstatusoutput("perl -e 'use %s' 2> /dev/null" % m)
+        status, result = oe.utils.getstatusoutput("perl -e 'use %s'" % m)
         if status != 0:
+            errresult += result
             ret += "%s " % m
     if ret:
-        return "Required perl module(s) not found: %s\n" % ret
+        return "Required perl module(s) not found: %s\n\n%s\n" % (ret, errresult)
     return None
 
 def sanity_check_conffiles(status, d):
-    # Check we are using a valid local.conf
-    current_conf  = d.getVar('CONF_VERSION', True)
-    conf_version =  d.getVar('LOCALCONF_VERSION', True)
-
-    if current_conf != conf_version:
-        status.addresult("Your version of local.conf was generated from an older/newer version of local.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/local.conf ${COREBASE}/meta*/conf/local.conf.sample\" is a good way to visualise the changes.\n")
-
-    # Check bblayers.conf is valid
-    current_lconf = d.getVar('LCONF_VERSION', True)
-    lconf_version = d.getVar('LAYER_CONF_VERSION', True)
-    if current_lconf != lconf_version:
-        funcs = d.getVar('BBLAYERS_CONF_UPDATE_FUNCS', True).split()
-        for func in funcs:
+    funcs = d.getVar('BBLAYERS_CONF_UPDATE_FUNCS', True).split()
+    for func in funcs:
+        conffile, current_version, required_version, func = func.split(":")
+        if check_conf_exists(conffile, d) and d.getVar(current_version, True) is not None and \
+                d.getVar(current_version, True) != d.getVar(required_version, True):
             success = True
             try:
-                bb.build.exec_func(func, d)
-            except Exception:
+                bb.build.exec_func(func, d, pythonexception=True)
+            except NotImplementedError as e:
                 success = False
+                status.addresult(str(e))
             if success:
-                bb.note("Your conf/bblayers.conf has been automatically updated.")
                 status.reparse = True
-        if not status.reparse:
-            status.addresult("Your version of bblayers.conf has the wrong LCONF_VERSION (has %s, expecting %s).\nPlease compare the your file against bblayers.conf.sample and merge any changes before continuing.\n\"meld conf/bblayers.conf ${COREBASE}/meta*/conf/bblayers.conf.sample\" is a good way to visualise the changes.\n" % (current_lconf, lconf_version))
-
-    # If we have a site.conf, check it's valid
-    if check_conf_exists("conf/site.conf", d):
-        current_sconf = d.getVar('SCONF_VERSION', True)
-        sconf_version = d.getVar('SITE_CONF_VERSION', True)
-        if current_sconf != sconf_version:
-            status.addresult("Your version of site.conf was generated from an older version of site.conf.sample and there have been updates made to this file. Please compare the two files and merge any changes before continuing.\nMatching the version numbers will remove this message.\n\"meld conf/site.conf ${COREBASE}/meta*/conf/site.conf.sample\" is a good way to visualise the changes.\n")
-
 
 def sanity_handle_abichanges(status, d):
     #
@@ -571,9 +651,9 @@
     return testmsg
        
 def check_sanity_version_change(status, d):
-    # Sanity checks to be done when SANITY_VERSION changes
+    # Sanity checks to be done when SANITY_VERSION or NATIVELSBSTRING changes
     # In other words, these tests run once in a given build directory and then 
-    # never again until the sanity version changes.
+    # never again until the sanity version or host distrubution id/version changes.
 
     # Check the python install is complete. glib-2.0-natives requries
     # xml.parsers.expat
@@ -749,14 +829,6 @@
 
     check_supported_distro(d)
 
-    # Check if DISPLAY is set if TEST_IMAGE is set
-    if d.getVar('TEST_IMAGE', True) == '1' or d.getVar('DEFAULT_TEST_SUITES', True):
-        testtarget = d.getVar('TEST_TARGET', True)
-        if testtarget == 'qemu' or testtarget == 'QemuTarget':
-            display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True)
-            if not display:
-                status.addresult('testimage needs an X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n')
-
     omask = os.umask(022)
     if omask & 0755:
         status.addresult("Please use a umask which allows a+rx and u+rwx\n")
@@ -788,7 +860,7 @@
     mirror_vars = ['MIRRORS', 'PREMIRRORS', 'SSTATE_MIRRORS']
     protocols = ['http', 'ftp', 'file', 'https', \
                  'git', 'gitsm', 'hg', 'osc', 'p4', 'svn', \
-                 'bzr', 'cvs']
+                 'bzr', 'cvs', 'npm', 'sftp', 'ssh']
     for mirror_var in mirror_vars:
         mirrors = (d.getVar(mirror_var, True) or '').replace('\\n', '\n').split('\n')
         for mirror_entry in mirrors:
@@ -848,18 +920,6 @@
         with open(checkfile, "w") as f:
             f.write(tmpdir)
 
-    # Check vmdk and live can't be built together.
-    if 'vmdk' in d.getVar('IMAGE_FSTYPES', True) and 'live' in d.getVar('IMAGE_FSTYPES', True):
-        status.addresult("Error, IMAGE_FSTYPES vmdk and live can't be built together\n")
-
-    # Check vdi and live can't be built together.
-    if 'vdi' in d.getVar('IMAGE_FSTYPES', True) and 'live' in d.getVar('IMAGE_FSTYPES', True):
-        status.addresult("Error, IMAGE_FSTYPES vdi and live can't be built together\n")
-
-    # Check qcow2 and live can't be built together.
-    if 'qcow2' in d.getVar('IMAGE_FSTYPES', True) and 'live' in d.getVar('IMAGE_FSTYPES', True):
-        status.addresult("Error, IMAGE_FSTYPES qcow2 and live can't be built together\n")
-
     # Check /bin/sh links to dash or bash
     real_sh = os.path.realpath('/bin/sh')
     if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'):
@@ -887,6 +947,7 @@
     last_sanity_version = 0
     last_tmpdir = ""
     last_sstate_dir = ""
+    last_nativelsbstr = ""
     sanityverfile = sanity_data.expand("${TOPDIR}/conf/sanity_info")
     if os.path.exists(sanityverfile):
         with open(sanityverfile, 'r') as f:
@@ -897,12 +958,17 @@
                     last_tmpdir = line.split()[1]
                 if line.startswith('SSTATE_DIR'):
                     last_sstate_dir = line.split()[1]
+                if line.startswith('NATIVELSBSTRING'):
+                    last_nativelsbstr = line.split()[1]
 
     check_sanity_everybuild(status, sanity_data)
     
     sanity_version = int(sanity_data.getVar('SANITY_VERSION', True) or 1)
     network_error = False
-    if last_sanity_version < sanity_version: 
+    # NATIVELSBSTRING var may have been overridden with "universal", so
+    # get actual host distribution id and version
+    nativelsbstr = lsb_distro_identifier(sanity_data)
+    if last_sanity_version < sanity_version or last_nativelsbstr != nativelsbstr: 
         check_sanity_version_change(status, sanity_data)
         status.addresult(check_sanity_sstate_dir_change(sstate_dir, sanity_data))
     else: 
@@ -914,6 +980,7 @@
             f.write("SANITY_VERSION %s\n" % sanity_version) 
             f.write("TMPDIR %s\n" % tmpdir) 
             f.write("SSTATE_DIR %s\n" % sstate_dir) 
+            f.write("NATIVELSBSTRING %s\n" % nativelsbstr) 
 
     sanity_handle_abichanges(status, sanity_data)
 
diff --git a/yocto-poky/meta/classes/scons.bbclass b/yocto-poky/meta/classes/scons.bbclass
index b8de822..1579b05 100644
--- a/yocto-poky/meta/classes/scons.bbclass
+++ b/yocto-poky/meta/classes/scons.bbclass
@@ -2,6 +2,8 @@
 
 EXTRA_OESCONS ?= ""
 
+do_configure[noexec] = "1"
+
 scons_do_compile() {
         ${STAGING_BINDIR_NATIVE}/scons ${PARALLEL_MAKE} PREFIX=${prefix} prefix=${prefix} ${EXTRA_OESCONS} || \
         die "scons build execution failed."
diff --git a/yocto-poky/meta/classes/sign_ipk.bbclass b/yocto-poky/meta/classes/sign_ipk.bbclass
new file mode 100644
index 0000000..a481f6d
--- /dev/null
+++ b/yocto-poky/meta/classes/sign_ipk.bbclass
@@ -0,0 +1,52 @@
+# Class for generating signed IPK packages.
+#
+# Configuration variables used by this class:
+# IPK_GPG_PASSPHRASE_FILE
+#           Path to a file containing the passphrase of the signing key.
+# IPK_GPG_NAME
+#           Name of the key to sign with.
+# IPK_GPG_BACKEND
+#           Optional variable for specifying the backend to use for signing.
+#           Currently the only available option is 'local', i.e. local signing
+#           on the build host.
+# IPK_GPG_SIGNATURE_TYPE
+#           Optional variable for specifying the type of gpg signatures, can be:
+#                     1. Ascii armored (ASC), default if not set
+#                     2. Binary (BIN)
+# GPG_BIN
+#           Optional variable for specifying the gpg binary/wrapper to use for
+#           signing.
+# GPG_PATH
+#           Optional variable for specifying the gnupg "home" directory:
+#
+
+inherit sanity
+
+IPK_SIGN_PACKAGES = '1'
+IPK_GPG_BACKEND ?= 'local'
+IPK_GPG_SIGNATURE_TYPE ?= 'ASC'
+
+python () {
+    # Check configuration
+    for var in ('IPK_GPG_NAME', 'IPK_GPG_PASSPHRASE_FILE'):
+        if not d.getVar(var, True):
+            raise_sanity_error("You need to define %s in the config" % var, d)
+
+    sigtype = d.getVar("IPK_GPG_SIGNATURE_TYPE", True)
+    if sigtype.upper() != "ASC" and sigtype.upper() != "BIN":
+        raise_sanity_error("Bad value for IPK_GPG_SIGNATURE_TYPE (%s), use either ASC or BIN" % sigtype)
+}
+
+def sign_ipk(d, ipk_to_sign):
+    from oe.gpg_sign import get_signer
+
+    bb.debug(1, 'Signing ipk: %s' % ipk_to_sign)
+
+    signer = get_signer(d, d.getVar('IPK_GPG_BACKEND', True))
+    sig_type = d.getVar('IPK_GPG_SIGNATURE_TYPE', True)
+    is_ascii_sig = (sig_type.upper() != "BIN")
+
+    signer.detach_sign(ipk_to_sign,
+                       d.getVar('IPK_GPG_NAME', True),
+                       d.getVar('IPK_GPG_PASSPHRASE_FILE', True),
+                       armor=is_ascii_sig)
diff --git a/yocto-poky/meta/classes/sign_package_feed.bbclass b/yocto-poky/meta/classes/sign_package_feed.bbclass
index 4263810..31a6e9b 100644
--- a/yocto-poky/meta/classes/sign_package_feed.bbclass
+++ b/yocto-poky/meta/classes/sign_package_feed.bbclass
@@ -6,6 +6,16 @@
 #           Path to a file containing the passphrase of the signing key.
 # PACKAGE_FEED_GPG_NAME
 #           Name of the key to sign with. May be key id or key name.
+# PACKAGE_FEED_GPG_BACKEND
+#           Optional variable for specifying the backend to use for signing.
+#           Currently the only available option is 'local', i.e. local signing
+#           on the build host.
+# PACKAGE_FEED_GPG_SIGNATURE_TYPE
+#           Optional variable for specifying the type of gpg signature, can be:
+#               1. Ascii armored (ASC), default if not set
+#               2. Binary (BIN)
+#           This variable is only available for IPK feeds. It is ignored on
+#           other packaging backends.
 # GPG_BIN
 #           Optional variable for specifying the gpg binary/wrapper to use for
 #           signing.
@@ -15,6 +25,8 @@
 inherit sanity
 
 PACKAGE_FEED_SIGN = '1'
+PACKAGE_FEED_GPG_BACKEND ?= 'local'
+PACKAGE_FEED_GPG_SIGNATURE_TYPE ?= 'ASC'
 
 python () {
     # Check sanity of configuration
@@ -22,10 +34,10 @@
         if not d.getVar(var, True):
             raise_sanity_error("You need to define %s in the config" % var, d)
 
-    # Set expected location of the public key
-    d.setVar('PACKAGE_FEED_GPG_PUBKEY',
-             os.path.join(d.getVar('STAGING_ETCDIR_NATIVE'),
-                                   'PACKAGE-FEED-GPG-PUBKEY'))
+    sigtype = d.getVar("PACKAGE_FEED_GPG_SIGNATURE_TYPE", True)
+    if sigtype.upper() != "ASC" and sigtype.upper() != "BIN":
+        raise_sanity_error("Bad value for PACKAGE_FEED_GPG_SIGNATURE_TYPE (%s), use either ASC or BIN" % sigtype)
 }
 
-do_package_index[depends] += "signing-keys:do_export_public_keys"
+do_package_index[depends] += "signing-keys:do_deploy"
+do_rootfs[depends] += "signing-keys:do_populate_sysroot"
diff --git a/yocto-poky/meta/classes/sign_rpm.bbclass b/yocto-poky/meta/classes/sign_rpm.bbclass
index f0c3dc9..a8ea75f 100644
--- a/yocto-poky/meta/classes/sign_rpm.bbclass
+++ b/yocto-poky/meta/classes/sign_rpm.bbclass
@@ -1,10 +1,14 @@
 # Class for generating signed RPM packages.
 #
 # Configuration variables used by this class:
-# RPM_GPG_PASSPHRASE_FILE
-#           Path to a file containing the passphrase of the signing key.
+# RPM_GPG_PASSPHRASE
+#           The passphrase of the signing key.
 # RPM_GPG_NAME
 #           Name of the key to sign with. May be key id or key name.
+# RPM_GPG_BACKEND
+#           Optional variable for specifying the backend to use for signing.
+#           Currently the only available option is 'local', i.e. local signing
+#           on the build host.
 # GPG_BIN
 #           Optional variable for specifying the gpg binary/wrapper to use for
 #           signing.
@@ -14,60 +18,36 @@
 inherit sanity
 
 RPM_SIGN_PACKAGES='1'
+RPM_GPG_BACKEND ?= 'local'
 
 
 python () {
+    if d.getVar('RPM_GPG_PASSPHRASE_FILE', True):
+        raise_sanity_error('RPM_GPG_PASSPHRASE_FILE is replaced by RPM_GPG_PASSPHRASE', d)
     # Check configuration
-    for var in ('RPM_GPG_NAME', 'RPM_GPG_PASSPHRASE_FILE'):
+    for var in ('RPM_GPG_NAME', 'RPM_GPG_PASSPHRASE'):
         if not d.getVar(var, True):
             raise_sanity_error("You need to define %s in the config" % var, d)
 
     # Set the expected location of the public key
-    d.setVar('RPM_GPG_PUBKEY', os.path.join(d.getVar('STAGING_ETCDIR_NATIVE'),
-                                            'RPM-GPG-PUBKEY'))
+    d.setVar('RPM_GPG_PUBKEY', os.path.join(d.getVar('STAGING_DIR_TARGET', False),
+                                            d.getVar('sysconfdir', False),
+                                            'pki',
+                                            'rpm-gpg',
+                                            'RPM-GPG-KEY-${DISTRO_VERSION}'))
 }
 
-
-def rpmsign_wrapper(d, files, passphrase, gpg_name=None):
-    import pexpect
-
-    # Find the correct rpm binary
-    rpm_bin_path = d.getVar('STAGING_BINDIR_NATIVE', True) + '/rpm'
-    cmd = rpm_bin_path + " --addsign --define '_gpg_name %s' " % gpg_name
-    if d.getVar('GPG_BIN', True):
-        cmd += "--define '%%__gpg %s' " % d.getVar('GPG_BIN', True)
-    if d.getVar('GPG_PATH', True):
-        cmd += "--define '_gpg_path %s' " % d.getVar('GPG_PATH', True)
-    cmd += ' '.join(files)
-
-    # Need to use pexpect for feeding the passphrase
-    proc = pexpect.spawn(cmd)
-    try:
-        proc.expect_exact('Enter pass phrase:', timeout=15)
-        proc.sendline(passphrase)
-        proc.expect(pexpect.EOF, timeout=900)
-        proc.close()
-    except pexpect.TIMEOUT as err:
-        bb.warn('rpmsign timeout: %s' % err)
-        proc.terminate()
-    else:
-        if os.WEXITSTATUS(proc.status) or not os.WIFEXITED(proc.status):
-            bb.warn('rpmsign failed: %s' % proc.before.strip())
-    return proc.exitstatus
-
-
 python sign_rpm () {
     import glob
+    from oe.gpg_sign import get_signer
 
-    with open(d.getVar("RPM_GPG_PASSPHRASE_FILE", True)) as fobj:
-        rpm_gpg_passphrase = fobj.readlines()[0].rstrip('\n')
-
-    rpm_gpg_name = (d.getVar("RPM_GPG_NAME", True) or "")
-
+    signer = get_signer(d, d.getVar('RPM_GPG_BACKEND', True))
     rpms = glob.glob(d.getVar('RPM_PKGWRITEDIR', True) + '/*')
 
-    if rpmsign_wrapper(d, rpms, rpm_gpg_passphrase, rpm_gpg_name) != 0:
-        raise bb.build.FuncFailed("RPM signing failed")
+    signer.sign_rpms(rpms,
+                     d.getVar('RPM_GPG_NAME', True),
+                     d.getVar('RPM_GPG_PASSPHRASE', True))
 }
 
-do_package_index[depends] += "signing-keys:do_export_public_keys"
+do_package_index[depends] += "signing-keys:do_deploy"
+do_rootfs[depends] += "signing-keys:do_populate_sysroot"
diff --git a/yocto-poky/meta/classes/siteinfo.bbclass b/yocto-poky/meta/classes/siteinfo.bbclass
index 3b562ee..50141a3 100644
--- a/yocto-poky/meta/classes/siteinfo.bbclass
+++ b/yocto-poky/meta/classes/siteinfo.bbclass
@@ -8,7 +8,7 @@
 #
 # 'what' can be one of
 # * target: Returns the target name ("<arch>-<os>")
-# * endianess: Return "be" for big endian targets, "le" for little endian
+# * endianness: Return "be" for big endian targets, "le" for little endian
 # * bits: Returns the bit size of the target, either "32" or "64"
 # * libc: Returns the name of the c library used by the target
 #
@@ -42,7 +42,7 @@
         "powerpc64": "endian-big bit-64 powerpc-common",
         "ppc": "endian-big bit-32 powerpc-common",
         "ppc64": "endian-big bit-64 powerpc-common",
-        "ppc64le": "endian-little bit-64 powerpc-common",
+        "ppc64le" : "endian-little bit-64 powerpc-common",
         "sh3": "endian-little bit-32 sh-common",
         "sh4": "endian-little bit-32 sh-common",
         "sparc": "endian-big bit-32",
@@ -71,6 +71,8 @@
     targetinfo = {
         "aarch64-linux-gnu": "aarch64-linux",
         "aarch64_be-linux-gnu": "aarch64_be-linux",
+        "aarch64-linux-musl": "aarch64-linux",
+        "aarch64_be-linux-musl": "aarch64_be-linux",
         "arm-linux-gnueabi": "arm-linux",
         "arm-linux-musleabi": "arm-linux",
         "arm-linux-uclibceabi": "arm-linux-uclibc",
@@ -79,8 +81,8 @@
         "armeb-linux-musleabi": "armeb-linux",
         "mips-linux-musl": "mips-linux",
         "mipsel-linux-musl": "mipsel-linux",
-        "mips64-linux-musl": "mips-linux",
-        "mips64el-linux-musl": "mipsel-linux",
+        "mips64-linux-musl": "mips64-linux",
+        "mips64el-linux-musl": "mips64el-linux",
         "mips64-linux-gnun32": "mips-linux bit-32",
         "mips64el-linux-gnun32": "mipsel-linux bit-32",
         "powerpc-linux": "powerpc32-linux",
@@ -92,6 +94,7 @@
         "powerpc64-linux-gnuspe": "powerpc-linux powerpc64-linux",
         "powerpc64-linux-muslspe": "powerpc-linux powerpc64-linux",
         "powerpc64-linux": "powerpc-linux",
+        "powerpc64-linux-musl": "powerpc-linux",
         "x86_64-cygwin": "bit-64",
         "x86_64-darwin": "bit-64",
         "x86_64-darwin9": "bit-64",
diff --git a/yocto-poky/meta/classes/spdx.bbclass b/yocto-poky/meta/classes/spdx.bbclass
index 454c53e..0c92765 100644
--- a/yocto-poky/meta/classes/spdx.bbclass
+++ b/yocto-poky/meta/classes/spdx.bbclass
@@ -232,7 +232,7 @@
     # Package info
     package_info = {}
     if full_spdx:
-        # All mandatory, only one occurance
+        # All mandatory, only one occurrence
         package_info['PackageCopyrightText'] = re.findall('PackageCopyrightText: (.*?</text>)', foss_output, re.S)[0]
         package_info['PackageLicenseDeclared'] = re.findall('PackageLicenseDeclared: (.*)', foss_output)[0]
         package_info['PackageLicenseConcluded'] = re.findall('PackageLicenseConcluded: (.*)', foss_output)[0]
diff --git a/yocto-poky/meta/classes/sstate.bbclass b/yocto-poky/meta/classes/sstate.bbclass
index d09e27a..8c62327 100644
--- a/yocto-poky/meta/classes/sstate.bbclass
+++ b/yocto-poky/meta/classes/sstate.bbclass
@@ -10,7 +10,7 @@
 
 SSTATE_PKGARCH    = "${PACKAGE_ARCH}"
 SSTATE_PKGSPEC    = "sstate:${PN}:${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}:${PV}:${PR}:${SSTATE_PKGARCH}:${SSTATE_VERSION}:"
-SSTATE_SWSPEC     = "sstate:${BPN}::${PV}:${PR}::${SSTATE_VERSION}:"
+SSTATE_SWSPEC     = "sstate:${PN}::${PV}:${PR}::${SSTATE_VERSION}:"
 SSTATE_PKGNAME    = "${SSTATE_EXTRAPATH}${@generate_sstatefn(d.getVar('SSTATE_PKGSPEC', True), d.getVar('BB_TASKHASH', True), d)}"
 SSTATE_PKG        = "${SSTATE_DIR}/${SSTATE_PKGNAME}"
 SSTATE_EXTRAPATH   = ""
@@ -31,7 +31,7 @@
 SSTATE_SCAN_FILES ?= "*.la *-config *_config"
 SSTATE_SCAN_CMD ?= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES", True).split())}" \) -type f'
 
-BB_HASHFILENAME = "${SSTATE_EXTRAPATH} ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}"
+BB_HASHFILENAME = "False ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}"
 
 SSTATE_ARCHS = " \
     ${BUILD_ARCH} \
@@ -51,8 +51,15 @@
 SSTATEPOSTUNPACKFUNCS = "sstate_hardcode_path_unpack"
 SSTATEPOSTINSTFUNCS = ""
 EXTRA_STAGING_FIXMES ?= ""
+SSTATECLEANFUNCS = ""
 
-SIGGEN_LOCKEDSIGS_CHECK_LEVEL ?= 'error'
+# Check whether sstate exists for tasks that support sstate and are in the
+# locked signatures file.
+SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK ?= 'error'
+
+# Check whether the task's computed hash matches the task's hash in the
+# locked signatures file.
+SIGGEN_LOCKEDSIGS_TASKSIG_CHECK ?= "error"
 
 # The GnuPG key ID and passphrase to use to sign sstate archives (or unset to
 # not sign)
@@ -79,6 +86,7 @@
 
     if bb.data.inherits_class('native', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross', d):
         d.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/")
+        d.setVar('BB_HASHFILENAME', "True ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}")
         d.setVar('SSTATE_EXTRAPATHWILDCARD', "*/")
 
     # These classes encode staging paths into their scripts data so can only be
@@ -124,6 +132,7 @@
     if task == "populate_lic":
         d.setVar("SSTATE_PKGSPEC", "${SSTATE_SWSPEC}")
         d.setVar("SSTATE_EXTRAPATH", "")
+        d.setVar('SSTATE_EXTRAPATHWILDCARD', "")
 
     ss = sstate_init(task, d)
     for i in range(len(inputs)):
@@ -271,6 +280,7 @@
 def sstate_installpkg(ss, d):
     import oe.path
     import subprocess
+    from oe.gpg_sign import get_signer
 
     def prepdir(dir):
         # remove dir if it exists, ensure any parent directories do exist
@@ -296,7 +306,8 @@
     d.setVar('SSTATE_PKG', sstatepkg)
 
     if bb.utils.to_boolean(d.getVar("SSTATE_VERIFY_SIG", True), False):
-        if subprocess.call(["gpg", "--verify", sstatepkg + ".sig", sstatepkg]) != 0:
+        signer = get_signer(d, 'local')
+        if not signer.verify(sstatepkg + '.sig'):
             bb.warn("Cannot verify signature on sstate package %s" % sstatepkg)
 
     for f in (d.getVar('SSTATEPREINSTFUNCS', True) or '').split() + ['sstate_unpack_package'] + (d.getVar('SSTATEPOSTUNPACKFUNCS', True) or '').split():
@@ -440,6 +451,10 @@
                 stfile.endswith(rm_nohash):
             oe.path.remove(stfile)
 
+    # Removes the users/groups created by the package
+    for cleanfunc in (d.getVar('SSTATECLEANFUNCS', True) or '').split():
+        bb.build.exec_func(cleanfunc, d)
+
 sstate_clean[vardepsexclude] = "SSTATE_MANFILEPREFIX"
 
 CLEANFUNCS += "sstate_cleanall"
@@ -571,7 +586,8 @@
     d.setVar('SSTATE_BUILDDIR', sstatebuild)
     d.setVar('SSTATE_PKG', sstatepkg)
 
-    for f in (d.getVar('SSTATECREATEFUNCS', True) or '').split() + ['sstate_create_package'] + \
+    for f in (d.getVar('SSTATECREATEFUNCS', True) or '').split() + \
+             ['sstate_create_package', 'sstate_sign_package'] + \
              (d.getVar('SSTATEPOSTCREATEFUNCS', True) or '').split():
         # All hooks should run in SSTATE_BUILDDIR.
         bb.build.exec_func(f, d, (sstatebuild,))
@@ -672,26 +688,35 @@
 	else
 		tar -cz --file=$TFILE --files-from=/dev/null
 	fi
-	chmod 0664 $TFILE 
+	chmod 0664 $TFILE
 	mv -f $TFILE ${SSTATE_PKG}
 
-	if [ -n "${SSTATE_SIG_KEY}" ]; then
-		rm -f ${SSTATE_PKG}.sig
-		echo ${SSTATE_SIG_PASSPHRASE} | gpg --batch --passphrase-fd 0 --detach-sign --local-user ${SSTATE_SIG_KEY} --output ${SSTATE_PKG}.sig ${SSTATE_PKG}
-	fi
-
 	cd ${WORKDIR}
 	rm -rf ${SSTATE_BUILDDIR}
 }
 
+python sstate_sign_package () {
+    from oe.gpg_sign import get_signer
+
+    if d.getVar('SSTATE_SIG_KEY', True):
+        signer = get_signer(d, 'local')
+        sstate_pkg = d.getVar('SSTATE_PKG', True)
+        if os.path.exists(sstate_pkg + '.sig'):
+            os.unlink(sstate_pkg + '.sig')
+        signer.detach_sign(sstate_pkg, d.getVar('SSTATE_SIG_KEY', False), None,
+                           d.getVar('SSTATE_SIG_PASSPHRASE', True), armor=False)
+}
+
 #
 # Shell function to decompress and prepare a package for installation
 # Will be run from within SSTATE_INSTDIR.
 #
 sstate_unpack_package () {
-	tar -xmvzf ${SSTATE_PKG}
+	tar -xvzf ${SSTATE_PKG}
 	# Use "! -w ||" to return true for read only files
 	[ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}
+	[ ! -w ${SSTATE_PKG}.sig ] || [ ! -e ${SSTATE_PKG}.sig ] || touch --no-dereference ${SSTATE_PKG}.sig
+	[ ! -w ${SSTATE_PKG}.siginfo ] || [ ! -e ${SSTATE_PKG}.siginfo ] || touch --no-dereference ${SSTATE_PKG}.siginfo
 }
 
 BB_HASHCHECK_FUNCTION = "sstate_checkhashes"
@@ -708,7 +733,10 @@
         # Magic data from BB_HASHFILENAME
         splithashfn = sq_hashfn[task].split(" ")
         spec = splithashfn[1]
-        extrapath = splithashfn[0]
+        if splithashfn[0] == "True":
+            extrapath = d.getVar("NATIVELSBSTRING", True) + "/"
+        else:
+            extrapath = ""
 
         tname = sq_task[task][3:]
 
@@ -830,7 +858,7 @@
         return x.endswith("-native") or "-cross-" in x or "-crosssdk" in x
 
     def isPostInstDep(x):
-        if x in ["qemu-native", "gdk-pixbuf-native", "qemuwrapper-cross", "depmodwrapper-cross", "systemd-systemctl-native", "gtk-icon-utils-native"]:
+        if x in ["qemu-native", "gdk-pixbuf-native", "qemuwrapper-cross", "depmodwrapper-cross", "systemd-systemctl-native", "gtk-icon-utils-native", "ca-certificates-native"]:
             return True
         return False
 
@@ -838,6 +866,14 @@
     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:
         bb.debug(2, "  considering dependency: %s" % (str(taskdependees[dep])))
         if task == dep:
@@ -856,6 +892,11 @@
         if isNativeCross(taskdependees[dep][0]) and taskdependees[dep][1] in ['do_package_write_deb', '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':
             # base-passwd/shadow-sysroot don't need their dependencies
@@ -879,11 +920,10 @@
         if taskdependees[task][1] == 'do_shared_workdir':
             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' and taskdependees[dep][0].endswith(('shadow-native', 'shadow-sysroot', 'base-passwd', 'pseudo-native')) and taskdependees[dep][1] == 'do_populate_sysroot':
+        if taskdependees[dep][1] == "do_populate_lic":
             continue
 
+
         # Safe fallthrough default
         bb.debug(2, " Default setscene dependency fall through due to dependency: %s" % (str(taskdependees[dep])))
         return False
@@ -933,8 +973,12 @@
                 if stamp not in stamps:
                     toremove.append(l)
                     if stamp not in seen:
-                        bb.note("Stamp %s is not reachable, removing related manifests" % stamp)
+                        bb.debug(2, "Stamp %s is not reachable, removing related manifests" % stamp)
                         seen.append(stamp)
+
+        if toremove:
+            bb.note("There are %d recipes to be removed from sysroot %s, removing..." % (len(toremove), a))
+
         for r in toremove:
             (stamp, manifest, workdir) = r.split()
             for m in glob.glob(manifest + ".*"):
diff --git a/yocto-poky/meta/classes/staging.bbclass b/yocto-poky/meta/classes/staging.bbclass
index 967eddd..bc5dfa8 100644
--- a/yocto-poky/meta/classes/staging.bbclass
+++ b/yocto-poky/meta/classes/staging.bbclass
@@ -127,7 +127,10 @@
                     elf_file = isELF(file)
                     if elf_file & 1:
                         if elf_file & 2:
-                            bb.warn("File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn))
+                            if 'already-stripped' in (d.getVar('INSANE_SKIP_' + pn, True) or "").split():
+                                bb.note("Skipping file %s from %s for already-stripped QA test" % (file[len(dvar):], pn))
+                            else:
+                                bb.warn("File '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn))
                             continue
 
                         if s.st_ino in inodes:
@@ -158,7 +161,7 @@
 addtask populate_sysroot after do_install
 
 SYSROOT_PREPROCESS_FUNCS ?= ""
-SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir/"
+SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir"
 SYSROOT_LOCK = "${STAGING_DIR}/staging.lock"
 
 # We clean out any existing sstate from the sysroot if we rerun configure
diff --git a/yocto-poky/meta/classes/syslinux.bbclass b/yocto-poky/meta/classes/syslinux.bbclass
index 44ef9a9..4fcb0c5 100644
--- a/yocto-poky/meta/classes/syslinux.bbclass
+++ b/yocto-poky/meta/classes/syslinux.bbclass
@@ -20,19 +20,20 @@
 do_bootimg[depends] += "${MLPREFIX}syslinux:do_populate_sysroot \
                         syslinux-native:do_populate_sysroot"
 
-SYSLINUXCFG  = "${S}/syslinux.cfg"
-
-ISOLINUXDIR = "/isolinux"
+ISOLINUXDIR ?= "/isolinux"
 SYSLINUXDIR = "/"
 # The kernel has an internal default console, which you can override with
 # a console=...some_tty...
 SYSLINUX_DEFAULT_CONSOLE ?= ""
 SYSLINUX_SERIAL ?= "0 115200"
 SYSLINUX_SERIAL_TTY ?= "console=ttyS0,115200"
-ISO_BOOTIMG = "isolinux/isolinux.bin"
-ISO_BOOTCAT = "isolinux/boot.cat"
-MKISOFS_OPTIONS = "-no-emul-boot -boot-load-size 4 -boot-info-table"
-APPEND_prepend = " ${SYSLINUX_ROOT} "
+SYSLINUX_PROMPT ?= "0"
+SYSLINUX_TIMEOUT ?= "50"
+AUTO_SYSLINUXMENU ?= "1"
+SYSLINUX_ROOT ?= "${ROOT}"
+SYSLINUX_CFG_VM  ?= "${S}/syslinux_vm.cfg"
+SYSLINUX_CFG_LIVE ?= "${S}/syslinux_live.cfg"
+APPEND ?= ""
 
 # Need UUID utility code.
 inherit fs-uuid
@@ -45,7 +46,7 @@
 	install -d ${DEST}${BOOTDIR}
 
 	# Install the config files
-	install -m 0644 ${SYSLINUXCFG} ${DEST}${BOOTDIR}/${CFGNAME}
+	install -m 0644 ${SYSLINUX_CFG} ${DEST}${BOOTDIR}/${CFGNAME}
 	if [ "${AUTO_SYSLINUXMENU}" = 1 ] ; then
 		install -m 0644 ${STAGING_DATADIR}/syslinux/vesamenu.c32 ${DEST}${BOOTDIR}/vesamenu.c32
 		install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${DEST}${BOOTDIR}/libcom32.c32
@@ -96,9 +97,9 @@
         bb.debug(1, "No labels, nothing to do")
         return
 
-    cfile = d.getVar('SYSLINUXCFG', True)
+    cfile = d.getVar('SYSLINUX_CFG', True)
     if not cfile:
-        raise bb.build.FuncFailed('Unable to read SYSLINUXCFG')
+        raise bb.build.FuncFailed('Unable to read SYSLINUX_CFG')
 
     try:
         cfgfile = file(cfile, 'w')
@@ -120,7 +121,7 @@
     if syslinux_serial:
         cfgfile.write('SERIAL %s\n' % syslinux_serial)
 
-    menu = d.getVar('AUTO_SYSLINUXMENU', True)
+    menu = (d.getVar('AUTO_SYSLINUXMENU', True) == "1")
 
     if menu and syslinux_serial:
         cfgfile.write('DEFAULT Graphics console %s\n' % (labels.split()[0]))
@@ -163,6 +164,10 @@
             btypes = [ [ "Graphics console ", syslinux_default_console  ],
                 [ "Serial console ", syslinux_serial_tty ] ]
 
+        root= d.getVar('SYSLINUX_ROOT', True)
+        if not root:
+            raise bb.build.FuncFailed('SYSLINUX_ROOT not defined')
+
         for btype in btypes:
             cfgfile.write('LABEL %s%s\nKERNEL /vmlinuz\n' % (btype[0], label))
 
@@ -173,18 +178,15 @@
             append = localdata.getVar('APPEND', True)
             initrd = localdata.getVar('INITRD', True)
 
-            if append:
-                cfgfile.write('APPEND ')
+            append = root + " " + append
+            cfgfile.write('APPEND ')
 
-                if initrd:
-                    cfgfile.write('initrd=/initrd ')
+            if initrd:
+                cfgfile.write('initrd=/initrd ')
 
-                cfgfile.write('LABEL=%s '% (label))
-                append = replace_rootfs_uuid(d, append)
-                cfgfile.write('%s %s\n' % (append, btype[1]))
-            else:
-                cfgfile.write('APPEND %s\n' % btype[1])
+            cfgfile.write('LABEL=%s '% (label))
+            append = replace_rootfs_uuid(d, append)
+            cfgfile.write('%s %s\n' % (append, btype[1]))
 
     cfgfile.close()
 }
-build_syslinux_cfg[vardeps] += "APPEND"
diff --git a/yocto-poky/meta/classes/systemd.bbclass b/yocto-poky/meta/classes/systemd.bbclass
index 46e72c7..db7873f 100644
--- a/yocto-poky/meta/classes/systemd.bbclass
+++ b/yocto-poky/meta/classes/systemd.bbclass
@@ -59,6 +59,8 @@
 
 
 python systemd_populate_packages() {
+    import re
+
     if not bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
         return
 
@@ -144,10 +146,22 @@
         for pkg_systemd in systemd_packages.split():
             for service in get_package_var(d, 'SYSTEMD_SERVICE', pkg_systemd).split():
                 path_found = ''
+
+                # Deal with adding, for example, 'ifplugd@eth0.service' from
+                # 'ifplugd@.service'
+                base = None
+                if service.find('@') != -1:
+                    base = re.sub('@[^.]+.', '@.', service)
+
                 for path in searchpaths:
                     if os.path.exists(oe.path.join(d.getVar("D", True), path, service)):
                         path_found = path
                         break
+                    elif base is not None:
+                        if os.path.exists(oe.path.join(d.getVar("D", True), path, base)):
+                            path_found = path
+                            break
+
                 if path_found != '':
                     systemd_add_files_and_parse(pkg_systemd, path_found, service, keys)
                 else:
diff --git a/yocto-poky/meta/classes/terminal.bbclass b/yocto-poky/meta/classes/terminal.bbclass
index e577c6d..9f4c24e 100644
--- a/yocto-poky/meta/classes/terminal.bbclass
+++ b/yocto-poky/meta/classes/terminal.bbclass
@@ -1,8 +1,7 @@
 OE_TERMINAL ?= 'auto'
 OE_TERMINAL[type] = 'choice'
 OE_TERMINAL[choices] = 'auto none \
-                        ${@" ".join(o.name \
-                                    for o in oe.terminal.prioritized())}'
+                        ${@oe_terminal_prioritized()}'
 
 OE_TERMINAL_EXPORTS += 'EXTRA_OEMAKE'
 OE_TERMINAL_EXPORTS[type] = 'list'
@@ -10,12 +9,15 @@
 XAUTHORITY ?= "${HOME}/.Xauthority"
 SHELL ?= "bash"
 
+def oe_terminal_prioritized():
+    import oe.terminal
+    return " ".join(o.name for o in oe.terminal.prioritized())
 
 def emit_terminal_func(command, envdata, d):
     cmd_func = 'do_terminal'
 
     envdata.setVar(cmd_func, 'exec ' + command)
-    envdata.setVarFlag(cmd_func, 'func', 1)
+    envdata.setVarFlag(cmd_func, 'func', '1')
 
     runfmt = d.getVar('BB_RUNFMT', True) or "run.{func}.{pid}"
     runfile = runfmt.format(func=cmd_func, task=cmd_func, taskfunc=cmd_func, pid=os.getpid())
@@ -39,14 +41,14 @@
 
     for v in os.environ:
         envdata.setVar(v, os.environ[v])
-        envdata.setVarFlag(v, 'export', 1)
+        envdata.setVarFlag(v, 'export', '1')
 
     for export in oe.data.typed_value('OE_TERMINAL_EXPORTS', d):
         value = d.getVar(export, True)
         if value is not None:
             os.environ[export] = str(value)
             envdata.setVar(export, str(value))
-            envdata.setVarFlag(export, 'export', 1)
+            envdata.setVarFlag(export, 'export', '1')
         if export == "PSEUDO_DISABLED":
             if "PSEUDO_UNLOAD" in os.environ:
                 del os.environ["PSEUDO_UNLOAD"]
@@ -62,7 +64,7 @@
         if value is not None:
             os.environ[key] = str(value)
             envdata.setVar(key, str(value))
-            envdata.setVarFlag(key, 'export', 1)
+            envdata.setVarFlag(key, 'export', '1')
 
     # A complex PS1 might need more escaping of chars.
     # Lets not export PS1 instead.
diff --git a/yocto-poky/meta/classes/testimage-auto.bbclass b/yocto-poky/meta/classes/testimage-auto.bbclass
index 860599d..e0a22b7 100644
--- a/yocto-poky/meta/classes/testimage-auto.bbclass
+++ b/yocto-poky/meta/classes/testimage-auto.bbclass
@@ -18,6 +18,6 @@
 python do_testimage_auto() {
     testimage_main(d)
 }
-addtask testimage_auto before do_build after do_rootfs
+addtask testimage_auto before do_build after do_image_complete
 do_testimage_auto[depends] += "${TESTIMAGEDEPENDS}"
 do_testimage_auto[lockfiles] += "${TESTIMAGELOCK}"
diff --git a/yocto-poky/meta/classes/testimage.bbclass b/yocto-poky/meta/classes/testimage.bbclass
index b4d4a69..e77bb11 100644
--- a/yocto-poky/meta/classes/testimage.bbclass
+++ b/yocto-poky/meta/classes/testimage.bbclass
@@ -33,17 +33,27 @@
 TEST_EXPORT_ONLY ?= "0"
 
 RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'smart rpm', '', d)}"
+MINTESTSUITE = "ping"
+NETTESTSUITE = "${MINTESTSUITE} ssh df date scp syslog"
+DEVTESTSUITE = "gcc kernelmodule ldd"
 
-DEFAULT_TEST_SUITES = "ping auto"
-DEFAULT_TEST_SUITES_pn-core-image-minimal = "ping"
-DEFAULT_TEST_SUITES_pn-core-image-sato = "ping ssh df connman syslog xorg scp vnc date dmesg parselogs ${RPMTESTSUITE} \
+DEFAULT_TEST_SUITES = "${MINTESTSUITE} auto"
+DEFAULT_TEST_SUITES_pn-core-image-minimal = "${MINTESTSUITE}"
+DEFAULT_TEST_SUITES_pn-core-image-minimal-dev = "${MINTESTSUITE}"
+DEFAULT_TEST_SUITES_pn-core-image-full-cmdline = "${NETTESTSUITE} perl python logrotate"
+DEFAULT_TEST_SUITES_pn-core-image-x11 = "${MINTESTSUITE}"
+DEFAULT_TEST_SUITES_pn-core-image-lsb = "${NETTESTSUITE} pam parselogs ${RPMTESTSUITE}"
+DEFAULT_TEST_SUITES_pn-core-image-sato = "${NETTESTSUITE} connman xorg parselogs ${RPMTESTSUITE} \
     ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python', '', d)}"
-DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "ping ssh df connman syslog xorg scp vnc date perl ldd gcc kernelmodule dmesg python parselogs ${RPMTESTSUITE}"
-DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "ping buildcvs buildiptables buildsudoku connman date df gcc kernelmodule ldd pam parselogs perl python scp ${RPMTESTSUITE} ssh syslog logrotate"
+DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} connman xorg perl python \
+    ${DEVTESTSUITE} parselogs ${RPMTESTSUITE}"
+DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}"
+DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "${NETTESTSUITE} buildcvs buildiptables buildsudoku \
+    connman ${DEVTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}"
 DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto"
 
 # aarch64 has no graphics
-DEFAULT_TEST_SUITES_remove_aarch64 = "xorg vnc"
+DEFAULT_TEST_SUITES_remove_aarch64 = "xorg"
 
 #qemumips is too slow for buildsudoku
 DEFAULT_TEST_SUITES_remove_qemumips = "buildsudoku"
@@ -98,82 +108,6 @@
 do_testimage[depends] += "${TESTIMAGEDEPENDS}"
 do_testimage[lockfiles] += "${TESTIMAGELOCK}"
 
-python do_testsdk() {
-    testsdk_main(d)
-}
-addtask testsdk
-do_testsdk[nostamp] = "1"
-do_testsdk[depends] += "${TESTIMAGEDEPENDS}"
-do_testsdk[lockfiles] += "${TESTIMAGELOCK}"
-
-# get testcase list from specified file
-# if path is a relative path, then relative to build/conf/
-def read_testlist(d, fpath):
-    if not os.path.isabs(fpath):
-        builddir = d.getVar("TOPDIR", True)
-        fpath = os.path.join(builddir, "conf", fpath)
-    if not os.path.exists(fpath):
-        bb.fatal("No such manifest file: ", fpath)
-    tcs = []
-    for line in open(fpath).readlines():
-        line = line.strip()
-        if line and not line.startswith("#"):
-            tcs.append(line)
-    return " ".join(tcs)
-
-def get_tests_list(d, type="runtime"):
-    testsuites = []
-    testslist = []
-    manifests = d.getVar("TEST_SUITES_MANIFEST", True)
-    if manifests is not None:
-        manifests = manifests.split()
-        for manifest in manifests:
-            testsuites.extend(read_testlist(d, manifest).split())
-    else:
-        testsuites = d.getVar("TEST_SUITES", True).split()
-    if type == "sdk":
-        testsuites = (d.getVar("TEST_SUITES_SDK", True) or "auto").split()
-    bbpath = d.getVar("BBPATH", True).split(':')
-
-    # This relies on lib/ under each directory in BBPATH being added to sys.path
-    # (as done by default in base.bbclass)
-    for testname in testsuites:
-        if testname != "auto":
-            if testname.startswith("oeqa."):
-                testslist.append(testname)
-                continue
-            found = False
-            for p in bbpath:
-                if os.path.exists(os.path.join(p, 'lib', 'oeqa', type, testname + '.py')):
-                    testslist.append("oeqa." + type + "." + testname)
-                    found = True
-                    break
-                elif os.path.exists(os.path.join(p, 'lib', 'oeqa', type, testname.split(".")[0] + '.py')):
-                    testslist.append("oeqa." + type + "." + testname)
-                    found = True
-                    break
-            if not found:
-                bb.fatal('Test %s specified in TEST_SUITES could not be found in lib/oeqa/runtime under BBPATH' % testname)
-
-    if "auto" in testsuites:
-        def add_auto_list(path):
-            if not os.path.exists(os.path.join(path, '__init__.py')):
-                bb.fatal('Tests directory %s exists but is missing __init__.py' % path)
-            files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_')])
-            for f in files:
-                module = 'oeqa.' + type + '.' + f[:-3]
-                if module not in testslist:
-                    testslist.append(module)
-
-        for p in bbpath:
-            testpath = os.path.join(p, 'lib', 'oeqa', type)
-            bb.debug(2, 'Searching for tests in %s' % testpath)
-            if os.path.exists(testpath):
-                add_auto_list(testpath)
-
-    return testslist
-
-
 def exportTests(d,tc):
     import json
     import shutil
@@ -188,13 +122,13 @@
     savedata["host_dumper"] = {}
     for key in tc.__dict__:
         # special cases
-        if key != "d" and key != "target" and key != "host_dumper":
+        if key not in ['d', 'target', 'host_dumper', 'suite']:
             savedata[key] = getattr(tc, key)
     savedata["target"]["ip"] = tc.target.ip or d.getVar("TEST_TARGET_IP", True)
     savedata["target"]["server_ip"] = tc.target.server_ip or d.getVar("TEST_SERVER_IP", True)
 
     keys = [ key for key in d.keys() if not key.startswith("_") and not key.startswith("BB") \
-            and not key.startswith("B_pn") and not key.startswith("do_") and not d.getVarFlag(key, "func")]
+            and not key.startswith("B_pn") and not key.startswith("do_") and not d.getVarFlag(key, "func", True)]
     for key in keys:
         try:
             savedata["d"][key] = d.getVar(key, True)
@@ -229,11 +163,23 @@
     bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/runtime/files"))
     bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/utils"))
     # copy test modules, this should cover tests in other layers too
+    bbpath = d.getVar("BBPATH", True).split(':')
     for t in tc.testslist:
+        isfolder = False
         if re.search("\w+\.\w+\.test_\S+", t):
             t = '.'.join(t.split('.')[:3])
         mod = pkgutil.get_loader(t)
-        shutil.copy2(mod.filename, os.path.join(exportpath, "oeqa/runtime"))
+        # More depth than usual?
+        if (t.count('.') > 2):
+            for p in bbpath:
+                foldername = os.path.join(p, 'lib',  os.sep.join(t.split('.')).rsplit(os.sep, 1)[0])
+                if os.path.isdir(foldername):
+                    isfolder = True
+                    target_folder = os.path.join(exportpath, "oeqa", "runtime", os.path.basename(foldername))
+                    if not os.path.exists(target_folder):
+                        shutil.copytree(foldername, target_folder)
+        if not isfolder:
+            shutil.copy2(mod.filename, os.path.join(exportpath, "oeqa/runtime"))
     # copy __init__.py files
     oeqadir = pkgutil.get_loader("oeqa").filename
     shutil.copy2(os.path.join(oeqadir, "__init__.py"), os.path.join(exportpath, "oeqa"))
@@ -253,14 +199,13 @@
 
     bb.plain("Exported tests to: %s" % exportpath)
 
-
 def testimage_main(d):
     import unittest
     import os
     import oeqa.runtime
     import time
     import signal
-    from oeqa.oetest import loadTests, runTests
+    from oeqa.oetest import ImageTestContext
     from oeqa.targetcontrol import get_target_controller
     from oeqa.utils.dump import get_host_dumper
 
@@ -271,65 +216,24 @@
         bb.utils.remove(d.getVar("TEST_EXPORT_DIR", True), recurse=True)
         bb.utils.mkdirhier(d.getVar("TEST_EXPORT_DIR", True))
 
-    # tests in TEST_SUITES become required tests
-    # they won't be skipped even if they aren't suitable for a image (like xorg for minimal)
-    # testslist is what we'll actually pass to the unittest loader
-    testslist = get_tests_list(d)
-    testsrequired = [t for t in d.getVar("TEST_SUITES", True).split() if t != "auto"]
-
-    tagexp = d.getVar("TEST_SUITES_TAGS", True)
-
     # we need the host dumper in test context
     host_dumper = get_host_dumper(d)
 
     # the robot dance
     target = get_target_controller(d)
 
-    class TestContext(object):
-        def __init__(self):
-            self.d = d
-            self.testslist = testslist
-            self.tagexp = tagexp
-            self.testsrequired = testsrequired
-            self.filesdir = os.path.join(os.path.dirname(os.path.abspath(oeqa.runtime.__file__)),"files")
-            self.target = target
-            self.host_dumper = host_dumper
-            self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
-            self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
-            manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True), d.getVar("IMAGE_LINK_NAME", True) + ".manifest")
-            nomanifest = d.getVar("IMAGE_NO_MANIFEST", True)
-
-            self.sigterm = False
-            self.origsigtermhandler = signal.getsignal(signal.SIGTERM)
-            signal.signal(signal.SIGTERM, self.sigterm_exception)
-
-            if nomanifest is None or nomanifest != "1":
-                try:
-                    with open(manifest) as f:
-                        self.pkgmanifest = f.read()
-                except IOError as e:
-                    bb.fatal("No package manifest file found. Did you build the image?\n%s" % e)
-            else:
-                self.pkgmanifest = ""
-
-        def sigterm_exception(self, signum, stackframe):
-            bb.warn("TestImage received SIGTERM, shutting down...")
-            self.sigterm = True
-            self.target.stop()
-
     # test context
-    tc = TestContext()
+    tc = ImageTestContext(d, target, host_dumper)
 
     # this is a dummy load of tests
     # we are doing that to find compile errors in the tests themselves
     # before booting the image
     try:
-        loadTests(tc)
+        tc.loadTests()
     except Exception as e:
         import traceback
         bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
 
-
     if export:
         signal.signal(signal.SIGTERM, tc.origsigtermhandler)
         tc.origsigtermhandler = None
@@ -339,7 +243,7 @@
         try:
             target.start()
             starttime = time.time()
-            result = runTests(tc)
+            result = tc.runTests()
             stoptime = time.time()
             if result.wasSuccessful():
                 bb.plain("%s - Ran %d test%s in %.3fs" % (pn, result.testsRun, result.testsRun != 1 and "s" or "", stoptime - starttime))
@@ -356,93 +260,4 @@
 
 testimage_main[vardepsexclude] =+ "BB_ORIGENV"
 
-
-def testsdk_main(d):
-    import unittest
-    import os
-    import glob
-    import oeqa.runtime
-    import oeqa.sdk
-    import time
-    import subprocess
-    from oeqa.oetest import loadTests, runTests
-
-    pn = d.getVar("PN", True)
-    bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
-
-    # tests in TEST_SUITES become required tests
-    # they won't be skipped even if they aren't suitable.
-    # testslist is what we'll actually pass to the unittest loader
-    testslist = get_tests_list(d, "sdk")
-    testsrequired = [t for t in (d.getVar("TEST_SUITES_SDK", True) or "auto").split() if t != "auto"]
-
-    tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh")
-    if not os.path.exists(tcname):
-        bb.fatal("The toolchain is not built. Build it before running the tests: 'bitbake <image> -c populate_sdk' .")
-
-    class TestContext(object):
-        def __init__(self):
-            self.d = d
-            self.testslist = testslist
-            self.testsrequired = testsrequired
-            self.filesdir = os.path.join(os.path.dirname(os.path.abspath(oeqa.runtime.__file__)),"files")
-            self.sdktestdir = sdktestdir
-            self.sdkenv = sdkenv
-            self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
-            self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
-            manifest = d.getVar("SDK_TARGET_MANIFEST", True)
-            try:
-                with open(manifest) as f:
-                    self.pkgmanifest = f.read()
-            except IOError as e:
-                bb.fatal("No package manifest file found. Did you build the sdk image?\n%s" % e)
-            hostmanifest = d.getVar("SDK_HOST_MANIFEST", True)
-            try:
-                with open(hostmanifest) as f:
-                    self.hostpkgmanifest = f.read()
-            except IOError as e:
-                bb.fatal("No host package manifest file found. Did you build the sdk image?\n%s" % e)
-
-    sdktestdir = d.expand("${WORKDIR}/testimage-sdk/")
-    bb.utils.remove(sdktestdir, True)
-    bb.utils.mkdirhier(sdktestdir)
-    try:
-        subprocess.check_output("cd %s; %s <<EOF\n./tc\nY\nEOF" % (sdktestdir, tcname), shell=True)
-    except subprocess.CalledProcessError as e:
-        bb.fatal("Couldn't install the SDK:\n%s" % e.output)
-
-    try:
-        targets = glob.glob(d.expand(sdktestdir + "/tc/environment-setup-*"))
-        bb.warn(str(targets))
-        for sdkenv in targets:
-            bb.plain("Testing %s" % sdkenv)
-            # test context
-            tc = TestContext()
-
-            # this is a dummy load of tests
-            # we are doing that to find compile errors in the tests themselves
-            # before booting the image
-            try:
-                loadTests(tc, "sdk")
-            except Exception as e:
-                import traceback
-                bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
-
-    
-            starttime = time.time()
-            result = runTests(tc, "sdk")
-            stoptime = time.time()
-            if result.wasSuccessful():
-                bb.plain("%s SDK(%s):%s - Ran %d test%s in %.3fs" % (pn, os.path.basename(tcname), os.path.basename(sdkenv),result.testsRun, result.testsRun != 1 and "s" or "", stoptime - starttime))
-                msg = "%s - OK - All required tests passed" % pn
-                skipped = len(result.skipped)
-                if skipped:
-                    msg += " (skipped=%d)" % skipped
-                bb.plain(msg)
-            else:
-                raise bb.build.FuncFailed("%s - FAILED - check the task log and the commands log" % pn )
-    finally:
-        bb.utils.remove(sdktestdir, True)
-
-testsdk_main[vardepsexclude] =+ "BB_ORIGENV"
-
+inherit testsdk
diff --git a/yocto-poky/meta/classes/testsdk.bbclass b/yocto-poky/meta/classes/testsdk.bbclass
new file mode 100644
index 0000000..f4dc2c3
--- /dev/null
+++ b/yocto-poky/meta/classes/testsdk.bbclass
@@ -0,0 +1,142 @@
+# Copyright (C) 2013 - 2016 Intel Corporation
+#
+# Released under the MIT license (see COPYING.MIT)
+
+# testsdk.bbclass enables testing for SDK and Extensible SDK
+#
+# For run SDK tests you need to do,
+# - bitbake core-image-sato -c populate_sdk
+# - bitbake core-image-sato -c testsdk
+#
+# For run eSDK tests you need to do,
+# - bitbake core-image-sato -c populate_sdk_ext
+# - bitbake core-image-sato -c testsdkext
+
+TEST_LOG_DIR ?= "${WORKDIR}/testimage"
+TESTSDKLOCK = "${TMPDIR}/testsdk.lock"
+
+def run_test_context(CTestContext, d, testdir, tcname, pn, *args):
+    import glob
+    import time
+
+    targets = glob.glob(d.expand(testdir + "/tc/environment-setup-*"))
+    for sdkenv in targets:
+        bb.plain("Testing %s" % sdkenv)
+        tc = CTestContext(d, testdir, sdkenv, tcname, args)
+
+        # this is a dummy load of tests
+        # we are doing that to find compile errors in the tests themselves
+        # before booting the image
+        try:
+            tc.loadTests()
+        except Exception as e:
+            import traceback
+            bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
+
+        starttime = time.time()
+        result = tc.runTests()
+        stoptime = time.time()
+        if result.wasSuccessful():
+            bb.plain("%s SDK(%s):%s - Ran %d test%s in %.3fs" % (pn, os.path.basename(tcname), os.path.basename(sdkenv),result.testsRun, result.testsRun != 1 and "s" or "", stoptime - starttime))
+            msg = "%s - OK - All required tests passed" % pn
+            skipped = len(result.skipped)
+            if skipped:
+                msg += " (skipped=%d)" % skipped
+            bb.plain(msg)
+        else:
+            raise bb.build.FuncFailed("%s - FAILED - check the task log and the commands log" % pn )
+
+def testsdk_main(d):
+    import os
+    import oeqa.sdk
+    import subprocess
+    from oeqa.oetest import SDKTestContext
+
+    pn = d.getVar("PN", True)
+    bb.utils.mkdirhier(d.getVar("TEST_LOG_DIR", True))
+
+    tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh")
+    if not os.path.exists(tcname):
+        bb.fatal("The toolchain is not built. Build it before running the tests: 'bitbake <image> -c populate_sdk' .")
+
+    sdktestdir = d.expand("${WORKDIR}/testimage-sdk/")
+    bb.utils.remove(sdktestdir, True)
+    bb.utils.mkdirhier(sdktestdir)
+    try:
+        subprocess.check_output("cd %s; %s <<EOF\n./tc\nY\nEOF" % (sdktestdir, tcname), shell=True)
+    except subprocess.CalledProcessError as e:
+        bb.fatal("Couldn't install the SDK:\n%s" % e.output)
+
+    try:
+        run_test_context(SDKTestContext, d, sdktestdir, tcname, pn)
+    finally:
+        bb.utils.remove(sdktestdir, True)
+
+testsdk_main[vardepsexclude] =+ "BB_ORIGENV"
+
+python do_testsdk() {
+    testsdk_main(d)
+}
+addtask testsdk
+do_testsdk[nostamp] = "1"
+do_testsdk[lockfiles] += "${TESTSDKLOCK}"
+
+TEST_LOG_SDKEXT_DIR ?= "${WORKDIR}/testsdkext"
+TESTSDKEXTLOCK = "${TMPDIR}/testsdkext.lock"
+
+def testsdkext_main(d):
+    import os
+    import oeqa.sdkext
+    import subprocess
+    from bb.utils import export_proxies
+    from oeqa.oetest import SDKTestContext, SDKExtTestContext
+    from oeqa.utils import avoid_paths_in_environ
+
+
+    # extensible sdk use network
+    export_proxies(d)
+
+    # extensible sdk can be contaminated if native programs are
+    # in PATH, i.e. use perl-native instead of eSDK one.
+    paths_to_avoid = [d.getVar('STAGING_DIR', True),
+                      d.getVar('BASE_WORKDIR', True)]
+    os.environ['PATH'] = avoid_paths_in_environ(paths_to_avoid)
+
+    pn = d.getVar("PN", True)
+    bb.utils.mkdirhier(d.getVar("TEST_LOG_SDKEXT_DIR", True))
+
+    tcname = d.expand("${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.sh")
+    if not os.path.exists(tcname):
+        bb.fatal("The toolchain ext is not built. Build it before running the" \
+                 " tests: 'bitbake <image> -c populate_sdk_ext' .")
+
+    testdir = d.expand("${WORKDIR}/testsdkext/")
+    bb.utils.remove(testdir, True)
+    bb.utils.mkdirhier(testdir)
+    try:
+        subprocess.check_output("%s -y -d %s/tc" % (tcname, testdir), shell=True)
+    except subprocess.CalledProcessError as e:
+        bb.fatal("Couldn't install the SDK EXT:\n%s" % e.output)
+
+    try:
+        bb.plain("Running SDK Compatibility tests ...")
+        run_test_context(SDKExtTestContext, d, testdir, tcname, pn, True)
+    finally:
+        pass
+
+    try:
+        bb.plain("Running Extensible SDK tests ...")
+        run_test_context(SDKExtTestContext, d, testdir, tcname, pn)
+    finally:
+        pass
+
+    bb.utils.remove(testdir, True)
+
+testsdkext_main[vardepsexclude] =+ "BB_ORIGENV"
+
+python do_testsdkext() {
+    testsdkext_main(d)
+}
+addtask testsdkext
+do_testsdkext[nostamp] = "1"
+do_testsdkext[lockfiles] += "${TESTSDKEXTLOCK}"
diff --git a/yocto-poky/meta/classes/tinderclient.bbclass b/yocto-poky/meta/classes/tinderclient.bbclass
index 6984efd..2bc75fc 100644
--- a/yocto-poky/meta/classes/tinderclient.bbclass
+++ b/yocto-poky/meta/classes/tinderclient.bbclass
@@ -142,7 +142,7 @@
 
     selector = url + "/xml/build_status.pl"
 
-    # now post it - in chunks of 10.000 charachters
+    # now post it - in chunks of 10.000 characters
     new_log = _log
     while len(new_log) > 0:
         content_type, body = tinder_format_http_post(d,status,new_log[0:18000])
diff --git a/yocto-poky/meta/classes/toaster.bbclass b/yocto-poky/meta/classes/toaster.bbclass
index d63cff5..1a70f14 100644
--- a/yocto-poky/meta/classes/toaster.bbclass
+++ b/yocto-poky/meta/classes/toaster.bbclass
@@ -112,27 +112,25 @@
                 pass    # ignore lines without valid key: value pairs
     return pkgdata
 
-
 python toaster_package_dumpdata() {
     """
-    Dumps the data created by emit_pkgdata
+    Dumps the data about the packages created by a recipe
     """
-    # replicate variables from the package.bbclass
 
-    packages = d.getVar('PACKAGES', True)
-    pkgdest = d.getVar('PKGDEST', True)
+    # No need to try and dumpdata if the recipe isn't generating packages
+    if not d.getVar('PACKAGES', True):
+        return
 
     pkgdatadir = d.getVar('PKGDESTWORK', True)
-
-    # scan and send data for each package
-
     lpkgdata = {}
-    for pkg in packages.split():
+    datadir = os.path.join(pkgdatadir, 'runtime')
 
-        lpkgdata = _toaster_load_pkgdatafile(pkgdatadir + "/runtime/", pkg)
-
-        # Fire an event containing the pkg data
-        bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d)
+    # scan and send data for each generated package
+    for datafile in os.listdir(datadir):
+        if not datafile.endswith('.packaged'):
+            lpkgdata = _toaster_load_pkgdatafile(datadir, datafile)
+            # Fire an event containing the pkg data
+            bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d)
 }
 
 # 2. Dump output image files information
@@ -143,35 +141,55 @@
     image_types.bbclass will spell out IMAGE_CMD_xxx variables that actually
     have hardcoded ways to create image file names in them.
     So we look for files starting with the set name.
+
+    We also look for other files in the images/ directory which don't
+    match IMAGE_NAME, such as the kernel bzImage, modules tarball etc.
     """
 
-    deploy_dir_image = d.getVar('DEPLOY_DIR_IMAGE', True);
+    dir_to_walk = d.getVar('DEPLOY_DIR_IMAGE', True);
     image_name = d.getVar('IMAGE_NAME', True);
-
     image_info_data = {}
     artifact_info_data = {}
 
-    # collect all artifacts
-    for dirpath, dirnames, filenames in os.walk(deploy_dir_image):
-        for fn in filenames:
+    # collect all images and artifacts in the images directory
+    for dirpath, dirnames, filenames in os.walk(dir_to_walk):
+        for filename in filenames:
+            full_path = os.path.join(dirpath, filename)
             try:
-                if fn.startswith(image_name):
-                    image_output = os.path.join(dirpath, fn)
-                    image_info_data[image_output] = os.stat(image_output).st_size
+                if filename.startswith(image_name):
+                    # image
+                    image_info_data[full_path] = os.stat(full_path).st_size
                 else:
-                    import stat
-                    artifact_path = os.path.join(dirpath, fn)
-                    filestat = os.stat(artifact_path)
-                    if not os.path.islink(artifact_path):
-                        artifact_info_data[artifact_path] = filestat.st_size
+                    # other non-image artifact
+                    if not os.path.islink(full_path):
+                        artifact_info_data[full_path] = os.stat(full_path).st_size
             except OSError as e:
                 bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d)
 
-    bb.event.fire(bb.event.MetadataEvent("ImageFileSize",image_info_data), d)
-    bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize",artifact_info_data), d)
+    bb.event.fire(bb.event.MetadataEvent("ImageFileSize", image_info_data), d)
+    bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize", artifact_info_data), d)
 }
 
+python toaster_artifact_dumpdata() {
+    """
+    Dump data about artifacts in the SDK_DEPLOY directory
+    """
 
+    dir_to_walk = d.getVar("SDK_DEPLOY", True)
+    artifact_info_data = {}
+
+    # collect all artifacts in the sdk directory
+    for dirpath, dirnames, filenames in os.walk(dir_to_walk):
+        for filename in filenames:
+            full_path = os.path.join(dirpath, filename)
+            try:
+                if not os.path.islink(full_path):
+                    artifact_info_data[full_path] = os.stat(full_path).st_size
+            except OSError as e:
+                bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d)
+
+    bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize", artifact_info_data), d)
+}
 
 # collect list of buildstats files based on fired events; when the build completes, collect all stats and fire an event with collected data
 
@@ -182,29 +200,37 @@
     import bb.utils
     import os
 
+    toaster_statlist_file = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist")
+
     if not e.data.getVar('BUILDSTATS_BASE', True):
         return  # if we don't have buildstats, we cannot collect stats
 
+    def stat_to_float(value):
+        return float(value.strip('% \n\r'))
+
     def _append_read_list(v):
         lock = bb.utils.lockfile(e.data.expand("${TOPDIR}/toaster.lock"), False, True)
 
-        with open(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"), "a") as fout:
-            bn = get_bn(e)
-            bsdir = os.path.join(e.data.getVar('BUILDSTATS_BASE', True), bn)
-            taskdir = os.path.join(bsdir, e.data.expand("${PF}"))
+        with open(toaster_statlist_file, "a") as fout:
+            taskdir = e.data.expand("${BUILDSTATS_BASE}/${BUILDNAME}/${PF}")
             fout.write("%s::%s::%s::%s\n" % (e.taskfile, e.taskname, os.path.join(taskdir, e.task), e.data.expand("${PN}")))
 
         bb.utils.unlockfile(lock)
 
     def _read_stats(filename):
-        cpu_usage = 0
-        disk_io = 0
-        startio = '0'
-        endio = '0'
-        started = '0'
-        ended = '0'
-        pn = ''
+        # seconds
+        cpu_time_user = 0
+        cpu_time_system = 0
+
+        # bytes
+        disk_io_read = 0
+        disk_io_write = 0
+
+        started = 0
+        ended = 0
+
         taskname = ''
+
         statinfo = {}
 
         with open(filename, 'r') as task_bs:
@@ -212,43 +238,49 @@
                 k,v = line.strip().split(": ", 1)
                 statinfo[k] = v
 
-        if "CPU usage" in statinfo:
-            cpu_usage = str(statinfo["CPU usage"]).strip('% \n\r')
-
-        if "EndTimeIO" in statinfo:
-            endio = str(statinfo["EndTimeIO"]).strip('% \n\r')
-
-        if "StartTimeIO" in statinfo:
-            startio = str(statinfo["StartTimeIO"]).strip('% \n\r')
-
         if "Started" in statinfo:
-            started = str(statinfo["Started"]).strip('% \n\r')
+            started = stat_to_float(statinfo["Started"])
 
         if "Ended" in statinfo:
-            ended = str(statinfo["Ended"]).strip('% \n\r')
+            ended = stat_to_float(statinfo["Ended"])
 
-        disk_io = int(endio) - int(startio)
+        if "Child rusage ru_utime" in statinfo:
+            cpu_time_user = cpu_time_user + stat_to_float(statinfo["Child rusage ru_utime"])
 
-        elapsed_time = float(ended) - float(started)
+        if "Child rusage ru_stime" in statinfo:
+            cpu_time_system = cpu_time_system + stat_to_float(statinfo["Child rusage ru_stime"])
 
-        cpu_usage = float(cpu_usage)
+        if "IO write_bytes" in statinfo:
+            write_bytes = int(statinfo["IO write_bytes"].strip('% \n\r'))
+            disk_io_write = disk_io_write + write_bytes
 
-        return {'cpu_usage': cpu_usage, 'disk_io': disk_io, 'elapsed_time': elapsed_time}
+        if "IO read_bytes" in statinfo:
+            read_bytes = int(statinfo["IO read_bytes"].strip('% \n\r'))
+            disk_io_read = disk_io_read + read_bytes
 
+        return {
+            'stat_file': filename,
+            'cpu_time_user': cpu_time_user,
+            'cpu_time_system': cpu_time_system,
+            'disk_io_read': disk_io_read,
+            'disk_io_write': disk_io_write,
+            'started': started,
+            'ended': ended
+        }
 
     if isinstance(e, (bb.build.TaskSucceeded, bb.build.TaskFailed)):
         _append_read_list(e)
         pass
 
-
-    if isinstance(e, bb.event.BuildCompleted) and os.path.exists(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist")):
+    if isinstance(e, bb.event.BuildCompleted) and os.path.exists(toaster_statlist_file):
         events = []
-        with open(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"), "r") as fin:
+        with open(toaster_statlist_file, "r") as fin:
             for line in fin:
                 (taskfile, taskname, filename, recipename) = line.strip().split("::")
-                events.append((taskfile, taskname, _read_stats(filename), recipename))
+                stats = _read_stats(filename)
+                events.append((taskfile, taskname, stats, recipename))
         bb.event.fire(bb.event.MetadataEvent("BuildStatsList", events), e.data)
-        os.unlink(os.path.join(e.data.getVar('BUILDSTATS_BASE', True), "toasterstatlist"))
+        os.unlink(toaster_statlist_file)
 }
 
 # dump relevant build history data as an event when the build is completed
@@ -265,6 +297,7 @@
     allpkgs = {}
     files = {}
     for target in e._pkgs:
+        target = target.split(':')[0] # strip ':<task>' suffix from the target
         installed_img_path = e.data.expand(os.path.join(BUILDHISTORY_DIR_IMAGE_BASE, target))
         if os.path.exists(installed_img_path):
             images[target] = {}
@@ -347,9 +380,18 @@
 
 addhandler toaster_buildhistory_dump
 toaster_buildhistory_dump[eventmask] = "bb.event.BuildCompleted"
+
+do_packagedata_setscene[postfuncs] += "toaster_package_dumpdata "
+do_packagedata_setscene[vardepsexclude] += "toaster_package_dumpdata "
+
 do_package[postfuncs] += "toaster_package_dumpdata "
 do_package[vardepsexclude] += "toaster_package_dumpdata "
 
-do_rootfs[postfuncs] += "toaster_image_dumpdata "
+do_image_complete[postfuncs] += "toaster_image_dumpdata "
+do_image_complete[vardepsexclude] += "toaster_image_dumpdata "
+
 do_rootfs[postfuncs] += "toaster_licensemanifest_dump "
-do_rootfs[vardepsexclude] += "toaster_image_dumpdata toaster_licensemanifest_dump"
+do_rootfs[vardepsexclude] += "toaster_licensemanifest_dump "
+
+do_populate_sdk[postfuncs] += "toaster_artifact_dumpdata "
+do_populate_sdk[vardepsexclude] += "toaster_artifact_dumpdata "
diff --git a/yocto-poky/meta/classes/toolchain-scripts.bbclass b/yocto-poky/meta/classes/toolchain-scripts.bbclass
index ab4feb0..2e2c93a 100644
--- a/yocto-poky/meta/classes/toolchain-scripts.bbclass
+++ b/yocto-poky/meta/classes/toolchain-scripts.bbclass
@@ -9,6 +9,9 @@
 # This function creates an environment-setup-script for use in a deployable SDK
 toolchain_create_sdk_env_script () {
 	# Create environment setup script
+	base_sbindir=${10:-${base_sbindir_nativesdk}}
+	base_bindir=${9:-${base_bindir_nativesdk}}
+	sbindir=${8:-${sbindir_nativesdk}}
 	sdkpathnative=${7:-${SDKPATHNATIVE}}
 	prefix=${6:-${prefix_nativesdk}}
 	bindir=${5:-${bindir_nativesdk}}
@@ -23,7 +26,7 @@
 	for i in ${CANADIANEXTRAOS}; do
 		EXTRAPATH="$EXTRAPATH:$sdkpathnative$bindir/${TARGET_ARCH}${TARGET_VENDOR}-$i"
 	done
-	echo "export PATH=$sdkpathnative$bindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH' >> $script
+	echo "export PATH=$sdkpathnative$bindir:$sdkpathnative$sbindir:$sdkpathnative$base_bindir:$sdkpathnative$base_sbindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$PATH' >> $script
 	echo "export CCACHE_PATH=$sdkpathnative$bindir:$sdkpathnative$bindir/../${HOST_SYS}/bin:$sdkpathnative$bindir/${TARGET_SYS}"$EXTRAPATH':$CCACHE_PATH' >> $script
 	echo 'export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT' >> $script
 	echo 'export PKG_CONFIG_PATH=$SDKTARGETSYSROOT'"$libdir"'/pkgconfig' >> $script
@@ -31,7 +34,6 @@
 	echo "export OECORE_NATIVE_SYSROOT=\"$sdkpathnative\"" >> $script
 	echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script
 	echo "export OECORE_ACLOCAL_OPTS=\"-I $sdkpathnative/usr/share/aclocal\"" >> $script
-	echo "export PYTHONHOME=$sdkpathnative$prefix" >> $script
 	echo 'unset command_not_found_handle' >> $script
 
 	toolchain_shared_env_script
diff --git a/yocto-poky/meta/classes/typecheck.bbclass b/yocto-poky/meta/classes/typecheck.bbclass
index 72da932..6bff7c7 100644
--- a/yocto-poky/meta/classes/typecheck.bbclass
+++ b/yocto-poky/meta/classes/typecheck.bbclass
@@ -5,7 +5,7 @@
 python check_types() {
     import oe.types
     for key in e.data.keys():
-        if e.data.getVarFlag(key, "type"):
+        if e.data.getVarFlag(key, "type", True):
             oe.data.typed_value(key, e.data)
 }
 addhandler check_types
diff --git a/yocto-poky/meta/classes/uninative.bbclass b/yocto-poky/meta/classes/uninative.bbclass
index 0cd27db..89cec07 100644
--- a/yocto-poky/meta/classes/uninative.bbclass
+++ b/yocto-poky/meta/classes/uninative.bbclass
@@ -1,20 +1,107 @@
-NATIVELSBSTRING = "universal"
+UNINATIVE_LOADER ?= "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux/lib/${@bb.utils.contains('BUILD_ARCH', 'x86_64', 'ld-linux-x86-64.so.2', 'ld-linux.so.2', d)}"
 
-UNINATIVE_LOADER ?= "${@bb.utils.contains('BUILD_ARCH', 'x86_64', '${STAGING_DIR_NATIVE}/lib/ld-linux-x86-64.so.2', '${STAGING_DIR_NATIVE}/lib/ld-linux.so.2', d)}"
+UNINATIVE_URL ?= "unset"
+UNINATIVE_TARBALL ?= "${BUILD_ARCH}-nativesdk-libc.tar.bz2"
+# Example checksums
+#UNINATIVE_CHECKSUM[i586] = "dead"
+#UNINATIVE_CHECKSUM[x86_64] = "dead"
+UNINATIVE_DLDIR ?= "${DL_DIR}/uninative/"
 
-addhandler uninative_eventhandler
-uninative_eventhandler[eventmask] = "bb.event.BuildStarted"
+# https://wiki.debian.org/GCC5
+# We may see binaries built with gcc5 run or linked into gcc4 environment
+# so use the older libstdc++ standard for now until we don't support gcc4
+# on the host system.
+BUILD_CXXFLAGS_append = " -D_GLIBCXX_USE_CXX11_ABI=0"
 
-python uninative_eventhandler() {
-    loader = e.data.getVar("UNINATIVE_LOADER", True)
-    if not os.path.exists(loader):
-        import subprocess
-        cmd = e.data.expand("mkdir -p ${STAGING_DIR}; cd ${STAGING_DIR}; tar -xjf ${COREBASE}/${BUILD_ARCH}-nativesdk-libc.tar.bz2; ${STAGING_DIR}/relocate_sdk.py ${STAGING_DIR_NATIVE} ${UNINATIVE_LOADER} ${UNINATIVE_LOADER} ${STAGING_BINDIR_NATIVE}/patchelf-uninative")
-        #bb.warn("nativesdk lib extraction: " + cmd)
+#
+# icu configure defaults to CXX11 if no -std= option is passed in CXXFLAGS
+# therefore pass one
+BUILD_CXXFLAGS_append_pn-icu-native = " -std=c++98"
+
+addhandler uninative_event_fetchloader
+uninative_event_fetchloader[eventmask] = "bb.event.BuildStarted"
+
+addhandler uninative_event_enable
+uninative_event_enable[eventmask] = "bb.event.ConfigParsed"
+
+python uninative_event_fetchloader() {
+    """
+    This event fires on the parent and will try to fetch the tarball if the
+    loader isn't already present.
+    """
+
+    chksum = d.getVarFlag("UNINATIVE_CHECKSUM", d.getVar("BUILD_ARCH", True), True)
+    if not chksum:
+        bb.fatal("Uninative selected but not configured correctly, please set UNINATIVE_CHECKSUM[%s]" % d.getVar("BUILD_ARCH", True))
+
+    loader = d.getVar("UNINATIVE_LOADER", True)
+    loaderchksum = loader + ".chksum"
+    if os.path.exists(loader) and os.path.exists(loaderchksum):
+        with open(loaderchksum, "r") as f:
+            readchksum = f.read().strip()
+        if readchksum == chksum:
+            return
+
+    import subprocess
+    try:
+        # Save and restore cwd as Fetch.download() does a chdir()
+        olddir = os.getcwd()
+
+        tarball = d.getVar("UNINATIVE_TARBALL", True)
+        tarballdir = os.path.join(d.getVar("UNINATIVE_DLDIR", True), chksum)
+        tarballpath = os.path.join(tarballdir, tarball)
+
+        if not os.path.exists(tarballpath):
+            bb.utils.mkdirhier(tarballdir)
+            if d.getVar("UNINATIVE_URL", True) == "unset":
+                bb.fatal("Uninative selected but not configured, please set UNINATIVE_URL")
+
+            localdata = bb.data.createCopy(d)
+            localdata.setVar('FILESPATH', "")
+            localdata.setVar('DL_DIR', tarballdir)
+
+            srcuri = d.expand("${UNINATIVE_URL}${UNINATIVE_TARBALL};sha256sum=%s" % chksum)
+            bb.note("Fetching uninative binary shim from %s" % srcuri)
+
+            fetcher = bb.fetch2.Fetch([srcuri], localdata, cache=False)
+            fetcher.download()
+            localpath = fetcher.localpath(srcuri)
+            if localpath != tarballpath and os.path.exists(localpath) and not os.path.exists(tarballpath):
+                    os.symlink(localpath, tarballpath)
+
+        cmd = d.expand("mkdir -p ${STAGING_DIR}-uninative; cd ${STAGING_DIR}-uninative; tar -xjf ${UNINATIVE_DLDIR}/%s/${UNINATIVE_TARBALL}; ${STAGING_DIR}-uninative/relocate_sdk.py ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux ${UNINATIVE_LOADER} ${UNINATIVE_LOADER} ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux/${bindir_native}/patchelf-uninative ${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${base_libdir_native}/libc*.so" % chksum)
         subprocess.check_call(cmd, shell=True)
+
+        with open(loaderchksum, "w") as f:
+            f.write(chksum)
+
+        enable_uninative(d)
+
+    except bb.fetch2.BBFetchException as exc:
+        bb.warn("Disabling uninative as unable to fetch uninative tarball: %s" % str(exc))
+        bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.")
+    except subprocess.CalledProcessError as exc:
+        bb.warn("Disabling uninative as unable to install uninative tarball: %s" % str(exc))
+        bb.warn("To build your own uninative loader, please bitbake uninative-tarball and set UNINATIVE_TARBALL appropriately.")
+    finally:
+        os.chdir(olddir)
 }
 
-SSTATEPOSTUNPACKFUNCS_append = " uninative_changeinterp"
+python uninative_event_enable() {
+    """
+    This event handler is called in the workers and is responsible for setting
+    up uninative if a loader is found.
+    """
+    enable_uninative(d)
+}
+
+def enable_uninative(d):
+    loader = d.getVar("UNINATIVE_LOADER", True)
+    if os.path.exists(loader):
+        bb.debug(2, "Enabling uninative")
+        d.setVar("NATIVELSBSTRING", "universal")
+        d.appendVar("SSTATEPOSTUNPACKFUNCS", " uninative_changeinterp")
+        d.prependVar("PATH", "${STAGING_DIR}-uninative/${BUILD_ARCH}-linux${bindir_native}:")
 
 python uninative_changeinterp () {
     import subprocess
@@ -27,6 +114,8 @@
     sstateinst = d.getVar('SSTATE_INSTDIR', True)
     for walkroot, dirs, files in os.walk(sstateinst):
         for file in files:
+            if file.endswith(".so") or ".so." in file:
+                continue
             f = os.path.join(walkroot, file)
             if os.path.islink(f):
                 continue
@@ -36,9 +125,16 @@
             elf = oe.qa.ELFFile(f)
             try:
                 elf.open()
-            except:
+            except oe.qa.NotELFFileError:
+                continue
+            if not elf.isDynamic():
                 continue
 
-            #bb.warn("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f))
-            subprocess.call("patchelf-uninative --set-interpreter %s %s" % (d.getVar("UNINATIVE_LOADER", True), f), shell=True)
+            try:
+                subprocess.check_output(("patchelf-uninative", "--set-interpreter",
+                                         d.getVar("UNINATIVE_LOADER", True), f),
+                                        stderr=subprocess.STDOUT)
+            except subprocess.CalledProcessError as e:
+                bb.fatal("'%s' failed with exit code %d and the following output:\n%s" %
+                         (e.cmd, e.returncode, e.output))
 }
diff --git a/yocto-poky/meta/classes/update-alternatives.bbclass b/yocto-poky/meta/classes/update-alternatives.bbclass
index a3c1657..70a8185 100644
--- a/yocto-poky/meta/classes/update-alternatives.bbclass
+++ b/yocto-poky/meta/classes/update-alternatives.bbclass
@@ -61,7 +61,7 @@
 ALTERNATIVE_PRIORITY = "10"
 
 # We need special processing for vardeps because it can not work on
-# modified flag values.  So we agregate the flags into a new variable
+# modified flag values.  So we aggregate the flags into a new variable
 # and include that vairable in the set.
 UPDALTVARS  = "ALTERNATIVE ALTERNATIVE_LINK_NAME ALTERNATIVE_TARGET ALTERNATIVE_PRIORITY"
 
@@ -252,7 +252,7 @@
             alt_target   = alt_target or d.getVar('ALTERNATIVE_TARGET_%s' % pkg, True) or d.getVar('ALTERNATIVE_TARGET', True) or alt_link
 
             if alt_link == alt_target:
-                bb.warn('alt_link == alt_target: %s == %s' % (alt_link, alt_target))
+                bb.warn('%s: alt_link == alt_target: %s == %s' % (pn, alt_link, alt_target))
                 alt_target = '%s.%s' % (alt_target, pn)
 
             if not os.path.lexists('%s/%s/%s' % (pkgdest, pkg, alt_target)):
diff --git a/yocto-poky/meta/classes/upstream-version-is-even.bbclass b/yocto-poky/meta/classes/upstream-version-is-even.bbclass
new file mode 100644
index 0000000..89556ed
--- /dev/null
+++ b/yocto-poky/meta/classes/upstream-version-is-even.bbclass
@@ -0,0 +1,5 @@
+# This class ensures that the upstream version check only
+# accepts even minor versions (i.e. 3.0.x, 3.2.x, 3.4.x, etc.)
+# This scheme is used by Gnome and a number of other projects
+# to signify stable releases vs development releases.
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
diff --git a/yocto-poky/meta/classes/useradd-staticids.bbclass b/yocto-poky/meta/classes/useradd-staticids.bbclass
index 924d6ea..a9b506d 100644
--- a/yocto-poky/meta/classes/useradd-staticids.bbclass
+++ b/yocto-poky/meta/classes/useradd-staticids.bbclass
@@ -22,6 +22,30 @@
         and return it as a list"""
         return list(itertools.islice(itertools.chain(iterable, itertools.repeat(obj)), length))
 
+    def merge_files(file_list, exp_fields):
+        """Read each passwd/group file in file_list, split each line and create
+        a dictionary with the user/group names as keys and the split lines as
+        values. If the user/group name already exists in the dictionary, then
+        update any fields in the list with the values from the new list (if they
+        are set)."""
+        id_table = dict()
+        for conf in file_list.split():
+            if os.path.exists(conf):
+                f = open(conf, "r")
+                for line in f:
+                    if line.startswith('#'):
+                        continue
+                    # Make sure there always are at least exp_fields elements in
+                    # the field list. This allows for leaving out trailing
+                    # colons in the files.
+                    fields = list_extend(line.rstrip().split(":"), exp_fields)
+                    if fields[0] not in id_table:
+                        id_table[fields[0]] = fields
+                    else:
+                        id_table[fields[0]] = list(itertools.imap(lambda x, y: x or y, fields, id_table[fields[0]]))
+
+        return id_table
+
     # We parse and rewrite the useradd components
     def rewrite_useradd(params):
         # The following comes from --help on useradd from shadow
@@ -37,21 +61,21 @@
         parser.add_argument("-k", "--skel", metavar="SKEL_DIR", help="use this alternative skeleton directory")
         parser.add_argument("-K", "--key", metavar="KEY=VALUE", help="override /etc/login.defs defaults")
         parser.add_argument("-l", "--no-log-init", help="do not add the user to the lastlog and faillog databases", action="store_true")
-        parser.add_argument("-m", "--create-home", help="create the user's home directory", action="store_true")
-        parser.add_argument("-M", "--no-create-home", help="do not create the user's home directory", action="store_true")
-        parser.add_argument("-N", "--no-user-group", help="do not create a group with the same name as the user", action="store_true")
+        parser.add_argument("-m", "--create-home", help="create the user's home directory", action="store_const", const=True)
+        parser.add_argument("-M", "--no-create-home", dest="create_home", help="do not create the user's home directory", action="store_const", const=False)
+        parser.add_argument("-N", "--no-user-group", dest="user_group", help="do not create a group with the same name as the user", action="store_const", const=False)
         parser.add_argument("-o", "--non-unique", help="allow to create users with duplicate (non-unique UID)", action="store_true")
         parser.add_argument("-p", "--password", metavar="PASSWORD", help="encrypted password of the new account")
         parser.add_argument("-R", "--root", metavar="CHROOT_DIR", help="directory to chroot into")
         parser.add_argument("-r", "--system", help="create a system account", action="store_true")
         parser.add_argument("-s", "--shell", metavar="SHELL", help="login shell of the new account")
         parser.add_argument("-u", "--uid", metavar="UID", help="user ID of the new account")
-        parser.add_argument("-U", "--user-group", help="create a group with the same name as the user", action="store_true")
+        parser.add_argument("-U", "--user-group", help="create a group with the same name as the user", action="store_const", const=True)
         parser.add_argument("LOGIN", help="Login name of the new user")
 
         # Return a list of configuration files based on either the default
         # files/passwd or the contents of USERADD_UID_TABLES
-        # paths are resulved via BBPATH
+        # paths are resolved via BBPATH
         def get_passwd_list(d):
             str = ""
             bbpath = d.getVar('BBPATH', True)
@@ -63,6 +87,7 @@
             return str
 
         newparams = []
+        users = None
         for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
             param = param.strip()
             if not param:
@@ -72,10 +97,9 @@
             except:
                 raise bb.build.FuncFailed("%s: Unable to parse arguments for USERADD_PARAM_%s: '%s'" % (d.getVar('PN', True), pkg, param))
 
-            # files/passwd or the contents of USERADD_UID_TABLES
+            # Read all passwd files specified in USERADD_UID_TABLES or files/passwd
             # Use the standard passwd layout:
             #  username:password:user_id:group_id:comment:home_directory:login_shell
-            # (we want to process in reverse order, as 'last found' in the list wins)
             #
             # If a field is left blank, the original value will be used.  The 'username'
             # field is required.
@@ -84,65 +108,57 @@
             # in the useradd command may introduce a security hole.  It's assumed that
             # all new users get the default ('*' which prevents login) until the user is
             # specifically configured by the system admin.
-            for conf in get_passwd_list(d).split()[::-1]:
-                if os.path.exists(conf):
-                    f = open(conf, "r")
-                    for line in f:
-                        if line.startswith('#'):
-                            continue
-                        # Make sure there always are at least seven elements in
-                        # the field list. This allows for leaving out trailing
-                        # colons in the passwd file.
-                        field = list_extend(line.rstrip().split(":"), 7)
-                        if field[0] == uaargs.LOGIN:
-                            if uaargs.uid and field[2] and (uaargs.uid != field[2]):
-                                bb.warn("%s: Changing username %s's uid from (%s) to (%s), verify configuration files!" % (d.getVar('PN', True), uaargs.LOGIN, uaargs.uid, field[2]))
-                            uaargs.uid = [field[2], uaargs.uid][not field[2]]
+            if not users:
+                users = merge_files(get_passwd_list(d), 7)
 
-                            # Determine the possible groupname
-                            # Unless the group name (or gid) is specified, we assume that the LOGIN is the groupname
-                            #
-                            # By default the system has creation of the matching groups enabled
-                            # So if the implicit username-group creation is on, then the implicit groupname (LOGIN)
-                            # is used, and we disable the user_group option.
-                            #
-                            uaargs.groupname = [uaargs.gid, uaargs.LOGIN][not uaargs.gid or uaargs.user_group]
-                            uaargs.groupid = [uaargs.gid, uaargs.groupname][not uaargs.gid]
-                            uaargs.groupid = [field[3], uaargs.groupid][not field[3]]
+            if uaargs.LOGIN not in users:
+                continue
 
-                            if not uaargs.gid or uaargs.gid != uaargs.groupid:
-                                if (uaargs.groupid and uaargs.groupid.isdigit()) and (uaargs.groupname and uaargs.groupname.isdigit()) and (uaargs.groupid != uaargs.groupname):
-                                    # We want to add a group, but we don't know it's name... so we can't add the group...
-                                    # We have to assume the group has previously been added or we'll fail on the adduser...
-                                    # Note: specifying the actual gid is very rare in OE, usually the group name is specified.
-                                    bb.warn("%s: Changing gid for login %s from (%s) to (%s), verify configuration files!" % (d.getVar('PN', True), uaargs.LOGIN, uaargs.groupname, uaargs.gid))
-                                elif (uaargs.groupid and not uaargs.groupid.isdigit()) and uaargs.groupid == uaargs.groupname:
-                                    # We don't have a number, so we have to add a name
-                                    bb.debug(1, "Adding group %s!" % (uaargs.groupname))
-                                    uaargs.gid = uaargs.groupid
-                                    uaargs.user_group = False
-                                    groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg, True)
-                                    newgroup = "%s %s" % (['', ' --system'][uaargs.system], uaargs.groupname)
-                                    if groupadd:
-                                        d.setVar("GROUPADD_PARAM_%s" % pkg, "%s ; %s" % (groupadd, newgroup))
-                                    else:
-                                        d.setVar("GROUPADD_PARAM_%s" % pkg, newgroup)
-                                elif uaargs.groupname and (uaargs.groupid and uaargs.groupid.isdigit()):
-                                    # We have a group name and a group number to assign it to
-                                    bb.debug(1, "Adding group %s  gid (%s)!" % (uaargs.groupname, uaargs.groupid))
-                                    uaargs.gid = uaargs.groupid
-                                    uaargs.user_group = False
-                                    groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg, True)
-                                    newgroup = "-g %s %s" % (uaargs.gid, uaargs.groupname)
-                                    if groupadd:
-                                        d.setVar("GROUPADD_PARAM_%s" % pkg, "%s ; %s" % (groupadd, newgroup))
-                                    else:
-                                        d.setVar("GROUPADD_PARAM_%s" % pkg, newgroup)
+            field = users[uaargs.LOGIN]
 
-                            uaargs.comment = ["'%s'" % field[4], uaargs.comment][not field[4]]
-                            uaargs.home_dir = [field[5], uaargs.home_dir][not field[5]]
-                            uaargs.shell = [field[6], uaargs.shell][not field[6]]
-                            break
+            if uaargs.uid and field[2] and (uaargs.uid != field[2]):
+                bb.warn("%s: Changing username %s's uid from (%s) to (%s), verify configuration files!" % (d.getVar('PN', True), uaargs.LOGIN, uaargs.uid, field[2]))
+            uaargs.uid = field[2] or uaargs.uid
+
+            # Determine the possible groupname
+            # Unless the group name (or gid) is specified, we assume that the LOGIN is the groupname
+            #
+            # By default the system has creation of the matching groups enabled
+            # So if the implicit username-group creation is on, then the implicit groupname (LOGIN)
+            # is used, and we disable the user_group option.
+            #
+            user_group = uaargs.user_group is None or uaargs.user_group is True
+            uaargs.groupname = uaargs.LOGIN if user_group else uaargs.gid
+            uaargs.groupid = field[3] or uaargs.gid or uaargs.groupname
+
+            if uaargs.groupid and uaargs.gid != uaargs.groupid:
+                newgroup = None
+                if not uaargs.groupid.isdigit():
+                    # We don't have a group number, so we have to add a name
+                    bb.debug(1, "Adding group %s!" % uaargs.groupid)
+                    newgroup = "%s %s" % (' --system' if uaargs.system else '', uaargs.groupid)
+                elif uaargs.groupname and not uaargs.groupname.isdigit():
+                    # We have a group name and a group number to assign it to
+                    bb.debug(1, "Adding group %s (gid %s)!" % (uaargs.groupname, uaargs.groupid))
+                    newgroup = "-g %s %s" % (uaargs.groupid, uaargs.groupname)
+                else:
+                    # We want to add a group, but we don't know it's name... so we can't add the group...
+                    # We have to assume the group has previously been added or we'll fail on the adduser...
+                    # Note: specifying the actual gid is very rare in OE, usually the group name is specified.
+                    bb.warn("%s: Changing gid for login %s to %s, verify configuration files!" % (d.getVar('PN', True), uaargs.LOGIN, uaargs.groupid))
+
+                uaargs.gid = uaargs.groupid
+                uaargs.user_group = None
+                if newgroup:
+                    groupadd = d.getVar("GROUPADD_PARAM_%s" % pkg, True)
+                    if groupadd:
+                        d.setVar("GROUPADD_PARAM_%s" % pkg, "%s; %s" % (groupadd, newgroup))
+                    else:
+                        d.setVar("GROUPADD_PARAM_%s" % pkg, newgroup)
+
+            uaargs.comment = "'%s'" % field[4] if field[4] else uaargs.comment
+            uaargs.home_dir = field[5] or uaargs.home_dir
+            uaargs.shell = field[6] or uaargs.shell
 
             # Should be an error if a specific option is set...
             if d.getVar('USERADD_ERROR_DYNAMIC', True) == '1' and not ((uaargs.uid and uaargs.uid.isdigit()) and uaargs.gid):
@@ -161,21 +177,21 @@
             newparam += ['', ' --skel %s' % uaargs.skel][uaargs.skel != None]
             newparam += ['', ' --key %s' % uaargs.key][uaargs.key != None]
             newparam += ['', ' --no-log-init'][uaargs.no_log_init]
-            newparam += ['', ' --create-home'][uaargs.create_home]
-            newparam += ['', ' --no-create-home'][uaargs.no_create_home]
-            newparam += ['', ' --no-user-group'][uaargs.no_user_group]
+            newparam += ['', ' --create-home'][uaargs.create_home is True]
+            newparam += ['', ' --no-create-home'][uaargs.create_home is False]
+            newparam += ['', ' --no-user-group'][uaargs.user_group is False]
             newparam += ['', ' --non-unique'][uaargs.non_unique]
             newparam += ['', ' --password %s' % uaargs.password][uaargs.password != None]
             newparam += ['', ' --root %s' % uaargs.root][uaargs.root != None]
             newparam += ['', ' --system'][uaargs.system]
             newparam += ['', ' --shell %s' % uaargs.shell][uaargs.shell != None]
             newparam += ['', ' --uid %s' % uaargs.uid][uaargs.uid != None]
-            newparam += ['', ' --user-group'][uaargs.user_group]
+            newparam += ['', ' --user-group'][uaargs.user_group is True]
             newparam += ' %s' % uaargs.LOGIN
 
             newparams.append(newparam)
 
-        return " ;".join(newparams).strip()
+        return ";".join(newparams).strip()
 
     # We parse and rewrite the groupadd components
     def rewrite_groupadd(params):
@@ -192,7 +208,7 @@
 
         # Return a list of configuration files based on either the default
         # files/group or the contents of USERADD_GID_TABLES
-        # paths are resulved via BBPATH
+        # paths are resolved via BBPATH
         def get_group_list(d):
             str = ""
             bbpath = d.getVar('BBPATH', True)
@@ -204,6 +220,7 @@
             return str
 
         newparams = []
+        groups = None
         for param in re.split('''[ \t]*;[ \t]*(?=(?:[^'"]|'[^']*'|"[^"]*")*$)''', params):
             param = param.strip()
             if not param:
@@ -214,7 +231,7 @@
             except:
                 raise bb.build.FuncFailed("%s: Unable to parse arguments for GROUPADD_PARAM_%s: '%s'" % (d.getVar('PN', True), pkg, param))
 
-            # Need to iterate over layers and open the right file(s)
+            # Read all group files specified in USERADD_GID_TABLES or files/group
             # Use the standard group layout:
             #  groupname:password:group_id:group_members
             #
@@ -223,21 +240,18 @@
             #
             # Note: similar to the passwd file, the 'password' filed is ignored
             # Note: group_members is ignored, group members must be configured with the GROUPMEMS_PARAM
-            for conf in get_group_list(d).split()[::-1]:
-                if os.path.exists(conf):
-                    f = open(conf, "r")
-                    for line in f:
-                        if line.startswith('#'):
-                            continue
-                        # Make sure there always are at least four elements in
-                        # the field list. This allows for leaving out trailing
-                        # colons in the group file.
-                        field = list_extend(line.rstrip().split(":"), 4)
-                        if field[0] == gaargs.GROUP and field[2]:
-                            if gaargs.gid and (gaargs.gid != field[2]):
-                                bb.warn("%s: Changing groupname %s's gid from (%s) to (%s), verify configuration files!" % (d.getVar('PN', True), gaargs.GROUP, gaargs.gid, field[2]))
-                            gaargs.gid = field[2]
-                            break
+            if not groups:
+                groups = merge_files(get_group_list(d), 4)
+
+            if gaargs.GROUP not in groups:
+                continue
+
+            field = groups[gaargs.GROUP]
+
+            if field[2]:
+                if gaargs.gid and (gaargs.gid != field[2]):
+                    bb.warn("%s: Changing groupname %s's gid from (%s) to (%s), verify configuration files!" % (d.getVar('PN', True), gaargs.GROUP, gaargs.gid, field[2]))
+                gaargs.gid = field[2]
 
             if d.getVar('USERADD_ERROR_DYNAMIC', True) == '1' and not (gaargs.gid and gaargs.gid.isdigit()):
                 #bb.error("Skipping recipe %s, package %s which adds groupname %s does not have a static gid defined." % (d.getVar('PN', True),  pkg, gaargs.GROUP))
@@ -255,7 +269,7 @@
 
             newparams.append(newparam)
 
-        return " ;".join(newparams).strip()
+        return ";".join(newparams).strip()
 
     # Load and process the users and groups, rewriting the adduser/addgroup params
     useradd_packages = d.getVar('USERADD_PACKAGES', True)
diff --git a/yocto-poky/meta/classes/useradd.bbclass b/yocto-poky/meta/classes/useradd.bbclass
index 4577e56..ee402ac 100644
--- a/yocto-poky/meta/classes/useradd.bbclass
+++ b/yocto-poky/meta/classes/useradd.bbclass
@@ -50,14 +50,14 @@
 
 # Perform group additions first, since user additions may depend
 # on these groups existing
-if test "x$GROUPADD_PARAM" != "x"; then
+if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then
 	echo "Running groupadd commands..."
 	# Invoke multiple instances of groupadd for parameter lists
 	# separated by ';'
 	opts=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1`
 	remaining=`echo "$GROUPADD_PARAM" | cut -d ';' -f 2-`
 	while test "x$opts" != "x"; do
-		perform_groupadd "$SYSROOT" "$OPT $opts" 10
+		perform_groupadd "$SYSROOT" "$OPT $opts"
 		if test "x$opts" = "x$remaining"; then
 			break
 		fi
@@ -66,14 +66,14 @@
 	done
 fi 
 
-if test "x$USERADD_PARAM" != "x"; then
+if test "x`echo $USERADD_PARAM | tr -d '[:space:]'`" != "x"; then
 	echo "Running useradd commands..."
 	# Invoke multiple instances of useradd for parameter lists
 	# separated by ';'
 	opts=`echo "$USERADD_PARAM" | cut -d ';' -f 1`
 	remaining=`echo "$USERADD_PARAM" | cut -d ';' -f 2-`
 	while test "x$opts" != "x"; do
-		perform_useradd "$SYSROOT" "$OPT $opts" 10
+		perform_useradd "$SYSROOT" "$OPT $opts"
 		if test "x$opts" = "x$remaining"; then
 			break
 		fi
@@ -82,14 +82,14 @@
 	done
 fi
 
-if test "x$GROUPMEMS_PARAM" != "x"; then
+if test "x`echo $GROUPMEMS_PARAM | tr -d '[:space:]'`" != "x"; then
 	echo "Running groupmems commands..."
 	# Invoke multiple instances of groupmems for parameter lists
 	# separated by ';'
 	opts=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 1`
 	remaining=`echo "$GROUPMEMS_PARAM" | cut -d ';' -f 2-`
 	while test "x$opts" != "x"; do
-		perform_groupmems "$SYSROOT" "$OPT $opts" 10
+		perform_groupmems "$SYSROOT" "$OPT $opts"
 		if test "x$opts" = "x$remaining"; then
 			break
 		fi
@@ -127,6 +127,35 @@
 	fi
 }
 
+userdel_sysroot_sstate () {
+if test "x${STAGING_DIR_TARGET}" != "x"; then
+    if [ "${BB_CURRENTTASK}" = "configure" -o "${BB_CURRENTTASK}" = "clean" ]; then
+        export PSEUDO="${FAKEROOTENV} PSEUDO_LOCALSTATEDIR=${STAGING_DIR_TARGET}${localstatedir}/pseudo ${STAGING_DIR_NATIVE}${bindir}/pseudo"
+        OPT="--root ${STAGING_DIR_TARGET}"
+
+        # Remove groups and users defined for package
+        GROUPADD_PARAM="${@get_all_cmd_params(d, 'groupadd')}"
+        USERADD_PARAM="${@get_all_cmd_params(d, 'useradd')}"
+
+        if test "x`echo $USERADD_PARAM | tr -d '[:space:]'`" != "x"; then
+            user=`echo "$USERADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
+            perform_userdel "${STAGING_DIR_TARGET}" "$OPT $user"
+        fi
+
+        if test "x`echo $GROUPADD_PARAM | tr -d '[:space:]'`" != "x"; then
+            group=`echo "$GROUPADD_PARAM" | cut -d ';' -f 1 | awk '{ print $NF }'`
+            perform_groupdel "${STAGING_DIR_TARGET}" "$OPT $group"
+        fi
+
+    fi
+fi
+}
+
+SSTATECLEANFUNCS = "userdel_sysroot_sstate"
+SSTATECLEANFUNCS_class-cross = ""
+SSTATECLEANFUNCS_class-native = ""
+SSTATECLEANFUNCS_class-nativesdk = ""
+
 do_install[prefuncs] += "${SYSROOTFUNC}"
 SYSROOTFUNC = "useradd_sysroot"
 SYSROOTFUNC_class-cross = ""
diff --git a/yocto-poky/meta/classes/useradd_base.bbclass b/yocto-poky/meta/classes/useradd_base.bbclass
index ab3cd35..0d81acc 100644
--- a/yocto-poky/meta/classes/useradd_base.bbclass
+++ b/yocto-poky/meta/classes/useradd_base.bbclass
@@ -4,7 +4,7 @@
 
 # The following functions basically have similar logic.
 # *) Perform necessary checks before invoking the actual command
-# *) Invoke the actual command, make retries if necessary
+# *) Invoke the actual command with flock
 # *) Error out if an error occurs.
 
 # Note that before invoking these functions, make sure the global variable
@@ -13,26 +13,16 @@
 perform_groupadd () {
 	local rootdir="$1"
 	local opts="$2"
-	local retries="$3"
-	bbnote "${PN}: Performing groupadd with [$opts] and $retries times of retry"
+	bbnote "${PN}: Performing groupadd with [$opts]"
 	local groupname=`echo "$opts" | awk '{ print $NF }'`
 	local group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
 	if test "x$group_exists" = "x"; then
-		local count=0
-		while true; do
-			eval $PSEUDO groupadd $opts || true
-			group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
-			if test "x$group_exists" = "x"; then
-				bbwarn "${PN}: groupadd command did not succeed. Retrying..."
-			else
-				break
-			fi
-			count=`expr $count + 1`
-			if test $count = $retries; then
-				bbfatal "${PN}: Tried running groupadd command $retries times without success, giving up"
-			fi
-                        sleep $count
-		done
+		opts=`echo $opts | sed s/\'/\"/g`
+		eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupadd \$opts\" || true
+		group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
+		if test "x$group_exists" = "x"; then
+			bbfatal "${PN}: groupadd command did not succeed."
+		fi
 	else
 		bbnote "${PN}: group $groupname already exists, not re-creating it"
 	fi
@@ -41,26 +31,16 @@
 perform_useradd () {
 	local rootdir="$1"
 	local opts="$2"
-	local retries="$3"
-	bbnote "${PN}: Performing useradd with [$opts] and $retries times of retry"
+	bbnote "${PN}: Performing useradd with [$opts]"
 	local username=`echo "$opts" | awk '{ print $NF }'`
 	local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
 	if test "x$user_exists" = "x"; then
-	       local count=0
-	       while true; do
-		       eval $PSEUDO useradd $opts || true
-		       user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
-		       if test "x$user_exists" = "x"; then
-			       bbwarn "${PN}: useradd command did not succeed. Retrying..."
-		       else
-			       break
-		       fi
-		       count=`expr $count + 1`
-		       if test $count = $retries; then
-				bbfatal "${PN}: Tried running useradd command $retries times without success, giving up"
-		       fi
-		       sleep $count
-	       done
+		opts=`echo $opts | sed s/\'/\"/g`
+		eval flock -x $rootdir${sysconfdir} -c  \"$PSEUDO useradd \$opts\" || true
+		user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
+		if test "x$user_exists" = "x"; then
+			bbfatal "${PN}: useradd command did not succeed."
+		fi
 	else
 		bbnote "${PN}: user $username already exists, not re-creating it"
 	fi
@@ -69,8 +49,7 @@
 perform_groupmems () {
 	local rootdir="$1"
 	local opts="$2"
-	local retries="$3"
-	bbnote "${PN}: Performing groupmems with [$opts] and $retries times of retry"
+	bbnote "${PN}: Performing groupmems with [$opts]"
 	local groupname=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-g" || $i == "--group") print $(i+1) }'`
 	local username=`echo "$opts" | awk '{ for (i = 1; i < NF; i++) if ($i == "-a" || $i == "--add") print $(i+1) }'`
 	bbnote "${PN}: Running groupmems command with group $groupname and user $username"
@@ -84,25 +63,11 @@
 	fi
 	local mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`"
 	if test "x$mem_exists" = "x"; then
-		local count=0
-		while true; do
-			eval $PSEUDO groupmems $opts || true
-			mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`"
-			if test "x$mem_exists" = "x"; then
-				bbwarn "${PN}: groupmems command did not succeed. Retrying..."
-			else
-				break
-			fi
-			count=`expr $count + 1`
-			if test $count = $retries; then
-				if test "x$gshadow" = "xno"; then
-					rm -f $rootdir${sysconfdir}/gshadow
-					rm -f $rootdir${sysconfdir}/gshadow-
-				fi
-				bbfatal "${PN}: Tried running groupmems command $retries times without success, giving up"
-			fi
-			sleep $count
-		done
+		eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupmems \$opts\" || true
+		mem_exists="`grep "^$groupname:[^:]*:[^:]*:\([^,]*,\)*$username\(,[^,]*\)*" $rootdir/etc/group || true`"
+		if test "x$mem_exists" = "x"; then
+			bbfatal "${PN}: groupmems command did not succeed."
+		fi
 	else
 		bbnote "${PN}: group $groupname already contains $username, not re-adding it"
 	fi
@@ -115,26 +80,15 @@
 perform_groupdel () {
 	local rootdir="$1"
 	local opts="$2"
-	local retries="$3"
-	bbnote "${PN}: Performing groupdel with [$opts] and $retries times of retry"
+	bbnote "${PN}: Performing groupdel with [$opts]"
 	local groupname=`echo "$opts" | awk '{ print $NF }'`
 	local group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
 	if test "x$group_exists" != "x"; then
-		local count=0
-		while true; do
-			eval $PSEUDO groupdel $opts || true
-			group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
-			if test "x$group_exists" != "x"; then
-				bbwarn "${PN}: groupdel command did not succeed. Retrying..."
-			else
-				break
-			fi
-			count=`expr $count + 1`
-			if test $count = $retries; then
-				bbfatal "${PN}: Tried running groupdel command $retries times without success, giving up"
-			fi
-			sleep $count
-		done
+		eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupdel \$opts\" || true
+		group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
+		if test "x$group_exists" != "x"; then
+			bbfatal "${PN}: groupdel command did not succeed."
+		fi
 	else
 		bbnote "${PN}: group $groupname doesn't exist, not removing it"
 	fi
@@ -143,26 +97,15 @@
 perform_userdel () {
 	local rootdir="$1"
 	local opts="$2"
-	local retries="$3"
-	bbnote "${PN}: Performing userdel with [$opts] and $retries times of retry"
+	bbnote "${PN}: Performing userdel with [$opts]"
 	local username=`echo "$opts" | awk '{ print $NF }'`
 	local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
 	if test "x$user_exists" != "x"; then
-	       local count=0
-	       while true; do
-		       eval $PSEUDO userdel $opts || true
-		       user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
-		       if test "x$user_exists" != "x"; then
-			       bbwarn "${PN}: userdel command did not succeed. Retrying..."
-		       else
-			       break
-		       fi
-		       count=`expr $count + 1`
-		       if test $count = $retries; then
-				bbfatal "${PN}: Tried running userdel command $retries times without success, giving up"
-		       fi
-		       sleep $count
-	       done
+		eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO userdel \$opts\" || true
+		user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
+		if test "x$user_exists" != "x"; then
+			bbfatal "${PN}: userdel command did not succeed."
+		fi
 	else
 		bbnote "${PN}: user $username doesn't exist, not removing it"
 	fi
@@ -174,25 +117,14 @@
 	set +e
 	local rootdir="$1"
 	local opts="$2"
-	local retries="$3"
-	bbnote "${PN}: Performing groupmod with [$opts] and $retries times of retry"
+	bbnote "${PN}: Performing groupmod with [$opts]"
 	local groupname=`echo "$opts" | awk '{ print $NF }'`
 	local group_exists="`grep "^$groupname:" $rootdir/etc/group || true`"
 	if test "x$group_exists" != "x"; then
-		local count=0
-		while true; do
-			eval $PSEUDO groupmod $opts
-			if test $? != 0; then
-				bbwarn "${PN}: groupmod command did not succeed. Retrying..."
-			else
-				break
-			fi
-			count=`expr $count + 1`
-			if test $count = $retries; then
-				bbfatal "${PN}: Tried running groupmod command $retries times without success, giving up"
-			fi
-			sleep $count
-		done
+		eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO groupmod \$opts\"
+		if test $? != 0; then
+			bbwarn "${PN}: groupmod command did not succeed."
+		fi
 	else
 		bbwarn "${PN}: group $groupname doesn't exist, unable to modify it"
 	fi
@@ -204,25 +136,14 @@
 	set +e
 	local rootdir="$1"
 	local opts="$2"
-	local retries="$3"
-	bbnote "${PN}: Performing usermod with [$opts] and $retries times of retry"
+	bbnote "${PN}: Performing usermod with [$opts]"
 	local username=`echo "$opts" | awk '{ print $NF }'`
 	local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
 	if test "x$user_exists" != "x"; then
-	       local count=0
-	       while true; do
-		       eval $PSEUDO usermod $opts
-		       if test $? != 0; then
-			       bbwarn "${PN}: usermod command did not succeed. Retrying..."
-		       else
-			       break
-		       fi
-		       count=`expr $count + 1`
-		       if test $count = $retries; then
-				bbfatal "${PN}: Tried running usermod command $retries times without success, giving up"
-		       fi
-		       sleep $count
-	       done
+		eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO usermod \$opts\"
+		if test $? != 0; then
+			bbfatal "${PN}: usermod command did not succeed."
+		fi
 	else
 		bbwarn "${PN}: user $username doesn't exist, unable to modify it"
 	fi
diff --git a/yocto-poky/meta/classes/utility-tasks.bbclass b/yocto-poky/meta/classes/utility-tasks.bbclass
index e817b89..5bcfd0b 100644
--- a/yocto-poky/meta/classes/utility-tasks.bbclass
+++ b/yocto-poky/meta/classes/utility-tasks.bbclass
@@ -4,12 +4,12 @@
     taskdescs = {}
     maxlen = 0
     for e in d.keys():
-        if d.getVarFlag(e, 'task'):
+        if d.getVarFlag(e, 'task', True):
             maxlen = max(maxlen, len(e))
             if e.endswith('_setscene'):
-                desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc') or '')
+                desc = "%s (setscene version)" % (d.getVarFlag(e[:-9], 'doc', True) or '')
             else:
-                desc = d.getVarFlag(e, 'doc') or ''
+                desc = d.getVarFlag(e, 'doc', True) or ''
             taskdescs[e] = desc
 
     tasks = sorted(taskdescs.keys())
@@ -43,11 +43,8 @@
     if len(src_uri) == 0:
         return
 
-    localdata = bb.data.createCopy(d)
-    bb.data.update_data(localdata)
-
     try:
-        fetcher = bb.fetch2.Fetch(src_uri, localdata)
+        fetcher = bb.fetch2.Fetch(src_uri, d)
         fetcher.checkstatus()
     except bb.fetch2.BBFetchException, e:
         raise bb.build.FuncFailed(e)
diff --git a/yocto-poky/meta/classes/vala.bbclass b/yocto-poky/meta/classes/vala.bbclass
index 9ff664a..615eb37 100644
--- a/yocto-poky/meta/classes/vala.bbclass
+++ b/yocto-poky/meta/classes/vala.bbclass
@@ -16,3 +16,9 @@
     ${datadir}/vala/vapi/*.deps \
     ${datadir}/gir-1.0 \
 "
+
+# Remove vapigen.m4 that is bundled with tarballs
+# because it does not yet have our cross-compile fixes
+do_configure_prepend() {
+        rm -f ${S}/m4/vapigen.m4
+}
diff --git a/yocto-poky/meta/classes/waf.bbclass b/yocto-poky/meta/classes/waf.bbclass
index 3a221e7..5e55833 100644
--- a/yocto-poky/meta/classes/waf.bbclass
+++ b/yocto-poky/meta/classes/waf.bbclass
@@ -1,9 +1,34 @@
+# avoids build breaks when using no-static-libs.inc
+DISABLE_STATIC = ""
+
+def get_waf_parallel_make(d):
+    pm = d.getVar('PARALLEL_MAKE', True)
+    if pm:
+        # look for '-j' and throw other options (e.g. '-l') away
+        # because they might have different meaning in bjam
+        pm = pm.split()
+        while pm:
+            v = None
+            opt = pm.pop(0)
+            if opt == '-j':
+                v = pm.pop(0)
+            elif opt.startswith('-j'):
+                v = opt[2:].strip()
+            else:
+                v = None
+
+            if v:
+                v = min(64, int(v))
+                return '-j' + str(v)
+
+    return ""
+
 waf_do_configure() {
 	${S}/waf configure --prefix=${prefix} ${EXTRA_OECONF}
 }
 
 waf_do_compile()  {
-	${S}/waf build ${PARALLEL_MAKE}
+	${S}/waf build ${@get_waf_parallel_make(d)}
 }
 
 waf_do_install() {
diff --git a/yocto-poky/meta/conf/bitbake.conf b/yocto-poky/meta/conf/bitbake.conf
index 06971da..40796aa 100644
--- a/yocto-poky/meta/conf/bitbake.conf
+++ b/yocto-poky/meta/conf/bitbake.conf
@@ -41,7 +41,7 @@
 export bindir = "${exec_prefix}/bin"
 export sbindir = "${exec_prefix}/sbin"
 export libdir = "${exec_prefix}/${baselib}"
-export libexecdir = "${libdir}/${BPN}"
+export libexecdir = "${exec_prefix}/libexec"
 export includedir = "${exec_prefix}/include"
 export oldincludedir = "${exec_prefix}/include"
 localedir = "${libdir}/locale"
@@ -55,13 +55,16 @@
 sbindir_native = "${prefix_native}/sbin"
 includedir_native = "${prefix_native}/include"
 libdir_native = "${prefix_native}/lib"
-libexecdir_native = "${libdir_native}/${BPN}"
+libexecdir_native = "${prefix_native}/libexec"
 base_libdir_native = "/lib"
 datadir_native = "${prefix_native}/share"
 bindir_cross = "/bin"
 bindir_crossscripts = "${bindir}/crossscripts"
 prefix_nativesdk = "/usr"
 bindir_nativesdk = "${prefix_nativesdk}/bin"
+sbindir_nativesdk = "${prefix_nativesdk}/sbin"
+base_bindir_nativesdk = "/bin"
+base_sbindir_nativesdk = "/sbin"
 includedir_nativesdk = "${prefix_nativesdk}/include"
 libdir_nativesdk = "${prefix_nativesdk}/lib"
 base_libdir_nativesdk = "/lib"
@@ -167,17 +170,21 @@
     bzip2-native \
     chrpath-native \
     file-native \
+    findutils-native \
     git-native \
     grep-native \
     diffstat-native \
     patch-native \
-    perl-native-runtime \
-    python-native-runtime \
+    libgcc-native \
+    hostperl-runtime-native \
+    hostpython-runtime-native \
     tar-native \
     virtual/libintl-native \
+    virtual/libiconv-native \
     texinfo-native \
     bash-native \
     sed-native \
+    wget-native \
     "
 # gzip-native should be listed above?
 
@@ -188,17 +195,19 @@
 PN = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
 PV = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[1] or '1.0'}"
 PR = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE', False),d)[2] or 'r0'}"
+PE = ""
 PF = "${PN}-${EXTENDPE}${PV}-${PR}"
-EXTENDPE = "${@['','${PE\x7d_'][int(d.getVar('PE', True) or 0) > 0]}"
+EXTENDPE = "${@['','${PE}_'][int(d.getVar('PE', True) or 0) > 0]}"
 P = "${PN}-${PV}"
 
-EXTENDPRAUTO = "${@['.${PRAUTO\x7d',''][d.getVar('PRAUTO', True) is None]}"
+PRAUTO = ""
+EXTENDPRAUTO = "${@['.${PRAUTO}', ''][not d.getVar('PRAUTO', True)]}"
 PRAUTOINX = "${PF}"
 
 PKGV ?= "${PV}"
 PKGR ?= "${PR}${EXTENDPRAUTO}"
-PKGE ?= "${@['','${PE\x7d'][int(d.getVar('PE', True) or 0) > 0]}"
-EXTENDPKGEVER = "${@['','${PKGE\x7d:'][d.getVar('PKGE', True).strip() != '']}"
+PKGE ?= "${@['','${PE}'][int(d.getVar('PE', True) or 0) > 0]}"
+EXTENDPKGEVER = "${@['','${PKGE}:'][d.getVar('PKGE', True).strip() != '']}"
 EXTENDPKGV ?= "${EXTENDPKGEVER}${PKGV}-${PKGR}"
 
 # Base package name
@@ -300,13 +309,7 @@
 SECTION_${PN}-staticdev = "devel"
 RDEPENDS_${PN}-staticdev = "${PN}-dev (= ${EXTENDPKGV})"
 
-DOTDEBUG-dbg = "${bindir}/.debug ${sbindir}/.debug ${libexecdir}/.debug ${libdir}/.debug \
-            ${base_bindir}/.debug ${base_sbindir}/.debug ${base_libdir}/.debug ${libdir}/${BPN}/.debug \
-            ${libdir}/matchbox-panel/.debug ${libexecdir}/${BPN}/.debug /usr/src/debug"
-
-DEBUGFILEDIRECTORY-dbg = "/usr/lib/debug /usr/src/debug"
-
-FILES_${PN}-dbg = "${@d.getVar(['DOTDEBUG-dbg', 'DEBUGFILEDIRECTORY-dbg'][d.getVar('PACKAGE_DEBUG_SPLIT_STYLE', True) == 'debug-file-directory'], True)}"
+FILES_${PN}-dbg = "/usr/lib/debug /usr/src/debug"
 
 SECTION_${PN}-dbg = "devel"
 ALLOW_EMPTY_${PN}-dbg = "1"
@@ -477,7 +480,7 @@
 export BUILD_NM = "${BUILD_PREFIX}nm"
 
 export MAKE = "make"
-EXTRA_OEMAKE = "-e MAKEFLAGS="
+EXTRA_OEMAKE = ""
 EXTRA_OECONF = ""
 export LC_ALL = "C"
 
@@ -537,9 +540,6 @@
 #                         -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir} \
 #                         -Wl,-O1"
 
-# Which flags to leave by strip-flags() in bin/build/oebuild.sh ?
-ALLOWED_FLAGS = "-O -mcpu -march -pipe"
-
 # Pass parallel make options to the compile task
 EXTRA_OEMAKE_prepend_task-compile = "${PARALLEL_MAKE} "
 PARALLEL_MAKEINST ??= "${PARALLEL_MAKE}"
@@ -549,7 +549,12 @@
 ##################################################################
 # Optimization flags.
 ##################################################################
-DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types"
+DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types \
+                -fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
+                -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \
+                -fdebug-prefix-map=${STAGING_DIR_HOST}= \
+"
+
 # Disabled until the option works properly -feliminate-dwarf2-dups
 FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
 DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
@@ -567,7 +572,7 @@
 # Download locations and utilities.
 ##################################################################
 
-APACHE_MIRROR = "http://archive.apache.org/dist"
+APACHE_MIRROR = "http://www.eu.apache.org/dist/"
 DEBIAN_MIRROR = "ftp://ftp.debian.org/debian/pool"
 GENTOO_MIRROR = "http://distfiles.gentoo.org/distfiles"
 GNOME_GIT = "git://git.gnome.org"
@@ -612,7 +617,8 @@
 SRCDATE = "${DATE}"
 SRCREV ??= "INVALID"
 AUTOREV = "${@bb.fetch2.get_autorev(d)}"
-SRCPV = "${@bb.fetch2.get_srcrev(d)}"
+# Set Dynamically in base.bbclass
+# SRCPV = "${@bb.fetch2.get_srcrev(d)}"
 SRCPV[vardepvalue] = "${SRCPV}"
 
 SRC_URI = ""
@@ -632,16 +638,6 @@
 PREFERRED_PROVIDER_virtual/fakeroot-native ?= "pseudo-native"
 
 ##################################################################
-# Miscellaneous utilities.
-##################################################################
-
-# GNU patch tries to be intellgent about checking out read-only files from
-# a RCS, which freaks out those special folks with active Perforce clients
-# the following makes patch ignore RCS:
-
-export PATCH_GET="0"
-
-##################################################################
 # Not sure about the rest of this yet.
 ##################################################################
 
@@ -659,6 +655,8 @@
 export PKG_CONFIG_LIBDIR = "${PKG_CONFIG_DIR}"
 export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}"
 export PKG_CONFIG_DISABLE_UNINSTALLED = "yes"
+export PKG_CONFIG_SYSTEM_LIBRARY_PATH = "${base_libdir}:${libdir}"
+export PKG_CONFIG_SYSTEM_INCLUDE_PATH = "${includedir}"
 
 ###
 ### Config file processing
@@ -715,7 +713,13 @@
 DL_DIR ?= "${TOPDIR}/downloads"
 SSTATE_DIR ?= "${TOPDIR}/sstate-cache"
 IMAGE_FSTYPES ?= "tar.gz"
+
 INITRAMFS_FSTYPES ?= "cpio.gz"
+# The maximum size in Kbytes for the generated initramfs image size.
+# Usually, it should be less than 1/2 of ram size, or you may fail to
+# boot it.
+INITRAMFS_MAXSIZE ??= "131072"
+
 DEFAULT_TASK_PROVIDER ?= "packagegroup-base"
 MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
 
@@ -756,8 +760,8 @@
 EXTRA_IMAGE_FEATURES ??= ""
 IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
 
-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5"
-MACHINE_FEATURES_BACKFILL = "rtc"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"
+MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
 
 COMBINED_FEATURES = "${@oe.utils.set_intersect('DISTRO_FEATURES', 'MACHINE_FEATURES', d)}"
 COMBINED_FEATURES[vardeps] += "DISTRO_FEATURES MACHINE_FEATURES"
@@ -799,15 +803,18 @@
     USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
     PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
     CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX \
-    WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH"
+    WARN_QA ERROR_QA WORKDIR STAMPCLEAN PKGDATA_DIR BUILD_ARCH SSTATE_PKGARCH \
+    BB_WORKERCONTEXT"
 BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SSH_AGENT_PID \
     SSH_AUTH_SOCK PSEUDO_BUILD BB_ENV_EXTRAWHITE DISABLE_SANITY_CHECKS \
-    PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED"
+    PARALLEL_MAKE BB_NUMBER_THREADS BB_ORIGENV BB_INVALIDCONF BBINCLUDED \
+    GIT_PROXY_COMMAND ALL_PROXY all_proxy NO_PROXY no_proxy FTP_PROXY ftp_proxy \
+    HTTP_PROXY http_proxy HTTPS_PROXY https_proxy SOCKS5_USER SOCKS5_PASSWD"
 BB_SIGNATURE_EXCLUDE_FLAGS ?= "doc deps depends \
     lockfiles type vardepsexclude vardeps vardepvalue vardepvalueexclude \
     file-checksums python func task export unexport noexec nostamp dirs cleandirs \
     sstate-lockfile-shared prefuncs postfuncs export_func deptask rdeptask \
-    recrdeptask nodeprrecs stamp-base stamp-extra-info sstate-outputdirs"
+    recrdeptask nodeprrecs stamp-extra-info sstate-outputdirs filename lineno"
 
 MLPREFIX ??= ""
 MULTILIB_VARIANTS ??= ""
diff --git a/yocto-poky/meta/conf/conf-notes.txt b/yocto-poky/meta/conf/conf-notes.txt
index 66e6319..2f2932b 100644
--- a/yocto-poky/meta/conf/conf-notes.txt
+++ b/yocto-poky/meta/conf/conf-notes.txt
@@ -2,7 +2,6 @@
     core-image-minimal
     core-image-sato
     meta-toolchain
-    adt-installer
     meta-ide-support
 
 You can also run generated qemu images with a command like 'runqemu qemux86'
diff --git a/yocto-poky/meta/conf/distro/include/as-needed.inc b/yocto-poky/meta/conf/distro/include/as-needed.inc
index 4f249fd..114d377 100644
--- a/yocto-poky/meta/conf/distro/include/as-needed.inc
+++ b/yocto-poky/meta/conf/distro/include/as-needed.inc
@@ -6,11 +6,8 @@
 ASNEEDED_pn-distcc = ""
 ASNEEDED_pn-openobex = ""
 ASNEEDED_pn-icu = ""
-ASNEEDED_pn-xserver-kdrive-xomap = ""
-ASNEEDED_pn-minimo = ""
 ASNEEDED_pn-pciutils = ""
 ASNEEDED_pn-puzzles = ""
-ASNEEDED_pn-dialer = ""
 ASNEEDED_pn-pulseaudio = ""
 ASNEEDED_pn-rpm = ""
 
diff --git a/yocto-poky/meta/conf/distro/include/default-distrovars.inc b/yocto-poky/meta/conf/distro/include/default-distrovars.inc
index 8366904..fac4deb 100644
--- a/yocto-poky/meta/conf/distro/include/default-distrovars.inc
+++ b/yocto-poky/meta/conf/distro/include/default-distrovars.inc
@@ -7,6 +7,7 @@
 IMAGE_LINGUAS ?= "en-us en-gb"
 ENABLE_BINARY_LOCALE_GENERATION ?= "1"
 LOCALE_UTF8_ONLY ?= "0"
+LOCALE_UTF8_IS_DEFAULT ?= "1"
 
 DISTRO_FEATURES_DEFAULT ?= "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11"
 DISTRO_FEATURES_LIBC_DEFAULT ?= "ipv4 ipv6 libc-backtrace libc-big-macros libc-bsd libc-cxx-tests libc-catgets libc-charsets libc-crypt \
@@ -21,18 +22,13 @@
 
 IMAGE_FEATURES ?= ""
 
-# This is a list of packages that are used by the build system to build the distribution, they are not
-# directly part of the distribution. 
-HOSTTOOLS_WHITELIST_GPL-3.0 ?= ""
-WHITELIST_GPL-3.0 ?= "less"
-LGPLv2_WHITELIST_GPL-3.0 ?= "libassuan gnutls libtasn1 libidn"
+WHITELIST_GPL-3.0 ?= ""
+LGPLv2_WHITELIST_GPL-3.0 ?= "libidn"
 
 COMMERCIAL_AUDIO_PLUGINS ?= ""
 # COMMERCIAL_AUDIO_PLUGINS ?= "gst-plugins-ugly-mad gst-plugins-ugly-mpegaudioparse"
 COMMERCIAL_VIDEO_PLUGINS ?= ""
 # COMMERCIAL_VIDEO_PLUGINS ?= "gst-plugins-ugly-mpeg2dec gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
-COMMERCIAL_QT ?= ""
-# COMMERCIAL_QT ?= "qmmp"
 # Set of common licenses used for license.bbclass
 COMMON_LICENSE_DIR ??= "${COREBASE}/meta/files/common-licenses"
 
diff --git a/yocto-poky/meta/conf/distro/include/default-providers.inc b/yocto-poky/meta/conf/distro/include/default-providers.inc
index 9f84d5c..ece4d8b 100644
--- a/yocto-poky/meta/conf/distro/include/default-providers.inc
+++ b/yocto-poky/meta/conf/distro/include/default-providers.inc
@@ -13,7 +13,10 @@
 PREFERRED_PROVIDER_virtual/update-alternatives ?= "opkg-utils"
 PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-utils-native"
 PREFERRED_PROVIDER_virtual/libx11 ?= "libx11"
+PREFERRED_PROVIDER_virtual/base-utils ?= "busybox"
 PREFERRED_PROVIDER_xf86-video-intel ?= "xf86-video-intel"
+PREFERRED_PROVIDER_virtual/make ?= "make"
+PREFERRED_PROVIDER_virtual/make-native ?= "make-native"
 
 #
 # Default virtual runtime providers
@@ -23,6 +26,8 @@
 VIRTUAL-RUNTIME_alsa-state ?= "alsa-state"
 VIRTUAL-RUNTIME_getopt ?= "util-linux-getopt"
 VIRTUAL-RUNTIME_wireless-tools ?= "iw wireless-tools"
+VIRTUAL-RUNTIME_base-utils ?= "busybox"
+VIRTUAL-RUNTIME_base-utils-hwclock ?= "busybox-hwclock"
 
 #
 # Default recipe providers
@@ -40,12 +45,12 @@
 PREFERRED_PROVIDER_nativesdk-opkg ?= "nativesdk-opkg"
 PREFERRED_PROVIDER_console-tools ?= "kbd"
 PREFERRED_PROVIDER_gzip-native ?= "pigz-native"
-PREFERRED_PROVIDER_make ?= "make"
-PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','udev',d)}"
-# There are issues with runtime packages and PREFERRED_PROVIDER, see YOCTO #5044 for details
-# on this rather strange entry.
-PREFERRED_PROVIDER_bluez4 ?= "${@bb.utils.contains('DISTRO_FEATURES','bluetooth bluez5','bluez5','bluez4',d)}"
-PREFERRED_PROVIDER_bluez-hcidump ?= "${@bb.utils.contains('DISTRO_FEATURES','bluetooth bluez5','bluez5','bluez-hcidump',d)}"
+PREFERRED_PROVIDER_udev ?= "${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd','eudev',d)}"
+PREFERRED_RPROVIDER_libasound-module-bluez ?= "${@bb.utils.contains('DISTRO_FEATURES','bluetooth bluez5','bluez5','bluez4',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"
+PREFERRED_PROVIDER_openssl ?= "openssl"
+PREFERRED_PROVIDER_openssl-native ?= "openssl-native"
+PREFERRED_PROVIDER_nativesdk-openssl ?= "nativesdk-openssl"
diff --git a/yocto-poky/meta/conf/distro/include/default-versions.inc b/yocto-poky/meta/conf/distro/include/default-versions.inc
index 573063e..a04ea71 100644
--- a/yocto-poky/meta/conf/distro/include/default-versions.inc
+++ b/yocto-poky/meta/conf/distro/include/default-versions.inc
@@ -4,8 +4,8 @@
 
 # Force the python versions in one place
 PYTHON_BASEVERSION ?= "2.7"
-PREFERRED_VERSION_python ?= "2.7.9"
-PREFERRED_VERSION_python-native ?= "2.7.9"
+PREFERRED_VERSION_python ?= "2.7.11"
+PREFERRED_VERSION_python-native ?= "2.7.11"
 
 # Force the older version of liberation-fonts until we fix the fontforge issue
 PREFERRED_VERSION_liberation-fonts ?= "1.04"
diff --git a/yocto-poky/meta/conf/distro/include/distro_alias.inc b/yocto-poky/meta/conf/distro/include/distro_alias.inc
index ca333c8..c8f9395 100644
--- a/yocto-poky/meta/conf/distro/include/distro_alias.inc
+++ b/yocto-poky/meta/conf/distro/include/distro_alias.inc
@@ -9,9 +9,6 @@
 #
 # Please keep this list in alphabetical order.
 #
-DISTRO_PN_ALIAS_pn-aaina = "Intel"
-DISTRO_PN_ALIAS_pn-abiword-embedded = "Fedora=abiword Ubuntu=abiword"
-DISTRO_PN_ALIAS_pn-adt-installer = "Intel"
 DISTRO_PN_ALIAS_pn-alsa-state = "OE-Core"
 DISTRO_PN_ALIAS_pn-alsa-utils-alsaconf = "OE-Core"
 DISTRO_PN_ALIAS_pn-alsa-utils-scripts = "OE-Core"
@@ -23,9 +20,7 @@
 DISTRO_PN_ALIAS_pn-bigreqsproto = "Meego=xorg-x11-proto-bigreqsproto"
 DISTRO_PN_ALIAS_pn-bjam = "OpenSuSE=boost-jam Debina=bjam"
 DISTRO_PN_ALIAS_pn-blktool = "Debian=blktool Mandriva=blktool"
-DISTRO_PN_ALIAS_pn-bluez4 = "Ubuntu=bluez Debian=bluez-utils"
 DISTRO_PN_ALIAS_pn-bluez5 = "Fedora=bluez  Opensuse=bluez"
-DISTRO_PN_ALIAS_pn-bluez-dtl1-workaround = "OE-Core"
 DISTRO_PN_ALIAS_pn-bootchart2 = "Fedora=bootchart2 Opensuse=bootchart"
 DISTRO_PN_ALIAS_pn-btrfs-tools = "Debian=btrfs-tools Fedora=btrfs-progs"
 DISTRO_PN_ALIAS_pn-build-appliance-image = "OSPDT"
@@ -35,11 +30,6 @@
 DISTRO_PN_ALIAS_pn-calibrateproto = "OSPDT upstream=http://cgit.freedesktop.org/xorg/proto/calibrateproto"
 DISTRO_PN_ALIAS_pn-cdrtools = "OpenSUSE=cdrtools OSPDT"
 DISTRO_PN_ALIAS_pn-chkconfig-alternatives = "Mandriva=chkconfig Debian=chkconfig"
-DISTRO_PN_ALIAS_pn-claws-plugin-gtkhtml2-viewer = "Fedora=claws-mail-plugins OpenSuSE=claws-mail-extra-plugins Debian=claws-mail-extra-plugins"
-DISTRO_PN_ALIAS_pn-claws-plugin-maildir = "Fedora=claws-mail-plugins OpenSuSE=claws-mail-extra-plugins Debian=claws-mail-extra-plugins"
-DISTRO_PN_ALIAS_pn-claws-plugin-mailmbox = "Fedora=claws-mail-plugins OpenSuSE=claws-mail-extra-plugins Debian=claws-mail-extra-plugins"
-DISTRO_PN_ALIAS_pn-claws-plugin-rssyl = "Fedora=claws-mail-plugins OpenSuSE=claws-mail-extra-plugins Debian=claws-mail-extra-plugins"
-DISTRO_PN_ALIAS_pn-clipboard-manager = "OpenedHand"
 DISTRO_PN_ALIAS_pn-clutter = "Fedora=clutter OpenSuse=clutter Ubuntu=clutter-1.0 Mandriva=clutter Debian=clutter"
 DISTRO_PN_ALIAS_pn-clutter-1.8 = "Fedora=clutter OpenSuse=clutter Ubuntu=clutter-1.0 Mandriva=clutter Debian=clutter"
 DISTRO_PN_ALIAS_pn-clutter-gst-1.0 = "Debian=clutter-gst Ubuntu=clutter-gst Fedora=clutter-gst"
@@ -61,7 +51,6 @@
 DISTRO_PN_ALIAS_pn-core-image-kernel-dev = "OE-Core"
 DISTRO_PN_ALIAS_pn-core-image-lsb = "OE-Core"
 DISTRO_PN_ALIAS_pn-core-image-lsb-dev = "OE-Core"
-DISTRO_PN_ALIAS_pn-core-image-lsb-qt3 = "OE-Core"
 DISTRO_PN_ALIAS_pn-core-image-lsb-sdk = "OE-Core"
 DISTRO_PN_ALIAS_pn-core-image-minimal = "OE-Core"
 DISTRO_PN_ALIAS_pn-core-image-minimal-dev = "OE-Core"
@@ -83,7 +72,6 @@
 DISTRO_PN_ALIAS_pn-cwautomacros = "OSPDT upstream=http://cwautomacros.berlios.de/"
 DISTRO_PN_ALIAS_pn-damageproto = "Meego=xorg-x11-proto-damageproto"
 DISTRO_PN_ALIAS_pn-db = "Debian=db5.1 Ubuntu=db5.1"
-DISTRO_PN_ALIAS_pn-dbus-ptest = "Fedora=dbus Ubuntu=dbus"
 DISTRO_PN_ALIAS_pn-dbus-test = "Fedora=dbus Ubuntu=dbus"
 DISTRO_PN_ALIAS_pn-dbus-wait = "OpenedHand"
 DISTRO_PN_ALIAS_pn-depmodwrapper-cross = "OE-Core"
@@ -102,29 +90,17 @@
 DISTRO_PN_ALIAS_pn-dri3proto = "Fedora=dri3proto Opensuse=dri3proto-devel"
 DISTRO_PN_ALIAS_pn-dropbear = "Debian=dropbear Ubuntu=dropbear"
 DISTRO_PN_ALIAS_pn-dtc = "Fedora=dtc Ubuntu=dtc"
-DISTRO_PN_ALIAS_pn-eds-tools = "OpenedHand"
 DISTRO_PN_ALIAS_pn-eee-acpi-scripts = "Debian=eeepc-acpi-scripts Ubuntu=eeepc-acpi-scripts"
-DISTRO_PN_ALIAS_pn-eglibc = "OE-Core"
-DISTRO_PN_ALIAS_pn-eglibc-initial = "OE-Core"
-DISTRO_PN_ALIAS_pn-eglibc-locale = "OE-Core"
-DISTRO_PN_ALIAS_pn-eglibc-mtrace = "OE-Core"
-DISTRO_PN_ALIAS_pn-eglibc-scripts = "OE-Core"
 DISTRO_PN_ALIAS_pn-eglinfo-fb = "OE-Core"
 DISTRO_PN_ALIAS_pn-eglinfo-x11 = "OE-Core"
-DISTRO_PN_ALIAS_pn-emgd-driver-bin = "Intel"
 DISTRO_PN_ALIAS_pn-encodings = "Ubuntu=xfonts-encodings Mandriva=x11-font-encodings Debian=xfonts-encodings"
-DISTRO_PN_ALIAS_pn-evieext = "Meego=xorg-x11-proto-evieext Debian=x11proto-evie"
 DISTRO_PN_ALIAS_pn-fixesproto = "Meego=xorg-x11-proto-fixesproto"
 DISTRO_PN_ALIAS_pn-font-alias = "Fedora=xorg-x11-fonts-base Mandriva=x11-font-alias Meego=xorg-x11-fonts"
 DISTRO_PN_ALIAS_pn-fontcacheproto = "Meego=xorg-x11-proto-fontcacheproto"
 DISTRO_PN_ALIAS_pn-fontsproto = "Meego=xorg-x11-proto-fontsproto"
 DISTRO_PN_ALIAS_pn-font-util = "Meego=xorg-x11-font-utils Fedora=xorg-x11-font-utils Ubuntu=xfonts-utils Mandriva=x11-font-util Debian=xfonts-utils"
 DISTRO_PN_ALIAS_pn-formfactor = "OE-Core"
-DISTRO_PN_ALIAS_pn-fotowall = "Fedora=fotowall Ubuntu=fotowall"
 DISTRO_PN_ALIAS_pn-fstests = "OpenedHand"
-DISTRO_PN_ALIAS_pn-gail = "Fedora=gail Ubuntu=libgail-3-0"
-DISTRO_PN_ALIAS_pn-gaku = "OpenedHand"
-DISTRO_PN_ALIAS_pn-galago-daemon = "Debian=galago-daemon Ubuntu=galago-daemon"
 DISTRO_PN_ALIAS_pn-gcc-cross-initial = "OE-Core"
 DISTRO_PN_ALIAS_pn-gcc-cross-initial-i586 = "OE-Core"
 DISTRO_PN_ALIAS_pn-gcc-crosssdk-initial = "OE-Core"
@@ -161,7 +137,6 @@
 DISTRO_PN_ALIAS_pn-gtk-doc-stub = "Fedora=gtk-doc Ubuntu=gtk-doc"
 DISTRO_PN_ALIAS_pn-gtk-engines = "Fedora=gtk2-engines OpenSuSE=gtk2-engines Ubuntu=gtk2-engines Mandriva=gtk-engines2 Debian=gtk2-engines"
 DISTRO_PN_ALIAS_pn-gtk-sato-engine = "OpenedHand"
-DISTRO_PN_ALIAS_pn-gtk-theme-torturer = "OSPDT upstream=http://wiki.laptop.org/go/GTK_for_OLPC"
 DISTRO_PN_ALIAS_pn-gtk-icon-utils-native = "OSPDT"
 DISTRO_PN_ALIAS_pn-gummiboot = "Debian=gummiboot Fedora=gummiboot"
 DISTRO_PN_ALIAS_pn-hello-mod = "OE-Core"
@@ -196,20 +171,16 @@
 DISTRO_PN_ALIAS_pn-libcgroup = "Ubuntu=libcgroup1 Debian=libcgroup1"
 DISTRO_PN_ALIAS_pn-libcheck = "Ubuntu=check Fedora=check OpenSuSE=check"
 DISTRO_PN_ALIAS_pn-libclass-isa-perl = "OSPDT"
-DISTRO_PN_ALIAS_pn-libdrm-poulsbo = "Debian=libdrm-intel1 Ubuntu=libdrm-intel1"
 DISTRO_PN_ALIAS_pn-libdumpvalue-perl = "OSPDT"
 DISTRO_PN_ALIAS_pn-libenv-perl = "OSPDT"
 DISTRO_PN_ALIAS_pn-liberation-fonts = "Ubuntu=fonts-liberation Fedora=liberation-fonts-ttf"
 DISTRO_PN_ALIAS_pn-libfakekey = "Meego1.0=libfakekey Debian=libfakekey"
 DISTRO_PN_ALIAS_pn-libfile-checktree-perl = "OSPDT"
 DISTRO_PN_ALIAS_pn-libfm-extra = "Opensuse=libfm-extra4 Ubuntu=libfm-extra4"
-DISTRO_PN_ALIAS_pn-libfribidi = "OpenSuSE=fribidi Ubuntu=fribidi Mandriva=fribidi Debian=fribidi"
 DISTRO_PN_ALIAS_pn-libgcc = "Debian=libgcc4 Ubuntu=libgcc1 OpenSuSE=libgcc46"
 DISTRO_PN_ALIAS_pn-libgdbus = "Intel"
 DISTRO_PN_ALIAS_pn-libglade = "Meego=libglade2 Fedora=libglade2 OpenSuSE=libglade2 Ubuntu=libglade2 Mandriva=libglade2.0 Debian=libglade2"
 DISTRO_PN_ALIAS_pn-libglu = "Debian=libglu Ubuntu=libglu Opensuse=mesa-libglu"
-DISTRO_PN_ALIAS_pn-libgsmd = "Fedora=gsm Ubuntu=libgsm Debian=libgsm Opensuse=libgsm"
-DISTRO_PN_ALIAS_pn-libgtkstylus = "Debian=libgtkstylus Ubuntu=libgtkstylus"
 DISTRO_PN_ALIAS_pn-libgu = "OpenSuSE=glu OSPDT"
 DISTRO_PN_ALIAS_pn-libi18n-collate-perl = "OSPDT"
 DISTRO_PN_ALIAS_pn-libical = "Ubuntu=libical Fedora=libical"
@@ -217,7 +188,6 @@
 DISTRO_PN_ALIAS_pn-libinput = "Ubuntu=libinput0 Fedora=libinput0"
 DISTRO_PN_ALIAS_pn-libjson = "Ubuntu=libjson0-dev Debian=libjson0-dev"
 DISTRO_PN_ALIAS_pn-libksba = "Fedora=libksba Debian=libksba8 Ubuntu=libksba"
-DISTRO_PN_ALIAS_pn-liblbxutil = "Mandriva=liblbxutil OpenSuse=xorg-x11-devel"
 DISTRO_PN_ALIAS_pn-libmatchbox = "Ubuntu=libmatchbox Fedora=libmatchbox"
 DISTRO_PN_ALIAS_pn-libmpc = "Fedora=libmpc OpenSuse=libmpc2"
 DISTRO_PN_ALIAS_pn-libnewt = "Debian=libnewt0.52 Fedora=newt"
@@ -226,7 +196,6 @@
 DISTRO_PN_ALIAS_pn-libnss-mdns = "Meego=nss-mdns OpenSuSE=nss-mdns Ubuntu=nss-mdns Mandriva=nss_mdns Debian=nss-mdns"
 DISTRO_PN_ALIAS_pn-libomxil = "OSPDT upstream=http://omxil.sourceforge.net/"
 DISTRO_PN_ALIAS_pn-libowl = "Debian=owl OpenedHand"
-DISTRO_PN_ALIAS_pn-libowl-av = "OpenedHand"
 DISTRO_PN_ALIAS_pn-libpam = "Meego=pam Fedora=pam OpenSuSE=pam Ubuntu=pam Mandriva=pam Debian=pam"
 DISTRO_PN_ALIAS_pn-libpcre = "Mandriva=libpcre0 Fedora=pcre"
 DISTRO_PN_ALIAS_pn-libpng12 = "Debian=libpng12-0 Fedora=libpng"
@@ -236,23 +205,18 @@
 DISTRO_PN_ALIAS_pn-libsdl2 = "Fedora=sdl2 Opensuse=libsdl2 Ubuntu=libsdl2 Debian=libsdl2"
 DISTRO_PN_ALIAS_pn-libsndfile1 = "Meego=libsndfile Fedora=libsndfile OpenSuSE=libsndfile Ubuntu=libsndfile Mandriva=libsndfile Debian=libsndfile"
 DISTRO_PN_ALIAS_pn-libsoup-2.4 = "Meego=libsoup Fedora=libsoup OpenSuSE=libsoup Ubuntu=libsoup2.4 Mandriva=libsoup Debian=libsoup2.4"
-DISTRO_PN_ALIAS_pn-libsync = "OSPDT"
 DISTRO_PN_ALIAS_pn-libtelepathy = "Debian=libtelepathy2 Ubuntu=libtelepathy2"
 DISTRO_PN_ALIAS_pn-libtimedate-perl = "Debian=libtimedate-perl Ubuntu=libtimedate-perl"
 DISTRO_PN_ALIAS_pn-liburcu = "Fedora=userspace-rcu Ubuntu=liburcu0"
 DISTRO_PN_ALIAS_pn-libusb1 = "Debian=libusb-1.0-0 Fedora=libusb1"
 DISTRO_PN_ALIAS_pn-libusb-compat = "OSPDT"
 DISTRO_PN_ALIAS_pn-libx11 = "Debian=libx11-6 Fedora=libX11 Ubuntu=libx11-6 OpenSuSE=xorg-x11-libX11"
-DISTRO_PN_ALIAS_pn-libx11-diet = "Debian=libx11-6 Fedora=libX11 Ubuntu=libx11-6 OpenSuSE=xorg-x11-libX11"
 DISTRO_PN_ALIAS_pn-libxcalibrate = "OSPDT upstream=http://cgit.freedesktop.org/xorg/lib/libXCalibrate/"
-DISTRO_PN_ALIAS_pn-libxfontcache = "Mandriva=libxfontcache Debian=libxfontcache"
 DISTRO_PN_ALIAS_pn-libxft = "Mandriva=libxft Debian=libxft2 Ubuntu=libxft2"
 DISTRO_PN_ALIAS_pn-libxi = "Ubuntu=libxi Fedora=libXi"
 DISTRO_PN_ALIAS_pn-libxkbcommon = "Fedora=libxkbcommon Debian=libxkbcommon"
-DISTRO_PN_ALIAS_pn-libxprintapputil = "Debian=libxprintapputil Ubuntu=libxprintapputil1 Mandriva=libxprintapputil"
 DISTRO_PN_ALIAS_pn-libxscrnsaver = "Fedora=libXScrnSaver Ubuntu=libxss1 Mandriva=libxscrnsaver"
 DISTRO_PN_ALIAS_pn-libxsettings-client = "Debian=libxsettings-client0 Ubuntu=libxsettings-client0 Mandriva=libXsettings-client0"
-DISTRO_PN_ALIAS_pn-libxtrap = "Debian=libxtrap6 Fedora=libXTrap"
 DISTRO_PN_ALIAS_pn-libxxf86misc = "Mandriva=libxxf86misc Fedora=libXxf86misc"
 DISTRO_PN_ALIAS_pn-linux-dummy = "Intel"
 DISTRO_PN_ALIAS_pn-linux-firmware = "Fedora=linux-firmware Ubuntu=linux-firmware"
@@ -262,7 +226,6 @@
 DISTRO_PN_ALIAS_pn-linux-yocto-rt = "Debian=linux-base Ubuntu=linux"
 DISTRO_PN_ALIAS_pn-linux-yocto-tiny = "OSPDT"
 DISTRO_PN_ALIAS_pn-lsbinitscripts = "Windriver"
-DISTRO_PN_ALIAS_pn-lsbsetup = "Windriver"
 DISTRO_PN_ALIAS_pn-lsbtest = "Windriver"
 DISTRO_PN_ALIAS_pn-ltp = "Mandriva=ltp Ubuntu=ltp"
 DISTRO_PN_ALIAS_pn-lttng-modules = "OSPDT upstream=http://lttng.org/"
@@ -282,43 +245,33 @@
 DISTRO_PN_ALIAS_pn-matchbox-session-sato = "OpenedHand"
 DISTRO_PN_ALIAS_pn-matchbox-terminal = "OpenedHand"
 DISTRO_PN_ALIAS_pn-matchbox-theme-sato = "OpenedHand"
-DISTRO_PN_ALIAS_pn-matchbox-theme-sato-2 = "OpenedHand"
 DISTRO_PN_ALIAS_pn-matchbox-themes-extra = "Ubuntu=matchbox-themes-extra Mandriva=matchbox-themes-extra"
 DISTRO_PN_ALIAS_pn-matchbox-themes-gtk = "OpenedHand"
 DISTRO_PN_ALIAS_pn-matchbox-wm = "OpenedHand"
-DISTRO_PN_ALIAS_pn-matchbox-wm-2 = "Mandriva=matchbox-window-manager Debian=matchbox-window-manager"
 DISTRO_PN_ALIAS_pn-menu-cache = "OSPDT"
 DISTRO_PN_ALIAS_pn-mesa = "Fedora=mesa Ubuntu=libgl1-mesa-dri"
 DISTRO_PN_ALIAS_pn-mesa-gl = "Fedora=mesa Ubuntu=libgl1-mesa-dri"
-DISTRO_PN_ALIAS_pn-mesa-glsl = "Fedora=mesa Ubuntu=libgl1-mesa-dri"
 DISTRO_PN_ALIAS_pn-meta-environment-extsdk-qemux86 = "OE-Core"
 DISTRO_PN_ALIAS_pn-meta-environment-i586 = "OE-Core"
 DISTRO_PN_ALIAS_pn-meta-environment-qemux86 = "OE-Core"
 DISTRO_PN_ALIAS_pn-meta-environment-qemux86-64 = "OE-Core"
 DISTRO_PN_ALIAS_pn-meta-ide-support = "OE-Core"
 DISTRO_PN_ALIAS_pn-meta-toolchain = "OE-Core"
-DISTRO_PN_ALIAS_pn-meta-toolchain-qt = "OE-Core"
-DISTRO_PN_ALIAS_pn-meta-toolchain-qte = "OE-Core"
 DISTRO_PN_ALIAS_pn-mini-x-session = "OSPDT"
 DISTRO_PN_ALIAS_pn-mkelfimage = "Ubuntu=mkelfimage Fedora=mkelfimage"
 DISTRO_PN_ALIAS_pn-mkfontdir = "Mandriva=mkfontdir Ubuntu=xfonts-utils Fedora=xorg-x11-font-utils"
 DISTRO_PN_ALIAS_pn-mkfontscale = "Mandriva=mkfontscale Ubuntu=xfonts-utils Fedora=xorg-x11-font-utils"
 DISTRO_PN_ALIAS_pn-mktemp = "Mandriva=mktemp Fedora=mktemp"
 DISTRO_PN_ALIAS_pn-mmc-utils = "OE-Core"
-DISTRO_PN_ALIAS_pn-moblin-proto = "OE-Core"
-DISTRO_PN_ALIAS_pn-modutils-collateral = "OE-Core"
 DISTRO_PN_ALIAS_pn-modutils-initscripts = "OE-Core"
-DISTRO_PN_ALIAS_pn-msynctool = "OpenSuse=msynctool Mandriva=msynctool"
 DISTRO_PN_ALIAS_pn-mtd-utils = "Debian=mtd-utils Ubuntu=mtd-utils"
 DISTRO_PN_ALIAS_pn-mx-1.0 = "Ubuntu=mx Debian=mx Fedora=mx"
-DISTRO_PN_ALIAS_pn-n450-audio = "Intel"
 DISTRO_PN_ALIAS_pn-neard = "Intel"
 DISTRO_PN_ALIAS_pn-neon = "Fedora=neon Opensuse=neon"
 DISTRO_PN_ALIAS_pn-network-suspend-scripts = "OE-Core"
 DISTRO_PN_ALIAS_pn-nfs-export-root = "OpenedHand"
 DISTRO_PN_ALIAS_pn-npth = "OSPDT"
 DISTRO_PN_ALIAS_pn-nss-myhostname = "Meego=nss-mdns OpenSuSE=nss-mdns Ubuntu=nss-mdns Mandriva=nss_mdns Debian=nss-mdns"
-DISTRO_PN_ALIAS_pn-ocf-linux = "OSPDT"
 DISTRO_PN_ALIAS_pn-ofono = "Debian=ofono Ubuntu=ofono"
 DISTRO_PN_ALIAS_pn-oh-puzzles = "OpenedHand"
 DISTRO_PN_ALIAS_pn-opkg = "OSPDT upstream=http://svn.openmoko.org/trunk/src/tar"
@@ -331,7 +284,6 @@
 DISTRO_PN_ALIAS_pn-oprofileui = "Fedora=oprofileui Ubuntu=oprofile-gui Debian=oprofile-gui"
 DISTRO_PN_ALIAS_pn-oprofileui-server = "Fedora=oprofileui Ubuntu=oprofile-gui Debian=oprofile-gui"
 DISTRO_PN_ALIAS_pn-os-release = "OE-Core"
-DISTRO_PN_ALIAS_pn-owl-video = "OpenedHand"
 DISTRO_PN_ALIAS_pn-packagegroup-base = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-core = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-core-boot = "OE-Core"
@@ -343,8 +295,6 @@
 DISTRO_PN_ALIAS_pn-packagegroup-core-full-cmdline = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-core-lsb = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-core-nfs = "OE-Core"
-DISTRO_PN_ALIAS_pn-packagegroup-core-qt = "OE-Core"
-DISTRO_PN_ALIAS_pn-packagegroup-core-qt4e = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-core-sdk = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-core-ssh-dropbear = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-core-ssh-openssh = "OE-Core"
@@ -361,11 +311,6 @@
 DISTRO_PN_ALIAS_pn-packagegroup-cross-canadian-i586 = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-cross-canadian-qemux86 = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-cross-canadian-qemux86-64 = "OE-Core"
-DISTRO_PN_ALIAS_pn-packagegroup-qt4e = "OE-Core"
-DISTRO_PN_ALIAS_pn-packagegroup-qte-toolchain-host = "OE-Core"
-DISTRO_PN_ALIAS_pn-packagegroup-qte-toolchain-target = "Intel"
-DISTRO_PN_ALIAS_pn-packagegroup-qt-toolchain-host = "OE-Core"
-DISTRO_PN_ALIAS_pn-packagegroup-qt-toolchain-target = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-sdk-host = "OE-Core"
 DISTRO_PN_ALIAS_pn-packagegroup-self-hosted = "OE-Core"
 DISTRO_PN_ALIAS_pn-package-index = "OE-Core"
@@ -375,14 +320,12 @@
 DISTRO_PN_ALIAS_pn-pkgconfig = "Ubuntu=pkg-config Fedora=pkgconfig"
 DISTRO_PN_ALIAS_pn-pointercal = "OE-Core"
 DISTRO_PN_ALIAS_pn-pointercal-xinput = "OE-Core"
-DISTRO_PN_ALIAS_pn-poky-feed-config-opkg = "OE-Core"
 DISTRO_PN_ALIAS_pn-pong-clock = "OpenedHand"
 DISTRO_PN_ALIAS_pn-portmap = "Debian=rpcbind Fedora=rpcbind"
 DISTRO_PN_ALIAS_pn-postinst-intercept = "OE-Core"
 DISTRO_PN_ALIAS_pn-powertop = "Meego=powertop Fedora=powertop Debian=powertop OpenSuSE=powertop Mandriva=powertop"
 DISTRO_PN_ALIAS_pn-ppp-dialin = "OE-Core"
 DISTRO_PN_ALIAS_pn-presentproto = "Debian=x11proto-present-dev Fedora=xorg-x11-proto-devel"
-DISTRO_PN_ALIAS_pn-printproto = "Debian=x11proto-print-dev Ubuntu=x11proto-print-dev Mandriva=x11-proto-devel"
 DISTRO_PN_ALIAS_pn-pseudo = "Windriver"
 DISTRO_PN_ALIAS_pn-psplash = "OpenedHand"
 DISTRO_PN_ALIAS_pn-ptest-runner = "OE-Core"
@@ -392,8 +335,6 @@
 DISTRO_PN_ALIAS_pn-python3-distribute = "Debian=python3-setuptools Fedora=python3-setuptools"
 DISTRO_PN_ALIAS_pn-python3-pip = "OpenSuSE=python3-pip Debian=python3-pip"
 DISTRO_PN_ALIAS_pn-python3-setuptools = "OpenSuSE=python3-setuptools Debian=python3-setuptools"
-DISTRO_PN_ALIAS_pn-python-ZSI = "OE-Core"
-DISTRO_PN_ALIAS_pn-python-argparse = "Fedora=python-argparse OpenSuSE=python-argparse"
 DISTRO_PN_ALIAS_pn-python-dbus = "Ubuntu=python-dbus Debian=python-dbus Mandriva=python-dbus"
 DISTRO_PN_ALIAS_pn-python-distribute = "Opensuse=python-setuptools Fedora=python-setuptools"
 DISTRO_PN_ALIAS_pn-python-git = "Debian=python-git Fedora=GitPython"
@@ -402,7 +343,6 @@
 DISTRO_PN_ALIAS_pn-python-pycairo = "Meego=pycairo Fedora=pycairo Ubuntu=pycairo Debian=pycairo"
 DISTRO_PN_ALIAS_pn-python-pycurl = "Debian=python-pycurl Ubuntu=python-pycurl"
 DISTRO_PN_ALIAS_pn-python-pygobject = "Meego=pygobject2 Fedora=pygobject2 Ubuntu=pygobject Debian=pygobject"
-DISTRO_PN_ALIAS_pn-python-pygtk = "Debian=python-gtk2 Fedora=pygtk2 OpenSuSE=python-gtk"
 DISTRO_PN_ALIAS_pn-python-pyrex = "Mandriva=python-pyrex Ubuntu=python-pyrex"
 DISTRO_PN_ALIAS_pn-python-scons = "Fedora=scons OpenSuSE=scons Ubuntu=scons Mandriva=scons Debian=scons"
 DISTRO_PN_ALIAS_pn-python-setuptools = "Mandriva=python-setup OpenSuSE=python-setup-git"
@@ -411,15 +351,6 @@
 DISTRO_PN_ALIAS_pn-qemugl = "OpenedHand"
 DISTRO_PN_ALIAS_pn-qemu-helper = "OpenedHand"
 DISTRO_PN_ALIAS_pn-qemuwrapper-cross = "OE-Core"
-DISTRO_PN_ALIAS_pn-qmmp = "Fedora=qmmp Debian=qmmp"
-DISTRO_PN_ALIAS_pn-qt4 = "Mandriva=libqt4-devel Ubuntu=libqt4-dev"
-DISTRO_PN_ALIAS_pn-qt4e-demo-image = "OE-Core"
-DISTRO_PN_ALIAS_pn-qt4-embedded = "OSPDT"
-DISTRO_PN_ALIAS_pn-qt4-graphics-system = "OE-Core"
-DISTRO_PN_ALIAS_pn-qt4-tools = "Mandriva=libqt4-devel Ubuntu=libqt4-dev"
-DISTRO_PN_ALIAS_pn-qt4-x11-free = "Ubuntu=qt-x11-free Debian=qt-x11-free"
-DISTRO_PN_ALIAS_pn-qt-demo-init = "OE-Core"
-DISTRO_PN_ALIAS_pn-quicky = "OSPDT"
 DISTRO_PN_ALIAS_pn-randrproto = "Meego=xorg-x11-proto-randrproto"
 DISTRO_PN_ALIAS_pn-readline = "Fedora=readline Debian=readline-common"
 DISTRO_PN_ALIAS_pn-recordproto = "Meego=xorg-x11-proto-recordproto"
@@ -440,13 +371,10 @@
 DISTRO_PN_ALIAS_pn-sgmlspl = "Debian=sgmlspl Ubuntu=sgmlspl"
 DISTRO_PN_ALIAS_pn-shadow-securetty = "Ubuntu=shadow Fedora=shadow"
 DISTRO_PN_ALIAS_pn-shadow-sysroot = "Ubuntu=shadow Fedora=shadow"
-DISTRO_PN_ALIAS_pn-shasum = "OE-Core"
 DISTRO_PN_ALIAS_pn-shutdown-desktop = "OpenedHand"
-DISTRO_PN_ALIAS_pn-signgp = "OE-Core"
 DISTRO_PN_ALIAS_pn-speexdsp = "Ubuntu=libspeexdsp1 Fedora=speexdsp"
 DISTRO_PN_ALIAS_pn-stat = "Debian=coreutils Fedora=coreutils"
 DISTRO_PN_ALIAS_pn-stress = "Debian=stress Fedora=stress"
-DISTRO_PN_ALIAS_pn-swabber = "OE-Core"
 DISTRO_PN_ALIAS_pn-sysklogd = "Debian=sysklogd Mandriva=sysklogd"
 DISTRO_PN_ALIAS_pn-sysprof = "Fedora=sysprof Debian=sysprof"
 DISTRO_PN_ALIAS_pn-systemd-compat-units = "Fedora=systemd Ubuntu=systemd"
@@ -454,15 +382,11 @@
 DISTRO_PN_ALIAS_pn-systemd-systemdctl = "Fedora=systemd Ubuntu=systemd"
 DISTRO_PN_ALIAS_pn-systemtap-uprobes = "Ubuntu=systemtap Debian=systemtap"
 DISTRO_PN_ALIAS_pn-sysvinit-inittab = "OE-Core"
-DISTRO_PN_ALIAS_pn-table = "Intel"
 DISTRO_PN_ALIAS_pn-tar-replacement = "Fedora=tar Ubuntu=tar"
 DISTRO_PN_ALIAS_pn-tcf-agent = "Windriver upstream=http://www.eclipse.org/dsdp/tm/"
-DISTRO_PN_ALIAS_pn-telepathy-python = "Debian=telepathy-python Ubuntu=telepathy-python"
 DISTRO_PN_ALIAS_pn-texinfo-dummy-native = "OE-Core"
 DISTRO_PN_ALIAS_pn-tiny-init = "OSPDT"
-DISTRO_PN_ALIAS_pn-tinylogin = "Debian=busybox Ubuntu=busybox Mandriva=busybox"
 DISTRO_PN_ALIAS_pn-trace-cmd = "Mandriva=trace-cmd Ubuntu=trace-cmd"
-DISTRO_PN_ALIAS_pn-trapproto = "Meego=xorg-x11-proto-trapproto"
 DISTRO_PN_ALIAS_pn-tremor = "OSPDT upstream=http://www.xiph.org/vorbis/"
 DISTRO_PN_ALIAS_pn-tslib = "Debian=tslib Ubuntu=tslib"
 DISTRO_PN_ALIAS_pn-ttf-bitstream-vera = "Debian=ttf-bitstream-vera Ubuntu=ttf-bitstream-vera"
@@ -483,14 +407,12 @@
 DISTRO_PN_ALIAS_pn-waffle = "OE-Core"
 DISTRO_PN_ALIAS_pn-watchdog = "Debian=watchdog Ubuntu=watchdog Mandriva=watchdog"
 DISTRO_PN_ALIAS_pn-webkitgtk = "Fedora=webkitgtk Ubuntu=libwebkit"
-DISTRO_PN_ALIAS_pn-web-webkit = "OpenedHand"
 DISTRO_PN_ALIAS_pn-weston = "Fedora=weston OpenSuSE=weston"
 DISTRO_PN_ALIAS_pn-weston-init = "OE-Core"
 DISTRO_PN_ALIAS_pn-which = "Mandriva=which Fedora=which"
 DISTRO_PN_ALIAS_pn-wpa-supplicant = "Meego=wpa_supplicant Fedora=wpa_supplicant OpenSuSE=wpa_supplicant Ubuntu=wpasupplicant Mandriva=wpa_supplicant Debian=wpasupplicant"
 DISTRO_PN_ALIAS_pn-x11-common = "OE-Core"
 DISTRO_PN_ALIAS_pn-x11perf = "Fedora=xorg-x11-apps Ubuntu=x11-apps"
-DISTRO_PN_ALIAS_pn-x11vnc = "Fedora=x11vnc Ubuntu=x11vnc"
 DISTRO_PN_ALIAS_pn-xcb-util-image = "Debian=xcb-util Fedora=xcb-util"
 DISTRO_PN_ALIAS_pn-xcb-util-keysyms = "Debian=xcb-util Fedora=xcb-util"
 DISTRO_PN_ALIAS_pn-xcb-util-wm = "Debian=xcb-util Fedora=xcb-util"
@@ -509,7 +431,6 @@
 DISTRO_PN_ALIAS_pn-xf86-input-synaptics = "Meego=xorg-x11-drv-synaptics Fedora=xorg-x11-drv-synaptics Ubuntu=xserver-xorg-input-synaptics Mandriva=x11-driver-input-synaptics Debian=xfree86-driver-synaptics"
 DISTRO_PN_ALIAS_pn-xf86-input-vmmouse = "Fedora=xorg-x11-drv-vmmouse Ubuntu=xserver-xorg-input-vmmouse Mandriva=x11-driver-input-vmmouse Debian=xserver-xorg-input-vmmouse"
 DISTRO_PN_ALIAS_pn-xf86miscproto = "Meego=xorg-x11-proto-xf86miscproto"
-DISTRO_PN_ALIAS_pn-xf86rushproto = "Meego=xorg-x11-proto-xf86rushproto"
 DISTRO_PN_ALIAS_pn-xf86-video-cirrus = "Opensuse=xf86-video-cirrus Debian=xserver-xorg-video-cirrus"
 DISTRO_PN_ALIAS_pn-xf86-video-fbdev = "Ubuntu=xserver-xorg-video-fbdev Debian=xserver-xorg-video-fbdev"
 DISTRO_PN_ALIAS_pn-xf86-video-intel = "Debian=xserver-xorg-video-intel Fedora=xorg-x11-drv-intel Mandriva=x11-driver-video-intel Meego=xorg-x11-drv-intel Ubuntu=xserver-xorg-video-intel"
@@ -541,6 +462,3 @@
 DISTRO_PN_ALIAS_pn-xvideo-tests = "OpenedHand"
 DISTRO_PN_ALIAS_pn-xvinfo = "Fedora=xorg-x11-utils Ubuntu=x11-utils"
 DISTRO_PN_ALIAS_pn-xwininfo = "Fedora=xorg-x11-utils Ubuntu=x11-utils"
-DISTRO_PN_ALIAS_pn-yaffs2-utils = "OSPDT upstream=http://www.yaffs.net"
-DISTRO_PN_ALIAS_pn-zaurusd = "OpenedHand"
-DISTRO_PN_ALIAS_pn-zeroconf = "OSPDT upstream=http://www.progsoc.org/~wildfire/zeroconf/"
diff --git a/yocto-poky/meta/conf/distro/include/no-static-libs.inc b/yocto-poky/meta/conf/distro/include/no-static-libs.inc
new file mode 100644
index 0000000..13a7918
--- /dev/null
+++ b/yocto-poky/meta/conf/distro/include/no-static-libs.inc
@@ -0,0 +1,35 @@
+DISABLE_STATIC = " --disable-static"
+
+# qemu aborts on unrecognised option
+DISABLE_STATIC_pn-qemu = ""
+DISABLE_STATIC_pn-qemu-native = ""
+DISABLE_STATIC_pn-nativesdk-qemu = ""
+# pciutils fails build
+DISABLE_STATIC_pn-pciutils = ""
+# libcap aborts on unrecognised option
+DISABLE_STATIC_pn-libcap = ""
+DISABLE_STATIC_pn-libcap-native = ""
+DISABLE_STATIC_pn-nativesdk-libcap = ""
+# libpcap aborts on unrecognised option
+DISABLE_STATIC_pn-libpcap = ""
+# needed by gdb
+DISABLE_STATIC_pn-readline = ""
+# needed by pseudo
+DISABLE_STATIC_pn-sqlite3 = ""
+DISABLE_STATIC_pn-sqlite3-native = ""
+DISABLE_STATIC_pn-nativesdk-sqlite3 = ""
+# openjade/sgml-common have build issues without static libs
+DISABLE_STATIC_pn-sgml-common-native = ""
+DISABLE_STATIC_pn-openjade-native = ""
+# openssl has build issues without static libs
+DISABLE_STATIC_pn-openssl = ""
+DISABLE_STATIC_pn-openssl-native = ""
+DISABLE_STATIC_pn-nativesdk-openssl = ""
+# libssp-static-dev included in build-appliance
+DISABLE_STATIC_pn-gcc-runtime = ""
+# libusb1-native is used to build static dfu-util-native
+DISABLE_STATIC_pn-libusb1-native = ""
+
+EXTRA_OECONF_append = "${DISABLE_STATIC}"
+
+EXTRA_OECMAKE_append_pn-libical = "-DSHARED_ONLY=True"
diff --git a/yocto-poky/meta/conf/distro/include/package_regex.inc b/yocto-poky/meta/conf/distro/include/package_regex.inc
index d12999b..9fc1157 100644
--- a/yocto-poky/meta/conf/distro/include/package_regex.inc
+++ b/yocto-poky/meta/conf/distro/include/package_regex.inc
@@ -1,3 +1,5 @@
+# NOTE: THIS FILE IS DEPRECATED. Please add new entries to the recipes themselves.
+#
 # package_regex.inc - This file contains data that tracks
 # upstream project associated with a given recipe. This list is needed
 # for recipes that version information can not be automagically discovered.
@@ -7,272 +9,14 @@
 #"
 # The format is as a bitbake variable override for each recipe
 #"
-#       REGEX_URI_pn-<recipe name> = "recipe_url"
+#       UPSTREAM_CHECK_URI_pn-<recipe name> = "recipe_url"
 #	 - This is the url used by the package checking system to
 #	   get the latest version of the package
-#       REGEX_pn-<recipe name> = "package_regex"
+#       UPSTREAM_CHECK_REGEX_pn-<recipe name> = "package_regex"
 #	 - This is the regex the package checking system uses to
-#	   parse the page found at REGEX_URI_pn-<recipe name>
-#	GITTAGREGEX_pn-<recipe name> = "git_tag_regex"
+#	   parse the page found at UPSTREAM_CHECK_URI_pn-<recipe name>
+#	UPSTREAM_CHECK_GITTAGREGEX_pn-<recipe name> = "git_tag_regex"
 #	 - When source code is fetched from git, git tags are used to
 #	   determine the upstream release version. This regex can be used
 #	   to filter only relevant tags.
 #
-
-COMMON_REGEX = "(?P<pver>(\d+[\.\-_]*)+)"
-
-# Generic regex don't match
-REGEX_URI_pn-wireless-tools = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html"
-REGEX_pn-wireless-tools = "wireless_tools\.(?P<pver>(\d+)(\..*|))\.tar\.gz"
-
-REGEX_URI_pn-sqlite3="http://www.sqlite.org/"
-REGEX_pn-sqlite3="releaselog/${COMMON_REGEX}.html"
-
-REGEX_URI_pn-dhcp = "ftp://ftp.isc.org/isc/dhcp/"
-REGEX_pn-dhcp="(?P<pver>\d+\.\d+\.(\d+?))/"
-
-REGEX_pn-foomatic-filters = "foomatic-filters-(?P<pver>((\d|\d\d)\.*)+)\.tar\.gz"
-REGEX_pn-xdg-utils = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)"
-REGEX_pn-rpm="rpm-${COMMON_REGEX}-.*$"
-REGEX_pn-libtheora = "libtheora-(?P<pver>\d+(\.\d)+)\.(tar\.gz|tgz)"
-
-REGEX_pn-iputils="iputils-(?P<pver>s\d+).tar"
-REGEX_pn-nettle = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
-
-REGEX_pn-cairo = "cairo-(?P<pver>\d+(\.\d+)+)\.tar"
-REGEX_pn-cmake = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
-REGEX_pn-libsdl = "SDL-(?P<pver>\d+(\.\d+)+)\.tar"
-REGEX_pn-libxslt = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
-
-# Exclude NC versions which lack AES encryption
-REGEX_pn-db = "db-(?P<pver>\d+\.\d+(\.\d+)?).tar"
-
-REGEX_URI_pn-autogen = "http://ftp.gnu.org/gnu/autogen/"
-REGEX_pn-autogen = "rel(?P<pver>\d+(\.\d+)+)/"
-
-# python recipe is actually python 2.x
-# also, exclude pre-releases for both python 2.x and 3.x
-REGEX_pn-python = "[Pp]ython-(?P<pver>2(\.\d+)+).tar"
-REGEX_pn-python3 = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
-
-# exclude betas
-REGEX_pn-tiff = "tiff-(?P<pver>\d+(\.\d+)+).tar"
-
-# exclude version 5.5.2 which triggers a false positive
-REGEX_pn-unzip = "unzip(?P<pver>(?!552).+)\.tgz"
-# similar for zip
-REGEX_pn-zip = "^zip(?P<pver>(?!232).+)\.tgz"
-
-# Isn't possible to download with the default URI web server returns
-# (403, 404, 550)
-REGEX_URI_pn-dosfstools = "https://github.com/dosfstools/dosfstools/releases"
-REGEX_pn-json-c = "json-c-(?P<pver>\d+(\.\d+)+).tar"
-# json-c releases page is fetching the list of releases in some weird XML format
-# from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/
-#REGEX_URI_pn-json-c = "https://s3.amazonaws.com/json-c_releases/releases/index.html"
-REGEX_URI_pn-chrpath = "http://alioth.debian.org/frs/?group_id=31052"
-
-REGEX_URI_pn-powertop = "https://01.org/powertop/downloads"
-REGEX_URI_pn-libsamplerate0 = "http://www.mega-nerd.com/SRC/download.html"
-REGEX_URI_pn-libxkbcommon = "http://xkbcommon.org/"
-REGEX_URI_pn-tslib = "https://github.com/kergoth/tslib/releases"
-REGEX_URI_pn-waffle="http://www.waffle-gl.org/releases.html"
-REGEX_URI_pn-lrzsz = "http://ohse.de/uwe/software/lrzsz.html"
-REGEX_URI_pn-libacpi = "http://www.ngolde.de/libacpi.html"
-REGEX_URI_pn-less  = "http://www.greenwoodsoftware.com/less/download.html"
-REGEX_URI_pn-cups = "http://www.cups.org/software.php"
-REGEX_pn-cups = "cups-(?P<pver>\d+\.\d+(\.\d+)?)-source.tar"
-REGEX_URI_pn-bzip2 = "http://www.bzip.org/downloads.html"
-REGEX_URI_pn-minicom = "https://alioth.debian.org/frs/?group_id=30018"
-REGEX_URI_pn-sysstat = "http://sebastien.godard.pagesperso-orange.fr/download.html"
-REGEX_URI_pn-libical = "https://github.com/libical/libical/releases/"
-REGEX_URI_pn-libmpc = "http://www.multiprecision.org/index.php?prog=mpc&page=download"
-REGEX_URI_pn-taglib = "http://github.com/taglib/taglib/releases/"
-REGEX_URI_pn-libevent = "http://libevent.org/"
-REGEX_URI_pn-db = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
-REGEX_URI_pn-python-smartpm="https://launchpad.net/smart/trunk/"
-REGEX_URI_pn-lsof = "ftp://sunsite.ualberta.ca/pub/Mirror/lsof/"
-REGEX_URI_pn-pbzip2 = "http://compression.ca/pbzip2/"
-REGEX_URI_pn-quicky = "http://qt-apps.org/content/download.php?content=80325&id=1&tan=10417482"
-REGEX_URI_pn-libwebp = "http://downloads.webmproject.org/releases/webp/index.html"
-
-# The engine tries to use directory versioning but is a false-positive
-REGEX_URI_pn-intltool = "https://launchpad.net/intltool/trunk/"
-REGEX_URI_pn-libnfsidmap = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/"
-REGEX_URI_pn-mpfr = "http://www.mpfr.org/mpfr-current/"
-REGEX_URI_pn-nss = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
-REGEX_pn-nss = "NSS_(?P<pver>.+)_release_notes"
-
-REGEX_URI_pn-docbook-sgml-dtd-3.1 = "http://www.docbook.org/sgml/"
-REGEX_pn-docbook-sgml-dtd-3.1 = "(?P<pver>3\..+)/"
-REGEX_URI_pn-docbook-sgml-dtd-4.1 = "http://www.docbook.org/sgml/"
-REGEX_pn-docbook-sgml-dtd-4.1 = "(?P<pver>4\.1(\.\d+)*)/"
-
-# Qt recipes should be kept at 4.x
-REGEX_URI_pn-qt4-embedded = "http://download.qt.io/official_releases/qt/4.8/"
-REGEX_pn-qt4-embedded = "(?P<pver>\d+(\.\d+)+)/"
-REGEX_URI_pn-qt4-x11-free = "http://download.qt.io/official_releases/qt/4.8/"
-REGEX_pn-qt4-x11-free = "(?P<pver>\d+(\.\d+)+)/"
-REGEX_URI_pn-nativesdk-qt4-tools = "http://download.qt.io/official_releases/qt/4.8/"
-REGEX_pn-nativesdk-qt4-tools = "(?P<pver>\d+(\.\d+)+)/"
-REGEX_URI_pn-qt4-native = "http://download.qt.io/official_releases/qt/4.8/"
-REGEX_pn-qt4-native = "(?P<pver>\d+(\.\d+)+)/"
-
-# PyPI sites
-REGEX_URI_pn-python-nose = "https://pypi.python.org/pypi/nose/"
-REGEX_pn-python-nose = "/nose/${COMMON_REGEX}"
-# python-distribute 0.7.x is a simple compatibility layer that installs Setuptools 0.7+.
-# so we stick to 0.6.x series
-REGEX_URI_pn-python-distribute = "https://pypi.python.org/pypi/distribute/"
-REGEX_pn-python-distribute = "/distribute/(?P<pver>\d+.6.\d+)"
-REGEX_URI_pn-python-gitdb = "https://pypi.python.org/pypi/gitdb/"
-REGEX_URI_pn-python-async = "https://pypi.python.org/pypi/async/"
-REGEX_URI_pn-python-smmap = "https://pypi.python.org/pypi/smmap/"
-REGEX_pn-python-smmap = "/smmap/${COMMON_REGEX}"
-REGEX_URI_pn-python-git = "https://pypi.python.org/pypi/GitPython/"
-REGEX_pn-python-git = "/GitPython/${COMMON_REGEX}"
-REGEX_URI_pn-python-mako = "https://pypi.python.org/pypi/mako/"
-REGEX_pn-python-mako = "/Mako/${COMMON_REGEX}"
-REGEX_URI_pn-python-pexpect = "https://pypi.python.org/pypi/pexpect"
-REGEX_URI_pn-python3-pip = "https://pypi.python.org/pypi/pip"
-REGEX_URI_pn-python3-setuptools = "https://pypi.python.org/pypi/setuptools"
-
-# Sourceforge sites
-REGEX_URI_pn-python-scons = "http://sourceforge.net/projects/scons/files/scons/"
-REGEX_pn-python-scons = "/scons/${COMMON_REGEX}/"
-REGEX_URI_pn-expect = "http://sourceforge.net/projects/expect/files/Expect/"
-REGEX_pn-expect = "/Expect/${COMMON_REGEX}/"
-REGEX_URI_pn-docbook-xsl-stylesheets = "http://sourceforge.net/projects/docbook/files/docbook-xsl/"
-REGEX_pn-docbook-xsl-stylesheets = "/docbook-xsl/${COMMON_REGEX}/"
-REGEX_URI_pn-glew = "http://sourceforge.net/projects/glew/files/glew"
-REGEX_pn-glew = "/glew/${COMMON_REGEX}/"
-REGEX_URI_pn-menu-cache = "http://sourceforge.net/projects/lxde/files/menu-cache/1.0/"
-REGEX_URI_pn-x11vnc = "http://sourceforge.net/projects/libvncserver/files/x11vnc/"
-REGEX_pn-x11vnc = "/x11vnc/${COMMON_REGEX}/"
-REGEX_URI_pn-quota = "http://sourceforge.net/projects/linuxquota/files/quota-tools/"
-REGEX_pn-quota = "/quota-tools/${COMMON_REGEX}/"
-REGEX_URI_pn-lsb = "http://sourceforge.net/projects/lsb/files/lsb_release/"
-REGEX_pn-lsb = "/lsb_release/${COMMON_REGEX}/"
-REGEX_URI_pn-libpcre = "http://sourceforge.net/projects/pcre/files/pcre/"
-REGEX_pn-libpcre = "/pcre/${COMMON_REGEX}/"
-REGEX_URI_pn-libusb-compat = "http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/"
-REGEX_pn-libusb-compat = "/libusb-compat-${COMMON_REGEX}/$"
-REGEX_URI_pn-sysfsutils = "http://sourceforge.net/projects/linux-diag/files/sysfsutils/"
-REGEX_pn-sysfsutils = "/sysfsutils/${COMMON_REGEX}/"
-REGEX_URI_pn-console-tools = "http://sourceforge.net/projects/lct/files/console-tools-devel/"
-REGEX_pn-console-tools = "/console-tools-devel/(?P<pver>(\d\d?\.)+\d\d?)/"
-REGEX_URI_pn-watchdog = "http://sourceforge.net/projects/watchdog/files/watchdog/"
-REGEX_pn-watchdog = "/watchdog/${COMMON_REGEX}/"
-REGEX_URI_pn-cracklib = "http://sourceforge.net/projects/cracklib/files/cracklib/"
-REGEX_pn-cracklib = "/cracklib/${COMMON_REGEX}/"
-REGEX_URI_pn-gptfdisk = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/"
-REGEX_pn-gptfdisk = "/gptfdisk/${COMMON_REGEX}/"
-REGEX_URI_pn-libpng12 = "http://sourceforge.net/projects/libpng/files/libpng12/"
-REGEX_pn-libpng12 = "/libpng12/${COMMON_REGEX}/"
-REGEX_URI_pn-docbook-dsssl-stylesheets = "http://sourceforge.net/projects/docbook/files/docbook-dsssl/"
-REGEX_pn-docbook-dsssl-stylesheets = "/docbook-dsssl/${COMMON_REGEX}/"
-
-REGEX_URI_pn-openjade = "http://openjade.sourceforge.net/download.html"
-REGEX_URI_pn-libpfm4 = "http://sourceforge.net/projects/perfmon2/files/libpfm4/"
-REGEX_URI_pn-liba52 = "http://liba52.sourceforge.net/downloads.html"
-REGEX_URI_pn-mpeg2dec = "http://libmpeg2.sourceforge.net/downloads.html"
-REGEX_URI_pn-pcmanfm = "http://sourceforge.net/projects/pcmanfm/files/PCManFM%20%2B%20Libfm%20%28tarball%20release%29/PCManFM/"
-REGEX_URI_pn-libcgroup = "http://sourceforge.net/projects/libcg/files/libcgroup/"
-REGEX_URI_pn-cdrtools = "http://sourceforge.net/projects/cdrtools/files/alpha/"
-
-# GIT
-GITTAGREGEX_COMMON = "(?P<pver>\d+\.\d+(\.\d+)*)"
-
-GITTAGREGEX_pn-linux-yocto = "${GITTAGREGEX_COMMON}"
-GITTAGREGEX_pn-linux-yocto-tiny = "${GITTAGREGEX_COMMON}"
-GITTAGREGEX_pn-linux-yocto-dev = "${GITTAGREGEX_COMMON}"
-GITTAGREGEX_pn-uclibc = "${GITTAGREGEX_COMMON}"
-GITTAGREGEX_pn-glibc = "${GITTAGREGEX_COMMON}"
-GITTAGREGEX_pn-cross-localedef = "${GITTAGREGEX_COMMON}"
-GITTAGREGEX_pn-binutils = "binutils-(?P<pver>\d+_(\d_?)*)"
-GITTAGREGEX_pn-bootchart2 = "${GITTAGREGEX_COMMON}"
-GITTAGREGEX_pn-remake = "(?P<pver>(\d+(\.\d+)+)\+dbg.+)"
-GITTAGREGEX_pn-tcf-agent = "(?P<pver>(\d+(\.\d+)+))"
-GITTAGREGEX_pn-chkconfig-alternatives = "chkconfig-(?P<pver>(\d+(\.\d+)+))"
-GITTAGREGEX_pn-sgmlspl = "(?P<pver>(\d+(\.\d+)+))"
-
-# Exclude x.99.x versions
-GITTAGREGEX_pn-mx-1.0 = "(?P<pver>^\d+(\.(?!99)\d+)+)"
-
-# Blacklist a bogus tag
-GITTAGREGEX_pn-file = "FILE(?P<pver>(?!6_23).+)"
-GITTAGREGEX_pn-xinetd = "xinetd-(?P<pver>(?!20030122).+)"
-
-# Blacklist debian-specific tags
-GITTAGREGEX_pn-xf86-video-omapfb = "(?P<pver>\d+(\.\d+)+)(?!-)"
-
-# GNOME related.
-#
-# GNOME2_STABLE picks stable releases in the 2.x series (so not 2.90 onwards,
-# which were GNOME 3 betas.
-#
-# GNOME_STABLE picks the latest stable release.
-
-GNOME2_STABLE = "(?P<pver>2\.([0-8]*[02468])+(\.\d+)+)"
-GNOME_STABLE = "(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
-
-REGEX_pn-glib-2.0 = "${GNOME_STABLE}"
-REGEX_pn-atk = "${GNOME_STABLE}"
-REGEX_pn-at-spi2-core = "${GNOME_STABLE}"
-REGEX_pn-at-spi2-atk = "${GNOME_STABLE}"
-REGEX_pn-gdk-pixbuf = "${GNOME_STABLE}"
-REGEX_pn-pango = "${GNOME_STABLE}"
-REGEX_pn-gtk+ = "${GNOME2_STABLE}"
-REGEX_pn-gtk+3 = "${GNOME_STABLE}"
-REGEX_pn-gtk-engines = "${GNOME2_STABLE}"
-REGEX_pn-glib-networking = "${GNOME_STABLE}"
-REGEX_pn-librsvg = "${GNOME_STABLE}"
-REGEX_pn-libsoup-2.4 = "${GNOME_STABLE}"
-REGEX_pn-vala = "${GNOME_STABLE}"
-REGEX_pn-clutter-1.0 = "${GNOME_STABLE}"
-REGEX_pn-clutter-gtk-1.0 = "${GNOME_STABLE}"
-REGEX_pn-clutter-gst-3.0 = "${GNOME_STABLE}"
-REGEX_pn-cogl-1.0 = "${GNOME_STABLE}"
-REGEX_pn-adwaita-icon-theme = "${GNOME_STABLE}"
-REGEX_pn-vte = "${GNOME_STABLE}"
-REGEX_pn-epiphany = "${GNOME_STABLE}"
-REGEX_pn-webkitgtk = "${GNOME_STABLE}"
-REGEX_pn-p11-kit = "${GNOME_STABLE}"
-REGEX_pn-gnome-desktop3 = "${GNOME_STABLE}"
-
-# not GNOME related but uses same even-minor-release-is-stable logic
-REGEX_pn-dbus = "${GNOME_STABLE}"
-REGEX_pn-dbus-test = "${GNOME_STABLE}"
-
-# same logic applies to gstreamer releases
-REGEX_pn-gstreamer1.0 = "${GNOME_STABLE}"
-REGEX_pn-gstreamer1.0-libav = "${GNOME_STABLE}"
-REGEX_pn-gstreamer1.0-plugins-bad = "${GNOME_STABLE}"
-REGEX_pn-gstreamer1.0-plugins-base = "${GNOME_STABLE}"
-REGEX_pn-gstreamer1.0-plugins-good = "${GNOME_STABLE}"
-REGEX_pn-gstreamer1.0-plugins-ugly = "${GNOME_STABLE}"
-REGEX_pn-gstreamer1.0-rtsp-server = "${GNOME_STABLE}"
-
-# and perl
-REGEX_pn-perl = "${GNOME_STABLE}"
-
-# Keep old gcc versions at their major versions
-REGEX_pn-gcc-source-4.9.3 = "gcc-(?P<pver>4\.9\.\d+).tar"
-REGEX_pn-gcc-source-4.8.4 = "gcc-(?P<pver>4\.8\.\d+).tar"
-
-# these packages are 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
-REGEX_URI_pn-apt = "${DEBIAN_MIRROR}/main/a/apt/"
-REGEX_URI_pn-resolvconf = "${DEBIAN_MIRROR}/main/r/resolvconf/"
-REGEX_URI_pn-net-tools = "${DEBIAN_MIRROR}/main/n/net-tools/"
-
-# same for packages from launchpad
-REGEX_URI_pn-base-passwd = "${DEBIAN_MIRROR}/main/b/base-passwd/"
-
-# for these packages we're mostly interested in tracking debian patches,
-# and not in the upstream version where all development has effectively stopped
-DEBIAN_PATCH_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
-REGEX_pn-net-tools = "${DEBIAN_PATCH_REGEX}"
-REGEX_pn-apmd = "${DEBIAN_PATCH_REGEX}"
-REGEX_pn-blktool = "${DEBIAN_PATCH_REGEX}"
-REGEX_pn-mailx = "${DEBIAN_PATCH_REGEX}"
diff --git a/yocto-poky/meta/conf/distro/include/security_flags.inc b/yocto-poky/meta/conf/distro/include/security_flags.inc
index 14ac0bf..ff5f34e 100644
--- a/yocto-poky/meta/conf/distro/include/security_flags.inc
+++ b/yocto-poky/meta/conf/distro/include/security_flags.inc
@@ -9,14 +9,14 @@
 # -O0 which then results in a compiler warning.
 lcl_maybe_fortify = "${@base_conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
 
-SECURITY_CFLAGS ?= "-fstack-protector-all -pie -fpie ${lcl_maybe_fortify}"
-SECURITY_NO_PIE_CFLAGS ?= "-fstack-protector-all ${lcl_maybe_fortify}"
+SECURITY_CFLAGS ?= "-fstack-protector-strong -pie -fpie ${lcl_maybe_fortify}"
+SECURITY_NO_PIE_CFLAGS ?= "-fstack-protector-strong ${lcl_maybe_fortify}"
 
-SECURITY_LDFLAGS ?= "-Wl,-z,relro,-z,now"
-SECURITY_X_LDFLAGS ?= "-Wl,-z,relro"
+SECURITY_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro,-z,now"
+SECURITY_X_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro"
 
 # powerpc does not get on with pie for reasons not looked into as yet
-SECURITY_CFLAGS_powerpc = "-fstack-protector-all ${lcl_maybe_fortify}"
+SECURITY_CFLAGS_powerpc = "-fstack-protector-strong ${lcl_maybe_fortify}"
 # Deal with ppc specific linker failures when using the cflags
 SECURITY_CFLAGS_pn-dbus_powerpc = ""
 SECURITY_CFLAGS_pn-dbus-ptest_powerpc = ""
@@ -28,11 +28,7 @@
 SECURITY_CFLAGS_pn-beecrypt = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-blktrace = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-coreutils = "${SECURITY_NO_PIE_CFLAGS}"
-# Curl seems to check for FORTIFY_SOURCE in CFLAGS, but even assigned
-# to CPPFLAGS it gets picked into CFLAGS in bitbake.
-#TARGET_CPPFLAGS_pn-curl += "-D_FORTIFY_SOURCE=2"
 SECURITY_CFLAGS_pn-cups = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-curl = "-fstack-protector-all -pie -fpie"
 SECURITY_CFLAGS_pn-db = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-directfb = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-glibc = ""
@@ -43,8 +39,8 @@
 SECURITY_CFLAGS_pn-flac = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-flex = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-gcc = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-gcc-runtime = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-gcc-sanitizers = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-gcc-runtime = ""
+SECURITY_CFLAGS_pn-gcc-sanitizers = ""
 SECURITY_CFLAGS_pn-gdb = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-gmp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-gnutls = "${SECURITY_NO_PIE_CFLAGS}"
@@ -63,7 +59,7 @@
 SECURITY_CFLAGS_pn-iptables = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-libaio = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-libcap = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-libgcc = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-libgcc = ""
 SECURITY_CFLAGS_pn-libid3tag = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-libnewt = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-libglu = "${SECURITY_NO_PIE_CFLAGS}"
@@ -82,18 +78,30 @@
 SECURITY_CFLAGS_pn-python-smartpm = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python-numpy = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-python3 = "${SECURITY_NO_PIE_CFLAGS}"
+# Revert RPM to using internally supported values
+SECURITY_CFLAGS_pn-rpm = "${lcl_maybe_fortify} -fstack-protector"
+SECURITY_CFLAGS_pn-syslinux = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-tcl = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-tiff = "${SECURITY_NO_PIE_CFLAGS}"
-SECURITY_CFLAGS_pn-valgrind = "${SECURITY_NO_PIE_CFLAGS}"
+SECURITY_CFLAGS_pn-uclibc = ""
+SECURITY_CFLAGS_pn-uclibc-initial = ""
+SECURITY_CFLAGS_pn-valgrind = ""
 SECURITY_CFLAGS_pn-zlib = "${SECURITY_NO_PIE_CFLAGS}"
 
 # These 2 have text relco errors with the pie options enabled
 SECURITY_CFLAGS_pn-ltp = "${SECURITY_NO_PIE_CFLAGS}"
 SECURITY_CFLAGS_pn-pulseaudio = "${SECURITY_NO_PIE_CFLAGS}"
 
-TARGET_CFLAGS_append = " ${SECURITY_CFLAGS}"
-TARGET_LDFLAGS_append = " ${SECURITY_LDFLAGS}"
+TARGET_CFLAGS_append_class-target = " ${SECURITY_CFLAGS}"
+TARGET_LDFLAGS_append_class-target = " ${SECURITY_LDFLAGS}"
 
+SECURITY_LDFLAGS_remove_pn-gcc-runtime = "-fstack-protector-strong"
+SECURITY_LDFLAGS_remove_pn-gcc-sanitizers = "-fstack-protector-strong"
+SECURITY_LDFLAGS_remove_pn-glibc = "-fstack-protector-strong"
+SECURITY_LDFLAGS_remove_pn-glibc-initial = "-fstack-protector-strong"
+SECURITY_LDFLAGS_remove_pn-libgcc = "-fstack-protector-strong"
+SECURITY_LDFLAGS_remove_pn-uclibc = "-fstack-protector-strong"
+SECURITY_LDFLAGS_remove_pn-uclibc-initial = "-fstack-protector-strong"
 SECURITY_LDFLAGS_pn-xf86-video-fbdev = "${SECURITY_X_LDFLAGS}"
 SECURITY_LDFLAGS_pn-xf86-video-intel = "${SECURITY_X_LDFLAGS}"
 SECURITY_LDFLAGS_pn-xf86-video-omapfb = "${SECURITY_X_LDFLAGS}"
@@ -101,3 +109,5 @@
 SECURITY_LDFLAGS_pn-xf86-video-vesa = "${SECURITY_X_LDFLAGS}"
 SECURITY_LDFLAGS_pn-xf86-video-vmware = "${SECURITY_X_LDFLAGS}"
 SECURITY_LDFLAGS_pn-xserver-xorg = "${SECURITY_X_LDFLAGS}"
+
+TARGET_CC_ARCH_append_pn-binutils = " ${SECURITY_CFLAGS} ${SELECTED_OPTIMIZATION}"
diff --git a/yocto-poky/meta/conf/distro/include/tclibc-musl.inc b/yocto-poky/meta/conf/distro/include/tclibc-musl.inc
index 1ddd58e..e6b10f9 100644
--- a/yocto-poky/meta/conf/distro/include/tclibc-musl.inc
+++ b/yocto-poky/meta/conf/distro/include/tclibc-musl.inc
@@ -25,3 +25,7 @@
     musl-dbg \
     musl-dev \
     "
+
+# GLib binaries trigger assertion failures and crash under qemu
+# when musl is in use
+DISTRO_FEATURES_BACKFILL_CONSIDERED += "gobject-introspection-data"
diff --git a/yocto-poky/meta/conf/distro/include/tcmode-default.inc b/yocto-poky/meta/conf/distro/include/tcmode-default.inc
index f205524..c412420 100644
--- a/yocto-poky/meta/conf/distro/include/tcmode-default.inc
+++ b/yocto-poky/meta/conf/distro/include/tcmode-default.inc
@@ -17,18 +17,18 @@
 
 # Default libc config
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-for-gcc = "${TCLIBC}"
-PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc ?= "nativesdk-${TCLIBC}"
+PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc ?= "nativesdk-glibc"
 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial"
-PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial = "nativesdk-${TCLIBC}-initial"
+PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial ?= "nativesdk-glibc-initial"
 PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
 
-GCCVERSION ?= "5.%"
+GCCVERSION ?= "5.3%"
 SDKGCCVERSION ?= "${GCCVERSION}"
-BINUVERSION ?= "2.25%"
-GDBVERSION ?= "7.9%"
-GLIBCVERSION ?= "2.22"
-UCLIBCVERSION ?= "0.9.33+git%"
-LINUXLIBCVERSION ?= "4.1"
+BINUVERSION ?= "2.26%"
+GDBVERSION ?= "7.10%"
+GLIBCVERSION ?= "2.23"
+UCLIBCVERSION ?= "1.0%"
+LINUXLIBCVERSION ?= "4.4"
 
 PREFERRED_VERSION_gcc ?= "${GCCVERSION}"
 PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
diff --git a/yocto-poky/meta/conf/distro/include/world-broken.inc b/yocto-poky/meta/conf/distro/include/world-broken.inc
index ab0c2dc..a5f6371 100644
--- a/yocto-poky/meta/conf/distro/include/world-broken.inc
+++ b/yocto-poky/meta/conf/distro/include/world-broken.inc
@@ -2,4 +2,48 @@
 # Exclude known broken packages
 #
 
+# rt-tests needs PI mutex support in libc
+EXCLUDE_FROM_WORLD_pn-rt-tests_libc-musl = "1"
 
+# error: no member named 'sin_port' in 'struct sockaddr_in6'
+# this is due to libtirpc using ipv6 but portmap rpc expecting ipv4
+EXCLUDE_FROM_WORLD_pn-portmap_libc-musl = "1"
+EXCLUDE_FROM_WORLD_pn-unfs3_libc-musl = "1"
+
+# error: use of undeclared identifier '_STAT_VER'
+EXCLUDE_FROM_WORLD_pn-pseudo_libc-musl = "1"
+
+# error: Need to implement custom I/O
+EXCLUDE_FROM_WORLD_pn-libsolv_libc-musl = "1"
+
+# undefined reference to `pthread_tryjoin_np'
+EXCLUDE_FROM_WORLD_pn-btrfs-tools_libc-musl = "1"
+
+# error: error.h: No such file or directory
+EXCLUDE_FROM_WORLD_pn-prelink_libc-musl = "1"
+
+# error: use of undeclared identifier 'O_CREAT'
+EXCLUDE_FROM_WORLD_pn-libbsd_libc-musl = "1"
+
+# error: expected declaration specifiers before '__nonnull'
+EXCLUDE_FROM_WORLD_pn-lttng-ust_libc-musl = "1"
+EXCLUDE_FROM_WORLD_pn-lttng-tools_libc-musl = "1"
+
+# error: obstack.h: No such file or directory
+EXCLUDE_FROM_WORLD_pn-systemtap_libc-musl = "1"
+EXCLUDE_FROM_WORLD_pn-systemtap-uprobes_libc-musl = "1"
+
+# error: a parameter list without types is only allowed in a function definition
+#            void (*_function)(sigval_t);
+EXCLUDE_FROM_WORLD_pn-qemu_libc-musl = "1"
+
+# glibc specific funcrions
+# error: storage size of 'mi' isn't known struct mallinfo mi
+EXCLUDE_FROM_WORLD_pn-valgrind_libc-musl = "1"
+
+# error: format '%s' expects argument of type 'char *', but argument 4 has type 'int' [-Werror=format=]
+#   snprintf(buf, size, "%s", strerror_r(err, sbuf, sizeof(sbuf)));
+EXCLUDE_FROM_WORLD_pn-perf_libc-musl = "1"
+
+# error: 'RTLD_NEXT' was not declared in this scope
+EXCLUDE_FROM_WORLD_pn-gcc-sanitizers_libc-musl = "1"
diff --git a/yocto-poky/meta/conf/distro/include/yocto-uninative.inc b/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
new file mode 100644
index 0000000..85e613a
--- /dev/null
+++ b/yocto-poky/meta/conf/distro/include/yocto-uninative.inc
@@ -0,0 +1,11 @@
+#
+# This include points at uninative tarballs generated and maintained
+# by the Yocto Project. These file can be included by distros if they
+# want to use/maintain a unified sstate feed for native/cross artefacts
+# rather than the feeds having native/cross artefacts which are specific
+# to the distro running on the build machine.
+#
+
+UNINATIVE_URL = "http://downloads.yoctoproject.org/releases/uninative/0.95/"
+UNINATIVE_CHECKSUM[i686] ?= "5f27d7e0f4dd2ed80a7ff6a0d88af107b08e00765b31ed3aa180cc5ce15b0811"
+UNINATIVE_CHECKSUM[x86_64] ?= "26d46c61ad88cc245e31c88549717c0092a838d111b93ec169d88b08cc027581"
diff --git a/yocto-poky/meta/conf/documentation.conf b/yocto-poky/meta/conf/documentation.conf
index 845559a..4234d75 100644
--- a/yocto-poky/meta/conf/documentation.conf
+++ b/yocto-poky/meta/conf/documentation.conf
@@ -23,7 +23,6 @@
 do_diffconfig[doc] = "Compares the old and new config files after running do_menuconfig for the kernel"
 do_fetch[doc] = "Fetches the source code"
 do_fetchall[doc] = "Fetches all remote sources required to build a target"
-do_generate_qt_config_file[doc] = "Writes a qt.conf file for building a Qt-based application"
 do_install[doc] = "Copies files from the compilation directory to a holding area"
 do_install_ptest_base[doc] = "Copies the runtime test suite files from the compilation directory to a holding area"
 do_kernel_checkout[doc] = "Checks out source/meta branches for a linux-yocto style kernel"
@@ -91,8 +90,7 @@
 BBINCLUDELOGS[doc] = "Variable that controls how BitBake displays logs on build failure."
 BBINCLUDELOGS_LINES[doc] = "Amount of log lines printed on failure."
 BBLAYERS[doc] = "Lists the layers to enable during the build. This variable is defined in the bblayers.conf configuration file."
-BBLAYERS_NON_REMOVABLE[doc] = "Lists core layers that cannot be removed from the bblayers.conf file."
-BBMASK[doc] = "Prevents BitBake from processing specific recipes or recipe append files. Use the BBMASK variable from within conf/local.conf."
+BBMASK[doc] = "Prevents BitBake from processing specific recipes or recipe append files."
 BBPATH[doc] = "Used by BitBake to locate .bbclass and configuration files. This variable is analogous to the PATH variable."
 BBSERVER[doc] = "Points to the server that runs memory-resident BitBake."
 BINCONFIG_GLOB[doc] = "When inheriting binconfig.bbclass from a recipe, this variable specifies a wildcard for configuration scripts that need editing."
@@ -130,7 +128,7 @@
 DATE[doc] = "The date the build was started using YMD format."
 DATETIME[doc] = "The date and time the build was started."
 DEBUG_BUILD[doc] = "Specifies to build packages with debugging information. This influences the value of the SELECTED_OPTIMIZATION variable."
-DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-O -fno-omit-frame-pointer -g'."
+DEBUG_OPTIMIZATION[doc] = "The options to pass in TARGET_CFLAGS and CFLAGS when compiling a system for debugging. This variable defaults to '-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe'."
 DEFAULT_PREFERENCE[doc] = "Specifies a weak bias for recipe selection priority."
 DEPENDS[doc] = "Lists a recipe's build-time dependencies (i.e. other recipe files)."
 DEPLOY_DIR[doc] = "Points to the general area that the OpenEmbedded build system uses to place images, packages, SDKs and other output files that are ready to be used outside of the build system."
@@ -178,7 +176,7 @@
 FILESYSTEM_PERMS_TABLES[doc] = "Allows you to define your own file permissions settings table as part of your configuration for the packaging process."
 FONT_EXTRA_RDEPENDS[doc] = "When a recipe inherits the fontcache class, this variable specifies runtime dependencies for font packages. This variable defaults to 'fontconfig-utils'."
 FONT_PACKAGES[doc] = "When a recipe inherits the fontcache class, this variable identifies packages containing font files that need to be cached by Fontconfig."
-FULL_OPTIMIZATION[doc]= "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2'."
+FULL_OPTIMIZATION[doc]= "The options to pass in TARGET_CFLAGS and CFLAGS when compiling an optimized system. This variable defaults to '-O2 -pipe ${DEBUG_FLAGS}'."
 
 #G
 
@@ -267,6 +265,7 @@
 LINUX_KERNEL_TYPE[doc] = "Defines the kernel type to be used in assembling the configuration."
 LINUX_VERSION[doc] = "The Linux version from kernel.org on which the Linux kernel image being built using the OpenEmbedded build system is based. You define this variable in the kernel recipe."
 LINUX_VERSION_EXTENSION[doc] = "A string extension compiled into the version string of the Linux kernel built with the OpenEmbedded build system. You define this variable in the kernel recipe."
+LOCALE_UTF8_IS_DEFAULT[doc] = "If set, locale names are renamed such that those lacking an explicit encoding (e.g. en_US) will always be UTF-8, and non-UTF-8 encodings are renamed to, e.g., en_US.ISO-8859-1. Otherwise, the encoding is specified by glibc's SUPPORTED file. Not supported for precompiled locales."
 LOG_DIR[doc] = "Specifies the directory to which the OpenEmbedded build system writes overall log files. The default directory is ${TMPDIR}/log"
 
 #M
diff --git a/yocto-poky/meta/conf/layer.conf b/yocto-poky/meta/conf/layer.conf
index 9773632..10b98f5 100644
--- a/yocto-poky/meta/conf/layer.conf
+++ b/yocto-poky/meta/conf/layer.conf
@@ -9,14 +9,14 @@
 
 # This should only be incremented on significant changes that will
 # cause compatibility issues with other layers
-LAYERVERSION_core = "6"
+LAYERVERSION_core = "8"
 
 BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core"
 
 # Set a variable to get to the top of the metadata location
 COREBASE = '${@os.path.normpath("${LAYERDIR}/../")}'
 
-# opkg-utils is for update-altnernatives :(
+# opkg-utils is for update-alternatives :(
 SIGGEN_EXCLUDERECIPES_ABISAFE += " \
   sysvinit-inittab \
   shadow-securetty \
@@ -38,18 +38,20 @@
   shadow-sysroot \
   base-passwd \
   opkg-utils \
+  gstreamer1.0-meta-base \
 "
 
 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += " \
-  gcc-cross-${TARGET_ARCH}->virtual/libc \
+  gcc-cross-${TARGET_ARCH}->virtual/${TARGET_PREFIX}libc-for-gcc \
   gcc-cross-${TARGET_ARCH}->linux-libc-headers \
   ppp-dialin->ppp \
   resolvconf->bash \
   docbook-xsl-stylesheets->perl \
-  initramfs-framework->busybox \
+  initramfs-framework->${VIRTUAL-RUNTIME_base-utils} \
   initramfs-framework->systemd \
-  initramfs-framework->udev \
+  initramfs-framework->eudev \
   liberation-fonts->fontconfig \
+  cantarell-fonts->fontconfig \
   gnome-icon-theme->librsvg \
   font-alias->font-util \
   weston-init->weston \
diff --git a/yocto-poky/meta/conf/machine/include/arm/arch-arm.inc b/yocto-poky/meta/conf/machine/include/arm/arch-arm.inc
index 90b80c4..2e3127c 100644
--- a/yocto-poky/meta/conf/machine/include/arm/arch-arm.inc
+++ b/yocto-poky/meta/conf/machine/include/arm/arch-arm.inc
@@ -2,16 +2,15 @@
 TUNEVALID[bigendian] = "Enable big-endian mode."
 
 ARMPKGARCH = "${ARMPKGARCH_tune-${DEFAULTTUNE}}"
-ARMPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "b", "", d)}"
+ARMPKGSFX_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'b', '', d)}"
 ARMPKGSFX_FPU ??= ""
 ARMPKGSFX_DSP ??= ""
 ARMPKGSFX_EABI ??= ""
 ARMPKGSFX_THUMB ??= ""
 
-TUNE_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "armeb", "arm", d)}"
+TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'armeb', 'arm', d)}"
 TUNE_PKGARCH = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
 
 ABIEXTENSION = "eabi"
 
-TARGET_FPU = "${@d.getVar('ARMPKGSFX_FPU', True).strip('-') or 'soft'}"
-
+TARGET_FPU = "${@d.getVar('TUNE_CCARGS_MFLOAT', True) or 'soft'}"
diff --git a/yocto-poky/meta/conf/machine/include/arm/arch-arm64.inc b/yocto-poky/meta/conf/machine/include/arm/arch-arm64.inc
index 5376b87..9440698 100644
--- a/yocto-poky/meta/conf/machine/include/arm/arch-arm64.inc
+++ b/yocto-poky/meta/conf/machine/include/arm/arch-arm64.inc
@@ -4,33 +4,33 @@
 
 TUNEVALID[aarch64] = "Enable instructions for aarch64"
 
-MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}"
+MACHINEOVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', ':aarch64', '' ,d)}"
 
 # Little Endian base configs
 AVAILTUNES += "aarch64 aarch64_be"
 ARMPKGARCH_tune-aarch64 ?= "aarch64"
 ARMPKGARCH_tune-aarch64_be ?= "aarch64_be"
-TUNE_FEATURES_tune-aarch64 ?= "aarch64"
-TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian"
+TUNE_FEATURES_tune-aarch64 = "aarch64"
+TUNE_FEATURES_tune-aarch64_be = "${TUNE_FEATURES_tune-aarch64} bigendian"
 BASE_LIB_tune-aarch64 = "lib64"
 BASE_LIB_tune-aarch64_be = "lib64"
 
 PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64"
 PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be"
 
-ARMPKGSFX_ENDIAN_64 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}"
+ARMPKGSFX_ENDIAN_64 = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '_be', '', d)}"
 TUNE_ARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}"
 TUNE_PKGARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}"
 ABIEXTENSION_64 = ""
 TARGET_FPU_64 = ""
 
 # Duplicated from arch-arm.inc
-TUNE_ARCH_32 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "armeb", "arm", d)}"
+TUNE_ARCH_32 = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'armeb', 'arm', d)}"
 TUNE_PKGARCH_32 = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
 ABIEXTENSION_32 = "eabi"
-TARGET_FPU_32 = "${@d.getVar('ARMPKGSFX_FPU', True).strip('-') or 'soft'}"
+TARGET_FPU_32 = "${@d.getVar('TUNE_CCARGS_MFLOAT', True) or 'soft'}"
 
-TUNE_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TUNE_ARCH_64}", "${TUNE_ARCH_32}" ,d)}"
-TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TUNE_PKGARCH_64}", "${TUNE_PKGARCH_32}" ,d)}"
-ABIEXTENSION = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${ABIEXTENSION_64}", "${ABIEXTENSION_32}" ,d)}"
-TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TARGET_FPU_64}", "${TARGET_FPU_32}" ,d)}"
+TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TUNE_ARCH_64}', '${TUNE_ARCH_32}' ,d)}"
+TUNE_PKGARCH = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TUNE_PKGARCH_64}', '${TUNE_PKGARCH_32}' ,d)}"
+ABIEXTENSION = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${ABIEXTENSION_64}', '${ABIEXTENSION_32}' ,d)}"
+TARGET_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '${TARGET_FPU_64}', '${TARGET_FPU_32}' ,d)}"
diff --git a/yocto-poky/meta/conf/machine/include/arm/arch-armv4.inc b/yocto-poky/meta/conf/machine/include/arm/arch-armv4.inc
index 52c07a8..813ed15 100644
--- a/yocto-poky/meta/conf/machine/include/arm/arch-armv4.inc
+++ b/yocto-poky/meta/conf/machine/include/arm/arch-armv4.inc
@@ -2,33 +2,33 @@
 
 TUNEVALID[arm] = "Enable ARM instruction set"
 TUNEVALID[armv4] = "Enable instructions for ARMv4"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "armv4", " -march=armv4${ARMPKGSFX_THUMB}", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4${ARMPKGSFX_THUMB}', '', d)}"
 # enable --fix-v4bx when we have armv4 in TUNE_FEATURES, but then disable it when we have also armv5 or thumb
 # maybe we should extend bb.utils.contains to support check for any checkvalues in value, now it does 
 # checkvalues.issubset(val) which cannot be used for negative test of foo neither bar in value
-FIX_V4BX_ARMV4 = "${@bb.utils.contains("TUNE_FEATURES", "armv4", "--fix-v4bx", "", d)}"
-FIX_V4BX_ARMV5 = "${@bb.utils.contains("TUNE_FEATURES", "armv5", "", "${FIX_V4BX_ARMV4}", d)}"
-FIX_V4BX = "${@bb.utils.contains("TUNE_FEATURES", "thumb", "", "${FIX_V4BX_ARMV5}", d)}"
+FIX_V4BX_ARMV4 = "${@bb.utils.contains('TUNE_FEATURES', 'armv4', '--fix-v4bx', '', d)}"
+FIX_V4BX_ARMV5 = "${@bb.utils.contains('TUNE_FEATURES', 'armv5', '', '${FIX_V4BX_ARMV4}', d)}"
+FIX_V4BX = "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '', '${FIX_V4BX_ARMV5}', d)}"
 TARGET_LD_KERNEL_ARCH += "${FIX_V4BX}"
-MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "armv4", "armv4:", "" ,d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv4', 'armv4:', '' ,d)}"
 
 require conf/machine/include/arm/arch-arm.inc
 require conf/machine/include/arm/feature-arm-thumb.inc
 
 # Little Endian
 AVAILTUNES += "armv4 armv4t"
-ARMPKGARCH_tune-armv4 ?= "armv4"
+ARMPKGARCH_tune-armv4  ?= "armv4"
 ARMPKGARCH_tune-armv4t ?= "armv4"
-TUNE_FEATURES_tune-armv4 ?= "arm armv4"
-TUNE_FEATURES_tune-armv4t ?= "${TUNE_FEATURES_tune-armv4} thumb"
-PACKAGE_EXTRA_ARCHS_tune-armv4 = "arm armv4"
+TUNE_FEATURES_tune-armv4  = "arm armv4"
+TUNE_FEATURES_tune-armv4t = "${TUNE_FEATURES_tune-armv4} thumb"
+PACKAGE_EXTRA_ARCHS_tune-armv4  = "arm armv4"
 PACKAGE_EXTRA_ARCHS_tune-armv4t = "${PACKAGE_EXTRA_ARCHS_tune-armv4} armv4t"
 
 # Big Endian
 AVAILTUNES += "armv4b armv4tb"
-ARMPKGARCH_tune-armv4b ?= "armv4"
+ARMPKGARCH_tune-armv4b  ?= "armv4"
 ARMPKGARCH_tune-armv4tb ?= "armv4"
-TUNE_FEATURES_tune-armv4b ?= "${TUNE_FEATURES_tune-armv4} bigendian"
-TUNE_FEATURES_tune-armv4tb ?= "${TUNE_FEATURES_tune-armv4t} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv4b = "armeb armv4b"
+TUNE_FEATURES_tune-armv4b  = "${TUNE_FEATURES_tune-armv4}  bigendian"
+TUNE_FEATURES_tune-armv4tb = "${TUNE_FEATURES_tune-armv4t} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv4b  = "armeb armv4b"
 PACKAGE_EXTRA_ARCHS_tune-armv4tb = "${PACKAGE_EXTRA_ARCHS_tune-armv4b} armv4tb"
diff --git a/yocto-poky/meta/conf/machine/include/arm/arch-armv5-dsp.inc b/yocto-poky/meta/conf/machine/include/arm/arch-armv5-dsp.inc
index 524a62a..f204920 100644
--- a/yocto-poky/meta/conf/machine/include/arm/arch-armv5-dsp.inc
+++ b/yocto-poky/meta/conf/machine/include/arm/arch-armv5-dsp.inc
@@ -1,52 +1,52 @@
-ARMPKGSFX_DSP = "${@bb.utils.contains("TUNE_FEATURES", [ "armv5", "dsp" ], "e", "", d)}"
+ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'armv5', 'dsp' ], 'e', '', d)}"
 TUNEVALID[dsp] = "ARM DSP functionality"
 
 require conf/machine/include/arm/arch-armv5.inc
 
 # Little Endian
 AVAILTUNES += "armv5e armv5te"
-ARMPKGARCH_tune-armv5e ?= "armv5"
+ARMPKGARCH_tune-armv5e  ?= "armv5"
 ARMPKGARCH_tune-armv5te ?= "armv5"
-TUNE_FEATURES_tune-armv5e ?= "${TUNE_FEATURES_tune-armv5} dsp"
-TUNE_FEATURES_tune-armv5te ?= "${TUNE_FEATURES_tune-armv5t} dsp"
-PACKAGE_EXTRA_ARCHS_tune-armv5e = "${PACKAGE_EXTRA_ARCHS_tune-armv5} armv5e"
+TUNE_FEATURES_tune-armv5e  = "${TUNE_FEATURES_tune-armv5}  dsp"
+TUNE_FEATURES_tune-armv5te = "${TUNE_FEATURES_tune-armv5t} dsp"
+PACKAGE_EXTRA_ARCHS_tune-armv5e  = "${PACKAGE_EXTRA_ARCHS_tune-armv5}  armv5e"
 PACKAGE_EXTRA_ARCHS_tune-armv5te = "${PACKAGE_EXTRA_ARCHS_tune-armv5t} armv5e armv5te"
 
 # Little Endian + VFP/DSP
 AVAILTUNES += "armv5e-vfp armv5te-vfp armv5ehf-vfp armv5tehf-vfp"
-ARMPKGARCH_tune-armv5e-vfp ?= "armv5"
-ARMPKGARCH_tune-armv5te-vfp ?= "armv5"
-ARMPKGARCH_tune-armv5ehf-vfp ?= "armv5"
+ARMPKGARCH_tune-armv5e-vfp    ?= "armv5"
+ARMPKGARCH_tune-armv5te-vfp   ?= "armv5"
+ARMPKGARCH_tune-armv5ehf-vfp  ?= "armv5"
 ARMPKGARCH_tune-armv5tehf-vfp ?= "armv5"
-TUNE_FEATURES_tune-armv5e-vfp ?= "${TUNE_FEATURES_tune-armv5e} vfp"
-TUNE_FEATURES_tune-armv5te-vfp ?= "${TUNE_FEATURES_tune-armv5te} vfp"
-TUNE_FEATURES_tune-armv5ehf-vfp ?= "${TUNE_FEATURES_tune-armv5e-vfp} callconvention-hard"
-TUNE_FEATURES_tune-armv5tehf-vfp ?= "${TUNE_FEATURES_tune-armv5te-vfp} callconvention-hard"
-PACKAGE_EXTRA_ARCHS_tune-armv5e-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5-vfp} armv5e armv5e-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5te-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5t-vfp} armv5e armv5te armv5e-vfp armv5te-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5ehf-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5hf-vfp} armv5ehf-vfp"
+TUNE_FEATURES_tune-armv5e-vfp    = "${TUNE_FEATURES_tune-armv5e}      vfp"
+TUNE_FEATURES_tune-armv5te-vfp   = "${TUNE_FEATURES_tune-armv5te}     vfp"
+TUNE_FEATURES_tune-armv5ehf-vfp  = "${TUNE_FEATURES_tune-armv5e-vfp}  callconvention-hard"
+TUNE_FEATURES_tune-armv5tehf-vfp = "${TUNE_FEATURES_tune-armv5te-vfp} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-armv5e-vfp    = "${PACKAGE_EXTRA_ARCHS_tune-armv5-vfp}    armv5e armv5e-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5te-vfp   = "${PACKAGE_EXTRA_ARCHS_tune-armv5t-vfp}   armv5e armv5te armv5e-vfp armv5te-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5ehf-vfp  = "${PACKAGE_EXTRA_ARCHS_tune-armv5hf-vfp}  armv5ehf-vfp"
 PACKAGE_EXTRA_ARCHS_tune-armv5tehf-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5thf-vfp} armv5ehf-vfp armv5tehf-vfp"
 
 # Big Endian
 AVAILTUNES += "armv5eb armv5teb"
-ARMPKGARCH_tune-armv5eb ?= "armv5"
+ARMPKGARCH_tune-armv5eb  ?= "armv5"
 ARMPKGARCH_tune-armv5teb ?= "armv5"
-TUNE_FEATURES_tune-armv5eb ?= "${TUNE_FEATURES_tune-armv5e} bigendian"
-TUNE_FEATURES_tune-armv5teb ?= "${TUNE_FEATURES_tune-armv5te} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv5eb = "${PACKAGE_EXTRA_ARCHS_tune-armv5b} armv5eb"
+TUNE_FEATURES_tune-armv5eb  = "${TUNE_FEATURES_tune-armv5e}  bigendian"
+TUNE_FEATURES_tune-armv5teb = "${TUNE_FEATURES_tune-armv5te} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv5eb  = "${PACKAGE_EXTRA_ARCHS_tune-armv5b}  armv5eb"
 PACKAGE_EXTRA_ARCHS_tune-armv5teb = "${PACKAGE_EXTRA_ARCHS_tune-armv5tb} armv5eb armv5teb"
 
 # Big Endian + VFP/DSP
 AVAILTUNES += "armv5eb-vfp armv5teb-vfp armv5ehfb-vfp armv5tehfb-vfp"
-ARMPKGARCH_tune-armv5eb-vfp ?= "armv5"
-ARMPKGARCH_tune-armv5teb-vfp ?= "armv5"
-ARMPKGARCH_tune-armv5ehfb-vfp ?= "armv5"
+ARMPKGARCH_tune-armv5eb-vfp    ?= "armv5"
+ARMPKGARCH_tune-armv5teb-vfp   ?= "armv5"
+ARMPKGARCH_tune-armv5ehfb-vfp  ?= "armv5"
 ARMPKGARCH_tune-armv5tehfb-vfp ?= "armv5"
-TUNE_FEATURES_tune-armv5eb-vfp ?= "${TUNE_FEATURES_tune-armv5e-vfp} bigendian"
-TUNE_FEATURES_tune-armv5teb-vfp ?= "${TUNE_FEATURES_tune-armv5te-vfp} bigendian"
-TUNE_FEATURES_tune-armv5ehfb-vfp ?= "${TUNE_FEATURES_tune-armv5ehf-vfp} bigendian"
-TUNE_FEATURES_tune-armv5tehfb-vfp ?= "${TUNE_FEATURES_tune-armv5tehf-vfp} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv5eb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5b-vfp} armv5eb armv5eb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5teb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5tb-vfp} armv5eb armv5teb armv5eb-vfp armv5teb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5ehfb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5hfb-vfp} armv5ehfb-vfp"
+TUNE_FEATURES_tune-armv5eb-vfp    = "${TUNE_FEATURES_tune-armv5e-vfp}    bigendian"
+TUNE_FEATURES_tune-armv5teb-vfp   = "${TUNE_FEATURES_tune-armv5te-vfp}   bigendian"
+TUNE_FEATURES_tune-armv5ehfb-vfp  = "${TUNE_FEATURES_tune-armv5ehf-vfp}  bigendian"
+TUNE_FEATURES_tune-armv5tehfb-vfp = "${TUNE_FEATURES_tune-armv5tehf-vfp} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv5eb-vfp    = "${PACKAGE_EXTRA_ARCHS_tune-armv5b-vfp}  armv5eb armv5eb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5teb-vfp   = "${PACKAGE_EXTRA_ARCHS_tune-armv5tb-vfp} armv5eb armv5teb armv5eb-vfp armv5teb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5ehfb-vfp  = "${PACKAGE_EXTRA_ARCHS_tune-armv5hfb-vfp}  armv5ehfb-vfp"
 PACKAGE_EXTRA_ARCHS_tune-armv5tehfb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5thfb-vfp} armv5ehfb-vfp armv5tehfb-vfp"
diff --git a/yocto-poky/meta/conf/machine/include/arm/arch-armv5.inc b/yocto-poky/meta/conf/machine/include/arm/arch-armv5.inc
index 5cceafa..e6ff902 100644
--- a/yocto-poky/meta/conf/machine/include/arm/arch-armv5.inc
+++ b/yocto-poky/meta/conf/machine/include/arm/arch-armv5.inc
@@ -2,59 +2,56 @@
 
 TUNEVALID[armv5] = "Enable instructions for ARMv5"
 TUNECONFLICTS[armv5] = "armv4"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "armv5", " -march=armv5${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}", "", d)}"
-MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "armv5", "armv5:", "" ,d)}"
-
-ARMPKGSFX_DSP = "${@bb.utils.contains("TUNE_FEATURES", [ "armv5", "dsp" ], "e", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv5', ' -march=armv5${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv5', 'armv5:', '' ,d)}"
 
 require conf/machine/include/arm/arch-armv4.inc
 require conf/machine/include/arm/feature-arm-vfp.inc
 
 # Little Endian
 AVAILTUNES += "armv5 armv5t"
-ARMPKGARCH_tune-armv5 ?= "armv5"
+ARMPKGARCH_tune-armv5  ?= "armv5"
 ARMPKGARCH_tune-armv5t ?= "armv5"
-TUNE_FEATURES_tune-armv5 ?= "arm armv5"
-TUNE_FEATURES_tune-armv5t ?= "${TUNE_FEATURES_tune-armv5} thumb"
-PACKAGE_EXTRA_ARCHS_tune-armv5 = "${PACKAGE_EXTRA_ARCHS_tune-armv4} armv5"
+TUNE_FEATURES_tune-armv5  = "arm armv5"
+TUNE_FEATURES_tune-armv5t = "${TUNE_FEATURES_tune-armv5} thumb"
+PACKAGE_EXTRA_ARCHS_tune-armv5  = "${PACKAGE_EXTRA_ARCHS_tune-armv4}  armv5"
 PACKAGE_EXTRA_ARCHS_tune-armv5t = "${PACKAGE_EXTRA_ARCHS_tune-armv4t} armv5 armv5t"
 
 # Little Endian + VFP/DSP
 AVAILTUNES += "armv5-vfp armv5t-vfp armv5hf-vfp armv5thf-vfp"
-ARMPKGARCH_tune-armv5-vfp ?= "armv5"
-ARMPKGARCH_tune-armv5t-vfp ?= "armv5"
-ARMPKGARCH_tune-armv5hf-vfp ?= "armv5"
+ARMPKGARCH_tune-armv5-vfp    ?= "armv5"
+ARMPKGARCH_tune-armv5t-vfp   ?= "armv5"
+ARMPKGARCH_tune-armv5hf-vfp  ?= "armv5"
 ARMPKGARCH_tune-armv5thf-vfp ?= "armv5"
-TUNE_FEATURES_tune-armv5-vfp ?= "${TUNE_FEATURES_tune-armv5} vfp"
-TUNE_FEATURES_tune-armv5t-vfp ?= "${TUNE_FEATURES_tune-armv5t} vfp"
-TUNE_FEATURES_tune-armv5hf-vfp ?= "${TUNE_FEATURES_tune-armv5-vfp} callconvention-hard"
-TUNE_FEATURES_tune-armv5thf-vfp ?= "${TUNE_FEATURES_tune-armv5t-vfp} callconvention-hard"
-PACKAGE_EXTRA_ARCHS_tune-armv5-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5} armv5-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5t-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5t} armv5-vfp armv5t-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5hf-vfp = "armv5hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5thf-vfp = "armv5hf-vfp armv5thf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5tehf-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5thf-vfp} armv5ehf-vfp armv5tehf-vfp"
+TUNE_FEATURES_tune-armv5-vfp    = "${TUNE_FEATURES_tune-armv5}      vfp"
+TUNE_FEATURES_tune-armv5t-vfp   = "${TUNE_FEATURES_tune-armv5t}     vfp"
+TUNE_FEATURES_tune-armv5hf-vfp  = "${TUNE_FEATURES_tune-armv5-vfp}  callconvention-hard"
+TUNE_FEATURES_tune-armv5thf-vfp = "${TUNE_FEATURES_tune-armv5t-vfp} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-armv5-vfp     = "${PACKAGE_EXTRA_ARCHS_tune-armv5}  armv5-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5t-vfp    = "${PACKAGE_EXTRA_ARCHS_tune-armv5t} armv5-vfp armv5t-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5hf-vfp   = "armv5hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5thf-vfp  = "armv5hf-vfp armv5thf-vfp"
 
 # Big Endian
 AVAILTUNES += "armv5b armv5tb"
-ARMPKGARCH_tune-armv5b ?= "armv5"
+ARMPKGARCH_tune-armv5b  ?= "armv5"
 ARMPKGARCH_tune-armv5tb ?= "armv5"
-TUNE_FEATURES_tune-armv5b ?= "${TUNE_FEATURES_tune-armv5} bigendian"
-TUNE_FEATURES_tune-armv5tb ?= "${TUNE_FEATURES_tune-armv5t} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv5b = "${PACKAGE_EXTRA_ARCHS_tune-armv4b} armv5b"
+TUNE_FEATURES_tune-armv5b  = "${TUNE_FEATURES_tune-armv5}  bigendian"
+TUNE_FEATURES_tune-armv5tb = "${TUNE_FEATURES_tune-armv5t} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv5b  = "${PACKAGE_EXTRA_ARCHS_tune-armv4b}  armv5b"
 PACKAGE_EXTRA_ARCHS_tune-armv5tb = "${PACKAGE_EXTRA_ARCHS_tune-armv4tb} armv5b armv5tb"
 
 # Big Endian + VFP/DSP
 AVAILTUNES += "armv5b-vfp armv5tb-vfp armv5hfb-vfp armv5thfb-vfp"
-ARMPKGARCH_tune-armv5b-vfp ?= "armv5"
-ARMPKGARCH_tune-armv5tb-vfp ?= "armv5"
-ARMPKGARCH_tune-armv5hfb-vfp ?= "armv5"
+ARMPKGARCH_tune-armv5b-vfp    ?= "armv5"
+ARMPKGARCH_tune-armv5tb-vfp   ?= "armv5"
+ARMPKGARCH_tune-armv5hfb-vfp  ?= "armv5"
 ARMPKGARCH_tune-armv5thfb-vfp ?= "armv5"
-TUNE_FEATURES_tune-armv5b-vfp ?= "${TUNE_FEATURES_tune-armv5-vfp} bigendian"
-TUNE_FEATURES_tune-armv5tb-vfp ?= "${TUNE_FEATURES_tune-armv5t-vfp} bigendian"
-TUNE_FEATURES_tune-armv5hfb-vfp ?= "${TUNE_FEATURES_tune-armv5hf-vfp} bigendian"
-TUNE_FEATURES_tune-armv5thfb-vfp ?= "${TUNE_FEATURES_tune-armv5thf-vfp} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv5b-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5b} armv5b-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5tb-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5tb} armv5b-vfp armv5tb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv5hfb-vfp = "armv5hfb-vfp"
+TUNE_FEATURES_tune-armv5b-vfp    = "${TUNE_FEATURES_tune-armv5-vfp}    bigendian"
+TUNE_FEATURES_tune-armv5tb-vfp   = "${TUNE_FEATURES_tune-armv5t-vfp}   bigendian"
+TUNE_FEATURES_tune-armv5hfb-vfp  = "${TUNE_FEATURES_tune-armv5hf-vfp}  bigendian"
+TUNE_FEATURES_tune-armv5thfb-vfp = "${TUNE_FEATURES_tune-armv5thf-vfp} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv5b-vfp    = "${PACKAGE_EXTRA_ARCHS_tune-armv5b}  armv5b-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5tb-vfp   = "${PACKAGE_EXTRA_ARCHS_tune-armv5tb} armv5b-vfp armv5tb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv5hfb-vfp  = "armv5hfb-vfp"
 PACKAGE_EXTRA_ARCHS_tune-armv5thfb-vfp = "armv5hfb-vfp armv5thfb-vfp"
diff --git a/yocto-poky/meta/conf/machine/include/arm/arch-armv6.inc b/yocto-poky/meta/conf/machine/include/arm/arch-armv6.inc
index 4b0c5bf..4c93f2c 100644
--- a/yocto-poky/meta/conf/machine/include/arm/arch-armv6.inc
+++ b/yocto-poky/meta/conf/machine/include/arm/arch-armv6.inc
@@ -2,49 +2,49 @@
 
 TUNEVALID[armv6] = "Enable instructions for ARMv6"
 TUNECONFLICTS[armv6] = "armv4 armv5"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "armv6", " -march=armv6", "", d)}"
-MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "armv6", "armv6:", "" ,d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv6', ' -march=armv6', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv6', 'armv6:', '' ,d)}"
 
 require conf/machine/include/arm/arch-armv5-dsp.inc
 
 # Little Endian
 AVAILTUNES += "armv6-novfp armv6t-novfp armv6 armv6t armv6hf armv6thf"
-ARMPKGARCH_tune-armv6-novfp ?= "armv6"
+ARMPKGARCH_tune-armv6-novfp  ?= "armv6"
 ARMPKGARCH_tune-armv6t-novfp ?= "armv6"
-ARMPKGARCH_tune-armv6 ?= "armv6"
-ARMPKGARCH_tune-armv6t ?= "armv6"
-ARMPKGARCH_tune-armv6hf ?= "armv6"
-ARMPKGARCH_tune-armv6thf ?= "armv6"
-TUNE_FEATURES_tune-armv6-novfp ?= "arm armv6"
-TUNE_FEATURES_tune-armv6t-novfp ?= "${TUNE_FEATURES_tune-armv6-novfp} thumb"
-TUNE_FEATURES_tune-armv6 ?= "${TUNE_FEATURES_tune-armv6-novfp} vfp"
-TUNE_FEATURES_tune-armv6t ?= "${TUNE_FEATURES_tune-armv6t-novfp} vfp"
-TUNE_FEATURES_tune-armv6hf ?= "${TUNE_FEATURES_tune-armv6} callconvention-hard"
-TUNE_FEATURES_tune-armv6thf ?= "${TUNE_FEATURES_tune-armv6t} callconvention-hard"
-PACKAGE_EXTRA_ARCHS_tune-armv6-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5e} armv6"
+ARMPKGARCH_tune-armv6        ?= "armv6"
+ARMPKGARCH_tune-armv6t       ?= "armv6"
+ARMPKGARCH_tune-armv6hf      ?= "armv6"
+ARMPKGARCH_tune-armv6thf     ?= "armv6"
+TUNE_FEATURES_tune-armv6-novfp  = "arm armv6"
+TUNE_FEATURES_tune-armv6t-novfp = "${TUNE_FEATURES_tune-armv6-novfp}  thumb"
+TUNE_FEATURES_tune-armv6        = "${TUNE_FEATURES_tune-armv6-novfp}  vfp"
+TUNE_FEATURES_tune-armv6t       = "${TUNE_FEATURES_tune-armv6t-novfp} vfp"
+TUNE_FEATURES_tune-armv6hf      = "${TUNE_FEATURES_tune-armv6}        callconvention-hard"
+TUNE_FEATURES_tune-armv6thf     = "${TUNE_FEATURES_tune-armv6t}       callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-armv6-novfp  = "${PACKAGE_EXTRA_ARCHS_tune-armv5e}  armv6"
 PACKAGE_EXTRA_ARCHS_tune-armv6t-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5te} armv6 armv6t"
-PACKAGE_EXTRA_ARCHS_tune-armv6 = "${PACKAGE_EXTRA_ARCHS_tune-armv5e-vfp} armv6 armv6-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv6t = "${PACKAGE_EXTRA_ARCHS_tune-armv5te-vfp} armv6 armv6t armv6-vfp armv6t-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv6hf = "${PACKAGE_EXTRA_ARCHS_tune-armv5ehf-vfp} armv6hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv6thf = "${PACKAGE_EXTRA_ARCHS_tune-armv5tehf-vfp} armv6hf-vfp armv6thf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6        = "${PACKAGE_EXTRA_ARCHS_tune-armv5e-vfp}  armv6 armv6-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6t       = "${PACKAGE_EXTRA_ARCHS_tune-armv5te-vfp} armv6 armv6t armv6-vfp armv6t-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6hf      = "${PACKAGE_EXTRA_ARCHS_tune-armv5ehf-vfp}  armv6hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6thf     = "${PACKAGE_EXTRA_ARCHS_tune-armv5tehf-vfp} armv6hf-vfp armv6thf-vfp"
 
 # Big Endian
 AVAILTUNES += "armv6b-novfp armv6tb-novfp armv6b armv6tb armv6hfb armv6thfb"
-ARMPKGARCH_tune-armv6b-novfp ?= "armv6"
+ARMPKGARCH_tune-armv6b-novfp  ?= "armv6"
 ARMPKGARCH_tune-armv6tb-novfp ?= "armv6"
-ARMPKGARCH_tune-armv6b ?= "armv6"
-ARMPKGARCH_tune-armv6tb ?= "armv6"
-ARMPKGARCH_tune-armv6hfb ?= "armv6"
-ARMPKGARCH_tune-armv6thfb ?= "armv6"
-TUNE_FEATURES_tune-armv6b-novfp ?= "${TUNE_FEATURES_tune-armv6-novfp} bigendian"
-TUNE_FEATURES_tune-armv6tb-novfp ?= "${TUNE_FEATURES_tune-armv6t-novfp} bigendian"
-TUNE_FEATURES_tune-armv6b ?= "${TUNE_FEATURES_tune-armv6} bigendian"
-TUNE_FEATURES_tune-armv6tb ?= "${TUNE_FEATURES_tune-armv6t} bigendian"
-TUNE_FEATURES_tune-armv6hfb ?= "${TUNE_FEATURES_tune-armv6hf} bigendian"
-TUNE_FEATURES_tune-armv6thfb ?= "${TUNE_FEATURES_tune-armv6thf} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv6b-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5eb} armv6b"
+ARMPKGARCH_tune-armv6b        ?= "armv6"
+ARMPKGARCH_tune-armv6tb       ?= "armv6"
+ARMPKGARCH_tune-armv6hfb      ?= "armv6"
+ARMPKGARCH_tune-armv6thfb     ?= "armv6"
+TUNE_FEATURES_tune-armv6b-novfp  = "${TUNE_FEATURES_tune-armv6-novfp}  bigendian"
+TUNE_FEATURES_tune-armv6tb-novfp = "${TUNE_FEATURES_tune-armv6t-novfp} bigendian"
+TUNE_FEATURES_tune-armv6b =        "${TUNE_FEATURES_tune-armv6}        bigendian"
+TUNE_FEATURES_tune-armv6tb =       "${TUNE_FEATURES_tune-armv6t}       bigendian"
+TUNE_FEATURES_tune-armv6hfb =      "${TUNE_FEATURES_tune-armv6hf}      bigendian"
+TUNE_FEATURES_tune-armv6thfb =     "${TUNE_FEATURES_tune-armv6thf}     bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv6b-novfp  = "${PACKAGE_EXTRA_ARCHS_tune-armv5eb}  armv6b"
 PACKAGE_EXTRA_ARCHS_tune-armv6tb-novfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5teb} armv6b armv6tb"
-PACKAGE_EXTRA_ARCHS_tune-armv6b = "${PACKAGE_EXTRA_ARCHS_tune-armv5eb-vfp} armv6b armv6b-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv6tb = "${PACKAGE_EXTRA_ARCHS_tune-armv5teb-vfp} armv6b armv6tb armv6b-vfp armv6tb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv6hfb = "${PACKAGE_EXTRA_ARCHS_tune-armv5ehfb-vfp} armv6hfb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv6thfb = "${PACKAGE_EXTRA_ARCHS_tune-armv5tehfb-vfp} armv6hfb-vfp armv6thfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6b        = "${PACKAGE_EXTRA_ARCHS_tune-armv5eb-vfp}  armv6b armv6b-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6tb       = "${PACKAGE_EXTRA_ARCHS_tune-armv5teb-vfp} armv6b armv6tb armv6b-vfp armv6tb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6hfb      = "${PACKAGE_EXTRA_ARCHS_tune-armv5ehfb-vfp}  armv6hfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv6thfb     = "${PACKAGE_EXTRA_ARCHS_tune-armv5tehfb-vfp} armv6hfb-vfp armv6thfb-vfp"
diff --git a/yocto-poky/meta/conf/machine/include/arm/arch-armv7a.inc b/yocto-poky/meta/conf/machine/include/arm/arch-armv7a.inc
index d3b6f64..1f2e071 100644
--- a/yocto-poky/meta/conf/machine/include/arm/arch-armv7a.inc
+++ b/yocto-poky/meta/conf/machine/include/arm/arch-armv7a.inc
@@ -2,122 +2,140 @@
 
 TUNEVALID[armv7a] = "Enable instructions for ARMv7-a"
 TUNECONFLICTS[armv7a] = "armv4 armv5 armv6 armv7"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "armv7a", " -march=armv7-a", "", d)}"
-MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "armv7a", "armv7a:", "" ,d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', ' -march=armv7-a', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', 'armv7a:', '' ,d)}"
 
 require conf/machine/include/arm/arch-armv6.inc
 require conf/machine/include/arm/feature-arm-neon.inc
 
 # Little Endian base configs
-AVAILTUNES += "armv7a armv7at armv7a-vfpv3d16 armv7at-vfpv3d16 armv7a-vfpv3 armv7at-vfpv3 armv7a-neon armv7at-neon"
-ARMPKGARCH_tune-armv7a ?= "armv7a"
-ARMPKGARCH_tune-armv7at ?= "armv7a"
-ARMPKGARCH_tune-armv7a-vfpv3d16 ?= "armv7a"
-ARMPKGARCH_tune-armv7at-vfpv3d16 ?= "armv7a"
-ARMPKGARCH_tune-armv7a-vfpv3 ?= "armv7a"
-ARMPKGARCH_tune-armv7at-vfpv3 ?= "armv7a"
-ARMPKGARCH_tune-armv7a-neon?= "armv7a"
-ARMPKGARCH_tune-armv7at-neon ?= "armv7a"
-TUNE_FEATURES_tune-armv7a ?= "arm armv7a vfp"
-TUNE_FEATURES_tune-armv7at ?= "${TUNE_FEATURES_tune-armv7a} thumb"
-TUNE_FEATURES_tune-armv7a-vfpv3d16 ?= "${TUNE_FEATURES_tune-armv7a} vfpv3d16"
-TUNE_FEATURES_tune-armv7at-vfpv3d16 ?= "${TUNE_FEATURES_tune-armv7at} vfpv3d16"
-TUNE_FEATURES_tune-armv7a-vfpv3 ?= "${TUNE_FEATURES_tune-armv7a-vfpv3d16} vfpv3"
-TUNE_FEATURES_tune-armv7at-vfpv3 ?= "${TUNE_FEATURES_tune-armv7at-vfpv3d16} vfpv3"
-TUNE_FEATURES_tune-armv7a-neon ?= "${TUNE_FEATURES_tune-armv7a} neon"
-TUNE_FEATURES_tune-armv7at-neon ?= "${TUNE_FEATURES_tune-armv7at} neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7a = "${PACKAGE_EXTRA_ARCHS_tune-armv6} armv7a armv7a-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7a-vfp-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16} armv7a-vfp-vfpv3d16-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7a-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} armv7a-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7at = "${PACKAGE_EXTRA_ARCHS_tune-armv6t} armv7a armv7a-vfp armv7at2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfp-vfpv3d16 armv7at2-vfp-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16} armv7a-vfp-vfpv3d16-vfpv3 armv7at2-vfp-vfpv3d16-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7at-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfp-neon armv7at2-vfp-neon"
+AVAILTUNES += "armv7a armv7at armv7a-vfpv3d16 armv7at-vfpv3d16 armv7a-vfpv3 armv7at-vfpv3 armv7a-neon armv7at-neon armv7a-neon-vfpv4 armv7at-neon-vfpv4"
+ARMPKGARCH_tune-armv7a             ?= "armv7a"
+ARMPKGARCH_tune-armv7at            ?= "armv7a"
+ARMPKGARCH_tune-armv7a-vfpv3d16    ?= "armv7a"
+ARMPKGARCH_tune-armv7at-vfpv3d16   ?= "armv7a"
+ARMPKGARCH_tune-armv7a-vfpv3       ?= "armv7a"
+ARMPKGARCH_tune-armv7at-vfpv3      ?= "armv7a"
+ARMPKGARCH_tune-armv7a-neon        ?= "armv7a"
+ARMPKGARCH_tune-armv7at-neon       ?= "armv7a"
+ARMPKGARCH_tune-armv7a-neon-vfpv4  ?= "armv7a"
+ARMPKGARCH_tune-armv7at-neon-vfpv4 ?= "armv7a"
+TUNE_FEATURES_tune-armv7a             = "arm armv7a vfp"
+TUNE_FEATURES_tune-armv7at            = "${TUNE_FEATURES_tune-armv7a} thumb"
+TUNE_FEATURES_tune-armv7a-vfpv3d16    = "${TUNE_FEATURES_tune-armv7a}  vfpv3d16"
+TUNE_FEATURES_tune-armv7at-vfpv3d16   = "${TUNE_FEATURES_tune-armv7at} vfpv3d16"
+TUNE_FEATURES_tune-armv7a-vfpv3       = "${TUNE_FEATURES_tune-armv7a-vfpv3d16}  vfpv3"
+TUNE_FEATURES_tune-armv7at-vfpv3      = "${TUNE_FEATURES_tune-armv7at-vfpv3d16} vfpv3"
+TUNE_FEATURES_tune-armv7a-neon        = "${TUNE_FEATURES_tune-armv7a}  neon"
+TUNE_FEATURES_tune-armv7at-neon       = "${TUNE_FEATURES_tune-armv7at} neon"
+TUNE_FEATURES_tune-armv7a-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7a-neon}  vfpv4"
+TUNE_FEATURES_tune-armv7at-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7at-neon} vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7a             = "${PACKAGE_EXTRA_ARCHS_tune-armv6}  armv7a armv7a-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7at            = "${PACKAGE_EXTRA_ARCHS_tune-armv6t} armv7a armv7a-vfp armv7at2-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16    = "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  armv7a-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16   = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-vfpv3d16 armv7at2-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3       = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3d16}  armv7a-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3      = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3d16} armv7a-vfpv3 armv7at2-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7a-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  armv7a-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7at-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7a-neon armv7at2-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7a-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon}  armv7a-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7at-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} armv7a-neon-vfpv4 armv7at2-neon-vfpv4"
 
-# VFP Tunes
+# HF Tunes
 AVAILTUNES += "armv7ahf armv7athf armv7ahf-vfpv3d16 armv7athf-vfpv3d16 armv7ahf-vfpv3 armv7athf-vfpv3 armv7ahf-neon armv7athf-neon armv7ahf-neon-vfpv4 armv7athf-neon-vfpv4"
-ARMPKGARCH_tune-armv7ahf ?= "armv7a"
-ARMPKGARCH_tune-armv7athf ?= "armv7a"
-ARMPKGARCH_tune-armv7ahf-vfpv3d16 ?= "armv7a"
-ARMPKGARCH_tune-armv7athf-vfpv3d16 ?= "armv7a"
-ARMPKGARCH_tune-armv7ahf-vfpv3 ?= "armv7a"
-ARMPKGARCH_tune-armv7athf-vfpv3 ?= "armv7a"
-ARMPKGARCH_tune-armv7ahf-neon?= "armv7a"
-ARMPKGARCH_tune-armv7athf-neon ?= "armv7a"
-ARMPKGARCH_tune-armv7ahf-neon-vfpv4 ?= "armv7a"
+ARMPKGARCH_tune-armv7ahf             ?= "armv7a"
+ARMPKGARCH_tune-armv7athf            ?= "armv7a"
+ARMPKGARCH_tune-armv7ahf-vfpv3d16    ?= "armv7a"
+ARMPKGARCH_tune-armv7athf-vfpv3d16   ?= "armv7a"
+ARMPKGARCH_tune-armv7ahf-vfpv3       ?= "armv7a"
+ARMPKGARCH_tune-armv7athf-vfpv3      ?= "armv7a"
+ARMPKGARCH_tune-armv7ahf-neon        ?= "armv7a"
+ARMPKGARCH_tune-armv7athf-neon       ?= "armv7a"
+ARMPKGARCH_tune-armv7ahf-neon-vfpv4  ?= "armv7a"
 ARMPKGARCH_tune-armv7athf-neon-vfpv4 ?= "armv7a"
-TUNE_FEATURES_tune-armv7ahf ?= "${TUNE_FEATURES_tune-armv7a} callconvention-hard"
-TUNE_FEATURES_tune-armv7athf ?= "${TUNE_FEATURES_tune-armv7at} callconvention-hard"
-TUNE_FEATURES_tune-armv7ahf-vfpv3d16 ?= "${TUNE_FEATURES_tune-armv7a-vfpv3d16} callconvention-hard"
-TUNE_FEATURES_tune-armv7athf-vfpv3d16 ?= "${TUNE_FEATURES_tune-armv7at-vfpv3d16} callconvention-hard"
-TUNE_FEATURES_tune-armv7ahf-vfpv3 ?= "${TUNE_FEATURES_tune-armv7a-vfpv3} callconvention-hard"
-TUNE_FEATURES_tune-armv7athf-vfpv3 ?= "${TUNE_FEATURES_tune-armv7at-vfpv3} callconvention-hard"
-TUNE_FEATURES_tune-armv7ahf-neon ?= "${TUNE_FEATURES_tune-armv7a-neon} callconvention-hard"
-TUNE_FEATURES_tune-armv7athf-neon ?= "${TUNE_FEATURES_tune-armv7at-neon} callconvention-hard"
-TUNE_FEATURES_tune-armv7ahf-neon-vfpv4 ?= "${TUNE_FEATURES_tune-armv7ahf-neon} vfpv4"
-TUNE_FEATURES_tune-armv7athf-neon-vfpv4 ?= "${TUNE_FEATURES_tune-armv7athf-neon} vfpv4"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahf = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf} armv7ahf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7athf = "${PACKAGE_EXTRA_ARCHS_tune-armv6thf} armv7ahf-vfp armv7at2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7ahf-vfp-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7ahf-vfp-vfpv3d16 armv7at2hf-vfp-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3d16} armv7ahf-vfp-vfpv3d16-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3d16} armv7ahf-vfp-vfpv3d16-vfpv3 armv7at2hf-vfp-vfpv3d16-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7ahf-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7ahf-vfp-neon armv7at2hf-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} armv7ahf-vfp-neon-vfpv4"
-PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} armv7ahf-vfp-neon-vfpv4 armv7at2hf-vfp-neon-vfpv4"
+TUNE_FEATURES_tune-armv7ahf             = "${TUNE_FEATURES_tune-armv7a}             callconvention-hard"
+TUNE_FEATURES_tune-armv7athf            = "${TUNE_FEATURES_tune-armv7at}            callconvention-hard"
+TUNE_FEATURES_tune-armv7ahf-vfpv3d16    = "${TUNE_FEATURES_tune-armv7a-vfpv3d16}    callconvention-hard"
+TUNE_FEATURES_tune-armv7athf-vfpv3d16   = "${TUNE_FEATURES_tune-armv7at-vfpv3d16}   callconvention-hard"
+TUNE_FEATURES_tune-armv7ahf-vfpv3       = "${TUNE_FEATURES_tune-armv7a-vfpv3}       callconvention-hard"
+TUNE_FEATURES_tune-armv7athf-vfpv3      = "${TUNE_FEATURES_tune-armv7at-vfpv3}      callconvention-hard"
+TUNE_FEATURES_tune-armv7ahf-neon        = "${TUNE_FEATURES_tune-armv7a-neon}        callconvention-hard"
+TUNE_FEATURES_tune-armv7athf-neon       = "${TUNE_FEATURES_tune-armv7at-neon}       callconvention-hard"
+TUNE_FEATURES_tune-armv7ahf-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7a-neon-vfpv4}  callconvention-hard"
+TUNE_FEATURES_tune-armv7athf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7at-neon-vfpv4} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf             = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf}  armv7ahf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7athf            = "${PACKAGE_EXTRA_ARCHS_tune-armv6thf} armv7ahf-vfp armv7at2hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3d16    = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf}  armv7ahf-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3d16   = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7ahf-vfpv3d16 armv7at2hf-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3       = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3d16}  armv7ahf-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3      = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3d16} armv7ahf-vfpv3 armv7at2hf-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf}  armv7ahf-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7ahf-neon armv7at2hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon}  armv7ahf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} armv7ahf-neon-vfpv4 armv7at2hf-neon-vfpv4"
 
 # Big Endian
-AVAILTUNES += "armv7ab armv7atb armv7ab-vfpv3d16 armv7atb-vfpv3d16 armv7ab-vfpv3 armv7atb-vfpv3 armv7ab-neon armv7atb-neon"
-ARMPKGARCH_tune-armv7ab ?= "armv7a"
-ARMPKGARCH_tune-armv7atb ?= "armv7a"
-ARMPKGARCH_tune-armv7ab-vfpv3d16 ?= "armv7a"
-ARMPKGARCH_tune-armv7atb-vfpv3d16 ?= "armv7a"
-ARMPKGARCH_tune-armv7ab-vfpv3 ?= "armv7a"
-ARMPKGARCH_tune-armv7atb-vfpv3 ?= "armv7a"
-ARMPKGARCH_tune-armv7ab-neon?= "armv7a"
-ARMPKGARCH_tune-armv7atb-neon ?= "armv7a"
-TUNE_FEATURES_tune-armv7ab ?= "${TUNE_FEATURES_tune-armv7a} bigendian"
-TUNE_FEATURES_tune-armv7atb ?= "${TUNE_FEATURES_tune-armv7at} bigendian"
-TUNE_FEATURES_tune-armv7ab-vfpv3d16 ?= "${TUNE_FEATURES_tune-armv7a-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7atb-vfpv3d16 ?= "${TUNE_FEATURES_tune-armv7at-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7ab-vfpv3 ?= "${TUNE_FEATURES_tune-armv7a-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7atb-vfpv3 ?= "${TUNE_FEATURES_tune-armv7at-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7ab-neon ?= "${TUNE_FEATURES_tune-armv7a-neon} bigendian"
-TUNE_FEATURES_tune-armv7atb-neon ?= "${TUNE_FEATURES_tune-armv7at-neon} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv7ab = "${PACKAGE_EXTRA_ARCHS_tune-armv6b} armv7ab-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7atb = "${PACKAGE_EXTRA_ARCHS_tune-armv6tb} armv7ab-vfp armv7at2b-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7ab-vfp-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7atb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7ab-vfp-vfpv3d16 armv7at2b-vfp-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3d16} armv7ab-vfp-vfpv3d16-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7atb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3d16} armv7ab-vfp-vfpv3d16-vfpv3 armv7at2b-vfp-vfpv3d16-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab} armv7ab-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7atb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb} armv7ab-vfp-neon armv7at2b-vfp-neon"
+AVAILTUNES += "armv7ab armv7atb armv7ab-vfpv3d16 armv7atb-vfpv3d16 armv7ab-vfpv3 armv7atb-vfpv3 armv7ab-neon armv7atb-neon armv7ab-neon-vfpv4 armv7atb-neon-vfpv4"
+ARMPKGARCH_tune-armv7ab             ?= "armv7a"
+ARMPKGARCH_tune-armv7atb            ?= "armv7a"
+ARMPKGARCH_tune-armv7ab-vfpv3d16    ?= "armv7a"
+ARMPKGARCH_tune-armv7atb-vfpv3d16   ?= "armv7a"
+ARMPKGARCH_tune-armv7ab-vfpv3       ?= "armv7a"
+ARMPKGARCH_tune-armv7atb-vfpv3      ?= "armv7a"
+ARMPKGARCH_tune-armv7ab-neon        ?= "armv7a"
+ARMPKGARCH_tune-armv7atb-neon       ?= "armv7a"
+ARMPKGARCH_tune-armv7ab-neon-vfpv4  ?= "armv7a"
+ARMPKGARCH_tune-armv7atb-neon-vfpv4 ?= "armv7a"
+TUNE_FEATURES_tune-armv7ab             = "${TUNE_FEATURES_tune-armv7a}             bigendian"
+TUNE_FEATURES_tune-armv7atb            = "${TUNE_FEATURES_tune-armv7at}            bigendian"
+TUNE_FEATURES_tune-armv7ab-vfpv3d16    = "${TUNE_FEATURES_tune-armv7a-vfpv3d16}    bigendian"
+TUNE_FEATURES_tune-armv7atb-vfpv3d16   = "${TUNE_FEATURES_tune-armv7at-vfpv3d16}   bigendian"
+TUNE_FEATURES_tune-armv7ab-vfpv3       = "${TUNE_FEATURES_tune-armv7a-vfpv3}       bigendian"
+TUNE_FEATURES_tune-armv7atb-vfpv3      = "${TUNE_FEATURES_tune-armv7at-vfpv3}      bigendian"
+TUNE_FEATURES_tune-armv7ab-neon        = "${TUNE_FEATURES_tune-armv7a-neon}        bigendian"
+TUNE_FEATURES_tune-armv7atb-neon       = "${TUNE_FEATURES_tune-armv7at-neon}       bigendian"
+TUNE_FEATURES_tune-armv7ab-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7a-neon-vfpv4}  bigendian"
+TUNE_FEATURES_tune-armv7atb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7at-neon-vfpv4} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab             = "${PACKAGE_EXTRA_ARCHS_tune-armv6b}  armv7ab-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7atb            = "${PACKAGE_EXTRA_ARCHS_tune-armv6tb} armv7ab-vfp armv7at2b-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3d16    = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab}  armv7ab-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7atb-vfpv3d16   = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb} armv7ab-vfpv3d16 armv7at2b-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3       = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab-vfpv3d16}  armv7ab-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7atb-vfpv3      = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb-vfpv3d16} armv7ab-vfpv3 armv7at2b-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab}  armv7ab-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7atb-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb} armv7ab-neon armv7at2b-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7ab-neon}  armv7ab-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7atb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7atb-neon} armv7ab-neon-vfpv4 armv7at2b-neon-vfpv4"
 
-# Big Endian + VFP
-AVAILTUNES += "armv7ahfb armv7athfb armv7ahfb-vfpv3d16 armv7athfb-vfpv3d16 armv7ahfb-vfpv3 armv7athfb-vfpv3 armv7ahfb-neon armv7athfb-neon"
-ARMPKGARCH_tune-armv7ahfb ?= "armv7a"
-ARMPKGARCH_tune-armv7athfb ?= "armv7a"
-ARMPKGARCH_tune-armv7ahfb-vfpv3d16 ?= "armv7a"
-ARMPKGARCH_tune-armv7athfb-vfpv3d16 ?= "armv7a"
-ARMPKGARCH_tune-armv7ahfb-vfpv3 ?= "armv7a"
-ARMPKGARCH_tune-armv7athfb-vfpv3 ?= "armv7a"
-ARMPKGARCH_tune-armv7ahfb-neon?= "armv7a"
-ARMPKGARCH_tune-armv7athfb-neon ?= "armv7a"
-TUNE_FEATURES_tune-armv7ahfb ?= "${TUNE_FEATURES_tune-armv7ahf} bigendian"
-TUNE_FEATURES_tune-armv7athfb ?= "${TUNE_FEATURES_tune-armv7athf} bigendian"
-TUNE_FEATURES_tune-armv7ahfb-vfpv3d16 ?= "${TUNE_FEATURES_tune-armv7ahf-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7athfb-vfpv3d16 ?= "${TUNE_FEATURES_tune-armv7athf-vfpv3d16} bigendian"
-TUNE_FEATURES_tune-armv7ahfb-vfpv3 ?= "${TUNE_FEATURES_tune-armv7ahf-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7athfb-vfpv3 ?= "${TUNE_FEATURES_tune-armv7athf-vfpv3} bigendian"
-TUNE_FEATURES_tune-armv7ahfb-neon ?= "${TUNE_FEATURES_tune-armv7ahf-neon} bigendian"
-TUNE_FEATURES_tune-armv7athfb-neon ?= "${TUNE_FEATURES_tune-armv7athf-neon} bigendian"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahfb = "${PACKAGE_EXTRA_ARCHS_tune-armv6hfb} armv7ahfb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7athfb = "${PACKAGE_EXTRA_ARCHS_tune-armv6thfb} armv7ahfb-vfp armv7at2hfb-vfp"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7ahfb-vfp-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7athfb-vfpv3d16 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb} armv7ahfb-vfp-vfpv3d16 armv7at2hfb-vfp-vfpv3d16"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3d16} armv7ahfb-vfp-vfpv3d16-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7athfb-vfpv3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb-vfpv3d16} armv7ahfb-vfp-vfpv3d16-vfpv3 armv7at2hfb-vfp-vfpv3d16-vfpv3"
-PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb} armv7ahfb-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-armv7athfb-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb} armv7ahfb-vfp-neon armv7at2hfb-vfp-neon"
+# Big Endian + HF
+AVAILTUNES += "armv7ahfb armv7athfb armv7ahfb-vfpv3d16 armv7athfb-vfpv3d16 armv7ahfb-vfpv3 armv7athfb-vfpv3 armv7ahfb-neon armv7athfb-neon armv7ahfb-neon-vfpv4 armv7athfb-neon-vfpv4"
+ARMPKGARCH_tune-armv7ahfb             ?= "armv7a"
+ARMPKGARCH_tune-armv7athfb            ?= "armv7a"
+ARMPKGARCH_tune-armv7ahfb-vfpv3d16    ?= "armv7a"
+ARMPKGARCH_tune-armv7athfb-vfpv3d16   ?= "armv7a"
+ARMPKGARCH_tune-armv7ahfb-vfpv3       ?= "armv7a"
+ARMPKGARCH_tune-armv7athfb-vfpv3      ?= "armv7a"
+ARMPKGARCH_tune-armv7ahfb-neon        ?= "armv7a"
+ARMPKGARCH_tune-armv7athfb-neon       ?= "armv7a"
+ARMPKGARCH_tune-armv7ahfb-neon-vfpv4  ?= "armv7a"
+ARMPKGARCH_tune-armv7athfb-neon-vfpv4 ?= "armv7a"
+TUNE_FEATURES_tune-armv7ahfb             = "${TUNE_FEATURES_tune-armv7ahf}             bigendian"
+TUNE_FEATURES_tune-armv7athfb            = "${TUNE_FEATURES_tune-armv7athf}            bigendian"
+TUNE_FEATURES_tune-armv7ahfb-vfpv3d16    = "${TUNE_FEATURES_tune-armv7ahf-vfpv3d16}    bigendian"
+TUNE_FEATURES_tune-armv7athfb-vfpv3d16   = "${TUNE_FEATURES_tune-armv7athf-vfpv3d16}   bigendian"
+TUNE_FEATURES_tune-armv7ahfb-vfpv3       = "${TUNE_FEATURES_tune-armv7ahf-vfpv3}       bigendian"
+TUNE_FEATURES_tune-armv7athfb-vfpv3      = "${TUNE_FEATURES_tune-armv7athf-vfpv3}      bigendian"
+TUNE_FEATURES_tune-armv7ahfb-neon        = "${TUNE_FEATURES_tune-armv7ahf-neon}        bigendian"
+TUNE_FEATURES_tune-armv7athfb-neon       = "${TUNE_FEATURES_tune-armv7athf-neon}       bigendian"
+TUNE_FEATURES_tune-armv7ahfb-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7ahf-neon-vfpv4}  bigendian"
+TUNE_FEATURES_tune-armv7athfb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7athf-neon-vfpv4} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb             = "${PACKAGE_EXTRA_ARCHS_tune-armv6hfb}  armv7ahfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7athfb            = "${PACKAGE_EXTRA_ARCHS_tune-armv6thfb} armv7ahfb-vfp armv7at2hfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3d16    = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb}  armv7ahfb-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7athfb-vfpv3d16   = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb} armv7ahfb-vfpv3d16 armv7at2hfb-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3       = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-vfpv3d16}  armv7ahfb-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7athfb-vfpv3      = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb-vfpv3d16} armv7ahfb-vfpv3 armv7at2hfb-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb}  armv7ahfb-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7athfb-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb} armv7ahfb-neon armv7at2hfb-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahfb-neon}  armv7ahfb-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7athfb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athfb-neon} armv7ahfb-neon-vfpv4 armv7at2hfb-neon-vfpv4"
diff --git a/yocto-poky/meta/conf/machine/include/arm/arch-armv7ve.inc b/yocto-poky/meta/conf/machine/include/arm/arch-armv7ve.inc
new file mode 100644
index 0000000..79e1ef6
--- /dev/null
+++ b/yocto-poky/meta/conf/machine/include/arm/arch-armv7ve.inc
@@ -0,0 +1,141 @@
+DEFAULTTUNE ?= "armv7ve"
+
+TUNEVALID[armv7ve] = "Enable instructions for ARMv7ve"
+TUNECONFLICTS[armv7ve] = "armv4 armv5 armv6 armv7 armv7a"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', ' -march=armv7ve', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', 'armv7ve:', '' ,d)}"
+
+require conf/machine/include/arm/arch-armv6.inc
+require conf/machine/include/arm/feature-arm-neon.inc
+
+# Little Endian base configs
+AVAILTUNES += "armv7ve armv7vet armv7ve-vfpv3d16 armv7vet-vfpv3d16 armv7ve-vfpv3 armv7vet-vfpv3 armv7ve-neon armv7vet-neon armv7ve-neon-vfpv4 armv7vet-neon-vfpv4"
+ARMPKGARCH_tune-armv7ve             ?= "armv7ve"
+ARMPKGARCH_tune-armv7vet            ?= "armv7ve"
+ARMPKGARCH_tune-armv7ve-vfpv3d16    ?= "armv7ve"
+ARMPKGARCH_tune-armv7vet-vfpv3d16   ?= "armv7ve"
+ARMPKGARCH_tune-armv7ve-vfpv3       ?= "armv7ve"
+ARMPKGARCH_tune-armv7vet-vfpv3      ?= "armv7ve"
+ARMPKGARCH_tune-armv7ve-neon        ?= "armv7ve"
+ARMPKGARCH_tune-armv7vet-neon       ?= "armv7ve"
+ARMPKGARCH_tune-armv7ve-neon-vfpv4  ?= "armv7ve"
+ARMPKGARCH_tune-armv7vet-neon-vfpv4 ?= "armv7ve"
+TUNE_FEATURES_tune-armv7ve             = "arm armv7ve vfp"
+TUNE_FEATURES_tune-armv7vet            = "${TUNE_FEATURES_tune-armv7ve} thumb"
+TUNE_FEATURES_tune-armv7ve-vfpv3d16    = "${TUNE_FEATURES_tune-armv7ve}  vfpv3d16"
+TUNE_FEATURES_tune-armv7vet-vfpv3d16   = "${TUNE_FEATURES_tune-armv7vet} vfpv3d16"
+TUNE_FEATURES_tune-armv7ve-vfpv3       = "${TUNE_FEATURES_tune-armv7ve-vfpv3d16}  vfpv3"
+TUNE_FEATURES_tune-armv7vet-vfpv3      = "${TUNE_FEATURES_tune-armv7vet-vfpv3d16} vfpv3"
+TUNE_FEATURES_tune-armv7ve-neon        = "${TUNE_FEATURES_tune-armv7ve}  neon"
+TUNE_FEATURES_tune-armv7vet-neon       = "${TUNE_FEATURES_tune-armv7vet} neon"
+TUNE_FEATURES_tune-armv7ve-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7ve-neon}  vfpv4"
+TUNE_FEATURES_tune-armv7vet-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon} vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve             = "${PACKAGE_EXTRA_ARCHS_tune-armv6}  armv7ve armv7ve-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vet            = "${PACKAGE_EXTRA_ARCHS_tune-armv6t} armv7ve armv7ve-vfp armv7vet2-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3d16    = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve}  armv7ve-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vet-vfpv3d16   = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} armv7ve-vfpv3d16 armv7vet2-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3       = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-vfpv3d16}  armv7ve-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7vet-vfpv3      = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-vfpv3d16} armv7ve-vfpv3 armv7vet2-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve}  armv7ve-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} armv7ve-neon armv7vet2-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon}  armv7ve-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon} armv7ve-neon-vfpv4 armv7vet2-neon-vfpv4"
+
+# HF Tunes
+AVAILTUNES += "armv7vehf armv7vethf armv7vehf-vfpv3d16 armv7vethf-vfpv3d16 armv7vehf-vfpv3 armv7vethf-vfpv3 armv7vehf-neon armv7vethf-neon armv7vehf-neon-vfpv4 armv7vethf-neon-vfpv4"
+ARMPKGARCH_tune-armv7vehf             ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethf            ?= "armv7ve"
+ARMPKGARCH_tune-armv7vehf-vfpv3d16    ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethf-vfpv3d16   ?= "armv7ve"
+ARMPKGARCH_tune-armv7vehf-vfpv3       ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethf-vfpv3      ?= "armv7ve"
+ARMPKGARCH_tune-armv7vehf-neon        ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethf-neon       ?= "armv7ve"
+ARMPKGARCH_tune-armv7vehf-neon-vfpv4  ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethf-neon-vfpv4 ?= "armv7ve"
+TUNE_FEATURES_tune-armv7vehf             = "${TUNE_FEATURES_tune-armv7ve}             callconvention-hard"
+TUNE_FEATURES_tune-armv7vethf            = "${TUNE_FEATURES_tune-armv7vet}            callconvention-hard"
+TUNE_FEATURES_tune-armv7vehf-vfpv3d16    = "${TUNE_FEATURES_tune-armv7ve-vfpv3d16}    callconvention-hard"
+TUNE_FEATURES_tune-armv7vethf-vfpv3d16   = "${TUNE_FEATURES_tune-armv7vet-vfpv3d16}   callconvention-hard"
+TUNE_FEATURES_tune-armv7vehf-vfpv3       = "${TUNE_FEATURES_tune-armv7ve-vfpv3}       callconvention-hard"
+TUNE_FEATURES_tune-armv7vethf-vfpv3      = "${TUNE_FEATURES_tune-armv7vet-vfpv3}      callconvention-hard"
+TUNE_FEATURES_tune-armv7vehf-neon        = "${TUNE_FEATURES_tune-armv7ve-neon}        callconvention-hard"
+TUNE_FEATURES_tune-armv7vethf-neon       = "${TUNE_FEATURES_tune-armv7vet-neon}       callconvention-hard"
+TUNE_FEATURES_tune-armv7vehf-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4}  callconvention-hard"
+TUNE_FEATURES_tune-armv7vethf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} callconvention-hard"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf             = "${PACKAGE_EXTRA_ARCHS_tune-armv6hf}  armv7vehf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethf            = "${PACKAGE_EXTRA_ARCHS_tune-armv6thf} armv7vehf-vfp armv7vet2hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3d16    = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf}  armv7vehf-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethf-vfpv3d16   = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} armv7vehf-vfpv3d16 armv7vet2hf-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-vfpv3d16}  armv7vehf-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethf-vfpv3      = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-vfpv3d16} armv7vehf-vfpv3 armv7vet2hf-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf}  armv7vehf-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} armv7vehf-neon armv7vet2hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon}  armv7vehf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon} armv7vehf-neon-vfpv4 armv7vet2hf-neon-vfpv4"
+
+# Big Endian
+AVAILTUNES += "armv7veb armv7vetb armv7veb-vfpv3d16 armv7vetb-vfpv3d16 armv7veb-vfpv3 armv7vetb-vfpv3 armv7veb-neon armv7vetb-neon armv7veb-neon-vfpv4 armv7vetb-neon-vfpv4"
+ARMPKGARCH_tune-armv7veb             ?= "armv7ve"
+ARMPKGARCH_tune-armv7vetb            ?= "armv7ve"
+ARMPKGARCH_tune-armv7veb-vfpv3d16    ?= "armv7ve"
+ARMPKGARCH_tune-armv7vetb-vfpv3d16   ?= "armv7ve"
+ARMPKGARCH_tune-armv7veb-vfpv3       ?= "armv7ve"
+ARMPKGARCH_tune-armv7vetb-vfpv3      ?= "armv7ve"
+ARMPKGARCH_tune-armv7veb-neon        ?= "armv7ve"
+ARMPKGARCH_tune-armv7vetb-neon       ?= "armv7ve"
+ARMPKGARCH_tune-armv7veb-neon-vfpv4  ?= "armv7ve"
+ARMPKGARCH_tune-armv7vetb-neon-vfpv4 ?= "armv7ve"
+TUNE_FEATURES_tune-armv7veb             = "${TUNE_FEATURES_tune-armv7ve}             bigendian"
+TUNE_FEATURES_tune-armv7vetb            = "${TUNE_FEATURES_tune-armv7vet}            bigendian"
+TUNE_FEATURES_tune-armv7veb-vfpv3d16    = "${TUNE_FEATURES_tune-armv7ve-vfpv3d16}    bigendian"
+TUNE_FEATURES_tune-armv7vetb-vfpv3d16   = "${TUNE_FEATURES_tune-armv7vet-vfpv3d16}   bigendian"
+TUNE_FEATURES_tune-armv7veb-vfpv3       = "${TUNE_FEATURES_tune-armv7ve-vfpv3}       bigendian"
+TUNE_FEATURES_tune-armv7vetb-vfpv3      = "${TUNE_FEATURES_tune-armv7vet-vfpv3}      bigendian"
+TUNE_FEATURES_tune-armv7veb-neon        = "${TUNE_FEATURES_tune-armv7ve-neon}        bigendian"
+TUNE_FEATURES_tune-armv7vetb-neon       = "${TUNE_FEATURES_tune-armv7vet-neon}       bigendian"
+TUNE_FEATURES_tune-armv7veb-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4}  bigendian"
+TUNE_FEATURES_tune-armv7vetb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb             = "${PACKAGE_EXTRA_ARCHS_tune-armv6b}  armv7veb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vetb            = "${PACKAGE_EXTRA_ARCHS_tune-armv6tb} armv7veb-vfp armv7vet2b-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3d16    = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb}  armv7veb-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vetb-vfpv3d16   = "${PACKAGE_EXTRA_ARCHS_tune-armv7vetb} armv7veb-vfpv3d16 armv7vet2b-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3       = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb-vfpv3d16}  armv7veb-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7vetb-vfpv3      = "${PACKAGE_EXTRA_ARCHS_tune-armv7vetb-vfpv3d16} armv7veb-vfpv3 armv7vet2b-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb}  armv7veb-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7vetb-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vetb} armv7veb-neon armv7vet2b-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7veb-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7veb-neon}  armv7veb-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7vetb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vetb-neon} armv7veb-neon-vfpv4 armv7vet2b-neon-vfpv4"
+
+# Big Endian + HF
+AVAILTUNES += "armv7vehfb armv7vethfb armv7vehfb-vfpv3d16 armv7vethfb-vfpv3d16 armv7vehfb-vfpv3 armv7vethfb-vfpv3 armv7vehfb-neon armv7vethfb-neon armv7vehfb-neon-vfpv4 armv7vethfb-neon-vfpv4"
+ARMPKGARCH_tune-armv7vehfb             ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethfb            ?= "armv7ve"
+ARMPKGARCH_tune-armv7vehfb-vfpv3d16    ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethfb-vfpv3d16   ?= "armv7ve"
+ARMPKGARCH_tune-armv7vehfb-vfpv3       ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethfb-vfpv3      ?= "armv7ve"
+ARMPKGARCH_tune-armv7vehfb-neon        ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethfb-neon       ?= "armv7ve"
+ARMPKGARCH_tune-armv7vehfb-neon-vfpv4  ?= "armv7ve"
+ARMPKGARCH_tune-armv7vethfb-neon-vfpv4 ?= "armv7ve"
+TUNE_FEATURES_tune-armv7vehfb             = "${TUNE_FEATURES_tune-armv7vehf}             bigendian"
+TUNE_FEATURES_tune-armv7vethfb            = "${TUNE_FEATURES_tune-armv7vethf}            bigendian"
+TUNE_FEATURES_tune-armv7vehfb-vfpv3d16    = "${TUNE_FEATURES_tune-armv7vehf-vfpv3d16}    bigendian"
+TUNE_FEATURES_tune-armv7vethfb-vfpv3d16   = "${TUNE_FEATURES_tune-armv7vethf-vfpv3d16}   bigendian"
+TUNE_FEATURES_tune-armv7vehfb-vfpv3       = "${TUNE_FEATURES_tune-armv7vehf-vfpv3}       bigendian"
+TUNE_FEATURES_tune-armv7vethfb-vfpv3      = "${TUNE_FEATURES_tune-armv7vethf-vfpv3}      bigendian"
+TUNE_FEATURES_tune-armv7vehfb-neon        = "${TUNE_FEATURES_tune-armv7vehf-neon}        bigendian"
+TUNE_FEATURES_tune-armv7vethfb-neon       = "${TUNE_FEATURES_tune-armv7vethf-neon}       bigendian"
+TUNE_FEATURES_tune-armv7vehfb-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4}  bigendian"
+TUNE_FEATURES_tune-armv7vethfb-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} bigendian"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb             = "${PACKAGE_EXTRA_ARCHS_tune-armv6hfb}  armv7vehfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethfb            = "${PACKAGE_EXTRA_ARCHS_tune-armv6thfb} armv7vehfb-vfp armv7vet2hfb-vfp"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3d16    = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb}  armv7vehfb-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-vfpv3d16   = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethfb} armv7vehfb-vfpv3d16 armv7vet2hfb-vfpv3d16"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-vfpv3d16}  armv7vehfb-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-vfpv3      = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-vfpv3d16} armv7vehfb-vfpv3 armv7vet2hfb-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb}  armv7vehfb-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethfb} armv7vehfb-neon armv7vet2hfb-neon"
+PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehfb-neon}  armv7vehfb-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethfb-neon} armv7vehfb-neon-vfpv4 armv7vet2hfb-neon-vfpv4"
diff --git a/yocto-poky/meta/conf/machine/include/arm/feature-arm-neon.inc b/yocto-poky/meta/conf/machine/include/arm/feature-arm-neon.inc
index e8b2b85..50d9175 100644
--- a/yocto-poky/meta/conf/machine/include/arm/feature-arm-neon.inc
+++ b/yocto-poky/meta/conf/machine/include/arm/feature-arm-neon.inc
@@ -1,3 +1,18 @@
+# GCC supports following options:
+# 'vfp', 'vfpv3', 'vfpv3-fp16', 'vfpv3-d16', 'vfpv3-d16-fp16', 'vfpv3xd', 'vfpv3xd-fp16', 'neon', 'neon-fp16', 'vfpv4', 'vfpv4-d16', 'fpv4-sp-d16', 'neon-vfpv4', 'fpv5-d16', 'fpv5-sp-d16', 'fp-armv8', 'neon-fp-armv8', and 'crypto-neon-fp-armv8'
+
+# Only some combinations are supported here.
+# 'vfp', -mfloat-abi parameter and 'hf' suffix is implemented in feature-arm-vfp.inc
+
 TUNEVALID[neon] = "Enable Neon SIMD accelerator unit."
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "neon", bb.utils.contains("TUNE_FEATURES", "vfpv4", " -mfpu=neon-vfpv4", " -mfpu=neon", d), "" , d)}"
-ARMPKGSFX_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "neon", "-neon", "", d)}"
+TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'neon', ' neon', '', d)}"
+
+TUNEVALID[vfpv3d16] = "Enable Vector Floating Point Version 3 with 16 registers (vfpv3-d16) unit."
+TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3d16', ' vfpv3d16', '', d)}"
+
+TUNEVALID[vfpv3] = "Enable Vector Floating Point Version 3 with 32 registers (vfpv3) unit."
+TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv3', ' vfpv3', '' , d)}"
+
+TUNEVALID[vfpv4] = "Enable Vector Floating Point Version 4 (vfpv4) unit."
+TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfpv4', ' vfpv4', '', d)}"
+TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', [ 'vfpv4', 'neon' ], ' neon-vfpv4', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/arm/feature-arm-thumb.inc b/yocto-poky/meta/conf/machine/include/arm/feature-arm-thumb.inc
index 5632171..1faebf7 100644
--- a/yocto-poky/meta/conf/machine/include/arm/feature-arm-thumb.inc
+++ b/yocto-poky/meta/conf/machine/include/arm/feature-arm-thumb.inc
@@ -1,9 +1,3 @@
-# The instruction set the compiler should use when generating application
-# code. The kernel is always compiled with arm code at present. arm code
-# is the original 32 bit ARM instruction set, thumb code is the 16 bit
-# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size)
-# but requires more instructions (140% for 70% smaller code) so may be
-# slower.
 TUNEVALID[thumb] = "Use thumb instructions instead of ARM"
 ARM_THUMB_OPT = "${@['arm', 'thumb'][d.getVar('ARM_INSTRUCTION_SET', True) == 'thumb']}"
 ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4',  't',  '', d)}"
@@ -12,13 +6,14 @@
 ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7a', 't2', '', d)}"
 ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7r', 't2', '', d)}"
 ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 't2', '', d)}"
+ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7ve', 't2', '', d)}"
 
 # If the device supports ARM, then respect ARM_THUMB_OPT (which can be "arm" or "thumb")
 # If the defice doesn't support ARM, then always set "thumb" even when
 # some recipe explicitly sets ARM_INSTRUCTION_SET to "arm"
 ARM_M_OPT = "${@bb.utils.contains('TUNE_FEATURES', 'arm', '${ARM_THUMB_OPT}', 'thumb', d)}"
 python () {
-    if bb.utils.contains('TUNE_FEATURES', 'thumb', 'False', 'True', d):
+    if bb.utils.contains('TUNE_FEATURES', 'thumb', False, True, d):
         return
     selected = d.getVar('ARM_INSTRUCTION_SET', True)
     if selected == None:
@@ -30,20 +25,9 @@
 }
 
 TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', d)}"
-OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ':thumb', '', d)}"
 
 # Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_M_OPT to thumb
 ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d) if d.getVar('ARM_M_OPT', True) == 'thumb' else ''}"
 
-# Whether to compile with code to allow interworking between the two
-# instruction sets. This allows thumb code to be executed on a primarily
-# arm system and vice versa. It is strongly recommended that DISTROs not
-# turn this off - the actual cost is very small.
-TUNEVALID[no-thumb-interwork] = "Disable mixing of thumb and ARM functions"
-THUMB_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}"
-THUMB_OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}"
-TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_TUNE_CCARGS}', '', d)}"
-OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${THUMB_OVERRIDES}', '', d)}"
-
 # what about armv7m devices which don't support -marm (e.g. Cortex-M3)?
 TARGET_CC_KERNEL_ARCH += "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork -marm', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/arm/feature-arm-vfp.inc b/yocto-poky/meta/conf/machine/include/arm/feature-arm-vfp.inc
index 3dfbeac..4247255 100644
--- a/yocto-poky/meta/conf/machine/include/arm/feature-arm-vfp.inc
+++ b/yocto-poky/meta/conf/machine/include/arm/feature-arm-vfp.inc
@@ -1,17 +1,14 @@
+# This is only for VFPv1 or VFPv2, other vfp* tunes are defined in
+# feature-arm-neon.inc, because they are available only for armv7*
+# and this .inc file is included from armv5
+
 TUNEVALID[vfp] = "Enable Vector Floating Point (vfp) unit."
-ARMPKGSFX_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "vfp", "-vfp", "" ,d)}"
+TUNE_CCARGS_MFPU .= "${@bb.utils.contains('TUNE_FEATURES', 'vfp', ' vfp', '', d)}"
 
-TUNEVALID[vfpv3d16] = "Enable Vector Floating Point Version 3 with 16 registers (vfpv3-d16) unit."
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "vfpv3d16", " -mfpu=vfpv3-d16", "", d)}"
-ARMPKGSFX_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "vfpv3d16", "-vfpv3d16", "" ,d)}"
-
-TUNEVALID[vfpv3] = "Enable Vector Floating Point Version 3 with 32 registers (vfpv3) unit."
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "vfpv3", " -mfpu=vfpv3", "", d)}"
-ARMPKGSFX_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "vfpv3", "-vfpv3", "" ,d)}"
-
-TUNEVALID[vfpv4] = "Enable Vector Floating Point Version 4 (vfpv4) unit."
-ARMPKGSFX_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "vfpv4", "-vfpv4", "" ,d)}"
+TUNE_CCARGS  .= "${@ (' -mfpu=%s ' % d.getVar('TUNE_CCARGS_MFPU', True).split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else ''}"
+ARMPKGSFX_FPU = "${@ ('-%s'        % d.getVar('TUNE_CCARGS_MFPU', True).split()[-1]) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else ''}"
 
 TUNEVALID[callconvention-hard] = "Enable EABI hard float call convention, requires VFP."
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "vfp", bb.utils.contains("TUNE_FEATURES", "callconvention-hard", " -mfloat-abi=hard", " -mfloat-abi=softfp", d), "" ,d)}"
-ARMPKGSFX_EABI .= "${@bb.utils.contains("TUNE_FEATURES", [ "callconvention-hard", "vfp" ], "hf", "", d)}"
+TUNE_CCARGS_MFLOAT = "${@ bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hard', 'softfp', d) if (d.getVar('TUNE_CCARGS_MFPU', True) != '') else '' }"
+TUNE_CCARGS   .= "${@ ' -mfloat-abi=${TUNE_CCARGS_MFLOAT}' if (d.getVar('TUNE_CCARGS_MFLOAT', True) != '')     else ''}"
+ARMPKGSFX_EABI = "${@ 'hf'                                 if (d.getVar('TUNE_CCARGS_MFLOAT', True) == 'hard') else ''}"
diff --git a/yocto-poky/meta/conf/machine/include/mips/arch-mips.inc b/yocto-poky/meta/conf/machine/include/mips/arch-mips.inc
index 02626d3..89d17e7 100644
--- a/yocto-poky/meta/conf/machine/include/mips/arch-mips.inc
+++ b/yocto-poky/meta/conf/machine/include/mips/arch-mips.inc
@@ -8,33 +8,33 @@
 
 # Endianess
 TUNEVALID[bigendian] = "Enable big-endian mode"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -meb", " -mel", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', ' -meb', ' -mel', d)}"
 
 # ABI flags
 TUNEVALID[o32] = "MIPS o32 ABI"
 TUNECONFLICTS[o32] = "n32 n64"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "o32", " -mabi=32", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'o32', ' -mabi=32', '', d)}"
 
 TUNEVALID[n32] = "MIPS64 n32 ABI"
 TUNECONFLICTS[n32] = "o32 n64"
-ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "n32", "n32", "" ,d)}"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "n32", " -mabi=n32", "", d)}"
+ABIEXTENSION .= "${@bb.utils.contains('TUNE_FEATURES', 'n32', 'n32', '' ,d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'n32', ' -mabi=n32', '', d)}"
 
 TUNEVALID[n64] = "MIPS64 n64 ABI"
 TUNECONFLICTS[n64] = "o32 n32"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "n64", " -mabi=64", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'n64', ' -mabi=64', '', d)}"
 
 # Floating point
 TUNEVALID[fpu-hard] = "Use hardware FPU"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", " -mhard-float", " -msoft-float", d)}"
-TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", "", "soft", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', ' -mhard-float', ' -msoft-float', d)}"
+TARGET_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '', 'soft', d)}"
 
 # Package naming
-MIPSPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "", "el", d)}"
-MIPSPKGSFX_BYTE = "${@bb.utils.contains("TUNE_FEATURES", "n64" , "64", "", d)}"
-MIPSPKGSFX_BYTE .= "${@bb.utils.contains("TUNE_FEATURES", "n32" , "64", "", d)}"
-MIPSPKGSFX_FPU = "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard" , "", "-nf", d)}"
-MIPSPKGSFX_ABI = "${@bb.utils.contains("TUNE_FEATURES", "n32", "-n32", "", d)}"
+MIPSPKGSFX_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el', d)}"
+MIPSPKGSFX_BYTE = "${@bb.utils.contains('TUNE_FEATURES', 'n64' , '64', '', d)}"
+MIPSPKGSFX_BYTE .= "${@bb.utils.contains('TUNE_FEATURES', 'n32' , '64', '', d)}"
+MIPSPKGSFX_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard' , '', '-nf', d)}"
+MIPSPKGSFX_ABI = "${@bb.utils.contains('TUNE_FEATURES', 'n32', '-n32', '', d)}"
 
 TUNE_ARCH = "mips${MIPSPKGSFX_BYTE}${MIPSPKGSFX_ENDIAN}"
 TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}"
diff --git a/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc.inc b/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc.inc
index 036ca3c..9cf6b88 100644
--- a/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc.inc
+++ b/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc.inc
@@ -9,15 +9,15 @@
 ABIEXTENSION ?= ""
 
 TUNEVALID[m32] = "Power ELF32 standard ABI"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "m32", " -m32", "", d)}"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "powerpc", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', ' -m32', '', d)}"
+TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', 'powerpc', '', d)}"
 
 TUNEVALID[fpu-hard] = "Use hardware FPU."
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-hard", " -mhard-float", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', ' -mhard-float', '', d)}"
 
 TUNEVALID[fpu-soft] = "Use software FPU."
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", " -msoft-float", "", d)}"
-TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", "fpu-soft", "soft", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-soft', ' -msoft-float', '', d)}"
+TARGET_FPU .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-soft', 'soft', '', d)}"
 
 TUNEVALID[altivec] = "Altivec"
 
diff --git a/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc64.inc b/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc64.inc
index 8476dec..49419b6 100644
--- a/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc64.inc
+++ b/yocto-poky/meta/conf/machine/include/powerpc/arch-powerpc64.inc
@@ -4,11 +4,11 @@
 
 TUNEVALID[m64] = "Power ELF64 standard ABI"
 TUNECONFLICTS[m64] = "m32 nf"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "m64", " -m64", "", d)}"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", [ "m64" ], "powerpc64", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm64', ' -m64', '', d)}"
+TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', [ 'm64' ], 'powerpc64', '', d)}"
 
 AVAILTUNES += "powerpc64"
-TUNE_FEATURES_tune-powerpc64 ?= "m64 fpu-hard"
+TUNE_FEATURES_tune-powerpc64 = "m64 fpu-hard"
 BASE_LIB_tune-powerpc64 = "lib64"
 TUNE_PKGARCH_tune-powerpc64 = "powerpc64"
 PACKAGE_EXTRA_ARCHS_tune-powerpc64 = "powerpc64"
diff --git a/yocto-poky/meta/conf/machine/include/qemu.inc b/yocto-poky/meta/conf/machine/include/qemu.inc
index 16e9469..f44dbe6 100644
--- a/yocto-poky/meta/conf/machine/include/qemu.inc
+++ b/yocto-poky/meta/conf/machine/include/qemu.inc
@@ -27,3 +27,5 @@
 
 # Provide the nfs server kernel module for all qemu images
 KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc"
+
+MACHINE_EXTRA_RRECOMMENDS += "rng-tools"
diff --git a/yocto-poky/meta/conf/machine/include/sh/arch-sh.inc b/yocto-poky/meta/conf/machine/include/sh/arch-sh.inc
index 64d4cac..bdfbf52 100644
--- a/yocto-poky/meta/conf/machine/include/sh/arch-sh.inc
+++ b/yocto-poky/meta/conf/machine/include/sh/arch-sh.inc
@@ -6,4 +6,4 @@
 TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
 
 TUNEVALID[bigendian] = "Enabled big-endian mode."
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "bigendian", " -mb", " -ml", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', ' -mb', ' -ml', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/tune-arm1136jf-s.inc b/yocto-poky/meta/conf/machine/include/tune-arm1136jf-s.inc
index 4a131b6..53994ef 100644
--- a/yocto-poky/meta/conf/machine/include/tune-arm1136jf-s.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-arm1136jf-s.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/arm/arch-armv6.inc
 
 TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "arm1136jfs", " -mtune=arm1136jf-s", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}"
 
 AVAILTUNES += "arm1136jfs"
 ARMPKGARCH_tune-arm1136jfs = "arm1136jfs"
diff --git a/yocto-poky/meta/conf/machine/include/tune-arm920t.inc b/yocto-poky/meta/conf/machine/include/tune-arm920t.inc
index 0a2eae6..c6e74b6 100644
--- a/yocto-poky/meta/conf/machine/include/tune-arm920t.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-arm920t.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/arm/arch-armv4.inc
 
 TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "arm920t", " -mtune=arm920t", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}"
 
 AVAILTUNES += "arm920t"
 ARMPKGARCH_tune-arm920t = "arm920t"
diff --git a/yocto-poky/meta/conf/machine/include/tune-arm926ejs.inc b/yocto-poky/meta/conf/machine/include/tune-arm926ejs.inc
index 335e4e0..81bcda3 100644
--- a/yocto-poky/meta/conf/machine/include/tune-arm926ejs.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-arm926ejs.inc
@@ -3,9 +3,9 @@
 require conf/machine/include/arm/arch-armv5-dsp.inc
 
 TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "arm926ejs", " -mtune=arm926ej-s", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}"
 
 AVAILTUNES += "arm926ejs"
 ARMPKGARCH_tune-arm926ejs = "arm926ejs"
 TUNE_FEATURES_tune-arm926ejs = "${TUNE_FEATURES_tune-armv5te} arm926ejs"
-PACKAGE_EXTRA_ARCHS_tune-arm926ejs = "${PACKAGE_EXTRA_ARCHS_tune-armv5te} arm926ejste"
+PACKAGE_EXTRA_ARCHS_tune-arm926ejs = "${PACKAGE_EXTRA_ARCHS_tune-armv5te} arm926ejste arm926ejse"
diff --git a/yocto-poky/meta/conf/machine/include/tune-arm9tdmi.inc b/yocto-poky/meta/conf/machine/include/tune-arm9tdmi.inc
index dee57c9..e9c2b8f 100644
--- a/yocto-poky/meta/conf/machine/include/tune-arm9tdmi.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-arm9tdmi.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/arm/arch-armv4.inc
 
 TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "arm9tdmi", " -mtune=arm9tdmi", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}"
 
 AVAILTUNES += "arm9tdmi"
 ARMPKGARCH_tune-arm9tdmi = "arm9tdmi"
diff --git a/yocto-poky/meta/conf/machine/include/tune-c3.inc b/yocto-poky/meta/conf/machine/include/tune-c3.inc
index fafc28a..1b272b2 100644
--- a/yocto-poky/meta/conf/machine/include/tune-c3.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-c3.inc
@@ -2,7 +2,7 @@
 
 TUNEVALID[c3] = "VIA Cyrix III or VIA C3 specific optimizations"
 TUNECONFLICTS[c3] = "m64 mx32"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "c3", " -march=c3 -mtune=c3", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'c3', ' -march=c3 -mtune=c3', '', d)}"
 
 AVAILTUNES += "c3"
 TUNE_FEATURES_tune-c3 = "${TUNE_FEATURES_tune-x86} c3"
diff --git a/yocto-poky/meta/conf/machine/include/tune-core2.inc b/yocto-poky/meta/conf/machine/include/tune-core2.inc
index 9a4cb70..f4ba43f 100644
--- a/yocto-poky/meta/conf/machine/include/tune-core2.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-core2.inc
@@ -16,7 +16,7 @@
 
 # Extra tune features
 TUNEVALID[core2] = "Enable core2 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "core2", " -march=core2 -mtune=core2 -msse3 -mfpmath=sse", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'core2', ' -march=core2 -mtune=core2 -msse3 -mfpmath=sse', '', d)}"
 
 # Extra tune selections
 AVAILTUNES += "core2-32"
diff --git a/yocto-poky/meta/conf/machine/include/tune-corei7.inc b/yocto-poky/meta/conf/machine/include/tune-corei7.inc
index 42cf932..6edfb68 100644
--- a/yocto-poky/meta/conf/machine/include/tune-corei7.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-corei7.inc
@@ -11,25 +11,29 @@
 # Pull in the previous tune in to pull in PACKAGE_EXTRA_ARCHS
 require conf/machine/include/tune-core2.inc
 
+
 # Extra tune features
 TUNEVALID[corei7] = "Enable corei7 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "corei7", " -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'corei7', ' -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2', '', d)}"
 
 # Extra tune selections
 AVAILTUNES += "corei7-32"
 TUNE_FEATURES_tune-corei7-32 = "${TUNE_FEATURES_tune-x86} corei7"
 BASE_LIB_tune-corei7-32 = "lib"
 TUNE_PKGARCH_tune-corei7-32 = "corei7-32"
-PACKAGE_EXTRA_ARCHS_tune-corei7-32 = "${PACKAGE_EXTRA_ARCHS_tune-core2} corei7-32"
+PACKAGE_EXTRA_ARCHS_tune-corei7-32 = "${PACKAGE_EXTRA_ARCHS_tune-core2-32} corei7-32"
+QEMU_EXTRAOPTIONS_corei7-32 = " -cpu Nehalem,check=false"
 
 AVAILTUNES += "corei7-64"
 TUNE_FEATURES_tune-corei7-64 = "${TUNE_FEATURES_tune-x86-64} corei7"
 BASE_LIB_tune-corei7-64 = "lib64"
 TUNE_PKGARCH_tune-corei7-64 = "corei7-64"
 PACKAGE_EXTRA_ARCHS_tune-corei7-64 = "${PACKAGE_EXTRA_ARCHS_tune-core2-64} corei7-64"
+QEMU_EXTRAOPTIONS_corei7-64 = " -cpu Nehalem,check=false"
 
 AVAILTUNES += "corei7-64-x32"
 TUNE_FEATURES_tune-corei7-64-x32 = "${TUNE_FEATURES_tune-x86-64-x32} corei7"
 BASE_LIB_tune-corei7-64-x32 = "libx32"
 TUNE_PKGARCH_tune-corei7-64-x32 = "corei7-64-x32"
 PACKAGE_EXTRA_ARCHS_tune-corei7-64-x32 = "${PACKAGE_EXTRA_ARCHS_tune-core2-64-x32} corei7-64-x32"
+QEMU_EXTRAOPTIONS_corei7-64-x32 = " -cpu Nehalem,check=false"
diff --git a/yocto-poky/meta/conf/machine/include/tune-cortexa15.inc b/yocto-poky/meta/conf/machine/include/tune-cortexa15.inc
index 5529777..a33b27f 100644
--- a/yocto-poky/meta/conf/machine/include/tune-cortexa15.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-cortexa15.inc
@@ -1,36 +1,48 @@
-DEFAULTTUNE ?= "armv7a-neon"
+DEFAULTTUNE ?= "armv7ve-neon"
 
-require conf/machine/include/arm/arch-armv7a.inc
+require conf/machine/include/arm/arch-armv7ve.inc
 
 TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa15", " -mtune=cortex-a15", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}"
 
 # Little Endian base configs
-AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon"
-ARMPKGARCH_tune-cortexa15 = "cortexa15"
-ARMPKGARCH_tune-cortexa15t = "cortexa15"
-ARMPKGARCH_tune-cortexa15-neon = "cortexa15"
-ARMPKGARCH_tune-cortexa15t-neon = "cortexa15"
-TUNE_FEATURES_tune-cortexa15 = "${TUNE_FEATURES_tune-armv7a} cortexa15"
-TUNE_FEATURES_tune-cortexa15t = "${TUNE_FEATURES_tune-armv7at} cortexa15"
-TUNE_FEATURES_tune-cortexa15-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa15"
-TUNE_FEATURES_tune-cortexa15t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa15"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa15-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa15-vfp cortexa15t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa15-vfp cortexa15-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa15-vfp cortexa15-vfp-neon cortexa15t2-vfp cortexa15t2-vfp-neon"
+AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"
+ARMPKGARCH_tune-cortexa15             = "cortexa15"
+ARMPKGARCH_tune-cortexa15t            = "cortexa15"
+ARMPKGARCH_tune-cortexa15-neon        = "cortexa15"
+ARMPKGARCH_tune-cortexa15t-neon       = "cortexa15"
+ARMPKGARCH_tune-cortexa15-neon-vfpv4  = "cortexa15"
+ARMPKGARCH_tune-cortexa15t-neon-vfpv4 = "cortexa15"
+TUNE_FEATURES_tune-cortexa15             = "${TUNE_FEATURES_tune-armv7ve}             cortexa15"
+TUNE_FEATURES_tune-cortexa15t            = "${TUNE_FEATURES_tune-armv7vet}            cortexa15"
+TUNE_FEATURES_tune-cortexa15-neon        = "${TUNE_FEATURES_tune-armv7ve-neon}        cortexa15"
+TUNE_FEATURES_tune-cortexa15t-neon       = "${TUNE_FEATURES_tune-armv7vet-neon}       cortexa15"
+TUNE_FEATURES_tune-cortexa15-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4}  cortexa15"
+TUNE_FEATURES_tune-cortexa15t-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} cortexa15"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15             = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve}  cortexa15-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15t            = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} cortexa15-vfp cortexa15t2-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon}  cortexa15-vfp cortexa15-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15t-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon} cortexa15-vfp cortexa15-neon cortexa15t2-vfp cortexa15t2-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4}  cortexa15-vfp cortexa15-neon cortexa15-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15t-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon-vfpv4} cortexa15-vfp cortexa15-neon cortexa15-neon-vfpv4 cortexa15t2-vfp cortexa15t2-neon cortexa15t2-neon-vfpv4"
 
-# VFP Tunes
-AVAILTUNES += "cortexa15hf cortexa15thf cortexa15hf-neon cortexa15thf-neon"
-ARMPKGARCH_tune-cortexa15hf = "cortexa15"
-ARMPKGARCH_tune-cortexa15thf = "cortexa15"
-ARMPKGARCH_tune-cortexa15hf-neon = "cortexa15"
-ARMPKGARCH_tune-cortexa15thf-neon = "cortexa15"
-TUNE_FEATURES_tune-cortexa15hf ?= "${TUNE_FEATURES_tune-armv7ahf} cortexa15"
-TUNE_FEATURES_tune-cortexa15thf ?= "${TUNE_FEATURES_tune-armv7athf} cortexa15"
-TUNE_FEATURES_tune-cortexa15hf-neon ?= "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa15"
-TUNE_FEATURES_tune-cortexa15thf-neon ?= "${TUNE_FEATURES_tune-armv7athf-neon} cortexa15"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa15hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa15hf-vfp cortexa15t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa15hf-vfp cortexa15hf-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa15thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa15hf-vfp cortexa15hf-vfp-neon cortexa15t2hf-vfp cortexa15t2hf-vfp-neon"
+# HF Tunes
+AVAILTUNES += "cortexa15hf cortexa15thf cortexa15hf-neon cortexa15thf-neon cortexa15hf-neon-vfpv4 cortexa15thf-neon-vfpv4"
+ARMPKGARCH_tune-cortexa15hf             = "cortexa15"
+ARMPKGARCH_tune-cortexa15thf            = "cortexa15"
+ARMPKGARCH_tune-cortexa15hf-neon        = "cortexa15"
+ARMPKGARCH_tune-cortexa15thf-neon       = "cortexa15"
+ARMPKGARCH_tune-cortexa15hf-neon-vfpv4  = "cortexa15"
+ARMPKGARCH_tune-cortexa15thf-neon-vfpv4 = "cortexa15"
+TUNE_FEATURES_tune-cortexa15hf             = "${TUNE_FEATURES_tune-armv7vehf}             cortexa15"
+TUNE_FEATURES_tune-cortexa15thf            = "${TUNE_FEATURES_tune-armv7vethf}            cortexa15"
+TUNE_FEATURES_tune-cortexa15hf-neon        = "${TUNE_FEATURES_tune-armv7vehf-neon}        cortexa15"
+TUNE_FEATURES_tune-cortexa15thf-neon       = "${TUNE_FEATURES_tune-armv7vethf-neon}       cortexa15"
+TUNE_FEATURES_tune-cortexa15hf-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4}  cortexa15"
+TUNE_FEATURES_tune-cortexa15thf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} cortexa15"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15hf             = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf}  cortexa15hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15thf            = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} cortexa15hf-vfp cortexa15t2hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15hf-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon}  cortexa15hf-vfp cortexa15hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15thf-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon} cortexa15hf-vfp cortexa15hf-neon cortexa15t2hf-vfp cortexa15t2hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15hf-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4}  cortexa15hf-vfp cortexa15hf-neon cortexa15hf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa15thf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon-vfpv4} cortexa15hf-vfp cortexa15hf-neon cortexa15hf-neon-vfpv4 cortexa15t2hf-vfp cortexa15t2hf-neon cortexa15t2hf-neon-vfpv4"
diff --git a/yocto-poky/meta/conf/machine/include/tune-cortexa17.inc b/yocto-poky/meta/conf/machine/include/tune-cortexa17.inc
index bfc7126..d08b002 100644
--- a/yocto-poky/meta/conf/machine/include/tune-cortexa17.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-cortexa17.inc
@@ -1,36 +1,48 @@
-DEFAULTTUNE ?= "armv7a-neon"
+DEFAULTTUNE ?= "armv7ve-neon"
 
-require conf/machine/include/arm/arch-armv7a.inc
+require conf/machine/include/arm/arch-armv7ve.inc
 
 TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa17", " -mtune=cortex-a17", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}"
 
 # Little Endian base configs
-AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon"
-ARMPKGARCH_tune-cortexa17 = "cortexa17"
-ARMPKGARCH_tune-cortexa17t = "cortexa17"
-ARMPKGARCH_tune-cortexa17-neon = "cortexa17"
-ARMPKGARCH_tune-cortexa17t-neon = "cortexa17"
-TUNE_FEATURES_tune-cortexa17 = "${TUNE_FEATURES_tune-armv7a} cortexa17"
-TUNE_FEATURES_tune-cortexa17t = "${TUNE_FEATURES_tune-armv7at} cortexa17"
-TUNE_FEATURES_tune-cortexa17-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa17"
-TUNE_FEATURES_tune-cortexa17t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa17"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa17-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa17-vfp cortexa17t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa17-vfp cortexa17-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa17-vfp cortexa17-vfp-neon cortexa17t2-vfp cortexa17t2-vfp-neon"
+AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"
+ARMPKGARCH_tune-cortexa17             = "cortexa17"
+ARMPKGARCH_tune-cortexa17t            = "cortexa17"
+ARMPKGARCH_tune-cortexa17-neon        = "cortexa17"
+ARMPKGARCH_tune-cortexa17t-neon       = "cortexa17"
+ARMPKGARCH_tune-cortexa17-neon-vfpv4  = "cortexa17"
+ARMPKGARCH_tune-cortexa17t-neon-vfpv4 = "cortexa17"
+TUNE_FEATURES_tune-cortexa17             = "${TUNE_FEATURES_tune-armv7ve}             cortexa17"
+TUNE_FEATURES_tune-cortexa17t            = "${TUNE_FEATURES_tune-armv7vet}            cortexa17"
+TUNE_FEATURES_tune-cortexa17-neon        = "${TUNE_FEATURES_tune-armv7ve-neon}        cortexa17"
+TUNE_FEATURES_tune-cortexa17t-neon       = "${TUNE_FEATURES_tune-armv7vet-neon}       cortexa17"
+TUNE_FEATURES_tune-cortexa17-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4}  cortexa17"
+TUNE_FEATURES_tune-cortexa17t-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} cortexa17"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17             = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve}  cortexa17-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17t            = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} cortexa17-vfp cortexa17t2-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon}  cortexa17-vfp cortexa17-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17t-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon} cortexa17-vfp cortexa17-neon cortexa17t2-vfp cortexa17t2-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4}  cortexa17-vfp cortexa17-neon cortexa17-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17t-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon-vfpv4} cortexa17-vfp cortexa17-neon cortexa17-neon-vfpv4 cortexa17t2-vfp cortexa17t2-neon cortexa17t2-neon-vfpv4"
 
-# VFP Tunes
-AVAILTUNES += "cortexa17hf cortexa17thf cortexa17hf-neon cortexa17thf-neon"
-ARMPKGARCH_tune-cortexa17hf = "cortexa17"
-ARMPKGARCH_tune-cortexa17thf = "cortexa17"
-ARMPKGARCH_tune-cortexa17hf-neon = "cortexa17"
-ARMPKGARCH_tune-cortexa17thf-neon = "cortexa17"
-TUNE_FEATURES_tune-cortexa17hf ?= "${TUNE_FEATURES_tune-armv7ahf} cortexa17"
-TUNE_FEATURES_tune-cortexa17thf ?= "${TUNE_FEATURES_tune-armv7athf} cortexa17"
-TUNE_FEATURES_tune-cortexa17hf-neon ?= "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa17"
-TUNE_FEATURES_tune-cortexa17thf-neon ?= "${TUNE_FEATURES_tune-armv7athf-neon} cortexa17"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa17hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa17hf-vfp cortexa17t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa17hf-vfp cortexa17hf-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa17thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa17hf-vfp cortexa17hf-vfp-neon cortexa17t2hf-vfp cortexa17t2hf-vfp-neon"
+# HF Tunes
+AVAILTUNES += "cortexa17hf cortexa17thf cortexa17hf-neon cortexa17thf-neon cortexa17hf-neon-vfpv4 cortexa17thf-neon-vfpv4"
+ARMPKGARCH_tune-cortexa17hf             = "cortexa17"
+ARMPKGARCH_tune-cortexa17thf            = "cortexa17"
+ARMPKGARCH_tune-cortexa17hf-neon        = "cortexa17"
+ARMPKGARCH_tune-cortexa17thf-neon       = "cortexa17"
+ARMPKGARCH_tune-cortexa17hf-neon-vfpv4  = "cortexa17"
+ARMPKGARCH_tune-cortexa17thf-neon-vfpv4 = "cortexa17"
+TUNE_FEATURES_tune-cortexa17hf             = "${TUNE_FEATURES_tune-armv7vehf}             cortexa17"
+TUNE_FEATURES_tune-cortexa17thf            = "${TUNE_FEATURES_tune-armv7vethf}            cortexa17"
+TUNE_FEATURES_tune-cortexa17hf-neon        = "${TUNE_FEATURES_tune-armv7vehf-neon}        cortexa17"
+TUNE_FEATURES_tune-cortexa17thf-neon       = "${TUNE_FEATURES_tune-armv7vethf-neon}       cortexa17"
+TUNE_FEATURES_tune-cortexa17hf-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4}  cortexa17"
+TUNE_FEATURES_tune-cortexa17thf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} cortexa17"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17hf             = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf}  cortexa17hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17thf            = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} cortexa17hf-vfp cortexa17t2hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17hf-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon}  cortexa17hf-vfp cortexa17hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17thf-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon} cortexa17hf-vfp cortexa17hf-neon cortexa17t2hf-vfp cortexa17t2hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17hf-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4}  cortexa17hf-vfp cortexa17hf-neon cortexa17hf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa17thf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon-vfpv4} cortexa17hf-vfp cortexa17hf-neon cortexa17hf-neon-vfpv4 cortexa17t2hf-vfp cortexa17t2hf-neon cortexa17t2hf-neon-vfpv4"
diff --git a/yocto-poky/meta/conf/machine/include/tune-cortexa5.inc b/yocto-poky/meta/conf/machine/include/tune-cortexa5.inc
index 139e65c..c7e5ab9 100644
--- a/yocto-poky/meta/conf/machine/include/tune-cortexa5.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-cortexa5.inc
@@ -3,34 +3,34 @@
 require conf/machine/include/arm/arch-armv7a.inc
 
 TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa5", " -mtune=cortex-a5", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}"
 
 # Little Endian base configs
 AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"
-ARMPKGARCH_tune-cortexa5 = "cortexa5"
-ARMPKGARCH_tune-cortexa5t = "cortexa5"
-ARMPKGARCH_tune-cortexa5-neon = "cortexa5"
-ARMPKGARCH_tune-cortexa5t-neon = "cortexa5"
-TUNE_FEATURES_tune-cortexa5 = "${TUNE_FEATURES_tune-armv7a} cortexa5"
-TUNE_FEATURES_tune-cortexa5t = "${TUNE_FEATURES_tune-armv7at} cortexa5"
-TUNE_FEATURES_tune-cortexa5-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa5"
-TUNE_FEATURES_tune-cortexa5t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa5"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa5-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa5-vfp cortexa5t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa5-vfp cortexa5-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa5-vfp cortexa5-vfp-neon cortexa5t2-vfp cortexa5t2-vfp-neon"
+ARMPKGARCH_tune-cortexa5             = "cortexa5"
+ARMPKGARCH_tune-cortexa5t            = "cortexa5"
+ARMPKGARCH_tune-cortexa5-neon        = "cortexa5"
+ARMPKGARCH_tune-cortexa5t-neon       = "cortexa5"
+TUNE_FEATURES_tune-cortexa5             = "${TUNE_FEATURES_tune-armv7a}             cortexa5"
+TUNE_FEATURES_tune-cortexa5t            = "${TUNE_FEATURES_tune-armv7at}            cortexa5"
+TUNE_FEATURES_tune-cortexa5-neon        = "${TUNE_FEATURES_tune-armv7a-neon}        cortexa5"
+TUNE_FEATURES_tune-cortexa5t-neon       = "${TUNE_FEATURES_tune-armv7at-neon}       cortexa5"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5             = "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  cortexa5-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5t            = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa5-vfp cortexa5t2-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon}  cortexa5-vfp cortexa5-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5t-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa5-vfp cortexa5-neon cortexa5t2-vfp cortexa5t2-neon"
 
-# VFP Tunes
+# HF Tunes
 AVAILTUNES += "cortexa5hf cortexa5thf cortexa5hf-neon cortexa5thf-neon"
-ARMPKGARCH_tune-cortexa5hf = "cortexa5"
-ARMPKGARCH_tune-cortexa5thf = "cortexa5"
-ARMPKGARCH_tune-cortexa5hf-neon = "cortexa5"
-ARMPKGARCH_tune-cortexa5thf-neon = "cortexa5"
-TUNE_FEATURES_tune-cortexa5hf ?= "${TUNE_FEATURES_tune-armv7ahf} cortexa5"
-TUNE_FEATURES_tune-cortexa5thf ?= "${TUNE_FEATURES_tune-armv7athf} cortexa5"
-TUNE_FEATURES_tune-cortexa5hf-neon ?= "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa5"
-TUNE_FEATURES_tune-cortexa5thf-neon ?= "${TUNE_FEATURES_tune-armv7athf-neon} cortexa5"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa5hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa5hf-vfp cortexa5t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa5hf-vfp cortexa5hf-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa5thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa5hf-vfp cortexa5hf-vfp-neon cortexa5t2hf-vfp cortexa5t2hf-vfp-neon"
+ARMPKGARCH_tune-cortexa5hf             = "cortexa5"
+ARMPKGARCH_tune-cortexa5thf            = "cortexa5"
+ARMPKGARCH_tune-cortexa5hf-neon        = "cortexa5"
+ARMPKGARCH_tune-cortexa5thf-neon       = "cortexa5"
+TUNE_FEATURES_tune-cortexa5hf             = "${TUNE_FEATURES_tune-armv7ahf}             cortexa5"
+TUNE_FEATURES_tune-cortexa5thf            = "${TUNE_FEATURES_tune-armv7athf}            cortexa5"
+TUNE_FEATURES_tune-cortexa5hf-neon        = "${TUNE_FEATURES_tune-armv7ahf-neon}        cortexa5"
+TUNE_FEATURES_tune-cortexa5thf-neon       = "${TUNE_FEATURES_tune-armv7athf-neon}       cortexa5"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5hf             = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf}  cortexa5hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5thf            = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa5hf-vfp cortexa5t2hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5hf-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon}  cortexa5hf-vfp cortexa5hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa5thf-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa5hf-vfp cortexa5hf-neon cortexa5t2hf-vfp cortexa5t2hf-neon"
diff --git a/yocto-poky/meta/conf/machine/include/tune-cortexa7.inc b/yocto-poky/meta/conf/machine/include/tune-cortexa7.inc
index 9d06910..10b6ea7 100644
--- a/yocto-poky/meta/conf/machine/include/tune-cortexa7.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-cortexa7.inc
@@ -1,42 +1,48 @@
-DEFAULTTUNE ?= "armv7a-neon"
+DEFAULTTUNE ?= "armv7ve-neon"
 
-require conf/machine/include/arm/arch-armv7a.inc
+require conf/machine/include/arm/arch-armv7ve.inc
 
 TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa7", " -mtune=cortex-a7", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}"
 
 # Little Endian base configs
-AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon"
-ARMPKGARCH_tune-cortexa7 = "cortexa7"
-ARMPKGARCH_tune-cortexa7t = "cortexa7"
-ARMPKGARCH_tune-cortexa7-neon = "cortexa7"
-ARMPKGARCH_tune-cortexa7t-neon = "cortexa7"
-TUNE_FEATURES_tune-cortexa7 = "${TUNE_FEATURES_tune-armv7a} cortexa7"
-TUNE_FEATURES_tune-cortexa7t = "${TUNE_FEATURES_tune-armv7at} cortexa7"
-TUNE_FEATURES_tune-cortexa7-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa7"
-TUNE_FEATURES_tune-cortexa7t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa7"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa7-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa7-vfp cortexa7t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa7-vfp cortexa7-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa7-vfp cortexa7-vfp-neon cortexa7t2-vfp cortexa7t2-vfp-neon"
+AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"
+ARMPKGARCH_tune-cortexa7             = "cortexa7"
+ARMPKGARCH_tune-cortexa7t            = "cortexa7"
+ARMPKGARCH_tune-cortexa7-neon        = "cortexa7"
+ARMPKGARCH_tune-cortexa7t-neon       = "cortexa7"
+ARMPKGARCH_tune-cortexa7-neon-vfpv4  = "cortexa7"
+ARMPKGARCH_tune-cortexa7t-neon-vfpv4 = "cortexa7"
+TUNE_FEATURES_tune-cortexa7             = "${TUNE_FEATURES_tune-armv7ve}             cortexa7"
+TUNE_FEATURES_tune-cortexa7t            = "${TUNE_FEATURES_tune-armv7vet}            cortexa7"
+TUNE_FEATURES_tune-cortexa7-neon        = "${TUNE_FEATURES_tune-armv7ve-neon}        cortexa7"
+TUNE_FEATURES_tune-cortexa7t-neon       = "${TUNE_FEATURES_tune-armv7vet-neon}       cortexa7"
+TUNE_FEATURES_tune-cortexa7-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7ve-neon-vfpv4}  cortexa7"
+TUNE_FEATURES_tune-cortexa7t-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vet-neon-vfpv4} cortexa7"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7             = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve}  cortexa7-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7t            = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet} cortexa7-vfp cortexa7t2-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon}  cortexa7-vfp cortexa7-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7t-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon} cortexa7-vfp cortexa7-neon cortexa7t2-vfp cortexa7t2-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7ve-neon-vfpv4}  cortexa7-vfp cortexa7-neon cortexa7-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7t-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vet-neon-vfpv4} cortexa7-vfp cortexa7-neon cortexa7-neon-vfpv4 cortexa7t2-vfp cortexa7t2-neon cortexa7t2-neon-vfpv4"
 
-# VFP Tunes
+# HF Tunes
 AVAILTUNES += "cortexa7hf cortexa7thf cortexa7hf-neon cortexa7thf-neon cortexa7hf-neon-vfpv4 cortexa7thf-neon-vfpv4"
-ARMPKGARCH_tune-cortexa7hf = "cortexa7"
-ARMPKGARCH_tune-cortexa7thf = "cortexa7"
-ARMPKGARCH_tune-cortexa7hf-neon = "cortexa7"
-ARMPKGARCH_tune-cortexa7thf-neon = "cortexa7"
-ARMPKGARCH_tune-cortexa7hf-neon-vfpv4 = "cortexa7"
+ARMPKGARCH_tune-cortexa7hf             = "cortexa7"
+ARMPKGARCH_tune-cortexa7thf            = "cortexa7"
+ARMPKGARCH_tune-cortexa7hf-neon        = "cortexa7"
+ARMPKGARCH_tune-cortexa7thf-neon       = "cortexa7"
+ARMPKGARCH_tune-cortexa7hf-neon-vfpv4  = "cortexa7"
 ARMPKGARCH_tune-cortexa7thf-neon-vfpv4 = "cortexa7"
-TUNE_FEATURES_tune-cortexa7hf ?= "${TUNE_FEATURES_tune-armv7ahf} cortexa7"
-TUNE_FEATURES_tune-cortexa7thf ?= "${TUNE_FEATURES_tune-armv7athf} cortexa7"
-TUNE_FEATURES_tune-cortexa7hf-neon ?= "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa7"
-TUNE_FEATURES_tune-cortexa7thf-neon ?= "${TUNE_FEATURES_tune-armv7athf-neon} cortexa7"
-TUNE_FEATURES_tune-cortexa7hf-neon-vfpv4 ?= "${TUNE_FEATURES_tune-armv7ahf-neon-vfpv4} cortexa7"
-TUNE_FEATURES_tune-cortexa7thf-neon-vfpv4 ?= "${TUNE_FEATURES_tune-armv7athf-neon-vfpv4} cortexa7"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa7hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa7hf-vfp cortexa7t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa7hf-vfp cortexa7hf-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa7hf-vfp cortexa7hf-vfp-neon cortexa7t2hf-vfp cortexa7t2hf-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7hf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon-vfpv4} cortexa7hf-vfp cortexa7hf-vfp-neon cortexa7hf-vfp-vfpv4-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa7thf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon-vfpv4} cortexa7hf-vfp cortexa7hf-vfp-neon cortexa7t2hf-vfp cortexa7t2hf-vfp-neon cortexa7hf-vfp-vfpv4-neon cortexa7t2hf-vfp-vfpv4-neon"
+TUNE_FEATURES_tune-cortexa7hf             = "${TUNE_FEATURES_tune-armv7vehf}             cortexa7"
+TUNE_FEATURES_tune-cortexa7thf            = "${TUNE_FEATURES_tune-armv7vethf}            cortexa7"
+TUNE_FEATURES_tune-cortexa7hf-neon        = "${TUNE_FEATURES_tune-armv7vehf-neon}        cortexa7"
+TUNE_FEATURES_tune-cortexa7thf-neon       = "${TUNE_FEATURES_tune-armv7vethf-neon}       cortexa7"
+TUNE_FEATURES_tune-cortexa7hf-neon-vfpv4  = "${TUNE_FEATURES_tune-armv7vehf-neon-vfpv4}  cortexa7"
+TUNE_FEATURES_tune-cortexa7thf-neon-vfpv4 = "${TUNE_FEATURES_tune-armv7vethf-neon-vfpv4} cortexa7"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7hf             = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf}  cortexa7hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7thf            = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf} cortexa7hf-vfp cortexa7t2hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7hf-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon}  cortexa7hf-vfp cortexa7hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7thf-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon} cortexa7hf-vfp cortexa7hf-neon cortexa7t2hf-vfp cortexa7t2hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7hf-neon-vfpv4  = "${PACKAGE_EXTRA_ARCHS_tune-armv7vehf-neon-vfpv4}  cortexa7hf-vfp cortexa7hf-neon cortexa7hf-neon-vfpv4"
+PACKAGE_EXTRA_ARCHS_tune-cortexa7thf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7vethf-neon-vfpv4} cortexa7hf-vfp cortexa7hf-neon cortexa7hf-neon-vfpv4 cortexa7t2hf-vfp cortexa7t2hf-neon cortexa7t2hf-neon-vfpv4"
diff --git a/yocto-poky/meta/conf/machine/include/tune-cortexa8.inc b/yocto-poky/meta/conf/machine/include/tune-cortexa8.inc
index 771537f..c8ce021 100644
--- a/yocto-poky/meta/conf/machine/include/tune-cortexa8.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-cortexa8.inc
@@ -3,34 +3,34 @@
 require conf/machine/include/arm/arch-armv7a.inc
 
 TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa8", " -mtune=cortex-a8", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}"
 
 # Little Endian base configs
 AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"
-ARMPKGARCH_tune-cortexa8 = "cortexa8"
-ARMPKGARCH_tune-cortexa8t = "cortexa8"
-ARMPKGARCH_tune-cortexa8-neon = "cortexa8"
-ARMPKGARCH_tune-cortexa8t-neon = "cortexa8"
-TUNE_FEATURES_tune-cortexa8 = "${TUNE_FEATURES_tune-armv7a} cortexa8"
-TUNE_FEATURES_tune-cortexa8t = "${TUNE_FEATURES_tune-armv7at} cortexa8"
-TUNE_FEATURES_tune-cortexa8-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa8"
-TUNE_FEATURES_tune-cortexa8t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa8"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa8-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa8-vfp cortexa8t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa8-vfp cortexa8-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa8-vfp cortexa8-vfp-neon cortexa8t2-vfp cortexa8t2-vfp-neon"
+ARMPKGARCH_tune-cortexa8             = "cortexa8"
+ARMPKGARCH_tune-cortexa8t            = "cortexa8"
+ARMPKGARCH_tune-cortexa8-neon        = "cortexa8"
+ARMPKGARCH_tune-cortexa8t-neon       = "cortexa8"
+TUNE_FEATURES_tune-cortexa8             = "${TUNE_FEATURES_tune-armv7a}             cortexa8"
+TUNE_FEATURES_tune-cortexa8t            = "${TUNE_FEATURES_tune-armv7at}            cortexa8"
+TUNE_FEATURES_tune-cortexa8-neon        = "${TUNE_FEATURES_tune-armv7a-neon}        cortexa8"
+TUNE_FEATURES_tune-cortexa8t-neon       = "${TUNE_FEATURES_tune-armv7at-neon}       cortexa8"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8             = "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  cortexa8-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8t            = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa8-vfp cortexa8t2-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon}  cortexa8-vfp cortexa8-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8t-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa8-vfp cortexa8-neon cortexa8t2-vfp cortexa8t2-neon"
 
-# VFP Tunes
+# HF Tunes
 AVAILTUNES += "cortexa8hf cortexa8thf cortexa8hf-neon cortexa8thf-neon"
-ARMPKGARCH_tune-cortexa8hf = "cortexa8"
-ARMPKGARCH_tune-cortexa8thf = "cortexa8"
-ARMPKGARCH_tune-cortexa8hf-neon = "cortexa8"
-ARMPKGARCH_tune-cortexa8thf-neon = "cortexa8"
-TUNE_FEATURES_tune-cortexa8hf ?= "${TUNE_FEATURES_tune-armv7ahf} cortexa8"
-TUNE_FEATURES_tune-cortexa8thf ?= "${TUNE_FEATURES_tune-armv7athf} cortexa8"
-TUNE_FEATURES_tune-cortexa8hf-neon ?= "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa8"
-TUNE_FEATURES_tune-cortexa8thf-neon ?= "${TUNE_FEATURES_tune-armv7athf-neon} cortexa8"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa8hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa8hf-vfp cortexa8t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa8hf-vfp cortexa8hf-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa8thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa8hf-vfp cortexa8hf-vfp-neon cortexa8t2hf-vfp cortexa8t2hf-vfp-neon"
+ARMPKGARCH_tune-cortexa8hf             = "cortexa8"
+ARMPKGARCH_tune-cortexa8thf            = "cortexa8"
+ARMPKGARCH_tune-cortexa8hf-neon        = "cortexa8"
+ARMPKGARCH_tune-cortexa8thf-neon       = "cortexa8"
+TUNE_FEATURES_tune-cortexa8hf             = "${TUNE_FEATURES_tune-armv7ahf}             cortexa8"
+TUNE_FEATURES_tune-cortexa8thf            = "${TUNE_FEATURES_tune-armv7athf}            cortexa8"
+TUNE_FEATURES_tune-cortexa8hf-neon        = "${TUNE_FEATURES_tune-armv7ahf-neon}        cortexa8"
+TUNE_FEATURES_tune-cortexa8thf-neon       = "${TUNE_FEATURES_tune-armv7athf-neon}       cortexa8"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8hf             = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf}  cortexa8hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8thf            = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa8hf-vfp cortexa8t2hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8hf-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon}  cortexa8hf-vfp cortexa8hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa8thf-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa8hf-vfp cortexa8hf-neon cortexa8t2hf-vfp cortexa8t2hf-neon"
diff --git a/yocto-poky/meta/conf/machine/include/tune-cortexa9.inc b/yocto-poky/meta/conf/machine/include/tune-cortexa9.inc
index 700394b..3d8dc1d 100644
--- a/yocto-poky/meta/conf/machine/include/tune-cortexa9.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-cortexa9.inc
@@ -3,34 +3,49 @@
 require conf/machine/include/arm/arch-armv7a.inc
 
 TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexa9", " -mtune=cortex-a9", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}"
 
 # Little Endian base configs
 AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"
-ARMPKGARCH_tune-cortexa9 = "cortexa9"
-ARMPKGARCH_tune-cortexa9t = "cortexa9"
-ARMPKGARCH_tune-cortexa9-neon = "cortexa9"
-ARMPKGARCH_tune-cortexa9t-neon = "cortexa9"
-TUNE_FEATURES_tune-cortexa9 = "${TUNE_FEATURES_tune-armv7a} cortexa9"
-TUNE_FEATURES_tune-cortexa9t = "${TUNE_FEATURES_tune-armv7at} cortexa9"
-TUNE_FEATURES_tune-cortexa9-neon = "${TUNE_FEATURES_tune-armv7a-neon} cortexa9"
-TUNE_FEATURES_tune-cortexa9t-neon = "${TUNE_FEATURES_tune-armv7at-neon} cortexa9"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9 = "${PACKAGE_EXTRA_ARCHS_tune-armv7a} cortexa9-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9t = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa9-vfp cortexa9t2-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon} cortexa9-vfp cortexa9-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9t-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa9-vfp cortexa9-vfp-neon cortexa9t2-vfp cortexa9t2-vfp-neon"
+ARMPKGARCH_tune-cortexa9             = "cortexa9"
+ARMPKGARCH_tune-cortexa9t            = "cortexa9"
+ARMPKGARCH_tune-cortexa9-neon        = "cortexa9"
+ARMPKGARCH_tune-cortexa9t-neon       = "cortexa9"
+TUNE_FEATURES_tune-cortexa9             = "${TUNE_FEATURES_tune-armv7a}             cortexa9"
+TUNE_FEATURES_tune-cortexa9t            = "${TUNE_FEATURES_tune-armv7at}            cortexa9"
+TUNE_FEATURES_tune-cortexa9-neon        = "${TUNE_FEATURES_tune-armv7a-neon}        cortexa9"
+TUNE_FEATURES_tune-cortexa9t-neon       = "${TUNE_FEATURES_tune-armv7at-neon}       cortexa9"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9             = "${PACKAGE_EXTRA_ARCHS_tune-armv7a}  cortexa9-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9t            = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexa9-vfp cortexa9t2-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-neon}  cortexa9-vfp cortexa9-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9t-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-neon} cortexa9-vfp cortexa9-neon cortexa9t2-vfp cortexa9t2-neon"
 
-# VFP Tunes
+# HF Tunes
 AVAILTUNES += "cortexa9hf cortexa9thf cortexa9hf-neon cortexa9thf-neon"
-ARMPKGARCH_tune-cortexa9hf = "cortexa9"
-ARMPKGARCH_tune-cortexa9thf = "cortexa9"
-ARMPKGARCH_tune-cortexa9hf-neon = "cortexa9"
-ARMPKGARCH_tune-cortexa9thf-neon = "cortexa9"
-TUNE_FEATURES_tune-cortexa9hf ?= "${TUNE_FEATURES_tune-armv7ahf} cortexa9"
-TUNE_FEATURES_tune-cortexa9thf ?= "${TUNE_FEATURES_tune-armv7athf} cortexa9"
-TUNE_FEATURES_tune-cortexa9hf-neon ?= "${TUNE_FEATURES_tune-armv7ahf-neon} cortexa9"
-TUNE_FEATURES_tune-cortexa9thf-neon ?= "${TUNE_FEATURES_tune-armv7athf-neon} cortexa9"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9hf = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} cortexa9hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9thf = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa9hf-vfp cortexa9t2hf-vfp"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9hf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} cortexa9hf-vfp cortexa9hf-vfp-neon"
-PACKAGE_EXTRA_ARCHS_tune-cortexa9thf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa9hf-vfp cortexa9hf-vfp-neon cortexa9t2hf-vfp cortexa9t2hf-vfp-neon"
+ARMPKGARCH_tune-cortexa9hf             = "cortexa9"
+ARMPKGARCH_tune-cortexa9thf            = "cortexa9"
+ARMPKGARCH_tune-cortexa9hf-neon        = "cortexa9"
+ARMPKGARCH_tune-cortexa9thf-neon       = "cortexa9"
+TUNE_FEATURES_tune-cortexa9hf             = "${TUNE_FEATURES_tune-armv7ahf}             cortexa9"
+TUNE_FEATURES_tune-cortexa9thf            = "${TUNE_FEATURES_tune-armv7athf}            cortexa9"
+TUNE_FEATURES_tune-cortexa9hf-neon        = "${TUNE_FEATURES_tune-armv7ahf-neon}        cortexa9"
+TUNE_FEATURES_tune-cortexa9thf-neon       = "${TUNE_FEATURES_tune-armv7athf-neon}       cortexa9"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9hf             = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf}  cortexa9hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9thf            = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} cortexa9hf-vfp cortexa9t2hf-vfp"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9hf-neon        = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon}  cortexa9hf-vfp cortexa9hf-neon"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9thf-neon       = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} cortexa9hf-vfp cortexa9hf-neon cortexa9t2hf-vfp cortexa9t2hf-neon"
+
+# VFPv3 Tunes
+AVAILTUNES += "cortexa9-vfpv3 cortexa9t-vfpv3 cortexa9hf-vfpv3 cortexa9thf-vfpv3"
+ARMPKGARCH_tune-cortexa9-vfpv3          = "cortexa9"
+ARMPKGARCH_tune-cortexa9t-vfpv3         = "cortexa9"
+ARMPKGARCH_tune-cortexa9hf-vfpv3        = "cortexa9"
+ARMPKGARCH_tune-cortexa9thf-vfpv3       = "cortexa9"
+TUNE_FEATURES_tune-cortexa9-vfpv3           = "${TUNE_FEATURES_tune-armv7a-vfpv3}          cortexa9"
+TUNE_FEATURES_tune-cortexa9t-vfpv3          = "${TUNE_FEATURES_tune-armv7at-vfpv3}         cortexa9"
+TUNE_FEATURES_tune-cortexa9hf-vfpv3         = "${TUNE_FEATURES_tune-armv7ahf-vfpv3}        cortexa9"
+TUNE_FEATURES_tune-cortexa9thf-vfpv3        = "${TUNE_FEATURES_tune-armv7athf-vfpv3}       cortexa9"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9-vfpv3           = "${PACKAGE_EXTRA_ARCHS_tune-armv7a-vfpv3}  cortexa9-vfp cortexa9-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9t-vfpv3          = "${PACKAGE_EXTRA_ARCHS_tune-armv7at-vfpv3} cortexa9-vfp cortexa9-vfpv3 cortexa9t2-vfp cortexa9t2-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9hf-vfpv3         = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-vfpv3}  cortexa9hf-vfp cortexa9hf-vfpv3"
+PACKAGE_EXTRA_ARCHS_tune-cortexa9thf-vfpv3        = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-vfpv3} cortexa9hf-vfp cortexa9hf-vfpv3 cortexa9t2hf-vfp cortexa9t2hf-vfpv3"
diff --git a/yocto-poky/meta/conf/machine/include/tune-cortexm1.inc b/yocto-poky/meta/conf/machine/include/tune-cortexm1.inc
deleted file mode 100644
index 3b65279..0000000
--- a/yocto-poky/meta/conf/machine/include/tune-cortexm1.inc
+++ /dev/null
@@ -1,11 +0,0 @@
-DEFAULTTUNE ?= "armv7a"
-
-require conf/machine/include/arm/arch-armv7a.inc
-
-TUNEVALID[cortexm1] = "Enable Cortex-M1 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexm1", " -mtune=cortex-m1", "", d)}"
-
-AVAILTUNES += "cortexm1"
-ARMPKGARCH_tune-cortexm1 = "cortexm1"
-TUNE_FEATURES_tune-cortexm1 = "${TUNE_FEATURES_tune-armv7a} cortexm1"
-PACKAGE_EXTRA_ARCHS_tune-cortexm1 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} cortexm1-vfp"
diff --git a/yocto-poky/meta/conf/machine/include/tune-cortexm3.inc b/yocto-poky/meta/conf/machine/include/tune-cortexm3.inc
deleted file mode 100644
index cbc4c0d..0000000
--- a/yocto-poky/meta/conf/machine/include/tune-cortexm3.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFAULTTUNE ?= "cortexm3"
-
-require conf/machine/include/arm/arch-armv7a.inc
-
-TUNEVALID[cortexm3] = "Enable Cortex-M3 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexm3", " -mtune=cortex-m3", "", d)}"
-
-TUNEVALID[armv7m] = "Enable Cortex-M3 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "armv7m", " -march=armv7-m", "", d)}"
-
-AVAILTUNES += "cortexm3"
-ARMPKGARCH_tune-cortexm3 = "armv7m"
-TUNE_FEATURES_tune-cortexm3 = "armv7m vfp cortexm3"
-PACKAGE_EXTRA_ARCHS_tune-cortexm3 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7m-vfp"
diff --git a/yocto-poky/meta/conf/machine/include/tune-cortexr4.inc b/yocto-poky/meta/conf/machine/include/tune-cortexr4.inc
deleted file mode 100644
index bde649f..0000000
--- a/yocto-poky/meta/conf/machine/include/tune-cortexr4.inc
+++ /dev/null
@@ -1,14 +0,0 @@
-DEFAULTTUNE ?= "cortexr4"
-
-require conf/machine/include/arm/arch-armv7a.inc
-
-TUNEVALID[cortexr4] = "Enable Cortex-R4 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "cortexr4", " -mtune=cortex-r4", "", d)}"
-
-TUNEVALID[armv7r] = "Enable Cortex-R4 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "armv7r", " -march=armv7-r", "", d)}"
-
-AVAILTUNES += "cortexr4"
-ARMPKGARCH_tune-cortexr4 = "armv7r"
-TUNE_FEATURES_tune-cortexr4 = "armv7r vfp cortexr4 arm thumb"
-PACKAGE_EXTRA_ARCHS_tune-cortexr4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7at} armv7r-vfp"
diff --git a/yocto-poky/meta/conf/machine/include/tune-ep9312.inc b/yocto-poky/meta/conf/machine/include/tune-ep9312.inc
index b19b438..84ca528 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ep9312.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ep9312.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/arm/arch-armv4.inc
 
 TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ep9312", " -march=ep9312 -mtune=ep9312", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}"
 
 AVAILTUNES += "ep9312"
 ARMPKGARCH_tune-ep9312 = "ep9312"
diff --git a/yocto-poky/meta/conf/machine/include/tune-i586-nlp.inc b/yocto-poky/meta/conf/machine/include/tune-i586-nlp.inc
index e30602b..88e5903 100644
--- a/yocto-poky/meta/conf/machine/include/tune-i586-nlp.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-i586-nlp.inc
@@ -9,7 +9,7 @@
 
 # x86 with no lock prefix
 TUNEVALID[i586-nlp] = "IA32 with Lock Prefix omitted"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "i586-nlp", " -march=i586 -Wa,-momit-lock-prefix=yes", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'i586-nlp', ' -march=i586 -Wa,-momit-lock-prefix=yes', '', d)}"
 
 # Quark tune feature
 AVAILTUNES = "i586-nlp-32"
diff --git a/yocto-poky/meta/conf/machine/include/tune-i586.inc b/yocto-poky/meta/conf/machine/include/tune-i586.inc
index 5fbb3c7..1ab17bd 100644
--- a/yocto-poky/meta/conf/machine/include/tune-i586.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-i586.inc
@@ -4,7 +4,7 @@
 
 # Extra tune features
 TUNEVALID[i586] = "Enable i586 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "i586", " -march=i586", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'i586', ' -march=i586', '', d)}"
 
 # Extra tune selections
 AVAILTUNES += "i586"
diff --git a/yocto-poky/meta/conf/machine/include/tune-iwmmxt.inc b/yocto-poky/meta/conf/machine/include/tune-iwmmxt.inc
index 748ca0d..f27423c 100644
--- a/yocto-poky/meta/conf/machine/include/tune-iwmmxt.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-iwmmxt.inc
@@ -6,7 +6,7 @@
 require conf/machine/include/arm/arch-armv5-dsp.inc
 
 TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "iwmmxt", " -march=iwmmxt -mtune=iwmmxt", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}"
 
 AVAILTUNES += "iwmmxt"
 ARMPKGARCH_tune-iwmmxt = "iwmmxt"
diff --git a/yocto-poky/meta/conf/machine/include/tune-mips32.inc b/yocto-poky/meta/conf/machine/include/tune-mips32.inc
index ae326ce..ce0445f 100644
--- a/yocto-poky/meta/conf/machine/include/tune-mips32.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-mips32.inc
@@ -4,7 +4,7 @@
 
 TUNEVALID[mips32] = "Enable mips32 specific processor optimizations"
 TUNECONFLICTS[mips32] = "n64 n32"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "mips32", " -march=mips32", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips32', ' -march=mips32', '', d)}"
 
 AVAILTUNES += "mips32 mips32el mips32-nf mips32el-nf"
 
diff --git a/yocto-poky/meta/conf/machine/include/tune-mips32r2.inc b/yocto-poky/meta/conf/machine/include/tune-mips32r2.inc
index c9deff8..0e95ec8 100644
--- a/yocto-poky/meta/conf/machine/include/tune-mips32r2.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-mips32r2.inc
@@ -4,7 +4,7 @@
 
 TUNEVALID[mips32r2] = "Enable mips32r2 specific processor optimizations"
 TUNECONFLICTS[mips32r2] = "n64 n32"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "mips32r2", " -march=mips32r2", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips32r2', ' -march=mips32r2', '', d)}"
 
 AVAILTUNES += "mips32r2 mips32r2el"
 
diff --git a/yocto-poky/meta/conf/machine/include/tune-octeon.inc b/yocto-poky/meta/conf/machine/include/tune-octeon.inc
index f24d9db..b5deb8f 100644
--- a/yocto-poky/meta/conf/machine/include/tune-octeon.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-octeon.inc
@@ -5,7 +5,7 @@
 AVAILTUNES += "octeon2 octeon2_64 octeon3 octeon3_64"
 
 TUNEVALID[octeon2] = "Enable optimization related to octeon2 support"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "octeon2", " -march=octeon2 ", "",d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'octeon2', ' -march=octeon2 ', '',d)}"
 
 TUNE_FEATURES_tune-octeon2 = "${TUNE_FEATURES_tune-mips64-n32} octeon2"
 BASE_LIB_tune-octeon2 = "lib32"
@@ -19,7 +19,7 @@
 
 
 TUNEVALID[octeon3] = "Enable optimization related to octeon3 support"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "octeon3", " -march=octeon3 ", "",d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'octeon3', ' -march=octeon3 ', '',d)}"
 
 TUNE_FEATURES_tune-octeon3 = "${TUNE_FEATURES_tune-mips64-n32} octeon3"
 BASE_LIB_tune-octeon3 = "lib32"
diff --git a/yocto-poky/meta/conf/machine/include/tune-power5.inc b/yocto-poky/meta/conf/machine/include/tune-power5.inc
index 30be869..a346c30 100644
--- a/yocto-poky/meta/conf/machine/include/tune-power5.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-power5.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/powerpc/arch-powerpc64.inc
 
 TUNEVALID[power5] = "Enable IBM Power5 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "power5", " -mcpu=power5", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'power5', ' -mcpu=power5', '', d)}"
 
 AVAILTUNES += "ppcp5 ppc64p5"
 TUNE_FEATURES_tune-ppcp5 = "m32 fpu-hard power5 altivec"
@@ -17,5 +17,5 @@
 PACKAGE_EXTRA_ARCHS_tune-ppc64p5 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p5"
 
 # glibc configure options to get power5 specific library
-GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains("TUNE_FEATURES", "power5", "--with-cpu=power5", "", d)}"
-GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains("TUNE_FEATURES", "power5", "--with-cpu=power5", "", d)}"
+GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'power5', '--with-cpu=power5', '', d)}"
+GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'power5', '--with-cpu=power5', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/tune-power6.inc b/yocto-poky/meta/conf/machine/include/tune-power6.inc
index 7563798..ee200f9 100644
--- a/yocto-poky/meta/conf/machine/include/tune-power6.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-power6.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/powerpc/arch-powerpc64.inc
 
 TUNEVALID[power6] = "Enable IBM Power6 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "power6", " -mcpu=power6", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'power6', ' -mcpu=power6', '', d)}"
 
 AVAILTUNES += "ppcp6 ppc64p6"
 TUNE_FEATURES_tune-ppcp6 = "m32 fpu-hard power6 altivec"
@@ -17,5 +17,5 @@
 PACKAGE_EXTRA_ARCHS_tune-ppc64p6 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p6"
 
 # glibc configure options to get power6 specific library
-GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains("TUNE_FEATURES", "power6", "--with-cpu=power6", "", d)}"
-GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains("TUNE_FEATURES", "power6", "--with-cpu=power6", "", d)}"
+GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'power6', '--with-cpu=power6', '', d)}"
+GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'power6', '--with-cpu=power6', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/tune-power7.inc b/yocto-poky/meta/conf/machine/include/tune-power7.inc
index 7069e75..3a27719 100644
--- a/yocto-poky/meta/conf/machine/include/tune-power7.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-power7.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/powerpc/arch-powerpc64.inc
 
 TUNEVALID[power7] = "Enable IBM Power7 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "power7", " -mcpu=power7", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'power7', ' -mcpu=power7', '', d)}"
 
 AVAILTUNES += "ppcp7 ppc64p7"
 TUNE_FEATURES_tune-ppcp7 = "m32 fpu-hard power7 altivec"
@@ -17,5 +17,5 @@
 PACKAGE_EXTRA_ARCHS_tune-ppc64p7 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64p7"
 
 # glibc configure options to get power7 specific library
-GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains("TUNE_FEATURES", "power7", "--with-cpu=power7", "", d)}"
-GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains("TUNE_FEATURES", "power7", "--with-cpu=power7", "", d)}"
+GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'power7', '--with-cpu=power7', '', d)}"
+GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'power7', '--with-cpu=power7', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/tune-ppc476.inc b/yocto-poky/meta/conf/machine/include/tune-ppc476.inc
index 4ed185d..d0011ff 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ppc476.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ppc476.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNEVALID[ppc476] = "Enable ppc476 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppc476", " -mcpu=476", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppc476', ' -mcpu=476', '', d)}"
 
 AVAILTUNES += "ppc476"
 TUNE_FEATURES_tune-ppc476 = "m32 fpu-hard ppc476"
@@ -11,4 +11,4 @@
 PACKAGE_EXTRA_ARCHS_tune-ppc476 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppc476"
 
 # glibc configure options to get 476 specific library (for sqrt)
-GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppc476", "-with-cpu=476", "", d)}"
+GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'ppc476', '-with-cpu=476', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/tune-ppc603e.inc b/yocto-poky/meta/conf/machine/include/tune-ppc603e.inc
index d744a00..13f60dd 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ppc603e.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ppc603e.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNEVALID[ppc603e] = "Enable ppc603e specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", " -mcpu=603e", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppc603e', ' -mcpu=603e', '', d)}"
 
 AVAILTUNES += "ppc603e"
 TUNE_FEATURES_tune-ppc603e = "m32 fpu-hard ppc603e"
@@ -11,4 +11,4 @@
 PACKAGE_EXTRA_ARCHS_tune-ppc603e = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppc603e"
 
 # glibc configure options to get 603e specific library (for sqrt)
-GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppc603e", "-with-cpu=603e", "", d)}"
+GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'ppc603e', '-with-cpu=603e', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/tune-ppc7400.inc b/yocto-poky/meta/conf/machine/include/tune-ppc7400.inc
index 4ac0403..425e8bd 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ppc7400.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ppc7400.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNEVALID[ppc7400] = "Enable ppc7400 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppc7400", " -mcpu=7400", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppc7400', ' -mcpu=7400 -mno-spe', '', d)}"
 
 AVAILTUNES += "ppc7400"
 TUNE_FEATURES_tune-ppc7400 = "m32 fpu-hard ppc7400 altivec"
@@ -11,4 +11,4 @@
 PACKAGE_EXTRA_ARCHS_tune-ppc7400 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppc7400"
 
 # glibc configure options to get 7400 specific library (for sqrt)
-#GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppc7400", "--with-cpu=power4", "", d)}"
+#GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'ppc7400', '--with-cpu=power4', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/tune-ppce300c2.inc b/yocto-poky/meta/conf/machine/include/tune-ppce300c2.inc
index 05a9505..af21f60 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ppce300c2.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ppce300c2.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNEVALID[ppce300c2] = "Enable ppce300c2 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppce300c2", " -mcpu=e300c2", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppce300c2', ' -mcpu=e300c2', '', d)}"
 
 AVAILTUNES += "ppce300c2"
 TUNE_FEATURES_tune-ppce300c2 = "m32 fpu-soft ppce300c2"
diff --git a/yocto-poky/meta/conf/machine/include/tune-ppce300c3.inc b/yocto-poky/meta/conf/machine/include/tune-ppce300c3.inc
index b19cf22..a3d836c 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ppce300c3.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ppce300c3.inc
@@ -9,15 +9,15 @@
 TUNE_FEATURES_tune-ppce300c3 = "${TUNE_FEATURES_tune-powerpc} ppce300c3"
 TUNE_PKGARCH_tune-ppce300c3 = "ppce300c3"
 PACKAGE_EXTRA_ARCHS_tune-ppce300c3 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppce300c3"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppce300c3", " -mcpu=e300c3", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppce300c3', ' -mcpu=e300c3', '', d)}"
 
 # glibc config options to make use of e300c3 (603e) specific sqrt/sqrtf routines
-GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppce300c3", "--with-cpu=e300c3", "", d)}"
+GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'ppce300c3', '--with-cpu=e300c3', '', d)}"
 
 # soft-float
 TUNEVALID[ppce300c3-nf] = "Enable ppce300c3 specific processor optimizations (no fpu)"
 TUNE_FEATURES_tune-ppce300c3-nf = "${TUNE_FEATURES_tune-powerpc-nf} ppce300c3-nf"
 TUNE_PKGARCH_tune-ppce300c3-nf = "ppce300c3-nf"
 PACKAGE_EXTRA_ARCHS_tune-ppce300c3-nf = "${PACKAGE_EXTRA_ARCHS_tune-powerpc-nf} ppce300c3-nf"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppce300c3-nf", " -mcpu=e300c3", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppce300c3-nf', ' -mcpu=e300c3', '', d)}"
 
diff --git a/yocto-poky/meta/conf/machine/include/tune-ppce500.inc b/yocto-poky/meta/conf/machine/include/tune-ppce500.inc
index 70c1f8b..96073d2 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ppce500.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ppce500.inc
@@ -3,15 +3,15 @@
 require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNEVALID[ppce500] = "Enable ppce500 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppce500", " -mcpu=8540", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppce500', ' -mcpu=8540', '', d)}"
 
 TUNEVALID[spe] = "Enable SPE ABI extensions"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", [ "ppce500", "spe" ], " -mabi=spe -mspe -mfloat-gprs=single", "", d)}"
-TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", [ "ppce500" , "spe" ], "ppc-efs", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', [ 'ppce500', 'spe' ], ' -mabi=spe -mspe -mfloat-gprs=single', '', d)}"
+TARGET_FPU .= "${@bb.utils.contains('TUNE_FEATURES', [ 'ppce500' , 'spe' ], 'ppc-efs', '', d)}"
 
 # spe is defined potentially in two places, so we want to be sure it will
 # only write spe once to the ABIEXTENSIONS field.
-SPEABIEXTENSION = "${@bb.utils.contains("TUNE_FEATURES", "spe", "spe", "", d)}"
+SPEABIEXTENSION = "${@bb.utils.contains('TUNE_FEATURES', 'spe', 'spe', '', d)}"
 ABIEXTENSION .= "${SPEABIEXTENSION}"
 
 AVAILTUNES += "ppce500"
diff --git a/yocto-poky/meta/conf/machine/include/tune-ppce500mc.inc b/yocto-poky/meta/conf/machine/include/tune-ppce500mc.inc
index 744d8e5..a1ca9be 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ppce500mc.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ppce500mc.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNEVALID[ppce500mc] = "Enable ppce500mc specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppce500mc", " -mcpu=e500mc", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppce500mc', ' -mcpu=e500mc', '', d)}"
 
 AVAILTUNES += "ppce500mc"
 TUNE_FEATURES_tune-ppce500mc = "m32 fpu-hard ppce500mc"
@@ -11,4 +11,4 @@
 PACKAGE_EXTRA_ARCHS_tune-ppce500mc = "${PACKAGE_EXTRA_ARCHS_tune-powerpc} ppce500mc"
 
 # glibc configure options to get e500mc specific library (for sqrt)
-GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "ppce500mc", "-with-cpu=e500mc", "", d)}"
+GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'ppce500mc', '-with-cpu=e500mc', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/tune-ppce500v2.inc b/yocto-poky/meta/conf/machine/include/tune-ppce500v2.inc
index d014d70..20a5f25 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ppce500v2.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ppce500v2.inc
@@ -3,15 +3,15 @@
 require conf/machine/include/powerpc/arch-powerpc.inc
 
 TUNEVALID[ppce500v2] = "Enable ppce500v2 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "ppce500v2", " -mcpu=8548", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ppce500v2', ' -mcpu=8548', '', d)}"
 
 TUNEVALID[spe] = "Enable SPE ABI extensions"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", [ "ppce500v2", "spe" ], " -mabi=spe -mspe -mfloat-gprs=double", "", d)}"
-TARGET_FPU .= "${@bb.utils.contains("TUNE_FEATURES", [ "ppce500v2" , "spe" ], "ppc-efd", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', [ 'ppce500v2', 'spe' ], ' -mabi=spe -mspe -mfloat-gprs=double', '', d)}"
+TARGET_FPU .= "${@bb.utils.contains('TUNE_FEATURES', [ 'ppce500v2' , 'spe' ], 'ppc-efd', '', d)}"
 
 # spe is defined potentially in two places, so we want to be sure it will
 # only write spe once to the ABIEXTENSIONS field.
-SPEABIEXTENSION = "${@bb.utils.contains("TUNE_FEATURES", "spe", "spe", "", d)}"
+SPEABIEXTENSION = "${@bb.utils.contains('TUNE_FEATURES', 'spe', 'spe', '', d)}"
 ABIEXTENSION .= "${SPEABIEXTENSION}"
 
 AVAILTUNES += "ppce500v2"
diff --git a/yocto-poky/meta/conf/machine/include/tune-ppce5500.inc b/yocto-poky/meta/conf/machine/include/tune-ppce5500.inc
index 25231ef..ace2614 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ppce5500.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ppce5500.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/powerpc/arch-powerpc64.inc
 
 TUNEVALID[e5500] = "Enable Freescale e5500 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "e5500", " -mcpu=e5500", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'e5500', ' -mcpu=e5500', '', d)}"
 
 AVAILTUNES += "ppce5500 ppc64e5500"
 TUNE_FEATURES_tune-ppce5500 = "m32 fpu-hard e5500"
@@ -17,4 +17,4 @@
 PACKAGE_EXTRA_ARCHS_tune-ppc64e5500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64e5500"
 
 # glibc configure options to get e5500 specific library (for sqrt)
-GLIBC_EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "e5500", "--with-cpu=e5500", "", d)}"
+GLIBC_EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'e5500', '--with-cpu=e5500', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/tune-ppce6500.inc b/yocto-poky/meta/conf/machine/include/tune-ppce6500.inc
index ea743a3..da1e864 100644
--- a/yocto-poky/meta/conf/machine/include/tune-ppce6500.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-ppce6500.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/powerpc/arch-powerpc64.inc
 
 TUNEVALID[e6500] = "Enable Freescale e6500 specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "e6500", " -mcpu=e6500", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'e6500', ' -mcpu=e6500', '', d)}"
 
 AVAILTUNES += "ppce6500 ppc64e6500"
 TUNE_FEATURES_tune-ppce6500 = "m32 fpu-hard e6500 altivec"
@@ -17,5 +17,5 @@
 PACKAGE_EXTRA_ARCHS_tune-ppc64e6500 = "${PACKAGE_EXTRA_ARCHS_tune-powerpc64} ppc64e6500"
 
 # glibc configure options to get e6500 specific library
-GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains("TUNE_FEATURES", "e6500", "--with-cpu=e6500", "", d)}"
-GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains("TUNE_FEATURES", "e6500", "--with-cpu=e6500", "", d)}"
+GLIBC_EXTRA_OECONF_powerpc64 += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}"
+GLIBC_EXTRA_OECONF_powerpc += "${@bb.utils.contains('TUNE_FEATURES', 'e6500', '--with-cpu=e6500', '', d)}"
diff --git a/yocto-poky/meta/conf/machine/include/tune-sh3.inc b/yocto-poky/meta/conf/machine/include/tune-sh3.inc
index c5ed7ba..80df9a0 100644
--- a/yocto-poky/meta/conf/machine/include/tune-sh3.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-sh3.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/sh/arch-sh.inc
 
 TUNEVALID[sh3] = "Enable SH3 optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "sh3", " -m3", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'sh3', ' -m3', '', d)}"
 
 AVAILTUNES += "sh3 sh3eb"
 TUNE_FEATURES_tune-sh3 = "sh3"
diff --git a/yocto-poky/meta/conf/machine/include/tune-sh4.inc b/yocto-poky/meta/conf/machine/include/tune-sh4.inc
index 56e23b9..4160c30 100644
--- a/yocto-poky/meta/conf/machine/include/tune-sh4.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-sh4.inc
@@ -4,13 +4,13 @@
 require conf/machine/include/sh/arch-sh.inc
 
 TUNEVALID[sh4] = "Enable SH4 optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "sh4", " -m4", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'sh4', ' -m4', '', d)}"
 
 # NOTE: If you want to optimize to sh4a, conf/machine/include/tune-sh4a.inc.
 # But it is not compatible for sh4.
 # The binary optimized by m4a doesn't operate on sh4. It works on sh4a only.
 TUNEVALID[sh4a] = "Enable SH4a optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "sh4a", " -m4a", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'sh4a', ' -m4a', '', d)}"
 
 AVAILTUNES += "sh4 sh4eb sh4a sh4aeb"
 TUNE_FEATURES_tune-sh4 = "sh4"
diff --git a/yocto-poky/meta/conf/machine/include/tune-strongarm1100.inc b/yocto-poky/meta/conf/machine/include/tune-strongarm1100.inc
index ea2fba8..80cfb8a 100644
--- a/yocto-poky/meta/conf/machine/include/tune-strongarm1100.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-strongarm1100.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/arm/arch-armv4.inc
 
 TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "strongarm", " -mtune=strongarm1100", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}"
 
 AVAILTUNES += "strongarm"
 ARMPKGARCH_tune-strongarm = "strongarm"
diff --git a/yocto-poky/meta/conf/machine/include/tune-thunderx.inc b/yocto-poky/meta/conf/machine/include/tune-thunderx.inc
index 40de61d..3d43b0f 100644
--- a/yocto-poky/meta/conf/machine/include/tune-thunderx.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-thunderx.inc
@@ -5,13 +5,13 @@
 
 TUNEVALID[thunderx] = "Enable instructions for Cavium ThunderX"
 
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "thunderx", " -mcpu=thunderx ", "",d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx ', '',d)}"
 
 ARMPKGARCH_tune-thunderx ?= "thunderx"
 ARMPKGARCH_tune-thunderx_be ?= "thunderx_be"
 
-TUNE_FEATURES_tune-thunderx ?= "${TUNE_FEATURES_tune-aarch64} thunderx"
-TUNE_FEATURES_tune-thunderx_be ?= "${TUNE_FEATURES_tune-thunderx} bigendian"
+TUNE_FEATURES_tune-thunderx = "${TUNE_FEATURES_tune-aarch64} thunderx"
+TUNE_FEATURES_tune-thunderx_be = "${TUNE_FEATURES_tune-thunderx} bigendian"
 BASE_LIB_tune-thunderx = "lib64"
 BASE_LIB_tune-thunderx_be = "lib64"
 
diff --git a/yocto-poky/meta/conf/machine/include/tune-xscale.inc b/yocto-poky/meta/conf/machine/include/tune-xscale.inc
index 0c5ca8d..0d07333 100644
--- a/yocto-poky/meta/conf/machine/include/tune-xscale.inc
+++ b/yocto-poky/meta/conf/machine/include/tune-xscale.inc
@@ -3,7 +3,7 @@
 require conf/machine/include/arm/arch-armv5-dsp.inc
 
 TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "xscale", " -mtune=xscale", "", d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}"
 
 AVAILTUNES += "xscale"
 ARMPKGARCH_tune-xscale = "xscale"
diff --git a/yocto-poky/meta/conf/machine/include/x86-base.inc b/yocto-poky/meta/conf/machine/include/x86-base.inc
index f7c8a45..5663145 100644
--- a/yocto-poky/meta/conf/machine/include/x86-base.inc
+++ b/yocto-poky/meta/conf/machine/include/x86-base.inc
@@ -20,7 +20,7 @@
 # kernel-related variables
 #
 PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ??= "3.0%"
+PREFERRED_VERSION_linux-yocto ??= "4.4%"
 
 #
 # XSERVER subcomponents, used to build the XSERVER variable
diff --git a/yocto-poky/meta/conf/machine/include/x86/arch-x86.inc b/yocto-poky/meta/conf/machine/include/x86/arch-x86.inc
index 298bddc..e51d595 100644
--- a/yocto-poky/meta/conf/machine/include/x86/arch-x86.inc
+++ b/yocto-poky/meta/conf/machine/include/x86/arch-x86.inc
@@ -12,24 +12,26 @@
 # ELF32 ABI
 TUNEVALID[m32] = "IA32 ELF32 standard ABI"
 TUNECONFLICTS[m32] = "m64 mx32"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m32", "${X86ARCH32}", "" ,d)}"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "m32", " -m32", "", d)}"
-MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "m32", "x86:", "" ,d)}"
+TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', '${X86ARCH32}', '' ,d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm32', ' -m32', '', d)}"
+MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'm32', 'x86:', '' ,d)}"
 
 # x32 ABI
 TUNEVALID[mx32] = "IA32e (x86_64) ELF32 standard ABI"
 TUNECONFLICTS[mx32] = "m64 m32"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "${X86ARCH64}", "" ,d)}"
-ABIEXTENSION .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", "x32", "" ,d)}"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "mx32", " -mx32", "", d)}"
-TUNE_LDARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-m elf32_x86_64", "", d)}"
-TUNE_ASARGS += "${@bb.utils.contains("TUNE_FEATURES", "mx32", "-x32", "", d)}"
+TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '${X86ARCH64}', '' ,d)}"
+ABIEXTENSION .= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x32', '' ,d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mx32', ' -mx32', '', d)}"
+TUNE_LDARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-m elf32_x86_64', '', d)}"
+TUNE_ASARGS += "${@bb.utils.contains('TUNE_FEATURES', 'mx32', '-x32', '', d)}"
+# user mode qemu doesn't support x32
+MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'qemu-usermode', '', d)}"
 
 # ELF64 ABI
 TUNEVALID[m64] = "IA32e (x86_64) ELF64 standard ABI"
 TUNECONFLICTS[m64] = "m32 mx32"
-TUNE_ARCH .= "${@bb.utils.contains("TUNE_FEATURES", "m64", "${X86ARCH64}", "" ,d)}"
-TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "m64", " -m64", "", d)}"
+TUNE_ARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'm64', '${X86ARCH64}', '' ,d)}"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'm64', ' -m64', '', d)}"
 
 # Default Tune configurations
 AVAILTUNES += "x86"
diff --git a/yocto-poky/meta/conf/machine/qemuarm64.conf b/yocto-poky/meta/conf/machine/qemuarm64.conf
index 8459d0f..f59fb15 100644
--- a/yocto-poky/meta/conf/machine/qemuarm64.conf
+++ b/yocto-poky/meta/conf/machine/qemuarm64.conf
@@ -5,8 +5,6 @@
 require conf/machine/include/arm/arch-armv8.inc
 require conf/machine/include/qemu.inc
 
-MACHINE_FEATURES = ""
-
 KERNEL_IMAGETYPE = "Image"
 
 SERIAL_CONSOLES = "38400;ttyAMA0 38400;hvc0"
diff --git a/yocto-poky/meta/conf/machine/qemuppc.conf b/yocto-poky/meta/conf/machine/qemuppc.conf
index 85cbbf7..bf0038d 100644
--- a/yocto-poky/meta/conf/machine/qemuppc.conf
+++ b/yocto-poky/meta/conf/machine/qemuppc.conf
@@ -5,6 +5,8 @@
 require conf/machine/include/qemu.inc
 require conf/machine/include/tune-ppc7400.inc
 
+TARGET_CC_KERNEL_ARCH = "-mno-spe"
+
 KERNEL_IMAGETYPE = "vmlinux"
 
 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
diff --git a/yocto-poky/meta/conf/sanity.conf b/yocto-poky/meta/conf/sanity.conf
index dd156d2..7021bf9 100644
--- a/yocto-poky/meta/conf/sanity.conf
+++ b/yocto-poky/meta/conf/sanity.conf
@@ -3,13 +3,13 @@
 # See sanity.bbclass
 #
 # Expert users can confirm their sanity with "touch conf/sanity.conf"
-BB_MIN_VERSION = "1.27.1"
+BB_MIN_VERSION = "1.29.1"
 
 SANITY_ABIFILE = "${TMPDIR}/abi_version"
 
 SANITY_VERSION ?= "1"
 LOCALCONF_VERSION  ?= "1"
-LAYER_CONF_VERSION ?= "6"
+LAYER_CONF_VERSION ?= "7"
 SITE_CONF_VERSION  ?= "1"
 
 INHERIT += "sanity"
diff --git a/yocto-poky/meta/conf/toasterconf.json b/yocto-poky/meta/conf/toasterconf.json
index c8e42ef..c27880e 100644
--- a/yocto-poky/meta/conf/toasterconf.json
+++ b/yocto-poky/meta/conf/toasterconf.json
@@ -1,18 +1,19 @@
 {
     "config": {
         "MACHINE"      : "qemux86",
-        "DISTRO"       : "poky",
-        "IMAGE_FSTYPES": "ext3 jffs2 tar.bz2",
+        "DISTRO"       : "nodistro",
+        "DL_DIR"       : "${TOPDIR}/../downloads",
+        "IMAGE_FSTYPES": "ext4 jffs2 tar.bz2",
         "IMAGE_INSTALL_append": "",
         "PACKAGE_CLASSES": "package_rpm",
-        "SDKMACHINE"   : "x86_64"
+        "SSTATE_DIR"   : "${TOPDIR}/../sstate-cache"
     },
     "layersources": [
         {
             "name": "Local OpenEmbedded",
             "sourcetype": "local",
             "apiurl": "../../",
-            "branches": ["HEAD", "master", "fido", "dizzy"],
+            "branches": ["HEAD", "master", "jethro", "krogoth"],
             "layers": [
                 {
                     "name": "openembedded-core",
@@ -26,13 +27,13 @@
             "name": "OpenEmbedded",
             "sourcetype": "layerindex",
             "apiurl": "http://layers.openembedded.org/layerindex/api/",
-            "branches": ["master", "fido", "dizzy"]
+            "branches": ["master", "jethro", "krogoth"]
         },
         {
             "name": "Imported layers",
             "sourcetype": "imported",
             "apiurl": "",
-            "branches": ["master", "fido", "dizzy", "HEAD"]
+            "branches": ["master", "jethro", "krogoth", "HEAD"]
 
         }
     ],
@@ -44,15 +45,15 @@
             "dirpath": ""
         },
         {
-            "name": "fido",
+            "name": "jethro",
             "giturl": "git://git.openembedded.org/bitbake",
-            "branch": "1.26",
+            "branch": "1.28",
             "dirpath": ""
         },
         {
-            "name": "dizzy",
+            "name": "krogoth",
             "giturl": "git://git.openembedded.org/bitbake",
-            "branch": "1.24",
+            "branch": "1.30",
             "dirpath": ""
         },
         {
@@ -76,22 +77,22 @@
             "helptext": "Toaster will run your builds using the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/\">OpenEmbedded master</a> branch, where active development takes place. This is not a stable branch, so your builds might not work as expected."
         },
         {
-            "name": "fido",
-            "description": "OpenEmbedded Fido",
-            "bitbake": "fido",
-            "branch": "fido",
+            "name": "jethro",
+            "description": "OpenEmbedded Jethro",
+            "bitbake": "jethro",
+            "branch": "jethro",
             "defaultlayers": [ "openembedded-core" ],
             "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" :  0 },
-            "helptext": "Toaster will run your builds with the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=fido\">OpenEmbedded \"Fido\"</a> branch"
+            "helptext": "Toaster will run your builds with the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=jethro\">OpenEmbedded \"Jethro\"</a> branch"
         },
         {
-            "name": "dizzy",
-            "description": "OpenEmbedded Dizzy",
-            "bitbake": "dizzy",
-            "branch": "dizzy",
+            "name": "krogoth",
+            "description": "OpenEmbedded Krogoth",
+            "bitbake": "krogoth",
+            "branch": "krogoth",
             "defaultlayers": [ "openembedded-core" ],
             "layersourcepriority": { "Imported layers": 99, "Local OpenEmbedded" : 10, "OpenEmbedded" :  0 },
-            "helptext": "Toaster will run your builds with the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=dizzy\">OpenEmbedded \"Dizzy\"</a> branch"
+            "helptext": "Toaster will run your builds with the tip of the <a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=krogoth\">OpenEmbedded \"Krogoth\"</a> branch"
         },
         {
             "name": "local",
diff --git a/yocto-poky/meta/files/common-licenses/ParaTypeFFL-1.3 b/yocto-poky/meta/files/common-licenses/ParaTypeFFL-1.3
new file mode 100644
index 0000000..8357965
--- /dev/null
+++ b/yocto-poky/meta/files/common-licenses/ParaTypeFFL-1.3
@@ -0,0 +1,44 @@
+ParaType Free Font Licensing Agreement
+
+Copyright (c) 2009, ParaType Ltd. All Rights Reserved.
+
+LICENSING AGREEMENT
+for the fonts with Original Name: PT Sans, PT Serif, PT Mono
+Version 1.3 - January 20, 2012
+
+GRANT OF LICENSE
+ParaType Ltd grants you the right to use, copy, modify the fonts and
+distribute modified and unmodified copies of the fonts by any means,
+including placing on Web servers for free downloading, embedding in
+documents and Web pages, bundling with commercial and non commercial
+products, if it does not conflict with the conditions listed below:
+
+- You may bundle the fonts with commercial software, but you may not
+sell the fonts by themselves. They are free.
+
+- You may distribute the fonts in modified or unmodified versions only
+together with this Licensing Agreement and with above copyright notice.
+You have no right to modify the text of Licensing Agreement. It can be
+placed in a separate text file or inserted into the font file, but it
+must be easily viewed by users.
+
+- You may not distribute modified version of the font under the Original
+name or a combination of Original name with any other words without
+explicit written permission from ParaType.
+
+TERMINATION & TERRITORY
+This license has no limits on time and territory, but it becomes null
+and void if any of the above conditions are not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+PARATYPE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING
+ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS
+IN THE FONT SOFTWARE.
+
+ParaType Ltd
diff --git a/yocto-poky/meta/files/ext-sdk-prepare.py b/yocto-poky/meta/files/ext-sdk-prepare.py
new file mode 100644
index 0000000..605e2eb
--- /dev/null
+++ b/yocto-poky/meta/files/ext-sdk-prepare.py
@@ -0,0 +1,103 @@
+#!/usr/bin/env python
+
+# Prepare the build system within the extensible SDK
+
+import sys
+import os
+import subprocess
+
+def exec_watch(cmd, **options):
+    """Run program with stdout shown on sys.stdout"""
+    if isinstance(cmd, basestring) and not "shell" in options:
+        options["shell"] = True
+
+    process = subprocess.Popen(
+        cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **options
+    )
+
+    buf = ''
+    while True:
+        out = process.stdout.read(1)
+        if out:
+            sys.stdout.write(out)
+            sys.stdout.flush()
+            buf += out
+        elif out == '' and process.poll() != None:
+            break
+
+    return process.returncode, buf
+
+def check_unexpected(lines, recipes):
+    """Check for unexpected output lines from dry run"""
+    unexpected = []
+    for line in lines.splitlines():
+        if 'Running task' in line:
+            for recipe in recipes:
+                if recipe in line:
+                    break
+            else:
+                line = line.split('Running', 1)[-1]
+                if 'do_rm_work' not in line:
+                    unexpected.append(line.rstrip())
+        elif 'Running setscene' in line:
+            unexpected.append(line.rstrip())
+    return unexpected
+
+def main():
+    if len(sys.argv) < 2:
+        sdk_targets = []
+    else:
+        sdk_targets = ' '.join(sys.argv[1:]).split()
+    if not sdk_targets:
+        # Just do a parse so the cache is primed
+        ret, _ = exec_watch('bitbake -p')
+        return ret
+
+    print('Preparing SDK for %s...' % ', '.join(sdk_targets))
+
+    ret, out = exec_watch('bitbake %s --setscene-only' % ' '.join(sdk_targets))
+    if ret:
+        return ret
+
+    targetlist = []
+    for target in sdk_targets:
+        if ':' in target:
+            target = target.split(':')[0]
+        if not target in targetlist:
+            targetlist.append(target)
+
+    recipes = []
+    for target in targetlist:
+        try:
+            out = subprocess.check_output(('bitbake -e %s' % target).split(), stderr=subprocess.STDOUT)
+            for line in out.splitlines():
+                if line.startswith('FILE='):
+                    splitval = line.rstrip().split('=')
+                    if len(splitval) > 1:
+                        recipes.append(splitval[1].strip('"'))
+                    break
+        except subprocess.CalledProcessError as e:
+            print('ERROR: Failed to get recipe for target %s:\n%s' % (target, e.output))
+            return 1
+
+    try:
+        out = subprocess.check_output('bitbake %s -n' % ' '.join(sdk_targets), stderr=subprocess.STDOUT, shell=True)
+        unexpected = check_unexpected(out, recipes)
+    except subprocess.CalledProcessError as e:
+        print('ERROR: Failed to execute dry-run:\n%s' % e.output)
+        return 1
+
+    if unexpected:
+        print('ERROR: Unexpected tasks or setscene left over to be executed:')
+        for line in unexpected:
+            print('  ' + line)
+        return 1
+
+if __name__ == "__main__":
+    try:
+        ret = main()
+    except Exception:
+        ret = 1
+        import traceback
+        traceback.print_exc()
+    sys.exit(ret)
diff --git a/yocto-poky/meta/files/ext-sdk-prepare.sh b/yocto-poky/meta/files/ext-sdk-prepare.sh
deleted file mode 100644
index 160c71e..0000000
--- a/yocto-poky/meta/files/ext-sdk-prepare.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-# Prepare the build system within the extensible SDK
-
-target_sdk_dir="$1"
-sdk_targets="$2"
-
-# Avoid actually building images during this phase, but still
-# ensure all dependencies are extracted from sstate
-# This is a hack, to be sure, but we really don't need to do this here
-for sdktarget in $sdk_targets ; do
-	bbappend=`recipetool newappend $target_sdk_dir/workspace $sdktarget`
-	printf 'python do_rootfs_forcevariable () {\n    bb.utils.mkdirhier(d.getVar("IMAGE_ROOTFS", True))\n}\n' > $bbappend
-	printf 'python do_bootimg () {\n    pass\n}\n' >> $bbappend
-	printf 'python do_bootdirectdisk () {\n    pass\n}\n' >> $bbappend
-	printf 'python do_vmimg () {\n    pass\n}\n' >> $bbappend
-	printf "Created bbappend %s\n" "$bbappend"
-done
-bitbake $sdk_targets || exit 1
-rm -rf $target_sdk_dir/workspace/appends/*
diff --git a/yocto-poky/meta/files/fs-perms.txt b/yocto-poky/meta/files/fs-perms.txt
index 109cbe5..3d00e86 100644
--- a/yocto-poky/meta/files/fs-perms.txt
+++ b/yocto-poky/meta/files/fs-perms.txt
@@ -60,6 +60,9 @@
 /tmp				01777	root	root	false - - -
 ${localstatedir}/volatile/tmp	01777	root	root	false - - -
 
+# Set 0700
+${ROOT_HOME}			0700	root	root	false - - -
+
 # Set 755-lsb
 /srv				0755	root	root	false - - -
 
diff --git a/yocto-poky/meta/files/toolchain-shar-extract.sh b/yocto-poky/meta/files/toolchain-shar-extract.sh
index 35d3c75..397be11 100644
--- a/yocto-poky/meta/files/toolchain-shar-extract.sh
+++ b/yocto-poky/meta/files/toolchain-shar-extract.sh
@@ -1,5 +1,11 @@
 #!/bin/sh
 
+[ -z "$ENVCLEANED" ] && exec /usr/bin/env -i ENVCLEANED=1 HOME="$HOME" \
+	http_proxy="$http_proxy" https_proxy="$https_proxy" ftp_proxy="$ftp_proxy" \
+	no_proxy="$no_proxy" all_proxy="$all_proxy" GIT_PROXY_COMMAND="$GIT_PROXY_COMMAND" "$0" "$@"
+[ -f /etc/environment ] && . /etc/environment
+export PATH=`echo "$PATH" | sed -e 's/:\.//' -e 's/::/:/'`
+
 INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
 SDK_ARCH=$(echo @SDK_ARCH@ | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
 
@@ -25,14 +31,21 @@
 	fi
 fi
 
+if ! xz -V > /dev/null 2>&1; then
+	echo "Error: xz is required for installation of this SDK, please install it first"
+	exit 1
+fi
+
 DEFAULT_INSTALL_DIR="@SDKPATH@"
 SUDO_EXEC=""
+EXTRA_TAR_OPTIONS=""
 target_sdk_dir=""
 answer=""
 relocate=1
 savescripts=0
 verbose=0
-while getopts ":yd:nDRS" OPT; do
+publish=0
+while getopts ":yd:npDRS" OPT; do
 	case $OPT in
 	y)
 		answer="Y"
@@ -43,6 +56,10 @@
 	n)
 		prepare_buildsystem="no"
 		;;
+	p)
+		prepare_buildsystem="no"
+		publish=1
+		;;
 	D)
 		verbose=1
 		;;
@@ -59,6 +76,7 @@
 		echo "  -d <dir>   Install the SDK to <dir>"
 		echo "======== Extensible SDK only options ============"
 		echo "  -n         Do not prepare the build system"
+		echo "  -p         Publish mode (implies -n)"
 		echo "======== Advanced DEBUGGING ONLY OPTIONS ========"
 		echo "  -S         Save relocation scripts"
 		echo "  -R         Do not relocate executables"
@@ -99,6 +117,12 @@
 	target_sdk_dir=$(readlink -m "$target_sdk_dir")
 fi
 
+# limit the length for target_sdk_dir, ensure the relocation behaviour in relocate_sdk.py has right result.
+if [ ${#target_sdk_dir} -gt 2048 ]; then
+	echo "Error: The target directory path is too long!!!"
+	exit 1
+fi
+
 if [ "$SDK_EXTENSIBLE" = "1" ]; then
 	# We're going to be running the build system, additional restrictions apply
 	if echo "$target_sdk_dir" | grep -q '[+\ @$]'; then
@@ -164,7 +188,7 @@
 payload_offset=$(($(grep -na -m1 "^MARKER:$" $0|cut -d':' -f1) + 1))
 
 printf "Extracting SDK..."
-tail -n +$payload_offset $0| $SUDO_EXEC tar xj -C $target_sdk_dir --checkpoint=.2500
+tail -n +$payload_offset $0| $SUDO_EXEC tar xJ -C $target_sdk_dir --checkpoint=.2500 $EXTRA_TAR_OPTIONS || exit 1
 echo "done"
 
 printf "Setting it up..."
diff --git a/yocto-poky/meta/files/toolchain-shar-relocate.sh b/yocto-poky/meta/files/toolchain-shar-relocate.sh
index 4ef2927..d4bcf0e 100644
--- a/yocto-poky/meta/files/toolchain-shar-relocate.sh
+++ b/yocto-poky/meta/files/toolchain-shar-relocate.sh
@@ -13,8 +13,23 @@
    echo "SDK relocate failed, could not create a temporary directory"
    exit 1
 fi
-echo "#!/bin/bash" > $tdir/relocate_sdk.sh
-echo exec ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files >> $tdir/relocate_sdk.sh
+cat <<EOF >> $tdir/relocate_sdk.sh
+#!/bin/bash
+for py in python python2 python3
+do
+	PYTHON=\`which \${py} 2>/dev/null\`
+	if [ \$? -eq 0 ]; then
+		break;
+	fi
+done
+
+if [ x\${PYTHON} = "x"  ]; then
+	echo "SDK could not be relocated.  No python found."
+	exit 1
+fi
+\${PYTHON} ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files
+EOF
+
 $SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh
 $SUDO_EXEC chmod 755 ${env_setup_script%/*}/relocate_sdk.sh
 rm -rf $tdir
@@ -32,7 +47,7 @@
 	$SUDO_EXEC find $replace -type f
 done | xargs -n100 file | grep ":.*\(ASCII\|script\|source\).*text" | \
     awk -F':' '{printf "\"%s\"\n", $1}' | \
-    grep -v "$target_sdk_dir/environment-setup-*" | \
+    grep -Ev "$target_sdk_dir/(environment-setup-*|relocate_sdk*|${0##*/})" | \
     xargs -n100 $SUDO_EXEC sed -i \
         -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" \
         -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" \
diff --git a/yocto-poky/meta/lib/oe/copy_buildsystem.py b/yocto-poky/meta/lib/oe/copy_buildsystem.py
index c0e7541..7b9a0ee 100644
--- a/yocto-poky/meta/lib/oe/copy_buildsystem.py
+++ b/yocto-poky/meta/lib/oe/copy_buildsystem.py
@@ -8,7 +8,7 @@
     # source is a file or a directory.
     mode = os.stat(src).st_mode
     if stat.S_ISDIR(mode):
-        shutil.copytree(src, dest, symlinks=True)
+        shutil.copytree(src, dest, symlinks=True, ignore=shutil.ignore_patterns('.git'))
     else:
         shutil.copyfile(src, dest)
         shutil.copymode(src, dest)
@@ -18,8 +18,9 @@
         self.d = d
         self.context = context
         self.layerdirs = d.getVar('BBLAYERS', True).split()
+        self.layers_exclude = (d.getVar('SDK_LAYERS_EXCLUDE', True) or "").split()
 
-    def copy_bitbake_and_layers(self, destdir):
+    def copy_bitbake_and_layers(self, destdir, workspace_name=None):
         # Copy in all metadata layers + bitbake (as repositories)
         layers_copied = []
         bb.utils.mkdirhier(destdir)
@@ -28,6 +29,19 @@
         corebase = self.d.getVar('COREBASE', True)
         layers.append(corebase)
 
+        # Exclude layers
+        for layer_exclude in self.layers_exclude:
+            if layer_exclude in layers:
+                layers.remove(layer_exclude)
+
+        workspace_newname = workspace_name
+        if workspace_newname:
+            layernames = [os.path.basename(layer) for layer in layers]
+            extranum = 0
+            while workspace_newname in layernames:
+                extranum += 1
+                workspace_newname = '%s-%d' % (workspace_name, extranum)
+
         corebase_files = self.d.getVar('COREBASE_FILES', True).split()
         corebase_files = [corebase + '/' +x for x in corebase_files]
         # Make sure bitbake goes in
@@ -36,18 +50,24 @@
 
         for layer in layers:
             layerconf = os.path.join(layer, 'conf', 'layer.conf')
+            layernewname = os.path.basename(layer)
+            workspace = False
             if os.path.exists(layerconf):
                 with open(layerconf, 'r') as f:
                     if f.readline().startswith("# ### workspace layer auto-generated by devtool ###"):
-                        bb.plain("NOTE: Excluding local workspace layer %s from %s" % (layer, self.context))
-                        continue
+                        if workspace_newname:
+                            layernewname = workspace_newname
+                            workspace = True
+                        else:
+                            bb.plain("NOTE: Excluding local workspace layer %s from %s" % (layer, self.context))
+                            continue
 
             # If the layer was already under corebase, leave it there
             # since layers such as meta have issues when moved.
             layerdestpath = destdir
             if corebase == os.path.dirname(layer):
                 layerdestpath += '/' + os.path.basename(corebase)
-            layerdestpath += '/' + os.path.basename(layer)
+            layerdestpath += '/' + layernewname
 
             layer_relative = os.path.relpath(layerdestpath,
                                              destdir)
@@ -67,15 +87,47 @@
                 else:
                     _smart_copy(layer, layerdestpath)
 
+            if workspace:
+                # Make some adjustments original workspace layer
+                # Drop sources (recipe tasks will be locked, so we don't need them)
+                srcdir = os.path.join(layerdestpath, 'sources')
+                if os.path.isdir(srcdir):
+                    shutil.rmtree(srcdir)
+                # Drop all bbappends except the one for the image the SDK is being built for
+                # (because of externalsrc, the workspace bbappends will interfere with the
+                # locked signatures if present, and we don't need them anyway)
+                image_bbappend = os.path.splitext(os.path.basename(self.d.getVar('FILE', True)))[0] + '.bbappend'
+                appenddir = os.path.join(layerdestpath, 'appends')
+                if os.path.isdir(appenddir):
+                    for fn in os.listdir(appenddir):
+                        if fn == image_bbappend:
+                            continue
+                        else:
+                            os.remove(os.path.join(appenddir, fn))
+                # Drop README
+                readme = os.path.join(layerdestpath, 'README')
+                if os.path.exists(readme):
+                    os.remove(readme)
+                # Filter out comments in layer.conf and change layer name
+                layerconf = os.path.join(layerdestpath, 'conf', 'layer.conf')
+                with open(layerconf, 'r') as f:
+                    origlines = f.readlines()
+                with open(layerconf, 'w') as f:
+                    for line in origlines:
+                        if line.startswith('#'):
+                            continue
+                        line = line.replace('workspacelayer', workspace_newname)
+                        f.write(line)
+
         return layers_copied
 
 def generate_locked_sigs(sigfile, d):
     bb.utils.mkdirhier(os.path.dirname(sigfile))
-    depd = d.getVar('BB_TASKDEPDATA', True)
+    depd = d.getVar('BB_TASKDEPDATA', False)
     tasks = ['%s.%s' % (v[2], v[1]) for v in depd.itervalues()]
     bb.parse.siggen.dump_lockedsigs(sigfile, tasks)
 
-def prune_lockedsigs(allowed_tasks, excluded_targets, lockedsigs, pruned_output):
+def prune_lockedsigs(excluded_tasks, excluded_targets, lockedsigs, pruned_output):
     with open(lockedsigs, 'r') as infile:
         bb.utils.mkdirhier(os.path.dirname(pruned_output))
         with open(pruned_output, 'w') as f:
@@ -84,7 +136,7 @@
                 if invalue:
                     if line.endswith('\\\n'):
                         splitval = line.strip().split(':')
-                        if splitval[1] in allowed_tasks and not splitval[0] in excluded_targets:
+                        if not splitval[1] in excluded_tasks and not splitval[0] in excluded_targets:
                             f.write(line)
                     else:
                         f.write(line)
@@ -93,10 +145,73 @@
                     invalue = True
                     f.write(line)
 
+def merge_lockedsigs(copy_tasks, lockedsigs_main, lockedsigs_extra, merged_output, copy_output):
+    merged = {}
+    arch_order = []
+    with open(lockedsigs_main, 'r') as f:
+        invalue = None
+        for line in f:
+            if invalue:
+                if line.endswith('\\\n'):
+                    merged[invalue].append(line)
+                else:
+                    invalue = None
+            elif line.startswith('SIGGEN_LOCKEDSIGS_t-'):
+                invalue = line[18:].split('=', 1)[0].rstrip()
+                merged[invalue] = []
+                arch_order.append(invalue)
+
+    with open(lockedsigs_extra, 'r') as f:
+        invalue = None
+        tocopy = {}
+        for line in f:
+            if invalue:
+                if line.endswith('\\\n'):
+                    if not line in merged[invalue]:
+                        target, task = line.strip().split(':')[:2]
+                        if not copy_tasks or task in copy_tasks:
+                            tocopy[invalue].append(line)
+                        merged[invalue].append(line)
+                else:
+                    invalue = None
+            elif line.startswith('SIGGEN_LOCKEDSIGS_t-'):
+                invalue = line[18:].split('=', 1)[0].rstrip()
+                if not invalue in merged:
+                    merged[invalue] = []
+                    arch_order.append(invalue)
+                tocopy[invalue] = []
+
+    def write_sigs_file(fn, types, sigs):
+        fulltypes = []
+        bb.utils.mkdirhier(os.path.dirname(fn))
+        with open(fn, 'w') as f:
+            for typename in types:
+                lines = sigs[typename]
+                if lines:
+                    f.write('SIGGEN_LOCKEDSIGS_%s = "\\\n' % typename)
+                    for line in lines:
+                        f.write(line)
+                    f.write('    "\n')
+                    fulltypes.append(typename)
+            f.write('SIGGEN_LOCKEDSIGS_TYPES = "%s"\n' % ' '.join(fulltypes))
+
+    write_sigs_file(copy_output, tocopy.keys(), tocopy)
+    if merged_output:
+        write_sigs_file(merged_output, arch_order, merged)
+
 def create_locked_sstate_cache(lockedsigs, input_sstate_cache, output_sstate_cache, d, fixedlsbstring=""):
     bb.note('Generating sstate-cache...')
 
-    bb.process.run("gen-lockedsig-cache %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache))
+    nativelsbstring = d.getVar('NATIVELSBSTRING', True)
+    bb.process.run("gen-lockedsig-cache %s %s %s %s" % (lockedsigs, input_sstate_cache, output_sstate_cache, nativelsbstring))
     if fixedlsbstring:
-        os.rename(output_sstate_cache + '/' + d.getVar('NATIVELSBSTRING', True),
-        output_sstate_cache + '/' + fixedlsbstring)
+        nativedir = output_sstate_cache + '/' + nativelsbstring
+        if os.path.isdir(nativedir):
+            destdir = os.path.join(output_sstate_cache, fixedlsbstring)
+            bb.utils.mkdirhier(destdir)
+
+            dirlist = os.listdir(nativedir)
+            for i in dirlist:
+                src = os.path.join(nativedir, i)
+                dest = os.path.join(destdir, i)
+                os.rename(src, dest)
diff --git a/yocto-poky/meta/lib/oe/data.py b/yocto-poky/meta/lib/oe/data.py
index 4cc0e02..e495721 100644
--- a/yocto-poky/meta/lib/oe/data.py
+++ b/yocto-poky/meta/lib/oe/data.py
@@ -3,7 +3,7 @@
 def typed_value(key, d):
     """Construct a value for the specified metadata variable, using its flags
     to determine the type and parameters for construction."""
-    var_type = d.getVarFlag(key, 'type')
+    var_type = d.getVarFlag(key, 'type', True)
     flags = d.getVarFlags(key)
     if flags is not None:
         flags = dict((flag, d.expand(value))
diff --git a/yocto-poky/meta/lib/oe/distro_check.py b/yocto-poky/meta/lib/oe/distro_check.py
index f92cd2e..8655a6f 100644
--- a/yocto-poky/meta/lib/oe/distro_check.py
+++ b/yocto-poky/meta/lib/oe/distro_check.py
@@ -9,10 +9,12 @@
         socket.close()
 
 def get_proxies(d):
-    import os
-    proxykeys = ['http', 'https', 'ftp', 'ftps', 'no', 'all']
-    proxyvalues = map(lambda key: d.getVar(key+'_proxy', True), proxykeys)
-    return dict(zip(proxykeys, proxyvalues))
+    proxies = {}
+    for key in ['http', 'https', 'ftp', 'ftps', 'no', 'all']:
+        proxy = d.getVar(key + '_proxy', True)
+        if proxy:
+            proxies[key] = proxy
+    return proxies
 
 def get_links_from_url(url, d):
     "Return all the href links found on the web location"
diff --git a/yocto-poky/meta/lib/oe/gpg_sign.py b/yocto-poky/meta/lib/oe/gpg_sign.py
new file mode 100644
index 0000000..b83ee86
--- /dev/null
+++ b/yocto-poky/meta/lib/oe/gpg_sign.py
@@ -0,0 +1,116 @@
+"""Helper module for GPG signing"""
+import os
+
+import bb
+import oe.utils
+
+class LocalSigner(object):
+    """Class for handling local (on the build host) signing"""
+    def __init__(self, d):
+        self.gpg_bin = d.getVar('GPG_BIN', True) or \
+                  bb.utils.which(os.getenv('PATH'), 'gpg')
+        self.gpg_path = d.getVar('GPG_PATH', True)
+        self.rpm_bin = bb.utils.which(os.getenv('PATH'), "rpm")
+
+    def export_pubkey(self, output_file, keyid, armor=True):
+        """Export GPG public key to a file"""
+        cmd = '%s --batch --yes --export -o %s ' % \
+                (self.gpg_bin, output_file)
+        if self.gpg_path:
+            cmd += "--homedir %s " % self.gpg_path
+        if armor:
+            cmd += "--armor "
+        cmd += keyid
+        status, output = oe.utils.getstatusoutput(cmd)
+        if status:
+            raise bb.build.FuncFailed('Failed to export gpg public key (%s): %s' %
+                                      (keyid, output))
+
+    def sign_rpms(self, files, keyid, passphrase):
+        """Sign RPM files"""
+
+        cmd = self.rpm_bin + " --addsign --define '_gpg_name %s'  " % keyid
+        cmd += "--define '_gpg_passphrase %s' " % passphrase
+        if self.gpg_bin:
+            cmd += "--define '%%__gpg %s' " % self.gpg_bin
+        if self.gpg_path:
+            cmd += "--define '_gpg_path %s' " % self.gpg_path
+        cmd += ' '.join(files)
+
+        status, output = oe.utils.getstatusoutput(cmd)
+        if status:
+            raise bb.build.FuncFailed("Failed to sign RPM packages: %s" % output)
+
+    def detach_sign(self, input_file, keyid, passphrase_file, passphrase=None, armor=True):
+        """Create a detached signature of a file"""
+        import subprocess
+
+        if passphrase_file and passphrase:
+            raise Exception("You should use either passphrase_file of passphrase, not both")
+
+        cmd = [self.gpg_bin, '--detach-sign', '--batch', '--no-tty', '--yes',
+               '--passphrase-fd', '0', '-u', keyid]
+
+        if self.gpg_path:
+            cmd += ['--homedir', self.gpg_path]
+        if armor:
+            cmd += ['--armor']
+
+        #gpg > 2.1 supports password pipes only through the loopback interface
+        #gpg < 2.1 errors out if given unknown parameters
+        dots = self.get_gpg_version().split('.')
+        assert len(dots) >= 2
+        if int(dots[0]) >= 2 and int(dots[1]) >= 1:
+            cmd += ['--pinentry-mode', 'loopback']
+
+        cmd += [input_file]
+
+        try:
+            if passphrase_file:
+                with open(passphrase_file) as fobj:
+                    passphrase = fobj.readline();
+
+            job = subprocess.Popen(cmd, stdin=subprocess.PIPE, stderr=subprocess.PIPE)
+            (_, stderr) = job.communicate(passphrase)
+
+            if job.returncode:
+                raise bb.build.FuncFailed("GPG exited with code %d: %s" %
+                                          (job.returncode, stderr))
+
+        except IOError as e:
+            bb.error("IO error (%s): %s" % (e.errno, e.strerror))
+            raise Exception("Failed to sign '%s'" % input_file)
+
+        except OSError as e:
+            bb.error("OS error (%s): %s" % (e.errno, e.strerror))
+            raise Exception("Failed to sign '%s" % input_file)
+
+
+    def get_gpg_version(self):
+        """Return the gpg version"""
+        import subprocess
+        try:
+            return subprocess.check_output((self.gpg_bin, "--version")).split()[2]
+        except subprocess.CalledProcessError as e:
+            raise bb.build.FuncFailed("Could not get gpg version: %s" % e)
+
+
+    def verify(self, sig_file):
+        """Verify signature"""
+        cmd = self.gpg_bin + " --verify "
+        if self.gpg_path:
+            cmd += "--homedir %s " % self.gpg_path
+        cmd += sig_file
+        status, _ = oe.utils.getstatusoutput(cmd)
+        ret = False if status else True
+        return ret
+
+
+def get_signer(d, backend):
+    """Get signer object for the specified backend"""
+    # Use local signing by default
+    if backend == 'local':
+        return LocalSigner(d)
+    else:
+        bb.fatal("Unsupported signing backend '%s'" % backend)
+
diff --git a/yocto-poky/meta/lib/oe/image.py b/yocto-poky/meta/lib/oe/image.py
deleted file mode 100644
index b9eb3de..0000000
--- a/yocto-poky/meta/lib/oe/image.py
+++ /dev/null
@@ -1,418 +0,0 @@
-from oe.utils import execute_pre_post_process
-import os
-import subprocess
-import multiprocessing
-
-
-def generate_image(arg):
-    (type, subimages, create_img_cmd, sprefix) = arg
-
-    bb.note("Running image creation script for %s: %s ..." %
-            (type, create_img_cmd))
-
-    try:
-        output = subprocess.check_output(create_img_cmd,
-                                         stderr=subprocess.STDOUT)
-    except subprocess.CalledProcessError as e:
-        return("Error: The image creation script '%s' returned %d:\n%s" %
-               (e.cmd, e.returncode, e.output))
-
-    bb.note("Script output:\n%s" % output)
-
-    return None
-
-
-"""
-This class will help compute IMAGE_FSTYPE dependencies and group them in batches
-that can be executed in parallel.
-
-The next example is for illustration purposes, highly unlikely to happen in real life.
-It's just one of the test cases I used to test the algorithm:
-
-For:
-IMAGE_FSTYPES = "i1 i2 i3 i4 i5"
-IMAGE_TYPEDEP_i4 = "i2"
-IMAGE_TYPEDEP_i5 = "i6 i4"
-IMAGE_TYPEDEP_i6 = "i7"
-IMAGE_TYPEDEP_i7 = "i2"
-
-We get the following list of batches that can be executed in parallel, having the
-dependencies satisfied:
-
-[['i1', 'i3', 'i2'], ['i4', 'i7'], ['i6'], ['i5']]
-"""
-class ImageDepGraph(object):
-    def __init__(self, d):
-        self.d = d
-        self.graph = dict()
-        self.deps_array = dict()
-
-    def _construct_dep_graph(self, image_fstypes):
-        graph = dict()
-
-        def add_node(node):
-            base_type = self._image_base_type(node)
-            deps = (self.d.getVar('IMAGE_TYPEDEP_' + node, True) or "")
-            base_deps = (self.d.getVar('IMAGE_TYPEDEP_' + base_type, True) or "")
-
-            graph[node] = ""
-            for dep in deps.split() + base_deps.split():
-                if not dep in graph[node]:
-                    if graph[node] != "":
-                        graph[node] += " "
-                    graph[node] += dep
-
-                if not dep in graph:
-                    add_node(dep)
-
-        for fstype in image_fstypes:
-            add_node(fstype)
-
-        return graph
-
-    def _clean_graph(self):
-        # Live and VMDK/VDI images will be processed via inheriting
-        # bbclass and does not get processed here. Remove them from the fstypes
-        # graph. Their dependencies are already added, so no worries here.
-        remove_list = (self.d.getVar('IMAGE_TYPES_MASKED', True) or "").split()
-
-        for item in remove_list:
-            self.graph.pop(item, None)
-
-    def _image_base_type(self, type):
-        ctypes = self.d.getVar('COMPRESSIONTYPES', True).split()
-        if type in ["vmdk", "vdi", "qcow2", "live", "iso", "hddimg"]:
-            type = "ext4"
-        basetype = type
-        for ctype in ctypes:
-            if type.endswith("." + ctype):
-                basetype = type[:-len("." + ctype)]
-                break
-
-        return basetype
-
-    def _compute_dependencies(self):
-        """
-        returns dict object of nodes with [no_of_depends_on, no_of_depended_by]
-        for each node
-        """
-        deps_array = dict()
-        for node in self.graph:
-            deps_array[node] = [0, 0]
-
-        for node in self.graph:
-            deps = self.graph[node].split()
-            deps_array[node][0] += len(deps)
-            for dep in deps:
-                deps_array[dep][1] += 1
-
-        return deps_array
-
-    def _sort_graph(self):
-        sorted_list = []
-        group = []
-        for node in self.graph:
-            if node not in self.deps_array:
-                continue
-
-            depends_on = self.deps_array[node][0]
-
-            if depends_on == 0:
-                group.append(node)
-
-        if len(group) == 0 and len(self.deps_array) != 0:
-            bb.fatal("possible fstype circular dependency...")
-
-        sorted_list.append(group)
-
-        # remove added nodes from deps_array
-        for item in group:
-            for node in self.graph:
-                if item in self.graph[node].split():
-                    self.deps_array[node][0] -= 1
-
-            self.deps_array.pop(item, None)
-
-        if len(self.deps_array):
-            # recursive call, to find the next group
-            sorted_list += self._sort_graph()
-
-        return sorted_list
-
-    def group_fstypes(self, image_fstypes):
-        self.graph = self._construct_dep_graph(image_fstypes)
-
-        self._clean_graph()
-
-        self.deps_array = self._compute_dependencies()
-
-        alltypes = [node for node in self.graph]
-
-        return (alltypes, self._sort_graph())
-
-
-class Image(ImageDepGraph):
-    def __init__(self, d):
-        self.d = d
-
-        super(Image, self).__init__(d)
-
-    def _get_rootfs_size(self):
-        """compute the rootfs size"""
-        rootfs_alignment = int(self.d.getVar('IMAGE_ROOTFS_ALIGNMENT', True))
-        overhead_factor = float(self.d.getVar('IMAGE_OVERHEAD_FACTOR', True))
-        rootfs_req_size = int(self.d.getVar('IMAGE_ROOTFS_SIZE', True))
-        rootfs_extra_space = eval(self.d.getVar('IMAGE_ROOTFS_EXTRA_SPACE', True))
-        rootfs_maxsize = self.d.getVar('IMAGE_ROOTFS_MAXSIZE', True)
-
-        output = subprocess.check_output(['du', '-ks',
-                                          self.d.getVar('IMAGE_ROOTFS', True)])
-        size_kb = int(output.split()[0])
-        base_size = size_kb * overhead_factor
-        base_size = (base_size, rootfs_req_size)[base_size < rootfs_req_size] + \
-            rootfs_extra_space
-
-        if base_size != int(base_size):
-            base_size = int(base_size + 1)
-        else:
-            base_size = int(base_size)
-
-        base_size += rootfs_alignment - 1
-        base_size -= base_size % rootfs_alignment
-
-        # Check the rootfs size against IMAGE_ROOTFS_MAXSIZE (if set)
-        if rootfs_maxsize:
-            rootfs_maxsize_int = int(rootfs_maxsize)
-            if base_size > rootfs_maxsize_int:
-                bb.fatal("The rootfs size %d(K) overrides the max size %d(K)" % \
-                    (base_size, rootfs_maxsize_int))
-
-        return base_size
-
-    def _create_symlinks(self, subimages):
-        """create symlinks to the newly created image"""
-        deploy_dir = self.d.getVar('DEPLOY_DIR_IMAGE', True)
-        img_name = self.d.getVar('IMAGE_NAME', True)
-        link_name = self.d.getVar('IMAGE_LINK_NAME', True)
-        manifest_name = self.d.getVar('IMAGE_MANIFEST', True)
-
-        os.chdir(deploy_dir)
-
-        if link_name:
-            for type in subimages:
-                if os.path.exists(img_name + ".rootfs." + type):
-                    dst = link_name + "." + type
-                    src = img_name + ".rootfs." + type
-                    bb.note("Creating symlink: %s -> %s" % (dst, src))
-                    os.symlink(src, dst)
-
-            if manifest_name is not None and \
-                    os.path.exists(manifest_name) and \
-                    not os.path.exists(link_name + ".manifest"):
-                os.symlink(os.path.basename(manifest_name),
-                           link_name + ".manifest")
-
-    def _remove_old_symlinks(self):
-        """remove the symlinks to old binaries"""
-
-        if self.d.getVar('IMAGE_LINK_NAME', True):
-            deploy_dir = self.d.getVar('DEPLOY_DIR_IMAGE', True)
-            for img in os.listdir(deploy_dir):
-                if img.find(self.d.getVar('IMAGE_LINK_NAME', True)) == 0:
-                    img = os.path.join(deploy_dir, img)
-                    if os.path.islink(img):
-                        if self.d.getVar('RM_OLD_IMAGE', True) == "1" and \
-                                os.path.exists(os.path.realpath(img)):
-                            os.remove(os.path.realpath(img))
-
-                        os.remove(img)
-
-    """
-    This function will just filter out the compressed image types from the
-    fstype groups returning a (filtered_fstype_groups, cimages) tuple.
-    """
-    def _filter_out_commpressed(self, fstype_groups):
-        ctypes = self.d.getVar('COMPRESSIONTYPES', True).split()
-        cimages = {}
-
-        filtered_groups = []
-        for group in fstype_groups:
-            filtered_group = []
-            for type in group:
-                basetype = None
-                for ctype in ctypes:
-                    if type.endswith("." + ctype):
-                        basetype = type[:-len("." + ctype)]
-                        if basetype not in filtered_group:
-                            filtered_group.append(basetype)
-                        if basetype not in cimages:
-                            cimages[basetype] = []
-                        if ctype not in cimages[basetype]:
-                            cimages[basetype].append(ctype)
-                        break
-                if not basetype and type not in filtered_group:
-                    filtered_group.append(type)
-
-            filtered_groups.append(filtered_group)
-
-        return (filtered_groups, cimages)
-
-    def _get_image_types(self):
-        """returns a (types, cimages) tuple"""
-
-        alltypes, fstype_groups = self.group_fstypes(self.d.getVar('IMAGE_FSTYPES', True).split())
-
-        filtered_groups, cimages = self._filter_out_commpressed(fstype_groups)
-
-        return (alltypes, filtered_groups, cimages)
-
-    def _write_script(self, type, cmds, sprefix=""):
-        tempdir = self.d.getVar('T', True)
-        script_name = os.path.join(tempdir, sprefix + "create_image." + type)
-        rootfs_size = self._get_rootfs_size()
-
-        self.d.setVar('img_creation_func', '\n'.join(cmds))
-        self.d.setVarFlag('img_creation_func', 'func', 1)
-        self.d.setVarFlag('img_creation_func', 'fakeroot', 1)
-        self.d.setVar('ROOTFS_SIZE', str(rootfs_size))
-
-        with open(script_name, "w+") as script:
-            script.write("%s" % bb.build.shell_trap_code())
-            script.write("export ROOTFS_SIZE=%d\n" % rootfs_size)
-            bb.data.emit_func('img_creation_func', script, self.d)
-            script.write("img_creation_func\n")
-
-        os.chmod(script_name, 0775)
-
-        return script_name
-
-    def _get_imagecmds(self, sprefix=""):
-        old_overrides = self.d.getVar('OVERRIDES', 0)
-
-        alltypes, fstype_groups, cimages = self._get_image_types()
-
-        image_cmd_groups = []
-
-        bb.note("The image creation groups are: %s" % str(fstype_groups))
-        for fstype_group in fstype_groups:
-            image_cmds = []
-            for type in fstype_group:
-                cmds = []
-                subimages = []
-
-                localdata = bb.data.createCopy(self.d)
-                localdata.setVar('OVERRIDES', '%s:%s' % (type, old_overrides))
-                bb.data.update_data(localdata)
-                localdata.setVar('type', type)
-
-                image_cmd = localdata.getVar("IMAGE_CMD", True)
-                if image_cmd:
-                    cmds.append("\t" + image_cmd)
-                else:
-                    bb.fatal("No IMAGE_CMD defined for IMAGE_FSTYPES entry '%s' - possibly invalid type name or missing support class" % type)
-                cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
-
-                if type in cimages:
-                    for ctype in cimages[type]:
-                        cmds.append("\t" + localdata.getVar("COMPRESS_CMD_" + ctype, True))
-                        subimages.append(type + "." + ctype)
-
-                if type not in alltypes:
-                    cmds.append(localdata.expand("\trm ${IMAGE_NAME}.rootfs.${type}"))
-                else:
-                    subimages.append(type)
-
-                script_name = self._write_script(type, cmds, sprefix)
-
-                image_cmds.append((type, subimages, script_name, sprefix))
-
-            image_cmd_groups.append(image_cmds)
-
-        return image_cmd_groups
-
-    def _write_wic_env(self):
-        """
-        Write environment variables used by wic
-        to tmp/sysroots/<machine>/imgdata/<image>.env
-        """
-        stdir = self.d.getVar('STAGING_DIR_TARGET', True)
-        outdir = os.path.join(stdir, 'imgdata')
-        if not os.path.exists(outdir):
-            os.makedirs(outdir)
-        basename = self.d.getVar('IMAGE_BASENAME', True)
-        with open(os.path.join(outdir, basename) + '.env', 'w') as envf:
-            for var in self.d.getVar('WICVARS', True).split():
-                value = self.d.getVar(var, True)
-                if value:
-                    envf.write('%s="%s"\n' % (var, value.strip()))
-
-    def create(self):
-        bb.note("###### Generate images #######")
-        pre_process_cmds = self.d.getVar("IMAGE_PREPROCESS_COMMAND", True)
-        post_process_cmds = self.d.getVar("IMAGE_POSTPROCESS_COMMAND", True)
-
-        execute_pre_post_process(self.d, pre_process_cmds)
-
-        self._remove_old_symlinks()
-
-        image_cmd_groups = self._get_imagecmds()
-
-        # Process the debug filesystem...
-        debugfs_d = bb.data.createCopy(self.d)
-        if self.d.getVar('IMAGE_GEN_DEBUGFS', True) == "1":
-            bb.note("Processing debugfs image(s) ...")
-            orig_d = self.d
-            self.d = debugfs_d
-
-            self.d.setVar('IMAGE_ROOTFS', orig_d.getVar('IMAGE_ROOTFS', True) + '-dbg')
-            self.d.setVar('IMAGE_NAME', orig_d.getVar('IMAGE_NAME', True) + '-dbg')
-            self.d.setVar('IMAGE_LINK_NAME', orig_d.getVar('IMAGE_LINK_NAME', True) + '-dbg')
-
-            debugfs_image_fstypes = orig_d.getVar('IMAGE_FSTYPES_DEBUGFS', True)
-            if debugfs_image_fstypes:
-                self.d.setVar('IMAGE_FSTYPES', orig_d.getVar('IMAGE_FSTYPES_DEBUGFS', True))
-
-            self._remove_old_symlinks()
-
-            image_cmd_groups += self._get_imagecmds("debugfs.")
-
-            self.d = orig_d
-
-        self._write_wic_env()
-
-        for image_cmds in image_cmd_groups:
-            # create the images in parallel
-            nproc = multiprocessing.cpu_count()
-            pool = bb.utils.multiprocessingpool(nproc)
-            results = list(pool.imap(generate_image, image_cmds))
-            pool.close()
-            pool.join()
-
-            for result in results:
-                if result is not None:
-                    bb.fatal(result)
-
-            for image_type, subimages, script, sprefix in image_cmds:
-                if sprefix == 'debugfs.':
-                    bb.note("Creating symlinks for %s debugfs image ..." % image_type)
-                    orig_d = self.d
-                    self.d = debugfs_d
-                    self._create_symlinks(subimages)
-                    self.d = orig_d
-                else:
-                    bb.note("Creating symlinks for %s image ..." % image_type)
-                    self._create_symlinks(subimages)
-
-        execute_pre_post_process(self.d, post_process_cmds)
-
-
-def create_image(d):
-    Image(d).create()
-
-if __name__ == "__main__":
-    """
-    Image creation can be called independent from bitbake environment.
-    """
-    """
-    TBD
-    """
diff --git a/yocto-poky/meta/lib/oe/lsb.py b/yocto-poky/meta/lib/oe/lsb.py
index ddfe71b..e0bdfba 100644
--- a/yocto-poky/meta/lib/oe/lsb.py
+++ b/yocto-poky/meta/lib/oe/lsb.py
@@ -62,6 +62,8 @@
     """Return a distro identifier string based upon lsb_release -ri,
        with optional adjustment via a hook"""
 
+    import re
+
     lsb_data = release_dict()
     if lsb_data:
         distro_id, release = lsb_data['Distributor ID'], lsb_data['Release']
@@ -76,6 +78,9 @@
         distro_id, release = adjust_hook(distro_id, release)
     if not distro_id:
         return "Unknown"
+    # Filter out any non-alphanumerics
+    distro_id = re.sub(r'\W', '', distro_id)
+
     if release:
         id_str = '{0}-{1}'.format(distro_id, release)
     else:
diff --git a/yocto-poky/meta/lib/oe/package.py b/yocto-poky/meta/lib/oe/package.py
index f176446..2887689 100644
--- a/yocto-poky/meta/lib/oe/package.py
+++ b/yocto-poky/meta/lib/oe/package.py
@@ -123,3 +123,35 @@
                         shlib_provider[s[0]] = {}
                     shlib_provider[s[0]][s[1]] = (dep_pkg, s[2])
     return shlib_provider
+
+
+def npm_split_package_dirs(pkgdir):
+    """
+    Work out the packages fetched and unpacked by BitBake's npm fetcher
+    Returns a dict of packagename -> (relpath, package.json) ordered
+    such that it is suitable for use in PACKAGES and FILES
+    """
+    from collections import OrderedDict
+    import json
+    packages = {}
+    for root, dirs, files in os.walk(pkgdir):
+        if os.path.basename(root) == 'node_modules':
+            for dn in dirs:
+                relpth = os.path.relpath(os.path.join(root, dn), pkgdir)
+                pkgitems = ['${PN}']
+                for pathitem in relpth.split('/'):
+                    if pathitem == 'node_modules':
+                        continue
+                    pkgitems.append(pathitem)
+                pkgname = '-'.join(pkgitems).replace('_', '-')
+                pkgfile = os.path.join(root, dn, 'package.json')
+                data = None
+                if os.path.exists(pkgfile):
+                    with open(pkgfile, 'r') as f:
+                        data = json.loads(f.read())
+                packages[pkgname] = (relpth, data)
+    # We want the main package for a module sorted *after* its subpackages
+    # (so that it doesn't otherwise steal the files for the subpackage), so
+    # this is a cheap way to do that whilst still having an otherwise
+    # alphabetical sort
+    return OrderedDict((key, packages[key]) for key in sorted(packages, key=lambda pkg: pkg + '~'))
diff --git a/yocto-poky/meta/lib/oe/package_manager.py b/yocto-poky/meta/lib/oe/package_manager.py
index b9fa6d8..b4b359a 100644
--- a/yocto-poky/meta/lib/oe/package_manager.py
+++ b/yocto-poky/meta/lib/oe/package_manager.py
@@ -8,7 +8,8 @@
 import bb
 import tempfile
 import oe.utils
-
+import string
+from oe.gpg_sign import get_signer
 
 # this can be used by all PM backends to create the index files in parallel
 def create_index(arg):
@@ -109,16 +110,11 @@
 
         rpm_createrepo = bb.utils.which(os.getenv('PATH'), "createrepo")
         if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
-            pkgfeed_gpg_name = self.d.getVar('PACKAGE_FEED_GPG_NAME', True)
-            pkgfeed_gpg_pass = self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True)
+            signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND', True))
         else:
-            pkgfeed_gpg_name = None
-            pkgfeed_gpg_pass = None
-        gpg_bin = self.d.getVar('GPG_BIN', True) or \
-                  bb.utils.which(os.getenv('PATH'), "gpg")
-
+            signer = None
         index_cmds = []
-        repo_sign_cmds = []
+        repomd_files = []
         rpm_dirs_found = False
         for arch in archs:
             dbpath = os.path.join(self.d.getVar('WORKDIR', True), 'rpmdb', arch)
@@ -130,15 +126,7 @@
 
             index_cmds.append("%s --dbpath %s --update -q %s" % \
                              (rpm_createrepo, dbpath, arch_dir))
-            if pkgfeed_gpg_name:
-                repomd_file = os.path.join(arch_dir, 'repodata', 'repomd.xml')
-                gpg_cmd = "%s --detach-sign --armor --batch --no-tty --yes " \
-                          "--passphrase-file '%s' -u '%s' " % \
-                          (gpg_bin, pkgfeed_gpg_pass, pkgfeed_gpg_name)
-                if self.d.getVar('GPG_PATH', True):
-                    gpg_cmd += "--homedir %s " % self.d.getVar('GPG_PATH', True)
-                gpg_cmd += repomd_file
-                repo_sign_cmds.append(gpg_cmd)
+            repomd_files.append(os.path.join(arch_dir, 'repodata', 'repomd.xml'))
 
             rpm_dirs_found = True
 
@@ -151,19 +139,14 @@
         if result:
             bb.fatal('%s' % ('\n'.join(result)))
         # Sign repomd
-        result = oe.utils.multiprocess_exec(repo_sign_cmds, create_index)
-        if result:
-            bb.fatal('%s' % ('\n'.join(result)))
-        # Copy pubkey(s) to repo
-        distro_version = self.d.getVar('DISTRO_VERSION', True) or "oe.0"
-        if self.d.getVar('RPM_SIGN_PACKAGES', True) == '1':
-            shutil.copy2(self.d.getVar('RPM_GPG_PUBKEY', True),
-                         os.path.join(self.deploy_dir,
-                                      'RPM-GPG-KEY-%s' % distro_version))
-        if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
-            shutil.copy2(self.d.getVar('PACKAGE_FEED_GPG_PUBKEY', True),
-                         os.path.join(self.deploy_dir,
-                                      'REPODATA-GPG-KEY-%s' % distro_version))
+        if signer:
+            for repomd in repomd_files:
+                feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE', True)
+                is_ascii_sig = (feed_sig_type.upper() != "BIN")
+                signer.detach_sign(repomd,
+                                   self.d.getVar('PACKAGE_FEED_GPG_NAME', True),
+                                   self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True),
+                                   armor=is_ascii_sig)
 
 
 class OpkgIndexer(Indexer):
@@ -173,11 +156,16 @@
                      "MULTILIB_ARCHS"]
 
         opkg_index_cmd = bb.utils.which(os.getenv('PATH'), "opkg-make-index")
+        if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
+            signer = get_signer(self.d, self.d.getVar('PACKAGE_FEED_GPG_BACKEND', True))
+        else:
+            signer = None
 
         if not os.path.exists(os.path.join(self.deploy_dir, "Packages")):
             open(os.path.join(self.deploy_dir, "Packages"), "w").close()
 
-        index_cmds = []
+        index_cmds = set()
+        index_sign_files = set()
         for arch_var in arch_vars:
             archs = self.d.getVar(arch_var, True)
             if archs is None:
@@ -193,9 +181,11 @@
                 if not os.path.exists(pkgs_file):
                     open(pkgs_file, "w").close()
 
-                index_cmds.append('%s -r %s -p %s -m %s' %
+                index_cmds.add('%s -r %s -p %s -m %s' %
                                   (opkg_index_cmd, pkgs_file, pkgs_file, pkgs_dir))
 
+                index_sign_files.add(pkgs_file)
+
         if len(index_cmds) == 0:
             bb.note("There are no packages in %s!" % self.deploy_dir)
             return
@@ -203,9 +193,15 @@
         result = oe.utils.multiprocess_exec(index_cmds, create_index)
         if result:
             bb.fatal('%s' % ('\n'.join(result)))
-        if self.d.getVar('PACKAGE_FEED_SIGN', True) == '1':
-            raise NotImplementedError('Package feed signing not implementd for ipk')
 
+        if signer:
+            feed_sig_type = self.d.getVar('PACKAGE_FEED_GPG_SIGNATURE_TYPE', True)
+            is_ascii_sig = (feed_sig_type.upper() != "BIN")
+            for f in index_sign_files:
+                signer.detach_sign(f,
+                                   self.d.getVar('PACKAGE_FEED_GPG_NAME', True),
+                                   self.d.getVar('PACKAGE_FEED_GPG_PASSPHRASE_FILE', True),
+                                   armor=is_ascii_sig)
 
 
 class DpkgIndexer(Indexer):
@@ -247,7 +243,7 @@
                 if a not in pkg_archs:
                     arch_list.append(a)
 
-        all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split()
+        all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").split()
         arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in arch_list)
 
         apt_ftparchive = bb.utils.which(os.getenv('PATH'), "apt-ftparchive")
@@ -293,10 +289,61 @@
         self.rootfs_dir = rootfs_dir
 
     @abstractmethod
-    def list(self, format=None):
+    def list_pkgs(self):
         pass
 
 
+    """
+    This method parse the output from the package manager
+    and return a dictionary with the information of the
+    installed packages. This is used whne the packages are
+    in deb or ipk format
+    """
+    def opkg_query(self, cmd_output):
+        verregex = re.compile(' \([=<>]* [^ )]*\)')
+        output = dict()
+        filename = ""
+        dep = []
+        pkg = ""
+        for line in cmd_output.splitlines():
+            line = line.rstrip()
+            if ':' in line:
+                if line.startswith("Package: "):
+                    pkg = line.split(": ")[1]
+                elif line.startswith("Architecture: "):
+                    arch = line.split(": ")[1]
+                elif line.startswith("Version: "):
+                    ver = line.split(": ")[1]
+                elif line.startswith("File: "):
+                    filename = line.split(": ")[1]
+                elif line.startswith("Depends: "):
+                    depends = verregex.sub('', line.split(": ")[1])
+                    for depend in depends.split(", "):
+                        dep.append(depend)
+                elif line.startswith("Recommends: "):
+                    recommends = verregex.sub('', line.split(": ")[1])
+                    for recommend in recommends.split(", "):
+                        dep.append("%s [REC]" % recommend)
+            else:
+                # IPK doesn't include the filename
+                if not filename:
+                    filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
+                if pkg:
+                    output[pkg] = {"arch":arch, "ver":ver,
+                            "filename":filename, "deps": dep }
+                pkg = ""
+                filename = ""
+                dep = []
+
+        if pkg:
+            if not filename:
+                filename = "%s_%s_%s.ipk" % (pkg, ver, arch)
+            output[pkg] = {"arch":arch, "ver":ver,
+                    "filename":filename, "deps": dep }
+
+        return output
+
+
 class RpmPkgsList(PkgsList):
     def __init__(self, d, rootfs_dir, arch_var=None, os_var=None):
         super(RpmPkgsList, self).__init__(d, rootfs_dir)
@@ -314,7 +361,6 @@
         except subprocess.CalledProcessError as e:
             bb.fatal("Getting rpm version failed. Command '%s' "
                      "returned %d:\n%s" % (cmd, e.returncode, e.output))
-        self.rpm_version = int(output.split()[-1].split('.')[0])
 
     '''
     Translate the RPM/Smart format names to the OE multilib format names
@@ -362,55 +408,53 @@
 
         return output
 
-    def list(self, format=None):
-        if format == "deps":
-            if self.rpm_version == 4:
-                bb.fatal("'deps' format dependency listings are not supported with rpm 4 since rpmresolve does not work")
-            return self._list_pkg_deps()
-
+    def list_pkgs(self):
         cmd = self.rpm_cmd + ' --root ' + self.rootfs_dir
         cmd += ' -D "_dbpath /var/lib/rpm" -qa'
-        if self.rpm_version == 4:
-            cmd += " --qf '[%{NAME} %{ARCH} %{VERSION}\n]'"
-        else:
-            cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
+        cmd += " --qf '[%{NAME} %{ARCH} %{VERSION} %{PACKAGEORIGIN}\n]'"
 
         try:
             # bb.note(cmd)
             tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip()
-
         except subprocess.CalledProcessError as e:
             bb.fatal("Cannot get the installed packages list. Command '%s' "
                      "returned %d:\n%s" % (cmd, e.returncode, e.output))
 
-        output = list()
+        output = dict()
+        deps = dict()
+        dependencies = self._list_pkg_deps()
+
+        # Populate deps dictionary for better manipulation
+        for line in dependencies.splitlines():
+            try:
+                pkg, dep = line.split("|")
+                if not pkg in deps:
+                    deps[pkg] = list()
+                if not dep in deps[pkg]:
+                    deps[pkg].append(dep)
+            except:
+                # Ignore any other lines they're debug or errors
+                pass
+
         for line in tmp_output.split('\n'):
             if len(line.strip()) == 0:
                 continue
             pkg = line.split()[0]
             arch = line.split()[1]
             ver = line.split()[2]
+            dep = deps.get(pkg, [])
+
             # Skip GPG keys
             if pkg == 'gpg-pubkey':
                 continue
-            if self.rpm_version == 4:
-                pkgorigin = "unknown"
-            else:
-                pkgorigin = line.split()[3]
+
+            pkgorigin = line.split()[3]
             new_pkg, new_arch = self._pkg_translate_smart_to_oe(pkg, arch)
 
-            if format == "arch":
-                output.append('%s %s' % (new_pkg, new_arch))
-            elif format == "file":
-                output.append('%s %s %s' % (new_pkg, pkgorigin, new_arch))
-            elif format == "ver":
-                output.append('%s %s %s' % (new_pkg, new_arch, ver))
-            else:
-                output.append('%s' % (new_pkg))
+            output[new_pkg] = {"arch":new_arch, "ver":ver,
+                        "filename":pkgorigin, "deps":dep}
 
-            output.sort()
-
-        return '\n'.join(output)
+        return output
 
 
 class OpkgPkgsList(PkgsList):
@@ -421,107 +465,39 @@
         self.opkg_args = "-f %s -o %s " % (config_file, rootfs_dir)
         self.opkg_args += self.d.getVar("OPKG_ARGS", True)
 
-    def list(self, format=None):
-        opkg_query_cmd = bb.utils.which(os.getenv('PATH'), "opkg-query-helper.py")
+    def list_pkgs(self, format=None):
+        cmd = "%s %s status" % (self.opkg_cmd, self.opkg_args)
 
-        if format == "arch":
-            cmd = "%s %s status | %s -a" % \
-                (self.opkg_cmd, self.opkg_args, opkg_query_cmd)
-        elif format == "file":
-            cmd = "%s %s status | %s -f" % \
-                (self.opkg_cmd, self.opkg_args, opkg_query_cmd)
-        elif format == "ver":
-            cmd = "%s %s status | %s -v" % \
-                (self.opkg_cmd, self.opkg_args, opkg_query_cmd)
-        elif format == "deps":
-            cmd = "%s %s status | %s" % \
-                (self.opkg_cmd, self.opkg_args, opkg_query_cmd)
-        else:
-            cmd = "%s %s list_installed | cut -d' ' -f1" % \
-                (self.opkg_cmd, self.opkg_args)
-
-        try:
-            # bb.note(cmd)
-            tmp_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).strip()
-
-        except subprocess.CalledProcessError as e:
+        # opkg returns success even when it printed some
+        # "Collected errors:" report to stderr. Mixing stderr into
+        # stdout then leads to random failures later on when
+        # parsing the output. To avoid this we need to collect both
+        # output streams separately and check for empty stderr.
+        p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
+        cmd_output, cmd_stderr = p.communicate()
+        if p.returncode or cmd_stderr:
             bb.fatal("Cannot get the installed packages list. Command '%s' "
-                     "returned %d:\n%s" % (cmd, e.returncode, e.output))
+                     "returned %d and stderr:\n%s" % (cmd, p.returncode, cmd_stderr))
 
-        output = list()
-        for line in tmp_output.split('\n'):
-            if len(line.strip()) == 0:
-                continue
-            if format == "file":
-                pkg, pkg_file, pkg_arch = line.split()
-                full_path = os.path.join(self.rootfs_dir, pkg_arch, pkg_file)
-                if os.path.exists(full_path):
-                    output.append('%s %s %s' % (pkg, full_path, pkg_arch))
-                else:
-                    output.append('%s %s %s' % (pkg, pkg_file, pkg_arch))
-            else:
-                output.append(line)
-
-        output.sort()
-
-        return '\n'.join(output)
+        return self.opkg_query(cmd_output)
 
 
 class DpkgPkgsList(PkgsList):
-    def list(self, format=None):
+
+    def list_pkgs(self):
         cmd = [bb.utils.which(os.getenv('PATH'), "dpkg-query"),
                "--admindir=%s/var/lib/dpkg" % self.rootfs_dir,
                "-W"]
 
-        if format == "arch":
-            cmd.append("-f=${Package} ${PackageArch}\n")
-        elif format == "file":
-            cmd.append("-f=${Package} ${Package}_${Version}_${Architecture}.deb ${PackageArch}\n")
-        elif format == "ver":
-            cmd.append("-f=${Package} ${PackageArch} ${Version}\n")
-        elif format == "deps":
-            cmd.append("-f=Package: ${Package}\nDepends: ${Depends}\nRecommends: ${Recommends}\n\n")
-        else:
-            cmd.append("-f=${Package}\n")
+        cmd.append("-f=Package: ${Package}\nArchitecture: ${PackageArch}\nVersion: ${Version}\nFile: ${Package}_${Version}_${Architecture}.deb\nDepends: ${Depends}\nRecommends: ${Recommends}\n\n")
 
         try:
-            output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip()
+            cmd_output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip()
         except subprocess.CalledProcessError as e:
             bb.fatal("Cannot get the installed packages list. Command '%s' "
                      "returned %d:\n%s" % (' '.join(cmd), e.returncode, e.output))
 
-        if format == "file":
-            tmp_output = ""
-            for line in tuple(output.split('\n')):
-                if not line.strip():
-                    continue
-                pkg, pkg_file, pkg_arch = line.split()
-                full_path = os.path.join(self.rootfs_dir, pkg_arch, pkg_file)
-                if os.path.exists(full_path):
-                    tmp_output += "%s %s %s\n" % (pkg, full_path, pkg_arch)
-                else:
-                    tmp_output += "%s %s %s\n" % (pkg, pkg_file, pkg_arch)
-
-            output = tmp_output
-        elif format == "deps":
-            opkg_query_cmd = bb.utils.which(os.getenv('PATH'), "opkg-query-helper.py")
-            file_out = tempfile.NamedTemporaryFile()
-            file_out.write(output)
-            file_out.flush()
-
-            try:
-                output = subprocess.check_output("cat %s | %s" %
-                                                 (file_out.name, opkg_query_cmd),
-                                                 stderr=subprocess.STDOUT,
-                                                 shell=True)
-            except subprocess.CalledProcessError as e:
-                file_out.close()
-                bb.fatal("Cannot compute packages dependencies. Command '%s' "
-                         "returned %d:\n%s" % (e.cmd, e.returncode, e.output))
-
-            file_out.close()
-
-        return output
+        return self.opkg_query(cmd_output)
 
 
 class PackageManager(object):
@@ -535,7 +511,8 @@
         self.deploy_dir = None
         self.deploy_lock = None
         self.feed_uris = self.d.getVar('PACKAGE_FEED_URIS', True) or ""
-        self.feed_prefix = self.d.getVar('PACKAGE_FEED_PREFIX', True) or ""
+        self.feed_base_paths = self.d.getVar('PACKAGE_FEED_BASE_PATHS', True) or ""
+        self.feed_archs = self.d.getVar('PACKAGE_FEED_ARCHS', True)
 
     """
     Update the package manager package database.
@@ -572,7 +549,7 @@
         pass
 
     @abstractmethod
-    def list_installed(self, format=None):
+    def list_installed(self):
         pass
 
     @abstractmethod
@@ -592,7 +569,9 @@
         installed_pkgs_file = os.path.join(self.d.getVar('WORKDIR', True),
                                            "installed_pkgs.txt")
         with open(installed_pkgs_file, "w+") as installed_pkgs:
-            installed_pkgs.write(self.list_installed("arch"))
+            pkgs = self.list_installed()
+            output = oe.utils.format_pkg_list(pkgs, "arch")
+            installed_pkgs.write(output)
 
         if globs is None:
             globs = self.d.getVar('IMAGE_INSTALL_COMPLEMENTARY', True)
@@ -625,6 +604,7 @@
                      "'%s' returned %d:\n%s" %
                      (' '.join(cmd), e.returncode, e.output))
         self.install(complementary_pkgs.split(), attempt_only=True)
+        os.remove(installed_pkgs_file)
 
     def deploy_dir_lock(self):
         if self.deploy_dir is None:
@@ -642,6 +622,25 @@
 
         self.deploy_lock = None
 
+    """
+    Construct URIs based on the following pattern: uri/base_path where 'uri'
+    and 'base_path' correspond to each element of the corresponding array
+    argument leading to len(uris) x len(base_paths) elements on the returned
+    array
+    """
+    def construct_uris(self, uris, base_paths):
+        def _append(arr1, arr2, sep='/'):
+            res = []
+            narr1 = map(lambda a: string.rstrip(a, sep), arr1)
+            narr2 = map(lambda a: string.lstrip(string.rstrip(a, sep), sep), arr2)
+            for a1 in narr1:
+                if arr2:
+                    for a2 in narr2:
+                        res.append("%s%s%s" % (a1, sep, a2))
+                else:
+                    res.append(a1)
+            return res
+        return _append(uris, base_paths)
 
 class RpmPM(PackageManager):
     def __init__(self,
@@ -664,8 +663,16 @@
         self.install_dir_path = os.path.join(self.target_rootfs, self.install_dir_name)
         self.rpm_cmd = bb.utils.which(os.getenv('PATH'), "rpm")
         self.smart_cmd = bb.utils.which(os.getenv('PATH'), "smart")
-        self.smart_opt = "--log-level=warning --data-dir=" + os.path.join(target_rootfs,
-                                                      'var/lib/smart')
+        # 0 = default, only warnings
+        # 1 = --log-level=info (includes information about executing scriptlets and their output)
+        # 2 = --log-level=debug
+        # 3 = --log-level=debug plus dumps of scriplet content and command invocation
+        self.debug_level = int(d.getVar('ROOTFS_RPM_DEBUG', True) or "0")
+        self.smart_opt = "--log-level=%s --data-dir=%s" % \
+                         ("warning" if self.debug_level == 0 else
+                          "info" if self.debug_level == 1 else
+                          "debug",
+                          os.path.join(target_rootfs, 'var/lib/smart'))
         self.scriptlet_wrapper = self.d.expand('${WORKDIR}/scriptlet_wrapper')
         self.solution_manifest = self.d.expand('${T}/saved/%s_solution' %
                                                self.task_name)
@@ -677,7 +684,6 @@
 
         self.indexer = RpmIndexer(self.d, self.deploy_dir)
         self.pkgs_list = RpmPkgsList(self.d, self.target_rootfs, arch_var, os_var)
-        self.rpm_version = self.pkgs_list.rpm_version
 
         self.ml_prefix_list, self.ml_os_list = self.indexer.get_ml_prefix_and_os_list(arch_var, os_var)
 
@@ -685,42 +691,55 @@
         if self.feed_uris == "":
             return
 
-        # List must be prefered to least preferred order
-        default_platform_extra = set()
-        platform_extra = set()
-        bbextendvariant = self.d.getVar('BBEXTENDVARIANT', True) or ""
-        for mlib in self.ml_os_list:
-            for arch in self.ml_prefix_list[mlib]:
-                plt = arch.replace('-', '_') + '-.*-' + self.ml_os_list[mlib]
-                if mlib == bbextendvariant:
-                        default_platform_extra.add(plt)
-                else:
-                        platform_extra.add(plt)
-
-        platform_extra = platform_extra.union(default_platform_extra)
-
         arch_list = []
-        for canonical_arch in platform_extra:
-            arch = canonical_arch.split('-')[0]
-            if not os.path.exists(os.path.join(self.deploy_dir, arch)):
-                continue
-            arch_list.append(arch)
+        if self.feed_archs is not None:
+            # User define feed architectures
+            arch_list = self.feed_archs.split()
+        else:
+            # List must be prefered to least preferred order
+            default_platform_extra = set()
+            platform_extra = set()
+            bbextendvariant = self.d.getVar('BBEXTENDVARIANT', True) or ""
+            for mlib in self.ml_os_list:
+                for arch in self.ml_prefix_list[mlib]:
+                    plt = arch.replace('-', '_') + '-.*-' + self.ml_os_list[mlib]
+                    if mlib == bbextendvariant:
+                            default_platform_extra.add(plt)
+                    else:
+                            platform_extra.add(plt)
+
+            platform_extra = platform_extra.union(default_platform_extra)
+
+            for canonical_arch in platform_extra:
+                arch = canonical_arch.split('-')[0]
+                if not os.path.exists(os.path.join(self.deploy_dir, arch)):
+                    continue
+                arch_list.append(arch)
+
+        feed_uris = self.construct_uris(self.feed_uris.split(), self.feed_base_paths.split())
 
         uri_iterator = 0
-        channel_priority = 10 + 5 * len(self.feed_uris.split()) * len(arch_list)
+        channel_priority = 10 + 5 * len(feed_uris) * (len(arch_list) if arch_list else 1)
 
-        for uri in self.feed_uris.split():
-            full_uri = uri
-            if self.feed_prefix:
-                full_uri = os.path.join(uri, self.feed_prefix)
-            for arch in arch_list:
-                bb.note('Note: adding Smart channel url%d%s (%s)' %
-                        (uri_iterator, arch, channel_priority))
-                self._invoke_smart('channel --add url%d-%s type=rpm-md baseurl=%s/%s -y'
-                                   % (uri_iterator, arch, full_uri, arch))
-                self._invoke_smart('channel --set url%d-%s priority=%d' %
-                                   (uri_iterator, arch, channel_priority))
+        for uri in feed_uris:
+            if arch_list:
+                for arch in arch_list:
+                    bb.note('Note: adding Smart channel url%d%s (%s)' %
+                            (uri_iterator, arch, channel_priority))
+                    self._invoke_smart('channel --add url%d-%s type=rpm-md baseurl=%s/%s -y'
+                                       % (uri_iterator, arch, uri, arch))
+                    self._invoke_smart('channel --set url%d-%s priority=%d' %
+                                       (uri_iterator, arch, channel_priority))
+                    channel_priority -= 5
+            else:
+                bb.note('Note: adding Smart channel url%d (%s)' %
+                        (uri_iterator, channel_priority))
+                self._invoke_smart('channel --add url%d type=rpm-md baseurl=%s -y'
+                                   % (uri_iterator, uri))
+                self._invoke_smart('channel --set url%d priority=%d' %
+                                   (uri_iterator, channel_priority))
                 channel_priority -= 5
+
             uri_iterator += 1
 
     '''
@@ -886,44 +905,41 @@
         # After change the __db.* cache size, log file will not be
         # generated automatically, that will raise some warnings,
         # so touch a bare log for rpm write into it.
-        if self.rpm_version == 5:
-            rpmlib_log = os.path.join(self.image_rpmlib, 'log', 'log.0000000001')
-            if not os.path.exists(rpmlib_log):
-                bb.utils.mkdirhier(os.path.join(self.image_rpmlib, 'log'))
-                open(rpmlib_log, 'w+').close()
+        rpmlib_log = os.path.join(self.image_rpmlib, 'log', 'log.0000000001')
+        if not os.path.exists(rpmlib_log):
+            bb.utils.mkdirhier(os.path.join(self.image_rpmlib, 'log'))
+            open(rpmlib_log, 'w+').close()
 
-            DB_CONFIG_CONTENT = "# ================ Environment\n" \
-                "set_data_dir .\n" \
-                "set_create_dir .\n" \
-                "set_lg_dir ./log\n" \
-                "set_tmp_dir ./tmp\n" \
-                "set_flags db_log_autoremove on\n" \
-                "\n" \
-                "# -- thread_count must be >= 8\n" \
-                "set_thread_count 64\n" \
-                "\n" \
-                "# ================ Logging\n" \
-                "\n" \
-                "# ================ Memory Pool\n" \
-                "set_cachesize 0 1048576 0\n" \
-                "set_mp_mmapsize 268435456\n" \
-                "\n" \
-                "# ================ Locking\n" \
-                "set_lk_max_locks 16384\n" \
-                "set_lk_max_lockers 16384\n" \
-                "set_lk_max_objects 16384\n" \
-                "mutex_set_max 163840\n" \
-                "\n" \
-                "# ================ Replication\n"
+        DB_CONFIG_CONTENT = "# ================ Environment\n" \
+            "set_data_dir .\n" \
+            "set_create_dir .\n" \
+            "set_lg_dir ./log\n" \
+            "set_tmp_dir ./tmp\n" \
+            "set_flags db_log_autoremove on\n" \
+            "\n" \
+            "# -- thread_count must be >= 8\n" \
+            "set_thread_count 64\n" \
+            "\n" \
+            "# ================ Logging\n" \
+            "\n" \
+            "# ================ Memory Pool\n" \
+            "set_cachesize 0 1048576 0\n" \
+            "set_mp_mmapsize 268435456\n" \
+            "\n" \
+            "# ================ Locking\n" \
+            "set_lk_max_locks 16384\n" \
+            "set_lk_max_lockers 16384\n" \
+            "set_lk_max_objects 16384\n" \
+            "mutex_set_max 163840\n" \
+            "\n" \
+            "# ================ Replication\n"
 
-            db_config_dir = os.path.join(self.image_rpmlib, 'DB_CONFIG')
-            if not os.path.exists(db_config_dir):
-                open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
+        db_config_dir = os.path.join(self.image_rpmlib, 'DB_CONFIG')
+        if not os.path.exists(db_config_dir):
+            open(db_config_dir, 'w+').write(DB_CONFIG_CONTENT)
 
         # Create database so that smart doesn't complain (lazy init)
         opt = "-qa"
-        if self.rpm_version == 4:
-            opt = "--initdb"
         cmd = "%s --root %s --dbpath /var/lib/rpm %s > /dev/null" % (
               self.rpm_cmd, self.target_rootfs, opt)
         try:
@@ -1010,12 +1026,19 @@
         # If we ever run into needing more the 899 scripts, we'll have to.
         # change num to start with 1000.
         #
-        if self.rpm_version == 4:
-            scriptletcmd = "$2 $3 $4\n"
-            scriptpath = "$3"
+        scriptletcmd = "$2 $1/$3 $4\n"
+        scriptpath = "$1/$3"
+
+        # When self.debug_level >= 3, also dump the content of the
+        # executed scriptlets and how they get invoked.  We have to
+        # replace "exit 1" and "ERR" because printing those as-is
+        # would trigger a log analysis failure.
+        if self.debug_level >= 3:
+            dump_invocation = 'echo "Executing ${name} ${kind} with: ' + scriptletcmd + '"\n'
+            dump_script = 'cat ' + scriptpath + '| sed -e "s/exit 1/exxxit 1/g" -e "s/ERR/IRR/g"; echo\n'
         else:
-            scriptletcmd = "$2 $1/$3 $4\n"
-            scriptpath = "$1/$3"
+            dump_invocation = 'echo "Executing ${name} ${kind}"\n'
+            dump_script = ''
 
         SCRIPTLET_FORMAT = "#!/bin/bash\n" \
             "\n" \
@@ -1027,19 +1050,25 @@
             "export INTERCEPT_DIR=%s\n" \
             "export NATIVE_ROOT=%s\n" \
             "\n" \
+            "name=`head -1 " + scriptpath + " | cut -d\' \' -f 2`\n" \
+            "kind=`head -1 " + scriptpath + " | cut -d\' \' -f 4`\n" \
+            + dump_invocation \
+            + dump_script \
             + scriptletcmd + \
-            "if [ $? -ne 0 ]; then\n" \
+            "ret=$?\n" \
+            "echo Result of ${name} ${kind}: ${ret}\n" \
+            "if [ ${ret} -ne 0 ]; then\n" \
             "  if [ $4 -eq 1 ]; then\n" \
             "    mkdir -p $1/etc/rpm-postinsts\n" \
             "    num=100\n" \
             "    while [ -e $1/etc/rpm-postinsts/${num}-* ]; do num=$((num + 1)); done\n" \
-            "    name=`head -1 " + scriptpath + " | cut -d\' \' -f 2`\n" \
             '    echo "#!$2" > $1/etc/rpm-postinsts/${num}-${name}\n' \
             '    echo "# Arg: $4" >> $1/etc/rpm-postinsts/${num}-${name}\n' \
             "    cat " + scriptpath + " >> $1/etc/rpm-postinsts/${num}-${name}\n" \
             "    chmod +x $1/etc/rpm-postinsts/${num}-${name}\n" \
+            '    echo "Info: deferring ${name} ${kind} install scriptlet to first boot"\n' \
             "  else\n" \
-            '    echo "Error: pre/post remove scriptlet failed"\n' \
+            '    echo "Error: ${name} ${kind} remove scriptlet failed"\n' \
             "  fi\n" \
             "fi\n"
 
@@ -1238,8 +1267,8 @@
                             self.image_rpmlib,
                             symlinks=True)
 
-    def list_installed(self, format=None):
-        return self.pkgs_list.list(format)
+    def list_installed(self):
+        return self.pkgs_list.list_pkgs()
 
     '''
     If incremental install, we need to determine what we've got,
@@ -1397,10 +1426,11 @@
         if not os.path.exists(self.d.expand('${T}/saved')):
             bb.utils.mkdirhier(self.d.expand('${T}/saved'))
 
-        if (self.d.getVar('BUILD_IMAGES_FROM_FEEDS', True) or "") != "1":
-            self._create_config()
-        else:
+        self.from_feeds = (self.d.getVar('BUILD_IMAGES_FROM_FEEDS', True) or "") == "1"
+        if self.from_feeds:
             self._create_custom_config()
+        else:
+            self._create_config()
 
         self.indexer = OpkgIndexer(self.d, self.deploy_dir)
 
@@ -1471,14 +1501,14 @@
                                         self.d.getVar('FEED_DEPLOYDIR_BASE_URI', True),
                                         arch))
 
-            if self.opkg_dir != '/var/lib/opkg':
-                # There is no command line option for this anymore, we need to add
-                # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
-                # the default value of "/var/lib" as defined in opkg:
-                # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR      "/var/lib/opkg/info"
-                # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE   "/var/lib/opkg/status"
-                cfg_file.write("option info_dir     %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
-                cfg_file.write("option status_file  %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
+                        if self.opkg_dir != '/var/lib/opkg':
+                            # There is no command line option for this anymore, we need to add
+                            # info_dir and status_file to config file, if OPKGLIBDIR doesn't have
+                            # the default value of "/var/lib" as defined in opkg:
+                            # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_INFO_DIR      "/var/lib/opkg/info"
+                            # libopkg/opkg_conf.h:#define OPKG_CONF_DEFAULT_STATUS_FILE   "/var/lib/opkg/status"
+                            cfg_file.write("option info_dir     %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'info'))
+                            cfg_file.write("option status_file  %s\n" % os.path.join(self.d.getVar('OPKGLIBDIR', True), 'opkg', 'status'))
 
 
     def _create_config(self):
@@ -1512,21 +1542,26 @@
         rootfs_config = os.path.join('%s/etc/opkg/base-feeds.conf'
                                   % self.target_rootfs)
 
+        feed_uris = self.construct_uris(self.feed_uris.split(), self.feed_base_paths.split())
+        archs = self.pkg_archs.split() if self.feed_archs is None else self.feed_archs.split()
+
         with open(rootfs_config, "w+") as config_file:
             uri_iterator = 0
-            for uri in self.feed_uris.split():
-                full_uri = uri
-                if self.feed_prefix:
-                    full_uri = os.path.join(uri, self.feed_prefix)
+            for uri in feed_uris:
+                if archs:
+                    for arch in archs:
+                        if (self.feed_archs is None) and (not os.path.exists(os.path.join(self.deploy_dir, arch))):
+                            continue
+                        bb.note('Note: adding opkg feed url-%s-%d (%s)' %
+                            (arch, uri_iterator, uri))
+                        config_file.write("src/gz uri-%s-%d %s/%s\n" %
+                                          (arch, uri_iterator, uri, arch))
+                else:
+                    bb.note('Note: adding opkg feed url-%d (%s)' %
+                        (uri_iterator, uri))
+                    config_file.write("src/gz uri-%d %s\n" %
+                                      (uri_iterator, uri))
 
-                for arch in self.pkg_archs.split():
-                    if not os.path.exists(os.path.join(self.deploy_dir, arch)):
-                        continue
-                    bb.note('Note: adding opkg feed url-%s-%d (%s)' %
-                        (arch, uri_iterator, full_uri))
-
-                    config_file.write("src/gz uri-%s-%d %s/%s\n" %
-                                      (arch, uri_iterator, full_uri, arch))
                 uri_iterator += 1
 
     def update(self):
@@ -1598,8 +1633,12 @@
         # create the directory back, it's needed by PM lock
         bb.utils.mkdirhier(self.opkg_dir)
 
-    def list_installed(self, format=None):
-        return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list(format)
+    def remove_lists(self):
+        if not self.from_feeds:
+            bb.utils.remove(os.path.join(self.opkg_dir, "lists"), True)
+
+    def list_installed(self):
+        return OpkgPkgsList(self.d, self.target_rootfs, self.config_file).list_pkgs()
 
     def handle_bad_recommendations(self):
         bad_recommendations = self.d.getVar("BAD_RECOMMENDATIONS", True) or ""
@@ -1711,7 +1750,7 @@
         self.apt_args = d.getVar("APT_ARGS", True)
 
         self.all_arch_list = archs.split()
-        all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").replace('-', '_').split()
+        all_mlb_pkg_arch_list = (self.d.getVar('ALL_MULTILIB_PACKAGE_ARCHS', True) or "").split()
         self.all_arch_list.extend(arch for arch in all_mlb_pkg_arch_list if arch not in self.all_arch_list)
 
         self._create_configs(archs, base_archs)
@@ -1872,20 +1911,26 @@
                                     % self.target_rootfs)
         arch_list = []
 
-        for arch in self.all_arch_list:
-            if not os.path.exists(os.path.join(self.deploy_dir, arch)):
-                continue
-            arch_list.append(arch)
+        if self.feed_archs is None:
+            for arch in self.all_arch_list:
+                if not os.path.exists(os.path.join(self.deploy_dir, arch)):
+                    continue
+                arch_list.append(arch)
+        else:
+            arch_list = self.feed_archs.split()
+
+        feed_uris = self.construct_uris(self.feed_uris.split(), self.feed_base_paths.split())
 
         with open(sources_conf, "w+") as sources_file:
-            for uri in self.feed_uris.split():
-                full_uri = uri
-                if self.feed_prefix:
-                    full_uri = os.path.join(uri, self.feed_prefix)
-                for arch in arch_list:
+            for uri in feed_uris:
+                if arch_list:
+                    for arch in arch_list:
+                        bb.note('Note: adding dpkg channel at (%s)' % uri)
+                        sources_file.write("deb %s/%s ./\n" %
+                                           (uri, arch))
+                else:
                     bb.note('Note: adding dpkg channel at (%s)' % uri)
-                    sources_file.write("deb %s/%s ./\n" %
-                                       (full_uri, arch))
+                    sources_file.write("deb %s ./\n" % uri)
 
     def _create_configs(self, archs, base_archs):
         base_archs = re.sub("_", "-", base_archs)
@@ -1896,6 +1941,7 @@
         bb.utils.mkdirhier(self.apt_conf_dir)
         bb.utils.mkdirhier(self.apt_conf_dir + "/lists/partial/")
         bb.utils.mkdirhier(self.apt_conf_dir + "/apt.conf.d/")
+        bb.utils.mkdirhier(self.apt_conf_dir + "/preferences.d/")
 
         arch_list = []
         for arch in self.all_arch_list:
@@ -1930,10 +1976,14 @@
         base_arch_list = base_archs.split()
         multilib_variants = self.d.getVar("MULTILIB_VARIANTS", True);
         for variant in multilib_variants.split():
-            if variant == "lib32":
-                base_arch_list.append("i386")
-            elif variant == "lib64":
-                base_arch_list.append("amd64")
+            localdata = bb.data.createCopy(self.d)
+            variant_tune = localdata.getVar("DEFAULTTUNE_virtclass-multilib-" + variant, False)
+            orig_arch = localdata.getVar("DPKG_ARCH", True)
+            localdata.setVar("DEFAULTTUNE", variant_tune)
+            bb.data.update_data(localdata)
+            variant_arch = localdata.getVar("DPKG_ARCH", True)
+            if variant_arch not in base_arch_list:
+                base_arch_list.append(variant_arch)
 
         with open(self.apt_conf_file, "w+") as apt_conf:
             with open(self.d.expand("${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample")) as apt_conf_sample:
@@ -1976,8 +2026,8 @@
             bb.fatal("Cannot fix broken dependencies. Command '%s' "
                      "returned %d:\n%s" % (cmd, e.returncode, e.output))
 
-    def list_installed(self, format=None):
-        return DpkgPkgsList(self.d, self.target_rootfs).list()
+    def list_installed(self):
+        return DpkgPkgsList(self.d, self.target_rootfs).list_pkgs()
 
 
 def generate_index_files(d):
diff --git a/yocto-poky/meta/lib/oe/packagedata.py b/yocto-poky/meta/lib/oe/packagedata.py
index cd5f044..bc0fd06 100644
--- a/yocto-poky/meta/lib/oe/packagedata.py
+++ b/yocto-poky/meta/lib/oe/packagedata.py
@@ -1,4 +1,5 @@
 import codecs
+import os
 
 def packaged(pkg, d):
     return os.access(get_subpkgedata_fn(pkg, d) + '.packaged', os.R_OK)
diff --git a/yocto-poky/meta/lib/oe/packagegroup.py b/yocto-poky/meta/lib/oe/packagegroup.py
index 12eb421..a6fee5f 100644
--- a/yocto-poky/meta/lib/oe/packagegroup.py
+++ b/yocto-poky/meta/lib/oe/packagegroup.py
@@ -3,9 +3,9 @@
 def is_optional(feature, d):
     packages = d.getVar("FEATURE_PACKAGES_%s" % feature, True)
     if packages:
-        return bool(d.getVarFlag("FEATURE_PACKAGES_%s" % feature, "optional"))
+        return bool(d.getVarFlag("FEATURE_PACKAGES_%s" % feature, "optional", True))
     else:
-        return bool(d.getVarFlag("PACKAGE_GROUP_%s" % feature, "optional"))
+        return bool(d.getVarFlag("PACKAGE_GROUP_%s" % feature, "optional", True))
 
 def packages(features, d):
     for feature in features:
diff --git a/yocto-poky/meta/lib/oe/patch.py b/yocto-poky/meta/lib/oe/patch.py
index 2bf501e..9d36172 100644
--- a/yocto-poky/meta/lib/oe/patch.py
+++ b/yocto-poky/meta/lib/oe/patch.py
@@ -8,12 +8,14 @@
         return "Error: %s not found." % self.path
 
 class CmdError(bb.BBHandledException):
-    def __init__(self, exitstatus, output):
+    def __init__(self, command, exitstatus, output):
+        self.command = command
         self.status = exitstatus
         self.output = output
 
     def __str__(self):
-        return "Command Error: exit status: %d  Output:\n%s" % (self.status, self.output)
+        return "Command Error: '%s' exited with %d  Output:\n%s" % \
+                (self.command, self.status, self.output)
 
 
 def runcmd(args, dir = None):
@@ -32,7 +34,7 @@
         # print("cmd: %s" % cmd)
         (exitstatus, output) = oe.utils.getstatusoutput(cmd)
         if exitstatus != 0:
-            raise CmdError(exitstatus >> 8, output)
+            raise CmdError(cmd, exitstatus >> 8, output)
         return output
 
     finally:
@@ -212,13 +214,17 @@
         if not force:
             shellcmd.append('--dry-run')
 
-        output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+        try:
+            output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
 
-        if force:
-            return
+            if force:
+                return
 
-        shellcmd.pop(len(shellcmd) - 1)
-        output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+            shellcmd.pop(len(shellcmd) - 1)
+            output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir)
+        except CmdError as err:
+            raise bb.BBHandledException("Applying '%s' failed:\n%s" %
+                                        (os.path.basename(patch['file']), err.output))
 
         if not reverse:
             self._appendPatchFile(patch['file'], patch['strippath'])
@@ -264,6 +270,7 @@
 
 class GitApplyTree(PatchTree):
     patch_line_prefix = '%% original patch'
+    ignore_commit_prefix = '%% ignore'
 
     def __init__(self, dir, d):
         PatchTree.__init__(self, dir, d)
@@ -282,33 +289,32 @@
         return lines
 
     @staticmethod
-    def prepareCommit(patchfile):
-        """
-        Prepare a git commit command line based on the header from a patch file
-        (typically this is useful for patches that cannot be applied with "git am" due to formatting)
-        """
-        import tempfile
+    def decodeAuthor(line):
+        from email.header import decode_header
+        authorval = line.split(':', 1)[1].strip().replace('"', '')
+        return decode_header(authorval)[0][0]
+
+    @staticmethod
+    def interpretPatchHeader(headerlines):
         import re
         author_re = re.compile('[\S ]+ <\S+@\S+\.\S+>')
-        # Process patch header and extract useful information
-        lines = GitApplyTree.extractPatchHeader(patchfile)
         outlines = []
         author = None
         date = None
-        for line in lines:
+        subject = None
+        for line in headerlines:
             if line.startswith('Subject: '):
                 subject = line.split(':', 1)[1]
                 # Remove any [PATCH][oe-core] etc.
                 subject = re.sub(r'\[.+?\]\s*', '', subject)
-                outlines.insert(0, '%s\n\n' % subject.strip())
                 continue
-            if line.startswith('From: ') or line.startswith('Author: '):
-                authorval = line.split(':', 1)[1].strip().replace('"', '')
+            elif line.startswith('From: ') or line.startswith('Author: '):
+                authorval = GitApplyTree.decodeAuthor(line)
                 # git is fussy about author formatting i.e. it must be Name <email@domain>
                 if author_re.match(authorval):
                     author = authorval
                     continue
-            if line.startswith('Date: '):
+            elif line.startswith('Date: '):
                 if date is None:
                     dateval = line.split(':', 1)[1].strip()
                     # Very crude check for date format, since git will blow up if it's not in the right
@@ -316,12 +322,41 @@
                     if len(dateval) > 12:
                         date = dateval
                 continue
-            if line.startswith('Signed-off-by: '):
-                authorval = line.split(':', 1)[1].strip().replace('"', '')
+            elif not author and line.lower().startswith('signed-off-by: '):
+                authorval = GitApplyTree.decodeAuthor(line)
                 # git is fussy about author formatting i.e. it must be Name <email@domain>
                 if author_re.match(authorval):
                     author = authorval
             outlines.append(line)
+        return outlines, author, date, subject
+
+    @staticmethod
+    def prepareCommit(patchfile):
+        """
+        Prepare a git commit command line based on the header from a patch file
+        (typically this is useful for patches that cannot be applied with "git am" due to formatting)
+        """
+        import tempfile
+        # Process patch header and extract useful information
+        lines = GitApplyTree.extractPatchHeader(patchfile)
+        outlines, author, date, subject = GitApplyTree.interpretPatchHeader(lines)
+        if not author or not subject:
+            try:
+                shellcmd = ["git", "log", "--format=email", "--diff-filter=A", "--", patchfile]
+                out = runcmd(["sh", "-c", " ".join(shellcmd)], os.path.dirname(patchfile))
+            except CmdError:
+                out = None
+            if out:
+                _, newauthor, newdate, newsubject = GitApplyTree.interpretPatchHeader(out.splitlines())
+                if not author or not date:
+                    # These really need to go together
+                    author = newauthor
+                    date = newdate
+                if not subject:
+                    subject = newsubject
+        if subject:
+            outlines.insert(0, '%s\n\n' % subject.strip())
+
         # Write out commit message to a file
         with tempfile.NamedTemporaryFile('w', delete=False) as tf:
             tmpfile = tf.name
@@ -356,6 +391,8 @@
                             if line.startswith(GitApplyTree.patch_line_prefix):
                                 outfile = line.split()[-1].strip()
                                 continue
+                            if line.startswith(GitApplyTree.ignore_commit_prefix):
+                                continue
                             patchlines.append(line)
                     if not outfile:
                         outfile = os.path.basename(srcfile)
@@ -383,14 +420,15 @@
         reporoot = (runcmd("git rev-parse --show-toplevel".split(), self.dir) or '').strip()
         if not reporoot:
             raise Exception("Cannot get repository root for directory %s" % self.dir)
-        commithook = os.path.join(reporoot, '.git', 'hooks', 'commit-msg')
-        commithook_backup = commithook + '.devtool-orig'
-        applyhook = os.path.join(reporoot, '.git', 'hooks', 'applypatch-msg')
-        applyhook_backup = applyhook + '.devtool-orig'
-        if os.path.exists(commithook):
-            shutil.move(commithook, commithook_backup)
-        if os.path.exists(applyhook):
-            shutil.move(applyhook, applyhook_backup)
+        hooks_dir = os.path.join(reporoot, '.git', 'hooks')
+        hooks_dir_backup = hooks_dir + '.devtool-orig'
+        if os.path.lexists(hooks_dir_backup):
+            raise Exception("Git hooks backup directory already exists: %s" % hooks_dir_backup)
+        if os.path.lexists(hooks_dir):
+            shutil.move(hooks_dir, hooks_dir_backup)
+        os.mkdir(hooks_dir)
+        commithook = os.path.join(hooks_dir, 'commit-msg')
+        applyhook = os.path.join(hooks_dir, 'applypatch-msg')
         with open(commithook, 'w') as f:
             # NOTE: the formatting here is significant; if you change it you'll also need to
             # change other places which read it back
@@ -439,12 +477,9 @@
                     os.remove(tmpfile)
                 return output
         finally:
-            os.remove(commithook)
-            os.remove(applyhook)
-            if os.path.exists(commithook_backup):
-                shutil.move(commithook_backup, commithook)
-            if os.path.exists(applyhook_backup):
-                shutil.move(applyhook_backup, applyhook)
+            shutil.rmtree(hooks_dir)
+            if os.path.lexists(hooks_dir_backup):
+                shutil.move(hooks_dir_backup, hooks_dir)
 
 
 class QuiltTree(PatchSet):
diff --git a/yocto-poky/meta/lib/oe/qa.py b/yocto-poky/meta/lib/oe/qa.py
index d5cdaa0..3cfeee7 100644
--- a/yocto-poky/meta/lib/oe/qa.py
+++ b/yocto-poky/meta/lib/oe/qa.py
@@ -1,3 +1,8 @@
+import os, struct
+
+class NotELFFileError(Exception):
+    pass
+
 class ELFFile:
     EI_NIDENT = 16
 
@@ -7,6 +12,8 @@
     EI_OSABI      = 7
     EI_ABIVERSION = 8
 
+    E_MACHINE    = 0x12
+
     # possible values for EI_CLASS
     ELFCLASSNONE = 0
     ELFCLASS32   = 1
@@ -20,10 +27,12 @@
     ELFDATA2LSB  = 1
     ELFDATA2MSB  = 2
 
+    PT_INTERP = 3
+
     def my_assert(self, expectation, result):
         if not expectation == result:
             #print "'%x','%x' %s" % (ord(expectation), ord(result), self.name)
-            raise Exception("This does not work as expected")
+            raise NotELFFileError("%s is not an ELF" % self.name)
 
     def __init__(self, name, bits = 0):
         self.name = name
@@ -31,10 +40,16 @@
         self.objdump_output = {}
 
     def open(self):
-        self.file = file(self.name, "r")
-        self.data = self.file.read(ELFFile.EI_NIDENT+4)
+        if not os.path.isfile(self.name):
+            raise NotELFFileError("%s is not a normal file" % self.name)
 
-        self.my_assert(len(self.data), ELFFile.EI_NIDENT+4)
+        self.file = file(self.name, "r")
+        # Read 4k which should cover most of the headers we're after
+        self.data = self.file.read(4096)
+
+        if len(self.data) < ELFFile.EI_NIDENT + 4:
+            raise NotELFFileError("%s is not an ELF" % self.name)
+
         self.my_assert(self.data[0], chr(0x7f) )
         self.my_assert(self.data[1], 'E')
         self.my_assert(self.data[2], 'L')
@@ -46,24 +61,24 @@
                 self.bits = 64
             else:
                 # Not 32-bit or 64.. lets assert
-                raise Exception("ELF but not 32 or 64 bit.")
+                raise NotELFFileError("ELF but not 32 or 64 bit.")
         elif self.bits == 32:
             self.my_assert(self.data[ELFFile.EI_CLASS], chr(ELFFile.ELFCLASS32))
         elif self.bits == 64:
             self.my_assert(self.data[ELFFile.EI_CLASS], chr(ELFFile.ELFCLASS64))
         else:
-            raise Exception("Must specify unknown, 32 or 64 bit size.")
+            raise NotELFFileError("Must specify unknown, 32 or 64 bit size.")
         self.my_assert(self.data[ELFFile.EI_VERSION], chr(ELFFile.EV_CURRENT) )
 
         self.sex = self.data[ELFFile.EI_DATA]
         if self.sex == chr(ELFFile.ELFDATANONE):
-            raise Exception("self.sex == ELFDATANONE")
+            raise NotELFFileError("self.sex == ELFDATANONE")
         elif self.sex == chr(ELFFile.ELFDATA2LSB):
             self.sex = "<"
         elif self.sex == chr(ELFFile.ELFDATA2MSB):
             self.sex = ">"
         else:
-            raise Exception("Unknown self.sex")
+            raise NotELFFileError("Unknown self.sex")
 
     def osAbi(self):
         return ord(self.data[ELFFile.EI_OSABI])
@@ -77,17 +92,36 @@
     def isLittleEndian(self):
         return self.sex == "<"
 
-    def isBigEngian(self):
+    def isBigEndian(self):
         return self.sex == ">"
 
+    def getShort(self, offset):
+        return struct.unpack_from(self.sex+"H", self.data, offset)[0]
+
+    def getWord(self, offset):
+        return struct.unpack_from(self.sex+"i", self.data, offset)[0]
+
+    def isDynamic(self):
+        """
+        Return True if there is a .interp segment (therefore dynamically
+        linked), otherwise False (statically linked).
+        """
+        offset = self.getWord(self.bits == 32 and 0x1C or 0x20)
+        size = self.getShort(self.bits == 32 and 0x2A or 0x36)
+        count = self.getShort(self.bits == 32 and 0x2C or 0x38)
+
+        for i in range(0, count):
+            p_type = self.getWord(offset + i * size)
+            if p_type == ELFFile.PT_INTERP:
+                return True
+        return False
+
     def machine(self):
         """
         We know the sex stored in self.sex and we
         know the position
         """
-        import struct
-        (a,) = struct.unpack(self.sex+"H", self.data[18:20])
-        return a
+        return self.getShort(ELFFile.E_MACHINE)
 
     def run_objdump(self, cmd, d):
         import bb.process
@@ -109,3 +143,9 @@
         except Exception as e:
             bb.note("%s %s %s failed: %s" % (objdump, cmd, self.name, e))
             return ""
+
+if __name__ == "__main__":
+    import sys
+    elf = ELFFile(sys.argv[1])
+    elf.open()
+    print elf.isDynamic()
diff --git a/yocto-poky/meta/lib/oe/recipeutils.py b/yocto-poky/meta/lib/oe/recipeutils.py
index 119a688..6c7adb5 100644
--- a/yocto-poky/meta/lib/oe/recipeutils.py
+++ b/yocto-poky/meta/lib/oe/recipeutils.py
@@ -19,9 +19,9 @@
 
 
 # Help us to find places to insert values
-recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRCREV', 'SRC_URI', 'S', 'do_fetch', 'do_unpack', 'do_patch', 'EXTRA_OECONF', 'do_configure', 'EXTRA_OEMAKE', 'do_compile', 'do_install', 'do_populate_sysroot', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'do_package', 'do_deploy']
+recipe_progression = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION', 'LICENSE', 'LIC_FILES_CHKSUM', 'PROVIDES', 'DEPENDS', 'PR', 'PV', 'SRCREV', 'SRC_URI', 'S', 'do_fetch()', 'do_unpack()', 'do_patch()', 'EXTRA_OECONF', 'do_configure()', 'EXTRA_OEMAKE', 'do_compile()', 'do_install()', 'do_populate_sysroot()', 'INITSCRIPT', 'USERADD', 'GROUPADD', 'PACKAGES', 'FILES', 'RDEPENDS', 'RRECOMMENDS', 'RSUGGESTS', 'RPROVIDES', 'RREPLACES', 'RCONFLICTS', 'ALLOW_EMPTY', 'do_package()', 'do_deploy()']
 # Variables that sometimes are a bit long but shouldn't be wrapped
-nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER']
+nowrap_vars = ['SUMMARY', 'HOMEPAGE', 'BUGTRACKER', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]']
 list_vars = ['SRC_URI', 'LIC_FILES_CHKSUM']
 meta_vars = ['SUMMARY', 'DESCRIPTION', 'HOMEPAGE', 'BUGTRACKER', 'SECTION']
 
@@ -164,85 +164,112 @@
        Note that some manual inspection/intervention may be required
        since this cannot handle all situations.
     """
+
+    import bb.utils
+
+    recipe_progression_res = []
+    recipe_progression_restrs = []
+    for item in recipe_progression:
+        if item.endswith('()'):
+            key = item[:-2]
+        else:
+            key = item
+        restr = '%s(_[a-zA-Z0-9-_$(){}]+|\[[^\]]*\])?' % key
+        if item.endswith('()'):
+            recipe_progression_restrs.append(restr + '()')
+        else:
+            recipe_progression_restrs.append(restr)
+        recipe_progression_res.append(re.compile('^%s$' % restr))
+
+    def get_recipe_pos(variable):
+        for i, p in enumerate(recipe_progression_res):
+            if p.match(variable):
+                return i
+        return -1
+
     remainingnames = {}
     for k in values.keys():
-        remainingnames[k] = recipe_progression.index(k) if k in recipe_progression else -1
+        remainingnames[k] = get_recipe_pos(k)
     remainingnames = OrderedDict(sorted(remainingnames.iteritems(), key=lambda x: x[1]))
 
-    with tempfile.NamedTemporaryFile('w', delete=False) as tf:
-        def outputvalue(name):
-            rawtext = '%s = "%s"\n' % (name, values[name])
-            if name in nowrap_vars:
-                tf.write(rawtext)
-            elif name in list_vars:
-                splitvalue = split_var_value(values[name], assignment=False)
-                if len(splitvalue) > 1:
-                    linesplit = ' \\\n' + (' ' * (len(name) + 4))
-                    tf.write('%s = "%s%s"\n' % (name, linesplit.join(splitvalue), linesplit))
-                else:
-                    tf.write(rawtext)
+    modifying = False
+
+    def outputvalue(name, lines, rewindcomments=False):
+        if values[name] is None:
+            return
+        rawtext = '%s = "%s"\n' % (name, values[name])
+        addlines = []
+        if name in nowrap_vars:
+            addlines.append(rawtext)
+        elif name in list_vars:
+            splitvalue = split_var_value(values[name], assignment=False)
+            if len(splitvalue) > 1:
+                linesplit = ' \\\n' + (' ' * (len(name) + 4))
+                addlines.append('%s = "%s%s"\n' % (name, linesplit.join(splitvalue), linesplit))
             else:
-                wrapped = textwrap.wrap(rawtext)
-                for wrapline in wrapped[:-1]:
-                    tf.write('%s \\\n' % wrapline)
-                tf.write('%s\n' % wrapped[-1])
+                addlines.append(rawtext)
+        else:
+            wrapped = textwrap.wrap(rawtext)
+            for wrapline in wrapped[:-1]:
+                addlines.append('%s \\\n' % wrapline)
+            addlines.append('%s\n' % wrapped[-1])
+        if rewindcomments:
+            # Ensure we insert the lines before any leading comments
+            # (that we'd want to ensure remain leading the next value)
+            for i, ln in reversed(list(enumerate(lines))):
+                if ln[0] != '#':
+                    lines[i+1:i+1] = addlines
+                    break
+            else:
+                lines.extend(addlines)
+        else:
+            lines.extend(addlines)
 
-        tfn = tf.name
-        with open(fn, 'r') as f:
-            # First runthrough - find existing names (so we know not to insert based on recipe_progression)
-            # Second runthrough - make the changes
-            existingnames = []
-            for runthrough in [1, 2]:
-                currname = None
-                for line in f:
-                    if not currname:
-                        insert = False
-                        for k in remainingnames.keys():
-                            for p in recipe_progression:
-                                if re.match('^%s(_prepend|_append)*[ ?:=(]' % p, line):
-                                    if remainingnames[k] > -1 and recipe_progression.index(p) > remainingnames[k] and runthrough > 1 and not k in existingnames:
-                                        outputvalue(k)
-                                        del remainingnames[k]
-                                    break
-                        for k in remainingnames.keys():
-                            if re.match('^%s[ ?:=]' % k, line):
-                                currname = k
-                                if runthrough == 1:
-                                    existingnames.append(k)
-                                else:
-                                    del remainingnames[k]
-                                break
-                        if currname and runthrough > 1:
-                            outputvalue(currname)
+    existingnames = []
+    def patch_recipe_varfunc(varname, origvalue, op, newlines):
+        if modifying:
+            # Insert anything that should come before this variable
+            pos = get_recipe_pos(varname)
+            for k in remainingnames.keys()[:]:
+                if remainingnames[k] > -1 and pos >= remainingnames[k] and not k in existingnames:
+                    outputvalue(k, newlines, rewindcomments=True)
+                    del remainingnames[k]
+            # Now change this variable, if it needs to be changed
+            if varname in existingnames and op in ['+=', '=', '=+']:
+                if varname in remainingnames:
+                    outputvalue(varname, newlines)
+                    del remainingnames[varname]
+                return None, None, 0, True
+        else:
+            if varname in values:
+                existingnames.append(varname)
+        return origvalue, None, 0, True
 
-                    if currname:
-                        sline = line.rstrip()
-                        if not sline.endswith('\\'):
-                            currname = None
-                        continue
-                    if runthrough > 1:
-                        tf.write(line)
-                f.seek(0)
-        if remainingnames:
-            tf.write('\n')
-            for k in remainingnames.keys():
-                outputvalue(k)
+    # First run - establish which values we want to set are already in the file
+    varlist = [re.escape(item) for item in values.keys()]
+    with open(fn, 'r') as f:
+        changed, fromlines = bb.utils.edit_metadata(f, varlist, patch_recipe_varfunc)
+    # Second run - actually set everything
+    modifying = True
+    varlist.extend(recipe_progression_restrs)
+    changed, tolines = bb.utils.edit_metadata(fromlines, varlist, patch_recipe_varfunc, match_overrides=True)
 
-    with open(tfn, 'U') as f:
-        tolines = f.readlines()
+    if remainingnames:
+        if tolines[-1].strip() != '':
+            tolines.append('\n')
+        for k in remainingnames.keys():
+            outputvalue(k, tolines)
+
     if patch:
-        with open(fn, 'U') as f:
-            fromlines = f.readlines()
         relfn = os.path.relpath(fn, relpath)
         diff = difflib.unified_diff(fromlines, tolines, 'a/%s' % relfn, 'b/%s' % relfn)
-        os.remove(tfn)
         return diff
     else:
         with open(fn, 'w') as f:
             f.writelines(tolines)
-        os.remove(tfn)
         return None
 
+
 def localise_file_vars(fn, varfiles, varlist):
     """Given a list of variables and variable history (fetched with get_var_files())
     find where each variable should be set/changed. This handles for example where a
@@ -398,6 +425,8 @@
         return 'Recipe name "%s" is invalid: is a reserved keyword' % pn
     elif pn.startswith('pn-'):
         return 'Recipe name "%s" is invalid: names starting with "pn-" are reserved' % pn
+    elif pn.endswith(('.bb', '.bbappend', '.bbclass', '.inc', '.conf')):
+        return 'Recipe name "%s" is invalid: should be just a name, not a file name' % pn
     return ''
 
 
diff --git a/yocto-poky/meta/lib/oe/rootfs.py b/yocto-poky/meta/lib/oe/rootfs.py
index 18df22d..a95e1b7 100644
--- a/yocto-poky/meta/lib/oe/rootfs.py
+++ b/yocto-poky/meta/lib/oe/rootfs.py
@@ -63,6 +63,15 @@
                 if 'log_check' in line:
                     continue
 
+                if hasattr(self, 'log_check_expected_errors_regexes'):
+                    m = None
+                    for ee in self.log_check_expected_errors_regexes:
+                        m = re.search(ee, line)
+                        if m:
+                            break
+                    if m:
+                        continue
+
                 m = r.search(line)
                 if m:
                     found_error = 1
@@ -164,6 +173,7 @@
         bb.note("###### Generate rootfs #######")
         pre_process_cmds = self.d.getVar("ROOTFS_PREPROCESS_COMMAND", True)
         post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND", True)
+        rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND', True)
 
         postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR", True)
         if not postinst_intercepts_dir:
@@ -193,6 +203,8 @@
         with open(sysconfdir + "/version", "w+") as ver:
             ver.write(self.d.getVar('BUILDNAME', True) + "\n")
 
+        execute_pre_post_process(self.d, rootfs_post_install_cmds)
+
         self._run_intercepts()
 
         execute_pre_post_process(self.d, post_process_cmds)
@@ -229,46 +241,28 @@
                                       self.d.getVar('IMAGE_ROOTFS', True),
                                       "run-postinsts", "remove"])
 
-        runtime_pkgmanage = bb.utils.contains("IMAGE_FEATURES", "package-management",
-                         True, False, self.d)
-        sysvcompat_in_distro = bb.utils.contains("DISTRO_FEATURES", [ "systemd", "sysvinit" ],
-                         True, False, self.d)
         image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
-                         True, False, self.d)
-        if sysvcompat_in_distro and not image_rorfs:
-            pkg_to_remove = ""
-        else:
-            pkg_to_remove = "update-rc.d"
-        if not runtime_pkgmanage:
-            # Remove components that we don't need if we're not going to install
-            # additional packages at runtime
-            if delayed_postinsts is None:
-                installed_pkgs_dir = self.d.expand('${WORKDIR}/installed_pkgs.txt')
-                pkgs_to_remove = list()
-                with open(installed_pkgs_dir, "r+") as installed_pkgs:
-                    pkgs_installed = installed_pkgs.read().splitlines()
-                    for pkg_installed in pkgs_installed[:]:
-                        pkg = pkg_installed.split()[0]
-                        if pkg in ["update-rc.d",
-                                "base-passwd",
-                                "shadow",
-                                "update-alternatives", pkg_to_remove,
-                                self.d.getVar("ROOTFS_BOOTSTRAP_INSTALL", True)
-                                ]:
-                            pkgs_to_remove.append(pkg)
-                            pkgs_installed.remove(pkg_installed)
+                                        True, False, self.d)
+        if image_rorfs:
+            # Remove components that we don't need if it's a read-only rootfs
+            unneeded_pkgs = self.d.getVar("ROOTFS_RO_UNNEEDED", True).split()
+            pkgs_installed = image_list_installed_packages(self.d)
+            pkgs_to_remove = [pkg for pkg in pkgs_installed if pkg in unneeded_pkgs]
 
-                if len(pkgs_to_remove) > 0:
-                    self.pm.remove(pkgs_to_remove, False)
-                    # Update installed_pkgs.txt
-                    open(installed_pkgs_dir, "w+").write('\n'.join(pkgs_installed))
+            if len(pkgs_to_remove) > 0:
+                self.pm.remove(pkgs_to_remove, False)
 
-            else:
-                self._save_postinsts()
+        if delayed_postinsts:
+            self._save_postinsts()
+            if image_rorfs:
+                bb.warn("There are post install scripts "
+                        "in a read-only rootfs")
 
         post_uninstall_cmds = self.d.getVar("ROOTFS_POSTUNINSTALL_COMMAND", True)
         execute_pre_post_process(self.d, post_uninstall_cmds)
 
+        runtime_pkgmanage = bb.utils.contains("IMAGE_FEATURES", "package-management",
+                                              True, False, self.d)
         if not runtime_pkgmanage:
             # Remove the package manager data files
             self.pm.remove_packaging_data()
@@ -628,6 +622,10 @@
     def __init__(self, d, manifest_dir):
         super(DpkgRootfs, self).__init__(d)
         self.log_check_regex = '^E:'
+        self.log_check_expected_errors_regexes = \
+        [
+            "^E: Unmet dependencies."
+        ]
 
         bb.utils.remove(self.image_rootfs, True)
         bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS', True), True)
@@ -882,7 +880,6 @@
         pkgs_to_install = self.manifest.parse_initial_manifest()
         opkg_pre_process_cmds = self.d.getVar('OPKG_PREPROCESS_COMMANDS', True)
         opkg_post_process_cmds = self.d.getVar('OPKG_POSTPROCESS_COMMANDS', True)
-        rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND', True)
 
         # update PM index files, unless users provide their own feeds
         if (self.d.getVar('BUILD_IMAGES_FROM_FEEDS', True) or "") != "1":
@@ -913,7 +910,6 @@
         self._setup_dbg_rootfs(['/var/lib/opkg'])
 
         execute_pre_post_process(self.d, opkg_post_process_cmds)
-        execute_pre_post_process(self.d, rootfs_post_install_cmds)
 
         if self.inc_opkg_image_gen == "1":
             self.pm.backup_packaging_data()
@@ -941,7 +937,7 @@
         self._log_check_error()
 
     def _cleanup(self):
-        pass
+        self.pm.remove_lists()
 
 def get_class_for_type(imgtype):
     return {"rpm": RpmRootfs,
@@ -968,17 +964,17 @@
     os.environ.update(env_bkp)
 
 
-def image_list_installed_packages(d, format=None, rootfs_dir=None):
+def image_list_installed_packages(d, rootfs_dir=None):
     if not rootfs_dir:
         rootfs_dir = d.getVar('IMAGE_ROOTFS', True)
 
     img_type = d.getVar('IMAGE_PKGTYPE', True)
     if img_type == "rpm":
-        return RpmPkgsList(d, rootfs_dir).list(format)
+        return RpmPkgsList(d, rootfs_dir).list_pkgs()
     elif img_type == "ipk":
-        return OpkgPkgsList(d, rootfs_dir, d.getVar("IPKGCONF_TARGET", True)).list(format)
+        return OpkgPkgsList(d, rootfs_dir, d.getVar("IPKGCONF_TARGET", True)).list_pkgs()
     elif img_type == "deb":
-        return DpkgPkgsList(d, rootfs_dir).list(format)
+        return DpkgPkgsList(d, rootfs_dir).list_pkgs()
 
 if __name__ == "__main__":
     """
diff --git a/yocto-poky/meta/lib/oe/sdk.py b/yocto-poky/meta/lib/oe/sdk.py
index 3103f48..f15fbdb 100644
--- a/yocto-poky/meta/lib/oe/sdk.py
+++ b/yocto-poky/meta/lib/oe/sdk.py
@@ -219,17 +219,10 @@
 
         pm.update()
 
-        pkgs = []
-        pkgs_attempt = []
-        for pkg_type in pkgs_to_install:
-            if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
-                pkgs_attempt += pkgs_to_install[pkg_type]
-            else:
-                pkgs += pkgs_to_install[pkg_type]
-
-        pm.install(pkgs)
-
-        pm.install(pkgs_attempt, True)
+        for pkg_type in self.install_order:
+            if pkg_type in pkgs_to_install:
+                pm.install(pkgs_to_install[pkg_type],
+                           [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
 
     def _populate(self):
         bb.note("Installing TARGET packages")
@@ -239,11 +232,15 @@
 
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND", True))
 
+        self.target_pm.remove_packaging_data()
+
         bb.note("Installing NATIVESDK packages")
         self._populate_sysroot(self.host_pm, self.host_manifest)
 
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND", True))
 
+        self.host_pm.remove_packaging_data()
+
         target_sysconfdir = os.path.join(self.sdk_target_sysroot, self.sysconfdir)
         host_sysconfdir = os.path.join(self.sdk_host_sysroot, self.sysconfdir)
 
@@ -302,17 +299,10 @@
         pm.write_index()
         pm.update()
 
-        pkgs = []
-        pkgs_attempt = []
-        for pkg_type in pkgs_to_install:
-            if pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY:
-                pkgs_attempt += pkgs_to_install[pkg_type]
-            else:
-                pkgs += pkgs_to_install[pkg_type]
-
-        pm.install(pkgs)
-
-        pm.install(pkgs_attempt, True)
+        for pkg_type in self.install_order:
+            if pkg_type in pkgs_to_install:
+                pm.install(pkgs_to_install[pkg_type],
+                           [False, True][pkg_type == Manifest.PKG_TYPE_ATTEMPT_ONLY])
 
     def _populate(self):
         bb.note("Installing TARGET packages")
@@ -341,7 +331,7 @@
 
 
 
-def sdk_list_installed_packages(d, target, format=None, rootfs_dir=None):
+def sdk_list_installed_packages(d, target, rootfs_dir=None):
     if rootfs_dir is None:
         sdk_output = d.getVar('SDK_OUTPUT', True)
         target_path = d.getVar('SDKTARGETSYSROOT', True).strip('/')
@@ -352,12 +342,12 @@
     if img_type == "rpm":
         arch_var = ["SDK_PACKAGE_ARCHS", None][target is True]
         os_var = ["SDK_OS", None][target is True]
-        return RpmPkgsList(d, rootfs_dir, arch_var, os_var).list(format)
+        return RpmPkgsList(d, rootfs_dir, arch_var, os_var).list_pkgs()
     elif img_type == "ipk":
         conf_file_var = ["IPKGCONF_SDK", "IPKGCONF_TARGET"][target is True]
-        return OpkgPkgsList(d, rootfs_dir, d.getVar(conf_file_var, True)).list(format)
+        return OpkgPkgsList(d, rootfs_dir, d.getVar(conf_file_var, True)).list_pkgs()
     elif img_type == "deb":
-        return DpkgPkgsList(d, rootfs_dir).list(format)
+        return DpkgPkgsList(d, rootfs_dir).list_pkgs()
 
 def populate_sdk(d, manifest_dir=None):
     env_bkp = os.environ.copy()
diff --git a/yocto-poky/meta/lib/oe/sstatesig.py b/yocto-poky/meta/lib/oe/sstatesig.py
index 6d1be3e..01dce66 100644
--- a/yocto-poky/meta/lib/oe/sstatesig.py
+++ b/yocto-poky/meta/lib/oe/sstatesig.py
@@ -40,7 +40,7 @@
     # Only target packages beyond here
 
     # allarch packagegroups are assumed to have well behaved names which don't change between architecures/tunes
-    if isPackageGroup(fn) and isAllArch(fn):
+    if isPackageGroup(fn) and isAllArch(fn) and not isNative(depname):
         return False  
 
     # Exclude well defined machine specific configurations which don't change ABI
@@ -65,12 +65,13 @@
     sigs = {}
     types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES", True) or "").split()
     for t in types:
-        lockedsigs = (d.getVar("SIGGEN_LOCKEDSIGS_%s" % t, True) or "").split()
+        siggen_lockedsigs_var = "SIGGEN_LOCKEDSIGS_%s" % t
+        lockedsigs = (d.getVar(siggen_lockedsigs_var, True) or "").split()
         for ls in lockedsigs:
             pn, task, h = ls.split(":", 2)
             if pn not in sigs:
                 sigs[pn] = {}
-            sigs[pn][task] = h
+            sigs[pn][task] = [h, siggen_lockedsigs_var]
     return sigs
 
 class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
@@ -93,6 +94,9 @@
         self.lockedhashfn = {}
         self.machine = data.getVar("MACHINE", True)
         self.mismatch_msgs = []
+        self.unlockedrecipes = (data.getVar("SIGGEN_UNLOCKED_RECIPES", True) or
+                                "").split()
+        self.unlockedrecipes = { k: "" for k in self.unlockedrecipes }
         pass
 
     def tasks_resolved(self, virtmap, virtpnmap, dataCache):
@@ -135,17 +139,37 @@
         recipename = dataCache.pkg_fn[fn]
         self.lockedpnmap[fn] = recipename
         self.lockedhashfn[fn] = dataCache.hashfn[fn]
-        if recipename in self.lockedsigs:
+
+        unlocked = False
+        if recipename in self.unlockedrecipes:
+            unlocked = True
+        else:
+            def recipename_from_dep(dep):
+                # The dep entry will look something like
+                # /path/path/recipename.bb.task, virtual:native:/p/foo.bb.task,
+                # ...
+                fn = dep.rsplit('.', 1)[0]
+                return dataCache.pkg_fn[fn]
+
+            # If any unlocked recipe is in the direct dependencies then the
+            # current recipe should be unlocked as well.
+            depnames = [ recipename_from_dep(x) for x in deps ]
+            if any(x in y for y in depnames for x in self.unlockedrecipes):
+                self.unlockedrecipes[recipename] = ''
+                unlocked = True
+
+        if not unlocked and recipename in self.lockedsigs:
             if task in self.lockedsigs[recipename]:
                 k = fn + "." + task
-                h_locked = self.lockedsigs[recipename][task]
+                h_locked = self.lockedsigs[recipename][task][0]
+                var = self.lockedsigs[recipename][task][1]
                 self.lockedhashes[k] = h_locked
                 self.taskhash[k] = h_locked
                 #bb.warn("Using %s %s %s" % (recipename, task, h))
 
                 if h != h_locked:
-                    self.mismatch_msgs.append('The %s:%s sig (%s) changed, use locked sig %s to instead'
-                                          % (recipename, task, h, h_locked))
+                    self.mismatch_msgs.append('The %s:%s sig is computed to be %s, but the sig is locked to %s in %s'
+                                          % (recipename, task, h, h_locked, var))
 
                 return h_locked
         #bb.warn("%s %s %s" % (recipename, task, h))
@@ -189,18 +213,35 @@
             f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(types.keys())))
 
     def checkhashes(self, missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d):
-        checklevel = d.getVar("SIGGEN_LOCKEDSIGS_CHECK_LEVEL", True)
+        warn_msgs = []
+        error_msgs = []
+        sstate_missing_msgs = []
+
         for task in range(len(sq_fn)):
             if task not in ret:
                 for pn in self.lockedsigs:
                     if sq_hash[task] in self.lockedsigs[pn].itervalues():
-                        self.mismatch_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?"
+                        if sq_task[task] == 'do_shared_workdir':
+                            continue
+                        sstate_missing_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?"
                                                % (pn, sq_task[task], sq_hash[task]))
 
-        if self.mismatch_msgs and checklevel == 'warn':
-            bb.warn("\n".join(self.mismatch_msgs))
-        elif self.mismatch_msgs and checklevel == 'error':
-            bb.fatal("\n".join(self.mismatch_msgs))
+        checklevel = d.getVar("SIGGEN_LOCKEDSIGS_TASKSIG_CHECK", True)
+        if checklevel == 'warn':
+            warn_msgs += self.mismatch_msgs
+        elif checklevel == 'error':
+            error_msgs += self.mismatch_msgs
+
+        checklevel = d.getVar("SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK", True)
+        if checklevel == 'warn':
+            warn_msgs += sstate_missing_msgs
+        elif checklevel == 'error':
+            error_msgs += sstate_missing_msgs
+
+        if warn_msgs:
+            bb.warn("\n".join(warn_msgs))
+        if error_msgs:
+            bb.fatal("\n".join(error_msgs))
 
 
 # Insert these classes into siggen's namespace so it can see and select them
@@ -236,6 +277,10 @@
     localdata.setVar('PR', '*')
     localdata.setVar('EXTENDPE', '')
     stamp = localdata.getVar('STAMP', True)
+    if pn.startswith("gcc-source"):
+        # gcc-source shared workdir is a special case :(
+        stamp = localdata.expand("${STAMPS_DIR}/work-shared/gcc-${PV}-${PR}")
+
     filespec = '%s.%s.sigdata.*' % (stamp, taskname)
     foundall = False
     import glob
diff --git a/yocto-poky/meta/lib/oe/terminal.py b/yocto-poky/meta/lib/oe/terminal.py
index 52a8913..634daa9 100644
--- a/yocto-poky/meta/lib/oe/terminal.py
+++ b/yocto-poky/meta/lib/oe/terminal.py
@@ -83,7 +83,7 @@
     priority = 2
 
 class Konsole(XTerminal):
-    command = 'konsole --nofork -p tabtitle="{title}" -e {command}'
+    command = 'konsole --nofork --workdir . -p tabtitle="{title}" -e {command}'
     priority = 2
 
     def __init__(self, sh_cmd, title=None, env=None, d=None):
@@ -131,7 +131,7 @@
             raise UnsupportedTerminal('tmux is not running')
 
         if not check_tmux_pane_size('tmux'):
-            raise UnsupportedTerminal('tmux pane too small')
+            raise UnsupportedTerminal('tmux pane too small or tmux < 1.9 version is being used')
 
         Terminal.__init__(self, sh_cmd, title, env, d)
 
@@ -218,6 +218,12 @@
 
 def check_tmux_pane_size(tmux):
     import subprocess as sub
+    # On older tmux versions (<1.9), return false. The reason
+    # is that there is no easy way to get the height of the active panel
+    # on current window without nested formats (available from version 1.9)
+    vernum = check_terminal_version("tmux")
+    if vernum and LooseVersion(vernum) < '1.9':
+        return False
     try:
         p = sub.Popen('%s list-panes -F "#{?pane_active,#{pane_height},}"' % tmux,
                 shell=True,stdout=sub.PIPE,stderr=sub.PIPE)
@@ -229,14 +235,18 @@
             return None
         else:
             raise
-    if size/2 >= 19:
-        return True
-    return False
+
+    return size/2 >= 19
 
 def check_terminal_version(terminalName):
     import subprocess as sub
     try:
-        p = sub.Popen(['sh', '-c', '%s --version' % terminalName],stdout=sub.PIPE,stderr=sub.PIPE)
+        cmdversion = '%s --version' % terminalName
+        if terminalName.startswith('tmux'):
+            cmdversion = '%s -V' % terminalName
+        newenv = os.environ.copy()
+        newenv["LANG"] = "C"
+        p = sub.Popen(['sh', '-c', cmdversion], stdout=sub.PIPE, stderr=sub.PIPE, env=newenv)
         out, err = p.communicate()
         ver_info = out.rstrip().split('\n')
     except OSError as exc:
@@ -251,6 +261,8 @@
             vernum = ver.split(' ')[-1]
         if ver.startswith('GNOME Terminal'):
             vernum = ver.split(' ')[-1]
+        if ver.startswith('tmux'):
+            vernum = ver.split()[-1]
     return vernum
 
 def distro_name():
diff --git a/yocto-poky/meta/lib/oe/utils.py b/yocto-poky/meta/lib/oe/utils.py
index cee087f..30d3062 100644
--- a/yocto-poky/meta/lib/oe/utils.py
+++ b/yocto-poky/meta/lib/oe/utils.py
@@ -208,6 +208,28 @@
     import re
     return re.sub("\s+", " ", string).strip()
 
+def format_pkg_list(pkg_dict, ret_format=None):
+    output = []
+
+    if ret_format == "arch":
+        for pkg in sorted(pkg_dict):
+            output.append("%s %s" % (pkg, pkg_dict[pkg]["arch"]))
+    elif ret_format == "file":
+        for pkg in sorted(pkg_dict):
+            output.append("%s %s %s" % (pkg, pkg_dict[pkg]["filename"], pkg_dict[pkg]["arch"]))
+    elif ret_format == "ver":
+        for pkg in sorted(pkg_dict):
+            output.append("%s %s %s" % (pkg, pkg_dict[pkg]["arch"], pkg_dict[pkg]["ver"]))
+    elif ret_format == "deps":
+        for pkg in sorted(pkg_dict):
+            for dep in pkg_dict[pkg]["deps"]:
+                output.append("%s|%s" % (pkg, dep))
+    else:
+        for pkg in sorted(pkg_dict):
+            output.append(pkg)
+
+    return '\n'.join(output)
+
 #
 # Python 2.7 doesn't have threaded pools (just multiprocessing)
 # so implement a version here
@@ -271,3 +293,14 @@
         self.tasks.join()
         for worker in self.workers:
             worker.join()
+
+def write_ld_so_conf(d):
+    # Some utils like prelink may not have the correct target library paths
+    # so write an ld.so.conf to help them
+    ldsoconf = d.expand("${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf")
+    if os.path.exists(ldsoconf):
+        bb.utils.remove(ldsoconf)
+    bb.utils.mkdirhier(os.path.dirname(ldsoconf))
+    with open(ldsoconf, "w") as f:
+        f.write(d.getVar("base_libdir", True) + '\n')
+        f.write(d.getVar("libdir", True) + '\n')
diff --git a/yocto-poky/meta/lib/oeqa/oetest.py b/yocto-poky/meta/lib/oeqa/oetest.py
index 6f9edec..3ed5bb8 100644
--- a/yocto-poky/meta/lib/oeqa/oetest.py
+++ b/yocto-poky/meta/lib/oeqa/oetest.py
@@ -7,16 +7,25 @@
 
 # It also has some helper functions and it's responsible for actually starting the tests
 
-import os, re, mmap
+import os, re, mmap, sys
 import unittest
 import inspect
 import subprocess
+import signal
 try:
     import bb
 except ImportError:
     pass
 import logging
+
+import oeqa.runtime
+# Exported test doesn't require sdkext
+try:
+    import oeqa.sdkext
+except ImportError:
+    pass
 from oeqa.utils.decorators import LogResults, gettag, getResults
+from oeqa.utils import avoid_paths_in_environ
 
 logger = logging.getLogger("BitBake")
 
@@ -30,7 +39,6 @@
 def checkTags(tc, tagexp):
     return eval(tagexp, None, getVar(tc))
 
-
 def filterByTagExp(testsuite, tagexp):
     if not tagexp:
         return testsuite
@@ -43,106 +51,6 @@
             caseList.append(filterByTagExp(each, tagexp))
     return testsuite.__class__(caseList)
 
-def loadTests(tc, type="runtime"):
-    if type == "runtime":
-        # set the context object passed from the test class
-        setattr(oeTest, "tc", tc)
-        # set ps command to use
-        setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeTest.hasPackage("procps") else "ps")
-        # prepare test suite, loader and runner
-        suite = unittest.TestSuite()
-    elif type == "sdk":
-        # set the context object passed from the test class
-        setattr(oeTest, "tc", tc)
-    testloader = unittest.TestLoader()
-    testloader.sortTestMethodsUsing = None
-    suites = [testloader.loadTestsFromName(name) for name in tc.testslist]
-    suites = filterByTagExp(suites, getattr(tc, "tagexp", None))
-
-    def getTests(test):
-        '''Return all individual tests executed when running the suite.'''
-        # Unfortunately unittest does not have an API for this, so we have
-        # to rely on implementation details. This only needs to work
-        # for TestSuite containing TestCase.
-        method = getattr(test, '_testMethodName', None)
-        if method:
-            # leaf case: a TestCase
-            yield test
-        else:
-            # Look into TestSuite.
-            tests = getattr(test, '_tests', [])
-            for t1 in tests:
-                for t2 in getTests(t1):
-                    yield t2
-
-    # Determine dependencies between suites by looking for @skipUnlessPassed
-    # method annotations. Suite A depends on suite B if any method in A
-    # depends on a method on B.
-    for suite in suites:
-        suite.dependencies = []
-        suite.depth = 0
-        for test in getTests(suite):
-            methodname = getattr(test, '_testMethodName', None)
-            if methodname:
-                method = getattr(test, methodname)
-                depends_on = getattr(method, '_depends_on', None)
-                if depends_on:
-                    for dep_suite in suites:
-                        if depends_on in [getattr(t, '_testMethodName', None) for t in getTests(dep_suite)]:
-                            if dep_suite not in suite.dependencies and \
-                               dep_suite is not suite:
-                                suite.dependencies.append(dep_suite)
-                            break
-                    else:
-                        logger.warning("Test %s was declared as @skipUnlessPassed('%s') but that test is either not defined or not active. Will run the test anyway." %
-                                (test, depends_on))
-    # Use brute-force topological sort to determine ordering. Sort by
-    # depth (higher depth = must run later), with original ordering to
-    # break ties.
-    def set_suite_depth(suite):
-        for dep in suite.dependencies:
-            new_depth = set_suite_depth(dep) + 1
-            if new_depth > suite.depth:
-                suite.depth = new_depth
-        return suite.depth
-    for index, suite in enumerate(suites):
-        set_suite_depth(suite)
-        suite.index = index
-    suites.sort(cmp=lambda a,b: cmp((a.depth, a.index), (b.depth, b.index)))
-    return testloader.suiteClass(suites)
-
-_buffer = ""
-
-def custom_verbose(msg, *args, **kwargs):
-    global _buffer
-    if msg[-1] != "\n":
-        _buffer += msg
-    else:
-        _buffer += msg
-        try:
-            bb.plain(_buffer.rstrip("\n"), *args, **kwargs)
-        except NameError:
-            logger.info(_buffer.rstrip("\n"), *args, **kwargs)
-        _buffer = ""
-
-def runTests(tc, type="runtime"):
-
-    suite = loadTests(tc, type)
-    logger.info("Test modules  %s" % tc.testslist)
-    if hasattr(tc, "tagexp") and tc.tagexp:
-        logger.info("Filter test cases by tags: %s" % tc.tagexp)
-    logger.info("Found %s tests" % suite.countTestCases())
-    runner = unittest.TextTestRunner(verbosity=2)
-    try:
-        if bb.msg.loggerDefaultVerbose:
-            runner.stream.write = custom_verbose
-    except NameError:
-        # Not in bb environment?
-        pass
-    result = runner.run(suite)
-
-    return result
-
 @LogResults
 class oeTest(unittest.TestCase):
 
@@ -222,7 +130,19 @@
         return False
 
     def _run(self, cmd):
-        return subprocess.check_output(". %s; " % self.tc.sdkenv + cmd, shell=True)
+        return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True)
+
+class oeSDKExtTest(oeSDKTest):
+    def _run(self, cmd):
+        # extensible sdk shows a warning if found bitbake in the path
+        # because can cause contamination, i.e. use devtool from
+        # poky/scripts instead of eSDK one.
+        env = os.environ.copy()
+        paths_to_avoid = ['bitbake/bin', 'poky/scripts']
+        env['PATH'] = avoid_paths_in_environ(paths_to_avoid)
+
+        return subprocess.check_output(". %s > /dev/null;"\
+            " %s;" % (self.tc.sdkenv, cmd), shell=True, env=env)
 
 def getmodule(pos=2):
     # stack returns a list of tuples containg frame information
@@ -250,3 +170,278 @@
 
     if not cond:
         skipModule(reason, 3)
+
+_buffer_logger = ""
+def custom_verbose(msg, *args, **kwargs):
+    global _buffer_logger
+    if msg[-1] != "\n":
+        _buffer_logger += msg
+    else:
+        _buffer_logger += msg
+        try:
+            bb.plain(_buffer_logger.rstrip("\n"), *args, **kwargs)
+        except NameError:
+            logger.info(_buffer_logger.rstrip("\n"), *args, **kwargs)
+        _buffer_logger = ""
+
+class TestContext(object):
+    def __init__(self, d):
+        self.d = d
+
+        self.testsuites = self._get_test_suites()
+        self.testslist = self._get_tests_list(d.getVar("BBPATH", True).split(':'))
+        self.testsrequired = self._get_test_suites_required()
+
+        self.filesdir = os.path.join(os.path.dirname(os.path.abspath(
+            oeqa.runtime.__file__)), "files")
+        self.imagefeatures = d.getVar("IMAGE_FEATURES", True).split()
+        self.distrofeatures = d.getVar("DISTRO_FEATURES", True).split()
+
+    # get testcase list from specified file
+    # if path is a relative path, then relative to build/conf/
+    def _read_testlist(self, fpath, builddir):
+        if not os.path.isabs(fpath):
+            fpath = os.path.join(builddir, "conf", fpath)
+        if not os.path.exists(fpath):
+            bb.fatal("No such manifest file: ", fpath)
+        tcs = []
+        for line in open(fpath).readlines():
+            line = line.strip()
+            if line and not line.startswith("#"):
+                tcs.append(line)
+        return " ".join(tcs)
+
+    # return test list by type also filter if TEST_SUITES is specified
+    def _get_tests_list(self, bbpath):
+        testslist = []
+
+        type = self._get_test_namespace()
+
+        # This relies on lib/ under each directory in BBPATH being added to sys.path
+        # (as done by default in base.bbclass)
+        for testname in self.testsuites:
+            if testname != "auto":
+                if testname.startswith("oeqa."):
+                    testslist.append(testname)
+                    continue
+                found = False
+                for p in bbpath:
+                    if os.path.exists(os.path.join(p, 'lib', 'oeqa', type, testname + '.py')):
+                        testslist.append("oeqa." + type + "." + testname)
+                        found = True
+                        break
+                    elif os.path.exists(os.path.join(p, 'lib', 'oeqa', type, testname.split(".")[0] + '.py')):
+                        testslist.append("oeqa." + type + "." + testname)
+                        found = True
+                        break
+                if not found:
+                    bb.fatal('Test %s specified in TEST_SUITES could not be found in lib/oeqa/runtime under BBPATH' % testname)
+
+        if "auto" in self.testsuites:
+            def add_auto_list(path):
+                if not os.path.exists(os.path.join(path, '__init__.py')):
+                    bb.fatal('Tests directory %s exists but is missing __init__.py' % path)
+                files = sorted([f for f in os.listdir(path) if f.endswith('.py') and not f.startswith('_')])
+                for f in files:
+                    module = 'oeqa.' + type + '.' + f[:-3]
+                    if module not in testslist:
+                        testslist.append(module)
+
+            for p in bbpath:
+                testpath = os.path.join(p, 'lib', 'oeqa', type)
+                bb.debug(2, 'Searching for tests in %s' % testpath)
+                if os.path.exists(testpath):
+                    add_auto_list(testpath)
+
+        return testslist
+
+    def loadTests(self):
+        setattr(oeTest, "tc", self)
+
+        testloader = unittest.TestLoader()
+        testloader.sortTestMethodsUsing = None
+        suites = [testloader.loadTestsFromName(name) for name in self.testslist]
+        suites = filterByTagExp(suites, getattr(self, "tagexp", None))
+
+        def getTests(test):
+            '''Return all individual tests executed when running the suite.'''
+            # Unfortunately unittest does not have an API for this, so we have
+            # to rely on implementation details. This only needs to work
+            # for TestSuite containing TestCase.
+            method = getattr(test, '_testMethodName', None)
+            if method:
+                # leaf case: a TestCase
+                yield test
+            else:
+                # Look into TestSuite.
+                tests = getattr(test, '_tests', [])
+                for t1 in tests:
+                    for t2 in getTests(t1):
+                        yield t2
+
+        # Determine dependencies between suites by looking for @skipUnlessPassed
+        # method annotations. Suite A depends on suite B if any method in A
+        # depends on a method on B.
+        for suite in suites:
+            suite.dependencies = []
+            suite.depth = 0
+            for test in getTests(suite):
+                methodname = getattr(test, '_testMethodName', None)
+                if methodname:
+                    method = getattr(test, methodname)
+                    depends_on = getattr(method, '_depends_on', None)
+                    if depends_on:
+                        for dep_suite in suites:
+                            if depends_on in [getattr(t, '_testMethodName', None) for t in getTests(dep_suite)]:
+                                if dep_suite not in suite.dependencies and \
+                                   dep_suite is not suite:
+                                    suite.dependencies.append(dep_suite)
+                                break
+                        else:
+                            logger.warning("Test %s was declared as @skipUnlessPassed('%s') but that test is either not defined or not active. Will run the test anyway." %
+                                    (test, depends_on))
+
+        # Use brute-force topological sort to determine ordering. Sort by
+        # depth (higher depth = must run later), with original ordering to
+        # break ties.
+        def set_suite_depth(suite):
+            for dep in suite.dependencies:
+                new_depth = set_suite_depth(dep) + 1
+                if new_depth > suite.depth:
+                    suite.depth = new_depth
+            return suite.depth
+
+        for index, suite in enumerate(suites):
+            set_suite_depth(suite)
+            suite.index = index
+        suites.sort(cmp=lambda a,b: cmp((a.depth, a.index), (b.depth, b.index)))
+
+        self.suite = testloader.suiteClass(suites)
+
+        return self.suite
+
+    def runTests(self):
+        logger.info("Test modules  %s" % self.testslist)
+        if hasattr(self, "tagexp") and self.tagexp:
+            logger.info("Filter test cases by tags: %s" % self.tagexp)
+        logger.info("Found %s tests" % self.suite.countTestCases())
+        runner = unittest.TextTestRunner(verbosity=2)
+        if 'bb' in sys.modules:
+            runner.stream.write = custom_verbose
+
+        return runner.run(self.suite)
+
+class ImageTestContext(TestContext):
+    def __init__(self, d, target, host_dumper):
+        super(ImageTestContext, self).__init__(d)
+
+        self.tagexp =  d.getVar("TEST_SUITES_TAGS", True)
+
+        self.target = target
+        self.host_dumper = host_dumper
+
+        manifest = os.path.join(d.getVar("DEPLOY_DIR_IMAGE", True),
+                d.getVar("IMAGE_LINK_NAME", True) + ".manifest")
+        nomanifest = d.getVar("IMAGE_NO_MANIFEST", True)
+        if nomanifest is None or nomanifest != "1":
+            try:
+                with open(manifest) as f:
+                    self.pkgmanifest = f.read()
+            except IOError as e:
+                bb.fatal("No package manifest file found. Did you build the image?\n%s" % e)
+        else:
+            self.pkgmanifest = ""
+
+        self.sigterm = False
+        self.origsigtermhandler = signal.getsignal(signal.SIGTERM)
+        signal.signal(signal.SIGTERM, self._sigterm_exception)
+
+    def _sigterm_exception(self, signum, stackframe):
+        bb.warn("TestImage received SIGTERM, shutting down...")
+        self.sigterm = True
+        self.target.stop()
+
+    def _get_test_namespace(self):
+        return "runtime"
+
+    def _get_test_suites(self):
+        testsuites = []
+
+        manifests = (self.d.getVar("TEST_SUITES_MANIFEST", True) or '').split()
+        if manifests:
+            for manifest in manifests:
+                testsuites.extend(self._read_testlist(manifest,
+                                  self.d.getVar("TOPDIR", True)).split())
+
+        else:
+            testsuites = self.d.getVar("TEST_SUITES", True).split()
+
+        return testsuites
+
+    def _get_test_suites_required(self):
+        return [t for t in self.d.getVar("TEST_SUITES", True).split() if t != "auto"]
+
+    def loadTests(self):
+        super(ImageTestContext, self).loadTests()
+        setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeTest.hasPackage("procps") else "ps")
+
+class SDKTestContext(TestContext):
+    def __init__(self, d, sdktestdir, sdkenv, tcname, *args):
+        super(SDKTestContext, self).__init__(d)
+
+        self.sdktestdir = sdktestdir
+        self.sdkenv = sdkenv
+        self.tcname = tcname
+
+        if not hasattr(self, 'target_manifest'):
+            self.target_manifest = d.getVar("SDK_TARGET_MANIFEST", True)
+        try:
+            with open(self.target_manifest) as f:
+                 self.pkgmanifest = f.read()
+        except IOError as e:
+            bb.fatal("No package manifest file found. Did you build the sdk image?\n%s" % e)
+
+        if not hasattr(self, 'host_manifest'):
+            self.host_manifest = d.getVar("SDK_HOST_MANIFEST", True)
+        try:
+            with open(self.host_manifest) as f:
+                self.hostpkgmanifest = f.read()
+        except IOError as e:
+            bb.fatal("No host package manifest file found. Did you build the sdk image?\n%s" % e)
+
+    def _get_test_namespace(self):
+        return "sdk"
+
+    def _get_test_suites(self):
+        return (self.d.getVar("TEST_SUITES_SDK", True) or "auto").split()
+
+    def _get_test_suites_required(self):
+        return [t for t in (self.d.getVar("TEST_SUITES_SDK", True) or \
+                "auto").split() if t != "auto"]
+
+class SDKExtTestContext(SDKTestContext):
+    def __init__(self, d, sdktestdir, sdkenv, tcname, *args):
+        self.target_manifest = d.getVar("SDK_EXT_TARGET_MANIFEST", True)
+        self.host_manifest = d.getVar("SDK_EXT_HOST_MANIFEST", True)
+        if args:
+            self.cm = args[0] # Compatibility mode for run SDK tests
+        else:
+            self.cm = False
+
+        super(SDKExtTestContext, self).__init__(d, sdktestdir, sdkenv, tcname)
+
+        self.sdkextfilesdir = os.path.join(os.path.dirname(os.path.abspath(
+            oeqa.sdkext.__file__)), "files")
+
+    def _get_test_namespace(self):
+        if self.cm:
+            return "sdk"
+        else:
+            return "sdkext"
+
+    def _get_test_suites(self):
+        return (self.d.getVar("TEST_SUITES_SDK_EXT", True) or "auto").split()
+
+    def _get_test_suites_required(self):
+        return [t for t in (self.d.getVar("TEST_SUITES_SDK_EXT", True) or \
+                "auto").split() if t != "auto"]
diff --git a/yocto-poky/meta/lib/oeqa/runexported.py b/yocto-poky/meta/lib/oeqa/runexported.py
index dba0d7a..cc89e13 100755
--- a/yocto-poky/meta/lib/oeqa/runexported.py
+++ b/yocto-poky/meta/lib/oeqa/runexported.py
@@ -30,7 +30,7 @@
 
 sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "oeqa")))
 
-from oeqa.oetest import runTests
+from oeqa.oetest import TestContext
 from oeqa.utils.sshcontrol import SSHControl
 from oeqa.utils.dump import get_host_dumper
 
@@ -49,7 +49,7 @@
     def exportStart(self):
         self.sshlog = os.path.join(self.testdir, "ssh_target_log.%s" % self.datetime)
         sshloglink = os.path.join(self.testdir, "ssh_target_log")
-        if os.path.exists(sshloglink):
+        if os.path.lexists(sshloglink):
             os.remove(sshloglink)
         os.symlink(self.sshlog, sshloglink)
         print("SSH log file: %s" %  self.sshlog)
@@ -69,10 +69,9 @@
     def getVar(self, key, unused = None):
         return self.get(key, "")
 
-class TestContext(object):
-    def __init__(self):
-        self.d = None
-        self.target = None
+class ExportTestContext(TestContext):
+    def __init__(self, d):
+        self.d = d
 
 def main():
 
@@ -121,7 +120,9 @@
     host_dumper.parent_dir = loaded["host_dumper"]["parent_dir"]
     host_dumper.cmds = loaded["host_dumper"]["cmds"]
 
-    tc = TestContext()
+    target.exportStart()
+    tc = ExportTestContext(d)
+
     setattr(tc, "d", d)
     setattr(tc, "target", target)
     setattr(tc, "host_dumper", host_dumper)
@@ -129,8 +130,8 @@
         if key != "d" and key != "target" and key != "host_dumper":
             setattr(tc, key, loaded[key])
 
-    target.exportStart()
-    runTests(tc)
+    tc.loadTests()
+    tc.runTests()
 
     return 0
 
@@ -140,5 +141,5 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
diff --git a/yocto-poky/meta/lib/oeqa/runtime/dmesg.py b/yocto-poky/meta/lib/oeqa/runtime/dmesg.py
deleted file mode 100644
index 5831471..0000000
--- a/yocto-poky/meta/lib/oeqa/runtime/dmesg.py
+++ /dev/null
@@ -1,12 +0,0 @@
-import unittest
-from oeqa.oetest import oeRuntimeTest
-from oeqa.utils.decorators import *
-
-
-class DmesgTest(oeRuntimeTest):
-
-    @testcase(215)
-    @skipUnlessPassed('test_ssh')
-    def test_dmesg(self):
-        (status, output) = self.target.run('dmesg | grep -v mmci-pl18x | grep -v "error changing net interface name" | grep -iv "dma timeout" | grep -v usbhid | grep -i error')
-        self.assertEqual(status, 1, msg = "Error messages in dmesg log: %s" % output)
diff --git a/yocto-poky/meta/lib/oeqa/runtime/logrotate.py b/yocto-poky/meta/lib/oeqa/runtime/logrotate.py
index 86d791c..de300bf 100644
--- a/yocto-poky/meta/lib/oeqa/runtime/logrotate.py
+++ b/yocto-poky/meta/lib/oeqa/runtime/logrotate.py
@@ -14,9 +14,9 @@
 
     @skipUnlessPassed("test_ssh")
     def test_1_logrotate_setup(self):
-        (status, output) = self.target.run('mkdir /home/root/logrotate_dir')
+        (status, output) = self.target.run('mkdir $HOME/logrotate_dir')
         self.assertEqual(status, 0, msg = "Could not create logrotate_dir. Output: %s" % output)
-        (status, output) = self.target.run("sed -i 's#wtmp {#wtmp {\\n    olddir /home/root/logrotate_dir#' /etc/logrotate.conf")
+        (status, output) = self.target.run("sed -i \"s#wtmp {#wtmp {\\n    olddir $HOME/logrotate_dir#\" /etc/logrotate.conf")
         self.assertEqual(status, 0, msg = "Could not write to logrotate.conf file. Status and output: %s and %s)" % (status, output))
 
     @testcase(289)
@@ -24,5 +24,5 @@
     def test_2_logrotate(self):
         (status, output) = self.target.run('logrotate -f /etc/logrotate.conf')
         self.assertEqual(status, 0, msg = "logrotate service could not be reloaded. Status and output: %s and %s" % (status, output))
-        output = self.target.run('ls -la /home/root/logrotate_dir/ | wc -l')[1]
-        self.assertTrue(int(output)>=3, msg = "new logfile could not be created. List of files within log directory: %s" %(self.target.run('ls -la /home/root/logrotate_dir')[1]))
+        output = self.target.run('ls -la $HOME/logrotate_dir/ | wc -l')[1]
+        self.assertTrue(int(output)>=3, msg = "new logfile could not be created. List of files within log directory: %s" %(self.target.run('ls -la $HOME/logrotate_dir')[1]))
diff --git a/yocto-poky/meta/lib/oeqa/runtime/multilib.py b/yocto-poky/meta/lib/oeqa/runtime/multilib.py
index e1bcc42..593d385 100644
--- a/yocto-poky/meta/lib/oeqa/runtime/multilib.py
+++ b/yocto-poky/meta/lib/oeqa/runtime/multilib.py
@@ -10,39 +10,33 @@
 
 class MultilibTest(oeRuntimeTest):
 
-    def parse(self, s):
+    def archtest(self, binary, arch):
         """
-        Parse the output of readelf -h and return the binary class, or fail.
+        Check that ``binary`` has the ELF class ``arch`` (e.g. ELF32/ELF64).
         """
-        l = [l.split()[1] for l in s.split('\n') if "Class:" in l]
+
+        (status, output) = self.target.run("readelf -h %s" % binary)
+        self.assertEqual(status, 0, "Failed to readelf %s" % binary)
+
+        l = [l.split()[1] for l in output.split('\n') if "Class:" in l]
         if l:
-            return l[0]
+            theclass = l[0]
         else:
             self.fail("Cannot parse readelf output\n" + s)
 
+        self.assertEqual(theclass, arch, msg="%s isn't %s (is %s)" % (binary, arch, theclass))
+
     @skipUnlessPassed('test_ssh')
     def test_check_multilib_libc(self):
         """
         Check that a multilib image has both 32-bit and 64-bit libc in.
         """
-
-        (status, output) = self.target.run("readelf -h /lib/libc.so.6")
-        self.assertEqual(status, 0, "Failed to readelf /lib/libc.so.6")
-        class32 = self.parse(output)
-
-        (status, output) = self.target.run("readelf -h /lib64/libc.so.6")
-        self.assertEqual(status, 0, "Failed to readelf /lib64/libc.so.6")
-        class64 = self.parse(output)
-
-        self.assertEqual(class32, "ELF32", msg="/lib/libc.so.6 isn't ELF32 (is %s)" % class32)
-        self.assertEqual(class64, "ELF64", msg="/lib64/libc.so.6 isn't ELF64 (is %s)" % class64)
+        self.archtest("/lib/libc.so.6", "ELF32")
+        self.archtest("/lib64/libc.so.6", "ELF64")
 
     @testcase('279')
     @skipUnlessPassed('test_check_multilib_libc')
     def test_file_connman(self):
-        self.assertTrue(oeRuntimeTest.hasPackage('lib32-connman-gnome'), msg="This test assumes lib32-connman-gnome is installed")
+        self.assertTrue(oeRuntimeTest.hasPackage('lib32-connman'), msg="This test assumes lib32-connman is installed")
 
-        (status, output) = self.target.run("readelf -h /usr/bin/connman-applet")
-        self.assertEqual(status, 0, "Failed to readelf /usr/bin/connman-applet")
-        theclass = self.parse(output)
-        self.assertEqual(theclass, "ELF32", msg="connman-applet isn't ELF32 (is %s)" % theclass)
+        self.archtest("/usr/sbin/connmand", "ELF32")
diff --git a/yocto-poky/meta/lib/oeqa/runtime/parselogs.py b/yocto-poky/meta/lib/oeqa/runtime/parselogs.py
index fc2bc38..dec9ebe 100644
--- a/yocto-poky/meta/lib/oeqa/runtime/parselogs.py
+++ b/yocto-poky/meta/lib/oeqa/runtime/parselogs.py
@@ -38,13 +38,23 @@
     'Online check failed for',
     'netlink init failed',
     'Fast TSC calibration',
+    "BAR 0-9",
+    "Failed to load module \"ati\"",
+    "controller can't do DEVSLP, turning off",
+    "stmmac_dvr_probe: warning: cannot get CSR clock",
+    "error: couldn\'t mount because of unsupported optional features",
     ]
 
+video_related = [
+    "uvesafb",
+]
+
 x86_common = [
     '[drm:psb_do_init] *ERROR* Debug is',
     'wrong ELF class',
     'Could not enable PowerButton event',
     'probe of LNXPWRBN:00 failed with error -22',
+    'pmd_set_huge: Cannot satisfy',
 ] + common_errors
 
 qemux86_common = [
@@ -80,6 +90,7 @@
     'qemuarm64' : [
         'Fatal server error:',
         '(EE) Server terminated with error (1). Closing log file.',
+        'dmi: Firmware registration failed.',
         ] + common_errors,
     'emenlow' : [
         '[Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness',
@@ -99,11 +110,8 @@
         '(EE) Failed to load module psbdrv',
         '(EE) open /dev/fb0: No such file or directory',
         '(EE) AIGLX: reverting to software rendering',
-        "controller can't do DEVSLP, turning off",
         ] + x86_common,
-    'intel-corei7-64' : [
-        "controller can't do DEVSLP, turning off",
-        ] + common_errors,
+    'intel-corei7-64' : x86_common,
     'crownbay' : x86_common,
     'genericx86' : x86_common,
     'genericx86-64' : x86_common,
@@ -123,9 +131,24 @@
     @classmethod
     def setUpClass(self):
         self.errors = errors
+
+        # When systemd is enabled we need to notice errors on
+        # circular dependencies in units.
+        if self.hasFeature("systemd"):
+            self.errors.extend([
+                'Found ordering cycle on',
+                'Breaking ordering cycle by deleting job',
+                'deleted to break ordering cycle',
+                'Ordering cycle found, skipping',
+                ])
+
         self.ignore_errors = ignore_errors
         self.log_locations = log_locations
         self.msg = ""
+        (is_lsb, location) = oeRuntimeTest.tc.target.run("which LSB_Test.sh")
+        if is_lsb == 0:
+            for machine in self.ignore_errors:
+                self.ignore_errors[machine] = self.ignore_errors[machine] + video_related
 
     def getMachine(self):
         return oeRuntimeTest.tc.d.getVar("MACHINE", True)
@@ -200,6 +223,7 @@
             ignore_error = ignore_error.replace("[", "\[")
             ignore_error = ignore_error.replace("]", "\]")
             ignore_error = ignore_error.replace("*", "\*")
+            ignore_error = ignore_error.replace("0-9", "[0-9]")
             grepcmd += ignore_error+"|"
         grepcmd = grepcmd[:-1]
         grepcmd += "\'"
@@ -221,9 +245,8 @@
                 results[log.replace('target_logs/','')] = {}
                 rez = result.splitlines()
                 for xrez in rez:
-                    command = "grep \"\\"+str(xrez)+"\" -B "+str(lines_before)+" -A "+str(lines_after)+" "+str(log)
                     try:
-                        grep_output = subprocess.check_output(command, shell=True)
+                        grep_output = subprocess.check_output(['grep', '-F', xrez, '-B', str(lines_before), '-A', str(lines_after), log])
                     except:
                         pass
                     results[log.replace('target_logs/','')][xrez]=grep_output
diff --git a/yocto-poky/meta/lib/oeqa/runtime/rpm.py b/yocto-poky/meta/lib/oeqa/runtime/rpm.py
index 32aae24..624c515 100644
--- a/yocto-poky/meta/lib/oeqa/runtime/rpm.py
+++ b/yocto-poky/meta/lib/oeqa/runtime/rpm.py
@@ -52,11 +52,11 @@
     @skipUnlessPassed('test_ssh')
     def test_rpm_query_nonroot(self):
         (status, output) = self.target.run('useradd test1')
-        self.assertTrue(status == 0, msg="Failed to create new user")
+        self.assertTrue(status == 0, msg="Failed to create new user: " + output)
         (status, output) = self.target.run('sudo -u test1 id')
         self.assertTrue('(test1)' in output, msg="Failed to execute as new user")
         (status, output) = self.target.run('sudo -u test1 rpm -qa')
-        self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa" % status)
+        self.assertEqual(status, 0, msg="status: %s. Cannot run rpm -qa: %s" % (status, output))
 
     @testcase(195)
     @skipUnlessPassed('test_rpm_install')
diff --git a/yocto-poky/meta/lib/oeqa/runtime/smart.py b/yocto-poky/meta/lib/oeqa/runtime/smart.py
index e41668d..126d614 100644
--- a/yocto-poky/meta/lib/oeqa/runtime/smart.py
+++ b/yocto-poky/meta/lib/oeqa/runtime/smart.py
@@ -147,7 +147,7 @@
         for i in output.split("\n"):
             if ("rpmsys" != str(i)) and ("myrpmdir" != str(i)):
                 self.smart('channel --disable '+str(i))
-        self.target.run('cd /home/root')
+        self.target.run('cd $HOME')
         self.smart('install psplash')
         for i in output.split("\n"):
             if ("rpmsys" != str(i)) and ("myrpmdir" != str(i)):
@@ -172,4 +172,4 @@
     @skipUnlessPassed('test_smart_channel_add')
     def test_smart_remove_package(self):
         self.smart('install -y psplash')
-        self.smart('remove -y psplash')
\ No newline at end of file
+        self.smart('remove -y psplash')
diff --git a/yocto-poky/meta/lib/oeqa/runtime/systemd.py b/yocto-poky/meta/lib/oeqa/runtime/systemd.py
index c74394c..2b2f10d 100644
--- a/yocto-poky/meta/lib/oeqa/runtime/systemd.py
+++ b/yocto-poky/meta/lib/oeqa/runtime/systemd.py
@@ -21,6 +21,34 @@
         self.assertEqual(status, expected, message)
         return output
 
+    #TODO: use pyjournalctl instead
+    def journalctl(self, args='',l_match_units=[]):
+        """
+        Request for the journalctl output to the current target system
+
+        Arguments:
+        -args, an optional argument pass through argument
+        -l_match_units, an optional list of units to filter the output
+        Returns:
+        -string output of the journalctl command
+        Raises:
+        -AssertionError, on remote commands that fail
+        -ValueError, on a journalctl call with filtering by l_match_units that
+        returned no entries
+        """
+        query_units=""
+        if len(l_match_units):
+            query_units = ['_SYSTEMD_UNIT='+unit for unit in l_match_units]
+            query_units = " ".join(query_units)
+        command = 'journalctl %s %s' %(args, query_units)
+        status, output = self.target.run(command)
+        if status:
+            raise AssertionError("Command '%s' returned non-zero exit \
+                    code %d:\n%s" % (command, status, output))
+        if len(output) == 1 and "-- No entries --" in output:
+            raise ValueError("List of units to match: %s, returned no entries"
+                    % l_match_units)
+        return output
 
 class SystemdBasicTests(SystemdTest):
 
@@ -99,3 +127,52 @@
     def test_systemd_journal(self):
         (status, output) = self.target.run('journalctl')
         self.assertEqual(status, 0, output)
+
+    @skipUnlessPassed('test_systemd_basic')
+    def test_systemd_boot_time(self, systemd_TimeoutStartSec=90):
+        """
+        Get the target boot time from journalctl and log it
+
+        Arguments:
+        -systemd_TimeoutStartSec, an optional argument containing systemd's
+        unit start timeout to compare against
+        """
+
+        # the expression chain that uniquely identifies the time boot message
+        expr_items=["Startup finished","kernel", "userspace","\.$"]
+        try:
+            output = self.journalctl(args="-o cat --reverse")
+        except AssertionError:
+            self.fail("Error occurred while calling journalctl")
+        if not len(output):
+            self.fail("Error, unable to get startup time from systemd journal")
+
+        # check for the regular expression items that match the startup time
+        for line in output.split('\n'):
+            check_match = "".join(re.findall(".*".join(expr_items), line))
+            if check_match: break
+        # put the startup time in the test log
+        if check_match:
+            print "%s" % check_match
+        else:
+            self.skipTest("Error at obtaining the boot time from journalctl")
+        boot_time_sec = 0
+
+        # get the numeric values from the string and convert them to seconds
+        # same data will be placed in list and string for manipulation
+        l_boot_time = check_match.split(" ")[-2:]
+        s_boot_time = " ".join(l_boot_time)
+        try:
+            # Obtain the minutes it took to boot
+            if l_boot_time[0].endswith('min') and l_boot_time[0][0].isdigit():
+                boot_time_min = s_boot_time.split("min")[0]
+                # convert to seconds and accumulate it
+                boot_time_sec += int(boot_time_min) * 60
+            # Obtain the seconds it took to boot and accumulate
+            boot_time_sec += float(l_boot_time[1].split("s")[0])
+        except ValueError:
+            self.skipTest("Error when parsing time from boot string")
+        #Assert the target boot time against systemd's unit start timeout
+        if boot_time_sec > systemd_TimeoutStartSec:
+            print "Target boot time %s exceeds systemd's TimeoutStartSec %s"\
+                    %(boot_time_sec, systemd_TimeoutStartSec)
diff --git a/yocto-poky/meta/lib/oeqa/runtime/vnc.py b/yocto-poky/meta/lib/oeqa/runtime/vnc.py
deleted file mode 100644
index f31deff..0000000
--- a/yocto-poky/meta/lib/oeqa/runtime/vnc.py
+++ /dev/null
@@ -1,20 +0,0 @@
-from oeqa.oetest import oeRuntimeTest, skipModuleUnless
-from oeqa.utils.decorators import *
-import re
-
-def setUpModule():
-    skipModuleUnless(oeRuntimeTest.hasPackage('x11vnc'), "No x11vnc package in image")
-
-class VNCTest(oeRuntimeTest):
-
-    @testcase(213)
-    @skipUnlessPassed('test_ssh')
-    def test_vnc(self):
-        (status, output) = self.target.run('x11vnc -display :0 -bg -o x11vnc.log')
-        self.assertEqual(status, 0, msg="x11vnc server failed to start: %s" % output)
-        port = re.search('PORT=[0-9]*', output)
-        self.assertTrue(port, msg="Listening port not specified in command output: %s" %output)
-
-        vncport = port.group(0).split('=')[1]
-        (status, output) = self.target.run('netstat -ntl | grep ":%s"' % vncport)
-        self.assertEqual(status, 0, msg="x11vnc server not running on port %s\n\n%s" % (vncport, self.target.run('netstat -ntl; cat x11vnc.log')[1]))
diff --git a/yocto-poky/meta/lib/oeqa/sdkext/__init__.py b/yocto-poky/meta/lib/oeqa/sdkext/__init__.py
new file mode 100644
index 0000000..4cf3fa7
--- /dev/null
+++ b/yocto-poky/meta/lib/oeqa/sdkext/__init__.py
@@ -0,0 +1,3 @@
+# Enable other layers to have tests in the same named directory
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
diff --git a/yocto-poky/meta/lib/oeqa/sdkext/devtool.py b/yocto-poky/meta/lib/oeqa/sdkext/devtool.py
new file mode 100644
index 0000000..c5bb310
--- /dev/null
+++ b/yocto-poky/meta/lib/oeqa/sdkext/devtool.py
@@ -0,0 +1,32 @@
+import shutil
+
+from oeqa.oetest import oeSDKExtTest
+from oeqa.utils.decorators import *
+
+class DevtoolTest(oeSDKExtTest):
+
+    @classmethod
+    def setUpClass(self):
+        self.myapp_src = os.path.join(self.tc.sdkextfilesdir, "myapp")
+        self.myapp_dst = os.path.join(self.tc.sdktestdir, "myapp")
+        shutil.copytree(self.myapp_src, self.myapp_dst)
+
+    def test_devtool_location(self):
+        output = self._run('which devtool')
+        self.assertEqual(output.startswith(self.tc.sdktestdir), True, \
+            msg="Seems that devtool isn't the eSDK one: %s" % output)
+
+    @skipUnlessPassed('test_devtool_location')
+    def test_devtool_add_reset(self):
+        self._run('devtool add myapp %s' % self.myapp_dst)
+        self._run('devtool reset myapp')
+
+    @skipUnlessPassed('test_devtool_location')
+    def test_devtool_build(self):
+        self._run('devtool add myapp %s' % self.myapp_dst)
+        self._run('devtool build myapp')
+        self._run('devtool reset myapp')
+
+    @classmethod
+    def tearDownClass(self):
+        shutil.rmtree(self.myapp_dst)
diff --git a/yocto-poky/meta/lib/oeqa/sdkext/files/myapp/Makefile b/yocto-poky/meta/lib/oeqa/sdkext/files/myapp/Makefile
new file mode 100644
index 0000000..abd91be
--- /dev/null
+++ b/yocto-poky/meta/lib/oeqa/sdkext/files/myapp/Makefile
@@ -0,0 +1,10 @@
+all: myapp
+
+myapp: myapp.o
+	$(CC) $(LDFLAGS) $< -o $@
+
+myapp.o: myapp.c
+	$(CC) $(CFLAGS) -c $< -o $@
+
+clean:
+	rm -rf myapp.o myapp
diff --git a/yocto-poky/meta/lib/oeqa/sdkext/files/myapp/myapp.c b/yocto-poky/meta/lib/oeqa/sdkext/files/myapp/myapp.c
new file mode 100644
index 0000000..f0b63f0
--- /dev/null
+++ b/yocto-poky/meta/lib/oeqa/sdkext/files/myapp/myapp.c
@@ -0,0 +1,9 @@
+#include <stdio.h>
+
+int
+main(int argc, char *argv[])
+{
+	printf("Hello world\n");
+
+	return 0;
+}
diff --git a/yocto-poky/meta/lib/oeqa/sdkext/sdk_update.py b/yocto-poky/meta/lib/oeqa/sdkext/sdk_update.py
new file mode 100644
index 0000000..7a2a6fe
--- /dev/null
+++ b/yocto-poky/meta/lib/oeqa/sdkext/sdk_update.py
@@ -0,0 +1,39 @@
+import os
+import shutil
+import subprocess
+
+from oeqa.oetest import oeSDKExtTest
+from oeqa.utils.httpserver import HTTPService
+
+class SdkUpdateTest(oeSDKExtTest):
+
+    @classmethod
+    def setUpClass(self):
+        self.publish_dir = os.path.join(self.tc.sdktestdir, 'esdk_publish')
+        if os.path.exists(self.publish_dir):
+            shutil.rmtree(self.publish_dir)
+        os.mkdir(self.publish_dir)
+
+        tcname_new = self.tc.d.expand(
+            "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}-new.sh")
+        if not os.path.exists(tcname_new):
+            tcname_new = self.tc.tcname
+
+        cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir)
+        subprocess.check_output(cmd, shell=True)
+
+        self.http_service = HTTPService(self.publish_dir)
+        self.http_service.start()
+
+        self.http_url = "http://127.0.0.1:%d" % self.http_service.port
+
+    def test_sdk_update_http(self):
+        output = self._run("devtool sdk-update \"%s\"" % self.http_url)
+
+    def test_sdk_update_local(self):
+        output = self._run("devtool sdk-update \"%s\"" % self.publish_dir)
+
+    @classmethod
+    def tearDownClass(self):
+        self.http_service.stop()
+        shutil.rmtree(self.publish_dir)
diff --git a/yocto-poky/meta/lib/oeqa/selftest/base.py b/yocto-poky/meta/lib/oeqa/selftest/base.py
index 9bddc23..e10455e 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/base.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/base.py
@@ -4,7 +4,7 @@
 
 
 # DESCRIPTION
-# Base class inherited by test classes in meta/lib/selftest
+# Base class inherited by test classes in meta/lib/oeqa/selftest
 
 import unittest
 import os
@@ -16,6 +16,8 @@
 import oeqa.utils.ftools as ftools
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
 from oeqa.utils.decorators import LogResults
+from random import choice
+import glob
 
 @LogResults
 class oeSelfTest(unittest.TestCase):
@@ -29,9 +31,10 @@
         self.testinc_path = os.path.join(self.builddir, "conf/selftest.inc")
         self.local_bblayers_path = os.path.join(self.builddir, "conf/bblayers.conf")
         self.testinc_bblayers_path = os.path.join(self.builddir, "conf/bblayers.inc")
+        self.machineinc_path = os.path.join(self.builddir, "conf/machine.inc")
         self.testlayer_path = oeSelfTest.testlayer_path
         self._extra_tear_down_commands = []
-        self._track_for_cleanup = [self.testinc_path]
+        self._track_for_cleanup = [self.testinc_path, self.testinc_bblayers_path, self.machineinc_path]
         super(oeSelfTest, self).__init__(methodName)
 
     def setUp(self):
@@ -47,11 +50,25 @@
             for f in files:
                 if f == 'test_recipe.inc':
                     os.remove(os.path.join(root, f))
-        try:
-            os.remove(self.testinc_bblayers_path)
-        except OSError as e:
-            if e.errno != errno.ENOENT:
-                raise
+
+        for incl_file in [self.testinc_bblayers_path, self.machineinc_path]:
+            try:
+                os.remove(incl_file)
+            except OSError as e:
+                if e.errno != errno.ENOENT:
+                    raise
+
+        # Get CUSTOMMACHINE from env (set by --machine argument to oe-selftest)
+        custommachine = os.getenv('CUSTOMMACHINE')
+        if custommachine:
+            if custommachine == 'random':
+                machine = get_random_machine()
+            else:
+                machine = custommachine
+            machine_conf = 'MACHINE ??= "%s"\n' % machine
+            self.set_machine_config(machine_conf)
+            print 'MACHINE: %s' % machine
+
         # tests might need their own setup
         # but if they overwrite this one they have to call
         # super each time, so let's give them an alternative
@@ -99,11 +116,21 @@
         self.log.debug("Writing to: %s\n%s\n" % (self.testinc_path, data))
         ftools.write_file(self.testinc_path, data)
 
+        custommachine = os.getenv('CUSTOMMACHINE')
+        if custommachine and 'MACHINE' in data:
+            machine = get_bb_var('MACHINE')
+            self.log.warning('MACHINE overridden: %s' % machine)
+
     # append to <builddir>/conf/selftest.inc
     def append_config(self, data):
         self.log.debug("Appending to: %s\n%s\n" % (self.testinc_path, data))
         ftools.append_file(self.testinc_path, data)
 
+        custommachine = os.getenv('CUSTOMMACHINE')
+        if custommachine and 'MACHINE' in data:
+            machine = get_bb_var('MACHINE')
+            self.log.warning('MACHINE overridden: %s' % machine)
+
     # remove data from <builddir>/conf/selftest.inc
     def remove_config(self, data):
         self.log.debug("Removing from: %s\n\%s\n" % (self.testinc_path, data))
@@ -151,3 +178,28 @@
     def remove_bblayers_config(self, data):
         self.log.debug("Removing from: %s\n\%s\n" % (self.testinc_bblayers_path, data))
         ftools.remove_from_file(self.testinc_bblayers_path, data)
+
+    # write to <builddir>/conf/machine.inc
+    def set_machine_config(self, data):
+        self.log.debug("Writing to: %s\n%s\n" % (self.machineinc_path, data))
+        ftools.write_file(self.machineinc_path, data)
+
+
+def get_available_machines():
+    # Get a list of all available machines
+    bbpath = get_bb_var('BBPATH').split(':')
+    machines = []
+
+    for path in bbpath:
+        found_machines = glob.glob(os.path.join(path, 'conf', 'machine', '*.conf'))
+        if found_machines:
+            for i in found_machines:
+                # eg: '/home/<user>/poky/meta-intel/conf/machine/intel-core2-32.conf'
+                machines.append(os.path.splitext(os.path.basename(i))[0])
+
+    return machines
+
+
+def get_random_machine():
+    # Get a random machine
+    return choice(get_available_machines())
diff --git a/yocto-poky/meta/lib/oeqa/selftest/bblayers.py b/yocto-poky/meta/lib/oeqa/selftest/bblayers.py
index 20c17e4..d23675e 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/bblayers.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/bblayers.py
@@ -23,8 +23,10 @@
 
     @testcase(93)
     def test_bitbakelayers_showappends(self):
+        recipe = "xcursor-transparent-theme"
+        bb_file = self.get_recipe_basename(recipe)
         result = runCmd('bitbake-layers show-appends')
-        self.assertTrue('xcursor-transparent-theme_0.1.1.bbappend' in result.output, msg="xcursor-transparent-theme_0.1.1.bbappend file was not recognised.  bitbake-layers show-appends output: %s" % result.output)
+        self.assertTrue(bb_file in result.output, msg="%s file was not recognised. bitbake-layers show-appends output: %s" % (bb_file, result.output))
 
     @testcase(90)
     def test_bitbakelayers_showoverlayed(self):
@@ -33,11 +35,14 @@
 
     @testcase(95)
     def test_bitbakelayers_flatten(self):
+        recipe = "xcursor-transparent-theme"
+        recipe_path = "recipes-graphics/xcursor-transparent-theme"
+        recipe_file = self.get_recipe_basename(recipe)
         testoutdir = os.path.join(self.builddir, 'test_bitbakelayers_flatten')
         self.assertFalse(os.path.isdir(testoutdir), msg = "test_bitbakelayers_flatten should not exist at this point in time")
         self.track_for_cleanup(testoutdir)
         result = runCmd('bitbake-layers flatten %s' % testoutdir)
-        bb_file = os.path.join(testoutdir, 'recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_0.1.1.bb')
+        bb_file = os.path.join(testoutdir, recipe_path, recipe_file)
         self.assertTrue(os.path.isfile(bb_file), msg = "Cannot find xcursor-transparent-theme_0.1.1.bb in the test_bitbakelayers_flatten local dir.")
         contents = ftools.read_file(bb_file)
         find_in_contents = re.search("##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents)
@@ -60,3 +65,40 @@
         result = runCmd('bitbake-layers remove-layer */meta-skeleton')
         result = runCmd('bitbake-layers show-layers')
         self.assertNotIn('meta-skeleton', result.output, msg = "meta-skeleton should have been removed at this step.  bitbake-layers show-layers output: %s" % result.output)
+
+    @testcase(1384)
+    def test_bitbakelayers_showrecipes(self):
+        result = runCmd('bitbake-layers show-recipes')
+        self.assertIn('aspell:', result.output)
+        self.assertIn('mtd-utils:', result.output)
+        self.assertIn('linux-yocto:', result.output)
+        self.assertIn('core-image-minimal:', result.output)
+        result = runCmd('bitbake-layers show-recipes mtd-utils')
+        self.assertIn('mtd-utils:', result.output)
+        self.assertNotIn('aspell:', result.output)
+        result = runCmd('bitbake-layers show-recipes -i kernel')
+        self.assertIn('linux-yocto:', result.output)
+        self.assertNotIn('mtd-utils:', result.output)
+        result = runCmd('bitbake-layers show-recipes -i image')
+        self.assertIn('core-image-minimal', result.output)
+        self.assertNotIn('linux-yocto:', result.output)
+        self.assertNotIn('mtd-utils:', result.output)
+        result = runCmd('bitbake-layers show-recipes -i cmake,pkgconfig')
+        self.assertIn('libproxy:', result.output)
+        self.assertNotIn('mtd-utils:', result.output) # doesn't inherit either
+        self.assertNotIn('wget:', result.output) # doesn't inherit cmake
+        self.assertNotIn('waffle:', result.output) # doesn't inherit pkgconfig
+        result = runCmd('bitbake-layers show-recipes -i nonexistentclass', ignore_status=True)
+        self.assertNotEqual(result.status, 0, 'bitbake-layers show-recipes -i nonexistentclass should have failed')
+        self.assertIn('ERROR:', result.output)
+
+    def get_recipe_basename(self, recipe):
+        recipe_file = ""
+        result = runCmd("bitbake-layers show-recipes -f %s" % recipe)
+        for line in result.output.splitlines():
+            if recipe in line:
+                recipe_file = line
+                break
+
+        self.assertTrue(os.path.isfile(recipe_file), msg = "Can't find recipe file for %s" % recipe)
+        return os.path.basename(recipe_file)
diff --git a/yocto-poky/meta/lib/oeqa/selftest/bbtests.py b/yocto-poky/meta/lib/oeqa/selftest/bbtests.py
index 94ca79c..26728a4 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/bbtests.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/bbtests.py
@@ -8,6 +8,11 @@
 
 class BitbakeTests(oeSelfTest):
 
+    def getline(self, res, line):
+        for l in res.output.split('\n'):
+            if line in l:
+                return l
+
     @testcase(789)
     def test_run_bitbake_from_dir_1(self):
         os.chdir(os.path.join(self.builddir, 'conf'))
@@ -63,7 +68,8 @@
         result = bitbake('man -c patch', ignore_status=True)
         self.delete_recipeinc('man')
         bitbake('-cclean man')
-        self.assertTrue("ERROR: Function failed: patch_do_patch" in result.output, msg = "Though no man-1.5h1-make.patch file exists, bitbake didn't output any err. message. bitbake output: %s" % result.output)
+        line = self.getline(result, "Function failed: patch_do_patch")
+        self.assertTrue(line and line.startswith("ERROR:"), msg = "Though no man-1.5h1-make.patch file exists, bitbake didn't output any err. message. bitbake output: %s" % result.output)
 
     @testcase(1354)
     def test_force_task_1(self):
@@ -135,7 +141,8 @@
         self.assertEqual(result.status, 1, msg="Command succeded when it should have failed. bitbake output: %s" % result.output)
         self.assertTrue('Fetcher failure: Unable to find file file://invalid anywhere. The paths that were searched were:' in result.output, msg = "\"invalid\" file \
 doesn't exist, yet no error message encountered. bitbake output: %s" % result.output)
-        self.assertTrue('ERROR: Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.' in result.output, msg = "\"invalid\" file \
+        line = self.getline(result, 'Function failed: Fetcher failure for URL: \'file://invalid\'. Unable to fetch URL from any source.')
+        self.assertTrue(line and line.startswith("ERROR:"), msg = "\"invalid\" file \
 doesn't exist, yet fetcher didn't report any error. bitbake output: %s" % result.output)
 
     @testcase(171)
@@ -225,3 +232,41 @@
         self.assertEqual(result.status, 0, "Bitbake failed, exit code %s, output %s" % (result.status, result.output))
         self.assertFalse(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv3')))
         self.assertTrue(os.path.isfile(os.path.join(self.builddir, 'tmp/deploy/licenses/readline/generic_GPLv2')))
+
+    @testcase(1422)
+    def test_setscene_only(self):
+        """ Bitbake option to restore from sstate only within a build (i.e. execute no real tasks, only setscene)"""
+        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)))
+
+    @testcase(1425)
+    def test_bbappend_order(self):
+        """ Bitbake should bbappend to recipe in a predictable order """
+        test_recipe = 'ed'
+        test_recipe_summary_before = get_bb_var('SUMMARY', test_recipe)
+        test_recipe_pv = get_bb_var('PV', test_recipe)
+        recipe_append_file = test_recipe + '_' + test_recipe_pv + '.bbappend'
+        expected_recipe_summary = test_recipe_summary_before
+
+        for i in range(5):
+            recipe_append_dir = test_recipe + '_test_' + str(i)
+            recipe_append_path = os.path.join(self.testlayer_path, 'recipes-test', recipe_append_dir, recipe_append_file)
+            os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', recipe_append_dir))
+            feature = 'SUMMARY += "%s"\n' % i
+            ftools.write_file(recipe_append_path, feature)
+            expected_recipe_summary += ' %s' % i
+
+        self.add_command_to_tearDown('rm -rf %s' % os.path.join(self.testlayer_path, 'recipes-test',
+                                                               test_recipe + '_test_*'))
+
+        test_recipe_summary_after = get_bb_var('SUMMARY', test_recipe)
+        self.assertEqual(expected_recipe_summary, test_recipe_summary_after)
diff --git a/yocto-poky/meta/lib/oeqa/selftest/buildhistory.py b/yocto-poky/meta/lib/oeqa/selftest/buildhistory.py
index d8cae46..674da62 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/buildhistory.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/buildhistory.py
@@ -1,12 +1,10 @@
-import unittest
 import os
 import re
-import shutil
 import datetime
 
-import oeqa.utils.ftools as ftools
 from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import Command, runCmd, bitbake, get_bb_var, get_test_layer
+from oeqa.utils.commands import bitbake, get_bb_var
+from oeqa.utils.decorators import testcase
 
 
 class BuildhistoryBase(oeSelfTest):
@@ -40,6 +38,9 @@
         if expect_error:
             self.assertEqual(result.status, 1, msg="Error expected for global config '%s' and target config '%s'" % (global_config, target_config))
             search_for_error = re.search(error_regex, result.output)
-            self.assertTrue(search_for_error, msg="Could not find desired error in output: %s" % error_regex)
+            self.assertTrue(search_for_error, msg="Could not find desired error in output: %s (%s)" % (error_regex, result.output))
         else:
             self.assertEqual(result.status, 0, msg="Command 'bitbake %s' has failed unexpectedly: %s" % (target, result.output))
+
+    # No tests should be added to the base class.
+    # Please create a new class that inherit this one, or use one of those already available for adding tests.
diff --git a/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py b/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
index acf481f..35d5dfd 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/buildoptions.py
@@ -1,7 +1,8 @@
 import os
 import re
 import glob as g
-
+import shutil
+import tempfile
 from oeqa.selftest.base import oeSelfTest
 from oeqa.selftest.buildhistory import BuildhistoryBase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var
@@ -56,6 +57,11 @@
         res = runCmd("grep ccache %s" % (os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile")), ignore_status=True)
         self.assertEqual(0, res.status, msg="No match for ccache in m4 log.do_compile. For further details: %s" % os.path.join(get_bb_var("WORKDIR","m4"),"temp/log.do_compile"))
 
+    @testcase(1435)
+    def test_read_only_image(self):
+        self.write_config('IMAGE_FEATURES += "read-only-rootfs"')
+        bitbake("core-image-sato")
+        # do_image will fail if there are any pending postinsts
 
 class DiskMonTest(oeSelfTest):
 
@@ -74,6 +80,10 @@
         self.assertTrue('WARNING: The free space' in res.output, msg = "A warning should have been displayed for disk monitor is set to WARN: %s" %res.output)
 
 class SanityOptionsTest(oeSelfTest):
+    def getline(self, res, line):
+        for l in res.output.split('\n'):
+            if line in l:
+                return l
 
     @testcase(927)
     def test_options_warnqa_errorqa_switch(self):
@@ -85,7 +95,8 @@
         self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
         res = bitbake("xcursor-transparent-theme", ignore_status=True)
         self.delete_recipeinc('xcursor-transparent-theme')
-        self.assertTrue("ERROR: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output, msg=res.output)
+        line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
+        self.assertTrue(line and line.startswith("ERROR:"), msg=res.output)
         self.assertEqual(res.status, 1, msg = "bitbake reported exit code %s. It should have been 1. Bitbake output: %s" % (str(res.status), res.output))
         self.write_recipeinc('xcursor-transparent-theme', 'PACKAGES += \"${PN}-dbg\"')
         self.append_config('ERROR_QA_remove = "packages-list"')
@@ -93,15 +104,85 @@
         bitbake("xcursor-transparent-theme -ccleansstate")
         res = bitbake("xcursor-transparent-theme")
         self.delete_recipeinc('xcursor-transparent-theme')
-        self.assertTrue("WARNING: QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors." in res.output, msg=res.output)
+        line = self.getline(res, "QA Issue: xcursor-transparent-theme-dbg is listed in PACKAGES multiple times, this leads to packaging errors.")
+        self.assertTrue(line and line.startswith("WARNING:"), msg=res.output)
 
     @testcase(278)
-    def test_sanity_userspace_dependency(self):
-        self.write_config('WARN_QA_append = " unsafe-references-in-binaries unsafe-references-in-scripts"')
-        bitbake("-ccleansstate gzip nfs-utils")
-        res = bitbake("gzip nfs-utils")
-        self.assertTrue("WARNING: QA Issue: gzip" in res.output, "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output)
-        self.assertTrue("WARNING: QA Issue: nfs-utils" in res.output, "WARNING: QA Issue: nfs-utils message is not present in bitbake's output: %s" % res.output)
+    def test_sanity_unsafe_script_references(self):
+        self.write_config('WARN_QA_append = " unsafe-references-in-scripts"')
+
+        bitbake("-ccleansstate gzip")
+        res = bitbake("gzip")
+        line = self.getline(res, "QA Issue: gzip")
+        self.assertFalse(line, "WARNING: QA Issue: gzip message is present in bitbake's output and shouldn't be: %s" % res.output)
+
+        self.append_config("""
+do_install_append_pn-gzip () {
+	echo "\n${bindir}/test" >> ${D}${bindir}/zcat
+}
+""")
+        res = bitbake("gzip")
+        line = self.getline(res, "QA Issue: gzip")
+        self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: gzip message is not present in bitbake's output: %s" % res.output)
+
+    @testcase(1434)
+    def test_sanity_unsafe_binary_references(self):
+        self.write_config('WARN_QA_append = " unsafe-references-in-binaries"')
+
+        bitbake("-ccleansstate nfs-utils")
+        #res = bitbake("nfs-utils")
+        # FIXME when nfs-utils passes this test
+        #line = self.getline(res, "QA Issue: nfs-utils")
+        #self.assertFalse(line, "WARNING: QA Issue: nfs-utils message is present in bitbake's output and shouldn't be: %s" % res.output)
+
+#        self.append_config("""
+#do_install_append_pn-nfs-utils () {
+#	echo "\n${bindir}/test" >> ${D}${base_sbindir}/osd_login
+#}
+#""")
+        res = bitbake("nfs-utils")
+        line = self.getline(res, "QA Issue: nfs-utils")
+        self.assertTrue(line and line.startswith("WARNING:"), "WARNING: QA Issue: nfs-utils message is not present in bitbake's output: %s" % res.output)
+
+    @testcase(1421)
+    def test_layer_without_git_dir(self):
+        """
+        Summary:     Test that layer git revisions are displayed and do not fail without git repository
+        Expected:    The build to be successful and without "fatal" errors
+        Product:     oe-core
+        Author:      Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+        AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+        """
+
+        dirpath = tempfile.mkdtemp()
+
+        dummy_layer_name = 'meta-dummy'
+        dummy_layer_path = os.path.join(dirpath, dummy_layer_name)
+        dummy_layer_conf_dir = os.path.join(dummy_layer_path, 'conf')
+        os.makedirs(dummy_layer_conf_dir)
+        dummy_layer_conf_path = os.path.join(dummy_layer_conf_dir, 'layer.conf')
+
+        dummy_layer_content = 'BBPATH .= ":${LAYERDIR}"\n' \
+                              'BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend"\n' \
+                              'BBFILE_COLLECTIONS += "%s"\n' \
+                              'BBFILE_PATTERN_%s = "^${LAYERDIR}/"\n' \
+                              'BBFILE_PRIORITY_%s = "6"\n' % (dummy_layer_name, dummy_layer_name, dummy_layer_name)
+
+        ftools.write_file(dummy_layer_conf_path, dummy_layer_content)
+
+        bblayers_conf = 'BBLAYERS += "%s"\n' % dummy_layer_path
+        self.write_bblayers_config(bblayers_conf)
+
+        test_recipe = 'ed'
+
+        ret = bitbake('-n %s' % test_recipe)
+
+        err = 'fatal: Not a git repository'
+
+        shutil.rmtree(dirpath)
+
+        self.assertNotIn(err, ret.output)
+
 
 class BuildhistoryTests(BuildhistoryBase):
 
@@ -114,10 +195,70 @@
     def test_buildhistory_buildtime_pr_backwards(self):
         self.add_command_to_tearDown('cleanup-workdir')
         target = 'xcursor-transparent-theme'
-        error = "ERROR: QA Issue: Package version for package %s went backwards which would break package feeds from (.*-r1 to .*-r0)" % target
+        error = "ERROR:.*QA Issue: Package version for package %s went backwards which would break package feeds from (.*-r1.* to .*-r0.*)" % target
         self.run_buildhistory_operation(target, target_config="PR = \"r1\"", change_bh_location=True)
         self.run_buildhistory_operation(target, target_config="PR = \"r0\"", change_bh_location=False, expect_error=True, error_regex=error)
 
+    @testcase(1386)
+    def test_buildhistory_does_not_change_signatures(self):
+        """
+        Summary:     Ensure that buildhistory does not change signatures
+        Expected:    Only 'do_rootfs' task should be rerun
+        Product:     oe-core
+        Author:      Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+        AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+        """
+
+        tmpdir1_name = 'tmpsig1'
+        tmpdir2_name = 'tmpsig2'
+        builddir = os.environ.get('BUILDDIR')
+        tmpdir1 = os.path.join(builddir, tmpdir1_name)
+        tmpdir2 = os.path.join(builddir, tmpdir2_name)
+
+        self.track_for_cleanup(tmpdir1)
+        self.track_for_cleanup(tmpdir2)
+
+        features = 'TMPDIR = "%s"\n' % tmpdir1
+        self.write_config(features)
+        bitbake('core-image-minimal -S none -c rootfs')
+
+        features = 'TMPDIR = "%s"\n' % tmpdir2
+        features += 'INHERIT += "buildhistory"\n'
+        self.write_config(features)
+        bitbake('core-image-minimal -S none -c rootfs')
+
+        def get_files(d):
+            f = []
+            for root, dirs, files in os.walk(d):
+                for name in files:
+                    f.append(os.path.join(root, name))
+            return f
+
+        files1 = get_files(tmpdir1 + '/stamps')
+        files2 = get_files(tmpdir2 + '/stamps')
+        files2 = [x.replace(tmpdir2_name, tmpdir1_name) for x in files2]
+
+        f1 = set(files1)
+        f2 = set(files2)
+        sigdiff = f1 - f2
+
+        self.assertEqual(len(sigdiff), 1, 'Expected 1 signature differences. Out: %s' % list(sigdiff))
+
+        unexpected_diff = []
+
+        # No new signatures should appear apart from do_rootfs
+        found_do_rootfs_flag = False
+
+        for sig in sigdiff:
+            if 'do_rootfs' in sig:
+                found_do_rootfs_flag = True
+            else:
+                unexpected_diff.append(sig)
+
+        self.assertTrue(found_do_rootfs_flag, 'Task do_rootfs did not rerun.')
+        self.assertFalse(unexpected_diff, 'Found unexpected signature differences. Out: %s' % unexpected_diff)
+
+
 class BuildImagesTest(oeSelfTest):
     @testcase(563)
     def test_directfb(self):
@@ -137,7 +278,7 @@
         Test for archiving the work directory and exporting the source files.
         """
         self.add_command_to_tearDown('cleanup-workdir')
-        self.write_config("INHERIT = \"archiver\"\nARCHIVER_MODE[src] = \"original\"\nARCHIVER_MODE[srpm] = \"1\"")
+        self.write_config("INHERIT += \"archiver\"\nARCHIVER_MODE[src] = \"original\"\nARCHIVER_MODE[srpm] = \"1\"")
         res = bitbake("xcursor-transparent-theme", ignore_status=True)
         self.assertEqual(res.status, 0, "\nCouldn't build xcursortransparenttheme.\nbitbake output %s" % res.output)
         pkgs_path = g.glob(str(self.builddir) + "/tmp/deploy/sources/allarch*/xcurs*")
diff --git a/yocto-poky/meta/lib/oeqa/selftest/devtool.py b/yocto-poky/meta/lib/oeqa/selftest/devtool.py
index dcdef5a..132a73d 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/devtool.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/devtool.py
@@ -15,18 +15,45 @@
 
     def _test_recipe_contents(self, recipefile, checkvars, checkinherits):
         with open(recipefile, 'r') as f:
+            invar = None
+            invalue = None
             for line in f:
-                if '=' in line:
+                var = None
+                if invar:
+                    value = line.strip().strip('"')
+                    if value.endswith('\\'):
+                        invalue += ' ' + value[:-1].strip()
+                        continue
+                    else:
+                        invalue += ' ' + value.strip()
+                        var = invar
+                        value = invalue
+                        invar = None
+                elif '=' in line:
                     splitline = line.split('=', 1)
                     var = splitline[0].rstrip()
                     value = splitline[1].strip().strip('"')
-                    if var in checkvars:
-                        needvalue = checkvars.pop(var)
-                        self.assertEqual(value, needvalue, 'values for %s do not match' % var)
-                if line.startswith('inherit '):
+                    if value.endswith('\\'):
+                        invalue = value[:-1].strip()
+                        invar = var
+                        continue
+                elif line.startswith('inherit '):
                     inherits = line.split()[1:]
 
-        self.assertEqual(checkvars, {}, 'Some variables not found: %s' % checkvars)
+                if var and var in checkvars:
+                    needvalue = checkvars.pop(var)
+                    if needvalue is None:
+                        self.fail('Variable %s should not appear in recipe')
+                    if isinstance(needvalue, set):
+                        value = set(value.split())
+                    self.assertEqual(value, needvalue, 'values for %s do not match' % var)
+
+
+        missingvars = {}
+        for var, value in checkvars.iteritems():
+            if value is not None:
+                missingvars[var] = value
+        self.assertEqual(missingvars, {}, 'Some expected variables not found in recipe: %s' % checkvars)
 
         for inherit in checkinherits:
             self.assertIn(inherit, inherits, 'Missing inherit of %s' % inherit)
@@ -68,6 +95,8 @@
         filelist = []
         for line in output.splitlines():
             splitline = line.split()
+            if len(splitline) < 8:
+                self.fail('_process_ls_output: invalid output line: %s' % line)
             # Remove trailing . on perms
             splitline[0] = splitline[0].rstrip('.')
             # Remove leading . on paths
@@ -172,6 +201,44 @@
             bindir = bindir[1:]
         self.assertTrue(os.path.isfile(os.path.join(installdir, bindir, 'pv')), 'pv binary not found in D')
 
+    @testcase(1423)
+    def test_devtool_add_git_local(self):
+        # Fetch source from a remote URL, but do it outside of devtool
+        tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+        self.track_for_cleanup(tempdir)
+        pn = 'dbus-wait'
+        # We choose an https:// git URL here to check rewriting the URL works
+        url = 'https://git.yoctoproject.org/git/dbus-wait'
+        # Force fetching to "noname" subdir so we verify we're picking up the name from autoconf
+        # instead of the directory name
+        result = runCmd('git clone %s noname' % url, cwd=tempdir)
+        srcdir = os.path.join(tempdir, 'noname')
+        self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure.ac')), 'Unable to find configure script in source directory')
+        # Test devtool add
+        self.track_for_cleanup(self.workspacedir)
+        self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+        # Don't specify a name since we should be able to auto-detect it
+        result = runCmd('devtool add %s' % srcdir)
+        self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
+        # Check the recipe name is correct
+        recipefile = get_bb_var('FILE', pn)
+        self.assertIn('%s_git.bb' % pn, recipefile, 'Recipe file incorrectly named')
+        self.assertIn(recipefile, result.output)
+        # Test devtool status
+        result = runCmd('devtool status')
+        self.assertIn(pn, result.output)
+        self.assertIn(srcdir, result.output)
+        self.assertIn(recipefile, result.output)
+        checkvars = {}
+        checkvars['LICENSE'] = 'GPLv2'
+        checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263'
+        checkvars['S'] = '${WORKDIR}/git'
+        checkvars['PV'] = '0.1+git${SRCPV}'
+        checkvars['SRC_URI'] = 'git://git.yoctoproject.org/git/dbus-wait;protocol=https'
+        checkvars['SRCREV'] = '${AUTOREV}'
+        checkvars['DEPENDS'] = set(['dbus'])
+        self._test_recipe_contents(recipefile, checkvars, [])
+
     @testcase(1162)
     def test_devtool_add_library(self):
         # We don't have the ability to pick up this dependency automatically yet...
@@ -179,15 +246,16 @@
         # Fetch source
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         self.track_for_cleanup(tempdir)
-        url = 'http://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.1.tar.bz2'
+        version = '1.1'
+        url = 'https://www.intra2net.com/en/developer/libftdi/download/libftdi1-%s.tar.bz2' % version
         result = runCmd('wget %s' % url, cwd=tempdir)
-        result = runCmd('tar xfv libftdi1-1.1.tar.bz2', cwd=tempdir)
-        srcdir = os.path.join(tempdir, 'libftdi1-1.1')
+        result = runCmd('tar xfv libftdi1-%s.tar.bz2' % version, cwd=tempdir)
+        srcdir = os.path.join(tempdir, 'libftdi1-%s' % version)
         self.assertTrue(os.path.isfile(os.path.join(srcdir, 'CMakeLists.txt')), 'Unable to find CMakeLists.txt in source directory')
         # Test devtool add (and use -V so we test that too)
         self.track_for_cleanup(self.workspacedir)
         self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
-        result = runCmd('devtool add libftdi %s -V 1.1' % srcdir)
+        result = runCmd('devtool add libftdi %s -V %s' % (srcdir, version))
         self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created')
         # Test devtool status
         result = runCmd('devtool status')
@@ -195,6 +263,14 @@
         self.assertIn(srcdir, result.output)
         # Clean up anything in the workdir/sysroot/sstate cache (have to do this *after* devtool add since the recipe only exists then)
         bitbake('libftdi -c cleansstate')
+        # libftdi's python/CMakeLists.txt is a bit broken, so let's just disable it
+        # There's also the matter of it installing cmake files to a path we don't
+        # normally cover, which triggers the installed-vs-shipped QA test we have
+        # within do_package
+        recipefile = '%s/recipes/libftdi/libftdi_%s.bb' % (self.workspacedir, version)
+        result = runCmd('recipetool setvar %s EXTRA_OECMAKE -- \'-DPYTHON_BINDINGS=OFF -DLIBFTDI_CMAKE_CONFIG_DIR=${datadir}/cmake/Modules\'' % recipefile)
+        with open(recipefile, 'a') as f:
+            f.write('\nFILES_${PN}-dev += "${datadir}/cmake/Modules"\n')
         # Test devtool build
         result = runCmd('devtool build libftdi')
         staging_libdir = get_bb_var('STAGING_LIBDIR', 'libftdi')
@@ -226,22 +302,7 @@
         result = runCmd('devtool add %s %s -f %s' % (testrecipe, srcdir, url))
         self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. %s' % result.output)
         self.assertTrue(os.path.isfile(os.path.join(srcdir, 'setup.py')), 'Unable to find setup.py in source directory')
-        # Test devtool status
-        result = runCmd('devtool status')
-        self.assertIn(testrecipe, result.output)
-        self.assertIn(srcdir, result.output)
-        # Check recipe
-        recipefile = get_bb_var('FILE', testrecipe)
-        self.assertIn('%s.bb' % testrecipe, recipefile, 'Recipe file incorrectly named')
-        checkvars = {}
-        checkvars['S'] = '${WORKDIR}/MarkupSafe-%s' % testver
-        checkvars['SRC_URI'] = url
-        self._test_recipe_contents(recipefile, checkvars, [])
-        # Try with version specified
-        result = runCmd('devtool reset -n %s' % testrecipe)
-        shutil.rmtree(srcdir)
-        result = runCmd('devtool add %s %s -f %s -V %s' % (testrecipe, srcdir, url, testver))
-        self.assertTrue(os.path.isfile(os.path.join(srcdir, 'setup.py')), 'Unable to find setup.py in source directory')
+        self.assertTrue(os.path.isdir(os.path.join(srcdir, '.git')), 'git repository for external source tree was not created')
         # Test devtool status
         result = runCmd('devtool status')
         self.assertIn(testrecipe, result.output)
@@ -253,6 +314,23 @@
         checkvars['S'] = '${WORKDIR}/MarkupSafe-${PV}'
         checkvars['SRC_URI'] = url.replace(testver, '${PV}')
         self._test_recipe_contents(recipefile, checkvars, [])
+        # Try with version specified
+        result = runCmd('devtool reset -n %s' % testrecipe)
+        shutil.rmtree(srcdir)
+        fakever = '1.9'
+        result = runCmd('devtool add %s %s -f %s -V %s' % (testrecipe, srcdir, url, fakever))
+        self.assertTrue(os.path.isfile(os.path.join(srcdir, 'setup.py')), 'Unable to find setup.py in source directory')
+        # Test devtool status
+        result = runCmd('devtool status')
+        self.assertIn(testrecipe, result.output)
+        self.assertIn(srcdir, result.output)
+        # Check recipe
+        recipefile = get_bb_var('FILE', testrecipe)
+        self.assertIn('%s_%s.bb' % (testrecipe, fakever), recipefile, 'Recipe file incorrectly named')
+        checkvars = {}
+        checkvars['S'] = '${WORKDIR}/MarkupSafe-%s' % testver
+        checkvars['SRC_URI'] = url
+        self._test_recipe_contents(recipefile, checkvars, [])
 
     @testcase(1161)
     def test_devtool_add_fetch_git(self):
@@ -279,7 +357,7 @@
         self.assertIn('_git.bb', recipefile, 'Recipe file incorrectly named')
         checkvars = {}
         checkvars['S'] = '${WORKDIR}/git'
-        checkvars['PV'] = '1.0+git${SRCPV}'
+        checkvars['PV'] = '1.11+git${SRCPV}'
         checkvars['SRC_URI'] = url
         checkvars['SRCREV'] = '${AUTOREV}'
         self._test_recipe_contents(recipefile, checkvars, [])
@@ -303,6 +381,34 @@
         checkvars['SRCREV'] = checkrev
         self._test_recipe_contents(recipefile, checkvars, [])
 
+    @testcase(1391)
+    def test_devtool_add_fetch_simple(self):
+        # Fetch source from a remote URL, auto-detecting name
+        tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+        self.track_for_cleanup(tempdir)
+        testver = '1.6.0'
+        url = 'http://www.ivarch.com/programs/sources/pv-%s.tar.bz2' % testver
+        testrecipe = 'pv'
+        srcdir = os.path.join(self.workspacedir, 'sources', testrecipe)
+        # Test devtool add
+        self.track_for_cleanup(self.workspacedir)
+        self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+        result = runCmd('devtool add %s' % url)
+        self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'conf', 'layer.conf')), 'Workspace directory not created. %s' % result.output)
+        self.assertTrue(os.path.isfile(os.path.join(srcdir, 'configure')), 'Unable to find configure script in source directory')
+        self.assertTrue(os.path.isdir(os.path.join(srcdir, '.git')), 'git repository for external source tree was not created')
+        # Test devtool status
+        result = runCmd('devtool status')
+        self.assertIn(testrecipe, result.output)
+        self.assertIn(srcdir, result.output)
+        # Check recipe
+        recipefile = get_bb_var('FILE', testrecipe)
+        self.assertIn('%s_%s.bb' % (testrecipe, testver), recipefile, 'Recipe file incorrectly named')
+        checkvars = {}
+        checkvars['S'] = None
+        checkvars['SRC_URI'] = url.replace(testver, '${PV}')
+        self._test_recipe_contents(recipefile, checkvars, [])
+
     @testcase(1164)
     def test_devtool_modify(self):
         # Clean up anything in the workdir/sysroot/sstate cache
@@ -504,7 +610,8 @@
         self.track_for_cleanup(self.workspacedir)
         self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
         # (don't bother with cleaning the recipe on teardown, we won't be building it)
-        result = runCmd('devtool modify %s -x %s' % (testrecipe, tempdir))
+        # We don't use -x here so that we test the behaviour of devtool modify without it
+        result = runCmd('devtool modify %s %s' % (testrecipe, tempdir))
         # Check git repo
         self._check_src_repo(tempdir)
         # Add a couple of commits
@@ -823,10 +930,11 @@
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         # Try devtool extract
         self.track_for_cleanup(tempdir)
-        self.track_for_cleanup(self.workspacedir)
-        self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+        self.append_config('PREFERRED_PROVIDER_virtual/make = "remake"')
         result = runCmd('devtool extract remake %s' % tempdir)
         self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found')
+        # devtool extract shouldn't create the workspace
+        self.assertFalse(os.path.exists(self.workspacedir))
         self._check_src_repo(tempdir)
 
     @testcase(1379)
@@ -834,10 +942,10 @@
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
         # Try devtool extract
         self.track_for_cleanup(tempdir)
-        self.track_for_cleanup(self.workspacedir)
-        self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
         result = runCmd('devtool extract virtual/libx11 %s' % tempdir)
         self.assertTrue(os.path.exists(os.path.join(tempdir, 'Makefile.am')), 'Extracted source could not be found')
+        # devtool extract shouldn't create the workspace
+        self.assertFalse(os.path.exists(self.workspacedir))
         self._check_src_repo(tempdir)
 
     @testcase(1168)
@@ -920,7 +1028,7 @@
         result = runCmd('devtool deploy-target -n %s root@localhost' % testrecipe)
         self.assertIn('  %s' % testfile, result.output)
         # Boot the image
-        with runqemu(testimage, self) as qemu:
+        with runqemu(testimage) as qemu:
             # Now really test deploy-target
             result = runCmd('devtool deploy-target -c %s root@%s' % (testrecipe, qemu.ip))
             # Run a test command to see if it was installed properly
@@ -990,14 +1098,18 @@
     def test_devtool_upgrade(self):
         # Check preconditions
         self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
+        self.track_for_cleanup(self.workspacedir)
+        self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
         # Check parameters
         result = runCmd('devtool upgrade -h')
         for param in 'recipename srctree --version -V --branch -b --keep-temp --no-patch'.split():
             self.assertIn(param, result.output)
         # For the moment, we are using a real recipe.
-        recipe='devtool-upgrade'
-        version='0.2'
+        recipe = 'devtool-upgrade-test1'
+        version = '1.6.0'
+        oldrecipefile = get_bb_var('FILE', recipe)
         tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+        self.track_for_cleanup(tempdir)
         # Check that recipe is not already under devtool control
         result = runCmd('devtool status')
         self.assertNotIn(recipe, result.output)
@@ -1005,22 +1117,64 @@
         # we are downgrading instead of upgrading.
         result = runCmd('devtool upgrade %s %s -V %s' % (recipe, tempdir, version))
         # Check if srctree at least is populated
-        self.assertTrue(len(os.listdir(tempdir)) > 0, 'scrtree (%s) should be populated with new (%s) source code' % (tempdir, version))
-        # Check new recipe folder is present
-        self.assertTrue(os.path.exists(os.path.join(self.workspacedir,'recipes',recipe)), 'Recipe folder should exist')
+        self.assertTrue(len(os.listdir(tempdir)) > 0, 'srctree (%s) should be populated with new (%s) source code' % (tempdir, version))
+        # Check new recipe subdirectory is present
+        self.assertTrue(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe, '%s-%s' % (recipe, version))), 'Recipe folder should exist')
         # Check new recipe file is present
-        self.assertTrue(os.path.exists(os.path.join(self.workspacedir,'recipes',recipe,"%s_%s.bb" % (recipe,version))), 'Recipe folder should exist')
+        newrecipefile = os.path.join(self.workspacedir, 'recipes', recipe, '%s_%s.bb' % (recipe, version))
+        self.assertTrue(os.path.exists(newrecipefile), 'Recipe file should exist after upgrade')
         # Check devtool status and make sure recipe is present
         result = runCmd('devtool status')
         self.assertIn(recipe, result.output)
         self.assertIn(tempdir, result.output)
+        # Check recipe got changed as expected
+        with open(oldrecipefile + '.upgraded', 'r') as f:
+            desiredlines = f.readlines()
+        with open(newrecipefile, 'r') as f:
+            newlines = f.readlines()
+        self.assertEqual(desiredlines, newlines)
         # Check devtool reset recipe
         result = runCmd('devtool reset %s -n' % recipe)
         result = runCmd('devtool status')
         self.assertNotIn(recipe, result.output)
-        self.track_for_cleanup(tempdir)
+        self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after resetting')
+
+    @testcase(1433)
+    def test_devtool_upgrade_git(self):
+        # Check preconditions
+        self.assertTrue(not os.path.exists(self.workspacedir), 'This test cannot be run with a workspace directory under the build directory')
         self.track_for_cleanup(self.workspacedir)
         self.add_command_to_tearDown('bitbake-layers remove-layer */workspace')
+        recipe = 'devtool-upgrade-test2'
+        commit = '6cc6077a36fe2648a5f993fe7c16c9632f946517'
+        oldrecipefile = get_bb_var('FILE', recipe)
+        tempdir = tempfile.mkdtemp(prefix='devtoolqa')
+        self.track_for_cleanup(tempdir)
+        # Check that recipe is not already under devtool control
+        result = runCmd('devtool status')
+        self.assertNotIn(recipe, result.output)
+        # Check upgrade
+        result = runCmd('devtool upgrade %s %s -S %s' % (recipe, tempdir, commit))
+        # Check if srctree at least is populated
+        self.assertTrue(len(os.listdir(tempdir)) > 0, 'srctree (%s) should be populated with new (%s) source code' % (tempdir, commit))
+        # Check new recipe file is present
+        newrecipefile = os.path.join(self.workspacedir, 'recipes', recipe, os.path.basename(oldrecipefile))
+        self.assertTrue(os.path.exists(newrecipefile), 'Recipe file should exist after upgrade')
+        # Check devtool status and make sure recipe is present
+        result = runCmd('devtool status')
+        self.assertIn(recipe, result.output)
+        self.assertIn(tempdir, result.output)
+        # Check recipe got changed as expected
+        with open(oldrecipefile + '.upgraded', 'r') as f:
+            desiredlines = f.readlines()
+        with open(newrecipefile, 'r') as f:
+            newlines = f.readlines()
+        self.assertEqual(desiredlines, newlines)
+        # Check devtool reset recipe
+        result = runCmd('devtool reset %s -n' % recipe)
+        result = runCmd('devtool status')
+        self.assertNotIn(recipe, result.output)
+        self.assertFalse(os.path.exists(os.path.join(self.workspacedir, 'recipes', recipe)), 'Recipe directory should not exist after resetting')
 
     @testcase(1352)
     def test_devtool_layer_plugins(self):
diff --git a/yocto-poky/meta/lib/oeqa/selftest/esdk_prepare.py b/yocto-poky/meta/lib/oeqa/selftest/esdk_prepare.py
new file mode 100755
index 0000000..1b36a0d
--- /dev/null
+++ b/yocto-poky/meta/lib/oeqa/selftest/esdk_prepare.py
@@ -0,0 +1,75 @@
+#!/usr/bin/env python
+
+import shutil, tempfile
+import sys
+import os
+import imp
+import unittest
+try:
+    from oeqa.utils.commands import get_bb_var
+except ImportError:
+    pass
+
+# module under test
+module_file_name = "ext-sdk-prepare.py"
+module_path = ""
+
+class ExtSdkPrepareTest(unittest.TestCase):
+
+    """ unit test for fix for Yocto #9019 """
+
+    @classmethod
+    def setUpClass(self):
+        # copy module under test to temp dir
+        self.test_dir = tempfile.mkdtemp()
+        module_dest_path = os.path.join(self.test_dir, module_file_name)
+        try:
+            shutil.copy(module_path, self.test_dir)
+            # load module under test
+            self.test_mod = imp.load_source("", module_dest_path)
+        except:
+            print "error: unable to copy or load %s [src: %s, dst: %s]" % \
+                    (module_file_name, module_path, module_dest_path)
+            sys.exit(1)
+
+    def test_prepare_unexpected(self):
+        # test data
+        # note: pathnames have been truncated from the actual bitbake
+        # output as they are not important for the test.
+        test_data = ( 
+            'NOTE: Running noexec task 9 of 6539 (ID: 28, quilt/quilt-native_0.64.bb, do_build)\n'
+            'NOTE: Running task 10 of 6539 (ID: 29, quilt/quilt-native_0.64.bb, do_package)\n'
+            'NOTE: Running task 11 of 6539 (ID: 30, quilt/quilt-native_0.64.bb, do_rm_work)\n'
+            'NOTE: Running noexec task 6402 of 6539 (ID: 1, images/core-image-sato.bb, do_patch)\n'
+            'NOTE: Running task 6538 of 6539 (ID: 14, images/core-image-sato.bb, do_rm_work)\n'
+        )
+        # expected warning output
+        expected = [ (' task 10 of 6539 (ID: 29, quilt/quilt-native_0.64.bb, do_package)') ]
+        # recipe to test, matching test input data
+        recipes = [ "core-image-sato.bb" ]
+
+        # run the test
+        output = self.test_mod.check_unexpected(test_data, recipes)
+        self.assertEqual(output, expected)
+
+    @classmethod
+    def tearDownClass(self):
+        # remove temp dir
+        shutil.rmtree(self.test_dir)
+
+if __name__ == '__main__':
+    # running from command line - i.e., not under oe-selftest
+    # directory containing module under test comes from command line
+    if len(sys.argv) == 2 and os.path.isdir(sys.argv[1]):
+        module_path = os.path.join(sys.argv[1], module_file_name)
+        suite = unittest.TestLoader().loadTestsFromTestCase(ExtSdkPrepareTest)
+        unittest.TextTestRunner().run(suite)
+    else:
+        progname = os.path.basename(sys.argv[0])
+        print "%s: missing directory path" % progname
+        print "usage: %s /path/to/directory-of(ext-sdk-prepare.py)" % progname
+        sys.exit(1)
+else:
+    # running under oe-selftest
+    # determine module source dir from COREBASE and expected path
+    module_path = os.path.join(get_bb_var("COREBASE"), "meta", "files", module_file_name)
diff --git a/yocto-poky/meta/lib/oeqa/selftest/imagefeatures.py b/yocto-poky/meta/lib/oeqa/selftest/imagefeatures.py
index 4efb0d9..8a53899 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/imagefeatures.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/imagefeatures.py
@@ -30,7 +30,7 @@
         # Build a core-image-minimal
         bitbake('core-image-minimal')
 
-        with runqemu("core-image-minimal", self) as qemu:
+        with runqemu("core-image-minimal") as qemu:
             # Attempt to ssh with each user into qemu with empty password
             for user in [self.root_user, self.test_user]:
                 ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user=user)
@@ -56,7 +56,7 @@
         # Build a core-image-minimal
         bitbake('core-image-minimal')
 
-        with runqemu("core-image-minimal", self) as qemu:
+        with runqemu("core-image-minimal") as qemu:
             # Attempt to ssh with each user into qemu with empty password
             for user in [self.root_user, self.test_user]:
                 ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog, user=user)
@@ -67,66 +67,6 @@
                     self.assertEqual(status, 0, 'ssh to user tester failed with %s' % output)
 
 
-    @testcase(1114)
-    def test_rpm_version_4_support_on_image(self):
-        """
-        Summary:     Check rpm version 4 support on image
-        Expected:    Rpm version must be 4.x
-        Product:     oe-core
-        Author:      Ionut Chisanovici <ionutx.chisanovici@intel.com>
-        AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
-        """
-
-        features = 'PREFERRED_VERSION_rpm = "4.%"\n'
-        features += 'PREFERRED_VERSION_rpm-native = "4.%"\n'
-        # Use openssh in IMAGE_INSTALL instead of ssh-server-openssh in EXTRA_IMAGE_FEATURES as a workaround for bug 8047
-        features += 'IMAGE_INSTALL_append = " openssh"\n'
-        features += 'EXTRA_IMAGE_FEATURES = "empty-root-password allow-empty-password package-management"\n'
-        features += 'RPMROOTFSDEPENDS_remove = "rpmresolve-native:do_populate_sysroot"'
-        self.write_config(features)
-
-        # Build a core-image-minimal
-        bitbake('core-image-minimal')
-
-        # Check the native version of rpm is correct
-        native_bindir = get_bb_var('STAGING_BINDIR_NATIVE')
-        result = runCmd(os.path.join(native_bindir, 'rpm') + ' --version')
-        self.assertIn('version 4.', result.output)
-
-        # Check manifest for the rpm package
-        deploydir = get_bb_var('DEPLOY_DIR_IMAGE')
-        imgname = get_bb_var('IMAGE_LINK_NAME', 'core-image-minimal')
-        with open(os.path.join(deploydir, imgname) + '.manifest', 'r') as f:
-            for line in f:
-                splitline = line.split()
-                if len(splitline) > 2:
-                    rpm_version = splitline[2]
-                    if splitline[0] == 'rpm':
-                        if not rpm_version.startswith('4.'):
-                            self.fail('rpm version %s found in image, expected 4.x' % rpm_version)
-                        break
-            else:
-                self.fail('No rpm package found in image')
-
-        # Now do a couple of runtime tests
-        with runqemu("core-image-minimal", self) as qemu:
-            command = "rpm --version"
-            status, output = qemu.run(command)
-            self.assertEqual(0, status, 'Failed to run command "%s": %s' % (command, output))
-            found_rpm_version = output.strip()
-
-            # Make sure the retrieved rpm version is the expected one
-            if rpm_version not in found_rpm_version:
-                self.fail('RPM version is not {}, found instead {}.'.format(rpm_version, found_rpm_version))
-
-            # Test that the rpm database is there and working
-            command = "rpm -qa"
-            status, output = qemu.run(command)
-            self.assertEqual(0, status, 'Failed to run command "%s": %s' % (command, output))
-            self.assertIn('packagegroup-core-boot', output)
-            self.assertIn('busybox', output)
-
-
     @testcase(1116)
     def test_clutter_image_can_be_built(self):
         """
diff --git a/yocto-poky/meta/lib/oeqa/selftest/lic-checksum.py b/yocto-poky/meta/lib/oeqa/selftest/lic-checksum.py
index bd3b9a1..cac6d84 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/lic-checksum.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/lic-checksum.py
@@ -13,7 +13,7 @@
     @testcase(1197)
     def test_nonmatching_checksum(self):
         bitbake_cmd = '-c configure emptytest'
-        error_msg = 'ERROR: emptytest: The new md5 checksum is 8d777f385d3dfec8815d20f7496026dc'
+        error_msg = 'emptytest: The new md5 checksum is 8d777f385d3dfec8815d20f7496026dc'
 
         lic_file, lic_path = tempfile.mkstemp()
         os.close(lic_file)
diff --git a/yocto-poky/meta/lib/oeqa/selftest/prservice.py b/yocto-poky/meta/lib/oeqa/selftest/prservice.py
index 4187fbf..1b9a510 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/prservice.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/prservice.py
@@ -9,9 +9,10 @@
 from oeqa.selftest.base import oeSelfTest
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var
 from oeqa.utils.decorators import testcase
+from oeqa.utils.network import get_free_port
 
 class BitbakePrTests(oeSelfTest):
-
+ 
     def get_pr_version(self, package_name):
         pkgdata_dir = get_bb_var('PKGDATA_DIR')
         package_data_file = os.path.join(pkgdata_dir, 'runtime', package_name)
@@ -26,7 +27,7 @@
         package_stamps_path = "/".join(stampdata[:-1])
         stamps = []
         for stamp in os.listdir(package_stamps_path):
-            find_stamp = re.match("%s\.%s\.([a-z0-9]{32})" % (prefix, recipe_task), stamp)
+            find_stamp = re.match("%s\.%s\.([a-z0-9]{32})" % (re.escape(prefix), recipe_task), stamp)
             if find_stamp:
                 stamps.append(find_stamp.group(1))
         self.assertFalse(len(stamps) == 0, msg="Cound not find stamp for task %s for recipe %s" % (recipe_task, package_name))
@@ -34,7 +35,7 @@
         return str(stamps[0])
 
     def increment_package_pr(self, package_name):
-        inc_data = "do_package_append() {\nbb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\"\n}" % datetime.datetime.now()
+        inc_data = "do_package_append() {\n    bb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\"\n}" % datetime.datetime.now()
         self.write_recipeinc(package_name, inc_data)
         bitbake("-ccleansstate %s" % package_name)
         res = bitbake(package_name, ignore_status=True)
@@ -119,3 +120,13 @@
     @testcase(936)
     def test_pr_service_ipk_arch_indep(self):
         self.run_test_pr_service('xcursor-transparent-theme', 'ipk', 'do_package')
+
+    @testcase(1419)
+    def test_stopping_prservice_message(self):
+        port = get_free_port()
+
+        runCmd('bitbake-prserv --host localhost --port %s --loglevel=DEBUG --start' % port)
+        ret = runCmd('bitbake-prserv --host localhost --port %s --loglevel=DEBUG --stop' % port)
+
+        self.assertEqual(ret.status, 0)
+
diff --git a/yocto-poky/meta/lib/oeqa/selftest/recipetool.py b/yocto-poky/meta/lib/oeqa/selftest/recipetool.py
index b1f1d2a..e72911b 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/recipetool.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/recipetool.py
@@ -383,7 +383,7 @@
     @testcase(1194)
     def test_recipetool_create_git(self):
         # Ensure we have the right data in shlibs/pkgdata
-        bitbake('libpng pango libx11 libxext jpeg')
+        bitbake('libpng pango libx11 libxext jpeg libxsettings-client libcheck')
         # Try adding a recipe
         tempsrc = os.path.join(self.tempdir, 'srctree')
         os.makedirs(tempsrc)
@@ -395,12 +395,52 @@
         checkvars['LICENSE'] = 'LGPLv2.1'
         checkvars['LIC_FILES_CHKSUM'] = 'file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34'
         checkvars['S'] = '${WORKDIR}/git'
-        checkvars['PV'] = '1.0+git${SRCPV}'
+        checkvars['PV'] = '1.11+git${SRCPV}'
         checkvars['SRC_URI'] = srcuri
-        checkvars['DEPENDS'] = 'libpng pango libx11 libxext jpeg'
+        checkvars['DEPENDS'] = set(['libcheck', 'libjpeg-turbo', 'libpng', 'libx11', 'libxsettings-client', 'libxext', 'pango'])
         inherits = ['autotools', 'pkgconfig']
         self._test_recipe_contents(recipefile, checkvars, inherits)
 
+    @testcase(1392)
+    def test_recipetool_create_simple(self):
+        # Try adding a recipe
+        temprecipe = os.path.join(self.tempdir, 'recipe')
+        os.makedirs(temprecipe)
+        pv = '1.7.3.0'
+        srcuri = 'http://www.dest-unreach.org/socat/download/socat-%s.tar.bz2' % pv
+        result = runCmd('recipetool create %s -o %s' % (srcuri, temprecipe))
+        dirlist = os.listdir(temprecipe)
+        if len(dirlist) > 1:
+            self.fail('recipetool created more than just one file; output:\n%s\ndirlist:\n%s' % (result.output, str(dirlist)))
+        if len(dirlist) < 1 or not os.path.isfile(os.path.join(temprecipe, dirlist[0])):
+            self.fail('recipetool did not create recipe file; output:\n%s\ndirlist:\n%s' % (result.output, str(dirlist)))
+        self.assertEqual(dirlist[0], 'socat_%s.bb' % pv, 'Recipe file incorrectly named')
+        checkvars = {}
+        checkvars['LICENSE'] = set(['Unknown', 'GPLv2'])
+        checkvars['LIC_FILES_CHKSUM'] = set(['file://COPYING.OpenSSL;md5=5c9bccc77f67a8328ef4ebaf468116f4', 'file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263'])
+        # We don't check DEPENDS since they are variable for this recipe depending on what's in the sysroot
+        checkvars['S'] = None
+        checkvars['SRC_URI'] = srcuri.replace(pv, '${PV}')
+        inherits = ['autotools']
+        self._test_recipe_contents(os.path.join(temprecipe, dirlist[0]), checkvars, inherits)
+
+    @testcase(1418)
+    def test_recipetool_create_cmake(self):
+        # 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.sourceforge.net/project/navit/v0.5.0/navit-0.5.0.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.sourceforge.net/project/navit/v${PV}/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'])
+        inherits = ['cmake', 'python-dir', 'gettext', 'pkgconfig']
+        self._test_recipe_contents(recipefile, checkvars, inherits)
 
 class RecipetoolAppendsrcBase(RecipetoolBase):
     def _try_recipetool_appendsrcfile(self, testrecipe, newfile, destfile, options, expectedlines, expectedfiles):
diff --git a/yocto-poky/meta/lib/oeqa/selftest/signing.py b/yocto-poky/meta/lib/oeqa/selftest/signing.py
new file mode 100644
index 0000000..1babca0
--- /dev/null
+++ b/yocto-poky/meta/lib/oeqa/selftest/signing.py
@@ -0,0 +1,186 @@
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+import os
+import glob
+import re
+import shutil
+import tempfile
+from oeqa.utils.decorators import testcase
+from oeqa.utils.ftools import write_file
+
+
+class Signing(oeSelfTest):
+
+    gpg_dir = ""
+    pub_key_name = 'key.pub'
+    secret_key_name = 'key.secret'
+
+    @classmethod
+    def setUpClass(cls):
+        # Import the gpg keys
+
+        cls.gpg_dir = os.path.join(cls.testlayer_path, 'files/signing/')
+
+        # key.secret key.pub are located in gpg_dir
+        pub_key_location = cls.gpg_dir + cls.pub_key_name
+        secret_key_location = cls.gpg_dir + cls.secret_key_name
+        runCmd('gpg --homedir %s --import %s %s' % (cls.gpg_dir, pub_key_location, secret_key_location))
+
+    @classmethod
+    def tearDownClass(cls):
+        # Delete the files generated by 'gpg --import'
+
+        gpg_files = glob.glob(cls.gpg_dir + '*.gpg*')
+        random_seed_file = cls.gpg_dir + 'random_seed'
+        gpg_files.append(random_seed_file)
+
+        for gpg_file in gpg_files:
+            runCmd('rm -f ' + gpg_file)
+
+    @testcase(1362)
+    def test_signing_packages(self):
+        """
+        Summary:     Test that packages can be signed in the package feed
+        Expected:    Package should be signed with the correct key
+        Product:     oe-core
+        Author:      Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+        AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+        """
+        import oe.packagedata
+
+        package_classes = get_bb_var('PACKAGE_CLASSES')
+        if 'package_rpm' not in package_classes:
+            self.skipTest('This test requires RPM Packaging.')
+
+        test_recipe = 'ed'
+
+        feature = 'INHERIT += "sign_rpm"\n'
+        feature += 'RPM_GPG_PASSPHRASE = "test123"\n'
+        feature += 'RPM_GPG_NAME = "testuser"\n'
+        feature += 'RPM_GPG_PUBKEY = "%s%s"\n' % (self.gpg_dir, self.pub_key_name)
+        feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
+
+        self.write_config(feature)
+
+        bitbake('-c cleansstate %s' % test_recipe)
+        bitbake(test_recipe)
+        self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
+
+        pkgdatadir = get_bb_var('PKGDATA_DIR', test_recipe)
+        pkgdata = oe.packagedata.read_pkgdatafile(pkgdatadir + "/runtime/ed")
+        if 'PKGE' in pkgdata:
+            pf = pkgdata['PN'] + "-" + pkgdata['PKGE'] + pkgdata['PKGV'] + '-' + pkgdata['PKGR']
+        else:
+            pf = pkgdata['PN'] + "-" + pkgdata['PKGV'] + '-' + pkgdata['PKGR']
+        deploy_dir_rpm = get_bb_var('DEPLOY_DIR_RPM', test_recipe)
+        package_arch = get_bb_var('PACKAGE_ARCH', test_recipe).replace('-', '_')
+        staging_bindir_native = get_bb_var('STAGING_BINDIR_NATIVE')
+
+        pkg_deploy = os.path.join(deploy_dir_rpm, package_arch, '.'.join((pf, package_arch, 'rpm')))
+
+        # Use a temporary rpmdb
+        rpmdb = tempfile.mkdtemp(prefix='oeqa-rpmdb')
+
+        runCmd('%s/rpm --define "_dbpath %s" --import %s%s' %
+               (staging_bindir_native, rpmdb, self.gpg_dir, self.pub_key_name))
+
+        ret = runCmd('%s/rpm --define "_dbpath %s" --checksig %s' %
+                     (staging_bindir_native, rpmdb, pkg_deploy))
+        # tmp/deploy/rpm/i586/ed-1.9-r0.i586.rpm: rsa sha1 md5 OK
+        self.assertIn('rsa sha1 md5 OK', ret.output, 'Package signed incorrectly.')
+        shutil.rmtree(rpmdb)
+
+    @testcase(1382)
+    def test_signing_sstate_archive(self):
+        """
+        Summary:     Test that sstate archives can be signed
+        Expected:    Package should be signed with the correct key
+        Product:     oe-core
+        Author:      Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+        AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+        """
+
+        test_recipe = 'ed'
+
+        builddir = os.environ.get('BUILDDIR')
+        sstatedir = os.path.join(builddir, 'test-sstate')
+
+        self.add_command_to_tearDown('bitbake -c clean %s' % test_recipe)
+        self.add_command_to_tearDown('bitbake -c cleansstate %s' % test_recipe)
+        self.add_command_to_tearDown('rm -rf %s' % sstatedir)
+
+        # Determine the pub key signature
+        ret = runCmd('gpg --homedir %s --list-keys' % self.gpg_dir)
+        pub_key = re.search(r'^pub\s+\S+/(\S+)\s+', ret.output, re.M)
+        self.assertIsNotNone(pub_key, 'Failed to determine the public key signature.')
+        pub_key = pub_key.group(1)
+
+        feature = 'SSTATE_SIG_KEY ?= "%s"\n' % pub_key
+        feature += 'SSTATE_SIG_PASSPHRASE ?= "test123"\n'
+        feature += 'SSTATE_VERIFY_SIG ?= "1"\n'
+        feature += 'GPG_PATH = "%s"\n' % self.gpg_dir
+        feature += 'SSTATE_DIR = "%s"\n' % sstatedir
+
+        self.write_config(feature)
+
+        bitbake('-c cleansstate %s' % test_recipe)
+        bitbake(test_recipe)
+
+        recipe_sig = glob.glob(sstatedir + '/*/*:ed:*_package.tgz.sig')
+        recipe_tgz = glob.glob(sstatedir + '/*/*:ed:*_package.tgz')
+
+        self.assertEqual(len(recipe_sig), 1, 'Failed to find .sig file.')
+        self.assertEqual(len(recipe_tgz), 1, 'Failed to find .tgz file.')
+
+        ret = runCmd('gpg --homedir %s --verify %s %s' % (self.gpg_dir, recipe_sig[0], recipe_tgz[0]))
+        # gpg: Signature made Thu 22 Oct 2015 01:45:09 PM EEST using RSA key ID 61EEFB30
+        # gpg: Good signature from "testuser (nocomment) <testuser@email.com>"
+        self.assertIn('gpg: Good signature from', ret.output, 'Package signed incorrectly.')
+
+
+class LockedSignatures(oeSelfTest):
+
+    @testcase(1420)
+    def test_locked_signatures(self):
+        """
+        Summary:     Test locked signature mechanism
+        Expected:    Locked signatures will prevent task to run
+        Product:     oe-core
+        Author:      Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+        AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
+        """
+
+        test_recipe = 'ed'
+        locked_sigs_file = 'locked-sigs.inc'
+
+        self.add_command_to_tearDown('rm -f %s' % os.path.join(self.builddir, locked_sigs_file))
+
+        bitbake(test_recipe)
+        # Generate locked sigs include file
+        bitbake('-S none %s' % test_recipe)
+
+        feature = 'require %s\n' % locked_sigs_file
+        feature += 'SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "warn"\n'
+        self.write_config(feature)
+
+        # Build a locked recipe
+        bitbake(test_recipe)
+
+        # Make a change that should cause the locked task signature to change
+        recipe_append_file = test_recipe + '_' + get_bb_var('PV', test_recipe) + '.bbappend'
+        recipe_append_path = os.path.join(self.testlayer_path, 'recipes-test', test_recipe, recipe_append_file)
+        feature = 'SUMMARY += "test locked signature"\n'
+
+        os.mkdir(os.path.join(self.testlayer_path, 'recipes-test', test_recipe))
+        write_file(recipe_append_path, feature)
+
+        self.add_command_to_tearDown('rm -rf %s' % os.path.join(self.testlayer_path, 'recipes-test', test_recipe))
+
+        # Build the recipe again
+        ret = bitbake(test_recipe)
+
+        # Verify you get the warning and that the real task *isn't* run (i.e. the locked signature has worked)
+        patt = r'WARNING: The %s:do_package sig is computed to be \S+, but the sig is locked to \S+ in SIGGEN_LOCKEDSIGS\S+' % test_recipe
+        found_warn = re.search(patt, ret.output)
+
+        self.assertIsNotNone(found_warn, "Didn't find the expected warning message. Output: %s" % ret.output)
diff --git a/yocto-poky/meta/lib/oeqa/selftest/sstatetests.py b/yocto-poky/meta/lib/oeqa/selftest/sstatetests.py
index 3c23062..acaf405 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/sstatetests.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/sstatetests.py
@@ -4,6 +4,7 @@
 import re
 import shutil
 import glob
+import subprocess
 
 import oeqa.utils.ftools as ftools
 from oeqa.selftest.base import oeSelfTest
@@ -23,11 +24,20 @@
             bitbake(['-ccleansstate'] + targets)
 
         bitbake(targets)
-        file_tracker = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific)
+        file_tracker = []
+        results = self.search_sstate('|'.join(map(str, targets)), distro_specific, distro_nonspecific)
+        if distro_nonspecific:
+            for r in results:
+                if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo", "_fetch.tgz.siginfo", "_unpack.tgz.siginfo", "_patch.tgz.siginfo")):
+                    continue
+                file_tracker.append(r)
+        else:
+            file_tracker = results
+
         if should_pass:
             self.assertTrue(file_tracker , msg="Could not find sstate files for: %s" % ', '.join(map(str, targets)))
         else:
-            self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s" % ', '.join(map(str, targets)))
+            self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s (found %s)" % (', '.join(map(str, targets)), str(file_tracker)))
 
     @testcase(975)
     def test_sstate_creation_distro_specific_pass(self):
@@ -56,14 +66,14 @@
 
         bitbake(targets)
         tgz_created = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
-        self.assertTrue(tgz_created, msg="Could not find sstate .tgz files for: %s" % ', '.join(map(str, targets)))
+        self.assertTrue(tgz_created, msg="Could not find sstate .tgz files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_created)))
 
         siginfo_created = self.search_sstate('|'.join(map(str, [s + '.*?\.siginfo$' for s in targets])), distro_specific, distro_nonspecific)
-        self.assertTrue(siginfo_created, msg="Could not find sstate .siginfo files for: %s" % ', '.join(map(str, targets)))
+        self.assertTrue(siginfo_created, msg="Could not find sstate .siginfo files for: %s (%s)" % (', '.join(map(str, targets)), str(siginfo_created)))
 
         bitbake(['-ccleansstate'] + targets)
         tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
-        self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s" % ', '.join(map(str, targets)))
+        self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s (%s)" % (', '.join(map(str, targets)), str(tgz_removed)))
 
     @testcase(977)
     def test_cleansstate_task_distro_specific_nonspecific(self):
@@ -87,7 +97,13 @@
         bitbake(['-ccleansstate'] + targets)
 
         bitbake(targets)
-        self.assertTrue(self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=False, distro_nonspecific=True) == [], msg="Found distro non-specific sstate for: %s" % ', '.join(map(str, targets)))
+        results = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=False, distro_nonspecific=True)
+        filtered_results = []
+        for r in results:
+            if r.endswith(("_populate_lic.tgz", "_populate_lic.tgz.siginfo")):
+                continue
+            filtered_results.append(r)
+        self.assertTrue(filtered_results == [], msg="Found distro non-specific sstate for: %s (%s)" % (', '.join(map(str, targets)), str(filtered_results)))
         file_tracker_1 = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific=True, distro_nonspecific=False)
         self.assertTrue(len(file_tracker_1) >= len(targets), msg = "Not all sstate files ware created for: %s" % ', '.join(map(str, targets)))
 
@@ -208,28 +224,28 @@
     def test_sstate_32_64_same_hash(self):
         """
         The sstate checksums for both native and target should not vary whether
-        they're built on a 32 or 64 bit system. Rather than requiring two different 
+        they're built on a 32 or 64 bit system. Rather than requiring two different
         build machines and running a builds, override the variables calling uname()
         manually and check using bitbake -S.
-        
-        Also check that SDKMACHINE changing doesn't change any of these stamps.
         """
 
         topdir = get_bb_var('TOPDIR')
         targetvendor = get_bb_var('TARGET_VENDOR')
         self.write_config("""
-TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
-BUILD_ARCH = \"x86_64\"
-BUILD_OS = \"linux\"
-SDKMACHINE = \"x86_64\"
+MACHINE = "qemux86"
+TMPDIR = "${TOPDIR}/tmp-sstatesamehash"
+BUILD_ARCH = "x86_64"
+BUILD_OS = "linux"
+SDKMACHINE = "x86_64"
 """)
         self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
         bitbake("core-image-sato -S none")
         self.write_config("""
-TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
-BUILD_ARCH = \"i686\"
-BUILD_OS = \"linux\"
-SDKMACHINE = \"i686\"
+MACHINE = "qemux86"
+TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
+BUILD_ARCH = "i686"
+BUILD_OS = "linux"
+SDKMACHINE = "i686"
 """)
         self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
         bitbake("core-image-sato -S none")
@@ -238,9 +254,10 @@
             f = []
             for root, dirs, files in os.walk(d):
                 if "core-image-sato" in root:
-                        # SDKMACHINE changing will change do_rootfs/do_testimage/do_build stamps of core-image-sato itself
-                        # which is safe to ignore
-                        continue
+                    # SDKMACHINE changing will change
+                    # do_rootfs/do_testimage/do_build stamps of images which
+                    # is safe to ignore.
+                    continue
                 f.extend(os.path.join(root, name) for name in files)
             return f
         files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/")
@@ -254,7 +271,7 @@
     def test_sstate_nativelsbstring_same_hash(self):
         """
         The sstate checksums should be independent of whichever NATIVELSBSTRING is
-        detected. Rather than requiring two different build machines and running 
+        detected. Rather than requiring two different build machines and running
         builds, override the variables manually and check using bitbake -S.
         """
 
@@ -286,7 +303,7 @@
     @testcase(1368)
     def test_sstate_allarch_samesigs(self):
         """
-        The sstate checksums of allarch packages should be independent of whichever 
+        The sstate checksums of allarch packages should be independent of whichever
         MACHINE is set. Check this using bitbake -S.
         Also, rather than duplicate the test, check nativesdk stamps are the same between
         the two MACHINE values.
@@ -309,32 +326,32 @@
         bitbake("world meta-toolchain -S none")
 
         def get_files(d):
-            f = []
+            f = {}
             for root, dirs, files in os.walk(d):
                 for name in files:
                     if "meta-environment" in root or "cross-canadian" in root:
                         continue
                     if "do_build" not in name:
-                        f.append(os.path.join(root, name))
+                        # 1.4.1+gitAUTOINC+302fca9f4c-r0.do_package_write_ipk.sigdata.f3a2a38697da743f0dbed8b56aafcf79
+                        (_, task, _, shash) = name.rsplit(".", 3)
+                        f[os.path.join(os.path.basename(root), task)] = shash
             return f
         files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/all" + targetvendor + "-" + targetos)
         files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/all" + targetvendor + "-" + targetos)
-        files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
         self.maxDiff = None
-        self.assertItemsEqual(files1, files2)
+        self.assertEqual(files1, files2)
 
         nativesdkdir = os.path.basename(glob.glob(topdir + "/tmp-sstatesamehash/stamps/*-nativesdk*-linux")[0])
 
         files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/" + nativesdkdir)
         files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/" + nativesdkdir)
-        files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
         self.maxDiff = None
-        self.assertItemsEqual(files1, files2)
+        self.assertEqual(files1, files2)
 
     @testcase(1369)
     def test_sstate_sametune_samesigs(self):
         """
-        The sstate checksums of two identical machines (using the same tune) should be the 
+        The sstate checksums of two identical machines (using the same tune) should be the
         same, apart from changes within the machine specific stamps directory. We use the
         qemux86copy machine to test this. Also include multilibs in the test.
         """
@@ -377,3 +394,68 @@
         files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
         self.maxDiff = None
         self.assertItemsEqual(files1, files2)
+
+
+    def test_sstate_noop_samesigs(self):
+        """
+        The sstate checksums of two builds with these variables changed or
+        classes inherits should be the same.
+        """
+
+        topdir = get_bb_var('TOPDIR')
+        targetvendor = get_bb_var('TARGET_VENDOR')
+        self.write_config("""
+TMPDIR = "${TOPDIR}/tmp-sstatesamehash"
+BB_NUMBER_THREADS = "1"
+PARALLEL_MAKE = "-j 1"
+DL_DIR = "${TOPDIR}/download1"
+TIME = "111111"
+DATE = "20161111"
+INHERIT_remove = "buildstats-summary buildhistory"
+""")
+        self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
+        bitbake("world meta-toolchain -S none")
+        self.write_config("""
+TMPDIR = "${TOPDIR}/tmp-sstatesamehash2"
+BB_NUMBER_THREADS = "2"
+PARALLEL_MAKE = "-j 2"
+DL_DIR = "${TOPDIR}/download2"
+TIME = "222222"
+DATE = "20161212"
+INHERIT += "buildstats-summary buildhistory"
+""")
+        self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
+        bitbake("world meta-toolchain -S none")
+
+        def get_files(d):
+            f = {}
+            for root, dirs, files in os.walk(d):
+                for name in files:
+                    name, shash = name.rsplit('.', 1)
+                    # Extract just the machine and recipe name
+                    base = os.sep.join(root.rsplit(os.sep, 2)[-2:] + [name])
+                    f[base] = shash
+            return f
+        files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/")
+        files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/")
+        # Remove items that are identical in both sets
+        for k,v in files1.viewitems() & files2.viewitems():
+            del files1[k]
+            del files2[k]
+        if not files1 and not files2:
+            # No changes, so we're done
+            return
+
+        for k in files1.viewkeys() | files2.viewkeys():
+            if k in files1 and k in files2:
+                print "%s differs:" % k
+                print subprocess.check_output(("bitbake-diffsigs",
+                                               topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k],
+                                               topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]))
+            elif k in files1 and k not in files2:
+                print "%s in files1" % k
+            elif k not in files1 and k in files2:
+                print "%s in files2" % k
+            else:
+                assert "shouldn't reach here"
+        self.fail("sstate hashes not identical.")
diff --git a/yocto-poky/meta/lib/oeqa/selftest/wic.py b/yocto-poky/meta/lib/oeqa/selftest/wic.py
index ea78e22..a569fbf 100644
--- a/yocto-poky/meta/lib/oeqa/selftest/wic.py
+++ b/yocto-poky/meta/lib/oeqa/selftest/wic.py
@@ -24,13 +24,12 @@
 """Test cases for wic."""
 
 import os
-import sys
 
 from glob import glob
 from shutil import rmtree
 
 from oeqa.selftest.base import oeSelfTest
-from oeqa.utils.commands import runCmd, bitbake, get_bb_var
+from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
 from oeqa.utils.decorators import testcase
 
 
@@ -42,7 +41,8 @@
 
     def setUpLocal(self):
         """This code is executed before each test method."""
-        self.write_config('IMAGE_FSTYPES += " hddimg"\nMACHINE_FEATURES_append = " efi"\n')
+        self.write_config('IMAGE_FSTYPES += " hddimg"\n'
+                          'MACHINE_FEATURES_append = " efi"\n')
 
         # Do this here instead of in setUpClass as the base setUp does some
         # clean up which can result in the native tools built earlier in
@@ -80,14 +80,14 @@
     @testcase(1212)
     def test_build_artifacts(self):
         """Test wic create directdisk providing all artifacts."""
-        vars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
+        bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
                         for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
                                     'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
         status = runCmd("wic create directdisk "
                         "-b %(staging_datadir)s "
                         "-k %(deploy_dir_image)s "
                         "-n %(staging_dir_native)s "
-                        "-r %(image_rootfs)s" % vars).status
+                        "-r %(image_rootfs)s" % bbvars).status
         self.assertEqual(0, status)
         self.assertEqual(1, len(glob(self.resultdir + "directdisk-*.direct")))
 
@@ -102,7 +102,7 @@
     def test_unsupported_subcommand(self):
         """Test unsupported subcommand"""
         self.assertEqual(1, runCmd('wic unsupported',
-                         ignore_status=True).status)
+                                   ignore_status=True).status)
 
     @testcase(1214)
     def test_no_command(self):
@@ -172,20 +172,20 @@
     @testcase(1269)
     def test_rootfs_artifacts(self):
         """Test usage of rootfs plugin with rootfs paths"""
-        vars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
+        bbvars = dict((var.lower(), get_bb_var(var, 'core-image-minimal')) \
                         for var in ('STAGING_DATADIR', 'DEPLOY_DIR_IMAGE',
                                     'STAGING_DIR_NATIVE', 'IMAGE_ROOTFS'))
-        vars['wks'] = "directdisk-multi-rootfs"
+        bbvars['wks'] = "directdisk-multi-rootfs"
         status = runCmd("wic create %(wks)s "
                         "-b %(staging_datadir)s "
                         "-k %(deploy_dir_image)s "
                         "-n %(staging_dir_native)s "
                         "--rootfs-dir rootfs1=%(image_rootfs)s "
                         "--rootfs-dir rootfs2=%(image_rootfs)s" \
-                        % vars).status
+                        % bbvars).status
         self.assertEqual(0, status)
         self.assertEqual(1, len(glob(self.resultdir + \
-                                     "%(wks)s-*.direct" % vars)))
+                                     "%(wks)s-*.direct" % bbvars)))
 
     @testcase(1346)
     def test_iso_image(self):
@@ -199,6 +199,7 @@
     def test_image_env(self):
         """Test generation of <image>.env files."""
         image = 'core-image-minimal'
+        self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' % image).status)
         stdir = get_bb_var('STAGING_DIR_TARGET', image)
         imgdatadir = os.path.join(stdir, 'imgdata')
 
@@ -228,7 +229,7 @@
         prefix = os.path.join(deploy_dir, 'wic-image-minimal-%s.' % machine)
         # check if we have result image and manifests symlinks
         # pointing to existing files
-        for suffix in ('wic.bz2', 'manifest'):
+        for suffix in ('wic', 'manifest'):
             path = prefix + suffix
             self.assertTrue(os.path.islink(path))
             self.assertTrue(os.path.isfile(os.path.realpath(path)))
@@ -256,3 +257,22 @@
         self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
                                    % image).status)
         self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
+
+    @testcase(1385)
+    def test_directdisk_bootloader_config(self):
+        """Test creation of directdisk-bootloader-config image"""
+        image = "directdisk-bootloader-config"
+        self.assertEqual(0, runCmd("wic create %s -e core-image-minimal" \
+                                   % image).status)
+        self.assertEqual(1, len(glob(self.resultdir + "%s-*direct" % image)))
+
+    @testcase(1422)
+    def test_qemu(self):
+        """Test wic-image-minimal under qemu"""
+        self.assertEqual(0, bitbake('wic-image-minimal').status)
+
+        with runqemu('wic-image-minimal', ssh=False) as qemu:
+            command = "mount |grep '^/dev/' | cut -f1,3 -d ' '"
+            status, output = qemu.run_serial(command)
+            self.assertEqual(1, status, 'Failed to run command "%s": %s' % (command, output))
+            self.assertEqual(output, '/dev/root /\r\n/dev/vda3 /mnt')
diff --git a/yocto-poky/meta/lib/oeqa/targetcontrol.py b/yocto-poky/meta/lib/oeqa/targetcontrol.py
index edc0d01..5422a61 100644
--- a/yocto-poky/meta/lib/oeqa/targetcontrol.py
+++ b/yocto-poky/meta/lib/oeqa/targetcontrol.py
@@ -68,7 +68,7 @@
         bb.note("SSH log file: %s" %  self.sshlog)
 
     @abstractmethod
-    def start(self, params=None):
+    def start(self, params=None, ssh=True):
         pass
 
     @abstractmethod
@@ -113,7 +113,7 @@
 
 class QemuTarget(BaseTarget):
 
-    supported_image_fstypes = ['ext3', 'ext4', 'cpio.gz']
+    supported_image_fstypes = ['ext3', 'ext4', 'cpio.gz', 'wic']
 
     def __init__(self, d):
 
@@ -176,11 +176,12 @@
         bb.note("Qemu log file: %s" % self.qemulog)
         super(QemuTarget, self).deploy()
 
-    def start(self, params=None):
-        if self.runner.start(params):
-            self.ip = self.runner.ip
-            self.server_ip = self.runner.server_ip
-            self.connection = SSHControl(ip=self.ip, logfile=self.sshlog)
+    def start(self, params=None, ssh=True):
+        if self.runner.start(params, get_ip=ssh):
+            if ssh:
+                self.ip = self.runner.ip
+                self.server_ip = self.runner.server_ip
+                self.connection = SSHControl(ip=self.ip, logfile=self.sshlog)
         else:
             self.stop()
             if os.path.exists(self.qemulog):
@@ -231,8 +232,9 @@
     def deploy(self):
         super(SimpleRemoteTarget, self).deploy()
 
-    def start(self, params=None):
-        self.connection = SSHControl(self.ip, logfile=self.sshlog, port=self.port)
+    def start(self, params=None, ssh=True):
+        if ssh:
+            self.connection = SSHControl(self.ip, logfile=self.sshlog, port=self.port)
 
     def stop(self):
         self.connection = None
diff --git a/yocto-poky/meta/lib/oeqa/utils/__init__.py b/yocto-poky/meta/lib/oeqa/utils/__init__.py
index 2260046..8f706f3 100644
--- a/yocto-poky/meta/lib/oeqa/utils/__init__.py
+++ b/yocto-poky/meta/lib/oeqa/utils/__init__.py
@@ -13,3 +13,26 @@
     def __str__(self):
         return "Command '%s' returned non-zero exit status %d with output: %s" % (self.cmd, self.retcode, self.output)
 
+def avoid_paths_in_environ(paths):
+    """
+        Searches for every path in os.environ['PATH']
+        if found remove it.
+
+        Returns new PATH without avoided PATHs.
+    """
+    import os
+
+    new_path = ''
+    for p in os.environ['PATH'].split(':'):
+       avoid = False
+       for pa in paths:
+           if pa in p:
+              avoid = True
+              break
+       if avoid:
+           continue
+
+       new_path = new_path + p + ':'
+
+    new_path = new_path[:-1]
+    return new_path
diff --git a/yocto-poky/meta/lib/oeqa/utils/commands.py b/yocto-poky/meta/lib/oeqa/utils/commands.py
index 08e2cbb..48f6441 100644
--- a/yocto-poky/meta/lib/oeqa/utils/commands.py
+++ b/yocto-poky/meta/lib/oeqa/utils/commands.py
@@ -18,6 +18,11 @@
 from oeqa.utils import ftools
 import re
 import contextlib
+# Export test doesn't require bb
+try:
+    import bb
+except ImportError:
+    pass
 
 class Command(object):
     def __init__(self, command, bg=False, timeout=None, data=None, **options):
@@ -177,7 +182,7 @@
 
 
 @contextlib.contextmanager
-def runqemu(pn, test):
+def runqemu(pn, ssh=True):
 
     import bb.tinfoil
     import bb.build
@@ -208,10 +213,20 @@
         # Luckily QemuTarget doesn't need it after the constructor.
         tinfoil.shutdown()
 
+    # Setup bitbake logger as console handler is removed by tinfoil.shutdown
+    bblogger = logging.getLogger('BitBake')
+    bblogger.setLevel(logging.INFO)
+    console = logging.StreamHandler(sys.stdout)
+    bbformat = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
+    if sys.stdout.isatty():
+        bbformat.enable_color()
+    console.setFormatter(bbformat)
+    bblogger.addHandler(console)
+
     try:
         qemu.deploy()
         try:
-            qemu.start()
+            qemu.start(ssh=ssh)
         except bb.build.FuncFailed:
             raise Exception('Failed to start QEMU - see the logs in %s' % logdir)
 
diff --git a/yocto-poky/meta/lib/oeqa/utils/ftools.py b/yocto-poky/meta/lib/oeqa/utils/ftools.py
index 1bd9a30..a7233d4 100644
--- a/yocto-poky/meta/lib/oeqa/utils/ftools.py
+++ b/yocto-poky/meta/lib/oeqa/utils/ftools.py
@@ -36,10 +36,11 @@
             return
         else:
             raise
-    lines = rdata.splitlines()
-    rmdata = data.strip().splitlines()
-    for l in rmdata:
-        for c in range(0, lines.count(l)):
-            i = lines.index(l)
-            del(lines[i])
-    write_file(path, "\n".join(lines))
+
+    contents = rdata.strip().splitlines()
+    for r in data.strip().splitlines():
+        try:
+            contents.remove(r)
+        except ValueError:
+            pass
+    write_file(path, "\n".join(contents))
diff --git a/yocto-poky/meta/lib/oeqa/utils/network.py b/yocto-poky/meta/lib/oeqa/utils/network.py
new file mode 100644
index 0000000..2768f6c
--- /dev/null
+++ b/yocto-poky/meta/lib/oeqa/utils/network.py
@@ -0,0 +1,8 @@
+import socket
+
+def get_free_port():
+    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+    s.bind(('', 0))
+    addr = s.getsockname()
+    s.close()
+    return addr[1]
diff --git a/yocto-poky/meta/lib/oeqa/utils/qemurunner.py b/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
index bdc6e0a..784cf96 100644
--- a/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
+++ b/yocto-poky/meta/lib/oeqa/utils/qemurunner.py
@@ -91,12 +91,12 @@
                 self._dump_host()
                 raise SystemExit
 
-    def start(self, qemuparams = None):
+    def start(self, qemuparams = None, get_ip = True):
         if self.display:
             os.environ["DISPLAY"] = self.display
-        else:
-            logger.error("To start qemu I need a X desktop, please set DISPLAY correctly (e.g. DISPLAY=:1)")
-            return False
+            # Set this flag so that Qemu doesn't do any grabs as SDL grabs
+            # interact badly with screensavers.
+            os.environ["QEMU_DONT_GRAB"] = "1"
         if not os.path.exists(self.rootfs):
             logger.error("Invalid rootfs %s" % self.rootfs)
             return False
@@ -118,10 +118,10 @@
             logger.error("Failed to create listening socket: %s" % msg[1])
             return False
 
-        # Set this flag so that Qemu doesn't do any grabs as SDL grabs interact
-        # badly with screensavers.
-        os.environ["QEMU_DONT_GRAB"] = "1"
-        self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8" qemuparams="-serial tcp:127.0.0.1:{}"'.format(threadport)
+
+        self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8 printk.time=1" qemuparams="-serial tcp:127.0.0.1:{}"'.format(threadport)
+        if not self.display:
+            self.qemuparams = 'nographic ' + self.qemuparams
         if qemuparams:
             self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + '\"'
 
@@ -178,27 +178,28 @@
 
         if self.is_alive():
             logger.info("qemu started - qemu procces pid is %s" % self.qemupid)
-            cmdline = ''
-            with open('/proc/%s/cmdline' % self.qemupid) as p:
-                cmdline = p.read()
-                # It is needed to sanitize the data received
-                # because is possible to have control characters
-                cmdline = re_control_char.sub('', cmdline)
-            try:
-                ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
-                if not ips or len(ips) != 3:
-                    raise ValueError
-                else:
-                    self.ip = ips[0]
-                    self.server_ip = ips[1]
-            except IndexError, ValueError:
-                logger.info("Couldn't get ip from qemu process arguments! Here is the qemu command line used:\n%s\nand output from runqemu:\n%s" % (cmdline, self.getOutput(output)))
-                self._dump_host()
-                self.stop()
-                return False
-            logger.info("qemu cmdline used:\n{}".format(cmdline))
-            logger.info("Target IP: %s" % self.ip)
-            logger.info("Server IP: %s" % self.server_ip)
+            if get_ip:
+                cmdline = ''
+                with open('/proc/%s/cmdline' % self.qemupid) as p:
+                    cmdline = p.read()
+                    # It is needed to sanitize the data received
+                    # because is possible to have control characters
+                    cmdline = re_control_char.sub('', cmdline)
+                try:
+                    ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
+                    if not ips or len(ips) != 3:
+                        raise ValueError
+                    else:
+                        self.ip = ips[0]
+                        self.server_ip = ips[1]
+                except IndexError, ValueError:
+                    logger.info("Couldn't get ip from qemu process arguments! Here is the qemu command line used:\n%s\nand output from runqemu:\n%s" % (cmdline, self.getOutput(output)))
+                    self._dump_host()
+                    self.stop()
+                    return False
+                logger.info("qemu cmdline used:\n{}".format(cmdline))
+                logger.info("Target IP: %s" % self.ip)
+                logger.info("Server IP: %s" % self.server_ip)
 
             self.thread = LoggingThread(self.log, threadsock, logger)
             self.thread.start()
@@ -366,23 +367,25 @@
         # We assume target system have echo to get command status
         if not raw:
             command = "%s; echo $?\n" % command
-        self.server_socket.sendall(command)
+
         data = ''
         status = 0
-        stopread = False
-        endtime = time.time()+5
-        while time.time()<endtime and not stopread:
+        self.server_socket.sendall(command)
+        keepreading = True
+        while keepreading:
             sread, _, _ = select.select([self.server_socket],[],[],5)
-            for sock in sread:
-                answer = sock.recv(1024)
+            if sread:
+                answer = self.server_socket.recv(1024)
                 if answer:
                     data += answer
                     # Search the prompt to stop
                     if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data):
-                        stopread = True
-                        break
+                        keepreading = False
                 else:
                     raise Exception("No data on serial console socket")
+            else:
+                keepreading = False
+
         if data:
             if raw:
                 status = 1
diff --git a/yocto-poky/meta/lib/oeqa/utils/sshcontrol.py b/yocto-poky/meta/lib/oeqa/utils/sshcontrol.py
index 00f5051..1658744 100644
--- a/yocto-poky/meta/lib/oeqa/utils/sshcontrol.py
+++ b/yocto-poky/meta/lib/oeqa/utils/sshcontrol.py
@@ -136,8 +136,7 @@
         timeout=0 - no timeout, let command run until it returns
         """
 
-        # We need to source /etc/profile for a proper PATH on the target
-        command = self.ssh + [self.ip, ' . /etc/profile; ' + command]
+        command = self.ssh + [self.ip, 'export PATH=/usr/sbin:/sbin:/usr/bin:/bin; ' + command]
 
         if timeout is None:
             return self._internal_run(command, self.defaulttimeout, self.ignore_status)
diff --git a/yocto-poky/meta/lib/oeqa/utils/testexport.py b/yocto-poky/meta/lib/oeqa/utils/testexport.py
new file mode 100644
index 0000000..243463b
--- /dev/null
+++ b/yocto-poky/meta/lib/oeqa/utils/testexport.py
@@ -0,0 +1,263 @@
+# Copyright (C) 2015 Intel Corporation
+#
+# Released under the MIT license (see COPYING.MIT)
+
+# Provides functions to help with exporting binaries obtained from built targets
+
+import os, re, glob as g, shutil as sh,sys
+from time import sleep
+from commands import runCmd
+from difflib import SequenceMatcher as SM
+
+try:
+    import bb
+except ImportError:
+    class my_log():
+        def __init__(self):
+            pass
+        def plain(self, msg):
+            if msg:
+                print msg
+        def warn(self, msg):
+            if msg:
+                print "WARNING: " + msg
+        def fatal(self, msg):
+            if msg:
+                print "FATAL:" + msg
+                sys.exit(1)
+    bb = my_log()    
+
+
+def determine_if_poky_env():
+    """
+    used to determine if we are inside the poky env or not. Usefull for remote machine where poky is not present
+    """
+    check_env = True if ("/scripts" and "/bitbake/bin") in os.getenv("PATH") else False
+    return check_env
+
+
+def get_dest_folder(tune_features, folder_list):
+    """
+    Function to determine what rpm deploy dir to choose for a given architecture based on TUNE_FEATURES
+    """
+    features_list = tune_features.split(" ")
+    features_list.reverse()
+    features_list = "_".join(features_list)
+    match_rate = 0
+    best_match = None
+    for folder in folder_list:
+        curr_match_rate = SM(None, folder, features_list).ratio()
+        if curr_match_rate > match_rate:
+            match_rate = curr_match_rate
+            best_match = folder
+    return best_match
+
+
+def process_binaries(d, params):
+    param_list = params
+    export_env = d.getVar("TEST_EXPORT_ONLY")
+
+    def extract_binary(pth_to_pkg, dest_pth=None):
+        cpio_command = runCmd("which cpio")
+        rpm2cpio_command = runCmd("ls /usr/bin/rpm2cpio")
+        if (cpio_command.status != 0) and (rpm2cpio_command.status != 0):
+            bb.fatal("Either \"rpm2cpio\" or \"cpio\" tools are not available on your system."
+                    "All binaries extraction processes will not be available, crashing all related tests."
+                    "Please install them according to your OS recommendations") # will exit here
+        if dest_pth:
+            os.chdir(dest_pth)
+        else:
+            os.chdir("%s" % os.sep)# this is for native package
+        extract_bin_command = runCmd("%s %s | %s -idm" % (rpm2cpio_command.output, pth_to_pkg, cpio_command.output)) # semi-hardcoded because of a bug on poky's rpm2cpio
+        return extract_bin_command
+
+    if determine_if_poky_env(): # machine with poky environment
+        exportpath = d.getVar("TEST_EXPORT_DIR", True) if export_env else d.getVar("DEPLOY_DIR", True)
+        rpm_deploy_dir = d.getVar("DEPLOY_DIR_RPM", True)
+        arch = get_dest_folder(d.getVar("TUNE_FEATURES", True), os.listdir(rpm_deploy_dir))
+        arch_rpm_dir = os.path.join(rpm_deploy_dir, arch)
+        extracted_bin_dir = os.path.join(exportpath,"binaries", arch, "extracted_binaries")
+        packaged_bin_dir = os.path.join(exportpath,"binaries", arch, "packaged_binaries")
+        # creating necessary directory structure in case testing is done in poky env.
+        if export_env == "0":
+            if not os.path.exists(extracted_bin_dir): bb.utils.mkdirhier(extracted_bin_dir)
+            if not os.path.exists(packaged_bin_dir): bb.utils.mkdirhier(packaged_bin_dir)
+
+        if param_list[3] == "native":
+            if export_env == "1": #this is a native package and we only need to copy it. no need for extraction
+                native_rpm_dir = os.path.join(rpm_deploy_dir, get_dest_folder("{} nativesdk".format(d.getVar("BUILD_SYS")), os.listdir(rpm_deploy_dir)))
+                native_rpm_file_list = [item for item in os.listdir(native_rpm_dir) if re.search("nativesdk-" + param_list[0] + "-([0-9]+\.*)", item)]
+                if not native_rpm_file_list:
+                    bb.warn("Couldn't find any version of {} native package. Related tests will most probably fail.".format(param_list[0]))
+                    return ""
+                for item in native_rpm_file_list:# will copy all versions of package. Used version will be selected on remote machine
+                    bb.plain("Copying native package file: %s" % item)
+                    sh.copy(os.path.join(rpm_deploy_dir, native_rpm_dir, item), os.path.join(d.getVar("TEST_EXPORT_DIR", True), "binaries", "native"))
+            else: # nothing to do here; running tests under bitbake, so we asume native binaries are in sysroots dir.
+                if param_list[1] or param_list[4]:
+                    bb.warn("Native binary %s %s%s. Running tests under bitbake environment. Version can't be checked except when the test itself does it"
+                            " and binary can't be removed."%(param_list[0],"has assigned ver. " + param_list[1] if param_list[1] else "",
+                            ", is marked for removal" if param_list[4] else ""))
+        else:# the package is target aka DUT intended and it is either required to be delivered in an extracted form or in a packaged version
+            target_rpm_file_list = [item for item in os.listdir(arch_rpm_dir) if re.search(param_list[0] + "-([0-9]+\.*)", item)]
+            if not target_rpm_file_list:
+                bb.warn("Couldn't find any version of target package %s. Please ensure it was built. "
+                        "Related tests will probably fail." % param_list[0])
+                return ""
+            if param_list[2] == "rpm": # binary should be deployed as rpm; (other, .deb, .ipk? ;  in the near future)
+                for item in target_rpm_file_list: # copying all related rpm packages. "Intuition" reasons, someone may need other versions too. Deciding later on version
+                    bb.plain("Copying target specific packaged file: %s" % item)
+                    sh.copy(os.path.join(arch_rpm_dir, item), packaged_bin_dir)
+                    return "copied"
+            else: # it is required to extract the binary
+                if param_list[1]: # the package is versioned
+                    for item in target_rpm_file_list:
+                        if re.match(".*-{}-.*\.rpm".format(param_list[1]), item):
+                            destination = os.path.join(extracted_bin_dir,param_list[0], param_list[1])
+                            bb.utils.mkdirhier(destination)
+                            extract_binary(os.path.join(arch_rpm_dir, item), destination)
+                            break
+                    else:
+                        bb.warn("Couldn't find the desired version %s for target binary %s. Related test cases will probably fail." % (param_list[1], param_list[0]))
+                        return ""
+                    return "extracted"
+                else: # no version provided, just extract one binary
+                    destination = os.path.join(extracted_bin_dir,param_list[0],
+                                               re.search(".*-([0-9]+\.[0-9]+)-.*rpm", target_rpm_file_list[0]).group(1))
+                    bb.utils.mkdirhier(destination)
+                    extract_binary(os.path.join(arch_rpm_dir, target_rpm_file_list[0]), destination)
+                    return "extracted"
+    else: # remote machine
+        binaries_path = os.getenv("bin_dir")# in order to know where the binaries are, bin_dir is set as env. variable
+        if param_list[3] == "native": #need to extract the native pkg here
+            native_rpm_dir = os.path.join(binaries_path, "native")
+            native_rpm_file_list = os.listdir(native_rpm_dir)
+            for item in native_rpm_file_list:
+                if param_list[1] and re.match("nativesdk-{}-{}-.*\.rpm".format(param_list[0], param_list[1]), item): # native package has version
+                    extract_binary(os.path.join(native_rpm_dir, item))
+                    break
+                else:# just copy any related native binary
+                    found_version = re.match("nativesdk-{}-([0-9]+\.[0-9]+)-".format(param_list[0]), item).group(1)
+                    if found_version:
+                        extract_binary(os.path.join(native_rpm_dir, item))
+            else:
+                bb.warn("Couldn't find native package %s%s. Related test cases will be influenced." %
+                        (param_list[0], " with version " + param_list[1] if param_list[1] else ""))
+                return
+
+        else: # this is for target device
+            if param_list[2] == "rpm":
+                return "No need to extract, this is an .rpm file"
+            arch = get_dest_folder(d.getVar("TUNE_FEATURES", True), os.listdir(binaries_path))
+            extracted_bin_path = os.path.join(binaries_path, arch, "extracted_binaries")
+            extracted_bin_list = [item for item in os.listdir(extracted_bin_path)]
+            packaged_bin_path = os.path.join(binaries_path, arch, "packaged_binaries")
+            packaged_bin_file_list = os.listdir(packaged_bin_path)
+            # see if the package is already in the extracted ones; maybe it was deployed when exported the env.
+            if os.path.exists(os.path.join(extracted_bin_path, param_list[0], param_list[1] if param_list[1] else "")):
+                return "binary %s is already extracted" % param_list[0]
+            else: # we need to search for it in the packaged binaries directory. It may have been shipped after export
+                for item in packaged_bin_file_list:
+                    if param_list[1]:
+                        if re.match("%s-%s.*rpm" % (param_list[0], param_list[1]), item): # package with version
+                            if not os.path.exists(os.path.join(extracted_bin_path, param_list[0],param_list[1])):
+                                os.makedirs(os.path.join(extracted_bin_path, param_list[0], param_list[1]))
+                                extract_binary(os.path.join(packaged_bin_path, item), os.path.join(extracted_bin_path, param_list[0],param_list[1]))
+                                bb.plain("Using {} for {}".format(os.path.join(packaged_bin_path, item), param_list[0]))
+                            break
+                    else:
+                        if re.match("%s-.*rpm" % param_list[0], item):
+                            found_version = re.match(".*-([0-9]+\.[0-9]+)-", item).group(1)
+                            if not os.path.exists(os.path.join(extracted_bin_path, param_list[0], found_version)):
+                                os.makedirs(os.path.join(extracted_bin_path, param_list[0], found_version))
+                                bb.plain("Used ver. %s for %s" % (found_version, param_list[0]))
+                                extract_binary(os.path.join(packaged_bin_path, item), os.path.join(extracted_bin_path, param_list[0], found_version))
+                            break
+                else:
+                    bb.warn("Couldn't find target package %s%s. Please ensure it is available "
+                            "in either of these directories: extracted_binaries or packaged_binaries. "
+                            "Related tests will probably fail." % (param_list[0], " with version " + param_list[1] if param_list[1] else ""))
+                    return
+                return "Binary %s extracted successfully." % param_list[0]
+
+
+def files_to_copy(base_dir):
+    """
+    Produces a list of files relative to the base dir path sent as param
+    :return: the list of relative path files
+    """
+    files_list = []
+    dir_list = [base_dir]
+    count = 1
+    dir_count = 1
+    while (dir_count == 1 or dir_count != count):
+        count = dir_count
+        for dir in dir_list:
+            for item in os.listdir(dir):
+                if os.path.isdir(os.path.join(dir, item)) and os.path.join(dir, item) not in dir_list:
+                   dir_list.append(os.path.join(dir, item))
+                   dir_count = len(dir_list)
+                elif os.path.join(dir, item) not in files_list and os.path.isfile(os.path.join(dir, item)):
+                   files_list.append(os.path.join(dir, item))
+    return files_list
+
+
+def send_bin_to_DUT(d,params):
+    from oeqa.oetest import oeRuntimeTest
+    param_list = params
+    cleanup_list = list()
+    bins_dir = os.path.join(d.getVar("TEST_EXPORT_DIR", True), "binaries") if determine_if_poky_env() \
+                    else os.getenv("bin_dir")
+    arch = get_dest_folder(d.getVar("TUNE_FEATURES", True), os.listdir(bins_dir))
+    arch_rpms_dir = os.path.join(bins_dir, arch, "packaged_binaries")
+    extracted_bin_dir = os.path.join(bins_dir, arch, "extracted_binaries", param_list[0])
+
+    def send_extracted_binary():
+        bin_local_dir = os.path.join(extracted_bin_dir, param_list[1] if param_list[1] else os.listdir(extracted_bin_dir)[0])
+        for item in files_to_copy(bin_local_dir):
+            split_path = item.split(bin_local_dir)[1]
+            path_on_DUT = split_path if split_path[0] is "/" else "/" + split_path # create the path as on DUT; eg. /usr/bin/bin_file
+            (status, output) = oeRuntimeTest.tc.target.copy_to(item, path_on_DUT)
+            if status != 0:
+                bb.warn("Failed to copy %s binary file %s on the remote target: %s" %
+                        (param_list[0], "ver. " + param_list[1] if param_list[1] else "", d.getVar("MACHINE")))
+                return
+            if param_list[4] == "rm":
+                cleanup_list.append(path_on_DUT)
+        return cleanup_list
+
+    def send_rpm(remote_path): # if it is not required to have an extracted binary, but to send an .rpm file
+        rpm_to_send = ""
+        for item in os.listdir(arch_rpms_dir):
+            if param_list[1] and re.match("%s-%s-.*rpm"%(param_list[0], param_list[1]), item):
+                rpm_to_send = item
+                break
+            elif re.match("%s-[0-9]+\.[0-9]+-.*rpm" % param_list[0], item):
+                rpm_to_send = item
+                break
+        else:
+            bb.warn("No rpm package found for %s %s in .rpm files dir %s. Skipping deployment." %
+                    (param_list[0], "ver. " + param_list[1] if param_list[1] else "", rpms_file_dir) )
+            return
+        (status, output) = oeRuntimeTest.tc.target.copy_to(os.path.join(arch_rpms_dir, rpm_to_send), remote_path)
+        if status != 0:
+                bb.warn("Failed to copy %s on the remote target: %s" %(param_list[0], d.getVar("MACHINE")))
+                return
+        if param_list[4] == "rm":
+            cleanup_list.append(os.path.join(remote_path, rpm_to_send))
+            return cleanup_list
+
+    if param_list[2] == "rpm": # send an .rpm file
+        return send_rpm("/home/root") # rpms will be sent on home dir of remote machine
+    else:
+        return send_extracted_binary()
+
+
+def rm_bin(removal_list): # need to know both if the binary is sent archived and the path where it is sent if archived
+    from oeqa.oetest import oeRuntimeTest
+    for item in removal_list:
+        (status,output) = oeRuntimeTest.tc.target.run("rm " + item)
+        if status != 0:
+            bb.warn("Failed to remove: %s. Please ensure connection with the target device is up and running and "
+                     "you have the needed rights." % item)
+
diff --git a/yocto-poky/meta/recipes-bsp/acpid/acpid.inc b/yocto-poky/meta/recipes-bsp/acpid/acpid.inc
index e015619..12ec19b 100644
--- a/yocto-poky/meta/recipes-bsp/acpid/acpid.inc
+++ b/yocto-poky/meta/recipes-bsp/acpid/acpid.inc
@@ -1,6 +1,6 @@
 SUMMARY = "A daemon for delivering ACPI events"
-HOMEPAGE = "http://sourceforge.net/projects/acpid/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=33140&atid=407341"
+HOMEPAGE = "http://sourceforge.net/projects/acpid2"
+BUGTRACKER = "http://sourceforge.net/p/acpid2/tickets/?source=navbar"
 SECTION = "base"
 LICENSE = "GPLv2+"
 
diff --git a/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch b/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch
new file mode 100644
index 0000000..d1aa3aa
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/acpid/acpid/0001-Fix-out-of-source-build.patch
@@ -0,0 +1,46 @@
+From 5d32b65af750e2007730f3d55a552a186aed81a6 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Wed, 20 Jan 2016 14:08:29 +0200
+Subject: [PATCH] Fix out of source build
+
+Since the source directory contains another config.h, the build
+directory should be searched first.
+
+Upstream-Status: Submitted
+[https://sourceforge.net/p/acpid2/tickets/10/]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ sock.c      | 2 +-
+ ud_socket.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/sock.c b/sock.c
+index 644d460..9e04501 100644
+--- a/sock.c
++++ b/sock.c
+@@ -21,7 +21,7 @@
+  */
+ 
+ #ifdef HAVE_CONFIG_H
+-#include "config.h"
++#include <config.h>
+ #endif
+ 
+ #include <unistd.h>
+diff --git a/ud_socket.c b/ud_socket.c
+index 1790917..83b2aa9 100644
+--- a/ud_socket.c
++++ b/ud_socket.c
+@@ -4,7 +4,7 @@
+  */
+ 
+ #ifdef HAVE_CONFIG_H
+-#include "config.h"
++#include <config.h>
+ #endif
+ 
+ #include <stdio.h>
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.23.bb b/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.23.bb
deleted file mode 100644
index a5317a4..0000000
--- a/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.23.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require acpid.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
-                    file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5"
-
-SRC_URI[md5sum] = "d7bcdcdefcd53b03730e50ba842554ea"
-SRC_URI[sha256sum] = "4396aaec13510c3a1faa941a15a4b5335b6ae4fbec8438b9249b88c3b66187ee"
diff --git a/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.26.bb b/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.26.bb
new file mode 100644
index 0000000..c3bd51f
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/acpid/acpid_2.0.26.bb
@@ -0,0 +1,9 @@
+require acpid.inc
+
+SRC_URI += "file://0001-Fix-out-of-source-build.patch"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
+                    file://acpid.h;endline=24;md5=324a9cf225ae69ddaad1bf9d942115b5"
+
+SRC_URI[md5sum] = "f6d772e35ed907f1cc14ad1a546fd473"
+SRC_URI[sha256sum] = "8384f37e4f260f50183e2e20039823d8f06aed9db56924fe92097b7e0b2e0343"
diff --git a/yocto-poky/meta/recipes-bsp/apmd/apmd/linkage.patch b/yocto-poky/meta/recipes-bsp/apmd/apmd/linkage.patch
new file mode 100644
index 0000000..3d32c49
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/apmd/apmd/linkage.patch
@@ -0,0 +1,53 @@
+When building use the libtool intermediate .lo files instead of explicitly using
+the .o files. Under libtool foo.lo is the libtool intermediate wrapper, foo.o is
+a static build, and .libs/foo.o is a shared build.
+
+If static libraries have been disabled globally then libtool won't generate them
+and explicit references to foo.o won't be satisfied.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile b/Makefile
+index bb695c6..5f60146 100644
+--- a/Makefile
++++ b/Makefile
+@@ -28,7 +28,7 @@ endif
+ 
+ .SUFFIXES:
+ 
+-OBJS=apmlib.o
++OBJS=apmlib.lo
+ EXES=apm apmd xapm apmsleep
+ HEADERS=apm.h
+ 
+@@ -66,22 +66,22 @@ all: $(EXES)
+ 
+ $(OBJS): $(HEADERS)
+ 
+-%.o: %.c
++%.lo: %.c
+ 	$(LT_COMPILE) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) $<
+ 
+-%: %.o $(LIBAPM)
++%: %.lo $(LIBAPM)
+ 	$(LT_LINK) -o $@ $< $(LDFLAGS) $(LIBAPM)
+ 
+-xapm.o: xapm.c
++xapm.lo: xapm.c
+ 	$(LT_COMPILE) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) -DNARROWPROTO $<
+ 
+-apmd: apmd.o
++apmd: apmd.lo
+ 
+-apmsleep: apmsleep.o
++apmsleep: apmsleep.lo
+ 
+-apmexists: apmexists.o
++apmexists: apmexists.lo
+ 
+-xapm: xapm.o $(LIBAPM)
++xapm: xapm.lo $(LIBAPM)
+ 	$(LT_LINK) -o $@ $< $(LDFLAGS) $(LIBAPM) $(XLDFLAGS) $(XLIBS)
+ 
+ $(LIBAPM): apmlib.lo
diff --git a/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch b/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch
new file mode 100644
index 0000000..c5faa85
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/apmd/apmd/wexitcode.patch
@@ -0,0 +1,26 @@
+Define non-posix W* funcitons
+
+C libraries like musl dont define them
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: apmd-3.2.2.orig/apmd.c
+===================================================================
+--- apmd-3.2.2.orig.orig/apmd.c
++++ apmd-3.2.2.orig/apmd.c
+@@ -55,6 +55,14 @@
+ #define MINIMUM_RATE_CALC_TIME  120
+ #endif
+ 
++#ifndef _POSIX_SOURCE
++
++#define	__WCOREFLAG  0200
++#define __WCOREDUMP(x)  (_W_INT(x) & __WCOREFLAG)
++#define	__W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
++
++#endif
++
+ /*
+  * For the verbosity level feature to be useful,
+  * we rely on the fact that syslog.h assigns adjacent
diff --git a/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb b/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
index ea10526..4ff6ad0 100644
--- a/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
+++ b/yocto-poky/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
@@ -13,6 +13,8 @@
            file://legacy.patch \
            file://libtool.patch \
            file://unlinux.patch \
+           file://wexitcode.patch \
+           file://linkage.patch \
            file://init \
            file://default \
            file://apmd_proxy \
@@ -22,6 +24,10 @@
 SRC_URI[tarball.md5sum] = "b1e6309e8331e0f4e6efd311c2d97fa8"
 SRC_URI[tarball.sha256sum] = "7f7d9f60b7766b852881d40b8ff91d8e39fccb0d1d913102a5c75a2dbb52332d"
 
+# for this package we're mostly interested in tracking debian patches,
+# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
+
 S = "${WORKDIR}/apmd-3.2.2.orig"
 
 inherit update-rc.d systemd
@@ -32,6 +38,8 @@
 SYSTEMD_SERVICE_${PN} = "apmd.service"
 SYSTEMD_AUTO_ENABLE = "disable"
 
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
 do_compile() {
 	# apmd doesn't use whole autotools. Just libtool for installation
 	oe_runmake "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" apm apmd
diff --git a/yocto-poky/meta/recipes-bsp/formfactor/files/config b/yocto-poky/meta/recipes-bsp/formfactor/files/config
index 41066de..ecfdf26 100755
--- a/yocto-poky/meta/recipes-bsp/formfactor/files/config
+++ b/yocto-poky/meta/recipes-bsp/formfactor/files/config
@@ -9,7 +9,7 @@
 fi
 
 if [ -z "$HAVE_KEYBOARD" ]; then
-    HAVE_KEYBOARD=0
+    HAVE_KEYBOARD=1
 fi
 
 if [ -z "$HAVE_KEYBOARD_PORTRAIT" ]; then
diff --git a/yocto-poky/meta/recipes-bsp/formfactor/files/qemumips64/machconfig b/yocto-poky/meta/recipes-bsp/formfactor/files/qemumips64/machconfig
new file mode 100755
index 0000000..56777b6
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/formfactor/files/qemumips64/machconfig
@@ -0,0 +1,10 @@
+HAVE_TOUCHSCREEN=1
+HAVE_KEYBOARD=1
+ 
+DISPLAY_CAN_ROTATE=0
+DISPLAY_ORIENTATION=0
+DISPLAY_WIDTH_PIXELS=640
+DISPLAY_HEIGHT_PIXELS=480
+DISPLAY_BPP=16
+DISPLAY_DPI=150
+#DISPLAY_SUBPIXEL_ORDER=vrgb
diff --git a/yocto-poky/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch b/yocto-poky/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
new file mode 100644
index 0000000..65ddcaf
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/grub/files/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
@@ -0,0 +1,53 @@
+Upstream-Status: Accepted
+CVE: CVE-2015-8370
+Signed-off-by: Awais Belal <awais_belal@mentor.com>
+
+From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001
+From: Hector Marco-Gisbert <hecmargi@upv.es>
+Date: Wed, 16 Dec 2015 04:57:18 +0000
+Subject: Fix security issue when reading username and password
+
+This patch fixes two integer underflows at:
+  * grub-core/lib/crypto.c
+  * grub-core/normal/auth.c
+
+CVE-2015-8370
+
+Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
+Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
+Also-By: Andrey Borzenkov <arvidjaar@gmail.com>
+---
+diff --git a/grub-core/lib/crypto.c b/grub-core/lib/crypto.c
+index 010e550..683a8aa 100644
+--- a/grub-core/lib/crypto.c
++++ b/grub-core/lib/crypto.c
+@@ -470,7 +470,8 @@ grub_password_get (char buf[], unsigned buf_size)
+ 
+       if (key == '\b')
+ 	{
+-	  cur_len--;
++	  if (cur_len)
++	    cur_len--;
+ 	  continue;
+ 	}
+ 
+diff --git a/grub-core/normal/auth.c b/grub-core/normal/auth.c
+index c6bd96e..8615c48 100644
+--- a/grub-core/normal/auth.c
++++ b/grub-core/normal/auth.c
+@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned buf_size)
+ 
+       if (key == '\b')
+ 	{
+-	  cur_len--;
+-	  grub_printf ("\b");
++	  if (cur_len)
++	    {
++	      cur_len--;
++	      grub_printf ("\b");
++	    }
+ 	  continue;
+ 	}
+ 
+--
+cgit v0.9.0.2
diff --git a/yocto-poky/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch b/yocto-poky/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch
deleted file mode 100644
index 46aaa97..0000000
--- a/yocto-poky/meta/recipes-bsp/grub/files/0001-Fix-build-with-glibc-2.20.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 275fe0269ecc00af4788afaf9dc151a50b25645b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 28 Aug 2014 19:26:14 -0700
-Subject: [PATCH] Fix build with glibc 2.20
-
-* grub-core/kern/emu/hostfs.c: squahes below warning
-  warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Submitted
-
----
- grub-core/kern/emu/hostfs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grub-core/kern/emu/hostfs.c b/grub-core/kern/emu/hostfs.c
-index 7e725f6..8dd8e65 100644
---- a/grub-core/kern/emu/hostfs.c
-+++ b/grub-core/kern/emu/hostfs.c
-@@ -19,7 +19,7 @@
- 
- #include <config-util.h>
- 
--#define _BSD_SOURCE
-+#define _DEFAULT_SOURCE
- #include <grub/fs.h>
- #include <grub/file.h>
- #include <grub/disk.h>
--- 
-2.1.0
-
diff --git a/yocto-poky/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch b/yocto-poky/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
new file mode 100644
index 0000000..9eabce9
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/grub/files/0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch
@@ -0,0 +1,81 @@
+From 3bac4caa2bc64db313aaee54fffb90383e118517 Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Thu, 22 Jan 2015 19:54:36 +0100
+Subject: [PATCH] Remove direct _llseek code and require long filesystem libc.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Backport
+ configure.ac                    |  8 ++++++++
+ grub-core/osdep/unix/hostdisk.c | 24 ------------------------
+ 4 files changed, 13 insertions(+), 24 deletions(-)
+
+Index: grub-2.00/configure.ac
+===================================================================
+--- grub-2.00.orig/configure.ac
++++ grub-2.00/configure.ac
+@@ -306,6 +306,14 @@ if test x$grub_cv_apple_cc = xyes ; then
+   HOST_LDFLAGS="$HOST_LDFLAGS -Wl,-allow_stack_execute"
+ fi
+ 
++case "$host_os" in
++  cygwin | windows* | mingw32* | aros*)
++     ;;
++  *)
++     AC_CHECK_SIZEOF(off_t)
++     test x"$ac_cv_sizeof_off_t" = x8 || AC_MSG_ERROR([Large file support is required]);;
++esac
++
+ if test x$USE_NLS = xno; then
+   HOST_CFLAGS="$HOST_CFLAGS -fno-builtin-gettext"
+ fi
+Index: grub-2.00/grub-core/kern/emu/hostdisk.c
+===================================================================
+--- grub-2.00.orig/grub-core/kern/emu/hostdisk.c
++++ grub-2.00/grub-core/kern/emu/hostdisk.c
+@@ -44,11 +44,6 @@
+ #ifdef __linux__
+ # include <sys/ioctl.h>         /* ioctl */
+ # include <sys/mount.h>
+-# if !defined(__GLIBC__) || \
+-        ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))
+-/* Maybe libc doesn't have large file support.  */
+-#  include <linux/unistd.h>     /* _llseek */
+-# endif /* (GLIBC < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR < 1)) */
+ # ifndef BLKFLSBUF
+ #  define BLKFLSBUF     _IO (0x12,97)   /* flush buffer cache */
+ # endif /* ! BLKFLSBUF */
+@@ -761,25 +756,6 @@ linux_find_partition (char *dev, grub_di
+ }
+ #endif /* __linux__ */
+ 
+-#if defined(__linux__) && (!defined(__GLIBC__) || \
+-        ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))))
+-  /* Maybe libc doesn't have large file support.  */
+-grub_err_t
+-grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
+-{
+-  loff_t offset, result;
+-  static int _llseek (uint filedes, ulong hi, ulong lo,
+-		      loff_t *res, uint wh);
+-  _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo,
+-	     loff_t *, res, uint, wh);
+-
+-  offset = (loff_t) off;
+-  if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET))
+-    return grub_error (GRUB_ERR_BAD_DEVICE, N_("cannot seek `%s': %s"),
+-		       name, strerror (errno));
+-  return GRUB_ERR_NONE;
+-}
+-#else
+ grub_err_t
+ grub_util_fd_seek (int fd, const char *name, grub_uint64_t off)
+ {
+@@ -790,7 +766,6 @@ grub_util_fd_seek (int fd, const char *n
+ 		       name, strerror (errno));
+   return 0;
+ }
+-#endif
+ 
+ static void
+ flush_initial_buffer (const char *os_dev __attribute__ ((unused)))
diff --git a/yocto-poky/meta/recipes-bsp/grub/files/CVE-2015-8370.patch b/yocto-poky/meta/recipes-bsp/grub/files/CVE-2015-8370.patch
deleted file mode 100644
index 78f514e..0000000
--- a/yocto-poky/meta/recipes-bsp/grub/files/CVE-2015-8370.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 451d80e52d851432e109771bb8febafca7a5f1f2 Mon Sep 17 00:00:00 2001
-From: Hector Marco-Gisbert <hecmargi@upv.es>
-Date: Wed, 16 Dec 2015 07:57:18 +0300
-Subject: [PATCH] Fix security issue when reading username and password
-
-This patch fixes two integer underflows at:
-  * grub-core/lib/crypto.c
-  * grub-core/normal/auth.c
-
-CVE-2015-8370
-
-Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
-Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
-Also-By: Andrey Borzenkov <arvidjaar@gmail.com>
-
-Upstream-Status: Backport
-
-http://git.savannah.gnu.org/cgit/grub.git/commit/?id=451d80e52d851432e109771bb8febafca7a5f1f2
-
-CVE: CVE-2015-8370
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- grub-core/lib/crypto.c  | 3 ++-
- grub-core/normal/auth.c | 7 +++++--
- 2 files changed, 7 insertions(+), 3 deletions(-)
-
-Index: git/grub-core/lib/crypto.c
-===================================================================
---- git.orig/grub-core/lib/crypto.c
-+++ git/grub-core/lib/crypto.c
-@@ -458,7 +458,8 @@ grub_password_get (char buf[], unsigned
- 
-       if (key == '\b')
- 	{
--	  cur_len--;
-+	  if (cur_len)
-+	    cur_len--;
- 	  continue;
- 	}
- 
-Index: git/grub-core/normal/auth.c
-===================================================================
---- git.orig/grub-core/normal/auth.c
-+++ git/grub-core/normal/auth.c
-@@ -174,8 +174,11 @@ grub_username_get (char buf[], unsigned
- 
-       if (key == '\b')
- 	{
--	  cur_len--;
--	  grub_printf ("\b");
-+	  if (cur_len)
-+	    {
-+	      cur_len--;
-+	      grub_printf ("\b");
-+	    }
- 	  continue;
- 	}
- 
diff --git a/yocto-poky/meta/recipes-bsp/grub/files/fix-texinfo.patch b/yocto-poky/meta/recipes-bsp/grub/files/fix-texinfo.patch
new file mode 100644
index 0000000..b911d73
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/grub/files/fix-texinfo.patch
@@ -0,0 +1,32 @@
+The tarball has a texi file that doesn't parse with current texinfo, so if it's
+being re-generated the build will fail.  Take a patch from upstream to fix the
+texi.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From d4c4b8e1a085f92afcec36f6e590c6dfc51d0a1c Mon Sep 17 00:00:00 2001
+From: Bryan Hundven <bryanhundven@gmail.com>
+Date: Mon, 08 Apr 2013 13:23:07 +0000
+Subject: 	* docs/grub-dev.texi: Move @itemize after @subsection to satisfy
+
+	texinfo-5.1.
+---
+(limited to 'docs/grub-dev.texi')
+
+diff --git a/docs/grub-dev.texi b/docs/grub-dev.texi
+index a4a3820..f74c966 100644
+--- a/docs/grub-dev.texi
++++ b/docs/grub-dev.texi
+@@ -1394,8 +1394,8 @@ grub_video_blit_glyph (&glyph, color, 0, 0);
+ 
+ @node Bitmap API
+ @section Bitmap API
+-@itemize
+ @subsection grub_video_bitmap_create
++@itemize
+ @item Prototype:
+ @example
+ grub_err_t grub_video_bitmap_create (struct grub_video_bitmap **bitmap, unsigned int width, unsigned int height, enum grub_video_blit_format blit_format)
+--
+cgit v0.9.0.2
diff --git a/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.00.bb b/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.00.bb
index 7b44eab..5a0dc95 100644
--- a/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.00.bb
+++ b/yocto-poky/meta/recipes-bsp/grub/grub-efi_2.00.bb
@@ -33,6 +33,12 @@
                 --enable-efiemu=no --program-prefix='' \
                 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile', '--disable-largefile', d)}"
+
+# ldm.c:114:7: error: trampoline generated for nested function 'hook' [-Werror=trampolines]
+# and many other places in the grub code when compiled with some native gcc compilers (specifically, gentoo)
+CFLAGS_append_class-native = " -Wno-error=trampolines"
+
 do_install_class-native() {
 	install -d ${D}${bindir}
 	install -m 755 grub-mkimage ${D}${bindir}
@@ -55,9 +61,6 @@
 
 addtask deploy after do_install before do_build
 
-FILES_${PN}-dbg += "${libdir}/grub/${GRUB_TARGET}-efi/.debug \
-                   /boot/efi/EFI/BOOT/${GRUB_TARGET}-efi/.debug \
-                    "
 FILES_${PN} += "${libdir}/grub/${GRUB_TARGET}-efi \
                 ${datadir}/grub \
                 "
diff --git a/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch b/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
new file mode 100644
index 0000000..87ec29e
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
@@ -0,0 +1,46 @@
+From fb7b827a56b1f92f882d0f5ef130acc968b23293 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jan 2016 19:17:31 +0000
+Subject: [PATCH] Disable -mfpmath=sse as well when SSE is disabled
+
+Fixes
+
+configure:20574: i586-poky-linux-gcc  -m32    -march=core2 -msse3
+-mtune=generic -mfpmath=sse
+--sysroot=/usr/local/dev/yocto/grubtest2/build/tmp/sysroots/emenlow -o
+conftest -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow
+-Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g
+-falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse
+-mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector
+-mno-stack-arg-probe -Werror -nostdlib -Wl,--defsym,___main=0x8100
+-Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include
+-DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -Wl,-O1
+-Wl,--hash-style=gnu -Wl,--as-needed conftest.c  >&5
+conftest.c:1:0: error: SSE instruction set disabled, using 387
+arithmetics [-Werror]
+cc1: all warnings being treated as errors
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 26d2f33..9ce56de 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -783,7 +783,7 @@ fi
+ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
+   # Some toolchains enable these features by default, but they need
+   # registers that aren't set up properly in GRUB.
+-  TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow"
++  TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mfpmath=387"
+ fi
+ 
+ # GRUB doesn't use float or doubles at all. Yet some toolchains may decide
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch b/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
new file mode 100644
index 0000000..d5bfaa1
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/grub/grub-git/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
@@ -0,0 +1,56 @@
+From b512c77222a8b133d7dd71a0dcef081a921d97d4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jan 2016 19:28:00 +0000
+Subject: [PATCH] grub.d/10_linux.in: add oe's kernel name
+
+Our kernel's name is bzImage, we need add it to grub.d/10_linux.in so
+that the grub-mkconfig and grub-install can work correctly.
+
+We only need add the bzImage to util/grub.d/10_linux.in, but also add it
+to util/grub.d/20_linux_xen.in to keep compatibility.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate [OE specific]
+
+ util/grub.d/10_linux.in     | 6 +++---
+ util/grub.d/20_linux_xen.in | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+index 859b608..946be5d 100644
+--- a/util/grub.d/10_linux.in
++++ b/util/grub.d/10_linux.in
+@@ -148,12 +148,12 @@ machine=`uname -m`
+ case "x$machine" in
+     xi?86 | xx86_64)
+ 	list=
+-	for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
++	for i in /boot/bzImage-* /bzImage-* /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
+ 	    if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
+ 	done ;;
+-    *) 
++    *)
+ 	list=
+-	for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
++	for i in /boot/bzImage-* /boot/vmlinuz-* /boot/vmlinux-* /bzImage-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
+                   if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
+ 	done ;;
+ esac
+diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
+index f532fb9..1994244 100644
+--- a/util/grub.d/20_linux_xen.in
++++ b/util/grub.d/20_linux_xen.in
+@@ -138,7 +138,7 @@ EOF
+ }
+ 
+ linux_list=
+-for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
++for i in /boot/bzImage[xz]-* /bzImage[xz]-* /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
+     if grub_file_is_not_garbage "$i"; then
+     	basename=$(basename $i)
+ 	version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-bsp/grub/grub2.inc b/yocto-poky/meta/recipes-bsp/grub/grub2.inc
index fe2407c..146dde6 100644
--- a/yocto-poky/meta/recipes-bsp/grub/grub2.inc
+++ b/yocto-poky/meta/recipes-bsp/grub/grub2.inc
@@ -27,10 +27,12 @@
            file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
            file://0001-parse_dhcp_vendor-Add-missing-const-qualifiers.patch \
            file://grub2-fix-initrd-size-bug.patch \
-           file://CVE-2015-8370.patch \
+           file://0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch \
+           file://0001-Remove-direct-_llseek-code-and-require-long-filesyst.patch \
+           file://fix-texinfo.patch \
             "
 
-DEPENDS = "flex-native bison-native xz"
+DEPENDS = "flex-native bison-native"
 
 SRC_URI[md5sum] = "e927540b6eda8b024fb0391eeaa4091c"
 SRC_URI[sha256sum] = "65b39a0558f8c802209c574f4d02ca263a804e8a564bc6caf1cd0fd3b3cc11e3"
@@ -43,10 +45,25 @@
 PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
 PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,lvm2"
 
+# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
+# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
+# with that. Note that since BUILD_CFLAGS etc are not used by grub2 target
+# builds, it's safe to clear them unconditionally for both target and native.
+BUILD_CPPFLAGS = ""
+BUILD_CFLAGS = ""
+BUILD_CXXFLAGS = ""
+BUILD_LDFLAGS = ""
+
+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
+}
+
 # grub and grub-efi's sysroot/${datadir}/grub/grub-mkconfig_lib are
 # conflicted, remove it since no one uses it.
 SYSROOT_PREPROCESS_FUNCS_class-target += "remove_sysroot_mkconfig_lib"
 remove_sysroot_mkconfig_lib() {
     rm -r "${SYSROOT_DESTDIR}${datadir}/grub/grub-mkconfig_lib"
 }
-
diff --git a/yocto-poky/meta/recipes-bsp/grub/grub_2.00.bb b/yocto-poky/meta/recipes-bsp/grub/grub_2.00.bb
index 88a709e..778074a 100644
--- a/yocto-poky/meta/recipes-bsp/grub/grub_2.00.bb
+++ b/yocto-poky/meta/recipes-bsp/grub/grub_2.00.bb
@@ -3,12 +3,11 @@
 RDEPENDS_${PN} = "diffutils freetype"
 PR = "r1"
 
-FILES_${PN}-dbg += "${libdir}/${BPN}/i386-pc/.debug"
-
-
 EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
                --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile', '--disable-largefile', d)}"
+
 do_install_append () {
     install -d ${D}${sysconfdir}/grub.d
 }
diff --git a/yocto-poky/meta/recipes-bsp/grub/grub_git.bb b/yocto-poky/meta/recipes-bsp/grub/grub_git.bb
index c2760c9..6919c9a 100644
--- a/yocto-poky/meta/recipes-bsp/grub/grub_git.bb
+++ b/yocto-poky/meta/recipes-bsp/grub/grub_git.bb
@@ -5,13 +5,14 @@
 DEFAULT_PREFERENCE = "-1"
 DEFAULT_PREFERENCE_arm = "1"
 
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/grub-git:"
+
 PV = "2.00+${SRCPV}"
-SRCREV = "87de66d9d83446ecddb29cfbdf7369102c8e209e"
+SRCREV = "b95e92678882f56056c64ae29092bc9cf129905f"
 SRC_URI = "git://git.savannah.gnu.org/grub.git \
-           file://grub-2.00-fpmath-sse-387-fix.patch \
+           file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
            file://autogen.sh-exclude-pc.patch \
-           file://grub-2.00-add-oe-kernel.patch \
-           file://0001-Fix-build-with-glibc-2.20.patch \
+           file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
           "
 
 S = "${WORKDIR}/git"
@@ -30,6 +31,8 @@
 EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont --program-prefix="" \
                 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"
 
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '--enable-largefile', '--disable-largefile', d)}"
+
 do_configure_prepend() {
     ( cd ${S}
       ${S}/autogen.sh )
@@ -37,14 +40,13 @@
 
 do_install_append () {
     install -d ${D}${sysconfdir}/grub.d
- 
+    rm -rf ${D}${libdir}/charset.alias
 }
 
 # debugedit chokes on bare metal binaries
 INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
 
 RDEPENDS_${PN} = "diffutils freetype"
-FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
 
 INSANE_SKIP_${PN} = "arch"
 INSANE_SKIP_${PN}-dbg = "arch"
diff --git a/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb b/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
index bf302f3..6dc66ea 100644
--- a/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
+++ b/yocto-poky/meta/recipes-bsp/libacpi/libacpi_0.2.bb
@@ -16,12 +16,14 @@
 SRC_URI[md5sum] = "05b53dd7bead66dda35fec502b91066c"
 SRC_URI[sha256sum] = "13086e31d428b9c125954d48ac497b754bbbce2ef34ea29ecd903e82e25bad29"
 
+UPSTREAM_CHECK_URI = "http://www.ngolde.de/libacpi.html"
+
 inherit lib_package
 
 COMPATIBLE_HOST = '(x86_64|i.86).*-(linux|freebsd.*)'
 
 CFLAGS += "-fPIC"
-EXTRA_OEMAKE += 'STRIP="echo"'
+EXTRA_OEMAKE = '-e MAKEFLAGS= STRIP="echo"'
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
diff --git a/yocto-poky/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/yocto-poky/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
index e0ce57d..4b349be 100644
--- a/yocto-poky/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
+++ b/yocto-poky/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
@@ -24,6 +24,8 @@
 SRC_URI[md5sum] = "b5ce6a74abc9b9eb2af94dffdfd372a4"
 SRC_URI[sha256sum] = "c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1"
 
+UPSTREAM_CHECK_URI = "http://ohse.de/uwe/software/lrzsz.html"
+
 inherit autotools gettext
 
 do_install() {
diff --git a/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.3.1.bb b/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.3.1.bb
deleted file mode 100644
index 91a8cd3..0000000
--- a/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.3.1.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "PCI utilities"
-DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
-to PCI bus configuration space and several utilities based on this library.'
-HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
-SECTION = "console/utils"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-DEPENDS = "zlib kmod"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
-           file://configure.patch \
-           file://guess-fix.patch \
-           file://makefile.patch"
-
-SRC_URI[md5sum] = "4c340a317987d61a11ee2cf139ef1191"
-SRC_URI[sha256sum] = "514a3bdb77e4cdbe9e970e1885af46e0ba2011bf97364368c455ade0edd4e3a9"
-
-inherit multilib_header
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
-PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
-
-PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes"
-
-# see configure.patch
-do_configure () {
-	(
-	  cd lib && \
-	  # EXTRA_OECONF for this recipe could only possibly contain 'HWDB=yes/no', so we put it
-	  # before ./configure
-	  ${PCI_CONF_FLAG} ${EXTRA_OECONF} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
-	)
-}
-
-export PREFIX = "${prefix}"
-export SBINDIR = "${sbindir}"
-export SHAREDIR = "${datadir}"
-export MANDIR = "${mandir}"
-
-EXTRA_OEMAKE += "${PCI_CONF_FLAG}"
-
-# The configure script breaks if the HOST variable is set
-HOST[unexport] = "1"
-
-do_install () {
-	oe_runmake DESTDIR=${D} install install-lib
-
-	install -d ${D}${bindir}
-	ln -s ../sbin/lspci ${D}${bindir}/lspci
-
-	oe_multilib_header pci/config.h
-}
-
-PACKAGES =+ "${PN}-ids libpci"
-FILES_${PN}-ids = "${datadir}/pci.ids*"
-FILES_libpci = "${libdir}/libpci.so.*"
-SUMMARY_${PN}-ids = "PCI utilities - device ID database"
-DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
-RDEPENDS_${PN} += "${PN}-ids"
diff --git a/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.4.1.bb b/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.4.1.bb
new file mode 100644
index 0000000..33be525
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/pciutils/pciutils_3.4.1.bb
@@ -0,0 +1,60 @@
+SUMMARY = "PCI utilities"
+DESCRIPTION = 'The PCI Utilities package contains a library for portable access \
+to PCI bus configuration space and several utilities based on this library.'
+HOMEPAGE = "http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml"
+SECTION = "console/utils"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+DEPENDS = "zlib kmod"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/utils/pciutils/pciutils-${PV}.tar.xz \
+           file://configure.patch \
+           file://guess-fix.patch \
+           file://makefile.patch"
+
+SRC_URI[md5sum] = "35763bb1eab7bc9bf6eb6efb72cbc8a1"
+SRC_URI[sha256sum] = "865554cc5604d1644bd8da38d94845405e2a319a6d5acabc6a0296417684a82a"
+
+inherit multilib_header
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'hwdb', '', d)}"
+PACKAGECONFIG[hwdb] = "HWDB=yes,HWDB=no,udev"
+
+PCI_CONF_FLAG = "ZLIB=yes DNS=yes SHARED=yes"
+
+# see configure.patch
+do_configure () {
+	(
+	  cd lib && \
+	  # EXTRA_OECONF for this recipe could only possibly contain 'HWDB=yes/no', so we put it
+	  # before ./configure
+	  ${PCI_CONF_FLAG} ${EXTRA_OECONF} ./configure ${PV} ${datadir} ${TARGET_OS} ${TARGET_ARCH}
+	)
+}
+
+export PREFIX = "${prefix}"
+export SBINDIR = "${sbindir}"
+export SHAREDIR = "${datadir}"
+export MANDIR = "${mandir}"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS= ${PCI_CONF_FLAG}"
+
+# The configure script breaks if the HOST variable is set
+HOST[unexport] = "1"
+
+do_install () {
+	oe_runmake DESTDIR=${D} install install-lib
+
+	install -d ${D}${bindir}
+	ln -s ../sbin/lspci ${D}${bindir}/lspci
+
+	oe_multilib_header pci/config.h
+}
+
+PACKAGES =+ "${PN}-ids libpci"
+FILES_${PN}-ids = "${datadir}/pci.ids*"
+FILES_libpci = "${libdir}/libpci.so.*"
+SUMMARY_${PN}-ids = "PCI utilities - device ID database"
+DESCRIPTION_${PN}-ids = "Package providing the PCI device ID database for pciutils."
+RDEPENDS_${PN} += "${PN}-ids"
diff --git a/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/0001-fix-a-parallel-building-issue.patch b/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/0001-fix-a-parallel-building-issue.patch
deleted file mode 100644
index 7b01040..0000000
--- a/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/0001-fix-a-parallel-building-issue.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 5a793a1a9fb3477719aabf7e27ff22ed1acdf559 Mon Sep 17 00:00:00 2001
-From: Roy Li <rongqing.li@windriver.com>
-Date: Tue, 19 May 2015 15:54:24 +0800
-Subject: [PATCH] fix a parallel building issue
-
-Fixed:
-|   src/lex_config.c:34:25: fatal error: yacc_config.h: No such file or directory
-|
-|    #include "yacc_config.h"
-|                            ^
-|   compilation terminated.
-
-And:
-Compiling lex_config.c.
-  src/lex_config.l:34:25: fatal error: yacc_config.h: No such file or directory
-
-Upstream-Status: Pending
-
-there are two Makefile rules to generate lex_config.o, one is to generate
-lex_config.o other is to generate src/lex_config.o, so we can remove one.
-and add the needed dependence for lex_config.o
-
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- Makefile | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index d45fdc3..4c53bc2 100644
---- a/Makefile
-+++ b/Makefile
-@@ -246,8 +246,7 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/startup.o src/yacc_config.o src/lex_config
- 	$(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) src/startup.o src/yacc_config.o src/lex_config.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
- 	$(QUIET) $(STRIPCMD) $@
- 
--yacc_config.o lex_config.o: %.o: %.c
--	$(CC) -c -MD -O -pipe $(CPPFLAGS) $<
-+src/lex_config.o:src/yacc_config.h
- 
- debugtools: ccdv $(CBDUMP) $(CISDUMP)
- 
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch b/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch
new file mode 100644
index 0000000..d4c2bed
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/lex_sys_types.patch
@@ -0,0 +1,21 @@
+Include sys/types.h for u_long definition
+
+Fix errors like
+In file included from src/lex_config.l:34:0:
+src/yacc_config.y:45:5: error: unknown type name 'u_long'
+     u_long num;
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: pcmciautils-018/src/lex_config.l
+===================================================================
+--- pcmciautils-018.orig/src/lex_config.l
++++ pcmciautils-018/src/lex_config.l
+@@ -22,6 +22,7 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <syslog.h>
++#include <sys/types.h>
+ 
+ #ifdef HAS_WORDEXP
+ #include <wordexp.h>
diff --git a/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch b/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch
new file mode 100644
index 0000000..f5a518f
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils-018/makefile_race.patch
@@ -0,0 +1,43 @@
+"make src/lex_config.o"
+
+results in:
+
+src/lex_config.l:35:25: fatal error: yacc_config.h: No such file or directory
+
+so add missing dependency through a missing rule. Also remove a rule which
+doesn't appear to do anything.
+
+RP
+2016/1/31
+
+Upstream-Status: Pending
+
+Index: pcmciautils-018/Makefile
+===================================================================
+--- pcmciautils-018.orig/Makefile
++++ pcmciautils-018/Makefile
+@@ -249,6 +249,9 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st
+ yacc_config.o lex_config.o: %.o: %.c src/yacc_config.h
+ 	$(CC) -c -MD -O -pipe $(CPPFLAGS) $<
+ 
++src/lex_config.o : src/lex_config.c src/yacc_config.h
++	$(QUIET) $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
++
+ debugtools: ccdv $(CBDUMP) $(CISDUMP)
+ 
+ $(CBDUMP): $(LIBC) debug/cbdump.o
+Index: pcmciautils-018/Makefile
+===================================================================
+--- pcmciautils-018.orig/Makefile
++++ pcmciautils-018/Makefile
+@@ -246,8 +246,8 @@ $(PCMCIA_SOCKET_STARTUP): $(LIBC) src/st
+ 	$(QUIET) $(LD) $(LDFLAGS) -o $@ $(CRT0) src/startup.o src/yacc_config.o src/lex_config.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
+ 	$(QUIET) $(STRIPCMD) $@
+ 
+-yacc_config.o lex_config.o: %.o: %.c
+-	$(CC) -c -MD -O -pipe $(CPPFLAGS) $<
++src/lex_config.o : src/lex_config.c src/yacc_config.h ccdv
++	$(QUIET) $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+ 
+ debugtools: ccdv $(CBDUMP) $(CISDUMP)
+ 
diff --git a/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils.inc b/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils.inc
index 9d1c55b..581bff4 100644
--- a/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils.inc
+++ b/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils.inc
@@ -8,7 +8,7 @@
 DEPENDS = "udev sysfsutils flex-native"
 RDEPENDS_${PN} = "udev module-init-tools"
 
-SRC_URI = "http://mirror.linux.org.au/linux/utils/kernel/pcmcia/${BP}.tar.bz2"
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/pcmcia/${BP}.tar.xz"
 
 S = "${WORKDIR}/pcmciautils-${PV}"
 
diff --git a/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb b/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
index 857bd07..3556a45 100644
--- a/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
+++ b/yocto-poky/meta/recipes-bsp/pcmciautils/pcmciautils_018.bb
@@ -1,13 +1,13 @@
 require pcmciautils.inc
 
 SRC_URI += "file://makefile_fix.patch \
-            file://0001-fix-a-parallel-building-issue.patch \
+            file://makefile_race.patch \
+            file://lex_sys_types.patch \
 "
 
-SRC_URI[md5sum] = "5d85669b3440baa4532363da6caaf1b4"
-SRC_URI[sha256sum] = "79e6ae441278e178c07501d492394ed2c0326fdb66894f6d040ec811b0dc8ed5"
+SRC_URI[md5sum] = "885431c3cefb76ffdad8cb985134e996"
+SRC_URI[sha256sum] = "57c27be8f04ef4d535bcfa988567316cc57659fe69068327486dab53791e6558"
 
 PR = "r1"
 
-FILES_${PN}-dbg += "*/udev/.debug */*/udev/.debug"
 FILES_${PN} += "*/udev */*/udev"
diff --git a/yocto-poky/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb b/yocto-poky/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
index 8d35187..27cb3db 100644
--- a/yocto-poky/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
+++ b/yocto-poky/meta/recipes-bsp/pm-utils/pm-utils_1.4.1.bb
@@ -22,5 +22,4 @@
 }
 
 FILES_${PN} += "${libdir}/${BPN}/*"
-FILES_${PN}-dbg += "${libdir}/${BPN}/bin/.debug \
-		    ${datadir}/doc/pm-utils/README.debugging"
+FILES_${PN}-dbg += "${datadir}/doc/pm-utils/README.debugging"
diff --git a/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2015.07.bb b/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2015.07.bb
deleted file mode 100644
index 0df7a05..0000000
--- a/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2015.07.bb
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95"
-SECTION = "bootloader"
-DEPENDS = "mtd-utils"
-
-# This revision corresponds to the tag "v2015.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "33711bdd4a4dce942fb5ae85a68899a8357bdd94"
-
-PV = "v2015.07+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
-
-INSANE_SKIP_${PN} = "already-stripped"
-EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
-EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
-
-inherit uboot-config
-
-do_compile () {
-	oe_runmake ${UBOOT_MACHINE}
-	oe_runmake env
-}
-
-do_install () {
-	install -d ${D}${base_sbindir}
-	install -d ${D}${sysconfdir}
-	install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
-	install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
-	install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
-}
-
-do_install_class-cross () {
-	install -d ${D}${bindir_cross}
-	install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
-	install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
-}
-
-SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross"
-uboot_fw_utils_cross() {
-	sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
-}
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-BBCLASSEXTEND = "cross"
diff --git a/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb b/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
new file mode 100644
index 0000000..dfda5c1
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/u-boot/u-boot-fw-utils_2016.03.bb
@@ -0,0 +1,49 @@
+SUMMARY = "U-Boot bootloader fw_printenv/setenv utilities"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+SECTION = "bootloader"
+DEPENDS = "mtd-utils"
+
+# This revision corresponds to the tag "v2016.03"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
+
+PV = "v2016.03+git${SRCPV}"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
+
+S = "${WORKDIR}/git"
+
+INSANE_SKIP_${PN} = "already-stripped"
+EXTRA_OEMAKE_class-target = 'CROSS_COMPILE=${TARGET_PREFIX} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
+EXTRA_OEMAKE_class-cross = 'ARCH=${TARGET_ARCH} CC="${CC} ${CFLAGS} ${LDFLAGS}" V=1'
+
+inherit uboot-config
+
+do_compile () {
+	oe_runmake ${UBOOT_MACHINE}
+	oe_runmake env
+}
+
+do_install () {
+	install -d ${D}${base_sbindir}
+	install -d ${D}${sysconfdir}
+	install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_printenv
+	install -m 755 ${S}/tools/env/fw_printenv ${D}${base_sbindir}/fw_setenv
+	install -m 0644 ${S}/tools/env/fw_env.config ${D}${sysconfdir}/fw_env.config
+}
+
+do_install_class-cross () {
+	install -d ${D}${bindir_cross}
+	install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_printenv
+	install -m 755 ${S}/tools/env/fw_printenv ${D}${bindir_cross}/fw_setenv
+}
+
+SYSROOT_PREPROCESS_FUNCS_class-cross = "uboot_fw_utils_cross"
+uboot_fw_utils_cross() {
+	sysroot_stage_dir ${D}${bindir_cross} ${SYSROOT_DESTDIR}${bindir_cross}
+}
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+BBCLASSEXTEND = "cross"
diff --git a/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2015.07.bb b/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2015.07.bb
deleted file mode 100644
index ba29bbb..0000000
--- a/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2015.07.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "U-Boot bootloader image creation tool"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95"
-SECTION = "bootloader"
-
-DEPENDS = "openssl"
-
-# This revision corresponds to the tag "v2015.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "33711bdd4a4dce942fb5ae85a68899a8357bdd94"
-
-PV = "v2015.07+git${SRCPV}"
-
-SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
-
-do_compile () {
-	oe_runmake sandbox_defconfig
-	oe_runmake cross_tools NO_SDL=1
-}
-
-do_install () {
-	install -d ${D}${bindir}
-	install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
-	ln -sf uboot-mkimage ${D}${bindir}/mkimage
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb b/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb
new file mode 100644
index 0000000..d5921a0
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.03.bb
@@ -0,0 +1,32 @@
+SUMMARY = "U-Boot bootloader image creation tool"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
+SECTION = "bootloader"
+
+DEPENDS = "openssl"
+
+# This revision corresponds to the tag "v2016.03"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
+
+PV = "v2016.03+git${SRCPV}"
+
+SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OEMAKE = 'CROSS_COMPILE="${TARGET_PREFIX}" CC="${CC} ${CFLAGS} ${LDFLAGS}" STRIP=true V=1'
+
+do_compile () {
+	oe_runmake sandbox_defconfig
+	oe_runmake cross_tools NO_SDL=1
+}
+
+do_install () {
+	install -d ${D}${bindir}
+	install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
+	ln -sf uboot-mkimage ${D}${bindir}/mkimage
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-bsp/u-boot/u-boot.inc b/yocto-poky/meta/recipes-bsp/u-boot/u-boot.inc
index e66ffd1..3ba866d 100644
--- a/yocto-poky/meta/recipes-bsp/u-boot/u-boot.inc
+++ b/yocto-poky/meta/recipes-bsp/u-boot/u-boot.inc
@@ -4,7 +4,7 @@
 PROVIDES = "virtual/bootloader"
 
 LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://Licenses/README;md5=0507cd7da8e7ad6d6701926ec9b84c95"
+LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
 
 SRC_URI = "git://git.denx.de/u-boot.git;branch=master"
 
@@ -50,8 +50,9 @@
 # deploy directory.  For those versions they can set the following variables
 # to allow packaging the SPL.
 SPL_BINARY ?= ""
-SPL_IMAGE ?= "${SPL_BINARY}-${MACHINE}-${PV}-${PR}"
-SPL_SYMLINK ?= "${SPL_BINARY}-${MACHINE}"
+SPL_BINARYNAME ?= "${@os.path.basename(d.getVar("SPL_BINARY", True))}"
+SPL_IMAGE ?= "${SPL_BINARYNAME}-${MACHINE}-${PV}-${PR}"
+SPL_SYMLINK ?= "${SPL_BINARYNAME}-${MACHINE}"
 
 # Additional environment variables or a script can be installed alongside
 # u-boot to be used automatically on boot.  This file, typically 'uEnv.txt'
@@ -166,8 +167,8 @@
                     if [ $j -eq $i ]
                     then
                          install ${S}/${config}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}-${type}-${PV}-${PR}
-                         ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}-${type}
-                         ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARY}
+                         ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}-${type}
+                         ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${D}/boot/${SPL_BINARYNAME}
                     fi
                 done
                 unset  j
@@ -175,7 +176,7 @@
             unset  i
         else
             install ${S}/${SPL_BINARY} ${D}/boot/${SPL_IMAGE}
-            ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARY}
+            ln -sf ${SPL_IMAGE} ${D}/boot/${SPL_BINARYNAME}
         fi
     fi
 
@@ -187,8 +188,6 @@
 }
 
 FILES_${PN} = "/boot ${sysconfdir}"
-# Ensure the split debug part of any elf files are put into dbg
-FILES_${PN}-dbg += "/boot/.debug"
 
 do_deploy () {
     if [ "x${UBOOT_CONFIG}" != "x" ]
@@ -259,9 +258,9 @@
                      if [ $j -eq $i ]
                      then
                          install ${S}/${config}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}-${type}-${PV}-${PR}
-                         rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
-                         ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}-${type}
-                         ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARY}
+                         rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
+                         ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}-${type}
+                         ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_BINARYNAME}
                          ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}-${type}
                          ln -sf ${SPL_IMAGE}-${type}-${PV}-${PR} ${DEPLOYDIR}/${SPL_SYMLINK}
                      fi
@@ -271,8 +270,8 @@
              unset  i
          else
              install ${S}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_IMAGE}
-             rm -f ${DEPLOYDIR}/${SPL_BINARY} ${DEPLOYDIR}/${SPL_SYMLINK}
-             ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARY}
+             rm -f ${DEPLOYDIR}/${SPL_BINARYNAME} ${DEPLOYDIR}/${SPL_SYMLINK}
+             ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_BINARYNAME}
              ln -sf ${SPL_IMAGE} ${DEPLOYDIR}/${SPL_SYMLINK}
          fi
      fi
diff --git a/yocto-poky/meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch b/yocto-poky/meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch
deleted file mode 100644
index dfbcd45..0000000
--- a/yocto-poky/meta/recipes-bsp/u-boot/u-boot/0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch
+++ /dev/null
@@ -1,184 +0,0 @@
-From 92598e1515b2ec3851af1f064075d0457f01272d Mon Sep 17 00:00:00 2001
-From: Zhenhua Luo <zhenhua.luo@freescale.com>
-Date: Mon, 9 Feb 2015 18:33:56 +0800
-Subject: [PATCH] powerpc/cpu/*/u-boot*.lds: remove _GLOBAL_OFFSET_TABLE_
- definition
-Organization: O.S. Systems Software LTDA.
-
-In binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbols defined by PROVIDE in
-u-boot.lds overrides the linker built-in symbols
-(https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=b893397a4b1316610f49819344817715e4305de9),
-so the linker is treating _GLOBAL_OFFSET_TABLE_ as a definition into the .reloc section.
-
-To align with the change of binutils-2.25, the _GLOBAL_OFFSET_TABLE_ symbol
-should not be defined in sections, and the symbols in linker generated .got
-section should be used(https://sourceware.org/ml/binutils/2008-09/msg00122.html).
-
-Fixed the following build errors with binutils-2.25:
-| powerpc-poky-linux-gnuspe-ld.bfd: _GLOBAL_OFFSET_TABLE_ not defined in linker created .got
-
-Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
-
-Upstream-Status: Pending
----
- arch/powerpc/cpu/mpc512x/u-boot.lds          | 1 -
- arch/powerpc/cpu/mpc5xx/u-boot.lds           | 1 -
- arch/powerpc/cpu/mpc5xxx/u-boot.lds          | 1 -
- arch/powerpc/cpu/mpc8260/u-boot.lds          | 1 -
- arch/powerpc/cpu/mpc83xx/u-boot-spl.lds      | 1 -
- arch/powerpc/cpu/mpc83xx/u-boot.lds          | 1 -
- arch/powerpc/cpu/mpc85xx/u-boot-nand.lds     | 1 -
- arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds | 1 -
- arch/powerpc/cpu/mpc85xx/u-boot-spl.lds      | 1 -
- arch/powerpc/cpu/mpc85xx/u-boot.lds          | 1 -
- arch/powerpc/cpu/mpc86xx/u-boot.lds          | 1 -
- arch/powerpc/cpu/ppc4xx/u-boot.lds           | 1 -
- 12 files changed, 12 deletions(-)
-
-diff --git a/arch/powerpc/cpu/mpc512x/u-boot.lds b/arch/powerpc/cpu/mpc512x/u-boot.lds
-index 9658b21..b32f74e 100644
---- a/arch/powerpc/cpu/mpc512x/u-boot.lds
-+++ b/arch/powerpc/cpu/mpc512x/u-boot.lds
-@@ -24,7 +24,6 @@ SECTIONS
-     _GOT2_TABLE_ = .;
-     KEEP(*(.got2))
-     KEEP(*(.got))
--    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-     _FIXUP_TABLE_ = .;
-     KEEP(*(.fixup))
-     *(.fixup)
-diff --git a/arch/powerpc/cpu/mpc5xx/u-boot.lds b/arch/powerpc/cpu/mpc5xx/u-boot.lds
-index 7198465..6a53571 100644
---- a/arch/powerpc/cpu/mpc5xx/u-boot.lds
-+++ b/arch/powerpc/cpu/mpc5xx/u-boot.lds
-@@ -33,7 +33,6 @@ SECTIONS
-     _GOT2_TABLE_ = .;
-     KEEP(*(.got2))
-     KEEP(*(.got))
--    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-     _FIXUP_TABLE_ = .;
-     KEEP(*(.fixup))
-   }
-diff --git a/arch/powerpc/cpu/mpc5xxx/u-boot.lds b/arch/powerpc/cpu/mpc5xxx/u-boot.lds
-index cd9e23f..aa80d3d 100644
---- a/arch/powerpc/cpu/mpc5xxx/u-boot.lds
-+++ b/arch/powerpc/cpu/mpc5xxx/u-boot.lds
-@@ -28,7 +28,6 @@ SECTIONS
-     _GOT2_TABLE_ = .;
-     KEEP(*(.got2))
-     KEEP(*(.got))
--    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-     _FIXUP_TABLE_ = .;
-     KEEP(*(.fixup))
-   }
-diff --git a/arch/powerpc/cpu/mpc8260/u-boot.lds b/arch/powerpc/cpu/mpc8260/u-boot.lds
-index 50cbf85..469fc29 100644
---- a/arch/powerpc/cpu/mpc8260/u-boot.lds
-+++ b/arch/powerpc/cpu/mpc8260/u-boot.lds
-@@ -27,7 +27,6 @@ SECTIONS
-     _GOT2_TABLE_ = .;
-     KEEP(*(.got2))
-     KEEP(*(.got))
--    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-     _FIXUP_TABLE_ = .;
-     KEEP(*(.fixup))
-   }
-diff --git a/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
-index 774772b..4101eaf 100644
---- a/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
-+++ b/arch/powerpc/cpu/mpc83xx/u-boot-spl.lds
-@@ -24,7 +24,6 @@ SECTIONS
- 		_GOT2_TABLE_ = .;
- 		KEEP(*(.got2))
- 		KEEP(*(.got))
--		PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
- 	}
- 	__got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1;
- 
-diff --git a/arch/powerpc/cpu/mpc83xx/u-boot.lds b/arch/powerpc/cpu/mpc83xx/u-boot.lds
-index 3c177fa..dbd8bbe 100644
---- a/arch/powerpc/cpu/mpc83xx/u-boot.lds
-+++ b/arch/powerpc/cpu/mpc83xx/u-boot.lds
-@@ -26,7 +26,6 @@ SECTIONS
-     _GOT2_TABLE_ = .;
-     KEEP(*(.got2))
-     KEEP(*(.got))
--    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-     _FIXUP_TABLE_ = .;
-     KEEP(*(.fixup))
-   }
-diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
-index f933b21..0399f93 100644
---- a/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
-+++ b/arch/powerpc/cpu/mpc85xx/u-boot-nand.lds
-@@ -44,7 +44,6 @@ SECTIONS
-     _GOT2_TABLE_ = .;
-     KEEP(*(.got2))
-     KEEP(*(.got))
--    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-     _FIXUP_TABLE_ = .;
-     KEEP(*(.fixup))
-   }
-diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
-index b83c553..f044564 100644
---- a/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
-+++ b/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds
-@@ -22,7 +22,6 @@ SECTIONS
- 		_GOT2_TABLE_ = .;
- 		KEEP(*(.got2))
- 		KEEP(*(.got))
--		PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
- 		_FIXUP_TABLE_ = .;
- 		KEEP(*(.fixup))
- 	}
-diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
-index 5ae7b3e..889a4c2 100644
---- a/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
-+++ b/arch/powerpc/cpu/mpc85xx/u-boot-spl.lds
-@@ -29,7 +29,6 @@ SECTIONS
- 		_GOT2_TABLE_ = .;
- 		KEEP(*(.got2))
- 		KEEP(*(.got))
--		PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
- 		_FIXUP_TABLE_ = .;
- 		KEEP(*(.fixup))
- 	}
-diff --git a/arch/powerpc/cpu/mpc85xx/u-boot.lds b/arch/powerpc/cpu/mpc85xx/u-boot.lds
-index 2cf0b25..f15eaf3 100644
---- a/arch/powerpc/cpu/mpc85xx/u-boot.lds
-+++ b/arch/powerpc/cpu/mpc85xx/u-boot.lds
-@@ -50,7 +50,6 @@ SECTIONS
-     _GOT2_TABLE_ = .;
-     KEEP(*(.got2))
-     KEEP(*(.got))
--    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-     _FIXUP_TABLE_ = .;
-     KEEP(*(.fixup))
-   }
-diff --git a/arch/powerpc/cpu/mpc86xx/u-boot.lds b/arch/powerpc/cpu/mpc86xx/u-boot.lds
-index 58467c2..6c48f40 100644
---- a/arch/powerpc/cpu/mpc86xx/u-boot.lds
-+++ b/arch/powerpc/cpu/mpc86xx/u-boot.lds
-@@ -32,7 +32,6 @@ SECTIONS
-     _GOT2_TABLE_ = .;
-     KEEP(*(.got2))
-     KEEP(*(.got))
--    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-     _FIXUP_TABLE_ = .;
-     KEEP(*(.fixup))
-   }
-diff --git a/arch/powerpc/cpu/ppc4xx/u-boot.lds b/arch/powerpc/cpu/ppc4xx/u-boot.lds
-index 1980508..55dd4e1 100644
---- a/arch/powerpc/cpu/ppc4xx/u-boot.lds
-+++ b/arch/powerpc/cpu/ppc4xx/u-boot.lds
-@@ -46,7 +46,6 @@ SECTIONS
-     _GOT2_TABLE_ = .;
-     KEEP(*(.got2))
-     KEEP(*(.got))
--    PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4);
-     _FIXUP_TABLE_ = .;
-     KEEP(*(.fixup))
-   }
--- 
-2.4.6
-
diff --git a/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2015.07.bb b/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2015.07.bb
deleted file mode 100644
index 4746c33..0000000
--- a/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2015.07.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require u-boot.inc
-
-DEPENDS += "dtc-native"
-
-# This revision corresponds to the tag "v2015.07"
-# We use the revision in order to avoid having to fetch it from the
-# repo during parse
-SRCREV = "33711bdd4a4dce942fb5ae85a68899a8357bdd94"
-
-SRC_URI += "file://0001-u-boot-mpc85xx-u-boot-.lds-remove-_GLOBAL_OFFSET_TAB.patch"
-
-PV = "v2015.07+git${SRCPV}"
-
-EXTRA_OEMAKE_append = " KCFLAGS=-fgnu89-inline"
diff --git a/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2016.03.bb b/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2016.03.bb
new file mode 100644
index 0000000..836b0ce
--- /dev/null
+++ b/yocto-poky/meta/recipes-bsp/u-boot/u-boot_2016.03.bb
@@ -0,0 +1,10 @@
+require u-boot.inc
+
+DEPENDS += "dtc-native"
+
+# This revision corresponds to the tag "v2016.03"
+# We use the revision in order to avoid having to fetch it from the
+# repo during parse
+SRCREV = "df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa"
+
+PV = "v2016.03+git${SRCPV}"
diff --git a/yocto-poky/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch b/yocto-poky/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch
deleted file mode 100644
index 6455567..0000000
--- a/yocto-poky/meta/recipes-bsp/usbutils/usbutils-008/iconv.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-This patch adds support for detecting iconv support using autotools
-uclibc does not have iconv implementation inside libc like glibc, therefore
-the existing checks were not sufficient, it worked for glibc but not for
-uclibc. The new patch portably detects the iconv support and adds the
-libiconv to linker cmdline
-
-This patch should be submitted upstream too
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: usbutils-008/configure.ac
-===================================================================
---- usbutils-008.orig/configure.ac
-+++ usbutils-008/configure.ac
-@@ -10,7 +10,9 @@ AC_USE_SYSTEM_EXTENSIONS
- AC_SYS_LARGEFILE
- 
- AC_CHECK_HEADERS([byteswap.h])
--AC_CHECK_FUNCS([nl_langinfo iconv])
-+
-+AM_GNU_GETTEXT
-+AM_ICONV
- 
- PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0)
- 
-Index: usbutils-008/Makefile.am
-===================================================================
---- usbutils-008.orig/Makefile.am
-+++ usbutils-008/Makefile.am
-@@ -29,7 +29,8 @@ lsusb_CPPFLAGS = \
- 
- lsusb_LDADD = \
- 	$(LIBUSB_LIBS) \
--	$(UDEV_LIBS)
-+	$(UDEV_LIBS) \
-+	$(LIBICONV)
- 
- man_MANS = \
- 	lsusb.8	\
diff --git a/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch b/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch
index c557334..6455567 100644
--- a/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch
+++ b/yocto-poky/meta/recipes-bsp/usbutils/usbutils/iconv.patch
@@ -10,10 +10,10 @@
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
-Index: usbutils-007/configure.ac
+Index: usbutils-008/configure.ac
 ===================================================================
---- usbutils-007.orig/configure.ac
-+++ usbutils-007/configure.ac
+--- usbutils-008.orig/configure.ac
++++ usbutils-008/configure.ac
 @@ -10,7 +10,9 @@ AC_USE_SYSTEM_EXTENSIONS
  AC_SYS_LARGEFILE
  
@@ -23,18 +23,19 @@
 +AM_GNU_GETTEXT
 +AM_ICONV
  
- AC_ARG_ENABLE(zlib,
- 	AS_HELP_STRING(--disable-zlib,disable support for zlib))
-Index: usbutils-007/Makefile.am
+ PKG_CHECK_MODULES(LIBUSB, libusb-1.0 >= 1.0.0)
+ 
+Index: usbutils-008/Makefile.am
 ===================================================================
---- usbutils-007.orig/Makefile.am
-+++ usbutils-007/Makefile.am
-@@ -27,7 +27,7 @@ lsusb_CPPFLAGS = \
- 	-DDATADIR=\"$(datadir)\"
+--- usbutils-008.orig/Makefile.am
++++ usbutils-008/Makefile.am
+@@ -29,7 +29,8 @@ lsusb_CPPFLAGS = \
  
  lsusb_LDADD = \
--	$(LIBUSB_LIBS)
-+	$(LIBUSB_LIBS) $(LIBICONV)
+ 	$(LIBUSB_LIBS) \
+-	$(UDEV_LIBS)
++	$(UDEV_LIBS) \
++	$(LIBICONV)
  
- if HAVE_ZLIB
- lsusb_CPPFLAGS += -DHAVE_LIBZ
+ man_MANS = \
+ 	lsusb.8	\
diff --git a/yocto-poky/meta/recipes-bsp/usbutils/usbutils_007.bb b/yocto-poky/meta/recipes-bsp/usbutils/usbutils_007.bb
deleted file mode 100644
index b93b2bd..0000000
--- a/yocto-poky/meta/recipes-bsp/usbutils/usbutils_007.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Host side USB console utilities"
-DESCRIPTION = "Contains the lsusb utility for inspecting the devices connected to the USB bus."
-HOMEPAGE = "http://www.linux-usb.org"
-SECTION = "base"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-DEPENDS = "libusb zlib virtual/libiconv"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
-           file://usb-devices-avoid-dependency-on-bash.patch \
-           file://Fix-NULL-pointer-crash.patch \
-           file://iconv.patch \
-          "
-
-SRC_URI[md5sum] = "be6c42294be5c940f208190d3479d50c"
-SRC_URI[sha256sum] = "e65c234cadf7c81b6b1567c440e3b9b31b44f51c27df3e45741b88848d8b37d3"
-
-inherit autotools gettext pkgconfig
-
-do_install_append() {
-	# We only need the compressed copy, remove the uncompressed version
-	rm -f ${D}${datadir}/usb.ids
-}
-
-PACKAGES += "${PN}-ids"
-FILES_${PN}-dev += "${datadir}/pkgconfig"
-FILES_${PN}-ids = "${datadir}/usb*"
-
-RDEPENDS_${PN} = "${PN}-ids"
diff --git a/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb b/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb
index 0f2d8d4..75312c3 100644
--- a/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb
+++ b/yocto-poky/meta/recipes-bsp/usbutils/usbutils_008.bb
@@ -6,7 +6,7 @@
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
-DEPENDS = "libusb zlib virtual/libiconv systemd"
+DEPENDS = "libusb zlib virtual/libiconv udev"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/usb/usbutils/usbutils-${PV}.tar.gz \
            file://usb-devices-avoid-dependency-on-bash.patch \
@@ -18,9 +18,6 @@
 SRC_URI[sha256sum] = "6d5f16c2961df37e22e492c736a3e162a8fde24480f23a40d85f79af80d3fe95"
 
 inherit autotools gettext pkgconfig distro_features_check
-# This version of usbutils relies on the udev from systemd, so unless 
-# we can decouple udev from system, we require systemd for now.
-REQUIRED_DISTRO_FEATURES = "systemd"
 
 FILES_${PN}-dev += "${datadir}/pkgconfig"
 
diff --git a/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb b/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
deleted file mode 100644
index 0d42b90..0000000
--- a/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.31.bb
+++ /dev/null
@@ -1,73 +0,0 @@
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-                    file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
-                    file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
-                    file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
-                    file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
-
-require avahi.inc
-
-inherit python-dir pythonnative distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-PACKAGECONFIG ??= "python"
-PACKAGECONFIG[python] = "--enable-python,--disable-python,python-native python"
-
-PR = "${INC_PR}.0"
-
-SRC_URI[md5sum] = "2f22745b8f7368ad5a0a3fddac343f2d"
-SRC_URI[sha256sum] = "8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48"
-
-DEPENDS += "avahi gtk+ libglade"
-
-AVAHI_GTK = "--enable-gtk --disable-gtk3"
-
-S = "${WORKDIR}/avahi-${PV}"
-
-PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc python-avahi avahi-discover avahi-discover-standalone"
-
-FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
-FILES_${PN}-dbg += "${libdir}/.debug/libavah-ui*"
-FILES_${PN}-dev += "${libdir}/libavahi-ui${SOLIBSDEV}"
-FILES_${PN}-staticdev += "${libdir}/libavahi-ui.a"
-
-FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
-
-FILES_python-avahi = "${PYTHON_SITEPACKAGES_DIR}/avahi ${PYTHON_SITEPACKAGES_DIR}/avahi_discover"
-FILES_avahi-discover = "${bindir}/avahi-discover \
-                        ${datadir}/applications/avahi-discover.desktop \
-                        ${datadir}/avahi/interfaces/avahi-discover*"
-FILES_avahi-discover-standalone = "${bindir}/avahi-discover-standalone \
-                                   ${datadir}/avahi/interfaces/avahi-discover.glade"
-
-RDEPENDS_avahi-discover = "python-avahi python-pygtk"
-RDEPENDS_python-avahi = "python-core python-dbus"
-
-
-do_install_append () {
-	rm ${D}${sysconfdir} -rf
-	rm ${D}${base_libdir} -rf
-	rm ${D}${systemd_unitdir} -rf
-	# The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
-	# but not ${base_libdir} here. And the /lib may not exist
-	# whithout systemd.
-	[ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
-	rm ${D}${bindir}/avahi-b*
-	rm ${D}${bindir}/avahi-p*
-	rm ${D}${bindir}/avahi-r*
-	rm ${D}${bindir}/avahi-s*
-	rm ${D}${includedir}/avahi-c* -rf
-	rm ${D}${includedir}/avahi-g* -rf
-	rm ${D}${libdir}/libavahi-c*
-	rm ${D}${libdir}/libavahi-g*
-	rm ${D}${libdir}/pkgconfig/avahi-c*
-	rm ${D}${libdir}/pkgconfig/avahi-g*
-	rm ${D}${sbindir} -rf
-	rm ${D}${datadir}/avahi/a*
-	rm ${D}${datadir}/avahi/s*
-	rm ${D}${datadir}/locale/ -rf
-	rm ${D}${datadir}/dbus* -rf
-	rm ${D}${mandir}/man1/a*
-	rm ${D}${mandir}/man5 -rf
-	rm ${D}${mandir}/man8 -rf
-}
-
diff --git a/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb b/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
new file mode 100644
index 0000000..3966b4c
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/avahi/avahi-ui_0.6.32.bb
@@ -0,0 +1,70 @@
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+                    file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
+                    file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
+                    file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
+                    file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
+
+require avahi.inc
+
+inherit python-dir pythonnative distro_features_check
+ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+
+PACKAGECONFIG ??= "dbus python"
+PACKAGECONFIG[python] = "--enable-python,--disable-python,python-native python"
+
+SRC_URI[md5sum] = "22b5e705d3eabb31d26f2e1e7b074013"
+SRC_URI[sha256sum] = "d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454"
+
+DEPENDS += "avahi gtk+ libglade"
+
+AVAHI_GTK = "--enable-gtk --disable-gtk3 --disable-pygtk"
+
+S = "${WORKDIR}/avahi-${PV}"
+
+PACKAGES = "${PN} ${PN}-utils ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc python-avahi avahi-discover"
+
+FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
+FILES_${PN}-dev += "${libdir}/libavahi-ui${SOLIBSDEV}"
+FILES_${PN}-staticdev += "${libdir}/libavahi-ui.a"
+
+FILES_${PN}-utils = "${bindir}/b* ${datadir}/applications/b*"
+
+FILES_python-avahi = "${PYTHON_SITEPACKAGES_DIR}/avahi ${PYTHON_SITEPACKAGES_DIR}/avahi_discover"
+FILES_avahi-discover = "${datadir}/applications/avahi-discover.desktop \
+                        ${datadir}/avahi/interfaces/avahi-discover* \
+                        ${bindir}/avahi-discover-standalone \
+                        ${datadir}/avahi/interfaces/avahi-discover.glade"
+
+RDEPENDS_python-avahi = "python-core python-dbus"
+
+
+do_install_append () {
+	rm ${D}${sysconfdir} -rf
+	rm ${D}${base_libdir} -rf
+	rm ${D}${systemd_unitdir} -rf
+	# The ${systemd_unitdir} is /lib/systemd, so we need rmdir /lib,
+	# but not ${base_libdir} here. And the /lib may not exist
+	# whithout systemd.
+	[ ! -d ${D}/lib ] || rmdir ${D}/lib --ignore-fail-on-non-empty
+	rm ${D}${bindir}/avahi-b*
+	rm ${D}${bindir}/avahi-p*
+	rm ${D}${bindir}/avahi-r*
+	rm ${D}${bindir}/avahi-s*
+	rm ${D}${includedir}/avahi-c* -rf
+	rm ${D}${includedir}/avahi-g* -rf
+	rm ${D}${libdir}/libavahi-c*
+	rm ${D}${libdir}/libavahi-g*
+	rm ${D}${libdir}/pkgconfig/avahi-c*
+	rm ${D}${libdir}/pkgconfig/avahi-g*
+	rm ${D}${sbindir} -rf
+	rm ${D}${datadir}/avahi/a*
+	rm ${D}${datadir}/avahi/s*
+	rm ${D}${datadir}/locale/ -rf
+	rm ${D}${datadir}/dbus* -rf
+	rm ${D}${mandir}/man1/a*
+	rm ${D}${mandir}/man5 -rf
+	rm ${D}${mandir}/man8 -rf
+        rm ${D}${libdir}/girepository-1.0/ -rf
+        rm ${D}${datadir}/gir-1.0/ -rf
+}
+
diff --git a/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc b/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
index 825197d..81aad79 100644
--- a/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
+++ b/yocto-poky/meta/recipes-connectivity/avahi/avahi.inc
@@ -7,27 +7,24 @@
 server.'
 AUTHOR = "Lennart Poettering <lennart@poettering.net>"
 HOMEPAGE = "http://avahi.org"
-BUGTRACKER = "http://avahi.org/report"
+BUGTRACKER = "https://github.com/lathiat/avahi/issues"
 SECTION = "network"
 
 # major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and
 # python scripts are under GPLv2+
 LICENSE = "GPLv2+ & LGPLv2.1+"
 
-INC_PR = "r11"
+DEPENDS = "expat libcap libdaemon glib-2.0 intltool-native"
 
-DEPENDS = "expat libcap libdaemon dbus glib-2.0"
-
-SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
+SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \
           file://00avahi-autoipd \
           file://99avahi-autoipd \
           file://initscript.patch \
-          file://avahi_fix_install_issue.patch \
-          file://fix_for_automake_1.12.x.patch \
-          file://out-of-tree.patch \
-          file://0001-avahi-fix-avahi-status-command-error-prompt.patch \
-          file://reuseport-check.patch \
           "
+UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/"
+
+PACKAGECONFIG ??= "dbus"
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
 
 USERADD_PACKAGES = "avahi-daemon avahi-autoipd"
 USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \
@@ -40,10 +37,9 @@
                               -c \"Avahi autoip daemon\" \
                               avahi-autoipd"
 
-inherit autotools pkgconfig update-rc.d gettext useradd
+inherit autotools pkgconfig update-rc.d gettext useradd gobject-introspection
 
-EXTRA_OECONF = "--disable-introspection \
-             --with-avahi-priv-access-group=adm \
+EXTRA_OECONF = "--with-avahi-priv-access-group=adm \
              --disable-stack-protector \
              --disable-gdbm \
              --disable-mono \
@@ -52,6 +48,7 @@
              --disable-qt4 \
              --disable-python \
              --disable-doxygen-doc \
+             --disable-manpages \
              ${EXTRA_OECONF_SYSVINIT} \
              ${EXTRA_OECONF_SYSTEMD} \
              ${AVAHI_GTK} \
@@ -68,8 +65,14 @@
 
 do_configure_prepend() {
     sed 's:AM_CHECK_PYMOD:echo "no pymod" #AM_CHECK_PYMOD:g' -i ${S}/configure.ac
+
+    # This m4 file will get in the way of our introspection.m4 with special cross-compilation fixes
+    rm "${S}/common/introspection.m4" || true
 }
 
+do_compile_prepend() {
+    export GIR_EXTRA_LIBS_PATH="${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs"
+}
 
 PACKAGES =+ "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-autoipd avahi-utils"
 
@@ -82,7 +85,7 @@
                        ${sysconfdir}/udhcpc.d/00avahi-autoipd \
                        ${sysconfdir}/udhcpc.d/99avahi-autoipd"
 FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
-FILES_libavahi-core = "${libdir}/libavahi-core.so.*"
+FILES_libavahi-core = "${libdir}/libavahi-core.so.* ${libdir}/girepository-1.0/AvahiCore*.typelib"
 FILES_avahi-daemon = "${sbindir}/avahi-daemon \
                       ${sysconfdir}/avahi/avahi-daemon.conf \
                       ${sysconfdir}/avahi/hosts \
@@ -99,7 +102,7 @@
                         ${sysconfdir}/avahi/avahi-dnsconfd.action \
                         ${sysconfdir}/init.d/avahi-dnsconfd"
 FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
-FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*"
+FILES_libavahi-gobject = "${libdir}/libavahi-gobject.so.*  ${libdir}/girepository-1.0/Avahi*.typelib"
 FILES_avahi-utils = "${bindir}/avahi-*"
 
 RDEPENDS_${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV}) libavahi-client (= ${EXTENDPKGV})"
@@ -130,7 +133,7 @@
 	rm -rf ${D}${localstatedir}/run
 	rmdir --ignore-fail-on-non-empty ${D}${localstatedir}
 	rm -rf ${D}${datadir}/dbus-1/interfaces
-	rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
+	test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1
 	rm -rf ${D}${libdir}/avahi
 
 	install -d ${D}${sysconfdir}/udhcpc.d
diff --git a/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.31.bb b/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.31.bb
deleted file mode 100644
index 5d796a2..0000000
--- a/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.31.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require avahi.inc
-
-inherit systemd
-
-SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
-SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service"
-SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-                    file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
-                    file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
-                    file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
-                    file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
-
-PR = "${INC_PR}.1"
-
-SRC_URI[md5sum] = "2f22745b8f7368ad5a0a3fddac343f2d"
-SRC_URI[sha256sum] = "8372719b24e2dd75de6f59bb1315e600db4fd092805bd1201ed0cb651a2dab48"
-
-DEPENDS += "intltool-native"
-
-PACKAGES =+ "libavahi-gobject"
diff --git a/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb b/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
new file mode 100644
index 0000000..6670106
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/avahi/avahi_0.6.32.bb
@@ -0,0 +1,20 @@
+require avahi.inc
+
+inherit systemd
+
+SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-dnsconfd"
+SYSTEMD_SERVICE_${PN}-daemon = "avahi-daemon.service"
+SYSTEMD_SERVICE_${PN}-dnsconfd = "avahi-dnsconfd.service"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+                    file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \
+                    file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \
+                    file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \
+                    file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf"
+
+SRC_URI[md5sum] = "22b5e705d3eabb31d26f2e1e7b074013"
+SRC_URI[sha256sum] = "d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454"
+
+DEPENDS += "intltool-native"
+
+PACKAGES =+ "libavahi-gobject"
diff --git a/yocto-poky/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch b/yocto-poky/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch
deleted file mode 100644
index 7590df7..0000000
--- a/yocto-poky/meta/recipes-connectivity/avahi/files/0001-avahi-fix-avahi-status-command-error-prompt.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From f774ac25f436a782ccccc4dbe68378a684596799 Mon Sep 17 00:00:00 2001
-From: Lu Chong <Chong.Lu@windriver.com>
-Date: Thu, 7 Nov 2013 14:36:28 +0800
-Subject: [PATCH] avahi: fix avahi status command error prompt
-
-service --status-all command will display wrong status for avahi-daemon.
-This commit fix this error prompt and make service display right status
-for avahi-daemon.
-
-Upstream-Status: Pending
-
-Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
----
- initscript/debian/avahi-daemon.in |   14 +++++++++++---
- 1 file changed, 11 insertions(+), 3 deletions(-)
-
-diff --git a/initscript/debian/avahi-daemon.in b/initscript/debian/avahi-daemon.in
-index 4793b46..49ec358 100755
---- a/initscript/debian/avahi-daemon.in
-+++ b/initscript/debian/avahi-daemon.in
-@@ -153,7 +153,15 @@ d_reload() {
- #       Function that check the status of the daemon/service.
- #
- d_status() {
--    $DAEMON -c && echo "$DESC is running" || echo "$DESC is not running"
-+    $DAEMON -c
-+    status=$?
-+    if [ $status = 0 ]; then
-+        echo "$DESC is running"
-+        return 0
-+    else
-+        echo "$DESC is not running"
-+        return 3
-+    fi
- }
- 
- case "$1" in
-@@ -182,9 +190,9 @@ case "$1" in
-         d_status
- 	;;
-     *)
--        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload}" >&2
-+        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|reload|status}" >&2
-         exit 1
-         ;;
- esac
- 
--exit 0
-+exit $?
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-connectivity/avahi/files/avahi_fix_install_issue.patch b/yocto-poky/meta/recipes-connectivity/avahi/files/avahi_fix_install_issue.patch
deleted file mode 100644
index 32f20ec..0000000
--- a/yocto-poky/meta/recipes-connectivity/avahi/files/avahi_fix_install_issue.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-
-Fixes this install issue
-#| /bin/sh: line 0: cd: /srv/home/nitin/builds/build-gcc47/tmp/work/i586-poky-linux/avahi-0.6.31-r3.0/image//usr/bin: No such file or directory
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/03
-
-Index: avahi-0.6.31/avahi-utils/Makefile.am
-===================================================================
---- avahi-0.6.31.orig/avahi-utils/Makefile.am
-+++ avahi-0.6.31/avahi-utils/Makefile.am
-@@ -54,6 +54,7 @@ avahi_set_host_name_CFLAGS = $(AM_CFLAGS
- avahi_set_host_name_LDADD = $(AM_LDADD) ../avahi-client/libavahi-client.la ../avahi-common/libavahi-common.la
- 
- install-exec-local:
-+	$(MKDIR_P) $(DESTDIR)/$(bindir) && \
- 	cd $(DESTDIR)/$(bindir) && \
- 		rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \
- 		$(LN_S) avahi-resolve avahi-resolve-host-name && \
-Index: avahi-0.6.31/avahi-utils/Makefile.in
-===================================================================
---- avahi-0.6.31.orig/avahi-utils/Makefile.in
-+++ avahi-0.6.31/avahi-utils/Makefile.in
-@@ -906,6 +906,7 @@ uninstall-am: uninstall-binPROGRAMS
- 
- 
- @HAVE_DBUS_TRUE@install-exec-local:
-+@HAVE_DBUS_TRUE@	$(MKDIR_P) $(DESTDIR)/$(bindir) && \
- @HAVE_DBUS_TRUE@	cd $(DESTDIR)/$(bindir) && \
- @HAVE_DBUS_TRUE@		rm -f avahi-resolve-host-name avahi-resolve-address avahi-browse-domains avahi-publish-address avahi-publish-service && \
- @HAVE_DBUS_TRUE@		$(LN_S) avahi-resolve avahi-resolve-host-name && \
diff --git a/yocto-poky/meta/recipes-connectivity/avahi/files/fix_for_automake_1.12.x.patch b/yocto-poky/meta/recipes-connectivity/avahi/files/fix_for_automake_1.12.x.patch
deleted file mode 100644
index 0fc4c29..0000000
--- a/yocto-poky/meta/recipes-connectivity/avahi/files/fix_for_automake_1.12.x.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Upstream-Status: Pending
-
-autoamke 1.12.x has depricated use of mkdir_p , and recommends use of MKDIR_P
-instead. Fixed the automake files accordingly to avoid warning-errors.
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/07/09
-
-
-Index: avahi-0.6.31/avahi-daemon/Makefile.am
-===================================================================
---- avahi-0.6.31.orig/avahi-daemon/Makefile.am
-+++ avahi-0.6.31/avahi-daemon/Makefile.am
-@@ -169,7 +169,7 @@ xmllint:
- 	done
- 
- install-data-local:
--	test -z "$(localstatedir)/run" || $(mkdir_p) "$(DESTDIR)$(localstatedir)/run"
-+	test -z "$(localstatedir)/run" || $(MKDIR_P) "$(DESTDIR)$(localstatedir)/run"
- 
- update-systemd:
- 	curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
-Index: avahi-0.6.31/avahi-autoipd/Makefile.am
-===================================================================
---- avahi-0.6.31.orig/avahi-autoipd/Makefile.am
-+++ avahi-0.6.31/avahi-autoipd/Makefile.am
-@@ -76,7 +76,7 @@ dhcliententerdir = $(sysconfdir)/dhcp/dh
- dhclientexitdir = $(sysconfdir)/dhcp/dhclient-exit-hooks.d
- 
- install-exec-hook: dhclient-exit-hook dhclient-enter-hook
--	$(mkdir_p) $(DESTDIR)$(dhcliententerdir) $(DESTDIR)$(dhclientexitdir)
-+	$(MKDIR_P) $(DESTDIR)$(dhcliententerdir) $(DESTDIR)$(dhclientexitdir)
- 	$(INSTALL) dhclient-enter-hook $(DESTDIR)$(dhcliententerdir)/avahi-autoipd
- 	$(INSTALL) dhclient-exit-hook $(DESTDIR)$(dhclientexitdir)/avahi-autoipd
- 
diff --git a/yocto-poky/meta/recipes-connectivity/avahi/files/out-of-tree.patch b/yocto-poky/meta/recipes-connectivity/avahi/files/out-of-tree.patch
deleted file mode 100644
index 43476cd..0000000
--- a/yocto-poky/meta/recipes-connectivity/avahi/files/out-of-tree.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From a62dc95d75691ea4aefa86d8bbe54c62afd78ff6 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@intel.com>
-Date: Tue, 17 Sep 2013 12:27:36 +0100
-Subject: [PATCH] build-sys: fix out-of-tree builds without xmltoman
-
-If manpages are enabled but xmltoman isn't present, out-of-tree builds fail
-because it checks inside the build directory for the pre-generated manpages.
-
-Fix this by using $srcdir when looking for files inside the source directory.
----
- configure.ac |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 9debce2..047c7ae 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1021,7 +1021,7 @@ if test x$manpages = xyes ; then
-     fi
- 
-     if test x$have_xmltoman = xno -o x$xmltoman = xno; then
--        if ! test -e man/avahi-daemon.8 ; then
-+        if ! test -e $srcdir/man/avahi-daemon.8 ; then
-             AC_MSG_ERROR([*** xmltoman was not found or was disabled, it is required to build the manpages as they have not been pre-built, install xmltoman, pass --disable-manpages or dont pass --disable-xmltoman])
-             exit 1
-         fi
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-connectivity/avahi/files/reuseport-check.patch b/yocto-poky/meta/recipes-connectivity/avahi/files/reuseport-check.patch
deleted file mode 100644
index bb81c2c..0000000
--- a/yocto-poky/meta/recipes-connectivity/avahi/files/reuseport-check.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Fix avahi-daemon when running on kernel < 3.9 (patch taken from Ubuntu).
-
-Upstream-Status: Pending (unmaintained upstream)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-Description: SO_REUSEPORT may not exist in running kernel
- When userspace defines SO_REUSEPORT we will attempt to enable socket
- port number reuse.  However if the running kernel does not support
- this call it will fail preventing daemon startup.  If this call is
- present but fails ENOPROTOOPT then we know that actually the kernel
- does not support it and we should continue as if we did not have the
- call at all.  (LP: #1228204)
- .
- This patch could be removed from the debian package after jessie release.
-Author: Andy Whitcroft <apw@canonical.com>
-
-Index: avahi-0.6.31/avahi-core/socket.c
-===================================================================
---- avahi-0.6.31.orig/avahi-core/socket.c	2013-09-20 16:36:50.000000000 +0100
-+++ avahi-0.6.31/avahi-core/socket.c	2013-09-20 16:38:23.781863644 +0100
-@@ -177,7 +177,8 @@
-     yes = 1;
-     if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof(yes)) < 0) {
-         avahi_log_warn("SO_REUSEPORT failed: %s", strerror(errno));
--        return -1;
-+        if (errno != ENOPROTOOPT)
-+            return -1;
-     }
- #endif
- 
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind/0001-build-use-pkg-config-to-find-libxml2.patch b/yocto-poky/meta/recipes-connectivity/bind/bind/0001-build-use-pkg-config-to-find-libxml2.patch
index cb5251d..805cbb3 100644
--- a/yocto-poky/meta/recipes-connectivity/bind/bind/0001-build-use-pkg-config-to-find-libxml2.patch
+++ b/yocto-poky/meta/recipes-connectivity/bind/bind/0001-build-use-pkg-config-to-find-libxml2.patch
@@ -4,15 +4,18 @@
 Upstream-Status: Inappropriate
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
+Update context for version 9.10.3-P2.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
 ---
- configure.in | 18 +++---------------
- 1 file changed, 3 insertions(+), 15 deletions(-)
+ configure.in | 23 +++--------------------
+ 1 file changed, 3 insertions(+), 20 deletions(-)
 
 diff --git a/configure.in b/configure.in
-index d566e1c..c9ef3a6 100644
+index 0db826d..75819eb 100644
 --- a/configure.in
 +++ b/configure.in
-@@ -2102,21 +2102,9 @@ case "$use_libxml2" in
+@@ -2107,26 +2107,9 @@ case "$use_libxml2" in
  		DST_LIBXML2_INC=""
  		;;
  	auto|yes)
@@ -22,8 +25,13 @@
 -			libxml2_cflags=`xml2-config --cflags`
 -			;;
 -		*)
--			libxml2_libs=
--			libxml2_cflags=
+-			if test "$use_libxml2" = "yes" ; then
+-				AC_MSG_RESULT(no)
+-				AC_MSG_ERROR(required libxml2 version not available)
+-			else
+-				libxml2_libs=
+-				libxml2_cflags=
+-			fi
 -			;;
 -		esac
 -		;;
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8000.patch b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8000.patch
deleted file mode 100644
index e1c8052..0000000
--- a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8000.patch
+++ /dev/null
@@ -1,278 +0,0 @@
-From 8259daad7242ab2af8731681177ef7e948a15ece Mon Sep 17 00:00:00 2001
-From: Mark Andrews <marka@isc.org>
-Date: Mon, 16 Nov 2015 13:12:20 +1100
-Subject: [PATCH] 4260.   [security]      Insufficient testing when parsing a
- message allowed                         records with an incorrect class to be
- be accepted,                         triggering a REQUIRE failure when those
- records                         were subsequently cached. (CVE-2015-8000) [RT
- #4098]
-
-(cherry picked from commit c8821d124c532e0a65752b378f924d4259499fd3)
-(cherry picked from commit 3a4c24c4a52d4a2d21d2decbde3d4e514e27d51c)
-
-
-Upstream-Status: Backport
-
-https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=commit;h=8259daad7242ab2af8731681177ef7e948a15ece
-
-CVE: CVE-2015-8000
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- CHANGES                       |  5 +++++
- bin/tests/system/start.pl     |  5 ++++-
- doc/arm/notes.xml             |  9 +++++++++
- lib/dns/include/dns/message.h | 13 +++++++++++--
- lib/dns/message.c             | 45 ++++++++++++++++++++++++++++++++++++++-----
- lib/dns/resolver.c            |  9 +++++++++
- lib/dns/xfrin.c               |  2 ++
- 7 files changed, 80 insertions(+), 8 deletions(-)
-
-Index: bind-9.10.2-P4/bin/tests/system/start.pl
-===================================================================
---- bind-9.10.2-P4.orig/bin/tests/system/start.pl
-+++ bind-9.10.2-P4/bin/tests/system/start.pl
-@@ -68,6 +68,7 @@ my $NAMED = $ENV{'NAMED'};
- my $LWRESD = $ENV{'LWRESD'};
- my $DIG = $ENV{'DIG'};
- my $PERL = $ENV{'PERL'};
-+my $PYTHON = $ENV{'PYTHON'};
- 
- # Start the server(s)
- 
-@@ -213,7 +214,9 @@ sub start_server {
- 		$pid_file = "lwresd.pid";
- 	} elsif ($server =~ /^ans/) {
- 		$cleanup_files = "{ans.run}";
--                if (-e "$testdir/$server/ans.pl") {
-+                if (-e "$testdir/$server/ans.py") {
-+                        $command = "$PYTHON ans.py 10.53.0.$' 5300";
-+                } elsif (-e "$testdir/$server/ans.pl") {
-                         $command = "$PERL ans.pl";
-                 } else {
-                         $command = "$PERL $topdir/ans.pl 10.53.0.$'";
-Index: bind-9.10.2-P4/doc/arm/notes.xml
-===================================================================
---- bind-9.10.2-P4.orig/doc/arm/notes.xml
-+++ bind-9.10.2-P4/doc/arm/notes.xml
-@@ -62,6 +62,15 @@
-     <itemizedlist>
-       <listitem>
- 	<para>
-+	  Insufficient testing when parsing a message allowed
-+	  records with an incorrect class to be be accepted,
-+	  triggering a REQUIRE failure when those records
-+	  were subsequently cached.  This flaw is disclosed
-+	  in CVE-2015-8000. [RT #4098]
-+	</para>
-+      </listitem>
-+      <listitem>
-+	<para>
- 	  An incorrect boundary check in the OPENPGPKEY rdatatype
- 	  could trigger an assertion failure. This flaw is disclosed
- 	  in CVE-2015-5986. [RT #40286]
-Index: bind-9.10.2-P4/lib/dns/include/dns/message.h
-===================================================================
---- bind-9.10.2-P4.orig/lib/dns/include/dns/message.h
-+++ bind-9.10.2-P4/lib/dns/include/dns/message.h
-@@ -15,8 +15,6 @@
-  * PERFORMANCE OF THIS SOFTWARE.
-  */
- 
--/* $Id$ */
--
- #ifndef DNS_MESSAGE_H
- #define DNS_MESSAGE_H 1
- 
-@@ -221,6 +219,8 @@ struct dns_message {
- 	unsigned int			free_saved : 1;
- 	unsigned int			sitok : 1;
- 	unsigned int			sitbad : 1;
-+	unsigned int			tkey : 1;
-+	unsigned int			rdclass_set : 1;
- 
- 	unsigned int			opt_reserved;
- 	unsigned int			sig_reserved;
-@@ -1400,6 +1400,15 @@ dns_message_buildopt(dns_message_t *msg,
-  * \li	 other.
-  */
- 
-+void
-+dns_message_setclass(dns_message_t *msg, dns_rdataclass_t rdclass);
-+/*%<
-+ * Set the expected class of records in the response.
-+ *
-+ * Requires:
-+ * \li   msg be a valid message with parsing intent.
-+ */
-+
- ISC_LANG_ENDDECLS
- 
- #endif /* DNS_MESSAGE_H */
-Index: bind-9.10.2-P4/lib/dns/message.c
-===================================================================
---- bind-9.10.2-P4.orig/lib/dns/message.c
-+++ bind-9.10.2-P4/lib/dns/message.c
-@@ -439,6 +439,8 @@ msginit(dns_message_t *m) {
- 	m->free_saved = 0;
- 	m->sitok = 0;
- 	m->sitbad = 0;
-+	m->tkey = 0;
-+	m->rdclass_set = 0;
- 	m->querytsig = NULL;
- }
- 
-@@ -1091,13 +1093,19 @@ getquestions(isc_buffer_t *source, dns_m
- 		 * If this class is different than the one we already read,
- 		 * this is an error.
- 		 */
--		if (msg->state == DNS_SECTION_ANY) {
--			msg->state = DNS_SECTION_QUESTION;
-+		if (msg->rdclass_set == 0) {
- 			msg->rdclass = rdclass;
-+			msg->rdclass_set = 1;
- 		} else if (msg->rdclass != rdclass)
- 			DO_FORMERR;
- 
- 		/*
-+		 * Is this a TKEY query?
-+		 */
-+		if (rdtype == dns_rdatatype_tkey)
-+			msg->tkey = 1;
-+
-+		/*
- 		 * Can't ask the same question twice.
- 		 */
- 		result = dns_message_find(name, rdclass, rdtype, 0, NULL);
-@@ -1241,12 +1249,12 @@ getsection(isc_buffer_t *source, dns_mes
- 		 * If there was no question section, we may not yet have
- 		 * established a class.  Do so now.
- 		 */
--		if (msg->state == DNS_SECTION_ANY &&
-+		if (msg->rdclass_set == 0 &&
- 		    rdtype != dns_rdatatype_opt &&	/* class is UDP SIZE */
- 		    rdtype != dns_rdatatype_tsig &&	/* class is ANY */
- 		    rdtype != dns_rdatatype_tkey) {	/* class is undefined */
- 			msg->rdclass = rdclass;
--			msg->state = DNS_SECTION_QUESTION;
-+			msg->rdclass_set = 1;
- 		}
- 
- 		/*
-@@ -1256,7 +1264,7 @@ getsection(isc_buffer_t *source, dns_mes
- 		if (msg->opcode != dns_opcode_update
- 		    && rdtype != dns_rdatatype_tsig
- 		    && rdtype != dns_rdatatype_opt
--		    && rdtype != dns_rdatatype_dnskey /* in a TKEY query */
-+		    && rdtype != dns_rdatatype_key /* in a TKEY query */
- 		    && rdtype != dns_rdatatype_sig /* SIG(0) */
- 		    && rdtype != dns_rdatatype_tkey /* Win2000 TKEY */
- 		    && msg->rdclass != dns_rdataclass_any
-@@ -1264,6 +1272,16 @@ getsection(isc_buffer_t *source, dns_mes
- 			DO_FORMERR;
- 
- 		/*
-+		 * If this is not a TKEY query/response then the KEY
-+		 * record's class needs to match.
-+		 */
-+		if (msg->opcode != dns_opcode_update && !msg->tkey &&
-+		    rdtype == dns_rdatatype_key &&
-+		    msg->rdclass != dns_rdataclass_any &&
-+		    msg->rdclass != rdclass)
-+			DO_FORMERR;
-+
-+		/*
- 		 * Special type handling for TSIG, OPT, and TKEY.
- 		 */
- 		if (rdtype == dns_rdatatype_tsig) {
-@@ -1377,6 +1395,10 @@ getsection(isc_buffer_t *source, dns_mes
- 				skip_name_search = ISC_TRUE;
- 				skip_type_search = ISC_TRUE;
- 				issigzero = ISC_TRUE;
-+			} else {
-+				if (msg->rdclass != dns_rdataclass_any &&
-+				    msg->rdclass != rdclass)
-+					DO_FORMERR;
- 			}
- 		} else
- 			covers = 0;
-@@ -1625,6 +1647,7 @@ dns_message_parse(dns_message_t *msg, is
- 	msg->counts[DNS_SECTION_ADDITIONAL] = isc_buffer_getuint16(source);
- 
- 	msg->header_ok = 1;
-+	msg->state = DNS_SECTION_QUESTION;
- 
- 	/*
- 	 * -1 means no EDNS.
-@@ -3706,3 +3729,15 @@ dns_message_buildopt(dns_message_t *mess
- 		dns_message_puttemprdatalist(message, &rdatalist);
- 	return (result);
- }
-+
-+void
-+dns_message_setclass(dns_message_t *msg, dns_rdataclass_t rdclass) {
-+
-+	REQUIRE(DNS_MESSAGE_VALID(msg));
-+	REQUIRE(msg->from_to_wire == DNS_MESSAGE_INTENTPARSE);
-+	REQUIRE(msg->state == DNS_SECTION_ANY);
-+	REQUIRE(msg->rdclass_set == 0);
-+
-+	msg->rdclass = rdclass;
-+	msg->rdclass_set = 1;
-+}
-Index: bind-9.10.2-P4/lib/dns/resolver.c
-===================================================================
---- bind-9.10.2-P4.orig/lib/dns/resolver.c
-+++ bind-9.10.2-P4/lib/dns/resolver.c
-@@ -7309,6 +7309,8 @@ resquery_response(isc_task_t *task, isc_
- 			goto done;
- 	}
- 
-+	dns_message_setclass(message, fctx->res->rdclass);
-+
- 	if ((options & DNS_FETCHOPT_TCP) == 0) {
- 		if ((options & DNS_FETCHOPT_NOEDNS0) == 0)
- 			dns_adb_setudpsize(fctx->adb, query->addrinfo,
-@@ -7391,6 +7393,13 @@ resquery_response(isc_task_t *task, isc_
- 				 &dns_master_style_comment,
- 				 ISC_LOG_DEBUG(10),
- 				 fctx->res->mctx);
-+
-+	if (message->rdclass != fctx->res->rdclass) {
-+		resend = ISC_TRUE;
-+		FCTXTRACE("bad class");
-+		goto done;
-+	}
-+
- 	/*
- 	 * Process receive opt record.
- 	 */
-Index: bind-9.10.2-P4/lib/dns/xfrin.c
-===================================================================
---- bind-9.10.2-P4.orig/lib/dns/xfrin.c
-+++ bind-9.10.2-P4/lib/dns/xfrin.c
-@@ -1225,6 +1225,8 @@ xfrin_recv_done(isc_task_t *task, isc_ev
- 	msg->tsigctx = xfr->tsigctx;
- 	xfr->tsigctx = NULL;
- 
-+	dns_message_setclass(msg, xfr->rdclass);
-+
- 	if (xfr->nmsg > 0)
- 		msg->tcp_continuation = 1;
- 
-Index: bind-9.10.2-P4/CHANGES
-===================================================================
---- bind-9.10.2-P4.orig/CHANGES
-+++ bind-9.10.2-P4/CHANGES
-@@ -1,4 +1,9 @@
--	--- 9.10.2-P4 released ---
-+4260.  [security]      Insufficient testing when parsing a message allowed
-+                       records with an incorrect class to be be accepted,
-+                       triggering a REQUIRE failure when those records
-+                       were subsequently cached. (CVE-2015-8000) [RT #4098]
-+
-+    --- 9.10.2-P4 released ---
- 
- 4170.	[security]	An incorrect boundary check in the OPENPGPKEY
- 			rdatatype could trigger an assertion failure.
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8461.patch b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8461.patch
deleted file mode 100644
index 88e9c83..0000000
--- a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8461.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From adbf81335b67be0cebdcf9f1f4fcb38ef4814f4d Mon Sep 17 00:00:00 2001
-From: Mark Andrews <marka@isc.org>
-Date: Thu, 25 Jun 2015 18:36:27 +1000
-Subject: [PATCH] 4146.   [bug]           Address reference leak that could
- prevent a clean                         shutdown. [RT #37125]
-
-Upstream-Status: Backport
-
-https://source.isc.org/cgi-bin/gitweb.cgi?p=bind9.git;a=commit;h=adbf81335b67be0cebdcf9f1f4fcb38ef4814f4d
-
-CVE: CVE-2015-8461
-Signed-off-by:  Armin Kuster <akuster@mvista.com>
----
- CHANGES            | 3 +++
- lib/dns/resolver.c | 5 +++++
- 2 files changed, 8 insertions(+)
-
-Index: bind-9.10.2-P4/CHANGES
-===================================================================
---- bind-9.10.2-P4.orig/CHANGES
-+++ bind-9.10.2-P4/CHANGES
-@@ -1,3 +1,6 @@
-+4146.  [bug]           Address reference leak that could prevent a clean
-+                       shutdown. [RT #37125]
-+
- 4260.  [security]      Insufficient testing when parsing a message allowed
-                        records with an incorrect class to be be accepted,
-                        triggering a REQUIRE failure when those records
-Index: bind-9.10.2-P4/lib/dns/resolver.c
-===================================================================
---- bind-9.10.2-P4.orig/lib/dns/resolver.c
-+++ bind-9.10.2-P4/lib/dns/resolver.c
-@@ -1649,6 +1649,11 @@ fctx_query(fetchctx_t *fctx, dns_adbaddr
- 	if (query->dispatch != NULL)
- 		dns_dispatch_detach(&query->dispatch);
- 
-+	LOCK(&res->buckets[fctx->bucketnum].lock);
-+	INSIST(fctx->references > 1);
-+	fctx->references--;
-+	UNLOCK(&res->buckets[fctx->bucketnum].lock);
-+
-  cleanup_query:
- 	if (query->connects == 0) {
- 		query->magic = 0;
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8704.patch b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8704.patch
deleted file mode 100644
index d5bf740..0000000
--- a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8704.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-a buffer size check can cause denial of service under certain circumstances 
-
-[security]
-The following flaw in BIND was reported by ISC:
-
-A buffer size check used to guard against overflow could cause named to exit with an INSIST failure In apl_42.c.
-
-A server could exit due to an INSIST failure in apl_42.c when performing certain string formatting operations.
-
-Upstream-Status: Backport
-CVE: CVE-2015-8704
-
-[The patch is taken from BIND 9.10.3:
-https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-8704]
-
-Signed-off-by: Derek Straka <derek@asterius.io>
-diff --git a/lib/dns/rdata/in_1/apl_42.c b/lib/dns/rdata/in_1/apl_42.c
-index bedd38e..28eb7f2 100644
---- a/lib/dns/rdata/in_1/apl_42.c
-+++ b/lib/dns/rdata/in_1/apl_42.c
-@@ -116,7 +116,7 @@ totext_in_apl(ARGS_TOTEXT) {
-	isc_uint8_t len;
-	isc_boolean_t neg;
-	unsigned char buf[16];
--	char txt[sizeof(" !64000")];
-+	char txt[sizeof(" !64000:")];
-	const char *sep = "";
-	int n;
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8705.patch b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8705.patch
deleted file mode 100644
index c4a052d..0000000
--- a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2015-8705.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-a crash or assertion failure can during format processing 
-
-[security]
-The following flaw in BIND was reported by ISC:
-
-In versions of BIND 9.10, errors can occur when OPT pseudo-RR data or ECS options are formatted to text. In 9.10.3 through 9.10.3-P2, the issue may result in a REQUIRE assertion failure in buffer.c.
-
-This issue can affect both authoritative and recursive servers if they are performing debug logging. (It may also crash related tools which use the same code, such as dig or delv.)
-
-A server could exit due to an INSIST failure in apl_42.c when performing certain string formatting operations.
-
-Upstream-Status: Backport
-CVE: CVE-2015-8705
-
-[The patch is taken from BIND 9.10.3:
-https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-8705]
-
-Signed-off-by: Derek Straka <derek@asterius.io>
-diff --git a/lib/dns/message.c b/lib/dns/message.c
-index ea7b93a..810c58e 100644
---- a/lib/dns/message.c
-+++ b/lib/dns/message.c
-@@ -3310,9 +3310,19 @@
- 			} else if (optcode == DNS_OPT_SIT) {
- 				ADD_STRING(target, "; SIT");
- 			} else if (optcode == DNS_OPT_CLIENT_SUBNET) {
-+				isc_buffer_t ecsbuf;
- 				ADD_STRING(target, "; CLIENT-SUBNET: ");
--				render_ecs(&optbuf, target);
--				ADD_STRING(target, "\n");
-+				isc_buffer_init(&ecsbuf,
-+							isc_buffer_current(&optbuf),
-+							optlen);
-+				isc_buffer_add(&ecsbuf, optlen);
-+				result = render_ecs(&ecsbuf, target);
-+				if (result == ISC_R_NOSPACE)
-+					return (result);
-+				if (result == ISC_R_SUCCESS) {
-+					isc_buffer_forward(&optbuf, optlen);
-+                                        ADD_STRING(target, "\n");
-+                }
- 				continue;
- 			} else if (optcode == DNS_OPT_EXPIRE) {
- 				if (optlen == 4) {
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1285.patch b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1285.patch
new file mode 100644
index 0000000..2149bd1
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1285.patch
@@ -0,0 +1,154 @@
+From 70037e040e587329cec82123e12b9f4f7c945f67 Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Thu, 18 Feb 2016 12:11:27 +1100
+Subject: [PATCH] 4318.   [security]      Malformed control messages can
+ trigger assertions                         in named and rndc. (CVE-2016-1285)
+ [RT #41666]
+
+(cherry picked from commit a2b15b3305acd52179e6f3dc7d073b07fbc40b8e)
+
+CVE: CVE-2016-1285
+Upstream-Status: Backport
+[Removed doc/arm/notes.xml changes from upstream patch]
+
+Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
+---
+ CHANGES                 |  3 +++
+ bin/named/control.c     |  2 +-
+ bin/named/controlconf.c |  2 +-
+ bin/rndc/rndc.c         |  8 ++++----
+ doc/arm/notes.xml       | 11 +++++++++++
+ lib/isccc/cc.c          | 14 +++++++-------
+ 6 files changed, 27 insertions(+), 13 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index b9bd9ef..2c727d5 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -1,3 +1,6 @@
++4318.	[security]	Malformed control messages can trigger assertions
++			in named and rndc. (CVE-2016-1285) [RT #41666]
++
+ 	--- 9.10.3-P3 released ---
+ 
+ 4288.	[bug]		Fixed a regression in resolver.c:possibly_mark()
+diff --git a/bin/named/control.c b/bin/named/control.c
+index 8554335..81340ca 100644
+--- a/bin/named/control.c
++++ b/bin/named/control.c
+@@ -69,7 +69,7 @@ ns_control_docommand(isccc_sexpr_t *message, isc_buffer_t *text) {
+ #endif
+ 
+ 	data = isccc_alist_lookup(message, "_data");
+-	if (data == NULL) {
++	if (!isccc_alist_alistp(data)) {
+ 		/*
+ 		 * No data section.
+ 		 */
+diff --git a/bin/named/controlconf.c b/bin/named/controlconf.c
+index 765afdd..a39ab8b 100644
+--- a/bin/named/controlconf.c
++++ b/bin/named/controlconf.c
+@@ -402,7 +402,7 @@ control_recvmessage(isc_task_t *task, isc_event_t *event) {
+ 	 * Limit exposure to replay attacks.
+ 	 */
+ 	_ctrl = isccc_alist_lookup(request, "_ctrl");
+-	if (_ctrl == NULL) {
++	if (!isccc_alist_alistp(_ctrl)) {
+ 		log_invalid(&conn->ccmsg, ISC_R_FAILURE);
+ 		goto cleanup_request;
+ 	}
+diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c
+index cb17050..b6e05c8 100644
+--- a/bin/rndc/rndc.c
++++ b/bin/rndc/rndc.c
+@@ -255,8 +255,8 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) {
+ 	   isccc_cc_fromwire(&source, &response, algorithm, &secret));
+ 
+ 	data = isccc_alist_lookup(response, "_data");
+-	if (data == NULL)
+-		fatal("no data section in response");
++	if (!isccc_alist_alistp(data))
++		fatal("bad or missing data section in response");
+ 	result = isccc_cc_lookupstring(data, "err", &errormsg);
+ 	if (result == ISC_R_SUCCESS) {
+ 		failed = ISC_TRUE;
+@@ -321,8 +321,8 @@ rndc_recvnonce(isc_task_t *task, isc_event_t *event) {
+ 	   isccc_cc_fromwire(&source, &response, algorithm, &secret));
+ 
+ 	_ctrl = isccc_alist_lookup(response, "_ctrl");
+-	if (_ctrl == NULL)
+-		fatal("_ctrl section missing");
++	if (!isccc_alist_alistp(_ctrl))
++		fatal("bad or missing ctrl section in response");
+ 	nonce = 0;
+ 	if (isccc_cc_lookupuint32(_ctrl, "_nonce", &nonce) != ISC_R_SUCCESS)
+ 		nonce = 0;
+diff --git a/lib/isccc/cc.c b/lib/isccc/cc.c
+index 47a3b74..2bb961e 100644
+--- a/lib/isccc/cc.c
++++ b/lib/isccc/cc.c
+@@ -403,13 +403,13 @@ verify(isccc_sexpr_t *alist, unsigned char *data, unsigned int length,
+ 	 * Extract digest.
+ 	 */
+ 	_auth = isccc_alist_lookup(alist, "_auth");
+-	if (_auth == NULL)
++	if (!isccc_alist_alistp(_auth))
+ 		return (ISC_R_FAILURE);
+ 	if (algorithm == ISCCC_ALG_HMACMD5)
+ 		hmac = isccc_alist_lookup(_auth, "hmd5");
+ 	else
+ 		hmac = isccc_alist_lookup(_auth, "hsha");
+-	if (hmac == NULL)
++	if (!isccc_sexpr_binaryp(hmac))
+ 		return (ISC_R_FAILURE);
+ 	/*
+ 	 * Compute digest.
+@@ -728,7 +728,7 @@ isccc_cc_createack(isccc_sexpr_t *message, isc_boolean_t ok,
+ 	REQUIRE(ackp != NULL && *ackp == NULL);
+ 
+ 	_ctrl = isccc_alist_lookup(message, "_ctrl");
+-	if (_ctrl == NULL ||
++	if (!isccc_alist_alistp(_ctrl) ||
+ 	    isccc_cc_lookupuint32(_ctrl, "_ser", &serial) != ISC_R_SUCCESS ||
+ 	    isccc_cc_lookupuint32(_ctrl, "_tim", &t) != ISC_R_SUCCESS)
+ 		return (ISC_R_FAILURE);
+@@ -773,7 +773,7 @@ isccc_cc_isack(isccc_sexpr_t *message)
+ 	isccc_sexpr_t *_ctrl;
+ 
+ 	_ctrl = isccc_alist_lookup(message, "_ctrl");
+-	if (_ctrl == NULL)
++	if (!isccc_alist_alistp(_ctrl))
+ 		return (ISC_FALSE);
+ 	if (isccc_cc_lookupstring(_ctrl, "_ack", NULL) == ISC_R_SUCCESS)
+ 		return (ISC_TRUE);
+@@ -786,7 +786,7 @@ isccc_cc_isreply(isccc_sexpr_t *message)
+ 	isccc_sexpr_t *_ctrl;
+ 
+ 	_ctrl = isccc_alist_lookup(message, "_ctrl");
+-	if (_ctrl == NULL)
++	if (!isccc_alist_alistp(_ctrl))
+ 		return (ISC_FALSE);
+ 	if (isccc_cc_lookupstring(_ctrl, "_rpl", NULL) == ISC_R_SUCCESS)
+ 		return (ISC_TRUE);
+@@ -806,7 +806,7 @@ isccc_cc_createresponse(isccc_sexpr_t *message, isccc_time_t now,
+ 
+ 	_ctrl = isccc_alist_lookup(message, "_ctrl");
+ 	_data = isccc_alist_lookup(message, "_data");
+-	if (_ctrl == NULL || _data == NULL ||
++	if (!isccc_alist_alistp(_ctrl) || !isccc_alist_alistp(_data) ||
+ 	    isccc_cc_lookupuint32(_ctrl, "_ser", &serial) != ISC_R_SUCCESS ||
+ 	    isccc_cc_lookupstring(_data, "type", &type) != ISC_R_SUCCESS)
+ 		return (ISC_R_FAILURE);
+@@ -995,7 +995,7 @@ isccc_cc_checkdup(isccc_symtab_t *symtab, isccc_sexpr_t *message,
+ 	isccc_sexpr_t *_ctrl;
+ 
+ 	_ctrl = isccc_alist_lookup(message, "_ctrl");
+-	if (_ctrl == NULL ||
++	if (!isccc_alist_alistp(_ctrl) ||
+ 	    isccc_cc_lookupstring(_ctrl, "_ser", &_ser) != ISC_R_SUCCESS ||
+ 	    isccc_cc_lookupstring(_ctrl, "_tim", &_tim) != ISC_R_SUCCESS)
+ 		return (ISC_R_FAILURE);
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_1.patch b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_1.patch
new file mode 100644
index 0000000..ae5cc48
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_1.patch
@@ -0,0 +1,79 @@
+From a3d327bf1ceaaeabb20223d8de85166e940b9f12 Mon Sep 17 00:00:00 2001
+From: Mukund Sivaraman <muks@isc.org>
+Date: Mon, 22 Feb 2016 12:22:43 +0530
+Subject: [PATCH] Fix resolver assertion failure due to improper DNAME handling
+ (CVE-2016-1286) (#41753)
+
+(cherry picked from commit 5995fec51cc8bb7e53804e4936e60aa1537f3673)
+
+CVE: CVE-2016-1286
+Upstream-Status: Backport
+
+[Removed doc/arm/notes.xml changes from upstream patch.]
+
+Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
+---
+diff -ruN a/CHANGES b/CHANGES
+--- a/CHANGES	2016-04-13 07:28:44.940873629 +0200
++++ b/CHANGES	2016-04-13 07:38:38.923167851 +0200
+@@ -1,3 +1,7 @@
++4319.  [security]      Fix resolver assertion failure due to improper
++                       DNAME handling when parsing fetch reply messages.
++                       (CVE-2016-1286) [RT #41753]
++
+ 4318.	[security]	Malformed control messages can trigger assertions
+ 			in named and rndc. (CVE-2016-1285) [RT #41666]
+ 
+diff -ruN a/lib/dns/resolver.c b/lib/dns/resolver.c
+--- a/lib/dns/resolver.c	2016-04-13 07:28:43.088953790 +0200
++++ b/lib/dns/resolver.c	2016-04-13 07:38:20.411968925 +0200
+@@ -6967,21 +6967,26 @@
+ 				isc_boolean_t found_dname = ISC_FALSE;
+ 				dns_name_t *dname_name;
+ 
++				/*
++				 * Only pass DNAME or RRSIG(DNAME).
++				 */
++				if (rdataset->type != dns_rdatatype_dname &&
++				    (rdataset->type != dns_rdatatype_rrsig ||
++				     rdataset->covers != dns_rdatatype_dname))
++					continue;
++
++				/*
++				 * If we're not chaining, then the DNAME and
++				 * its signature should not be external.
++				 */
++				if (!chaining && external) {
++					log_formerr(fctx, "external DNAME");
++					return (DNS_R_FORMERR);
++				}
++
+ 				found = ISC_FALSE;
+ 				aflag = 0;
+ 				if (rdataset->type == dns_rdatatype_dname) {
+-					/*
+-					 * We're looking for something else,
+-					 * but we found a DNAME.
+-					 *
+-					 * If we're not chaining, then the
+-					 * DNAME should not be external.
+-					 */
+-					if (!chaining && external) {
+-						log_formerr(fctx,
+-							    "external DNAME");
+-						return (DNS_R_FORMERR);
+-					}
+ 					found = ISC_TRUE;
+ 					want_chaining = ISC_TRUE;
+ 					POST(want_chaining);
+@@ -7010,9 +7015,7 @@
+ 							&fctx->domain)) {
+ 						return (DNS_R_SERVFAIL);
+ 					}
+-				} else if (rdataset->type == dns_rdatatype_rrsig
+-					   && rdataset->covers ==
+-					   dns_rdatatype_dname) {
++				} else {
+ 					/*
+ 					 * We've found a signature that
+ 					 * covers the DNAME.
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch
new file mode 100644
index 0000000..a31ea81
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-1286_2.patch
@@ -0,0 +1,314 @@
+From 7602be276a73a6eb5431c5acd9718e68a55e8b61 Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Mon, 29 Feb 2016 07:16:48 +1100
+Subject: [PATCH] Part 2 of: 4319.   [security]      Fix resolver assertion
+ failure due to improper                         DNAME handling when parsing
+ fetch reply messages.                         (CVE-2016-1286) [RT #41753]
+
+(cherry picked from commit 2de89ee9de8c8da9dc153a754b02dcdbb7fe2374)
+Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
+---
+ lib/dns/resolver.c | 192 ++++++++++++++++++++++++++---------------------------
+ 1 file changed, 93 insertions(+), 99 deletions(-)
+
+diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
+index 70aba87..41e9df4 100644
+--- a/lib/dns/resolver.c
++++ b/lib/dns/resolver.c
+@@ -6074,14 +6074,11 @@ cname_target(dns_rdataset_t *rdataset, dns_name_t *tname) {
+ }
+ 
+ static inline isc_result_t
+-dname_target(fetchctx_t *fctx, dns_rdataset_t *rdataset, dns_name_t *qname,
+-	     dns_name_t *oname, dns_fixedname_t *fixeddname)
++dname_target(dns_rdataset_t *rdataset, dns_name_t *qname,
++	     unsigned int nlabels, dns_fixedname_t *fixeddname)
+ {
+ 	isc_result_t result;
+ 	dns_rdata_t rdata = DNS_RDATA_INIT;
+-	unsigned int nlabels;
+-	int order;
+-	dns_namereln_t namereln;
+ 	dns_rdata_dname_t dname;
+ 	dns_fixedname_t prefix;
+ 
+@@ -6096,21 +6093,6 @@ dname_target(fetchctx_t *fctx, dns_rdataset_t *rdataset, dns_name_t *qname,
+ 	if (result != ISC_R_SUCCESS)
+ 		return (result);
+ 
+-	/*
+-	 * Get the prefix of qname.
+-	 */
+-	namereln = dns_name_fullcompare(qname, oname, &order, &nlabels);
+-	if (namereln != dns_namereln_subdomain) {
+-		char qbuf[DNS_NAME_FORMATSIZE];
+-		char obuf[DNS_NAME_FORMATSIZE];
+-
+-		dns_rdata_freestruct(&dname);
+-		dns_name_format(qname, qbuf, sizeof(qbuf));
+-		dns_name_format(oname, obuf, sizeof(obuf));
+-		log_formerr(fctx, "unrelated DNAME in answer: "
+-				   "%s is not in %s", qbuf, obuf);
+-		return (DNS_R_FORMERR);
+-	}
+ 	dns_fixedname_init(&prefix);
+ 	dns_name_split(qname, nlabels, dns_fixedname_name(&prefix), NULL);
+ 	dns_fixedname_init(fixeddname);
+@@ -6736,13 +6718,13 @@ static isc_result_t
+ answer_response(fetchctx_t *fctx) {
+ 	isc_result_t result;
+ 	dns_message_t *message;
+-	dns_name_t *name, *qname, tname, *ns_name;
++	dns_name_t *name, *dname, *qname, tname, *ns_name;
+ 	dns_rdataset_t *rdataset, *ns_rdataset;
+ 	isc_boolean_t done, external, chaining, aa, found, want_chaining;
+ 	isc_boolean_t have_answer, found_cname, found_type, wanted_chaining;
+ 	unsigned int aflag;
+ 	dns_rdatatype_t type;
+-	dns_fixedname_t dname, fqname;
++	dns_fixedname_t fdname, fqname;
+ 	dns_view_t *view;
+ 
+ 	FCTXTRACE("answer_response");
+@@ -6770,10 +6752,15 @@ answer_response(fetchctx_t *fctx) {
+ 	view = fctx->res->view;
+ 	result = dns_message_firstname(message, DNS_SECTION_ANSWER);
+ 	while (!done && result == ISC_R_SUCCESS) {
++		dns_namereln_t namereln;
++		int order;
++		unsigned int nlabels;
++
+ 		name = NULL;
+ 		dns_message_currentname(message, DNS_SECTION_ANSWER, &name);
+ 		external = ISC_TF(!dns_name_issubdomain(name, &fctx->domain));
+-		if (dns_name_equal(name, qname)) {
++		namereln = dns_name_fullcompare(qname, name, &order, &nlabels);
++		if (namereln == dns_namereln_equal) {
+ 			wanted_chaining = ISC_FALSE;
+ 			for (rdataset = ISC_LIST_HEAD(name->list);
+ 			     rdataset != NULL;
+@@ -6898,10 +6885,11 @@ answer_response(fetchctx_t *fctx) {
+ 						 */
+ 						INSIST(!external);
+ 						if (aflag ==
+-						    DNS_RDATASETATTR_ANSWER)
++						    DNS_RDATASETATTR_ANSWER) {
+ 							have_answer = ISC_TRUE;
+-						name->attributes |=
+-							DNS_NAMEATTR_ANSWER;
++							name->attributes |=
++								DNS_NAMEATTR_ANSWER;
++						}
+ 						rdataset->attributes |= aflag;
+ 						if (aa)
+ 							rdataset->trust =
+@@ -6956,6 +6944,8 @@ answer_response(fetchctx_t *fctx) {
+ 			if (wanted_chaining)
+ 				chaining = ISC_TRUE;
+ 		} else {
++			dns_rdataset_t *dnameset = NULL;
++
+ 			/*
+ 			 * Look for a DNAME (or its SIG).  Anything else is
+ 			 * ignored.
+@@ -6963,10 +6953,8 @@ answer_response(fetchctx_t *fctx) {
+ 			wanted_chaining = ISC_FALSE;
+ 			for (rdataset = ISC_LIST_HEAD(name->list);
+ 			     rdataset != NULL;
+-			     rdataset = ISC_LIST_NEXT(rdataset, link)) {
+-				isc_boolean_t found_dname = ISC_FALSE;
+-				dns_name_t *dname_name;
+-
++			     rdataset = ISC_LIST_NEXT(rdataset, link))
++			{
+ 				/*
+ 				 * Only pass DNAME or RRSIG(DNAME).
+ 				 */
+@@ -6980,20 +6968,41 @@ answer_response(fetchctx_t *fctx) {
+ 				 * its signature should not be external.
+ 				 */
+ 				if (!chaining && external) {
+-					log_formerr(fctx, "external DNAME");
++					char qbuf[DNS_NAME_FORMATSIZE];
++					char obuf[DNS_NAME_FORMATSIZE];
++
++					dns_name_format(name, qbuf,
++							sizeof(qbuf));
++					dns_name_format(&fctx->domain, obuf,
++							sizeof(obuf));
++					log_formerr(fctx, "external DNAME or "
++						    "RRSIG covering DNAME "
++						    "in answer: %s is "
++						    "not in %s", qbuf, obuf);
++					return (DNS_R_FORMERR);
++				}
++
++				if (namereln != dns_namereln_subdomain) {
++					char qbuf[DNS_NAME_FORMATSIZE];
++					char obuf[DNS_NAME_FORMATSIZE];
++
++					dns_name_format(qname, qbuf,
++							sizeof(qbuf));
++					dns_name_format(name, obuf,
++							sizeof(obuf));
++					log_formerr(fctx, "unrelated DNAME "
++						    "in answer: %s is "
++						    "not in %s", qbuf, obuf);
+ 					return (DNS_R_FORMERR);
+ 				}
+ 
+-				found = ISC_FALSE;
+ 				aflag = 0;
+ 				if (rdataset->type == dns_rdatatype_dname) {
+-					found = ISC_TRUE;
+ 					want_chaining = ISC_TRUE;
+ 					POST(want_chaining);
+ 					aflag = DNS_RDATASETATTR_ANSWER;
+-					result = dname_target(fctx, rdataset,
+-							      qname, name,
+-							      &dname);
++					result = dname_target(rdataset, qname,
++							      nlabels, &fdname);
+ 					if (result == ISC_R_NOSPACE) {
+ 						/*
+ 						 * We can't construct the
+@@ -7005,14 +7014,12 @@ answer_response(fetchctx_t *fctx) {
+ 					} else if (result != ISC_R_SUCCESS)
+ 						return (result);
+ 					else
+-						found_dname = ISC_TRUE;
++						dnameset = rdataset;
+ 
+-					dname_name = dns_fixedname_name(&dname);
++					dname = dns_fixedname_name(&fdname);
+ 					if (!is_answertarget_allowed(view,
+-							qname,
+-							rdataset->type,
+-							dname_name,
+-							&fctx->domain)) {
++							qname, rdataset->type,
++							dname, &fctx->domain)) {
+ 						return (DNS_R_SERVFAIL);
+ 					}
+ 				} else {
+@@ -7020,73 +7027,60 @@ answer_response(fetchctx_t *fctx) {
+ 					 * We've found a signature that
+ 					 * covers the DNAME.
+ 					 */
+-					found = ISC_TRUE;
+ 					aflag = DNS_RDATASETATTR_ANSWERSIG;
+ 				}
+ 
+-				if (found) {
++				/*
++				 * We've found an answer to our
++				 * question.
++				 */
++				name->attributes |= DNS_NAMEATTR_CACHE;
++				rdataset->attributes |= DNS_RDATASETATTR_CACHE;
++				rdataset->trust = dns_trust_answer;
++				if (!chaining) {
+ 					/*
+-					 * We've found an answer to our
+-					 * question.
++					 * This data is "the" answer to
++					 * our question only if we're
++					 * not chaining.
+ 					 */
+-					name->attributes |=
+-						DNS_NAMEATTR_CACHE;
+-					rdataset->attributes |=
+-						DNS_RDATASETATTR_CACHE;
+-					rdataset->trust = dns_trust_answer;
+-					if (!chaining) {
+-						/*
+-						 * This data is "the" answer
+-						 * to our question only if
+-						 * we're not chaining.
+-						 */
+-						INSIST(!external);
+-						if (aflag ==
+-						    DNS_RDATASETATTR_ANSWER)
+-							have_answer = ISC_TRUE;
++					INSIST(!external);
++					if (aflag == DNS_RDATASETATTR_ANSWER) {
++						have_answer = ISC_TRUE;
+ 						name->attributes |=
+ 							DNS_NAMEATTR_ANSWER;
+-						rdataset->attributes |= aflag;
+-						if (aa)
+-							rdataset->trust =
+-							  dns_trust_authanswer;
+-					} else if (external) {
+-						rdataset->attributes |=
+-						    DNS_RDATASETATTR_EXTERNAL;
+-					}
+-
+-					/*
+-					 * DNAME chaining.
+-					 */
+-					if (found_dname) {
+-						/*
+-						 * Copy the dname into the
+-						 * qname fixed name.
+-						 *
+-						 * Although we check for
+-						 * failure of the copy
+-						 * operation, in practice it
+-						 * should never fail since
+-						 * we already know that the
+-						 * result fits in a fixedname.
+-						 */
+-						dns_fixedname_init(&fqname);
+-						result = dns_name_copy(
+-						  dns_fixedname_name(&dname),
+-						  dns_fixedname_name(&fqname),
+-						  NULL);
+-						if (result != ISC_R_SUCCESS)
+-							return (result);
+-						wanted_chaining = ISC_TRUE;
+-						name->attributes |=
+-							DNS_NAMEATTR_CHAINING;
+-						rdataset->attributes |=
+-						    DNS_RDATASETATTR_CHAINING;
+-						qname = dns_fixedname_name(
+-								   &fqname);
+ 					}
++					rdataset->attributes |= aflag;
++					if (aa)
++						rdataset->trust =
++						  dns_trust_authanswer;
++				} else if (external) {
++					rdataset->attributes |=
++					    DNS_RDATASETATTR_EXTERNAL;
+ 				}
+ 			}
++
++			/*
++			 * DNAME chaining.
++			 */
++			if (dnameset != NULL) {
++				/*
++				 * Copy the dname into the qname fixed name.
++				 *
++				 * Although we check for failure of the copy
++				 * operation, in practice it should never fail
++				 * since we already know that the  result fits
++				 * in a fixedname.
++				 */
++				dns_fixedname_init(&fqname);
++				qname = dns_fixedname_name(&fqname);
++				result = dns_name_copy(dname, qname, NULL);
++				if (result != ISC_R_SUCCESS)
++					return (result);
++				wanted_chaining = ISC_TRUE;
++				name->attributes |= DNS_NAMEATTR_CHAINING;
++				dnameset->attributes |=
++					    DNS_RDATASETATTR_CHAINING;
++			}
+ 			if (wanted_chaining)
+ 				chaining = ISC_TRUE;
+ 		}
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2088.patch b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2088.patch
new file mode 100644
index 0000000..1b84d46
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/bind/bind/CVE-2016-2088.patch
@@ -0,0 +1,247 @@
+CVE-2016-2088
+
+Backport commit d7ff9a1c41bf0ba9773cb3adb08b48b9fd57c956 from the
+v9_10_3_patch branch.
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-2088
+https://kb.isc.org/article/AA-01351
+
+CVE: CVE-2016-2088
+Upstream-Status: Backport
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+
+Original commit message from Mark Andrews <marka@isc.org> below:
+
+4322.   [security]      Duplicate EDNS COOKIE options in a response could
+                        trigger an assertion failure. (CVE-2016-2088)
+                        [RT #41809]
+
+(cherry picked from commit 455c0848f80a8acda27aad1466c72987cafaa029)
+(cherry picked from commit 7cd300abd6ee8b8ee8730593daf742ba53f90bc3)
+---
+ CHANGES            |  4 ++++
+ bin/dig/dighost.c  |  9 +++++++++
+ bin/named/client.c | 33 +++++++++++++++++++++++----------
+ doc/arm/notes.xml  |  7 +++++++
+ lib/dns/resolver.c | 14 +++++++++++++-
+ 5 files changed, 56 insertions(+), 11 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index c5b5d2b..d2e3360 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -1,3 +1,7 @@
++4322.  [security]      Duplicate EDNS COOKIE options in a response could
++                       trigger an assertion failure. (CVE-2016-2088)
++                       [RT #41809]
++
+ 4319.  [security]      Fix resolver assertion failure due to improper
+                        DNAME handling when parsing fetch reply messages.
+                        (CVE-2016-1286) [RT #41753]
+diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c
+index ca82f8e..340904f 100644
+--- a/bin/dig/dighost.c
++++ b/bin/dig/dighost.c
+@@ -3458,6 +3458,7 @@ process_opt(dig_lookup_t *l, dns_message_t *msg) {
+ 	isc_buffer_t optbuf;
+ 	isc_uint16_t optcode, optlen;
+ 	dns_rdataset_t *opt = msg->opt;
++	isc_boolean_t seen_cookie = ISC_FALSE;
+ 
+ 	result = dns_rdataset_first(opt);
+ 	if (result == ISC_R_SUCCESS) {
+@@ -3470,7 +3471,15 @@ process_opt(dig_lookup_t *l, dns_message_t *msg) {
+ 			optlen = isc_buffer_getuint16(&optbuf);
+ 			switch (optcode) {
+ 			case DNS_OPT_COOKIE:
++				/*
++				 * Only process the first cookie option.
++				 */
++				if (seen_cookie) {
++					isc_buffer_forward(&optbuf, optlen);
++					break;
++				}
+ 				process_sit(l, msg, &optbuf, optlen);
++				seen_cookie = ISC_TRUE;
+ 				break;
+ 			default:
+ 				isc_buffer_forward(&optbuf, optlen);
+diff --git a/bin/named/client.c b/bin/named/client.c
+index 683305c..0d7331a 100644
+--- a/bin/named/client.c
++++ b/bin/named/client.c
+@@ -120,7 +120,10 @@
+  */
+ #endif
+ 
+-#define SIT_SIZE 24U /* 8 + 4 + 4 + 8 */
++#define COOKIE_SIZE 24U /* 8 + 4 + 4 + 8 */
++
++#define WANTNSID(x) (((x)->attributes & NS_CLIENTATTR_WANTNSID) != 0)
++#define WANTEXPIRE(x) (((x)->attributes & NS_CLIENTATTR_WANTEXPIRE) != 0)
+ 
+ /*% nameserver client manager structure */
+ struct ns_clientmgr {
+@@ -1395,7 +1398,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
+ {
+ 	char nsid[BUFSIZ], *nsidp;
+ #ifdef ISC_PLATFORM_USESIT
+-	unsigned char sit[SIT_SIZE];
++	unsigned char sit[COOKIE_SIZE];
+ #endif
+ 	isc_result_t result;
+ 	dns_view_t *view;
+@@ -1420,7 +1423,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
+ 	flags = client->extflags & DNS_MESSAGEEXTFLAG_REPLYPRESERVE;
+ 
+ 	/* Set EDNS options if applicable */
+-	if ((client->attributes & NS_CLIENTATTR_WANTNSID) != 0 &&
++	if (WANTNSID(client) &&
+ 	    (ns_g_server->server_id != NULL ||
+ 	     ns_g_server->server_usehostname)) {
+ 		if (ns_g_server->server_usehostname) {
+@@ -1453,7 +1456,7 @@ ns_client_addopt(ns_client_t *client, dns_message_t *message,
+ 
+ 		INSIST(count < DNS_EDNSOPTIONS);
+ 		ednsopts[count].code = DNS_OPT_COOKIE;
+-		ednsopts[count].length = SIT_SIZE;
++		ednsopts[count].length = COOKIE_SIZE;
+ 		ednsopts[count].value = sit;
+ 		count++;
+ 	}
+@@ -1661,19 +1664,26 @@ compute_sit(ns_client_t *client, isc_uint32_t when, isc_uint32_t nonce,
+ 
+ static void
+ process_sit(ns_client_t *client, isc_buffer_t *buf, size_t optlen) {
+-	unsigned char dbuf[SIT_SIZE];
++	unsigned char dbuf[COOKIE_SIZE];
+ 	unsigned char *old;
+ 	isc_stdtime_t now;
+ 	isc_uint32_t when;
+ 	isc_uint32_t nonce;
+ 	isc_buffer_t db;
+ 
++	/*
++	 * If we have already seen a ECS option skip this ECS option.
++	 */
++	if ((client->attributes & NS_CLIENTATTR_WANTSIT) != 0) {
++		isc_buffer_forward(buf, optlen);
++		return;
++	}
+ 	client->attributes |= NS_CLIENTATTR_WANTSIT;
+ 
+ 	isc_stats_increment(ns_g_server->nsstats,
+ 			    dns_nsstatscounter_sitopt);
+ 
+-	if (optlen != SIT_SIZE) {
++	if (optlen != COOKIE_SIZE) {
+ 		/*
+ 		 * Not our token.
+ 		 */
+@@ -1717,14 +1727,13 @@ process_sit(ns_client_t *client, isc_buffer_t *buf, size_t optlen) {
+ 	isc_buffer_init(&db, dbuf, sizeof(dbuf));
+ 	compute_sit(client, when, nonce, &db);
+ 
+-	if (!isc_safe_memequal(old, dbuf, SIT_SIZE)) {
++	if (!isc_safe_memequal(old, dbuf, COOKIE_SIZE)) {
+ 		isc_stats_increment(ns_g_server->nsstats,
+ 				    dns_nsstatscounter_sitnomatch);
+ 		return;
+ 	}
+ 	isc_stats_increment(ns_g_server->nsstats,
+ 			    dns_nsstatscounter_sitmatch);
+-
+ 	client->attributes |= NS_CLIENTATTR_HAVESIT;
+ }
+ #endif
+@@ -1783,7 +1792,9 @@ process_opt(ns_client_t *client, dns_rdataset_t *opt) {
+ 			optlen = isc_buffer_getuint16(&optbuf);
+ 			switch (optcode) {
+ 			case DNS_OPT_NSID:
+-				isc_stats_increment(ns_g_server->nsstats,
++				if (!WANTNSID(client))
++					isc_stats_increment(
++						    ns_g_server->nsstats,
+ 						    dns_nsstatscounter_nsidopt);
+ 				client->attributes |= NS_CLIENTATTR_WANTNSID;
+ 				isc_buffer_forward(&optbuf, optlen);
+@@ -1794,7 +1805,9 @@ process_opt(ns_client_t *client, dns_rdataset_t *opt) {
+ 				break;
+ #endif
+ 			case DNS_OPT_EXPIRE:
+-				isc_stats_increment(ns_g_server->nsstats,
++				if (!WANTEXPIRE(client))
++					isc_stats_increment(
++						  ns_g_server->nsstats,
+ 						  dns_nsstatscounter_expireopt);
+ 				client->attributes |= NS_CLIENTATTR_WANTEXPIRE;
+ 				isc_buffer_forward(&optbuf, optlen);
+diff --git a/doc/arm/notes.xml b/doc/arm/notes.xml
+index ebf4f55..095eb5b 100644
+--- a/doc/arm/notes.xml
++++ b/doc/arm/notes.xml
+@@ -51,6 +51,13 @@
+     <title>Security Fixes</title>
+     <itemizedlist>
+       <listitem>
++       <para>
++         Duplicate EDNS COOKIE options in a response could trigger
++         an assertion failure. This flaw is disclosed in CVE-2016-2088.
++         [RT #41809]
++       </para>
++      </listitem>
++      <listitem>
+ 	<para>
+ 	  Specific APL data could trigger an INSIST.  This flaw
+ 	  was discovered by Brian Mitchell and is disclosed in
+diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
+index a797e3f..ba1ae23 100644
+--- a/lib/dns/resolver.c
++++ b/lib/dns/resolver.c
+@@ -7502,7 +7502,9 @@ process_opt(resquery_t *query, dns_rdataset_t *opt) {
+ 	unsigned char *sit;
+ 	dns_adbaddrinfo_t *addrinfo;
+ 	unsigned char cookie[8];
++	isc_boolean_t seen_cookie = ISC_FALSE;
+ #endif
++	isc_boolean_t seen_nsid = ISC_FALSE;
+ 
+ 	result = dns_rdataset_first(opt);
+ 	if (result == ISC_R_SUCCESS) {
+@@ -7516,14 +7518,23 @@ process_opt(resquery_t *query, dns_rdataset_t *opt) {
+ 			INSIST(optlen <= isc_buffer_remaininglength(&optbuf));
+ 			switch (optcode) {
+ 			case DNS_OPT_NSID:
+-				if (query->options & DNS_FETCHOPT_WANTNSID)
++				if (!seen_nsid &&
++				    query->options & DNS_FETCHOPT_WANTNSID)
+ 					log_nsid(&optbuf, optlen, query,
+ 						 ISC_LOG_DEBUG(3),
+ 						 query->fctx->res->mctx);
+ 				isc_buffer_forward(&optbuf, optlen);
++				seen_nsid = ISC_TRUE;
+ 				break;
+ #ifdef ISC_PLATFORM_USESIT
+ 			case DNS_OPT_COOKIE:
++				/*
++				 * Only process the first cookie option.
++				 */
++				if (seen_cookie) {
++					isc_buffer_forward(&optbuf, optlen);
++					break;
++				}
+ 				sit = isc_buffer_current(&optbuf);
+ 				compute_cc(query, cookie, sizeof(cookie));
+ 				INSIST(query->fctx->rmessage->sitbad == 0 &&
+@@ -7541,6 +7552,7 @@ process_opt(resquery_t *query, dns_rdataset_t *opt) {
+ 				isc_buffer_forward(&optbuf, optlen);
+ 				inc_stats(query->fctx->res,
+ 					  dns_resstatscounter_sitin);
++				seen_cookie = ISC_TRUE;
+ 				break;
+ #endif
+ 			default:
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.2-P4.bb b/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.2-P4.bb
deleted file mode 100644
index 19f87d7..0000000
--- a/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.2-P4.bb
+++ /dev/null
@@ -1,107 +0,0 @@
-SUMMARY = "ISC Internet Domain Name Server"
-HOMEPAGE = "http://www.isc.org/sw/bind/"
-SECTION = "console/network"
-
-LICENSE = "ISC & BSD"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=0a95f52a0ab6c5f52dedc9a45e7abb3f"
-
-DEPENDS = "openssl libcap"
-
-SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
-           file://conf.patch \
-           file://make-etc-initd-bind-stop-work.patch \
-           file://mips1-not-support-opcode.diff \
-           file://dont-test-on-host.patch \
-           file://generate-rndc-key.sh \
-           file://named.service \
-           file://bind9 \
-           file://init.d-add-support-for-read-only-rootfs.patch \
-           file://bind-confgen-build-unix.o-once.patch \
-           file://0001-build-use-pkg-config-to-find-libxml2.patch \
-           file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
-           file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
-           file://0001-lib-dns-gen.c-fix-too-long-error.patch \
-           file://CVE-2015-8704.patch \
-           file://CVE-2015-8705.patch \
-           file://CVE-2015-8000.patch \
-           file://CVE-2015-8461.patch \
-           "
-
-SRC_URI[md5sum] = "8b1f5064837756c938eadc1537dec5c7"
-SRC_URI[sha256sum] = "c00b21ec1def212957f28efe9d10aac52d6ec515e84fbf2c42143f5d71429cb8"
-
-ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
-EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads \
-                 --disable-devpoll --disable-epoll --with-gost=no \
-                 --with-gssapi=no --with-ecdsa=yes \
-                 --sysconfdir=${sysconfdir}/bind \
-                 --with-openssl=${STAGING_LIBDIR}/.. \
-               "
-inherit autotools update-rc.d systemd useradd pkgconfig
-
-PACKAGECONFIG ?= ""
-PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = "--system --home /var/cache/bind --no-create-home \
-                       --user-group bind"
-
-INITSCRIPT_NAME = "bind"
-INITSCRIPT_PARAMS = "defaults"
-
-SYSTEMD_SERVICE_${PN} = "named.service"
-
-PARALLEL_MAKE = ""
-
-RDEPENDS_${PN} = "python-core"
-RDEPENDS_${PN}-dev = ""
-
-PACKAGE_BEFORE_PN += "${PN}-utils"
-FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
-FILES_${PN}-dev += "${bindir}/isc-config.h"
-FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
-
-do_install_prepend() {
-	# clean host path in isc-config.sh before the hardlink created
-	# by "make install":
-	#   bind9-config -> isc-config.sh
-	sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
-}
-
-do_install_append() {
-	rm "${D}${bindir}/nslookup"
-	rm "${D}${mandir}/man1/nslookup.1"
-	rmdir "${D}${localstatedir}/run"
-	rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
-	install -d "${D}${localstatedir}/cache/bind"
-	install -d "${D}${sysconfdir}/bind"
-	install -d "${D}${sysconfdir}/init.d"
-	install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
-	install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
-	sed -i -e '1s,#!.*python,#! /usr/bin/env python,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
-
-	# Install systemd related files
-	install -d ${D}${localstatedir}/cache/bind
-	install -d ${D}${sbindir}
-	install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
-	install -d ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
-	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-	       -e 's,@SBINDIR@,${sbindir},g' \
-	       ${D}${systemd_unitdir}/system/named.service
-
-	install -d ${D}${sysconfdir}/default
-	install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
-}
-
-CONFFILES_${PN} = " \
-	${sysconfdir}/bind/named.conf \
-	${sysconfdir}/bind/named.conf.local \
-	${sysconfdir}/bind/named.conf.options \
-	${sysconfdir}/bind/db.0 \
-	${sysconfdir}/bind/db.127 \
-	${sysconfdir}/bind/db.empty \
-	${sysconfdir}/bind/db.local \
-	${sysconfdir}/bind/db.root \
-	"
-
diff --git a/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb b/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
new file mode 100644
index 0000000..1e3a20f
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/bind/bind_9.10.3-P3.bb
@@ -0,0 +1,109 @@
+SUMMARY = "ISC Internet Domain Name Server"
+HOMEPAGE = "http://www.isc.org/sw/bind/"
+SECTION = "console/network"
+
+LICENSE = "ISC & BSD"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=0a95f52a0ab6c5f52dedc9a45e7abb3f"
+
+DEPENDS = "openssl libcap"
+
+SRC_URI = "ftp://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.gz \
+           file://conf.patch \
+           file://make-etc-initd-bind-stop-work.patch \
+           file://mips1-not-support-opcode.diff \
+           file://dont-test-on-host.patch \
+           file://generate-rndc-key.sh \
+           file://named.service \
+           file://bind9 \
+           file://init.d-add-support-for-read-only-rootfs.patch \
+           file://bind-confgen-build-unix.o-once.patch \
+           file://0001-build-use-pkg-config-to-find-libxml2.patch \
+           file://bind-ensure-searching-for-json-headers-searches-sysr.patch \
+           file://0001-gen.c-extend-DIRNAMESIZE-from-256-to-512.patch \
+           file://0001-lib-dns-gen.c-fix-too-long-error.patch \
+           file://CVE-2016-1285.patch \
+           file://CVE-2016-1286_1.patch \
+           file://CVE-2016-1286_2.patch \
+           file://CVE-2016-2088.patch \
+           "
+
+SRC_URI[md5sum] = "bcf7e772b616f7259420a3edc5df350a"
+SRC_URI[sha256sum] = "690810d1fbb72afa629e74638d19cd44e28d2b2e5eb63f55c705ad85d1a4cb83"
+
+ENABLE_IPV6 = "--enable-ipv6=${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'yes', 'no', d)}"
+EXTRA_OECONF = " ${ENABLE_IPV6} --with-randomdev=/dev/random --disable-threads \
+                 --disable-devpoll --disable-epoll --with-gost=no \
+                 --with-gssapi=no --with-ecdsa=yes \
+                 --sysconfdir=${sysconfdir}/bind \
+                 --with-openssl=${STAGING_LIBDIR}/.. \
+               "
+inherit autotools update-rc.d systemd useradd pkgconfig
+
+# PACKAGECONFIGs readline and libedit should NOT be set at same time
+PACKAGECONFIG ?= "readline"
+PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2"
+PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline"
+PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/cache/bind --no-create-home \
+                       --user-group bind"
+
+INITSCRIPT_NAME = "bind"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "named.service"
+
+PARALLEL_MAKE = ""
+
+RDEPENDS_${PN} = "python-core"
+RDEPENDS_${PN}-dev = ""
+
+PACKAGE_BEFORE_PN += "${PN}-utils"
+FILES_${PN}-utils = "${bindir}/host ${bindir}/dig"
+FILES_${PN}-dev += "${bindir}/isc-config.h"
+FILES_${PN} += "${sbindir}/generate-rndc-key.sh"
+
+do_install_prepend() {
+	# clean host path in isc-config.sh before the hardlink created
+	# by "make install":
+	#   bind9-config -> isc-config.sh
+	sed -i -e "s,${STAGING_LIBDIR},${libdir}," ${B}/isc-config.sh
+}
+
+do_install_append() {
+	rm "${D}${bindir}/nslookup"
+	rm "${D}${mandir}/man1/nslookup.1"
+	rmdir "${D}${localstatedir}/run"
+	rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
+	install -d -o bind "${D}${localstatedir}/cache/bind"
+	install -d "${D}${sysconfdir}/bind"
+	install -d "${D}${sysconfdir}/init.d"
+	install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/"
+	install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind"
+	sed -i -e '1s,#!.*python,#! /usr/bin/env python,' ${D}${sbindir}/dnssec-coverage ${D}${sbindir}/dnssec-checkds
+
+	# Install systemd related files
+	install -d ${D}${sbindir}
+	install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir}
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/named.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+	       -e 's,@SBINDIR@,${sbindir},g' \
+	       ${D}${systemd_unitdir}/system/named.service
+
+	install -d ${D}${sysconfdir}/default
+	install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default
+}
+
+CONFFILES_${PN} = " \
+	${sysconfdir}/bind/named.conf \
+	${sysconfdir}/bind/named.conf.local \
+	${sysconfdir}/bind/named.conf.options \
+	${sysconfdir}/bind/db.0 \
+	${sysconfdir}/bind/db.127 \
+	${sysconfdir}/bind/db.empty \
+	${sysconfdir}/bind/db.local \
+	${sysconfdir}/bind/db.root \
+	"
+
diff --git a/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
index df42c88..a508229 100644
--- a/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
+++ b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5.inc
@@ -18,10 +18,14 @@
 
 SRC_URI = "\
     ${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \
+    file://init \
+    file://run-ptest \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \
+    file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
 "
 S = "${WORKDIR}/bluez-${PV}"
 
-inherit autotools-brokensep pkgconfig systemd
+inherit autotools-brokensep pkgconfig systemd update-rc.d distro_features_check ptest
 
 EXTRA_OECONF = "\
   --enable-tools \
@@ -42,6 +46,9 @@
 "
 
 do_install_append() {
+	install -d ${D}${INIT_D_DIR}
+	install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth
+
 	install -d ${D}${sysconfdir}/bluetooth/
 	if [ -f ${S}/profiles/audio/audio.conf ]; then
 	    install -m 0644 ${S}/profiles/audio/audio.conf ${D}/${sysconfdir}/bluetooth/
@@ -53,8 +60,6 @@
 	    install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/
 	fi
 
-	install -m 0644 ${S}/src/bluetooth.conf ${D}/${sysconfdir}/dbus-1/system.d/
-
 	# Install desired tools that upstream leaves in build area
         for f in ${NOINST_TOOLS} ; do
 	    install -m 755 ${B}/$f ${D}/${bindir}
@@ -89,16 +94,19 @@
 
 FILES_${PN}-noinst-tools = "${@get_noinst_tools_paths(d, bb, d.getVar('NOINST_TOOLS', True))}"
 
-FILES_${PN}-dbg += "\
-  ${libexecdir}/bluetooth/.debug \
-  ${libdir}/bluetooth/plugins/.debug \
-  ${libdir}/*/.debug \
-  */udev/.debug \
-  */*/udev/.debug \
-  "
-
 RDEPENDS_${PN}-testtools += "python python-dbus python-pygobject"
 
 SYSTEMD_SERVICE_${PN} = "bluetooth.service"
+INITSCRIPT_PACKAGES = "${PN}"
+INITSCRIPT_NAME_${PN} = "bluetooth"
 
 EXCLUDE_FROM_WORLD = "1"
+
+do_compile_ptest() {
+        oe_runmake buildtests
+}
+
+do_install_ptest() {
+        cp -r ${B}/unit/ ${D}${PTEST_PATH}
+        rm ${D}${PTEST_PATH}/unit/*.c ${D}${PTEST_PATH}/unit/*.o
+}
diff --git a/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
new file mode 100644
index 0000000..2fde7bc
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch
@@ -0,0 +1,63 @@
+From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org>
+Date: Sat, 12 Oct 2013 17:45:25 +0200
+Subject: [PATCH] Allow using obexd without systemd in the user session
+
+Not all sessions run systemd --user (actually, the majority
+doesn't), so the dbus daemon must be able to spawn obexd
+directly, and to do so it needs the full path of the daemon.
+
+Upstream-Status: Denied
+
+Not accepted by upstream maintainer for being a distro specific
+configuration. See thread:
+
+http://thread.gmane.org/gmane.linux.bluez.kernel/38725/focus=38843
+
+Signed-off-by: Javier Viguera <javier.viguera@digi.com>
+---
+ Makefile.obexd                      | 4 ++--
+ obexd/src/org.bluez.obex.service    | 4 ----
+ obexd/src/org.bluez.obex.service.in | 4 ++++
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+ delete mode 100644 obexd/src/org.bluez.obex.service
+ create mode 100644 obexd/src/org.bluez.obex.service.in
+
+diff --git a/Makefile.obexd b/Makefile.obexd
+index 2e33cbc72f2b..d5d858c857b4 100644
+--- a/Makefile.obexd
++++ b/Makefile.obexd
+@@ -2,12 +2,12 @@
+ if SYSTEMD
+ systemduserunitdir = @SYSTEMD_USERUNITDIR@
+ systemduserunit_DATA = obexd/src/obex.service
++endif
+ 
+ dbussessionbusdir = @DBUS_SESSIONBUSDIR@
+ dbussessionbus_DATA = obexd/src/org.bluez.obex.service
+-endif
+ 
+-EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service
++EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in
+ 
+ obex_plugindir = $(libdir)/obex/plugins
+ 
+diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service
+deleted file mode 100644
+index a53808884554..000000000000
+--- a/obexd/src/org.bluez.obex.service
++++ /dev/null
+@@ -1,4 +0,0 @@
+-[D-BUS Service]
+-Name=org.bluez.obex
+-Exec=/bin/false
+-SystemdService=dbus-org.bluez.obex.service
+diff --git a/obexd/src/org.bluez.obex.service.in b/obexd/src/org.bluez.obex.service.in
+new file mode 100644
+index 000000000000..9c815f246b77
+--- /dev/null
++++ b/obexd/src/org.bluez.obex.service.in
+@@ -0,0 +1,4 @@
++[D-BUS Service]
++Name=org.bluez.obex
++Exec=@libexecdir@/obexd
++SystemdService=dbus-org.bluez.obex.service
diff --git a/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch
new file mode 100644
index 0000000..24ddae6
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch
@@ -0,0 +1,28 @@
+From 4bdf0f96dcaa945fd29f26d56e5b36d8c23e4c8b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 1 Apr 2016 17:07:34 +0300
+Subject: [PATCH] tests: add a target for building tests without running them
+
+Upstream-Status: Inappropriate [oe specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile.am | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 1a48a71..ba3b92f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -425,6 +425,9 @@ endif
+ TESTS = $(unit_tests)
+ AM_TESTS_ENVIRONMENT = MALLOC_CHECK_=3 MALLOC_PERTURB_=69
+ 
++# This allows building tests without running them
++buildtests: $(TESTS)
++
+ if DBUS_RUN_SESSION
+ AM_TESTS_ENVIRONMENT += dbus-run-session --
+ endif
+-- 
+2.8.0.rc3
+
diff --git a/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/init b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/init
new file mode 100644
index 0000000..1606a5c
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/init
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DESC=bluetooth
+
+DAEMON=/usr/lib/bluez5/bluetooth/bluetoothd
+
+# If you want to be ignore error of "org.freedesktop.hostname1",
+# please enable NOPLUGIN_OPTION.
+# NOPLUGIN_OPTION="--noplugin=hostname"
+NOPLUGIN_OPTION=""
+SSD_OPTIONS="--oknodo --quiet --exec $DAEMON -- $NOPLUGIN_OPTION"
+
+test -f $DAEMON || exit 0
+
+# FIXME: any of the sourced files may fail if/with syntax errors
+test -f /etc/default/bluetooth && . /etc/default/bluetooth
+test -f /etc/default/rcS && . /etc/default/rcS
+
+set -e
+
+case $1 in
+  start)
+	echo "Starting $DESC"
+
+	if test "$BLUETOOTH_ENABLED" = 0; then
+		echo "disabled. see /etc/default/bluetooth"
+		exit 0
+	fi
+
+	start-stop-daemon --start --background $SSD_OPTIONS
+	echo "${DAEMON##*/}"
+
+  ;;
+  stop)
+	echo "Stopping $DESC"
+	if test "$BLUETOOTH_ENABLED" = 0; then
+		echo "disabled."
+		exit 0
+	fi
+	start-stop-daemon --stop $SSD_OPTIONS
+	echo "${DAEMON}"
+  ;;
+  restart|force-reload)
+	$0 stop
+	sleep 1
+	$0 start
+  ;;
+  status)
+	 pidof ${DAEMON} >/dev/null
+	 status=$?
+        if [ $status -eq 0 ]; then
+                 echo "bluetooth is running."
+        else
+                echo "bluetooth is not running"
+        fi
+        exit $status
+   ;;
+   *)
+	N=/etc/init.d/bluetooth
+	echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
+	exit 1
+	;;
+esac
+
+exit 0
+
+# vim:noet
diff --git a/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/run-ptest b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/run-ptest
new file mode 100644
index 0000000..21df00c
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5/run-ptest
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+cd unit
+
+failed=0
+all=0
+
+for f in test-*; do
+    "./$f"
+    case "$?" in
+        0)
+            echo "PASS: $f"
+            all=$((all + 1))
+            ;;
+        77)
+            echo "SKIP: $f"
+            ;;
+        *)
+            echo "FAIL: $f"
+            failed=$((failed + 1))
+            all=$((all + 1))
+            ;;
+    esac
+done
+
+if [ "$failed" -eq 0 ] ; then
+  echo "All $all tests passed"
+else
+  echo "$failed of $all tests failed"
+fi
+
diff --git a/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.33.bb b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.33.bb
deleted file mode 100644
index 23c7397..0000000
--- a/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.33.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-require bluez5.inc
-SRC_URI[md5sum] = "78782dc33d9a8b6344c4cc1af70c8a98"
-SRC_URI[sha256sum] = "1801807a13506678cbfeb15c6a4b89ecb5739efe1067eb464da6641d731436d3"
-
-# noinst programs in Makefile.tools that are conditional on READLINE
-# support
-NOINST_TOOLS_READLINE ?= " \
-    attrib/gatttool \
-    tools/obex-client-tool \
-    tools/obex-server-tool \
-    tools/bluetooth-player \
-    tools/obexctl \
-"
-
-# noinst programs in Makefile.tools that are conditional on EXPERIMENTAL
-# support
-NOINST_TOOLS_EXPERIMENTAL ?= " \
-    emulator/btvirt \
-    emulator/b1ee \
-    emulator/hfp \
-    tools/3dsp \
-    tools/mgmt-tester \
-    tools/gap-tester \
-    tools/l2cap-tester \
-    tools/sco-tester \
-    tools/smp-tester \
-    tools/hci-tester \
-    tools/rfcomm-tester \
-    tools/bdaddr \
-    tools/avinfo \
-    tools/avtest \
-    tools/scotest \
-    tools/amptest \
-    tools/hwdb \
-    tools/hcieventmask \
-    tools/hcisecfilter \
-    tools/btmgmt \
-    tools/btinfo \
-    tools/btattach \
-    tools/btsnoop \
-    tools/btproxy \
-    tools/btiotest \
-    tools/mcaptest \
-    tools/cltest \
-    tools/oobtest \
-    tools/seq2bseq \
-    tools/ibeacon \
-    tools/btgatt-client \
-    tools/btgatt-server \
-    tools/gatt-service \
-    profiles/iap/iapd \
-"
diff --git a/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.37.bb b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.37.bb
new file mode 100644
index 0000000..db20f79
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/bluez5/bluez5_5.37.bb
@@ -0,0 +1,55 @@
+require bluez5.inc
+
+REQUIRED_DISTRO_FEATURES = "bluez5"
+
+SRC_URI[md5sum] = "33177e5743e24b2b3738f72be64e3ffb"
+SRC_URI[sha256sum] = "c14ba9ddcb0055522073477b8fd8bf1ddf5d219e75fdfd4699b7e0ce5350d6b0"
+
+# noinst programs in Makefile.tools that are conditional on READLINE
+# support
+NOINST_TOOLS_READLINE ?= " \
+    attrib/gatttool \
+    tools/obex-client-tool \
+    tools/obex-server-tool \
+    tools/bluetooth-player \
+    tools/obexctl \
+"
+
+# noinst programs in Makefile.tools that are conditional on EXPERIMENTAL
+# support
+NOINST_TOOLS_EXPERIMENTAL ?= " \
+    emulator/btvirt \
+    emulator/b1ee \
+    emulator/hfp \
+    tools/3dsp \
+    tools/mgmt-tester \
+    tools/gap-tester \
+    tools/l2cap-tester \
+    tools/sco-tester \
+    tools/smp-tester \
+    tools/hci-tester \
+    tools/rfcomm-tester \
+    tools/bdaddr \
+    tools/avinfo \
+    tools/avtest \
+    tools/scotest \
+    tools/amptest \
+    tools/hwdb \
+    tools/hcieventmask \
+    tools/hcisecfilter \
+    tools/btmgmt \
+    tools/btinfo \
+    tools/btattach \
+    tools/btsnoop \
+    tools/btproxy \
+    tools/btiotest \
+    tools/mcaptest \
+    tools/cltest \
+    tools/oobtest \
+    tools/seq2bseq \
+    tools/ibeacon \
+    tools/btgatt-client \
+    tools/btgatt-server \
+    tools/gatt-service \
+    profiles/iap/iapd \
+"
diff --git a/yocto-poky/meta/recipes-connectivity/connman/connman-conf.bb b/yocto-poky/meta/recipes-connectivity/connman/connman-conf.bb
index 9254ed7..9a519ec 100644
--- a/yocto-poky/meta/recipes-connectivity/connman/connman-conf.bb
+++ b/yocto-poky/meta/recipes-connectivity/connman/connman-conf.bb
@@ -4,8 +4,11 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
 
+inherit systemd
+
 SRC_URI_append_qemuall = " file://wired.config \
                            file://wired-setup \
+                           file://wired-connection.service \
 "
 PR = "r2"
 
@@ -17,10 +20,17 @@
 
 do_install() {
     #Configure Wired network interface in case of qemu* machines
-    if test -e ${WORKDIR}/wired.config && test -e ${WORKDIR}/wired-setup; then
+    if test -e ${WORKDIR}/wired.config &&
+       test -e ${WORKDIR}/wired-setup &&
+       test -e ${WORKDIR}/wired-connection.service; then
         install -d ${D}${localstatedir}/lib/connman
         install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman
         install -d ${D}${datadir}/connman
         install -m 0755 ${WORKDIR}/wired-setup ${D}${datadir}/connman
+        install -d ${D}${systemd_system_unitdir}
+        install -m 0644 ${WORKDIR}/wired-connection.service ${D}${systemd_system_unitdir}
+        sed -i -e 's|@SCRIPTDIR@|${datadir}/connman|g' ${D}${systemd_system_unitdir}/wired-connection.service
     fi
 }
+
+SYSTEMD_SERVICE_${PN}_qemuall = "wired-connection.service"
diff --git a/yocto-poky/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service b/yocto-poky/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service
new file mode 100644
index 0000000..48adfc0
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Setup a wired interface
+Before=connman.service
+
+[Service]
+Type=oneshot
+ExecStart=@SCRIPTDIR@/wired-setup
+
+[Install]
+WantedBy=network.target
diff --git a/yocto-poky/meta/recipes-connectivity/connman/connman.inc b/yocto-poky/meta/recipes-connectivity/connman/connman.inc
index afdb3f2..c375251 100644
--- a/yocto-poky/meta/recipes-connectivity/connman/connman.inc
+++ b/yocto-poky/meta/recipes-connectivity/connman/connman.inc
@@ -15,7 +15,7 @@
 
 inherit autotools pkgconfig systemd update-rc.d bluetooth
 
-DEPENDS  = "dbus glib-2.0 ppp iptables"
+DEPENDS  = "dbus glib-2.0 ppp iptables readline"
 
 INC_PR = "r20"
 
@@ -43,7 +43,7 @@
 # local.conf or distro config
 # PACKAGECONFIG_append_pn-connman = " openvpn vpnc l2tp pptp"
 
-PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_unitdir}/system/,--with-systemdunitdir="
+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[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
@@ -68,11 +68,7 @@
 
 SYSTEMD_SERVICE_${PN} = "connman.service"
 SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
-SYSTEMD_WIRED_SETUP = "ExecStartPre=-${datadir}/connman/wired-setup"
-
-do_compile_append() {
-	sed -i "s#ExecStart=#${SYSTEMD_WIRED_SETUP}\nExecStart=#" ${B}/src/connman.service
-}
+SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service"
 
 do_install_append() {
 	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
@@ -142,23 +138,26 @@
 PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
 
 FILES_${PN}-tools = "${bindir}/wispr"
+RDEPENDS_${PN}-tools ="${PN}"
 
 FILES_${PN}-tests = "${bindir}/*-test ${libdir}/${BPN}/test/*"
-RDEPENDS_${PN}-tests = "python-dbus python-pygobject python-textutils python-subprocess python-fcntl python-netclient"
+RDEPENDS_${PN}-tests = "python-dbus python-pygobject python-textutils python-subprocess python-fcntl python-netclient \
+                        ${PN} \
+"
 
 FILES_${PN}-client = "${bindir}/connmanctl"
+RDEPENDS_${PN}-client ="${PN}"
 
 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \
             ${libdir}/connman/plugins \
             ${sysconfdir} ${sharedstatedir} ${localstatedir} \
             ${base_bindir}/* ${base_sbindir}/* ${base_libdir}/*.so* ${datadir}/${PN} \
-            ${datadir}/dbus-1/system-services/*"
-
-FILES_${PN}-dbg += "${libdir}/connman/*/.debug"
+            ${datadir}/dbus-1/system-services/* \
+            ${sysconfdir}/tmpfiles.d/connman_resolvconf.conf"
 
 FILES_${PN}-dev += "${libdir}/connman/*/*.la"
 
-PACKAGES =+ "${PN}-vpn"
+PACKAGES =+ "${PN}-vpn ${PN}-wait-online"
 
 SUMMARY_${PN}-vpn = "A daemon for managing VPN connections within embedded devices"
 DESCRIPTION_${PN}-vpn = "The ConnMan VPN provides a daemon for \
@@ -172,6 +171,12 @@
                     ${datadir}/dbus-1/system-services/net.connman.vpn.service \
                     ${systemd_unitdir}/system/connman-vpn.service"
 
+SUMMARY_${PN}-wait-online = "A program that will return once ConnMan has connected to a network"
+DESCRIPTION_${PN}-wait-online = "A service that can be enabled so that \
+the system waits until a network connection is established."
+FILES_${PN}-wait-online += "${sbindir}/connmand-wait-online \
+                            ${systemd_unitdir}/system/connman-wait-online.service"
+
 SUMMARY_${PN}-plugin-vpn-openvpn = "An OpenVPN plugin for ConnMan VPN"
 DESCRIPTION_${PN}-plugin-vpn-openvpn = "The ConnMan OpenVPN plugin uses openvpn client \
 to create a VPN connection to OpenVPN server."
diff --git a/yocto-poky/meta/recipes-connectivity/connman/connman/0001-iptables-Add-missing-function-item-of-xtables-to-mat.patch b/yocto-poky/meta/recipes-connectivity/connman/connman/0001-iptables-Add-missing-function-item-of-xtables-to-mat.patch
new file mode 100644
index 0000000..1b5a3e4
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/connman/connman/0001-iptables-Add-missing-function-item-of-xtables-to-mat.patch
@@ -0,0 +1,42 @@
+From acea08a0e4234a4c1a87bedc087c73ff36de0c7b Mon Sep 17 00:00:00 2001
+From: Wu Zheng <wu.zheng@intel.com>
+Date: Thu, 28 Jan 2016 18:04:17 +0800
+Subject: [PATCH] iptables: Add missing function item of xtables to match
+ iptables 1.6
+
+The struct of xtables_globals has been modified in iptables 1.6.
+If connman runs with iptables 1.6, it can crash.
+
+Program received signal SIGSEGV, Segmentation fault.
+0x00000000 in ?? ()
+0xb7dea89c in xtables_find_target () from /usr/lib/libxtables.so.11
+0xb7deac1c in ?? () from /usr/lib/libxtables.so.11
+0xb7dea793 in xtables_find_target () from /usr/lib/libxtables.so.11
+
+The the missing function item of xtables is added to xtables_globals.
+
+Upstream-Status: Backport
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+Signed-off-by: Wu Zheng <wu.zheng@intel.com>
+---
+ src/iptables.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/iptables.c b/src/iptables.c
+index bc0c763..5ef757a 100644
+--- a/src/iptables.c
++++ b/src/iptables.c
+@@ -1566,6 +1566,9 @@ struct xtables_globals iptables_globals = {
+ 	.option_offset = 0,
+ 	.opts = iptables_opts,
+ 	.orig_opts = iptables_opts,
++#if XTABLES_VERSION_CODE > 10
++	.compat_rev = xtables_compatible_revision,
++#endif
+ };
+ 
+ static struct xtables_target *prepare_target(struct connman_iptables *table,
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch b/yocto-poky/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch
index 6327aa2..eefc683 100644
--- a/yocto-poky/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch
+++ b/yocto-poky/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch
@@ -14,10 +14,10 @@
  tools/dnsproxy-test.c | 1 +
  5 files changed, 3 insertions(+), 5 deletions(-)
 
-diff --git a/gweb/gresolv.c b/gweb/gresolv.c
-index 3ad8e70..61d6fe8 100644
---- a/gweb/gresolv.c
-+++ b/gweb/gresolv.c
+Index: connman-1.30/gweb/gresolv.c
+===================================================================
+--- connman-1.30.orig/gweb/gresolv.c
++++ connman-1.30/gweb/gresolv.c
 @@ -28,6 +28,7 @@
  #include <stdarg.h>
  #include <string.h>
@@ -26,10 +26,10 @@
  #include <resolv.h>
  #include <sys/types.h>
  #include <sys/socket.h>
-diff --git a/plugins/wifi.c b/plugins/wifi.c
-index dfe849f..99cff3f 100644
---- a/plugins/wifi.c
-+++ b/plugins/wifi.c
+Index: connman-1.30/plugins/wifi.c
+===================================================================
+--- connman-1.30.orig/plugins/wifi.c
++++ connman-1.30/plugins/wifi.c
 @@ -30,9 +30,8 @@
  #include <string.h>
  #include <sys/ioctl.h>
@@ -41,10 +41,10 @@
  
  #ifndef IFF_LOWER_UP
  #define IFF_LOWER_UP	0x10000
-diff --git a/src/tethering.c b/src/tethering.c
-index ceeec74..c44cb36 100644
---- a/src/tethering.c
-+++ b/src/tethering.c
+Index: connman-1.30/src/tethering.c
+===================================================================
+--- connman-1.30.orig/src/tethering.c
++++ connman-1.30/src/tethering.c
 @@ -31,10 +31,8 @@
  #include <stdio.h>
  #include <sys/ioctl.h>
@@ -56,10 +56,10 @@
  #include <netinet/in.h>
  #include <linux/if_bridge.h>
  
-diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c
-index c34e10a..eae66fc 100644
---- a/tools/dhcp-test.c
-+++ b/tools/dhcp-test.c
+Index: connman-1.30/tools/dhcp-test.c
+===================================================================
+--- connman-1.30.orig/tools/dhcp-test.c
++++ connman-1.30/tools/dhcp-test.c
 @@ -33,7 +33,6 @@
  #include <arpa/inet.h>
  #include <net/route.h>
@@ -68,10 +68,10 @@
  
  #include <gdhcp/gdhcp.h>
  
-diff --git a/tools/dnsproxy-test.c b/tools/dnsproxy-test.c
-index 551cae9..226ba86 100644
---- a/tools/dnsproxy-test.c
-+++ b/tools/dnsproxy-test.c
+Index: connman-1.30/tools/dnsproxy-test.c
+===================================================================
+--- connman-1.30.orig/tools/dnsproxy-test.c
++++ connman-1.30/tools/dnsproxy-test.c
 @@ -27,6 +27,7 @@
  #include <stdlib.h>
  #include <string.h>
@@ -80,6 +80,39 @@
  #include <arpa/inet.h>
  #include <netinet/in.h>
  #include <sys/types.h>
--- 
-2.5.1
-
+Index: connman-1.30/configure.ac
+===================================================================
+--- connman-1.30.orig/configure.ac
++++ connman-1.30/configure.ac
+@@ -173,6 +173,8 @@ AM_CONDITIONAL(PPTP_BUILTIN, test "${ena
+ 
+ AC_CHECK_HEADERS([execinfo.h])
+ 
++AC_CHECK_MEMBERS([struct in6_pktinfo.ipi6_addr], [], [], [[#include <netinet/in.h>]])
++
+ AC_CHECK_HEADERS(resolv.h, dummy=yes,
+ 	AC_MSG_ERROR(resolver header files are required))
+ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
+Index: connman-1.30/gdhcp/common.h
+===================================================================
+--- connman-1.30.orig/gdhcp/common.h
++++ connman-1.30/gdhcp/common.h
+@@ -19,6 +19,7 @@
+  *
+  */
+ 
++#include <config.h>
+ #include <netinet/udp.h>
+ #include <netinet/ip.h>
+ 
+@@ -170,8 +171,8 @@ static const uint8_t dhcp_option_lengths
+ 	[OPTION_U32]	= 4,
+ };
+ 
+-/* already defined within netinet/in.h if using GNU compiler */
+-#ifndef __USE_GNU
++/* already defined within netinet/in.h if using GNU or musl libc */
++#ifndef HAVE_STRUCT_IN6_PKTINFO_IPI6_ADDR
+ struct in6_pktinfo {
+ 	struct in6_addr ipi6_addr;  /* src/dst IPv6 address */
+ 	unsigned int ipi6_ifindex;  /* send/recv interface index */
diff --git a/yocto-poky/meta/recipes-connectivity/connman/connman_1.30.bb b/yocto-poky/meta/recipes-connectivity/connman/connman_1.30.bb
deleted file mode 100644
index 7d65ac9..0000000
--- a/yocto-poky/meta/recipes-connectivity/connman/connman_1.30.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require connman.inc
-
-SRC_URI  = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
-            file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
-            file://0001-Detect-backtrace-API-availability-before-using-it.patch \
-            file://0002-resolve-musl-does-not-implement-res_ninit.patch \
-            file://0003-Fix-header-inclusions-for-musl.patch \
-            file://connman \
-            "
-SRC_URI[md5sum] = "4a3efdbd6796922db9c6f66da57887fa"
-SRC_URI[sha256sum] = "5c5e464bacc9c27ed4e7269fb9b5059f07947f5be26433b59212133663ffa991"
-
-RRECOMMENDS_${PN} = "connman-conf"
-
diff --git a/yocto-poky/meta/recipes-connectivity/connman/connman_1.31.bb b/yocto-poky/meta/recipes-connectivity/connman/connman_1.31.bb
new file mode 100644
index 0000000..e71d221
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/connman/connman_1.31.bb
@@ -0,0 +1,15 @@
+require connman.inc
+
+SRC_URI  = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+            file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
+            file://0001-Detect-backtrace-API-availability-before-using-it.patch \
+            file://0002-resolve-musl-does-not-implement-res_ninit.patch \
+            file://0003-Fix-header-inclusions-for-musl.patch \
+            file://0001-iptables-Add-missing-function-item-of-xtables-to-mat.patch \
+            file://connman \
+            "
+SRC_URI[md5sum] = "cb1c413fcc4f49430294bbd7a92f5f3c"
+SRC_URI[sha256sum] = "88fcf0b6df334796b90e2fd2e434d6f5b36cd6f13b886a119b8c90276b72b8e2"
+
+RRECOMMENDS_${PN} = "connman-conf"
+
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp.inc b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp.inc
index d883a8d..5e396f1 100644
--- a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp.inc
+++ b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp.inc
@@ -18,9 +18,16 @@
            file://init-server file://default-server \
            file://dhclient.conf file://dhcpd.conf \
            file://dhcpd.service file://dhcrelay.service \
-           file://dhcpd6.service "
+           file://dhcpd6.service \
+           file://search-for-libxml2.patch "
 
-inherit autotools systemd
+UPSTREAM_CHECK_URI = "ftp://ftp.isc.org/isc/dhcp/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/"
+
+inherit autotools systemd useradd update-rc.d
+
+USERADD_PACKAGES = "${PN}-server"
+USERADD_PARAM_${PN}-server = "--system --no-create-home --home-dir /var/run/${PN} --shell /bin/false --user-group ${PN}"
 
 SYSTEMD_PACKAGES = "${PN}-server ${PN}-relay"
 SYSTEMD_SERVICE_${PN}-server = "dhcpd.service dhcpd6.service"
@@ -29,12 +36,17 @@
 SYSTEMD_SERVICE_${PN}-relay = "dhcrelay.service"
 SYSTEMD_AUTO_ENABLE_${PN}-relay = "disable"
 
+INITSCRIPT_PACKAGES = "dhcp-server"
+INITSCRIPT_NAME_dhcp-server = "dhcp-server"
+INITSCRIPT_PARAMS_dhcp-server = "defaults"
+
 TARGET_CFLAGS += "-D_GNU_SOURCE"
 EXTRA_OECONF = "--with-srv-lease-file=${localstatedir}/lib/dhcp/dhcpd.leases \
                 --with-srv6-lease-file=${localstatedir}/lib/dhcp/dhcpd6.leases \
                 --with-cli-lease-file=${localstatedir}/lib/dhcp/dhclient.leases \
                 --with-cli6-lease-file=${localstatedir}/lib/dhcp/dhclient6.leases \
                 --with-libbind=${STAGING_LIBDIR}/ \
+		--enable-paranoia \
                "
 
 do_install_append () {
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch
new file mode 100644
index 0000000..4344212
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/0001-site.h-enable-gentle-shutdown.patch
@@ -0,0 +1,25 @@
+Upstream-Status: Inappropriate [configuration]
+
+Subject: [PATCH] site.h: enable gentle shutdown
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ includes/site.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/includes/site.h b/includes/site.h
+index 73fa4e8..9c33de3 100644
+--- a/includes/site.h
++++ b/includes/site.h
+@@ -280,7 +280,7 @@
+    situations.  We plan to revisit this feature and may
+    make non-backwards compatible changes including the
+    removal of this define.  Use at your own risk.  */
+-/* #define ENABLE_GENTLE_SHUTDOWN */
++#define ENABLE_GENTLE_SHUTDOWN
+ 
+ /* Include old error codes.  This is provided in case you
+    are building an external program similar to omshell for
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2015-8605.patch b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2015-8605.patch
new file mode 100644
index 0000000..923d5d5
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2015-8605.patch
@@ -0,0 +1,99 @@
+Solves CVE-2015-8605 that caused DoS when an invalid lenght field in IPv4 UDP
+was recived by the server.
+
+Upstream-Status: Backport
+CVE: CVE-2015-8605
+
+Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
+
+=======================================================================
+diff --git a/common/packet.c b/common/packet.c
+index b530432..e600e37 100644
+--- a/common/packet.c
++++ b/common/packet.c
+@@ -220,7 +220,28 @@ ssize_t decode_hw_header (interface, buf, bufix, from)
+ 	}
+ }
+ 
+-/* UDP header and IP header decoded together for convenience. */
++/*!
++ *
++ * \brief UDP header and IP header decoded together for convenience.
++ *
++ * Attempt to decode the UDP and IP headers and, if necessary, checksum
++ * the packet.
++ *
++ * \param inteface - the interface on which the packet was recevied
++ * \param buf - a pointer to the buffer for the received packet
++ * \param bufix - where to start processing the buffer, previous
++ *                routines may have processed parts of the buffer already
++ * \param from - space to return the address of the packet sender
++ * \param buflen - remaining length of the buffer, this will have been
++ *                 decremented by bufix by the caller
++ * \param rbuflen - space to return the length of the payload from the udp
++ *                  header
++ * \param csum_ready - indication if the checksum is valid for use
++ *                     non-zero indicates the checksum should be validated
++ *
++ * \return - the index to the first byte of the udp payload (that is the
++ *           start of the DHCP packet
++ */
+ 
+ ssize_t
+ decode_udp_ip_header(struct interface_info *interface,
+@@ -231,7 +252,7 @@ decode_udp_ip_header(struct interface_info *interface,
+   unsigned char *data;
+   struct ip ip;
+   struct udphdr udp;
+-  unsigned char *upp, *endbuf;
++  unsigned char *upp;
+   u_int32_t ip_len, ulen, pkt_len;
+   static unsigned int ip_packets_seen = 0;
+   static unsigned int ip_packets_bad_checksum = 0;
+@@ -241,11 +262,8 @@ decode_udp_ip_header(struct interface_info *interface,
+   static unsigned int udp_packets_length_overflow = 0;
+   unsigned len;
+ 
+-  /* Designate the end of the input buffer for bounds checks. */
+-  endbuf = buf + bufix + buflen;
+-
+   /* Assure there is at least an IP header there. */
+-  if ((buf + bufix + sizeof(ip)) > endbuf)
++  if (sizeof(ip) > buflen)
+ 	  return -1;
+ 
+   /* Copy the IP header into a stack aligned structure for inspection.
+@@ -257,13 +275,17 @@ decode_udp_ip_header(struct interface_info *interface,
+   ip_len = (*upp & 0x0f) << 2;
+   upp += ip_len;
+ 
+-  /* Check the IP packet length. */
++  /* Check packet lengths are within the buffer:
++   * first the ip header (ip_len)
++   * then the packet length from the ip header (pkt_len)
++   * then the udp header (ip_len + sizeof(udp)
++   * We are liberal in what we accept, the udp payload should fit within
++   * pkt_len, but we only check against the full buffer size.
++   */
+   pkt_len = ntohs(ip.ip_len);
+-  if (pkt_len > buflen)
+-	return -1;
+-
+-  /* Assure after ip_len bytes that there is enough room for a UDP header. */
+-  if ((upp + sizeof(udp)) > endbuf)
++  if ((ip_len > buflen) ||
++      (pkt_len > buflen) ||
++      ((ip_len + sizeof(udp)) > buflen))
+ 	  return -1;
+ 
+   /* Copy the UDP header into a stack aligned structure for inspection. */
+@@ -284,7 +306,8 @@ decode_udp_ip_header(struct interface_info *interface,
+ 	return -1;
+ 
+   udp_packets_length_checked++;
+-  if ((upp + ulen) > endbuf) {
++  /* verify that the payload length from the udp packet fits in the buffer */
++  if ((ip_len + ulen) > buflen) {
+ 	udp_packets_length_overflow++;
+ 	if (((udp_packets_length_checked > 4) &&
+ 	     (udp_packets_length_overflow != 0)) &&
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2016-2774.patch b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2016-2774.patch
new file mode 100644
index 0000000..4836dbc
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/CVE-2016-2774.patch
@@ -0,0 +1,65 @@
+From b9f56d578ebfd649b5d829960540859ac6ca931c Mon Sep 17 00:00:00 2001
+From: Catalin Enache <catalin.enache@windriver.com>
+Date: Tue, 12 Apr 2016 18:23:31 +0300
+Subject: [PATCH] Add patch to limit the value of an fd we accept for a
+ connection.
+
+By limiting the highest value we accept for an fd we limit the number
+of connections.
+
+Upstream-Status: Backport
+CVE: CVE-2016-2774
+
+Author: Shawn Routhier <sar@isc.org>
+Signed-off-by: Catalin Enache <catalin.enache@windriver.com>
+---
+ includes/site.h   | 6 ++++++
+ omapip/listener.c | 9 +++++++--
+ 3 files changed, 18 insertions(+), 2 deletions(-)
+
+diff --git a/includes/site.h b/includes/site.h
+index 9c33de3..df020c8 100644
+--- a/includes/site.h
++++ b/includes/site.h
+@@ -290,6 +290,12 @@
+    this option will be removed at some time. */
+ /* #define INCLUDE_OLD_DHCP_ISC_ERROR_CODES */
+ 
++/* Limit the value of a file descriptor the serve will use
++   when accepting a connecting request.  This can be used to
++   limit the number of TCP connections that the server will
++   allow at one time.  A value of 0 means there is no limit.*/
++#define MAX_FD_VALUE 200
++
+ /* Include definitions for various options.  In general these
+    should be left as is, but if you have already defined one
+    of these and prefer your definition you can comment the 
+diff --git a/omapip/listener.c b/omapip/listener.c
+index 8bdcdbd..61473cf 100644
+--- a/omapip/listener.c
++++ b/omapip/listener.c
+@@ -3,7 +3,7 @@
+    Subroutines that support the generic listener object. */
+ 
+ /*
+- * Copyright (c) 2012,2014 by Internet Systems Consortium, Inc. ("ISC")
++ * Copyright (c) 2012,2014,2016 by Internet Systems Consortium, Inc. ("ISC")
+  * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
+  * Copyright (c) 1999-2003 by Internet Software Consortium
+  *
+@@ -233,7 +233,12 @@ isc_result_t omapi_accept (omapi_object_t *h)
+ 			return ISC_R_NORESOURCES;
+ 		return ISC_R_UNEXPECTED;
+ 	}
+-	
++
++	if ((MAX_FD_VALUE != 0) && (socket > MAX_FD_VALUE)) {
++		close(socket);
++		return (ISC_R_NORESOURCES);
++	}
++
+ #if defined (TRACING)
+ 	/* If we're recording a trace, remember the connection. */
+ 	if (trace_record ()) {
+-- 
+2.7.4
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
index 12d3c9b..32bdaf0 100644
--- a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
+++ b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/define-macro-_PATH_DHCPD_CONF-and-_PATH_DHCLIENT_CON.patch
@@ -1,6 +1,6 @@
 define macro _PATH_DHCPD_CONF and _PATH_DHCLIENT_CONF
 
-Upstream-Status: inappropriate <oe specific>
+Upstream-Status: Inappropriate [OE specific]
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch
index a291fda..956c5d8 100644
--- a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch
+++ b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fix-external-bind.patch
@@ -6,24 +6,25 @@
 
 Signed-off-by: Qing He <qing.he@intel.com>
 
-Index: dhcp-4.3.0/Makefile.am
-===================================================================
---- dhcp-4.3.0.orig/Makefile.am
-+++ dhcp-4.3.0/Makefile.am
+Rebase the patch to 4.3.3
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+diff --git a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
 @@ -25,7 +25,7 @@ EXTRA_DIST = RELNOTES LICENSE \
- 	     bind/Makefile bind/bind.tar.gz bind/version.tmp \
+ 	     bind/Makefile.in bind/bind.tar.gz bind/version.tmp \
  	     common/tests/Atffile server/tests/Atffile
  
--SUBDIRS = bind includes tests common dst omapip client dhcpctl relay server
-+SUBDIRS = includes tests common dst omapip client dhcpctl relay server
+-SUBDIRS = bind includes tests common omapip client dhcpctl relay server
++SUBDIRS = includes tests common omapip client dhcpctl relay server
  
  nobase_include_HEADERS = dhcpctl/dhcpctl.h
  
-Index: dhcp-4.3.0/client/Makefile.am
-===================================================================
---- dhcp-4.3.0.orig/client/Makefile.am
-+++ dhcp-4.3.0/client/Makefile.am
-@@ -4,8 +4,8 @@ dhclient_SOURCES = clparse.c dhclient.c
+diff --git a/client/Makefile.am b/client/Makefile.am
+--- a/client/Makefile.am
++++ b/client/Makefile.am
+@@ -10,8 +10,8 @@ dhclient_SOURCES = clparse.c dhclient.c dhc6.c \
  		   scripts/bsdos scripts/freebsd scripts/linux scripts/macos \
  		   scripts/netbsd scripts/nextstep scripts/openbsd \
  		   scripts/solaris scripts/openwrt
@@ -34,22 +35,20 @@
  man_MANS = dhclient.8 dhclient-script.8 dhclient.conf.5 dhclient.leases.5
  EXTRA_DIST = $(man_MANS)
  
-Index: dhcp-4.3.0/configure.ac
-===================================================================
---- dhcp-4.3.0.orig/configure.ac
-+++ dhcp-4.3.0/configure.ac
-@@ -566,6 +566,7 @@ no)
- 	libbind="$use_libbind"
+diff --git a/configure.ac b/configure.ac
+--- a/configure.ac
++++ b/configure.ac
+@@ -623,6 +623,7 @@ no)
+ 	fi	
  	;;
  esac
 +AC_SUBST([libbind])
  
  # OpenLDAP support.
  AC_ARG_WITH(ldap,
-Index: dhcp-4.3.0/dhcpctl/Makefile.am
-===================================================================
---- dhcp-4.3.0.orig/dhcpctl/Makefile.am
-+++ dhcp-4.3.0/dhcpctl/Makefile.am
+diff --git a/dhcpctl/Makefile.am b/dhcpctl/Makefile.am
+--- a/dhcpctl/Makefile.am
++++ b/dhcpctl/Makefile.am
 @@ -6,12 +6,12 @@ EXTRA_DIST = $(man_MANS)
  
  omshell_SOURCES = omshell.c
@@ -67,10 +66,9 @@
 -               ../bind/lib/libisccfg.a ../bind/lib/libisc.a
 +	       $(libbind)/libirs.a $(libbind)/libdns.a \
 +               $(libbind)/libisccfg.a $(libbind)/libisc.a
-Index: dhcp-4.3.0/omapip/Makefile.am
-===================================================================
---- dhcp-4.3.0.orig/omapip/Makefile.am
-+++ dhcp-4.3.0/omapip/Makefile.am
+diff --git a/omapip/Makefile.am b/omapip/Makefile.am
+--- a/omapip/Makefile.am
++++ b/omapip/Makefile.am
 @@ -10,6 +10,6 @@ man_MANS = omapi.3
  EXTRA_DIST = $(man_MANS)
  
@@ -80,11 +78,10 @@
 +svtest_LDADD = libomapi.a $(libbind)/libirs.a $(libbind)/libdns.a \
 +		$(libbind)/libisccfg.a $(libbind)/libisc.a
  
-Index: dhcp-4.3.0/relay/Makefile.am
-===================================================================
---- dhcp-4.3.0.orig/relay/Makefile.am
-+++ dhcp-4.3.0/relay/Makefile.am
-@@ -3,8 +3,8 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localst
+diff --git a/relay/Makefile.am b/relay/Makefile.am
+--- a/relay/Makefile.am
++++ b/relay/Makefile.am
+@@ -3,8 +3,8 @@ AM_CPPFLAGS = -DLOCALSTATEDIR='"@localstatedir@"'
  sbin_PROGRAMS = dhcrelay
  dhcrelay_SOURCES = dhcrelay.c
  dhcrelay_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
@@ -95,18 +92,24 @@
  man_MANS = dhcrelay.8
  EXTRA_DIST = $(man_MANS)
  
-Index: dhcp-4.3.0/server/Makefile.am
-===================================================================
---- dhcp-4.3.0.orig/server/Makefile.am
-+++ dhcp-4.3.0/server/Makefile.am
-@@ -14,8 +14,8 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c c
+diff --git a/server/Makefile.am b/server/Makefile.am
+--- a/server/Makefile.am
++++ b/server/Makefile.am
+@@ -14,10 +14,12 @@ dhcpd_SOURCES = dhcpd.c dhcp.c bootp.c confpars.c db.c class.c failover.c \
  
  dhcpd_CFLAGS = $(LDAP_CFLAGS)
  dhcpd_LDADD = ../common/libdhcp.a ../omapip/libomapi.a \
 -	      ../dhcpctl/libdhcpctl.a ../bind/lib/libirs.a \
--	      ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a
+-	      ../bind/lib/libdns.a ../bind/lib/libisccfg.a ../bind/lib/libisc.a \
 +	      ../dhcpctl/libdhcpctl.a $(libbind)/libirs.a \
-+	      $(libbind)/libdns.a $(libbind)/libisccfg.a $(libbind)/libisc.a
++	      $(libbind)/libdns.a $(libbind)/libisccfg.a $(libbind)/libisc.a \
+ 	      $(LDAP_LIBS)		
  
++ dhcpd_CFLAGS = $(LDAP_CFLAGS)
++
  man_MANS = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
  EXTRA_DIST = $(man_MANS)
+ 
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
index 14e75a3..b3f8fdb 100644
--- a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
+++ b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/fixsepbuild.patch
@@ -7,15 +7,6 @@
 Rebase to 4.3.1
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
- client/Makefile.am  | 6 ++++--
- common/Makefile.am  | 2 +-
- dhcpctl/Makefile.am | 2 ++
- dst/Makefile.am     | 2 +-
- omapip/Makefile.am  | 2 ++
- relay/Makefile.am   | 2 +-
- server/Makefile.am  | 2 +-
- 7 files changed, 12 insertions(+), 6 deletions(-)
-
 diff --git a/client/Makefile.am b/client/Makefile.am
 index 8411960..1740f72 100644
 --- a/client/Makefile.am
@@ -60,16 +51,6 @@
  bin_PROGRAMS = omshell
  lib_LIBRARIES = libdhcpctl.a
  noinst_PROGRAMS = cltest
-diff --git a/dst/Makefile.am b/dst/Makefile.am
-index 8937fe8..a14798b 100644
---- a/dst/Makefile.am
-+++ b/dst/Makefile.am
-@@ -1,4 +1,4 @@
--AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5
-+AM_CPPFLAGS = -DMINIRES_LIB -DHMAC_MD5 -I$(top_srcdir)/includes
- 
- lib_LIBRARIES = libdst.a
- 
 diff --git a/omapip/Makefile.am b/omapip/Makefile.am
 index 5074479..9c0fab3 100644
 --- a/omapip/Makefile.am
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch
new file mode 100644
index 0000000..a08a5b7
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp/search-for-libxml2.patch
@@ -0,0 +1,23 @@
+libdns requires libxml2 if bind was built with libxml2 support
+enabled. Compilation will fail for omapip/test.c in case
+lxml2 isn't used during the build. So, we add losely coupled
+search path which will pick up the lib if it is present.
+
+Signed-off-by: Awais Belal <awais_belal@mentor.com>
+Upstream-Status: Pending
+
+diff --git a/configure.ac b/configure.ac
+index c9dc8b5..85f59be 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -602,6 +602,10 @@ no)
+ esac
+ AC_SUBST([libbind])
+ 
++# We need to find libxml2 if bind was built with support enabled
++# otherwise we'll fail to build omapip/test.c
++AC_SEARCH_LIBS(xmlTextWriterStartElement, [xml2],)
++
+ # OpenLDAP support.
+ AC_ARG_WITH(ldap,
+     AS_HELP_STRING([--with-ldap],[enable OpenLDAP support in dhcpd (default is no)]),
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb
deleted file mode 100644
index b4a05fc..0000000
--- a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.2.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require dhcp.inc
-
-SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
-            file://fix-external-bind.patch \
-            file://link-with-lcrypto.patch \
-            file://fixsepbuild.patch \
-            file://dhclient-script-drop-resolv.conf.dhclient.patch \
-            file://replace-ifconfig-route.patch \
-           "
-
-SRC_URI[md5sum] = "5a284875dd2c12ddd388416d69156a67"
-SRC_URI[sha256sum] = "6246c9b358759f6cdcc45104caaf76e732a211dbbbbf64a21f499c8db1298165"
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.3.bb b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.3.bb
new file mode 100644
index 0000000..4e8cd27
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/dhcp/dhcp_4.3.3.bb
@@ -0,0 +1,15 @@
+require dhcp.inc
+
+SRC_URI += "file://dhcp-3.0.3-dhclient-dbus.patch;striplevel=0 \
+            file://fix-external-bind.patch \
+            file://link-with-lcrypto.patch \
+            file://fixsepbuild.patch \
+            file://dhclient-script-drop-resolv.conf.dhclient.patch \
+            file://replace-ifconfig-route.patch \
+            file://CVE-2015-8605.patch \
+            file://0001-site.h-enable-gentle-shutdown.patch \
+            file://CVE-2016-2774.patch \
+           "
+
+SRC_URI[md5sum] = "c5577b09c9017cdd319a11ff6364268e"
+SRC_URI[sha256sum] = "553c4945b09b1c1b904c4780f34f72aaefa2fc8c6556715de0bc9d4e3d255ede"
diff --git a/yocto-poky/meta/recipes-connectivity/dhcp/files/init-server b/yocto-poky/meta/recipes-connectivity/dhcp/files/init-server
index 34c2085..5e693ad 100644
--- a/yocto-poky/meta/recipes-connectivity/dhcp/files/init-server
+++ b/yocto-poky/meta/recipes-connectivity/dhcp/files/init-server
@@ -20,7 +20,7 @@
 		echo -n "Starting DHCP server: "
 		test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
 		test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases	
-		start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES
+		start-stop-daemon -S -x /usr/sbin/dhcpd -- -q $INTERFACES -user dhcp -group dhcp
 		echo "."
 		;;
 	stop)
diff --git a/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc b/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
index 29f9062..86e9310 100644
--- a/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
+++ b/yocto-poky/meta/recipes-connectivity/iproute2/iproute2.inc
@@ -13,7 +13,7 @@
 
 inherit update-alternatives
 
-EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
+EXTRA_OEMAKE = "CC='${CC}' KERNEL_INCLUDE=${STAGING_INCDIR} DOCDIR=${docdir}/iproute2 SUBDIRS='lib tc ip bridge misc genl' SBINDIR='${base_sbindir}' LIBDIR='${libdir}'"
 
 do_configure_append () {
     sh configure ${STAGING_INCDIR}
@@ -32,11 +32,15 @@
 # The .so files in iproute2-tc are modules, not traditional libraries
 INSANE_SKIP_${PN}-tc = "dev-so"
 
-PACKAGES =+ "${PN}-tc"
+PACKAGES =+ "${PN}-tc ${PN}-lnstat ${PN}-ifstat ${PN}-genl ${PN}-rtacct ${PN}-nstat ${PN}-ss"
 FILES_${PN}-tc = "${base_sbindir}/tc* \
                   ${libdir}/tc/*.so"
-
-FILES_${PN}-dbg += "${libdir}/tc/.debug"
+FILES_${PN}-lnstat = "${base_sbindir}/lnstat ${base_sbindir}/ctstat ${base_sbindir}/rtstat"
+FILES_${PN}-ifstat = "${base_sbindir}/ifstat"
+FILES_${PN}-genl = "${base_sbindir}/genl"
+FILES_${PN}-rtacct = "${base_sbindir}/rtacct"
+FILES_${PN}-nstat = "${base_sbindir}/nstat"
+FILES_${PN}-ss = "${base_sbindir}/ss"
 
 ALTERNATIVE_${PN} = "ip"
 ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}"
diff --git a/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch b/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch
new file mode 100644
index 0000000..1b415a5
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-4.3.0-musl.patch
@@ -0,0 +1,97 @@
+From 48596709d8ab59727b79a5c6db33ebb251c36543 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Thu, 19 Nov 2015 17:44:25 +0100
+Subject: [PATCH] Avoid in6_addr redefinition
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Due to both <netinet/in.h> and <linux/in6.h> being included, the
+in6_addr is being redefined: once from the C library headers and once
+from the kernel headers. This causes some build failures with for
+example the musl C library:
+
+In file included from ../include/linux/xfrm.h:4:0,
+                 from xfrm.h:29,
+                 from ipxfrm.c:39:
+../include/linux/in6.h:32:8: error: redefinition of ‘struct in6_addr’
+ struct in6_addr {
+        ^
+In file included from .../output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netdb.h:9:0,
+                 from ipxfrm.c:34:
+.../output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:24:8: note: originally defined here
+ struct in6_addr
+        ^
+
+In order to fix this, use just the C library header <netinet/in.h>.
+
+Original patch taken from
+http://git.alpinelinux.org/cgit/aports/tree/main/iproute2/musl-fixes.patch.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+Upstream-Status: Pending
+
+ include/libiptc/ipt_kernel_headers.h | 2 --
+ include/linux/if_bridge.h            | 1 -
+ include/linux/netfilter.h            | 2 --
+ include/linux/xfrm.h                 | 1 -
+ 4 files changed, 6 deletions(-)
+
+diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h
+index 7e87828..9566be5 100644
+--- a/include/libiptc/ipt_kernel_headers.h
++++ b/include/libiptc/ipt_kernel_headers.h
+@@ -15,12 +15,10 @@
+ #else /* libc5 */
+ #include <sys/socket.h>
+ #include <linux/ip.h>
+-#include <linux/in.h>
+ #include <linux/if.h>
+ #include <linux/icmp.h>
+ #include <linux/tcp.h>
+ #include <linux/udp.h>
+ #include <linux/types.h>
+-#include <linux/in6.h>
+ #endif
+ #endif
+diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
+index ee197a3..f823aa4 100644
+--- a/include/linux/if_bridge.h
++++ b/include/linux/if_bridge.h
+@@ -15,7 +15,6 @@
+ 
+ #include <linux/types.h>
+ #include <linux/if_ether.h>
+-#include <linux/in6.h>
+ 
+ #define SYSFS_BRIDGE_ATTR	"bridge"
+ #define SYSFS_BRIDGE_FDB	"brforward"
+diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
+index b71b4c9..3e4e6ae 100644
+--- a/include/linux/netfilter.h
++++ b/include/linux/netfilter.h
+@@ -4,8 +4,6 @@
+ #include <linux/types.h>
+ 
+ #include <linux/sysctl.h>
+-#include <linux/in.h>
+-#include <linux/in6.h>
+ 
+ /* Responses from hook functions. */
+ #define NF_DROP 0
+diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
+index b8f5451..a9761a5 100644
+--- a/include/linux/xfrm.h
++++ b/include/linux/xfrm.h
+@@ -1,7 +1,6 @@
+ #ifndef _LINUX_XFRM_H
+ #define _LINUX_XFRM_H
+ 
+-#include <linux/in6.h>
+ #include <linux/types.h>
+ 
+ /* All of the structures in this file may not change size as they are
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-fix-building-with-musl.patch b/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-fix-building-with-musl.patch
new file mode 100644
index 0000000..c83a243
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/iproute2/iproute2/iproute2-fix-building-with-musl.patch
@@ -0,0 +1,24 @@
+iproute2: fix building with musl
+
+We need limits.h for PATH_MAX, fixes:
+
+rt_names.c:364:13: error: ‘PATH_MAX’ undeclared (first use in this
+function)
+
+Upstream-Status: Backport
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff --git a/lib/rt_names.c b/lib/rt_names.c
+index f6d17c0..b665d3e 100644
+--- a/lib/rt_names.c
++++ b/lib/rt_names.c
+@@ -18,6 +18,7 @@
+ #include <sys/time.h>
+ #include <sys/socket.h>
+ #include <dirent.h>
++#include <limits.h>
+ 
+ #include <asm/types.h>
+ #include <linux/rtnetlink.h>
diff --git a/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.1.1.bb b/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.1.1.bb
deleted file mode 100644
index 10db0ba..0000000
--- a/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.1.1.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require iproute2.inc
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
-           file://configure-cross.patch \
-           file://0001-iproute2-de-bash-scripts.patch \
-          "
-SRC_URI[md5sum] = "39290cb3a55d38dd8d10e19a3094109f"
-SRC_URI[sha256sum] = "73077a989efb934450bd655cbd9aaddaa747cb696c64d0c9a3323768a6a8e66f"
-
-# CFLAGS are computed in Makefile and reference CCOPTS
-#
-EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
diff --git a/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.4.0.bb b/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.4.0.bb
new file mode 100644
index 0000000..7979e8b
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/iproute2/iproute2_4.4.0.bb
@@ -0,0 +1,14 @@
+require iproute2.inc
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \
+           file://configure-cross.patch \
+           file://0001-iproute2-de-bash-scripts.patch \
+           file://iproute2-4.3.0-musl.patch \
+           file://iproute2-fix-building-with-musl.patch \
+          "
+SRC_URI[md5sum] = "d762653ec3e1ab0d4a9689e169ca184f"
+SRC_URI[sha256sum] = "bc91c367288a19f78ef800cd6840363be1f22da8436fbae88e1a7250490d6514"
+
+# CFLAGS are computed in Makefile and reference CCOPTS
+#
+EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
diff --git a/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch b/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch
new file mode 100644
index 0000000..97eb975
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch
@@ -0,0 +1,29 @@
+Replace use of <net/if_packet.h> with <linux/if_packet.h>.
+
+kernel headers <linux/if_packet.h> already provides the
+needed definitions, moreover not all libc implementations
+provide if_packet.h e.g. musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: irda-utils-0.9.18/irdaping/irdaping.c
+===================================================================
+--- irda-utils-0.9.18.orig/irdaping/irdaping.c
++++ irda-utils-0.9.18/irdaping/irdaping.c
+@@ -33,7 +33,6 @@
+ #include <sys/socket.h>
+ #include <sys/ioctl.h>
+ #include <net/if.h>		/* For struct ifreq */
+-#include <net/if_packet.h>	/* For struct sockaddr_pkt */
+ #include <net/if_arp.h>		/* For ARPHRD_IRDA */
+ #include <netinet/if_ether.h>	/* For ETH_P_ALL */
+ #include <netinet/in.h>		/* For htons */
+@@ -46,6 +45,7 @@
+ #include <asm/byteorder.h>	/* __cpu_to_le32 and co. */
+ 
+ #include <linux/types.h>	/* For __u8 and co. */
++#include <linux/if_packet.h>	/* For struct sockaddr_pkt */
+ #include <irda.h>
+ 
+ #ifndef AF_IRDA
diff --git a/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb b/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
index bd2f815..11b2ee9 100644
--- a/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
+++ b/yocto-poky/meta/recipes-connectivity/irda-utils/irda-utils_0.9.18.bb
@@ -13,6 +13,7 @@
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/irda/irda-utils-${PV}.tar.gz \
            file://ldflags.patch \
+           file://musl.patch \
            file://init"
 
 SRC_URI[md5sum] = "84dc12aa4c3f61fccb8d8919bf4079bb"
diff --git a/yocto-poky/meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch b/yocto-poky/meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch
index a0a77b2..2e52c80 100644
--- a/yocto-poky/meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch
+++ b/yocto-poky/meta/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch
@@ -1,6 +1,3 @@
-From 5310abba864cfe3a8b65af130729447604190b29 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Tue, 29 Nov 2011 17:03:27 +0100
 Subject: [PATCH] iw: version.sh: don't use git describe for versioning
 
 It will detect top-level git repositories like the Angstrom setup-scripts and break.
@@ -8,21 +5,18 @@
 Upstream-Status: Pending
 
 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
 ---
- version.sh | 16 +---------------
- 1 file changed, 1 insertion(+), 15 deletions(-)
-
-diff --git a/version.sh b/version.sh
-index 11d124b..5d423c4 100755
---- a/version.sh
-+++ b/version.sh
+diff -Naur iw-4.3-origin/version.sh iw-4.3/version.sh
+--- iw-4.3-origin/version.sh	2015-11-20 16:37:58.762077162 +0200
++++ iw-4.3/version.sh	2015-11-20 16:52:05.526491150 +0200
 @@ -3,21 +3,7 @@
- VERSION="3.15"
+ VERSION="4.3"
  OUT="$1"
  
 -if [ -d .git ] && head=`git rev-parse --verify HEAD 2>/dev/null`; then
 -	git update-index --refresh --unmerged > /dev/null
--	descr=$(git describe)
+-	descr=$(git describe --match=v*)
 -
 -	# on git builds check that the version number above
 -	# is correct...
@@ -39,5 +33,3 @@
  
  echo '#include "iw.h"' > "$OUT"
  echo "const char iw_version[] = \"$v\";" >> "$OUT"
--- 
-1.7.7.3
diff --git a/yocto-poky/meta/recipes-connectivity/iw/iw/separate-objdir.patch b/yocto-poky/meta/recipes-connectivity/iw/iw/separate-objdir.patch
index 883f8b2..0ea6a52 100644
--- a/yocto-poky/meta/recipes-connectivity/iw/iw/separate-objdir.patch
+++ b/yocto-poky/meta/recipes-connectivity/iw/iw/separate-objdir.patch
@@ -1,6 +1,3 @@
-From 9e27fc2e1b3dc8c36ef6a502edffc3a3d84d9dd9 Mon Sep 17 00:00:00 2001
-From: Christopher Larson <chris_larson@mentor.com>
-Date: Wed, 26 Aug 2015 17:23:48 -0700
 Subject: [PATCH] Support separation of SRCDIR and OBJDIR
 
 Typical use of VPATH to locate the sources.
@@ -8,26 +5,21 @@
 Upstream-Status: Pending
 
 Signed-off-by: Christopher Larson <chris_larson@mentor.com>
-
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
 ---
- Makefile   | 7 +++++--
- version.sh | 2 +-
- 2 files changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 548591a..da8d33a 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,5 +1,8 @@
+diff -Naur iw-4.3-origin/Makefile iw-4.3/Makefile
+--- iw-4.3-origin/Makefile	2015-11-20 16:37:58.752077287 +0200
++++ iw-4.3/Makefile	2015-11-20 16:57:15.510615815 +0200
+@@ -1,5 +1,7 @@
  MAKEFLAGS += --no-print-directory
- 
+-
 +SRCDIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
 +OBJDIR ?= $(PWD)
 +VPATH = $(SRCDIR)
  PREFIX ?= /usr
  SBINDIR ?= $(PREFIX)/sbin
  MANDIR ?= $(PREFIX)/share/man
-@@ -95,11 +98,11 @@ VERSION_OBJS := $(filter-out version.o, $(OBJS))
+@@ -95,11 +97,11 @@
  version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefile \
  		$(wildcard .git/index .git/refs/tags)
  	@$(NQ) ' GEN ' $@
@@ -41,17 +33,3 @@
  
  ifeq ($(IW_ANDROID_BUILD),)
  iw:	$(OBJS)
-diff --git a/version.sh b/version.sh
-index 5354383..fa954cf 100755
---- a/version.sh
-+++ b/version.sh
-@@ -5,5 +5,5 @@ OUT="$1"
- 
- v="$VERSION"
- 
--echo '#include "iw.h"' > "$OUT"
-+echo '#include <iw.h>' > "$OUT"
- echo "const char iw_version[] = \"$v\";" >> "$OUT"
--- 
-2.2.1
-
diff --git a/yocto-poky/meta/recipes-connectivity/iw/iw_4.1.bb b/yocto-poky/meta/recipes-connectivity/iw/iw_4.1.bb
deleted file mode 100644
index fafb0e3..0000000
--- a/yocto-poky/meta/recipes-connectivity/iw/iw_4.1.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
-DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
-wireless devices. It supports almost all new drivers that have been added \
-to the kernel recently. "
-HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
-SECTION = "base"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
-
-DEPENDS = "libnl"
-
-SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
-           file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
-           file://separate-objdir.patch \
-"
-
-SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7"
-SRC_URI[sha256sum] = "14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9c8f33d"
-
-inherit pkgconfig
-
-EXTRA_OEMAKE = "\
-    -f '${S}/Makefile' \
-    \
-    'PREFIX=${prefix}' \
-    'SBINDIR=${sbindir}' \
-    'MANDIR=${mandir}' \
-"
-B = "${WORKDIR}/build"
-
-do_install() {
-    oe_runmake 'DESTDIR=${D}' install
-}
diff --git a/yocto-poky/meta/recipes-connectivity/iw/iw_4.3.bb b/yocto-poky/meta/recipes-connectivity/iw/iw_4.3.bb
new file mode 100644
index 0000000..6865e7a
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/iw/iw_4.3.bb
@@ -0,0 +1,33 @@
+SUMMARY = "nl80211 based CLI configuration utility for wireless devices"
+DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \
+wireless devices. It supports almost all new drivers that have been added \
+to the kernel recently. "
+HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw"
+SECTION = "base"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774"
+
+DEPENDS = "libnl"
+
+SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
+           file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
+           file://separate-objdir.patch \
+"
+
+SRC_URI[md5sum] = "5ca622a270687d6862c9024fab266871"
+SRC_URI[sha256sum] = "2a853d95ffbd2b06c058b40ef4e6fa76a52c2709b05fb1976761fe13e9d9e39f"
+
+inherit pkgconfig
+
+EXTRA_OEMAKE = "\
+    -f '${S}/Makefile' \
+    \
+    'PREFIX=${prefix}' \
+    'SBINDIR=${sbindir}' \
+    'MANDIR=${mandir}' \
+"
+B = "${WORKDIR}/build"
+
+do_install() {
+    oe_runmake 'DESTDIR=${D}' install
+}
diff --git a/yocto-poky/meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch b/yocto-poky/meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch
new file mode 100644
index 0000000..f63eb90
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch
@@ -0,0 +1,56 @@
+From bdf01a581d58eb5340e9238d143dbcac9db5b11c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Jan 2016 19:29:45 +0000
+Subject: [PATCH] check for nss.h
+
+nss.h may not available on all libc implementations, e.g. musl does not
+have this header, this patch detects nss.h presence and defines the data
+types that are required if nss.h is missing on platform
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac |  2 +-
+ src/nss.c    | 11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index aa66bc6..ce19b07 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -71,7 +71,7 @@ AC_PROG_LIBTOOL
+ 
+ # Checks for header files.
+ AC_HEADER_STDC
+-AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h])
++AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h nss.h])
+ 
+ # Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+diff --git a/src/nss.c b/src/nss.c
+index e48e315..406733b 100644
+--- a/src/nss.c
++++ b/src/nss.c
+@@ -29,7 +29,18 @@
+ #include <assert.h>
+ #include <netdb.h>
+ #include <sys/socket.h>
++#ifdef HAVE_NSS_H
+ #include <nss.h>
++#else
++enum nss_status {
++    NSS_STATUS_TRYAGAIN = -2,
++    NSS_STATUS_UNAVAIL,
++    NSS_STATUS_NOTFOUND,
++    NSS_STATUS_SUCCESS,
++    NSS_STATUS_RETURN
++};
++#endif
++
+ #include <stdio.h>
+ #include <stdlib.h>
+ 
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/yocto-poky/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
index 0b936ef..8d2feec 100644
--- a/yocto-poky/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
+++ b/yocto-poky/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -8,7 +8,9 @@
 DEPENDS = "avahi"
 PR = "r7"
 
-SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz"
+SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz \
+           file://0001-check-for-nss.h.patch \
+           "
 
 SRC_URI[md5sum] = "03938f17646efbb50aa70ba5f99f51d7"
 SRC_URI[sha256sum] = "1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d8134fa6d"
diff --git a/yocto-poky/meta/recipes-connectivity/libpcap/libpcap.inc b/yocto-poky/meta/recipes-connectivity/libpcap/libpcap.inc
index 0873c24..b7601b0 100644
--- a/yocto-poky/meta/recipes-connectivity/libpcap/libpcap.inc
+++ b/yocto-poky/meta/recipes-connectivity/libpcap/libpcap.inc
@@ -6,7 +6,7 @@
 BUGTRACKER = "http://sourceforge.net/tracker/?group_id=53067&atid=469577"
 SECTION = "libs/network"
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1d4b0366557951c84a94fabe3529f867 \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453 \
                     file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2"
 DEPENDS = "flex-native bison-native"
 
diff --git a/yocto-poky/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb b/yocto-poky/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
deleted file mode 100644
index 611543e..0000000
--- a/yocto-poky/meta/recipes-connectivity/libpcap/libpcap_1.6.2.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require libpcap.inc
-
-SRC_URI += "file://aclocal.patch \
-            file://libpcap-pkgconfig-support.patch \
-           "
-SRC_URI[md5sum] = "5f14191c1a684a75532c739c2c4059fa"
-SRC_URI[sha256sum] = "5db3e2998f1eeba2c76da55da5d474248fe19c44f49e15cac8a796a2c7e19690"
-
-#
-# make install doesn't cover the shared lib
-# make install-shared is just broken (no symlinks)
-#
-
-do_configure_prepend () {
-    #remove hardcoded references to /usr/include
-    sed 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i ${S}/configure.in
-}
-
-do_install_prepend () {
-    install -d ${D}${libdir}
-    install -d ${D}${bindir}
-    oe_runmake install-shared DESTDIR=${D}
-    oe_libinstall -a -so libpcap ${D}${libdir}
-    sed "s|@VERSION@|${PV}|" -i ${B}/libpcap.pc
-    install -D -m 0644 libpcap.pc ${D}${libdir}/pkgconfig/libpcap.pc
-}
diff --git a/yocto-poky/meta/recipes-connectivity/libpcap/libpcap_1.7.4.bb b/yocto-poky/meta/recipes-connectivity/libpcap/libpcap_1.7.4.bb
new file mode 100644
index 0000000..8d12b25
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/libpcap/libpcap_1.7.4.bb
@@ -0,0 +1,26 @@
+require libpcap.inc
+
+SRC_URI += "file://aclocal.patch \
+            file://libpcap-pkgconfig-support.patch \
+           "
+SRC_URI[md5sum] = "b2e13142bbaba857ab1c6894aedaf547"
+SRC_URI[sha256sum] = "7ad3112187e88328b85e46dce7a9b949632af18ee74d97ffc3f2b41fe7f448b0"
+
+#
+# make install doesn't cover the shared lib
+# make install-shared is just broken (no symlinks)
+#
+
+do_configure_prepend () {
+    #remove hardcoded references to /usr/include
+    sed 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i ${S}/configure.in
+}
+
+do_install_prepend () {
+    install -d ${D}${libdir}
+    install -d ${D}${bindir}
+    oe_runmake install-shared DESTDIR=${D}
+    oe_libinstall -a -so libpcap ${D}${libdir}
+    sed "s|@VERSION@|${PV}|" -i ${B}/libpcap.pc
+    install -D -m 0644 libpcap.pc ${D}${libdir}/pkgconfig/libpcap.pc
+}
diff --git a/yocto-poky/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb b/yocto-poky/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
index 31cf2bb..bd488eb 100644
--- a/yocto-poky/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
+++ b/yocto-poky/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb
@@ -2,8 +2,8 @@
 SECTION = "network"
 LICENSE = "PD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=87964579b2a8ece4bc6744d2dc9a8b04"
-SRCREV = "d06ebd314a7cdd087d38e4966c19de42c8c55246"
-PV = "20140618+gitr${SRCPV}"
+SRCREV = "519465766fabc85b9fdea5f2b5ee3d08c2b1f70d"
+PV = "20151214"
 PE = "1"
 
 SRC_URI = "git://git.gnome.org/mobile-broadband-provider-info"
diff --git a/yocto-poky/meta/recipes-connectivity/neard/neard_0.15.bb b/yocto-poky/meta/recipes-connectivity/neard/neard_0.15.bb
index 8adf70c..93bddb3 100644
--- a/yocto-poky/meta/recipes-connectivity/neard/neard_0.15.bb
+++ b/yocto-poky/meta/recipes-connectivity/neard/neard_0.15.bb
@@ -43,7 +43,6 @@
 PACKAGES =+ "${PN}-tests"
 
 FILES_${PN}-tests = "${libdir}/${BPN}/*-test"
-FILES_${PN}-dbg += "${libdir}/${BPN}/*/.debug"
 
 RDEPENDS_${PN} = "dbus python python-dbus python-pygobject"
 
diff --git a/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch b/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch
new file mode 100644
index 0000000..14bd403
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/nfs-utils/files/bugfix-adjust-statd-service-name.patch
@@ -0,0 +1,34 @@
+From 398fed3bb0350cb1229e54e7020ae0e044c206d1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de>
+Date: Wed, 17 Feb 2016 08:33:45 +0100
+Subject: bugfix: adjust statd service name
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream uses 'rpc-statd.service' and Yocto introduced 'nfs-statd.service'
+instead but forgot to update the mount.nfs helper 'start-statd' accordingly.
+
+Upstream-Status: Inappropriate [other]
+
+Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
+---
+ utils/statd/start-statd | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/utils/statd/start-statd b/utils/statd/start-statd
+index 8211a90..3c2aa6f 100755
+--- a/utils/statd/start-statd
++++ b/utils/statd/start-statd
+@@ -16,7 +16,7 @@ fi
+ # First try systemd if it's installed.
+ if [ -d /run/systemd/system ]; then
+     # Quit only if the call worked.
+-    systemctl start rpc-statd.service && exit
++    systemctl start nfs-statd.service && exit
+ fi
+ 
+ # Fall back to launching it ourselves.
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb b/yocto-poky/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb
index 5b578e9..2565771 100644
--- a/yocto-poky/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb
+++ b/yocto-poky/meta/recipes-connectivity/nfs-utils/libnfsidmap_0.25.bb
@@ -14,6 +14,8 @@
 SRC_URI[md5sum] = "2ac4893c92716add1a1447ae01df77ab"
 SRC_URI[sha256sum] = "656d245d84400e1030f8f40a5a27da76370690c4a932baf249110f047fe7efcf"
 
+UPSTREAM_CHECK_URI = "http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/"
+
 inherit autotools
 
 EXTRA_OECONF = "--disable-ldap"
diff --git a/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch b/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch
new file mode 100644
index 0000000..de0b045
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch
@@ -0,0 +1,113 @@
+Upstream-Status: Pending
+
+Subject: nfs-utils/statd: fix a segfault caused by improper usage of RPC interface
+
+There is a hack which uses the bottom-level RPC improperly as below
+in the current statd implementation:
+insert a socket in the svc_fdset without a corresponding transport handle
+and passes the socket to the svc_getreqset subroutine, this usage causes
+a segfault of statd on a huge amount of sm-notifications.
+
+Fix the issue by separating the non-RPC-server sock from RPC dispatcher.
+
+Signed-off-by: Shan Hai <shan.hai@windriver.com>
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ utils/statd/rmtcall.c | 1 -
+ utils/statd/statd.c   | 5 +++--
+ utils/statd/statd.h   | 2 +-
+ utils/statd/svc_run.c | 8 ++++++--
+ 4 files changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
+index fd576d9..cde091b 100644
+--- a/utils/statd/rmtcall.c
++++ b/utils/statd/rmtcall.c
+@@ -104,7 +104,6 @@ statd_get_socket(void)
+ 	if (sockfd < 0)
+ 		return -1;
+ 
+-	FD_SET(sockfd, &SVC_FDSET);
+ 	return sockfd;
+ }
+ 
+diff --git a/utils/statd/statd.c b/utils/statd/statd.c
+index 51a016e..e21a259 100644
+--- a/utils/statd/statd.c
++++ b/utils/statd/statd.c
+@@ -247,6 +247,7 @@ int main (int argc, char **argv)
+ 	int port = 0, out_port = 0;
+ 	int nlm_udp = 0, nlm_tcp = 0;
+ 	struct rlimit rlim;
++	int notify_sockfd;
+ 
+ 	int pipefds[2] = { -1, -1};
+ 	char status;
+@@ -473,7 +474,7 @@ int main (int argc, char **argv)
+ 		}
+ 
+ 	/* Make sure we have a privilege port for calling into the kernel */
+-	if (statd_get_socket() < 0)
++	if ((notify_sockfd = statd_get_socket()) < 0)
+ 		exit(1);
+ 
+ 	/* If sm-notify didn't take all the state files, load
+@@ -528,7 +529,7 @@ int main (int argc, char **argv)
+ 		 * Handle incoming requests:  SM_NOTIFY socket requests, as
+ 		 * well as callbacks from lockd.
+ 		 */
+-		my_svc_run();	/* I rolled my own, Olaf made it better... */
++		my_svc_run(notify_sockfd);	/* I rolled my own, Olaf made it better... */
+ 
+ 		/* Only get here when simulating a crash so we should probably
+ 		 * start sm-notify running again.  As we have already dropped
+diff --git a/utils/statd/statd.h b/utils/statd/statd.h
+index a1d8035..231ac7e 100644
+--- a/utils/statd/statd.h
++++ b/utils/statd/statd.h
+@@ -28,7 +28,7 @@ extern _Bool	statd_present_address(const struct sockaddr *sap, char *buf,
+ __attribute__((__malloc__))
+ extern char *	statd_canonical_name(const char *hostname);
+ 
+-extern void	my_svc_run(void);
++extern void	my_svc_run(int);
+ extern void	notify_hosts(void);
+ extern void	shuffle_dirs(void);
+ extern int	statd_get_socket(void);
+diff --git a/utils/statd/svc_run.c b/utils/statd/svc_run.c
+index d98ecee..28c1ad6 100644
+--- a/utils/statd/svc_run.c
++++ b/utils/statd/svc_run.c
+@@ -78,7 +78,7 @@ my_svc_exit(void)
+  * The heart of the server.  A crib from libc for the most part...
+  */
+ void
+-my_svc_run(void)
++my_svc_run(int sockfd)
+ {
+ 	FD_SET_TYPE	readfds;
+ 	int             selret;
+@@ -96,6 +96,8 @@ my_svc_run(void)
+ 		}
+ 
+ 		readfds = SVC_FDSET;
++		/* Set notify sockfd for waiting for reply */
++		FD_SET(sockfd, &readfds);
+ 		if (notify) {
+ 			struct timeval	tv;
+ 
+@@ -125,8 +127,10 @@ my_svc_run(void)
+ 
+ 		default:
+ 			selret -= process_reply(&readfds);
+-			if (selret)
++			if (selret) {
++				FD_CLR(sockfd, &readfds);
+ 				svc_getreqset(&readfds);
++			}
+ 		}
+ 	}
+ }
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb b/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
deleted file mode 100644
index 42101de..0000000
--- a/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.1.bb
+++ /dev/null
@@ -1,141 +0,0 @@
-SUMMARY = "userspace utilities for kernel nfs"
-DESCRIPTION = "The nfs-utils package provides a daemon for the kernel \
-NFS server and related tools."
-HOMEPAGE = "http://nfs.sourceforge.net/"
-SECTION = "console/network"
-
-LICENSE = "MIT & GPLv2+ & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
-
-# util-linux for libblkid
-DEPENDS = "libcap libnfsidmap libevent util-linux sqlite3"
-RDEPENDS_${PN}-client = "rpcbind bash"
-RDEPENDS_${PN} = "${PN}-client bash"
-RRECOMMENDS_${PN} = "kernel-module-nfsd"
-
-inherit useradd
-
-USERADD_PACKAGES = "${PN}-client"
-USERADD_PARAM_${PN}-client = "--system  --home-dir /var/lib/nfs \
-			      --shell /bin/false --user-group rpcuser"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \
-           file://0001-configure-Allow-to-explicitly-disable-nfsidmap.patch \
-           file://nfs-utils-1.2.3-sm-notify-res_init.patch \
-           file://nfsserver \
-           file://nfscommon \
-           file://nfs-utils.conf \
-           file://nfs-server.service \
-           file://nfs-mountd.service \
-           file://nfs-statd.service \
-           file://proc-fs-nfsd.mount \
-           file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \
-           file://nfs-utils-debianize-start-statd.patch \
-"
-
-SRC_URI[md5sum] = "8de676b9ff34b8f9addc1d0800fabdf8"
-SRC_URI[sha256sum] = "ff79d70b7b58b2c8f9b798c58721127e82bb96022adc04a5c4cb251630e696b8"
-
-# Only kernel-module-nfsd is required here (but can be built-in)  - the nfsd module will
-# pull in the remainder of the dependencies.
-
-INITSCRIPT_PACKAGES = "${PN} ${PN}-client"
-INITSCRIPT_NAME = "nfsserver"
-INITSCRIPT_PARAMS = "defaults"
-INITSCRIPT_NAME_${PN}-client = "nfscommon"
-INITSCRIPT_PARAMS_${PN}-client = "defaults 19 21"
-
-inherit autotools-brokensep update-rc.d systemd pkgconfig
-
-SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service"
-SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-# --enable-uuid is need for cross-compiling
-EXTRA_OECONF = "--with-statduser=rpcuser \
-                --enable-mountconfig \
-                --enable-libmount-mount \
-                --disable-nfsv41 \
-                --enable-uuid \
-                --disable-gss \
-                --disable-tirpc \
-                --disable-nfsdcltrack \
-                --with-statdpath=/var/lib/nfs/statd \
-               "
-
-PACKAGECONFIG ??= "tcp-wrappers"
-PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers"
-PACKAGECONFIG[nfsidmap] = "--enable-nfsidmap,--disable-nfsidmap,keyutils"
-
-INHIBIT_AUTO_STAGE = "1"
-
-PACKAGES =+ "${PN}-client ${PN}-stats"
-
-CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \
-			   ${localstatedir}/lib/nfs/rmtab \
-			   ${localstatedir}/lib/nfs/xtab \
-			   ${localstatedir}/lib/nfs/statd/state \
-			   ${sysconfdir}/nfsmount.conf"
-
-FILES_${PN}-client = "${base_sbindir}/*mount.nfs* ${sbindir}/*statd \
-		      ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \
-		      ${sbindir}/showmount ${sbindir}/nfsstat \
-		      ${localstatedir}/lib/nfs \
-		      ${sysconfdir}/nfs-utils.conf \
-		      ${sysconfdir}/nfsmount.conf \
-		      ${sysconfdir}/init.d/nfscommon \
-		      ${systemd_unitdir}/system/nfs-statd.service"
-FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat"
-RDEPENDS_${PN}-stats = "python"
-
-FILES_${PN} += "${systemd_unitdir}"
-
-do_configure_prepend() {
-        sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
-            ${S}/utils/mount/Makefile.am
-
-        sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
-            ${S}/utils/osd_login/Makefile.am
-}
-
-# Make clean needed because the package comes with
-# precompiled 64-bit objects that break the build
-do_compile_prepend() {
-	make clean
-}
-
-do_install_append () {
-	install -d ${D}${sysconfdir}/init.d
-	install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
-	install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
-
-	install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir}
-	install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir}
-
-	install -d ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/
-	install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/
-	install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/
-	sed -i -e 's,@SBINDIR@,${sbindir},g' \
-		-e 's,@SYSCONFDIR@,${sysconfdir},g' \
-		${D}${systemd_unitdir}/system/*.service
-	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-	    install -d ${D}${sysconfdir}/modules-load.d
-	    echo "nfsd" > ${D}${sysconfdir}/modules-load.d/nfsd.conf
-	    install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/
-	    install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/
-	    ln -sf ../proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/sysinit.target.wants/proc-fs-nfsd.mount
-	fi
-
-	# kernel code as of 3.8 hard-codes this path as a default
-	install -d ${D}/var/lib/nfs/v4recovery
-
-	# chown the directories and files
-	chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd
-	chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state
-
-	# the following are built by CC_FOR_BUILD
-	rm -f ${D}${sbindir}/rpcdebug
-	rm -f ${D}${sbindir}/rpcgen
-	rm -f ${D}${sbindir}/locktest
-}
diff --git a/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb b/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb
new file mode 100644
index 0000000..a6268f3
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.3.bb
@@ -0,0 +1,143 @@
+SUMMARY = "userspace utilities for kernel nfs"
+DESCRIPTION = "The nfs-utils package provides a daemon for the kernel \
+NFS server and related tools."
+HOMEPAGE = "http://nfs.sourceforge.net/"
+SECTION = "console/network"
+
+LICENSE = "MIT & GPLv2+ & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84"
+
+# util-linux for libblkid
+DEPENDS = "libcap libnfsidmap libevent util-linux sqlite3 libtirpc"
+RDEPENDS_${PN}-client = "rpcbind bash"
+RDEPENDS_${PN} = "${PN}-client bash"
+RRECOMMENDS_${PN} = "kernel-module-nfsd"
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN}-client"
+USERADD_PARAM_${PN}-client = "--system  --home-dir /var/lib/nfs \
+			      --shell /bin/false --user-group rpcuser"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \
+           file://0001-configure-Allow-to-explicitly-disable-nfsidmap.patch \
+           file://nfs-utils-1.2.3-sm-notify-res_init.patch \
+           file://nfsserver \
+           file://nfscommon \
+           file://nfs-utils.conf \
+           file://nfs-server.service \
+           file://nfs-mountd.service \
+           file://nfs-statd.service \
+           file://proc-fs-nfsd.mount \
+           file://nfs-utils-Do-not-pass-CFLAGS-to-gcc-while-building.patch \
+           file://nfs-utils-debianize-start-statd.patch \
+           file://0001-nfs-utils-statd-fix-a-segfault-caused-by-improper-us.patch \
+           file://bugfix-adjust-statd-service-name.patch \
+"
+
+SRC_URI[md5sum] = "cd6b568c2e9301cc3bfac09d87fbbc0b"
+SRC_URI[sha256sum] = "700d689c5622c87953c34102e5befafc4d3c811e676852238f0dd79c9c0c084d"
+
+# Only kernel-module-nfsd is required here (but can be built-in)  - the nfsd module will
+# pull in the remainder of the dependencies.
+
+INITSCRIPT_PACKAGES = "${PN} ${PN}-client"
+INITSCRIPT_NAME = "nfsserver"
+INITSCRIPT_PARAMS = "defaults"
+INITSCRIPT_NAME_${PN}-client = "nfscommon"
+INITSCRIPT_PARAMS_${PN}-client = "defaults 19 21"
+
+inherit autotools-brokensep update-rc.d systemd pkgconfig
+
+SYSTEMD_SERVICE_${PN} = "nfs-server.service nfs-mountd.service"
+SYSTEMD_SERVICE_${PN}-client = "nfs-statd.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+# --enable-uuid is need for cross-compiling
+EXTRA_OECONF = "--with-statduser=rpcuser \
+                --enable-mountconfig \
+                --enable-libmount-mount \
+                --disable-nfsv41 \
+                --enable-uuid \
+                --disable-gss \
+                --disable-nfsdcltrack \
+                --with-statdpath=/var/lib/nfs/statd \
+               "
+
+PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG_remove_libc-musl = "tcp-wrappers"
+PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers"
+PACKAGECONFIG[nfsidmap] = "--enable-nfsidmap,--disable-nfsidmap,keyutils"
+
+INHIBIT_AUTO_STAGE = "1"
+
+PACKAGES =+ "${PN}-client ${PN}-stats"
+
+CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \
+			   ${localstatedir}/lib/nfs/rmtab \
+			   ${localstatedir}/lib/nfs/xtab \
+			   ${localstatedir}/lib/nfs/statd/state \
+			   ${sysconfdir}/nfsmount.conf"
+
+FILES_${PN}-client = "${base_sbindir}/*mount.nfs* ${sbindir}/*statd \
+		      ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \
+		      ${sbindir}/showmount ${sbindir}/nfsstat \
+		      ${localstatedir}/lib/nfs \
+		      ${sysconfdir}/nfs-utils.conf \
+		      ${sysconfdir}/nfsmount.conf \
+		      ${sysconfdir}/init.d/nfscommon \
+		      ${systemd_unitdir}/system/nfs-statd.service"
+FILES_${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat"
+RDEPENDS_${PN}-stats = "python"
+
+FILES_${PN} += "${systemd_unitdir}"
+
+do_configure_prepend() {
+        sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
+            ${S}/utils/mount/Makefile.am
+
+        sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \
+            ${S}/utils/osd_login/Makefile.am
+}
+
+# Make clean needed because the package comes with
+# precompiled 64-bit objects that break the build
+do_compile_prepend() {
+	make clean
+}
+
+do_install_append () {
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver
+	install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon
+
+	install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir}
+	install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir}
+
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_unitdir}/system/
+	install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_unitdir}/system/
+	install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_unitdir}/system/
+	sed -i -e 's,@SBINDIR@,${sbindir},g' \
+		-e 's,@SYSCONFDIR@,${sysconfdir},g' \
+		${D}${systemd_unitdir}/system/*.service
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+	    install -d ${D}${sysconfdir}/modules-load.d
+	    echo "nfsd" > ${D}${sysconfdir}/modules-load.d/nfsd.conf
+	    install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/
+	    install -d ${D}${systemd_unitdir}/system/sysinit.target.wants/
+	    ln -sf ../proc-fs-nfsd.mount ${D}${systemd_unitdir}/system/sysinit.target.wants/proc-fs-nfsd.mount
+	fi
+
+	# kernel code as of 3.8 hard-codes this path as a default
+	install -d ${D}/var/lib/nfs/v4recovery
+
+	# chown the directories and files
+	chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd
+	chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state
+
+	# the following are built by CC_FOR_BUILD
+	rm -f ${D}${sbindir}/rpcdebug
+	rm -f ${D}${sbindir}/rpcgen
+	rm -f ${D}${sbindir}/locktest
+}
diff --git a/yocto-poky/meta/recipes-connectivity/ofono/ofono/0001-backtrace-Disable-for-non-glibc-C-libraries.patch b/yocto-poky/meta/recipes-connectivity/ofono/ofono/0001-backtrace-Disable-for-non-glibc-C-libraries.patch
deleted file mode 100644
index 306b6da..0000000
--- a/yocto-poky/meta/recipes-connectivity/ofono/ofono/0001-backtrace-Disable-for-non-glibc-C-libraries.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 2d729af0897d7d72b83d111876febf9e0eec1a68 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 3 Apr 2015 20:50:56 -0700
-Subject: [PATCH] backtrace: Disable for non-glibc C libraries
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
----
- src/log.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/src/log.c b/src/log.c
-index febc874..9db4ae7 100644
---- a/src/log.c
-+++ b/src/log.c
-@@ -30,7 +30,9 @@
- #include <stdlib.h>
- #include <string.h>
- #include <syslog.h>
-+#ifdef __GLIBC__
- #include <execinfo.h>
-+#endif
- #include <dlfcn.h>
- 
- #include "ofono.h"
-@@ -219,8 +221,9 @@ static void signal_handler(int signo)
- {
- 	ofono_error("Aborting (signal %d) [%s]", signo, program_exec);
- 
-+#ifdef __GLIBC__
- 	print_backtrace(2);
--
-+#endif
- 	exit(EXIT_FAILURE);
- }
- 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.16.bb b/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.16.bb
deleted file mode 100644
index fbf13e5..0000000
--- a/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.16.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require ofono.inc
-
-SRC_URI  = "\
-  ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
-  file://ofono \
-  file://Revert-test-Convert-to-Python-3.patch \
-  file://0001-backtrace-Disable-for-non-glibc-C-libraries.patch \
-"
-SRC_URI[md5sum] = "c31b5b55a1d68354bff771d3edf02829"
-SRC_URI[sha256sum] = "403b98dadece8bc804c0bd16b96d3db5a3bb0f84af64b3d67924da2d1a754b07"
-
-CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.17.bb b/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.17.bb
new file mode 100644
index 0000000..947f9d7
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/ofono/ofono_1.17.bb
@@ -0,0 +1,11 @@
+require ofono.inc
+
+SRC_URI  = "\
+  ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
+  file://ofono \
+  file://Revert-test-Convert-to-Python-3.patch \
+"
+SRC_URI[md5sum] = "d280b1d267ba5bf391d2a898fea7c748"
+SRC_URI[sha256sum] = "cbf20f07fd15253c682b23c1786d517f505c3688f7c4ea93da777e1523b89635"
+
+CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
diff --git a/yocto-poky/meta/recipes-connectivity/openssh/openssh/run-ptest b/yocto-poky/meta/recipes-connectivity/openssh/openssh/run-ptest
index 564c0c8..36a3d2a 100755
--- a/yocto-poky/meta/recipes-connectivity/openssh/openssh/run-ptest
+++ b/yocto-poky/meta/recipes-connectivity/openssh/openssh/run-ptest
@@ -3,5 +3,42 @@
 export TEST_SHELL=sh
 
 cd regress
+sed -i "/\t\tagent-ptrace /d" Makefile
 make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
         | sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
+
+SSHAGENT=`which ssh-agent`
+GDB=`which gdb`
+
+if [ -z "${SSHAGENT}" -o -z "${GDB}" ]; then
+       echo "SKIP: agent-ptrace"
+       exit
+fi
+
+useradd openssh-test
+
+eval `su -c "${SSHAGENT} -s" openssh-test` > /dev/null
+r=$?
+if [ $r -ne 0 ]; then
+	echo "FAIL: could not start ssh-agent: exit code $r"
+else
+	su -c "gdb -p ${SSH_AGENT_PID}" openssh-test > /tmp/gdb.out 2>&1 << EOF
+		quit
+EOF
+	r=$?
+	if [ $r -ne 0 ]; then
+		echo "gdb failed: exit code $r"
+	fi
+	egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task ' >/dev/null /tmp/gdb.out
+	r=$?
+	rm -f /tmp/gdb.out
+	if [ $r -ne 0 ]; then
+		echo "FAIL: ptrace agent"
+	else
+		echo "PASS: ptrace agent"
+	fi
+
+	${SSHAGENT} -k > /dev/null
+fi
+userdel openssh-test
+
diff --git a/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.1p2.bb b/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.1p2.bb
index 714c391..3b5e28a 100644
--- a/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.1p2.bb
+++ b/yocto-poky/meta/recipes-connectivity/openssh/openssh_7.1p2.bb
@@ -91,7 +91,11 @@
 do_install_append () {
 	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
 		install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
-		sed -i -e 's:#UsePAM no:UsePAM yes:' ${WORKDIR}/sshd_config ${D}${sysconfdir}/ssh/sshd_config
+		sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config
+	fi
+
+	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
+		sed -i -e 's:#X11Forwarding no:X11Forwarding yes:' ${D}${sysconfdir}/ssh/sshd_config
 	fi
 
 	install -d ${D}${sysconfdir}/init.d
@@ -121,7 +125,7 @@
 }
 
 do_install_ptest () {
-	sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libdir}/${PN}/sftp-server|" regress/test-exec.sh
+	sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh
 	cp -r regress ${D}${PTEST_PATH}
 }
 
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl.inc b/yocto-poky/meta/recipes-connectivity/openssl/openssl.inc
index 8af423f..a5ddf4d 100644
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl.inc
+++ b/yocto-poky/meta/recipes-connectivity/openssl/openssl.inc
@@ -8,7 +8,7 @@
 LICENSE = "openssl"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"
 
-DEPENDS = "perl-native-runtime"
+DEPENDS = "hostperl-runtime-native"
 DEPENDS_append_class-target = " openssl-native"
 
 SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \
@@ -18,28 +18,26 @@
 PACKAGECONFIG[perl] = ",,,"
 
 AR_append = " r"
+TERMIO_libc-musl = "-DTERMIOS"
+TERMIO ?= "-DTERMIO"
 # Avoid binaries being marked as requiring an executable stack since it 
 # doesn't(which causes and this causes issues with SELinux
 CFLAG = "${@base_conditional('SITEINFO_ENDIANNESS', 'le', '-DL_ENDIAN', '-DB_ENDIAN', d)} \
-	-DTERMIO ${CFLAGS} -Wall -Wa,--noexecstack"
-
-# -02 does not work on mipsel: ssh hangs when it tries to read /dev/urandom
-CFLAG_mtx-1 := "${@'${CFLAG}'.replace('-O2', '')}"
-CFLAG_mtx-2 := "${@'${CFLAG}'.replace('-O2', '')}"
+	 ${TERMIO} ${CFLAGS} -Wall -Wa,--noexecstack"
 
 export DIRS = "crypto ssl apps"
 export EX_LIBS = "-lgcc -ldl"
 export AS = "${CC} -c"
+EXTRA_OEMAKE = "-e MAKEFLAGS="
 
 inherit pkgconfig siteinfo multilib_header ptest
 
 PACKAGES =+ "libcrypto libssl ${PN}-misc openssl-conf"
-FILES_libcrypto = "${base_libdir}/libcrypto${SOLIBS}"
-FILES_libssl = "${libdir}/libssl.so.*"
+FILES_libcrypto = "${libdir}/libcrypto${SOLIBS}"
+FILES_libssl = "${libdir}/libssl${SOLIBS}"
 FILES_${PN} =+ " ${libdir}/ssl/*"
 FILES_${PN}-misc = "${libdir}/ssl/misc ${bindir}/c_rehash"
 RDEPENDS_${PN}-misc = "${@bb.utils.contains('PACKAGECONFIG', 'perl', 'perl', '', d)}"
-FILES_${PN}-dev += "${base_libdir}/libcrypto${SOLIBSDEV}"
 
 # Add the openssl.cnf file to the openssl-conf package.  Make the libcrypto
 # package RRECOMMENDS on this package.  This will enable the configuration
@@ -115,7 +113,7 @@
 	linux-mipsel)
 		target=debian-mipsel
 		;;
-        linux-*-mips64)
+        linux-*-mips64 | linux-mips64)
                target=linux-mips
                 ;;
 	linux-microblaze*|linux-nios2*)
@@ -167,13 +165,6 @@
 	oe_libinstall -so libcrypto ${D}${libdir}
 	oe_libinstall -so libssl ${D}${libdir}
 
-	# Moving libcrypto to /lib
-	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
-		mkdir -p ${D}/${base_libdir}/
-		mv ${D}${libdir}/libcrypto* ${D}${base_libdir}/
-		sed -i s#libdir=\$\{exec_prefix\}\/lib#libdir=${base_libdir}# ${D}/${libdir}/pkgconfig/libcrypto.pc
-	fi
-
 	install -d ${D}${includedir}
 	cp --dereference -R include/openssl ${D}${includedir}
 
@@ -191,12 +182,18 @@
 }
 
 do_install_ptest () {
-	cp -r Makefile test ${D}${PTEST_PATH}
+	cp -r -L Makefile.org Makefile test ${D}${PTEST_PATH}
+	cp Configure config e_os.h ${D}${PTEST_PATH}
+	cp -r -L include ${D}${PTEST_PATH}
+	ln -sf ${base_libdir}/libcrypto.a ${D}${PTEST_PATH}
+	ln -sf ${libdir}/libssl.a ${D}${PTEST_PATH}
+	mkdir -p ${D}${PTEST_PATH}/crypto
+	cp crypto/constant_time_locl.h ${D}${PTEST_PATH}/crypto
 	cp -r certs ${D}${PTEST_PATH}
 	mkdir -p ${D}${PTEST_PATH}/apps
-	ln -sf /usr/lib/ssl/misc/CA.sh  ${D}${PTEST_PATH}/apps
-	ln -sf /usr/lib/ssl/openssl.cnf ${D}${PTEST_PATH}/apps
-	ln -sf /usr/bin/openssl         ${D}${PTEST_PATH}/apps
+	ln -sf ${libdir}/ssl/misc/CA.sh  ${D}${PTEST_PATH}/apps
+	ln -sf ${libdir}/ssl/openssl.cnf ${D}${PTEST_PATH}/apps
+	ln -sf ${bindir}/openssl         ${D}${PTEST_PATH}/apps
 	cp apps/server2.pem             ${D}${PTEST_PATH}/apps
 	mkdir -p ${D}${PTEST_PATH}/util
 	install util/opensslwrap.sh    ${D}${PTEST_PATH}/util
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-Add-test-for-CVE-2015-3194.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-Add-test-for-CVE-2015-3194.patch
deleted file mode 100644
index 39a2e5a..0000000
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl/0001-Add-test-for-CVE-2015-3194.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 00456fded43eadd4bb94bf675ae4ea5d158a764f Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve@openssl.org>
-Date: Wed, 4 Nov 2015 13:30:03 +0000
-Subject: [PATCH] Add test for CVE-2015-3194
-
-Reviewed-by: Richard Levitte <levitte@openssl.org>
-
-Upstream-Status: Backport
-
-This patch was imported from 
-https://git.openssl.org/?p=openssl.git;a=commit;h=00456fded43eadd4bb94bf675ae4ea5d158a764f
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- test/certs/pss1.pem | 21 +++++++++++++++++++++
- test/tx509          |  7 +++++++
- 2 files changed, 28 insertions(+)
- create mode 100644 test/certs/pss1.pem
-
-diff --git a/test/certs/pss1.pem b/test/certs/pss1.pem
-new file mode 100644
-index 0000000..29da71d
---- /dev/null
-+++ b/test/certs/pss1.pem
-@@ -0,0 +1,21 @@
-+-----BEGIN CERTIFICATE-----
-+MIIDdjCCAjqgAwIBAgIJANcwZLyfEv7DMD4GCSqGSIb3DQEBCjAxoA0wCwYJYIZI
-+AWUDBAIBoRowGAYJKoZIhvcNAQEIMAsGCWCGSAFlAwQCAaIEAgIA3jAnMSUwIwYD
-+VQQDDBxUZXN0IEludmFsaWQgUFNTIGNlcnRpZmljYXRlMB4XDTE1MTEwNDE2MDIz
-+NVoXDTE1MTIwNDE2MDIzNVowJzElMCMGA1UEAwwcVGVzdCBJbnZhbGlkIFBTUyBj
-+ZXJ0aWZpY2F0ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMTaM7WH
-+qVCAGAIA+zL1KWvvASTrhlq+1ePdO7wsrWX2KiYoTYrJYTnxhLnn0wrHqApt79nL
-+IBG7cfShyZqFHOY/IzlYPMVt+gPo293gw96Fds5JBsjhjkyGnOyr9OUntFqvxDbT
-+IIFU7o9IdxD4edaqjRv+fegVE+B79pDk4s0ujsk6dULtCg9Rst0ucGFo19mr+b7k
-+dbfn8pZ72ZNDJPueVdrUAWw9oll61UcYfk75XdrLk6JlL41GrYHc8KlfXf43gGQq
-+QfrpHkg4Ih2cI6Wt2nhFGAzrlcorzLliQIUJRIhM8h4IgDfpBpaPdVQLqS2pFbXa
-+5eQjqiyJwak2vJ8CAwEAAaNQME4wHQYDVR0OBBYEFCt180N4oGUt5LbzBwQ4Ia+2
-+4V97MB8GA1UdIwQYMBaAFCt180N4oGUt5LbzBwQ4Ia+24V97MAwGA1UdEwQFMAMB
-+Af8wMQYJKoZIhvcNAQEKMCSgDTALBglghkgBZQMEAgGhDTALBgkqhkiG9w0BAQii
-+BAICAN4DggEBAAjBtm90lGxgddjc4Xu/nbXXFHVs2zVcHv/mqOZoQkGB9r/BVgLb
-+xhHrFZ2pHGElbUYPfifdS9ztB73e1d4J+P29o0yBqfd4/wGAc/JA8qgn6AAEO/Xn
-+plhFeTRJQtLZVl75CkHXgUGUd3h+ADvKtcBuW9dSUncaUrgNKR8u/h/2sMG38RWY
-+DzBddC/66YTa3r7KkVUfW7yqRQfELiGKdcm+bjlTEMsvS+EhHup9CzbpoCx2Fx9p
-+NPtFY3yEObQhmL1JyoCRWqBE75GzFPbRaiux5UpEkns+i3trkGssZzsOuVqHNTNZ
-+lC9+9hPHIoc9UMmAQNo1vGIW3NWVoeGbaJ8=
-+-----END CERTIFICATE-----
-diff --git a/test/tx509 b/test/tx509
-index 0ce3b52..77f5cac 100644
---- a/test/tx509
-+++ b/test/tx509
-@@ -74,5 +74,12 @@ if [ $? != 0 ]; then exit 1; fi
- cmp x509-f.p x509-ff.p3
- if [ $? != 0 ]; then exit 1; fi
- 
-+echo "Parsing test certificates"
-+
-+$cmd -in certs/pss1.pem -text -noout >/dev/null
-+if [ $? != 0 ]; then exit 1; fi
-+
-+echo OK
-+
- /bin/rm -f x509-f.* x509-ff.* x509-fff.*
- exit 0
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3193-bn-asm-x86_64-mont5.pl-fix-carry-propagating-bug-CVE.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3193-bn-asm-x86_64-mont5.pl-fix-carry-propagating-bug-CVE.patch
deleted file mode 100644
index 125016a..0000000
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3193-bn-asm-x86_64-mont5.pl-fix-carry-propagating-bug-CVE.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From d73cc256c8e256c32ed959456101b73ba9842f72 Mon Sep 17 00:00:00 2001
-From: Andy Polyakov <appro@openssl.org>
-Date: Tue, 1 Dec 2015 09:00:32 +0100
-Subject: [PATCH] bn/asm/x86_64-mont5.pl: fix carry propagating bug
- (CVE-2015-3193).
-
-Reviewed-by: Richard Levitte <levitte@openssl.org>
-(cherry picked from commit e7c078db57908cbf16074c68034977565ffaf107)
-
-Upstream-Status: Backport
-
-This patch was imported from 
-https://git.openssl.org/?p=openssl.git;a=commit;h=d73cc256c8e256c32ed959456101b73ba9842f72
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- crypto/bn/asm/x86_64-mont5.pl | 22 +++++++++++++++++++---
- crypto/bn/bntest.c            | 18 ++++++++++++++++++
- 2 files changed, 37 insertions(+), 3 deletions(-)
-
-Index: openssl-1.0.2d/crypto/bn/asm/x86_64-mont5.pl
-===================================================================
---- openssl-1.0.2d.orig/crypto/bn/asm/x86_64-mont5.pl
-+++ openssl-1.0.2d/crypto/bn/asm/x86_64-mont5.pl
-@@ -1779,6 +1779,15 @@ sqr8x_reduction:
- .align	32
- .L8x_tail_done:
- 	add	(%rdx),%r8		# can this overflow?
-+	adc	\$0,%r9
-+	adc	\$0,%r10
-+	adc	\$0,%r11
-+	adc	\$0,%r12
-+	adc	\$0,%r13
-+	adc	\$0,%r14
-+	adc	\$0,%r15		# can't overflow, because we
-+					# started with "overhung" part
-+					# of multiplication
- 	xor	%rax,%rax
- 
- 	neg	$carry
-@@ -3125,6 +3134,15 @@ sqrx8x_reduction:
- .align	32
- .Lsqrx8x_tail_done:
- 	add	24+8(%rsp),%r8		# can this overflow?
-+	adc	\$0,%r9
-+	adc	\$0,%r10
-+	adc	\$0,%r11
-+	adc	\$0,%r12
-+	adc	\$0,%r13
-+	adc	\$0,%r14
-+	adc	\$0,%r15		# can't overflow, because we
-+					# started with "overhung" part
-+					# of multiplication
- 	mov	$carry,%rax		# xor	%rax,%rax
- 
- 	sub	16+8(%rsp),$carry	# mov 16(%rsp),%cf
-@@ -3168,13 +3186,11 @@ my ($rptr,$nptr)=("%rdx","%rbp");
- my @ri=map("%r$_",(10..13));
- my @ni=map("%r$_",(14..15));
- $code.=<<___;
--	xor	%rbx,%rbx
-+	xor	%ebx,%ebx
- 	sub	%r15,%rsi		# compare top-most words
- 	adc	%rbx,%rbx
- 	mov	%rcx,%r10		# -$num
--	.byte	0x67
- 	or	%rbx,%rax
--	.byte	0x67
- 	mov	%rcx,%r9		# -$num
- 	xor	\$1,%rax
- 	sar	\$3+2,%rcx		# cf=0
-Index: openssl-1.0.2d/crypto/bn/bntest.c
-===================================================================
---- openssl-1.0.2d.orig/crypto/bn/bntest.c
-+++ openssl-1.0.2d/crypto/bn/bntest.c
-@@ -1027,6 +1027,24 @@ int test_mod_exp_mont_consttime(BIO *bp,
-             return 0;
-         }
-     }
-+
-+    /* Regression test for carry propagation bug in sqr8x_reduction */
-+    BN_hex2bn(&a, "050505050505");
-+    BN_hex2bn(&b, "02");
-+    BN_hex2bn(&c,
-+        "4141414141414141414141274141414141414141414141414141414141414141"
-+        "4141414141414141414141414141414141414141414141414141414141414141"
-+        "4141414141414141414141800000000000000000000000000000000000000000"
-+        "0000000000000000000000000000000000000000000000000000000000000000"
-+        "0000000000000000000000000000000000000000000000000000000000000000"
-+        "0000000000000000000000000000000000000000000000000000000001");
-+    BN_mod_exp(d, a, b, c, ctx);
-+    BN_mul(e, a, a, ctx);
-+    if (BN_cmp(d, e)) {
-+        fprintf(stderr, "BN_mod_exp and BN_mul produce different results!\n");
-+        return 0;
-+    }
-+
-     BN_free(a);
-     BN_free(b);
-     BN_free(c);
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3194-1-Add-PSS-parameter-check.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3194-1-Add-PSS-parameter-check.patch
deleted file mode 100644
index 13d4891..0000000
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3194-1-Add-PSS-parameter-check.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From c394a488942387246653833359a5c94b5832674e Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve@openssl.org>
-Date: Fri, 2 Oct 2015 12:35:19 +0100
-Subject: [PATCH] Add PSS parameter check.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Avoid seg fault by checking mgf1 parameter is not NULL. This can be
-triggered during certificate verification so could be a DoS attack
-against a client or a server enabling client authentication.
-
-Thanks to Loïc Jonas Etienne (Qnective AG) for discovering this bug.
-
-CVE-2015-3194
-
-Reviewed-by: Richard Levitte <levitte@openssl.org>
-
-Upstream-Status: Backport
-
-This patch was imported from 
-https://git.openssl.org/?p=openssl.git;a=commit;h=c394a488942387246653833359a5c94b5832674e
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- crypto/rsa/rsa_ameth.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c
-index ca3922e..4e06218 100644
---- a/crypto/rsa/rsa_ameth.c
-+++ b/crypto/rsa/rsa_ameth.c
-@@ -268,7 +268,7 @@ static X509_ALGOR *rsa_mgf1_decode(X509_ALGOR *alg)
- {
-     const unsigned char *p;
-     int plen;
--    if (alg == NULL)
-+    if (alg == NULL || alg->parameter == NULL)
-         return NULL;
-     if (OBJ_obj2nid(alg->algorithm) != NID_mgf1)
-         return NULL;
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3195-Fix-leak-with-ASN.1-combine.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3195-Fix-leak-with-ASN.1-combine.patch
deleted file mode 100644
index 6fc4d0e..0000000
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3195-Fix-leak-with-ASN.1-combine.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From cc598f321fbac9c04da5766243ed55d55948637d Mon Sep 17 00:00:00 2001
-From: "Dr. Stephen Henson" <steve@openssl.org>
-Date: Tue, 10 Nov 2015 19:03:07 +0000
-Subject: [PATCH] Fix leak with ASN.1 combine.
-
-When parsing a combined structure pass a flag to the decode routine
-so on error a pointer to the parent structure is not zeroed as
-this will leak any additional components in the parent.
-
-This can leak memory in any application parsing PKCS#7 or CMS structures.
-
-CVE-2015-3195.
-
-Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using
-libFuzzer.
-
-PR#4131
-
-Reviewed-by: Richard Levitte <levitte@openssl.org>
-
-Upstream-Status: Backport
-
-This patch was imported from
-https://git.openssl.org/?p=openssl.git;a=commit;h=cc598f321fbac9c04da5766243ed55d55948637d
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- crypto/asn1/tasn_dec.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/crypto/asn1/tasn_dec.c b/crypto/asn1/tasn_dec.c
-index febf605..9256049 100644
---- a/crypto/asn1/tasn_dec.c
-+++ b/crypto/asn1/tasn_dec.c
-@@ -180,6 +180,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
-     int otag;
-     int ret = 0;
-     ASN1_VALUE **pchptr, *ptmpval;
-+    int combine = aclass & ASN1_TFLG_COMBINE;
-+    aclass &= ~ASN1_TFLG_COMBINE;
-     if (!pval)
-         return 0;
-     if (aux && aux->asn1_cb)
-@@ -500,7 +502,8 @@ int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
-  auxerr:
-     ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_AUX_ERROR);
-  err:
--    ASN1_item_ex_free(pval, it);
-+    if (combine == 0)
-+        ASN1_item_ex_free(pval, it);
-     if (errtt)
-         ERR_add_error_data(4, "Field=", errtt->field_name,
-                            ", Type=", it->sname);
-@@ -689,7 +692,7 @@ static int asn1_template_noexp_d2i(ASN1_VALUE **val,
-     } else {
-         /* Nothing special */
-         ret = ASN1_item_ex_d2i(val, &p, len, ASN1_ITEM_ptr(tt->item),
--                               -1, 0, opt, ctx);
-+                               -1, tt->flags & ASN1_TFLG_COMBINE, opt, ctx);
-         if (!ret) {
-             ASN1err(ASN1_F_ASN1_TEMPLATE_NOEXP_D2I, ERR_R_NESTED_ASN1_ERROR);
-             goto err;
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3197.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3197.patch
deleted file mode 100644
index dd288c9..0000000
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2015-3197.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d81a1600588b726c2bdccda7efad3cc7a87d6245 Mon Sep 17 00:00:00 2001
-From: Viktor Dukhovni <openssl-users@dukhovni.org>
-Date: Wed, 30 Dec 2015 22:44:51 -0500
-Subject: [PATCH] Better SSLv2 cipher-suite enforcement
-
-Based on patch by: Nimrod Aviram <nimrod.aviram@gmail.com>
-
-CVE-2015-3197
-
-Reviewed-by: Tim Hudson <tjh@openssl.org>
-Reviewed-by: Richard Levitte <levitte@openssl.org>
-
-Upstream-Status: Backport
-https://github.com/openssl/openssl/commit/d81a1600588b726c2bdccda7efad3cc7a87d6245
-
-CVE: CVE-2015-3197
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ssl/s2_srvr.c | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-Index: openssl-1.0.2d/ssl/s2_srvr.c
-===================================================================
---- openssl-1.0.2d.orig/ssl/s2_srvr.c
-+++ openssl-1.0.2d/ssl/s2_srvr.c
-@@ -402,7 +402,7 @@ static int get_client_master_key(SSL *s)
-         }
- 
-         cp = ssl2_get_cipher_by_char(p);
--        if (cp == NULL) {
-+        if (cp == NULL || sk_SSL_CIPHER_find(s->session->ciphers, cp) < 0) {
-             ssl2_return_error(s, SSL2_PE_NO_CIPHER);
-             SSLerr(SSL_F_GET_CLIENT_MASTER_KEY, SSL_R_NO_CIPHER_MATCH);
-             return (-1);
-@@ -687,8 +687,12 @@ static int get_client_hello(SSL *s)
-             prio = cs;
-             allow = cl;
-         }
-+
-+        /* Generate list of SSLv2 ciphers shared between client and server */
-         for (z = 0; z < sk_SSL_CIPHER_num(prio); z++) {
--            if (sk_SSL_CIPHER_find(allow, sk_SSL_CIPHER_value(prio, z)) < 0) {
-+            const SSL_CIPHER *cp = sk_SSL_CIPHER_value(prio, z);
-+            if ((cp->algorithm_ssl & SSL_SSLV2) == 0 ||
-+                sk_SSL_CIPHER_find(allow, cp) < 0) {
-                 (void)sk_SSL_CIPHER_delete(prio, z);
-                 z--;
-             }
-@@ -697,6 +701,13 @@ static int get_client_hello(SSL *s)
-             sk_SSL_CIPHER_free(s->session->ciphers);
-             s->session->ciphers = prio;
-         }
-+
-+        /* Make sure we have at least one cipher in common */
-+        if (sk_SSL_CIPHER_num(s->session->ciphers) == 0) {
-+            ssl2_return_error(s, SSL2_PE_NO_CIPHER);
-+            SSLerr(SSL_F_GET_CLIENT_HELLO, SSL_R_NO_CIPHER_MATCH);
-+            return -1;
-+        }
-         /*
-          * s->session->ciphers should now have a list of ciphers that are on
-          * both the client and server. This list is ordered by the order the
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2016-0701_1.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2016-0701_1.patch
deleted file mode 100644
index cf2d9a7..0000000
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2016-0701_1.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 878e2c5b13010329c203f309ed0c8f2113f85648 Mon Sep 17 00:00:00 2001
-From: Matt Caswell <matt@openssl.org>
-Date: Mon, 18 Jan 2016 11:31:58 +0000
-Subject: [PATCH] Prevent small subgroup attacks on DH/DHE
-
-Historically OpenSSL only ever generated DH parameters based on "safe"
-primes. More recently (in version 1.0.2) support was provided for
-generating X9.42 style parameter files such as those required for RFC
-5114 support. The primes used in such files may not be "safe". Where an
-application is using DH configured with parameters based on primes that
-are not "safe" then an attacker could use this fact to find a peer's
-private DH exponent. This attack requires that the attacker complete
-multiple handshakes in which the peer uses the same DH exponent.
-
-A simple mitigation is to ensure that y^q (mod p) == 1
-
-CVE-2016-0701 (fix part 1 of 2)
-
-Issue reported by Antonio Sanso.
-
-Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
-
-Upstream-Status: Backport
-
-https://github.com/openssl/openssl/commit/878e2c5b13010329c203f309ed0c8f2113f85648
-
-CVE: CVE-2016-0701
-Signed-of-by: Armin Kuster <akuster@mvisa.com>
-
----
- crypto/dh/dh.h       |  1 +
- crypto/dh/dh_check.c | 35 +++++++++++++++++++++++++----------
- 2 files changed, 26 insertions(+), 10 deletions(-)
-
-diff --git a/crypto/dh/dh.h b/crypto/dh/dh.h
-index b177673..5498a9d 100644
---- a/crypto/dh/dh.h
-+++ b/crypto/dh/dh.h
-@@ -174,6 +174,7 @@ struct dh_st {
- /* DH_check_pub_key error codes */
- # define DH_CHECK_PUBKEY_TOO_SMALL       0x01
- # define DH_CHECK_PUBKEY_TOO_LARGE       0x02
-+# define DH_CHECK_PUBKEY_INVALID         0x03
- 
- /*
-  * primes p where (p-1)/2 is prime too are called "safe"; we define this for
-diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c
-index 347467c..5adedc0 100644
---- a/crypto/dh/dh_check.c
-+++ b/crypto/dh/dh_check.c
-@@ -151,23 +151,38 @@ int DH_check(const DH *dh, int *ret)
- int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret)
- {
-     int ok = 0;
--    BIGNUM *q = NULL;
-+    BIGNUM *tmp = NULL;
-+    BN_CTX *ctx = NULL;
- 
-     *ret = 0;
--    q = BN_new();
--    if (q == NULL)
-+    ctx = BN_CTX_new();
-+    if (ctx == NULL)
-         goto err;
--    BN_set_word(q, 1);
--    if (BN_cmp(pub_key, q) <= 0)
-+    BN_CTX_start(ctx);
-+    tmp = BN_CTX_get(ctx);
-+    if (tmp == NULL)
-+        goto err;
-+    BN_set_word(tmp, 1);
-+    if (BN_cmp(pub_key, tmp) <= 0)
-         *ret |= DH_CHECK_PUBKEY_TOO_SMALL;
--    BN_copy(q, dh->p);
--    BN_sub_word(q, 1);
--    if (BN_cmp(pub_key, q) >= 0)
-+    BN_copy(tmp, dh->p);
-+    BN_sub_word(tmp, 1);
-+    if (BN_cmp(pub_key, tmp) >= 0)
-         *ret |= DH_CHECK_PUBKEY_TOO_LARGE;
- 
-+    if (dh->q != NULL) {
-+        /* Check pub_key^q == 1 mod p */
-+        if (!BN_mod_exp(tmp, pub_key, dh->q, dh->p, ctx))
-+            goto err;
-+        if (!BN_is_one(tmp))
-+            *ret |= DH_CHECK_PUBKEY_INVALID;
-+    }
-+
-     ok = 1;
-  err:
--    if (q != NULL)
--        BN_free(q);
-+    if (ctx != NULL) {
-+        BN_CTX_end(ctx);
-+        BN_CTX_free(ctx);
-+    }
-     return (ok);
- }
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2016-0701_2.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2016-0701_2.patch
deleted file mode 100644
index 05caf0a..0000000
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl/CVE-2016-0701_2.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-From c5b831f21d0d29d1e517d139d9d101763f60c9a2 Mon Sep 17 00:00:00 2001
-From: Matt Caswell <matt@openssl.org>
-Date: Thu, 17 Dec 2015 02:57:20 +0000
-Subject: [PATCH] Always generate DH keys for ephemeral DH cipher suites
-
-Modified version of the commit ffaef3f15 in the master branch by Stephen
-Henson. This makes the SSL_OP_SINGLE_DH_USE option a no-op and always
-generates a new DH key for every handshake regardless.
-
-CVE-2016-0701 (fix part 2 or 2)
-
-Issue reported by Antonio Sanso
-
-Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
-
-Upstream-Status: Backport
-
-https://github.com/openssl/openssl/commit/c5b831f21d0d29d1e517d139d9d101763f60c9a2
-
-CVE: CVE-2016-0701 #2
-Signed-of-by: Armin Kuster <akuster@mvisa.com>
-
----
- doc/ssl/SSL_CTX_set_tmp_dh_callback.pod | 29 +++++------------------------
- ssl/s3_lib.c                            | 14 --------------
- ssl/s3_srvr.c                           | 17 +++--------------
- ssl/ssl.h                               |  2 +-
- 4 files changed, 9 insertions(+), 53 deletions(-)
-
-Index: openssl-1.0.2d/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod
-===================================================================
---- openssl-1.0.2d.orig/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod
-+++ openssl-1.0.2d/doc/ssl/SSL_CTX_set_tmp_dh_callback.pod
-@@ -48,25 +48,8 @@ even if he gets hold of the normal (cert
- only used for signing.
- 
- In order to perform a DH key exchange the server must use a DH group
--(DH parameters) and generate a DH key.
--The server will always generate a new DH key during the negotiation
--if either the DH parameters are supplied via callback or the
--SSL_OP_SINGLE_DH_USE option of SSL_CTX_set_options(3) is set (or both).
--It will  immediately create a DH key if DH parameters are supplied via
--SSL_CTX_set_tmp_dh() and SSL_OP_SINGLE_DH_USE is not set.
--In this case,
--it may happen that a key is generated on initialization without later
--being needed, while on the other hand the computer time during the
--negotiation is being saved.
--
--If "strong" primes were used to generate the DH parameters, it is not strictly
--necessary to generate a new key for each handshake but it does improve forward
--secrecy. If it is not assured that "strong" primes were used,
--SSL_OP_SINGLE_DH_USE must be used in order to prevent small subgroup
--attacks. Always using SSL_OP_SINGLE_DH_USE has an impact on the
--computer time needed during negotiation, but it is not very large, so
--application authors/users should consider always enabling this option.
--The option is required to implement perfect forward secrecy (PFS).
-+(DH parameters) and generate a DH key. The server will always generate
-+a new DH key during the negotiation.
- 
- As generating DH parameters is extremely time consuming, an application
- should not generate the parameters on the fly but supply the parameters.
-@@ -93,10 +76,9 @@ can supply the DH parameters via a callb
- Previous versions of the callback used B<is_export> and B<keylength>
- parameters to control parameter generation for export and non-export
- cipher suites. Modern servers that do not support export ciphersuites
--are advised to either use SSL_CTX_set_tmp_dh() in combination with
--SSL_OP_SINGLE_DH_USE, or alternatively, use the callback but ignore
--B<keylength> and B<is_export> and simply supply at least 2048-bit
--parameters in the callback.
-+are advised to either use SSL_CTX_set_tmp_dh() or alternatively, use
-+the callback but ignore B<keylength> and B<is_export> and simply
-+supply at least 2048-bit parameters in the callback.
- 
- =head1 EXAMPLES
- 
-@@ -128,7 +110,6 @@ partly left out.)
-  if (SSL_CTX_set_tmp_dh(ctx, dh_2048) != 1) {
-    /* Error. */
-  }
-- SSL_CTX_set_options(ctx, SSL_OP_SINGLE_DH_USE);
-  ...
- 
- =head1 RETURN VALUES
-Index: openssl-1.0.2d/ssl/s3_lib.c
-===================================================================
---- openssl-1.0.2d.orig/ssl/s3_lib.c
-+++ openssl-1.0.2d/ssl/s3_lib.c
-@@ -3206,13 +3206,6 @@ long ssl3_ctrl(SSL *s, int cmd, long lar
-                 SSLerr(SSL_F_SSL3_CTRL, ERR_R_DH_LIB);
-                 return (ret);
-             }
--            if (!(s->options & SSL_OP_SINGLE_DH_USE)) {
--                if (!DH_generate_key(dh)) {
--                    DH_free(dh);
--                    SSLerr(SSL_F_SSL3_CTRL, ERR_R_DH_LIB);
--                    return (ret);
--                }
--            }
-             if (s->cert->dh_tmp != NULL)
-                 DH_free(s->cert->dh_tmp);
-             s->cert->dh_tmp = dh;
-@@ -3710,13 +3703,6 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd
-                 SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_DH_LIB);
-                 return 0;
-             }
--            if (!(ctx->options & SSL_OP_SINGLE_DH_USE)) {
--                if (!DH_generate_key(new)) {
--                    SSLerr(SSL_F_SSL3_CTX_CTRL, ERR_R_DH_LIB);
--                    DH_free(new);
--                    return 0;
--                }
--            }
-             if (cert->dh_tmp != NULL)
-                 DH_free(cert->dh_tmp);
-             cert->dh_tmp = new;
-Index: openssl-1.0.2d/ssl/s3_srvr.c
-===================================================================
---- openssl-1.0.2d.orig/ssl/s3_srvr.c
-+++ openssl-1.0.2d/ssl/s3_srvr.c
-@@ -1684,20 +1684,9 @@ int ssl3_send_server_key_exchange(SSL *s
-             }
- 
-             s->s3->tmp.dh = dh;
--            if ((dhp->pub_key == NULL ||
--                 dhp->priv_key == NULL ||
--                 (s->options & SSL_OP_SINGLE_DH_USE))) {
--                if (!DH_generate_key(dh)) {
--                    SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_DH_LIB);
--                    goto err;
--                }
--            } else {
--                dh->pub_key = BN_dup(dhp->pub_key);
--                dh->priv_key = BN_dup(dhp->priv_key);
--                if ((dh->pub_key == NULL) || (dh->priv_key == NULL)) {
--                    SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_DH_LIB);
--                    goto err;
--                }
-+            if (!DH_generate_key(dh)) {
-+                SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE, ERR_R_DH_LIB);
-+                goto err;
-             }
-             r[0] = dh->p;
-             r[1] = dh->g;
-Index: openssl-1.0.2d/ssl/ssl.h
-===================================================================
---- openssl-1.0.2d.orig/ssl/ssl.h
-+++ openssl-1.0.2d/ssl/ssl.h
-@@ -625,7 +625,7 @@ struct ssl_session_st {
- # define SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION        0x00040000L
- /* If set, always create a new key when using tmp_ecdh parameters */
- # define SSL_OP_SINGLE_ECDH_USE                          0x00080000L
--/* If set, always create a new key when using tmp_dh parameters */
-+/* Does nothing: retained for compatibility */
- # define SSL_OP_SINGLE_DH_USE                            0x00100000L
- /* Does nothing: retained for compatibiity */
- # define SSL_OP_EPHEMERAL_RSA                            0x0
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/configure-musl-target.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/configure-musl-target.patch
new file mode 100644
index 0000000..613dc7b
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/openssl/openssl/configure-musl-target.patch
@@ -0,0 +1,27 @@
+Add musl triplet support
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: openssl-1.0.2a/Configure
+===================================================================
+--- openssl-1.0.2a.orig/Configure
++++ openssl-1.0.2a/Configure
+@@ -431,7 +431,7 @@ my %table=(
+ #
+ #       ./Configure linux-armv4 -march=armv6 -D__ARM_MAX_ARCH__=8
+ #
+-"linux-armv4",	"gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-armv4", "gcc: -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${armv4_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-aarch64","gcc: -O3 -Wall::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${aarch64_asm}:linux64:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ # Configure script adds minimally required -march for assembly support,
+ # if no -march was specified at command line. mips32 and mips64 below
+@@ -504,6 +504,8 @@ my %table=(
+ "linux-gnueabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-uclibceabi-arm","$ENV{'CC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ "linux-uclibceabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-musleabi-arm","$ENV{'CC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
++"linux-musleabi-armeb","$ENV{'CC'}:-DB_ENDIAN -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+ 
+ "linux-avr32","$ENV{'CC'}:-O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG DES_RISC1:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).",
+ 
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch
index c397af2..af3989f 100644
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch
+++ b/yocto-poky/meta/recipes-connectivity/openssl/openssl/crypto_use_bigint_in_x86-64_perl.patch
@@ -1,4 +1,4 @@
-Upsteram Status: Backport
+Upstream-Status: Backport
 
 When building on x32 systems where the default type is 32bit, make sure
 we can transparently represent 64bit integers.  Otherwise we end up with
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch
index 0c1a0b6..d81e22c 100644
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch
+++ b/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian1.0.2/block_diginotar.patch
@@ -9,14 +9,15 @@
 Reviewed-by: Dr Stephen N Henson <shenson@drh-consultancy.co.uk>
 
 This is not meant as final patch.  
- 
+
 Upstream-Status: Backport [debian]
 
+Signed-off-by: Armin Kuster <akuster@mvista.com>
 
-Index: openssl-1.0.2/crypto/x509/x509_vfy.c
+Index: openssl-1.0.2g/crypto/x509/x509_vfy.c
 ===================================================================
---- openssl-1.0.2.orig/crypto/x509/x509_vfy.c
-+++ openssl-1.0.2/crypto/x509/x509_vfy.c
+--- openssl-1.0.2g.orig/crypto/x509/x509_vfy.c
++++ openssl-1.0.2g/crypto/x509/x509_vfy.c
 @@ -119,6 +119,7 @@ static int check_trust(X509_STORE_CTX *c
  static int check_revocation(X509_STORE_CTX *ctx);
  static int check_cert(X509_STORE_CTX *ctx);
@@ -25,17 +26,17 @@
  
  static int get_crl_score(X509_STORE_CTX *ctx, X509 **pissuer,
                           unsigned int *preasons, X509_CRL *crl, X509 *x);
-@@ -438,6 +439,9 @@ int X509_verify_cert(X509_STORE_CTX *ctx
+@@ -489,6 +490,9 @@ int X509_verify_cert(X509_STORE_CTX *ctx
      if (!ok)
-         goto end;
+         goto err;
  
 +	ok = check_ca_blacklist(ctx);
-+	if(!ok) goto end;
++	if(!ok) goto err;
 +
  #ifndef OPENSSL_NO_RFC3779
      /* RFC 3779 path validation, now that CRL check has been done */
      ok = v3_asid_validate_path(ctx);
-@@ -938,6 +942,29 @@ static int check_crl_time(X509_STORE_CTX
+@@ -996,6 +1000,29 @@ static int check_crl_time(X509_STORE_CTX
      return 1;
  }
  
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian1.0.2/version-script.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian1.0.2/version-script.patch
new file mode 100644
index 0000000..29f11a2
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/openssl/openssl/debian1.0.2/version-script.patch
@@ -0,0 +1,4656 @@
+Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/Configure
+===================================================================
+--- openssl-1.0.2~beta1.obsolete.0.0498436515490575.orig/Configure	2014-02-24 21:02:30.000000000 +0100
++++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/Configure	2014-02-24 21:02:30.000000000 +0100
+@@ -1651,6 +1651,8 @@
+ 		}
+ 	}
+ 
++$shared_ldflag .= " -Wl,--version-script=openssl.ld";
++
+ open(IN,'<Makefile.org') || die "unable to read Makefile.org:$!\n";
+ unlink("$Makefile.new") || die "unable to remove old $Makefile.new:$!\n" if -e "$Makefile.new";
+ open(OUT,">$Makefile.new") || die "unable to create $Makefile.new:$!\n";
+Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/openssl.ld
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/openssl.ld	2014-02-24 22:19:08.601827266 +0100
+@@ -0,0 +1,4608 @@
++OPENSSL_1.0.2d {
++	global:
++		BIO_f_ssl;
++		BIO_new_buffer_ssl_connect;
++		BIO_new_ssl;
++		BIO_new_ssl_connect;
++		BIO_proxy_ssl_copy_session_id;
++		BIO_ssl_copy_session_id;
++		BIO_ssl_shutdown;
++		d2i_SSL_SESSION;
++		DTLSv1_client_method;
++		DTLSv1_method;
++		DTLSv1_server_method;
++		ERR_load_SSL_strings;
++		i2d_SSL_SESSION;
++		kssl_build_principal_2;
++		kssl_cget_tkt;
++		kssl_check_authent;
++		kssl_ctx_free;
++		kssl_ctx_new;
++		kssl_ctx_setkey;
++		kssl_ctx_setprinc;
++		kssl_ctx_setstring;
++		kssl_ctx_show;
++		kssl_err_set;
++		kssl_krb5_free_data_contents;
++		kssl_sget_tkt;
++		kssl_skip_confound;
++		kssl_validate_times;
++		PEM_read_bio_SSL_SESSION;
++		PEM_read_SSL_SESSION;
++		PEM_write_bio_SSL_SESSION;
++		PEM_write_SSL_SESSION;
++		SSL_accept;
++		SSL_add_client_CA;
++		SSL_add_dir_cert_subjects_to_stack;
++		SSL_add_dir_cert_subjs_to_stk;
++		SSL_add_file_cert_subjects_to_stack;
++		SSL_add_file_cert_subjs_to_stk;
++		SSL_alert_desc_string;
++		SSL_alert_desc_string_long;
++		SSL_alert_type_string;
++		SSL_alert_type_string_long;
++		SSL_callback_ctrl;
++		SSL_check_private_key;
++		SSL_CIPHER_description;
++		SSL_CIPHER_get_bits;
++		SSL_CIPHER_get_name;
++		SSL_CIPHER_get_version;
++		SSL_clear;
++		SSL_COMP_add_compression_method;
++		SSL_COMP_get_compression_methods;
++		SSL_COMP_get_compress_methods;
++		SSL_COMP_get_name;
++		SSL_connect;
++		SSL_copy_session_id;
++		SSL_ctrl;
++		SSL_CTX_add_client_CA;
++		SSL_CTX_add_session;
++		SSL_CTX_callback_ctrl;
++		SSL_CTX_check_private_key;
++		SSL_CTX_ctrl;
++		SSL_CTX_flush_sessions;
++		SSL_CTX_free;
++		SSL_CTX_get_cert_store;
++		SSL_CTX_get_client_CA_list;
++		SSL_CTX_get_client_cert_cb;
++		SSL_CTX_get_ex_data;
++		SSL_CTX_get_ex_new_index;
++		SSL_CTX_get_info_callback;
++		SSL_CTX_get_quiet_shutdown;
++		SSL_CTX_get_timeout;
++		SSL_CTX_get_verify_callback;
++		SSL_CTX_get_verify_depth;
++		SSL_CTX_get_verify_mode;
++		SSL_CTX_load_verify_locations;
++		SSL_CTX_new;
++		SSL_CTX_remove_session;
++		SSL_CTX_sess_get_get_cb;
++		SSL_CTX_sess_get_new_cb;
++		SSL_CTX_sess_get_remove_cb;
++		SSL_CTX_sessions;
++		SSL_CTX_sess_set_get_cb;
++		SSL_CTX_sess_set_new_cb;
++		SSL_CTX_sess_set_remove_cb;
++		SSL_CTX_set1_param;
++		SSL_CTX_set_cert_store;
++		SSL_CTX_set_cert_verify_callback;
++		SSL_CTX_set_cert_verify_cb;
++		SSL_CTX_set_cipher_list;
++		SSL_CTX_set_client_CA_list;
++		SSL_CTX_set_client_cert_cb;
++		SSL_CTX_set_client_cert_engine;
++		SSL_CTX_set_cookie_generate_cb;
++		SSL_CTX_set_cookie_verify_cb;
++		SSL_CTX_set_default_passwd_cb;
++		SSL_CTX_set_default_passwd_cb_userdata;
++		SSL_CTX_set_default_verify_paths;
++		SSL_CTX_set_def_passwd_cb_ud;
++		SSL_CTX_set_def_verify_paths;
++		SSL_CTX_set_ex_data;
++		SSL_CTX_set_generate_session_id;
++		SSL_CTX_set_info_callback;
++		SSL_CTX_set_msg_callback;
++		SSL_CTX_set_psk_client_callback;
++		SSL_CTX_set_psk_server_callback;
++		SSL_CTX_set_purpose;
++		SSL_CTX_set_quiet_shutdown;
++		SSL_CTX_set_session_id_context;
++		SSL_CTX_set_ssl_version;
++		SSL_CTX_set_timeout;
++		SSL_CTX_set_tmp_dh_callback;
++		SSL_CTX_set_tmp_ecdh_callback;
++		SSL_CTX_set_tmp_rsa_callback;
++		SSL_CTX_set_trust;
++		SSL_CTX_set_verify;
++		SSL_CTX_set_verify_depth;
++		SSL_CTX_use_cert_chain_file;
++		SSL_CTX_use_certificate;
++		SSL_CTX_use_certificate_ASN1;
++		SSL_CTX_use_certificate_chain_file;
++		SSL_CTX_use_certificate_file;
++		SSL_CTX_use_PrivateKey;
++		SSL_CTX_use_PrivateKey_ASN1;
++		SSL_CTX_use_PrivateKey_file;
++		SSL_CTX_use_psk_identity_hint;
++		SSL_CTX_use_RSAPrivateKey;
++		SSL_CTX_use_RSAPrivateKey_ASN1;
++		SSL_CTX_use_RSAPrivateKey_file;
++		SSL_do_handshake;
++		SSL_dup;
++		SSL_dup_CA_list;
++		SSLeay_add_ssl_algorithms;
++		SSL_free;
++		SSL_get1_session;
++		SSL_get_certificate;
++		SSL_get_cipher_list;
++		SSL_get_ciphers;
++		SSL_get_client_CA_list;
++		SSL_get_current_cipher;
++		SSL_get_current_compression;
++		SSL_get_current_expansion;
++		SSL_get_default_timeout;
++		SSL_get_error;
++		SSL_get_ex_data;
++		SSL_get_ex_data_X509_STORE_CTX_idx;
++		SSL_get_ex_d_X509_STORE_CTX_idx;
++		SSL_get_ex_new_index;
++		SSL_get_fd;
++		SSL_get_finished;
++		SSL_get_info_callback;
++		SSL_get_peer_cert_chain;
++		SSL_get_peer_certificate;
++		SSL_get_peer_finished;
++		SSL_get_privatekey;
++		SSL_get_psk_identity;
++		SSL_get_psk_identity_hint;
++		SSL_get_quiet_shutdown;
++		SSL_get_rbio;
++		SSL_get_read_ahead;
++		SSL_get_rfd;
++		SSL_get_servername;
++		SSL_get_servername_type;
++		SSL_get_session;
++		SSL_get_shared_ciphers;
++		SSL_get_shutdown;
++		SSL_get_SSL_CTX;
++		SSL_get_ssl_method;
++		SSL_get_verify_callback;
++		SSL_get_verify_depth;
++		SSL_get_verify_mode;
++		SSL_get_verify_result;
++		SSL_get_version;
++		SSL_get_wbio;
++		SSL_get_wfd;
++		SSL_has_matching_session_id;
++		SSL_library_init;
++		SSL_load_client_CA_file;
++		SSL_load_error_strings;
++		SSL_new;
++		SSL_peek;
++		SSL_pending;
++		SSL_read;
++		SSL_renegotiate;
++		SSL_renegotiate_pending;
++		SSL_rstate_string;
++		SSL_rstate_string_long;
++		SSL_SESSION_cmp;
++		SSL_SESSION_free;
++		SSL_SESSION_get_ex_data;
++		SSL_SESSION_get_ex_new_index;
++		SSL_SESSION_get_id;
++		SSL_SESSION_get_time;
++		SSL_SESSION_get_timeout;
++		SSL_SESSION_hash;
++		SSL_SESSION_new;
++		SSL_SESSION_print;
++		SSL_SESSION_print_fp;
++		SSL_SESSION_set_ex_data;
++		SSL_SESSION_set_time;
++		SSL_SESSION_set_timeout;
++		SSL_set1_param;
++		SSL_set_accept_state;
++		SSL_set_bio;
++		SSL_set_cipher_list;
++		SSL_set_client_CA_list;
++		SSL_set_connect_state;
++		SSL_set_ex_data;
++		SSL_set_fd;
++		SSL_set_generate_session_id;
++		SSL_set_info_callback;
++		SSL_set_msg_callback;
++		SSL_set_psk_client_callback;
++		SSL_set_psk_server_callback;
++		SSL_set_purpose;
++		SSL_set_quiet_shutdown;
++		SSL_set_read_ahead;
++		SSL_set_rfd;
++		SSL_set_session;
++		SSL_set_session_id_context;
++		SSL_set_session_secret_cb;
++		SSL_set_session_ticket_ext;
++		SSL_set_session_ticket_ext_cb;
++		SSL_set_shutdown;
++		SSL_set_SSL_CTX;
++		SSL_set_ssl_method;
++		SSL_set_tmp_dh_callback;
++		SSL_set_tmp_ecdh_callback;
++		SSL_set_tmp_rsa_callback;
++		SSL_set_trust;
++		SSL_set_verify;
++		SSL_set_verify_depth;
++		SSL_set_verify_result;
++		SSL_set_wfd;
++		SSL_shutdown;
++		SSL_state;
++		SSL_state_string;
++		SSL_state_string_long;
++		SSL_use_certificate;
++		SSL_use_certificate_ASN1;
++		SSL_use_certificate_file;
++		SSL_use_PrivateKey;
++		SSL_use_PrivateKey_ASN1;
++		SSL_use_PrivateKey_file;
++		SSL_use_psk_identity_hint;
++		SSL_use_RSAPrivateKey;
++		SSL_use_RSAPrivateKey_ASN1;
++		SSL_use_RSAPrivateKey_file;
++		SSLv23_client_method;
++		SSLv23_method;
++		SSLv23_server_method;
++		SSLv2_client_method;
++		SSLv2_method;
++		SSLv2_server_method;
++		SSLv3_client_method;
++		SSLv3_method;
++		SSLv3_server_method;
++		SSL_version;
++		SSL_want;
++		SSL_write;
++		TLSv1_client_method;
++		TLSv1_method;
++		TLSv1_server_method;
++
++
++		SSLeay;
++		SSLeay_version;
++		ASN1_BIT_STRING_asn1_meth;
++		ASN1_HEADER_free;
++		ASN1_HEADER_new;
++		ASN1_IA5STRING_asn1_meth;
++		ASN1_INTEGER_get;
++		ASN1_INTEGER_set;
++		ASN1_INTEGER_to_BN;
++		ASN1_OBJECT_create;
++		ASN1_OBJECT_free;
++		ASN1_OBJECT_new;
++		ASN1_PRINTABLE_type;
++		ASN1_STRING_cmp;
++		ASN1_STRING_dup;
++		ASN1_STRING_free;
++		ASN1_STRING_new;
++		ASN1_STRING_print;
++		ASN1_STRING_set;
++		ASN1_STRING_type_new;
++		ASN1_TYPE_free;
++		ASN1_TYPE_new;
++		ASN1_UNIVERSALSTRING_to_string;
++		ASN1_UTCTIME_check;
++		ASN1_UTCTIME_print;
++		ASN1_UTCTIME_set;
++		ASN1_check_infinite_end;
++		ASN1_d2i_bio;
++		ASN1_d2i_fp;
++		ASN1_digest;
++		ASN1_dup;
++		ASN1_get_object;
++		ASN1_i2d_bio;
++		ASN1_i2d_fp;
++		ASN1_object_size;
++		ASN1_parse;
++		ASN1_put_object;
++		ASN1_sign;
++		ASN1_verify;
++		BF_cbc_encrypt;
++		BF_cfb64_encrypt;
++		BF_ecb_encrypt;
++		BF_encrypt;
++		BF_ofb64_encrypt;
++		BF_options;
++		BF_set_key;
++		BIO_CONNECT_free;
++		BIO_CONNECT_new;
++		BIO_accept;
++		BIO_ctrl;
++		BIO_int_ctrl;
++		BIO_debug_callback;
++		BIO_dump;
++		BIO_dup_chain;
++		BIO_f_base64;
++		BIO_f_buffer;
++		BIO_f_cipher;
++		BIO_f_md;
++		BIO_f_null;
++		BIO_f_proxy_server;
++		BIO_fd_non_fatal_error;
++		BIO_fd_should_retry;
++		BIO_find_type;
++		BIO_free;
++		BIO_free_all;
++		BIO_get_accept_socket;
++		BIO_get_filter_bio;
++		BIO_get_host_ip;
++		BIO_get_port;
++		BIO_get_retry_BIO;
++		BIO_get_retry_reason;
++		BIO_gethostbyname;
++		BIO_gets;
++		BIO_new;
++		BIO_new_accept;
++		BIO_new_connect;
++		BIO_new_fd;
++		BIO_new_file;
++		BIO_new_fp;
++		BIO_new_socket;
++		BIO_pop;
++		BIO_printf;
++		BIO_push;
++		BIO_puts;
++		BIO_read;
++		BIO_s_accept;
++		BIO_s_connect;
++		BIO_s_fd;
++		BIO_s_file;
++		BIO_s_mem;
++		BIO_s_null;
++		BIO_s_proxy_client;
++		BIO_s_socket;
++		BIO_set;
++		BIO_set_cipher;
++		BIO_set_tcp_ndelay;
++		BIO_sock_cleanup;
++		BIO_sock_error;
++		BIO_sock_init;
++		BIO_sock_non_fatal_error;
++		BIO_sock_should_retry;
++		BIO_socket_ioctl;
++		BIO_write;
++		BN_CTX_free;
++		BN_CTX_new;
++		BN_MONT_CTX_free;
++		BN_MONT_CTX_new;
++		BN_MONT_CTX_set;
++		BN_add;
++		BN_add_word;
++		BN_hex2bn;
++		BN_bin2bn;
++		BN_bn2hex;
++		BN_bn2bin;
++		BN_clear;
++		BN_clear_bit;
++		BN_clear_free;
++		BN_cmp;
++		BN_copy;
++		BN_div;
++		BN_div_word;
++		BN_dup;
++		BN_free;
++		BN_from_montgomery;
++		BN_gcd;
++		BN_generate_prime;
++		BN_get_word;
++		BN_is_bit_set;
++		BN_is_prime;
++		BN_lshift;
++		BN_lshift1;
++		BN_mask_bits;
++		BN_mod;
++		BN_mod_exp;
++		BN_mod_exp_mont;
++		BN_mod_exp_simple;
++		BN_mod_inverse;
++		BN_mod_mul;
++		BN_mod_mul_montgomery;
++		BN_mod_word;
++		BN_mul;
++		BN_new;
++		BN_num_bits;
++		BN_num_bits_word;
++		BN_options;
++		BN_print;
++		BN_print_fp;
++		BN_rand;
++		BN_reciprocal;
++		BN_rshift;
++		BN_rshift1;
++		BN_set_bit;
++		BN_set_word;
++		BN_sqr;
++		BN_sub;
++		BN_to_ASN1_INTEGER;
++		BN_ucmp;
++		BN_value_one;
++		BUF_MEM_free;
++		BUF_MEM_grow;
++		BUF_MEM_new;
++		BUF_strdup;
++		CONF_free;
++		CONF_get_number;
++		CONF_get_section;
++		CONF_get_string;
++		CONF_load;
++		CRYPTO_add_lock;
++		CRYPTO_dbg_free;
++		CRYPTO_dbg_malloc;
++		CRYPTO_dbg_realloc;
++		CRYPTO_dbg_remalloc;
++		CRYPTO_free;
++		CRYPTO_get_add_lock_callback;
++		CRYPTO_get_id_callback;
++		CRYPTO_get_lock_name;
++		CRYPTO_get_locking_callback;
++		CRYPTO_get_mem_functions;
++		CRYPTO_lock;
++		CRYPTO_malloc;
++		CRYPTO_mem_ctrl;
++		CRYPTO_mem_leaks;
++		CRYPTO_mem_leaks_cb;
++		CRYPTO_mem_leaks_fp;
++		CRYPTO_realloc;
++		CRYPTO_remalloc;
++		CRYPTO_set_add_lock_callback;
++		CRYPTO_set_id_callback;
++		CRYPTO_set_locking_callback;
++		CRYPTO_set_mem_functions;
++		CRYPTO_thread_id;
++		DH_check;
++		DH_compute_key;
++		DH_free;
++		DH_generate_key;
++		DH_generate_parameters;
++		DH_new;
++		DH_size;
++		DHparams_print;
++		DHparams_print_fp;
++		DSA_free;
++		DSA_generate_key;
++		DSA_generate_parameters;
++		DSA_is_prime;
++		DSA_new;
++		DSA_print;
++		DSA_print_fp;
++		DSA_sign;
++		DSA_sign_setup;
++		DSA_size;
++		DSA_verify;
++		DSAparams_print;
++		DSAparams_print_fp;
++		ERR_clear_error;
++		ERR_error_string;
++		ERR_free_strings;
++		ERR_func_error_string;
++		ERR_get_err_state_table;
++		ERR_get_error;
++		ERR_get_error_line;
++		ERR_get_state;
++		ERR_get_string_table;
++		ERR_lib_error_string;
++		ERR_load_ASN1_strings;
++		ERR_load_BIO_strings;
++		ERR_load_BN_strings;
++		ERR_load_BUF_strings;
++		ERR_load_CONF_strings;
++		ERR_load_DH_strings;
++		ERR_load_DSA_strings;
++		ERR_load_ERR_strings;
++		ERR_load_EVP_strings;
++		ERR_load_OBJ_strings;
++		ERR_load_PEM_strings;
++		ERR_load_PROXY_strings;
++		ERR_load_RSA_strings;
++		ERR_load_X509_strings;
++		ERR_load_crypto_strings;
++		ERR_load_strings;
++		ERR_peek_error;
++		ERR_peek_error_line;
++		ERR_print_errors;
++		ERR_print_errors_fp;
++		ERR_put_error;
++		ERR_reason_error_string;
++		ERR_remove_state;
++		EVP_BytesToKey;
++		EVP_CIPHER_CTX_cleanup;
++		EVP_CipherFinal;
++		EVP_CipherInit;
++		EVP_CipherUpdate;
++		EVP_DecodeBlock;
++		EVP_DecodeFinal;
++		EVP_DecodeInit;
++		EVP_DecodeUpdate;
++		EVP_DecryptFinal;
++		EVP_DecryptInit;
++		EVP_DecryptUpdate;
++		EVP_DigestFinal;
++		EVP_DigestInit;
++		EVP_DigestUpdate;
++		EVP_EncodeBlock;
++		EVP_EncodeFinal;
++		EVP_EncodeInit;
++		EVP_EncodeUpdate;
++		EVP_EncryptFinal;
++		EVP_EncryptInit;
++		EVP_EncryptUpdate;
++		EVP_OpenFinal;
++		EVP_OpenInit;
++		EVP_PKEY_assign;
++		EVP_PKEY_copy_parameters;
++		EVP_PKEY_free;
++		EVP_PKEY_missing_parameters;
++		EVP_PKEY_new;
++		EVP_PKEY_save_parameters;
++		EVP_PKEY_size;
++		EVP_PKEY_type;
++		EVP_SealFinal;
++		EVP_SealInit;
++		EVP_SignFinal;
++		EVP_VerifyFinal;
++		EVP_add_alias;
++		EVP_add_cipher;
++		EVP_add_digest;
++		EVP_bf_cbc;
++		EVP_bf_cfb64;
++		EVP_bf_ecb;
++		EVP_bf_ofb;
++		EVP_cleanup;
++		EVP_des_cbc;
++		EVP_des_cfb64;
++		EVP_des_ecb;
++		EVP_des_ede;
++		EVP_des_ede3;
++		EVP_des_ede3_cbc;
++		EVP_des_ede3_cfb64;
++		EVP_des_ede3_ofb;
++		EVP_des_ede_cbc;
++		EVP_des_ede_cfb64;
++		EVP_des_ede_ofb;
++		EVP_des_ofb;
++		EVP_desx_cbc;
++		EVP_dss;
++		EVP_dss1;
++		EVP_enc_null;
++		EVP_get_cipherbyname;
++		EVP_get_digestbyname;
++		EVP_get_pw_prompt;
++		EVP_idea_cbc;
++		EVP_idea_cfb64;
++		EVP_idea_ecb;
++		EVP_idea_ofb;
++		EVP_md2;
++		EVP_md5;
++		EVP_md_null;
++		EVP_rc2_cbc;
++		EVP_rc2_cfb64;
++		EVP_rc2_ecb;
++		EVP_rc2_ofb;
++		EVP_rc4;
++		EVP_read_pw_string;
++		EVP_set_pw_prompt;
++		EVP_sha;
++		EVP_sha1;
++		MD2;
++		MD2_Final;
++		MD2_Init;
++		MD2_Update;
++		MD2_options;
++		MD5;
++		MD5_Final;
++		MD5_Init;
++		MD5_Update;
++		MDC2;
++		MDC2_Final;
++		MDC2_Init;
++		MDC2_Update;
++		NETSCAPE_SPKAC_free;
++		NETSCAPE_SPKAC_new;
++		NETSCAPE_SPKI_free;
++		NETSCAPE_SPKI_new;
++		NETSCAPE_SPKI_sign;
++		NETSCAPE_SPKI_verify;
++		OBJ_add_object;
++		OBJ_bsearch;
++		OBJ_cleanup;
++		OBJ_cmp;
++		OBJ_create;
++		OBJ_dup;
++		OBJ_ln2nid;
++		OBJ_new_nid;
++		OBJ_nid2ln;
++		OBJ_nid2obj;
++		OBJ_nid2sn;
++		OBJ_obj2nid;
++		OBJ_sn2nid;
++		OBJ_txt2nid;
++		PEM_ASN1_read;
++		PEM_ASN1_read_bio;
++		PEM_ASN1_write;
++		PEM_ASN1_write_bio;
++		PEM_SealFinal;
++		PEM_SealInit;
++		PEM_SealUpdate;
++		PEM_SignFinal;
++		PEM_SignInit;
++		PEM_SignUpdate;
++		PEM_X509_INFO_read;
++		PEM_X509_INFO_read_bio;
++		PEM_X509_INFO_write_bio;
++		PEM_dek_info;
++		PEM_do_header;
++		PEM_get_EVP_CIPHER_INFO;
++		PEM_proc_type;
++		PEM_read;
++		PEM_read_DHparams;
++		PEM_read_DSAPrivateKey;
++		PEM_read_DSAparams;
++		PEM_read_PKCS7;
++		PEM_read_PrivateKey;
++		PEM_read_RSAPrivateKey;
++		PEM_read_X509;
++		PEM_read_X509_CRL;
++		PEM_read_X509_REQ;
++		PEM_read_bio;
++		PEM_read_bio_DHparams;
++		PEM_read_bio_DSAPrivateKey;
++		PEM_read_bio_DSAparams;
++		PEM_read_bio_PKCS7;
++		PEM_read_bio_PrivateKey;
++		PEM_read_bio_RSAPrivateKey;
++		PEM_read_bio_X509;
++		PEM_read_bio_X509_CRL;
++		PEM_read_bio_X509_REQ;
++		PEM_write;
++		PEM_write_DHparams;
++		PEM_write_DSAPrivateKey;
++		PEM_write_DSAparams;
++		PEM_write_PKCS7;
++		PEM_write_PrivateKey;
++		PEM_write_RSAPrivateKey;
++		PEM_write_X509;
++		PEM_write_X509_CRL;
++		PEM_write_X509_REQ;
++		PEM_write_bio;
++		PEM_write_bio_DHparams;
++		PEM_write_bio_DSAPrivateKey;
++		PEM_write_bio_DSAparams;
++		PEM_write_bio_PKCS7;
++		PEM_write_bio_PrivateKey;
++		PEM_write_bio_RSAPrivateKey;
++		PEM_write_bio_X509;
++		PEM_write_bio_X509_CRL;
++		PEM_write_bio_X509_REQ;
++		PKCS7_DIGEST_free;
++		PKCS7_DIGEST_new;
++		PKCS7_ENCRYPT_free;
++		PKCS7_ENCRYPT_new;
++		PKCS7_ENC_CONTENT_free;
++		PKCS7_ENC_CONTENT_new;
++		PKCS7_ENVELOPE_free;
++		PKCS7_ENVELOPE_new;
++		PKCS7_ISSUER_AND_SERIAL_digest;
++		PKCS7_ISSUER_AND_SERIAL_free;
++		PKCS7_ISSUER_AND_SERIAL_new;
++		PKCS7_RECIP_INFO_free;
++		PKCS7_RECIP_INFO_new;
++		PKCS7_SIGNED_free;
++		PKCS7_SIGNED_new;
++		PKCS7_SIGNER_INFO_free;
++		PKCS7_SIGNER_INFO_new;
++		PKCS7_SIGN_ENVELOPE_free;
++		PKCS7_SIGN_ENVELOPE_new;
++		PKCS7_dup;
++		PKCS7_free;
++		PKCS7_new;
++		PROXY_ENTRY_add_noproxy;
++		PROXY_ENTRY_clear_noproxy;
++		PROXY_ENTRY_free;
++		PROXY_ENTRY_get_noproxy;
++		PROXY_ENTRY_new;
++		PROXY_ENTRY_set_server;
++		PROXY_add_noproxy;
++		PROXY_add_server;
++		PROXY_check_by_host;
++		PROXY_check_url;
++		PROXY_clear_noproxy;
++		PROXY_free;
++		PROXY_get_noproxy;
++		PROXY_get_proxies;
++		PROXY_get_proxy_entry;
++		PROXY_load_conf;
++		PROXY_new;
++		PROXY_print;
++		RAND_bytes;
++		RAND_cleanup;
++		RAND_file_name;
++		RAND_load_file;
++		RAND_screen;
++		RAND_seed;
++		RAND_write_file;
++		RC2_cbc_encrypt;
++		RC2_cfb64_encrypt;
++		RC2_ecb_encrypt;
++		RC2_encrypt;
++		RC2_ofb64_encrypt;
++		RC2_set_key;
++		RC4;
++		RC4_options;
++		RC4_set_key;
++		RSAPrivateKey_asn1_meth;
++		RSAPrivateKey_dup;
++		RSAPublicKey_dup;
++		RSA_PKCS1_SSLeay;
++		RSA_free;
++		RSA_generate_key;
++		RSA_new;
++		RSA_new_method;
++		RSA_print;
++		RSA_print_fp;
++		RSA_private_decrypt;
++		RSA_private_encrypt;
++		RSA_public_decrypt;
++		RSA_public_encrypt;
++		RSA_set_default_method;
++		RSA_sign;
++		RSA_sign_ASN1_OCTET_STRING;
++		RSA_size;
++		RSA_verify;
++		RSA_verify_ASN1_OCTET_STRING;
++		SHA;
++		SHA1;
++		SHA1_Final;
++		SHA1_Init;
++		SHA1_Update;
++		SHA_Final;
++		SHA_Init;
++		SHA_Update;
++		OpenSSL_add_all_algorithms;
++		OpenSSL_add_all_ciphers;
++		OpenSSL_add_all_digests;
++		TXT_DB_create_index;
++		TXT_DB_free;
++		TXT_DB_get_by_index;
++		TXT_DB_insert;
++		TXT_DB_read;
++		TXT_DB_write;
++		X509_ALGOR_free;
++		X509_ALGOR_new;
++		X509_ATTRIBUTE_free;
++		X509_ATTRIBUTE_new;
++		X509_CINF_free;
++		X509_CINF_new;
++		X509_CRL_INFO_free;
++		X509_CRL_INFO_new;
++		X509_CRL_add_ext;
++		X509_CRL_cmp;
++		X509_CRL_delete_ext;
++		X509_CRL_dup;
++		X509_CRL_free;
++		X509_CRL_get_ext;
++		X509_CRL_get_ext_by_NID;
++		X509_CRL_get_ext_by_OBJ;
++		X509_CRL_get_ext_by_critical;
++		X509_CRL_get_ext_count;
++		X509_CRL_new;
++		X509_CRL_sign;
++		X509_CRL_verify;
++		X509_EXTENSION_create_by_NID;
++		X509_EXTENSION_create_by_OBJ;
++		X509_EXTENSION_dup;
++		X509_EXTENSION_free;
++		X509_EXTENSION_get_critical;
++		X509_EXTENSION_get_data;
++		X509_EXTENSION_get_object;
++		X509_EXTENSION_new;
++		X509_EXTENSION_set_critical;
++		X509_EXTENSION_set_data;
++		X509_EXTENSION_set_object;
++		X509_INFO_free;
++		X509_INFO_new;
++		X509_LOOKUP_by_alias;
++		X509_LOOKUP_by_fingerprint;
++		X509_LOOKUP_by_issuer_serial;
++		X509_LOOKUP_by_subject;
++		X509_LOOKUP_ctrl;
++		X509_LOOKUP_file;
++		X509_LOOKUP_free;
++		X509_LOOKUP_hash_dir;
++		X509_LOOKUP_init;
++		X509_LOOKUP_new;
++		X509_LOOKUP_shutdown;
++		X509_NAME_ENTRY_create_by_NID;
++		X509_NAME_ENTRY_create_by_OBJ;
++		X509_NAME_ENTRY_dup;
++		X509_NAME_ENTRY_free;
++		X509_NAME_ENTRY_get_data;
++		X509_NAME_ENTRY_get_object;
++		X509_NAME_ENTRY_new;
++		X509_NAME_ENTRY_set_data;
++		X509_NAME_ENTRY_set_object;
++		X509_NAME_add_entry;
++		X509_NAME_cmp;
++		X509_NAME_delete_entry;
++		X509_NAME_digest;
++		X509_NAME_dup;
++		X509_NAME_entry_count;
++		X509_NAME_free;
++		X509_NAME_get_entry;
++		X509_NAME_get_index_by_NID;
++		X509_NAME_get_index_by_OBJ;
++		X509_NAME_get_text_by_NID;
++		X509_NAME_get_text_by_OBJ;
++		X509_NAME_hash;
++		X509_NAME_new;
++		X509_NAME_oneline;
++		X509_NAME_print;
++		X509_NAME_set;
++		X509_OBJECT_free_contents;
++		X509_OBJECT_retrieve_by_subject;
++		X509_OBJECT_up_ref_count;
++		X509_PKEY_free;
++		X509_PKEY_new;
++		X509_PUBKEY_free;
++		X509_PUBKEY_get;
++		X509_PUBKEY_new;
++		X509_PUBKEY_set;
++		X509_REQ_INFO_free;
++		X509_REQ_INFO_new;
++		X509_REQ_dup;
++		X509_REQ_free;
++		X509_REQ_get_pubkey;
++		X509_REQ_new;
++		X509_REQ_print;
++		X509_REQ_print_fp;
++		X509_REQ_set_pubkey;
++		X509_REQ_set_subject_name;
++		X509_REQ_set_version;
++		X509_REQ_sign;
++		X509_REQ_to_X509;
++		X509_REQ_verify;
++		X509_REVOKED_add_ext;
++		X509_REVOKED_delete_ext;
++		X509_REVOKED_free;
++		X509_REVOKED_get_ext;
++		X509_REVOKED_get_ext_by_NID;
++		X509_REVOKED_get_ext_by_OBJ;
++		X509_REVOKED_get_ext_by_critical;
++		X509_REVOKED_get_ext_by_critic;
++		X509_REVOKED_get_ext_count;
++		X509_REVOKED_new;
++		X509_SIG_free;
++		X509_SIG_new;
++		X509_STORE_CTX_cleanup;
++		X509_STORE_CTX_init;
++		X509_STORE_add_cert;
++		X509_STORE_add_lookup;
++		X509_STORE_free;
++		X509_STORE_get_by_subject;
++		X509_STORE_load_locations;
++		X509_STORE_new;
++		X509_STORE_set_default_paths;
++		X509_VAL_free;
++		X509_VAL_new;
++		X509_add_ext;
++		X509_asn1_meth;
++		X509_certificate_type;
++		X509_check_private_key;
++		X509_cmp_current_time;
++		X509_delete_ext;
++		X509_digest;
++		X509_dup;
++		X509_free;
++		X509_get_default_cert_area;
++		X509_get_default_cert_dir;
++		X509_get_default_cert_dir_env;
++		X509_get_default_cert_file;
++		X509_get_default_cert_file_env;
++		X509_get_default_private_dir;
++		X509_get_ext;
++		X509_get_ext_by_NID;
++		X509_get_ext_by_OBJ;
++		X509_get_ext_by_critical;
++		X509_get_ext_count;
++		X509_get_issuer_name;
++		X509_get_pubkey;
++		X509_get_pubkey_parameters;
++		X509_get_serialNumber;
++		X509_get_subject_name;
++		X509_gmtime_adj;
++		X509_issuer_and_serial_cmp;
++		X509_issuer_and_serial_hash;
++		X509_issuer_name_cmp;
++		X509_issuer_name_hash;
++		X509_load_cert_file;
++		X509_new;
++		X509_print;
++		X509_print_fp;
++		X509_set_issuer_name;
++		X509_set_notAfter;
++		X509_set_notBefore;
++		X509_set_pubkey;
++		X509_set_serialNumber;
++		X509_set_subject_name;
++		X509_set_version;
++		X509_sign;
++		X509_subject_name_cmp;
++		X509_subject_name_hash;
++		X509_to_X509_REQ;
++		X509_verify;
++		X509_verify_cert;
++		X509_verify_cert_error_string;
++		X509v3_add_ext;
++		X509v3_add_extension;
++		X509v3_add_netscape_extensions;
++		X509v3_add_standard_extensions;
++		X509v3_cleanup_extensions;
++		X509v3_data_type_by_NID;
++		X509v3_data_type_by_OBJ;
++		X509v3_delete_ext;
++		X509v3_get_ext;
++		X509v3_get_ext_by_NID;
++		X509v3_get_ext_by_OBJ;
++		X509v3_get_ext_by_critical;
++		X509v3_get_ext_count;
++		X509v3_pack_string;
++		X509v3_pack_type_by_NID;
++		X509v3_pack_type_by_OBJ;
++		X509v3_unpack_string;
++		_des_crypt;
++		a2d_ASN1_OBJECT;
++		a2i_ASN1_INTEGER;
++		a2i_ASN1_STRING;
++		asn1_Finish;
++		asn1_GetSequence;
++		bn_div_words;
++		bn_expand2;
++		bn_mul_add_words;
++		bn_mul_words;
++		BN_uadd;
++		BN_usub;
++		bn_sqr_words;
++		_ossl_old_crypt;
++		d2i_ASN1_BIT_STRING;
++		d2i_ASN1_BOOLEAN;
++		d2i_ASN1_HEADER;
++		d2i_ASN1_IA5STRING;
++		d2i_ASN1_INTEGER;
++		d2i_ASN1_OBJECT;
++		d2i_ASN1_OCTET_STRING;
++		d2i_ASN1_PRINTABLE;
++		d2i_ASN1_PRINTABLESTRING;
++		d2i_ASN1_SET;
++		d2i_ASN1_T61STRING;
++		d2i_ASN1_TYPE;
++		d2i_ASN1_UTCTIME;
++		d2i_ASN1_bytes;
++		d2i_ASN1_type_bytes;
++		d2i_DHparams;
++		d2i_DSAPrivateKey;
++		d2i_DSAPrivateKey_bio;
++		d2i_DSAPrivateKey_fp;
++		d2i_DSAPublicKey;
++		d2i_DSAparams;
++		d2i_NETSCAPE_SPKAC;
++		d2i_NETSCAPE_SPKI;
++		d2i_Netscape_RSA;
++		d2i_PKCS7;
++		d2i_PKCS7_DIGEST;
++		d2i_PKCS7_ENCRYPT;
++		d2i_PKCS7_ENC_CONTENT;
++		d2i_PKCS7_ENVELOPE;
++		d2i_PKCS7_ISSUER_AND_SERIAL;
++		d2i_PKCS7_RECIP_INFO;
++		d2i_PKCS7_SIGNED;
++		d2i_PKCS7_SIGNER_INFO;
++		d2i_PKCS7_SIGN_ENVELOPE;
++		d2i_PKCS7_bio;
++		d2i_PKCS7_fp;
++		d2i_PrivateKey;
++		d2i_PublicKey;
++		d2i_RSAPrivateKey;
++		d2i_RSAPrivateKey_bio;
++		d2i_RSAPrivateKey_fp;
++		d2i_RSAPublicKey;
++		d2i_X509;
++		d2i_X509_ALGOR;
++		d2i_X509_ATTRIBUTE;
++		d2i_X509_CINF;
++		d2i_X509_CRL;
++		d2i_X509_CRL_INFO;
++		d2i_X509_CRL_bio;
++		d2i_X509_CRL_fp;
++		d2i_X509_EXTENSION;
++		d2i_X509_NAME;
++		d2i_X509_NAME_ENTRY;
++		d2i_X509_PKEY;
++		d2i_X509_PUBKEY;
++		d2i_X509_REQ;
++		d2i_X509_REQ_INFO;
++		d2i_X509_REQ_bio;
++		d2i_X509_REQ_fp;
++		d2i_X509_REVOKED;
++		d2i_X509_SIG;
++		d2i_X509_VAL;
++		d2i_X509_bio;
++		d2i_X509_fp;
++		DES_cbc_cksum;
++		DES_cbc_encrypt;
++		DES_cblock_print_file;
++		DES_cfb64_encrypt;
++		DES_cfb_encrypt;
++		DES_decrypt3;
++		DES_ecb3_encrypt;
++		DES_ecb_encrypt;
++		DES_ede3_cbc_encrypt;
++		DES_ede3_cfb64_encrypt;
++		DES_ede3_ofb64_encrypt;
++		DES_enc_read;
++		DES_enc_write;
++		DES_encrypt1;
++		DES_encrypt2;
++		DES_encrypt3;
++		DES_fcrypt;
++		DES_is_weak_key;
++		DES_key_sched;
++		DES_ncbc_encrypt;
++		DES_ofb64_encrypt;
++		DES_ofb_encrypt;
++		DES_options;
++		DES_pcbc_encrypt;
++		DES_quad_cksum;
++		DES_random_key;
++		_ossl_old_des_random_seed;
++		_ossl_old_des_read_2passwords;
++		_ossl_old_des_read_password;
++		_ossl_old_des_read_pw;
++		_ossl_old_des_read_pw_string;
++		DES_set_key;
++		DES_set_odd_parity;
++		DES_string_to_2keys;
++		DES_string_to_key;
++		DES_xcbc_encrypt;
++		DES_xwhite_in2out;
++		fcrypt_body;
++		i2a_ASN1_INTEGER;
++		i2a_ASN1_OBJECT;
++		i2a_ASN1_STRING;
++		i2d_ASN1_BIT_STRING;
++		i2d_ASN1_BOOLEAN;
++		i2d_ASN1_HEADER;
++		i2d_ASN1_IA5STRING;
++		i2d_ASN1_INTEGER;
++		i2d_ASN1_OBJECT;
++		i2d_ASN1_OCTET_STRING;
++		i2d_ASN1_PRINTABLE;
++		i2d_ASN1_SET;
++		i2d_ASN1_TYPE;
++		i2d_ASN1_UTCTIME;
++		i2d_ASN1_bytes;
++		i2d_DHparams;
++		i2d_DSAPrivateKey;
++		i2d_DSAPrivateKey_bio;
++		i2d_DSAPrivateKey_fp;
++		i2d_DSAPublicKey;
++		i2d_DSAparams;
++		i2d_NETSCAPE_SPKAC;
++		i2d_NETSCAPE_SPKI;
++		i2d_Netscape_RSA;
++		i2d_PKCS7;
++		i2d_PKCS7_DIGEST;
++		i2d_PKCS7_ENCRYPT;
++		i2d_PKCS7_ENC_CONTENT;
++		i2d_PKCS7_ENVELOPE;
++		i2d_PKCS7_ISSUER_AND_SERIAL;
++		i2d_PKCS7_RECIP_INFO;
++		i2d_PKCS7_SIGNED;
++		i2d_PKCS7_SIGNER_INFO;
++		i2d_PKCS7_SIGN_ENVELOPE;
++		i2d_PKCS7_bio;
++		i2d_PKCS7_fp;
++		i2d_PrivateKey;
++		i2d_PublicKey;
++		i2d_RSAPrivateKey;
++		i2d_RSAPrivateKey_bio;
++		i2d_RSAPrivateKey_fp;
++		i2d_RSAPublicKey;
++		i2d_X509;
++		i2d_X509_ALGOR;
++		i2d_X509_ATTRIBUTE;
++		i2d_X509_CINF;
++		i2d_X509_CRL;
++		i2d_X509_CRL_INFO;
++		i2d_X509_CRL_bio;
++		i2d_X509_CRL_fp;
++		i2d_X509_EXTENSION;
++		i2d_X509_NAME;
++		i2d_X509_NAME_ENTRY;
++		i2d_X509_PKEY;
++		i2d_X509_PUBKEY;
++		i2d_X509_REQ;
++		i2d_X509_REQ_INFO;
++		i2d_X509_REQ_bio;
++		i2d_X509_REQ_fp;
++		i2d_X509_REVOKED;
++		i2d_X509_SIG;
++		i2d_X509_VAL;
++		i2d_X509_bio;
++		i2d_X509_fp;
++		idea_cbc_encrypt;
++		idea_cfb64_encrypt;
++		idea_ecb_encrypt;
++		idea_encrypt;
++		idea_ofb64_encrypt;
++		idea_options;
++		idea_set_decrypt_key;
++		idea_set_encrypt_key;
++		lh_delete;
++		lh_doall;
++		lh_doall_arg;
++		lh_free;
++		lh_insert;
++		lh_new;
++		lh_node_stats;
++		lh_node_stats_bio;
++		lh_node_usage_stats;
++		lh_node_usage_stats_bio;
++		lh_retrieve;
++		lh_stats;
++		lh_stats_bio;
++		lh_strhash;
++		sk_delete;
++		sk_delete_ptr;
++		sk_dup;
++		sk_find;
++		sk_free;
++		sk_insert;
++		sk_new;
++		sk_pop;
++		sk_pop_free;
++		sk_push;
++		sk_set_cmp_func;
++		sk_shift;
++		sk_unshift;
++		sk_zero;
++		BIO_f_nbio_test;
++		ASN1_TYPE_get;
++		ASN1_TYPE_set;
++		PKCS7_content_free;
++		ERR_load_PKCS7_strings;
++		X509_find_by_issuer_and_serial;
++		X509_find_by_subject;
++		PKCS7_ctrl;
++		PKCS7_set_type;
++		PKCS7_set_content;
++		PKCS7_SIGNER_INFO_set;
++		PKCS7_add_signer;
++		PKCS7_add_certificate;
++		PKCS7_add_crl;
++		PKCS7_content_new;
++		PKCS7_dataSign;
++		PKCS7_dataVerify;
++		PKCS7_dataInit;
++		PKCS7_add_signature;
++		PKCS7_cert_from_signer_info;
++		PKCS7_get_signer_info;
++		EVP_delete_alias;
++		EVP_mdc2;
++		PEM_read_bio_RSAPublicKey;
++		PEM_write_bio_RSAPublicKey;
++		d2i_RSAPublicKey_bio;
++		i2d_RSAPublicKey_bio;
++		PEM_read_RSAPublicKey;
++		PEM_write_RSAPublicKey;
++		d2i_RSAPublicKey_fp;
++		i2d_RSAPublicKey_fp;
++		BIO_copy_next_retry;
++		RSA_flags;
++		X509_STORE_add_crl;
++		X509_load_crl_file;
++		EVP_rc2_40_cbc;
++		EVP_rc4_40;
++		EVP_CIPHER_CTX_init;
++		HMAC;
++		HMAC_Init;
++		HMAC_Update;
++		HMAC_Final;
++		ERR_get_next_error_library;
++		EVP_PKEY_cmp_parameters;
++		HMAC_cleanup;
++		BIO_ptr_ctrl;
++		BIO_new_file_internal;
++		BIO_new_fp_internal;
++		BIO_s_file_internal;
++		BN_BLINDING_convert;
++		BN_BLINDING_invert;
++		BN_BLINDING_update;
++		RSA_blinding_on;
++		RSA_blinding_off;
++		i2t_ASN1_OBJECT;
++		BN_BLINDING_new;
++		BN_BLINDING_free;
++		EVP_cast5_cbc;
++		EVP_cast5_cfb64;
++		EVP_cast5_ecb;
++		EVP_cast5_ofb;
++		BF_decrypt;
++		CAST_set_key;
++		CAST_encrypt;
++		CAST_decrypt;
++		CAST_ecb_encrypt;
++		CAST_cbc_encrypt;
++		CAST_cfb64_encrypt;
++		CAST_ofb64_encrypt;
++		RC2_decrypt;
++		OBJ_create_objects;
++		BN_exp;
++		BN_mul_word;
++		BN_sub_word;
++		BN_dec2bn;
++		BN_bn2dec;
++		BIO_ghbn_ctrl;
++		CRYPTO_free_ex_data;
++		CRYPTO_get_ex_data;
++		CRYPTO_set_ex_data;
++		ERR_load_CRYPTO_strings;
++		ERR_load_CRYPTOlib_strings;
++		EVP_PKEY_bits;
++		MD5_Transform;
++		SHA1_Transform;
++		SHA_Transform;
++		X509_STORE_CTX_get_chain;
++		X509_STORE_CTX_get_current_cert;
++		X509_STORE_CTX_get_error;
++		X509_STORE_CTX_get_error_depth;
++		X509_STORE_CTX_get_ex_data;
++		X509_STORE_CTX_set_cert;
++		X509_STORE_CTX_set_chain;
++		X509_STORE_CTX_set_error;
++		X509_STORE_CTX_set_ex_data;
++		CRYPTO_dup_ex_data;
++		CRYPTO_get_new_lockid;
++		CRYPTO_new_ex_data;
++		RSA_set_ex_data;
++		RSA_get_ex_data;
++		RSA_get_ex_new_index;
++		RSA_padding_add_PKCS1_type_1;
++		RSA_padding_add_PKCS1_type_2;
++		RSA_padding_add_SSLv23;
++		RSA_padding_add_none;
++		RSA_padding_check_PKCS1_type_1;
++		RSA_padding_check_PKCS1_type_2;
++		RSA_padding_check_SSLv23;
++		RSA_padding_check_none;
++		bn_add_words;
++		d2i_Netscape_RSA_2;
++		CRYPTO_get_ex_new_index;
++		RIPEMD160_Init;
++		RIPEMD160_Update;
++		RIPEMD160_Final;
++		RIPEMD160;
++		RIPEMD160_Transform;
++		RC5_32_set_key;
++		RC5_32_ecb_encrypt;
++		RC5_32_encrypt;
++		RC5_32_decrypt;
++		RC5_32_cbc_encrypt;
++		RC5_32_cfb64_encrypt;
++		RC5_32_ofb64_encrypt;
++		BN_bn2mpi;
++		BN_mpi2bn;
++		ASN1_BIT_STRING_get_bit;
++		ASN1_BIT_STRING_set_bit;
++		BIO_get_ex_data;
++		BIO_get_ex_new_index;
++		BIO_set_ex_data;
++		X509v3_get_key_usage;
++		X509v3_set_key_usage;
++		a2i_X509v3_key_usage;
++		i2a_X509v3_key_usage;
++		EVP_PKEY_decrypt;
++		EVP_PKEY_encrypt;
++		PKCS7_RECIP_INFO_set;
++		PKCS7_add_recipient;
++		PKCS7_add_recipient_info;
++		PKCS7_set_cipher;
++		ASN1_TYPE_get_int_octetstring;
++		ASN1_TYPE_get_octetstring;
++		ASN1_TYPE_set_int_octetstring;
++		ASN1_TYPE_set_octetstring;
++		ASN1_UTCTIME_set_string;
++		ERR_add_error_data;
++		ERR_set_error_data;
++		EVP_CIPHER_asn1_to_param;
++		EVP_CIPHER_param_to_asn1;
++		EVP_CIPHER_get_asn1_iv;
++		EVP_CIPHER_set_asn1_iv;
++		EVP_rc5_32_12_16_cbc;
++		EVP_rc5_32_12_16_cfb64;
++		EVP_rc5_32_12_16_ecb;
++		EVP_rc5_32_12_16_ofb;
++		asn1_add_error;
++		d2i_ASN1_BMPSTRING;
++		i2d_ASN1_BMPSTRING;
++		BIO_f_ber;
++		BN_init;
++		COMP_CTX_new;
++		COMP_CTX_free;
++		COMP_CTX_compress_block;
++		COMP_CTX_expand_block;
++		X509_STORE_CTX_get_ex_new_index;
++		OBJ_NAME_add;
++		BIO_socket_nbio;
++		EVP_rc2_64_cbc;
++		OBJ_NAME_cleanup;
++		OBJ_NAME_get;
++		OBJ_NAME_init;
++		OBJ_NAME_new_index;
++		OBJ_NAME_remove;
++		BN_MONT_CTX_copy;
++		BIO_new_socks4a_connect;
++		BIO_s_socks4a_connect;
++		PROXY_set_connect_mode;
++		RAND_SSLeay;
++		RAND_set_rand_method;
++		RSA_memory_lock;
++		bn_sub_words;
++		bn_mul_normal;
++		bn_mul_comba8;
++		bn_mul_comba4;
++		bn_sqr_normal;
++		bn_sqr_comba8;
++		bn_sqr_comba4;
++		bn_cmp_words;
++		bn_mul_recursive;
++		bn_mul_part_recursive;
++		bn_sqr_recursive;
++		bn_mul_low_normal;
++		BN_RECP_CTX_init;
++		BN_RECP_CTX_new;
++		BN_RECP_CTX_free;
++		BN_RECP_CTX_set;
++		BN_mod_mul_reciprocal;
++		BN_mod_exp_recp;
++		BN_div_recp;
++		BN_CTX_init;
++		BN_MONT_CTX_init;
++		RAND_get_rand_method;
++		PKCS7_add_attribute;
++		PKCS7_add_signed_attribute;
++		PKCS7_digest_from_attributes;
++		PKCS7_get_attribute;
++		PKCS7_get_issuer_and_serial;
++		PKCS7_get_signed_attribute;
++		COMP_compress_block;
++		COMP_expand_block;
++		COMP_rle;
++		COMP_zlib;
++		ms_time_diff;
++		ms_time_new;
++		ms_time_free;
++		ms_time_cmp;
++		ms_time_get;
++		PKCS7_set_attributes;
++		PKCS7_set_signed_attributes;
++		X509_ATTRIBUTE_create;
++		X509_ATTRIBUTE_dup;
++		ASN1_GENERALIZEDTIME_check;
++		ASN1_GENERALIZEDTIME_print;
++		ASN1_GENERALIZEDTIME_set;
++		ASN1_GENERALIZEDTIME_set_string;
++		ASN1_TIME_print;
++		BASIC_CONSTRAINTS_free;
++		BASIC_CONSTRAINTS_new;
++		ERR_load_X509V3_strings;
++		NETSCAPE_CERT_SEQUENCE_free;
++		NETSCAPE_CERT_SEQUENCE_new;
++		OBJ_txt2obj;
++		PEM_read_NETSCAPE_CERT_SEQUENCE;
++		PEM_read_NS_CERT_SEQ;
++		PEM_read_bio_NETSCAPE_CERT_SEQUENCE;
++		PEM_read_bio_NS_CERT_SEQ;
++		PEM_write_NETSCAPE_CERT_SEQUENCE;
++		PEM_write_NS_CERT_SEQ;
++		PEM_write_bio_NETSCAPE_CERT_SEQUENCE;
++		PEM_write_bio_NS_CERT_SEQ;
++		X509V3_EXT_add;
++		X509V3_EXT_add_alias;
++		X509V3_EXT_add_conf;
++		X509V3_EXT_cleanup;
++		X509V3_EXT_conf;
++		X509V3_EXT_conf_nid;
++		X509V3_EXT_get;
++		X509V3_EXT_get_nid;
++		X509V3_EXT_print;
++		X509V3_EXT_print_fp;
++		X509V3_add_standard_extensions;
++		X509V3_add_value;
++		X509V3_add_value_bool;
++		X509V3_add_value_int;
++		X509V3_conf_free;
++		X509V3_get_value_bool;
++		X509V3_get_value_int;
++		X509V3_parse_list;
++		d2i_ASN1_GENERALIZEDTIME;
++		d2i_ASN1_TIME;
++		d2i_BASIC_CONSTRAINTS;
++		d2i_NETSCAPE_CERT_SEQUENCE;
++		d2i_ext_ku;
++		ext_ku_free;
++		ext_ku_new;
++		i2d_ASN1_GENERALIZEDTIME;
++		i2d_ASN1_TIME;
++		i2d_BASIC_CONSTRAINTS;
++		i2d_NETSCAPE_CERT_SEQUENCE;
++		i2d_ext_ku;
++		EVP_MD_CTX_copy;
++		i2d_ASN1_ENUMERATED;
++		d2i_ASN1_ENUMERATED;
++		ASN1_ENUMERATED_set;
++		ASN1_ENUMERATED_get;
++		BN_to_ASN1_ENUMERATED;
++		ASN1_ENUMERATED_to_BN;
++		i2a_ASN1_ENUMERATED;
++		a2i_ASN1_ENUMERATED;
++		i2d_GENERAL_NAME;
++		d2i_GENERAL_NAME;
++		GENERAL_NAME_new;
++		GENERAL_NAME_free;
++		GENERAL_NAMES_new;
++		GENERAL_NAMES_free;
++		d2i_GENERAL_NAMES;
++		i2d_GENERAL_NAMES;
++		i2v_GENERAL_NAMES;
++		i2s_ASN1_OCTET_STRING;
++		s2i_ASN1_OCTET_STRING;
++		X509V3_EXT_check_conf;
++		hex_to_string;
++		string_to_hex;
++		DES_ede3_cbcm_encrypt;
++		RSA_padding_add_PKCS1_OAEP;
++		RSA_padding_check_PKCS1_OAEP;
++		X509_CRL_print_fp;
++		X509_CRL_print;
++		i2v_GENERAL_NAME;
++		v2i_GENERAL_NAME;
++		i2d_PKEY_USAGE_PERIOD;
++		d2i_PKEY_USAGE_PERIOD;
++		PKEY_USAGE_PERIOD_new;
++		PKEY_USAGE_PERIOD_free;
++		v2i_GENERAL_NAMES;
++		i2s_ASN1_INTEGER;
++		X509V3_EXT_d2i;
++		name_cmp;
++		str_dup;
++		i2s_ASN1_ENUMERATED;
++		i2s_ASN1_ENUMERATED_TABLE;
++		BIO_s_log;
++		BIO_f_reliable;
++		PKCS7_dataFinal;
++		PKCS7_dataDecode;
++		X509V3_EXT_CRL_add_conf;
++		BN_set_params;
++		BN_get_params;
++		BIO_get_ex_num;
++		BIO_set_ex_free_func;
++		EVP_ripemd160;
++		ASN1_TIME_set;
++		i2d_AUTHORITY_KEYID;
++		d2i_AUTHORITY_KEYID;
++		AUTHORITY_KEYID_new;
++		AUTHORITY_KEYID_free;
++		ASN1_seq_unpack;
++		ASN1_seq_pack;
++		ASN1_unpack_string;
++		ASN1_pack_string;
++		PKCS12_pack_safebag;
++		PKCS12_MAKE_KEYBAG;
++		PKCS8_encrypt;
++		PKCS12_MAKE_SHKEYBAG;
++		PKCS12_pack_p7data;
++		PKCS12_pack_p7encdata;
++		PKCS12_add_localkeyid;
++		PKCS12_add_friendlyname_asc;
++		PKCS12_add_friendlyname_uni;
++		PKCS12_get_friendlyname;
++		PKCS12_pbe_crypt;
++		PKCS12_decrypt_d2i;
++		PKCS12_i2d_encrypt;
++		PKCS12_init;
++		PKCS12_key_gen_asc;
++		PKCS12_key_gen_uni;
++		PKCS12_gen_mac;
++		PKCS12_verify_mac;
++		PKCS12_set_mac;
++		PKCS12_setup_mac;
++		OPENSSL_asc2uni;
++		OPENSSL_uni2asc;
++		i2d_PKCS12_BAGS;
++		PKCS12_BAGS_new;
++		d2i_PKCS12_BAGS;
++		PKCS12_BAGS_free;
++		i2d_PKCS12;
++		d2i_PKCS12;
++		PKCS12_new;
++		PKCS12_free;
++		i2d_PKCS12_MAC_DATA;
++		PKCS12_MAC_DATA_new;
++		d2i_PKCS12_MAC_DATA;
++		PKCS12_MAC_DATA_free;
++		i2d_PKCS12_SAFEBAG;
++		PKCS12_SAFEBAG_new;
++		d2i_PKCS12_SAFEBAG;
++		PKCS12_SAFEBAG_free;
++		ERR_load_PKCS12_strings;
++		PKCS12_PBE_add;
++		PKCS8_add_keyusage;
++		PKCS12_get_attr_gen;
++		PKCS12_parse;
++		PKCS12_create;
++		i2d_PKCS12_bio;
++		i2d_PKCS12_fp;
++		d2i_PKCS12_bio;
++		d2i_PKCS12_fp;
++		i2d_PBEPARAM;
++		PBEPARAM_new;
++		d2i_PBEPARAM;
++		PBEPARAM_free;
++		i2d_PKCS8_PRIV_KEY_INFO;
++		PKCS8_PRIV_KEY_INFO_new;
++		d2i_PKCS8_PRIV_KEY_INFO;
++		PKCS8_PRIV_KEY_INFO_free;
++		EVP_PKCS82PKEY;
++		EVP_PKEY2PKCS8;
++		PKCS8_set_broken;
++		EVP_PBE_ALGOR_CipherInit;
++		EVP_PBE_alg_add;
++		PKCS5_pbe_set;
++		EVP_PBE_cleanup;
++		i2d_SXNET;
++		d2i_SXNET;
++		SXNET_new;
++		SXNET_free;
++		i2d_SXNETID;
++		d2i_SXNETID;
++		SXNETID_new;
++		SXNETID_free;
++		DSA_SIG_new;
++		DSA_SIG_free;
++		DSA_do_sign;
++		DSA_do_verify;
++		d2i_DSA_SIG;
++		i2d_DSA_SIG;
++		i2d_ASN1_VISIBLESTRING;
++		d2i_ASN1_VISIBLESTRING;
++		i2d_ASN1_UTF8STRING;
++		d2i_ASN1_UTF8STRING;
++		i2d_DIRECTORYSTRING;
++		d2i_DIRECTORYSTRING;
++		i2d_DISPLAYTEXT;
++		d2i_DISPLAYTEXT;
++		d2i_ASN1_SET_OF_X509;
++		i2d_ASN1_SET_OF_X509;
++		i2d_PBKDF2PARAM;
++		PBKDF2PARAM_new;
++		d2i_PBKDF2PARAM;
++		PBKDF2PARAM_free;
++		i2d_PBE2PARAM;
++		PBE2PARAM_new;
++		d2i_PBE2PARAM;
++		PBE2PARAM_free;
++		d2i_ASN1_SET_OF_GENERAL_NAME;
++		i2d_ASN1_SET_OF_GENERAL_NAME;
++		d2i_ASN1_SET_OF_SXNETID;
++		i2d_ASN1_SET_OF_SXNETID;
++		d2i_ASN1_SET_OF_POLICYQUALINFO;
++		i2d_ASN1_SET_OF_POLICYQUALINFO;
++		d2i_ASN1_SET_OF_POLICYINFO;
++		i2d_ASN1_SET_OF_POLICYINFO;
++		SXNET_add_id_asc;
++		SXNET_add_id_ulong;
++		SXNET_add_id_INTEGER;
++		SXNET_get_id_asc;
++		SXNET_get_id_ulong;
++		SXNET_get_id_INTEGER;
++		X509V3_set_conf_lhash;
++		i2d_CERTIFICATEPOLICIES;
++		CERTIFICATEPOLICIES_new;
++		CERTIFICATEPOLICIES_free;
++		d2i_CERTIFICATEPOLICIES;
++		i2d_POLICYINFO;
++		POLICYINFO_new;
++		d2i_POLICYINFO;
++		POLICYINFO_free;
++		i2d_POLICYQUALINFO;
++		POLICYQUALINFO_new;
++		d2i_POLICYQUALINFO;
++		POLICYQUALINFO_free;
++		i2d_USERNOTICE;
++		USERNOTICE_new;
++		d2i_USERNOTICE;
++		USERNOTICE_free;
++		i2d_NOTICEREF;
++		NOTICEREF_new;
++		d2i_NOTICEREF;
++		NOTICEREF_free;
++		X509V3_get_string;
++		X509V3_get_section;
++		X509V3_string_free;
++		X509V3_section_free;
++		X509V3_set_ctx;
++		s2i_ASN1_INTEGER;
++		CRYPTO_set_locked_mem_functions;
++		CRYPTO_get_locked_mem_functions;
++		CRYPTO_malloc_locked;
++		CRYPTO_free_locked;
++		BN_mod_exp2_mont;
++		ERR_get_error_line_data;
++		ERR_peek_error_line_data;
++		PKCS12_PBE_keyivgen;
++		X509_ALGOR_dup;
++		d2i_ASN1_SET_OF_DIST_POINT;
++		i2d_ASN1_SET_OF_DIST_POINT;
++		i2d_CRL_DIST_POINTS;
++		CRL_DIST_POINTS_new;
++		CRL_DIST_POINTS_free;
++		d2i_CRL_DIST_POINTS;
++		i2d_DIST_POINT;
++		DIST_POINT_new;
++		d2i_DIST_POINT;
++		DIST_POINT_free;
++		i2d_DIST_POINT_NAME;
++		DIST_POINT_NAME_new;
++		DIST_POINT_NAME_free;
++		d2i_DIST_POINT_NAME;
++		X509V3_add_value_uchar;
++		d2i_ASN1_SET_OF_X509_ATTRIBUTE;
++		i2d_ASN1_SET_OF_ASN1_TYPE;
++		d2i_ASN1_SET_OF_X509_EXTENSION;
++		d2i_ASN1_SET_OF_X509_NAME_ENTRY;
++		d2i_ASN1_SET_OF_ASN1_TYPE;
++		i2d_ASN1_SET_OF_X509_ATTRIBUTE;
++		i2d_ASN1_SET_OF_X509_EXTENSION;
++		i2d_ASN1_SET_OF_X509_NAME_ENTRY;
++		X509V3_EXT_i2d;
++		X509V3_EXT_val_prn;
++		X509V3_EXT_add_list;
++		EVP_CIPHER_type;
++		EVP_PBE_CipherInit;
++		X509V3_add_value_bool_nf;
++		d2i_ASN1_UINTEGER;
++		sk_value;
++		sk_num;
++		sk_set;
++		i2d_ASN1_SET_OF_X509_REVOKED;
++		sk_sort;
++		d2i_ASN1_SET_OF_X509_REVOKED;
++		i2d_ASN1_SET_OF_X509_ALGOR;
++		i2d_ASN1_SET_OF_X509_CRL;
++		d2i_ASN1_SET_OF_X509_ALGOR;
++		d2i_ASN1_SET_OF_X509_CRL;
++		i2d_ASN1_SET_OF_PKCS7_SIGNER_INFO;
++		i2d_ASN1_SET_OF_PKCS7_RECIP_INFO;
++		d2i_ASN1_SET_OF_PKCS7_SIGNER_INFO;
++		d2i_ASN1_SET_OF_PKCS7_RECIP_INFO;
++		PKCS5_PBE_add;
++		PEM_write_bio_PKCS8;
++		i2d_PKCS8_fp;
++		PEM_read_bio_PKCS8_PRIV_KEY_INFO;
++		PEM_read_bio_P8_PRIV_KEY_INFO;
++		d2i_PKCS8_bio;
++		d2i_PKCS8_PRIV_KEY_INFO_fp;
++		PEM_write_bio_PKCS8_PRIV_KEY_INFO;
++		PEM_write_bio_P8_PRIV_KEY_INFO;
++		PEM_read_PKCS8;
++		d2i_PKCS8_PRIV_KEY_INFO_bio;
++		d2i_PKCS8_fp;
++		PEM_write_PKCS8;
++		PEM_read_PKCS8_PRIV_KEY_INFO;
++		PEM_read_P8_PRIV_KEY_INFO;
++		PEM_read_bio_PKCS8;
++		PEM_write_PKCS8_PRIV_KEY_INFO;
++		PEM_write_P8_PRIV_KEY_INFO;
++		PKCS5_PBE_keyivgen;
++		i2d_PKCS8_bio;
++		i2d_PKCS8_PRIV_KEY_INFO_fp;
++		i2d_PKCS8_PRIV_KEY_INFO_bio;
++		BIO_s_bio;
++		PKCS5_pbe2_set;
++		PKCS5_PBKDF2_HMAC_SHA1;
++		PKCS5_v2_PBE_keyivgen;
++		PEM_write_bio_PKCS8PrivateKey;
++		PEM_write_PKCS8PrivateKey;
++		BIO_ctrl_get_read_request;
++		BIO_ctrl_pending;
++		BIO_ctrl_wpending;
++		BIO_new_bio_pair;
++		BIO_ctrl_get_write_guarantee;
++		CRYPTO_num_locks;
++		CONF_load_bio;
++		CONF_load_fp;
++		i2d_ASN1_SET_OF_ASN1_OBJECT;
++		d2i_ASN1_SET_OF_ASN1_OBJECT;
++		PKCS7_signatureVerify;
++		RSA_set_method;
++		RSA_get_method;
++		RSA_get_default_method;
++		RSA_check_key;
++		OBJ_obj2txt;
++		DSA_dup_DH;
++		X509_REQ_get_extensions;
++		X509_REQ_set_extension_nids;
++		BIO_nwrite;
++		X509_REQ_extension_nid;
++		BIO_nread;
++		X509_REQ_get_extension_nids;
++		BIO_nwrite0;
++		X509_REQ_add_extensions_nid;
++		BIO_nread0;
++		X509_REQ_add_extensions;
++		BIO_new_mem_buf;
++		DH_set_ex_data;
++		DH_set_method;
++		DSA_OpenSSL;
++		DH_get_ex_data;
++		DH_get_ex_new_index;
++		DSA_new_method;
++		DH_new_method;
++		DH_OpenSSL;
++		DSA_get_ex_new_index;
++		DH_get_default_method;
++		DSA_set_ex_data;
++		DH_set_default_method;
++		DSA_get_ex_data;
++		X509V3_EXT_REQ_add_conf;
++		NETSCAPE_SPKI_print;
++		NETSCAPE_SPKI_set_pubkey;
++		NETSCAPE_SPKI_b64_encode;
++		NETSCAPE_SPKI_get_pubkey;
++		NETSCAPE_SPKI_b64_decode;
++		UTF8_putc;
++		UTF8_getc;
++		RSA_null_method;
++		ASN1_tag2str;
++		BIO_ctrl_reset_read_request;
++		DISPLAYTEXT_new;
++		ASN1_GENERALIZEDTIME_free;
++		X509_REVOKED_get_ext_d2i;
++		X509_set_ex_data;
++		X509_reject_set_bit_asc;
++		X509_NAME_add_entry_by_txt;
++		X509_NAME_add_entry_by_NID;
++		X509_PURPOSE_get0;
++		PEM_read_X509_AUX;
++		d2i_AUTHORITY_INFO_ACCESS;
++		PEM_write_PUBKEY;
++		ACCESS_DESCRIPTION_new;
++		X509_CERT_AUX_free;
++		d2i_ACCESS_DESCRIPTION;
++		X509_trust_clear;
++		X509_TRUST_add;
++		ASN1_VISIBLESTRING_new;
++		X509_alias_set1;
++		ASN1_PRINTABLESTRING_free;
++		EVP_PKEY_get1_DSA;
++		ASN1_BMPSTRING_new;
++		ASN1_mbstring_copy;
++		ASN1_UTF8STRING_new;
++		DSA_get_default_method;
++		i2d_ASN1_SET_OF_ACCESS_DESCRIPTION;
++		ASN1_T61STRING_free;
++		DSA_set_method;
++		X509_get_ex_data;
++		ASN1_STRING_type;
++		X509_PURPOSE_get_by_sname;
++		ASN1_TIME_free;
++		ASN1_OCTET_STRING_cmp;
++		ASN1_BIT_STRING_new;
++		X509_get_ext_d2i;
++		PEM_read_bio_X509_AUX;
++		ASN1_STRING_set_default_mask_asc;
++		ASN1_STRING_set_def_mask_asc;
++		PEM_write_bio_RSA_PUBKEY;
++		ASN1_INTEGER_cmp;
++		d2i_RSA_PUBKEY_fp;
++		X509_trust_set_bit_asc;
++		PEM_write_bio_DSA_PUBKEY;
++		X509_STORE_CTX_free;
++		EVP_PKEY_set1_DSA;
++		i2d_DSA_PUBKEY_fp;
++		X509_load_cert_crl_file;
++		ASN1_TIME_new;
++		i2d_RSA_PUBKEY;
++		X509_STORE_CTX_purpose_inherit;
++		PEM_read_RSA_PUBKEY;
++		d2i_X509_AUX;
++		i2d_DSA_PUBKEY;
++		X509_CERT_AUX_print;
++		PEM_read_DSA_PUBKEY;
++		i2d_RSA_PUBKEY_bio;
++		ASN1_BIT_STRING_num_asc;
++		i2d_PUBKEY;
++		ASN1_UTCTIME_free;
++		DSA_set_default_method;
++		X509_PURPOSE_get_by_id;
++		ACCESS_DESCRIPTION_free;
++		PEM_read_bio_PUBKEY;
++		ASN1_STRING_set_by_NID;
++		X509_PURPOSE_get_id;
++		DISPLAYTEXT_free;
++		OTHERNAME_new;
++		X509_CERT_AUX_new;
++		X509_TRUST_cleanup;
++		X509_NAME_add_entry_by_OBJ;
++		X509_CRL_get_ext_d2i;
++		X509_PURPOSE_get0_name;
++		PEM_read_PUBKEY;
++		i2d_DSA_PUBKEY_bio;
++		i2d_OTHERNAME;
++		ASN1_OCTET_STRING_free;
++		ASN1_BIT_STRING_set_asc;
++		X509_get_ex_new_index;
++		ASN1_STRING_TABLE_cleanup;
++		X509_TRUST_get_by_id;
++		X509_PURPOSE_get_trust;
++		ASN1_STRING_length;
++		d2i_ASN1_SET_OF_ACCESS_DESCRIPTION;
++		ASN1_PRINTABLESTRING_new;
++		X509V3_get_d2i;
++		ASN1_ENUMERATED_free;
++		i2d_X509_CERT_AUX;
++		X509_STORE_CTX_set_trust;
++		ASN1_STRING_set_default_mask;
++		X509_STORE_CTX_new;
++		EVP_PKEY_get1_RSA;
++		DIRECTORYSTRING_free;
++		PEM_write_X509_AUX;
++		ASN1_OCTET_STRING_set;
++		d2i_DSA_PUBKEY_fp;
++		d2i_RSA_PUBKEY;
++		X509_TRUST_get0_name;
++		X509_TRUST_get0;
++		AUTHORITY_INFO_ACCESS_free;
++		ASN1_IA5STRING_new;
++		d2i_DSA_PUBKEY;
++		X509_check_purpose;
++		ASN1_ENUMERATED_new;
++		d2i_RSA_PUBKEY_bio;
++		d2i_PUBKEY;
++		X509_TRUST_get_trust;
++		X509_TRUST_get_flags;
++		ASN1_BMPSTRING_free;
++		ASN1_T61STRING_new;
++		ASN1_UTCTIME_new;
++		i2d_AUTHORITY_INFO_ACCESS;
++		EVP_PKEY_set1_RSA;
++		X509_STORE_CTX_set_purpose;
++		ASN1_IA5STRING_free;
++		PEM_write_bio_X509_AUX;
++		X509_PURPOSE_get_count;
++		CRYPTO_add_info;
++		X509_NAME_ENTRY_create_by_txt;
++		ASN1_STRING_get_default_mask;
++		X509_alias_get0;
++		ASN1_STRING_data;
++		i2d_ACCESS_DESCRIPTION;
++		X509_trust_set_bit;
++		ASN1_BIT_STRING_free;
++		PEM_read_bio_RSA_PUBKEY;
++		X509_add1_reject_object;
++		X509_check_trust;
++		PEM_read_bio_DSA_PUBKEY;
++		X509_PURPOSE_add;
++		ASN1_STRING_TABLE_get;
++		ASN1_UTF8STRING_free;
++		d2i_DSA_PUBKEY_bio;
++		PEM_write_RSA_PUBKEY;
++		d2i_OTHERNAME;
++		X509_reject_set_bit;
++		PEM_write_DSA_PUBKEY;
++		X509_PURPOSE_get0_sname;
++		EVP_PKEY_set1_DH;
++		ASN1_OCTET_STRING_dup;
++		ASN1_BIT_STRING_set;
++		X509_TRUST_get_count;
++		ASN1_INTEGER_free;
++		OTHERNAME_free;
++		i2d_RSA_PUBKEY_fp;
++		ASN1_INTEGER_dup;
++		d2i_X509_CERT_AUX;
++		PEM_write_bio_PUBKEY;
++		ASN1_VISIBLESTRING_free;
++		X509_PURPOSE_cleanup;
++		ASN1_mbstring_ncopy;
++		ASN1_GENERALIZEDTIME_new;
++		EVP_PKEY_get1_DH;
++		ASN1_OCTET_STRING_new;
++		ASN1_INTEGER_new;
++		i2d_X509_AUX;
++		ASN1_BIT_STRING_name_print;
++		X509_cmp;
++		ASN1_STRING_length_set;
++		DIRECTORYSTRING_new;
++		X509_add1_trust_object;
++		PKCS12_newpass;
++		SMIME_write_PKCS7;
++		SMIME_read_PKCS7;
++		DES_set_key_checked;
++		PKCS7_verify;
++		PKCS7_encrypt;
++		DES_set_key_unchecked;
++		SMIME_crlf_copy;
++		i2d_ASN1_PRINTABLESTRING;
++		PKCS7_get0_signers;
++		PKCS7_decrypt;
++		SMIME_text;
++		PKCS7_simple_smimecap;
++		PKCS7_get_smimecap;
++		PKCS7_sign;
++		PKCS7_add_attrib_smimecap;
++		CRYPTO_dbg_set_options;
++		CRYPTO_remove_all_info;
++		CRYPTO_get_mem_debug_functions;
++		CRYPTO_is_mem_check_on;
++		CRYPTO_set_mem_debug_functions;
++		CRYPTO_pop_info;
++		CRYPTO_push_info_;
++		CRYPTO_set_mem_debug_options;
++		PEM_write_PKCS8PrivateKey_nid;
++		PEM_write_bio_PKCS8PrivateKey_nid;
++		PEM_write_bio_PKCS8PrivKey_nid;
++		d2i_PKCS8PrivateKey_bio;
++		ASN1_NULL_free;
++		d2i_ASN1_NULL;
++		ASN1_NULL_new;
++		i2d_PKCS8PrivateKey_bio;
++		i2d_PKCS8PrivateKey_fp;
++		i2d_ASN1_NULL;
++		i2d_PKCS8PrivateKey_nid_fp;
++		d2i_PKCS8PrivateKey_fp;
++		i2d_PKCS8PrivateKey_nid_bio;
++		i2d_PKCS8PrivateKeyInfo_fp;
++		i2d_PKCS8PrivateKeyInfo_bio;
++		PEM_cb;
++		i2d_PrivateKey_fp;
++		d2i_PrivateKey_bio;
++		d2i_PrivateKey_fp;
++		i2d_PrivateKey_bio;
++		X509_reject_clear;
++		X509_TRUST_set_default;
++		d2i_AutoPrivateKey;
++		X509_ATTRIBUTE_get0_type;
++		X509_ATTRIBUTE_set1_data;
++		X509at_get_attr;
++		X509at_get_attr_count;
++		X509_ATTRIBUTE_create_by_NID;
++		X509_ATTRIBUTE_set1_object;
++		X509_ATTRIBUTE_count;
++		X509_ATTRIBUTE_create_by_OBJ;
++		X509_ATTRIBUTE_get0_object;
++		X509at_get_attr_by_NID;
++		X509at_add1_attr;
++		X509_ATTRIBUTE_get0_data;
++		X509at_delete_attr;
++		X509at_get_attr_by_OBJ;
++		RAND_add;
++		BIO_number_written;
++		BIO_number_read;
++		X509_STORE_CTX_get1_chain;
++		ERR_load_RAND_strings;
++		RAND_pseudo_bytes;
++		X509_REQ_get_attr_by_NID;
++		X509_REQ_get_attr;
++		X509_REQ_add1_attr_by_NID;
++		X509_REQ_get_attr_by_OBJ;
++		X509at_add1_attr_by_NID;
++		X509_REQ_add1_attr_by_OBJ;
++		X509_REQ_get_attr_count;
++		X509_REQ_add1_attr;
++		X509_REQ_delete_attr;
++		X509at_add1_attr_by_OBJ;
++		X509_REQ_add1_attr_by_txt;
++		X509_ATTRIBUTE_create_by_txt;
++		X509at_add1_attr_by_txt;
++		BN_pseudo_rand;
++		BN_is_prime_fasttest;
++		BN_CTX_end;
++		BN_CTX_start;
++		BN_CTX_get;
++		EVP_PKEY2PKCS8_broken;
++		ASN1_STRING_TABLE_add;
++		CRYPTO_dbg_get_options;
++		AUTHORITY_INFO_ACCESS_new;
++		CRYPTO_get_mem_debug_options;
++		DES_crypt;
++		PEM_write_bio_X509_REQ_NEW;
++		PEM_write_X509_REQ_NEW;
++		BIO_callback_ctrl;
++		RAND_egd;
++		RAND_status;
++		bn_dump1;
++		DES_check_key_parity;
++		lh_num_items;
++		RAND_event;
++		DSO_new;
++		DSO_new_method;
++		DSO_free;
++		DSO_flags;
++		DSO_up;
++		DSO_set_default_method;
++		DSO_get_default_method;
++		DSO_get_method;
++		DSO_set_method;
++		DSO_load;
++		DSO_bind_var;
++		DSO_METHOD_null;
++		DSO_METHOD_openssl;
++		DSO_METHOD_dlfcn;
++		DSO_METHOD_win32;
++		ERR_load_DSO_strings;
++		DSO_METHOD_dl;
++		NCONF_load;
++		NCONF_load_fp;
++		NCONF_new;
++		NCONF_get_string;
++		NCONF_free;
++		NCONF_get_number;
++		CONF_dump_fp;
++		NCONF_load_bio;
++		NCONF_dump_fp;
++		NCONF_get_section;
++		NCONF_dump_bio;
++		CONF_dump_bio;
++		NCONF_free_data;
++		CONF_set_default_method;
++		ERR_error_string_n;
++		BIO_snprintf;
++		DSO_ctrl;
++		i2d_ASN1_SET_OF_ASN1_INTEGER;
++		i2d_ASN1_SET_OF_PKCS12_SAFEBAG;
++		i2d_ASN1_SET_OF_PKCS7;
++		BIO_vfree;
++		d2i_ASN1_SET_OF_ASN1_INTEGER;
++		d2i_ASN1_SET_OF_PKCS12_SAFEBAG;
++		ASN1_UTCTIME_get;
++		X509_REQ_digest;
++		X509_CRL_digest;
++		d2i_ASN1_SET_OF_PKCS7;
++		EVP_CIPHER_CTX_set_key_length;
++		EVP_CIPHER_CTX_ctrl;
++		BN_mod_exp_mont_word;
++		RAND_egd_bytes;
++		X509_REQ_get1_email;
++		X509_get1_email;
++		X509_email_free;
++		i2d_RSA_NET;
++		d2i_RSA_NET_2;
++		d2i_RSA_NET;
++		DSO_bind_func;
++		CRYPTO_get_new_dynlockid;
++		sk_new_null;
++		CRYPTO_set_dynlock_destroy_callback;
++		CRYPTO_set_dynlock_destroy_cb;
++		CRYPTO_destroy_dynlockid;
++		CRYPTO_set_dynlock_size;
++		CRYPTO_set_dynlock_create_callback;
++		CRYPTO_set_dynlock_create_cb;
++		CRYPTO_set_dynlock_lock_callback;
++		CRYPTO_set_dynlock_lock_cb;
++		CRYPTO_get_dynlock_lock_callback;
++		CRYPTO_get_dynlock_lock_cb;
++		CRYPTO_get_dynlock_destroy_callback;
++		CRYPTO_get_dynlock_destroy_cb;
++		CRYPTO_get_dynlock_value;
++		CRYPTO_get_dynlock_create_callback;
++		CRYPTO_get_dynlock_create_cb;
++		c2i_ASN1_BIT_STRING;
++		i2c_ASN1_BIT_STRING;
++		RAND_poll;
++		c2i_ASN1_INTEGER;
++		i2c_ASN1_INTEGER;
++		BIO_dump_indent;
++		ASN1_parse_dump;
++		c2i_ASN1_OBJECT;
++		X509_NAME_print_ex_fp;
++		ASN1_STRING_print_ex_fp;
++		X509_NAME_print_ex;
++		ASN1_STRING_print_ex;
++		MD4;
++		MD4_Transform;
++		MD4_Final;
++		MD4_Update;
++		MD4_Init;
++		EVP_md4;
++		i2d_PUBKEY_bio;
++		i2d_PUBKEY_fp;
++		d2i_PUBKEY_bio;
++		ASN1_STRING_to_UTF8;
++		BIO_vprintf;
++		BIO_vsnprintf;
++		d2i_PUBKEY_fp;
++		X509_cmp_time;
++		X509_STORE_CTX_set_time;
++		X509_STORE_CTX_get1_issuer;
++		X509_OBJECT_retrieve_match;
++		X509_OBJECT_idx_by_subject;
++		X509_STORE_CTX_set_flags;
++		X509_STORE_CTX_trusted_stack;
++		X509_time_adj;
++		X509_check_issued;
++		ASN1_UTCTIME_cmp_time_t;
++		DES_set_weak_key_flag;
++		DES_check_key;
++		DES_rw_mode;
++		RSA_PKCS1_RSAref;
++		X509_keyid_set1;
++		BIO_next;
++		DSO_METHOD_vms;
++		BIO_f_linebuffer;
++		BN_bntest_rand;
++		OPENSSL_issetugid;
++		BN_rand_range;
++		ERR_load_ENGINE_strings;
++		ENGINE_set_DSA;
++		ENGINE_get_finish_function;
++		ENGINE_get_default_RSA;
++		ENGINE_get_BN_mod_exp;
++		DSA_get_default_openssl_method;
++		ENGINE_set_DH;
++		ENGINE_set_def_BN_mod_exp_crt;
++		ENGINE_set_default_BN_mod_exp_crt;
++		ENGINE_init;
++		DH_get_default_openssl_method;
++		RSA_set_default_openssl_method;
++		ENGINE_finish;
++		ENGINE_load_public_key;
++		ENGINE_get_DH;
++		ENGINE_ctrl;
++		ENGINE_get_init_function;
++		ENGINE_set_init_function;
++		ENGINE_set_default_DSA;
++		ENGINE_get_name;
++		ENGINE_get_last;
++		ENGINE_get_prev;
++		ENGINE_get_default_DH;
++		ENGINE_get_RSA;
++		ENGINE_set_default;
++		ENGINE_get_RAND;
++		ENGINE_get_first;
++		ENGINE_by_id;
++		ENGINE_set_finish_function;
++		ENGINE_get_def_BN_mod_exp_crt;
++		ENGINE_get_default_BN_mod_exp_crt;
++		RSA_get_default_openssl_method;
++		ENGINE_set_RSA;
++		ENGINE_load_private_key;
++		ENGINE_set_default_RAND;
++		ENGINE_set_BN_mod_exp;
++		ENGINE_remove;
++		ENGINE_free;
++		ENGINE_get_BN_mod_exp_crt;
++		ENGINE_get_next;
++		ENGINE_set_name;
++		ENGINE_get_default_DSA;
++		ENGINE_set_default_BN_mod_exp;
++		ENGINE_set_default_RSA;
++		ENGINE_get_default_RAND;
++		ENGINE_get_default_BN_mod_exp;
++		ENGINE_set_RAND;
++		ENGINE_set_id;
++		ENGINE_set_BN_mod_exp_crt;
++		ENGINE_set_default_DH;
++		ENGINE_new;
++		ENGINE_get_id;
++		DSA_set_default_openssl_method;
++		ENGINE_add;
++		DH_set_default_openssl_method;
++		ENGINE_get_DSA;
++		ENGINE_get_ctrl_function;
++		ENGINE_set_ctrl_function;
++		BN_pseudo_rand_range;
++		X509_STORE_CTX_set_verify_cb;
++		ERR_load_COMP_strings;
++		PKCS12_item_decrypt_d2i;
++		ASN1_UTF8STRING_it;
++		ENGINE_unregister_ciphers;
++		ENGINE_get_ciphers;
++		d2i_OCSP_BASICRESP;
++		KRB5_CHECKSUM_it;
++		EC_POINT_add;
++		ASN1_item_ex_i2d;
++		OCSP_CERTID_it;
++		d2i_OCSP_RESPBYTES;
++		X509V3_add1_i2d;
++		PKCS7_ENVELOPE_it;
++		UI_add_input_boolean;
++		ENGINE_unregister_RSA;
++		X509V3_EXT_nconf;
++		ASN1_GENERALSTRING_free;
++		d2i_OCSP_CERTSTATUS;
++		X509_REVOKED_set_serialNumber;
++		X509_print_ex;
++		OCSP_ONEREQ_get1_ext_d2i;
++		ENGINE_register_all_RAND;
++		ENGINE_load_dynamic;
++		PBKDF2PARAM_it;
++		EXTENDED_KEY_USAGE_new;
++		EC_GROUP_clear_free;
++		OCSP_sendreq_bio;
++		ASN1_item_digest;
++		OCSP_BASICRESP_delete_ext;
++		OCSP_SIGNATURE_it;
++		X509_CRL_it;
++		OCSP_BASICRESP_add_ext;
++		KRB5_ENCKEY_it;
++		UI_method_set_closer;
++		X509_STORE_set_purpose;
++		i2d_ASN1_GENERALSTRING;
++		OCSP_response_status;
++		i2d_OCSP_SERVICELOC;
++		ENGINE_get_digest_engine;
++		EC_GROUP_set_curve_GFp;
++		OCSP_REQUEST_get_ext_by_OBJ;
++		_ossl_old_des_random_key;
++		ASN1_T61STRING_it;
++		EC_GROUP_method_of;
++		i2d_KRB5_APREQ;
++		_ossl_old_des_encrypt;
++		ASN1_PRINTABLE_new;
++		HMAC_Init_ex;
++		d2i_KRB5_AUTHENT;
++		OCSP_archive_cutoff_new;
++		EC_POINT_set_Jprojective_coordinates_GFp;
++		EC_POINT_set_Jproj_coords_GFp;
++		_ossl_old_des_is_weak_key;
++		OCSP_BASICRESP_get_ext_by_OBJ;
++		EC_POINT_oct2point;
++		OCSP_SINGLERESP_get_ext_count;
++		UI_ctrl;
++		_shadow_DES_rw_mode;
++		asn1_do_adb;
++		ASN1_template_i2d;
++		ENGINE_register_DH;
++		UI_construct_prompt;
++		X509_STORE_set_trust;
++		UI_dup_input_string;
++		d2i_KRB5_APREQ;
++		EVP_MD_CTX_copy_ex;
++		OCSP_request_is_signed;
++		i2d_OCSP_REQINFO;
++		KRB5_ENCKEY_free;
++		OCSP_resp_get0;
++		GENERAL_NAME_it;
++		ASN1_GENERALIZEDTIME_it;
++		X509_STORE_set_flags;
++		EC_POINT_set_compressed_coordinates_GFp;
++		EC_POINT_set_compr_coords_GFp;
++		OCSP_response_status_str;
++		d2i_OCSP_REVOKEDINFO;
++		OCSP_basic_add1_cert;
++		ERR_get_implementation;
++		EVP_CipherFinal_ex;
++		OCSP_CERTSTATUS_new;
++		CRYPTO_cleanup_all_ex_data;
++		OCSP_resp_find;
++		BN_nnmod;
++		X509_CRL_sort;
++		X509_REVOKED_set_revocationDate;
++		ENGINE_register_RAND;
++		OCSP_SERVICELOC_new;
++		EC_POINT_set_affine_coordinates_GFp;
++		EC_POINT_set_affine_coords_GFp;
++		_ossl_old_des_options;
++		SXNET_it;
++		UI_dup_input_boolean;
++		PKCS12_add_CSPName_asc;
++		EC_POINT_is_at_infinity;
++		ENGINE_load_cryptodev;
++		DSO_convert_filename;
++		POLICYQUALINFO_it;
++		ENGINE_register_ciphers;
++		BN_mod_lshift_quick;
++		DSO_set_filename;
++		ASN1_item_free;
++		KRB5_TKTBODY_free;
++		AUTHORITY_KEYID_it;
++		KRB5_APREQBODY_new;
++		X509V3_EXT_REQ_add_nconf;
++		ENGINE_ctrl_cmd_string;
++		i2d_OCSP_RESPDATA;
++		EVP_MD_CTX_init;
++		EXTENDED_KEY_USAGE_free;
++		PKCS7_ATTR_SIGN_it;
++		UI_add_error_string;
++		KRB5_CHECKSUM_free;
++		OCSP_REQUEST_get_ext;
++		ENGINE_load_ubsec;
++		ENGINE_register_all_digests;
++		PKEY_USAGE_PERIOD_it;
++		PKCS12_unpack_authsafes;
++		ASN1_item_unpack;
++		NETSCAPE_SPKAC_it;
++		X509_REVOKED_it;
++		ASN1_STRING_encode;
++		EVP_aes_128_ecb;
++		KRB5_AUTHENT_free;
++		OCSP_BASICRESP_get_ext_by_critical;
++		OCSP_BASICRESP_get_ext_by_crit;
++		OCSP_cert_status_str;
++		d2i_OCSP_REQUEST;
++		UI_dup_info_string;
++		_ossl_old_des_xwhite_in2out;
++		PKCS12_it;
++		OCSP_SINGLERESP_get_ext_by_critical;
++		OCSP_SINGLERESP_get_ext_by_crit;
++		OCSP_CERTSTATUS_free;
++		_ossl_old_des_crypt;
++		ASN1_item_i2d;
++		EVP_DecryptFinal_ex;
++		ENGINE_load_openssl;
++		ENGINE_get_cmd_defns;
++		ENGINE_set_load_privkey_function;
++		ENGINE_set_load_privkey_fn;
++		EVP_EncryptFinal_ex;
++		ENGINE_set_default_digests;
++		X509_get0_pubkey_bitstr;
++		asn1_ex_i2c;
++		ENGINE_register_RSA;
++		ENGINE_unregister_DSA;
++		_ossl_old_des_key_sched;
++		X509_EXTENSION_it;
++		i2d_KRB5_AUTHENT;
++		SXNETID_it;
++		d2i_OCSP_SINGLERESP;
++		EDIPARTYNAME_new;
++		PKCS12_certbag2x509;
++		_ossl_old_des_ofb64_encrypt;
++		d2i_EXTENDED_KEY_USAGE;
++		ERR_print_errors_cb;
++		ENGINE_set_ciphers;
++		d2i_KRB5_APREQBODY;
++		UI_method_get_flusher;
++		X509_PUBKEY_it;
++		_ossl_old_des_enc_read;
++		PKCS7_ENCRYPT_it;
++		i2d_OCSP_RESPONSE;
++		EC_GROUP_get_cofactor;
++		PKCS12_unpack_p7data;
++		d2i_KRB5_AUTHDATA;
++		OCSP_copy_nonce;
++		KRB5_AUTHDATA_new;
++		OCSP_RESPDATA_new;
++		EC_GFp_mont_method;
++		OCSP_REVOKEDINFO_free;
++		UI_get_ex_data;
++		KRB5_APREQBODY_free;
++		EC_GROUP_get0_generator;
++		UI_get_default_method;
++		X509V3_set_nconf;
++		PKCS12_item_i2d_encrypt;
++		X509_add1_ext_i2d;
++		PKCS7_SIGNER_INFO_it;
++		KRB5_PRINCNAME_new;
++		PKCS12_SAFEBAG_it;
++		EC_GROUP_get_order;
++		d2i_OCSP_RESPID;
++		OCSP_request_verify;
++		NCONF_get_number_e;
++		_ossl_old_des_decrypt3;
++		X509_signature_print;
++		OCSP_SINGLERESP_free;
++		ENGINE_load_builtin_engines;
++		i2d_OCSP_ONEREQ;
++		OCSP_REQUEST_add_ext;
++		OCSP_RESPBYTES_new;
++		EVP_MD_CTX_create;
++		OCSP_resp_find_status;
++		X509_ALGOR_it;
++		ASN1_TIME_it;
++		OCSP_request_set1_name;
++		OCSP_ONEREQ_get_ext_count;
++		UI_get0_result;
++		PKCS12_AUTHSAFES_it;
++		EVP_aes_256_ecb;
++		PKCS12_pack_authsafes;
++		ASN1_IA5STRING_it;
++		UI_get_input_flags;
++		EC_GROUP_set_generator;
++		_ossl_old_des_string_to_2keys;
++		OCSP_CERTID_free;
++		X509_CERT_AUX_it;
++		CERTIFICATEPOLICIES_it;
++		_ossl_old_des_ede3_cbc_encrypt;
++		RAND_set_rand_engine;
++		DSO_get_loaded_filename;
++		X509_ATTRIBUTE_it;
++		OCSP_ONEREQ_get_ext_by_NID;
++		PKCS12_decrypt_skey;
++		KRB5_AUTHENT_it;
++		UI_dup_error_string;
++		RSAPublicKey_it;
++		i2d_OCSP_REQUEST;
++		PKCS12_x509crl2certbag;
++		OCSP_SERVICELOC_it;
++		ASN1_item_sign;
++		X509_CRL_set_issuer_name;
++		OBJ_NAME_do_all_sorted;
++		i2d_OCSP_BASICRESP;
++		i2d_OCSP_RESPBYTES;
++		PKCS12_unpack_p7encdata;
++		HMAC_CTX_init;
++		ENGINE_get_digest;
++		OCSP_RESPONSE_print;
++		KRB5_TKTBODY_it;
++		ACCESS_DESCRIPTION_it;
++		PKCS7_ISSUER_AND_SERIAL_it;
++		PBE2PARAM_it;
++		PKCS12_certbag2x509crl;
++		PKCS7_SIGNED_it;
++		ENGINE_get_cipher;
++		i2d_OCSP_CRLID;
++		OCSP_SINGLERESP_new;
++		ENGINE_cmd_is_executable;
++		RSA_up_ref;
++		ASN1_GENERALSTRING_it;
++		ENGINE_register_DSA;
++		X509V3_EXT_add_nconf_sk;
++		ENGINE_set_load_pubkey_function;
++		PKCS8_decrypt;
++		PEM_bytes_read_bio;
++		DIRECTORYSTRING_it;
++		d2i_OCSP_CRLID;
++		EC_POINT_is_on_curve;
++		CRYPTO_set_locked_mem_ex_functions;
++		CRYPTO_set_locked_mem_ex_funcs;
++		d2i_KRB5_CHECKSUM;
++		ASN1_item_dup;
++		X509_it;
++		BN_mod_add;
++		KRB5_AUTHDATA_free;
++		_ossl_old_des_cbc_cksum;
++		ASN1_item_verify;
++		CRYPTO_set_mem_ex_functions;
++		EC_POINT_get_Jprojective_coordinates_GFp;
++		EC_POINT_get_Jproj_coords_GFp;
++		ZLONG_it;
++		CRYPTO_get_locked_mem_ex_functions;
++		CRYPTO_get_locked_mem_ex_funcs;
++		ASN1_TIME_check;
++		UI_get0_user_data;
++		HMAC_CTX_cleanup;
++		DSA_up_ref;
++		_ossl_old_des_ede3_cfb64_encrypt;
++		_ossl_odes_ede3_cfb64_encrypt;
++		ASN1_BMPSTRING_it;
++		ASN1_tag2bit;
++		UI_method_set_flusher;
++		X509_ocspid_print;
++		KRB5_ENCDATA_it;
++		ENGINE_get_load_pubkey_function;
++		UI_add_user_data;
++		OCSP_REQUEST_delete_ext;
++		UI_get_method;
++		OCSP_ONEREQ_free;
++		ASN1_PRINTABLESTRING_it;
++		X509_CRL_set_nextUpdate;
++		OCSP_REQUEST_it;
++		OCSP_BASICRESP_it;
++		AES_ecb_encrypt;
++		BN_mod_sqr;
++		NETSCAPE_CERT_SEQUENCE_it;
++		GENERAL_NAMES_it;
++		AUTHORITY_INFO_ACCESS_it;
++		ASN1_FBOOLEAN_it;
++		UI_set_ex_data;
++		_ossl_old_des_string_to_key;
++		ENGINE_register_all_RSA;
++		d2i_KRB5_PRINCNAME;
++		OCSP_RESPBYTES_it;
++		X509_CINF_it;
++		ENGINE_unregister_digests;
++		d2i_EDIPARTYNAME;
++		d2i_OCSP_SERVICELOC;
++		ENGINE_get_digests;
++		_ossl_old_des_set_odd_parity;
++		OCSP_RESPDATA_free;
++		d2i_KRB5_TICKET;
++		OTHERNAME_it;
++		EVP_MD_CTX_cleanup;
++		d2i_ASN1_GENERALSTRING;
++		X509_CRL_set_version;
++		BN_mod_sub;
++		OCSP_SINGLERESP_get_ext_by_NID;
++		ENGINE_get_ex_new_index;
++		OCSP_REQUEST_free;
++		OCSP_REQUEST_add1_ext_i2d;
++		X509_VAL_it;
++		EC_POINTs_make_affine;
++		EC_POINT_mul;
++		X509V3_EXT_add_nconf;
++		X509_TRUST_set;
++		X509_CRL_add1_ext_i2d;
++		_ossl_old_des_fcrypt;
++		DISPLAYTEXT_it;
++		X509_CRL_set_lastUpdate;
++		OCSP_BASICRESP_free;
++		OCSP_BASICRESP_add1_ext_i2d;
++		d2i_KRB5_AUTHENTBODY;
++		CRYPTO_set_ex_data_implementation;
++		CRYPTO_set_ex_data_impl;
++		KRB5_ENCDATA_new;
++		DSO_up_ref;
++		OCSP_crl_reason_str;
++		UI_get0_result_string;
++		ASN1_GENERALSTRING_new;
++		X509_SIG_it;
++		ERR_set_implementation;
++		ERR_load_EC_strings;
++		UI_get0_action_string;
++		OCSP_ONEREQ_get_ext;
++		EC_POINT_method_of;
++		i2d_KRB5_APREQBODY;
++		_ossl_old_des_ecb3_encrypt;
++		CRYPTO_get_mem_ex_functions;
++		ENGINE_get_ex_data;
++		UI_destroy_method;
++		ASN1_item_i2d_bio;
++		OCSP_ONEREQ_get_ext_by_OBJ;
++		ASN1_primitive_new;
++		ASN1_PRINTABLE_it;
++		EVP_aes_192_ecb;
++		OCSP_SIGNATURE_new;
++		LONG_it;
++		ASN1_VISIBLESTRING_it;
++		OCSP_SINGLERESP_add1_ext_i2d;
++		d2i_OCSP_CERTID;
++		ASN1_item_d2i_fp;
++		CRL_DIST_POINTS_it;
++		GENERAL_NAME_print;
++		OCSP_SINGLERESP_delete_ext;
++		PKCS12_SAFEBAGS_it;
++		d2i_OCSP_SIGNATURE;
++		OCSP_request_add1_nonce;
++		ENGINE_set_cmd_defns;
++		OCSP_SERVICELOC_free;
++		EC_GROUP_free;
++		ASN1_BIT_STRING_it;
++		X509_REQ_it;
++		_ossl_old_des_cbc_encrypt;
++		ERR_unload_strings;
++		PKCS7_SIGN_ENVELOPE_it;
++		EDIPARTYNAME_free;
++		OCSP_REQINFO_free;
++		EC_GROUP_new_curve_GFp;
++		OCSP_REQUEST_get1_ext_d2i;
++		PKCS12_item_pack_safebag;
++		asn1_ex_c2i;
++		ENGINE_register_digests;
++		i2d_OCSP_REVOKEDINFO;
++		asn1_enc_restore;
++		UI_free;
++		UI_new_method;
++		EVP_EncryptInit_ex;
++		X509_pubkey_digest;
++		EC_POINT_invert;
++		OCSP_basic_sign;
++		i2d_OCSP_RESPID;
++		OCSP_check_nonce;
++		ENGINE_ctrl_cmd;
++		d2i_KRB5_ENCKEY;
++		OCSP_parse_url;
++		OCSP_SINGLERESP_get_ext;
++		OCSP_CRLID_free;
++		OCSP_BASICRESP_get1_ext_d2i;
++		RSAPrivateKey_it;
++		ENGINE_register_all_DH;
++		i2d_EDIPARTYNAME;
++		EC_POINT_get_affine_coordinates_GFp;
++		EC_POINT_get_affine_coords_GFp;
++		OCSP_CRLID_new;
++		ENGINE_get_flags;
++		OCSP_ONEREQ_it;
++		UI_process;
++		ASN1_INTEGER_it;
++		EVP_CipherInit_ex;
++		UI_get_string_type;
++		ENGINE_unregister_DH;
++		ENGINE_register_all_DSA;
++		OCSP_ONEREQ_get_ext_by_critical;
++		bn_dup_expand;
++		OCSP_cert_id_new;
++		BASIC_CONSTRAINTS_it;
++		BN_mod_add_quick;
++		EC_POINT_new;
++		EVP_MD_CTX_destroy;
++		OCSP_RESPBYTES_free;
++		EVP_aes_128_cbc;
++		OCSP_SINGLERESP_get1_ext_d2i;
++		EC_POINT_free;
++		DH_up_ref;
++		X509_NAME_ENTRY_it;
++		UI_get_ex_new_index;
++		BN_mod_sub_quick;
++		OCSP_ONEREQ_add_ext;
++		OCSP_request_sign;
++		EVP_DigestFinal_ex;
++		ENGINE_set_digests;
++		OCSP_id_issuer_cmp;
++		OBJ_NAME_do_all;
++		EC_POINTs_mul;
++		ENGINE_register_complete;
++		X509V3_EXT_nconf_nid;
++		ASN1_SEQUENCE_it;
++		UI_set_default_method;
++		RAND_query_egd_bytes;
++		UI_method_get_writer;
++		UI_OpenSSL;
++		PEM_def_callback;
++		ENGINE_cleanup;
++		DIST_POINT_it;
++		OCSP_SINGLERESP_it;
++		d2i_KRB5_TKTBODY;
++		EC_POINT_cmp;
++		OCSP_REVOKEDINFO_new;
++		i2d_OCSP_CERTSTATUS;
++		OCSP_basic_add1_nonce;
++		ASN1_item_ex_d2i;
++		BN_mod_lshift1_quick;
++		UI_set_method;
++		OCSP_id_get0_info;
++		BN_mod_sqrt;
++		EC_GROUP_copy;
++		KRB5_ENCDATA_free;
++		_ossl_old_des_cfb_encrypt;
++		OCSP_SINGLERESP_get_ext_by_OBJ;
++		OCSP_cert_to_id;
++		OCSP_RESPID_new;
++		OCSP_RESPDATA_it;
++		d2i_OCSP_RESPDATA;
++		ENGINE_register_all_complete;
++		OCSP_check_validity;
++		PKCS12_BAGS_it;
++		OCSP_url_svcloc_new;
++		ASN1_template_free;
++		OCSP_SINGLERESP_add_ext;
++		KRB5_AUTHENTBODY_it;
++		X509_supported_extension;
++		i2d_KRB5_AUTHDATA;
++		UI_method_get_opener;
++		ENGINE_set_ex_data;
++		OCSP_REQUEST_print;
++		CBIGNUM_it;
++		KRB5_TICKET_new;
++		KRB5_APREQ_new;
++		EC_GROUP_get_curve_GFp;
++		KRB5_ENCKEY_new;
++		ASN1_template_d2i;
++		_ossl_old_des_quad_cksum;
++		OCSP_single_get0_status;
++		BN_swap;
++		POLICYINFO_it;
++		ENGINE_set_destroy_function;
++		asn1_enc_free;
++		OCSP_RESPID_it;
++		EC_GROUP_new;
++		EVP_aes_256_cbc;
++		i2d_KRB5_PRINCNAME;
++		_ossl_old_des_encrypt2;
++		_ossl_old_des_encrypt3;
++		PKCS8_PRIV_KEY_INFO_it;
++		OCSP_REQINFO_it;
++		PBEPARAM_it;
++		KRB5_AUTHENTBODY_new;
++		X509_CRL_add0_revoked;
++		EDIPARTYNAME_it;
++		NETSCAPE_SPKI_it;
++		UI_get0_test_string;
++		ENGINE_get_cipher_engine;
++		ENGINE_register_all_ciphers;
++		EC_POINT_copy;
++		BN_kronecker;
++		_ossl_old_des_ede3_ofb64_encrypt;
++		_ossl_odes_ede3_ofb64_encrypt;
++		UI_method_get_reader;
++		OCSP_BASICRESP_get_ext_count;
++		ASN1_ENUMERATED_it;
++		UI_set_result;
++		i2d_KRB5_TICKET;
++		X509_print_ex_fp;
++		EVP_CIPHER_CTX_set_padding;
++		d2i_OCSP_RESPONSE;
++		ASN1_UTCTIME_it;
++		_ossl_old_des_enc_write;
++		OCSP_RESPONSE_new;
++		AES_set_encrypt_key;
++		OCSP_resp_count;
++		KRB5_CHECKSUM_new;
++		ENGINE_load_cswift;
++		OCSP_onereq_get0_id;
++		ENGINE_set_default_ciphers;
++		NOTICEREF_it;
++		X509V3_EXT_CRL_add_nconf;
++		OCSP_REVOKEDINFO_it;
++		AES_encrypt;
++		OCSP_REQUEST_new;
++		ASN1_ANY_it;
++		CRYPTO_ex_data_new_class;
++		_ossl_old_des_ncbc_encrypt;
++		i2d_KRB5_TKTBODY;
++		EC_POINT_clear_free;
++		AES_decrypt;
++		asn1_enc_init;
++		UI_get_result_maxsize;
++		OCSP_CERTID_new;
++		ENGINE_unregister_RAND;
++		UI_method_get_closer;
++		d2i_KRB5_ENCDATA;
++		OCSP_request_onereq_count;
++		OCSP_basic_verify;
++		KRB5_AUTHENTBODY_free;
++		ASN1_item_d2i;
++		ASN1_primitive_free;
++		i2d_EXTENDED_KEY_USAGE;
++		i2d_OCSP_SIGNATURE;
++		asn1_enc_save;
++		ENGINE_load_nuron;
++		_ossl_old_des_pcbc_encrypt;
++		PKCS12_MAC_DATA_it;
++		OCSP_accept_responses_new;
++		asn1_do_lock;
++		PKCS7_ATTR_VERIFY_it;
++		KRB5_APREQBODY_it;
++		i2d_OCSP_SINGLERESP;
++		ASN1_item_ex_new;
++		UI_add_verify_string;
++		_ossl_old_des_set_key;
++		KRB5_PRINCNAME_it;
++		EVP_DecryptInit_ex;
++		i2d_OCSP_CERTID;
++		ASN1_item_d2i_bio;
++		EC_POINT_dbl;
++		asn1_get_choice_selector;
++		i2d_KRB5_CHECKSUM;
++		ENGINE_set_table_flags;
++		AES_options;
++		ENGINE_load_chil;
++		OCSP_id_cmp;
++		OCSP_BASICRESP_new;
++		OCSP_REQUEST_get_ext_by_NID;
++		KRB5_APREQ_it;
++		ENGINE_get_destroy_function;
++		CONF_set_nconf;
++		ASN1_PRINTABLE_free;
++		OCSP_BASICRESP_get_ext_by_NID;
++		DIST_POINT_NAME_it;
++		X509V3_extensions_print;
++		_ossl_old_des_cfb64_encrypt;
++		X509_REVOKED_add1_ext_i2d;
++		_ossl_old_des_ofb_encrypt;
++		KRB5_TKTBODY_new;
++		ASN1_OCTET_STRING_it;
++		ERR_load_UI_strings;
++		i2d_KRB5_ENCKEY;
++		ASN1_template_new;
++		OCSP_SIGNATURE_free;
++		ASN1_item_i2d_fp;
++		KRB5_PRINCNAME_free;
++		PKCS7_RECIP_INFO_it;
++		EXTENDED_KEY_USAGE_it;
++		EC_GFp_simple_method;
++		EC_GROUP_precompute_mult;
++		OCSP_request_onereq_get0;
++		UI_method_set_writer;
++		KRB5_AUTHENT_new;
++		X509_CRL_INFO_it;
++		DSO_set_name_converter;
++		AES_set_decrypt_key;
++		PKCS7_DIGEST_it;
++		PKCS12_x5092certbag;
++		EVP_DigestInit_ex;
++		i2a_ACCESS_DESCRIPTION;
++		OCSP_RESPONSE_it;
++		PKCS7_ENC_CONTENT_it;
++		OCSP_request_add0_id;
++		EC_POINT_make_affine;
++		DSO_get_filename;
++		OCSP_CERTSTATUS_it;
++		OCSP_request_add1_cert;
++		UI_get0_output_string;
++		UI_dup_verify_string;
++		BN_mod_lshift;
++		KRB5_AUTHDATA_it;
++		asn1_set_choice_selector;
++		OCSP_basic_add1_status;
++		OCSP_RESPID_free;
++		asn1_get_field_ptr;
++		UI_add_input_string;
++		OCSP_CRLID_it;
++		i2d_KRB5_AUTHENTBODY;
++		OCSP_REQUEST_get_ext_count;
++		ENGINE_load_atalla;
++		X509_NAME_it;
++		USERNOTICE_it;
++		OCSP_REQINFO_new;
++		OCSP_BASICRESP_get_ext;
++		CRYPTO_get_ex_data_implementation;
++		CRYPTO_get_ex_data_impl;
++		ASN1_item_pack;
++		i2d_KRB5_ENCDATA;
++		X509_PURPOSE_set;
++		X509_REQ_INFO_it;
++		UI_method_set_opener;
++		ASN1_item_ex_free;
++		ASN1_BOOLEAN_it;
++		ENGINE_get_table_flags;
++		UI_create_method;
++		OCSP_ONEREQ_add1_ext_i2d;
++		_shadow_DES_check_key;
++		d2i_OCSP_REQINFO;
++		UI_add_info_string;
++		UI_get_result_minsize;
++		ASN1_NULL_it;
++		BN_mod_lshift1;
++		d2i_OCSP_ONEREQ;
++		OCSP_ONEREQ_new;
++		KRB5_TICKET_it;
++		EVP_aes_192_cbc;
++		KRB5_TICKET_free;
++		UI_new;
++		OCSP_response_create;
++		_ossl_old_des_xcbc_encrypt;
++		PKCS7_it;
++		OCSP_REQUEST_get_ext_by_critical;
++		OCSP_REQUEST_get_ext_by_crit;
++		ENGINE_set_flags;
++		_ossl_old_des_ecb_encrypt;
++		OCSP_response_get1_basic;
++		EVP_Digest;
++		OCSP_ONEREQ_delete_ext;
++		ASN1_TBOOLEAN_it;
++		ASN1_item_new;
++		ASN1_TIME_to_generalizedtime;
++		BIGNUM_it;
++		AES_cbc_encrypt;
++		ENGINE_get_load_privkey_function;
++		ENGINE_get_load_privkey_fn;
++		OCSP_RESPONSE_free;
++		UI_method_set_reader;
++		i2d_ASN1_T61STRING;
++		EC_POINT_set_to_infinity;
++		ERR_load_OCSP_strings;
++		EC_POINT_point2oct;
++		KRB5_APREQ_free;
++		ASN1_OBJECT_it;
++		OCSP_crlID_new;
++		OCSP_crlID2_new;
++		CONF_modules_load_file;
++		CONF_imodule_set_usr_data;
++		ENGINE_set_default_string;
++		CONF_module_get_usr_data;
++		ASN1_add_oid_module;
++		CONF_modules_finish;
++		OPENSSL_config;
++		CONF_modules_unload;
++		CONF_imodule_get_value;
++		CONF_module_set_usr_data;
++		CONF_parse_list;
++		CONF_module_add;
++		CONF_get1_default_config_file;
++		CONF_imodule_get_flags;
++		CONF_imodule_get_module;
++		CONF_modules_load;
++		CONF_imodule_get_name;
++		ERR_peek_top_error;
++		CONF_imodule_get_usr_data;
++		CONF_imodule_set_flags;
++		ENGINE_add_conf_module;
++		ERR_peek_last_error_line;
++		ERR_peek_last_error_line_data;
++		ERR_peek_last_error;
++		DES_read_2passwords;
++		DES_read_password;
++		UI_UTIL_read_pw;
++		UI_UTIL_read_pw_string;
++		ENGINE_load_aep;
++		ENGINE_load_sureware;
++		OPENSSL_add_all_algorithms_noconf;
++		OPENSSL_add_all_algo_noconf;
++		OPENSSL_add_all_algorithms_conf;
++		OPENSSL_add_all_algo_conf;
++		OPENSSL_load_builtin_modules;
++		AES_ofb128_encrypt;
++		AES_ctr128_encrypt;
++		AES_cfb128_encrypt;
++		ENGINE_load_4758cca;
++		_ossl_096_des_random_seed;
++		EVP_aes_256_ofb;
++		EVP_aes_192_ofb;
++		EVP_aes_128_cfb128;
++		EVP_aes_256_cfb128;
++		EVP_aes_128_ofb;
++		EVP_aes_192_cfb128;
++		CONF_modules_free;
++		NCONF_default;
++		OPENSSL_no_config;
++		NCONF_WIN32;
++		ASN1_UNIVERSALSTRING_new;
++		EVP_des_ede_ecb;
++		i2d_ASN1_UNIVERSALSTRING;
++		ASN1_UNIVERSALSTRING_free;
++		ASN1_UNIVERSALSTRING_it;
++		d2i_ASN1_UNIVERSALSTRING;
++		EVP_des_ede3_ecb;
++		X509_REQ_print_ex;
++		ENGINE_up_ref;
++		BUF_MEM_grow_clean;
++		CRYPTO_realloc_clean;
++		BUF_strlcat;
++		BIO_indent;
++		BUF_strlcpy;
++		OpenSSLDie;
++		OPENSSL_cleanse;
++		ENGINE_setup_bsd_cryptodev;
++		ERR_release_err_state_table;
++		EVP_aes_128_cfb8;
++		FIPS_corrupt_rsa;
++		FIPS_selftest_des;
++		EVP_aes_128_cfb1;
++		EVP_aes_192_cfb8;
++		FIPS_mode_set;
++		FIPS_selftest_dsa;
++		EVP_aes_256_cfb8;
++		FIPS_allow_md5;
++		DES_ede3_cfb_encrypt;
++		EVP_des_ede3_cfb8;
++		FIPS_rand_seeded;
++		AES_cfbr_encrypt_block;
++		AES_cfb8_encrypt;
++		FIPS_rand_seed;
++		FIPS_corrupt_des;
++		EVP_aes_192_cfb1;
++		FIPS_selftest_aes;
++		FIPS_set_prng_key;
++		EVP_des_cfb8;
++		FIPS_corrupt_dsa;
++		FIPS_test_mode;
++		FIPS_rand_method;
++		EVP_aes_256_cfb1;
++		ERR_load_FIPS_strings;
++		FIPS_corrupt_aes;
++		FIPS_selftest_sha1;
++		FIPS_selftest_rsa;
++		FIPS_corrupt_sha1;
++		EVP_des_cfb1;
++		FIPS_dsa_check;
++		AES_cfb1_encrypt;
++		EVP_des_ede3_cfb1;
++		FIPS_rand_check;
++		FIPS_md5_allowed;
++		FIPS_mode;
++		FIPS_selftest_failed;
++		sk_is_sorted;
++		X509_check_ca;
++		HMAC_CTX_set_flags;
++		d2i_PROXY_CERT_INFO_EXTENSION;
++		PROXY_POLICY_it;
++		i2d_PROXY_POLICY;
++		i2d_PROXY_CERT_INFO_EXTENSION;
++		d2i_PROXY_POLICY;
++		PROXY_CERT_INFO_EXTENSION_new;
++		PROXY_CERT_INFO_EXTENSION_free;
++		PROXY_CERT_INFO_EXTENSION_it;
++		PROXY_POLICY_free;
++		PROXY_POLICY_new;
++		BN_MONT_CTX_set_locked;
++		FIPS_selftest_rng;
++		EVP_sha384;
++		EVP_sha512;
++		EVP_sha224;
++		EVP_sha256;
++		FIPS_selftest_hmac;
++		FIPS_corrupt_rng;
++		BN_mod_exp_mont_consttime;
++		RSA_X931_hash_id;
++		RSA_padding_check_X931;
++		RSA_verify_PKCS1_PSS;
++		RSA_padding_add_X931;
++		RSA_padding_add_PKCS1_PSS;
++		PKCS1_MGF1;
++		BN_X931_generate_Xpq;
++		RSA_X931_generate_key;
++		BN_X931_derive_prime;
++		BN_X931_generate_prime;
++		RSA_X931_derive;
++		BIO_new_dgram;
++		BN_get0_nist_prime_384;
++		ERR_set_mark;
++		X509_STORE_CTX_set0_crls;
++		ENGINE_set_STORE;
++		ENGINE_register_ECDSA;
++		STORE_meth_set_list_start_fn;
++		STORE_method_set_list_start_function;
++		BN_BLINDING_invert_ex;
++		NAME_CONSTRAINTS_free;
++		STORE_ATTR_INFO_set_number;
++		BN_BLINDING_get_thread_id;
++		X509_STORE_CTX_set0_param;
++		POLICY_MAPPING_it;
++		STORE_parse_attrs_start;
++		POLICY_CONSTRAINTS_free;
++		EVP_PKEY_add1_attr_by_NID;
++		BN_nist_mod_192;
++		EC_GROUP_get_trinomial_basis;
++		STORE_set_method;
++		GENERAL_SUBTREE_free;
++		NAME_CONSTRAINTS_it;
++		ECDH_get_default_method;
++		PKCS12_add_safe;
++		EC_KEY_new_by_curve_name;
++		STORE_meth_get_update_store_fn;
++		STORE_method_get_update_store_function;
++		ENGINE_register_ECDH;
++		SHA512_Update;
++		i2d_ECPrivateKey;
++		BN_get0_nist_prime_192;
++		STORE_modify_certificate;
++		EC_POINT_set_affine_coordinates_GF2m;
++		EC_POINT_set_affine_coords_GF2m;
++		BN_GF2m_mod_exp_arr;
++		STORE_ATTR_INFO_modify_number;
++		X509_keyid_get0;
++		ENGINE_load_gmp;
++		pitem_new;
++		BN_GF2m_mod_mul_arr;
++		STORE_list_public_key_endp;
++		o2i_ECPublicKey;
++		EC_KEY_copy;
++		BIO_dump_fp;
++		X509_policy_node_get0_parent;
++		EC_GROUP_check_discriminant;
++		i2o_ECPublicKey;
++		EC_KEY_precompute_mult;
++		a2i_IPADDRESS;
++		STORE_meth_set_initialise_fn;
++		STORE_method_set_initialise_function;
++		X509_STORE_CTX_set_depth;
++		X509_VERIFY_PARAM_inherit;
++		EC_POINT_point2bn;
++		STORE_ATTR_INFO_set_dn;
++		X509_policy_tree_get0_policies;
++		EC_GROUP_new_curve_GF2m;
++		STORE_destroy_method;
++		ENGINE_unregister_STORE;
++		EVP_PKEY_get1_EC_KEY;
++		STORE_ATTR_INFO_get0_number;
++		ENGINE_get_default_ECDH;
++		EC_KEY_get_conv_form;
++		ASN1_OCTET_STRING_NDEF_it;
++		STORE_delete_public_key;
++		STORE_get_public_key;
++		STORE_modify_arbitrary;
++		ENGINE_get_static_state;
++		pqueue_iterator;
++		ECDSA_SIG_new;
++		OPENSSL_DIR_end;
++		BN_GF2m_mod_sqr;
++		EC_POINT_bn2point;
++		X509_VERIFY_PARAM_set_depth;
++		EC_KEY_set_asn1_flag;
++		STORE_get_method;
++		EC_KEY_get_key_method_data;
++		ECDSA_sign_ex;
++		STORE_parse_attrs_end;
++		EC_GROUP_get_point_conversion_form;
++		EC_GROUP_get_point_conv_form;
++		STORE_method_set_store_function;
++		STORE_ATTR_INFO_in;
++		PEM_read_bio_ECPKParameters;
++		EC_GROUP_get_pentanomial_basis;
++		EVP_PKEY_add1_attr_by_txt;
++		BN_BLINDING_set_flags;
++		X509_VERIFY_PARAM_set1_policies;
++		X509_VERIFY_PARAM_set1_name;
++		X509_VERIFY_PARAM_set_purpose;
++		STORE_get_number;
++		ECDSA_sign_setup;
++		BN_GF2m_mod_solve_quad_arr;
++		EC_KEY_up_ref;
++		POLICY_MAPPING_free;
++		BN_GF2m_mod_div;
++		X509_VERIFY_PARAM_set_flags;
++		EC_KEY_free;
++		STORE_meth_set_list_next_fn;
++		STORE_method_set_list_next_function;
++		PEM_write_bio_ECPrivateKey;
++		d2i_EC_PUBKEY;
++		STORE_meth_get_generate_fn;
++		STORE_method_get_generate_function;
++		STORE_meth_set_list_end_fn;
++		STORE_method_set_list_end_function;
++		pqueue_print;
++		EC_GROUP_have_precompute_mult;
++		EC_KEY_print_fp;
++		BN_GF2m_mod_arr;
++		PEM_write_bio_X509_CERT_PAIR;
++		EVP_PKEY_cmp;
++		X509_policy_level_node_count;
++		STORE_new_engine;
++		STORE_list_public_key_start;
++		X509_VERIFY_PARAM_new;
++		ECDH_get_ex_data;
++		EVP_PKEY_get_attr;
++		ECDSA_do_sign;
++		ENGINE_unregister_ECDH;
++		ECDH_OpenSSL;
++		EC_KEY_set_conv_form;
++		EC_POINT_dup;
++		GENERAL_SUBTREE_new;
++		STORE_list_crl_endp;
++		EC_get_builtin_curves;
++		X509_policy_node_get0_qualifiers;
++		X509_pcy_node_get0_qualifiers;
++		STORE_list_crl_end;
++		EVP_PKEY_set1_EC_KEY;
++		BN_GF2m_mod_sqrt_arr;
++		i2d_ECPrivateKey_bio;
++		ECPKParameters_print_fp;
++		pqueue_find;
++		ECDSA_SIG_free;
++		PEM_write_bio_ECPKParameters;
++		STORE_method_set_ctrl_function;
++		STORE_list_public_key_end;
++		EC_KEY_set_private_key;
++		pqueue_peek;
++		STORE_get_arbitrary;
++		STORE_store_crl;
++		X509_policy_node_get0_policy;
++		PKCS12_add_safes;
++		BN_BLINDING_convert_ex;
++		X509_policy_tree_free;
++		OPENSSL_ia32cap_loc;
++		BN_GF2m_poly2arr;
++		STORE_ctrl;
++		STORE_ATTR_INFO_compare;
++		BN_get0_nist_prime_224;
++		i2d_ECParameters;
++		i2d_ECPKParameters;
++		BN_GENCB_call;
++		d2i_ECPKParameters;
++		STORE_meth_set_generate_fn;
++		STORE_method_set_generate_function;
++		ENGINE_set_ECDH;
++		NAME_CONSTRAINTS_new;
++		SHA256_Init;
++		EC_KEY_get0_public_key;
++		PEM_write_bio_EC_PUBKEY;
++		STORE_ATTR_INFO_set_cstr;
++		STORE_list_crl_next;
++		STORE_ATTR_INFO_in_range;
++		ECParameters_print;
++		STORE_meth_set_delete_fn;
++		STORE_method_set_delete_function;
++		STORE_list_certificate_next;
++		ASN1_generate_nconf;
++		BUF_memdup;
++		BN_GF2m_mod_mul;
++		STORE_meth_get_list_next_fn;
++		STORE_method_get_list_next_function;
++		STORE_ATTR_INFO_get0_dn;
++		STORE_list_private_key_next;
++		EC_GROUP_set_seed;
++		X509_VERIFY_PARAM_set_trust;
++		STORE_ATTR_INFO_free;
++		STORE_get_private_key;
++		EVP_PKEY_get_attr_count;
++		STORE_ATTR_INFO_new;
++		EC_GROUP_get_curve_GF2m;
++		STORE_meth_set_revoke_fn;
++		STORE_method_set_revoke_function;
++		STORE_store_number;
++		BN_is_prime_ex;
++		STORE_revoke_public_key;
++		X509_STORE_CTX_get0_param;
++		STORE_delete_arbitrary;
++		PEM_read_X509_CERT_PAIR;
++		X509_STORE_set_depth;
++		ECDSA_get_ex_data;
++		SHA224;
++		BIO_dump_indent_fp;
++		EC_KEY_set_group;
++		BUF_strndup;
++		STORE_list_certificate_start;
++		BN_GF2m_mod;
++		X509_REQ_check_private_key;
++		EC_GROUP_get_seed_len;
++		ERR_load_STORE_strings;
++		PEM_read_bio_EC_PUBKEY;
++		STORE_list_private_key_end;
++		i2d_EC_PUBKEY;
++		ECDSA_get_default_method;
++		ASN1_put_eoc;
++		X509_STORE_CTX_get_explicit_policy;
++		X509_STORE_CTX_get_expl_policy;
++		X509_VERIFY_PARAM_table_cleanup;
++		STORE_modify_private_key;
++		X509_VERIFY_PARAM_free;
++		EC_METHOD_get_field_type;
++		EC_GFp_nist_method;
++		STORE_meth_set_modify_fn;
++		STORE_method_set_modify_function;
++		STORE_parse_attrs_next;
++		ENGINE_load_padlock;
++		EC_GROUP_set_curve_name;
++		X509_CERT_PAIR_it;
++		STORE_meth_get_revoke_fn;
++		STORE_method_get_revoke_function;
++		STORE_method_set_get_function;
++		STORE_modify_number;
++		STORE_method_get_store_function;
++		STORE_store_private_key;
++		BN_GF2m_mod_sqr_arr;
++		RSA_setup_blinding;
++		BIO_s_datagram;
++		STORE_Memory;
++		sk_find_ex;
++		EC_GROUP_set_curve_GF2m;
++		ENGINE_set_default_ECDSA;
++		POLICY_CONSTRAINTS_new;
++		BN_GF2m_mod_sqrt;
++		ECDH_set_default_method;
++		EC_KEY_generate_key;
++		SHA384_Update;
++		BN_GF2m_arr2poly;
++		STORE_method_get_get_function;
++		STORE_meth_set_cleanup_fn;
++		STORE_method_set_cleanup_function;
++		EC_GROUP_check;
++		d2i_ECPrivateKey_bio;
++		EC_KEY_insert_key_method_data;
++		STORE_meth_get_lock_store_fn;
++		STORE_method_get_lock_store_function;
++		X509_VERIFY_PARAM_get_depth;
++		SHA224_Final;
++		STORE_meth_set_update_store_fn;
++		STORE_method_set_update_store_function;
++		SHA224_Update;
++		d2i_ECPrivateKey;
++		ASN1_item_ndef_i2d;
++		STORE_delete_private_key;
++		ERR_pop_to_mark;
++		ENGINE_register_all_STORE;
++		X509_policy_level_get0_node;
++		i2d_PKCS7_NDEF;
++		EC_GROUP_get_degree;
++		ASN1_generate_v3;
++		STORE_ATTR_INFO_modify_cstr;
++		X509_policy_tree_level_count;
++		BN_GF2m_add;
++		EC_KEY_get0_group;
++		STORE_generate_crl;
++		STORE_store_public_key;
++		X509_CERT_PAIR_free;
++		STORE_revoke_private_key;
++		BN_nist_mod_224;
++		SHA512_Final;
++		STORE_ATTR_INFO_modify_dn;
++		STORE_meth_get_initialise_fn;
++		STORE_method_get_initialise_function;
++		STORE_delete_number;
++		i2d_EC_PUBKEY_bio;
++		BIO_dgram_non_fatal_error;
++		EC_GROUP_get_asn1_flag;
++		STORE_ATTR_INFO_in_ex;
++		STORE_list_crl_start;
++		ECDH_get_ex_new_index;
++		STORE_meth_get_modify_fn;
++		STORE_method_get_modify_function;
++		v2i_ASN1_BIT_STRING;
++		STORE_store_certificate;
++		OBJ_bsearch_ex;
++		X509_STORE_CTX_set_default;
++		STORE_ATTR_INFO_set_sha1str;
++		BN_GF2m_mod_inv;
++		BN_GF2m_mod_exp;
++		STORE_modify_public_key;
++		STORE_meth_get_list_start_fn;
++		STORE_method_get_list_start_function;
++		EC_GROUP_get0_seed;
++		STORE_store_arbitrary;
++		STORE_meth_set_unlock_store_fn;
++		STORE_method_set_unlock_store_function;
++		BN_GF2m_mod_div_arr;
++		ENGINE_set_ECDSA;
++		STORE_create_method;
++		ECPKParameters_print;
++		EC_KEY_get0_private_key;
++		PEM_write_EC_PUBKEY;
++		X509_VERIFY_PARAM_set1;
++		ECDH_set_method;
++		v2i_GENERAL_NAME_ex;
++		ECDH_set_ex_data;
++		STORE_generate_key;
++		BN_nist_mod_521;
++		X509_policy_tree_get0_level;
++		EC_GROUP_set_point_conversion_form;
++		EC_GROUP_set_point_conv_form;
++		PEM_read_EC_PUBKEY;
++		i2d_ECDSA_SIG;
++		ECDSA_OpenSSL;
++		STORE_delete_crl;
++		EC_KEY_get_enc_flags;
++		ASN1_const_check_infinite_end;
++		EVP_PKEY_delete_attr;
++		ECDSA_set_default_method;
++		EC_POINT_set_compressed_coordinates_GF2m;
++		EC_POINT_set_compr_coords_GF2m;
++		EC_GROUP_cmp;
++		STORE_revoke_certificate;
++		BN_get0_nist_prime_256;
++		STORE_meth_get_delete_fn;
++		STORE_method_get_delete_function;
++		SHA224_Init;
++		PEM_read_ECPrivateKey;
++		SHA512_Init;
++		STORE_parse_attrs_endp;
++		BN_set_negative;
++		ERR_load_ECDSA_strings;
++		EC_GROUP_get_basis_type;
++		STORE_list_public_key_next;
++		i2v_ASN1_BIT_STRING;
++		STORE_OBJECT_free;
++		BN_nist_mod_384;
++		i2d_X509_CERT_PAIR;
++		PEM_write_ECPKParameters;
++		ECDH_compute_key;
++		STORE_ATTR_INFO_get0_sha1str;
++		ENGINE_register_all_ECDH;
++		pqueue_pop;
++		STORE_ATTR_INFO_get0_cstr;
++		POLICY_CONSTRAINTS_it;
++		STORE_get_ex_new_index;
++		EVP_PKEY_get_attr_by_OBJ;
++		X509_VERIFY_PARAM_add0_policy;
++		BN_GF2m_mod_solve_quad;
++		SHA256;
++		i2d_ECPrivateKey_fp;
++		X509_policy_tree_get0_user_policies;
++		X509_pcy_tree_get0_usr_policies;
++		OPENSSL_DIR_read;
++		ENGINE_register_all_ECDSA;
++		X509_VERIFY_PARAM_lookup;
++		EC_POINT_get_affine_coordinates_GF2m;
++		EC_POINT_get_affine_coords_GF2m;
++		EC_GROUP_dup;
++		ENGINE_get_default_ECDSA;
++		EC_KEY_new;
++		SHA256_Transform;
++		EC_KEY_set_enc_flags;
++		ECDSA_verify;
++		EC_POINT_point2hex;
++		ENGINE_get_STORE;
++		SHA512;
++		STORE_get_certificate;
++		ECDSA_do_sign_ex;
++		ECDSA_do_verify;
++		d2i_ECPrivateKey_fp;
++		STORE_delete_certificate;
++		SHA512_Transform;
++		X509_STORE_set1_param;
++		STORE_method_get_ctrl_function;
++		STORE_free;
++		PEM_write_ECPrivateKey;
++		STORE_meth_get_unlock_store_fn;
++		STORE_method_get_unlock_store_function;
++		STORE_get_ex_data;
++		EC_KEY_set_public_key;
++		PEM_read_ECPKParameters;
++		X509_CERT_PAIR_new;
++		ENGINE_register_STORE;
++		RSA_generate_key_ex;
++		DSA_generate_parameters_ex;
++		ECParameters_print_fp;
++		X509V3_NAME_from_section;
++		EVP_PKEY_add1_attr;
++		STORE_modify_crl;
++		STORE_list_private_key_start;
++		POLICY_MAPPINGS_it;
++		GENERAL_SUBTREE_it;
++		EC_GROUP_get_curve_name;
++		PEM_write_X509_CERT_PAIR;
++		BIO_dump_indent_cb;
++		d2i_X509_CERT_PAIR;
++		STORE_list_private_key_endp;
++		asn1_const_Finish;
++		i2d_EC_PUBKEY_fp;
++		BN_nist_mod_256;
++		X509_VERIFY_PARAM_add0_table;
++		pqueue_free;
++		BN_BLINDING_create_param;
++		ECDSA_size;
++		d2i_EC_PUBKEY_bio;
++		BN_get0_nist_prime_521;
++		STORE_ATTR_INFO_modify_sha1str;
++		BN_generate_prime_ex;
++		EC_GROUP_new_by_curve_name;
++		SHA256_Final;
++		DH_generate_parameters_ex;
++		PEM_read_bio_ECPrivateKey;
++		STORE_meth_get_cleanup_fn;
++		STORE_method_get_cleanup_function;
++		ENGINE_get_ECDH;
++		d2i_ECDSA_SIG;
++		BN_is_prime_fasttest_ex;
++		ECDSA_sign;
++		X509_policy_check;
++		EVP_PKEY_get_attr_by_NID;
++		STORE_set_ex_data;
++		ENGINE_get_ECDSA;
++		EVP_ecdsa;
++		BN_BLINDING_get_flags;
++		PKCS12_add_cert;
++		STORE_OBJECT_new;
++		ERR_load_ECDH_strings;
++		EC_KEY_dup;
++		EVP_CIPHER_CTX_rand_key;
++		ECDSA_set_method;
++		a2i_IPADDRESS_NC;
++		d2i_ECParameters;
++		STORE_list_certificate_end;
++		STORE_get_crl;
++		X509_POLICY_NODE_print;
++		SHA384_Init;
++		EC_GF2m_simple_method;
++		ECDSA_set_ex_data;
++		SHA384_Final;
++		PKCS7_set_digest;
++		EC_KEY_print;
++		STORE_meth_set_lock_store_fn;
++		STORE_method_set_lock_store_function;
++		ECDSA_get_ex_new_index;
++		SHA384;
++		POLICY_MAPPING_new;
++		STORE_list_certificate_endp;
++		X509_STORE_CTX_get0_policy_tree;
++		EC_GROUP_set_asn1_flag;
++		EC_KEY_check_key;
++		d2i_EC_PUBKEY_fp;
++		PKCS7_set0_type_other;
++		PEM_read_bio_X509_CERT_PAIR;
++		pqueue_next;
++		STORE_meth_get_list_end_fn;
++		STORE_method_get_list_end_function;
++		EVP_PKEY_add1_attr_by_OBJ;
++		X509_VERIFY_PARAM_set_time;
++		pqueue_new;
++		ENGINE_set_default_ECDH;
++		STORE_new_method;
++		PKCS12_add_key;
++		DSO_merge;
++		EC_POINT_hex2point;
++		BIO_dump_cb;
++		SHA256_Update;
++		pqueue_insert;
++		pitem_free;
++		BN_GF2m_mod_inv_arr;
++		ENGINE_unregister_ECDSA;
++		BN_BLINDING_set_thread_id;
++		get_rfc3526_prime_8192;
++		X509_VERIFY_PARAM_clear_flags;
++		get_rfc2409_prime_1024;
++		DH_check_pub_key;
++		get_rfc3526_prime_2048;
++		get_rfc3526_prime_6144;
++		get_rfc3526_prime_1536;
++		get_rfc3526_prime_3072;
++		get_rfc3526_prime_4096;
++		get_rfc2409_prime_768;
++		X509_VERIFY_PARAM_get_flags;
++		EVP_CIPHER_CTX_new;
++		EVP_CIPHER_CTX_free;
++		Camellia_cbc_encrypt;
++		Camellia_cfb128_encrypt;
++		Camellia_cfb1_encrypt;
++		Camellia_cfb8_encrypt;
++		Camellia_ctr128_encrypt;
++		Camellia_cfbr_encrypt_block;
++		Camellia_decrypt;
++		Camellia_ecb_encrypt;
++		Camellia_encrypt;
++		Camellia_ofb128_encrypt;
++		Camellia_set_key;
++		EVP_camellia_128_cbc;
++		EVP_camellia_128_cfb128;
++		EVP_camellia_128_cfb1;
++		EVP_camellia_128_cfb8;
++		EVP_camellia_128_ecb;
++		EVP_camellia_128_ofb;
++		EVP_camellia_192_cbc;
++		EVP_camellia_192_cfb128;
++		EVP_camellia_192_cfb1;
++		EVP_camellia_192_cfb8;
++		EVP_camellia_192_ecb;
++		EVP_camellia_192_ofb;
++		EVP_camellia_256_cbc;
++		EVP_camellia_256_cfb128;
++		EVP_camellia_256_cfb1;
++		EVP_camellia_256_cfb8;
++		EVP_camellia_256_ecb;
++		EVP_camellia_256_ofb;
++		a2i_ipadd;
++		ASIdentifiers_free;
++		i2d_ASIdOrRange;
++		EVP_CIPHER_block_size;
++		v3_asid_is_canonical;
++		IPAddressChoice_free;
++		EVP_CIPHER_CTX_set_app_data;
++		BIO_set_callback_arg;
++		v3_addr_add_prefix;
++		IPAddressOrRange_it;
++		BIO_set_flags;
++		ASIdentifiers_it;
++		v3_addr_get_range;
++		BIO_method_type;
++		v3_addr_inherits;
++		IPAddressChoice_it;
++		AES_ige_encrypt;
++		v3_addr_add_range;
++		EVP_CIPHER_CTX_nid;
++		d2i_ASRange;
++		v3_addr_add_inherit;
++		v3_asid_add_id_or_range;
++		v3_addr_validate_resource_set;
++		EVP_CIPHER_iv_length;
++		EVP_MD_type;
++		v3_asid_canonize;
++		IPAddressRange_free;
++		v3_asid_add_inherit;
++		EVP_CIPHER_CTX_key_length;
++		IPAddressRange_new;
++		ASIdOrRange_new;
++		EVP_MD_size;
++		EVP_MD_CTX_test_flags;
++		BIO_clear_flags;
++		i2d_ASRange;
++		IPAddressRange_it;
++		IPAddressChoice_new;
++		ASIdentifierChoice_new;
++		ASRange_free;
++		EVP_MD_pkey_type;
++		EVP_MD_CTX_clear_flags;
++		IPAddressFamily_free;
++		i2d_IPAddressFamily;
++		IPAddressOrRange_new;
++		EVP_CIPHER_flags;
++		v3_asid_validate_resource_set;
++		d2i_IPAddressRange;
++		AES_bi_ige_encrypt;
++		BIO_get_callback;
++		IPAddressOrRange_free;
++		v3_addr_subset;
++		d2i_IPAddressFamily;
++		v3_asid_subset;
++		BIO_test_flags;
++		i2d_ASIdentifierChoice;
++		ASRange_it;
++		d2i_ASIdentifiers;
++		ASRange_new;
++		d2i_IPAddressChoice;
++		v3_addr_get_afi;
++		EVP_CIPHER_key_length;
++		EVP_Cipher;
++		i2d_IPAddressOrRange;
++		ASIdOrRange_it;
++		EVP_CIPHER_nid;
++		i2d_IPAddressChoice;
++		EVP_CIPHER_CTX_block_size;
++		ASIdentifiers_new;
++		v3_addr_validate_path;
++		IPAddressFamily_new;
++		EVP_MD_CTX_set_flags;
++		v3_addr_is_canonical;
++		i2d_IPAddressRange;
++		IPAddressFamily_it;
++		v3_asid_inherits;
++		EVP_CIPHER_CTX_cipher;
++		EVP_CIPHER_CTX_get_app_data;
++		EVP_MD_block_size;
++		EVP_CIPHER_CTX_flags;
++		v3_asid_validate_path;
++		d2i_IPAddressOrRange;
++		v3_addr_canonize;
++		ASIdentifierChoice_it;
++		EVP_MD_CTX_md;
++		d2i_ASIdentifierChoice;
++		BIO_method_name;
++		EVP_CIPHER_CTX_iv_length;
++		ASIdOrRange_free;
++		ASIdentifierChoice_free;
++		BIO_get_callback_arg;
++		BIO_set_callback;
++		d2i_ASIdOrRange;
++		i2d_ASIdentifiers;
++		SEED_decrypt;
++		SEED_encrypt;
++		SEED_cbc_encrypt;
++		EVP_seed_ofb;
++		SEED_cfb128_encrypt;
++		SEED_ofb128_encrypt;
++		EVP_seed_cbc;
++		SEED_ecb_encrypt;
++		EVP_seed_ecb;
++		SEED_set_key;
++		EVP_seed_cfb128;
++		X509_EXTENSIONS_it;
++		X509_get1_ocsp;
++		OCSP_REQ_CTX_free;
++		i2d_X509_EXTENSIONS;
++		OCSP_sendreq_nbio;
++		OCSP_sendreq_new;
++		d2i_X509_EXTENSIONS;
++		X509_ALGORS_it;
++		X509_ALGOR_get0;
++		X509_ALGOR_set0;
++		AES_unwrap_key;
++		AES_wrap_key;
++		X509at_get0_data_by_OBJ;
++		ASN1_TYPE_set1;
++		ASN1_STRING_set0;
++		i2d_X509_ALGORS;
++		BIO_f_zlib;
++		COMP_zlib_cleanup;
++		d2i_X509_ALGORS;
++		CMS_ReceiptRequest_free;
++		PEM_write_CMS;
++		CMS_add0_CertificateChoices;
++		CMS_unsigned_add1_attr_by_OBJ;
++		ERR_load_CMS_strings;
++		CMS_sign_receipt;
++		i2d_CMS_ContentInfo;
++		CMS_signed_delete_attr;
++		d2i_CMS_bio;
++		CMS_unsigned_get_attr_by_NID;
++		CMS_verify;
++		SMIME_read_CMS;
++		CMS_decrypt_set1_key;
++		CMS_SignerInfo_get0_algs;
++		CMS_add1_cert;
++		CMS_set_detached;
++		CMS_encrypt;
++		CMS_EnvelopedData_create;
++		CMS_uncompress;
++		CMS_add0_crl;
++		CMS_SignerInfo_verify_content;
++		CMS_unsigned_get0_data_by_OBJ;
++		PEM_write_bio_CMS;
++		CMS_unsigned_get_attr;
++		CMS_RecipientInfo_ktri_cert_cmp;
++		CMS_RecipientInfo_ktri_get0_algs;
++		CMS_RecipInfo_ktri_get0_algs;
++		CMS_ContentInfo_free;
++		CMS_final;
++		CMS_add_simple_smimecap;
++		CMS_SignerInfo_verify;
++		CMS_data;
++		CMS_ContentInfo_it;
++		d2i_CMS_ReceiptRequest;
++		CMS_compress;
++		CMS_digest_create;
++		CMS_SignerInfo_cert_cmp;
++		CMS_SignerInfo_sign;
++		CMS_data_create;
++		i2d_CMS_bio;
++		CMS_EncryptedData_set1_key;
++		CMS_decrypt;
++		int_smime_write_ASN1;
++		CMS_unsigned_delete_attr;
++		CMS_unsigned_get_attr_count;
++		CMS_add_smimecap;
++		PEM_read_CMS;
++		CMS_signed_get_attr_by_OBJ;
++		d2i_CMS_ContentInfo;
++		CMS_add_standard_smimecap;
++		CMS_ContentInfo_new;
++		CMS_RecipientInfo_type;
++		CMS_get0_type;
++		CMS_is_detached;
++		CMS_sign;
++		CMS_signed_add1_attr;
++		CMS_unsigned_get_attr_by_OBJ;
++		SMIME_write_CMS;
++		CMS_EncryptedData_decrypt;
++		CMS_get0_RecipientInfos;
++		CMS_add0_RevocationInfoChoice;
++		CMS_decrypt_set1_pkey;
++		CMS_SignerInfo_set1_signer_cert;
++		CMS_get0_signers;
++		CMS_ReceiptRequest_get0_values;
++		CMS_signed_get0_data_by_OBJ;
++		CMS_get0_SignerInfos;
++		CMS_add0_cert;
++		CMS_EncryptedData_encrypt;
++		CMS_digest_verify;
++		CMS_set1_signers_certs;
++		CMS_signed_get_attr;
++		CMS_RecipientInfo_set0_key;
++		CMS_SignedData_init;
++		CMS_RecipientInfo_kekri_get0_id;
++		CMS_verify_receipt;
++		CMS_ReceiptRequest_it;
++		PEM_read_bio_CMS;
++		CMS_get1_crls;
++		CMS_add0_recipient_key;
++		SMIME_read_ASN1;
++		CMS_ReceiptRequest_new;
++		CMS_get0_content;
++		CMS_get1_ReceiptRequest;
++		CMS_signed_add1_attr_by_OBJ;
++		CMS_RecipientInfo_kekri_id_cmp;
++		CMS_add1_ReceiptRequest;
++		CMS_SignerInfo_get0_signer_id;
++		CMS_unsigned_add1_attr_by_NID;
++		CMS_unsigned_add1_attr;
++		CMS_signed_get_attr_by_NID;
++		CMS_get1_certs;
++		CMS_signed_add1_attr_by_NID;
++		CMS_unsigned_add1_attr_by_txt;
++		CMS_dataFinal;
++		CMS_RecipientInfo_ktri_get0_signer_id;
++		CMS_RecipInfo_ktri_get0_sigr_id;
++		i2d_CMS_ReceiptRequest;
++		CMS_add1_recipient_cert;
++		CMS_dataInit;
++		CMS_signed_add1_attr_by_txt;
++		CMS_RecipientInfo_decrypt;
++		CMS_signed_get_attr_count;
++		CMS_get0_eContentType;
++		CMS_set1_eContentType;
++		CMS_ReceiptRequest_create0;
++		CMS_add1_signer;
++		CMS_RecipientInfo_set0_pkey;
++		ENGINE_set_load_ssl_client_cert_function;
++		ENGINE_set_ld_ssl_clnt_cert_fn;
++		ENGINE_get_ssl_client_cert_function;
++		ENGINE_get_ssl_client_cert_fn;
++		ENGINE_load_ssl_client_cert;
++		ENGINE_load_capi;
++		OPENSSL_isservice;
++		FIPS_dsa_sig_decode;
++		EVP_CIPHER_CTX_clear_flags;
++		FIPS_rand_status;
++		FIPS_rand_set_key;
++		CRYPTO_set_mem_info_functions;
++		RSA_X931_generate_key_ex;
++		int_ERR_set_state_func;
++		int_EVP_MD_set_engine_callbacks;
++		int_CRYPTO_set_do_dynlock_callback;
++		FIPS_rng_stick;
++		EVP_CIPHER_CTX_set_flags;
++		BN_X931_generate_prime_ex;
++		FIPS_selftest_check;
++		FIPS_rand_set_dt;
++		CRYPTO_dbg_pop_info;
++		FIPS_dsa_free;
++		RSA_X931_derive_ex;
++		FIPS_rsa_new;
++		FIPS_rand_bytes;
++		fips_cipher_test;
++		EVP_CIPHER_CTX_test_flags;
++		CRYPTO_malloc_debug_init;
++		CRYPTO_dbg_push_info;
++		FIPS_corrupt_rsa_keygen;
++		FIPS_dh_new;
++		FIPS_corrupt_dsa_keygen;
++		FIPS_dh_free;
++		fips_pkey_signature_test;
++		EVP_add_alg_module;
++		int_RAND_init_engine_callbacks;
++		int_EVP_CIPHER_set_engine_callbacks;
++		int_EVP_MD_init_engine_callbacks;
++		FIPS_rand_test_mode;
++		FIPS_rand_reset;
++		FIPS_dsa_new;
++		int_RAND_set_callbacks;
++		BN_X931_derive_prime_ex;
++		int_ERR_lib_init;
++		int_EVP_CIPHER_init_engine_callbacks;
++		FIPS_rsa_free;
++		FIPS_dsa_sig_encode;
++		CRYPTO_dbg_remove_all_info;
++		OPENSSL_init;
++		CRYPTO_strdup;
++		JPAKE_STEP3A_process;
++		JPAKE_STEP1_release;
++		JPAKE_get_shared_key;
++		JPAKE_STEP3B_init;
++		JPAKE_STEP1_generate;
++		JPAKE_STEP1_init;
++		JPAKE_STEP3B_process;
++		JPAKE_STEP2_generate;
++		JPAKE_CTX_new;
++		JPAKE_CTX_free;
++		JPAKE_STEP3B_release;
++		JPAKE_STEP3A_release;
++		JPAKE_STEP2_process;
++		JPAKE_STEP3B_generate;
++		JPAKE_STEP1_process;
++		JPAKE_STEP3A_generate;
++		JPAKE_STEP2_release;
++		JPAKE_STEP3A_init;
++		ERR_load_JPAKE_strings;
++		JPAKE_STEP2_init;
++		pqueue_size;
++		i2d_TS_ACCURACY;
++		i2d_TS_MSG_IMPRINT_fp;
++		i2d_TS_MSG_IMPRINT;
++		EVP_PKEY_print_public;
++		EVP_PKEY_CTX_new;
++		i2d_TS_TST_INFO;
++		EVP_PKEY_asn1_find;
++		DSO_METHOD_beos;
++		TS_CONF_load_cert;
++		TS_REQ_get_ext;
++		EVP_PKEY_sign_init;
++		ASN1_item_print;
++		TS_TST_INFO_set_nonce;
++		TS_RESP_dup;
++		ENGINE_register_pkey_meths;
++		EVP_PKEY_asn1_add0;
++		PKCS7_add0_attrib_signing_time;
++		i2d_TS_TST_INFO_fp;
++		BIO_asn1_get_prefix;
++		TS_TST_INFO_set_time;
++		EVP_PKEY_meth_set_decrypt;
++		EVP_PKEY_set_type_str;
++		EVP_PKEY_CTX_get_keygen_info;
++		TS_REQ_set_policy_id;
++		d2i_TS_RESP_fp;
++		ENGINE_get_pkey_asn1_meth_engine;
++		ENGINE_get_pkey_asn1_meth_eng;
++		WHIRLPOOL_Init;
++		TS_RESP_set_status_info;
++		EVP_PKEY_keygen;
++		EVP_DigestSignInit;
++		TS_ACCURACY_set_millis;
++		TS_REQ_dup;
++		GENERAL_NAME_dup;
++		ASN1_SEQUENCE_ANY_it;
++		WHIRLPOOL;
++		X509_STORE_get1_crls;
++		ENGINE_get_pkey_asn1_meth;
++		EVP_PKEY_asn1_new;
++		BIO_new_NDEF;
++		ENGINE_get_pkey_meth;
++		TS_MSG_IMPRINT_set_algo;
++		i2d_TS_TST_INFO_bio;
++		TS_TST_INFO_set_ordering;
++		TS_TST_INFO_get_ext_by_OBJ;
++		CRYPTO_THREADID_set_pointer;
++		TS_CONF_get_tsa_section;
++		SMIME_write_ASN1;
++		TS_RESP_CTX_set_signer_key;
++		EVP_PKEY_encrypt_old;
++		EVP_PKEY_encrypt_init;
++		CRYPTO_THREADID_cpy;
++		ASN1_PCTX_get_cert_flags;
++		i2d_ESS_SIGNING_CERT;
++		TS_CONF_load_key;
++		i2d_ASN1_SEQUENCE_ANY;
++		d2i_TS_MSG_IMPRINT_bio;
++		EVP_PKEY_asn1_set_public;
++		b2i_PublicKey_bio;
++		BIO_asn1_set_prefix;
++		EVP_PKEY_new_mac_key;
++		BIO_new_CMS;
++		CRYPTO_THREADID_cmp;
++		TS_REQ_ext_free;
++		EVP_PKEY_asn1_set_free;
++		EVP_PKEY_get0_asn1;
++		d2i_NETSCAPE_X509;
++		EVP_PKEY_verify_recover_init;
++		EVP_PKEY_CTX_set_data;
++		EVP_PKEY_keygen_init;
++		TS_RESP_CTX_set_status_info;
++		TS_MSG_IMPRINT_get_algo;
++		TS_REQ_print_bio;
++		EVP_PKEY_CTX_ctrl_str;
++		EVP_PKEY_get_default_digest_nid;
++		PEM_write_bio_PKCS7_stream;
++		TS_MSG_IMPRINT_print_bio;
++		BN_asc2bn;
++		TS_REQ_get_policy_id;
++		ENGINE_set_default_pkey_asn1_meths;
++		ENGINE_set_def_pkey_asn1_meths;
++		d2i_TS_ACCURACY;
++		DSO_global_lookup;
++		TS_CONF_set_tsa_name;
++		i2d_ASN1_SET_ANY;
++		ENGINE_load_gost;
++		WHIRLPOOL_BitUpdate;
++		ASN1_PCTX_get_flags;
++		TS_TST_INFO_get_ext_by_NID;
++		TS_RESP_new;
++		ESS_CERT_ID_dup;
++		TS_STATUS_INFO_dup;
++		TS_REQ_delete_ext;
++		EVP_DigestVerifyFinal;
++		EVP_PKEY_print_params;
++		i2d_CMS_bio_stream;
++		TS_REQ_get_msg_imprint;
++		OBJ_find_sigid_by_algs;
++		TS_TST_INFO_get_serial;
++		TS_REQ_get_nonce;
++		X509_PUBKEY_set0_param;
++		EVP_PKEY_CTX_set0_keygen_info;
++		DIST_POINT_set_dpname;
++		i2d_ISSUING_DIST_POINT;
++		ASN1_SET_ANY_it;
++		EVP_PKEY_CTX_get_data;
++		TS_STATUS_INFO_print_bio;
++		EVP_PKEY_derive_init;
++		d2i_TS_TST_INFO;
++		EVP_PKEY_asn1_add_alias;
++		d2i_TS_RESP_bio;
++		OTHERNAME_cmp;
++		GENERAL_NAME_set0_value;
++		PKCS7_RECIP_INFO_get0_alg;
++		TS_RESP_CTX_new;
++		TS_RESP_set_tst_info;
++		PKCS7_final;
++		EVP_PKEY_base_id;
++		TS_RESP_CTX_set_signer_cert;
++		TS_REQ_set_msg_imprint;
++		EVP_PKEY_CTX_ctrl;
++		TS_CONF_set_digests;
++		d2i_TS_MSG_IMPRINT;
++		EVP_PKEY_meth_set_ctrl;
++		TS_REQ_get_ext_by_NID;
++		PKCS5_pbe_set0_algor;
++		BN_BLINDING_thread_id;
++		TS_ACCURACY_new;
++		X509_CRL_METHOD_free;
++		ASN1_PCTX_get_nm_flags;
++		EVP_PKEY_meth_set_sign;
++		CRYPTO_THREADID_current;
++		EVP_PKEY_decrypt_init;
++		NETSCAPE_X509_free;
++		i2b_PVK_bio;
++		EVP_PKEY_print_private;
++		GENERAL_NAME_get0_value;
++		b2i_PVK_bio;
++		ASN1_UTCTIME_adj;
++		TS_TST_INFO_new;
++		EVP_MD_do_all_sorted;
++		TS_CONF_set_default_engine;
++		TS_ACCURACY_set_seconds;
++		TS_TST_INFO_get_time;
++		PKCS8_pkey_get0;
++		EVP_PKEY_asn1_get0;
++		OBJ_add_sigid;
++		PKCS7_SIGNER_INFO_sign;
++		EVP_PKEY_paramgen_init;
++		EVP_PKEY_sign;
++		OBJ_sigid_free;
++		EVP_PKEY_meth_set_init;
++		d2i_ESS_ISSUER_SERIAL;
++		ISSUING_DIST_POINT_new;
++		ASN1_TIME_adj;
++		TS_OBJ_print_bio;
++		EVP_PKEY_meth_set_verify_recover;
++		EVP_PKEY_meth_set_vrfy_recover;
++		TS_RESP_get_status_info;
++		CMS_stream;
++		EVP_PKEY_CTX_set_cb;
++		PKCS7_to_TS_TST_INFO;
++		ASN1_PCTX_get_oid_flags;
++		TS_TST_INFO_add_ext;
++		EVP_PKEY_meth_set_derive;
++		i2d_TS_RESP_fp;
++		i2d_TS_MSG_IMPRINT_bio;
++		TS_RESP_CTX_set_accuracy;
++		TS_REQ_set_nonce;
++		ESS_CERT_ID_new;
++		ENGINE_pkey_asn1_find_str;
++		TS_REQ_get_ext_count;
++		BUF_reverse;
++		TS_TST_INFO_print_bio;
++		d2i_ISSUING_DIST_POINT;
++		ENGINE_get_pkey_meths;
++		i2b_PrivateKey_bio;
++		i2d_TS_RESP;
++		b2i_PublicKey;
++		TS_VERIFY_CTX_cleanup;
++		TS_STATUS_INFO_free;
++		TS_RESP_verify_token;
++		OBJ_bsearch_ex_;
++		ASN1_bn_print;
++		EVP_PKEY_asn1_get_count;
++		ENGINE_register_pkey_asn1_meths;
++		ASN1_PCTX_set_nm_flags;
++		EVP_DigestVerifyInit;
++		ENGINE_set_default_pkey_meths;
++		TS_TST_INFO_get_policy_id;
++		TS_REQ_get_cert_req;
++		X509_CRL_set_meth_data;
++		PKCS8_pkey_set0;
++		ASN1_STRING_copy;
++		d2i_TS_TST_INFO_fp;
++		X509_CRL_match;
++		EVP_PKEY_asn1_set_private;
++		TS_TST_INFO_get_ext_d2i;
++		TS_RESP_CTX_add_policy;
++		d2i_TS_RESP;
++		TS_CONF_load_certs;
++		TS_TST_INFO_get_msg_imprint;
++		ERR_load_TS_strings;
++		TS_TST_INFO_get_version;
++		EVP_PKEY_CTX_dup;
++		EVP_PKEY_meth_set_verify;
++		i2b_PublicKey_bio;
++		TS_CONF_set_certs;
++		EVP_PKEY_asn1_get0_info;
++		TS_VERIFY_CTX_free;
++		TS_REQ_get_ext_by_critical;
++		TS_RESP_CTX_set_serial_cb;
++		X509_CRL_get_meth_data;
++		TS_RESP_CTX_set_time_cb;
++		TS_MSG_IMPRINT_get_msg;
++		TS_TST_INFO_ext_free;
++		TS_REQ_get_version;
++		TS_REQ_add_ext;
++		EVP_PKEY_CTX_set_app_data;
++		OBJ_bsearch_;
++		EVP_PKEY_meth_set_verifyctx;
++		i2d_PKCS7_bio_stream;
++		CRYPTO_THREADID_set_numeric;
++		PKCS7_sign_add_signer;
++		d2i_TS_TST_INFO_bio;
++		TS_TST_INFO_get_ordering;
++		TS_RESP_print_bio;
++		TS_TST_INFO_get_exts;
++		HMAC_CTX_copy;
++		PKCS5_pbe2_set_iv;
++		ENGINE_get_pkey_asn1_meths;
++		b2i_PrivateKey;
++		EVP_PKEY_CTX_get_app_data;
++		TS_REQ_set_cert_req;
++		CRYPTO_THREADID_set_callback;
++		TS_CONF_set_serial;
++		TS_TST_INFO_free;
++		d2i_TS_REQ_fp;
++		TS_RESP_verify_response;
++		i2d_ESS_ISSUER_SERIAL;
++		TS_ACCURACY_get_seconds;
++		EVP_CIPHER_do_all;
++		b2i_PrivateKey_bio;
++		OCSP_CERTID_dup;
++		X509_PUBKEY_get0_param;
++		TS_MSG_IMPRINT_dup;
++		PKCS7_print_ctx;
++		i2d_TS_REQ_bio;
++		EVP_whirlpool;
++		EVP_PKEY_asn1_set_param;
++		EVP_PKEY_meth_set_encrypt;
++		ASN1_PCTX_set_flags;
++		i2d_ESS_CERT_ID;
++		TS_VERIFY_CTX_new;
++		TS_RESP_CTX_set_extension_cb;
++		ENGINE_register_all_pkey_meths;
++		TS_RESP_CTX_set_status_info_cond;
++		TS_RESP_CTX_set_stat_info_cond;
++		EVP_PKEY_verify;
++		WHIRLPOOL_Final;
++		X509_CRL_METHOD_new;
++		EVP_DigestSignFinal;
++		TS_RESP_CTX_set_def_policy;
++		NETSCAPE_X509_it;
++		TS_RESP_create_response;
++		PKCS7_SIGNER_INFO_get0_algs;
++		TS_TST_INFO_get_nonce;
++		EVP_PKEY_decrypt_old;
++		TS_TST_INFO_set_policy_id;
++		TS_CONF_set_ess_cert_id_chain;
++		EVP_PKEY_CTX_get0_pkey;
++		d2i_TS_REQ;
++		EVP_PKEY_asn1_find_str;
++		BIO_f_asn1;
++		ESS_SIGNING_CERT_new;
++		EVP_PBE_find;
++		X509_CRL_get0_by_cert;
++		EVP_PKEY_derive;
++		i2d_TS_REQ;
++		TS_TST_INFO_delete_ext;
++		ESS_ISSUER_SERIAL_free;
++		ASN1_PCTX_set_str_flags;
++		ENGINE_get_pkey_asn1_meth_str;
++		TS_CONF_set_signer_key;
++		TS_ACCURACY_get_millis;
++		TS_RESP_get_token;
++		TS_ACCURACY_dup;
++		ENGINE_register_all_pkey_asn1_meths;
++		ENGINE_reg_all_pkey_asn1_meths;
++		X509_CRL_set_default_method;
++		CRYPTO_THREADID_hash;
++		CMS_ContentInfo_print_ctx;
++		TS_RESP_free;
++		ISSUING_DIST_POINT_free;
++		ESS_ISSUER_SERIAL_new;
++		CMS_add1_crl;
++		PKCS7_add1_attrib_digest;
++		TS_RESP_CTX_add_md;
++		TS_TST_INFO_dup;
++		ENGINE_set_pkey_asn1_meths;
++		PEM_write_bio_Parameters;
++		TS_TST_INFO_get_accuracy;
++		X509_CRL_get0_by_serial;
++		TS_TST_INFO_set_version;
++		TS_RESP_CTX_get_tst_info;
++		TS_RESP_verify_signature;
++		CRYPTO_THREADID_get_callback;
++		TS_TST_INFO_get_tsa;
++		TS_STATUS_INFO_new;
++		EVP_PKEY_CTX_get_cb;
++		TS_REQ_get_ext_d2i;
++		GENERAL_NAME_set0_othername;
++		TS_TST_INFO_get_ext_count;
++		TS_RESP_CTX_get_request;
++		i2d_NETSCAPE_X509;
++		ENGINE_get_pkey_meth_engine;
++		EVP_PKEY_meth_set_signctx;
++		EVP_PKEY_asn1_copy;
++		ASN1_TYPE_cmp;
++		EVP_CIPHER_do_all_sorted;
++		EVP_PKEY_CTX_free;
++		ISSUING_DIST_POINT_it;
++		d2i_TS_MSG_IMPRINT_fp;
++		X509_STORE_get1_certs;
++		EVP_PKEY_CTX_get_operation;
++		d2i_ESS_SIGNING_CERT;
++		TS_CONF_set_ordering;
++		EVP_PBE_alg_add_type;
++		TS_REQ_set_version;
++		EVP_PKEY_get0;
++		BIO_asn1_set_suffix;
++		i2d_TS_STATUS_INFO;
++		EVP_MD_do_all;
++		TS_TST_INFO_set_accuracy;
++		PKCS7_add_attrib_content_type;
++		ERR_remove_thread_state;
++		EVP_PKEY_meth_add0;
++		TS_TST_INFO_set_tsa;
++		EVP_PKEY_meth_new;
++		WHIRLPOOL_Update;
++		TS_CONF_set_accuracy;
++		ASN1_PCTX_set_oid_flags;
++		ESS_SIGNING_CERT_dup;
++		d2i_TS_REQ_bio;
++		X509_time_adj_ex;
++		TS_RESP_CTX_add_flags;
++		d2i_TS_STATUS_INFO;
++		TS_MSG_IMPRINT_set_msg;
++		BIO_asn1_get_suffix;
++		TS_REQ_free;
++		EVP_PKEY_meth_free;
++		TS_REQ_get_exts;
++		TS_RESP_CTX_set_clock_precision_digits;
++		TS_RESP_CTX_set_clk_prec_digits;
++		TS_RESP_CTX_add_failure_info;
++		i2d_TS_RESP_bio;
++		EVP_PKEY_CTX_get0_peerkey;
++		PEM_write_bio_CMS_stream;
++		TS_REQ_new;
++		TS_MSG_IMPRINT_new;
++		EVP_PKEY_meth_find;
++		EVP_PKEY_id;
++		TS_TST_INFO_set_serial;
++		a2i_GENERAL_NAME;
++		TS_CONF_set_crypto_device;
++		EVP_PKEY_verify_init;
++		TS_CONF_set_policies;
++		ASN1_PCTX_new;
++		ESS_CERT_ID_free;
++		ENGINE_unregister_pkey_meths;
++		TS_MSG_IMPRINT_free;
++		TS_VERIFY_CTX_init;
++		PKCS7_stream;
++		TS_RESP_CTX_set_certs;
++		TS_CONF_set_def_policy;
++		ASN1_GENERALIZEDTIME_adj;
++		NETSCAPE_X509_new;
++		TS_ACCURACY_free;
++		TS_RESP_get_tst_info;
++		EVP_PKEY_derive_set_peer;
++		PEM_read_bio_Parameters;
++		TS_CONF_set_clock_precision_digits;
++		TS_CONF_set_clk_prec_digits;
++		ESS_ISSUER_SERIAL_dup;
++		TS_ACCURACY_get_micros;
++		ASN1_PCTX_get_str_flags;
++		NAME_CONSTRAINTS_check;
++		ASN1_BIT_STRING_check;
++		X509_check_akid;
++		ENGINE_unregister_pkey_asn1_meths;
++		ENGINE_unreg_pkey_asn1_meths;
++		ASN1_PCTX_free;
++		PEM_write_bio_ASN1_stream;
++		i2d_ASN1_bio_stream;
++		TS_X509_ALGOR_print_bio;
++		EVP_PKEY_meth_set_cleanup;
++		EVP_PKEY_asn1_free;
++		ESS_SIGNING_CERT_free;
++		TS_TST_INFO_set_msg_imprint;
++		GENERAL_NAME_cmp;
++		d2i_ASN1_SET_ANY;
++		ENGINE_set_pkey_meths;
++		i2d_TS_REQ_fp;
++		d2i_ASN1_SEQUENCE_ANY;
++		GENERAL_NAME_get0_otherName;
++		d2i_ESS_CERT_ID;
++		OBJ_find_sigid_algs;
++		EVP_PKEY_meth_set_keygen;
++		PKCS5_PBKDF2_HMAC;
++		EVP_PKEY_paramgen;
++		EVP_PKEY_meth_set_paramgen;
++		BIO_new_PKCS7;
++		EVP_PKEY_verify_recover;
++		TS_ext_print_bio;
++		TS_ASN1_INTEGER_print_bio;
++		check_defer;
++		DSO_pathbyaddr;
++		EVP_PKEY_set_type;
++		TS_ACCURACY_set_micros;
++		TS_REQ_to_TS_VERIFY_CTX;
++		EVP_PKEY_meth_set_copy;
++		ASN1_PCTX_set_cert_flags;
++		TS_TST_INFO_get_ext;
++		EVP_PKEY_asn1_set_ctrl;
++		TS_TST_INFO_get_ext_by_critical;
++		EVP_PKEY_CTX_new_id;
++		TS_REQ_get_ext_by_OBJ;
++		TS_CONF_set_signer_cert;
++		X509_NAME_hash_old;
++		ASN1_TIME_set_string;
++		EVP_MD_flags;
++		TS_RESP_CTX_free;
++		DSAparams_dup;
++		DHparams_dup;
++		OCSP_REQ_CTX_add1_header;
++		OCSP_REQ_CTX_set1_req;
++		X509_STORE_set_verify_cb;
++		X509_STORE_CTX_get0_current_crl;
++		X509_STORE_CTX_get0_parent_ctx;
++		X509_STORE_CTX_get0_current_issuer;
++		X509_STORE_CTX_get0_cur_issuer;
++		X509_issuer_name_hash_old;
++		X509_subject_name_hash_old;
++		EVP_CIPHER_CTX_copy;
++		UI_method_get_prompt_constructor;
++		UI_method_get_prompt_constructr;
++		UI_method_set_prompt_constructor;
++		UI_method_set_prompt_constructr;
++		EVP_read_pw_string_min;
++		CRYPTO_cts128_encrypt;
++		CRYPTO_cts128_decrypt_block;
++		CRYPTO_cfb128_1_encrypt;
++		CRYPTO_cbc128_encrypt;
++		CRYPTO_ctr128_encrypt;
++		CRYPTO_ofb128_encrypt;
++		CRYPTO_cts128_decrypt;
++		CRYPTO_cts128_encrypt_block;
++		CRYPTO_cbc128_decrypt;
++		CRYPTO_cfb128_encrypt;
++		CRYPTO_cfb128_8_encrypt;
++		SSL_renegotiate_abbreviated;
++		TLSv1_1_method;
++		TLSv1_1_client_method;
++		TLSv1_1_server_method;
++		SSL_CTX_set_srp_client_pwd_callback;
++		SSL_CTX_set_srp_client_pwd_cb;
++		SSL_get_srp_g;
++		SSL_CTX_set_srp_username_callback;
++		SSL_CTX_set_srp_un_cb;
++		SSL_get_srp_userinfo;
++		SSL_set_srp_server_param;
++		SSL_set_srp_server_param_pw;
++		SSL_get_srp_N;
++		SSL_get_srp_username;
++		SSL_CTX_set_srp_password;
++		SSL_CTX_set_srp_strength;
++		SSL_CTX_set_srp_verify_param_callback;
++		SSL_CTX_set_srp_vfy_param_cb;
++		SSL_CTX_set_srp_cb_arg;
++		SSL_CTX_set_srp_username;
++		SSL_CTX_SRP_CTX_init;
++		SSL_SRP_CTX_init;
++		SRP_Calc_A_param;
++		SRP_generate_server_master_secret;
++		SRP_gen_server_master_secret;
++		SSL_CTX_SRP_CTX_free;
++		SRP_generate_client_master_secret;
++		SRP_gen_client_master_secret;
++		SSL_srp_server_param_with_username;
++		SSL_srp_server_param_with_un;
++		SSL_SRP_CTX_free;
++		SSL_set_debug;
++		SSL_SESSION_get0_peer;
++		TLSv1_2_client_method;
++		SSL_SESSION_set1_id_context;
++		TLSv1_2_server_method;
++		SSL_cache_hit;
++		SSL_get0_kssl_ctx;
++		SSL_set0_kssl_ctx;
++		SSL_set_state;
++		SSL_CIPHER_get_id;
++		TLSv1_2_method;
++		kssl_ctx_get0_client_princ;
++		SSL_export_keying_material;
++		SSL_set_tlsext_use_srtp;
++		SSL_CTX_set_next_protos_advertised_cb;
++		SSL_CTX_set_next_protos_adv_cb;
++		SSL_get0_next_proto_negotiated;
++		SSL_get_selected_srtp_profile;
++		SSL_CTX_set_tlsext_use_srtp;
++		SSL_select_next_proto;
++		SSL_get_srtp_profiles;
++		SSL_CTX_set_next_proto_select_cb;
++		SSL_CTX_set_next_proto_sel_cb;
++		SSL_SESSION_get_compress_id;
++
++		SRP_VBASE_get_by_user;
++		SRP_Calc_server_key;
++		SRP_create_verifier;
++		SRP_create_verifier_BN;
++		SRP_Calc_u;
++		SRP_VBASE_free;
++		SRP_Calc_client_key;
++		SRP_get_default_gN;
++		SRP_Calc_x;
++		SRP_Calc_B;
++		SRP_VBASE_new;
++		SRP_check_known_gN_param;
++		SRP_Calc_A;
++		SRP_Verify_A_mod_N;
++		SRP_VBASE_init;
++		SRP_Verify_B_mod_N;
++		EC_KEY_set_public_key_affine_coordinates;
++		EC_KEY_set_pub_key_aff_coords;
++		EVP_aes_192_ctr;
++		EVP_PKEY_meth_get0_info;
++		EVP_PKEY_meth_copy;
++		ERR_add_error_vdata;
++		EVP_aes_128_ctr;
++		EVP_aes_256_ctr;
++		EC_GFp_nistp224_method;
++		EC_KEY_get_flags;
++		RSA_padding_add_PKCS1_PSS_mgf1;
++		EVP_aes_128_xts;
++		EVP_aes_256_xts;
++		EVP_aes_128_gcm;
++		EC_KEY_clear_flags;
++		EC_KEY_set_flags;
++		EVP_aes_256_ccm;
++		RSA_verify_PKCS1_PSS_mgf1;
++		EVP_aes_128_ccm;
++		EVP_aes_192_gcm;
++		X509_ALGOR_set_md;
++		RAND_init_fips;
++		EVP_aes_256_gcm;
++		EVP_aes_192_ccm;
++		CMAC_CTX_copy;
++		CMAC_CTX_free;
++		CMAC_CTX_get0_cipher_ctx;
++		CMAC_CTX_cleanup;
++		CMAC_Init;
++		CMAC_Update;
++		CMAC_resume;
++		CMAC_CTX_new;
++		CMAC_Final;
++		CRYPTO_ctr128_encrypt_ctr32;
++		CRYPTO_gcm128_release;
++		CRYPTO_ccm128_decrypt_ccm64;
++		CRYPTO_ccm128_encrypt;
++		CRYPTO_gcm128_encrypt;
++		CRYPTO_xts128_encrypt;
++		EVP_rc4_hmac_md5;
++		CRYPTO_nistcts128_decrypt_block;
++		CRYPTO_gcm128_setiv;
++		CRYPTO_nistcts128_encrypt;
++		EVP_aes_128_cbc_hmac_sha1;
++		CRYPTO_gcm128_tag;
++		CRYPTO_ccm128_encrypt_ccm64;
++		ENGINE_load_rdrand;
++		CRYPTO_ccm128_setiv;
++		CRYPTO_nistcts128_encrypt_block;
++		CRYPTO_gcm128_aad;
++		CRYPTO_ccm128_init;
++		CRYPTO_nistcts128_decrypt;
++		CRYPTO_gcm128_new;
++		CRYPTO_ccm128_tag;
++		CRYPTO_ccm128_decrypt;
++		CRYPTO_ccm128_aad;
++		CRYPTO_gcm128_init;
++		CRYPTO_gcm128_decrypt;
++		ENGINE_load_rsax;
++		CRYPTO_gcm128_decrypt_ctr32;
++		CRYPTO_gcm128_encrypt_ctr32;
++		CRYPTO_gcm128_finish;
++		EVP_aes_256_cbc_hmac_sha1;
++		PKCS5_pbkdf2_set;
++		CMS_add0_recipient_password;
++		CMS_decrypt_set1_password;
++		CMS_RecipientInfo_set0_password;
++		RAND_set_fips_drbg_type;
++		X509_REQ_sign_ctx;
++		RSA_PSS_PARAMS_new;
++		X509_CRL_sign_ctx;
++		X509_signature_dump;
++		d2i_RSA_PSS_PARAMS;
++		RSA_PSS_PARAMS_it;
++		RSA_PSS_PARAMS_free;
++		X509_sign_ctx;
++		i2d_RSA_PSS_PARAMS;
++		ASN1_item_sign_ctx;
++		EC_GFp_nistp521_method;
++		EC_GFp_nistp256_method;
++		OPENSSL_stderr;
++		OPENSSL_cpuid_setup;
++		OPENSSL_showfatal;
++		BIO_new_dgram_sctp;
++		BIO_dgram_sctp_msg_waiting;
++		BIO_dgram_sctp_wait_for_dry;
++		BIO_s_datagram_sctp;
++		BIO_dgram_is_sctp;
++		BIO_dgram_sctp_notification_cb;
++		CRYPTO_memcmp;
++		SSL_CTX_set_alpn_protos;
++		SSL_set_alpn_protos;
++		SSL_CTX_set_alpn_select_cb;
++		SSL_get0_alpn_selected;
++		SSL_CTX_set_custom_cli_ext;
++		SSL_CTX_set_custom_srv_ext;
++		SSL_CTX_set_srv_supp_data;
++		SSL_CTX_set_cli_supp_data;
++		SSL_set_cert_cb;
++		SSL_CTX_use_serverinfo;
++		SSL_CTX_use_serverinfo_file;
++		SSL_CTX_set_cert_cb;
++		SSL_CTX_get0_param;
++		SSL_get0_param;
++		SSL_certs_clear;
++		DTLSv1_2_method;
++		DTLSv1_2_server_method;
++		DTLSv1_2_client_method;
++		DTLS_method;
++		DTLS_server_method;
++		DTLS_client_method;
++		SSL_CTX_get_ssl_method;
++		SSL_CTX_get0_certificate;
++		SSL_CTX_get0_privatekey;
++		SSL_COMP_set0_compression_methods;
++		SSL_COMP_free_compression_methods;
++		SSL_CIPHER_find;
++		SSL_is_server;
++		SSL_CONF_CTX_new;
++		SSL_CONF_CTX_finish;
++		SSL_CONF_CTX_free;
++		SSL_CONF_CTX_set_flags;
++		SSL_CONF_CTX_clear_flags;
++		SSL_CONF_CTX_set1_prefix;
++		SSL_CONF_CTX_set_ssl;
++		SSL_CONF_CTX_set_ssl_ctx;
++		SSL_CONF_cmd;
++		SSL_CONF_cmd_argv;
++		SSL_CONF_cmd_value_type;
++		SSL_trace;
++		SSL_CIPHER_standard_name;
++		SSL_get_tlsa_record_byname;
++		ASN1_TIME_diff;
++		BIO_hex_string;
++		CMS_RecipientInfo_get0_pkey_ctx;
++		CMS_RecipientInfo_encrypt;
++		CMS_SignerInfo_get0_pkey_ctx;
++		CMS_SignerInfo_get0_md_ctx;
++		CMS_SignerInfo_get0_signature;
++		CMS_RecipientInfo_kari_get0_alg;
++		CMS_RecipientInfo_kari_get0_reks;
++		CMS_RecipientInfo_kari_get0_orig_id;
++		CMS_RecipientInfo_kari_orig_id_cmp;
++		CMS_RecipientEncryptedKey_get0_id;
++		CMS_RecipientEncryptedKey_cert_cmp;
++		CMS_RecipientInfo_kari_set0_pkey;
++		CMS_RecipientInfo_kari_get0_ctx;
++		CMS_RecipientInfo_kari_decrypt;
++		CMS_SharedInfo_encode;
++		DH_compute_key_padded;
++		d2i_DHxparams;
++		i2d_DHxparams;
++		DH_get_1024_160;
++		DH_get_2048_224;
++		DH_get_2048_256;
++		DH_KDF_X9_42;
++		ECDH_KDF_X9_62;
++		ECDSA_METHOD_new;
++		ECDSA_METHOD_free;
++		ECDSA_METHOD_set_app_data;
++		ECDSA_METHOD_get_app_data;
++		ECDSA_METHOD_set_sign;
++		ECDSA_METHOD_set_sign_setup;
++		ECDSA_METHOD_set_verify;
++		ECDSA_METHOD_set_flags;
++		ECDSA_METHOD_set_name;
++		EVP_des_ede3_wrap;
++		EVP_aes_128_wrap;
++		EVP_aes_192_wrap;
++		EVP_aes_256_wrap;
++		EVP_aes_128_cbc_hmac_sha256;
++		EVP_aes_256_cbc_hmac_sha256;
++		CRYPTO_128_wrap;
++		CRYPTO_128_unwrap;
++		OCSP_REQ_CTX_nbio;
++		OCSP_REQ_CTX_new;
++		OCSP_set_max_response_length;
++		OCSP_REQ_CTX_i2d;
++		OCSP_REQ_CTX_nbio_d2i;
++		OCSP_REQ_CTX_get0_mem_bio;
++		OCSP_REQ_CTX_http;
++		RSA_padding_add_PKCS1_OAEP_mgf1;
++		RSA_padding_check_PKCS1_OAEP_mgf1;
++		RSA_OAEP_PARAMS_free;
++		RSA_OAEP_PARAMS_it;
++		RSA_OAEP_PARAMS_new;
++		SSL_get_sigalgs;
++		SSL_get_shared_sigalgs;
++		SSL_check_chain;
++		X509_chain_up_ref;
++		X509_http_nbio;
++		X509_CRL_http_nbio;
++		X509_REVOKED_dup;
++		i2d_re_X509_tbs;
++		X509_get0_signature;
++		X509_get_signature_nid;
++		X509_CRL_diff;
++		X509_chain_check_suiteb;
++		X509_CRL_check_suiteb;
++		X509_check_host;
++		X509_check_email;
++		X509_check_ip;
++		X509_check_ip_asc;
++		X509_STORE_set_lookup_crls_cb;
++		X509_STORE_CTX_get0_store;
++		X509_VERIFY_PARAM_set1_host;
++		X509_VERIFY_PARAM_add1_host;
++		X509_VERIFY_PARAM_set_hostflags;
++		X509_VERIFY_PARAM_get0_peername;
++		X509_VERIFY_PARAM_set1_email;
++		X509_VERIFY_PARAM_set1_ip;
++		X509_VERIFY_PARAM_set1_ip_asc;
++		X509_VERIFY_PARAM_get0_name;
++		X509_VERIFY_PARAM_get_count;
++		X509_VERIFY_PARAM_get0;
++		X509V3_EXT_free;
++		EC_GROUP_get_mont_data;
++		EC_curve_nid2nist;
++		EC_curve_nist2nid;
++		PEM_write_bio_DHxparams;
++		PEM_write_DHxparams;
++		SSL_CTX_add_client_custom_ext;
++		SSL_CTX_add_server_custom_ext;
++		SSL_extension_supported;
++		BUF_strnlen;
++		sk_deep_copy;
++		SSL_test_functions;
++
++	local:
++		*;
++};
++
++OPENSSL_1.0.2g {
++       global:
++               SRP_VBASE_get1_by_user;
++               SRP_user_pwd_free;
++} OPENSSL_1.0.2d;
++
+Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/openssl.ld
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/openssl.ld	2014-02-24 21:02:30.000000000 +0100
+@@ -0,0 +1,10 @@
++OPENSSL_1.0.2 {
++	global:
++		bind_engine;
++		v_check;
++		OPENSSL_init;
++		OPENSSL_finish;
++	local:
++		*;
++};
++
+Index: openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/ccgost/openssl.ld
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ openssl-1.0.2~beta1.obsolete.0.0498436515490575/engines/ccgost/openssl.ld	2014-02-24 21:02:30.000000000 +0100
+@@ -0,0 +1,10 @@
++OPENSSL_1.0.2 {
++	global:
++		bind_engine;
++		v_check;
++		OPENSSL_init;
++		OPENSSL_finish;
++	local:
++		*;
++};
++
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl/parallel.patch b/yocto-poky/meta/recipes-connectivity/openssl/openssl/parallel.patch
new file mode 100644
index 0000000..b6c2c14
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/openssl/openssl/parallel.patch
@@ -0,0 +1,326 @@
+Fix the parallel races in the Makefiles.
+
+This patch was taken from the Gentoo packaging:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2g-parallel-build.patch
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- openssl-1.0.2g/crypto/Makefile
++++ openssl-1.0.2g/crypto/Makefile
+@@ -85,11 +85,11 @@
+ 	@if [ -z "$(THIS)" ]; then $(MAKE) -f $(TOP)/Makefile reflect THIS=$@; fi
+ 
+ subdirs:
+-	@target=all; $(RECURSIVE_MAKE)
++	+@target=all; $(RECURSIVE_MAKE)
+ 
+ files:
+ 	$(PERL) $(TOP)/util/files.pl "CPUID_OBJ=$(CPUID_OBJ)" Makefile >> $(TOP)/MINFO
+-	@target=files; $(RECURSIVE_MAKE)
++	+@target=files; $(RECURSIVE_MAKE)
+ 
+ links:
+ 	@$(PERL) $(TOP)/util/mklink.pl ../include/openssl $(EXHEADER)
+@@ -100,7 +100,7 @@
+ # lib: $(LIB): are splitted to avoid end-less loop
+ lib:	$(LIB)
+ 	@touch lib
+-$(LIB):	$(LIBOBJ)
++$(LIB):	$(LIBOBJ) | subdirs
+ 	$(AR) $(LIB) $(LIBOBJ)
+ 	test -z "$(FIPSLIBDIR)" || $(AR) $(LIB) $(FIPSLIBDIR)fipscanister.o
+ 	$(RANLIB) $(LIB) || echo Never mind.
+@@ -111,7 +111,7 @@
+ 	fi
+ 
+ libs:
+-	@target=lib; $(RECURSIVE_MAKE)
++	+@target=lib; $(RECURSIVE_MAKE)
+ 
+ install:
+ 	@[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
+@@ -120,7 +120,7 @@
+ 	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+ 	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+ 	done;
+-	@target=install; $(RECURSIVE_MAKE)
++	+@target=install; $(RECURSIVE_MAKE)
+ 
+ lint:
+ 	@target=lint; $(RECURSIVE_MAKE)
+--- openssl-1.0.2g/engines/Makefile
++++ openssl-1.0.2g/engines/Makefile
+@@ -72,7 +72,7 @@
+ 
+ all:	lib subdirs
+ 
+-lib:	$(LIBOBJ)
++lib:	$(LIBOBJ) | subdirs
+ 	@if [ -n "$(SHARED_LIBS)" ]; then \
+ 		set -e; \
+ 		for l in $(LIBNAMES); do \
+@@ -89,7 +89,7 @@
+ 
+ subdirs:
+ 	echo $(EDIRS)
+-	@target=all; $(RECURSIVE_MAKE)
++	+@target=all; $(RECURSIVE_MAKE)
+ 
+ files:
+ 	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
+@@ -128,7 +128,7 @@
+ 			  mv -f $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx.new $(INSTALL_PREFIX)$(INSTALLTOP)/$(LIBDIR)/engines/$$pfx$$l$$sfx ); \
+ 		done; \
+ 	fi
+-	@target=install; $(RECURSIVE_MAKE)
++	+@target=install; $(RECURSIVE_MAKE)
+ 
+ tags:
+ 	ctags $(SRC)
+--- openssl-1.0.2g/Makefile.org
++++ openssl-1.0.2g/Makefile.org
+@@ -279,17 +279,17 @@
+ build_libssl: build_ssl libssl.pc
+ 
+ build_crypto:
+-	@dir=crypto; target=all; $(BUILD_ONE_CMD)
++	+@dir=crypto; target=all; $(BUILD_ONE_CMD)
+ build_ssl: build_crypto
+-	@dir=ssl; target=all; $(BUILD_ONE_CMD)
++	+@dir=ssl; target=all; $(BUILD_ONE_CMD)
+ build_engines: build_crypto
+-	@dir=engines; target=all; $(BUILD_ONE_CMD)
++	+@dir=engines; target=all; $(BUILD_ONE_CMD)
+ build_apps: build_libs
+-	@dir=apps; target=all; $(BUILD_ONE_CMD)
++	+@dir=apps; target=all; $(BUILD_ONE_CMD)
+ build_tests: build_libs
+-	@dir=test; target=all; $(BUILD_ONE_CMD)
++	+@dir=test; target=all; $(BUILD_ONE_CMD)
+ build_tools: build_libs
+-	@dir=tools; target=all; $(BUILD_ONE_CMD)
++	+@dir=tools; target=all; $(BUILD_ONE_CMD)
+ 
+ all_testapps: build_libs build_testapps
+ build_testapps:
+@@ -544,7 +544,7 @@
+ 	(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
+ 	chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
+ 	done;
+-	@set -e; target=install; $(RECURSIVE_BUILD_CMD)
++	+@set -e; target=install; $(RECURSIVE_BUILD_CMD)
+ 	@set -e; liblist="$(LIBS)"; for i in $$liblist ;\
+ 	do \
+ 		if [ -f "$$i" ]; then \
+--- openssl-1.0.2g/Makefile.shared
++++ openssl-1.0.2g/Makefile.shared
+@@ -105,6 +105,7 @@
+     SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
+     LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
+     LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
++    [ -e $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX ] && exit 0; \
+     LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
+     $${SHAREDCMD} $${SHAREDFLAGS} \
+ 	-o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
+@@ -122,6 +123,7 @@
+ 			done; \
+ 		fi; \
+ 		if [ -n "$$SHLIB_SOVER" ]; then \
++			[ -e "$$SHLIB$$SHLIB_SUFFIX" ] || \
+ 			( $(SET_X); rm -f $$SHLIB$$SHLIB_SUFFIX; \
+ 			  ln -s $$prev $$SHLIB$$SHLIB_SUFFIX ); \
+ 		fi; \
+--- openssl-1.0.2g/test/Makefile
++++ openssl-1.0.2g/test/Makefile
+@@ -139,7 +139,7 @@
+ tags:
+ 	ctags $(SRC)
+ 
+-tests:	exe apps $(TESTS)
++tests:	exe $(TESTS)
+ 
+ apps:
+ 	@(cd ..; $(MAKE) DIRS=apps all)
+@@ -421,130 +421,130 @@
+ 		link_app.$${shlib_target}
+ 
+ $(RSATEST)$(EXE_EXT): $(RSATEST).o $(DLIBCRYPTO)
+-	@target=$(RSATEST); $(BUILD_CMD)
++	+@target=$(RSATEST); $(BUILD_CMD)
+ 
+ $(BNTEST)$(EXE_EXT): $(BNTEST).o $(DLIBCRYPTO)
+-	@target=$(BNTEST); $(BUILD_CMD)
++	+@target=$(BNTEST); $(BUILD_CMD)
+ 
+ $(ECTEST)$(EXE_EXT): $(ECTEST).o $(DLIBCRYPTO)
+-	@target=$(ECTEST); $(BUILD_CMD)
++	+@target=$(ECTEST); $(BUILD_CMD)
+ 
+ $(EXPTEST)$(EXE_EXT): $(EXPTEST).o $(DLIBCRYPTO)
+-	@target=$(EXPTEST); $(BUILD_CMD)
++	+@target=$(EXPTEST); $(BUILD_CMD)
+ 
+ $(IDEATEST)$(EXE_EXT): $(IDEATEST).o $(DLIBCRYPTO)
+-	@target=$(IDEATEST); $(BUILD_CMD)
++	+@target=$(IDEATEST); $(BUILD_CMD)
+ 
+ $(MD2TEST)$(EXE_EXT): $(MD2TEST).o $(DLIBCRYPTO)
+-	@target=$(MD2TEST); $(BUILD_CMD)
++	+@target=$(MD2TEST); $(BUILD_CMD)
+ 
+ $(SHATEST)$(EXE_EXT): $(SHATEST).o $(DLIBCRYPTO)
+-	@target=$(SHATEST); $(BUILD_CMD)
++	+@target=$(SHATEST); $(BUILD_CMD)
+ 
+ $(SHA1TEST)$(EXE_EXT): $(SHA1TEST).o $(DLIBCRYPTO)
+-	@target=$(SHA1TEST); $(BUILD_CMD)
++	+@target=$(SHA1TEST); $(BUILD_CMD)
+ 
+ $(SHA256TEST)$(EXE_EXT): $(SHA256TEST).o $(DLIBCRYPTO)
+-	@target=$(SHA256TEST); $(BUILD_CMD)
++	+@target=$(SHA256TEST); $(BUILD_CMD)
+ 
+ $(SHA512TEST)$(EXE_EXT): $(SHA512TEST).o $(DLIBCRYPTO)
+-	@target=$(SHA512TEST); $(BUILD_CMD)
++	+@target=$(SHA512TEST); $(BUILD_CMD)
+ 
+ $(RMDTEST)$(EXE_EXT): $(RMDTEST).o $(DLIBCRYPTO)
+-	@target=$(RMDTEST); $(BUILD_CMD)
++	+@target=$(RMDTEST); $(BUILD_CMD)
+ 
+ $(MDC2TEST)$(EXE_EXT): $(MDC2TEST).o $(DLIBCRYPTO)
+-	@target=$(MDC2TEST); $(BUILD_CMD)
++	+@target=$(MDC2TEST); $(BUILD_CMD)
+ 
+ $(MD4TEST)$(EXE_EXT): $(MD4TEST).o $(DLIBCRYPTO)
+-	@target=$(MD4TEST); $(BUILD_CMD)
++	+@target=$(MD4TEST); $(BUILD_CMD)
+ 
+ $(MD5TEST)$(EXE_EXT): $(MD5TEST).o $(DLIBCRYPTO)
+-	@target=$(MD5TEST); $(BUILD_CMD)
++	+@target=$(MD5TEST); $(BUILD_CMD)
+ 
+ $(HMACTEST)$(EXE_EXT): $(HMACTEST).o $(DLIBCRYPTO)
+-	@target=$(HMACTEST); $(BUILD_CMD)
++	+@target=$(HMACTEST); $(BUILD_CMD)
+ 
+ $(WPTEST)$(EXE_EXT): $(WPTEST).o $(DLIBCRYPTO)
+-	@target=$(WPTEST); $(BUILD_CMD)
++	+@target=$(WPTEST); $(BUILD_CMD)
+ 
+ $(RC2TEST)$(EXE_EXT): $(RC2TEST).o $(DLIBCRYPTO)
+-	@target=$(RC2TEST); $(BUILD_CMD)
++	+@target=$(RC2TEST); $(BUILD_CMD)
+ 
+ $(BFTEST)$(EXE_EXT): $(BFTEST).o $(DLIBCRYPTO)
+-	@target=$(BFTEST); $(BUILD_CMD)
++	+@target=$(BFTEST); $(BUILD_CMD)
+ 
+ $(CASTTEST)$(EXE_EXT): $(CASTTEST).o $(DLIBCRYPTO)
+-	@target=$(CASTTEST); $(BUILD_CMD)
++	+@target=$(CASTTEST); $(BUILD_CMD)
+ 
+ $(RC4TEST)$(EXE_EXT): $(RC4TEST).o $(DLIBCRYPTO)
+-	@target=$(RC4TEST); $(BUILD_CMD)
++	+@target=$(RC4TEST); $(BUILD_CMD)
+ 
+ $(RC5TEST)$(EXE_EXT): $(RC5TEST).o $(DLIBCRYPTO)
+-	@target=$(RC5TEST); $(BUILD_CMD)
++	+@target=$(RC5TEST); $(BUILD_CMD)
+ 
+ $(DESTEST)$(EXE_EXT): $(DESTEST).o $(DLIBCRYPTO)
+-	@target=$(DESTEST); $(BUILD_CMD)
++	+@target=$(DESTEST); $(BUILD_CMD)
+ 
+ $(RANDTEST)$(EXE_EXT): $(RANDTEST).o $(DLIBCRYPTO)
+-	@target=$(RANDTEST); $(BUILD_CMD)
++	+@target=$(RANDTEST); $(BUILD_CMD)
+ 
+ $(DHTEST)$(EXE_EXT): $(DHTEST).o $(DLIBCRYPTO)
+-	@target=$(DHTEST); $(BUILD_CMD)
++	+@target=$(DHTEST); $(BUILD_CMD)
+ 
+ $(DSATEST)$(EXE_EXT): $(DSATEST).o $(DLIBCRYPTO)
+-	@target=$(DSATEST); $(BUILD_CMD)
++	+@target=$(DSATEST); $(BUILD_CMD)
+ 
+ $(METHTEST)$(EXE_EXT): $(METHTEST).o $(DLIBCRYPTO)
+-	@target=$(METHTEST); $(BUILD_CMD)
++	+@target=$(METHTEST); $(BUILD_CMD)
+ 
+ $(SSLTEST)$(EXE_EXT): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
+-	@target=$(SSLTEST); $(FIPS_BUILD_CMD)
++	+@target=$(SSLTEST); $(FIPS_BUILD_CMD)
+ 
+ $(ENGINETEST)$(EXE_EXT): $(ENGINETEST).o $(DLIBCRYPTO)
+-	@target=$(ENGINETEST); $(BUILD_CMD)
++	+@target=$(ENGINETEST); $(BUILD_CMD)
+ 
+ $(EVPTEST)$(EXE_EXT): $(EVPTEST).o $(DLIBCRYPTO)
+-	@target=$(EVPTEST); $(BUILD_CMD)
++	+@target=$(EVPTEST); $(BUILD_CMD)
+ 
+ $(EVPEXTRATEST)$(EXE_EXT): $(EVPEXTRATEST).o $(DLIBCRYPTO)
+-	@target=$(EVPEXTRATEST); $(BUILD_CMD)
++	+@target=$(EVPEXTRATEST); $(BUILD_CMD)
+ 
+ $(ECDSATEST)$(EXE_EXT): $(ECDSATEST).o $(DLIBCRYPTO)
+-	@target=$(ECDSATEST); $(BUILD_CMD)
++	+@target=$(ECDSATEST); $(BUILD_CMD)
+ 
+ $(ECDHTEST)$(EXE_EXT): $(ECDHTEST).o $(DLIBCRYPTO)
+-	@target=$(ECDHTEST); $(BUILD_CMD)
++	+@target=$(ECDHTEST); $(BUILD_CMD)
+ 
+ $(IGETEST)$(EXE_EXT): $(IGETEST).o $(DLIBCRYPTO)
+-	@target=$(IGETEST); $(BUILD_CMD)
++	+@target=$(IGETEST); $(BUILD_CMD)
+ 
+ $(JPAKETEST)$(EXE_EXT): $(JPAKETEST).o $(DLIBCRYPTO)
+-	@target=$(JPAKETEST); $(BUILD_CMD)
++	+@target=$(JPAKETEST); $(BUILD_CMD)
+ 
+ $(ASN1TEST)$(EXE_EXT): $(ASN1TEST).o $(DLIBCRYPTO)
+-	@target=$(ASN1TEST); $(BUILD_CMD)
++	+@target=$(ASN1TEST); $(BUILD_CMD)
+ 
+ $(SRPTEST)$(EXE_EXT): $(SRPTEST).o $(DLIBCRYPTO)
+-	@target=$(SRPTEST); $(BUILD_CMD)
++	+@target=$(SRPTEST); $(BUILD_CMD)
+ 
+ $(V3NAMETEST)$(EXE_EXT): $(V3NAMETEST).o $(DLIBCRYPTO)
+-	@target=$(V3NAMETEST); $(BUILD_CMD)
++	+@target=$(V3NAMETEST); $(BUILD_CMD)
+ 
+ $(HEARTBEATTEST)$(EXE_EXT): $(HEARTBEATTEST).o $(DLIBCRYPTO)
+-	@target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
++	+@target=$(HEARTBEATTEST); $(BUILD_CMD_STATIC)
+ 
+ $(CONSTTIMETEST)$(EXE_EXT): $(CONSTTIMETEST).o
+-	@target=$(CONSTTIMETEST) $(BUILD_CMD)
++	+@target=$(CONSTTIMETEST) $(BUILD_CMD)
+ 
+ $(VERIFYEXTRATEST)$(EXE_EXT): $(VERIFYEXTRATEST).o
+-	@target=$(VERIFYEXTRATEST) $(BUILD_CMD)
++	+@target=$(VERIFYEXTRATEST) $(BUILD_CMD)
+ 
+ $(CLIENTHELLOTEST)$(EXE_EXT): $(CLIENTHELLOTEST).o
+-	@target=$(CLIENTHELLOTEST) $(BUILD_CMD)
++	+@target=$(CLIENTHELLOTEST) $(BUILD_CMD)
+ 
+ $(SSLV2CONFTEST)$(EXE_EXT): $(SSLV2CONFTEST).o
+-	@target=$(SSLV2CONFTEST) $(BUILD_CMD)
++	+@target=$(SSLV2CONFTEST) $(BUILD_CMD)
+ 
+ #$(AESTEST).o: $(AESTEST).c
+ #	$(CC) -c $(CFLAGS) -DINTERMEDIATE_VALUE_KAT -DTRACE_KAT_MCT $(AESTEST).c
+@@ -557,7 +557,7 @@
+ #	fi
+ 
+ dummytest$(EXE_EXT): dummytest.o $(DLIBCRYPTO)
+-	@target=dummytest; $(BUILD_CMD)
++	+@target=dummytest; $(BUILD_CMD)
+ 
+ # DO NOT DELETE THIS LINE -- make depend depends on it.
+ 
\ No newline at end of file
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2d.bb b/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2d.bb
deleted file mode 100644
index 8defa5b..0000000
--- a/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2d.bb
+++ /dev/null
@@ -1,75 +0,0 @@
-require openssl.inc
-
-# For target side versions of openssl enable support for OCF Linux driver
-# if they are available.
-DEPENDS += "cryptodev-linux"
-
-CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=f9a8f968107345e0b75aa8c2ecaa7ec8"
-
-export DIRS = "crypto ssl apps engines"
-export OE_LDFLAGS="${LDFLAGS}"
-
-SRC_URI += "file://configure-targets.patch \
-            file://shared-libs.patch \
-            file://oe-ldflags.patch \
-            file://engines-install-in-libdir-ssl.patch \
-            file://debian1.0.2/block_diginotar.patch \
-            file://debian1.0.2/block_digicert_malaysia.patch \
-            file://debian/ca.patch \
-            file://debian/c_rehash-compat.patch \
-            file://debian/debian-targets.patch \
-            file://debian/man-dir.patch \
-            file://debian/man-section.patch \
-            file://debian/no-rpath.patch \
-            file://debian/no-symbolic.patch \
-            file://debian/pic.patch \
-            file://debian/version-script.patch \
-            file://openssl_fix_for_x32.patch \
-            file://fix-cipher-des-ede3-cfb1.patch \
-            file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \
-            file://find.pl \
-            file://openssl-fix-des.pod-error.patch \
-            file://Makefiles-ptest.patch \
-            file://ptest-deps.patch \
-            file://run-ptest \
-            file://crypto_use_bigint_in_x86-64_perl.patch \
-            file://openssl-1.0.2a-x32-asm.patch \
-            file://ptest_makefile_deps.patch  \
-            file://CVE-2015-3193-bn-asm-x86_64-mont5.pl-fix-carry-propagating-bug-CVE.patch \
-            file://CVE-2015-3194-1-Add-PSS-parameter-check.patch \
-            file://0001-Add-test-for-CVE-2015-3194.patch \
-            file://CVE-2015-3195-Fix-leak-with-ASN.1-combine.patch \
-            file://CVE-2015-3197.patch \
-            file://CVE-2016-0701_1.patch \
-            file://CVE-2016-0701_2.patch \
-           "
-
-SRC_URI[md5sum] = "38dd619b2e77cbac69b99f52a053d25a"
-SRC_URI[sha256sum] = "671c36487785628a703374c652ad2cebea45fa920ae5681515df25d9f2c9a8c8"
-
-PACKAGES =+ " \
-	${PN}-engines \
-	${PN}-engines-dbg \
-	"
-
-FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines"
-FILES_${PN}-engines-dbg = "${libdir}/ssl/engines/.debug"
-
-PARALLEL_MAKE = ""
-PARALLEL_MAKEINST = ""
-
-do_configure_prepend() {
-  cp ${WORKDIR}/find.pl ${S}/util/find.pl
-}
-
-# The crypto_use_bigint patch means that perl's bignum module needs to be
-# installed, but some distributions (for example Fedora 23) don't ship it by
-# default.  As the resulting error is very misleading check for bignum before
-# building.
-do_configure_prepend() {
-	if ! perl -Mbigint -e true; then
-		bbfatal "The perl module 'bignum' was not found but this is required to build openssl.  Please install this module (often packaged as perl-bignum) and re-run bitbake."
-	fi
-}
diff --git a/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2g.bb b/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2g.bb
new file mode 100644
index 0000000..290f129
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/openssl/openssl_1.0.2g.bb
@@ -0,0 +1,58 @@
+require openssl.inc
+
+# For target side versions of openssl enable support for OCF Linux driver
+# if they are available.
+DEPENDS += "cryptodev-linux"
+
+CFLAG += "-DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=27ffa5d74bb5a337056c14b2ef93fbf6"
+
+export DIRS = "crypto ssl apps engines"
+export OE_LDFLAGS="${LDFLAGS}"
+
+SRC_URI += "file://find.pl;subdir=${BP}/util/ \
+            file://run-ptest \
+            file://configure-targets.patch \
+            file://shared-libs.patch \
+            file://oe-ldflags.patch \
+            file://engines-install-in-libdir-ssl.patch \
+            file://debian1.0.2/block_diginotar.patch \
+            file://debian1.0.2/block_digicert_malaysia.patch \
+            file://debian/ca.patch \
+            file://debian/c_rehash-compat.patch \
+            file://debian/debian-targets.patch \
+            file://debian/man-dir.patch \
+            file://debian/man-section.patch \
+            file://debian/no-rpath.patch \
+            file://debian/no-symbolic.patch \
+            file://debian/pic.patch \
+            file://debian1.0.2/version-script.patch \
+            file://openssl_fix_for_x32.patch \
+            file://fix-cipher-des-ede3-cfb1.patch \
+            file://openssl-avoid-NULL-pointer-dereference-in-EVP_DigestInit_ex.patch \
+            file://openssl-fix-des.pod-error.patch \
+            file://Makefiles-ptest.patch \
+            file://ptest-deps.patch \
+            file://crypto_use_bigint_in_x86-64_perl.patch \
+            file://openssl-1.0.2a-x32-asm.patch \
+            file://ptest_makefile_deps.patch  \
+            file://configure-musl-target.patch \
+            file://parallel.patch \
+           "
+
+SRC_URI[md5sum] = "f3c710c045cdee5fd114feb69feba7aa"
+SRC_URI[sha256sum] = "b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33"
+
+PACKAGES =+ "${PN}-engines"
+FILES_${PN}-engines = "${libdir}/ssl/engines/*.so ${libdir}/engines"
+
+# The crypto_use_bigint patch means that perl's bignum module needs to be
+# installed, but some distributions (for example Fedora 23) don't ship it by
+# default.  As the resulting error is very misleading check for bignum before
+# building.
+do_configure_prepend() {
+	if ! perl -Mbigint -e true; then
+		bbfatal "The perl module 'bignum' was not found but this is required to build openssl.  Please install this module (often packaged as perl-bignum) and re-run bitbake."
+	fi
+}
diff --git a/yocto-poky/meta/recipes-connectivity/portmap/portmap_6.0.bb b/yocto-poky/meta/recipes-connectivity/portmap/portmap_6.0.bb
index e727fe3..999b4a9 100644
--- a/yocto-poky/meta/recipes-connectivity/portmap/portmap_6.0.bb
+++ b/yocto-poky/meta/recipes-connectivity/portmap/portmap_6.0.bb
@@ -1,5 +1,7 @@
 require portmap.inc
 
+DEPENDS_append_libc-musl = " libtirpc "
+
 PR = "r9"
 
 SRC_URI = "http://www.sourcefiles.org/Networking/Tools/Miscellanenous/portmap-6.0.tgz \
@@ -19,6 +21,8 @@
 CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS -DHOSTS_ACCESS"
 CFLAGS += "-Wall -Wstrict-prototypes -fPIC"
 EXTRA_OEMAKE += "'NO_TCP_WRAPPER=${@bb.utils.contains('PACKAGECONFIG', 'tcp-wrappers', '', '1', d)}'"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
+LDFLAGS_append_libc-musl = " -ltirpc "
 
 do_install() {
     install -d ${D}${mandir}/man8/ ${D}${base_sbindir} ${D}${sysconfdir}/init.d
diff --git a/yocto-poky/meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch b/yocto-poky/meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch
new file mode 100644
index 0000000..763e374
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/ppp/ppp/0001-Fix-build-with-musl.patch
@@ -0,0 +1,163 @@
+From 52a1e41d7541b2c936285844c59bd1be21797860 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 May 2015 14:57:05 -0700
+Subject: [PATCH] Fix build with musl
+
+There are several assumption about glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ include/net/ppp_defs.h                  | 2 ++
+ pppd/Makefile.linux                     | 2 +-
+ pppd/magic.h                            | 6 +++---
+ pppd/plugins/rp-pppoe/config.h          | 5 ++++-
+ pppd/plugins/rp-pppoe/plugin.c          | 1 -
+ pppd/plugins/rp-pppoe/pppoe-discovery.c | 8 ++++----
+ pppd/plugins/rp-pppoe/pppoe.h           | 2 +-
+ pppd/sys-linux.c                        | 3 ++-
+ 8 files changed, 17 insertions(+), 12 deletions(-)
+
+diff --git a/include/net/ppp_defs.h b/include/net/ppp_defs.h
+index b06eda5..dafa36c 100644
+--- a/include/net/ppp_defs.h
++++ b/include/net/ppp_defs.h
+@@ -38,6 +38,8 @@
+ #ifndef _PPP_DEFS_H_
+ #define _PPP_DEFS_H_
+ 
++#include <sys/time.h>
++
+ /*
+  * The basic PPP frame.
+  */
+diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
+index 8ab2102..d7e2564 100644
+--- a/pppd/Makefile.linux
++++ b/pppd/Makefile.linux
+@@ -126,7 +126,7 @@ LIBS	+= -lcrypt
+ #endif
+ 
+ ifdef USE_LIBUTIL
+-CFLAGS	+= -DHAVE_LOGWTMP=1
++#CFLAGS	+= -DHAVE_LOGWTMP=1
+ LIBS	+= -lutil
+ endif
+ 
+diff --git a/pppd/magic.h b/pppd/magic.h
+index c81213b..9d399e3 100644
+--- a/pppd/magic.h
++++ b/pppd/magic.h
+@@ -42,8 +42,8 @@
+  * $Id: magic.h,v 1.5 2003/06/11 23:56:26 paulus Exp $
+  */
+ 
+-void magic_init __P((void));	/* Initialize the magic number generator */
+-u_int32_t magic __P((void));	/* Returns the next magic number */
++void magic_init (void);	/* Initialize the magic number generator */
++u_int32_t magic (void);	/* Returns the next magic number */
+ 
+ /* Fill buffer with random bytes */
+-void random_bytes __P((unsigned char *buf, int len));
++void random_bytes (unsigned char *buf, int len);
+diff --git a/pppd/plugins/rp-pppoe/config.h b/pppd/plugins/rp-pppoe/config.h
+index 5703087..fff032e 100644
+--- a/pppd/plugins/rp-pppoe/config.h
++++ b/pppd/plugins/rp-pppoe/config.h
+@@ -78,8 +78,9 @@
+ #define HAVE_NET_IF_ARP_H 1
+ 
+ /* Define if you have the <net/ethernet.h> header file.  */
++#ifdef __GLIBC__
+ #define HAVE_NET_ETHERNET_H 1
+-
++#endif
+ /* Define if you have the <net/if.h> header file.  */
+ #define HAVE_NET_IF_H 1
+ 
+@@ -102,7 +103,9 @@
+ #define HAVE_NETPACKET_PACKET_H 1
+ 
+ /* Define if you have the <sys/cdefs.h> header file.  */
++#ifdef __GLIBC__
+ #define HAVE_SYS_CDEFS_H 1
++#endif
+ 
+ /* Define if you have the <sys/dlpi.h> header file.  */
+ /* #undef HAVE_SYS_DLPI_H */
+diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c
+index a8c2bb4..ca34d79 100644
+--- a/pppd/plugins/rp-pppoe/plugin.c
++++ b/pppd/plugins/rp-pppoe/plugin.c
+@@ -46,7 +46,6 @@ static char const RCSID[] =
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <signal.h>
+-#include <net/ethernet.h>
+ #include <net/if_arp.h>
+ #include <linux/ppp_defs.h>
+ #include <linux/if_pppox.h>
+diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c
+index 3d3bf4e..d42f619 100644
+--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
++++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
+@@ -27,10 +27,6 @@
+ #include <linux/if_packet.h>
+ #endif
+ 
+-#ifdef HAVE_NET_ETHERNET_H
+-#include <net/ethernet.h>
+-#endif
+-
+ #ifdef HAVE_ASM_TYPES_H
+ #include <asm/types.h>
+ #endif
+@@ -47,6 +43,10 @@
+ #include <net/if_arp.h>
+ #endif
+ 
++#ifndef __GLIBC__
++#define error(x...) fprintf(stderr, x)
++#endif
++
+ char *xstrdup(const char *s);
+ void usage(void);
+ 
+diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
+index 9ab2eee..75b9004 100644
+--- a/pppd/plugins/rp-pppoe/pppoe.h
++++ b/pppd/plugins/rp-pppoe/pppoe.h
+@@ -92,7 +92,7 @@ typedef unsigned long UINT32_t;
+ #ifdef HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+-#ifndef HAVE_SYS_DLPI_H
++#if !defined HAVE_SYS_DLPI_H && defined HAVE_NET_ETHERNET_H
+ #include <netinet/if_ether.h>
+ #endif
+ #endif
+diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
+index a105505..49b0273 100644
+--- a/pppd/sys-linux.c
++++ b/pppd/sys-linux.c
+@@ -112,7 +112,7 @@
+ #include <linux/types.h>
+ #include <linux/if.h>
+ #include <linux/if_arp.h>
+-#include <linux/route.h>
++/* #include <linux/route.h> */
+ #include <linux/if_ether.h>
+ #endif
+ #include <netinet/in.h>
+@@ -145,6 +145,7 @@
+ #endif
+ 
+ #ifdef INET6
++#include <net/route.h>
+ #ifndef _LINUX_IN6_H
+ /*
+  *    This is in linux/include/net/ipv6.h.
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-connectivity/ppp/ppp/fix-CVE-2015-3310.patch b/yocto-poky/meta/recipes-connectivity/ppp/ppp/fix-CVE-2015-3310.patch
index c9edb30..c5a0be8 100644
--- a/yocto-poky/meta/recipes-connectivity/ppp/ppp/fix-CVE-2015-3310.patch
+++ b/yocto-poky/meta/recipes-connectivity/ppp/ppp/fix-CVE-2015-3310.patch
@@ -3,6 +3,7 @@
 From: https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;bug=782450
 
 Upstream-Status: Backport
+CVE: CVE-2015-3310
 
 On systems with more than 65535 processes running, pppd aborts when
 sending a "start" accounting message to the RADIUS server because of a
diff --git a/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb b/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
index adc38e1..4437b5c 100644
--- a/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
+++ b/yocto-poky/meta/recipes-connectivity/ppp/ppp_2.4.7.bb
@@ -32,6 +32,9 @@
            file://fix-CVE-2015-3310.patch \
 "
 
+SRC_URI_append_libc-musl = "\
+           file://0001-Fix-build-with-musl.patch \
+"
 SRC_URI[md5sum] = "78818f40e6d33a1d1de68a1551f6595a"
 SRC_URI[sha256sum] = "02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30"
 
@@ -78,7 +81,6 @@
 CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options"
 PACKAGES =+ "${PN}-oa ${PN}-oe ${PN}-radius ${PN}-winbind ${PN}-minconn ${PN}-password ${PN}-l2tp ${PN}-tools"
 FILES_${PN}        = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd ${systemd_unitdir}/system/ppp@.service"
-FILES_${PN}-dbg += "${libdir}/pppd/${PV}/.debug"
 FILES_${PN}-oa       = "${libdir}/pppd/${PV}/pppoatm.so"
 FILES_${PN}-oe       = "${sbindir}/pppoe-discovery ${libdir}/pppd/${PV}/rp-pppoe.so"
 FILES_${PN}-radius   = "${libdir}/pppd/${PV}/radius.so ${libdir}/pppd/${PV}/radattr.so ${libdir}/pppd/${PV}/radrealms.so"
diff --git a/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.77.bb b/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.77.bb
deleted file mode 100644
index 916b9f2..0000000
--- a/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.77.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "name server information handler"
-DESCRIPTION = "Resolvconf is a framework for keeping track of the system's \
-information about currently available nameservers. It sets \
-itself up as the intermediary between programs that supply \
-nameserver information and programs that need nameserver \
-information."
-SECTION = "console/network"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
-AUTHOR = "Thomas Hood"
-HOMEPAGE = "http://packages.debian.org/resolvconf"
-RDEPENDS_${PN} = "bash"
-
-SRC_URI = "http://snapshot.debian.org/archive/debian/20150511T214718Z/pool/main/r/${BPN}/${BPN}_${PV}.tar.xz \
-           file://fix-path-for-busybox.patch \
-           file://99_resolvconf \
-          "
-
-SRC_URI[md5sum] = "7362d766e47bfc253500f42b30330d9f"
-SRC_URI[sha256sum] = "5a6e21e8ba6822a5f93075c8c8fe7977e34780ba551af51930d0b31fdd99ab56"
-
-inherit allarch
-
-do_compile () {
-	:
-}
-
-do_install () {
-	install -d ${D}${sysconfdir}/default/volatiles
-	install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
-	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-		install -d ${D}${sysconfdir}/tmpfiles.d
-		echo "d /run/${BPN}/interface - - - -" \
-		     > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
-	fi
-	install -d ${D}${base_libdir}/${BPN}
-	install -d ${D}${sysconfdir}/${BPN}
-	ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
-	install -d ${D}${sysconfdir} ${D}${base_sbindir}
-	install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
-	cp -pPR etc/* ${D}${sysconfdir}/
-	chown -R root:root ${D}${sysconfdir}/
-	install -m 0755 bin/resolvconf ${D}${base_sbindir}/
-	install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
-	install -d ${D}/${sysconfdir}/network/if-up.d
-	install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
-	install -d ${D}/${sysconfdir}/network/if-down.d
-	install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
-	install -m 0644 README ${D}${docdir}/${P}/
-	install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
-}
-
-pkg_postinst_${PN} () {
-	if [ -z "$D" ]; then
-		if command -v systemd-tmpfiles >/dev/null; then
-			systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf
-		elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
-			${sysconfdir}/init.d/populate-volatile.sh update
-		fi
-	fi
-}
-
-FILES_${PN} += "${base_libdir}/${BPN}"
diff --git a/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.78.bb b/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.78.bb
new file mode 100644
index 0000000..f4c5851
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/resolvconf/resolvconf_1.78.bb
@@ -0,0 +1,67 @@
+SUMMARY = "name server information handler"
+DESCRIPTION = "Resolvconf is a framework for keeping track of the system's \
+information about currently available nameservers. It sets \
+itself up as the intermediary between programs that supply \
+nameserver information and programs that need nameserver \
+information."
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
+AUTHOR = "Thomas Hood"
+HOMEPAGE = "http://packages.debian.org/resolvconf"
+RDEPENDS_${PN} = "bash"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20150828T220730Z/pool/main/r/${BPN}/${BPN}_1.78.tar.xz \
+           file://fix-path-for-busybox.patch \
+           file://99_resolvconf \
+          "
+
+SRC_URI[md5sum] = "373a9f9544c84aa477a7425ae773b8b5"
+SRC_URI[sha256sum] = "961b22e8fcf0c7de7e90a050323e6fa221bc8b25a5348c160be3506f7e73a7a3"
+
+# 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/r/resolvconf/"
+
+inherit allarch
+
+do_compile () {
+	:
+}
+
+do_install () {
+	install -d ${D}${sysconfdir}/default/volatiles
+	install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+		install -d ${D}${sysconfdir}/tmpfiles.d
+		echo "d /run/${BPN}/interface - - - -" \
+		     > ${D}${sysconfdir}/tmpfiles.d/resolvconf.conf
+	fi
+	install -d ${D}${base_libdir}/${BPN}
+	install -d ${D}${sysconfdir}/${BPN}
+	ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run
+	install -d ${D}${sysconfdir} ${D}${base_sbindir}
+	install -d ${D}${mandir}/man8 ${D}${docdir}/${P}
+	cp -pPR etc/* ${D}${sysconfdir}/
+	chown -R root:root ${D}${sysconfdir}/
+	install -m 0755 bin/resolvconf ${D}${base_sbindir}/
+	install -m 0755 bin/list-records ${D}${base_libdir}/${BPN}
+	install -d ${D}/${sysconfdir}/network/if-up.d
+	install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf
+	install -d ${D}/${sysconfdir}/network/if-down.d
+	install -m 0755 debian/resolvconf.resolvconf.if-down ${D}/${sysconfdir}/network/if-down.d/resolvconf
+	install -m 0644 README ${D}${docdir}/${P}/
+	install -m 0644 man/resolvconf.8 ${D}${mandir}/man8/
+}
+
+pkg_postinst_${PN} () {
+	if [ -z "$D" ]; then
+		if command -v systemd-tmpfiles >/dev/null; then
+			systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/resolvconf.conf
+		elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+			${sysconfdir}/init.d/populate-volatile.sh update
+		fi
+	fi
+}
+
+FILES_${PN} += "${base_libdir}/${BPN}"
diff --git a/yocto-poky/meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch b/yocto-poky/meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch
new file mode 100644
index 0000000..c0e27f3
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/socat/socat/0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch
@@ -0,0 +1,52 @@
+From fb10ab134d630705cae0c7be42437cc289af7d32 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 15 Mar 2016 21:36:02 +0000
+Subject: [PATCH] Use __c_ispeed and __c_ospeed on musl
+
+Original intention of these asserts is to find if termios structure
+is mapped correctly to locally define union, the get* APIs for
+baudrate would not do the right thing since they do not return the
+value from c_ospeed/c_ispeed but the value which is stored in iflag
+for baudrate.
+
+So we check if we are on Linux but not using glibc then we use
+__c_ispeed and __c_ospeed as defined in musl, however these are
+internal elements of structs it should not have been used this
+way.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+Upstream-Status: Pending
+
+ xioinitialize.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/xioinitialize.c b/xioinitialize.c
+index 9f50155..8fb2e4c 100644
+--- a/xioinitialize.c
++++ b/xioinitialize.c
+@@ -65,6 +65,12 @@ int xioinitialize(void) {
+ #if HAVE_TERMIOS_ISPEED && (ISPEED_OFFSET != -1) && (OSPEED_OFFSET != -1)
+ #if defined(ISPEED_OFFSET) && (ISPEED_OFFSET != -1)
+ #if defined(OSPEED_OFFSET) && (OSPEED_OFFSET != -1)
++#if defined(__linux__) && !defined(__GLIBC__)
++      tdata.termarg.__c_ispeed = 0x56789abc;
++      tdata.termarg.__c_ospeed = 0x6789abcd;
++      assert(tdata.termarg.__c_ispeed == tdata.speeds[ISPEED_OFFSET]);
++      assert(tdata.termarg.__c_ospeed == tdata.speeds[OSPEED_OFFSET]);
++#else
+       tdata.termarg.c_ispeed = 0x56789abc;
+       tdata.termarg.c_ospeed = 0x6789abcd;
+       assert(tdata.termarg.c_ispeed == tdata.speeds[ISPEED_OFFSET]);
+@@ -72,6 +78,7 @@ int xioinitialize(void) {
+ #endif
+ #endif
+ #endif
++#endif
+    }
+ #endif
+ 
+-- 
+2.8.0
+
diff --git a/yocto-poky/meta/recipes-connectivity/socat/socat/0001-define-NETDB_INTERNAL-to-1-if-not-available.patch b/yocto-poky/meta/recipes-connectivity/socat/socat/0001-define-NETDB_INTERNAL-to-1-if-not-available.patch
new file mode 100644
index 0000000..4bbd367
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/socat/socat/0001-define-NETDB_INTERNAL-to-1-if-not-available.patch
@@ -0,0 +1,32 @@
+From e6a7d96fa3675bdd3f4d7a3d7682381789eef22f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 15 Feb 2016 20:25:34 +0000
+Subject: [PATCH] define NETDB_INTERNAL to -1 if not available
+
+helps build with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ compat.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/compat.h b/compat.h
+index c8bee4d..bfb013a 100644
+--- a/compat.h
++++ b/compat.h
+@@ -666,6 +666,10 @@ typedef int sig_atomic_t;
+ #  define NETDB_INTERNAL h_NETDB_INTERNAL
+ #endif
+ 
++#if !defined(NETDB_INTERNAL)
++#  define NETDB_INTERNAL (-1)
++#endif
++
+ #ifndef INET_ADDRSTRLEN
+ #  define INET_ADDRSTRLEN sizeof(struct sockaddr_in)
+ #endif
+-- 
+2.7.1
+
diff --git a/yocto-poky/meta/recipes-connectivity/socat/socat/CVE-2016-2217.patch b/yocto-poky/meta/recipes-connectivity/socat/socat/CVE-2016-2217.patch
deleted file mode 100644
index 0cd4179..0000000
--- a/yocto-poky/meta/recipes-connectivity/socat/socat/CVE-2016-2217.patch
+++ /dev/null
@@ -1,372 +0,0 @@
-Upstream-Status: Backport
-
-http://www.dest-unreach.org/socat/download/socat-1.7.3.1.patch 
-
-CVE: CVE-2016-2217
-[Yocto # 9024]
-Singed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: socat-1.7.3.0/CHANGES
-===================================================================
---- socat-1.7.3.0.orig/CHANGES
-+++ socat-1.7.3.0/CHANGES
-@@ -1,8 +1,39 @@
- 
-+####################### V 1.7.3.1:
-+
-+security:
-+	Socat security advisory 8
-+	A stack overflow in vulnerability was found that can be triggered when
-+	command line arguments (complete address specifications, host names,
-+	file names) are longer than 512 bytes.
-+	Successful exploitation might allow an attacker to execute arbitrary
-+	code with the privileges of the socat process.
-+	This vulnerability can only be exploited when an attacker is able to
-+	inject data into socat's command line.
-+	A vulnerable scenario would be a CGI script that reads data from clients
-+	and uses (parts of) this data as hostname for a Socat invocation.
-+	Test: NESTEDOVFL
-+	Credits to Takumi Akiyama for finding and reporting this issue.
-+
-+	Socat security advisory 7
-+	MSVR-1499
-+	In the OpenSSL address implementation the hard coded 1024 bit DH p
-+	parameter was not prime. The effective cryptographic strength of a key
-+	exchange using these parameters was weaker than the one one could get by
-+	using a prime p. Moreover, since there is no indication of how these
-+	parameters were chosen, the existence of a trapdoor that makes possible
-+	for an eavesdropper to recover the shared secret from a key exchange
-+	that uses them cannot be ruled out.
-+	Futhermore, 1024bit is not considered sufficiently secure.
-+	Fix: generated a new 2048bit prime.
-+	Thanks to Santiago Zanella-Beguelin and Microsoft Vulnerability
-+	Research (MSVR) for finding and reporting this issue.
-+
- ####################### V 1.7.3.0:
- 
- security:
--	(CVE Id pending)
-+	Socat security advisory 6
-+	CVE-2015-1379: Possible DoS with fork
- 	Fixed problems with signal handling caused by use of not async signal
- 	safe functions in signal handlers that could freeze socat, allowing
- 	denial of service attacks.
-@@ -240,6 +271,7 @@ docu:
- ####################### V 1.7.2.3:
- 
- security:
-+	Socat security advisory 5
- 	CVE-2014-0019: socats PROXY-CONNECT address was vulnerable to a buffer
- 	overflow with data from command line (see socat-secadv5.txt)
- 	Credits to Florian Weimer of the Red Hat Product Security Team
-@@ -247,6 +279,7 @@ security:
- ####################### V 1.7.2.2:
- 
- security:
-+	Socat security advisory 4
- 	CVE-2013-3571:
- 	after refusing a client connection due to bad source address or source
- 	port socat shutdown() the socket but did not close() it, resulting in
-@@ -258,6 +291,7 @@ security:
- ####################### V 1.7.2.1:
- 
- security:
-+	Socat security advisory 3
- 	CVE-2012-0219:
- 	fixed a possible heap buffer overflow in the readline address. This bug
- 	could be exploited when all of the following conditions were met:
-@@ -391,6 +425,7 @@ docu:
- ####################### V 1.7.1.3:
- 
- security:
-+	Socat security advisory 2
- 	CVE-2010-2799:
- 	fixed a stack overflow vulnerability that occurred when command
- 	line arguments (whole addresses, host names, file names) were longer
-@@ -892,6 +927,7 @@ further corrections:
- ####################### V 1.4.0.3:
- 
- security:
-+	Socat security advisory 1
- 	CVE-2004-1484:
- 	fix to a syslog() based format string vulnerability that can lead to
- 	remote code execution. See advisory socat-adv-1.txt
-Index: socat-1.7.3.0/VERSION
-===================================================================
---- socat-1.7.3.0.orig/VERSION
-+++ socat-1.7.3.0/VERSION
-@@ -1 +1 @@
--"1.7.3.0"
-+"1.7.3.1"
-Index: socat-1.7.3.0/nestlex.c
-===================================================================
---- socat-1.7.3.0.orig/nestlex.c
-+++ socat-1.7.3.0/nestlex.c
-@@ -1,5 +1,5 @@
- /* source: nestlex.c */
--/* Copyright Gerhard Rieger 2006-2010 */
-+/* Copyright Gerhard Rieger */
- /* Published under the GNU General Public License V.2, see file COPYING */
- 
- /* a function for lexical scanning of nested character patterns */
-@@ -9,6 +9,17 @@
- 
- #include "sysincludes.h"
- 
-+static int _nestlex(const char **addr,
-+		    char **token,
-+		    ptrdiff_t *len,
-+		    const char *ends[],
-+		    const char *hquotes[],
-+		    const char *squotes[],
-+		    const char *nests[],
-+		    bool dropquotes,
-+		    bool c_esc,
-+		    bool html_esc
-+		    );
- 
- /* sub: scan a string and copy its value to output string
-    end scanning when an unescaped, unnested string from ends array is found
-@@ -33,6 +44,22 @@ int nestlex(const char **addr,	/* input
- 	    bool c_esc,		/* solve C char escapes: \n \t \0 etc */
- 	    bool html_esc	/* solve HTML char escapes: %0d %08 etc */
- 	    ) {
-+   return
-+      _nestlex(addr, token, (ptrdiff_t *)len, ends, hquotes, squotes, nests,
-+	       dropquotes, c_esc, html_esc);
-+}
-+
-+static int _nestlex(const char **addr,
-+		    char **token,
-+		    ptrdiff_t *len,
-+		    const char *ends[],
-+		    const char *hquotes[],
-+		    const char *squotes[],
-+		    const char *nests[],
-+		    bool dropquotes,
-+		    bool c_esc,
-+		    bool html_esc
-+		    ) {
-    const char *in = *addr;	/* pointer into input string */
-    const char **endx;	/* loops over end patterns */
-    const char **quotx;	/* loops over quote patterns */
-@@ -77,16 +104,18 @@ int nestlex(const char **addr,	/* input
- 		  if (--*len <= 0) { *addr = in; *token = out; return -1; }
- 	       }
- 	    }
--	    /* we call nestlex recursively */
-+	    /* we call _nestlex recursively */
- 	    endnest[0] = *quotx;
- 	    endnest[1] = NULL;
- 	    result =
--	       nestlex(&in, &out, len, endnest, NULL/*hquotes*/,
-+	       _nestlex(&in, &out, len, endnest, NULL/*hquotes*/,
- 		       NULL/*squotes*/, NULL/*nests*/,
- 		       false, c_esc, html_esc);
- 	    if (result == 0 && dropquotes) {
- 	       /* we strip this quote */
- 	       in += strlen(*quotx);
-+	    } else if (result < 0) {
-+	       *addr = in; *token = out; return result;
- 	    } else {
- 	       /* we copy the trailing quote */
- 	       for (i = strlen(*quotx); i > 0; --i) {
-@@ -110,7 +139,7 @@ int nestlex(const char **addr,	/* input
- 	 if (!strncmp(in, *quotx, strlen(*quotx))) {
- 	    /* this quote pattern matches */
- 	    /* we strip this quote */
--	    /* we call nestlex recursively */
-+	    /* we call _nestlex recursively */
- 	    const char *endnest[2];
- 	    if (dropquotes) {
- 	       /* we strip this quote */
-@@ -124,13 +153,15 @@ int nestlex(const char **addr,	/* input
- 	    endnest[0] = *quotx;
- 	    endnest[1] = NULL;
- 	    result =
--	       nestlex(&in, &out, len, endnest, hquotes,
-+	       _nestlex(&in, &out, len, endnest, hquotes,
- 		       squotes, nests,
- 		       false, c_esc, html_esc);
- 
- 	    if (result == 0 && dropquotes) {
- 	       /* we strip the trailing quote */
- 	       in += strlen(*quotx);
-+	    } else if (result < 0) {
-+	       *addr = in; *token = out; return result;
- 	    } else {
- 	       /* we copy the trailing quote */
- 	       for (i = strlen(*quotx); i > 0; --i) {
-@@ -162,7 +193,7 @@ int nestlex(const char **addr,	/* input
- 	    }
- 
- 	    result =
--	       nestlex(&in, &out, len, endnest, hquotes, squotes, nests,
-+	       _nestlex(&in, &out, len, endnest, hquotes, squotes, nests,
- 		       false, c_esc, html_esc);
- 	    if (result == 0) {
- 	       /* copy endnest */
-@@ -175,6 +206,8 @@ int nestlex(const char **addr,	/* input
- 		  }
- 		  --i;
- 	       }
-+	    } else if (result < 0) {
-+	       *addr = in; *token = out; return result;
- 	    }
- 	    break;
- 	 }
-@@ -211,7 +244,7 @@ int nestlex(const char **addr,	/* input
- 	 }
- 	 *out++ = c;
- 	 --*len;
--	 if (*len == 0) {
-+	 if (*len <= 0) {
- 	    *addr = in;
- 	    *token = out;
- 	    return -1;	/* output overflow */
-@@ -222,7 +255,7 @@ int nestlex(const char **addr,	/* input
-       /* just a simple char */
-       *out++ = c;
-       --*len;
--      if (*len == 0) {
-+      if (*len <= 0) {
- 	 *addr = in;
- 	 *token = out;
- 	 return -1;	/* output overflow */
-Index: socat-1.7.3.0/nestlex.h
-===================================================================
---- socat-1.7.3.0.orig/nestlex.h
-+++ socat-1.7.3.0/nestlex.h
-@@ -1,5 +1,5 @@
- /* source: nestlex.h */
--/* Copyright Gerhard Rieger 2006 */
-+/* Copyright Gerhard Rieger */
- /* Published under the GNU General Public License V.2, see file COPYING */
- 
- #ifndef __nestlex_h_included
-Index: socat-1.7.3.0/socat.spec
-===================================================================
---- socat-1.7.3.0.orig/socat.spec
-+++ socat-1.7.3.0/socat.spec
-@@ -1,6 +1,6 @@
- 
- %define majorver 1.7
--%define minorver 3.0
-+%define minorver 3.1
- 
- Summary: socat - multipurpose relay
- Name: socat
-Index: socat-1.7.3.0/test.sh
-===================================================================
---- socat-1.7.3.0.orig/test.sh
-+++ socat-1.7.3.0/test.sh
-@@ -2266,8 +2266,8 @@ gentestcert () {
- gentestdsacert () {
-     local name="$1"
-     if [ -s $name.key -a -s $name.crt -a -s $name.pem ]; then return; fi
--    openssl dsaparam -out $name-dsa.pem 512 >/dev/null 2>&1
--    openssl dhparam -dsaparam -out $name-dh.pem 512 >/dev/null 2>&1
-+    openssl dsaparam -out $name-dsa.pem 1024 >/dev/null 2>&1
-+    openssl dhparam -dsaparam -out $name-dh.pem 1024 >/dev/null 2>&1
-     openssl req -newkey dsa:$name-dsa.pem -keyout $name.key -nodes -x509 -config $TESTCERT_CONF -out $name.crt -days 3653 >/dev/null 2>&1
-     cat $name-dsa.pem $name-dh.pem $name.key $name.crt >$name.pem
- }
-@@ -10973,6 +10973,42 @@ CMD0="$TRACE $SOCAT $opts OPENSSL:localh
- printf "test $F_n $TEST... " $N
- $CMD0 </dev/null 1>&0 2>"${te}0"
- rc0=$?
-+if [ $rc0 -lt 128 ] || [ $rc0 -eq 255 ]; then
-+    $PRINTF "$OK\n"
-+    numOK=$((numOK+1))
-+else
-+    $PRINTF "$FAILED\n"
-+    echo "$CMD0"
-+    cat "${te}0"
-+    numFAIL=$((numFAIL+1))
-+    listFAIL="$listFAIL $N"
-+fi
-+fi # NUMCOND
-+ ;;
-+esac
-+PORT=$((PORT+1))
-+N=$((N+1))
-+
-+# socat up to 1.7.3.0 had a stack overflow vulnerability that occurred when
-+# command line arguments (whole addresses, host names, file names) were longer
-+# than 512 bytes and specially crafted.
-+NAME=NESTEDOVFL
-+case "$TESTS" in
-+*%$N%*|*%functions%*|*%bugs%*|*%security%*|*%exec%*|*%$NAME%*)
-+TEST="$NAME: stack overflow on overly long nested arg"
-+# provide a long host name to TCP-CONNECT and check socats exit code
-+if ! eval $NUMCOND; then :; else
-+tf="$td/test$N.stdout"
-+te="$td/test$N.stderr"
-+tdiff="$td/test$N.diff"
-+da="test$N $(date) $RANDOM"
-+# prepare long data - perl might not be installed
-+rm -f "$td/test$N.dat"
-+i=0; while [ $i -lt 64 ]; do  echo -n "AAAAAAAAAAAAAAAA" >>"$td/test$N.dat"; i=$((i+1)); done
-+CMD0="$TRACE $SOCAT $opts EXEC:[$(cat "$td/test$N.dat")] STDIO"
-+printf "test $F_n $TEST... " $N
-+$CMD0 </dev/null 1>&0 2>"${te}0"
-+rc0=$?
- if [ $rc0 -lt 128 ] || [ $rc0 -eq 255 ]; then
-     $PRINTF "$OK\n"
-     numOK=$((numOK+1))
-Index: socat-1.7.3.0/xio-openssl.c
-===================================================================
---- socat-1.7.3.0.orig/xio-openssl.c
-+++ socat-1.7.3.0/xio-openssl.c
-@@ -912,20 +912,27 @@ int
-    }
- 
-    {
--      static unsigned char dh1024_p[] = {
--	 0xCC,0x17,0xF2,0xDC,0x96,0xDF,0x59,0xA4,0x46,0xC5,0x3E,0x0E,
--	 0xB8,0x26,0x55,0x0C,0xE3,0x88,0xC1,0xCE,0xA7,0xBC,0xB3,0xBF,
--	 0x16,0x94,0xD8,0xA9,0x45,0xA2,0xCE,0xA9,0x5B,0x22,0x25,0x5F,
--	 0x92,0x59,0x94,0x1C,0x22,0xBF,0xCB,0xC8,0xC8,0x57,0xCB,0xBF,
--	 0xBC,0x0E,0xE8,0x40,0xF9,0x87,0x03,0xBF,0x60,0x9B,0x08,0xC6,
--	 0x8E,0x99,0xC6,0x05,0xFC,0x00,0xD6,0x6D,0x90,0xA8,0xF5,0xF8,
--	 0xD3,0x8D,0x43,0xC8,0x8F,0x7A,0xBD,0xBB,0x28,0xAC,0x04,0x69,
--	 0x4A,0x0B,0x86,0x73,0x37,0xF0,0x6D,0x4F,0x04,0xF6,0xF5,0xAF,
--	 0xBF,0xAB,0x8E,0xCE,0x75,0x53,0x4D,0x7F,0x7D,0x17,0x78,0x0E,
--	 0x12,0x46,0x4A,0xAF,0x95,0x99,0xEF,0xBC,0xA6,0xC5,0x41,0x77,
--	 0x43,0x7A,0xB9,0xEC,0x8E,0x07,0x3C,0x6D,
-+      static unsigned char dh2048_p[] = {
-+	 0x00,0xdc,0x21,0x64,0x56,0xbd,0x9c,0xb2,0xac,0xbe,0xc9,0x98,0xef,0x95,0x3e,
-+	 0x26,0xfa,0xb5,0x57,0xbc,0xd9,0xe6,0x75,0xc0,0x43,0xa2,0x1c,0x7a,0x85,0xdf,
-+	 0x34,0xab,0x57,0xa8,0xf6,0xbc,0xf6,0x84,0x7d,0x05,0x69,0x04,0x83,0x4c,0xd5,
-+	 0x56,0xd3,0x85,0x09,0x0a,0x08,0xff,0xb5,0x37,0xa1,0xa3,0x8a,0x37,0x04,0x46,
-+	 0xd2,0x93,0x31,0x96,0xf4,0xe4,0x0d,0x9f,0xbd,0x3e,0x7f,0x9e,0x4d,0xaf,0x08,
-+	 0xe2,0xe8,0x03,0x94,0x73,0xc4,0xdc,0x06,0x87,0xbb,0x6d,0xae,0x66,0x2d,0x18,
-+	 0x1f,0xd8,0x47,0x06,0x5c,0xcf,0x8a,0xb5,0x00,0x51,0x57,0x9b,0xea,0x1e,0xd8,
-+	 0xdb,0x8e,0x3c,0x1f,0xd3,0x2f,0xba,0x1f,0x5f,0x3d,0x15,0xc1,0x3b,0x2c,0x82,
-+	 0x42,0xc8,0x8c,0x87,0x79,0x5b,0x38,0x86,0x3a,0xeb,0xfd,0x81,0xa9,0xba,0xf7,
-+	 0x26,0x5b,0x93,0xc5,0x3e,0x03,0x30,0x4b,0x00,0x5c,0xb6,0x23,0x3e,0xea,0x94,
-+	 0xc3,0xb4,0x71,0xc7,0x6e,0x64,0x3b,0xf8,0x92,0x65,0xad,0x60,0x6c,0xd4,0x7b,
-+	 0xa9,0x67,0x26,0x04,0xa8,0x0a,0xb2,0x06,0xeb,0xe0,0x7d,0x90,0xdd,0xdd,0xf5,
-+	 0xcf,0xb4,0x11,0x7c,0xab,0xc1,0xa3,0x84,0xbe,0x27,0x77,0xc7,0xde,0x20,0x57,
-+	 0x66,0x47,0xa7,0x35,0xfe,0x0d,0x6a,0x1c,0x52,0xb8,0x58,0xbf,0x26,0x33,0x81,
-+	 0x5e,0xb7,0xa9,0xc0,0xee,0x58,0x11,0x74,0x86,0x19,0x08,0x89,0x1c,0x37,0x0d,
-+	 0x52,0x47,0x70,0x75,0x8b,0xa8,0x8b,0x30,0x11,0x71,0x36,0x62,0xf0,0x73,0x41,
-+	 0xee,0x34,0x9d,0x0a,0x2b,0x67,0x4e,0x6a,0xa3,0xe2,0x99,0x92,0x1b,0xf5,0x32,
-+	 0x73,0x63
-       };
--      static unsigned char dh1024_g[] = {
-+      static unsigned char dh2048_g[] = {
- 	 0x02,
-       };
-       DH *dh;
-@@ -938,8 +945,8 @@ int
- 	 }
- 	 Error("DH_new() failed");
-       } else {
--	 dh->p = BN_bin2bn(dh1024_p, sizeof(dh1024_p), NULL);
--	 dh->g = BN_bin2bn(dh1024_g, sizeof(dh1024_g), NULL);
-+	 dh->p = BN_bin2bn(dh2048_p, sizeof(dh2048_p), NULL);
-+	 dh->g = BN_bin2bn(dh2048_g, sizeof(dh2048_g), NULL);
- 	 if ((dh->p == NULL) || (dh->g == NULL)) {
- 	    while (err = ERR_get_error()) {
- 	       Warn1("BN_bin2bn(): %s",
diff --git a/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.0.bb b/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.0.bb
deleted file mode 100644
index 6d76d0f..0000000
--- a/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.0.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "Multipurpose relay for bidirectional data transfer"
-DESCRIPTION = "Socat is a relay for bidirectional data \
-transfer between two independent data channels."
-HOMEPAGE = "http://www.dest-unreach.org/socat/"
-
-SECTION = "console/network"
-
-DEPENDS = "openssl readline"
-
-LICENSE = "GPL-2.0+-with-OpenSSL-exception"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://README;beginline=257;endline=287;md5=338c05eadd013872abb1d6e198e10a3f"
-
-
-SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
-           file://Makefile.in-fix-for-parallel-build.patch \
-           file://CVE-2016-2217.patch \
-"
-
-SRC_URI[md5sum] = "b607edb65bc6c57f4a43f06247504274"
-SRC_URI[sha256sum] = "0767e850c0329b9fdf711c6cd468565cbbb28786ba1a8a1cbd5531d4016b3e04"
-
-inherit autotools
-
-EXTRA_AUTORECONF += "--exclude=autoheader"
-
-EXTRA_OECONF += "ac_cv_have_z_modifier=yes sc_cv_sys_crdly_shift=9 \
-        sc_cv_sys_tabdly_shift=11 sc_cv_sys_csize_shift=4 \
-        ac_cv_ispeed_offset=13 \
-        ac_cv_header_bsd_libutil_h=no \
-"
-
-PACKAGECONFIG ??= "tcp-wrappers"
-PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
-
-do_install_prepend () {
-    mkdir -p ${D}${bindir}
-    install -d ${D}${bindir} ${D}${mandir}/man1
-}
diff --git a/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.1.bb b/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.1.bb
new file mode 100644
index 0000000..6da9a17
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/socat/socat_1.7.3.1.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Multipurpose relay for bidirectional data transfer"
+DESCRIPTION = "Socat is a relay for bidirectional data \
+transfer between two independent data channels."
+HOMEPAGE = "http://www.dest-unreach.org/socat/"
+
+SECTION = "console/network"
+
+DEPENDS = "openssl readline"
+
+LICENSE = "GPL-2.0+-with-OpenSSL-exception"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://README;beginline=257;endline=287;md5=338c05eadd013872abb1d6e198e10a3f"
+
+
+SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
+           file://Makefile.in-fix-for-parallel-build.patch \
+           file://0001-define-NETDB_INTERNAL-to-1-if-not-available.patch \
+           file://0001-Access-c_ispeed-and-c_ospeed-via-APIs.patch \
+"
+
+SRC_URI[md5sum] = "334e46924f2b386299c9db2ac22bcd36"
+SRC_URI[sha256sum] = "d2da659540c38139f388e9437bfaae16bb458d174d056cb3228432a8f489fbaa"
+
+inherit autotools
+
+EXTRA_AUTORECONF += "--exclude=autoheader"
+
+EXTRA_OECONF += "ac_cv_have_z_modifier=yes sc_cv_sys_crdly_shift=9 \
+        sc_cv_sys_tabdly_shift=11 sc_cv_sys_csize_shift=4 \
+        ac_cv_ispeed_offset=13 \
+        ac_cv_header_bsd_libutil_h=no \
+"
+
+PACKAGECONFIG ??= "tcp-wrappers"
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+
+do_install_prepend () {
+    mkdir -p ${D}${bindir}
+    install -d ${D}${bindir} ${D}${mandir}/man1
+}
diff --git a/yocto-poky/meta/recipes-connectivity/wireless-tools/wireless-tools/wireless-tools.if-pre-up b/yocto-poky/meta/recipes-connectivity/wireless-tools/wireless-tools/wireless-tools.if-pre-up
deleted file mode 100755
index 2518a5c..0000000
--- a/yocto-poky/meta/recipes-connectivity/wireless-tools/wireless-tools/wireless-tools.if-pre-up
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/bin/sh
-
-case "$METHOD" in loopback) exit 0 ;; esac
-
-IWCONFIG=/sbin/iwconfig
-IWPRIV=/sbin/iwpriv
-
-if [ ! -x $IWCONFIG ]; then
-  exit 0
-fi
-
-# Detect and do nothing for linux-wlan-ng interfaces;
-# which are configured by thier own if-pre-up script.
-if [ -n "$IF_WIRELESS_TYPE" -a "$IF_WIRELESS_TYPE" = "wlan-ng" ]; then
-  exit 0
-fi
-
-if [ -n "$IF_NEEDS_RESET" ]; then
-  $IWPRIV "$IFACE" reset 1
-  sleep 1
-fi
-
-if [ -n "$IF_NEEDS_FIRMWARE" ]; then
-  $IF_NEEDS_FIRMWARE "$IFACE"
-fi
-
-if [ -n "$IF_WIRELESS_SENS" ]; then
-  $IWCONFIG "$IFACE" sens $IF_WIRELESS_SENS
-fi
-
-if [ -n "$IF_WIRELESS_RATE" ]; then
-  $IWCONFIG "$IFACE" rate $IF_WIRELESS_RATE
-fi
-
-if [ -n "$IF_WIRELESS_RTS" ]; then
-  $IWCONFIG "$IFACE" rts $IF_WIRELESS_RTS
-fi
-
-if [ -n "$IF_WIRELESS_FRAG" ]; then
-  $IWCONFIG "$IFACE" frag $IF_WIRELESS_FRAG
-fi
-
-if [ -n "$IF_WIRELESS_POWER" ]; then
-  $IWCONFIG "$IFACE" power $IF_WIRELESS_POWER
-fi
-
-if [ -n "$IF_WIRELESS_POWERPERIOD" ]; then
-  $IWCONFIG "$IFACE" power period $IF_WIRELESS_POWERPERIOD
-fi
-
-if [ -n "$IF_WIRELESS_POWERTIMEOUT" ]; then
-  $IWCONFIG "$IFACE" power timeout $IF_WIRELESS_POWERTIMEOUT
-fi
-
-if [ -n "$IF_WIRELESS_TXPOWER" ]; then
-  $IWCONFIG "$IFACE" txpower $IF_WIRELESS_TXPOWER
-fi
-
-if [ -n "$IF_WIRELESS_RETRY" ]; then
-  $IWCONFIG "$IFACE" retry $IF_WIRELESS_RETRY
-fi
-
-if [ -n "$IF_WIRELESS_NICK" ]; then
-  $IWCONFIG "$IFACE" nick "$IF_WIRELESS_NICK"
-fi
-
-if [ -n "$IF_WIRELESS_NWID" ]; then
-  $IWCONFIG "$IFACE" nwid "$IF_WIRELESS_NWID"
-fi
-
-if [ -n "$IF_WIRELESS_ENC" ]; then
-  eval $IWCONFIG "$IFACE" enc $IF_WIRELESS_ENC
-fi
-
-if [ -n "$IF_WIRELESS_KEY" ]; then
-  eval $IWCONFIG "$IFACE" key $IF_WIRELESS_KEY
-fi
-
-if [ -n "$IF_WIRELESS_KEY1" ]; then
-  $IWCONFIG "$IFACE" key [1] "$IF_WIRELESS_KEY1"
-fi
-
-if [ -n "$IF_WIRELESS_KEY2" ]; then
-  $IWCONFIG "$IFACE" key [2] "$IF_WIRELESS_KEY2"
-fi
-
-if [ -n "$IF_WIRELESS_KEY3" ]; then
-  $IWCONFIG "$IFACE" key [3] "$IF_WIRELESS_KEY3"
-fi
-
-if [ -n "$IF_WIRELESS_KEY4" ]; then
-  $IWCONFIG "$IFACE" key [4] "$IF_WIRELESS_KEY4"
-fi
-
-if [ -n "$IF_WIRELESS_DEFAULTKEY" ]; then
-  $IWCONFIG "$IFACE" key ["$IF_WIRELESS_DEFAULTKEY"]
-fi
-
-if [ -n "$IF_WIRELESS_KEYMODE" ]; then
-  $IWCONFIG "$IFACE" key "$IF_WIRELESS_KEYMODE"
-fi
-
-if [ -n "$IF_WIRELESS_MODE" ]; then
-  $IWCONFIG "$IFACE" mode $IF_WIRELESS_MODE
-fi
-
-if [ -n "$IF_WIRELESS_FREQ" ]; then
-  $IWCONFIG "$IFACE" freq $IF_WIRELESS_FREQ
-fi
-
-if [ -n "$IF_WIRELESS_CHANNEL" ]; then
-  $IWCONFIG "$IFACE" channel $IF_WIRELESS_CHANNEL
-fi
-
-if [ -n "$IF_WIRELESS_ESSID" ]; then
-  $IWCONFIG "$IFACE" essid "$IF_WIRELESS_ESSID"
-fi
-
-if [ -n "$IF_WIRELESS_COMMIT" ]; then
-  $IWCONFIG "$IFACE" commit
-fi
-
diff --git a/yocto-poky/meta/recipes-connectivity/wireless-tools/wireless-tools/zzz-wireless.if-pre-up b/yocto-poky/meta/recipes-connectivity/wireless-tools/wireless-tools/zzz-wireless.if-pre-up
deleted file mode 100644
index 4c8e95b..0000000
--- a/yocto-poky/meta/recipes-connectivity/wireless-tools/wireless-tools/zzz-wireless.if-pre-up
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-#
-# /etc/network/if-pre-up.d/zzz-wireless
-# by Stefan Tomanek (stefan@pico.ruhr.de)
-
-
-IWCONFIG=/sbin/iwconfig
-IFCONFIG=/sbin/ifconfig
-GREP=/bin/grep
-LOGGER=/usr/bin/logger
-SLEEP=/bin/sleep
-
-# How long do we wait for association?
-RETRIES=15
-SLEEPTIME=1
-
-# Only sleep if we use DHCP (add others methods seperated by spaces)
-ONLY_FOR="static dhcp"
-
-if [ -z "$IF_WIRELESS_TYPE" ] && echo "$ONLY_FOR" | grep -q "$METHOD" ; then
-	$IFCONFIG $IFACE up
-	$LOGGER Checking for WLAN association...
-	while ( [ $RETRIES -gt 0 ] && ($IWCONFIG "$IFACE" | $GREP -q "Access Point: Not-Associated") ); do
-		$LOGGER No association yet, $RETRIES retries until timeout
-		RETRIES=$(($RETRIES-1))
-		$SLEEP $SLEEPTIME
-	done
-	
-	if [ $RETRIES -eq 0 ]; then
-		$LOGGER Timeout waiting for association, continuing anyway...
-	else
-		$LOGGER Found association!
-	fi
-fi
diff --git a/yocto-poky/meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb b/yocto-poky/meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb
index 26ecdf3..c3b8f66 100644
--- a/yocto-poky/meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb
+++ b/yocto-poky/meta/recipes-connectivity/wireless-tools/wireless-tools_30.pre9.bb
@@ -9,8 +9,6 @@
 PE = "1"
 
 SRC_URI = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.${PV}.tar.gz \
-           file://wireless-tools.if-pre-up \
-           file://zzz-wireless.if-pre-up \
            file://remove.ldconfig.call.patch \
            file://man.patch \
            file://avoid_strip.patch \
@@ -19,6 +17,9 @@
 SRC_URI[md5sum] = "ca91ba7c7eff9bfff6926b1a34a4697d"
 SRC_URI[sha256sum] = "abd9c5c98abf1fdd11892ac2f8a56737544fe101e1be27c6241a564948f34c63"
 
+UPSTREAM_CHECK_URI = "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html"
+UPSTREAM_CHECK_REGEX = "wireless_tools\.(?P<pver>(\d+)(\..*|))\.tar\.gz"
+
 S = "${WORKDIR}/wireless_tools.30"
 
 CFLAGS =+ "-I${S}"
@@ -36,17 +37,10 @@
 	oe_runmake PREFIX=${D} install-iwmulticall install-dynamic install-man install-hdr
 	install -d ${D}${sbindir}
 	install -m 0755 ifrename ${D}${sbindir}/ifrename
-	# Disabled by RP - 20/8/08 - We don't seem to need/use these
-	#install -d ${D}${sysconfdir}/network/if-pre-up.d
-	#install ${WORKDIR}/wireless-tools.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/wireless-tools
-	#install ${WORKDIR}/zzz-wireless.if-pre-up ${D}${sysconfdir}/network/if-pre-up.d/zzz-wireless
 }
 
-PACKAGES = "libiw-dbg ifrename-dbg ${PN}-dbg \
-libiw libiw-dev libiw-doc ifrename-doc ifrename ${PN} ${PN}-doc"
+PACKAGES = "libiw libiw-dev libiw-doc ifrename-doc ifrename ${PN} ${PN}-doc ${PN}-dbg"
 
-FILES_libiw-dbg = "${libdir}/.debug/*.so.*"
-FILES_ifrename-dbg = "${sbindir}/.debug/ifrename"
 FILES_libiw = "${libdir}/*.so.*"
 FILES_libiw-dev = "${libdir}/*.a ${libdir}/*.so ${includedir}"
 FILES_libiw-doc = "${mandir}/man7"
diff --git a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch
deleted file mode 100644
index 882674f..0000000
--- a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
-
-From ef566a4d4f74022e1fdb0a2addfe81e6de9f4aae Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Wed, 29 Apr 2015 02:21:53 +0300
-Subject: [PATCH] AP WMM: Fix integer underflow in WMM Action frame parser
-
-The length of the WMM Action frame was not properly validated and the
-length of the information elements (int left) could end up being
-negative. This would result in reading significantly past the stack
-buffer while parsing the IEs in ieee802_11_parse_elems() and while doing
-so, resulting in segmentation fault.
-
-This can result in an invalid frame being used for a denial of service
-attack (hostapd process killed) against an AP with a driver that uses
-hostapd for management frame processing (e.g., all mac80211-based
-drivers).
-
-Thanks to Kostya Kortchinsky of Google security team for discovering and
-reporting this issue.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/ap/wmm.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/src/ap/wmm.c b/src/ap/wmm.c
-index 6d4177c..314e244 100644
---- a/src/ap/wmm.c
-+++ b/src/ap/wmm.c
-@@ -274,6 +274,9 @@ void hostapd_wmm_action(struct hostapd_data *hapd,
- 		return;
- 	}
- 
-+	if (left < 0)
-+		return; /* not a valid WMM Action frame */
-+
- 	/* extract the tspec info element */
- 	if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) {
- 		hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch
deleted file mode 100644
index a2bafc8..0000000
--- a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
-
-From dd2f043c9c43d156494e33d7ce22db96e6ef42c7 Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Fri, 1 May 2015 16:37:45 +0300
-Subject: [PATCH 1/5] EAP-pwd peer: Fix payload length validation for Commit
- and Confirm
-
-The length of the received Commit and Confirm message payloads was not
-checked before reading them. This could result in a buffer read
-overflow when processing an invalid message.
-
-Fix this by verifying that the payload is of expected length before
-processing it. In addition, enforce correct state transition sequence to
-make sure there is no unexpected behavior if receiving a Commit/Confirm
-message before the previous exchanges have been completed.
-
-Thanks to Kostya Kortchinsky of Google security team for discovering and
-reporting this issue.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/eap_peer/eap_pwd.c | 29 +++++++++++++++++++++++++++++
- 1 file changed, 29 insertions(+)
-
-diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
-index f2b0926..a629437 100644
---- a/src/eap_peer/eap_pwd.c
-+++ b/src/eap_peer/eap_pwd.c
-@@ -355,6 +355,23 @@ eap_pwd_perform_commit_exchange(struct eap_sm *sm, struct eap_pwd_data *data,
- 	BIGNUM *mask = NULL, *x = NULL, *y = NULL, *cofactor = NULL;
- 	u16 offset;
- 	u8 *ptr, *scalar = NULL, *element = NULL;
-+	size_t prime_len, order_len;
-+
-+	if (data->state != PWD_Commit_Req) {
-+		ret->ignore = TRUE;
-+		goto fin;
-+	}
-+
-+	prime_len = BN_num_bytes(data->grp->prime);
-+	order_len = BN_num_bytes(data->grp->order);
-+
-+	if (payload_len != 2 * prime_len + order_len) {
-+		wpa_printf(MSG_INFO,
-+			   "EAP-pwd: Unexpected Commit payload length %u (expected %u)",
-+			   (unsigned int) payload_len,
-+			   (unsigned int) (2 * prime_len + order_len));
-+		goto fin;
-+	}
- 
- 	if (((data->private_value = BN_new()) == NULL) ||
- 	    ((data->my_element = EC_POINT_new(data->grp->group)) == NULL) ||
-@@ -554,6 +571,18 @@ eap_pwd_perform_confirm_exchange(struct eap_sm *sm, struct eap_pwd_data *data,
- 	u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr;
- 	int offset;
- 
-+	if (data->state != PWD_Confirm_Req) {
-+		ret->ignore = TRUE;
-+		goto fin;
-+	}
-+
-+	if (payload_len != SHA256_MAC_LEN) {
-+		wpa_printf(MSG_INFO,
-+			   "EAP-pwd: Unexpected Confirm payload length %u (expected %u)",
-+			   (unsigned int) payload_len, SHA256_MAC_LEN);
-+		goto fin;
-+	}
-+
- 	/*
- 	 * first build up the ciphersuite which is group | random_function |
- 	 *	prf
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch
deleted file mode 100644
index e108a93..0000000
--- a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 9ed4eee345f85e3025c33c6e20aa25696e341ccd Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <jouni@qca.qualcomm.com>
-Date: Tue, 7 Apr 2015 11:32:11 +0300
-Subject: [PATCH] P2P: Validate SSID element length before copying it
- (CVE-2015-1863)
-
-This fixes a possible memcpy overflow for P2P dev->oper_ssid in
-p2p_add_device(). The length provided by the peer device (0..255 bytes)
-was used without proper bounds checking and that could have resulted in
-arbitrary data of up to 223 bytes being written beyond the end of the
-dev->oper_ssid[] array (of which about 150 bytes would be beyond the
-heap allocation) when processing a corrupted management frame for P2P
-peer discovery purposes.
-
-This could result in corrupted state in heap, unexpected program
-behavior due to corrupted P2P peer device information, denial of service
-due to process crash, exposure of memory contents during GO Negotiation,
-and potentially arbitrary code execution.
-
-Thanks to Google security team for reporting this issue and smart
-hardware research group of Alibaba security team for discovering it.
-
-Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
-
-Upstream-Status: Backport
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
-
----
- src/p2p/p2p.c |    1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
-index f584fae..a45fe73 100644
---- a/src/p2p/p2p.c
-+++ b/src/p2p/p2p.c
-@@ -778,6 +778,7 @@ int p2p_add_device(struct p2p_data *p2p, const u8 *addr, int freq,
- 	if (os_memcmp(addr, p2p_dev_addr, ETH_ALEN) != 0)
- 		os_memcpy(dev->interface_addr, addr, ETH_ALEN);
- 	if (msg.ssid &&
-+	    msg.ssid[1] <= sizeof(dev->oper_ssid) &&
- 	    (msg.ssid[1] != P2P_WILDCARD_SSID_LEN ||
- 	     os_memcmp(msg.ssid + 2, P2P_WILDCARD_SSID, P2P_WILDCARD_SSID_LEN)
- 	     != 0)) {
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch
deleted file mode 100644
index 2568ea1..0000000
--- a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
-
-From 5acd23f4581da58683f3cf5e36cb71bbe4070bd7 Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Tue, 28 Apr 2015 17:08:33 +0300
-Subject: [PATCH] WPS: Fix HTTP chunked transfer encoding parser
-
-strtoul() return value may end up overflowing the int h->chunk_size and
-resulting in a negative value to be stored as the chunk_size. This could
-result in the following memcpy operation using a very large length
-argument which would result in a buffer overflow and segmentation fault.
-
-This could have been used to cause a denial service by any device that
-has been authorized for network access (either wireless or wired). This
-would affect both the WPS UPnP functionality in a WPS AP (hostapd with
-upnp_iface parameter set in the configuration) and WPS ER
-(wpa_supplicant with WPS_ER_START control interface command used).
-
-Validate the parsed chunk length value to avoid this. In addition to
-rejecting negative values, we can also reject chunk size that would be
-larger than the maximum configured body length.
-
-Thanks to Kostya Kortchinsky of Google security team for discovering and
-reporting this issue.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/wps/httpread.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/wps/httpread.c b/src/wps/httpread.c
-index 2f08f37..d2855e3 100644
---- a/src/wps/httpread.c
-+++ b/src/wps/httpread.c
-@@ -533,6 +533,13 @@ static void httpread_read_handler(int sd, void *eloop_ctx, void *sock_ctx)
- 					if (!isxdigit(*cbp))
- 						goto bad;
- 					h->chunk_size = strtoul(cbp, NULL, 16);
-+					if (h->chunk_size < 0 ||
-+					    h->chunk_size > h->max_bytes) {
-+						wpa_printf(MSG_DEBUG,
-+							   "httpread: Invalid chunk size %d",
-+							   h->chunk_size);
-+						goto bad;
-+					}
- 					/* throw away chunk header
- 					 * so we have only real data
- 					 */
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch
deleted file mode 100644
index c477c2f..0000000
--- a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
-
-From e28a58be26184c2a23f80b410e0997ef1bd5d578 Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Fri, 1 May 2015 16:40:44 +0300
-Subject: [PATCH 2/5] EAP-pwd server: Fix payload length validation for Commit
- and Confirm
-
-The length of the received Commit and Confirm message payloads was not
-checked before reading them. This could result in a buffer read
-overflow when processing an invalid message.
-
-Fix this by verifying that the payload is of expected length before
-processing it. In addition, enforce correct state transition sequence to
-make sure there is no unexpected behavior if receiving a Commit/Confirm
-message before the previous exchanges have been completed.
-
-Thanks to Kostya Kortchinsky of Google security team for discovering and
-reporting this issue.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/eap_server/eap_server_pwd.c | 19 +++++++++++++++++++
- 1 file changed, 19 insertions(+)
-
-diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c
-index 66bd5d2..3189105 100644
---- a/src/eap_server/eap_server_pwd.c
-+++ b/src/eap_server/eap_server_pwd.c
-@@ -656,9 +656,21 @@ eap_pwd_process_commit_resp(struct eap_sm *sm, struct eap_pwd_data *data,
- 	BIGNUM *x = NULL, *y = NULL, *cofactor = NULL;
- 	EC_POINT *K = NULL, *point = NULL;
- 	int res = 0;
-+	size_t prime_len, order_len;
- 
- 	wpa_printf(MSG_DEBUG, "EAP-pwd: Received commit response");
- 
-+	prime_len = BN_num_bytes(data->grp->prime);
-+	order_len = BN_num_bytes(data->grp->order);
-+
-+	if (payload_len != 2 * prime_len + order_len) {
-+		wpa_printf(MSG_INFO,
-+			   "EAP-pwd: Unexpected Commit payload length %u (expected %u)",
-+			   (unsigned int) payload_len,
-+			   (unsigned int) (2 * prime_len + order_len));
-+		goto fin;
-+	}
-+
- 	if (((data->peer_scalar = BN_new()) == NULL) ||
- 	    ((data->k = BN_new()) == NULL) ||
- 	    ((cofactor = BN_new()) == NULL) ||
-@@ -774,6 +786,13 @@ eap_pwd_process_confirm_resp(struct eap_sm *sm, struct eap_pwd_data *data,
- 	u8 conf[SHA256_MAC_LEN], *cruft = NULL, *ptr;
- 	int offset;
- 
-+	if (payload_len != SHA256_MAC_LEN) {
-+		wpa_printf(MSG_INFO,
-+			   "EAP-pwd: Unexpected Confirm payload length %u (expected %u)",
-+			   (unsigned int) payload_len, SHA256_MAC_LEN);
-+		goto fin;
-+	}
-+
- 	/* build up the ciphersuite: group | random_function | prf */
- 	grp = htons(data->group_num);
- 	ptr = (u8 *) &cs;
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch
deleted file mode 100644
index e46ce43..0000000
--- a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
-
-From 477c74395acd0123340457ba6f15ab345d42016e Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Sat, 2 May 2015 19:23:04 +0300
-Subject: [PATCH 3/5] EAP-pwd peer: Fix Total-Length parsing for fragment
- reassembly
-
-The remaining number of bytes in the message could be smaller than the
-Total-Length field size, so the length needs to be explicitly checked
-prior to reading the field and decrementing the len variable. This could
-have resulted in the remaining length becoming negative and interpreted
-as a huge positive integer.
-
-In addition, check that there is no already started fragment in progress
-before allocating a new buffer for reassembling fragments. This avoid a
-potential memory leak when processing invalid message.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/eap_peer/eap_pwd.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
-index a629437..1d2079b 100644
---- a/src/eap_peer/eap_pwd.c
-+++ b/src/eap_peer/eap_pwd.c
-@@ -866,11 +866,23 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret,
- 	 * if it's the first fragment there'll be a length field
- 	 */
- 	if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) {
-+		if (len < 2) {
-+			wpa_printf(MSG_DEBUG,
-+				   "EAP-pwd: Frame too short to contain Total-Length field");
-+			ret->ignore = TRUE;
-+			return NULL;
-+		}
- 		tot_len = WPA_GET_BE16(pos);
- 		wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments whose "
- 			   "total length = %d", tot_len);
- 		if (tot_len > 15000)
- 			return NULL;
-+		if (data->inbuf) {
-+			wpa_printf(MSG_DEBUG,
-+				   "EAP-pwd: Unexpected new fragment start when previous fragment is still in use");
-+			ret->ignore = TRUE;
-+			return NULL;
-+		}
- 		data->inbuf = wpabuf_alloc(tot_len);
- 		if (data->inbuf == NULL) {
- 			wpa_printf(MSG_INFO, "Out of memory to buffer "
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch
deleted file mode 100644
index a4c02b4..0000000
--- a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
-
-From 3035cc2894e08319b905bd6561e8bddc8c2db9fa Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Sat, 2 May 2015 19:26:06 +0300
-Subject: [PATCH 4/5] EAP-pwd server: Fix Total-Length parsing for fragment
- reassembly
-
-The remaining number of bytes in the message could be smaller than the
-Total-Length field size, so the length needs to be explicitly checked
-prior to reading the field and decrementing the len variable. This could
-have resulted in the remaining length becoming negative and interpreted
-as a huge positive integer.
-
-In addition, check that there is no already started fragment in progress
-before allocating a new buffer for reassembling fragments. This avoid a
-potential memory leak when processing invalid message.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/eap_server/eap_server_pwd.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c
-index 3189105..2bfc3c2 100644
---- a/src/eap_server/eap_server_pwd.c
-+++ b/src/eap_server/eap_server_pwd.c
-@@ -942,11 +942,21 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv,
- 	 * the first fragment has a total length
- 	 */
- 	if (EAP_PWD_GET_LENGTH_BIT(lm_exch)) {
-+		if (len < 2) {
-+			wpa_printf(MSG_DEBUG,
-+				   "EAP-pwd: Frame too short to contain Total-Length field");
-+			return;
-+		}
- 		tot_len = WPA_GET_BE16(pos);
- 		wpa_printf(MSG_DEBUG, "EAP-pwd: Incoming fragments, total "
- 			   "length = %d", tot_len);
- 		if (tot_len > 15000)
- 			return;
-+		if (data->inbuf) {
-+			wpa_printf(MSG_DEBUG,
-+				   "EAP-pwd: Unexpected new fragment start when previous fragment is still in use");
-+			return;
-+		}
- 		data->inbuf = wpabuf_alloc(tot_len);
- 		if (data->inbuf == NULL) {
- 			wpa_printf(MSG_INFO, "EAP-pwd: Out of memory to "
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch
deleted file mode 100644
index 4073600..0000000
--- a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
-
-From 28a069a545b06b99eb55ad53f63f2c99e65a98f6 Mon Sep 17 00:00:00 2001
-From: Jouni Malinen <j@w1.fi>
-Date: Sat, 2 May 2015 19:26:28 +0300
-Subject: [PATCH 5/5] EAP-pwd peer: Fix asymmetric fragmentation behavior
-
-The L (Length) and M (More) flags needs to be cleared before deciding
-whether the locally generated response requires fragmentation. This
-fixes an issue where these flags from the server could have been invalid
-for the following message. In some cases, this could have resulted in
-triggering the wpabuf security check that would terminate the process
-due to invalid buffer allocation.
-
-Signed-off-by: Jouni Malinen <j@w1.fi>
----
- src/eap_peer/eap_pwd.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
-index 1d2079b..e58b13a 100644
---- a/src/eap_peer/eap_pwd.c
-+++ b/src/eap_peer/eap_pwd.c
-@@ -968,6 +968,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret,
- 	/*
- 	 * we have output! Do we need to fragment it?
- 	 */
-+	lm_exch = EAP_PWD_GET_EXCHANGE(lm_exch);
- 	len = wpabuf_len(data->outbuf);
- 	if ((len + EAP_PWD_HDR_SIZE) > data->mtu) {
- 		resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, data->mtu,
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.4.bb b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.4.bb
deleted file mode 100644
index a124cf2..0000000
--- a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.4.bb
+++ /dev/null
@@ -1,116 +0,0 @@
-SUMMARY = "Client for Wi-Fi Protected Access (WPA)"
-HOMEPAGE = "http://hostap.epitest.fi/wpa_supplicant/"
-BUGTRACKER = "http://hostap.epitest.fi/bugz/"
-SECTION = "network"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=36b27801447e0662ee0138d17fe93880 \
-                    file://README;beginline=1;endline=56;md5=7f393579f8b109fe91f3b9765d26c7d3 \
-                    file://wpa_supplicant/wpa_supplicant.c;beginline=1;endline=12;md5=3430fda79f2ba1dd545f0b3c4d6e4d24 "
-DEPENDS = "dbus libnl libgcrypt"
-RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli"
-
-PACKAGECONFIG ??= "gnutls"
-PACKAGECONFIG[gnutls] = ",,gnutls"
-PACKAGECONFIG[openssl] = ",,openssl"
-
-inherit systemd
-
-SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service wpa_supplicant-nl80211@.service wpa_supplicant-wired@.service"
-SYSTEMD_AUTO_ENABLE = "disable"
-
-SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \
-           file://defconfig \
-           file://wpa-supplicant.sh \
-           file://wpa_supplicant.conf \
-           file://wpa_supplicant.conf-sane \
-           file://99_wpa_supplicant \
-           file://0001-AP-WMM-Fix-integer-underflow-in-WMM-Action-frame-par.patch \
-           file://0001-P2P-Validate-SSID-element-length-before-copying-it-C.patch \
-           file://0001-WPS-Fix-HTTP-chunked-transfer-encoding-parser.patch \
-           file://0001-EAP-pwd-peer-Fix-payload-length-validation-for-Commi.patch \
-           file://0002-EAP-pwd-server-Fix-payload-length-validation-for-Com.patch \
-           file://0003-EAP-pwd-peer-Fix-Total-Length-parsing-for-fragment-r.patch \
-           file://0004-EAP-pwd-server-Fix-Total-Length-parsing-for-fragment.patch \
-           file://0005-EAP-pwd-peer-Fix-asymmetric-fragmentation-behavior.patch \
-          "
-SRC_URI[md5sum] = "f0037dbe03897dcaf2ad2722e659095d"
-SRC_URI[sha256sum] = "058dc832c096139a059e6df814080f50251a8d313c21b13364c54a1e70109122"
-
-S = "${WORKDIR}/wpa_supplicant-${PV}"
-
-PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli "
-FILES_wpa-supplicant-passphrase = "${bindir}/wpa_passphrase"
-FILES_wpa-supplicant-cli = "${sbindir}/wpa_cli"
-FILES_${PN} += "${datadir}/dbus-1/system-services/*"
-CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf"
-
-do_configure () {
-	${MAKE} -C wpa_supplicant clean
-	install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config
-	echo "CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config
-	echo "DRV_CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config
-	
-	if echo "${PACKAGECONFIG}" | grep -qw "openssl"; then
-        	ssl=openssl
-	elif echo "${PACKAGECONFIG}" | grep -qw "gnutls"; then
-        	ssl=gnutls
-	fi
-	if [ -n "$ssl" ]; then
-        	sed -i "s/%ssl%/$ssl/" wpa_supplicant/.config
-	fi
-
-	# For rebuild
-	rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d
-}
-
-export EXTRA_CFLAGS = "${CFLAGS}"
-export BINDIR = "${sbindir}"
-
-do_compile () {
-	unset CFLAGS CPPFLAGS CXXFLAGS
-	sed -e "s:CFLAGS\ =.*:& \$(EXTRA_CFLAGS):g" -i ${S}/src/lib.rules
-	oe_runmake -C wpa_supplicant
-}
-
-do_install () {
-	install -d ${D}${sbindir}
-	install -m 755 wpa_supplicant/wpa_supplicant ${D}${sbindir}
-	install -m 755 wpa_supplicant/wpa_cli        ${D}${sbindir}
-
-	install -d ${D}${bindir}
-	install -m 755 wpa_supplicant/wpa_passphrase ${D}${bindir}
-
-	install -d ${D}${docdir}/wpa_supplicant
-	install -m 644 wpa_supplicant/README ${WORKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant
-
-	install -d ${D}${sysconfdir}
-	install -m 600 ${WORKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf
-
-	install -d ${D}${sysconfdir}/network/if-pre-up.d/
-	install -d ${D}${sysconfdir}/network/if-post-down.d/
-	install -d ${D}${sysconfdir}/network/if-down.d/
-	install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant
-	cd ${D}${sysconfdir}/network/ && \
-	ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant
-
-	install -d ${D}/${sysconfdir}/dbus-1/system.d
-	install -m 644 ${S}/wpa_supplicant/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d
-	install -d ${D}/${datadir}/dbus-1/system-services
-	install -m 644 ${S}/wpa_supplicant/dbus/*.service ${D}/${datadir}/dbus-1/system-services
-
-	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-		install -d ${D}/${systemd_unitdir}/system
-		install -m 644 ${S}/wpa_supplicant/systemd/*.service ${D}/${systemd_unitdir}/system
-	fi
-
-	install -d ${D}/etc/default/volatiles
-	install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles
-}
-
-pkg_postinst_wpa-supplicant () {
-	# If we're offline, we don't need to do this.
-	if [ "x$D" = "x" ]; then
-		killall -q -HUP dbus-daemon || true
-	fi
-
-}
diff --git a/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb
new file mode 100644
index 0000000..935c8af
--- /dev/null
+++ b/yocto-poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.5.bb
@@ -0,0 +1,108 @@
+SUMMARY = "Client for Wi-Fi Protected Access (WPA)"
+HOMEPAGE = "http://w1.fi/wpa_supplicant/"
+BUGTRACKER = "http://w1.fi/security/"
+SECTION = "network"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=36b27801447e0662ee0138d17fe93880 \
+                    file://README;beginline=1;endline=56;md5=7f393579f8b109fe91f3b9765d26c7d3 \
+                    file://wpa_supplicant/wpa_supplicant.c;beginline=1;endline=12;md5=3430fda79f2ba1dd545f0b3c4d6e4d24"
+DEPENDS = "dbus libnl"
+RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli"
+
+PACKAGECONFIG ??= "gnutls"
+PACKAGECONFIG[gnutls] = ",,gnutls libgcrypt"
+PACKAGECONFIG[openssl] = ",,openssl"
+
+inherit systemd
+
+SYSTEMD_SERVICE_${PN} = "wpa_supplicant.service wpa_supplicant-nl80211@.service wpa_supplicant-wired@.service"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz  \
+           file://defconfig \
+           file://wpa-supplicant.sh \
+           file://wpa_supplicant.conf \
+           file://wpa_supplicant.conf-sane \
+           file://99_wpa_supplicant \
+          "
+SRC_URI[md5sum] = "96ff75c3a514f1f324560a2376f13110"
+SRC_URI[sha256sum] = "cce55bae483b364eae55c35ba567c279be442ed8bab5b80a3c7fb0d057b9b316"
+
+S = "${WORKDIR}/wpa_supplicant-${PV}"
+
+PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli "
+FILES_wpa-supplicant-passphrase = "${bindir}/wpa_passphrase"
+FILES_wpa-supplicant-cli = "${sbindir}/wpa_cli"
+FILES_${PN} += "${datadir}/dbus-1/system-services/*"
+CONFFILES_${PN} += "${sysconfdir}/wpa_supplicant.conf"
+
+do_configure () {
+	${MAKE} -C wpa_supplicant clean
+	install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config
+	echo "CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config
+	echo "DRV_CFLAGS +=\"-I${STAGING_INCDIR}/libnl3\"" >> wpa_supplicant/.config
+	
+	if echo "${PACKAGECONFIG}" | grep -qw "openssl"; then
+        	ssl=openssl
+	elif echo "${PACKAGECONFIG}" | grep -qw "gnutls"; then
+        	ssl=gnutls
+	fi
+	if [ -n "$ssl" ]; then
+        	sed -i "s/%ssl%/$ssl/" wpa_supplicant/.config
+	fi
+
+	# For rebuild
+	rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d
+}
+
+export EXTRA_CFLAGS = "${CFLAGS}"
+export BINDIR = "${sbindir}"
+
+do_compile () {
+	unset CFLAGS CPPFLAGS CXXFLAGS
+	sed -e "s:CFLAGS\ =.*:& \$(EXTRA_CFLAGS):g" -i ${S}/src/lib.rules
+	oe_runmake -C wpa_supplicant
+}
+
+do_install () {
+	install -d ${D}${sbindir}
+	install -m 755 wpa_supplicant/wpa_supplicant ${D}${sbindir}
+	install -m 755 wpa_supplicant/wpa_cli        ${D}${sbindir}
+
+	install -d ${D}${bindir}
+	install -m 755 wpa_supplicant/wpa_passphrase ${D}${bindir}
+
+	install -d ${D}${docdir}/wpa_supplicant
+	install -m 644 wpa_supplicant/README ${WORKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant
+
+	install -d ${D}${sysconfdir}
+	install -m 600 ${WORKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf
+
+	install -d ${D}${sysconfdir}/network/if-pre-up.d/
+	install -d ${D}${sysconfdir}/network/if-post-down.d/
+	install -d ${D}${sysconfdir}/network/if-down.d/
+	install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant
+	cd ${D}${sysconfdir}/network/ && \
+	ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant
+
+	install -d ${D}/${sysconfdir}/dbus-1/system.d
+	install -m 644 ${S}/wpa_supplicant/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d
+	install -d ${D}/${datadir}/dbus-1/system-services
+	install -m 644 ${S}/wpa_supplicant/dbus/*.service ${D}/${datadir}/dbus-1/system-services
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		install -d ${D}/${systemd_unitdir}/system
+		install -m 644 ${S}/wpa_supplicant/systemd/*.service ${D}/${systemd_unitdir}/system
+	fi
+
+	install -d ${D}/etc/default/volatiles
+	install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles
+}
+
+pkg_postinst_wpa-supplicant () {
+	# If we're offline, we don't need to do this.
+	if [ "x$D" = "x" ]; then
+		killall -q -HUP dbus-daemon || true
+	fi
+
+}
diff --git a/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb b/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb
index e16fe72..d391707 100644
--- a/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/yocto-poky/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -13,7 +13,6 @@
 SRC_URI = "file://rotation \
            file://nsswitch.conf \
            file://motd \
-           file://inputrc \
            file://host.conf \
            file://profile \
            file://shells \
@@ -55,7 +54,7 @@
 
 volatiles = "log tmp"
 conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \
-             ${sysconfdir}/inputrc ${sysconfdir}/issue /${sysconfdir}/issue.net \
+             ${sysconfdir}/issue /${sysconfdir}/issue.net \
              ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \
              ${sysconfdir}/default"
 
@@ -124,7 +123,6 @@
 	install -m 0644 ${WORKDIR}/shells ${D}${sysconfdir}/shells
 	install -m 0755 ${WORKDIR}/share/dot.profile ${D}${sysconfdir}/skel/.profile
 	install -m 0755 ${WORKDIR}/share/dot.bashrc ${D}${sysconfdir}/skel/.bashrc
-	install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
 	install -m 0644 ${WORKDIR}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf
 	install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
 	install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
@@ -167,6 +165,10 @@
         done
 }
 
+sysroot_stage_all_append () {
+	sysroot_stage_dir ${D}${sysconfdir}/skel ${SYSROOT_DESTDIR}${sysconfdir}/skel
+}
+
 PACKAGES = "${PN}-doc ${PN} ${PN}-dev ${PN}-dbg"
 FILES_${PN} = "/"
 FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
diff --git a/yocto-poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/yocto-poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
index ac9bd81..10457b2 100644
--- a/yocto-poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
+++ b/yocto-poky/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
@@ -17,6 +17,10 @@
 SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421"
 SRC_URI[sha256sum] = "f0b66388b2c8e49c15692439d2bee63bcdd4bbbf7a782c7f64accc55986b6a36"
 
+# the package is taken from launchpad; 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/b/base-passwd/"
+
 inherit autotools
 
 SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst"
@@ -85,7 +89,7 @@
 """ + group + """EOF
 fi
 """
-    d.setVar('pkg_preinst_${PN}', preinst)
+    d.setVar(d.expand('pkg_preinst_${PN}'), preinst)
 }
 
 addtask do_package after do_populate_sysroot
diff --git a/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb b/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb
new file mode 100644
index 0000000..8f43d43
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers.bb
@@ -0,0 +1,31 @@
+# Copyright (C) 2016 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "bsd compatible headers"
+LICENSE = "BSD-3-Clause & BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://sys-queue.h;beginline=1;endline=32;md5=c6352b0f03bb448600456547d334b56f"
+SECTION = "devel"
+
+SRC_URI = "file://sys-queue.h \
+           file://sys-tree.h \
+           file://sys-cdefs.h \
+          "
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+S = "${WORKDIR}"
+
+do_install() {
+	install -Dm 0644 ${S}/sys-queue.h ${D}${includedir}/sys/queue.h
+	install -Dm 0644 ${S}/sys-tree.h ${D}${includedir}/sys/tree.h
+	install -Dm 0644 ${S}/sys-cdefs.h ${D}${includedir}/sys/cdefs.h
+}
+#
+# We will skip parsing for non-musl systems
+#
+
+COMPATIBLE_HOST = ".*-musl.*"
+RDEPENDS_${PN}-dev = ""
+RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
diff --git a/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h b/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
new file mode 100644
index 0000000..209a623
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-cdefs.h
@@ -0,0 +1,26 @@
+#warning usage of non-standard #include <sys/cdefs.h> is deprecated
+
+#undef __P
+#undef __PMT
+
+#define __P(args)	args
+#define __PMT(args)	args
+
+#define __CONCAT(x,y)	x ## y
+#define __STRING(x)	#x
+
+#ifdef  __cplusplus
+# define __BEGIN_DECLS	extern "C" {
+# define __END_DECLS	}
+#else
+# define __BEGIN_DECLS
+# define __END_DECLS
+#endif
+
+#if defined(__GNUC__) && !defined(__cplusplus)
+# define __THROW	__attribute__ ((__nothrow__))
+# define __NTH(fct)	__attribute__ ((__nothrow__)) fct
+#else
+# define __THROW
+# define __NTH(fct)     fct
+#endif
diff --git a/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h b/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h
new file mode 100644
index 0000000..99d01a5
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-queue.h
@@ -0,0 +1,846 @@
+/*	$NetBSD: queue.h,v 1.68 2014/11/19 08:10:01 uebayasi Exp $	*/
+
+/*
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)queue.h	8.5 (Berkeley) 8/20/94
+ */
+
+#ifndef	_SYS_QUEUE_H_
+#define	_SYS_QUEUE_H_
+
+/*
+ * This file defines five types of data structures: singly-linked lists,
+ * lists, simple queues, tail queues, and circular queues.
+ *
+ * A singly-linked list is headed by a single forward pointer. The
+ * elements are singly linked for minimum space and pointer manipulation
+ * overhead at the expense of O(n) removal for arbitrary elements. New
+ * elements can be added to the list after an existing element or at the
+ * head of the list.  Elements being removed from the head of the list
+ * should use the explicit macro for this purpose for optimum
+ * efficiency. A singly-linked list may only be traversed in the forward
+ * direction.  Singly-linked lists are ideal for applications with large
+ * datasets and few or no removals or for implementing a LIFO queue.
+ *
+ * A list is headed by a single forward pointer (or an array of forward
+ * pointers for a hash table header). The elements are doubly linked
+ * so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before
+ * or after an existing element or at the head of the list. A list
+ * may only be traversed in the forward direction.
+ *
+ * A simple queue is headed by a pair of pointers, one the head of the
+ * list and the other to the tail of the list. The elements are singly
+ * linked to save space, so elements can only be removed from the
+ * head of the list. New elements can be added to the list after
+ * an existing element, at the head of the list, or at the end of the
+ * list. A simple queue may only be traversed in the forward direction.
+ *
+ * A tail queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or
+ * after an existing element, at the head of the list, or at the end of
+ * the list. A tail queue may be traversed in either direction.
+ *
+ * A circle queue is headed by a pair of pointers, one to the head of the
+ * list and the other to the tail of the list. The elements are doubly
+ * linked so that an arbitrary element can be removed without a need to
+ * traverse the list. New elements can be added to the list before or after
+ * an existing element, at the head of the list, or at the end of the list.
+ * A circle queue may be traversed in either direction, but has a more
+ * complex end of list detection.
+ *
+ * For details on the use of these macros, see the queue(3) manual page.
+ */
+
+/*
+ * Include the definition of NULL only on NetBSD because sys/null.h
+ * is not available elsewhere.  This conditional makes the header
+ * portable and it can simply be dropped verbatim into any system.
+ * The caveat is that on other systems some other header
+ * must provide NULL before the macros can be used.
+ */
+#ifdef __NetBSD__
+#include <sys/null.h>
+#endif
+
+#if defined(QUEUEDEBUG)
+# if defined(_KERNEL)
+#  define QUEUEDEBUG_ABORT(...) panic(__VA_ARGS__)
+# else
+#  include <err.h>
+#  define QUEUEDEBUG_ABORT(...) err(1, __VA_ARGS__)
+# endif
+#endif
+
+/*
+ * Singly-linked List definitions.
+ */
+#define	SLIST_HEAD(name, type)						\
+struct name {								\
+	struct type *slh_first;	/* first element */			\
+}
+
+#define	SLIST_HEAD_INITIALIZER(head)					\
+	{ NULL }
+
+#define	SLIST_ENTRY(type)						\
+struct {								\
+	struct type *sle_next;	/* next element */			\
+}
+
+/*
+ * Singly-linked List access methods.
+ */
+#define	SLIST_FIRST(head)	((head)->slh_first)
+#define	SLIST_END(head)		NULL
+#define	SLIST_EMPTY(head)	((head)->slh_first == NULL)
+#define	SLIST_NEXT(elm, field)	((elm)->field.sle_next)
+
+#define	SLIST_FOREACH(var, head, field)					\
+	for((var) = (head)->slh_first;					\
+	    (var) != SLIST_END(head);					\
+	    (var) = (var)->field.sle_next)
+
+#define	SLIST_FOREACH_SAFE(var, head, field, tvar)			\
+	for ((var) = SLIST_FIRST((head));				\
+	    (var) != SLIST_END(head) &&					\
+	    ((tvar) = SLIST_NEXT((var), field), 1);			\
+	    (var) = (tvar))
+
+/*
+ * Singly-linked List functions.
+ */
+#define	SLIST_INIT(head) do {						\
+	(head)->slh_first = SLIST_END(head);				\
+} while (/*CONSTCOND*/0)
+
+#define	SLIST_INSERT_AFTER(slistelm, elm, field) do {			\
+	(elm)->field.sle_next = (slistelm)->field.sle_next;		\
+	(slistelm)->field.sle_next = (elm);				\
+} while (/*CONSTCOND*/0)
+
+#define	SLIST_INSERT_HEAD(head, elm, field) do {			\
+	(elm)->field.sle_next = (head)->slh_first;			\
+	(head)->slh_first = (elm);					\
+} while (/*CONSTCOND*/0)
+
+#define	SLIST_REMOVE_AFTER(slistelm, field) do {			\
+	(slistelm)->field.sle_next =					\
+	    SLIST_NEXT(SLIST_NEXT((slistelm), field), field);		\
+} while (/*CONSTCOND*/0)
+
+#define	SLIST_REMOVE_HEAD(head, field) do {				\
+	(head)->slh_first = (head)->slh_first->field.sle_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	SLIST_REMOVE(head, elm, type, field) do {			\
+	if ((head)->slh_first == (elm)) {				\
+		SLIST_REMOVE_HEAD((head), field);			\
+	}								\
+	else {								\
+		struct type *curelm = (head)->slh_first;		\
+		while(curelm->field.sle_next != (elm))			\
+			curelm = curelm->field.sle_next;		\
+		curelm->field.sle_next =				\
+		    curelm->field.sle_next->field.sle_next;		\
+	}								\
+} while (/*CONSTCOND*/0)
+
+
+/*
+ * List definitions.
+ */
+#define	LIST_HEAD(name, type)						\
+struct name {								\
+	struct type *lh_first;	/* first element */			\
+}
+
+#define	LIST_HEAD_INITIALIZER(head)					\
+	{ NULL }
+
+#define	LIST_ENTRY(type)						\
+struct {								\
+	struct type *le_next;	/* next element */			\
+	struct type **le_prev;	/* address of previous next element */	\
+}
+
+/*
+ * List access methods.
+ */
+#define	LIST_FIRST(head)		((head)->lh_first)
+#define	LIST_END(head)			NULL
+#define	LIST_EMPTY(head)		((head)->lh_first == LIST_END(head))
+#define	LIST_NEXT(elm, field)		((elm)->field.le_next)
+
+#define	LIST_FOREACH(var, head, field)					\
+	for ((var) = ((head)->lh_first);				\
+	    (var) != LIST_END(head);					\
+	    (var) = ((var)->field.le_next))
+
+#define	LIST_FOREACH_SAFE(var, head, field, tvar)			\
+	for ((var) = LIST_FIRST((head));				\
+	    (var) != LIST_END(head) &&					\
+	    ((tvar) = LIST_NEXT((var), field), 1);			\
+	    (var) = (tvar))
+
+#define	LIST_MOVE(head1, head2) do {					\
+	LIST_INIT((head2));						\
+	if (!LIST_EMPTY((head1))) {					\
+		(head2)->lh_first = (head1)->lh_first;			\
+		LIST_INIT((head1));					\
+	}								\
+} while (/*CONSTCOND*/0)
+
+/*
+ * List functions.
+ */
+#if defined(QUEUEDEBUG)
+#define	QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field)			\
+	if ((head)->lh_first &&						\
+	    (head)->lh_first->field.le_prev != &(head)->lh_first)	\
+		QUEUEDEBUG_ABORT("LIST_INSERT_HEAD %p %s:%d", (head),	\
+		    __FILE__, __LINE__);
+#define	QUEUEDEBUG_LIST_OP(elm, field)					\
+	if ((elm)->field.le_next &&					\
+	    (elm)->field.le_next->field.le_prev !=			\
+	    &(elm)->field.le_next)					\
+		QUEUEDEBUG_ABORT("LIST_* forw %p %s:%d", (elm),		\
+		    __FILE__, __LINE__);				\
+	if (*(elm)->field.le_prev != (elm))				\
+		QUEUEDEBUG_ABORT("LIST_* back %p %s:%d", (elm),		\
+		    __FILE__, __LINE__);
+#define	QUEUEDEBUG_LIST_POSTREMOVE(elm, field)				\
+	(elm)->field.le_next = (void *)1L;				\
+	(elm)->field.le_prev = (void *)1L;
+#else
+#define	QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field)
+#define	QUEUEDEBUG_LIST_OP(elm, field)
+#define	QUEUEDEBUG_LIST_POSTREMOVE(elm, field)
+#endif
+
+#define	LIST_INIT(head) do {						\
+	(head)->lh_first = LIST_END(head);				\
+} while (/*CONSTCOND*/0)
+
+#define	LIST_INSERT_AFTER(listelm, elm, field) do {			\
+	QUEUEDEBUG_LIST_OP((listelm), field)				\
+	if (((elm)->field.le_next = (listelm)->field.le_next) != 	\
+	    LIST_END(head))						\
+		(listelm)->field.le_next->field.le_prev =		\
+		    &(elm)->field.le_next;				\
+	(listelm)->field.le_next = (elm);				\
+	(elm)->field.le_prev = &(listelm)->field.le_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	LIST_INSERT_BEFORE(listelm, elm, field) do {			\
+	QUEUEDEBUG_LIST_OP((listelm), field)				\
+	(elm)->field.le_prev = (listelm)->field.le_prev;		\
+	(elm)->field.le_next = (listelm);				\
+	*(listelm)->field.le_prev = (elm);				\
+	(listelm)->field.le_prev = &(elm)->field.le_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	LIST_INSERT_HEAD(head, elm, field) do {				\
+	QUEUEDEBUG_LIST_INSERT_HEAD((head), (elm), field)		\
+	if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head))\
+		(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
+	(head)->lh_first = (elm);					\
+	(elm)->field.le_prev = &(head)->lh_first;			\
+} while (/*CONSTCOND*/0)
+
+#define	LIST_REMOVE(elm, field) do {					\
+	QUEUEDEBUG_LIST_OP((elm), field)				\
+	if ((elm)->field.le_next != NULL)				\
+		(elm)->field.le_next->field.le_prev = 			\
+		    (elm)->field.le_prev;				\
+	*(elm)->field.le_prev = (elm)->field.le_next;			\
+	QUEUEDEBUG_LIST_POSTREMOVE((elm), field)			\
+} while (/*CONSTCOND*/0)
+
+#define LIST_REPLACE(elm, elm2, field) do {				\
+	if (((elm2)->field.le_next = (elm)->field.le_next) != NULL)	\
+		(elm2)->field.le_next->field.le_prev =			\
+		    &(elm2)->field.le_next;				\
+	(elm2)->field.le_prev = (elm)->field.le_prev;			\
+	*(elm2)->field.le_prev = (elm2);				\
+	QUEUEDEBUG_LIST_POSTREMOVE((elm), field)			\
+} while (/*CONSTCOND*/0)
+
+/*
+ * Simple queue definitions.
+ */
+#define	SIMPLEQ_HEAD(name, type)					\
+struct name {								\
+	struct type *sqh_first;	/* first element */			\
+	struct type **sqh_last;	/* addr of last next element */		\
+}
+
+#define	SIMPLEQ_HEAD_INITIALIZER(head)					\
+	{ NULL, &(head).sqh_first }
+
+#define	SIMPLEQ_ENTRY(type)						\
+struct {								\
+	struct type *sqe_next;	/* next element */			\
+}
+
+/*
+ * Simple queue access methods.
+ */
+#define	SIMPLEQ_FIRST(head)		((head)->sqh_first)
+#define	SIMPLEQ_END(head)		NULL
+#define	SIMPLEQ_EMPTY(head)		((head)->sqh_first == SIMPLEQ_END(head))
+#define	SIMPLEQ_NEXT(elm, field)	((elm)->field.sqe_next)
+
+#define	SIMPLEQ_FOREACH(var, head, field)				\
+	for ((var) = ((head)->sqh_first);				\
+	    (var) != SIMPLEQ_END(head);					\
+	    (var) = ((var)->field.sqe_next))
+
+#define	SIMPLEQ_FOREACH_SAFE(var, head, field, next)			\
+	for ((var) = ((head)->sqh_first);				\
+	    (var) != SIMPLEQ_END(head) &&				\
+	    ((next = ((var)->field.sqe_next)), 1);			\
+	    (var) = (next))
+
+/*
+ * Simple queue functions.
+ */
+#define	SIMPLEQ_INIT(head) do {						\
+	(head)->sqh_first = NULL;					\
+	(head)->sqh_last = &(head)->sqh_first;				\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_INSERT_HEAD(head, elm, field) do {			\
+	if (((elm)->field.sqe_next = (head)->sqh_first) == NULL)	\
+		(head)->sqh_last = &(elm)->field.sqe_next;		\
+	(head)->sqh_first = (elm);					\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_INSERT_TAIL(head, elm, field) do {			\
+	(elm)->field.sqe_next = NULL;					\
+	*(head)->sqh_last = (elm);					\
+	(head)->sqh_last = &(elm)->field.sqe_next;			\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do {		\
+	if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
+		(head)->sqh_last = &(elm)->field.sqe_next;		\
+	(listelm)->field.sqe_next = (elm);				\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_REMOVE_HEAD(head, field) do {				\
+	if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
+		(head)->sqh_last = &(head)->sqh_first;			\
+} while (/*CONSTCOND*/0)
+
+#define SIMPLEQ_REMOVE_AFTER(head, elm, field) do {			\
+	if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \
+	    == NULL)							\
+		(head)->sqh_last = &(elm)->field.sqe_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_REMOVE(head, elm, type, field) do {			\
+	if ((head)->sqh_first == (elm)) {				\
+		SIMPLEQ_REMOVE_HEAD((head), field);			\
+	} else {							\
+		struct type *curelm = (head)->sqh_first;		\
+		while (curelm->field.sqe_next != (elm))			\
+			curelm = curelm->field.sqe_next;		\
+		if ((curelm->field.sqe_next =				\
+			curelm->field.sqe_next->field.sqe_next) == NULL) \
+			    (head)->sqh_last = &(curelm)->field.sqe_next; \
+	}								\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_CONCAT(head1, head2) do {				\
+	if (!SIMPLEQ_EMPTY((head2))) {					\
+		*(head1)->sqh_last = (head2)->sqh_first;		\
+		(head1)->sqh_last = (head2)->sqh_last;		\
+		SIMPLEQ_INIT((head2));					\
+	}								\
+} while (/*CONSTCOND*/0)
+
+#define	SIMPLEQ_LAST(head, type, field)					\
+	(SIMPLEQ_EMPTY((head)) ?						\
+		NULL :							\
+	        ((struct type *)(void *)				\
+		((char *)((head)->sqh_last) - offsetof(struct type, field))))
+
+/*
+ * Tail queue definitions.
+ */
+#define	_TAILQ_HEAD(name, type, qual)					\
+struct name {								\
+	qual type *tqh_first;		/* first element */		\
+	qual type *qual *tqh_last;	/* addr of last next element */	\
+}
+#define TAILQ_HEAD(name, type)	_TAILQ_HEAD(name, struct type,)
+
+#define	TAILQ_HEAD_INITIALIZER(head)					\
+	{ TAILQ_END(head), &(head).tqh_first }
+
+#define	_TAILQ_ENTRY(type, qual)					\
+struct {								\
+	qual type *tqe_next;		/* next element */		\
+	qual type *qual *tqe_prev;	/* address of previous next element */\
+}
+#define TAILQ_ENTRY(type)	_TAILQ_ENTRY(struct type,)
+
+/*
+ * Tail queue access methods.
+ */
+#define	TAILQ_FIRST(head)		((head)->tqh_first)
+#define	TAILQ_END(head)			(NULL)
+#define	TAILQ_NEXT(elm, field)		((elm)->field.tqe_next)
+#define	TAILQ_LAST(head, headname) \
+	(*(((struct headname *)((head)->tqh_last))->tqh_last))
+#define	TAILQ_PREV(elm, headname, field) \
+	(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
+#define	TAILQ_EMPTY(head)		(TAILQ_FIRST(head) == TAILQ_END(head))
+
+
+#define	TAILQ_FOREACH(var, head, field)					\
+	for ((var) = ((head)->tqh_first);				\
+	    (var) != TAILQ_END(head);					\
+	    (var) = ((var)->field.tqe_next))
+
+#define	TAILQ_FOREACH_SAFE(var, head, field, next)			\
+	for ((var) = ((head)->tqh_first);				\
+	    (var) != TAILQ_END(head) &&					\
+	    ((next) = TAILQ_NEXT(var, field), 1); (var) = (next))
+
+#define	TAILQ_FOREACH_REVERSE(var, head, headname, field)		\
+	for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));\
+	    (var) != TAILQ_END(head);					\
+	    (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
+
+#define	TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev)	\
+	for ((var) = TAILQ_LAST((head), headname);			\
+	    (var) != TAILQ_END(head) && 				\
+	    ((prev) = TAILQ_PREV((var), headname, field), 1); (var) = (prev))
+
+/*
+ * Tail queue functions.
+ */
+#if defined(QUEUEDEBUG)
+#define	QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field)			\
+	if ((head)->tqh_first &&					\
+	    (head)->tqh_first->field.tqe_prev != &(head)->tqh_first)	\
+		QUEUEDEBUG_ABORT("TAILQ_INSERT_HEAD %p %s:%d", (head),	\
+		    __FILE__, __LINE__);
+#define	QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field)			\
+	if (*(head)->tqh_last != NULL)					\
+		QUEUEDEBUG_ABORT("TAILQ_INSERT_TAIL %p %s:%d", (head),	\
+		    __FILE__, __LINE__);
+#define	QUEUEDEBUG_TAILQ_OP(elm, field)					\
+	if ((elm)->field.tqe_next &&					\
+	    (elm)->field.tqe_next->field.tqe_prev !=			\
+	    &(elm)->field.tqe_next)					\
+		QUEUEDEBUG_ABORT("TAILQ_* forw %p %s:%d", (elm),	\
+		    __FILE__, __LINE__);				\
+	if (*(elm)->field.tqe_prev != (elm))				\
+		QUEUEDEBUG_ABORT("TAILQ_* back %p %s:%d", (elm),	\
+		    __FILE__, __LINE__);
+#define	QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field)			\
+	if ((elm)->field.tqe_next == NULL &&				\
+	    (head)->tqh_last != &(elm)->field.tqe_next)			\
+		QUEUEDEBUG_ABORT("TAILQ_PREREMOVE head %p elm %p %s:%d",\
+		    (head), (elm), __FILE__, __LINE__);
+#define	QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field)				\
+	(elm)->field.tqe_next = (void *)1L;				\
+	(elm)->field.tqe_prev = (void *)1L;
+#else
+#define	QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field)
+#define	QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field)
+#define	QUEUEDEBUG_TAILQ_OP(elm, field)
+#define	QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field)
+#define	QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field)
+#endif
+
+#define	TAILQ_INIT(head) do {						\
+	(head)->tqh_first = TAILQ_END(head);				\
+	(head)->tqh_last = &(head)->tqh_first;				\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_INSERT_HEAD(head, elm, field) do {			\
+	QUEUEDEBUG_TAILQ_INSERT_HEAD((head), (elm), field)		\
+	if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head))\
+		(head)->tqh_first->field.tqe_prev =			\
+		    &(elm)->field.tqe_next;				\
+	else								\
+		(head)->tqh_last = &(elm)->field.tqe_next;		\
+	(head)->tqh_first = (elm);					\
+	(elm)->field.tqe_prev = &(head)->tqh_first;			\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_INSERT_TAIL(head, elm, field) do {			\
+	QUEUEDEBUG_TAILQ_INSERT_TAIL((head), (elm), field)		\
+	(elm)->field.tqe_next = TAILQ_END(head);			\
+	(elm)->field.tqe_prev = (head)->tqh_last;			\
+	*(head)->tqh_last = (elm);					\
+	(head)->tqh_last = &(elm)->field.tqe_next;			\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_INSERT_AFTER(head, listelm, elm, field) do {		\
+	QUEUEDEBUG_TAILQ_OP((listelm), field)				\
+	if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != 	\
+	    TAILQ_END(head))						\
+		(elm)->field.tqe_next->field.tqe_prev = 		\
+		    &(elm)->field.tqe_next;				\
+	else								\
+		(head)->tqh_last = &(elm)->field.tqe_next;		\
+	(listelm)->field.tqe_next = (elm);				\
+	(elm)->field.tqe_prev = &(listelm)->field.tqe_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_INSERT_BEFORE(listelm, elm, field) do {			\
+	QUEUEDEBUG_TAILQ_OP((listelm), field)				\
+	(elm)->field.tqe_prev = (listelm)->field.tqe_prev;		\
+	(elm)->field.tqe_next = (listelm);				\
+	*(listelm)->field.tqe_prev = (elm);				\
+	(listelm)->field.tqe_prev = &(elm)->field.tqe_next;		\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_REMOVE(head, elm, field) do {				\
+	QUEUEDEBUG_TAILQ_PREREMOVE((head), (elm), field)		\
+	QUEUEDEBUG_TAILQ_OP((elm), field)				\
+	if (((elm)->field.tqe_next) != TAILQ_END(head))			\
+		(elm)->field.tqe_next->field.tqe_prev = 		\
+		    (elm)->field.tqe_prev;				\
+	else								\
+		(head)->tqh_last = (elm)->field.tqe_prev;		\
+	*(elm)->field.tqe_prev = (elm)->field.tqe_next;			\
+	QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field);			\
+} while (/*CONSTCOND*/0)
+
+#define TAILQ_REPLACE(head, elm, elm2, field) do {			\
+        if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != 	\
+	    TAILQ_END(head))   						\
+                (elm2)->field.tqe_next->field.tqe_prev =		\
+                    &(elm2)->field.tqe_next;				\
+        else								\
+                (head)->tqh_last = &(elm2)->field.tqe_next;		\
+        (elm2)->field.tqe_prev = (elm)->field.tqe_prev;			\
+        *(elm2)->field.tqe_prev = (elm2);				\
+	QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field);			\
+} while (/*CONSTCOND*/0)
+
+#define	TAILQ_CONCAT(head1, head2, field) do {				\
+	if (!TAILQ_EMPTY(head2)) {					\
+		*(head1)->tqh_last = (head2)->tqh_first;		\
+		(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last;	\
+		(head1)->tqh_last = (head2)->tqh_last;			\
+		TAILQ_INIT((head2));					\
+	}								\
+} while (/*CONSTCOND*/0)
+
+/*
+ * Singly-linked Tail queue declarations.
+ */
+#define	STAILQ_HEAD(name, type)						\
+struct name {								\
+	struct type *stqh_first;	/* first element */		\
+	struct type **stqh_last;	/* addr of last next element */	\
+}
+
+#define	STAILQ_HEAD_INITIALIZER(head)					\
+	{ NULL, &(head).stqh_first }
+
+#define	STAILQ_ENTRY(type)						\
+struct {								\
+	struct type *stqe_next;	/* next element */			\
+}
+
+/*
+ * Singly-linked Tail queue access methods.
+ */
+#define	STAILQ_FIRST(head)	((head)->stqh_first)
+#define	STAILQ_END(head)	NULL
+#define	STAILQ_NEXT(elm, field)	((elm)->field.stqe_next)
+#define	STAILQ_EMPTY(head)	(STAILQ_FIRST(head) == STAILQ_END(head))
+
+/*
+ * Singly-linked Tail queue functions.
+ */
+#define	STAILQ_INIT(head) do {						\
+	(head)->stqh_first = NULL;					\
+	(head)->stqh_last = &(head)->stqh_first;				\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_INSERT_HEAD(head, elm, field) do {			\
+	if (((elm)->field.stqe_next = (head)->stqh_first) == NULL)	\
+		(head)->stqh_last = &(elm)->field.stqe_next;		\
+	(head)->stqh_first = (elm);					\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_INSERT_TAIL(head, elm, field) do {			\
+	(elm)->field.stqe_next = NULL;					\
+	*(head)->stqh_last = (elm);					\
+	(head)->stqh_last = &(elm)->field.stqe_next;			\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_INSERT_AFTER(head, listelm, elm, field) do {		\
+	if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
+		(head)->stqh_last = &(elm)->field.stqe_next;		\
+	(listelm)->field.stqe_next = (elm);				\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_REMOVE_HEAD(head, field) do {				\
+	if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
+		(head)->stqh_last = &(head)->stqh_first;			\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_REMOVE(head, elm, type, field) do {			\
+	if ((head)->stqh_first == (elm)) {				\
+		STAILQ_REMOVE_HEAD((head), field);			\
+	} else {							\
+		struct type *curelm = (head)->stqh_first;		\
+		while (curelm->field.stqe_next != (elm))			\
+			curelm = curelm->field.stqe_next;		\
+		if ((curelm->field.stqe_next =				\
+			curelm->field.stqe_next->field.stqe_next) == NULL) \
+			    (head)->stqh_last = &(curelm)->field.stqe_next; \
+	}								\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_FOREACH(var, head, field)				\
+	for ((var) = ((head)->stqh_first);				\
+		(var);							\
+		(var) = ((var)->field.stqe_next))
+
+#define	STAILQ_FOREACH_SAFE(var, head, field, tvar)			\
+	for ((var) = STAILQ_FIRST((head));				\
+	    (var) && ((tvar) = STAILQ_NEXT((var), field), 1);		\
+	    (var) = (tvar))
+
+#define	STAILQ_CONCAT(head1, head2) do {				\
+	if (!STAILQ_EMPTY((head2))) {					\
+		*(head1)->stqh_last = (head2)->stqh_first;		\
+		(head1)->stqh_last = (head2)->stqh_last;		\
+		STAILQ_INIT((head2));					\
+	}								\
+} while (/*CONSTCOND*/0)
+
+#define	STAILQ_LAST(head, type, field)					\
+	(STAILQ_EMPTY((head)) ?						\
+		NULL :							\
+	        ((struct type *)(void *)				\
+		((char *)((head)->stqh_last) - offsetof(struct type, field))))
+
+
+#ifndef _KERNEL
+/*
+ * Circular queue definitions. Do not use. We still keep the macros
+ * for compatibility but because of pointer aliasing issues their use
+ * is discouraged!
+ */
+
+/*
+ * __launder_type():  We use this ugly hack to work around the the compiler
+ * noticing that two types may not alias each other and elide tests in code.
+ * We hit this in the CIRCLEQ macros when comparing 'struct name *' and
+ * 'struct type *' (see CIRCLEQ_HEAD()).  Modern compilers (such as GCC
+ * 4.8) declare these comparisons as always false, causing the code to
+ * not run as designed.
+ *
+ * This hack is only to be used for comparisons and thus can be fully const.
+ * Do not use for assignment.
+ *
+ * If we ever choose to change the ABI of the CIRCLEQ macros, we could fix
+ * this by changing the head/tail sentinal values, but see the note above
+ * this one.
+ */
+static __inline const void * __launder_type(const void *);
+static __inline const void *
+__launder_type(const void *__x)
+{
+	__asm __volatile("" : "+r" (__x));
+	return __x;
+}
+
+#if defined(QUEUEDEBUG)
+#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field)				\
+	if ((head)->cqh_first != CIRCLEQ_ENDC(head) &&			\
+	    (head)->cqh_first->field.cqe_prev != CIRCLEQ_ENDC(head))	\
+		QUEUEDEBUG_ABORT("CIRCLEQ head forw %p %s:%d", (head),	\
+		      __FILE__, __LINE__);				\
+	if ((head)->cqh_last != CIRCLEQ_ENDC(head) &&			\
+	    (head)->cqh_last->field.cqe_next != CIRCLEQ_ENDC(head))	\
+		QUEUEDEBUG_ABORT("CIRCLEQ head back %p %s:%d", (head),	\
+		      __FILE__, __LINE__);
+#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field)			\
+	if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) {		\
+		if ((head)->cqh_last != (elm))				\
+			QUEUEDEBUG_ABORT("CIRCLEQ elm last %p %s:%d",	\
+			    (elm), __FILE__, __LINE__);			\
+	} else {							\
+		if ((elm)->field.cqe_next->field.cqe_prev != (elm))	\
+			QUEUEDEBUG_ABORT("CIRCLEQ elm forw %p %s:%d",	\
+			    (elm), __FILE__, __LINE__);			\
+	}								\
+	if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) {		\
+		if ((head)->cqh_first != (elm))				\
+			QUEUEDEBUG_ABORT("CIRCLEQ elm first %p %s:%d",	\
+			    (elm), __FILE__, __LINE__);			\
+	} else {							\
+		if ((elm)->field.cqe_prev->field.cqe_next != (elm))	\
+			QUEUEDEBUG_ABORT("CIRCLEQ elm prev %p %s:%d",	\
+			    (elm), __FILE__, __LINE__);			\
+	}
+#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field)			\
+	(elm)->field.cqe_next = (void *)1L;				\
+	(elm)->field.cqe_prev = (void *)1L;
+#else
+#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field)
+#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field)
+#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field)
+#endif
+
+#define	CIRCLEQ_HEAD(name, type)					\
+struct name {								\
+	struct type *cqh_first;		/* first element */		\
+	struct type *cqh_last;		/* last element */		\
+}
+
+#define	CIRCLEQ_HEAD_INITIALIZER(head)					\
+	{ CIRCLEQ_END(&head), CIRCLEQ_END(&head) }
+
+#define	CIRCLEQ_ENTRY(type)						\
+struct {								\
+	struct type *cqe_next;		/* next element */		\
+	struct type *cqe_prev;		/* previous element */		\
+}
+
+/*
+ * Circular queue functions.
+ */
+#define	CIRCLEQ_INIT(head) do {						\
+	(head)->cqh_first = CIRCLEQ_END(head);				\
+	(head)->cqh_last = CIRCLEQ_END(head);				\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do {		\
+	QUEUEDEBUG_CIRCLEQ_HEAD((head), field)				\
+	QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field)		\
+	(elm)->field.cqe_next = (listelm)->field.cqe_next;		\
+	(elm)->field.cqe_prev = (listelm);				\
+	if ((listelm)->field.cqe_next == CIRCLEQ_ENDC(head))		\
+		(head)->cqh_last = (elm);				\
+	else								\
+		(listelm)->field.cqe_next->field.cqe_prev = (elm);	\
+	(listelm)->field.cqe_next = (elm);				\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do {		\
+	QUEUEDEBUG_CIRCLEQ_HEAD((head), field)				\
+	QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field)		\
+	(elm)->field.cqe_next = (listelm);				\
+	(elm)->field.cqe_prev = (listelm)->field.cqe_prev;		\
+	if ((listelm)->field.cqe_prev == CIRCLEQ_ENDC(head))		\
+		(head)->cqh_first = (elm);				\
+	else								\
+		(listelm)->field.cqe_prev->field.cqe_next = (elm);	\
+	(listelm)->field.cqe_prev = (elm);				\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_INSERT_HEAD(head, elm, field) do {			\
+	QUEUEDEBUG_CIRCLEQ_HEAD((head), field)				\
+	(elm)->field.cqe_next = (head)->cqh_first;			\
+	(elm)->field.cqe_prev = CIRCLEQ_END(head);			\
+	if ((head)->cqh_last == CIRCLEQ_ENDC(head))			\
+		(head)->cqh_last = (elm);				\
+	else								\
+		(head)->cqh_first->field.cqe_prev = (elm);		\
+	(head)->cqh_first = (elm);					\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_INSERT_TAIL(head, elm, field) do {			\
+	QUEUEDEBUG_CIRCLEQ_HEAD((head), field)				\
+	(elm)->field.cqe_next = CIRCLEQ_END(head);			\
+	(elm)->field.cqe_prev = (head)->cqh_last;			\
+	if ((head)->cqh_first == CIRCLEQ_ENDC(head))			\
+		(head)->cqh_first = (elm);				\
+	else								\
+		(head)->cqh_last->field.cqe_next = (elm);		\
+	(head)->cqh_last = (elm);					\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_REMOVE(head, elm, field) do {				\
+	QUEUEDEBUG_CIRCLEQ_HEAD((head), field)				\
+	QUEUEDEBUG_CIRCLEQ_ELM((head), (elm), field)			\
+	if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head))		\
+		(head)->cqh_last = (elm)->field.cqe_prev;		\
+	else								\
+		(elm)->field.cqe_next->field.cqe_prev =			\
+		    (elm)->field.cqe_prev;				\
+	if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head))		\
+		(head)->cqh_first = (elm)->field.cqe_next;		\
+	else								\
+		(elm)->field.cqe_prev->field.cqe_next =			\
+		    (elm)->field.cqe_next;				\
+	QUEUEDEBUG_CIRCLEQ_POSTREMOVE((elm), field)			\
+} while (/*CONSTCOND*/0)
+
+#define	CIRCLEQ_FOREACH(var, head, field)				\
+	for ((var) = ((head)->cqh_first);				\
+		(var) != CIRCLEQ_ENDC(head);				\
+		(var) = ((var)->field.cqe_next))
+
+#define	CIRCLEQ_FOREACH_REVERSE(var, head, field)			\
+	for ((var) = ((head)->cqh_last);				\
+		(var) != CIRCLEQ_ENDC(head);				\
+		(var) = ((var)->field.cqe_prev))
+
+/*
+ * Circular queue access methods.
+ */
+#define	CIRCLEQ_FIRST(head)		((head)->cqh_first)
+#define	CIRCLEQ_LAST(head)		((head)->cqh_last)
+/* For comparisons */
+#define	CIRCLEQ_ENDC(head)		(__launder_type(head))
+/* For assignments */
+#define	CIRCLEQ_END(head)		((void *)(head))
+#define	CIRCLEQ_NEXT(elm, field)	((elm)->field.cqe_next)
+#define	CIRCLEQ_PREV(elm, field)	((elm)->field.cqe_prev)
+#define	CIRCLEQ_EMPTY(head)						\
+    (CIRCLEQ_FIRST(head) == CIRCLEQ_ENDC(head))
+
+#define CIRCLEQ_LOOP_NEXT(head, elm, field)				\
+	(((elm)->field.cqe_next == CIRCLEQ_ENDC(head))			\
+	    ? ((head)->cqh_first)					\
+	    : (elm->field.cqe_next))
+#define CIRCLEQ_LOOP_PREV(head, elm, field)				\
+	(((elm)->field.cqe_prev == CIRCLEQ_ENDC(head))			\
+	    ? ((head)->cqh_last)					\
+	    : (elm->field.cqe_prev))
+#endif /* !_KERNEL */
+
+#endif	/* !_SYS_QUEUE_H_ */
diff --git a/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h b/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h
new file mode 100644
index 0000000..eaea56a
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/bsd-headers/bsd-headers/sys-tree.h
@@ -0,0 +1,761 @@
+/*	$NetBSD: tree.h,v 1.20 2013/09/14 13:20:45 joerg Exp $	*/
+/*	$OpenBSD: tree.h,v 1.13 2011/07/09 00:19:45 pirofti Exp $	*/
+/*
+ * Copyright 2002 Niels Provos <provos@citi.umich.edu>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef	_SYS_TREE_H_
+#define	_SYS_TREE_H_
+
+/*
+ * This file defines data structures for different types of trees:
+ * splay trees and red-black trees.
+ *
+ * A splay tree is a self-organizing data structure.  Every operation
+ * on the tree causes a splay to happen.  The splay moves the requested
+ * node to the root of the tree and partly rebalances it.
+ *
+ * This has the benefit that request locality causes faster lookups as
+ * the requested nodes move to the top of the tree.  On the other hand,
+ * every lookup causes memory writes.
+ *
+ * The Balance Theorem bounds the total access time for m operations
+ * and n inserts on an initially empty tree as O((m + n)lg n).  The
+ * amortized cost for a sequence of m accesses to a splay tree is O(lg n);
+ *
+ * A red-black tree is a binary search tree with the node color as an
+ * extra attribute.  It fulfills a set of conditions:
+ *	- every search path from the root to a leaf consists of the
+ *	  same number of black nodes,
+ *	- each red node (except for the root) has a black parent,
+ *	- each leaf node is black.
+ *
+ * Every operation on a red-black tree is bounded as O(lg n).
+ * The maximum height of a red-black tree is 2lg (n+1).
+ */
+
+#define SPLAY_HEAD(name, type)						\
+struct name {								\
+	struct type *sph_root; /* root of the tree */			\
+}
+
+#define SPLAY_INITIALIZER(root)						\
+	{ NULL }
+
+#define SPLAY_INIT(root) do {						\
+	(root)->sph_root = NULL;					\
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ENTRY(type)						\
+struct {								\
+	struct type *spe_left; /* left element */			\
+	struct type *spe_right; /* right element */			\
+}
+
+#define SPLAY_LEFT(elm, field)		(elm)->field.spe_left
+#define SPLAY_RIGHT(elm, field)		(elm)->field.spe_right
+#define SPLAY_ROOT(head)		(head)->sph_root
+#define SPLAY_EMPTY(head)		(SPLAY_ROOT(head) == NULL)
+
+/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */
+#define SPLAY_ROTATE_RIGHT(head, tmp, field) do {			\
+	SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field);	\
+	SPLAY_RIGHT(tmp, field) = (head)->sph_root;			\
+	(head)->sph_root = tmp;						\
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ROTATE_LEFT(head, tmp, field) do {			\
+	SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field);	\
+	SPLAY_LEFT(tmp, field) = (head)->sph_root;			\
+	(head)->sph_root = tmp;						\
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_LINKLEFT(head, tmp, field) do {				\
+	SPLAY_LEFT(tmp, field) = (head)->sph_root;			\
+	tmp = (head)->sph_root;						\
+	(head)->sph_root = SPLAY_LEFT((head)->sph_root, field);		\
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_LINKRIGHT(head, tmp, field) do {				\
+	SPLAY_RIGHT(tmp, field) = (head)->sph_root;			\
+	tmp = (head)->sph_root;						\
+	(head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);	\
+} while (/*CONSTCOND*/ 0)
+
+#define SPLAY_ASSEMBLE(head, node, left, right, field) do {		\
+	SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field);	\
+	SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\
+	SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field);	\
+	SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field);	\
+} while (/*CONSTCOND*/ 0)
+
+/* Generates prototypes and inline functions */
+
+#define SPLAY_PROTOTYPE(name, type, field, cmp)				\
+void name##_SPLAY(struct name *, struct type *);			\
+void name##_SPLAY_MINMAX(struct name *, int);				\
+struct type *name##_SPLAY_INSERT(struct name *, struct type *);		\
+struct type *name##_SPLAY_REMOVE(struct name *, struct type *);		\
+									\
+/* Finds the node with the same key as elm */				\
+static __inline struct type *						\
+name##_SPLAY_FIND(struct name *head, struct type *elm)			\
+{									\
+	if (SPLAY_EMPTY(head))						\
+		return(NULL);						\
+	name##_SPLAY(head, elm);					\
+	if ((cmp)(elm, (head)->sph_root) == 0)				\
+		return (head->sph_root);				\
+	return (NULL);							\
+}									\
+									\
+static __inline __unused struct type *					\
+name##_SPLAY_NEXT(struct name *head, struct type *elm)			\
+{									\
+	name##_SPLAY(head, elm);					\
+	if (SPLAY_RIGHT(elm, field) != NULL) {				\
+		elm = SPLAY_RIGHT(elm, field);				\
+		while (SPLAY_LEFT(elm, field) != NULL) {		\
+			elm = SPLAY_LEFT(elm, field);			\
+		}							\
+	} else								\
+		elm = NULL;						\
+	return (elm);							\
+}									\
+									\
+static __unused __inline struct type *					\
+name##_SPLAY_MIN_MAX(struct name *head, int val)			\
+{									\
+	name##_SPLAY_MINMAX(head, val);					\
+        return (SPLAY_ROOT(head));					\
+}
+
+/* Main splay operation.
+ * Moves node close to the key of elm to top
+ */
+#define SPLAY_GENERATE(name, type, field, cmp)				\
+struct type *								\
+name##_SPLAY_INSERT(struct name *head, struct type *elm)		\
+{									\
+    if (SPLAY_EMPTY(head)) {						\
+	    SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL;	\
+    } else {								\
+	    int __comp;							\
+	    name##_SPLAY(head, elm);					\
+	    __comp = (cmp)(elm, (head)->sph_root);			\
+	    if(__comp < 0) {						\
+		    SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\
+		    SPLAY_RIGHT(elm, field) = (head)->sph_root;		\
+		    SPLAY_LEFT((head)->sph_root, field) = NULL;		\
+	    } else if (__comp > 0) {					\
+		    SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\
+		    SPLAY_LEFT(elm, field) = (head)->sph_root;		\
+		    SPLAY_RIGHT((head)->sph_root, field) = NULL;	\
+	    } else							\
+		    return ((head)->sph_root);				\
+    }									\
+    (head)->sph_root = (elm);						\
+    return (NULL);							\
+}									\
+									\
+struct type *								\
+name##_SPLAY_REMOVE(struct name *head, struct type *elm)		\
+{									\
+	struct type *__tmp;						\
+	if (SPLAY_EMPTY(head))						\
+		return (NULL);						\
+	name##_SPLAY(head, elm);					\
+	if ((cmp)(elm, (head)->sph_root) == 0) {			\
+		if (SPLAY_LEFT((head)->sph_root, field) == NULL) {	\
+			(head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\
+		} else {						\
+			__tmp = SPLAY_RIGHT((head)->sph_root, field);	\
+			(head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\
+			name##_SPLAY(head, elm);			\
+			SPLAY_RIGHT((head)->sph_root, field) = __tmp;	\
+		}							\
+		return (elm);						\
+	}								\
+	return (NULL);							\
+}									\
+									\
+void									\
+name##_SPLAY(struct name *head, struct type *elm)			\
+{									\
+	struct type __node, *__left, *__right, *__tmp;			\
+	int __comp;							\
+\
+	SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+	__left = __right = &__node;					\
+\
+	while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) {		\
+		if (__comp < 0) {					\
+			__tmp = SPLAY_LEFT((head)->sph_root, field);	\
+			if (__tmp == NULL)				\
+				break;					\
+			if ((cmp)(elm, __tmp) < 0){			\
+				SPLAY_ROTATE_RIGHT(head, __tmp, field);	\
+				if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+					break;				\
+			}						\
+			SPLAY_LINKLEFT(head, __right, field);		\
+		} else if (__comp > 0) {				\
+			__tmp = SPLAY_RIGHT((head)->sph_root, field);	\
+			if (__tmp == NULL)				\
+				break;					\
+			if ((cmp)(elm, __tmp) > 0){			\
+				SPLAY_ROTATE_LEFT(head, __tmp, field);	\
+				if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+					break;				\
+			}						\
+			SPLAY_LINKRIGHT(head, __left, field);		\
+		}							\
+	}								\
+	SPLAY_ASSEMBLE(head, &__node, __left, __right, field);		\
+}									\
+									\
+/* Splay with either the minimum or the maximum element			\
+ * Used to find minimum or maximum element in tree.			\
+ */									\
+void name##_SPLAY_MINMAX(struct name *head, int __comp) \
+{									\
+	struct type __node, *__left, *__right, *__tmp;			\
+\
+	SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\
+	__left = __right = &__node;					\
+\
+	while (1) {							\
+		if (__comp < 0) {					\
+			__tmp = SPLAY_LEFT((head)->sph_root, field);	\
+			if (__tmp == NULL)				\
+				break;					\
+			if (__comp < 0){				\
+				SPLAY_ROTATE_RIGHT(head, __tmp, field);	\
+				if (SPLAY_LEFT((head)->sph_root, field) == NULL)\
+					break;				\
+			}						\
+			SPLAY_LINKLEFT(head, __right, field);		\
+		} else if (__comp > 0) {				\
+			__tmp = SPLAY_RIGHT((head)->sph_root, field);	\
+			if (__tmp == NULL)				\
+				break;					\
+			if (__comp > 0) {				\
+				SPLAY_ROTATE_LEFT(head, __tmp, field);	\
+				if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\
+					break;				\
+			}						\
+			SPLAY_LINKRIGHT(head, __left, field);		\
+		}							\
+	}								\
+	SPLAY_ASSEMBLE(head, &__node, __left, __right, field);		\
+}
+
+#define SPLAY_NEGINF	-1
+#define SPLAY_INF	1
+
+#define SPLAY_INSERT(name, x, y)	name##_SPLAY_INSERT(x, y)
+#define SPLAY_REMOVE(name, x, y)	name##_SPLAY_REMOVE(x, y)
+#define SPLAY_FIND(name, x, y)		name##_SPLAY_FIND(x, y)
+#define SPLAY_NEXT(name, x, y)		name##_SPLAY_NEXT(x, y)
+#define SPLAY_MIN(name, x)		(SPLAY_EMPTY(x) ? NULL	\
+					: name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
+#define SPLAY_MAX(name, x)		(SPLAY_EMPTY(x) ? NULL	\
+					: name##_SPLAY_MIN_MAX(x, SPLAY_INF))
+
+#define SPLAY_FOREACH(x, name, head)					\
+	for ((x) = SPLAY_MIN(name, head);				\
+	     (x) != NULL;						\
+	     (x) = SPLAY_NEXT(name, head, x))
+
+/* Macros that define a red-black tree */
+#define RB_HEAD(name, type)						\
+struct name {								\
+	struct type *rbh_root; /* root of the tree */			\
+}
+
+#define RB_INITIALIZER(root)						\
+	{ NULL }
+
+#define RB_INIT(root) do {						\
+	(root)->rbh_root = NULL;					\
+} while (/*CONSTCOND*/ 0)
+
+#define RB_BLACK	0
+#define RB_RED		1
+#define RB_ENTRY(type)							\
+struct {								\
+	struct type *rbe_left;		/* left element */		\
+	struct type *rbe_right;		/* right element */		\
+	struct type *rbe_parent;	/* parent element */		\
+	int rbe_color;			/* node color */		\
+}
+
+#define RB_LEFT(elm, field)		(elm)->field.rbe_left
+#define RB_RIGHT(elm, field)		(elm)->field.rbe_right
+#define RB_PARENT(elm, field)		(elm)->field.rbe_parent
+#define RB_COLOR(elm, field)		(elm)->field.rbe_color
+#define RB_ROOT(head)			(head)->rbh_root
+#define RB_EMPTY(head)			(RB_ROOT(head) == NULL)
+
+#define RB_SET(elm, parent, field) do {					\
+	RB_PARENT(elm, field) = parent;					\
+	RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL;		\
+	RB_COLOR(elm, field) = RB_RED;					\
+} while (/*CONSTCOND*/ 0)
+
+#define RB_SET_BLACKRED(black, red, field) do {				\
+	RB_COLOR(black, field) = RB_BLACK;				\
+	RB_COLOR(red, field) = RB_RED;					\
+} while (/*CONSTCOND*/ 0)
+
+#ifndef RB_AUGMENT
+#define RB_AUGMENT(x)	do {} while (/*CONSTCOND*/ 0)
+#endif
+
+#define RB_ROTATE_LEFT(head, elm, tmp, field) do {			\
+	(tmp) = RB_RIGHT(elm, field);					\
+	if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) {	\
+		RB_PARENT(RB_LEFT(tmp, field), field) = (elm);		\
+	}								\
+	RB_AUGMENT(elm);						\
+	if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) {	\
+		if ((elm) == RB_LEFT(RB_PARENT(elm, field), field))	\
+			RB_LEFT(RB_PARENT(elm, field), field) = (tmp);	\
+		else							\
+			RB_RIGHT(RB_PARENT(elm, field), field) = (tmp);	\
+	} else								\
+		(head)->rbh_root = (tmp);				\
+	RB_LEFT(tmp, field) = (elm);					\
+	RB_PARENT(elm, field) = (tmp);					\
+	RB_AUGMENT(tmp);						\
+	if ((RB_PARENT(tmp, field)))					\
+		RB_AUGMENT(RB_PARENT(tmp, field));			\
+} while (/*CONSTCOND*/ 0)
+
+#define RB_ROTATE_RIGHT(head, elm, tmp, field) do {			\
+	(tmp) = RB_LEFT(elm, field);					\
+	if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) {	\
+		RB_PARENT(RB_RIGHT(tmp, field), field) = (elm);		\
+	}								\
+	RB_AUGMENT(elm);						\
+	if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) {	\
+		if ((elm) == RB_LEFT(RB_PARENT(elm, field), field))	\
+			RB_LEFT(RB_PARENT(elm, field), field) = (tmp);	\
+		else							\
+			RB_RIGHT(RB_PARENT(elm, field), field) = (tmp);	\
+	} else								\
+		(head)->rbh_root = (tmp);				\
+	RB_RIGHT(tmp, field) = (elm);					\
+	RB_PARENT(elm, field) = (tmp);					\
+	RB_AUGMENT(tmp);						\
+	if ((RB_PARENT(tmp, field)))					\
+		RB_AUGMENT(RB_PARENT(tmp, field));			\
+} while (/*CONSTCOND*/ 0)
+
+/* Generates prototypes and inline functions */
+#define RB_PROTOTYPE(name, type, field, cmp)				\
+	RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
+#define	RB_PROTOTYPE_STATIC(name, type, field, cmp)			\
+	RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static)
+#define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr)		\
+attr void name##_RB_INSERT_COLOR(struct name *, struct type *);		\
+attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\
+attr struct type *name##_RB_REMOVE(struct name *, struct type *);	\
+attr struct type *name##_RB_INSERT(struct name *, struct type *);	\
+attr struct type *name##_RB_FIND(struct name *, struct type *);		\
+attr struct type *name##_RB_NFIND(struct name *, struct type *);	\
+attr struct type *name##_RB_NEXT(struct type *);			\
+attr struct type *name##_RB_PREV(struct type *);			\
+attr struct type *name##_RB_MINMAX(struct name *, int);			\
+									\
+
+/* Main rb operation.
+ * Moves node close to the key of elm to top
+ */
+#define	RB_GENERATE(name, type, field, cmp)				\
+	RB_GENERATE_INTERNAL(name, type, field, cmp,)
+#define	RB_GENERATE_STATIC(name, type, field, cmp)			\
+	RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static)
+#define RB_GENERATE_INTERNAL(name, type, field, cmp, attr)		\
+attr void								\
+name##_RB_INSERT_COLOR(struct name *head, struct type *elm)		\
+{									\
+	struct type *parent, *gparent, *tmp;				\
+	while ((parent = RB_PARENT(elm, field)) != NULL &&		\
+	    RB_COLOR(parent, field) == RB_RED) {			\
+		gparent = RB_PARENT(parent, field);			\
+		if (parent == RB_LEFT(gparent, field)) {		\
+			tmp = RB_RIGHT(gparent, field);			\
+			if (tmp && RB_COLOR(tmp, field) == RB_RED) {	\
+				RB_COLOR(tmp, field) = RB_BLACK;	\
+				RB_SET_BLACKRED(parent, gparent, field);\
+				elm = gparent;				\
+				continue;				\
+			}						\
+			if (RB_RIGHT(parent, field) == elm) {		\
+				RB_ROTATE_LEFT(head, parent, tmp, field);\
+				tmp = parent;				\
+				parent = elm;				\
+				elm = tmp;				\
+			}						\
+			RB_SET_BLACKRED(parent, gparent, field);	\
+			RB_ROTATE_RIGHT(head, gparent, tmp, field);	\
+		} else {						\
+			tmp = RB_LEFT(gparent, field);			\
+			if (tmp && RB_COLOR(tmp, field) == RB_RED) {	\
+				RB_COLOR(tmp, field) = RB_BLACK;	\
+				RB_SET_BLACKRED(parent, gparent, field);\
+				elm = gparent;				\
+				continue;				\
+			}						\
+			if (RB_LEFT(parent, field) == elm) {		\
+				RB_ROTATE_RIGHT(head, parent, tmp, field);\
+				tmp = parent;				\
+				parent = elm;				\
+				elm = tmp;				\
+			}						\
+			RB_SET_BLACKRED(parent, gparent, field);	\
+			RB_ROTATE_LEFT(head, gparent, tmp, field);	\
+		}							\
+	}								\
+	RB_COLOR(head->rbh_root, field) = RB_BLACK;			\
+}									\
+									\
+attr void								\
+name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
+{									\
+	struct type *tmp;						\
+	while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) &&	\
+	    elm != RB_ROOT(head)) {					\
+		if (RB_LEFT(parent, field) == elm) {			\
+			tmp = RB_RIGHT(parent, field);			\
+			if (RB_COLOR(tmp, field) == RB_RED) {		\
+				RB_SET_BLACKRED(tmp, parent, field);	\
+				RB_ROTATE_LEFT(head, parent, tmp, field);\
+				tmp = RB_RIGHT(parent, field);		\
+			}						\
+			if ((RB_LEFT(tmp, field) == NULL ||		\
+			    RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+			    (RB_RIGHT(tmp, field) == NULL ||		\
+			    RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+				RB_COLOR(tmp, field) = RB_RED;		\
+				elm = parent;				\
+				parent = RB_PARENT(elm, field);		\
+			} else {					\
+				if (RB_RIGHT(tmp, field) == NULL ||	\
+				    RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\
+					struct type *oleft;		\
+					if ((oleft = RB_LEFT(tmp, field)) \
+					    != NULL)			\
+						RB_COLOR(oleft, field) = RB_BLACK;\
+					RB_COLOR(tmp, field) = RB_RED;	\
+					RB_ROTATE_RIGHT(head, tmp, oleft, field);\
+					tmp = RB_RIGHT(parent, field);	\
+				}					\
+				RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+				RB_COLOR(parent, field) = RB_BLACK;	\
+				if (RB_RIGHT(tmp, field))		\
+					RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\
+				RB_ROTATE_LEFT(head, parent, tmp, field);\
+				elm = RB_ROOT(head);			\
+				break;					\
+			}						\
+		} else {						\
+			tmp = RB_LEFT(parent, field);			\
+			if (RB_COLOR(tmp, field) == RB_RED) {		\
+				RB_SET_BLACKRED(tmp, parent, field);	\
+				RB_ROTATE_RIGHT(head, parent, tmp, field);\
+				tmp = RB_LEFT(parent, field);		\
+			}						\
+			if ((RB_LEFT(tmp, field) == NULL ||		\
+			    RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\
+			    (RB_RIGHT(tmp, field) == NULL ||		\
+			    RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\
+				RB_COLOR(tmp, field) = RB_RED;		\
+				elm = parent;				\
+				parent = RB_PARENT(elm, field);		\
+			} else {					\
+				if (RB_LEFT(tmp, field) == NULL ||	\
+				    RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\
+					struct type *oright;		\
+					if ((oright = RB_RIGHT(tmp, field)) \
+					    != NULL)			\
+						RB_COLOR(oright, field) = RB_BLACK;\
+					RB_COLOR(tmp, field) = RB_RED;	\
+					RB_ROTATE_LEFT(head, tmp, oright, field);\
+					tmp = RB_LEFT(parent, field);	\
+				}					\
+				RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
+				RB_COLOR(parent, field) = RB_BLACK;	\
+				if (RB_LEFT(tmp, field))		\
+					RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\
+				RB_ROTATE_RIGHT(head, parent, tmp, field);\
+				elm = RB_ROOT(head);			\
+				break;					\
+			}						\
+		}							\
+	}								\
+	if (elm)							\
+		RB_COLOR(elm, field) = RB_BLACK;			\
+}									\
+									\
+attr struct type *							\
+name##_RB_REMOVE(struct name *head, struct type *elm)			\
+{									\
+	struct type *child, *parent, *old = elm;			\
+	int color;							\
+	if (RB_LEFT(elm, field) == NULL)				\
+		child = RB_RIGHT(elm, field);				\
+	else if (RB_RIGHT(elm, field) == NULL)				\
+		child = RB_LEFT(elm, field);				\
+	else {								\
+		struct type *left;					\
+		elm = RB_RIGHT(elm, field);				\
+		while ((left = RB_LEFT(elm, field)) != NULL)		\
+			elm = left;					\
+		child = RB_RIGHT(elm, field);				\
+		parent = RB_PARENT(elm, field);				\
+		color = RB_COLOR(elm, field);				\
+		if (child)						\
+			RB_PARENT(child, field) = parent;		\
+		if (parent) {						\
+			if (RB_LEFT(parent, field) == elm)		\
+				RB_LEFT(parent, field) = child;		\
+			else						\
+				RB_RIGHT(parent, field) = child;	\
+			RB_AUGMENT(parent);				\
+		} else							\
+			RB_ROOT(head) = child;				\
+		if (RB_PARENT(elm, field) == old)			\
+			parent = elm;					\
+		(elm)->field = (old)->field;				\
+		if (RB_PARENT(old, field)) {				\
+			if (RB_LEFT(RB_PARENT(old, field), field) == old)\
+				RB_LEFT(RB_PARENT(old, field), field) = elm;\
+			else						\
+				RB_RIGHT(RB_PARENT(old, field), field) = elm;\
+			RB_AUGMENT(RB_PARENT(old, field));		\
+		} else							\
+			RB_ROOT(head) = elm;				\
+		RB_PARENT(RB_LEFT(old, field), field) = elm;		\
+		if (RB_RIGHT(old, field))				\
+			RB_PARENT(RB_RIGHT(old, field), field) = elm;	\
+		if (parent) {						\
+			left = parent;					\
+			do {						\
+				RB_AUGMENT(left);			\
+			} while ((left = RB_PARENT(left, field)) != NULL); \
+		}							\
+		goto color;						\
+	}								\
+	parent = RB_PARENT(elm, field);					\
+	color = RB_COLOR(elm, field);					\
+	if (child)							\
+		RB_PARENT(child, field) = parent;			\
+	if (parent) {							\
+		if (RB_LEFT(parent, field) == elm)			\
+			RB_LEFT(parent, field) = child;			\
+		else							\
+			RB_RIGHT(parent, field) = child;		\
+		RB_AUGMENT(parent);					\
+	} else								\
+		RB_ROOT(head) = child;					\
+color:									\
+	if (color == RB_BLACK)						\
+		name##_RB_REMOVE_COLOR(head, parent, child);		\
+	return (old);							\
+}									\
+									\
+/* Inserts a node into the RB tree */					\
+attr struct type *							\
+name##_RB_INSERT(struct name *head, struct type *elm)			\
+{									\
+	struct type *tmp;						\
+	struct type *parent = NULL;					\
+	int comp = 0;							\
+	tmp = RB_ROOT(head);						\
+	while (tmp) {							\
+		parent = tmp;						\
+		comp = (cmp)(elm, parent);				\
+		if (comp < 0)						\
+			tmp = RB_LEFT(tmp, field);			\
+		else if (comp > 0)					\
+			tmp = RB_RIGHT(tmp, field);			\
+		else							\
+			return (tmp);					\
+	}								\
+	RB_SET(elm, parent, field);					\
+	if (parent != NULL) {						\
+		if (comp < 0)						\
+			RB_LEFT(parent, field) = elm;			\
+		else							\
+			RB_RIGHT(parent, field) = elm;			\
+		RB_AUGMENT(parent);					\
+	} else								\
+		RB_ROOT(head) = elm;					\
+	name##_RB_INSERT_COLOR(head, elm);				\
+	return (NULL);							\
+}									\
+									\
+/* Finds the node with the same key as elm */				\
+attr struct type *							\
+name##_RB_FIND(struct name *head, struct type *elm)			\
+{									\
+	struct type *tmp = RB_ROOT(head);				\
+	int comp;							\
+	while (tmp) {							\
+		comp = cmp(elm, tmp);					\
+		if (comp < 0)						\
+			tmp = RB_LEFT(tmp, field);			\
+		else if (comp > 0)					\
+			tmp = RB_RIGHT(tmp, field);			\
+		else							\
+			return (tmp);					\
+	}								\
+	return (NULL);							\
+}									\
+									\
+/* Finds the first node greater than or equal to the search key */	\
+attr struct type *							\
+name##_RB_NFIND(struct name *head, struct type *elm)			\
+{									\
+	struct type *tmp = RB_ROOT(head);				\
+	struct type *res = NULL;					\
+	int comp;							\
+	while (tmp) {							\
+		comp = cmp(elm, tmp);					\
+		if (comp < 0) {						\
+			res = tmp;					\
+			tmp = RB_LEFT(tmp, field);			\
+		}							\
+		else if (comp > 0)					\
+			tmp = RB_RIGHT(tmp, field);			\
+		else							\
+			return (tmp);					\
+	}								\
+	return (res);							\
+}									\
+									\
+/* ARGSUSED */								\
+attr struct type *							\
+name##_RB_NEXT(struct type *elm)					\
+{									\
+	if (RB_RIGHT(elm, field)) {					\
+		elm = RB_RIGHT(elm, field);				\
+		while (RB_LEFT(elm, field))				\
+			elm = RB_LEFT(elm, field);			\
+	} else {							\
+		if (RB_PARENT(elm, field) &&				\
+		    (elm == RB_LEFT(RB_PARENT(elm, field), field)))	\
+			elm = RB_PARENT(elm, field);			\
+		else {							\
+			while (RB_PARENT(elm, field) &&			\
+			    (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\
+				elm = RB_PARENT(elm, field);		\
+			elm = RB_PARENT(elm, field);			\
+		}							\
+	}								\
+	return (elm);							\
+}									\
+									\
+/* ARGSUSED */								\
+attr struct type *							\
+name##_RB_PREV(struct type *elm)					\
+{									\
+	if (RB_LEFT(elm, field)) {					\
+		elm = RB_LEFT(elm, field);				\
+		while (RB_RIGHT(elm, field))				\
+			elm = RB_RIGHT(elm, field);			\
+	} else {							\
+		if (RB_PARENT(elm, field) &&				\
+		    (elm == RB_RIGHT(RB_PARENT(elm, field), field)))	\
+			elm = RB_PARENT(elm, field);			\
+		else {							\
+			while (RB_PARENT(elm, field) &&			\
+			    (elm == RB_LEFT(RB_PARENT(elm, field), field)))\
+				elm = RB_PARENT(elm, field);		\
+			elm = RB_PARENT(elm, field);			\
+		}							\
+	}								\
+	return (elm);							\
+}									\
+									\
+attr struct type *							\
+name##_RB_MINMAX(struct name *head, int val)				\
+{									\
+	struct type *tmp = RB_ROOT(head);				\
+	struct type *parent = NULL;					\
+	while (tmp) {							\
+		parent = tmp;						\
+		if (val < 0)						\
+			tmp = RB_LEFT(tmp, field);			\
+		else							\
+			tmp = RB_RIGHT(tmp, field);			\
+	}								\
+	return (parent);						\
+}
+
+#define RB_NEGINF	-1
+#define RB_INF	1
+
+#define RB_INSERT(name, x, y)	name##_RB_INSERT(x, y)
+#define RB_REMOVE(name, x, y)	name##_RB_REMOVE(x, y)
+#define RB_FIND(name, x, y)	name##_RB_FIND(x, y)
+#define RB_NFIND(name, x, y)	name##_RB_NFIND(x, y)
+#define RB_NEXT(name, x, y)	name##_RB_NEXT(y)
+#define RB_PREV(name, x, y)	name##_RB_PREV(y)
+#define RB_MIN(name, x)		name##_RB_MINMAX(x, RB_NEGINF)
+#define RB_MAX(name, x)		name##_RB_MINMAX(x, RB_INF)
+
+#define RB_FOREACH(x, name, head)					\
+	for ((x) = RB_MIN(name, head);					\
+	     (x) != NULL;						\
+	     (x) = name##_RB_NEXT(x))
+
+#define RB_FOREACH_FROM(x, name, y)					\
+	for ((x) = (y);							\
+	    ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL);	\
+	     (x) = (y))
+
+#define RB_FOREACH_SAFE(x, name, head, y)				\
+	for ((x) = RB_MIN(name, head);					\
+	    ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL);	\
+	     (x) = (y))
+
+#define RB_FOREACH_REVERSE(x, name, head)				\
+	for ((x) = RB_MAX(name, head);					\
+	     (x) != NULL;						\
+	     (x) = name##_RB_PREV(x))
+
+#define RB_FOREACH_REVERSE_FROM(x, name, y)				\
+	for ((x) = (y);							\
+	    ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL);	\
+	     (x) = (y))
+
+#define RB_FOREACH_REVERSE_SAFE(x, name, head, y)			\
+	for ((x) = RB_MAX(name, head);					\
+	    ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL);	\
+	     (x) = (y))
+
+#endif	/* _SYS_TREE_H_ */
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox.inc b/yocto-poky/meta/recipes-core/busybox/busybox.inc
index 4d4709a..5e91a26 100644
--- a/yocto-poky/meta/recipes-core/busybox/busybox.inc
+++ b/yocto-poky/meta/recipes-core/busybox/busybox.inc
@@ -17,7 +17,9 @@
 
 export EXTRA_CFLAGS = "${CFLAGS}"
 export EXTRA_LDFLAGS = "${LDFLAGS}"
-export EXTRA_OEMAKE += "'LD=${CCLD}'"
+
+# We don't want '-e MAKEFLAGS=' in EXTRA_OEMAKE
+EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
 
 PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
 
@@ -33,9 +35,9 @@
 INITSCRIPT_NAME_${PN}-httpd = "busybox-httpd"
 INITSCRIPT_NAME_${PN}-hwclock = "hwclock.sh"
 INITSCRIPT_NAME_${PN}-mdev = "mdev"
-INITSCRIPT_PARAMS_${PN}-mdev = "start 03 S ."
+INITSCRIPT_PARAMS_${PN}-mdev = "start 04 S ."
 INITSCRIPT_NAME_${PN}-syslog = "syslog"
-INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd" 
+INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
 
 SYSTEMD_PACKAGES = "${PN}-syslog"
 SYSTEMD_SERVICE_${PN}-syslog = "busybox-syslog.service"
@@ -79,8 +81,7 @@
 	cnf, rem = features_to_busybox_settings(d)
 	return rem
 
-configmangle = '/CROSS_COMPILER_PREFIX/d; \
-		/CONFIG_EXTRA_CFLAGS/d; \
+configmangle = '/CONFIG_EXTRA_CFLAGS/d; \
 		'
 OE_FEATURES := "${@features_to_busybox_conf(d)}"
 OE_DEL      := "${@features_to_busybox_del(d)}"
@@ -96,8 +97,7 @@
                    ("\\n".join((d.expand("${OE_FEATURES}").split("\n")))))
   d.setVar('configmangle_append',
                  "/^### CROSS$/a\\\n%s\n" %
-                  ("\\n".join(["CONFIG_CROSS_COMPILER_PREFIX=\"${TARGET_PREFIX}\"",
-			       "CONFIG_EXTRA_CFLAGS=\"${CFLAGS}\" \"${HOST_CC_ARCH}\""
+                  ("\\n".join(["CONFIG_EXTRA_CFLAGS=\"${CFLAGS} ${HOST_CC_ARCH}\""
                         ])
                   ))
 }
@@ -171,20 +171,20 @@
 }
 
 do_install () {
-	if [ "${prefix}" != "/usr" ]; then
-		sed -i "s:^/usr/:${prefix}/:" busybox.links*
-	fi
-	if [ "${base_sbindir}" != "/sbin" ]; then
-		sed -i "s:^/sbin/:${base_sbindir}/:" busybox.links*
-	fi
-	if [ "${base_bindir}" != "/bin" ]; then
-		sed -i "s:^/bin/:${base_bindir}/:" busybox.links*
-	fi
+	sed -i "s:^/bin/:BASE_BINDIR/:" busybox.links*
+	sed -i "s:^/sbin/:BASE_SBINDIR/:" busybox.links*
+	sed -i "s:^/usr/bin/:BINDIR/:" busybox.links*
+	sed -i "s:^/usr/sbin/:SBINDIR/:" busybox.links*
+
+	sed -i "s:^BASE_BINDIR/:${base_bindir}/:" busybox.links*
+	sed -i "s:^BASE_SBINDIR/:${base_sbindir}/:" busybox.links*
+	sed -i "s:^BINDIR/:${bindir}/:" busybox.links*
+	sed -i "s:^SBINDIR/:${sbindir}/:" busybox.links*
 
 	install -d ${D}${sysconfdir}/init.d
 
 	if ! grep -q "CONFIG_FEATURE_INDIVIDUAL=y" ${B}/.config; then
-		# Install /bin/busybox, and the /bin/sh link so the postinst script
+		# Install ${base_bindir}/busybox, and the ${base_bindir}/sh link so the postinst script
 		# can run. Let update-alternatives handle the rest.
 		install -d ${D}${base_bindir}
 		if [ "${BUSYBOX_SPLIT_SUID}" = "1" ]; then
@@ -212,7 +212,7 @@
 			# We make this symlink here to eliminate the error when upgrading together
 			# with busybox-syslog. Without this symlink, the opkg may think of the
 			# busybox.nosuid as obsolete and remove it, resulting in dead links like
-			# /bin/sed -> /bin/busybox.nosuid. This will make upgrading busybox-syslog fail.
+			# ${base_bindir}/sed -> ${base_bindir}/busybox.nosuid. This will make upgrading busybox-syslog fail.
 			# This symlink will be safely deleted in postinst, thus no negative effect.
 			ln -sf busybox ${D}${base_bindir}/busybox.nosuid
 		fi
@@ -258,7 +258,8 @@
 	if grep "CONFIG_UDHCPC=y" ${B}/.config; then
 		install -d ${D}${sysconfdir}/udhcpc.d
 		install -d ${D}${datadir}/udhcpc
-                install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default
+		install -m 0755 ${WORKDIR}/simple.script ${D}${sysconfdir}/udhcpc.d/50default
+		sed -i "s:/SBIN_DIR/:${base_sbindir}/:" ${D}${sysconfdir}/udhcpc.d/50default
 		install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
 	fi
 	if grep "CONFIG_INETD=y" ${B}/.config; then
@@ -275,6 +276,21 @@
                        install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev
                fi
 	fi
+        if grep "CONFIG_INIT=y" ${B}/.config; then
+                install -D -m 0777 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d/rcS
+                install -D -m 0777 ${WORKDIR}/rcK ${D}${sysconfdir}/init.d/rcK
+                install -D -m 0755 ${WORKDIR}/runlevel ${D}${base_sbindir}/runlevel
+                if grep "CONFIG_FEATURE_USE_INITTAB=y" ${B}/.config; then
+                        install -D -m 0777 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
+                        tmp="${SERIAL_CONSOLES}"
+                        for i in $tmp
+                        do
+                                j=`echo ${i} | sed s/\;/\ /g`
+                                label=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
+                                echo "tty$label::respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+                        done
+                fi
+        fi
 
     if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
         if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then
@@ -300,6 +316,12 @@
     fi
 }
 
+do_install_ptest () {
+        cp -r ${B}/testsuite ${D}${PTEST_PATH}/
+        cp ${B}/.config      ${D}${PTEST_PATH}/
+        ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
+}
+
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "50"
@@ -325,6 +347,8 @@
     dvar = d.getVar('D', True)
     pn = d.getVar('PN', True)
     def set_alternative_vars(links, target):
+        links = d.expand(links)
+        target = d.expand(target)
         f = open('%s%s' % (dvar, links), 'r')
         for alt_link_name in f:
             alt_link_name = alt_link_name.strip()
@@ -362,21 +386,10 @@
 			if test -e ${sysconfdir}/busybox.links$suffix; then
 				while read link; do
 					if test ! -e "$link"; then
-						case "$link" in
-							/*/*/*)
-								to="../..${base_bindir}/busybox$suffix"
-								;;
-							/bin/*)
-								to="busybox$suffix"
-								;;
-							/*/*)
-								to="..${base_bindir}/busybox$suffix"
-								;;
-						esac
 						# 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 $to $link
+						busybox ln -s "${base_bindir}/busybox$suffix" $link
 					fi
 				done < ${sysconfdir}/busybox.links$suffix
 			fi
@@ -402,6 +415,7 @@
 	ln -s ${base_bindir}/busybox $tmpdir/sed
 	ln -s ${base_bindir}/busybox $tmpdir/sort
 	ln -s ${base_bindir}/busybox $tmpdir/grep
+	ln -s ${base_bindir}/busybox $tmpdir/tail
 	export PATH=$PATH:$tmpdir
 }
 
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/0001-Switch-to-POSIX-utmpx-API.patch b/yocto-poky/meta/recipes-core/busybox/busybox/0001-Switch-to-POSIX-utmpx-API.patch
deleted file mode 100644
index 1d299ee..0000000
--- a/yocto-poky/meta/recipes-core/busybox/busybox/0001-Switch-to-POSIX-utmpx-API.patch
+++ /dev/null
@@ -1,388 +0,0 @@
-From 86a7f18f211af1abda5c855d2674b0fcb53de524 Mon Sep 17 00:00:00 2001
-From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-Date: Thu, 2 Apr 2015 23:03:46 +0200
-Subject: [PATCH] *: Switch to POSIX utmpx API
-
-UTMP is SVID legacy, UTMPX is mandated by POSIX.
-
-Glibc and uClibc have identical layout of UTMP and UTMPX, both of these
-libc treat _PATH_UTMPX as _PATH_UTMP so from a user-perspective nothing
-changes except the names of the API entrypoints.
-
-Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
----
-Upstream-Status: Backport
-
- coreutils/who.c        |  8 ++++----
- include/libbb.h        |  2 +-
- init/halt.c            |  4 ++--
- libbb/utmp.c           | 44 ++++++++++++++++++++++----------------------
- miscutils/last.c       |  8 ++++----
- miscutils/last_fancy.c | 16 ++++++++++------
- miscutils/runlevel.c   | 12 ++++++------
- miscutils/wall.c       |  8 ++++----
- procps/uptime.c        |  6 +++---
- 9 files changed, 56 insertions(+), 52 deletions(-)
-
-diff --git a/coreutils/who.c b/coreutils/who.c
-index f955ce6..8337212 100644
---- a/coreutils/who.c
-+++ b/coreutils/who.c
-@@ -73,7 +73,7 @@ static void idle_string(char *str6, time_t t)
- int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int who_main(int argc UNUSED_PARAM, char **argv)
- {
--	struct utmp *ut;
-+	struct utmpx *ut;
- 	unsigned opt;
- 	int do_users = (ENABLE_USERS && (!ENABLE_WHO || applet_name[0] == 'u'));
- 	const char *fmt = "%s";
-@@ -83,8 +83,8 @@ int who_main(int argc UNUSED_PARAM, char **argv)
- 	if (opt & 2) // -H
- 		printf("USER\t\tTTY\t\tIDLE\tTIME\t\t HOST\n");
- 
--	setutent();
--	while ((ut = getutent()) != NULL) {
-+	setutxent();
-+	while ((ut = getutxent()) != NULL) {
- 		if (ut->ut_user[0]
- 		 && ((opt & 1) || ut->ut_type == USER_PROCESS)
- 		) {
-@@ -126,6 +126,6 @@ int who_main(int argc UNUSED_PARAM, char **argv)
- 	if (do_users)
- 		bb_putchar('\n');
- 	if (ENABLE_FEATURE_CLEAN_UP)
--		endutent();
-+		endutxent();
- 	return EXIT_SUCCESS;
- }
-diff --git a/include/libbb.h b/include/libbb.h
-index 26b6868..0f8363b 100644
---- a/include/libbb.h
-+++ b/include/libbb.h
-@@ -84,7 +84,7 @@
- # include <selinux/av_permissions.h>
- #endif
- #if ENABLE_FEATURE_UTMP
--# include <utmp.h>
-+# include <utmpx.h>
- #endif
- #if ENABLE_LOCALE_SUPPORT
- # include <locale.h>
-diff --git a/init/halt.c b/init/halt.c
-index 7974adb..ad12d91 100644
---- a/init/halt.c
-+++ b/init/halt.c
-@@ -74,7 +74,7 @@
- 
- static void write_wtmp(void)
- {
--	struct utmp utmp;
-+	struct utmpx utmp;
- 	struct utsname uts;
- 	/* "man utmp" says wtmp file should *not* be created automagically */
- 	/*if (access(bb_path_wtmp_file, R_OK|W_OK) == -1) {
-@@ -88,7 +88,7 @@ static void write_wtmp(void)
- 	utmp.ut_line[0] = '~'; utmp.ut_line[1] = '~'; /* = strcpy(utmp.ut_line, "~~"); */
- 	uname(&uts);
- 	safe_strncpy(utmp.ut_host, uts.release, sizeof(utmp.ut_host));
--	updwtmp(bb_path_wtmp_file, &utmp);
-+	updwtmpx(bb_path_wtmp_file, &utmp);
- }
- #else
- #define write_wtmp() ((void)0)
-diff --git a/libbb/utmp.c b/libbb/utmp.c
-index 8ad9ba2..bd07670 100644
---- a/libbb/utmp.c
-+++ b/libbb/utmp.c
-@@ -16,7 +16,7 @@ static void touch(const char *filename)
- 
- void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname)
- {
--	struct utmp utent;
-+	struct utmpx utent;
- 	char *id;
- 	unsigned width;
- 
-@@ -45,17 +45,17 @@ void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, con
- 		tty_name += 3;
- 	strncpy(id, tty_name, width);
- 
--	touch(_PATH_UTMP);
--	//utmpname(_PATH_UTMP);
--	setutent();
-+	touch(_PATH_UTMPX);
-+	//utmpxname(_PATH_UTMPX);
-+	setutxent();
- 	/* Append new one (hopefully, unless we collide on ut_id) */
--	pututline(&utent);
--	endutent();
-+	pututxline(&utent);
-+	endutxent();
- 
- #if ENABLE_FEATURE_WTMP
- 	/* "man utmp" says wtmp file should *not* be created automagically */
- 	/*touch(bb_path_wtmp_file);*/
--	updwtmp(bb_path_wtmp_file, &utent);
-+	updwtmpx(bb_path_wtmp_file, &utent);
- #endif
- }
- 
-@@ -64,17 +64,17 @@ void FAST_FUNC write_new_utmp(pid_t pid, int new_type, const char *tty_name, con
-  */
- void FAST_FUNC update_utmp(pid_t pid, int new_type, const char *tty_name, const char *username, const char *hostname)
- {
--	struct utmp utent;
--	struct utmp *utp;
-+	struct utmpx utent;
-+	struct utmpx *utp;
- 
--	touch(_PATH_UTMP);
--	//utmpname(_PATH_UTMP);
--	setutent();
-+	touch(_PATH_UTMPX);
-+	//utmpxname(_PATH_UTMPX);
-+	setutxent();
- 
- 	/* Did init/getty/telnetd/sshd/... create an entry for us?
- 	 * It should be (new_type-1), but we'd also reuse
- 	 * any other potentially stale xxx_PROCESS entry */
--	while ((utp = getutent()) != NULL) {
-+	while ((utp = getutxent()) != NULL) {
- 		if (utp->ut_pid == pid
- 		// && ut->ut_line[0]
- 		 && utp->ut_id[0] /* must have nonzero id */
-@@ -88,25 +88,25 @@ void FAST_FUNC update_utmp(pid_t pid, int new_type, const char *tty_name, const
- 				/* Stale record. Nuke hostname */
- 				memset(utp->ut_host, 0, sizeof(utp->ut_host));
- 			}
--			/* NB: pututline (see later) searches for matching utent
--			 * using getutid(utent) - we must not change ut_id
-+			/* NB: pututxline (see later) searches for matching utxent
-+			 * using getutxid(utent) - we must not change ut_id
- 			 * if we want *exactly this* record to be overwritten!
- 			 */
- 			break;
- 		}
- 	}
--	//endutent(); - no need, pututline can deal with (and actually likes)
-+	//endutxent(); - no need, pututxline can deal with (and actually likes)
- 	//the situation when utmp file is positioned on found record
- 
- 	if (!utp) {
- 		if (new_type != DEAD_PROCESS)
- 			write_new_utmp(pid, new_type, tty_name, username, hostname);
- 		else
--			endutent();
-+			endutxent();
- 		return;
- 	}
- 
--	/* Make a copy. We can't use *utp, pututline's internal getutid
-+	/* Make a copy. We can't use *utp, pututxline's internal getutxid
- 	 * will overwrite it before it is used! */
- 	utent = *utp;
- 
-@@ -120,14 +120,14 @@ void FAST_FUNC update_utmp(pid_t pid, int new_type, const char *tty_name, const
- 	utent.ut_tv.tv_sec = time(NULL);
- 
- 	/* Update, or append new one */
--	//setutent();
--	pututline(&utent);
--	endutent();
-+	//setutxent();
-+	pututxline(&utent);
-+	endutxent();
- 
- #if ENABLE_FEATURE_WTMP
- 	/* "man utmp" says wtmp file should *not* be created automagically */
- 	/*touch(bb_path_wtmp_file);*/
--	updwtmp(bb_path_wtmp_file, &utent);
-+	updwtmpx(bb_path_wtmp_file, &utent);
- #endif
- }
- 
-diff --git a/miscutils/last.c b/miscutils/last.c
-index a144c7e..6d8b584 100644
---- a/miscutils/last.c
-+++ b/miscutils/last.c
-@@ -32,21 +32,21 @@
- 
- #if defined UT_LINESIZE \
- 	&& ((UT_LINESIZE != 32) || (UT_NAMESIZE != 32) || (UT_HOSTSIZE != 256))
--#error struct utmp member char[] size(s) have changed!
-+#error struct utmpx member char[] size(s) have changed!
- #elif defined __UT_LINESIZE \
- 	&& ((__UT_LINESIZE != 32) || (__UT_NAMESIZE != 64) || (__UT_HOSTSIZE != 256))
--#error struct utmp member char[] size(s) have changed!
-+#error struct utmpx member char[] size(s) have changed!
- #endif
- 
- #if EMPTY != 0 || RUN_LVL != 1 || BOOT_TIME != 2 || NEW_TIME != 3 || \
- 	OLD_TIME != 4
--#error Values for the ut_type field of struct utmp changed
-+#error Values for the ut_type field of struct utmpx changed
- #endif
- 
- int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int last_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
- {
--	struct utmp ut;
-+	struct utmpx ut;
- 	int n, file = STDIN_FILENO;
- 	time_t t_tmp;
- 	off_t pos;
-diff --git a/miscutils/last_fancy.c b/miscutils/last_fancy.c
-index 16ed9e9..8194e31 100644
---- a/miscutils/last_fancy.c
-+++ b/miscutils/last_fancy.c
-@@ -22,6 +22,10 @@
- #define HEADER_LINE_WIDE  "USER", "TTY", \
- 	INET6_ADDRSTRLEN, INET6_ADDRSTRLEN, "HOST", "LOGIN", "  TIME", ""
- 
-+#if !defined __UT_LINESIZE && defined UT_LINESIZE
-+# define __UT_LINESIZE UT_LINESIZE
-+#endif
-+
- enum {
- 	NORMAL,
- 	LOGGED,
-@@ -39,7 +43,7 @@ enum {
- 
- #define show_wide (option_mask32 & LAST_OPT_W)
- 
--static void show_entry(struct utmp *ut, int state, time_t dur_secs)
-+static void show_entry(struct utmpx *ut, int state, time_t dur_secs)
- {
- 	unsigned days, hours, mins;
- 	char duration[sizeof("(%u+02:02)") + sizeof(int)*3];
-@@ -104,7 +108,7 @@ static void show_entry(struct utmp *ut, int state, time_t dur_secs)
- 		duration_str);
- }
- 
--static int get_ut_type(struct utmp *ut)
-+static int get_ut_type(struct utmpx *ut)
- {
- 	if (ut->ut_line[0] == '~') {
- 		if (strcmp(ut->ut_user, "shutdown") == 0) {
-@@ -142,7 +146,7 @@ static int get_ut_type(struct utmp *ut)
- 	return ut->ut_type;
- }
- 
--static int is_runlevel_shutdown(struct utmp *ut)
-+static int is_runlevel_shutdown(struct utmpx *ut)
- {
- 	if (((ut->ut_pid & 255) == '0') || ((ut->ut_pid & 255) == '6')) {
- 		return 1;
-@@ -154,7 +158,7 @@ static int is_runlevel_shutdown(struct utmp *ut)
- int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int last_main(int argc UNUSED_PARAM, char **argv)
- {
--	struct utmp ut;
-+	struct utmpx ut;
- 	const char *filename = _PATH_WTMP;
- 	llist_t *zlist;
- 	off_t pos;
-@@ -242,9 +246,9 @@ int last_main(int argc UNUSED_PARAM, char **argv)
- 			{
- 				llist_t *el, *next;
- 				for (el = zlist; el; el = next) {
--					struct utmp *up = (struct utmp *)el->data;
-+					struct utmpx *up = (struct utmpx *)el->data;
- 					next = el->link;
--					if (strncmp(up->ut_line, ut.ut_line, UT_LINESIZE) == 0) {
-+					if (strncmp(up->ut_line, ut.ut_line, __UT_LINESIZE) == 0) {
- 						if (show) {
- 							show_entry(&ut, NORMAL, up->ut_tv.tv_sec);
- 							show = 0;
-diff --git a/miscutils/runlevel.c b/miscutils/runlevel.c
-index 76231df..8558db8 100644
---- a/miscutils/runlevel.c
-+++ b/miscutils/runlevel.c
-@@ -29,19 +29,19 @@
- int runlevel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int runlevel_main(int argc UNUSED_PARAM, char **argv)
- {
--	struct utmp *ut;
-+	struct utmpx *ut;
- 	char prev;
- 
--	if (argv[1]) utmpname(argv[1]);
-+	if (argv[1]) utmpxname(argv[1]);
- 
--	setutent();
--	while ((ut = getutent()) != NULL) {
-+	setutxent();
-+	while ((ut = getutxent()) != NULL) {
- 		if (ut->ut_type == RUN_LVL) {
- 			prev = ut->ut_pid / 256;
- 			if (prev == 0) prev = 'N';
- 			printf("%c %c\n", prev, ut->ut_pid % 256);
- 			if (ENABLE_FEATURE_CLEAN_UP)
--				endutent();
-+				endutxent();
- 			return 0;
- 		}
- 	}
-@@ -49,6 +49,6 @@ int runlevel_main(int argc UNUSED_PARAM, char **argv)
- 	puts("unknown");
- 
- 	if (ENABLE_FEATURE_CLEAN_UP)
--		endutent();
-+		endutxent();
- 	return 1;
- }
-diff --git a/miscutils/wall.c b/miscutils/wall.c
-index bb709ee..50658f4 100644
---- a/miscutils/wall.c
-+++ b/miscutils/wall.c
-@@ -32,7 +32,7 @@
- int wall_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int wall_main(int argc UNUSED_PARAM, char **argv)
- {
--	struct utmp *ut;
-+	struct utmpx *ut;
- 	char *msg;
- 	int fd;
- 
-@@ -46,8 +46,8 @@ int wall_main(int argc UNUSED_PARAM, char **argv)
- 	msg = xmalloc_read(fd, NULL);
- 	if (ENABLE_FEATURE_CLEAN_UP && argv[1])
- 		close(fd);
--	setutent();
--	while ((ut = getutent()) != NULL) {
-+	setutxent();
-+	while ((ut = getutxent()) != NULL) {
- 		char *line;
- 		if (ut->ut_type != USER_PROCESS)
- 			continue;
-@@ -56,7 +56,7 @@ int wall_main(int argc UNUSED_PARAM, char **argv)
- 		free(line);
- 	}
- 	if (ENABLE_FEATURE_CLEAN_UP) {
--		endutent();
-+		endutxent();
- 		free(msg);
- 	}
- 	return EXIT_SUCCESS;
-diff --git a/procps/uptime.c b/procps/uptime.c
-index 778812a..149bae6 100644
---- a/procps/uptime.c
-+++ b/procps/uptime.c
-@@ -81,10 +81,10 @@ int uptime_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
- 
- #if ENABLE_FEATURE_UPTIME_UTMP_SUPPORT
- 	{
--		struct utmp *ut;
-+		struct utmpx *ut;
- 		unsigned users = 0;
--		while ((ut = getutent()) != NULL) {
--			if ((ut->ut_type == USER_PROCESS) && (ut->ut_name[0] != '\0'))
-+		while ((ut = getutxent()) != NULL) {
-+			if ((ut->ut_type == USER_PROCESS) && (ut->ut_user[0] != '\0'))
- 				users++;
- 		}
- 		printf(",  %u users", users);
--- 
-2.5.1
-
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/0001-chown-fix-help-text.patch b/yocto-poky/meta/recipes-core/busybox/busybox/0001-chown-fix-help-text.patch
deleted file mode 100644
index 4299799..0000000
--- a/yocto-poky/meta/recipes-core/busybox/busybox/0001-chown-fix-help-text.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From d291c2fdd5cb8616605c67ecbfb04274fa094242 Mon Sep 17 00:00:00 2001
-From: Junling Zheng <zhengjunling@huawei.com>
-Date: Sun, 7 Jun 2015 02:32:23 +0200
-Subject: [PATCH] chown: fix help text
-
-Derived from:
-http://git.busybox.net/busybox/commit/?id=d291c2fdd5cb8616605c67ecbfb04274fa094242.
-
-Only when DESKTOP is enabled, chown has -L, -H and -P options.
-
-Upstream-Status: Backport
-
-Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- coreutils/chown.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/coreutils/chown.c b/coreutils/chown.c
-index cb07bbc..679c0d8 100644
---- a/coreutils/chown.c
-+++ b/coreutils/chown.c
-@@ -11,7 +11,7 @@
- /* http://www.opengroup.org/onlinepubs/007904975/utilities/chown.html */
- 
- //usage:#define chown_trivial_usage
--//usage:       "[-RhLHP"IF_DESKTOP("cvf")"]... OWNER[<.|:>[GROUP]] FILE..."
-+//usage:       "[-Rh"IF_DESKTOP("LHPcvf")"]... OWNER[<.|:>[GROUP]] FILE..."
- //usage:#define chown_full_usage "\n\n"
- //usage:       "Change the owner and/or group of each FILE to OWNER and/or GROUP\n"
- //usage:     "\n	-R	Recurse"
--- 
-1.8.3.4
-
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/0001-ifconfig-fix-double-free-fatal-error-in-INET_sprint.patch b/yocto-poky/meta/recipes-core/busybox/busybox/0001-ifconfig-fix-double-free-fatal-error-in-INET_sprint.patch
deleted file mode 100644
index 2d729b1..0000000
--- a/yocto-poky/meta/recipes-core/busybox/busybox/0001-ifconfig-fix-double-free-fatal-error-in-INET_sprint.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From a97777889328157bb7d06ec618bad16712a9c345 Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Tue, 3 Feb 2015 12:11:30 +0100
-Subject: [PATCH] ifconfig: fix double free fatal error in INET_sprint
-
-Derived from:
-http://git.busybox.net/busybox/commit/?id=a97777889328157bb7d06ec618bad16712a9c345.
-
-While INET_sprint or INET6_sprint is called circularly by keeping
-ifconfiging, sap->sa_family would be cleaned by other parallel processes
-such as dhclient sometimes, and then there would be a double free error
-like the following:
-
-  *** glibc detected *** ifconfig: double free or corruption (fasttop): 0x000a6008 ***
-  ======= Backtrace: =========
-  /lib/libc.so.6(+0x6bc84)[0x40133c84]
-  /lib/libc.so.6(cfree+0x94)[0x40138684]
-  ifconfig[0x1c460]
-  ifconfig[0x1c6a0]
-  ifconfig[0x1ccf4]
-  ifconfig[0x187c8]
-  ifconfig[0xd544]
-  ifconfig[0xd5dc]
-  ifconfig[0xdca8]
-  /lib/libc.so.6(__libc_start_main+0x110)[0x400df258]
-  ======= Memory map: ========
-  00008000-0009c000 r-xp 00000000 1f:05 444328     /bin/busybox
-  000a3000-000a4000 rw-p 00093000 1f:05 444328     /bin/busybox
-
-This patch moved free() two lines down to address this problem.
-
-Upstream-Status: Backport
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- networking/interface.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/networking/interface.c b/networking/interface.c
-index bf7d2b1..b0572d0 100644
---- a/networking/interface.c
-+++ b/networking/interface.c
-@@ -91,9 +91,9 @@ static const char* FAST_FUNC INET_sprint(struct sockaddr *sap, int numeric)
- {
- 	static char *buff; /* defaults to NULL */
- 
--	free(buff);
- 	if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
- 		return "[NONE SET]";
-+	free(buff);
- 	buff = INET_rresolve((struct sockaddr_in *) sap, numeric, 0xffffff00);
- 	return buff;
- }
-@@ -173,9 +173,9 @@ static const char* FAST_FUNC INET6_sprint(struct sockaddr *sap, int numeric)
- {
- 	static char *buff;
- 
--	free(buff);
- 	if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
- 		return "[NONE SET]";
-+	free(buff);
- 	buff = INET6_rresolve((struct sockaddr_in6 *) sap, numeric);
- 	return buff;
- }
--- 
-1.8.3.4
-
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/0001-randconfig-fix.patch b/yocto-poky/meta/recipes-core/busybox/busybox/0001-randconfig-fix.patch
deleted file mode 100644
index 415ec34..0000000
--- a/yocto-poky/meta/recipes-core/busybox/busybox/0001-randconfig-fix.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-If CONFIG_FEATURE_LAST_SMALL is enabled the build fails because of a broken
-__UT_NAMESIZE test.
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 932302666b0354ede63504d1bef8393cab28db8b Mon Sep 17 00:00:00 2001
-From: Denys Vlasenko <vda.linux@googlemail.com>
-Date: Sun, 11 Oct 2015 16:58:18 +0200
-Subject: [PATCH] randconfig fix
-
-Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
----
- miscutils/last.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/miscutils/last.c b/miscutils/last.c
-index 6d8b584..f8f3437 100644
---- a/miscutils/last.c
-+++ b/miscutils/last.c
-@@ -34,7 +34,8 @@
- 	&& ((UT_LINESIZE != 32) || (UT_NAMESIZE != 32) || (UT_HOSTSIZE != 256))
- #error struct utmpx member char[] size(s) have changed!
- #elif defined __UT_LINESIZE \
--	&& ((__UT_LINESIZE != 32) || (__UT_NAMESIZE != 64) || (__UT_HOSTSIZE != 256))
-+	&& ((__UT_LINESIZE != 32) || (__UT_NAMESIZE != 32) || (__UT_HOSTSIZE != 256))
-+/* __UT_NAMESIZE was checked with 64 above, but glibc-2.11 definitely uses 32! */
- #error struct utmpx member char[] size(s) have changed!
- #endif
- 
--- 
-2.6.4
-
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/0002-Passthrough-r-to-linker.patch b/yocto-poky/meta/recipes-core/busybox/busybox/0002-Passthrough-r-to-linker.patch
deleted file mode 100644
index de286fb..0000000
--- a/yocto-poky/meta/recipes-core/busybox/busybox/0002-Passthrough-r-to-linker.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From df2cc76cdebc4773361477f3db203790f6986e3b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 22 Aug 2015 23:42:40 -0700
-Subject: [PATCH 2/2] Passthrough -r to linker
-
-clang does not have -r switch and it does not pass it down to linker
-either, LDFLAGS_RELOCATABLE is used when CC is used for LD, so this
-should not cause side effects
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 9da02cb..10dd4a9 100644
---- a/Makefile
-+++ b/Makefile
-@@ -309,7 +309,7 @@ CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(C
- MODFLAGS	= -DMODULE
- CFLAGS_MODULE   = $(MODFLAGS)
- AFLAGS_MODULE   = $(MODFLAGS)
--LDFLAGS_RELOCATABLE = -r -nostdlib
-+LDFLAGS_RELOCATABLE = -Xlinker -r -nostdlib
- LDFLAGS_MODULE  = $(LDFLAGS_RELOCATABLE)
- CFLAGS_KERNEL	=
- AFLAGS_KERNEL	=
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch b/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
new file mode 100644
index 0000000..cdc9108
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-truncate-open-mode.patch
@@ -0,0 +1,81 @@
+Upstream-Status: Backport
+
+  http://busybox.net/downloads/fixes-1.24.1/
+  https://git.busybox.net/busybox/commit/?id=e111a1640494fe87fc913f94fae3bb805de0fc99
+  https://git.busybox.net/busybox/commit/?h=1_24_stable&id=be729c1d3b5c923f10871dd68ea94156d0f8c803
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+From be729c1d3b5c923f10871dd68ea94156d0f8c803 Mon Sep 17 00:00:00 2001
+From: Ari Sundholm <ari@tuxera.com>
+Date: Mon, 4 Jan 2016 15:40:37 +0200
+Subject: [PATCH] truncate: always set mode when opening file to avoid fortify
+ errors
+
+Busybox crashes due to no mode being given when opening:
+$ ./busybox truncate -s 1M foo
+*** invalid open64 call: O_CREAT without mode ***: ./busybox terminated
+======= Backtrace: =========
+/lib/x86_64-linux-gnu/libc.so.6(+0x7338f)[0x7f66d921338f]
+/lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f66d92aac9c]
+/lib/x86_64-linux-gnu/libc.so.6(+0xeb6aa)[0x7f66d928b6aa]
+./busybox[0x4899f9]
+======= Memory map: ========
+00400000-004d0000 r-xp 00000000 00:1a 137559                             /home/ari/busybox/busybox
+006cf000-006d0000 r--p 000cf000 00:1a 137559                             /home/ari/busybox/busybox
+006d0000-006d1000 rw-p 000d0000 00:1a 137559                             /home/ari/busybox/busybox
+006d1000-006d4000 rw-p 00000000 00:00 0
+014e7000-01508000 rw-p 00000000 00:00 0                                  [heap]
+7f66d8f8a000-7f66d8fa0000 r-xp 00000000 08:07 1579008                    /lib/x86_64-linux-gnu/libgcc_s.so.1
+7f66d8fa0000-7f66d919f000 ---p 00016000 08:07 1579008                    /lib/x86_64-linux-gnu/libgcc_s.so.1
+7f66d919f000-7f66d91a0000 rw-p 00015000 08:07 1579008                    /lib/x86_64-linux-gnu/libgcc_s.so.1
+7f66d91a0000-7f66d935b000 r-xp 00000000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
+7f66d935b000-7f66d955a000 ---p 001bb000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
+7f66d955a000-7f66d955e000 r--p 001ba000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
+7f66d955e000-7f66d9560000 rw-p 001be000 08:07 1578994                    /lib/x86_64-linux-gnu/libc-2.19.so
+7f66d9560000-7f66d9565000 rw-p 00000000 00:00 0
+7f66d9565000-7f66d966a000 r-xp 00000000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
+7f66d966a000-7f66d9869000 ---p 00105000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
+7f66d9869000-7f66d986a000 r--p 00104000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
+7f66d986a000-7f66d986b000 rw-p 00105000 08:07 1579020                    /lib/x86_64-linux-gnu/libm-2.19.so
+7f66d986b000-7f66d988e000 r-xp 00000000 08:07 1578981                    /lib/x86_64-linux-gnu/ld-2.19.so
+7f66d9a64000-7f66d9a67000 rw-p 00000000 00:00 0
+7f66d9a8a000-7f66d9a8d000 rw-p 00000000 00:00 0
+7f66d9a8d000-7f66d9a8e000 r--p 00022000 08:07 1578981                    /lib/x86_64-linux-gnu/ld-2.19.so
+7f66d9a8e000-7f66d9a8f000 rw-p 00023000 08:07 1578981                    /lib/x86_64-linux-gnu/ld-2.19.so
+7f66d9a8f000-7f66d9a90000 rw-p 00000000 00:00 0
+7ffc47761000-7ffc47782000 rw-p 00000000 00:00 0                          [stack]
+7ffc477ab000-7ffc477ad000 r-xp 00000000 00:00 0                          [vdso]
+ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
+Aborted (core dumped)
+$
+
+Fix this by simply always setting the mode, as it doesn't hurt even
+when O_CREAT is not specified.
+
+This bug is a regression introduced in fc3e40e, as xopen(), which
+was originally used, would automatically set the mode.
+
+Signed-off-by: Ari Sundholm <ari@tuxera.com>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+(cherry picked from commit e111a1640494fe87fc913f94fae3bb805de0fc99)
+---
+ coreutils/truncate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/coreutils/truncate.c b/coreutils/truncate.c
+index e5fa656..4c997bf 100644
+--- a/coreutils/truncate.c
++++ b/coreutils/truncate.c
+@@ -64,7 +64,7 @@ int truncate_main(int argc UNUSED_PARAM, char **argv)
+ 
+ 	argv += optind;
+ 	while (*argv) {
+-		int fd = open(*argv, flags);
++		int fd = open(*argv, flags, 0666);
+ 		if (fd < 0) {
+ 			if (errno != ENOENT || !(opts & OPT_NOCREATE)) {
+ 				bb_perror_msg("%s: open", *argv);
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch b/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
new file mode 100644
index 0000000..e3c5020
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip-regression.patch
@@ -0,0 +1,143 @@
+Upstream-Status: Backport
+
+  http://busybox.net/downloads/fixes-1.24.1/
+  http://git.busybox.net/busybox/commit/?id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
+  http://git.busybox.net/busybox/commit/?h=1_24_stable&id=092fabcf1df5d46cd22be4ffcd3b871f6180eb9c
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+From 092fabcf1df5d46cd22be4ffcd3b871f6180eb9c Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Fri, 30 Oct 2015 23:41:53 +0100
+Subject: [PATCH] [g]unzip: fix recent breakage.
+
+Also, do emit error message we so painstakingly pass from gzip internals
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+(cherry picked from commit 6bd3fff51aa74e2ee2d87887b12182a3b09792ef)
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ archival/libarchive/decompress_gunzip.c | 33 +++++++++++++++++++++------------
+ testsuite/unzip.tests                   |  1 +
+ 2 files changed, 22 insertions(+), 12 deletions(-)
+
+diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
+index c76fd31..357c9bf 100644
+--- a/archival/libarchive/decompress_gunzip.c
++++ b/archival/libarchive/decompress_gunzip.c
+@@ -309,8 +309,7 @@ static int huft_build(const unsigned *b, const unsigned n,
+ 	huft_t *q;              /* points to current table */
+ 	huft_t r;               /* table entry for structure assignment */
+ 	huft_t *u[BMAX];        /* table stack */
+-	unsigned v[N_MAX];      /* values in order of bit length */
+-	unsigned v_end;
++	unsigned v[N_MAX + 1];  /* values in order of bit length. last v[] is never used */
+ 	int ws[BMAX + 1];       /* bits decoded stack */
+ 	int w;                  /* bits decoded */
+ 	unsigned x[BMAX + 1];   /* bit offsets, then code stack */
+@@ -365,15 +364,17 @@ static int huft_build(const unsigned *b, const unsigned n,
+ 		*xp++ = j;
+ 	}
+ 
+-	/* Make a table of values in order of bit lengths */
++	/* Make a table of values in order of bit lengths.
++	 * To detect bad input, unused v[i]'s are set to invalid value UINT_MAX.
++	 * In particular, last v[i] is never filled and must not be accessed.
++	 */
++	memset(v, 0xff, sizeof(v));
+ 	p = b;
+ 	i = 0;
+-	v_end = 0;
+ 	do {
+ 		j = *p++;
+ 		if (j != 0) {
+ 			v[x[j]++] = i;
+-			v_end = x[j];
+ 		}
+ 	} while (++i < n);
+ 
+@@ -435,7 +436,9 @@ static int huft_build(const unsigned *b, const unsigned n,
+ 
+ 			/* set up table entry in r */
+ 			r.b = (unsigned char) (k - w);
+-			if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
++			if (/*p >= v + n || -- redundant, caught by the second check: */
++			    *p == UINT_MAX /* do we access uninited v[i]? (see memset(v))*/
++			) {
+ 				r.e = 99; /* out of values--invalid code */
+ 			} else if (*p < s) {
+ 				r.e = (unsigned char) (*p < 256 ? 16 : 15);	/* 256 is EOB code */
+@@ -520,8 +523,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
+ 		e = t->e;
+ 		if (e > 16)
+ 			do {
+-				if (e == 99)
+-					abort_unzip(PASS_STATE_ONLY);;
++				if (e == 99) {
++					abort_unzip(PASS_STATE_ONLY);
++				}
+ 				bb >>= t->b;
+ 				k -= t->b;
+ 				e -= 16;
+@@ -557,8 +561,9 @@ static NOINLINE int inflate_codes(STATE_PARAM_ONLY)
+ 			e = t->e;
+ 			if (e > 16)
+ 				do {
+-					if (e == 99)
++					if (e == 99) {
+ 						abort_unzip(PASS_STATE_ONLY);
++					}
+ 					bb >>= t->b;
+ 					k -= t->b;
+ 					e -= 16;
+@@ -824,8 +829,9 @@ static int inflate_block(STATE_PARAM smallint *e)
+ 
+ 		b_dynamic >>= 4;
+ 		k_dynamic -= 4;
+-		if (nl > 286 || nd > 30)
++		if (nl > 286 || nd > 30) {
+ 			abort_unzip(PASS_STATE_ONLY);	/* bad lengths */
++		}
+ 
+ 		/* read in bit-length-code lengths */
+ 		for (j = 0; j < nb; j++) {
+@@ -906,12 +912,14 @@ static int inflate_block(STATE_PARAM smallint *e)
+ 		bl = lbits;
+ 
+ 		i = huft_build(ll, nl, 257, cplens, cplext, &inflate_codes_tl, &bl);
+-		if (i != 0)
++		if (i != 0) {
+ 			abort_unzip(PASS_STATE_ONLY);
++		}
+ 		bd = dbits;
+ 		i = huft_build(ll + nl, nd, 0, cpdist, cpdext, &inflate_codes_td, &bd);
+-		if (i != 0)
++		if (i != 0) {
+ 			abort_unzip(PASS_STATE_ONLY);
++		}
+ 
+ 		/* set up data for inflate_codes() */
+ 		inflate_codes_setup(PASS_STATE bl, bd);
+@@ -999,6 +1007,7 @@ inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate)
+ 	error_msg = "corrupted data";
+ 	if (setjmp(error_jmp)) {
+ 		/* Error from deep inside zip machinery */
++		bb_error_msg(error_msg);
+ 		n = -1;
+ 		goto ret;
+ 	}
+diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
+index ca0a458..d8738a3 100755
+--- a/testsuite/unzip.tests
++++ b/testsuite/unzip.tests
+@@ -34,6 +34,7 @@ rm foo.zip
+ testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
+ "Archive:  bad.zip
+   inflating: ]3j½r«IK-%Ix
++unzip: corrupted data
+ unzip: inflate error
+ 1
+ " \
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch b/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
new file mode 100644
index 0000000..7186726
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/busybox/busybox-1.24.1-unzip.patch
@@ -0,0 +1,118 @@
+Upstream-Status: Backport
+
+  http://busybox.net/downloads/fixes-1.24.1/
+  http://git.busybox.net/busybox/commit/?id=1de25a6e87e0e627aa34298105a3d17c60a1f44e
+  http://git.busybox.net/busybox/commit/?h=1_24_stable&id=6767af17f11144c7cd3cfe9ef799d7f89a78fe65
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+From 1de25a6e87e0e627aa34298105a3d17c60a1f44e Mon Sep 17 00:00:00 2001
+From: Denys Vlasenko <vda.linux@googlemail.com>
+Date: Mon, 26 Oct 2015 19:33:05 +0100
+Subject: [PATCH] unzip: test for bad archive SEGVing
+
+function                                             old     new   delta
+huft_build                                          1296    1300      +4
+
+Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
+---
+ archival/libarchive/decompress_gunzip.c | 11 +++++++----
+ testsuite/unzip.tests                   | 23 ++++++++++++++++++++++-
+ 2 files changed, 29 insertions(+), 5 deletions(-)
+
+diff --git a/archival/libarchive/decompress_gunzip.c b/archival/libarchive/decompress_gunzip.c
+index 7b6f459..30bf451 100644
+--- a/archival/libarchive/decompress_gunzip.c
++++ b/archival/libarchive/decompress_gunzip.c
+@@ -305,11 +305,12 @@ static int huft_build(const unsigned *b, const unsigned n,
+ 	unsigned i;             /* counter, current code */
+ 	unsigned j;             /* counter */
+ 	int k;                  /* number of bits in current code */
+-	unsigned *p;            /* pointer into c[], b[], or v[] */
++	const unsigned *p;      /* pointer into c[], b[], or v[] */
+ 	huft_t *q;              /* points to current table */
+ 	huft_t r;               /* table entry for structure assignment */
+ 	huft_t *u[BMAX];        /* table stack */
+ 	unsigned v[N_MAX];      /* values in order of bit length */
++	unsigned v_end;
+ 	int ws[BMAX + 1];       /* bits decoded stack */
+ 	int w;                  /* bits decoded */
+ 	unsigned x[BMAX + 1];   /* bit offsets, then code stack */
+@@ -324,7 +325,7 @@ static int huft_build(const unsigned *b, const unsigned n,
+ 
+ 	/* Generate counts for each bit length */
+ 	memset(c, 0, sizeof(c));
+-	p = (unsigned *) b; /* cast allows us to reuse p for pointing to b */
++	p = b;
+ 	i = n;
+ 	do {
+ 		c[*p]++; /* assume all entries <= BMAX */
+@@ -365,12 +366,14 @@ static int huft_build(const unsigned *b, const unsigned n,
+ 	}
+ 
+ 	/* Make a table of values in order of bit lengths */
+-	p = (unsigned *) b;
++	p = b;
+ 	i = 0;
++	v_end = 0;
+ 	do {
+ 		j = *p++;
+ 		if (j != 0) {
+ 			v[x[j]++] = i;
++			v_end = x[j];
+ 		}
+ 	} while (++i < n);
+ 
+@@ -432,7 +435,7 @@ static int huft_build(const unsigned *b, const unsigned n,
+ 
+ 			/* set up table entry in r */
+ 			r.b = (unsigned char) (k - w);
+-			if (p >= v + n) {
++			if (p >= v + v_end) { // Was "if (p >= v + n)" but v[] can be shorter!
+ 				r.e = 99; /* out of values--invalid code */
+ 			} else if (*p < s) {
+ 				r.e = (unsigned char) (*p < 256 ? 16 : 15);	/* 256 is EOB code */
+diff --git a/testsuite/unzip.tests b/testsuite/unzip.tests
+index 8677a03..ca0a458 100755
+--- a/testsuite/unzip.tests
++++ b/testsuite/unzip.tests
+@@ -7,7 +7,7 @@
+ 
+ . ./testing.sh
+ 
+-# testing "test name" "options" "expected result" "file input" "stdin"
++# testing "test name" "commands" "expected result" "file input" "stdin"
+ #   file input will be file called "input"
+ #   test can create a file "actual" instead of writing to stdout
+ 
+@@ -30,6 +30,27 @@ testing "unzip (subdir only)" "unzip -q foo.zip foo/ && test -d foo && test ! -f
+ rmdir foo
+ rm foo.zip
+ 
++# File containing some damaged encrypted stream
++testing "unzip (bad archive)" "uudecode; unzip bad.zip 2>&1; echo \$?" \
++"Archive:  bad.zip
++  inflating: ]3j½r«IK-%Ix
++unzip: inflate error
++1
++" \
++"" "\
++begin-base64 644 bad.zip
++UEsDBBQAAgkIAAAAIQA5AAAANwAAADwAAAAQAAcAXTNqwr1ywqtJGxJLLSVJ
++eCkBD0AdKBk8JzQsIj01JC0/ORJQSwMEFAECCAAAAAAhADoAAAAPAAAANgAA
++AAwAAQASw73Ct1DCokohPXQiNjoUNTUiHRwgLT4WHlBLAQIQABQAAggIAAAA
++oQA5AAAANwAAADwAAAAQQAcADAAAACwAMgCAAAAAAABdM2rCvXLCq0kbEkst
++JUl4KQEPQB0oGSY4Cz4QNgEnJSYIPVBLAQIAABQAAggAAAAAIQAqAAAADwAA
++BDYAAAAMAAEADQAAADIADQAAAEEAAAASw73Ct1DKokohPXQiNzA+FAI1HCcW
++NzITNFBLBQUKAC4JAA04Cw0EOhZQSwUGAQAABAIAAgCZAAAAeQAAAAIALhM=
++====
++"
++
++rm *
++
+ # Clean up scratch directory.
+ 
+ cd ..
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/busybox-appletlib-dependency.patch b/yocto-poky/meta/recipes-core/busybox/busybox/busybox-appletlib-dependency.patch
deleted file mode 100644
index de2dbcc..0000000
--- a/yocto-poky/meta/recipes-core/busybox/busybox/busybox-appletlib-dependency.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Pending
-
-# copy commit message from OE as the patch comment:
-#    commit 98c24291aa165f53423c27ae033831ce0b3bb676
-#    Author: Roman I Khimov <khimov@altell.ru>
-#    Date:   Thu Mar 26 23:03:58 2009 +0000
-#
-#    busybox: update appletlib dependency patch
-#    
-#    Previous version still failed from time to time on clean-start builds
-#    with 4 bitbake threads and '-j16'. Building busybox as sole target worked
-#    well.
-#    
-#    The reason is that previous version introduced a race between applets make
-#    processes spawned from top-level Makefile and from libbb Makefile.
-#    
-#    Fix it with high-level dependency that doesn't create races.
-#    
-#    Signed-off-by: Koen Kooi <koen@openembedded.org>
-#
-# above comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-06
-
-Index: busybox-1.13.2/Makefile
-===================================================================
---- busybox-1.13.2.orig/Makefile	2009-03-19 15:44:37.419270265 +0300
-+++ busybox-1.13.2/Makefile	2009-03-19 15:45:57.737521296 +0300
-@@ -471,6 +471,10 @@
- 		util-linux/ \
- 		util-linux/volume_id/ \
- 
-+# Lib interdeps
-+# libbb uses headers generated in applets
-+libbb: applets
-+
- endif # KBUILD_EXTMOD
- 
- ifeq ($(dot-config),1)
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/defconfig b/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
index 4f5df9e..ffea6be 100644
--- a/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
+++ b/yocto-poky/meta/recipes-core/busybox/busybox/defconfig
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Busybox version: 1.23.2
-# Thu Jul 30 11:00:00 2015
+# Busybox version: 1.24.1
+# Tue Oct 31 11:00:00 2015
 #
 CONFIG_HAVE_DOT_CONFIG=y
 
@@ -52,7 +52,7 @@
 # CONFIG_FEATURE_PREFER_APPLETS is not set
 CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
 CONFIG_FEATURE_SYSLOG=y
-CONFIG_FEATURE_HAVE_RPC=y
+# CONFIG_FEATURE_HAVE_RPC is not set
 
 #
 # Build Options
@@ -64,9 +64,9 @@
 # CONFIG_FEATURE_INDIVIDUAL is not set
 # CONFIG_FEATURE_SHARED_BUSYBOX is not set
 CONFIG_LFS=y
-# CONFIG_CROSS_COMPILER_PREFIX is not set
+CONFIG_CROSS_COMPILER_PREFIX=""
 CONFIG_SYSROOT=""
-# CONFIG_EXTRA_CFLAGS is not set
+CONFIG_EXTRA_CFLAGS=""
 CONFIG_EXTRA_LDFLAGS=""
 CONFIG_EXTRA_LDLIBS=""
 
@@ -156,6 +156,7 @@
 CONFIG_GZIP=y
 # CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
 CONFIG_GZIP_FAST=0
+# CONFIG_FEATURE_GZIP_LEVELS is not set
 # CONFIG_LZOP is not set
 # CONFIG_LZOP_COMPR_HIGH is not set
 # CONFIG_RPM is not set
@@ -183,10 +184,17 @@
 # CONFIG_FEATURE_DATE_ISOFMT is not set
 # CONFIG_FEATURE_DATE_NANO is not set
 CONFIG_FEATURE_DATE_COMPAT=y
+CONFIG_DD=y
+CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+# CONFIG_FEATURE_DD_STATUS is not set
 # CONFIG_HOSTID is not set
 CONFIG_ID=y
 CONFIG_GROUPS=y
 CONFIG_SHUF=y
+CONFIG_SYNC=y
+# CONFIG_FEATURE_SYNC_FANCY is not set
 CONFIG_TEST=y
 CONFIG_FEATURE_TEST_64=y
 CONFIG_TOUCH=y
@@ -195,6 +203,7 @@
 CONFIG_TR=y
 CONFIG_FEATURE_TR_CLASSES=y
 # CONFIG_FEATURE_TR_EQUIV is not set
+# CONFIG_TRUNCATE is not set
 CONFIG_UNLINK=y
 # CONFIG_BASE64 is not set
 CONFIG_WHO=y
@@ -211,10 +220,6 @@
 CONFIG_CP=y
 # CONFIG_FEATURE_CP_LONG_OPTIONS is not set
 CONFIG_CUT=y
-CONFIG_DD=y
-CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
-# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set
-# CONFIG_FEATURE_DD_IBS_OBS is not set
 CONFIG_DF=y
 # CONFIG_FEATURE_DF_FANCY is not set
 CONFIG_DIRNAME=y
@@ -283,7 +288,6 @@
 CONFIG_FEATURE_STAT_FORMAT=y
 CONFIG_STTY=y
 # CONFIG_SUM is not set
-CONFIG_SYNC=y
 # CONFIG_TAC is not set
 CONFIG_TAIL=y
 CONFIG_FEATURE_FANCY_TAIL=y
@@ -292,6 +296,7 @@
 CONFIG_TRUE=y
 CONFIG_TTY=y
 CONFIG_UNAME=y
+CONFIG_UNAME_OSNAME="GNU/Linux"
 # CONFIG_UNEXPAND is not set
 # CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
 CONFIG_UNIQ=y
@@ -553,7 +558,18 @@
 # CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set
 # CONFIG_FEATURE_MDEV_EXEC is not set
 # CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
+CONFIG_MOUNT=y
+# CONFIG_FEATURE_MOUNT_FAKE is not set
+# CONFIG_FEATURE_MOUNT_VERBOSE is not set
+# CONFIG_FEATURE_MOUNT_HELPERS is not set
+# CONFIG_FEATURE_MOUNT_LABEL is not set
+# CONFIG_FEATURE_MOUNT_NFS is not set
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+CONFIG_FEATURE_MOUNT_FLAGS=y
+CONFIG_FEATURE_MOUNT_FSTAB=y
+# CONFIG_FEATURE_MOUNT_OTHERTAB is not set
 # CONFIG_REV is not set
+# CONFIG_UEVENT is not set
 # CONFIG_ACPID is not set
 # CONFIG_FEATURE_ACPID_COMPAT is not set
 # CONFIG_BLKID is not set
@@ -599,15 +615,6 @@
 CONFIG_MKSWAP=y
 # CONFIG_FEATURE_MKSWAP_UUID is not set
 CONFIG_MORE=y
-CONFIG_MOUNT=y
-# CONFIG_FEATURE_MOUNT_FAKE is not set
-# CONFIG_FEATURE_MOUNT_VERBOSE is not set
-# CONFIG_FEATURE_MOUNT_HELPERS is not set
-# CONFIG_FEATURE_MOUNT_LABEL is not set
-CONFIG_FEATURE_MOUNT_NFS=y
-# CONFIG_FEATURE_MOUNT_CIFS is not set
-CONFIG_FEATURE_MOUNT_FLAGS=y
-CONFIG_FEATURE_MOUNT_FSTAB=y
 CONFIG_PIVOT_ROOT=y
 CONFIG_RDATE=y
 # CONFIG_RDEV is not set
@@ -660,10 +667,15 @@
 # CONFIG_FEATURE_CROND_D is not set
 # CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
 CONFIG_FEATURE_CROND_DIR=""
+# CONFIG_I2CGET is not set
+# CONFIG_I2CSET is not set
+# CONFIG_I2CDUMP is not set
+# CONFIG_I2CDETECT is not set
 CONFIG_LESS=y
 CONFIG_FEATURE_LESS_MAXLINES=9999999
 CONFIG_FEATURE_LESS_BRACKETS=y
 CONFIG_FEATURE_LESS_FLAGS=y
+# CONFIG_FEATURE_LESS_TRUNCATE is not set
 # CONFIG_FEATURE_LESS_MARKS is not set
 # CONFIG_FEATURE_LESS_REGEXP is not set
 # CONFIG_FEATURE_LESS_WINCH is not set
@@ -758,6 +770,13 @@
 CONFIG_PING=y
 CONFIG_PING6=y
 CONFIG_FEATURE_FANCY_PING=y
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_LONG_OPTIONS=y
+CONFIG_FEATURE_WGET_TIMEOUT=y
+# CONFIG_FEATURE_WGET_OPENSSL is not set
+# CONFIG_FEATURE_WGET_SSL_HELPER is not set
 # CONFIG_WHOIS is not set
 CONFIG_FEATURE_IPV6=y
 # CONFIG_FEATURE_UNIX_LOCAL is not set
@@ -819,6 +838,7 @@
 CONFIG_FEATURE_IP_ADDRESS=y
 CONFIG_FEATURE_IP_LINK=y
 CONFIG_FEATURE_IP_ROUTE=y
+CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2"
 CONFIG_FEATURE_IP_TUNNEL=y
 # CONFIG_FEATURE_IP_RULE is not set
 # CONFIG_FEATURE_IP_SHORT_FORMS is not set
@@ -885,11 +905,6 @@
 CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
 # CONFIG_UDPSVD is not set
 # CONFIG_VCONFIG is not set
-CONFIG_WGET=y
-CONFIG_FEATURE_WGET_STATUSBAR=y
-CONFIG_FEATURE_WGET_AUTHENTICATION=y
-CONFIG_FEATURE_WGET_LONG_OPTIONS=y
-CONFIG_FEATURE_WGET_TIMEOUT=y
 # CONFIG_ZCIP is not set
 
 #
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/fail_on_no_media.patch b/yocto-poky/meta/recipes-core/busybox/busybox/fail_on_no_media.patch
index 6745f16..820acc2 100644
--- a/yocto-poky/meta/recipes-core/busybox/busybox/fail_on_no_media.patch
+++ b/yocto-poky/meta/recipes-core/busybox/busybox/fail_on_no_media.patch
@@ -1,4 +1,5 @@
-Upstream-Status: Pending
+Upstream-Status: Denied
+[https://www.mail-archive.com/busybox@busybox.net/msg22354.html]
 
 The current behaviour of busybox is to try all fstype when automounting
 even when no media exists.  The util-linux mount command bails when no
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/get_header_tar.patch b/yocto-poky/meta/recipes-core/busybox/busybox/get_header_tar.patch
deleted file mode 100644
index 0e528ff..0000000
--- a/yocto-poky/meta/recipes-core/busybox/busybox/get_header_tar.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Upstream-Status: Pending
-
-# copy commit message from OE as the patch comment:
-#    commit 5a0e1d473ca7aca5ffefffe9a2ec44ae7a1f35bc
-#    Author: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
-#    Date:   Wed Feb 11 22:40:21 2009 +0100
-#
-#    busybox: fix tar problem with filenames that are exactly 100 bytes
-#
-# above comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-06
-
---- busybox-1.13.2/archival/libarchive/get_header_tar.c.orig	2008-11-09 18:28:02.000000000 +0100
-+++ busybox-1.13.2/archival/libarchive/get_header_tar.c	2009-02-11 22:34:52.000000000 +0100
-@@ -252,6 +252,8 @@
- 			file_header->name = concat_path_file(tar.prefix, tar.name);
- 		} else
- 			file_header->name = xstrdup(tar.name);
-+		if (strlen(file_header->name) > 100) 
-+			file_header->name[100] = 0;
- 	}
- 
- 	/* Set bits 12-15 of the files mode */
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/init.cfg b/yocto-poky/meta/recipes-core/busybox/busybox/init.cfg
new file mode 100644
index 0000000..006d4c6
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/busybox/init.cfg
@@ -0,0 +1,3 @@
+CONFIG_INIT=y
+CONFIG_FEATURE_USE_INITTAB=y
+
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/mdev.cfg b/yocto-poky/meta/recipes-core/busybox/busybox/mdev.cfg
new file mode 100644
index 0000000..6aefe90
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/busybox/mdev.cfg
@@ -0,0 +1,11 @@
+CONFIG_MDEV=y
+CONFIG_FEATURE_MDEV_CONF=y
+CONFIG_FEATURE_MDEV_RENAME=y
+CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
+CONFIG_FEATURE_MDEV_EXEC=y
+CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
+
+CONFIG_SETSID=y
+CONFIG_CTTYHACK=y
+
+CONFIG_FEATURE_SHADOWPASSWDS=y
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg b/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
new file mode 100644
index 0000000..facfe85
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/busybox/musl.cfg
@@ -0,0 +1,12 @@
+# CONFIG_EXTRA_COMPAT is not set
+# CONFIG_SELINUX is not set
+# CONFIG_FEATURE_HAVE_RPC is not set
+# CONFIG_WERROR is not set
+# CONFIG_FEATURE_SYSTEMD is not set
+# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
+# CONFIG_PAM is not set
+# CONFIG_FEATURE_INETD_RPC is not set
+# CONFIG_SELINUXENABLED is not set
+# CONFIG_FEATURE_MOUNT_NFS is not set
+# CONFIG_FEATURE_UTMP is not set
+
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox/resize.cfg b/yocto-poky/meta/recipes-core/busybox/busybox/resize.cfg
new file mode 100644
index 0000000..a1d9c95
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/busybox/resize.cfg
@@ -0,0 +1,2 @@
+CONFIG_RESIZE=y
+CONFIG_FEATURE_RESIZE_PRINT=y
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox_1.23.2.bb b/yocto-poky/meta/recipes-core/busybox/busybox_1.23.2.bb
deleted file mode 100644
index 7258df0..0000000
--- a/yocto-poky/meta/recipes-core/busybox/busybox_1.23.2.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-require busybox.inc
-
-SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
-           file://get_header_tar.patch \
-           file://busybox-appletlib-dependency.patch \
-           file://busybox-udhcpc-no_deconfig.patch \
-           file://find-touchscreen.sh \
-           file://busybox-cron \
-           file://busybox-httpd \
-           file://busybox-udhcpd \
-           file://default.script \
-           file://simple.script \
-           file://hwclock.sh \
-           file://mount.busybox \
-           file://syslog \
-           file://syslog-startup.conf \
-           file://syslog.conf \
-           file://busybox-syslog.default \
-           file://mdev \
-           file://mdev.conf \
-           file://mdev-mount.sh \
-           file://umount.busybox \
-           file://defconfig \
-           file://busybox-syslog.service.in \
-           file://busybox-klogd.service.in \
-           file://fail_on_no_media.patch \
-           file://run-ptest \
-           file://inetd.conf \
-           file://inetd \
-           file://login-utilities.cfg \
-           file://recognize_connmand.patch \
-           file://busybox-cross-menuconfig.patch \
-           file://0001-Switch-to-POSIX-utmpx-API.patch \
-           file://0001-ifconfig-fix-double-free-fatal-error-in-INET_sprint.patch \
-           file://0001-chown-fix-help-text.patch \
-           file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
-           file://0002-Passthrough-r-to-linker.patch \
-           file://0001-randconfig-fix.patch \
-           file://mount-via-label.cfg \
-           file://sha1sum.cfg \
-           file://sha256sum.cfg \
-           file://getopts.cfg \
-"
-
-SRC_URI[tarball.md5sum] = "7925683d7dd105aabe9b6b618d48cc73"
-SRC_URI[tarball.sha256sum] = "05a6f9e21aad8c098e388ae77de7b2361941afa7157ef74216703395b14e319a"
-
-EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
-
-do_install_ptest () {
-        cp -r ${B}/testsuite ${D}${PTEST_PATH}/
-        cp ${B}/.config      ${D}${PTEST_PATH}/
-        ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
-}
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb b/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
new file mode 100644
index 0000000..bdaa5a5
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/busybox_1.24.1.bb
@@ -0,0 +1,50 @@
+require busybox.inc
+
+SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
+           file://busybox-udhcpc-no_deconfig.patch \
+           file://find-touchscreen.sh \
+           file://busybox-cron \
+           file://busybox-httpd \
+           file://busybox-udhcpd \
+           file://default.script \
+           file://simple.script \
+           file://hwclock.sh \
+           file://mount.busybox \
+           file://syslog \
+           file://syslog-startup.conf \
+           file://syslog.conf \
+           file://busybox-syslog.default \
+           file://mdev \
+           file://mdev.conf \
+           file://mdev-mount.sh \
+           file://umount.busybox \
+           file://defconfig \
+           file://busybox-syslog.service.in \
+           file://busybox-klogd.service.in \
+           file://fail_on_no_media.patch \
+           file://run-ptest \
+           file://inetd.conf \
+           file://inetd \
+           file://login-utilities.cfg \
+           file://recognize_connmand.patch \
+           file://busybox-cross-menuconfig.patch \
+           file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
+           file://busybox-1.24.1-unzip.patch \
+           file://busybox-1.24.1-unzip-regression.patch \
+           file://busybox-1.24.1-truncate-open-mode.patch \
+           file://mount-via-label.cfg \
+           file://sha1sum.cfg \
+           file://sha256sum.cfg \
+           file://getopts.cfg \
+           file://resize.cfg \
+           ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'busybox')]} \
+           ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager', True) == 'busybox-mdev')]} \
+           file://inittab \
+           file://rcS \
+           file://rcK \
+           file://runlevel \
+"
+SRC_URI_append_libc-musl = " file://musl.cfg "
+
+SRC_URI[tarball.md5sum] = "be98a40cadf84ce2d6b05fa41a275c6a"
+SRC_URI[tarball.sha256sum] = "37d03132cc078937360b392170b7a1d0e5b322eee9f57c0b82292a8b1f0afe3d"
diff --git a/yocto-poky/meta/recipes-core/busybox/busybox_git.bb b/yocto-poky/meta/recipes-core/busybox/busybox_git.bb
index ade72f4..c29b894 100644
--- a/yocto-poky/meta/recipes-core/busybox/busybox_git.bb
+++ b/yocto-poky/meta/recipes-core/busybox/busybox_git.bb
@@ -1,14 +1,12 @@
 require busybox.inc
 
-SRCREV = "be947c4d97c0dacb703a6f24dd813ff6dd3a33b6"
+SRCREV = "1b7c17391de66502dd7a97c866e0a33681edbb1f"
 # Lookout for PV bump too when SRCREV is changed
-PV = "1.23.2+git${SRCPV}"
+PV = "1.25.0+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
 SRC_URI = "git://busybox.net/busybox.git \
-           file://get_header_tar.patch \
-           file://busybox-appletlib-dependency.patch \
            file://busybox-udhcpc-no_deconfig.patch \
            file://find-touchscreen.sh \
            file://busybox-cron \
@@ -36,19 +34,19 @@
            file://login-utilities.cfg \
            file://recognize_connmand.patch \
            file://busybox-cross-menuconfig.patch \
-           file://0001-ifconfig-fix-double-free-fatal-error-in-INET_sprint.patch \
-           file://0001-chown-fix-help-text.patch \
+           file://0001-Use-CC-when-linking-instead-of-LD-and-use-CFLAGS-and.patch \
            file://mount-via-label.cfg \
            file://sha1sum.cfg \
            file://sha256sum.cfg \
+           file://getopts.cfg \
+           file://resize.cfg \
+           ${@["", "file://init.cfg"][(d.getVar('VIRTUAL-RUNTIME_init_manager', True) == 'busybox')]} \
+           ${@["", "file://mdev.cfg"][(d.getVar('VIRTUAL-RUNTIME_dev_manager', True) == 'busybox-mdev')]} \
+           file://inittab \
+           file://rcS \
+           file://rcK \
+           file://runlevel \
 "
-
-EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y"
-
-do_install_ptest () {
-        cp -r ${B}/testsuite ${D}${PTEST_PATH}/
-        cp ${B}/.config      ${D}${PTEST_PATH}/
-        ln -s /bin/busybox   ${D}${PTEST_PATH}/busybox
-}
+SRC_URI_append_libc-musl = " file://musl.cfg "
 
 DEFAULT_PREFERENCE = "-1"
diff --git a/yocto-poky/meta/recipes-core/busybox/files/inittab b/yocto-poky/meta/recipes-core/busybox/files/inittab
new file mode 100644
index 0000000..bfec4a7
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/files/inittab
@@ -0,0 +1,24 @@
+# This is run first except when booting in single-user mode.
+
+# Startup the system
+null::sysinit:/bin/mount -t proc proc /proc
+null::sysinit:/bin/mount -t sysfs sysfs /sys
+null::sysinit:/bin/mount -t devtmpfs devtmpfs /dev
+null::sysinit:/bin/mount -o remount,rw /
+null::sysinit:/bin/mkdir -p /dev/pts
+null::sysinit:/bin/mount -t devpts devpts /dev/pts
+null::sysinit:/bin/mount -a
+
+::sysinit:/etc/init.d/rcS
+
+# Stuff to do before rebooting
+::ctrlaltdel:/sbin/reboot
+::shutdown:/etc/init.d/rcK
+::shutdown:/sbin/swapoff -a
+::shutdown:/bin/umount -a -r
+
+# Stuff to do when restarting the init process
+::restart:/sbin/init
+
+# set hostname
+null::sysinit:/bin/busybox hostname -F /etc/hostname
diff --git a/yocto-poky/meta/recipes-core/busybox/files/mdev-mount.sh b/yocto-poky/meta/recipes-core/busybox/files/mdev-mount.sh
index d5d66d6..b4385a1 100644
--- a/yocto-poky/meta/recipes-core/busybox/files/mdev-mount.sh
+++ b/yocto-poky/meta/recipes-core/busybox/files/mdev-mount.sh
@@ -15,7 +15,7 @@
 			exit 0
 		fi
 		DEVBASE=`expr substr $MDEV 1 3`
-		if [ "${DEVBASE}" == "mmc" ] ; then
+		if [ "${DEVBASE}" = "mmc" ] ; then
 			DEVBASE=`expr substr $MDEV 1 7`
 		fi
 		# check for "please don't mount it" file
@@ -24,7 +24,7 @@
 			exit 0
 		fi
 		# check for full-disk partition
-		if [ "${DEVBASE}" == "${MDEV}" ] ; then
+		if [ "${DEVBASE}" = "${MDEV}" ] ; then
 			if [ -d /sys/block/${DEVBASE}/${DEVBASE}*1 ] ; then
 				# Partition detected, just quit
 				exit 0
@@ -33,7 +33,7 @@
 				# No size at all
 				exit 0
 			fi
-			if [ `cat /sys/block/${DEVBASE}/size` == 0 ] ; then
+			if [ "`cat /sys/block/${DEVBASE}/size`" = "0" ] ; then
 				# empty device, bail out
 				exit 0
 			fi
@@ -42,7 +42,7 @@
 		if ! mount /dev/$MDEV > /dev/null 2>&1
 		then
 			MOUNTPOINT="${MDEV_AUTOMOUNT_ROOT}/$MDEV"
-			mkdir "$MOUNTPOINT"
+			mkdir -p "$MOUNTPOINT"
 			mount -t auto /dev/$MDEV "$MOUNTPOINT"
 		fi
 		;;
diff --git a/yocto-poky/meta/recipes-core/busybox/files/rcK b/yocto-poky/meta/recipes-core/busybox/files/rcK
new file mode 100644
index 0000000..f8a63e1
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/files/rcK
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# Stop all init scripts in /etc/rc6.d
+# executing them in numerical order.
+#
+for i in /etc/rc6.d/K??*; do
+
+     # Ignore dangling symlinks (if any).
+     [ ! -f "$i" ] && continue
+
+     case "$i" in
+	*.sh)
+	    # Source shell script for speed.
+	    (
+		trap - INT QUIT TSTP
+		set stop
+		. $i
+	    )
+	    ;;
+	*)
+	    # No sh extension, so fork subprocess.
+	    $i stop
+	    ;;
+    esac
+done
+
diff --git a/yocto-poky/meta/recipes-core/busybox/files/rcS b/yocto-poky/meta/recipes-core/busybox/files/rcS
new file mode 100644
index 0000000..bb03eb6
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/files/rcS
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Start all init scripts in /etc/rcS.d and /etc/rc5.d
+# executing them in numerical order.
+#
+
+for i in /etc/rcS.d/S??* /etc/rc5.d/S??* ;do
+
+     # Ignore dangling symlinks (if any).
+     [ ! -f "$i" ] && continue
+
+     case "$i" in
+	*.sh)
+	    # Source shell script for speed.
+	    (
+		trap - INT QUIT TSTP
+		set start
+		. $i
+	    )
+	    ;;
+	*)
+	    # No sh extension, so fork subprocess.
+	    $i start
+	    ;;
+    esac
+done
+
diff --git a/yocto-poky/meta/recipes-core/busybox/files/runlevel b/yocto-poky/meta/recipes-core/busybox/files/runlevel
new file mode 100644
index 0000000..866f3b5
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/busybox/files/runlevel
@@ -0,0 +1,11 @@
+#!/bin/sh
+# busybox init does not have LSB ( sysvinit ) like initlevels
+# so lets fake it to 5 which is what we default anyway
+# this helps with opkg post installs where it tries to invoke
+# update-rc.d ad post install step.
+# for package upgrades
+# See code in update-rc.d around line 190 where it calls runlevel
+# program
+#
+echo "5"
+
diff --git a/yocto-poky/meta/recipes-core/busybox/files/simple.script b/yocto-poky/meta/recipes-core/busybox/files/simple.script
index 22168b0..6ed0293 100644
--- a/yocto-poky/meta/recipes-core/busybox/files/simple.script
+++ b/yocto-poky/meta/recipes-core/busybox/files/simple.script
@@ -14,7 +14,7 @@
 }
 
 have_bin_ip=0
-if [ -x /sbin/ip ]; then
+if [ -x /SBIN_DIR/ip ]; then
   have_bin_ip=1
   BROADCAST="broadcast +"
 fi
@@ -23,34 +23,34 @@
 
 case "$1" in
 	deconfig)
-		if [ -x /sbin/resolvconf ]; then
-			/sbin/resolvconf -d "${interface}.udhcpc"
+		if [ -x /SBIN_DIR/resolvconf ]; then
+			/SBIN_DIR/resolvconf -d "${interface}.udhcpc"
 		fi
 		if ! root_is_nfs ; then
                         if [ $have_bin_ip -eq 1 ]; then
-                                ip addr flush dev $interface
-                                ip link set dev $interface up
+                                /SBIN_DIR/ip addr flush dev $interface
+                                /SBIN_DIR/ip link set dev $interface up
                         else
-                                /sbin/ifconfig $interface 0.0.0.0
+                                /SBIN_DIR/ifconfig $interface 0.0.0.0
                         fi
 		fi
 		;;
 
 	renew|bound)
                 if [ $have_bin_ip -eq 1 ]; then
-                        ip addr add dev $interface local $ip/$mask $BROADCAST
+                        /SBIN_DIR/ip addr add dev $interface local $ip/$mask $BROADCAST
                 else
-                        /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
+                        /SBIN_DIR/ifconfig $interface $ip $BROADCAST $NETMASK
                 fi
 
 		if [ -n "$router" ] ; then
 			if ! root_is_nfs ; then
                                 if [ $have_bin_ip -eq 1 ]; then
-                                        while ip route del default dev $interface 2>/dev/null ; do
+                                        while /SBIN_DIR/ip route del default dev $interface 2>/dev/null ; do
                                                 :
                                         done
                                 else
-                                        while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
+                                        while /SBIN_DIR/route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
                                                 :
                                         done
                                 fi
@@ -59,9 +59,9 @@
 			metric=10
 			for i in $router ; do
                                 if [ $have_bin_ip -eq 1 ]; then
-                                        ip route add default via $i metric $metric
+                                        /SBIN_DIR/ip route add default via $i metric $metric
                                 else
-                                        route add default gw $i dev $interface metric $metric 2>/dev/null
+                                        /SBIN_DIR/route add default gw $i dev $interface metric $metric 2>/dev/null
                                 fi
                                 metric=$(($metric + 1))
 			done
@@ -77,8 +77,8 @@
 "
 		done
 
-		if [ -x /sbin/resolvconf ]; then
-			echo -n "$R" | /sbin/resolvconf -a "${interface}.udhcpc"
+		if [ -x /SBIN_DIR/resolvconf ]; then
+			echo -n "$R" | /SBIN_DIR/resolvconf -a "${interface}.udhcpc"
 		else
 			echo -n "$R" > "$RESOLV_CONF"
 		fi
diff --git a/yocto-poky/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch b/yocto-poky/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch
new file mode 100644
index 0000000..ace4bf0
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/console-tools/console-tools-0.3.2/0001-Cover-the-else-with-__GLIBC__.patch
@@ -0,0 +1,51 @@
+From b6a59b05f1fa514c6b387c9544bd63b1bfcf2eed Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jan 2016 05:38:29 +0000
+Subject: [PATCH] Cover the else with __GLIBC__
+
+Fixes build errors on musl/x86
+
+| In file included from
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/asm/termios.h:1:0,
+|                  from
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/linux/termios.h:5,
+|                  from
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/console-tools/0.3.2-r8/console-tools-0.3.2/vttools/resizecons.c:86:
+|
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/asm-generic/termios.h:14:8:
+error: redefinition of 'struct winsize'
+|  struct winsize {
+|         ^
+| In file included from
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/sys/ioctl.h:7:0,
+|                  from
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/console-tools/0.3.2-r8/console-tools-0.3.2/vttools/resizecons.c:81:
+|
+/home/ubuntu/work/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/usr/include/bits/ioctl.h:90:8:
+note: originally defined here
+|  struct winsize {
+|         ^
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ vttools/resizecons.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vttools/resizecons.c b/vttools/resizecons.c
+index f0a7055..e8753b1 100644
+--- a/vttools/resizecons.c
++++ b/vttools/resizecons.c
+@@ -81,7 +81,7 @@
+ #include <sys/ioctl.h>
+ #if (__GNU_LIBRARY__ >= 6)
+ # include <sys/perm.h>
+-#else
++#elif defined __GLIBC__
+ # include <linux/types.h>
+ # include <linux/termios.h>
+ #endif
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch b/yocto-poky/meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch
new file mode 100644
index 0000000..64b5b04
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/console-tools/console-tools-0.3.2/0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch
@@ -0,0 +1,44 @@
+From 0fd5dda51d68e1ec2a87e27b5ed0dff3503b4681 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 08:12:38 +0000
+Subject: [PATCH] kbdtools: Include sys/types.h for u_char and u_short
+ definition
+
+on musl this gets exposed since sys/types.h is not
+included via some other indirect inclusion as is the case with glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ kbdtools/dumpkeys.c | 1 +
+ kbdtools/loadkeys.y | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/kbdtools/dumpkeys.c b/kbdtools/dumpkeys.c
+index 6159d49..c19fb21 100644
+--- a/kbdtools/dumpkeys.c
++++ b/kbdtools/dumpkeys.c
+@@ -26,6 +26,7 @@
+ #include <errno.h>
+ #include <sysexits.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+ #include <linux/types.h>
+ #include <linux/kd.h>
+ #include <linux/keyboard.h>
+diff --git a/kbdtools/loadkeys.y b/kbdtools/loadkeys.y
+index b6a8e01..4468f77 100644
+--- a/kbdtools/loadkeys.y
++++ b/kbdtools/loadkeys.y
+@@ -71,6 +71,7 @@
+ #include <linux/kd.h>
+ #include <linux/keyboard.h>
+ #include <sys/ioctl.h>
++#include <sys/types.h>
+ #include <ctype.h>
+ #include <sysexits.h>
+ #include <signal.h>
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/console-tools/console-tools_0.3.2.bb b/yocto-poky/meta/recipes-core/console-tools/console-tools_0.3.2.bb
index c60a5a0..1db8414 100644
--- a/yocto-poky/meta/recipes-core/console-tools/console-tools_0.3.2.bb
+++ b/yocto-poky/meta/recipes-core/console-tools/console-tools_0.3.2.bb
@@ -14,12 +14,19 @@
            file://nodocs.patch \
            file://fix-libconsole-linking.patch \
            file://no-dep-on-libfl.patch \
+           file://0001-kbdtools-Include-sys-types.h-for-u_char-and-u_short-.patch \
+           file://0001-Cover-the-else-with-__GLIBC__.patch \
            file://lcmessage.m4 \
            file://Makevars"
 
 SRC_URI[md5sum] = "bf21564fc38b3af853ef724babddbacd"
 SRC_URI[sha256sum] = "eea6b441672dacd251079fc85ed322e196282e0e66c16303ec64c3a2b1c126c2"
 
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lct/files/console-tools-devel/"
+UPSTREAM_CHECK_REGEX = "/console-tools-devel/(?P<pver>(\d\d?\.)+\d\d?)/"
+
+CFLAGS_append_aarch64 = " -D_USE_TERMIOS "
+
 do_configure_prepend () {
 	mkdir -p ${S}/m4
 	cp ${WORKDIR}/lcmessage.m4 ${S}/m4/
@@ -29,7 +36,7 @@
 
 inherit autotools gettext update-alternatives
 
-ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_PRIORITY = "30"
 
 bindir_progs = "chvt deallocvt fgconsole openvt"
 ALTERNATIVE_${PN} = "${bindir_progs}"
diff --git a/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/coreutils-build-with-acl.patch b/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/coreutils-build-with-acl.patch
deleted file mode 100644
index 8273d78..0000000
--- a/yocto-poky/meta/recipes-core/coreutils/coreutils-6.9/coreutils-build-with-acl.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-Fix the following issue so that coreutils can build with ACL:
-
-configure: WARNING: libacl development library was not found or not usable.
-configure: WARNING: GNU coreutils will be built without ACL support.
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- m4/acl.m4 |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/m4/acl.m4 b/m4/acl.m4
-index d6a448a..a9d4836 100644
---- a/m4/acl.m4
-+++ b/m4/acl.m4
-@@ -159,7 +159,7 @@ AC_DEFUN([gl_ACL_GET_FILE],
-           ]])],
-        [gl_cv_func_working_acl_get_file=yes],
-        [gl_cv_func_working_acl_get_file=no],
--       [gl_cv_func_working_acl_get_file=cross-compiling])])
-+       [gl_cv_func_working_acl_get_file=yes])])
- 
-   AS_IF([test $gl_cv_func_working_acl_get_file = yes], [$1], [$2])
- ])
--- 
-1.7.7
-
diff --git a/yocto-poky/meta/recipes-core/coreutils/coreutils-8.24/0001-Unset-need_charset_alias-when-building-for-musl.patch b/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/0001-Unset-need_charset_alias-when-building-for-musl.patch
similarity index 100%
rename from yocto-poky/meta/recipes-core/coreutils/coreutils-8.24/0001-Unset-need_charset_alias-when-building-for-musl.patch
rename to yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/0001-Unset-need_charset_alias-when-building-for-musl.patch
diff --git a/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch b/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch
new file mode 100644
index 0000000..c5f449f
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/0001-uname-report-processor-and-hardware-correctly.patch
@@ -0,0 +1,64 @@
+Upstream-Status: Rejected
+
+Subject: uname: report processor and hardware correctly
+
+This patch is rejected by coreutils upstream, but distros like debian and fedora
+uses this patch to make `uname -i' and `uname -p' to not report 'unknown'.
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ src/uname.c | 18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/src/uname.c b/src/uname.c
+index 39bd28c..c84582d 100644
+--- a/src/uname.c
++++ b/src/uname.c
+@@ -299,13 +299,19 @@ main (int argc, char **argv)
+ 
+   if (toprint & PRINT_PROCESSOR)
+     {
+-      char const *element = unknown;
++      char *element = unknown;
+ #if HAVE_SYSINFO && defined SI_ARCHITECTURE
+       {
+         static char processor[257];
+         if (0 <= sysinfo (SI_ARCHITECTURE, processor, sizeof processor))
+           element = processor;
+       }
++#else
++      {
++	static struct utsname u;
++	uname(&u);
++	element = u.machine;
++      }
+ #endif
+ #ifdef UNAME_PROCESSOR
+       if (element == unknown)
+@@ -343,7 +349,7 @@ main (int argc, char **argv)
+ 
+   if (toprint & PRINT_HARDWARE_PLATFORM)
+     {
+-      char const *element = unknown;
++      char *element = unknown;
+ #if HAVE_SYSINFO && defined SI_PLATFORM
+       {
+         static char hardware_platform[257];
+@@ -361,6 +367,14 @@ main (int argc, char **argv)
+           if (sysctl (mib, 2, hardware_platform, &s, 0, 0) >= 0)
+             element = hardware_platform;
+         }
++#else
++      {
++	static struct utsname u;
++	uname(&u);
++	element = u.machine;
++	if(strlen(element)==4 && element[0]=='i' && element[2]=='8' && element[3]=='6')
++	  element[1]='3';
++      }
+ #endif
+       if (! (toprint == UINT_MAX && element == unknown))
+         print_element (element);
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-core/coreutils/coreutils-8.24/fix-selinux-flask.patch b/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/fix-selinux-flask.patch
similarity index 100%
rename from yocto-poky/meta/recipes-core/coreutils/coreutils-8.24/fix-selinux-flask.patch
rename to yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/fix-selinux-flask.patch
diff --git a/yocto-poky/meta/recipes-core/coreutils/coreutils-8.24/man-decouple-manpages-from-build.patch b/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/man-decouple-manpages-from-build.patch
similarity index 100%
rename from yocto-poky/meta/recipes-core/coreutils/coreutils-8.24/man-decouple-manpages-from-build.patch
rename to yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/man-decouple-manpages-from-build.patch
diff --git a/yocto-poky/meta/recipes-core/coreutils/coreutils-8.24/remove-usr-local-lib-from-m4.patch b/yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/remove-usr-local-lib-from-m4.patch
similarity index 100%
rename from yocto-poky/meta/recipes-core/coreutils/coreutils-8.24/remove-usr-local-lib-from-m4.patch
rename to yocto-poky/meta/recipes-core/coreutils/coreutils-8.25/remove-usr-local-lib-from-m4.patch
diff --git a/yocto-poky/meta/recipes-core/coreutils/coreutils_6.9.bb b/yocto-poky/meta/recipes-core/coreutils/coreutils_6.9.bb
index e9f82ab..9ce717d 100644
--- a/yocto-poky/meta/recipes-core/coreutils/coreutils_6.9.bb
+++ b/yocto-poky/meta/recipes-core/coreutils/coreutils_6.9.bb
@@ -23,7 +23,6 @@
            file://coreutils-fix-install.patch \
            file://man-touch.patch \
            file://coreutils_fix_for_automake-1.12.patch \
-           file://coreutils-build-with-acl.patch \
            file://coreutils-fix-texinfo.patch \
            file://fix_for_manpage_building.patch \
            file://loadavg.patch \
@@ -41,7 +40,7 @@
 
 # with, without, depends, rdepends
 #
-PACKAGECONFIG[acl] = "ac_cv_header_sys_acl_h=yes,ac_cv_header_sys_acl_h=no,acl,"
+PACKAGECONFIG[acl] = "ac_cv_header_sys_acl_h=yes ac_cv_header_acl_libacl_h=yes ac_cv_search_acl_get_file=-lacl,ac_cv_header_sys_acl_h=no ac_cv_header_acl_libacl_h=no ac_cv_search_acl_get_file=,acl,"
 
 
 # [ gets a special treatment and is not included in this
diff --git a/yocto-poky/meta/recipes-core/coreutils/coreutils_8.24.bb b/yocto-poky/meta/recipes-core/coreutils/coreutils_8.24.bb
deleted file mode 100644
index f042346..0000000
--- a/yocto-poky/meta/recipes-core/coreutils/coreutils_8.24.bb
+++ /dev/null
@@ -1,127 +0,0 @@
-SUMMARY = "The basic file, shell and text manipulation utilities"
-DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
-manipulation utilities. These are the core utilities which are expected to exist on \
-every system."
-HOMEPAGE = "http://www.gnu.org/software/coreutils/"
-BUGTRACKER = "http://debbugs.gnu.org/coreutils"
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
-                    file://src/ls.c;beginline=5;endline=16;md5=38b79785ca88537b75871782a2a3c6b8"
-DEPENDS = "gmp libcap"
-DEPENDS_class-native = ""
-
-inherit autotools gettext texinfo
-
-SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
-           http://distfiles.gentoo.org/distfiles/${BP}-man.tar.xz;name=manpages \
-           file://man-decouple-manpages-from-build.patch \
-           file://remove-usr-local-lib-from-m4.patch \
-           file://fix-selinux-flask.patch \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-          "
-
-SRC_URI[tarball.md5sum] = "40efdbce865d2458d8da0a9dcee7c16c"
-SRC_URI[tarball.sha256sum] = "a2d75286a4b9ef3a13039c2da3868a61be4ee9f17d8ae380a35a97e506972170"
-SRC_URI[manpages.md5sum] = "728a91a5c1095a33cffb9959bb891963"
-SRC_URI[manpages.sha256sum] = "cf0333b5f134a331e0b46e2ddf90666f8bdc3281c1ca2c7ccbb75b437589ce37"
-
-EXTRA_OECONF_class-native = "--without-gmp"
-EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
-
-# acl is not a default feature
-#
-PACKAGECONFIG_class-target ??= "${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
-PACKAGECONFIG_class-native ??= ""
-
-# with, without, depends, rdepends
-#
-PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
-
-# [ df mktemp base64 gets a special treatment and is not included in this
-bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
-                env expand expr factor fmt fold groups head hostid id install \
-                join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
-                pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
-                sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout\
-                tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
-
-# hostname gets a special treatment and is not included in this
-base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
-                     mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
-
-sbindir_progs= "chroot"
-
-# Let aclocal use the relative path for the m4 file rather than the
-# absolute since coreutils has a lot of m4 files, otherwise there might
-# be an "Argument list too long" error when it is built in a long/deep
-# directory.
-acpaths = "-I ./m4"
-
-# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
-do_compile_prepend () {
-	mkdir -p ${B}/src
-}
-
-do_install_append_class-target() {
-	for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
-
-	install -d ${D}${base_bindir}
-	[ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
-
-	install -d ${D}${sbindir}
-	[ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
-
-	# [ requires special handling because [.coreutils will cause the sed stuff
-	# in update-alternatives to fail, therefore use lbracket - the name used
-	# for the actual source file.
-	mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
-
-	# prebuilt man pages
-	install -d ${D}/${mandir}/man1
-	install -t ${D}/${mandir}/man1 ${S}/man/*.1
-	# prebuilt man pages don't do a separate man page for [ vs test.
-	# see comment above r.e. sed and update-alternatives
-	cp -a ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
-}
-
-do_install_append_class-native(){
-	# remove groups to fix conflict with shadow-native
-	rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
-ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1"
-
-ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
-ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
-ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
-
-ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
-ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
-ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
-
-ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
-ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
-ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
-
-ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
-ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
-ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1"
-
-ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
-ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
-ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
-ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
-
-python __anonymous() {
-	for prog in d.getVar('base_bindir_progs', True).split():
-		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
-
-	for prog in d.getVar('sbindir_progs', True).split():
-		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir', True), prog))
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-core/coreutils/coreutils_8.25.bb b/yocto-poky/meta/recipes-core/coreutils/coreutils_8.25.bb
new file mode 100644
index 0000000..419a693
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/coreutils/coreutils_8.25.bb
@@ -0,0 +1,134 @@
+SUMMARY = "The basic file, shell and text manipulation utilities"
+DESCRIPTION = "The GNU Core Utilities provide the basic file, shell and text \
+manipulation utilities. These are the core utilities which are expected to exist on \
+every system."
+HOMEPAGE = "http://www.gnu.org/software/coreutils/"
+BUGTRACKER = "http://debbugs.gnu.org/coreutils"
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504\
+                    file://src/ls.c;beginline=5;endline=16;md5=38b79785ca88537b75871782a2a3c6b8"
+DEPENDS = "gmp libcap"
+DEPENDS_class-native = ""
+
+inherit autotools gettext texinfo
+
+SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz;name=tarball \
+           http://distfiles.gentoo.org/distfiles/${BP}-man.tar.xz;name=manpages \
+           file://man-decouple-manpages-from-build.patch \
+           file://remove-usr-local-lib-from-m4.patch \
+           file://fix-selinux-flask.patch \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           file://0001-uname-report-processor-and-hardware-correctly.patch \
+          "
+
+SRC_URI[tarball.md5sum] = "070e43ba7f618d747414ef56ab248a48"
+SRC_URI[tarball.sha256sum] = "31e67c057a5b32a582f26408c789e11c2e8d676593324849dcf5779296cdce87"
+SRC_URI[manpages.md5sum] = "415cc0552bc4e480b27ce8b2aebfdeb5"
+SRC_URI[manpages.sha256sum] = "2ee31c3a6d2276f49c5515375d4a0c1047580da6ac10536898e0f0de81707f29"
+
+EXTRA_OECONF_class-native = "--without-gmp"
+EXTRA_OECONF_class-target = "--enable-install-program=arch --libexecdir=${libdir}"
+EXTRA_OECONF_class-nativesdk = "--enable-install-program=arch"
+
+# acl and xattr are not default features
+#
+PACKAGECONFIG_class-target ??= "\
+    ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
+"
+
+PACKAGECONFIG_class-native ??= ""
+
+# with, without, depends, rdepends
+#
+PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl,"
+PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
+
+# [ df mktemp base64 gets a special treatment and is not included in this
+bindir_progs = "arch basename chcon cksum comm csplit cut dir dircolors dirname du \
+                env expand expr factor fmt fold groups head hostid id install \
+                join link logname md5sum mkfifo nice nl nohup nproc od paste pathchk \
+                pinky pr printenv printf ptx readlink realpath runcon seq sha1sum sha224sum sha256sum \
+                sha384sum sha512sum shred shuf sort split stdbuf sum tac tail tee test timeout\
+                tr truncate tsort tty unexpand uniq unlink uptime users vdir wc who whoami yes"
+
+# hostname gets a special treatment and is not included in this
+base_bindir_progs = "cat chgrp chmod chown cp date dd echo false kill ln ls mkdir \
+                     mknod mv pwd rm rmdir sleep stty sync touch true uname stat"
+
+sbindir_progs= "chroot"
+
+# Let aclocal use the relative path for the m4 file rather than the
+# absolute since coreutils has a lot of m4 files, otherwise there might
+# be an "Argument list too long" error when it is built in a long/deep
+# directory.
+acpaths = "-I ./m4"
+
+# Deal with a separate builddir failure if src doesn't exist when creating version.c/version.h
+do_compile_prepend () {
+	mkdir -p ${B}/src
+}
+
+do_install_append() {
+	for i in df mktemp base64; do mv ${D}${bindir}/$i ${D}${bindir}/$i.${BPN}; done
+
+	install -d ${D}${base_bindir}
+	[ "${base_bindir}" != "${bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i.${BPN}; done
+
+	install -d ${D}${sbindir}
+	[ "${sbindir}" != "${bindir}" ] && for i in ${sbindir_progs}; do mv ${D}${bindir}/$i ${D}${sbindir}/$i.${BPN}; done
+
+	# [ requires special handling because [.coreutils will cause the sed stuff
+	# in update-alternatives to fail, therefore use lbracket - the name used
+	# for the actual source file.
+	mv ${D}${bindir}/[ ${D}${bindir}/lbracket.${BPN}
+
+	# prebuilt man pages
+	install -d ${D}/${mandir}/man1
+	install -t ${D}/${mandir}/man1 ${S}/man/*.1
+	# prebuilt man pages don't do a separate man page for [ vs test.
+	# see comment above r.e. sed and update-alternatives
+	cp -a ${D}${mandir}/man1/test.1 ${D}${mandir}/man1/lbracket.1.${BPN}
+}
+
+do_install_append_class-native(){
+	# remove groups to fix conflict with shadow-native
+	rm -f ${D}${STAGING_BINDIR_NATIVE}/groups
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "lbracket ${bindir_progs} ${base_bindir_progs} ${sbindir_progs} base64 mktemp df"
+ALTERNATIVE_${PN}-doc = "base64.1 mktemp.1 df.1 lbracket.1 groups.1 kill.1 uptime.1 stat.1"
+
+ALTERNATIVE_LINK_NAME[base64] = "${base_bindir}/base64"
+ALTERNATIVE_TARGET[base64] = "${bindir}/base64.${BPN}"
+ALTERNATIVE_LINK_NAME[base64.1] = "${mandir}/man1/base64.1"
+
+ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
+ALTERNATIVE_TARGET[mktemp] = "${bindir}/mktemp.${BPN}"
+ALTERNATIVE_LINK_NAME[mktemp.1] = "${mandir}/man1/mktemp.1"
+
+ALTERNATIVE_LINK_NAME[df] = "${base_bindir}/df"
+ALTERNATIVE_TARGET[df] = "${bindir}/df.${BPN}"
+ALTERNATIVE_LINK_NAME[df.1] = "${mandir}/man1/df.1"
+
+ALTERNATIVE_LINK_NAME[lbracket] = "${bindir}/["
+ALTERNATIVE_TARGET[lbracket] = "${bindir}/lbracket.${BPN}"
+ALTERNATIVE_LINK_NAME[lbracket.1] = "${mandir}/man1/lbracket.1"
+
+ALTERNATIVE_LINK_NAME[groups.1] = "${mandir}/man1/groups.1"
+ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
+ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
+ALTERNATIVE_LINK_NAME[stat.1] = "${mandir}/man1/stat.1"
+
+python __anonymous() {
+	for prog in d.getVar('base_bindir_progs', True).split():
+		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
+
+	for prog in d.getVar('sbindir_progs', True).split():
+		d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('sbindir', True), prog))
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc b/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc
index abd0132..4661e3a 100644
--- a/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc
+++ b/yocto-poky/meta/recipes-core/dbus/dbus-glib.inc
@@ -15,7 +15,7 @@
            file://test-install-makefile.patch \
 "
 
-inherit autotools pkgconfig gettext
+inherit autotools pkgconfig gettext bash-completion
 
 #default disable regression tests, some unit test code in non testing code
 #PACKAGECONFIG_pn-${PN} = "tests" enable regression tests local.conf
@@ -26,18 +26,14 @@
                 --with-dbus-binding-tool=${STAGING_BINDIR_NATIVE}/dbus-binding-tool"
 EXTRA_OECONF_class-native = "--with-introspect-xml=${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml"
 
-PACKAGES += "${PN}-bash-completion ${PN}-tests-dbg ${PN}-tests"
+PACKAGES += "${PN}-tests"
 
 FILES_${PN} = "${libdir}/lib*${SOLIBS}"
-FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d/dbus-bash-completion.sh \
-   ${libexecdir}/dbus-bash-completion-helper"
+FILES_${PN}-bash-completion += "${libexecdir}/dbus-bash-completion-helper"
 FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
 FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
 
 RDEPENDS_${PN}-tests += "dbus-x11"
 FILES_${PN}-tests = "${datadir}/${BPN}/tests"
-FILES_${PN}-tests-dbg = "${datadir}/${BPN}/tests/.debug/* \
-                         ${datadir}/${BPN}/tests/core/.debug/* \
-                         ${datadir}/${BPN}/tests/interfaces/.debug/*"
 
 BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-core/dbus/dbus-glib_0.104.bb b/yocto-poky/meta/recipes-core/dbus/dbus-glib_0.104.bb
deleted file mode 100644
index c1263c0..0000000
--- a/yocto-poky/meta/recipes-core/dbus/dbus-glib_0.104.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require dbus-glib.inc
-
-SRC_URI[md5sum] = "5497d2070709cf796f1878c75a72a039"
-SRC_URI[sha256sum] = "bfc1f1a82bfc3ec3ecafe04d0e87bab7e999f50dce4f4a34d0b89caf6bd821f6"
diff --git a/yocto-poky/meta/recipes-core/dbus/dbus-glib_0.106.bb b/yocto-poky/meta/recipes-core/dbus/dbus-glib_0.106.bb
new file mode 100644
index 0000000..0ae848e
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/dbus/dbus-glib_0.106.bb
@@ -0,0 +1,4 @@
+require dbus-glib.inc
+
+SRC_URI[md5sum] = "2eea0b7f52b49f600a07abfd8535d4e4"
+SRC_URI[sha256sum] = "b38952706dcf68bad9c302999ef0f420b8cf1a2428227123f0ac4764b689c046"
diff --git a/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb b/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb
new file mode 100644
index 0000000..a768a09
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/dbus/dbus-test_1.10.6.bb
@@ -0,0 +1,61 @@
+SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
+HOMEPAGE = "http://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+                    file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+
+DEPENDS = "python-pygobject dbus"
+
+RDEPENDS_${PN} += "make"
+RDEPENDS_${PN}-dev = ""
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+           file://tmpdir.patch \
+           file://dbus-1.init  \
+           file://run-ptest \
+           file://python-config.patch \
+           file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+           "
+
+SRC_URI[md5sum] = "26d0cf3a1c9782cb0e342101f0450440"
+SRC_URI[sha256sum] = "b5fefa08a77edd76cd64d872db949eebc02cf6f3f8be82e4bbc641742af5d35f"
+
+S="${WORKDIR}/dbus-${PV}"
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
+
+inherit autotools pkgconfig gettext ptest upstream-version-is-even
+
+EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
+EXTRA_OECONF_X_class-native = "--without-x"
+
+EXTRA_OECONF = "--enable-tests \
+                --enable-modular-tests \
+                --enable-installed-tests \
+                --enable-checks \
+                --enable-asserts \
+                --enable-verbose-mode \
+                --disable-xml-docs \
+                --disable-doxygen-docs \
+                --disable-libaudit \
+                --disable-systemd \
+                --without-systemdsystemunitdir \
+                --with-dbus-test-dir=${PTEST_PATH} \
+                ${EXTRA_OECONF_X}"
+
+do_install() {
+    :
+}
+
+do_install_ptest() {
+	install -d ${D}${PTEST_PATH}/test
+	case1="shell printf refs syslog"
+	for i in ${case1}; do install ${B}/test/test-$i ${D}${PTEST_PATH}/test; done
+	case2="marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay"
+	for i in ${case2}; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
+	case3="bus bus-system bus-launch-helper"
+	for i in ${case3}; do install ${B}/bus/test-$i ${D}${PTEST_PATH}/test; done
+	install ${B}/dbus/test-dbus ${D}${PTEST_PATH}/test
+	cp -r ${B}/test/data ${D}${PTEST_PATH}/test
+}
+RDEPENDS_${PN}-ptest += "bash"
diff --git a/yocto-poky/meta/recipes-core/dbus/dbus-test_1.8.20.bb b/yocto-poky/meta/recipes-core/dbus/dbus-test_1.8.20.bb
deleted file mode 100644
index 704070b..0000000
--- a/yocto-poky/meta/recipes-core/dbus/dbus-test_1.8.20.bb
+++ /dev/null
@@ -1,61 +0,0 @@
-SUMMARY = "D-Bus test package (for D-bus functionality testing only)"
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
-                    file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-
-DEPENDS = "python-pygobject dbus dbus-glib"
-
-RDEPENDS_${PN} += "make"
-RDEPENDS_${PN}-dev = ""
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
-           file://tmpdir.patch \
-           file://dbus-1.init  \
-           file://run-ptest \
-           file://python-config.patch \
-           file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
-           "
-
-SRC_URI[md5sum] = "b49890bbabedab3a1c3f4f73c7ff8b2b"
-SRC_URI[sha256sum] = "5c4fbf4c64621c96e871da91d2b729a5b00536e116d3c4612a469d924b1b703a"
-
-S="${WORKDIR}/dbus-${PV}"
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/dbus:"
-
-inherit autotools pkgconfig gettext ptest
-
-EXTRA_OECONF_X = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--with-x', '--without-x', d)}"
-EXTRA_OECONF_X_class-native = "--without-x"
-
-EXTRA_OECONF = "--enable-tests \
-                --enable-modular-tests \
-                --enable-installed-tests \
-                --enable-checks \
-                --enable-asserts \
-                --enable-verbose-mode \
-                --disable-xml-docs \
-                --disable-doxygen-docs \
-                --disable-libaudit \
-                --disable-systemd \
-                --without-systemdsystemunitdir \
-                --with-dbus-test-dir=${PTEST_PATH} \
-                ${EXTRA_OECONF_X}"
-
-do_install() {
-    :
-}
-
-do_install_ptest() {
-	install -d ${D}${PTEST_PATH}/test
-	case1="shell printf refs syslog"
-	for i in ${case1}; do install ${B}/test/test-$i ${D}${PTEST_PATH}/test; done
-	case2="marshal syntax corrupt dbus-daemon dbus-daemon-eavesdrop loopback relay"
-	for i in ${case2}; do install ${B}/test/.libs/test-$i ${D}${PTEST_PATH}/test; done
-	case3="bus bus-system bus-launch-helper"
-	for i in ${case3}; do install ${B}/bus/test-$i ${D}${PTEST_PATH}/test; done
-	install ${B}/dbus/test-dbus ${D}${PTEST_PATH}/test
-	cp -r ${B}/test/data ${D}${PTEST_PATH}/test
-}
-RDEPENDS_${PN}-ptest += "bash"
diff --git a/yocto-poky/meta/recipes-core/dbus/dbus.inc b/yocto-poky/meta/recipes-core/dbus/dbus.inc
deleted file mode 100644
index 3971081..0000000
--- a/yocto-poky/meta/recipes-core/dbus/dbus.inc
+++ /dev/null
@@ -1,170 +0,0 @@
-SUMMARY = "D-Bus message bus"
-DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
-HOMEPAGE = "http://dbus.freedesktop.org"
-SECTION = "base"
-LICENSE = "AFL-2 | GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
-                    file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
-DEPENDS = "expat virtual/libintl"
-RDEPENDS_dbus_class-native = ""
-RDEPENDS_dbus_class-nativesdk = ""
-PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
-ALLOW_EMPTY_dbus-ptest = "1"
-RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
-
-SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
-           file://tmpdir.patch \
-           file://dbus-1.init \
-           file://os-test.patch \
-           file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
-"
-
-inherit useradd autotools pkgconfig gettext update-rc.d
-
-INITSCRIPT_NAME = "dbus-1"
-INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
-
-python __anonymous() {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "-r netdev"
-USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
-                       --no-create-home --shell /bin/false \
-                       --user-group messagebus"
-
-CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
-
-DEBIANNAME_${PN} = "dbus-1"
-
-PACKAGES =+ "${PN}-lib"
-
-OLDPKGNAME = "dbus-x11"
-OLDPKGNAME_class-nativesdk = ""
-
-# for compatibility
-RPROVIDES_${PN} = "${OLDPKGNAME}"
-RREPLACES_${PN} += "${OLDPKGNAME}"
-
-FILES_${PN} = "${bindir}/dbus-daemon* \
-               ${bindir}/dbus-uuidgen \
-               ${bindir}/dbus-cleanup-sockets \
-               ${bindir}/dbus-send \
-               ${bindir}/dbus-monitor \
-               ${bindir}/dbus-launch \
-               ${bindir}/dbus-run-session \
-               ${libexecdir}/dbus* \
-               ${sysconfdir} \
-               ${localstatedir} \
-               ${datadir}/dbus-1/services \
-               ${datadir}/dbus-1/system-services \
-               ${systemd_unitdir}/system/"
-FILES_${PN}-lib = "${libdir}/lib*.so.*"
-RRECOMMENDS_${PN}-lib = "${PN}"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
-
-pkg_postinst_dbus() {
-	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
-        if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
-		if [ -n "$D" ]; then
-			OPTS="--root=$D"
-		fi
-		systemctl $OPTS mask dbus-1.service
-	fi
-
-	if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
-		/etc/init.d/populate-volatile.sh update
-	fi
-}
-
-EXTRA_OECONF = "--disable-tests \
-                --disable-xml-docs \
-                --disable-doxygen-docs \
-                --disable-libaudit \
-                --disable-systemd \
-                --without-dbus-glib"
-
-EXTRA_OECONF_append_class-native = " --disable-selinux"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG_class-native = ""
-PACKAGECONFIG_class-nativesdk = ""
-
-# Would like to --enable-systemd but that's a circular build-dependency between
-# systemd<->dbus
-PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir"
-PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
-
-do_install() {
-	autotools_do_install
-
-	if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
-		install -d ${D}${sysconfdir}/init.d
-		sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
-		install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
-	fi
-
-	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
-		for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
-			install -d ${D}${systemd_unitdir}/system/$i; done
-		install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_unitdir}/system/
-		cd ${D}${systemd_unitdir}/system/dbus.target.wants/
-		ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/dbus.target.wants/dbus.socket
-		ln -fs ../dbus.socket ${D}${systemd_unitdir}/system/sockets.target.wants/dbus.socket
-		ln -fs ../dbus.service ${D}${systemd_unitdir}/system/multi-user.target.wants/dbus.service
-	fi
-
-	install -d ${D}${sysconfdir}/default/volatiles
-	echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
-	     > ${D}${sysconfdir}/default/volatiles/99_dbus
-
-
-	mkdir -p ${D}${localstatedir}/lib/dbus
-
-	chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
-
-	chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
-	chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
-
-	# Remove Red Hat initscript
-	rm -rf ${D}${sysconfdir}/rc.d
-
-	# Remove empty testexec directory as we don't build tests
-	rm -rf ${D}${libdir}/dbus-1.0/test
-
-	# Remove /var/run as it is created on startup
-	rm -rf ${D}${localstatedir}/run
-}
-
-do_install_class-native() {
-	autotools_do_install
-
-	# for dbus-glib-native introspection generation
-	install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
-	# N.B. is below install actually required?
-	install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
-
-	# dbus-glib-native and dbus-glib need this xml file
-	./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
-	
-	# dbus-launch has no X support so lets not install it in case the host
-	# has a more featured and useful version
-	rm -f ${D}${bindir}/dbus-launch
-}
-
-do_install_class-nativesdk() {
-	autotools_do_install
-
-	# dbus-launch has no X support so lets not install it in case the host
-	# has a more featured and useful version
-	rm -f ${D}${bindir}/dbus-launch
-
-	# Remove /var/run to avoid QA error
-	rm -rf ${D}${localstatedir}/run
-}
-BBCLASSEXTEND = "native nativesdk"
-
-INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch b/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch
new file mode 100644
index 0000000..c6eac2b
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/dbus/dbus/0001-configure.ac-support-large-file-for-stat64.patch
@@ -0,0 +1,53 @@
+From e18bd3a571be716d90bedc835a014472470ae7bd Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 30 Dec 2015 10:58:39 +0800
+Subject: [PATCH] configure.ac: support large-file for stat64
+
+While starting dbus-daemon on a 32-bit linux host and it invokes
+fstat to load /etc/dbus-1/system.conf through NFS. If system.conf
+was created with a large indoe number on 64-bit host. The above
+fstat invoking failed. Here is the log of strace:
+............
+$ ls -i /etc/dbus-1/system.conf
+53778558109 /etc/dbus-1/system.conf
+
+$ strace /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
+|open("/etc/dbus-1/system.conf", O_RDONLY) = 4
+|fstat64(4, {st_mode=S_IFREG|0644, st_size=3340, ...}) = 0
+|close(4) = 0
+|close(3) = 0
+|write(2, "Failed to start message bus: Fai"..., 109Failed to start message bus:
+Failed to stat "/etc/dbus-1/system.conf": Value too large for defined data type
+|) = 109
+|exit_group(1) = ?
+|+++ exited with 1 +++
+............
+
+In this situation, we should support large-file for stat64. Add marco
+AC_SYS_LARGEFILE to do the detection at configure time. It can be disabled
+by configuring with the `--disable-largefile' option.
+
+Upstream-Status: Backport
+
+Bug: https://bugs.freedesktop.org/show_bug.cgi?id=93545
+https://bugs.freedesktop.org/attachment.cgi?id=120747
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/configure.ac b/configure.ac
+index 82806ba..cb5a60b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -64,6 +64,7 @@ AC_SUBST(DBUS_VERSION)
+ AC_PROG_CC
+ AM_PROG_CC_C_O
+ AC_PROG_CXX
+ AC_USE_SYSTEM_EXTENSIONS
++AC_SYS_LARGEFILE
+ AC_ISC_POSIX
+ AC_HEADER_STDC
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-core/dbus/dbus/python-config.patch b/yocto-poky/meta/recipes-core/dbus/dbus/python-config.patch
index 2944002..da2f10c 100644
--- a/yocto-poky/meta/recipes-core/dbus/dbus/python-config.patch
+++ b/yocto-poky/meta/recipes-core/dbus/dbus/python-config.patch
@@ -7,19 +7,28 @@
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
---- dbus-1.6.8/configure.ac.orig	2013-07-11 14:15:58.834554799 -0500
-+++ dbus-1.6.8/configure.ac	2013-07-11 14:14:40.969554848 -0500
-@@ -257,13 +257,6 @@
+---
+ configure.ac | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 80d27b4..becc1cc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -279,13 +279,6 @@ if test "x$enable_tests" = xyes; then
    # full test coverage is required, Python is a hard dependency
-   AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygobject])
+   AC_MSG_NOTICE([Full test coverage (--enable-tests=yes) requires Python, dbus-python, pygi])
    AM_PATH_PYTHON([2.6])
 -  AC_MSG_CHECKING([for Python modules for full test coverage])
--  if "$PYTHON" -c "import dbus, gobject, dbus.mainloop.glib"; then
+-  if "$PYTHON" -c "import dbus, gi.repository.GObject, dbus.mainloop.glib"; then
 -    AC_MSG_RESULT([yes])
 -  else
 -    AC_MSG_RESULT([no])
--    AC_MSG_ERROR([cannot import dbus, gobject, dbus.mainloop.glib Python modules])
+-    AC_MSG_ERROR([cannot import dbus, gi.repository.GObject, dbus.mainloop.glib Python modules])
 -  fi
  else
    # --enable-tests not given: do not abort if Python is missing
    AM_PATH_PYTHON([2.6], [], [:])
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb b/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb
new file mode 100644
index 0000000..245798a
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/dbus/dbus_1.10.6.bb
@@ -0,0 +1,181 @@
+SUMMARY = "D-Bus message bus"
+DESCRIPTION = "D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a \"single instance\" application or daemon, and to launch applications and daemons on demand when their services are needed."
+HOMEPAGE = "http://dbus.freedesktop.org"
+SECTION = "base"
+LICENSE = "AFL-2 | GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10dded3b58148f3f1fd804b26354af3e \
+                    file://dbus/dbus.h;beginline=6;endline=20;md5=7755c9d7abccd5dbd25a6a974538bb3c"
+DEPENDS = "expat virtual/libintl"
+RDEPENDS_dbus_class-native = ""
+RDEPENDS_dbus_class-nativesdk = ""
+PACKAGES += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
+ALLOW_EMPTY_dbus-ptest = "1"
+RDEPENDS_dbus-ptest_class-target = "dbus-test-ptest"
+
+SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
+           file://tmpdir.patch \
+           file://dbus-1.init \
+           file://os-test.patch \
+           file://clear-guid_from_server-if-send_negotiate_unix_f.patch \
+           file://0001-configure.ac-support-large-file-for-stat64.patch \
+"
+
+SRC_URI[md5sum] = "26d0cf3a1c9782cb0e342101f0450440"
+SRC_URI[sha256sum] = "b5fefa08a77edd76cd64d872db949eebc02cf6f3f8be82e4bbc641742af5d35f"
+
+inherit useradd autotools pkgconfig gettext update-rc.d upstream-version-is-even
+
+INITSCRIPT_NAME = "dbus-1"
+INITSCRIPT_PARAMS = "start 02 5 3 2 . stop 20 0 1 6 ."
+
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "-r netdev"
+USERADD_PARAM_${PN} = "--system --home ${localstatedir}/lib/dbus \
+                       --no-create-home --shell /bin/false \
+                       --user-group messagebus"
+
+CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
+
+DEBIANNAME_${PN} = "dbus-1"
+
+PACKAGES =+ "${PN}-lib"
+
+OLDPKGNAME = "dbus-x11"
+OLDPKGNAME_class-nativesdk = ""
+
+# for compatibility
+RPROVIDES_${PN} = "${OLDPKGNAME}"
+RREPLACES_${PN} += "${OLDPKGNAME}"
+
+FILES_${PN} = "${bindir}/dbus-daemon* \
+               ${bindir}/dbus-uuidgen \
+               ${bindir}/dbus-cleanup-sockets \
+               ${bindir}/dbus-send \
+               ${bindir}/dbus-monitor \
+               ${bindir}/dbus-launch \
+               ${bindir}/dbus-run-session \
+               ${bindir}/dbus-update-activation-environment \
+               ${libexecdir}/dbus* \
+               ${sysconfdir} \
+               ${localstatedir} \
+               ${datadir}/dbus-1/services \
+               ${datadir}/dbus-1/system-services \
+               ${datadir}/dbus-1/session.d \
+               ${datadir}/dbus-1/session.conf \
+               ${datadir}/dbus-1/system.d \
+               ${datadir}/dbus-1/system.conf \
+               ${systemd_system_unitdir} \
+               ${systemd_user_unitdir} \
+"
+FILES_${PN}-lib = "${libdir}/lib*.so.*"
+RRECOMMENDS_${PN}-lib = "${PN}"
+FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-test-tool"
+
+pkg_postinst_dbus() {
+	# If both systemd and sysvinit are enabled, mask the dbus-1 init script
+        if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+		if [ -n "$D" ]; then
+			OPTS="--root=$D"
+		fi
+		systemctl $OPTS mask dbus-1.service
+	fi
+
+	if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then
+		/etc/init.d/populate-volatile.sh update
+	fi
+}
+
+EXTRA_OECONF = "--disable-tests \
+                --disable-xml-docs \
+                --disable-doxygen-docs \
+                --disable-libaudit \
+                "
+
+EXTRA_OECONF_append_class-native = " --disable-selinux"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG_class-native = ""
+PACKAGECONFIG_class-nativesdk = ""
+
+PACKAGECONFIG[systemd] = "--enable-systemd --with-systemdsystemunitdir=${systemd_system_unitdir},--disable-systemd --without-systemdsystemunitdir,systemd"
+PACKAGECONFIG[x11] = "--with-x --enable-x11-autolaunch,--without-x --disable-x11-autolaunch, virtual/libx11 libsm"
+PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
+PACKAGECONFIG[user-session] = "--enable-user-session --with-systemduserunitdir=${systemd_user_unitdir},--disable-user-session"
+
+do_install() {
+	autotools_do_install
+
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+		install -d ${D}${sysconfdir}/init.d
+		sed 's:@bindir@:${bindir}:' < ${WORKDIR}/dbus-1.init >${WORKDIR}/dbus-1.init.sh
+		install -m 0755 ${WORKDIR}/dbus-1.init.sh ${D}${sysconfdir}/init.d/dbus-1
+	fi
+
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+		for i in dbus.target.wants sockets.target.wants multi-user.target.wants; do \
+			install -d ${D}${systemd_system_unitdir}/$i; done
+		install -m 0644 ${B}/bus/dbus.service ${B}/bus/dbus.socket ${D}${systemd_system_unitdir}/
+		cd ${D}${systemd_system_unitdir}/dbus.target.wants/
+		ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/dbus.target.wants/dbus.socket
+		ln -fs ../dbus.socket ${D}${systemd_system_unitdir}/sockets.target.wants/dbus.socket
+		ln -fs ../dbus.service ${D}${systemd_system_unitdir}/multi-user.target.wants/dbus.service
+	fi
+
+	install -d ${D}${sysconfdir}/default/volatiles
+	echo "d messagebus messagebus 0755 ${localstatedir}/run/dbus none" \
+	     > ${D}${sysconfdir}/default/volatiles/99_dbus
+
+
+	mkdir -p ${D}${localstatedir}/lib/dbus
+
+	chown messagebus:messagebus ${D}${localstatedir}/lib/dbus
+
+	chown root:messagebus ${D}${libexecdir}/dbus-daemon-launch-helper
+	chmod 4755 ${D}${libexecdir}/dbus-daemon-launch-helper
+
+	# Remove Red Hat initscript
+	rm -rf ${D}${sysconfdir}/rc.d
+
+	# Remove empty testexec directory as we don't build tests
+	rm -rf ${D}${libdir}/dbus-1.0/test
+
+	# Remove /var/run as it is created on startup
+	rm -rf ${D}${localstatedir}/run
+}
+
+do_install_class-native() {
+	autotools_do_install
+
+	# for dbus-glib-native introspection generation
+	install -d ${D}${STAGING_DATADIR_NATIVE}/dbus/
+	# N.B. is below install actually required?
+	install -m 0644 bus/session.conf ${D}${STAGING_DATADIR_NATIVE}/dbus/session.conf
+
+	# dbus-glib-native and dbus-glib need this xml file
+	./bus/dbus-daemon --introspect > ${D}${STAGING_DATADIR_NATIVE}/dbus/dbus-bus-introspect.xml
+	
+	# dbus-launch has no X support so lets not install it in case the host
+	# has a more featured and useful version
+	rm -f ${D}${bindir}/dbus-launch
+}
+
+do_install_class-nativesdk() {
+	autotools_do_install
+
+	# dbus-launch has no X support so lets not install it in case the host
+	# has a more featured and useful version
+	rm -f ${D}${bindir}/dbus-launch
+
+	# Remove /var/run to avoid QA error
+	rm -rf ${D}${localstatedir}/run
+}
+BBCLASSEXTEND = "native nativesdk"
+
+INSANE_SKIP_${PN}-ptest += "build-deps"
diff --git a/yocto-poky/meta/recipes-core/dbus/dbus_1.8.20.bb b/yocto-poky/meta/recipes-core/dbus/dbus_1.8.20.bb
deleted file mode 100644
index a8f2094..0000000
--- a/yocto-poky/meta/recipes-core/dbus/dbus_1.8.20.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-include dbus.inc
-
-SRC_URI[md5sum] = "b49890bbabedab3a1c3f4f73c7ff8b2b"
-SRC_URI[sha256sum] = "5c4fbf4c64621c96e871da91d2b729a5b00536e116d3c4612a469d924b1b703a"
diff --git a/yocto-poky/meta/recipes-core/dropbear/dropbear.inc b/yocto-poky/meta/recipes-core/dropbear/dropbear.inc
index a2c736e..1dce2a5 100644
--- a/yocto-poky/meta/recipes-core/dropbear/dropbear.inc
+++ b/yocto-poky/meta/recipes-core/dropbear/dropbear.inc
@@ -41,9 +41,6 @@
 
 SYSTEMD_SERVICE_${PN} = "dropbear.socket"
 
-CFLAGS_prepend = " -I. "
-LD = "${CC}"
-
 SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
 BINCOMMANDS = "dbclient ssh scp"
 EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
diff --git a/yocto-poky/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch b/yocto-poky/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
index c408c57..539cb12 100644
--- a/yocto-poky/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
+++ b/yocto-poky/meta/recipes-core/dropbear/dropbear/0005-dropbear-enable-pam.patch
@@ -1,28 +1,36 @@
-Subject: [PATCH 5/6] dropbear enable pam
+From b8cece92ba19aa77ac013ea161bfe4c7147747c9 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Wed, 2 Dec 2015 11:36:02 +0200
+Subject: Enable pam
 
-dropbear: We need modify file option.h besides enabling pam in \
+We need modify file option.h besides enabling pam in
 configure if we want dropbear to support pam.
 
 Upstream-Status: Pending
 
 Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
 ---
  options.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-Index: dropbear-2013.62/options.h
-===================================================================
---- dropbear-2013.62.orig/options.h	2014-01-14 21:53:02.803262009 +0000
-+++ dropbear-2013.62/options.h	2014-01-14 21:53:56.119263462 +0000
-@@ -192,9 +192,9 @@
-  * PAM challenge/response.
-  * You can't enable both PASSWORD and PAM. */
+diff --git a/options.h b/options.h
+index 94261f6..90bfe2f 100644
+--- a/options.h
++++ b/options.h
+@@ -208,10 +208,10 @@ If you test it please contact the Dropbear author */
  
+ /* This requires crypt() */
+ #ifdef HAVE_CRYPT
 -#define ENABLE_SVR_PASSWORD_AUTH
 +/*#define ENABLE_SVR_PASSWORD_AUTH*/
+ #endif
  /* PAM requires ./configure --enable-pam */
 -/*#define ENABLE_SVR_PAM_AUTH */
 +#define ENABLE_SVR_PAM_AUTH
  #define ENABLE_SVR_PUBKEY_AUTH
  
  /* Whether to take public key options in 
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb b/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb
index 4dabefa..6332579 100644
--- a/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb
+++ b/yocto-poky/meta/recipes-core/dropbear/dropbear_2015.71.bb
@@ -2,3 +2,4 @@
 
 SRC_URI[md5sum] = "2ccc0a2f3e37ca221db12c5af6a88137"
 SRC_URI[sha256sum] = "376214169c0e187ee9f48ae1a99b3f835016ad5b98ede4bfd1cf581deba783af"
+
diff --git a/yocto-poky/meta/recipes-core/expat/expat-2.1.0/expat-CVE-2015-1283.patch b/yocto-poky/meta/recipes-core/expat/expat-2.1.0/expat-CVE-2015-1283.patch
new file mode 100644
index 0000000..1d0acb6
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/expat/expat-2.1.0/expat-CVE-2015-1283.patch
@@ -0,0 +1,62 @@
+Multiple integer overflows in the XML_GetBuffer function in Expat 
+through 2.1.0, allow remote attackers to cause a denial of service 
+(heap-based buffer overflow) or possibly have unspecified other 
+impact via crafted XML data.
+
+CVSSv2:  (AV:N/AC:M/Au:N/C:P/I:P/A:P)
+
+CVE: CVE-2015-1283
+Upstream-Status: Backport
+
+Signed-off-by: Eric Rahm <erahm@mozilla.com>
+Signed-off-by: Zhixiong Chi <zhixiong.chi@windirver.com>
+
+Index: expat-2.1.0/lib/xmlparse.c
+===================================================================
+--- expat-2.1.0.orig/lib/xmlparse.c	2012-03-11 13:13:12.000000000 +0800
++++ expat-2.1.0/lib/xmlparse.c	2015-12-23 10:29:07.347361329 +0800
+@@ -1678,6 +1678,12 @@
+ void * XMLCALL
+ XML_GetBuffer(XML_Parser parser, int len)
+ {
++/* BEGIN MOZILLA CHANGE (sanity check len) */
++  if (len < 0) {
++    errorCode = XML_ERROR_NO_MEMORY;
++    return NULL;
++  }
++/* END MOZILLA CHANGE */
+   switch (ps_parsing) {
+   case XML_SUSPENDED:
+     errorCode = XML_ERROR_SUSPENDED;
+@@ -1689,8 +1695,13 @@
+   }
+ 
+   if (len > bufferLim - bufferEnd) {
+-    /* FIXME avoid integer overflow */
+     int neededSize = len + (int)(bufferEnd - bufferPtr);
++/* BEGIN MOZILLA CHANGE (sanity check neededSize) */
++    if (neededSize < 0) {
++      errorCode = XML_ERROR_NO_MEMORY;
++      return NULL;
++    }
++/* END MOZILLA CHANGE */
+ #ifdef XML_CONTEXT_BYTES
+     int keep = (int)(bufferPtr - buffer);
+ 
+@@ -1719,7 +1730,15 @@
+         bufferSize = INIT_BUFFER_SIZE;
+       do {
+         bufferSize *= 2;
+-      } while (bufferSize < neededSize);
++/* BEGIN MOZILLA CHANGE (prevent infinite loop on overflow) */
++      } while (bufferSize < neededSize && bufferSize > 0);
++/* END MOZILLA CHANGE */
++/* BEGIN MOZILLA CHANGE (sanity check bufferSize) */
++      if (bufferSize <= 0) {
++        errorCode = XML_ERROR_NO_MEMORY;
++        return NULL;
++      }
++/* END MOZILLA CHANGE */
+       newBuf = (char *)MALLOC(bufferSize);
+       if (newBuf == 0) {
+         errorCode = XML_ERROR_NO_MEMORY;
diff --git a/yocto-poky/meta/recipes-core/expat/expat.inc b/yocto-poky/meta/recipes-core/expat/expat.inc
index 6dfafe9..4bd60a2 100644
--- a/yocto-poky/meta/recipes-core/expat/expat.inc
+++ b/yocto-poky/meta/recipes-core/expat/expat.inc
@@ -5,7 +5,9 @@
 LICENSE = "MIT"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/expat/expat-${PV}.tar.gz \
-           file://autotools.patch"
+           file://autotools.patch \
+           file://expat-CVE-2015-1283.patch \
+	  "
 
 inherit autotools lib_package gzipnative
 
diff --git a/yocto-poky/meta/recipes-core/fts/fts.bb b/yocto-poky/meta/recipes-core/fts/fts.bb
new file mode 100644
index 0000000..c301720
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/fts/fts.bb
@@ -0,0 +1,45 @@
+# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "keith bostic's POSIX file tree stream operations library"
+HOMEPAGE = "https://sites.google.com/a/bostic.com/keithbostic"
+LICENSE = "BSD-4-Clause"
+LIC_FILES_CHKSUM = "file://fts.h;beginline=1;endline=36;md5=2532eddb3d1a21905723a4011ec4e085"
+SECTION = "libs"
+
+SRC_URI = "https://sites.google.com/a/bostic.com/keithbostic/files/fts.tar.gz \
+           file://fts-header-correctness.patch \
+           file://fts-uclibc.patch \
+           file://remove_cdefs.patch \
+           file://stdint.patch \
+           file://gcc5.patch \
+"
+
+SRC_URI[md5sum] = "120c14715485ec6ced14f494d059d20a"
+SRC_URI[sha256sum] = "3df9b9b5a45aeaf16f33bb84e692a10dc662e22ec8a51748f98767d67fb6f342"
+
+S = "${WORKDIR}/${BPN}"
+
+do_configure[noexec] = "1"
+
+HASHSTYLE_mips = "sysv"
+HASHSTYLE_mipsel = "sysv"
+HASHSTYLE_mips64 = "sysv"
+HASHSTYLE_mips64el = "sysv"
+HASHSTYLE = "gnu"
+
+VER = "0"
+do_compile () {
+    ${CC} -I${S} -fPIC -shared -Wl,--hash-style=${HASHSTYLE} -o libfts.so.${VER} -Wl,-soname,libfts.so.${VER} ${S}/fts.c
+}
+
+do_install() {
+    install -Dm755 ${B}/libfts.so.${VER} ${D}${libdir}/libfts.so.${VER}
+    ln -sf libfts.so.${VER} ${D}${libdir}/libfts.so
+    install -Dm644 ${S}/fts.h ${D}${includedir}/fts.h
+}
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
+
diff --git a/yocto-poky/meta/recipes-core/fts/fts/fts-header-correctness.patch b/yocto-poky/meta/recipes-core/fts/fts/fts-header-correctness.patch
new file mode 100644
index 0000000..c73ddc9
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/fts/fts/fts-header-correctness.patch
@@ -0,0 +1,25 @@
+Included needed headers for compiling with musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate
+
+--- fts.orig/fts.h
++++ fts/fts.h
+@@ -38,6 +38,17 @@
+ #ifndef	_FTS_H_
+ #define	_FTS_H_
+ 
++#include <sys/types.h>
++#include <sys/param.h>
++#include <sys/stat.h>
++
++#include <dirent.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
++
+ typedef struct {
+ 	struct _ftsent *fts_cur;	/* current node */
+ 	struct _ftsent *fts_child;	/* linked list of children */
diff --git a/yocto-poky/meta/recipes-core/fts/fts/fts-uclibc.patch b/yocto-poky/meta/recipes-core/fts/fts/fts-uclibc.patch
new file mode 100644
index 0000000..397654b
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/fts/fts/fts-uclibc.patch
@@ -0,0 +1,50 @@
+Add missing defines for uclibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate
+
+--- fts.orig/fts.c
++++ fts/fts.c
+@@ -31,6 +31,10 @@
+  * SUCH DAMAGE.
+  */
+ 
++#define	alignof(TYPE)   ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
++#define	ALIGNBYTES	(alignof(long double) - 1)
++#define	ALIGN(p)	(((uintptr_t)(p) + ALIGNBYTES) & ~ALIGNBYTES) 
++
+ #if defined(LIBC_SCCS) && !defined(lint)
+ static char sccsid[] = "@(#)fts.c	8.6 (Berkeley) 8/14/94";
+ #endif /* LIBC_SCCS and not lint */
+@@ -652,10 +656,10 @@
+ 		if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
+ 			continue;
+ 
+-		if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_namlen)) == NULL)
++		if ((p = fts_alloc(sp, dp->d_name, (int)dp->d_reclen)) == NULL)
+ 			goto mem1;
+-		if (dp->d_namlen > maxlen) {
+-			if (fts_palloc(sp, (size_t)dp->d_namlen)) {
++		if (dp->d_reclen > maxlen) {
++			if (fts_palloc(sp, (size_t)dp->d_reclen)) {
+ 				/*
+ 				 * No more memory for path or structures.  Save
+ 				 * errno, free up the current structure and the
+@@ -675,7 +679,7 @@
+ 			maxlen = sp->fts_pathlen - sp->fts_cur->fts_pathlen - 1;
+ 		}
+ 
+-		p->fts_pathlen = len + dp->d_namlen + 1;
++		p->fts_pathlen = len + dp->d_reclen + 1;
+ 		p->fts_parent = sp->fts_cur;
+ 		p->fts_level = level;
+ 
+@@ -784,7 +788,7 @@
+ 	/* If user needs stat info, stat buffer already allocated. */
+ 	sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
+ 
+-#ifdef DT_WHT
++#ifdef S_IFWHT
+ 	/*
+ 	 * Whited-out files don't really exist.  However, there's stat(2) file
+ 	 * mask for them, so we set it so that programs (i.e., find) don't have
diff --git a/yocto-poky/meta/recipes-core/fts/fts/gcc5.patch b/yocto-poky/meta/recipes-core/fts/fts/gcc5.patch
new file mode 100644
index 0000000..f5b948e
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/fts/fts/gcc5.patch
@@ -0,0 +1,1368 @@
+Forward port the sources to be able to compile with c99/gcc5
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate
+
+Index: fts/fts.c
+===================================================================
+--- fts.orig/fts.c
++++ fts/fts.c
+@@ -51,16 +51,6 @@ static char sccsid[] = "@(#)fts.c	8.6 (B
+ #include <string.h>
+ #include <unistd.h>
+ 
+-static FTSENT	*fts_alloc __P(FTS *, char *, int);
+-static FTSENT	*fts_build __P(FTS *, int);
+-static void	 fts_lfree __P(FTSENT *);
+-static void	 fts_load __P(FTS *, FTSENT *);
+-static size_t	 fts_maxarglen __P(char * const *);
+-static void	 fts_padjust __P(FTS *, void *);
+-static int	 fts_palloc __P(FTS *, size_t);
+-static FTSENT	*fts_sort __P(FTS *, FTSENT *, int);
+-static u_short	 fts_stat __P(FTS *, struct dirent *, FTSENT *, int);
+-
+ #define	ISDOT(a)	(a[0] == '.' && (!a[1] || a[1] == '.' && !a[2]))
+ 
+ #define	ISSET(opt)	(sp->fts_options & opt)
+@@ -73,119 +63,16 @@ static u_short	 fts_stat __P(FTS *, stru
+ #define	BCHILD		1		/* fts_children */
+ #define	BNAMES		2		/* fts_children, names only */
+ #define	BREAD		3		/* fts_read */
+-
+-FTS *
+-fts_open(argv, options, compar)
+-	char * const *argv;
+-	register int options;
+-	int (*compar)();
+-{
+-	register FTS *sp;
+-	register FTSENT *p, *root;
+-	register int nitems;
+-	FTSENT *parent, *tmp;
+-	int len;
+-
+-	/* Options check. */
+-	if (options & ~FTS_OPTIONMASK) {
+-		errno = EINVAL;
+-		return (NULL);
+-	}
+-
+-	/* Allocate/initialize the stream */
+-	if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
+-		return (NULL);
+-	memset(sp, 0, sizeof(FTS));
+-	sp->fts_compar = compar;
+-	sp->fts_options = options;
+-
+-	/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
+-	if (ISSET(FTS_LOGICAL))
+-		SET(FTS_NOCHDIR);
+-
+-	/*
+-	 * Start out with 1K of path space, and enough, in any case,
+-	 * to hold the user's paths.
+-	 */
+-	if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
+-		goto mem1;
+-
+-	/* Allocate/initialize root's parent. */
+-	if ((parent = fts_alloc(sp, "", 0)) == NULL)
+-		goto mem2;
+-	parent->fts_level = FTS_ROOTPARENTLEVEL;
+-
+-	/* Allocate/initialize root(s). */
+-	for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) {
+-		/* Don't allow zero-length paths. */
+-		if ((len = strlen(*argv)) == 0) {
+-			errno = EINVAL;
+-			goto mem3;
+-		}
+-
+-		p = fts_alloc(sp, *argv, len);
+-		p->fts_level = FTS_ROOTLEVEL;
+-		p->fts_parent = parent;
+-		p->fts_accpath = p->fts_name;
+-		p->fts_info = fts_stat(sp, NULL, p, ISSET(FTS_COMFOLLOW));
+-
+-		/* Command-line "." and ".." are real directories. */
+-		if (p->fts_info == FTS_DOT)
+-			p->fts_info = FTS_D;
+-
+-		/*
+-		 * If comparison routine supplied, traverse in sorted
+-		 * order; otherwise traverse in the order specified.
+-		 */
+-		if (compar) {
+-			p->fts_link = root;
+-			root = p;
+-		} else {
+-			p->fts_link = NULL;
+-			if (root == NULL)
+-				tmp = root = p;
+-			else {
+-				tmp->fts_link = p;
+-				tmp = p;
+-			}
+-		}
+-	}
+-	if (compar && nitems > 1)
+-		root = fts_sort(sp, root, nitems);
+-
+-	/*
+-	 * Allocate a dummy pointer and make fts_read think that we've just
+-	 * finished the node before the root(s); set p->fts_info to FTS_INIT
+-	 * so that everything about the "current" node is ignored.
+-	 */
+-	if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
+-		goto mem3;
+-	sp->fts_cur->fts_link = root;
+-	sp->fts_cur->fts_info = FTS_INIT;
+-
+-	/*
+-	 * If using chdir(2), grab a file descriptor pointing to dot to insure
+-	 * that we can get back here; this could be avoided for some paths,
+-	 * but almost certainly not worth the effort.  Slashes, symbolic links,
+-	 * and ".." are all fairly nasty problems.  Note, if we can't get the
+-	 * descriptor we run anyway, just more slowly.
+-	 */
+-	if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
+-		SET(FTS_NOCHDIR);
+-
+-	return (sp);
+-
+-mem3:	fts_lfree(root);
+-	free(parent);
+-mem2:	free(sp->fts_path);
+-mem1:	free(sp);
+-	return (NULL);
+-}
++/*
++ * Special case a root of "/" so that slashes aren't appended which would
++ * cause paths to be written as "//foo".
++ */
++#define	NAPPEND(p)							\
++	(p->fts_level == FTS_ROOTLEVEL && p->fts_pathlen == 1 &&	\
++	    p->fts_path[0] == '/' ? 0 : p->fts_pathlen)
+ 
+ static void
+-fts_load(sp, p)
+-	FTS *sp;
+-	register FTSENT *p;
++fts_load(FTS *sp, register FTSENT *p)
+ {
+ 	register int len;
+ 	register char *cp;
+@@ -208,332 +95,214 @@ fts_load(sp, p)
+ 	sp->fts_dev = p->fts_dev;
+ }
+ 
+-int
+-fts_close(sp)
+-	FTS *sp;
++static void
++fts_lfree(register FTSENT *head)
+ {
+-	register FTSENT *freep, *p;
+-	int saved_errno;
++	register FTSENT *p;
+ 
+-	/*
+-	 * This still works if we haven't read anything -- the dummy structure
+-	 * points to the root list, so we step through to the end of the root
+-	 * list which has a valid parent pointer.
+-	 */
+-	if (sp->fts_cur) {
+-		for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
+-			freep = p;
+-			p = p->fts_link ? p->fts_link : p->fts_parent;
+-			free(freep);
+-		}
++	/* Free a linked list of structures. */
++	while (p = head) {
++		head = head->fts_link;
+ 		free(p);
+ 	}
++}
+ 
+-	/* Free up child linked list, sort array, path buffer. */
+-	if (sp->fts_child)
+-		fts_lfree(sp->fts_child);
+-	if (sp->fts_array)
+-		free(sp->fts_array);
+-	free(sp->fts_path);
++static size_t
++fts_maxarglen(char * const *argv)
++{
++	size_t len, max;
+ 
+-	/* Return to original directory, save errno if necessary. */
+-	if (!ISSET(FTS_NOCHDIR)) {
+-		saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
+-		(void)close(sp->fts_rfd);
+-	}
++	for (max = 0; *argv; ++argv)
++		if ((len = strlen(*argv)) > max)
++			max = len;
++	return (max);
++}
+ 
+-	/* Free up the stream pointer. */
+-	free(sp);
+ 
+-	/* Set errno and return. */
+-	if (!ISSET(FTS_NOCHDIR) && saved_errno) {
+-		errno = saved_errno;
+-		return (-1);
++/*
++ * When the path is realloc'd, have to fix all of the pointers in structures
++ * already returned.
++ */
++static void
++fts_padjust(FTS *sp, void *addr)
++{
++	FTSENT *p;
++
++#define	ADJUST(p) {							\
++	(p)->fts_accpath =						\
++	    (char *)addr + ((p)->fts_accpath - (p)->fts_path);		\
++	(p)->fts_path = addr;						\
++}
++	/* Adjust the current set of children. */
++	for (p = sp->fts_child; p; p = p->fts_link)
++		ADJUST(p);
++
++	/* Adjust the rest of the tree. */
++	for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
++		ADJUST(p);
++		p = p->fts_link ? p->fts_link : p->fts_parent;
+ 	}
+-	return (0);
+ }
+ 
+ /*
+- * Special case a root of "/" so that slashes aren't appended which would
+- * cause paths to be written as "//foo".
++ * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
++ * Most systems will allow creation of paths much longer than MAXPATHLEN, even
++ * though the kernel won't resolve them.  Add the size (not just what's needed)
++ * plus 256 bytes so don't realloc the path 2 bytes at a time.
+  */
+-#define	NAPPEND(p)							\
+-	(p->fts_level == FTS_ROOTLEVEL && p->fts_pathlen == 1 &&	\
+-	    p->fts_path[0] == '/' ? 0 : p->fts_pathlen)
++static int
++fts_palloc(FTS *sp, size_t more)
++{
++	sp->fts_pathlen += more + 256;
++	sp->fts_path = realloc(sp->fts_path, (size_t)sp->fts_pathlen);
++	return (sp->fts_path == NULL);
++}
+ 
+-FTSENT *
+-fts_read(sp)
+-	register FTS *sp;
++static FTSENT *
++fts_alloc(FTS *sp, char *name, register int namelen)
+ {
+-	register FTSENT *p, *tmp;
+-	register int instr;
+-	register char *t;
+-	int saved_errno;
++	register FTSENT *p;
++	size_t len;
+ 
+-	/* If finished or unrecoverable error, return NULL. */
+-	if (sp->fts_cur == NULL || ISSET(FTS_STOP))
++	/*
++	 * The file name is a variable length array and no stat structure is
++	 * necessary if the user has set the nostat bit.  Allocate the FTSENT
++	 * structure, the file name and the stat structure in one chunk, but
++	 * be careful that the stat structure is reasonably aligned.  Since the
++	 * fts_name field is declared to be of size 1, the fts_name pointer is
++	 * namelen + 2 before the first possible address of the stat structure.
++	 */
++	len = sizeof(FTSENT) + namelen;
++	if (!ISSET(FTS_NOSTAT))
++		len += sizeof(struct stat) + ALIGNBYTES;
++	if ((p = malloc(len)) == NULL)
+ 		return (NULL);
+ 
+-	/* Set current node pointer. */
+-	p = sp->fts_cur;
++	/* Copy the name plus the trailing NULL. */
++	memmove(p->fts_name, name, namelen + 1);
+ 
+-	/* Save and zero out user instructions. */
+-	instr = p->fts_instr;
++	if (!ISSET(FTS_NOSTAT))
++		p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
++	p->fts_namelen = namelen;
++	p->fts_path = sp->fts_path;
++	p->fts_errno = 0;
++	p->fts_flags = 0;
+ 	p->fts_instr = FTS_NOINSTR;
++	p->fts_number = 0;
++	p->fts_pointer = NULL;
++	return (p);
++}
+ 
+-	/* Any type of file may be re-visited; re-stat and re-turn. */
+-	if (instr == FTS_AGAIN) {
+-		p->fts_info = fts_stat(sp, NULL, p, 0);
+-		return (p);
+-	}
+ 
++static u_short
++fts_stat(FTS *sp, register FTSENT *p, struct dirent *dp, int follow)
++{
++	register FTSENT *t;
++	register dev_t dev;
++	register ino_t ino;
++	struct stat *sbp, sb;
++	int saved_errno;
++
++	/* If user needs stat info, stat buffer already allocated. */
++	sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
++
++#ifdef S_IFWHT
+ 	/*
+-	 * Following a symlink -- SLNONE test allows application to see
+-	 * SLNONE and recover.  If indirecting through a symlink, have
+-	 * keep a pointer to current location.  If unable to get that
+-	 * pointer, follow fails.
+-	 */
+-	if (instr == FTS_FOLLOW &&
+-	    (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
+-		p->fts_info = fts_stat(sp, NULL, p, 1);
+-		if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
+-			if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
+-				p->fts_errno = errno;
+-				p->fts_info = FTS_ERR;
+-			} else
+-				p->fts_flags |= FTS_SYMFOLLOW;
+-		return (p);
++	 * Whited-out files don't really exist.  However, there's stat(2) file
++	 * mask for them, so we set it so that programs (i.e., find) don't have
++	 * to test FTS_W separately from other file types.
++	 */
++	if (dp != NULL && dp->d_type == DT_WHT) {
++		memset(sbp, 0, sizeof(struct stat));
++		sbp->st_mode = S_IFWHT;
++		return (FTS_W);
+ 	}
+-
+-	/* Directory in pre-order. */
+-	if (p->fts_info == FTS_D) {
+-		/* If skipped or crossed mount point, do post-order visit. */
+-		if (instr == FTS_SKIP ||
+-		    ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev) {
+-			if (p->fts_flags & FTS_SYMFOLLOW)
+-				(void)close(p->fts_symfd);
+-			if (sp->fts_child) {
+-				fts_lfree(sp->fts_child);
+-				sp->fts_child = NULL;
+-			}
+-			p->fts_info = FTS_DP;
+-			return (p);
+-		} 
+-
+-		/* Rebuild if only read the names and now traversing. */
+-		if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) {
+-			sp->fts_options &= ~FTS_NAMEONLY;
+-			fts_lfree(sp->fts_child);
+-			sp->fts_child = NULL;
+-		}
+-
+-		/*
+-		 * Cd to the subdirectory.
+-		 *
+-		 * If have already read and now fail to chdir, whack the list
+-		 * to make the names come out right, and set the parent errno
+-		 * so the application will eventually get an error condition.
+-		 * Set the FTS_DONTCHDIR flag so that when we logically change
+-		 * directories back to the parent we don't do a chdir.
+-		 *
+-		 * If haven't read do so.  If the read fails, fts_build sets
+-		 * FTS_STOP or the fts_info field of the node.
+-		 */
+-		if (sp->fts_child) {
+-			if (CHDIR(sp, p->fts_accpath)) {
+-				p->fts_errno = errno;
+-				p->fts_flags |= FTS_DONTCHDIR;
+-				for (p = sp->fts_child; p; p = p->fts_link)
+-					p->fts_accpath =
+-					    p->fts_parent->fts_accpath;
+-			}
+-		} else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
+-			if (ISSET(FTS_STOP))
+-				return (NULL);
+-			return (p);
++#endif
++
++	/*
++	 * If doing a logical walk, or application requested FTS_FOLLOW, do
++	 * a stat(2).  If that fails, check for a non-existent symlink.  If
++	 * fail, set the errno from the stat call.
++	 */
++	if (ISSET(FTS_LOGICAL) || follow) {
++		if (stat(p->fts_accpath, sbp)) {
++			saved_errno = errno;
++			if (!lstat(p->fts_accpath, sbp)) {
++				errno = 0;
++				return (FTS_SLNONE);
++			}
++			p->fts_errno = saved_errno;
++			goto err;
+ 		}
+-		p = sp->fts_child;
+-		sp->fts_child = NULL;
+-		goto name;
++	} else if (lstat(p->fts_accpath, sbp)) {
++		p->fts_errno = errno;
++err:		memset(sbp, 0, sizeof(struct stat));
++		return (FTS_NS);
+ 	}
+ 
+-	/* Move to the next node on this level. */
+-next:	tmp = p;
+-	if (p = p->fts_link) {
+-		free(tmp);
+-
+-		/*
+-		 * If reached the top, return to the original directory, and
+-		 * load the paths for the next root.
+-		 */
+-		if (p->fts_level == FTS_ROOTLEVEL) {
+-			if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
+-				SET(FTS_STOP);
+-				return (NULL);
+-			}
+-			fts_load(sp, p);
+-			return (sp->fts_cur = p);
+-		}
+-
++	if (S_ISDIR(sbp->st_mode)) {
+ 		/*
+-		 * User may have called fts_set on the node.  If skipped,
+-		 * ignore.  If followed, get a file descriptor so we can
+-		 * get back if necessary.
++		 * Set the device/inode.  Used to find cycles and check for
++		 * crossing mount points.  Also remember the link count, used
++		 * in fts_build to limit the number of stat calls.  It is
++		 * understood that these fields are only referenced if fts_info
++		 * is set to FTS_D.
+ 		 */
+-		if (p->fts_instr == FTS_SKIP)
+-			goto next;
+-		if (p->fts_instr == FTS_FOLLOW) {
+-			p->fts_info = fts_stat(sp, NULL, p, 1);
+-			if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
+-				if ((p->fts_symfd =
+-				    open(".", O_RDONLY, 0)) < 0) {
+-					p->fts_errno = errno;
+-					p->fts_info = FTS_ERR;
+-				} else
+-					p->fts_flags |= FTS_SYMFOLLOW;
+-			p->fts_instr = FTS_NOINSTR;
+-		}
+-
+-name:		t = sp->fts_path + NAPPEND(p->fts_parent);
+-		*t++ = '/';
+-		memmove(t, p->fts_name, p->fts_namelen + 1);
+-		return (sp->fts_cur = p);
+-	}
++		dev = p->fts_dev = sbp->st_dev;
++		ino = p->fts_ino = sbp->st_ino;
++		p->fts_nlink = sbp->st_nlink;
+ 
+-	/* Move up to the parent node. */
+-	p = tmp->fts_parent;
+-	free(tmp);
++		if (ISDOT(p->fts_name))
++			return (FTS_DOT);
+ 
+-	if (p->fts_level == FTS_ROOTPARENTLEVEL) {
+ 		/*
+-		 * Done; free everything up and set errno to 0 so the user
+-		 * can distinguish between error and EOF.
++		 * Cycle detection is done by brute force when the directory
++		 * is first encountered.  If the tree gets deep enough or the
++		 * number of symbolic links to directories is high enough,
++		 * something faster might be worthwhile.
+ 		 */
+-		free(p);
+-		errno = 0;
+-		return (sp->fts_cur = NULL);
+-	}
+-
+-	/* Nul terminate the pathname. */
+-	sp->fts_path[p->fts_pathlen] = '\0';
+-
+-	/*
+-	 * Return to the parent directory.  If at a root node or came through
+-	 * a symlink, go back through the file descriptor.  Otherwise, cd up
+-	 * one directory.
+-	 */
+-	if (p->fts_level == FTS_ROOTLEVEL) {
+-		if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
+-			SET(FTS_STOP);
+-			return (NULL);
+-		}
+-	} else if (p->fts_flags & FTS_SYMFOLLOW) {
+-		if (FCHDIR(sp, p->fts_symfd)) {
+-			saved_errno = errno;
+-			(void)close(p->fts_symfd);
+-			errno = saved_errno;
+-			SET(FTS_STOP);
+-			return (NULL);
+-		}
+-		(void)close(p->fts_symfd);
+-	} else if (!(p->fts_flags & FTS_DONTCHDIR)) {
+-		if (CHDIR(sp, "..")) {
+-			SET(FTS_STOP);
+-			return (NULL);
+-		}
+-	}
+-	p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
+-	return (sp->fts_cur = p);
+-}
+-
+-/*
+- * Fts_set takes the stream as an argument although it's not used in this
+- * implementation; it would be necessary if anyone wanted to add global
+- * semantics to fts using fts_set.  An error return is allowed for similar
+- * reasons.
+- */
+-/* ARGSUSED */
+-int
+-fts_set(sp, p, instr)
+-	FTS *sp;
+-	FTSENT *p;
+-	int instr;
+-{
+-	if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
+-	    instr != FTS_NOINSTR && instr != FTS_SKIP) {
+-		errno = EINVAL;
+-		return (1);
++		for (t = p->fts_parent;
++		    t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
++			if (ino == t->fts_ino && dev == t->fts_dev) {
++				p->fts_cycle = t;
++				return (FTS_DC);
++			}
++		return (FTS_D);
+ 	}
+-	p->fts_instr = instr;
+-	return (0);
++	if (S_ISLNK(sbp->st_mode))
++		return (FTS_SL);
++	if (S_ISREG(sbp->st_mode))
++		return (FTS_F);
++	return (FTS_DEFAULT);
+ }
+ 
+-FTSENT *
+-fts_children(sp, instr)
+-	register FTS *sp;
+-	int instr;
++static FTSENT *
++fts_sort(FTS *sp, FTSENT *head, register int nitems)
+ {
+-	register FTSENT *p;
+-	int fd;
+-
+-	if (instr && instr != FTS_NAMEONLY) {
+-		errno = EINVAL;
+-		return (NULL);
+-	}
+-
+-	/* Set current node pointer. */
+-	p = sp->fts_cur;
+-
+-	/*
+-	 * Errno set to 0 so user can distinguish empty directory from
+-	 * an error.
+-	 */
+-	errno = 0;
+-
+-	/* Fatal errors stop here. */
+-	if (ISSET(FTS_STOP))
+-		return (NULL);
+-
+-	/* Return logical hierarchy of user's arguments. */
+-	if (p->fts_info == FTS_INIT)
+-		return (p->fts_link);
+-
+-	/*
+-	 * If not a directory being visited in pre-order, stop here.  Could
+-	 * allow FTS_DNR, assuming the user has fixed the problem, but the
+-	 * same effect is available with FTS_AGAIN.
+-	 */
+-	if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
+-		return (NULL);
+-
+-	/* Free up any previous child list. */
+-	if (sp->fts_child)
+-		fts_lfree(sp->fts_child);
+-
+-	if (instr == FTS_NAMEONLY) {
+-		sp->fts_options |= FTS_NAMEONLY;
+-		instr = BNAMES;
+-	} else 
+-		instr = BCHILD;
++	register FTSENT **ap, *p;
+ 
+ 	/*
+-	 * If using chdir on a relative path and called BEFORE fts_read does
+-	 * its chdir to the root of a traversal, we can lose -- we need to
+-	 * chdir into the subdirectory, and we don't know where the current
+-	 * directory is, so we can't get back so that the upcoming chdir by
+-	 * fts_read will work.
++	 * Construct an array of pointers to the structures and call qsort(3).
++	 * Reassemble the array in the order returned by qsort.  If unable to
++	 * sort for memory reasons, return the directory entries in their
++	 * current order.  Allocate enough space for the current needs plus
++	 * 40 so don't realloc one entry at a time.
+ 	 */
+-	if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
+-	    ISSET(FTS_NOCHDIR))
+-		return (sp->fts_child = fts_build(sp, instr));
+-
+-	if ((fd = open(".", O_RDONLY, 0)) < 0)
+-		return (NULL);
+-	sp->fts_child = fts_build(sp, instr);
+-	if (fchdir(fd))
+-		return (NULL);
+-	(void)close(fd);
+-	return (sp->fts_child);
++	if (nitems > sp->fts_nitems) {
++		sp->fts_nitems = nitems + 40;
++		if ((sp->fts_array = realloc(sp->fts_array,
++		    (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
++			sp->fts_nitems = 0;
++			return (head);
++		}
++	}
++	for (ap = sp->fts_array, p = head; p; p = p->fts_link)
++		*ap++ = p;
++	qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
++	for (head = *(ap = sp->fts_array); --nitems; ++ap)
++		ap[0]->fts_link = ap[1];
++	ap[0]->fts_link = NULL;
++	return (head);
+ }
+ 
+ /*
+@@ -551,9 +320,7 @@ fts_children(sp, instr)
+  * been found, cutting the stat calls by about 2/3.
+  */
+ static FTSENT *
+-fts_build(sp, type)
+-	register FTS *sp;
+-	int type;
++fts_build(register FTS *sp, int type)
+ {
+ 	register struct dirent *dp;
+ 	register FTSENT *p, *head;
+@@ -716,283 +483,479 @@ mem1:				saved_errno = errno;
+ 				--nlinks;
+ 		}
+ 
+-		/* We walk in directory order so "ls -f" doesn't get upset. */
+-		p->fts_link = NULL;
+-		if (head == NULL)
+-			head = tail = p;
+-		else {
+-			tail->fts_link = p;
+-			tail = p;
++		/* We walk in directory order so "ls -f" doesn't get upset. */
++		p->fts_link = NULL;
++		if (head == NULL)
++			head = tail = p;
++		else {
++			tail->fts_link = p;
++			tail = p;
++		}
++		++nitems;
++	}
++	(void)closedir(dirp);
++
++	/*
++	 * If had to realloc the path, adjust the addresses for the rest
++	 * of the tree.
++	 */
++	if (adjaddr)
++		fts_padjust(sp, adjaddr);
++
++	/*
++	 * If not changing directories, reset the path back to original
++	 * state.
++	 */
++	if (ISSET(FTS_NOCHDIR)) {
++		if (cp - 1 > sp->fts_path)
++			--cp;
++		*cp = '\0';
++	}
++
++	/*
++	 * If descended after called from fts_children or after called from
++	 * fts_read and nothing found, get back.  At the root level we use
++	 * the saved fd; if one of fts_open()'s arguments is a relative path
++	 * to an empty directory, we wind up here with no other way back.  If
++	 * can't get back, we're done.
++	 */
++	if (descend && (type == BCHILD || !nitems) &&
++	    (cur->fts_level == FTS_ROOTLEVEL ?
++	    FCHDIR(sp, sp->fts_rfd) : CHDIR(sp, ".."))) {
++		cur->fts_info = FTS_ERR;
++		SET(FTS_STOP);
++		return (NULL);
++	}
++
++	/* If didn't find anything, return NULL. */
++	if (!nitems) {
++		if (type == BREAD)
++			cur->fts_info = FTS_DP;
++		return (NULL);
++	}
++
++	/* Sort the entries. */
++	if (sp->fts_compar && nitems > 1)
++		head = fts_sort(sp, head, nitems);
++	return (head);
++}
++
++
++FTS *
++fts_open(char * const *argv, register int options, int (*compar)())
++{
++	register FTS *sp;
++	register FTSENT *p, *root;
++	register int nitems;
++	FTSENT *parent, *tmp;
++	int len;
++
++	/* Options check. */
++	if (options & ~FTS_OPTIONMASK) {
++		errno = EINVAL;
++		return (NULL);
++	}
++
++	/* Allocate/initialize the stream */
++	if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
++		return (NULL);
++	memset(sp, 0, sizeof(FTS));
++	sp->fts_compar = compar;
++	sp->fts_options = options;
++
++	/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
++	if (ISSET(FTS_LOGICAL))
++		SET(FTS_NOCHDIR);
++
++	/*
++	 * Start out with 1K of path space, and enough, in any case,
++	 * to hold the user's paths.
++	 */
++	if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
++		goto mem1;
++
++	/* Allocate/initialize root's parent. */
++	if ((parent = fts_alloc(sp, "", 0)) == NULL)
++		goto mem2;
++	parent->fts_level = FTS_ROOTPARENTLEVEL;
++
++	/* Allocate/initialize root(s). */
++	for (root = NULL, nitems = 0; *argv; ++argv, ++nitems) {
++		/* Don't allow zero-length paths. */
++		if ((len = strlen(*argv)) == 0) {
++			errno = EINVAL;
++			goto mem3;
++		}
++
++		p = fts_alloc(sp, *argv, len);
++		p->fts_level = FTS_ROOTLEVEL;
++		p->fts_parent = parent;
++		p->fts_accpath = p->fts_name;
++		p->fts_info = fts_stat(sp, NULL, p, ISSET(FTS_COMFOLLOW));
++
++		/* Command-line "." and ".." are real directories. */
++		if (p->fts_info == FTS_DOT)
++			p->fts_info = FTS_D;
++
++		/*
++		 * If comparison routine supplied, traverse in sorted
++		 * order; otherwise traverse in the order specified.
++		 */
++		if (compar) {
++			p->fts_link = root;
++			root = p;
++		} else {
++			p->fts_link = NULL;
++			if (root == NULL)
++				tmp = root = p;
++			else {
++				tmp->fts_link = p;
++				tmp = p;
++			}
+ 		}
+-		++nitems;
+ 	}
+-	(void)closedir(dirp);
+-
+-	/*
+-	 * If had to realloc the path, adjust the addresses for the rest
+-	 * of the tree.
+-	 */
+-	if (adjaddr)
+-		fts_padjust(sp, adjaddr);
++	if (compar && nitems > 1)
++		root = fts_sort(sp, root, nitems);
+ 
+ 	/*
+-	 * If not changing directories, reset the path back to original
+-	 * state.
++	 * Allocate a dummy pointer and make fts_read think that we've just
++	 * finished the node before the root(s); set p->fts_info to FTS_INIT
++	 * so that everything about the "current" node is ignored.
+ 	 */
+-	if (ISSET(FTS_NOCHDIR)) {
+-		if (cp - 1 > sp->fts_path)
+-			--cp;
+-		*cp = '\0';
+-	}
++	if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
++		goto mem3;
++	sp->fts_cur->fts_link = root;
++	sp->fts_cur->fts_info = FTS_INIT;
+ 
+ 	/*
+-	 * If descended after called from fts_children or after called from
+-	 * fts_read and nothing found, get back.  At the root level we use
+-	 * the saved fd; if one of fts_open()'s arguments is a relative path
+-	 * to an empty directory, we wind up here with no other way back.  If
+-	 * can't get back, we're done.
++	 * If using chdir(2), grab a file descriptor pointing to dot to insure
++	 * that we can get back here; this could be avoided for some paths,
++	 * but almost certainly not worth the effort.  Slashes, symbolic links,
++	 * and ".." are all fairly nasty problems.  Note, if we can't get the
++	 * descriptor we run anyway, just more slowly.
+ 	 */
+-	if (descend && (type == BCHILD || !nitems) &&
+-	    (cur->fts_level == FTS_ROOTLEVEL ?
+-	    FCHDIR(sp, sp->fts_rfd) : CHDIR(sp, ".."))) {
+-		cur->fts_info = FTS_ERR;
+-		SET(FTS_STOP);
+-		return (NULL);
+-	}
++	if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
++		SET(FTS_NOCHDIR);
+ 
+-	/* If didn't find anything, return NULL. */
+-	if (!nitems) {
+-		if (type == BREAD)
+-			cur->fts_info = FTS_DP;
+-		return (NULL);
+-	}
++	return (sp);
+ 
+-	/* Sort the entries. */
+-	if (sp->fts_compar && nitems > 1)
+-		head = fts_sort(sp, head, nitems);
+-	return (head);
++mem3:	fts_lfree(root);
++	free(parent);
++mem2:	free(sp->fts_path);
++mem1:	free(sp);
++	return (NULL);
+ }
+ 
+-static u_short
+-fts_stat(sp, dp, p, follow)
+-	FTS *sp;
+-	register FTSENT *p;
+-	struct dirent *dp;
+-	int follow;
++FTSENT *
++fts_read(register FTS *sp)
+ {
+-	register FTSENT *t;
+-	register dev_t dev;
+-	register ino_t ino;
+-	struct stat *sbp, sb;
++	register FTSENT *p, *tmp;
++	register int instr;
++	register char *t;
+ 	int saved_errno;
+ 
+-	/* If user needs stat info, stat buffer already allocated. */
+-	sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp;
++	/* If finished or unrecoverable error, return NULL. */
++	if (sp->fts_cur == NULL || ISSET(FTS_STOP))
++		return (NULL);
+ 
+-#ifdef S_IFWHT
+-	/*
+-	 * Whited-out files don't really exist.  However, there's stat(2) file
+-	 * mask for them, so we set it so that programs (i.e., find) don't have
+-	 * to test FTS_W separately from other file types.
+-	 */
+-	if (dp != NULL && dp->d_type == DT_WHT) {
+-		memset(sbp, 0, sizeof(struct stat));
+-		sbp->st_mode = S_IFWHT;
+-		return (FTS_W);
++	/* Set current node pointer. */
++	p = sp->fts_cur;
++
++	/* Save and zero out user instructions. */
++	instr = p->fts_instr;
++	p->fts_instr = FTS_NOINSTR;
++
++	/* Any type of file may be re-visited; re-stat and re-turn. */
++	if (instr == FTS_AGAIN) {
++		p->fts_info = fts_stat(sp, NULL, p, 0);
++		return (p);
+ 	}
+-#endif
+-	
++
+ 	/*
+-	 * If doing a logical walk, or application requested FTS_FOLLOW, do
+-	 * a stat(2).  If that fails, check for a non-existent symlink.  If
+-	 * fail, set the errno from the stat call.
++	 * Following a symlink -- SLNONE test allows application to see
++	 * SLNONE and recover.  If indirecting through a symlink, have
++	 * keep a pointer to current location.  If unable to get that
++	 * pointer, follow fails.
+ 	 */
+-	if (ISSET(FTS_LOGICAL) || follow) {
+-		if (stat(p->fts_accpath, sbp)) {
+-			saved_errno = errno;
+-			if (!lstat(p->fts_accpath, sbp)) {
+-				errno = 0;
+-				return (FTS_SLNONE);
+-			} 
+-			p->fts_errno = saved_errno;
+-			goto err;
++	if (instr == FTS_FOLLOW &&
++	    (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
++		p->fts_info = fts_stat(sp, NULL, p, 1);
++		if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
++			if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
++				p->fts_errno = errno;
++				p->fts_info = FTS_ERR;
++			} else
++				p->fts_flags |= FTS_SYMFOLLOW;
++		return (p);
++	}
++
++	/* Directory in pre-order. */
++	if (p->fts_info == FTS_D) {
++		/* If skipped or crossed mount point, do post-order visit. */
++		if (instr == FTS_SKIP ||
++		    ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev) {
++			if (p->fts_flags & FTS_SYMFOLLOW)
++				(void)close(p->fts_symfd);
++			if (sp->fts_child) {
++				fts_lfree(sp->fts_child);
++				sp->fts_child = NULL;
++			}
++			p->fts_info = FTS_DP;
++			return (p);
+ 		}
+-	} else if (lstat(p->fts_accpath, sbp)) {
+-		p->fts_errno = errno;
+-err:		memset(sbp, 0, sizeof(struct stat));
+-		return (FTS_NS);
++
++		/* Rebuild if only read the names and now traversing. */
++		if (sp->fts_child && sp->fts_options & FTS_NAMEONLY) {
++			sp->fts_options &= ~FTS_NAMEONLY;
++			fts_lfree(sp->fts_child);
++			sp->fts_child = NULL;
++		}
++
++		/*
++		 * Cd to the subdirectory.
++		 *
++		 * If have already read and now fail to chdir, whack the list
++		 * to make the names come out right, and set the parent errno
++		 * so the application will eventually get an error condition.
++		 * Set the FTS_DONTCHDIR flag so that when we logically change
++		 * directories back to the parent we don't do a chdir.
++		 *
++		 * If haven't read do so.  If the read fails, fts_build sets
++		 * FTS_STOP or the fts_info field of the node.
++		 */
++		if (sp->fts_child) {
++			if (CHDIR(sp, p->fts_accpath)) {
++				p->fts_errno = errno;
++				p->fts_flags |= FTS_DONTCHDIR;
++				for (p = sp->fts_child; p; p = p->fts_link)
++					p->fts_accpath =
++					    p->fts_parent->fts_accpath;
++			}
++		} else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
++			if (ISSET(FTS_STOP))
++				return (NULL);
++			return (p);
++		}
++		p = sp->fts_child;
++		sp->fts_child = NULL;
++		goto name;
+ 	}
+ 
+-	if (S_ISDIR(sbp->st_mode)) {
++	/* Move to the next node on this level. */
++next:	tmp = p;
++	if (p = p->fts_link) {
++		free(tmp);
++
+ 		/*
+-		 * Set the device/inode.  Used to find cycles and check for
+-		 * crossing mount points.  Also remember the link count, used
+-		 * in fts_build to limit the number of stat calls.  It is
+-		 * understood that these fields are only referenced if fts_info
+-		 * is set to FTS_D.
++		 * If reached the top, return to the original directory, and
++		 * load the paths for the next root.
+ 		 */
+-		dev = p->fts_dev = sbp->st_dev;
+-		ino = p->fts_ino = sbp->st_ino;
+-		p->fts_nlink = sbp->st_nlink;
++		if (p->fts_level == FTS_ROOTLEVEL) {
++			if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
++				SET(FTS_STOP);
++				return (NULL);
++			}
++			fts_load(sp, p);
++			return (sp->fts_cur = p);
++		}
++
++		/*
++		 * User may have called fts_set on the node.  If skipped,
++		 * ignore.  If followed, get a file descriptor so we can
++		 * get back if necessary.
++		 */
++		if (p->fts_instr == FTS_SKIP)
++			goto next;
++		if (p->fts_instr == FTS_FOLLOW) {
++			p->fts_info = fts_stat(sp, NULL, p, 1);
++			if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR))
++				if ((p->fts_symfd =
++				    open(".", O_RDONLY, 0)) < 0) {
++					p->fts_errno = errno;
++					p->fts_info = FTS_ERR;
++				} else
++					p->fts_flags |= FTS_SYMFOLLOW;
++			p->fts_instr = FTS_NOINSTR;
++		}
+ 
+-		if (ISDOT(p->fts_name))
+-			return (FTS_DOT);
++name:		t = sp->fts_path + NAPPEND(p->fts_parent);
++		*t++ = '/';
++		memmove(t, p->fts_name, p->fts_namelen + 1);
++		return (sp->fts_cur = p);
++	}
+ 
++	/* Move up to the parent node. */
++	p = tmp->fts_parent;
++	free(tmp);
++
++	if (p->fts_level == FTS_ROOTPARENTLEVEL) {
+ 		/*
+-		 * Cycle detection is done by brute force when the directory
+-		 * is first encountered.  If the tree gets deep enough or the
+-		 * number of symbolic links to directories is high enough,
+-		 * something faster might be worthwhile.
++		 * Done; free everything up and set errno to 0 so the user
++		 * can distinguish between error and EOF.
+ 		 */
+-		for (t = p->fts_parent;
+-		    t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
+-			if (ino == t->fts_ino && dev == t->fts_dev) {
+-				p->fts_cycle = t;
+-				return (FTS_DC);
+-			}
+-		return (FTS_D);
++		free(p);
++		errno = 0;
++		return (sp->fts_cur = NULL);
+ 	}
+-	if (S_ISLNK(sbp->st_mode))
+-		return (FTS_SL);
+-	if (S_ISREG(sbp->st_mode))
+-		return (FTS_F);
+-	return (FTS_DEFAULT);
+-}
+ 
+-static FTSENT *
+-fts_sort(sp, head, nitems)
+-	FTS *sp;
+-	FTSENT *head;
+-	register int nitems;
+-{
+-	register FTSENT **ap, *p;
++	/* Nul terminate the pathname. */
++	sp->fts_path[p->fts_pathlen] = '\0';
+ 
+ 	/*
+-	 * Construct an array of pointers to the structures and call qsort(3).
+-	 * Reassemble the array in the order returned by qsort.  If unable to
+-	 * sort for memory reasons, return the directory entries in their
+-	 * current order.  Allocate enough space for the current needs plus
+-	 * 40 so don't realloc one entry at a time.
++	 * Return to the parent directory.  If at a root node or came through
++	 * a symlink, go back through the file descriptor.  Otherwise, cd up
++	 * one directory.
+ 	 */
+-	if (nitems > sp->fts_nitems) {
+-		sp->fts_nitems = nitems + 40;
+-		if ((sp->fts_array = realloc(sp->fts_array,
+-		    (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
+-			sp->fts_nitems = 0;
+-			return (head);
++	if (p->fts_level == FTS_ROOTLEVEL) {
++		if (!ISSET(FTS_NOCHDIR) && FCHDIR(sp, sp->fts_rfd)) {
++			SET(FTS_STOP);
++			return (NULL);
++		}
++	} else if (p->fts_flags & FTS_SYMFOLLOW) {
++		if (FCHDIR(sp, p->fts_symfd)) {
++			saved_errno = errno;
++			(void)close(p->fts_symfd);
++			errno = saved_errno;
++			SET(FTS_STOP);
++			return (NULL);
++		}
++		(void)close(p->fts_symfd);
++	} else if (!(p->fts_flags & FTS_DONTCHDIR)) {
++		if (CHDIR(sp, "..")) {
++			SET(FTS_STOP);
++			return (NULL);
+ 		}
+ 	}
+-	for (ap = sp->fts_array, p = head; p; p = p->fts_link)
+-		*ap++ = p;
+-	qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
+-	for (head = *(ap = sp->fts_array); --nitems; ++ap)
+-		ap[0]->fts_link = ap[1];
+-	ap[0]->fts_link = NULL;
+-	return (head);
++	p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
++	return (sp->fts_cur = p);
+ }
+ 
+-static FTSENT *
+-fts_alloc(sp, name, namelen)
+-	FTS *sp;
+-	char *name;
+-	register int namelen;
++/*
++ * Fts_set takes the stream as an argument although it's not used in this
++ * implementation; it would be necessary if anyone wanted to add global
++ * semantics to fts using fts_set.  An error return is allowed for similar
++ * reasons.
++ */
++/* ARGSUSED */
++int
++fts_set(FTS *sp, FTSENT *p, int instr)
++{
++	if (instr && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
++	    instr != FTS_NOINSTR && instr != FTS_SKIP) {
++		errno = EINVAL;
++		return (1);
++	}
++	p->fts_instr = instr;
++	return (0);
++}
++
++FTSENT *
++fts_children(register FTS *sp, int instr)
+ {
+ 	register FTSENT *p;
+-	size_t len;
++	int fd;
++
++	if (instr && instr != FTS_NAMEONLY) {
++		errno = EINVAL;
++		return (NULL);
++	}
++
++	/* Set current node pointer. */
++	p = sp->fts_cur;
+ 
+ 	/*
+-	 * The file name is a variable length array and no stat structure is
+-	 * necessary if the user has set the nostat bit.  Allocate the FTSENT
+-	 * structure, the file name and the stat structure in one chunk, but
+-	 * be careful that the stat structure is reasonably aligned.  Since the
+-	 * fts_name field is declared to be of size 1, the fts_name pointer is
+-	 * namelen + 2 before the first possible address of the stat structure.
++	 * Errno set to 0 so user can distinguish empty directory from
++	 * an error.
+ 	 */
+-	len = sizeof(FTSENT) + namelen;
+-	if (!ISSET(FTS_NOSTAT))
+-		len += sizeof(struct stat) + ALIGNBYTES;
+-	if ((p = malloc(len)) == NULL)
++	errno = 0;
++
++	/* Fatal errors stop here. */
++	if (ISSET(FTS_STOP))
+ 		return (NULL);
+ 
+-	/* Copy the name plus the trailing NULL. */
+-	memmove(p->fts_name, name, namelen + 1);
++	/* Return logical hierarchy of user's arguments. */
++	if (p->fts_info == FTS_INIT)
++		return (p->fts_link);
+ 
+-	if (!ISSET(FTS_NOSTAT))
+-		p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
+-	p->fts_namelen = namelen;
+-	p->fts_path = sp->fts_path;
+-	p->fts_errno = 0;
+-	p->fts_flags = 0;
+-	p->fts_instr = FTS_NOINSTR;
+-	p->fts_number = 0;
+-	p->fts_pointer = NULL;
+-	return (p);
++	/*
++	 * If not a directory being visited in pre-order, stop here.  Could
++	 * allow FTS_DNR, assuming the user has fixed the problem, but the
++	 * same effect is available with FTS_AGAIN.
++	 */
++	if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */)
++		return (NULL);
++
++	/* Free up any previous child list. */
++	if (sp->fts_child)
++		fts_lfree(sp->fts_child);
++
++	if (instr == FTS_NAMEONLY) {
++		sp->fts_options |= FTS_NAMEONLY;
++		instr = BNAMES;
++	} else
++		instr = BCHILD;
++
++	/*
++	 * If using chdir on a relative path and called BEFORE fts_read does
++	 * its chdir to the root of a traversal, we can lose -- we need to
++	 * chdir into the subdirectory, and we don't know where the current
++	 * directory is, so we can't get back so that the upcoming chdir by
++	 * fts_read will work.
++	 */
++	if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' ||
++	    ISSET(FTS_NOCHDIR))
++		return (sp->fts_child = fts_build(sp, instr));
++
++	if ((fd = open(".", O_RDONLY, 0)) < 0)
++		return (NULL);
++	sp->fts_child = fts_build(sp, instr);
++	if (fchdir(fd))
++		return (NULL);
++	(void)close(fd);
++	return (sp->fts_child);
+ }
+ 
+-static void
+-fts_lfree(head)
+-	register FTSENT *head;
++int
++fts_close(FTS *sp)
+ {
+-	register FTSENT *p;
++	register FTSENT *freep, *p;
++	int saved_errno;
+ 
+-	/* Free a linked list of structures. */
+-	while (p = head) {
+-		head = head->fts_link;
++	/*
++	 * This still works if we haven't read anything -- the dummy structure
++	 * points to the root list, so we step through to the end of the root
++	 * list which has a valid parent pointer.
++	 */
++	if (sp->fts_cur) {
++		for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
++			freep = p;
++			p = p->fts_link ? p->fts_link : p->fts_parent;
++			free(freep);
++		}
+ 		free(p);
+ 	}
+-}
+ 
+-/*
+- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
+- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
+- * though the kernel won't resolve them.  Add the size (not just what's needed)
+- * plus 256 bytes so don't realloc the path 2 bytes at a time. 
+- */
+-static int
+-fts_palloc(sp, more)
+-	FTS *sp;
+-	size_t more;
+-{
+-	sp->fts_pathlen += more + 256;
+-	sp->fts_path = realloc(sp->fts_path, (size_t)sp->fts_pathlen);
+-	return (sp->fts_path == NULL);
+-}
++	/* Free up child linked list, sort array, path buffer. */
++	if (sp->fts_child)
++		fts_lfree(sp->fts_child);
++	if (sp->fts_array)
++		free(sp->fts_array);
++	free(sp->fts_path);
+ 
+-/*
+- * When the path is realloc'd, have to fix all of the pointers in structures
+- * already returned.
+- */
+-static void
+-fts_padjust(sp, addr)
+-	FTS *sp;
+-	void *addr;
+-{
+-	FTSENT *p;
++	/* Return to original directory, save errno if necessary. */
++	if (!ISSET(FTS_NOCHDIR)) {
++		saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
++		(void)close(sp->fts_rfd);
++	}
+ 
+-#define	ADJUST(p) {							\
+-	(p)->fts_accpath =						\
+-	    (char *)addr + ((p)->fts_accpath - (p)->fts_path);		\
+-	(p)->fts_path = addr;						\
+-}
+-	/* Adjust the current set of children. */
+-	for (p = sp->fts_child; p; p = p->fts_link)
+-		ADJUST(p);
++	/* Free up the stream pointer. */
++	free(sp);
+ 
+-	/* Adjust the rest of the tree. */
+-	for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
+-		ADJUST(p);
+-		p = p->fts_link ? p->fts_link : p->fts_parent;
++	/* Set errno and return. */
++	if (!ISSET(FTS_NOCHDIR) && saved_errno) {
++		errno = saved_errno;
++		return (-1);
+ 	}
++	return (0);
+ }
+ 
+-static size_t
+-fts_maxarglen(argv)
+-	char * const *argv;
+-{
+-	size_t len, max;
+-
+-	for (max = 0; *argv; ++argv)
+-		if ((len = strlen(*argv)) > max)
+-			max = len;
+-	return (max);
+-}
diff --git a/yocto-poky/meta/recipes-core/fts/fts/remove_cdefs.patch b/yocto-poky/meta/recipes-core/fts/fts/remove_cdefs.patch
new file mode 100644
index 0000000..c152704
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/fts/fts/remove_cdefs.patch
@@ -0,0 +1,69 @@
+Replace use of macros from sys/cdefs.h since cdefs.h is missing on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate
+
+Index: fts/fts.h
+===================================================================
+--- fts.orig/fts.h
++++ fts/fts.h
+@@ -126,15 +126,21 @@ typedef struct _ftsent {
+ 	char fts_name[1];		/* file name */
+ } FTSENT;
+ 
+-#include <sys/cdefs.h>
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+-__BEGIN_DECLS
+-FTSENT	*fts_children __P((FTS *, int));
+-int	 fts_close __P((FTS *));
+-FTS	*fts_open __P((char * const *, int,
+-	    int (*)(const FTSENT **, const FTSENT **)));
+-FTSENT	*fts_read __P((FTS *));
+-int	 fts_set __P((FTS *, FTSENT *, int));
+-__END_DECLS
++#ifndef __P
++#define __P
++#endif
++FTSENT	*fts_children (FTS *p, int opts);
++int	 fts_close (FTS *p);
++FTS	*fts_open (char * const * path, int opts,
++	    int (*compfn)(const FTSENT **, const FTSENT **));
++FTSENT	*fts_read (FTS *p);
++int	 fts_set (FTS *p, FTSENT *f, int opts);
+ 
++#ifdef __cplusplus
++}
++#endif
+ #endif /* !_FTS_H_ */
+Index: fts/fts.c
+===================================================================
+--- fts.orig/fts.c
++++ fts/fts.c
+@@ -50,15 +50,15 @@ static char sccsid[] = "@(#)fts.c	8.6 (B
+ #include <string.h>
+ #include <unistd.h>
+ 
+-static FTSENT	*fts_alloc __P((FTS *, char *, int));
+-static FTSENT	*fts_build __P((FTS *, int));
+-static void	 fts_lfree __P((FTSENT *));
+-static void	 fts_load __P((FTS *, FTSENT *));
+-static size_t	 fts_maxarglen __P((char * const *));
+-static void	 fts_padjust __P((FTS *, void *));
+-static int	 fts_palloc __P((FTS *, size_t));
+-static FTSENT	*fts_sort __P((FTS *, FTSENT *, int));
+-static u_short	 fts_stat __P((FTS *, struct dirent *, FTSENT *, int));
++static FTSENT	*fts_alloc __P(FTS *, char *, int);
++static FTSENT	*fts_build __P(FTS *, int);
++static void	 fts_lfree __P(FTSENT *);
++static void	 fts_load __P(FTS *, FTSENT *);
++static size_t	 fts_maxarglen __P(char * const *);
++static void	 fts_padjust __P(FTS *, void *);
++static int	 fts_palloc __P(FTS *, size_t);
++static FTSENT	*fts_sort __P(FTS *, FTSENT *, int);
++static u_short	 fts_stat __P(FTS *, struct dirent *, FTSENT *, int);
+ 
+ #define	ISDOT(a)	(a[0] == '.' && (!a[1] || a[1] == '.' && !a[2]))
+ 
diff --git a/yocto-poky/meta/recipes-core/fts/fts/stdint.patch b/yocto-poky/meta/recipes-core/fts/fts/stdint.patch
new file mode 100644
index 0000000..89e6097
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/fts/fts/stdint.patch
@@ -0,0 +1,15 @@
+Include stdint.h for u_* typedefs
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate
+
+--- ./fts.c.orig
++++ ./fts.c
+@@ -46,6 +46,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <fts.h>
++#include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
diff --git a/yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch b/yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch
new file mode 100644
index 0000000..35a1310
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/add-with-bisonlocaledir.patch
@@ -0,0 +1,58 @@
+From 04bd40fe2c48c6e01ab418a04d27c4aff644ad96 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 17 Feb 2016 23:54:02 -0500
+Subject: [PATCH] m4/bison-i18n.m4: add --with-bisonlocaledir to assign
+ BISON_LOCALEDIR
+
+The variable BISON_LOCALEDIR is assigned only by the output of
+'bison --print-localedir', we add option --with-bisonlocaledir
+to assign it explicitly. It is helpful for user to split the
+native compile and cross compile.
+
+For backward compatibility, if option not used, it still
+make use of the output of 'bison --print-localedir'.
+
+Upstream-Status: Submitted [bison-patches@gnu.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gettext-tools/gnulib-m4/bison-i18n.m4 | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/gettext-tools/gnulib-m4/bison-i18n.m4 b/gettext-tools/gnulib-m4/bison-i18n.m4
+index f5cfd3a..fb6ac4d 100644
+--- a/gettext-tools/gnulib-m4/bison-i18n.m4
++++ b/gettext-tools/gnulib-m4/bison-i18n.m4
+@@ -14,11 +14,16 @@ dnl sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files
+ dnl and defines YYENABLE_NLS if there are bison-runtime.mo files at all.
+ AC_DEFUN([BISON_I18N],
+ [
++  dnl Default is not to set bisonlocaledir
++  AC_ARG_WITH([bisonlocaledir],
++    [  --with-bisonlocaledir   sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files],
++    BISON_LOCALEDIR=$withval,
++    BISON_LOCALEDIR=)
++
+   if test -z "$USE_NLS"; then
+     echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." 1>&2
+     exit 1
+   fi
+-  BISON_LOCALEDIR=
+   BISON_USE_NLS=no
+   if test "$USE_NLS" = yes; then
+     dnl Determine bison's localedir.
+@@ -26,9 +31,10 @@ AC_DEFUN([BISON_I18N],
+     dnl But even is YACC is called "yacc", it may be a script that invokes bison
+     dnl and accepts the --print-localedir option.
+     dnl YACC's default value is empty; BISON's default value is :.
+-    if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then
++    if test -z "$BISON_LOCALEDIR" -a ${YACC-${BISON-:}} --print-localedir >/dev/null 2>&1; then
+       BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir`
+     fi
++    AC_MSG_RESULT([$BISON_LOCALEDIR])
+     AC_SUBST([BISON_LOCALEDIR])
+     if test -n "$BISON_LOCALEDIR"; then
+       dnl There is no need to enable internationalization if the user doesn't
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-core/gettext/gettext-0.19.4/parallel.patch b/yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/parallel.patch
similarity index 100%
rename from yocto-poky/meta/recipes-core/gettext/gettext-0.19.4/parallel.patch
rename to yocto-poky/meta/recipes-core/gettext/gettext-0.19.6/parallel.patch
diff --git a/yocto-poky/meta/recipes-core/gettext/gettext_0.16.1.bb b/yocto-poky/meta/recipes-core/gettext/gettext_0.16.1.bb
index f9f7a7f..cd0b759 100644
--- a/yocto-poky/meta/recipes-core/gettext/gettext_0.16.1.bb
+++ b/yocto-poky/meta/recipes-core/gettext/gettext_0.16.1.bb
@@ -39,6 +39,11 @@
 	rm -f ${S}/config/m4/libtool.m4
 }
 
+do_install_append_libc-musl () {
+	rm -f ${D}${libdir}/charset.alias
+	rm -f ${D}${includedir}/libintl.h
+}
+
 # these lack the .x behind the .so, but shouldn't be in the -dev package
 # Otherwise you get the following results:
 # 7.4M    glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
diff --git a/yocto-poky/meta/recipes-core/gettext/gettext_0.19.4.bb b/yocto-poky/meta/recipes-core/gettext/gettext_0.19.4.bb
deleted file mode 100644
index cebf6c7..0000000
--- a/yocto-poky/meta/recipes-core/gettext/gettext_0.19.4.bb
+++ /dev/null
@@ -1,106 +0,0 @@
-SUMMARY = "Utilities and libraries for producing multi-lingual messages"
-DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable and already translated strings."
-HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
-SECTION = "libs"
-LICENSE = "GPLv3+ & LGPL-2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-DEPENDS = "gettext-native virtual/libiconv expat"
-DEPENDS_class-native = "gettext-minimal-native"
-PROVIDES = "virtual/libintl virtual/gettext"
-PROVIDES_class-native = "virtual/gettext-native"
-RCONFLICTS_${PN} = "proxy-libintl"
-SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
-	   file://parallel.patch \
-          "
-
-PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
-
-LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
-
-SRC_URI[md5sum] = "d3511af1e604a3478900d2c2b4a4a48e"
-SRC_URI[sha256sum] = "8ac9f1ed1a5f8c4e656a2f37f5ba6b9ee04c4df79a575e876b0b6946aa417f3f"
-
-inherit autotools texinfo
-
-EXTRA_OECONF += "--without-lispdir \
-                 --disable-csharp \
-                 --disable-libasprintf \
-                 --disable-java \
-                 --disable-native-java \
-                 --disable-openmp \
-                 --disable-acl \
-                 --with-included-glib \
-                 --without-emacs \
-                 --without-cvs \
-                 --without-git \
-                 --with-included-libxml \
-                 --with-included-libcroco \
-                 --with-included-libunistring \
-                "
-
-acpaths = '-I ${S}/gettext-runtime/m4 \
-           -I ${S}/gettext-tools/m4'
-
-
-# these lack the .x behind the .so, but shouldn't be in the -dev package
-# Otherwise you get the following results:
-# 7.4M    glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
-# 25M     uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
-# because gettext depends on gettext-dev, which pulls in more -dev packages:
-# 15228   KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
-# 1300    KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
-# 140     KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
-# 4       KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
-
-PACKAGES =+ "libgettextlib libgettextsrc"
-FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
-FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
-
-PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc"
-
-FILES_${PN} += "${libdir}/${BPN}/*"
-
-FILES_gettext-runtime = "${bindir}/gettext \
-                         ${bindir}/ngettext \
-                         ${bindir}/envsubst \
-                         ${bindir}/gettext.sh \
-                         ${libdir}/libasprintf.so* \
-                         ${libdir}/GNU.Gettext.dll \
-                        "
-FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
-                                             ${libdir}/charset.alias \
-                                           "
-FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \
-                      ${includedir}/autosprintf.h \
-                     "
-FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
-                                                 ${includedir}/libintl.h \
-                                               "
-FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
-                             ${mandir}/man1/ngettext.* \
-                             ${mandir}/man1/envsubst.* \
-                             ${mandir}/man1/.* \
-                             ${mandir}/man3/* \
-                             ${docdir}/gettext/gettext.* \
-                             ${docdir}/gettext/ngettext.* \
-                             ${docdir}/gettext/envsubst.* \
-                             ${docdir}/gettext/*.3.html \
-                             ${datadir}/gettext/ABOUT-NLS \
-                             ${docdir}/gettext/csharpdoc/* \
-                             ${docdir}/libasprintf/autosprintf.html \
-                             ${infodir}/autosprintf.info \
-                            "
-
-do_install_append() {
-    rm -f ${D}${libdir}/preloadable_libintl.so
-}
-
-do_install_append_class-native () {
-	rm ${D}${datadir}/aclocal/*
-	rm ${D}${datadir}/gettext/config.rpath
-	rm ${D}${datadir}/gettext/po/Makefile.in.in
-	rm ${D}${datadir}/gettext/po/remove-potcdate.sin
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-core/gettext/gettext_0.19.6.bb b/yocto-poky/meta/recipes-core/gettext/gettext_0.19.6.bb
new file mode 100644
index 0000000..592e4fc
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/gettext/gettext_0.19.6.bb
@@ -0,0 +1,115 @@
+SUMMARY = "Utilities and libraries for producing multi-lingual messages"
+DESCRIPTION = "GNU gettext is a set of tools that provides a framework to help other programs produce multi-lingual messages. These tools include a set of conventions about how programs should be written to support message catalogs, a directory and file naming organization for the message catalogs themselves, a runtime library supporting the retrieval of translated messages, and a few stand-alone programs to massage in various ways the sets of translatable and already translated strings."
+HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
+SECTION = "libs"
+LICENSE = "GPLv3+ & LGPL-2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+DEPENDS = "gettext-native virtual/libiconv expat"
+DEPENDS_class-native = "gettext-minimal-native"
+PROVIDES = "virtual/libintl virtual/gettext"
+PROVIDES_class-native = "virtual/gettext-native"
+RCONFLICTS_${PN} = "proxy-libintl"
+SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
+	   file://parallel.patch \
+	   file://add-with-bisonlocaledir.patch \
+"
+
+SRC_URI[md5sum] = "6d1447f8c5c45c329371ef4bfe7d79a5"
+SRC_URI[sha256sum] = "ed4b4c19bd3a3034eb6769500a3592ff616759ef43cf30586dbb7a17c9dd695d"
+
+PACKAGECONFIG[msgcat-curses] = "--with-libncurses-prefix=${STAGING_LIBDIR}/..,--disable-curses,ncurses,"
+
+LDFLAGS_prepend_libc-uclibc = " -lrt -lpthread "
+
+inherit autotools texinfo
+
+EXTRA_OECONF += "--without-lispdir \
+                 --disable-csharp \
+                 --disable-libasprintf \
+                 --disable-java \
+                 --disable-native-java \
+                 --disable-openmp \
+                 --disable-acl \
+                 --with-included-glib \
+                 --without-emacs \
+                 --without-cvs \
+                 --without-git \
+                 --with-included-libxml \
+                 --with-included-libcroco \
+                 --with-included-libunistring \
+                "
+EXTRA_OECONF_append_class-target = " \
+                 --with-bisonlocaledir=${datadir}/locale \
+"
+
+acpaths = '-I ${S}/gettext-runtime/m4 \
+           -I ${S}/gettext-tools/m4'
+
+do_install_append_libc-musl () {
+	rm -f ${D}${libdir}/charset.alias
+	rm -f ${D}${includedir}/libintl.h
+	rm -f ${D}${libdir}/libintl.la
+}
+
+# these lack the .x behind the .so, but shouldn't be in the -dev package
+# Otherwise you get the following results:
+# 7.4M    glibc/images/ep93xx/Angstrom-console-image-glibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
+# 25M     uclibc/images/ep93xx/Angstrom-console-image-uclibc-ipk-2008.1-test-20080104-ep93xx.rootfs.tar.gz
+# because gettext depends on gettext-dev, which pulls in more -dev packages:
+# 15228   KiB /ep93xx/libstdc++-dev_4.2.2-r2_ep93xx.ipk
+# 1300    KiB /ep93xx/uclibc-dev_0.9.29-r8_ep93xx.ipk
+# 140     KiB /armv4t/gettext-dev_0.14.1-r6_armv4t.ipk
+# 4       KiB /ep93xx/libgcc-s-dev_4.2.2-r2_ep93xx.ipk
+
+PACKAGES =+ "libgettextlib libgettextsrc"
+FILES_libgettextlib = "${libdir}/libgettextlib-*.so*"
+FILES_libgettextsrc = "${libdir}/libgettextsrc-*.so*"
+
+PACKAGES =+ "gettext-runtime gettext-runtime-dev gettext-runtime-doc"
+
+FILES_${PN} += "${libdir}/${BPN}/*"
+
+FILES_gettext-runtime = "${bindir}/gettext \
+                         ${bindir}/ngettext \
+                         ${bindir}/envsubst \
+                         ${bindir}/gettext.sh \
+                         ${libdir}/libasprintf.so* \
+                         ${libdir}/GNU.Gettext.dll \
+                        "
+FILES_gettext-runtime_append_libc-uclibc = " ${libdir}/libintl.so.* \
+                                             ${libdir}/charset.alias \
+                                           "
+FILES_gettext-runtime-dev += "${libdir}/libasprintf.a \
+                      ${includedir}/autosprintf.h \
+                     "
+FILES_gettext-runtime-dev_append_libc-uclibc = " ${libdir}/libintl.so \
+                                                 ${includedir}/libintl.h \
+                                               "
+FILES_gettext-runtime-doc = "${mandir}/man1/gettext.* \
+                             ${mandir}/man1/ngettext.* \
+                             ${mandir}/man1/envsubst.* \
+                             ${mandir}/man1/.* \
+                             ${mandir}/man3/* \
+                             ${docdir}/gettext/gettext.* \
+                             ${docdir}/gettext/ngettext.* \
+                             ${docdir}/gettext/envsubst.* \
+                             ${docdir}/gettext/*.3.html \
+                             ${datadir}/gettext/ABOUT-NLS \
+                             ${docdir}/gettext/csharpdoc/* \
+                             ${docdir}/libasprintf/autosprintf.html \
+                             ${infodir}/autosprintf.info \
+                            "
+
+do_install_append() {
+    rm -f ${D}${libdir}/preloadable_libintl.so
+}
+
+do_install_append_class-native () {
+	rm ${D}${datadir}/aclocal/*
+	rm ${D}${datadir}/gettext/config.rpath
+	rm ${D}${datadir}/gettext/po/Makefile.in.in
+	rm ${D}${datadir}/gettext/po/remove-potcdate.sin
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
new file mode 100644
index 0000000..561d100
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/0001-Install-gio-querymodules-as-libexec_PROGRAM.patch
@@ -0,0 +1,31 @@
+From 80682c171ccb27d01343d4cfcfb4dd49b7863ccc Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 22 Mar 2016 15:14:58 +0200
+Subject: [PATCH] Install gio-querymodules as libexec_PROGRAM
+
+We want to install this binary with the gio library, and debian
+renamer does not cope with library packages with files in ${bindir}
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Upstream-Status: Inappropriate [OE specific]
+---
+ gio/Makefile.am | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gio/Makefile.am b/gio/Makefile.am
+index b7f91cc..4d81cc0 100644
+--- a/gio/Makefile.am
++++ b/gio/Makefile.am
+@@ -702,7 +702,8 @@ gio.def: libgio-2.0.la
+ gio-2.0.lib: libgio-2.0.la gio.def
+ 	$(AM_V_GEN) lib.exe -machine:@LIB_EXE_MACHINE_FLAG@ -name:libgio-2.0-$(LT_CURRENT_MINUS_AGE).dll -def:$(builddir)/gio.def -out:$@
+ 
+-bin_PROGRAMS = gio-querymodules glib-compile-schemas glib-compile-resources gsettings
++bin_PROGRAMS = glib-compile-schemas glib-compile-resources gsettings
++libexec_PROGRAMS = gio-querymodules
+ 
+ glib_compile_resources_LDADD = libgio-2.0.la 		\
+ 	$(top_builddir)/gobject/libgobject-2.0.la	\
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
new file mode 100644
index 0000000..f1e688c
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/Enable-more-tests-while-cross-compiling.patch
@@ -0,0 +1,81 @@
+From 310dfe1bdd16d4b254732fcc202c6211629bc7b6 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Mon, 9 Nov 2015 11:07:27 +0200
+Subject: [PATCH] Enable more tests while cross-compiling
+
+Upstream disables a few tests while cross-compiling because their build requires
+running other built binaries. This usually makes sense but in the cross-compile
+case we can depend on glib-2.0-native.
+
+Upstream-Status: Inappropriate [OE specific]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ gio/tests/Makefile.am     | 8 +++-----
+ tests/gobject/Makefile.am | 8 +++-----
+ 2 files changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
+index 868873f..533e454 100644
+--- a/gio/tests/Makefile.am
++++ b/gio/tests/Makefile.am
+@@ -503,10 +503,9 @@ test_programs += \
+ endif
+ 
+ # -----------------------------------------------------------------------------
+-#  The resources test is a bit more complicated, and we cannot build it when
+-#  cross-compiling GIO because it requires running a binary...
++#  The resources test is a bit more complicated, and requires glib-native
++#  for running a binary
+ 
+-if !CROSS_COMPILING
+ test_programs += resources
+ resources_SOURCES = resources.c
+ nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
+@@ -528,7 +527,11 @@ if !ENABLE_INSTALLED_TESTS
+ libresourceplugin_la_LDFLAGS += -rpath /
+ endif
+ 
++if !CROSS_COMPILING
+ glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
++else
++glib_compile_resources=glib-compile-resources
++endif
+ 
+ resources.o: test_resources2.h
+ test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
+@@ -545,7 +548,6 @@ test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --
+ 
+ EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
+ CLEANFILES += test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
+-endif # !CROSS_COMPILING
+ 
+ BUILT_SOURCES += giotypefuncs.c
+ 
+diff --git a/tests/gobject/Makefile.am b/tests/gobject/Makefile.am
+index 16f2827..4c2208e 100644
+--- a/tests/gobject/Makefile.am
++++ b/tests/gobject/Makefile.am
+@@ -48,10 +48,13 @@ if ENABLE_TIMELOOP
+ installed_test_programs += timeloop-closure
+ endif
+ 
+-# The marshal test requires running a binary, which means we cannot
+-# build it when cross-compiling
++# The marshal test requires running a binary, which means we require
++# glib-native when cross-compiling
+ if !CROSS_COMPILING
+ glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
++else
++glib_genmarshal=$(shell which glib-genmarshal)
++endif
+ 
+ testmarshal.h: stamp-testmarshal.h
+ 	@true
+@@ -69,7 +72,6 @@ BUILT_SOURCES += testmarshal.h testmarshal.c
+ CLEANFILES += stamp-testmarshal.h
+ EXTRA_DIST += testcommon.h testmarshal.list
+ BUILT_EXTRA_DIST += testmarshal.h testmarshal.c
+-endif # !CROSS_COMPILING
+ 
+ dist-hook: $(BUILT_EXTRA_DIST)
+ 	files='$(BUILT_EXTRA_DIST)';				\
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch
deleted file mode 100644
index 3aac35a..0000000
--- a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 55253b55b9c65f3e0efbbe03cbab2a4c4014a16b Mon Sep 17 00:00:00 2001
-From: Song.Li <Song.Li@windriver.com>
-Date: Thu, 5 Jul 2012 15:09:41 +0800
-Subject: [PATCH] add -march=i486 into CFLAGS automatically
-
-Upstream-Status: Inappropriate [configuration]
-
-glib configure will check if current gcc need -march=i486,
-when gcc need -march=i486 but CFLAGS don't have,
-glib configure will abort and advise the user to add -march=i486 or later.
-This will break the build process,it's not good for automatic build system.
-so change this to adding -march=i485 automatically when it is needed.
----
- configure.ac |    6 ++++--
- 1 files changed, 4 insertions(+), 2 deletions(-)
-
-Index: glib-2.36.0/configure.ac
-===================================================================
---- glib-2.36.0.orig/configure.ac
-+++ glib-2.36.0/configure.ac
-@@ -2378,7 +2378,7 @@ dnl
- dnl Note that the atomic ops are only available with GCC on x86 when
- dnl using -march=i486 or higher.  If we detect that the atomic ops are
- dnl not available but would be available given the right flags, we want
--dnl to abort and advise the user to fix their CFLAGS.  It's better to do
-+dnl to add -march=i486 automatically to fix their CFLAGS.  It's better to do
- dnl that then to silently fall back on emulated atomic ops just because
- dnl the user had the wrong build environment.
-
-@@ -2401,7 +2401,8 @@ AC_CACHE_CHECK([for lock-free atomic int
-         AC_TRY_COMPILE([],
-                        [volatile int atomic = 2;\
-                         __sync_bool_compare_and_swap (&atomic, 2, 3);],
--                       [AC_MSG_ERROR([GLib must be build with -march=i486 or later.])],
-+                       [AC_MSG_WARN([GLib must be build with -march=i486 or later.])
-+                       SAVE_CFLAGS="${SAVE_CFLAGS} -march=i486"],
-                        [])
-         CFLAGS="${SAVE_CFLAGS}"
-       fi
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
index 1d69a3f..aa5de27 100644
--- a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
+++ b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch
@@ -1,4 +1,4 @@
-From 1c5718648d49e795efee91c220a2bf9386c184f2 Mon Sep 17 00:00:00 2001
+From e8740833336c59d6f616a1781b256e648e338c26 Mon Sep 17 00:00:00 2001
 From: Martin Jansa <Martin.Jansa@gmail.com>
 Date: Sat, 28 Apr 2012 18:24:50 +0200
 Subject: [PATCH] configure: use $host_alias-libtool instead of libtool
@@ -13,19 +13,20 @@
 
 Rebased to glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com>
 Rebased to glib-2.32.1 by Martin Jansa <Martin.Jansa@gmail.com>
+Rebased to glib-2.31.20+ by Andre McCurdy <armccurdy@gmail.com>
 
 Upstream-Status: Inappropriate [configuration]
 
 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
 ---
- configure.ac |    8 ++++----
- 1 files changed, 4 insertions(+), 4 deletions(-)
+ configure.ac | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index a6478c6..9a93d60 100644
+index 1af90c5..f6b7a73 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1470,7 +1470,7 @@ if test x"$glib_native_win32" = xyes; then
+@@ -1378,7 +1378,7 @@ if test x"$glib_native_win32" = xyes; then
    G_MODULE_LDFLAGS=
  else
    export SED
@@ -34,7 +35,7 @@
  fi
  dnl G_MODULE_IMPL= don't reset, so cmd-line can override
  G_MODULE_NEED_USCORE=0
-@@ -1535,9 +1535,9 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then
+@@ -1427,13 +1427,13 @@ AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
  	LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
  dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
  	echo "void glib_plugin_test(void) { }" > plugin.c
@@ -46,7 +47,12 @@
  		${LDFLAGS} -module -o plugin.la -export-dynamic \
  		-shrext ".o" -avoid-version plugin.lo \
  		-rpath /dont/care >/dev/null 2>&1
-@@ -1614,7 +1614,7 @@ fi
+-	eval `./libtool --config | grep ^objdir`
++	eval `./$host_alias-libtool --config | grep ^objdir`
+ 	AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
+ 		glib_cv_rtldglobal_broken,[
+ 		AC_TRY_RUN([
+@@ -1506,7 +1506,7 @@ fi
  
  AC_MSG_CHECKING(for the suffix of module shared libraries)
  export SED
@@ -56,5 +62,5 @@
  module=yes eval std_shrext=$shrext_cmds
  # chop the initial dot
 -- 
-1.7.8.6
+1.9.1
 
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch
new file mode 100644
index 0000000..dc62b92
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/gi-exclude.patch
@@ -0,0 +1,59 @@
+The autoptr types should be excluded from gobject-introspection parsing as
+they're not user-facing.
+
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gio/gio-autocleanups.h b/gio/gio-autocleanups.h
+index a95ba65..24ccc2d 100644
+--- a/gio/gio-autocleanups.h
++++ b/gio/gio-autocleanups.h
+@@ -21,6 +21,8 @@
+ #error "Only <gio/gio.h> can be included directly."
+ #endif
+ 
++#ifndef __GI_SCANNER__
++
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAction, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GActionMap, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfo, g_object_unref)
+@@ -146,3 +148,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolume, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolumeMonitor, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibCompressor, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibDecompressor, g_object_unref)
++
++#endif
+diff --git a/glib/glib-autocleanups.h b/glib/glib-autocleanups.h
+index 6355f75..09d28be 100644
+--- a/glib/glib-autocleanups.h
++++ b/glib/glib-autocleanups.h
+@@ -21,6 +21,8 @@
+ #error "Only <glib.h> can be included directly."
+ #endif
+ 
++#ifndef __GI_SCANNER__
++
+ static inline void
+ g_autoptr_cleanup_generic_gfree (void *p)
+ {
+@@ -87,3 +89,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantDict, g_variant_dict_unref)
+ G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GVariantDict, g_variant_dict_clear)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVariantType, g_variant_type_free)
+ G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL)
++
++#endif
+diff --git a/gobject/gobject-autocleanups.h b/gobject/gobject-autocleanups.h
+index 980203f..a1d4ba1 100644
+--- a/gobject/gobject-autocleanups.h
++++ b/gobject/gobject-autocleanups.h
+@@ -21,6 +21,10 @@
+ #error "Only <glib-object.h> can be included directly."
+ #endif
+ 
++#ifndef __GI_SCANNER__
++
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref)
+ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref)
+ G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)
++
++#endif
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
new file mode 100644
index 0000000..f9e3f3d
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/relocate-modules.patch
@@ -0,0 +1,49 @@
+Instead of hard-coding GIO_MODULE_PATH when glib is built, use dladdr() to
+determine where libglib.so is and use that path to calculate GIO_MODULES_DIR.
+
+This solves relocation problems with GIOModule for native builds of glib.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/gio/giomodule.c b/gio/giomodule.c
+index 56c498c..a2e32b7 100644
+--- a/gio/giomodule.c
++++ b/gio/giomodule.c
+@@ -47,6 +47,27 @@
+ #include "gdesktopappinfo.h"
+ #endif
+ 
++#include <dlfcn.h>
++
++/*
++ * Generate a GIO module directory based on where glib is installed
++ */
++static const char *
++_get_gio_module_dir (void)
++{
++  Dl_info info;
++
++  if (dladdr (g_io_module_new, &info)) {
++    char *libdir = g_path_get_dirname (info.dli_fname);
++    char *dir = g_build_filename (libdir, "gio", "modules", NULL);
++    g_free (libdir);
++    return dir;
++  } else {
++    return GIO_MODULE_DIR;
++  }
++}
++
++
+ /**
+  * SECTION:giomodule
+  * @short_description: Loadable GIO Modules
+@@ -1057,7 +1078,7 @@ _g_io_modules_ensure_loaded (void)
+       /* Then load the compiled in path */
+       module_dir = g_getenv ("GIO_MODULE_DIR");
+       if (module_dir == NULL)
+-        module_dir = GIO_MODULE_DIR;
++        module_dir = _get_gio_module_dir ();
+ 
+       g_io_modules_scan_all_in_directory_with_scope (module_dir, scope);
+ 
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
index 130ae09..5b85e8f 100644
--- a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
+++ b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -1,3 +1,5 @@
 #! /bin/sh
 
-gnome-desktop-testing-runner glib
+useradd glib2-test
+su glib2-test -c gnome-desktop-testing-runner glib
+userdel glib2-test
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
deleted file mode 100644
index 2a154fd..0000000
--- a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/uclibc.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Fix DATADIRNAME on uclibc/Linux
-
-translation files are always installed under PREFIX/share/locale in uclibc
-based systems therefore lets set DATADIRNAME to "share".
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-Index: glib-2.38.2/m4macros/glib-gettext.m4
-===================================================================
---- glib-2.38.2.orig/m4macros/glib-gettext.m4	2013-11-07 07:29:13.000000000 -0800
-+++ glib-2.38.2/m4macros/glib-gettext.m4	2014-03-15 14:51:54.712135644 -0700
-@@ -239,7 +239,7 @@
- 	      [CATOBJEXT=.mo
-                DATADIRNAME=lib])
- 	    ;;
--	    *-*-openbsd*)
-+	    *-*-openbsd* | *-*-linux-uclibc*)
- 	    CATOBJEXT=.mo
-             DATADIRNAME=share
- 	    ;;
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch
new file mode 100644
index 0000000..7aa6217
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0/uclibc_musl_translation.patch
@@ -0,0 +1,22 @@
+Fix DATADIRNAME on uclibc/Linux
+
+translation files are always installed under PREFIX/share/locale in uclibc
+based systems therefore lets set DATADIRNAME to "share".
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: glib-2.46.1/m4macros/glib-gettext.m4
+===================================================================
+--- glib-2.46.1.orig/m4macros/glib-gettext.m4
++++ glib-2.46.1/m4macros/glib-gettext.m4
+@@ -243,6 +243,10 @@ msgstr ""
+ 	    CATOBJEXT=.mo
+             DATADIRNAME=share
+ 	    ;;
++	    *-*-musl* | *-*-linux-uclibc*)
++	    CATOBJEXT=.gmo
++            DATADIRNAME=share
++	    ;;
+ 	    *)
+ 	    CATOBJEXT=.mo
+             DATADIRNAME=lib
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.44.1.bb b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.44.1.bb
deleted file mode 100644
index 1e3d36a..0000000
--- a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.44.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-require glib.inc
-
-PE = "1"
-
-SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
-           file://configure-libtool.patch \
-           file://fix-conflicting-rand.patch \
-           file://add-march-i486-into-CFLAGS-automatically.patch \
-           file://glib-2.0-configure-readlink.patch \
-           file://run-ptest \
-           file://ptest-paths.patch \
-           file://uclibc.patch \
-           file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
-           file://allow-run-media-sdX-drive-mount-if-username-root.patch \
-	   file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
-          "
-
-SRC_URI_append_class-native = " file://glib-gettextize-dir.patch"
-
-SRC_URI[md5sum] = "83efba4722a9674b97437d1d99af79db"
-SRC_URI[sha256sum] = "8811deacaf8a503d0a9b701777ea079ca6a4277be10e3d730d2112735d5eca07"
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb
new file mode 100644
index 0000000..8e445b4
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glib-2.0/glib-2.0_2.46.2.bb
@@ -0,0 +1,26 @@
+require glib.inc
+
+PE = "1"
+
+SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
+           file://configure-libtool.patch \
+           file://fix-conflicting-rand.patch \
+           file://glib-2.0-configure-readlink.patch \
+           file://run-ptest \
+           file://ptest-paths.patch \
+           file://uclibc_musl_translation.patch \
+           file://0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch \
+           file://allow-run-media-sdX-drive-mount-if-username-root.patch \
+	   file://0001-Remove-the-warning-about-deprecated-paths-in-schemas.patch \
+           file://Enable-more-tests-while-cross-compiling.patch \
+           file://gi-exclude.patch \
+           file://0001-Install-gio-querymodules-as-libexec_PROGRAM.patch \
+          "
+
+SRC_URI_append_class-native = " file://glib-gettextize-dir.patch \
+                                file://relocate-modules.patch"
+
+SRC_URI[md5sum] = "7f815d6e46df68e070cb421ed7f1139e"
+SRC_URI[sha256sum] = "5031722e37036719c1a09163cc6cf7c326e4c4f1f1e074b433c156862bd733db"
diff --git a/yocto-poky/meta/recipes-core/glib-2.0/glib.inc b/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
index 072f790..e764fad 100644
--- a/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
+++ b/yocto-poky/meta/recipes-core/glib-2.0/glib.inc
@@ -17,20 +17,23 @@
 
 BBCLASSEXTEND = "native nativesdk"
 
-DEPENDS = "glib-2.0-native virtual/libiconv libffi zlib"
-DEPENDS_append_class-target = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', ' dbus', '', d)}"
+DEPENDS = "virtual/libiconv libffi zlib glib-2.0-native"
+DEPENDS_append = " ${@bb.utils.contains('PTEST_ENABLED', '1', ' dbus', '', d)}"
 DEPENDS_class-native = "pkgconfig-native gettext-native libffi-native zlib-native"
-DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-gettext nativesdk-libffi nativesdk-zlib ${BPN}-native"
+DEPENDS_class-nativesdk = "nativesdk-libtool nativesdk-gettext nativesdk-libffi nativesdk-zlib glib-2.0-native"
 
-PACKAGES =+ "${PN}-utils ${PN}-bash-completion ${PN}-codegen"
+PACKAGES += "${PN}-codegen ${PN}-utils"
 
 LEAD_SONAME = "libglib-2.0.*"
-FILES_${PN}-utils = "${bindir}/* ${datadir}/glib-2.0/gettext"
 
-inherit autotools gettext gtk-doc pkgconfig ptest-gnome
+inherit autotools gettext gtk-doc pkgconfig ptest-gnome upstream-version-is-even bash-completion gio-module-cache
 
 S = "${WORKDIR}/glib-${PV}"
 
+PACKAGECONFIG ??= "system-pcre"
+# To use the system pcre it must be configured with --enable-unicode-properties
+PACKAGECONFIG[system-pcre] = "--with-pcre=system,--with-pcre=internal,libpcre"
+
 CORECONF = "--disable-dtrace --disable-fam --disable-libelf --disable-systemtap --disable-man"
 
 PRINTF = "--enable-included-printf=no"
@@ -44,19 +47,27 @@
 	sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/gio/gdbus-2.0/codegen/gdbus-codegen.in
 }
 
-FILES_${PN} = "${libdir}/lib*${SOLIBS} ${libdir}/gio ${datadir}/glib-2.0/schemas \
-               ${datadir}/glib-2.0/gettext/mkinstalldirs ${datadir}/glib-2.0/gettext/po/Makefile.in.in"
+FILES_${PN} = "${libdir}/lib*${SOLIBS} \
+               ${libdir}/gio \
+               ${libexecdir}/*gio-querymodules \
+               ${datadir}/glib-2.0/schemas"
 FILES_${PN}-dev += "${libdir}/glib-2.0/include \
                     ${libdir}/gio/modules/lib*${SOLIBSDEV} \
-                    ${libdir}/gio/modules/*.la"
-FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb \
-                    ${libdir}/gio/modules/.debug \
-                    ${libdir}/glib-2.0/installed-tests/glib/.debug"
-FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py"
-FILES_${PN}-bash-completion = "${sysconfdir}/bash_completion.d \
-                               ${datadir}/bash-completion"
+                    ${libdir}/gio/modules/*.la \
+                    ${bindir}/glib-genmarshal \
+                    ${bindir}/glib-gettextize \
+                    ${bindir}/glib-mkenums \
+                    ${bindir}/glib-compile-resources \
+                    ${datadir}/glib-2.0/gettext/po/Makefile.in.in \
+                    ${datadir}/glib-2.0/schemas/gschema.dtd"
+FILES_${PN}-dbg += "${datadir}/glib-2.0/gdb ${datadir}/gdb"
+FILES_${PN}-codegen = "${datadir}/glib-2.0/codegen/*.py \
+                       ${bindir}/gdbus-codegen"
+FILES_${PN}-utils = "${bindir}/*"
 
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
 USE_NLS = "yes"
 
 do_install_append () {
@@ -73,6 +84,21 @@
 	if [ -f ${D}${bindir}/glib-mkenums ]; then
 		sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
 	fi
+
+	if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then
+		if ${@bb.utils.contains("DISTRO_FEATURES", "x11", "false", "true", d)}; then
+			rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test
+		fi
+	fi
+
+        # Make sure gio-querymodules is unique among multilibs
+        if test "x${MLPREFIX}" != "x"; then
+                mv ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules
+        fi
+}
+
+do_install_append_libc-musl () {
+	rm -f ${D}${libdir}/charset.alias
 }
 
 RDEPENDS_${PN}-ptest += "\
diff --git a/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.44.0.bb b/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.44.0.bb
deleted file mode 100644
index 4f91b76..0000000
--- a/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.44.0.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "GLib networking extensions"
-DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
-HOMEPAGE = "http://git.gnome.org/browse/glib-networking/"
-BUGTRACKER = "http://bugzilla.gnome.org"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-SECTION = "libs"
-DEPENDS = "glib-2.0 intltool-native"
-
-SRC_URI[archive.md5sum] = "6989b20cf3b26dd5ae272e04a9acb0b3"
-SRC_URI[archive.sha256sum] = "8f8a340d3ba99bfdef38b653da929652ea6640e27969d29f7ac51fbbe11a4346"
-
-PACKAGECONFIG ??= "ca-certificates gnutls"
-
-# No explicit dependency as it works without ca-certificates installed
-PACKAGECONFIG[ca-certificates] = "--with-ca-certificates=${sysconfdir}/ssl/certs/ca-certificates.crt,--without-ca-certificates"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
-PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
-
-EXTRA_OECONF = "--without-gnome-proxy"
-
-inherit gnomebase gettext
-
-FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
-FILES_${PN}-dbg += "${libdir}/gio/modules/.debug/"
-FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
-FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
diff --git a/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.46.1.bb b/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.46.1.bb
new file mode 100644
index 0000000..749ac98
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glib-networking/glib-networking_2.46.1.bb
@@ -0,0 +1,29 @@
+SUMMARY = "GLib networking extensions"
+DESCRIPTION = "glib-networking contains the implementations of certain GLib networking features that cannot be implemented directly in GLib itself because of their dependencies."
+HOMEPAGE = "http://git.gnome.org/browse/glib-networking/"
+BUGTRACKER = "http://bugzilla.gnome.org"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+SECTION = "libs"
+DEPENDS = "glib-2.0 intltool-native"
+
+SRC_URI[archive.md5sum] = "c000e0b579f5d8fd48efebc7ac4d95dc"
+SRC_URI[archive.sha256sum] = "d5034214217f705891b6c9e719cc2c583c870bfcfdc454ebbb5e5e8940ac90b1"
+
+PACKAGECONFIG ??= "ca-certificates gnutls"
+
+# No explicit dependency as it works without ca-certificates installed
+PACKAGECONFIG[ca-certificates] = "--with-ca-certificates=${sysconfdir}/ssl/certs/ca-certificates.crt,--without-ca-certificates"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
+PACKAGECONFIG[pkcs11] = "--with-pkcs11,--without-pkcs11,p11-kit"
+
+EXTRA_OECONF = "--without-gnome-proxy"
+
+inherit gnomebase gettext upstream-version-is-even gio-module-cache
+
+FILES_${PN} += "${libdir}/gio/modules/libgio*.so ${datadir}/dbus-1/services/"
+FILES_${PN}-dev += "${libdir}/gio/modules/libgio*.la"
+FILES_${PN}-staticdev += "${libdir}/gio/modules/libgio*.a"
diff --git a/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.22.bb b/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.22.bb
deleted file mode 100644
index 3aefe74..0000000
--- a/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.22.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "Cross locale generation tool for glibc"
-HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
-SECTION = "libs"
-LICENSE = "LGPL-2.1"
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
-      file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-      file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
-      file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-
-inherit native
-inherit autotools
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
-
-SRCBRANCH ?= "release/${PV}/master"
-GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-
-SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
-           git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
-           file://fix_for_centos_5.8.patch \
-	   file://strcoll-Remove-incorrect-STRDIFF-based-optimization-.patch \
-           ${EGLIBCPATCHES} \
-"
-EGLIBCPATCHES = "\
-           file://0017-timezone-re-written-tzselect-as-posix-sh.patch \
-           file://0018-eglibc-Cross-building-and-testing-instructions.patch \
-           file://0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch \
-           file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
-           file://0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch \
-           file://0022-eglibc-Clear-cache-lines-on-ppc8xx.patch \
-           file://0023-eglibc-Resolve-__fpscr_values-on-SH4.patch \
-           file://0024-eglibc-Forward-port-eglibc-options-groups-support.patch \
-           file://0025-eglibc-Install-PIC-archives.patch \
-           file://0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch \
-           file://0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch \
-"
-
-SRCREV_glibc ?= "a34d1c6afc86521d6ad17662a3b5362d8481514c"
-SRCREV_localedef ?= "c833367348d39dad7ba018990bfdaffaec8e9ed3"
-
-# Makes for a rather long rev (22 characters), but...
-#
-SRCREV_FORMAT = "glibc_localedef"
-
-S = "${WORKDIR}/git"
-
-EXTRA_OECONF = "--with-glibc=${S}"
-CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
-
-do_configure () {
-	${S}/localedef/configure ${EXTRA_OECONF}
-}
-
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
-}
diff --git a/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.23.bb b/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.23.bb
new file mode 100644
index 0000000..fa930fd
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/cross-localedef-native_2.23.bb
@@ -0,0 +1,58 @@
+SUMMARY = "Cross locale generation tool for glibc"
+HOMEPAGE = "http://www.gnu.org/software/libc/libc.html"
+SECTION = "libs"
+LICENSE = "LGPL-2.1"
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
+      file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+      file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+      file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+
+inherit native
+inherit autotools
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:${FILE_DIRNAME}/glibc:"
+
+SRCBRANCH ?= "release/${PV}/master"
+GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+           git://github.com/kraj/localedef;branch=master;name=localedef;destsuffix=git/localedef \
+           file://fix_for_centos_5.8.patch \
+           ${EGLIBCPATCHES} \
+"
+EGLIBCPATCHES = "\
+           file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
+           file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
+           file://0018-eglibc-Cross-building-and-testing-instructions.patch \
+           file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
+           file://0020-eglibc-cherry-picked-from.patch \
+           file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+           file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+           file://0023-eglibc-Install-PIC-archives.patch \
+           file://0025-eglibc-Forward-port-cross-locale-generation-support.patch \
+"
+
+SRCREV_glibc ?= "e742928c1592b43db6809db4f39e67be151cdd27"
+SRCREV_localedef ?= "5a81ff9f06a7a808d4c3d37bbf34077a4c5902ed"
+
+# Makes for a rather long rev (22 characters), but...
+#
+SRCREV_FORMAT = "glibc_localedef"
+
+S = "${WORKDIR}/git"
+
+EXTRA_OECONF = "--with-glibc=${S}"
+CFLAGS += "-fgnu89-inline -std=gnu99 -DIS_IN\(x\)='0'"
+
+do_configure () {
+	${S}/localedef/configure ${EXTRA_OECONF}
+}
+
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 ${B}/localedef ${D}${bindir}/cross-localedef
+}
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc-initial.inc b/yocto-poky/meta/recipes-core/glibc/glibc-initial.inc
index 3500848..5975fd2 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc-initial.inc
+++ b/yocto-poky/meta/recipes-core/glibc/glibc-initial.inc
@@ -11,11 +11,11 @@
 do_configure () {
 	(cd ${S} && gnu-configize) || die "failure in running gnu-configize"
 	find ${S} -name "configure" | xargs touch
-	${S}/configure --host=${TARGET_SYS} --build=${BUILD_SYS} \
+	cfgscript=`python -c "import os; print os.path.relpath('${S}', '.')"`/configure
+	$cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \
 		--prefix=/usr \
 		--without-cvs --disable-sanity-checks \
 		--with-headers=${STAGING_DIR_TARGET}${includedir} \
-		--with-kconfig=${STAGING_BINDIR_NATIVE} \
 		--enable-hacker-mode --enable-addons
 }
 
@@ -74,3 +74,5 @@
 do_evacuate_scripts () {
 	:
 }
+
+inherit nopackages
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.22.bb b/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.22.bb
deleted file mode 100644
index 8ab01dc..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.22.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require glibc_${PV}.bb
-require glibc-initial.inc
-
-DEPENDS += "kconfig-frontends-native"
-
-# main glibc recipes muck with TARGET_CPPFLAGS to point into
-# final target sysroot but we
-# are not there when building glibc-initial
-# so reset it here
-
-TARGET_CPPFLAGS = ""
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.23.bb b/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.23.bb
new file mode 100644
index 0000000..e86770e
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc-initial_2.23.bb
@@ -0,0 +1,9 @@
+require glibc_${PV}.bb
+require glibc-initial.inc
+
+# main glibc recipes muck with TARGET_CPPFLAGS to point into
+# final target sysroot but we
+# are not there when building glibc-initial
+# so reset it here
+
+TARGET_CPPFLAGS = ""
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc b/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc
index 2352bd0..e868e38 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc
+++ b/yocto-poky/meta/recipes-core/glibc/glibc-locale.inc
@@ -64,7 +64,6 @@
 # FILES_glibc-gconv will not be automatically extended in multilib.
 # Explicitly add ${MLPREFIX} for FILES_glibc-gconv.
 FILES_${MLPREFIX}glibc-gconv = "${libdir}/gconv/*"
-FILES_${PN}-dbg += "${libdir}/gconv/.debug/*"
 FILES_localedef = "${bindir}/localedef"
 
 LOCALETREESRC = "${STAGING_INCDIR}/glibc-locale-internal-${MULTIMACH_TARGET_SYS}"
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.22.bb b/yocto-poky/meta/recipes-core/glibc/glibc-locale_2.23.bb
similarity index 100%
rename from yocto-poky/meta/recipes-core/glibc/glibc-locale_2.22.bb
rename to yocto-poky/meta/recipes-core/glibc/glibc-locale_2.23.bb
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.22.bb b/yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.23.bb
similarity index 100%
rename from yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.22.bb
rename to yocto-poky/meta/recipes-core/glibc/glibc-mtrace_2.23.bb
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc-options.inc b/yocto-poky/meta/recipes-core/glibc/glibc-options.inc
deleted file mode 100644
index 9fd27f3..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc-options.inc
+++ /dev/null
@@ -1,162 +0,0 @@
-def glibc_cfg(feature, tokens, cnf):
-    if type(tokens) == type(""):
-        tokens = [tokens]
-    if feature:
-        cnf.extend([token + '=y' for token in tokens])
-    else:
-        for token in tokens:
-            cnf.extend([token + '=n'])
-            if token == 'OPTION_EGLIBC_NSSWITCH':
-                cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG=\"${S}/nss/nsswitch.conf\""])
-                cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS=\"${S}/nss/fixed-nsswitch.functions\""])
-
-# Map distro features to glibc options settings
-def features_to_glibc_settings(d):
-    cnf = ([])
-
-    ipv4 = bb.utils.contains('DISTRO_FEATURES', 'ipv4', True, False, d)
-    ipv6 = bb.utils.contains('DISTRO_FEATURES', 'ipv6', True, False, d)
-    libc_backtrace = bb.utils.contains('DISTRO_FEATURES', 'libc-backtrace', True, False, d) 
-    libc_big_macros = bb.utils.contains('DISTRO_FEATURES', 'libc-big-macros', True, False, d)
-    libc_bsd = bb.utils.contains('DISTRO_FEATURES', 'libc-bsd', True, False, d)
-    libc_cxx_tests = bb.utils.contains('DISTRO_FEATURES', 'libc-cxx-tests', True, False, d)
-    libc_catgets = bb.utils.contains('DISTRO_FEATURES', 'libc-catgets', True, False, d)
-    libc_charsets = bb.utils.contains('DISTRO_FEATURES', 'libc-charsets', True, False, d)
-    libc_crypt = bb.utils.contains('DISTRO_FEATURES', 'libc-crypt', True, False, d)
-    libc_crypt_ufc = bb.utils.contains('DISTRO_FEATURES', 'libc-crypt-ufc', True, False, d)
-    libc_db_aliases = bb.utils.contains('DISTRO_FEATURES', 'libc-db-aliases', True, False, d)
-    libc_envz = bb.utils.contains('DISTRO_FEATURES', 'libc-envz', True, False, d)
-    libc_fcvt = bb.utils.contains('DISTRO_FEATURES', 'libc-fcvt', True, False, d)
-    libc_fmtmsg = bb.utils.contains('DISTRO_FEATURES', 'libc-fmtmsg', True, False, d)
-    libc_fstab = bb.utils.contains('DISTRO_FEATURES', 'libc-fstab', True, False, d)
-    libc_ftraverse = bb.utils.contains('DISTRO_FEATURES', 'libc-ftraverse', True, False, d)
-    libc_getlogin = bb.utils.contains('DISTRO_FEATURES', 'libc-getlogin', True, False, d)
-    libc_idn = bb.utils.contains('DISTRO_FEATURES', 'libc-idn', True, False, d)
-    libc_inet_anl = bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', True, False, d)
-    libc_libm = bb.utils.contains('DISTRO_FEATURES', 'libc-libm', True, False, d)
-    libc_locales = bb.utils.contains('DISTRO_FEATURES', 'libc-locales', True, False, d)
-    libc_locale_code = bb.utils.contains('DISTRO_FEATURES', 'libc-locale-code', True, False, d)
-    libc_memusage = bb.utils.contains('DISTRO_FEATURES', 'libc-memusage', True, False, d)
-    libc_nis = bb.utils.contains('DISTRO_FEATURES', 'libc-nis', True, False, d)
-    libc_nsswitch = bb.utils.contains('DISTRO_FEATURES', 'libc-nsswitch', True, False, d)
-    libc_rcmd = bb.utils.contains('DISTRO_FEATURES', 'libc-rcmd', True, False, d)
-    libc_rtld_debug = bb.utils.contains('DISTRO_FEATURES', 'libc-rtld-debug', True, False, d)
-    libc_spawn = bb.utils.contains('DISTRO_FEATURES', 'libc-spawn', True, False, d)
-    libc_streams = bb.utils.contains('DISTRO_FEATURES', 'libc-streams', True, False, d)
-    libc_sunrpc = bb.utils.contains('DISTRO_FEATURES', 'libc-sunrpc', True, False, d)
-    libc_utmp = bb.utils.contains('DISTRO_FEATURES', 'libc-utmp', True, False, d)
-    libc_utmpx = bb.utils.contains('DISTRO_FEATURES', 'libc-utmpx', True, False, d)
-    libc_wordexp = bb.utils.contains('DISTRO_FEATURES', 'libc-wordexp', True, False, d)
-    libc_posix_clang_wchar = bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', True, False, d)
-    libc_posix_regexp = bb.utils.contains('DISTRO_FEATURES', 'libc-posix-regexp', True, False, d)
-    libc_posix_regexp_glibc = bb.utils.contains('DISTRO_FEATURES', 'libc-posix-regexp-glibc', True, False, d)
-    libc_posix_wchar_io = bb.utils.contains('DISTRO_FEATURES', 'libc-posix-wchar-io', True, False, d)
-
-    # arrange the dependencies among glibc configuable options according to file option-groups.def from glibc source code
-    new_dep = True
-    while new_dep:
-        new_dep = False
-
-        if ipv6 and not ipv4:
-            new_dep = True
-            ipv4 = True
-
-        if ipv4 and not libc_nsswitch:
-            new_dep = True
-            libc_nsswitch = True
-
-        if libc_cxx_tests:
-            if not libc_posix_wchar_io:
-                new_dep = True
-                libc_posix_wchar_io = True
-            if not libc_libm:
-                new_dep = True
-                libc_libm = True
-
-        if libc_catgets and not libc_locale_code:
-            new_dep = True
-            libc_locale_code = True
-
-        if libc_crypt_ufc and not libc_crypt:
-            new_dep = True
-            libc_crypt = True
-
-        if libc_getlogin and not libc_utmp:
-            new_dep = True
-            libc_utmp = True
-
-        if libc_inet_anl and not ipv4:
-            new_dep = True
-            ipv4 = True
-
-        if libc_locale_code and not libc_posix_clang_wchar:
-            new_dep = True
-            libc_posix_clang_wchar = True
-
-        if libc_nis:
-            if not ipv4:
-                new_dep = True
-                ipv4 = True
-            if not libc_sunrpc:
-                new_dep = True
-                libc_sunrpc = True
-
-        if libc_rcmd and not ipv4:
-            new_dep = True
-            ipv4 = True
-
-        if libc_sunrpc and not ipv4:
-            new_dep = True
-            ipv4 = True
-
-        if libc_utmpx and not libc_utmp:
-            new_dep = True
-            libc_utmp = True
-
-        if libc_posix_regexp_glibc and not libc_posix_regexp:
-            new_dep = True
-            libc_posix_regexp = True
-
-        if libc_posix_wchar_io and not libc_posix_clang_wchar:
-            new_dep = True
-            libc_posix_clang_wchar = True
-
-    glibc_cfg(ipv6, 'OPTION_EGLIBC_ADVANCED_INET6', cnf)
-    glibc_cfg(libc_backtrace, 'OPTION_EGLIBC_BACKTRACE', cnf)
-    glibc_cfg(libc_big_macros, 'OPTION_EGLIBC_BIG_MACROS', cnf)
-    glibc_cfg(libc_bsd, 'OPTION_EGLIBC_BSD', cnf)
-    glibc_cfg(libc_cxx_tests, 'OPTION_EGLIBC_CXX_TESTS', cnf)
-    glibc_cfg(libc_catgets, 'OPTION_EGLIBC_CATGETS', cnf)
-    glibc_cfg(libc_charsets, 'OPTION_EGLIBC_CHARSETS', cnf)
-    glibc_cfg(libc_crypt, 'OPTION_EGLIBC_CRYPT', cnf)
-    glibc_cfg(libc_crypt_ufc, 'OPTION_EGLIBC_CRYPT_UFC', cnf)
-    glibc_cfg(libc_db_aliases, 'OPTION_EGLIBC_DB_ALIASES', cnf)
-    glibc_cfg(libc_envz, 'OPTION_EGLIBC_ENVZ', cnf)
-    glibc_cfg(libc_fcvt, 'OPTION_EGLIBC_FCVT', cnf)
-    glibc_cfg(libc_fmtmsg, 'OPTION_EGLIBC_FMTMSG', cnf)
-    glibc_cfg(libc_fstab, 'OPTION_EGLIBC_FSTAB', cnf)
-    glibc_cfg(libc_ftraverse, 'OPTION_EGLIBC_FTRAVERSE', cnf)
-    glibc_cfg(libc_getlogin, 'OPTION_EGLIBC_GETLOGIN', cnf)
-    glibc_cfg(libc_idn, 'OPTION_EGLIBC_IDN', cnf)
-    glibc_cfg(ipv4, 'OPTION_EGLIBC_INET', cnf)
-    glibc_cfg(libc_inet_anl, 'OPTION_EGLIBC_INET_ANL', cnf)
-    glibc_cfg(libc_libm, 'OPTION_EGLIBC_LIBM', cnf)
-    glibc_cfg(libc_locales, 'OPTION_EGLIBC_LOCALES', cnf)
-    glibc_cfg(libc_locale_code, 'OPTION_EGLIBC_LOCALE_CODE', cnf)
-    glibc_cfg(libc_memusage, 'OPTION_EGLIBC_MEMUSAGE', cnf)
-    glibc_cfg(libc_nis, 'OPTION_EGLIBC_NIS', cnf)
-    glibc_cfg(libc_nsswitch, 'OPTION_EGLIBC_NSSWITCH', cnf)
-    glibc_cfg(libc_rcmd, 'OPTION_EGLIBC_RCMD', cnf)
-    glibc_cfg(libc_rtld_debug, 'OPTION_EGLIBC_RTLD_DEBUG', cnf)
-    glibc_cfg(libc_spawn, 'OPTION_EGLIBC_SPAWN', cnf)
-    glibc_cfg(libc_streams, 'OPTION_EGLIBC_STREAMS', cnf)
-    glibc_cfg(libc_sunrpc, 'OPTION_EGLIBC_SUNRPC', cnf)
-    glibc_cfg(libc_utmp, 'OPTION_EGLIBC_UTMP', cnf)
-    glibc_cfg(libc_utmpx, 'OPTION_EGLIBC_UTMPX', cnf)
-    glibc_cfg(libc_wordexp, 'OPTION_EGLIBC_WORDEXP', cnf)
-    glibc_cfg(libc_posix_clang_wchar, 'OPTION_POSIX_C_LANG_WIDE_CHAR', cnf)
-    glibc_cfg(libc_posix_regexp, 'OPTION_POSIX_REGEXP', cnf)
-    glibc_cfg(libc_posix_regexp_glibc, 'OPTION_POSIX_REGEXP_GLIBC', cnf)
-    glibc_cfg(libc_posix_wchar_io, 'OPTION_POSIX_WIDE_CHAR_DEVICE_IO', cnf)
-
-    return "\n".join(cnf)
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc-package.inc b/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
index 5f60368..bad6424 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
+++ b/yocto-poky/meta/recipes-core/glibc/glibc-package.inc
@@ -54,7 +54,6 @@
 FILES_${PN}-mtrace = "${bindir}/mtrace"
 FILES_tzcode = "${bindir}/tzselect ${sbindir}/zic ${sbindir}/zdump"
 FILES_${PN}-utils = "${bindir}/* ${sbindir}/*"
-FILES_${PN}-dbg += "${libexecdir}/*/.debug ${libdir}/audit/.debug"
 FILES_catchsegv = "${bindir}/catchsegv"
 RDEPENDS_catchsegv = "libsegfault"
 FILES_${PN}-pcprofile = "${base_libdir}/libpcprofile.so"
@@ -82,9 +81,10 @@
 	rm -rf ${D}${localstatedir}
 
 	# remove empty glibc dir
-	if [ -d ${D}${libdir}/glibc -a ! -e ${D}${libdir}/glibc/pt_chown ]; then
-		rmdir ${D}${libdir}/glibc
+	if [ -d ${D}${libexecdir} ]; then
+		rmdir --ignore-fail-on-non-empty ${D}${libexecdir}
 	fi
+
 	oe_multilib_header bits/syscall.h
 
 	if [ -f ${D}${bindir}/mtrace ]; then
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.22.bb b/yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.23.bb
similarity index 100%
rename from yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.22.bb
rename to yocto-poky/meta/recipes-core/glibc/glibc-scripts_2.23.bb
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc-testing.inc b/yocto-poky/meta/recipes-core/glibc/glibc-testing.inc
index a9bbf37..0a42ae7 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc-testing.inc
+++ b/yocto-poky/meta/recipes-core/glibc/glibc-testing.inc
@@ -22,7 +22,6 @@
 	sed -i -e "/^'/d" ${B}/${HOST_PREFIX}testglibc
 	sed -i -e "/^UID/d" ${B}/${HOST_PREFIX}testglibc
 	sed -i -e "/^TERM/d" ${B}/${HOST_PREFIX}testglibc
-	sed -i -e "/^PATCH_GET/d" ${B}/${HOST_PREFIX}testglibc
 	sed -i -e "/^PKG_/d" ${B}/${HOST_PREFIX}testglibc
 	sed -i -e "/^POSIXLY_/d" ${B}/${HOST_PREFIX}testglibc
 	sed -i -e "/^PPID/d" ${B}/${HOST_PREFIX}testglibc
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc.inc b/yocto-poky/meta/recipes-core/glibc/glibc.inc
index 17fa2d5..bf1dccd 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc.inc
+++ b/yocto-poky/meta/recipes-core/glibc/glibc.inc
@@ -8,27 +8,17 @@
 
 TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
 
-# glibc can't be built without optimization, if someone tries to compile an
-# entire image as -O0, we override it with -O2 here and give a note about it.
-def get_optimization(d):
-    selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True)
-    if bb.utils.contains("SELECTED_OPTIMIZATION", "-O2", "x", "", d) == "x":
-        return selected_optimization
-    elif bb.utils.contains("SELECTED_OPTIMIZATION", "-O", "x", "", d) == "x":
-        bb.note("glibc can't be built with -O, -O -Wno-error will be used instead.")
-        return selected_optimization.replace("-O", "-O -Wno-error")
-    elif bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
-        bb.note("glibc can't be built with -O0, -O2 will be used instead.")
-        return selected_optimization.replace("-O0", "-O2")
-    elif bb.utils.contains("SELECTED_OPTIMIZATION", "-Os", "x", "", d) == "x":
-        bb.note("glibc can't be built with -Os, -Os -Wno-error will be used instead.")
-        return selected_optimization.replace("-Os", "-Os -Wno-error")
-    elif bb.utils.contains("SELECTED_OPTIMIZATION", "-O1", "x", "", d) == "x":
-        bb.note("glibc can't be built with -O1, -O1 -Wno-error will be used instead.")
-        return selected_optimization.replace("-O1", "-O1 -Wno-error")
-    return selected_optimization
-
-SELECTED_OPTIMIZATION := "${@get_optimization(d)}"
+python () {
+    opt_effective = "-O"
+    for opt in d.getVar('SELECTED_OPTIMIZATION', True).split():
+        if opt in ("-O0", "-O", "-O1", "-O2", "-O3", "-Os"):
+            opt_effective = opt
+    if opt_effective == "-O0":
+        bb.fatal("%s can't be built with %s, try -O1 instead" % (d.getVar('PN', True), opt_effective))
+    if opt_effective in ("-O", "-O1", "-Os"):
+        bb.note("%s doesn't build cleanly with %s, adding -Wno-error to SELECTED_OPTIMIZATION" % (d.getVar('PN', True), opt_effective))
+        d.appendVar("SELECTED_OPTIMIZATION", " -Wno-error")
+}
 
 # siteconfig.bbclass runs configure which needs a working compiler
 # For the compiler to work we need a working libc yet libc isn't
@@ -50,12 +40,6 @@
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
 inherit autotools texinfo distro_features_check systemd
-require glibc-options.inc
-
-# The main purpose of setting this variable is to prevent users from accidently
-# overriding DISTRO_FEATRUES, causing obscure build failures because of lack
-# of libc functions.
-REQUIRED_DISTRO_FEATURES = "${DISTRO_FEATURES_LIBC}"
 
 LEAD_SONAME = "libc.so"
 
@@ -64,6 +48,7 @@
   libc_cv_slibdir=${base_libdir} \
   libc_cv_rootsbindir=${base_sbindir} \
   libc_cv_localedir=${localedir} \
+  libc_cv_ssp_strong=no \
   libc_cv_ssp=no \
 "
 
@@ -88,18 +73,8 @@
 # ensure make uses /bin/bash
 EXTRA_OEMAKE += "SHELL=/bin/bash"
 
-OE_FEATURES = "${@features_to_glibc_settings(d)}"
 do_configure_prepend() {
 	sed -e "s#@BASH@#/bin/sh#" -i ${S}/elf/ldd.bash.in
-	echo '${OE_FEATURES}' > ${B}/option-groups.config
-}
-
-do_configure_append() {
-	yes '' | oe_runmake config
-
-	# Remove quotation marks from OPTION_EGLIBC_NSSWITCH_FIXED_*. This will
-	# avoid install error.
-	sed -i 's/^OPTION_EGLIBC_NSSWITCH_FIXED_\(.*\)="\(.*\)"$/OPTION_EGLIBC_NSSWITCH_FIXED_\1=\2/' option-groups.config
 }
 
 GLIBC_ADDONS ?= "nptl,libidn"
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
index 3d66348..97c2800 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch
@@ -1,7 +1,7 @@
-From 0876fea1b5b26da84f298714a2e23ba696607dba Mon Sep 17 00:00:00 2001
+From 66d04e2cd8badb0984050e4e9f2732f47151fbbf Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:48:24 +0000
-Subject: [PATCH 01/27] nativesdk-glibc: Look for host system ld.so.cache as
+Subject: [PATCH 01/24] nativesdk-glibc: Look for host system ld.so.cache as
  well
 
 Upstream-Status: Inappropriate [embedded specific]
@@ -27,18 +27,17 @@
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- elf/dl-load.c | 17 ++++++++---------
- 1 file changed, 8 insertions(+), 9 deletions(-)
+ elf/dl-load.c | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index 0c052e4..f45085a 100644
+index 6fb615e..ee3d1e6 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -2040,7 +2040,14 @@ _dl_map_object (struct link_map *loader, const char *name,
- 	fd = open_path (name, namelen, mode,
- 			&loader->l_runpath_dirs, &realname, &fb, loader,
- 			LA_SER_RUNPATH, &found_other_class);
--
+@@ -2094,6 +2094,14 @@ _dl_map_object (struct link_map *loader, const char *name,
+             }
+         }
+ 
 +      /* try the default path.  */
 +      if (fd == -1
 +	  && ((l = loader ?: GL(dl_ns)[nsid]._ns_loaded) == NULL
@@ -50,7 +49,7 @@
  #ifdef USE_LDCONFIG
        if (fd == -1
  	  && (__glibc_likely ((mode & __RTLD_SECURE) == 0)
-@@ -2099,14 +2106,6 @@ _dl_map_object (struct link_map *loader, const char *name,
+@@ -2152,14 +2160,6 @@ _dl_map_object (struct link_map *loader, const char *name,
  	}
  #endif
  
@@ -66,5 +65,5 @@
        if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
  	_dl_debug_printf ("\n");
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
index b568fc6..473b894 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch
@@ -1,7 +1,7 @@
-From 086b65d9aacffc47fcd8df68818a476a5ae76fa1 Mon Sep 17 00:00:00 2001
+From 179dc5f1e13c3ff96d5f21a2a78c089cf120ceb8 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:50:00 +0000
-Subject: [PATCH 02/27] nativesdk-glibc: Fix buffer overrun with a relocated
+Subject: [PATCH 02/24] nativesdk-glibc: Fix buffer overrun with a relocated
  SDK
 
 When ld-linux-*.so.2 is relocated to a path that is longer than the
@@ -22,10 +22,10 @@
  1 file changed, 12 insertions(+)
 
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index f45085a..f1eb5ed 100644
+index ee3d1e6..c4a42e9 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -1765,7 +1765,19 @@ open_path (const char *name, size_t namelen, int mode,
+@@ -1793,7 +1793,19 @@ open_path (const char *name, size_t namelen, int mode,
         given on the command line when rtld is run directly.  */
      return -1;
  
@@ -46,5 +46,5 @@
      {
        struct r_search_path_elem *this_dir = *dirs;
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
index a681a64..60f9f17 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch
@@ -1,7 +1,7 @@
-From fd595a5ec885bcb4c14417daa21c2e61c5b72e42 Mon Sep 17 00:00:00 2001
+From e76048898ae9aa49dc70d6f9b1bbc22082e61fe3 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 01:51:38 +0000
-Subject: [PATCH 03/27] nativesdk-glibc: Raise the size of arrays containing dl
+Subject: [PATCH 03/24] nativesdk-glibc: Raise the size of arrays containing dl
  paths
 
 This patch puts the dynamic loader path in the binaries, SYSTEM_DIRS strings
@@ -40,10 +40,10 @@
  internal_function
  _dl_cache_libcmp (const char *p1, const char *p2)
 diff --git a/elf/dl-load.c b/elf/dl-load.c
-index f1eb5ed..f664f50 100644
+index c4a42e9..acf6c03 100644
 --- a/elf/dl-load.c
 +++ b/elf/dl-load.c
-@@ -104,8 +104,8 @@ static size_t max_capstrlen attribute_relro;
+@@ -106,8 +106,8 @@ static size_t max_capstrlen attribute_relro;
  /* Get the generated information about the trusted directories.  */
  #include "trusted-dirs.h"
  
@@ -80,7 +80,7 @@
     a platform.  */
  static int
 diff --git a/elf/rtld.c b/elf/rtld.c
-index 69873c2..6d3add7 100644
+index 52160df..80f0582 100644
 --- a/elf/rtld.c
 +++ b/elf/rtld.c
 @@ -99,6 +99,7 @@ uintptr_t __pointer_chk_guard_local
@@ -91,7 +91,7 @@
  
  /* List of auditing DSOs.  */
  static struct audit_list
-@@ -877,12 +878,12 @@ of this helper program; chances are you did not intend to run this program.\n\
+@@ -873,12 +874,12 @@ of this helper program; chances are you did not intend to run this program.\n\
    --list                list all dependencies and how they are resolved\n\
    --verify              verify that given object really is a dynamically linked\n\
  			object we can handle\n\
@@ -107,7 +107,7 @@
        ++_dl_skip_args;
        --_dl_argc;
 diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
-index 4b49869..1800d03 100644
+index 70d4aeb..5c726d0 100644
 --- a/sysdeps/generic/dl-cache.h
 +++ b/sysdeps/generic/dl-cache.h
 @@ -27,10 +27,6 @@
@@ -121,6 +121,16 @@
  #ifndef add_system_dir
  # define add_system_dir(dir) add_dir (dir)
  #endif
--- 
-2.1.4
-
+Index: git/iconv/gconv_conf.c
+===================================================================
+--- git.orig/iconv/gconv_conf.c
++++ git/iconv/gconv_conf.c
+@@ -36,7 +36,7 @@
+ 
+ 
+ /* This is the default path where we look for module lists.  */
+-static const char default_gconv_path[] = GCONV_PATH;
++static char default_gconv_path[4096] __attribute__ ((section (".gccrelocprefix"))) = GCONV_PATH;
+ 
+ /* The path elements, as determined by the __gconv_get_path function.
+    All path elements end in a slash.  */
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch
deleted file mode 100644
index 7487503..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 2560b564b5674bf2990e5607f6342c1647a5dc4f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 8 Mar 2015 04:01:01 +0000
-Subject: [PATCH 04/27] Backport
- https://sourceware.org/ml/libc-ports/2007-12/msg00000.html
-
-Upstream-Status: Pending
-
-2007-12-03  Kristian Van Der Vliet  <vanders@liqwyd.com>
-
-        * bits/stdio-lock.h (_IO_acquire_lock_clear_flags2): Define
-
-Signed-off-by: Kristian Van Der Vliet <vanders@liqwyd.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- bits/stdio-lock.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/bits/stdio-lock.h b/bits/stdio-lock.h
-index 0c5bb65..66304a6 100644
---- a/bits/stdio-lock.h
-+++ b/bits/stdio-lock.h
-@@ -49,6 +49,8 @@ __libc_lock_define_recursive (typedef, _IO_lock_t)
-   _IO_cleanup_region_start ((void (*) (void *)) _IO_funlockfile, (_fp));      \
-   _IO_flockfile (_fp)
- 
-+# define _IO_acquire_lock_clear_flags2(_fp) _IO_acquire_lock (_fp)
-+
- # define _IO_release_lock(_fp) \
-   _IO_funlockfile (_fp);						      \
-   _IO_cleanup_region_end (0)
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
new file mode 100644
index 0000000..21f04a1
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch
@@ -0,0 +1,32 @@
+From 2e1638115f0f924ee8235eee9265047054c15cfd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 14:35:35 -0800
+Subject: [PATCH 04/24] nativesdk-glibc: Allow 64 bit atomics for x86
+
+The fix consist of allowing 64bit atomic ops for x86.
+This should be safe for i586 and newer CPUs.
+It also makes the synchronization more efficient.
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/i386/atomic-machine.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sysdeps/i386/atomic-machine.h b/sysdeps/i386/atomic-machine.h
+index 59f3d34..6f6b7ff 100644
+--- a/sysdeps/i386/atomic-machine.h
++++ b/sysdeps/i386/atomic-machine.h
+@@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t;
+ # endif
+ #endif
+ 
+-#define __HAVE_64B_ATOMICS 0
++#define __HAVE_64B_ATOMICS 1
+ #define USE_ATOMIC_COMPILER_BUILTINS 0
+ 
+ 
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
index 8d3f859..ba8c92e 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch
@@ -1,7 +1,7 @@
-From aa0cd82892f32e58602143c697ef0524696a6428 Mon Sep 17 00:00:00 2001
+From 7ff57edfe24b4243373fcb896ee0b613938c1ec9 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:01:50 +0000
-Subject: [PATCH 05/27] fsl e500/e5500/e6500/603e fsqrt implementation
+Subject: [PATCH 05/24] fsl e500/e5500/e6500/603e fsqrt implementation
 
 Upstream-Status: Pending
 Signed-off-by: Edmar Wienskoski <edmar@freescale.com>
@@ -1580,5 +1580,5 @@
 @@ -0,0 +1 @@
 +powerpc/powerpc64/e6500/fpu
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
index 65c227f..086a73d 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch
@@ -1,7 +1,7 @@
-From 5ec1bc5172851278231ce940b68b35ce9cbf8500 Mon Sep 17 00:00:00 2001
+From 61129ef3ee735b300604f75d50e01cb29f4387f4 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:11:22 +0000
-Subject: [PATCH 06/27] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
+Subject: [PATCH 06/24] readlib: Add OECORE_KNOWN_INTERPRETER_NAMES to known
  names
 
 This bolts in a hook for OE to pass its own version of interpreter
@@ -29,5 +29,5 @@
  
  static struct known_names known_libs[] =
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
index aec8fbe..952784b 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch
@@ -1,7 +1,7 @@
-From ea98b1a12b5f779fd79478ff930a79ef60387851 Mon Sep 17 00:00:00 2001
+From f936548decac99501f9a4c522a3211d16542fa49 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:15:07 +0000
-Subject: [PATCH 07/27] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
+Subject: [PATCH 07/24] ppc/sqrt: Fix undefined reference to `__sqrt_finite'
 
 on ppc fixes the errors like below
 | ./.libs/libpulsecore-1.1.so: undefined reference to `__sqrt_finite'
@@ -204,5 +204,5 @@
  }
 +strong_alias (__ieee754_sqrtf, __sqrtf_finite)
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index b3fa931..8d513ab 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From 2456ea44aeeedae87edb522f77a7969d636399b0 Mon Sep 17 00:00:00 2001
+From d02704895fdce917e337619a4414042f63edd88b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:16:38 +0000
-Subject: [PATCH 08/27] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 08/24] __ieee754_sqrt{,f} are now inline functions and call
  out __slow versions
 
 Upstream-Status: Pending
@@ -383,5 +383,5 @@
 +
  strong_alias (__ieee754_sqrtf, __sqrtf_finite)
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
index 1f54759..12f24fb 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch
@@ -1,7 +1,7 @@
-From acf7a028817e71eb99d785037659abd4d120ffe2 Mon Sep 17 00:00:00 2001
+From 502f061d846e58aac7aca67e4e0d6ba9e0763b17 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:20:09 +0000
-Subject: [PATCH 09/27] Quote from bug 1443 which explains what the patch does
+Subject: [PATCH 09/24] Quote from bug 1443 which explains what the patch does
  :
 
   We build some random program and link it with -lust.  When we run it,
@@ -58,5 +58,5 @@
  
  	case R_ARM_TLS_TPOFF32:
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
index d71e576..77bd7d1 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch
@@ -1,7 +1,7 @@
-From 017322ee28c1579ce6c81904842aaada9c82403c Mon Sep 17 00:00:00 2001
+From 69a3e30b49d28a7386d18725528652931510cbfc Mon Sep 17 00:00:00 2001
 From: Ting Liu <b28495@freescale.com>
 Date: Wed, 19 Dec 2012 04:39:57 -0600
-Subject: [PATCH 10/27] eglibc: run libm-err-tab.pl with specific dirs in ${S}
+Subject: [PATCH 10/24] eglibc: run libm-err-tab.pl with specific dirs in ${S}
 
 libm-err-tab.pl will parse all the files named "libm-test-ulps"
 in the given dir recursively. To avoid parsing the one in
@@ -10,7 +10,7 @@
 aarch64/libm-test-ulps), run libm-err-tab.pl with specific dirs
 in ${S}.
 
-Upstream-Status: inappropriate [OE specific]
+Upstream-Status: Inappropriate [OE specific]
 
 Signed-off-by: Ting Liu <b28495@freescale.com>
 ---
@@ -18,7 +18,7 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/manual/Makefile b/manual/Makefile
-index 5382208..6b701b0 100644
+index cdb6763..0b32a0a 100644
 --- a/manual/Makefile
 +++ b/manual/Makefile
 @@ -105,7 +105,8 @@ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
@@ -32,5 +32,5 @@
  	touch $@
  
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
index 07a112b..251e5f5 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch
@@ -1,7 +1,7 @@
-From 1be45f870ebbb0259bea5250a6d2c2fbcb33409d Mon Sep 17 00:00:00 2001
+From 4cf52971a841304aec30b2e975f81d7ad9d42ef0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:24:46 +0000
-Subject: [PATCH 11/27] __ieee754_sqrt{,f} are now inline functions and call
+Subject: [PATCH 11/24] __ieee754_sqrt{,f} are now inline functions and call
  out __slow versions
 
 Upstream-Status: Pending
@@ -57,5 +57,5 @@
  #endif
  {
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
index 2677913..3208a0c 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0012-Make-ld-version-output-matching-grok-gold-s-output.patch
@@ -1,7 +1,7 @@
-From 49471ab1f90e392da9520eea831ce8731be9fc8b Mon Sep 17 00:00:00 2001
+From b356816d6e005ecda7adbed9627a4315ad39de39 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:25:45 +0000
-Subject: [PATCH 12/27] Make ld --version output matching grok gold's output
+Subject: [PATCH 12/24] Make ld --version output matching grok gold's output
 
 adapted from from upstream branch roland/gold-vs-libc
 
@@ -14,10 +14,10 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/configure b/configure
-index 45cc7cb..7d7299a 100755
+index aa05d49..6dabd11 100755
 --- a/configure
 +++ b/configure
-@@ -4709,7 +4709,7 @@ else
+@@ -4486,7 +4486,7 @@ else
    # Found it, now check the version.
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5
  $as_echo_n "checking version of $LD... " >&6; }
@@ -27,10 +27,10 @@
      '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
      2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
 diff --git a/configure.ac b/configure.ac
-index 7e9383a..a467a69 100644
+index ee7a3f1..b4b95b9 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -941,7 +941,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
+@@ -948,7 +948,7 @@ AC_CHECK_PROG_VER(AS, $AS, --version,
  		  [2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
  		  AS=: critic_missing="$critic_missing as")
  AC_CHECK_PROG_VER(LD, $LD, --version,
@@ -40,5 +40,5 @@
  		  LD=: critic_missing="$critic_missing ld")
  
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
index c1fda9d..82fa100 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch
@@ -1,7 +1,7 @@
-From b55e49b199c46a278ab66b6b1e3eab483b913197 Mon Sep 17 00:00:00 2001
+From 10003d48f83f7a4f7fa562ed89af904a544b6323 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:27:10 +0000
-Subject: [PATCH 13/27] sysdeps/gnu/configure.ac: handle correctly
+Subject: [PATCH 13/24] sysdeps/gnu/configure.ac: handle correctly
  $libc_cv_rootsbindir
 
 Upstream-Status:Pending
@@ -14,7 +14,7 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure
-index 9239297..c5ed3ca 100644
+index 71243ad..f578187 100644
 --- a/sysdeps/gnu/configure
 +++ b/sysdeps/gnu/configure
 @@ -32,6 +32,6 @@ case "$prefix" in
@@ -38,5 +38,5 @@
    ;;
  esac
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
index 0ba5d2f..ea3e167 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0014-Add-unused-attribute.patch
@@ -1,7 +1,7 @@
-From 0229d6c9c0e7721773118d5ae1d172c269bc9826 Mon Sep 17 00:00:00 2001
+From cafa8a7ef830e02cdbf928471e06d11054946940 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:28:41 +0000
-Subject: [PATCH 14/27] Add unused attribute
+Subject: [PATCH 14/24] Add unused attribute
 
 Helps in avoiding gcc warning when header is is included in
 a source file which does not use both functions
@@ -30,5 +30,5 @@
  {
    int slash_count = 0;
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0015-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0015-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch
deleted file mode 100644
index 4b261ca..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0015-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From f058c884dd26d10c94550ca5252ed6576614d659 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 19 Feb 2015 03:23:45 +0000
-Subject: [PATCH 15/27] When disabling SSE also make sure that fpmath is not
- set to use SSE as well
-
-This fixes errors when we inject sse options through CFLAGS and now
-that we have -Werror turned on by default this warning turns to become
-error on x86
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- sysdeps/x86/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile
-index 19f5eca..827ea71 100644
---- a/sysdeps/x86/Makefile
-+++ b/sysdeps/x86/Makefile
-@@ -1,6 +1,6 @@
- ifeq ($(subdir),elf)
- CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
--		   -mno-sse -mno-mmx)
-+		   -mno-sse -mno-mmx -mfpmath=387)
- 
- tests-special += $(objpfx)tst-ld-sse-use.out
- $(objpfx)tst-ld-sse-use.out: ../sysdeps/x86/tst-ld-sse-use.sh $(objpfx)ld.so
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
new file mode 100644
index 0000000..90e12b8
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0015-yes-within-the-path-sets-wrong-config-variables.patch
@@ -0,0 +1,263 @@
+From 4d6bead19874e519752ceeb2a15897ff2ffbe5e8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:31:06 +0000
+Subject: [PATCH 15/24] 'yes' within the path sets wrong config variables
+
+It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
+but being such a short word to grep it is likely to produce
+false-positive matches with the path it is configured into.
+
+The change is to use a more elaborated string to grep for.
+
+Upstream-Status: Submitted [libc-alpha@sourceware.org]
+
+Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/aarch64/configure                              | 4 ++--
+ sysdeps/aarch64/configure.ac                           | 4 ++--
+ sysdeps/arm/configure                                  | 4 ++--
+ sysdeps/arm/configure.ac                               | 4 ++--
+ sysdeps/mips/configure                                 | 4 ++--
+ sysdeps/mips/configure.ac                              | 4 ++--
+ sysdeps/nios2/configure                                | 4 ++--
+ sysdeps/nios2/configure.ac                             | 4 ++--
+ sysdeps/unix/sysv/linux/mips/configure                 | 4 ++--
+ sysdeps/unix/sysv/linux/mips/configure.ac              | 4 ++--
+ sysdeps/unix/sysv/linux/powerpc/powerpc64/configure    | 8 ++++----
+ sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac | 8 ++++----
+ 12 files changed, 28 insertions(+), 28 deletions(-)
+
+diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
+index 5bd355a..3bc5537 100644
+--- a/sysdeps/aarch64/configure
++++ b/sysdeps/aarch64/configure
+@@ -148,12 +148,12 @@ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef __AARCH64EB__
+-                      yes
++                      is_aarch64_be
+                      #endif
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "yes" >/dev/null 2>&1; then :
++  $EGREP "is_aarch64_be" >/dev/null 2>&1; then :
+   libc_cv_aarch64_be=yes
+ else
+   libc_cv_aarch64_be=no
+diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
+index 7851dd4..6e92381 100644
+--- a/sysdeps/aarch64/configure.ac
++++ b/sysdeps/aarch64/configure.ac
+@@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+ # the dynamic linker via %ifdef.
+ AC_CACHE_CHECK([for big endian],
+   [libc_cv_aarch64_be],
+-  [AC_EGREP_CPP(yes,[#ifdef __AARCH64EB__
+-                      yes
++  [AC_EGREP_CPP(is_aarch64_be,[#ifdef __AARCH64EB__
++                      is_aarch64_be
+                      #endif
+   ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)])
+ if test $libc_cv_aarch64_be = yes; then
+diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure
+index 431e843..e152461 100644
+--- a/sysdeps/arm/configure
++++ b/sysdeps/arm/configure
+@@ -151,12 +151,12 @@ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef __ARM_PCS_VFP
+-		      yes
++		      use_arm_pcs_vfp
+ 		     #endif
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "yes" >/dev/null 2>&1; then :
++  $EGREP "use_arm_pcs_vfp" >/dev/null 2>&1; then :
+   libc_cv_arm_pcs_vfp=yes
+ else
+   libc_cv_arm_pcs_vfp=no
+diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac
+index 90cdd69..05a262b 100644
+--- a/sysdeps/arm/configure.ac
++++ b/sysdeps/arm/configure.ac
+@@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN)
+ # the dynamic linker via %ifdef.
+ AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI],
+   [libc_cv_arm_pcs_vfp],
+-  [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP
+-		      yes
++  [AC_EGREP_CPP(use_arm_pcs_vfp,[#ifdef __ARM_PCS_VFP
++		      use_arm_pcs_vfp
+ 		     #endif
+   ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
+ if test $libc_cv_arm_pcs_vfp = yes; then
+diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure
+index 4e13248..f14af95 100644
+--- a/sysdeps/mips/configure
++++ b/sysdeps/mips/configure
+@@ -143,11 +143,11 @@ else
+ /* end confdefs.h.  */
+ dnl
+ #ifdef __mips_nan2008
+-yes
++use_mips_nan2008
+ #endif
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "yes" >/dev/null 2>&1; then :
++  $EGREP "use_mips_nan2008" >/dev/null 2>&1; then :
+   libc_cv_mips_nan2008=yes
+ else
+   libc_cv_mips_nan2008=no
+diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac
+index bcbdaff..ad3057f 100644
+--- a/sysdeps/mips/configure.ac
++++ b/sysdeps/mips/configure.ac
+@@ -6,9 +6,9 @@ dnl position independent way.
+ dnl AC_DEFINE(PI_STATIC_AND_HIDDEN)
+ 
+ AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding],
+-  libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl
++  libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl
+ #ifdef __mips_nan2008
+-yes
++use_mips_nan2008
+ #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)])
+ if test x$libc_cv_mips_nan2008 = xyes; then
+   AC_DEFINE(HAVE_MIPS_NAN2008)
+diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure
+index 14c8a3a..dde3814 100644
+--- a/sysdeps/nios2/configure
++++ b/sysdeps/nios2/configure
+@@ -142,12 +142,12 @@ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef __nios2_big_endian__
+-                      yes
++                      is_nios2_be
+                      #endif
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "yes" >/dev/null 2>&1; then :
++  $EGREP "is_nios2_be" >/dev/null 2>&1; then :
+   libc_cv_nios2_be=yes
+ else
+   libc_cv_nios2_be=no
+diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac
+index f05f438..dc86399 100644
+--- a/sysdeps/nios2/configure.ac
++++ b/sysdeps/nios2/configure.ac
+@@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
+ # Nios II big endian is not yet supported.
+ AC_CACHE_CHECK([for big endian],
+   [libc_cv_nios2_be],
+-  [AC_EGREP_CPP(yes,[#ifdef __nios2_big_endian__
+-                      yes
++  [AC_EGREP_CPP(is_nios2_be,[#ifdef __nios2_big_endian__
++                      is_nios2_be
+                      #endif
+   ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)])
+ if test $libc_cv_nios2_be = yes; then
+diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
+index dee56aa..f2049ed 100644
+--- a/sysdeps/unix/sysv/linux/mips/configure
++++ b/sysdeps/unix/sysv/linux/mips/configure
+@@ -414,11 +414,11 @@ else
+ /* end confdefs.h.  */
+ dnl
+ #ifdef __mips_nan2008
+-yes
++use_mips_nan2008
+ #endif
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "yes" >/dev/null 2>&1; then :
++  $EGREP "use_mips_nan2008" >/dev/null 2>&1; then :
+   libc_cv_mips_nan2008=yes
+ else
+   libc_cv_mips_nan2008=no
+diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac
+index 45147c5..4224af1 100644
+--- a/sysdeps/unix/sysv/linux/mips/configure.ac
++++ b/sysdeps/unix/sysv/linux/mips/configure.ac
+@@ -105,9 +105,9 @@ AC_COMPILE_IFELSE(
+ LIBC_CONFIG_VAR([mips-mode-switch],[${libc_mips_mode_switch}])
+ 
+ AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding],
+-  libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl
++  libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl
+ #ifdef __mips_nan2008
+-yes
++use_mips_nan2008
+ #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)])
+ 
+ libc_mips_nan=
+diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+index af06970..27b8c1b 100644
+--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
+@@ -155,12 +155,12 @@ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #if _CALL_ELF == 2
+-                      yes
++                      use_ppc_elfv2_abi
+                      #endif
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "yes" >/dev/null 2>&1; then :
++  $EGREP "use_ppc_elfv2_abi" >/dev/null 2>&1; then :
+   libc_cv_ppc64_elfv2_abi=yes
+ else
+   libc_cv_ppc64_elfv2_abi=no
+@@ -188,12 +188,12 @@ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ #ifdef _CALL_ELF
+-                         yes
++                         is_def_call_elf
+                        #endif
+ 
+ _ACEOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  $EGREP "yes" >/dev/null 2>&1; then :
++  $EGREP "is_def_call_elf" >/dev/null 2>&1; then :
+   libc_cv_ppc64_def_call_elf=yes
+ else
+   libc_cv_ppc64_def_call_elf=no
+diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+index 0822915..9a32fdd 100644
+--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
++++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
+@@ -6,8 +6,8 @@ LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
+ # Define default-abi according to compiler flags.
+ AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI],
+   [libc_cv_ppc64_elfv2_abi],
+-  [AC_EGREP_CPP(yes,[#if _CALL_ELF == 2
+-                      yes
++  [AC_EGREP_CPP(use_ppc_elfv2_abi,[#if _CALL_ELF == 2
++                      use_ppc_elfv2_abi
+                      #endif
+   ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)])
+ if test $libc_cv_ppc64_elfv2_abi = yes; then
+@@ -19,8 +19,8 @@ else
+   # Compiler that do not support ELFv2 ABI does not define _CALL_ELF
+   AC_CACHE_CHECK([whether the compiler defines _CALL_ELF],
+     [libc_cv_ppc64_def_call_elf],
+-    [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF
+-                         yes
++    [AC_EGREP_CPP(is_def_call_elf,[#ifdef _CALL_ELF
++                         is_def_call_elf
+                        #endif
+     ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
+   if test $libc_cv_ppc64_def_call_elf = no; then
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
new file mode 100644
index 0000000..e51b611
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0016-timezone-re-written-tzselect-as-posix-sh.patch
@@ -0,0 +1,45 @@
+From 3e8586eb3509e2f0d6dfb74be8f89a30b06b56e9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:33:03 +0000
+Subject: [PATCH 16/24] timezone: re-written tzselect as posix sh
+
+To avoid the bash dependency.
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ timezone/Makefile     | 2 +-
+ timezone/tzselect.ksh | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/timezone/Makefile b/timezone/Makefile
+index 99566cb..b6e757e 100644
+--- a/timezone/Makefile
++++ b/timezone/Makefile
+@@ -122,7 +122,7 @@ $(testdata)/XT%: testdata/XT%
+ 	cp $< $@
+ 
+ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
+-	sed -e 's|/bin/bash|$(BASH)|' \
++	sed -e 's|/bin/bash|/bin/sh|' \
+ 	    -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
+ 	    -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
+ 	    -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
+diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
+index 9d70691..25f45a8 100755
+--- a/timezone/tzselect.ksh
++++ b/timezone/tzselect.ksh
+@@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org
+ 
+ # Specify default values for environment variables if they are unset.
+ : ${AWK=awk}
+-: ${TZDIR=`pwd`}
++: ${TZDIR=$(pwd)}
+ 
+ # Check for awk Posix compliance.
+ ($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0016-yes-within-the-path-sets-wrong-config-variables.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0016-yes-within-the-path-sets-wrong-config-variables.patch
deleted file mode 100644
index 089e8b1..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0016-yes-within-the-path-sets-wrong-config-variables.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-From 70199fe59c38b621ab4121d7a55719b2b29b36de Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:31:06 +0000
-Subject: [PATCH 16/27] 'yes' within the path sets wrong config variables
-
-It seems that the 'AC_EGREP_CPP(yes...' example is quite popular
-but being such a short word to grep it is likely to produce
-false-positive matches with the path it is configured into.
-
-The change is to use a more elaborated string to grep for.
-
-Upstream-Status: Submitted [libc-alpha@sourceware.org]
-
-Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sysdeps/aarch64/configure                              | 4 ++--
- sysdeps/aarch64/configure.ac                           | 4 ++--
- sysdeps/arm/configure                                  | 4 ++--
- sysdeps/arm/configure.ac                               | 4 ++--
- sysdeps/mips/configure                                 | 4 ++--
- sysdeps/mips/configure.ac                              | 4 ++--
- sysdeps/nios2/configure                                | 4 ++--
- sysdeps/nios2/configure.ac                             | 4 ++--
- sysdeps/unix/sysv/linux/mips/configure                 | 4 ++--
- sysdeps/unix/sysv/linux/mips/configure.ac              | 4 ++--
- sysdeps/unix/sysv/linux/powerpc/powerpc64/configure    | 8 ++++----
- sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac | 8 ++++----
- 12 files changed, 28 insertions(+), 28 deletions(-)
-
-diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
-index 5bd355a..3bc5537 100644
---- a/sysdeps/aarch64/configure
-+++ b/sysdeps/aarch64/configure
-@@ -148,12 +148,12 @@ else
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #ifdef __AARCH64EB__
--                      yes
-+                      is_aarch64_be
-                      #endif
- 
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
-+  $EGREP "is_aarch64_be" >/dev/null 2>&1; then :
-   libc_cv_aarch64_be=yes
- else
-   libc_cv_aarch64_be=no
-diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
-index 7851dd4..6e92381 100644
---- a/sysdeps/aarch64/configure.ac
-+++ b/sysdeps/aarch64/configure.ac
-@@ -10,8 +10,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
- # the dynamic linker via %ifdef.
- AC_CACHE_CHECK([for big endian],
-   [libc_cv_aarch64_be],
--  [AC_EGREP_CPP(yes,[#ifdef __AARCH64EB__
--                      yes
-+  [AC_EGREP_CPP(is_aarch64_be,[#ifdef __AARCH64EB__
-+                      is_aarch64_be
-                      #endif
-   ], libc_cv_aarch64_be=yes, libc_cv_aarch64_be=no)])
- if test $libc_cv_aarch64_be = yes; then
-diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure
-index 158116b..5eaf54e 100644
---- a/sysdeps/arm/configure
-+++ b/sysdeps/arm/configure
-@@ -151,12 +151,12 @@ else
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #ifdef __ARM_PCS_VFP
--		      yes
-+		      use_arm_pcs_vfp
- 		     #endif
- 
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
-+  $EGREP "use_arm_pcs_vfp" >/dev/null 2>&1; then :
-   libc_cv_arm_pcs_vfp=yes
- else
-   libc_cv_arm_pcs_vfp=no
-diff --git a/sysdeps/arm/configure.ac b/sysdeps/arm/configure.ac
-index 859c92a..2f4a6e2 100644
---- a/sysdeps/arm/configure.ac
-+++ b/sysdeps/arm/configure.ac
-@@ -15,8 +15,8 @@ AC_DEFINE(PI_STATIC_AND_HIDDEN)
- # the dynamic linker via %ifdef.
- AC_CACHE_CHECK([whether the compiler is using the ARM hard-float ABI],
-   [libc_cv_arm_pcs_vfp],
--  [AC_EGREP_CPP(yes,[#ifdef __ARM_PCS_VFP
--		      yes
-+  [AC_EGREP_CPP(use_arm_pcs_vfp,[#ifdef __ARM_PCS_VFP
-+		      use_arm_pcs_vfp
- 		     #endif
-   ], libc_cv_arm_pcs_vfp=yes, libc_cv_arm_pcs_vfp=no)])
- if test $libc_cv_arm_pcs_vfp = yes; then
-diff --git a/sysdeps/mips/configure b/sysdeps/mips/configure
-index 4e13248..f14af95 100644
---- a/sysdeps/mips/configure
-+++ b/sysdeps/mips/configure
-@@ -143,11 +143,11 @@ else
- /* end confdefs.h.  */
- dnl
- #ifdef __mips_nan2008
--yes
-+use_mips_nan2008
- #endif
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
-+  $EGREP "use_mips_nan2008" >/dev/null 2>&1; then :
-   libc_cv_mips_nan2008=yes
- else
-   libc_cv_mips_nan2008=no
-diff --git a/sysdeps/mips/configure.ac b/sysdeps/mips/configure.ac
-index bcbdaff..ad3057f 100644
---- a/sysdeps/mips/configure.ac
-+++ b/sysdeps/mips/configure.ac
-@@ -6,9 +6,9 @@ dnl position independent way.
- dnl AC_DEFINE(PI_STATIC_AND_HIDDEN)
- 
- AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding],
--  libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl
-+  libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl
- #ifdef __mips_nan2008
--yes
-+use_mips_nan2008
- #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)])
- if test x$libc_cv_mips_nan2008 = xyes; then
-   AC_DEFINE(HAVE_MIPS_NAN2008)
-diff --git a/sysdeps/nios2/configure b/sysdeps/nios2/configure
-index 14c8a3a..dde3814 100644
---- a/sysdeps/nios2/configure
-+++ b/sysdeps/nios2/configure
-@@ -142,12 +142,12 @@ else
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #ifdef __nios2_big_endian__
--                      yes
-+                      is_nios2_be
-                      #endif
- 
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
-+  $EGREP "is_nios2_be" >/dev/null 2>&1; then :
-   libc_cv_nios2_be=yes
- else
-   libc_cv_nios2_be=no
-diff --git a/sysdeps/nios2/configure.ac b/sysdeps/nios2/configure.ac
-index f05f438..dc86399 100644
---- a/sysdeps/nios2/configure.ac
-+++ b/sysdeps/nios2/configure.ac
-@@ -4,8 +4,8 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
- # Nios II big endian is not yet supported.
- AC_CACHE_CHECK([for big endian],
-   [libc_cv_nios2_be],
--  [AC_EGREP_CPP(yes,[#ifdef __nios2_big_endian__
--                      yes
-+  [AC_EGREP_CPP(is_nios2_be,[#ifdef __nios2_big_endian__
-+                      is_nios2_be
-                      #endif
-   ], libc_cv_nios2_be=yes, libc_cv_nios2_be=no)])
- if test $libc_cv_nios2_be = yes; then
-diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure
-index 83f8b13..2b6cbee 100644
---- a/sysdeps/unix/sysv/linux/mips/configure
-+++ b/sysdeps/unix/sysv/linux/mips/configure
-@@ -387,11 +387,11 @@ else
- /* end confdefs.h.  */
- dnl
- #ifdef __mips_nan2008
--yes
-+use_mips_nan2008
- #endif
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
-+  $EGREP "use_mips_nan2008" >/dev/null 2>&1; then :
-   libc_cv_mips_nan2008=yes
- else
-   libc_cv_mips_nan2008=no
-diff --git a/sysdeps/unix/sysv/linux/mips/configure.ac b/sysdeps/unix/sysv/linux/mips/configure.ac
-index 5039ec9..1035f76 100644
---- a/sysdeps/unix/sysv/linux/mips/configure.ac
-+++ b/sysdeps/unix/sysv/linux/mips/configure.ac
-@@ -98,9 +98,9 @@ AC_COMPILE_IFELSE(
- LIBC_CONFIG_VAR([mips-mode-switch],[${libc_mips_mode_switch}])
- 
- AC_CACHE_CHECK([whether the compiler is using the 2008 NaN encoding],
--  libc_cv_mips_nan2008, [AC_EGREP_CPP(yes, [dnl
-+  libc_cv_mips_nan2008, [AC_EGREP_CPP(use_mips_nan2008, [dnl
- #ifdef __mips_nan2008
--yes
-+use_mips_nan2008
- #endif], libc_cv_mips_nan2008=yes, libc_cv_mips_nan2008=no)])
- 
- libc_mips_nan=
-diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
-index 70bb18a..ffd9e3e 100644
---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
-+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure
-@@ -155,12 +155,12 @@ else
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #if _CALL_ELF == 2
--                      yes
-+                      use_ppc_elfv2_abi
-                      #endif
- 
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
-+  $EGREP "use_ppc_elfv2_abi" >/dev/null 2>&1; then :
-   libc_cv_ppc64_elfv2_abi=yes
- else
-   libc_cv_ppc64_elfv2_abi=no
-@@ -188,12 +188,12 @@ else
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #ifdef _CALL_ELF
--                         yes
-+                         is_def_call_elf
-                        #endif
- 
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
--  $EGREP "yes" >/dev/null 2>&1; then :
-+  $EGREP "is_def_call_elf" >/dev/null 2>&1; then :
-   libc_cv_ppc64_def_call_elf=yes
- else
-   libc_cv_ppc64_def_call_elf=no
-diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
-index 0822915..9a32fdd 100644
---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
-+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac
-@@ -6,8 +6,8 @@ LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
- # Define default-abi according to compiler flags.
- AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI],
-   [libc_cv_ppc64_elfv2_abi],
--  [AC_EGREP_CPP(yes,[#if _CALL_ELF == 2
--                      yes
-+  [AC_EGREP_CPP(use_ppc_elfv2_abi,[#if _CALL_ELF == 2
-+                      use_ppc_elfv2_abi
-                      #endif
-   ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)])
- if test $libc_cv_ppc64_elfv2_abi = yes; then
-@@ -19,8 +19,8 @@ else
-   # Compiler that do not support ELFv2 ABI does not define _CALL_ELF
-   AC_CACHE_CHECK([whether the compiler defines _CALL_ELF],
-     [libc_cv_ppc64_def_call_elf],
--    [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF
--                         yes
-+    [AC_EGREP_CPP(is_def_call_elf,[#ifdef _CALL_ELF
-+                         is_def_call_elf
-                        #endif
-     ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
-   if test $libc_cv_ppc64_def_call_elf = no; then
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
new file mode 100644
index 0000000..0c9ae6c
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0017-Remove-bash-dependency-for-nscd-init-script.patch
@@ -0,0 +1,73 @@
+From cd9d9fe7316f4ce4ca9d8e67e22f5718879535e4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 14:33:02 -0800
+Subject: [PATCH 17/24] Remove bash dependency for nscd init script
+
+The nscd init script uses #! /bin/bash but only really uses one bashism
+(translated strings), so remove them and switch the shell to #!/bin/sh.
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ nscd/nscd.init | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/nscd/nscd.init b/nscd/nscd.init
+index a882da7..b02986e 100644
+--- a/nscd/nscd.init
++++ b/nscd/nscd.init
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+ #
+ # nscd:		Starts the Name Switch Cache Daemon
+ #
+@@ -49,7 +49,7 @@ prog=nscd
+ start () {
+     [ -d /var/run/nscd ] || mkdir /var/run/nscd
+     [ -d /var/db/nscd ] || mkdir /var/db/nscd
+-    echo -n $"Starting $prog: "
++    echo -n "Starting $prog: "
+     daemon /usr/sbin/nscd
+     RETVAL=$?
+     echo
+@@ -58,7 +58,7 @@ start () {
+ }
+ 
+ stop () {
+-    echo -n $"Stopping $prog: "
++    echo -n "Stopping $prog: "
+     /usr/sbin/nscd -K
+     RETVAL=$?
+     if [ $RETVAL -eq 0 ]; then
+@@ -67,9 +67,9 @@ stop () {
+ 	# a non-privileged user
+ 	rm -f /var/run/nscd/nscd.pid
+ 	rm -f /var/run/nscd/socket
+-       	success $"$prog shutdown"
++	success "$prog shutdown"
+     else
+-       	failure $"$prog shutdown"
++	failure "$prog shutdown"
+     fi
+     echo
+     return $RETVAL
+@@ -103,13 +103,13 @@ case "$1" in
+ 	RETVAL=$?
+ 	;;
+     force-reload | reload)
+-    	echo -n $"Reloading $prog: "
++	echo -n "Reloading $prog: "
+ 	killproc /usr/sbin/nscd -HUP
+ 	RETVAL=$?
+ 	echo
+ 	;;
+     *)
+-	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
++	echo "Usage: $0 {start|stop|status|restart|reload|condrestart}"
+ 	RETVAL=1
+ 	;;
+ esac
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0017-timezone-re-written-tzselect-as-posix-sh.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0017-timezone-re-written-tzselect-as-posix-sh.patch
deleted file mode 100644
index 0ce8230..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0017-timezone-re-written-tzselect-as-posix-sh.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From c90306107fbbe2979012917e87747ce78c82ab88 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:33:03 +0000
-Subject: [PATCH 17/27] timezone: re-written tzselect as posix sh
-
-To avoid the bash dependency.
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- timezone/Makefile     | 2 +-
- timezone/tzselect.ksh | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/timezone/Makefile b/timezone/Makefile
-index 24c93c6..886b06e 100644
---- a/timezone/Makefile
-+++ b/timezone/Makefile
-@@ -126,7 +126,7 @@ $(testdata)/XT%: testdata/XT%
- 	cp $< $@
- 
- $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
--	sed -e 's|/bin/bash|$(BASH)|' \
-+	sed -e 's|/bin/bash|/bin/sh|' \
- 	    -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
- 	    -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
- 	    -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
-diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
-index 9d70691..25f45a8 100755
---- a/timezone/tzselect.ksh
-+++ b/timezone/tzselect.ksh
-@@ -35,7 +35,7 @@ REPORT_BUGS_TO=tz@iana.org
- 
- # Specify default values for environment variables if they are unset.
- : ${AWK=awk}
--: ${TZDIR=`pwd`}
-+: ${TZDIR=$(pwd)}
- 
- # Check for awk Posix compliance.
- ($AWK -v x=y 'BEGIN { exit 123 }') </dev/null >/dev/null 2>&1
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
index 8eacbc0..e282e60 100644
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0018-eglibc-Cross-building-and-testing-instructions.patch
@@ -1,7 +1,7 @@
-From eff048074ac7b5258bb615e5a5b221daa19b18ae Mon Sep 17 00:00:00 2001
+From 8f554f4a1beb39182aad9cd9b5e1da69464dff7e Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 18 Mar 2015 00:42:58 +0000
-Subject: [PATCH 18/27] eglibc: Cross building and testing instructions
+Subject: [PATCH 18/24] eglibc: Cross building and testing instructions
 
 Ported from eglibc
 Upstream-Status: Pending
@@ -615,5 +615,5 @@
 +  simply place copies of these libraries in the top GLIBC build
 +  directory.
 -- 
-2.1.4
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch
deleted file mode 100644
index dcb80f9..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch
+++ /dev/null
@@ -1,1436 +0,0 @@
-From aa7c5fe86d04584a9aed4dc40ba856c65a1ef9c4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:45:18 +0000
-Subject: [PATCH 19/27] eglibc: Bring Eglibc option group infrastructure to
- glibc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- EGLIBC.option-groups              | 122 ++++++
- Makefile                          |   1 +
- config.make.in                    |   2 +
- configure                         |  13 +
- configure.ac                      |  10 +
- option-groups.def                 | 868 ++++++++++++++++++++++++++++++++++++++
- option-groups.defaults            |  47 +++
- option-groups.mak                 |  41 ++
- options-config/Makefile           |  55 +++
- options-config/config-postproc.pl |  58 +++
- options-config/config-preproc.pl  |   8 +
- scripts/option-groups.awk         |  63 +++
- 12 files changed, 1288 insertions(+)
- create mode 100644 EGLIBC.option-groups
- create mode 100644 option-groups.def
- create mode 100644 option-groups.defaults
- create mode 100644 option-groups.mak
- create mode 100644 options-config/Makefile
- create mode 100644 options-config/config-postproc.pl
- create mode 100644 options-config/config-preproc.pl
- create mode 100644 scripts/option-groups.awk
-
-diff --git a/EGLIBC.option-groups b/EGLIBC.option-groups
-new file mode 100644
-index 0000000..6a50b8d
---- /dev/null
-+++ b/EGLIBC.option-groups
-@@ -0,0 +1,122 @@
-+                                                        -*- mode: text -*-
-+
-+              The EGLIBC Component Configuration System
-+                  Jim Blandy <jimb@codesourcery.com>
-+
-+Introduction
-+
-+The GNU C library (GLIBC) provides a broad range of functionality,
-+ranging from internationalization support to transcendental
-+mathematical functions.  Its website boasts that "nearly all known and
-+useful functions from any other C library are available."  This
-+exhaustive approach has been one of GLIBC's strengths on desktop and
-+server systems, but it has also given GLIBC a large footprint, both in
-+memory and on disk, making it a challenge to use in embedded systems
-+with limited resources.
-+
-+The Embedded GNU C library (EGLIBC) is a variant of the GNU C library
-+designed to work well on embedded systems.  In particular, EGLIBC's
-+component configuration system allows embedded developers to build
-+customized versions of the library that include only the features
-+their application uses, reducing its space requirements.
-+
-+EGLIBC's component configuration system categorizes the library's
-+functions into "option groups", and allows you to include or exclude
-+option groups individually.  Some option groups depend on others;
-+EGLIBC tracks these relationships, and ensures that the selected
-+configuration yields a functioning library.
-+
-+
-+Consistent and Predictable Behavior
-+
-+A flexible configuration system is a mixed blessing: if the options
-+offered are poorly designed, it can be hard to see which choices will
-+have the desired effects, and choices with obscure consequences can
-+make debugging difficult.  EGLIBC's configuration follows some general
-+principles to reduce these risks:
-+
-+- EGLIBC has a single default configuration for each target
-+  architecture.
-+
-+- In the default configuration, all option groups are enabled, and
-+  EGLIBC is upwardly API- and ABI-compatible with GLIBC.
-+
-+- As much as possible, configurations only affect what functions are
-+  present, not how they behave.  If the system works with an option
-+  group disabled, it will still work with it enabled.
-+
-+- As much as possible, configurations only select option groups ---
-+  they do not describe characteristics of the target architecture.
-+
-+These rules mean that you have a simple debugging strategy available
-+if you suspect that your EGLIBC configuration might be the source of a
-+problem: fall back to the default configuration, re-test, and then
-+disable option groups one by one, until the problem reappears.
-+
-+
-+The Option Groups
-+
-+To see the current full list of implemented option groups, refer to the
-+file 'option-groups.def' at the top of the source tree, or run
-+'make menuconfig' from the top-level build directory.
-+
-+The POSIX.1-2001 specification includes a suggested partition of all
-+the functions in the POSIX C API into option groups: math functions
-+like 'sin' and 'cos'; networking functions like 'socket' and
-+'connect'; and so on.  EGLIBC could use this partitioning as the basis
-+for future option groups.
-+
-+
-+Implementation
-+
-+The EGLIBC component configuration system resembles the approach used
-+by the Linux kernel to select device drivers, network protocols, and
-+other features.  A file named 'option-groups.config' in the top-level
-+build directory contains assignments to Make variables, each of which
-+enables or disables a particular option group.  If the variable's
-+value is set to 'y', then the option group is enabled; if it set to
-+anything else, the option group is omitted.  The file
-+'option-groups.defaults', at the top of the source tree, establishes
-+default values for all variables; all option groups are enabled by
-+default.
-+
-+For example, the following 'option-groups.config' would omit locale
-+data, but include mathematical functions, and everything else:
-+
-+   OPTION_EGLIBC_LOCALES = n
-+   OPTION_EGLIBC_LIBM = y
-+
-+Like the Linux kernel, EGLIBC supports a similar set of '*config' make
-+targets to make it easier to create 'option-groups.config', with all
-+dependencies between option groups automatically satisfied.  Run
-+'make help' to see the list of supported make config targets.  For
-+example, 'make menuconfig' will update the current config utilising a
-+menu based program.
-+
-+The option group names and their type (boolean, int, hex, string), help
-+description, and dependencies with other option groups, are described by
-+'option-groups.def' at the top of the source tree, analogous to the
-+'Kconfig' files in the Linux kernel.
-+
-+In general, each option group variable controls whether a given set of
-+object files in EGLIBC is compiled and included in the final
-+libraries, or omitted from the build.
-+
-+Each subdirectory's Makefile categorizes its routines, libraries, and
-+executables by option group.  For example, EGLIBC's 'math/Makefile'
-+places the 'libm' library in the OPTION_EGLIBC_LIBM group as follows:
-+
-+   extra-libs-$(OPTION_EGLIBC_LIBM) := libm
-+
-+Finally, common code in 'Makerules' cites the value of the variable
-+'extra-libs-y', selecting only those libraries that belong to enabled
-+option groups to be built.
-+
-+
-+Current Status and Future Directions
-+
-+The EGLIBC component configuration system described here is still
-+under development.
-+
-+We have used the system to subset some portions of EGLIBC's
-+Index: libc/configure.ac
-diff --git a/Makefile b/Makefile
-index 658ccfa..f906391 100644
---- a/Makefile
-+++ b/Makefile
-@@ -24,6 +24,7 @@ endif
- 
- include Makeconfig
- 
-+include options-config/Makefile
- 
- # This is the default target; it makes everything except the tests.
- .PHONY: all
-diff --git a/config.make.in b/config.make.in
-index a9f5696..294f8d1 100644
---- a/config.make.in
-+++ b/config.make.in
-@@ -47,6 +47,8 @@ c++-sysincludes = @CXX_SYSINCLUDES@
- all-warnings = @all_warnings@
- enable-werror = @enable_werror@
- 
-+kconfig_tools = @KCONFIG_TOOLS@
-+
- have-z-combreloc = @libc_cv_z_combreloc@
- have-z-execstack = @libc_cv_z_execstack@
- have-Bgroup = @libc_cv_Bgroup@
-diff --git a/configure b/configure
-index 7d7299a..4116404 100755
---- a/configure
-+++ b/configure
-@@ -641,6 +641,7 @@ INSTALL_INFO
- PERL
- BASH_SHELL
- libc_cv_gcc_static_libgcc
-+KCONFIG_TOOLS
- CXX_SYSINCLUDES
- SYSINCLUDES
- AUTOCONF
-@@ -755,6 +756,7 @@ with_fp
- with_binutils
- with_selinux
- with_headers
-+with_kconfig
- with_default_link
- enable_sanity_checks
- enable_shared
-@@ -1459,6 +1461,9 @@ Optional Packages:
-   --with-selinux          if building with SELinux support
-   --with-headers=PATH     location of system headers to use (for example
-                           /usr/src/linux/include) [default=compiler default]
-+  --with-kconfig=PATH     location of kconfig tools to use (from Linux kernel
-+                          builds) to re-use for configuring EGLIBC option
-+                          groups
-   --with-default-link     do not use explicit linker scripts
-   --with-cpu=CPU          select code for CPU variant
- 
-@@ -3517,6 +3522,14 @@ fi
- 
- 
- 
-+# Check whether --with-kconfig was given.
-+if test "${with_kconfig+set}" = set; then
-+  withval=$with_kconfig; KCONFIG_TOOLS=$withval
-+else
-+  KCONFIG_TOOLS=''
-+fi
-+
-+
- 
- # Check whether --with-default-link was given.
- if test "${with_default_link+set}" = set; then :
-diff --git a/configure.ac b/configure.ac
-index a467a69..fc0ed4d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -136,6 +136,16 @@ AC_ARG_WITH([headers],
- 	    [sysheaders=''])
- AC_SUBST(sysheaders)
- 
-+AC_ARG_WITH([kconfig],
-+	    AC_HELP_STRING([--with-kconfig=PATH],
-+			   [location of kconfig tools to use (from Linux
-+			    kernel builds) to re-use for configuring EGLIBC
-+			    option groups]),
-+	    [KCONFIG_TOOLS=$withval],
-+	    [KCONFIG_TOOLS=''])
-+AC_SUBST(KCONFIG_TOOLS)
-+
-+
- AC_SUBST(use_default_link)
- AC_ARG_WITH([default-link],
- 	    AC_HELP_STRING([--with-default-link],
-diff --git a/option-groups.def b/option-groups.def
-new file mode 100644
-index 0000000..6aebd94
---- /dev/null
-+++ b/option-groups.def
-@@ -0,0 +1,868 @@
-+# This file documents the option groups EGLIBC currently supports, in
-+# a format akin to the Linux Kconfig system's.  The syntax may change
-+# over time.
-+#
-+# An entry of the form:
-+#
-+#   config GROUP_NAME
-+#       bool "one-line explanation of what this option group controls"
-+#       help
-+#           Multi-line help explaining the option group's meaning in
-+#           some detail, terminated by indentation level.
-+#
-+# defines an option group whose variable is GROUP_NAME, with
-+# meaningful values 'y' (enabled) and 'n' (disabled).  The
-+# documentation is formatted to be consumed by some sort of
-+# interactive configuration interface, but EGLIBC doesn't have such an
-+# interface yet.
-+#
-+# An option may have a 'depends on' line, indicating which other options
-+# must also be enabled if this option is.  At present, EGLIBC doesn't
-+# check that these dependencies are satisfied.
-+#
-+# Option group variables get their default values from the file
-+# 'option-groups.defaults', in the top directory of the EGLIBC source
-+# tree.  By default, all EGLIBC option groups are enabled --- their
-+# variables are set to 'y'.
-+#
-+# After including 'option-groups.defaults', the EGLIBC make machinery
-+# includes the file 'option-groups.config' from the top of the build
-+# tree, if it is present.  Developers can place assignments to option
-+# group variables in that file to override the defaults.  For example,
-+# to disable an option group, place a line of the form:
-+#
-+#    OPTION_GROUP_NAME = n
-+#
-+# in 'option-groups.config' at the top of your build tree.  To
-+# explicitly enable an option group, you may also write:
-+#
-+#    OPTION_GROUP_NAME = y
-+#
-+# although this simply reestablishes the value already set by
-+# 'option-groups.defaults'.
-+
-+config EGLIBC_ADVANCED_INET6
-+   bool "IPv6 Advanced Sockets API support (RFC3542)"
-+   depends on EGLIBC_INET
-+   help
-+       This option group includes the functions specified by RFC 3542,
-+       "Advanced Sockets Application Program Interface (API) for
-+       IPv6".
-+
-+       This option group includes the following functions:
-+
-+         inet6_opt_append
-+         inet6_opt_find
-+         inet6_opt_finish
-+         inet6_opt_get_val
-+         inet6_opt_init
-+         inet6_option_alloc
-+         inet6_option_append
-+         inet6_option_find
-+         inet6_option_init
-+         inet6_option_next
-+         inet6_option_space
-+         inet6_opt_next
-+         inet6_opt_set_val
-+         inet6_rth_add
-+         inet6_rth_getaddr
-+         inet6_rth_init
-+         inet6_rth_reverse
-+         inet6_rth_segments
-+         inet6_rth_space
-+
-+config EGLIBC_BACKTRACE
-+   bool "Functions for producing backtraces"
-+   help
-+       This option group includes functions for producing a list of
-+       the function calls that are currently active in a thread, from
-+       within the thread itself.  These functions are often used
-+       within signal handlers, to produce diagnostic output.
-+
-+       This option group includes the following functions:
-+
-+         backtrace
-+         backtrace_symbols
-+         backtrace_symbols_fd
-+
-+config EGLIBC_BIG_MACROS
-+   bool "Use extensive inline code"
-+   help
-+       This option group specifies whether certain pieces of code
-+       should be inlined to achieve maximum speed.  If this option
-+       group is not selected, function calls will be used instead,
-+       hence reducing the library footprint.
-+
-+config EGLIBC_BSD
-+   bool "BSD-specific functions, and their compatibility stubs"
-+   help
-+       This option group includes functions specific to BSD kernels.
-+       A number of these functions have stub versions that are also
-+       included in libraries built for non-BSD systems for
-+       compatibility.
-+
-+       This option group includes the following functions:
-+
-+         chflags
-+         fchflags
-+         lchmod
-+         revoke
-+         setlogin
-+
-+config EGLIBC_CXX_TESTS
-+   bool "Tests that link against the standard C++ library."
-+   depends on POSIX_WIDE_CHAR_DEVICE_IO && EGLIBC_LIBM
-+   help
-+       This option group does not include any C library functions;
-+       instead, it controls which EGLIBC tests an ordinary 'make
-+       tests' runs.  With this group disabled, tests that would
-+       normally link against the standard C++ library are not
-+       run.
-+
-+       The standard C++ library depends on the math library 'libm' and
-+       the wide character I/O functions included in EGLIBC.  So those
-+       option groups must be enabled if this test is enabled.
-+
-+config EGLIBC_CATGETS
-+   bool "Functions for accessing message catalogs"
-+   depends on EGLIBC_LOCALE_CODE
-+   help
-+       This option group includes functions for accessing message
-+       catalogs: catopen, catclose, and catgets.
-+
-+       This option group depends on the EGLIBC_LOCALE_CODE
-+       option group.
-+
-+config EGLIBC_CHARSETS
-+   bool "iconv/gconv character set conversion libraries"
-+   help
-+       This option group includes support for character sets other
-+       than ASCII (ANSI_X3.4-1968) and Unicode and ISO-10646 in their
-+       various encodings.  This affects both the character sets
-+       supported by the wide and multibyte character functions, and
-+       those supported by the 'iconv' functions.
-+
-+       With this option group disabled, EGLIBC supports only the
-+       following character sets:
-+
-+          ANSI_X3.4         - ASCII
-+          ANSI_X3.4-1968
-+          ANSI_X3.4-1986
-+          ASCII
-+          CP367
-+          CSASCII
-+          IBM367
-+          ISO-IR-6
-+          ISO646-US
-+          ISO_646.IRV:1991
-+          OSF00010020
-+          US
-+          US-ASCII
-+
-+          10646-1:1993      - ISO 10646, in big-endian UCS4 form
-+          10646-1:1993/UCS4
-+          CSUCS4
-+          ISO-10646
-+          ISO-10646/UCS4
-+          OSF00010104
-+          OSF00010105
-+          OSF00010106
-+          UCS-4
-+          UCS-4BE
-+          UCS4
-+
-+          UCS-4LE           - ISO 10646, in little-endian UCS4 form
-+
-+          ISO-10646/UTF-8   - ISO 10646, in UTF-8 form
-+          ISO-10646/UTF8
-+          ISO-IR-193
-+          OSF05010001
-+          UTF-8
-+          UTF8
-+
-+          ISO-10646/UCS2    - ISO 10646, in target-endian UCS2 form
-+          OSF00010100
-+          OSF00010101
-+          OSF00010102
-+          UCS-2
-+          UCS2
-+
-+          UCS-2BE           - ISO 10646, in big-endian UCS2 form
-+          UNICODEBIG
-+
-+          UCS-2LE           - ISO 10646, in little-endian UCS2 form
-+          UNICODELITTLE
-+
-+          WCHAR_T           - EGLIBC's internal form (target-endian,
-+                              32-bit ISO 10646)
-+
-+config EGLIBC_CRYPT
-+   bool "Encryption library"
-+   help
-+       This option group includes the `libcrypt' library which
-+       provides functions for one-way encryption.  Supported
-+       encryption algorithms include MD5, SHA-256, SHA-512 and DES.
-+
-+config EGLIBC_CRYPT_UFC
-+   bool "Ultra fast `crypt' implementation"
-+   depends on EGLIBC_CRYPT
-+   help
-+       This option group provides ultra fast DES-based implementation of
-+       the `crypt' function.  When this option group is disabled,
-+       (a) the library will not provide the setkey[_r] and encrypt[_r]
-+       functions and (b) the crypt[_r] function will return NULL and set the
-+       errno to ENOSYS if /salt/ passed does not correspond to either MD5,
-+       SHA-256 or SHA-512 algorithm.
-+
-+config EGLIBC_DB_ALIASES
-+   bool "Functions for accessing the mail aliases database"
-+   help
-+       This option group includues functions for looking up mail
-+       aliases in '/etc/aliases' or using nsswitch.  It includes the
-+       following functions:
-+
-+         endaliasent
-+         getaliasbyname
-+         getaliasbyname_r
-+         getaliasent
-+         getaliasent_r
-+         setaliasent
-+
-+       When this option group is disabled, the NSS service libraries
-+       also lack support for querying their mail alias tables.
-+
-+config EGLIBC_ENVZ
-+   bool "Functions for handling envz-style environment vectors."
-+   help
-+       This option group contains functions for creating and operating
-+       on envz vectors.  An "envz vector" is a vector of strings in a
-+       contiguous block of memory, where each element is a name-value
-+       pair, and elements are separated from their neighbors by null
-+       characters.
-+
-+       This option group includes the following functions:
-+
-+        envz_add        envz_merge
-+        envz_entry      envz_remove
-+        envz_get        envz_strip
-+
-+config EGLIBC_FCVT
-+   bool "Functions for converting floating-point numbers to strings"
-+   help
-+       This option group includes functions for converting
-+       floating-point numbers to strings.
-+
-+       This option group includes the following functions:
-+
-+         ecvt           qecvt
-+	 ecvt_r		qecvt_r
-+         fcvt		qfcvt
-+	 fcvt_r		qfcvt_r
-+         gcvt		qgcvt
-+
-+config EGLIBC_FMTMSG
-+   bool "Functions for formatting messages"
-+   help
-+       This option group includes the following functions:
-+
-+         addseverity    fmtmsg
-+
-+config EGLIBC_FSTAB
-+   bool "Access functions for 'fstab'"
-+   help
-+       This option group includes functions for reading the mount
-+       point specification table, '/etc/fstab'.  These functions are
-+       not included in the POSIX standard, which provides the
-+       'getmntent' family of functions instead.
-+
-+       This option group includes the following functions:
-+
-+         endfsent       getfsspec
-+         getfsent       setfsent
-+         getfsfile
-+
-+config EGLIBC_FTRAVERSE
-+   bool "Functions for traversing file hierarchies"
-+   help
-+       This option group includes functions for traversing file
-+       UNIX file hierachies.
-+
-+       This option group includes the following functions:
-+
-+         fts_open       ftw
-+	 fts_read	nftw
-+         fts_children	ftw64
-+	 fts_set	nftw64
-+         fts_close
-+
-+config EGLIBC_GETLOGIN
-+   bool "The getlogin function"
-+   depends on EGLIBC_UTMP
-+   help
-+       This function group includes the 'getlogin' and 'getlogin_r'
-+       functions, which return the user name associated by the login
-+       activity with the current process's controlling terminal.
-+
-+       With this option group disabled, the 'glob' function will not
-+       fall back on 'getlogin' to find the user's login name for tilde
-+       expansion when the 'HOME' environment variable is not set.
-+
-+config EGLIBC_IDN
-+   bool "International domain names support"
-+   help
-+       This option group includes the `libcidn' library which
-+       provides support for international domain names.
-+
-+config EGLIBC_INET
-+   bool "Networking support"
-+   help
-+       This option group includes networking-specific functions and
-+       data.  With EGLIBC_INET disabled, the EGLIBC
-+       installation and API changes as follows:
-+
-+       - The following libraries are not installed:
-+
-+         libnsl
-+         libnss_compat
-+         libnss_dns
-+         libnss_hesiod
-+         libnss_nis
-+         libnss_nisplus
-+         libresolv
-+
-+       - The following functions and variables are omitted from libc:
-+
-+         authdes_create           hstrerror              svc_fdset
-+         authdes_getucred         htonl                  svc_getreq
-+         authdes_pk_create        htons                  svc_getreq_common
-+         authnone_create          if_freenameindex       svc_getreq_poll
-+         authunix_create          if_indextoname         svc_getreqset
-+         authunix_create_default  if_nameindex           svc_max_pollfd
-+         bindresvport             if_nametoindex         svc_pollfd
-+         callrpc                  in6addr_any            svcraw_create
-+         cbc_crypt                in6addr_loopback       svc_register
-+         clnt_broadcast           inet6_opt_append       svc_run
-+         clnt_create              inet6_opt_find         svc_sendreply
-+         clnt_pcreateerror        inet6_opt_finish       svctcp_create
-+         clnt_perrno              inet6_opt_get_val      svcudp_bufcreate
-+         clnt_perror              inet6_opt_init         svcudp_create
-+         clntraw_create           inet6_option_alloc     svcudp_enablecache
-+         clnt_spcreateerror       inet6_option_append    svcunix_create
-+         clnt_sperrno             inet6_option_find      svcunixfd_create
-+         clnt_sperror             inet6_option_init      svc_unregister
-+         clnttcp_create           inet6_option_next      user2netname
-+         clntudp_bufcreate        inet6_option_space     xdecrypt
-+         clntudp_create           inet6_opt_next         xdr_accepted_reply
-+         clntunix_create          inet6_opt_set_val      xdr_array
-+         des_setparity            inet6_rth_add          xdr_authdes_cred
-+         ecb_crypt                inet6_rth_getaddr      xdr_authdes_verf
-+         endaliasent              inet6_rth_init         xdr_authunix_parms
-+         endhostent               inet6_rth_reverse      xdr_bool
-+         endnetent                inet6_rth_segments     xdr_bytes
-+         endnetgrent              inet6_rth_space        xdr_callhdr
-+         endprotoent              inet_addr              xdr_callmsg
-+         endrpcent                inet_aton              xdr_char
-+         endservent               inet_lnaof             xdr_cryptkeyarg
-+         ether_aton               inet_makeaddr          xdr_cryptkeyarg2
-+         ether_aton_r             inet_netof             xdr_cryptkeyres
-+         ether_hostton            inet_network           xdr_des_block
-+         ether_line               inet_nsap_addr         xdr_double
-+         ether_ntoa               inet_nsap_ntoa         xdr_enum
-+         ether_ntoa_r             inet_ntoa              xdr_float
-+         ether_ntohost            inet_ntop              xdr_free
-+         freeaddrinfo             inet_pton              xdr_getcredres
-+         freeifaddrs              innetgr                xdr_hyper
-+         gai_strerror             iruserok               xdr_int
-+         getaddrinfo              iruserok_af            xdr_int16_t
-+         getaliasbyname           key_decryptsession     xdr_int32_t
-+         getaliasbyname_r         key_decryptsession_pk  xdr_int64_t
-+         getaliasent              key_encryptsession     xdr_int8_t
-+         getaliasent_r            key_encryptsession_pk  xdr_keybuf
-+         gethostbyaddr            key_gendes             xdr_key_netstarg
-+         gethostbyaddr_r          key_get_conv           xdr_key_netstres
-+         gethostbyname            key_secretkey_is_set   xdr_keystatus
-+         gethostbyname2           key_setnet             xdr_long
-+         gethostbyname2_r         key_setsecret          xdr_longlong_t
-+         gethostbyname_r          netname2host           xdrmem_create
-+         gethostent               netname2user           xdr_netnamestr
-+         gethostent_r             ntohl                  xdr_netobj
-+         getifaddrs               ntohs                  xdr_opaque
-+         getipv4sourcefilter      passwd2des             xdr_opaque_auth
-+         get_myaddress            pmap_getmaps           xdr_pmap
-+         getnameinfo              pmap_getport           xdr_pmaplist
-+         getnetbyaddr             pmap_rmtcall           xdr_pointer
-+         getnetbyaddr_r           pmap_set               xdr_quad_t
-+         getnetbyname             pmap_unset             xdrrec_create
-+         getnetbyname_r           rcmd                   xdrrec_endofrecord
-+         getnetent                rcmd_af                xdrrec_eof
-+         getnetent_r              registerrpc            xdrrec_skiprecord
-+         getnetgrent              res_init               xdr_reference
-+         getnetgrent_r            rexec                  xdr_rejected_reply
-+         getnetname               rexec_af               xdr_replymsg
-+         getprotobyname           rexecoptions           xdr_rmtcall_args
-+         getprotobyname_r         rpc_createerr          xdr_rmtcallres
-+         getprotobynumber         rresvport              xdr_short
-+         getprotobynumber_r       rresvport_af           xdr_sizeof
-+         getprotoent              rtime                  xdrstdio_create
-+         getprotoent_r            ruserok                xdr_string
-+         getpublickey             ruserok_af             xdr_u_char
-+         getrpcbyname             ruserpass              xdr_u_hyper
-+         getrpcbyname_r           setaliasent            xdr_u_int
-+         getrpcbynumber           sethostent             xdr_uint16_t
-+         getrpcbynumber_r         setipv4sourcefilter    xdr_uint32_t
-+         getrpcent                setnetent              xdr_uint64_t
-+         getrpcent_r              setnetgrent            xdr_uint8_t
-+         getrpcport               setprotoent            xdr_u_long
-+         getsecretkey             setrpcent              xdr_u_longlong_t
-+         getservbyname            setservent             xdr_union
-+         getservbyname_r          setsourcefilter        xdr_unixcred
-+         getservbyport            svcauthdes_stats       xdr_u_quad_t
-+         getservbyport_r          svcerr_auth            xdr_u_short
-+         getservent               svcerr_decode          xdr_vector
-+         getservent_r             svcerr_noproc          xdr_void
-+         getsourcefilter          svcerr_noprog          xdr_wrapstring
-+         h_errlist                svcerr_progvers        xencrypt
-+         h_errno                  svcerr_systemerr       xprt_register
-+         herror                   svcerr_weakauth        xprt_unregister
-+         h_nerr                   svc_exit
-+         host2netname             svcfd_create
-+
-+       - The rpcgen, nscd, and rpcinfo commands are not installed.
-+
-+       - The 'rpc' file (a text file listing RPC services) is not installed.
-+
-+       Socket-related system calls do not fall in this option group,
-+       because many are also used for other inter-process
-+       communication mechanisms.  For example, the 'syslog' routines
-+       use Unix-domain sockets to communicate with the syslog daemon;
-+       syslog is valuable in non-networked contexts.
-+
-+config EGLIBC_INET_ANL
-+   bool "Asynchronous name lookup"
-+   depends on EGLIBC_INET
-+   help
-+       This option group includes the `libanl' library which
-+       provides support for asynchronous name lookup.
-+
-+config EGLIBC_LIBM
-+   bool "libm (math library)"
-+   help
-+       This option group includes the 'libm' library, containing
-+       mathematical functions.  If this option group is omitted, then
-+       an EGLIBC installation does not include shared or unshared versions
-+       of the math library.
-+
-+       Note that this does not remove all floating-point related
-+       functionality from EGLIBC; for example, 'printf' and 'scanf'
-+       can still print and read floating-point values with this option
-+       group disabled.
-+
-+       Note that the ISO Standard C++ library 'libstdc++' depends on
-+       EGLIBC's math library 'libm'.  If you disable this option
-+       group, you will not be able to build 'libstdc++' against the
-+       resulting EGLIBC installation.
-+
-+config EGLIBC_LOCALES
-+   bool "Locale definitions"
-+   help
-+       This option group includes all locale definitions other than
-+       that for the "C" locale.  If this option group is omitted, then
-+       only the "C" locale is supported.
-+
-+
-+config EGLIBC_LOCALE_CODE
-+   bool "Locale functions"
-+   depends on POSIX_C_LANG_WIDE_CHAR
-+   help
-+       This option group includes locale support functions, programs,
-+       and libraries.  With EGLIBC_LOCALE_CODE disabled,
-+       EGLIBC supports only the 'C' locale (also known as 'POSIX'),
-+       and ignores the settings of the 'LANG' and 'LC_*' environment
-+       variables.
-+
-+       With EGLIBC_LOCALE_CODE disabled, the following
-+       functions are omitted from libc:
-+
-+         duplocale   localeconv  nl_langinfo    rpmatch  strfmon_l
-+         freelocale  newlocale   nl_langinfo_l  strfmon  uselocale
-+
-+       Furthermore, only the LC_CTYPE and LC_TIME categories of the
-+       standard "C" locale are available.
-+
-+       The EGLIBC_CATGETS option group depends on this option group.
-+
-+
-+config EGLIBC_MEMUSAGE
-+   bool "Memory profiling library"
-+   help
-+       This option group includes the `libmemusage' library and
-+       the `memusage' and `memusagestat' utilities.
-+       These components provide memory profiling functions.
-+
-+config EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
-+   int "Memory profiling library buffer size"
-+   depends on EGLIBC_MEMUSAGE
-+   default "32768"
-+   help
-+       Libmemusage library buffers the profiling data in memory
-+       before writing it out to disk.  By default, the library
-+       allocates 1.5M buffer, which can be substantial for some
-+       systems.  EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE option
-+       allows to change the default buffer size.  It specifies
-+       the number of entries the buffer should have.
-+       On most architectures one buffer entry amounts to 48 bytes,
-+       so setting this option to the value of 512 will reduce the size of
-+       the memory buffer to 24K.
-+
-+config EGLIBC_NIS
-+   bool "Support for NIS, NIS+, and the special 'compat' services."
-+   depends on EGLIBC_INET && EGLIBC_SUNRPC
-+   help
-+       This option group includes the NIS, NIS+, and 'compat' Name
-+       Service Switch service libraries.  When it is disabled, those
-+       services libraries are not installed; you should remove any
-+       references to them from your 'nsswitch.conf' file.
-+
-+       This option group depends on the EGLIBC_INET option
-+       group; you must enable that to enable this option group.
-+
-+config EGLIBC_NSSWITCH
-+   bool "Name service switch (nsswitch) support"
-+   help
-+       This option group includes support for the 'nsswitch' facility.
-+       With this option group enabled, all EGLIBC functions for
-+       accessing various system databases (passwords and groups;
-+       networking; aliases; public keys; and so on) consult the
-+       '/etc/nsswitch.conf' configuration file to decide how to handle
-+       queries.
-+
-+       With this option group disabled, EGLIBC uses a fixed list of
-+       services to satisfy queries on each database, as requested by
-+       configuration files specified when EGLIBC is built.  Your
-+       'option-groups.config' file must set the following two
-+       variables:
-+
-+config EGLIBC_NSSWITCH_FIXED_CONFIG
-+   string "Nsswitch fixed config filename"
-+   depends on !EGLIBC_NSSWITCH
-+   default ""
-+   help
-+          Set this to the name of a file whose contents observe the
-+          same syntax as an ordinary '/etc/nsswitch.conf' file.  The
-+          EGLIBC build process parses this file just as EGLIBC would
-+          at run time if EGLIBC_NSSWITCH were enabled, and
-+          produces a C library that uses the nsswitch service
-+          libraries to search for database entries as this file
-+          specifies, instead of consulting '/etc/nsswitch.conf' at run
-+          time.
-+
-+          This should be an absolute filename.  The EGLIBC build
-+          process may use it from several different working
-+          directories.  It may include references to Makefile
-+          variables like 'common-objpfx' (the top of the build tree,
-+          with a trailing slash), or '..' (the top of the source tree,
-+          with a trailing slash).
-+
-+          The EGLIBC source tree includes a sample configuration file
-+          named 'nss/fixed-nsswitch.conf'; for simple configurations,
-+          you will probably want to delete references to databases not
-+          needed on your system.
-+
-+config EGLIBC_NSSWITCH_FIXED_FUNCTIONS
-+   string "Nsswitch fixed functions filename"
-+   depends on !EGLIBC_NSSWITCH
-+   default ""
-+   help
-+          The EGLIBC build process uses this file to decide which
-+          functions to make available from which service libraries.
-+          The file 'nss/fixed-nsswitch.functions' serves as a sample
-+          configuration file for this setting, and explains its syntax
-+          and meaning in more detail.
-+
-+          This should be an absolute file name.  The EGLIBC build
-+          process may use it from several different working
-+          directories.  It may include references to Makefile
-+          variables like 'common-objpfx' (the top of the build tree,
-+          with a trailing slash), or '..' (the top of the source tree,
-+          with a trailing slash).
-+
-+          Be sure to mention each function in each service you wish to
-+          use.  If you do not mention a service's function here, the
-+          EGLIBC database access functions will not find it, even if
-+          it is listed in the EGLIBC_NSSWITCH_FIXED_CONFIG
-+          file.
-+
-+          In this arrangement, EGLIBC will not use the 'dlopen' and
-+          'dlsym' functions to find database access functions.  Instead,
-+          libc hard-codes references to the service libraries' database
-+          access functions.  You must explicitly link your program
-+          against the name service libraries (those whose names start
-+          with 'libnss_', in the sysroot's '/lib' directory) whose
-+          functions you intend to use.  This arrangement helps
-+          system-wide static analysis tools decide which functions a
-+          system actually uses.
-+
-+          Note that some nsswitch service libraries require other option
-+          groups to be enabled; for example, the EGLIBC_INET
-+          option group must be enabled to use the 'libnss_dns.so.2'
-+          service library, which uses the Domain Name System network
-+          protocol to answer queries.
-+
-+config EGLIBC_RCMD
-+   bool "Support for 'rcmd' and related library functions"
-+   depends on EGLIBC_INET
-+   help
-+      This option group includes functions for running commands on
-+      remote machines via the 'rsh' protocol, and doing authentication
-+      related to those functions.  This also includes functions that
-+      use the 'rexec' protocol.
-+
-+      This option group includes the following functions:
-+
-+        rcmd            ruserok
-+        rcmd_af         ruserok_af
-+        rexec           iruserok
-+        rexec_af        iruserok_af
-+        rresvport       ruserpass
-+        rresvport_af
-+
-+config EGLIBC_RTLD_DEBUG
-+   bool "Runtime linker debug print outs"
-+   help
-+      This option group enables debug output of the runtime linker
-+      which is activated via LD_DEBUG and LD_TRACE_PRELINKING
-+      environment variables.  Disabling this option group yields
-+      a smaller runtime linker binary.
-+      BEWARE: Disabling this option group is likely to break
-+      the `ldd' utility which may also be used by the prelinker.
-+      In particular, the `--unused' ldd option will not work correctly.
-+
-+config EGLIBC_SPAWN
-+   bool "Support for POSIX posix_spawn functions"
-+   help
-+      This option group includes the POSIX functions for executing
-+      programs in child processes without using 'fork' or 'vfork'.
-+
-+      This option group includes the following functions:
-+
-+        posix_spawn
-+        posix_spawnattr_destroy
-+        posix_spawnattr_getflags
-+        posix_spawnattr_getpgroup
-+        posix_spawnattr_getschedparam
-+        posix_spawnattr_getschedpolicy
-+        posix_spawnattr_getsigdefault
-+        posix_spawnattr_getsigmask
-+        posix_spawnattr_init
-+        posix_spawnattr_setflags
-+        posix_spawnattr_setpgroup
-+        posix_spawnattr_setschedparam
-+        posix_spawnattr_setschedpolicy
-+        posix_spawnattr_setsigdefault
-+        posix_spawnattr_setsigmask
-+        posix_spawn_file_actions_addclose
-+        posix_spawn_file_actions_adddup2
-+        posix_spawn_file_actions_addopen
-+        posix_spawn_file_actions_destroy
-+        posix_spawn_file_actions_init
-+        posix_spawnp
-+
-+      This option group also provides the ability for the iconv,
-+      localedef, and locale programs to operate transparently on
-+      compressed charset definitions.  When this option group is
-+      disabled, those programs will only operate on uncompressed
-+      charmap files.
-+
-+config EGLIBC_STREAMS
-+   bool "Support for accessing STREAMS."
-+   help
-+      This option group includes functions for reading and writing
-+      messages to and from STREAMS.  The STREAMS interface provides a
-+      uniform mechanism for implementing networking services and other
-+      character-based I/O.  (STREAMS are not to be confused with
-+      <stdio.h> FILE objects, also called 'streams'.)
-+
-+      This option group includes the following functions:
-+
-+        getmsg          putpmsg
-+        getpmsg         fattach
-+        isastream       fdetach
-+        putmsg
-+
-+config EGLIBC_SUNRPC
-+   bool "Support for the Sun 'RPC' protocol."
-+   depends on EGLIBC_INET
-+   help
-+      This option group includes support for the Sun RPC protocols,
-+      including the 'rpcgen' and 'rpcinfo' programs.
-+
-+config EGLIBC_UTMP
-+    bool "Older access functions for 'utmp' login records"
-+    help
-+       This option group includes the older 'utent' family of
-+       functions for accessing user login records in the 'utmp' file.
-+       POSIX omits these functions in favor of the 'utxent' family,
-+       and they are obsolete on systems other than Linux.
-+
-+       This option group includes the following functions:
-+
-+         endutent
-+         getutent
-+         getutent_r
-+         getutid
-+         getutid_r
-+         getutline
-+         getutline_r
-+         logwtmp
-+         pututline
-+         setutent
-+         updwtmp
-+         utmpname
-+
-+       This option group includes the following libraries:
-+
-+         libutil.so (and libutil.a)
-+
-+config EGLIBC_UTMPX
-+    bool "POSIX access functions for 'utmp' login records"
-+    depends on EGLIBC_UTMP
-+    help
-+       This option group includes the POSIX functions for reading and
-+       writing user login records in the 'utmp' file (usually
-+       '/var/run/utmp').  The POSIX functions operate on 'struct
-+       utmpx' structures, as opposed to the family of older 'utent'
-+       functions, which operate on 'struct utmp' structures.
-+
-+       This option group includes the following functions:
-+
-+         endutxent
-+         getutmp
-+         getutmpx
-+         getutxent
-+         getutxid
-+         getutxline
-+         pututxline
-+         setutxent
-+         updwtmpx
-+         utmpxname
-+
-+config EGLIBC_WORDEXP
-+    bool "Shell-style word expansion"
-+    help
-+        This option group includes the 'wordexp' function for
-+        performing word expansion in the manner of the shell, and the
-+        accompanying 'wordfree' function.
-+
-+config POSIX_C_LANG_WIDE_CHAR
-+    bool "ISO C library wide character functions, excluding I/O"
-+    help
-+        This option group includes the functions defined by the ISO C
-+        standard for working with wide and multibyte characters in
-+        memory.  Functions for reading and writing wide and multibyte
-+        characters from and to files call in the
-+        POSIX_WIDE_CHAR_DEVICE_IO option group.
-+
-+        This option group includes the following functions:
-+
-+          btowc         mbsinit       wcscspn       wcstoll
-+          iswalnum      mbsrtowcs     wcsftime      wcstombs
-+          iswalpha      mbstowcs      wcslen        wcstoul
-+          iswblank      mbtowc        wcsncat       wcstoull
-+          iswcntrl      swprintf      wcsncmp       wcstoumax
-+          iswctype      swscanf       wcsncpy       wcsxfrm
-+          iswdigit      towctrans     wcspbrk       wctob
-+          iswgraph      towlower      wcsrchr       wctomb
-+          iswlower      towupper      wcsrtombs     wctrans
-+          iswprint      vswprintf     wcsspn        wctype
-+          iswpunct      vswscanf      wcsstr        wmemchr
-+          iswspace      wcrtomb       wcstod        wmemcmp
-+          iswupper      wcscat        wcstof        wmemcpy
-+          iswxdigit     wcschr        wcstoimax     wmemmove
-+          mblen         wcscmp        wcstok        wmemset
-+          mbrlen        wcscoll       wcstol
-+          mbrtowc       wcscpy        wcstold
-+
-+config POSIX_REGEXP
-+    bool "Regular expressions"
-+    help
-+        This option group includes the POSIX regular expression
-+        functions, and the associated non-POSIX extensions and
-+        compatibility functions.
-+
-+        With POSIX_REGEXP disabled, the following functions are
-+        omitted from libc:
-+
-+          re_comp                 re_max_failures         regcomp
-+          re_compile_fastmap      re_search               regerror
-+          re_compile_pattern      re_search_2             regexec
-+          re_exec                 re_set_registers        regfree
-+          re_match                re_set_syntax           rpmatch
-+          re_match_2              re_syntax_options
-+
-+        Furthermore, the compatibility regexp interface defined in the
-+        <regexp.h> header file, 'compile', 'step', and 'advance', is
-+        omitted.
-+
-+config POSIX_REGEXP_GLIBC
-+    bool "Regular expressions from GLIBC"
-+    depends on POSIX_REGEXP
-+    help
-+	This option group specifies which regular expression
-+        library to use.  The choice is between regex
-+        implementation from GLIBC and regex implementation from
-+        libiberty.  The GLIBC variant is fully POSIX conformant and
-+        optimized for speed; regex from libiberty is more than twice
-+        as small while still is enough for most practical purposes.
-+
-+config POSIX_WIDE_CHAR_DEVICE_IO
-+    bool "Input and output functions for wide characters"
-+    depends on POSIX_C_LANG_WIDE_CHAR
-+    help
-+        This option group includes functions for reading and writing
-+        wide characters to and from <stdio.h> streams.
-+
-+        This option group includes the following functions:
-+
-+          fgetwc        fwprintf      putwchar      vwscanf
-+          fgetws        fwscanf       ungetwc       wprintf
-+          fputwc        getwc         vfwprintf     wscanf
-+          fputws        getwchar      vfwscanf
-+          fwide         putwc         vwprintf
-+
-+        This option group further includes the following unlocked
-+        variants of the above functions:
-+
-+          fgetwc_unlocked           getwc_unlocked
-+          fgetws_unlocked           getwchar_unlocked
-+          fputwc_unlocked           putwc_unlocked
-+          fputws_unlocked           putwchar_unlocked
-+
-+        Note that the GNU standard C++ library, 'libstdc++.so', uses
-+        some of these functions; you will not be able to link or run
-+        C++ programs if you disable this option group.
-+
-+        This option group also affects the behavior of the following
-+        functions:
-+
-+          fdopen
-+          fopen
-+          fopen64
-+          freopen
-+          freopen64
-+
-+        These functions all take an OPENTYPE parameter which may
-+        contain a string of the form ",ccs=CHARSET", indicating that
-+        the underlying file uses the character set named CHARSET.
-+        This produces a wide-oriented stream, which is only useful
-+        when the functions included in this option group are present.
-+        If the user attempts to open a file specifying a character set
-+        in the OPENTYPE parameter, and EGLIBC was built with this
-+        option group disabled, the function returns NULL, and sets
-+        errno to EINVAL.
-+
-+
-+# This helps Emacs users browse this file using the page motion commands
-+# and commands like 'pages-directory'.
-+# Local Variables:
-+# page-delimiter: "^config\\s-"
-+# End:
-diff --git a/option-groups.defaults b/option-groups.defaults
-new file mode 100644
-index 0000000..8141201
---- /dev/null
-+++ b/option-groups.defaults
-@@ -0,0 +1,47 @@
-+# This file sets default values for all option group variables
-+# mentioned in option-groups.def; see that file for a description of
-+# each option group.
-+#
-+# Subdirectory makefiles include this file before including the user's
-+# settings from option-groups.config at the top of the build tree;
-+# that file need only refer to those options whose default settings
-+# are to be changed.
-+#
-+# By default, all option groups are enabled.
-+OPTION_EGLIBC_ADVANCED_INET6 = y
-+OPTION_EGLIBC_BACKTRACE = y
-+OPTION_EGLIBC_BIG_MACROS = y
-+OPTION_EGLIBC_BSD = y
-+OPTION_EGLIBC_CXX_TESTS = y
-+OPTION_EGLIBC_CATGETS = y
-+OPTION_EGLIBC_CHARSETS = y
-+OPTION_EGLIBC_CRYPT = y
-+OPTION_EGLIBC_CRYPT_UFC = y
-+OPTION_EGLIBC_DB_ALIASES = y
-+OPTION_EGLIBC_ENVZ = y
-+OPTION_EGLIBC_FCVT = y
-+OPTION_EGLIBC_FMTMSG = y
-+OPTION_EGLIBC_FSTAB = y
-+OPTION_EGLIBC_FTRAVERSE = y
-+OPTION_EGLIBC_GETLOGIN = y
-+OPTION_EGLIBC_IDN = y
-+OPTION_EGLIBC_INET = y
-+OPTION_EGLIBC_INET_ANL = y
-+OPTION_EGLIBC_LIBM = y
-+OPTION_EGLIBC_LOCALES = y
-+OPTION_EGLIBC_LOCALE_CODE = y
-+OPTION_EGLIBC_MEMUSAGE = y
-+OPTION_EGLIBC_NIS = y
-+OPTION_EGLIBC_NSSWITCH = y
-+OPTION_EGLIBC_RCMD = y
-+OPTION_EGLIBC_RTLD_DEBUG = y
-+OPTION_EGLIBC_SPAWN = y
-+OPTION_EGLIBC_STREAMS = y
-+OPTION_EGLIBC_SUNRPC = y
-+OPTION_EGLIBC_UTMP = y
-+OPTION_EGLIBC_UTMPX = y
-+OPTION_EGLIBC_WORDEXP = y
-+OPTION_POSIX_C_LANG_WIDE_CHAR = y
-+OPTION_POSIX_REGEXP = y
-+OPTION_POSIX_REGEXP_GLIBC = y
-+OPTION_POSIX_WIDE_CHAR_DEVICE_IO = y
-diff --git a/option-groups.mak b/option-groups.mak
-new file mode 100644
-index 0000000..f83e0c1
---- /dev/null
-+++ b/option-groups.mak
-@@ -0,0 +1,41 @@
-+# Setup file for subdirectory Makefiles that define EGLIBC option groups.
-+
-+# EGLIBC shouldn't need to override this.  However, the
-+# cross-build-friendly localedef includes this makefile to get option
-+# group variable definitions; it uses a single build tree for all the
-+# multilibs, and needs to be able to specify a different option group
-+# configuration file for each multilib.
-+option_group_config_file ?= $(objdir)/option-groups.config
-+
-+# Read the default settings for all options.
-+# We're included before ../Rules, so we can't assume $(..) is set.
-+include $(firstword $(..) ../)option-groups.defaults
-+
-+# Read the developer's option group selections, overriding the
-+# defaults from option-groups.defaults.
-+-include $(option_group_config_file)
-+
-+# $(call option-disabled, VAR) is 'y' if VAR is not 'y', or 'n' otherwise.
-+# VAR should be a variable name, not a variable reference; this is
-+# less general, but more terse for the intended use.
-+# You can use it to add a file to a list if an option group is
-+# disabled, like this:
-+#   routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) += ...
-+define option-disabled
-+$(firstword $(subst y,n,$(filter y,$($(strip $(1))))) y)
-+endef
-+
-+# Establish 'routines-y', etc. as simply-expanded variables.
-+aux-y	       	    :=
-+extra-libs-others-y :=
-+extra-libs-y   	    :=
-+extra-objs-y   	    :=
-+install-bin-y  	    :=
-+install-others-y    :=
-+install-sbin-y 	    :=
-+others-y       	    :=
-+others-pie-y   	    :=
-+routines-y     	    :=
-+test-srcs-y    	    :=
-+tests-y        	    :=
-+xtests-y       	    :=
-diff --git a/options-config/Makefile b/options-config/Makefile
-new file mode 100644
-index 0000000..db00708
---- /dev/null
-+++ b/options-config/Makefile
-@@ -0,0 +1,55 @@
-+# ===========================================================================
-+# EGLIBC option-groups configuration targets
-+# These targets are included from top-level makefile
-+
-+ifneq ($(kconfig_tools),)
-+ifneq (no,$(PERL))
-+
-+ocdir := options-config
-+
-+OconfigDefaults     := option-groups.defaults
-+OconfigDefaults_tmp := $(common-objpfx).tmp.defconfig
-+OconfigDef          := option-groups.def
-+Oconfig             := $(common-objpfx)option-groups.config
-+Oconfig_tmp         := $(common-objpfx).tmp.config
-+
-+conf  := $(kconfig_tools)/conf
-+mconf := $(kconfig_tools)/mconf
-+
-+preproc  := $(PERL) $(ocdir)/config-preproc.pl
-+postproc := $(PERL) $(ocdir)/config-postproc.pl
-+
-+PHONY += defconfig config menuconfig
-+
-+defconfig: $(conf) $(OconfigDefaults) $(OconfigDef)
-+	rm -f $(OconfigDefaults_tmp)
-+	rm -f $(Oconfig_tmp)
-+	$(preproc) $(OconfigDefaults) > $(OconfigDefaults_tmp)
-+	KCONFIG_CONFIG=$(Oconfig_tmp) $< --defconfig=$(OconfigDefaults_tmp) \
-+				$(OconfigDef)
-+	$(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
-+	rm $(Oconfig_tmp)
-+	rm $(OconfigDefaults_tmp)
-+
-+config: $(conf) $(OconfigDefaults) $(OconfigDef)
-+	rm -f $(Oconfig_tmp)
-+	$(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
-+	KCONFIG_CONFIG=$(Oconfig_tmp) $< --oldaskconfig $(OconfigDef)
-+	$(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
-+	rm $(Oconfig_tmp)
-+
-+menuconfig: $(mconf) $(OconfigDefaults) $(OconfigDef)
-+	rm -f $(Oconfig_tmp)
-+	$(preproc) $(wildcard $(Oconfig)) > $(Oconfig_tmp)
-+	KCONFIG_CONFIG=$(Oconfig_tmp) $< $(OconfigDef)
-+	$(postproc) $(OconfigDefaults) $(Oconfig_tmp) > $(Oconfig)
-+	rm $(Oconfig_tmp)
-+
-+# Help text used by make help
-+help:
-+	@echo  '  defconfig	  - New config with default from default config'
-+	@echo  '  config	  - Update current config utilising a line-oriented program'
-+	@echo  '  menuconfig	  - Update current config utilising a menu based program'
-+
-+endif
-+endif
-diff --git a/options-config/config-postproc.pl b/options-config/config-postproc.pl
-new file mode 100644
-index 0000000..4dd1c63
---- /dev/null
-+++ b/options-config/config-postproc.pl
-@@ -0,0 +1,58 @@
-+#!/usr/bin/perl
-+
-+$usage = "usage: $0 <default config file> <config file>\n";
-+
-+die "$usage" unless @ARGV;
-+$defaults = shift @ARGV;
-+die "$usage" unless @ARGV;
-+die "Could not open $ARGV[0]" unless -T $ARGV[0];
-+
-+sub yank {
-+    @option = grep(!($_ =~ /$_[0]\s*=/), @option);
-+}
-+
-+open(DEFAULTS, $defaults) || die "Could not open $defaults\n";
-+
-+# get the full list of available options using the default config file
-+$i = 0;
-+while (<DEFAULTS>) {
-+    if (/^\s*OPTION_(\w+\s*=.*$)/) {
-+	$option[$i++] = $1;
-+    }
-+}
-+
-+# now go through the config file, making the necessary changes
-+while (<>) {
-+    if (/Linux Kernel Configuration/) {
-+	# change title
-+	s/Linux Kernel/Option Groups/;
-+	print;
-+    } elsif (/^\s*CONFIG_(\w+)\s*=/) {
-+	# this is an explicit option set line, change CONFIG_ to OPTION_
-+	# before printing and remove this option from option list
-+	$opt = $1;
-+	yank($opt);
-+	s/CONFIG_/OPTION_/g;
-+	print;
-+    } elsif (/^\s*#\s+CONFIG_(\w+) is not set/) {
-+	# this is a comment line for an unset boolean option, change CONFIG_
-+	# to OPTION_, remove this option from option list, and convert to
-+	# explicit OPTION_FOO=n
-+	$opt = $1;
-+	yank($opt);
-+	s/CONFIG_/OPTION_/g;
-+	print "OPTION_$opt=n\n";
-+    } else {
-+	print;
-+    }
-+}
-+
-+# any boolean options left in @options, are options that were not mentioned in
-+# the config file, and implicitly that means the option must be set =n,
-+# so do that here.
-+foreach $opt (@option) {
-+    if ($opt =~ /=\s*[yn]/) {
-+	$opt =~ s/=\s*[yn]/=n/;
-+	print "OPTION_$opt\n";
-+    }
-+}
-diff --git a/options-config/config-preproc.pl b/options-config/config-preproc.pl
-new file mode 100644
-index 0000000..b83bb85
---- /dev/null
-+++ b/options-config/config-preproc.pl
-@@ -0,0 +1,8 @@
-+#!/usr/bin/perl
-+
-+if (@ARGV) {
-+    while (<>) {
-+	s/OPTION_/CONFIG_/g;
-+	print;
-+    }
-+}
-diff --git a/scripts/option-groups.awk b/scripts/option-groups.awk
-new file mode 100644
-index 0000000..533af0c
---- /dev/null
-+++ b/scripts/option-groups.awk
-@@ -0,0 +1,63 @@
-+# option-groups.awk --- generate option group header file
-+# Given input files containing makefile-style assignments to variables,
-+# print out a header file that #defines an appropriate preprocessor
-+# symbol for each variable left set to 'y'.
-+
-+BEGIN { FS="=" }
-+
-+# Trim spaces.
-+{ gsub (/[[:blank:]]/, "") }
-+
-+# Skip comments.
-+/^#/ { next }
-+
-+# Process assignments.
-+NF == 2 {
-+    vars[$1] = $2
-+}
-+
-+# Print final values.
-+END {
-+    print "/* This file is automatically generated by scripts/option-groups.awk"
-+    print "   in the EGLIBC source tree."
-+    print ""
-+    print "   It defines macros that indicate which EGLIBC option groups were"
-+    print "   configured in 'option-groups.config' when this C library was"
-+    print "   built.  For each option group named OPTION_foo, it #defines"
-+    print "   __OPTION_foo to be 1 if the group is enabled, or #defines that"
-+    print "   symbol to be 0 if the group is disabled.  */"
-+    print ""
-+    print "#ifndef __GNU_OPTION_GROUPS_H"
-+    print "#define __GNU_OPTION_GROUPS_H"
-+    print ""
-+
-+    # Produce a sorted list of variable names.
-+    i=0
-+    for (var in vars)
-+        names[i++] = var
-+    n = asort (names)
-+
-+    for (i = 1; i <= n; i++)
-+    {
-+        var = names[i]
-+        if (var ~ /^OPTION_/)
-+        {
-+            if (vars[var] == "y")
-+                print "#define __" var " 1"
-+            else if (vars[var] == "n")
-+                print "#define __" var " 0"
-+	    else if (vars[var] ~ /^[0-9]+/ ||
-+		     vars[var] ~ /^0x[0-9aAbBcCdDeEfF]+/ ||
-+		     vars[var] ~ /^\"/)
-+		 print "#define __" var " " vars[var]
-+	    else
-+		print "/* #undef __" var " */"
-+            # Ignore variables that don't have boolean, int, hex, or
-+	    # string values. Ideally, this would be driven by the types
-+	    # given in option-groups.def.
-+        }
-+    }
-+
-+    print ""
-+    print "#endif /* __GNU_OPTION_GROUPS_H */"
-+}
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
new file mode 100644
index 0000000..c04e0a1
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0019-eglibc-Help-bootstrap-cross-toolchain.patch
@@ -0,0 +1,100 @@
+From c2d49eab20db4ab02b6de62092fedc623d757146 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:49:28 +0000
+Subject: [PATCH 19/24] eglibc: Help bootstrap cross toolchain
+
+Taken from EGLIBC, r1484 + r1525
+
+        2007-02-20  Jim Blandy  <jimb@codesourcery.com>
+
+                * Makefile (install-headers): Preserve old behavior: depend on
+                $(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers
+                is set; otherwise, place gnu/stubs.h on the 'install-others' list.
+
+        2007-02-16  Jim Blandy  <jimb@codesourcery.com>
+
+                * Makefile: Amend make install-headers to install everything
+                necessary for building a cross-compiler.  Install gnu/stubs.h as
+                part of 'install-headers', not 'install-others'.
+                If install-bootstrap-headers is 'yes', install a dummy copy of
+                gnu/stubs.h, instead of computing the real thing.
+                * include/stubs-bootstrap.h: New file.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile                  | 22 +++++++++++++++++++++-
+ include/stubs-bootstrap.h | 12 ++++++++++++
+ 2 files changed, 33 insertions(+), 1 deletion(-)
+ create mode 100644 include/stubs-bootstrap.h
+
+diff --git a/Makefile b/Makefile
+index 9a01c93..a6ae003 100644
+--- a/Makefile
++++ b/Makefile
+@@ -69,9 +69,18 @@ subdir-dirs = include
+ vpath %.h $(subdir-dirs)
+ 
+ # What to install.
+-install-others = $(inst_includedir)/gnu/stubs.h
+ install-bin-script =
+ 
++# If we're bootstrapping, install a dummy gnu/stubs.h along with the
++# other headers, so 'make install-headers' produces a useable include
++# tree.  Otherwise, install gnu/stubs.h later, after the rest of the
++# build is done.
++ifeq ($(install-bootstrap-headers),yes)
++install-headers: $(inst_includedir)/gnu/stubs.h
++else
++install-others = $(inst_includedir)/gnu/stubs.h
++endif
++
+ ifeq (yes,$(build-shared))
+ headers += gnu/lib-names.h
+ endif
+@@ -151,6 +160,16 @@ others: $(common-objpfx)testrun.sh
+ 
+ subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
+ 
++# gnu/stubs.h depends (via the subdir 'stubs' targets) on all the .o
++# files in EGLIBC.  For bootstrapping a GCC/EGLIBC pair, an empty
++# gnu/stubs.h is good enough.
++ifeq ($(install-bootstrap-headers),yes)
++$(inst_includedir)/gnu/stubs.h: include/stubs-bootstrap.h $(+force)
++	$(make-target-directory)
++	$(INSTALL_DATA) $< $@
++
++installed-stubs =
++else
+ ifndef abi-variants
+ installed-stubs = $(inst_includedir)/gnu/stubs.h
+ else
+@@ -177,6 +196,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
+ 
+ install-others-nosubdir: $(installed-stubs)
+ endif
++endif
+ 
+ 
+ # Since stubs.h is never needed when building the library, we simplify the
+diff --git a/include/stubs-bootstrap.h b/include/stubs-bootstrap.h
+new file mode 100644
+index 0000000..1d2b669
+--- /dev/null
++++ b/include/stubs-bootstrap.h
+@@ -0,0 +1,12 @@
++/* Placeholder stubs.h file for bootstrapping.
++
++   When bootstrapping a GCC/EGLIBC pair, GCC requires that the EGLIBC
++   headers be installed, but we can't fully build EGLIBC without that
++   GCC.  So we run the command:
++
++      make install-headers install-bootstrap-headers=yes
++
++   to install the headers GCC needs, but avoid building certain
++   difficult headers.  The <gnu/stubs.h> header depends, via the
++   EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
++   an empty stubs.h like this will do fine for GCC.  */
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Help-bootstrap-cross-toolchain.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Help-bootstrap-cross-toolchain.patch
deleted file mode 100644
index df93094..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-Help-bootstrap-cross-toolchain.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 8fe0d29488b376011cdaaa462d557ffc0b31fb63 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:49:28 +0000
-Subject: [PATCH 20/27] eglibc: Help bootstrap cross toolchain
-
-Taken from EGLIBC, r1484 + r1525
-
-        2007-02-20  Jim Blandy  <jimb@codesourcery.com>
-
-                * Makefile (install-headers): Preserve old behavior: depend on
-                $(inst_includedir)/gnu/stubs.h only if install-bootstrap-headers
-                is set; otherwise, place gnu/stubs.h on the 'install-others' list.
-
-        2007-02-16  Jim Blandy  <jimb@codesourcery.com>
-
-                * Makefile: Amend make install-headers to install everything
-                necessary for building a cross-compiler.  Install gnu/stubs.h as
-                part of 'install-headers', not 'install-others'.
-                If install-bootstrap-headers is 'yes', install a dummy copy of
-                gnu/stubs.h, instead of computing the real thing.
-                * include/stubs-bootstrap.h: New file.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile                  | 22 +++++++++++++++++++++-
- include/stubs-bootstrap.h | 12 ++++++++++++
- 2 files changed, 33 insertions(+), 1 deletion(-)
- create mode 100644 include/stubs-bootstrap.h
-
-diff --git a/Makefile b/Makefile
-index f906391..e4e149e 100644
---- a/Makefile
-+++ b/Makefile
-@@ -69,9 +69,18 @@ subdir-dirs = include
- vpath %.h $(subdir-dirs)
- 
- # What to install.
--install-others = $(inst_includedir)/gnu/stubs.h
- install-bin-script =
- 
-+# If we're bootstrapping, install a dummy gnu/stubs.h along with the
-+# other headers, so 'make install-headers' produces a useable include
-+# tree.  Otherwise, install gnu/stubs.h later, after the rest of the
-+# build is done.
-+ifeq ($(install-bootstrap-headers),yes)
-+install-headers: $(inst_includedir)/gnu/stubs.h
-+else
-+install-others = $(inst_includedir)/gnu/stubs.h
-+endif
-+
- ifeq (yes,$(build-shared))
- headers += gnu/lib-names.h
- endif
-@@ -151,6 +160,16 @@ others: $(common-objpfx)testrun.sh
- 
- subdir-stubs := $(foreach dir,$(subdirs),$(common-objpfx)$(dir)/stubs)
- 
-+# gnu/stubs.h depends (via the subdir 'stubs' targets) on all the .o
-+# files in EGLIBC.  For bootstrapping a GCC/EGLIBC pair, an empty
-+# gnu/stubs.h is good enough.
-+ifeq ($(install-bootstrap-headers),yes)
-+$(inst_includedir)/gnu/stubs.h: include/stubs-bootstrap.h $(+force)
-+	$(make-target-directory)
-+	$(INSTALL_DATA) $< $@
-+
-+installed-stubs =
-+else
- ifndef abi-variants
- installed-stubs = $(inst_includedir)/gnu/stubs.h
- else
-@@ -177,6 +196,7 @@ $(inst_includedir)/gnu/stubs.h: $(+force)
- 
- install-others-nosubdir: $(installed-stubs)
- endif
-+endif
- 
- 
- # Since stubs.h is never needed when building the library, we simplify the
-diff --git a/include/stubs-bootstrap.h b/include/stubs-bootstrap.h
-new file mode 100644
-index 0000000..1d2b669
---- /dev/null
-+++ b/include/stubs-bootstrap.h
-@@ -0,0 +1,12 @@
-+/* Placeholder stubs.h file for bootstrapping.
-+
-+   When bootstrapping a GCC/EGLIBC pair, GCC requires that the EGLIBC
-+   headers be installed, but we can't fully build EGLIBC without that
-+   GCC.  So we run the command:
-+
-+      make install-headers install-bootstrap-headers=yes
-+
-+   to install the headers GCC needs, but avoid building certain
-+   difficult headers.  The <gnu/stubs.h> header depends, via the
-+   EGLIBC subdir 'stubs' make targets, on every .o file in EGLIBC, but
-+   an empty stubs.h like this will do fine for GCC.  */
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
new file mode 100644
index 0000000..4362efa
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0020-eglibc-cherry-picked-from.patch
@@ -0,0 +1,66 @@
+From 588d936b9aa65e7cc8b1eb2cad1d209087db43a9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 15:10:33 -0800
+Subject: [PATCH 20/24] eglibc: cherry-picked from
+
+http://www.eglibc.org/archives/patches/msg00772.html
+
+Not yet merged into glibc
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ resolv/res_libc.c | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/resolv/res_libc.c b/resolv/res_libc.c
+index a8394e0..981ac7c 100644
+--- a/resolv/res_libc.c
++++ b/resolv/res_libc.c
+@@ -18,6 +18,7 @@
+ #include <atomic.h>
+ #include <limits.h>
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #include <netinet/in.h>
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+@@ -28,6 +29,7 @@
+    out) since res_init() should go into libc.so but the rest of that
+    file should not.  */
+ 
++__libc_lock_define_initialized (static, lock);
+ extern unsigned long long int __res_initstamp attribute_hidden;
+ /* We have atomic increment operations on 64-bit platforms.  */
+ #if __WORDSIZE == 64
+@@ -35,7 +37,6 @@ extern unsigned long long int __res_initstamp attribute_hidden;
+ # define atomicincunlock(lock) (void) 0
+ # define atomicinc(var) catomic_increment (&(var))
+ #else
+-__libc_lock_define_initialized (static, lock);
+ # define atomicinclock(lock) __libc_lock_lock (lock)
+ # define atomicincunlock(lock) __libc_lock_unlock (lock)
+ # define atomicinc(var) ++var
+@@ -94,7 +95,18 @@ res_init(void) {
+ int
+ __res_maybe_init (res_state resp, int preinit)
+ {
++	static time_t last_mtime;
++	struct stat statbuf;
++	int ret;
++
+ 	if (resp->options & RES_INIT) {
++		ret = stat (_PATH_RESCONF, &statbuf);
++		__libc_lock_lock (lock);
++		if ((ret == 0) && (last_mtime != statbuf.st_mtime)) {
++			last_mtime = statbuf.st_mtime;
++			atomicinc (__res_initstamp);
++		}
++		__libc_lock_unlock (lock);
+ 		if (__res_initstamp != resp->_u._ext.initstamp) {
+ 			if (resp->nscount > 0)
+ 				__res_iclose (resp, true);
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch
new file mode 100644
index 0000000..225f22f
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-Clear-cache-lines-on-ppc8xx.patch
@@ -0,0 +1,83 @@
+From b74e34e6f53816ad57b13ba6fd70a97db1bc1eae Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 15:15:09 -0800
+Subject: [PATCH 21/24] eglibc: Clear cache lines on ppc8xx
+
+2007-06-13  Nathan Sidwell  <nathan@codesourcery.com>
+            Mark Shinwell  <shinwell@codesourcery.com>
+
+        * sysdeps/unix/sysv/linux/powerpc/libc-start.c
+        (__libc_start_main): Detect 8xx parts and clear
+        __cache_line_size if detected.
+        * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+        (DL_PLATFORM_AUXV): Likewise.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c  | 14 +++++++++++++-
+ sysdeps/unix/sysv/linux/powerpc/libc-start.c | 16 +++++++++++++++-
+ 2 files changed, 28 insertions(+), 2 deletions(-)
+
+diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+index c2504ff..d50f1cb 100644
+--- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
++++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
+@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden;
+ /* Scan the Aux Vector for the "Data Cache Block Size" entry.  If found
+    verify that the static extern __cache_line_size is defined by checking
+    for not NULL.  If it is defined then assign the cache block size
+-   value to __cache_line_size.  */
++   value to __cache_line_size.  This is used by memset to
++   optimize setting to zero.  We have to detect 8xx processors, which
++   have buggy dcbz implementations that cannot report page faults
++   correctly.  That requires reading SPR, which is a privileged
++   operation.  Fortunately 2.2.18 and later emulates PowerPC mfspr
++   reads from the PVR register.   */
+ #define DL_PLATFORM_AUXV						      \
+       case AT_DCACHEBSIZE:						      \
++	if (__LINUX_KERNEL_VERSION >= 0x020218)				      \
++	  {								      \
++	    unsigned pvr = 0;						      \
++	    asm ("mfspr %0, 287" : "=r" (pvr));				      \
++	    if ((pvr & 0xffff0000) == 0x00500000)			      \
++	      break;							      \
++	  }								      \
+ 	__cache_line_size = av->a_un.a_val;				      \
+ 	break;
+ 
+diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+index 209a16d..5d8572d 100644
+--- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
++++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
+@@ -73,11 +73,25 @@ __libc_start_main (int argc, char **argv,
+ 
+   /* Initialize the __cache_line_size variable from the aux vector.  For the
+      static case, we also need _dl_hwcap, _dl_hwcap2 and _dl_platform, so we
+-     can call __tcb_parse_hwcap_and_convert_at_platform ().  */
++     can call __tcb_parse_hwcap_and_convert_at_platform ().
++
++     This is used by memset to optimize setting to zero.  We have to
++     detect 8xx processors, which have buggy dcbz implementations that
++     cannot report page faults correctly.  That requires reading SPR,
++     which is a privileged operation.  Fortunately 2.2.18 and later
++     emulates PowerPC mfspr reads from the PVR register.  */
+   for (ElfW (auxv_t) * av = auxvec; av->a_type != AT_NULL; ++av)
+     switch (av->a_type)
+       {
+       case AT_DCACHEBSIZE:
++	if (__LINUX_KERNEL_VERSION >= 0x020218)
++	  {
++	    unsigned pvr = 0;
++
++	    asm ("mfspr %0, 287" : "=r" (pvr) :);
++	    if ((pvr & 0xffff0000) == 0x00500000)
++	      break;
++	  }
+ 	__cache_line_size = av->a_un.a_val;
+ 	break;
+ #ifndef SHARED
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch
deleted file mode 100644
index 38bb8a1..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From fe2ae4f877928dd6bff5bac3f15bce4b50d2bd12 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:51:16 +0000
-Subject: [PATCH 21/27] eglibc: cherry-picked from
- http://www.eglibc.org/archives/patches/msg00772.html
-
-It hasn't yet been merged into glibc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- resolv/res_libc.c | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/resolv/res_libc.c b/resolv/res_libc.c
-index ee3fa21..29e2340 100644
---- a/resolv/res_libc.c
-+++ b/resolv/res_libc.c
-@@ -22,12 +22,13 @@
- #include <arpa/nameser.h>
- #include <resolv.h>
- #include <bits/libc-lock.h>
--
-+#include <sys/stat.h>
- 
- /* The following bit is copied from res_data.c (where it is #ifdef'ed
-    out) since res_init() should go into libc.so but the rest of that
-    file should not.  */
- 
-+__libc_lock_define_initialized (static, lock);
- extern unsigned long long int __res_initstamp attribute_hidden;
- /* We have atomic increment operations on 64-bit platforms.  */
- #if __WORDSIZE == 64
-@@ -35,7 +36,6 @@ extern unsigned long long int __res_initstamp attribute_hidden;
- # define atomicincunlock(lock) (void) 0
- # define atomicinc(var) catomic_increment (&(var))
- #else
--__libc_lock_define_initialized (static, lock);
- # define atomicinclock(lock) __libc_lock_lock (lock)
- # define atomicincunlock(lock) __libc_lock_unlock (lock)
- # define atomicinc(var) ++var
-@@ -94,7 +94,18 @@ res_init(void) {
- int
- __res_maybe_init (res_state resp, int preinit)
- {
-+	static time_t last_mtime;
-+	struct stat statbuf;
-+	int ret;
-+
- 	if (resp->options & RES_INIT) {
-+		ret = stat (_PATH_RESCONF, &statbuf);
-+		__libc_lock_lock (lock);
-+		if ((ret == 0) && (last_mtime != statbuf.st_mtime)) {
-+			last_mtime = statbuf.st_mtime;
-+			atomicinc (__res_initstamp);
-+		}
-+		__libc_lock_unlock (lock);
- 		if (__res_initstamp != resp->_u._ext.initstamp) {
- 			if (resp->nscount > 0)
- 				__res_iclose (resp, true);
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Clear-cache-lines-on-ppc8xx.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Clear-cache-lines-on-ppc8xx.patch
deleted file mode 100644
index 8a4c9c3..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Clear-cache-lines-on-ppc8xx.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From be7273225698074347a71de58006977bb304d7f7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:53:47 +0000
-Subject: [PATCH 22/27] eglibc: Clear cache lines on ppc8xx
-
-2007-06-13  Nathan Sidwell  <nathan@codesourcery.com>
-            Mark Shinwell  <shinwell@codesourcery.com>
-
-        * sysdeps/unix/sysv/linux/powerpc/libc-start.c
-        (__libc_start_main): Detect 8xx parts and clear
-        __cache_line_size if detected.
-        * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-        (DL_PLATFORM_AUXV): Likewise.
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c  | 14 +++++++++++++-
- sysdeps/unix/sysv/linux/powerpc/libc-start.c | 15 ++++++++++++++-
- 2 files changed, 27 insertions(+), 2 deletions(-)
-
-diff --git a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-index c2504ff..d50f1cb 100644
---- a/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-+++ b/sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c
-@@ -24,9 +24,21 @@ int __cache_line_size attribute_hidden;
- /* Scan the Aux Vector for the "Data Cache Block Size" entry.  If found
-    verify that the static extern __cache_line_size is defined by checking
-    for not NULL.  If it is defined then assign the cache block size
--   value to __cache_line_size.  */
-+   value to __cache_line_size.  This is used by memset to
-+   optimize setting to zero.  We have to detect 8xx processors, which
-+   have buggy dcbz implementations that cannot report page faults
-+   correctly.  That requires reading SPR, which is a privileged
-+   operation.  Fortunately 2.2.18 and later emulates PowerPC mfspr
-+   reads from the PVR register.   */
- #define DL_PLATFORM_AUXV						      \
-       case AT_DCACHEBSIZE:						      \
-+	if (__LINUX_KERNEL_VERSION >= 0x020218)				      \
-+	  {								      \
-+	    unsigned pvr = 0;						      \
-+	    asm ("mfspr %0, 287" : "=r" (pvr));				      \
-+	    if ((pvr & 0xffff0000) == 0x00500000)			      \
-+	      break;							      \
-+	  }								      \
- 	__cache_line_size = av->a_un.a_val;				      \
- 	break;
- 
-diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-start.c b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-index a9364c7..a3ed1d4 100644
---- a/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-+++ b/sysdeps/unix/sysv/linux/powerpc/libc-start.c
-@@ -68,11 +68,24 @@ __libc_start_main (int argc, char **argv,
-       rtld_fini = NULL;
-     }
- 
--  /* Initialize the __cache_line_size variable from the aux vector.  */
-+  /* Initialize the __cache_line_size variable from the aux vector.
-+     This is used by memset to optimize setting to zero.  We have to
-+     detect 8xx processors, which have buggy dcbz implementations that
-+     cannot report page faults correctly.  That requires reading SPR,
-+     which is a privileged operation.  Fortunately 2.2.18 and later
-+     emulates PowerPC mfspr reads from the PVR register.  */
-   for (ElfW (auxv_t) * av = auxvec; av->a_type != AT_NULL; ++av)
-     switch (av->a_type)
-       {
-       case AT_DCACHEBSIZE:
-+	if (__LINUX_KERNEL_VERSION >= 0x020218)
-+	  {
-+	    unsigned pvr = 0;
-+
-+	    asm ("mfspr %0, 287" : "=r" (pvr) :);
-+	    if ((pvr & 0xffff0000) == 0x00500000)
-+	      break;
-+	  }
- 	__cache_line_size = av->a_un.a_val;
- 	break;
-       }
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
new file mode 100644
index 0000000..88b20f6
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0022-eglibc-Resolve-__fpscr_values-on-SH4.patch
@@ -0,0 +1,56 @@
+From 8f483cb1f21ab6431ff99e8d30d56b91607ae918 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 00:55:53 +0000
+Subject: [PATCH 22/24] eglibc: Resolve __fpscr_values on SH4
+
+2010-09-29  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>
+            Andrew Stubbs  <ams@codesourcery.com>
+
+        Resolve SH's __fpscr_values to symbol in libc.so.
+
+        * sysdeps/sh/sh4/fpu/fpu_control.h: Add C++ __set_fpscr prototype.
+        * sysdeps/unix/sysv/linux/sh/Versions (GLIBC_2.2): Add __fpscr_values.
+        * sysdeps/unix/sysv/linux/sh/sysdep.S (___fpscr_values): New constant.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/unix/sysv/linux/sh/Versions |  1 +
+ sysdeps/unix/sysv/linux/sh/sysdep.S | 11 +++++++++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
+index e0938c4..ca1d7da 100644
+--- a/sysdeps/unix/sysv/linux/sh/Versions
++++ b/sysdeps/unix/sysv/linux/sh/Versions
+@@ -2,6 +2,7 @@ libc {
+   GLIBC_2.2 {
+     # functions used in other libraries
+     __xstat64; __fxstat64; __lxstat64;
++    __fpscr_values;
+ 
+     # a*
+     alphasort64;
+diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
+index a02b7e2..b9be326 100644
+--- a/sysdeps/unix/sysv/linux/sh/sysdep.S
++++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
+@@ -30,3 +30,14 @@ ENTRY (__syscall_error)
+ 
+ #define __syscall_error __syscall_error_1
+ #include <sysdeps/unix/sh/sysdep.S>
++
++       .data
++       .align 3
++       .globl ___fpscr_values
++       .type ___fpscr_values, @object
++       .size ___fpscr_values, 8
++___fpscr_values:
++       .long 0
++       .long 0x80000
++weak_alias (___fpscr_values, __fpscr_values)
++
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch
new file mode 100644
index 0000000..d95ea3b
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Install-PIC-archives.patch
@@ -0,0 +1,123 @@
+From 58d424884eed7efde6c90af0cd7c6c37cf9b444a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 01:57:01 +0000
+Subject: [PATCH 23/24] eglibc: Install PIC archives
+
+Forward port from eglibc
+
+2008-02-07  Joseph Myers  <joseph@codesourcery.com>
+
+        * Makerules (install-extras, install-map): New variables.
+        (installed-libcs): Add libc_pic.a.
+        (install-lib): Include _pic.a files for versioned shared
+        libraries.
+        (install-map-nosubdir, install-extras-nosubdir): Add rules for
+        installing extra files.
+        (install-no-libc.a-nosubdir): Depend on install-map-nosubdir and
+        install-extras-nosubdir.
+
+2008-04-01  Maxim Kuvyrkov  <maxim@codesourcery.com>
+
+        * Makerules (install-lib): Don't install libpthread_pic.a.
+        (install-map): Don't install libpthread_pic.map.
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makerules | 42 ++++++++++++++++++++++++++++++++++++++++--
+ 1 file changed, 40 insertions(+), 2 deletions(-)
+
+diff --git a/Makerules b/Makerules
+index fa24030..1ff4634 100644
+--- a/Makerules
++++ b/Makerules
+@@ -694,6 +694,9 @@ ifeq ($(build-shared),yes)
+ $(common-objpfx)libc.so: $(common-objpfx)libc.map
+ endif
+ common-generated += libc.so libc_pic.os
++ifndef subdir
++install-extras := soinit.o sofini.o
++endif
+ ifdef libc.so-version
+ $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
+ 	$(make-link)
+@@ -936,6 +939,7 @@ endif
+ 
+ install: check-install-supported
+ 
++installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a
+ install: $(installed-libcs)
+ $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
+ 	$(make-target-directory)
+@@ -964,6 +968,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
+ install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
+ install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
+ 
++# Install the _pic.a files for versioned libraries, and corresponding
++# .map files.
++# libpthread_pic.a breaks mklibs, so don't install it and its map.
++install-lib := $(install-lib) $(install-lib.so-versioned:%.so=%_pic.a)
++install-lib := $(filter-out libpthread_pic.a,$(install-lib))
++# Despite having a soname libhurduser and libmachuser do not use symbol
++# versioning, so don't install the corresponding .map files.
++ifeq ($(build-shared),yes)
++install-map := $(patsubst %.so,%.map,\
++			$(foreach L,$(install-lib.so-versioned),$(notdir $L)))
++install-map := $(filter-out libhurduser.map libmachuser.map libpthread.map,$(install-map))
++ifndef subdir
++install-map := $(install-map) libc.map
++endif
++endif
++
+ # For versioned libraries, we install three files:
+ #	$(inst_libdir)/libfoo.so	-- for linking, symlink or ld script
+ #	$(inst_slibdir)/libfoo.so.NN	-- for loading by SONAME, symlink
+@@ -1206,9 +1226,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
+ endif	# headers-nonh
+ endif	# headers
+ 
++ifdef install-map
++$(addprefix $(inst_libdir)/,$(patsubst lib%.map,lib%_pic.map,$(install-map))): \
++  $(inst_libdir)/lib%_pic.map: $(common-objpfx)lib%.map $(+force)
++	$(do-install)
++endif
++
++ifdef install-extras
++$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \
++  $(inst_libdir)/libc_pic/%.o: $(elf-objpfx)%.os $(+force)
++	$(do-install)
++endif
++
+ .PHONY: install-bin-nosubdir install-bin-script-nosubdir \
+ 	install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \
+-	install-data-nosubdir install-headers-nosubdir
++	install-data-nosubdir install-headers-nosubdir install-map-nosubdir \
++	install-extras-nosubdir
+ install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
+ install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
+ install-rootsbin-nosubdir: \
+@@ -1221,6 +1254,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
+ install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
+ install-others-nosubdir: $(install-others)
+ install-others-programs-nosubdir: $(install-others-programs)
++install-map-nosubdir: $(addprefix $(inst_libdir)/,\
++		       $(patsubst lib%.map,lib%_pic.map,$(install-map)))
++install-extras-nosubdir: $(addprefix $(inst_libdir)/libc_pic/,\
++		       $(install-extras))
+ 
+ # We need all the `-nosubdir' targets so that `install' in the parent
+ # doesn't depend on several things which each iterate over the subdirs.
+@@ -1230,7 +1267,8 @@ install-%:: install-%-nosubdir ;
+ 
+ .PHONY: install install-no-libc.a-nosubdir
+ install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \
+-			    install-lib-nosubdir install-others-nosubdir
++			    install-lib-nosubdir install-others-nosubdir \
++			    install-map-nosubdir install-extras-nosubdir
+ ifeq ($(build-programs),yes)
+ install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
+ 			    install-rootsbin-nosubdir install-sbin-nosubdir \
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Resolve-__fpscr_values-on-SH4.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Resolve-__fpscr_values-on-SH4.patch
deleted file mode 100644
index 9f3d753..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0023-eglibc-Resolve-__fpscr_values-on-SH4.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 718e7e5db1c8b073adb9a79ec6f167238c2d8bda Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:55:53 +0000
-Subject: [PATCH 23/27] eglibc: Resolve __fpscr_values on SH4
-
-2010-09-29  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>
-            Andrew Stubbs  <ams@codesourcery.com>
-
-        Resolve SH's __fpscr_values to symbol in libc.so.
-
-        * sysdeps/sh/sh4/fpu/fpu_control.h: Add C++ __set_fpscr prototype.
-        * sysdeps/unix/sysv/linux/sh/Versions (GLIBC_2.2): Add __fpscr_values.
-        * sysdeps/unix/sysv/linux/sh/sysdep.S (___fpscr_values): New constant.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- sysdeps/unix/sysv/linux/sh/Versions |  1 +
- sysdeps/unix/sysv/linux/sh/sysdep.S | 11 +++++++++++
- 2 files changed, 12 insertions(+)
-
-diff --git a/sysdeps/unix/sysv/linux/sh/Versions b/sysdeps/unix/sysv/linux/sh/Versions
-index e0938c4..ca1d7da 100644
---- a/sysdeps/unix/sysv/linux/sh/Versions
-+++ b/sysdeps/unix/sysv/linux/sh/Versions
-@@ -2,6 +2,7 @@ libc {
-   GLIBC_2.2 {
-     # functions used in other libraries
-     __xstat64; __fxstat64; __lxstat64;
-+    __fpscr_values;
- 
-     # a*
-     alphasort64;
-diff --git a/sysdeps/unix/sysv/linux/sh/sysdep.S b/sysdeps/unix/sysv/linux/sh/sysdep.S
-index a02b7e2..b9be326 100644
---- a/sysdeps/unix/sysv/linux/sh/sysdep.S
-+++ b/sysdeps/unix/sysv/linux/sh/sysdep.S
-@@ -30,3 +30,14 @@ ENTRY (__syscall_error)
- 
- #define __syscall_error __syscall_error_1
- #include <sysdeps/unix/sh/sysdep.S>
-+
-+       .data
-+       .align 3
-+       .globl ___fpscr_values
-+       .type ___fpscr_values, @object
-+       .size ___fpscr_values, 8
-+___fpscr_values:
-+       .long 0
-+       .long 0x80000
-+weak_alias (___fpscr_values, __fpscr_values)
-+
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-eglibc-options-groups-support.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-eglibc-options-groups-support.patch
deleted file mode 100644
index 0514e28..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0024-eglibc-Forward-port-eglibc-options-groups-support.patch
+++ /dev/null
@@ -1,16842 +0,0 @@
-From 2a5d7bcf0ff791c95ee1388772408a1bf4454694 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 01:33:49 +0000
-Subject: [PATCH 24/27] eglibc: Forward port eglibc options groups support
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makeconfig                              |   20 +-
- Makerules                               |   19 +
- argp/Makefile                           |    2 +
- argp/argp-fmtstream.c                   |   25 +-
- argp/argp-help.c                        |   13 +-
- argp/argp-namefrob.h                    |    2 +
- catgets/Makefile                        |   17 +-
- crypt/Makefile                          |   20 +-
- crypt/crypt-entry.c                     |   13 +
- crypt/crypt_common.c                    |   42 +
- crypt/crypt_util.c                      |   18 -
- csu/Makefile                            |    2 +
- debug/Makefile                          |   41 +-
- debug/segfault.c                        |   11 +-
- debug/tst-chk1.c                        |    7 +
- dlfcn/Makefile                          |    7 +-
- elf/dl-support.c                        |    3 +
- elf/rtld.c                              |   17 +-
- extra-lib.mk                            |    6 +-
- grp/Makefile                            |    5 +
- hesiod/Makefile                         |    6 +-
- iconv/Makefile                          |    7 +
- iconv/gconv_db.c                        |    3 +
- iconv/gconv_trans.c                     |    7 +
- iconv/iconv_prog.c                      |    8 +
- iconvdata/Makefile                      |   27 +-
- include/netdb.h                         |    4 +
- inet/Makefile                           |   22 +-
- intl/Makefile                           |    3 +-
- intl/dcigettext.c                       |   39 +-
- io/Makefile                             |   18 +-
- libidn/Makefile                         |    5 +-
- libidn/toutf8.c                         |   11 +-
- libio/Makefile                          |   66 +-
- libio/__fpurge.c                        |    2 +-
- libio/fileops.c                         |   10 +-
- libio/iofwide.c                         |   26 +
- libio/ioseekoff.c                       |    2 +-
- libio/ioseekpos.c                       |    2 +-
- libio/iosetbuffer.c                     |    4 +
- libio/libioP.h                          |   18 +-
- libio/wdummyfileops.c                   |  161 +
- locale/C-ctype.c                        |   20 +
- locale/Makefile                         |   41 +-
- locale/catnames.c                       |   48 +
- locale/dummy-setlocale.c                |   33 +
- locale/localeinfo.h                     |    2 +-
- locale/programs/charmap-dir.c           |    6 +
- locale/programs/ld-collate.c            |   17 +-
- locale/programs/ld-ctype.c              |   27 +-
- locale/programs/ld-messages.c           |    5 +
- locale/programs/ld-time.c               |   31 +-
- locale/programs/linereader.c            |    2 +-
- locale/programs/localedef.c             |    8 +
- locale/programs/locfile.c               |    5 +-
- locale/programs/locfile.h               |   59 +-
- locale/setlocale.c                      |   30 -
- locale/xlocale.c                        |   37 +
- localedata/Makefile                     |   35 +-
- login/Makefile                          |   17 +-
- malloc/Makefile                         |   10 +-
- malloc/memusage.c                       |    7 +-
- malloc/memusage.sh                      |    2 +-
- math/Makefile                           |    6 +-
- misc/Makefile                           |   25 +-
- misc/err.c                              |   11 +
- misc/error.c                            |    5 +
- misc/tst-efgcvt.c                       |    2 +-
- nis/Makefile                            |   31 +-
- nptl/Makefile                           |   28 +-
- nptl/pthread_create.c                   |    5 +
- nscd/Makefile                           |   33 +-
- nscd/nis_hash.c                         |    3 +
- nss/Makefile                            |   67 +-
- nss/fixed-nsswitch.conf                 |   22 +
- nss/fixed-nsswitch.functions            |  121 +
- nss/gen-fixed-nsswitch.c                |  803 +++
- nss/getent.c                            |   46 +-
- nss/getnssent_r.c                       |    9 +-
- nss/nsswitch.c                          |  109 +-
- nss/nsswitch.h                          |   18 +-
- posix/Makefile                          |   94 +-
- posix/bug-regex1.c                      |    3 +
- posix/bug-regex6.c                      |    8 +-
- posix/fnmatch.c                         |    6 +-
- posix/fnmatch_loop.c                    |   23 +-
- posix/glob.c                            |   15 +-
- posix/regcomp.c                         |   98 +-
- posix/regex.h                           |   11 +
- posix/regex_internal.c                  |   45 +-
- posix/regex_internal.h                  |   23 +-
- posix/regexec-compat.c                  |   39 +
- posix/regexec.c                         |   71 +-
- posix/xregex.c                          | 8215 +++++++++++++++++++++++++++++++
- pwd/Makefile                            |    2 +
- resolv/Makefile                         |   21 +-
- stdio-common/Makefile                   |   35 +-
- stdio-common/_i18n_number.h             |   13 +
- stdio-common/fxprintf.c                 |    5 +
- stdio-common/printf_fp.c                |   22 +
- stdio-common/printf_fphex.c             |   13 +
- stdio-common/printf_size.c              |    8 +
- stdio-common/scanf14.c                  |    3 +
- stdio-common/tst-popen.c                |    3 +
- stdio-common/tst-sprintf.c              |    4 +-
- stdio-common/tstdiomisc.c               |    5 +
- stdio-common/vfprintf.c                 |   31 +-
- stdio-common/vfscanf.c                  |   53 +-
- stdlib/Makefile                         |   34 +-
- stdlib/strtod_l.c                       |   13 +
- stdlib/tst-strtod.c                     |    5 +
- streams/Makefile                        |    5 +-
- string/Makefile                         |   14 +-
- string/strcoll_l.c                      |    5 +
- string/strerror_l.c                     |    5 +
- string/strxfrm_l.c                      |    5 +
- string/test-strcmp.c                    |   28 -
- string/tst-strxfrm.c                    |    3 +
- string/tst-strxfrm2.c                   |    3 +
- sunrpc/Makefile                         |   44 +-
- sysdeps/arm/Makefile                    |    5 +-
- sysdeps/generic/ldsodefs.h              |    8 +
- sysdeps/gnu/Makefile                    |    3 +-
- sysdeps/ieee754/ldbl-opt/Makefile       |   27 +-
- sysdeps/ieee754/ldbl-opt/nldbl-compat.c |   40 +-
- sysdeps/ieee754/ldbl-opt/nldbl-compat.h |   24 +-
- sysdeps/nptl/Makefile                   |    3 +
- sysdeps/nptl/bits/libc-lock.h           |   45 +
- sysdeps/nptl/bits/libc-lockP.h          |   50 +-
- sysdeps/nptl/small-macros-fns.c         |   72 +
- sysdeps/unix/sysv/linux/gethostid.c     |    6 +
- sysdeps/unix/sysv/linux/libc_fatal.c    |    3 +
- time/Makefile                           |   18 +-
- time/strftime_l.c                       |   12 +-
- time/strptime_l.c                       |   14 +-
- timezone/Makefile                       |    2 +-
- wcsmbs/Makefile                         |   27 +-
- wcsmbs/wcsmbsload.c                     |   13 +
- wctype/Makefile                         |   14 +-
- 139 files changed, 11363 insertions(+), 583 deletions(-)
- create mode 100644 crypt/crypt_common.c
- create mode 100644 libio/wdummyfileops.c
- create mode 100644 locale/catnames.c
- create mode 100644 locale/dummy-setlocale.c
- create mode 100644 nscd/nis_hash.c
- create mode 100644 nss/fixed-nsswitch.conf
- create mode 100644 nss/fixed-nsswitch.functions
- create mode 100644 nss/gen-fixed-nsswitch.c
- create mode 100644 posix/regexec-compat.c
- create mode 100644 posix/xregex.c
- create mode 100644 sysdeps/nptl/small-macros-fns.c
-
-diff --git a/Makeconfig b/Makeconfig
-index f136b88..52dae8f 100644
---- a/Makeconfig
-+++ b/Makeconfig
-@@ -609,7 +609,7 @@ elf-objpfx = $(common-objpfx)elf/
- # and run on the build system, causes that program with those
- # arguments to be run on the host for which the library is built.
- ifndef test-wrapper
--test-wrapper =
-+test-wrapper = $(cross-test-wrapper)
- endif
- # Likewise, but the name of the program is preceded by
- # <variable>=<value> assignments for environment variables.
-@@ -1089,6 +1089,24 @@ libm = $(common-objpfx)math/libm.a
- libmvec = $(common-objpfx)mathvec/libmvec.a
- endif
- 
-+# Generate a header file that #defines preprocessor symbols indicating
-+# which option groups are enabled.  Note that the option-groups.config file
-+# may not exist at all.
-+before-compile += $(common-objpfx)gnu/option-groups.h
-+common-generated += gnu/option-groups.h gnu/option-groups.stmp
-+headers += gnu/option-groups.h
-+$(common-objpfx)gnu/option-groups.h: $(common-objpfx)gnu/option-groups.stmp; @:
-+$(common-objpfx)gnu/option-groups.stmp:					\
-+		$(..)scripts/option-groups.awk				\
-+		$(..)option-groups.defaults				\
-+		$(wildcard $(common-objpfx)option-groups.config)
-+	$(make-target-directory)
-+	@rm -f ${@:stmp=T} $@
-+	LC_ALL=C $(AWK) -f $^ > ${@:stmp=T}
-+	$(move-if-change) ${@:stmp=T} ${@:stmp=h}
-+	touch $@
-+
-+
- # These are the subdirectories containing the library source.  The order
- # is more or less arbitrary.  The sorting step will take care of the
- # dependencies.
-diff --git a/Makerules b/Makerules
-index f9ca3f5..1dd41aa 100644
---- a/Makerules
-+++ b/Makerules
-@@ -456,6 +456,25 @@ define sed-remove-objpfx
- endef
- endif
- 
-+# Include targets in the selected option groups.
-+aux                  += $(aux-y)
-+extra-libs           += $(extra-libs-y)
-+extra-libs-others    += $(extra-libs-others-y)
-+extra-objs           += $(extra-objs-y)
-+install-bin          += $(install-bin-y)
-+install-others       += $(install-others-y)
-+install-sbin         += $(install-sbin-y)
-+modules              += $(modules-y)
-+others               += $(others-y)
-+others-pie           += $(others-pie-y)
-+routines             += $(routines-y)
-+static-only-routines += $(static-only-routines-y)
-+sysdep_routines      += $(sysdep_routines-y)
-+test-srcs            += $(test-srcs-y)
-+tests                += $(tests-y)
-+xtests               += $(xtests-y)
-+
-+
- # Modify the list of routines we build for different targets
- 
- ifeq (yes,$(build-shared))
-diff --git a/argp/Makefile b/argp/Makefile
-index 1a87629..f7c1e40 100644
---- a/argp/Makefile
-+++ b/argp/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Makefile for argp.
- #
-+include ../option-groups.mak
-+
- subdir	:= argp
- 
- include ../Makeconfig
-diff --git a/argp/argp-fmtstream.c b/argp/argp-fmtstream.c
-index 2b845e0..c344e7b 100644
---- a/argp/argp-fmtstream.c
-+++ b/argp/argp-fmtstream.c
-@@ -42,6 +42,7 @@
- #ifdef _LIBC
- # include <wchar.h>
- # include <libio/libioP.h>
-+# include <gnu/option-groups.h>
- # define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
- #endif
- 
-@@ -100,7 +101,11 @@ __argp_fmtstream_free (argp_fmtstream_t fs)
-   __argp_fmtstream_update (fs);
-   if (fs->p > fs->buf)
-     {
-+#ifdef _LIBC
-       __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
-+#else
-+      fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
-+#endif
-     }
-   free (fs->buf);
-   free (fs);
-@@ -145,9 +150,17 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
- 	      size_t i;
- 	      for (i = 0; i < pad; i++)
- 		{
-+#ifdef _LIBC
- 		  if (_IO_fwide (fs->stream, 0) > 0)
--		    putwc_unlocked (L' ', fs->stream);
-+                    {
-+#if ! _LIBC || __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-+                      putwc_unlocked (L' ', fs->stream);
-+#else
-+                      abort ();
-+#endif
-+                    }
- 		  else
-+#endif
- 		    putc_unlocked (' ', fs->stream);
- 		}
- 	    }
-@@ -308,9 +321,17 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
- 	      *nl++ = ' ';
- 	  else
- 	    for (i = 0; i < fs->wmargin; ++i)
-+#ifdef _LIBC
- 	      if (_IO_fwide (fs->stream, 0) > 0)
--		putwc_unlocked (L' ', fs->stream);
-+                {
-+#ifdef OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-+                  putwc_unlocked (L' ', fs->stream);
-+#else
-+                  abort ();
-+#endif
-+                }
- 	      else
-+#endif
- 		putc_unlocked (' ', fs->stream);
- 
- 	  /* Copy the tail of the original buffer into the current buffer
-diff --git a/argp/argp-help.c b/argp/argp-help.c
-index b055e45..6b3c4c1 100644
---- a/argp/argp-help.c
-+++ b/argp/argp-help.c
-@@ -51,6 +51,7 @@ char *alloca ();
- #ifdef _LIBC
- # include <../libio/libioP.h>
- # include <wchar.h>
-+# include <gnu/option-groups.h>
- #endif
- 
- #ifndef _
-@@ -1702,7 +1703,7 @@ char *__argp_basename (char *name)
- }
- 
- char *
--__argp_short_program_name (void)
-+(__argp_short_program_name) (void)
- {
- # if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
-   return program_invocation_short_name;
-@@ -1873,9 +1874,17 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
- #endif
- 	    }
- 
-+#ifdef _LIBC
- 	  if (_IO_fwide (stream, 0) > 0)
--	    putwc_unlocked (L'\n', stream);
-+            {
-+#if ! _LIBC || __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-+              putwc_unlocked (L'\n', stream);
-+#else
-+              abort ();
-+#endif
-+            }
- 	  else
-+#endif
- 	    putc_unlocked ('\n', stream);
- 
- #if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
-diff --git a/argp/argp-namefrob.h b/argp/argp-namefrob.h
-index f67c58f..e2002dc 100644
---- a/argp/argp-namefrob.h
-+++ b/argp/argp-namefrob.h
-@@ -76,10 +76,12 @@
- #undef __argp_fmtstream_wmargin
- #define __argp_fmtstream_wmargin argp_fmtstream_wmargin
- 
-+#if 0
- #include "mempcpy.h"
- #include "strcase.h"
- #include "strchrnul.h"
- #include "strndup.h"
-+#endif
- 
- /* normal libc functions we call */
- #undef __flockfile
-diff --git a/catgets/Makefile b/catgets/Makefile
-index 4624a88..05714fd 100644
---- a/catgets/Makefile
-+++ b/catgets/Makefile
-@@ -22,20 +22,23 @@ subdir	:= catgets
- 
- include ../Makeconfig
- 
-+include ../option-groups.mak
-+
- headers		= nl_types.h
--routines	= catgets open_catalog
--others		= gencat
--install-bin	= gencat
--extra-objs	= $(gencat-modules:=.o)
-+routines-$(OPTION_EGLIBC_CATGETS)    := catgets open_catalog
-+others-$(OPTION_EGLIBC_CATGETS)      := gencat
-+install-bin-$(OPTION_EGLIBC_CATGETS) := gencat
-+extra-objs-$(OPTION_EGLIBC_CATGETS)  := $(gencat-modules:=.o)
- 
--tests = tst-catgets
--test-srcs = test-gencat
-+tests-$(OPTION_EGLIBC_CATGETS)       := tst-catgets
-+test-srcs-$(OPTION_EGLIBC_CATGETS)   := test-gencat
- 
-+ifeq (y,$(OPTION_EGLIBC_CATGETS))
- ifeq ($(run-built-tests),yes)
- tests-special += $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
- 		 $(objpfx)sample.SJIS.cat $(objpfx)test-gencat.out
- endif
--
-+endif
- gencat-modules	= xmalloc
- 
- # To find xmalloc.c
-diff --git a/crypt/Makefile b/crypt/Makefile
-index 34c4dd7..7c18c88 100644
---- a/crypt/Makefile
-+++ b/crypt/Makefile
-@@ -18,21 +18,25 @@
- #
- #	Sub-makefile for crypt() portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= crypt
- 
- include ../Makeconfig
- 
- headers := crypt.h
- 
--extra-libs := libcrypt
--extra-libs-others := $(extra-libs)
-+extra-libs-$(OPTION_EGLIBC_CRYPT) := libcrypt
-+extra-libs-others-y := $(extra-libs-y)
- 
--libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \
--		     crypt_util
-+libcrypt-routines :=crypt-entry  md5-crypt sha256-crypt sha512-crypt crypt_common
-+libcrypt-routines-$(OPTION_EGLIBC_CRYPT_UFC) := crypt crypt_util
-+libcrypt-routines += $(libcrypt-routines-y)
- 
--tests := cert md5c-test sha256c-test sha512c-test badsalttest
-+tests-$(OPTION_EGLIBC_CRYPT) := md5c-test sha256c-test sha512c-test badsalttest
-+tests-$(OPTION_EGLIBC_CRYPT_UFC) += cert
- 
--ifeq ($(crypt-in-libc),yes)
-+ifeq ($(crypt-in-libc)$(OPTION_EGLIBC_CRYPT),yesy)
- routines += $(libcrypt-routines)
- endif
- 
-@@ -44,7 +48,7 @@ LDLIBS-crypt.so = -lfreebl3
- else
- libcrypt-routines += md5 sha256 sha512
- 
--tests += md5test sha256test sha512test
-+tests-$(OPTION_EGLIBC_CRYPT) += md5test sha256test sha512test
- 
- # The test md5test-giant uses up to 400 MB of RSS and runs on a fast
- # machine over a minute.
-@@ -64,8 +68,10 @@ $(objpfx)sha256test: $(patsubst %, $(objpfx)%.o,$(sha256-routines))
- $(objpfx)sha512test: $(patsubst %, $(objpfx)%.o,$(sha512-routines))
- endif
- 
-+ifeq ($(OPTION_EGLIBC_CRYPT),y)
- ifeq (yes,$(build-shared))
- $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.so
- else
- $(addprefix $(objpfx),$(tests)): $(objpfx)libcrypt.a
- endif
-+endif # eglibc: OPTION_EGLIBC_CRYPT
-diff --git a/crypt/crypt-entry.c b/crypt/crypt-entry.c
-index 7e655ba..6ae5c2b 100644
---- a/crypt/crypt-entry.c
-+++ b/crypt/crypt-entry.c
-@@ -27,6 +27,7 @@
- #include <stdio.h>
- #endif
- #include <string.h>
-+#include <gnu/option-groups.h>
- #include <errno.h>
- #include <fips-private.h>
- 
-@@ -76,9 +77,11 @@ __crypt_r (key, salt, data)
-      const char *salt;
-      struct crypt_data * __restrict data;
- {
-+#if __OPTION_EGLIBC_CRYPT_UFC
-   ufc_long res[4];
-   char ktab[9];
-   ufc_long xx = 25; /* to cope with GCC long long compiler bugs */
-+#endif /*__OPTION_EGLIBC_CRYPT_UFC*/
- 
- #ifdef _LIBC
-   /* Try to find out whether we have to use MD5 encryption replacement.  */
-@@ -105,6 +108,7 @@ __crypt_r (key, salt, data)
- 			     sizeof (struct crypt_data));
- #endif
- 
-+#if __OPTION_EGLIBC_CRYPT_UFC
-   /*
-    * Hack DES tables according to salt
-    */
-@@ -144,6 +148,10 @@ __crypt_r (key, salt, data)
-    */
-   _ufc_output_conversion_r (res[0], res[1], salt, data);
-   return data->crypt_3_buf;
-+#else /* __OPTION_EGLIBC_CRYPT_UFC */
-+  __set_errno (ENOSYS);
-+  return NULL;
-+#endif /* __OPTION_EGLIBC_CRYPT_UFC */
- }
- weak_alias (__crypt_r, crypt_r)
- 
-@@ -168,7 +176,12 @@ crypt (key, salt)
-     return __sha512_crypt (key, salt);
- #endif
- 
-+#if __OPTION_EGLIBC_CRYPT_UFC
-   return __crypt_r (key, salt, &_ufc_foobar);
-+#else /* __OPTION_EGLIBC_CRYPT_UFC */
-+  __set_errno (ENOSYS);
-+  return NULL;
-+#endif /* __OPTION_EGLIBC_CRYPT_UFC */
- }
- 
- 
-diff --git a/crypt/crypt_common.c b/crypt/crypt_common.c
-new file mode 100644
-index 0000000..cce6a31
---- /dev/null
-+++ b/crypt/crypt_common.c
-@@ -0,0 +1,42 @@
-+/*
-+ * crypt: crypt(3) implementation
-+ *
-+ * Copyright (C) 1991-2014 Free Software Foundation, Inc.
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with this library; see the file COPYING.LIB.  If not,
-+ * see <http://www.gnu.org/licenses/>.
-+ *
-+ * General Support routines
-+ *
-+ */
-+
-+#include "crypt-private.h"
-+
-+/* Table with characters for base64 transformation.  */
-+static const char b64t[64] =
-+"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-+
-+void
-+__b64_from_24bit (char **cp, int *buflen,
-+		  unsigned int b2, unsigned int b1, unsigned int b0,
-+		  int n)
-+{
-+  unsigned int w = (b2 << 16) | (b1 << 8) | b0;
-+  while (n-- > 0 && (*buflen) > 0)
-+    {
-+      *(*cp)++ = b64t[w & 0x3f];
-+      --(*buflen);
-+      w >>= 6;
-+    }
-+}
-diff --git a/crypt/crypt_util.c b/crypt/crypt_util.c
-index 1597885..9297974 100644
---- a/crypt/crypt_util.c
-+++ b/crypt/crypt_util.c
-@@ -242,10 +242,6 @@ static ufc_long eperm32tab[4][256][2];
-  */
- static ufc_long efp[16][64][2];
- 
--/* Table with characters for base64 transformation.  */
--static const char b64t[64] =
--"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
--
- /*
-  * For use by the old, non-reentrant routines
-  * (crypt/encrypt/setkey)
-@@ -949,17 +945,3 @@ setkey(__key)
- {
-   __setkey_r(__key, &_ufc_foobar);
- }
--
--void
--__b64_from_24bit (char **cp, int *buflen,
--		  unsigned int b2, unsigned int b1, unsigned int b0,
--		  int n)
--{
--  unsigned int w = (b2 << 16) | (b1 << 8) | b0;
--  while (n-- > 0 && (*buflen) > 0)
--    {
--      *(*cp)++ = b64t[w & 0x3f];
--      --(*buflen);
--      w >>= 6;
--    }
--}
-diff --git a/csu/Makefile b/csu/Makefile
-index 9f0855a..b1c3363 100644
---- a/csu/Makefile
-+++ b/csu/Makefile
-@@ -22,6 +22,8 @@
- # crtn.o, special "initializer" and "finalizer" files used in the link
- # to make the .init and .fini sections work right.
- 
-+include ../option-groups.mak
-+
- subdir := csu
- 
- include ../Makeconfig
-diff --git a/debug/Makefile b/debug/Makefile
-index 9ff357b..d23d97d 100644
---- a/debug/Makefile
-+++ b/debug/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Sub-makefile for debug portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= debug
- 
- include ../Makeconfig
-@@ -27,7 +29,7 @@ headers	:= execinfo.h
- # Note that ptsname_r_chk and getlogin_r are not here, but in
- # login/Makefile instead.  If that subdir is omitted from the
- # build, its _FORTIFY_SOURCE support will be too.
--routines  = backtrace backtracesyms backtracesymsfd noophooks \
-+routines  = noophooks \
- 	    memcpy_chk memmove_chk mempcpy_chk memset_chk stpcpy_chk \
- 	    strcat_chk strcpy_chk strncat_chk strncpy_chk stpncpy_chk \
- 	    sprintf_chk vsprintf_chk snprintf_chk vsnprintf_chk \
-@@ -36,20 +38,27 @@ routines  = backtrace backtracesyms backtracesymsfd noophooks \
- 	    read_chk pread_chk pread64_chk recv_chk recvfrom_chk \
- 	    readlink_chk readlinkat_chk getwd_chk getcwd_chk \
- 	    realpath_chk fread_chk fread_u_chk \
--	    wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk \
--	    wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk \
--	    wcpncpy_chk \
--	    swprintf_chk vswprintf_chk wprintf_chk fwprintf_chk \
--	    vwprintf_chk vfwprintf_chk fgetws_chk fgetws_u_chk \
- 	    confstr_chk getgroups_chk ttyname_r_chk \
--	    gethostname_chk getdomainname_chk wcrtomb_chk mbsnrtowcs_chk \
--	    wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk \
--	    wcstombs_chk asprintf_chk vasprintf_chk dprintf_chk \
-+	    gethostname_chk getdomainname_chk \
-+	    asprintf_chk vasprintf_chk dprintf_chk \
- 	    vdprintf_chk obprintf_chk \
- 	    longjmp_chk ____longjmp_chk \
- 	    fdelt_chk poll_chk ppoll_chk \
- 	    stack_chk_fail fortify_fail \
- 	    $(static-only-routines)
-+routines-$(OPTION_EGLIBC_BACKTRACE) += backtrace backtracesyms backtracesymsfd
-+routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO)			\
-+	 += wprintf_chk fwprintf_chk				\
-+	    vwprintf_chk vfwprintf_chk fgetws_chk fgetws_u_chk
-+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR)				\
-+	 += wctomb_chk wcscpy_chk wmemcpy_chk wmemmove_chk wmempcpy_chk	\
-+	    wcpcpy_chk wcsncpy_chk wcscat_chk wcsncat_chk wmemset_chk	\
-+	    wcpncpy_chk							\
-+	    swprintf_chk vswprintf_chk					\
-+	    wcrtomb_chk mbsnrtowcs_chk					\
-+	    wcsnrtombs_chk mbsrtowcs_chk wcsrtombs_chk mbstowcs_chk	\
-+	    wcstombs_chk
-+
- static-only-routines := warning-nop stack_chk_fail_local
- 
- CFLAGS-backtrace.c = -fno-omit-frame-pointer
-@@ -131,11 +140,15 @@ LDFLAGS-tst-backtrace4 = -rdynamic
- LDFLAGS-tst-backtrace5 = -rdynamic
- LDFLAGS-tst-backtrace6 = -rdynamic
- 
--tests = backtrace-tst tst-longjmp_chk tst-chk1 tst-chk2 tst-chk3 \
--	tst-lfschk1 tst-lfschk2 tst-lfschk3 test-strcpy_chk test-stpcpy_chk \
--	tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6 \
--	tst-longjmp_chk2 tst-backtrace2 tst-backtrace3 tst-backtrace4 \
--	tst-backtrace5 tst-backtrace6
-+tests = tst-longjmp_chk test-strcpy_chk test-stpcpy_chk tst-longjmp_chk2
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) \
-+      += tst-chk1 tst-chk2 tst-chk3 tst-lfschk1 tst-lfschk2 tst-lfschk3
-+tests-$(OPTION_EGLIBC_BACKTRACE) \
-+      += backtrace-tst tst-backtrace2 tst-backtrace3 tst-backtrace4 \
-+         tst-backtrace5 tst-backtrace6
-+ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_EGLIBC_CXX_TESTS))
-+tests += tst-chk4 tst-chk5 tst-chk6 tst-lfschk4 tst-lfschk5 tst-lfschk6
-+endif
- 
- ifeq (,$(CXX))
- tests-unsupported = tst-chk4 tst-chk5 tst-chk6 \
-diff --git a/debug/segfault.c b/debug/segfault.c
-index 3459a2a..ee9a146 100644
---- a/debug/segfault.c
-+++ b/debug/segfault.c
-@@ -30,6 +30,7 @@
- #include <unistd.h>
- #include <_itoa.h>
- #include <ldsodefs.h>
-+#include <gnu/option-groups.h>
- 
- /* This file defines macros to access the content of the sigcontext element
-    passed up by the signal handler.  */
-@@ -68,11 +69,13 @@ write_strsignal (int fd, int signal)
- static void
- catch_segfault (int signal, SIGCONTEXT ctx)
- {
--  int fd, cnt, i;
--  void **arr;
-+  int fd;
-   struct sigaction sa;
-+#if __OPTION_EGLIBC_BACKTRACE
-+  int cnt, i;
-+  void **arr;
-   uintptr_t pc;
--
-+#endif
-   /* This is the name of the file we are writing to.  If none is given
-      or we cannot write to this file write to stderr.  */
-   fd = 2;
-@@ -91,6 +94,7 @@ catch_segfault (int signal, SIGCONTEXT ctx)
-   REGISTER_DUMP;
- #endif
- 
-+#if __OPTION_EGLIBC_BACKTRACE
-   WRITE_STRING ("\nBacktrace:\n");
- 
-   /* Get the backtrace.  */
-@@ -113,6 +117,7 @@ catch_segfault (int signal, SIGCONTEXT ctx)
- 
-   /* Now generate nicely formatted output.  */
-   __backtrace_symbols_fd (arr + i, cnt - i, fd);
-+#endif
- 
- #ifdef HAVE_PROC_SELF
-   /* Now the link map.  */
-diff --git a/debug/tst-chk1.c b/debug/tst-chk1.c
-index 53559e6..362d92a 100644
---- a/debug/tst-chk1.c
-+++ b/debug/tst-chk1.c
-@@ -31,6 +31,7 @@
- #include <sys/select.h>
- #include <sys/socket.h>
- #include <sys/un.h>
-+#include <gnu/option-groups.h>
- 
- 
- #define obstack_chunk_alloc malloc
-@@ -307,6 +308,7 @@ do_test (void)
-   snprintf (buf + 8, l0 + 3, "%d", num2);
-   CHK_FAIL_END
- 
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-   CHK_FAIL_START
-   swprintf (wbuf + 8, 3, L"%d", num1);
-   CHK_FAIL_END
-@@ -314,6 +316,7 @@ do_test (void)
-   CHK_FAIL_START
-   swprintf (wbuf + 8, l0 + 3, L"%d", num1);
-   CHK_FAIL_END
-+#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
- # endif
- 
-   memcpy (buf, str1 + 2, l0 + 9);
-@@ -381,6 +384,7 @@ do_test (void)
-   CHK_FAIL_END
- #endif
- 
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
- 
-   /* These ops can be done without runtime checking of object size.  */
-   wmemcpy (wbuf, L"abcdefghij", 10);
-@@ -605,6 +609,7 @@ do_test (void)
-   CHK_FAIL_END
- #endif
- 
-+#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
- 
-   /* Now checks for %n protection.  */
- 
-@@ -1192,6 +1197,7 @@ do_test (void)
- # endif
- #endif
- 
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-   if (setlocale (LC_ALL, "de_DE.UTF-8") != NULL)
-     {
-       assert (MB_CUR_MAX <= 10);
-@@ -1348,6 +1354,7 @@ do_test (void)
-       puts ("cannot set locale");
-       ret = 1;
-     }
-+#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
- 
-   int fd = posix_openpt (O_RDWR);
-   if (fd != -1)
-diff --git a/dlfcn/Makefile b/dlfcn/Makefile
-index 759780d..3827607 100644
---- a/dlfcn/Makefile
-+++ b/dlfcn/Makefile
-@@ -15,6 +15,8 @@
- # License along with the GNU C Library; if not, see
- # <http://www.gnu.org/licenses/>.
- 
-+include ../option-groups.mak
-+
- subdir		:= dlfcn
- 
- include ../Makeconfig
-@@ -36,8 +38,11 @@ endif
- ifeq (yes,$(build-shared))
- tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \
- 	bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \
--	bug-atexit3 tstatexit bug-dl-leaf tst-rec-dlopen
-+	tstatexit bug-dl-leaf tst-rec-dlopen
- endif
-+
-+tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3
-+
- modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \
- 		defaultmod2 errmsg1mod modatexit modcxaatexit \
- 		bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \
-diff --git a/elf/dl-support.c b/elf/dl-support.c
-index 4d036f1..c15f405 100644
---- a/elf/dl-support.c
-+++ b/elf/dl-support.c
-@@ -19,6 +19,7 @@
- /* This file defines some things that for the dynamic linker are defined in
-    rtld.c and dl-sysdep.c in ways appropriate to bootstrap dynamic linking.  */
- 
-+#include <gnu/option-groups.h>
- #include <errno.h>
- #include <libintl.h>
- #include <stdlib.h>
-@@ -42,7 +43,9 @@ char **_dl_argv = &__progname;	/* This is checked for some error messages.  */
- const char *_dl_platform;
- size_t _dl_platformlen;
- 
-+#if __OPTION_EGLIBC_RTLD_DEBUG
- int _dl_debug_mask;
-+#endif
- int _dl_lazy;
- ElfW(Addr) _dl_use_load_bias = -2;
- int _dl_dynamic_weak;
-diff --git a/elf/rtld.c b/elf/rtld.c
-index 6d3add7..fc3a2db 100644
---- a/elf/rtld.c
-+++ b/elf/rtld.c
-@@ -16,6 +16,7 @@
-    License along with the GNU C Library; if not, see
-    <http://www.gnu.org/licenses/>.  */
- 
-+#include <gnu/option-groups.h>
- #include <errno.h>
- #include <dlfcn.h>
- #include <fcntl.h>
-@@ -2201,6 +2202,7 @@ print_missing_version (int errcode __attribute__ ((unused)),
- 		    objname, errstring);
- }
- 
-+#if __OPTION_EGLIBC_RTLD_DEBUG
- /* Nonzero if any of the debugging options is enabled.  */
- static int any_debug attribute_relro;
- 
-@@ -2310,6 +2312,7 @@ a filename can be specified using the LD_DEBUG_OUTPUT environment variable.\n");
-       _exit (0);
-     }
- }
-+#endif /* __OPTION_EGLIBC_RTLD_DEBUG */
- 
- static void
- process_dl_audit (char *str)
-@@ -2349,8 +2352,9 @@ process_envvars (enum mode *modep)
-   char **runp = _environ;
-   char *envline;
-   enum mode mode = normal;
-+#if __OPTION_EGLIBC_RTLD_DEBUG
-   char *debug_output = NULL;
--
-+#endif
-   /* This is the default place for profiling data file.  */
-   GLRO(dl_profile_output)
-     = &"/var/tmp\0/var/profile"[__libc_enable_secure ? 9 : 0];
-@@ -2377,12 +2381,14 @@ process_envvars (enum mode *modep)
- 	  break;
- 
- 	case 5:
-+#if __OPTION_EGLIBC_RTLD_DEBUG
- 	  /* Debugging of the dynamic linker?  */
- 	  if (memcmp (envline, "DEBUG", 5) == 0)
- 	    {
- 	      process_dl_debug (&envline[6]);
- 	      break;
- 	    }
-+#endif
- 	  if (memcmp (envline, "AUDIT", 5) == 0)
- 	    process_dl_audit (&envline[6]);
- 	  break;
-@@ -2448,13 +2454,14 @@ process_envvars (enum mode *modep)
- 	      break;
- 	    }
- 
-+#if __OPTION_EGLIBC_RTLD_DEBUG
- 	  /* Where to place the profiling data file.  */
- 	  if (memcmp (envline, "DEBUG_OUTPUT", 12) == 0)
- 	    {
- 	      debug_output = &envline[13];
- 	      break;
- 	    }
--
-+#endif
- 	  if (!__libc_enable_secure
- 	      && memcmp (envline, "DYNAMIC_WEAK", 12) == 0)
- 	    GLRO(dl_dynamic_weak) = 1;
-@@ -2491,7 +2498,9 @@ process_envvars (enum mode *modep)
- 	    {
- 	      mode = trace;
- 	      GLRO(dl_verbose) = 1;
-+#if __OPTION_EGLIBC_RTLD_DEBUG
- 	      GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK;
-+#endif
- 	      GLRO(dl_trace_prelink) = &envline[17];
- 	    }
- 	  break;
-@@ -2538,12 +2547,15 @@ process_envvars (enum mode *modep)
-       if (__access ("/etc/suid-debug", F_OK) != 0)
- 	{
- 	  unsetenv ("MALLOC_CHECK_");
-+#if __OPTION_EGLIBC_RTLD_DEBUG
- 	  GLRO(dl_debug_mask) = 0;
-+#endif
- 	}
- 
-       if (mode != normal)
- 	_exit (5);
-     }
-+#if __OPTION_EGLIBC_RTLD_DEBUG
-   /* If we have to run the dynamic linker in debugging mode and the
-      LD_DEBUG_OUTPUT environment variable is given, we write the debug
-      messages to this file.  */
-@@ -2568,6 +2580,7 @@ process_envvars (enum mode *modep)
- 	/* We use standard output if opening the file failed.  */
- 	GLRO(dl_debug_fd) = STDOUT_FILENO;
-     }
-+#endif /* __OPTION_EGLIBC_RTLD_DEBUG */
- }
- 
- 
-diff --git a/extra-lib.mk b/extra-lib.mk
-index b10748d..d71a06f 100644
---- a/extra-lib.mk
-+++ b/extra-lib.mk
-@@ -25,7 +25,9 @@ install-lib := $(install-lib)
- extra-objs := $(extra-objs)
- 
- # The modules that go in $(lib).
--all-$(lib)-routines := $($(lib)-routines) $($(lib)-sysdep_routines)
-+all-$(lib)-routines := $($(lib)-routines)		\
-+	               $($(lib)-routines-y)		\
-+		       $($(lib)-sysdep_routines)
- 
- # Add each flavor of library to the lists of things to build and install.
- install-lib += $(foreach o,$(object-suffixes-$(lib)),$(lib:lib%=$(libtype$o)))
-@@ -101,7 +103,7 @@ endif
- endif
- 
- # This will define `libof-ROUTINE := LIB' for each of the routines.
--cpp-srcs-left := $($(lib)-routines) $($(lib)-sysdep_routines)
-+cpp-srcs-left := $(all-$(lib)-routines)
- ifneq (,$(cpp-srcs-left))
- include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
- endif
-diff --git a/grp/Makefile b/grp/Makefile
-index c63b552..7486f32 100644
---- a/grp/Makefile
-+++ b/grp/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Sub-makefile for grp portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= grp
- 
- include ../Makeconfig
-@@ -29,6 +31,9 @@ routines := fgetgrent initgroups setgroups \
- 	    getgrent_r getgrgid_r getgrnam_r fgetgrent_r
- 
- tests := testgrp
-+ifneq (y,$(OPTION_EGLIBC_NSSWITCH))
-+LDLIBS-testgrp += $(shell cat $(common-objpfx)nss/fixed-nsswitch-libs)
-+endif
- 
- ifeq (yes,$(build-shared))
- test-srcs :=  tst_fgetgrent
-diff --git a/hesiod/Makefile b/hesiod/Makefile
-index ac0bc01..38263b4 100644
---- a/hesiod/Makefile
-+++ b/hesiod/Makefile
-@@ -18,12 +18,14 @@
- #
- #	Sub-makefile for hesiod portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= hesiod
- 
- include ../Makeconfig
- 
--extra-libs := libnss_hesiod
--extra-libs-others = $(extra-libs)
-+extra-libs-$(OPTION_EGLIBC_INET) += libnss_hesiod
-+extra-libs-others-y += $(extra-libs-y)
- 
- subdir-dirs = nss_hesiod
- vpath %.c nss_hesiod
-diff --git a/iconv/Makefile b/iconv/Makefile
-index 0d55eda..a1847c6 100644
---- a/iconv/Makefile
-+++ b/iconv/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Makefile for iconv.
- #
-+include ../option-groups.mak
-+
- subdir	:= iconv
- 
- include ../Makeconfig
-@@ -39,6 +41,11 @@ CFLAGS-iconv_charmap.c = -I../locale/programs
- CFLAGS-dummy-repertoire.c = -I../locale/programs
- CFLAGS-charmap.c = -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
- 		   -DDEFAULT_CHARMAP=null_pointer -DNEED_NULL_POINTER
-+
-+ifneq (y,$(OPTION_EGLIBC_SPAWN))
-+CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS
-+endif
-+
- CFLAGS-linereader.c = -DNO_TRANSLITERATION
- CFLAGS-simple-hash.c = -I../locale
- 
-diff --git a/iconv/gconv_db.c b/iconv/gconv_db.c
-index ce46216..ea18964 100644
---- a/iconv/gconv_db.c
-+++ b/iconv/gconv_db.c
-@@ -25,6 +25,7 @@
- #include <sys/param.h>
- #include <bits/libc-lock.h>
- #include <locale/localeinfo.h>
-+#include <gnu/option-groups.h>
- 
- #include <dlfcn.h>
- #include <gconv_int.h>
-@@ -828,9 +829,11 @@ free_modules_db (struct gconv_module *node)
- /* Free all resources if necessary.  */
- libc_freeres_fn (free_mem)
- {
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   /* First free locale memory.  This needs to be done before freeing derivations,
-      as ctype cleanup functions dereference steps arrays which we free below.  */
-   _nl_locale_subfreeres ();
-+#endif
- 
-   /* finddomain.c has similar problem.  */
-   extern void _nl_finddomain_subfreeres (void) attribute_hidden;
-diff --git a/iconv/gconv_trans.c b/iconv/gconv_trans.c
-index 5d5d4d7..a7d3072 100644
---- a/iconv/gconv_trans.c
-+++ b/iconv/gconv_trans.c
-@@ -23,6 +23,7 @@
- #include <stdint.h>
- #include <string.h>
- #include <stdlib.h>
-+#include <gnu/option-groups.h>
- 
- #include <bits/libc-lock.h>
- #include "gconv_int.h"
-@@ -38,15 +39,19 @@ __gconv_transliterate (struct __gconv_step *step,
- 		       unsigned char **outbufstart, size_t *irreversible)
- {
-   /* Find out about the locale's transliteration.  */
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   uint_fast32_t size;
-   const uint32_t *from_idx;
-   const uint32_t *from_tbl;
-   const uint32_t *to_idx;
-   const uint32_t *to_tbl;
-+#endif
-   const uint32_t *winbuf;
-   const uint32_t *winbufend;
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   uint_fast32_t low;
-   uint_fast32_t high;
-+#endif
- 
-   /* The input buffer.  There are actually 4-byte values.  */
-   winbuf = (const uint32_t *) *inbufp;
-@@ -58,6 +63,7 @@ __gconv_transliterate (struct __gconv_step *step,
-     PTR_DEMANGLE (fct);
- #endif
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   /* If there is no transliteration information in the locale don't do
-      anything and return the error.  */
-   size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_TAB_SIZE);
-@@ -193,6 +199,7 @@ __gconv_transliterate (struct __gconv_step *step,
-              sorted.  */
- 	  break;
-     }
-+#endif
- 
-   /* One last chance: use the default replacement.  */
-   if (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN) != 0)
-diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
-index e249bce..403ece5 100644
---- a/iconv/iconv_prog.c
-+++ b/iconv/iconv_prog.c
-@@ -35,6 +35,7 @@
- #ifdef _POSIX_MAPPED_FILES
- # include <sys/mman.h>
- #endif
-+#include <gnu/option-groups.h>
- #include <charmap.h>
- #include <gconv_int.h>
- #include "iconv_prog.h"
-@@ -221,10 +222,17 @@ main (int argc, char *argv[])
- 	      bool to_wrong =
- 		(iconv_open (to_code, "UTF-8") == (iconv_t) -1
- 		 && errno == EINVAL);
-+#if __OPTION_EGLIBC_LOCALE_CODE
- 	      const char *from_pretty =
- 		(from_code[0] ? from_code : nl_langinfo (CODESET));
- 	      const char *to_pretty =
- 		(orig_to_code[0] ? orig_to_code : nl_langinfo (CODESET));
-+#else
-+	      const char *from_pretty =
-+		(from_code[0] ? from_code : "ANSI_X3.4-1968");
-+	      const char *to_pretty =
-+                 (orig_to_code[0] ? orig_to_code : "ANSI_X3.4-1968");
-+#endif
- 
- 	      if (from_wrong)
- 		{
-diff --git a/iconvdata/Makefile b/iconvdata/Makefile
-index a3d1d09..0832708 100644
---- a/iconvdata/Makefile
-+++ b/iconvdata/Makefile
-@@ -18,12 +18,15 @@
- #
- #	Makefile for iconv data and code.
- #
-+include ../option-groups.mak
-+
- subdir	:= iconvdata
- 
- include ../Makeconfig
- 
- # Names of all the shared objects which implement the transformations.
--modules	:= ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5		 \
-+modules-$(OPTION_EGLIBC_CHARSETS)					 \
-+	:= ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5		 \
- 	   ISO8859-6 ISO8859-7 ISO8859-8 ISO8859-9 ISO8859-10		 \
- 	   ISO8859-11 ISO8859-13 ISO8859-14 ISO8859-15 ISO8859-16	 \
- 	   T.61 ISO_6937 SJIS KOI-8 HP-ROMAN8 HP-ROMAN9 EBCDIC-AT-DE	 \
-@@ -63,11 +66,13 @@ modules	:= ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5		 \
- 	   MAC-CENTRALEUROPE KOI8-RU ISO8859-9E				 \
- 	   CP770 CP771 CP772 CP773 CP774
- 
--modules.so := $(addsuffix .so, $(modules))
-+modules.so := $(addsuffix .so, $(modules-y))
- 
- ifeq (yes,$(build-shared))
- tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \
--	tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9
-+	tst-iconv6 bug-iconv5 bug-iconv8 bug-iconv9
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) += bug-iconv6 tst-iconv7
-+
- ifeq ($(have-thread-library),yes)
- tests += bug-iconv3
- endif
-@@ -127,13 +132,13 @@ ifeq (yes,$(build-shared))
- # Rule to generate the shared objects.
- charmaps = ../localedata/charmaps
- -include $(objpfx)iconv-rules
--extra-modules-left := $(modules)
-+extra-modules-left := $(modules-y)
- include extra-module.mk
- 
- 
- extra-objs	+= $(modules.so)
--install-others	= $(addprefix $(inst_gconvdir)/, $(modules.so))	\
--		  $(inst_gconvdir)/gconv-modules
-+install-others-y += $(addprefix $(inst_gconvdir)/, $(modules.so))
-+install-others-$(OPTION_EGLIBC_CHARSETS) += $(inst_gconvdir)/gconv-modules
- 
- # We can build the conversion tables for numerous charsets automatically.
- 
-@@ -201,7 +206,7 @@ before-compile += $(addprefix $(objpfx),$(generated-modules:=.h))
- ifndef avoid-generated
- $(objpfx)iconv-rules: Makefile
- 	$(make-target-directory)
--	{ echo $(filter-out lib%, $(modules)); \
-+	{ echo $(filter-out lib%, $(modules-y)); \
- 	  echo 8bit $(gen-8bit-modules); \
- 	  echo 8bit-gap $(gen-8bit-gap-modules); } | \
- 	LC_ALL=C \
-@@ -245,7 +250,7 @@ $(addprefix $(inst_gconvdir)/, $(modules.so)): \
- 	$(do-install-program)
- $(inst_gconvdir)/gconv-modules: gconv-modules $(+force)
- 	$(do-install)
--ifeq (no,$(cross-compiling))
-+# eglibc: ifeq (no,$(cross-compiling))
- # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary
- # if this libc has more gconv modules than the previously installed one.
- 	if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \
-@@ -254,9 +259,9 @@ ifeq (no,$(cross-compiling))
- 	   $(common-objpfx)iconv/iconvconfig \
- 	     $(addprefix --prefix=,$(install_root)); \
- 	fi
--else
--	@echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
--endif
-+# eglibc: else
-+# eglibc:	@echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache'
-+# eglibc: endif
- 
- endif # build-shared = yes
- 
-diff --git a/include/netdb.h b/include/netdb.h
-index e1f051d..f6d15aa 100644
---- a/include/netdb.h
-+++ b/include/netdb.h
-@@ -232,6 +232,10 @@ extern enum nss_status _nss_ ## service ## _gethostbyname2_r		      \
- 		       (const char *name, int af, struct hostent *host,	      \
- 			char *buffer, size_t buflen, int *errnop,	      \
- 			int *h_errnop);					      \
-+extern enum nss_status _nss_ ## service ## _gethostbyname3_r		      \
-+		       (const char *name, int af, struct hostent *result,     \
-+			char *buffer, size_t buflen, int *errnop,	      \
-+			int *h_errnop, int32_t *ttlp, char **canonp);         \
- extern enum nss_status _nss_ ## service ## _gethostbyname_r		      \
- 		       (const char *name, struct hostent *host, char *buffer, \
- 			size_t buflen, int *errnop, int *h_errnop);	      \
-diff --git a/inet/Makefile b/inet/Makefile
-index f1d871f..7cb1709 100644
---- a/inet/Makefile
-+++ b/inet/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Sub-makefile for inet portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= inet
- 
- include ../Makeconfig
-@@ -27,7 +29,8 @@ headers	:= netinet/ether.h netinet/in.h netinet/in_systm.h \
- 	   netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \
- 	   aliases.h ifaddrs.h netinet/ip6.h netinet/icmp6.h bits/in.h
- 
--routines := htonl htons		\
-+routines-$(OPTION_EGLIBC_INET) \
-+	 += htonl htons \
- 	    inet_lnaof inet_mkadr	\
- 	    inet_netof inet_ntoa inet_net herrno herrno-loc \
- 	    gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \
-@@ -39,18 +42,23 @@ routines := htonl htons		\
- 	    getservent_r	\
- 	    ether_aton ether_aton_r ether_hton ether_line \
- 	    ether_ntoa ether_ntoa_r ether_ntoh \
--	    rcmd rexec ruserpass \
- 	    getnetgrent_r getnetgrent \
--	    getaliasent_r getaliasent getaliasname getaliasname_r \
--	    in6_addr getnameinfo if_index ifaddrs inet6_option \
-+	    in6_addr getnameinfo if_index ifaddrs \
- 	    getipv4sourcefilter setipv4sourcefilter \
--	    getsourcefilter setsourcefilter inet6_opt inet6_rth
-+	    getsourcefilter setsourcefilter
-+routines-$(OPTION_EGLIBC_RCMD) \
-+	 += rcmd rexec ruserpass
-+routines-$(OPTION_EGLIBC_DB_ALIASES) \
-+	 += getaliasent_r getaliasent getaliasname getaliasname_r
-+routines-$(OPTION_EGLIBC_ADVANCED_INET6) \
-+	 += inet6_option inet6_opt inet6_rth
- 
--aux := check_pf check_native ifreq
-+aux-$(OPTION_EGLIBC_INET) += check_pf check_native ifreq
- 
- tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
--	 tst-gethnm test-ifaddrs bug-if1 test-inet6_opt tst-ether_line \
-+	 tst-gethnm test-ifaddrs bug-if1 tst-ether_line \
- 	 tst-getni1 tst-getni2 tst-inet6_rth tst-checks
-+tests-$(OPTION_EGLIBC_ADVANCED_INET6) += test-inet6_opt
- 
- include ../Rules
- 
-diff --git a/intl/Makefile b/intl/Makefile
-index 9ecf8fe..587bc0d 100644
---- a/intl/Makefile
-+++ b/intl/Makefile
-@@ -16,6 +16,7 @@
- # <http://www.gnu.org/licenses/>.
- 
- # Makefile for intl subdirectory: message handling code from GNU gettext.
-+include ../option-groups.mak
- 
- subdir = intl
- 
-@@ -48,7 +49,7 @@ endif
- $(objpfx)plural.o: plural.c
- 
- ifeq ($(run-built-tests),yes)
--ifeq (yes,$(build-shared))
-+ifeq (yyyes,$(OPTION_EGLIBC_LOCALES)$(OPTION_EGLIBC_LOCALE_CODE)$(build-shared))
- ifneq ($(strip $(MSGFMT)),:)
- tests-special += $(objpfx)tst-translit.out $(objpfx)tst-gettext.out \
- 		 $(objpfx)tst-gettext2.out $(objpfx)tst-codeset.out \
-diff --git a/intl/dcigettext.c b/intl/dcigettext.c
-index 8a3f091..e271648 100644
---- a/intl/dcigettext.c
-+++ b/intl/dcigettext.c
-@@ -100,11 +100,15 @@ extern int errno;
- # include "libgnuintl.h"
- #endif
- #include "hash-string.h"
-+#ifdef _LIBC
-+# include <gnu/option-groups.h>
-+#endif
- 
- /* Handle multi-threaded applications.  */
- #ifdef _LIBC
- # include <bits/libc-lock.h>
- # define gl_rwlock_define_initialized __libc_rwlock_define_initialized
-+# define gl_rwlock_define __libc_rwlock_define
- # define gl_rwlock_rdlock __libc_rwlock_rdlock
- # define gl_rwlock_wrlock __libc_rwlock_wrlock
- # define gl_rwlock_unlock __libc_rwlock_unlock
-@@ -523,8 +527,10 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
-   saved_errno = errno;
- 
- #ifdef _LIBC
--  __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
--  __libc_rwlock_rdlock (__libc_setlocale_lock);
-+# if __OPTION_EGLIBC_LOCALE_CODE
-+  gl_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
-+  gl_rwlock_rdlock (__libc_setlocale_lock);
-+# endif
- #endif
- 
-   gl_rwlock_rdlock (_nl_state_lock);
-@@ -550,7 +556,11 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
- #ifdef HAVE_PER_THREAD_LOCALE
- # ifndef IN_LIBGLOCALE
- #  ifdef _LIBC
--  localename = strdupa (__current_locale_name (category));
-+#   if __OPTION_EGLIBC_LOCALE_CODE
-+      localename = strdupa (__current_locale_name (category));
-+#   else
-+      localename = "C";
-+#   endif
- #  else
-   categoryname = category_to_name (category);
- #   define CATEGORYNAME_INITIALIZED
-@@ -581,10 +591,12 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
-       else
- 	retval = (char *) (*foundp)->translation;
- 
--      gl_rwlock_unlock (_nl_state_lock);
- # ifdef _LIBC
--      __libc_rwlock_unlock (__libc_setlocale_lock);
-+#  if __OPTION_EGLIBC_LOCALE_CODE
-+      gl_rwlock_unlock (__libc_setlocale_lock);
-+#  endif
- # endif
-+      gl_rwlock_unlock (_nl_state_lock);
-       __set_errno (saved_errno);
-       return retval;
-     }
-@@ -838,10 +850,13 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
- 	      if (plural)
- 		retval = plural_lookup (domain, n, retval, retlen);
- 
--	      gl_rwlock_unlock (_nl_state_lock);
- #ifdef _LIBC
--	      __libc_rwlock_unlock (__libc_setlocale_lock);
-+# if __OPTION_EGLIBC_LOCALE_CODE
-+
-+	      gl_rwlock_unlock (__libc_setlocale_lock);
-+# endif
- #endif
-+	      gl_rwlock_unlock (_nl_state_lock);
- 	      return retval;
- 	    }
- 	}
-@@ -850,10 +865,12 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
-  return_untranslated:
-   /* Return the untranslated MSGID.  */
-   FREE_BLOCKS (block_list);
--  gl_rwlock_unlock (_nl_state_lock);
- #ifdef _LIBC
--  __libc_rwlock_unlock (__libc_setlocale_lock);
-+# if __OPTION_EGLIBC_LOCALE_CODE
-+   gl_rwlock_unlock (__libc_setlocale_lock);
-+# endif
- #endif
-+  gl_rwlock_unlock (_nl_state_lock);
- #ifndef _LIBC
-   if (!ENABLE_SECURE)
-     {
-@@ -1550,7 +1567,11 @@ guess_category_value (int category, const char *categoryname)
-      `LC_xxx', and `LANG'.  On some systems this can be done by the
-      `setlocale' function itself.  */
- # ifdef _LIBC
-+#  if __OPTION_EGLIBC_LOCALE_CODE
-   locale = __current_locale_name (category);
-+#  else
-+  locale = "C";
-+#  endif
- # else
-   locale_defaulted = 0;
- #  if HAVE_USELOCALE
-diff --git a/io/Makefile b/io/Makefile
-index 613dce0..697439e 100644
---- a/io/Makefile
-+++ b/io/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Sub-makefile for I/O portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= io
- 
- include ../Makeconfig
-@@ -36,7 +38,7 @@ routines :=								\
- 	fxstatat fxstatat64						\
- 	statfs fstatfs statfs64 fstatfs64				\
- 	statvfs fstatvfs statvfs64 fstatvfs64				\
--	umask chmod fchmod lchmod fchmodat				\
-+	umask chmod fchmod fchmodat					\
- 	mkdir mkdirat							\
- 	open open_2 open64 open64_2 openat openat_2 openat64 openat64_2	\
- 	read write lseek lseek64 access euidaccess faccessat		\
-@@ -49,11 +51,13 @@ routines :=								\
- 	ttyname ttyname_r isatty					\
- 	link linkat symlink symlinkat readlink readlinkat		\
- 	unlink unlinkat rmdir						\
--	ftw ftw64 fts poll ppoll					\
-+	poll ppoll							\
- 	posix_fadvise posix_fadvise64					\
- 	posix_fallocate posix_fallocate64				\
- 	sendfile sendfile64 \
- 	utimensat futimens
-+routines-$(OPTION_EGLIBC_BSD) += lchmod
-+routines-$(OPTION_EGLIBC_FTRAVERSE) += ftw ftw64 fts
- 
- aux := have_o_cloexec
- 
-@@ -64,18 +68,22 @@ static-only-routines = stat fstat lstat stat64 fstat64 lstat64	\
- 		       fstatat fstatat64 mknod mknodat
- 
- others		:= pwd
--test-srcs	:= ftwtest
-+test-srcs-$(OPTION_EGLIBC_FTRAVERSE) := ftwtest
- tests		:= test-utime test-stat test-stat2 test-lfs tst-getcwd \
--		   tst-fcntl bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4 tst-statvfs \
-+		   tst-fcntl tst-statvfs \
- 		   tst-openat tst-unlinkat tst-fstatat tst-futimesat \
- 		   tst-renameat tst-fchownat tst-fchmodat tst-faccessat \
- 		   tst-symlinkat tst-linkat tst-readlinkat tst-mkdirat \
--		   tst-mknodat tst-mkfifoat tst-ttyname_r bug-ftw5 \
-+		   tst-mknodat tst-mkfifoat tst-ttyname_r \
- 		   tst-posix_fallocate
-+tests-$(OPTION_EGLIBC_FTRAVERSE) += bug-ftw1 bug-ftw2 bug-ftw3 bug-ftw4 \
-+				    bug-ftw5
- 
- ifeq ($(run-built-tests),yes)
-+ifeq (y,$(OPTION_EGLIBC_FTRAVERSE))
- tests-special += $(objpfx)ftwtest.out
- endif
-+endif
- 
- include ../Rules
- 
-diff --git a/libidn/Makefile b/libidn/Makefile
-index 940fa52..43aad0c 100644
---- a/libidn/Makefile
-+++ b/libidn/Makefile
-@@ -16,6 +16,7 @@
- # <http://www.gnu.org/licenses/>.
- 
- # Makefile for libidn subdirectory of GNU C Library.
-+include ../option-groups.mak
- 
- subdir	:= libidn
- 
-@@ -23,8 +24,8 @@ include ../Makeconfig
- 
- routines = idn-stub
- 
--extra-libs		= libcidn
--extra-libs-others	= $(extra-libs)
-+extra-libs-$(OPTION_EGLIBC_IDN) = libcidn
-+extra-libs-others-y = $(extra-libs-y)
- 
- libcidn-routines := punycode toutf8 nfkc stringprep rfc3454 profiles idna \
- 		    iconvme
-diff --git a/libidn/toutf8.c b/libidn/toutf8.c
-index c7e67ca..62df478 100644
---- a/libidn/toutf8.c
-+++ b/libidn/toutf8.c
-@@ -33,6 +33,11 @@
- /* Get strlen. */
- #include <string.h>
- 
-+/* Get __OPTION_EGLIBC_LOCALE_CODE.  */
-+#ifdef _LIBC
-+# include <gnu/option-groups.h>
-+#endif
-+
- /* Get iconv_string. */
- #include "iconvme.h"
- 
-@@ -47,7 +52,11 @@
- #endif
- 
- #ifdef _LIBC
--# define stringprep_locale_charset() nl_langinfo (CODESET)
-+# if __OPTION_EGLIBC_LOCALE_CODE
-+#  define stringprep_locale_charset() nl_langinfo (CODESET)
-+# else
-+#  define stringprep_locale_charset() "ANSI_X3.4-1968"
-+# endif
- #else
- /**
-  * stringprep_locale_charset - return charset used in current locale
-diff --git a/libio/Makefile b/libio/Makefile
-index 7b3bcf9..27c9186 100644
---- a/libio/Makefile
-+++ b/libio/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Specific makefile for libio.
- #
-+include ../option-groups.mak
-+
- subdir	:= libio
- 
- include ../Makeconfig
-@@ -27,16 +29,13 @@ headers	:= stdio.h libio.h _G_config.h bits/stdio.h bits/stdio-lock.h \
- 
- routines	:=							      \
- 	filedoalloc iofclose iofdopen iofflush iofgetpos iofgets iofopen      \
--	iofopncook iofputs iofread iofsetpos ioftell wfiledoalloc	      \
-+	iofopncook iofputs iofread iofsetpos ioftell			      \
- 	iofwrite iogetdelim iogetline iogets iopadn iopopen ioputs	      \
- 	ioseekoff ioseekpos iosetbuffer iosetvbuf ioungetc		      \
- 	iovsprintf iovsscanf						      \
- 	iofgetpos64 iofopen64 iofsetpos64				      \
--	fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \
--	iofputws iofputws_u iogetwline iowpadn ioungetwc putwc putwc_u	      \
--	putwchar putwchar_u putchar putchar_u fwprintf swprintf vwprintf      \
--	wprintf wscanf fwscanf vwscanf vswprintf iovswscanf swscanf wgenops   \
--	wstrops wfileops iofwide fwide wmemstream			      \
-+	putchar putchar_u						      \
-+	iofwide								      \
- 									      \
- 	clearerr feof ferror fileno fputc freopen fseek getc getchar	      \
- 	memstream pclose putc putchar rewind setbuf setlinebuf vasprintf      \
-@@ -48,24 +47,49 @@ routines	:=							      \
- 									      \
- 	libc_fatal fmemopen oldfmemopen
- 
--tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc   \
--	tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \
--	tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf	      \
--	tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof          \
--	tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \
-+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) +=				      \
-+	wfiledoalloc                                                          \
-+	iowpadn                                                               \
-+	swprintf                                                              \
-+	vswprintf iovswscanf swscanf wgenops                                  \
-+	wstrops wfileops wmemstream
-+routines-$(call option-disabled, OPTION_POSIX_C_LANG_WIDE_CHAR) +=	      \
-+	wdummyfileops
-+routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) +=				      \
-+	fputwc fputwc_u getwc getwc_u getwchar getwchar_u iofgetws iofgetws_u \
-+	iofputws iofputws_u iogetwline ioungetwc putwc putwc_u                \
-+	putwchar putwchar_u fwprintf vwprintf                                 \
-+	wprintf wscanf fwscanf vwscanf                                        \
-+	fwide
-+
-+tests = test-fmemopen tst-ext tst-ext2 \
-+	tst-mmap-setvbuf tst-atime tst-eof \
-+	tst-freopen bug-ungetc bug-fseek \
- 	tst-mmap-eofsync tst-mmap-fflushsync bug-mmap-fflush \
--	tst-mmap2-eofsync tst-mmap-offend bug-fopena+ bug-wfflush \
--	bug-ungetc2 bug-ftell bug-ungetc3 bug-ungetc4 tst-fopenloc2 \
-+	tst-mmap2-eofsync tst-mmap-offend bug-fopena+ \
-+	bug-ungetc2 bug-ungetc3 bug-ungetc4 \
- 	tst-memstream1 tst-memstream2 \
--	tst-wmemstream1 tst-wmemstream2 \
--	bug-memstream1 bug-wmemstream1 \
--	tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \
--	tst-fwrite-error tst-ftell-partial-wide tst-ftell-active-handler \
--	tst-ftell-append tst-fputws
-+	bug-memstream1 tst-popen1 tst-fwrite-error \
-+	tst-ftell-active-handler tst-ftell-append
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) \
-+	+= tst-swscanf tst-fgetws tst-setvbuf1 \
-+	tst-ungetwc1 tst-ungetwc2 bug-ftell bug-ungetwc2 \
-+	tst-widetext tst-fputws
-+tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
-+	+= bug-rewind bug-rewind2 bug-ungetwc1 \
-+	bug-wfflush bug-wmemstream1 tst-fopenloc2 \
-+	tst_getwc \
-+	tst_putwc tst_wprintf tst_wprintf2 tst_wscanf \
-+	tst-fgetwc bug-wsetpos tst-fseek tst-ftell-partial-wide
-+tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
-+	+= tst_swprintf tst_swscanf \
-+	tst-sscanf \
-+	tst-wmemstream1 tst-wmemstream2
-+
- ifeq (yes,$(build-shared))
- # Add test-fopenloc only if shared library is enabled since it depends on
- # shared localedata objects.
--tests += tst-fopenloc
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-fopenloc
- endif
- test-srcs = test-freopen
- 
-@@ -164,13 +188,17 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops	\
- 		       oldiofsetpos64
- 
- ifeq ($(run-built-tests),yes)
-+ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO))
- tests-special += $(objpfx)test-freopen.out
-+endif
-+ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
- ifeq (yes,$(build-shared))
- # Run tst-fopenloc-cmp.out and tst-openloc-mem.out only if shared
- # library is enabled since they depend on tst-fopenloc.out.
- tests-special += $(objpfx)tst-fopenloc-cmp.out $(objpfx)tst-fopenloc-mem.out
- endif
- endif
-+endif
- 
- include ../Rules
- 
-diff --git a/libio/__fpurge.c b/libio/__fpurge.c
-index 065cf61..e32a3e9 100644
---- a/libio/__fpurge.c
-+++ b/libio/__fpurge.c
-@@ -21,7 +21,7 @@
- void
- __fpurge (FILE *fp)
- {
--  if (fp->_mode > 0)
-+  if (_IO_is_wide (fp))
-     {
-       /* Wide-char stream.  */
-       if (_IO_in_backup (fp))
-diff --git a/libio/fileops.c b/libio/fileops.c
-index cbcd6f5..19e43c2 100644
---- a/libio/fileops.c
-+++ b/libio/fileops.c
-@@ -39,6 +39,7 @@
- #include <string.h>
- #include <errno.h>
- #include <unistd.h>
-+#include <gnu/option-groups.h>
- #include <stdlib.h>
- #if _LIBC
- # include "../wcsmbs/wcsmbsload.h"
-@@ -173,7 +174,7 @@ _IO_new_file_close_it (_IO_FILE *fp)
- 
-   /* Free buffer. */
- #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
--  if (fp->_mode > 0)
-+  if (_IO_is_wide (fp))
-     {
-       if (_IO_have_wbackup (fp))
- 	_IO_free_wbackup_area (fp);
-@@ -348,6 +349,7 @@ _IO_new_file_fopen (_IO_FILE *fp, const char *filename, const char *mode,
-       cs = strstr (last_recognized + 1, ",ccs=");
-       if (cs != NULL)
- 	{
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- 	  /* Yep.  Load the appropriate conversions and set the orientation
- 	     to wide.  */
- 	  struct gconv_fcts fcts;
-@@ -418,6 +420,12 @@ _IO_new_file_fopen (_IO_FILE *fp, const char *filename, const char *mode,
- 
- 	  /* Set the mode now.  */
- 	  result->_mode = 1;
-+#else
-+          /* Treat this as if we couldn't find the given character set.  */
-+          (void) _IO_file_close_it (fp);
-+          __set_errno (EINVAL);
-+          return NULL;
-+#endif
- 	}
-     }
- 
-diff --git a/libio/iofwide.c b/libio/iofwide.c
-index 0c175d1..3e9f52b 100644
---- a/libio/iofwide.c
-+++ b/libio/iofwide.c
-@@ -26,6 +26,7 @@
- 
- #include <libioP.h>
- #ifdef _LIBC
-+# include <gnu/option-groups.h>
- # include <dlfcn.h>
- # include <wchar.h>
- #endif
-@@ -43,6 +44,8 @@
- #endif
- 
- 
-+#if ! defined _LIBC || __OPTION_POSIX_C_LANG_WIDE_CHAR
-+
- /* Prototypes of libio's codecvt functions.  */
- static enum __codecvt_result do_out (struct _IO_codecvt *codecvt,
- 				     __mbstate_t *statep,
-@@ -499,3 +502,26 @@ do_max_length (struct _IO_codecvt *codecvt)
-   return MB_CUR_MAX;
- #endif
- }
-+
-+#else
-+/* OPTION_POSIX_C_LANG_WIDE_CHAR is disabled.  */
-+
-+#undef _IO_fwide
-+int
-+_IO_fwide (fp, mode)
-+     _IO_FILE *fp;
-+     int mode;
-+{
-+  /* Die helpfully if the user tries to create a wide stream; I
-+     disbelieve that most users check the return value from
-+     'fwide (fp, 1)'.  */
-+  assert (mode <= 0);
-+
-+  /* We can only make streams byte-oriented, which is trivial.  */
-+  if (mode < 0)
-+    fp->_mode = -1;
-+
-+  return fp->_mode;
-+}
-+
-+#endif
-diff --git a/libio/ioseekoff.c b/libio/ioseekoff.c
-index 11765cf..15d6230 100644
---- a/libio/ioseekoff.c
-+++ b/libio/ioseekoff.c
-@@ -60,7 +60,7 @@ _IO_seekoff_unlocked (fp, offset, dir, mode)
- 	  else
- 	    abort ();
- 	}
--      if (_IO_fwide (fp, 0) < 0)
-+      if (! _IO_is_wide (fp))
- 	_IO_free_backup_area (fp);
-       else
- 	_IO_free_wbackup_area (fp);
-diff --git a/libio/ioseekpos.c b/libio/ioseekpos.c
-index a7652a1..6938b68 100644
---- a/libio/ioseekpos.c
-+++ b/libio/ioseekpos.c
-@@ -35,7 +35,7 @@ _IO_seekpos_unlocked (fp, pos, mode)
-   /* If we have a backup buffer, get rid of it, since the __seekoff
-      callback may not know to do the right thing about it.
-      This may be over-kill, but it'll do for now. TODO */
--  if (_IO_fwide (fp, 0) <= 0)
-+  if (! _IO_is_wide (fp))
-     {
-       if (_IO_have_backup (fp))
- 	_IO_free_backup_area (fp);
-diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c
-index 0a41c10..3d99fa0 100644
---- a/libio/iosetbuffer.c
-+++ b/libio/iosetbuffer.c
-@@ -24,6 +24,8 @@
-    This exception applies to code released by its copyright holders
-    in files containing the exception.  */
- 
-+#include <gnu/option-groups.h>
-+
- #include "libioP.h"
- 
- void
-@@ -38,9 +40,11 @@ _IO_setbuffer (fp, buf, size)
-   if (!buf)
-     size = 0;
-   (void) _IO_SETBUF (fp, buf, size);
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-   if (_IO_vtable_offset (fp) == 0 && fp->_mode == 0 && _IO_CHECK_WIDE (fp))
-     /* We also have to set the buffer using the wide char function.  */
-     (void) _IO_WSETBUF (fp, buf, size);
-+#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
-   _IO_release_lock (fp);
- }
- libc_hidden_def (_IO_setbuffer)
-diff --git a/libio/libioP.h b/libio/libioP.h
-index 0f16e2d..d2626d6 100644
---- a/libio/libioP.h
-+++ b/libio/libioP.h
-@@ -44,6 +44,10 @@
- /*# include <comthread.h>*/
- #endif
- 
-+#if defined _LIBC
-+# include <gnu/option-groups.h>
-+#endif
-+
- #include <math_ldbl_opt.h>
- 
- #include "iolibio.h"
-@@ -523,8 +527,20 @@ extern void _IO_old_init (_IO_FILE *fp, int flags) __THROW;
- 
- 
- #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
-+
-+/* _IO_is_wide (fp) is roughly equivalent to '_IO_fwide (fp, 0) > 0',
-+   except that when OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, it
-+   expands to a constant, allowing the compiler to realize that it can
-+   eliminate code that references wide stream handling functions.
-+   This, in turn, allows us to omit them.  */
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-+# define _IO_is_wide(_f) ((_f)->_mode > 0)
-+#else
-+# define _IO_is_wide(_f) (0)
-+#endif
-+
- # define _IO_do_flush(_f) \
--  ((_f)->_mode <= 0							      \
-+  (! _IO_is_wide (_f)                                                         \
-    ? _IO_do_write(_f, (_f)->_IO_write_base,				      \
- 		  (_f)->_IO_write_ptr-(_f)->_IO_write_base)		      \
-    : _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base,		      \
-diff --git a/libio/wdummyfileops.c b/libio/wdummyfileops.c
-new file mode 100644
-index 0000000..c0150b8
---- /dev/null
-+++ b/libio/wdummyfileops.c
-@@ -0,0 +1,161 @@
-+/* Copyright (C) 2007 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.
-+
-+   As a special exception, if you link the code in this file with
-+   files compiled with a GNU compiler to produce an executable,
-+   that does not cause the resulting executable to be covered by
-+   the GNU Lesser General Public License.  This exception does not
-+   however invalidate any other reasons why the executable file
-+   might be covered by the GNU Lesser General Public License.
-+   This exception applies to code released by its copyright holders
-+   in files containing the exception.  */
-+
-+#include <assert.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <libioP.h>
-+
-+static void __THROW __attribute__ ((__noreturn__))
-+_IO_wfile_wide_char_support_disabled (void)
-+{
-+  static const char errstr[]
-+    = ("The application tried to use wide character I/O, but libc.so"
-+       " was compiled\n"
-+       "with the OPTION_POSIX_C_LANG_WIDE_CHAR option group disabled.\n");
-+  __libc_write (STDERR_FILENO, errstr, sizeof (errstr) - 1);
-+  abort ();
-+}
-+
-+static void
-+_IO_wfile_disabled_void_int (_IO_FILE *fp, int x)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static int
-+_IO_wfile_disabled_int_int (_IO_FILE *fp, int x)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static int
-+_IO_wfile_disabled_int_none (_IO_FILE *fp)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static _IO_size_t
-+_IO_wfile_disabled_xsputn (_IO_FILE *fp, const void *data, _IO_size_t n)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static _IO_size_t
-+_IO_wfile_disabled_xsgetn (_IO_FILE *fp, void *data, _IO_size_t n)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static _IO_off64_t
-+_IO_wfile_disabled_seekoff (_IO_FILE *fp, _IO_off64_t off, int dir, int mode)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static _IO_off64_t
-+_IO_wfile_disabled_seekpos (_IO_FILE *fp, _IO_off64_t pos, int flags)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static _IO_FILE *
-+_IO_wfile_disabled_setbuf (_IO_FILE *fp, char *buffer, _IO_ssize_t length)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static _IO_ssize_t
-+_IO_wfile_disabled_read (_IO_FILE *fp, void *buffer, _IO_ssize_t length)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static _IO_ssize_t
-+_IO_wfile_disabled_write (_IO_FILE *fp, const void *buffer, _IO_ssize_t length)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static _IO_off64_t
-+_IO_wfile_disabled_seek (_IO_FILE *fp, _IO_off64_t offset, int mode)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static int
-+_IO_wfile_disabled_close (_IO_FILE *fp)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static int
-+_IO_wfile_disabled_stat (_IO_FILE *fp, void *buf)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static int
-+_IO_wfile_disabled_showmanyc (_IO_FILE *fp)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static void
-+_IO_wfile_disabled_imbue (_IO_FILE *fp, void *locale)
-+{
-+  _IO_wfile_wide_char_support_disabled ();
-+}
-+
-+static const struct _IO_jump_t _IO_wfile_jumps_disabled =
-+{
-+  JUMP_INIT_DUMMY,
-+  JUMP_INIT(finish, _IO_wfile_disabled_void_int),
-+  JUMP_INIT(overflow, _IO_wfile_disabled_int_int),
-+  JUMP_INIT(underflow, _IO_wfile_disabled_int_none),
-+  JUMP_INIT(uflow, _IO_wfile_disabled_int_none),
-+  JUMP_INIT(pbackfail, _IO_wfile_disabled_int_int),
-+  JUMP_INIT(xsputn, _IO_wfile_disabled_xsputn),
-+  JUMP_INIT(xsgetn, _IO_wfile_disabled_xsgetn),
-+  JUMP_INIT(seekoff, _IO_wfile_disabled_seekoff),
-+  JUMP_INIT(seekpos, _IO_wfile_disabled_seekpos),
-+  JUMP_INIT(setbuf, _IO_wfile_disabled_setbuf),
-+  JUMP_INIT(sync, _IO_wfile_disabled_int_none),
-+  JUMP_INIT(doallocate, _IO_wfile_disabled_int_none),
-+  JUMP_INIT(read, _IO_wfile_disabled_read),
-+  JUMP_INIT(write, _IO_wfile_disabled_write),
-+  JUMP_INIT(seek, _IO_wfile_disabled_seek),
-+  JUMP_INIT(close, _IO_wfile_disabled_close),
-+  JUMP_INIT(stat, _IO_wfile_disabled_stat),
-+  JUMP_INIT(showmanyc, _IO_wfile_disabled_showmanyc),
-+  JUMP_INIT(imbue, _IO_wfile_disabled_imbue)
-+};
-+
-+strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps)
-+libc_hidden_data_def (_IO_wfile_jumps)
-+strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_mmap)
-+strong_alias (_IO_wfile_jumps_disabled, _IO_wfile_jumps_maybe_mmap)
-diff --git a/locale/C-ctype.c b/locale/C-ctype.c
-index aa5f19f..06be081 100644
---- a/locale/C-ctype.c
-+++ b/locale/C-ctype.c
-@@ -19,8 +19,11 @@
- #include "localeinfo.h"
- #include <endian.h>
- #include <stdint.h>
-+#include <gnu/option-groups.h>
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
- #include "C-translit.h"
-+#endif
- 
- /* This table's entries are taken from POSIX.2 Table 2-6
-    ``LC_CTYPE Category Definition in the POSIX Locale''.
-@@ -634,6 +637,7 @@ const struct __locale_data _nl_C_LC_CTYPE attribute_hidden =
-     { .word = L'7' },
-     { .word = L'8' },
-     { .word = L'9' },
-+#if __OPTION_EGLIBC_LOCALE_CODE
-     /* _NL_CTYPE_TRANSLIT_TAB_SIZE */
-     { .word = NTRANSLIT },
-     /* _NL_CTYPE_TRANSLIT_FROM_IDX */
-@@ -644,6 +648,22 @@ const struct __locale_data _nl_C_LC_CTYPE attribute_hidden =
-     { .wstr = translit_to_idx },
-     /* _NL_CTYPE_TRANSLIT_TO_TBL */
-     { .wstr = (uint32_t *) translit_to_tbl },
-+#else
-+    /* If the locale code isn't enabled, we don't have the
-+       transliteration code in iconv/gconv_trans.c anyway, so there's
-+       no need for the transliteration tables here.  We'll fall back
-+       on the default missing replacement, '?'.  */
-+    /* _NL_CTYPE_TRANSLIT_TAB_SIZE */
-+    { .word = 0 },
-+    /* _NL_CTYPE_TRANSLIT_FROM_IDX */
-+    { .wstr = NULL },
-+    /* _NL_CTYPE_TRANSLIT_FROM_TBL */
-+    { .wstr = NULL },
-+    /* _NL_CTYPE_TRANSLIT_TO_IDX */
-+    { .wstr = NULL },
-+    /* _NL_CTYPE_TRANSLIT_TO_TBL */
-+    { .wstr = NULL },
-+#endif
-     /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING_LEN */
-     { .word = 1 },
-     /* _NL_CTYPE_TRANSLIT_DEFAULT_MISSING */
-diff --git a/locale/Makefile b/locale/Makefile
-index f1b4343..599a1a9 100644
---- a/locale/Makefile
-+++ b/locale/Makefile
-@@ -18,27 +18,43 @@
- #
- #	Makefile for locales.
- #
-+include ../option-groups.mak
-+
- subdir	:= locale
- 
- include ../Makeconfig
- 
- headers		= locale.h bits/locale.h langinfo.h xlocale.h
--routines	= setlocale findlocale loadlocale loadarchive \
--		  localeconv nl_langinfo nl_langinfo_l mb_cur_max \
--		  newlocale duplocale freelocale uselocale
--tests		= tst-C-locale tst-locname tst-duplocale
-+# catnames is needed by OPTION_EGLIBC_LOCALE_CODE and by the 'intl' code.
-+# If we put the latter in an option group, too, we can omit catnames
-+# when both option groups are disabled.  libstdc++-v3 needs mb_cur_max.
-+routines-y      := catnames mb_cur_max
-+routines-$(OPTION_EGLIBC_LOCALE_CODE) \
-+		+= setlocale findlocale loadlocale loadarchive \
-+		   localeconv nl_langinfo nl_langinfo_l \
-+		   newlocale duplocale freelocale uselocale
-+ifneq (y,$(OPTION_EGLIBC_LOCALE_CODE))
-+routines-y	+= dummy-setlocale
-+endif
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-C-locale tst-locname tst-duplocale
- categories	= ctype messages monetary numeric time paper name \
- 		  address telephone measurement identification collate
--aux		= $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
--		  xlocale localename global-locale coll-lookup
--others		= localedef locale
-+# C-messages belongs in an intl option group.
-+aux-y		:= C-ctype C-time \
-+		   SYS_libc C_name xlocale global-locale coll-lookup
-+aux-$(OPTION_EGLIBC_LOCALE_CODE) \
-+		+= $(filter-out $(aux-y), \
-+	                        $(categories:%=lc-%) $(categories:%=C-%)) \
-+	           localename
-+others-$(OPTION_EGLIBC_LOCALE_CODE) = localedef locale
- #others-static	= localedef locale
--install-bin	= localedef locale
--extra-objs	= $(localedef-modules:=.o) $(localedef-aux:=.o) \
-+install-bin	= $(others-y)
-+extra-objs-$(OPTION_EGLIBC_LOCALE_CODE) \
-+		= $(localedef-modules:=.o) $(localedef-aux:=.o) \
- 		  $(locale-modules:=.o) $(lib-modules:=.o)
- 
--extra-libs	= libBrokenLocale
--extra-libs-others = $(extra-libs)
-+extra-libs-$(OPTION_EGLIBC_LOCALE_CODE) = libBrokenLocale
-+extra-libs-others = $(extra-libs-y)
- 
- libBrokenLocale-routines = broken_cur_max
- 
-@@ -93,6 +109,9 @@ CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \
- CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
- CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
- CFLAGS-charmap-dir.c = -Wno-write-strings
-+ifneq (y,$(OPTION_EGLIBC_SPAWN))
-+CFLAGS-charmap-dir.c += -DNO_UNCOMPRESS
-+endif
- 
- # Set libof-* for each routine.
- cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \
-diff --git a/locale/catnames.c b/locale/catnames.c
-new file mode 100644
-index 0000000..9fad357
---- /dev/null
-+++ b/locale/catnames.c
-@@ -0,0 +1,48 @@
-+/* Copyright (C) 2006  Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#include "localeinfo.h"
-+
-+/* Define an array of category names (also the environment variable names).  */
-+const union catnamestr_t _nl_category_names attribute_hidden =
-+  {
-+    {
-+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+      category_name,
-+#include "categories.def"
-+#undef DEFINE_CATEGORY
-+    }
-+  };
-+
-+const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
-+  {
-+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+    [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
-+#include "categories.def"
-+#undef DEFINE_CATEGORY
-+  };
-+
-+/* An array of their lengths, for convenience.  */
-+const uint8_t _nl_category_name_sizes[] attribute_hidden =
-+  {
-+#define DEFINE_CATEGORY(category, category_name, items, a) \
-+    [category] = sizeof (category_name) - 1,
-+#include "categories.def"
-+#undef	DEFINE_CATEGORY
-+    [LC_ALL] = sizeof ("LC_ALL") - 1
-+  };
-diff --git a/locale/dummy-setlocale.c b/locale/dummy-setlocale.c
-new file mode 100644
-index 0000000..219964a
---- /dev/null
-+++ b/locale/dummy-setlocale.c
-@@ -0,0 +1,33 @@
-+/* Copyright (C) 2006  Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#include <string.h>
-+#include <locale.h>
-+
-+char *
-+setlocale (int category, const char *locale)
-+{
-+  if (! locale
-+      || locale[0] == '\0'
-+      || strcmp (locale, "C") == 0
-+      || strcmp (locale, "POSIX") == 0)
-+    return (char *) "C";
-+  else
-+    return NULL;
-+}
-+libc_hidden_def (setlocale)
-diff --git a/locale/localeinfo.h b/locale/localeinfo.h
-index bdab9fe..a7516c0 100644
---- a/locale/localeinfo.h
-+++ b/locale/localeinfo.h
-@@ -232,7 +232,7 @@ __libc_tsd_define (extern, __locale_t, LOCALE)
-    unused.  We can manage this playing some tricks with weak references.
-    But with thread-local locale settings, it becomes quite ungainly unless
-    we can use __thread variables.  So only in that case do we attempt this.  */
--#ifndef SHARED
-+#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF
- # include <tls.h>
- # define NL_CURRENT_INDIRECT	1
- #endif
-diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
-index cf7adea..ef3b811 100644
---- a/locale/programs/charmap-dir.c
-+++ b/locale/programs/charmap-dir.c
-@@ -19,7 +19,9 @@
- #include <error.h>
- #include <fcntl.h>
- #include <libintl.h>
-+#ifndef NO_UNCOMPRESS
- #include <spawn.h>
-+#endif
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
-   return closedir (dir);
- }
- 
-+#ifndef NO_UNCOMPRESS
- /* Creates a subprocess decompressing the given pathname, and returns
-    a stream reading its output (the decompressed data).  */
- static
-@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
-     }
-   return NULL;
- }
-+#endif
- 
- /* Opens a charmap for reading, given its name (not an alias name).  */
- FILE *
-@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name)
-   if (stream != NULL)
-     return stream;
- 
-+#ifndef NO_UNCOMPRESS
-   memcpy (p, ".gz", 4);
-   stream = fopen_uncompressed (pathname, "gzip");
-   if (stream != NULL)
-@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name)
-   stream = fopen_uncompressed (pathname, "bzip2");
-   if (stream != NULL)
-     return stream;
-+#endif
- 
-   return NULL;
- }
-diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
-index a39a94f..16e9039 100644
---- a/locale/programs/ld-collate.c
-+++ b/locale/programs/ld-collate.c
-@@ -351,7 +351,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
-     }
-   if (wcs != NULL)
-     {
--      size_t nwcs = wcslen ((wchar_t *) wcs);
-+      size_t nwcs = wcslen_uint32 (wcs);
-       uint32_t zero = 0;
-       /* Handle <U0000> as a single character.  */
-       if (nwcs == 0)
-@@ -1777,8 +1777,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
- 
- 	      if ((*eptr)->nwcs == runp->nwcs)
- 		{
--		  int c = wmemcmp ((wchar_t *) (*eptr)->wcs,
--				   (wchar_t *) runp->wcs, runp->nwcs);
-+		  int c = wmemcmp_uint32 ((*eptr)->wcs, runp->wcs, runp->nwcs);
- 
- 		  if (c == 0)
- 		    {
-@@ -2011,9 +2010,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
- 	     one consecutive entry.  */
- 	  if (runp->wcnext != NULL
- 	      && runp->nwcs == runp->wcnext->nwcs
--	      && wmemcmp ((wchar_t *) runp->wcs,
--			  (wchar_t *)runp->wcnext->wcs,
--			  runp->nwcs - 1) == 0
-+	      && wmemcmp_uint32 (runp->wcs,
-+				 runp->wcnext->wcs,
-+				 runp->nwcs - 1) == 0
- 	      && (runp->wcs[runp->nwcs - 1]
- 		  == runp->wcnext->wcs[runp->nwcs - 1] + 1))
- 	    {
-@@ -2037,9 +2036,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
- 		runp = runp->wcnext;
- 	      while (runp->wcnext != NULL
- 		     && runp->nwcs == runp->wcnext->nwcs
--		     && wmemcmp ((wchar_t *) runp->wcs,
--				 (wchar_t *)runp->wcnext->wcs,
--				 runp->nwcs - 1) == 0
-+		     && wmemcmp_uint32 (runp->wcs,
-+					runp->wcnext->wcs,
-+					runp->nwcs - 1) == 0
- 		     && (runp->wcs[runp->nwcs - 1]
- 			 == runp->wcnext->wcs[runp->nwcs - 1] + 1));
- 
-diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
-index 3f464ef..b7b6b51 100644
---- a/locale/programs/ld-ctype.c
-+++ b/locale/programs/ld-ctype.c
-@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
-   allocate_arrays (ctype, charmap, ctype->repertoire);
- 
-   default_missing_len = (ctype->default_missing
--			 ? wcslen ((wchar_t *) ctype->default_missing)
-+			 ? wcslen_uint32 (ctype->default_missing)
- 			 : 0);
- 
-   init_locale_data (&file, nelems);
-@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
- 	    ignore = 1;
- 	  else
- 	    /* This value is usable.  */
--	    obstack_grow (ob, to_wstr, wcslen ((wchar_t *) to_wstr) * 4);
-+	    obstack_grow (ob, to_wstr, wcslen_uint32 (to_wstr) * 4);
- 
- 	  first = 0;
- 	}
-@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'"));
- 	    }
- 
- 	handle_tok_digit:
--	  class_bit = _ISwdigit;
--	  class256_bit = _ISdigit;
-+	  class_bit = BITw (tok_digit);
-+	  class256_bit = BIT (tok_digit);
- 	  handle_digits = 1;
- 	  goto read_charclass;
- 
-@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
- 
- 	  while (idx < number)
- 	    {
--	      int res = wcscmp ((const wchar_t *) sorted[idx]->from,
--				(const wchar_t *) runp->from);
-+	      int res = wcscmp_uint32 (sorted[idx]->from, runp->from);
- 	      if (res == 0)
- 		{
- 		  replace = 1;
-@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
-       for (size_t cnt = 0; cnt < number; ++cnt)
- 	{
- 	  struct translit_to_t *srunp;
--	  from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
-+	  from_len += wcslen_uint32 (sorted[cnt]->from) + 1;
- 	  srunp = sorted[cnt]->to;
- 	  while (srunp != NULL)
- 	    {
--	      to_len += wcslen ((const wchar_t *) srunp->str) + 1;
-+	      to_len += wcslen_uint32 (srunp->str) + 1;
- 	      srunp = srunp->next;
- 	    }
- 	  /* Plus one for the extra NUL character marking the end of
-@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
- 	  ctype->translit_from_idx[cnt] = from_len;
- 	  ctype->translit_to_idx[cnt] = to_len;
- 
--	  len = wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
--	  wmemcpy ((wchar_t *) &ctype->translit_from_tbl[from_len],
--		   (const wchar_t *) sorted[cnt]->from, len);
-+	  len = wcslen_uint32 (sorted[cnt]->from) + 1;
-+	  wmemcpy_uint32 (&ctype->translit_from_tbl[from_len],
-+			  sorted[cnt]->from, len);
- 	  from_len += len;
- 
- 	  ctype->translit_to_idx[cnt] = to_len;
- 	  srunp = sorted[cnt]->to;
- 	  while (srunp != NULL)
- 	    {
--	      len = wcslen ((const wchar_t *) srunp->str) + 1;
--	      wmemcpy ((wchar_t *) &ctype->translit_to_tbl[to_len],
--		       (const wchar_t *) srunp->str, len);
-+	      len = wcslen_uint32 (srunp->str) + 1;
-+	      wmemcpy_uint32 (&ctype->translit_to_tbl[to_len],
-+			      srunp->str, len);
- 	      to_len += len;
- 	      srunp = srunp->next;
- 	    }
-diff --git a/locale/programs/ld-messages.c b/locale/programs/ld-messages.c
-index ec1a80b..736eed8 100644
---- a/locale/programs/ld-messages.c
-+++ b/locale/programs/ld-messages.c
-@@ -25,6 +25,7 @@
- #include <string.h>
- #include <stdint.h>
- #include <sys/uio.h>
-+#include <gnu/option-groups.h>
- 
- #include <assert.h>
- 
-@@ -124,6 +125,7 @@ No definition for %s category found"), "LC_MESSAGES"));
-     }
-   else
-     {
-+#if __OPTION_POSIX_REGEXP
-       int result;
-       regex_t re;
- 
-@@ -140,6 +142,7 @@ No definition for %s category found"), "LC_MESSAGES"));
- 	}
-       else if (result != 0)
- 	regfree (&re);
-+#endif
-     }
- 
-   if (messages->noexpr == NULL)
-@@ -158,6 +161,7 @@ No definition for %s category found"), "LC_MESSAGES"));
-     }
-   else
-     {
-+#if __OPTION_POSIX_REGEXP
-       int result;
-       regex_t re;
- 
-@@ -174,6 +178,7 @@ No definition for %s category found"), "LC_MESSAGES"));
- 	}
-       else if (result != 0)
- 	regfree (&re);
-+#endif
-     }
- }
- 
-diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
-index db490c6..75dc505 100644
---- a/locale/programs/ld-time.c
-+++ b/locale/programs/ld-time.c
-@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME"));
- 	}
-       else
- 	{
-+	  static const uint32_t wt_fmt_ampm[]
-+	    = { '%','I',':','%','M',':','%','S',' ','%','p',0 };
- 	  time->t_fmt_ampm = "%I:%M:%S %p";
--	  time->wt_fmt_ampm = (const uint32_t *) L"%I:%M:%S %p";
-+	  time->wt_fmt_ampm = wt_fmt_ampm;
- 	}
-     }
- 
-@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME"));
-       const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
- 				       31, 31, 30, 31 ,30, 31 };
-       size_t idx;
--      wchar_t *wstr;
-+      uint32_t *wstr;
- 
-       time->era_entries =
- 	(struct era_data *) xmalloc (time->num_era
-@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME"));
- 	    }
- 
- 	  /* Now generate the wide character name and format.  */
--	  wstr = wcschr ((wchar_t *) time->wera[idx], L':');/* end direction */
--	  wstr = wstr ? wcschr (wstr + 1, L':') : NULL;	/* end offset */
--	  wstr = wstr ? wcschr (wstr + 1, L':') : NULL;	/* end start */
--	  wstr = wstr ? wcschr (wstr + 1, L':') : NULL;	/* end end */
-+	  wstr = wcschr_uint32 (time->wera[idx], L':'); /* end direction */
-+	  wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end offset */
-+	  wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end start */
-+	  wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end end */
- 	  if (wstr != NULL)
- 	    {
--	      time->era_entries[idx].wname = (uint32_t *) wstr + 1;
--	      wstr = wcschr (wstr + 1, L':');	/* end name */
-+	      time->era_entries[idx].wname = wstr + 1;
-+	      wstr = wcschr_uint32 (wstr + 1, L':'); /* end name */
- 	      if (wstr != NULL)
- 		{
- 		  *wstr = L'\0';
--		  time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
-+		  time->era_entries[idx].wformat = wstr + 1;
- 		}
- 	      else
- 		time->era_entries[idx].wname =
-@@ -530,7 +532,16 @@ No definition for %s category found"), "LC_TIME"));
-   if (time->date_fmt == NULL)
-     time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
-   if (time->wdate_fmt == NULL)
--    time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y";
-+    {
-+      static const uint32_t wdate_fmt[] =
-+	{ '%','a',' ',
-+	  '%','b',' ',
-+	  '%','e',' ',
-+	  '%','H',':','%','M',':','%','S',' ',
-+	  '%','Z',' ',
-+	  '%','Y',0 };
-+      time->wdate_fmt = wdate_fmt;
-+    }
- }
- 
- 
-diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
-index 2e05130..653b68c 100644
---- a/locale/programs/linereader.c
-+++ b/locale/programs/linereader.c
-@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
- {
-   int return_widestr = lr->return_widestr;
-   char *buf;
--  wchar_t *buf2 = NULL;
-+  uint32_t *buf2 = NULL;
-   size_t bufact;
-   size_t bufmax = 56;
- 
-diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
-index 2a0f2aa..583d233 100644
---- a/locale/programs/localedef.c
-+++ b/locale/programs/localedef.c
-@@ -114,6 +114,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
- #define OPT_LIST_ARCHIVE 309
- #define OPT_LITTLE_ENDIAN 400
- #define OPT_BIG_ENDIAN 401
-+#define OPT_UINT32_ALIGN 402
- 
- /* Definitions of arguments for argp functions.  */
- static const struct argp_option options[] =
-@@ -150,6 +151,8 @@ static const struct argp_option options[] =
-     N_("Generate little-endian output") },
-   { "big-endian", OPT_BIG_ENDIAN, NULL, 0,
-     N_("Generate big-endian output") },
-+  { "uint32-align", OPT_UINT32_ALIGN, "ALIGNMENT", 0,
-+    N_("Set the target's uint32_t alignment in bytes (default 4)") },
-   { NULL, 0, NULL, 0, NULL }
- };
- 
-@@ -239,12 +242,14 @@ main (int argc, char *argv[])
-      ctype locale.  (P1003.2 4.35.5.2)  */
-   setlocale (LC_CTYPE, "POSIX");
- 
-+#ifndef NO_SYSCONF
-   /* Look whether the system really allows locale definitions.  POSIX
-      defines error code 3 for this situation so I think it must be
-      a fatal error (see P1003.2 4.35.8).  */
-   if (sysconf (_SC_2_LOCALEDEF) < 0)
-     WITH_CUR_LOCALE (error (3, 0, _("\
- FATAL: system does not define `_POSIX2_LOCALEDEF'")));
-+#endif
- 
-   /* Process charmap file.  */
-   charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
-@@ -338,6 +343,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
-     case OPT_BIG_ENDIAN:
-       set_big_endian (true);
-       break;
-+    case OPT_UINT32_ALIGN:
-+      uint32_align_mask = strtol (arg, NULL, 0) - 1;
-+      break;
-     case 'c':
-       force_output = 1;
-       break;
-diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
-index 33da52e..f790c4c 100644
---- a/locale/programs/locfile.c
-+++ b/locale/programs/locfile.c
-@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
-    machine running localedef.  */
- bool swap_endianness_p;
- 
-+/* The target's value of __align__(uint32_t) - 1.  */
-+unsigned int uint32_align_mask = 3;
-+
- /* When called outside a start_locale_structure/end_locale_structure
-    or start_locale_prelude/end_locale_prelude block, record that the
-    next byte in FILE's obstack will be the first byte of a new element.
-@@ -621,7 +624,7 @@ add_locale_string (struct locale_file *file, const char *string)
- void
- add_locale_wstring (struct locale_file *file, const uint32_t *string)
- {
--  add_locale_uint32_array (file, string, wcslen ((const wchar_t *) string) + 1);
-+  add_locale_uint32_array (file, string, wcslen_uint32 (string) + 1);
- }
- 
- /* Record that FILE's next element is the 32-bit integer VALUE.  */
-diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
-index 6fc441b..118b171 100644
---- a/locale/programs/locfile.h
-+++ b/locale/programs/locfile.h
-@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
- 
- extern bool swap_endianness_p;
- 
-+extern unsigned int uint32_align_mask;
-+
- /* Change the output to be big-endian if BIG_ENDIAN is true and
-    little-endian otherwise.  */
- static inline void
-@@ -89,7 +91,8 @@ maybe_swap_uint32 (uint32_t value)
- }
- 
- /* Likewise, but munge an array of N uint32_ts starting at ARRAY.  */
--static inline void
-+static void
-+__attribute__ ((unused))
- maybe_swap_uint32_array (uint32_t *array, size_t n)
- {
-   if (swap_endianness_p)
-@@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n)
- 
- /* Like maybe_swap_uint32_array, but the array of N elements is at
-    the end of OBSTACK's current object.  */
--static inline void
-+static void
-+__attribute__ ((unused))
- maybe_swap_uint32_obstack (struct obstack *obstack, size_t n)
- {
-   maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n);
-@@ -276,4 +280,55 @@ extern void identification_output (struct localedef_t *locale,
- 				   const struct charmap_t *charmap,
- 				   const char *output_path);
- 
-+static size_t wcslen_uint32 (const uint32_t *str) __attribute__ ((unused));
-+static uint32_t * wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
-+static uint32_t * wcschr_uint32 (const uint32_t *s, uint32_t ch) __attribute__ ((unused));
-+static int wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) __attribute__ ((unused));
-+static int wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
-+
-+static size_t
-+wcslen_uint32 (const uint32_t *str)
-+{
-+  size_t len = 0;
-+  while (str[len] != 0)
-+    len++;
-+  return len;
-+}
-+
-+static  int
-+wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n)
-+{
-+  while (n-- != 0)
-+    {
-+      int diff = *s1++ - *s2++;
-+      if (diff != 0)
-+	return diff;
-+    }
-+  return 0;
-+}
-+
-+static int
-+wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2)
-+{
-+  while (*s1 != 0 && *s1 == *s2)
-+    s1++, s2++;
-+  return *s1 - *s2;
-+}
-+
-+static uint32_t *
-+wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n)
-+{
-+  return memcpy (s1, s2, n * sizeof (uint32_t));
-+}
-+
-+static uint32_t *
-+wcschr_uint32 (const uint32_t *s, uint32_t ch)
-+{
-+  do
-+    if (*s == ch)
-+      return (uint32_t *) s;
-+  while (*s++ != 0);
-+  return 0;
-+}
-+
- #endif /* locfile.h */
-diff --git a/locale/setlocale.c b/locale/setlocale.c
-index fa9cb3a..8eee284 100644
---- a/locale/setlocale.c
-+++ b/locale/setlocale.c
-@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
- #endif
- 
- 
--/* Define an array of category names (also the environment variable names).  */
--const union catnamestr_t _nl_category_names attribute_hidden =
--  {
--    {
--#define DEFINE_CATEGORY(category, category_name, items, a) \
--      category_name,
--#include "categories.def"
--#undef DEFINE_CATEGORY
--    }
--  };
--
--const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
--  {
--#define DEFINE_CATEGORY(category, category_name, items, a) \
--    [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
--#include "categories.def"
--#undef DEFINE_CATEGORY
--  };
--
--/* An array of their lengths, for convenience.  */
--const uint8_t _nl_category_name_sizes[] attribute_hidden =
--  {
--#define DEFINE_CATEGORY(category, category_name, items, a) \
--    [category] = sizeof (category_name) - 1,
--#include "categories.def"
--#undef	DEFINE_CATEGORY
--    [LC_ALL] = sizeof ("LC_ALL") - 1
--  };
--
--
- #ifdef NL_CURRENT_INDIRECT
- # define WEAK_POSTLOAD(postload) weak_extern (postload)
- #else
-diff --git a/locale/xlocale.c b/locale/xlocale.c
-index fec4564..f00269c 100644
---- a/locale/xlocale.c
-+++ b/locale/xlocale.c
-@@ -18,6 +18,7 @@
-    <http://www.gnu.org/licenses/>.  */
- 
- #include <locale.h>
-+#include <gnu/option-groups.h>
- #include "localeinfo.h"
- 
- #define DEFINE_CATEGORY(category, category_name, items, a) \
-@@ -25,6 +26,19 @@ extern struct __locale_data _nl_C_##category;
- #include "categories.def"
- #undef	DEFINE_CATEGORY
- 
-+/* If the locale support code isn't enabled, don't generate strong
-+   reference to the C locale_data structures here; let the Makefile
-+   decide which ones to include.  (In the static linking case, the
-+   strong reference to the 'class', 'toupper', and 'tolower' tables
-+   will cause C-ctype.o to be brought in, as it should be, even when
-+   the reference to _nl_C_LC_CTYPE will be weak.)  */
-+#if ! __OPTION_EGLIBC_LOCALE_CODE
-+# define DEFINE_CATEGORY(category, category_name, items, a) \
-+  weak_extern (_nl_C_##category)
-+# include "categories.def"
-+# undef	DEFINE_CATEGORY
-+#endif
-+
- /* Defined in locale/C-ctype.c.  */
- extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
- extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
-@@ -52,3 +66,26 @@ const struct __locale_struct _nl_C_locobj attribute_hidden =
-     .__ctype_tolower = (const int *) _nl_C_LC_CTYPE_tolower + 128,
-     .__ctype_toupper = (const int *) _nl_C_LC_CTYPE_toupper + 128
-   };
-+
-+
-+#if ! __OPTION_EGLIBC_LOCALE_CODE
-+/* When locale code is enabled, these are each defined in the
-+   appropriate lc-CATEGORY.c file, so that static links (when __thread
-+   is supported) bring in only those lc-CATEGORY.o files for
-+   categories the program actually uses; look for NL_CURRENT_INDIRECT
-+   in localeinfo.h.
-+
-+   When locale code is disabled, the _nl_C_CATEGORY objects are the
-+   only possible referents.  At the moment, there isn't a way to get
-+   __OPTION_EGLIBC_LOCALE_CODE defined in every compilation unit that
-+   #includes localeinfo.h, so we can't just turn off
-+   NL_CURRENT_INDIRECT.  So we'll define the _nl_current_CATEGORY
-+   pointers here.  */
-+#if defined (NL_CURRENT_INDIRECT)
-+#define DEFINE_CATEGORY(category, category_name, items, a)      \
-+  __thread struct __locale_data * const *_nl_current_##category   \
-+  attribute_hidden = &_nl_C_locobj.__locales[category];
-+#include "categories.def"
-+#undef DEFINE_CATEGORY
-+#endif
-+#endif /* __OPTION_EGLIBC_LOCALE_CODE */
-diff --git a/localedata/Makefile b/localedata/Makefile
-index ebf6ac9..1870753 100644
---- a/localedata/Makefile
-+++ b/localedata/Makefile
-@@ -21,12 +21,22 @@ subdir := localedata
- 
- include ../Makeconfig
- 
--# List with all available character set descriptions.
--charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*)
-+include ../option-groups.mak
- 
- # List with all available character set descriptions.
--locales := $(wildcard locales/*)
--
-+all-charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*)
-+
-+all-locales := $(wildcard locales/*)
-+
-+# If the EGLIBC_LOCALES option group is not enabled, trim the
-+# list of charmap and locale source files.
-+ifeq ($(OPTION_EGLIBC_LOCALES),y)
-+charmaps := $(all-charmaps)
-+locales  := $(all-locales)
-+else
-+charmaps :=
-+locales  := locales/POSIX
-+endif
- 
- subdir-dirs = tests-mbwc
- vpath %.c tests-mbwc
-@@ -71,14 +81,20 @@ locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl            \
- 		     tst_wcsxfrm tst_wctob tst_wctomb tst_wctrans      \
- 		     tst_wctype tst_wcwidth
- 
--tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
-+# Since these tests build their own locale files, they're not
-+# dependent on the OPTION_EGLIBC_LOCALES option group.  But they do
-+# need the locale functions to be present.
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) \
-+     += $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
- 	tst-leaks tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \
- 	tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \
- 	tst-strfmon1 tst-sscanf bug-setlocale1 tst-setlocale2 tst-setlocale3 \
- 	tst-wctype
-+ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
- tests-static = bug-setlocale1-static
- tests += $(tests-static)
--ifeq (yes,$(build-shared))
-+endif
-+ifeq (yesy,$(build-shared)$(OPTION_EGLIBC_LOCALE_CODE))
- ifneq (no,$(PERL))
- tests-special += $(objpfx)mtrace-tst-leaks.out
- endif
-@@ -95,6 +111,7 @@ tests: $(objdir)/iconvdata/gconv-modules
- tests-static += tst-langinfo-static
- 
- ifeq ($(run-built-tests),yes)
-+ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
- tests-special += $(objpfx)sort-test.out $(objpfx)tst-fmon.out \
- 		 $(objpfx)tst-locale.out $(objpfx)tst-rpmatch.out \
- 		 $(objpfx)tst-trans.out $(objpfx)tst-ctype.out \
-@@ -109,6 +126,7 @@ LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 \
- 	   tr_TR.ISO-8859-9 en_GB.UTF-8 uk_UA.UTF-8
- include ../gen-locales.mk
- endif
-+endif
- 
- include ../Rules
- 
-@@ -191,6 +209,11 @@ endif
- 
- include SUPPORTED
- 
-+# Only install locale data if OPTION_EGLIBC_LOCALES is selected.
-+ifneq ($(OPTION_EGLIBC_LOCALES),y)
-+SUPPORTED-LOCALES :=
-+endif
-+
- INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
- 
- # Sometimes the whole collection of locale files should be installed.
-diff --git a/login/Makefile b/login/Makefile
-index 0f4bb22..4036ddb 100644
---- a/login/Makefile
-+++ b/login/Makefile
-@@ -18,6 +18,7 @@
- #
- #	Sub-makefile for login portion of the library.
- #
-+include ../option-groups.mak
- 
- subdir	:= login
- 
-@@ -25,14 +26,16 @@ include ../Makeconfig
- 
- headers	:= utmp.h bits/utmp.h lastlog.h pty.h
- 
--routines := getlogin getlogin_r setlogin getlogin_r_chk \
--	    getutent getutent_r getutid getutline getutid_r getutline_r \
--	    utmp_file utmpname updwtmp getpt grantpt unlockpt ptsname \
--	    ptsname_r_chk
-+routines := getpt grantpt unlockpt ptsname ptsname_r_chk
-+routines-$(OPTION_EGLIBC_UTMP) \
-+	 += getutent getutent_r getutid getutline getutid_r getutline_r \
-+	    utmp_file utmpname updwtmp
-+routines-$(OPTION_EGLIBC_GETLOGIN) += getlogin getlogin_r getlogin_r_chk
-+routines-$(OPTION_EGLIBC_BSD) += setlogin
- 
- CFLAGS-grantpt.c = -DLIBEXECDIR='"$(libexecdir)"'
- 
--others = utmpdump
-+others-$(OPTION_EGLIBC_UTMP) += utmpdump
- 
- ifeq (yes,$(build-pt-chown))
- others += pt_chown
-@@ -46,8 +49,8 @@ vpath %.c programs
- tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname tst-getlogin
- 
- # Build the -lutil library with these extra functions.
--extra-libs      := libutil
--extra-libs-others := $(extra-libs)
-+extra-libs-$(OPTION_EGLIBC_UTMP) := libutil
-+extra-libs-others := $(extra-libs-y)
- 
- libutil-routines:= login login_tty logout logwtmp openpty forkpty
- 
-diff --git a/malloc/Makefile b/malloc/Makefile
-index 67ed293..272ca4d 100644
---- a/malloc/Makefile
-+++ b/malloc/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Makefile for malloc routines
- #
-+include ../option-groups.mak
-+
- subdir	:= malloc
- 
- include ../Makeconfig
-@@ -39,9 +41,15 @@ install-lib := libmcheck.a
- non-lib.a := libmcheck.a
- 
- # Additional library.
-+ifeq ($(OPTION_EGLIBC_MEMUSAGE),y)
- extra-libs = libmemusage
- extra-libs-others = $(extra-libs)
- 
-+ifdef OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
-+CPPFLAGS-memusage += -D__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE=$(OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE)
-+endif
-+endif
-+
- libmemusage-routines = memusage
- libmemusage-inhibit-o = $(filter-out .os,$(object-suffixes))
- 
-@@ -71,7 +79,7 @@ endif
- # Unless we get a test for the availability of libgd which also works
- # for cross-compiling we disable the memusagestat generation in this
- # situation.
--ifneq ($(cross-compiling),yes)
-+ifeq ($(cross-compiling)$(OPTION_EGLIBC_MEMUSAGE),noy)
- # If the gd library is available we build the `memusagestat' program.
- ifneq ($(LIBGD),no)
- others: $(objpfx)memusage
-diff --git a/malloc/memusage.c b/malloc/memusage.c
-index a57ba8e..732ba9d 100644
---- a/malloc/memusage.c
-+++ b/malloc/memusage.c
-@@ -33,6 +33,7 @@
- #include <stdint.h>
- #include <sys/mman.h>
- #include <sys/time.h>
-+#include <gnu/option-groups.h>
- 
- #include <memusage.h>
- 
-@@ -93,7 +94,11 @@ static __thread uintptr_t start_sp;
- #define peak_stack      peak_use[1]
- #define peak_total      peak_use[2]
- 
--#define DEFAULT_BUFFER_SIZE     32768
-+#ifndef __OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
-+# define DEFAULT_BUFFER_SIZE	32768
-+#else
-+# define DEFAULT_BUFFER_SIZE	__OPTION_EGLIBC_MEMUSAGE_DEFAULT_BUFFER_SIZE
-+#endif
- static size_t buffer_size;
- 
- static int fd = -1;
-diff --git a/malloc/memusage.sh b/malloc/memusage.sh
-index 8ab8cc2..d18f446 100755
---- a/malloc/memusage.sh
-+++ b/malloc/memusage.sh
-@@ -35,7 +35,7 @@ do_missing_arg() {
- 
- # Print help message
- do_help() {
--  echo $"Usage: memusage [OPTION]... PROGRAM [PROGRAMOPTION]...
-+  printf $"Usage: memusage [OPTION]... PROGRAM [PROGRAMOPTION]...
- Profile memory usage of PROGRAM.
- 
-    -n,--progname=NAME     Name of the program file to profile
-diff --git a/math/Makefile b/math/Makefile
-index 6388bae..ed1c511 100644
---- a/math/Makefile
-+++ b/math/Makefile
-@@ -21,6 +21,8 @@ subdir		:= math
- 
- include ../Makeconfig
- 
-+include ../option-groups.mak
-+
- # Installed header files.
- headers		:= math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
- 		   bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \
-@@ -34,8 +36,8 @@ aux		:= setfpucw fpu_control
- 
- # Build the -lm library.
- 
--extra-libs	:= libm
--extra-libs-others = $(extra-libs)
-+extra-libs-$(OPTION_EGLIBC_LIBM) := libm
-+extra-libs-others-$(OPTION_EGLIBC_LIBM) = $(extra-libs-$(OPTION_EGLIBC_LIBM))
- 
- libm-support = s_lib_version s_matherr s_signgam			\
- 	       fclrexcpt fgetexcptflg fraiseexcpt fsetexcptflg		\
-diff --git a/misc/Makefile b/misc/Makefile
-index aecb0da..e6b7c23 100644
---- a/misc/Makefile
-+++ b/misc/Makefile
-@@ -19,6 +19,10 @@
- #	Sub-makefile for misc portion of the library.
- #
- 
-+# Some system-dependent implementations of these functions use option
-+# groups (see sysdeps/unix/sysv/linux/Makefile, for example).
-+include ../option-groups.mak
-+
- subdir	:= misc
- 
- include ../Makeconfig
-@@ -46,40 +50,47 @@ routines := brk sbrk sstk ioctl \
- 	    select pselect \
- 	    acct chroot fsync sync fdatasync syncfs reboot \
- 	    gethostid sethostid \
--	    revoke vhangup \
-+	    vhangup \
- 	    swapon swapoff mktemp mkstemp mkstemp64 mkdtemp \
- 	    mkostemp mkostemp64 mkstemps mkstemps64 mkostemps mkostemps64 \
- 	    ualarm usleep \
- 	    gtty stty \
- 	    ptrace \
--	    fstab mntent mntent_r \
-+	    mntent mntent_r \
- 	    utimes lutimes futimes futimesat \
- 	    truncate ftruncate truncate64 ftruncate64 \
--	    chflags fchflags \
- 	    insremque getttyent getusershell getpass ttyslot \
- 	    syslog syscall daemon \
- 	    mmap mmap64 munmap mprotect msync madvise mincore remap_file_pages\
- 	    mlock munlock mlockall munlockall \
--	    efgcvt efgcvt_r qefgcvt qefgcvt_r \
- 	    hsearch hsearch_r tsearch lsearch \
- 	    err error ustat \
--	    getsysstats dirname regexp \
-+	    getsysstats dirname \
- 	    getloadavg getclktck \
- 	    fgetxattr flistxattr fremovexattr fsetxattr getxattr \
- 	    listxattr lgetxattr llistxattr lremovexattr lsetxattr \
- 	    removexattr setxattr getauxval ifunc-impl-list
- 
-+routines-$(OPTION_POSIX_REGEXP) += regexp
-+routines-$(OPTION_EGLIBC_FSTAB) += fstab
-+routines-$(OPTION_EGLIBC_BSD) += chflags fchflags revoke
-+routines-$(OPTION_EGLIBC_FCVT) += efgcvt efgcvt_r qefgcvt qefgcvt_r
-+
- generated += tst-error1.mtrace tst-error1-mem.out
- 
- aux := init-misc
- install-lib := libg.a
- gpl2lgpl := error.c error.h
- 
--tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
--	 tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1
-+tests := tst-dirname tst-tsearch tst-fdset tst-mntent tst-hsearch \
-+	 tst-pselect tst-insremque tst-mntent2 bug-hsearch1
-+tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += tst-error1
-+tests-$(OPTION_EGLIBC_FCVT) += tst-efgcvt
- ifeq ($(run-built-tests),yes)
-+ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO))
- tests-special += $(objpfx)tst-error1-mem.out
- endif
-+endif
- 
- CFLAGS-select.c = -fexceptions -fasynchronous-unwind-tables
- CFLAGS-tsearch.c = $(uses-callbacks)
-diff --git a/misc/err.c b/misc/err.c
-index 7b98157..efce8d5 100644
---- a/misc/err.c
-+++ b/misc/err.c
-@@ -22,6 +22,7 @@
- #include <errno.h>
- #include <string.h>
- #include <stdio.h>
-+#include <gnu/option-groups.h>
- 
- #include <wchar.h>
- #define flockfile(s) _IO_flockfile (s)
-@@ -37,6 +38,7 @@ extern char *__progname;
-   va_end (ap);								      \
- }
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- static void
- convert_and_print (const char *format, __gnuc_va_list ap)
- {
-@@ -81,6 +83,7 @@ convert_and_print (const char *format, __gnuc_va_list ap)
- 
-   __vfwprintf (stderr, wformat, ap);
- }
-+#endif
- 
- void
- vwarnx (const char *format, __gnuc_va_list ap)
-@@ -88,9 +91,13 @@ vwarnx (const char *format, __gnuc_va_list ap)
-   flockfile (stderr);
-   if (_IO_fwide (stderr, 0) > 0)
-     {
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-       __fwprintf (stderr, L"%s: ", __progname);
-       convert_and_print (format, ap);
-       putwc_unlocked (L'\n', stderr);
-+#else
-+      abort ();
-+#endif
-     }
-   else
-     {
-@@ -111,6 +118,7 @@ vwarn (const char *format, __gnuc_va_list ap)
-   flockfile (stderr);
-   if (_IO_fwide (stderr, 0) > 0)
-     {
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-       __fwprintf (stderr, L"%s: ", __progname);
-       if (format)
- 	{
-@@ -119,6 +127,9 @@ vwarn (const char *format, __gnuc_va_list ap)
- 	}
-       __set_errno (error);
-       __fwprintf (stderr, L"%m\n");
-+#else
-+      abort ();
-+#endif
-     }
-   else
-     {
-diff --git a/misc/error.c b/misc/error.c
-index aaa120d..d6cbc82 100644
---- a/misc/error.c
-+++ b/misc/error.c
-@@ -35,6 +35,7 @@
- #endif
- 
- #ifdef _LIBC
-+# include <gnu/option-groups.h>
- # include <libintl.h>
- # include <stdbool.h>
- # include <stdint.h>
-@@ -205,6 +206,7 @@ error_tail (int status, int errnum, const char *message, va_list args)
- #if _LIBC
-   if (_IO_fwide (stderr, 0) > 0)
-     {
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-       size_t len = strlen (message) + 1;
-       wchar_t *wmessage = NULL;
-       mbstate_t st;
-@@ -265,6 +267,9 @@ error_tail (int status, int errnum, const char *message, va_list args)
- 
-       if (use_malloc)
- 	free (wmessage);
-+#else
-+      abort ();
-+#endif
-     }
-   else
- #endif
-diff --git a/misc/tst-efgcvt.c b/misc/tst-efgcvt.c
-index 5083fec..79ed36c 100644
---- a/misc/tst-efgcvt.c
-+++ b/misc/tst-efgcvt.c
-@@ -59,7 +59,7 @@ static testcase ecvt_tests[] =
-   { 123.01, -4, 3, "" },
-   { 126.71, -4, 3, "" },
-   { 0.0, 4, 1, "0000" },
--#if DBL_MANT_DIG == 53
-+#if DBL_MANT_DIG == 53 && !(defined __powerpc__ && defined __NO_FPRS__ && !defined _SOFT_FLOAT && !defined _SOFT_DOUBLE)
-   { 0x1p-1074, 3, -323, "494" },
-   { -0x1p-1074, 3, -323, "494" },
- #endif
-diff --git a/nis/Makefile b/nis/Makefile
-index 037e674..c967850 100644
---- a/nis/Makefile
-+++ b/nis/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Makefile for NIS/NIS+ part.
- #
-+include ../option-groups.mak
-+
- subdir	:= nis
- 
- include ../Makeconfig
-@@ -30,19 +32,26 @@ endif
- 
- # These are the databases available for the nis (and perhaps later nisplus)
- # service.  This must be a superset of the services in nss.
--databases		= proto service hosts network grp pwd rpc ethers \
--			  spwd netgrp alias publickey
-+databases-y		:= proto service hosts network grp pwd rpc ethers \
-+			   spwd netgrp publickey
-+databases-$(OPTION_EGLIBC_DB_ALIASES) += alias
- 
- # Specify rules for the nss_* modules.
--services		:= nis nisplus compat
-+# The 'compat' module includes nis support, and the 'nss' directory
-+# includes a bare-bones "files" library, so we'll include 'compat' in
-+# OPTION_EGLIBC_NIS.
-+services-y		:=
-+services-$(OPTION_EGLIBC_NIS) += nis nisplus compat
-+
-+extra-libs-$(OPTION_EGLIBC_NIS) += libnsl
-+extra-libs-y		+= $(services-y:%=libnss_%)
- 
--extra-libs		= libnsl $(services:%=libnss_%)
- # These libraries will be built in the `others' pass rather than
- # the `lib' pass, because they depend on libc.so being built already.
--extra-libs-others	= $(extra-libs)
-+extra-libs-others-y	+= $(extra-libs-y)
- 
- # The sources are found in the appropriate subdir.
--subdir-dirs = $(services:%=nss_%)
-+subdir-dirs = $(services-y:%=nss_%)
- vpath %.c $(subdir-dirs)
- 
- libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
-@@ -60,11 +69,11 @@ libnsl-routines = yp_xdr ypclnt ypupdate_xdr \
- libnss_compat-routines	:= $(addprefix compat-,grp pwd spwd initgroups)
- libnss_compat-inhibit-o	= $(filter-out .os,$(object-suffixes))
- 
--libnss_nis-routines	:= $(addprefix nis-,$(databases)) nis-initgroups \
-+libnss_nis-routines	:= $(addprefix nis-,$(databases-y)) nis-initgroups \
- 			   nss-nis
- libnss_nis-inhibit-o	= $(filter-out .os,$(object-suffixes))
- 
--libnss_nisplus-routines	:= $(addprefix nisplus-,$(databases)) nisplus-parser \
-+libnss_nisplus-routines	:= $(addprefix nisplus-,$(databases-y)) nisplus-parser \
- 			   nss-nisplus nisplus-initgroups
- libnss_nisplus-inhibit-o = $(filter-out .os,$(object-suffixes))
- 
-@@ -80,12 +89,12 @@ libnsl-libc = $(common-objpfx)linkobj/libc.so
- # Target-specific variable setting to link objects using deprecated
- # RPC interfaces with the version of libc.so that makes them available
- # for new links:
--$(services:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
-+$(services-y:%=$(objpfx)libnss_%.so) $(objpfx)libnsl.so: \
-   libc-for-link = $(libnsl-libc)
- 
- 
- ifeq ($(build-shared),yes)
--$(others:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
-+$(others-y:%=$(objpfx)%): $(objpfx)libnsl.so$(libnsl.so-version)
- else
--$(others:%=$(objpfx)%): $(objpfx)libnsl.a
-+$(others-y:%=$(objpfx)%): $(objpfx)libnsl.a
- endif
-diff --git a/nptl/Makefile b/nptl/Makefile
-index aaca0a4..596ca3c 100644
---- a/nptl/Makefile
-+++ b/nptl/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Sub-makefile for NPTL portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= nptl
- 
- include ../Makeconfig
-@@ -118,7 +120,7 @@ libpthread-routines = nptl-init vars events version pt-interp \
- 		      pt-raise pt-system \
- 		      flockfile ftrylockfile funlockfile \
- 		      sigaction \
--		      herrno res pt-allocrtsig \
-+		      pt-allocrtsig \
- 		      pthread_kill_other_threads \
- 		      pthread_getaffinity pthread_setaffinity \
- 		      pthread_attr_getaffinity pthread_attr_setaffinity \
-@@ -138,8 +140,10 @@ libpthread-routines = nptl-init vars events version pt-interp \
- #		      pthread_setgid pthread_setegid pthread_setregid \
- #		      pthread_setresgid
- 
-+libpthread-routines-$(OPTION_EGLIBC_INET) := herrno res
- libpthread-shared-only-routines = version pt-interp pt-allocrtsig \
- 				  unwind-forcedunwind
-+
- libpthread-static-only-routines = pthread_atfork
- 
- # Since cancellation handling is in large parts handled using exceptions
-@@ -220,7 +224,7 @@ tests = tst-typesizes \
- 	tst-mutexpi1 tst-mutexpi2 tst-mutexpi3 tst-mutexpi4 tst-mutexpi5 \
- 	tst-mutexpi5a tst-mutexpi6 tst-mutexpi7 tst-mutexpi7a tst-mutexpi8 \
- 	tst-mutexpi9 \
--	tst-spin1 tst-spin2 tst-spin3 tst-spin4 \
-+	tst-spin1 tst-spin2 tst-spin3 \
- 	tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \
- 	tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \
- 	tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \
-@@ -256,14 +260,14 @@ tests = tst-typesizes \
- 	tst-cancel6 tst-cancel7 tst-cancel8 tst-cancel9 tst-cancel10 \
- 	tst-cancel11 tst-cancel12 tst-cancel13 tst-cancel14 tst-cancel15 \
- 	tst-cancel16 tst-cancel17 tst-cancel18 tst-cancel19 tst-cancel20 \
--	tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel24 tst-cancel25 \
-+	tst-cancel21 tst-cancel22 tst-cancel23 tst-cancel25 \
- 	tst-cancel-self tst-cancel-self-cancelstate \
- 	tst-cancel-self-canceltype tst-cancel-self-testcancel \
- 	tst-cleanup0 tst-cleanup1 tst-cleanup2 tst-cleanup3 tst-cleanup4 \
- 	tst-flock1 tst-flock2 \
- 	tst-signal1 tst-signal2 tst-signal3 tst-signal4 tst-signal5 \
- 	tst-signal6 tst-signal7 \
--	tst-exec1 tst-exec2 tst-exec3 tst-exec4 \
-+	tst-exec2 tst-exec3 tst-exec4 \
- 	tst-exit1 tst-exit2 tst-exit3 \
- 	tst-stdio1 tst-stdio2 \
- 	tst-stack1 tst-stack2 tst-stack3 tst-stack4 tst-pthread-getattr \
-@@ -271,13 +275,12 @@ tests = tst-typesizes \
- 	tst-unload \
- 	tst-dlsym1 \
- 	tst-sysconf \
--	tst-locale1 tst-locale2 \
-+	tst-locale2 \
- 	tst-umask1 \
- 	tst-popen1 \
- 	tst-clock1 \
- 	tst-context1 \
- 	tst-sched1 \
--	tst-backtrace1 \
- 	tst-abstime \
- 	tst-vfork1 tst-vfork2 tst-vfork1x tst-vfork2x \
- 	tst-getpid3 \
-@@ -288,9 +291,16 @@ xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \
- 	tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
- test-srcs = tst-oddstacklimit
- 
--# Test expected to fail on most targets (except x86_64) due to bug
--# 18435 - pthread_once hangs when init routine throws an exception.
--test-xfail-tst-once5 = yes
-+# This test uses the posix_spawn functions.
-+tests-$(OPTION_EGLIBC_SPAWN) += tst-exec1
-+
-+# This test uses the 'backtrace' functions.
-+tests-$(OPTION_EGLIBC_BACKTRACE) += tst-backtrace1
-+
-+# This test is written in C++.
-+tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24
-+
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) += tst-locale1
- 
- # Files which must not be linked with libpthread.
- tests-nolibpthread = tst-unload
-diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
-index d10f4ea..14257ce 100644
---- a/nptl/pthread_create.c
-+++ b/nptl/pthread_create.c
-@@ -33,6 +33,7 @@
- #include <default-sched.h>
- #include <futex-internal.h>
- 
-+#include <gnu/option-groups.h>
- #include <shlib-compat.h>
- 
- #include <stap-probe.h>
-@@ -262,8 +263,10 @@ START_THREAD_DEFN
-   THREAD_SETMEM (pd, cpuclock_offset, now);
- #endif
- 
-+#if __OPTION_EGLIBC_INET
-   /* Initialize resolver state pointer.  */
-   __resp = &pd->res;
-+#endif
- 
-   /* Initialize pointers to locale data.  */
-   __ctype_init ();
-@@ -346,8 +349,10 @@ START_THREAD_DEFN
-   /* Run the destructor for the thread-local data.  */
-   __nptl_deallocate_tsd ();
- 
-+#if __OPTION_EGLIBC_INET
-   /* Clean up any state libc stored in thread-local variables.  */
-   __libc_thread_freeres ();
-+#endif
- 
-   /* If this is the last thread we terminate the process now.  We
-      do not notify the debugger, it might just irritate it if there
-diff --git a/nscd/Makefile b/nscd/Makefile
-index ede941d..f4f3f8d 100644
---- a/nscd/Makefile
-+++ b/nscd/Makefile
-@@ -18,14 +18,17 @@
- #
- #	Sub-makefile for nscd portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= nscd
- 
- include ../Makeconfig
- 
- ifneq ($(use-nscd),no)
--routines := nscd_getpw_r nscd_getgr_r nscd_gethst_r nscd_getai \
-+routines-$(OPTION_EGLIBC_INET) += \
-+	     nscd_getpw_r nscd_getgr_r nscd_gethst_r nscd_getai \
- 	    nscd_initgroups nscd_getserv_r nscd_netgroup
--aux	:= nscd_helper
-+aux-$(OPTION_EGLIBC_INET) += nscd_helper
- endif
- 
- # To find xmalloc.c
-@@ -37,14 +40,18 @@ nscd-modules := nscd connections pwdcache getpwnam_r getpwuid_r grpcache \
- 		dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \
- 		xmalloc xstrdup aicache initgrcache gai res_hconf \
- 		netgroupcache
--
-+ifneq (y,$(OPTION_EGLIBC_NIS))
-+# If we haven't build libnsl.so, then we'll need to include our
-+# own copy of nis_hash.
-+nscd-modules += nis_hash
-+endif
- ifeq ($(build-nscd)$(have-thread-library),yesyes)
- 
--others += nscd
--others-pie += nscd
--install-sbin := nscd
-+others-$(OPTION_EGLIBC_INET) += nscd
-+others-pie-$(OPTION_EGLIBC_INET) += nscd
-+install-sbin-$(OPTION_EGLIBC_INET) += nscd
- 
--extra-objs = $(nscd-modules:=.o)
-+extra-objs-$(OPTION_EGLIBC_INET) += $(nscd-modules:=.o)
- 
- endif
- 
-@@ -100,7 +107,15 @@ include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
- $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o)
- 
- ifeq ($(build-shared),yes)
--$(objpfx)nscd: $(shared-thread-library) $(common-objpfx)nis/libnsl.so
-+$(objpfx)nscd: $(shared-thread-library)
-+else
-+$(objpfx)nscd: $(static-thread-library)
-+endif
-+
-+ifeq (y,$(OPTION_EGLIBC_NIS))
-+ifeq ($(build-shared),yes)
-+$(objpfx)nscd: $(common-objpfx)nis/libnsl.so
- else
--$(objpfx)nscd: $(static-thread-library) $(common-objpfx)nis/libnsl.a
-+$(objpfx)nscd: $(common-objpfx)nis/libnsl.a
-+endif
- endif
-diff --git a/nscd/nis_hash.c b/nscd/nis_hash.c
-new file mode 100644
-index 0000000..d244c41
---- /dev/null
-+++ b/nscd/nis_hash.c
-@@ -0,0 +1,3 @@
-+/* If OPTION_EGLIBC_NIS is disabled, nscd can't get this from libnsl.so;
-+   we need our own copy.  */
-+#include "../nis/nis_hash.c"
-diff --git a/nss/Makefile b/nss/Makefile
-index 65ab7b5..19f0aef 100644
---- a/nss/Makefile
-+++ b/nss/Makefile
-@@ -18,28 +18,35 @@
- #
- #	Makefile for name service switch.
- #
-+include ../option-groups.mak
-+
- subdir	:= nss
- 
- include ../Makeconfig
- 
- headers			:= nss.h
- 
--# This is the trivial part which goes into libc itself.
--routines		= nsswitch getnssent getnssent_r digits_dots \
--			  $(addsuffix -lookup,$(databases))
--
- # These are the databases that go through nss dispatch.
- # Caution: if you add a database here, you must add its real name
- # in databases.def, too.
--databases		= proto service hosts network grp pwd ethers \
--			  spwd netgrp alias sgrp
-+databases-y		= grp pwd spwd sgrp
-+databases-$(OPTION_EGLIBC_INET) \
-+			+= proto service hosts network ethers \
-+			   netgrp
-+databases-$(OPTION_EGLIBC_DB_ALIASES) += alias
-+
-+routines-$(OPTION_EGLIBC_INET) += digits_dots
- 
- ifneq (,$(filter sunrpc,$(subdirs)))
--databases		+= key rpc
-+databases-$(OPTION_EGLIBC_INET)	+= key rpc
- have-sunrpc		:= 1
- else
- have-sunrpc		:= 0
- endif
-+# This is the trivial part which goes into libc itself.
-+routines-y		+= nsswitch getnssent getnssent_r \
-+			  $(addsuffix -lookup,$(databases-y))
-+
- CPPFLAGS-getent.c	= -DHAVE_SUNRPC=$(have-sunrpc)
- 
- others                  := getent makedb
-@@ -47,8 +54,9 @@ install-bin             := getent makedb
- makedb-modules = xmalloc hash-string
- extra-objs		+= $(makedb-modules:=.o)
- 
--tests			= test-netdb tst-nss-test1 test-digits-dots tst-nss-getpwent
--xtests			= bug-erange
-+tests			= tst-nss-test1 tst-nss-getpwent
-+tests-$(OPTION_EGLIBC_INET)	+= test-netdb test-digits-dots
-+xtests-$(OPTION_EGLIBC_INET)	+= bug-erange
- 
- # Specify rules for the nss_* modules.  We have some services.
- services		:= files db
-@@ -63,7 +71,7 @@ subdir-dirs = $(services:%=nss_%)
- vpath %.c $(subdir-dirs) ../locale/programs ../intl
- 
- 
--libnss_files-routines	:= $(addprefix files-,$(databases)) \
-+libnss_files-routines	:= $(addprefix files-,$(databases-y)) \
- 			   files-initgroups files-have_o_cloexec files-init
- 
- libnss_db-dbs		:= $(addprefix db-,\
-@@ -86,6 +94,45 @@ tests-static		= tst-nss-static
- tests			+= $(tests-static)
- endif
- 
-+ifneq ($(OPTION_EGLIBC_NSSWITCH),y)
-+
-+ifndef OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG
-+$(error OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG variable left unset)
-+endif
-+
-+ifndef OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS
-+$(error OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS variable left unset)
-+endif
-+
-+ifeq (,$(wildcard $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)))
-+$(warning OPTION_EGLIBC_NSSWITCH is disabled, but fixed config file)
-+$(error does not exist: $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG))
-+endif
-+
-+ifeq (,$(wildcard $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)))
-+$(warning OPTION_EGLIBC_NSSWITCH is disabled, but fixed functions file)
-+$(error does not exist: $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS))
-+endif
-+
-+before-compile := $(objpfx)fixed-nsswitch.h
-+generated := fixed-nsswitch.h
-+$(objpfx)fixed-nsswitch.h $(objfpx)fixed-nsswitch-libs:	\
-+    $(objpfx)gen-fixed-nsswitch				\
-+    $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)
-+	$< $(objpfx)fixed-nsswitch.h			\
-+	   $(objpfx)fixed-nsswitch-libs			\
-+	   $(OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG)
-+
-+$(objpfx)gen-fixed-nsswitch: gen-fixed-nsswitch.c	\
-+    $(common-objpfx)option-groups.config		\
-+    $(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)
-+	$(native-compile)
-+gen-fixed-nsswitch-CFLAGS =						\
-+	-g3 -O -Wall							\
-+	-I $(objpfx)							\
-+	-DFIXED_FUNCTIONS='"$(OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS)"'
-+endif
-+
- include ../Rules
- 
- ifeq (yes,$(have-selinux))
-diff --git a/nss/fixed-nsswitch.conf b/nss/fixed-nsswitch.conf
-new file mode 100644
-index 0000000..91bb675
---- /dev/null
-+++ b/nss/fixed-nsswitch.conf
-@@ -0,0 +1,22 @@
-+# /etc/nsswitch.conf
-+#
-+# Example configuration for fixed name service.
-+# See the description of OPTION_EGLIBC_NSSWITCH in option-groups.def
-+# for details.
-+#
-+
-+aliases:        files
-+
-+passwd:         files
-+group:          files
-+shadow:         files
-+
-+hosts:          files dns
-+networks:       files dns
-+
-+protocols:      files
-+services:       files
-+ethers:         files
-+rpc:            files
-+
-+netgroup:       files
-diff --git a/nss/fixed-nsswitch.functions b/nss/fixed-nsswitch.functions
-new file mode 100644
-index 0000000..2f3fa83
---- /dev/null
-+++ b/nss/fixed-nsswitch.functions
-@@ -0,0 +1,121 @@
-+/* List of functions defined for fixed NSS in GNU C Library.
-+   Copyright (C) 1996, 1997, 1998, 2005 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+/* When OPTION_EGLIBC_NSSWITCH is disabled (see option-groups.def),
-+   EGLIBC does not use the 'dlopen' and 'dlsym' functions to look for
-+   database query functions in the individual name service libraries.
-+   Instead, it uses a set of functions chosen at compile time, as
-+   directed by the OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS file.  This
-+   file is a sample of what you might use there.
-+
-+   This file is C source code; it should only contain invocations of
-+   the following macros:
-+
-+   - DEFINE_ENT (DATABASE, SERVICE, X)
-+
-+     Declare the 'setXent', 'getXent_r', and 'endXent' functions that
-+     query DATABASE using the service library 'libnss_SERVICE.so.2'.
-+     DATABASE should be the full name of the database as it appears in
-+     'nsswitch.conf', like 'passwd' or 'aliases'.
-+
-+     (The non-reentrant 'getXent' functions are implemented in terms
-+     of the reentrant 'getXent_r' functions, so there is no need to
-+     refer to them explicitly here.)
-+
-+   - DEFINE_GETBY (DATABASE, SERVICE, X, KEY)
-+
-+     Declare the 'getXbyKEY_r' functions that query DATABASE using
-+     SERVICE.  DATABASE and SERVICE are as described above.
-+
-+     (The non-reentrant 'getXbyKEY' functions are implemented in terms
-+     of the reentrant 'getXbyKEY_r' functions, so there is no need to
-+     refer to them explicitly here.)
-+
-+     Use the special key 'name3' for the service library function that
-+     implements the 'getaddrinfo' function.
-+
-+   - DEFINE_GET (DATABASE, SERVICE, QUERY)
-+
-+     Declare the 'getQUERY_r' functions that query DATABASE using
-+     SERVICE.  This is used for functions like 'getpwnam'.
-+
-+     (The non-reentrant 'getQUERY' functions are implemented in terms
-+     of the reentrant 'getQUERY_r' functions, so there is no need to
-+     refer to them explicitly here.)
-+
-+   This sample file only includes functions that consult the files in
-+   '/etc', and the Domain Name System (DNS).  */
-+
-+/* aliases */
-+DEFINE_ENT (aliases, files, alias)
-+DEFINE_GETBY (aliases, files, alias, name)
-+
-+/* ethers */
-+DEFINE_ENT (ethers, files, ether)
-+
-+/* group */
-+DEFINE_ENT (group, files, gr)
-+DEFINE_GET (group, files, grgid)
-+DEFINE_GET (group, files, grnam)
-+
-+/* hosts */
-+DEFINE_ENT (hosts, files, host)
-+DEFINE_GETBY (hosts, files, host, addr)
-+DEFINE_GETBY (hosts, files, host, name)
-+DEFINE_GETBY (hosts, files, host, name2)
-+DEFINE_GET (hosts, files, hostton)
-+DEFINE_GET (hosts, files, ntohost)
-+DEFINE_GETBY (hosts, dns, host, addr)
-+DEFINE_GETBY (hosts, dns, host, name)
-+DEFINE_GETBY (hosts, dns, host, name2)
-+DEFINE_GETBY (hosts, dns, host, name3)
-+
-+/* netgroup */
-+DEFINE_ENT (netgroup, files, netgr)
-+
-+/* networks */
-+DEFINE_ENT (networks, files, net)
-+DEFINE_GETBY (networks, files, net, name)
-+DEFINE_GETBY (networks, files, net, addr)
-+DEFINE_GETBY (networks, dns, net, name)
-+DEFINE_GETBY (networks, dns, net, addr)
-+
-+/* protocols */
-+DEFINE_ENT (protocols, files, proto)
-+DEFINE_GETBY (protocols, files, proto, name)
-+DEFINE_GETBY (protocols, files, proto, number)
-+
-+/* passwd */
-+DEFINE_ENT (passwd, files, pw)
-+DEFINE_GET (passwd, files, pwnam)
-+DEFINE_GET (passwd, files, pwuid)
-+
-+/* rpc */
-+DEFINE_ENT (rpc, files, rpc)
-+DEFINE_GETBY (rpc, files, rpc, name)
-+DEFINE_GETBY (rpc, files, rpc, number)
-+
-+/* services */
-+DEFINE_ENT (services, files, serv)
-+DEFINE_GETBY (services, files, serv, name)
-+DEFINE_GETBY (services, files, serv, port)
-+
-+/* shadow */
-+DEFINE_ENT (shadow, files, sp)
-+DEFINE_GET (shadow, files, spnam)
-diff --git a/nss/gen-fixed-nsswitch.c b/nss/gen-fixed-nsswitch.c
-new file mode 100644
-index 0000000..6e1c98c
---- /dev/null
-+++ b/nss/gen-fixed-nsswitch.c
-@@ -0,0 +1,803 @@
-+/* gen-fixed-nsswitch.c --- generate fixed name service data structures
-+   Copyright (C) 1996-1999, 2001-2006, 2007 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#define _GNU_SOURCE
-+
-+#include <stdlib.h>
-+#include <stdio.h>
-+#include <errno.h>
-+#include <string.h>
-+#include <stdarg.h>
-+#include <assert.h>
-+#include <ctype.h>
-+
-+#include "gnu/lib-names.h"
-+#include "nss.h"
-+
-+/* Provide a fallback definition to allow this file to be compiled outside
-+   libc.  */
-+#ifndef internal_function
-+# define internal_function
-+#endif
-+
-+
-+/* Simple utilities.  */
-+
-+void __attribute__ ((noreturn))
-+error (const char *message)
-+{
-+  fprintf (stderr, "%s\n", message);
-+  exit (1);
-+}
-+
-+
-+void *
-+check_alloc (void *p)
-+{
-+  if (p)
-+    return p;
-+  else
-+    error ("out of memory");
-+}
-+
-+void *
-+xmalloc (size_t size)
-+{
-+  return check_alloc (malloc (size));
-+}
-+
-+
-+/* Format ARGS according to FORMAT, and return the result as a
-+   malloc'ed string.  */
-+char *
-+saprintf (const char *format, ...)
-+{
-+  va_list args;
-+  size_t len;
-+  char *buf;
-+
-+  va_start (args, format);
-+  len = vsnprintf (NULL, 0, format, args);
-+  va_end (args);
-+
-+  buf = xmalloc (len + 1);
-+  va_start (args, format);
-+  assert (len == vsnprintf (buf, len + 1, format, args));
-+  va_end (args);
-+
-+  return buf;
-+}
-+
-+
-+
-+/* Data structures representing the configuration file in memory.  */
-+
-+/* These are copied from nsswitch.h.
-+
-+   We could simply #include that file, but this program runs on the
-+   build machine and links against the build machine's libraries,
-+   whereas that header is meant for use by target code; it uses
-+   'libc_hidden_proto', 'internal_function', and related hair.  Since
-+   we've copied the parsing code, we might as well copy the data
-+   structure definitions as well.  */
-+
-+/* Actions performed after lookup finished.  */
-+typedef enum
-+{
-+  NSS_ACTION_CONTINUE,
-+  NSS_ACTION_RETURN
-+} lookup_actions;
-+
-+
-+typedef struct service_library
-+{
-+  /* Name of service (`files', `dns', `nis', ...).  */
-+  const char *name;
-+  /* Pointer to the loaded shared library.  */
-+  void *lib_handle;
-+  /* And the link to the next entry.  */
-+  struct service_library *next;
-+} service_library;
-+
-+
-+/* For mapping a function name to a function pointer.  It is known in
-+   nsswitch.c:nss_lookup_function that a string pointer for the lookup key
-+   is the first member.  */
-+typedef struct
-+{
-+  const char *fct_name;
-+  void *fct_ptr;
-+} known_function;
-+
-+
-+typedef struct service_user
-+{
-+  /* And the link to the next entry.  */
-+  struct service_user *next;
-+  /* Action according to result.  */
-+  lookup_actions actions[5];
-+  /* Link to the underlying library object.  */
-+  service_library *library;
-+  /* Collection of known functions.
-+
-+     With OPTION_EGLIBC_NSSWITCH enabled, this is the root of a
-+     'tsearch'-style tree.
-+
-+     With OPTION_EGLIBC_NSSWITCH disabled, this is an array of
-+     pointers to known_function structures, NULL-terminated.  */
-+  union
-+  {
-+    void *tree;
-+    const known_function **array;
-+  } known;
-+  /* Name of the service (`files', `dns', `nis', ...).  */
-+  const char *name;
-+} service_user;
-+
-+/* To access the action based on the status value use this macro.  */
-+#define nss_next_action(ni, status) ((ni)->actions[2 + status])
-+
-+
-+typedef struct name_database_entry
-+{
-+  /* And the link to the next entry.  */
-+  struct name_database_entry *next;
-+  /* List of service to be used.  */
-+  service_user *service;
-+  /* Name of the database.  */
-+  const char *name;
-+} name_database_entry;
-+
-+
-+typedef struct name_database
-+{
-+  /* List of all known databases.  */
-+  name_database_entry *entry;
-+  /* List of libraries with service implementation.  */
-+  service_library *library;
-+} name_database;
-+
-+
-+
-+/* Gathering the contents of the FIXED_FUNCTIONS file.  */
-+
-+/* It should be possible to generate this list automatically by
-+   looking at the services and databases used in the nsswitch.conf
-+   file, and having a hard-coded set of queries supported on each
-+   database.  */
-+
-+/* We #include the FIXED_FUNCTIONS file several times to build an
-+   array of function structures holding its data.  */
-+enum function_kind {
-+  fk_end = 0,                   /* Last entry.  */
-+  fk_setent,                    /* Like setpwent.  */
-+  fk_getent,                    /* Like getpwent.  */
-+  fk_endent,                    /* Like endpwent.  */
-+  fk_getby,                     /* Like gethostbyname.  */
-+  fk_get                        /* Like getpwnam.  */
-+};
-+
-+
-+struct function {
-+  /* What kind of function this is.  */
-+  enum function_kind kind;
-+
-+  /* The database and service of the function being hardwired in.  */
-+  char *database, *service;
-+
-+  /* The kind of entry being queried, for 'fk_setent', 'fk_getent',
-+     'fk_endent', and 'fk_getby' functions.  */
-+  char *entry;
-+
-+  /* The key, for 'fk_getby' entries.  */
-+  char *key;
-+
-+  /* The value and key, for 'fk_get' entries.  */
-+  char *value_and_key;
-+};
-+
-+
-+const struct function functions[] =
-+  {
-+
-+#define DEFINE_ENT(database, service, entry)    \
-+    { fk_setent, #database, #service, #entry }, \
-+    { fk_getent, #database, #service, #entry }, \
-+    { fk_endent, #database, #service, #entry },
-+#define DEFINE_GETBY(database, service, entry, key)   \
-+    { fk_getby, #database, #service, #entry, #key },
-+#define DEFINE_GET(database, service, value_and_key)     \
-+    { fk_get, #database, #service, NULL, NULL, #value_and_key },
-+
-+#include FIXED_FUNCTIONS
-+
-+#undef DEFINE_ENT
-+#undef DEFINE_GETBY
-+#undef DEFINE_GET
-+
-+    { fk_end }
-+  };
-+
-+
-+/* Parsing the config file.  Functions copied from nsswitch.c.  */
-+
-+#define __strchrnul strchrnul
-+#define __getline getline
-+#define __strncasecmp strncasecmp
-+
-+/* Prototypes for the local functions.  */
-+static name_database *nss_parse_file (const char *fname) internal_function;
-+static name_database_entry *nss_getline (char *line) internal_function;
-+static service_user *nss_parse_service_list (const char *line)
-+     internal_function;
-+
-+static name_database *
-+internal_function
-+nss_parse_file (const char *fname)
-+{
-+  FILE *fp;
-+  name_database *result;
-+  name_database_entry *last;
-+  char *line;
-+  size_t len;
-+
-+  /* Open the configuration file.  */
-+  fp = fopen (fname, "rc");
-+  if (fp == NULL)
-+    return NULL;
-+
-+  // /* No threads use this stream.  */
-+  // __fsetlocking (fp, FSETLOCKING_BYCALLER);
-+
-+  result = (name_database *) xmalloc (sizeof (name_database));
-+
-+  result->entry = NULL;
-+  result->library = NULL;
-+  last = NULL;
-+  line = NULL;
-+  len = 0;
-+  do
-+    {
-+      name_database_entry *this;
-+      ssize_t n;
-+
-+      n = __getline (&line, &len, fp);
-+      if (n < 0)
-+	break;
-+      if (line[n - 1] == '\n')
-+	line[n - 1] = '\0';
-+
-+      /* Because the file format does not know any form of quoting we
-+	 can search forward for the next '#' character and if found
-+	 make it terminating the line.  */
-+      *__strchrnul (line, '#') = '\0';
-+
-+      /* If the line is blank it is ignored.  */
-+      if (line[0] == '\0')
-+	continue;
-+
-+      /* Each line completely specifies the actions for a database.  */
-+      this = nss_getline (line);
-+      if (this != NULL)
-+	{
-+	  if (last != NULL)
-+	    last->next = this;
-+	  else
-+	    result->entry = this;
-+
-+	  last = this;
-+	}
-+    }
-+  while (!feof_unlocked (fp));
-+
-+  /* Free the buffer.  */
-+  free (line);
-+  /* Close configuration file.  */
-+  fclose (fp);
-+
-+  return result;
-+}
-+
-+
-+/* Read the source names:
-+	`( <source> ( "[" "!"? (<status> "=" <action> )+ "]" )? )*'
-+   */
-+static service_user *
-+internal_function
-+nss_parse_service_list (const char *line)
-+{
-+  service_user *result = NULL, **nextp = &result;
-+
-+  while (1)
-+    {
-+      service_user *new_service;
-+      const char *name;
-+
-+      while (isspace (line[0]))
-+	++line;
-+      if (line[0] == '\0')
-+	/* No source specified.  */
-+	return result;
-+
-+      /* Read <source> identifier.  */
-+      name = line;
-+      while (line[0] != '\0' && !isspace (line[0]) && line[0] != '[')
-+	++line;
-+      if (name == line)
-+	return result;
-+
-+
-+      new_service = (service_user *) xmalloc (sizeof (*new_service));
-+      new_service->name = (char *) xmalloc (line - name + 1);
-+
-+      *((char *) __mempcpy ((char *) new_service->name, name, line - name))
-+        = '\0';
-+
-+      /* Set default actions.  */
-+      new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE;
-+      new_service->actions[2 + NSS_STATUS_UNAVAIL] = NSS_ACTION_CONTINUE;
-+      new_service->actions[2 + NSS_STATUS_NOTFOUND] = NSS_ACTION_CONTINUE;
-+      new_service->actions[2 + NSS_STATUS_SUCCESS] = NSS_ACTION_RETURN;
-+      new_service->actions[2 + NSS_STATUS_RETURN] = NSS_ACTION_RETURN;
-+      new_service->library = NULL;
-+      new_service->known.tree = NULL;
-+      new_service->next = NULL;
-+
-+      while (isspace (line[0]))
-+	++line;
-+
-+      if (line[0] == '[')
-+	{
-+	  /* Read criterions.  */
-+	  do
-+	    ++line;
-+	  while (line[0] != '\0' && isspace (line[0]));
-+
-+	  do
-+	    {
-+	      int not;
-+	      enum nss_status status;
-+	      lookup_actions action;
-+
-+	      /* Grok ! before name to mean all statii but that one.  */
-+	      not = line[0] == '!';
-+	      if (not)
-+		++line;
-+
-+	      /* Read status name.  */
-+	      name = line;
-+	      while (line[0] != '\0' && !isspace (line[0]) && line[0] != '='
-+		     && line[0] != ']')
-+		++line;
-+
-+	      /* Compare with known statii.  */
-+	      if (line - name == 7)
-+		{
-+		  if (__strncasecmp (name, "SUCCESS", 7) == 0)
-+		    status = NSS_STATUS_SUCCESS;
-+		  else if (__strncasecmp (name, "UNAVAIL", 7) == 0)
-+		    status = NSS_STATUS_UNAVAIL;
-+		  else
-+		    return result;
-+		}
-+	      else if (line - name == 8)
-+		{
-+		  if (__strncasecmp (name, "NOTFOUND", 8) == 0)
-+		    status = NSS_STATUS_NOTFOUND;
-+		  else if (__strncasecmp (name, "TRYAGAIN", 8) == 0)
-+		    status = NSS_STATUS_TRYAGAIN;
-+		  else
-+		    return result;
-+		}
-+	      else
-+		return result;
-+
-+	      while (isspace (line[0]))
-+		++line;
-+	      if (line[0] != '=')
-+		return result;
-+	      do
-+		++line;
-+	      while (isspace (line[0]));
-+
-+	      name = line;
-+	      while (line[0] != '\0' && !isspace (line[0]) && line[0] != '='
-+		     && line[0] != ']')
-+		++line;
-+
-+	      if (line - name == 6 && __strncasecmp (name, "RETURN", 6) == 0)
-+		action = NSS_ACTION_RETURN;
-+	      else if (line - name == 8
-+		       && __strncasecmp (name, "CONTINUE", 8) == 0)
-+		action = NSS_ACTION_CONTINUE;
-+	      else
-+		return result;
-+
-+	      if (not)
-+		{
-+		  /* Save the current action setting for this status,
-+		     set them all to the given action, and reset this one.  */
-+		  const lookup_actions save = new_service->actions[2 + status];
-+		  new_service->actions[2 + NSS_STATUS_TRYAGAIN] = action;
-+		  new_service->actions[2 + NSS_STATUS_UNAVAIL] = action;
-+		  new_service->actions[2 + NSS_STATUS_NOTFOUND] = action;
-+		  new_service->actions[2 + NSS_STATUS_SUCCESS] = action;
-+		  new_service->actions[2 + status] = save;
-+		}
-+	      else
-+		new_service->actions[2 + status] = action;
-+
-+	      /* Skip white spaces.  */
-+	      while (isspace (line[0]))
-+		++line;
-+	    }
-+	  while (line[0] != ']');
-+
-+	  /* Skip the ']'.  */
-+	  ++line;
-+	}
-+
-+      *nextp = new_service;
-+      nextp = &new_service->next;
-+    }
-+}
-+
-+static name_database_entry *
-+internal_function
-+nss_getline (char *line)
-+{
-+  const char *name;
-+  name_database_entry *result;
-+  size_t len;
-+
-+  /* Ignore leading white spaces.  ATTENTION: this is different from
-+     what is implemented in Solaris.  The Solaris man page says a line
-+     beginning with a white space character is ignored.  We regard
-+     this as just another misfeature in Solaris.  */
-+  while (isspace (line[0]))
-+    ++line;
-+
-+  /* Recognize `<database> ":"'.  */
-+  name = line;
-+  while (line[0] != '\0' && !isspace (line[0]) && line[0] != ':')
-+    ++line;
-+  if (line[0] == '\0' || name == line)
-+    /* Syntax error.  */
-+    return NULL;
-+  *line++ = '\0';
-+
-+  len = strlen (name) + 1;
-+
-+  result = (name_database_entry *) xmalloc (sizeof (*result));
-+  result->name = (char *) xmalloc (len);
-+
-+  /* Save the database name.  */
-+  memcpy ((char *) result->name, name, len);
-+
-+  /* Parse the list of services.  */
-+  result->service = nss_parse_service_list (line);
-+
-+  result->next = NULL;
-+  return result;
-+}
-+
-+
-+
-+/* Generating code for statically initialized nsswitch structures.  */
-+
-+
-+/* Return the service-neutral suffix of the name of the service
-+   library function referred to by the function F.  The result is
-+   allocated with malloc.  */
-+char *
-+known_function_suffix (const struct function *f)
-+{
-+  switch (f->kind)
-+    {
-+    case fk_setent:
-+      return saprintf ("set%sent", f->entry);
-+
-+    case fk_getent:
-+      return saprintf ("get%sent_r", f->entry);
-+
-+    case fk_endent:
-+      return saprintf ("end%sent", f->entry);
-+
-+    case fk_getby:
-+      return saprintf ("get%sby%s_r", f->entry, f->key);
-+
-+    case fk_get:
-+      return saprintf ("get%s_r", f->value_and_key);
-+
-+    default:
-+      abort ();
-+    }
-+}
-+
-+
-+/* Return the name of the service library function referred to by the
-+   function F.  The result is allocated with malloc.  */
-+char *
-+known_function_name (const struct function *f)
-+{
-+  return saprintf ("_nss_%s_%s", f->service, known_function_suffix (f));
-+}
-+
-+
-+/* Write initialized known_function structures to OUT for
-+   all the functions we'll use.  */
-+void
-+generate_known_functions (FILE *out)
-+{
-+  int i;
-+
-+  /* First, generate weak references to the functions.  The service
-+     libraries depend on libc, and if these references weren't weak,
-+     we'd be making libc depend circularly on the service
-+     libraries.  */
-+  for (i = 0; functions[i].kind; i++)
-+    {
-+      char *name = known_function_name (&functions[i]);
-+      fprintf (out, "typeof (%s) %s __attribute__ ((weak));\n",
-+               name, name);
-+    }
-+  fputs ("\n", out);
-+
-+  /* Then, a table mapping names to functions.  */
-+  fputs ("static const known_function fixed_known_functions[] = {\n",
-+         out);
-+  for (i = 0; functions[i].kind; i++)
-+    {
-+      const struct function *f = &functions[i];
-+      char *suffix = known_function_suffix (f);
-+
-+      fprintf (out, "  /* %2d */ { \"%s\", _nss_%s_%s },\n",
-+               i, suffix, f->service, suffix);
-+    }
-+  fputs ("};\n", out);
-+  fputs ("\n", out);
-+}
-+
-+
-+/* Print code to OUT for an initialized array of pointers to the
-+   'known_function' structures needed for USER, which is for
-+   DATABASE.  Return its name, allocated with malloc.  */
-+char *
-+generate_known_function_list (FILE *out,
-+                              const name_database_entry *database,
-+                              const service_user *user)
-+{
-+  char *list_name = saprintf ("fixed_%s_%s_known_funcs",
-+                              database->name, user->name);
-+  fprintf (out, "static const known_function *%s[] = {\n",
-+           list_name);
-+  int i;
-+  for (i = 0; functions[i].kind; i++)
-+    if (strcmp (functions[i].database, database->name) == 0
-+        && strcmp (functions[i].service, user->name) == 0)
-+      fprintf (out, "  &fixed_known_functions[%d], /* %s */\n",
-+               i, known_function_name (&functions[i]));
-+  fputs ("  NULL\n", out);
-+  fputs ("};\n", out);
-+  fputs ("\n", out);
-+
-+  return list_name;
-+}
-+
-+
-+/* Return the name of the status value STATUS, as a statically
-+   allocated string.  */
-+const char *
-+lookup_status_name (enum nss_status status)
-+{
-+  switch (status)
-+    {
-+    case NSS_STATUS_TRYAGAIN: return "NSS_STATUS_TRYAGAIN";
-+    case NSS_STATUS_UNAVAIL: return "NSS_STATUS_UNAVAIL";
-+    case NSS_STATUS_NOTFOUND: return "NSS_STATUS_NOTFOUND";
-+    case NSS_STATUS_SUCCESS: return "NSS_STATUS_SUCCESS";
-+    case NSS_STATUS_RETURN: return "NSS_STATUS_RETURN";
-+    default: abort ();
-+    };
-+}
-+
-+
-+/* Return the name of ACTION as a statically allocated string.  */
-+const char *
-+lookup_action_name (lookup_actions action)
-+{
-+  switch (action)
-+    {
-+    case NSS_ACTION_CONTINUE: return "NSS_ACTION_CONTINUE";
-+    case NSS_ACTION_RETURN: return "NSS_ACTION_RETURN";
-+    default: abort ();
-+    }
-+}
-+
-+
-+/* Print code to OUT for the list of service_user structures starting
-+   with USER, which are all for DATABASE.  Return the name of the
-+   first structure in that list, or zero if USER is NULL.  */
-+char *
-+generate_service_user_list (FILE *out,
-+                            name_database_entry *database,
-+                            service_user *user)
-+{
-+  if (user)
-+    {
-+      /* Generate the tail of the list.  */
-+      char *next_name = generate_service_user_list (out, database, user->next);
-+      /* Generate our known function list.  */
-+      char *known_function_list_name =
-+        generate_known_function_list (out, database, user);
-+
-+      char *name = saprintf ("fixed_%s_%s_user", database->name, user->name);
-+
-+      fprintf (out, "static const service_user %s = {\n", name);
-+      if (next_name)
-+        fprintf (out, "  (service_user *) &%s,\n", next_name);
-+      else
-+        fprintf (out, "  NULL, /* no next entry */\n");
-+      fputs ("  {\n", out);
-+      int i;
-+      for (i = 0; i < sizeof (user->actions) / sizeof (user->actions[0]); i++)
-+        fprintf (out, "    %s, /* %s */\n",
-+                 lookup_action_name (user->actions[i]),
-+                 lookup_status_name (i - 2));
-+      fputs ("  },\n", out);
-+      fprintf (out, "  NULL,  /* we never need the service library */\n");
-+      fprintf (out, "  { .array = %s },\n", known_function_list_name);
-+      fprintf (out, "  \"%s\"\n", user->name);
-+      fputs ("};\n", out);
-+      fputs ("\n", out);
-+
-+      return name;
-+    }
-+  else
-+    return NULL;
-+}
-+
-+
-+/* Print code to OUT for the list of name_database_entry structures
-+   starting with DATABASE.  Return the name of the first structure
-+   in that list, or zero if DATABASE is NULL.  */
-+char *
-+generate_name_database_entries (FILE *out, name_database_entry *database)
-+{
-+  if (database)
-+    {
-+      char *next_name = generate_name_database_entries (out, database->next);
-+      char *service_user_name
-+        = generate_service_user_list (out, database, database->service);
-+      char *name = saprintf ("fixed_%s_name_database", database->name);
-+
-+      fprintf (out, "static const name_database_entry %s = {\n", name);
-+
-+      if (next_name)
-+        fprintf (out, "  (name_database_entry *) &%s,\n", next_name);
-+      else
-+        fprintf (out, "  NULL,\n");
-+
-+      if (service_user_name)
-+        fprintf (out, "  (service_user *) &%s,\n", service_user_name);
-+      else
-+        fprintf (out, "  NULL,\n");
-+
-+      fprintf (out, "  \"%s\"\n", database->name);
-+      fprintf (out, "};\n");
-+      fputs ("\n", out);
-+
-+      return name;
-+    }
-+  else
-+    return NULL;
-+}
-+
-+
-+void
-+generate_name_database (FILE *out, name_database *service_table)
-+{
-+  /* Produce a linked list of the known name_database_entry
-+     structures.  */
-+  char *entries = generate_name_database_entries (out, service_table->entry);
-+
-+  /* Now produce the main structure that points to them all.  */
-+  fprintf (out, "static const name_database fixed_name_database = {\n");
-+  if (entries)
-+    fprintf (out, "  (name_database_entry *) &%s,\n", entries);
-+  else
-+    fprintf (out, "  NULL,\n");
-+  fputs ("  NULL /* we don't need the libraries */\n"
-+         "};\n",
-+         out);
-+}
-+
-+
-+
-+/* Generating the list of service libraries we generate references to.  */
-+
-+/* String with revision number of the shared object files.  */
-+static const char *const nss_shlib_revision = LIBNSS_FILES_SO + 15;
-+
-+void
-+generate_service_lib_list (FILE *out, name_database *service_table)
-+{
-+  int i, j;
-+  int printed_any = 0;
-+
-+  for (i = 0; functions[i].kind; i++)
-+    {
-+      /* Mention each service library only once.  */
-+      for (j = 0; j < i; j++)
-+        if (strcmp (functions[i].service, functions[j].service) == 0)
-+          break;
-+
-+      if (j >= i)
-+        {
-+          if (printed_any)
-+            putc (' ', out);
-+          fprintf (out, "-lnss_%s",
-+                   functions[i].service,
-+                   nss_shlib_revision);
-+          printed_any = 1;
-+        }
-+    }
-+}
-+
-+
-+/* Main.  */
-+
-+int
-+main (int argc, char **argv)
-+{
-+  if (argc != 4)
-+    {
-+      fprintf (stderr, "usage: gen-fixed-nsswitch HEADER SERVLIBS CONFIG\n");
-+      exit (1);
-+    }
-+
-+  name_database *service_table = nss_parse_file (argv[3]);
-+
-+  FILE *header = fopen (argv[1], "w");
-+  if (! header)
-+    {
-+      fprintf (stderr,
-+               "gen-fixed-nsswitch: couldn't open output file %s: %s\n",
-+               argv[1], strerror (errno));
-+      exit (1);
-+    }
-+  fputs ("/* Generated by nss/gen-fixed-nsswitch.c.  */\n", header);
-+  fputs ("\n", header);
-+  generate_known_functions (header);
-+  generate_name_database (header, service_table);
-+  fclose (header);
-+
-+  FILE *service_lib_list = fopen (argv[2], "w");
-+  if (! service_lib_list)
-+    {
-+      fprintf (stderr,
-+               "gen-fixed-nsswitch: couldn't open output file %s: %s\n",
-+               argv[2], strerror (errno));
-+      exit (1);
-+    }
-+  generate_service_lib_list (service_lib_list, service_table);
-+  fclose (service_lib_list);
-+
-+  return 0;
-+}
-diff --git a/nss/getent.c b/nss/getent.c
-index 34df848..674c8ee 100644
---- a/nss/getent.c
-+++ b/nss/getent.c
-@@ -39,6 +39,7 @@
- #include <netinet/ether.h>
- #include <netinet/in.h>
- #include <sys/socket.h>
-+#include <gnu/option-groups.h>
- 
- /* Get libc version number.  */
- #include <version.h>
-@@ -91,6 +92,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-   fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk");
- }
- 
-+#if __OPTION_EGLIBC_DB_ALIASES
- /* This is for aliases */
- static void
- print_aliases (struct aliasent *alias)
-@@ -135,7 +137,9 @@ aliases_keys (int number, char *key[])
- 
-   return result;
- }
-+#endif /* __OPTION_EGLIBC_DB_ALIASES */
- 
-+#if __OPTION_EGLIBC_INET
- /* This is for ethers */
- static int
- ethers_keys (int number, char *key[])
-@@ -179,6 +183,7 @@ ethers_keys (int number, char *key[])
- 
-   return result;
- }
-+#endif /* __OPTION_EGLIBC_INET */
- 
- /* This is for group */
- static void
-@@ -301,6 +306,7 @@ gshadow_keys (int number, char *key[])
-   return result;
- }
- 
-+#if __OPTION_EGLIBC_INET
- /* This is for hosts */
- static void
- print_hosts (struct hostent *host)
-@@ -598,6 +604,7 @@ networks_keys (int number, char *key[])
- 
-   return result;
- }
-+#endif /* __OPTION_EGLIBC_INET */
- 
- /* Now is all for passwd */
- static void
-@@ -650,6 +657,7 @@ passwd_keys (int number, char *key[])
-   return result;
- }
- 
-+#if __OPTION_EGLIBC_INET
- /* This is for protocols */
- static void
- print_protocols (struct protoent *proto)
-@@ -807,6 +815,7 @@ services_keys (int number, char *key[])
- 
-   return result;
- }
-+#endif /* __OPTION_EGLIBC_INET */
- 
- /* This is for shadow */
- static void
-@@ -873,23 +882,36 @@ struct
-   } databases[] =
-   {
- #define D(name) { #name, name ## _keys },
--D(ahosts)
--D(ahostsv4)
--D(ahostsv6)
--D(aliases)
--D(ethers)
-+
-+#if __OPTION_EGLIBC_INET
-+# define DN(name) D(name)
-+#else
-+# define DN(name)
-+#endif
-+
-+#if __OPTION_EGLIBC_DB_ALIASES
-+# define DA(name) D(name)
-+#else
-+# define DA(name)
-+#endif
-+
-+DN(ahosts)
-+DN(ahostsv4)
-+DN(ahostsv6)
-+DA(aliases)
-+DN(ethers)
- D(group)
- D(gshadow)
--D(hosts)
--D(initgroups)
--D(netgroup)
--D(networks)
-+DN(hosts)
-+DN(initgroups)
-+DN(netgroup)
-+DN(networks)
- D(passwd)
--D(protocols)
-+DN(protocols)
- #if HAVE_SUNRPC
--D(rpc)
-+DN(rpc)
- #endif
--D(services)
-+DN(services)
- D(shadow)
- #undef D
-     { NULL, NULL }
-diff --git a/nss/getnssent_r.c b/nss/getnssent_r.c
-index f5b9036..f09f7fe 100644
---- a/nss/getnssent_r.c
-+++ b/nss/getnssent_r.c
-@@ -16,6 +16,7 @@
-    <http://www.gnu.org/licenses/>.  */
- 
- #include <errno.h>
-+#include <gnu/option-groups.h>
- #include <netdb.h>
- #include "nsswitch.h"
- 
-@@ -59,11 +60,13 @@ __nss_setent (const char *func_name, db_lookup_function lookup_fct,
-   } fct;
-   int no_more;
- 
-+#if __OPTION_EGLIBC_INET
-   if (res && __res_maybe_init (&_res, 0) == -1)
-     {
-       __set_h_errno (NETDB_INTERNAL);
-       return;
-     }
-+#endif /* __OPTION_EGLIBC_INET */
- 
-   /* Cycle through the services and run their `setXXent' functions until
-      we find an available service.  */
-@@ -101,11 +104,13 @@ __nss_endent (const char *func_name, db_lookup_function lookup_fct,
-   } fct;
-   int no_more;
- 
-+#if __OPTION_EGLIBC_INET
-   if (res && __res_maybe_init (&_res, 0) == -1)
-     {
-       __set_h_errno (NETDB_INTERNAL);
-       return;
-     }
-+#endif /* __OPTION_EGLIBC_INET */
- 
-   /* Cycle through all the services and run their endXXent functions.  */
-   no_more = setup (func_name, lookup_fct, &fct.ptr, nip, startp, 1);
-@@ -141,12 +146,14 @@ __nss_getent_r (const char *getent_func_name,
-   int no_more;
-   enum nss_status status;
- 
-+#if __OPTION_EGLIBC_INET
-   if (res && __res_maybe_init (&_res, 0) == -1)
-     {
-       *h_errnop = NETDB_INTERNAL;
-       *result = NULL;
-       return errno;
-     }
-+#endif /* __OPTION_EGLIBC_INET */
- 
-   /* Initialize status to return if no more functions are found.  */
-   status = NSS_STATUS_NOTFOUND;
-@@ -161,7 +168,7 @@ __nss_getent_r (const char *getent_func_name,
-       int is_last_nip = *nip == *last_nip;
- 
-       status = DL_CALL_FCT (fct.f,
--			    (resbuf, buffer, buflen, &errno, &h_errno));
-+			    (resbuf, buffer, buflen, &errno, h_errnop));
- 
-       /* The status is NSS_STATUS_TRYAGAIN and errno is ERANGE the
- 	 provided buffer is too small.  In this case we should give
-diff --git a/nss/nsswitch.c b/nss/nsswitch.c
-index 9712623..c81e207 100644
---- a/nss/nsswitch.c
-+++ b/nss/nsswitch.c
-@@ -26,6 +26,7 @@
- #include <stdio_ext.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <gnu/option-groups.h>
- 
- #include <aliases.h>
- #include <grp.h>
-@@ -41,6 +42,15 @@
- #include "../nscd/nscd_proto.h"
- #include <sysdep.h>
- 
-+/* When OPTION_EGLIBC_NSSWITCH is disabled, we use fixed tables of
-+   databases and services, generated at library build time.  Thus:
-+   - We can't reconfigure individual databases, so we don't need a
-+     name-to-database map.
-+   - We never add databases or service libraries, or look up functions
-+     at runtime, so there's no need for a lock to protect our tables.
-+   See ../option-groups.def for the details.  */
-+#if __OPTION_EGLIBC_NSSWITCH
-+
- /* Prototypes for the local functions.  */
- static name_database *nss_parse_file (const char *fname) internal_function;
- static name_database_entry *nss_getline (char *line) internal_function;
-@@ -79,6 +89,9 @@ bool __nss_database_custom[NSS_DBSIDX_max];
- 
- __libc_lock_define_initialized (static, lock)
- 
-+#define lock_nsswitch __libc_lock_lock (lock)
-+#define unlock_nsswitch __libc_lock_unlock (lock)
-+
- #if !defined DO_STATIC_NSS || defined SHARED
- /* String with revision number of the shared object files.  */
- static const char *const __nss_shlib_revision = LIBNSS_FILES_SO + 15;
-@@ -93,6 +106,20 @@ static name_database *service_table;
-    __libc_freeres.  */
- static name_database_entry *defconfig_entries;
- 
-+#else /* __OPTION_EGLIBC_NSSWITCH */
-+
-+/* Bring in the statically initialized service table we generated at
-+   build time.  */
-+#include "fixed-nsswitch.h"
-+
-+const static name_database *service_table = &fixed_name_database;
-+
-+/* Nothing ever changes, so there's no need to lock anything.  */
-+#define lock_nsswitch (0)
-+#define unlock_nsswitch (0)
-+
-+#endif /* __OPTION_EGLIBC_NSSWITCH */
-+
- 
- #ifdef USE_NSCD
- /* Nonzero if this is the nscd process.  */
-@@ -109,20 +136,22 @@ __nss_database_lookup (const char *database, const char *alternate_name,
- 		       const char *defconfig, service_user **ni)
- {
-   /* Prevent multiple threads to change the service table.  */
--  __libc_lock_lock (lock);
-+  lock_nsswitch;
- 
-   /* Reconsider database variable in case some other thread called
-      `__nss_configure_lookup' while we waited for the lock.  */
-   if (*ni != NULL)
-     {
--      __libc_lock_unlock (lock);
-+      unlock_nsswitch;
-       return 0;
-     }
- 
-+#if __OPTION_EGLIBC_NSSWITCH
-   /* Are we initialized yet?  */
-   if (service_table == NULL)
-     /* Read config file.  */
-     service_table = nss_parse_file (_PATH_NSSWITCH_CONF);
-+#endif
- 
-   /* Test whether configuration data is available.  */
-   if (service_table != NULL)
-@@ -144,6 +173,7 @@ __nss_database_lookup (const char *database, const char *alternate_name,
- 	    *ni = entry->service;
-     }
- 
-+#if __OPTION_EGLIBC_NSSWITCH
-   /* No configuration data is available, either because nsswitch.conf
-      doesn't exist or because it doesn't have a line for this database.
- 
-@@ -166,13 +196,23 @@ __nss_database_lookup (const char *database, const char *alternate_name,
- 	    {
- 	      entry->next = defconfig_entries;
- 	      entry->service = *ni;
--	      entry->name[0] = '\0';
-+	      entry->name = "";
- 	      defconfig_entries = entry;
- 	    }
- 	}
-     }
-+#else
-+  /* Without the dynamic behavior, we can't process defconfig.  The
-+     databases the user specified at library build time are all you
-+     get.  */
-+  if (*ni == NULL)
-+    {
-+      unlock_nsswitch;
-+      return -1;
-+    }
-+#endif
- 
--  __libc_lock_unlock (lock);
-+  unlock_nsswitch;
- 
-   return *ni != NULL ? 0 : -1;
- }
-@@ -252,6 +292,7 @@ __nss_next2 (service_user **ni, const char *fct_name, const char *fct2_name,
- libc_hidden_def (__nss_next2)
- 
- 
-+#if __OPTION_EGLIBC_NSSWITCH
- int
- attribute_compat_text_section
- __nss_next (service_user **ni, const char *fct_name, void **fctp, int status,
-@@ -300,13 +341,13 @@ __nss_configure_lookup (const char *dbname, const char *service_line)
-     }
- 
-   /* Prevent multiple threads to change the service table.  */
--  __libc_lock_lock (lock);
-+  lock_nsswitch;
- 
-   /* Install new rules.  */
-   *databases[cnt].dbp = new_db;
-   __nss_database_custom[cnt] = true;
- 
--  __libc_lock_unlock (lock);
-+  unlock_nsswitch;
- 
-   return 0;
- }
-@@ -402,7 +443,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
-   void **found, *result;
- 
-   /* We now modify global data.  Protect it.  */
--  __libc_lock_lock (lock);
-+  lock_nsswitch;
- 
-   /* Search the tree of functions previously requested.  Data in the
-      tree are `known_function' structures, whose first member is a
-@@ -413,7 +454,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
-      enough to a pointer to our structure to use as a lookup key that
-      will be passed to `known_compare' (above).  */
- 
--  found = __tsearch (&fct_name, &ni->known, &known_compare);
-+  found = __tsearch (&fct_name, &ni->known.tree, &known_compare);
-   if (found == NULL)
-     /* This means out-of-memory.  */
-     result = NULL;
-@@ -440,7 +481,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
- #endif
- 	  /* Oops.  We can't instantiate this node properly.
- 	     Remove it from the tree.  */
--	  __tdelete (&fct_name, &ni->known, &known_compare);
-+	  __tdelete (&fct_name, &ni->known.tree, &known_compare);
- 	  free (known);
- 	  result = NULL;
- 	}
-@@ -520,13 +561,43 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
-     }
- 
-   /* Remove the lock.  */
--  __libc_lock_unlock (lock);
-+  unlock_nsswitch;
- 
-   return result;
- }
- libc_hidden_def (__nss_lookup_function)
- 
- 
-+#else /* below if ! __OPTION_EGLIBC_NSSWITCH */
-+
-+
-+int
-+__nss_configure_lookup (const char *dbname, const char *service_line)
-+{
-+  /* We can't dynamically configure lookup without
-+     OPTION_EGLIBC_NSSWITCH.  */
-+  __set_errno (EINVAL);
-+  return -1;
-+}
-+
-+
-+void *
-+__nss_lookup_function (service_user *ni, const char *fct_name)
-+{
-+  int i;
-+  const known_function **known = ni->known.array;
-+
-+  for (i = 0; known[i]; i++)
-+    if (strcmp (fct_name, known[i]->fct_name) == 0)
-+      return known[i]->fct_ptr;
-+
-+  return NULL;
-+}
-+libc_hidden_def (__nss_lookup_function)
-+#endif
-+
-+
-+#if __OPTION_EGLIBC_NSSWITCH
- static name_database *
- internal_function
- nss_parse_file (const char *fname)
-@@ -632,8 +703,10 @@ nss_parse_service_list (const char *line)
- 					     + (line - name + 1));
-       if (new_service == NULL)
- 	return result;
-+      new_service->name = (char *) (new_service + 1);
- 
--      *((char *) __mempcpy (new_service->name, name, line - name)) = '\0';
-+      *((char *) __mempcpy ((char *) new_service->name, name, line - name))
-+        = '\0';
- 
-       /* Set default actions.  */
-       new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE;
-@@ -642,7 +715,7 @@ nss_parse_service_list (const char *line)
-       new_service->actions[2 + NSS_STATUS_SUCCESS] = NSS_ACTION_RETURN;
-       new_service->actions[2 + NSS_STATUS_RETURN] = NSS_ACTION_RETURN;
-       new_service->library = NULL;
--      new_service->known = NULL;
-+      new_service->known.tree = NULL;
-       new_service->next = NULL;
- 
-       while (isspace (line[0]))
-@@ -778,9 +851,10 @@ nss_getline (char *line)
-   result = (name_database_entry *) malloc (sizeof (name_database_entry) + len);
-   if (result == NULL)
-     return NULL;
-+  result->name = (char *) (result + 1);
- 
-   /* Save the database name.  */
--  memcpy (result->name, name, len);
-+  memcpy ((char *) result->name, name, len);
- 
-   /* Parse the list of services.  */
-   result->service = nss_parse_service_list (line);
-@@ -816,6 +890,7 @@ nss_new_service (name_database *database, const char *name)
-   return *currentp;
- }
- #endif
-+#endif /* __OPTION_EGLIBC_NSSWITCH */
- 
- 
- #if defined SHARED && defined USE_NSCD
-@@ -834,6 +909,7 @@ nss_load_all_libraries (const char *service, const char *def)
- }
- 
- 
-+#if __OPTION_EGLIBC_INET
- /* Called by nscd and nscd alone.  */
- void
- __nss_disable_nscd (void (*cb) (size_t, struct traced_file *))
-@@ -857,8 +933,10 @@ __nss_disable_nscd (void (*cb) (size_t, struct traced_file *))
-   __nss_not_use_nscd_services = -1;
-   __nss_not_use_nscd_netgroup = -1;
- }
-+#endif /* __OPTION_EGLIBC_INET */
- #endif
- 
-+#if __OPTION_EGLIBC_NSSWITCH
- static void
- free_database_entries (name_database_entry *entry)
- {
-@@ -871,8 +949,8 @@ free_database_entries (name_database_entry *entry)
- 	{
- 	  service_user *olds = service;
- 
--	  if (service->known != NULL)
--	    __tdestroy (service->known, free);
-+	  if (service->known.tree != NULL)
-+	    __tdestroy (service->known.tree, free);
- 
- 	  service = service->next;
- 	  free (olds);
-@@ -926,3 +1004,4 @@ libc_freeres_fn (free_mem)
- 
-   free (top);
- }
-+#endif /* __OPTION_EGLIBC_NSSWITCH */
-diff --git a/nss/nsswitch.h b/nss/nsswitch.h
-index a5318fa..1730977 100644
---- a/nss/nsswitch.h
-+++ b/nss/nsswitch.h
-@@ -65,10 +65,20 @@ typedef struct service_user
-   lookup_actions actions[5];
-   /* Link to the underlying library object.  */
-   service_library *library;
--  /* Collection of known functions.  */
--  void *known;
-+  /* Collection of known functions.
-+
-+     With OPTION_EGLIBC_NSSWITCH enabled, this is the root of a
-+     'tsearch'-style tree.
-+
-+     With OPTION_EGLIBC_NSSWITCH disabled, this is an array of
-+     pointers to known_function structures, NULL-terminated.  */
-+  union
-+  {
-+    void *tree;
-+    const known_function **array;
-+  } known;
-   /* Name of the service (`files', `dns', `nis', ...).  */
--  char name[0];
-+  const char *name;
- } service_user;
- 
- /* To access the action based on the status value use this macro.  */
-@@ -82,7 +92,7 @@ typedef struct name_database_entry
-   /* List of service to be used.  */
-   service_user *service;
-   /* Name of the database.  */
--  char name[0];
-+  const char *name;
- } name_database_entry;
- 
- 
-diff --git a/posix/Makefile b/posix/Makefile
-index 15e8818..609ed03 100644
---- a/posix/Makefile
-+++ b/posix/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Sub-makefile for POSIX portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= posix
- 
- include ../Makeconfig
-@@ -43,13 +45,24 @@ routines :=								      \
- 	getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid	      \
- 	getresuid getresgid setresuid setresgid				      \
- 	pathconf sysconf fpathconf					      \
--	glob glob64 fnmatch regex					      \
-+	glob glob64 fnmatch						      \
- 	confstr								      \
- 	getopt getopt1 getopt_init					      \
- 	sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax  \
- 	sched_primin sched_rr_gi sched_getaffinity sched_setaffinity	      \
--	getaddrinfo gai_strerror wordexp				      \
- 	pread pwrite pread64 pwrite64					      \
-+	posix_madvise							      \
-+	get_child_max sched_cpucount sched_cpualloc sched_cpufree
-+
-+routines-$(OPTION_EGLIBC_INET) += getaddrinfo gai_strerror
-+
-+ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC))
-+routines-$(OPTION_POSIX_REGEXP) += regex
-+else
-+routines-$(OPTION_POSIX_REGEXP) += xregex
-+endif
-+
-+routines-$(OPTION_EGLIBC_SPAWN) +=					      \
- 	spawn_faction_init spawn_faction_destroy spawn_faction_addclose	      \
- 	spawn_faction_addopen spawn_faction_adddup2			      \
- 	spawnattr_init spawnattr_destroy				      \
-@@ -61,37 +74,54 @@ routines :=								      \
- 	posix_madvise							      \
- 	get_child_max sched_cpucount sched_cpualloc sched_cpufree
- 
-+routines-$(OPTION_EGLIBC_WORDEXP) += wordexp
-+
- aux		:= init-posix environ
--tests		:= tstgetopt testfnm runtests runptests	     \
-+tests		:= tstgetopt testfnm runtests \
- 		   tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \
--		   tst-mmap tst-getaddrinfo tst-truncate \
--		   tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \
--		   tst-chmod bug-regex1 bug-regex2 bug-regex3 bug-regex4 \
--		   tst-gnuglob tst-regex bug-regex5 bug-regex6 bug-regex7 \
--		   bug-regex8 bug-regex9 bug-regex10 bug-regex11 bug-regex12 \
--		   bug-regex13 bug-regex14 bug-regex15 bug-regex16 \
--		   bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
--		   bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
--		   bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
-+		   tst-mmap tst-truncate \
-+		   tst-truncate64 tst-fork tst-dir \
-+		   tst-chmod bug-regex2 bug-regex3 bug-regex4 \
-+		   tst-gnuglob bug-regex6 bug-regex7 \
-+		   bug-regex8 bug-regex9 bug-regex10 bug-regex12 \
-+		   bug-regex14 bug-regex15 \
-+		   bug-regex21 bug-regex24 \
-+		   bug-regex27 bug-regex28 \
- 		   bug-regex29 bug-regex30 bug-regex31 bug-regex32 \
--		   bug-regex33 tst-nice tst-nanosleep tst-regex2 \
--		   transbug tst-rxspencer tst-pcre tst-boost \
--		   bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
--		   tst-getaddrinfo2 bug-glob1 bug-glob2 bug-glob3 tst-sysconf \
-+		   tst-nice tst-nanosleep \
-+		   transbug \
-+		   tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
-+		   bug-glob1 bug-glob2 bug-glob3 tst-sysconf \
- 		   tst-execvp1 tst-execvp2 tst-execlp1 tst-execlp2 \
- 		   tst-execv1 tst-execv2 tst-execl1 tst-execl2 \
- 		   tst-execve1 tst-execve2 tst-execle1 tst-execle2 \
--		   tst-execvp3 tst-execvp4 tst-rfc3484 tst-rfc3484-2 \
--		   tst-rfc3484-3 \
--		   tst-getaddrinfo3 tst-fnmatch2 tst-cpucount tst-cpuset \
-+		   tst-execvp3 tst-execvp4 \
-+		   tst-fnmatch2 tst-cpucount tst-cpuset \
- 		   bug-getopt1 bug-getopt2 bug-getopt3 bug-getopt4 \
- 		   bug-getopt5 tst-getopt_long1 bug-regex34 bug-regex35 \
- 		   tst-pathconf tst-getaddrinfo4 tst-rxspencer-no-utf8 \
- 		   tst-fnmatch3 bug-regex36 tst-getaddrinfo5
--xtests		:= bug-ga2
-+
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) \
-+		+= tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \
-+		   bug-regex23 bug-regex25 bug-regex32 bug-regex33
-+tests-$(OPTION_EGLIBC_INET) \
-+		+= tst-getaddrinfo bug-ga1 tst-getaddrinfo2 \
-+		   tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 tst-getaddrinfo3
-+tests-$(OPTION_POSIX_REGEXP_GLIBC) \
-+		+= runptests bug-regex11 bug-regex13 bug-regex16 \
-+		   tst-regex2 tst-rxspencer tst-pcre tst-boost
-+ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_POSIX_REGEXP_GLIBC))
-+tests		+= tst-regex bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
-+		   bug-regex22 bug-regex26
-+endif
-+xtests-$(OPTION_EGLIBC_INET) += bug-ga2
-+
- ifeq (yes,$(build-shared))
- test-srcs	:= globtest
--tests           += wordexp-test tst-exec tst-spawn
-+tests		+= tst-exec
-+tests-$(OPTION_EGLIBC_SPAWN) += tst-spawn
-+tests-$(OPTION_EGLIBC_WORDEXP) += wordexp-test
- endif
- tests-static	= tst-exec-static tst-spawn-static
- tests		+= $(tests-static)
-@@ -117,7 +147,10 @@ generated += $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
- 
- ifeq ($(run-built-tests),yes)
- ifeq (yes,$(build-shared))
--tests-special += $(objpfx)globtest.out $(objpfx)wordexp-tst.out
-+tests-special += $(objpfx)globtest.out
-+ifeq (y,$(OPTION_EGLIBC_WORDEXP))
-+tests-special += $(objpfx)wordexp-tst.out
-+endif
- endif
- endif
- 
-@@ -125,12 +158,16 @@ endif
- # XXX Please note that for now we ignore the result of this test.
- tests-special += $(objpfx)annexc.out
- ifeq ($(run-built-tests),yes)
--tests-special += $(objpfx)bug-regex2-mem.out $(objpfx)bug-regex14-mem.out \
-+tests-special += $(objpfx)bug-regex2-mem.out \
- 		 $(objpfx)bug-regex21-mem.out $(objpfx)bug-regex31-mem.out \
--		 $(objpfx)tst-rxspencer-no-utf8-mem.out $(objpfx)tst-pcre-mem.out \
--		 $(objpfx)tst-boost-mem.out $(objpfx)tst-getconf.out \
-+		 $(objpfx)tst-getconf.out \
- 		 $(objpfx)bug-glob2-mem.out $(objpfx)tst-vfork3-mem.out \
- 		 $(objpfx)tst-fnmatch-mem.out $(objpfx)bug-regex36-mem.out
-+ifeq (y,$(OPTION_POSIX_REGEXP_GLIBC))
-+tests-special += $(objpfx)bug-regex14-mem.out $(objpfx)tst-rxspencer-no-utf8-mem.out \
-+  		 $(objpfx)tst-pcre-mem.out $(objpfx)tst-boost-mem.out
-+endif
-+
- xtests-special += $(objpfx)bug-ga2-mem.out
- endif
- 
-@@ -143,6 +180,8 @@ $(objpfx)globtest.out: globtest.sh $(objpfx)globtest
- 	$(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
- 		'$(test-program-prefix)' '$(test-wrapper-env)'; \
- 	$(evaluate-test)
-+LDLIBS-globtest += $(shell cat $(common-objpfx)nss/fixed-nsswitch-libs)
-+
- $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
- 	$(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
- 		 '$(run-program-env)' '$(test-program-prefix-after-env)'; \
-@@ -205,7 +244,10 @@ tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir);
- tst-chmod-ARGS = $(objdir)
- tst-vfork3-ARGS = --test-dir=$(objpfx)
- 
--tst-rxspencer-ARGS = --utf8 rxspencer/tests
-+tst-rxspencer-ARGS = rxspencer/tests
-+ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
-+tst-rxspencer-ARGS += --utf8
-+endif
- tst-rxspencer-no-utf8-ARGS = rxspencer/tests
- tst-pcre-ARGS = PCRE.tests
- tst-boost-ARGS = BOOST.tests
-diff --git a/posix/bug-regex1.c b/posix/bug-regex1.c
-index 38eb543..17cd1a0 100644
---- a/posix/bug-regex1.c
-+++ b/posix/bug-regex1.c
-@@ -4,6 +4,7 @@
- #include <string.h>
- #include <regex.h>
- #include <wchar.h>
-+#include <gnu/option-groups.h>
- 
- int
- main (void)
-@@ -17,7 +18,9 @@ main (void)
-   memset (&regex, '\0', sizeof (regex));
- 
-   setlocale (LC_ALL, "de_DE.ISO-8859-1");
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-   fwide (stdout, -1);
-+#endif
- 
-   re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_DEBUG);
- 
-diff --git a/posix/bug-regex6.c b/posix/bug-regex6.c
-index efcc890..3b270c7 100644
---- a/posix/bug-regex6.c
-+++ b/posix/bug-regex6.c
-@@ -22,6 +22,7 @@
- #include <string.h>
- #include <sys/types.h>
- #include <regex.h>
-+#include <gnu/option-groups.h>
- 
- 
- int
-@@ -30,7 +31,12 @@ main (int argc, char *argv[])
-   regex_t re;
-   regmatch_t mat[10];
-   int i, j, ret = 0;
--  const char *locales[] = { "C", "de_DE.UTF-8" };
-+  const char *locales[] = {
-+    "C",
-+#if __OPTION_EGLIBC_LOCALE_CODE
-+    "de_DE.UTF-8"
-+#endif
-+  };
-   const char *string = "http://www.regex.com/pattern/matching.html#intro";
-   regmatch_t expect[10] = {
-     { 0, 48 }, { 0, 5 }, { 0, 4 }, { 5, 20 }, { 7, 20 }, { 20, 42 },
-diff --git a/posix/fnmatch.c b/posix/fnmatch.c
-index fd85efa..01cc9fe 100644
---- a/posix/fnmatch.c
-+++ b/posix/fnmatch.c
-@@ -30,6 +30,10 @@
- #include <ctype.h>
- #include <string.h>
- 
-+#if defined _LIBC
-+# include <gnu/option-groups.h>
-+#endif
-+
- #if defined STDC_HEADERS || defined _LIBC
- # include <stdlib.h>
- #endif
-@@ -131,7 +135,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
- #   define ISWCTYPE(WC, WT)	iswctype (WC, WT)
- #  endif
- 
--#  if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC
-+#  if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS && _LIBC && __OPTION_EGLIBC_LOCALE_CODE)
- /* In this case we are implementing the multibyte character handling.  */
- #   define HANDLE_MULTIBYTE	1
- #  endif
-diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c
-index f46c9df..74e1754 100644
---- a/posix/fnmatch_loop.c
-+++ b/posix/fnmatch_loop.c
-@@ -15,6 +15,8 @@
-    License along with the GNU C Library; if not, see
-    <http://www.gnu.org/licenses/>.  */
- 
-+#include <gnu/option-groups.h>
-+
- #include <stdint.h>
- 
- struct STRUCT
-@@ -54,10 +56,15 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
-   const char *collseq = (const char *)
-     _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC);
- # else
-+#  if __OPTION_EGLIBC_LOCALE_CODE
-   const UCHAR *collseq = (const UCHAR *)
-     _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQMB);
--# endif
--#endif
-+#   define COLLSEQ_BYTE_LOOKUP(ix) (collseq[(ix)])
-+#  else
-+#   define COLLSEQ_BYTE_LOOKUP(ix) (ix)
-+#  endif /* __OPTION_EGLIBC_LOCALE_CODE */
-+# endif /* WIDE_CHAR_VERSION */
-+#endif /* _LIBC */
- 
-   while ((c = *p++) != L('\0'))
-     {
-@@ -277,7 +284,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
- 		    /* Leave room for the null.  */
- 		    CHAR str[CHAR_CLASS_MAX_LENGTH + 1];
- 		    size_t c1 = 0;
--#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
-+#if defined _LIBC ? __OPTION_POSIX_C_LANG_WIDE_CHAR : (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
- 		    wctype_t wt;
- #endif
- 		    const CHAR *startp = p;
-@@ -307,7 +314,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
- 		      }
- 		    str[c1] = L('\0');
- 
--#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
-+#if defined _LIBC ? __OPTION_POSIX_C_LANG_WIDE_CHAR : (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
- 		    wt = IS_CHAR_CLASS (str);
- 		    if (wt == 0)
- 		      /* Invalid character class name.  */
-@@ -680,8 +687,10 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
- 			else
- 			  lcollseq = __collseq_table_lookup (collseq, cold);
- # else
--			fcollseq = collseq[fn];
--			lcollseq = is_seqval ? cold : collseq[(UCHAR) cold];
-+			fcollseq = COLLSEQ_BYTE_LOOKUP (fn);
-+			lcollseq = (is_seqval
-+                                    ? cold
-+                                    : COLLSEQ_BYTE_LOOKUP ((UCHAR) cold));
- # endif
- 
- 			is_seqval = 0;
-@@ -857,7 +866,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
- 				    goto matched;
- 				  }
- # else
--				hcollseq = collseq[cend];
-+				hcollseq = COLLSEQ_BYTE_LOOKUP (cend);
- # endif
- 			      }
- 
-diff --git a/posix/glob.c b/posix/glob.c
-index d65e55d..1ac00a1 100644
---- a/posix/glob.c
-+++ b/posix/glob.c
-@@ -25,6 +25,9 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <stddef.h>
-+#ifdef _LIBC
-+# include <gnu/option-groups.h>
-+#endif
- 
- /* Outcomment the following line for production quality code.  */
- /* #define NDEBUG 1 */
-@@ -607,6 +610,7 @@ glob (pattern, flags, errfunc, pglob)
- 	  if (home_dir == NULL || home_dir[0] == '\0')
- 	    home_dir = "c:/users/default"; /* poor default */
- #  else
-+#   if ! _LIBC || __OPTION_EGLIBC_GETLOGIN
- 	  if (home_dir == NULL || home_dir[0] == '\0')
- 	    {
- 	      int success;
-@@ -623,19 +627,19 @@ glob (pattern, flags, errfunc, pglob)
- 	      if (success)
- 		{
- 		  struct passwd *p;
--#   if defined HAVE_GETPWNAM_R || defined _LIBC
-+#    if defined HAVE_GETPWNAM_R || defined _LIBC
- 		  long int pwbuflen = GETPW_R_SIZE_MAX ();
- 		  char *pwtmpbuf;
- 		  struct passwd pwbuf;
- 		  int malloc_pwtmpbuf = 0;
- 		  int save = errno;
- 
--#    ifndef _LIBC
-+#     ifndef _LIBC
- 		  if (pwbuflen == -1)
- 		    /* `sysconf' does not support _SC_GETPW_R_SIZE_MAX.
- 		       Try a moderate value.  */
- 		    pwbuflen = 1024;
--#    endif
-+#     endif
- 		  if (__libc_use_alloca (alloca_used + pwbuflen))
- 		    pwtmpbuf = alloca_account (pwbuflen, alloca_used);
- 		  else
-@@ -682,9 +686,9 @@ glob (pattern, flags, errfunc, pglob)
- 			}
- 		      __set_errno (save);
- 		    }
--#   else
-+#    else
- 		  p = getpwnam (name);
--#   endif
-+#    endif
- 		  if (p != NULL)
- 		    {
- 		      if (!malloc_pwtmpbuf)
-@@ -713,6 +717,7 @@ glob (pattern, flags, errfunc, pglob)
- 		    }
- 		}
- 	    }
-+#   endif /* ! _LIBC || __OPTION_EGLIBC_GETLOGIN */
- 	  if (home_dir == NULL || home_dir[0] == '\0')
- 	    {
- 	      if (flags & GLOB_TILDE_CHECK)
-diff --git a/posix/regcomp.c b/posix/regcomp.c
-index bf8aa16..6a41251 100644
---- a/posix/regcomp.c
-+++ b/posix/regcomp.c
-@@ -18,6 +18,7 @@
-    <http://www.gnu.org/licenses/>.  */
- 
- #include <stdint.h>
-+#include <gnu/option-groups.h>
- 
- #ifdef _LIBC
- # include <locale/weight.h>
-@@ -309,7 +310,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
- {
-   re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
-   int node_cnt;
--  int icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
-+  int icase = (dfa_mb_cur_max (dfa) == 1 && (bufp->syntax & RE_ICASE));
-   for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
-     {
-       int node = init_state->nodes.elems[node_cnt];
-@@ -319,9 +320,9 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
- 	{
- 	  re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c);
- #ifdef RE_ENABLE_I18N
--	  if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
-+	  if ((bufp->syntax & RE_ICASE) && dfa_mb_cur_max (dfa) > 1)
- 	    {
--	      unsigned char *buf = alloca (dfa->mb_cur_max), *p;
-+	      unsigned char *buf = alloca (dfa_mb_cur_max (dfa)), *p;
- 	      wchar_t wc;
- 	      mbstate_t state;
- 
-@@ -352,7 +353,11 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
- 		  re_set_fastmap (fastmap, icase, ch);
- 	    }
- 	}
--#ifdef RE_ENABLE_I18N
-+
-+      /* When OPTION_EGLIBC_LOCALE_CODE is disabled, the current
-+         locale is always C, which has no rules and no multi-byte
-+         characters.  */
-+#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
-       else if (type == COMPLEX_BRACKET)
- 	{
- 	  re_charset_t *cset = dfa->nodes[node].opr.mbcset;
-@@ -380,7 +385,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
- 	     i.e. where we would not find an invalid sequence.  This only
- 	     applies to multibyte character sets; for single byte character
- 	     sets, the SIMPLE_BRACKET again suffices.  */
--	  if (dfa->mb_cur_max > 1
-+	  if (dfa_mb_cur_max (dfa) > 1
- 	      && (cset->nchar_classes || cset->non_match || cset->nranges
- # ifdef _LIBC
- 		  || cset->nequiv_classes
-@@ -408,7 +413,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
- 		  memset (&state, '\0', sizeof (state));
- 		  if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
- 		    re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
--		  if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
-+		  if ((bufp->syntax & RE_ICASE) && dfa_mb_cur_max (dfa) > 1)
- 		    {
- 		      if (__wcrtomb (buf, __towlower (cset->mbchars[i]), &state)
- 			  != (size_t) -1)
-@@ -417,7 +422,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
- 		}
- 	    }
- 	}
--#endif /* RE_ENABLE_I18N */
-+#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
-       else if (type == OP_PERIOD
- #ifdef RE_ENABLE_I18N
- 	       || type == OP_UTF8_PERIOD
-@@ -860,11 +865,15 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
- 
-   dfa->mb_cur_max = MB_CUR_MAX;
- #ifdef _LIBC
--  if (dfa->mb_cur_max == 6
-+  if (dfa_mb_cur_max (dfa) == 6
-       && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0)
-     dfa->is_utf8 = 1;
-+# if __OPTION_EGLIBC_LOCALE_CODE
-   dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII)
- 		       != 0);
-+# else
-+  dfa->map_notascii = 0;
-+# endif
- #else
- # ifdef HAVE_LANGINFO_CODESET
-   codeset_name = nl_langinfo (CODESET);
-@@ -890,7 +899,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
- #endif
- 
- #ifdef RE_ENABLE_I18N
--  if (dfa->mb_cur_max > 1)
-+  if (dfa_mb_cur_max (dfa) > 1)
-     {
-       if (dfa->is_utf8)
- 	dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map;
-@@ -1788,7 +1797,7 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
-   token->word_char = 0;
- #ifdef RE_ENABLE_I18N
-   token->mb_partial = 0;
--  if (input->mb_cur_max > 1 &&
-+  if (string_mb_cur_max (input) > 1 &&
-       !re_string_first_byte (input, re_string_cur_idx (input)))
-     {
-       token->type = CHARACTER;
-@@ -1809,7 +1818,7 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
-       token->opr.c = c2;
-       token->type = CHARACTER;
- #ifdef RE_ENABLE_I18N
--      if (input->mb_cur_max > 1)
-+      if (string_mb_cur_max (input) > 1)
- 	{
- 	  wint_t wc = re_string_wchar_at (input,
- 					  re_string_cur_idx (input) + 1);
-@@ -1923,7 +1932,7 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
- 
-   token->type = CHARACTER;
- #ifdef RE_ENABLE_I18N
--  if (input->mb_cur_max > 1)
-+  if (string_mb_cur_max (input) > 1)
-     {
-       wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input));
-       token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
-@@ -2023,7 +2032,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
-   token->opr.c = c;
- 
- #ifdef RE_ENABLE_I18N
--  if (input->mb_cur_max > 1 &&
-+  if (string_mb_cur_max (input) > 1 &&
-       !re_string_first_byte (input, re_string_cur_idx (input)))
-     {
-       token->type = CHARACTER;
-@@ -2246,7 +2255,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
- 	  return NULL;
- 	}
- #ifdef RE_ENABLE_I18N
--      if (dfa->mb_cur_max > 1)
-+      if (dfa_mb_cur_max (dfa) > 1)
- 	{
- 	  while (!re_string_eoi (regexp)
- 		 && !re_string_first_byte (regexp, re_string_cur_idx (regexp)))
-@@ -2384,7 +2393,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
- 	  *err = REG_ESPACE;
- 	  return NULL;
- 	}
--      if (dfa->mb_cur_max > 1)
-+      if (dfa_mb_cur_max (dfa) > 1)
- 	dfa->has_mb_node = 1;
-       break;
-     case OP_WORD:
-@@ -2690,7 +2699,7 @@ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem,
-        However, for !_LIBC we have no collation elements: if the
-        character set is single byte, the single byte character set
-        that we build below suffices.  parse_bracket_exp passes
--       no MBCSET if dfa->mb_cur_max == 1.  */
-+       no MBCSET if dfa_mb_cur_max (dfa) == 1.  */
-     if (mbcset)
-       {
- 	/* Check the space of the arrays.  */
-@@ -2786,7 +2795,13 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
- 		   reg_syntax_t syntax, reg_errcode_t *err)
- {
- #ifdef _LIBC
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   const unsigned char *collseqmb;
-+# define COLLSEQMB_LOOKUP(ix) (collseqmb[(ix)])
-+#else
-+# define COLLSEQMB_LOOKUP(ix) (ix)
-+#endif
-+
-   const char *collseqwc;
-   uint32_t nrules;
-   int32_t table_size;
-@@ -2834,18 +2849,20 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
- 	  if (MB_CUR_MAX == 1)
- 	  */
- 	  if (nrules == 0)
--	    return collseqmb[br_elem->opr.ch];
-+	    return COLLSEQMB_LOOKUP (br_elem->opr.ch);
- 	  else
- 	    {
- 	      wint_t wc = __btowc (br_elem->opr.ch);
- 	      return __collseq_table_lookup (collseqwc, wc);
- 	    }
- 	}
-+#if __OPTION_EGLIBC_LOCALE_CODE
-       else if (br_elem->type == MB_CHAR)
- 	{
- 	  if (nrules != 0)
- 	    return __collseq_table_lookup (collseqwc, br_elem->opr.wch);
- 	}
-+#endif
-       else if (br_elem->type == COLL_SYM)
- 	{
- 	  size_t sym_name_len = strlen ((char *) br_elem->opr.name);
-@@ -2876,11 +2893,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
- 		{
- 		  /* No valid character.  Match it as a single byte
- 		     character.  */
--		  return collseqmb[br_elem->opr.name[0]];
-+		  return COLLSEQMB_LOOKUP (br_elem->opr.name[0]);
- 		}
- 	    }
- 	  else if (sym_name_len == 1)
--	    return collseqmb[br_elem->opr.name[0]];
-+	    return COLLSEQMB_LOOKUP (br_elem->opr.name[0]);
- 	}
-       return UINT_MAX;
-     }
-@@ -2920,7 +2937,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
- 	 However, if we have no collation elements, and the character set
- 	 is single byte, the single byte character set that we
- 	 build below suffices. */
--      if (nrules > 0 || dfa->mb_cur_max > 1)
-+      if (nrules > 0 || dfa_mb_cur_max (dfa) > 1)
- 	{
- 	  /* Check the space of the arrays.  */
- 	  if (BE (*range_alloc == mbcset->nranges, 0))
-@@ -2957,7 +2974,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
- 	  if (MB_CUR_MAX == 1)
- 	  */
- 	  if (nrules == 0)
--	    ch_collseq = collseqmb[ch];
-+	    ch_collseq = COLLSEQMB_LOOKUP (ch);
- 	  else
- 	    ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
- 	  if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
-@@ -3035,7 +3052,10 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
-   re_bitset_ptr_t sbcset;
- #ifdef RE_ENABLE_I18N
-   re_charset_t *mbcset;
--  int coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0;
-+  int coll_sym_alloc = 0, range_alloc = 0;
-+#if __OPTION_EGLIBC_LOCALE_CODE
-+  int mbchar_alloc = 0;
-+#endif
-   int equiv_class_alloc = 0, char_class_alloc = 0;
- #endif /* not RE_ENABLE_I18N */
-   int non_match = 0;
-@@ -3043,9 +3063,15 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
-   int token_len;
-   int first_round = 1;
- #ifdef _LIBC
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   collseqmb = (const unsigned char *)
-     _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB);
-   nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
-+#else
-+  /* This is true when OPTION_EGLIBC_LOCALE_CODE is disabled, but the
-+     compiler can't figure that out.  */
-+  nrules = 0;
-+#endif
-   if (nrules)
-     {
-       /*
-@@ -3175,7 +3201,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
- #else
- # ifdef RE_ENABLE_I18N
- 	  *err = build_range_exp (sbcset,
--				  dfa->mb_cur_max > 1 ? mbcset : NULL,
-+				  dfa_mb_cur_max (dfa) > 1 ? mbcset : NULL,
- 				  &range_alloc, &start_elem, &end_elem);
- # else
- 	  *err = build_range_exp (sbcset, &start_elem, &end_elem);
-@@ -3191,7 +3217,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
- 	    case SB_CHAR:
- 	      bitset_set (sbcset, start_elem.opr.ch);
- 	      break;
--#ifdef RE_ENABLE_I18N
-+#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
- 	    case MB_CHAR:
- 	      /* Check whether the array has enough space.  */
- 	      if (BE (mbchar_alloc == mbcset->nmbchars, 0))
-@@ -3209,7 +3235,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
- 		}
- 	      mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch;
- 	      break;
--#endif /* RE_ENABLE_I18N */
-+#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
- 	    case EQUIV_CLASS:
- 	      *err = build_equiv_class (sbcset,
- #ifdef RE_ENABLE_I18N
-@@ -3259,11 +3285,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
- 
- #ifdef RE_ENABLE_I18N
-   /* Ensure only single byte characters are set.  */
--  if (dfa->mb_cur_max > 1)
-+  if (dfa_mb_cur_max (dfa) > 1)
-     bitset_mask (sbcset, dfa->sb_char);
- 
-   if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes
--      || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes
-+      || mbcset->nranges || (dfa_mb_cur_max (dfa) > 1 && (mbcset->nchar_classes
- 						     || mbcset->non_match)))
-     {
-       bin_tree_t *mbc_tree;
-@@ -3332,7 +3358,7 @@ parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
- 		       re_token_t *token, int token_len, re_dfa_t *dfa,
- 		       reg_syntax_t syntax, int accept_hyphen)
- {
--#ifdef RE_ENABLE_I18N
-+#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
-   int cur_char_size;
-   cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp));
-   if (cur_char_size > 1)
-@@ -3342,7 +3368,7 @@ parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
-       re_string_skip_bytes (regexp, cur_char_size);
-       return REG_NOERROR;
-     }
--#endif /* RE_ENABLE_I18N */
-+#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
-   re_string_skip_bytes (regexp, token_len); /* Skip a token.  */
-   if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS
-       || token->type == OP_OPEN_EQUIV_CLASS)
-@@ -3422,7 +3448,9 @@ build_equiv_class (bitset_t sbcset, re_charset_t *mbcset,
- build_equiv_class (bitset_t sbcset, const unsigned char *name)
- #endif /* not RE_ENABLE_I18N */
- {
--#ifdef _LIBC
-+  /* When __OPTION_EGLIBC_LOCALE_CODE is disabled, only the C locale
-+     is supported; it has no collation rules.  */
-+#if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
-   uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
-   if (nrules != 0)
-     {
-@@ -3492,7 +3520,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
-       mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1;
-     }
-   else
--#endif /* _LIBC */
-+#endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
-     {
-       if (BE (strlen ((const char *) name) != 1, 0))
- 	return REG_ECOLLATE;
-@@ -3526,7 +3554,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
-       && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0))
-     name = "alpha";
- 
--#ifdef RE_ENABLE_I18N
-+#if defined RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE
-   /* Check the space of the arrays.  */
-   if (BE (*char_class_alloc == mbcset->nchar_classes, 0))
-     {
-@@ -3542,7 +3570,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
-       *char_class_alloc = new_char_class_alloc;
-     }
-   mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name);
--#endif /* RE_ENABLE_I18N */
-+#endif /* RE_ENABLE_I18N && __OPTION_EGLIBC_LOCALE_CODE */
- 
- #define BUILD_CHARCLASS_LOOP(ctype_func)	\
-   do {						\
-@@ -3653,7 +3681,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
- 
- #ifdef RE_ENABLE_I18N
-   /* Ensure only single byte characters are set.  */
--  if (dfa->mb_cur_max > 1)
-+  if (dfa_mb_cur_max (dfa) > 1)
-     bitset_mask (sbcset, dfa->sb_char);
- #endif
- 
-@@ -3665,7 +3693,7 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
-     goto build_word_op_espace;
- 
- #ifdef RE_ENABLE_I18N
--  if (dfa->mb_cur_max > 1)
-+  if (dfa_mb_cur_max (dfa) > 1)
-     {
-       bin_tree_t *mbc_tree;
-       /* Build a tree for complex bracket.  */
-diff --git a/posix/regex.h b/posix/regex.h
-index 5b1981e..2941f94 100644
---- a/posix/regex.h
-+++ b/posix/regex.h
-@@ -21,6 +21,7 @@
- #define _REGEX_H 1
- 
- #include <sys/types.h>
-+#include <gnu/option-groups.h>
- 
- /* Allow the use in C++ code.  */
- #ifdef __cplusplus
-@@ -156,6 +157,8 @@ typedef unsigned long int reg_syntax_t;
-    treated as 'a\{1'.  */
- # define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
- 
-+/* EGLIBC: Old regex implementation does not support these.  */
-+# if __OPTION_POSIX_REGEXP_GLIBC
- /* If this bit is set, then ignore case when matching.
-    If not set, then case is significant.  */
- # define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
-@@ -172,6 +175,7 @@ typedef unsigned long int reg_syntax_t;
- /* If this bit is set, then no_sub will be set to 1 during
-    re_compile_pattern.  */
- # define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
-+# endif /* __OPTION_POSIX_REGEXP_GLIBC */
- #endif
- 
- /* This global variable defines the particular regexp syntax to use (for
-@@ -231,8 +235,13 @@ extern reg_syntax_t re_syntax_options;
-   (RE_CHAR_CLASSES | RE_DOT_NEWLINE      | RE_DOT_NOT_NULL		\
-    | RE_INTERVALS  | RE_NO_EMPTY_RANGES)
- 
-+#if __OPTION_POSIX_REGEXP_GLIBC
- #define RE_SYNTAX_POSIX_BASIC						\
-   (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
-+#else
-+#define RE_SYNTAX_POSIX_BASIC						\
-+  (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
-+#endif
- 
- /* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
-    RE_LIMITED_OPS, i.e., \? \+ \| are not recognized.  Actually, this
-@@ -298,9 +307,11 @@ extern reg_syntax_t re_syntax_options;
- /* Like REG_NOTBOL, except for the end-of-line.  */
- #define REG_NOTEOL (1 << 1)
- 
-+#if __OPTION_POSIX_REGEXP_GLIBC
- /* Use PMATCH[0] to delimit the start and end of the search in the
-    buffer.  */
- #define REG_STARTEND (1 << 2)
-+#endif
- 
- 
- /* If any error codes are removed, changed, or added, update the
-diff --git a/posix/regex_internal.c b/posix/regex_internal.c
-index 8597d7e..d53b2a8 100644
---- a/posix/regex_internal.c
-+++ b/posix/regex_internal.c
-@@ -43,8 +43,8 @@ re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len,
-   int init_buf_len;
- 
-   /* Ensure at least one character fits into the buffers.  */
--  if (init_len < dfa->mb_cur_max)
--    init_len = dfa->mb_cur_max;
-+  if (init_len < dfa_mb_cur_max (dfa))
-+    init_len = dfa_mb_cur_max (dfa);
-   init_buf_len = (len + 1 < init_len) ? len + 1: init_len;
-   re_string_construct_common (str, len, pstr, trans, icase, dfa);
- 
-@@ -55,7 +55,7 @@ re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len,
-   pstr->word_char = dfa->word_char;
-   pstr->word_ops_used = dfa->word_ops_used;
-   pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
--  pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len;
-+  pstr->valid_len = (pstr->mbs_allocated || dfa_mb_cur_max (dfa) > 1) ? 0 : len;
-   pstr->valid_raw_len = pstr->valid_len;
-   return REG_NOERROR;
- }
-@@ -82,7 +82,7 @@ re_string_construct (re_string_t *pstr, const char *str, int len,
-   if (icase)
-     {
- #ifdef RE_ENABLE_I18N
--      if (dfa->mb_cur_max > 1)
-+      if (dfa_mb_cur_max (dfa) > 1)
- 	{
- 	  while (1)
- 	    {
-@@ -91,7 +91,7 @@ re_string_construct (re_string_t *pstr, const char *str, int len,
- 		return ret;
- 	      if (pstr->valid_raw_len >= len)
- 		break;
--	      if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
-+	      if (pstr->bufs_len > pstr->valid_len + dfa_mb_cur_max (dfa))
- 		break;
- 	      ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
- 	      if (BE (ret != REG_NOERROR, 0))
-@@ -105,7 +105,7 @@ re_string_construct (re_string_t *pstr, const char *str, int len,
-   else
-     {
- #ifdef RE_ENABLE_I18N
--      if (dfa->mb_cur_max > 1)
-+      if (dfa_mb_cur_max (dfa) > 1)
- 	build_wcs_buffer (pstr);
-       else
- #endif /* RE_ENABLE_I18N  */
-@@ -130,7 +130,7 @@ internal_function __attribute_warn_unused_result__
- re_string_realloc_buffers (re_string_t *pstr, int new_buf_len)
- {
- #ifdef RE_ENABLE_I18N
--  if (pstr->mb_cur_max > 1)
-+  if (string_mb_cur_max (pstr) > 1)
-     {
-       wint_t *new_wcs;
- 
-@@ -177,7 +177,7 @@ re_string_construct_common (const char *str, int len, re_string_t *pstr,
-   pstr->trans = trans;
-   pstr->icase = icase ? 1 : 0;
-   pstr->mbs_allocated = (trans != NULL || icase);
--  pstr->mb_cur_max = dfa->mb_cur_max;
-+  pstr->mb_cur_max = dfa_mb_cur_max (dfa);
-   pstr->is_utf8 = dfa->is_utf8;
-   pstr->map_notascii = dfa->map_notascii;
-   pstr->stop = pstr->len;
-@@ -203,7 +203,7 @@ build_wcs_buffer (re_string_t *pstr)
- {
- #ifdef _LIBC
-   unsigned char buf[MB_LEN_MAX];
--  assert (MB_LEN_MAX >= pstr->mb_cur_max);
-+  assert (MB_LEN_MAX >= string_mb_cur_max (pstr));
- #else
-   unsigned char buf[64];
- #endif
-@@ -226,7 +226,7 @@ build_wcs_buffer (re_string_t *pstr)
- 	{
- 	  int i, ch;
- 
--	  for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
-+	  for (i = 0; i < string_mb_cur_max (pstr) && i < remain_len; ++i)
- 	    {
- 	      ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i];
- 	      buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch];
-@@ -275,7 +275,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
-   size_t mbclen;
- #ifdef _LIBC
-   char buf[MB_LEN_MAX];
--  assert (MB_LEN_MAX >= pstr->mb_cur_max);
-+  assert (MB_LEN_MAX >= string_mb_cur_max (pstr));
- #else
-   char buf[64];
- #endif
-@@ -369,7 +369,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
- 	  {
- 	    int i, ch;
- 
--	    for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
-+	    for (i = 0; i < string_mb_cur_max (pstr) && i < remain_len; ++i)
- 	      {
- 		ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i];
- 		buf[i] = pstr->trans[ch];
-@@ -567,8 +567,9 @@ re_string_translate_buffer (re_string_t *pstr)
- }
- 
- /* This function re-construct the buffers.
--   Concretely, convert to wide character in case of pstr->mb_cur_max > 1,
--   convert to upper case in case of REG_ICASE, apply translation.  */
-+   Concretely, convert to wide character in case of
-+   string_mb_cur_max (pstr) > 1, convert to upper case in case of
-+   REG_ICASE, apply translation.  */
- 
- static reg_errcode_t
- internal_function __attribute_warn_unused_result__
-@@ -579,7 +580,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
-     {
-       /* Reset buffer.  */
- #ifdef RE_ENABLE_I18N
--      if (pstr->mb_cur_max > 1)
-+      if (string_mb_cur_max (pstr) > 1)
- 	memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
- #endif /* RE_ENABLE_I18N */
-       pstr->len = pstr->raw_len;
-@@ -670,7 +671,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
- 	      pstr->tip_context = re_string_context_at (pstr, offset - 1,
- 							eflags);
- #ifdef RE_ENABLE_I18N
--	      if (pstr->mb_cur_max > 1)
-+	      if (string_mb_cur_max (pstr) > 1)
- 		memmove (pstr->wcs, pstr->wcs + offset,
- 			 (pstr->valid_len - offset) * sizeof (wint_t));
- #endif /* RE_ENABLE_I18N */
-@@ -699,7 +700,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
- #endif
- 	  pstr->valid_len = 0;
- #ifdef RE_ENABLE_I18N
--	  if (pstr->mb_cur_max > 1)
-+	  if (string_mb_cur_max (pstr) > 1)
- 	    {
- 	      int wcs_idx;
- 	      wint_t wc = WEOF;
-@@ -711,7 +712,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
- 		  /* Special case UTF-8.  Multi-byte chars start with any
- 		     byte other than 0x80 - 0xbf.  */
- 		  raw = pstr->raw_mbs + pstr->raw_mbs_idx;
--		  end = raw + (offset - pstr->mb_cur_max);
-+		  end = raw + (offset - string_mb_cur_max (pstr));
- 		  if (end < pstr->raw_mbs)
- 		    end = pstr->raw_mbs;
- 		  p = raw + offset - 1;
-@@ -803,7 +804,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
- 
-   /* Then build the buffers.  */
- #ifdef RE_ENABLE_I18N
--  if (pstr->mb_cur_max > 1)
-+  if (string_mb_cur_max (pstr) > 1)
-     {
-       if (pstr->icase)
- 	{
-@@ -841,7 +842,7 @@ re_string_peek_byte_case (const re_string_t *pstr, int idx)
-     return re_string_peek_byte (pstr, idx);
- 
- #ifdef RE_ENABLE_I18N
--  if (pstr->mb_cur_max > 1
-+  if (string_mb_cur_max (pstr) > 1
-       && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx))
-     return re_string_peek_byte (pstr, idx);
- #endif
-@@ -930,7 +931,7 @@ re_string_context_at (const re_string_t *input, int idx, int eflags)
-     return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF
- 	    : CONTEXT_NEWLINE | CONTEXT_ENDBUF);
- #ifdef RE_ENABLE_I18N
--  if (input->mb_cur_max > 1)
-+  if (string_mb_cur_max (input) > 1)
-     {
-       wint_t wc;
-       int wc_idx = idx;
-@@ -1444,7 +1445,7 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
-   dfa->nodes[dfa->nodes_len].constraint = 0;
- #ifdef RE_ENABLE_I18N
-   dfa->nodes[dfa->nodes_len].accept_mb =
--    (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
-+    (type == OP_PERIOD && dfa_mb_cur_max (dfa) > 1) || type == COMPLEX_BRACKET;
- #endif
-   dfa->nexts[dfa->nodes_len] = -1;
-   re_node_set_init_empty (dfa->edests + dfa->nodes_len);
-diff --git a/posix/regex_internal.h b/posix/regex_internal.h
-index 154e969..c43909a 100644
---- a/posix/regex_internal.h
-+++ b/posix/regex_internal.h
-@@ -26,6 +26,10 @@
- #include <stdlib.h>
- #include <string.h>
- 
-+#if defined _LIBC
-+# include <gnu/option-groups.h>
-+#endif
-+
- #if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
- # include <langinfo.h>
- #endif
-@@ -369,6 +373,13 @@ struct re_string_t
- };
- typedef struct re_string_t re_string_t;
- 
-+/* When OPTION_EGLIBC_LOCALE_CODE is disabled, this is always 1;
-+   help the compiler make use of that fact.  */
-+#if __OPTION_EGLIBC_LOCALE_CODE
-+# define string_mb_cur_max(str) ((str)->mb_cur_max + 0)
-+#else
-+# define string_mb_cur_max(str) (1)
-+#endif
- 
- struct re_dfa_t;
- typedef struct re_dfa_t re_dfa_t;
-@@ -654,6 +665,14 @@ struct re_dfa_t
-   __libc_lock_define (, lock)
- };
- 
-+/* When OPTION_EGLIBC_LOCALE_CODE is disabled, this is always 1;
-+   help the compiler make use of that fact.  */
-+#if __OPTION_EGLIBC_LOCALE_CODE
-+# define dfa_mb_cur_max(dfa) ((dfa)->mb_cur_max + 0)
-+#else
-+# define dfa_mb_cur_max(dfa) (1)
-+#endif
-+
- #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
- #define re_node_set_remove(set,id) \
-   (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1))
-@@ -714,7 +733,7 @@ internal_function __attribute__ ((pure, unused))
- re_string_char_size_at (const re_string_t *pstr, int idx)
- {
-   int byte_idx;
--  if (pstr->mb_cur_max == 1)
-+  if (string_mb_cur_max (pstr) == 1)
-     return 1;
-   for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx)
-     if (pstr->wcs[idx + byte_idx] != WEOF)
-@@ -726,7 +745,7 @@ static wint_t
- internal_function __attribute__ ((pure, unused))
- re_string_wchar_at (const re_string_t *pstr, int idx)
- {
--  if (pstr->mb_cur_max == 1)
-+  if (string_mb_cur_max (pstr) == 1)
-     return (wint_t) pstr->mbs[idx];
-   return (wint_t) pstr->wcs[idx];
- }
-diff --git a/posix/regexec-compat.c b/posix/regexec-compat.c
-new file mode 100644
-index 0000000..0f9b7c7
---- /dev/null
-+++ b/posix/regexec-compat.c
-@@ -0,0 +1,39 @@
-+/* Extended regular expression matching and search library.
-+   Copyright (C) 2008 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#ifdef _LIBC
-+# include <shlib-compat.h>
-+versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
-+
-+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
-+__typeof__ (__regexec) __compat_regexec;
-+
-+int
-+attribute_compat_text_section
-+__compat_regexec (const regex_t *__restrict preg,
-+		  const char *__restrict string, size_t nmatch,
-+		  regmatch_t pmatch[], int eflags)
-+{
-+  return regexec (preg, string, nmatch, pmatch,
-+		  eflags & (REG_NOTBOL | REG_NOTEOL));
-+}
-+compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
-+# endif
-+#endif
-diff --git a/posix/regexec.c b/posix/regexec.c
-index 70cd606..e3b49e4 100644
---- a/posix/regexec.c
-+++ b/posix/regexec.c
-@@ -18,6 +18,7 @@
-    <http://www.gnu.org/licenses/>.  */
- 
- #include <stdint.h>
-+#include <gnu/option-groups.h>
- 
- static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
- 				     int n) internal_function;
-@@ -186,11 +187,11 @@ static int build_trtable (const re_dfa_t *dfa,
- static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
- 				    const re_string_t *input, int idx)
-      internal_function;
--# ifdef _LIBC
-+# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
- static unsigned int find_collation_sequence_value (const unsigned char *mbs,
- 						   size_t name_len)
-      internal_function;
--# endif /* _LIBC */
-+# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
- #endif /* RE_ENABLE_I18N */
- static int group_nodes_into_DFAstates (const re_dfa_t *dfa,
- 				       const re_dfastate_t *state,
-@@ -255,25 +256,9 @@ regexec (preg, string, nmatch, pmatch, eflags)
-   return err != REG_NOERROR;
- }
- 
--#ifdef _LIBC
--# include <shlib-compat.h>
--versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
--
--# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
--__typeof__ (__regexec) __compat_regexec;
--
--int
--attribute_compat_text_section
--__compat_regexec (const regex_t *__restrict preg,
--		  const char *__restrict string, size_t nmatch,
--		  regmatch_t pmatch[], int eflags)
--{
--  return regexec (preg, string, nmatch, pmatch,
--		  eflags & (REG_NOTBOL | REG_NOTEOL));
--}
--compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
--# endif
--#endif
-+/* EGLIBC: The code that used to be here was move to a separate file
-+   so that it can be shared with xregex.c.  */
-+#include "regexec-compat.c"
- 
- /* Entry points for GNU code.  */
- 
-@@ -728,7 +713,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
-   incr = (range < 0) ? -1 : 1;
-   left_lim = (range < 0) ? start + range : start;
-   right_lim = (range < 0) ? start : start + range;
--  sb = dfa->mb_cur_max == 1;
-+  sb = dfa_mb_cur_max (dfa) == 1;
-   match_kind =
-     (fastmap
-      ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0)
-@@ -3448,7 +3433,7 @@ out_free:
- 	  if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0))
- 	    goto out_free;
- 
--	  if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1)
-+	  if (dest_states[i] != dest_states_word[i] && dfa_mb_cur_max (dfa) > 1)
- 	    need_word_trtable = 1;
- 
- 	  dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows,
-@@ -3590,7 +3575,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
-       else if (type == OP_PERIOD)
- 	{
- #ifdef RE_ENABLE_I18N
--	  if (dfa->mb_cur_max > 1)
-+	  if (dfa_mb_cur_max (dfa) > 1)
- 	    bitset_merge (accepts, dfa->sb_char);
- 	  else
- #endif
-@@ -3641,7 +3626,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
- 		  continue;
- 		}
- #ifdef RE_ENABLE_I18N
--	      if (dfa->mb_cur_max > 1)
-+	      if (dfa_mb_cur_max (dfa) > 1)
- 		for (j = 0; j < BITSET_WORDS; ++j)
- 		  any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]));
- 	      else
-@@ -3660,7 +3645,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
- 		  continue;
- 		}
- #ifdef RE_ENABLE_I18N
--	      if (dfa->mb_cur_max > 1)
-+	      if (dfa_mb_cur_max (dfa) > 1)
- 		for (j = 0; j < BITSET_WORDS; ++j)
- 		  any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j]));
- 	      else
-@@ -3836,12 +3821,6 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
-   if (node->type == COMPLEX_BRACKET)
-     {
-       const re_charset_t *cset = node->opr.mbcset;
--# ifdef _LIBC
--      const unsigned char *pin
--	= ((const unsigned char *) re_string_get_buffer (input) + str_idx);
--      int j;
--      uint32_t nrules;
--# endif /* _LIBC */
-       int match_len = 0;
-       wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars)
- 		    ? re_string_wchar_at (input, str_idx) : 0);
-@@ -3853,6 +3832,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
- 	    match_len = char_len;
- 	    goto check_node_accept_bytes_match;
- 	  }
-+#if __OPTION_EGLIBC_LOCALE_CODE
-       /* match with character_class?  */
-       for (i = 0; i < cset->nchar_classes; ++i)
- 	{
-@@ -3863,14 +3843,22 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
- 	      goto check_node_accept_bytes_match;
- 	    }
- 	}
-+#endif
-+
-+      /* When __OPTION_EGLIBC_LOCALE_CODE is disabled, only the C
-+         locale is supported; it has no collation rules.  */
-+# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
-+      const unsigned char *pin
-+	= ((const unsigned char *) re_string_get_buffer (input) + str_idx);
-+      int j;
-+      uint32_t nrules;
- 
--# ifdef _LIBC
-       nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
-       if (nrules != 0)
- 	{
- 	  unsigned int in_collseq = 0;
- 	  const int32_t *table, *indirect;
--	  const unsigned char *weights, *extra;
-+	  const unsigned char *weights, *extra = NULL;
- 	  const char *collseqwc;
- 
- 	  /* match with collating_symbol?  */
-@@ -3955,8 +3943,12 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
- 	    }
- 	}
-       else
--# endif /* _LIBC */
-+# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
- 	{
-+          /* In the _LIBC version, if OPTION_EGLIBC_LOCALE_CODE is
-+             disabled, there can be no multibyte range endpoints, and
-+             cset->nranges is always zero.  */
-+#if __OPTION_EGLIBC_LOCALE_CODE
- 	  /* match with range expression?  */
- #if __GNUC__ >= 2
- 	  wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'};
-@@ -3975,6 +3967,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
- 		  goto check_node_accept_bytes_match;
- 		}
- 	    }
-+#endif /* __OPTION_EGLIBC_LOCALE_CODE */
- 	}
-     check_node_accept_bytes_match:
-       if (!cset->non_match)
-@@ -3990,7 +3983,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
-   return 0;
- }
- 
--# ifdef _LIBC
-+# if defined _LIBC && __OPTION_EGLIBC_LOCALE_CODE
- static unsigned int
- internal_function
- find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
-@@ -4048,7 +4041,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
-       return UINT_MAX;
-     }
- }
--# endif /* _LIBC */
-+# endif /* _LIBC && __OPTION_EGLIBC_LOCALE_CODE */
- #endif /* RE_ENABLE_I18N */
- 
- /* Check whether the node accepts the byte which is IDX-th
-@@ -4139,7 +4132,7 @@ extend_buffers (re_match_context_t *mctx, int min_len)
-   if (pstr->icase)
-     {
- #ifdef RE_ENABLE_I18N
--      if (pstr->mb_cur_max > 1)
-+      if (string_mb_cur_max (pstr) > 1)
- 	{
- 	  ret = build_wcs_upper_buffer (pstr);
- 	  if (BE (ret != REG_NOERROR, 0))
-@@ -4152,7 +4145,7 @@ extend_buffers (re_match_context_t *mctx, int min_len)
-   else
-     {
- #ifdef RE_ENABLE_I18N
--      if (pstr->mb_cur_max > 1)
-+      if (string_mb_cur_max (pstr) > 1)
- 	build_wcs_buffer (pstr);
-       else
- #endif /* RE_ENABLE_I18N  */
-diff --git a/posix/xregex.c b/posix/xregex.c
-new file mode 100644
-index 0000000..d3f7ace
---- /dev/null
-+++ b/posix/xregex.c
-@@ -0,0 +1,8215 @@
-+/* Extended regular expression matching and search library,
-+   version 0.12.
-+   (Implements POSIX draft P1003.2/D11.2, except for some of the
-+   internationalization features.)
-+
-+   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-+   2002, 2005 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+   02110-1301 USA.  */
-+
-+/* AIX requires this to be the first thing in the file. */
-+#if defined _AIX && !defined __GNUC__ && !defined REGEX_MALLOC
-+  #pragma alloca
-+#endif
-+
-+#undef	_GNU_SOURCE
-+#define _GNU_SOURCE
-+
-+#ifndef INSIDE_RECURSION
-+# ifdef HAVE_CONFIG_H
-+#  include <config.h>
-+# endif
-+#endif
-+
-+/*#include <ansidecl.h>*/
-+
-+
-+#ifndef INSIDE_RECURSION
-+
-+# if defined STDC_HEADERS && !defined emacs
-+#  include <stddef.h>
-+# else
-+/* We need this for `regex.h', and perhaps for the Emacs include files.  */
-+#  include <sys/types.h>
-+# endif
-+
-+# if (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H && defined HAVE_BTOWC)
-+#  define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC)
-+# else
-+#  define WIDE_CHAR_SUPPORT 0
-+# endif
-+/* For platform which support the ISO C amendement 1 functionality we
-+   support user defined character classes.  */
-+# if WIDE_CHAR_SUPPORT
-+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */
-+#  include <wchar.h>
-+#  include <wctype.h>
-+# endif
-+
-+# ifdef _LIBC
-+/* We have to keep the namespace clean.  */
-+#  define regfree(preg) __regfree (preg)
-+#  define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
-+#  define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
-+#  define regerror(errcode, preg, errbuf, errbuf_size) \
-+	__regerror(errcode, preg, errbuf, errbuf_size)
-+#  define re_set_registers(bu, re, nu, st, en) \
-+	__re_set_registers (bu, re, nu, st, en)
-+#  define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
-+	__re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
-+#  define re_match(bufp, string, size, pos, regs) \
-+	__re_match (bufp, string, size, pos, regs)
-+#  define re_search(bufp, string, size, startpos, range, regs) \
-+	__re_search (bufp, string, size, startpos, range, regs)
-+#  define re_compile_pattern(pattern, length, bufp) \
-+	__re_compile_pattern (pattern, length, bufp)
-+#  define re_set_syntax(syntax) __re_set_syntax (syntax)
-+#  define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
-+	__re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
-+#  define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
-+
-+#  define btowc __btowc
-+
-+/* We are also using some library internals.  */
-+#  include <locale/localeinfo.h>
-+#  include <locale/elem-hash.h>
-+#  include <langinfo.h>
-+#  include <locale/coll-lookup.h>
-+# endif
-+
-+/* This is for other GNU distributions with internationalized messages.  */
-+# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
-+#  include <libintl.h>
-+#  ifdef _LIBC
-+#   undef gettext
-+#   define gettext(msgid) __dcgettext ("libc", msgid, LC_MESSAGES)
-+#  endif
-+# else
-+#  define gettext(msgid) (msgid)
-+# endif
-+
-+# ifndef gettext_noop
-+/* This define is so xgettext can find the internationalizable
-+   strings.  */
-+#  define gettext_noop(String) String
-+# endif
-+
-+/* The `emacs' switch turns on certain matching commands
-+   that make sense only in Emacs. */
-+# ifdef emacs
-+
-+#  include "lisp.h"
-+#  include "buffer.h"
-+#  include "syntax.h"
-+
-+# else  /* not emacs */
-+
-+/* If we are not linking with Emacs proper,
-+   we can't use the relocating allocator
-+   even if config.h says that we can.  */
-+#  undef REL_ALLOC
-+
-+#  if defined STDC_HEADERS || defined _LIBC
-+#   include <stdlib.h>
-+#  else
-+char *malloc ();
-+char *realloc ();
-+#  endif
-+
-+/* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.
-+   If nothing else has been done, use the method below.  */
-+#  ifdef INHIBIT_STRING_HEADER
-+#   if !(defined HAVE_BZERO && defined HAVE_BCOPY)
-+#    if !defined bzero && !defined bcopy
-+#     undef INHIBIT_STRING_HEADER
-+#    endif
-+#   endif
-+#  endif
-+
-+/* This is the normal way of making sure we have a bcopy and a bzero.
-+   This is used in most programs--a few other programs avoid this
-+   by defining INHIBIT_STRING_HEADER.  */
-+#  ifndef INHIBIT_STRING_HEADER
-+#   if defined HAVE_STRING_H || defined STDC_HEADERS || defined _LIBC
-+#    include <string.h>
-+#    ifndef bzero
-+#     ifndef _LIBC
-+#      define bzero(s, n)	(memset (s, '\0', n), (s))
-+#     else
-+#      define bzero(s, n)	__bzero (s, n)
-+#     endif
-+#    endif
-+#   else
-+#    include <strings.h>
-+#    ifndef memcmp
-+#     define memcmp(s1, s2, n)	bcmp (s1, s2, n)
-+#    endif
-+#    ifndef memcpy
-+#     define memcpy(d, s, n)	(bcopy (s, d, n), (d))
-+#    endif
-+#   endif
-+#  endif
-+
-+/* Define the syntax stuff for \<, \>, etc.  */
-+
-+/* This must be nonzero for the wordchar and notwordchar pattern
-+   commands in re_match_2.  */
-+#  ifndef Sword
-+#   define Sword 1
-+#  endif
-+
-+#  ifdef SWITCH_ENUM_BUG
-+#   define SWITCH_ENUM_CAST(x) ((int)(x))
-+#  else
-+#   define SWITCH_ENUM_CAST(x) (x)
-+#  endif
-+
-+# endif /* not emacs */
-+
-+# if defined _LIBC || HAVE_LIMITS_H
-+#  include <limits.h>
-+# endif
-+
-+# ifndef MB_LEN_MAX
-+#  define MB_LEN_MAX 1
-+# endif
-+
-+/* Get the interface, including the syntax bits.  */
-+# include "regex.h"
-+
-+/* isalpha etc. are used for the character classes.  */
-+# include <ctype.h>
-+
-+/* Jim Meyering writes:
-+
-+   "... Some ctype macros are valid only for character codes that
-+   isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
-+   using /bin/cc or gcc but without giving an ansi option).  So, all
-+   ctype uses should be through macros like ISPRINT...  If
-+   STDC_HEADERS is defined, then autoconf has verified that the ctype
-+   macros don't need to be guarded with references to isascii. ...
-+   Defining isascii to 1 should let any compiler worth its salt
-+   eliminate the && through constant folding."
-+   Solaris defines some of these symbols so we must undefine them first.  */
-+
-+# undef ISASCII
-+# if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
-+#  define ISASCII(c) 1
-+# else
-+#  define ISASCII(c) isascii(c)
-+# endif
-+
-+# ifdef isblank
-+#  define ISBLANK(c) (ISASCII (c) && isblank (c))
-+# else
-+#  define ISBLANK(c) ((c) == ' ' || (c) == '\t')
-+# endif
-+# ifdef isgraph
-+#  define ISGRAPH(c) (ISASCII (c) && isgraph (c))
-+# else
-+#  define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
-+# endif
-+
-+# undef ISPRINT
-+# define ISPRINT(c) (ISASCII (c) && isprint (c))
-+# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
-+# define ISALNUM(c) (ISASCII (c) && isalnum (c))
-+# define ISALPHA(c) (ISASCII (c) && isalpha (c))
-+# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
-+# define ISLOWER(c) (ISASCII (c) && islower (c))
-+# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
-+# define ISSPACE(c) (ISASCII (c) && isspace (c))
-+# define ISUPPER(c) (ISASCII (c) && isupper (c))
-+# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
-+
-+# ifdef _tolower
-+#  define TOLOWER(c) _tolower(c)
-+# else
-+#  define TOLOWER(c) tolower(c)
-+# endif
-+
-+# ifndef NULL
-+#  define NULL (void *)0
-+# endif
-+
-+/* We remove any previous definition of `SIGN_EXTEND_CHAR',
-+   since ours (we hope) works properly with all combinations of
-+   machines, compilers, `char' and `unsigned char' argument types.
-+   (Per Bothner suggested the basic approach.)  */
-+# undef SIGN_EXTEND_CHAR
-+# if __STDC__
-+#  define SIGN_EXTEND_CHAR(c) ((signed char) (c))
-+# else  /* not __STDC__ */
-+/* As in Harbison and Steele.  */
-+#  define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
-+# endif
-+
-+# ifndef emacs
-+/* How many characters in the character set.  */
-+#  define CHAR_SET_SIZE 256
-+
-+#  ifdef SYNTAX_TABLE
-+
-+extern char *re_syntax_table;
-+
-+#  else /* not SYNTAX_TABLE */
-+
-+static char re_syntax_table[CHAR_SET_SIZE];
-+
-+static void init_syntax_once (void);
-+
-+static void
-+init_syntax_once (void)
-+{
-+   register int c;
-+   static int done = 0;
-+
-+   if (done)
-+     return;
-+   bzero (re_syntax_table, sizeof re_syntax_table);
-+
-+   for (c = 0; c < CHAR_SET_SIZE; ++c)
-+     if (ISALNUM (c))
-+	re_syntax_table[c] = Sword;
-+
-+   re_syntax_table['_'] = Sword;
-+
-+   done = 1;
-+}
-+
-+#  endif /* not SYNTAX_TABLE */
-+
-+#  define SYNTAX(c) re_syntax_table[(unsigned char) (c)]
-+
-+# endif /* emacs */
-+
-+/* Integer type for pointers.  */
-+# if !defined _LIBC && !defined HAVE_UINTPTR_T
-+typedef unsigned long int uintptr_t;
-+# endif
-+
-+/* Should we use malloc or alloca?  If REGEX_MALLOC is not defined, we
-+   use `alloca' instead of `malloc'.  This is because using malloc in
-+   re_search* or re_match* could cause memory leaks when C-g is used in
-+   Emacs; also, malloc is slower and causes storage fragmentation.  On
-+   the other hand, malloc is more portable, and easier to debug.
-+
-+   Because we sometimes use alloca, some routines have to be macros,
-+   not functions -- `alloca'-allocated space disappears at the end of the
-+   function it is called in.  */
-+
-+# ifdef REGEX_MALLOC
-+
-+#  define REGEX_ALLOCATE malloc
-+#  define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize)
-+#  define REGEX_FREE free
-+
-+# else /* not REGEX_MALLOC  */
-+
-+/* Emacs already defines alloca, sometimes.  */
-+#  ifndef alloca
-+
-+/* Make alloca work the best possible way.  */
-+#   ifdef __GNUC__
-+#    define alloca __builtin_alloca
-+#   else /* not __GNUC__ */
-+#    if HAVE_ALLOCA_H
-+#     include <alloca.h>
-+#    endif /* HAVE_ALLOCA_H */
-+#   endif /* not __GNUC__ */
-+
-+#  endif /* not alloca */
-+
-+#  define REGEX_ALLOCATE alloca
-+
-+/* Assumes a `char *destination' variable.  */
-+#  define REGEX_REALLOCATE(source, osize, nsize)			\
-+  (destination = (char *) alloca (nsize),				\
-+   memcpy (destination, source, osize))
-+
-+/* No need to do anything to free, after alloca.  */
-+#  define REGEX_FREE(arg) ((void)0) /* Do nothing!  But inhibit gcc warning.  */
-+
-+# endif /* not REGEX_MALLOC */
-+
-+/* Define how to allocate the failure stack.  */
-+
-+# if defined REL_ALLOC && defined REGEX_MALLOC
-+
-+#  define REGEX_ALLOCATE_STACK(size)				\
-+  r_alloc (&failure_stack_ptr, (size))
-+#  define REGEX_REALLOCATE_STACK(source, osize, nsize)		\
-+  r_re_alloc (&failure_stack_ptr, (nsize))
-+#  define REGEX_FREE_STACK(ptr)					\
-+  r_alloc_free (&failure_stack_ptr)
-+
-+# else /* not using relocating allocator */
-+
-+#  ifdef REGEX_MALLOC
-+
-+#   define REGEX_ALLOCATE_STACK malloc
-+#   define REGEX_REALLOCATE_STACK(source, osize, nsize) realloc (source, nsize)
-+#   define REGEX_FREE_STACK free
-+
-+#  else /* not REGEX_MALLOC */
-+
-+#   define REGEX_ALLOCATE_STACK alloca
-+
-+#   define REGEX_REALLOCATE_STACK(source, osize, nsize)			\
-+   REGEX_REALLOCATE (source, osize, nsize)
-+/* No need to explicitly free anything.  */
-+#   define REGEX_FREE_STACK(arg)
-+
-+#  endif /* not REGEX_MALLOC */
-+# endif /* not using relocating allocator */
-+
-+
-+/* True if `size1' is non-NULL and PTR is pointing anywhere inside
-+   `string1' or just past its end.  This works if PTR is NULL, which is
-+   a good thing.  */
-+# define FIRST_STRING_P(ptr) 					\
-+  (size1 && string1 <= (ptr) && (ptr) <= string1 + size1)
-+
-+/* (Re)Allocate N items of type T using malloc, or fail.  */
-+# define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t)))
-+# define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t)))
-+# define RETALLOC_IF(addr, n, t) \
-+  if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t)
-+# define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t)))
-+
-+# define BYTEWIDTH 8 /* In bits.  */
-+
-+# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
-+
-+# undef MAX
-+# undef MIN
-+# define MAX(a, b) ((a) > (b) ? (a) : (b))
-+# define MIN(a, b) ((a) < (b) ? (a) : (b))
-+
-+typedef char boolean;
-+# define false 0
-+# define true 1
-+
-+static reg_errcode_t byte_regex_compile (const char *pattern, size_t size,
-+                                         reg_syntax_t syntax,
-+                                         struct re_pattern_buffer *bufp);
-+
-+static int byte_re_match_2_internal (struct re_pattern_buffer *bufp,
-+                                     const char *string1, int size1,
-+                                     const char *string2, int size2,
-+                                     int pos,
-+                                     struct re_registers *regs,
-+                                     int stop);
-+static int byte_re_search_2 (struct re_pattern_buffer *bufp,
-+                             const char *string1, int size1,
-+                             const char *string2, int size2,
-+                             int startpos, int range,
-+                             struct re_registers *regs, int stop);
-+static int byte_re_compile_fastmap (struct re_pattern_buffer *bufp);
-+
-+#ifdef MBS_SUPPORT
-+static reg_errcode_t wcs_regex_compile (const char *pattern, size_t size,
-+                                        reg_syntax_t syntax,
-+                                        struct re_pattern_buffer *bufp);
-+
-+
-+static int wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
-+                                    const char *cstring1, int csize1,
-+                                    const char *cstring2, int csize2,
-+                                    int pos,
-+                                    struct re_registers *regs,
-+                                    int stop,
-+                                    wchar_t *string1, int size1,
-+                                    wchar_t *string2, int size2,
-+                                    int *mbs_offset1, int *mbs_offset2);
-+static int wcs_re_search_2 (struct re_pattern_buffer *bufp,
-+                            const char *string1, int size1,
-+                            const char *string2, int size2,
-+                            int startpos, int range,
-+                            struct re_registers *regs, int stop);
-+static int wcs_re_compile_fastmap (struct re_pattern_buffer *bufp);
-+#endif
-+
-+/* These are the command codes that appear in compiled regular
-+   expressions.  Some opcodes are followed by argument bytes.  A
-+   command code can specify any interpretation whatsoever for its
-+   arguments.  Zero bytes may appear in the compiled regular expression.  */
-+
-+typedef enum
-+{
-+  no_op = 0,
-+
-+  /* Succeed right away--no more backtracking.  */
-+  succeed,
-+
-+        /* Followed by one byte giving n, then by n literal bytes.  */
-+  exactn,
-+
-+# ifdef MBS_SUPPORT
-+	/* Same as exactn, but contains binary data.  */
-+  exactn_bin,
-+# endif
-+
-+        /* Matches any (more or less) character.  */
-+  anychar,
-+
-+        /* Matches any one char belonging to specified set.  First
-+           following byte is number of bitmap bytes.  Then come bytes
-+           for a bitmap saying which chars are in.  Bits in each byte
-+           are ordered low-bit-first.  A character is in the set if its
-+           bit is 1.  A character too large to have a bit in the map is
-+           automatically not in the set.  */
-+        /* ifdef MBS_SUPPORT, following element is length of character
-+	   classes, length of collating symbols, length of equivalence
-+	   classes, length of character ranges, and length of characters.
-+	   Next, character class element, collating symbols elements,
-+	   equivalence class elements, range elements, and character
-+	   elements follow.
-+	   See regex_compile function.  */
-+  charset,
-+
-+        /* Same parameters as charset, but match any character that is
-+           not one of those specified.  */
-+  charset_not,
-+
-+        /* Start remembering the text that is matched, for storing in a
-+           register.  Followed by one byte with the register number, in
-+           the range 0 to one less than the pattern buffer's re_nsub
-+           field.  Then followed by one byte with the number of groups
-+           inner to this one.  (This last has to be part of the
-+           start_memory only because we need it in the on_failure_jump
-+           of re_match_2.)  */
-+  start_memory,
-+
-+        /* Stop remembering the text that is matched and store it in a
-+           memory register.  Followed by one byte with the register
-+           number, in the range 0 to one less than `re_nsub' in the
-+           pattern buffer, and one byte with the number of inner groups,
-+           just like `start_memory'.  (We need the number of inner
-+           groups here because we don't have any easy way of finding the
-+           corresponding start_memory when we're at a stop_memory.)  */
-+  stop_memory,
-+
-+        /* Match a duplicate of something remembered. Followed by one
-+           byte containing the register number.  */
-+  duplicate,
-+
-+        /* Fail unless at beginning of line.  */
-+  begline,
-+
-+        /* Fail unless at end of line.  */
-+  endline,
-+
-+        /* Succeeds if at beginning of buffer (if emacs) or at beginning
-+           of string to be matched (if not).  */
-+  begbuf,
-+
-+        /* Analogously, for end of buffer/string.  */
-+  endbuf,
-+
-+        /* Followed by two byte relative address to which to jump.  */
-+  jump,
-+
-+	/* Same as jump, but marks the end of an alternative.  */
-+  jump_past_alt,
-+
-+        /* Followed by two-byte relative address of place to resume at
-+           in case of failure.  */
-+        /* ifdef MBS_SUPPORT, the size of address is 1.  */
-+  on_failure_jump,
-+
-+        /* Like on_failure_jump, but pushes a placeholder instead of the
-+           current string position when executed.  */
-+  on_failure_keep_string_jump,
-+
-+        /* Throw away latest failure point and then jump to following
-+           two-byte relative address.  */
-+        /* ifdef MBS_SUPPORT, the size of address is 1.  */
-+  pop_failure_jump,
-+
-+        /* Change to pop_failure_jump if know won't have to backtrack to
-+           match; otherwise change to jump.  This is used to jump
-+           back to the beginning of a repeat.  If what follows this jump
-+           clearly won't match what the repeat does, such that we can be
-+           sure that there is no use backtracking out of repetitions
-+           already matched, then we change it to a pop_failure_jump.
-+           Followed by two-byte address.  */
-+        /* ifdef MBS_SUPPORT, the size of address is 1.  */
-+  maybe_pop_jump,
-+
-+        /* Jump to following two-byte address, and push a dummy failure
-+           point. This failure point will be thrown away if an attempt
-+           is made to use it for a failure.  A `+' construct makes this
-+           before the first repeat.  Also used as an intermediary kind
-+           of jump when compiling an alternative.  */
-+        /* ifdef MBS_SUPPORT, the size of address is 1.  */
-+  dummy_failure_jump,
-+
-+	/* Push a dummy failure point and continue.  Used at the end of
-+	   alternatives.  */
-+  push_dummy_failure,
-+
-+        /* Followed by two-byte relative address and two-byte number n.
-+           After matching N times, jump to the address upon failure.  */
-+        /* ifdef MBS_SUPPORT, the size of address is 1.  */
-+  succeed_n,
-+
-+        /* Followed by two-byte relative address, and two-byte number n.
-+           Jump to the address N times, then fail.  */
-+        /* ifdef MBS_SUPPORT, the size of address is 1.  */
-+  jump_n,
-+
-+        /* Set the following two-byte relative address to the
-+           subsequent two-byte number.  The address *includes* the two
-+           bytes of number.  */
-+        /* ifdef MBS_SUPPORT, the size of address is 1.  */
-+  set_number_at,
-+
-+  wordchar,	/* Matches any word-constituent character.  */
-+  notwordchar,	/* Matches any char that is not a word-constituent.  */
-+
-+  wordbeg,	/* Succeeds if at word beginning.  */
-+  wordend,	/* Succeeds if at word end.  */
-+
-+  wordbound,	/* Succeeds if at a word boundary.  */
-+  notwordbound	/* Succeeds if not at a word boundary.  */
-+
-+# ifdef emacs
-+  ,before_dot,	/* Succeeds if before point.  */
-+  at_dot,	/* Succeeds if at point.  */
-+  after_dot,	/* Succeeds if after point.  */
-+
-+	/* Matches any character whose syntax is specified.  Followed by
-+           a byte which contains a syntax code, e.g., Sword.  */
-+  syntaxspec,
-+
-+	/* Matches any character whose syntax is not that specified.  */
-+  notsyntaxspec
-+# endif /* emacs */
-+} re_opcode_t;
-+#endif /* not INSIDE_RECURSION */
-+
-+
-+#ifdef BYTE
-+# define CHAR_T char
-+# define UCHAR_T unsigned char
-+# define COMPILED_BUFFER_VAR bufp->buffer
-+# define OFFSET_ADDRESS_SIZE 2
-+# define PREFIX(name) byte_##name
-+# define ARG_PREFIX(name) name
-+# define PUT_CHAR(c) putchar (c)
-+# include <locale/weight.h>
-+# define FINDIDX findidx
-+#else
-+# ifdef WCHAR
-+#  define CHAR_T wchar_t
-+#  define UCHAR_T wchar_t
-+#  define COMPILED_BUFFER_VAR wc_buffer
-+#  define OFFSET_ADDRESS_SIZE 1 /* the size which STORE_NUMBER macro use */
-+#  define CHAR_CLASS_SIZE ((__alignof__(wctype_t)+sizeof(wctype_t))/sizeof(CHAR_T)+1)
-+#  define PREFIX(name) wcs_##name
-+#  define ARG_PREFIX(name) c##name
-+/* Should we use wide stream??  */
-+#  define PUT_CHAR(c) printf ("%C", c);
-+#  define TRUE 1
-+#  define FALSE 0
-+#  define findidx findidxwc
-+#  include <locale/weightwc.h>
-+#  undef findidx
-+#  define FINDIDX findidxwc
-+# else
-+#  ifdef MBS_SUPPORT
-+#   define WCHAR
-+#   define INSIDE_RECURSION
-+#   include "xregex.c"
-+#   undef INSIDE_RECURSION
-+#  endif
-+#  define BYTE
-+#  define INSIDE_RECURSION
-+#  include "xregex.c"
-+#  undef INSIDE_RECURSION
-+# endif
-+#endif
-+
-+#ifdef INSIDE_RECURSION
-+/* Common operations on the compiled pattern.  */
-+
-+/* Store NUMBER in two contiguous bytes starting at DESTINATION.  */
-+/* ifdef MBS_SUPPORT, we store NUMBER in 1 element.  */
-+
-+# ifdef WCHAR
-+#  define STORE_NUMBER(destination, number)				\
-+  do {									\
-+    *(destination) = (UCHAR_T)(number);				\
-+  } while (0)
-+# else /* BYTE */
-+#  define STORE_NUMBER(destination, number)				\
-+  do {									\
-+    (destination)[0] = (number) & 0377;					\
-+    (destination)[1] = (number) >> 8;					\
-+  } while (0)
-+# endif /* WCHAR */
-+
-+/* Same as STORE_NUMBER, except increment DESTINATION to
-+   the byte after where the number is stored.  Therefore, DESTINATION
-+   must be an lvalue.  */
-+/* ifdef MBS_SUPPORT, we store NUMBER in 1 element.  */
-+
-+# define STORE_NUMBER_AND_INCR(destination, number)			\
-+  do {									\
-+    STORE_NUMBER (destination, number);					\
-+    (destination) += OFFSET_ADDRESS_SIZE;				\
-+  } while (0)
-+
-+/* Put into DESTINATION a number stored in two contiguous bytes starting
-+   at SOURCE.  */
-+/* ifdef MBS_SUPPORT, we store NUMBER in 1 element.  */
-+
-+# ifdef WCHAR
-+#  define EXTRACT_NUMBER(destination, source)				\
-+  do {									\
-+    (destination) = *(source);						\
-+  } while (0)
-+# else /* BYTE */
-+#  define EXTRACT_NUMBER(destination, source)				\
-+  do {									\
-+    (destination) = *(source) & 0377;					\
-+    (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8;		\
-+  } while (0)
-+# endif
-+
-+# ifdef DEBUG
-+static void PREFIX(extract_number) (int *dest, UCHAR_T *source);
-+static void
-+PREFIX(extract_number) (int *dest, UCHAR_T *source)
-+{
-+#  ifdef WCHAR
-+  *dest = *source;
-+#  else /* BYTE */
-+  int temp = SIGN_EXTEND_CHAR (*(source + 1));
-+  *dest = *source & 0377;
-+  *dest += temp << 8;
-+#  endif
-+}
-+
-+#  ifndef EXTRACT_MACROS /* To debug the macros.  */
-+#   undef EXTRACT_NUMBER
-+#   define EXTRACT_NUMBER(dest, src) PREFIX(extract_number) (&dest, src)
-+#  endif /* not EXTRACT_MACROS */
-+
-+# endif /* DEBUG */
-+
-+/* Same as EXTRACT_NUMBER, except increment SOURCE to after the number.
-+   SOURCE must be an lvalue.  */
-+
-+# define EXTRACT_NUMBER_AND_INCR(destination, source)			\
-+  do {									\
-+    EXTRACT_NUMBER (destination, source);				\
-+    (source) += OFFSET_ADDRESS_SIZE; 					\
-+  } while (0)
-+
-+# ifdef DEBUG
-+static void PREFIX(extract_number_and_incr) (int *destination,
-+                                             UCHAR_T **source);
-+static void
-+PREFIX(extract_number_and_incr) (int *destination, UCHAR_T **source)
-+{
-+  PREFIX(extract_number) (destination, *source);
-+  *source += OFFSET_ADDRESS_SIZE;
-+}
-+
-+#  ifndef EXTRACT_MACROS
-+#   undef EXTRACT_NUMBER_AND_INCR
-+#   define EXTRACT_NUMBER_AND_INCR(dest, src) \
-+  PREFIX(extract_number_and_incr) (&dest, &src)
-+#  endif /* not EXTRACT_MACROS */
-+
-+# endif /* DEBUG */
-+
-+
-+
-+/* If DEBUG is defined, Regex prints many voluminous messages about what
-+   it is doing (if the variable `debug' is nonzero).  If linked with the
-+   main program in `iregex.c', you can enter patterns and strings
-+   interactively.  And if linked with the main program in `main.c' and
-+   the other test files, you can run the already-written tests.  */
-+
-+# ifdef DEBUG
-+
-+#  ifndef DEFINED_ONCE
-+
-+/* We use standard I/O for debugging.  */
-+#   include <stdio.h>
-+
-+/* It is useful to test things that ``must'' be true when debugging.  */
-+#   include <assert.h>
-+
-+static int debug;
-+
-+#   define DEBUG_STATEMENT(e) e
-+#   define DEBUG_PRINT1(x) if (debug) printf (x)
-+#   define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2)
-+#   define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3)
-+#   define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4)
-+#  endif /* not DEFINED_ONCE */
-+
-+#  define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) 			\
-+  if (debug) PREFIX(print_partial_compiled_pattern) (s, e)
-+#  define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)		\
-+  if (debug) PREFIX(print_double_string) (w, s1, sz1, s2, sz2)
-+
-+
-+/* Print the fastmap in human-readable form.  */
-+
-+#  ifndef DEFINED_ONCE
-+void
-+print_fastmap (char *fastmap)
-+{
-+  unsigned was_a_range = 0;
-+  unsigned i = 0;
-+
-+  while (i < (1 << BYTEWIDTH))
-+    {
-+      if (fastmap[i++])
-+	{
-+	  was_a_range = 0;
-+          putchar (i - 1);
-+          while (i < (1 << BYTEWIDTH)  &&  fastmap[i])
-+            {
-+              was_a_range = 1;
-+              i++;
-+            }
-+	  if (was_a_range)
-+            {
-+              printf ("-");
-+              putchar (i - 1);
-+            }
-+        }
-+    }
-+  putchar ('\n');
-+}
-+#  endif /* not DEFINED_ONCE */
-+
-+
-+/* Print a compiled pattern string in human-readable form, starting at
-+   the START pointer into it and ending just before the pointer END.  */
-+
-+void
-+PREFIX(print_partial_compiled_pattern) (UCHAR_T *start, UCHAR_T *end)
-+{
-+  int mcnt, mcnt2;
-+  UCHAR_T *p1;
-+  UCHAR_T *p = start;
-+  UCHAR_T *pend = end;
-+
-+  if (start == NULL)
-+    {
-+      printf ("(null)\n");
-+      return;
-+    }
-+
-+  /* Loop over pattern commands.  */
-+  while (p < pend)
-+    {
-+#  ifdef _LIBC
-+      printf ("%td:\t", p - start);
-+#  else
-+      printf ("%ld:\t", (long int) (p - start));
-+#  endif
-+
-+      switch ((re_opcode_t) *p++)
-+	{
-+        case no_op:
-+          printf ("/no_op");
-+          break;
-+
-+	case exactn:
-+	  mcnt = *p++;
-+          printf ("/exactn/%d", mcnt);
-+          do
-+	    {
-+              putchar ('/');
-+	      PUT_CHAR (*p++);
-+            }
-+          while (--mcnt);
-+          break;
-+
-+#  ifdef MBS_SUPPORT
-+	case exactn_bin:
-+	  mcnt = *p++;
-+	  printf ("/exactn_bin/%d", mcnt);
-+          do
-+	    {
-+	      printf("/%lx", (long int) *p++);
-+            }
-+          while (--mcnt);
-+          break;
-+#  endif /* MBS_SUPPORT */
-+
-+	case start_memory:
-+          mcnt = *p++;
-+          printf ("/start_memory/%d/%ld", mcnt, (long int) *p++);
-+          break;
-+
-+	case stop_memory:
-+          mcnt = *p++;
-+	  printf ("/stop_memory/%d/%ld", mcnt, (long int) *p++);
-+          break;
-+
-+	case duplicate:
-+	  printf ("/duplicate/%ld", (long int) *p++);
-+	  break;
-+
-+	case anychar:
-+	  printf ("/anychar");
-+	  break;
-+
-+	case charset:
-+        case charset_not:
-+          {
-+#  ifdef WCHAR
-+	    int i, length;
-+	    wchar_t *workp = p;
-+	    printf ("/charset [%s",
-+	            (re_opcode_t) *(workp - 1) == charset_not ? "^" : "");
-+	    p += 5;
-+	    length = *workp++; /* the length of char_classes */
-+	    for (i=0 ; i<length ; i++)
-+	      printf("[:%lx:]", (long int) *p++);
-+	    length = *workp++; /* the length of collating_symbol */
-+	    for (i=0 ; i<length ;)
-+	      {
-+		printf("[.");
-+		while(*p != 0)
-+		  PUT_CHAR((i++,*p++));
-+		i++,p++;
-+		printf(".]");
-+	      }
-+	    length = *workp++; /* the length of equivalence_class */
-+	    for (i=0 ; i<length ;)
-+	      {
-+		printf("[=");
-+		while(*p != 0)
-+		  PUT_CHAR((i++,*p++));
-+		i++,p++;
-+		printf("=]");
-+	      }
-+	    length = *workp++; /* the length of char_range */
-+	    for (i=0 ; i<length ; i++)
-+	      {
-+		wchar_t range_start = *p++;
-+		wchar_t range_end = *p++;
-+		printf("%C-%C", range_start, range_end);
-+	      }
-+	    length = *workp++; /* the length of char */
-+	    for (i=0 ; i<length ; i++)
-+	      printf("%C", *p++);
-+	    putchar (']');
-+#  else
-+            register int c, last = -100;
-+	    register int in_range = 0;
-+
-+	    printf ("/charset [%s",
-+	            (re_opcode_t) *(p - 1) == charset_not ? "^" : "");
-+
-+            assert (p + *p < pend);
-+
-+            for (c = 0; c < 256; c++)
-+	      if (c / 8 < *p
-+		  && (p[1 + (c/8)] & (1 << (c % 8))))
-+		{
-+		  /* Are we starting a range?  */
-+		  if (last + 1 == c && ! in_range)
-+		    {
-+		      putchar ('-');
-+		      in_range = 1;
-+		    }
-+		  /* Have we broken a range?  */
-+		  else if (last + 1 != c && in_range)
-+              {
-+		      putchar (last);
-+		      in_range = 0;
-+		    }
-+
-+		  if (! in_range)
-+		    putchar (c);
-+
-+		  last = c;
-+              }
-+
-+	    if (in_range)
-+	      putchar (last);
-+
-+	    putchar (']');
-+
-+	    p += 1 + *p;
-+#  endif /* WCHAR */
-+	  }
-+	  break;
-+
-+	case begline:
-+	  printf ("/begline");
-+          break;
-+
-+	case endline:
-+          printf ("/endline");
-+          break;
-+
-+	case on_failure_jump:
-+          PREFIX(extract_number_and_incr) (&mcnt, &p);
-+#  ifdef _LIBC
-+  	  printf ("/on_failure_jump to %td", p + mcnt - start);
-+#  else
-+  	  printf ("/on_failure_jump to %ld", (long int) (p + mcnt - start));
-+#  endif
-+          break;
-+
-+	case on_failure_keep_string_jump:
-+          PREFIX(extract_number_and_incr) (&mcnt, &p);
-+#  ifdef _LIBC
-+  	  printf ("/on_failure_keep_string_jump to %td", p + mcnt - start);
-+#  else
-+  	  printf ("/on_failure_keep_string_jump to %ld",
-+		  (long int) (p + mcnt - start));
-+#  endif
-+          break;
-+
-+	case dummy_failure_jump:
-+          PREFIX(extract_number_and_incr) (&mcnt, &p);
-+#  ifdef _LIBC
-+  	  printf ("/dummy_failure_jump to %td", p + mcnt - start);
-+#  else
-+  	  printf ("/dummy_failure_jump to %ld", (long int) (p + mcnt - start));
-+#  endif
-+          break;
-+
-+	case push_dummy_failure:
-+          printf ("/push_dummy_failure");
-+          break;
-+
-+        case maybe_pop_jump:
-+          PREFIX(extract_number_and_incr) (&mcnt, &p);
-+#  ifdef _LIBC
-+  	  printf ("/maybe_pop_jump to %td", p + mcnt - start);
-+#  else
-+  	  printf ("/maybe_pop_jump to %ld", (long int) (p + mcnt - start));
-+#  endif
-+	  break;
-+
-+        case pop_failure_jump:
-+	  PREFIX(extract_number_and_incr) (&mcnt, &p);
-+#  ifdef _LIBC
-+  	  printf ("/pop_failure_jump to %td", p + mcnt - start);
-+#  else
-+  	  printf ("/pop_failure_jump to %ld", (long int) (p + mcnt - start));
-+#  endif
-+	  break;
-+
-+        case jump_past_alt:
-+	  PREFIX(extract_number_and_incr) (&mcnt, &p);
-+#  ifdef _LIBC
-+  	  printf ("/jump_past_alt to %td", p + mcnt - start);
-+#  else
-+  	  printf ("/jump_past_alt to %ld", (long int) (p + mcnt - start));
-+#  endif
-+	  break;
-+
-+        case jump:
-+	  PREFIX(extract_number_and_incr) (&mcnt, &p);
-+#  ifdef _LIBC
-+  	  printf ("/jump to %td", p + mcnt - start);
-+#  else
-+  	  printf ("/jump to %ld", (long int) (p + mcnt - start));
-+#  endif
-+	  break;
-+
-+        case succeed_n:
-+          PREFIX(extract_number_and_incr) (&mcnt, &p);
-+	  p1 = p + mcnt;
-+          PREFIX(extract_number_and_incr) (&mcnt2, &p);
-+#  ifdef _LIBC
-+	  printf ("/succeed_n to %td, %d times", p1 - start, mcnt2);
-+#  else
-+	  printf ("/succeed_n to %ld, %d times",
-+		  (long int) (p1 - start), mcnt2);
-+#  endif
-+          break;
-+
-+        case jump_n:
-+          PREFIX(extract_number_and_incr) (&mcnt, &p);
-+	  p1 = p + mcnt;
-+          PREFIX(extract_number_and_incr) (&mcnt2, &p);
-+	  printf ("/jump_n to %d, %d times", p1 - start, mcnt2);
-+          break;
-+
-+        case set_number_at:
-+          PREFIX(extract_number_and_incr) (&mcnt, &p);
-+	  p1 = p + mcnt;
-+          PREFIX(extract_number_and_incr) (&mcnt2, &p);
-+#  ifdef _LIBC
-+	  printf ("/set_number_at location %td to %d", p1 - start, mcnt2);
-+#  else
-+	  printf ("/set_number_at location %ld to %d",
-+		  (long int) (p1 - start), mcnt2);
-+#  endif
-+          break;
-+
-+        case wordbound:
-+	  printf ("/wordbound");
-+	  break;
-+
-+	case notwordbound:
-+	  printf ("/notwordbound");
-+          break;
-+
-+	case wordbeg:
-+	  printf ("/wordbeg");
-+	  break;
-+
-+	case wordend:
-+	  printf ("/wordend");
-+	  break;
-+
-+#  ifdef emacs
-+	case before_dot:
-+	  printf ("/before_dot");
-+          break;
-+
-+	case at_dot:
-+	  printf ("/at_dot");
-+          break;
-+
-+	case after_dot:
-+	  printf ("/after_dot");
-+          break;
-+
-+	case syntaxspec:
-+          printf ("/syntaxspec");
-+	  mcnt = *p++;
-+	  printf ("/%d", mcnt);
-+          break;
-+
-+	case notsyntaxspec:
-+          printf ("/notsyntaxspec");
-+	  mcnt = *p++;
-+	  printf ("/%d", mcnt);
-+	  break;
-+#  endif /* emacs */
-+
-+	case wordchar:
-+	  printf ("/wordchar");
-+          break;
-+
-+	case notwordchar:
-+	  printf ("/notwordchar");
-+          break;
-+
-+	case begbuf:
-+	  printf ("/begbuf");
-+          break;
-+
-+	case endbuf:
-+	  printf ("/endbuf");
-+          break;
-+
-+        default:
-+          printf ("?%ld", (long int) *(p-1));
-+	}
-+
-+      putchar ('\n');
-+    }
-+
-+#  ifdef _LIBC
-+  printf ("%td:\tend of pattern.\n", p - start);
-+#  else
-+  printf ("%ld:\tend of pattern.\n", (long int) (p - start));
-+#  endif
-+}
-+
-+
-+void
-+PREFIX(print_compiled_pattern) (struct re_pattern_buffer *bufp)
-+{
-+  UCHAR_T *buffer = (UCHAR_T*) bufp->buffer;
-+
-+  PREFIX(print_partial_compiled_pattern) (buffer, buffer
-+				  + bufp->used / sizeof(UCHAR_T));
-+  printf ("%ld bytes used/%ld bytes allocated.\n",
-+	  bufp->used, bufp->allocated);
-+
-+  if (bufp->fastmap_accurate && bufp->fastmap)
-+    {
-+      printf ("fastmap: ");
-+      print_fastmap (bufp->fastmap);
-+    }
-+
-+#  ifdef _LIBC
-+  printf ("re_nsub: %Zd\t", bufp->re_nsub);
-+#  else
-+  printf ("re_nsub: %ld\t", (long int) bufp->re_nsub);
-+#  endif
-+  printf ("regs_alloc: %d\t", bufp->regs_allocated);
-+  printf ("can_be_null: %d\t", bufp->can_be_null);
-+  printf ("newline_anchor: %d\n", bufp->newline_anchor);
-+  printf ("no_sub: %d\t", bufp->no_sub);
-+  printf ("not_bol: %d\t", bufp->not_bol);
-+  printf ("not_eol: %d\t", bufp->not_eol);
-+  printf ("syntax: %lx\n", bufp->syntax);
-+  /* Perhaps we should print the translate table?  */
-+}
-+
-+
-+void
-+PREFIX(print_double_string) (const CHAR_T *where, const CHAR_T *string1,
-+                             int size1, const CHAR_T *string2, int size2)
-+{
-+  int this_char;
-+
-+  if (where == NULL)
-+    printf ("(null)");
-+  else
-+    {
-+      int cnt;
-+
-+      if (FIRST_STRING_P (where))
-+        {
-+          for (this_char = where - string1; this_char < size1; this_char++)
-+	    PUT_CHAR (string1[this_char]);
-+
-+          where = string2;
-+        }
-+
-+      cnt = 0;
-+      for (this_char = where - string2; this_char < size2; this_char++)
-+	{
-+	  PUT_CHAR (string2[this_char]);
-+	  if (++cnt > 100)
-+	    {
-+	      fputs ("...", stdout);
-+	      break;
-+	    }
-+	}
-+    }
-+}
-+
-+#  ifndef DEFINED_ONCE
-+void
-+printchar (int c)
-+{
-+  putc (c, stderr);
-+}
-+#  endif
-+
-+# else /* not DEBUG */
-+
-+#  ifndef DEFINED_ONCE
-+#   undef assert
-+#   define assert(e)
-+
-+#   define DEBUG_STATEMENT(e)
-+#   define DEBUG_PRINT1(x)
-+#   define DEBUG_PRINT2(x1, x2)
-+#   define DEBUG_PRINT3(x1, x2, x3)
-+#   define DEBUG_PRINT4(x1, x2, x3, x4)
-+#  endif /* not DEFINED_ONCE */
-+#  define DEBUG_PRINT_COMPILED_PATTERN(p, s, e)
-+#  define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)
-+
-+# endif /* not DEBUG */
-+
-+
-+
-+# ifdef WCHAR
-+/* This  convert a multibyte string to a wide character string.
-+   And write their correspondances to offset_buffer(see below)
-+   and write whether each wchar_t is binary data to is_binary.
-+   This assume invalid multibyte sequences as binary data.
-+   We assume offset_buffer and is_binary is already allocated
-+   enough space.  */
-+
-+static size_t convert_mbs_to_wcs (CHAR_T *dest, const unsigned char* src,
-+				  size_t len, int *offset_buffer,
-+				  char *is_binary);
-+static size_t
-+convert_mbs_to_wcs (CHAR_T *dest, const unsigned char*src, size_t len,
-+                    int *offset_buffer, char *is_binary)
-+     /* It hold correspondances between src(char string) and
-+	dest(wchar_t string) for optimization.
-+	e.g. src  = "xxxyzz"
-+             dest = {'X', 'Y', 'Z'}
-+	      (each "xxx", "y" and "zz" represent one multibyte character
-+	       corresponding to 'X', 'Y' and 'Z'.)
-+	  offset_buffer = {0, 0+3("xxx"), 0+3+1("y"), 0+3+1+2("zz")}
-+	  	        = {0, 3, 4, 6}
-+     */
-+{
-+  wchar_t *pdest = dest;
-+  const unsigned char *psrc = src;
-+  size_t wc_count = 0;
-+
-+  mbstate_t mbs;
-+  int i, consumed;
-+  size_t mb_remain = len;
-+  size_t mb_count = 0;
-+
-+  /* Initialize the conversion state.  */
-+  memset (&mbs, 0, sizeof (mbstate_t));
-+
-+  offset_buffer[0] = 0;
-+  for( ; mb_remain > 0 ; ++wc_count, ++pdest, mb_remain -= consumed,
-+	 psrc += consumed)
-+    {
-+#ifdef _LIBC
-+      consumed = __mbrtowc (pdest, psrc, mb_remain, &mbs);
-+#else
-+      consumed = mbrtowc (pdest, psrc, mb_remain, &mbs);
-+#endif
-+
-+      if (consumed <= 0)
-+	/* failed to convert. maybe src contains binary data.
-+	   So we consume 1 byte manualy.  */
-+	{
-+	  *pdest = *psrc;
-+	  consumed = 1;
-+	  is_binary[wc_count] = TRUE;
-+	}
-+      else
-+	is_binary[wc_count] = FALSE;
-+      /* In sjis encoding, we use yen sign as escape character in
-+	 place of reverse solidus. So we convert 0x5c(yen sign in
-+	 sjis) to not 0xa5(yen sign in UCS2) but 0x5c(reverse
-+	 solidus in UCS2).  */
-+      if (consumed == 1 && (int) *psrc == 0x5c && (int) *pdest == 0xa5)
-+	*pdest = (wchar_t) *psrc;
-+
-+      offset_buffer[wc_count + 1] = mb_count += consumed;
-+    }
-+
-+  /* Fill remain of the buffer with sentinel.  */
-+  for (i = wc_count + 1 ; i <= len ; i++)
-+    offset_buffer[i] = mb_count + 1;
-+
-+  return wc_count;
-+}
-+
-+# endif /* WCHAR */
-+
-+#else /* not INSIDE_RECURSION */
-+
-+/* Set by `re_set_syntax' to the current regexp syntax to recognize.  Can
-+   also be assigned to arbitrarily: each pattern buffer stores its own
-+   syntax, so it can be changed between regex compilations.  */
-+/* This has no initializer because initialized variables in Emacs
-+   become read-only after dumping.  */
-+reg_syntax_t re_syntax_options;
-+
-+
-+/* Specify the precise syntax of regexps for compilation.  This provides
-+   for compatibility for various utilities which historically have
-+   different, incompatible syntaxes.
-+
-+   The argument SYNTAX is a bit mask comprised of the various bits
-+   defined in regex.h.  We return the old syntax.  */
-+
-+reg_syntax_t
-+re_set_syntax (reg_syntax_t syntax)
-+{
-+  reg_syntax_t ret = re_syntax_options;
-+
-+  re_syntax_options = syntax;
-+# ifdef DEBUG
-+  if (syntax & RE_DEBUG)
-+    debug = 1;
-+  else if (debug) /* was on but now is not */
-+    debug = 0;
-+# endif /* DEBUG */
-+  return ret;
-+}
-+# ifdef _LIBC
-+weak_alias (__re_set_syntax, re_set_syntax)
-+# endif
-+
-+/* This table gives an error message for each of the error codes listed
-+   in regex.h.  Obviously the order here has to be same as there.
-+   POSIX doesn't require that we do anything for REG_NOERROR,
-+   but why not be nice?  */
-+
-+static const char *re_error_msgid[] =
-+  {
-+    gettext_noop ("Success"),	/* REG_NOERROR */
-+    gettext_noop ("No match"),	/* REG_NOMATCH */
-+    gettext_noop ("Invalid regular expression"), /* REG_BADPAT */
-+    gettext_noop ("Invalid collation character"), /* REG_ECOLLATE */
-+    gettext_noop ("Invalid character class name"), /* REG_ECTYPE */
-+    gettext_noop ("Trailing backslash"), /* REG_EESCAPE */
-+    gettext_noop ("Invalid back reference"), /* REG_ESUBREG */
-+    gettext_noop ("Unmatched [ or [^"),	/* REG_EBRACK */
-+    gettext_noop ("Unmatched ( or \\("), /* REG_EPAREN */
-+    gettext_noop ("Unmatched \\{"), /* REG_EBRACE */
-+    gettext_noop ("Invalid content of \\{\\}"), /* REG_BADBR */
-+    gettext_noop ("Invalid range end"),	/* REG_ERANGE */
-+    gettext_noop ("Memory exhausted"), /* REG_ESPACE */
-+    gettext_noop ("Invalid preceding regular expression"), /* REG_BADRPT */
-+    gettext_noop ("Premature end of regular expression"), /* REG_EEND */
-+    gettext_noop ("Regular expression too big"), /* REG_ESIZE */
-+    gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
-+  };
-+
-+#endif /* INSIDE_RECURSION */
-+
-+#ifndef DEFINED_ONCE
-+/* Avoiding alloca during matching, to placate r_alloc.  */
-+
-+/* Define MATCH_MAY_ALLOCATE unless we need to make sure that the
-+   searching and matching functions should not call alloca.  On some
-+   systems, alloca is implemented in terms of malloc, and if we're
-+   using the relocating allocator routines, then malloc could cause a
-+   relocation, which might (if the strings being searched are in the
-+   ralloc heap) shift the data out from underneath the regexp
-+   routines.
-+
-+   Here's another reason to avoid allocation: Emacs
-+   processes input from X in a signal handler; processing X input may
-+   call malloc; if input arrives while a matching routine is calling
-+   malloc, then we're scrod.  But Emacs can't just block input while
-+   calling matching routines; then we don't notice interrupts when
-+   they come in.  So, Emacs blocks input around all regexp calls
-+   except the matching calls, which it leaves unprotected, in the
-+   faith that they will not malloc.  */
-+
-+/* Normally, this is fine.  */
-+# define MATCH_MAY_ALLOCATE
-+
-+/* When using GNU C, we are not REALLY using the C alloca, no matter
-+   what config.h may say.  So don't take precautions for it.  */
-+# ifdef __GNUC__
-+#  undef C_ALLOCA
-+# endif
-+
-+/* The match routines may not allocate if (1) they would do it with malloc
-+   and (2) it's not safe for them to use malloc.
-+   Note that if REL_ALLOC is defined, matching would not use malloc for the
-+   failure stack, but we would still use it for the register vectors;
-+   so REL_ALLOC should not affect this.  */
-+# if (defined C_ALLOCA || defined REGEX_MALLOC) && defined emacs
-+#  undef MATCH_MAY_ALLOCATE
-+# endif
-+#endif /* not DEFINED_ONCE */
-+
-+#ifdef INSIDE_RECURSION
-+/* Failure stack declarations and macros; both re_compile_fastmap and
-+   re_match_2 use a failure stack.  These have to be macros because of
-+   REGEX_ALLOCATE_STACK.  */
-+
-+
-+/* Number of failure points for which to initially allocate space
-+   when matching.  If this number is exceeded, we allocate more
-+   space, so it is not a hard limit.  */
-+# ifndef INIT_FAILURE_ALLOC
-+#  define INIT_FAILURE_ALLOC 5
-+# endif
-+
-+/* Roughly the maximum number of failure points on the stack.  Would be
-+   exactly that if always used MAX_FAILURE_ITEMS items each time we failed.
-+   This is a variable only so users of regex can assign to it; we never
-+   change it ourselves.  */
-+
-+
-+# ifndef DEFINED_ONCE
-+
-+#  ifdef INT_IS_16BIT
-+#   define RE_M_F_TYPE long int
-+#  else
-+#   define RE_M_F_TYPE int
-+#  endif /* INT_IS_16BIT */
-+
-+#  ifdef MATCH_MAY_ALLOCATE
-+/* 4400 was enough to cause a crash on Alpha OSF/1,
-+   whose default stack limit is 2mb.  */
-+#   define RE_M_F_DEFAULT 4000
-+#  else
-+#   define RE_M_F_DEFAULT 2000
-+#  endif /* MATCH_MAY_ALLOCATE */
-+
-+#  include <shlib-compat.h>
-+
-+#  if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
-+link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
-+RE_M_F_TYPE re_max_failures = RE_M_F_DEFAULT;
-+#  else
-+RE_M_F_TYPE re_max_failures attribute_hidden = RE_M_F_DEFAULT;
-+#  endif /* SHLIB_COMPAT */
-+
-+#  undef RE_M_F_TYPE
-+#  undef RE_M_F_DEFAULT
-+
-+# endif /* DEFINED_ONCE */
-+
-+# ifdef INT_IS_16BIT
-+
-+union PREFIX(fail_stack_elt)
-+{
-+  UCHAR_T *pointer;
-+  long int integer;
-+};
-+
-+typedef union PREFIX(fail_stack_elt) PREFIX(fail_stack_elt_t);
-+
-+typedef struct
-+{
-+  PREFIX(fail_stack_elt_t) *stack;
-+  unsigned long int size;
-+  unsigned long int avail;		/* Offset of next open position.  */
-+} PREFIX(fail_stack_type);
-+
-+# else /* not INT_IS_16BIT */
-+
-+union PREFIX(fail_stack_elt)
-+{
-+  UCHAR_T *pointer;
-+  int integer;
-+};
-+
-+typedef union PREFIX(fail_stack_elt) PREFIX(fail_stack_elt_t);
-+
-+typedef struct
-+{
-+  PREFIX(fail_stack_elt_t) *stack;
-+  unsigned size;
-+  unsigned avail;			/* Offset of next open position.  */
-+} PREFIX(fail_stack_type);
-+
-+# endif /* INT_IS_16BIT */
-+
-+# ifndef DEFINED_ONCE
-+#  define FAIL_STACK_EMPTY()     (fail_stack.avail == 0)
-+#  define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0)
-+#  define FAIL_STACK_FULL()      (fail_stack.avail == fail_stack.size)
-+# endif
-+
-+
-+/* Define macros to initialize and free the failure stack.
-+   Do `return -2' if the alloc fails.  */
-+
-+# ifdef MATCH_MAY_ALLOCATE
-+#  define INIT_FAIL_STACK()						\
-+  do {									\
-+    fail_stack.stack = (PREFIX(fail_stack_elt_t) *)		\
-+      REGEX_ALLOCATE_STACK (INIT_FAILURE_ALLOC * sizeof (PREFIX(fail_stack_elt_t))); \
-+									\
-+    if (fail_stack.stack == NULL)				\
-+      return -2;							\
-+									\
-+    fail_stack.size = INIT_FAILURE_ALLOC;			\
-+    fail_stack.avail = 0;					\
-+  } while (0)
-+
-+#  define RESET_FAIL_STACK()  REGEX_FREE_STACK (fail_stack.stack)
-+# else
-+#  define INIT_FAIL_STACK()						\
-+  do {									\
-+    fail_stack.avail = 0;					\
-+  } while (0)
-+
-+#  define RESET_FAIL_STACK()
-+# endif
-+
-+
-+/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items.
-+
-+   Return 1 if succeeds, and 0 if either ran out of memory
-+   allocating space for it or it was already too large.
-+
-+   REGEX_REALLOCATE_STACK requires `destination' be declared.   */
-+
-+# define DOUBLE_FAIL_STACK(fail_stack)					\
-+  ((fail_stack).size > (unsigned) (re_max_failures * MAX_FAILURE_ITEMS)	\
-+   ? 0									\
-+   : ((fail_stack).stack = (PREFIX(fail_stack_elt_t) *)			\
-+        REGEX_REALLOCATE_STACK ((fail_stack).stack, 			\
-+          (fail_stack).size * sizeof (PREFIX(fail_stack_elt_t)),	\
-+          ((fail_stack).size << 1) * sizeof (PREFIX(fail_stack_elt_t))),\
-+									\
-+      (fail_stack).stack == NULL					\
-+      ? 0								\
-+      : ((fail_stack).size <<= 1, 					\
-+         1)))
-+
-+
-+/* Push pointer POINTER on FAIL_STACK.
-+   Return 1 if was able to do so and 0 if ran out of memory allocating
-+   space to do so.  */
-+# define PUSH_PATTERN_OP(POINTER, FAIL_STACK)				\
-+  ((FAIL_STACK_FULL ()							\
-+    && !DOUBLE_FAIL_STACK (FAIL_STACK))					\
-+   ? 0									\
-+   : ((FAIL_STACK).stack[(FAIL_STACK).avail++].pointer = POINTER,	\
-+      1))
-+
-+/* Push a pointer value onto the failure stack.
-+   Assumes the variable `fail_stack'.  Probably should only
-+   be called from within `PUSH_FAILURE_POINT'.  */
-+# define PUSH_FAILURE_POINTER(item)					\
-+  fail_stack.stack[fail_stack.avail++].pointer = (UCHAR_T *) (item)
-+
-+/* This pushes an integer-valued item onto the failure stack.
-+   Assumes the variable `fail_stack'.  Probably should only
-+   be called from within `PUSH_FAILURE_POINT'.  */
-+# define PUSH_FAILURE_INT(item)					\
-+  fail_stack.stack[fail_stack.avail++].integer = (item)
-+
-+/* Push a fail_stack_elt_t value onto the failure stack.
-+   Assumes the variable `fail_stack'.  Probably should only
-+   be called from within `PUSH_FAILURE_POINT'.  */
-+# define PUSH_FAILURE_ELT(item)					\
-+  fail_stack.stack[fail_stack.avail++] =  (item)
-+
-+/* These three POP... operations complement the three PUSH... operations.
-+   All assume that `fail_stack' is nonempty.  */
-+# define POP_FAILURE_POINTER() fail_stack.stack[--fail_stack.avail].pointer
-+# define POP_FAILURE_INT() fail_stack.stack[--fail_stack.avail].integer
-+# define POP_FAILURE_ELT() fail_stack.stack[--fail_stack.avail]
-+
-+/* Used to omit pushing failure point id's when we're not debugging.  */
-+# ifdef DEBUG
-+#  define DEBUG_PUSH PUSH_FAILURE_INT
-+#  define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_INT ()
-+# else
-+#  define DEBUG_PUSH(item)
-+#  define DEBUG_POP(item_addr)
-+# endif
-+
-+
-+/* Push the information about the state we will need
-+   if we ever fail back to it.
-+
-+   Requires variables fail_stack, regstart, regend, reg_info, and
-+   num_regs_pushed be declared.  DOUBLE_FAIL_STACK requires `destination'
-+   be declared.
-+
-+   Does `return FAILURE_CODE' if runs out of memory.  */
-+
-+# define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code)	\
-+  do {									\
-+    char *destination;							\
-+    /* Must be int, so when we don't save any registers, the arithmetic	\
-+       of 0 + -1 isn't done as unsigned.  */				\
-+    /* Can't be int, since there is not a shred of a guarantee that int	\
-+       is wide enough to hold a value of something to which pointer can	\
-+       be assigned */							\
-+    active_reg_t this_reg;						\
-+    									\
-+    DEBUG_STATEMENT (failure_id++);					\
-+    DEBUG_STATEMENT (nfailure_points_pushed++);				\
-+    DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id);		\
-+    DEBUG_PRINT2 ("  Before push, next avail: %d\n", (fail_stack).avail);\
-+    DEBUG_PRINT2 ("                     size: %d\n", (fail_stack).size);\
-+									\
-+    DEBUG_PRINT2 ("  slots needed: %ld\n", NUM_FAILURE_ITEMS);		\
-+    DEBUG_PRINT2 ("     available: %d\n", REMAINING_AVAIL_SLOTS);	\
-+									\
-+    /* Ensure we have enough space allocated for what we will push.  */	\
-+    while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS)			\
-+      {									\
-+        if (!DOUBLE_FAIL_STACK (fail_stack))				\
-+          return failure_code;						\
-+									\
-+        DEBUG_PRINT2 ("\n  Doubled stack; size now: %d\n",		\
-+		       (fail_stack).size);				\
-+        DEBUG_PRINT2 ("  slots available: %d\n", REMAINING_AVAIL_SLOTS);\
-+      }									\
-+									\
-+    /* Push the info, starting with the registers.  */			\
-+    DEBUG_PRINT1 ("\n");						\
-+									\
-+    if (1)								\
-+      for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \
-+	   this_reg++)							\
-+	{								\
-+	  DEBUG_PRINT2 ("  Pushing reg: %lu\n", this_reg);		\
-+	  DEBUG_STATEMENT (num_regs_pushed++);				\
-+									\
-+	  DEBUG_PRINT2 ("    start: %p\n", regstart[this_reg]);		\
-+	  PUSH_FAILURE_POINTER (regstart[this_reg]);			\
-+									\
-+	  DEBUG_PRINT2 ("    end: %p\n", regend[this_reg]);		\
-+	  PUSH_FAILURE_POINTER (regend[this_reg]);			\
-+									\
-+	  DEBUG_PRINT2 ("    info: %p\n      ",				\
-+			reg_info[this_reg].word.pointer);		\
-+	  DEBUG_PRINT2 (" match_null=%d",				\
-+			REG_MATCH_NULL_STRING_P (reg_info[this_reg]));	\
-+	  DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg]));	\
-+	  DEBUG_PRINT2 (" matched_something=%d",			\
-+			MATCHED_SOMETHING (reg_info[this_reg]));	\
-+	  DEBUG_PRINT2 (" ever_matched=%d",				\
-+			EVER_MATCHED_SOMETHING (reg_info[this_reg]));	\
-+	  DEBUG_PRINT1 ("\n");						\
-+	  PUSH_FAILURE_ELT (reg_info[this_reg].word);			\
-+	}								\
-+									\
-+    DEBUG_PRINT2 ("  Pushing  low active reg: %ld\n", lowest_active_reg);\
-+    PUSH_FAILURE_INT (lowest_active_reg);				\
-+									\
-+    DEBUG_PRINT2 ("  Pushing high active reg: %ld\n", highest_active_reg);\
-+    PUSH_FAILURE_INT (highest_active_reg);				\
-+									\
-+    DEBUG_PRINT2 ("  Pushing pattern %p:\n", pattern_place);		\
-+    DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend);		\
-+    PUSH_FAILURE_POINTER (pattern_place);				\
-+									\
-+    DEBUG_PRINT2 ("  Pushing string %p: `", string_place);		\
-+    DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2,   \
-+				 size2);				\
-+    DEBUG_PRINT1 ("'\n");						\
-+    PUSH_FAILURE_POINTER (string_place);				\
-+									\
-+    DEBUG_PRINT2 ("  Pushing failure id: %u\n", failure_id);		\
-+    DEBUG_PUSH (failure_id);						\
-+  } while (0)
-+
-+# ifndef DEFINED_ONCE
-+/* This is the number of items that are pushed and popped on the stack
-+   for each register.  */
-+#  define NUM_REG_ITEMS  3
-+
-+/* Individual items aside from the registers.  */
-+#  ifdef DEBUG
-+#   define NUM_NONREG_ITEMS 5 /* Includes failure point id.  */
-+#  else
-+#   define NUM_NONREG_ITEMS 4
-+#  endif
-+
-+/* We push at most this many items on the stack.  */
-+/* We used to use (num_regs - 1), which is the number of registers
-+   this regexp will save; but that was changed to 5
-+   to avoid stack overflow for a regexp with lots of parens.  */
-+#  define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
-+
-+/* We actually push this many items.  */
-+#  define NUM_FAILURE_ITEMS				\
-+  (((0							\
-+     ? 0 : highest_active_reg - lowest_active_reg + 1)	\
-+    * NUM_REG_ITEMS)					\
-+   + NUM_NONREG_ITEMS)
-+
-+/* How many items can still be added to the stack without overflowing it.  */
-+#  define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail)
-+# endif /* not DEFINED_ONCE */
-+
-+
-+/* Pops what PUSH_FAIL_STACK pushes.
-+
-+   We restore into the parameters, all of which should be lvalues:
-+     STR -- the saved data position.
-+     PAT -- the saved pattern position.
-+     LOW_REG, HIGH_REG -- the highest and lowest active registers.
-+     REGSTART, REGEND -- arrays of string positions.
-+     REG_INFO -- array of information about each subexpression.
-+
-+   Also assumes the variables `fail_stack' and (if debugging), `bufp',
-+   `pend', `string1', `size1', `string2', and `size2'.  */
-+# define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\
-+{									\
-+  DEBUG_STATEMENT (unsigned failure_id;)				\
-+  active_reg_t this_reg;						\
-+  const UCHAR_T *string_temp;						\
-+									\
-+  assert (!FAIL_STACK_EMPTY ());					\
-+									\
-+  /* Remove failure points and point to how many regs pushed.  */	\
-+  DEBUG_PRINT1 ("POP_FAILURE_POINT:\n");				\
-+  DEBUG_PRINT2 ("  Before pop, next avail: %d\n", fail_stack.avail);	\
-+  DEBUG_PRINT2 ("                    size: %d\n", fail_stack.size);	\
-+									\
-+  assert (fail_stack.avail >= NUM_NONREG_ITEMS);			\
-+									\
-+  DEBUG_POP (&failure_id);						\
-+  DEBUG_PRINT2 ("  Popping failure id: %u\n", failure_id);		\
-+									\
-+  /* If the saved string location is NULL, it came from an		\
-+     on_failure_keep_string_jump opcode, and we want to throw away the	\
-+     saved NULL, thus retaining our current position in the string.  */	\
-+  string_temp = POP_FAILURE_POINTER ();					\
-+  if (string_temp != NULL)						\
-+    str = (const CHAR_T *) string_temp;					\
-+									\
-+  DEBUG_PRINT2 ("  Popping string %p: `", str);				\
-+  DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2);	\
-+  DEBUG_PRINT1 ("'\n");							\
-+									\
-+  pat = (UCHAR_T *) POP_FAILURE_POINTER ();				\
-+  DEBUG_PRINT2 ("  Popping pattern %p:\n", pat);			\
-+  DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend);			\
-+									\
-+  /* Restore register info.  */						\
-+  high_reg = (active_reg_t) POP_FAILURE_INT ();				\
-+  DEBUG_PRINT2 ("  Popping high active reg: %ld\n", high_reg);		\
-+									\
-+  low_reg = (active_reg_t) POP_FAILURE_INT ();				\
-+  DEBUG_PRINT2 ("  Popping  low active reg: %ld\n", low_reg);		\
-+									\
-+  if (1)								\
-+    for (this_reg = high_reg; this_reg >= low_reg; this_reg--)		\
-+      {									\
-+	DEBUG_PRINT2 ("    Popping reg: %ld\n", this_reg);		\
-+									\
-+	reg_info[this_reg].word = POP_FAILURE_ELT ();			\
-+	DEBUG_PRINT2 ("      info: %p\n",				\
-+		      reg_info[this_reg].word.pointer);			\
-+									\
-+	regend[this_reg] = (const CHAR_T *) POP_FAILURE_POINTER ();	\
-+	DEBUG_PRINT2 ("      end: %p\n", regend[this_reg]);		\
-+									\
-+	regstart[this_reg] = (const CHAR_T *) POP_FAILURE_POINTER ();	\
-+	DEBUG_PRINT2 ("      start: %p\n", regstart[this_reg]);		\
-+      }									\
-+  else									\
-+    {									\
-+      for (this_reg = highest_active_reg; this_reg > high_reg; this_reg--) \
-+	{								\
-+	  reg_info[this_reg].word.integer = 0;				\
-+	  regend[this_reg] = 0;						\
-+	  regstart[this_reg] = 0;					\
-+	}								\
-+      highest_active_reg = high_reg;					\
-+    }									\
-+									\
-+  set_regs_matched_done = 0;						\
-+  DEBUG_STATEMENT (nfailure_points_popped++);				\
-+} /* POP_FAILURE_POINT */
-+
-+/* Structure for per-register (a.k.a. per-group) information.
-+   Other register information, such as the
-+   starting and ending positions (which are addresses), and the list of
-+   inner groups (which is a bits list) are maintained in separate
-+   variables.
-+
-+   We are making a (strictly speaking) nonportable assumption here: that
-+   the compiler will pack our bit fields into something that fits into
-+   the type of `word', i.e., is something that fits into one item on the
-+   failure stack.  */
-+
-+
-+/* Declarations and macros for re_match_2.  */
-+
-+typedef union
-+{
-+  PREFIX(fail_stack_elt_t) word;
-+  struct
-+  {
-+      /* This field is one if this group can match the empty string,
-+         zero if not.  If not yet determined,  `MATCH_NULL_UNSET_VALUE'.  */
-+# define MATCH_NULL_UNSET_VALUE 3
-+    unsigned match_null_string_p : 2;
-+    unsigned is_active : 1;
-+    unsigned matched_something : 1;
-+    unsigned ever_matched_something : 1;
-+  } bits;
-+} PREFIX(register_info_type);
-+
-+# ifndef DEFINED_ONCE
-+#  define REG_MATCH_NULL_STRING_P(R)  ((R).bits.match_null_string_p)
-+#  define IS_ACTIVE(R)  ((R).bits.is_active)
-+#  define MATCHED_SOMETHING(R)  ((R).bits.matched_something)
-+#  define EVER_MATCHED_SOMETHING(R)  ((R).bits.ever_matched_something)
-+
-+
-+/* Call this when have matched a real character; it sets `matched' flags
-+   for the subexpressions which we are currently inside.  Also records
-+   that those subexprs have matched.  */
-+#  define SET_REGS_MATCHED()						\
-+  do									\
-+    {									\
-+      if (!set_regs_matched_done)					\
-+	{								\
-+	  active_reg_t r;						\
-+	  set_regs_matched_done = 1;					\
-+	  for (r = lowest_active_reg; r <= highest_active_reg; r++)	\
-+	    {								\
-+	      MATCHED_SOMETHING (reg_info[r])				\
-+		= EVER_MATCHED_SOMETHING (reg_info[r])			\
-+		= 1;							\
-+	    }								\
-+	}								\
-+    }									\
-+  while (0)
-+# endif /* not DEFINED_ONCE */
-+
-+/* Registers are set to a sentinel when they haven't yet matched.  */
-+static CHAR_T PREFIX(reg_unset_dummy);
-+# define REG_UNSET_VALUE (&PREFIX(reg_unset_dummy))
-+# define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
-+
-+/* Subroutine declarations and macros for regex_compile.  */
-+static void PREFIX(store_op1) (re_opcode_t op, UCHAR_T *loc, int arg);
-+static void PREFIX(store_op2) (re_opcode_t op, UCHAR_T *loc,
-+                               int arg1, int arg2);
-+static void PREFIX(insert_op1) (re_opcode_t op, UCHAR_T *loc,
-+                                int arg, UCHAR_T *end);
-+static void PREFIX(insert_op2) (re_opcode_t op, UCHAR_T *loc,
-+                                int arg1, int arg2, UCHAR_T *end);
-+static boolean PREFIX(at_begline_loc_p) (const CHAR_T *pattern,
-+                                         const CHAR_T *p,
-+                                         reg_syntax_t syntax);
-+static boolean PREFIX(at_endline_loc_p) (const CHAR_T *p,
-+                                         const CHAR_T *pend,
-+                                         reg_syntax_t syntax);
-+# ifdef WCHAR
-+static reg_errcode_t wcs_compile_range (CHAR_T range_start,
-+                                        const CHAR_T **p_ptr,
-+                                        const CHAR_T *pend,
-+                                        char *translate,
-+                                        reg_syntax_t syntax,
-+                                        UCHAR_T *b,
-+                                        CHAR_T *char_set);
-+static void insert_space (int num, CHAR_T *loc, CHAR_T *end);
-+# else /* BYTE */
-+static reg_errcode_t byte_compile_range (unsigned int range_start,
-+                                         const char **p_ptr,
-+                                         const char *pend,
-+                                         RE_TRANSLATE_TYPE translate,
-+                                         reg_syntax_t syntax,
-+                                         unsigned char *b);
-+# endif /* WCHAR */
-+
-+/* Fetch the next character in the uncompiled pattern---translating it
-+   if necessary.  Also cast from a signed character in the constant
-+   string passed to us by the user to an unsigned char that we can use
-+   as an array index (in, e.g., `translate').  */
-+/* ifdef MBS_SUPPORT, we translate only if character <= 0xff,
-+   because it is impossible to allocate 4GB array for some encodings
-+   which have 4 byte character_set like UCS4.  */
-+# ifndef PATFETCH
-+#  ifdef WCHAR
-+#   define PATFETCH(c)							\
-+  do {if (p == pend) return REG_EEND;					\
-+    c = (UCHAR_T) *p++;							\
-+    if (translate && (c <= 0xff)) c = (UCHAR_T) translate[c];		\
-+  } while (0)
-+#  else /* BYTE */
-+#   define PATFETCH(c)							\
-+  do {if (p == pend) return REG_EEND;					\
-+    c = (unsigned char) *p++;						\
-+    if (translate) c = (unsigned char) translate[c];			\
-+  } while (0)
-+#  endif /* WCHAR */
-+# endif
-+
-+/* Fetch the next character in the uncompiled pattern, with no
-+   translation.  */
-+# define PATFETCH_RAW(c)						\
-+  do {if (p == pend) return REG_EEND;					\
-+    c = (UCHAR_T) *p++; 	       					\
-+  } while (0)
-+
-+/* Go backwards one character in the pattern.  */
-+# define PATUNFETCH p--
-+
-+
-+/* If `translate' is non-null, return translate[D], else just D.  We
-+   cast the subscript to translate because some data is declared as
-+   `char *', to avoid warnings when a string constant is passed.  But
-+   when we use a character as a subscript we must make it unsigned.  */
-+/* ifdef MBS_SUPPORT, we translate only if character <= 0xff,
-+   because it is impossible to allocate 4GB array for some encodings
-+   which have 4 byte character_set like UCS4.  */
-+
-+# ifndef TRANSLATE
-+#  ifdef WCHAR
-+#   define TRANSLATE(d) \
-+  ((translate && ((UCHAR_T) (d)) <= 0xff) \
-+   ? (char) translate[(unsigned char) (d)] : (d))
-+# else /* BYTE */
-+#   define TRANSLATE(d) \
-+  (translate ? (char) translate[(unsigned char) (d)] : (char) (d))
-+#  endif /* WCHAR */
-+# endif
-+
-+
-+/* Macros for outputting the compiled pattern into `buffer'.  */
-+
-+/* If the buffer isn't allocated when it comes in, use this.  */
-+# define INIT_BUF_SIZE  (32 * sizeof(UCHAR_T))
-+
-+/* Make sure we have at least N more bytes of space in buffer.  */
-+# ifdef WCHAR
-+#  define GET_BUFFER_SPACE(n)						\
-+    while (((unsigned long)b - (unsigned long)COMPILED_BUFFER_VAR	\
-+            + (n)*sizeof(CHAR_T)) > bufp->allocated)			\
-+      EXTEND_BUFFER ()
-+# else /* BYTE */
-+#  define GET_BUFFER_SPACE(n)						\
-+    while ((unsigned long) (b - bufp->buffer + (n)) > bufp->allocated)	\
-+      EXTEND_BUFFER ()
-+# endif /* WCHAR */
-+
-+/* Make sure we have one more byte of buffer space and then add C to it.  */
-+# define BUF_PUSH(c)							\
-+  do {									\
-+    GET_BUFFER_SPACE (1);						\
-+    *b++ = (UCHAR_T) (c);						\
-+  } while (0)
-+
-+
-+/* Ensure we have two more bytes of buffer space and then append C1 and C2.  */
-+# define BUF_PUSH_2(c1, c2)						\
-+  do {									\
-+    GET_BUFFER_SPACE (2);						\
-+    *b++ = (UCHAR_T) (c1);						\
-+    *b++ = (UCHAR_T) (c2);						\
-+  } while (0)
-+
-+
-+/* As with BUF_PUSH_2, except for three bytes.  */
-+# define BUF_PUSH_3(c1, c2, c3)						\
-+  do {									\
-+    GET_BUFFER_SPACE (3);						\
-+    *b++ = (UCHAR_T) (c1);						\
-+    *b++ = (UCHAR_T) (c2);						\
-+    *b++ = (UCHAR_T) (c3);						\
-+  } while (0)
-+
-+/* Store a jump with opcode OP at LOC to location TO.  We store a
-+   relative address offset by the three bytes the jump itself occupies.  */
-+# define STORE_JUMP(op, loc, to) \
-+ PREFIX(store_op1) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)))
-+
-+/* Likewise, for a two-argument jump.  */
-+# define STORE_JUMP2(op, loc, to, arg) \
-+  PREFIX(store_op2) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)), arg)
-+
-+/* Like `STORE_JUMP', but for inserting.  Assume `b' is the buffer end.  */
-+# define INSERT_JUMP(op, loc, to) \
-+  PREFIX(insert_op1) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)), b)
-+
-+/* Like `STORE_JUMP2', but for inserting.  Assume `b' is the buffer end.  */
-+# define INSERT_JUMP2(op, loc, to, arg) \
-+  PREFIX(insert_op2) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)),\
-+	      arg, b)
-+
-+/* This is not an arbitrary limit: the arguments which represent offsets
-+   into the pattern are two bytes long.  So if 2^16 bytes turns out to
-+   be too small, many things would have to change.  */
-+/* Any other compiler which, like MSC, has allocation limit below 2^16
-+   bytes will have to use approach similar to what was done below for
-+   MSC and drop MAX_BUF_SIZE a bit.  Otherwise you may end up
-+   reallocating to 0 bytes.  Such thing is not going to work too well.
-+   You have been warned!!  */
-+# ifndef DEFINED_ONCE
-+#  if defined _MSC_VER  && !defined WIN32
-+/* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
-+   The REALLOC define eliminates a flurry of conversion warnings,
-+   but is not required. */
-+#   define MAX_BUF_SIZE  65500L
-+#   define REALLOC(p,s) realloc ((p), (size_t) (s))
-+#  else
-+#   define MAX_BUF_SIZE (1L << 16)
-+#   define REALLOC(p,s) realloc ((p), (s))
-+#  endif
-+
-+/* Extend the buffer by twice its current size via realloc and
-+   reset the pointers that pointed into the old block to point to the
-+   correct places in the new one.  If extending the buffer results in it
-+   being larger than MAX_BUF_SIZE, then flag memory exhausted.  */
-+#  ifndef __BOUNDED_POINTERS__
-+#    define __BOUNDED_POINTERS__ 0
-+#  endif
-+#  if __BOUNDED_POINTERS__
-+#   define SET_HIGH_BOUND(P) (__ptrhigh (P) = __ptrlow (P) + bufp->allocated)
-+#   define MOVE_BUFFER_POINTER(P) \
-+  (__ptrlow (P) += incr, SET_HIGH_BOUND (P), __ptrvalue (P) += incr)
-+#   define ELSE_EXTEND_BUFFER_HIGH_BOUND	\
-+  else						\
-+    {						\
-+      SET_HIGH_BOUND (b);			\
-+      SET_HIGH_BOUND (begalt);			\
-+      if (fixup_alt_jump)			\
-+	SET_HIGH_BOUND (fixup_alt_jump);	\
-+      if (laststart)				\
-+	SET_HIGH_BOUND (laststart);		\
-+      if (pending_exact)			\
-+	SET_HIGH_BOUND (pending_exact);		\
-+    }
-+#  else
-+#   define MOVE_BUFFER_POINTER(P) (P) += incr
-+#   define ELSE_EXTEND_BUFFER_HIGH_BOUND
-+#  endif
-+# endif /* not DEFINED_ONCE */
-+
-+# ifdef WCHAR
-+#  define EXTEND_BUFFER()						\
-+  do {									\
-+    UCHAR_T *old_buffer = COMPILED_BUFFER_VAR;				\
-+    int wchar_count;							\
-+    if (bufp->allocated + sizeof(UCHAR_T) > MAX_BUF_SIZE)		\
-+      return REG_ESIZE;							\
-+    bufp->allocated <<= 1;						\
-+    if (bufp->allocated > MAX_BUF_SIZE)					\
-+      bufp->allocated = MAX_BUF_SIZE;					\
-+    /* How many characters the new buffer can have?  */			\
-+    wchar_count = bufp->allocated / sizeof(UCHAR_T);			\
-+    if (wchar_count == 0) wchar_count = 1;				\
-+    /* Truncate the buffer to CHAR_T align.  */			\
-+    bufp->allocated = wchar_count * sizeof(UCHAR_T);			\
-+    RETALLOC (COMPILED_BUFFER_VAR, wchar_count, UCHAR_T);		\
-+    bufp->buffer = (char*)COMPILED_BUFFER_VAR;				\
-+    if (COMPILED_BUFFER_VAR == NULL)					\
-+      return REG_ESPACE;						\
-+    /* If the buffer moved, move all the pointers into it.  */		\
-+    if (old_buffer != COMPILED_BUFFER_VAR)				\
-+      {									\
-+	int incr = COMPILED_BUFFER_VAR - old_buffer;			\
-+	MOVE_BUFFER_POINTER (b);					\
-+	MOVE_BUFFER_POINTER (begalt);					\
-+	if (fixup_alt_jump)						\
-+	  MOVE_BUFFER_POINTER (fixup_alt_jump);				\
-+	if (laststart)							\
-+	  MOVE_BUFFER_POINTER (laststart);				\
-+	if (pending_exact)						\
-+	  MOVE_BUFFER_POINTER (pending_exact);				\
-+      }									\
-+    ELSE_EXTEND_BUFFER_HIGH_BOUND					\
-+  } while (0)
-+# else /* BYTE */
-+#  define EXTEND_BUFFER()						\
-+  do {									\
-+    UCHAR_T *old_buffer = COMPILED_BUFFER_VAR;				\
-+    if (bufp->allocated == MAX_BUF_SIZE)				\
-+      return REG_ESIZE;							\
-+    bufp->allocated <<= 1;						\
-+    if (bufp->allocated > MAX_BUF_SIZE)					\
-+      bufp->allocated = MAX_BUF_SIZE;					\
-+    bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR,		\
-+						bufp->allocated);	\
-+    if (COMPILED_BUFFER_VAR == NULL)					\
-+      return REG_ESPACE;						\
-+    /* If the buffer moved, move all the pointers into it.  */		\
-+    if (old_buffer != COMPILED_BUFFER_VAR)				\
-+      {									\
-+	int incr = COMPILED_BUFFER_VAR - old_buffer;			\
-+	MOVE_BUFFER_POINTER (b);					\
-+	MOVE_BUFFER_POINTER (begalt);					\
-+	if (fixup_alt_jump)						\
-+	  MOVE_BUFFER_POINTER (fixup_alt_jump);				\
-+	if (laststart)							\
-+	  MOVE_BUFFER_POINTER (laststart);				\
-+	if (pending_exact)						\
-+	  MOVE_BUFFER_POINTER (pending_exact);				\
-+      }									\
-+    ELSE_EXTEND_BUFFER_HIGH_BOUND					\
-+  } while (0)
-+# endif /* WCHAR */
-+
-+# ifndef DEFINED_ONCE
-+/* Since we have one byte reserved for the register number argument to
-+   {start,stop}_memory, the maximum number of groups we can report
-+   things about is what fits in that byte.  */
-+#  define MAX_REGNUM 255
-+
-+/* But patterns can have more than `MAX_REGNUM' registers.  We just
-+   ignore the excess.  */
-+typedef unsigned regnum_t;
-+
-+
-+/* Macros for the compile stack.  */
-+
-+/* Since offsets can go either forwards or backwards, this type needs to
-+   be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1.  */
-+/* int may be not enough when sizeof(int) == 2.  */
-+typedef long pattern_offset_t;
-+
-+typedef struct
-+{
-+  pattern_offset_t begalt_offset;
-+  pattern_offset_t fixup_alt_jump;
-+  pattern_offset_t inner_group_offset;
-+  pattern_offset_t laststart_offset;
-+  regnum_t regnum;
-+} compile_stack_elt_t;
-+
-+
-+typedef struct
-+{
-+  compile_stack_elt_t *stack;
-+  unsigned size;
-+  unsigned avail;			/* Offset of next open position.  */
-+} compile_stack_type;
-+
-+
-+#  define INIT_COMPILE_STACK_SIZE 32
-+
-+#  define COMPILE_STACK_EMPTY  (compile_stack.avail == 0)
-+#  define COMPILE_STACK_FULL  (compile_stack.avail == compile_stack.size)
-+
-+/* The next available element.  */
-+#  define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail])
-+
-+# endif /* not DEFINED_ONCE */
-+
-+/* Set the bit for character C in a list.  */
-+# ifndef DEFINED_ONCE
-+#  define SET_LIST_BIT(c)                               \
-+  (b[((unsigned char) (c)) / BYTEWIDTH]               \
-+   |= 1 << (((unsigned char) c) % BYTEWIDTH))
-+# endif /* DEFINED_ONCE */
-+
-+/* Get the next unsigned number in the uncompiled pattern.  */
-+# define GET_UNSIGNED_NUMBER(num) \
-+  {									\
-+    while (p != pend)							\
-+      {									\
-+	PATFETCH (c);							\
-+	if (c < '0' || c > '9')						\
-+	  break;							\
-+	if (num <= RE_DUP_MAX)						\
-+	  {								\
-+	    if (num < 0)						\
-+	      num = 0;							\
-+	    num = num * 10 + c - '0';					\
-+	  }								\
-+      }									\
-+  }
-+
-+# ifndef DEFINED_ONCE
-+#  if WIDE_CHAR_SUPPORT
-+/* The GNU C library provides support for user-defined character classes
-+   and the functions from ISO C amendement 1.  */
-+#   ifdef CHARCLASS_NAME_MAX
-+#    define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
-+#   else
-+/* This shouldn't happen but some implementation might still have this
-+   problem.  Use a reasonable default value.  */
-+#    define CHAR_CLASS_MAX_LENGTH 256
-+#   endif
-+
-+#   ifdef _LIBC
-+#    define IS_CHAR_CLASS(string) __wctype (string)
-+#   else
-+#    define IS_CHAR_CLASS(string) wctype (string)
-+#   endif
-+#  else
-+#   define CHAR_CLASS_MAX_LENGTH  6 /* Namely, `xdigit'.  */
-+
-+#   define IS_CHAR_CLASS(string)					\
-+   (STREQ (string, "alpha") || STREQ (string, "upper")			\
-+    || STREQ (string, "lower") || STREQ (string, "digit")		\
-+    || STREQ (string, "alnum") || STREQ (string, "xdigit")		\
-+    || STREQ (string, "space") || STREQ (string, "print")		\
-+    || STREQ (string, "punct") || STREQ (string, "graph")		\
-+    || STREQ (string, "cntrl") || STREQ (string, "blank"))
-+#  endif
-+# endif /* DEFINED_ONCE */
-+
-+# ifndef MATCH_MAY_ALLOCATE
-+
-+/* If we cannot allocate large objects within re_match_2_internal,
-+   we make the fail stack and register vectors global.
-+   The fail stack, we grow to the maximum size when a regexp
-+   is compiled.
-+   The register vectors, we adjust in size each time we
-+   compile a regexp, according to the number of registers it needs.  */
-+
-+static PREFIX(fail_stack_type) fail_stack;
-+
-+/* Size with which the following vectors are currently allocated.
-+   That is so we can make them bigger as needed,
-+   but never make them smaller.  */
-+#  ifdef DEFINED_ONCE
-+static int regs_allocated_size;
-+
-+static const char **     regstart, **     regend;
-+static const char ** old_regstart, ** old_regend;
-+static const char **best_regstart, **best_regend;
-+static const char **reg_dummy;
-+#  endif /* DEFINED_ONCE */
-+
-+static PREFIX(register_info_type) *PREFIX(reg_info);
-+static PREFIX(register_info_type) *PREFIX(reg_info_dummy);
-+
-+/* Make the register vectors big enough for NUM_REGS registers,
-+   but don't make them smaller.  */
-+
-+static void
-+PREFIX(regex_grow_registers) (int num_regs)
-+{
-+  if (num_regs > regs_allocated_size)
-+    {
-+      RETALLOC_IF (regstart,	 num_regs, const char *);
-+      RETALLOC_IF (regend,	 num_regs, const char *);
-+      RETALLOC_IF (old_regstart, num_regs, const char *);
-+      RETALLOC_IF (old_regend,	 num_regs, const char *);
-+      RETALLOC_IF (best_regstart, num_regs, const char *);
-+      RETALLOC_IF (best_regend,	 num_regs, const char *);
-+      RETALLOC_IF (PREFIX(reg_info), num_regs, PREFIX(register_info_type));
-+      RETALLOC_IF (reg_dummy,	 num_regs, const char *);
-+      RETALLOC_IF (PREFIX(reg_info_dummy), num_regs, PREFIX(register_info_type));
-+
-+      regs_allocated_size = num_regs;
-+    }
-+}
-+
-+# endif /* not MATCH_MAY_ALLOCATE */
-+
-+# ifndef DEFINED_ONCE
-+static boolean group_in_compile_stack (compile_stack_type compile_stack,
-+                                       regnum_t regnum);
-+# endif /* not DEFINED_ONCE */
-+
-+/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
-+   Returns one of error codes defined in `regex.h', or zero for success.
-+
-+   Assumes the `allocated' (and perhaps `buffer') and `translate'
-+   fields are set in BUFP on entry.
-+
-+   If it succeeds, results are put in BUFP (if it returns an error, the
-+   contents of BUFP are undefined):
-+     `buffer' is the compiled pattern;
-+     `syntax' is set to SYNTAX;
-+     `used' is set to the length of the compiled pattern;
-+     `fastmap_accurate' is zero;
-+     `re_nsub' is the number of subexpressions in PATTERN;
-+     `not_bol' and `not_eol' are zero;
-+
-+   The `fastmap' and `newline_anchor' fields are neither
-+   examined nor set.  */
-+
-+/* Return, freeing storage we allocated.  */
-+# ifdef WCHAR
-+#  define FREE_STACK_RETURN(value)		\
-+  return (free(pattern), free(mbs_offset), free(is_binary), free (compile_stack.stack), value)
-+# else
-+#  define FREE_STACK_RETURN(value)		\
-+  return (free (compile_stack.stack), value)
-+# endif /* WCHAR */
-+
-+static reg_errcode_t
-+PREFIX(regex_compile) (const char *ARG_PREFIX(pattern),
-+                       size_t ARG_PREFIX(size), reg_syntax_t syntax,
-+                       struct re_pattern_buffer *bufp)
-+{
-+  /* We fetch characters from PATTERN here.  Even though PATTERN is
-+     `char *' (i.e., signed), we declare these variables as unsigned, so
-+     they can be reliably used as array indices.  */
-+  register UCHAR_T c, c1;
-+
-+#ifdef WCHAR
-+  /* A temporary space to keep wchar_t pattern and compiled pattern.  */
-+  CHAR_T *pattern, *COMPILED_BUFFER_VAR;
-+  size_t size;
-+  /* offset buffer for optimization. See convert_mbs_to_wc.  */
-+  int *mbs_offset = NULL;
-+  /* It hold whether each wchar_t is binary data or not.  */
-+  char *is_binary = NULL;
-+  /* A flag whether exactn is handling binary data or not.  */
-+  char is_exactn_bin = FALSE;
-+#endif /* WCHAR */
-+
-+  /* A random temporary spot in PATTERN.  */
-+  const CHAR_T *p1;
-+
-+  /* Points to the end of the buffer, where we should append.  */
-+  register UCHAR_T *b;
-+
-+  /* Keeps track of unclosed groups.  */
-+  compile_stack_type compile_stack;
-+
-+  /* Points to the current (ending) position in the pattern.  */
-+#ifdef WCHAR
-+  const CHAR_T *p;
-+  const CHAR_T *pend;
-+#else /* BYTE */
-+  const CHAR_T *p = pattern;
-+  const CHAR_T *pend = pattern + size;
-+#endif /* WCHAR */
-+
-+  /* How to translate the characters in the pattern.  */
-+  RE_TRANSLATE_TYPE translate = bufp->translate;
-+
-+  /* Address of the count-byte of the most recently inserted `exactn'
-+     command.  This makes it possible to tell if a new exact-match
-+     character can be added to that command or if the character requires
-+     a new `exactn' command.  */
-+  UCHAR_T *pending_exact = 0;
-+
-+  /* Address of start of the most recently finished expression.
-+     This tells, e.g., postfix * where to find the start of its
-+     operand.  Reset at the beginning of groups and alternatives.  */
-+  UCHAR_T *laststart = 0;
-+
-+  /* Address of beginning of regexp, or inside of last group.  */
-+  UCHAR_T *begalt;
-+
-+  /* Address of the place where a forward jump should go to the end of
-+     the containing expression.  Each alternative of an `or' -- except the
-+     last -- ends with a forward jump of this sort.  */
-+  UCHAR_T *fixup_alt_jump = 0;
-+
-+  /* Counts open-groups as they are encountered.  Remembered for the
-+     matching close-group on the compile stack, so the same register
-+     number is put in the stop_memory as the start_memory.  */
-+  regnum_t regnum = 0;
-+
-+#ifdef WCHAR
-+  /* Initialize the wchar_t PATTERN and offset_buffer.  */
-+  p = pend = pattern = TALLOC(csize + 1, CHAR_T);
-+  mbs_offset = TALLOC(csize + 1, int);
-+  is_binary = TALLOC(csize + 1, char);
-+  if (pattern == NULL || mbs_offset == NULL || is_binary == NULL)
-+    {
-+      free(pattern);
-+      free(mbs_offset);
-+      free(is_binary);
-+      return REG_ESPACE;
-+    }
-+  pattern[csize] = L'\0';	/* sentinel */
-+  size = convert_mbs_to_wcs(pattern, cpattern, csize, mbs_offset, is_binary);
-+  pend = p + size;
-+  if (size < 0)
-+    {
-+      free(pattern);
-+      free(mbs_offset);
-+      free(is_binary);
-+      return REG_BADPAT;
-+    }
-+#endif
-+
-+#ifdef DEBUG
-+  DEBUG_PRINT1 ("\nCompiling pattern: ");
-+  if (debug)
-+    {
-+      unsigned debug_count;
-+
-+      for (debug_count = 0; debug_count < size; debug_count++)
-+        PUT_CHAR (pattern[debug_count]);
-+      putchar ('\n');
-+    }
-+#endif /* DEBUG */
-+
-+  /* Initialize the compile stack.  */
-+  compile_stack.stack = TALLOC (INIT_COMPILE_STACK_SIZE, compile_stack_elt_t);
-+  if (compile_stack.stack == NULL)
-+    {
-+#ifdef WCHAR
-+      free(pattern);
-+      free(mbs_offset);
-+      free(is_binary);
-+#endif
-+      return REG_ESPACE;
-+    }
-+
-+  compile_stack.size = INIT_COMPILE_STACK_SIZE;
-+  compile_stack.avail = 0;
-+
-+  /* Initialize the pattern buffer.  */
-+  bufp->syntax = syntax;
-+  bufp->fastmap_accurate = 0;
-+  bufp->not_bol = bufp->not_eol = 0;
-+
-+  /* Set `used' to zero, so that if we return an error, the pattern
-+     printer (for debugging) will think there's no pattern.  We reset it
-+     at the end.  */
-+  bufp->used = 0;
-+
-+  /* Always count groups, whether or not bufp->no_sub is set.  */
-+  bufp->re_nsub = 0;
-+
-+#if !defined emacs && !defined SYNTAX_TABLE
-+  /* Initialize the syntax table.  */
-+   init_syntax_once ();
-+#endif
-+
-+  if (bufp->allocated == 0)
-+    {
-+      if (bufp->buffer)
-+	{ /* If zero allocated, but buffer is non-null, try to realloc
-+             enough space.  This loses if buffer's address is bogus, but
-+             that is the user's responsibility.  */
-+#ifdef WCHAR
-+	  /* Free bufp->buffer and allocate an array for wchar_t pattern
-+	     buffer.  */
-+          free(bufp->buffer);
-+          COMPILED_BUFFER_VAR = TALLOC (INIT_BUF_SIZE/sizeof(UCHAR_T),
-+					UCHAR_T);
-+#else
-+          RETALLOC (COMPILED_BUFFER_VAR, INIT_BUF_SIZE, UCHAR_T);
-+#endif /* WCHAR */
-+        }
-+      else
-+        { /* Caller did not allocate a buffer.  Do it for them.  */
-+          COMPILED_BUFFER_VAR = TALLOC (INIT_BUF_SIZE / sizeof(UCHAR_T),
-+					UCHAR_T);
-+        }
-+
-+      if (!COMPILED_BUFFER_VAR) FREE_STACK_RETURN (REG_ESPACE);
-+#ifdef WCHAR
-+      bufp->buffer = (char*)COMPILED_BUFFER_VAR;
-+#endif /* WCHAR */
-+      bufp->allocated = INIT_BUF_SIZE;
-+    }
-+#ifdef WCHAR
-+  else
-+    COMPILED_BUFFER_VAR = (UCHAR_T*) bufp->buffer;
-+#endif
-+
-+  begalt = b = COMPILED_BUFFER_VAR;
-+
-+  /* Loop through the uncompiled pattern until we're at the end.  */
-+  while (p != pend)
-+    {
-+      PATFETCH (c);
-+
-+      switch (c)
-+        {
-+        case '^':
-+          {
-+            if (   /* If at start of pattern, it's an operator.  */
-+                   p == pattern + 1
-+                   /* If context independent, it's an operator.  */
-+                || syntax & RE_CONTEXT_INDEP_ANCHORS
-+                   /* Otherwise, depends on what's come before.  */
-+                || PREFIX(at_begline_loc_p) (pattern, p, syntax))
-+              BUF_PUSH (begline);
-+            else
-+              goto normal_char;
-+          }
-+          break;
-+
-+
-+        case '$':
-+          {
-+            if (   /* If at end of pattern, it's an operator.  */
-+                   p == pend
-+                   /* If context independent, it's an operator.  */
-+                || syntax & RE_CONTEXT_INDEP_ANCHORS
-+                   /* Otherwise, depends on what's next.  */
-+                || PREFIX(at_endline_loc_p) (p, pend, syntax))
-+               BUF_PUSH (endline);
-+             else
-+               goto normal_char;
-+           }
-+           break;
-+
-+
-+	case '+':
-+        case '?':
-+          if ((syntax & RE_BK_PLUS_QM)
-+              || (syntax & RE_LIMITED_OPS))
-+            goto normal_char;
-+        handle_plus:
-+        case '*':
-+          /* If there is no previous pattern... */
-+          if (!laststart)
-+            {
-+              if (syntax & RE_CONTEXT_INVALID_OPS)
-+                FREE_STACK_RETURN (REG_BADRPT);
-+              else if (!(syntax & RE_CONTEXT_INDEP_OPS))
-+                goto normal_char;
-+            }
-+
-+          {
-+            /* Are we optimizing this jump?  */
-+            boolean keep_string_p = false;
-+
-+            /* 1 means zero (many) matches is allowed.  */
-+            char zero_times_ok = 0, many_times_ok = 0;
-+
-+            /* If there is a sequence of repetition chars, collapse it
-+               down to just one (the right one).  We can't combine
-+               interval operators with these because of, e.g., `a{2}*',
-+               which should only match an even number of `a's.  */
-+
-+            for (;;)
-+              {
-+                zero_times_ok |= c != '+';
-+                many_times_ok |= c != '?';
-+
-+                if (p == pend)
-+                  break;
-+
-+                PATFETCH (c);
-+
-+                if (c == '*'
-+                    || (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?')))
-+                  ;
-+
-+                else if (syntax & RE_BK_PLUS_QM  &&  c == '\\')
-+                  {
-+                    if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
-+
-+                    PATFETCH (c1);
-+                    if (!(c1 == '+' || c1 == '?'))
-+                      {
-+                        PATUNFETCH;
-+                        PATUNFETCH;
-+                        break;
-+                      }
-+
-+                    c = c1;
-+                  }
-+                else
-+                  {
-+                    PATUNFETCH;
-+                    break;
-+                  }
-+
-+                /* If we get here, we found another repeat character.  */
-+               }
-+
-+            /* Star, etc. applied to an empty pattern is equivalent
-+               to an empty pattern.  */
-+            if (!laststart)
-+              break;
-+
-+            /* Now we know whether or not zero matches is allowed
-+               and also whether or not two or more matches is allowed.  */
-+            if (many_times_ok)
-+              { /* More than one repetition is allowed, so put in at the
-+                   end a backward relative jump from `b' to before the next
-+                   jump we're going to put in below (which jumps from
-+                   laststart to after this jump).
-+
-+                   But if we are at the `*' in the exact sequence `.*\n',
-+                   insert an unconditional jump backwards to the .,
-+                   instead of the beginning of the loop.  This way we only
-+                   push a failure point once, instead of every time
-+                   through the loop.  */
-+                assert (p - 1 > pattern);
-+
-+                /* Allocate the space for the jump.  */
-+                GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
-+
-+                /* We know we are not at the first character of the pattern,
-+                   because laststart was nonzero.  And we've already
-+                   incremented `p', by the way, to be the character after
-+                   the `*'.  Do we have to do something analogous here
-+                   for null bytes, because of RE_DOT_NOT_NULL?  */
-+                if (TRANSLATE (*(p - 2)) == TRANSLATE ('.')
-+		    && zero_times_ok
-+                    && p < pend && TRANSLATE (*p) == TRANSLATE ('\n')
-+                    && !(syntax & RE_DOT_NEWLINE))
-+                  { /* We have .*\n.  */
-+                    STORE_JUMP (jump, b, laststart);
-+                    keep_string_p = true;
-+                  }
-+                else
-+                  /* Anything else.  */
-+                  STORE_JUMP (maybe_pop_jump, b, laststart -
-+			      (1 + OFFSET_ADDRESS_SIZE));
-+
-+                /* We've added more stuff to the buffer.  */
-+                b += 1 + OFFSET_ADDRESS_SIZE;
-+              }
-+
-+            /* On failure, jump from laststart to b + 3, which will be the
-+               end of the buffer after this jump is inserted.  */
-+	    /* ifdef WCHAR, 'b + 1 + OFFSET_ADDRESS_SIZE' instead of
-+	       'b + 3'.  */
-+            GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
-+            INSERT_JUMP (keep_string_p ? on_failure_keep_string_jump
-+                                       : on_failure_jump,
-+                         laststart, b + 1 + OFFSET_ADDRESS_SIZE);
-+            pending_exact = 0;
-+            b += 1 + OFFSET_ADDRESS_SIZE;
-+
-+            if (!zero_times_ok)
-+              {
-+                /* At least one repetition is required, so insert a
-+                   `dummy_failure_jump' before the initial
-+                   `on_failure_jump' instruction of the loop. This
-+                   effects a skip over that instruction the first time
-+                   we hit that loop.  */
-+                GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
-+                INSERT_JUMP (dummy_failure_jump, laststart, laststart +
-+			     2 + 2 * OFFSET_ADDRESS_SIZE);
-+                b += 1 + OFFSET_ADDRESS_SIZE;
-+              }
-+            }
-+	  break;
-+
-+
-+	case '.':
-+          laststart = b;
-+          BUF_PUSH (anychar);
-+          break;
-+
-+
-+        case '[':
-+          {
-+            boolean had_char_class = false;
-+#ifdef WCHAR
-+	    CHAR_T range_start = 0xffffffff;
-+#else
-+	    unsigned int range_start = 0xffffffff;
-+#endif
-+            if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+#ifdef WCHAR
-+	    /* We assume a charset(_not) structure as a wchar_t array.
-+	       charset[0] = (re_opcode_t) charset(_not)
-+               charset[1] = l (= length of char_classes)
-+               charset[2] = m (= length of collating_symbols)
-+               charset[3] = n (= length of equivalence_classes)
-+	       charset[4] = o (= length of char_ranges)
-+	       charset[5] = p (= length of chars)
-+
-+               charset[6] = char_class (wctype_t)
-+               charset[6+CHAR_CLASS_SIZE] = char_class (wctype_t)
-+                         ...
-+               charset[l+5]  = char_class (wctype_t)
-+
-+               charset[l+6]  = collating_symbol (wchar_t)
-+                            ...
-+               charset[l+m+5]  = collating_symbol (wchar_t)
-+					ifdef _LIBC we use the index if
-+					_NL_COLLATE_SYMB_EXTRAMB instead of
-+					wchar_t string.
-+
-+               charset[l+m+6]  = equivalence_classes (wchar_t)
-+                              ...
-+               charset[l+m+n+5]  = equivalence_classes (wchar_t)
-+					ifdef _LIBC we use the index in
-+					_NL_COLLATE_WEIGHT instead of
-+					wchar_t string.
-+
-+	       charset[l+m+n+6] = range_start
-+	       charset[l+m+n+7] = range_end
-+	                       ...
-+	       charset[l+m+n+2o+4] = range_start
-+	       charset[l+m+n+2o+5] = range_end
-+					ifdef _LIBC we use the value looked up
-+					in _NL_COLLATE_COLLSEQ instead of
-+					wchar_t character.
-+
-+	       charset[l+m+n+2o+6] = char
-+	                          ...
-+	       charset[l+m+n+2o+p+5] = char
-+
-+	     */
-+
-+	    /* We need at least 6 spaces: the opcode, the length of
-+               char_classes, the length of collating_symbols, the length of
-+               equivalence_classes, the length of char_ranges, the length of
-+               chars.  */
-+	    GET_BUFFER_SPACE (6);
-+
-+	    /* Save b as laststart. And We use laststart as the pointer
-+	       to the first element of the charset here.
-+	       In other words, laststart[i] indicates charset[i].  */
-+            laststart = b;
-+
-+            /* We test `*p == '^' twice, instead of using an if
-+               statement, so we only need one BUF_PUSH.  */
-+            BUF_PUSH (*p == '^' ? charset_not : charset);
-+            if (*p == '^')
-+              p++;
-+
-+            /* Push the length of char_classes, the length of
-+               collating_symbols, the length of equivalence_classes, the
-+               length of char_ranges and the length of chars.  */
-+            BUF_PUSH_3 (0, 0, 0);
-+            BUF_PUSH_2 (0, 0);
-+
-+            /* Remember the first position in the bracket expression.  */
-+            p1 = p;
-+
-+            /* charset_not matches newline according to a syntax bit.  */
-+            if ((re_opcode_t) b[-6] == charset_not
-+                && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
-+	      {
-+		BUF_PUSH('\n');
-+		laststart[5]++; /* Update the length of characters  */
-+	      }
-+
-+            /* Read in characters and ranges, setting map bits.  */
-+            for (;;)
-+              {
-+                if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+                PATFETCH (c);
-+
-+                /* \ might escape characters inside [...] and [^...].  */
-+                if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
-+                  {
-+                    if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
-+
-+                    PATFETCH (c1);
-+		    BUF_PUSH(c1);
-+		    laststart[5]++; /* Update the length of chars  */
-+		    range_start = c1;
-+                    continue;
-+                  }
-+
-+                /* Could be the end of the bracket expression.  If it's
-+                   not (i.e., when the bracket expression is `[]' so
-+                   far), the ']' character bit gets set way below.  */
-+                if (c == ']' && p != p1 + 1)
-+                  break;
-+
-+                /* Look ahead to see if it's a range when the last thing
-+                   was a character class.  */
-+                if (had_char_class && c == '-' && *p != ']')
-+                  FREE_STACK_RETURN (REG_ERANGE);
-+
-+                /* Look ahead to see if it's a range when the last thing
-+                   was a character: if this is a hyphen not at the
-+                   beginning or the end of a list, then it's the range
-+                   operator.  */
-+                if (c == '-'
-+                    && !(p - 2 >= pattern && p[-2] == '[')
-+                    && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
-+                    && *p != ']')
-+                  {
-+                    reg_errcode_t ret;
-+		    /* Allocate the space for range_start and range_end.  */
-+		    GET_BUFFER_SPACE (2);
-+		    /* Update the pointer to indicate end of buffer.  */
-+                    b += 2;
-+                    ret = wcs_compile_range (range_start, &p, pend, translate,
-+                                         syntax, b, laststart);
-+                    if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
-+                    range_start = 0xffffffff;
-+                  }
-+                else if (p[0] == '-' && p[1] != ']')
-+                  { /* This handles ranges made up of characters only.  */
-+                    reg_errcode_t ret;
-+
-+		    /* Move past the `-'.  */
-+                    PATFETCH (c1);
-+		    /* Allocate the space for range_start and range_end.  */
-+		    GET_BUFFER_SPACE (2);
-+		    /* Update the pointer to indicate end of buffer.  */
-+                    b += 2;
-+                    ret = wcs_compile_range (c, &p, pend, translate, syntax, b,
-+                                         laststart);
-+                    if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
-+		    range_start = 0xffffffff;
-+                  }
-+
-+                /* See if we're at the beginning of a possible character
-+                   class.  */
-+                else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
-+                  { /* Leave room for the null.  */
-+                    char str[CHAR_CLASS_MAX_LENGTH + 1];
-+
-+                    PATFETCH (c);
-+                    c1 = 0;
-+
-+                    /* If pattern is `[[:'.  */
-+                    if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+                    for (;;)
-+                      {
-+                        PATFETCH (c);
-+                        if ((c == ':' && *p == ']') || p == pend)
-+                          break;
-+			if (c1 < CHAR_CLASS_MAX_LENGTH)
-+			  str[c1++] = c;
-+			else
-+			  /* This is in any case an invalid class name.  */
-+			  str[0] = '\0';
-+                      }
-+                    str[c1] = '\0';
-+
-+                    /* If isn't a word bracketed by `[:' and `:]':
-+                       undo the ending character, the letters, and leave
-+                       the leading `:' and `[' (but store them as character).  */
-+                    if (c == ':' && *p == ']')
-+                      {
-+			wctype_t wt;
-+			uintptr_t alignedp;
-+
-+			/* Query the character class as wctype_t.  */
-+			wt = IS_CHAR_CLASS (str);
-+			if (wt == 0)
-+			  FREE_STACK_RETURN (REG_ECTYPE);
-+
-+                        /* Throw away the ] at the end of the character
-+                           class.  */
-+                        PATFETCH (c);
-+
-+                        if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+			/* Allocate the space for character class.  */
-+                        GET_BUFFER_SPACE(CHAR_CLASS_SIZE);
-+			/* Update the pointer to indicate end of buffer.  */
-+                        b += CHAR_CLASS_SIZE;
-+			/* Move data which follow character classes
-+			    not to violate the data.  */
-+                        insert_space(CHAR_CLASS_SIZE,
-+				     laststart + 6 + laststart[1],
-+				     b - 1);
-+			alignedp = ((uintptr_t)(laststart + 6 + laststart[1])
-+				    + __alignof__(wctype_t) - 1)
-+			  	    & ~(uintptr_t)(__alignof__(wctype_t) - 1);
-+			/* Store the character class.  */
-+                        *((wctype_t*)alignedp) = wt;
-+                        /* Update length of char_classes */
-+                        laststart[1] += CHAR_CLASS_SIZE;
-+
-+                        had_char_class = true;
-+                      }
-+                    else
-+                      {
-+                        c1++;
-+                        while (c1--)
-+                          PATUNFETCH;
-+                        BUF_PUSH ('[');
-+                        BUF_PUSH (':');
-+                        laststart[5] += 2; /* Update the length of characters  */
-+			range_start = ':';
-+                        had_char_class = false;
-+                      }
-+                  }
-+                else if (syntax & RE_CHAR_CLASSES && c == '[' && (*p == '='
-+							  || *p == '.'))
-+		  {
-+		    CHAR_T str[128];	/* Should be large enough.  */
-+		    CHAR_T delim = *p; /* '=' or '.'  */
-+# ifdef _LIBC
-+		    uint32_t nrules =
-+		      _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
-+# endif
-+		    PATFETCH (c);
-+		    c1 = 0;
-+
-+		    /* If pattern is `[[=' or '[[.'.  */
-+		    if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+		    for (;;)
-+		      {
-+			PATFETCH (c);
-+			if ((c == delim && *p == ']') || p == pend)
-+			  break;
-+			if (c1 < sizeof (str) - 1)
-+			  str[c1++] = c;
-+			else
-+			  /* This is in any case an invalid class name.  */
-+			  str[0] = '\0';
-+                      }
-+		    str[c1] = '\0';
-+
-+		    if (c == delim && *p == ']' && str[0] != '\0')
-+		      {
-+                        unsigned int i, offset;
-+			/* If we have no collation data we use the default
-+			   collation in which each character is in a class
-+			   by itself.  It also means that ASCII is the
-+			   character set and therefore we cannot have character
-+			   with more than one byte in the multibyte
-+			   representation.  */
-+
-+                        /* If not defined _LIBC, we push the name and
-+			   `\0' for the sake of matching performance.  */
-+			int datasize = c1 + 1;
-+
-+# ifdef _LIBC
-+			int32_t idx = 0;
-+			if (nrules == 0)
-+# endif
-+			  {
-+			    if (c1 != 1)
-+			      FREE_STACK_RETURN (REG_ECOLLATE);
-+			  }
-+# ifdef _LIBC
-+			else
-+			  {
-+			    const int32_t *table;
-+			    const int32_t *weights;
-+			    const int32_t *extra;
-+			    const int32_t *indirect;
-+			    wint_t *cp;
-+
-+			    if(delim == '=')
-+			      {
-+				/* We push the index for equivalence class.  */
-+				cp = (wint_t*)str;
-+
-+				table = (const int32_t *)
-+				  _NL_CURRENT (LC_COLLATE,
-+					       _NL_COLLATE_TABLEWC);
-+				weights = (const int32_t *)
-+				  _NL_CURRENT (LC_COLLATE,
-+					       _NL_COLLATE_WEIGHTWC);
-+				extra = (const wint_t *)
-+				  _NL_CURRENT (LC_COLLATE,
-+					       _NL_COLLATE_EXTRAWC);
-+				indirect = (const int32_t *)
-+				  _NL_CURRENT (LC_COLLATE,
-+					       _NL_COLLATE_INDIRECTWC);
-+
-+				idx = FINDIDX (table, indirect, extra, &cp, 1);
-+				if (idx == 0 || cp < (wint_t*) str + c1)
-+				  /* This is no valid character.  */
-+				  FREE_STACK_RETURN (REG_ECOLLATE);
-+
-+				str[0] = (wchar_t)idx;
-+			      }
-+			    else /* delim == '.' */
-+			      {
-+				/* We push collation sequence value
-+				   for collating symbol.  */
-+				int32_t table_size;
-+				const int32_t *symb_table;
-+				const unsigned char *extra;
-+				int32_t idx;
-+				int32_t elem;
-+				int32_t second;
-+				int32_t hash;
-+				char char_str[c1];
-+
-+				/* We have to convert the name to a single-byte
-+				   string.  This is possible since the names
-+				   consist of ASCII characters and the internal
-+				   representation is UCS4.  */
-+				for (i = 0; i < c1; ++i)
-+				  char_str[i] = str[i];
-+
-+				table_size =
-+				  _NL_CURRENT_WORD (LC_COLLATE,
-+						    _NL_COLLATE_SYMB_HASH_SIZEMB);
-+				symb_table = (const int32_t *)
-+				  _NL_CURRENT (LC_COLLATE,
-+					       _NL_COLLATE_SYMB_TABLEMB);
-+				extra = (const unsigned char *)
-+				  _NL_CURRENT (LC_COLLATE,
-+					       _NL_COLLATE_SYMB_EXTRAMB);
-+
-+				/* Locate the character in the hashing table.  */
-+				hash = elem_hash (char_str, c1);
-+
-+				idx = 0;
-+				elem = hash % table_size;
-+				second = hash % (table_size - 2);
-+				while (symb_table[2 * elem] != 0)
-+				  {
-+				    /* First compare the hashing value.  */
-+				    if (symb_table[2 * elem] == hash
-+					&& c1 == extra[symb_table[2 * elem + 1]]
-+					&& memcmp (char_str,
-+						   &extra[symb_table[2 * elem + 1]
-+							 + 1], c1) == 0)
-+				      {
-+					/* Yep, this is the entry.  */
-+					idx = symb_table[2 * elem + 1];
-+					idx += 1 + extra[idx];
-+					break;
-+				      }
-+
-+				    /* Next entry.  */
-+				    elem += second;
-+				  }
-+
-+				if (symb_table[2 * elem] != 0)
-+				  {
-+				    /* Compute the index of the byte sequence
-+				       in the table.  */
-+				    idx += 1 + extra[idx];
-+				    /* Adjust for the alignment.  */
-+				    idx = (idx + 3) & ~3;
-+
-+				    str[0] = (wchar_t) idx + 4;
-+				  }
-+				else if (symb_table[2 * elem] == 0 && c1 == 1)
-+				  {
-+				    /* No valid character.  Match it as a
-+				       single byte character.  */
-+				    had_char_class = false;
-+				    BUF_PUSH(str[0]);
-+				    /* Update the length of characters  */
-+				    laststart[5]++;
-+				    range_start = str[0];
-+
-+				    /* Throw away the ] at the end of the
-+				       collating symbol.  */
-+				    PATFETCH (c);
-+				    /* exit from the switch block.  */
-+				    continue;
-+				  }
-+				else
-+				  FREE_STACK_RETURN (REG_ECOLLATE);
-+			      }
-+			    datasize = 1;
-+			  }
-+# endif
-+                        /* Throw away the ] at the end of the equivalence
-+                           class (or collating symbol).  */
-+                        PATFETCH (c);
-+
-+			/* Allocate the space for the equivalence class
-+			   (or collating symbol) (and '\0' if needed).  */
-+                        GET_BUFFER_SPACE(datasize);
-+			/* Update the pointer to indicate end of buffer.  */
-+                        b += datasize;
-+
-+			if (delim == '=')
-+			  { /* equivalence class  */
-+			    /* Calculate the offset of char_ranges,
-+			       which is next to equivalence_classes.  */
-+			    offset = laststart[1] + laststart[2]
-+			      + laststart[3] +6;
-+			    /* Insert space.  */
-+			    insert_space(datasize, laststart + offset, b - 1);
-+
-+			    /* Write the equivalence_class and \0.  */
-+			    for (i = 0 ; i < datasize ; i++)
-+			      laststart[offset + i] = str[i];
-+
-+			    /* Update the length of equivalence_classes.  */
-+			    laststart[3] += datasize;
-+			    had_char_class = true;
-+			  }
-+			else /* delim == '.' */
-+			  { /* collating symbol  */
-+			    /* Calculate the offset of the equivalence_classes,
-+			       which is next to collating_symbols.  */
-+			    offset = laststart[1] + laststart[2] + 6;
-+			    /* Insert space and write the collationg_symbol
-+			       and \0.  */
-+			    insert_space(datasize, laststart + offset, b-1);
-+			    for (i = 0 ; i < datasize ; i++)
-+			      laststart[offset + i] = str[i];
-+
-+			    /* In re_match_2_internal if range_start < -1, we
-+			       assume -range_start is the offset of the
-+			       collating symbol which is specified as
-+			       the character of the range start.  So we assign
-+			       -(laststart[1] + laststart[2] + 6) to
-+			       range_start.  */
-+			    range_start = -(laststart[1] + laststart[2] + 6);
-+			    /* Update the length of collating_symbol.  */
-+			    laststart[2] += datasize;
-+			    had_char_class = false;
-+			  }
-+		      }
-+                    else
-+                      {
-+                        c1++;
-+                        while (c1--)
-+                          PATUNFETCH;
-+                        BUF_PUSH ('[');
-+                        BUF_PUSH (delim);
-+                        laststart[5] += 2; /* Update the length of characters  */
-+			range_start = delim;
-+                        had_char_class = false;
-+                      }
-+		  }
-+                else
-+                  {
-+                    had_char_class = false;
-+		    BUF_PUSH(c);
-+		    laststart[5]++;  /* Update the length of characters  */
-+		    range_start = c;
-+                  }
-+	      }
-+
-+#else /* BYTE */
-+            /* Ensure that we have enough space to push a charset: the
-+               opcode, the length count, and the bitset; 34 bytes in all.  */
-+	    GET_BUFFER_SPACE (34);
-+
-+            laststart = b;
-+
-+            /* We test `*p == '^' twice, instead of using an if
-+               statement, so we only need one BUF_PUSH.  */
-+            BUF_PUSH (*p == '^' ? charset_not : charset);
-+            if (*p == '^')
-+              p++;
-+
-+            /* Remember the first position in the bracket expression.  */
-+            p1 = p;
-+
-+            /* Push the number of bytes in the bitmap.  */
-+            BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
-+
-+            /* Clear the whole map.  */
-+            bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH);
-+
-+            /* charset_not matches newline according to a syntax bit.  */
-+            if ((re_opcode_t) b[-2] == charset_not
-+                && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
-+              SET_LIST_BIT ('\n');
-+
-+            /* Read in characters and ranges, setting map bits.  */
-+            for (;;)
-+              {
-+                if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+                PATFETCH (c);
-+
-+                /* \ might escape characters inside [...] and [^...].  */
-+                if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
-+                  {
-+                    if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
-+
-+                    PATFETCH (c1);
-+                    SET_LIST_BIT (c1);
-+		    range_start = c1;
-+                    continue;
-+                  }
-+
-+                /* Could be the end of the bracket expression.  If it's
-+                   not (i.e., when the bracket expression is `[]' so
-+                   far), the ']' character bit gets set way below.  */
-+                if (c == ']' && p != p1 + 1)
-+                  break;
-+
-+                /* Look ahead to see if it's a range when the last thing
-+                   was a character class.  */
-+                if (had_char_class && c == '-' && *p != ']')
-+                  FREE_STACK_RETURN (REG_ERANGE);
-+
-+                /* Look ahead to see if it's a range when the last thing
-+                   was a character: if this is a hyphen not at the
-+                   beginning or the end of a list, then it's the range
-+                   operator.  */
-+                if (c == '-'
-+                    && !(p - 2 >= pattern && p[-2] == '[')
-+                    && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
-+                    && *p != ']')
-+                  {
-+                    reg_errcode_t ret
-+                      = byte_compile_range (range_start, &p, pend, translate,
-+					    syntax, b);
-+                    if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
-+		    range_start = 0xffffffff;
-+                  }
-+
-+                else if (p[0] == '-' && p[1] != ']')
-+                  { /* This handles ranges made up of characters only.  */
-+                    reg_errcode_t ret;
-+
-+		    /* Move past the `-'.  */
-+                    PATFETCH (c1);
-+
-+                    ret = byte_compile_range (c, &p, pend, translate, syntax, b);
-+                    if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
-+		    range_start = 0xffffffff;
-+                  }
-+
-+                /* See if we're at the beginning of a possible character
-+                   class.  */
-+
-+                else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
-+                  { /* Leave room for the null.  */
-+                    char str[CHAR_CLASS_MAX_LENGTH + 1];
-+
-+                    PATFETCH (c);
-+                    c1 = 0;
-+
-+                    /* If pattern is `[[:'.  */
-+                    if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+                    for (;;)
-+                      {
-+                        PATFETCH (c);
-+                        if ((c == ':' && *p == ']') || p == pend)
-+                          break;
-+			if (((int) c1) < CHAR_CLASS_MAX_LENGTH)
-+			  str[c1++] = c;
-+			else
-+			  /* This is in any case an invalid class name.  */
-+			  str[0] = '\0';
-+                      }
-+                    str[c1] = '\0';
-+
-+                    /* If isn't a word bracketed by `[:' and `:]':
-+                       undo the ending character, the letters, and leave
-+                       the leading `:' and `[' (but set bits for them).  */
-+                    if (c == ':' && *p == ']')
-+                      {
-+# if WIDE_CHAR_SUPPORT
-+                        boolean is_lower = STREQ (str, "lower");
-+                        boolean is_upper = STREQ (str, "upper");
-+			wctype_t wt;
-+                        int ch;
-+
-+			wt = IS_CHAR_CLASS (str);
-+			if (wt == 0)
-+			  FREE_STACK_RETURN (REG_ECTYPE);
-+
-+                        /* Throw away the ] at the end of the character
-+                           class.  */
-+                        PATFETCH (c);
-+
-+                        if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+                        for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
-+			  {
-+#  ifdef _LIBC
-+			    if (__iswctype (__btowc (ch), wt))
-+			      SET_LIST_BIT (ch);
-+#  else
-+			    if (iswctype (btowc (ch), wt))
-+			      SET_LIST_BIT (ch);
-+#  endif
-+
-+			    if (translate && (is_upper || is_lower)
-+				&& (ISUPPER (ch) || ISLOWER (ch)))
-+			      SET_LIST_BIT (ch);
-+			  }
-+
-+                        had_char_class = true;
-+# else
-+                        int ch;
-+                        boolean is_alnum = STREQ (str, "alnum");
-+                        boolean is_alpha = STREQ (str, "alpha");
-+                        boolean is_blank = STREQ (str, "blank");
-+                        boolean is_cntrl = STREQ (str, "cntrl");
-+                        boolean is_digit = STREQ (str, "digit");
-+                        boolean is_graph = STREQ (str, "graph");
-+                        boolean is_lower = STREQ (str, "lower");
-+                        boolean is_print = STREQ (str, "print");
-+                        boolean is_punct = STREQ (str, "punct");
-+                        boolean is_space = STREQ (str, "space");
-+                        boolean is_upper = STREQ (str, "upper");
-+                        boolean is_xdigit = STREQ (str, "xdigit");
-+
-+                        if (!IS_CHAR_CLASS (str))
-+			  FREE_STACK_RETURN (REG_ECTYPE);
-+
-+                        /* Throw away the ] at the end of the character
-+                           class.  */
-+                        PATFETCH (c);
-+
-+                        if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+                        for (ch = 0; ch < 1 << BYTEWIDTH; ch++)
-+                          {
-+			    /* This was split into 3 if's to
-+			       avoid an arbitrary limit in some compiler.  */
-+                            if (   (is_alnum  && ISALNUM (ch))
-+                                || (is_alpha  && ISALPHA (ch))
-+                                || (is_blank  && ISBLANK (ch))
-+                                || (is_cntrl  && ISCNTRL (ch)))
-+			      SET_LIST_BIT (ch);
-+			    if (   (is_digit  && ISDIGIT (ch))
-+                                || (is_graph  && ISGRAPH (ch))
-+                                || (is_lower  && ISLOWER (ch))
-+                                || (is_print  && ISPRINT (ch)))
-+			      SET_LIST_BIT (ch);
-+			    if (   (is_punct  && ISPUNCT (ch))
-+                                || (is_space  && ISSPACE (ch))
-+                                || (is_upper  && ISUPPER (ch))
-+                                || (is_xdigit && ISXDIGIT (ch)))
-+			      SET_LIST_BIT (ch);
-+			    if (   translate && (is_upper || is_lower)
-+				&& (ISUPPER (ch) || ISLOWER (ch)))
-+			      SET_LIST_BIT (ch);
-+                          }
-+                        had_char_class = true;
-+# endif	/* libc || wctype.h */
-+                      }
-+                    else
-+                      {
-+                        c1++;
-+                        while (c1--)
-+                          PATUNFETCH;
-+                        SET_LIST_BIT ('[');
-+                        SET_LIST_BIT (':');
-+			range_start = ':';
-+                        had_char_class = false;
-+                      }
-+                  }
-+                else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == '=')
-+		  {
-+		    unsigned char str[MB_LEN_MAX + 1];
-+# ifdef _LIBC
-+		    uint32_t nrules =
-+		      _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
-+# endif
-+
-+		    PATFETCH (c);
-+		    c1 = 0;
-+
-+		    /* If pattern is `[[='.  */
-+		    if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+		    for (;;)
-+		      {
-+			PATFETCH (c);
-+			if ((c == '=' && *p == ']') || p == pend)
-+			  break;
-+			if (c1 < MB_LEN_MAX)
-+			  str[c1++] = c;
-+			else
-+			  /* This is in any case an invalid class name.  */
-+			  str[0] = '\0';
-+                      }
-+		    str[c1] = '\0';
-+
-+		    if (c == '=' && *p == ']' && str[0] != '\0')
-+		      {
-+			/* If we have no collation data we use the default
-+			   collation in which each character is in a class
-+			   by itself.  It also means that ASCII is the
-+			   character set and therefore we cannot have character
-+			   with more than one byte in the multibyte
-+			   representation.  */
-+# ifdef _LIBC
-+			if (nrules == 0)
-+# endif
-+			  {
-+			    if (c1 != 1)
-+			      FREE_STACK_RETURN (REG_ECOLLATE);
-+
-+			    /* Throw away the ] at the end of the equivalence
-+			       class.  */
-+			    PATFETCH (c);
-+
-+			    /* Set the bit for the character.  */
-+			    SET_LIST_BIT (str[0]);
-+			  }
-+# ifdef _LIBC
-+			else
-+			  {
-+			    /* Try to match the byte sequence in `str' against
-+			       those known to the collate implementation.
-+			       First find out whether the bytes in `str' are
-+			       actually from exactly one character.  */
-+			    const int32_t *table;
-+			    const unsigned char *weights;
-+			    const unsigned char *extra;
-+			    const int32_t *indirect;
-+			    int32_t idx;
-+			    const unsigned char *cp = str;
-+			    int ch;
-+
-+			    table = (const int32_t *)
-+			      _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
-+			    weights = (const unsigned char *)
-+			      _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB);
-+			    extra = (const unsigned char *)
-+			      _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
-+			    indirect = (const int32_t *)
-+			      _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
-+			    idx = FINDIDX (table, indirect, extra, &cp, 1);
-+			    if (idx == 0 || cp < str + c1)
-+			      /* This is no valid character.  */
-+			      FREE_STACK_RETURN (REG_ECOLLATE);
-+
-+			    /* Throw away the ] at the end of the equivalence
-+			       class.  */
-+			    PATFETCH (c);
-+
-+			    /* Now we have to go throught the whole table
-+			       and find all characters which have the same
-+			       first level weight.
-+
-+			       XXX Note that this is not entirely correct.
-+			       we would have to match multibyte sequences
-+			       but this is not possible with the current
-+			       implementation.  */
-+			    for (ch = 1; ch < 256; ++ch)
-+			      /* XXX This test would have to be changed if we
-+				 would allow matching multibyte sequences.  */
-+			      if (table[ch] > 0)
-+				{
-+				  int32_t idx2 = table[ch];
-+				  size_t len = weights[idx2];
-+
-+				  /* Test whether the lenghts match.  */
-+				  if (weights[idx] == len)
-+				    {
-+				      /* They do.  New compare the bytes of
-+					 the weight.  */
-+				      size_t cnt = 0;
-+
-+				      while (cnt < len
-+					     && (weights[idx + 1 + cnt]
-+						 == weights[idx2 + 1 + cnt]))
-+					++cnt;
-+
-+				      if (cnt == len)
-+					/* They match.  Mark the character as
-+					   acceptable.  */
-+					SET_LIST_BIT (ch);
-+				    }
-+				}
-+			  }
-+# endif
-+			had_char_class = true;
-+		      }
-+                    else
-+                      {
-+                        c1++;
-+                        while (c1--)
-+                          PATUNFETCH;
-+                        SET_LIST_BIT ('[');
-+                        SET_LIST_BIT ('=');
-+			range_start = '=';
-+                        had_char_class = false;
-+                      }
-+		  }
-+                else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == '.')
-+		  {
-+		    unsigned char str[128];	/* Should be large enough.  */
-+# ifdef _LIBC
-+		    uint32_t nrules =
-+		      _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
-+# endif
-+
-+		    PATFETCH (c);
-+		    c1 = 0;
-+
-+		    /* If pattern is `[[.'.  */
-+		    if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
-+
-+		    for (;;)
-+		      {
-+			PATFETCH (c);
-+			if ((c == '.' && *p == ']') || p == pend)
-+			  break;
-+			if (c1 < sizeof (str))
-+			  str[c1++] = c;
-+			else
-+			  /* This is in any case an invalid class name.  */
-+			  str[0] = '\0';
-+                      }
-+		    str[c1] = '\0';
-+
-+		    if (c == '.' && *p == ']' && str[0] != '\0')
-+		      {
-+			/* If we have no collation data we use the default
-+			   collation in which each character is the name
-+			   for its own class which contains only the one
-+			   character.  It also means that ASCII is the
-+			   character set and therefore we cannot have character
-+			   with more than one byte in the multibyte
-+			   representation.  */
-+# ifdef _LIBC
-+			if (nrules == 0)
-+# endif
-+			  {
-+			    if (c1 != 1)
-+			      FREE_STACK_RETURN (REG_ECOLLATE);
-+
-+			    /* Throw away the ] at the end of the equivalence
-+			       class.  */
-+			    PATFETCH (c);
-+
-+			    /* Set the bit for the character.  */
-+			    SET_LIST_BIT (str[0]);
-+			    range_start = ((const unsigned char *) str)[0];
-+			  }
-+# ifdef _LIBC
-+			else
-+			  {
-+			    /* Try to match the byte sequence in `str' against
-+			       those known to the collate implementation.
-+			       First find out whether the bytes in `str' are
-+			       actually from exactly one character.  */
-+			    int32_t table_size;
-+			    const int32_t *symb_table;
-+			    const unsigned char *extra;
-+			    int32_t idx;
-+			    int32_t elem;
-+			    int32_t second;
-+			    int32_t hash;
-+
-+			    table_size =
-+			      _NL_CURRENT_WORD (LC_COLLATE,
-+						_NL_COLLATE_SYMB_HASH_SIZEMB);
-+			    symb_table = (const int32_t *)
-+			      _NL_CURRENT (LC_COLLATE,
-+					   _NL_COLLATE_SYMB_TABLEMB);
-+			    extra = (const unsigned char *)
-+			      _NL_CURRENT (LC_COLLATE,
-+					   _NL_COLLATE_SYMB_EXTRAMB);
-+
-+			    /* Locate the character in the hashing table.  */
-+			    hash = elem_hash ((const char *) str, c1);
-+
-+			    idx = 0;
-+			    elem = hash % table_size;
-+			    second = hash % (table_size - 2);
-+			    while (symb_table[2 * elem] != 0)
-+			      {
-+				/* First compare the hashing value.  */
-+				if (symb_table[2 * elem] == hash
-+				    && c1 == extra[symb_table[2 * elem + 1]]
-+				    && memcmp (str,
-+					       &extra[symb_table[2 * elem + 1]
-+						     + 1],
-+					       c1) == 0)
-+				  {
-+				    /* Yep, this is the entry.  */
-+				    idx = symb_table[2 * elem + 1];
-+				    idx += 1 + extra[idx];
-+				    break;
-+				  }
-+
-+				/* Next entry.  */
-+				elem += second;
-+			      }
-+
-+			    if (symb_table[2 * elem] == 0)
-+			      /* This is no valid character.  */
-+			      FREE_STACK_RETURN (REG_ECOLLATE);
-+
-+			    /* Throw away the ] at the end of the equivalence
-+			       class.  */
-+			    PATFETCH (c);
-+
-+			    /* Now add the multibyte character(s) we found
-+			       to the accept list.
-+
-+			       XXX Note that this is not entirely correct.
-+			       we would have to match multibyte sequences
-+			       but this is not possible with the current
-+			       implementation.  Also, we have to match
-+			       collating symbols, which expand to more than
-+			       one file, as a whole and not allow the
-+			       individual bytes.  */
-+			    c1 = extra[idx++];
-+			    if (c1 == 1)
-+			      range_start = extra[idx];
-+			    while (c1-- > 0)
-+			      {
-+				SET_LIST_BIT (extra[idx]);
-+				++idx;
-+			      }
-+			  }
-+# endif
-+			had_char_class = false;
-+		      }
-+                    else
-+                      {
-+                        c1++;
-+                        while (c1--)
-+                          PATUNFETCH;
-+                        SET_LIST_BIT ('[');
-+                        SET_LIST_BIT ('.');
-+			range_start = '.';
-+                        had_char_class = false;
-+                      }
-+		  }
-+                else
-+                  {
-+                    had_char_class = false;
-+                    SET_LIST_BIT (c);
-+		    range_start = c;
-+                  }
-+              }
-+
-+            /* Discard any (non)matching list bytes that are all 0 at the
-+               end of the map.  Decrease the map-length byte too.  */
-+            while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
-+              b[-1]--;
-+            b += b[-1];
-+#endif /* WCHAR */
-+          }
-+          break;
-+
-+
-+	case '(':
-+          if (syntax & RE_NO_BK_PARENS)
-+            goto handle_open;
-+          else
-+            goto normal_char;
-+
-+
-+        case ')':
-+          if (syntax & RE_NO_BK_PARENS)
-+            goto handle_close;
-+          else
-+            goto normal_char;
-+
-+
-+        case '\n':
-+          if (syntax & RE_NEWLINE_ALT)
-+            goto handle_alt;
-+          else
-+            goto normal_char;
-+
-+
-+	case '|':
-+          if (syntax & RE_NO_BK_VBAR)
-+            goto handle_alt;
-+          else
-+            goto normal_char;
-+
-+
-+        case '{':
-+           if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES)
-+             goto handle_interval;
-+           else
-+             goto normal_char;
-+
-+
-+        case '\\':
-+          if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
-+
-+          /* Do not translate the character after the \, so that we can
-+             distinguish, e.g., \B from \b, even if we normally would
-+             translate, e.g., B to b.  */
-+          PATFETCH_RAW (c);
-+
-+          switch (c)
-+            {
-+            case '(':
-+              if (syntax & RE_NO_BK_PARENS)
-+                goto normal_backslash;
-+
-+            handle_open:
-+              bufp->re_nsub++;
-+              regnum++;
-+
-+              if (COMPILE_STACK_FULL)
-+                {
-+                  RETALLOC (compile_stack.stack, compile_stack.size << 1,
-+                            compile_stack_elt_t);
-+                  if (compile_stack.stack == NULL) return REG_ESPACE;
-+
-+                  compile_stack.size <<= 1;
-+                }
-+
-+              /* These are the values to restore when we hit end of this
-+                 group.  They are all relative offsets, so that if the
-+                 whole pattern moves because of realloc, they will still
-+                 be valid.  */
-+              COMPILE_STACK_TOP.begalt_offset = begalt - COMPILED_BUFFER_VAR;
-+              COMPILE_STACK_TOP.fixup_alt_jump
-+                = fixup_alt_jump ? fixup_alt_jump - COMPILED_BUFFER_VAR + 1 : 0;
-+              COMPILE_STACK_TOP.laststart_offset = b - COMPILED_BUFFER_VAR;
-+              COMPILE_STACK_TOP.regnum = regnum;
-+
-+              /* We will eventually replace the 0 with the number of
-+                 groups inner to this one.  But do not push a
-+                 start_memory for groups beyond the last one we can
-+                 represent in the compiled pattern.  */
-+              if (regnum <= MAX_REGNUM)
-+                {
-+                  COMPILE_STACK_TOP.inner_group_offset = b
-+		    - COMPILED_BUFFER_VAR + 2;
-+                  BUF_PUSH_3 (start_memory, regnum, 0);
-+                }
-+
-+              compile_stack.avail++;
-+
-+              fixup_alt_jump = 0;
-+              laststart = 0;
-+              begalt = b;
-+	      /* If we've reached MAX_REGNUM groups, then this open
-+		 won't actually generate any code, so we'll have to
-+		 clear pending_exact explicitly.  */
-+	      pending_exact = 0;
-+              break;
-+
-+
-+            case ')':
-+              if (syntax & RE_NO_BK_PARENS) goto normal_backslash;
-+
-+              if (COMPILE_STACK_EMPTY)
-+		{
-+		  if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
-+		    goto normal_backslash;
-+		  else
-+		    FREE_STACK_RETURN (REG_ERPAREN);
-+		}
-+
-+            handle_close:
-+              if (fixup_alt_jump)
-+                { /* Push a dummy failure point at the end of the
-+                     alternative for a possible future
-+                     `pop_failure_jump' to pop.  See comments at
-+                     `push_dummy_failure' in `re_match_2'.  */
-+                  BUF_PUSH (push_dummy_failure);
-+
-+                  /* We allocated space for this jump when we assigned
-+                     to `fixup_alt_jump', in the `handle_alt' case below.  */
-+                  STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1);
-+                }
-+
-+              /* See similar code for backslashed left paren above.  */
-+              if (COMPILE_STACK_EMPTY)
-+		{
-+		  if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
-+		    goto normal_char;
-+		  else
-+		    FREE_STACK_RETURN (REG_ERPAREN);
-+		}
-+
-+              /* Since we just checked for an empty stack above, this
-+                 ``can't happen''.  */
-+              assert (compile_stack.avail != 0);
-+              {
-+                /* We don't just want to restore into `regnum', because
-+                   later groups should continue to be numbered higher,
-+                   as in `(ab)c(de)' -- the second group is #2.  */
-+                regnum_t this_group_regnum;
-+
-+                compile_stack.avail--;
-+                begalt = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.begalt_offset;
-+                fixup_alt_jump
-+                  = COMPILE_STACK_TOP.fixup_alt_jump
-+                    ? COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.fixup_alt_jump - 1
-+                    : 0;
-+                laststart = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.laststart_offset;
-+                this_group_regnum = COMPILE_STACK_TOP.regnum;
-+		/* If we've reached MAX_REGNUM groups, then this open
-+		   won't actually generate any code, so we'll have to
-+		   clear pending_exact explicitly.  */
-+		pending_exact = 0;
-+
-+                /* We're at the end of the group, so now we know how many
-+                   groups were inside this one.  */
-+                if (this_group_regnum <= MAX_REGNUM)
-+                  {
-+		    UCHAR_T *inner_group_loc
-+                      = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.inner_group_offset;
-+
-+                    *inner_group_loc = regnum - this_group_regnum;
-+                    BUF_PUSH_3 (stop_memory, this_group_regnum,
-+                                regnum - this_group_regnum);
-+                  }
-+              }
-+              break;
-+
-+
-+            case '|':					/* `\|'.  */
-+              if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR)
-+                goto normal_backslash;
-+            handle_alt:
-+              if (syntax & RE_LIMITED_OPS)
-+                goto normal_char;
-+
-+              /* Insert before the previous alternative a jump which
-+                 jumps to this alternative if the former fails.  */
-+              GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
-+              INSERT_JUMP (on_failure_jump, begalt,
-+			   b + 2 + 2 * OFFSET_ADDRESS_SIZE);
-+              pending_exact = 0;
-+              b += 1 + OFFSET_ADDRESS_SIZE;
-+
-+              /* The alternative before this one has a jump after it
-+                 which gets executed if it gets matched.  Adjust that
-+                 jump so it will jump to this alternative's analogous
-+                 jump (put in below, which in turn will jump to the next
-+                 (if any) alternative's such jump, etc.).  The last such
-+                 jump jumps to the correct final destination.  A picture:
-+                          _____ _____
-+                          |   | |   |
-+                          |   v |   v
-+                         a | b   | c
-+
-+                 If we are at `b', then fixup_alt_jump right now points to a
-+                 three-byte space after `a'.  We'll put in the jump, set
-+                 fixup_alt_jump to right after `b', and leave behind three
-+                 bytes which we'll fill in when we get to after `c'.  */
-+
-+              if (fixup_alt_jump)
-+                STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
-+
-+              /* Mark and leave space for a jump after this alternative,
-+                 to be filled in later either by next alternative or
-+                 when know we're at the end of a series of alternatives.  */
-+              fixup_alt_jump = b;
-+              GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
-+              b += 1 + OFFSET_ADDRESS_SIZE;
-+
-+              laststart = 0;
-+              begalt = b;
-+              break;
-+
-+
-+            case '{':
-+              /* If \{ is a literal.  */
-+              if (!(syntax & RE_INTERVALS)
-+                     /* If we're at `\{' and it's not the open-interval
-+                        operator.  */
-+		  || (syntax & RE_NO_BK_BRACES))
-+                goto normal_backslash;
-+
-+            handle_interval:
-+              {
-+                /* If got here, then the syntax allows intervals.  */
-+
-+                /* At least (most) this many matches must be made.  */
-+                int lower_bound = -1, upper_bound = -1;
-+
-+		/* Place in the uncompiled pattern (i.e., just after
-+		   the '{') to go back to if the interval is invalid.  */
-+		const CHAR_T *beg_interval = p;
-+
-+                if (p == pend)
-+		  goto invalid_interval;
-+
-+                GET_UNSIGNED_NUMBER (lower_bound);
-+
-+                if (c == ',')
-+                  {
-+                    GET_UNSIGNED_NUMBER (upper_bound);
-+		    if (upper_bound < 0)
-+		      upper_bound = RE_DUP_MAX;
-+                  }
-+                else
-+                  /* Interval such as `{1}' => match exactly once. */
-+                  upper_bound = lower_bound;
-+
-+                if (! (0 <= lower_bound && lower_bound <= upper_bound))
-+		  goto invalid_interval;
-+
-+                if (!(syntax & RE_NO_BK_BRACES))
-+                  {
-+		    if (c != '\\' || p == pend)
-+		      goto invalid_interval;
-+                    PATFETCH (c);
-+                  }
-+
-+                if (c != '}')
-+		  goto invalid_interval;
-+
-+                /* If it's invalid to have no preceding re.  */
-+                if (!laststart)
-+                  {
-+		    if (syntax & RE_CONTEXT_INVALID_OPS
-+			&& !(syntax & RE_INVALID_INTERVAL_ORD))
-+                      FREE_STACK_RETURN (REG_BADRPT);
-+                    else if (syntax & RE_CONTEXT_INDEP_OPS)
-+                      laststart = b;
-+                    else
-+                      goto unfetch_interval;
-+                  }
-+
-+                /* We just parsed a valid interval.  */
-+
-+                if (RE_DUP_MAX < upper_bound)
-+		  FREE_STACK_RETURN (REG_BADBR);
-+
-+                /* If the upper bound is zero, don't want to succeed at
-+                   all; jump from `laststart' to `b + 3', which will be
-+		   the end of the buffer after we insert the jump.  */
-+		/* ifdef WCHAR, 'b + 1 + OFFSET_ADDRESS_SIZE'
-+		   instead of 'b + 3'.  */
-+                 if (upper_bound == 0)
-+                   {
-+                     GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
-+                     INSERT_JUMP (jump, laststart, b + 1
-+				  + OFFSET_ADDRESS_SIZE);
-+                     b += 1 + OFFSET_ADDRESS_SIZE;
-+                   }
-+
-+                 /* Otherwise, we have a nontrivial interval.  When
-+                    we're all done, the pattern will look like:
-+                      set_number_at <jump count> <upper bound>
-+                      set_number_at <succeed_n count> <lower bound>
-+                      succeed_n <after jump addr> <succeed_n count>
-+                      <body of loop>
-+                      jump_n <succeed_n addr> <jump count>
-+                    (The upper bound and `jump_n' are omitted if
-+                    `upper_bound' is 1, though.)  */
-+                 else
-+                   { /* If the upper bound is > 1, we need to insert
-+                        more at the end of the loop.  */
-+                     unsigned nbytes = 2 + 4 * OFFSET_ADDRESS_SIZE +
-+		       (upper_bound > 1) * (2 + 4 * OFFSET_ADDRESS_SIZE);
-+
-+                     GET_BUFFER_SPACE (nbytes);
-+
-+                     /* Initialize lower bound of the `succeed_n', even
-+                        though it will be set during matching by its
-+                        attendant `set_number_at' (inserted next),
-+                        because `re_compile_fastmap' needs to know.
-+                        Jump to the `jump_n' we might insert below.  */
-+                     INSERT_JUMP2 (succeed_n, laststart,
-+                                   b + 1 + 2 * OFFSET_ADDRESS_SIZE
-+				   + (upper_bound > 1) * (1 + 2 * OFFSET_ADDRESS_SIZE)
-+				   , lower_bound);
-+                     b += 1 + 2 * OFFSET_ADDRESS_SIZE;
-+
-+                     /* Code to initialize the lower bound.  Insert
-+                        before the `succeed_n'.  The `5' is the last two
-+                        bytes of this `set_number_at', plus 3 bytes of
-+                        the following `succeed_n'.  */
-+		     /* ifdef WCHAR, The '1+2*OFFSET_ADDRESS_SIZE'
-+			is the 'set_number_at', plus '1+OFFSET_ADDRESS_SIZE'
-+			of the following `succeed_n'.  */
-+                     PREFIX(insert_op2) (set_number_at, laststart, 1
-+				 + 2 * OFFSET_ADDRESS_SIZE, lower_bound, b);
-+                     b += 1 + 2 * OFFSET_ADDRESS_SIZE;
-+
-+                     if (upper_bound > 1)
-+                       { /* More than one repetition is allowed, so
-+                            append a backward jump to the `succeed_n'
-+                            that starts this interval.
-+
-+                            When we've reached this during matching,
-+                            we'll have matched the interval once, so
-+                            jump back only `upper_bound - 1' times.  */
-+                         STORE_JUMP2 (jump_n, b, laststart
-+				      + 2 * OFFSET_ADDRESS_SIZE + 1,
-+                                      upper_bound - 1);
-+                         b += 1 + 2 * OFFSET_ADDRESS_SIZE;
-+
-+                         /* The location we want to set is the second
-+                            parameter of the `jump_n'; that is `b-2' as
-+                            an absolute address.  `laststart' will be
-+                            the `set_number_at' we're about to insert;
-+                            `laststart+3' the number to set, the source
-+                            for the relative address.  But we are
-+                            inserting into the middle of the pattern --
-+                            so everything is getting moved up by 5.
-+                            Conclusion: (b - 2) - (laststart + 3) + 5,
-+                            i.e., b - laststart.
-+
-+                            We insert this at the beginning of the loop
-+                            so that if we fail during matching, we'll
-+                            reinitialize the bounds.  */
-+                         PREFIX(insert_op2) (set_number_at, laststart,
-+					     b - laststart,
-+					     upper_bound - 1, b);
-+                         b += 1 + 2 * OFFSET_ADDRESS_SIZE;
-+                       }
-+                   }
-+                pending_exact = 0;
-+		break;
-+
-+	      invalid_interval:
-+		if (!(syntax & RE_INVALID_INTERVAL_ORD))
-+		  FREE_STACK_RETURN (p == pend ? REG_EBRACE : REG_BADBR);
-+	      unfetch_interval:
-+		/* Match the characters as literals.  */
-+		p = beg_interval;
-+		c = '{';
-+		if (syntax & RE_NO_BK_BRACES)
-+		  goto normal_char;
-+		else
-+		  goto normal_backslash;
-+	      }
-+
-+#ifdef emacs
-+            /* There is no way to specify the before_dot and after_dot
-+               operators.  rms says this is ok.  --karl  */
-+            case '=':
-+              BUF_PUSH (at_dot);
-+              break;
-+
-+            case 's':
-+              laststart = b;
-+              PATFETCH (c);
-+              BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]);
-+              break;
-+
-+            case 'S':
-+              laststart = b;
-+              PATFETCH (c);
-+              BUF_PUSH_2 (notsyntaxspec, syntax_spec_code[c]);
-+              break;
-+#endif /* emacs */
-+
-+
-+            case 'w':
-+	      if (syntax & RE_NO_GNU_OPS)
-+		goto normal_char;
-+              laststart = b;
-+              BUF_PUSH (wordchar);
-+              break;
-+
-+
-+            case 'W':
-+	      if (syntax & RE_NO_GNU_OPS)
-+		goto normal_char;
-+              laststart = b;
-+              BUF_PUSH (notwordchar);
-+              break;
-+
-+
-+            case '<':
-+	      if (syntax & RE_NO_GNU_OPS)
-+		goto normal_char;
-+              BUF_PUSH (wordbeg);
-+              break;
-+
-+            case '>':
-+	      if (syntax & RE_NO_GNU_OPS)
-+		goto normal_char;
-+              BUF_PUSH (wordend);
-+              break;
-+
-+            case 'b':
-+	      if (syntax & RE_NO_GNU_OPS)
-+		goto normal_char;
-+              BUF_PUSH (wordbound);
-+              break;
-+
-+            case 'B':
-+	      if (syntax & RE_NO_GNU_OPS)
-+		goto normal_char;
-+              BUF_PUSH (notwordbound);
-+              break;
-+
-+            case '`':
-+	      if (syntax & RE_NO_GNU_OPS)
-+		goto normal_char;
-+              BUF_PUSH (begbuf);
-+              break;
-+
-+            case '\'':
-+	      if (syntax & RE_NO_GNU_OPS)
-+		goto normal_char;
-+              BUF_PUSH (endbuf);
-+              break;
-+
-+            case '1': case '2': case '3': case '4': case '5':
-+            case '6': case '7': case '8': case '9':
-+              if (syntax & RE_NO_BK_REFS)
-+                goto normal_char;
-+
-+              c1 = c - '0';
-+
-+              if (c1 > regnum)
-+                FREE_STACK_RETURN (REG_ESUBREG);
-+
-+              /* Can't back reference to a subexpression if inside of it.  */
-+              if (group_in_compile_stack (compile_stack, (regnum_t) c1))
-+                goto normal_char;
-+
-+              laststart = b;
-+              BUF_PUSH_2 (duplicate, c1);
-+              break;
-+
-+
-+            case '+':
-+            case '?':
-+              if (syntax & RE_BK_PLUS_QM)
-+                goto handle_plus;
-+              else
-+                goto normal_backslash;
-+
-+            default:
-+            normal_backslash:
-+              /* You might think it would be useful for \ to mean
-+                 not to translate; but if we don't translate it
-+                 it will never match anything.  */
-+              c = TRANSLATE (c);
-+              goto normal_char;
-+            }
-+          break;
-+
-+
-+	default:
-+        /* Expects the character in `c'.  */
-+	normal_char:
-+	      /* If no exactn currently being built.  */
-+          if (!pending_exact
-+#ifdef WCHAR
-+	      /* If last exactn handle binary(or character) and
-+		 new exactn handle character(or binary).  */
-+	      || is_exactn_bin != is_binary[p - 1 - pattern]
-+#endif /* WCHAR */
-+
-+              /* If last exactn not at current position.  */
-+              || pending_exact + *pending_exact + 1 != b
-+
-+              /* We have only one byte following the exactn for the count.  */
-+	      || *pending_exact == (1 << BYTEWIDTH) - 1
-+
-+              /* If followed by a repetition operator.  */
-+              || *p == '*' || *p == '^'
-+	      || ((syntax & RE_BK_PLUS_QM)
-+		  ? *p == '\\' && (p[1] == '+' || p[1] == '?')
-+		  : (*p == '+' || *p == '?'))
-+	      || ((syntax & RE_INTERVALS)
-+                  && ((syntax & RE_NO_BK_BRACES)
-+		      ? *p == '{'
-+                      : (p[0] == '\\' && p[1] == '{'))))
-+	    {
-+	      /* Start building a new exactn.  */
-+
-+              laststart = b;
-+
-+#ifdef WCHAR
-+	      /* Is this exactn binary data or character? */
-+	      is_exactn_bin = is_binary[p - 1 - pattern];
-+	      if (is_exactn_bin)
-+		  BUF_PUSH_2 (exactn_bin, 0);
-+	      else
-+		  BUF_PUSH_2 (exactn, 0);
-+#else
-+	      BUF_PUSH_2 (exactn, 0);
-+#endif /* WCHAR */
-+	      pending_exact = b - 1;
-+            }
-+
-+	  BUF_PUSH (c);
-+          (*pending_exact)++;
-+	  break;
-+        } /* switch (c) */
-+    } /* while p != pend */
-+
-+
-+  /* Through the pattern now.  */
-+
-+  if (fixup_alt_jump)
-+    STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
-+
-+  if (!COMPILE_STACK_EMPTY)
-+    FREE_STACK_RETURN (REG_EPAREN);
-+
-+  /* If we don't want backtracking, force success
-+     the first time we reach the end of the compiled pattern.  */
-+  if (syntax & RE_NO_POSIX_BACKTRACKING)
-+    BUF_PUSH (succeed);
-+
-+#ifdef WCHAR
-+  free (pattern);
-+  free (mbs_offset);
-+  free (is_binary);
-+#endif
-+  free (compile_stack.stack);
-+
-+  /* We have succeeded; set the length of the buffer.  */
-+#ifdef WCHAR
-+  bufp->used = (uintptr_t) b - (uintptr_t) COMPILED_BUFFER_VAR;
-+#else
-+  bufp->used = b - bufp->buffer;
-+#endif
-+
-+#ifdef DEBUG
-+  if (debug)
-+    {
-+      DEBUG_PRINT1 ("\nCompiled pattern: \n");
-+      PREFIX(print_compiled_pattern) (bufp);
-+    }
-+#endif /* DEBUG */
-+
-+#ifndef MATCH_MAY_ALLOCATE
-+  /* Initialize the failure stack to the largest possible stack.  This
-+     isn't necessary unless we're trying to avoid calling alloca in
-+     the search and match routines.  */
-+  {
-+    int num_regs = bufp->re_nsub + 1;
-+
-+    /* Since DOUBLE_FAIL_STACK refuses to double only if the current size
-+       is strictly greater than re_max_failures, the largest possible stack
-+       is 2 * re_max_failures failure points.  */
-+    if (fail_stack.size < (2 * re_max_failures * MAX_FAILURE_ITEMS))
-+      {
-+	fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS);
-+
-+# ifdef emacs
-+	if (! fail_stack.stack)
-+	  fail_stack.stack
-+	    = (PREFIX(fail_stack_elt_t) *) xmalloc (fail_stack.size
-+				    * sizeof (PREFIX(fail_stack_elt_t)));
-+	else
-+	  fail_stack.stack
-+	    = (PREFIX(fail_stack_elt_t) *) xrealloc (fail_stack.stack,
-+				     (fail_stack.size
-+				      * sizeof (PREFIX(fail_stack_elt_t))));
-+# else /* not emacs */
-+	if (! fail_stack.stack)
-+	  fail_stack.stack
-+	    = (PREFIX(fail_stack_elt_t) *) malloc (fail_stack.size
-+				   * sizeof (PREFIX(fail_stack_elt_t)));
-+	else
-+	  fail_stack.stack
-+	    = (PREFIX(fail_stack_elt_t) *) realloc (fail_stack.stack,
-+					    (fail_stack.size
-+				     * sizeof (PREFIX(fail_stack_elt_t))));
-+# endif /* not emacs */
-+      }
-+
-+   PREFIX(regex_grow_registers) (num_regs);
-+  }
-+#endif /* not MATCH_MAY_ALLOCATE */
-+
-+  return REG_NOERROR;
-+} /* regex_compile */
-+
-+/* Subroutines for `regex_compile'.  */
-+
-+/* Store OP at LOC followed by two-byte integer parameter ARG.  */
-+/* ifdef WCHAR, integer parameter is 1 wchar_t.  */
-+
-+static void
-+PREFIX(store_op1) (re_opcode_t op, UCHAR_T *loc, int arg)
-+{
-+  *loc = (UCHAR_T) op;
-+  STORE_NUMBER (loc + 1, arg);
-+}
-+
-+
-+/* Like `store_op1', but for two two-byte parameters ARG1 and ARG2.  */
-+/* ifdef WCHAR, integer parameter is 1 wchar_t.  */
-+
-+static void
-+PREFIX(store_op2) (re_opcode_t op, UCHAR_T *loc, int arg1, int arg2)
-+{
-+  *loc = (UCHAR_T) op;
-+  STORE_NUMBER (loc + 1, arg1);
-+  STORE_NUMBER (loc + 1 + OFFSET_ADDRESS_SIZE, arg2);
-+}
-+
-+
-+/* Copy the bytes from LOC to END to open up three bytes of space at LOC
-+   for OP followed by two-byte integer parameter ARG.  */
-+/* ifdef WCHAR, integer parameter is 1 wchar_t.  */
-+
-+static void
-+PREFIX(insert_op1) (re_opcode_t op, UCHAR_T *loc, int arg, UCHAR_T *end)
-+{
-+  register UCHAR_T *pfrom = end;
-+  register UCHAR_T *pto = end + 1 + OFFSET_ADDRESS_SIZE;
-+
-+  while (pfrom != loc)
-+    *--pto = *--pfrom;
-+
-+  PREFIX(store_op1) (op, loc, arg);
-+}
-+
-+
-+/* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2.  */
-+/* ifdef WCHAR, integer parameter is 1 wchar_t.  */
-+
-+static void
-+PREFIX(insert_op2) (re_opcode_t op, UCHAR_T *loc, int arg1,
-+                    int arg2, UCHAR_T *end)
-+{
-+  register UCHAR_T *pfrom = end;
-+  register UCHAR_T *pto = end + 1 + 2 * OFFSET_ADDRESS_SIZE;
-+
-+  while (pfrom != loc)
-+    *--pto = *--pfrom;
-+
-+  PREFIX(store_op2) (op, loc, arg1, arg2);
-+}
-+
-+
-+/* P points to just after a ^ in PATTERN.  Return true if that ^ comes
-+   after an alternative or a begin-subexpression.  We assume there is at
-+   least one character before the ^.  */
-+
-+static boolean
-+PREFIX(at_begline_loc_p) (const CHAR_T *pattern, const CHAR_T *p,
-+                          reg_syntax_t syntax)
-+{
-+  const CHAR_T *prev = p - 2;
-+  boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
-+
-+  return
-+       /* After a subexpression?  */
-+       (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
-+       /* After an alternative?  */
-+    || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash));
-+}
-+
-+
-+/* The dual of at_begline_loc_p.  This one is for $.  We assume there is
-+   at least one character after the $, i.e., `P < PEND'.  */
-+
-+static boolean
-+PREFIX(at_endline_loc_p) (const CHAR_T *p, const CHAR_T *pend,
-+                          reg_syntax_t syntax)
-+{
-+  const CHAR_T *next = p;
-+  boolean next_backslash = *next == '\\';
-+  const CHAR_T *next_next = p + 1 < pend ? p + 1 : 0;
-+
-+  return
-+       /* Before a subexpression?  */
-+       (syntax & RE_NO_BK_PARENS ? *next == ')'
-+        : next_backslash && next_next && *next_next == ')')
-+       /* Before an alternative?  */
-+    || (syntax & RE_NO_BK_VBAR ? *next == '|'
-+        : next_backslash && next_next && *next_next == '|');
-+}
-+
-+#else /* not INSIDE_RECURSION */
-+
-+/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
-+   false if it's not.  */
-+
-+static boolean
-+group_in_compile_stack (compile_stack_type compile_stack, regnum_t regnum)
-+{
-+  int this_element;
-+
-+  for (this_element = compile_stack.avail - 1;
-+       this_element >= 0;
-+       this_element--)
-+    if (compile_stack.stack[this_element].regnum == regnum)
-+      return true;
-+
-+  return false;
-+}
-+#endif /* not INSIDE_RECURSION */
-+
-+#ifdef INSIDE_RECURSION
-+
-+#ifdef WCHAR
-+/* This insert space, which size is "num", into the pattern at "loc".
-+   "end" must point the end of the allocated buffer.  */
-+static void
-+insert_space (int num, CHAR_T *loc, CHAR_T *end)
-+{
-+  register CHAR_T *pto = end;
-+  register CHAR_T *pfrom = end - num;
-+
-+  while (pfrom >= loc)
-+    *pto-- = *pfrom--;
-+}
-+#endif /* WCHAR */
-+
-+#ifdef WCHAR
-+static reg_errcode_t
-+wcs_compile_range (CHAR_T range_start_char, const CHAR_T **p_ptr,
-+                   const CHAR_T *pend, RE_TRANSLATE_TYPE translate,
-+                   reg_syntax_t syntax, CHAR_T *b, CHAR_T *char_set)
-+{
-+  const CHAR_T *p = *p_ptr;
-+  CHAR_T range_start, range_end;
-+  reg_errcode_t ret;
-+# ifdef _LIBC
-+  uint32_t nrules;
-+  uint32_t start_val, end_val;
-+# endif
-+  if (p == pend)
-+    return REG_ERANGE;
-+
-+# ifdef _LIBC
-+  nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
-+  if (nrules != 0)
-+    {
-+      const char *collseq = (const char *) _NL_CURRENT(LC_COLLATE,
-+						       _NL_COLLATE_COLLSEQWC);
-+      const unsigned char *extra = (const unsigned char *)
-+	_NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
-+
-+      if (range_start_char < -1)
-+	{
-+	  /* range_start is a collating symbol.  */
-+	  int32_t *wextra;
-+	  /* Retreive the index and get collation sequence value.  */
-+	  wextra = (int32_t*)(extra + char_set[-range_start_char]);
-+	  start_val = wextra[1 + *wextra];
-+	}
-+      else
-+	start_val = collseq_table_lookup(collseq, TRANSLATE(range_start_char));
-+
-+      end_val = collseq_table_lookup (collseq, TRANSLATE (p[0]));
-+
-+      /* Report an error if the range is empty and the syntax prohibits
-+	 this.  */
-+      ret = ((syntax & RE_NO_EMPTY_RANGES)
-+	     && (start_val > end_val))? REG_ERANGE : REG_NOERROR;
-+
-+      /* Insert space to the end of the char_ranges.  */
-+      insert_space(2, b - char_set[5] - 2, b - 1);
-+      *(b - char_set[5] - 2) = (wchar_t)start_val;
-+      *(b - char_set[5] - 1) = (wchar_t)end_val;
-+      char_set[4]++; /* ranges_index */
-+    }
-+  else
-+# endif
-+    {
-+      range_start = (range_start_char >= 0)? TRANSLATE (range_start_char):
-+	range_start_char;
-+      range_end = TRANSLATE (p[0]);
-+      /* Report an error if the range is empty and the syntax prohibits
-+	 this.  */
-+      ret = ((syntax & RE_NO_EMPTY_RANGES)
-+	     && (range_start > range_end))? REG_ERANGE : REG_NOERROR;
-+
-+      /* Insert space to the end of the char_ranges.  */
-+      insert_space(2, b - char_set[5] - 2, b - 1);
-+      *(b - char_set[5] - 2) = range_start;
-+      *(b - char_set[5] - 1) = range_end;
-+      char_set[4]++; /* ranges_index */
-+    }
-+  /* Have to increment the pointer into the pattern string, so the
-+     caller isn't still at the ending character.  */
-+  (*p_ptr)++;
-+
-+  return ret;
-+}
-+#else /* BYTE */
-+/* Read the ending character of a range (in a bracket expression) from the
-+   uncompiled pattern *P_PTR (which ends at PEND).  We assume the
-+   starting character is in `P[-2]'.  (`P[-1]' is the character `-'.)
-+   Then we set the translation of all bits between the starting and
-+   ending characters (inclusive) in the compiled pattern B.
-+
-+   Return an error code.
-+
-+   We use these short variable names so we can use the same macros as
-+   `regex_compile' itself.  */
-+
-+static reg_errcode_t
-+byte_compile_range (unsigned int range_start_char, const char **p_ptr,
-+                    const char *pend, RE_TRANSLATE_TYPE translate,
-+                    reg_syntax_t syntax, unsigned char *b)
-+{
-+  unsigned this_char;
-+  const char *p = *p_ptr;
-+  reg_errcode_t ret;
-+# if _LIBC
-+  const unsigned char *collseq;
-+  unsigned int start_colseq;
-+  unsigned int end_colseq;
-+# else
-+  unsigned end_char;
-+# endif
-+
-+  if (p == pend)
-+    return REG_ERANGE;
-+
-+  /* Have to increment the pointer into the pattern string, so the
-+     caller isn't still at the ending character.  */
-+  (*p_ptr)++;
-+
-+  /* Report an error if the range is empty and the syntax prohibits this.  */
-+  ret = syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
-+
-+# if _LIBC
-+  collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
-+						 _NL_COLLATE_COLLSEQMB);
-+
-+  start_colseq = collseq[(unsigned char) TRANSLATE (range_start_char)];
-+  end_colseq = collseq[(unsigned char) TRANSLATE (p[0])];
-+  for (this_char = 0; this_char <= (unsigned char) -1; ++this_char)
-+    {
-+      unsigned int this_colseq = collseq[(unsigned char) TRANSLATE (this_char)];
-+
-+      if (start_colseq <= this_colseq && this_colseq <= end_colseq)
-+	{
-+	  SET_LIST_BIT (TRANSLATE (this_char));
-+	  ret = REG_NOERROR;
-+	}
-+    }
-+# else
-+  /* Here we see why `this_char' has to be larger than an `unsigned
-+     char' -- we would otherwise go into an infinite loop, since all
-+     characters <= 0xff.  */
-+  range_start_char = TRANSLATE (range_start_char);
-+  /* TRANSLATE(p[0]) is casted to char (not unsigned char) in TRANSLATE,
-+     and some compilers cast it to int implicitly, so following for_loop
-+     may fall to (almost) infinite loop.
-+     e.g. If translate[p[0]] = 0xff, end_char may equals to 0xffffffff.
-+     To avoid this, we cast p[0] to unsigned int and truncate it.  */
-+  end_char = ((unsigned)TRANSLATE(p[0]) & ((1 << BYTEWIDTH) - 1));
-+
-+  for (this_char = range_start_char; this_char <= end_char; ++this_char)
-+    {
-+      SET_LIST_BIT (TRANSLATE (this_char));
-+      ret = REG_NOERROR;
-+    }
-+# endif
-+
-+  return ret;
-+}
-+#endif /* WCHAR */
-+
-+/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
-+   BUFP.  A fastmap records which of the (1 << BYTEWIDTH) possible
-+   characters can start a string that matches the pattern.  This fastmap
-+   is used by re_search to skip quickly over impossible starting points.
-+
-+   The caller must supply the address of a (1 << BYTEWIDTH)-byte data
-+   area as BUFP->fastmap.
-+
-+   We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in
-+   the pattern buffer.
-+
-+   Returns 0 if we succeed, -2 if an internal error.   */
-+
-+#ifdef WCHAR
-+/* local function for re_compile_fastmap.
-+   truncate wchar_t character to char.  */
-+static unsigned char truncate_wchar (CHAR_T c);
-+
-+static unsigned char
-+truncate_wchar (CHAR_T c)
-+{
-+  unsigned char buf[MB_CUR_MAX];
-+  mbstate_t state;
-+  int retval;
-+  memset (&state, '\0', sizeof (state));
-+# ifdef _LIBC
-+  retval = __wcrtomb (buf, c, &state);
-+# else
-+  retval = wcrtomb (buf, c, &state);
-+# endif
-+  return retval > 0 ? buf[0] : (unsigned char) c;
-+}
-+#endif /* WCHAR */
-+
-+static int
-+PREFIX(re_compile_fastmap) (struct re_pattern_buffer *bufp)
-+{
-+  int j, k;
-+#ifdef MATCH_MAY_ALLOCATE
-+  PREFIX(fail_stack_type) fail_stack;
-+#endif
-+#ifndef REGEX_MALLOC
-+  char *destination;
-+#endif
-+
-+  register char *fastmap = bufp->fastmap;
-+
-+#ifdef WCHAR
-+  /* We need to cast pattern to (wchar_t*), because we casted this compiled
-+     pattern to (char*) in regex_compile.  */
-+  UCHAR_T *pattern = (UCHAR_T*)bufp->buffer;
-+  register UCHAR_T *pend = (UCHAR_T*) (bufp->buffer + bufp->used);
-+#else /* BYTE */
-+  UCHAR_T *pattern = bufp->buffer;
-+  register UCHAR_T *pend = pattern + bufp->used;
-+#endif /* WCHAR */
-+  UCHAR_T *p = pattern;
-+
-+#ifdef REL_ALLOC
-+  /* This holds the pointer to the failure stack, when
-+     it is allocated relocatably.  */
-+  fail_stack_elt_t *failure_stack_ptr;
-+#endif
-+
-+  /* Assume that each path through the pattern can be null until
-+     proven otherwise.  We set this false at the bottom of switch
-+     statement, to which we get only if a particular path doesn't
-+     match the empty string.  */
-+  boolean path_can_be_null = true;
-+
-+  /* We aren't doing a `succeed_n' to begin with.  */
-+  boolean succeed_n_p = false;
-+
-+  assert (fastmap != NULL && p != NULL);
-+
-+  INIT_FAIL_STACK ();
-+  bzero (fastmap, 1 << BYTEWIDTH);  /* Assume nothing's valid.  */
-+  bufp->fastmap_accurate = 1;	    /* It will be when we're done.  */
-+  bufp->can_be_null = 0;
-+
-+  while (1)
-+    {
-+      if (p == pend || *p == (UCHAR_T) succeed)
-+	{
-+	  /* We have reached the (effective) end of pattern.  */
-+	  if (!FAIL_STACK_EMPTY ())
-+	    {
-+	      bufp->can_be_null |= path_can_be_null;
-+
-+	      /* Reset for next path.  */
-+	      path_can_be_null = true;
-+
-+	      p = fail_stack.stack[--fail_stack.avail].pointer;
-+
-+	      continue;
-+	    }
-+	  else
-+	    break;
-+	}
-+
-+      /* We should never be about to go beyond the end of the pattern.  */
-+      assert (p < pend);
-+
-+      switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
-+	{
-+
-+        /* I guess the idea here is to simply not bother with a fastmap
-+           if a backreference is used, since it's too hard to figure out
-+           the fastmap for the corresponding group.  Setting
-+           `can_be_null' stops `re_search_2' from using the fastmap, so
-+           that is all we do.  */
-+	case duplicate:
-+	  bufp->can_be_null = 1;
-+          goto done;
-+
-+
-+      /* Following are the cases which match a character.  These end
-+         with `break'.  */
-+
-+#ifdef WCHAR
-+	case exactn:
-+          fastmap[truncate_wchar(p[1])] = 1;
-+	  break;
-+#else /* BYTE */
-+	case exactn:
-+          fastmap[p[1]] = 1;
-+	  break;
-+#endif /* WCHAR */
-+#ifdef MBS_SUPPORT
-+	case exactn_bin:
-+	  fastmap[p[1]] = 1;
-+	  break;
-+#endif
-+
-+#ifdef WCHAR
-+        /* It is hard to distinguish fastmap from (multi byte) characters
-+           which depends on current locale.  */
-+        case charset:
-+	case charset_not:
-+	case wordchar:
-+	case notwordchar:
-+          bufp->can_be_null = 1;
-+          goto done;
-+#else /* BYTE */
-+        case charset:
-+          for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
-+	    if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))
-+              fastmap[j] = 1;
-+	  break;
-+
-+
-+	case charset_not:
-+	  /* Chars beyond end of map must be allowed.  */
-+	  for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++)
-+            fastmap[j] = 1;
-+
-+	  for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
-+	    if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))))
-+              fastmap[j] = 1;
-+          break;
-+
-+
-+	case wordchar:
-+	  for (j = 0; j < (1 << BYTEWIDTH); j++)
-+	    if (SYNTAX (j) == Sword)
-+	      fastmap[j] = 1;
-+	  break;
-+
-+
-+	case notwordchar:
-+	  for (j = 0; j < (1 << BYTEWIDTH); j++)
-+	    if (SYNTAX (j) != Sword)
-+	      fastmap[j] = 1;
-+	  break;
-+#endif /* WCHAR */
-+
-+        case anychar:
-+	  {
-+	    int fastmap_newline = fastmap['\n'];
-+
-+	    /* `.' matches anything ...  */
-+	    for (j = 0; j < (1 << BYTEWIDTH); j++)
-+	      fastmap[j] = 1;
-+
-+	    /* ... except perhaps newline.  */
-+	    if (!(bufp->syntax & RE_DOT_NEWLINE))
-+	      fastmap['\n'] = fastmap_newline;
-+
-+	    /* Return if we have already set `can_be_null'; if we have,
-+	       then the fastmap is irrelevant.  Something's wrong here.  */
-+	    else if (bufp->can_be_null)
-+	      goto done;
-+
-+	    /* Otherwise, have to check alternative paths.  */
-+	    break;
-+	  }
-+
-+#ifdef emacs
-+        case syntaxspec:
-+	  k = *p++;
-+	  for (j = 0; j < (1 << BYTEWIDTH); j++)
-+	    if (SYNTAX (j) == (enum syntaxcode) k)
-+	      fastmap[j] = 1;
-+	  break;
-+
-+
-+	case notsyntaxspec:
-+	  k = *p++;
-+	  for (j = 0; j < (1 << BYTEWIDTH); j++)
-+	    if (SYNTAX (j) != (enum syntaxcode) k)
-+	      fastmap[j] = 1;
-+	  break;
-+
-+
-+      /* All cases after this match the empty string.  These end with
-+         `continue'.  */
-+
-+
-+	case before_dot:
-+	case at_dot:
-+	case after_dot:
-+          continue;
-+#endif /* emacs */
-+
-+
-+        case no_op:
-+        case begline:
-+        case endline:
-+	case begbuf:
-+	case endbuf:
-+	case wordbound:
-+	case notwordbound:
-+	case wordbeg:
-+	case wordend:
-+        case push_dummy_failure:
-+          continue;
-+
-+
-+	case jump_n:
-+        case pop_failure_jump:
-+	case maybe_pop_jump:
-+	case jump:
-+        case jump_past_alt:
-+	case dummy_failure_jump:
-+          EXTRACT_NUMBER_AND_INCR (j, p);
-+	  p += j;
-+	  if (j > 0)
-+	    continue;
-+
-+          /* Jump backward implies we just went through the body of a
-+             loop and matched nothing.  Opcode jumped to should be
-+             `on_failure_jump' or `succeed_n'.  Just treat it like an
-+             ordinary jump.  For a * loop, it has pushed its failure
-+             point already; if so, discard that as redundant.  */
-+          if ((re_opcode_t) *p != on_failure_jump
-+	      && (re_opcode_t) *p != succeed_n)
-+	    continue;
-+
-+          p++;
-+          EXTRACT_NUMBER_AND_INCR (j, p);
-+          p += j;
-+
-+          /* If what's on the stack is where we are now, pop it.  */
-+          if (!FAIL_STACK_EMPTY ()
-+	      && fail_stack.stack[fail_stack.avail - 1].pointer == p)
-+            fail_stack.avail--;
-+
-+          continue;
-+
-+
-+        case on_failure_jump:
-+        case on_failure_keep_string_jump:
-+	handle_on_failure_jump:
-+          EXTRACT_NUMBER_AND_INCR (j, p);
-+
-+          /* For some patterns, e.g., `(a?)?', `p+j' here points to the
-+             end of the pattern.  We don't want to push such a point,
-+             since when we restore it above, entering the switch will
-+             increment `p' past the end of the pattern.  We don't need
-+             to push such a point since we obviously won't find any more
-+             fastmap entries beyond `pend'.  Such a pattern can match
-+             the null string, though.  */
-+          if (p + j < pend)
-+            {
-+              if (!PUSH_PATTERN_OP (p + j, fail_stack))
-+		{
-+		  RESET_FAIL_STACK ();
-+		  return -2;
-+		}
-+            }
-+          else
-+            bufp->can_be_null = 1;
-+
-+          if (succeed_n_p)
-+            {
-+              EXTRACT_NUMBER_AND_INCR (k, p);	/* Skip the n.  */
-+              succeed_n_p = false;
-+	    }
-+
-+          continue;
-+
-+
-+	case succeed_n:
-+          /* Get to the number of times to succeed.  */
-+          p += OFFSET_ADDRESS_SIZE;
-+
-+          /* Increment p past the n for when k != 0.  */
-+          EXTRACT_NUMBER_AND_INCR (k, p);
-+          if (k == 0)
-+	    {
-+              p -= 2 * OFFSET_ADDRESS_SIZE;
-+  	      succeed_n_p = true;  /* Spaghetti code alert.  */
-+              goto handle_on_failure_jump;
-+            }
-+          continue;
-+
-+
-+	case set_number_at:
-+          p += 2 * OFFSET_ADDRESS_SIZE;
-+          continue;
-+
-+
-+	case start_memory:
-+        case stop_memory:
-+	  p += 2;
-+	  continue;
-+
-+
-+	default:
-+          abort (); /* We have listed all the cases.  */
-+        } /* switch *p++ */
-+
-+      /* Getting here means we have found the possible starting
-+         characters for one path of the pattern -- and that the empty
-+         string does not match.  We need not follow this path further.
-+         Instead, look at the next alternative (remembered on the
-+         stack), or quit if no more.  The test at the top of the loop
-+         does these things.  */
-+      path_can_be_null = false;
-+      p = pend;
-+    } /* while p */
-+
-+  /* Set `can_be_null' for the last path (also the first path, if the
-+     pattern is empty).  */
-+  bufp->can_be_null |= path_can_be_null;
-+
-+ done:
-+  RESET_FAIL_STACK ();
-+  return 0;
-+}
-+
-+#else /* not INSIDE_RECURSION */
-+
-+int
-+re_compile_fastmap (struct re_pattern_buffer *bufp)
-+{
-+# ifdef MBS_SUPPORT
-+  if (MB_CUR_MAX != 1)
-+    return wcs_re_compile_fastmap(bufp);
-+  else
-+# endif
-+    return byte_re_compile_fastmap(bufp);
-+} /* re_compile_fastmap */
-+#ifdef _LIBC
-+weak_alias (__re_compile_fastmap, re_compile_fastmap)
-+#endif
-+
-+
-+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
-+   ENDS.  Subsequent matches using PATTERN_BUFFER and REGS will use
-+   this memory for recording register information.  STARTS and ENDS
-+   must be allocated using the malloc library routine, and must each
-+   be at least NUM_REGS * sizeof (regoff_t) bytes long.
-+
-+   If NUM_REGS == 0, then subsequent matches should allocate their own
-+   register data.
-+
-+   Unless this function is called, the first search or match using
-+   PATTERN_BUFFER will allocate its own register data, without
-+   freeing the old data.  */
-+
-+void
-+re_set_registers (struct re_pattern_buffer *bufp,
-+                  struct re_registers *regs, unsigned num_regs,
-+                  regoff_t *starts, regoff_t *ends)
-+{
-+  if (num_regs)
-+    {
-+      bufp->regs_allocated = REGS_REALLOCATE;
-+      regs->num_regs = num_regs;
-+      regs->start = starts;
-+      regs->end = ends;
-+    }
-+  else
-+    {
-+      bufp->regs_allocated = REGS_UNALLOCATED;
-+      regs->num_regs = 0;
-+      regs->start = regs->end = (regoff_t *) 0;
-+    }
-+}
-+#ifdef _LIBC
-+weak_alias (__re_set_registers, re_set_registers)
-+#endif
-+
-+/* Searching routines.  */
-+
-+/* Like re_search_2, below, but only one string is specified, and
-+   doesn't let you say where to stop matching.  */
-+
-+int
-+re_search (struct re_pattern_buffer *bufp, const char *string, int size,
-+           int startpos, int range, struct re_registers *regs)
-+{
-+  return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
-+		      regs, size);
-+}
-+#ifdef _LIBC
-+weak_alias (__re_search, re_search)
-+#endif
-+
-+
-+/* Using the compiled pattern in BUFP->buffer, first tries to match the
-+   virtual concatenation of STRING1 and STRING2, starting first at index
-+   STARTPOS, then at STARTPOS + 1, and so on.
-+
-+   STRING1 and STRING2 have length SIZE1 and SIZE2, respectively.
-+
-+   RANGE is how far to scan while trying to match.  RANGE = 0 means try
-+   only at STARTPOS; in general, the last start tried is STARTPOS +
-+   RANGE.
-+
-+   In REGS, return the indices of the virtual concatenation of STRING1
-+   and STRING2 that matched the entire BUFP->buffer and its contained
-+   subexpressions.
-+
-+   Do not consider matching one past the index STOP in the virtual
-+   concatenation of STRING1 and STRING2.
-+
-+   We return either the position in the strings at which the match was
-+   found, -1 if no match, or -2 if error (such as failure
-+   stack overflow).  */
-+
-+int
-+re_search_2 (struct re_pattern_buffer *bufp, const char *string1, int size1,
-+             const char *string2, int size2, int startpos, int range,
-+             struct re_registers *regs, int stop)
-+{
-+# ifdef MBS_SUPPORT
-+  if (MB_CUR_MAX != 1)
-+    return wcs_re_search_2 (bufp, string1, size1, string2, size2, startpos,
-+			    range, regs, stop);
-+  else
-+# endif
-+    return byte_re_search_2 (bufp, string1, size1, string2, size2, startpos,
-+			     range, regs, stop);
-+} /* re_search_2 */
-+#ifdef _LIBC
-+weak_alias (__re_search_2, re_search_2)
-+#endif
-+
-+#endif /* not INSIDE_RECURSION */
-+
-+#ifdef INSIDE_RECURSION
-+
-+#ifdef MATCH_MAY_ALLOCATE
-+# define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL
-+#else
-+# define FREE_VAR(var) if (var) free (var); var = NULL
-+#endif
-+
-+#ifdef WCHAR
-+# define MAX_ALLOCA_SIZE	2000
-+
-+# define FREE_WCS_BUFFERS() \
-+  do {									      \
-+    if (size1 > MAX_ALLOCA_SIZE)					      \
-+      {									      \
-+	free (wcs_string1);						      \
-+	free (mbs_offset1);						      \
-+      }									      \
-+    else								      \
-+      {									      \
-+	FREE_VAR (wcs_string1);						      \
-+	FREE_VAR (mbs_offset1);						      \
-+      }									      \
-+    if (size2 > MAX_ALLOCA_SIZE) 					      \
-+      {									      \
-+	free (wcs_string2);						      \
-+	free (mbs_offset2);						      \
-+      }									      \
-+    else								      \
-+      {									      \
-+	FREE_VAR (wcs_string2);						      \
-+	FREE_VAR (mbs_offset2);						      \
-+      }									      \
-+  } while (0)
-+
-+#endif
-+
-+
-+static int
-+PREFIX(re_search_2) (struct re_pattern_buffer *bufp, const char *string1,
-+                     int size1, const char *string2, int size2,
-+                     int startpos, int range,
-+                     struct re_registers *regs, int stop)
-+{
-+  int val;
-+  register char *fastmap = bufp->fastmap;
-+  register RE_TRANSLATE_TYPE translate = bufp->translate;
-+  int total_size = size1 + size2;
-+  int endpos = startpos + range;
-+#ifdef WCHAR
-+  /* We need wchar_t* buffers correspond to cstring1, cstring2.  */
-+  wchar_t *wcs_string1 = NULL, *wcs_string2 = NULL;
-+  /* We need the size of wchar_t buffers correspond to csize1, csize2.  */
-+  int wcs_size1 = 0, wcs_size2 = 0;
-+  /* offset buffer for optimizatoin. See convert_mbs_to_wc.  */
-+  int *mbs_offset1 = NULL, *mbs_offset2 = NULL;
-+  /* They hold whether each wchar_t is binary data or not.  */
-+  char *is_binary = NULL;
-+#endif /* WCHAR */
-+
-+  /* Check for out-of-range STARTPOS.  */
-+  if (startpos < 0 || startpos > total_size)
-+    return -1;
-+
-+  /* Fix up RANGE if it might eventually take us outside
-+     the virtual concatenation of STRING1 and STRING2.
-+     Make sure we won't move STARTPOS below 0 or above TOTAL_SIZE.  */
-+  if (endpos < 0)
-+    range = 0 - startpos;
-+  else if (endpos > total_size)
-+    range = total_size - startpos;
-+
-+  /* If the search isn't to be a backwards one, don't waste time in a
-+     search for a pattern that must be anchored.  */
-+  if (bufp->used > 0 && range > 0
-+      && ((re_opcode_t) bufp->buffer[0] == begbuf
-+	  /* `begline' is like `begbuf' if it cannot match at newlines.  */
-+	  || ((re_opcode_t) bufp->buffer[0] == begline
-+	      && !bufp->newline_anchor)))
-+    {
-+      if (startpos > 0)
-+	return -1;
-+      else
-+	range = 1;
-+    }
-+
-+#ifdef emacs
-+  /* In a forward search for something that starts with \=.
-+     don't keep searching past point.  */
-+  if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0)
-+    {
-+      range = PT - startpos;
-+      if (range <= 0)
-+	return -1;
-+    }
-+#endif /* emacs */
-+
-+  /* Update the fastmap now if not correct already.  */
-+  if (fastmap && !bufp->fastmap_accurate)
-+    if (re_compile_fastmap (bufp) == -2)
-+      return -2;
-+
-+#ifdef WCHAR
-+  /* Allocate wchar_t array for wcs_string1 and wcs_string2 and
-+     fill them with converted string.  */
-+  if (size1 != 0)
-+    {
-+      if (size1 > MAX_ALLOCA_SIZE)
-+	{
-+	  wcs_string1 = TALLOC (size1 + 1, CHAR_T);
-+	  mbs_offset1 = TALLOC (size1 + 1, int);
-+	  is_binary = TALLOC (size1 + 1, char);
-+	}
-+      else
-+	{
-+	  wcs_string1 = REGEX_TALLOC (size1 + 1, CHAR_T);
-+	  mbs_offset1 = REGEX_TALLOC (size1 + 1, int);
-+	  is_binary = REGEX_TALLOC (size1 + 1, char);
-+	}
-+      if (!wcs_string1 || !mbs_offset1 || !is_binary)
-+	{
-+	  if (size1 > MAX_ALLOCA_SIZE)
-+	    {
-+	      free (wcs_string1);
-+	      free (mbs_offset1);
-+	      free (is_binary);
-+	    }
-+	  else
-+	    {
-+	      FREE_VAR (wcs_string1);
-+	      FREE_VAR (mbs_offset1);
-+	      FREE_VAR (is_binary);
-+	    }
-+	  return -2;
-+	}
-+      wcs_size1 = convert_mbs_to_wcs(wcs_string1, string1, size1,
-+				     mbs_offset1, is_binary);
-+      wcs_string1[wcs_size1] = L'\0'; /* for a sentinel  */
-+      if (size1 > MAX_ALLOCA_SIZE)
-+	free (is_binary);
-+      else
-+	FREE_VAR (is_binary);
-+    }
-+  if (size2 != 0)
-+    {
-+      if (size2 > MAX_ALLOCA_SIZE)
-+	{
-+	  wcs_string2 = TALLOC (size2 + 1, CHAR_T);
-+	  mbs_offset2 = TALLOC (size2 + 1, int);
-+	  is_binary = TALLOC (size2 + 1, char);
-+	}
-+      else
-+	{
-+	  wcs_string2 = REGEX_TALLOC (size2 + 1, CHAR_T);
-+	  mbs_offset2 = REGEX_TALLOC (size2 + 1, int);
-+	  is_binary = REGEX_TALLOC (size2 + 1, char);
-+	}
-+      if (!wcs_string2 || !mbs_offset2 || !is_binary)
-+	{
-+	  FREE_WCS_BUFFERS ();
-+	  if (size2 > MAX_ALLOCA_SIZE)
-+	    free (is_binary);
-+	  else
-+	    FREE_VAR (is_binary);
-+	  return -2;
-+	}
-+      wcs_size2 = convert_mbs_to_wcs(wcs_string2, string2, size2,
-+				     mbs_offset2, is_binary);
-+      wcs_string2[wcs_size2] = L'\0'; /* for a sentinel  */
-+      if (size2 > MAX_ALLOCA_SIZE)
-+	free (is_binary);
-+      else
-+	FREE_VAR (is_binary);
-+    }
-+#endif /* WCHAR */
-+
-+
-+  /* Loop through the string, looking for a place to start matching.  */
-+  for (;;)
-+    {
-+      /* If a fastmap is supplied, skip quickly over characters that
-+         cannot be the start of a match.  If the pattern can match the
-+         null string, however, we don't need to skip characters; we want
-+         the first null string.  */
-+      if (fastmap && startpos < total_size && !bufp->can_be_null)
-+	{
-+	  if (range > 0)	/* Searching forwards.  */
-+	    {
-+	      register const char *d;
-+	      register int lim = 0;
-+	      int irange = range;
-+
-+              if (startpos < size1 && startpos + range >= size1)
-+                lim = range - (size1 - startpos);
-+
-+	      d = (startpos >= size1 ? string2 - size1 : string1) + startpos;
-+
-+              /* Written out as an if-else to avoid testing `translate'
-+                 inside the loop.  */
-+	      if (translate)
-+                while (range > lim
-+                       && !fastmap[(unsigned char)
-+				   translate[(unsigned char) *d++]])
-+                  range--;
-+	      else
-+                while (range > lim && !fastmap[(unsigned char) *d++])
-+                  range--;
-+
-+	      startpos += irange - range;
-+	    }
-+	  else				/* Searching backwards.  */
-+	    {
-+	      register CHAR_T c = (size1 == 0 || startpos >= size1
-+				      ? string2[startpos - size1]
-+				      : string1[startpos]);
-+
-+	      if (!fastmap[(unsigned char) TRANSLATE (c)])
-+		goto advance;
-+	    }
-+	}
-+
-+      /* If can't match the null string, and that's all we have left, fail.  */
-+      if (range >= 0 && startpos == total_size && fastmap
-+          && !bufp->can_be_null)
-+       {
-+#ifdef WCHAR
-+         FREE_WCS_BUFFERS ();
-+#endif
-+         return -1;
-+       }
-+
-+#ifdef WCHAR
-+      val = wcs_re_match_2_internal (bufp, string1, size1, string2,
-+				     size2, startpos, regs, stop,
-+				     wcs_string1, wcs_size1,
-+				     wcs_string2, wcs_size2,
-+				     mbs_offset1, mbs_offset2);
-+#else /* BYTE */
-+      val = byte_re_match_2_internal (bufp, string1, size1, string2,
-+				      size2, startpos, regs, stop);
-+#endif /* BYTE */
-+
-+#ifndef REGEX_MALLOC
-+# ifdef C_ALLOCA
-+      alloca (0);
-+# endif
-+#endif
-+
-+      if (val >= 0)
-+	{
-+#ifdef WCHAR
-+	  FREE_WCS_BUFFERS ();
-+#endif
-+	  return startpos;
-+	}
-+
-+      if (val == -2)
-+	{
-+#ifdef WCHAR
-+	  FREE_WCS_BUFFERS ();
-+#endif
-+	  return -2;
-+	}
-+
-+    advance:
-+      if (!range)
-+        break;
-+      else if (range > 0)
-+        {
-+          range--;
-+          startpos++;
-+        }
-+      else
-+        {
-+          range++;
-+          startpos--;
-+        }
-+    }
-+#ifdef WCHAR
-+  FREE_WCS_BUFFERS ();
-+#endif
-+  return -1;
-+}
-+
-+#ifdef WCHAR
-+/* This converts PTR, a pointer into one of the search wchar_t strings
-+   `string1' and `string2' into an multibyte string offset from the
-+   beginning of that string. We use mbs_offset to optimize.
-+   See convert_mbs_to_wcs.  */
-+# define POINTER_TO_OFFSET(ptr)						\
-+  (FIRST_STRING_P (ptr)							\
-+   ? ((regoff_t)(mbs_offset1 != NULL? mbs_offset1[(ptr)-string1] : 0))	\
-+   : ((regoff_t)((mbs_offset2 != NULL? mbs_offset2[(ptr)-string2] : 0)	\
-+		 + csize1)))
-+#else /* BYTE */
-+/* This converts PTR, a pointer into one of the search strings `string1'
-+   and `string2' into an offset from the beginning of that string.  */
-+# define POINTER_TO_OFFSET(ptr)			\
-+  (FIRST_STRING_P (ptr)				\
-+   ? ((regoff_t) ((ptr) - string1))		\
-+   : ((regoff_t) ((ptr) - string2 + size1)))
-+#endif /* WCHAR */
-+
-+/* Macros for dealing with the split strings in re_match_2.  */
-+
-+#define MATCHING_IN_FIRST_STRING  (dend == end_match_1)
-+
-+/* Call before fetching a character with *d.  This switches over to
-+   string2 if necessary.  */
-+#define PREFETCH()							\
-+  while (d == dend)						    	\
-+    {									\
-+      /* End of string2 => fail.  */					\
-+      if (dend == end_match_2) 						\
-+        goto fail;							\
-+      /* End of string1 => advance to string2.  */ 			\
-+      d = string2;						        \
-+      dend = end_match_2;						\
-+    }
-+
-+/* Test if at very beginning or at very end of the virtual concatenation
-+   of `string1' and `string2'.  If only one string, it's `string2'.  */
-+#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
-+#define AT_STRINGS_END(d) ((d) == end2)
-+
-+
-+/* Test if D points to a character which is word-constituent.  We have
-+   two special cases to check for: if past the end of string1, look at
-+   the first character in string2; and if before the beginning of
-+   string2, look at the last character in string1.  */
-+#ifdef WCHAR
-+/* Use internationalized API instead of SYNTAX.  */
-+# define WORDCHAR_P(d)							\
-+  (iswalnum ((wint_t)((d) == end1 ? *string2				\
-+           : (d) == string2 - 1 ? *(end1 - 1) : *(d))) != 0		\
-+   || ((d) == end1 ? *string2						\
-+       : (d) == string2 - 1 ? *(end1 - 1) : *(d)) == L'_')
-+#else /* BYTE */
-+# define WORDCHAR_P(d)							\
-+  (SYNTAX ((d) == end1 ? *string2					\
-+           : (d) == string2 - 1 ? *(end1 - 1) : *(d))			\
-+   == Sword)
-+#endif /* WCHAR */
-+
-+/* Disabled due to a compiler bug -- see comment at case wordbound */
-+#if 0
-+/* Test if the character before D and the one at D differ with respect
-+   to being word-constituent.  */
-+#define AT_WORD_BOUNDARY(d)						\
-+  (AT_STRINGS_BEG (d) || AT_STRINGS_END (d)				\
-+   || WORDCHAR_P (d - 1) != WORDCHAR_P (d))
-+#endif
-+
-+/* Free everything we malloc.  */
-+#ifdef MATCH_MAY_ALLOCATE
-+# ifdef WCHAR
-+#  define FREE_VARIABLES()						\
-+  do {									\
-+    REGEX_FREE_STACK (fail_stack.stack);				\
-+    FREE_VAR (regstart);						\
-+    FREE_VAR (regend);							\
-+    FREE_VAR (old_regstart);						\
-+    FREE_VAR (old_regend);						\
-+    FREE_VAR (best_regstart);						\
-+    FREE_VAR (best_regend);						\
-+    FREE_VAR (reg_info);						\
-+    FREE_VAR (reg_dummy);						\
-+    FREE_VAR (reg_info_dummy);						\
-+    if (!cant_free_wcs_buf)						\
-+      {									\
-+        FREE_VAR (string1);						\
-+        FREE_VAR (string2);						\
-+        FREE_VAR (mbs_offset1);						\
-+        FREE_VAR (mbs_offset2);						\
-+      }									\
-+  } while (0)
-+# else /* BYTE */
-+#  define FREE_VARIABLES()						\
-+  do {									\
-+    REGEX_FREE_STACK (fail_stack.stack);				\
-+    FREE_VAR (regstart);						\
-+    FREE_VAR (regend);							\
-+    FREE_VAR (old_regstart);						\
-+    FREE_VAR (old_regend);						\
-+    FREE_VAR (best_regstart);						\
-+    FREE_VAR (best_regend);						\
-+    FREE_VAR (reg_info);						\
-+    FREE_VAR (reg_dummy);						\
-+    FREE_VAR (reg_info_dummy);						\
-+  } while (0)
-+# endif /* WCHAR */
-+#else
-+# ifdef WCHAR
-+#  define FREE_VARIABLES()						\
-+  do {									\
-+    if (!cant_free_wcs_buf)						\
-+      {									\
-+        FREE_VAR (string1);						\
-+        FREE_VAR (string2);						\
-+        FREE_VAR (mbs_offset1);						\
-+        FREE_VAR (mbs_offset2);						\
-+      }									\
-+  } while (0)
-+# else /* BYTE */
-+#  define FREE_VARIABLES() ((void)0) /* Do nothing!  But inhibit gcc warning. */
-+# endif /* WCHAR */
-+#endif /* not MATCH_MAY_ALLOCATE */
-+
-+/* These values must meet several constraints.  They must not be valid
-+   register values; since we have a limit of 255 registers (because
-+   we use only one byte in the pattern for the register number), we can
-+   use numbers larger than 255.  They must differ by 1, because of
-+   NUM_FAILURE_ITEMS above.  And the value for the lowest register must
-+   be larger than the value for the highest register, so we do not try
-+   to actually save any registers when none are active.  */
-+#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH)
-+#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1)
-+
-+#else /* not INSIDE_RECURSION */
-+/* Matching routines.  */
-+
-+#ifndef emacs   /* Emacs never uses this.  */
-+/* re_match is like re_match_2 except it takes only a single string.  */
-+
-+int
-+re_match (struct re_pattern_buffer *bufp, const char *string,
-+          int size, int pos, struct re_registers *regs)
-+{
-+  int result;
-+# ifdef MBS_SUPPORT
-+  if (MB_CUR_MAX != 1)
-+    result = wcs_re_match_2_internal (bufp, NULL, 0, string, size,
-+				      pos, regs, size,
-+				      NULL, 0, NULL, 0, NULL, NULL);
-+  else
-+# endif
-+    result = byte_re_match_2_internal (bufp, NULL, 0, string, size,
-+				  pos, regs, size);
-+# ifndef REGEX_MALLOC
-+#  ifdef C_ALLOCA
-+  alloca (0);
-+#  endif
-+# endif
-+  return result;
-+}
-+# ifdef _LIBC
-+weak_alias (__re_match, re_match)
-+# endif
-+#endif /* not emacs */
-+
-+#endif /* not INSIDE_RECURSION */
-+
-+#ifdef INSIDE_RECURSION
-+static boolean PREFIX(group_match_null_string_p) (UCHAR_T **p,
-+                                                  UCHAR_T *end,
-+					PREFIX(register_info_type) *reg_info);
-+static boolean PREFIX(alt_match_null_string_p) (UCHAR_T *p,
-+                                                UCHAR_T *end,
-+					PREFIX(register_info_type) *reg_info);
-+static boolean PREFIX(common_op_match_null_string_p) (UCHAR_T **p,
-+                                                      UCHAR_T *end,
-+					PREFIX(register_info_type) *reg_info);
-+static int PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2,
-+                                   register int len,
-+				   RE_TRANSLATE_TYPE translate);
-+#else /* not INSIDE_RECURSION */
-+
-+/* re_match_2 matches the compiled pattern in BUFP against the
-+   the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
-+   and SIZE2, respectively).  We start matching at POS, and stop
-+   matching at STOP.
-+
-+   If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
-+   store offsets for the substring each group matched in REGS.  See the
-+   documentation for exactly how many groups we fill.
-+
-+   We return -1 if no match, -2 if an internal error (such as the
-+   failure stack overflowing).  Otherwise, we return the length of the
-+   matched substring.  */
-+
-+int
-+re_match_2 (struct re_pattern_buffer *bufp, const char *string1, int size1,
-+            const char *string2, int size2, int pos,
-+            struct re_registers *regs, int stop)
-+{
-+  int result;
-+# ifdef MBS_SUPPORT
-+  if (MB_CUR_MAX != 1)
-+    result = wcs_re_match_2_internal (bufp, string1, size1, string2, size2,
-+				      pos, regs, stop,
-+				      NULL, 0, NULL, 0, NULL, NULL);
-+  else
-+# endif
-+    result = byte_re_match_2_internal (bufp, string1, size1, string2, size2,
-+				  pos, regs, stop);
-+
-+#ifndef REGEX_MALLOC
-+# ifdef C_ALLOCA
-+  alloca (0);
-+# endif
-+#endif
-+  return result;
-+}
-+#ifdef _LIBC
-+weak_alias (__re_match_2, re_match_2)
-+#endif
-+
-+#endif /* not INSIDE_RECURSION */
-+
-+#ifdef INSIDE_RECURSION
-+
-+#ifdef WCHAR
-+static int count_mbs_length (int *, int);
-+
-+/* This check the substring (from 0, to length) of the multibyte string,
-+   to which offset_buffer correspond. And count how many wchar_t_characters
-+   the substring occupy. We use offset_buffer to optimization.
-+   See convert_mbs_to_wcs.  */
-+
-+static int
-+count_mbs_length(int *offset_buffer, int length)
-+{
-+  int upper, lower;
-+
-+  /* Check whether the size is valid.  */
-+  if (length < 0)
-+    return -1;
-+
-+  if (offset_buffer == NULL)
-+    return 0;
-+
-+  /* If there are no multibyte character, offset_buffer[i] == i.
-+   Optmize for this case.  */
-+  if (offset_buffer[length] == length)
-+    return length;
-+
-+  /* Set up upper with length. (because for all i, offset_buffer[i] >= i)  */
-+  upper = length;
-+  lower = 0;
-+
-+  while (true)
-+    {
-+      int middle = (lower + upper) / 2;
-+      if (middle == lower || middle == upper)
-+	break;
-+      if (offset_buffer[middle] > length)
-+	upper = middle;
-+      else if (offset_buffer[middle] < length)
-+	lower = middle;
-+      else
-+	return middle;
-+    }
-+
-+  return -1;
-+}
-+#endif /* WCHAR */
-+
-+/* This is a separate function so that we can force an alloca cleanup
-+   afterwards.  */
-+#ifdef WCHAR
-+static int
-+wcs_re_match_2_internal (struct re_pattern_buffer *bufp,
-+                         const char *cstring1, int csize1,
-+                         const char *cstring2, int csize2,
-+                         int pos,
-+			 struct re_registers *regs,
-+                         int stop,
-+     /* string1 == string2 == NULL means string1/2, size1/2 and
-+	mbs_offset1/2 need seting up in this function.  */
-+     /* We need wchar_t* buffers correspond to cstring1, cstring2.  */
-+                         wchar_t *string1, int size1,
-+                         wchar_t *string2, int size2,
-+     /* offset buffer for optimizatoin. See convert_mbs_to_wc.  */
-+			 int *mbs_offset1, int *mbs_offset2)
-+#else /* BYTE */
-+static int
-+byte_re_match_2_internal (struct re_pattern_buffer *bufp,
-+                          const char *string1, int size1,
-+                          const char *string2, int size2,
-+                          int pos,
-+			  struct re_registers *regs, int stop)
-+#endif /* BYTE */
-+{
-+  /* General temporaries.  */
-+  int mcnt;
-+  UCHAR_T *p1;
-+#ifdef WCHAR
-+  /* They hold whether each wchar_t is binary data or not.  */
-+  char *is_binary = NULL;
-+  /* If true, we can't free string1/2, mbs_offset1/2.  */
-+  int cant_free_wcs_buf = 1;
-+#endif /* WCHAR */
-+
-+  /* Just past the end of the corresponding string.  */
-+  const CHAR_T *end1, *end2;
-+
-+  /* Pointers into string1 and string2, just past the last characters in
-+     each to consider matching.  */
-+  const CHAR_T *end_match_1, *end_match_2;
-+
-+  /* Where we are in the data, and the end of the current string.  */
-+  const CHAR_T *d, *dend;
-+
-+  /* Where we are in the pattern, and the end of the pattern.  */
-+#ifdef WCHAR
-+  UCHAR_T *pattern, *p;
-+  register UCHAR_T *pend;
-+#else /* BYTE */
-+  UCHAR_T *p = bufp->buffer;
-+  register UCHAR_T *pend = p + bufp->used;
-+#endif /* WCHAR */
-+
-+  /* Mark the opcode just after a start_memory, so we can test for an
-+     empty subpattern when we get to the stop_memory.  */
-+  UCHAR_T *just_past_start_mem = 0;
-+
-+  /* We use this to map every character in the string.  */
-+  RE_TRANSLATE_TYPE translate = bufp->translate;
-+
-+  /* Failure point stack.  Each place that can handle a failure further
-+     down the line pushes a failure point on this stack.  It consists of
-+     restart, regend, and reg_info for all registers corresponding to
-+     the subexpressions we're currently inside, plus the number of such
-+     registers, and, finally, two char *'s.  The first char * is where
-+     to resume scanning the pattern; the second one is where to resume
-+     scanning the strings.  If the latter is zero, the failure point is
-+     a ``dummy''; if a failure happens and the failure point is a dummy,
-+     it gets discarded and the next next one is tried.  */
-+#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global.  */
-+  PREFIX(fail_stack_type) fail_stack;
-+#endif
-+#ifdef DEBUG
-+  static unsigned failure_id;
-+  unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
-+#endif
-+
-+#ifdef REL_ALLOC
-+  /* This holds the pointer to the failure stack, when
-+     it is allocated relocatably.  */
-+  fail_stack_elt_t *failure_stack_ptr;
-+#endif
-+
-+  /* We fill all the registers internally, independent of what we
-+     return, for use in backreferences.  The number here includes
-+     an element for register zero.  */
-+  size_t num_regs = bufp->re_nsub + 1;
-+
-+  /* The currently active registers.  */
-+  active_reg_t lowest_active_reg = NO_LOWEST_ACTIVE_REG;
-+  active_reg_t highest_active_reg = NO_HIGHEST_ACTIVE_REG;
-+
-+  /* Information on the contents of registers. These are pointers into
-+     the input strings; they record just what was matched (on this
-+     attempt) by a subexpression part of the pattern, that is, the
-+     regnum-th regstart pointer points to where in the pattern we began
-+     matching and the regnum-th regend points to right after where we
-+     stopped matching the regnum-th subexpression.  (The zeroth register
-+     keeps track of what the whole pattern matches.)  */
-+#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global.  */
-+  const CHAR_T **regstart, **regend;
-+#endif
-+
-+  /* If a group that's operated upon by a repetition operator fails to
-+     match anything, then the register for its start will need to be
-+     restored because it will have been set to wherever in the string we
-+     are when we last see its open-group operator.  Similarly for a
-+     register's end.  */
-+#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global.  */
-+  const CHAR_T **old_regstart, **old_regend;
-+#endif
-+
-+  /* The is_active field of reg_info helps us keep track of which (possibly
-+     nested) subexpressions we are currently in. The matched_something
-+     field of reg_info[reg_num] helps us tell whether or not we have
-+     matched any of the pattern so far this time through the reg_num-th
-+     subexpression.  These two fields get reset each time through any
-+     loop their register is in.  */
-+#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global.  */
-+  PREFIX(register_info_type) *reg_info;
-+#endif
-+
-+  /* The following record the register info as found in the above
-+     variables when we find a match better than any we've seen before.
-+     This happens as we backtrack through the failure points, which in
-+     turn happens only if we have not yet matched the entire string. */
-+  unsigned best_regs_set = false;
-+#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global.  */
-+  const CHAR_T **best_regstart, **best_regend;
-+#endif
-+
-+  /* Logically, this is `best_regend[0]'.  But we don't want to have to
-+     allocate space for that if we're not allocating space for anything
-+     else (see below).  Also, we never need info about register 0 for
-+     any of the other register vectors, and it seems rather a kludge to
-+     treat `best_regend' differently than the rest.  So we keep track of
-+     the end of the best match so far in a separate variable.  We
-+     initialize this to NULL so that when we backtrack the first time
-+     and need to test it, it's not garbage.  */
-+  const CHAR_T *match_end = NULL;
-+
-+  /* This helps SET_REGS_MATCHED avoid doing redundant work.  */
-+  int set_regs_matched_done = 0;
-+
-+  /* Used when we pop values we don't care about.  */
-+#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global.  */
-+  const CHAR_T **reg_dummy;
-+  PREFIX(register_info_type) *reg_info_dummy;
-+#endif
-+
-+#ifdef DEBUG
-+  /* Counts the total number of registers pushed.  */
-+  unsigned num_regs_pushed = 0;
-+#endif
-+
-+  DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
-+
-+  INIT_FAIL_STACK ();
-+
-+#ifdef MATCH_MAY_ALLOCATE
-+  /* Do not bother to initialize all the register variables if there are
-+     no groups in the pattern, as it takes a fair amount of time.  If
-+     there are groups, we include space for register 0 (the whole
-+     pattern), even though we never use it, since it simplifies the
-+     array indexing.  We should fix this.  */
-+  if (bufp->re_nsub)
-+    {
-+      regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
-+      regend = REGEX_TALLOC (num_regs, const CHAR_T *);
-+      old_regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
-+      old_regend = REGEX_TALLOC (num_regs, const CHAR_T *);
-+      best_regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
-+      best_regend = REGEX_TALLOC (num_regs, const CHAR_T *);
-+      reg_info = REGEX_TALLOC (num_regs, PREFIX(register_info_type));
-+      reg_dummy = REGEX_TALLOC (num_regs, const CHAR_T *);
-+      reg_info_dummy = REGEX_TALLOC (num_regs, PREFIX(register_info_type));
-+
-+      if (!(regstart && regend && old_regstart && old_regend && reg_info
-+            && best_regstart && best_regend && reg_dummy && reg_info_dummy))
-+        {
-+          FREE_VARIABLES ();
-+          return -2;
-+        }
-+    }
-+  else
-+    {
-+      /* We must initialize all our variables to NULL, so that
-+         `FREE_VARIABLES' doesn't try to free them.  */
-+      regstart = regend = old_regstart = old_regend = best_regstart
-+        = best_regend = reg_dummy = NULL;
-+      reg_info = reg_info_dummy = (PREFIX(register_info_type) *) NULL;
-+    }
-+#endif /* MATCH_MAY_ALLOCATE */
-+
-+  /* The starting position is bogus.  */
-+#ifdef WCHAR
-+  if (pos < 0 || pos > csize1 + csize2)
-+#else /* BYTE */
-+  if (pos < 0 || pos > size1 + size2)
-+#endif
-+    {
-+      FREE_VARIABLES ();
-+      return -1;
-+    }
-+
-+#ifdef WCHAR
-+  /* Allocate wchar_t array for string1 and string2 and
-+     fill them with converted string.  */
-+  if (string1 == NULL && string2 == NULL)
-+    {
-+      /* We need seting up buffers here.  */
-+
-+      /* We must free wcs buffers in this function.  */
-+      cant_free_wcs_buf = 0;
-+
-+      if (csize1 != 0)
-+	{
-+	  string1 = REGEX_TALLOC (csize1 + 1, CHAR_T);
-+	  mbs_offset1 = REGEX_TALLOC (csize1 + 1, int);
-+	  is_binary = REGEX_TALLOC (csize1 + 1, char);
-+	  if (!string1 || !mbs_offset1 || !is_binary)
-+	    {
-+	      FREE_VAR (string1);
-+	      FREE_VAR (mbs_offset1);
-+	      FREE_VAR (is_binary);
-+	      return -2;
-+	    }
-+	}
-+      if (csize2 != 0)
-+	{
-+	  string2 = REGEX_TALLOC (csize2 + 1, CHAR_T);
-+	  mbs_offset2 = REGEX_TALLOC (csize2 + 1, int);
-+	  is_binary = REGEX_TALLOC (csize2 + 1, char);
-+	  if (!string2 || !mbs_offset2 || !is_binary)
-+	    {
-+	      FREE_VAR (string1);
-+	      FREE_VAR (mbs_offset1);
-+	      FREE_VAR (string2);
-+	      FREE_VAR (mbs_offset2);
-+	      FREE_VAR (is_binary);
-+	      return -2;
-+	    }
-+	  size2 = convert_mbs_to_wcs(string2, cstring2, csize2,
-+				     mbs_offset2, is_binary);
-+	  string2[size2] = L'\0'; /* for a sentinel  */
-+	  FREE_VAR (is_binary);
-+	}
-+    }
-+
-+  /* We need to cast pattern to (wchar_t*), because we casted this compiled
-+     pattern to (char*) in regex_compile.  */
-+  p = pattern = (CHAR_T*)bufp->buffer;
-+  pend = (CHAR_T*)(bufp->buffer + bufp->used);
-+
-+#endif /* WCHAR */
-+
-+  /* Initialize subexpression text positions to -1 to mark ones that no
-+     start_memory/stop_memory has been seen for. Also initialize the
-+     register information struct.  */
-+  for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
-+    {
-+      regstart[mcnt] = regend[mcnt]
-+        = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE;
-+
-+      REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE;
-+      IS_ACTIVE (reg_info[mcnt]) = 0;
-+      MATCHED_SOMETHING (reg_info[mcnt]) = 0;
-+      EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0;
-+    }
-+
-+  /* We move `string1' into `string2' if the latter's empty -- but not if
-+     `string1' is null.  */
-+  if (size2 == 0 && string1 != NULL)
-+    {
-+      string2 = string1;
-+      size2 = size1;
-+      string1 = 0;
-+      size1 = 0;
-+#ifdef WCHAR
-+      mbs_offset2 = mbs_offset1;
-+      csize2 = csize1;
-+      mbs_offset1 = NULL;
-+      csize1 = 0;
-+#endif
-+    }
-+  end1 = string1 + size1;
-+  end2 = string2 + size2;
-+
-+  /* Compute where to stop matching, within the two strings.  */
-+#ifdef WCHAR
-+  if (stop <= csize1)
-+    {
-+      mcnt = count_mbs_length(mbs_offset1, stop);
-+      end_match_1 = string1 + mcnt;
-+      end_match_2 = string2;
-+    }
-+  else
-+    {
-+      if (stop > csize1 + csize2)
-+	stop = csize1 + csize2;
-+      end_match_1 = end1;
-+      mcnt = count_mbs_length(mbs_offset2, stop-csize1);
-+      end_match_2 = string2 + mcnt;
-+    }
-+  if (mcnt < 0)
-+    { /* count_mbs_length return error.  */
-+      FREE_VARIABLES ();
-+      return -1;
-+    }
-+#else
-+  if (stop <= size1)
-+    {
-+      end_match_1 = string1 + stop;
-+      end_match_2 = string2;
-+    }
-+  else
-+    {
-+      end_match_1 = end1;
-+      end_match_2 = string2 + stop - size1;
-+    }
-+#endif /* WCHAR */
-+
-+  /* `p' scans through the pattern as `d' scans through the data.
-+     `dend' is the end of the input string that `d' points within.  `d'
-+     is advanced into the following input string whenever necessary, but
-+     this happens before fetching; therefore, at the beginning of the
-+     loop, `d' can be pointing at the end of a string, but it cannot
-+     equal `string2'.  */
-+#ifdef WCHAR
-+  if (size1 > 0 && pos <= csize1)
-+    {
-+      mcnt = count_mbs_length(mbs_offset1, pos);
-+      d = string1 + mcnt;
-+      dend = end_match_1;
-+    }
-+  else
-+    {
-+      mcnt = count_mbs_length(mbs_offset2, pos-csize1);
-+      d = string2 + mcnt;
-+      dend = end_match_2;
-+    }
-+
-+  if (mcnt < 0)
-+    { /* count_mbs_length return error.  */
-+      FREE_VARIABLES ();
-+      return -1;
-+    }
-+#else
-+  if (size1 > 0 && pos <= size1)
-+    {
-+      d = string1 + pos;
-+      dend = end_match_1;
-+    }
-+  else
-+    {
-+      d = string2 + pos - size1;
-+      dend = end_match_2;
-+    }
-+#endif /* WCHAR */
-+
-+  DEBUG_PRINT1 ("The compiled pattern is:\n");
-+  DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
-+  DEBUG_PRINT1 ("The string to match is: `");
-+  DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
-+  DEBUG_PRINT1 ("'\n");
-+
-+  /* This loops over pattern commands.  It exits by returning from the
-+     function if the match is complete, or it drops through if the match
-+     fails at this starting point in the input data.  */
-+  for (;;)
-+    {
-+#ifdef _LIBC
-+      DEBUG_PRINT2 ("\n%p: ", p);
-+#else
-+      DEBUG_PRINT2 ("\n0x%x: ", p);
-+#endif
-+
-+      if (p == pend)
-+	{ /* End of pattern means we might have succeeded.  */
-+          DEBUG_PRINT1 ("end of pattern ... ");
-+
-+	  /* If we haven't matched the entire string, and we want the
-+             longest match, try backtracking.  */
-+          if (d != end_match_2)
-+	    {
-+	      /* 1 if this match ends in the same string (string1 or string2)
-+		 as the best previous match.  */
-+	      boolean same_str_p = (FIRST_STRING_P (match_end)
-+				    == MATCHING_IN_FIRST_STRING);
-+	      /* 1 if this match is the best seen so far.  */
-+	      boolean best_match_p;
-+
-+	      /* AIX compiler got confused when this was combined
-+		 with the previous declaration.  */
-+	      if (same_str_p)
-+		best_match_p = d > match_end;
-+	      else
-+		best_match_p = !MATCHING_IN_FIRST_STRING;
-+
-+              DEBUG_PRINT1 ("backtracking.\n");
-+
-+              if (!FAIL_STACK_EMPTY ())
-+                { /* More failure points to try.  */
-+
-+                  /* If exceeds best match so far, save it.  */
-+                  if (!best_regs_set || best_match_p)
-+                    {
-+                      best_regs_set = true;
-+                      match_end = d;
-+
-+                      DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
-+
-+                      for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
-+                        {
-+                          best_regstart[mcnt] = regstart[mcnt];
-+                          best_regend[mcnt] = regend[mcnt];
-+                        }
-+                    }
-+                  goto fail;
-+                }
-+
-+              /* If no failure points, don't restore garbage.  And if
-+                 last match is real best match, don't restore second
-+                 best one. */
-+              else if (best_regs_set && !best_match_p)
-+                {
-+  	        restore_best_regs:
-+                  /* Restore best match.  It may happen that `dend ==
-+                     end_match_1' while the restored d is in string2.
-+                     For example, the pattern `x.*y.*z' against the
-+                     strings `x-' and `y-z-', if the two strings are
-+                     not consecutive in memory.  */
-+                  DEBUG_PRINT1 ("Restoring best registers.\n");
-+
-+                  d = match_end;
-+                  dend = ((d >= string1 && d <= end1)
-+		           ? end_match_1 : end_match_2);
-+
-+		  for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
-+		    {
-+		      regstart[mcnt] = best_regstart[mcnt];
-+		      regend[mcnt] = best_regend[mcnt];
-+		    }
-+                }
-+            } /* d != end_match_2 */
-+
-+	succeed_label:
-+          DEBUG_PRINT1 ("Accepting match.\n");
-+          /* If caller wants register contents data back, do it.  */
-+          if (regs && !bufp->no_sub)
-+	    {
-+	      /* Have the register data arrays been allocated?  */
-+              if (bufp->regs_allocated == REGS_UNALLOCATED)
-+                { /* No.  So allocate them with malloc.  We need one
-+                     extra element beyond `num_regs' for the `-1' marker
-+                     GNU code uses.  */
-+                  regs->num_regs = MAX (RE_NREGS, num_regs + 1);
-+                  regs->start = TALLOC (regs->num_regs, regoff_t);
-+                  regs->end = TALLOC (regs->num_regs, regoff_t);
-+                  if (regs->start == NULL || regs->end == NULL)
-+		    {
-+		      FREE_VARIABLES ();
-+		      return -2;
-+		    }
-+                  bufp->regs_allocated = REGS_REALLOCATE;
-+                }
-+              else if (bufp->regs_allocated == REGS_REALLOCATE)
-+                { /* Yes.  If we need more elements than were already
-+                     allocated, reallocate them.  If we need fewer, just
-+                     leave it alone.  */
-+                  if (regs->num_regs < num_regs + 1)
-+                    {
-+                      regs->num_regs = num_regs + 1;
-+                      RETALLOC (regs->start, regs->num_regs, regoff_t);
-+                      RETALLOC (regs->end, regs->num_regs, regoff_t);
-+                      if (regs->start == NULL || regs->end == NULL)
-+			{
-+			  FREE_VARIABLES ();
-+			  return -2;
-+			}
-+                    }
-+                }
-+              else
-+		{
-+		  /* These braces fend off a "empty body in an else-statement"
-+		     warning under GCC when assert expands to nothing.  */
-+		  assert (bufp->regs_allocated == REGS_FIXED);
-+		}
-+
-+              /* Convert the pointer data in `regstart' and `regend' to
-+                 indices.  Register zero has to be set differently,
-+                 since we haven't kept track of any info for it.  */
-+              if (regs->num_regs > 0)
-+                {
-+                  regs->start[0] = pos;
-+#ifdef WCHAR
-+		  if (MATCHING_IN_FIRST_STRING)
-+		    regs->end[0] = mbs_offset1 != NULL ?
-+					mbs_offset1[d-string1] : 0;
-+		  else
-+		    regs->end[0] = csize1 + (mbs_offset2 != NULL ?
-+					     mbs_offset2[d-string2] : 0);
-+#else
-+                  regs->end[0] = (MATCHING_IN_FIRST_STRING
-+				  ? ((regoff_t) (d - string1))
-+			          : ((regoff_t) (d - string2 + size1)));
-+#endif /* WCHAR */
-+                }
-+
-+              /* Go through the first `min (num_regs, regs->num_regs)'
-+                 registers, since that is all we initialized.  */
-+	      for (mcnt = 1; (unsigned) mcnt < MIN (num_regs, regs->num_regs);
-+		   mcnt++)
-+		{
-+                  if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
-+                    regs->start[mcnt] = regs->end[mcnt] = -1;
-+                  else
-+                    {
-+		      regs->start[mcnt]
-+			= (regoff_t) POINTER_TO_OFFSET (regstart[mcnt]);
-+                      regs->end[mcnt]
-+			= (regoff_t) POINTER_TO_OFFSET (regend[mcnt]);
-+                    }
-+		}
-+
-+              /* If the regs structure we return has more elements than
-+                 were in the pattern, set the extra elements to -1.  If
-+                 we (re)allocated the registers, this is the case,
-+                 because we always allocate enough to have at least one
-+                 -1 at the end.  */
-+              for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
-+                regs->start[mcnt] = regs->end[mcnt] = -1;
-+	    } /* regs && !bufp->no_sub */
-+
-+          DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
-+                        nfailure_points_pushed, nfailure_points_popped,
-+                        nfailure_points_pushed - nfailure_points_popped);
-+          DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
-+
-+#ifdef WCHAR
-+	  if (MATCHING_IN_FIRST_STRING)
-+	    mcnt = mbs_offset1 != NULL ? mbs_offset1[d-string1] : 0;
-+	  else
-+	    mcnt = (mbs_offset2 != NULL ? mbs_offset2[d-string2] : 0) +
-+			csize1;
-+          mcnt -= pos;
-+#else
-+          mcnt = d - pos - (MATCHING_IN_FIRST_STRING
-+			    ? string1
-+			    : string2 - size1);
-+#endif /* WCHAR */
-+
-+          DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
-+
-+          FREE_VARIABLES ();
-+          return mcnt;
-+        }
-+
-+      /* Otherwise match next pattern command.  */
-+      switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
-+	{
-+        /* Ignore these.  Used to ignore the n of succeed_n's which
-+           currently have n == 0.  */
-+        case no_op:
-+          DEBUG_PRINT1 ("EXECUTING no_op.\n");
-+          break;
-+
-+	case succeed:
-+          DEBUG_PRINT1 ("EXECUTING succeed.\n");
-+	  goto succeed_label;
-+
-+        /* Match the next n pattern characters exactly.  The following
-+           byte in the pattern defines n, and the n bytes after that
-+           are the characters to match.  */
-+	case exactn:
-+#ifdef MBS_SUPPORT
-+	case exactn_bin:
-+#endif
-+	  mcnt = *p++;
-+          DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
-+
-+          /* This is written out as an if-else so we don't waste time
-+             testing `translate' inside the loop.  */
-+          if (translate)
-+	    {
-+	      do
-+		{
-+		  PREFETCH ();
-+#ifdef WCHAR
-+		  if (*d <= 0xff)
-+		    {
-+		      if ((UCHAR_T) translate[(unsigned char) *d++]
-+			  != (UCHAR_T) *p++)
-+			goto fail;
-+		    }
-+		  else
-+		    {
-+		      if (*d++ != (CHAR_T) *p++)
-+			goto fail;
-+		    }
-+#else
-+		  if ((UCHAR_T) translate[(unsigned char) *d++]
-+		      != (UCHAR_T) *p++)
-+                    goto fail;
-+#endif /* WCHAR */
-+		}
-+	      while (--mcnt);
-+	    }
-+	  else
-+	    {
-+	      do
-+		{
-+		  PREFETCH ();
-+		  if (*d++ != (CHAR_T) *p++) goto fail;
-+		}
-+	      while (--mcnt);
-+	    }
-+	  SET_REGS_MATCHED ();
-+          break;
-+
-+
-+        /* Match any character except possibly a newline or a null.  */
-+	case anychar:
-+          DEBUG_PRINT1 ("EXECUTING anychar.\n");
-+
-+          PREFETCH ();
-+
-+          if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n')
-+              || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000'))
-+	    goto fail;
-+
-+          SET_REGS_MATCHED ();
-+          DEBUG_PRINT2 ("  Matched `%ld'.\n", (long int) *d);
-+          d++;
-+	  break;
-+
-+
-+	case charset:
-+	case charset_not:
-+	  {
-+	    register UCHAR_T c;
-+#ifdef WCHAR
-+	    unsigned int i, char_class_length, coll_symbol_length,
-+              equiv_class_length, ranges_length, chars_length, length;
-+	    CHAR_T *workp, *workp2, *charset_top;
-+#define WORK_BUFFER_SIZE 128
-+            CHAR_T str_buf[WORK_BUFFER_SIZE];
-+# ifdef _LIBC
-+	    uint32_t nrules;
-+# endif /* _LIBC */
-+#endif /* WCHAR */
-+	    boolean negate = (re_opcode_t) *(p - 1) == charset_not;
-+
-+            DEBUG_PRINT2 ("EXECUTING charset%s.\n", negate ? "_not" : "");
-+	    PREFETCH ();
-+	    c = TRANSLATE (*d); /* The character to match.  */
-+#ifdef WCHAR
-+# ifdef _LIBC
-+	    nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
-+# endif /* _LIBC */
-+	    charset_top = p - 1;
-+	    char_class_length = *p++;
-+	    coll_symbol_length = *p++;
-+	    equiv_class_length = *p++;
-+	    ranges_length = *p++;
-+	    chars_length = *p++;
-+	    /* p points charset[6], so the address of the next instruction
-+	       (charset[l+m+n+2o+k+p']) equals p[l+m+n+2*o+p'],
-+	       where l=length of char_classes, m=length of collating_symbol,
-+	       n=equivalence_class, o=length of char_range,
-+	       p'=length of character.  */
-+	    workp = p;
-+	    /* Update p to indicate the next instruction.  */
-+	    p += char_class_length + coll_symbol_length+ equiv_class_length +
-+              2*ranges_length + chars_length;
-+
-+            /* match with char_class?  */
-+	    for (i = 0; i < char_class_length ; i += CHAR_CLASS_SIZE)
-+	      {
-+		wctype_t wctype;
-+		uintptr_t alignedp = ((uintptr_t)workp
-+				      + __alignof__(wctype_t) - 1)
-+		  		      & ~(uintptr_t)(__alignof__(wctype_t) - 1);
-+		wctype = *((wctype_t*)alignedp);
-+		workp += CHAR_CLASS_SIZE;
-+# ifdef _LIBC
-+		if (__iswctype((wint_t)c, wctype))
-+		  goto char_set_matched;
-+# else
-+		if (iswctype((wint_t)c, wctype))
-+		  goto char_set_matched;
-+# endif
-+	      }
-+
-+            /* match with collating_symbol?  */
-+# ifdef _LIBC
-+	    if (nrules != 0)
-+	      {
-+		const unsigned char *extra = (const unsigned char *)
-+		  _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
-+
-+		for (workp2 = workp + coll_symbol_length ; workp < workp2 ;
-+		     workp++)
-+		  {
-+		    int32_t *wextra;
-+		    wextra = (int32_t*)(extra + *workp++);
-+		    for (i = 0; i < *wextra; ++i)
-+		      if (TRANSLATE(d[i]) != wextra[1 + i])
-+			break;
-+
-+		    if (i == *wextra)
-+		      {
-+			/* Update d, however d will be incremented at
-+			   char_set_matched:, we decrement d here.  */
-+			d += i - 1;
-+			goto char_set_matched;
-+		      }
-+		  }
-+	      }
-+	    else /* (nrules == 0) */
-+# endif
-+	      /* If we can't look up collation data, we use wcscoll
-+		 instead.  */
-+	      {
-+		for (workp2 = workp + coll_symbol_length ; workp < workp2 ;)
-+		  {
-+		    const CHAR_T *backup_d = d, *backup_dend = dend;
-+# ifdef _LIBC
-+		    length = __wcslen (workp);
-+# else
-+		    length = wcslen (workp);
-+# endif
-+
-+		    /* If wcscoll(the collating symbol, whole string) > 0,
-+		       any substring of the string never match with the
-+		       collating symbol.  */
-+# ifdef _LIBC
-+		    if (__wcscoll (workp, d) > 0)
-+# else
-+		    if (wcscoll (workp, d) > 0)
-+# endif
-+		      {
-+			workp += length + 1;
-+			continue;
-+		      }
-+
-+		    /* First, we compare the collating symbol with
-+		       the first character of the string.
-+		       If it don't match, we add the next character to
-+		       the compare buffer in turn.  */
-+		    for (i = 0 ; i < WORK_BUFFER_SIZE-1 ; i++, d++)
-+		      {
-+			int match;
-+			if (d == dend)
-+			  {
-+			    if (dend == end_match_2)
-+			      break;
-+			    d = string2;
-+			    dend = end_match_2;
-+			  }
-+
-+			/* add next character to the compare buffer.  */
-+			str_buf[i] = TRANSLATE(*d);
-+			str_buf[i+1] = '\0';
-+
-+# ifdef _LIBC
-+			match = __wcscoll (workp, str_buf);
-+# else
-+			match = wcscoll (workp, str_buf);
-+# endif
-+			if (match == 0)
-+			  goto char_set_matched;
-+
-+			if (match < 0)
-+			  /* (str_buf > workp) indicate (str_buf + X > workp),
-+			     because for all X (str_buf + X > str_buf).
-+			     So we don't need continue this loop.  */
-+			  break;
-+
-+			/* Otherwise(str_buf < workp),
-+			   (str_buf+next_character) may equals (workp).
-+			   So we continue this loop.  */
-+		      }
-+		    /* not matched */
-+		    d = backup_d;
-+		    dend = backup_dend;
-+		    workp += length + 1;
-+		  }
-+              }
-+            /* match with equivalence_class?  */
-+# ifdef _LIBC
-+	    if (nrules != 0)
-+	      {
-+                const CHAR_T *backup_d = d, *backup_dend = dend;
-+		/* Try to match the equivalence class against
-+		   those known to the collate implementation.  */
-+		const int32_t *table;
-+		const int32_t *weights;
-+		const int32_t *extra;
-+		const int32_t *indirect;
-+		int32_t idx, idx2;
-+		wint_t *cp;
-+		size_t len;
-+
-+		table = (const int32_t *)
-+		  _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC);
-+		weights = (const wint_t *)
-+		  _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC);
-+		extra = (const wint_t *)
-+		  _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC);
-+		indirect = (const int32_t *)
-+		  _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC);
-+
-+		/* Write 1 collating element to str_buf, and
-+		   get its index.  */
-+		idx2 = 0;
-+
-+		for (i = 0 ; idx2 == 0 && i < WORK_BUFFER_SIZE - 1; i++)
-+		  {
-+		    cp = (wint_t*)str_buf;
-+		    if (d == dend)
-+		      {
-+			if (dend == end_match_2)
-+			  break;
-+			d = string2;
-+			dend = end_match_2;
-+		      }
-+		    str_buf[i] = TRANSLATE(*(d+i));
-+		    str_buf[i+1] = '\0'; /* sentinel */
-+		    idx2 = FINDIDX (table, indirect, extra, &cp, 1);
-+		  }
-+
-+		/* Update d, however d will be incremented at
-+		   char_set_matched:, we decrement d here.  */
-+		d = backup_d + ((wchar_t*)cp - (wchar_t*)str_buf - 1);
-+		if (d >= dend)
-+		  {
-+		    if (dend == end_match_2)
-+			d = dend;
-+		    else
-+		      {
-+			d = string2;
-+			dend = end_match_2;
-+		      }
-+		  }
-+
-+		len = weights[idx2];
-+
-+		for (workp2 = workp + equiv_class_length ; workp < workp2 ;
-+		     workp++)
-+		  {
-+		    idx = (int32_t)*workp;
-+		    /* We already checked idx != 0 in regex_compile. */
-+
-+		    if (idx2 != 0 && len == weights[idx])
-+		      {
-+			int cnt = 0;
-+			while (cnt < len && (weights[idx + 1 + cnt]
-+					     == weights[idx2 + 1 + cnt]))
-+			  ++cnt;
-+
-+			if (cnt == len)
-+			  goto char_set_matched;
-+		      }
-+		  }
-+		/* not matched */
-+                d = backup_d;
-+                dend = backup_dend;
-+	      }
-+	    else /* (nrules == 0) */
-+# endif
-+	      /* If we can't look up collation data, we use wcscoll
-+		 instead.  */
-+	      {
-+		for (workp2 = workp + equiv_class_length ; workp < workp2 ;)
-+		  {
-+		    const CHAR_T *backup_d = d, *backup_dend = dend;
-+# ifdef _LIBC
-+		    length = __wcslen (workp);
-+# else
-+		    length = wcslen (workp);
-+# endif
-+
-+		    /* If wcscoll(the collating symbol, whole string) > 0,
-+		       any substring of the string never match with the
-+		       collating symbol.  */
-+# ifdef _LIBC
-+		    if (__wcscoll (workp, d) > 0)
-+# else
-+		    if (wcscoll (workp, d) > 0)
-+# endif
-+		      {
-+			workp += length + 1;
-+			break;
-+		      }
-+
-+		    /* First, we compare the equivalence class with
-+		       the first character of the string.
-+		       If it don't match, we add the next character to
-+		       the compare buffer in turn.  */
-+		    for (i = 0 ; i < WORK_BUFFER_SIZE - 1 ; i++, d++)
-+		      {
-+			int match;
-+			if (d == dend)
-+			  {
-+			    if (dend == end_match_2)
-+			      break;
-+			    d = string2;
-+			    dend = end_match_2;
-+			  }
-+
-+			/* add next character to the compare buffer.  */
-+			str_buf[i] = TRANSLATE(*d);
-+			str_buf[i+1] = '\0';
-+
-+# ifdef _LIBC
-+			match = __wcscoll (workp, str_buf);
-+# else
-+			match = wcscoll (workp, str_buf);
-+# endif
-+
-+			if (match == 0)
-+			  goto char_set_matched;
-+
-+			if (match < 0)
-+			/* (str_buf > workp) indicate (str_buf + X > workp),
-+			   because for all X (str_buf + X > str_buf).
-+			   So we don't need continue this loop.  */
-+			  break;
-+
-+			/* Otherwise(str_buf < workp),
-+			   (str_buf+next_character) may equals (workp).
-+			   So we continue this loop.  */
-+		      }
-+		    /* not matched */
-+		    d = backup_d;
-+		    dend = backup_dend;
-+		    workp += length + 1;
-+		  }
-+	      }
-+
-+            /* match with char_range?  */
-+# ifdef _LIBC
-+	    if (nrules != 0)
-+	      {
-+		uint32_t collseqval;
-+		const char *collseq = (const char *)
-+		  _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC);
-+
-+		collseqval = collseq_table_lookup (collseq, c);
-+
-+		for (; workp < p - chars_length ;)
-+		  {
-+		    uint32_t start_val, end_val;
-+
-+		    /* We already compute the collation sequence value
-+		       of the characters (or collating symbols).  */
-+		    start_val = (uint32_t) *workp++; /* range_start */
-+		    end_val = (uint32_t) *workp++; /* range_end */
-+
-+		    if (start_val <= collseqval && collseqval <= end_val)
-+		      goto char_set_matched;
-+		  }
-+	      }
-+	    else
-+# endif
-+	      {
-+		/* We set range_start_char at str_buf[0], range_end_char
-+		   at str_buf[4], and compared char at str_buf[2].  */
-+		str_buf[1] = 0;
-+		str_buf[2] = c;
-+		str_buf[3] = 0;
-+		str_buf[5] = 0;
-+		for (; workp < p - chars_length ;)
-+		  {
-+		    wchar_t *range_start_char, *range_end_char;
-+
-+		    /* match if (range_start_char <= c <= range_end_char).  */
-+
-+		    /* If range_start(or end) < 0, we assume -range_start(end)
-+		       is the offset of the collating symbol which is specified
-+		       as the character of the range start(end).  */
-+
-+		    /* range_start */
-+		    if (*workp < 0)
-+		      range_start_char = charset_top - (*workp++);
-+		    else
-+		      {
-+			str_buf[0] = *workp++;
-+			range_start_char = str_buf;
-+		      }
-+
-+		    /* range_end */
-+		    if (*workp < 0)
-+		      range_end_char = charset_top - (*workp++);
-+		    else
-+		      {
-+			str_buf[4] = *workp++;
-+			range_end_char = str_buf + 4;
-+		      }
-+
-+# ifdef _LIBC
-+		    if (__wcscoll (range_start_char, str_buf+2) <= 0
-+			&& __wcscoll (str_buf+2, range_end_char) <= 0)
-+# else
-+		    if (wcscoll (range_start_char, str_buf+2) <= 0
-+			&& wcscoll (str_buf+2, range_end_char) <= 0)
-+# endif
-+		      goto char_set_matched;
-+		  }
-+	      }
-+
-+            /* match with char?  */
-+	    for (; workp < p ; workp++)
-+	      if (c == *workp)
-+		goto char_set_matched;
-+
-+	    negate = !negate;
-+
-+	  char_set_matched:
-+	    if (negate) goto fail;
-+#else
-+            /* Cast to `unsigned' instead of `unsigned char' in case the
-+               bit list is a full 32 bytes long.  */
-+	    if (c < (unsigned) (*p * BYTEWIDTH)
-+		&& p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
-+	      negate = !negate;
-+
-+	    p += 1 + *p;
-+
-+	    if (!negate) goto fail;
-+#undef WORK_BUFFER_SIZE
-+#endif /* WCHAR */
-+	    SET_REGS_MATCHED ();
-+            d++;
-+	    break;
-+	  }
-+
-+
-+        /* The beginning of a group is represented by start_memory.
-+           The arguments are the register number in the next byte, and the
-+           number of groups inner to this one in the next.  The text
-+           matched within the group is recorded (in the internal
-+           registers data structure) under the register number.  */
-+        case start_memory:
-+	  DEBUG_PRINT3 ("EXECUTING start_memory %ld (%ld):\n",
-+			(long int) *p, (long int) p[1]);
-+
-+          /* Find out if this group can match the empty string.  */
-+	  p1 = p;		/* To send to group_match_null_string_p.  */
-+
-+          if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE)
-+            REG_MATCH_NULL_STRING_P (reg_info[*p])
-+              = PREFIX(group_match_null_string_p) (&p1, pend, reg_info);
-+
-+          /* Save the position in the string where we were the last time
-+             we were at this open-group operator in case the group is
-+             operated upon by a repetition operator, e.g., with `(a*)*b'
-+             against `ab'; then we want to ignore where we are now in
-+             the string in case this attempt to match fails.  */
-+          old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
-+                             ? REG_UNSET (regstart[*p]) ? d : regstart[*p]
-+                             : regstart[*p];
-+	  DEBUG_PRINT2 ("  old_regstart: %d\n",
-+			 POINTER_TO_OFFSET (old_regstart[*p]));
-+
-+          regstart[*p] = d;
-+	  DEBUG_PRINT2 ("  regstart: %d\n", POINTER_TO_OFFSET (regstart[*p]));
-+
-+          IS_ACTIVE (reg_info[*p]) = 1;
-+          MATCHED_SOMETHING (reg_info[*p]) = 0;
-+
-+	  /* Clear this whenever we change the register activity status.  */
-+	  set_regs_matched_done = 0;
-+
-+          /* This is the new highest active register.  */
-+          highest_active_reg = *p;
-+
-+          /* If nothing was active before, this is the new lowest active
-+             register.  */
-+          if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
-+            lowest_active_reg = *p;
-+
-+          /* Move past the register number and inner group count.  */
-+          p += 2;
-+	  just_past_start_mem = p;
-+
-+          break;
-+
-+
-+        /* The stop_memory opcode represents the end of a group.  Its
-+           arguments are the same as start_memory's: the register
-+           number, and the number of inner groups.  */
-+	case stop_memory:
-+	  DEBUG_PRINT3 ("EXECUTING stop_memory %ld (%ld):\n",
-+			(long int) *p, (long int) p[1]);
-+
-+          /* We need to save the string position the last time we were at
-+             this close-group operator in case the group is operated
-+             upon by a repetition operator, e.g., with `((a*)*(b*)*)*'
-+             against `aba'; then we want to ignore where we are now in
-+             the string in case this attempt to match fails.  */
-+          old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
-+                           ? REG_UNSET (regend[*p]) ? d : regend[*p]
-+			   : regend[*p];
-+	  DEBUG_PRINT2 ("      old_regend: %d\n",
-+			 POINTER_TO_OFFSET (old_regend[*p]));
-+
-+          regend[*p] = d;
-+	  DEBUG_PRINT2 ("      regend: %d\n", POINTER_TO_OFFSET (regend[*p]));
-+
-+          /* This register isn't active anymore.  */
-+          IS_ACTIVE (reg_info[*p]) = 0;
-+
-+	  /* Clear this whenever we change the register activity status.  */
-+	  set_regs_matched_done = 0;
-+
-+          /* If this was the only register active, nothing is active
-+             anymore.  */
-+          if (lowest_active_reg == highest_active_reg)
-+            {
-+              lowest_active_reg = NO_LOWEST_ACTIVE_REG;
-+              highest_active_reg = NO_HIGHEST_ACTIVE_REG;
-+            }
-+          else
-+            { /* We must scan for the new highest active register, since
-+                 it isn't necessarily one less than now: consider
-+                 (a(b)c(d(e)f)g).  When group 3 ends, after the f), the
-+                 new highest active register is 1.  */
-+              UCHAR_T r = *p - 1;
-+              while (r > 0 && !IS_ACTIVE (reg_info[r]))
-+                r--;
-+
-+              /* If we end up at register zero, that means that we saved
-+                 the registers as the result of an `on_failure_jump', not
-+                 a `start_memory', and we jumped to past the innermost
-+                 `stop_memory'.  For example, in ((.)*) we save
-+                 registers 1 and 2 as a result of the *, but when we pop
-+                 back to the second ), we are at the stop_memory 1.
-+                 Thus, nothing is active.  */
-+	      if (r == 0)
-+                {
-+                  lowest_active_reg = NO_LOWEST_ACTIVE_REG;
-+                  highest_active_reg = NO_HIGHEST_ACTIVE_REG;
-+                }
-+              else
-+                highest_active_reg = r;
-+            }
-+
-+          /* If just failed to match something this time around with a
-+             group that's operated on by a repetition operator, try to
-+             force exit from the ``loop'', and restore the register
-+             information for this group that we had before trying this
-+             last match.  */
-+          if ((!MATCHED_SOMETHING (reg_info[*p])
-+               || just_past_start_mem == p - 1)
-+	      && (p + 2) < pend)
-+            {
-+              boolean is_a_jump_n = false;
-+
-+              p1 = p + 2;
-+              mcnt = 0;
-+              switch ((re_opcode_t) *p1++)
-+                {
-+                  case jump_n:
-+		    is_a_jump_n = true;
-+                  case pop_failure_jump:
-+		  case maybe_pop_jump:
-+		  case jump:
-+		  case dummy_failure_jump:
-+                    EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-+		    if (is_a_jump_n)
-+		      p1 += OFFSET_ADDRESS_SIZE;
-+                    break;
-+
-+                  default:
-+                    /* do nothing */ ;
-+                }
-+	      p1 += mcnt;
-+
-+              /* If the next operation is a jump backwards in the pattern
-+	         to an on_failure_jump right before the start_memory
-+                 corresponding to this stop_memory, exit from the loop
-+                 by forcing a failure after pushing on the stack the
-+                 on_failure_jump's jump in the pattern, and d.  */
-+              if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump
-+                  && (re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == start_memory
-+		  && p1[2+OFFSET_ADDRESS_SIZE] == *p)
-+		{
-+                  /* If this group ever matched anything, then restore
-+                     what its registers were before trying this last
-+                     failed match, e.g., with `(a*)*b' against `ab' for
-+                     regstart[1], and, e.g., with `((a*)*(b*)*)*'
-+                     against `aba' for regend[3].
-+
-+                     Also restore the registers for inner groups for,
-+                     e.g., `((a*)(b*))*' against `aba' (register 3 would
-+                     otherwise get trashed).  */
-+
-+                  if (EVER_MATCHED_SOMETHING (reg_info[*p]))
-+		    {
-+		      unsigned r;
-+
-+                      EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
-+
-+		      /* Restore this and inner groups' (if any) registers.  */
-+                      for (r = *p; r < (unsigned) *p + (unsigned) *(p + 1);
-+			   r++)
-+                        {
-+                          regstart[r] = old_regstart[r];
-+
-+                          /* xx why this test?  */
-+                          if (old_regend[r] >= regstart[r])
-+                            regend[r] = old_regend[r];
-+                        }
-+                    }
-+		  p1++;
-+                  EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-+                  PUSH_FAILURE_POINT (p1 + mcnt, d, -2);
-+
-+                  goto fail;
-+                }
-+            }
-+
-+          /* Move past the register number and the inner group count.  */
-+          p += 2;
-+          break;
-+
-+
-+	/* \<digit> has been turned into a `duplicate' command which is
-+           followed by the numeric value of <digit> as the register number.  */
-+        case duplicate:
-+	  {
-+	    register const CHAR_T *d2, *dend2;
-+	    int regno = *p++;   /* Get which register to match against.  */
-+	    DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
-+
-+	    /* Can't back reference a group which we've never matched.  */
-+            if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
-+              goto fail;
-+
-+            /* Where in input to try to start matching.  */
-+            d2 = regstart[regno];
-+
-+            /* Where to stop matching; if both the place to start and
-+               the place to stop matching are in the same string, then
-+               set to the place to stop, otherwise, for now have to use
-+               the end of the first string.  */
-+
-+            dend2 = ((FIRST_STRING_P (regstart[regno])
-+		      == FIRST_STRING_P (regend[regno]))
-+		     ? regend[regno] : end_match_1);
-+	    for (;;)
-+	      {
-+		/* If necessary, advance to next segment in register
-+                   contents.  */
-+		while (d2 == dend2)
-+		  {
-+		    if (dend2 == end_match_2) break;
-+		    if (dend2 == regend[regno]) break;
-+
-+                    /* End of string1 => advance to string2. */
-+                    d2 = string2;
-+                    dend2 = regend[regno];
-+		  }
-+		/* At end of register contents => success */
-+		if (d2 == dend2) break;
-+
-+		/* If necessary, advance to next segment in data.  */
-+		PREFETCH ();
-+
-+		/* How many characters left in this segment to match.  */
-+		mcnt = dend - d;
-+
-+		/* Want how many consecutive characters we can match in
-+                   one shot, so, if necessary, adjust the count.  */
-+                if (mcnt > dend2 - d2)
-+		  mcnt = dend2 - d2;
-+
-+		/* Compare that many; failure if mismatch, else move
-+                   past them.  */
-+		if (translate
-+                    ? PREFIX(bcmp_translate) (d, d2, mcnt, translate)
-+                    : memcmp (d, d2, mcnt*sizeof(UCHAR_T)))
-+		  goto fail;
-+		d += mcnt, d2 += mcnt;
-+
-+		/* Do this because we've match some characters.  */
-+		SET_REGS_MATCHED ();
-+	      }
-+	  }
-+	  break;
-+
-+
-+        /* begline matches the empty string at the beginning of the string
-+           (unless `not_bol' is set in `bufp'), and, if
-+           `newline_anchor' is set, after newlines.  */
-+	case begline:
-+          DEBUG_PRINT1 ("EXECUTING begline.\n");
-+
-+          if (AT_STRINGS_BEG (d))
-+            {
-+              if (!bufp->not_bol) break;
-+            }
-+          else if (d[-1] == '\n' && bufp->newline_anchor)
-+            {
-+              break;
-+            }
-+          /* In all other cases, we fail.  */
-+          goto fail;
-+
-+
-+        /* endline is the dual of begline.  */
-+	case endline:
-+          DEBUG_PRINT1 ("EXECUTING endline.\n");
-+
-+          if (AT_STRINGS_END (d))
-+            {
-+              if (!bufp->not_eol) break;
-+            }
-+
-+          /* We have to ``prefetch'' the next character.  */
-+          else if ((d == end1 ? *string2 : *d) == '\n'
-+                   && bufp->newline_anchor)
-+            {
-+              break;
-+            }
-+          goto fail;
-+
-+
-+	/* Match at the very beginning of the data.  */
-+        case begbuf:
-+          DEBUG_PRINT1 ("EXECUTING begbuf.\n");
-+          if (AT_STRINGS_BEG (d))
-+            break;
-+          goto fail;
-+
-+
-+	/* Match at the very end of the data.  */
-+        case endbuf:
-+          DEBUG_PRINT1 ("EXECUTING endbuf.\n");
-+	  if (AT_STRINGS_END (d))
-+	    break;
-+          goto fail;
-+
-+
-+        /* on_failure_keep_string_jump is used to optimize `.*\n'.  It
-+           pushes NULL as the value for the string on the stack.  Then
-+           `pop_failure_point' will keep the current value for the
-+           string, instead of restoring it.  To see why, consider
-+           matching `foo\nbar' against `.*\n'.  The .* matches the foo;
-+           then the . fails against the \n.  But the next thing we want
-+           to do is match the \n against the \n; if we restored the
-+           string value, we would be back at the foo.
-+
-+           Because this is used only in specific cases, we don't need to
-+           check all the things that `on_failure_jump' does, to make
-+           sure the right things get saved on the stack.  Hence we don't
-+           share its code.  The only reason to push anything on the
-+           stack at all is that otherwise we would have to change
-+           `anychar's code to do something besides goto fail in this
-+           case; that seems worse than this.  */
-+        case on_failure_keep_string_jump:
-+          DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
-+
-+          EXTRACT_NUMBER_AND_INCR (mcnt, p);
-+#ifdef _LIBC
-+          DEBUG_PRINT3 (" %d (to %p):\n", mcnt, p + mcnt);
-+#else
-+          DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt);
-+#endif
-+
-+          PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
-+          break;
-+
-+
-+	/* Uses of on_failure_jump:
-+
-+           Each alternative starts with an on_failure_jump that points
-+           to the beginning of the next alternative.  Each alternative
-+           except the last ends with a jump that in effect jumps past
-+           the rest of the alternatives.  (They really jump to the
-+           ending jump of the following alternative, because tensioning
-+           these jumps is a hassle.)
-+
-+           Repeats start with an on_failure_jump that points past both
-+           the repetition text and either the following jump or
-+           pop_failure_jump back to this on_failure_jump.  */
-+	case on_failure_jump:
-+        on_failure:
-+          DEBUG_PRINT1 ("EXECUTING on_failure_jump");
-+
-+          EXTRACT_NUMBER_AND_INCR (mcnt, p);
-+#ifdef _LIBC
-+          DEBUG_PRINT3 (" %d (to %p)", mcnt, p + mcnt);
-+#else
-+          DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt);
-+#endif
-+
-+          /* If this on_failure_jump comes right before a group (i.e.,
-+             the original * applied to a group), save the information
-+             for that group and all inner ones, so that if we fail back
-+             to this point, the group's information will be correct.
-+             For example, in \(a*\)*\1, we need the preceding group,
-+             and in \(zz\(a*\)b*\)\2, we need the inner group.  */
-+
-+          /* We can't use `p' to check ahead because we push
-+             a failure point to `p + mcnt' after we do this.  */
-+          p1 = p;
-+
-+          /* We need to skip no_op's before we look for the
-+             start_memory in case this on_failure_jump is happening as
-+             the result of a completed succeed_n, as in \(a\)\{1,3\}b\1
-+             against aba.  */
-+          while (p1 < pend && (re_opcode_t) *p1 == no_op)
-+            p1++;
-+
-+          if (p1 < pend && (re_opcode_t) *p1 == start_memory)
-+            {
-+              /* We have a new highest active register now.  This will
-+                 get reset at the start_memory we are about to get to,
-+                 but we will have saved all the registers relevant to
-+                 this repetition op, as described above.  */
-+              highest_active_reg = *(p1 + 1) + *(p1 + 2);
-+              if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
-+                lowest_active_reg = *(p1 + 1);
-+            }
-+
-+          DEBUG_PRINT1 (":\n");
-+          PUSH_FAILURE_POINT (p + mcnt, d, -2);
-+          break;
-+
-+
-+        /* A smart repeat ends with `maybe_pop_jump'.
-+	   We change it to either `pop_failure_jump' or `jump'.  */
-+        case maybe_pop_jump:
-+          EXTRACT_NUMBER_AND_INCR (mcnt, p);
-+          DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
-+          {
-+	    register UCHAR_T *p2 = p;
-+
-+            /* Compare the beginning of the repeat with what in the
-+               pattern follows its end. If we can establish that there
-+               is nothing that they would both match, i.e., that we
-+               would have to backtrack because of (as in, e.g., `a*a')
-+               then we can change to pop_failure_jump, because we'll
-+               never have to backtrack.
-+
-+               This is not true in the case of alternatives: in
-+               `(a|ab)*' we do need to backtrack to the `ab' alternative
-+               (e.g., if the string was `ab').  But instead of trying to
-+               detect that here, the alternative has put on a dummy
-+               failure point which is what we will end up popping.  */
-+
-+	    /* Skip over open/close-group commands.
-+	       If what follows this loop is a ...+ construct,
-+	       look at what begins its body, since we will have to
-+	       match at least one of that.  */
-+	    while (1)
-+	      {
-+		if (p2 + 2 < pend
-+		    && ((re_opcode_t) *p2 == stop_memory
-+			|| (re_opcode_t) *p2 == start_memory))
-+		  p2 += 3;
-+		else if (p2 + 2 + 2 * OFFSET_ADDRESS_SIZE < pend
-+			 && (re_opcode_t) *p2 == dummy_failure_jump)
-+		  p2 += 2 + 2 * OFFSET_ADDRESS_SIZE;
-+		else
-+		  break;
-+	      }
-+
-+	    p1 = p + mcnt;
-+	    /* p1[0] ... p1[2] are the `on_failure_jump' corresponding
-+	       to the `maybe_finalize_jump' of this case.  Examine what
-+	       follows.  */
-+
-+            /* If we're at the end of the pattern, we can change.  */
-+            if (p2 == pend)
-+	      {
-+		/* Consider what happens when matching ":\(.*\)"
-+		   against ":/".  I don't really understand this code
-+		   yet.  */
-+  	        p[-(1+OFFSET_ADDRESS_SIZE)] = (UCHAR_T)
-+		  pop_failure_jump;
-+                DEBUG_PRINT1
-+                  ("  End of pattern: change to `pop_failure_jump'.\n");
-+              }
-+
-+            else if ((re_opcode_t) *p2 == exactn
-+#ifdef MBS_SUPPORT
-+		     || (re_opcode_t) *p2 == exactn_bin
-+#endif
-+		     || (bufp->newline_anchor && (re_opcode_t) *p2 == endline))
-+	      {
-+		register UCHAR_T c
-+                  = *p2 == (UCHAR_T) endline ? '\n' : p2[2];
-+
-+                if (((re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == exactn
-+#ifdef MBS_SUPPORT
-+		     || (re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == exactn_bin
-+#endif
-+		    ) && p1[3+OFFSET_ADDRESS_SIZE] != c)
-+                  {
-+  		    p[-(1+OFFSET_ADDRESS_SIZE)] = (UCHAR_T)
-+		      pop_failure_jump;
-+#ifdef WCHAR
-+		      DEBUG_PRINT3 ("  %C != %C => pop_failure_jump.\n",
-+				    (wint_t) c,
-+				    (wint_t) p1[3+OFFSET_ADDRESS_SIZE]);
-+#else
-+		      DEBUG_PRINT3 ("  %c != %c => pop_failure_jump.\n",
-+				    (char) c,
-+				    (char) p1[3+OFFSET_ADDRESS_SIZE]);
-+#endif
-+                  }
-+
-+#ifndef WCHAR
-+		else if ((re_opcode_t) p1[3] == charset
-+			 || (re_opcode_t) p1[3] == charset_not)
-+		  {
-+		    int negate = (re_opcode_t) p1[3] == charset_not;
-+
-+		    if (c < (unsigned) (p1[4] * BYTEWIDTH)
-+			&& p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
-+		      negate = !negate;
-+
-+                    /* `negate' is equal to 1 if c would match, which means
-+                        that we can't change to pop_failure_jump.  */
-+		    if (!negate)
-+                      {
-+  		        p[-3] = (unsigned char) pop_failure_jump;
-+                        DEBUG_PRINT1 ("  No match => pop_failure_jump.\n");
-+                      }
-+		  }
-+#endif /* not WCHAR */
-+	      }
-+#ifndef WCHAR
-+            else if ((re_opcode_t) *p2 == charset)
-+	      {
-+		/* We win if the first character of the loop is not part
-+                   of the charset.  */
-+                if ((re_opcode_t) p1[3] == exactn
-+ 		    && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
-+ 			  && (p2[2 + p1[5] / BYTEWIDTH]
-+ 			      & (1 << (p1[5] % BYTEWIDTH)))))
-+		  {
-+		    p[-3] = (unsigned char) pop_failure_jump;
-+		    DEBUG_PRINT1 ("  No match => pop_failure_jump.\n");
-+                  }
-+
-+		else if ((re_opcode_t) p1[3] == charset_not)
-+		  {
-+		    int idx;
-+		    /* We win if the charset_not inside the loop
-+		       lists every character listed in the charset after.  */
-+		    for (idx = 0; idx < (int) p2[1]; idx++)
-+		      if (! (p2[2 + idx] == 0
-+			     || (idx < (int) p1[4]
-+				 && ((p2[2 + idx] & ~ p1[5 + idx]) == 0))))
-+			break;
-+
-+		    if (idx == p2[1])
-+                      {
-+  		        p[-3] = (unsigned char) pop_failure_jump;
-+                        DEBUG_PRINT1 ("  No match => pop_failure_jump.\n");
-+                      }
-+		  }
-+		else if ((re_opcode_t) p1[3] == charset)
-+		  {
-+		    int idx;
-+		    /* We win if the charset inside the loop
-+		       has no overlap with the one after the loop.  */
-+		    for (idx = 0;
-+			 idx < (int) p2[1] && idx < (int) p1[4];
-+			 idx++)
-+		      if ((p2[2 + idx] & p1[5 + idx]) != 0)
-+			break;
-+
-+		    if (idx == p2[1] || idx == p1[4])
-+                      {
-+  		        p[-3] = (unsigned char) pop_failure_jump;
-+                        DEBUG_PRINT1 ("  No match => pop_failure_jump.\n");
-+                      }
-+		  }
-+	      }
-+#endif /* not WCHAR */
-+	  }
-+	  p -= OFFSET_ADDRESS_SIZE;	/* Point at relative address again.  */
-+	  if ((re_opcode_t) p[-1] != pop_failure_jump)
-+	    {
-+	      p[-1] = (UCHAR_T) jump;
-+              DEBUG_PRINT1 ("  Match => jump.\n");
-+	      goto unconditional_jump;
-+	    }
-+        /* Note fall through.  */
-+
-+
-+	/* The end of a simple repeat has a pop_failure_jump back to
-+           its matching on_failure_jump, where the latter will push a
-+           failure point.  The pop_failure_jump takes off failure
-+           points put on by this pop_failure_jump's matching
-+           on_failure_jump; we got through the pattern to here from the
-+           matching on_failure_jump, so didn't fail.  */
-+        case pop_failure_jump:
-+          {
-+            /* We need to pass separate storage for the lowest and
-+               highest registers, even though we don't care about the
-+               actual values.  Otherwise, we will restore only one
-+               register from the stack, since lowest will == highest in
-+               `pop_failure_point'.  */
-+            active_reg_t dummy_low_reg, dummy_high_reg;
-+            UCHAR_T *pdummy __attribute__ ((unused)) = NULL;
-+            const CHAR_T *sdummy __attribute__ ((unused)) = NULL;
-+
-+            DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
-+            POP_FAILURE_POINT (sdummy, pdummy,
-+                               dummy_low_reg, dummy_high_reg,
-+                               reg_dummy, reg_dummy, reg_info_dummy);
-+          }
-+	  /* Note fall through.  */
-+
-+	unconditional_jump:
-+#ifdef _LIBC
-+	  DEBUG_PRINT2 ("\n%p: ", p);
-+#else
-+	  DEBUG_PRINT2 ("\n0x%x: ", p);
-+#endif
-+          /* Note fall through.  */
-+
-+        /* Unconditionally jump (without popping any failure points).  */
-+        case jump:
-+	  EXTRACT_NUMBER_AND_INCR (mcnt, p);	/* Get the amount to jump.  */
-+          DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
-+	  p += mcnt;				/* Do the jump.  */
-+#ifdef _LIBC
-+          DEBUG_PRINT2 ("(to %p).\n", p);
-+#else
-+          DEBUG_PRINT2 ("(to 0x%x).\n", p);
-+#endif
-+	  break;
-+
-+
-+        /* We need this opcode so we can detect where alternatives end
-+           in `group_match_null_string_p' et al.  */
-+        case jump_past_alt:
-+          DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n");
-+          goto unconditional_jump;
-+
-+
-+        /* Normally, the on_failure_jump pushes a failure point, which
-+           then gets popped at pop_failure_jump.  We will end up at
-+           pop_failure_jump, also, and with a pattern of, say, `a+', we
-+           are skipping over the on_failure_jump, so we have to push
-+           something meaningless for pop_failure_jump to pop.  */
-+        case dummy_failure_jump:
-+          DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n");
-+          /* It doesn't matter what we push for the string here.  What
-+             the code at `fail' tests is the value for the pattern.  */
-+          PUSH_FAILURE_POINT (NULL, NULL, -2);
-+          goto unconditional_jump;
-+
-+
-+        /* At the end of an alternative, we need to push a dummy failure
-+           point in case we are followed by a `pop_failure_jump', because
-+           we don't want the failure point for the alternative to be
-+           popped.  For example, matching `(a|ab)*' against `aab'
-+           requires that we match the `ab' alternative.  */
-+        case push_dummy_failure:
-+          DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n");
-+          /* See comments just above at `dummy_failure_jump' about the
-+             two zeroes.  */
-+          PUSH_FAILURE_POINT (NULL, NULL, -2);
-+          break;
-+
-+        /* Have to succeed matching what follows at least n times.
-+           After that, handle like `on_failure_jump'.  */
-+        case succeed_n:
-+          EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
-+          DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
-+
-+          assert (mcnt >= 0);
-+          /* Originally, this is how many times we HAVE to succeed.  */
-+          if (mcnt > 0)
-+            {
-+               mcnt--;
-+	       p += OFFSET_ADDRESS_SIZE;
-+               STORE_NUMBER_AND_INCR (p, mcnt);
-+#ifdef _LIBC
-+               DEBUG_PRINT3 ("  Setting %p to %d.\n", p - OFFSET_ADDRESS_SIZE
-+			     , mcnt);
-+#else
-+               DEBUG_PRINT3 ("  Setting 0x%x to %d.\n", p - OFFSET_ADDRESS_SIZE
-+			     , mcnt);
-+#endif
-+            }
-+	  else if (mcnt == 0)
-+            {
-+#ifdef _LIBC
-+              DEBUG_PRINT2 ("  Setting two bytes from %p to no_op.\n",
-+			    p + OFFSET_ADDRESS_SIZE);
-+#else
-+              DEBUG_PRINT2 ("  Setting two bytes from 0x%x to no_op.\n",
-+			    p + OFFSET_ADDRESS_SIZE);
-+#endif /* _LIBC */
-+
-+#ifdef WCHAR
-+	      p[1] = (UCHAR_T) no_op;
-+#else
-+	      p[2] = (UCHAR_T) no_op;
-+              p[3] = (UCHAR_T) no_op;
-+#endif /* WCHAR */
-+              goto on_failure;
-+            }
-+          break;
-+
-+        case jump_n:
-+          EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
-+          DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
-+
-+          /* Originally, this is how many times we CAN jump.  */
-+          if (mcnt)
-+            {
-+               mcnt--;
-+               STORE_NUMBER (p + OFFSET_ADDRESS_SIZE, mcnt);
-+
-+#ifdef _LIBC
-+               DEBUG_PRINT3 ("  Setting %p to %d.\n", p + OFFSET_ADDRESS_SIZE,
-+			     mcnt);
-+#else
-+               DEBUG_PRINT3 ("  Setting 0x%x to %d.\n", p + OFFSET_ADDRESS_SIZE,
-+			     mcnt);
-+#endif /* _LIBC */
-+	       goto unconditional_jump;
-+            }
-+          /* If don't have to jump any more, skip over the rest of command.  */
-+	  else
-+	    p += 2 * OFFSET_ADDRESS_SIZE;
-+          break;
-+
-+	case set_number_at:
-+	  {
-+            DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
-+
-+            EXTRACT_NUMBER_AND_INCR (mcnt, p);
-+            p1 = p + mcnt;
-+            EXTRACT_NUMBER_AND_INCR (mcnt, p);
-+#ifdef _LIBC
-+            DEBUG_PRINT3 ("  Setting %p to %d.\n", p1, mcnt);
-+#else
-+            DEBUG_PRINT3 ("  Setting 0x%x to %d.\n", p1, mcnt);
-+#endif
-+	    STORE_NUMBER (p1, mcnt);
-+            break;
-+          }
-+
-+#if 0
-+	/* The DEC Alpha C compiler 3.x generates incorrect code for the
-+	   test  WORDCHAR_P (d - 1) != WORDCHAR_P (d)  in the expansion of
-+	   AT_WORD_BOUNDARY, so this code is disabled.  Expanding the
-+	   macro and introducing temporary variables works around the bug.  */
-+
-+	case wordbound:
-+	  DEBUG_PRINT1 ("EXECUTING wordbound.\n");
-+	  if (AT_WORD_BOUNDARY (d))
-+	    break;
-+	  goto fail;
-+
-+	case notwordbound:
-+	  DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
-+	  if (AT_WORD_BOUNDARY (d))
-+	    goto fail;
-+	  break;
-+#else
-+	case wordbound:
-+	{
-+	  boolean prevchar, thischar;
-+
-+	  DEBUG_PRINT1 ("EXECUTING wordbound.\n");
-+	  if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
-+	    break;
-+
-+	  prevchar = WORDCHAR_P (d - 1);
-+	  thischar = WORDCHAR_P (d);
-+	  if (prevchar != thischar)
-+	    break;
-+	  goto fail;
-+	}
-+
-+      case notwordbound:
-+	{
-+	  boolean prevchar, thischar;
-+
-+	  DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
-+	  if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
-+	    goto fail;
-+
-+	  prevchar = WORDCHAR_P (d - 1);
-+	  thischar = WORDCHAR_P (d);
-+	  if (prevchar != thischar)
-+	    goto fail;
-+	  break;
-+	}
-+#endif
-+
-+	case wordbeg:
-+          DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
-+	  if (!AT_STRINGS_END (d) && WORDCHAR_P (d)
-+	      && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
-+	    break;
-+          goto fail;
-+
-+	case wordend:
-+          DEBUG_PRINT1 ("EXECUTING wordend.\n");
-+	  if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
-+              && (AT_STRINGS_END (d) || !WORDCHAR_P (d)))
-+	    break;
-+          goto fail;
-+
-+#ifdef emacs
-+  	case before_dot:
-+          DEBUG_PRINT1 ("EXECUTING before_dot.\n");
-+ 	  if (PTR_CHAR_POS ((unsigned char *) d) >= point)
-+  	    goto fail;
-+  	  break;
-+
-+  	case at_dot:
-+          DEBUG_PRINT1 ("EXECUTING at_dot.\n");
-+ 	  if (PTR_CHAR_POS ((unsigned char *) d) != point)
-+  	    goto fail;
-+  	  break;
-+
-+  	case after_dot:
-+          DEBUG_PRINT1 ("EXECUTING after_dot.\n");
-+          if (PTR_CHAR_POS ((unsigned char *) d) <= point)
-+  	    goto fail;
-+  	  break;
-+
-+	case syntaxspec:
-+          DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
-+	  mcnt = *p++;
-+	  goto matchsyntax;
-+
-+        case wordchar:
-+          DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n");
-+	  mcnt = (int) Sword;
-+        matchsyntax:
-+	  PREFETCH ();
-+	  /* Can't use *d++ here; SYNTAX may be an unsafe macro.  */
-+	  d++;
-+	  if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt)
-+	    goto fail;
-+          SET_REGS_MATCHED ();
-+	  break;
-+
-+	case notsyntaxspec:
-+          DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt);
-+	  mcnt = *p++;
-+	  goto matchnotsyntax;
-+
-+        case notwordchar:
-+          DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n");
-+	  mcnt = (int) Sword;
-+        matchnotsyntax:
-+	  PREFETCH ();
-+	  /* Can't use *d++ here; SYNTAX may be an unsafe macro.  */
-+	  d++;
-+	  if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt)
-+	    goto fail;
-+	  SET_REGS_MATCHED ();
-+          break;
-+
-+#else /* not emacs */
-+	case wordchar:
-+          DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
-+	  PREFETCH ();
-+          if (!WORDCHAR_P (d))
-+            goto fail;
-+	  SET_REGS_MATCHED ();
-+          d++;
-+	  break;
-+
-+	case notwordchar:
-+          DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
-+	  PREFETCH ();
-+	  if (WORDCHAR_P (d))
-+            goto fail;
-+          SET_REGS_MATCHED ();
-+          d++;
-+	  break;
-+#endif /* not emacs */
-+
-+        default:
-+          abort ();
-+	}
-+      continue;  /* Successfully executed one pattern command; keep going.  */
-+
-+
-+    /* We goto here if a matching operation fails. */
-+    fail:
-+      if (!FAIL_STACK_EMPTY ())
-+	{ /* A restart point is known.  Restore to that state.  */
-+          DEBUG_PRINT1 ("\nFAIL:\n");
-+          POP_FAILURE_POINT (d, p,
-+                             lowest_active_reg, highest_active_reg,
-+                             regstart, regend, reg_info);
-+
-+          /* If this failure point is a dummy, try the next one.  */
-+          if (!p)
-+	    goto fail;
-+
-+          /* If we failed to the end of the pattern, don't examine *p.  */
-+	  assert (p <= pend);
-+          if (p < pend)
-+            {
-+              boolean is_a_jump_n = false;
-+
-+              /* If failed to a backwards jump that's part of a repetition
-+                 loop, need to pop this failure point and use the next one.  */
-+              switch ((re_opcode_t) *p)
-+                {
-+                case jump_n:
-+                  is_a_jump_n = true;
-+                case maybe_pop_jump:
-+                case pop_failure_jump:
-+                case jump:
-+                  p1 = p + 1;
-+                  EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-+                  p1 += mcnt;
-+
-+                  if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n)
-+                      || (!is_a_jump_n
-+                          && (re_opcode_t) *p1 == on_failure_jump))
-+                    goto fail;
-+                  break;
-+                default:
-+                  /* do nothing */ ;
-+                }
-+            }
-+
-+          if (d >= string1 && d <= end1)
-+	    dend = end_match_1;
-+        }
-+      else
-+        break;   /* Matching at this starting point really fails.  */
-+    } /* for (;;) */
-+
-+  if (best_regs_set)
-+    goto restore_best_regs;
-+
-+  FREE_VARIABLES ();
-+
-+  return -1;         			/* Failure to match.  */
-+} /* re_match_2 */
-+
-+/* Subroutine definitions for re_match_2.  */
-+
-+
-+/* We are passed P pointing to a register number after a start_memory.
-+
-+   Return true if the pattern up to the corresponding stop_memory can
-+   match the empty string, and false otherwise.
-+
-+   If we find the matching stop_memory, sets P to point to one past its number.
-+   Otherwise, sets P to an undefined byte less than or equal to END.
-+
-+   We don't handle duplicates properly (yet).  */
-+
-+static boolean
-+PREFIX(group_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
-+                                   PREFIX(register_info_type) *reg_info)
-+{
-+  int mcnt;
-+  /* Point to after the args to the start_memory.  */
-+  UCHAR_T *p1 = *p + 2;
-+
-+  while (p1 < end)
-+    {
-+      /* Skip over opcodes that can match nothing, and return true or
-+	 false, as appropriate, when we get to one that can't, or to the
-+         matching stop_memory.  */
-+
-+      switch ((re_opcode_t) *p1)
-+        {
-+        /* Could be either a loop or a series of alternatives.  */
-+        case on_failure_jump:
-+          p1++;
-+          EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-+
-+          /* If the next operation is not a jump backwards in the
-+	     pattern.  */
-+
-+	  if (mcnt >= 0)
-+	    {
-+              /* Go through the on_failure_jumps of the alternatives,
-+                 seeing if any of the alternatives cannot match nothing.
-+                 The last alternative starts with only a jump,
-+                 whereas the rest start with on_failure_jump and end
-+                 with a jump, e.g., here is the pattern for `a|b|c':
-+
-+                 /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6
-+                 /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3
-+                 /exactn/1/c
-+
-+                 So, we have to first go through the first (n-1)
-+                 alternatives and then deal with the last one separately.  */
-+
-+
-+              /* Deal with the first (n-1) alternatives, which start
-+                 with an on_failure_jump (see above) that jumps to right
-+                 past a jump_past_alt.  */
-+
-+              while ((re_opcode_t) p1[mcnt-(1+OFFSET_ADDRESS_SIZE)] ==
-+		     jump_past_alt)
-+                {
-+                  /* `mcnt' holds how many bytes long the alternative
-+                     is, including the ending `jump_past_alt' and
-+                     its number.  */
-+
-+                  if (!PREFIX(alt_match_null_string_p) (p1, p1 + mcnt -
-+						(1 + OFFSET_ADDRESS_SIZE),
-+						reg_info))
-+                    return false;
-+
-+                  /* Move to right after this alternative, including the
-+		     jump_past_alt.  */
-+                  p1 += mcnt;
-+
-+                  /* Break if it's the beginning of an n-th alternative
-+                     that doesn't begin with an on_failure_jump.  */
-+                  if ((re_opcode_t) *p1 != on_failure_jump)
-+                    break;
-+
-+		  /* Still have to check that it's not an n-th
-+		     alternative that starts with an on_failure_jump.  */
-+		  p1++;
-+                  EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-+                  if ((re_opcode_t) p1[mcnt-(1+OFFSET_ADDRESS_SIZE)] !=
-+		      jump_past_alt)
-+                    {
-+		      /* Get to the beginning of the n-th alternative.  */
-+                      p1 -= 1 + OFFSET_ADDRESS_SIZE;
-+                      break;
-+                    }
-+                }
-+
-+              /* Deal with the last alternative: go back and get number
-+                 of the `jump_past_alt' just before it.  `mcnt' contains
-+                 the length of the alternative.  */
-+              EXTRACT_NUMBER (mcnt, p1 - OFFSET_ADDRESS_SIZE);
-+
-+              if (!PREFIX(alt_match_null_string_p) (p1, p1 + mcnt, reg_info))
-+                return false;
-+
-+              p1 += mcnt;	/* Get past the n-th alternative.  */
-+            } /* if mcnt > 0 */
-+          break;
-+
-+
-+        case stop_memory:
-+	  assert (p1[1] == **p);
-+          *p = p1 + 2;
-+          return true;
-+
-+
-+        default:
-+          if (!PREFIX(common_op_match_null_string_p) (&p1, end, reg_info))
-+            return false;
-+        }
-+    } /* while p1 < end */
-+
-+  return false;
-+} /* group_match_null_string_p */
-+
-+
-+/* Similar to group_match_null_string_p, but doesn't deal with alternatives:
-+   It expects P to be the first byte of a single alternative and END one
-+   byte past the last. The alternative can contain groups.  */
-+
-+static boolean
-+PREFIX(alt_match_null_string_p) (UCHAR_T *p, UCHAR_T *end,
-+                                 PREFIX(register_info_type) *reg_info)
-+{
-+  int mcnt;
-+  UCHAR_T *p1 = p;
-+
-+  while (p1 < end)
-+    {
-+      /* Skip over opcodes that can match nothing, and break when we get
-+         to one that can't.  */
-+
-+      switch ((re_opcode_t) *p1)
-+        {
-+	/* It's a loop.  */
-+        case on_failure_jump:
-+          p1++;
-+          EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-+          p1 += mcnt;
-+          break;
-+
-+	default:
-+          if (!PREFIX(common_op_match_null_string_p) (&p1, end, reg_info))
-+            return false;
-+        }
-+    }  /* while p1 < end */
-+
-+  return true;
-+} /* alt_match_null_string_p */
-+
-+
-+/* Deals with the ops common to group_match_null_string_p and
-+   alt_match_null_string_p.
-+
-+   Sets P to one after the op and its arguments, if any.  */
-+
-+static boolean
-+PREFIX(common_op_match_null_string_p) (UCHAR_T **p, UCHAR_T *end,
-+                                       PREFIX(register_info_type) *reg_info)
-+{
-+  int mcnt;
-+  boolean ret;
-+  int reg_no;
-+  UCHAR_T *p1 = *p;
-+
-+  switch ((re_opcode_t) *p1++)
-+    {
-+    case no_op:
-+    case begline:
-+    case endline:
-+    case begbuf:
-+    case endbuf:
-+    case wordbeg:
-+    case wordend:
-+    case wordbound:
-+    case notwordbound:
-+#ifdef emacs
-+    case before_dot:
-+    case at_dot:
-+    case after_dot:
-+#endif
-+      break;
-+
-+    case start_memory:
-+      reg_no = *p1;
-+      assert (reg_no > 0 && reg_no <= MAX_REGNUM);
-+      ret = PREFIX(group_match_null_string_p) (&p1, end, reg_info);
-+
-+      /* Have to set this here in case we're checking a group which
-+         contains a group and a back reference to it.  */
-+
-+      if (REG_MATCH_NULL_STRING_P (reg_info[reg_no]) == MATCH_NULL_UNSET_VALUE)
-+        REG_MATCH_NULL_STRING_P (reg_info[reg_no]) = ret;
-+
-+      if (!ret)
-+        return false;
-+      break;
-+
-+    /* If this is an optimized succeed_n for zero times, make the jump.  */
-+    case jump:
-+      EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-+      if (mcnt >= 0)
-+        p1 += mcnt;
-+      else
-+        return false;
-+      break;
-+
-+    case succeed_n:
-+      /* Get to the number of times to succeed.  */
-+      p1 += OFFSET_ADDRESS_SIZE;
-+      EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-+
-+      if (mcnt == 0)
-+        {
-+          p1 -= 2 * OFFSET_ADDRESS_SIZE;
-+          EXTRACT_NUMBER_AND_INCR (mcnt, p1);
-+          p1 += mcnt;
-+        }
-+      else
-+        return false;
-+      break;
-+
-+    case duplicate:
-+      if (!REG_MATCH_NULL_STRING_P (reg_info[*p1]))
-+        return false;
-+      break;
-+
-+    case set_number_at:
-+      p1 += 2 * OFFSET_ADDRESS_SIZE;
-+
-+    default:
-+      /* All other opcodes mean we cannot match the empty string.  */
-+      return false;
-+  }
-+
-+  *p = p1;
-+  return true;
-+} /* common_op_match_null_string_p */
-+
-+
-+/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN
-+   bytes; nonzero otherwise.  */
-+
-+static int
-+PREFIX(bcmp_translate) (const CHAR_T *s1, const CHAR_T *s2, register int len,
-+                        RE_TRANSLATE_TYPE translate)
-+{
-+  register const UCHAR_T *p1 = (const UCHAR_T *) s1;
-+  register const UCHAR_T *p2 = (const UCHAR_T *) s2;
-+  while (len)
-+    {
-+#ifdef WCHAR
-+      if (((*p1<=0xff)?translate[*p1++]:*p1++)
-+	  != ((*p2<=0xff)?translate[*p2++]:*p2++))
-+	return 1;
-+#else /* BYTE */
-+      if (translate[*p1++] != translate[*p2++]) return 1;
-+#endif /* WCHAR */
-+      len--;
-+    }
-+  return 0;
-+}
-+
-+
-+#else /* not INSIDE_RECURSION */
-+
-+/* Entry points for GNU code.  */
-+
-+/* re_compile_pattern is the GNU regular expression compiler: it
-+   compiles PATTERN (of length SIZE) and puts the result in BUFP.
-+   Returns 0 if the pattern was valid, otherwise an error string.
-+
-+   Assumes the `allocated' (and perhaps `buffer') and `translate' fields
-+   are set in BUFP on entry.
-+
-+   We call regex_compile to do the actual compilation.  */
-+
-+const char *
-+re_compile_pattern (const char *pattern, size_t length,
-+                    struct re_pattern_buffer *bufp)
-+{
-+  reg_errcode_t ret;
-+
-+  /* GNU code is written to assume at least RE_NREGS registers will be set
-+     (and at least one extra will be -1).  */
-+  bufp->regs_allocated = REGS_UNALLOCATED;
-+
-+  /* And GNU code determines whether or not to get register information
-+     by passing null for the REGS argument to re_match, etc., not by
-+     setting no_sub.  */
-+  bufp->no_sub = 0;
-+
-+  /* Match anchors at newline.  */
-+  bufp->newline_anchor = 1;
-+
-+# ifdef MBS_SUPPORT
-+  if (MB_CUR_MAX != 1)
-+    ret = wcs_regex_compile (pattern, length, re_syntax_options, bufp);
-+  else
-+# endif
-+    ret = byte_regex_compile (pattern, length, re_syntax_options, bufp);
-+
-+  if (!ret)
-+    return NULL;
-+  return gettext (re_error_msgid[(int) ret]);
-+}
-+#ifdef _LIBC
-+weak_alias (__re_compile_pattern, re_compile_pattern)
-+#endif
-+
-+/* Entry points compatible with 4.2 BSD regex library.  We don't define
-+   them unless specifically requested.  */
-+
-+#if defined _REGEX_RE_COMP || defined _LIBC
-+
-+/* BSD has one and only one pattern buffer.  */
-+static struct re_pattern_buffer re_comp_buf;
-+
-+char *
-+#ifdef _LIBC
-+/* Make these definitions weak in libc, so POSIX programs can redefine
-+   these names if they don't use our functions, and still use
-+   regcomp/regexec below without link errors.  */
-+weak_function
-+#endif
-+re_comp (const char *s)
-+{
-+  reg_errcode_t ret;
-+
-+  if (!s)
-+    {
-+      if (!re_comp_buf.buffer)
-+	return (char *) gettext ("No previous regular expression");
-+      return 0;
-+    }
-+
-+  if (!re_comp_buf.buffer)
-+    {
-+      re_comp_buf.buffer = (unsigned char *) malloc (200);
-+      if (re_comp_buf.buffer == NULL)
-+        return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
-+      re_comp_buf.allocated = 200;
-+
-+      re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
-+      if (re_comp_buf.fastmap == NULL)
-+	return (char *) gettext (re_error_msgid[(int) REG_ESPACE]);
-+    }
-+
-+  /* Since `re_exec' always passes NULL for the `regs' argument, we
-+     don't need to initialize the pattern buffer fields which affect it.  */
-+
-+  /* Match anchors at newlines.  */
-+  re_comp_buf.newline_anchor = 1;
-+
-+# ifdef MBS_SUPPORT
-+  if (MB_CUR_MAX != 1)
-+    ret = wcs_regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
-+  else
-+# endif
-+    ret = byte_regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
-+
-+  if (!ret)
-+    return NULL;
-+
-+  /* Yes, we're discarding `const' here if !HAVE_LIBINTL.  */
-+  return (char *) gettext (re_error_msgid[(int) ret]);
-+}
-+
-+
-+int
-+#ifdef _LIBC
-+weak_function
-+#endif
-+re_exec (const char *s)
-+{
-+  const int len = strlen (s);
-+  return
-+    0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
-+}
-+
-+#endif /* _REGEX_RE_COMP */
-+
-+/* POSIX.2 functions.  Don't define these for Emacs.  */
-+
-+#ifndef emacs
-+
-+/* regcomp takes a regular expression as a string and compiles it.
-+
-+   PREG is a regex_t *.  We do not expect any fields to be initialized,
-+   since POSIX says we shouldn't.  Thus, we set
-+
-+     `buffer' to the compiled pattern;
-+     `used' to the length of the compiled pattern;
-+     `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
-+       REG_EXTENDED bit in CFLAGS is set; otherwise, to
-+       RE_SYNTAX_POSIX_BASIC;
-+     `newline_anchor' to REG_NEWLINE being set in CFLAGS;
-+     `fastmap' to an allocated space for the fastmap;
-+     `fastmap_accurate' to zero;
-+     `re_nsub' to the number of subexpressions in PATTERN.
-+
-+   PATTERN is the address of the pattern string.
-+
-+   CFLAGS is a series of bits which affect compilation.
-+
-+     If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
-+     use POSIX basic syntax.
-+
-+     If REG_NEWLINE is set, then . and [^...] don't match newline.
-+     Also, regexec will try a match beginning after every newline.
-+
-+     If REG_ICASE is set, then we considers upper- and lowercase
-+     versions of letters to be equivalent when matching.
-+
-+     If REG_NOSUB is set, then when PREG is passed to regexec, that
-+     routine will report only success or failure, and nothing about the
-+     registers.
-+
-+   It returns 0 if it succeeds, nonzero if it doesn't.  (See regex.h for
-+   the return codes and their meanings.)  */
-+
-+int
-+regcomp (regex_t *preg, const char *pattern, int cflags)
-+{
-+  reg_errcode_t ret;
-+  reg_syntax_t syntax
-+    = (cflags & REG_EXTENDED) ?
-+      RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
-+
-+  /* regex_compile will allocate the space for the compiled pattern.  */
-+  preg->buffer = 0;
-+  preg->allocated = 0;
-+  preg->used = 0;
-+
-+  /* Try to allocate space for the fastmap.  */
-+  preg->fastmap = (char *) malloc (1 << BYTEWIDTH);
-+
-+  if (cflags & REG_ICASE)
-+    {
-+      int i;
-+
-+      preg->translate
-+	= (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
-+				      * sizeof (*(RE_TRANSLATE_TYPE)0));
-+      if (preg->translate == NULL)
-+        return (int) REG_ESPACE;
-+
-+      /* Map uppercase characters to corresponding lowercase ones.  */
-+      for (i = 0; i < CHAR_SET_SIZE; i++)
-+        preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : i;
-+    }
-+  else
-+    preg->translate = NULL;
-+
-+  /* If REG_NEWLINE is set, newlines are treated differently.  */
-+  if (cflags & REG_NEWLINE)
-+    { /* REG_NEWLINE implies neither . nor [^...] match newline.  */
-+      syntax &= ~RE_DOT_NEWLINE;
-+      syntax |= RE_HAT_LISTS_NOT_NEWLINE;
-+      /* It also changes the matching behavior.  */
-+      preg->newline_anchor = 1;
-+    }
-+  else
-+    preg->newline_anchor = 0;
-+
-+  preg->no_sub = !!(cflags & REG_NOSUB);
-+
-+  /* POSIX says a null character in the pattern terminates it, so we
-+     can use strlen here in compiling the pattern.  */
-+# ifdef MBS_SUPPORT
-+  if (MB_CUR_MAX != 1)
-+    ret = wcs_regex_compile (pattern, strlen (pattern), syntax, preg);
-+  else
-+# endif
-+    ret = byte_regex_compile (pattern, strlen (pattern), syntax, preg);
-+
-+  /* POSIX doesn't distinguish between an unmatched open-group and an
-+     unmatched close-group: both are REG_EPAREN.  */
-+  if (ret == REG_ERPAREN) ret = REG_EPAREN;
-+
-+  if (ret == REG_NOERROR && preg->fastmap)
-+    {
-+      /* Compute the fastmap now, since regexec cannot modify the pattern
-+	 buffer.  */
-+      if (re_compile_fastmap (preg) == -2)
-+	{
-+	  /* Some error occurred while computing the fastmap, just forget
-+	     about it.  */
-+	  free (preg->fastmap);
-+	  preg->fastmap = NULL;
-+	}
-+    }
-+
-+  return (int) ret;
-+}
-+#ifdef _LIBC
-+weak_alias (__regcomp, regcomp)
-+#endif
-+
-+
-+/* regexec searches for a given pattern, specified by PREG, in the
-+   string STRING.
-+
-+   If NMATCH is zero or REG_NOSUB was set in the cflags argument to
-+   `regcomp', we ignore PMATCH.  Otherwise, we assume PMATCH has at
-+   least NMATCH elements, and we set them to the offsets of the
-+   corresponding matched substrings.
-+
-+   EFLAGS specifies `execution flags' which affect matching: if
-+   REG_NOTBOL is set, then ^ does not match at the beginning of the
-+   string; if REG_NOTEOL is set, then $ does not match at the end.
-+
-+   We return 0 if we find a match and REG_NOMATCH if not.  */
-+
-+int
-+regexec (const regex_t *preg, const char *string, size_t nmatch,
-+         regmatch_t pmatch[], int eflags)
-+{
-+  int ret;
-+  struct re_registers regs;
-+  regex_t private_preg;
-+  int len = strlen (string);
-+  boolean want_reg_info = !preg->no_sub && nmatch > 0;
-+
-+  private_preg = *preg;
-+
-+  private_preg.not_bol = !!(eflags & REG_NOTBOL);
-+  private_preg.not_eol = !!(eflags & REG_NOTEOL);
-+
-+  /* The user has told us exactly how many registers to return
-+     information about, via `nmatch'.  We have to pass that on to the
-+     matching routines.  */
-+  private_preg.regs_allocated = REGS_FIXED;
-+
-+  if (want_reg_info)
-+    {
-+      regs.num_regs = nmatch;
-+      regs.start = TALLOC (nmatch * 2, regoff_t);
-+      if (regs.start == NULL)
-+        return (int) REG_NOMATCH;
-+      regs.end = regs.start + nmatch;
-+    }
-+
-+  /* Perform the searching operation.  */
-+  ret = re_search (&private_preg, string, len,
-+                   /* start: */ 0, /* range: */ len,
-+                   want_reg_info ? &regs : (struct re_registers *) 0);
-+
-+  /* Copy the register information to the POSIX structure.  */
-+  if (want_reg_info)
-+    {
-+      if (ret >= 0)
-+        {
-+          unsigned r;
-+
-+          for (r = 0; r < nmatch; r++)
-+            {
-+              pmatch[r].rm_so = regs.start[r];
-+              pmatch[r].rm_eo = regs.end[r];
-+            }
-+        }
-+
-+      /* If we needed the temporary register info, free the space now.  */
-+      free (regs.start);
-+    }
-+
-+  /* We want zero return to mean success, unlike `re_search'.  */
-+  return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH;
-+}
-+#ifdef _LIBC
-+/* EGLIBC: This is handled in regexec-compat.c.  */
-+/*weak_alias (__regexec, regexec)*/
-+#include "regexec-compat.c"
-+#endif
-+
-+
-+/* Returns a message corresponding to an error code, ERRCODE, returned
-+   from either regcomp or regexec.   We don't use PREG here.  */
-+
-+size_t
-+regerror (int errcode, const regex_t *preg __attribute__ ((unused)),
-+          char *errbuf, size_t errbuf_size)
-+{
-+  const char *msg;
-+  size_t msg_size;
-+
-+  if (errcode < 0
-+      || errcode >= (int) (sizeof (re_error_msgid)
-+			   / sizeof (re_error_msgid[0])))
-+    /* Only error codes returned by the rest of the code should be passed
-+       to this routine.  If we are given anything else, or if other regex
-+       code generates an invalid error code, then the program has a bug.
-+       Dump core so we can fix it.  */
-+    abort ();
-+
-+  msg = gettext (re_error_msgid[errcode]);
-+
-+  msg_size = strlen (msg) + 1; /* Includes the null.  */
-+
-+  if (errbuf_size != 0)
-+    {
-+      if (msg_size > errbuf_size)
-+        {
-+#if defined HAVE_MEMPCPY || defined _LIBC
-+	  *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
-+#else
-+          memcpy (errbuf, msg, errbuf_size - 1);
-+          errbuf[errbuf_size - 1] = 0;
-+#endif
-+        }
-+      else
-+        memcpy (errbuf, msg, msg_size);
-+    }
-+
-+  return msg_size;
-+}
-+#ifdef _LIBC
-+weak_alias (__regerror, regerror)
-+#endif
-+
-+
-+/* Free dynamically allocated space used by PREG.  */
-+
-+void
-+regfree (regex_t *preg)
-+{
-+  if (preg->buffer != NULL)
-+    free (preg->buffer);
-+  preg->buffer = NULL;
-+
-+  preg->allocated = 0;
-+  preg->used = 0;
-+
-+  if (preg->fastmap != NULL)
-+    free (preg->fastmap);
-+  preg->fastmap = NULL;
-+  preg->fastmap_accurate = 0;
-+
-+  if (preg->translate != NULL)
-+    free (preg->translate);
-+  preg->translate = NULL;
-+}
-+#ifdef _LIBC
-+weak_alias (__regfree, regfree)
-+#endif
-+
-+#endif /* not emacs  */
-+
-+#endif /* not INSIDE_RECURSION */
-+
-+
-+#undef STORE_NUMBER
-+#undef STORE_NUMBER_AND_INCR
-+#undef EXTRACT_NUMBER
-+#undef EXTRACT_NUMBER_AND_INCR
-+
-+#undef DEBUG_PRINT_COMPILED_PATTERN
-+#undef DEBUG_PRINT_DOUBLE_STRING
-+
-+#undef INIT_FAIL_STACK
-+#undef RESET_FAIL_STACK
-+#undef DOUBLE_FAIL_STACK
-+#undef PUSH_PATTERN_OP
-+#undef PUSH_FAILURE_POINTER
-+#undef PUSH_FAILURE_INT
-+#undef PUSH_FAILURE_ELT
-+#undef POP_FAILURE_POINTER
-+#undef POP_FAILURE_INT
-+#undef POP_FAILURE_ELT
-+#undef DEBUG_PUSH
-+#undef DEBUG_POP
-+#undef PUSH_FAILURE_POINT
-+#undef POP_FAILURE_POINT
-+
-+#undef REG_UNSET_VALUE
-+#undef REG_UNSET
-+
-+#undef PATFETCH
-+#undef PATFETCH_RAW
-+#undef PATUNFETCH
-+#undef TRANSLATE
-+
-+#undef INIT_BUF_SIZE
-+#undef GET_BUFFER_SPACE
-+#undef BUF_PUSH
-+#undef BUF_PUSH_2
-+#undef BUF_PUSH_3
-+#undef STORE_JUMP
-+#undef STORE_JUMP2
-+#undef INSERT_JUMP
-+#undef INSERT_JUMP2
-+#undef EXTEND_BUFFER
-+#undef GET_UNSIGNED_NUMBER
-+#undef FREE_STACK_RETURN
-+
-+# undef POINTER_TO_OFFSET
-+# undef MATCHING_IN_FRST_STRING
-+# undef PREFETCH
-+# undef AT_STRINGS_BEG
-+# undef AT_STRINGS_END
-+# undef WORDCHAR_P
-+# undef FREE_VAR
-+# undef FREE_VARIABLES
-+# undef NO_HIGHEST_ACTIVE_REG
-+# undef NO_LOWEST_ACTIVE_REG
-+
-+# undef CHAR_T
-+# undef UCHAR_T
-+# undef COMPILED_BUFFER_VAR
-+# undef OFFSET_ADDRESS_SIZE
-+# undef CHAR_CLASS_SIZE
-+# undef PREFIX
-+# undef ARG_PREFIX
-+# undef PUT_CHAR
-+# undef BYTE
-+# undef WCHAR
-+
-+# define DEFINED_ONCE
-diff --git a/pwd/Makefile b/pwd/Makefile
-index 7f6de03..916d546 100644
---- a/pwd/Makefile
-+++ b/pwd/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Sub-makefile for pwd portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= pwd
- 
- include ../Makeconfig
-diff --git a/resolv/Makefile b/resolv/Makefile
-index 1dcb75f..2e4b630 100644
---- a/resolv/Makefile
-+++ b/resolv/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Sub-makefile for resolv portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= resolv
- 
- include ../Makeconfig
-@@ -27,21 +29,22 @@ headers	:= resolv.h \
- 	   arpa/nameser.h arpa/nameser_compat.h \
- 	   sys/bitypes.h
- 
--routines := herror inet_addr inet_ntop inet_pton nsap_addr res_init \
--	    res_hconf res_libc res-state
-+routines-$(OPTION_EGLIBC_INET) \
-+	+= herror inet_addr inet_ntop inet_pton nsap_addr res_init \
-+	   res_hconf res_libc res-state
- 
--tests = tst-aton tst-leaks tst-inet_ntop
--xtests = tst-leaks2
-+tests-$(OPTION_EGLIBC_INET) += tst-aton tst-leaks tst-inet_ntop
-+xtests-$(OPTION_EGLIBC_INET) += tst-leaks2
- 
- generate := mtrace-tst-leaks.out tst-leaks.mtrace tst-leaks2.mtrace
- 
--extra-libs := libresolv libnss_dns
-+extra-libs-$(OPTION_EGLIBC_INET) += libresolv libnss_dns
- ifeq ($(have-thread-library),yes)
--extra-libs += libanl
--routines += gai_sigqueue
-+extra-libs-$(OPTION_EGLIBC_INET_ANL) += libanl
-+routines-$(OPTION_EGLIBC_INET) += gai_sigqueue
- tests += tst-res_hconf_reorder
- endif
--extra-libs-others = $(extra-libs)
-+extra-libs-others-y += $(extra-libs-y)
- libresolv-routines := gethnamaddr res_comp res_debug	\
- 		      res_data res_mkquery res_query res_send		\
- 		      inet_net_ntop inet_net_pton inet_neta base64	\
-@@ -61,7 +64,7 @@ routines                += $(libnss_dns-routines) $(libresolv-routines)
- static-only-routines    += $(libnss_dns-routines) $(libresolv-routines)
- endif
- 
--ifeq (yesyes,$(build-shared)$(have-thread-library))
-+ifeq (yesyesy,$(build-shared)$(have-thread-library)$(OPTION_EGLIBC_INET_ANL))
- tests: $(objpfx)ga_test
- endif
- 
-diff --git a/stdio-common/Makefile b/stdio-common/Makefile
-index d0bf0e1..8655801 100644
---- a/stdio-common/Makefile
-+++ b/stdio-common/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Specific makefile for stdio-common.
- #
-+include ../option-groups.mak
-+
- subdir	:= stdio-common
- 
- include ../Makeconfig
-@@ -30,7 +32,7 @@ routines	:=							      \
- 	vfprintf vprintf printf_fp reg-printf printf-prs printf_fphex	      \
- 	reg-modifier reg-type						      \
- 	printf_size fprintf printf snprintf sprintf asprintf dprintf	      \
--	vfwprintf vfscanf vfwscanf					      \
-+	vfscanf								      \
- 	fscanf scanf sscanf						      \
- 	perror psignal							      \
- 	tmpfile tmpfile64 tmpnam tmpnam_r tempnam tempname		      \
-@@ -41,23 +43,36 @@ routines	:=							      \
- 	isoc99_vsscanf							      \
- 	psiginfo
- 
--aux	:= errlist siglist printf-parsemb printf-parsewc fxprintf
-+# Ideally, _itowa and itowa-digits would be in this option group as
-+# well, but it is used unconditionally by printf_fp and printf_fphex,
-+# and it didn't seem straightforward to disentangle it.
-+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
-+	+= vfwprintf vfwscanf
-+
-+aux	:= errlist siglist printf-parsemb fxprintf
-+aux-$(OPTION_POSIX_C_LANG_WIDE_CHAR) += printf-parsewc
- 
- tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
- 	 temptest tst-fileno test-fwrite tst-ungetc tst-ferror \
- 	 xbug errnobug \
- 	 bug1 bug2 bug3 bug4 bug5 bug6 bug7 bug8 bug9 bug10 bug11 bug12 bug13 \
--	 tfformat tiformat tllformat tstdiomisc tst-printfsz tst-wc-printf \
-+	 tfformat tiformat tllformat tstdiomisc tst-printfsz \
- 	 scanf1 scanf2 scanf3 scanf4 scanf5 scanf7 scanf8 scanf9 scanf10 \
--	 scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf tst-sscanf \
--	 tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \
--	 tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 \
-+	 scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf \
-+	 tst-fseek tst-fmemopen tst-gets \
-+	 tst-sprintf tst-rndseek tst-fdopen tst-fphex \
- 	 tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
--	 tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
--	 bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
--	 scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
--	 bug-vfprintf-nargs tst-long-dbl-fphex tst-fphex-wide tst-sprintf3 \
-+	 tst-fwrite bug16 bug17 tst-sprintf2 bug18 \
-+	 bug19 tst-popen2 scanf14 scanf15 bug21 bug22 \
-+	 scanf16 scanf17 tst-setvbuf1 bug23 bug24 \
-+	 bug-vfprintf-nargs tst-sprintf3 \
- 	 bug25 tst-printf-round bug23-2 bug23-3 bug23-4 bug26 tst-fmemopen3
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) \
-+	 += tst-sscanf tst-swprintf test-vfprintf bug14 scanf13 tst-grouping
-+tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
-+	 += tst-perror bug19a bug20 tst-long-dbl-fphex tst-fphex-wide
-+tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
-+	 += bug18a tst-swscanf tst-wc-printf
- 
- test-srcs = tst-unbputc tst-printf
- 
-diff --git a/stdio-common/_i18n_number.h b/stdio-common/_i18n_number.h
-index 3c73044..ac62b3a 100644
---- a/stdio-common/_i18n_number.h
-+++ b/stdio-common/_i18n_number.h
-@@ -19,10 +19,13 @@
- #include <stdbool.h>
- #include <wchar.h>
- #include <wctype.h>
-+#include <gnu/option-groups.h>
- 
- #include "../locale/outdigits.h"
- #include "../locale/outdigitswc.h"
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
-+
- static CHAR_T *
- _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end)
- {
-@@ -115,3 +118,13 @@ _i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end)
- 
-   return w;
- }
-+
-+#else
-+
-+static CHAR_T *
-+_i18n_number_rewrite (CHAR_T *w, CHAR_T *rear_ptr, CHAR_T *end)
-+{
-+  return w;
-+}
-+
-+#endif
-diff --git a/stdio-common/fxprintf.c b/stdio-common/fxprintf.c
-index 7b2eb94..8476076 100644
---- a/stdio-common/fxprintf.c
-+++ b/stdio-common/fxprintf.c
-@@ -23,6 +23,7 @@
- #include <wchar.h>
- #include <string.h>
- #include <libioP.h>
-+#include <gnu/option-groups.h>
- 
- 
- int
-@@ -37,6 +38,7 @@ __fxprintf (FILE *fp, const char *fmt, ...)
-   int res;
-   if (_IO_fwide (fp, 0) > 0)
-     {
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-       size_t len = strlen (fmt) + 1;
-       wchar_t wfmt[len];
-       for (size_t i = 0; i < len; ++i)
-@@ -45,6 +47,9 @@ __fxprintf (FILE *fp, const char *fmt, ...)
- 	  wfmt[i] = fmt[i];
- 	}
-       res = __vfwprintf (fp, wfmt, ap);
-+#else
-+      abort();
-+#endif
-     }
-   else
-     res = _IO_vfprintf (fp, fmt, ap);
-diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
-index 3023b20..bd0df66 100644
---- a/stdio-common/printf_fp.c
-+++ b/stdio-common/printf_fp.c
-@@ -39,6 +39,7 @@
- #include <unistd.h>
- #include <stdlib.h>
- #include <wchar.h>
-+#include <gnu/option-groups.h>
- #include <stdbool.h>
- #include <rounding-mode.h>
- 
-@@ -142,6 +143,10 @@ extern mp_size_t __mpn_extract_long_double (mp_ptr res_ptr, mp_size_t size,
- extern unsigned int __guess_grouping (unsigned int intdig_max,
- 				      const char *grouping);
- 
-+/* Ideally, when OPTION_EGLIBC_LOCALE_CODE is disabled, this should do
-+   all its work in ordinary characters, rather than doing it in wide
-+   characters and then converting at the end.  But that is a challenge
-+   for another day.  */
- 
- static wchar_t *group_number (wchar_t *buf, wchar_t *bufend,
- 			      unsigned int intdig_no, const char *grouping,
-@@ -251,7 +256,14 @@ ___printf_fp (FILE *fp,
-   mp_limb_t cy;
- 
-   /* Nonzero if this is output on a wide character stream.  */
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-   int wide = info->wide;
-+#else
-+  /* This should never be called on a wide-oriented stream when
-+     OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, but the compiler can't
-+     be trusted to figure that out.  */
-+  const int wide = 0;
-+#endif
- 
-   /* Buffer in which we produce the output.  */
-   wchar_t *wbuffer = NULL;
-@@ -261,6 +273,7 @@ ___printf_fp (FILE *fp,
-   p.expsign = 0;
- 
-   /* Figure out the decimal point character.  */
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   if (info->extra == 0)
-     {
-       decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
-@@ -280,7 +293,13 @@ ___printf_fp (FILE *fp,
-   /* The decimal point character must not be zero.  */
-   assert (*decimal != '\0');
-   assert (decimalwc != L'\0');
-+#else
-+  /* Hard-code values from 'C' locale.  */
-+  decimal = ".";
-+  decimalwc = L'.';
-+#endif
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   if (info->group)
-     {
-       if (info->extra == 0)
-@@ -324,6 +343,9 @@ ___printf_fp (FILE *fp,
-     }
-   else
-     grouping = NULL;
-+#else
-+  grouping = NULL;
-+#endif
- 
-   /* Fetch the argument value.	*/
- #ifndef __NO_LONG_DOUBLE_MATH
-diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c
-index 6c3b5e9..f660ce0 100644
---- a/stdio-common/printf_fphex.c
-+++ b/stdio-common/printf_fphex.c
-@@ -28,6 +28,7 @@
- #include <_itoa.h>
- #include <_itowa.h>
- #include <locale/localeinfo.h>
-+#include <gnu/option-groups.h>
- #include <stdbool.h>
- #include <rounding-mode.h>
- 
-@@ -139,10 +140,18 @@ __printf_fphex (FILE *fp,
-   int done = 0;
- 
-   /* Nonzero if this is output on a wide character stream.  */
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-   int wide = info->wide;
-+#else
-+  /* This should never be called on a wide-oriented stream when
-+     OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, but the compiler can't
-+     be trusted to figure that out.  */
-+  const int wide = 0;
-+#endif
- 
- 
-   /* Figure out the decimal point character.  */
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   if (info->extra == 0)
-     {
-       decimal = _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
-@@ -156,6 +165,10 @@ __printf_fphex (FILE *fp,
-     }
-   /* The decimal point character must never be zero.  */
-   assert (*decimal != '\0' && decimalwc != L'\0');
-+#else
-+  decimal = ".";
-+  decimalwc = L'.';
-+#endif
- 
- 
-   /* Fetch the argument value.	*/
-diff --git a/stdio-common/printf_size.c b/stdio-common/printf_size.c
-index 7dcd58e..6fb7491 100644
---- a/stdio-common/printf_size.c
-+++ b/stdio-common/printf_size.c
-@@ -23,6 +23,7 @@
- #include <math.h>
- #include <printf.h>
- #include <libioP.h>
-+#include <gnu/option-groups.h>
- 
- 
- /* This defines make it possible to use the same code for GNU C library and
-@@ -116,7 +117,14 @@ __printf_size (FILE *fp, const struct printf_info *info,
- 
-   struct printf_info fp_info;
-   int done = 0;
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-   int wide = info->wide;
-+#else
-+  /* This should never be called on a wide-oriented stream when
-+     OPTION_POSIX_C_LANG_WIDE_CHAR is disabled, but the compiler can't
-+     be trusted to figure that out.  */
-+  const int wide = 0;
-+#endif
-   int res;
- 
-   /* Fetch the argument value.	*/
-diff --git a/stdio-common/scanf14.c b/stdio-common/scanf14.c
-index cffccb0..6cc260a 100644
---- a/stdio-common/scanf14.c
-+++ b/stdio-common/scanf14.c
-@@ -3,6 +3,7 @@
- #include <string.h>
- #include <wchar.h>
- #include <libc-internal.h>
-+#include <gnu/option-groups.h>
- 
- #define FAIL() \
-   do {							\
-@@ -48,6 +49,7 @@ main (void)
-   /* See explanation above.  */
-   DIAG_PUSH_NEEDS_COMMENT;
-   DIAG_IGNORE_NEEDS_COMMENT (4.9, "-Wformat");
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   if (sscanf (" 3.25S x", "%4aS%3c", &lsp, c) != 2)
-     FAIL ();
-   else
-@@ -57,6 +59,7 @@ main (void)
-       memset (lsp, 'x', sizeof L"3.25");
-       free (lsp);
-     }
-+#endif
-   if (sscanf ("4.25[0-9.] x", "%a[0-9.]%8c", &sp, c) != 2)
-     FAIL ();
-   else
-diff --git a/stdio-common/tst-popen.c b/stdio-common/tst-popen.c
-index 5def27f..7c9b91e 100644
---- a/stdio-common/tst-popen.c
-+++ b/stdio-common/tst-popen.c
-@@ -19,6 +19,7 @@
- #include <stdio.h>
- #include <string.h>
- #include <wchar.h>
-+#include <gnu/option-groups.h>
- 
- static int
- do_test (void)
-@@ -34,12 +35,14 @@ do_test (void)
-       return 1;
-     }
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-   /* POSIX says that pipe streams are byte-oriented.  */
-   if (fwide (f, 0) >= 0)
-     {
-       puts ("popen did not return byte-oriented stream");
-       result = 1;
-     }
-+#endif
- 
-   if (getline (&line, &len, f) != 5)
-     {
-diff --git a/stdio-common/tst-sprintf.c b/stdio-common/tst-sprintf.c
-index d5284b9..f1e3d21 100644
---- a/stdio-common/tst-sprintf.c
-+++ b/stdio-common/tst-sprintf.c
-@@ -3,7 +3,7 @@
- #include <locale.h>
- #include <string.h>
- #include <libc-internal.h>
--
-+#include <gnu/option-groups.h>
- 
- static int
- do_test (void)
-@@ -11,12 +11,14 @@ do_test (void)
-   char buf[100];
-   int result = 0;
- 
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-   if (sprintf (buf, "%.0ls", L"foo") != 0
-       || strlen (buf) != 0)
-     {
-       puts ("sprintf (buf, \"%.0ls\", L\"foo\") produced some output");
-       result = 1;
-     }
-+#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
- 
- #define SIZE (1024*70000)
- #define STR(x) #x
-diff --git a/stdio-common/tstdiomisc.c b/stdio-common/tstdiomisc.c
-index 5548a71..31ed024 100644
---- a/stdio-common/tstdiomisc.c
-+++ b/stdio-common/tstdiomisc.c
-@@ -4,6 +4,7 @@
- #include <string.h>
- #include <wchar.h>
- #include <libc-internal.h>
-+#include <gnu/option-groups.h>
- 
- static int
- t1 (void)
-@@ -134,6 +135,7 @@ F (void)
-   printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n",
- 	  buf);
- 
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-   swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]), L"%a %A %e %E %f %F %g %G",
- 	    qnanval, qnanval, qnanval, qnanval,
- 	    qnanval, qnanval, qnanval, qnanval);
-@@ -171,6 +173,7 @@ F (void)
-   result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0;
-   printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n",
- 	  wbuf);
-+#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
- 
-   lqnanval = NAN;
- 
-@@ -215,6 +218,7 @@ F (void)
-   printf ("expected \"-inf -INF -inf -INF -inf -INF -inf -INF\", got \"%s\"\n",
- 	  buf);
- 
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-   swprintf (wbuf, sizeof wbuf / sizeof (wbuf[0]),
- 	    L"%La %LA %Le %LE %Lf %LF %Lg %LG",
- 	    lqnanval, lqnanval, lqnanval, lqnanval,
-@@ -259,6 +263,7 @@ F (void)
-   result |= wcscmp (wbuf, L"-inf -INF -inf -INF -inf -INF -inf -INF") != 0;
-   printf ("expected L\"-inf -INF -inf -INF -inf -INF -inf -INF\", got L\"%S\"\n",
- 	  wbuf);
-+#endif /* __OPTION_POSIX_C_LANG_WIDE_CHAR */
- 
-   return result;
- }
-diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
-index 0592e70..f21d973 100644
---- a/stdio-common/vfprintf.c
-+++ b/stdio-common/vfprintf.c
-@@ -29,6 +29,7 @@
- #include <_itoa.h>
- #include <locale/localeinfo.h>
- #include <stdio.h>
-+#include <gnu/option-groups.h>
- 
- /* This code is shared between the standard stdio implementation found
-    in GNU C library and the libio implementation originally found in
-@@ -140,6 +141,18 @@ typedef wchar_t THOUSANDS_SEP_T;
- # define EOF WEOF
- #endif
- 
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-+# define MULTIBYTE_SUPPORT (1)
-+#else
-+# define MULTIBYTE_SUPPORT (0)
-+#endif
-+
-+#if __OPTION_EGLIBC_LOCALE_CODE
-+# define LOCALE_SUPPORT (1)
-+#else
-+# define LOCALE_SUPPORT (0)
-+#endif
-+
- #include "_i18n_number.h"
- 
- /* Include the shared code for parsing the format string.  */
-@@ -1065,8 +1078,11 @@ static const uint8_t jump_table[] =
- # define process_string_arg(fspec) \
-     LABEL (form_character):						      \
-       /* Character.  */							      \
--      if (is_long)							      \
--	goto LABEL (form_wcharacter);					      \
-+      if (is_long)                                                            \
-+        {                                                                     \
-+          assert (MULTIBYTE_SUPPORT);                                         \
-+          goto LABEL (form_wcharacter);                                       \
-+        }                                                                     \
-       --width;	/* Account for the character itself.  */		      \
-       if (!left)							      \
- 	PAD (' ');							      \
-@@ -1079,6 +1095,7 @@ static const uint8_t jump_table[] =
-       break;								      \
- 									      \
-     LABEL (form_wcharacter):						      \
-+      assert (MULTIBYTE_SUPPORT);                                             \
-       {									      \
- 	/* Wide character.  */						      \
- 	char buf[MB_CUR_MAX];						      \
-@@ -1145,6 +1162,7 @@ static const uint8_t jump_table[] =
- 	  }								      \
- 	else								      \
- 	  {								      \
-+            assert (MULTIBYTE_SUPPORT);                                       \
- 	    const wchar_t *s2 = (const wchar_t *) string;		      \
- 	    mbstate_t mbstate;						      \
- 									      \
-@@ -1399,7 +1417,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
-     LABEL (flag_quote):
-       group = 1;
- 
--      if (grouping == (const char *) -1)
-+      if (! LOCALE_SUPPORT)
-+        grouping = NULL;
-+      else if (grouping == (const char *) -1)
- 	{
- #ifdef COMPILE_WPRINTF
- 	  thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC,
-@@ -1728,8 +1748,9 @@ printf_positional (_IO_FILE *s, const CHAR_T *format, int readonly_format,
-   size_t cnt;
- 
-   CHAR_T *workstart = NULL;
--
--  if (grouping == (const char *) -1)
-+  if (! LOCALE_SUPPORT)
-+    grouping = NULL;
-+  else if (grouping == (const char *) -1)
-     {
- #ifdef COMPILE_WPRINTF
-       thousands_sep = _NL_CURRENT_WORD (LC_NUMERIC,
-diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
-index 0e204e7..66cc0af 100644
---- a/stdio-common/vfscanf.c
-+++ b/stdio-common/vfscanf.c
-@@ -29,6 +29,7 @@
- #include <wctype.h>
- #include <bits/libc-lock.h>
- #include <locale/localeinfo.h>
-+#include <gnu/option-groups.h>
- 
- #ifdef	__GNUC__
- # define HAVE_LONGLONG
-@@ -133,6 +134,12 @@
- # define WINT_T		int
- #endif
- 
-+#if __OPTION_POSIX_C_LANG_WIDE_CHAR
-+# define MULTIBYTE_SUPPORT (1)
-+#else
-+# define MULTIBYTE_SUPPORT (0)
-+#endif
-+
- #define encode_error() do {						      \
- 			  errval = 4;					      \
- 			  __set_errno (EILSEQ);				      \
-@@ -316,24 +323,35 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
-   ARGCHECK (s, format);
- 
-  {
--#ifndef COMPILE_WSCANF
-+#if __OPTION_EGLIBC_LOCALE_CODE && !defined (COMPILE_WSCANF)
-    struct __locale_data *const curnumeric = loc->__locales[LC_NUMERIC];
- #endif
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
-    /* Figure out the decimal point character.  */
--#ifdef COMPILE_WSCANF
-+# ifdef COMPILE_WSCANF
-    decimal = _NL_CURRENT_WORD (LC_NUMERIC, _NL_NUMERIC_DECIMAL_POINT_WC);
--#else
-+# else
-    decimal = curnumeric->values[_NL_ITEM_INDEX (DECIMAL_POINT)].string;
--#endif
-+# endif
-    /* Figure out the thousands separator character.  */
--#ifdef COMPILE_WSCANF
-+# ifdef COMPILE_WSCANF
-    thousands = _NL_CURRENT_WORD (LC_NUMERIC, _NL_NUMERIC_THOUSANDS_SEP_WC);
--#else
-+# else
-    thousands = curnumeric->values[_NL_ITEM_INDEX (THOUSANDS_SEP)].string;
-    if (*thousands == '\0')
-      thousands = NULL;
--#endif
-+# endif
-+#else /* if ! __OPTION_EGLIBC_LOCALE_CODE */
-+   /* Hard-code values from the C locale.  */
-+# ifdef COMPILE_WSCANF
-+   decimal = L'.';
-+   thousands = L'\0';
-+# else
-+   decimal = ".";
-+   thousands = NULL;
-+# endif
-+#endif /* __OPTION_EGLIBC_LOCALE_CODE */
-  }
- 
-   /* Lock the stream.  */
-@@ -385,6 +403,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- #ifndef COMPILE_WSCANF
-       if (!isascii ((unsigned char) *f))
- 	{
-+          assert (MULTIBYTE_SUPPORT);
-+
- 	  /* Non-ASCII, may be a multibyte.  */
- 	  int len = __mbrlen (f, strlen (f), &state);
- 	  if (len > 0)
-@@ -830,6 +850,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- 	    }
- 	  /* FALLTHROUGH */
- 	case L_('C'):
-+          assert (MULTIBYTE_SUPPORT);
-+
- 	  if (width == -1)
- 	    width = 1;
- 
-@@ -1172,6 +1194,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- 	  /* FALLTHROUGH */
- 
- 	case L_('S'):
-+          assert (MULTIBYTE_SUPPORT);
-+
- 	  {
- #ifndef COMPILE_WSCANF
- 	    mbstate_t cstate;
-@@ -1419,10 +1443,17 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- 	      const char *mbdigits[10];
- 	      const char *mbdigits_extended[10];
- #endif
-+#if __OPTION_EGLIBC_LOCALE_CODE
- 	      /*  "to_inpunct" is a map from ASCII digits to their
- 		  equivalent in locale. This is defined for locales
- 		  which use an extra digits set.  */
- 	      wctrans_t map = __wctrans ("to_inpunct");
-+#else
-+              /* This will always be the case when
-+                 OPTION_EGLIBC_LOCALE_CODE is disabled, but the
-+                 compiler can't figure that out.  */
-+              wctrans_t map = NULL;
-+#endif
- 	      int n;
- 
- 	      from_level = 0;
-@@ -2088,6 +2119,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- 		--width;
- 	    }
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
- 	  wctrans_t map;
- 	  if (__builtin_expect ((flags & I18N) != 0, 0)
- 	      /* Hexadecimal floats make no sense, fixing localized
-@@ -2304,6 +2336,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- 	      ;
- #endif
- 	    }
-+#endif /* __OPTION_EGLIBC_LOCALE_CODE */
- 
- 	  /* Have we read any character?  If we try to read a number
- 	     in hexadecimal notation and we have read only the `0x'
-@@ -2343,7 +2376,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- 
- 	case L_('['):	/* Character class.  */
- 	  if (flags & LONG)
--	    STRING_ARG (wstr, wchar_t, 100);
-+            {
-+              assert (MULTIBYTE_SUPPORT);
-+              STRING_ARG (wstr, wchar_t, 100);
-+            }
- 	  else
- 	    STRING_ARG (str, char, 100);
- 
-@@ -2417,6 +2453,7 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
- 	  if (flags & LONG)
- 	    {
- 	      size_t now = read_in;
-+              assert (MULTIBYTE_SUPPORT);
- #ifdef COMPILE_WSCANF
- 	      if (__glibc_unlikely (inchar () == WEOF))
- 		input_error ();
-diff --git a/stdlib/Makefile b/stdlib/Makefile
-index 402466a..7e7e304 100644
---- a/stdlib/Makefile
-+++ b/stdlib/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Makefile for stdlib routines
- #
-+include ../option-groups.mak
-+
- subdir	:= stdlib
- 
- include ../Makeconfig
-@@ -30,7 +32,7 @@ headers	:= stdlib.h bits/stdlib.h bits/stdlib-ldbl.h bits/stdlib-float.h      \
- 	   alloca.h fmtmsg.h						      \
- 	   bits/stdlib-bsearch.h
- 
--routines	:=							      \
-+routines-y	:=							      \
- 	atof atoi atol atoll						      \
- 	abort								      \
- 	bsearch qsort msort						      \
-@@ -39,7 +41,6 @@ routines	:=							      \
- 	quick_exit at_quick_exit cxa_at_quick_exit cxa_thread_atexit_impl     \
- 	abs labs llabs							      \
- 	div ldiv lldiv							      \
--	mblen mbstowcs mbtowc wcstombs wctomb				      \
- 	random random_r rand rand_r					      \
- 	drand48 erand48 lrand48 nrand48 mrand48 jrand48			      \
- 	srand48 seed48 lcong48						      \
-@@ -52,9 +53,18 @@ routines	:=							      \
- 	strtof_l strtod_l strtold_l					      \
- 	system canonicalize						      \
- 	a64l l64a							      \
--	rpmatch strfmon strfmon_l getsubopt xpg_basename fmtmsg		      \
--	strtoimax strtoumax wcstoimax wcstoumax				      \
-+	getsubopt xpg_basename						      \
-+	strtoimax strtoumax						      \
- 	getcontext setcontext makecontext swapcontext
-+routines-$(OPTION_EGLIBC_LOCALE_CODE) +=				      \
-+	strfmon strfmon_l
-+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) +=				      \
-+	mblen mbstowcs mbtowc wcstombs wctomb				      \
-+	wcstoimax wcstoumax
-+ifeq (yy,$(OPTION_EGLIBC_LOCALE_CODE)$(OPTION_POSIX_REGEXP))
-+routines-y += rpmatch
-+endif
-+routines-$(OPTION_EGLIBC_FMTMSG) += fmtmsg
- aux =	grouping groupingwc tens_in_limb
- 
- # These routines will be omitted from the libc shared object.
-@@ -62,20 +72,24 @@ aux =	grouping groupingwc tens_in_limb
- # linked against when the shared library will be used.
- static-only-routines = atexit at_quick_exit
- 
--test-srcs	:= tst-fmtmsg
--tests		:= tst-strtol tst-strtod testmb testrand testsort testdiv   \
-+test-srcs-$(OPTION_EGLIBC_FMTMSG)	:= tst-fmtmsg
-+tests		:= tst-strtol tst-strtod testrand testsort testdiv	    \
- 		   test-canon test-canon2 tst-strtoll tst-environ	    \
- 		   tst-xpg-basename tst-random tst-random2 tst-bsearch	    \
- 		   tst-limits tst-rand48 bug-strtod tst-setcontext          \
--		   tst-setcontext2 test-a64l tst-qsort tst-system testmb2   \
--		   bug-strtod2 tst-atof1 tst-atof2 tst-strtod2 tst-strtod3  \
--		   tst-rand48-2 tst-makecontext tst-strtod4 tst-strtod5     \
-+		   tst-setcontext2 test-a64l tst-qsort tst-system	    \
-+		   bug-strtod2 tst-atof1 tst-atof2 tst-strtod2 		    \
-+		   tst-rand48-2 tst-makecontext 			    \
- 		   tst-qsort2 tst-makecontext2 tst-strtod6 tst-unsetenv1    \
- 		   tst-makecontext3 bug-getcontext bug-fmtmsg1		    \
- 		   tst-secure-getenv tst-strtod-overflow tst-strtod-round   \
- 		   tst-tininess tst-strtod-underflow tst-tls-atexit	    \
- 		   tst-setcontext3 tst-tls-atexit-nodelete
- tests-static	:= tst-secure-getenv
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) \
-+		+= tst-strtod3 tst-strtod4 tst-strtod5 testmb2
-+tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
-+		+= testmb
- 
- modules-names	= tst-tls-atexit-lib
- 
-@@ -116,8 +130,10 @@ CFLAGS-tst-makecontext2.c = $(stack-align-test-flags)
- tests-special += $(objpfx)isomac.out
- 
- ifeq ($(run-built-tests),yes)
-+ifeq (y,$(OPTION_EGLIBC_FMTMSG))
- tests-special += $(objpfx)tst-fmtmsg.out
- endif
-+endif
- 
- include ../Rules
- 
-diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
-index e13ab1e..63efe41 100644
---- a/stdlib/strtod_l.c
-+++ b/stdlib/strtod_l.c
-@@ -17,6 +17,7 @@
-    License along with the GNU C Library; if not, see
-    <http://www.gnu.org/licenses/>.  */
- 
-+#include <gnu/option-groups.h>
- #include <xlocale.h>
- 
- extern double ____strtod_l_internal (const char *, char **, int, __locale_t);
-@@ -548,6 +549,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
-   /* Used in several places.  */
-   int cnt;
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   struct __locale_data *current = loc->__locales[LC_NUMERIC];
- 
-   if (__glibc_unlikely (group))
-@@ -586,6 +588,17 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
-   decimal_len = strlen (decimal);
-   assert (decimal_len > 0);
- #endif
-+#else /* if ! __OPTION_EGLIBC_LOCALE_CODE */
-+  /* Hard-code values from the 'C' locale.  */
-+  grouping = NULL;
-+#ifdef USE_WIDE_CHAR
-+  decimal = L'.';
-+# define decimal_len 1
-+#else
-+  decimal = ".";
-+  decimal_len = 1;
-+#endif
-+#endif /* __OPTION_EGLIBC_LOCALE_CODE */
- 
-   /* Prepare number representation.  */
-   exponent = 0;
-diff --git a/stdlib/tst-strtod.c b/stdlib/tst-strtod.c
-index a469208..28fb423 100644
---- a/stdlib/tst-strtod.c
-+++ b/stdlib/tst-strtod.c
-@@ -23,6 +23,7 @@
- #include <errno.h>
- #include <string.h>
- #include <math.h>
-+#include <gnu/option-groups.h>
- 
- struct ltest
-   {
-@@ -176,7 +177,9 @@ main (int argc, char ** argv)
- 
-   status |= long_dbl ();
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   status |= locale_test ();
-+#endif
- 
-   return status ? EXIT_FAILURE : EXIT_SUCCESS;
- }
-@@ -219,6 +222,7 @@ long_dbl (void)
-   return 0;
- }
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
- /* Perform a few tests in a locale with thousands separators.  */
- static int
- locale_test (void)
-@@ -276,3 +280,4 @@ locale_test (void)
- 
-   return result;
- }
-+#endif /* __OPTION_EGLIBC_LOCALE_CODE */
-diff --git a/streams/Makefile b/streams/Makefile
-index a8a6162..ceb423f 100644
---- a/streams/Makefile
-+++ b/streams/Makefile
-@@ -18,11 +18,14 @@
- #
- #	Makefile for streams.
- #
-+include ../option-groups.mak
-+
- subdir	:= streams
- 
- include ../Makeconfig
- 
- headers		= stropts.h sys/stropts.h bits/stropts.h bits/xtitypes.h
--routines	= isastream getmsg getpmsg putmsg putpmsg fattach fdetach
-+routines-$(OPTION_EGLIBC_STREAMS) \
-+	+= isastream getmsg getpmsg putmsg putpmsg fattach fdetach
- 
- include ../Rules
-diff --git a/string/Makefile b/string/Makefile
-index 8424a61..5988834 100644
---- a/string/Makefile
-+++ b/string/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Sub-makefile for string portion of library.
- #
-+include ../option-groups.mak
-+
- subdir	:= string
- 
- include ../Makeconfig
-@@ -39,10 +41,12 @@ routines	:= strcat strchr strcmp strcoll strcpy strcspn		\
- 		   $(addprefix argz-,append count create ctsep next	\
- 				     delete extract insert stringify	\
- 				     addsep replace)			\
--		   envz basename					\
-+		   basename						\
- 		   strcoll_l strxfrm_l string-inlines memrchr		\
- 		   xpg-strerror strerror_l
- 
-+routines-$(OPTION_EGLIBC_ENVZ) += envz
-+
- strop-tests	:= memchr memcmp memcpy memmove mempcpy memset memccpy	\
- 		   stpcpy stpncpy strcat strchr strcmp strcpy strcspn	\
- 		   strlen strncmp strncpy strpbrk strrchr strspn memmem	\
-@@ -51,10 +55,12 @@ strop-tests	:= memchr memcmp memcpy memmove mempcpy memset memccpy	\
- tests		:= tester inl-tester noinl-tester testcopy test-ffs	\
- 		   tst-strlen stratcliff tst-svc tst-inlcall		\
- 		   bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap	\
--		   tst-strtok tst-strxfrm bug-strcoll1 tst-strfry	\
-+		   tst-strtok tst-strfry	\
- 		   bug-strtok1 $(addprefix test-,$(strop-tests))	\
--		   bug-envz1 tst-strxfrm2 tst-endian tst-svc2		\
--		   tst-strtok_r
-+		   tst-strxfrm2 tst-endian tst-svc2 tst-strtok_r
-+tests-$(OPTION_EGLIBC_ENVZ) += bug-envz1
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) \
-+		+= tst-strxfrm bug-strcoll1
- 
- xtests = tst-strcoll-overflow
- 
-diff --git a/string/strcoll_l.c b/string/strcoll_l.c
-index 8f1225f..b36b18c 100644
---- a/string/strcoll_l.c
-+++ b/string/strcoll_l.c
-@@ -24,6 +24,7 @@
- #include <stdint.h>
- #include <string.h>
- #include <sys/param.h>
-+#include <gnu/option-groups.h>
- 
- #ifndef STRING_TYPE
- # define STRING_TYPE char
-@@ -260,7 +261,11 @@ int
- STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
- {
-   struct __locale_data *current = l->__locales[LC_COLLATE];
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   uint_fast32_t nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word;
-+#else
-+  const uint_fast32_t nrules = 0;
-+#endif
-   /* We don't assign the following values right away since it might be
-      unnecessary in case there are no rules.  */
-   const unsigned char *rulesets;
-diff --git a/string/strerror_l.c b/string/strerror_l.c
-index 2ed78b5..6584813 100644
---- a/string/strerror_l.c
-+++ b/string/strerror_l.c
-@@ -21,6 +21,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <sys/param.h>
-+#include <gnu/option-groups.h>
- 
- 
- static __thread char *last_value;
-@@ -29,10 +30,14 @@ static __thread char *last_value;
- static const char *
- translate (const char *str, locale_t loc)
- {
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   locale_t oldloc = __uselocale (loc);
-   const char *res = _(str);
-   __uselocale (oldloc);
-   return res;
-+#else
-+  return str;
-+#endif
- }
- 
- 
-diff --git a/string/strxfrm_l.c b/string/strxfrm_l.c
-index 8b61ea2..41fdc22 100644
---- a/string/strxfrm_l.c
-+++ b/string/strxfrm_l.c
-@@ -24,6 +24,7 @@
- #include <stdlib.h>
- #include <string.h>
- #include <sys/param.h>
-+#include <gnu/option-groups.h>
- 
- #ifndef STRING_TYPE
- # define STRING_TYPE char
-@@ -669,7 +670,11 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
- {
-   locale_data_t l_data;
-   struct __locale_data *current = l->__locales[LC_COLLATE];
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   l_data.nrules = current->values[_NL_ITEM_INDEX (_NL_COLLATE_NRULES)].word;
-+#else
-+  l_data.nrules = 0;
-+#endif
- 
-   /* Handle byte comparison case.  */
-   if (l_data.nrules == 0)
-diff --git a/string/test-strcmp.c b/string/test-strcmp.c
-index dc4ba6f..a978656 100644
---- a/string/test-strcmp.c
-+++ b/string/test-strcmp.c
-@@ -329,34 +329,6 @@ check (void)
- 		FOR_EACH_IMPL (impl, 0)
- 		check_result (impl, s1 + i1, s2 + i2, exp_result);
-       }
--
--  /* Test cases where there are multiple zero bytes after the first.  */
--
--  for (size_t i = 0; i < 16 + 1; i++)
--    {
--      s1[i] = 0x00;
--      s2[i] = 0x00;
--    }
--
--  for (size_t i = 0; i < 16; i++)
--    {
--      int exp_result;
--
--      for (int val = 0x01; val < 0x100; val++)
--	{
--	  for (size_t j = 0; j < i; j++)
--	    {
--	      s1[j] = val;
--	      s2[j] = val;
--	    }
--
--	  s2[i] = val;
--
--	  exp_result = SIMPLE_STRCMP (s1, s2);
--	  FOR_EACH_IMPL (impl, 0)
--	    check_result (impl, s1, s2, exp_result);
--	}
--    }
- }
- 
- 
-diff --git a/string/tst-strxfrm.c b/string/tst-strxfrm.c
-index f48cfc0..c3a51f9 100644
---- a/string/tst-strxfrm.c
-+++ b/string/tst-strxfrm.c
-@@ -3,6 +3,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <gnu/option-groups.h>
- 
- 
- char const string[] = "";
-@@ -64,8 +65,10 @@ do_test (void)
-   int result = 0;
- 
-   result |= test ("C");
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   result |= test ("en_US.ISO-8859-1");
-   result |= test ("de_DE.UTF-8");
-+#endif
- 
-   return result;
- }
-diff --git a/string/tst-strxfrm2.c b/string/tst-strxfrm2.c
-index d5a1115..19c7f30 100644
---- a/string/tst-strxfrm2.c
-+++ b/string/tst-strxfrm2.c
-@@ -1,6 +1,7 @@
- #include <locale.h>
- #include <stdio.h>
- #include <string.h>
-+#include <gnu/option-groups.h>
- 
- static int
- do_test (void)
-@@ -38,6 +39,7 @@ do_test (void)
-       res = 1;
-     }
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
-   if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
-     {
-       puts ("setlocale failed");
-@@ -75,6 +77,7 @@ do_test (void)
- 	  res = 1;
- 	}
-     }
-+#endif
- 
-   return res;
- }
-diff --git a/sunrpc/Makefile b/sunrpc/Makefile
-index 60caa0a..5bc70ab 100644
---- a/sunrpc/Makefile
-+++ b/sunrpc/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Sub-makefile for sunrpc portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= sunrpc
- 
- include ../Makeconfig
-@@ -55,7 +57,6 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
- headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
- 		       $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
- headers = rpc/netdb.h
--install-others = $(inst_sysconfdir)/rpc
- generated += $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
- 	     $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
- generated-dirs += rpcsvc
-@@ -65,20 +66,28 @@ headers += $(headers-in-tirpc) $(headers-not-in-tirpc)
- endif
- 
- ifeq ($(build-shared),yes)
--need-export-routines := auth_des auth_unix clnt_gen clnt_perr clnt_tcp \
-+need-export-routines-$(OPTION_EGLIBC_SUNRPC) := \
-+			auth_des auth_unix clnt_gen clnt_perr clnt_tcp \
- 			clnt_udp get_myaddr key_call netname pm_getport \
--			rpc_thread svc svc_tcp svc_udp xcrypt xdr_array xdr \
-+			rpc_thread svc svc_tcp svc_udp xdr_array xdr \
- 			xdr_intXX_t xdr_mem xdr_ref xdr_sizeof xdr_stdio \
- 			svc_run
-+need-export-routines-y += xcrypt
-+need-export-routines := $(need-export-routines-y)
- 
--routines := auth_none authuxprot bindrsvprt clnt_raw clnt_simp \
-+routines-$(OPTION_EGLIBC_SUNRPC) := \
-+	    auth_none authuxprot bindrsvprt clnt_raw clnt_simp \
- 	    rpc_dtable getrpcport pmap_clnt pm_getmaps pmap_prot pmap_prot2 \
- 	    pmap_rmt rpc_prot rpc_common rpc_cmsg svc_auth svc_authux svc_raw \
- 	    svc_simple xdr_float xdr_rec publickey authdes_prot \
--	    des_crypt des_impl des_soft key_prot openchild rtime svcauth_des \
-+	    key_prot openchild rtime svcauth_des \
- 	    getrpcent getrpcbyname getrpcbynumber \
- 	    getrpcent_r getrpcbyname_r getrpcbynumber_r \
--	    clnt_unix svc_unix create_xid $(need-export-routines)
-+	    clnt_unix svc_unix create_xid
-+
-+# xdecrypt is also used by nss/nss_files/files-key.c.
-+routines-y += des_crypt des_impl des_soft $(need-export-routines)
-+
- ifneq ($(link-obsolete-rpc),yes)
- # We only add the RPC for compatibility to libc.so.
- shared-only-routines = $(routines)
-@@ -87,25 +96,28 @@ endif
- 
- # We do not build rpcinfo anymore.  It is not needed for a bootstrap
- # and not wanted on complete systems.
--# others := rpcinfo
--# install-sbin := rpcinfo
--install-bin := rpcgen
-+# others-$(OPTION_EGLIBC_SUNRPC) += rpcinfo
-+# install-sbin-$(OPTION_EGLIBC_SUNRPC) += rpcinfo
-+install-bin-$(OPTION_EGLIBC_SUNRPC) += rpcgen
- rpcgen-objs = rpc_main.o rpc_hout.o rpc_cout.o rpc_parse.o \
- 	      rpc_scan.o rpc_util.o rpc_svcout.o rpc_clntout.o \
- 	      rpc_tblout.o rpc_sample.o
--extra-objs = $(rpcgen-objs) $(addprefix cross-,$(rpcgen-objs))
--others += rpcgen
-+extra-objs-$(OPTION_EGLIBC_SUNRPC) = $(rpcgen-objs) $(addprefix cross-,$(rpcgen-objs))
-+others-$(OPTION_EGLIBC_SUNRPC) += rpcgen
-+
-+install-others-$(OPTION_EGLIBC_SUNRPC) += $(inst_sysconfdir)/rpc
- 
--tests = tst-xdrmem tst-xdrmem2 test-rpcent
--xtests := tst-getmyaddr
-+tests-$(OPTION_EGLIBC_SUNRPC) = tst-xdrmem tst-xdrmem2 test-rpcent
-+xtests-$(OPTION_EGLIBC_SUNRPC) := tst-getmyaddr
- 
- ifeq ($(have-thread-library),yes)
--xtests += thrsvc
-+xtests-$(OPTION_EGLIBC_SUNRPC) += thrsvc
- endif
- 
- headers += $(rpcsvc:%.x=rpcsvc/%.h)
--extra-libs := librpcsvc
--extra-libs-others := librpcsvc # Make it in `others' pass, not `lib' pass.
-+extra-libs-$(OPTION_EGLIBC_SUNRPC) += librpcsvc
-+# Make it in `others' pass, not `lib' pass.
-+extra-libs-others-y += $(extra-libs-y)
- librpcsvc-routines = $(rpcsvc:%.x=x%)
- librpcsvc-inhibit-o = .os # Build no shared rpcsvc library.
- omit-deps = $(librpcsvc-routines)
-diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile
-index 17c129b..543791a 100644
---- a/sysdeps/arm/Makefile
-+++ b/sysdeps/arm/Makefile
-@@ -37,10 +37,13 @@ ifeq ($(subdir),csu)
- # get offset to rtld_global._dl_hwcap
- gen-as-const-headers += rtld-global-offsets.sym tlsdesc.sym
- aeabi_constants = aeabi_lcsts aeabi_sighandlers aeabi_math
--aeabi_routines = aeabi_assert aeabi_localeconv aeabi_errno_addr \
-+aeabi_routines = aeabi_assert aeabi_errno_addr \
- 		 aeabi_mb_cur_max aeabi_atexit aeabi_memclr aeabi_memcpy \
- 		 aeabi_memmove aeabi_memset \
- 		 aeabi_read_tp libc-aeabi_read_tp
-+ifeq (y,$(OPTION_EGLIBC_LOCALE_CODE))
-+aeabi_routines += aeabi_localeconv
-+endif
- 
- sysdep_routines += $(aeabi_constants) $(aeabi_routines)
- static-only-routines += $(aeabi_constants) aeabi_read_tp
-diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
-index 7a0fe8d..a3e2c0a 100644
---- a/sysdeps/generic/ldsodefs.h
-+++ b/sysdeps/generic/ldsodefs.h
-@@ -435,6 +435,12 @@ extern struct rtld_global _rtld_global __rtld_global_attribute__;
- # undef __rtld_global_attribute__
- #endif
- 
-+#if __OPTION_EGLIBC_RTLD_DEBUG
-+# define GLRO_dl_debug_mask GLRO(dl_debug_mask)
-+#else
-+# define GLRO_dl_debug_mask 0
-+#endif
-+
- #ifndef SHARED
- # define GLRO(name) _##name
- #else
-@@ -447,8 +453,10 @@ struct rtld_global_ro
- {
- #endif
- 
-+#if __OPTION_EGLIBC_RTLD_DEBUG
-   /* If nonzero the appropriate debug information is printed.  */
-   EXTERN int _dl_debug_mask;
-+#endif
- #define DL_DEBUG_LIBS	    (1 << 0)
- #define DL_DEBUG_IMPCALLS   (1 << 1)
- #define DL_DEBUG_BINDINGS   (1 << 2)
-diff --git a/sysdeps/gnu/Makefile b/sysdeps/gnu/Makefile
-index ea68037..3175cc3 100644
---- a/sysdeps/gnu/Makefile
-+++ b/sysdeps/gnu/Makefile
-@@ -59,7 +59,8 @@ $(foreach o,$(object-suffixes) $(object-suffixes:=.d),\
- endif
- 
- ifeq ($(subdir),login)
--sysdep_routines += setutxent getutxent endutxent getutxid getutxline \
-+sysdep_routines-$(OPTION_EGLIBC_UTMPX) \
-+		+= setutxent getutxent endutxent getutxid getutxline \
- 		   pututxline utmpxname updwtmpx getutmpx getutmp
- 
- sysdep_headers += utmpx.h bits/utmpx.h
-diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile
-index 222122d..4509357 100644
---- a/sysdeps/ieee754/ldbl-opt/Makefile
-+++ b/sysdeps/ieee754/ldbl-opt/Makefile
-@@ -11,19 +11,18 @@ libm-routines += s_nexttowardfd
- routines += math_ldbl_opt nldbl-compat
- 
- extra-libs += libnldbl
--libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \
-+libnldbl-calls = asprintf dprintf fprintf fscanf iovfscanf \
- 		 obstack_printf obstack_vprintf printf scanf snprintf \
--		 sprintf sscanf swprintf swscanf vasprintf vdprintf vfprintf \
--		 vfscanf vfwprintf vfwscanf vprintf vscanf vsnprintf \
--		 vsprintf vsscanf vswprintf vswscanf vwprintf vwscanf \
--		 wprintf wscanf printf_fp printf_size \
--		 fprintf_chk fwprintf_chk printf_chk snprintf_chk sprintf_chk \
--		 swprintf_chk vfprintf_chk vfwprintf_chk vprintf_chk \
--		 vsnprintf_chk vsprintf_chk vswprintf_chk vwprintf_chk \
--		 wprintf_chk asprintf_chk vasprintf_chk dprintf_chk \
-+		 sprintf sscanf vasprintf vdprintf vfprintf \
-+		 vfscanf vprintf vscanf vsnprintf \
-+		 vsprintf vsscanf \
-+		 printf_fp printf_size \
-+		 fprintf_chk printf_chk snprintf_chk sprintf_chk \
-+		 vfprintf_chk vprintf_chk \
-+		 vsnprintf_chk vsprintf_chk \
-+		 asprintf_chk vasprintf_chk dprintf_chk \
- 		 vdprintf_chk obstack_printf_chk obstack_vprintf_chk \
- 		 syslog syslog_chk vsyslog vsyslog_chk \
--		 strfmon strfmon_l \
- 		 strtold strtold_l strtoldint wcstold wcstold_l wcstoldint \
- 		 qecvt qfcvt qgcvt qecvt_r qfcvt_r \
- 		 isinf isnan finite signbit scalb log2 lgamma_r ceil \
-@@ -38,9 +37,15 @@ libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \
- 		 casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \
- 		 cabs carg cimag creal clog10 \
- 		 isoc99_scanf isoc99_fscanf isoc99_sscanf \
--		 isoc99_vscanf isoc99_vfscanf isoc99_vsscanf \
-+		 isoc99_vscanf isoc99_vfscanf isoc99_vsscanf
-+libnldbl-calls-$(OPTION_EGLIBC_LOCALE_CODE) += strfmon strfmon_l
-+libnldbl-calls-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) += fwprintf fwscanf \
-+		 swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
-+		 vwprintf vwscanf wprintf wscanf fwprintf_chk swprintf_chk \
-+		 vfwprintf_chk vswprintf_chk vwprintf_chk wprintf_chk \
- 		 isoc99_wscanf isoc99_fwscanf isoc99_swscanf \
- 		 isoc99_vwscanf isoc99_vfwscanf isoc99_vswscanf
-+libnldbl-calls += $(libnldbl-calls-y)
- libnldbl-routines = $(libnldbl-calls:%=nldbl-%)
- libnldbl-inhibit-o = $(object-suffixes)
- libnldbl-static-only-routines = $(libnldbl-routines)
-diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
-index 0198886..55501cd 100644
---- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
-+++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
-@@ -26,6 +26,7 @@
- #include <locale/localeinfo.h>
- #include <sys/syslog.h>
- #include <bits/libc-lock.h>
-+#include <gnu/option-groups.h>
- 
- #include "nldbl-compat.h"
- 
-@@ -33,20 +34,14 @@ libc_hidden_proto (__nldbl_vfprintf)
- libc_hidden_proto (__nldbl_vsscanf)
- libc_hidden_proto (__nldbl_vsprintf)
- libc_hidden_proto (__nldbl_vfscanf)
--libc_hidden_proto (__nldbl_vfwscanf)
- libc_hidden_proto (__nldbl_vdprintf)
--libc_hidden_proto (__nldbl_vswscanf)
--libc_hidden_proto (__nldbl_vfwprintf)
--libc_hidden_proto (__nldbl_vswprintf)
- libc_hidden_proto (__nldbl_vsnprintf)
- libc_hidden_proto (__nldbl_vasprintf)
- libc_hidden_proto (__nldbl_obstack_vprintf)
--libc_hidden_proto (__nldbl___vfwprintf_chk)
- libc_hidden_proto (__nldbl___vsnprintf_chk)
- libc_hidden_proto (__nldbl___vfprintf_chk)
- libc_hidden_proto (__nldbl___vsyslog_chk)
- libc_hidden_proto (__nldbl___vsprintf_chk)
--libc_hidden_proto (__nldbl___vswprintf_chk)
- libc_hidden_proto (__nldbl___vasprintf_chk)
- libc_hidden_proto (__nldbl___vdprintf_chk)
- libc_hidden_proto (__nldbl___obstack_vprintf_chk)
-@@ -54,8 +49,17 @@ libc_hidden_proto (__nldbl___vstrfmon)
- libc_hidden_proto (__nldbl___vstrfmon_l)
- libc_hidden_proto (__nldbl___isoc99_vsscanf)
- libc_hidden_proto (__nldbl___isoc99_vfscanf)
-+
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-+libc_hidden_proto (__nldbl_vfwscanf)
-+libc_hidden_proto (__nldbl_vswscanf)
-+libc_hidden_proto (__nldbl_vfwprintf)
-+libc_hidden_proto (__nldbl_vswprintf)
-+libc_hidden_proto (__nldbl___vfwprintf_chk)
-+libc_hidden_proto (__nldbl___vswprintf_chk)
- libc_hidden_proto (__nldbl___isoc99_vswscanf)
- libc_hidden_proto (__nldbl___isoc99_vfwscanf)
-+#endif
- 
- static void
- __nldbl_cleanup (void *arg)
-@@ -117,6 +121,7 @@ __nldbl_fprintf (FILE *stream, const char *fmt, ...)
- }
- weak_alias (__nldbl_fprintf, __nldbl__IO_fprintf)
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- int
- attribute_compat_text_section weak_function
- __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...)
-@@ -130,6 +135,7 @@ __nldbl_fwprintf (FILE *stream, const wchar_t *fmt, ...)
- 
-   return done;
- }
-+#endif
- 
- int
- attribute_compat_text_section
-@@ -226,6 +232,7 @@ __nldbl_snprintf (char *s, size_t maxlen, const char *fmt, ...)
-   return done;
- }
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- int
- attribute_compat_text_section
- __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...)
-@@ -239,6 +246,7 @@ __nldbl_swprintf (wchar_t *s, size_t n, const wchar_t *fmt, ...)
- 
-   return done;
- }
-+#endif
- 
- int
- attribute_compat_text_section weak_function
-@@ -264,6 +272,7 @@ __nldbl_vdprintf (int d, const char *fmt, va_list arg)
- }
- libc_hidden_def (__nldbl_vdprintf)
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- int
- attribute_compat_text_section weak_function
- __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap)
-@@ -275,6 +284,7 @@ __nldbl_vfwprintf (FILE *s, const wchar_t *fmt, va_list ap)
-   return res;
- }
- libc_hidden_def (__nldbl_vfwprintf)
-+#endif
- 
- int
- attribute_compat_text_section
-@@ -297,6 +307,7 @@ __nldbl_vsnprintf (char *string, size_t maxlen, const char *fmt,
- libc_hidden_def (__nldbl_vsnprintf)
- weak_alias (__nldbl_vsnprintf, __nldbl___vsnprintf)
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- int
- attribute_compat_text_section weak_function
- __nldbl_vswprintf (wchar_t *string, size_t maxlen, const wchar_t *fmt,
-@@ -330,6 +341,7 @@ __nldbl_wprintf (const wchar_t *fmt, ...)
- 
-   return done;
- }
-+#endif
- 
- int
- attribute_compat_text_section
-@@ -419,6 +431,7 @@ __nldbl_scanf (const char *fmt, ...)
-   return done;
- }
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- int
- attribute_compat_text_section
- __nldbl_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
-@@ -491,6 +504,7 @@ __nldbl_wscanf (const wchar_t *fmt, ...)
- 
-   return done;
- }
-+#endif
- 
- int
- attribute_compat_text_section
-@@ -506,6 +520,7 @@ __nldbl___fprintf_chk (FILE *stream, int flag, const char *fmt, ...)
-   return done;
- }
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- int
- attribute_compat_text_section
- __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...)
-@@ -519,6 +534,7 @@ __nldbl___fwprintf_chk (FILE *stream, int flag, const wchar_t *fmt, ...)
- 
-   return done;
- }
-+#endif
- 
- int
- attribute_compat_text_section
-@@ -563,6 +579,7 @@ __nldbl___sprintf_chk (char *s, int flag, size_t slen, const char *fmt, ...)
-   return done;
- }
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- int
- attribute_compat_text_section
- __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen,
-@@ -577,6 +594,7 @@ __nldbl___swprintf_chk (wchar_t *s, size_t n, int flag, size_t slen,
- 
-   return done;
- }
-+#endif
- 
- int
- attribute_compat_text_section
-@@ -590,6 +608,7 @@ __nldbl___vfprintf_chk (FILE *s, int flag, const char *fmt, va_list ap)
- }
- libc_hidden_def (__nldbl___vfprintf_chk)
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- int
- attribute_compat_text_section
- __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap)
-@@ -601,6 +620,7 @@ __nldbl___vfwprintf_chk (FILE *s, int flag, const wchar_t *fmt, va_list ap)
-   return res;
- }
- libc_hidden_def (__nldbl___vfwprintf_chk)
-+#endif
- 
- int
- attribute_compat_text_section
-@@ -635,6 +655,7 @@ __nldbl___vsprintf_chk (char *string, int flag, size_t slen, const char *fmt,
- }
- libc_hidden_def (__nldbl___vsprintf_chk)
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- int
- attribute_compat_text_section
- __nldbl___vswprintf_chk (wchar_t *string, size_t maxlen, int flag, size_t slen,
-@@ -668,6 +689,7 @@ __nldbl___wprintf_chk (int flag, const wchar_t *fmt, ...)
- 
-   return done;
- }
-+#endif
- 
- int
- attribute_compat_text_section
-@@ -775,6 +797,7 @@ __nldbl___printf_fp (FILE *fp, const struct printf_info *info,
-   return ___printf_fp (fp, &info_no_ldbl, args);
- }
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
- ssize_t
- attribute_compat_text_section
- __nldbl_strfmon (char *s, size_t maxsize, const char *format, ...)
-@@ -829,6 +852,7 @@ __nldbl___vstrfmon_l (char *s, size_t maxsize, __locale_t loc,
-   return res;
- }
- libc_hidden_def (__nldbl___vstrfmon_l)
-+#endif
- 
- void
- attribute_compat_text_section
-@@ -941,6 +965,7 @@ __nldbl___isoc99_scanf (const char *fmt, ...)
-   return done;
- }
- 
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- int
- attribute_compat_text_section
- __nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap)
-@@ -1014,6 +1039,7 @@ __nldbl___isoc99_wscanf (const wchar_t *fmt, ...)
- 
-   return done;
- }
-+#endif
- 
- #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0)
- compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0);
-@@ -1057,6 +1083,7 @@ compat_symbol (libc, __nldbl_printf_size, printf_size, GLIBC_2_1);
- compat_symbol (libc, __nldbl___strfmon_l, __strfmon_l, GLIBC_2_1);
- #endif
- #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_2)
-+# if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
- compat_symbol (libc, __nldbl_swprintf, swprintf, GLIBC_2_2);
- compat_symbol (libc, __nldbl_vwprintf, vwprintf, GLIBC_2_2);
- compat_symbol (libc, __nldbl_wprintf, wprintf, GLIBC_2_2);
-@@ -1069,6 +1096,7 @@ compat_symbol (libc, __nldbl_vfwscanf, vfwscanf, GLIBC_2_2);
- compat_symbol (libc, __nldbl_vswscanf, vswscanf, GLIBC_2_2);
- compat_symbol (libc, __nldbl_vwscanf, vwscanf, GLIBC_2_2);
- compat_symbol (libc, __nldbl_wscanf, wscanf, GLIBC_2_2);
-+# endif
- #endif
- #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_3)
- compat_symbol (libc, __nldbl_strfmon_l, strfmon_l, GLIBC_2_3);
-diff --git a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
-index 0d2c8af..f4cea50 100644
---- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
-+++ b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
-@@ -30,6 +30,7 @@
- #include <math.h>
- #include <monetary.h>
- #include <sys/syslog.h>
-+#include <gnu/option-groups.h>
- 
- 
- /* Declare the __nldbl_NAME function the wrappers call that's in libc.so.  */
-@@ -37,19 +38,15 @@
- 
- NLDBL_DECL (_IO_vfscanf);
- NLDBL_DECL (vfscanf);
--NLDBL_DECL (vfwscanf);
- NLDBL_DECL (obstack_vprintf);
- NLDBL_DECL (vasprintf);
- NLDBL_DECL (dprintf);
- NLDBL_DECL (vdprintf);
- NLDBL_DECL (fprintf);
- NLDBL_DECL (vfprintf);
--NLDBL_DECL (vfwprintf);
- NLDBL_DECL (vsnprintf);
- NLDBL_DECL (vsprintf);
- NLDBL_DECL (vsscanf);
--NLDBL_DECL (vswprintf);
--NLDBL_DECL (vswscanf);
- NLDBL_DECL (__asprintf);
- NLDBL_DECL (asprintf);
- NLDBL_DECL (__printf_fp);
-@@ -66,12 +63,18 @@ NLDBL_DECL (__isoc99_sscanf);
- NLDBL_DECL (__isoc99_vscanf);
- NLDBL_DECL (__isoc99_vfscanf);
- NLDBL_DECL (__isoc99_vsscanf);
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-+NLDBL_DECL (vfwscanf);
-+NLDBL_DECL (vfwprintf);
-+NLDBL_DECL (vswprintf);
-+NLDBL_DECL (vswscanf);
- NLDBL_DECL (__isoc99_wscanf);
- NLDBL_DECL (__isoc99_fwscanf);
- NLDBL_DECL (__isoc99_swscanf);
- NLDBL_DECL (__isoc99_vwscanf);
- NLDBL_DECL (__isoc99_vfwscanf);
- NLDBL_DECL (__isoc99_vswscanf);
-+#endif
- 
- /* This one does not exist in the normal interface, only
-    __nldbl___vstrfmon really exists.  */
-@@ -82,22 +85,23 @@ extern ssize_t __nldbl___vstrfmon (char *, size_t, const char *, va_list)
-    since we don't compile with _FORTIFY_SOURCE.  */
- extern int __nldbl___vfprintf_chk (FILE *__restrict, int,
- 				   const char *__restrict, _G_va_list);
--extern int __nldbl___vfwprintf_chk (FILE *__restrict, int,
--				    const wchar_t *__restrict, __gnuc_va_list);
- extern int __nldbl___vsprintf_chk (char *__restrict, int, size_t,
- 				   const char *__restrict, _G_va_list) __THROW;
- extern int __nldbl___vsnprintf_chk (char *__restrict, size_t, int, size_t,
- 				    const char *__restrict, _G_va_list)
-   __THROW;
--extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
--				    const wchar_t *__restrict, __gnuc_va_list)
--  __THROW;
- extern int __nldbl___vasprintf_chk (char **, int, const char *, _G_va_list)
-   __THROW;
- extern int __nldbl___vdprintf_chk (int, int, const char *, _G_va_list);
- extern int __nldbl___obstack_vprintf_chk (struct obstack *, int, const char *,
- 					  _G_va_list) __THROW;
- extern void __nldbl___vsyslog_chk (int, int, const char *, va_list);
--
-+#if __OPTION_POSIX_WIDE_CHAR_DEVICE_IO
-+extern int __nldbl___vfwprintf_chk (FILE *__restrict, int,
-+				    const wchar_t *__restrict, __gnuc_va_list);
-+extern int __nldbl___vswprintf_chk (wchar_t *__restrict, size_t, int, size_t,
-+				    const wchar_t *__restrict, __gnuc_va_list)
-+  __THROW;
-+#endif
- 
- #endif /* __NLDBL_COMPAT_H */
-diff --git a/sysdeps/nptl/Makefile b/sysdeps/nptl/Makefile
-index e9339a3..782009b 100644
---- a/sysdeps/nptl/Makefile
-+++ b/sysdeps/nptl/Makefile
-@@ -18,6 +18,9 @@
- 
- ifeq ($(subdir),nptl)
- libpthread-sysdep_routines += errno-loc
-+ifeq ($(OPTION_EGLIBC_BIG_MACROS),n)
-+sysdep_routines += small-macros-fns
-+endif
- endif
- 
- ifeq ($(subdir),rt)
-diff --git a/sysdeps/nptl/bits/libc-lock.h b/sysdeps/nptl/bits/libc-lock.h
-index 5599cf1..b839378 100644
---- a/sysdeps/nptl/bits/libc-lock.h
-+++ b/sysdeps/nptl/bits/libc-lock.h
-@@ -24,6 +24,14 @@
- #include <stddef.h>
- 
- 
-+#ifdef _LIBC
-+# include <lowlevellock.h>
-+# include <tls.h>
-+# include <pthread-functions.h>
-+# include <errno.h> /* For EBUSY.  */
-+# include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS.  */
-+#endif
-+
- /* Mutex type.  */
- #if defined _LIBC || defined _IO_MTSAFE_IO
- # if (!IS_IN (libc) && !IS_IN (libpthread)) || !defined _LIBC
-@@ -87,6 +95,15 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
- 
- /* Lock the recursive named lock variable.  */
- #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread))
-+# if __OPTION_EGLIBC_BIG_MACROS != 1
-+/* EGLIBC: Declare wrapper function for a big macro if either
-+   !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
-+   small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2).  */
-+extern void __libc_lock_lock_recursive_fn (__libc_lock_recursive_t *);
-+libc_hidden_proto (__libc_lock_lock_recursive_fn);
-+# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
-+# if __OPTION_EGLIBC_BIG_MACROS
-+
- # define __libc_lock_lock_recursive(NAME) \
-   do {									      \
-     void *self = THREAD_SELF;						      \
-@@ -97,6 +114,10 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
-       }									      \
-     ++(NAME).cnt;							      \
-   } while (0)
-+# else
-+# define __libc_lock_lock_recursive(NAME)				\
-+  __libc_lock_lock_recursive_fn (&(NAME))
-+# endif /* __OPTION_EGLIBC_BIG_MACROS */
- #else
- # define __libc_lock_lock_recursive(NAME) \
-   __libc_maybe_call (__pthread_mutex_lock, (&(NAME).mutex), 0)
-@@ -104,6 +125,14 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
- 
- /* Try to lock the recursive named lock variable.  */
- #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread))
-+# if __OPTION_EGLIBC_BIG_MACROS != 1
-+/* EGLIBC: Declare wrapper function for a big macro if either
-+   !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
-+   small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2).  */
-+extern int __libc_lock_trylock_recursive_fn (__libc_lock_recursive_t *);
-+libc_hidden_proto (__libc_lock_trylock_recursive_fn);
-+# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
-+# if __OPTION_EGLIBC_BIG_MACROS
- # define __libc_lock_trylock_recursive(NAME) \
-   ({									      \
-     int result = 0;							      \
-@@ -122,6 +151,10 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
-       ++(NAME).cnt;							      \
-     result;								      \
-   })
-+# else
-+# define __libc_lock_trylock_recursive(NAME) \
-+  __libc_lock_trylock_recursive_fn (&(NAME))
-+# endif /* __OPTION_EGLIBC_BIG_MACROS */
- #else
- # define __libc_lock_trylock_recursive(NAME) \
-   __libc_maybe_call (__pthread_mutex_trylock, (&(NAME).mutex), 0)
-@@ -129,6 +162,14 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
- 
- /* Unlock the recursive named lock variable.  */
- #if defined _LIBC && (IS_IN (libc) || IS_IN (libpthread))
-+# if __OPTION_EGLIBC_BIG_MACROS != 1
-+/* EGLIBC: Declare wrapper function for a big macro if either
-+   !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from
-+   small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2).  */
-+extern void __libc_lock_unlock_recursive_fn (__libc_lock_recursive_t *);
-+libc_hidden_proto (__libc_lock_unlock_recursive_fn);
-+# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
-+# if __OPTION_EGLIBC_BIG_MACROS
- /* We do no error checking here.  */
- # define __libc_lock_unlock_recursive(NAME) \
-   do {									      \
-@@ -138,6 +179,10 @@ typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t;
- 	lll_unlock ((NAME).lock, LLL_PRIVATE);				      \
-       }									      \
-   } while (0)
-+# else
-+# define __libc_lock_unlock_recursive(NAME) \
-+  __libc_lock_unlock_recursive_fn (&(NAME))
-+# endif /* __OPTION_EGLIBC_BIG_MACROS */
- #else
- # define __libc_lock_unlock_recursive(NAME) \
-   __libc_maybe_call (__pthread_mutex_unlock, (&(NAME).mutex), 0)
-diff --git a/sysdeps/nptl/bits/libc-lockP.h b/sysdeps/nptl/bits/libc-lockP.h
-index f55f621..da98869 100644
---- a/sysdeps/nptl/bits/libc-lockP.h
-+++ b/sysdeps/nptl/bits/libc-lockP.h
-@@ -33,6 +33,8 @@
- #include <lowlevellock.h>
- #include <tls.h>
- #include <pthread-functions.h>
-+#include <errno.h> /* For EBUSY.  */
-+#include <gnu/option-groups.h> /* For __OPTION_EGLIBC_BIG_MACROS.  */
- 
- #if IS_IN (libpthread)
- /* This gets us the declarations of the __pthread_* internal names,
-@@ -171,10 +173,22 @@ typedef pthread_key_t __libc_key_t;
- 
- /* Lock the named lock variable.  */
- #if IS_IN (libc) || IS_IN (libpthread)
--# ifndef __libc_lock_lock
--#  define __libc_lock_lock(NAME) \
-+# if __OPTION_EGLIBC_BIG_MACROS != 1
-+/* EGLIBC: Declare wrapper function for a big macro if either
-+   !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
-+   small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2).  */
-+extern void __libc_lock_lock_fn (__libc_lock_t *);
-+libc_hidden_proto (__libc_lock_lock_fn);
-+# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
-+# if __OPTION_EGLIBC_BIG_MACROS
-+#  ifndef __libc_lock_lock
-+#   define __libc_lock_lock(NAME) \
-   ({ lll_lock (NAME, LLL_PRIVATE); 0; })
--# endif
-+#  endif
-+# else
-+#  define __libc_lock_lock(NAME)               \
-+  __libc_lock_lock_fn (&(NAME))
-+# endif /* __OPTION_EGLIBC_BIG_MACROS */
- #else
- # undef __libc_lock_lock
- # define __libc_lock_lock(NAME) \
-@@ -187,10 +201,22 @@ typedef pthread_key_t __libc_key_t;
- 
- /* Try to lock the named lock variable.  */
- #if IS_IN (libc) || IS_IN (libpthread)
--# ifndef __libc_lock_trylock
--#  define __libc_lock_trylock(NAME) \
-+# if __OPTION_EGLIBC_BIG_MACROS != 1
-+/* EGLIBC: Declare wrapper function for a big macro if either
-+   !__OPTION_EGLIBC_BIG_MACROS or we are using a back door from
-+   small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2).  */
-+extern int __libc_lock_trylock_fn (__libc_lock_t *);
-+libc_hidden_proto (__libc_lock_trylock_fn);
-+# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
-+# if __OPTION_EGLIBC_BIG_MACROS
-+#  ifndef __libc_lock_trylock
-+#   define __libc_lock_trylock(NAME) \
-   lll_trylock (NAME)
--# endif
-+#  endif
-+# else
-+# define __libc_lock_trylock(NAME) \
-+  __libc_lock_trylock_fn (&(NAME))
-+# endif /* __OPTION_EGLIBC_BIG_MACROS */
- #else
- # undef __libc_lock_trylock
- # define __libc_lock_trylock(NAME) \
-@@ -206,8 +232,20 @@ typedef pthread_key_t __libc_key_t;
- 
- /* Unlock the named lock variable.  */
- #if IS_IN (libc) || IS_IN (libpthread)
-+# if __OPTION_EGLIBC_BIG_MACROS != 1
-+/* EGLIBC: Declare wrapper function for a big macro if either
-+   !__OPTION_EGLIBC_BIG_MACROS, or we are using a back door from
-+   small-macros-fns.c (__OPTION_EGLIBC_BIG_MACROS == 2).  */
-+extern void __libc_lock_unlock_fn (__libc_lock_t *);
-+libc_hidden_proto (__libc_lock_unlock_fn);
-+# endif /* __OPTION_EGLIBC_BIG_MACROS != 1 */
-+# if __OPTION_EGLIBC_BIG_MACROS
- # define __libc_lock_unlock(NAME) \
-   lll_unlock (NAME, LLL_PRIVATE)
-+# else
-+# define __libc_lock_unlock(NAME) \
-+  __libc_lock_unlock_fn (&(NAME))
-+# endif /* __OPTION_EGLIBC_BIG_MACROS */
- #else
- # define __libc_lock_unlock(NAME) \
-   __libc_maybe_call (__pthread_mutex_unlock, (&(NAME)), 0)
-diff --git a/sysdeps/nptl/small-macros-fns.c b/sysdeps/nptl/small-macros-fns.c
-new file mode 100644
-index 0000000..f751053
---- /dev/null
-+++ b/sysdeps/nptl/small-macros-fns.c
-@@ -0,0 +1,72 @@
-+/* EGLIBC: function wrappers for big macros.
-+   Copyright (C) 2009 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public License as
-+   published by the Free Software Foundation; either version 2.1 of the
-+   License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-+   Boston, MA 02111-1307, USA.  */
-+
-+#include <gnu/option-groups.h>
-+
-+/* Handle macros from ./bits/libc-lock.h.  */
-+#if defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)
-+
-+/* Get the macros for function bodies through a back door.  */
-+# undef __OPTION_EGLIBC_BIG_MACROS
-+# define __OPTION_EGLIBC_BIG_MACROS 2
-+# include <bits/libc-lock.h>
-+
-+void
-+__libc_lock_lock_fn (__libc_lock_t *name)
-+{
-+  __libc_lock_lock (*name);
-+}
-+libc_hidden_def (__libc_lock_lock_fn);
-+
-+void
-+__libc_lock_lock_recursive_fn (__libc_lock_recursive_t *name)
-+{
-+  __libc_lock_lock_recursive (*name);
-+}
-+libc_hidden_def (__libc_lock_lock_recursive_fn);
-+
-+int
-+__libc_lock_trylock_fn (__libc_lock_t *name)
-+{
-+  return __libc_lock_trylock (*name);
-+}
-+libc_hidden_def (__libc_lock_trylock_fn);
-+
-+int
-+__libc_lock_trylock_recursive_fn (__libc_lock_recursive_t *name)
-+{
-+  return __libc_lock_trylock_recursive (*name);
-+}
-+libc_hidden_def (__libc_lock_trylock_recursive_fn);
-+
-+void
-+__libc_lock_unlock_fn (__libc_lock_t *name)
-+{
-+  __libc_lock_unlock (*name);
-+}
-+libc_hidden_def (__libc_lock_unlock_fn);
-+
-+void
-+__libc_lock_unlock_recursive_fn (__libc_lock_recursive_t *name)
-+{
-+  __libc_lock_unlock_recursive (*name);
-+}
-+libc_hidden_def (__libc_lock_unlock_recursive_fn);
-+
-+#endif /*defined _LIBC && (!defined NOT_IN_libc || defined IS_IN_libpthread)*/
-diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c
-index 26e4692..d0a26c8 100644
---- a/sysdeps/unix/sysv/linux/gethostid.c
-+++ b/sysdeps/unix/sysv/linux/gethostid.c
-@@ -21,6 +21,7 @@
- #include <unistd.h>
- #include <netdb.h>
- #include <not-cancel.h>
-+#include <gnu/option-groups.h>
- 
- #define HOSTIDFILE "/etc/hostid"
- 
-@@ -89,6 +90,7 @@ gethostid (void)
- 	return id;
-     }
- 
-+#if __OPTION_EGLIBC_INET
-   /* Getting from the file was not successful.  An intelligent guess for
-      a unique number of a host is its IP address.  Return this.  */
-   if (__gethostname (hostname, MAXHOSTNAMELEN) < 0 || hostname[0] == '\0')
-@@ -115,5 +117,9 @@ gethostid (void)
-   /* For the return value to be not exactly the IP address we do some
-      bit fiddling.  */
-   return (int32_t) (in.s_addr << 16 | in.s_addr >> 16);
-+#else
-+  /* Return an arbitrary value.  */
-+  return 0;
-+#endif
- }
- #endif
-diff --git a/sysdeps/unix/sysv/linux/libc_fatal.c b/sysdeps/unix/sysv/linux/libc_fatal.c
-index 53a8bbb..cb110d4 100644
---- a/sysdeps/unix/sysv/linux/libc_fatal.c
-+++ b/sysdeps/unix/sysv/linux/libc_fatal.c
-@@ -23,6 +23,7 @@
- #include <string.h>
- #include <sys/mman.h>
- #include <sys/uio.h>
-+#include <gnu/option-groups.h>
- 
- static bool
- writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)
-@@ -40,6 +41,7 @@ writev_for_fatal (int fd, const struct iovec *iov, size_t niov, size_t total)
- static void
- backtrace_and_maps (int do_abort, bool written, int fd)
- {
-+#if __OPTION_EGLIBC_BACKTRACE
-   if (do_abort > 1 && written)
-     {
-       void *addrs[64];
-@@ -62,6 +64,7 @@ backtrace_and_maps (int do_abort, bool written, int fd)
-           close_not_cancel_no_status (fd2);
-         }
-     }
-+#endif /* __OPTION_EGLIBC_BACKTRACE */
- }
- #define BEFORE_ABORT		backtrace_and_maps
- 
-diff --git a/time/Makefile b/time/Makefile
-index a411f62..2d022ca 100644
---- a/time/Makefile
-+++ b/time/Makefile
-@@ -18,6 +18,8 @@
- #
- #	Makefile for time routines
- #
-+include ../option-groups.mak
-+
- subdir	:= time
- 
- include ../Makeconfig
-@@ -30,15 +32,23 @@ routines := offtime asctime clock ctime ctime_r difftime \
- 	    tzfile getitimer setitimer			 \
- 	    stime dysize timegm ftime			 \
- 	    getdate strptime strptime_l			 \
--	    strftime wcsftime strftime_l wcsftime_l	 \
-+	    strftime strftime_l				 \
- 	    timespec_get
--aux :=	    era alt_digit lc-time-cleanup
- 
--tests	:= test_time clocktest tst-posixtz tst-strptime tst_wcsftime \
--	   tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \
-+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR)                \
-+	    := wcsftime wcsftime_l
-+aux-$(OPTION_EGLIBC_LOCALE_CODE) += alt_digit era lc-time-cleanup
-+
-+tests	:= test_time clocktest tst-posixtz \
-+	   tst-getdate tst-mktime tst-mktime2 tst-strftime \
- 	   tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \
- 	   tst-strptime3 bug-getdate1 tst-strptime-whitespace tst-ftime
- 
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) \
-+	        += tst-strptime tst-ftime_l
-+tests-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO) \
-+	        += tst_wcsftime
-+
- include ../Rules
- 
- tz-cflags = -DTZDIR='"$(zonedir)"' \
-diff --git a/time/strftime_l.c b/time/strftime_l.c
-index b48ef34..bfdd618 100644
---- a/time/strftime_l.c
-+++ b/time/strftime_l.c
-@@ -35,6 +35,10 @@
- # include "../locale/localeinfo.h"
- #endif
- 
-+#ifdef _LIBC
-+# include <gnu/option-groups.h>
-+#endif
-+
- #if defined emacs && !defined HAVE_BCOPY
- # define HAVE_MEMCPY 1
- #endif
-@@ -882,7 +886,7 @@ __strftime_internal (s, maxsize, format, tp, tzset_called ut_argument
- 	case L_('C'):
- 	  if (modifier == L_('E'))
- 	    {
--#if HAVE_STRUCT_ERA_ENTRY
-+#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && HAVE_STRUCT_ERA_ENTRY
- 	      struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
- 	      if (era)
- 		{
-@@ -955,7 +959,7 @@ __strftime_internal (s, maxsize, format, tp, tzset_called ut_argument
- 
- 	  if (modifier == L_('O') && 0 <= number_value)
- 	    {
--#ifdef _NL_CURRENT
-+#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && defined (_NL_CURRENT)
- 	      /* Get the locale specific alternate representation of
- 		 the number NUMBER_VALUE.  If none exist NULL is returned.  */
- 	      const CHAR_T *cp = nl_get_alt_digit (number_value
-@@ -1260,7 +1264,7 @@ __strftime_internal (s, maxsize, format, tp, tzset_called ut_argument
- 	case L_('Y'):
- 	  if (modifier == 'E')
- 	    {
--#if HAVE_STRUCT_ERA_ENTRY
-+#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && HAVE_STRUCT_ERA_ENTRY
- 	      struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
- 	      if (era)
- 		{
-@@ -1285,7 +1289,7 @@ __strftime_internal (s, maxsize, format, tp, tzset_called ut_argument
- 	case L_('y'):
- 	  if (modifier == L_('E'))
- 	    {
--#if HAVE_STRUCT_ERA_ENTRY
-+#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && HAVE_STRUCT_ERA_ENTRY
- 	      struct era_entry *era = _nl_get_era_entry (tp HELPER_LOCALE_ARG);
- 	      if (era)
- 		{
-diff --git a/time/strptime_l.c b/time/strptime_l.c
-index 5640cce..784ccbc 100644
---- a/time/strptime_l.c
-+++ b/time/strptime_l.c
-@@ -29,6 +29,7 @@
- 
- #ifdef _LIBC
- # define HAVE_LOCALTIME_R 0
-+# include <gnu/option-groups.h>
- # include "../locale/localeinfo.h"
- #endif
- 
-@@ -84,7 +85,7 @@ localtime_r (t, tp)
-     if (val < from || val > to)						      \
-       return NULL;							      \
-   } while (0)
--#ifdef _NL_CURRENT
-+#if (! _LIBC || __OPTION_EGLIBC_LOCALE_CODE) && defined (_NL_CURRENT)
- # define get_alt_number(from, to, n) \
-   ({									      \
-      __label__ do_normal;						      \
-@@ -257,8 +258,10 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
-   int cnt;
-   int cnt_longest;
-   size_t val;
-+#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
-   size_t num_eras;
-   struct era_entry *era = NULL;
-+#endif
-   enum ptime_locale_status { not, loc, raw } decided_longest;
-   struct __strptime_state
-   {
-@@ -820,6 +823,7 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
- 	      s.want_xday = 1;
- 	      break;
- 	    case 'C':
-+#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
- 	      if (s.decided != raw)
- 		{
- 		  if (s.era_cnt >= 0)
-@@ -856,10 +860,12 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
- 
- 		  s.decided = raw;
- 		}
-+#endif
- 	      /* The C locale has no era information, so use the
- 		 normal representation.  */
- 	      goto match_century;
-  	    case 'y':
-+#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
- 	      if (s.decided != raw)
- 		{
- 		  get_number(0, 9999, 4);
-@@ -918,9 +924,10 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
- 
- 		  s.decided = raw;
- 		}
--
-+#endif
- 	      goto match_year_in_century;
- 	    case 'Y':
-+#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
- 	      if (s.decided != raw)
- 		{
- 		  num_eras = _NL_CURRENT_WORD (LC_TIME,
-@@ -948,6 +955,7 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
- 
- 		  s.decided = raw;
- 		}
-+#endif
- 	      get_number (0, 9999, 4);
- 	      tm->tm_year = val - 1900;
- 	      s.want_century = 0;
-@@ -1118,6 +1126,7 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
- 	tm->tm_year = (s.century - 19) * 100;
-     }
- 
-+#if ! _LIBC || __OPTION_EGLIBC_LOCALE_CODE
-   if (s.era_cnt != -1)
-     {
-       era = _nl_select_era_entry (s.era_cnt HELPER_LOCALE_ARG);
-@@ -1132,6 +1141,7 @@ __strptime_internal (rp, fmt, tmp, statep LOCALE_PARAM)
- 	tm->tm_year = era->start_date[0];
-     }
-   else
-+#endif
-     if (s.want_era)
-       {
- 	/* No era found but we have seen an E modifier.  Rectify some
-diff --git a/timezone/Makefile b/timezone/Makefile
-index 886b06e..f922684 100644
---- a/timezone/Makefile
-+++ b/timezone/Makefile
-@@ -127,7 +127,7 @@ $(testdata)/XT%: testdata/XT%
- 
- $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
- 	sed -e 's|/bin/bash|/bin/sh|' \
--	    -e 's|TZDIR=[^}]*|TZDIR=$(zonedir)|' \
-+	    -e '/TZDIR=/s|\$$(pwd)|$(zonedir)|' \
- 	    -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
- 	    -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
- 	    -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \
-diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
-index 44a4494..db9fc24 100644
---- a/wcsmbs/Makefile
-+++ b/wcsmbs/Makefile
-@@ -18,15 +18,21 @@
- #
- #	Sub-makefile for wcsmbs portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= wcsmbs
- 
- include ../Makeconfig
- 
- headers	:= wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h
- 
--routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
-+# These functions are used by printf_fp.c, even in the plain case; see
-+# comments there for OPTION_EGLIBC_LOCALE_CODE.
-+routines  := wmemcpy wmemset
-+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
-+	  := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
- 	    wcsncmp wcsncpy wcspbrk wcsrchr wcsspn wcstok wcsstr wmemchr \
--	    wmemcmp wmemcpy wmemmove wmemset wcpcpy wcpncpy wmempcpy \
-+	    wmemcmp wmemmove wcpcpy wcpncpy wmempcpy \
- 	    btowc wctob mbsinit \
- 	    mbrlen mbrtowc wcrtomb mbsrtowcs wcsrtombs \
- 	    mbsnrtowcs wcsnrtombs wcsnlen wcschrnul \
-@@ -38,14 +44,21 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
- 	    wcscoll_l wcsxfrm_l \
- 	    wcscasecmp wcsncase wcscasecmp_l wcsncase_l \
- 	    wcsmbsload mbsrtowcs_l \
--	    isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf \
- 	    isoc99_swscanf isoc99_vswscanf \
- 	    mbrtoc16 c16rtomb
- 
--strop-tests :=  wcscmp wcsncmp wmemcmp wcslen wcschr wcsrchr wcscpy
--tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
--	 tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \
--	 tst-c16c32-1 wcsatcliff $(addprefix test-,$(strop-tests))
-+routines-$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO)                           \
-+	+= isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf
-+
-+strop-tests :=  wcscmp wmemcmp wmemcmp wcslen wcschr wcsrchr wcscpy
-+
-+tests := tst-wchar-h
-+tests-$(OPTION_EGLIBC_LOCALE_CODE) \
-+	+= tst-btowc tst-mbrtowc tst-mbrtowc2 tst-wcrtomb tst-c16c32-1
-+tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
-+	+= tst-wcstof wcsmbs-tst1 tst-wcsnlen \
-+	tst-wcpncpy tst-mbsrtowcs \
-+	wcsatcliff $(addprefix test-,$(strop-tests))
- 
- include ../Rules
- 
-diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c
-index 6bb49bc..2ab9d07 100644
---- a/wcsmbs/wcsmbsload.c
-+++ b/wcsmbs/wcsmbsload.c
-@@ -21,6 +21,7 @@
- #include <limits.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <gnu/option-groups.h>
- 
- #include <locale/localeinfo.h>
- #include <wcsmbsload.h>
-@@ -143,6 +144,7 @@ __wcsmbs_getfct (const char *to, const char *from, size_t *nstepsp)
-   })
- 
- 
-+#if __OPTION_EGLIBC_LOCALE_CODE
- /* Some of the functions here must not be used while setlocale is called.  */
- __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
- 
-@@ -211,6 +213,17 @@ __wcsmbs_load_conv (struct __locale_data *new_category)
- 
-   __libc_rwlock_unlock (__libc_setlocale_lock);
- }
-+#else
-+void
-+internal_function
-+__wcsmbs_load_conv (struct __locale_data *new_category)
-+{
-+  /* When OPTION_EGLIBC_LOCALE_CODE is disabled, we should never reach
-+     this point: there is no way to change locales, so every locale
-+     passed to get_gconv_fcts should be _nl_C_LC_CTYPE.  */
-+  abort ();
-+}
-+#endif
- 
- 
- /* Clone the current conversion function set.  */
-diff --git a/wctype/Makefile b/wctype/Makefile
-index c56f07c..4e8af43 100644
---- a/wctype/Makefile
-+++ b/wctype/Makefile
-@@ -18,14 +18,20 @@
- #
- #	Sub-makefile for wctype portion of the library.
- #
-+include ../option-groups.mak
-+
- subdir	:= wctype
- 
- include ../Makeconfig
- 
- headers		:= wctype.h
--routines	:= wcfuncs wctype iswctype wctrans towctrans \
--		   wcfuncs_l wctype_l iswctype_l wctrans_l towctrans_l
--
--tests	:= test_wctype test_wcfuncs bug-wctypeh
-+routines 	:= wctrans towctrans towctrans_l
-+routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
-+		:= wcfuncs wctype iswctype \
-+		   wcfuncs_l wctype_l iswctype_l wctrans_l
-+
-+tests	:=
-+tests-$(OPTION_POSIX_C_LANG_WIDE_CHAR) \
-+     += test_wctype test_wcfuncs bug-wctypeh
- 
- include ../Rules
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0025-eglibc-Forward-port-cross-locale-generation-support.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0025-eglibc-Forward-port-cross-locale-generation-support.patch
new file mode 100644
index 0000000..68d1119
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0025-eglibc-Forward-port-cross-locale-generation-support.patch
@@ -0,0 +1,566 @@
+From a5695930aec68b3f501e475d8705cddbb63f695e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Mar 2015 01:33:49 +0000
+Subject: [PATCH 25/25] eglibc: Forward port cross locale generation support
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ locale/Makefile               |  3 ++-
+ locale/catnames.c             | 48 +++++++++++++++++++++++++++++++++++
+ locale/localeinfo.h           |  2 +-
+ locale/programs/charmap-dir.c |  6 +++++
+ locale/programs/ld-collate.c  | 17 ++++++-------
+ locale/programs/ld-ctype.c    | 27 ++++++++++----------
+ locale/programs/ld-time.c     | 31 +++++++++++++++--------
+ locale/programs/linereader.c  |  2 +-
+ locale/programs/localedef.c   |  8 ++++++
+ locale/programs/locfile.c     |  5 +++-
+ locale/programs/locfile.h     | 59 +++++++++++++++++++++++++++++++++++++++++--
+ locale/setlocale.c            | 30 ----------------------
+ 12 files changed, 169 insertions(+), 69 deletions(-)
+ create mode 100644 locale/catnames.c
+
+diff --git a/locale/Makefile b/locale/Makefile
+index 75afbe1..d32523b 100644
+--- a/locale/Makefile
++++ b/locale/Makefile
+@@ -25,7 +25,8 @@ include ../Makeconfig
+ headers		= locale.h bits/locale.h langinfo.h xlocale.h
+ routines	= setlocale findlocale loadlocale loadarchive \
+ 		  localeconv nl_langinfo nl_langinfo_l mb_cur_max \
+-		  newlocale duplocale freelocale uselocale
++		  newlocale duplocale freelocale uselocale \
++		  catnames
+ tests		= tst-C-locale tst-locname tst-duplocale
+ categories	= ctype messages monetary numeric time paper name \
+ 		  address telephone measurement identification collate
+diff --git a/locale/catnames.c b/locale/catnames.c
+new file mode 100644
+index 0000000..9fad357
+--- /dev/null
++++ b/locale/catnames.c
+@@ -0,0 +1,48 @@
++/* Copyright (C) 2006  Free Software Foundation, Inc.
++   This file is part of the GNU C Library.
++
++   The GNU C Library is free software; you can redistribute it and/or
++   modify it under the terms of the GNU Lesser General Public
++   License as published by the Free Software Foundation; either
++   version 2.1 of the License, or (at your option) any later version.
++
++   The GNU C Library is distributed in the hope that it will be useful,
++   but WITHOUT ANY WARRANTY; without even the implied warranty of
++   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++   Lesser General Public License for more details.
++
++   You should have received a copy of the GNU Lesser General Public
++   License along with the GNU C Library; if not, write to the Free
++   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++   02111-1307 USA.  */
++
++#include "localeinfo.h"
++
++/* Define an array of category names (also the environment variable names).  */
++const union catnamestr_t _nl_category_names attribute_hidden =
++  {
++    {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++      category_name,
++#include "categories.def"
++#undef DEFINE_CATEGORY
++    }
++  };
++
++const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
++  {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++    [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
++#include "categories.def"
++#undef DEFINE_CATEGORY
++  };
++
++/* An array of their lengths, for convenience.  */
++const uint8_t _nl_category_name_sizes[] attribute_hidden =
++  {
++#define DEFINE_CATEGORY(category, category_name, items, a) \
++    [category] = sizeof (category_name) - 1,
++#include "categories.def"
++#undef	DEFINE_CATEGORY
++    [LC_ALL] = sizeof ("LC_ALL") - 1
++  };
+diff --git a/locale/localeinfo.h b/locale/localeinfo.h
+index 789da44..4ac9249 100644
+--- a/locale/localeinfo.h
++++ b/locale/localeinfo.h
+@@ -224,7 +224,7 @@ __libc_tsd_define (extern, __locale_t, LOCALE)
+    unused.  We can manage this playing some tricks with weak references.
+    But with thread-local locale settings, it becomes quite ungainly unless
+    we can use __thread variables.  So only in that case do we attempt this.  */
+-#ifndef SHARED
++#if !defined SHARED && !defined IN_GLIBC_LOCALEDEF
+ # include <tls.h>
+ # define NL_CURRENT_INDIRECT	1
+ #endif
+diff --git a/locale/programs/charmap-dir.c b/locale/programs/charmap-dir.c
+index cf7adea..ef3b811 100644
+--- a/locale/programs/charmap-dir.c
++++ b/locale/programs/charmap-dir.c
+@@ -19,7 +19,9 @@
+ #include <error.h>
+ #include <fcntl.h>
+ #include <libintl.h>
++#ifndef NO_UNCOMPRESS
+ #include <spawn.h>
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+@@ -156,6 +158,7 @@ charmap_closedir (CHARMAP_DIR *cdir)
+   return closedir (dir);
+ }
+ 
++#ifndef NO_UNCOMPRESS
+ /* Creates a subprocess decompressing the given pathname, and returns
+    a stream reading its output (the decompressed data).  */
+ static
+@@ -204,6 +207,7 @@ fopen_uncompressed (const char *pathname, const char *compressor)
+     }
+   return NULL;
+ }
++#endif
+ 
+ /* Opens a charmap for reading, given its name (not an alias name).  */
+ FILE *
+@@ -226,6 +230,7 @@ charmap_open (const char *directory, const char *name)
+   if (stream != NULL)
+     return stream;
+ 
++#ifndef NO_UNCOMPRESS
+   memcpy (p, ".gz", 4);
+   stream = fopen_uncompressed (pathname, "gzip");
+   if (stream != NULL)
+@@ -235,6 +240,7 @@ charmap_open (const char *directory, const char *name)
+   stream = fopen_uncompressed (pathname, "bzip2");
+   if (stream != NULL)
+     return stream;
++#endif
+ 
+   return NULL;
+ }
+diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
+index dc0fe30..3c88c6d 100644
+--- a/locale/programs/ld-collate.c
++++ b/locale/programs/ld-collate.c
+@@ -350,7 +350,7 @@ new_element (struct locale_collate_t *collate, const char *mbs, size_t mbslen,
+     }
+   if (wcs != NULL)
+     {
+-      size_t nwcs = wcslen ((wchar_t *) wcs);
++      size_t nwcs = wcslen_uint32 (wcs);
+       uint32_t zero = 0;
+       /* Handle <U0000> as a single character.  */
+       if (nwcs == 0)
+@@ -1776,8 +1776,7 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
+ 
+ 	      if ((*eptr)->nwcs == runp->nwcs)
+ 		{
+-		  int c = wmemcmp ((wchar_t *) (*eptr)->wcs,
+-				   (wchar_t *) runp->wcs, runp->nwcs);
++		  int c = wmemcmp_uint32 ((*eptr)->wcs, runp->wcs, runp->nwcs);
+ 
+ 		  if (c == 0)
+ 		    {
+@@ -2010,9 +2009,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+ 	     one consecutive entry.  */
+ 	  if (runp->wcnext != NULL
+ 	      && runp->nwcs == runp->wcnext->nwcs
+-	      && wmemcmp ((wchar_t *) runp->wcs,
+-			  (wchar_t *)runp->wcnext->wcs,
+-			  runp->nwcs - 1) == 0
++	      && wmemcmp_uint32 (runp->wcs,
++				 runp->wcnext->wcs,
++				 runp->nwcs - 1) == 0
+ 	      && (runp->wcs[runp->nwcs - 1]
+ 		  == runp->wcnext->wcs[runp->nwcs - 1] + 1))
+ 	    {
+@@ -2036,9 +2035,9 @@ add_to_tablewc (uint32_t ch, struct element_t *runp)
+ 		runp = runp->wcnext;
+ 	      while (runp->wcnext != NULL
+ 		     && runp->nwcs == runp->wcnext->nwcs
+-		     && wmemcmp ((wchar_t *) runp->wcs,
+-				 (wchar_t *)runp->wcnext->wcs,
+-				 runp->nwcs - 1) == 0
++		     && wmemcmp_uint32 (runp->wcs,
++					runp->wcnext->wcs,
++					runp->nwcs - 1) == 0
+ 		     && (runp->wcs[runp->nwcs - 1]
+ 			 == runp->wcnext->wcs[runp->nwcs - 1] + 1));
+ 
+diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
+index 3f464ef..b7b6b51 100644
+--- a/locale/programs/ld-ctype.c
++++ b/locale/programs/ld-ctype.c
+@@ -926,7 +926,7 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
+   allocate_arrays (ctype, charmap, ctype->repertoire);
+ 
+   default_missing_len = (ctype->default_missing
+-			 ? wcslen ((wchar_t *) ctype->default_missing)
++			 ? wcslen_uint32 (ctype->default_missing)
+ 			 : 0);
+ 
+   init_locale_data (&file, nelems);
+@@ -1937,7 +1937,7 @@ read_translit_entry (struct linereader *ldfile, struct locale_ctype_t *ctype,
+ 	    ignore = 1;
+ 	  else
+ 	    /* This value is usable.  */
+-	    obstack_grow (ob, to_wstr, wcslen ((wchar_t *) to_wstr) * 4);
++	    obstack_grow (ob, to_wstr, wcslen_uint32 (to_wstr) * 4);
+ 
+ 	  first = 0;
+ 	}
+@@ -2471,8 +2471,8 @@ with character code range values one must use the absolute ellipsis `...'"));
+ 	    }
+ 
+ 	handle_tok_digit:
+-	  class_bit = _ISwdigit;
+-	  class256_bit = _ISdigit;
++	  class_bit = BITw (tok_digit);
++	  class256_bit = BIT (tok_digit);
+ 	  handle_digits = 1;
+ 	  goto read_charclass;
+ 
+@@ -3929,8 +3929,7 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+ 
+ 	  while (idx < number)
+ 	    {
+-	      int res = wcscmp ((const wchar_t *) sorted[idx]->from,
+-				(const wchar_t *) runp->from);
++	      int res = wcscmp_uint32 (sorted[idx]->from, runp->from);
+ 	      if (res == 0)
+ 		{
+ 		  replace = 1;
+@@ -3967,11 +3966,11 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+       for (size_t cnt = 0; cnt < number; ++cnt)
+ 	{
+ 	  struct translit_to_t *srunp;
+-	  from_len += wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
++	  from_len += wcslen_uint32 (sorted[cnt]->from) + 1;
+ 	  srunp = sorted[cnt]->to;
+ 	  while (srunp != NULL)
+ 	    {
+-	      to_len += wcslen ((const wchar_t *) srunp->str) + 1;
++	      to_len += wcslen_uint32 (srunp->str) + 1;
+ 	      srunp = srunp->next;
+ 	    }
+ 	  /* Plus one for the extra NUL character marking the end of
+@@ -3995,18 +3994,18 @@ allocate_arrays (struct locale_ctype_t *ctype, const struct charmap_t *charmap,
+ 	  ctype->translit_from_idx[cnt] = from_len;
+ 	  ctype->translit_to_idx[cnt] = to_len;
+ 
+-	  len = wcslen ((const wchar_t *) sorted[cnt]->from) + 1;
+-	  wmemcpy ((wchar_t *) &ctype->translit_from_tbl[from_len],
+-		   (const wchar_t *) sorted[cnt]->from, len);
++	  len = wcslen_uint32 (sorted[cnt]->from) + 1;
++	  wmemcpy_uint32 (&ctype->translit_from_tbl[from_len],
++			  sorted[cnt]->from, len);
+ 	  from_len += len;
+ 
+ 	  ctype->translit_to_idx[cnt] = to_len;
+ 	  srunp = sorted[cnt]->to;
+ 	  while (srunp != NULL)
+ 	    {
+-	      len = wcslen ((const wchar_t *) srunp->str) + 1;
+-	      wmemcpy ((wchar_t *) &ctype->translit_to_tbl[to_len],
+-		       (const wchar_t *) srunp->str, len);
++	      len = wcslen_uint32 (srunp->str) + 1;
++	      wmemcpy_uint32 (&ctype->translit_to_tbl[to_len],
++			      srunp->str, len);
+ 	      to_len += len;
+ 	      srunp = srunp->next;
+ 	    }
+diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
+index db490c6..75dc505 100644
+--- a/locale/programs/ld-time.c
++++ b/locale/programs/ld-time.c
+@@ -215,8 +215,10 @@ No definition for %s category found"), "LC_TIME"));
+ 	}
+       else
+ 	{
++	  static const uint32_t wt_fmt_ampm[]
++	    = { '%','I',':','%','M',':','%','S',' ','%','p',0 };
+ 	  time->t_fmt_ampm = "%I:%M:%S %p";
+-	  time->wt_fmt_ampm = (const uint32_t *) L"%I:%M:%S %p";
++	  time->wt_fmt_ampm = wt_fmt_ampm;
+ 	}
+     }
+ 
+@@ -226,7 +228,7 @@ No definition for %s category found"), "LC_TIME"));
+       const int days_per_month[12] = { 31, 29, 31, 30, 31, 30,
+ 				       31, 31, 30, 31 ,30, 31 };
+       size_t idx;
+-      wchar_t *wstr;
++      uint32_t *wstr;
+ 
+       time->era_entries =
+ 	(struct era_data *) xmalloc (time->num_era
+@@ -464,18 +466,18 @@ No definition for %s category found"), "LC_TIME"));
+ 	    }
+ 
+ 	  /* Now generate the wide character name and format.  */
+-	  wstr = wcschr ((wchar_t *) time->wera[idx], L':');/* end direction */
+-	  wstr = wstr ? wcschr (wstr + 1, L':') : NULL;	/* end offset */
+-	  wstr = wstr ? wcschr (wstr + 1, L':') : NULL;	/* end start */
+-	  wstr = wstr ? wcschr (wstr + 1, L':') : NULL;	/* end end */
++	  wstr = wcschr_uint32 (time->wera[idx], L':'); /* end direction */
++	  wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end offset */
++	  wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end start */
++	  wstr = wstr ? wcschr_uint32 (wstr + 1, L':') : NULL; /* end end */
+ 	  if (wstr != NULL)
+ 	    {
+-	      time->era_entries[idx].wname = (uint32_t *) wstr + 1;
+-	      wstr = wcschr (wstr + 1, L':');	/* end name */
++	      time->era_entries[idx].wname = wstr + 1;
++	      wstr = wcschr_uint32 (wstr + 1, L':'); /* end name */
+ 	      if (wstr != NULL)
+ 		{
+ 		  *wstr = L'\0';
+-		  time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
++		  time->era_entries[idx].wformat = wstr + 1;
+ 		}
+ 	      else
+ 		time->era_entries[idx].wname =
+@@ -530,7 +532,16 @@ No definition for %s category found"), "LC_TIME"));
+   if (time->date_fmt == NULL)
+     time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
+   if (time->wdate_fmt == NULL)
+-    time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y";
++    {
++      static const uint32_t wdate_fmt[] =
++	{ '%','a',' ',
++	  '%','b',' ',
++	  '%','e',' ',
++	  '%','H',':','%','M',':','%','S',' ',
++	  '%','Z',' ',
++	  '%','Y',0 };
++      time->wdate_fmt = wdate_fmt;
++    }
+ }
+ 
+ 
+diff --git a/locale/programs/linereader.c b/locale/programs/linereader.c
+index 2e05130..653b68c 100644
+--- a/locale/programs/linereader.c
++++ b/locale/programs/linereader.c
+@@ -595,7 +595,7 @@ get_string (struct linereader *lr, const struct charmap_t *charmap,
+ {
+   int return_widestr = lr->return_widestr;
+   char *buf;
+-  wchar_t *buf2 = NULL;
++  uint32_t *buf2 = NULL;
+   size_t bufact;
+   size_t bufmax = 56;
+ 
+diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
+index fd6ca51..328d36c 100644
+--- a/locale/programs/localedef.c
++++ b/locale/programs/localedef.c
+@@ -114,6 +114,7 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
+ #define OPT_LIST_ARCHIVE 309
+ #define OPT_LITTLE_ENDIAN 400
+ #define OPT_BIG_ENDIAN 401
++#define OPT_UINT32_ALIGN 402
+ 
+ /* Definitions of arguments for argp functions.  */
+ static const struct argp_option options[] =
+@@ -150,6 +151,8 @@ static const struct argp_option options[] =
+     N_("Generate little-endian output") },
+   { "big-endian", OPT_BIG_ENDIAN, NULL, 0,
+     N_("Generate big-endian output") },
++  { "uint32-align", OPT_UINT32_ALIGN, "ALIGNMENT", 0,
++    N_("Set the target's uint32_t alignment in bytes (default 4)") },
+   { NULL, 0, NULL, 0, NULL }
+ };
+ 
+@@ -239,12 +242,14 @@ main (int argc, char *argv[])
+      ctype locale.  (P1003.2 4.35.5.2)  */
+   setlocale (LC_CTYPE, "POSIX");
+ 
++#ifndef NO_SYSCONF
+   /* Look whether the system really allows locale definitions.  POSIX
+      defines error code 3 for this situation so I think it must be
+      a fatal error (see P1003.2 4.35.8).  */
+   if (sysconf (_SC_2_LOCALEDEF) < 0)
+     WITH_CUR_LOCALE (error (3, 0, _("\
+ FATAL: system does not define `_POSIX2_LOCALEDEF'")));
++#endif
+ 
+   /* Process charmap file.  */
+   charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
+@@ -338,6 +343,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
+     case OPT_BIG_ENDIAN:
+       set_big_endian (true);
+       break;
++    case OPT_UINT32_ALIGN:
++      uint32_align_mask = strtol (arg, NULL, 0) - 1;
++      break;
+     case 'c':
+       force_output = 1;
+       break;
+diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
+index 33da52e..f790c4c 100644
+--- a/locale/programs/locfile.c
++++ b/locale/programs/locfile.c
+@@ -544,6 +544,9 @@ compare_files (const char *filename1, const char *filename2, size_t size,
+    machine running localedef.  */
+ bool swap_endianness_p;
+ 
++/* The target's value of __align__(uint32_t) - 1.  */
++unsigned int uint32_align_mask = 3;
++
+ /* When called outside a start_locale_structure/end_locale_structure
+    or start_locale_prelude/end_locale_prelude block, record that the
+    next byte in FILE's obstack will be the first byte of a new element.
+@@ -621,7 +624,7 @@ add_locale_string (struct locale_file *file, const char *string)
+ void
+ add_locale_wstring (struct locale_file *file, const uint32_t *string)
+ {
+-  add_locale_uint32_array (file, string, wcslen ((const wchar_t *) string) + 1);
++  add_locale_uint32_array (file, string, wcslen_uint32 (string) + 1);
+ }
+ 
+ /* Record that FILE's next element is the 32-bit integer VALUE.  */
+diff --git a/locale/programs/locfile.h b/locale/programs/locfile.h
+index 6fc441b..118b171 100644
+--- a/locale/programs/locfile.h
++++ b/locale/programs/locfile.h
+@@ -71,6 +71,8 @@ extern void write_all_categories (struct localedef_t *definitions,
+ 
+ extern bool swap_endianness_p;
+ 
++extern unsigned int uint32_align_mask;
++
+ /* Change the output to be big-endian if BIG_ENDIAN is true and
+    little-endian otherwise.  */
+ static inline void
+@@ -89,7 +91,8 @@ maybe_swap_uint32 (uint32_t value)
+ }
+ 
+ /* Likewise, but munge an array of N uint32_ts starting at ARRAY.  */
+-static inline void
++static void
++__attribute__ ((unused))
+ maybe_swap_uint32_array (uint32_t *array, size_t n)
+ {
+   if (swap_endianness_p)
+@@ -99,7 +102,8 @@ maybe_swap_uint32_array (uint32_t *array, size_t n)
+ 
+ /* Like maybe_swap_uint32_array, but the array of N elements is at
+    the end of OBSTACK's current object.  */
+-static inline void
++static void
++__attribute__ ((unused))
+ maybe_swap_uint32_obstack (struct obstack *obstack, size_t n)
+ {
+   maybe_swap_uint32_array ((uint32_t *) obstack_next_free (obstack) - n, n);
+@@ -276,4 +280,55 @@ extern void identification_output (struct localedef_t *locale,
+ 				   const struct charmap_t *charmap,
+ 				   const char *output_path);
+ 
++static size_t wcslen_uint32 (const uint32_t *str) __attribute__ ((unused));
++static uint32_t * wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
++static uint32_t * wcschr_uint32 (const uint32_t *s, uint32_t ch) __attribute__ ((unused));
++static int wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2) __attribute__ ((unused));
++static int wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n) __attribute__ ((unused));
++
++static size_t
++wcslen_uint32 (const uint32_t *str)
++{
++  size_t len = 0;
++  while (str[len] != 0)
++    len++;
++  return len;
++}
++
++static  int
++wmemcmp_uint32 (const uint32_t *s1, const uint32_t *s2, size_t n)
++{
++  while (n-- != 0)
++    {
++      int diff = *s1++ - *s2++;
++      if (diff != 0)
++	return diff;
++    }
++  return 0;
++}
++
++static int
++wcscmp_uint32 (const uint32_t *s1, const uint32_t *s2)
++{
++  while (*s1 != 0 && *s1 == *s2)
++    s1++, s2++;
++  return *s1 - *s2;
++}
++
++static uint32_t *
++wmemcpy_uint32 (uint32_t *s1, const uint32_t *s2, size_t n)
++{
++  return memcpy (s1, s2, n * sizeof (uint32_t));
++}
++
++static uint32_t *
++wcschr_uint32 (const uint32_t *s, uint32_t ch)
++{
++  do
++    if (*s == ch)
++      return (uint32_t *) s;
++  while (*s++ != 0);
++  return 0;
++}
++
+ #endif /* locfile.h */
+diff --git a/locale/setlocale.c b/locale/setlocale.c
+index ead030d..b551332 100644
+--- a/locale/setlocale.c
++++ b/locale/setlocale.c
+@@ -64,36 +64,6 @@ static char *const _nl_current_used[] =
+ #endif
+ 
+ 
+-/* Define an array of category names (also the environment variable names).  */
+-const union catnamestr_t _nl_category_names attribute_hidden =
+-  {
+-    {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+-      category_name,
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+-    }
+-  };
+-
+-const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden =
+-  {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+-    [category] = offsetof (union catnamestr_t, CATNAMEMF (__LINE__)),
+-#include "categories.def"
+-#undef DEFINE_CATEGORY
+-  };
+-
+-/* An array of their lengths, for convenience.  */
+-const uint8_t _nl_category_name_sizes[] attribute_hidden =
+-  {
+-#define DEFINE_CATEGORY(category, category_name, items, a) \
+-    [category] = sizeof (category_name) - 1,
+-#include "categories.def"
+-#undef	DEFINE_CATEGORY
+-    [LC_ALL] = sizeof ("LC_ALL") - 1
+-  };
+-
+-
+ #ifdef NL_CURRENT_INDIRECT
+ # define WEAK_POSTLOAD(postload) weak_extern (postload)
+ #else
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0025-eglibc-Install-PIC-archives.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0025-eglibc-Install-PIC-archives.patch
deleted file mode 100644
index c359cce..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0025-eglibc-Install-PIC-archives.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 5773417fa91a18cd39fb35c9907d72af0ed9ea33 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 01:57:01 +0000
-Subject: [PATCH 25/27] eglibc: Install PIC archives
-
-Forward port from eglibc
-
-2008-02-07  Joseph Myers  <joseph@codesourcery.com>
-
-        * Makerules (install-extras, install-map): New variables.
-        (installed-libcs): Add libc_pic.a.
-        (install-lib): Include _pic.a files for versioned shared
-        libraries.
-        (install-map-nosubdir, install-extras-nosubdir): Add rules for
-        installing extra files.
-        (install-no-libc.a-nosubdir): Depend on install-map-nosubdir and
-        install-extras-nosubdir.
-
-2008-04-01  Maxim Kuvyrkov  <maxim@codesourcery.com>
-
-        * Makerules (install-lib): Don't install libpthread_pic.a.
-        (install-map): Don't install libpthread_pic.map.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makerules | 42 ++++++++++++++++++++++++++++++++++++++++--
- 1 file changed, 40 insertions(+), 2 deletions(-)
-
-diff --git a/Makerules b/Makerules
-index 1dd41aa..41778e1 100644
---- a/Makerules
-+++ b/Makerules
-@@ -713,6 +713,9 @@ ifeq ($(build-shared),yes)
- $(common-objpfx)libc.so: $(common-objpfx)libc.map
- endif
- common-generated += libc.so libc_pic.os
-+ifndef subdir
-+install-extras := soinit.o sofini.o
-+endif
- ifdef libc.so-version
- $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
- 	$(make-link)
-@@ -955,6 +958,7 @@ endif
- 
- install: check-install-supported
- 
-+installed-libcs := $(installed-libcs) $(inst_libdir)/libc_pic.a
- install: $(installed-libcs)
- $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
- 	$(make-target-directory)
-@@ -983,6 +987,22 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
- install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
- install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
- 
-+# Install the _pic.a files for versioned libraries, and corresponding
-+# .map files.
-+# libpthread_pic.a breaks mklibs, so don't install it and its map.
-+install-lib := $(install-lib) $(install-lib.so-versioned:%.so=%_pic.a)
-+install-lib := $(filter-out libpthread_pic.a,$(install-lib))
-+# Despite having a soname libhurduser and libmachuser do not use symbol
-+# versioning, so don't install the corresponding .map files.
-+ifeq ($(build-shared),yes)
-+install-map := $(patsubst %.so,%.map,\
-+			$(foreach L,$(install-lib.so-versioned),$(notdir $L)))
-+install-map := $(filter-out libhurduser.map libmachuser.map libpthread.map,$(install-map))
-+ifndef subdir
-+install-map := $(install-map) libc.map
-+endif
-+endif
-+
- # For versioned libraries, we install three files:
- #	$(inst_libdir)/libfoo.so	-- for linking, symlink or ld script
- #	$(inst_slibdir)/libfoo.so.NN	-- for loading by SONAME, symlink
-@@ -1225,9 +1245,22 @@ $(addprefix $(inst_includedir)/,$(headers-nonh)): $(inst_includedir)/%: \
- endif	# headers-nonh
- endif	# headers
- 
-+ifdef install-map
-+$(addprefix $(inst_libdir)/,$(patsubst lib%.map,lib%_pic.map,$(install-map))): \
-+  $(inst_libdir)/lib%_pic.map: $(common-objpfx)lib%.map $(+force)
-+	$(do-install)
-+endif
-+
-+ifdef install-extras
-+$(addprefix $(inst_libdir)/libc_pic/,$(install-extras)): \
-+  $(inst_libdir)/libc_pic/%.o: $(elf-objpfx)%.os $(+force)
-+	$(do-install)
-+endif
-+
- .PHONY: install-bin-nosubdir install-bin-script-nosubdir \
- 	install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \
--	install-data-nosubdir install-headers-nosubdir
-+	install-data-nosubdir install-headers-nosubdir install-map-nosubdir \
-+	install-extras-nosubdir
- install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
- install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
- install-rootsbin-nosubdir: \
-@@ -1240,6 +1273,10 @@ install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
- install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
- install-others-nosubdir: $(install-others)
- install-others-programs-nosubdir: $(install-others-programs)
-+install-map-nosubdir: $(addprefix $(inst_libdir)/,\
-+		       $(patsubst lib%.map,lib%_pic.map,$(install-map)))
-+install-extras-nosubdir: $(addprefix $(inst_libdir)/libc_pic/,\
-+		       $(install-extras))
- 
- # We need all the `-nosubdir' targets so that `install' in the parent
- # doesn't depend on several things which each iterate over the subdirs.
-@@ -1249,7 +1286,8 @@ install-%:: install-%-nosubdir ;
- 
- .PHONY: install install-no-libc.a-nosubdir
- install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir \
--			    install-lib-nosubdir install-others-nosubdir
-+			    install-lib-nosubdir install-others-nosubdir \
-+			    install-map-nosubdir install-extras-nosubdir
- ifeq ($(build-programs),yes)
- install-no-libc.a-nosubdir: install-bin-nosubdir install-bin-script-nosubdir \
- 			    install-rootsbin-nosubdir install-sbin-nosubdir \
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0026-When-disabling-SSE-make-sure-fpmath-is-not-set-to-us.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0026-When-disabling-SSE-make-sure-fpmath-is-not-set-to-us.patch
new file mode 100644
index 0000000..2b889a9
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc/0026-When-disabling-SSE-make-sure-fpmath-is-not-set-to-us.patch
@@ -0,0 +1,48 @@
+From 97fe7f1b23ea1f17533884b8fa7f7eb40087d558 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 5 Jan 2016 17:50:00 -0800
+Subject: [PATCH] When disabling SSE,  make sure -fpmath is not set to use SSE
+ either
+
+This fixes errors when we inject sse options through CFLAGS and now
+that we have -Werror turned on by default this warning turns to become
+error on x86
+
+gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S
+-mno-sse -mno-mmx
+
+generates warning
+/dev/null:1:0: warning: SSE instruction set disabled, using 387
+arithmetics
+
+where as
+
+gcc -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -x c /dev/null -S
+-mno-sse -mno-mmx -mfpmath=387
+
+Generates no warnings
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ ChangeLog             | 5 +++++
+ sysdeps/i386/Makefile | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/sysdeps/i386/Makefile b/sysdeps/i386/Makefile
+index 168512f..70153b3 100644
+--- a/sysdeps/i386/Makefile
++++ b/sysdeps/i386/Makefile
+@@ -89,7 +89,7 @@ ifeq ($(subdir),elf)
+ # the first 3 mm/xmm/ymm/zmm registers are used to pass vector parameters
+ # which must be preserved.
+ CFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
+-		   -mno-sse -mno-mmx)
++		   -mno-sse -mno-mmx -mfpmath=387)
+ 
+ tests-special += $(objpfx)tst-ld-sse-use.out
+ $(objpfx)tst-ld-sse-use.out: ../sysdeps/i386/tst-ld-sse-use.sh $(objpfx)ld.so
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch
deleted file mode 100644
index 6b611db..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch
+++ /dev/null
@@ -1,556 +0,0 @@
-From ba069b3107f5ad200c4ab95e69cf368e2353b00a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 18 Mar 2015 00:46:50 +0000
-Subject: [PATCH 26/27] eglibc: dl_debug_mask is controlled by
- __OPTION_EGLIBC_RTLD_DEBUG
-
-use GLRO_dl_debug_mask
-
-Singed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- csu/libc-start.c       |  4 ++--
- elf/dl-cache.c         |  4 ++--
- elf/dl-close.c         |  6 +++---
- elf/dl-conflict.c      |  2 +-
- elf/dl-deps.c          |  6 +++---
- elf/dl-error.c         |  2 +-
- elf/dl-fini.c          |  4 ++--
- elf/dl-init.c          |  4 ++--
- elf/dl-load.c          | 16 ++++++++--------
- elf/dl-lookup.c        | 14 +++++++-------
- elf/dl-object.c        |  2 +-
- elf/dl-open.c          | 10 +++++-----
- elf/dl-reloc.c         |  2 +-
- elf/dl-version.c       |  2 +-
- elf/get-dynamic-info.h |  2 +-
- elf/rtld.c             | 22 +++++++++++-----------
- 16 files changed, 51 insertions(+), 51 deletions(-)
-
-diff --git a/csu/libc-start.c b/csu/libc-start.c
-index 0afa7c0..2151fb6 100644
---- a/csu/libc-start.c
-+++ b/csu/libc-start.c
-@@ -238,7 +238,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
- 
-   /* Call the initializer of the program, if any.  */
- #ifdef SHARED
--  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0))
-+  if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS, 0))
-     GLRO(dl_debug_printf) ("\ninitialize program: %s\n\n", argv[0]);
- #endif
-   if (init)
-@@ -261,7 +261,7 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
- #endif
- 
- #ifdef SHARED
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
-     GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
- #endif
- 
-diff --git a/elf/dl-cache.c b/elf/dl-cache.c
-index 862f1d8..dab9c51 100644
---- a/elf/dl-cache.c
-+++ b/elf/dl-cache.c
-@@ -194,7 +194,7 @@ _dl_load_cache_lookup (const char *name)
-   const char *best;
- 
-   /* Print a message if the loading of libs is traced.  */
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
-     _dl_debug_printf (" search cache=%s\n", LD_SO_CACHE);
- 
-   if (cache == NULL)
-@@ -292,7 +292,7 @@ _dl_load_cache_lookup (const char *name)
-     }
- 
-   /* Print our result if wanted.  */
--  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS, 0)
-+  if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS, 0)
-       && best != NULL)
-     _dl_debug_printf ("  trying file=%s\n", best);
- 
-diff --git a/elf/dl-close.c b/elf/dl-close.c
-index c897247..b1b4bd5 100644
---- a/elf/dl-close.c
-+++ b/elf/dl-close.c
-@@ -125,7 +125,7 @@ _dl_close_worker (struct link_map *map, bool force)
- 	dl_close_state = rerun;
- 
-       /* There are still references to this object.  Do nothing more.  */
--      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
-+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
- 	_dl_debug_printf ("\nclosing file=%s; direct_opencount=%u\n",
- 			  map->l_name, map->l_direct_opencount);
- 
-@@ -269,7 +269,7 @@ _dl_close_worker (struct link_map *map, bool force)
- 	  if (imap->l_init_called)
- 	    {
- 	      /* When debugging print a message first.  */
--	      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS,
-+	      if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS,
- 				    0))
- 		_dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
- 				  imap->l_name, nsid);
-@@ -711,7 +711,7 @@ _dl_close_worker (struct link_map *map, bool force)
- 	  free (imap->l_reldeps);
- 
- 	  /* Print debugging message.  */
--	  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
-+	  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
- 	    _dl_debug_printf ("\nfile=%s [%lu];  destroying link map\n",
- 			      imap->l_name, imap->l_ns);
- 
-diff --git a/elf/dl-conflict.c b/elf/dl-conflict.c
-index 47a946e..e6a3f21 100644
---- a/elf/dl-conflict.c
-+++ b/elf/dl-conflict.c
-@@ -32,7 +32,7 @@ _dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
- 		       ElfW(Rela) *conflictend)
- {
- #if ! ELF_MACHINE_NO_RELA
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_RELOC))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_RELOC))
-     _dl_debug_printf ("\nconflict processing: %s\n", DSO_FILENAME (l->l_name));
- 
-   {
-diff --git a/elf/dl-deps.c b/elf/dl-deps.c
-index eee146a..1a4b004 100644
---- a/elf/dl-deps.c
-+++ b/elf/dl-deps.c
-@@ -127,7 +127,7 @@ empty dynamic string token substitution"));				      \
- 	    else							      \
- 	      {								      \
- 		/* This is for DT_AUXILIARY.  */			      \
--		if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))   \
-+		if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))   \
- 		  _dl_debug_printf (N_("\
- cannot load auxiliary `%s' because of empty dynamic string token "	      \
- 					    "substitution\n"), __str);	      \
-@@ -303,7 +303,7 @@ _dl_map_object_deps (struct link_map *map,
- 		args.name = name;
- 
- 		/* Say that we are about to load an auxiliary library.  */
--		if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_LIBS,
-+		if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_LIBS,
- 				      0))
- 		  _dl_debug_printf ("load auxiliary object=%s"
- 				    " requested by file=%s\n",
-@@ -520,7 +520,7 @@ _dl_map_object_deps (struct link_map *map,
-       runp->map->l_reserved = 0;
-     }
- 
--  if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK, 0) != 0
-+  if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_PRELINK, 0) != 0
-       && map == GL(dl_ns)[LM_ID_BASE]._ns_loaded)
-     {
-       /* If we are to compute conflicts, we have to build local scope
-diff --git a/elf/dl-error.c b/elf/dl-error.c
-index 0fc3fd8..ea82f4d 100644
---- a/elf/dl-error.c
-+++ b/elf/dl-error.c
-@@ -139,7 +139,7 @@ internal_function
- _dl_signal_cerror (int errcode, const char *objname, const char *occation,
- 		   const char *errstring)
- {
--  if (__builtin_expect (GLRO(dl_debug_mask)
-+  if (__builtin_expect (GLRO_dl_debug_mask
- 			& ~(DL_DEBUG_STATISTICS|DL_DEBUG_PRELINK), 0))
-     _dl_debug_printf ("%s: error: %s: %s (%s)\n", objname, occation,
- 		      errstring, receiver ? "continued" : "fatal");
-diff --git a/elf/dl-fini.c b/elf/dl-fini.c
-index 6cfe651..f59f7fe 100644
---- a/elf/dl-fini.c
-+++ b/elf/dl-fini.c
-@@ -234,7 +234,7 @@ _dl_fini (void)
- 		  || l->l_info[DT_FINI] != NULL)
- 		{
- 		  /* When debugging print a message first.  */
--		  if (__builtin_expect (GLRO(dl_debug_mask)
-+		  if (__builtin_expect (GLRO_dl_debug_mask
- 					& DL_DEBUG_IMPCALLS, 0))
- 		    _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n",
- 				      DSO_FILENAME (l->l_name),
-@@ -286,7 +286,7 @@ _dl_fini (void)
-       goto again;
-     }
- 
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS))
-     _dl_debug_printf ("\nruntime linker statistics:\n"
- 		      "           final number of relocations: %lu\n"
- 		      "final number of relocations from cache: %lu\n",
-diff --git a/elf/dl-init.c b/elf/dl-init.c
-index 2f85731..e46e8b6 100644
---- a/elf/dl-init.c
-+++ b/elf/dl-init.c
-@@ -46,7 +46,7 @@ call_init (struct link_map *l, int argc, char **argv, char **env)
-     return;
- 
-   /* Print a debug message if wanted.  */
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
-     _dl_debug_printf ("\ncalling init: %s\n\n",
- 		      DSO_FILENAME (l->l_name));
- 
-@@ -96,7 +96,7 @@ _dl_init (struct link_map *main_map, int argc, char **argv, char **env)
-       ElfW(Addr) *addrs;
-       unsigned int cnt;
- 
--      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS))
-+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_IMPCALLS))
- 	_dl_debug_printf ("\ncalling preinit: %s\n\n",
- 			  DSO_FILENAME (main_map->l_name));
- 
-diff --git a/elf/dl-load.c b/elf/dl-load.c
-index f664f50..8c28744 100644
---- a/elf/dl-load.c
-+++ b/elf/dl-load.c
-@@ -943,7 +943,7 @@ _dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
-     }
- 
-   /* Print debugging message.  */
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
-     _dl_debug_printf ("file=%s [%lu];  generating link map\n", name, nsid);
- 
-   /* This is the ELF header.  We read it in `open_verify'.  */
-@@ -1347,7 +1347,7 @@ cannot enable executable stack as shared object requires");
- 
-   l->l_entry += l->l_addr;
- 
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
-     _dl_debug_printf ("\
-   dynamic: 0x%0*lx  base: 0x%0*lx   size: 0x%0*Zx\n\
-     entry: 0x%0*lx  phdr: 0x%0*lx  phnum:   %*u\n\n",
-@@ -1789,7 +1789,7 @@ open_path (const char *name, size_t namelen, int mode,
- 
-       /* If we are debugging the search for libraries print the path
- 	 now if it hasn't happened now.  */
--      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS)
-+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS)
- 	  && current_what != this_dir->what)
- 	{
- 	  current_what = this_dir->what;
-@@ -1810,7 +1810,7 @@ open_path (const char *name, size_t namelen, int mode,
- 	     - buf);
- 
- 	  /* Print name we try if this is wanted.  */
--	  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
-+	  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
- 	    _dl_debug_printf ("  trying file=%s\n", buf);
- 
- 	  fd = open_verify (buf, fbp, loader, whatcode, mode,
-@@ -1955,7 +1955,7 @@ _dl_map_object (struct link_map *loader, const char *name,
-     }
- 
-   /* Display information if we are debugging.  */
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES)
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES)
-       && loader != NULL)
-     _dl_debug_printf ((mode & __RTLD_CALLMAP) == 0
- 		      ? "\nfile=%s [%lu];  needed by %s [%lu]\n"
-@@ -1997,7 +1997,7 @@ _dl_map_object (struct link_map *loader, const char *name,
- 
-       size_t namelen = strlen (name) + 1;
- 
--      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
-+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
- 	_dl_debug_printf ("find library=%s [%lu]; searching\n", name, nsid);
- 
-       fd = -1;
-@@ -2119,7 +2119,7 @@ _dl_map_object (struct link_map *loader, const char *name,
- #endif
- 
-       /* Add another newline when we are tracing the library loading.  */
--      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
-+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
- 	_dl_debug_printf ("\n");
-     }
-   else
-@@ -2152,7 +2152,7 @@ _dl_map_object (struct link_map *loader, const char *name,
-   if (__glibc_unlikely (fd == -1))
-     {
-       if (trace_mode
--	  && __glibc_likely ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) == 0))
-+	  && __glibc_likely ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK) == 0))
- 	{
- 	  /* We haven't found an appropriate library.  But since we
- 	     are only interested in the list of libraries this isn't
-diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
-index 11cb44b..588c3e4 100644
---- a/elf/dl-lookup.c
-+++ b/elf/dl-lookup.c
-@@ -302,7 +302,7 @@ do_lookup_unique (const char *undef_name, uint_fast32_t new_hash,
- 	 hash table.  */
-       if (__glibc_unlikely (tab->size))
- 	{
--	  assert (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK);
-+	  assert (GLRO_dl_debug_mask & DL_DEBUG_PRELINK);
- 	  goto success;
- 	}
- #endif
-@@ -378,7 +378,7 @@ do_lookup_x (const char *undef_name, uint_fast32_t new_hash,
- 	continue;
- 
-       /* Print some debugging info if wanted.  */
--      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS))
-+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SYMBOLS))
- 	_dl_debug_printf ("symbol=%s;  lookup in file=%s [%lu]\n",
- 			  undef_name, DSO_FILENAME (map->l_name),
- 			  map->l_ns);
-@@ -755,7 +755,7 @@ add_dependency (struct link_map *undef_map, struct link_map *map, int flags)
- 	}
- 
-       /* Display information if we are debugging.  */
--      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
-+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
- 	_dl_debug_printf ("\
- \nfile=%s [%lu];  needed by %s [%lu] (relocation dependency)\n\n",
- 			  DSO_FILENAME (map->l_name),
-@@ -859,7 +859,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
-     {
-       if ((*ref == NULL || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
- 	  && skip_map == NULL
--	  && !(GLRO(dl_debug_mask) & DL_DEBUG_UNUSED))
-+	  && !(GLRO_dl_debug_mask & DL_DEBUG_UNUSED))
- 	{
- 	  /* We could find no value for a strong reference.  */
- 	  const char *reference_name = undef_map ? undef_map->l_name : "";
-@@ -935,7 +935,7 @@ _dl_lookup_symbol_x (const char *undef_name, struct link_map *undef_map,
-   if (__glibc_unlikely (current_value.m->l_used == 0))
-     current_value.m->l_used = 1;
- 
--  if (__glibc_unlikely (GLRO(dl_debug_mask)
-+  if (__glibc_unlikely (GLRO_dl_debug_mask
- 			& (DL_DEBUG_BINDINGS|DL_DEBUG_PRELINK)))
-     _dl_debug_bindings (undef_name, undef_map, ref,
- 			&current_value, version, type_class, protected);
-@@ -1000,7 +1000,7 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
- {
-   const char *reference_name = undef_map->l_name;
- 
--  if (GLRO(dl_debug_mask) & DL_DEBUG_BINDINGS)
-+  if (GLRO_dl_debug_mask & DL_DEBUG_BINDINGS)
-     {
-       _dl_debug_printf ("binding file %s [%lu] to %s [%lu]: %s symbol `%s'",
- 			DSO_FILENAME (reference_name),
-@@ -1014,7 +1014,7 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
- 	_dl_debug_printf_c ("\n");
-     }
- #ifdef SHARED
--  if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
-+  if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
-     {
-       int conflict = 0;
-       struct sym_val val = { NULL, NULL };
-diff --git a/elf/dl-object.c b/elf/dl-object.c
-index 1d58bbc..938a257 100644
---- a/elf/dl-object.c
-+++ b/elf/dl-object.c
-@@ -98,7 +98,7 @@ _dl_new_object (char *realname, const char *libname, int type,
-   new->l_type = type;
-   /* If we set the bit now since we know it is never used we avoid
-      dirtying the cache line later.  */
--  if ((GLRO(dl_debug_mask) & DL_DEBUG_UNUSED) == 0)
-+  if ((GLRO_dl_debug_mask & DL_DEBUG_UNUSED) == 0)
-     new->l_used = 1;
-   new->l_loader = loader;
- #if NO_TLS_OFFSET != 0
-diff --git a/elf/dl-open.c b/elf/dl-open.c
-index 2db1c02..1288604 100644
---- a/elf/dl-open.c
-+++ b/elf/dl-open.c
-@@ -147,7 +147,7 @@ add_to_global (struct link_map *new)
- 	  ns->_ns_main_searchlist->r_list[new_nlist++] = map;
- 
- 	  /* We modify the global scope.  Report this.  */
--	  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
-+	  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
- 	    _dl_debug_printf ("\nadd %s [%lu] to global scope\n",
- 			      map->l_name, map->l_ns);
- 	}
-@@ -251,7 +251,7 @@ dl_open_worker (void *a)
-   if (__glibc_unlikely (new->l_searchlist.r_list != NULL))
-     {
-       /* Let the user know about the opencount.  */
--      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
-+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
- 	_dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
- 			  new->l_name, new->l_ns, new->l_direct_opencount);
- 
-@@ -302,7 +302,7 @@ dl_open_worker (void *a)
-   LIBC_PROBE (map_complete, 3, args->nsid, r, new);
- 
-   /* Print scope information.  */
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
-     _dl_show_scope (new, 0);
- 
-   /* Only do lazy relocation if `LD_BIND_NOW' is not set.  */
-@@ -519,7 +519,7 @@ dl_open_worker (void *a)
- 	}
- 
-       /* Print scope information.  */
--      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
-+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
- 	_dl_show_scope (imap, from_scope);
-     }
- 
-@@ -577,7 +577,7 @@ TLS generation counter wrapped!  Please report this."));
- #endif
- 
-   /* Let the user know about the opencount.  */
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_FILES))
-     _dl_debug_printf ("opening file=%s [%lu]; direct_opencount=%u\n\n",
- 		      new->l_name, new->l_ns, new->l_direct_opencount);
- }
-diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
-index 61252d7..4c83815 100644
---- a/elf/dl-reloc.c
-+++ b/elf/dl-reloc.c
-@@ -178,7 +178,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
-       && __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0))
-     lazy = 0;
- 
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_RELOC))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_RELOC))
-     _dl_debug_printf ("\nrelocation processing: %s%s\n",
- 		      DSO_FILENAME (l->l_name), lazy ? " (lazy)" : "");
- 
-diff --git a/elf/dl-version.c b/elf/dl-version.c
-index f6e5cd9..320628c 100644
---- a/elf/dl-version.c
-+++ b/elf/dl-version.c
-@@ -82,7 +82,7 @@ match_symbol (const char *name, Lmid_t ns, ElfW(Word) hash, const char *string,
-   int result = 0;
- 
-   /* Display information about what we are doing while debugging.  */
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_VERSIONS))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_VERSIONS))
-     _dl_debug_printf ("\
- checking for version `%s' in file %s [%lu] required by file %s [%lu]\n",
- 		      string, DSO_FILENAME (map->l_name),
-diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h
-index dc8359d..7774fda 100644
---- a/elf/get-dynamic-info.h
-+++ b/elf/get-dynamic-info.h
-@@ -166,7 +166,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
- 	 them. Therefore to avoid breaking existing applications the
- 	 best we can do is add a warning during debugging with the
- 	 intent of notifying the user of the problem.  */
--      if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)
-+      if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0)
- 	  && l->l_flags_1 & ~DT_1_SUPPORTED_MASK)
- 	_dl_debug_printf ("\nWARNING: Unsupported flag value(s) of 0x%x in DT_FLAGS_1.\n",
- 			  l->l_flags_1 & ~DT_1_SUPPORTED_MASK);
-diff --git a/elf/rtld.c b/elf/rtld.c
-index fc3a2db..59c4637 100644
---- a/elf/rtld.c
-+++ b/elf/rtld.c
-@@ -323,7 +323,7 @@ _dl_start_final (void *arg, struct dl_start_final_info *info)
-     }
- #endif
- 
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_STATISTICS))
-     {
- #ifndef HP_TIMING_NONAVAIL
-       print_statistics (&rtld_total_time);
-@@ -1701,7 +1701,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
- 	 after relocation.  */
-       struct link_map *l;
- 
--      if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
-+      if (GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
- 	{
- 	  struct r_scope_elem *scope = &main_map->l_searchlist;
- 
-@@ -1731,7 +1731,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
- 		_dl_printf ("\n");
- 	    }
- 	}
--      else if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
-+      else if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
- 	{
- 	  /* Look through the dependencies of the main executable
- 	     and determine which of them is not actually
-@@ -1839,7 +1839,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
- 		    }
- 		}
- 
--	      if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
-+	      if ((GLRO_dl_debug_mask & DL_DEBUG_PRELINK)
- 		  && rtld_multiple_ref)
- 		{
- 		  /* Mark the link map as not yet relocated again.  */
-@@ -1972,7 +1972,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
-       if (r_list == r_listend && liblist == liblistend)
- 	prelinked = true;
- 
--      if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_LIBS))
-+      if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_LIBS))
- 	_dl_debug_printf ("\nprelink checking: %s\n",
- 			  prelinked ? "ok" : "failed");
-     }
-@@ -1990,7 +1990,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
-   GLRO(dl_init_all_dirs) = GL(dl_all_dirs);
- 
-   /* Print scope information.  */
--  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_SCOPES))
-+  if (__glibc_unlikely (GLRO_dl_debug_mask & DL_DEBUG_SCOPES))
-     {
-       _dl_debug_printf ("\nInitial object scopes\n");
- 
-@@ -2265,7 +2265,7 @@ process_dl_debug (const char *dl_debug)
- 	    if (debopts[cnt].len == len
- 		&& memcmp (dl_debug, debopts[cnt].name, len) == 0)
- 	      {
--		GLRO(dl_debug_mask) |= debopts[cnt].mask;
-+		GLRO_dl_debug_mask |= debopts[cnt].mask;
- 		any_debug = 1;
- 		break;
- 	      }
-@@ -2286,7 +2286,7 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy);
-       ++dl_debug;
-     }
- 
--  if (GLRO(dl_debug_mask) & DL_DEBUG_UNUSED)
-+  if (GLRO_dl_debug_mask & DL_DEBUG_UNUSED)
-     {
-       /* In order to get an accurate picture of whether a particular
- 	 DT_NEEDED entry is actually used we have to process both
-@@ -2294,7 +2294,7 @@ warning: debug option `%s' unknown; try LD_DEBUG=help\n", copy);
-       GLRO(dl_lazy) = 0;
-     }
- 
--  if (GLRO(dl_debug_mask) & DL_DEBUG_HELP)
-+  if (GLRO_dl_debug_mask & DL_DEBUG_HELP)
-     {
-       size_t cnt;
- 
-@@ -2499,7 +2499,7 @@ process_envvars (enum mode *modep)
- 	      mode = trace;
- 	      GLRO(dl_verbose) = 1;
- #if __OPTION_EGLIBC_RTLD_DEBUG
--	      GLRO(dl_debug_mask) |= DL_DEBUG_PRELINK;
-+	      GLRO_dl_debug_mask |= DL_DEBUG_PRELINK;
- #endif
- 	      GLRO(dl_trace_prelink) = &envline[17];
- 	    }
-@@ -2548,7 +2548,7 @@ process_envvars (enum mode *modep)
- 	{
- 	  unsetenv ("MALLOC_CHECK_");
- #if __OPTION_EGLIBC_RTLD_DEBUG
--	  GLRO(dl_debug_mask) = 0;
-+	  GLRO_dl_debug_mask = 0;
- #endif
- 	}
- 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch
deleted file mode 100644
index 4106167..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From e98779aa56fae0346dff2d0b72acadd0eaf01891 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 27 May 2015 16:10:50 -0700
-Subject: [PATCH 27/27] eglibc-use-option-groups: Conditionally exclude c++
- tests
-
-    Some test programs written in c++ are still included in spite of
-    "libc-cxx-tests" being omitted from DISTRO_FEATURES_LIBC.
-    All .cc programs are compiled with g++.
-    g++ automatically specifies linking against the C++ library.
-    This patch conditionally excludes the following tests as well:
-
-      bug-atexit3-lib.cc
-      tst-cancel24.cc
-      tst-cancel24-static.cc
-      tst-unique3lib.cc
-      tst-unique3lib2.cc
-      tst-unique4lib.cc
-      tst-unique3.cc
-      tst-unique4.cc
-
-    Tested with DISTRO_FEATURES_LIBC_remove = " libc-cxx-tests"
-
-    [YOCTO #7003]
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- dlfcn/Makefile |  8 ++++++--
- elf/Makefile   | 19 ++++++++++++++-----
- nptl/Makefile  | 12 ++++++++++--
- 3 files changed, 30 insertions(+), 9 deletions(-)
-
-diff --git a/dlfcn/Makefile b/dlfcn/Makefile
-index 3827607..920bd58 100644
---- a/dlfcn/Makefile
-+++ b/dlfcn/Makefile
-@@ -39,16 +39,20 @@ ifeq (yes,$(build-shared))
- tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \
- 	bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \
- 	tstatexit bug-dl-leaf tst-rec-dlopen
--endif
--
- tests-$(OPTION_EGLIBC_CXX_TESTS) += bug-atexit3
- 
-+endif
-+
- modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \
- 		defaultmod2 errmsg1mod modatexit modcxaatexit \
- 		bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \
- 		bug-atexit2-lib bug-dl-leaf-lib \
- 		bug-dl-leaf-lib-cb moddummy1 moddummy2
- 
-+ifeq (y,$(OPTION_EGLIBC_CXX_TESTS))
-+modules-names += bug-atexit3-lib
-+endif
-+
- failtestmod.so-no-z-defs = yes
- glreflib2.so-no-z-defs = yes
- errmsg1mod.so-no-z-defs = yes
-diff --git a/elf/Makefile b/elf/Makefile
-index 71a18a1..26fe3c5 100644
---- a/elf/Makefile
-+++ b/elf/Makefile
-@@ -17,6 +17,8 @@
- 
- # Makefile for elf subdirectory of GNU C Library.
- 
-+include ../option-groups.mak
-+
- subdir		:= elf
- 
- include ../Makeconfig
-@@ -145,12 +147,15 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
- 	 unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
- 	 tst-audit1 tst-audit2 tst-audit8 tst-audit9 \
- 	 tst-stackguard1 tst-addr1 tst-thrlock \
--	 tst-unique1 tst-unique2 $(if $(CXX),tst-unique3 tst-unique4 \
--	 tst-nodelete) \
-+	 tst-unique1 tst-unique2 \
- 	 tst-initorder tst-initorder2 tst-relsort1 tst-null-argv \
- 	 tst-ptrguard1 tst-tlsalign tst-tlsalign-extern tst-nodelete-opened \
- 	 tst-nodelete2
- #	 reldep9
-+ifeq (y,$(OPTION_EGLIBC_CXX_TESTS))
-+tests += $(if $(CXX),tst-unique3 tst-unique4 tst-nodelete)
-+endif
-+
- ifeq ($(build-hardcoded-path-in-tests),yes)
- tests += tst-dlopen-aout
- LDFLAGS-tst-dlopen-aout = $(no-pie-ldflag)
-@@ -209,9 +214,6 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
- 		tst-unique1mod1 tst-unique1mod2 \
- 		tst-unique2mod1 tst-unique2mod2 \
- 		tst-auditmod9a tst-auditmod9b \
--		$(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \
--		  tst-nodelete-uniquemod tst-nodelete-rtldmod \
--		  tst-nodelete-zmod) \
- 		tst-initordera1 tst-initorderb1 \
- 		tst-initordera2 tst-initorderb2 \
- 		tst-initordera3 tst-initordera4 \
-@@ -220,6 +222,13 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
- 		tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \
- 		tst-array5dep tst-null-argv-lib \
- 		tst-tlsalign-lib tst-nodelete-opened-lib tst-nodelete2mod
-+
-+ifeq (y,$(OPTION_EGLIBC_CXX_TESTS))
-+modules-names += $(if $(CXX),tst-unique3lib tst-unique3lib2 tst-unique4lib \
-+		  tst-nodelete-uniquemod tst-nodelete-rtldmod \
-+		  tst-nodelete-zmod)
-+endif
-+
- ifeq (yes,$(have-protected-data))
- modules-names += tst-protected1moda tst-protected1modb
- tests += tst-protected1a tst-protected1b
-diff --git a/nptl/Makefile b/nptl/Makefile
-index 596ca3c..50a708b 100644
---- a/nptl/Makefile
-+++ b/nptl/Makefile
-@@ -390,12 +390,20 @@ link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \
- 		    $(common-objpfx)libc.a
- 
- tests-static += tst-locale1 tst-locale2 tst-stackguard1-static \
--		tst-cancel21-static tst-cancel24-static tst-cond8-static \
-+		tst-cancel21-static tst-cond8-static \
- 		tst-mutex8-static tst-mutexpi8-static tst-sem11-static \
- 		tst-sem12-static
--tests += tst-stackguard1-static tst-cancel21-static tst-cancel24-static \
-+
-+ifeq (y,$(OPTION_EGLIBC_CXX_TESTS))
-+tests-static += tst-cancel24-static
-+endif
-+
-+tests += tst-stackguard1-static tst-cancel21-static \
- 	 tst-cond8-static tst-mutex8-static tst-mutexpi8-static \
- 	 tst-sem11-static tst-sem12-static
-+
-+tests-$(OPTION_EGLIBC_CXX_TESTS) += tst-cancel24-static
-+
- xtests-static += tst-setuid1-static
- 
- # These tests are linked with libc before libpthread
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/0028-Clear-ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA-for-prel.patch b/yocto-poky/meta/recipes-core/glibc/glibc/0028-Clear-ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA-for-prel.patch
deleted file mode 100644
index 3455df1..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/0028-Clear-ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA-for-prel.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From cadaf1336332ca7bcdfe4a400776e5782a20e26d Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Wed, 28 Oct 2015 07:49:44 -0700
-Subject: [PATCH] Keep only ELF_RTYPE_CLASS_{PLT|COPY} bits for prelink
-
-prelink runs ld.so with the environment variable LD_TRACE_PRELINKING
-set to dump the relocation type class from _dl_debug_bindings.  prelink
-has the following relocation type classes:
-
- #define RTYPE_CLASS_VALID       8
- #define RTYPE_CLASS_PLT         (8|1)
- #define RTYPE_CLASS_COPY        (8|2)
- #define RTYPE_CLASS_TLS         (8|4)
-
-where ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA has a conflict with
-RTYPE_CLASS_TLS.
-
-Since prelink only uses ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY
-bits, we should clear the other bits when the DL_DEBUG_PRELINK bit is
-set.
-
-	[BZ #19178]
-	* elf/dl-lookup.c (RTYPE_CLASS_VALID): New.
-	(RTYPE_CLASS_PLT): Likewise.
-	(RTYPE_CLASS_COPY): Likewise.
-	(RTYPE_CLASS_TLS): Likewise.
-	(_dl_debug_bindings): Use RTYPE_CLASS_TLS and RTYPE_CLASS_VALID
-	to set relocation type class for DL_DEBUG_PRELINK.  Keep only
-	ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY bits for
-	DL_DEBUG_PRELINK.
-
-Upstream-Status: submitted (https://sourceware.org/bugzilla/show_bug.cgi?id=19178)
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
----
- elf/dl-lookup.c | 21 +++++++++++++++++++--
- 1 file changed, 19 insertions(+), 2 deletions(-)
-
-diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
-index 581fb20..6ae6cc3 100644
---- a/elf/dl-lookup.c
-+++ b/elf/dl-lookup.c
-@@ -1016,6 +1016,18 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
- #ifdef SHARED
-   if (GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
-     {
-+/* ELF_RTYPE_CLASS_XXX must match RTYPE_CLASS_XXX used by prelink with
-+   LD_TRACE_PRELINKING.  */
-+#define RTYPE_CLASS_VALID	8
-+#define RTYPE_CLASS_PLT		(8|1)
-+#define RTYPE_CLASS_COPY	(8|2)
-+#define RTYPE_CLASS_TLS		(8|4)
-+#if ELF_RTYPE_CLASS_PLT != 0 && ELF_RTYPE_CLASS_PLT != 1
-+# error ELF_RTYPE_CLASS_PLT must be 0 or 1!
-+#endif
-+#if ELF_RTYPE_CLASS_COPY != 0 && ELF_RTYPE_CLASS_COPY != 2
-+# error ELF_RTYPE_CLASS_COPY must be 0 or 2!
-+#endif
-       int conflict = 0;
-       struct sym_val val = { NULL, NULL };
- 
-@@ -1071,12 +1083,17 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
- 
-       if (value->s)
- 	{
-+	  /* Keep only ELF_RTYPE_CLASS_PLT and ELF_RTYPE_CLASS_COPY
-+	     bits since since prelink only uses them.  */
-+	  type_class &= ELF_RTYPE_CLASS_PLT | ELF_RTYPE_CLASS_COPY;
- 	  if (__glibc_unlikely (ELFW(ST_TYPE) (value->s->st_info)
- 				== STT_TLS))
--	    type_class = 4;
-+	    /* Clear the RTYPE_CLASS_VALID bit in RTYPE_CLASS_TLS.  */
-+	    type_class = RTYPE_CLASS_TLS & ~RTYPE_CLASS_VALID;
- 	  else if (__glibc_unlikely (ELFW(ST_TYPE) (value->s->st_info)
- 				     == STT_GNU_IFUNC))
--	    type_class |= 8;
-+	    /* Set the RTYPE_CLASS_VALID bit.  */
-+	    type_class |= RTYPE_CLASS_VALID;
- 	}
- 
-       if (conflict
--- 
-1.9.3
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-7547.patch b/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-7547.patch
deleted file mode 100644
index 4e539f8..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-7547.patch
+++ /dev/null
@@ -1,642 +0,0 @@
-From e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca Mon Sep 17 00:00:00 2001
-From: Carlos O'Donell <carlos@systemhalted.org>
-Date: Tue, 16 Feb 2016 21:26:37 -0500
-Subject: [PATCH] CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug
- 18665).
-
-* A stack-based buffer overflow was found in libresolv when invoked from
-  libnss_dns, allowing specially crafted DNS responses to seize control
-  of execution flow in the DNS client.  The buffer overflow occurs in
-  the functions send_dg (send datagram) and send_vc (send TCP) for the
-  NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC
-  family.  The use of AF_UNSPEC triggers the low-level resolver code to
-  send out two parallel queries for A and AAAA.  A mismanagement of the
-  buffers used for those queries could result in the response of a query
-  writing beyond the alloca allocated buffer created by
-  _nss_dns_gethostbyname4_r.  Buffer management is simplified to remove
-  the overflow.  Thanks to the Google Security Team and Red Hat for
-  reporting the security impact of this issue, and Robert Holiday of
-  Ciena for reporting the related bug 18665. (CVE-2015-7547)
-
-See also:
-https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html
-https://sourceware.org/ml/libc-alpha/2016-02/msg00418.html
-
-Upstream-Status: Backport
-CVE: CVE-2015-7547
-
-https://sourceware.org/git/?p=glibc.git;a=commit;h=e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca
-minor tweeking to apply to Changelog and res_send.c
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog                 |  17 ++-
- NEWS                      |  14 +++
- resolv/nss_dns/dns-host.c | 111 +++++++++++++++++++-
- resolv/res_query.c        |   3 +
- resolv/res_send.c         | 260 +++++++++++++++++++++++++++++++++++-----------
- 5 files changed, 339 insertions(+), 66 deletions(-)
-
-Index: git/NEWS
-===================================================================
---- git.orig/NEWS
-+++ git/NEWS
-@@ -105,6 +105,20 @@ Security related changes:
-   depending on the length of the string passed as an argument to the
-   functions.  Reported by Joseph Myers.
- 
-+* A stack-based buffer overflow was found in libresolv when invoked from
-+  libnss_dns, allowing specially crafted DNS responses to seize control
-+  of execution flow in the DNS client.  The buffer overflow occurs in
-+  the functions send_dg (send datagram) and send_vc (send TCP) for the
-+  NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC
-+  family.  The use of AF_UNSPEC triggers the low-level resolver code to
-+  send out two parallel queries for A and AAAA.  A mismanagement of the
-+  buffers used for those queries could result in the response of a query
-+  writing beyond the alloca allocated buffer created by
-+  _nss_dns_gethostbyname4_r.  Buffer management is simplified to remove
-+  the overflow.  Thanks to the Google Security Team and Red Hat for
-+  reporting the security impact of this issue, and Robert Holiday of
-+  Ciena for reporting the related bug 18665. (CVE-2015-7547)
-+
- * The following bugs are resolved with this release:
- 
-   6652, 10672, 12674, 12847, 12926, 13862, 14132, 14138, 14171, 14498,
-Index: git/resolv/nss_dns/dns-host.c
-===================================================================
---- git.orig/resolv/nss_dns/dns-host.c
-+++ git/resolv/nss_dns/dns-host.c
-@@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *an
-   int h_namelen = 0;
- 
-   if (ancount == 0)
--    return NSS_STATUS_NOTFOUND;
-+    {
-+      *h_errnop = HOST_NOT_FOUND;
-+      return NSS_STATUS_NOTFOUND;
-+    }
- 
-   while (ancount-- > 0 && cp < end_of_message && had_error == 0)
-     {
-@@ -1208,7 +1211,14 @@ gaih_getanswer_slice (const querybuf *an
-   /* Special case here: if the resolver sent a result but it only
-      contains a CNAME while we are looking for a T_A or T_AAAA record,
-      we fail with NOTFOUND instead of TRYAGAIN.  */
--  return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND;
-+  if (canon != NULL)
-+    {
-+      *h_errnop = HOST_NOT_FOUND;
-+      return NSS_STATUS_NOTFOUND;
-+    }
-+
-+  *h_errnop = NETDB_INTERNAL;
-+  return NSS_STATUS_TRYAGAIN;
- }
- 
- 
-@@ -1222,11 +1232,101 @@ gaih_getanswer (const querybuf *answer1,
- 
-   enum nss_status status = NSS_STATUS_NOTFOUND;
- 
-+  /* Combining the NSS status of two distinct queries requires some
-+     compromise and attention to symmetry (A or AAAA queries can be
-+     returned in any order).  What follows is a breakdown of how this
-+     code is expected to work and why. We discuss only SUCCESS,
-+     TRYAGAIN, NOTFOUND and UNAVAIL, since they are the only returns
-+     that apply (though RETURN and MERGE exist).  We make a distinction
-+     between TRYAGAIN (recoverable) and TRYAGAIN' (not-recoverable).
-+     A recoverable TRYAGAIN is almost always due to buffer size issues
-+     and returns ERANGE in errno and the caller is expected to retry
-+     with a larger buffer.
-+
-+     Lastly, you may be tempted to make significant changes to the
-+     conditions in this code to bring about symmetry between responses.
-+     Please don't change anything without due consideration for
-+     expected application behaviour.  Some of the synthesized responses
-+     aren't very well thought out and sometimes appear to imply that
-+     IPv4 responses are always answer 1, and IPv6 responses are always
-+     answer 2, but that's not true (see the implementation of send_dg
-+     and send_vc to see response can arrive in any order, particularly
-+     for UDP). However, we expect it holds roughly enough of the time
-+     that this code works, but certainly needs to be fixed to make this
-+     a more robust implementation.
-+
-+     ----------------------------------------------
-+     | Answer 1 Status /   | Synthesized | Reason |
-+     | Answer 2 Status     | Status      |        |
-+     |--------------------------------------------|
-+     | SUCCESS/SUCCESS     | SUCCESS     | [1]    |
-+     | SUCCESS/TRYAGAIN    | TRYAGAIN    | [5]    |
-+     | SUCCESS/TRYAGAIN'   | SUCCESS     | [1]    |
-+     | SUCCESS/NOTFOUND    | SUCCESS     | [1]    |
-+     | SUCCESS/UNAVAIL     | SUCCESS     | [1]    |
-+     | TRYAGAIN/SUCCESS    | TRYAGAIN    | [2]    |
-+     | TRYAGAIN/TRYAGAIN   | TRYAGAIN    | [2]    |
-+     | TRYAGAIN/TRYAGAIN'  | TRYAGAIN    | [2]    |
-+     | TRYAGAIN/NOTFOUND   | TRYAGAIN    | [2]    |
-+     | TRYAGAIN/UNAVAIL    | TRYAGAIN    | [2]    |
-+     | TRYAGAIN'/SUCCESS   | SUCCESS     | [3]    |
-+     | TRYAGAIN'/TRYAGAIN  | TRYAGAIN    | [3]    |
-+     | TRYAGAIN'/TRYAGAIN' | TRYAGAIN'   | [3]    |
-+     | TRYAGAIN'/NOTFOUND  | TRYAGAIN'   | [3]    |
-+     | TRYAGAIN'/UNAVAIL   | UNAVAIL     | [3]    |
-+     | NOTFOUND/SUCCESS    | SUCCESS     | [3]    |
-+     | NOTFOUND/TRYAGAIN   | TRYAGAIN    | [3]    |
-+     | NOTFOUND/TRYAGAIN'  | TRYAGAIN'   | [3]    |
-+     | NOTFOUND/NOTFOUND   | NOTFOUND    | [3]    |
-+     | NOTFOUND/UNAVAIL    | UNAVAIL     | [3]    |
-+     | UNAVAIL/SUCCESS     | UNAVAIL     | [4]    |
-+     | UNAVAIL/TRYAGAIN    | UNAVAIL     | [4]    |
-+     | UNAVAIL/TRYAGAIN'   | UNAVAIL     | [4]    |
-+     | UNAVAIL/NOTFOUND    | UNAVAIL     | [4]    |
-+     | UNAVAIL/UNAVAIL     | UNAVAIL     | [4]    |
-+     ----------------------------------------------
-+
-+     [1] If the first response is a success we return success.
-+	 This ignores the state of the second answer and in fact
-+	 incorrectly sets errno and h_errno to that of the second
-+	 answer.  However because the response is a success we ignore
-+	 *errnop and *h_errnop (though that means you touched errno on
-+	 success).  We are being conservative here and returning the
-+	 likely IPv4 response in the first answer as a success.
-+
-+     [2] If the first response is a recoverable TRYAGAIN we return
-+	 that instead of looking at the second response.  The
-+	 expectation here is that we have failed to get an IPv4 response
-+	 and should retry both queries.
-+
-+     [3] If the first response was not a SUCCESS and the second
-+	 response is not NOTFOUND (had a SUCCESS, need to TRYAGAIN,
-+	 or failed entirely e.g. TRYAGAIN' and UNAVAIL) then use the
-+	 result from the second response, otherwise the first responses
-+	 status is used.  Again we have some odd side-effects when the
-+	 second response is NOTFOUND because we overwrite *errnop and
-+	 *h_errnop that means that a first answer of NOTFOUND might see
-+	 its *errnop and *h_errnop values altered.  Whether it matters
-+	 in practice that a first response NOTFOUND has the wrong
-+	 *errnop and *h_errnop is undecided.
-+
-+     [4] If the first response is UNAVAIL we return that instead of
-+	 looking at the second response.  The expectation here is that
-+	 it will have failed similarly e.g. configuration failure.
-+
-+     [5] Testing this code is complicated by the fact that truncated
-+	 second response buffers might be returned as SUCCESS if the
-+	 first answer is a SUCCESS.  To fix this we add symmetry to
-+	 TRYAGAIN with the second response.  If the second response
-+	 is a recoverable error we now return TRYAGIN even if the first
-+	 response was SUCCESS.  */
-+
-   if (anslen1 > 0)
-     status = gaih_getanswer_slice(answer1, anslen1, qname,
- 				  &pat, &buffer, &buflen,
- 				  errnop, h_errnop, ttlp,
- 				  &first);
-+
-   if ((status == NSS_STATUS_SUCCESS || status == NSS_STATUS_NOTFOUND
-        || (status == NSS_STATUS_TRYAGAIN
- 	   /* We want to look at the second answer in case of an
-@@ -1242,8 +1342,15 @@ gaih_getanswer (const querybuf *answer1,
- 						     &pat, &buffer, &buflen,
- 						     errnop, h_errnop, ttlp,
- 						     &first);
-+      /* Use the second response status in some cases.  */
-       if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND)
- 	status = status2;
-+      /* Do not return a truncated second response (unless it was
-+	 unavoidable e.g. unrecoverable TRYAGAIN).  */
-+      if (status == NSS_STATUS_SUCCESS
-+	  && (status2 == NSS_STATUS_TRYAGAIN
-+	      && *errnop == ERANGE && *h_errnop != NO_RECOVERY))
-+	status = NSS_STATUS_TRYAGAIN;
-     }
- 
-   return status;
-Index: git/resolv/res_query.c
-===================================================================
---- git.orig/resolv/res_query.c
-+++ git/resolv/res_query.c
-@@ -396,6 +396,7 @@ __libc_res_nsearch(res_state statp,
- 		  {
- 		    free (*answerp2);
- 		    *answerp2 = NULL;
-+		    *nanswerp2 = 0;
- 		    *answerp2_malloced = 0;
- 		  }
- 	}
-@@ -447,6 +448,7 @@ __libc_res_nsearch(res_state statp,
- 			  {
- 			    free (*answerp2);
- 			    *answerp2 = NULL;
-+			    *nanswerp2 = 0;
- 			    *answerp2_malloced = 0;
- 			  }
- 
-@@ -521,6 +523,7 @@ __libc_res_nsearch(res_state statp,
- 	  {
- 	    free (*answerp2);
- 	    *answerp2 = NULL;
-+	    *nanswerp2 = 0;
- 	    *answerp2_malloced = 0;
- 	  }
- 	if (saved_herrno != -1)
-Index: git/resolv/res_send.c
-===================================================================
---- git.orig/resolv/res_send.c
-+++ git/resolv/res_send.c
-@@ -1,3 +1,20 @@
-+/* Copyright (C) 2016 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
- /*
-  * Copyright (c) 1985, 1989, 1993
-  *    The Regents of the University of California.  All rights reserved.
-@@ -363,6 +380,8 @@ __libc_res_nsend(res_state statp, const
- #ifdef USE_HOOKS
- 	if (__glibc_unlikely (statp->qhook || statp->rhook))       {
- 		if (anssiz < MAXPACKET && ansp) {
-+			/* Always allocate MAXPACKET, callers expect
-+			   this specific size.  */
- 			u_char *buf = malloc (MAXPACKET);
- 			if (buf == NULL)
- 				return (-1);
-@@ -638,6 +657,77 @@ get_nsaddr (res_state statp, int n)
-     return (struct sockaddr *) (void *) &statp->nsaddr_list[n];
- }
- 
-+/* The send_vc function is responsible for sending a DNS query over TCP
-+   to the nameserver numbered NS from the res_state STATP i.e.
-+   EXT(statp).nssocks[ns].  The function supports sending both IPv4 and
-+   IPv6 queries at the same serially on the same socket.
-+
-+   Please note that for TCP there is no way to disable sending both
-+   queries, unlike UDP, which honours RES_SNGLKUP and RES_SNGLKUPREOP
-+   and sends the queries serially and waits for the result after each
-+   sent query.  This implemetnation should be corrected to honour these
-+   options.
-+
-+   Please also note that for TCP we send both queries over the same
-+   socket one after another.  This technically violates best practice
-+   since the server is allowed to read the first query, respond, and
-+   then close the socket (to service another client).  If the server
-+   does this, then the remaining second query in the socket data buffer
-+   will cause the server to send the client an RST which will arrive
-+   asynchronously and the client's OS will likely tear down the socket
-+   receive buffer resulting in a potentially short read and lost
-+   response data.  This will force the client to retry the query again,
-+   and this process may repeat until all servers and connection resets
-+   are exhausted and then the query will fail.  It's not known if this
-+   happens with any frequency in real DNS server implementations.  This
-+   implementation should be corrected to use two sockets by default for
-+   parallel queries.
-+
-+   The query stored in BUF of BUFLEN length is sent first followed by
-+   the query stored in BUF2 of BUFLEN2 length.  Queries are sent
-+   serially on the same socket.
-+
-+   Answers to the query are stored firstly in *ANSP up to a max of
-+   *ANSSIZP bytes.  If more than *ANSSIZP bytes are needed and ANSCP
-+   is non-NULL (to indicate that modifying the answer buffer is allowed)
-+   then malloc is used to allocate a new response buffer and ANSCP and
-+   ANSP will both point to the new buffer.  If more than *ANSSIZP bytes
-+   are needed but ANSCP is NULL, then as much of the response as
-+   possible is read into the buffer, but the results will be truncated.
-+   When truncation happens because of a small answer buffer the DNS
-+   packets header field TC will bet set to 1, indicating a truncated
-+   message and the rest of the socket data will be read and discarded.
-+
-+   Answers to the query are stored secondly in *ANSP2 up to a max of
-+   *ANSSIZP2 bytes, with the actual response length stored in
-+   *RESPLEN2.  If more than *ANSSIZP bytes are needed and ANSP2
-+   is non-NULL (required for a second query) then malloc is used to
-+   allocate a new response buffer, *ANSSIZP2 is set to the new buffer
-+   size and *ANSP2_MALLOCED is set to 1.
-+
-+   The ANSP2_MALLOCED argument will eventually be removed as the
-+   change in buffer pointer can be used to detect the buffer has
-+   changed and that the caller should use free on the new buffer.
-+
-+   Note that the answers may arrive in any order from the server and
-+   therefore the first and second answer buffers may not correspond to
-+   the first and second queries.
-+
-+   It is not supported to call this function with a non-NULL ANSP2
-+   but a NULL ANSCP.  Put another way, you can call send_vc with a
-+   single unmodifiable buffer or two modifiable buffers, but no other
-+   combination is supported.
-+
-+   It is the caller's responsibility to free the malloc allocated
-+   buffers by detecting that the pointers have changed from their
-+   original values i.e. *ANSCP or *ANSP2 has changed.
-+
-+   If errors are encountered then *TERRNO is set to an appropriate
-+   errno value and a zero result is returned for a recoverable error,
-+   and a less-than zero result is returned for a non-recoverable error.
-+
-+   If no errors are encountered then *TERRNO is left unmodified and
-+   a the length of the first response in bytes is returned.  */
- static int
- send_vc(res_state statp,
- 	const u_char *buf, int buflen, const u_char *buf2, int buflen2,
-@@ -647,11 +737,7 @@ send_vc(res_state statp,
- {
- 	const HEADER *hp = (HEADER *) buf;
- 	const HEADER *hp2 = (HEADER *) buf2;
--	u_char *ans = *ansp;
--	int orig_anssizp = *anssizp;
--	// XXX REMOVE
--	// int anssiz = *anssizp;
--	HEADER *anhp = (HEADER *) ans;
-+	HEADER *anhp = (HEADER *) *ansp;
- 	struct sockaddr *nsap = get_nsaddr (statp, ns);
- 	int truncating, connreset, n;
- 	/* On some architectures compiler might emit a warning indicating
-@@ -743,6 +829,8 @@ send_vc(res_state statp,
- 	 * Receive length & response
- 	 */
- 	int recvresp1 = 0;
-+	/* Skip the second response if there is no second query.
-+	   To do that we mark the second response as received.  */
- 	int recvresp2 = buf2 == NULL;
- 	uint16_t rlen16;
-  read_len:
-@@ -779,40 +867,14 @@ send_vc(res_state statp,
- 	u_char **thisansp;
- 	int *thisresplenp;
- 	if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
-+               /* We have not received any responses
-+                  yet or we only have one response to
-+                  receive.  */
- 		thisanssizp = anssizp;
- 		thisansp = anscp ?: ansp;
- 		assert (anscp != NULL || ansp2 == NULL);
- 		thisresplenp = &resplen;
- 	} else {
--		if (*anssizp != MAXPACKET) {
--			/* No buffer allocated for the first
--			   reply.  We can try to use the rest
--			   of the user-provided buffer.  */
--#if __GNUC_PREREQ (4, 7)
--			DIAG_PUSH_NEEDS_COMMENT;
--			DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized");
--#endif
--#if _STRING_ARCH_unaligned
--			*anssizp2 = orig_anssizp - resplen;
--			*ansp2 = *ansp + resplen;
--#else
--			int aligned_resplen
--			  = ((resplen + __alignof__ (HEADER) - 1)
--			     & ~(__alignof__ (HEADER) - 1));
--			*anssizp2 = orig_anssizp - aligned_resplen;
--			*ansp2 = *ansp + aligned_resplen;
--#endif
--#if __GNUC_PREREQ (4, 7)
--			DIAG_POP_NEEDS_COMMENT;
--#endif
--		} else {
--			/* The first reply did not fit into the
--			   user-provided buffer.  Maybe the second
--			   answer will.  */
--			*anssizp2 = orig_anssizp;
--			*ansp2 = *ansp;
--		}
--
- 		thisanssizp = anssizp2;
- 		thisansp = ansp2;
- 		thisresplenp = resplen2;
-@@ -820,10 +882,14 @@ send_vc(res_state statp,
- 	anhp = (HEADER *) *thisansp;
- 
- 	*thisresplenp = rlen;
--	if (rlen > *thisanssizp) {
--		/* Yes, we test ANSCP here.  If we have two buffers
--		   both will be allocatable.  */
--		if (__glibc_likely (anscp != NULL))       {
-+	/* Is the answer buffer too small?  */
-+	if (*thisanssizp < rlen) {
-+		/* If the current buffer is not the the static
-+		   user-supplied buffer then we can reallocate
-+		   it.  */
-+		if (thisansp != NULL && thisansp != ansp) {
-+			/* Always allocate MAXPACKET, callers expect
-+			   this specific size.  */
- 			u_char *newp = malloc (MAXPACKET);
- 			if (newp == NULL) {
- 				*terrno = ENOMEM;
-@@ -835,6 +901,9 @@ send_vc(res_state statp,
- 			if (thisansp == ansp2)
- 			  *ansp2_malloced = 1;
- 			anhp = (HEADER *) newp;
-+			/* A uint16_t can't be larger than MAXPACKET
-+			   thus it's safe to allocate MAXPACKET but
-+			   read RLEN bytes instead.  */
- 			len = rlen;
- 		} else {
- 			Dprint(statp->options & RES_DEBUG,
-@@ -997,6 +1066,66 @@ reopen (res_state statp, int *terrno, in
- 	return 1;
- }
- 
-+/* The send_dg function is responsible for sending a DNS query over UDP
-+   to the nameserver numbered NS from the res_state STATP i.e.
-+   EXT(statp).nssocks[ns].  The function supports IPv4 and IPv6 queries
-+   along with the ability to send the query in parallel for both stacks
-+   (default) or serially (RES_SINGLKUP).  It also supports serial lookup
-+   with a close and reopen of the socket used to talk to the server
-+   (RES_SNGLKUPREOP) to work around broken name servers.
-+
-+   The query stored in BUF of BUFLEN length is sent first followed by
-+   the query stored in BUF2 of BUFLEN2 length.  Queries are sent
-+   in parallel (default) or serially (RES_SINGLKUP or RES_SNGLKUPREOP).
-+
-+   Answers to the query are stored firstly in *ANSP up to a max of
-+   *ANSSIZP bytes.  If more than *ANSSIZP bytes are needed and ANSCP
-+   is non-NULL (to indicate that modifying the answer buffer is allowed)
-+   then malloc is used to allocate a new response buffer and ANSCP and
-+   ANSP will both point to the new buffer.  If more than *ANSSIZP bytes
-+   are needed but ANSCP is NULL, then as much of the response as
-+   possible is read into the buffer, but the results will be truncated.
-+   When truncation happens because of a small answer buffer the DNS
-+   packets header field TC will bet set to 1, indicating a truncated
-+   message, while the rest of the UDP packet is discarded.
-+
-+   Answers to the query are stored secondly in *ANSP2 up to a max of
-+   *ANSSIZP2 bytes, with the actual response length stored in
-+   *RESPLEN2.  If more than *ANSSIZP bytes are needed and ANSP2
-+   is non-NULL (required for a second query) then malloc is used to
-+   allocate a new response buffer, *ANSSIZP2 is set to the new buffer
-+   size and *ANSP2_MALLOCED is set to 1.
-+
-+   The ANSP2_MALLOCED argument will eventually be removed as the
-+   change in buffer pointer can be used to detect the buffer has
-+   changed and that the caller should use free on the new buffer.
-+
-+   Note that the answers may arrive in any order from the server and
-+   therefore the first and second answer buffers may not correspond to
-+   the first and second queries.
-+
-+   It is not supported to call this function with a non-NULL ANSP2
-+   but a NULL ANSCP.  Put another way, you can call send_vc with a
-+   single unmodifiable buffer or two modifiable buffers, but no other
-+   combination is supported.
-+
-+   It is the caller's responsibility to free the malloc allocated
-+   buffers by detecting that the pointers have changed from their
-+   original values i.e. *ANSCP or *ANSP2 has changed.
-+
-+   If an answer is truncated because of UDP datagram DNS limits then
-+   *V_CIRCUIT is set to 1 and the return value non-zero to indicate to
-+   the caller to retry with TCP.  The value *GOTSOMEWHERE is set to 1
-+   if any progress was made reading a response from the nameserver and
-+   is used by the caller to distinguish between ECONNREFUSED and
-+   ETIMEDOUT (the latter if *GOTSOMEWHERE is 1).
-+
-+   If errors are encountered then *TERRNO is set to an appropriate
-+   errno value and a zero result is returned for a recoverable error,
-+   and a less-than zero result is returned for a non-recoverable error.
-+
-+   If no errors are encountered then *TERRNO is left unmodified and
-+   a the length of the first response in bytes is returned.  */
- static int
- send_dg(res_state statp,
- 	const u_char *buf, int buflen, const u_char *buf2, int buflen2,
-@@ -1006,8 +1135,6 @@ send_dg(res_state statp,
- {
- 	const HEADER *hp = (HEADER *) buf;
- 	const HEADER *hp2 = (HEADER *) buf2;
--	u_char *ans = *ansp;
--	int orig_anssizp = *anssizp;
- 	struct timespec now, timeout, finish;
- 	struct pollfd pfd[1];
- 	int ptimeout;
-@@ -1040,6 +1167,8 @@ send_dg(res_state statp,
- 	int need_recompute = 0;
- 	int nwritten = 0;
- 	int recvresp1 = 0;
-+	/* Skip the second response if there is no second query.
-+	   To do that we mark the second response as received.  */
- 	int recvresp2 = buf2 == NULL;
- 	pfd[0].fd = EXT(statp).nssocks[ns];
- 	pfd[0].events = POLLOUT;
-@@ -1203,55 +1332,56 @@ send_dg(res_state statp,
- 		int *thisresplenp;
- 
- 		if ((recvresp1 | recvresp2) == 0 || buf2 == NULL) {
-+			/* We have not received any responses
-+			   yet or we only have one response to
-+			   receive.  */
- 			thisanssizp = anssizp;
- 			thisansp = anscp ?: ansp;
- 			assert (anscp != NULL || ansp2 == NULL);
- 			thisresplenp = &resplen;
- 		} else {
--			if (*anssizp != MAXPACKET) {
--				/* No buffer allocated for the first
--				   reply.  We can try to use the rest
--				   of the user-provided buffer.  */
--#if _STRING_ARCH_unaligned
--				*anssizp2 = orig_anssizp - resplen;
--				*ansp2 = *ansp + resplen;
--#else
--				int aligned_resplen
--				  = ((resplen + __alignof__ (HEADER) - 1)
--				     & ~(__alignof__ (HEADER) - 1));
--				*anssizp2 = orig_anssizp - aligned_resplen;
--				*ansp2 = *ansp + aligned_resplen;
--#endif
--			} else {
--				/* The first reply did not fit into the
--				   user-provided buffer.  Maybe the second
--				   answer will.  */
--				*anssizp2 = orig_anssizp;
--				*ansp2 = *ansp;
--			}
--
- 			thisanssizp = anssizp2;
- 			thisansp = ansp2;
- 			thisresplenp = resplen2;
- 		}
- 
- 		if (*thisanssizp < MAXPACKET
--		    /* Yes, we test ANSCP here.  If we have two buffers
--		       both will be allocatable.  */
--		    && anscp
-+		    /* If the current buffer is not the the static
-+		       user-supplied buffer then we can reallocate
-+		       it.  */
-+		    && (thisansp != NULL && thisansp != ansp)
- #ifdef FIONREAD
-+		    /* Is the size too small?  */
- 		    && (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0
- 			|| *thisanssizp < *thisresplenp)
- #endif
-                     ) {
-+			/* Always allocate MAXPACKET, callers expect
-+			   this specific size.  */
- 			u_char *newp = malloc (MAXPACKET);
- 			if (newp != NULL) {
--				*anssizp = MAXPACKET;
--				*thisansp = ans = newp;
-+				*thisanssizp = MAXPACKET;
-+				*thisansp = newp;
- 				if (thisansp == ansp2)
- 				  *ansp2_malloced = 1;
- 			}
- 		}
-+		/* We could end up with truncation if anscp was NULL
-+		   (not allowed to change caller's buffer) and the
-+		   response buffer size is too small.  This isn't a
-+		   reliable way to detect truncation because the ioctl
-+		   may be an inaccurate report of the UDP message size.
-+		   Therefore we use this only to issue debug output.
-+		   To do truncation accurately with UDP we need
-+		   MSG_TRUNC which is only available on Linux.  We
-+		   can abstract out the Linux-specific feature in the
-+		   future to detect truncation.  */
-+		if (__glibc_unlikely (*thisanssizp < *thisresplenp)) {
-+			Dprint(statp->options & RES_DEBUG,
-+			       (stdout, ";; response may be truncated (UDP)\n")
-+			);
-+		}
-+
- 		HEADER *anhp = (HEADER *) *thisansp;
- 		socklen_t fromlen = sizeof(struct sockaddr_in6);
- 		assert (sizeof(from) <= fromlen);
-Index: git/ChangeLog
-===================================================================
---- git.orig/ChangeLog
-+++ git/ChangeLog
-@@ -1,3 +1,18 @@
-+2016-02-15  Carlos O'Donell  <carlos@redhat.com>
-+
-+   [BZ #18665]
-+   * resolv/nss_dns/dns-host.c (gaih_getanswer_slice): Always set
-+   *herrno_p.
-+   (gaih_getanswer): Document functional behviour. Return tryagain
-+   if any result is tryagain.
-+   * resolv/res_query.c (__libc_res_nsearch): Set buffer size to zero
-+   when freed.
-+   * resolv/res_send.c: Add copyright text.
-+   (__libc_res_nsend): Document that MAXPACKET is expected.
-+   (send_vc): Document. Remove buffer reuse.
-+   (send_dg): Document. Remove buffer reuse. Set *thisanssizp to set the
-+   size of the buffer. Add Dprint for truncated UDP buffer.
-+
- 2015-09-26  Paul Pluzhnikov  <ppluzhnikov@google.com>
- 
- 	[BZ #18985]
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-8776.patch b/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-8776.patch
deleted file mode 100644
index 684f344..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-8776.patch
+++ /dev/null
@@ -1,155 +0,0 @@
-From d36c75fc0d44deec29635dd239b0fbd206ca49b7 Mon Sep 17 00:00:00 2001
-From: Paul Pluzhnikov <ppluzhnikov@google.com>
-Date: Sat, 26 Sep 2015 13:27:48 -0700
-Subject: [PATCH] Fix BZ #18985 -- out of range data to strftime() causes a
- segfault
-
-Upstream-Status: Backport
-CVE: CVE-2015-8776
-[Yocto # 8980]
-
-https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d36c75fc0d44deec29635dd239b0fbd206ca49b7
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog           |  8 ++++++++
- NEWS                |  2 +-
- time/strftime_l.c   | 20 +++++++++++++-------
- time/tst-strftime.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
- 4 files changed, 73 insertions(+), 9 deletions(-)
-
-Index: git/ChangeLog
-===================================================================
---- git.orig/ChangeLog
-+++ git/ChangeLog
-@@ -1,3 +1,11 @@
-+2015-09-26  Paul Pluzhnikov  <ppluzhnikov@google.com>
-+
-+	[BZ #18985]
-+	* time/strftime_l.c (a_wkday, f_wkday, a_month, f_month): Range check.
-+	(__strftime_internal): Likewise.
-+	* time/tst-strftime.c (do_bz18985): New test.
-+	(do_test): Call it.
-+
- 2015-12-04  Joseph Myers  <joseph@codesourcery.com>
- 
- 	[BZ #16961]
-Index: git/time/strftime_l.c
-===================================================================
---- git.orig/time/strftime_l.c
-+++ git/time/strftime_l.c
-@@ -514,13 +514,17 @@ __strftime_internal (s, maxsize, format,
-      only a few elements.  Dereference the pointers only if the format
-      requires this.  Then it is ok to fail if the pointers are invalid.  */
- # define a_wkday \
--  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday))
-+  ((const CHAR_T *) (tp->tm_wday < 0 || tp->tm_wday > 6			     \
-+		     ? "?" : _NL_CURRENT (LC_TIME, NLW(ABDAY_1) + tp->tm_wday)))
- # define f_wkday \
--  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday))
-+  ((const CHAR_T *) (tp->tm_wday < 0 || tp->tm_wday > 6			     \
-+		     ? "?" : _NL_CURRENT (LC_TIME, NLW(DAY_1) + tp->tm_wday)))
- # define a_month \
--  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon))
-+  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
-+		     ? "?" : _NL_CURRENT (LC_TIME, NLW(ABMON_1) + tp->tm_mon)))
- # define f_month \
--  ((const CHAR_T *) _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon))
-+  ((const CHAR_T *) (tp->tm_mon < 0 || tp->tm_mon > 11			     \
-+		     ? "?" : _NL_CURRENT (LC_TIME, NLW(MON_1) + tp->tm_mon)))
- # define ampm \
-   ((const CHAR_T *) _NL_CURRENT (LC_TIME, tp->tm_hour > 11		      \
- 				 ? NLW(PM_STR) : NLW(AM_STR)))
-@@ -530,8 +534,10 @@ __strftime_internal (s, maxsize, format,
- # define ap_len STRLEN (ampm)
- #else
- # if !HAVE_STRFTIME
--#  define f_wkday (weekday_name[tp->tm_wday])
--#  define f_month (month_name[tp->tm_mon])
-+#  define f_wkday (tp->tm_wday < 0 || tp->tm_wday > 6	\
-+		   ? "?" : weekday_name[tp->tm_wday])
-+#  define f_month (tp->tm_mon < 0 || tp->tm_mon > 11	\
-+		   ? "?" : month_name[tp->tm_mon])
- #  define a_wkday f_wkday
- #  define a_month f_month
- #  define ampm (L_("AMPM") + 2 * (tp->tm_hour > 11))
-@@ -1325,7 +1331,7 @@ __strftime_internal (s, maxsize, format,
- 		  *tzset_called = true;
- 		}
- # endif
--	      zone = tzname[tp->tm_isdst];
-+	      zone = tp->tm_isdst <= 1 ? tzname[tp->tm_isdst] : "?";
- 	    }
- #endif
- 	  if (! zone)
-Index: git/time/tst-strftime.c
-===================================================================
---- git.orig/time/tst-strftime.c
-+++ git/time/tst-strftime.c
-@@ -4,6 +4,56 @@
- #include <time.h>
- 
- 
-+static int
-+do_bz18985 (void)
-+{
-+  char buf[1000];
-+  struct tm ttm;
-+  int rc, ret = 0;
-+
-+  memset (&ttm, 1, sizeof (ttm));
-+  ttm.tm_zone = NULL;  /* Dereferenced directly if non-NULL.  */
-+  rc = strftime (buf, sizeof (buf), "%a %A %b %B %c %z %Z", &ttm);
-+
-+  if (rc == 66)
-+    {
-+      const char expected[]
-+	= "? ? ? ? ? ? 16843009 16843009:16843009:16843009 16844909 +467836 ?";
-+      if (0 != strcmp (buf, expected))
-+	{
-+	  printf ("expected:\n  %s\ngot:\n  %s\n", expected, buf);
-+	  ret += 1;
-+	}
-+    }
-+  else
-+    {
-+      printf ("expected 66, got %d\n", rc);
-+      ret += 1;
-+    }
-+
-+  /* Check negative values as well.  */
-+  memset (&ttm, 0xFF, sizeof (ttm));
-+  ttm.tm_zone = NULL;  /* Dereferenced directly if non-NULL.  */
-+  rc = strftime (buf, sizeof (buf), "%a %A %b %B %c %z %Z", &ttm);
-+
-+  if (rc == 30)
-+    {
-+      const char expected[] = "? ? ? ? ? ? -1 -1:-1:-1 1899  ";
-+      if (0 != strcmp (buf, expected))
-+	{
-+	  printf ("expected:\n  %s\ngot:\n  %s\n", expected, buf);
-+	  ret += 1;
-+	}
-+    }
-+  else
-+    {
-+      printf ("expected 30, got %d\n", rc);
-+      ret += 1;
-+    }
-+
-+  return ret;
-+}
-+
- static struct
- {
-   const char *fmt;
-@@ -104,7 +154,7 @@ do_test (void)
- 	}
-     }
- 
--  return result;
-+  return result + do_bz18985 ();
- }
- 
- #define TEST_FUNCTION do_test ()
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-8777.patch b/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-8777.patch
deleted file mode 100644
index eeab72d..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-8777.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From a014cecd82b71b70a6a843e250e06b541ad524f7 Mon Sep 17 00:00:00 2001
-From: Florian Weimer <fweimer@redhat.com>
-Date: Thu, 15 Oct 2015 09:23:07 +0200
-Subject: [PATCH] Always enable pointer guard [BZ #18928]
-
-Honoring the LD_POINTER_GUARD environment variable in AT_SECURE mode
-has security implications.  This commit enables pointer guard
-unconditionally, and the environment variable is now ignored.
-
-        [BZ #18928]
-        * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove
-        _dl_pointer_guard member.
-        * elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard
-        initializer.
-        (security_init): Always set up pointer guard.
-        (process_envvars): Do not process LD_POINTER_GUARD.
-
-Upstream-Status: Backport
-CVE: CVE-2015-8777
-[Yocto # 8980]
-
-https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=a014cecd82b71b70a6a843e250e06b541ad524f7
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog                  | 10 ++++++++++
- NEWS                       | 13 ++++++++-----
- elf/rtld.c                 | 15 ++++-----------
- sysdeps/generic/ldsodefs.h |  3 ---
- 4 files changed, 22 insertions(+), 19 deletions(-)
-
-Index: git/ChangeLog
-===================================================================
---- git.orig/ChangeLog
-+++ git/ChangeLog
-@@ -1,3 +1,14 @@
-+2015-10-15  Florian Weimer  <fweimer@redhat.com>
-+
-+   [BZ #18928]
-+   * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Remove
-+   _dl_pointer_guard member.
-+   * elf/rtld.c (_rtld_global_ro): Remove _dl_pointer_guard
-+   initializer.
-+   (security_init): Always set up pointer guard.
-+   (process_envvars): Do not process LD_POINTER_GUARD.
-+
-+
- 2015-08-10  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
- 
- 	[BZ #18778]
-Index: git/NEWS
-===================================================================
---- git.orig/NEWS
-+++ git/NEWS
-@@ -34,7 +34,10 @@ Version 2.22
-   18533, 18534, 18536, 18539, 18540, 18542, 18544, 18545, 18546, 18547,
-   18549, 18553, 18557, 18558, 18569, 18583, 18585, 18586, 18592, 18593,
-   18594, 18602, 18612, 18613, 18619, 18633, 18635, 18641, 18643, 18648,
--  18657, 18676, 18694, 18696.
-+  18657, 18676, 18694, 18696, 18928.
-+
-+* The LD_POINTER_GUARD environment variable can no longer be used to
-+  disable the pointer guard feature.  It is always enabled.
- 
- * Cache information can be queried via sysconf() function on s390 e.g. with
-   _SC_LEVEL1_ICACHE_SIZE as argument.
-Index: git/elf/rtld.c
-===================================================================
---- git.orig/elf/rtld.c
-+++ git/elf/rtld.c
-@@ -163,7 +163,6 @@ struct rtld_global_ro _rtld_global_ro at
-     ._dl_hwcap_mask = HWCAP_IMPORTANT,
-     ._dl_lazy = 1,
-     ._dl_fpu_control = _FPU_DEFAULT,
--    ._dl_pointer_guard = 1,
-     ._dl_pagesize = EXEC_PAGESIZE,
-     ._dl_inhibit_cache = 0,
- 
-@@ -710,15 +709,12 @@ security_init (void)
- #endif
- 
-   /* Set up the pointer guard as well, if necessary.  */
--  if (GLRO(dl_pointer_guard))
--    {
--      uintptr_t pointer_chk_guard = _dl_setup_pointer_guard (_dl_random,
--							     stack_chk_guard);
-+  uintptr_t pointer_chk_guard
-+    = _dl_setup_pointer_guard (_dl_random, stack_chk_guard);
- #ifdef THREAD_SET_POINTER_GUARD
--      THREAD_SET_POINTER_GUARD (pointer_chk_guard);
-+  THREAD_SET_POINTER_GUARD (pointer_chk_guard);
- #endif
--      __pointer_chk_guard_local = pointer_chk_guard;
--    }
-+  __pointer_chk_guard_local = pointer_chk_guard;
- 
-   /* We do not need the _dl_random value anymore.  The less
-      information we leave behind, the better, so clear the
-@@ -2478,9 +2474,6 @@ process_envvars (enum mode *modep)
- 	      GLRO(dl_use_load_bias) = envline[14] == '1' ? -1 : 0;
- 	      break;
- 	    }
--
--	  if (memcmp (envline, "POINTER_GUARD", 13) == 0)
--	    GLRO(dl_pointer_guard) = envline[14] != '0';
- 	  break;
- 
- 	case 14:
-Index: git/sysdeps/generic/ldsodefs.h
-===================================================================
---- git.orig/sysdeps/generic/ldsodefs.h
-+++ git/sysdeps/generic/ldsodefs.h
-@@ -600,9 +600,6 @@ struct rtld_global_ro
-   /* List of auditing interfaces.  */
-   struct audit_ifaces *_dl_audit;
-   unsigned int _dl_naudit;
--
--  /* 0 if internal pointer values should not be guarded, 1 if they should.  */
--  EXTERN int _dl_pointer_guard;
- };
- # define __rtld_global_attribute__
- # if IS_IN (rtld)
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-8779.patch b/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-8779.patch
deleted file mode 100644
index 4dc93c7..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-8779.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-From 0f58539030e436449f79189b6edab17d7479796e Mon Sep 17 00:00:00 2001
-From: Paul Pluzhnikov <ppluzhnikov@google.com>
-Date: Sat, 8 Aug 2015 15:53:03 -0700
-Subject: [PATCH] Fix BZ #17905
-
-Upstream-Status: Backport
-CVE: CVE-2015-8779
-[Yocto # 8980]
-
-https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0f58539030e436449f79189b6edab17d7479796e
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog              |  8 ++++++++
- NEWS                   |  2 +-
- catgets/Makefile       |  9 ++++++++-
- catgets/catgets.c      | 19 ++++++++++++-------
- catgets/open_catalog.c | 23 ++++++++++++++---------
- catgets/tst-catgets.c  | 31 +++++++++++++++++++++++++++++++
- 6 files changed, 74 insertions(+), 18 deletions(-)
-
-Index: git/catgets/Makefile
-===================================================================
---- git.orig/catgets/Makefile
-+++ git/catgets/Makefile
-@@ -37,6 +37,7 @@ ifeq (y,$(OPTION_EGLIBC_CATGETS))
- ifeq ($(run-built-tests),yes)
- tests-special += $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
- 		 $(objpfx)sample.SJIS.cat $(objpfx)test-gencat.out
-+tests-special += $(objpfx)tst-catgets-mem.out
- endif
- endif
- gencat-modules	= xmalloc
-@@ -53,9 +54,11 @@ catgets-CPPFLAGS := -DNLSPATH='"$(msgcat
- 
- generated += de.msg test1.cat test1.h test2.cat test2.h sample.SJIS.cat \
- 	     test-gencat.h
-+generated += tst-catgets.mtrace tst-catgets-mem.out
-+
- generated-dirs += de
- 
--tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de
-+tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de MALLOC_TRACE=$(objpfx)tst-catgets.mtrace
- 
- ifeq ($(run-built-tests),yes)
- # This test just checks whether the program produces any error or not.
-@@ -89,4 +92,8 @@ $(objpfx)test-gencat.out: test-gencat.sh
- $(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
- 	$(built-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@; \
- 	$(evaluate-test)
-+
-+$(objpfx)tst-catgets-mem.out: $(objpfx)tst-catgets.out
-+	$(common-objpfx)malloc/mtrace $(objpfx)tst-catgets.mtrace > $@; \
-+	$(evaluate-test)
- endif
-Index: git/catgets/catgets.c
-===================================================================
---- git.orig/catgets/catgets.c
-+++ git/catgets/catgets.c
-@@ -16,7 +16,6 @@
-    License along with the GNU C Library; if not, see
-    <http://www.gnu.org/licenses/>.  */
- 
--#include <alloca.h>
- #include <errno.h>
- #include <locale.h>
- #include <nl_types.h>
-@@ -35,6 +34,7 @@ catopen (const char *cat_name, int flag)
-   __nl_catd result;
-   const char *env_var = NULL;
-   const char *nlspath = NULL;
-+  char *tmp = NULL;
- 
-   if (strchr (cat_name, '/') == NULL)
-     {
-@@ -54,7 +54,10 @@ catopen (const char *cat_name, int flag)
- 	{
- 	  /* Append the system dependent directory.  */
- 	  size_t len = strlen (nlspath) + 1 + sizeof NLSPATH;
--	  char *tmp = alloca (len);
-+	  tmp = malloc (len);
-+
-+	  if (__glibc_unlikely (tmp == NULL))
-+	    return (nl_catd) -1;
- 
- 	  __stpcpy (__stpcpy (__stpcpy (tmp, nlspath), ":"), NLSPATH);
- 	  nlspath = tmp;
-@@ -65,16 +68,18 @@ catopen (const char *cat_name, int flag)
- 
-   result = (__nl_catd) malloc (sizeof (*result));
-   if (result == NULL)
--    /* We cannot get enough memory.  */
--    return (nl_catd) -1;
--
--  if (__open_catalog (cat_name, nlspath, env_var, result) != 0)
-+    {
-+      /* We cannot get enough memory.  */
-+      result = (nl_catd) -1;
-+    }
-+  else if (__open_catalog (cat_name, nlspath, env_var, result) != 0)
-     {
-       /* Couldn't open the file.  */
-       free ((void *) result);
--      return (nl_catd) -1;
-+      result = (nl_catd) -1;
-     }
- 
-+  free (tmp);
-   return (nl_catd) result;
- }
- 
-Index: git/catgets/open_catalog.c
-===================================================================
---- git.orig/catgets/open_catalog.c
-+++ git/catgets/open_catalog.c
-@@ -47,6 +47,7 @@ __open_catalog (const char *cat_name, co
-   size_t tab_size;
-   const char *lastp;
-   int result = -1;
-+  char *buf = NULL;
- 
-   if (strchr (cat_name, '/') != NULL || nlspath == NULL)
-     fd = open_not_cancel_2 (cat_name, O_RDONLY);
-@@ -57,23 +58,23 @@ __open_catalog (const char *cat_name, co
-   if (__glibc_unlikely (bufact + (n) >= bufmax))			      \
-     {									      \
-       char *old_buf = buf;						      \
--      bufmax += 256 + (n);						      \
--      buf = (char *) alloca (bufmax);					      \
--      memcpy (buf, old_buf, bufact);					      \
-+      bufmax += (bufmax < 256 + (n)) ? 256 + (n) : bufmax;		      \
-+      buf = realloc (buf, bufmax);					      \
-+      if (__glibc_unlikely (buf == NULL))				      \
-+	{								      \
-+	  free (old_buf);						      \
-+	  return -1;							      \
-+	}								      \
-     }
- 
-       /* The RUN_NLSPATH variable contains a colon separated list of
- 	 descriptions where we expect to find catalogs.  We have to
- 	 recognize certain % substitutions and stop when we found the
- 	 first existing file.  */
--      char *buf;
-       size_t bufact;
--      size_t bufmax;
-+      size_t bufmax = 0;
-       size_t len;
- 
--      buf = NULL;
--      bufmax = 0;
--
-       fd = -1;
-       while (*run_nlspath != '\0')
- 	{
-@@ -188,7 +189,10 @@ __open_catalog (const char *cat_name, co
- 
-   /* Avoid dealing with directories and block devices */
-   if (__builtin_expect (fd, 0) < 0)
--    return -1;
-+    {
-+      free (buf);
-+      return -1;
-+    }
- 
-   if (__builtin_expect (__fxstat64 (_STAT_VER, fd, &st), 0) < 0)
-     goto close_unlock_return;
-@@ -325,6 +329,7 @@ __open_catalog (const char *cat_name, co
-   /* Release the lock again.  */
-  close_unlock_return:
-   close_not_cancel_no_status (fd);
-+  free (buf);
- 
-   return result;
- }
-Index: git/catgets/tst-catgets.c
-===================================================================
---- git.orig/catgets/tst-catgets.c
-+++ git/catgets/tst-catgets.c
-@@ -1,7 +1,10 @@
-+#include <assert.h>
- #include <mcheck.h>
- #include <nl_types.h>
- #include <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
-+#include <sys/resource.h>
- 
- 
- static const char *msgs[] =
-@@ -12,6 +15,33 @@ static const char *msgs[] =
- };
- #define nmsgs (sizeof (msgs) / sizeof (msgs[0]))
- 
-+
-+/* Test for unbounded alloca.  */
-+static int
-+do_bz17905 (void)
-+{
-+  char *buf;
-+  struct rlimit rl;
-+  nl_catd result;
-+
-+  const int sz = 1024 * 1024;
-+
-+  getrlimit (RLIMIT_STACK, &rl);
-+  rl.rlim_cur = sz;
-+  setrlimit (RLIMIT_STACK, &rl);
-+
-+  buf = malloc (sz + 1); 
-+  memset (buf, 'A', sz);
-+  buf[sz] = '\0';
-+  setenv ("NLSPATH", buf, 1);
-+
-+  result = catopen (buf, NL_CAT_LOCALE);
-+  assert (result == (nl_catd) -1);
-+
-+  free (buf);
-+  return 0;
-+}
-+
- #define ROUNDS 5
- 
- static int
-@@ -62,6 +92,7 @@ do_test (void)
- 	}
-     }
- 
-+  result += do_bz17905 ();
-   return result;
- }
- 
-Index: git/ChangeLog
-===================================================================
---- git.orig/ChangeLog
-+++ git/ChangeLog
-@@ -1,3 +1,11 @@
-+2015-08-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
-+
-+   [BZ #17905]
-+   * catgets/Makefile (tst-catgets-mem): New test.
-+   * catgets/catgets.c (catopen): Don't use unbounded alloca.
-+   * catgets/open_catalog.c (__open_catalog): Likewise.
-+   * catgets/tst-catgets.c (do_bz17905): Test unbounded alloca.
-+
- 2015-10-15  Florian Weimer  <fweimer@redhat.com>
- 
-    [BZ #18928]
-Index: git/NEWS
-===================================================================
---- git.orig/NEWS
-+++ git/NEWS
-@@ -9,7 +9,7 @@ Version 2.22.1
- 
- * The following bugs are resolved with this release:
- 
--  18778, 18781, 18787.
-+  18778, 18781, 18787, 17905.
- 
- Version 2.22
- 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-9761_1.patch b/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-9761_1.patch
deleted file mode 100644
index 3aca913..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-9761_1.patch
+++ /dev/null
@@ -1,1039 +0,0 @@
-From e02cabecf0d025ec4f4ddee290bdf7aadb873bb3 Mon Sep 17 00:00:00 2001
-From: Joseph Myers <joseph@codesourcery.com>
-Date: Tue, 24 Nov 2015 22:24:52 +0000
-Subject: [PATCH] Refactor strtod parsing of NaN payloads.
-
-The nan* functions handle their string argument by constructing a
-NAN(...) string on the stack as a VLA and passing it to strtod
-functions.
-
-This approach has problems discussed in bug 16961 and bug 16962: the
-stack usage is unbounded, and it gives incorrect results in certain
-cases where the argument is not a valid n-char-sequence.
-
-The natural fix for both issues is to refactor the NaN payload parsing
-out of strtod into a separate function that the nan* functions can
-call directly, so that no temporary string needs constructing on the
-stack at all.  This patch does that refactoring in preparation for
-fixing those bugs (but without actually using the new functions from
-nan* - which will also require exporting them from libc at version
-GLIBC_PRIVATE).  This patch is not intended to change any user-visible
-behavior, so no tests are added (fixes for the above bugs will of
-course add tests for them).
-
-This patch builds on my recent fixes for strtol and strtod issues in
-Turkish locales.  Given those fixes, the parsing of NaN payloads is
-locale-independent; thus, the new functions do not need to take a
-locale_t argument.
-
-Tested for x86_64, x86, mips64 and powerpc.
-
-	* stdlib/strtod_nan.c: New file.
-	* stdlib/strtod_nan_double.h: Likewise.
-	* stdlib/strtod_nan_float.h: Likewise.
-	* stdlib/strtod_nan_main.c: Likewise.
-	* stdlib/strtod_nan_narrow.h: Likewise.
-	* stdlib/strtod_nan_wide.h: Likewise.
-	* stdlib/strtof_nan.c: Likewise.
-	* stdlib/strtold_nan.c: Likewise.
-	* sysdeps/ieee754/ldbl-128/strtod_nan_ldouble.h: Likewise.
-	* sysdeps/ieee754/ldbl-128ibm/strtod_nan_ldouble.h: Likewise.
-	* sysdeps/ieee754/ldbl-96/strtod_nan_ldouble.h: Likewise.
-	* wcsmbs/wcstod_nan.c: Likewise.
-	* wcsmbs/wcstof_nan.c: Likewise.
-	* wcsmbs/wcstold_nan.c: Likewise.
-	* stdlib/Makefile (routines): Add strtof_nan, strtod_nan and
-	strtold_nan.
-	* wcsmbs/Makefile (routines): Add wcstod_nan, wcstold_nan and
-	wcstof_nan.
-	* include/stdlib.h (__strtof_nan): Declare and use
-	libc_hidden_proto.
-	(__strtod_nan): Likewise.
-	(__strtold_nan): Likewise.
-	(__wcstof_nan): Likewise.
-	(__wcstod_nan): Likewise.
-	(__wcstold_nan): Likewise.
-	* include/wchar.h (____wcstoull_l_internal): Declare.
-	* stdlib/strtod_l.c: Do not include <ieee754.h>.
-	(____strtoull_l_internal): Remove declaration.
-	(STRTOF_NAN): Define macro.
-	(SET_MANTISSA): Remove macro.
-	(STRTOULL): Likewise.
-	(____STRTOF_INTERNAL): Use STRTOF_NAN to parse NaN payload.
-	* stdlib/strtof_l.c (____strtoull_l_internal): Remove declaration.
-	(STRTOF_NAN): Define macro.
-	(SET_MANTISSA): Remove macro.
-	* sysdeps/ieee754/ldbl-128/strtold_l.c (STRTOF_NAN): Define macro.
-	(SET_MANTISSA): Remove macro.
-	* sysdeps/ieee754/ldbl-128ibm/strtold_l.c (STRTOF_NAN): Define
-	macro.
-	(SET_MANTISSA): Remove macro.
-	* sysdeps/ieee754/ldbl-64-128/strtold_l.c (STRTOF_NAN): Define
-	macro.
-	(SET_MANTISSA): Remove macro.
-	* sysdeps/ieee754/ldbl-96/strtold_l.c (STRTOF_NAN): Define macro.
-	(SET_MANTISSA): Remove macro.
-	* wcsmbs/wcstod_l.c (____wcstoull_l_internal): Remove declaration.
-	* wcsmbs/wcstof_l.c (____wcstoull_l_internal): Likewise.
-	* wcsmbs/wcstold_l.c (____wcstoull_l_internal): Likewise.
-
-Upstream-Status: Backport
-CVE: CVE-2015-9761 patch #1
-[Yocto # 8980]
-
-https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e02cabecf0d025ec4f4ddee290bdf7aadb873bb3
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog                                        | 49 ++++++++++++++++++
- include/stdlib.h                                 | 18 +++++++
- include/wchar.h                                  |  3 ++
- stdlib/Makefile                                  |  1 +
- stdlib/strtod_l.c                                | 48 ++++--------------
- stdlib/strtod_nan.c                              | 24 +++++++++
- stdlib/strtod_nan_double.h                       | 30 +++++++++++
- stdlib/strtod_nan_float.h                        | 29 +++++++++++
- stdlib/strtod_nan_main.c                         | 63 ++++++++++++++++++++++++
- stdlib/strtod_nan_narrow.h                       | 22 +++++++++
- stdlib/strtod_nan_wide.h                         | 22 +++++++++
- stdlib/strtof_l.c                                | 11 +----
- stdlib/strtof_nan.c                              | 24 +++++++++
- stdlib/strtold_nan.c                             | 30 +++++++++++
- sysdeps/ieee754/ldbl-128/strtod_nan_ldouble.h    | 33 +++++++++++++
- sysdeps/ieee754/ldbl-128/strtold_l.c             | 13 +----
- sysdeps/ieee754/ldbl-128ibm/strtod_nan_ldouble.h | 30 +++++++++++
- sysdeps/ieee754/ldbl-128ibm/strtold_l.c          | 10 +---
- sysdeps/ieee754/ldbl-64-128/strtold_l.c          | 13 +----
- sysdeps/ieee754/ldbl-96/strtod_nan_ldouble.h     | 30 +++++++++++
- sysdeps/ieee754/ldbl-96/strtold_l.c              | 10 +---
- wcsmbs/Makefile                                  |  1 +
- wcsmbs/wcstod_l.c                                |  3 --
- wcsmbs/wcstod_nan.c                              | 23 +++++++++
- wcsmbs/wcstof_l.c                                |  3 --
- wcsmbs/wcstof_nan.c                              | 23 +++++++++
- wcsmbs/wcstold_l.c                               |  3 --
- wcsmbs/wcstold_nan.c                             | 30 +++++++++++
- 28 files changed, 504 insertions(+), 95 deletions(-)
- create mode 100644 stdlib/strtod_nan.c
- create mode 100644 stdlib/strtod_nan_double.h
- create mode 100644 stdlib/strtod_nan_float.h
- create mode 100644 stdlib/strtod_nan_main.c
- create mode 100644 stdlib/strtod_nan_narrow.h
- create mode 100644 stdlib/strtod_nan_wide.h
- create mode 100644 stdlib/strtof_nan.c
- create mode 100644 stdlib/strtold_nan.c
- create mode 100644 sysdeps/ieee754/ldbl-128/strtod_nan_ldouble.h
- create mode 100644 sysdeps/ieee754/ldbl-128ibm/strtod_nan_ldouble.h
- create mode 100644 sysdeps/ieee754/ldbl-96/strtod_nan_ldouble.h
- create mode 100644 wcsmbs/wcstod_nan.c
- create mode 100644 wcsmbs/wcstof_nan.c
- create mode 100644 wcsmbs/wcstold_nan.c
-
-Index: git/include/stdlib.h
-===================================================================
---- git.orig/include/stdlib.h
-+++ git/include/stdlib.h
-@@ -203,6 +203,24 @@ libc_hidden_proto (strtoll)
- libc_hidden_proto (strtoul)
- libc_hidden_proto (strtoull)
- 
-+extern float __strtof_nan (const char *, char **, char) internal_function;
-+extern double __strtod_nan (const char *, char **, char) internal_function;
-+extern long double __strtold_nan (const char *, char **, char)
-+     internal_function;
-+extern float __wcstof_nan (const wchar_t *, wchar_t **, wchar_t)
-+     internal_function;
-+extern double __wcstod_nan (const wchar_t *, wchar_t **, wchar_t)
-+     internal_function;
-+extern long double __wcstold_nan (const wchar_t *, wchar_t **, wchar_t)
-+     internal_function;
-+
-+libc_hidden_proto (__strtof_nan)
-+libc_hidden_proto (__strtod_nan)
-+libc_hidden_proto (__strtold_nan)
-+libc_hidden_proto (__wcstof_nan)
-+libc_hidden_proto (__wcstod_nan)
-+libc_hidden_proto (__wcstold_nan)
-+
- extern char *__ecvt (double __value, int __ndigit, int *__restrict __decpt,
- 		     int *__restrict __sign);
- extern char *__fcvt (double __value, int __ndigit, int *__restrict __decpt,
-Index: git/include/wchar.h
-===================================================================
---- git.orig/include/wchar.h
-+++ git/include/wchar.h
-@@ -52,6 +52,9 @@ extern unsigned long long int __wcstoull
- 						   __restrict __endptr,
- 						   int __base,
- 						   int __group) __THROW;
-+extern unsigned long long int ____wcstoull_l_internal (const wchar_t *,
-+						       wchar_t **, int, int,
-+						       __locale_t);
- libc_hidden_proto (__wcstof_internal)
- libc_hidden_proto (__wcstod_internal)
- libc_hidden_proto (__wcstold_internal)
-Index: git/stdlib/Makefile
-===================================================================
---- git.orig/stdlib/Makefile
-+++ git/stdlib/Makefile
-@@ -51,6 +51,7 @@ routines-y	:=							      \
- 	strtol_l strtoul_l strtoll_l strtoull_l				      \
- 	strtof strtod strtold						      \
- 	strtof_l strtod_l strtold_l					      \
-+	strtof_nan strtod_nan strtold_nan				      \
- 	system canonicalize						      \
- 	a64l l64a							      \
- 	getsubopt xpg_basename						      \
-Index: git/stdlib/strtod_l.c
-===================================================================
---- git.orig/stdlib/strtod_l.c
-+++ git/stdlib/strtod_l.c
-@@ -21,8 +21,6 @@
- #include <xlocale.h>
- 
- extern double ____strtod_l_internal (const char *, char **, int, __locale_t);
--extern unsigned long long int ____strtoull_l_internal (const char *, char **,
--						       int, int, __locale_t);
- 
- /* Configuration part.  These macros are defined by `strtold.c',
-    `strtof.c', `wcstod.c', `wcstold.c', and `wcstof.c' to produce the
-@@ -34,27 +32,20 @@ extern unsigned long long int ____strtou
- # ifdef USE_WIDE_CHAR
- #  define STRTOF	wcstod_l
- #  define __STRTOF	__wcstod_l
-+#  define STRTOF_NAN	__wcstod_nan
- # else
- #  define STRTOF	strtod_l
- #  define __STRTOF	__strtod_l
-+#  define STRTOF_NAN	__strtod_nan
- # endif
- # define MPN2FLOAT	__mpn_construct_double
- # define FLOAT_HUGE_VAL	HUGE_VAL
--# define SET_MANTISSA(flt, mant) \
--  do { union ieee754_double u;						      \
--       u.d = (flt);							      \
--       u.ieee_nan.mantissa0 = (mant) >> 32;				      \
--       u.ieee_nan.mantissa1 = (mant);					      \
--       if ((u.ieee.mantissa0 | u.ieee.mantissa1) != 0)			      \
--	 (flt) = u.d;							      \
--  } while (0)
- #endif
- /* End of configuration part.  */
- 
- #include <ctype.h>
- #include <errno.h>
- #include <float.h>
--#include <ieee754.h>
- #include "../locale/localeinfo.h"
- #include <locale.h>
- #include <math.h>
-@@ -105,7 +96,6 @@ extern unsigned long long int ____strtou
- # define TOLOWER_C(Ch) __towlower_l ((Ch), _nl_C_locobj_ptr)
- # define STRNCASECMP(S1, S2, N) \
-   __wcsncasecmp_l ((S1), (S2), (N), _nl_C_locobj_ptr)
--# define STRTOULL(S, E, B) ____wcstoull_l_internal ((S), (E), (B), 0, loc)
- #else
- # define STRING_TYPE char
- # define CHAR_TYPE char
-@@ -117,7 +107,6 @@ extern unsigned long long int ____strtou
- # define TOLOWER_C(Ch) __tolower_l ((Ch), _nl_C_locobj_ptr)
- # define STRNCASECMP(S1, S2, N) \
-   __strncasecmp_l ((S1), (S2), (N), _nl_C_locobj_ptr)
--# define STRTOULL(S, E, B) ____strtoull_l_internal ((S), (E), (B), 0, loc)
- #endif
- 
- 
-@@ -668,33 +657,14 @@ ____STRTOF_INTERNAL (nptr, endptr, group
- 	  if (*cp == L_('('))
- 	    {
- 	      const STRING_TYPE *startp = cp;
--	      do
--		++cp;
--	      while ((*cp >= L_('0') && *cp <= L_('9'))
--		     || ({ CHAR_TYPE lo = TOLOWER (*cp);
--			   lo >= L_('a') && lo <= L_('z'); })
--		     || *cp == L_('_'));
--
--	      if (*cp != L_(')'))
--		/* The closing brace is missing.  Only match the NAN
--		   part.  */
--		cp = startp;
-+          STRING_TYPE *endp;
-+          retval = STRTOF_NAN (cp + 1, &endp, L_(')'));
-+          if (*endp == L_(')'))
-+            /* Consume the closing parenthesis.  */
-+            cp = endp + 1;
- 	      else
--		{
--		  /* This is a system-dependent way to specify the
--		     bitmask used for the NaN.  We expect it to be
--		     a number which is put in the mantissa of the
--		     number.  */
--		  STRING_TYPE *endp;
--		  unsigned long long int mant;
--
--		  mant = STRTOULL (startp + 1, &endp, 0);
--		  if (endp == cp)
--		    SET_MANTISSA (retval, mant);
--
--		  /* Consume the closing brace.  */
--		  ++cp;
--		}
-+               /* Only match the NAN part.  */
-+               cp = startp;
- 	    }
- 
- 	  if (endptr != NULL)
-Index: git/stdlib/strtod_nan.c
-===================================================================
---- /dev/null
-+++ git/stdlib/strtod_nan.c
-@@ -0,0 +1,24 @@
-+/* Convert string for NaN payload to corresponding NaN.  Narrow
-+   strings, double.
-+   Copyright (C) 2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include <strtod_nan_narrow.h>
-+#include <strtod_nan_double.h>
-+
-+#define STRTOD_NAN __strtod_nan
-+#include <strtod_nan_main.c>
-Index: git/stdlib/strtod_nan_double.h
-===================================================================
---- /dev/null
-+++ git/stdlib/strtod_nan_double.h
-@@ -0,0 +1,30 @@
-+/* Convert string for NaN payload to corresponding NaN.  For double.
-+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#define FLOAT		double
-+#define SET_MANTISSA(flt, mant)				\
-+  do							\
-+    {							\
-+      union ieee754_double u;				\
-+      u.d = (flt);					\
-+      u.ieee_nan.mantissa0 = (mant) >> 32;		\
-+      u.ieee_nan.mantissa1 = (mant);			\
-+      if ((u.ieee.mantissa0 | u.ieee.mantissa1) != 0)	\
-+	(flt) = u.d;					\
-+    }							\
-+  while (0)
-Index: git/stdlib/strtod_nan_float.h
-===================================================================
---- /dev/null
-+++ git/stdlib/strtod_nan_float.h
-@@ -0,0 +1,29 @@
-+/* Convert string for NaN payload to corresponding NaN.  For float.
-+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#define	FLOAT		float
-+#define SET_MANTISSA(flt, mant)			\
-+  do						\
-+    {						\
-+      union ieee754_float u;			\
-+      u.f = (flt);				\
-+      u.ieee_nan.mantissa = (mant);		\
-+      if (u.ieee.mantissa != 0)			\
-+	(flt) = u.f;				\
-+    }						\
-+  while (0)
-Index: git/stdlib/strtod_nan_main.c
-===================================================================
---- /dev/null
-+++ git/stdlib/strtod_nan_main.c
-@@ -0,0 +1,63 @@
-+/* Convert string for NaN payload to corresponding NaN.
-+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include <ieee754.h>
-+#include <locale.h>
-+#include <math.h>
-+#include <stdlib.h>
-+#include <wchar.h>
-+
-+
-+/* If STR starts with an optional n-char-sequence as defined by ISO C
-+   (a sequence of ASCII letters, digits and underscores), followed by
-+   ENDC, return a NaN whose payload is set based on STR.  Otherwise,
-+   return a default NAN.  If ENDPTR is not NULL, set *ENDPTR to point
-+   to the character after the initial n-char-sequence.  */
-+
-+internal_function
-+FLOAT
-+STRTOD_NAN (const STRING_TYPE *str, STRING_TYPE **endptr, STRING_TYPE endc)
-+{
-+  const STRING_TYPE *cp = str;
-+
-+  while ((*cp >= L_('0') && *cp <= L_('9'))
-+	 || (*cp >= L_('A') && *cp <= L_('Z'))
-+	 || (*cp >= L_('a') && *cp <= L_('z'))
-+	 || *cp == L_('_'))
-+    ++cp;
-+
-+  FLOAT retval = NAN;
-+  if (*cp != endc)
-+    goto out;
-+
-+  /* This is a system-dependent way to specify the bitmask used for
-+     the NaN.  We expect it to be a number which is put in the
-+     mantissa of the number.  */
-+  STRING_TYPE *endp;
-+  unsigned long long int mant;
-+
-+  mant = STRTOULL (str, &endp, 0);
-+  if (endp == cp)
-+    SET_MANTISSA (retval, mant);
-+
-+ out:
-+  if (endptr != NULL)
-+    *endptr = (STRING_TYPE *) cp;
-+  return retval;
-+}
-+libc_hidden_def (STRTOD_NAN)
-Index: git/stdlib/strtod_nan_narrow.h
-===================================================================
---- /dev/null
-+++ git/stdlib/strtod_nan_narrow.h
-@@ -0,0 +1,22 @@
-+/* Convert string for NaN payload to corresponding NaN.  Narrow strings.
-+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#define STRING_TYPE char
-+#define L_(Ch) Ch
-+#define STRTOULL(S, E, B) ____strtoull_l_internal ((S), (E), (B), 0,	\
-+						   _nl_C_locobj_ptr)
-Index: git/stdlib/strtod_nan_wide.h
-===================================================================
---- /dev/null
-+++ git/stdlib/strtod_nan_wide.h
-@@ -0,0 +1,22 @@
-+/* Convert string for NaN payload to corresponding NaN.  Wide strings.
-+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#define STRING_TYPE wchar_t
-+#define L_(Ch) L##Ch
-+#define STRTOULL(S, E, B) ____wcstoull_l_internal ((S), (E), (B), 0,	\
-+						   _nl_C_locobj_ptr)
-Index: git/stdlib/strtof_l.c
-===================================================================
---- git.orig/stdlib/strtof_l.c
-+++ git/stdlib/strtof_l.c
-@@ -20,26 +20,19 @@
- #include <xlocale.h>
- 
- extern float ____strtof_l_internal (const char *, char **, int, __locale_t);
--extern unsigned long long int ____strtoull_l_internal (const char *, char **,
--						       int, int, __locale_t);
- 
- #define	FLOAT		float
- #define	FLT		FLT
- #ifdef USE_WIDE_CHAR
- # define STRTOF		wcstof_l
- # define __STRTOF	__wcstof_l
-+# define STRTOF_NAN	__wcstof_nan
- #else
- # define STRTOF		strtof_l
- # define __STRTOF	__strtof_l
-+# define STRTOF_NAN	__strtof_nan
- #endif
- #define	MPN2FLOAT	__mpn_construct_float
- #define	FLOAT_HUGE_VAL	HUGE_VALF
--#define SET_MANTISSA(flt, mant) \
--  do { union ieee754_float u;						      \
--       u.f = (flt);							      \
--       u.ieee_nan.mantissa = (mant);					      \
--       if (u.ieee.mantissa != 0)					      \
--	 (flt) = u.f;							      \
--  } while (0)
- 
- #include "strtod_l.c"
-Index: git/stdlib/strtof_nan.c
-===================================================================
---- /dev/null
-+++ git/stdlib/strtof_nan.c
-@@ -0,0 +1,24 @@
-+/* Convert string for NaN payload to corresponding NaN.  Narrow
-+   strings, float.
-+   Copyright (C) 2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include <strtod_nan_narrow.h>
-+#include <strtod_nan_float.h>
-+
-+#define STRTOD_NAN __strtof_nan
-+#include <strtod_nan_main.c>
-Index: git/stdlib/strtold_nan.c
-===================================================================
---- /dev/null
-+++ git/stdlib/strtold_nan.c
-@@ -0,0 +1,30 @@
-+/* Convert string for NaN payload to corresponding NaN.  Narrow
-+   strings, long double.
-+   Copyright (C) 2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include <math.h>
-+
-+/* This function is unused if long double and double have the same
-+   representation.  */
-+#ifndef __NO_LONG_DOUBLE_MATH
-+# include <strtod_nan_narrow.h>
-+# include <strtod_nan_ldouble.h>
-+
-+# define STRTOD_NAN __strtold_nan
-+# include <strtod_nan_main.c>
-+#endif
-Index: git/sysdeps/ieee754/ldbl-128/strtod_nan_ldouble.h
-===================================================================
---- /dev/null
-+++ git/sysdeps/ieee754/ldbl-128/strtod_nan_ldouble.h
-@@ -0,0 +1,33 @@
-+/* Convert string for NaN payload to corresponding NaN.  For ldbl-128.
-+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#define FLOAT		long double
-+#define SET_MANTISSA(flt, mant)				\
-+  do							\
-+    {							\
-+      union ieee854_long_double u;			\
-+      u.d = (flt);					\
-+      u.ieee_nan.mantissa0 = 0;				\
-+      u.ieee_nan.mantissa1 = 0;				\
-+      u.ieee_nan.mantissa2 = (mant) >> 32;		\
-+      u.ieee_nan.mantissa3 = (mant);			\
-+      if ((u.ieee.mantissa0 | u.ieee.mantissa1		\
-+	   | u.ieee.mantissa2 | u.ieee.mantissa3) != 0)	\
-+	(flt) = u.d;					\
-+    }							\
-+  while (0)
-Index: git/sysdeps/ieee754/ldbl-128/strtold_l.c
-===================================================================
---- git.orig/sysdeps/ieee754/ldbl-128/strtold_l.c
-+++ git/sysdeps/ieee754/ldbl-128/strtold_l.c
-@@ -25,22 +25,13 @@
- #ifdef USE_WIDE_CHAR
- # define STRTOF		wcstold_l
- # define __STRTOF	__wcstold_l
-+# define STRTOF_NAN	__wcstold_nan
- #else
- # define STRTOF		strtold_l
- # define __STRTOF	__strtold_l
-+# define STRTOF_NAN	__strtold_nan
- #endif
- #define MPN2FLOAT	__mpn_construct_long_double
- #define FLOAT_HUGE_VAL	HUGE_VALL
--#define SET_MANTISSA(flt, mant) \
--  do { union ieee854_long_double u;					      \
--       u.d = (flt);							      \
--       u.ieee_nan.mantissa0 = 0;					      \
--       u.ieee_nan.mantissa1 = 0;					      \
--       u.ieee_nan.mantissa2 = (mant) >> 32;				      \
--       u.ieee_nan.mantissa3 = (mant);					      \
--       if ((u.ieee.mantissa0 | u.ieee.mantissa1				      \
--	    | u.ieee.mantissa2 | u.ieee.mantissa3) != 0)		      \
--	 (flt) = u.d;							      \
--  } while (0)
- 
- #include <strtod_l.c>
-Index: git/sysdeps/ieee754/ldbl-128ibm/strtod_nan_ldouble.h
-===================================================================
---- /dev/null
-+++ git/sysdeps/ieee754/ldbl-128ibm/strtod_nan_ldouble.h
-@@ -0,0 +1,30 @@
-+/* Convert string for NaN payload to corresponding NaN.  For ldbl-128ibm.
-+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#define FLOAT		long double
-+#define SET_MANTISSA(flt, mant)					\
-+  do								\
-+    {								\
-+      union ibm_extended_long_double u;				\
-+      u.ld = (flt);						\
-+      u.d[0].ieee_nan.mantissa0 = (mant) >> 32;			\
-+      u.d[0].ieee_nan.mantissa1 = (mant);			\
-+      if ((u.d[0].ieee.mantissa0 | u.d[0].ieee.mantissa1) != 0)	\
-+	(flt) = u.ld;						\
-+    }								\
-+  while (0)
-Index: git/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
-===================================================================
---- git.orig/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
-+++ git/sysdeps/ieee754/ldbl-128ibm/strtold_l.c
-@@ -30,25 +30,19 @@ extern long double ____new_wcstold_l (co
- # define STRTOF		__new_wcstold_l
- # define __STRTOF	____new_wcstold_l
- # define ____STRTOF_INTERNAL ____wcstold_l_internal
-+# define STRTOF_NAN	__wcstold_nan
- #else
- extern long double ____new_strtold_l (const char *, char **, __locale_t);
- # define STRTOF		__new_strtold_l
- # define __STRTOF	____new_strtold_l
- # define ____STRTOF_INTERNAL ____strtold_l_internal
-+# define STRTOF_NAN	__strtold_nan
- #endif
- extern __typeof (__STRTOF) STRTOF;
- libc_hidden_proto (__STRTOF)
- libc_hidden_proto (STRTOF)
- #define MPN2FLOAT	__mpn_construct_long_double
- #define FLOAT_HUGE_VAL	HUGE_VALL
--# define SET_MANTISSA(flt, mant) \
--  do { union ibm_extended_long_double u;				      \
--       u.ld = (flt);							      \
--       u.d[0].ieee_nan.mantissa0 = (mant) >> 32;			      \
--       u.d[0].ieee_nan.mantissa1 = (mant);				      \
--       if ((u.d[0].ieee.mantissa0 | u.d[0].ieee.mantissa1) != 0)	      \
--	 (flt) = u.ld;							      \
--  } while (0)
- 
- #include <strtod_l.c>
- 
-Index: git/sysdeps/ieee754/ldbl-64-128/strtold_l.c
-===================================================================
---- git.orig/sysdeps/ieee754/ldbl-64-128/strtold_l.c
-+++ git/sysdeps/ieee754/ldbl-64-128/strtold_l.c
-@@ -30,28 +30,19 @@ extern long double ____new_wcstold_l (co
- # define STRTOF		__new_wcstold_l
- # define __STRTOF	____new_wcstold_l
- # define ____STRTOF_INTERNAL ____wcstold_l_internal
-+# define STRTOF_NAN	__wcstold_nan
- #else
- extern long double ____new_strtold_l (const char *, char **, __locale_t);
- # define STRTOF		__new_strtold_l
- # define __STRTOF	____new_strtold_l
- # define ____STRTOF_INTERNAL ____strtold_l_internal
-+# define STRTOF_NAN	__strtold_nan
- #endif
- extern __typeof (__STRTOF) STRTOF;
- libc_hidden_proto (__STRTOF)
- libc_hidden_proto (STRTOF)
- #define MPN2FLOAT	__mpn_construct_long_double
- #define FLOAT_HUGE_VAL	HUGE_VALL
--#define SET_MANTISSA(flt, mant) \
--  do { union ieee854_long_double u;					      \
--       u.d = (flt);							      \
--       u.ieee_nan.mantissa0 = 0;					      \
--       u.ieee_nan.mantissa1 = 0;					      \
--       u.ieee_nan.mantissa2 = (mant) >> 32;				      \
--       u.ieee_nan.mantissa3 = (mant);					      \
--       if ((u.ieee.mantissa0 | u.ieee.mantissa1				      \
--	    | u.ieee.mantissa2 | u.ieee.mantissa3) != 0)		      \
--	 (flt) = u.d;							      \
--  } while (0)
- 
- #include <strtod_l.c>
- 
-Index: git/sysdeps/ieee754/ldbl-96/strtod_nan_ldouble.h
-===================================================================
---- /dev/null
-+++ git/sysdeps/ieee754/ldbl-96/strtod_nan_ldouble.h
-@@ -0,0 +1,30 @@
-+/* Convert string for NaN payload to corresponding NaN.  For ldbl-96.
-+   Copyright (C) 1997-2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#define FLOAT		long double
-+#define SET_MANTISSA(flt, mant)				\
-+  do							\
-+    {							\
-+      union ieee854_long_double u;			\
-+      u.d = (flt);					\
-+      u.ieee_nan.mantissa0 = (mant) >> 32;		\
-+      u.ieee_nan.mantissa1 = (mant);			\
-+      if ((u.ieee.mantissa0 | u.ieee.mantissa1) != 0)	\
-+	(flt) = u.d;					\
-+    }							\
-+  while (0)
-Index: git/sysdeps/ieee754/ldbl-96/strtold_l.c
-===================================================================
---- git.orig/sysdeps/ieee754/ldbl-96/strtold_l.c
-+++ git/sysdeps/ieee754/ldbl-96/strtold_l.c
-@@ -25,19 +25,13 @@
- #ifdef USE_WIDE_CHAR
- # define STRTOF		wcstold_l
- # define __STRTOF	__wcstold_l
-+# define STRTOF_NAN	__wcstold_nan
- #else
- # define STRTOF		strtold_l
- # define __STRTOF	__strtold_l
-+# define STRTOF_NAN	__strtold_nan
- #endif
- #define MPN2FLOAT	__mpn_construct_long_double
- #define FLOAT_HUGE_VAL	HUGE_VALL
--#define SET_MANTISSA(flt, mant) \
--  do { union ieee854_long_double u;					      \
--       u.d = (flt);							      \
--       u.ieee_nan.mantissa0 = (mant) >> 32;				      \
--       u.ieee_nan.mantissa1 = (mant);					      \
--       if ((u.ieee.mantissa0 | u.ieee.mantissa1) != 0)			      \
--	 (flt) = u.d;							      \
--  } while (0)
- 
- #include <stdlib/strtod_l.c>
-Index: git/wcsmbs/Makefile
-===================================================================
---- git.orig/wcsmbs/Makefile
-+++ git/wcsmbs/Makefile
-@@ -39,6 +39,7 @@ routines-$(OPTION_POSIX_C_LANG_WIDE_CHAR
- 	    wcstol wcstoul wcstoll wcstoull wcstod wcstold wcstof \
- 	    wcstol_l wcstoul_l wcstoll_l wcstoull_l \
- 	    wcstod_l wcstold_l wcstof_l \
-+	    wcstod_nan wcstold_nan wcstof_nan \
- 	    wcscoll wcsxfrm \
- 	    wcwidth wcswidth \
- 	    wcscoll_l wcsxfrm_l \
-Index: git/wcsmbs/wcstod_l.c
-===================================================================
---- git.orig/wcsmbs/wcstod_l.c
-+++ git/wcsmbs/wcstod_l.c
-@@ -23,9 +23,6 @@
- 
- extern double ____wcstod_l_internal (const wchar_t *, wchar_t **, int,
- 				     __locale_t);
--extern unsigned long long int ____wcstoull_l_internal (const wchar_t *,
--						       wchar_t **, int, int,
--						       __locale_t);
- 
- #define	USE_WIDE_CHAR	1
- 
-Index: git/wcsmbs/wcstod_nan.c
-===================================================================
---- /dev/null
-+++ git/wcsmbs/wcstod_nan.c
-@@ -0,0 +1,23 @@
-+/* Convert string for NaN payload to corresponding NaN.  Wide strings, double.
-+   Copyright (C) 2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include "../stdlib/strtod_nan_wide.h"
-+#include "../stdlib/strtod_nan_double.h"
-+
-+#define STRTOD_NAN __wcstod_nan
-+#include "../stdlib/strtod_nan_main.c"
-Index: git/wcsmbs/wcstof_l.c
-===================================================================
---- git.orig/wcsmbs/wcstof_l.c
-+++ git/wcsmbs/wcstof_l.c
-@@ -25,8 +25,5 @@
- 
- extern float ____wcstof_l_internal (const wchar_t *, wchar_t **, int,
- 				    __locale_t);
--extern unsigned long long int ____wcstoull_l_internal (const wchar_t *,
--						       wchar_t **, int, int,
--						       __locale_t);
- 
- #include <stdlib/strtof_l.c>
-Index: git/wcsmbs/wcstof_nan.c
-===================================================================
---- /dev/null
-+++ git/wcsmbs/wcstof_nan.c
-@@ -0,0 +1,23 @@
-+/* Convert string for NaN payload to corresponding NaN.  Wide strings, float.
-+   Copyright (C) 2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include "../stdlib/strtod_nan_wide.h"
-+#include "../stdlib/strtod_nan_float.h"
-+
-+#define STRTOD_NAN __wcstof_nan
-+#include "../stdlib/strtod_nan_main.c"
-Index: git/wcsmbs/wcstold_l.c
-===================================================================
---- git.orig/wcsmbs/wcstold_l.c
-+++ git/wcsmbs/wcstold_l.c
-@@ -24,8 +24,5 @@
- 
- extern long double ____wcstold_l_internal (const wchar_t *, wchar_t **, int,
- 					   __locale_t);
--extern unsigned long long int ____wcstoull_l_internal (const wchar_t *,
--						       wchar_t **, int, int,
--						       __locale_t);
- 
- #include <strtold_l.c>
-Index: git/wcsmbs/wcstold_nan.c
-===================================================================
---- /dev/null
-+++ git/wcsmbs/wcstold_nan.c
-@@ -0,0 +1,30 @@
-+/* Convert string for NaN payload to corresponding NaN.  Wide strings,
-+   long double.
-+   Copyright (C) 2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include <math.h>
-+
-+/* This function is unused if long double and double have the same
-+   representation.  */
-+#ifndef __NO_LONG_DOUBLE_MATH
-+# include "../stdlib/strtod_nan_wide.h"
-+# include <strtod_nan_ldouble.h>
-+
-+# define STRTOD_NAN __wcstold_nan
-+# include "../stdlib/strtod_nan_main.c"
-+#endif
-Index: git/ChangeLog
-===================================================================
---- git.orig/ChangeLog
-+++ git/ChangeLog
-@@ -1,3 +1,57 @@
-+2015-11-24  Joseph Myers  <joseph@codesourcery.com>
-+ 
-+	* stdlib/strtod_nan.c: New file.
-+	* stdlib/strtod_nan_double.h: Likewise.
-+	* stdlib/strtod_nan_float.h: Likewise.
-+	* stdlib/strtod_nan_main.c: Likewise.
-+	* stdlib/strtod_nan_narrow.h: Likewise.
-+	* stdlib/strtod_nan_wide.h: Likewise.
-+	* stdlib/strtof_nan.c: Likewise.
-+	* stdlib/strtold_nan.c: Likewise.
-+	* sysdeps/ieee754/ldbl-128/strtod_nan_ldouble.h: Likewise.
-+	* sysdeps/ieee754/ldbl-128ibm/strtod_nan_ldouble.h: Likewise.
-+	* sysdeps/ieee754/ldbl-96/strtod_nan_ldouble.h: Likewise.
-+	* wcsmbs/wcstod_nan.c: Likewise.
-+	* wcsmbs/wcstof_nan.c: Likewise.
-+	* wcsmbs/wcstold_nan.c: Likewise.
-+	* stdlib/Makefile (routines): Add strtof_nan, strtod_nan and
-+	strtold_nan.
-+	* wcsmbs/Makefile (routines): Add wcstod_nan, wcstold_nan and
-+	wcstof_nan.
-+	* include/stdlib.h (__strtof_nan): Declare and use
-+	libc_hidden_proto.
-+	(__strtod_nan): Likewise.
-+	(__strtold_nan): Likewise.
-+	(__wcstof_nan): Likewise.
-+	(__wcstod_nan): Likewise.
-+	(__wcstold_nan): Likewise.
-+	* include/wchar.h (____wcstoull_l_internal): Declare.
-+	* stdlib/strtod_l.c: Do not include <ieee754.h>.
-+	(____strtoull_l_internal): Remove declaration.
-+	(STRTOF_NAN): Define macro.
-+	(SET_MANTISSA): Remove macro.
-+	(STRTOULL): Likewise.
-+	(____STRTOF_INTERNAL): Use STRTOF_NAN to parse NaN payload.
-+	* stdlib/strtof_l.c (____strtoull_l_internal): Remove declaration.
-+	(STRTOF_NAN): Define macro.
-+	(SET_MANTISSA): Remove macro.
-+	* sysdeps/ieee754/ldbl-128/strtold_l.c (STRTOF_NAN): Define macro.
-+	(SET_MANTISSA): Remove macro.
-+	* sysdeps/ieee754/ldbl-128ibm/strtold_l.c (STRTOF_NAN): Define
-+	macro.
-+	(SET_MANTISSA): Remove macro.
-+	* sysdeps/ieee754/ldbl-64-128/strtold_l.c (STRTOF_NAN): Define
-+	macro.
-+	(SET_MANTISSA): Remove macro.
-+	* sysdeps/ieee754/ldbl-96/strtold_l.c (STRTOF_NAN): Define macro.
-+	(SET_MANTISSA): Remove macro.
-+	* wcsmbs/wcstod_l.c (____wcstoull_l_internal): Remove declaration.
-+	* wcsmbs/wcstof_l.c (____wcstoull_l_internal): Likewise.
-+	* wcsmbs/wcstold_l.c (____wcstoull_l_internal): Likewise.
-+
-+ 	[BZ #19266]
-+ 	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Check directly for
-+ 	upper case and lower case letters inside NAN(), not using TOLOWER.
- 2015-08-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
- 
-    [BZ #17905]
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-9761_2.patch b/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-9761_2.patch
deleted file mode 100644
index e30307f..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/CVE-2015-9761_2.patch
+++ /dev/null
@@ -1,385 +0,0 @@
-From 8f5e8b01a1da2a207228f2072c934fa5918554b8 Mon Sep 17 00:00:00 2001
-From: Joseph Myers <joseph@codesourcery.com>
-Date: Fri, 4 Dec 2015 20:36:28 +0000
-Subject: [PATCH] Fix nan functions handling of payload strings (bug 16961, bug
- 16962).
-
-The nan, nanf and nanl functions handle payload strings by doing e.g.:
-
-  if (tagp[0] != '\0')
-    {
-      char buf[6 + strlen (tagp)];
-      sprintf (buf, "NAN(%s)", tagp);
-      return strtod (buf, NULL);
-    }
-
-This is an unbounded stack allocation based on the length of the
-argument.  Furthermore, if the argument starts with an n-char-sequence
-followed by ')', that n-char-sequence is wrongly treated as
-significant for determining the payload of the resulting NaN, when ISO
-C says the call should be equivalent to strtod ("NAN", NULL), without
-being affected by that initial n-char-sequence.  This patch fixes both
-those problems by using the __strtod_nan etc. functions recently
-factored out of strtod etc. for that purpose, with those functions
-being exported from libc at version GLIBC_PRIVATE.
-
-Tested for x86_64, x86, mips64 and powerpc.
-
-	[BZ #16961]
-	[BZ #16962]
-	* math/s_nan.c (__nan): Use __strtod_nan instead of constructing a
-	string on the stack for strtod.
-	* math/s_nanf.c (__nanf): Use __strtof_nan instead of constructing
-	a string on the stack for strtof.
-	* math/s_nanl.c (__nanl): Use __strtold_nan instead of
-	constructing a string on the stack for strtold.
-	* stdlib/Versions (libc): Add __strtof_nan, __strtod_nan and
-	__strtold_nan to GLIBC_PRIVATE.
-	* math/test-nan-overflow.c: New file.
-	* math/test-nan-payload.c: Likewise.
-	* math/Makefile (tests): Add test-nan-overflow and
-	test-nan-payload.
-
-Upstream-Status: Backport
-CVE: CVE-2015-9761 patch #2
-[Yocto # 8980]
-
-https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8f5e8b01a1da2a207228f2072c934fa5918554b8
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog                |  17 +++++++
- NEWS                     |   6 +++
- math/Makefile            |   3 +-
- math/s_nan.c             |   9 +---
- math/s_nanf.c            |   9 +---
- math/s_nanl.c            |   9 +---
- math/test-nan-overflow.c |  66 +++++++++++++++++++++++++
- math/test-nan-payload.c  | 122 +++++++++++++++++++++++++++++++++++++++++++++++
- stdlib/Versions          |   1 +
- 9 files changed, 217 insertions(+), 25 deletions(-)
- create mode 100644 math/test-nan-overflow.c
- create mode 100644 math/test-nan-payload.c
-
-Index: git/ChangeLog
-===================================================================
---- git.orig/ChangeLog
-+++ git/ChangeLog
-@@ -1,3 +1,20 @@
-+2015-12-04  Joseph Myers  <joseph@codesourcery.com>
-+
-+	[BZ #16961]
-+	[BZ #16962]
-+	* math/s_nan.c (__nan): Use __strtod_nan instead of constructing a
-+	string on the stack for strtod.
-+	* math/s_nanf.c (__nanf): Use __strtof_nan instead of constructing
-+	a string on the stack for strtof.
-+	* math/s_nanl.c (__nanl): Use __strtold_nan instead of
-+	constructing a string on the stack for strtold.
-+	* stdlib/Versions (libc): Add __strtof_nan, __strtod_nan and
-+	__strtold_nan to GLIBC_PRIVATE.
-+	* math/test-nan-overflow.c: New file.
-+	* math/test-nan-payload.c: Likewise.
-+	* math/Makefile (tests): Add test-nan-overflow and
-+	test-nan-payload.
-+
- 2015-11-24  Joseph Myers  <joseph@codesourcery.com>
-  
- 	* stdlib/strtod_nan.c: New file.
-Index: git/NEWS
-===================================================================
---- git.orig/NEWS
-+++ git/NEWS
-@@ -99,6 +99,12 @@ Version 2.22
- 
- Version 2.21
- 
-+Security related changes:
-+
-+* The nan, nanf and nanl functions no longer have unbounded stack usage
-+  depending on the length of the string passed as an argument to the
-+  functions.  Reported by Joseph Myers.
-+
- * The following bugs are resolved with this release:
- 
-   6652, 10672, 12674, 12847, 12926, 13862, 14132, 14138, 14171, 14498,
-Index: git/math/Makefile
-===================================================================
---- git.orig/math/Makefile
-+++ git/math/Makefile
-@@ -110,6 +110,7 @@ tests = test-matherr test-fenv atest-exp
- 	test-tgmath-ret bug-nextafter bug-nexttoward bug-tgmath1 \
- 	test-tgmath-int test-tgmath2 test-powl tst-CMPLX tst-CMPLX2 test-snan \
- 	test-fenv-tls test-fenv-preserve test-fenv-return test-fenvinline \
-+    test-nan-overflow test-nan-payload \
- 	$(tests-static)
- tests-static = test-fpucw-static test-fpucw-ieee-static
- # We do the `long double' tests only if this data type is available and
-Index: git/math/s_nan.c
-===================================================================
---- git.orig/math/s_nan.c
-+++ git/math/s_nan.c
-@@ -28,14 +28,7 @@
- double
- __nan (const char *tagp)
- {
--  if (tagp[0] != '\0')
--    {
--      char buf[6 + strlen (tagp)];
--      sprintf (buf, "NAN(%s)", tagp);
--      return strtod (buf, NULL);
--    }
--
--  return NAN;
-+  return __strtod_nan (tagp, NULL, 0);
- }
- weak_alias (__nan, nan)
- #ifdef NO_LONG_DOUBLE
-Index: git/math/s_nanf.c
-===================================================================
---- git.orig/math/s_nanf.c
-+++ git/math/s_nanf.c
-@@ -28,13 +28,6 @@
- float
- __nanf (const char *tagp)
- {
--  if (tagp[0] != '\0')
--    {
--      char buf[6 + strlen (tagp)];
--      sprintf (buf, "NAN(%s)", tagp);
--      return strtof (buf, NULL);
--    }
--
--  return NAN;
-+  return __strtof_nan (tagp, NULL, 0);
- }
- weak_alias (__nanf, nanf)
-Index: git/math/s_nanl.c
-===================================================================
---- git.orig/math/s_nanl.c
-+++ git/math/s_nanl.c
-@@ -28,13 +28,6 @@
- long double
- __nanl (const char *tagp)
- {
--  if (tagp[0] != '\0')
--    {
--      char buf[6 + strlen (tagp)];
--      sprintf (buf, "NAN(%s)", tagp);
--      return strtold (buf, NULL);
--    }
--
--  return NAN;
-+  return __strtold_nan (tagp, NULL, 0);
- }
- weak_alias (__nanl, nanl)
-Index: git/math/test-nan-overflow.c
-===================================================================
---- /dev/null
-+++ git/math/test-nan-overflow.c
-@@ -0,0 +1,66 @@
-+/* Test nan functions stack overflow (bug 16962).
-+   Copyright (C) 2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include <math.h>
-+#include <stdio.h>
-+#include <string.h>
-+#include <sys/resource.h>
-+
-+#define STACK_LIM 1048576
-+#define STRING_SIZE (2 * STACK_LIM)
-+
-+static int
-+do_test (void)
-+{
-+  int result = 0;
-+  struct rlimit lim;
-+  getrlimit (RLIMIT_STACK, &lim);
-+  lim.rlim_cur = STACK_LIM;
-+  setrlimit (RLIMIT_STACK, &lim);
-+  char *nanstr = malloc (STRING_SIZE);
-+  if (nanstr == NULL)
-+    {
-+      puts ("malloc failed, cannot test");
-+      return 77;
-+    }
-+  memset (nanstr, '0', STRING_SIZE - 1);
-+  nanstr[STRING_SIZE - 1] = 0;
-+#define NAN_TEST(TYPE, FUNC)			\
-+  do						\
-+    {						\
-+      char *volatile p = nanstr;		\
-+      volatile TYPE v = FUNC (p);		\
-+      if (isnan (v))				\
-+	puts ("PASS: " #FUNC);			\
-+      else					\
-+	{					\
-+	  puts ("FAIL: " #FUNC);		\
-+	  result = 1;				\
-+	}					\
-+    }						\
-+  while (0)
-+  NAN_TEST (float, nanf);
-+  NAN_TEST (double, nan);
-+#ifndef NO_LONG_DOUBLE
-+  NAN_TEST (long double, nanl);
-+#endif
-+  return result;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-Index: git/math/test-nan-payload.c
-===================================================================
---- /dev/null
-+++ git/math/test-nan-payload.c
-@@ -0,0 +1,122 @@
-+/* Test nan functions payload handling (bug 16961).
-+   Copyright (C) 2015 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, see
-+   <http://www.gnu.org/licenses/>.  */
-+
-+#include <float.h>
-+#include <math.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+
-+/* Avoid built-in functions.  */
-+#define WRAP_NAN(FUNC, STR) \
-+  ({ const char *volatile wns = (STR); FUNC (wns); })
-+#define WRAP_STRTO(FUNC, STR) \
-+  ({ const char *volatile wss = (STR); FUNC (wss, NULL); })
-+
-+#define CHECK_IS_NAN(TYPE, A)			\
-+  do						\
-+    {						\
-+      if (isnan (A))				\
-+	puts ("PASS: " #TYPE " " #A);		\
-+      else					\
-+	{					\
-+	  puts ("FAIL: " #TYPE " " #A);		\
-+	  result = 1;				\
-+	}					\
-+    }						\
-+  while (0)
-+
-+#define CHECK_SAME_NAN(TYPE, A, B)			\
-+  do							\
-+    {							\
-+      if (memcmp (&(A), &(B), sizeof (A)) == 0)		\
-+	puts ("PASS: " #TYPE " " #A " = " #B);		\
-+      else						\
-+	{						\
-+	  puts ("FAIL: " #TYPE " " #A " = " #B);	\
-+	  result = 1;					\
-+	}						\
-+    }							\
-+  while (0)
-+
-+#define CHECK_DIFF_NAN(TYPE, A, B)			\
-+  do							\
-+    {							\
-+      if (memcmp (&(A), &(B), sizeof (A)) != 0)		\
-+	puts ("PASS: " #TYPE " " #A " != " #B);		\
-+      else						\
-+	{						\
-+	  puts ("FAIL: " #TYPE " " #A " != " #B);	\
-+	  result = 1;					\
-+	}						\
-+    }							\
-+  while (0)
-+
-+/* Cannot test payloads by memcmp for formats where NaNs have padding
-+   bits.  */
-+#define CAN_TEST_EQ(MANT_DIG) ((MANT_DIG) != 64 && (MANT_DIG) != 106)
-+
-+#define RUN_TESTS(TYPE, SFUNC, FUNC, MANT_DIG)		\
-+  do							\
-+    {							\
-+     TYPE n123 = WRAP_NAN (FUNC, "123");		\
-+     CHECK_IS_NAN (TYPE, n123);				\
-+     TYPE s123 = WRAP_STRTO (SFUNC, "NAN(123)");	\
-+     CHECK_IS_NAN (TYPE, s123);				\
-+     TYPE n456 = WRAP_NAN (FUNC, "456");		\
-+     CHECK_IS_NAN (TYPE, n456);				\
-+     TYPE s456 = WRAP_STRTO (SFUNC, "NAN(456)");	\
-+     CHECK_IS_NAN (TYPE, s456);				\
-+     TYPE n123x = WRAP_NAN (FUNC, "123)");		\
-+     CHECK_IS_NAN (TYPE, n123x);			\
-+     TYPE nemp = WRAP_NAN (FUNC, "");			\
-+     CHECK_IS_NAN (TYPE, nemp);				\
-+     TYPE semp = WRAP_STRTO (SFUNC, "NAN()");		\
-+     CHECK_IS_NAN (TYPE, semp);				\
-+     TYPE sx = WRAP_STRTO (SFUNC, "NAN");		\
-+     CHECK_IS_NAN (TYPE, sx);				\
-+     if (CAN_TEST_EQ (MANT_DIG))			\
-+       CHECK_SAME_NAN (TYPE, n123, s123);		\
-+     if (CAN_TEST_EQ (MANT_DIG))			\
-+       CHECK_SAME_NAN (TYPE, n456, s456);		\
-+     if (CAN_TEST_EQ (MANT_DIG))			\
-+       CHECK_SAME_NAN (TYPE, nemp, semp);		\
-+     if (CAN_TEST_EQ (MANT_DIG))			\
-+       CHECK_SAME_NAN (TYPE, n123x, sx);		\
-+     CHECK_DIFF_NAN (TYPE, n123, n456);			\
-+     CHECK_DIFF_NAN (TYPE, n123, nemp);			\
-+     CHECK_DIFF_NAN (TYPE, n123, n123x);		\
-+     CHECK_DIFF_NAN (TYPE, n456, nemp);			\
-+     CHECK_DIFF_NAN (TYPE, n456, n123x);		\
-+    }							\
-+  while (0)
-+
-+static int
-+do_test (void)
-+{
-+  int result = 0;
-+  RUN_TESTS (float, strtof, nanf, FLT_MANT_DIG);
-+  RUN_TESTS (double, strtod, nan, DBL_MANT_DIG);
-+#ifndef NO_LONG_DOUBLE
-+  RUN_TESTS (long double, strtold, nanl, LDBL_MANT_DIG);
-+#endif
-+  return result;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-Index: git/stdlib/Versions
-===================================================================
---- git.orig/stdlib/Versions
-+++ git/stdlib/Versions
-@@ -118,5 +118,6 @@ libc {
-     # Used from other libraries
-     __libc_secure_getenv;
-     __call_tls_dtors;
-+    __strtof_nan; __strtod_nan; __strtold_nan;
-   }
- }
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/nscd-no-bash.patch b/yocto-poky/meta/recipes-core/glibc/glibc/nscd-no-bash.patch
deleted file mode 100644
index c306ce6..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/nscd-no-bash.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-Don't use bashisms (except for echo -n, which busybox supports) to avoid needing bash to start nscd.
-
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/nscd/nscd.init b/nscd/nscd.init
-index a882da7..b02986e 100644
---- a/nscd/nscd.init
-+++ b/nscd/nscd.init
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
- #
- # nscd:		Starts the Name Switch Cache Daemon
- #
-@@ -49,7 +49,7 @@ prog=nscd
- start () {
-     [ -d /var/run/nscd ] || mkdir /var/run/nscd
-     [ -d /var/db/nscd ] || mkdir /var/db/nscd
--    echo -n $"Starting $prog: "
-+    echo -n "Starting $prog: "
-     daemon /usr/sbin/nscd
-     RETVAL=$?
-     echo
-@@ -58,7 +58,7 @@ start () {
- }
- 
- stop () {
--    echo -n $"Stopping $prog: "
-+    echo -n "Stopping $prog: "
-     /usr/sbin/nscd -K
-     RETVAL=$?
-     if [ $RETVAL -eq 0 ]; then
-@@ -67,9 +67,9 @@ stop () {
- 	# a non-privileged user
- 	rm -f /var/run/nscd/nscd.pid
- 	rm -f /var/run/nscd/socket
--       	success $"$prog shutdown"
-+	success "$prog shutdown"
-     else
--       	failure $"$prog shutdown"
-+	failure "$prog shutdown"
-     fi
-     echo
-     return $RETVAL
-@@ -103,13 +103,13 @@ case "$1" in
- 	RETVAL=$?
- 	;;
-     force-reload | reload)
--    	echo -n $"Reloading $prog: "
-+	echo -n "Reloading $prog: "
- 	killproc /usr/sbin/nscd -HUP
- 	RETVAL=$?
- 	echo
- 	;;
-     *)
--	echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
-+	echo "Usage: $0 {start|stop|status|restart|reload|condrestart}"
- 	RETVAL=1
- 	;;
- esac
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/strcoll-Remove-incorrect-STRDIFF-based-optimization-.patch b/yocto-poky/meta/recipes-core/glibc/glibc/strcoll-Remove-incorrect-STRDIFF-based-optimization-.patch
deleted file mode 100644
index 8ce255f..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/strcoll-Remove-incorrect-STRDIFF-based-optimization-.patch
+++ /dev/null
@@ -1,323 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
-
-From https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6c84109cfa26f35c3dfed3acb97d347361bd5849
-Author: Carlos O'Donell <carlos@systemhalted.org>
-Date:   Thu Oct 8 16:34:53 2015 -0400
-
-    strcoll: Remove incorrect STRDIFF-based optimization (Bug 18589).
-
-    The optimization introduced in commit
-    f13c2a8dff2329c6692a80176262ceaaf8a6f74e, causes regressions in
-    sorting for languages that have digraphs that change sort order, like
-    cs_CZ which sorts ch between h and i.
-
-    My analysis shows the fast-forwarding optimization in STRCOLL advances
-    through a digraph while possibly stopping in the middle which results
-    in a subsequent skipping of the digraph and incorrect sorting. The
-    optimization is incorrect as implemented and because of that I'm
-    removing it for 2.23, and I will also commit this fix for 2.22 where
-    it was originally introduced.
-
-    This patch reverts the optimization, introduces a new bug-strcoll2.c
-    regression test that tests both cs_CZ.UTF-8 and da_DK.ISO-8859-1 and
-    ensures they sort one digraph each correctly. The optimization can't be
-    applied without regressing this test.
-
-    Checked on x86_64, bug-strcoll2.c fails without this patch and passes
-    after. This will also get a fix on 2.22 which has the same bug.
-
-    (cherry picked from commit 87701a58e291bd7ac3b407d10a829dac52c9c16e)
----
- locale/C-collate.c           |  4 +-
- locale/categories.def        |  1 -
- locale/langinfo.h            |  1 -
- locale/localeinfo.h          |  7 ----
- locale/programs/ld-collate.c |  9 -----
- string/bug-strcoll2.c        | 95 ++++++++++++++++++++++++++++++++++++++++++++
- string/strcoll_l.c           | 39 +-----------------
- wcsmbs/wcscoll_l.c           |  1 -
- 8 files changed, 98 insertions(+), 59 deletions(-)
- create mode 100644 string/bug-strcoll2.c
-
-diff --git a/locale/C-collate.c b/locale/C-collate.c
-index d7f3c55..06dfdfa 100644
---- a/locale/C-collate.c
-+++ b/locale/C-collate.c
-@@ -144,8 +144,6 @@ const struct __locale_data _nl_C_LC_COLLATE attribute_hidden =
-     /* _NL_COLLATE_COLLSEQWC */
-     { .string = (const char *) collseqwc },
-     /* _NL_COLLATE_CODESET */
--    { .string = _nl_C_codeset },
--    /* _NL_COLLATE_ENCODING_TYPE */
--    { .word = __cet_8bit }
-+    { .string = _nl_C_codeset }
-   }
- };
-diff --git a/locale/categories.def b/locale/categories.def
-index 045489d..a8dda53 100644
---- a/locale/categories.def
-+++ b/locale/categories.def
-@@ -58,7 +58,6 @@ DEFINE_CATEGORY
-   DEFINE_ELEMENT (_NL_COLLATE_COLLSEQMB,        "collate-collseqmb",        std, wstring)
-   DEFINE_ELEMENT (_NL_COLLATE_COLLSEQWC,        "collate-collseqwc",        std, wstring)
-   DEFINE_ELEMENT (_NL_COLLATE_CODESET,		"collate-codeset",	    std, string)
--  DEFINE_ELEMENT (_NL_COLLATE_ENCODING_TYPE,   "collate-encoding-type",    std, word)
-   ), NO_POSTLOAD)
- 
- 
-diff --git a/locale/langinfo.h b/locale/langinfo.h
-index ffc5c7f..a565d9d 100644
---- a/locale/langinfo.h
-+++ b/locale/langinfo.h
-@@ -255,7 +255,6 @@ enum
-   _NL_COLLATE_COLLSEQMB,
-   _NL_COLLATE_COLLSEQWC,
-   _NL_COLLATE_CODESET,
--  _NL_COLLATE_ENCODING_TYPE,
-   _NL_NUM_LC_COLLATE,
- 
-   /* LC_CTYPE category: character classification.
-diff --git a/locale/localeinfo.h b/locale/localeinfo.h
-index a7516c0..c076d8e 100644
---- a/locale/localeinfo.h
-+++ b/locale/localeinfo.h
-@@ -110,13 +110,6 @@ enum coll_sort_rule
-   sort_mask
- };
- 
--/* Collation encoding type.  */
--enum collation_encoding_type
--{
--  __cet_other,
--  __cet_8bit,
--  __cet_utf8
--};
- 
- /* We can map the types of the entries into a few categories.  */
- enum value_type
-diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
-index 16e9039..3c88c6d 100644
---- a/locale/programs/ld-collate.c
-+++ b/locale/programs/ld-collate.c
-@@ -32,7 +32,6 @@
- #include "linereader.h"
- #include "locfile.h"
- #include "elem-hash.h"
--#include "../localeinfo.h"
- 
- /* Uncomment the following line in the production version.  */
- /* #define NDEBUG 1 */
-@@ -2130,8 +2129,6 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
- 	  /* The words have to be handled specially.  */
- 	  if (idx == _NL_ITEM_INDEX (_NL_COLLATE_SYMB_HASH_SIZEMB))
- 	    add_locale_uint32 (&file, 0);
--	  else if (idx == _NL_ITEM_INDEX (_NL_COLLATE_ENCODING_TYPE))
--	    add_locale_uint32 (&file, __cet_other);
- 	  else
- 	    add_locale_empty (&file);
- 	}
-@@ -2495,12 +2492,6 @@ collate_output (struct localedef_t *locale, const struct charmap_t *charmap,
-   add_locale_raw_data (&file, collate->mbseqorder, 256);
-   add_locale_collseq_table (&file, &collate->wcseqorder);
-   add_locale_string (&file, charmap->code_set_name);
--  if (strcmp (charmap->code_set_name, "UTF-8") == 0)
--    add_locale_uint32 (&file, __cet_utf8);
--  else if (charmap->mb_cur_max == 1)
--    add_locale_uint32 (&file, __cet_8bit);
--  else
--    add_locale_uint32 (&file, __cet_other);
-   write_locale_data (output_path, LC_COLLATE, "LC_COLLATE", &file);
- 
-   obstack_free (&weightpool, NULL);
-diff --git a/string/bug-strcoll2.c b/string/bug-strcoll2.c
-new file mode 100644
-index 0000000..950b090
---- /dev/null
-+++ b/string/bug-strcoll2.c
-@@ -0,0 +1,95 @@
-+/* Bug 18589: sort-test.sh fails at random.
-+ * Copyright (C) 1998-2015 Free Software Foundation, Inc.
-+ * This file is part of the GNU C Library.
-+ * Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
-+ *
-+ * The GNU C Library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * The GNU C Library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with the GNU C Library; if not, see
-+ * <http://www.gnu.org/licenses/>.  */
-+
-+#include <stdio.h>
-+#include <string.h>
-+#include <locale.h>
-+
-+/* An incorrect strcoll optimization resulted in incorrect
-+ *    results from strcoll for cs_CZ and da_DK.  */
-+
-+int
-+test_cs_CZ (void)
-+{
-+  const char t1[] = "config";
-+  const char t2[] = "choose";
-+  if (setlocale (LC_ALL, "cs_CZ.UTF-8") == NULL)
-+    {
-+      perror ("setlocale");
-+      return 1;
-+    }
-+  /* In Czech the digraph ch sorts after c, therefore we expect
-+ *      config to sort before choose.  */
-+  int a = strcoll (t1, t2);
-+  int b = strcoll (t2, t1);
-+  printf ("strcoll (\"%s\", \"%s\") = %d\n", t1, t2, a);
-+  printf ("strcoll (\"%s\", \"%s\") = %d\n", t2, t1, b);
-+  if (a < 0 && b > 0)
-+    {
-+      puts ("PASS: config < choose");
-+      return 0;
-+    }
-+  else
-+    {
-+      puts ("FAIL: Wrong sorting in cz_CZ.UTF-8.");
-+      return 1;
-+    }
-+}
-+
-+int
-+test_da_DK (void)
-+{
-+  const char t1[] = "AS";
-+  const char t2[] = "AA";
-+  if (setlocale (LC_ALL, "da_DK.ISO-8859-1") == NULL)
-+    {
-+      perror ("setlocale");
-+      return 1;
-+    }
-+  /* AA should be treated as the last letter of the Danish alphabet,
-+ *      hence sorting after AS.  */
-+  int a = strcoll (t1, t2);
-+  int b = strcoll (t2, t1);
-+  printf ("strcoll (\"%s\", \"%s\") = %d\n", t1, t2, a);
-+  printf ("strcoll (\"%s\", \"%s\") = %d\n", t2, t1, b);
-+  if (a < 0 && b > 0)
-+    {
-+      puts ("PASS: AS < AA");
-+      return 0;
-+    }
-+  else
-+    {
-+      puts ("FAIL: Wrong sorting in da_DK.ISO-8859-1");
-+      return 1;
-+    }
-+}
-+
-+static int
-+do_test (void)
-+{
-+  int err = 0;
-+  err |= test_cs_CZ ();
-+  err |= test_da_DK ();
-+  return err;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-+
-+
-diff --git a/string/strcoll_l.c b/string/strcoll_l.c
-index b36b18c..a18b65e 100644
---- a/string/strcoll_l.c
-+++ b/string/strcoll_l.c
-@@ -30,7 +30,6 @@
- # define STRING_TYPE char
- # define USTRING_TYPE unsigned char
- # define STRCOLL __strcoll_l
--# define STRDIFF __strdiff
- # define STRCMP strcmp
- # define WEIGHT_H "../locale/weight.h"
- # define SUFFIX	MB
-@@ -43,19 +42,6 @@
- #include "../locale/localeinfo.h"
- #include WEIGHT_H
- 
--#define MASK_UTF8_7BIT  (1 << 7)
--#define MASK_UTF8_START (3 << 6)
--
--size_t
--STRDIFF (const STRING_TYPE *s, const STRING_TYPE *t)
--{
--  size_t n;
--
--  for (n = 0; *s != '\0' && *s++ == *t++; ++n)
--    continue;
--
--  return n;
--}
- 
- /* Track status while looking for sequences in a string.  */
- typedef struct
-@@ -274,29 +260,9 @@ STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
-   const USTRING_TYPE *extra;
-   const int32_t *indirect;
- 
--  /* In case there is no locale specific sort order (C / POSIX).  */
-   if (nrules == 0)
-     return STRCMP (s1, s2);
- 
--  /* Fast forward to the position of the first difference.  Needs to be
--     encoding aware as the byte-by-byte comparison can stop in the middle
--     of a char sequence for multibyte encodings like UTF-8.  */
--  uint_fast32_t encoding =
--    current->values[_NL_ITEM_INDEX (_NL_COLLATE_ENCODING_TYPE)].word;
--  if (encoding != __cet_other)
--    {
--      size_t diff = STRDIFF (s1, s2);
--      if (diff > 0)
--	{
--	  if (encoding == __cet_utf8 && (*(s1 + diff) & MASK_UTF8_7BIT) != 0)
--	    do
--	      diff--;
--	    while (diff > 0 && (*(s1 + diff) & MASK_UTF8_START) != MASK_UTF8_START);
--	  s1 += diff;
--	  s2 += diff;
--	}
--    }
--
-   /* Catch empty strings.  */
-   if (__glibc_unlikely (*s1 == '\0') || __glibc_unlikely (*s2 == '\0'))
-     return (*s1 != '\0') - (*s2 != '\0');
-@@ -363,9 +329,8 @@ STRCOLL (const STRING_TYPE *s1, const STRING_TYPE *s2, __locale_t l)
- 		     byte-level comparison to ensure that we don't waste time
- 		     going through multiple passes for totally equal strings
- 		     before proceeding to subsequent passes.  */
--		  if (pass == 0 && encoding == __cet_other &&
--		      STRCMP (s1, s2) == 0)
--		    return result;
-+		  if (pass == 0 && STRCMP (s1, s2) == 0)
-+                    return result;
- 		  else
- 		    break;
- 	        }
-diff --git a/wcsmbs/wcscoll_l.c b/wcsmbs/wcscoll_l.c
-index 6d9384a..87f240d 100644
---- a/wcsmbs/wcscoll_l.c
-+++ b/wcsmbs/wcscoll_l.c
-@@ -23,7 +23,6 @@
- #define STRING_TYPE wchar_t
- #define USTRING_TYPE wint_t
- #define STRCOLL __wcscoll_l
--#define STRDIFF __wcsdiff
- #define STRCMP __wcscmp
- #define WEIGHT_H "../locale/weightwc.h"
- #define SUFFIX	WC
--- 
-1.8.4.2
-
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc/use_64bit_atomics.patch b/yocto-poky/meta/recipes-core/glibc/glibc/use_64bit_atomics.patch
deleted file mode 100644
index eb7f2b2..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc/use_64bit_atomics.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-This patch alows using 64 bit atomic instructions on a
-32 bit platform. This is safe, providing x86 is Pentium or
-later (would not work on i386, i486). Using 64 bit atomic 
-instructions bypasses code containing a bug as documented in
-https://bugzilla.yoctoproject.org/show_bug.cgi?id=8140
-
-Upstream-Status: TBD
-
-Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
-
-
-Index: libc/sysdeps/i386/i486/bits/atomic.h
-===================================================================
---- libc.orig/sysdeps/i386/i486/bits/atomic.h
-+++ libc/sysdeps/i386/i486/bits/atomic.h
-@@ -54,7 +54,7 @@ typedef uintmax_t uatomic_max_t;
- # endif
- #endif
- 
--#define __HAVE_64B_ATOMICS 0
-+#define __HAVE_64B_ATOMICS 1
- #define USE_ATOMIC_COMPILER_BUILTINS 0
- 
- 
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc_2.22.bb b/yocto-poky/meta/recipes-core/glibc/glibc_2.22.bb
deleted file mode 100644
index a13b7f9..0000000
--- a/yocto-poky/meta/recipes-core/glibc/glibc_2.22.bb
+++ /dev/null
@@ -1,145 +0,0 @@
-require glibc.inc
-
-LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
-      file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-      file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
-      file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS += "gperf-native kconfig-frontends-native"
-
-SRCREV ?= "a34d1c6afc86521d6ad17662a3b5362d8481514c"
-
-SRCBRANCH ?= "release/${PV}/master"
-
-GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
-
-SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
-           file://0004-Backport-https-sourceware.org-ml-libc-ports-2007-12-.patch \
-           file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
-           file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
-           file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
-           file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
-           file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
-           file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
-           file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
-           file://0012-Make-ld-version-output-matching-grok-gold-s-output.patch \
-           file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
-           file://0014-Add-unused-attribute.patch \
-           file://0015-When-disabling-SSE-also-make-sure-that-fpmath-is-not.patch \
-           file://0016-yes-within-the-path-sets-wrong-config-variables.patch \
-           file://0017-timezone-re-written-tzselect-as-posix-sh.patch \
-           file://0018-eglibc-Cross-building-and-testing-instructions.patch \
-           file://0019-eglibc-Bring-Eglibc-option-group-infrastructure-to-g.patch \
-           file://0020-eglibc-Help-bootstrap-cross-toolchain.patch \
-           file://0021-eglibc-cherry-picked-from-http-www.eglibc.org-archiv.patch \
-           file://0022-eglibc-Clear-cache-lines-on-ppc8xx.patch \
-           file://0023-eglibc-Resolve-__fpscr_values-on-SH4.patch \
-           file://0024-eglibc-Forward-port-eglibc-options-groups-support.patch \
-           file://0025-eglibc-Install-PIC-archives.patch \
-           file://0026-eglibc-dl_debug_mask-is-controlled-by-__OPTION_EGLIB.patch \
-           file://0027-eglibc-use-option-groups-Conditionally-exclude-c-tes.patch \
-           file://nscd-no-bash.patch \
-           file://strcoll-Remove-incorrect-STRDIFF-based-optimization-.patch \
-           file://0028-Clear-ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA-for-prel.patch \
-           file://CVE-2015-8777.patch \
-           file://CVE-2015-8779.patch \
-           file://CVE-2015-9761_1.patch \
-           file://CVE-2015-9761_2.patch \
-           file://CVE-2015-8776.patch \
-           file://CVE-2015-7547.patch \
-"
-
-SRC_URI += "\
-           file://etc/ld.so.conf \
-           file://generate-supported.mk \
-"
-
-SRC_URI_append_class-nativesdk = "\
-           file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
-           file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
-           file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
-           file://use_64bit_atomics.patch \
-"
-
-S = "${WORKDIR}/git"
-B = "${WORKDIR}/build-${TARGET_SYS}"
-
-PACKAGES_DYNAMIC = ""
-
-# the -isystem in bitbake.conf screws up glibc do_stage
-BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
-TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
-
-GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1"
-
-#
-# We will skip parsing glibc when target system C library selection is not glibc
-# this helps in easing out parsing for non-glibc system libraries
-#
-COMPATIBLE_HOST_libc-musl_class-target = "null"
-COMPATIBLE_HOST_libc-uclibc_class-target = "null"
-
-EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
-                --without-cvs --disable-profile \
-                --disable-debug --without-gd \
-                --enable-clocale=gnu \
-                --enable-add-ons \
-                --with-headers=${STAGING_INCDIR} \
-                --without-selinux \
-                --enable-obsolete-rpc \
-                --with-kconfig=${STAGING_BINDIR_NATIVE} \
-                ${GLIBC_EXTRA_OECONF}"
-
-EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
-
-
-do_patch_append() {
-    bb.build.exec_func('do_fix_readlib_c', d)
-}
-
-do_fix_readlib_c () {
-	sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
-}
-
-do_configure () {
-# override this function to avoid the autoconf/automake/aclocal/autoheader
-# calls for now
-# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
-# version check and doesn't really help with anything
-        (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
-        find ${S} -name "configure" | xargs touch
-        CPPFLAGS="" oe_runconf
-}
-
-rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
-	  yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
-	  rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
-
-do_compile () {
-	# -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
-	unset LDFLAGS
-	base_do_compile
-	(
-		cd ${S}/sunrpc/rpcsvc
-		for r in ${rpcsvc}; do
-			h=`echo $r|sed -e's,\.x$,.h,'`
-			rm -f $h
-			${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
-		done
-	)
-	echo "Adjust ldd script"
-	if [ -n "${RTLDLIST}" ]
-	then
-		prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
-		if [ "${prevrtld}" != "${RTLDLIST}" ]
-		then
-			sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
-		fi
-	fi
-
-}
-
-require glibc-package.inc
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-core/glibc/glibc_2.23.bb b/yocto-poky/meta/recipes-core/glibc/glibc_2.23.bb
new file mode 100644
index 0000000..18f4066
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/glibc/glibc_2.23.bb
@@ -0,0 +1,133 @@
+require glibc.inc
+
+LIC_FILES_CHKSUM = "file://LICENSES;md5=e9a558e243b36d3209f380deb394b213 \
+      file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+      file://posix/rxspencer/COPYRIGHT;md5=dc5485bb394a13b2332ec1c785f5d83a \
+      file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS += "gperf-native"
+
+SRCREV ?= "e742928c1592b43db6809db4f39e67be151cdd27"
+
+SRCBRANCH ?= "release/${PV}/master"
+
+GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
+
+SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \
+           file://0005-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \
+           file://0006-readlib-Add-OECORE_KNOWN_INTERPRETER_NAMES-to-known-.patch \
+           file://0007-ppc-sqrt-Fix-undefined-reference-to-__sqrt_finite.patch \
+           file://0008-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+           file://0009-Quote-from-bug-1443-which-explains-what-the-patch-do.patch \
+           file://0010-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
+           file://0011-__ieee754_sqrt-f-are-now-inline-functions-and-call-o.patch \
+           file://0012-Make-ld-version-output-matching-grok-gold-s-output.patch \
+           file://0013-sysdeps-gnu-configure.ac-handle-correctly-libc_cv_ro.patch \
+           file://0014-Add-unused-attribute.patch \
+           file://0015-yes-within-the-path-sets-wrong-config-variables.patch \
+           file://0016-timezone-re-written-tzselect-as-posix-sh.patch \
+           file://0017-Remove-bash-dependency-for-nscd-init-script.patch \
+           file://0018-eglibc-Cross-building-and-testing-instructions.patch \
+           file://0019-eglibc-Help-bootstrap-cross-toolchain.patch \
+           file://0020-eglibc-cherry-picked-from.patch \
+           file://0021-eglibc-Clear-cache-lines-on-ppc8xx.patch \
+           file://0022-eglibc-Resolve-__fpscr_values-on-SH4.patch \
+           file://0023-eglibc-Install-PIC-archives.patch \
+           file://0025-eglibc-Forward-port-cross-locale-generation-support.patch \
+           file://0026-When-disabling-SSE-make-sure-fpmath-is-not-set-to-us.patch \
+"
+
+SRC_URI += "\
+           file://etc/ld.so.conf \
+           file://generate-supported.mk \
+"
+
+SRC_URI_append_class-nativesdk = "\
+           file://0001-nativesdk-glibc-Look-for-host-system-ld.so.cache-as-.patch \
+           file://0002-nativesdk-glibc-Fix-buffer-overrun-with-a-relocated-.patch \
+           file://0003-nativesdk-glibc-Raise-the-size-of-arrays-containing-.patch \
+           file://0004-nativesdk-glibc-Allow-64-bit-atomics-for-x86.patch \
+"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+PACKAGES_DYNAMIC = ""
+
+# the -isystem in bitbake.conf screws up glibc do_stage
+BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}"
+TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
+
+GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1"
+
+#
+# We will skip parsing glibc when target system C library selection is not glibc
+# this helps in easing out parsing for non-glibc system libraries
+#
+COMPATIBLE_HOST_libc-musl_class-target = "null"
+COMPATIBLE_HOST_libc-uclibc_class-target = "null"
+
+EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
+                --without-cvs --disable-profile \
+                --disable-debug --without-gd \
+                --enable-clocale=gnu \
+                --enable-add-ons \
+                --with-headers=${STAGING_INCDIR} \
+                --without-selinux \
+                --enable-obsolete-rpc \
+                ${GLIBC_EXTRA_OECONF}"
+
+EXTRA_OECONF += "${@get_libc_fpu_setting(bb, d)}"
+EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-inet-anl', '--enable-nscd', '--disable-nscd', d)}"
+
+
+do_patch_append() {
+    bb.build.exec_func('do_fix_readlib_c', d)
+}
+
+do_fix_readlib_c () {
+	sed -i -e 's#OECORE_KNOWN_INTERPRETER_NAMES#${EGLIBC_KNOWN_INTERPRETER_NAMES}#' ${S}/elf/readlib.c
+}
+
+do_configure () {
+# override this function to avoid the autoconf/automake/aclocal/autoheader
+# calls for now
+# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
+# version check and doesn't really help with anything
+        (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+        find ${S} -name "configure" | xargs touch
+        CPPFLAGS="" oe_runconf
+}
+
+rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
+	  yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
+	  rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
+
+do_compile () {
+	# -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+	unset LDFLAGS
+	base_do_compile
+	(
+		cd ${S}/sunrpc/rpcsvc
+		for r in ${rpcsvc}; do
+			h=`echo $r|sed -e's,\.x$,.h,'`
+			rm -f $h
+			${B}/sunrpc/cross-rpcgen -h $r -o $h || bbwarn "${PN}: unable to generate header for $r"
+		done
+	)
+	echo "Adjust ldd script"
+	if [ -n "${RTLDLIST}" ]
+	then
+		prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST="\?\([^"]*\)"\?$#\1#'`
+		if [ "${prevrtld}" != "${RTLDLIST}" ]
+		then
+			sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
+		fi
+	fi
+
+}
+
+require glibc-package.inc
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch b/yocto-poky/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
index a9af110..f4e38d4 100644
--- a/yocto-poky/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
+++ b/yocto-poky/meta/recipes-core/glibc/ldconfig-native-2.12.1/add-64-bit-flag-for-ELF64-entries.patch
@@ -64,7 +64,7 @@
  #undef check_ptr
  #define check_ptr(ptr)						\
  do								\
-@@ -290,6 +295,35 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
+@@ -290,6 +295,48 @@ process_elf_file64 (const char *file_name, const char *lib, int *flag,
       libc5/libc6.  */
    *flag = FLAG_ELF;
  
@@ -73,23 +73,36 @@
 +  switch (elf_header->e_machine)
 +    {
 +    case EM_IA_64:
-+      *flag |= FLAG_IA64_LIB64;
++      /* Intel 64bit libraries are always libc.so.6+. */
++      /* see sysdeps/unix/sysv/linux/ia64/readelflib.c */
++      *flag |= FLAG_IA64_LIB64|FLAG_ELF_LIBC6;
 +      break;
 +    case EM_X86_64:
-+      *flag |= FLAG_X8664_LIB64;
++      /* X86-64 64bit libraries are always libc.so.6+. */
++      /* see sysdeps/unix/sysv/linux/i386/readelflib.c */
++      *flag |= FLAG_X8664_LIB64|FLAG_ELF_LIBC6;
 +      break;
 +    case EM_S390:
-+      *flag |= FLAG_S390_LIB64;
++      /* S/390 64bit libraries are always libc.so.6+. */
++      /* see sysdeps/unix/sysv/linux/s390/readelflib.c */
++      *flag |= FLAG_S390_LIB64|FLAG_ELF_LIBC6;
 +      break;
 +    case EM_PPC64:
-+      *flag |= FLAG_POWERPC_LIB64;
++      /* PowerPC 64bit libraries are always libc.so.6+. */
++      /* see sysdeps/unix/sysv/linux/powerpc/readelflib.c */
++      *flag |= FLAG_POWERPC_LIB64|FLAG_ELF_LIBC6;
 +      break;
 +    case EM_MIPS:
 +    case EM_MIPS_RS3_LE:
-+      *flag |= FLAG_MIPS64_LIBN64;
++      /* n64 libraries are always libc.so.6+. */
++      /* NOTE: This does not correctly distinguish NAN2008 binaries and is possibly broken */
++      /* see sysdeps/unix/sysv/linux/mips/readelflib.c */
++      *flag |= FLAG_MIPS64_LIBN64|FLAG_ELF_LIBC6;
 +      break;
 +    case EM_AARCH64:
-+      *flag |= FLAG_AARCH64_LIB64;
++      /* AArch64 libraries are always libc.so.6+. */
++      /* see sysdeps/unix/sysv/linux/arm/readelflib.c */
++      *flag |= FLAG_AARCH64_LIB64|FLAG_ELF_LIBC6;
 +      break;
 +    default:
 +      error(0, 0, "%s is a 64-bit ELF for unknown machine %lx\n",
diff --git a/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.7.48.1.bb b/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.7.48.1.bb
deleted file mode 100644
index 24eb87b..0000000
--- a/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.7.48.1.bb
+++ /dev/null
@@ -1,54 +0,0 @@
-SUMMARY = "ifupdown: basic ifup and ifdown used by initscripts"
-DESCRIPTION = "High level tools to configure network interfaces \
-This package provides the tools ifup and ifdown which may be used to \
-configure (or, respectively, deconfigure) network interfaces, based on \
-the file /etc/network/interfaces."
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/i/ifupdown/ifupdown_0.7.48.1ubuntu5.tar.gz \
-	   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 \
-	  "
-
-EXTRA_OEMAKE = ""
-
-# needed so we don't get default S="${WORKDIR}/ifupdown-${PV}"
-S = "${WORKDIR}/ifupdown-${PV}ubuntu5"
-
-
-inherit update-rc.d update-alternatives
-
-do_compile () {
-	chmod a+rx *.pl *.sh
-	oe_runmake 'CC=${CC}' "CFLAGS=${CFLAGS} -Wall -W -D'IFUPDOWN_VERSION=\"${PV}\"'"
-}
-
-do_install () {
-	install -d ${D}${mandir}/man8 \
-		  ${D}${mandir}/man5 \
-		  ${D}${base_sbindir}
-
-	# If volatiles are used, then we'll also need /run/network there too.
-	install -d ${D}/etc/default/volatiles
-	install -m 0644 ${WORKDIR}/99_network ${D}/etc/default/volatiles
-
-	install -m 0755 ifup ${D}${base_sbindir}/
-	ln ${D}${base_sbindir}/ifup ${D}${base_sbindir}/ifdown
-	install -m 0644 ifup.8 ${D}${mandir}/man8
-	install -m 0644 interfaces.5 ${D}${mandir}/man5
-	cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8
-}
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "ifup ifdown"
-
-ALTERNATIVE_LINK_NAME[ifup] = "${base_sbindir}/ifup"
-ALTERNATIVE_LINK_NAME[ifdown] = "${base_sbindir}/ifdown"
-
-INITSCRIPT_NAME = "ifup"
-INITSCRIPT_PARAMS = "start 39 S . stop 39 0 6 1 ."
-
-SRC_URI[md5sum] = "85ba375f3c6f26d34efb2a8575e77fc8"
-SRC_URI[sha256sum] = "08dce14692c07b72b583b86c4d3ace0d9dac1928925144cc3ddde15b694ebbdf"
diff --git a/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb b/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb
new file mode 100644
index 0000000..732b295
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/ifupdown/ifupdown_0.8.2.bb
@@ -0,0 +1,51 @@
+SUMMARY = "ifupdown: basic ifup and ifdown used by initscripts"
+DESCRIPTION = "High level tools to configure network interfaces \
+This package provides the tools ifup and ifdown which may be used to \
+configure (or, respectively, deconfigure) network interfaces, based on \
+the file /etc/network/interfaces."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SRC_URI = "git://anonscm.debian.org/git/collab-maint/ifupdown.git;protocol=https \
+	   file://defn2-c-man-don-t-rely-on-dpkg-architecture-to-set-a.patch \
+	   file://inet-6-.defn-fix-inverted-checks-for-loopback.patch \
+	   file://99_network \
+	  "
+SRCREV = "05ea2fd4f49bb1201aeef2a42efbcff8f336112f"
+
+EXTRA_OEMAKE = ""
+
+S = "${WORKDIR}/git"
+
+
+inherit update-rc.d update-alternatives
+
+do_compile () {
+	chmod a+rx *.pl *.sh
+	oe_runmake 'CC=${CC}' "CFLAGS=${CFLAGS} -Wall -W -D'IFUPDOWN_VERSION=\"${PV}\"'"
+}
+
+do_install () {
+	install -d ${D}${mandir}/man8 \
+		  ${D}${mandir}/man5 \
+		  ${D}${base_sbindir}
+
+	# If volatiles are used, then we'll also need /run/network there too.
+	install -d ${D}/etc/default/volatiles
+	install -m 0644 ${WORKDIR}/99_network ${D}/etc/default/volatiles
+
+	install -m 0755 ifup ${D}${base_sbindir}/
+	ln ${D}${base_sbindir}/ifup ${D}${base_sbindir}/ifdown
+	install -m 0644 ifup.8 ${D}${mandir}/man8
+	install -m 0644 interfaces.5 ${D}${mandir}/man5
+	cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8
+}
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "ifup ifdown"
+
+ALTERNATIVE_LINK_NAME[ifup] = "${base_sbindir}/ifup"
+ALTERNATIVE_LINK_NAME[ifdown] = "${base_sbindir}/ifdown"
+
+INITSCRIPT_NAME = "ifup"
+INITSCRIPT_PARAMS = "start 39 S . stop 39 0 6 1 ."
diff --git a/yocto-poky/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt b/yocto-poky/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt
new file mode 100644
index 0000000..e7298f2
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/images/build-appliance-image/README_VirtualBox_Guest_Additions.txt
@@ -0,0 +1,75 @@
+
+Installing VirtualBox Guest Additions
+=====================================
+
+In order to use VirtualBox guest additions, they have to be build
+first. They may have to be rebuilt each time the time you upgrade to
+a new version of VirtualBox.
+
+Make sure VM is configured with an Optical Drive. 
+
+Please follow these steps to install the VirtualBox Guest Additions on the
+Build Appliance VM:
+
+1.  Boot VM, select root "Terminal" instead of the default "Terminal <2>"
+
+2.  Insert Guest additions CD into VM optical drive:
+    VM menu "Devices"->"Optical Drives"-> Select "VBoxGuestAdditions<version>.iso"
+
+3.  Find your CDROM device. Typically it is /dev/hda for IDE. You can determine
+    the actual name <cdromedev> by viewing the cdrom info:
+
+        # cat /proc/sys/dev/cdrom/info
+
+    Mount the cdrom drive:
+        # mount -t iso9660 <cdromdev> /media/cdrom
+    i.e.:
+        # mount -t iso9660 /dev/hda /media/cdrom
+
+4. Build the additions:
+
+    First, we need to build of some prerequisite utilities.
+    (This is only needed to be done once)
+
+        # cd /lib/modules/<kernel-version>-yocto-standard/build
+        # make scripts
+
+    Now build the guest additions:
+
+        # /media/cdrom/VBoxLinuxAdditions.run --nox11
+
+    At this point, providing there were no build errors, the guest additions are 
+    built and installed.
+
+5. Check if vbox additions running:
+
+        # /etc/init.d/vboxadd status
+
+    If not running, try manually starting:
+
+        # /etc/init.d/vboxadd start
+
+6. Check if additons actually work, in particular folder sharing.
+
+    Host: Devices->Shared Folders->Shared Folder Settings...
+        Add any host folder and name it (i.e. "images")
+
+    Guest VM: create mount point for the shared folder, i.e.:
+
+        # mkdir ~/my-host
+
+    Mount the shared folder: (Watch out for spelling: it's vboxsf NOT vboxfs)
+
+        # mount -t vboxsf images ~/my-host
+
+    Verify mount, should see the contents of the shared folder:
+
+        # ls ~/my-host
+
+
+
+
+
+
+
+
diff --git a/yocto-poky/meta/recipes-core/images/build-appliance-image_12.0.1.bb b/yocto-poky/meta/recipes-core/images/build-appliance-image_12.0.1.bb
deleted file mode 100644
index fdeadb6..0000000
--- a/yocto-poky/meta/recipes-core/images/build-appliance-image_12.0.1.bb
+++ /dev/null
@@ -1,93 +0,0 @@
-SUMMARY = "An image containing the build system itself"
-DESCRIPTION = "An image containing the build system that you can boot and run using either VMware Player or VMware Workstation."
-HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
-                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted"
-
-IMAGE_FEATURES += "x11-base package-management splash"
-
-# Ensure there's enough space to do a core-image-sato build, with rm_work enabled
-IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
-
-# Do a quiet boot with limited console messages
-APPEND += "rootfstype=ext4 quiet"
-
-DEPENDS = "zip-native"
-IMAGE_FSTYPES = "vmdk"
-
-inherit core-image
-
-SRCREV ?= "7fe17a2942ff03e2ec47d566fd5393f52b2eb736"
-SRC_URI = "git://git.yoctoproject.org/poky;branch=jethro \
-           file://Yocto_Build_Appliance.vmx \
-           file://Yocto_Build_Appliance.vmxf \
-          "
-
-IMAGE_CMD_ext4_append () {
-	# We don't need to reserve much space for root, 0.5% is more than enough
-	tune2fs -m 0.5 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4
-}
-
-fakeroot do_populate_poky_src () {
-	# Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
-	# will become invalid in the target.
-	rm -rf ${WORKDIR}/git/.git
-	rm -f ${WORKDIR}/git/.gitignore
-
-	cp -Rp ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
-
-	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
-	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
-	cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/
-
-	# Remove the git2_* tarballs -- this is ok since we still have the git2/.
-	rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
-
-	echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
-	echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
-	mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
-	echo "export PSEUDO_PREFIX=/usr" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
-	echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
-	echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
-
-	chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
-
-	chown -R builder.builder  ${IMAGE_ROOTFS}/home/builder/poky
-
-	# Allow builder to use sudo to setup tap/tun
-	echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
-
-	# Use Clearlooks GTK+ theme
-	mkdir -p ${IMAGE_ROOTFS}/etc/gtk-2.0
-	echo 'gtk-theme-name = "Clearlooks"' > ${IMAGE_ROOTFS}/etc/gtk-2.0/gtkrc
-}
-
-IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
-
-addtask rootfs after do_unpack
-
-python () {
-	# Ensure we run these usually noexec tasks
-	d.delVarFlag("do_fetch", "noexec")
-	d.delVarFlag("do_unpack", "noexec")
-}
-
-create_bundle_files () {
-	cd ${WORKDIR}
-	mkdir -p Yocto_Build_Appliance
-	cp *.vmx* Yocto_Build_Appliance
-	ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
-	zip -r ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
-	ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance.zip 
-}
-
-python do_bundle_files() {
-    bb.build.exec_func('create_bundle_files', d)
-}
-
-addtask bundle_files after do_vmimg before do_build
-do_bundle_files[nostamp] = "1"
diff --git a/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb b/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb
new file mode 100644
index 0000000..bdcb921
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/images/build-appliance-image_14.0.0.bb
@@ -0,0 +1,120 @@
+SUMMARY = "An image containing the build system itself"
+DESCRIPTION = "An image containing the build system that you can boot and run using either VMware Player or VMware Workstation."
+HOMEPAGE = "http://www.yoctoproject.org/documentation/build-appliance"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-openssh packagegroup-self-hosted kernel-dev kernel-devsrc "
+
+IMAGE_FEATURES += "x11-base package-management splash"
+
+# Ensure there's enough space to do a core-image-sato build, with rm_work enabled
+IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
+
+# Do a quiet boot with limited console messages
+APPEND += "rootfstype=ext4 quiet"
+
+DEPENDS = "zip-native"
+IMAGE_FSTYPES = "vmdk"
+
+inherit core-image module-base
+
+SRCREV ?= "5f84d6545e6d7a2be8e603a1f4b1afae0dad0a9b"
+SRC_URI = "git://git.yoctoproject.org/poky;branch=krogoth \
+           file://Yocto_Build_Appliance.vmx \
+           file://Yocto_Build_Appliance.vmxf \
+           file://README_VirtualBox_Guest_Additions.txt \
+          "
+BA_INCLUDE_SOURCES ??= "0"
+
+IMAGE_CMD_ext4_append () {
+	# We don't need to reserve much space for root, 0.5% is more than enough
+	tune2fs -m 0.5 ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext4
+}
+
+fakeroot do_populate_poky_src () {
+	# Because fetch2's git's unpack uses -s cloneflag, the unpacked git repo
+	# will become invalid in the target.
+	rm -rf ${WORKDIR}/git/.git
+	rm -f ${WORKDIR}/git/.gitignore
+
+	cp -R ${WORKDIR}/git ${IMAGE_ROOTFS}/home/builder/poky
+
+	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/conf
+	mkdir -p ${IMAGE_ROOTFS}/home/builder/poky/build/downloads
+	if [ ${BA_INCLUDE_SOURCES} != 0 ]; then
+		cp -RpL ${DL_DIR}/* ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/
+		# Remove the git2_* tarballs -- this is ok since we still have the git2/.
+		rm -rf ${IMAGE_ROOTFS}/home/builder/poky/build/downloads/git2_*
+	fi
+
+	# Place the README_VirtualBox_Guest_Additions file in builders home folder.
+	cp ${WORKDIR}/README_VirtualBox_Guest_Additions.txt ${IMAGE_ROOTFS}/home/builder/
+
+	# Create a symlink, needed for out-of-tree kernel modules build
+	ln -snr ${IMAGE_ROOTFS}/usr/src/kernel ${IMAGE_ROOTFS}/lib/modules/${KERNEL_VERSION}/build
+
+	echo "/usr/bin" > ${IMAGE_ROOTFS}/home/builder/poky/build/pseudodone
+	echo "INHERIT += \"rm_work\"" >> ${IMAGE_ROOTFS}/home/builder/poky/build/conf/auto.conf
+	mkdir -p ${IMAGE_ROOTFS}/home/builder/pseudo
+	echo "export PSEUDO_PREFIX=/usr" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+
+	# Also save (for reference only) the actual SRCREV used to create this image
+	echo "export BA_SRCREV=${SRCREV}" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "# If working behind a proxy and using the provided oe-git-proxy script" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "# you need to set ALL_PROXY based on your proxy settings." >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "# Example ALL_PROXY values:" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "# export ALL_PROXY=https://proxy.example.com:8080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+	echo "# export ALL_PROXY=socks://socks.example.com:1080" >> ${IMAGE_ROOTFS}/home/builder/.bashrc
+
+	chown builder.builder ${IMAGE_ROOTFS}/home/builder/pseudo
+
+	chown -R builder.builder ${IMAGE_ROOTFS}/home/builder/poky
+	chmod -R ug+rw ${IMAGE_ROOTFS}/home/builder/poky
+
+	# Assume we will need CDROM to install guest additions
+	mkdir -p ${IMAGE_ROOTFS}/media/cdrom
+
+	# Allow builder to use sudo
+	echo "builder ALL=(ALL) NOPASSWD: ALL" >> ${IMAGE_ROOTFS}/etc/sudoers
+
+	# Load tap/tun at startup
+	ln -sr ${IMAGE_ROOTFS}/usr/sbin/iptables ${IMAGE_ROOTFS}/sbin/iptables
+	echo "tun" >> ${IMAGE_ROOTFS}/etc/modules
+
+	# Use Clearlooks GTK+ theme
+	mkdir -p ${IMAGE_ROOTFS}/etc/gtk-2.0
+	echo 'gtk-theme-name = "Clearlooks"' > ${IMAGE_ROOTFS}/etc/gtk-2.0/gtkrc
+}
+
+IMAGE_PREPROCESS_COMMAND += "do_populate_poky_src; "
+
+addtask rootfs after do_unpack
+
+python () {
+	# Ensure we run these usually noexec tasks
+	d.delVarFlag("do_fetch", "noexec")
+	d.delVarFlag("do_unpack", "noexec")
+}
+
+create_bundle_files () {
+	cd ${WORKDIR}
+	mkdir -p Yocto_Build_Appliance
+	cp *.vmx* Yocto_Build_Appliance
+	ln -sf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.vmdk Yocto_Build_Appliance/Yocto_Build_Appliance.vmdk
+	zip -r ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance-${DATETIME}.zip Yocto_Build_Appliance
+	ln -sf Yocto_Build_Appliance-${DATETIME}.zip ${DEPLOY_DIR_IMAGE}/Yocto_Build_Appliance.zip 
+}
+create_bundle_files[vardepsexclude] = "DATETIME"
+
+python do_bundle_files() {
+    bb.build.exec_func('create_bundle_files', d)
+}
+
+addtask bundle_files after do_vmimg before do_build
+do_bundle_files[nostamp] = "1"
diff --git a/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb b/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
index 1f0fa95..8d7c0d2 100644
--- a/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
+++ b/yocto-poky/meta/recipes-core/images/core-image-minimal-initramfs.bb
@@ -3,7 +3,7 @@
 the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
 first 'init' program more efficiently."
 
-PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi busybox udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
+PACKAGE_INSTALL = "initramfs-live-boot initramfs-live-install initramfs-live-install-efi ${VIRTUAL-RUNTIME_base-utils} udev base-passwd ${ROOTFS_BOOTSTRAP_INSTALL}"
 
 # Do not pollute the initrd image with rootfs features
 IMAGE_FEATURES = ""
@@ -17,5 +17,6 @@
 inherit core-image
 
 IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
 
 BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh b/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
index 7a0b4d4..b562109 100644
--- a/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
+++ b/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh
@@ -69,7 +69,7 @@
 mkdir -p /tmp
 cat /proc/mounts > /etc/mtab
 
-disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
+disk_size=$(parted /dev/${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
 
 testfs_size=$((disk_size*testfs_ratio/100))
 rootfs_size=$((disk_size-boot_size-testfs_size))
diff --git a/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 0443a9d..d58826a 100644
--- a/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/yocto-poky/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -120,7 +120,7 @@
     cat /proc/mounts > /etc/mtab
 fi
 
-disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
+disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
 
 swap_size=$((disk_size*swap_ratio/100))
 rootfs_size=$((disk_size-boot_size-swap_size))
@@ -217,7 +217,7 @@
     # Delete any LABEL= strings
     sed -i "s/ LABEL=[^ ]*/ /" $GRUBCFG
     # Delete any root= strings
-    sed -i "s/ root=[^ ]*/ /" $GRUBCFG
+    sed -i "s/ root=[^ ]*/ /g" $GRUBCFG
     # Add the root= and other standard boot options
     sed -i "s@linux /vmlinuz *@linux /vmlinuz root=PARTUUID=$root_part_uuid rw $rootwait quiet @" $GRUBCFG
 fi
diff --git a/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh b/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
index f9e9768..c5623ee 100644
--- a/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/yocto-poky/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -116,7 +116,7 @@
     cat /proc/mounts > /etc/mtab
 fi
 
-disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
+disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
 
 grub_version=$(grub-install -v|sed 's/.* \([0-9]\).*/\1/')
 
@@ -141,7 +141,7 @@
 # 2) they are detected asynchronously (need rootwait)
 rootwait=""
 part_prefix=""
-if [ ! "${device#mmcblk}" = "${device}" ]; then
+if [ ! "${device#/dev/mmcblk}" = "${device}" ]; then
     part_prefix="p"
     rootwait="rootwait"
 fi
@@ -211,13 +211,13 @@
 cp -a /src_root/* /tgt_root
 if [ -d /tgt_root/etc/ ] ; then
     if [ $grub_version -ne 0 ] ; then
-        boot_uuid=$(blkid -o value -s UUID ${device}2)
-        swap_part_uuid=$(blkid -o value -s PARTUUID ${device}4)
+        boot_uuid=$(blkid -o value -s UUID ${bootfs})
+        swap_part_uuid=$(blkid -o value -s PARTUUID ${swap})
         bootdev="UUID=$boot_uuid"
         swapdev=/dev/disk/by-partuuid/$swap_part_uuid
     else
-        bootdev=${device}2
-        swapdev=${device}4
+        bootdev=${bootfs}
+        swapdev=${swap}
     fi
     echo "$swapdev                swap             swap       defaults              0  0" >> /tgt_root/etc/fstab
     echo "$bootdev              /boot            ext3       defaults              1  2" >> /tgt_root/etc/fstab
@@ -234,8 +234,8 @@
 echo "Preparing boot partition..."
 if [ -f /etc/grub.d/00_header -a $grub_version -ne 0 ] ; then
     echo "Preparing custom grub2 menu..."
-    root_part_uuid=$(blkid -o value -s PARTUUID ${device}3)
-    boot_uuid=$(blkid -o value -s UUID ${device}2)
+    root_part_uuid=$(blkid -o value -s PARTUUID ${rootfs})
+    boot_uuid=$(blkid -o value -s UUID ${bootfs})
     GRUBCFG="/boot/grub/grub.cfg"
     mkdir -p $(dirname $GRUBCFG)
     cat >$GRUBCFG <<_EOF
diff --git a/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh b/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh
index d852c57..09fb479 100644
--- a/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/yocto-poky/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -2,7 +2,7 @@
 
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
-ROOT_MOUNT="/rootfs/"
+ROOT_MOUNT="/rootfs"
 ROOT_IMAGE="rootfs.img"
 MOUNT="/bin/mount"
 UMOUNT="/bin/umount"
@@ -169,8 +169,8 @@
 
     # determine which unification filesystem to use
     union_fs_type=""
-    if grep -q -w "overlayfs" /proc/filesystems; then
-	union_fs_type="overlayfs"
+    if grep -q -w "overlay" /proc/filesystems; then
+	union_fs_type="overlay"
     elif grep -q -w "aufs" /proc/filesystems; then
 	union_fs_type="aufs"
     else
@@ -179,14 +179,15 @@
 
     # make a union mount if possible
     case $union_fs_type in
-	"overlayfs")
+	"overlay")
 	    mkdir -p /rootfs.ro /rootfs.rw
 	    if ! mount -n --move $ROOT_MOUNT /rootfs.ro; then
 		rm -rf /rootfs.ro /rootfs.rw
 		fatal "Could not move rootfs mount point"
 	    else
 		mount -t tmpfs -o rw,noatime,mode=755 tmpfs /rootfs.rw
-		mount -t overlayfs -o "lowerdir=/rootfs.ro,upperdir=/rootfs.rw" overlayfs $ROOT_MOUNT
+		mkdir -p /rootfs.rw/upperdir /rootfs.rw/work
+		mount -t overlay overlay -o "lowerdir=/rootfs.ro,upperdir=/rootfs.rw/upperdir,workdir=/rootfs.rw/work" $ROOT_MOUNT
 		mkdir -p $ROOT_MOUNT/rootfs.ro $ROOT_MOUNT/rootfs.rw
 		mount --move /rootfs.ro $ROOT_MOUNT/rootfs.ro
 		mount --move /rootfs.rw $ROOT_MOUNT/rootfs.rw
@@ -214,11 +215,7 @@
     boot_live_root
 }
 
-case $label in
-    boot)
-	mount_and_boot
-	;;
-    install|install-efi)
+if [ "$label" != "boot" -a -f $label.sh ] ; then
 	if [ -f /run/media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then
 	    ./$label.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode $console_params
 	else
@@ -226,10 +223,8 @@
 	fi
 
 	# If we're getting here, we failed...
-	fatal "Installation image failed"
-	;;
-    *)
-	# Not sure what boot label is provided.  Try to boot to avoid locking up.
-	mount_and_boot
-	;;
-esac
+	fatal "Target $label failed"
+fi
+
+mount_and_boot
+
diff --git a/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/udev b/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/udev
index bb462dc..79c8867 100644
--- a/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/udev
+++ b/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework/udev
@@ -38,6 +38,7 @@
 	add_module_pre_hook "udev_shutdown_hook_handler"
 
 	mkdir -p /run
+	mkdir -p /var/run
 
 	$_UDEV_DAEMON --daemon
 	udevadm trigger --action=add
diff --git a/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 6c37b9a..0664a95 100644
--- a/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/yocto-poky/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -1,7 +1,7 @@
 SUMMARY = "Modular initramfs system"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-RDEPENDS_${PN} += "busybox"
+RDEPENDS_${PN} += "${VIRTUAL-RUNTIME_base-utils}"
 
 PR = "r2"
 
diff --git a/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index 904037e..ce4622a 100755
--- a/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -163,6 +163,16 @@
 			continue
 		}
 
+		[ "${TTYPE}" = "b" ] && {
+			TSOURCE="$TLTARGET"
+			[ "${VERBOSE}" != "no" ] && echo "Creating mount-bind -${TNAME}- from -${TSOURCE}-."
+			mount --bind "${TSOURCE}" "${TNAME}"
+			EXEC="
+	mount --bind \"${TSOURCE}\" \"${TNAME}\""
+			test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
+			continue
+		}
+
 		[ -L "${TNAME}" ] && {
 			[ "${VERBOSE}" != "no" ] && echo "Found link."
 			NEWNAME=`ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/'`
diff --git a/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh b/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
index b038fc5..1632a5f 100644
--- a/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
+++ b/yocto-poky/meta/recipes-core/initscripts/initscripts-1.0/save-rtc.sh
@@ -10,4 +10,4 @@
 ### END INIT INFO
 
 # Update the timestamp
-date -u +%4Y%2m%2d%2H%2M%2S > /etc/timestamp
+date -u +%4Y%2m%2d%2H%2M%2S 2>/dev/null > /etc/timestamp
diff --git a/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb b/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb
index f90de6e..148491f 100644
--- a/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/yocto-poky/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -123,7 +123,7 @@
 #
 	update-rc.d -r ${D} rmnologin.sh start 99 2 3 4 5 .
 	update-rc.d -r ${D} sendsigs start 20 0 6 .
-	update-rc.d -r ${D} urandom start 30 S 0 6 .
+	update-rc.d -r ${D} urandom start 38 S 0 6 .
 	update-rc.d -r ${D} umountnfs.sh start 31 0 1 6 .
 	update-rc.d -r ${D} umountfs start 40 0 6 .
 	update-rc.d -r ${D} reboot start 90 6 .
diff --git a/yocto-poky/meta/recipes-core/jpeg/jpeg_9a.bb b/yocto-poky/meta/recipes-core/jpeg/jpeg_9a.bb
deleted file mode 100644
index ea2e65d..0000000
--- a/yocto-poky/meta/recipes-core/jpeg/jpeg_9a.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "libjpeg is a library for handling the JPEG (JFIF) image format"
-DESCRIPTION = "libjpeg contains a library for handling the JPEG (JFIF) image format, as well as related programs for accessing the libjpeg functions."
-HOMEPAGE = "http://www.ijg.org/"
-
-LICENSE ="BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://README;md5=ea93a8a2fed10106b63bc21679edacb9"
-
-SECTION = "libs"
-
-SRC_URI = "http://www.ijg.org/files/jpegsrc.v${PV}.tar.gz \
-	  "
-
-SRC_URI[md5sum] = "3353992aecaee1805ef4109aadd433e7"
-SRC_URI[sha256sum] = "3a753ea48d917945dd54a2d97de388aa06ca2eb1066cbfdc6652036349fe05a7"
-
-inherit autotools
-
-PACKAGES =+ 		"jpeg-tools "
-DESCRIPTION_jpeg-tools = "The jpeg-tools package includes the client programs for access libjpeg functionality.  These tools allow for the compression, decompression, transformation and display of JPEG files."
-FILES_jpeg-tools = 	"${bindir}/*"
-
-BBCLASSEXTEND = "native"
-
-pkg_postinst_${PN}_linuxstdbase () {
-    if [ ! -e $D${libdir}/libjpeg.so.62 ]; then
-        JPEG=`find $D${libdir} -type f -name libjpeg.so.\*.\*.\*`
-        ln -sf `basename $JPEG` $D${libdir}/libjpeg.so.62
-    fi
-}
diff --git a/yocto-poky/meta/recipes-core/kbd/kbd/0003-Only-inluclude-kernel-headers-with-glibc.patch b/yocto-poky/meta/recipes-core/kbd/kbd/0003-Only-inluclude-kernel-headers-with-glibc.patch
deleted file mode 100644
index 8bfcb0c..0000000
--- a/yocto-poky/meta/recipes-core/kbd/kbd/0003-Only-inluclude-kernel-headers-with-glibc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3c5c7acc7ef874b919b26583d3892e21b907833f Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Wed, 20 Aug 2014 09:00:03 +0200
-Subject: [PATCH 3/4] Only inluclude kernel headers with glibc
-
-This fixes compile errors with musl libc
-
-Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
-Upstream-Status: Pending
----
- src/resizecons.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/resizecons.c b/src/resizecons.c
-index 5f84845..691dfcc 100644
---- a/src/resizecons.c
-+++ b/src/resizecons.c
-@@ -80,7 +80,7 @@
- #include <sys/ioctl.h>
- #if (__GNU_LIBRARY__ >= 6)
- #include <sys/perm.h>
--#else
-+#elif defined(__GLIBC__)
- #include <linux/types.h>
- #include <linux/termios.h>
- #endif
--- 
-2.1.0
-
diff --git a/yocto-poky/meta/recipes-core/kbd/kbd/uclibc-stdarg.patch b/yocto-poky/meta/recipes-core/kbd/kbd/uclibc-stdarg.patch
deleted file mode 100644
index be7f324..0000000
--- a/yocto-poky/meta/recipes-core/kbd/kbd/uclibc-stdarg.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-In file included from keymap.h:5:0,
-                 from ksyms.c:6:
-./keymap/common.h:65:38: error: unknown type name 'va_list'
-                  const char *format, va_list args),
-                                      ^
-./keymap/common.h:66:3: error: expected ';', ',' or ')' before 'const'
-   const void *data);
-   ^
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: kbd-2.0.0/src/libkeymap/contextP.h
-===================================================================
---- kbd-2.0.0.orig/src/libkeymap/contextP.h	2013-08-13 06:46:23.000000000 -0700
-+++ kbd-2.0.0/src/libkeymap/contextP.h	2013-11-05 22:33:49.200528226 -0800
-@@ -2,7 +2,7 @@
- #define LK_CONTEXTP_H
- 
- #include "keymap.h"
--
-+#include <stdarg.h>
- /**
-  * @brief Copy of struct kbdiacruc.
-  */
-Index: kbd-2.0.0/src/libkeymap/keymap/common.h
-===================================================================
---- kbd-2.0.0.orig/src/libkeymap/keymap/common.h	2013-08-13 06:46:23.000000000 -0700
-+++ kbd-2.0.0/src/libkeymap/keymap/common.h	2013-11-05 22:33:59.964528438 -0800
-@@ -6,6 +6,7 @@
-  */
- 
- #include <keymap/context.h>
-+#include <stdarg.h>
- 
- /** Initializes the structures necessary to read and/or parse keymap.
-  *
diff --git a/yocto-poky/meta/recipes-core/kbd/kbd_2.0.2.bb b/yocto-poky/meta/recipes-core/kbd/kbd_2.0.2.bb
deleted file mode 100644
index 49bb6c9..0000000
--- a/yocto-poky/meta/recipes-core/kbd/kbd_2.0.2.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Keytable files and keyboard utilities"
-# everything minus console-fonts is GPLv2+
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a5fcc36121d93e1f69d96a313078c8b5"
-DEPENDS = "libcheck"
-
-inherit autotools gettext ptest pkgconfig
-
-RREPLACES_${PN} = "console-tools"
-RPROVIDES_${PN} = "console-tools"
-RCONFLICTS_${PN} = "console-tools"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
-           file://uclibc-stdarg.patch \
-	   file://0003-Only-inluclude-kernel-headers-with-glibc.patch \
-          "
-
-SRC_URI[md5sum] = "87475eb78b1d6e6ab06686dd323ad4ba"
-SRC_URI[sha256sum] = "9dfddabf96012e329c4bebb96a21aeef7c3872f624e96e8156ba542b82aeb912"
-
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
-PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
-
-PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
-
-FILES_${PN}-consolefonts = "${datadir}/consolefonts"
-FILES_${PN}-consoletrans = "${datadir}/consoletrans"
-FILES_${PN}-keymaps = "${datadir}/keymaps"
-FILES_${PN}-unimaps = "${datadir}/unimaps"
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt"
-ALTERNATIVE_PRIORITY = "100"
-
-BBCLASSEXTEND = "native"
-PARALLEL_MAKEINST = ""
diff --git a/yocto-poky/meta/recipes-core/kbd/kbd_2.0.3.bb b/yocto-poky/meta/recipes-core/kbd/kbd_2.0.3.bb
new file mode 100644
index 0000000..858dc05
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/kbd/kbd_2.0.3.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Keytable files and keyboard utilities"
+# everything minus console-fonts is GPLv2+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a5fcc36121d93e1f69d96a313078c8b5"
+DEPENDS = "libcheck"
+
+inherit autotools gettext ptest pkgconfig
+
+RREPLACES_${PN} = "console-tools"
+RPROVIDES_${PN} = "console-tools"
+RCONFLICTS_${PN} = "console-tools"
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/${BP}.tar.xz \
+          "
+
+SRC_URI[md5sum] = "231b46e7142eb41ea3ae06d2ded3c208"
+SRC_URI[sha256sum] = "7a899de1c0eb75f3aea737095a736f2375e1cbfbe693fc14a3fe0bfb4649fb5e"
+
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+PACKAGECONFIG[pam] = "--enable-vlock, --disable-vlock, libpam,"
+
+PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
+
+FILES_${PN}-consolefonts = "${datadir}/consolefonts"
+FILES_${PN}-consoletrans = "${datadir}/consoletrans"
+FILES_${PN}-keymaps = "${datadir}/keymaps"
+FILES_${PN}-unimaps = "${datadir}/unimaps"
+
+inherit update-alternatives
+
+ALTERNATIVE_${PN} = "chvt deallocvt fgconsole openvt"
+ALTERNATIVE_PRIORITY = "100"
+
+BBCLASSEXTEND = "native"
+PARALLEL_MAKEINST = ""
diff --git a/yocto-poky/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch b/yocto-poky/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch
new file mode 100644
index 0000000..65f4ef9
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch
@@ -0,0 +1,235 @@
+commit ca780b4f7f71abeeb04a585f2a4d889caaa985fa
+Author: Isaac Dunham <ibid.ag@gmail.com>
+Date:   Fri Sep 5 22:35:32 2014 -0700
+
+    Remove __.*DECLS nonsense
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: libcgroup-0.41/include/libcgroup/config.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/config.h
++++ libcgroup-0.41/include/libcgroup/config.h
+@@ -9,7 +9,9 @@
+ #include <features.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * @defgroup group_config 5. Configuration
+@@ -107,6 +109,8 @@ int cgroup_config_create_template_group(
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /*_LIBCGROUP_CONFIG_H*/
+Index: libcgroup-0.41/include/libcgroup/error.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/error.h
++++ libcgroup-0.41/include/libcgroup/error.h
+@@ -9,7 +9,9 @@
+ #include <features.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * @defgroup group_errors 6. Error handling
+@@ -99,6 +101,8 @@ int cgroup_get_last_errno(void);
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_INIT_H */
+Index: libcgroup-0.41/include/libcgroup/groups.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/groups.h
++++ libcgroup-0.41/include/libcgroup/groups.h
+@@ -11,7 +11,9 @@
+ #include <stdbool.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * Flags for cgroup_delete_cgroup_ext().
+@@ -577,6 +579,8 @@ char *cgroup_get_cgroup_name(struct cgro
+  */
+ 
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_GROUPS_H */
+Index: libcgroup-0.41/include/libcgroup/init.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/init.h
++++ libcgroup-0.41/include/libcgroup/init.h
+@@ -9,7 +9,9 @@
+ #include <features.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * @defgroup group_init 1. Initialization
+@@ -58,6 +60,8 @@ int cgroup_get_subsys_mount_point(const
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_INIT_H */
+Index: libcgroup-0.41/include/libcgroup/iterators.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/iterators.h
++++ libcgroup-0.41/include/libcgroup/iterators.h
+@@ -11,7 +11,9 @@
+ #include <features.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * @defgroup group_iterators 3. Iterators
+@@ -423,6 +425,8 @@ int cgroup_get_subsys_mount_point_end(vo
+  * @}
+  */
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_ITERATORS_H */
+Index: libcgroup-0.41/include/libcgroup/tasks.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/tasks.h
++++ libcgroup-0.41/include/libcgroup/tasks.h
+@@ -12,7 +12,9 @@
+ #include <stdbool.h>
+ #endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /** Flags for cgroup_change_cgroup_uid_gid(). */
+ enum cgflags {
+@@ -204,6 +206,8 @@ int cgroup_register_unchanged_process(pi
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_TASKS_H */
+Index: libcgroup-0.41/src/daemon/cgrulesengd.h
+===================================================================
+--- libcgroup-0.41.orig/src/daemon/cgrulesengd.h
++++ libcgroup-0.41/src/daemon/cgrulesengd.h
+@@ -17,7 +17,9 @@
+ 
+ #include <features.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ #include "config.h"
+ #include "libcgroup.h"
+@@ -119,7 +121,9 @@ void cgre_flash_templates(int signum);
+  */
+ void cgre_catch_term(int signum);
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _CGRULESENGD_H */
+ 
+Index: libcgroup-0.41/src/libcgroup-internal.h
+===================================================================
+--- libcgroup-0.41.orig/src/libcgroup-internal.h
++++ libcgroup-0.41/src/libcgroup-internal.h
+@@ -16,7 +16,9 @@
+ 
+ #define __LIBCG_INTERNAL
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ #include "config.h"
+ #include <fts.h>
+@@ -279,6 +281,8 @@ extern void cgroup_dictionary_iterator_e
+  */
+ int cg_chmod_path(const char *path, mode_t mode, int owner_is_umask);
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif
+Index: libcgroup-0.41/include/libcgroup/log.h
+===================================================================
+--- libcgroup-0.41.orig/include/libcgroup/log.h
++++ libcgroup-0.41/include/libcgroup/log.h
+@@ -11,7 +11,9 @@
+ 
+ #include <stdarg.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /**
+  * @defgroup group_log 7. Logging
+@@ -142,6 +144,8 @@ extern int cgroup_parse_log_level_str(co
+  * @}
+  * @}
+  */
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* _LIBCGROUP_LOG_H */
diff --git a/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb b/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
index 52ba1d7..9597963 100644
--- a/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
+++ b/yocto-poky/meta/recipes-core/libcgroup/libcgroup_0.41.bb
@@ -11,15 +11,20 @@
 DEPENDS = "bison-native flex-native ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/project/libcg/${BPN}/v0.41/${BPN}-${PV}.tar.bz2"
+SRC_URI_append_libc-musl = " file://musl-decls-compat.patch"
 
 SRC_URI[md5sum] = "3dea9d50b8a5b73ff0bf1cdcb210f63f"
 SRC_URI[sha256sum] = "e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51"
 
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libcg/files/libcgroup/"
+
+DEPENDS_append_libc-musl = " fts "
+EXTRA_OEMAKE_append_libc-musl = "LIBS=-lfts"
+
 EXTRA_OECONF = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--enable-pam-module-dir=${base_libdir}/security --enable-pam=yes', '--enable-pam=no', d)}"
 
 PACKAGES =+ "cgroups-pam-plugin"
 FILES_cgroups-pam-plugin = "${base_libdir}/security/pam_cgroup.so*"
-FILES_${PN}-dbg += "${base_libdir}/security/.debug"
 FILES_${PN}-dev += "${base_libdir}/security/*.la"
 
 do_install_append() {
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2.inc b/yocto-poky/meta/recipes-core/libxml/libxml2.inc
deleted file mode 100644
index 310d5bb..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2.inc
+++ /dev/null
@@ -1,94 +0,0 @@
-SUMMARY = "XML C Parser Library and Toolkit"
-DESCRIPTION = "The XML Parser Library allows for manipulation of XML files.  Libxml2 exports Push and Pull type parser interfaces for both XML and HTML.  It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD.  Libxml2 includes complete XPath, XPointer and Xinclude implementations.  It also has a SAX like interface, which is designed to be compatible with Expat."
-HOMEPAGE = "http://www.xmlsoft.org/"
-BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
-SECTION = "libs"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
-                    file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
-                    file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
-                    file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
-
-DEPENDS =+ "zlib"
-
-SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
-           file://libxml-64bit.patch \
-           file://ansidecl.patch \
-           file://runtest.patch \
-           file://run-ptest \
-           file://libxml2-CVE-2014-0191-fix.patch \
-           file://python-sitepackages-dir.patch \
-           file://libxml-m4-use-pkgconfig.patch \
-           file://configure.ac-fix-cross-compiling-warning.patch \
-           file://0001-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch \
-           file://CVE-2015-7941-1-Stop-parsing-on-entities-boundaries-errors.patch \
-           file://CVE-2015-7941-2-Cleanup-conditional-section-error-handling.patch \
-           file://CVE-2015-8317-Fail-parsing-early-on-if-encoding-conversion-failed.patch \
-           file://CVE-2015-7942-Another-variation-of-overflow-in-Conditional-section.patch \
-           file://CVE-2015-7942-2-Fix-an-error-in-previous-Conditional-section-patch.patch \
-           file://0001-CVE-2015-8035-Fix-XZ-compression-support-loop.patch \
-           file://CVE-2015-7498-Avoid-processing-entities-after-encoding-conversion-.patch \
-           file://0001-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch \
-           file://CVE-2015-7499-1-Add-xmlHaltParser-to-stop-the-parser.patch \
-           file://CVE-2015-7499-2-Detect-incoherency-on-GROW.patch \
-           file://0001-Fix-a-bug-on-name-parsing-at-the-end-of-current-inpu.patch \
-           file://0001-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch \
-           file://0001-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch \
-           file://0001-CVE-2015-5312-Another-entity-expansion-issue.patch \
-           file://CVE-2015-8241.patch \
-           file://CVE-2015-8710.patch \
-          "
-
-BINCONFIG = "${bindir}/xml2-config"
-
-inherit autotools pkgconfig binconfig-disabled pythonnative ptest
-
-RDEPENDS_${PN}-ptest += "python-core"
-
-RDEPENDS_${PN}-python += "python-core"
-
-RDEPENDS_${PN}-ptest_append_libc-glibc += "glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
-
-# We don't DEPEND on binutils for ansidecl.h so ensure we don't use the header
-do_configure_prepend () {
-	sed -i -e '/.*ansidecl.h.*/d' ${S}/configure.ac
-}
-
-export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
-
-PACKAGECONFIG ??= "python"
-
-PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python"
-# WARNING: zlib is require for RPM use
-EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
-EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
-EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
-
-# required for pythong binding
-export HOST_SYS
-export BUILD_SYS
-export STAGING_LIBDIR
-export STAGING_INCDIR
-
-export LDFLAGS += "-ldl"
-
-python populate_packages_prepend () {
-    # autonamer would call this libxml2-2, but we don't want that
-    if d.getVar('DEBIAN_NAMES', True):
-        d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
-}
-
-PACKAGES += "${PN}-utils ${PN}-python"
-
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug"
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
-FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
-FILES_${PN}-utils += "${bindir}/*"
-FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
-
-do_install_ptest () {
-  cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch
deleted file mode 100644
index 96d58f9..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-1819-Enforce-the-reader-to-run-in-constant-.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From 213f1fe0d76d30eaed6e5853057defc43e6df2c9 Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Tue, 14 Apr 2015 17:41:48 +0800
-Subject: [PATCH] CVE-2015-1819 Enforce the reader to run in constant memory
-
-One of the operation on the reader could resolve entities
-leading to the classic expansion issue. Make sure the
-buffer used for xmlreader operation is bounded.
-Introduce a new allocation type for the buffers for this effect.
-
-Upstream-Status: Backport
-
-Signed-off-by: Yue Tao <Yue.Tao@windriver.com>
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
----
- buf.c                 |   43 ++++++++++++++++++++++++++++++++++++++++++-
- include/libxml/tree.h |    3 ++-
- xmlreader.c           |   20 +++++++++++++++++++-
- 3 files changed, 63 insertions(+), 3 deletions(-)
-
-diff --git a/buf.c b/buf.c
-index 6efc7b6..07922ff 100644
---- a/buf.c
-+++ b/buf.c
-@@ -27,6 +27,7 @@
- #include <libxml/tree.h>
- #include <libxml/globals.h>
- #include <libxml/tree.h>
-+#include <libxml/parserInternals.h> /* for XML_MAX_TEXT_LENGTH */
- #include "buf.h"
- 
- #define WITH_BUFFER_COMPAT
-@@ -299,7 +300,8 @@ xmlBufSetAllocationScheme(xmlBufPtr buf,
-     if ((scheme == XML_BUFFER_ALLOC_DOUBLEIT) ||
-         (scheme == XML_BUFFER_ALLOC_EXACT) ||
-         (scheme == XML_BUFFER_ALLOC_HYBRID) ||
--        (scheme == XML_BUFFER_ALLOC_IMMUTABLE)) {
-+        (scheme == XML_BUFFER_ALLOC_IMMUTABLE) ||
-+	(scheme == XML_BUFFER_ALLOC_BOUNDED)) {
- 	buf->alloc = scheme;
-         if (buf->buffer)
-             buf->buffer->alloc = scheme;
-@@ -458,6 +460,18 @@ xmlBufGrowInternal(xmlBufPtr buf, size_t len) {
-     size = buf->use + len + 100;
- #endif
- 
-+    if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
-+        /*
-+	 * Used to provide parsing limits
-+	 */
-+        if ((buf->use + len >= XML_MAX_TEXT_LENGTH) ||
-+	    (buf->size >= XML_MAX_TEXT_LENGTH)) {
-+	    xmlBufMemoryError(buf, "buffer error: text too long\n");
-+	    return(0);
-+	}
-+	if (size >= XML_MAX_TEXT_LENGTH)
-+	    size = XML_MAX_TEXT_LENGTH;
-+    }
-     if ((buf->alloc == XML_BUFFER_ALLOC_IO) && (buf->contentIO != NULL)) {
-         size_t start_buf = buf->content - buf->contentIO;
- 
-@@ -739,6 +753,15 @@ xmlBufResize(xmlBufPtr buf, size_t size)
-     CHECK_COMPAT(buf)
- 
-     if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return(0);
-+    if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
-+        /*
-+	 * Used to provide parsing limits
-+	 */
-+        if (size >= XML_MAX_TEXT_LENGTH) {
-+	    xmlBufMemoryError(buf, "buffer error: text too long\n");
-+	    return(0);
-+	}
-+    }
- 
-     /* Don't resize if we don't have to */
-     if (size < buf->size)
-@@ -867,6 +890,15 @@ xmlBufAdd(xmlBufPtr buf, const xmlChar *str, int len) {
- 
-     needSize = buf->use + len + 2;
-     if (needSize > buf->size){
-+	if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
-+	    /*
-+	     * Used to provide parsing limits
-+	     */
-+	    if (needSize >= XML_MAX_TEXT_LENGTH) {
-+		xmlBufMemoryError(buf, "buffer error: text too long\n");
-+		return(-1);
-+	    }
-+	}
-         if (!xmlBufResize(buf, needSize)){
- 	    xmlBufMemoryError(buf, "growing buffer");
-             return XML_ERR_NO_MEMORY;
-@@ -938,6 +970,15 @@ xmlBufAddHead(xmlBufPtr buf, const xmlChar *str, int len) {
-     }
-     needSize = buf->use + len + 2;
-     if (needSize > buf->size){
-+	if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) {
-+	    /*
-+	     * Used to provide parsing limits
-+	     */
-+	    if (needSize >= XML_MAX_TEXT_LENGTH) {
-+		xmlBufMemoryError(buf, "buffer error: text too long\n");
-+		return(-1);
-+	    }
-+	}
-         if (!xmlBufResize(buf, needSize)){
- 	    xmlBufMemoryError(buf, "growing buffer");
-             return XML_ERR_NO_MEMORY;
-diff --git a/include/libxml/tree.h b/include/libxml/tree.h
-index 2f90717..4a9b3bc 100644
---- a/include/libxml/tree.h
-+++ b/include/libxml/tree.h
-@@ -76,7 +76,8 @@ typedef enum {
-     XML_BUFFER_ALLOC_EXACT,	/* grow only to the minimal size */
-     XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
-     XML_BUFFER_ALLOC_IO,	/* special allocation scheme used for I/O */
--    XML_BUFFER_ALLOC_HYBRID	/* exact up to a threshold, and doubleit thereafter */
-+    XML_BUFFER_ALLOC_HYBRID,	/* exact up to a threshold, and doubleit thereafter */
-+    XML_BUFFER_ALLOC_BOUNDED	/* limit the upper size of the buffer */
- } xmlBufferAllocationScheme;
- 
- /**
-diff --git a/xmlreader.c b/xmlreader.c
-index f19e123..471e7e2 100644
---- a/xmlreader.c
-+++ b/xmlreader.c
-@@ -2091,6 +2091,9 @@ xmlNewTextReader(xmlParserInputBufferPtr input, const char *URI) {
- 		"xmlNewTextReader : malloc failed\n");
- 	return(NULL);
-     }
-+    /* no operation on a reader should require a huge buffer */
-+    xmlBufSetAllocationScheme(ret->buffer,
-+			      XML_BUFFER_ALLOC_BOUNDED);
-     ret->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
-     if (ret->sax == NULL) {
- 	xmlBufFree(ret->buffer);
-@@ -3616,6 +3619,7 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
- 	    return(((xmlNsPtr) node)->href);
-         case XML_ATTRIBUTE_NODE:{
- 	    xmlAttrPtr attr = (xmlAttrPtr) node;
-+	    const xmlChar *ret;
- 
- 	    if ((attr->children != NULL) &&
- 	        (attr->children->type == XML_TEXT_NODE) &&
-@@ -3629,10 +3633,21 @@ xmlTextReaderConstValue(xmlTextReaderPtr reader) {
-                                         "xmlTextReaderSetup : malloc failed\n");
-                         return (NULL);
-                     }
-+		    xmlBufSetAllocationScheme(reader->buffer,
-+		                              XML_BUFFER_ALLOC_BOUNDED);
-                 } else
-                     xmlBufEmpty(reader->buffer);
- 	        xmlBufGetNodeContent(reader->buffer, node);
--		return(xmlBufContent(reader->buffer));
-+		ret = xmlBufContent(reader->buffer);
-+		if (ret == NULL) {
-+		    /* error on the buffer best to reallocate */
-+		    xmlBufFree(reader->buffer);
-+		    reader->buffer = xmlBufCreateSize(100);
-+		    xmlBufSetAllocationScheme(reader->buffer,
-+		                              XML_BUFFER_ALLOC_BOUNDED);
-+		    ret = BAD_CAST "";
-+		}
-+		return(ret);
- 	    }
- 	    break;
- 	}
-@@ -5131,6 +5146,9 @@ xmlTextReaderSetup(xmlTextReaderPtr reader,
-                         "xmlTextReaderSetup : malloc failed\n");
-         return (-1);
-     }
-+    /* no operation on a reader should require a huge buffer */
-+    xmlBufSetAllocationScheme(reader->buffer,
-+			      XML_BUFFER_ALLOC_BOUNDED);
-     if (reader->sax == NULL)
- 	reader->sax = (xmlSAXHandler *) xmlMalloc(sizeof(xmlSAXHandler));
-     if (reader->sax == NULL) {
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-5312-Another-entity-expansion-issue.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-5312-Another-entity-expansion-issue.patch
deleted file mode 100644
index 979618d..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-5312-Another-entity-expansion-issue.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 69030714cde66d525a8884bda01b9e8f0abf8e1e Mon Sep 17 00:00:00 2001
-From: David Drysdale <drysdale@google.com>
-Date: Fri, 20 Nov 2015 11:13:45 +0800
-Subject: [PATCH] CVE-2015-5312 Another entity expansion issue
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=756733
-It is one case where the code in place to detect entities expansions
-failed to exit when the situation was detected, leading to DoS
-Problem reported by Kostya Serebryany @ Google
-Patch provided by David Drysdale @ Google
-
-Upstream-Status: Backport
-
-CVE-2015-5312
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/parser.c b/parser.c
-index b7b6668..da6e729 100644
---- a/parser.c
-+++ b/parser.c
-@@ -2806,6 +2806,10 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len,
- 			                      0, 0, 0);
- 		ctxt->depth--;
- 
-+		if ((ctxt->lastError.code == XML_ERR_ENTITY_LOOP) ||
-+		    (ctxt->lastError.code == XML_ERR_INTERNAL_ERROR))
-+		    goto int_error;
-+
- 		if (rep != NULL) {
- 		    current = rep;
- 		    while (*current != 0) { /* non input consuming loop */
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch
deleted file mode 100644
index 955c961..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-7497-Avoid-an-heap-buffer-overflow-in-xmlDi.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 6360a31a84efe69d155ed96306b9a931a40beab9 Mon Sep 17 00:00:00 2001
-From: David Drysdale <drysdale@google.com>
-Date: Fri, 20 Nov 2015 10:47:12 +0800
-Subject: [PATCH] CVE-2015-7497 Avoid an heap buffer overflow in
- xmlDictComputeFastQKey
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=756528
-It was possible to hit a negative offset in the name indexing
-used to randomize the dictionary key generation
-Reported and fix provided by David Drysdale @ Google
-
-Upstream-Status: Backport
-
-CVE-2015-7497
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- dict.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/dict.c b/dict.c
-index 5f71d55..8c8f931 100644
---- a/dict.c
-+++ b/dict.c
-@@ -486,7 +486,10 @@ xmlDictComputeFastQKey(const xmlChar *prefix, int plen,
- 	value += 30 * (*prefix);
- 
-     if (len > 10) {
--        value += name[len - (plen + 1 + 1)];
-+        int offset = len - (plen + 1 + 1);
-+	if (offset < 0)
-+	    offset = len - (10 + 1);
-+	value += name[offset];
-         len = 10;
- 	if (plen > 10)
- 	    plen = 10;
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch
deleted file mode 100644
index b486079..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-7500-Fix-memory-access-error-due-to-incorre.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From f1063fdbe7fa66332bbb76874101c2a7b51b519f Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Fri, 20 Nov 2015 16:06:59 +0800
-Subject: [PATCH] CVE-2015-7500 Fix memory access error due to incorrect
- entities boundaries
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=756525
-handle properly the case where we popped out of the current entity
-while processing a start tag
-Reported by Kostya Serebryany @ Google
-
-This slightly modifies the output of 754946 in regression tests
-
-Upstream-Status: Backport
-
-CVE-2015-7500
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c                     | 28 ++++++++++++++++++++++------
- result/errors/754946.xml.err |  7 +++++--
- 2 files changed, 27 insertions(+), 8 deletions(-)
-
-diff --git a/parser.c b/parser.c
-index c7e4574..c5741e3 100644
---- a/parser.c
-+++ b/parser.c
-@@ -9348,7 +9348,7 @@ xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
-     const xmlChar **atts = ctxt->atts;
-     int maxatts = ctxt->maxatts;
-     int nratts, nbatts, nbdef;
--    int i, j, nbNs, attval, oldline, oldcol;
-+    int i, j, nbNs, attval, oldline, oldcol, inputNr;
-     const xmlChar *base;
-     unsigned long cur;
-     int nsNr = ctxt->nsNr;
-@@ -9367,6 +9367,7 @@ reparse:
-     SHRINK;
-     base = ctxt->input->base;
-     cur = ctxt->input->cur - ctxt->input->base;
-+    inputNr = ctxt->inputNr;
-     oldline = ctxt->input->line;
-     oldcol = ctxt->input->col;
-     nbatts = 0;
-@@ -9392,7 +9393,8 @@ reparse:
-      */
-     SKIP_BLANKS;
-     GROW;
--    if (ctxt->input->base != base) goto base_changed;
-+    if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-+        goto base_changed;
- 
-     while (((RAW != '>') &&
- 	   ((RAW != '/') || (NXT(1) != '>')) &&
-@@ -9403,7 +9405,7 @@ reparse:
- 
- 	attname = xmlParseAttribute2(ctxt, prefix, localname,
- 	                             &aprefix, &attvalue, &len, &alloc);
--	if (ctxt->input->base != base) {
-+	if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr)) {
- 	    if ((attvalue != NULL) && (alloc != 0))
- 	        xmlFree(attvalue);
- 	    attvalue = NULL;
-@@ -9552,7 +9554,8 @@ skip_ns:
- 		    break;
- 		}
- 		SKIP_BLANKS;
--		if (ctxt->input->base != base) goto base_changed;
-+		if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-+		    goto base_changed;
- 		continue;
- 	    }
- 
-@@ -9589,7 +9592,8 @@ failed:
- 	GROW
-         if (ctxt->instate == XML_PARSER_EOF)
-             break;
--	if (ctxt->input->base != base) goto base_changed;
-+	if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-+	    goto base_changed;
- 	if ((RAW == '>') || (((RAW == '/') && (NXT(1) == '>'))))
- 	    break;
- 	if (!IS_BLANK_CH(RAW)) {
-@@ -9605,7 +9609,8 @@ failed:
- 	    break;
- 	}
-         GROW;
--	if (ctxt->input->base != base) goto base_changed;
-+	if ((ctxt->input->base != base) || (inputNr != ctxt->inputNr))
-+	    goto base_changed;
-     }
- 
-     /*
-@@ -9772,6 +9777,17 @@ base_changed:
- 	    if ((ctxt->attallocs[j] != 0) && (atts[i] != NULL))
- 	        xmlFree((xmlChar *) atts[i]);
-     }
-+
-+    /*
-+     * We can't switch from one entity to another in the middle
-+     * of a start tag
-+     */
-+    if (inputNr != ctxt->inputNr) {
-+        xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
-+		    "Start tag doesn't start and stop in the same entity\n");
-+	return(NULL);
-+    }
-+
-     ctxt->input->cur = ctxt->input->base + cur;
-     ctxt->input->line = oldline;
-     ctxt->input->col = oldcol;
-diff --git a/result/errors/754946.xml.err b/result/errors/754946.xml.err
-index 423dff5..a75088b 100644
---- a/result/errors/754946.xml.err
-+++ b/result/errors/754946.xml.err
-@@ -11,6 +11,9 @@ Entity: line 1: parser error : DOCTYPE improperly terminated
- Entity: line 1: 
- A<lbbbbbbbbbbbbbbbbbbb_
- ^
-+./test/errors/754946.xml:1: parser error : Start tag doesn't start and stop in the same entity
-+>%SYSTEM;<![
-+         ^
- ./test/errors/754946.xml:1: parser error : Extra content at the end of the document
--<!DOCTYPEA[<!ENTITY %
--  ^
-+>%SYSTEM;<![
-+         ^
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-8035-Fix-XZ-compression-support-loop.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-8035-Fix-XZ-compression-support-loop.patch
deleted file mode 100644
index 7107355..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-8035-Fix-XZ-compression-support-loop.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From f0709e3ca8f8947f2d91ed34e92e38a4c23eae63 Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Tue, 3 Nov 2015 15:31:25 +0800
-Subject: [PATCH] CVE-2015-8035 Fix XZ compression support loop
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=757466
-DoS when parsing specially crafted XML document if XZ support
-is compiled in (which wasn't the case for 2.9.2 and master since
-Nov 2013, fixed in next commit !)
-
-Upstream-Status: Backport
-
-CVE-2015-8035
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- xzlib.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/xzlib.c b/xzlib.c
-index 0dcb9f4..1fab546 100644
---- a/xzlib.c
-+++ b/xzlib.c
-@@ -581,6 +581,10 @@ xz_decomp(xz_statep state)
-             xz_error(state, LZMA_DATA_ERROR, "compressed data error");
-             return -1;
-         }
-+        if (ret == LZMA_PROG_ERROR) {
-+            xz_error(state, LZMA_PROG_ERROR, "compression error");
-+            return -1;
-+        }
-     } while (strm->avail_out && ret != LZMA_STREAM_END);
- 
-     /* update available output and crc check value */
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch
deleted file mode 100644
index 73531b3..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-CVE-2015-8242-Buffer-overead-with-HTML-parser-in-pus.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 8fb4a770075628d6441fb17a1e435100e2f3b1a2 Mon Sep 17 00:00:00 2001
-From: Hugh Davenport <hugh@allthethings.co.nz>
-Date: Fri, 20 Nov 2015 17:16:06 +0800
-Subject: [PATCH] CVE-2015-8242 Buffer overead with HTML parser in push mode
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=756372
-Error in the code pointing to the codepoint in the stack for the
-current char value instead of the pointer in the input that the SAX
-callback expects
-Reported and fixed by Hugh Davenport
-
-Upstream-Status: Backport
-
-CVE-2015-8242
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- HTMLparser.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/HTMLparser.c b/HTMLparser.c
-index bdf7807..b729197 100644
---- a/HTMLparser.c
-+++ b/HTMLparser.c
-@@ -5735,17 +5735,17 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) {
- 				if (ctxt->keepBlanks) {
- 				    if (ctxt->sax->characters != NULL)
- 					ctxt->sax->characters(
--						ctxt->userData, &cur, 1);
-+						ctxt->userData, &in->cur[0], 1);
- 				} else {
- 				    if (ctxt->sax->ignorableWhitespace != NULL)
- 					ctxt->sax->ignorableWhitespace(
--						ctxt->userData, &cur, 1);
-+						ctxt->userData, &in->cur[0], 1);
- 				}
- 			    } else {
- 				htmlCheckParagraph(ctxt);
- 				if (ctxt->sax->characters != NULL)
- 				    ctxt->sax->characters(
--					    ctxt->userData, &cur, 1);
-+					    ctxt->userData, &in->cur[0], 1);
- 			    }
- 			}
- 			ctxt->token = 0;
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Fix-a-bug-on-name-parsing-at-the-end-of-current-inpu.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Fix-a-bug-on-name-parsing-at-the-end-of-current-inpu.patch
deleted file mode 100644
index a86b9ee..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-Fix-a-bug-on-name-parsing-at-the-end-of-current-inpu.patch
+++ /dev/null
Binary files differ
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-threads-Define-pthread-definitions-for-glibc-complia.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/0001-threads-Define-pthread-definitions-for-glibc-complia.patch
deleted file mode 100644
index c653a81..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/0001-threads-Define-pthread-definitions-for-glibc-complia.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 6750cc564a17c812555cca587660240ccffaaed3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 4 Apr 2015 08:50:40 -0700
-Subject: [PATCH] threads: Define pthread* definitions for glibc compliant libs
-
-This code is assuming glibc but not explicitly saying it
-so lets make it so. Fixes following on musl
-
-threads.c:80:27: error: macro "pthread_equal" requires 2 arguments, but
-only 1 given
-|  extern int pthread_equal ()
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- threads.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: libxml2-2.9.2/threads.c
-===================================================================
---- libxml2-2.9.2.orig/threads.c
-+++ libxml2-2.9.2/threads.c
-@@ -47,7 +47,7 @@
- #ifdef HAVE_PTHREAD_H
- 
- static int libxml_is_threaded = -1;
--#ifdef __GNUC__
-+#if defined(__GNUC__) && defined(__GLIBC__)
- #ifdef linux
- #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || (__GNUC__ > 3)
- extern int pthread_once (pthread_once_t *__once_control,
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch
deleted file mode 100644
index 10a8112..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 72a46a519ce7326d9a00f0b6a7f2a8e958cd1675 Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Thu, 23 Oct 2014 11:35:36 +0800
-Subject: Fix missing entities after CVE-2014-3660 fix
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=738805
-
-The fix for CVE-2014-3660 introduced a regression in some case
-where entity substitution is required and the entity is used
-first in anotther entity referenced from an attribute value
-
-Upstream-Status: Backport
-
-diff --git a/parser.c b/parser.c
-index 67c9dfd..a8d1b67 100644
---- a/parser.c
-+++ b/parser.c
-@@ -7235,7 +7235,8 @@ xmlParseReference(xmlParserCtxtPtr ctxt) {
-      * far more secure as the parser will only process data coming from
-      * the document entity by default.
-      */
--    if ((ent->checked == 0) &&
-+    if (((ent->checked == 0) ||
-+         ((ent->children == NULL) && (ctxt->options & XML_PARSE_NOENT))) &&
-         ((ent->etype != XML_EXTERNAL_GENERAL_PARSED_ENTITY) ||
-          (ctxt->options & (XML_PARSE_NOENT | XML_PARSE_DTDVALID)))) {
- 	unsigned long oldnbent = ctxt->nbentities;
--- 
-cgit v0.10.1
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7498-Avoid-processing-entities-after-encoding-conversion-.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7498-Avoid-processing-entities-after-encoding-conversion-.patch
deleted file mode 100644
index 47ba897..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7498-Avoid-processing-entities-after-encoding-conversion-.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From afd27c21f6b36e22682b7da20d726bce2dcb2f43 Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Mon, 9 Nov 2015 18:07:18 +0800
-Subject: [PATCH] Avoid processing entities after encoding conversion failures
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=756527
-and was also raised by Chromium team in the past
-
-When we hit a convwersion failure when switching encoding
-it is bestter to stop parsing there, this was treated as a
-fatal error but the parser was continuing to process to extract
-more errors, unfortunately that makes little sense as the data
-is obviously corrupt and can potentially lead to unexpected behaviour.
-
-Upstream-Status: Backport
-
-CVE-2015-7498
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c          |  7 +++++--
- parserInternals.c | 11 ++++++++++-
- 2 files changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/parser.c b/parser.c
-index 134afe7..c79b4e8 100644
---- a/parser.c
-+++ b/parser.c
-@@ -10665,7 +10665,8 @@ xmlParseXMLDecl(xmlParserCtxtPtr ctxt) {
- 	xmlFatalErrMsg(ctxt, XML_ERR_SPACE_REQUIRED, "Blank needed here\n");
-     }
-     xmlParseEncodingDecl(ctxt);
--    if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
-+    if ((ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) ||
-+         (ctxt->instate == XML_PARSER_EOF)) {
- 	/*
- 	 * The XML REC instructs us to stop parsing right here
- 	 */
-@@ -10789,6 +10790,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
- 
-     if (CUR == 0) {
- 	xmlFatalErr(ctxt, XML_ERR_DOCUMENT_EMPTY, NULL);
-+	return(-1);
-     }
- 
-     /*
-@@ -10806,7 +10808,8 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
- 	 * Note that we will switch encoding on the fly.
- 	 */
- 	xmlParseXMLDecl(ctxt);
--	if (ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) {
-+	if ((ctxt->errNo == XML_ERR_UNSUPPORTED_ENCODING) ||
-+	    (ctxt->instate == XML_PARSER_EOF)) {
- 	    /*
- 	     * The XML REC instructs us to stop parsing right here
- 	     */
-diff --git a/parserInternals.c b/parserInternals.c
-index df204fd..c8230c1 100644
---- a/parserInternals.c
-+++ b/parserInternals.c
-@@ -937,6 +937,7 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
- {
-     xmlCharEncodingHandlerPtr handler;
-     int len = -1;
-+    int ret;
- 
-     if (ctxt == NULL) return(-1);
-     switch (enc) {
-@@ -1097,7 +1098,15 @@ xmlSwitchEncoding(xmlParserCtxtPtr ctxt, xmlCharEncoding enc)
-     if (handler == NULL)
- 	return(-1);
-     ctxt->charset = XML_CHAR_ENCODING_UTF8;
--    return(xmlSwitchToEncodingInt(ctxt, handler, len));
-+    ret = xmlSwitchToEncodingInt(ctxt, handler, len);
-+    if ((ret < 0) || (ctxt->errNo == XML_I18N_CONV_FAILED)) {
-+        /*
-+	 * on encoding conversion errors, stop the parser
-+	 */
-+        xmlStopParser(ctxt);
-+	ctxt->errNo = XML_I18N_CONV_FAILED;
-+    }
-+    return(ret);
- }
- 
- /**
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7499-1-Add-xmlHaltParser-to-stop-the-parser.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7499-1-Add-xmlHaltParser-to-stop-the-parser.patch
deleted file mode 100644
index e39ec65..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7499-1-Add-xmlHaltParser-to-stop-the-parser.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 28cd9cb747a94483f4aea7f0968d202c20bb4cfc Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Fri, 20 Nov 2015 14:55:30 +0800
-Subject: [PATCH] Add xmlHaltParser() to stop the parser
-
-The problem is doing it in a consistent and safe fashion
-It's more complex than just setting ctxt->instate = XML_PARSER_EOF
-Update the public function to reuse that new internal routine
-
-Upstream-Status: Backport
-
-CVE-2015-7499-1
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c | 34 +++++++++++++++++++++++++++++-----
- 1 file changed, 29 insertions(+), 5 deletions(-)
-
-diff --git a/parser.c b/parser.c
-index da6e729..b6e99b1 100644
---- a/parser.c
-+++ b/parser.c
-@@ -94,6 +94,8 @@ static xmlParserCtxtPtr
- xmlCreateEntityParserCtxtInternal(const xmlChar *URL, const xmlChar *ID,
- 	                  const xmlChar *base, xmlParserCtxtPtr pctx);
- 
-+static void xmlHaltParser(xmlParserCtxtPtr ctxt);
-+
- /************************************************************************
-  *									*
-  *	Arbitrary limits set in the parser. See XML_PARSE_HUGE		*
-@@ -12625,25 +12627,47 @@ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data,
- #endif /* LIBXML_PUSH_ENABLED */
- 
- /**
-- * xmlStopParser:
-+ * xmlHaltParser:
-  * @ctxt:  an XML parser context
-  *
-- * Blocks further parser processing
-+ * Blocks further parser processing don't override error
-+ * for internal use
-  */
--void
--xmlStopParser(xmlParserCtxtPtr ctxt) {
-+static void
-+xmlHaltParser(xmlParserCtxtPtr ctxt) {
-     if (ctxt == NULL)
-         return;
-     ctxt->instate = XML_PARSER_EOF;
--    ctxt->errNo = XML_ERR_USER_STOP;
-     ctxt->disableSAX = 1;
-     if (ctxt->input != NULL) {
-+        /*
-+	 * in case there was a specific allocation deallocate before
-+	 * overriding base
-+	 */
-+        if (ctxt->input->free != NULL) {
-+	    ctxt->input->free((xmlChar *) ctxt->input->base);
-+	    ctxt->input->free = NULL;
-+	}
- 	ctxt->input->cur = BAD_CAST"";
- 	ctxt->input->base = ctxt->input->cur;
-     }
- }
- 
- /**
-+ * xmlStopParser:
-+ * @ctxt:  an XML parser context
-+ *
-+ * Blocks further parser processing
-+ */
-+void
-+xmlStopParser(xmlParserCtxtPtr ctxt) {
-+    if (ctxt == NULL)
-+        return;
-+    xmlHaltParser(ctxt);
-+    ctxt->errNo = XML_ERR_USER_STOP;
-+}
-+
-+/**
-  * xmlCreateIOParserCtxt:
-  * @sax:  a SAX handler
-  * @user_data:  The user data returned on SAX callbacks
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7499-2-Detect-incoherency-on-GROW.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7499-2-Detect-incoherency-on-GROW.patch
deleted file mode 100644
index aff3920..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7499-2-Detect-incoherency-on-GROW.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 35bcb1d758ed70aa7b257c9c3b3ff55e54e3d0da Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Fri, 20 Nov 2015 15:04:09 +0800
-Subject: [PATCH] Detect incoherency on GROW
-
-the current pointer to the input has to be between the base and end
-if not stop everything we have an internal state error.
-
-Upstream-Status: Backport
-
-CVE-2015-7499-2
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/parser.c b/parser.c
-index 1810f99..ab007aa 100644
---- a/parser.c
-+++ b/parser.c
-@@ -2075,9 +2075,16 @@ static void xmlGROW (xmlParserCtxtPtr ctxt) {
-          ((ctxt->input->buf) && (ctxt->input->buf->readcallback != (xmlInputReadCallback) xmlNop)) &&
-         ((ctxt->options & XML_PARSE_HUGE) == 0)) {
-         xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR, "Huge input lookup");
--        ctxt->instate = XML_PARSER_EOF;
-+        xmlHaltParser(ctxt);
-+	return;
-     }
-     xmlParserInputGrow(ctxt->input, INPUT_CHUNK);
-+    if ((ctxt->input->cur > ctxt->input->end) ||
-+        (ctxt->input->cur < ctxt->input->base)) {
-+        xmlHaltParser(ctxt);
-+        xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR, "cur index out of bound");
-+	return;
-+    }
-     if ((ctxt->input->cur != NULL) && (*ctxt->input->cur == 0) &&
-         (xmlParserInputGrow(ctxt->input, INPUT_CHUNK) <= 0))
- 	    xmlPopInput(ctxt);
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7941-1-Stop-parsing-on-entities-boundaries-errors.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7941-1-Stop-parsing-on-entities-boundaries-errors.patch
deleted file mode 100644
index 11da9f9..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7941-1-Stop-parsing-on-entities-boundaries-errors.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a7dfab7411cbf545f359dd3157e5df1eb0e7ce31 Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Mon, 23 Feb 2015 11:17:35 +0800
-Subject: [PATCH] Stop parsing on entities boundaries errors
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=744980
-
-There are times, like on unterminated entities that it's preferable to
-stop parsing, even if that means less error reporting. Entities are
-feeding the parser on further processing, and if they are ill defined
-then it's possible to get the parser to bug. Also do the same on
-Conditional Sections if the input is broken, as the structure of
-the document can't be guessed.
-
-Upstream-Status: Backport
-
-CVE-2015-7941-1
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/parser.c b/parser.c
-index a8d1b67..bbe97eb 100644
---- a/parser.c
-+++ b/parser.c
-@@ -5658,6 +5658,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
- 	if (RAW != '>') {
- 	    xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_NOT_FINISHED,
- 	            "xmlParseEntityDecl: entity %s not terminated\n", name);
-+	    xmlStopParser(ctxt);
- 	} else {
- 	    if (input != ctxt->input) {
- 		xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7941-2-Cleanup-conditional-section-error-handling.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7941-2-Cleanup-conditional-section-error-handling.patch
deleted file mode 100644
index b7bd960..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7941-2-Cleanup-conditional-section-error-handling.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 9b8512337d14c8ddf662fcb98b0135f225a1c489 Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Mon, 23 Feb 2015 11:29:20 +0800
-Subject: [PATCH] Cleanup conditional section error handling
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=744980
-
-The error handling of Conditional Section also need to be
-straightened as the structure of the document can't be
-guessed on a failure there and it's better to stop parsing
-as further errors are likely to be irrelevant.
-
-Upstream-Status: Backport
-
-CVE-2015-7941-2
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/parser.c b/parser.c
-index bbe97eb..fe603ac 100644
---- a/parser.c
-+++ b/parser.c
-@@ -6770,6 +6770,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
- 	SKIP_BLANKS;
- 	if (RAW != '[') {
- 	    xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
-+	    xmlStopParser(ctxt);
-+	    return;
- 	} else {
- 	    if (ctxt->input->id != id) {
- 		xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
-@@ -6830,6 +6832,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
- 	SKIP_BLANKS;
- 	if (RAW != '[') {
- 	    xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
-+	    xmlStopParser(ctxt);
-+	    return;
- 	} else {
- 	    if (ctxt->input->id != id) {
- 		xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
-@@ -6885,6 +6889,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
- 
-     } else {
- 	xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID_KEYWORD, NULL);
-+	xmlStopParser(ctxt);
-+	return;
-     }
- 
-     if (RAW == 0)
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7942-2-Fix-an-error-in-previous-Conditional-section-patch.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7942-2-Fix-an-error-in-previous-Conditional-section-patch.patch
deleted file mode 100644
index 34b6036..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7942-2-Fix-an-error-in-previous-Conditional-section-patch.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 41ac9049a27f52e7a1f3b341f8714149fc88d450 Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Tue, 27 Oct 2015 10:53:44 +0800
-Subject: [PATCH] Fix an error in previous Conditional section patch
-
-an off by one mistake in the change, led to error on correct
-document where the end of the included entity was exactly
-the end of the conditional section, leading to regtest failure
-
-Upstream-Status: Backport
-
-CVE-2015-7942-2
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/parser.c b/parser.c
-index b9217ff..d67b300 100644
---- a/parser.c
-+++ b/parser.c
-@@ -6916,7 +6916,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
- 				 NULL, NULL);
- 	}
- 	if ((ctxt-> instate != XML_PARSER_EOF) &&
--	    ((ctxt->input->cur + 3) < ctxt->input->end))
-+	    ((ctxt->input->cur + 3) <= ctxt->input->end))
- 	    SKIP(3);
-     }
- }
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7942-Another-variation-of-overflow-in-Conditional-section.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7942-Another-variation-of-overflow-in-Conditional-section.patch
deleted file mode 100644
index 40082ec..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-7942-Another-variation-of-overflow-in-Conditional-section.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From bd0526e66a56e75a18da8c15c4750db8f801c52d Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Fri, 23 Oct 2015 19:02:28 +0800
-Subject: [PATCH] Another variation of overflow in Conditional sections
-
-Which happen after the previous fix to
-https://bugzilla.gnome.org/show_bug.cgi?id=756456
-
-But stopping the parser and exiting we didn't pop the intermediary entities
-and doing the SKIP there applies on an input which may be too small
-
-Upstream-Status: Backport
-
-CVE-2015-7942
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/parser.c b/parser.c
-index a65e4cc..b9217ff 100644
---- a/parser.c
-+++ b/parser.c
-@@ -6915,7 +6915,9 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
- 	"All markup of the conditional section is not in the same entity\n",
- 				 NULL, NULL);
- 	}
--        SKIP(3);
-+	if ((ctxt-> instate != XML_PARSER_EOF) &&
-+	    ((ctxt->input->cur + 3) < ctxt->input->end))
-+	    SKIP(3);
-     }
- }
- 
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-8241.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-8241.patch
deleted file mode 100644
index 89a46ad..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-8241.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From ab2b9a93ff19cedde7befbf2fcc48c6e352b6cbe Mon Sep 17 00:00:00 2001
-From: Hugh Davenport <hugh@allthethings.co.nz>
-Date: Tue, 3 Nov 2015 20:40:49 +0800
-Subject: [PATCH] Avoid extra processing of MarkupDecl when EOF
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=756263
-
-One place where ctxt->instate == XML_PARSER_EOF whic was set up
-by entity detection issues doesn't get noticed, and even overrided
-
-Upstream-status: Backport
-
-https://git.gnome.org/browse/libxml2/commit/?id=ab2b9a93ff19cedde7befbf2fcc48c6e352b6cbe
-
-CVE: CVE-2015-8241
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-Index: libxml2-2.9.2/parser.c
-===================================================================
---- libxml2-2.9.2.orig/parser.c
-+++ libxml2-2.9.2/parser.c
-@@ -6999,6 +6999,14 @@ xmlParseMarkupDecl(xmlParserCtxtPtr ctxt
- 	    xmlParsePI(ctxt);
- 	}
-     }
-+
-+    /*
-+     * detect requirement to exit there and act accordingly
-+     * and avoid having instate overriden later on
-+     */
-+    if (ctxt->instate == XML_PARSER_EOF)
-+        return;
-+
-     /*
-      * This is only for internal subset. On external entities,
-      * the replacement is done before parsing stage
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-8317-Fail-parsing-early-on-if-encoding-conversion-failed.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-8317-Fail-parsing-early-on-if-encoding-conversion-failed.patch
deleted file mode 100644
index 59425cb..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-8317-Fail-parsing-early-on-if-encoding-conversion-failed.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 709a952110e98621c9b78c4f26462a9d8333102e Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Mon, 29 Jun 2015 16:10:26 +0800
-Subject: [PATCH] Fail parsing early on if encoding conversion failed
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=751631
-
-If we fail conversing the current input stream while
-processing the encoding declaration of the XMLDecl
-then it's safer to just abort there and not try to
-report further errors.
-
-Upstream-Status: Backport
-
-CVE-2015-8317
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- parser.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/parser.c b/parser.c
-index a3a9568..0edd53b 100644
---- a/parser.c
-+++ b/parser.c
-@@ -10471,7 +10471,11 @@ xmlParseEncodingDecl(xmlParserCtxtPtr ctxt) {
- 
-             handler = xmlFindCharEncodingHandler((const char *) encoding);
- 	    if (handler != NULL) {
--		xmlSwitchToEncoding(ctxt, handler);
-+		if (xmlSwitchToEncoding(ctxt, handler) < 0) {
-+		    /* failed to convert */
-+		    ctxt->errNo = XML_ERR_UNSUPPORTED_ENCODING;
-+		    return(NULL);
-+		}
- 	    } else {
- 		xmlFatalErrMsgStr(ctxt, XML_ERR_UNSUPPORTED_ENCODING,
- 			"Unsupported encoding %s\n", encoding);
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-8710.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-8710.patch
deleted file mode 100644
index be06cc2..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/CVE-2015-8710.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From e724879d964d774df9b7969fc846605aa1bac54c Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Fri, 30 Oct 2015 21:14:55 +0800
-Subject: [PATCH] Fix parsing short unclosed comment uninitialized access
-
-For https://bugzilla.gnome.org/show_bug.cgi?id=746048
-The HTML parser was too optimistic when processing comments and
-didn't check for the end of the stream on the first 2 characters
-
-Upstream-Status: Backport
-
-https://git.gnome.org/browse/libxml2/commit/?id=e724879d964d774df9b7969fc846605aa1bac54c
-
-CVE: CVE-2015-8710
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- HTMLparser.c | 21 ++++++++++++++-------
- 1 file changed, 14 insertions(+), 7 deletions(-)
-
-Index: libxml2-2.9.2/HTMLparser.c
-===================================================================
---- libxml2-2.9.2.orig/HTMLparser.c
-+++ libxml2-2.9.2/HTMLparser.c
-@@ -3245,12 +3245,17 @@ htmlParseComment(htmlParserCtxtPtr ctxt)
- 	ctxt->instate = state;
- 	return;
-     }
-+    len = 0;
-+    buf[len] = 0;
-     q = CUR_CHAR(ql);
-+    if (!IS_CHAR(q))
-+        goto unfinished;
-     NEXTL(ql);
-     r = CUR_CHAR(rl);
-+    if (!IS_CHAR(r))
-+        goto unfinished;
-     NEXTL(rl);
-     cur = CUR_CHAR(l);
--    len = 0;
-     while (IS_CHAR(cur) &&
-            ((cur != '>') ||
- 	    (r != '-') || (q != '-'))) {
-@@ -3281,18 +3286,20 @@ htmlParseComment(htmlParserCtxtPtr ctxt)
- 	}
-     }
-     buf[len] = 0;
--    if (!IS_CHAR(cur)) {
--	htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
--	             "Comment not terminated \n<!--%.50s\n", buf, NULL);
--	xmlFree(buf);
--    } else {
-+    if (IS_CHAR(cur)) {
-         NEXT;
- 	if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) &&
- 	    (!ctxt->disableSAX))
- 	    ctxt->sax->comment(ctxt->userData, buf);
- 	xmlFree(buf);
-+	ctxt->instate = state;
-+	return;
-     }
--    ctxt->instate = state;
-+
-+unfinished:
-+    htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
-+		 "Comment not terminated \n<!--%.50s\n", buf, NULL);
-+    xmlFree(buf);
- }
- 
- /**
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/ansidecl.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/ansidecl.patch
index 2452d78..1085c68 100644
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/ansidecl.patch
+++ b/yocto-poky/meta/recipes-core/libxml/libxml2/ansidecl.patch
@@ -9,17 +9,17 @@
 
 Upstream-Status: Inappropriate [its really a cmake bug]
 
-Index: libxml2-2.8.0/include/libxml/xmlversion.h.in
-===================================================================
---- libxml2-2.8.0.orig/include/libxml/xmlversion.h.in	2012-07-10 11:51:52.460750573 +0000
-+++ libxml2-2.8.0/include/libxml/xmlversion.h.in	2012-07-10 11:52:41.436749397 +0000
-@@ -401,9 +401,6 @@
- #endif
- 
- #ifdef __GNUC__
+diff --git a/configure.ac b/configure.ac
+index 0260281..fdb58e9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -484 +483,0 @@ AC_CHECK_HEADERS([time.h])
+-AC_CHECK_HEADERS([ansidecl.h])
+diff --git a/include/libxml/xmlversion.h.in b/include/libxml/xmlversion.h.in
+index b173be9..d10f975 100644
+--- a/include/libxml/xmlversion.h.in
++++ b/include/libxml/xmlversion.h.in
+@@ -413,3 +412,0 @@ XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
 -#ifdef HAVE_ANSIDECL_H
 -#include <ansidecl.h>
 -#endif
- 
- /**
-  * ATTRIBUTE_UNUSED:
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
index 0fc8407..3277165 100644
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
+++ b/yocto-poky/meta/recipes-core/libxml/libxml2/libxml-m4-use-pkgconfig.patch
@@ -190,7 +190,7 @@
 -          LIBS="$ac_save_LIBS"
 -       fi
 -     fi
-+  verdep=ifelse([$1], [], [], [>= $1])
++  verdep=ifelse([$1], [], [], [">= $1"])
 +  PKG_CHECK_MODULES(XML, [libxml-2.0 $verdep], [$2], [$3])
  
 -     XML_CPPFLAGS=""
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-0191-fix.patch b/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-0191-fix.patch
deleted file mode 100644
index 1c05ae6..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2/libxml2-CVE-2014-0191-fix.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Daniel Veillard <veillard@redhat.com>
-Date: Tue, 22 Apr 2014 15:30:56 +0800
-Subject: Do not fetch external parameter entities
-
-Unless explicitely asked for when validating or replacing entities
-with their value. Problem pointed out by Daniel Berrange <berrange@redhat.com>
-
-Upstream-Status: Backport
-Reference: https://access.redhat.com/security/cve/CVE-2014-0191
-
-Signed-off-by: Daniel Veillard <veillard@redhat.com>
-Signed-off-by: Maxin B. John <maxin.john@enea.com>
----
-diff -Naur libxml2-2.9.1-orig/parser.c libxml2-2.9.1/parser.c
---- libxml2-2.9.1-orig/parser.c	2013-04-16 15:39:18.000000000 +0200
-+++ libxml2-2.9.1/parser.c	2014-05-07 13:35:46.883687946 +0200
-@@ -2595,6 +2595,20 @@
- 		    xmlCharEncoding enc;
- 
- 		    /*
-+		     * Note: external parsed entities will not be loaded, it is
-+		     * not required for a non-validating parser, unless the
-+		     * option of validating, or substituting entities were
-+		     * given. Doing so is far more secure as the parser will
-+		     * only process data coming from the document entity by
-+		     * default.
-+		     */
-+                    if ((entity->etype == XML_EXTERNAL_PARAMETER_ENTITY) &&
-+		        ((ctxt->options & XML_PARSE_NOENT) == 0) &&
-+			((ctxt->options & XML_PARSE_DTDVALID) == 0) &&
-+			(ctxt->validate == 0))
-+			return;
-+
-+		    /*
- 		     * handle the extra spaces added before and after
- 		     * c.f. http://www.w3.org/TR/REC-xml#as-PE
- 		     * this is done independently.
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.2.bb b/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.2.bb
deleted file mode 100644
index 79a395c..0000000
--- a/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.2.bb
+++ /dev/null
@@ -1,11 +0,0 @@
-require libxml2.inc
-
-SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
-            file://72a46a519ce7326d9a00f0b6a7f2a8e958cd1675.patch \
-	    file://0001-threads-Define-pthread-definitions-for-glibc-complia.patch \
-	   "
-
-SRC_URI[libtar.md5sum] = "9e6a9aca9d155737868b3dc5fd82f788"
-SRC_URI[libtar.sha256sum] = "5178c30b151d044aefb1b08bf54c3003a0ac55c59c866763997529d60770d5bc"
-SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
-SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
diff --git a/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.3.bb b/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.3.bb
new file mode 100644
index 0000000..9c9873f
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/libxml/libxml2_2.9.3.bb
@@ -0,0 +1,74 @@
+SUMMARY = "XML C Parser Library and Toolkit"
+DESCRIPTION = "The XML Parser Library allows for manipulation of XML files.  Libxml2 exports Push and Pull type parser interfaces for both XML and HTML.  It can do DTD validation at parse time, on a parsed document instance or with an arbitrary DTD.  Libxml2 includes complete XPath, XPointer and Xinclude implementations.  It also has a SAX like interface, which is designed to be compatible with Expat."
+HOMEPAGE = "http://www.xmlsoft.org/"
+BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://Copyright;md5=2044417e2e5006b65a8b9067b683fcf1 \
+                    file://hash.c;beginline=6;endline=15;md5=96f7296605eae807670fb08947829969 \
+                    file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
+                    file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
+
+DEPENDS = "zlib"
+
+SRC_URI = "ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar \
+           http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
+           file://libxml-64bit.patch \
+           file://ansidecl.patch \
+           file://runtest.patch \
+           file://run-ptest \
+           file://python-sitepackages-dir.patch \
+           file://libxml-m4-use-pkgconfig.patch \
+           file://configure.ac-fix-cross-compiling-warning.patch \
+          "
+
+SRC_URI[libtar.md5sum] = "daece17e045f1c107610e137ab50c179"
+SRC_URI[libtar.sha256sum] = "4de9e31f46b44d34871c22f54bfc54398ef124d6f7cafb1f4a5958fbcd3ba12d"
+SRC_URI[testtar.md5sum] = "ae3d1ebe000a3972afa104ca7f0e1b4a"
+SRC_URI[testtar.sha256sum] = "96151685cec997e1f9f3387e3626d61e6284d4d6e66e0e440c209286c03e9cc7"
+
+BINCONFIG = "${bindir}/xml2-config"
+
+inherit autotools pkgconfig binconfig-disabled pythonnative ptest
+
+RDEPENDS_${PN}-ptest += "python-core"
+
+RDEPENDS_${PN}-python += "python-core"
+
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-ebcdic-us glibc-gconv-ibm1141"
+
+export PYTHON_SITE_PACKAGES="${PYTHON_SITEPACKAGES_DIR}"
+
+PACKAGECONFIG ??= "python"
+PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python"
+
+# WARNING: zlib is require for RPM use
+EXTRA_OECONF = "--without-debug --without-legacy --with-catalog --without-docbook --with-c14n --without-lzma --with-fexceptions"
+EXTRA_OECONF_class-native = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_class-nativesdk = "--without-legacy --without-docbook --with-c14n --without-lzma --with-zlib"
+EXTRA_OECONF_linuxstdbase = "--with-debug --with-legacy --with-docbook --with-c14n --without-lzma --with-zlib"
+
+# required for python binding
+export HOST_SYS
+export BUILD_SYS
+export STAGING_LIBDIR
+export STAGING_INCDIR
+
+python populate_packages_prepend () {
+    # autonamer would call this libxml2-2, but we don't want that
+    if d.getVar('DEBIAN_NAMES', True):
+        d.setVar('PKG_libxml2', '${MLPREFIX}libxml2')
+}
+
+PACKAGES += "${PN}-utils ${PN}-python"
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
+FILES_${PN}-dev += "${libdir}/xml2Conf.sh ${libdir}/cmake/*"
+FILES_${PN}-utils += "${bindir}/*"
+FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
+
+do_install_ptest () {
+	cp -r ${WORKDIR}/xmlconf ${D}${PTEST_PATH}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb b/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
index 840434c..e9578ca 100644
--- a/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/yocto-poky/meta/recipes-core/meta/buildtools-tarball.bb
@@ -23,9 +23,10 @@
     nativesdk-make \
     nativesdk-wget \
     nativesdk-ca-certificates \
+    nativesdk-texinfo \
     "
 
-SDK_PACKAGE_ARCHS =+ "buildtools-dummy-${SDKPKGSUFFIX}"
+SDK_PACKAGE_ARCHS += "buildtools-dummy-${SDKPKGSUFFIX}"
 
 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
 
@@ -56,4 +57,16 @@
 	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
 
 	echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
+
+	if [ "${SDKMACHINE}" = "i686" ]; then
+		echo 'export NO32LIBS="0"' >>$script
+		echo 'echo "$BB_ENV_EXTRAWHITE" | grep -q "NO32LIBS"' >>$script
+		echo '[ $? != 0 ] && export BB_ENV_EXTRAWHITE="NO32LIBS $BB_ENV_EXTRAWHITE"' >>$script
+	fi
 }
+
+# buildtools-tarball doesn't need config site
+TOOLCHAIN_NEED_CONFIGSITE_CACHE = ""
+
+# The recipe doesn't need any default deps
+INHIBIT_DEFAULT_DEPS = "1"
diff --git a/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb b/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
new file mode 100644
index 0000000..3c5db50
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/meta/meta-world-pkgdata.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Pulls in pkgdata for world"
+LICENSE = "MIT"
+INHIBIT_DEFAULT_DEPS = "1"
+
+addtask do_allpackagedata before do_build
+do_allpackagedata() {
+	:
+}
+do_allpackagedata[recrdeptask] = "do_packagedata do_allpackagedata"
+do_allpackagedata[noexec] = "1"
+
+WORLD_PKGDATADIR = "${D}/world-pkgdata"
+
+addtask do_collect_packagedata after do_allpackagedata
+SSTATETASKS += "do_collect_packagedata"
+do_collect_packagedata[sstate-inputdirs] = "${WORLD_PKGDATADIR}"
+do_collect_packagedata[sstate-outputdirs] = "${STAGING_DIR_HOST}/world-pkgdata"
+
+python do_collect_packagedata() {
+    import oe.copy_buildsystem
+    outdir = os.path.join(d.getVar('WORLD_PKGDATADIR', True))
+    bb.utils.mkdirhier(outdir)
+    sigfile = os.path.join(outdir, 'locked-sigs-pkgdata.inc')
+    oe.copy_buildsystem.generate_locked_sigs(sigfile, d)
+}
+
+do_fetch[noexec] = "1"
+do_unpack[noexec] = "1"
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_install[noexec] = "1"
+
+do_configure[deptask] = ""
+
+WORLD_PKGDATA_EXCLUDE ?= ""
+
+python calculate_extra_depends() {
+    exclude = '${WORLD_PKGDATA_EXCLUDE}'.split()
+    for p in world_target:
+        if p == self_pn:
+            continue
+
+        if p in exclude:
+            continue
+
+        deps.append(p)
+}
+
+PACKAGES = ""
diff --git a/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb b/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
index 9041734..2b96111 100644
--- a/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
+++ b/yocto-poky/meta/recipes-core/meta/nativesdk-buildtools-perl-dummy.bb
@@ -4,7 +4,7 @@
 
 inherit allarch
 
-PR = "r1"
+PR = "r2"
 
 python() {
     # Put the package somewhere separate to ensure it's never used except
@@ -20,7 +20,8 @@
 ALLOW_EMPTY_${PN} = "1"
 
 python populate_packages_prepend() {
-    d.appendVar('RPROVIDES_${PN}', '${PERLPACKAGES}')
-    d.appendVar('RCONFLICTS_${PN}', '${PERLPACKAGES}')
+    d.appendVar(d.expand('RPROVIDES_${PN}'), '${PERLPACKAGES}')
+    d.appendVar(d.expand('RCONFLICTS_${PN}'), '${PERLPACKAGES}')
+    d.appendVar(d.expand('RREPLACES_${PN}'), '${PERLPACKAGES}')
 }
 
diff --git a/yocto-poky/meta/recipes-core/meta/signing-keys.bb b/yocto-poky/meta/recipes-core/meta/signing-keys.bb
index cc401f3..e843301 100644
--- a/yocto-poky/meta/recipes-core/meta/signing-keys.bb
+++ b/yocto-poky/meta/recipes-core/meta/signing-keys.bb
@@ -3,43 +3,75 @@
 
 DESCRIPTION = "Make public keys of the signing keys available"
 LICENSE = "MIT"
-PACKAGES = ""
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
+                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 
-do_fetch[noexec] = "1"
-do_unpack[noexec] = "1"
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_install[noexec] = "1"
-do_package[noexec] = "1"
-do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_populate_sysroot[noexec] = "1"
+
+inherit allarch deploy
 
 EXCLUDE_FROM_WORLD = "1"
+INHIBIT_DEFAULT_DEPS = "1"
 
-def export_gpg_pubkey(d, keyid, path):
-    import bb
-    gpg_bin = d.getVar('GPG_BIN', True) or \
-              bb.utils.which(os.getenv('PATH'), "gpg")
-    cmd = '%s --batch --yes --export --armor -o %s %s' % \
-          (gpg_bin, path, keyid)
-    status, output = oe.utils.getstatusoutput(cmd)
-    if status:
-        raise bb.build.FuncFailed('Failed to export gpg public key (%s): %s' %
-                                  (keyid, output))
+PACKAGES =+ "${PN}-ipk ${PN}-rpm ${PN}-packagefeed"
 
-python do_export_public_keys () {
+FILES_${PN}-rpm = "${sysconfdir}/pki/rpm-gpg"
+FILES_${PN}-ipk = "${sysconfdir}/pki/ipk-gpg"
+FILES_${PN}-packagefeed = "${sysconfdir}/pki/packagefeed-gpg"
+
+python do_get_public_keys () {
+    from oe.gpg_sign import get_signer
+
     if d.getVar("RPM_SIGN_PACKAGES", True):
         # Export public key of the rpm signing key
-        export_gpg_pubkey(d, d.getVar("RPM_GPG_NAME", True),
-                          d.getVar('RPM_GPG_PUBKEY', True))
+        signer = get_signer(d, d.getVar('RPM_GPG_BACKEND', True))
+        signer.export_pubkey(os.path.join(d.expand('${B}'), 'rpm-key'),
+                             d.getVar('RPM_GPG_NAME', True))
+
+    if d.getVar("IPK_SIGN_PACKAGES", True):
+        # Export public key of the ipk signing key
+        signer = get_signer(d, d.getVar('IPK_GPG_BACKEND', True))
+        signer.export_pubkey(os.path.join(d.expand('${B}'), 'ipk-key'),
+                             d.getVar('IPK_GPG_NAME', True))
 
     if d.getVar('PACKAGE_FEED_SIGN', True) == '1':
         # Export public key of the feed signing key
-        export_gpg_pubkey(d, d.getVar("PACKAGE_FEED_GPG_NAME", True),
-                          d.getVar('PACKAGE_FEED_GPG_PUBKEY', True))
+        signer = get_signer(d, d.getVar('PACKAGE_FEED_GPG_BACKEND', True))
+        signer.export_pubkey(os.path.join(d.expand('${B}'), 'pf-key'),
+                             d.getVar('PACKAGE_FEED_GPG_NAME', True))
 }
-addtask do_export_public_keys before do_build
+do_get_public_keys[cleandirs] = "${B}"
+addtask get_public_keys before do_install
+
+do_install () {
+    if [ -f "${B}/rpm-key" ]; then
+        install -D -m 0644 "${B}/rpm-key" "${D}${sysconfdir}/pki/rpm-gpg/RPM-GPG-KEY-${DISTRO_VERSION}"
+    fi
+    if [ -f "${B}/ipk-key" ]; then
+        install -D -m 0644 "${B}/ipk-key" "${D}${sysconfdir}/pki/ipk-gpg/IPK-GPG-KEY-${DISTRO_VERSION}"
+    fi
+    if [ -f "${B}/pf-key" ]; then
+        install -D -m 0644 "${B}/pf-key" "${D}${sysconfdir}/pki/packagefeed-gpg/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}"
+    fi
+}
+
+sysroot_stage_all_append () {
+    sysroot_stage_dir ${D}${sysconfdir}/pki ${SYSROOT_DESTDIR}${sysconfdir}/pki
+}
+
+do_deploy () {
+    if [ -f "${B}/rpm-key" ]; then
+        install -D -m 0644 "${B}/rpm-key" "${DEPLOYDIR}/RPM-GPG-KEY-${DISTRO_VERSION}"
+    fi
+    if [ -f "${B}/ipk-key" ]; then
+        install -D -m 0644 "${B}/ipk-key" "${DEPLOYDIR}/IPK-GPG-KEY-${DISTRO_VERSION}"
+    fi
+    if [ -f "${B}/pf-key" ]; then
+        install -D -m 0644 "${B}/pf-key" "${DEPLOYDIR}/PACKAGEFEED-GPG-KEY-${DISTRO_VERSION}"
+    fi
+}
+do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_RPM}"
+# cleandirs should possibly be in deploy.bbclass but we need it
+do_deploy[cleandirs] = "${DEPLOYDIR}"
+# clear stamp-extra-info since MACHINE is normally put there by deploy.bbclass
+do_deploy[stamp-extra-info] = ""
+addtask deploy after do_get_public_keys
diff --git a/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb b/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
index 21f3bd9..a983e42 100644
--- a/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
+++ b/yocto-poky/meta/recipes-core/meta/uninative-tarball.bb
@@ -5,15 +5,18 @@
 
 TOOLCHAIN_TARGET_TASK = ""
 
+# ibm850 - mcopy from mtools
+# iso8859-1 - guile
 TOOLCHAIN_HOST_TASK = "\
     nativesdk-glibc \
     nativesdk-glibc-gconv-ibm850 \
+    nativesdk-glibc-gconv-iso8859-1 \
     nativesdk-patchelf \
     "
 
 INHIBIT_DEFAULT_DEPS = "1"
 
-TOOLCHAIN_OUTPUTNAME ?= "${BUILD_ARCH}-nativesdk-libc"
+TOOLCHAIN_OUTPUTNAME ?= "${SDK_ARCH}-nativesdk-libc"
 
 RDEPENDS = "${TOOLCHAIN_HOST_TASK}"
 
@@ -43,9 +46,11 @@
 fakeroot tar_sdk() {
 	mkdir -p ${SDK_DEPLOY}
 	cd ${SDK_OUTPUT}/${SDKPATH}
-	mv sysroots/${SDK_SYS} ./${BUILD_SYS}
+
+	DEST="./${SDK_ARCH}-${SDK_OS}"
+	mv sysroots/${SDK_SYS} $DEST
 	rm sysroots -rf
-	patchelf --set-interpreter ${@''.join('a' for n in xrange(1024))} ./${BUILD_SYS}/usr/bin/patchelf
-	mv ./${BUILD_SYS}/usr/bin/patchelf ./${BUILD_SYS}/usr/bin/patchelf-uninative
+	patchelf --set-interpreter ${@''.join('a' for n in xrange(1024))} $DEST/usr/bin/patchelf
+	mv $DEST/usr/bin/patchelf $DEST/usr/bin/patchelf-uninative
 	tar ${SDKTAROPTS} -c -j --file=${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
 }
diff --git a/yocto-poky/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch b/yocto-poky/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
new file mode 100644
index 0000000..5490b1c
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
@@ -0,0 +1,34 @@
+From 94c0b97b62125d8bbc92dce0694e387d5b2ad181 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 10 Jan 2016 12:14:02 -0800
+Subject: [PATCH] Make dynamic linker a relative symlink to libc
+
+absolute symlink into $(libdir) fails to load in a cross build
+environment, especially when executing qemu in usermode to run target
+applications, which cross build systems often do, since not everything
+can be computed during cross builds, qemu in usermode often comes to aid
+in such situations to feed into cross builds.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index b2226fa..0d71f7f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -189,7 +189,7 @@ $(DESTDIR)$(includedir)/%: include/%
+ 	$(INSTALL) -D -m 644 $< $@
+ 
+ $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
+-	$(INSTALL) -D -l $(libdir)/libc.so $@ || true
++	$(INSTALL) -D -l ..$(libdir)/libc.so $@ || true
+ 
+ install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)
+ 
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-core/musl/musl.inc b/yocto-poky/meta/recipes-core/musl/musl.inc
new file mode 100644
index 0000000..d27867f
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/musl/musl.inc
@@ -0,0 +1,26 @@
+# Copyright (C) 2014 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "An implementation of the standard library for Linux-based systems"
+DESCRIPTION = "A new standard library to power a new generation of Linux-based devices. \
+musl is lightweight, fast, simple, free, and strives to be correct in the sense of \
+standards-conformance and safety."
+
+HOMEPAGE = "http://www.musl-libc.org/"
+LICENSE = "MIT"
+SECTION = "libs"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=082411391b4d1ace0d30f4c84317cc05"
+
+PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:"
+TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TCBOOTSTRAP}"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+STAGINGCC = "gcc-cross-initial-${TARGET_ARCH}"
+STAGINGCC_class-nativesdk = "gcc-crosssdk-initial-${TARGET_ARCH}"
+
+
+FILES_SOLIBSDEV = ""
+FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}"
+INSANE_SKIP_${PN} = "dev-so"
+
diff --git a/yocto-poky/meta/recipes-core/musl/musl_git.bb b/yocto-poky/meta/recipes-core/musl/musl_git.bb
new file mode 100644
index 0000000..d4f9819
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/musl/musl_git.bb
@@ -0,0 +1,61 @@
+# Copyright (C) 2014 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require musl.inc
+
+SRCREV = "5978eb703ce0e64dd778a88c1ffffb76fe5e2202"
+
+PV = "1.1.14+git${SRCPV}"
+
+# mirror is at git://github.com/kraj/musl.git
+
+SRC_URI = "git://git.musl-libc.org/musl \
+           file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
+          "
+
+S = "${WORKDIR}/git"
+
+PROVIDES += "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc virtual/libiconv virtual/libintl"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils \
+           virtual/${TARGET_PREFIX}gcc-initial \
+           libgcc-initial \
+           linux-libc-headers \
+           bsd-headers \
+          "
+
+export CROSS_COMPILE="${TARGET_PREFIX}"
+
+EXTRA_OEMAKE = ""
+
+LDFLAGS += "-Wl,-soname,libc.so"
+
+CONFIGUREOPTS = " \
+    --prefix=${prefix} \
+    --exec-prefix=${exec_prefix} \
+    --bindir=${bindir} \
+    --libdir=${libdir} \
+    --includedir=${includedir} \
+    --syslibdir=${base_libdir} \
+"
+
+do_configure() {
+	${S}/configure ${CONFIGUREOPTS}
+}
+
+do_compile() {
+	oe_runmake
+}
+
+do_install() {
+	oe_runmake install DESTDIR='${D}'
+
+	install -d ${D}${bindir}
+	ln -s ../../${libdir}/libc.so ${D}${bindir}/ldd
+}
+
+RDEPENDS_${PN}-dev += "linux-libc-headers-dev bsd-headers-dev"
+RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
+RPROVIDES_${PN} += "ldd libsegfault rtld(GNU_HASH)"
+
+LEAD_SONAME = "libc.so"
diff --git a/yocto-poky/meta/recipes-core/ncurses/ncurses-5.9/config.cache b/yocto-poky/meta/recipes-core/ncurses/files/config.cache
similarity index 100%
rename from yocto-poky/meta/recipes-core/ncurses/ncurses-5.9/config.cache
rename to yocto-poky/meta/recipes-core/ncurses/files/config.cache
diff --git a/yocto-poky/meta/recipes-core/ncurses/ncurses-5.9/tic-hang.patch b/yocto-poky/meta/recipes-core/ncurses/files/tic-hang.patch
similarity index 100%
rename from yocto-poky/meta/recipes-core/ncurses/ncurses-5.9/tic-hang.patch
rename to yocto-poky/meta/recipes-core/ncurses/files/tic-hang.patch
diff --git a/yocto-poky/meta/recipes-core/ncurses/ncurses.inc b/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
index ffd80ee..ff0117b 100644
--- a/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
+++ b/yocto-poky/meta/recipes-core/ncurses/ncurses.inc
@@ -6,14 +6,13 @@
 SECTION = "libs"
 DEPENDS = "ncurses-native"
 DEPENDS_class-native = ""
-INC_PR = "r15"
 
-BINCONFIG = "${bindir}/ncurses-config"
+BINCONFIG = "${bindir}/ncurses5-config ${bindir}/ncursesw5-config"
 
 inherit autotools binconfig-disabled multilib_header pkgconfig
 
 # Upstream has useful patches at times at ftp://invisible-island.net/ncurses/
-SRC_URI = "ftp://invisible-island.net/${BPN}/current/${BP}-${REVISION}.tgz"
+SRC_URI = "git://anonscm.debian.org/collab-maint/ncurses.git"
 
 EXTRA_AUTORECONF = "-I m4"
 CONFIG_SITE =+ "${WORKDIR}/config.cache"
@@ -146,9 +145,14 @@
 # Split original _install_opts to two parts.
 # One is the options to install contents, the other is the parameters \
 # when running command "make install"
-_install_opts = "\
-  install.libs install.includes install.man \
-"
+# Note that install.libs will also implicitly install header files,
+# so we do not need to explicitly specify install.includes.
+# Doing so could in fact result in a race condition, as both targets
+# (install.libs and install.includes) would install the same headers
+# at the same time
+
+_install_opts = " install.libs install.man "
+
 _install_cfgs = "\
   DESTDIR='${D}' \
   PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \
@@ -265,8 +269,8 @@
 
 PACKAGES += " \
   ${PN}-tools \
-  ${PN}-terminfo \
   ${PN}-terminfo-base \
+  ${PN}-terminfo \
 "
 
 FILES_${PN} = "\
@@ -285,8 +289,8 @@
   ${bindir}/infotocap \
   ${bindir}/captoinfo \
   ${bindir}/infocmp \
-  ${bindir}/clear${@['', '.${BPN\x7d']['${CLASSOVERRIDE}' == 'class-target']} \
-  ${bindir}/reset${@['', '.${BPN\x7d']['${CLASSOVERRIDE}' == 'class-target']} \
+  ${bindir}/clear${@['', '.${BPN}']['${CLASSOVERRIDE}' == 'class-target']} \
+  ${bindir}/reset${@['', '.${BPN}']['${CLASSOVERRIDE}' == 'class-target']} \
   ${bindir}/tack \
   ${bindir}/tabs \
 "
diff --git a/yocto-poky/meta/recipes-core/ncurses/ncurses_5.9.bb b/yocto-poky/meta/recipes-core/ncurses/ncurses_5.9.bb
deleted file mode 100644
index 54d27a9..0000000
--- a/yocto-poky/meta/recipes-core/ncurses/ncurses_5.9.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require ncurses.inc
-
-REVISION = "20150329"
-
-PR = "${INC_PR}.1"
-
-SRC_URI += "file://tic-hang.patch \
-            file://config.cache \
-"
-S = "${WORKDIR}/${BP}-${REVISION}"
-SRC_URI[md5sum] = "cee991d09e69e60ebedef424804c52d4"
-SRC_URI[sha256sum] = "5b64f40e4dce73e3aa83d15bd9257c6eff8790ec41150f0938bd87c0eb75828f"
diff --git a/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160213.bb b/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160213.bb
new file mode 100644
index 0000000..0d56481
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/ncurses/ncurses_6.0+20160213.bb
@@ -0,0 +1,10 @@
+require ncurses.inc
+
+SRC_URI += "file://tic-hang.patch \
+            file://config.cache \
+"
+# commit id corresponds to the revision in package version
+SRCREV = "a25949ff653ac5ae7a204381a3ebfd800feeaa01"
+S = "${WORKDIR}/git"
+EXTRA_OECONF += "--with-abi-version=5"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+(\+\d+)*)"
diff --git a/yocto-poky/meta/recipes-core/netbase/netbase/hosts b/yocto-poky/meta/recipes-core/netbase/netbase/hosts
index 2f33245..b94f414 100644
--- a/yocto-poky/meta/recipes-core/netbase/netbase/hosts
+++ b/yocto-poky/meta/recipes-core/netbase/netbase/hosts
@@ -1,2 +1,8 @@
 127.0.0.1	localhost.localdomain		localhost
 
+# The following lines are desirable for IPv6 capable hosts
+::1     localhost ip6-localhost ip6-loopback
+fe00::0 ip6-localnet
+ff00::0 ip6-mcastprefix
+ff02::1 ip6-allnodes
+ff02::2 ip6-allrouters
diff --git a/yocto-poky/meta/recipes-core/os-release/os-release.bb b/yocto-poky/meta/recipes-core/os-release/os-release.bb
index c690b82..f519add 100644
--- a/yocto-poky/meta/recipes-core/os-release/os-release.bb
+++ b/yocto-poky/meta/recipes-core/os-release/os-release.bb
@@ -23,28 +23,26 @@
 BUILD_ID ?= "${DATETIME}"
 BUILD_ID[vardepsexclude] = "DATETIME"
 
+def sanitise_version(ver):
+    # VERSION_ID should be (from os-release(5)):
+    #    lower-case string (mostly numeric, no spaces or other characters
+    #    outside of 0-9, a-z, ".", "_" and "-")
+    ret = ver.replace('+', '-').replace(' ','_')
+    return ret.lower()
+
 python do_compile () {
     import shutil
     with open(d.expand('${B}/os-release'), 'w') as f:
         for field in d.getVar('OS_RELEASE_FIELDS', True).split():
             value = d.getVar(field, True)
+            if value and field == 'VERSION_ID':
+                value = sanitise_version(value)
             if value:
-                f.write('{0}={1}\n'.format(field, value))
-    if d.getVar('RPM_SIGN_PACKAGES', True) == '1':
-        rpm_gpg_pubkey = d.getVar('RPM_GPG_PUBKEY', True)
-        bb.utils.mkdirhier('${B}/rpm-gpg')
-        distro_version = d.getVar('DISTRO_VERSION', True) or "oe.0"
-        shutil.copy2(rpm_gpg_pubkey, d.expand('${B}/rpm-gpg/RPM-GPG-KEY-%s' % distro_version))
+                f.write('{0}="{1}"\n'.format(field, value))
 }
 do_compile[vardeps] += "${OS_RELEASE_FIELDS}"
-do_compile[depends] += "signing-keys:do_export_public_keys"
 
 do_install () {
     install -d ${D}${sysconfdir}
     install -m 0644 os-release ${D}${sysconfdir}/
-
-    if [ -d "rpm-gpg" ]; then
-        install -d "${D}${sysconfdir}/pki"
-        cp -r "rpm-gpg" "${D}${sysconfdir}/pki/"
-    fi
 }
diff --git a/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb b/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
index 09f5373..bac93b8 100644
--- a/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
+++ b/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
@@ -24,7 +24,7 @@
 VIRTUAL-RUNTIME_initscripts ?= "initscripts"
 VIRTUAL-RUNTIME_keymaps ?= "keymaps"
 
-SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', 'busybox-hwclock', '', d)} \
+SYSVINIT_SCRIPTS = "${@bb.utils.contains('MACHINE_FEATURES', 'rtc', '${VIRTUAL-RUNTIME_base-utils-hwclock}', '', d)} \
                     modutils-initscripts \
                     init-ifupdown \
                     ${VIRTUAL-RUNTIME_initscripts} \
@@ -33,7 +33,7 @@
 RDEPENDS_${PN} = "\
     base-files \
     base-passwd \
-    busybox \
+    ${VIRTUAL-RUNTIME_base-utils} \
     ${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${SYSVINIT_SCRIPTS}", "", d)} \
     ${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
     netbase \
diff --git a/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb b/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
index 3badd0e..bee1665 100644
--- a/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
+++ b/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-sdk.bb
@@ -32,9 +32,11 @@
 SANITIZERS_mips = ""
 SANITIZERS_mips64 = ""
 SANITIZERS_mips64n32 = ""
+SANITIZERS_nios2 = ""
 SANITIZERS_powerpc64 = ""
 SANITIZERS_sparc = ""
 SANITIZERS_libc-musl = ""
+SANITIZERS_libc-uclibc = ""
 
 RRECOMMENDS_packagegroup-core-sdk = "\
     libgomp \
diff --git a/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
index 80f5933..ff2b577 100644
--- a/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
+++ b/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb
@@ -17,7 +17,7 @@
 PROFILE_TOOLS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-analyze', '', d)}"
 
 RRECOMMENDS_${PN} = "\
-    perf \
+    ${PERF} \
     trace-cmd \
     blktrace \
     ${PROFILE_TOOLS_X} \
@@ -28,14 +28,18 @@
     powertop \
     latencytop \
     "
+PERF = "perf"
+PERF_libc-musl = ""
 
 # systemtap needs elfutils which is not fully buildable on uclibc
 # hence we exclude it from uclibc based builds
 SYSTEMTAP = "systemtap"
 SYSTEMTAP_libc-uclibc = ""
+SYSTEMTAP_libc-musl = ""
 SYSTEMTAP_mips = ""
 SYSTEMTAP_mips64 = ""
 SYSTEMTAP_mips64n32 = ""
+SYSTEMTAP_nios2 = ""
 SYSTEMTAP_aarch64 = ""
 
 # lttng-ust uses sched_getcpu() which is not there on uclibc
@@ -46,30 +50,27 @@
 
 LTTNGUST = "lttng-ust"
 LTTNGUST_libc-uclibc = ""
-LTTNGUST_aarch64 = ""
+LTTNGUST_libc-musl = ""
 
 LTTNGTOOLS = "lttng-tools"
-LTTNGTOOLS_aarch64 = ""
+LTTNGTOOLS_libc-musl = ""
 
 LTTNGMODULES = "lttng-modules"
-LTTNGMODULES_aarch64 = ""
 
 BABELTRACE = "babeltrace"
-BABELTRACE_aarch64 = ""
 
 # valgrind does not work on mips
 
 VALGRIND = "valgrind"
 VALGRIND_libc-uclibc = ""
+VALGRIND_libc-musl = ""
 VALGRIND_mips = ""
 VALGRIND_mips64 = ""
 VALGRIND_mips64n32 = ""
+VALGRIND_nios2 = ""
 VALGRIND_arm = ""
 VALGRIND_aarch64 = ""
 
-#    exmap-console
-#    exmap-server
-
 RDEPENDS_${PN} = "\
     ${PROFILETOOLS} \
     ${LTTNGUST} \
diff --git a/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
index 95b3988..e8d585e 100644
--- a/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
+++ b/yocto-poky/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb
@@ -11,13 +11,10 @@
 
 inherit packagegroup
 
-# kexec-tools doesn't work on Mips
+# kexec-tools doesn't work on e5500-64b and nios2 yet
 KEXECTOOLS ?= "kexec"
-KEXECTOOLS_mips ?= ""
-KEXECTOOLS_mipsel ?= ""
-KEXECTOOLS_powerpc ?= ""
 KEXECTOOLS_e5500-64b ?= ""
-KEXECTOOLS_aarch64 ?= ""
+KEXECTOOLS_nios2 ?= ""
 
 X11GLTOOLS = "\
     mesa-demos \
diff --git a/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb b/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
index d38be26..225204d 100644
--- a/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
+++ b/yocto-poky/meta/recipes-core/packagegroups/packagegroup-self-hosted.bb
@@ -45,9 +45,11 @@
     mc-helpers-perl \
     mc-helpers-python \
     parted \
-    pseudo \
+    ${PSEUDO} \
     screen \
     "
+PSEUDO = "pseudo"
+PSEUDO_libc-musl = ""
 
 RRECOMMENDS_packagegroup-self-hosted-host-tools = "\
     kernel-module-tun \
@@ -67,7 +69,6 @@
     cpp \
     cpp-symlinks \
     distcc \
-    glibc-gconv-ibm850 \
     file \
     findutils \
     g++ \
@@ -93,6 +94,7 @@
     "
 # glibc-utils: for rpcgen
 RDEPENDS_packagegroup-self-hosted-sdk_append_libc-glibc = "\
+    glibc-gconv-ibm850 \
     glibc-utils \
     "
 RDEPENDS_packagegroup-self-hosted-debug = " \
@@ -150,7 +152,6 @@
     perl-dev \
     perl-modules \
     perl-pod \
-    ${PTH} \
     python \
     python-compiler \
     python-git \
@@ -190,7 +191,6 @@
     libsdl \
     libsdl-dev \
     libx11-dev \
-    python-pygtk \
     gtk-theme-clearlooks \
     xdg-utils \
     epiphany \
@@ -198,5 +198,3 @@
     pcmanfm \
     vte \
     "
-PTH = "pth"
-PTH_libc-uclibc = ""
diff --git a/yocto-poky/meta/recipes-core/psplash/files/0001-psplash-fb-Convert-psplash_fb_plot_pixel-to-a-static.patch b/yocto-poky/meta/recipes-core/psplash/files/0001-psplash-fb-Convert-psplash_fb_plot_pixel-to-a-static.patch
deleted file mode 100644
index 93b3c6b..0000000
--- a/yocto-poky/meta/recipes-core/psplash/files/0001-psplash-fb-Convert-psplash_fb_plot_pixel-to-a-static.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 8f5de12cc75bfaa8400adf32f30c015d8f813540 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 22 Aug 2015 07:12:20 -0700
-Subject: [PATCH] psplash-fb: Convert psplash_fb_plot_pixel() to a static
- inline
-
-This function is not used outside psplash-fb.c and by making it
-static inline we keep the performance and also make it portable across
-multiple compilers and gcc versions
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- psplash-fb.c | 2 +-
- psplash-fb.h | 8 --------
- 2 files changed, 1 insertion(+), 9 deletions(-)
-
-diff --git a/psplash-fb.c b/psplash-fb.c
-index bd9cd9d..6d235db 100644
---- a/psplash-fb.c
-+++ b/psplash-fb.c
-@@ -260,7 +260,7 @@ psplash_fb_new (int angle)
- 
- #define OFFSET(fb,x,y) (((y) * (fb)->stride) + ((x) * ((fb)->bpp >> 3)))
- 
--inline void
-+static inline void
- psplash_fb_plot_pixel (PSplashFB    *fb,
- 		       int          x,
- 		       int          y,
-diff --git a/psplash-fb.h b/psplash-fb.h
-index 42592ed..c6c3144 100644
---- a/psplash-fb.h
-+++ b/psplash-fb.h
-@@ -57,14 +57,6 @@ psplash_fb_destroy (PSplashFB *fb);
- PSplashFB*
- psplash_fb_new (int angle);
- 
--inline void
--psplash_fb_plot_pixel (PSplashFB    *fb, 
--		       int          x, 
--		       int          y, 
--		       uint8        red,
--		       uint8        green,
--		       uint8        blue);
--
- void
- psplash_fb_draw_rect (PSplashFB    *fb, 
- 		      int          x, 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/psplash/psplash_git.bb b/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
index b3b6479..0537426 100644
--- a/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
+++ b/yocto-poky/meta/recipes-core/psplash/psplash_git.bb
@@ -5,12 +5,11 @@
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=16;md5=840fb2356b10a85bed78dd09dc7745c6"
 
-SRCREV = "14c8f7b705de944beb4de3f296506d80871e410f"
+SRCREV = "88343ad23c90fa1dd8d79ac0d784a691aa0c6d2b"
 PV = "0.1+git${SRCPV}"
 PR = "r15"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN} \
-           file://0001-psplash-fb-Convert-psplash_fb_plot_pixel-to-a-static.patch \
            file://psplash-init \
            ${SPLASH_IMAGES}"
 
diff --git a/yocto-poky/meta/recipes-core/base-files/base-files/inputrc b/yocto-poky/meta/recipes-core/readline/files/inputrc
similarity index 100%
rename from yocto-poky/meta/recipes-core/base-files/base-files/inputrc
rename to yocto-poky/meta/recipes-core/readline/files/inputrc
diff --git a/yocto-poky/meta/recipes-core/readline/files/norpath.patch b/yocto-poky/meta/recipes-core/readline/readline-6.3/norpath.patch
similarity index 100%
rename from yocto-poky/meta/recipes-core/readline/files/norpath.patch
rename to yocto-poky/meta/recipes-core/readline/readline-6.3/norpath.patch
diff --git a/yocto-poky/meta/recipes-core/readline/readline-6.3/readline-cve-2014-2524.patch b/yocto-poky/meta/recipes-core/readline/readline-6.3/readline-cve-2014-2524.patch
deleted file mode 100644
index 98a9d81..0000000
--- a/yocto-poky/meta/recipes-core/readline/readline-6.3/readline-cve-2014-2524.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-readline: Security Advisory - readline - CVE-2014-2524
-
-Upstream-Status: Backport
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
-
-			   READLINE PATCH REPORT
-			   =====================
-
-Readline-Release: 6.3
-Patch-ID: readline63-003
-
-Bug-Reported-by:
-Bug-Reference-ID:
-Bug-Reference-URL:
-
-Bug-Description:
-
-There are debugging functions in the readline release that are theoretically
-exploitable as security problems.  They are not public functions, but have
-global linkage.
-
-Patch (apply with `patch -p0'):
-
-*** ../readline-6.3/util.c	2013-09-02 13:36:12.000000000 -0400
---- util.c	2014-03-20 10:25:53.000000000 -0400
-***************
-*** 477,480 ****
---- 479,483 ----
-  }
-  
-+ #if defined (DEBUG)
-  #if defined (USE_VARARGS)
-  static FILE *_rl_tracefp;
-***************
-*** 539,542 ****
---- 542,546 ----
-  }
-  #endif
-+ #endif /* DEBUG */
-  
-  
-
diff --git a/yocto-poky/meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch b/yocto-poky/meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch
deleted file mode 100644
index 54d1ac6..0000000
--- a/yocto-poky/meta/recipes-core/readline/readline-6.3/readline-dispatch-multikey.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 8ef852a5be72c75e17f2510bea52455f809b56ce Mon Sep 17 00:00:00 2001
-From: Chet Ramey <chet.ramey@case.edu>
-Date: Fri, 28 Mar 2014 14:07:42 -0400
-Subject: [PATCH 04/10] Readline-6.3 patch 2
-
-Fixes multi-key issue identified in this thread:
-http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00010.html
-
-Upstream-Status: Backport
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- readline.c | 3 ++-
- 1 files changed, 2 insertions(+), 1 deletions(-)
-
-diff --git a/readline.c b/readline.c
-index eb4eae3..abb29a0 100644
---- a/readline.c
-+++ b/readline.c
-@@ -744,7 +744,8 @@ _rl_dispatch_callback (cxt)
-     r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
- 
-   RL_CHECK_SIGNALS ();
--  if (r == 0)			/* success! */
-+  /* We only treat values < 0 specially to simulate recursion. */
-+  if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0))	/* success! or failure! */
-     {
-       _rl_keyseq_chain_dispose ();
-       RL_UNSETSTATE (RL_STATE_MULTIKEY);
--- 
-1.8.3.1
-
diff --git a/yocto-poky/meta/recipes-core/readline/readline.inc b/yocto-poky/meta/recipes-core/readline/readline.inc
index 3f662c3..35df8b4 100644
--- a/yocto-poky/meta/recipes-core/readline/readline.inc
+++ b/yocto-poky/meta/recipes-core/readline/readline.inc
@@ -11,10 +11,8 @@
 
 DEPENDS += "ncurses"
 
-SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive \
-           file://configure-fix.patch \
-           file://config-dirent-symbols.patch \
-           file://norpath.patch"
+SRC_URI = "${GNU_MIRROR}/readline/${BPN}-${PV}.tar.gz;name=archive"
+SRC_URI += "file://inputrc"
 
 inherit autotools texinfo
 
@@ -34,6 +32,11 @@
 	oe_libinstall -so -C shlib libreadline ${D}${libdir}
 
 	rmdir ${D}${bindir}
+
+	install -m 0755 -d ${D}${sysconfdir}
+	install -m 0644 ${WORKDIR}/inputrc ${D}${sysconfdir}/inputrc
 }
 
 BBCLASSEXTEND = "native nativesdk"
+
+CONFFILES_${PN} += "${sysconfdir}/inputrc"
diff --git a/yocto-poky/meta/recipes-core/readline/readline_6.3.bb b/yocto-poky/meta/recipes-core/readline/readline_6.3.bb
index fc362ae..8ec7c4a 100644
--- a/yocto-poky/meta/recipes-core/readline/readline_6.3.bb
+++ b/yocto-poky/meta/recipes-core/readline/readline_6.3.bb
@@ -1,8 +1,34 @@
 require readline.inc
 
-SRC_URI += "file://readline-cve-2014-2524.patch;striplevel=0 \
-            file://readline-dispatch-multikey.patch"
+SRC_URI += "${GNU_MIRROR}/readline/readline-6.3-patches/readline63-001;name=patch1;apply=yes;striplevel=0 \
+            ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-002;name=patch2;apply=yes;striplevel=0 \
+            ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-003;name=patch3;apply=yes;striplevel=0 \
+            ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-004;name=patch4;apply=yes;striplevel=0 \
+            ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-005;name=patch5;apply=yes;striplevel=0 \
+            ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-006;name=patch6;apply=yes;striplevel=0 \
+            ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-007;name=patch7;apply=yes;striplevel=0 \
+            ${GNU_MIRROR}/readline/readline-6.3-patches/readline63-008;name=patch8;apply=yes;striplevel=0 \
+            file://configure-fix.patch \
+            file://config-dirent-symbols.patch \
+            file://norpath.patch"
 
 SRC_URI[archive.md5sum] = "33c8fb279e981274f485fd91da77e94a"
 SRC_URI[archive.sha256sum] = "56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43"
 
+SRC_URI[patch1.md5sum]    = "4343f5ea9b0f42447f102fb61576b398"
+SRC_URI[patch1.sha256sum] = "1a79bbb6eaee750e0d6f7f3d059b30a45fc54e8e388a8e05e9c3ae598590146f"
+SRC_URI[patch2.md5sum]    = "700295212f7e2978577feaee584afddb"
+SRC_URI[patch2.sha256sum] = "39e304c7a526888f9e112e733848215736fb7b9d540729b9e31f3347b7a1e0a5"
+SRC_URI[patch3.md5sum]    = "af4963862f5156fbf9111c2c6fa86ed7"
+SRC_URI[patch3.sha256sum] = "ec41bdd8b00fd884e847708513df41d51b1243cecb680189e31b7173d01ca52f"
+SRC_URI[patch4.md5sum]    = "11f9def89803a5052db3ba72394ce14f"
+SRC_URI[patch4.sha256sum] = "4547b906fb2570866c21887807de5dee19838a60a1afb66385b272155e4355cc"
+SRC_URI[patch5.md5sum]    = "93721c31cd225393f80cb3aadb165544"
+SRC_URI[patch5.sha256sum] = "877788f9228d1a9907a4bcfe3d6dd0439c08d728949458b41208d9bf9060274b"
+SRC_URI[patch6.md5sum]    = "71dc6ecce66d1489b96595f55d142a52"
+SRC_URI[patch6.sha256sum] = "5c237ab3c6c97c23cf52b2a118adc265b7fb411b57c93a5f7c221d50fafbe556"
+SRC_URI[patch7.md5sum]    = "062a08ed60679d3c4878710b3d595b65"
+SRC_URI[patch7.sha256sum] = "4d79b5a2adec3c2e8114cbd3d63c1771f7c6cf64035368624903d257014f5bea"
+SRC_URI[patch8.md5sum]    = "ee1c04072154826870848d8b218d7b04"
+SRC_URI[patch8.sha256sum] = "3bc093cf526ceac23eb80256b0ec87fa1735540d659742107b6284d635c43787"
+
diff --git a/yocto-poky/meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb b/yocto-poky/meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb
index b9f40f4..f9f067d 100644
--- a/yocto-poky/meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb
+++ b/yocto-poky/meta/recipes-core/sysfsutils/sysfsutils_2.1.0.bb
@@ -17,6 +17,10 @@
 
 SRC_URI[md5sum] = "14e7dcd0436d2f49aa403f67e1ef7ddc"
 SRC_URI[sha256sum] = "e865de2c1f559fff0d3fc936e660c0efaf7afe662064f2fb97ccad1ec28d208a"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linux-diag/files/sysfsutils/"
+UPSTREAM_CHECK_REGEX = "/sysfsutils/(?P<pver>(\d+[\.\-_]*)+)/"
+
 S = "${WORKDIR}/sysfsutils-${PV}"
 
 inherit autotools
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service b/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
index 182167b..e8b027e 100644
--- a/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
+++ b/yocto-poky/meta/recipes-core/systemd/systemd-serialgetty/serial-getty@.service
@@ -21,7 +21,7 @@
 
 [Service]
 Environment="TERM=xterm"
-ExecStart=-/sbin/agetty -8 -L --keep-baud %I @BAUDRATE@ $TERM
+ExecStart=-/sbin/agetty -8 -L %I @BAUDRATE@ $TERM
 Type=idle
 Restart=always
 RestartSec=0
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd-systemctl/systemctl b/yocto-poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
index 6e163bd..efad14c 100755
--- a/yocto-poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
+++ b/yocto-poky/meta/recipes-core/systemd/systemd-systemctl/systemctl
@@ -108,7 +108,7 @@
 
 	# If any new unit types are added to systemd they should be added
 	# to this regular expression.
-	unit_types_re='\.\(service\|socket\|device\|mount\|automount\|swap\|target\|path\|timer\|snapshot\)$'
+	unit_types_re='\.\(service\|socket\|device\|mount\|automount\|swap\|target\|path\|timer\|snapshot\)\s*$'
 	if [ "$action" = "preset" ]; then
 		action=`egrep -sh  $service $ROOT/etc/systemd/user-preset/*.preset | cut -f1 -d' '`
 		if [ -z "$action" ]; then
@@ -125,33 +125,46 @@
 		        | tr ',' '\n' \
 		        | grep "$unit_types_re")
 
-	for r in $wanted_by; do
-		echo "WantedBy=$r found in $service"
-		if [ "$action" = "enable" ]; then
-			enable_service=$service
-			if [ "$service_template" = true -a "$instance_specified" = false ]; then
-				default_instance=$(sed '/^DefaultInstance[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file")
-				if [ -z $default_instance ]; then
-					echo "Template unit without instance or DefaultInstance directive, nothing to enable"
-					continue
-				else
-					echo "Found DefaultInstance $default_instance, enabling it"
-					enable_service=$(echo $service | sed "s/@/@$default_instance/")
-				fi
-			fi
-			mkdir -p $ROOT/etc/systemd/system/$r.wants
-			ln -s $service_file $ROOT/etc/systemd/system/$r.wants/$enable_service
-			echo "Enabled $enable_service for $wanted_by."
-		else
-			if [ "$service_template" = true -a "$instance_specified" = false ]; then
-				disable_service="$ROOT/etc/systemd/system/$r.wants/`echo $service | sed 's/@/@*/'`"
-			else
-				disable_service="$ROOT/etc/systemd/system/$r.wants/$service"
-			fi
-			rm -f $disable_service
-			[ -d $ROOT/etc/systemd/system/$r.wants ] && rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.wants
-			echo "Disabled ${disable_service##$ROOT/etc/systemd/system/$r.wants/} for $wanted_by."
+	required_by=$(sed '/^RequiredBy[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file" \
+		        | tr ',' '\n' \
+		        | grep "$unit_types_re")
+
+	for dependency in WantedBy RequiredBy; do
+		if [ "$dependency" = "WantedBy" ]; then
+			suffix="wants"
+			dependency_list="$wanted_by"
+		elif [ "$dependency" = "RequiredBy" ]; then
+			suffix="requires"
+			dependency_list="$required_by"
 		fi
+		for r in $dependency_list; do
+			echo "$dependency=$r found in $service"
+			if [ "$action" = "enable" ]; then
+				enable_service=$service
+				if [ "$service_template" = true -a "$instance_specified" = false ]; then
+					default_instance=$(sed '/^DefaultInstance[[:space:]]*=/s,[^=]*=,,p;d' "$ROOT/$service_file")
+					if [ -z $default_instance ]; then
+						echo "Template unit without instance or DefaultInstance directive, nothing to enable"
+						continue
+					else
+						echo "Found DefaultInstance $default_instance, enabling it"
+						enable_service=$(echo $service | sed "s/@/@$(echo $default_instance | sed 's/\\/\\\\/g')/")
+					fi
+				fi
+				mkdir -p $ROOT/etc/systemd/system/$r.$suffix
+				ln -s $service_file $ROOT/etc/systemd/system/$r.$suffix/$enable_service
+				echo "Enabled $enable_service for $r."
+			else
+				if [ "$service_template" = true -a "$instance_specified" = false ]; then
+					disable_service="$ROOT/etc/systemd/system/$r.$suffix/`echo $service | sed 's/@/@*/'`"
+				else
+					disable_service="$ROOT/etc/systemd/system/$r.$suffix/$service"
+				fi
+				rm -f $disable_service
+				[ -d $ROOT/etc/systemd/system/$r.$suffix ] && rmdir --ignore-fail-on-non-empty -p $ROOT/etc/systemd/system/$r.$suffix
+				echo "Disabled ${disable_service##$ROOT/etc/systemd/system/$r.$suffix/} for $r."
+			fi
+		done
 	done
 
 	# create the required symbolic 'Alias' links
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
new file mode 100644
index 0000000..f7ef7a3
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch
@@ -0,0 +1,33 @@
+From 3bc4552117879f57522b5972b724729ca993f1ea Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 14 Dec 2015 04:09:19 +0000
+Subject: [PATCH 01/36] core/device.c: Change the default device timeout to 240
+ sec.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Inappropriate [Specific case QEMU/AB]
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/core/device.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/device.c b/src/core/device.c
+index d201dc5..340d62a 100644
+--- a/src/core/device.c
++++ b/src/core/device.c
+@@ -112,7 +112,7 @@ static void device_init(Unit *u) {
+          * indefinitely for plugged in devices, something which cannot
+          * happen for the other units since their operations time out
+          * anyway. */
+-        u->job_timeout = u->manager->default_timeout_start_usec;
++        u->job_timeout = (240 * USEC_PER_SEC);
+ 
+         u->ignore_on_isolate = true;
+ }
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch
deleted file mode 100644
index 76ce4b7..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0001-fix-build-on-uClibc-exp10.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch
-
-exp10 extension is not part of uClibc, so compute it.
-
-
-Signed-off-by: Samuel Martin <s.martin49@gmail.com>
-
-Upstream-Status: Pending
-
-Index: git/src/basic/missing.h
-===================================================================
---- git.orig/src/basic/missing.h
-+++ git/src/basic/missing.h
-@@ -1036,3 +1036,8 @@ static inline int kcmp(pid_t pid1, pid_t
- #ifndef INPUT_PROP_ACCELEROMETER
- #define INPUT_PROP_ACCELEROMETER  0x06
- #endif
-+
-+#ifdef __UCLIBC__
-+/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
-+#define exp10(x) (exp((x) * log(10)))
-+#endif /* __UCLIBC__ */
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch
deleted file mode 100644
index b6ab5ef..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 100e50604efc4032001a2de6a6b47853c0003817 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:29:15 +0000
-Subject: [PATCH 01/11] units: Prefer getty to agetty in console setup systemd
- units
-
-Upstream-Status: Inappropriate [configuration specific]
-
-Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- units/getty@.service.m4        | 2 +-
- units/serial-getty@.service.m4 | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
-index 46164ab..bdf6ec8 100644
---- a/units/getty@.service.m4
-+++ b/units/getty@.service.m4
-@@ -27,7 +27,7 @@ ConditionPathExists=/dev/tty0
- 
- [Service]
- # the VT is cleared by TTYVTDisallocate
--ExecStart=-/sbin/agetty --noclear %I $TERM
-+ExecStart=-/sbin/getty -L %I $TERM
- Type=idle
- Restart=always
- RestartSec=0
-diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
-index 4522d0d..e6d499d 100644
---- a/units/serial-getty@.service.m4
-+++ b/units/serial-getty@.service.m4
-@@ -22,7 +22,7 @@ Before=getty.target
- IgnoreOnIsolate=yes
- 
- [Service]
--ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
-+ExecStart=-/sbin/getty -L 115200 %I $TERM
- Type=idle
- Restart=always
- UtmpIdentifier=%I
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch
new file mode 100644
index 0000000..28939eb
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch
@@ -0,0 +1,44 @@
+From e5f405aba347d216e7f2b73d7dd681b13be442e3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 05:29:15 +0000
+Subject: [PATCH 02/36] units: Prefer getty to agetty in console setup systemd
+ units
+
+Upstream-Status: Inappropriate [configuration specific]
+
+Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ units/getty@.service.m4        | 2 +-
+ units/serial-getty@.service.m4 | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
+index 46164ab..bdf6ec8 100644
+--- a/units/getty@.service.m4
++++ b/units/getty@.service.m4
+@@ -27,7 +27,7 @@ ConditionPathExists=/dev/tty0
+ 
+ [Service]
+ # the VT is cleared by TTYVTDisallocate
+-ExecStart=-/sbin/agetty --noclear %I $TERM
++ExecStart=-/sbin/getty -L %I $TERM
+ Type=idle
+ Restart=always
+ RestartSec=0
+diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
+index 4522d0d..e6d499d 100644
+--- a/units/serial-getty@.service.m4
++++ b/units/serial-getty@.service.m4
+@@ -22,7 +22,7 @@ Before=getty.target
+ IgnoreOnIsolate=yes
+ 
+ [Service]
+-ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
++ExecStart=-/sbin/getty -L 115200 %I $TERM
+ Type=idle
+ Restart=always
+ UtmpIdentifier=%I
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch
deleted file mode 100644
index 0e20fd0..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 184a89caacfa00f07e7275bca592bd7dda1b541e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:03:44 +0000
-Subject: [PATCH 03/11] binfmt: Don't install dependency links at install time
- for the binfmt services
-
-use [Install] blocks so that they get created when the service is enabled
-like a traditional service.
-
-The [Install] blocks were rejected upstream as they don't have a way to
-"enable"
-it on install without static symlinks which can't be disabled, only
-masked.  We
-however can do that in a postinst.
-
-Upstream-Status: Denied
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am                             | 4 ----
- units/proc-sys-fs-binfmt_misc.automount | 3 +++
- units/systemd-binfmt.service.in         | 5 +++++
- 3 files changed, 8 insertions(+), 4 deletions(-)
-
-Index: git/Makefile.am
-===================================================================
---- git.orig/Makefile.am
-+++ git/Makefile.am
-@@ -4271,10 +4271,6 @@ INSTALL_DIRS += \
- 	$(prefix)/lib/binfmt.d \
- 	$(sysconfdir)/binfmt.d
- 
--SYSINIT_TARGET_WANTS += \
--	systemd-binfmt.service \
--	proc-sys-fs-binfmt_misc.automount
--
- endif
- 
- EXTRA_DIST += \
-Index: git/units/proc-sys-fs-binfmt_misc.automount
-===================================================================
---- git.orig/units/proc-sys-fs-binfmt_misc.automount
-+++ git/units/proc-sys-fs-binfmt_misc.automount
-@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
- 
- [Automount]
- Where=/proc/sys/fs/binfmt_misc
-+
-+[Install]
-+WantedBy=sysinit.target
-Index: git/units/systemd-binfmt.service.in
-===================================================================
---- git.orig/units/systemd-binfmt.service.in
-+++ git/units/systemd-binfmt.service.in
-@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service
- Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
- DefaultDependencies=no
- Conflicts=shutdown.target
-+Wants=proc-sys-fs-binfmt_misc.automount
-+
- After=proc-sys-fs-binfmt_misc.automount
- Before=sysinit.target shutdown.target
- ConditionPathIsReadWrite=/proc/sys/
-@@ -25,3 +27,6 @@ Type=oneshot
- RemainAfterExit=yes
- ExecStart=@rootlibexecdir@/systemd-binfmt
- TimeoutSec=90s
-+
-+[Install]
-+WantedBy=sysinit.target
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch
new file mode 100644
index 0000000..f183261
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0003-define-exp10-if-missing.patch
@@ -0,0 +1,33 @@
+From 699893a05edac5194f9670529bacfaeb67252edb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 14 Dec 2015 00:42:49 +0000
+Subject: [PATCH 03/36] define exp10 if missing
+
+Inspired by: http://peter.korsgaard.com/patches/alsa-utils/alsamixer-fix-build-on-uClibc-exp10.patch
+
+exp10 extension is not part of uClibc, so compute it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/missing.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index f3d3236..ee7e7ea 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -1169,3 +1169,8 @@ static inline key_serial_t request_key(const char *type, const char *description
+ #endif
+ 
+ #endif
++
++#ifdef __UCLIBC__
++/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */
++#define exp10(x) (exp((x) * log(10)))
++#endif /* __UCLIBC__ */
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch
new file mode 100644
index 0000000..989a1fa
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch
@@ -0,0 +1,35 @@
+From bb8d8148b16572ae17d3c308552cf73915386b05 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 12 Sep 2015 19:10:04 +0000
+Subject: [PATCH 04/36] Use getenv when secure versions are not available
+
+musl doesnt implement secure version, so we default
+to it if configure does not detect a secure imeplementation
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Denied
+---
+ src/basic/missing.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index ee7e7ea..3170429 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -585,12 +585,11 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
+         return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);
+ }
+ #endif
+-
+ #ifndef HAVE_SECURE_GETENV
+ #  ifdef HAVE___SECURE_GETENV
+ #    define secure_getenv __secure_getenv
+ #  else
+-#    error "neither secure_getenv nor __secure_getenv are available"
++#    define secure_getenv getenv
+ #  endif
+ #endif
+ 
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch
deleted file mode 100644
index 8078da9..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0004-configure-Check-for-additional-features-that-uclibc-.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 4e2e8dbf3f23ab7dca32286cc0f37bff6ac49e22 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:05:45 +0000
-Subject: [PATCH 04/11] configure: Check for additional features that uclibc
- doesnt support
-
-This helps in supporting uclibc which does not have all features that
-glibc might have
-
-Upstream-Status: Denied [no desire for uclibc support]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- configure.ac | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -110,6 +110,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/
- 
- AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
- 
-+# check for few functions not implemented in uClibc
-+
-+AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
-+
-+# check for %ms format support - assume always no if cross compiling
-+
-+AC_MSG_CHECKING([whether %ms format is supported by *scanf])
-+
-+AC_LINK_IFELSE(
-+	[AC_LANG_PROGRAM([
-+	 #include <stdio.h>
-+	 ],[
-+	    char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
-+	    int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
-+	    return (rc==3)?0:1;])],
-+	[AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])],
-+	[AC_MSG_RESULT([no])])
-+
- M4_DEFINES=
- 
- AC_CHECK_TOOL(OBJCOPY, objcopy)
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
new file mode 100644
index 0000000..f69e26e
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch
@@ -0,0 +1,74 @@
+From 3436b12d40bf4f4ab7e3e16600e5f6c35a470da4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 05:03:44 +0000
+Subject: [PATCH 05/36] binfmt: Don't install dependency links at install time
+ for the binfmt services
+
+use [Install] blocks so that they get created when the service is enabled
+like a traditional service.
+
+The [Install] blocks were rejected upstream as they don't have a way to
+"enable"
+it on install without static symlinks which can't be disabled, only
+masked.  We
+however can do that in a postinst.
+
+Upstream-Status: Denied
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am                             | 4 ----
+ units/proc-sys-fs-binfmt_misc.automount | 3 +++
+ units/systemd-binfmt.service.in         | 5 +++++
+ 3 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 03341fc..629740f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -4387,10 +4387,6 @@ INSTALL_DIRS += \
+ 	$(prefix)/lib/binfmt.d \
+ 	$(sysconfdir)/binfmt.d
+ 
+-SYSINIT_TARGET_WANTS += \
+-	systemd-binfmt.service \
+-	proc-sys-fs-binfmt_misc.automount
+-
+ endif
+ 
+ EXTRA_DIST += \
+diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount
+index 6be3893..709adef 100644
+--- a/units/proc-sys-fs-binfmt_misc.automount
++++ b/units/proc-sys-fs-binfmt_misc.automount
+@@ -16,3 +16,6 @@ ConditionPathIsReadWrite=/proc/sys/
+ 
+ [Automount]
+ Where=/proc/sys/fs/binfmt_misc
++
++[Install]
++WantedBy=sysinit.target
+diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in
+index d53073e..8c57ee0 100644
+--- a/units/systemd-binfmt.service.in
++++ b/units/systemd-binfmt.service.in
+@@ -11,6 +11,8 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5)
+ Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt
+ DefaultDependencies=no
+ Conflicts=shutdown.target
++Wants=proc-sys-fs-binfmt_misc.automount
++
+ After=proc-sys-fs-binfmt_misc.automount
+ Before=sysinit.target shutdown.target
+ ConditionPathIsReadWrite=/proc/sys/
+@@ -25,3 +27,6 @@ Type=oneshot
+ RemainAfterExit=yes
+ ExecStart=@rootlibexecdir@/systemd-binfmt
+ TimeoutSec=90s
++
++[Install]
++WantedBy=sysinit.target
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch
deleted file mode 100644
index 55a0088..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From a7417c2e6950d55c22c1b0d15783898b8ff229ef Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:10:37 +0000
-Subject: [PATCH 05/11] nspawn: Use execvpe only when libc supports it
-
-Upstream-Status: Denied [no desire for uclibc support]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/nspawn/nspawn.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-Index: git/src/nspawn/nspawn.c
-===================================================================
---- git.orig/src/nspawn/nspawn.c
-+++ git/src/nspawn/nspawn.c
-@@ -143,6 +143,8 @@ typedef struct CustomMount {
-         char **lower;
- } CustomMount;
- 
-+#include "config.h"
-+
- static char *arg_directory = NULL;
- static char *arg_template = NULL;
- static char *arg_user = NULL;
-@@ -4238,7 +4240,12 @@ static int inner_child(
-                 a[0] = (char*) "/sbin/init";
-                 execve(a[0], a, env_use);
-         } else if (argc > optind)
-+#ifdef HAVE_EXECVPE
-                 execvpe(argv[optind], argv + optind, env_use);
-+#else
-+                environ = env_use;
-+                execvp(argv[optind], argv + optind);
-+#endif /* HAVE_EXECVPE */
-         else {
-                 chdir(home ? home : "/root");
-                 execle("/bin/bash", "-bash", NULL, env_use);
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch
new file mode 100644
index 0000000..0d63755
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch
@@ -0,0 +1,48 @@
+From bb6f1d8a000b337280541afde7cccdcfe03cdeb1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 05:05:45 +0000
+Subject: [PATCH 06/36] configure: Check for additional features that uclibc
+ doesnt support
+
+This helps in supporting uclibc which does not have all features that
+glibc might have
+
+Upstream-Status: Denied [no desire for uclibc support]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 18 ++++++++++++++++++
+ 1 file changed, 18 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index f51533c..0239fd0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -112,6 +112,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin]
+ 
+ AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
+ 
++# check for few functions not implemented in uClibc
++
++AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
++
++# check for %ms format support - assume always no if cross compiling
++
++AC_MSG_CHECKING([whether %ms format is supported by *scanf])
++
++AC_LINK_IFELSE(
++	[AC_LANG_PROGRAM([
++	 #include <stdio.h>
++	 ],[
++	    char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
++	    int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
++	    return (rc==3)?0:1;])],
++	[AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])],
++	[AC_MSG_RESULT([no])])
++
+ M4_DEFINES=
+ 
+ AC_CHECK_TOOL(OBJCOPY, objcopy)
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch
deleted file mode 100644
index 631dd77..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0006-journal-Use-posix-fallocate-only-if-available.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 34a61b6c9eed3fad360066fb63132ebc7e0aaaa6 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:12:48 +0000
-Subject: [PATCH 06/11] journal: Use posix fallocate only if available
-
-Some architecture ports in uclibc did not support it in past
-
-Upstream-Status: Denied [no desire for uclibc support]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- src/journal/journal-file.c  | 16 +++++++++++++++-
- src/journal/journald-kmsg.c | 15 ++++++++++++++-
- 2 files changed, 29 insertions(+), 2 deletions(-)
-
-diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
-index 2845e05..9431171 100644
---- a/src/journal/journal-file.c
-+++ b/src/journal/journal-file.c
-@@ -36,6 +36,8 @@
- #include "compress.h"
- #include "fsprg.h"
- 
-+#include "config.h"
-+
- #define DEFAULT_DATA_HASH_TABLE_SIZE (2047ULL*sizeof(HashItem))
- #define DEFAULT_FIELD_HASH_TABLE_SIZE (333ULL*sizeof(HashItem))
- 
-@@ -354,7 +356,7 @@ static int journal_file_fstat(JournalFile *f) {
- 
- static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size) {
-         uint64_t old_size, new_size;
--        int r;
-+        int r = 0;
- 
-         assert(f);
- 
-@@ -418,9 +420,21 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
-         /* Note that the glibc fallocate() fallback is very
-            inefficient, hence we try to minimize the allocation area
-            as we can. */
-+#ifdef HAVE_POSIX_FALLOCATE
-         r = posix_fallocate(f->fd, old_size, new_size - old_size);
-         if (r != 0)
-                 return -r;
-+#else
-+        /* Write something every 512 bytes to make sure the block is allocated */
-+        uint64_t len = new_size - old_size;
-+        uint64_t offset = old_size;
-+        for (offset += (len-1) % 512; len > 0; offset += 512) {
-+                len -= 512;
-+                if (pwrite(f->fd, "", 1, offset) != 1)
-+                        return -errno;
-+        }
-+
-+#endif /* HAVE_POSIX_FALLOCATE */
- 
-         f->header->arena_size = htole64(new_size - le64toh(f->header->header_size));
- 
-diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c
-index c4216c4..a998ed5 100644
---- a/src/journal/journald-kmsg.c
-+++ b/src/journal/journald-kmsg.c
-@@ -436,6 +436,7 @@ fail:
- int server_open_kernel_seqnum(Server *s) {
-         _cleanup_close_ int fd;
-         uint64_t *p;
-+        int r = 0;
- 
-         assert(s);
- 
-@@ -449,7 +450,19 @@ int server_open_kernel_seqnum(Server *s) {
-                 return 0;
-         }
- 
--        if (posix_fallocate(fd, 0, sizeof(uint64_t)) < 0) {
-+#ifdef HAVE_POSIX_FALLOCATE
-+        r = posix_fallocate(fd, 0, sizeof(uint64_t));
-+#else
-+        /* Use good old method to write zeros into the journal file
-+           perhaps very inefficient yet working. */
-+        char *buf = alloca(sizeof(uint64_t));
-+        off_t oldpos = lseek(fd, 0, SEEK_CUR);
-+        bzero(buf, sizeof(uint64_t));
-+        lseek(fd, 0, SEEK_SET);
-+        r = write(fd, buf, sizeof(uint64_t));
-+        lseek(fd, oldpos, SEEK_SET);
-+#endif /* HAVE_POSIX_FALLOCATE */
-+        if (r < 0) {
-                 log_error_errno(errno, "Failed to allocate sequential number file, ignoring: %m");
-                 return 0;
-         }
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
new file mode 100644
index 0000000..12f6ace
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
@@ -0,0 +1,61 @@
+From fa5e137fbd2fb081ae897575377d718ee8cb6349 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 20 Dec 2015 04:20:28 +0000
+Subject: [PATCH 07/36] use lnr wrapper instead of looking for --relative
+ option for ln
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am  | 6 +++---
+ configure.ac | 2 --
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 629740f..82b6553 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -243,7 +243,7 @@ define move-to-rootlibdir
+ 		$(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
+ 		so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
+ 		rm -f $(DESTDIR)$(libdir)/$$libname && \
+-		$(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
++		lnr $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
+ 		mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
+ 	fi
+ endef
+@@ -317,7 +317,7 @@ define install-relative-aliases
+ 	while [ -n "$$1" ]; do \
+ 		$(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
+ 		rm -f $(DESTDIR)$$dir/$$2 && \
+-		$(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
++		lnr $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
+ 		shift 2 || exit $$?; \
+ 	done
+ endef
+@@ -2781,7 +2781,7 @@ systemd_dbus1_generator_LDADD = \
+ dbus1-generator-install-hook:
+ 	$(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
+ 	$(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+-	$(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
++	$(AM_V_LN)lnr $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+ 
+ dbus1-generator-uninstall-hook:
+ 	rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
+diff --git a/configure.ac b/configure.ac
+index 0239fd0..c5ab9d0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
+ AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
+ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
+ 
+-AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
+-
+ # check for few functions not implemented in uClibc
+ 
+ AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch
deleted file mode 100644
index b8ab7c4..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0007-util-Use-mkostemp-only-if-libc-supports-it.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From f771407d3e0288ca0c06a894194d3ddad69b9a8e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:17:05 +0000
-Subject: [PATCH 07/11] util: Use mkostemp only if libc supports it
-
-Upstream-Status: Denied [no desire for uclibc support]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/basic/util.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/src/basic/util.c b/src/basic/util.c
-index dc65280..72f4665 100644
---- a/src/basic/util.c
-+++ b/src/basic/util.c
-@@ -97,6 +97,8 @@
- #include "def.h"
- #include "sparse-endian.h"
- 
-+#include "config.h"
-+
- int saved_argc = 0;
- char **saved_argv = NULL;
- 
-@@ -6682,7 +6684,13 @@ int mkostemp_safe(char *pattern, int flags) {
- 
-         u = umask(077);
- 
-+#ifdef HAVE_MKOSTEMP
-         fd = mkostemp(pattern, flags);
-+#else
-+        fd = mkstemp(pattern);
-+        if (fd >= 0) fcntl(fd, F_SETFD, flags);
-+#endif /* HAVE_MKOSTEMP */
-+
-         if (fd < 0)
-                 return -errno;
- 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch
new file mode 100644
index 0000000..6e6f199
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch
@@ -0,0 +1,41 @@
+From ae999ff50efb9cc82537adef7696c6f732afcfc8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 05:10:37 +0000
+Subject: [PATCH 08/36] nspawn: Use execvpe only when libc supports it
+
+Upstream-Status: Denied [no desire for uclibc support]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/nspawn/nspawn.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
+index 5a68fec..65e65ec 100644
+--- a/src/nspawn/nspawn.c
++++ b/src/nspawn/nspawn.c
+@@ -111,6 +111,8 @@ typedef enum LinkJournal {
+         LINK_GUEST
+ } LinkJournal;
+ 
++#include "config.h"
++
+ static char *arg_directory = NULL;
+ static char *arg_template = NULL;
+ static char *arg_chdir = NULL;
+@@ -2637,7 +2639,12 @@ static int inner_child(
+                 a[0] = (char*) "/sbin/init";
+                 execve(a[0], a, env_use);
+         } else if (!strv_isempty(arg_parameters))
++#ifdef HAVE_EXECVPE
+                 execvpe(arg_parameters[0], arg_parameters, env_use);
++#else
++                environ = env_use;
++                execvp(arg_parameters[0], arg_parameters);
++#endif /* HAVE_EXECVPE */
+         else {
+                 if (!arg_chdir)
+                         chdir(home ?: "/root");
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
deleted file mode 100644
index 3f4d4de..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From b45ea3bfd6635744c8a6b74d0ac701b44bb1d294 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:19:37 +0000
-Subject: [PATCH 08/11] util: bypass unimplemented _SC_PHYS_PAGES system
- configuration API on uclibc
-
-Upstream-Status: Inappropriate [uclibc-specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/basic/util.c | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
-diff --git a/src/basic/util.c b/src/basic/util.c
-index 72f4665..cbbe3b1 100644
---- a/src/basic/util.c
-+++ b/src/basic/util.c
-@@ -6793,10 +6793,25 @@ uint64_t physical_memory(void) {
-         /* We return this as uint64_t in case we are running as 32bit
-          * process on a 64bit kernel with huge amounts of memory */
- 
-+#ifdef __UCLIBC__
-+        char line[128];
-+        FILE *f = fopen("/proc/meminfo", "r");
-+        if (f == NULL)
-+                return 0;
-+        while (!feof(f) && fgets(line, sizeof(line)-1, f)) {
-+                if (sscanf(line, "MemTotal: %l kB", &mem) == 1) {
-+                        mem *= 1024;
-+                        break;
-+                }
-+        }
-+        fclose(f);
-+        return (uint64_t) mem;
-+#else
-         mem = sysconf(_SC_PHYS_PAGES);
-         assert(mem > 0);
- 
-         return (uint64_t) mem * (uint64_t) page_size();
-+#endif
- }
- 
- void hexdump(FILE *f, const void *p, size_t s) {
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch
deleted file mode 100644
index 9ea3e83..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0009-sysv-generator-add-support-for-executing-scripts-und.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 8791b5b3934c55694872b6915a67340683ead91b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:22:52 +0000
-Subject: [PATCH 09/11] sysv-generator: add support for executing scripts under
- /etc/rcS.d/
-
-To be compatible, all services translated from scripts under /etc/rcS.d would
-run before services translated from scripts under /etc/rcN.d.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/sysv-generator/sysv-generator.c | 50 ++++++++++++++++++++++++++++---------
- 1 file changed, 38 insertions(+), 12 deletions(-)
-
-diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
-index bd67f32..6756cc6 100644
---- a/src/sysv-generator/sysv-generator.c
-+++ b/src/sysv-generator/sysv-generator.c
-@@ -42,7 +42,8 @@
- 
- typedef enum RunlevelType {
-         RUNLEVEL_UP,
--        RUNLEVEL_DOWN
-+        RUNLEVEL_DOWN,
-+        RUNLEVEL_SYSINIT
- } RunlevelType;
- 
- static const struct {
-@@ -57,6 +58,9 @@ static const struct {
-         { "rc4.d",  SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP },
-         { "rc5.d",  SPECIAL_GRAPHICAL_TARGET,  RUNLEVEL_UP },
- 
-+        /* Debian style rcS.d, also adopted by OE */
-+        { "rcS.d",  SPECIAL_SYSINIT_TARGET,   RUNLEVEL_SYSINIT},
-+
-         /* Standard SysV runlevels for shutdown */
-         { "rc0.d",  SPECIAL_POWEROFF_TARGET,  RUNLEVEL_DOWN },
-         { "rc6.d",  SPECIAL_REBOOT_TARGET,    RUNLEVEL_DOWN }
-@@ -65,7 +69,7 @@ static const struct {
-            directories in this order, and we want to make sure that
-            sysv_start_priority is known when we first load the
-            unit. And that value we only know from S links. Hence
--           UP must be read before DOWN */
-+           UP/SYSINIT must be read before DOWN */
- };
- 
- typedef struct SysvStub {
-@@ -81,6 +85,8 @@ typedef struct SysvStub {
-         char **conflicts;
-         bool has_lsb;
-         bool reload;
-+        bool default_dependencies;
-+        bool from_rcsd;
- } SysvStub;
- 
- const char *arg_dest = "/tmp";
-@@ -183,6 +189,9 @@ static int generate_unit_file(SysvStub *s) {
-                 "Description=%s\n",
-                 s->path, s->description);
- 
-+        if (!s->default_dependencies)
-+                fprintf(f, "DefaultDependencies=no\n");
-+
-         if (!isempty(before))
-                 fprintf(f, "Before=%s\n", before);
-         if (!isempty(after))
-@@ -704,18 +713,30 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
-                 if (s->has_lsb && other->has_lsb)
-                         continue;
- 
--                if (other->sysv_start_priority < s->sysv_start_priority) {
--                        r = strv_extend(&s->after, other->name);
-+                /* All scripts under /etc/rcS.d should execute before scripts under
-+                 * /etc/rcN.d */
-+                if (!other->from_rcsd && s->from_rcsd) {
-+                        r = strv_extend(&s->before, other->name);
-                         if (r < 0)
-                                 return log_oom();
--                }
--                else if (other->sysv_start_priority > s->sysv_start_priority) {
--                        r = strv_extend(&s->before, other->name);
-+                } else if (other->from_rcsd && !s->from_rcsd) {
-+                        r = strv_extend(&s->after, other->name);
-                         if (r < 0)
-                                 return log_oom();
--                }
--                else
--                        continue;
-+                } else {
-+                        if (other->sysv_start_priority < s->sysv_start_priority) {
-+                                r = strv_extend(&s->after, other->name);
-+                                if (r < 0)
-+                                        return log_oom();
-+                        }
-+                        else if (other->sysv_start_priority > s->sysv_start_priority) {
-+                                r = strv_extend(&s->before, other->name);
-+                                if (r < 0)
-+                                        return log_oom();
-+                        }
-+                        else
-+                                continue;
-+                 }
- 
-                 /* FIXME: Maybe we should compare the name here lexicographically? */
-         }
-@@ -778,6 +799,8 @@ static int enumerate_sysv(LookupPaths lp, Hashmap *all_services) {
-                                 return log_oom();
- 
-                         service->sysv_start_priority = -1;
-+                        service->default_dependencies = true;
-+                        service->from_rcsd = false;
-                         service->name = name;
-                         service->path = fpath;
- 
-@@ -864,9 +887,11 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
- 
-                                 if (de->d_name[0] == 'S')  {
- 
--                                        if (rcnd_table[i].type == RUNLEVEL_UP) {
-+                                        if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) {
-                                                 service->sysv_start_priority =
-                                                         MAX(a*10 + b, service->sysv_start_priority);
-+                                                service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true;
-+                                                service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false;
-                                         }
- 
-                                         r = set_ensure_allocated(&runlevel_services[i], NULL);
-@@ -878,7 +903,8 @@ static int set_dependencies_from_rcnd(LookupPaths lp, Hashmap *all_services) {
-                                                 goto finish;
- 
-                                 } else if (de->d_name[0] == 'K' &&
--                                           (rcnd_table[i].type == RUNLEVEL_DOWN)) {
-+                                           (rcnd_table[i].type == RUNLEVEL_DOWN ||
-+                                            rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
- 
-                                         r = set_ensure_allocated(&shutdown_services, NULL);
-                                         if (r < 0)
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
new file mode 100644
index 0000000..116f3d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch
@@ -0,0 +1,46 @@
+From 3498f488b27f90398d7c8d1d06aac5ab684370e8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 14 Dec 2015 00:47:53 +0000
+Subject: [PATCH 09/36] util: bypass unimplemented _SC_PHYS_PAGES system
+ configuration API on uclibc
+
+Upstream-Status: Inappropriate [uclibc-specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/basic/util.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+diff --git a/src/basic/util.c b/src/basic/util.c
+index ea1bed7..fdaf340 100644
+--- a/src/basic/util.c
++++ b/src/basic/util.c
+@@ -767,10 +767,25 @@ uint64_t physical_memory(void) {
+         /* We return this as uint64_t in case we are running as 32bit
+          * process on a 64bit kernel with huge amounts of memory */
+ 
++#ifdef __UCLIBC__
++        char line[128];
++        FILE *f = fopen("/proc/meminfo", "r");
++        if (f == NULL)
++                return 0;
++        while (!feof(f) && fgets(line, sizeof(line)-1, f)) {
++                if (sscanf(line, "MemTotal: %li kB", &mem) == 1) {
++                        mem *= 1024;
++                        break;
++                }
++        }
++        fclose(f);
++        return (uint64_t) mem;
++#else
+         mem = sysconf(_SC_PHYS_PAGES);
+         assert(mem > 0);
+ 
+         return (uint64_t) mem * (uint64_t) page_size();
++#endif
+ }
+ 
+ int update_reboot_param_file(const char *param) {
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch
deleted file mode 100644
index ed7ff5b..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0010-Make-root-s-home-directory-configurable.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From 3dc731c1d270e2e143de621db9bd898299fd849d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:24:49 +0000
-Subject: [PATCH 10/11] Make root's home directory configurable
-
-OpenEmbedded has a configurable home directory for root. Allow
-systemd to be built using its idea of what root's home directory
-should be.
-
-Upstream-Status: Denied
-Upstream wants to have a unified hierarchy where everyone is
-using the same root folder.
-https://github.com/systemd/systemd/issues/541
-
-Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.am                       | 2 ++
- configure.ac                      | 7 +++++++
- src/core/unit-printf.c            | 2 +-
- src/nspawn/nspawn.c               | 4 ++--
- src/basic/util.c                 | 4 ++--
- units/console-shell.service.m4.in | 4 ++--
- units/emergency.service.in        | 4 ++--
- units/rescue.service.in           | 4 ++--
- 8 files changed, 20 insertions(+), 11 deletions(-)
-
-Index: git/Makefile.am
-===================================================================
---- git.orig/Makefile.am
-+++ git/Makefile.am
-@@ -208,6 +208,7 @@ AM_CPPFLAGS = \
- 	-DLIBDIR=\"$(libdir)\" \
- 	-DROOTLIBDIR=\"$(rootlibdir)\" \
- 	-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
-+	-DROOTHOMEDIR=\"$(roothomedir)\" \
- 	-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
- 	-I $(top_srcdir)/src \
- 	-I $(top_builddir)/src/basic \
-@@ -5615,6 +5616,7 @@ EXTRA_DIST += \
- substitutions = \
-        '|rootlibexecdir=$(rootlibexecdir)|' \
-        '|rootbindir=$(rootbindir)|' \
-+       '|roothomedir=$(roothomedir)|' \
-        '|bindir=$(bindir)|' \
-        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
-        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -1383,6 +1383,11 @@ AC_ARG_WITH([rootlibdir],
-         [with_rootlibdir=${libdir}])
- AX_NORMALIZE_PATH([with_rootlibdir])
- 
-+AC_ARG_WITH([roothomedir],
-+        AS_HELP_STRING([--with-roothomedir=DIR], [Home directory for the root user]),
-+        [],
-+        [with_roothomedir=/root])
-+
- AC_ARG_WITH([pamlibdir],
-         AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
-         [],
-@@ -1474,6 +1479,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
- AC_SUBST([pamconfdir], [$with_pamconfdir])
- AC_SUBST([rootprefix], [$with_rootprefix])
- AC_SUBST([rootlibdir], [$with_rootlibdir])
-+AC_SUBST([roothomedir], [$with_roothomedir])
- 
- AC_CONFIG_FILES([
-         Makefile
-@@ -1563,6 +1569,7 @@ AC_MSG_RESULT([
-         includedir:              ${includedir}
-         lib dir:                 ${libdir}
-         rootlib dir:             ${with_rootlibdir}
-+        root home dir:           ${with_roothomedir}
-         SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
-         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
-         Build Python:            ${PYTHON}
-Index: git/src/core/unit-printf.c
-===================================================================
---- git.orig/src/core/unit-printf.c
-+++ git/src/core/unit-printf.c
-@@ -237,7 +237,7 @@ static int specifier_user_home(char spec
-                  * best of it if we can, but fail if we can't */
- 
-                 if (!c->user || streq(c->user, "root") || streq(c->user, "0"))
--                        n = strdup("/root");
-+                        n = strdup(ROOTHOMEDIR);
-                 else
-                         return -EOPNOTSUPP;
- 
-Index: git/src/nspawn/nspawn.c
-===================================================================
---- git.orig/src/nspawn/nspawn.c
-+++ git/src/nspawn/nspawn.c
-@@ -4176,7 +4176,7 @@ static int inner_child(
-         if (envp[n_env])
-                 n_env ++;
- 
--        if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
-+        if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
-             (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
-             (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0))
-                 return log_oom();
-@@ -4247,7 +4247,7 @@ static int inner_child(
-                 execvp(argv[optind], argv + optind);
- #endif /* HAVE_EXECVPE */
-         else {
--                chdir(home ? home : "/root");
-+                chdir(home ? home : ROOTHOMEDIR);
-                 execle("/bin/bash", "-bash", NULL, env_use);
-                 execle("/bin/sh", "-sh", NULL, env_use);
-         }
-Index: git/src/basic/util.c
-===================================================================
---- git.orig/src/basic/util.c
-+++ git/src/basic/util.c
-@@ -3233,7 +3233,7 @@ int get_user_creds(
-                         *gid = 0;
- 
-                 if (home)
--                        *home = "/root";
-+                        *home = ROOTHOMEDIR;
- 
-                 if (shell)
-                         *shell = "/bin/sh";
-@@ -4069,7 +4069,7 @@ int get_home_dir(char **_h) {
-         /* Hardcode home directory for root to avoid NSS */
-         u = getuid();
-         if (u == 0) {
--                h = strdup("/root");
-+                h = strdup(ROOTHOMEDIR);
-                 if (!h)
-                         return -ENOMEM;
- 
-Index: git/units/console-shell.service.m4.in
-===================================================================
---- git.orig/units/console-shell.service.m4.in
-+++ git/units/console-shell.service.m4.in
-@@ -15,8 +15,8 @@ After=rc-local.service
- Before=getty.target
- 
- [Service]
--Environment=HOME=/root
--WorkingDirectory=/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=@roothomedir@
- ExecStart=-@SULOGIN@
- ExecStopPost=-@SYSTEMCTL@ poweroff
- Type=idle
-Index: git/units/emergency.service.in
-===================================================================
---- git.orig/units/emergency.service.in
-+++ git/units/emergency.service.in
-@@ -14,8 +14,8 @@ Conflicts=rescue.service
- Before=shutdown.target
- 
- [Service]
--Environment=HOME=/root
--WorkingDirectory=/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=@roothomedir@
- ExecStartPre=-/bin/plymouth --wait quit
- ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.'
- ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
-Index: git/units/rescue.service.in
-===================================================================
---- git.orig/units/rescue.service.in
-+++ git/units/rescue.service.in
-@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.serv
- Before=shutdown.target
- 
- [Service]
--Environment=HOME=/root
--WorkingDirectory=/root
-+Environment=HOME=@roothomedir@
-+WorkingDirectory=@roothomedir@
- ExecStartPre=-/bin/plymouth quit
- ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
- ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch
new file mode 100644
index 0000000..75fa3a5
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch
@@ -0,0 +1,43 @@
+From 5f94f5ad46c1ded54c3797979d384e4c1eb77bb0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 5 Sep 2015 06:31:47 +0000
+Subject: [PATCH 10/36] implment systemd-sysv-install for OE
+
+Use update-rc.d for enabling/disabling and status command
+to check the status of the sysv service
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/systemctl/systemd-sysv-install.SKELETON | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON
+index a53a3e6..5d877b0 100755
+--- a/src/systemctl/systemd-sysv-install.SKELETON
++++ b/src/systemctl/systemd-sysv-install.SKELETON
+@@ -30,17 +30,17 @@ case "$1" in
+     enable)
+         # call the command to enable SysV init script $NAME here
+         # (consider optional $ROOT)
+-        echo "IMPLEMENT ME: enabling SysV init.d script $NAME"
++        update-rc.d -f $NAME defaults
+         ;;
+     disable)
+         # call the command to disable SysV init script $NAME here
+         # (consider optional $ROOT)
+-        echo "IMPLEMENT ME: disabling SysV init.d script $NAME"
++        update-rc.d -f $NAME remove
+         ;;
+     is-enabled)
+         # exit with 0 if $NAME is enabled, non-zero if it is disabled
+         # (consider optional $ROOT)
+-        echo "IMPLEMENT ME: checking SysV init.d script $NAME"
++        /etc/init.d/$NAME status
+         ;;
+     *)
+         usage ;;
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
new file mode 100644
index 0000000..34ae645
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch
@@ -0,0 +1,38 @@
+From 2b2450f6b7197bff4637c0283e8784500471d083 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 14 Dec 2015 00:50:01 +0000
+Subject: [PATCH 11/36] nss-mymachines: Build conditionally when
+ HAVE_MYHOSTNAME is set
+
+Fixes build failures when building with --disable-myhostname
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 82b6553..b3f3343 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -4876,6 +4876,7 @@ SYSTEM_UNIT_ALIASES += \
+ BUSNAMES_TARGET_WANTS += \
+ 	org.freedesktop.machine1.busname
+ 
++if HAVE_MYHOSTNAME
+ libnss_mymachines_la_SOURCES = \
+ 	src/nss-mymachines/nss-mymachines.sym \
+ 	src/nss-mymachines/nss-mymachines.c
+@@ -4896,6 +4897,7 @@ lib_LTLIBRARIES += \
+ 	libnss_mymachines.la
+ 
+ endif
++endif
+ 
+ polkitpolicy_in_files += \
+ 	src/machine/org.freedesktop.machine1.policy.in
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch
deleted file mode 100644
index e562bca..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0011-systemd-user-avoid-using-system-auth.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7e202f71785bf5a67c8a4f6b58d3585608fbfdc4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 05:26:25 +0000
-Subject: [PATCH 11/11] systemd-user: avoid using system-auth
-
-In OE, we don't provide system-auth, instead, we use common-* files.
-So modify systemd-user file to use common-* files.
-
-Upstream-Status: Inappropriate [oe specific]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/login/systemd-user | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/login/systemd-user b/src/login/systemd-user
-index 8112d74..99635af 100644
---- a/src/login/systemd-user
-+++ b/src/login/systemd-user
-@@ -2,5 +2,5 @@
- #
- # Used by systemd --user instances.
- 
--account  include system-auth
--session  include system-auth
-+account  include common-account
-+session  include common-session
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0012-implment-systemd-sysv-install-for-OE.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0012-implment-systemd-sysv-install-for-OE.patch
deleted file mode 100644
index 68b45a9..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0012-implment-systemd-sysv-install-for-OE.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 5f8b9f2d276c0ddbcbf5423733a23f043d688009 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 5 Sep 2015 06:31:47 +0000
-Subject: [PATCH] implment systemd-sysv-install for OE
-
-Use update-rc.d for enabling/disabling and status command
-to check the status of the sysv service
-
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/systemctl/systemd-sysv-install.SKELETON | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-Index: git/src/systemctl/systemd-sysv-install.SKELETON
-===================================================================
---- git.orig/src/systemctl/systemd-sysv-install.SKELETON
-+++ git/src/systemctl/systemd-sysv-install.SKELETON
-@@ -30,17 +30,17 @@ case "$1" in
-     enable)
-         # call the command to enable SysV init script $NAME here
-         # (consider optional $ROOT)
--        echo "IMPLEMENT ME: enabling SysV init.d script $NAME"
-+        update-rc.d -f $NAME defaults
-         ;;
-     disable)
-         # call the command to disable SysV init script $NAME here
-         # (consider optional $ROOT)
--        echo "IMPLEMENT ME: disabling SysV init.d script $NAME"
-+        update-rc.d -f $NAME remove
-         ;;
-     is-enabled)
-         # exit with 0 if $NAME is enabled, non-zero if it is disabled
-         # (consider optional $ROOT)
--        echo "IMPLEMENT ME: checking SysV init.d script $NAME"
-+        /etc/init.d/$NAME status
-         ;;
-     *)
-         usage ;;
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
new file mode 100644
index 0000000..6143088
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch
@@ -0,0 +1,32 @@
+From 5ebc0d87565a73710dea602c00b1586d5a1364e5 Mon Sep 17 00:00:00 2001
+From: Patrick Ohly <patrick.ohly@intel.com>
+Date: Wed, 16 Sep 2015 13:55:58 +0200
+Subject: [PATCH 12/36] rules: whitelist hd* devices
+
+qemu by default emulates IDE and the linux-yocto kernel(s) use
+CONFIG_IDE instead of the more modern libsata, so disks appear as
+/dev/hd*. Patch rejected upstream because CONFIG_IDE is deprecated.
+
+Upstream-Status: Denied [https://github.com/systemd/systemd/pull/1276]
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+---
+ rules/60-persistent-storage.rules | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
+index 0b14bb4..1c4d97a 100644
+--- a/rules/60-persistent-storage.rules
++++ b/rules/60-persistent-storage.rules
+@@ -6,7 +6,7 @@
+ ACTION=="remove", GOTO="persistent_storage_end"
+ 
+ SUBSYSTEM!="block", GOTO="persistent_storage_end"
+-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*", GOTO="persistent_storage_end"
++KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|hd*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*", GOTO="persistent_storage_end"
+ 
+ # ignore partitions that span the entire disk
+ TEST=="whole_disk", GOTO="persistent_storage_end"
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch
new file mode 100644
index 0000000..ac67f65
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch
@@ -0,0 +1,133 @@
+From 6736de4a3caf9a0b3c888c6cc05103ab1b86907d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 14 Dec 2015 05:09:53 +0000
+Subject: [PATCH 13/36] sysv-generator: add support for executing scripts under
+ /etc/rcS.d/
+
+To be compatible, all services translated from scripts under /etc/rcS.d would
+run before services translated from scripts under /etc/rcN.d.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/sysv-generator/sysv-generator.c | 47 ++++++++++++++++++++++++++++---------
+ 1 file changed, 36 insertions(+), 11 deletions(-)
+
+diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
+index b5925a4..ea06d6a 100644
+--- a/src/sysv-generator/sysv-generator.c
++++ b/src/sysv-generator/sysv-generator.c
+@@ -44,7 +44,8 @@
+ 
+ typedef enum RunlevelType {
+         RUNLEVEL_UP,
+-        RUNLEVEL_DOWN
++        RUNLEVEL_DOWN,
++        RUNLEVEL_SYSINIT
+ } RunlevelType;
+ 
+ static const struct {
+@@ -59,6 +60,9 @@ static const struct {
+         { "rc4.d",  SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP },
+         { "rc5.d",  SPECIAL_GRAPHICAL_TARGET,  RUNLEVEL_UP },
+ 
++        /* Debian style rcS.d, also adopted by OE */
++        { "rcS.d",  SPECIAL_SYSINIT_TARGET,   RUNLEVEL_SYSINIT},
++
+         /* Standard SysV runlevels for shutdown */
+         { "rc0.d",  SPECIAL_POWEROFF_TARGET,  RUNLEVEL_DOWN },
+         { "rc6.d",  SPECIAL_REBOOT_TARGET,    RUNLEVEL_DOWN }
+@@ -67,7 +71,7 @@ static const struct {
+            directories in this order, and we want to make sure that
+            sysv_start_priority is known when we first load the
+            unit. And that value we only know from S links. Hence
+-           UP must be read before DOWN */
++           UP/SYSINIT must be read before DOWN */
+ };
+ 
+ static const char *arg_dest = "/tmp";
+@@ -86,6 +90,8 @@ typedef struct SysvStub {
+         bool has_lsb;
+         bool reload;
+         bool loaded;
++        bool default_dependencies;
++        bool from_rcsd;
+ } SysvStub;
+ 
+ static void free_sysvstub(SysvStub *s) {
+@@ -711,17 +717,31 @@ static int fix_order(SysvStub *s, Hashmap *all_services) {
+                 if (s->has_lsb && other->has_lsb)
+                         continue;
+ 
+-                if (other->sysv_start_priority < s->sysv_start_priority) {
+-                        r = strv_extend(&s->after, other->name);
++                /* All scripts under /etc/rcS.d should execute before scripts under
++                 * /etc/rcN.d */
++                if (!other->from_rcsd && s->from_rcsd) {
++                        r = strv_extend(&s->before, other->name);
+                         if (r < 0)
+                                 return log_oom();
+ 
+-                } else if (other->sysv_start_priority > s->sysv_start_priority) {
+-                        r = strv_extend(&s->before, other->name);
++                } else if (other->from_rcsd && !s->from_rcsd) {
++                        r = strv_extend(&s->after, other->name);
+                         if (r < 0)
+                                 return log_oom();
+-                } else
+-                        continue;
++                } else {
++                        if (other->sysv_start_priority < s->sysv_start_priority) {
++                                r = strv_extend(&s->after, other->name);
++                                if (r < 0)
++                                        return log_oom();
++                        }
++                        else if (other->sysv_start_priority > s->sysv_start_priority) {
++                                r = strv_extend(&s->before, other->name);
++                                if (r < 0)
++                                        return log_oom();
++                        }
++                        else
++                                continue;
++                }
+ 
+                 /* FIXME: Maybe we should compare the name here lexicographically? */
+         }
+@@ -788,6 +808,8 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
+                                 return log_oom();
+ 
+                         service->sysv_start_priority = -1;
++                        service->default_dependencies = true;
++                        service->from_rcsd = false;
+                         service->name = name;
+                         service->path = fpath;
+                         name = fpath = NULL;
+@@ -871,9 +893,11 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
+ 
+                                 if (de->d_name[0] == 'S')  {
+ 
+-                                        if (rcnd_table[i].type == RUNLEVEL_UP)
++                                        if (rcnd_table[i].type == RUNLEVEL_UP || rcnd_table[i].type == RUNLEVEL_SYSINIT) {
+                                                 service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority);
+-
++                                                service->default_dependencies = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?false:true;
++                                                service->from_rcsd = (rcnd_table[i].type == RUNLEVEL_SYSINIT)?true:false;
++                                        }
+                                         r = set_ensure_allocated(&runlevel_services[i], NULL);
+                                         if (r < 0) {
+                                                 log_oom();
+@@ -887,7 +911,8 @@ static int set_dependencies_from_rcnd(const LookupPaths *lp, Hashmap *all_servic
+                                         }
+ 
+                                 } else if (de->d_name[0] == 'K' &&
+-                                           (rcnd_table[i].type == RUNLEVEL_DOWN)) {
++                                           (rcnd_table[i].type == RUNLEVEL_DOWN ||
++                                            rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
+ 
+                                         r = set_ensure_allocated(&shutdown_services, NULL);
+                                         if (r < 0) {
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch
new file mode 100644
index 0000000..4a576aa
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0014-Make-root-s-home-directory-configurable.patch
@@ -0,0 +1,184 @@
+From 786883cfa13e21f060ee6da6cabb94845f4349a0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 14 Dec 2015 05:18:20 +0000
+Subject: [PATCH 14/36] Make root's home directory configurable
+
+OpenEmbedded has a configurable home directory for root. Allow
+systemd to be built using its idea of what root's home directory
+should be.
+
+Upstream-Status: Denied
+Upstream wants to have a unified hierarchy where everyone is
+using the same root folder.
+https://github.com/systemd/systemd/issues/541
+
+Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am                       | 2 ++
+ configure.ac                      | 7 +++++++
+ src/basic/user-util.c             | 4 ++--
+ src/core/namespace.c              | 2 +-
+ src/nspawn/nspawn.c               | 4 ++--
+ units/console-shell.service.m4.in | 4 ++--
+ units/emergency.service.in        | 4 ++--
+ units/rescue.service.in           | 4 ++--
+ 8 files changed, 20 insertions(+), 11 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b3f3343..a99e8eb 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -202,6 +202,7 @@ AM_CPPFLAGS = \
+ 	-DLIBDIR=\"$(libdir)\" \
+ 	-DROOTLIBDIR=\"$(rootlibdir)\" \
+ 	-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
++	-DROOTHOMEDIR=\"$(roothomedir)\" \
+ 	-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
+ 	-I $(top_srcdir)/src \
+ 	-I $(top_builddir)/src/basic \
+@@ -5713,6 +5714,7 @@ EXTRA_DIST += \
+ substitutions = \
+        '|rootlibexecdir=$(rootlibexecdir)|' \
+        '|rootbindir=$(rootbindir)|' \
++       '|roothomedir=$(roothomedir)|' \
+        '|bindir=$(bindir)|' \
+        '|SYSTEMCTL=$(rootbindir)/systemctl|' \
+        '|SYSTEMD_NOTIFY=$(rootbindir)/systemd-notify|' \
+diff --git a/configure.ac b/configure.ac
+index c5ab9d0..16c83bb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1470,6 +1470,11 @@ AC_ARG_WITH([rootlibdir],
+         [with_rootlibdir=${libdir}])
+ AX_NORMALIZE_PATH([with_rootlibdir])
+ 
++AC_ARG_WITH([roothomedir],
++        AS_HELP_STRING([--with-roothomedir=DIR], [Home directory for the root user]),
++        [],
++        [with_roothomedir=/root])
++
+ AC_ARG_WITH([pamlibdir],
+         AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
+         [],
+@@ -1553,6 +1558,7 @@ AC_SUBST([pamlibdir], [$with_pamlibdir])
+ AC_SUBST([pamconfdir], [$with_pamconfdir])
+ AC_SUBST([rootprefix], [$with_rootprefix])
+ AC_SUBST([rootlibdir], [$with_rootlibdir])
++AC_SUBST([roothomedir], [$with_roothomedir])
+ 
+ AC_CONFIG_FILES([
+         Makefile
+@@ -1643,6 +1649,7 @@ AC_MSG_RESULT([
+         includedir:              ${includedir}
+         lib dir:                 ${libdir}
+         rootlib dir:             ${with_rootlibdir}
++        root home dir:           ${with_roothomedir}
+         SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
+         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
+         Build Python:            ${PYTHON}
+diff --git a/src/basic/user-util.c b/src/basic/user-util.c
+index 19155bc..55672b3 100644
+--- a/src/basic/user-util.c
++++ b/src/basic/user-util.c
+@@ -122,7 +122,7 @@ int get_user_creds(
+                         *gid = 0;
+ 
+                 if (home)
+-                        *home = "/root";
++                        *home = ROOTHOMEDIR;
+ 
+                 if (shell)
+                         *shell = "/bin/sh";
+@@ -353,7 +353,7 @@ int get_home_dir(char **_h) {
+         /* Hardcode home directory for root to avoid NSS */
+         u = getuid();
+         if (u == 0) {
+-                h = strdup("/root");
++                h = strdup(ROOTHOMEDIR);
+                 if (!h)
+                         return -ENOMEM;
+ 
+diff --git a/src/core/namespace.c b/src/core/namespace.c
+index b573f00..0f70b14 100644
+--- a/src/core/namespace.c
++++ b/src/core/namespace.c
+@@ -409,7 +409,7 @@ int setup_namespace(
+                         home_dir = strjoina("-", home_dir);
+                         run_user_dir = prefix_roota(root_directory, "/run/user");
+                         run_user_dir = strjoina("-", run_user_dir);
+-                        root_dir = prefix_roota(root_directory, "/root");
++                        root_dir = prefix_roota(root_directory, ROOTHOMEDIR);
+                         root_dir = strjoina("-", root_dir);
+ 
+                         r = append_mounts(&m, STRV_MAKE(home_dir, run_user_dir, root_dir),
+diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
+index 65e65ec..12f0ee8 100644
+--- a/src/nspawn/nspawn.c
++++ b/src/nspawn/nspawn.c
+@@ -2564,7 +2564,7 @@ static int inner_child(
+         if (envp[n_env])
+                 n_env ++;
+ 
+-        if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: "/root") < 0) ||
++        if ((asprintf((char**)(envp + n_env++), "HOME=%s", home ? home: ROOTHOMEDIR) < 0) ||
+             (asprintf((char**)(envp + n_env++), "USER=%s", arg_user ? arg_user : "root") < 0) ||
+             (asprintf((char**)(envp + n_env++), "LOGNAME=%s", arg_user ? arg_user : "root") < 0))
+                 return log_oom();
+@@ -2647,7 +2647,7 @@ static int inner_child(
+ #endif /* HAVE_EXECVPE */
+         else {
+                 if (!arg_chdir)
+-                        chdir(home ?: "/root");
++                        chdir(home ?: ROOTHOMEDIR);
+ 
+                 execle("/bin/bash", "-bash", NULL, env_use);
+                 execle("/bin/sh", "-sh", NULL, env_use);
+diff --git a/units/console-shell.service.m4.in b/units/console-shell.service.m4.in
+index a345ec2..3caae7d 100644
+--- a/units/console-shell.service.m4.in
++++ b/units/console-shell.service.m4.in
+@@ -15,8 +15,8 @@ After=rc-local.service
+ Before=getty.target
+ 
+ [Service]
+-Environment=HOME=/root
+-WorkingDirectory=-/root
++Environment=HOME=@roothomedir@
++WorkingDirectory=-@roothomedir@
+ ExecStart=-@SULOGIN@
+ ExecStopPost=-@SYSTEMCTL@ poweroff
+ Type=idle
+diff --git a/units/emergency.service.in b/units/emergency.service.in
+index fb390ea..5623a57 100644
+--- a/units/emergency.service.in
++++ b/units/emergency.service.in
+@@ -14,8 +14,8 @@ Conflicts=rescue.service
+ Before=shutdown.target
+ 
+ [Service]
+-Environment=HOME=/root
+-WorkingDirectory=-/root
++Environment=HOME=@roothomedir@
++WorkingDirectory=-@roothomedir@
+ ExecStartPre=-/bin/plymouth --wait quit
+ ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.'
+ ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
+diff --git a/units/rescue.service.in b/units/rescue.service.in
+index 92553f6..590ae17 100644
+--- a/units/rescue.service.in
++++ b/units/rescue.service.in
+@@ -14,8 +14,8 @@ After=sysinit.target plymouth-start.service
+ Before=shutdown.target
+ 
+ [Service]
+-Environment=HOME=/root
+-WorkingDirectory=-/root
++Environment=HOME=@roothomedir@
++WorkingDirectory=-@roothomedir@
+ ExecStartPre=-/bin/plymouth quit
+ ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
+ ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch
deleted file mode 100644
index fe2ba53..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 4f0a722489154da99e7f6b3051afde984eed2f74 Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147@gmail.com>
-Date: Thu, 19 Mar 2015 15:01:29 +1100
-Subject: [PATCH] Revert "rules: remove firmware loading rules"
-
-This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
-Userspace firmware loading support is needed for Linux < 3.7.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
----
- rules/50-firmware.rules | 3 +++
- 1 file changed, 3 insertions(+)
- create mode 100644 rules/50-firmware.rules
-
-diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
-new file mode 100644
-index 0000000..f0ae684
---- /dev/null
-+++ b/rules/50-firmware.rules
-@@ -0,0 +1,3 @@
-+# do not edit this file, it will be overwritten on update
-+
-+SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
--- 
-2.3.3
-
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch
deleted file mode 100644
index 6308cc7..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch
+++ /dev/null
@@ -1,364 +0,0 @@
-From 7f074def4e32045353ba4336d703e17b8de7ec4e Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147@gmail.com>
-Date: Thu, 19 Mar 2015 15:01:33 +1100
-Subject: [PATCH] Revert "udev: remove userspace firmware loading support"
-
-This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
-Userspace firmware loading support is needed for Linux < 3.7.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
----
- Makefile.am                      |  12 +++
- README                           |   9 ++-
- TODO                             |   1 +
- configure.ac                     |  20 +++++
- src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
- src/udev/udev-builtin.c          |   3 +
- src/udev/udev.h                  |   6 ++
- src/udev/udevd.c                 |  13 ++++
- 8 files changed, 214 insertions(+), 4 deletions(-)
- create mode 100644 src/udev/udev-builtin-firmware.c
-
-Index: git/Makefile.am
-===================================================================
---- git.orig/Makefile.am
-+++ git/Makefile.am
-@@ -3470,6 +3470,18 @@ libudev_core_la_LIBADD = \
- 	$(BLKID_LIBS) \
- 	$(KMOD_LIBS)
- 
-+libudev_core_la_CPPFLAGS = \
-+	$(AM_CPPFLAGS) \
-+	-DFIRMWARE_PATH="$(FIRMWARE_PATH)"
-+
-+if ENABLE_FIRMWARE
-+libudev_core_la_SOURCES += \
-+	src/udev/udev-builtin-firmware.c
-+
-+dist_udevrules_DATA += \
-+	rules/50-firmware.rules
-+endif
-+
- if HAVE_KMOD
- libudev_core_la_SOURCES += \
- 	src/udev/udev-builtin-kmod.c
-Index: git/README
-===================================================================
---- git.orig/README
-+++ git/README
-@@ -36,7 +36,8 @@ LICENSE:
-         - except src/udev/* which is (currently still) GPLv2, GPLv2+
- 
- REQUIREMENTS:
--        Linux kernel >= 3.7
-+        Linux kernel >= 3.0
-+        Linux kernel >= 3.3 for loop device partition support features with nspawn
-         Linux kernel >= 3.8 for Smack support
- 
-         Kernel Config Options:
-@@ -51,14 +52,14 @@ REQUIREMENTS:
-           CONFIG_PROC_FS
-           CONFIG_FHANDLE (libudev, mount and bind mount handling)
- 
--        udev will fail to work with the legacy sysfs layout:
-+        Udev will fail to work with the legacy layout:
-           CONFIG_SYSFS_DEPRECATED=n
- 
-         Legacy hotplug slows down the system and confuses udev:
-           CONFIG_UEVENT_HELPER_PATH=""
- 
--        Userspace firmware loading is not supported and should
--        be disabled in the kernel:
-+        Userspace firmware loading is deprecated, will go away, and
-+        sometimes causes problems:
-           CONFIG_FW_LOADER_USER_HELPER=n
- 
-         Some udev rules and virtualization detection relies on it:
-Index: git/TODO
-===================================================================
---- git.orig/TODO
-+++ git/TODO
-@@ -754,6 +754,7 @@ Features:
- * ExecOnFailure=/usr/bin/foo
- 
- * udev:
-+  - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
-   - move to LGPL
-   - kill scsi_id
-   - add trigger --subsystem-match=usb/usb_device device
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -1268,6 +1268,26 @@ fi
- AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
- 
- # ------------------------------------------------------------------------------
-+AC_ARG_WITH(firmware-path,
-+       AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
-+          [Firmware search path (default="")]),
-+       [], [with_firmware_path=""])
-+OLD_IFS=$IFS
-+IFS=:
-+for i in $with_firmware_path; do
-+       if test "x${FIRMWARE_PATH}" = "x"; then
-+              FIRMWARE_PATH="\\\"${i}/\\\""
-+       else
-+              FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
-+       fi
-+done
-+IFS=$OLD_IFS
-+AC_SUBST(FIRMWARE_PATH)
-+AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
-+AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
-+
-+
-+# ------------------------------------------------------------------------------
- AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
-        enable_hwdb=$enableval, enable_hwdb=yes)
- AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
-@@ -1574,6 +1594,7 @@ AC_MSG_RESULT([
-         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
-         Build Python:            ${PYTHON}
-         sphinx binary:           ${SPHINX_BUILD}
-+        firmware path:           ${FIRMWARE_PATH}
-         PAM modules dir:         ${with_pamlibdir}
-         PAM configuration dir:   ${with_pamconfdir}
-         D-Bus policy dir:        ${with_dbuspolicydir}
-Index: git/src/udev/udev-builtin-firmware.c
-===================================================================
---- /dev/null
-+++ git/src/udev/udev-builtin-firmware.c
-@@ -0,0 +1,154 @@
-+/*
-+ * firmware - Kernel firmware loader
-+ *
-+ * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com>
-+ * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org>
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation; either version 2 of the
-+ * License, or (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful, but
-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+ * General Public License for more details:*
-+ */
-+
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <stdio.h>
-+#include <getopt.h>
-+#include <errno.h>
-+#include <stdbool.h>
-+#include <sys/utsname.h>
-+#include <sys/stat.h>
-+
-+#include "udev.h"
-+
-+static bool set_loading(struct udev *udev, char *loadpath, const char *state) {
-+        FILE *ldfile;
-+
-+        ldfile = fopen(loadpath, "we");
-+        if (ldfile == NULL) {
-+                log_error("error: can not open '%s'", loadpath);
-+                return false;
-+        };
-+        fprintf(ldfile, "%s\n", state);
-+        fclose(ldfile);
-+        return true;
-+}
-+
-+static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size) {
-+        char *buf;
-+        FILE *fsource = NULL, *ftarget = NULL;
-+        bool ret = false;
-+
-+        buf = malloc(size);
-+        if (buf == NULL) {
-+                log_error("No memory available to load firmware file");
-+                return false;
-+        }
-+
-+        log_debug("writing '%s' (%zi) to '%s'", source, size, target);
-+
-+        fsource = fopen(source, "re");
-+        if (fsource == NULL)
-+                goto exit;
-+        ftarget = fopen(target, "we");
-+        if (ftarget == NULL)
-+                goto exit;
-+        if (fread(buf, size, 1, fsource) != 1)
-+                goto exit;
-+        if (fwrite(buf, size, 1, ftarget) == 1)
-+                ret = true;
-+exit:
-+        if (ftarget != NULL)
-+                fclose(ftarget);
-+        if (fsource != NULL)
-+                fclose(fsource);
-+        free(buf);
-+        return ret;
-+}
-+
-+static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test) {
-+        struct udev *udev = udev_device_get_udev(dev);
-+        static const char *searchpath[] = { FIRMWARE_PATH };
-+        char loadpath[UTIL_PATH_SIZE];
-+        char datapath[UTIL_PATH_SIZE];
-+        char fwpath[UTIL_PATH_SIZE];
-+        const char *firmware;
-+        FILE *fwfile = NULL;
-+        struct utsname kernel;
-+        struct stat statbuf;
-+        unsigned int i;
-+        int rc = EXIT_SUCCESS;
-+
-+        firmware = udev_device_get_property_value(dev, "FIRMWARE");
-+        if (firmware == NULL) {
-+                log_error("firmware parameter missing");
-+                rc = EXIT_FAILURE;
-+                goto exit;
-+        }
-+
-+        /* lookup firmware file */
-+        uname(&kernel);
-+        for (i = 0; i < ELEMENTSOF(searchpath); i++) {
-+                strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL);
-+                fwfile = fopen(fwpath, "re");
-+                if (fwfile != NULL)
-+                        break;
-+
-+                strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL);
-+                fwfile = fopen(fwpath, "re");
-+                if (fwfile != NULL)
-+                        break;
-+        }
-+
-+        strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
-+
-+        if (fwfile == NULL) {
-+                log_debug("did not find firmware file '%s'", firmware);
-+                rc = EXIT_FAILURE;
-+                /*
-+                 * Do not cancel the request in the initrd, the real root might have
-+                 * the firmware file and the 'coldplug' run in the real root will find
-+                 * this pending request and fulfill or cancel it.
-+                 * */
-+                if (!in_initrd())
-+                        set_loading(udev, loadpath, "-1");
-+                goto exit;
-+        }
-+
-+        if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
-+                if (!in_initrd())
-+                        set_loading(udev, loadpath, "-1");
-+                rc = EXIT_FAILURE;
-+                goto exit;
-+        }
-+
-+        if (!set_loading(udev, loadpath, "1"))
-+                goto exit;
-+
-+        strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL);
-+        if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) {
-+                log_error("error sending firmware '%s' to device", firmware);
-+                set_loading(udev, loadpath, "-1");
-+                rc = EXIT_FAILURE;
-+                goto exit;
-+        };
-+
-+        set_loading(udev, loadpath, "0");
-+exit:
-+        if (fwfile)
-+                fclose(fwfile);
-+        return rc;
-+}
-+
-+const struct udev_builtin udev_builtin_firmware = {
-+        .name = "firmware",
-+        .cmd = builtin_firmware,
-+        .help = "kernel firmware loader",
-+        .run_once = true,
-+};
-Index: git/src/udev/udev-builtin.c
-===================================================================
---- git.orig/src/udev/udev-builtin.c
-+++ git/src/udev/udev-builtin.c
-@@ -30,6 +30,9 @@ static const struct udev_builtin *builti
-         [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
- #endif
-         [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
-+#ifdef HAVE_FIRMWARE
-+        [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
-+#endif
-         [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
-         [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
-         [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
-Index: git/src/udev/udev.h
-===================================================================
---- git.orig/src/udev/udev.h
-+++ git/src/udev/udev.h
-@@ -146,6 +146,9 @@ enum udev_builtin_cmd {
-         UDEV_BUILTIN_BLKID,
- #endif
-         UDEV_BUILTIN_BTRFS,
-+#ifdef HAVE_FIRMWARE
-+        UDEV_BUILTIN_FIRMWARE,
-+#endif
-         UDEV_BUILTIN_HWDB,
-         UDEV_BUILTIN_INPUT_ID,
-         UDEV_BUILTIN_KEYBOARD,
-@@ -174,6 +177,9 @@ struct udev_builtin {
- extern const struct udev_builtin udev_builtin_blkid;
- #endif
- extern const struct udev_builtin udev_builtin_btrfs;
-+#ifdef HAVE_FIRMWARE
-+extern const struct udev_builtin udev_builtin_firmware;
-+#endif
- extern const struct udev_builtin udev_builtin_hwdb;
- extern const struct udev_builtin udev_builtin_input_id;
- extern const struct udev_builtin udev_builtin_keyboard;
-Index: git/src/udev/udevd.c
-===================================================================
---- git.orig/src/udev/udevd.c
-+++ git/src/udev/udevd.c
-@@ -116,6 +116,9 @@ struct event {
-         bool is_block;
-         sd_event_source *timeout_warning;
-         sd_event_source *timeout;
-+#ifdef HAVE_FIRMWARE
-+        bool nodelay;
-+#endif
- };
- 
- static inline struct event *node_to_event(struct udev_list_node *node) {
-@@ -607,6 +610,10 @@ static int event_queue_insert(Manager *m
-         event->devnum = udev_device_get_devnum(dev);
-         event->is_block = streq("block", udev_device_get_subsystem(dev));
-         event->ifindex = udev_device_get_ifindex(dev);
-+#ifdef HAVE_FIRMWARE
-+        if (streq(udev_device_get_subsystem(dev), "firmware"))
-+                event->nodelay = true;
-+#endif
- 
-         log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
-              udev_device_get_action(dev), udev_device_get_subsystem(dev));
-@@ -692,6 +699,12 @@ static bool is_devpath_busy(Manager *man
-                         return true;
-                 }
- 
-+#ifdef HAVE_FIRMWARE
-+                /* allow to bypass the dependency tracking */
-+                if (event->nodelay)
-+                        continue;
-+#endif
-+
-                 /* parent device event found */
-                 if (event->devpath[common] == '/') {
-                         event->delaying_seqnum = loop_event->seqnum;
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch
new file mode 100644
index 0000000..a351237
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch
@@ -0,0 +1,36 @@
+From f70a1a9605cd3adac450c49a5a69da6e9acda517 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 05:26:25 +0000
+Subject: [PATCH 15/36] systemd-user: avoid using system-auth
+
+In OE, we don't provide system-auth, instead, we use common-* files.
+So modify systemd-user file to use common-* files.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/login/systemd-user.m4 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/login/systemd-user.m4 b/src/login/systemd-user.m4
+index 7933508..16b73d2 100644
+--- a/src/login/systemd-user.m4
++++ b/src/login/systemd-user.m4
+@@ -2,10 +2,10 @@
+ #
+ # Used by systemd --user instances.
+ 
+-account  include system-auth
++account  include common-account
+ 
+ m4_ifdef(`HAVE_SELINUX',
+ session  required pam_selinux.so close
+ session  required pam_selinux.so nottys open
+ )m4_dnl
+-session  include system-auth
++session  include common-session
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch
new file mode 100644
index 0000000..66905b5
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0016-Revert-rules-remove-firmware-loading-rules.patch
@@ -0,0 +1,28 @@
+From 7311ecc745c17d6ed9fd9cf43039648483a87605 Mon Sep 17 00:00:00 2001
+From: Jonathan Liu <net147@gmail.com>
+Date: Thu, 19 Mar 2015 15:01:29 +1100
+Subject: [PATCH 16/36] Revert "rules: remove firmware loading rules"
+
+This reverts commit 70e7d754ddb356fb1a2942b262f8cee9650e2a19.
+Userspace firmware loading support is needed for Linux < 3.7.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+---
+ rules/50-firmware.rules | 3 +++
+ 1 file changed, 3 insertions(+)
+ create mode 100644 rules/50-firmware.rules
+
+diff --git a/rules/50-firmware.rules b/rules/50-firmware.rules
+new file mode 100644
+index 0000000..f0ae684
+--- /dev/null
++++ b/rules/50-firmware.rules
+@@ -0,0 +1,3 @@
++# do not edit this file, it will be overwritten on update
++
++SUBSYSTEM=="firmware", ACTION=="add", RUN{builtin}="firmware"
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch
new file mode 100644
index 0000000..8e6289d
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch
@@ -0,0 +1,361 @@
+From 9a3a4e16b36e762291cd1574ec71d7954f8b5363 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 14 Dec 2015 05:33:32 +0000
+Subject: [PATCH 17/36] Revert "udev: remove userspace firmware loading
+ support"
+
+This reverts commit be2ea723b1d023b3d385d3b791ee4607cbfb20ca.
+Userspace firmware loading support is needed for Linux < 3.7.
+
+Upstream-Status: Inappropriate [OE specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.am                      |  12 +++
+ README                           |   6 +-
+ TODO                             |   1 +
+ configure.ac                     |  22 ++++++
+ src/udev/udev-builtin-firmware.c | 154 +++++++++++++++++++++++++++++++++++++++
+ src/udev/udev-builtin.c          |   3 +
+ src/udev/udev.h                  |   6 ++
+ src/udev/udevd.c                 |  13 ++++
+ 8 files changed, 214 insertions(+), 3 deletions(-)
+ create mode 100644 src/udev/udev-builtin-firmware.c
+
+diff --git a/Makefile.am b/Makefile.am
+index a99e8eb..b5c6ba7 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3573,6 +3573,18 @@ libudev_core_la_LIBADD = \
+ 	$(BLKID_LIBS) \
+ 	$(KMOD_LIBS)
+ 
++libudev_core_la_CPPFLAGS = \
++	$(AM_CPPFLAGS) \
++	-DFIRMWARE_PATH="$(FIRMWARE_PATH)"
++
++if ENABLE_FIRMWARE
++libudev_core_la_SOURCES += \
++	src/udev/udev-builtin-firmware.c
++
++dist_udevrules_DATA += \
++	rules/50-firmware.rules
++endif
++
+ if HAVE_KMOD
+ libudev_core_la_SOURCES += \
+ 	src/udev/udev-builtin-kmod.c
+diff --git a/README b/README
+index 41fb07a..10230ac 100644
+--- a/README
++++ b/README
+@@ -50,14 +50,14 @@ REQUIREMENTS:
+           CONFIG_PROC_FS
+           CONFIG_FHANDLE (libudev, mount and bind mount handling)
+ 
+-        udev will fail to work with the legacy sysfs layout:
++        Udev will fail to work with the legacy layout:
+           CONFIG_SYSFS_DEPRECATED=n
+ 
+         Legacy hotplug slows down the system and confuses udev:
+           CONFIG_UEVENT_HELPER_PATH=""
+ 
+-        Userspace firmware loading is not supported and should
+-        be disabled in the kernel:
++        Userspace firmware loading is deprecated, will go away, and
++        sometimes causes problems:
+           CONFIG_FW_LOADER_USER_HELPER=n
+ 
+         Some udev rules and virtualization detection relies on it:
+diff --git a/TODO b/TODO
+index 92cc8cc..25f6849 100644
+--- a/TODO
++++ b/TODO
+@@ -628,6 +628,7 @@ Features:
+ * rename "userspace" to "core-os"
+ 
+ * udev:
++  - remove src/udev/udev-builtin-firmware.c (CONFIG_FW_LOADER_USER_HELPER=n)
+   - move to LGPL
+   - kill scsi_id
+   - add trigger --subsystem-match=usb/usb_device device
+diff --git a/configure.ac b/configure.ac
+index 16c83bb..36d20b5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1353,6 +1353,25 @@ AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database
+ AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
+ 
+ # ------------------------------------------------------------------------------
++AC_ARG_WITH(firmware-path,
++       AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
++          [Firmware search path (default="")]),
++       [], [with_firmware_path=""])
++OLD_IFS=$IFS
++IFS=:
++for i in $with_firmware_path; do
++       if test "x${FIRMWARE_PATH}" = "x"; then
++              FIRMWARE_PATH="\\\"${i}/\\\""
++       else
++              FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
++       fi
++done
++IFS=$OLD_IFS
++AC_SUBST(FIRMWARE_PATH)
++AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
++AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
++
++# ------------------------------------------------------------------------------
+ have_manpages=no
+ AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+@@ -1653,6 +1672,9 @@ AC_MSG_RESULT([
+         SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
+         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
+         Build Python:            ${PYTHON}
++        Installation Python:     ${PYTHON_BINARY}
++        sphinx binary:           ${SPHINX_BUILD}
++        firmware path:           ${FIRMWARE_PATH}
+         PAM modules dir:         ${with_pamlibdir}
+         PAM configuration dir:   ${with_pamconfdir}
+         D-Bus policy dir:        ${with_dbuspolicydir}
+diff --git a/src/udev/udev-builtin-firmware.c b/src/udev/udev-builtin-firmware.c
+new file mode 100644
+index 0000000..bd8c2fb
+--- /dev/null
++++ b/src/udev/udev-builtin-firmware.c
+@@ -0,0 +1,154 @@
++/*
++ * firmware - Kernel firmware loader
++ *
++ * Copyright (C) 2009 Piter Punk <piterpunk@slackware.com>
++ * Copyright (C) 2009-2011 Kay Sievers <kay@vrfy.org>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of the
++ * License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful, but
++ * WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * General Public License for more details:*
++ */
++
++#include <unistd.h>
++#include <stdlib.h>
++#include <string.h>
++#include <stdio.h>
++#include <getopt.h>
++#include <errno.h>
++#include <stdbool.h>
++#include <sys/utsname.h>
++#include <sys/stat.h>
++
++#include "udev.h"
++
++static bool set_loading(struct udev *udev, char *loadpath, const char *state) {
++        FILE *ldfile;
++
++        ldfile = fopen(loadpath, "we");
++        if (ldfile == NULL) {
++                log_error("error: can not open '%s'", loadpath);
++                return false;
++        };
++        fprintf(ldfile, "%s\n", state);
++        fclose(ldfile);
++        return true;
++}
++
++static bool copy_firmware(struct udev *udev, const char *source, const char *target, size_t size) {
++        char *buf;
++        FILE *fsource = NULL, *ftarget = NULL;
++        bool ret = false;
++
++        buf = malloc(size);
++        if (buf == NULL) {
++                log_error("No memory available to load firmware file");
++                return false;
++        }
++
++        log_debug("writing '%s' (%zi) to '%s'", source, size, target);
++
++        fsource = fopen(source, "re");
++        if (fsource == NULL)
++                goto exit;
++        ftarget = fopen(target, "we");
++        if (ftarget == NULL)
++                goto exit;
++        if (fread(buf, size, 1, fsource) != 1)
++                goto exit;
++        if (fwrite(buf, size, 1, ftarget) == 1)
++                ret = true;
++exit:
++        if (ftarget != NULL)
++                fclose(ftarget);
++        if (fsource != NULL)
++                fclose(fsource);
++        free(buf);
++        return ret;
++}
++
++static int builtin_firmware(struct udev_device *dev, int argc, char *argv[], bool test) {
++        struct udev *udev = udev_device_get_udev(dev);
++        static const char *searchpath[] = { FIRMWARE_PATH };
++        char loadpath[UTIL_PATH_SIZE];
++        char datapath[UTIL_PATH_SIZE];
++        char fwpath[UTIL_PATH_SIZE];
++        const char *firmware;
++        FILE *fwfile = NULL;
++        struct utsname kernel;
++        struct stat statbuf;
++        unsigned int i;
++        int rc = EXIT_SUCCESS;
++
++        firmware = udev_device_get_property_value(dev, "FIRMWARE");
++        if (firmware == NULL) {
++                log_error("firmware parameter missing");
++                rc = EXIT_FAILURE;
++                goto exit;
++        }
++
++        /* lookup firmware file */
++        uname(&kernel);
++        for (i = 0; i < ELEMENTSOF(searchpath); i++) {
++                strscpyl(fwpath, sizeof(fwpath), searchpath[i], kernel.release, "/", firmware, NULL);
++                fwfile = fopen(fwpath, "re");
++                if (fwfile != NULL)
++                        break;
++
++                strscpyl(fwpath, sizeof(fwpath), searchpath[i], firmware, NULL);
++                fwfile = fopen(fwpath, "re");
++                if (fwfile != NULL)
++                        break;
++        }
++
++        strscpyl(loadpath, sizeof(loadpath), udev_device_get_syspath(dev), "/loading", NULL);
++
++        if (fwfile == NULL) {
++                log_debug("did not find firmware file '%s'", firmware);
++                rc = EXIT_FAILURE;
++                /*
++                 * Do not cancel the request in the initrd, the real root might have
++                 * the firmware file and the 'coldplug' run in the real root will find
++                 * this pending request and fulfill or cancel it.
++                 * */
++                if (!in_initrd())
++                        set_loading(udev, loadpath, "-1");
++                goto exit;
++        }
++
++        if (stat(fwpath, &statbuf) < 0 || statbuf.st_size == 0) {
++                if (!in_initrd())
++                        set_loading(udev, loadpath, "-1");
++                rc = EXIT_FAILURE;
++                goto exit;
++        }
++
++        if (!set_loading(udev, loadpath, "1"))
++                goto exit;
++
++        strscpyl(datapath, sizeof(datapath), udev_device_get_syspath(dev), "/data", NULL);
++        if (!copy_firmware(udev, fwpath, datapath, statbuf.st_size)) {
++                log_error("error sending firmware '%s' to device", firmware);
++                set_loading(udev, loadpath, "-1");
++                rc = EXIT_FAILURE;
++                goto exit;
++        };
++
++        set_loading(udev, loadpath, "0");
++exit:
++        if (fwfile)
++                fclose(fwfile);
++        return rc;
++}
++
++const struct udev_builtin udev_builtin_firmware = {
++        .name = "firmware",
++        .cmd = builtin_firmware,
++        .help = "kernel firmware loader",
++        .run_once = true,
++};
+diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c
+index e6b36f1..cd9947e 100644
+--- a/src/udev/udev-builtin.c
++++ b/src/udev/udev-builtin.c
+@@ -31,6 +31,9 @@ static const struct udev_builtin *builtins[] = {
+         [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid,
+ #endif
+         [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs,
++#ifdef HAVE_FIRMWARE
++        [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware,
++#endif
+         [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb,
+         [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id,
+         [UDEV_BUILTIN_KEYBOARD] = &udev_builtin_keyboard,
+diff --git a/src/udev/udev.h b/src/udev/udev.h
+index 1f9c812..fa35a88 100644
+--- a/src/udev/udev.h
++++ b/src/udev/udev.h
+@@ -147,6 +147,9 @@ enum udev_builtin_cmd {
+         UDEV_BUILTIN_BLKID,
+ #endif
+         UDEV_BUILTIN_BTRFS,
++#ifdef HAVE_FIRMWARE
++        UDEV_BUILTIN_FIRMWARE,
++#endif
+         UDEV_BUILTIN_HWDB,
+         UDEV_BUILTIN_INPUT_ID,
+         UDEV_BUILTIN_KEYBOARD,
+@@ -175,6 +178,9 @@ struct udev_builtin {
+ extern const struct udev_builtin udev_builtin_blkid;
+ #endif
+ extern const struct udev_builtin udev_builtin_btrfs;
++#ifdef HAVE_FIRMWARE
++extern const struct udev_builtin udev_builtin_firmware;
++#endif
+ extern const struct udev_builtin udev_builtin_hwdb;
+ extern const struct udev_builtin udev_builtin_input_id;
+ extern const struct udev_builtin udev_builtin_keyboard;
+diff --git a/src/udev/udevd.c b/src/udev/udevd.c
+index bb92f16..84024ac 100644
+--- a/src/udev/udevd.c
++++ b/src/udev/udevd.c
+@@ -125,6 +125,9 @@ struct event {
+         bool is_block;
+         sd_event_source *timeout_warning;
+         sd_event_source *timeout;
++#ifdef HAVE_FIRMWARE
++        bool nodelay;
++#endif
+ };
+ 
+ static inline struct event *node_to_event(struct udev_list_node *node) {
+@@ -613,6 +616,10 @@ static int event_queue_insert(Manager *manager, struct udev_device *dev) {
+         event->devnum = udev_device_get_devnum(dev);
+         event->is_block = streq("block", udev_device_get_subsystem(dev));
+         event->ifindex = udev_device_get_ifindex(dev);
++#ifdef HAVE_FIRMWARE
++        if (streq(udev_device_get_subsystem(dev), "firmware"))
++                event->nodelay = true;
++#endif
+ 
+         log_debug("seq %llu queued, '%s' '%s'", udev_device_get_seqnum(dev),
+              udev_device_get_action(dev), udev_device_get_subsystem(dev));
+@@ -698,6 +705,12 @@ static bool is_devpath_busy(Manager *manager, struct event *event) {
+                         return true;
+                 }
+ 
++#ifdef HAVE_FIRMWARE
++                /* allow to bypass the dependency tracking */
++                if (event->nodelay)
++                        continue;
++#endif
++
+                 /* parent device event found */
+                 if (event->devpath[common] == '/') {
+                         event->delaying_seqnum = loop_event->seqnum;
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch
new file mode 100644
index 0000000..5f3f2e8
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0018-make-test-dir-configurable.patch
@@ -0,0 +1,64 @@
+From 569cd3cf9806a02226d26c4104dbe44262f93d33 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Fri, 22 Jan 2016 16:44:11 +0800
+Subject: [PATCH 18/36] make test dir configurable
+
+Upstream-Status: Pending
+
+test maybe be run on target in cross-compile environment, and test dir
+is not the compilation dir, so make it configurable
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ Makefile.am  | 2 +-
+ configure.ac | 7 +++++++
+ 2 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index b5c6ba7..d3cd961 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -203,7 +203,7 @@ AM_CPPFLAGS = \
+ 	-DROOTLIBDIR=\"$(rootlibdir)\" \
+ 	-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
+ 	-DROOTHOMEDIR=\"$(roothomedir)\" \
+-	-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
++	-DTEST_DIR=\"$(testdir)/test\" \
+ 	-I $(top_srcdir)/src \
+ 	-I $(top_builddir)/src/basic \
+ 	-I $(top_srcdir)/src/basic \
+diff --git a/configure.ac b/configure.ac
+index 36d20b5..d96dc5a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1494,6 +1494,11 @@ AC_ARG_WITH([roothomedir],
+         [],
+         [with_roothomedir=/root])
+ 
++AC_ARG_WITH([testdir],
++        AS_HELP_STRING([--with-testdir=DIR], [test file directory]),
++        [],
++        [with_testdir=${abs_top_srcdir}])
++
+ AC_ARG_WITH([pamlibdir],
+         AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
+         [],
+@@ -1578,6 +1583,7 @@ AC_SUBST([pamconfdir], [$with_pamconfdir])
+ AC_SUBST([rootprefix], [$with_rootprefix])
+ AC_SUBST([rootlibdir], [$with_rootlibdir])
+ AC_SUBST([roothomedir], [$with_roothomedir])
++AC_SUBST([testdir], [$with_testdir])
+ 
+ AC_CONFIG_FILES([
+         Makefile
+@@ -1669,6 +1675,7 @@ AC_MSG_RESULT([
+         lib dir:                 ${libdir}
+         rootlib dir:             ${with_rootlibdir}
+         root home dir:           ${with_roothomedir}
++        test dir:                ${with_testdir}
+         SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
+         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
+         Build Python:            ${PYTHON}
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0019-remove-duplicate-include-uchar.h.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0019-remove-duplicate-include-uchar.h.patch
new file mode 100644
index 0000000..17592f8
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0019-remove-duplicate-include-uchar.h.patch
@@ -0,0 +1,42 @@
+From 3ca534935460647fed66e31aaa90b364e29eab5c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 Feb 2016 05:59:01 +0000
+Subject: [PATCH 1/2] remove duplicate include uchar.h
+
+missing.h already includes it
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/basic/escape.h | 1 -
+ src/basic/utf8.h   | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/src/basic/escape.h b/src/basic/escape.h
+index deaa4de..36d437c 100644
+--- a/src/basic/escape.h
++++ b/src/basic/escape.h
+@@ -23,7 +23,6 @@
+ #include <stddef.h>
+ #include <stdint.h>
+ #include <sys/types.h>
+-#include <uchar.h>
+ 
+ #include "string-util.h"
+ #include "missing.h"
+diff --git a/src/basic/utf8.h b/src/basic/utf8.h
+index 12c272d..bea93a6 100644
+--- a/src/basic/utf8.h
++++ b/src/basic/utf8.h
+@@ -22,7 +22,6 @@
+ #include <stdbool.h>
+ #include <stddef.h>
+ #include <stdint.h>
+-#include <uchar.h>
+ 
+ #include "macro.h"
+ #include "missing.h"
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0020-check-for-uchar.h-in-configure.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0020-check-for-uchar.h-in-configure.patch
new file mode 100644
index 0000000..a027fad
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0020-check-for-uchar.h-in-configure.patch
@@ -0,0 +1,44 @@
+From e06eec89a22719c38e257fe07afff18e359114cb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 22 Feb 2016 06:02:38 +0000
+Subject: [PATCH 2/2] check for uchar.h in configure
+
+Use ifdef to include uchar.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac        | 1 +
+ src/basic/missing.h | 2 ++
+ 2 files changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index ecc3e6b..62f934e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -297,6 +297,7 @@ AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
+ 
+ # ------------------------------------------------------------------------------
+ 
++AC_CHECK_HEADERS([uchar.h], [], [])
+ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
+ AC_CHECK_HEADERS([linux/btrfs.h], [], [])
+ AC_CHECK_HEADERS([linux/memfd.h], [], [])
+diff --git a/src/basic/missing.h b/src/basic/missing.h
+index f704422..a1baa95 100644
+--- a/src/basic/missing.h
++++ b/src/basic/missing.h
+@@ -34,7 +34,9 @@
+ #include <stdlib.h>
+ #include <sys/resource.h>
+ #include <sys/syscall.h>
++#ifdef HAVE_UCHAR_H
+ #include <uchar.h>
++#endif
+ #include <unistd.h>
+ 
+ #ifdef HAVE_AUDIT
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch
new file mode 100644
index 0000000..5797a29
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch
@@ -0,0 +1,27 @@
+From 6cedbaee7964f6a6c61b9f2c8f0b87cef9370424 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 15 Dec 2015 22:51:55 +0000
+Subject: [PATCH 26/38] include missing.h for getting secure_getenv definition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/basic/user-util.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/basic/user-util.c b/src/basic/user-util.c
+index 55672b3..22c4a23 100644
+--- a/src/basic/user-util.c
++++ b/src/basic/user-util.c
+@@ -38,6 +38,7 @@
+ #include "path-util.h"
+ #include "string-util.h"
+ #include "user-util.h"
++#include "missing.h"
+ 
+ bool uid_is_valid(uid_t uid) {
+ 
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch
deleted file mode 100644
index 30e3817..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/0022-Use-getenv-when-secure-versions-are-not-available.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From cb71e4beea3b3b11e5951f95c829cd2eee9fcf7b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 12 Sep 2015 19:10:04 +0000
-Subject: [PATCH 22/31] Use getenv when secure versions are not available
-
-musl doesnt implement secure version, so we default
-to it if configure does not detect a secure imeplementation
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Rejected
-
- src/basic/missing.h | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/basic/missing.h b/src/basic/missing.h
-index bf9b490..d6dbc7d 100644
---- a/src/basic/missing.h
-+++ b/src/basic/missing.h
-@@ -584,13 +584,14 @@ static inline int name_to_handle_at(int fd, const char *name, struct file_handle
-         return syscall(__NR_name_to_handle_at, fd, name, handle, mnt_id, flags);
- }
- #endif
--
--#ifndef HAVE_SECURE_GETENV
-+#ifdef HAVE_SECURE_GETENV
- #  ifdef HAVE___SECURE_GETENV
- #    define secure_getenv __secure_getenv
- #  else
- #    error "neither secure_getenv nor __secure_getenv are available"
- #  endif
-+#else
-+#  define secure_getenv getenv
- #endif
- 
- #ifndef CIFS_MAGIC_NUMBER
--- 
-2.5.2
-
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
new file mode 100644
index 0000000..96fc3d8
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
@@ -0,0 +1,36 @@
+From 71e710a6c8a3879af7d50c4cb995e0615deba5c3 Mon Sep 17 00:00:00 2001
+From: Emil Renner Berthing <systemd@esmil.dk>
+Date: Sat, 12 Sep 2015 19:56:52 +0000
+Subject: [PATCH 29/38] socket-util: don't fail if libc doesn't support IDN
+
+Signed-off-by: Emil Renner Berthing <systemd@esmil.dk>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/basic/socket-util.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
+index 5851268..aefaca5 100644
+--- a/src/basic/socket-util.c
++++ b/src/basic/socket-util.c
+@@ -44,6 +44,15 @@
+ #include "string-util.h"
+ #include "user-util.h"
+ #include "util.h"
++/* Don't fail if the standard library
++ * doesn't support IDN */
++#ifndef NI_IDN
++#define NI_IDN 0
++#endif
++
++#ifndef NI_IDN_USE_STD3_ASCII_RULES
++#define NI_IDN_USE_STD3_ASCII_RULES 0
++#endif
+ 
+ int socket_address_parse(SocketAddress *a, const char *s) {
+         char *e, *n;
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/0023-build-sys-fix-build-with-libgrcypt-disabled.patch b/yocto-poky/meta/recipes-core/systemd/systemd/0023-build-sys-fix-build-with-libgrcypt-disabled.patch
new file mode 100644
index 0000000..1ae3d66
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/0023-build-sys-fix-build-with-libgrcypt-disabled.patch
@@ -0,0 +1,122 @@
+From b68f10bf1f7519e012da5e35fab3a57da7dc46d4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Sun, 27 Mar 2016 17:33:54 -0400
+Subject: [PATCH] build-sys: fix build with libgrcypt disabled
+
+- Move gcrypt.h include inside grcrypt-util.h.
+- Allow gcrypt-util.[ch] to be compiled even without gcrypt.
+This allows the logic in files using gcrypt to be simplified.
+
+- Fix compilation of systemd-resolve without gcrypt.
+systemd-resolved already supported that.
+
+Upstream-Status: Backport [ https://github.com/systemd/systemd/pull/2905 ]
+
+Fixes [YOCTO #9219]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ Makefile.am                |  8 ++++----
+ src/resolve/resolve-tool.c |  3 +--
+ src/shared/gcrypt-util.c   |  4 +++-
+ src/shared/gcrypt-util.h   | 14 ++++++++++++++
+ 4 files changed, 22 insertions(+), 7 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 2b72a53..95eaa9a 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -4262,7 +4262,9 @@ libsystemd_journal_internal_la_SOURCES = \
+ 	src/journal/mmap-cache.h \
+ 	src/journal/compress.c \
+ 	src/journal/audit-type.h \
+-	src/journal/audit-type.c
++	src/journal/audit-type.c \
++	src/shared/gcrypt-util.h \
++	src/shared/gcrypt-util.c
+ 
+ nodist_libsystemd_journal_internal_la_SOURCES = \
+ 	src/journal/audit_type-to-name.h
+@@ -4294,9 +4296,7 @@ libsystemd_journal_internal_la_SOURCES += \
+ 	src/journal/journal-authenticate.c \
+ 	src/journal/journal-authenticate.h \
+ 	src/journal/fsprg.c \
+-	src/journal/fsprg.h \
+-	src/shared/gcrypt-util.c \
+-	src/shared/gcrypt-util.h
++	src/journal/fsprg.h
+ 
+ libsystemd_journal_internal_la_LIBADD += \
+ 	$(GCRYPT_LIBS)
+diff --git a/src/resolve/resolve-tool.c b/src/resolve/resolve-tool.c
+index 009cc73..14ee01c 100644
+--- a/src/resolve/resolve-tool.c
++++ b/src/resolve/resolve-tool.c
+@@ -17,7 +17,6 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
+-#include <gcrypt.h>
+ #include <getopt.h>
+ #include <net/if.h>
+ 
+@@ -863,7 +862,7 @@ static int resolve_openpgp(sd_bus *bus, const char *address) {
+         }
+         domain++;
+ 
+-        r = string_hashsum(address, domain - 1 - address, GCRY_MD_SHA224, &hashed);
++        r = string_hashsum_sha224(address, domain - 1 - address, &hashed);
+         if (r < 0)
+                 return log_error_errno(r, "Hashing failed: %m");
+ 
+diff --git a/src/shared/gcrypt-util.c b/src/shared/gcrypt-util.c
+index 4ff9452..39b544b 100644
+--- a/src/shared/gcrypt-util.c
++++ b/src/shared/gcrypt-util.c
+@@ -19,10 +19,11 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
++#ifdef HAVE_GCRYPT
+ #include <gcrypt.h>
+ 
+-#include "hexdecoct.h"
+ #include "gcrypt-util.h"
++#include "hexdecoct.h"
+ 
+ void initialize_libgcrypt(bool secmem) {
+         const char *p;
+@@ -67,3 +68,4 @@ int string_hashsum(const char *s, size_t len, int md_algorithm, char **out) {
+         *out = enc;
+         return 0;
+ }
++#endif
+diff --git a/src/shared/gcrypt-util.h b/src/shared/gcrypt-util.h
+index c7652c2..cf33b3c 100644
+--- a/src/shared/gcrypt-util.h
++++ b/src/shared/gcrypt-util.h
+@@ -19,7 +19,21 @@
+   along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ ***/
+ 
++#include <errno.h>
+ #include <stdbool.h>
++#include <stddef.h>
++
++#ifdef HAVE_GCRYPT
++#include <gcrypt.h>
+ 
+ void initialize_libgcrypt(bool secmem);
+ int string_hashsum(const char *s, size_t len, int md_algorithm, char **out);
++#endif
++
++static inline int string_hashsum_sha224(const char *s, size_t len, char **out) {
++#ifdef HAVE_GCRYPT
++        return string_hashsum(s, len, GCRY_MD_SHA224, out);
++#else
++        return -EOPNOTSUPP;
++#endif
++}
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch b/yocto-poky/meta/recipes-core/systemd/systemd/qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch
deleted file mode 100644
index c7e1711..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Inappropriate [Specific case QEMU/AB]
-
-From 7b8c4e0a67a79a75e1bd77df3a452a5497322108 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
-Date: Thu, 27 Aug 2015 17:58:26 -0500
-Subject: [PATCH] core/device.c: Change the default device timeout to 240 sec.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
----
- src/core/device.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/core/device.c b/src/core/device.c
-index e7efcf0..4ed8f08 100644
---- a/src/core/device.c
-+++ b/src/core/device.c
-@@ -110,7 +110,7 @@ static void device_init(Unit *u) {
-          * indefinitely for plugged in devices, something which cannot
-          * happen for the other units since their operations time out
-          * anyway. */
--        u->job_timeout = u->manager->default_timeout_start_usec;
-+        u->job_timeout = (240 * USEC_PER_SEC);
- 
-         u->ignore_on_isolate = true;
-         u->ignore_on_snapshot = true;
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/rules-whitelist-hd-devices.patch b/yocto-poky/meta/recipes-core/systemd/systemd/rules-whitelist-hd-devices.patch
deleted file mode 100644
index 8975b05..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd/rules-whitelist-hd-devices.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From f77b7e5626e70c3a775e993816a33af5a61dea42 Mon Sep 17 00:00:00 2001
-From: Patrick Ohly <patrick.ohly@intel.com>
-Date: Wed, 16 Sep 2015 13:55:58 +0200
-Subject: [PATCH] rules: whitelist hd* devices
-
-qemu by default emulates IDE and the linux-yocto kernel(s) use
-CONFIG_IDE instead of the more modern libsata, so disks appear as
-/dev/hd*. Patch rejected upstream because CONFIG_IDE is deprecated.
-
-Upstream-Status: Denied [https://github.com/systemd/systemd/pull/1276]
-
-Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
----
- rules/60-persistent-storage.rules | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
-index 0b14bb4..1c4d97a 100644
---- a/rules/60-persistent-storage.rules
-+++ b/rules/60-persistent-storage.rules
-@@ -6,7 +6,7 @@
- ACTION=="remove", GOTO="persistent_storage_end"
- 
- SUBSYSTEM!="block", GOTO="persistent_storage_end"
--KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*", GOTO="persistent_storage_end"
-+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|hd*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*", GOTO="persistent_storage_end"
- 
- # ignore partitions that span the entire disk
- TEST=="whole_disk", GOTO="persistent_storage_end"
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest b/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest
index a2d61c2..2ae76ff 100644
--- a/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest
+++ b/yocto-poky/meta/recipes-core/systemd/systemd/run-ptest
@@ -1,5 +1,6 @@
 #!/bin/sh
 
+cd tests
 tar -C test -xJf test/sys.tar.xz
-make test/rules-test.sh.log
-make test/udev-test.pl.log
+make check-TESTS
+cd ..
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd_225.bb b/yocto-poky/meta/recipes-core/systemd/systemd_225.bb
deleted file mode 100644
index 18c2448..0000000
--- a/yocto-poky/meta/recipes-core/systemd/systemd_225.bb
+++ /dev/null
@@ -1,422 +0,0 @@
-SUMMARY = "A System and service manager"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
-
-DESCRIPTION = "systemd is a system and service manager for Linux, compatible with \
-SysV and LSB init scripts. systemd provides aggressive parallelization \
-capabilities, uses socket and D-Bus activation for starting services, \
-offers on-demand starting of daemons, keeps track of processes using \
-Linux cgroups, supports snapshotting and restoring of the system \
-state, maintains mount and automount points and implements an \
-elaborate transactional dependency-based service control logic. It can \
-work as a drop-in replacement for sysvinit."
-
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
-                    file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
-
-PROVIDES = "udev"
-
-PE = "1"
-
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup qemu-native util-linux"
-
-SECTION = "base/shell"
-
-inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext
-
-SRCREV = "e1439a1472c5f691733b8ef10e702beac2496a63"
-
-PV = "225+git${SRCPV}"
-
-SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
-           file://0003-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
-           file://0004-configure-Check-for-additional-features-that-uclibc-.patch \
-           file://0005-nspawn-Use-execvpe-only-when-libc-supports-it.patch \
-           file://0006-journal-Use-posix-fallocate-only-if-available.patch \
-           file://0007-util-Use-mkostemp-only-if-libc-supports-it.patch \
-           file://0008-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \
-           file://0009-sysv-generator-add-support-for-executing-scripts-und.patch \
-           file://0010-Make-root-s-home-directory-configurable.patch \
-           file://0011-systemd-user-avoid-using-system-auth.patch \
-           file://0012-implment-systemd-sysv-install-for-OE.patch \
-           file://0014-Revert-rules-remove-firmware-loading-rules.patch \
-           file://0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
-           file://touchscreen.rules \
-           file://00-create-volatile.conf \
-           file://init \
-           file://run-ptest \
-           file://rules-whitelist-hd-devices.patch \
-          "
-SRC_URI_append_qemuall = " file://qemuall_io_latency-core-device.c-Change-the-default-device-timeout-to-2.patch"
-
-S = "${WORKDIR}/git"
-
-SRC_URI_append_libc-uclibc = "\
-            file://0001-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
-            file://0022-Use-getenv-when-secure-versions-are-not-available.patch \
-            file://0001-fix-build-on-uClibc-exp10.patch \
-           "
-LDFLAGS_append_libc-uclibc = " -lrt"
-
-GTKDOC_DOCDIR = "${S}/docs/"
-
-PACKAGECONFIG ??= "xz ldconfig \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
-                  "
-
-PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
-# Sign the journal for anti-tampering
-PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
-# regardless of PACKAGECONFIG, libgcrypt is always required to expand
-# the AM_PATH_LIBGCRYPT autoconf macro
-DEPENDS += "libgcrypt"
-# Compress the journal
-PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
-PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
-PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
-PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
-PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
-PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
-PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
-PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
-PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
-# Verify keymaps on locale change
-PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
-# Update NAT firewall rules
-PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
-PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,,"
-PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
-PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no ,valgrind"
-PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
-
-CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill"
-CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
-CACHED_CONFIGUREVARS += "ac_cv_path_QUOTACHECK=${sbindir}/quotacheck"
-CACHED_CONFIGUREVARS += "ac_cv_path_QUOTAON=${sbindir}/quotaon"
-CACHED_CONFIGUREVARS += "ac_cv_path_SULOGIN=${base_sbindir}/sulogin"
-
-# Helper variables to clarify locations.  This mirrors the logic in systemd's
-# build system.
-rootprefix ?= "${base_prefix}"
-rootlibdir ?= "${base_libdir}"
-rootlibexecdir = "${rootprefix}/lib"
-
-CACHED_CONFIGUREVARS_class-target = "\
-                         ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
-                         ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
-                         ac_cv_path_KMOD=${base_bindir}/kmod \
-                         ac_cv_path_KILL=${base_bindir}/kill \
-                         ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
-                         ac_cv_path_KEXEC=${sbindir}/kexec \
-                         ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
-                         ac_cv_path_QUOTAON=${sbindir}/quotaon \
-			 "
-
-EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
-                 --with-rootlibdir=${rootlibdir} \
-                 --with-roothomedir=${ROOT_HOME} \
-                 --disable-coredump \
-                 --enable-split-usr \
-                 --without-python \
-                 --with-sysvrcnd-path=${sysconfdir} \
-                 --with-firmware-path=/lib/firmware \
-               "
-# uclibc does not have NSS
-EXTRA_OECONF_append_libc-uclibc = " --disable-myhostname "
-
-# disable problematic GCC 5.2 optimizations [YOCTO #8291]
-FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
-
-do_configure_prepend() {
-	export NM="${HOST_PREFIX}gcc-nm"
-	export AR="${HOST_PREFIX}gcc-ar"
-	export RANLIB="${HOST_PREFIX}gcc-ranlib"
-	export KMOD="${base_bindir}/kmod"
-	if [ -d ${S}/units.pre_sed ] ; then
-		cp -r ${S}/units.pre_sed ${S}/units
-	else
-		cp -r ${S}/units ${S}/units.pre_sed
-	fi
-	sed -i '/ln --relative --help/d' ${S}/configure.ac
-	sed -i -e 's:\$(LN_S) --relative -f:lnr:g' ${S}/Makefile.am
-	sed -i -e 's:\$(LN_S) --relative:lnr:g' ${S}/Makefile.am
-}
-
-do_install() {
-	autotools_do_install
-	install -d ${D}/${base_sbindir}
-	# Provided by a separate recipe
-	rm ${D}${systemd_unitdir}/system/serial-getty* -f
-
-	# Provide support for initramfs
-	[ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
-	[ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
-
-	# Create machine-id
-	# 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
-	touch ${D}${sysconfdir}/machine-id
-
-
-	install -d ${D}${sysconfdir}/udev/rules.d/
-	install -d ${D}${sysconfdir}/tmpfiles.d
-	install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
-
-	install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
-
-	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
-		install -d ${D}${sysconfdir}/init.d
-		install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
-		sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
-	fi
-
-	chown root:systemd-journal ${D}/${localstatedir}/log/journal
-
-        # Delete journal README, as log can be symlinked inside volatile.
-        rm -f ${D}/${localstatedir}/log/README
-
-	# Create symlinks for systemd-update-utmp-runlevel.service
-	install -d ${D}${systemd_unitdir}/system/graphical.target.wants
-	install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
-	install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
-	install -d ${D}${systemd_unitdir}/system/reboot.target.wants
-	install -d ${D}${systemd_unitdir}/system/rescue.target.wants
-	ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
-	ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
-	ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
-	ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
-	ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
-
-	# Enable journal to forward message to syslog daemon
-	sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
-	# this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
-	# for existence else it fails
-	if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
-		${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
-	fi
-	install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
-}
-
-do_install_ptest () {
-       install -d ${D}${PTEST_PATH}/test
-       cp -rf ${S}/test/* ${D}${PTEST_PATH}/test
-       install -m 0755  ${B}/test-udev ${D}${PTEST_PATH}/
-       install -d ${D}${PTEST_PATH}/build-aux
-       cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
-       cp -rf ${B}/rules ${D}${PTEST_PATH}/
-       # This directory needs to be there for udev-test.pl to work.
-       install -d ${D}${libdir}/udev/rules.d
-       cp ${B}/Makefile ${D}${PTEST_PATH}/
-       cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test
-       sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
-       sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
-       sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
-}
-
-python populate_packages_prepend (){
-    systemdlibdir = d.getVar("rootlibdir", True)
-    do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
-}
-PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
-
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install \
-             ${PN}-rpm-macros ${PN}-binfmt ${PN}-pam ${PN}-zsh ${PN}-xorg-xinitrc"
-
-SYSTEMD_PACKAGES = "${PN}-binfmt"
-SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
-
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} += "--system systemd-journal-gateway; --system systemd-timesync"
-GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
-
-FILES_${PN}-analyze = "${bindir}/systemd-analyze"
-
-FILES_${PN}-initramfs = "/init"
-RDEPENDS_${PN}-initramfs = "${PN}"
-
-RDEPENDS_${PN}-ptest += "perl python bash"
-FILES_${PN}-ptest += "${libdir}/udev/rules.d"
-
-FILES_${PN}-dbg += "${libdir}/systemd/ptest/.debug"
-
-FILES_${PN}-gui = "${bindir}/systemadm"
-
-FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
-                              ${systemd_unitdir}/system/systemd-vconsole-setup.service \
-                              ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
-
-RDEPENDS_${PN}-kernel-install += "bash"
-FILES_${PN}-kernel-install = "${bindir}/kernel-install \
-                              ${sysconfdir}/kernel/ \
-                              ${exec_prefix}/lib/kernel \
-                             "
-FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
-                         "
-
-FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
-
-FILES_${PN}-zsh = "${datadir}/zsh/site-functions"
-
-FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
-                      ${exec_prefix}/lib/binfmt.d \
-                      ${rootlibexecdir}/systemd/systemd-binfmt \
-                      ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
-                      ${systemd_unitdir}/system/systemd-binfmt.service"
-RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
-
-RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
-
-CONFFILES_${PN} = "${sysconfdir}/systemd/journald.conf \
-                ${sysconfdir}/systemd/logind.conf \
-                ${sysconfdir}/systemd/system.conf \
-                ${sysconfdir}/systemd/user.conf"
-
-FILES_${PN} = " ${base_bindir}/* \
-                ${datadir}/bash-completion \
-                ${datadir}/dbus-1/services \
-                ${datadir}/dbus-1/system-services \
-                ${datadir}/polkit-1 \
-                ${datadir}/${BPN} \
-                ${datadir}/factory \
-                ${sysconfdir}/bash_completion.d/ \
-                ${sysconfdir}/dbus-1/ \
-                ${sysconfdir}/machine-id \
-                ${sysconfdir}/modules-load.d/ \
-                ${sysconfdir}/pam.d/ \
-                ${sysconfdir}/sysctl.d/ \
-                ${sysconfdir}/systemd/ \
-                ${sysconfdir}/tmpfiles.d/ \
-                ${sysconfdir}/xdg/ \
-                ${sysconfdir}/init.d/README \
-                ${rootlibexecdir}/systemd/* \
-                ${systemd_unitdir}/* \
-                ${base_libdir}/security/*.so \
-                ${libdir}/libnss_* \
-                /cgroup \
-                ${bindir}/systemd* \
-                ${bindir}/busctl \
-                ${bindir}/localectl \
-                ${bindir}/hostnamectl \
-                ${bindir}/timedatectl \
-                ${bindir}/bootctl \
-                ${bindir}/kernel-install \
-                ${exec_prefix}/lib/tmpfiles.d/*.conf \
-                ${exec_prefix}/lib/systemd \
-                ${exec_prefix}/lib/modules-load.d \
-                ${exec_prefix}/lib/sysctl.d \
-                ${exec_prefix}/lib/sysusers.d \
-                ${localstatedir} \
-                ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
-                ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
-                ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
-                ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
-               "
-
-FILES_${PN}-dbg += "${rootlibdir}/.debug ${systemd_unitdir}/.debug ${systemd_unitdir}/*/.debug ${base_libdir}/security/.debug/"
-FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
-
-RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
-RDEPENDS_${PN} += "volatile-binds update-rc.d"
-
-RRECOMMENDS_${PN} += "systemd-serialgetty systemd-vconsole-setup \
-                      systemd-compat-units udev-hwdb \
-                      util-linux-agetty  util-linux-fsck e2fsprogs-e2fsck \
-                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
-                      os-release \
-"
-
-PACKAGES =+ "udev-dbg udev udev-hwdb"
-
-FILES_udev-dbg += "${nonarch_base_libdir}/udev/.debug"
-
-RPROVIDES_udev = "hotplug"
-
-RDEPENDS_udev-hwdb += "udev"
-
-FILES_udev += "${base_sbindir}/udevd \
-               ${rootlibexecdir}/systemd/systemd-udevd \
-               ${rootlibexecdir}/udev/accelerometer \
-               ${rootlibexecdir}/udev/ata_id \
-               ${rootlibexecdir}/udev/cdrom_id \
-               ${rootlibexecdir}/udev/collect \
-               ${rootlibexecdir}/udev/findkeyboards \
-               ${rootlibexecdir}/udev/keyboard-force-release.sh \
-               ${rootlibexecdir}/udev/keymap \
-               ${rootlibexecdir}/udev/mtd_probe \
-               ${rootlibexecdir}/udev/scsi_id \
-               ${rootlibexecdir}/udev/v4l_id \
-               ${rootlibexecdir}/udev/keymaps \
-               ${rootlibexecdir}/udev/rules.d/*.rules \
-               ${sysconfdir}/udev \
-               ${sysconfdir}/init.d/systemd-udevd \
-               ${systemd_unitdir}/system/*udev* \
-               ${systemd_unitdir}/system/*.wants/*udev* \
-               ${base_bindir}/udevadm \
-               ${datadir}/bash-completion/completions/udevadm \
-              "
-
-FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
-
-INITSCRIPT_PACKAGES = "udev"
-INITSCRIPT_NAME_udev = "systemd-udevd"
-INITSCRIPT_PARAMS_udev = "start 03 S ."
-
-python __anonymous() {
-    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
-        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
-}
-
-# TODO:
-# u-a for runlevel and telinit
-
-ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
-
-ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
-ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
-ALTERNATIVE_PRIORITY[init] ?= "300"
-
-ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
-ALTERNATIVE_PRIORITY[halt] ?= "300"
-
-ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
-ALTERNATIVE_PRIORITY[reboot] ?= "300"
-
-ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
-ALTERNATIVE_PRIORITY[shutdown] ?= "300"
-
-ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
-ALTERNATIVE_PRIORITY[poweroff] ?= "300"
-
-ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
-ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
-ALTERNATIVE_PRIORITY[runlevel] ?= "300"
-
-pkg_postinst_udev-hwdb () {
-	if test -n "$D"; then
-		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
-			--root $D
-	else
-		udevadm hwdb --update
-	fi
-}
-
-pkg_prerm_udev-hwdb () {
-	if test -n "$D"; then
-		exit 1
-	fi
-
-	rm -f ${sysconfdir}/udev/hwdb.bin
-}
-
-# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
-# that we don't build both udev and systemd in world builds.
-python () {
-    if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
-        raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
-}
diff --git a/yocto-poky/meta/recipes-core/systemd/systemd_229.bb b/yocto-poky/meta/recipes-core/systemd/systemd_229.bb
new file mode 100644
index 0000000..c23c749
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/systemd/systemd_229.bb
@@ -0,0 +1,579 @@
+SUMMARY = "A System and service manager"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/systemd"
+
+DESCRIPTION = "systemd is a system and service manager for Linux, compatible with \
+SysV and LSB init scripts. systemd provides aggressive parallelization \
+capabilities, uses socket and D-Bus activation for starting services, \
+offers on-demand starting of daemons, keeps track of processes using \
+Linux cgroups, supports snapshotting and restoring of the system \
+state, maintains mount and automount points and implements an \
+elaborate transactional dependency-based service control logic. It can \
+work as a drop-in replacement for sysvinit."
+
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \
+                    file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c"
+
+PROVIDES = "udev"
+
+PE = "1"
+
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline libcap libcgroup qemu-native util-linux"
+
+SECTION = "base/shell"
+
+inherit useradd pkgconfig autotools perlnative update-rc.d update-alternatives qemu systemd ptest gettext bash-completion
+
+SRCREV = "714c62b46379abb7558c544665522aca91691e10"
+
+PV = "229+git${SRCPV}"
+
+SRC_URI = "git://github.com/systemd/systemd.git;protocol=git \
+           file://touchscreen.rules \
+           file://00-create-volatile.conf \
+           file://init \
+           file://run-ptest \
+           file://0003-define-exp10-if-missing.patch \
+           file://0004-Use-getenv-when-secure-versions-are-not-available.patch \
+           file://0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch \
+           file://0006-configure-Check-for-additional-features-that-uclibc-.patch \
+           file://0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch \
+           file://0008-nspawn-Use-execvpe-only-when-libc-supports-it.patch \
+           file://0009-util-bypass-unimplemented-_SC_PHYS_PAGES-system-conf.patch \
+           file://0010-implment-systemd-sysv-install-for-OE.patch \
+           file://0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch \
+           file://0012-rules-whitelist-hd-devices.patch \
+           file://0013-sysv-generator-add-support-for-executing-scripts-und.patch \
+           file://0014-Make-root-s-home-directory-configurable.patch \
+           file://0015-systemd-user-avoid-using-system-auth.patch \
+           file://0016-Revert-rules-remove-firmware-loading-rules.patch \
+           file://0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch \
+           file://0018-make-test-dir-configurable.patch \
+           file://0019-remove-duplicate-include-uchar.h.patch \
+           file://0020-check-for-uchar.h-in-configure.patch \
+           file://0021-include-missing.h-for-getting-secure_getenv-definiti.patch \
+           file://0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch \
+           file://0023-build-sys-fix-build-with-libgrcypt-disabled.patch \
+"
+SRC_URI_append_libc-uclibc = "\
+           file://0002-units-Prefer-getty-to-agetty-in-console-setup-system.patch \
+"
+SRC_URI_append_qemuall = " file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
+
+S = "${WORKDIR}/git"
+
+LDFLAGS_append_libc-uclibc = " -lrt -lssp_nonshared -lssp "
+
+GTKDOC_DOCDIR = "${S}/docs/"
+
+PACKAGECONFIG ??= "xz \
+                   ldconfig \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xkbcommon', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'rfkill', '', d)} \
+                   ${@bb.utils.contains('MACHINE_FEATURES', 'efi', 'efi', '', d)} \
+                   binfmt \
+                   randomseed \
+                   machined \
+                   backlight \
+                   quotacheck \
+                   bootchart \
+                   hostnamed \
+                   ${@bb.utils.contains('TCLIBC', 'glibc', 'myhostname sysusers', '', d)} \
+                   hibernate \
+                   timedated \
+                   timesyncd \
+                   localed \
+                   kdbus \
+                   ima \
+                   smack \
+                   logind \
+                   firstboot \
+                   utmp \
+                   polkit \
+"
+PACKAGECONFIG_remove_libc-musl = "selinux"
+PACKAGECONFIG_remove_libc-musl = "smack"
+
+# Use the upstream systemd serial-getty@.service and rely on
+# systemd-getty-generator instead of using the OE-core specific
+# systemd-serialgetty.bb - not enabled by default.
+PACKAGECONFIG[serial-getty-generator] = ""
+
+PACKAGECONFIG[journal-upload] = "--enable-libcurl,--disable-libcurl,curl"
+# Sign the journal for anti-tampering
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt"
+PACKAGECONFIG[cryptsetup] = "--enable-libcryptsetup,--disable-libcryptsetup,cryptsetup"
+PACKAGECONFIG[microhttpd] = "--enable-microhttpd,--disable-microhttpd,libmicrohttpd"
+PACKAGECONFIG[elfutils] = "--enable-elfutils,--disable-elfutils,elfutils"
+PACKAGECONFIG[resolved] = "--enable-resolved,--disable-resolved"
+PACKAGECONFIG[networkd] = "--enable-networkd,--disable-networkd"
+PACKAGECONFIG[machined] = "--enable-machined,--disable-machined"
+PACKAGECONFIG[backlight] = "--enable-backlight,--disable-backlight"
+PACKAGECONFIG[quotacheck] = "--enable-quotacheck,--disable-quotacheck"
+PACKAGECONFIG[bootchart] = "--enable-bootchart,--disable-bootchart"
+PACKAGECONFIG[hostnamed] = "--enable-hostnamed,--disable-hostnamed"
+PACKAGECONFIG[myhostname] = "--enable-myhostname,--disable-myhostname"
+PACKAGECONFIG[rfkill] = "--enable-rfkill,--disable-rfkill"
+PACKAGECONFIG[hibernate] = "--enable-hibernate,--disable-hibernate"
+PACKAGECONFIG[timedated] = "--enable-timedated,--disable-timedated"
+PACKAGECONFIG[timesyncd] = "--enable-timesyncd,--disable-timesyncd"
+PACKAGECONFIG[localed] = "--enable-localed,--disable-localed"
+PACKAGECONFIG[efi] = "--enable-efi,--disable-efi"
+PACKAGECONFIG[kdbus] = "--enable-kdbus,--disable-kdbus"
+PACKAGECONFIG[ima] = "--enable-ima,--disable-ima"
+PACKAGECONFIG[smack] = "--enable-smack,--disable-smack"
+# libseccomp is found in meta-security
+PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
+PACKAGECONFIG[logind] = "--enable-logind,--disable-logind"
+PACKAGECONFIG[sysusers] = "--enable-sysusers,--disable-sysusers"
+PACKAGECONFIG[firstboot] = "--enable-firstboot,--disable-firstboot"
+PACKAGECONFIG[randomseed] = "--enable-randomseed,--disable-randomseed"
+PACKAGECONFIG[binfmt] = "--enable-binfmt,--disable-binfmt"
+PACKAGECONFIG[utmp] = "--enable-utmp,--disable-utmp"
+PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit"
+# importd requires curl/xz/zlib/bzip2/gcrypt
+PACKAGECONFIG[importd] = "--enable-importd,--disable-importd"
+PACKAGECONFIG[libidn] = "--enable-libidn,--disable-libidn,libidn"
+PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit"
+PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,libxslt-native xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam"
+# Verify keymaps on locale change
+PACKAGECONFIG[xkbcommon] = "--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
+# Update NAT firewall rules
+PACKAGECONFIG[iptc] = "--enable-libiptc,--disable-libiptc,iptables"
+PACKAGECONFIG[ldconfig] = "--enable-ldconfig,--disable-ldconfig,,"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
+PACKAGECONFIG[valgrind] = "ac_cv_header_valgrind_memcheck_h=yes ac_cv_header_valgrind_valgrind_h=yes ,ac_cv_header_valgrind_memcheck_h=no ac_cv_header_valgrind_valgrind_h=no ,valgrind"
+PACKAGECONFIG[qrencode] = "--enable-qrencode,--disable-qrencode,qrencode"
+PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus"
+PACKAGECONFIG[coredump] = "--enable-coredump,--disable-coredump"
+PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
+PACKAGECONFIG[lz4] = "--enable-lz4,--disable-lz4,lz4"
+PACKAGECONFIG[xz] = "--enable-xz,--disable-xz,xz"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib"
+
+CACHED_CONFIGUREVARS += "ac_cv_path_KILL=${base_bindir}/kill"
+CACHED_CONFIGUREVARS += "ac_cv_path_KMOD=${base_bindir}/kmod"
+CACHED_CONFIGUREVARS += "ac_cv_path_QUOTACHECK=${sbindir}/quotacheck"
+CACHED_CONFIGUREVARS += "ac_cv_path_QUOTAON=${sbindir}/quotaon"
+CACHED_CONFIGUREVARS += "ac_cv_path_SULOGIN=${base_sbindir}/sulogin"
+
+# Helper variables to clarify locations.  This mirrors the logic in systemd's
+# build system.
+rootprefix ?= "${base_prefix}"
+rootlibdir ?= "${base_libdir}"
+rootlibexecdir = "${rootprefix}/lib"
+
+CACHED_CONFIGUREVARS_class-target = "\
+                         ac_cv_path_MOUNT_PATH=${base_bindir}/mount \
+                         ac_cv_path_UMOUNT_PATH=${base_bindir}/umount \
+                         ac_cv_path_KMOD=${base_bindir}/kmod \
+                         ac_cv_path_KILL=${base_bindir}/kill \
+                         ac_cv_path_SULOGIN=${base_sbindir}/sulogin \
+                         ac_cv_path_KEXEC=${sbindir}/kexec \
+                         ac_cv_path_QUOTACHECK=${sbindir}/quotacheck \
+                         ac_cv_path_QUOTAON=${sbindir}/quotaon \
+			 "
+
+EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
+                 --with-rootlibdir=${rootlibdir} \
+                 --with-roothomedir=${ROOT_HOME} \
+                 --enable-split-usr \
+                 --without-python \
+                 --with-sysvrcnd-path=${sysconfdir} \
+                 --with-firmware-path=/lib/firmware \
+                 --with-testdir=${PTEST_PATH} \
+               "
+# per the systemd README, define VALGRIND=1 to run under valgrind
+CFLAGS .= "${@bb.utils.contains('PACKAGECONFIG', 'valgrind', ' -DVALGRIND=1', '', d)}"
+
+# disable problematic GCC 5.2 optimizations [YOCTO #8291]
+FULL_OPTIMIZATION_append_arm = " -fno-schedule-insns -fno-schedule-insns2"
+
+do_configure_prepend() {
+	export NM="${HOST_PREFIX}gcc-nm"
+	export AR="${HOST_PREFIX}gcc-ar"
+	export RANLIB="${HOST_PREFIX}gcc-ranlib"
+	export KMOD="${base_bindir}/kmod"
+	if [ -d ${S}/units.pre_sed ] ; then
+		cp -r ${S}/units.pre_sed ${S}/units
+	else
+		cp -r ${S}/units ${S}/units.pre_sed
+	fi
+	sed -i -e 's:-DTEST_DIR=\\\".*\\\":-DTEST_DIR=\\\"${PTEST_PATH}/tests/test\\\":' ${S}/Makefile.am
+	sed -i -e 's:-DCATALOG_DIR=\\\".*\\\":-DCATALOG_DIR=\\\"${PTEST_PATH}/tests/catalog\\\":' ${S}/Makefile.am
+}
+
+do_install() {
+	autotools_do_install
+	install -d ${D}/${base_sbindir}
+	if ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'false', 'true', d)}; then
+		# Provided by a separate recipe
+		rm ${D}${systemd_unitdir}/system/serial-getty* -f
+	fi
+
+	# Provide support for initramfs
+	[ ! -e ${D}/init ] && ln -s ${rootlibexecdir}/systemd/systemd ${D}/init
+	[ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
+
+	# Create machine-id
+	# 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
+	touch ${D}${sysconfdir}/machine-id
+
+
+	install -d ${D}${sysconfdir}/udev/rules.d/
+	install -d ${D}${sysconfdir}/tmpfiles.d
+	install -m 0644 ${WORKDIR}/*.rules ${D}${sysconfdir}/udev/rules.d/
+
+	install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+		install -d ${D}${sysconfdir}/init.d
+		install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/systemd-udevd
+		sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% ${D}${sysconfdir}/init.d/systemd-udevd
+	fi
+
+	chown root:systemd-journal ${D}/${localstatedir}/log/journal
+
+        # Delete journal README, as log can be symlinked inside volatile.
+        rm -f ${D}/${localstatedir}/log/README
+
+	install -d ${D}${systemd_unitdir}/system/graphical.target.wants
+	install -d ${D}${systemd_unitdir}/system/multi-user.target.wants
+	install -d ${D}${systemd_unitdir}/system/poweroff.target.wants
+	install -d ${D}${systemd_unitdir}/system/reboot.target.wants
+	install -d ${D}${systemd_unitdir}/system/rescue.target.wants
+
+	# Create symlinks for systemd-update-utmp-runlevel.service
+	if ${@bb.utils.contains('PACKAGECONFIG', 'utmp', 'true', 'false', d)}; then
+		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/graphical.target.wants/systemd-update-utmp-runlevel.service
+		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/multi-user.target.wants/systemd-update-utmp-runlevel.service
+		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/poweroff.target.wants/systemd-update-utmp-runlevel.service
+		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/reboot.target.wants/systemd-update-utmp-runlevel.service
+		ln -sf ../systemd-update-utmp-runlevel.service ${D}${systemd_unitdir}/system/rescue.target.wants/systemd-update-utmp-runlevel.service
+	fi
+
+	# Enable journal to forward message to syslog daemon
+	sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
+	# this file is needed to exist if networkd is disabled but timesyncd is still in use since timesyncd checks it
+	# for existence else it fails
+	if [ -s ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf ]; then
+		${@bb.utils.contains('PACKAGECONFIG', 'networkd', ':', 'sed -i -e "\$ad /run/systemd/netif/links 0755 root root -" ${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf', d)}
+	fi
+	if ! ${@bb.utils.contains('PACKAGECONFIG', 'resolved', 'true', 'false', d)}; then
+		# if resolved is disabled, it won't handle the link of resolv.conf, so
+		# set it up ourselves
+		ln -s ../run/resolv.conf ${D}${sysconfdir}/resolv.conf
+		echo 'L! ${sysconfdir}/resolv.conf - - - - ../run/resolv.conf' >>${D}${exec_prefix}/lib/tmpfiles.d/etc.conf
+		echo 'f /run/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
+	fi
+	install -Dm 0755 ${S}/src/systemctl/systemd-sysv-install.SKELETON ${D}${systemd_unitdir}/systemd-sysv-install
+}
+
+do_install_ptest () {
+       # install data files needed for tests
+       install -d ${D}${PTEST_PATH}/tests/test
+       cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
+       sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
+
+       install -d ${D}${PTEST_PATH}/tests/catalog
+       install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
+
+       install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
+
+       install -d ${D}${PTEST_PATH}/tests/rules
+       install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
+
+       # This directory needs to be there for udev-test.pl to work.
+       install -d ${D}${libdir}/udev/rules.d
+
+       # install actual test binaries
+       install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
+       install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
+
+       install ${B}/Makefile ${D}${PTEST_PATH}/tests/
+}
+
+python populate_packages_prepend (){
+    systemdlibdir = d.getVar("rootlibdir", True)
+    do_split_packages(d, systemdlibdir, '^lib(.*)\.so\.*', 'lib%s', 'Systemd %s library', extra_depends='', allow_links=True)
+}
+PACKAGES_DYNAMIC += "^lib(udev|systemd).*"
+
+PACKAGES =+ "\
+    ${PN}-gui \
+    ${PN}-vconsole-setup \
+    ${PN}-initramfs \
+    ${PN}-analyze \
+    ${PN}-kernel-install \
+    ${PN}-rpm-macros \
+    ${PN}-binfmt \
+    ${PN}-pam \
+    ${PN}-zsh-completion \
+    ${PN}-xorg-xinitrc \
+    ${PN}-extra-utils \
+"
+
+SYSTEMD_PACKAGES = "${@bb.utils.contains('PACKAGECONFIG', 'binfmt', '${PN}-binfmt', '', d)}"
+SYSTEMD_SERVICE_${PN}-binfmt = "systemd-binfmt.service"
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'microhttpd', '--system -d / -M --shell /bin/nologin systemd-journal-gateway;', '', d)}"
+USERADD_PARAM_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'timesyncd', '--system -d / -M --shell /bin/nologin systemd-timesync;', '', d)}"
+GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
+
+FILES_${PN}-analyze = "${bindir}/systemd-analyze"
+
+FILES_${PN}-initramfs = "/init"
+RDEPENDS_${PN}-initramfs = "${PN}"
+
+RDEPENDS_${PN}-ptest += "gawk make perl python bash xz \
+                         tzdata tzdata-americas tzdata-asia \
+                         tzdata-europe tzdata-africa tzdata-antarctica \
+                         tzdata-arctic tzdata-atlantic tzdata-australia \
+                         tzdata-pacific tzdata-posix"
+
+FILES_${PN}-ptest += "${libdir}/udev/rules.d"
+
+FILES_${PN}-gui = "${bindir}/systemadm"
+
+FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
+                              ${systemd_unitdir}/system/systemd-vconsole-setup.service \
+                              ${systemd_unitdir}/system/sysinit.target.wants/systemd-vconsole-setup.service"
+
+RDEPENDS_${PN}-kernel-install += "bash"
+FILES_${PN}-kernel-install = "${bindir}/kernel-install \
+                              ${sysconfdir}/kernel/ \
+                              ${exec_prefix}/lib/kernel \
+                             "
+FILES_${PN}-rpm-macros = "${exec_prefix}/lib/rpm \
+                         "
+
+FILES_${PN}-xorg-xinitrc = "${sysconfdir}/X11/xinit/xinitrc.d/*"
+
+FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions"
+
+FILES_${PN}-binfmt = "${sysconfdir}/binfmt.d/ \
+                      ${exec_prefix}/lib/binfmt.d \
+                      ${rootlibexecdir}/systemd/systemd-binfmt \
+                      ${systemd_unitdir}/system/proc-sys-fs-binfmt_misc.* \
+                      ${systemd_unitdir}/system/systemd-binfmt.service"
+RRECOMMENDS_${PN}-binfmt = "kernel-module-binfmt-misc"
+
+RRECOMMENDS_${PN}-vconsole-setup = "kbd kbd-consolefonts kbd-keymaps"
+
+FILES_${PN}-extra-utils = "\
+                        ${base_bindir}/systemd-escape \
+                        ${base_bindir}/systemd-inhibit \
+                        ${bindir}/systemd-detect-virt \
+                        ${bindir}/systemd-path \
+                        ${bindir}/systemd-run \
+                        ${bindir}/systemd-cat \
+                        ${bindir}/systemd-delta \
+                        ${bindir}/systemd-cgls \
+                        ${bindir}/systemd-cgtop \
+                        ${bindir}/systemd-stdio-bridge \
+                        ${base_bindir}/systemd-ask-password \
+                        ${base_bindir}/systemd-tty-ask-password-agent \
+                        ${systemd_unitdir}/system/systemd-ask-password-console.path \
+                        ${systemd_unitdir}/system/systemd-ask-password-console.service \
+                        ${systemd_unitdir}/system/systemd-ask-password-wall.path \
+                        ${systemd_unitdir}/system/systemd-ask-password-wall.service \
+                        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-console.path \
+                        ${systemd_unitdir}/system/sysinit.target.wants/systemd-ask-password-wall.path \
+                        ${systemd_unitdir}/system/multi-user.target.wants/systemd-ask-password-wall.path \
+                        ${rootlibexecdir}/systemd/systemd-resolve-host \
+                        ${rootlibexecdir}/systemd/systemd-ac-power \
+                        ${rootlibexecdir}/systemd/systemd-activate \
+                        ${bindir}/systemd-nspawn \
+                        ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
+                        ${systemd_unitdir}/system/systemd-nspawn@.service \
+                        ${rootlibexecdir}/systemd/systemd-bus-proxyd \
+                        ${systemd_unitdir}/system/systemd-bus-proxyd.service \
+                        ${systemd_unitdir}/system/systemd-bus-proxyd.socket \
+                        ${rootlibexecdir}/systemd/systemd-socket-proxyd \
+                        ${rootlibexecdir}/systemd/systemd-reply-password \
+                        ${rootlibexecdir}/systemd/systemd-sleep \
+                        ${rootlibexecdir}/systemd/system-sleep \
+                        ${systemd_unitdir}/system/systemd-hibernate.service \
+                        ${systemd_unitdir}/system/systemd-hybrid-sleep.service \
+                        ${systemd_unitdir}/system/systemd-suspend.service \
+                        ${systemd_unitdir}/system/sleep.target \
+                        ${rootlibexecdir}/systemd/systemd-initctl \
+                        ${systemd_unitdir}/system/systemd-initctl.service \
+                        ${systemd_unitdir}/system/systemd-initctl.socket \
+                        ${systemd_unitdir}/system/sockets.target.wants/systemd-initctl.socket \
+                        ${rootlibexecdir}/systemd/system-generators/systemd-gpt-auto-generator \
+                        ${rootlibexecdir}/systemd/systemd-cgroups-agent \
+"
+
+CONFFILES_${PN} = "${sysconfdir}/machine-id \
+                ${sysconfdir}/systemd/coredump.conf \
+                ${sysconfdir}/systemd/journald.conf \
+                ${sysconfdir}/systemd/logind.conf \
+                ${sysconfdir}/systemd/system.conf \
+                ${sysconfdir}/systemd/user.conf"
+
+FILES_${PN} = " ${base_bindir}/* \
+                ${datadir}/dbus-1/services \
+                ${datadir}/dbus-1/system-services \
+                ${datadir}/polkit-1 \
+                ${datadir}/${BPN} \
+                ${datadir}/factory \
+                ${sysconfdir}/dbus-1/ \
+                ${sysconfdir}/machine-id \
+                ${sysconfdir}/modules-load.d/ \
+                ${sysconfdir}/pam.d/ \
+                ${sysconfdir}/sysctl.d/ \
+                ${sysconfdir}/systemd/ \
+                ${sysconfdir}/tmpfiles.d/ \
+                ${sysconfdir}/xdg/ \
+                ${sysconfdir}/init.d/README \
+                ${sysconfdir}/resolv.conf \
+                ${rootlibexecdir}/systemd/* \
+                ${systemd_unitdir}/* \
+                ${base_libdir}/security/*.so \
+                ${libdir}/libnss_* \
+                /cgroup \
+                ${bindir}/systemd* \
+                ${bindir}/busctl \
+                ${bindir}/coredumpctl \
+                ${bindir}/localectl \
+                ${bindir}/hostnamectl \
+                ${bindir}/timedatectl \
+                ${bindir}/bootctl \
+                ${bindir}/kernel-install \
+                ${exec_prefix}/lib/tmpfiles.d/*.conf \
+                ${exec_prefix}/lib/systemd \
+                ${exec_prefix}/lib/modules-load.d \
+                ${exec_prefix}/lib/sysctl.d \
+                ${exec_prefix}/lib/sysusers.d \
+                ${localstatedir} \
+                ${nonarch_base_libdir}/udev/rules.d/70-uaccess.rules \
+                ${nonarch_base_libdir}/udev/rules.d/71-seat.rules \
+                ${nonarch_base_libdir}/udev/rules.d/73-seat-late.rules \
+                ${nonarch_base_libdir}/udev/rules.d/99-systemd.rules \
+               "
+
+FILES_${PN}-dev += "${base_libdir}/security/*.la ${datadir}/dbus-1/interfaces/ ${sysconfdir}/rpm/macros.systemd"
+
+RDEPENDS_${PN} += "kmod dbus util-linux-mount udev (= ${EXTENDPKGV})"
+RDEPENDS_${PN} += "volatile-binds update-rc.d"
+
+RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', '', 'systemd-serialgetty', d)} \
+                      systemd-vconsole-setup \
+                      systemd-extra-utils \
+                      systemd-compat-units udev-hwdb \
+                      util-linux-agetty  util-linux-fsck e2fsprogs-e2fsck \
+                      kernel-module-autofs4 kernel-module-unix kernel-module-ipv6 \
+                      os-release \
+"
+
+INSANE_SKIP_${PN}-doc += " libdir"
+
+PACKAGES =+ "udev udev-hwdb"
+
+RPROVIDES_udev = "hotplug"
+
+RDEPENDS_udev-hwdb += "udev"
+
+FILES_udev += "${base_sbindir}/udevd \
+               ${rootlibexecdir}/systemd/systemd-udevd \
+               ${rootlibexecdir}/udev/accelerometer \
+               ${rootlibexecdir}/udev/ata_id \
+               ${rootlibexecdir}/udev/cdrom_id \
+               ${rootlibexecdir}/udev/collect \
+               ${rootlibexecdir}/udev/findkeyboards \
+               ${rootlibexecdir}/udev/keyboard-force-release.sh \
+               ${rootlibexecdir}/udev/keymap \
+               ${rootlibexecdir}/udev/mtd_probe \
+               ${rootlibexecdir}/udev/scsi_id \
+               ${rootlibexecdir}/udev/v4l_id \
+               ${rootlibexecdir}/udev/keymaps \
+               ${rootlibexecdir}/udev/rules.d/*.rules \
+               ${sysconfdir}/udev \
+               ${sysconfdir}/init.d/systemd-udevd \
+               ${systemd_unitdir}/system/*udev* \
+               ${systemd_unitdir}/system/*.wants/*udev* \
+               ${base_bindir}/udevadm \
+               ${datadir}/bash-completion/completions/udevadm \
+              "
+
+FILES_udev-hwdb = "${rootlibexecdir}/udev/hwdb.d"
+
+INITSCRIPT_PACKAGES = "udev"
+INITSCRIPT_NAME_udev = "systemd-udevd"
+INITSCRIPT_PARAMS_udev = "start 03 S ."
+
+python __anonymous() {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+# TODO:
+# u-a for runlevel and telinit
+
+ALTERNATIVE_${PN} = "init halt reboot shutdown poweroff runlevel"
+
+ALTERNATIVE_TARGET[init] = "${rootlibexecdir}/systemd/systemd"
+ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
+ALTERNATIVE_PRIORITY[init] ?= "300"
+
+ALTERNATIVE_TARGET[halt] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
+ALTERNATIVE_PRIORITY[halt] ?= "300"
+
+ALTERNATIVE_TARGET[reboot] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
+ALTERNATIVE_PRIORITY[reboot] ?= "300"
+
+ALTERNATIVE_TARGET[shutdown] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
+ALTERNATIVE_PRIORITY[shutdown] ?= "300"
+
+ALTERNATIVE_TARGET[poweroff] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
+ALTERNATIVE_PRIORITY[poweroff] ?= "300"
+
+ALTERNATIVE_TARGET[runlevel] = "${base_bindir}/systemctl"
+ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
+ALTERNATIVE_PRIORITY[runlevel] ?= "300"
+
+pkg_postinst_${PN} () {
+	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+		-e 's/\(^hosts:.*\)\(\<files\>\)\(.*\)\(\<dns\>\)\(.*\)/\1\2 myhostname \3\4\5/' \
+		-i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_prerm_${PN} () {
+	sed -e '/^hosts:/s/\s*\<myhostname\>//' \
+		-e '/^hosts:/s/\s*myhostname//' \
+		-i $D${sysconfdir}/nsswitch.conf
+}
+
+pkg_postinst_udev-hwdb () {
+	if test -n "$D"; then
+		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
+			--root $D
+		chown root:root $D${sysconfdir}/udev/hwdb.bin
+	else
+		udevadm hwdb --update
+	fi
+}
+
+pkg_prerm_udev-hwdb () {
+	rm -f $D${sysconfdir}/udev/hwdb.bin
+}
+
+# As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
+# that we don't build both udev and systemd in world builds.
+python () {
+    if not bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+        raise bb.parse.SkipPackage("'systemd' not in DISTRO_FEATURES")
+
+    import re
+    if re.match('.*musl*', d.getVar('TARGET_OS', True)) != None:
+        raise bb.parse.SkipPackage("Not _yet_ supported on musl based targets")
+}
diff --git a/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty b/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
new file mode 100644
index 0000000..6eaeb7a
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab/start_getty
@@ -0,0 +1,5 @@
+#!/bin/sh
+if [ -c /dev/$2 ]
+then 
+	/sbin/getty -L $1 $2
+fi
diff --git a/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index 49b1326..c5b8cdc 100644
--- a/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/yocto-poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -4,7 +4,8 @@
 
 PR = "r10"
 
-SRC_URI = "file://inittab"
+SRC_URI = "file://inittab \
+           file://start_getty"
 
 S = "${WORKDIR}"
 
@@ -15,8 +16,10 @@
 }
 
 do_install() {
-	install -d ${D}${sysconfdir}
+    install -d ${D}${sysconfdir}
     install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
+    install -d ${D}${base_bindir}
+    install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty
 
     set -x
     tmp="${SERIAL_CONSOLES}"
@@ -24,7 +27,7 @@
     do
 	j=`echo ${i} | sed s/\;/\ /g`
 	label=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
-	echo "$label:12345:respawn:${base_sbindir}/getty -L ${j}" >> ${D}${sysconfdir}/inittab
+	echo "$label:12345:respawn:${base_bindir}/start_getty ${j}" >> ${D}${sysconfdir}/inittab
     done
 
     if [ "${USE_VT}" = "1" ]; then
@@ -73,7 +76,7 @@
 # Set PACKAGE_ARCH appropriately.
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
-FILES_${PN} = "${sysconfdir}/inittab"
+FILES_${PN} = "${sysconfdir}/inittab ${base_bindir}/start_getty"
 CONFFILES_${PN} = "${sysconfdir}/inittab"
 
 USE_VT ?= "1"
diff --git a/yocto-poky/meta/recipes-core/sysvinit/sysvinit/realpath.patch b/yocto-poky/meta/recipes-core/sysvinit/sysvinit/realpath.patch
new file mode 100644
index 0000000..5e0dca3
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/sysvinit/sysvinit/realpath.patch
@@ -0,0 +1,78 @@
+Fix build on musl use realpath() API its available on all libcs
+
+realpath() API doesnt work on systems with PATH_MAX set to be unlimited e.g. GNU/Hurd
+However for Linux it should always work
+
+Upstream-Status: Inappropriate[Linux specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: sysvinit-2.88dsf/src/ifdown.c
+===================================================================
+--- sysvinit-2.88dsf.orig/src/ifdown.c	2010-03-23 07:37:01.000000000 -0700
++++ sysvinit-2.88dsf/src/ifdown.c	2014-04-02 00:43:43.675437029 -0700
+@@ -26,11 +26,11 @@
+ #include <unistd.h>
+ #include <time.h>
+ #include <string.h>
++#include <errno.h>
+ 
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+ #include <sys/time.h>
+-#include <sys/errno.h>
+ 
+ #include <net/if.h>
+ #include <netinet/in.h>
+Index: sysvinit-2.88dsf/src/init.c
+===================================================================
+--- sysvinit-2.88dsf.orig/src/init.c	2014-04-02 00:42:10.488770162 -0700
++++ sysvinit-2.88dsf/src/init.c	2014-04-02 00:42:59.432103823 -0700
+@@ -49,6 +49,7 @@
+ #include <utmp.h>
+ #include <ctype.h>
+ #include <stdarg.h>
++#include <sys/ttydefaults.h>
+ #include <sys/syslog.h>
+ #include <sys/time.h>
+ 
+Index: sysvinit-2.88dsf/src/mountpoint.c
+===================================================================
+--- sysvinit-2.88dsf.orig/src/mountpoint.c	2009-09-10 01:28:49.000000000 -0700
++++ sysvinit-2.88dsf/src/mountpoint.c	2014-04-02 00:44:18.248770942 -0700
+@@ -23,6 +23,7 @@
+  *		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+  */
+ 
++#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+Index: sysvinit-2.88dsf/src/killall5.c
+===================================================================
+--- sysvinit-2.88dsf.orig/src/killall5.c	2014-03-26 00:49:52.982668074 -0700
++++ sysvinit-2.88dsf/src/killall5.c	2014-04-02 00:46:45.838771653 -0700
+@@ -846,9 +846,9 @@
+ 	char *oargv1, *pargv1;
+ 	if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) {
+ 		if (o->argv1 && p->argv1) {
+-			if ((oargv1 = canonicalize_file_name(o->argv1)) == NULL)
++			if ((oargv1 = realpath(o->argv1, NULL)) == NULL)
+ 				oargv1 = strdup(o->argv1);
+-			if ((pargv1 = canonicalize_file_name(p->argv1)) == NULL)
++			if ((pargv1 = realpath(p->argv1, NULL)) == NULL)
+ 				pargv1 = strdup(p->argv1);
+ 			if (! strcmp(oargv1, pargv1)) {
+ 				ret = 1;
+Index: sysvinit-2.88dsf/src/wall.c
+===================================================================
+--- sysvinit-2.88dsf.orig/src/wall.c	2009-11-22 14:05:53.000000000 -0800
++++ sysvinit-2.88dsf/src/wall.c	2014-04-02 00:49:15.258772217 -0700
+@@ -29,6 +29,7 @@
+ #include <unistd.h>
+ #include <pwd.h>
+ #include <syslog.h>
++#include <time.h>
+ #include "init.h"
+ 
+ 
diff --git a/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 5dfe39e..884857a 100644
--- a/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/yocto-poky/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -14,6 +14,7 @@
            file://crypt-lib.patch \
            file://pidof-add-m-option.patch \
            file://0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch \
+           file://realpath.patch \
            file://rcS-default \
            file://rc \
            file://rcS \
@@ -38,6 +39,8 @@
 ALTERNATIVE_PRIORITY[init] = "50"
 
 ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
+ALTERNATIVE_PRIORITY[mountpoint] = "20"
+
 ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
 ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
 ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
@@ -50,9 +53,10 @@
 ALTERNATIVE_${PN}-sulogin = "sulogin"
 ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
 
-ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 mesg.1 wall.1 sulogin.8 utmpdump.1"
+ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1"
 
 ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
+ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
 ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
 ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
 ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-config.inc b/yocto-poky/meta/recipes-core/uclibc/uclibc-config.inc
index 8b9e41c..ed7b522 100644
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-config.inc
+++ b/yocto-poky/meta/recipes-core/uclibc/uclibc-config.inc
@@ -119,6 +119,7 @@
     uclibc_cfg('thumb-interwork', distro_features,'USE_BX', cnf, rem)
     uclibc_cfg('xattr',     distro_features, 'UCLIBC_HAS_XATTR', cnf, rem)
     uclibc_cfg('ssp',       distro_features, 'UCLIBC_HAS_SSP', cnf, rem)
+    uclibc_cfg('ssp',       distro_features, 'UCLIBC_BUILD_SSP', cnf, rem)
     uclibc_cfg('argp',       distro_features, 'UCLIBC_HAS_ARGP', cnf, rem)
     uclibc_cfg('libc-posix-clang-wchar',  distro_features,'UCLIBC_HAS_WCHAR', cnf, rem)
     return "\n".join(cnf), "\n".join(rem)
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git.inc b/yocto-poky/meta/recipes-core/uclibc/uclibc-git.inc
index b718479..a56fa7c 100644
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git.inc
+++ b/yocto-poky/meta/recipes-core/uclibc/uclibc-git.inc
@@ -1,25 +1,17 @@
-SRCREV = "ca1c74d67dd115d059a875150e10b8560a9c35a8"
+SRCREV = "003b266cbeb370a8eae91dc256197f00798c6f93"
 
-PV = "0.9.33+git${SRCPV}"
+PV = "1.0.12+git${SRCPV}"
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/uclibc-git:"
 
-SRC_URI = "git://uclibc.org/uClibc.git;branch=master \
+SRC_URI = "git://uclibc-ng.org/git/uclibc-ng \
+        file://0001-Disable-lrount_tes-function.patch \
         file://uClibc.machine \
         file://uClibc.distro \
         file://obstack.cfg \
         file://locale.cfg \
-        file://0001-Disable-lrount_tes-function.patch \
-        file://0002-Add-implementation-for-copysignl-for-ppc.patch \
-        file://0003-Add-argp-implementation.patch \
-        file://0004-Dont-support-localised-optimizations-this-helps-to-h.patch \
-        file://0005-Always-use-O2-for-compiling-fork.c.patch \
-        file://0006-ldso-limited-support-for-ORIGIN-in-rpath.patch \
-        file://0007-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch \
-        file://0001-gcc5-optimizes-away-the-write-only-static-functions-.patch \
-        file://0001-fcntl-Add-AT_EMPTY_PATH-for-all-and-O_PATH-for-arm.patch \
-        file://0001-wire-in-syncfs.patch \
-        file://CVE-2016-2224.patch \
-        file://CVE-2016-2225.patch \
 "
 S = "${WORKDIR}/git"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
+
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-fcntl-Add-AT_EMPTY_PATH-for-all-and-O_PATH-for-arm.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-fcntl-Add-AT_EMPTY_PATH-for-all-and-O_PATH-for-arm.patch
deleted file mode 100644
index 6942db4..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-fcntl-Add-AT_EMPTY_PATH-for-all-and-O_PATH-for-arm.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 4c8f5fe7d41493e8e181941ae5a01713155f44d1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 15 Oct 2015 15:34:39 +0000
-Subject: [PATCH] fcntl: Add AT_EMPTY_PATH for all and O_PATH for arm
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- include/fcntl.h                     | 3 +++
- libc/sysdeps/linux/arm/bits/fcntl.h | 1 +
- 2 files changed, 4 insertions(+)
-
-diff --git a/include/fcntl.h b/include/fcntl.h
-index 11000dd..8a7ad9b 100644
---- a/include/fcntl.h
-+++ b/include/fcntl.h
-@@ -65,6 +65,9 @@ __BEGIN_DECLS
- # define AT_SYMLINK_FOLLOW	0x400	/* Follow symbolic links.  */
- # define AT_EACCESS		0x200	/* Test access permitted for
- 					   effective IDs, not real IDs.  */
-+# ifdef __USE_GNU
-+#  define AT_EMPTY_PATH         0x1000  /* Allow empty relative pathname.  */
-+# endif
- #endif
- 
- /* Do the file control operation described by CMD on FD.
-diff --git a/libc/sysdeps/linux/arm/bits/fcntl.h b/libc/sysdeps/linux/arm/bits/fcntl.h
-index aedc154..c6ba958 100644
---- a/libc/sysdeps/linux/arm/bits/fcntl.h
-+++ b/libc/sysdeps/linux/arm/bits/fcntl.h
-@@ -50,6 +50,7 @@
- # define O_DIRECT	0200000	/* Direct disk access.	*/
- # define O_NOATIME     01000000 /* Do not set atime.  */
- # define O_CLOEXEC     02000000 /* Set close_on_exec.  */
-+# define O_PATH       010000000 /* Resolve pathname but do not open file.  */
- #endif
- 
- /* For now Linux has synchronisity options for data and read operations.
--- 
-2.6.1
-
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-gcc5-optimizes-away-the-write-only-static-functions-.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-gcc5-optimizes-away-the-write-only-static-functions-.patch
deleted file mode 100644
index e622f87..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-gcc5-optimizes-away-the-write-only-static-functions-.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 2659fb25d32f4b29c1c96aa5730fe40e19d53ab0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 14 Oct 2015 17:38:37 -0700
-Subject: [PATCH] gcc5 optimizes away the write only static functions and we
- end up with
-
-  librt/librt_so.a(rt-unwind-resume.oS): In function `_Unwind_Resume':
-  rt-unwind-resume.c:(.text+0x3c): undefined reference to `libgcc_s_resume'
-  collect2: error: ld returned 1 exit status
-  make[2]: *** [lib/librt.so] Error 1
-
-marking these functions explicitly used with __attribute_used__ avoids
-that optimization.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 2 +-
- libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c       | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
-index f4d6f41..0c2edd7 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c
-@@ -27,7 +27,7 @@
- #define __libc_fatal(x)         {/*write(STDERR_FILENO, x, strlen(x));*/ abort();}
- 
- static void *libgcc_s_handle;
--static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__;
- static _Unwind_Reason_Code (*libgcc_s_personality)
-   (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
- static _Unwind_Reason_Code (*libgcc_s_forcedunwind)
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
-index f9a4ffb..f0c3047 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/unwind-resume.c
-@@ -25,7 +25,7 @@
- #define __libc_dlclose          dlclose
- #define __libc_fatal(x)         {/*write(STDERR_FILENO, x, strlen(x));*/ abort();}
- 
--static void (*libgcc_s_resume) (struct _Unwind_Exception *exc);
-+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) __attribute_used__;
- static _Unwind_Reason_Code (*libgcc_s_personality)
-   (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *);
- 
--- 
-2.6.1
-
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-wire-in-syncfs.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-wire-in-syncfs.patch
deleted file mode 100644
index 079ad6b..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0001-wire-in-syncfs.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 4f2db1b46bda5e376245ec36198b137709f069e8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 15 Oct 2015 17:03:37 +0000
-Subject: [PATCH] wire in syncfs
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- include/unistd.h                   |  2 +-
- libc/sysdeps/linux/common/syncfs.c | 13 +++++++++++++
- 2 files changed, 14 insertions(+), 1 deletion(-)
- create mode 100644 libc/sysdeps/linux/common/syncfs.c
-
-diff --git a/include/unistd.h b/include/unistd.h
-index 3793d2d..d01bb08 100644
---- a/include/unistd.h
-+++ b/include/unistd.h
-@@ -1073,7 +1073,7 @@ extern char *getpass (const char *__prompt) __nonnull ((1));
- extern int fsync (int __fd);
- #endif /* Use BSD || X/Open || Unix98.  */
- 
--#if 0 /*def __USE_GNU */
-+#ifdef __USE_GNU
- /* Make all changes done to all files on the file system associated
-  *    with FD actually appear on disk.  */
- extern int syncfs (int __fd) __THROW;
-diff --git a/libc/sysdeps/linux/common/syncfs.c b/libc/sysdeps/linux/common/syncfs.c
-new file mode 100644
-index 0000000..d2eed05
---- /dev/null
-+++ b/libc/sysdeps/linux/common/syncfs.c
-@@ -0,0 +1,13 @@
-+/* vi: set sw=4 ts=4: */
-+/*
-+ * fsync() for uClibc
-+ *
-+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
-+ *
-+ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+ */
-+
-+#include <sys/syscall.h>
-+#include <unistd.h>
-+
-+_syscall1(int, syncfs, int, fd)
--- 
-2.6.1
-
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0002-Add-implementation-for-copysignl-for-ppc.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0002-Add-implementation-for-copysignl-for-ppc.patch
deleted file mode 100644
index d4275c9..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0002-Add-implementation-for-copysignl-for-ppc.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 5d362074e5975b150a35bcfa77eab1bfa4e30de7 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 16 Aug 2015 20:50:56 -0700
-Subject: [PATCH 2/7] Add implementation for copysignl for ppc
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- libc/sysdeps/linux/powerpc/Makefile.arch |  2 +-
- libc/sysdeps/linux/powerpc/copysignl.c   | 89 ++++++++++++++++++++++++++++++++
- 2 files changed, 90 insertions(+), 1 deletion(-)
- create mode 100644 libc/sysdeps/linux/powerpc/copysignl.c
-
-diff --git a/libc/sysdeps/linux/powerpc/Makefile.arch b/libc/sysdeps/linux/powerpc/Makefile.arch
-index 4fbcb11..7c09c87 100644
---- a/libc/sysdeps/linux/powerpc/Makefile.arch
-+++ b/libc/sysdeps/linux/powerpc/Makefile.arch
-@@ -5,7 +5,7 @@
- # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- #
- 
--CSRC-y := __syscall_error.c ioctl.c
-+CSRC-y := __syscall_error.c ioctl.c copysignl.c
- 
- SSRC-y := \
- 	__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
-diff --git a/libc/sysdeps/linux/powerpc/copysignl.c b/libc/sysdeps/linux/powerpc/copysignl.c
-new file mode 100644
-index 0000000..000f653
---- /dev/null
-+++ b/libc/sysdeps/linux/powerpc/copysignl.c
-@@ -0,0 +1,89 @@
-+/* s_copysignl.c -- long double version of s_copysign.c.
-+ * Conversion to long double by Ulrich Drepper,
-+ * Cygnus Support, drepper@cygnus.com.
-+ */
-+
-+/*
-+ * ====================================================
-+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
-+ *
-+ * Developed at SunPro, a Sun Microsystems, Inc. business.
-+ * Permission to use, copy, modify, and distribute this
-+ * software is freely granted, provided that this notice
-+ * is preserved.
-+ * ====================================================
-+ */
-+
-+/*
-+ * copysignl(long double x, long double y)
-+ * copysignl(x,y) returns a value with the magnitude of x and
-+ * with the sign bit of y.
-+ */
-+
-+#include <endian.h>
-+#include <stdint.h>
-+
-+#if __FLOAT_WORD_ORDER == BIG_ENDIAN
-+
-+typedef union
-+{
-+  long double value;
-+  struct
-+  {
-+    int sign_exponent:16;
-+    unsigned int empty:16;
-+    uint32_t msw;
-+    uint32_t lsw;
-+  } parts;
-+} ieee_long_double_shape_type;
-+
-+#endif
-+
-+#if __FLOAT_WORD_ORDER == LITTLE_ENDIAN
-+
-+typedef union
-+{
-+  long double value;
-+  struct
-+  {
-+    uint32_t lsw;
-+    uint32_t msw;
-+    int sign_exponent:16;
-+    unsigned int empty:16;
-+  } parts;
-+} ieee_long_double_shape_type;
-+
-+#endif
-+
-+/* Get int from the exponent of a long double.  */
-+
-+#define GET_LDOUBLE_EXP(exp,d)					\
-+do {								\
-+  ieee_long_double_shape_type ge_u;				\
-+  ge_u.value = (d);						\
-+  (exp) = ge_u.parts.sign_exponent;				\
-+} while (0)
-+
-+/* Set exponent of a long double from an int.  */
-+
-+#define SET_LDOUBLE_EXP(d,exp)					\
-+do {								\
-+  ieee_long_double_shape_type se_u;				\
-+  se_u.value = (d);						\
-+  se_u.parts.sign_exponent = (exp);				\
-+  (d) = se_u.value;						\
-+} while (0)
-+
-+long double copysignl(long double x, long double y);
-+libc_hidden_proto(copysignl);
-+
-+long double copysignl(long double x, long double y)
-+{
-+	uint32_t es1,es2;
-+	GET_LDOUBLE_EXP(es1,x);
-+	GET_LDOUBLE_EXP(es2,y);
-+	SET_LDOUBLE_EXP(x,(es1&0x7fff)|(es2&0x8000));
-+        return x;
-+}
-+
-+libc_hidden_def(copysignl);
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0003-Add-argp-implementation.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0003-Add-argp-implementation.patch
deleted file mode 100644
index ee94483..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0003-Add-argp-implementation.patch
+++ /dev/null
@@ -1,5811 +0,0 @@
-From eaae816fb22929469aa4cc3402b91b512fc69549 Mon Sep 17 00:00:00 2001
-From: Salvatore Cro <salvatore.cro@st.com>
-Date: Sun, 16 Aug 2015 20:53:37 -0700
-Subject: [PATCH 3/7] Add argp implementation
-
-Argp is an advanced support for parsing unix-style argument vectors.
-In addition to the common getopt interface, it provides automatic
-response
-to `--help' and `--version' options and use of custom parser in
-conjunction
-with argp native option parser, among others.
-Argp support is required by elfutils package and prelink.
-
-In uClibc argp functionalities has been moved from C library to
-libuargp.so
-Further the libc.so linker script contains an AS_NEEDED entry so that
-it doesn't need to link libuargp.so explicitely.
-
-Signed-off-by: Salvatore Cro <salvatore.cro@st.com>
-Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
-Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- Makefile.in                                 |    9 +
- Makerules                                   |    7 +-
- Rules.mak                                   |   13 +
- extra/Configs/Config.in                     |   17 +
- include/argp.h                              |  566 ++++++++
- libc/sysdeps/linux/common/bits/getopt_int.h |  136 ++
- libc/unistd/getopt.c                        |   19 +-
- libuargp/Makefile                           |   14 +
- libuargp/Makefile.in                        |   73 ++
- libuargp/argp-ba.c                          |   26 +
- libuargp/argp-eexst.c                       |   32 +
- libuargp/argp-fmtstream.c                   |  439 +++++++
- libuargp/argp-fmtstream.h                   |  314 +++++
- libuargp/argp-fs-xinl.c                     |   44 +
- libuargp/argp-help.c                        | 1882 +++++++++++++++++++++++++++
- libuargp/argp-parse.c                       |  949 ++++++++++++++
- libuargp/argp-pv.c                          |   25 +
- libuargp/argp-pvh.c                         |   32 +
- libuargp/argp-xinl.c                        |   35 +
- test/argp/Makefile                          |    7 +
- test/argp/Makefile.in                       |   12 +
- test/argp/argp-ex1.c                        |   15 +
- test/argp/argp-ex2.c                        |   45 +
- test/argp/argp-ex3.c                        |  153 +++
- test/argp/argp-ex4.c                        |  167 +++
- test/argp/argp-test.c                       |  209 +++
- test/argp/bug-argp1.c                       |   26 +
- test/argp/tst-argp1.c                       |  118 ++
- test/argp/tst-argp2.c                       |  101 ++
- 29 files changed, 5481 insertions(+), 4 deletions(-)
- create mode 100644 include/argp.h
- create mode 100644 libc/sysdeps/linux/common/bits/getopt_int.h
- create mode 100644 libuargp/Makefile
- create mode 100644 libuargp/Makefile.in
- create mode 100644 libuargp/argp-ba.c
- create mode 100644 libuargp/argp-eexst.c
- create mode 100644 libuargp/argp-fmtstream.c
- create mode 100644 libuargp/argp-fmtstream.h
- create mode 100644 libuargp/argp-fs-xinl.c
- create mode 100644 libuargp/argp-help.c
- create mode 100644 libuargp/argp-parse.c
- create mode 100644 libuargp/argp-pv.c
- create mode 100644 libuargp/argp-pvh.c
- create mode 100644 libuargp/argp-xinl.c
- create mode 100644 test/argp/Makefile
- create mode 100644 test/argp/Makefile.in
- create mode 100644 test/argp/argp-ex1.c
- create mode 100644 test/argp/argp-ex2.c
- create mode 100644 test/argp/argp-ex3.c
- create mode 100644 test/argp/argp-ex4.c
- create mode 100644 test/argp/argp-test.c
- create mode 100644 test/argp/bug-argp1.c
- create mode 100644 test/argp/tst-argp1.c
- create mode 100644 test/argp/tst-argp2.c
-
-diff --git a/Makefile.in b/Makefile.in
-index 04671a4..a450af9 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -39,6 +39,7 @@ include $(top_srcdir)libresolv/Makefile.in
- include $(top_srcdir)libutil/Makefile.in
- include $(top_srcdir)libpthread/Makefile.in
- include $(top_srcdir)librt/Makefile.in
-+include $(top_srcdir)libuargp/Makefile.in
- include $(top_srcdir)libubacktrace/Makefile.in
- 
- # last included to catch all the objects added by others (locales/threads)
-@@ -262,6 +263,7 @@ HEADERS_RM- += sgtty.h
- endif
- HEADERS_RM-$(HAVE_SHARED)                    += dlfcn.h bits/dlfcn.h
- HEADERS_RM-$(PTHREADS_DEBUG_SUPPORT)         += thread_db.h
-+HEADERS_RM-$(UCLIBC_HAS_ARGP)                += argp.h
- HEADERS_RM-$(UCLIBC_HAS_BSD_ERR)             += err.h
- HEADERS_RM-$(UCLIBC_HAS_CRYPT)               += crypt.h
- HEADERS_RM-$(UCLIBC_HAS_EPOLL)               += sys/epoll.h
-@@ -386,6 +388,13 @@ else
- 	-$(INSTALL) -m 755 $(top_builddir)lib/libc.so $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/
- endif
- 	echo "$(UBACKTRACE_ASNEEDED)" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so
-+ifeq ($(UCLIBC_HAS_ARGP),y)
-+# Add the AS_NEEDED entry for libuargp.so
-+	if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(RUNTIME_PREFIX)$(MULTILIB_DIR)/$(SHARED_MAJORNAME) ] ; then \
-+		echo "GROUP ( $(UARGP_ASNEEDED) )" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
-+	fi
-+endif
-+
- ifeq ($(UCLIBC_HAS_THREADS),y)
- ifneq ($(LINUXTHREADS_OLD),y)
- ifeq ($(HARDWIRED_ABSPATH),y)
-diff --git a/Makerules b/Makerules
-index d6f7e24..e70050d 100644
---- a/Makerules
-+++ b/Makerules
-@@ -48,6 +48,7 @@ $(eval $(call add_IS_IN_lib,libresolv,$(libresolv-a-y) $(libresolv-so-y)))
- $(eval $(call add_IS_IN_lib,librt,$(librt-a-y) $(librt-so-y)))
- $(eval $(call add_IS_IN_lib,libutil,$(libutil-a-y) $(libutil-so-y)))
- $(eval $(call add_IS_IN_lib,libubacktrace,$(libubacktrace-a-y) $(libubacktrace-so-y)))
-+$(eval $(call add_IS_IN_lib,libuargp,$(libuargp-a-y) $(libuargp-so-y)))
- 
- shared_objs = $(libc-y:.o=.os) $(libc-shared-y) $(libc-nonshared-y) \
- 	$(libcrypt-so-y) $(libdl-so-y) \
-@@ -55,12 +56,12 @@ shared_objs = $(libc-y:.o=.os) $(libc-shared-y) $(libc-nonshared-y) \
- 	$(libpthread-so-y) $(libpthread-nonshared-y) $(libthread_db-so-y) \
- 	$(libresolv-so-y) $(librt-so-y) \
- 	$(ldso-y) \
--	$(libutil-so-y) $(libubacktrace-so-y)
-+	$(libutil-so-y) $(libubacktrace-so-y) $(libuargp-so-y)
- 
- ar_objs =  $(libc-y) $(libc-static-y) $(libcrypt-a-y) \
- 	$(libdl-a-y) $(libintl-a-y) $(libm-a-y) $(libnsl-a-y) \
- 	$(libpthread-a-y) $(libthread_db-a-y) \
--	$(libresolv-a-y) $(librt-a-y) $(libutil-a-y) $(libubacktrace-a-y)
-+	$(libresolv-a-y) $(librt-a-y) $(libutil-a-y) $(libubacktrace-a-y) $(libuargp-a-y)
- ifeq ($(DOPIC),y)
- ar_objs := $(ar_objs:.o=.os)
- endif
-@@ -498,7 +499,7 @@ files.dep := $(libc-a-y) $(libc-so-y) $(libc-nonshared-y) \
- 	$(librt-a-y) $(librt-so-y)  $(libresolv-a-y) $(libresolv-so-y) \
- 	$(libcrypt-a-y) $(libcrypt-so-y) $(libutil-a-y) $(libutil-so-y) \
- 	$(libnsl-a-y) $(libnsl-so-y) $(ldso-y) $(libdl-a-y) $(libdl-so-y) \
--	$(libubacktrace-a-y) $(libubacktrace-so-y)
-+	$(libubacktrace-a-y) $(libubacktrace-so-y) $(libuargp-so-y) $(libuargp-a-y)
- .depends.dep := \
- 	$(patsubst %.s,%.s.dep,$(filter %.s,$(files.dep))) \
- 	$(patsubst %.o,%.o.dep,$(filter %.o,$(files.dep))) \
-diff --git a/Rules.mak b/Rules.mak
-index de9ffb3..a2baf58 100644
---- a/Rules.mak
-+++ b/Rules.mak
-@@ -602,6 +602,19 @@ export UBACKTRACE_ASNEEDED:=$(shell $(CC) -Wl,--help 2>/dev/null | grep -q -- --
- else
- export UBACKTRACE_ASNEEDED:=""
- endif
-+ifeq ($(UCLIBC_HAS_ARGP),y)
-+ifeq ($(HARDWIRED_ABSPATH),y)
-+# Only used in installed libc.so linker script
-+UARGP_FULL_NAME := $(subst //,/,$(RUNTIME_PREFIX)$(MULTILIB_DIR)/libuargp.so.$(MAJOR_VERSION))
-+else
-+UARGP_FULL_NAME := libuargp.so.$(MAJOR_VERSION)
-+endif
-+export UARGP_ASNEEDED:=$(shell $(CC) -Wl,--help 2>/dev/null | grep -q -- --as-needed && \
-+	echo "GROUP ( AS_NEEDED ( $(UARGP_FULL_NAME) ) )" || \
-+	echo "GROUP ( $(UARGP_FULL_NAME) )")
-+else
-+export UARGP_ASNEEDED:=""
-+endif
- endif
- 
- # Add a bunch of extra pedantic annoyingly strict checks
-diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
-index 242e45a..b36d4c9 100644
---- a/extra/Configs/Config.in
-+++ b/extra/Configs/Config.in
-@@ -1943,6 +1943,23 @@ config UCLIBC_HAS_GNU_GETSUBOPT
- 	  Answer Y if you want to include getsubopt().
- 
- 	  Most people will answer Y.
-+
-+config UCLIBC_HAS_ARGP
-+       bool "Support argp (as standalone shared object)"
-+       default n
-+       help
-+         Argp is an interface for parsing unix-style argument vectors. Unlike
-+         the common getopt interface, it provides many advanced features in
-+         addition to parsing options, such as automatic output in response to
-+         `--help' and `--version' options.
-+         A library can export an argp option parser, which programs can easily
-+         use in conjunction with their own option parser.
-+         A new shared object "libuargp" is created. The "libc.so" linker script
-+         contains the AS_NEEDED entry for getting the libuargp linked automatically.
-+         Argp support is needed by elfutils libdw.
-+
-+         Most people can safely answer N.
-+
- endmenu
- 
- 
-diff --git a/include/argp.h b/include/argp.h
-new file mode 100644
-index 0000000..9d53728
---- /dev/null
-+++ b/include/argp.h
-@@ -0,0 +1,566 @@
-+/* Hierarchial argument parsing, layered over getopt.
-+   Copyright (C) 1995-1999, 2003, 2004, 2005, 2006, 2007, 2009
-+   Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.
-+
-+   Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
-+*/
-+
-+#ifndef _ARGP_H
-+#define _ARGP_H
-+
-+#include <stdio.h>
-+#include <ctype.h>
-+#include <limits.h>
-+
-+#define __need_error_t
-+#include <errno.h>
-+
-+#ifndef __const
-+# define __const const
-+#endif
-+
-+#ifndef __THROW
-+# define __THROW
-+#endif
-+#ifndef __NTH
-+# define __NTH(fct) fct __THROW
-+#endif
-+
-+#ifndef __attribute__
-+/* This feature is available in gcc versions 2.5 and later.  */
-+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined(__STRICT_ANSI__)
-+#  define __attribute__(Spec) /* empty */
-+# endif
-+/* The __-protected variants of `format' and `printf' attributes
-+   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
-+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || defined(__STRICT_ANSI__)
-+#  define __format__ format
-+#  define __printf__ printf
-+# endif
-+#endif
-+
-+/* GCC 2.95 and later have "__restrict"; C99 compilers have
-+   "restrict", and "configure" may have defined "restrict".  */
-+#ifndef __restrict
-+# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
-+#  if defined restrict || 199901L <= __STDC_VERSION__
-+#   define __restrict restrict
-+#  else
-+#   define __restrict
-+#  endif
-+# endif
-+#endif
-+
-+#ifndef __error_t_defined
-+typedef int error_t;
-+# define __error_t_defined
-+#endif
-+
-+#ifdef  __cplusplus
-+extern "C" {
-+#endif
-+
-+/* A description of a particular option.  A pointer to an array of
-+   these is passed in the OPTIONS field of an argp structure.  Each option
-+   entry can correspond to one long option and/or one short option; more
-+   names for the same option can be added by following an entry in an option
-+   array with options having the OPTION_ALIAS flag set.  */
-+struct argp_option
-+{
-+  /* The long option name.  For more than one name for the same option, you
-+     can use following options with the OPTION_ALIAS flag set.  */
-+  __const char *name;
-+
-+  /* What key is returned for this option.  If > 0 and printable, then it's
-+     also accepted as a short option.  */
-+  int key;
-+
-+  /* If non-NULL, this is the name of the argument associated with this
-+     option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */
-+  __const char *arg;
-+
-+  /* OPTION_ flags.  */
-+  int flags;
-+
-+  /* The doc string for this option.  If both NAME and KEY are 0, This string
-+     will be printed outdented from the normal option column, making it
-+     useful as a group header (it will be the first thing printed in its
-+     group); in this usage, it's conventional to end the string with a `:'.  */
-+  __const char *doc;
-+
-+  /* The group this option is in.  In a long help message, options are sorted
-+     alphabetically within each group, and the groups presented in the order
-+     0, 1, 2, ..., n, -m, ..., -2, -1.  Every entry in an options array with
-+     if this field 0 will inherit the group number of the previous entry, or
-+     zero if it's the first one, unless its a group header (NAME and KEY both
-+     0), in which case, the previous entry + 1 is the default.  Automagic
-+     options such as --help are put into group -1.  */
-+  int group;
-+};
-+
-+/* The argument associated with this option is optional.  */
-+#define OPTION_ARG_OPTIONAL	0x1
-+
-+/* This option isn't displayed in any help messages.  */
-+#define OPTION_HIDDEN	       	0x2
-+
-+/* This option is an alias for the closest previous non-alias option.  This
-+   means that it will be displayed in the same help entry, and will inherit
-+   fields other than NAME and KEY from the aliased option.  */
-+#define OPTION_ALIAS		0x4
-+
-+/* This option isn't actually an option (and so should be ignored by the
-+   actual option parser), but rather an arbitrary piece of documentation that
-+   should be displayed in much the same manner as the options.  If this flag
-+   is set, then the option NAME field is displayed unmodified (e.g., no `--'
-+   prefix is added) at the left-margin (where a *short* option would normally
-+   be displayed), and the documentation string in the normal place.  For
-+   purposes of sorting, any leading whitespace and punctuation is ignored,
-+   except that if the first non-whitespace character is not `-', this entry
-+   is displayed after all options (and OPTION_DOC entries with a leading `-')
-+   in the same group.  */
-+#define OPTION_DOC		0x8
-+
-+/* This option shouldn't be included in `long' usage messages (but is still
-+   included in help messages).  This is mainly intended for options that are
-+   completely documented in an argp's ARGS_DOC field, in which case including
-+   the option in the generic usage list would be redundant.  For instance,
-+   if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to
-+   distinguish these two cases, -x should probably be marked
-+   OPTION_NO_USAGE.  */
-+#define OPTION_NO_USAGE		0x10
-+
-+struct argp;			/* fwd declare this type */
-+struct argp_state;		/* " */
-+struct argp_child;		/* " */
-+
-+/* The type of a pointer to an argp parsing function.  */
-+typedef error_t (*argp_parser_t) (int __key, char *__arg,
-+				  struct argp_state *__state);
-+
-+/* What to return for unrecognized keys.  For special ARGP_KEY_ keys, such
-+   returns will simply be ignored.  For user keys, this error will be turned
-+   into EINVAL (if the call to argp_parse is such that errors are propagated
-+   back to the user instead of exiting); returning EINVAL itself would result
-+   in an immediate stop to parsing in *all* cases.  */
-+#define ARGP_ERR_UNKNOWN	E2BIG /* Hurd should never need E2BIG.  XXX */
-+
-+/* Special values for the KEY argument to an argument parsing function.
-+   ARGP_ERR_UNKNOWN should be returned if they aren't understood.
-+
-+   The sequence of keys to a parsing function is either (where each
-+   uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key):
-+
-+       INIT opt... NO_ARGS END SUCCESS  -- No non-option arguments at all
-+   or  INIT (opt | ARG)... END SUCCESS  -- All non-option args parsed
-+   or  INIT (opt | ARG)... SUCCESS      -- Some non-option arg unrecognized
-+
-+   The third case is where every parser returned ARGP_KEY_UNKNOWN for an
-+   argument, in which case parsing stops at that argument (returning the
-+   unparsed arguments to the caller of argp_parse if requested, or stopping
-+   with an error message if not).
-+
-+   If an error occurs (either detected by argp, or because the parsing
-+   function returned an error value), then the parser is called with
-+   ARGP_KEY_ERROR, and no further calls are made.  */
-+
-+/* This is not an option at all, but rather a command line argument.  If a
-+   parser receiving this key returns success, the fact is recorded, and the
-+   ARGP_KEY_NO_ARGS case won't be used.  HOWEVER, if while processing the
-+   argument, a parser function decrements the NEXT field of the state it's
-+   passed, the option won't be considered processed; this is to allow you to
-+   actually modify the argument (perhaps into an option), and have it
-+   processed again.  */
-+#define ARGP_KEY_ARG		0
-+/* There are remaining arguments not parsed by any parser, which may be found
-+   starting at (STATE->argv + STATE->next).  If success is returned, but
-+   STATE->next left untouched, it's assumed that all arguments were consume,
-+   otherwise, the parser should adjust STATE->next to reflect any arguments
-+   consumed.  */
-+#define ARGP_KEY_ARGS		0x1000006
-+/* There are no more command line arguments at all.  */
-+#define ARGP_KEY_END		0x1000001
-+/* Because it's common to want to do some special processing if there aren't
-+   any non-option args, user parsers are called with this key if they didn't
-+   successfully process any non-option arguments.  Called just before
-+   ARGP_KEY_END (where more general validity checks on previously parsed
-+   arguments can take place).  */
-+#define ARGP_KEY_NO_ARGS	0x1000002
-+/* Passed in before any parsing is done.  Afterwards, the values of each
-+   element of the CHILD_INPUT field, if any, in the state structure is
-+   copied to each child's state to be the initial value of the INPUT field.  */
-+#define ARGP_KEY_INIT		0x1000003
-+/* Use after all other keys, including SUCCESS & END.  */
-+#define ARGP_KEY_FINI		0x1000007
-+/* Passed in when parsing has successfully been completed (even if there are
-+   still arguments remaining).  */
-+#define ARGP_KEY_SUCCESS	0x1000004
-+/* Passed in if an error occurs.  */
-+#define ARGP_KEY_ERROR		0x1000005
-+
-+/* An argp structure contains a set of options declarations, a function to
-+   deal with parsing one, documentation string, a possible vector of child
-+   argp's, and perhaps a function to filter help output.  When actually
-+   parsing options, getopt is called with the union of all the argp
-+   structures chained together through their CHILD pointers, with conflicts
-+   being resolved in favor of the first occurrence in the chain.  */
-+struct argp
-+{
-+  /* An array of argp_option structures, terminated by an entry with both
-+     NAME and KEY having a value of 0.  */
-+  __const struct argp_option *options;
-+
-+  /* What to do with an option from this structure.  KEY is the key
-+     associated with the option, and ARG is any associated argument (NULL if
-+     none was supplied).  If KEY isn't understood, ARGP_ERR_UNKNOWN should be
-+     returned.  If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then
-+     parsing is stopped immediately, and that value is returned from
-+     argp_parse().  For special (non-user-supplied) values of KEY, see the
-+     ARGP_KEY_ definitions below.  */
-+  argp_parser_t parser;
-+
-+  /* A string describing what other arguments are wanted by this program.  It
-+     is only used by argp_usage to print the `Usage:' message.  If it
-+     contains newlines, the strings separated by them are considered
-+     alternative usage patterns, and printed on separate lines (lines after
-+     the first are prefix by `  or: ' instead of `Usage:').  */
-+  __const char *args_doc;
-+
-+  /* If non-NULL, a string containing extra text to be printed before and
-+     after the options in a long help message (separated by a vertical tab
-+     `\v' character).  */
-+  __const char *doc;
-+
-+  /* A vector of argp_children structures, terminated by a member with a 0
-+     argp field, pointing to child argps should be parsed with this one.  Any
-+     conflicts are resolved in favor of this argp, or early argps in the
-+     CHILDREN list.  This field is useful if you use libraries that supply
-+     their own argp structure, which you want to use in conjunction with your
-+     own.  */
-+  __const struct argp_child *children;
-+
-+  /* If non-zero, this should be a function to filter the output of help
-+     messages.  KEY is either a key from an option, in which case TEXT is
-+     that option's help text, or a special key from the ARGP_KEY_HELP_
-+     defines, below, describing which other help text TEXT is.  The function
-+     should return either TEXT, if it should be used as-is, a replacement
-+     string, which should be malloced, and will be freed by argp, or NULL,
-+     meaning `print nothing'.  The value for TEXT is *after* any translation
-+     has been done, so if any of the replacement text also needs translation,
-+     that should be done by the filter function.  INPUT is either the input
-+     supplied to argp_parse, or NULL, if argp_help was called directly.  */
-+  char *(*help_filter) (int __key, __const char *__text, void *__input);
-+
-+  /* If non-zero the strings used in the argp library are translated using
-+     the domain described by this string.  Otherwise the currently installed
-+     default domain is used.  */
-+  const char *argp_domain;
-+};
-+
-+/* Possible KEY arguments to a help filter function.  */
-+#define ARGP_KEY_HELP_PRE_DOC	0x2000001 /* Help text preceeding options. */
-+#define ARGP_KEY_HELP_POST_DOC	0x2000002 /* Help text following options. */
-+#define ARGP_KEY_HELP_HEADER	0x2000003 /* Option header string. */
-+#define ARGP_KEY_HELP_EXTRA	0x2000004 /* After all other documentation;
-+					     TEXT is NULL for this key.  */
-+/* Explanatory note emitted when duplicate option arguments have been
-+   suppressed.  */
-+#define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005
-+#define ARGP_KEY_HELP_ARGS_DOC	0x2000006 /* Argument doc string.  */
-+
-+/* When an argp has a non-zero CHILDREN field, it should point to a vector of
-+   argp_child structures, each of which describes a subsidiary argp.  */
-+struct argp_child
-+{
-+  /* The child parser.  */
-+  __const struct argp *argp;
-+
-+  /* Flags for this child.  */
-+  int flags;
-+
-+  /* If non-zero, an optional header to be printed in help output before the
-+     child options.  As a side-effect, a non-zero value forces the child
-+     options to be grouped together; to achieve this effect without actually
-+     printing a header string, use a value of "".  */
-+  __const char *header;
-+
-+  /* Where to group the child options relative to the other (`consolidated')
-+     options in the parent argp; the values are the same as the GROUP field
-+     in argp_option structs, but all child-groupings follow parent options at
-+     a particular group level.  If both this field and HEADER are zero, then
-+     they aren't grouped at all, but rather merged with the parent options
-+     (merging the child's grouping levels with the parents).  */
-+  int group;
-+};
-+
-+/* Parsing state.  This is provided to parsing functions called by argp,
-+   which may examine and, as noted, modify fields.  */
-+struct argp_state
-+{
-+  /* The top level ARGP being parsed.  */
-+  __const struct argp *root_argp;
-+
-+  /* The argument vector being parsed.  May be modified.  */
-+  int argc;
-+  char **argv;
-+
-+  /* The index in ARGV of the next arg that to be parsed.  May be modified. */
-+  int next;
-+
-+  /* The flags supplied to argp_parse.  May be modified.  */
-+  unsigned flags;
-+
-+  /* While calling a parsing function with a key of ARGP_KEY_ARG, this is the
-+     number of the current arg, starting at zero, and incremented after each
-+     such call returns.  At all other times, this is the number of such
-+     arguments that have been processed.  */
-+  unsigned arg_num;
-+
-+  /* If non-zero, the index in ARGV of the first argument following a special
-+     `--' argument (which prevents anything following being interpreted as an
-+     option).  Only set once argument parsing has proceeded past this point. */
-+  int quoted;
-+
-+  /* An arbitrary pointer passed in from the user.  */
-+  void *input;
-+  /* Values to pass to child parsers.  This vector will be the same length as
-+     the number of children for the current parser.  */
-+  void **child_inputs;
-+
-+  /* For the parser's use.  Initialized to 0.  */
-+  void *hook;
-+
-+  /* The name used when printing messages.  This is initialized to ARGV[0],
-+     or PROGRAM_INVOCATION_NAME if that is unavailable.  */
-+  char *name;
-+
-+  /* Streams used when argp prints something.  */
-+  FILE *err_stream;		/* For errors; initialized to stderr. */
-+  FILE *out_stream;		/* For information; initialized to stdout. */
-+
-+  void *pstate;			/* Private, for use by argp.  */
-+};
-+
-+/* Flags for argp_parse (note that the defaults are those that are
-+   convenient for program command line parsing): */
-+
-+/* Don't ignore the first element of ARGV.  Normally (and always unless
-+   ARGP_NO_ERRS is set) the first element of the argument vector is
-+   skipped for option parsing purposes, as it corresponds to the program name
-+   in a command line.  */
-+#define ARGP_PARSE_ARGV0  0x01
-+
-+/* Don't print error messages for unknown options to stderr; unless this flag
-+   is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program
-+   name in the error messages.  This flag implies ARGP_NO_EXIT (on the
-+   assumption that silent exiting upon errors is bad behaviour).  */
-+#define ARGP_NO_ERRS	0x02
-+
-+/* Don't parse any non-option args.  Normally non-option args are parsed by
-+   calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg
-+   as the value.  Since it's impossible to know which parse function wants to
-+   handle it, each one is called in turn, until one returns 0 or an error
-+   other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the
-+   argp_parse returns prematurely (but with a return value of 0).  If all
-+   args have been parsed without error, all parsing functions are called one
-+   last time with a key of ARGP_KEY_END.  This flag needn't normally be set,
-+   as the normal behavior is to stop parsing as soon as some argument can't
-+   be handled.  */
-+#define ARGP_NO_ARGS	0x04
-+
-+/* Parse options and arguments in the same order they occur on the command
-+   line -- normally they're rearranged so that all options come first. */
-+#define ARGP_IN_ORDER	0x08
-+
-+/* Don't provide the standard long option --help, which causes usage and
-+      option help information to be output to stdout, and exit (0) called. */
-+#define ARGP_NO_HELP	0x10
-+
-+/* Don't exit on errors (they may still result in error messages).  */
-+#define ARGP_NO_EXIT	0x20
-+
-+/* Use the gnu getopt `long-only' rules for parsing arguments.  */
-+#define ARGP_LONG_ONLY	0x40
-+
-+/* Turns off any message-printing/exiting options.  */
-+#define ARGP_SILENT    (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP)
-+
-+/* Parse the options strings in ARGC & ARGV according to the options in ARGP.
-+   FLAGS is one of the ARGP_ flags above.  If ARG_INDEX is non-NULL, the
-+   index in ARGV of the first unparsed option is returned in it.  If an
-+   unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser
-+   routine returned a non-zero value, it is returned; otherwise 0 is
-+   returned.  This function may also call exit unless the ARGP_NO_HELP flag
-+   is set.  INPUT is a pointer to a value to be passed in to the parser.  */
-+extern error_t argp_parse (__const struct argp *__restrict __argp,
-+			   int __argc, char **__restrict __argv,
-+			   unsigned __flags, int *__restrict __arg_index,
-+			   void *__restrict __input);
-+
-+/* Global variables.  */
-+
-+/* If defined or set by the user program to a non-zero value, then a default
-+   option --version is added (unless the ARGP_NO_HELP flag is used), which
-+   will print this string followed by a newline and exit (unless the
-+   ARGP_NO_EXIT flag is used).  Overridden by ARGP_PROGRAM_VERSION_HOOK.  */
-+extern __const char *argp_program_version;
-+
-+/* If defined or set by the user program to a non-zero value, then a default
-+   option --version is added (unless the ARGP_NO_HELP flag is used), which
-+   calls this function with a stream to print the version to and a pointer to
-+   the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
-+   used).  This variable takes precedent over ARGP_PROGRAM_VERSION.  */
-+extern void (*argp_program_version_hook) (FILE *__restrict __stream,
-+					  struct argp_state *__restrict
-+					  __state);
-+
-+/* If defined or set by the user program, it should point to string that is
-+   the bug-reporting address for the program.  It will be printed by
-+   argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various
-+   standard help messages), embedded in a sentence that says something like
-+   `Report bugs to ADDR.'.  */
-+extern __const char *argp_program_bug_address;
-+
-+/* The exit status that argp will use when exiting due to a parsing error.
-+   If not defined or set by the user program, this defaults to EX_USAGE from
-+   <sysexits.h>.  */
-+extern error_t argp_err_exit_status;
-+
-+/* Flags for argp_help.  */
-+#define ARGP_HELP_USAGE		0x01 /* a Usage: message. */
-+#define ARGP_HELP_SHORT_USAGE	0x02 /*  " but don't actually print options. */
-+#define ARGP_HELP_SEE		0x04 /* a `Try ... for more help' message. */
-+#define ARGP_HELP_LONG		0x08 /* a long help message. */
-+#define ARGP_HELP_PRE_DOC	0x10 /* doc string preceding long help.  */
-+#define ARGP_HELP_POST_DOC	0x20 /* doc string following long help.  */
-+#define ARGP_HELP_DOC		(ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)
-+#define ARGP_HELP_BUG_ADDR	0x40 /* bug report address */
-+#define ARGP_HELP_LONG_ONLY	0x80 /* modify output appropriately to
-+					reflect ARGP_LONG_ONLY mode.  */
-+
-+/* These ARGP_HELP flags are only understood by argp_state_help.  */
-+#define ARGP_HELP_EXIT_ERR	0x100 /* Call exit(1) instead of returning.  */
-+#define ARGP_HELP_EXIT_OK	0x200 /* Call exit(0) instead of returning.  */
-+
-+/* The standard thing to do after a program command line parsing error, if an
-+   error message has already been printed.  */
-+#define ARGP_HELP_STD_ERR \
-+  (ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
-+/* The standard thing to do after a program command line parsing error, if no
-+   more specific error message has been printed.  */
-+#define ARGP_HELP_STD_USAGE \
-+  (ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
-+/* The standard thing to do in response to a --help option.  */
-+#define ARGP_HELP_STD_HELP \
-+  (ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \
-+   | ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR)
-+
-+/* Output a usage message for ARGP to STREAM.  FLAGS are from the set
-+   ARGP_HELP_*.  */
-+extern void argp_help (__const struct argp *__restrict __argp,
-+		       FILE *__restrict __stream,
-+		       unsigned __flags, char *__restrict __name);
-+
-+/* The following routines are intended to be called from within an argp
-+   parsing routine (thus taking an argp_state structure as the first
-+   argument).  They may or may not print an error message and exit, depending
-+   on the flags in STATE -- in any case, the caller should be prepared for
-+   them *not* to exit, and should return an appropiate error after calling
-+   them.  [argp_usage & argp_error should probably be called argp_state_...,
-+   but they're used often enough that they should be short]  */
-+
-+/* Output, if appropriate, a usage message for STATE to STREAM.  FLAGS are
-+   from the set ARGP_HELP_*.  */
-+extern void argp_state_help (__const struct argp_state *__restrict __state,
-+			     FILE *__restrict __stream,
-+			     unsigned int __flags);
-+/* Possibly output the standard usage message for ARGP to stderr and exit.  */
-+extern void argp_usage (__const struct argp_state *__state);
-+
-+/* If appropriate, print the printf string FMT and following args, preceded
-+   by the program name and `:', to stderr, and followed by a `Try ... --help'
-+   message, then exit (1).  */
-+extern void argp_error (__const struct argp_state *__restrict __state,
-+			__const char *__restrict __fmt, ...)
-+     __attribute__ ((__format__ (__printf__, 2, 3)));
-+/* Similar to the standard gnu error-reporting function error(), but will
-+   respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
-+   to STATE->err_stream.  This is useful for argument parsing code that is
-+   shared between program startup (when exiting is desired) and runtime
-+   option parsing (when typically an error code is returned instead).  The
-+   difference between this function and argp_error is that the latter is for
-+   *parsing errors*, and the former is for other problems that occur during
-+   parsing but don't reflect a (syntactic) problem with the input.  */
-+extern void argp_failure (__const struct argp_state *__restrict __state,
-+			  int __status, int __errnum,
-+			  __const char *__restrict __fmt, ...)
-+     __attribute__ ((__format__ (__printf__, 4, 5)));
-+/* Returns true if the option OPT is a valid short option.  */
-+extern int _option_is_short (__const struct argp_option *__opt) __THROW;
-+extern int __option_is_short (__const struct argp_option *__opt) __THROW;
-+
-+/* Returns true if the option OPT is in fact the last (unused) entry in an
-+   options array.  */
-+extern int _option_is_end (__const struct argp_option *__opt) __THROW;
-+extern int __option_is_end (__const struct argp_option *__opt) __THROW;
-+
-+/* Return the input field for ARGP in the parser corresponding to STATE; used
-+   by the help routines.  */
-+/* We think this should not be exported */
-+extern void *__argp_input (__const struct argp *__restrict __argp,
-+			   __const struct argp_state *__restrict __state)
-+     __THROW;
-+
-+#ifdef __USE_EXTERN_INLINES
-+
-+# ifndef ARGP_EI
-+#  define ARGP_EI __extern_inline
-+# endif
-+
-+ARGP_EI void
-+argp_usage (__const struct argp_state *__state)
-+{
-+  argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
-+}
-+
-+ARGP_EI int
-+__NTH (__option_is_short (__const struct argp_option *__opt))
-+{
-+  if (__opt->flags & OPTION_DOC)
-+    return 0;
-+  else
-+    {
-+      int __key = __opt->key;
-+      return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
-+    }
-+}
-+
-+ARGP_EI int
-+__NTH (__option_is_end (__const struct argp_option *__opt))
-+{
-+  return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
-+}
-+#endif /* Use extern inlines.  */
-+
-+#ifdef  __cplusplus
-+}
-+#endif
-+
-+#endif /* argp.h */
-diff --git a/libc/sysdeps/linux/common/bits/getopt_int.h b/libc/sysdeps/linux/common/bits/getopt_int.h
-new file mode 100644
-index 0000000..291edfe
---- /dev/null
-+++ b/libc/sysdeps/linux/common/bits/getopt_int.h
-@@ -0,0 +1,136 @@
-+/* Internal declarations for getopt.
-+   Copyright (C) 1989-1994,1996-1999,2001,2003,2004
-+   Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#ifndef _GETOPT_INT_H
-+#define _GETOPT_INT_H  1
-+
-+extern int _getopt_internal (int ___argc, char *const *___argv,
-+                            const char *__shortopts,
-+                            const struct option *__longopts, int *__longind,
-+                            int __long_only) attribute_hidden;
-+
-+
-+/* Reentrant versions which can handle parsing multiple argument
-+   vectors at the same time.  */
-+
-+/* For __ordering member */
-+enum {
-+       REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-+};
-+
-+/* Data type for reentrant functions.  */
-+
-+struct _getopt_data
-+{
-+  /* These have exactly the same meaning as the corresponding global
-+     variables, except that they are used for the reentrant
-+     versions of getopt.  */
-+  int optind;
-+  int opterr;
-+  char *optarg;
-+  smalluint optopt; /* we store characters here, a byte is enough */
-+
-+  /* Internal members.  */
-+
-+  /* True if the internal members have been initialized.  */
-+  smallint __initialized;
-+
-+  /* Describe how to deal with options that follow non-option ARGV-elements.
-+
-+     If the caller did not specify anything,
-+     the default is REQUIRE_ORDER if the environment variable
-+     POSIXLY_CORRECT is defined, PERMUTE otherwise.
-+
-+     REQUIRE_ORDER means don't recognize them as options;
-+     stop option processing when the first non-option is seen.
-+     This is what Unix does.
-+     This mode of operation is selected by either setting the environment
-+     variable POSIXLY_CORRECT, or using `+' as the first character
-+     of the list of option characters.
-+
-+     PERMUTE is the default.  We permute the contents of ARGV as we
-+     scan, so that eventually all the non-options are at the end.
-+     This allows options to be given in any order, even with programs
-+     that were not written to expect this.
-+
-+     RETURN_IN_ORDER is an option available to programs that were
-+     written to expect options and other ARGV-elements in any order
-+     and that care about the ordering of the two.  We describe each
-+     non-option ARGV-element as if it were the argument of an option
-+     with character code 1.  Using `-' as the first character of the
-+     list of option characters selects this mode of operation.
-+
-+     The special argument `--' forces an end of option-scanning regardless
-+     of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
-+     `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
-+  smallint __ordering;
-+
-+  /* If the POSIXLY_CORRECT environment variable is set.  */
-+  smallint __posixly_correct;
-+
-+  /* The next char to be scanned in the option-element
-+     in which the last option character we returned was found.
-+     This allows us to pick up the scan where we left off.
-+
-+     If this is zero, or a null string, it means resume the scan
-+     by advancing to the next ARGV-element.  */
-+  char *__nextchar;
-+
-+
-+  /* Handle permutation of arguments.  */
-+
-+  /* Describe the part of ARGV that contains non-options that have
-+     been skipped.  `first_nonopt' is the index in ARGV of the first
-+     of them; `last_nonopt' is the index after the last of them.  */
-+
-+  int __first_nonopt;
-+  int __last_nonopt;
-+
-+#if defined _LIBC && defined USE_NONOPTION_FLAGS
-+  int __nonoption_flags_max_len;
-+  int __nonoption_flags_len;
-+# endif
-+};
-+
-+/* The initializer is necessary to set OPTIND and OPTERR to their
-+   default values and to clear the initialization flag.  */
-+#define _GETOPT_DATA_INITIALIZER       { 1, 1 }
-+
-+#if 0 /* first is static on uClibc, the others not used */
-+extern int _getopt_internal_r (int ___argc, char *const *___argv,
-+                              const char *__shortopts,
-+                              const struct option *__longopts, int *__longind,
-+                              int __long_only, struct _getopt_data *__data);
-+#endif
-+#if defined __UCLIBC_HAS_GNU_GETOPT__ || defined __UCLIBC_HAS_GETOPT_LONG__
-+#ifndef __need_getopt
-+extern int _getopt_long_r (int ___argc, char *const *___argv,
-+                          const char *__shortopts,
-+                          const struct option *__longopts, int *__longind,
-+                          struct _getopt_data *__data);
-+
-+extern int _getopt_long_only_r (int ___argc, char *const *___argv,
-+                               const char *__shortopts,
-+                               const struct option *__longopts,
-+                               int *__longind,
-+                               struct _getopt_data *__data);
-+#endif
-+#endif
-+#endif /* getopt_int.h */
-diff --git a/libc/unistd/getopt.c b/libc/unistd/getopt.c
-index f63482b..db5e12c 100644
---- a/libc/unistd/getopt.c
-+++ b/libc/unistd/getopt.c
-@@ -105,7 +105,7 @@
-    they can distinguish the relative order of options and other arguments.  */
- 
- #include <getopt.h>
--#include "getopt_int.h"
-+#include <bits/getopt_int.h>
- 
- 
- /* For communication from `getopt' to the caller.
-@@ -1170,6 +1170,15 @@ getopt_long (int argc, char *const *argv, const char *options,
-   return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
- }
- 
-+int
-+_getopt_long_r (int argc, char *const *argv, const char *options,
-+               const struct option *long_options, int *opt_index,
-+               struct _getopt_data *d)
-+{
-+  return _getopt_internal_r (argc, argv, options, long_options, opt_index,
-+                            0, d);
-+}
-+
- /* Like getopt_long, but '-' as well as '--' can indicate a long option.
-    If an option that starts with '-' (not '--') doesn't match a long option,
-    but does match a short option, it is parsed as a short option
-@@ -1183,4 +1192,12 @@ getopt_long_only (int argc, char *const *argv, const char *options,
- }
- #endif /* __UCLIBC_HAS_GETOPT_LONG__ */
- 
-+int
-+_getopt_long_only_r (int argc, char *const *argv, const char *options,
-+                    const struct option *long_options, int *opt_index,
-+                    struct _getopt_data *d)
-+{
-+  return _getopt_internal_r (argc, argv, options, long_options, opt_index, 1, d);
-+}
-+
- #endif	/* Not ELIDE_CODE.  */
-diff --git a/libuargp/Makefile b/libuargp/Makefile
-new file mode 100644
-index 0000000..45acdd9
---- /dev/null
-+++ b/libuargp/Makefile
-@@ -0,0 +1,14 @@
-+# Makefile for uClibc (libuargp)
-+#
-+# Copyright (C) 2010 STMicroelectronics Ltd
-+# Author(s): Filippo Arcidiacono <filippo.arcidiacono at st.com>
-+#
-+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+#
-+
-+top_srcdir=../
-+top_builddir=../
-+include $(top_builddir)Rules.mak
-+all: libs
-+include Makefile.in
-+include $(top_srcdir)Makerules
-diff --git a/libuargp/Makefile.in b/libuargp/Makefile.in
-new file mode 100644
-index 0000000..1498abb
---- /dev/null
-+++ b/libuargp/Makefile.in
-@@ -0,0 +1,73 @@
-+# Makefile for uClibc (libuargp)
-+#
-+# Copyright (C) 2009, 2010  STMicroelectronics Ltd.
-+# Author(s): Salvatore Cro <salvatore.cro at st.com>
-+#            - First implementation, embedded into libc
-+#            Filippo Arcidiacono <filippo.arcidiacono at st.com>
-+#            - Reworked for stand-alone libuargp implementation
-+
-+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+#
-+
-+CFLAGS-libuargp := -DNOT_IN_libc -DIS_IN_libuargp $(SSP_ALL_CFLAGS)
-+
-+LDFLAGS-libuargp.so := $(LDFLAGS)
-+
-+LIBS-libuargp.so := $(LIBS)
-+
-+libuargp_FULL_NAME := libuargp-$(VERSION).so
-+
-+libuargp_DIR := $(top_srcdir)libuargp
-+libuargp_OUT := $(top_builddir)libuargp
-+
-+libuargp_SRC-y :=
-+libuargp_SRC-$(UCLIBC_HAS_ARGP) := $(addsuffix .c,$(addprefix argp-, ba \
-+			eexst fmtstream fs-xinl help parse pv pvh xinl))
-+
-+CFLAGS-argp-xinl.c = -fgnu89-inline
-+
-+libuargp_SRC := $(addprefix $(libuargp_DIR)/,$(libuargp_SRC-y))
-+libuargp_OBJ := $(patsubst $(libuargp_DIR)/%.c,$(libuargp_OUT)/%.o,$(libuargp_SRC))
-+
-+libuargp_SRCS := $(libuargp_SRC)
-+libuargp_OBJS := $(libuargp_OBJ)
-+
-+ifeq ($(DOPIC),y)
-+libuargp-a-y := $(libuargp_OBJS:.o=.os)
-+else
-+libuargp-a-y := $(libuargp_OBJS)
-+endif
-+libuargp-so-y := $(libuargp_OBJS:.o=.os)
-+
-+lib-a-$(UCLIBC_HAS_ARGP) += $(top_builddir)lib/libuargp.a
-+lib-so-$(UCLIBC_HAS_ARGP) += $(top_builddir)lib/libuargp.so
-+
-+objclean-y += CLEAN_libuargp
-+
-+ifeq ($(DOMULTI),n)
-+ifeq ($(DOPIC),y)
-+$(top_builddir)lib/libuargp.so: $(top_builddir)lib/libuargp.a $(libc.depend)
-+else
-+$(top_builddir)lib/libuargp.so: $(libuargp_OUT)/libuargp_so.a $(libc.depend)
-+endif
-+	$(call link.so,$(libuargp_FULL_NAME),$(MAJOR_VERSION))
-+else
-+$(top_builddir)lib/libuargp.so: $(libuargp_OUT)/libuargp.oS $(libc.depend)
-+	$(call linkm.so,$(libuargp_FULL_NAME),$(MAJOR_VERSION))
-+endif
-+
-+$(libuargp_OUT)/libuargp_so.a: $(libuargp-so-y)
-+	$(Q)$(RM) $@
-+	$(do_ar)
-+
-+$(libuargp_OUT)/libuargp.oS: $(libuargp_SRCS)
-+	$(Q)$(RM) $@
-+	$(compile-m)
-+
-+$(top_builddir)lib/libuargp.a: $(libuargp-a-y)
-+	$(Q)$(INSTALL) -d $(dir $@)
-+	$(Q)$(RM) $@
-+	$(do_ar)
-+
-+CLEAN_libuargp:
-+	$(do_rm) $(addprefix $(libuargp_OUT)/*., o os oS a)
-diff --git a/libuargp/argp-ba.c b/libuargp/argp-ba.c
-new file mode 100644
-index 0000000..3522b02
---- /dev/null
-+++ b/libuargp/argp-ba.c
-@@ -0,0 +1,26 @@
-+/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
-+   Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+/* If set by the user program, it should point to string that is the
-+   bug-reporting address for the program.  It will be printed by argp_help if
-+   the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help
-+   messages), embedded in a sentence that says something like `Report bugs to
-+   ADDR.'.  */
-+const char *argp_program_bug_address;
-diff --git a/libuargp/argp-eexst.c b/libuargp/argp-eexst.c
-new file mode 100644
-index 0000000..445b68d
---- /dev/null
-+++ b/libuargp/argp-eexst.c
-@@ -0,0 +1,32 @@
-+/* Default definition for ARGP_ERR_EXIT_STATUS
-+   Copyright (C) 1997 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <sysexits.h>
-+
-+#include <argp.h>
-+
-+/* The exit status that argp will use when exiting due to a parsing error.
-+   If not defined or set by the user program, this defaults to EX_USAGE from
-+   <sysexits.h>.  */
-+error_t argp_err_exit_status = EX_USAGE;
-diff --git a/libuargp/argp-fmtstream.c b/libuargp/argp-fmtstream.c
-new file mode 100644
-index 0000000..75227f9
---- /dev/null
-+++ b/libuargp/argp-fmtstream.c
-@@ -0,0 +1,439 @@
-+/* Word-wrapping and line-truncating streams
-+   Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.
-+
-+   Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
-+*/
-+
-+/* This package emulates glibc `line_wrap_stream' semantics for systems that
-+   don't have that.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+#include <stdarg.h>
-+#include <ctype.h>
-+
-+#include "argp-fmtstream.h"
-+
-+#ifndef ARGP_FMTSTREAM_USE_LINEWRAP
-+
-+#ifndef isblank
-+#define isblank(ch) ((ch)==' ' || (ch)=='\t')
-+#endif
-+
-+#if defined _LIBC && defined USE_IN_LIBIO
-+# include <wchar.h>
-+# include <libio/libioP.h>
-+# define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
-+#else
-+# define __vsnprintf(s, l, f, a) vsnprintf (s, l, f, a)
-+#endif
-+
-+#define INIT_BUF_SIZE 200
-+#define PRINTF_SIZE_GUESS 150
-+
-+/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
-+   written on it with LMARGIN spaces and limits them to RMARGIN columns
-+   total.  If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
-+   replacing the whitespace before them with a newline and WMARGIN spaces.
-+   Otherwise, chars beyond RMARGIN are simply dropped until a newline.
-+   Returns NULL if there was an error.  */
-+argp_fmtstream_t
-+__argp_make_fmtstream (FILE *stream,
-+                      size_t lmargin, size_t rmargin, ssize_t wmargin)
-+{
-+  argp_fmtstream_t fs;
-+
-+  fs = (struct argp_fmtstream *) malloc (sizeof (struct argp_fmtstream));
-+  if (fs != NULL)
-+    {
-+      fs->stream = stream;
-+
-+      fs->lmargin = lmargin;
-+      fs->rmargin = rmargin;
-+      fs->wmargin = wmargin;
-+      fs->point_col = 0;
-+      fs->point_offs = 0;
-+
-+      fs->buf = (char *) malloc (INIT_BUF_SIZE);
-+      if (! fs->buf)
-+       {
-+         free (fs);
-+         fs = 0;
-+       }
-+      else
-+       {
-+         fs->p = fs->buf;
-+         fs->end = fs->buf + INIT_BUF_SIZE;
-+       }
-+    }
-+
-+  return fs;
-+}
-+#if 0
-+/* Not exported.  */
-+#ifdef weak_alias
-+weak_alias (__argp_make_fmtstream, argp_make_fmtstream)
-+#endif
-+#endif
-+
-+/* Flush FS to its stream, and free it (but don't close the stream).  */
-+void
-+__argp_fmtstream_free (argp_fmtstream_t fs)
-+{
-+  __argp_fmtstream_update (fs);
-+  if (fs->p > fs->buf)
-+    {
-+#ifdef USE_IN_LIBIO
-+      __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
-+#else
-+      fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
-+#endif
-+    }
-+  free (fs->buf);
-+  free (fs);
-+}
-+#if 0
-+/* Not exported.  */
-+#ifdef weak_alias
-+weak_alias (__argp_fmtstream_free, argp_fmtstream_free)
-+#endif
-+#endif
-+
-+/* Process FS's buffer so that line wrapping is done from POINT_OFFS to the
-+   end of its buffer.  This code is mostly from glibc stdio/linewrap.c.  */
-+void
-+__argp_fmtstream_update (argp_fmtstream_t fs)
-+{
-+  char *buf, *nl;
-+  size_t len;
-+
-+  /* Scan the buffer for newlines.  */
-+  buf = fs->buf + fs->point_offs;
-+  while (buf < fs->p)
-+    {
-+      size_t r;
-+
-+      if (fs->point_col == 0 && fs->lmargin != 0)
-+       {
-+         /* We are starting a new line.  Print spaces to the left margin.  */
-+         const size_t pad = fs->lmargin;
-+         if (fs->p + pad < fs->end)
-+           {
-+             /* We can fit in them in the buffer by moving the
-+                buffer text up and filling in the beginning.  */
-+             memmove (buf + pad, buf, fs->p - buf);
-+             fs->p += pad; /* Compensate for bigger buffer. */
-+             memset (buf, ' ', pad); /* Fill in the spaces.  */
-+             buf += pad; /* Don't bother searching them.  */
-+           }
-+         else
-+           {
-+             /* No buffer space for spaces.  Must flush.  */
-+             size_t i;
-+             for (i = 0; i < pad; i++)
-+               {
-+#ifdef USE_IN_LIBIO
-+                 if (_IO_fwide (fs->stream, 0) > 0)
-+                   putwc_unlocked (L' ', fs->stream);
-+                 else
-+#endif
-+                   putc_unlocked (' ', fs->stream);
-+               }
-+           }
-+         fs->point_col = pad;
-+       }
-+
-+      len = fs->p - buf;
-+      nl = memchr (buf, '\n', len);
-+
-+      if (fs->point_col < 0)
-+       fs->point_col = 0;
-+
-+      if (!nl)
-+       {
-+         /* The buffer ends in a partial line.  */
-+
-+         if (fs->point_col + len < fs->rmargin)
-+           {
-+             /* The remaining buffer text is a partial line and fits
-+                within the maximum line width.  Advance point for the
-+                characters to be written and stop scanning.  */
-+             fs->point_col += len;
-+             break;
-+           }
-+         else
-+           /* Set the end-of-line pointer for the code below to
-+              the end of the buffer.  */
-+           nl = fs->p;
-+       }
-+      else if (fs->point_col + (nl - buf) < (ssize_t) fs->rmargin)
-+       {
-+         /* The buffer contains a full line that fits within the maximum
-+            line width.  Reset point and scan the next line.  */
-+         fs->point_col = 0;
-+         buf = nl + 1;
-+         continue;
-+       }
-+
-+      /* This line is too long.  */
-+      r = fs->rmargin - 1;
-+
-+      if (fs->wmargin < 0)
-+       {
-+         /* Truncate the line by overwriting the excess with the
-+            newline and anything after it in the buffer.  */
-+         if (nl < fs->p)
-+           {
-+             memmove (buf + (r - fs->point_col), nl, fs->p - nl);
-+             fs->p -= buf + (r - fs->point_col) - nl;
-+             /* Reset point for the next line and start scanning it.  */
-+             fs->point_col = 0;
-+             buf += r + 1; /* Skip full line plus \n. */
-+           }
-+         else
-+           {
-+             /* The buffer ends with a partial line that is beyond the
-+                maximum line width.  Advance point for the characters
-+                written, and discard those past the max from the buffer.  */
-+             fs->point_col += len;
-+             fs->p -= fs->point_col - r;
-+             break;
-+           }
-+       }
-+      else
-+       {
-+         /* Do word wrap.  Go to the column just past the maximum line
-+            width and scan back for the beginning of the word there.
-+            Then insert a line break.  */
-+
-+         char *p, *nextline;
-+         int i;
-+
-+         p = buf + (r + 1 - fs->point_col);
-+         while (p >= buf && !isblank (*p))
-+           --p;
-+         nextline = p + 1;     /* This will begin the next line.  */
-+
-+         if (nextline > buf)
-+           {
-+             /* Swallow separating blanks.  */
-+             if (p >= buf)
-+               do
-+                 --p;
-+               while (p >= buf && isblank (*p));
-+             nl = p + 1;       /* The newline will replace the first blank. */
-+           }
-+         else
-+           {
-+             /* A single word that is greater than the maximum line width.
-+                Oh well.  Put it on an overlong line by itself.  */
-+             p = buf + (r + 1 - fs->point_col);
-+             /* Find the end of the long word.  */
-+             do
-+               ++p;
-+             while (p < nl && !isblank (*p));
-+             if (p == nl)
-+               {
-+                 /* It already ends a line.  No fussing required.  */
-+                 fs->point_col = 0;
-+                 buf = nl + 1;
-+                 continue;
-+               }
-+             /* We will move the newline to replace the first blank.  */
-+             nl = p;
-+             /* Swallow separating blanks.  */
-+             do
-+               ++p;
-+             while (isblank (*p));
-+             /* The next line will start here.  */
-+             nextline = p;
-+           }
-+
-+         /* Note: There are a bunch of tests below for
-+            NEXTLINE == BUF + LEN + 1; this case is where NL happens to fall
-+            at the end of the buffer, and NEXTLINE is in fact empty (and so
-+            we need not be careful to maintain its contents).  */
-+
-+         if ((nextline == buf + len + 1
-+              ? fs->end - nl < fs->wmargin + 1
-+              : nextline - (nl + 1) < fs->wmargin)
-+             && fs->p > nextline)
-+           {
-+             /* The margin needs more blanks than we removed.  */
-+             if (fs->end - fs->p > fs->wmargin + 1)
-+               /* Make some space for them.  */
-+               {
-+                 size_t mv = fs->p - nextline;
-+                 memmove (nl + 1 + fs->wmargin, nextline, mv);
-+                 nextline = nl + 1 + fs->wmargin;
-+                 len = nextline + mv - buf;
-+                 *nl++ = '\n';
-+               }
-+             else
-+               /* Output the first line so we can use the space.  */
-+               {
-+#if defined _LIBC && defined USE_IN_LIBIO
-+                 __fxprintf (fs->stream, "%.*s\n",
-+                             (int) (nl - fs->buf), fs->buf);
-+#else
-+                 if (nl > fs->buf)
-+                   fwrite_unlocked (fs->buf, 1, nl - fs->buf, fs->stream);
-+                 putc_unlocked ('\n', fs->stream);
-+#endif
-+
-+                 len += buf - fs->buf;
-+                 nl = buf = fs->buf;
-+               }
-+           }
-+         else
-+           /* We can fit the newline and blanks in before
-+              the next word.  */
-+           *nl++ = '\n';
-+
-+         if (nextline - nl >= fs->wmargin
-+             || (nextline == buf + len + 1 && fs->end - nextline >= fs->wmargin))
-+           /* Add blanks up to the wrap margin column.  */
-+           for (i = 0; i < fs->wmargin; ++i)
-+             *nl++ = ' ';
-+         else
-+           for (i = 0; i < fs->wmargin; ++i)
-+#ifdef USE_IN_LIBIO
-+             if (_IO_fwide (fs->stream, 0) > 0)
-+               putwc_unlocked (L' ', fs->stream);
-+             else
-+#endif
-+               putc_unlocked (' ', fs->stream);
-+
-+         /* Copy the tail of the original buffer into the current buffer
-+            position.  */
-+         if (nl < nextline)
-+           memmove (nl, nextline, buf + len - nextline);
-+         len -= nextline - buf;
-+
-+         /* Continue the scan on the remaining lines in the buffer.  */
-+         buf = nl;
-+
-+         /* Restore bufp to include all the remaining text.  */
-+         fs->p = nl + len;
-+
-+         /* Reset the counter of what has been output this line.  If wmargin
-+            is 0, we want to avoid the lmargin getting added, so we set
-+            point_col to a magic value of -1 in that case.  */
-+         fs->point_col = fs->wmargin ? fs->wmargin : -1;
-+       }
-+    }
-+
-+  /* Remember that we've scanned as far as the end of the buffer.  */
-+  fs->point_offs = fs->p - fs->buf;
-+}
-+
-+/* Ensure that FS has space for AMOUNT more bytes in its buffer, either by
-+   growing the buffer, or by flushing it.  True is returned iff we succeed. */
-+int
-+__argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount)
-+{
-+  if ((size_t) (fs->end - fs->p) < amount)
-+    {
-+      ssize_t wrote;
-+
-+      /* Flush FS's buffer.  */
-+      __argp_fmtstream_update (fs);
-+
-+#if defined _LIBC && defined USE_IN_LIBIO
-+      __fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
-+      wrote = fs->p - fs->buf;
-+#else
-+      wrote = fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
-+#endif
-+      if (wrote == fs->p - fs->buf)
-+       {
-+         fs->p = fs->buf;
-+         fs->point_offs = 0;
-+       }
-+      else
-+       {
-+         fs->p -= wrote;
-+         fs->point_offs -= wrote;
-+         memmove (fs->buf, fs->buf + wrote, fs->p - fs->buf);
-+         return 0;
-+       }
-+
-+      if ((size_t) (fs->end - fs->buf) < amount)
-+       /* Gotta grow the buffer.  */
-+       {
-+         size_t old_size = fs->end - fs->buf;
-+         size_t new_size = old_size + amount;
-+         char *new_buf;
-+
-+         if (new_size < old_size || ! (new_buf = realloc (fs->buf, new_size)))
-+           {
-+             __set_errno (ENOMEM);
-+             return 0;
-+           }
-+
-+         fs->buf = new_buf;
-+         fs->end = new_buf + new_size;
-+         fs->p = fs->buf;
-+       }
-+    }
-+
-+  return 1;
-+}
-+
-+ssize_t
-+__argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...)
-+{
-+  int out;
-+  size_t avail;
-+  size_t size_guess = PRINTF_SIZE_GUESS; /* How much space to reserve. */
-+
-+  do
-+    {
-+      va_list args;
-+
-+      if (! __argp_fmtstream_ensure (fs, size_guess))
-+       return -1;
-+
-+      va_start (args, fmt);
-+      avail = fs->end - fs->p;
-+      out = __vsnprintf (fs->p, avail, fmt, args);
-+      va_end (args);
-+      if ((size_t) out >= avail)
-+       size_guess = out + 1;
-+    }
-+  while ((size_t) out >= avail);
-+
-+  fs->p += out;
-+
-+  return out;
-+}
-+#if 0
-+/* Not exported.  */
-+#ifdef weak_alias
-+weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
-+#endif
-+#endif
-+
-+#endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
-diff --git a/libuargp/argp-fmtstream.h b/libuargp/argp-fmtstream.h
-new file mode 100644
-index 0000000..ca7c834
---- /dev/null
-+++ b/libuargp/argp-fmtstream.h
-@@ -0,0 +1,314 @@
-+/* Word-wrapping and line-truncating streams.
-+   Copyright (C) 1997 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.
-+
-+   Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
-+*/
-+
-+/* This package emulates glibc `line_wrap_stream' semantics for systems that
-+   don't have that.  If the system does have it, it is just a wrapper for
-+   that.  This header file is only used internally while compiling argp, and
-+   shouldn't be installed.  */
-+
-+#ifndef _ARGP_FMTSTREAM_H
-+#define _ARGP_FMTSTREAM_H
-+
-+#include <stdio.h>
-+#include <string.h>
-+#include <unistd.h>
-+
-+#ifndef __attribute__
-+/* This feature is available in gcc versions 2.5 and later.  */
-+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined(__STRICT_ANSI__)
-+#  define __attribute__(Spec) /* empty */
-+# endif
-+/* The __-protected variants of `format' and `printf' attributes
-+   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
-+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || defined(__STRICT_ANSI__)
-+#  define __format__ format
-+#  define __printf__ printf
-+# endif
-+#endif
-+
-+#if 0 /* uClibc: disabled */
-+#if    (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
-+    || (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
-+/* line_wrap_stream is available, so use that.  */
-+#define ARGP_FMTSTREAM_USE_LINEWRAP
-+#endif
-+#else
-+/* line_wrap stream NOT available */
-+# undef ARGP_FMTSTREAM_USE_LINEWRAP
-+#endif
-+
-+#ifdef ARGP_FMTSTREAM_USE_LINEWRAP
-+/* Just be a simple wrapper for line_wrap_stream; the semantics are
-+   *slightly* different, as line_wrap_stream doesn't actually make a new
-+   object, it just modifies the given stream (reversibly) to do
-+   line-wrapping.  Since we control who uses this code, it doesn't matter.  */
-+
-+#include <linewrap.h>
-+
-+typedef FILE *argp_fmtstream_t;
-+
-+#define argp_make_fmtstream line_wrap_stream
-+#define __argp_make_fmtstream line_wrap_stream
-+#define argp_fmtstream_free line_unwrap_stream
-+#define __argp_fmtstream_free line_unwrap_stream
-+
-+#define __argp_fmtstream_putc(fs,ch) putc(ch,fs)
-+#define argp_fmtstream_putc(fs,ch) putc(ch,fs)
-+#define __argp_fmtstream_puts(fs,str) fputs(str,fs)
-+#define argp_fmtstream_puts(fs,str) fputs(str,fs)
-+#define __argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
-+#define argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs)
-+#define __argp_fmtstream_printf fprintf
-+#define argp_fmtstream_printf fprintf
-+
-+#define __argp_fmtstream_lmargin line_wrap_lmargin
-+#define argp_fmtstream_lmargin line_wrap_lmargin
-+#define __argp_fmtstream_set_lmargin line_wrap_set_lmargin
-+#define argp_fmtstream_set_lmargin line_wrap_set_lmargin
-+#define __argp_fmtstream_rmargin line_wrap_rmargin
-+#define argp_fmtstream_rmargin line_wrap_rmargin
-+#define __argp_fmtstream_set_rmargin line_wrap_set_rmargin
-+#define argp_fmtstream_set_rmargin line_wrap_set_rmargin
-+#define __argp_fmtstream_wmargin line_wrap_wmargin
-+#define argp_fmtstream_wmargin line_wrap_wmargin
-+#define __argp_fmtstream_set_wmargin line_wrap_set_wmargin
-+#define argp_fmtstream_set_wmargin line_wrap_set_wmargin
-+#define __argp_fmtstream_point line_wrap_point
-+#define argp_fmtstream_point line_wrap_point
-+
-+#else /* !ARGP_FMTSTREAM_USE_LINEWRAP */
-+/* Guess we have to define our own version.  */
-+
-+#ifndef __const
-+#define __const const
-+#endif
-+
-+struct argp_fmtstream
-+{
-+  FILE *stream;                        /* The stream we're outputting to.  */
-+
-+  size_t lmargin, rmargin;     /* Left and right margins.  */
-+  ssize_t wmargin;             /* Margin to wrap to, or -1 to truncate.  */
-+
-+  /* Point in buffer to which we've processed for wrapping, but not output.  */
-+  size_t point_offs;
-+  /* Output column at POINT_OFFS, or -1 meaning 0 but don't add lmargin.  */
-+  ssize_t point_col;
-+
-+  char *buf;                   /* Output buffer.  */
-+  char *p;                     /* Current end of text in BUF. */
-+  char *end;                   /* Absolute end of BUF.  */
-+};
-+
-+typedef struct argp_fmtstream *argp_fmtstream_t;
-+
-+/* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines
-+   written on it with LMARGIN spaces and limits them to RMARGIN columns
-+   total.  If WMARGIN >= 0, words that extend past RMARGIN are wrapped by
-+   replacing the whitespace before them with a newline and WMARGIN spaces.
-+   Otherwise, chars beyond RMARGIN are simply dropped until a newline.
-+   Returns NULL if there was an error.  */
-+extern argp_fmtstream_t __argp_make_fmtstream (FILE *__stream,
-+                                              size_t __lmargin,
-+                                              size_t __rmargin,
-+                                              ssize_t __wmargin);
-+extern argp_fmtstream_t argp_make_fmtstream (FILE *__stream,
-+                                            size_t __lmargin,
-+                                            size_t __rmargin,
-+                                            ssize_t __wmargin);
-+
-+/* Flush __FS to its stream, and free it (but don't close the stream).  */
-+extern void __argp_fmtstream_free (argp_fmtstream_t __fs);
-+extern void argp_fmtstream_free (argp_fmtstream_t __fs);
-+
-+extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
-+                                      __const char *__fmt, ...)
-+     __attribute__ ((__format__ (printf, 2, 3)));
-+extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
-+                                     __const char *__fmt, ...)
-+     __attribute__ ((__format__ (printf, 2, 3)));
-+
-+extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
-+extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
-+
-+extern int __argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str);
-+extern int argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str);
-+
-+extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs,
-+                                     __const char *__str, size_t __len);
-+extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
-+                                   __const char *__str, size_t __len);
-+
-+/* Access macros for various bits of state.  */
-+#define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
-+#define argp_fmtstream_rmargin(__fs) ((__fs)->rmargin)
-+#define argp_fmtstream_wmargin(__fs) ((__fs)->wmargin)
-+#define __argp_fmtstream_lmargin argp_fmtstream_lmargin
-+#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
-+#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
-+
-+/* Set __FS's left margin to LMARGIN and return the old value.  */
-+extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
-+                                         size_t __lmargin);
-+extern size_t __argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
-+                                           size_t __lmargin);
-+
-+/* Set __FS's right margin to __RMARGIN and return the old value.  */
-+extern size_t argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
-+                                         size_t __rmargin);
-+extern size_t __argp_fmtstream_set_rmargin (argp_fmtstream_t __fs,
-+                                           size_t __rmargin);
-+
-+/* Set __FS's wrap margin to __WMARGIN and return the old value.  */
-+extern size_t argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
-+                                         size_t __wmargin);
-+extern size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs,
-+                                           size_t __wmargin);
-+
-+/* Return the column number of the current output point in __FS.  */
-+extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
-+extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
-+
-+/* Internal routines.  */
-+extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
-+extern void __argp_fmtstream_update (argp_fmtstream_t __fs);
-+extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
-+extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
-+
-+#ifdef __OPTIMIZE__
-+/* Inline versions of above routines.  */
-+
-+#if !_LIBC
-+#define __argp_fmtstream_putc argp_fmtstream_putc
-+#define __argp_fmtstream_puts argp_fmtstream_puts
-+#define __argp_fmtstream_write argp_fmtstream_write
-+#define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin
-+#define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin
-+#define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin
-+#define __argp_fmtstream_point argp_fmtstream_point
-+#define __argp_fmtstream_update _argp_fmtstream_update
-+#define __argp_fmtstream_ensure _argp_fmtstream_ensure
-+#endif
-+
-+#ifndef ARGP_FS_EI
-+#define ARGP_FS_EI __extern_inline
-+#endif
-+
-+ARGP_FS_EI size_t
-+__argp_fmtstream_write (argp_fmtstream_t __fs,
-+                       __const char *__str, size_t __len)
-+{
-+  if (__fs->p + __len <= __fs->end || __argp_fmtstream_ensure (__fs, __len))
-+    {
-+      memcpy (__fs->p, __str, __len);
-+      __fs->p += __len;
-+      return __len;
-+    }
-+  else
-+    return 0;
-+}
-+
-+ARGP_FS_EI int
-+__argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str)
-+{
-+  size_t __len = strlen (__str);
-+  if (__len)
-+    {
-+      size_t __wrote = __argp_fmtstream_write (__fs, __str, __len);
-+      return __wrote == __len ? 0 : -1;
-+    }
-+  else
-+    return 0;
-+}
-+
-+ARGP_FS_EI int
-+__argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch)
-+{
-+  if (__fs->p < __fs->end || __argp_fmtstream_ensure (__fs, 1))
-+    return *__fs->p++ = __ch;
-+  else
-+    return EOF;
-+}
-+
-+/* Set __FS's left margin to __LMARGIN and return the old value.  */
-+ARGP_FS_EI size_t
-+__argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin)
-+{
-+  size_t __old;
-+  if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
-+    __argp_fmtstream_update (__fs);
-+  __old = __fs->lmargin;
-+  __fs->lmargin = __lmargin;
-+  return __old;
-+}
-+
-+/* Set __FS's right margin to __RMARGIN and return the old value.  */
-+ARGP_FS_EI size_t
-+__argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin)
-+{
-+  size_t __old;
-+  if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
-+    __argp_fmtstream_update (__fs);
-+  __old = __fs->rmargin;
-+  __fs->rmargin = __rmargin;
-+  return __old;
-+}
-+
-+/* Set FS's wrap margin to __WMARGIN and return the old value.  */
-+ARGP_FS_EI size_t
-+__argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin)
-+{
-+  size_t __old;
-+  if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
-+    __argp_fmtstream_update (__fs);
-+  __old = __fs->wmargin;
-+  __fs->wmargin = __wmargin;
-+  return __old;
-+}
-+
-+/* Return the column number of the current output point in __FS.  */
-+ARGP_FS_EI size_t
-+__argp_fmtstream_point (argp_fmtstream_t __fs)
-+{
-+  if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs)
-+    __argp_fmtstream_update (__fs);
-+  return __fs->point_col >= 0 ? __fs->point_col : 0;
-+}
-+
-+#if !_LIBC
-+#undef __argp_fmtstream_putc
-+#undef __argp_fmtstream_puts
-+#undef __argp_fmtstream_write
-+#undef __argp_fmtstream_set_lmargin
-+#undef __argp_fmtstream_set_rmargin
-+#undef __argp_fmtstream_set_wmargin
-+#undef __argp_fmtstream_point
-+#undef __argp_fmtstream_update
-+#undef __argp_fmtstream_ensure
-+#endif
-+
-+#endif /* __OPTIMIZE__ */
-+
-+#endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
-+
-+#endif /* argp-fmtstream.h */
-diff --git a/libuargp/argp-fs-xinl.c b/libuargp/argp-fs-xinl.c
-new file mode 100644
-index 0000000..473cbbd
---- /dev/null
-+++ b/libuargp/argp-fs-xinl.c
-@@ -0,0 +1,44 @@
-+/* Real definitions for extern inline functions in argp-fmtstream.h
-+   Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#define ARGP_FS_EI
-+#undef __OPTIMIZE__
-+#define __OPTIMIZE__ 1
-+#include "argp-fmtstream.h"
-+
-+#if 0
-+/* Not exported.  */
-+/* Add weak aliases.  */
-+#if _LIBC - 0 && !defined (ARGP_FMTSTREAM_USE_LINEWRAP) && defined (weak_alias)
-+
-+weak_alias (__argp_fmtstream_putc, argp_fmtstream_putc)
-+weak_alias (__argp_fmtstream_puts, argp_fmtstream_puts)
-+weak_alias (__argp_fmtstream_write, argp_fmtstream_write)
-+weak_alias (__argp_fmtstream_set_lmargin, argp_fmtstream_set_lmargin)
-+weak_alias (__argp_fmtstream_set_rmargin, argp_fmtstream_set_rmargin)
-+weak_alias (__argp_fmtstream_set_wmargin, argp_fmtstream_set_wmargin)
-+weak_alias (__argp_fmtstream_point, argp_fmtstream_point)
-+
-+#endif
-+#endif
-diff --git a/libuargp/argp-help.c b/libuargp/argp-help.c
-new file mode 100644
-index 0000000..58a5e6e
---- /dev/null
-+++ b/libuargp/argp-help.c
-@@ -0,0 +1,1882 @@
-+/* Hierarchial argument parsing help output
-+   Copyright (C) 1995-2003, 2004, 2005, 2006, 2007
-+   Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.
-+
-+   Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
-+*/
-+
-+#ifndef _GNU_SOURCE
-+# define _GNU_SOURCE   1
-+#endif
-+
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
-+/* AIX requires this to be the first thing in the file.  */
-+#ifndef __GNUC__
-+# if HAVE_ALLOCA_H || defined _LIBC
-+#  include <alloca.h>
-+# else
-+#  ifdef _AIX
-+#pragma alloca
-+#  else
-+#   ifndef alloca /* predefined by HP cc +Olibcalls */
-+char *alloca ();
-+#   endif
-+#  endif
-+# endif
-+#endif
-+
-+#include <stddef.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <assert.h>
-+#include <stdarg.h>
-+#include <ctype.h>
-+#include <limits.h>
-+#ifdef _LIBC
-+# include <wchar.h>
-+#endif
-+
-+#include <features.h>
-+#ifndef _
-+/* This is for other GNU distributions with internationalized messages.  */
-+# if (defined HAVE_LIBINTL_H || defined _LIBC) && defined __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#  include <libintl.h>
-+#  ifdef _LIBC
-+#   undef dgettext
-+#   define dgettext(domain, msgid) \
-+  INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES)
-+#  endif
-+# else
-+#  define dgettext(domain, msgid) (msgid)
-+# endif
-+#endif
-+
-+#ifndef _LIBC
-+# if HAVE_STRERROR_R
-+#  if !HAVE_DECL_STRERROR_R
-+char *strerror_r (int errnum, char *buf, size_t buflen);
-+#  endif
-+# else
-+#  if !HAVE_DECL_STRERROR
-+char *strerror (int errnum);
-+#  endif
-+# endif
-+#endif
-+
-+#include <argp.h>
-+#include "argp-fmtstream.h"
-+#include <stdbool.h>
-+#include <stdint.h>
-+
-+#ifndef SIZE_MAX
-+# define SIZE_MAX ((size_t) -1)
-+#endif
-+
-+/* User-selectable (using an environment variable) formatting parameters.
-+
-+   These may be specified in an environment variable called `ARGP_HELP_FMT',
-+   with a contents like:  VAR1=VAL1,VAR2=VAL2,BOOLVAR2,no-BOOLVAR2
-+   Where VALn must be a positive integer.  The list of variables is in the
-+   UPARAM_NAMES vector, below.  */
-+
-+/* Default parameters.  */
-+#define DUP_ARGS      0                /* True if option argument can be duplicated. */
-+#define DUP_ARGS_NOTE 1                /* True to print a note about duplicate args. */
-+#define SHORT_OPT_COL 2                /* column in which short options start */
-+#define LONG_OPT_COL  6                /* column in which long options start */
-+#define DOC_OPT_COL   2                /* column in which doc options start */
-+#define OPT_DOC_COL  29                /* column in which option text starts */
-+#define HEADER_COL    1                /* column in which group headers are printed */
-+#define USAGE_INDENT 12                /* indentation of wrapped usage lines */
-+#define RMARGIN      79                /* right margin used for wrapping */
-+
-+/* User-selectable (using an environment variable) formatting parameters.
-+   They must all be of type `int' for the parsing code to work.  */
-+struct uparams
-+{
-+  /* If true, arguments for an option are shown with both short and long
-+     options, even when a given option has both, e.g. `-x ARG, --longx=ARG'.
-+     If false, then if an option has both, the argument is only shown with
-+     the long one, e.g., `-x, --longx=ARG', and a message indicating that
-+     this really means both is printed below the options.  */
-+  int dup_args;
-+
-+  /* This is true if when DUP_ARGS is false, and some duplicate arguments have
-+     been suppressed, an explanatory message should be printed.  */
-+  int dup_args_note;
-+
-+  /* Various output columns.  */
-+  int short_opt_col;
-+  int long_opt_col;
-+  int doc_opt_col;
-+  int opt_doc_col;
-+  int header_col;
-+  int usage_indent;
-+  int rmargin;
-+};
-+
-+/* This is a global variable, as user options are only ever read once.  */
-+static struct uparams uparams = {
-+  DUP_ARGS, DUP_ARGS_NOTE,
-+  SHORT_OPT_COL, LONG_OPT_COL, DOC_OPT_COL, OPT_DOC_COL, HEADER_COL,
-+  USAGE_INDENT, RMARGIN
-+};
-+
-+/* A particular uparam, and what the user name is.  */
-+struct uparam_name
-+{
-+  const char name[14];         /* User name.  */
-+  bool is_bool;                        /* Whether it's `boolean'.  */
-+  uint8_t uparams_offs;                /* Location of the (int) field in UPARAMS.  */
-+};
-+
-+/* The name-field mappings we know about.  */
-+static const struct uparam_name uparam_names[] =
-+{
-+  { "dup-args",       true, offsetof (struct uparams, dup_args) },
-+  { "dup-args-note",  true, offsetof (struct uparams, dup_args_note) },
-+  { "short-opt-col",  false, offsetof (struct uparams, short_opt_col) },
-+  { "long-opt-col",   false, offsetof (struct uparams, long_opt_col) },
-+  { "doc-opt-col",    false, offsetof (struct uparams, doc_opt_col) },
-+  { "opt-doc-col",    false, offsetof (struct uparams, opt_doc_col) },
-+  { "header-col",     false, offsetof (struct uparams, header_col) },
-+  { "usage-indent",   false, offsetof (struct uparams, usage_indent) },
-+  { "rmargin",        false, offsetof (struct uparams, rmargin) }
-+};
-+#define nuparam_names (sizeof (uparam_names) / sizeof (uparam_names[0]))
-+
-+/* Read user options from the environment, and fill in UPARAMS appropiately.  */
-+static void
-+fill_in_uparams (const struct argp_state *state)
-+{
-+  const char *var = getenv ("ARGP_HELP_FMT");
-+
-+#define SKIPWS(p) do { while (isspace (*p)) p++; } while (0);
-+
-+  if (var)
-+    /* Parse var. */
-+    while (*var)
-+      {
-+       SKIPWS (var);
-+
-+       if (isalpha (*var))
-+         {
-+           size_t var_len;
-+           const struct uparam_name *un;
-+           int unspec = 0, val = 0;
-+           const char *arg = var;
-+
-+           while (isalnum (*arg) || *arg == '-' || *arg == '_')
-+             arg++;
-+           var_len = arg - var;
-+
-+           SKIPWS (arg);
-+
-+           if (*arg == '\0' || *arg == ',')
-+             unspec = 1;
-+           else if (*arg == '=')
-+             {
-+               arg++;
-+               SKIPWS (arg);
-+             }
-+
-+           if (unspec)
-+             {
-+               if (var[0] == 'n' && var[1] == 'o' && var[2] == '-')
-+                 {
-+                   val = 0;
-+                   var += 3;
-+                   var_len -= 3;
-+                 }
-+               else
-+                 val = 1;
-+             }
-+           else if (isdigit (*arg))
-+             {
-+               val = atoi (arg);
-+               while (isdigit (*arg))
-+                 arg++;
-+               SKIPWS (arg);
-+             }
-+
-+           un = uparam_names;
-+           size_t u;
-+           for (u = 0; u < nuparam_names; ++un, ++u)
-+             if (strlen (un->name) == var_len
-+                 && strncmp (var, un->name, var_len) == 0)
-+               {
-+                 if (unspec && !un->is_bool)
-+                   argp_failure (state, 0, 0,
-+                                   dgettext (state == NULL ? NULL
-+                                             : state->root_argp->argp_domain,
-+                                             "\
-+%.*s: ARGP_HELP_FMT parameter requires a value"),
-+                                   (int) var_len, var);
-+                 else
-+                   *(int *)((char *)&uparams + un->uparams_offs) = val;
-+                 break;
-+               }
-+           if (u == nuparam_names)
-+             argp_failure (state, 0, 0,
-+                             dgettext (state == NULL ? NULL
-+                                       : state->root_argp->argp_domain, "\
-+%.*s: Unknown ARGP_HELP_FMT parameter"),
-+                             (int) var_len, var);
-+
-+           var = arg;
-+           if (*var == ',')
-+             var++;
-+         }
-+       else if (*var)
-+         {
-+           argp_failure (state, 0, 0,
-+                           dgettext (state == NULL ? NULL
-+                                     : state->root_argp->argp_domain,
-+                                     "Garbage in ARGP_HELP_FMT: %s"), var);
-+           break;
-+         }
-+      }
-+}
-+
-+/* Returns true if OPT hasn't been marked invisible.  Visibility only affects
-+   whether OPT is displayed or used in sorting, not option shadowing.  */
-+#define ovisible(opt) (! ((opt)->flags & OPTION_HIDDEN))
-+
-+/* Returns true if OPT is an alias for an earlier option.  */
-+#define oalias(opt) ((opt)->flags & OPTION_ALIAS)
-+
-+/* Returns true if OPT is an documentation-only entry.  */
-+#define odoc(opt) ((opt)->flags & OPTION_DOC)
-+
-+/* Returns true if OPT is the end-of-list marker for a list of options.  */
-+#define oend(opt) __option_is_end (opt)
-+
-+/* Returns true if OPT has a short option.  */
-+#define oshort(opt) __option_is_short (opt)
-+
-+/*
-+   The help format for a particular option is like:
-+
-+     -xARG, -yARG, --long1=ARG, --long2=ARG        Documentation...
-+
-+   Where ARG will be omitted if there's no argument, for this option, or
-+   will be surrounded by "[" and "]" appropiately if the argument is
-+   optional.  The documentation string is word-wrapped appropiately, and if
-+   the list of options is long enough, it will be started on a separate line.
-+   If there are no short options for a given option, the first long option is
-+   indented slighly in a way that's supposed to make most long options appear
-+   to be in a separate column.
-+
-+   For example, the following output (from ps):
-+
-+     -p PID, --pid=PID          List the process PID
-+        --pgrp=PGRP            List processes in the process group PGRP
-+     -P, -x, --no-parent        Include processes without parents
-+     -Q, --all-fields           Don't elide unusable fields (normally if there's
-+                               some reason ps can't print a field for any
-+                               process, it's removed from the output entirely)
-+     -r, --reverse, --gratuitously-long-reverse-option
-+                               Reverse the order of any sort
-+        --session[=SID]        Add the processes from the session SID (which
-+                               defaults to the sid of the current process)
-+
-+    Here are some more options:
-+     -f ZOT, --foonly=ZOT       Glork a foonly
-+     -z, --zaza                 Snit a zar
-+
-+     -?, --help                 Give this help list
-+        --usage                Give a short usage message
-+     -V, --version              Print program version
-+
-+   The struct argp_option array for the above could look like:
-+
-+   {
-+     {"pid",       'p',      "PID",  0, "List the process PID"},
-+     {"pgrp",      OPT_PGRP, "PGRP", 0, "List processes in the process group PGRP"},
-+     {"no-parent", 'P',              0,     0, "Include processes without parents"},
-+     {0,           'x',       0,     OPTION_ALIAS},
-+     {"all-fields",'Q',       0,     0, "Don't elide unusable fields (normally"
-+                                        " if there's some reason ps can't"
-+                                       " print a field for any process, it's"
-+                                        " removed from the output entirely)" },
-+     {"reverse",   'r',       0,     0, "Reverse the order of any sort"},
-+     {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
-+     {"session",   OPT_SESS,  "SID", OPTION_ARG_OPTIONAL,
-+                                        "Add the processes from the session"
-+                                       " SID (which defaults to the sid of"
-+                                       " the current process)" },
-+
-+     {0,0,0,0, "Here are some more options:"},
-+     {"foonly", 'f', "ZOT", 0, "Glork a foonly"},
-+     {"zaza", 'z', 0, 0, "Snit a zar"},
-+
-+     {0}
-+   }
-+
-+   Note that the last three options are automatically supplied by argp_parse,
-+   unless you tell it not to with ARGP_NO_HELP.
-+
-+*/
-+
-+/* Returns true if CH occurs between BEG and END.  */
-+static int
-+find_char (char ch, char *beg, char *end)
-+{
-+  while (beg < end)
-+    if (*beg == ch)
-+      return 1;
-+    else
-+      beg++;
-+  return 0;
-+}
-+
-+struct hol_cluster;            /* fwd decl */
-+
-+struct hol_entry
-+{
-+  /* First option.  */
-+  const struct argp_option *opt;
-+  /* Number of options (including aliases).  */
-+  unsigned num;
-+
-+  /* A pointers into the HOL's short_options field, to the first short option
-+     letter for this entry.  The order of the characters following this point
-+     corresponds to the order of options pointed to by OPT, and there are at
-+     most NUM.  A short option recorded in a option following OPT is only
-+     valid if it occurs in the right place in SHORT_OPTIONS (otherwise it's
-+     probably been shadowed by some other entry).  */
-+  char *short_options;
-+
-+  /* Entries are sorted by their group first, in the order:
-+       1, 2, ..., n, 0, -m, ..., -2, -1
-+     and then alphabetically within each group.  The default is 0.  */
-+  int group;
-+
-+  /* The cluster of options this entry belongs to, or 0 if none.  */
-+  struct hol_cluster *cluster;
-+
-+  /* The argp from which this option came.  */
-+  const struct argp *argp;
-+};
-+
-+/* A cluster of entries to reflect the argp tree structure.  */
-+struct hol_cluster
-+{
-+  /* A descriptive header printed before options in this cluster.  */
-+  const char *header;
-+
-+  /* Used to order clusters within the same group with the same parent,
-+     according to the order in which they occurred in the parent argp's child
-+     list.  */
-+  int index;
-+
-+  /* How to sort this cluster with respect to options and other clusters at the
-+     same depth (clusters always follow options in the same group).  */
-+  int group;
-+
-+  /* The cluster to which this cluster belongs, or 0 if it's at the base
-+     level.  */
-+  struct hol_cluster *parent;
-+
-+  /* The argp from which this cluster is (eventually) derived.  */
-+  const struct argp *argp;
-+
-+  /* The distance this cluster is from the root.  */
-+  int depth;
-+
-+  /* Clusters in a given hol are kept in a linked list, to make freeing them
-+     possible.  */
-+  struct hol_cluster *next;
-+};
-+
-+/* A list of options for help.  */
-+struct hol
-+{
-+  /* An array of hol_entry's.  */
-+  struct hol_entry *entries;
-+  /* The number of entries in this hol.  If this field is zero, the others
-+     are undefined.  */
-+  unsigned num_entries;
-+
-+  /* A string containing all short options in this HOL.  Each entry contains
-+     pointers into this string, so the order can't be messed with blindly.  */
-+  char *short_options;
-+
-+  /* Clusters of entries in this hol.  */
-+  struct hol_cluster *clusters;
-+};
-+
-+/* Create a struct hol from the options in ARGP.  CLUSTER is the
-+   hol_cluster in which these entries occur, or 0, if at the root.  */
-+static struct hol *
-+make_hol (const struct argp *argp, struct hol_cluster *cluster)
-+{
-+  char *so;
-+  const struct argp_option *o;
-+  const struct argp_option *opts = argp->options;
-+  struct hol_entry *entry;
-+  unsigned num_short_options = 0;
-+  struct hol *hol = malloc (sizeof (struct hol));
-+
-+  assert (hol);
-+
-+  hol->num_entries = 0;
-+  hol->clusters = 0;
-+
-+  if (opts)
-+    {
-+      int cur_group = 0;
-+
-+      /* The first option must not be an alias.  */
-+      assert (! oalias (opts));
-+
-+      /* Calculate the space needed.  */
-+      for (o = opts; ! oend (o); o++)
-+       {
-+         if (! oalias (o))
-+           hol->num_entries++;
-+         if (oshort (o))
-+           num_short_options++;        /* This is an upper bound.  */
-+       }
-+
-+      hol->entries = malloc (sizeof (struct hol_entry) * hol->num_entries);
-+      hol->short_options = malloc (num_short_options + 1);
-+
-+      assert (hol->entries && hol->short_options);
-+#if SIZE_MAX <= UINT_MAX
-+      assert (hol->num_entries <= SIZE_MAX / sizeof (struct hol_entry));
-+#endif
-+
-+      /* Fill in the entries.  */
-+      so = hol->short_options;
-+      for (o = opts, entry = hol->entries; ! oend (o); entry++)
-+       {
-+         entry->opt = o;
-+         entry->num = 0;
-+         entry->short_options = so;
-+         entry->group = cur_group =
-+           o->group
-+           ? o->group
-+           : ((!o->name && !o->key)
-+              ? cur_group + 1
-+              : cur_group);
-+         entry->cluster = cluster;
-+         entry->argp = argp;
-+
-+         do
-+           {
-+             entry->num++;
-+             if (oshort (o) && ! find_char (o->key, hol->short_options, so))
-+               /* O has a valid short option which hasn't already been used.*/
-+               *so++ = o->key;
-+             o++;
-+           }
-+         while (! oend (o) && oalias (o));
-+       }
-+      *so = '\0';              /* null terminated so we can find the length */
-+    }
-+
-+  return hol;
-+}
-+
-+/* Add a new cluster to HOL, with the given GROUP and HEADER (taken from the
-+   associated argp child list entry), INDEX, and PARENT, and return a pointer
-+   to it.  ARGP is the argp that this cluster results from.  */
-+static struct hol_cluster *
-+hol_add_cluster (struct hol *hol, int group, const char *header, int index,
-+                struct hol_cluster *parent, const struct argp *argp)
-+{
-+  struct hol_cluster *cl = malloc (sizeof (struct hol_cluster));
-+  if (cl)
-+    {
-+      cl->group = group;
-+      cl->header = header;
-+
-+      cl->index = index;
-+      cl->parent = parent;
-+      cl->argp = argp;
-+      cl->depth = parent ? parent->depth + 1 : 0;
-+
-+      cl->next = hol->clusters;
-+      hol->clusters = cl;
-+    }
-+  return cl;
-+}
-+
-+/* Free HOL and any resources it uses.  */
-+static void
-+hol_free (struct hol *hol)
-+{
-+  struct hol_cluster *cl = hol->clusters;
-+
-+  while (cl)
-+    {
-+      struct hol_cluster *next = cl->next;
-+      free (cl);
-+      cl = next;
-+    }
-+
-+  if (hol->num_entries > 0)
-+    {
-+      free (hol->entries);
-+      free (hol->short_options);
-+    }
-+
-+  free (hol);
-+}
-+
-+static int
-+hol_entry_short_iterate (const struct hol_entry *entry,
-+                        int (*func)(const struct argp_option *opt,
-+                                    const struct argp_option *real,
-+                                    const char *domain, void *cookie),
-+                        const char *domain, void *cookie)
-+{
-+  unsigned nopts;
-+  int val = 0;
-+  const struct argp_option *opt, *real = entry->opt;
-+  char *so = entry->short_options;
-+
-+  for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
-+    if (oshort (opt) && *so == opt->key)
-+      {
-+       if (!oalias (opt))
-+         real = opt;
-+       if (ovisible (opt))
-+         val = (*func)(opt, real, domain, cookie);
-+       so++;
-+      }
-+
-+  return val;
-+}
-+
-+static __inline__ int
-+__attribute__ ((always_inline))
-+hol_entry_long_iterate (const struct hol_entry *entry,
-+                       int (*func)(const struct argp_option *opt,
-+                                   const struct argp_option *real,
-+                                   const char *domain, void *cookie),
-+                       const char *domain, void *cookie)
-+{
-+  unsigned nopts;
-+  int val = 0;
-+  const struct argp_option *opt, *real = entry->opt;
-+
-+  for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--)
-+    if (opt->name)
-+      {
-+       if (!oalias (opt))
-+         real = opt;
-+       if (ovisible (opt))
-+         val = (*func)(opt, real, domain, cookie);
-+      }
-+
-+  return val;
-+}
-+
-+/* Iterator that returns true for the first short option.  */
-+static __inline__ int
-+until_short (const struct argp_option *opt, const struct argp_option *real,
-+            const char *domain, void *cookie)
-+{
-+  return oshort (opt) ? opt->key : 0;
-+}
-+
-+/* Returns the first valid short option in ENTRY, or 0 if there is none.  */
-+static char
-+hol_entry_first_short (const struct hol_entry *entry)
-+{
-+  return hol_entry_short_iterate (entry, until_short,
-+                                 entry->argp->argp_domain, 0);
-+}
-+
-+/* Returns the first valid long option in ENTRY, or 0 if there is none.  */
-+static const char *
-+hol_entry_first_long (const struct hol_entry *entry)
-+{
-+  const struct argp_option *opt;
-+  unsigned num;
-+  for (opt = entry->opt, num = entry->num; num > 0; opt++, num--)
-+    if (opt->name && ovisible (opt))
-+      return opt->name;
-+  return 0;
-+}
-+
-+/* Returns the entry in HOL with the long option name NAME, or 0 if there is
-+   none.  */
-+static struct hol_entry *
-+hol_find_entry (struct hol *hol, const char *name)
-+{
-+  struct hol_entry *entry = hol->entries;
-+  unsigned num_entries = hol->num_entries;
-+
-+  while (num_entries-- > 0)
-+    {
-+      const struct argp_option *opt = entry->opt;
-+      unsigned num_opts = entry->num;
-+
-+      while (num_opts-- > 0)
-+       if (opt->name && ovisible (opt) && strcmp (opt->name, name) == 0)
-+         return entry;
-+       else
-+         opt++;
-+
-+      entry++;
-+    }
-+
-+  return 0;
-+}
-+
-+/* If an entry with the long option NAME occurs in HOL, set it's special
-+   sort position to GROUP.  */
-+static void
-+hol_set_group (struct hol *hol, const char *name, int group)
-+{
-+  struct hol_entry *entry = hol_find_entry (hol, name);
-+  if (entry)
-+    entry->group = group;
-+}
-+
-+/* Order by group:  0, 1, 2, ..., n, -m, ..., -2, -1.
-+   EQ is what to return if GROUP1 and GROUP2 are the same.  */
-+static int
-+group_cmp (int group1, int group2, int eq)
-+{
-+  if (group1 == group2)
-+    return eq;
-+  else if ((group1 < 0 && group2 < 0) || (group1 >= 0 && group2 >= 0))
-+    return group1 - group2;
-+  else
-+    return group2 - group1;
-+}
-+
-+/* Compare clusters CL1 & CL2 by the order that they should appear in
-+   output.  */
-+static int
-+hol_cluster_cmp (const struct hol_cluster *cl1, const struct hol_cluster *cl2)
-+{
-+  /* If one cluster is deeper than the other, use its ancestor at the same
-+     level, so that finding the common ancestor is straightforward.  */
-+  while (cl1->depth > cl2->depth)
-+    cl1 = cl1->parent;
-+  while (cl2->depth > cl1->depth)
-+    cl2 = cl2->parent;
-+
-+  /* Now reduce both clusters to their ancestors at the point where both have
-+     a common parent; these can be directly compared.  */
-+  while (cl1->parent != cl2->parent)
-+    cl1 = cl1->parent, cl2 = cl2->parent;
-+
-+  return group_cmp (cl1->group, cl2->group, cl2->index - cl1->index);
-+}
-+
-+/* Return the ancestor of CL that's just below the root (i.e., has a parent
-+   of 0).  */
-+static struct hol_cluster *
-+hol_cluster_base (struct hol_cluster *cl)
-+{
-+  while (cl->parent)
-+    cl = cl->parent;
-+  return cl;
-+}
-+
-+/* Return true if CL1 is a child of CL2.  */
-+static int
-+hol_cluster_is_child (const struct hol_cluster *cl1,
-+                     const struct hol_cluster *cl2)
-+{
-+  while (cl1 && cl1 != cl2)
-+    cl1 = cl1->parent;
-+  return cl1 == cl2;
-+}
-+
-+/* Given the name of a OPTION_DOC option, modifies NAME to start at the tail
-+   that should be used for comparisons, and returns true iff it should be
-+   treated as a non-option.  */
-+static int
-+canon_doc_option (const char **name)
-+{
-+  int non_opt;
-+  /* Skip initial whitespace.  */
-+  while (isspace (**name))
-+    (*name)++;
-+  /* Decide whether this looks like an option (leading `-') or not.  */
-+  non_opt = (**name != '-');
-+  /* Skip until part of name used for sorting.  */
-+  while (**name && !isalnum (**name))
-+    (*name)++;
-+  return non_opt;
-+}
-+
-+/* Order ENTRY1 & ENTRY2 by the order which they should appear in a help
-+   listing.  */
-+static int
-+hol_entry_cmp (const struct hol_entry *entry1,
-+              const struct hol_entry *entry2)
-+{
-+  /* The group numbers by which the entries should be ordered; if either is
-+     in a cluster, then this is just the group within the cluster.  */
-+  int group1 = entry1->group, group2 = entry2->group;
-+
-+  if (entry1->cluster != entry2->cluster)
-+    {
-+      /* The entries are not within the same cluster, so we can't compare them
-+        directly, we have to use the appropiate clustering level too.  */
-+      if (! entry1->cluster)
-+       /* ENTRY1 is at the `base level', not in a cluster, so we have to
-+          compare it's group number with that of the base cluster in which
-+          ENTRY2 resides.  Note that if they're in the same group, the
-+          clustered option always comes laster.  */
-+       return group_cmp (group1, hol_cluster_base (entry2->cluster)->group, -1);
-+      else if (! entry2->cluster)
-+       /* Likewise, but ENTRY2's not in a cluster.  */
-+       return group_cmp (hol_cluster_base (entry1->cluster)->group, group2, 1);
-+      else
-+       /* Both entries are in clusters, we can just compare the clusters.  */
-+       return hol_cluster_cmp (entry1->cluster, entry2->cluster);
-+    }
-+  else if (group1 == group2)
-+    /* The entries are both in the same cluster and group, so compare them
-+       alphabetically.  */
-+    {
-+      int short1 = hol_entry_first_short (entry1);
-+      int short2 = hol_entry_first_short (entry2);
-+      int doc1 = odoc (entry1->opt);
-+      int doc2 = odoc (entry2->opt);
-+      const char *long1 = hol_entry_first_long (entry1);
-+      const char *long2 = hol_entry_first_long (entry2);
-+
-+      if (doc1)
-+       doc1 = long1 != NULL && canon_doc_option (&long1);
-+      if (doc2)
-+       doc2 = long2 != NULL && canon_doc_option (&long2);
-+
-+      if (doc1 != doc2)
-+       /* `documentation' options always follow normal options (or
-+          documentation options that *look* like normal options).  */
-+       return doc1 - doc2;
-+      else if (!short1 && !short2 && long1 && long2)
-+       /* Only long options.  */
-+       return strcasecmp (long1, long2);
-+      else
-+       /* Compare short/short, long/short, short/long, using the first
-+          character of long options.  Entries without *any* valid
-+          options (such as options with OPTION_HIDDEN set) will be put
-+          first, but as they're not displayed, it doesn't matter where
-+          they are.  */
-+       {
-+         char first1 = short1 ? short1 : long1 ? *long1 : 0;
-+         char first2 = short2 ? short2 : long2 ? *long2 : 0;
-+#ifdef _tolower
-+         int lower_cmp = _tolower (first1) - _tolower (first2);
-+#else
-+         int lower_cmp = tolower (first1) - tolower (first2);
-+#endif
-+         /* Compare ignoring case, except when the options are both the
-+            same letter, in which case lower-case always comes first.  */
-+         return lower_cmp ? lower_cmp : first2 - first1;
-+       }
-+    }
-+  else
-+    /* Within the same cluster, but not the same group, so just compare
-+       groups.  */
-+    return group_cmp (group1, group2, 0);
-+}
-+
-+/* Version of hol_entry_cmp with correct signature for qsort.  */
-+static int
-+hol_entry_qcmp (const void *entry1_v, const void *entry2_v)
-+{
-+  return hol_entry_cmp (entry1_v, entry2_v);
-+}
-+
-+/* Sort HOL by group and alphabetically by option name (with short options
-+   taking precedence over long).  Since the sorting is for display purposes
-+   only, the shadowing of options isn't effected.  */
-+static void
-+hol_sort (struct hol *hol)
-+{
-+  if (hol->num_entries > 0)
-+    qsort (hol->entries, hol->num_entries, sizeof (struct hol_entry),
-+          hol_entry_qcmp);
-+}
-+
-+/* Append MORE to HOL, destroying MORE in the process.  Options in HOL shadow
-+   any in MORE with the same name.  */
-+static void
-+hol_append (struct hol *hol, struct hol *more)
-+{
-+  struct hol_cluster **cl_end = &hol->clusters;
-+
-+  /* Steal MORE's cluster list, and add it to the end of HOL's.  */
-+  while (*cl_end)
-+    cl_end = &(*cl_end)->next;
-+  *cl_end = more->clusters;
-+  more->clusters = 0;
-+
-+  /* Merge entries.  */
-+  if (more->num_entries > 0)
-+    {
-+      if (hol->num_entries == 0)
-+       {
-+         hol->num_entries = more->num_entries;
-+         hol->entries = more->entries;
-+         hol->short_options = more->short_options;
-+         more->num_entries = 0;        /* Mark MORE's fields as invalid.  */
-+       }
-+      else
-+       /* Append the entries in MORE to those in HOL, taking care to only add
-+          non-shadowed SHORT_OPTIONS values.  */
-+       {
-+         unsigned left;
-+         char *so, *more_so;
-+         struct hol_entry *e;
-+         unsigned num_entries = hol->num_entries + more->num_entries;
-+         struct hol_entry *entries =
-+           malloc (num_entries * sizeof (struct hol_entry));
-+         unsigned hol_so_len = strlen (hol->short_options);
-+         char *short_options =
-+           malloc (hol_so_len + strlen (more->short_options) + 1);
-+
-+         assert (entries && short_options);
-+#if SIZE_MAX <= UINT_MAX
-+         assert (num_entries <= SIZE_MAX / sizeof (struct hol_entry));
-+#endif
-+
-+         mempcpy (mempcpy (entries, hol->entries,
-+                               hol->num_entries * sizeof (struct hol_entry)),
-+                    more->entries,
-+                    more->num_entries * sizeof (struct hol_entry));
-+
-+         mempcpy (short_options, hol->short_options, hol_so_len);
-+
-+         /* Fix up the short options pointers from HOL.  */
-+         for (e = entries, left = hol->num_entries; left > 0; e++, left--)
-+           e->short_options += (short_options - hol->short_options);
-+
-+         /* Now add the short options from MORE, fixing up its entries
-+            too.  */
-+         so = short_options + hol_so_len;
-+         more_so = more->short_options;
-+         for (left = more->num_entries; left > 0; e++, left--)
-+           {
-+             int opts_left;
-+             const struct argp_option *opt;
-+
-+             e->short_options = so;
-+
-+             for (opts_left = e->num, opt = e->opt; opts_left; opt++, opts_left--)
-+               {
-+                 int ch = *more_so;
-+                 if (oshort (opt) && ch == opt->key)
-+                   /* The next short option in MORE_SO, CH, is from OPT.  */
-+                   {
-+                     if (! find_char (ch, short_options,
-+                                      short_options + hol_so_len))
-+                       /* The short option CH isn't shadowed by HOL's options,
-+                          so add it to the sum.  */
-+                       *so++ = ch;
-+                     more_so++;
-+                   }
-+               }
-+           }
-+
-+         *so = '\0';
-+
-+         free (hol->entries);
-+         free (hol->short_options);
-+
-+         hol->entries = entries;
-+         hol->num_entries = num_entries;
-+         hol->short_options = short_options;
-+       }
-+    }
-+
-+  hol_free (more);
-+}
-+
-+/* Inserts enough spaces to make sure STREAM is at column COL.  */
-+static void
-+indent_to (argp_fmtstream_t stream, unsigned col)
-+{
-+  int needed = col - __argp_fmtstream_point (stream);
-+  while (needed-- > 0)
-+    __argp_fmtstream_putc (stream, ' ');
-+}
-+
-+/* Output to STREAM either a space, or a newline if there isn't room for at
-+   least ENSURE characters before the right margin.  */
-+static void
-+space (argp_fmtstream_t stream, size_t ensure)
-+{
-+  if (__argp_fmtstream_point (stream) + ensure
-+      >= __argp_fmtstream_rmargin (stream))
-+    __argp_fmtstream_putc (stream, '\n');
-+  else
-+    __argp_fmtstream_putc (stream, ' ');
-+}
-+
-+/* If the option REAL has an argument, we print it in using the printf
-+   format REQ_FMT or OPT_FMT depending on whether it's a required or
-+   optional argument.  */
-+static void
-+arg (const struct argp_option *real, const char *req_fmt, const char *opt_fmt,
-+     const char *domain, argp_fmtstream_t stream)
-+{
-+  if (real->arg)
-+    {
-+      if (real->flags & OPTION_ARG_OPTIONAL)
-+       __argp_fmtstream_printf (stream, opt_fmt,
-+                                dgettext (domain, real->arg));
-+      else
-+       __argp_fmtstream_printf (stream, req_fmt,
-+                                dgettext (domain, real->arg));
-+    }
-+}
-+
-+/* Helper functions for hol_entry_help.  */
-+
-+/* State used during the execution of hol_help.  */
-+struct hol_help_state
-+{
-+  /* PREV_ENTRY should contain the previous entry printed, or 0.  */
-+  struct hol_entry *prev_entry;
-+
-+  /* If an entry is in a different group from the previous one, and SEP_GROUPS
-+     is true, then a blank line will be printed before any output. */
-+  int sep_groups;
-+
-+  /* True if a duplicate option argument was suppressed (only ever set if
-+     UPARAMS.dup_args is false).  */
-+  int suppressed_dup_arg;
-+};
-+
-+/* Some state used while printing a help entry (used to communicate with
-+   helper functions).  See the doc for hol_entry_help for more info, as most
-+   of the fields are copied from its arguments.  */
-+struct pentry_state
-+{
-+  const struct hol_entry *entry;
-+  argp_fmtstream_t stream;
-+  struct hol_help_state *hhstate;
-+
-+  /* True if nothing's been printed so far.  */
-+  int first;
-+
-+  /* If non-zero, the state that was used to print this help.  */
-+  const struct argp_state *state;
-+};
-+
-+/* If a user doc filter should be applied to DOC, do so.  */
-+static const char *
-+filter_doc (const char *doc, int key, const struct argp *argp,
-+           const struct argp_state *state)
-+{
-+  if (argp && argp->help_filter)
-+    /* We must apply a user filter to this output.  */
-+    {
-+      void *input = __argp_input (argp, state);
-+      return (*argp->help_filter) (key, doc, input);
-+    }
-+  else
-+    /* No filter.  */
-+    return doc;
-+}
-+
-+/* Prints STR as a header line, with the margin lines set appropiately, and
-+   notes the fact that groups should be separated with a blank line.  ARGP is
-+   the argp that should dictate any user doc filtering to take place.  Note
-+   that the previous wrap margin isn't restored, but the left margin is reset
-+   to 0.  */
-+static void
-+print_header (const char *str, const struct argp *argp,
-+             struct pentry_state *pest)
-+{
-+  const char *tstr = dgettext (argp->argp_domain, str);
-+  const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_HEADER, argp, pest->state);
-+
-+  if (fstr)
-+    {
-+      if (*fstr)
-+       {
-+         if (pest->hhstate->prev_entry)
-+           /* Precede with a blank line.  */
-+           __argp_fmtstream_putc (pest->stream, '\n');
-+         indent_to (pest->stream, uparams.header_col);
-+         __argp_fmtstream_set_lmargin (pest->stream, uparams.header_col);
-+         __argp_fmtstream_set_wmargin (pest->stream, uparams.header_col);
-+         __argp_fmtstream_puts (pest->stream, fstr);
-+         __argp_fmtstream_set_lmargin (pest->stream, 0);
-+         __argp_fmtstream_putc (pest->stream, '\n');
-+       }
-+
-+      pest->hhstate->sep_groups = 1; /* Separate subsequent groups. */
-+    }
-+
-+  if (fstr != tstr)
-+    free ((char *) fstr);
-+}
-+
-+/* Inserts a comma if this isn't the first item on the line, and then makes
-+   sure we're at least to column COL.  If this *is* the first item on a line,
-+   prints any pending whitespace/headers that should precede this line. Also
-+   clears FIRST.  */
-+static void
-+comma (unsigned col, struct pentry_state *pest)
-+{
-+  if (pest->first)
-+    {
-+      const struct hol_entry *pe = pest->hhstate->prev_entry;
-+      const struct hol_cluster *cl = pest->entry->cluster;
-+
-+      if (pest->hhstate->sep_groups && pe && pest->entry->group != pe->group)
-+       __argp_fmtstream_putc (pest->stream, '\n');
-+
-+      if (cl && cl->header && *cl->header
-+         && (!pe
-+             || (pe->cluster != cl
-+                 && !hol_cluster_is_child (pe->cluster, cl))))
-+       /* If we're changing clusters, then this must be the start of the
-+          ENTRY's cluster unless that is an ancestor of the previous one
-+          (in which case we had just popped into a sub-cluster for a bit).
-+          If so, then print the cluster's header line.  */
-+       {
-+         int old_wm = __argp_fmtstream_wmargin (pest->stream);
-+         print_header (cl->header, cl->argp, pest);
-+         __argp_fmtstream_set_wmargin (pest->stream, old_wm);
-+       }
-+
-+      pest->first = 0;
-+    }
-+  else
-+    __argp_fmtstream_puts (pest->stream, ", ");
-+
-+  indent_to (pest->stream, col);
-+}
-+
-+/* Print help for ENTRY to STREAM.  */
-+static void
-+hol_entry_help (struct hol_entry *entry, const struct argp_state *state,
-+               argp_fmtstream_t stream, struct hol_help_state *hhstate)
-+{
-+  unsigned num;
-+  const struct argp_option *real = entry->opt, *opt;
-+  char *so = entry->short_options;
-+  int have_long_opt = 0;       /* We have any long options.  */
-+  /* Saved margins.  */
-+  int old_lm = __argp_fmtstream_set_lmargin (stream, 0);
-+  int old_wm = __argp_fmtstream_wmargin (stream);
-+  /* PEST is a state block holding some of our variables that we'd like to
-+     share with helper functions.  */
-+  struct pentry_state pest = { entry, stream, hhstate, 1, state };
-+
-+  if (! odoc (real))
-+    for (opt = real, num = entry->num; num > 0; opt++, num--)
-+      if (opt->name && ovisible (opt))
-+       {
-+         have_long_opt = 1;
-+         break;
-+       }
-+
-+  /* First emit short options.  */
-+  __argp_fmtstream_set_wmargin (stream, uparams.short_opt_col); /* For truly bizarre cases. */
-+  for (opt = real, num = entry->num; num > 0; opt++, num--)
-+    if (oshort (opt) && opt->key == *so)
-+      /* OPT has a valid (non shadowed) short option.  */
-+      {
-+       if (ovisible (opt))
-+         {
-+           comma (uparams.short_opt_col, &pest);
-+           __argp_fmtstream_putc (stream, '-');
-+           __argp_fmtstream_putc (stream, *so);
-+           if (!have_long_opt || uparams.dup_args)
-+             arg (real, " %s", "[%s]",
-+                  state == NULL ? NULL : state->root_argp->argp_domain,
-+                  stream);
-+           else if (real->arg)
-+             hhstate->suppressed_dup_arg = 1;
-+         }
-+       so++;
-+      }
-+
-+  /* Now, long options.  */
-+  if (odoc (real))
-+    /* A `documentation' option.  */
-+    {
-+      __argp_fmtstream_set_wmargin (stream, uparams.doc_opt_col);
-+      for (opt = real, num = entry->num; num > 0; opt++, num--)
-+       if (opt->name && ovisible (opt))
-+         {
-+           comma (uparams.doc_opt_col, &pest);
-+           /* Calling gettext here isn't quite right, since sorting will
-+              have been done on the original; but documentation options
-+              should be pretty rare anyway...  */
-+           __argp_fmtstream_puts (stream,
-+                                  dgettext (state == NULL ? NULL
-+                                            : state->root_argp->argp_domain,
-+                                            opt->name));
-+         }
-+    }
-+  else
-+    /* A real long option.  */
-+    {
-+      __argp_fmtstream_set_wmargin (stream, uparams.long_opt_col);
-+      for (opt = real, num = entry->num; num > 0; opt++, num--)
-+       if (opt->name && ovisible (opt))
-+         {
-+           comma (uparams.long_opt_col, &pest);
-+           __argp_fmtstream_printf (stream, "--%s", opt->name);
-+           arg (real, "=%s", "[=%s]",
-+                state == NULL ? NULL : state->root_argp->argp_domain, stream);
-+         }
-+    }
-+
-+  /* Next, documentation strings.  */
-+  __argp_fmtstream_set_lmargin (stream, 0);
-+
-+  if (pest.first)
-+    {
-+      /* Didn't print any switches, what's up?  */
-+      if (!oshort (real) && !real->name)
-+       /* This is a group header, print it nicely.  */
-+       print_header (real->doc, entry->argp, &pest);
-+      else
-+       /* Just a totally shadowed option or null header; print nothing.  */
-+       goto cleanup;           /* Just return, after cleaning up.  */
-+    }
-+  else
-+    {
-+      const char *tstr = real->doc ? dgettext (state == NULL ? NULL
-+                                              : state->root_argp->argp_domain,
-+                                              real->doc) : 0;
-+      const char *fstr = filter_doc (tstr, real->key, entry->argp, state);
-+      if (fstr && *fstr)
-+       {
-+         unsigned int col = __argp_fmtstream_point (stream);
-+
-+         __argp_fmtstream_set_lmargin (stream, uparams.opt_doc_col);
-+         __argp_fmtstream_set_wmargin (stream, uparams.opt_doc_col);
-+
-+         if (col > (unsigned int) (uparams.opt_doc_col + 3))
-+           __argp_fmtstream_putc (stream, '\n');
-+         else if (col >= (unsigned int) uparams.opt_doc_col)
-+           __argp_fmtstream_puts (stream, "   ");
-+         else
-+           indent_to (stream, uparams.opt_doc_col);
-+
-+         __argp_fmtstream_puts (stream, fstr);
-+       }
-+      if (fstr && fstr != tstr)
-+       free ((char *) fstr);
-+
-+      /* Reset the left margin.  */
-+      __argp_fmtstream_set_lmargin (stream, 0);
-+      __argp_fmtstream_putc (stream, '\n');
-+    }
-+
-+  hhstate->prev_entry = entry;
-+
-+cleanup:
-+  __argp_fmtstream_set_lmargin (stream, old_lm);
-+  __argp_fmtstream_set_wmargin (stream, old_wm);
-+}
-+
-+/* Output a long help message about the options in HOL to STREAM.  */
-+static void
-+hol_help (struct hol *hol, const struct argp_state *state,
-+         argp_fmtstream_t stream)
-+{
-+  unsigned num;
-+  struct hol_entry *entry;
-+  struct hol_help_state hhstate = { 0, 0, 0 };
-+
-+  for (entry = hol->entries, num = hol->num_entries; num > 0; entry++, num--)
-+    hol_entry_help (entry, state, stream, &hhstate);
-+
-+  if (hhstate.suppressed_dup_arg && uparams.dup_args_note)
-+    {
-+      const char *tstr = dgettext (state == NULL ? NULL
-+                                  : state->root_argp->argp_domain, "\
-+Mandatory or optional arguments to long options are also mandatory or \
-+optional for any corresponding short options.");
-+      const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE,
-+                                    state ? state->root_argp : 0, state);
-+      if (fstr && *fstr)
-+       {
-+         __argp_fmtstream_putc (stream, '\n');
-+         __argp_fmtstream_puts (stream, fstr);
-+         __argp_fmtstream_putc (stream, '\n');
-+       }
-+      if (fstr && fstr != tstr)
-+       free ((char *) fstr);
-+    }
-+}
-+
-+/* Helper functions for hol_usage.  */
-+
-+/* If OPT is a short option without an arg, append its key to the string
-+   pointer pointer to by COOKIE, and advance the pointer.  */
-+static int
-+add_argless_short_opt (const struct argp_option *opt,
-+                      const struct argp_option *real,
-+                      const char *domain, void *cookie)
-+{
-+  char **snao_end = cookie;
-+  if (!(opt->arg || real->arg)
-+      && !((opt->flags | real->flags) & OPTION_NO_USAGE))
-+    *(*snao_end)++ = opt->key;
-+  return 0;
-+}
-+
-+/* If OPT is a short option with an arg, output a usage entry for it to the
-+   stream pointed at by COOKIE.  */
-+static int
-+usage_argful_short_opt (const struct argp_option *opt,
-+                       const struct argp_option *real,
-+                       const char *domain, void *cookie)
-+{
-+  argp_fmtstream_t stream = cookie;
-+  const char *arg = opt->arg;
-+  int flags = opt->flags | real->flags;
-+
-+  if (! arg)
-+    arg = real->arg;
-+
-+  if (arg && !(flags & OPTION_NO_USAGE))
-+    {
-+      arg = dgettext (domain, arg);
-+
-+      if (flags & OPTION_ARG_OPTIONAL)
-+       __argp_fmtstream_printf (stream, " [-%c[%s]]", opt->key, arg);
-+      else
-+       {
-+         /* Manually do line wrapping so that it (probably) won't
-+            get wrapped at the embedded space.  */
-+         space (stream, 6 + strlen (arg));
-+         __argp_fmtstream_printf (stream, "[-%c %s]", opt->key, arg);
-+       }
-+    }
-+
-+  return 0;
-+}
-+
-+/* Output a usage entry for the long option opt to the stream pointed at by
-+   COOKIE.  */
-+static int
-+usage_long_opt (const struct argp_option *opt,
-+               const struct argp_option *real,
-+               const char *domain, void *cookie)
-+{
-+  argp_fmtstream_t stream = cookie;
-+  const char *arg = opt->arg;
-+  int flags = opt->flags | real->flags;
-+
-+  if (! arg)
-+    arg = real->arg;
-+
-+  if (! (flags & OPTION_NO_USAGE))
-+    {
-+      if (arg)
-+       {
-+         arg = dgettext (domain, arg);
-+         if (flags & OPTION_ARG_OPTIONAL)
-+           __argp_fmtstream_printf (stream, " [--%s[=%s]]", opt->name, arg);
-+         else
-+           __argp_fmtstream_printf (stream, " [--%s=%s]", opt->name, arg);
-+       }
-+      else
-+       __argp_fmtstream_printf (stream, " [--%s]", opt->name);
-+    }
-+
-+  return 0;
-+}
-+
-+/* Print a short usage description for the arguments in HOL to STREAM.  */
-+static void
-+hol_usage (struct hol *hol, argp_fmtstream_t stream)
-+{
-+  if (hol->num_entries > 0)
-+    {
-+      unsigned nentries;
-+      struct hol_entry *entry;
-+      char *short_no_arg_opts = alloca (strlen (hol->short_options) + 1);
-+      char *snao_end = short_no_arg_opts;
-+
-+      /* First we put a list of short options without arguments.  */
-+      for (entry = hol->entries, nentries = hol->num_entries
-+          ; nentries > 0
-+          ; entry++, nentries--)
-+       hol_entry_short_iterate (entry, add_argless_short_opt,
-+                                entry->argp->argp_domain, &snao_end);
-+      if (snao_end > short_no_arg_opts)
-+       {
-+         *snao_end++ = 0;
-+         __argp_fmtstream_printf (stream, " [-%s]", short_no_arg_opts);
-+       }
-+
-+      /* Now a list of short options *with* arguments.  */
-+      for (entry = hol->entries, nentries = hol->num_entries
-+          ; nentries > 0
-+          ; entry++, nentries--)
-+       hol_entry_short_iterate (entry, usage_argful_short_opt,
-+                                entry->argp->argp_domain, stream);
-+
-+      /* Finally, a list of long options (whew!).  */
-+      for (entry = hol->entries, nentries = hol->num_entries
-+          ; nentries > 0
-+          ; entry++, nentries--)
-+       hol_entry_long_iterate (entry, usage_long_opt,
-+                               entry->argp->argp_domain, stream);
-+    }
-+}
-+
-+/* Make a HOL containing all levels of options in ARGP.  CLUSTER is the
-+   cluster in which ARGP's entries should be clustered, or 0.  */
-+static struct hol *
-+argp_hol (const struct argp *argp, struct hol_cluster *cluster)
-+{
-+  const struct argp_child *child = argp->children;
-+  struct hol *hol = make_hol (argp, cluster);
-+  if (child)
-+    while (child->argp)
-+      {
-+       struct hol_cluster *child_cluster =
-+         ((child->group || child->header)
-+          /* Put CHILD->argp within its own cluster.  */
-+          ? hol_add_cluster (hol, child->group, child->header,
-+                             child - argp->children, cluster, argp)
-+          /* Just merge it into the parent's cluster.  */
-+          : cluster);
-+       hol_append (hol, argp_hol (child->argp, child_cluster)) ;
-+       child++;
-+      }
-+  return hol;
-+}
-+
-+/* Calculate how many different levels with alternative args strings exist in
-+   ARGP.  */
-+static size_t
-+argp_args_levels (const struct argp *argp)
-+{
-+  size_t levels = 0;
-+  const struct argp_child *child = argp->children;
-+
-+  if (argp->args_doc && strchr (argp->args_doc, '\n'))
-+    levels++;
-+
-+  if (child)
-+    while (child->argp)
-+      levels += argp_args_levels ((child++)->argp);
-+
-+  return levels;
-+}
-+
-+/* Print all the non-option args documented in ARGP to STREAM.  Any output is
-+   preceded by a space.  LEVELS is a pointer to a byte vector the length
-+   returned by argp_args_levels; it should be initialized to zero, and
-+   updated by this routine for the next call if ADVANCE is true.  True is
-+   returned as long as there are more patterns to output.  */
-+static int
-+argp_args_usage (const struct argp *argp, const struct argp_state *state,
-+                char **levels, int advance, argp_fmtstream_t stream)
-+{
-+  char *our_level = *levels;
-+  int multiple = 0;
-+  const struct argp_child *child = argp->children;
-+  const char *tdoc = dgettext (argp->argp_domain, argp->args_doc), *nl = 0;
-+  const char *fdoc = filter_doc (tdoc, ARGP_KEY_HELP_ARGS_DOC, argp, state);
-+
-+  if (fdoc)
-+    {
-+      const char *cp = fdoc;
-+      nl = strchrnul (cp, '\n');
-+      if (*nl != '\0')
-+       /* This is a `multi-level' args doc; advance to the correct position
-+          as determined by our state in LEVELS, and update LEVELS.  */
-+       {
-+         int i;
-+         multiple = 1;
-+         for (i = 0; i < *our_level; i++)
-+           cp = nl + 1, nl = strchrnul (cp, '\n');
-+         (*levels)++;
-+       }
-+
-+      /* Manually do line wrapping so that it (probably) won't get wrapped at
-+        any embedded spaces.  */
-+      space (stream, 1 + nl - cp);
-+
-+      __argp_fmtstream_write (stream, cp, nl - cp);
-+    }
-+  if (fdoc && fdoc != tdoc)
-+    free ((char *)fdoc);       /* Free user's modified doc string.  */
-+
-+  if (child)
-+    while (child->argp)
-+      advance = !argp_args_usage ((child++)->argp, state, levels, advance, stream);
-+
-+  if (advance && multiple)
-+    {
-+      /* Need to increment our level.  */
-+      if (*nl)
-+       /* There's more we can do here.  */
-+       {
-+         (*our_level)++;
-+         advance = 0;          /* Our parent shouldn't advance also. */
-+       }
-+      else if (*our_level > 0)
-+       /* We had multiple levels, but used them up; reset to zero.  */
-+       *our_level = 0;
-+    }
-+
-+  return !advance;
-+}
-+
-+/* Print the documentation for ARGP to STREAM; if POST is false, then
-+   everything preceeding a `\v' character in the documentation strings (or
-+   the whole string, for those with none) is printed, otherwise, everything
-+   following the `\v' character (nothing for strings without).  Each separate
-+   bit of documentation is separated a blank line, and if PRE_BLANK is true,
-+   then the first is as well.  If FIRST_ONLY is true, only the first
-+   occurrence is output.  Returns true if anything was output.  */
-+static int
-+argp_doc (const struct argp *argp, const struct argp_state *state,
-+         int post, int pre_blank, int first_only,
-+         argp_fmtstream_t stream)
-+{
-+  const char *text;
-+  const char *inp_text;
-+  void *input = 0;
-+  int anything = 0;
-+  size_t inp_text_limit = 0;
-+  const char *doc = dgettext (argp->argp_domain, argp->doc);
-+  const struct argp_child *child = argp->children;
-+
-+  if (doc)
-+    {
-+      char *vt = strchr (doc, '\v');
-+      inp_text = post ? (vt ? vt + 1 : 0) : doc;
-+      inp_text_limit = (!post && vt) ? (vt - doc) : 0;
-+    }
-+  else
-+    inp_text = 0;
-+
-+  if (argp->help_filter)
-+    /* We have to filter the doc strings.  */
-+    {
-+      if (inp_text_limit)
-+       /* Copy INP_TEXT so that it's nul-terminated.  */
-+       inp_text = strndup (inp_text, inp_text_limit);
-+      input = __argp_input (argp, state);
-+      text =
-+       (*argp->help_filter) (post
-+                             ? ARGP_KEY_HELP_POST_DOC
-+                             : ARGP_KEY_HELP_PRE_DOC,
-+                             inp_text, input);
-+    }
-+  else
-+    text = (const char *) inp_text;
-+
-+  if (text)
-+    {
-+      if (pre_blank)
-+       __argp_fmtstream_putc (stream, '\n');
-+
-+      if (text == inp_text && inp_text_limit)
-+       __argp_fmtstream_write (stream, inp_text, inp_text_limit);
-+      else
-+       __argp_fmtstream_puts (stream, text);
-+
-+      if (__argp_fmtstream_point (stream) > __argp_fmtstream_lmargin (stream))
-+       __argp_fmtstream_putc (stream, '\n');
-+
-+      anything = 1;
-+    }
-+
-+  if (text && text != inp_text)
-+    free ((char *) text);      /* Free TEXT returned from the help filter.  */
-+  if (inp_text && inp_text_limit && argp->help_filter)
-+    free ((char *) inp_text);  /* We copied INP_TEXT, so free it now.  */
-+
-+  if (post && argp->help_filter)
-+    /* Now see if we have to output a ARGP_KEY_HELP_EXTRA text.  */
-+    {
-+      text = (*argp->help_filter) (ARGP_KEY_HELP_EXTRA, 0, input);
-+      if (text)
-+       {
-+         if (anything || pre_blank)
-+           __argp_fmtstream_putc (stream, '\n');
-+         __argp_fmtstream_puts (stream, text);
-+         free ((char *) text);
-+         if (__argp_fmtstream_point (stream)
-+             > __argp_fmtstream_lmargin (stream))
-+           __argp_fmtstream_putc (stream, '\n');
-+         anything = 1;
-+       }
-+    }
-+
-+  if (child)
-+    while (child->argp && !(first_only && anything))
-+      anything |=
-+       argp_doc ((child++)->argp, state,
-+                 post, anything || pre_blank, first_only,
-+                 stream);
-+
-+  return anything;
-+}
-+
-+/* Output a usage message for ARGP to STREAM.  If called from
-+   argp_state_help, STATE is the relevent parsing state.  FLAGS are from the
-+   set ARGP_HELP_*.  NAME is what to use wherever a `program name' is
-+   needed. */
-+static void
-+_help (const struct argp *argp, const struct argp_state *state, FILE *stream,
-+       unsigned flags, char *name)
-+{
-+  int anything = 0;            /* Whether we've output anything.  */
-+  struct hol *hol = 0;
-+  argp_fmtstream_t fs;
-+
-+  if (! stream)
-+    return;
-+
-+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
-+  flockfile (stream);
-+#endif
-+
-+  fill_in_uparams (state);
-+
-+  fs = __argp_make_fmtstream (stream, 0, uparams.rmargin, 0);
-+  if (! fs)
-+    {
-+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
-+      funlockfile (stream);
-+#endif
-+      return;
-+    }
-+
-+  if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG))
-+    {
-+      hol = argp_hol (argp, 0);
-+
-+      /* If present, these options always come last.  */
-+      hol_set_group (hol, "help", -1);
-+      hol_set_group (hol, "version", -1);
-+
-+      hol_sort (hol);
-+    }
-+
-+  if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE))
-+    /* Print a short `Usage:' message.  */
-+    {
-+      int first_pattern = 1, more_patterns;
-+      size_t num_pattern_levels = argp_args_levels (argp);
-+      char *pattern_levels = alloca (num_pattern_levels);
-+
-+      memset (pattern_levels, 0, num_pattern_levels);
-+
-+      do
-+       {
-+         int old_lm;
-+         int old_wm = __argp_fmtstream_set_wmargin (fs, uparams.usage_indent);
-+         char *levels = pattern_levels;
-+
-+         if (first_pattern)
-+           __argp_fmtstream_printf (fs, "%s %s",
-+                                    dgettext (argp->argp_domain, "Usage:"),
-+                                    name);
-+         else
-+           __argp_fmtstream_printf (fs, "%s %s",
-+                                    dgettext (argp->argp_domain, "  or: "),
-+                                    name);
-+
-+         /* We set the lmargin as well as the wmargin, because hol_usage
-+            manually wraps options with newline to avoid annoying breaks.  */
-+         old_lm = __argp_fmtstream_set_lmargin (fs, uparams.usage_indent);
-+
-+         if (flags & ARGP_HELP_SHORT_USAGE)
-+           /* Just show where the options go.  */
-+           {
-+             if (hol->num_entries > 0)
-+               __argp_fmtstream_puts (fs, dgettext (argp->argp_domain,
-+                                                    " [OPTION...]"));
-+           }
-+         else
-+           /* Actually print the options.  */
-+           {
-+             hol_usage (hol, fs);
-+             flags |= ARGP_HELP_SHORT_USAGE; /* But only do so once.  */
-+           }
-+
-+         more_patterns = argp_args_usage (argp, state, &levels, 1, fs);
-+
-+         __argp_fmtstream_set_wmargin (fs, old_wm);
-+         __argp_fmtstream_set_lmargin (fs, old_lm);
-+
-+         __argp_fmtstream_putc (fs, '\n');
-+         anything = 1;
-+
-+         first_pattern = 0;
-+       }
-+      while (more_patterns);
-+    }
-+
-+  if (flags & ARGP_HELP_PRE_DOC)
-+    anything |= argp_doc (argp, state, 0, 0, 1, fs);
-+
-+  if (flags & ARGP_HELP_SEE)
-+    {
-+      __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "\
-+Try `%s --help' or `%s --usage' for more information.\n"),
-+                              name, name);
-+      anything = 1;
-+    }
-+
-+  if (flags & ARGP_HELP_LONG)
-+    /* Print a long, detailed help message.  */
-+    {
-+      /* Print info about all the options.  */
-+      if (hol->num_entries > 0)
-+       {
-+         if (anything)
-+           __argp_fmtstream_putc (fs, '\n');
-+         hol_help (hol, state, fs);
-+         anything = 1;
-+       }
-+    }
-+
-+  if (flags & ARGP_HELP_POST_DOC)
-+    /* Print any documentation strings at the end.  */
-+    anything |= argp_doc (argp, state, 1, anything, 0, fs);
-+
-+  if ((flags & ARGP_HELP_BUG_ADDR) && argp_program_bug_address)
-+    {
-+      if (anything)
-+       __argp_fmtstream_putc (fs, '\n');
-+      __argp_fmtstream_printf (fs, dgettext (argp->argp_domain,
-+                                            "Report bugs to %s.\n"),
-+                              argp_program_bug_address);
-+      anything = 1;
-+    }
-+
-+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
-+  funlockfile (stream);
-+#endif
-+
-+  if (hol)
-+    hol_free (hol);
-+
-+  __argp_fmtstream_free (fs);
-+}
-+
-+/* Output a usage message for ARGP to STREAM.  FLAGS are from the set
-+   ARGP_HELP_*.  NAME is what to use wherever a `program name' is needed. */
-+void argp_help (const struct argp *argp, FILE *stream,
-+                 unsigned flags, char *name)
-+{
-+  _help (argp, 0, stream, flags, name);
-+}
-+
-+char *
-+__argp_short_program_name (void)
-+{
-+# ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
-+/*
-+ * uClibc provides both program_invocation_name and
-+ * program_invocation_short_name
-+ */
-+ return (char *) program_invocation_short_name;
-+# else
-+  /* FIXME: What now? Miles suggests that it is better to use NULL,
-+     but currently the value is passed on directly to fputs_unlocked,
-+     so that requires more changes. */
-+# if __GNUC__
-+#  warning No reasonable value to return
-+# endif /* __GNUC__ */
-+  return "";
-+# endif
-+}
-+
-+/* Output, if appropriate, a usage message for STATE to STREAM.  FLAGS are
-+   from the set ARGP_HELP_*.  */
-+void
-+argp_state_help (const struct argp_state *state, FILE *stream, unsigned flags)
-+{
-+  if ((!state || ! (state->flags & ARGP_NO_ERRS)) && stream)
-+    {
-+      if (state && (state->flags & ARGP_LONG_ONLY))
-+       flags |= ARGP_HELP_LONG_ONLY;
-+
-+      _help (state ? state->root_argp : 0, state, stream, flags,
-+            state ? state->name : __argp_short_program_name ());
-+
-+      if (!state || ! (state->flags & ARGP_NO_EXIT))
-+       {
-+         if (flags & ARGP_HELP_EXIT_ERR)
-+           exit (argp_err_exit_status);
-+         if (flags & ARGP_HELP_EXIT_OK)
-+           exit (0);
-+       }
-+  }
-+}
-+
-+/* If appropriate, print the printf string FMT and following args, preceded
-+   by the program name and `:', to stderr, and followed by a `Try ... --help'
-+   message, then exit (1).  */
-+void
-+argp_error (const struct argp_state *state, const char *fmt, ...)
-+{
-+  if (!state || !(state->flags & ARGP_NO_ERRS))
-+    {
-+      FILE *stream = state ? state->err_stream : stderr;
-+
-+      if (stream)
-+       {
-+         va_list ap;
-+
-+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
-+         flockfile (stream);
-+#endif
-+
-+         va_start (ap, fmt);
-+
-+#if defined _LIBC && defined USE_IN_LIBIO
-+         char *buf;
-+
-+         if (_IO_vasprintf (&buf, fmt, ap) < 0)
-+           buf = NULL;
-+
-+         __fxprintf (stream, "%s: %s\n",
-+                     state ? state->name : __argp_short_program_name (), buf);
-+
-+         free (buf);
-+#else
-+         fputs_unlocked (state ? state->name : __argp_short_program_name (),
-+                         stream);
-+         putc_unlocked (':', stream);
-+         putc_unlocked (' ', stream);
-+
-+         vfprintf (stream, fmt, ap);
-+
-+         putc_unlocked ('\n', stream);
-+#endif
-+
-+         argp_state_help (state, stream, ARGP_HELP_STD_ERR);
-+
-+         va_end (ap);
-+
-+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
-+         funlockfile (stream);
-+#endif
-+       }
-+    }
-+}
-+
-+/* Similar to the standard gnu error-reporting function error(), but will
-+   respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
-+   to STATE->err_stream.  This is useful for argument parsing code that is
-+   shared between program startup (when exiting is desired) and runtime
-+   option parsing (when typically an error code is returned instead).  The
-+   difference between this function and argp_error is that the latter is for
-+   *parsing errors*, and the former is for other problems that occur during
-+   parsing but don't reflect a (syntactic) problem with the input.  */
-+void
-+argp_failure (const struct argp_state *state, int status, int errnum,
-+               const char *fmt, ...)
-+{
-+  if (!state || !(state->flags & ARGP_NO_ERRS))
-+    {
-+      FILE *stream = state ? state->err_stream : stderr;
-+
-+      if (stream)
-+       {
-+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
-+         flockfile (stream);
-+#endif
-+
-+#if defined _LIBC && defined USE_IN_LIBIO
-+         __fxprintf (stream, "%s",
-+                     state ? state->name : __argp_short_program_name ());
-+#else
-+         fputs_unlocked (state ? state->name : __argp_short_program_name (),
-+                         stream);
-+#endif
-+
-+         if (fmt)
-+           {
-+             va_list ap;
-+
-+             va_start (ap, fmt);
-+#if defined _LIBC && defined USE_IN_LIBIO
-+             char *buf;
-+
-+             if (_IO_vasprintf (&buf, fmt, ap) < 0)
-+               buf = NULL;
-+
-+             __fxprintf (stream, ": %s", buf);
-+
-+             free (buf);
-+#else
-+             putc_unlocked (':', stream);
-+             putc_unlocked (' ', stream);
-+
-+             vfprintf (stream, fmt, ap);
-+#endif
-+
-+             va_end (ap);
-+           }
-+
-+         if (errnum)
-+           {
-+#if (defined _LIBC && defined USE_IN_LIBIO) || defined HAVE_STRERROR_R
-+             char buf[200];
-+#endif
-+#if defined _LIBC && defined USE_IN_LIBIO
-+             __fxprintf (stream, ": %s",
-+                         strerror_r (errnum, buf, sizeof (buf)));
-+#else
-+             putc_unlocked (':', stream);
-+             putc_unlocked (' ', stream);
-+# ifdef HAVE_STRERROR_R
-+             fputs (strerror_r (errnum, buf, sizeof (buf)), stream);
-+# else
-+             fputs (strerror (errnum), stream);
-+# endif
-+#endif
-+           }
-+
-+#ifdef USE_IN_LIBIO
-+         if (_IO_fwide (stream, 0) > 0)
-+           putwc_unlocked (L'\n', stream);
-+         else
-+#endif
-+           putc_unlocked ('\n', stream);
-+
-+#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
-+         funlockfile (stream);
-+#endif
-+
-+         if (status && (!state || !(state->flags & ARGP_NO_EXIT)))
-+           exit (status);
-+       }
-+    }
-+}
-diff --git a/libuargp/argp-parse.c b/libuargp/argp-parse.c
-new file mode 100644
-index 0000000..86b2b24
---- /dev/null
-+++ b/libuargp/argp-parse.c
-@@ -0,0 +1,949 @@
-+/* Hierarchial argument parsing, layered over getopt
-+   Copyright (C) 1995-2000, 2002, 2003, 2004 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.
-+
-+   Modified for uClibc by: Salvatore Cro <salvatore.cro at st.com>
-+*/
-+
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
-+/* AIX requires this to be the first thing in the file.  */
-+#ifndef __GNUC__
-+# if HAVE_ALLOCA_H || defined _LIBC
-+#  include <alloca.h>
-+# else
-+#  ifdef _AIX
-+#pragma alloca
-+#  else
-+#   ifndef alloca /* predefined by HP cc +Olibcalls */
-+char *alloca ();
-+#   endif
-+#  endif
-+# endif
-+#endif
-+
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <limits.h>
-+#include <getopt.h>
-+#include <bits/getopt_int.h>
-+
-+#include <features.h>
-+#ifndef _
-+/* This is for other GNU distributions with internationalized messages.
-+   When compiling libc, the _ macro is predefined.  */
-+# if (defined HAVE_LIBINTL_H || defined _LIBC) && defined __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#  include <libintl.h>
-+#  ifdef _LIBC
-+#   undef dgettext
-+#   define dgettext(domain, msgid) \
-+  INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES)
-+#  endif
-+# else
-+#  define dgettext(domain, msgid) (msgid)
-+#  define gettext(msgid) (msgid)
-+# endif
-+#endif
-+#ifndef N_
-+# define N_(msgid) (msgid)
-+#endif
-+
-+#include <argp.h>
-+
-+/* Getopt return values.  */
-+#define KEY_END (-1)           /* The end of the options.  */
-+#define KEY_ARG 1              /* A non-option argument.  */
-+#define KEY_ERR '?'            /* An error parsing the options.  */
-+
-+/* The meta-argument used to prevent any further arguments being interpreted
-+   as options.  */
-+#define QUOTE "--"
-+
-+/* The number of bits we steal in a long-option value for our own use.  */
-+#define GROUP_BITS CHAR_BIT
-+
-+/* The number of bits available for the user value.  */
-+#define USER_BITS ((sizeof ((struct option *)0)->val * CHAR_BIT) - GROUP_BITS)
-+#define USER_MASK ((1 << USER_BITS) - 1)
-+
-+/* EZ alias for ARGP_ERR_UNKNOWN.  */
-+#define EBADKEY ARGP_ERR_UNKNOWN
-+
-+/* Default options.  */
-+
-+/* When argp is given the --HANG switch, _ARGP_HANG is set and argp will sleep
-+   for one second intervals, decrementing _ARGP_HANG until it's zero.  Thus
-+   you can force the program to continue by attaching a debugger and setting
-+   it to 0 yourself.  */
-+static volatile int _argp_hang;
-+
-+#define OPT_PROGNAME   -2
-+#define OPT_USAGE      -3
-+#define OPT_HANG       -4
-+
-+static const struct argp_option argp_default_options[] =
-+{
-+  {"help",       '?',          0, 0,  N_("Give this help list"), -1},
-+  {"usage",      OPT_USAGE,    0, 0,  N_("Give a short usage message")},
-+  {"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN, N_("Set the program name")},
-+  {"HANG",       OPT_HANG,    "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
-+     N_("Hang for SECS seconds (default 3600)")},
-+  {0, 0}
-+};
-+
-+static error_t
-+argp_default_parser (int key, char *arg, struct argp_state *state)
-+{
-+  switch (key)
-+    {
-+    case '?':
-+      argp_state_help (state, state->out_stream, ARGP_HELP_STD_HELP);
-+      break;
-+    case OPT_USAGE:
-+      argp_state_help (state, state->out_stream,
-+                      ARGP_HELP_USAGE | ARGP_HELP_EXIT_OK);
-+      break;
-+
-+    case OPT_PROGNAME:         /* Set the program name.  */
-+#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_NAME
-+      program_invocation_name = arg;
-+#endif
-+      /* [Note that some systems only have PROGRAM_INVOCATION_SHORT_NAME (aka
-+        __PROGNAME), in which case, PROGRAM_INVOCATION_NAME is just defined
-+        to be that, so we have to be a bit careful here.]  */
-+
-+      /* Update what we use for messages.  */
-+      state->name = strrchr (arg, '/');
-+      if (state->name)
-+       state->name++;
-+      else
-+       state->name = arg;
-+
-+#if defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
-+      program_invocation_short_name = state->name;
-+#endif
-+
-+      if ((state->flags & (ARGP_PARSE_ARGV0 | ARGP_NO_ERRS))
-+         == ARGP_PARSE_ARGV0)
-+       /* Update what getopt uses too.  */
-+       state->argv[0] = arg;
-+
-+      break;
-+
-+    case OPT_HANG:
-+      _argp_hang = atoi (arg ? arg : "3600");
-+      while (_argp_hang-- > 0)
-+       sleep (1);
-+      break;
-+
-+    default:
-+      return EBADKEY;
-+    }
-+  return 0;
-+}
-+
-+static const struct argp argp_default_argp =
-+  {argp_default_options, &argp_default_parser, NULL, NULL, NULL, NULL, "libc"};
-+
-+
-+static const struct argp_option argp_version_options[] =
-+{
-+  {"version",    'V',          0, 0,  N_("Print program version"), -1},
-+  {0, 0}
-+};
-+
-+static error_t
-+argp_version_parser (int key, char *arg, struct argp_state *state)
-+{
-+  switch (key)
-+    {
-+    case 'V':
-+      if (argp_program_version_hook)
-+       (*argp_program_version_hook) (state->out_stream, state);
-+      else if (argp_program_version)
-+       fprintf (state->out_stream, "%s\n", argp_program_version);
-+      else
-+       argp_error (state, dgettext (state->root_argp->argp_domain,
-+                                      "(PROGRAM ERROR) No version known!?"));
-+      if (! (state->flags & ARGP_NO_EXIT))
-+       exit (0);
-+      break;
-+    default:
-+      return EBADKEY;
-+    }
-+  return 0;
-+}
-+
-+static const struct argp argp_version_argp =
-+  {argp_version_options, &argp_version_parser, NULL, NULL, NULL, NULL, "libc"};
-+
-+/* Returns the offset into the getopt long options array LONG_OPTIONS of a
-+   long option with called NAME, or -1 if none is found.  Passing NULL as
-+   NAME will return the number of options.  */
-+static int
-+find_long_option (struct option *long_options, const char *name)
-+{
-+  struct option *l = long_options;
-+  while (l->name != NULL)
-+    if (name != NULL && strcmp (l->name, name) == 0)
-+      return l - long_options;
-+    else
-+      l++;
-+  if (name == NULL)
-+    return l - long_options;
-+  else
-+    return -1;
-+}
-+
-+
-+/* The state of a `group' during parsing.  Each group corresponds to a
-+   particular argp structure from the tree of such descending from the top
-+   level argp passed to argp_parse.  */
-+struct group
-+{
-+  /* This group's parsing function.  */
-+  argp_parser_t parser;
-+
-+  /* Which argp this group is from.  */
-+  const struct argp *argp;
-+
-+  /* Points to the point in SHORT_OPTS corresponding to the end of the short
-+     options for this group.  We use it to determine from which group a
-+     particular short options is from.  */
-+  char *short_end;
-+
-+  /* The number of non-option args sucessfully handled by this parser.  */
-+  unsigned args_processed;
-+
-+  /* This group's parser's parent's group.  */
-+  struct group *parent;
-+  unsigned parent_index;       /* And the our position in the parent.   */
-+
-+  /* These fields are swapped into and out of the state structure when
-+     calling this group's parser.  */
-+  void *input, **child_inputs;
-+  void *hook;
-+};
-+
-+/* Call GROUP's parser with KEY and ARG, swapping any group-specific info
-+   from STATE before calling, and back into state afterwards.  If GROUP has
-+   no parser, EBADKEY is returned.  */
-+static error_t
-+group_parse (struct group *group, struct argp_state *state, int key, char *arg)
-+{
-+  if (group->parser)
-+    {
-+      error_t err;
-+      state->hook = group->hook;
-+      state->input = group->input;
-+      state->child_inputs = group->child_inputs;
-+      state->arg_num = group->args_processed;
-+      err = (*group->parser)(key, arg, state);
-+      group->hook = state->hook;
-+      return err;
-+    }
-+  else
-+    return EBADKEY;
-+}
-+
-+struct parser
-+{
-+  const struct argp *argp;
-+
-+  /* SHORT_OPTS is the getopt short options string for the union of all the
-+     groups of options.  */
-+  char *short_opts;
-+  /* LONG_OPTS is the array of getop long option structures for the union of
-+     all the groups of options.  */
-+  struct option *long_opts;
-+  /* OPT_DATA is the getopt data used for the re-entrant getopt.  */
-+  struct _getopt_data opt_data;
-+
-+  /* States of the various parsing groups.  */
-+  struct group *groups;
-+  /* The end of the GROUPS array.  */
-+  struct group *egroup;
-+  /* An vector containing storage for the CHILD_INPUTS field in all groups.  */
-+  void **child_inputs;
-+
-+  /* True if we think using getopt is still useful; if false, then
-+     remaining arguments are just passed verbatim with ARGP_KEY_ARG.  This is
-+     cleared whenever getopt returns KEY_END, but may be set again if the user
-+     moves the next argument pointer backwards.  */
-+  int try_getopt;
-+
-+  /* State block supplied to parsing routines.  */
-+  struct argp_state state;
-+
-+  /* Memory used by this parser.  */
-+  void *storage;
-+};
-+
-+/* The next usable entries in the various parser tables being filled in by
-+   convert_options.  */
-+struct parser_convert_state
-+{
-+  struct parser *parser;
-+  char *short_end;
-+  struct option *long_end;
-+  void **child_inputs_end;
-+};
-+
-+/* Converts all options in ARGP (which is put in GROUP) and ancestors
-+   into getopt options stored in SHORT_OPTS and LONG_OPTS; SHORT_END and
-+   CVT->LONG_END are the points at which new options are added.  Returns the
-+   next unused group entry.  CVT holds state used during the conversion.  */
-+static struct group *
-+convert_options (const struct argp *argp,
-+                struct group *parent, unsigned parent_index,
-+                struct group *group, struct parser_convert_state *cvt)
-+{
-+  /* REAL is the most recent non-alias value of OPT.  */
-+  const struct argp_option *real = argp->options;
-+  const struct argp_child *children = argp->children;
-+
-+  if (real || argp->parser)
-+    {
-+      const struct argp_option *opt;
-+
-+      if (real)
-+       for (opt = real; !__option_is_end (opt); opt++)
-+         {
-+           if (! (opt->flags & OPTION_ALIAS))
-+             /* OPT isn't an alias, so we can use values from it.  */
-+             real = opt;
-+
-+           if (! (real->flags & OPTION_DOC))
-+             /* A real option (not just documentation).  */
-+             {
-+               if (__option_is_short (opt))
-+                 /* OPT can be used as a short option.  */
-+                 {
-+                   *cvt->short_end++ = opt->key;
-+                   if (real->arg)
-+                     {
-+                       *cvt->short_end++ = ':';
-+                       if (real->flags & OPTION_ARG_OPTIONAL)
-+                         *cvt->short_end++ = ':';
-+                     }
-+                   *cvt->short_end = '\0'; /* keep 0 terminated */
-+                 }
-+
-+               if (opt->name
-+                   && find_long_option (cvt->parser->long_opts, opt->name) < 0)
-+                 /* OPT can be used as a long option.  */
-+                 {
-+                   cvt->long_end->name = opt->name;
-+                   cvt->long_end->has_arg =
-+                     (real->arg
-+                      ? (real->flags & OPTION_ARG_OPTIONAL
-+                         ? optional_argument
-+                         : required_argument)
-+                      : no_argument);
-+                   cvt->long_end->flag = 0;
-+                   /* we add a disambiguating code to all the user's
-+                      values (which is removed before we actually call
-+                      the function to parse the value); this means that
-+                      the user loses use of the high 8 bits in all his
-+                      values (the sign of the lower bits is preserved
-+                      however)...  */
-+                   cvt->long_end->val =
-+                     ((opt->key | real->key) & USER_MASK)
-+                     + (((group - cvt->parser->groups) + 1) << USER_BITS);
-+
-+                   /* Keep the LONG_OPTS list terminated.  */
-+                   (++cvt->long_end)->name = NULL;
-+                 }
-+             }
-+           }
-+
-+      group->parser = argp->parser;
-+      group->argp = argp;
-+      group->short_end = cvt->short_end;
-+      group->args_processed = 0;
-+      group->parent = parent;
-+      group->parent_index = parent_index;
-+      group->input = 0;
-+      group->hook = 0;
-+      group->child_inputs = 0;
-+
-+      if (children)
-+       /* Assign GROUP's CHILD_INPUTS field some space from
-+           CVT->child_inputs_end.*/
-+       {
-+         unsigned num_children = 0;
-+         while (children[num_children].argp)
-+           num_children++;
-+         group->child_inputs = cvt->child_inputs_end;
-+         cvt->child_inputs_end += num_children;
-+       }
-+
-+      parent = group++;
-+    }
-+  else
-+    parent = 0;
-+
-+  if (children)
-+    {
-+      unsigned index = 0;
-+      while (children->argp)
-+       group =
-+         convert_options (children++->argp, parent, index++, group, cvt);
-+    }
-+
-+  return group;
-+}
-+
-+/* Find the merged set of getopt options, with keys appropiately prefixed. */
-+static void
-+parser_convert (struct parser *parser, const struct argp *argp, int flags)
-+{
-+  struct parser_convert_state cvt;
-+
-+  cvt.parser = parser;
-+  cvt.short_end = parser->short_opts;
-+  cvt.long_end = parser->long_opts;
-+  cvt.child_inputs_end = parser->child_inputs;
-+
-+  if (flags & ARGP_IN_ORDER)
-+    *cvt.short_end++ = '-';
-+  else if (flags & ARGP_NO_ARGS)
-+    *cvt.short_end++ = '+';
-+  *cvt.short_end = '\0';
-+
-+  cvt.long_end->name = NULL;
-+
-+  parser->argp = argp;
-+
-+  if (argp)
-+    parser->egroup = convert_options (argp, 0, 0, parser->groups, &cvt);
-+  else
-+    parser->egroup = parser->groups; /* No parsers at all! */
-+}
-+
-+/* Lengths of various parser fields which we will allocated.  */
-+struct parser_sizes
-+{
-+  size_t short_len;            /* Getopt short options string.  */
-+  size_t long_len;             /* Getopt long options vector.  */
-+  size_t num_groups;           /* Group structures we allocate.  */
-+  size_t num_child_inputs;     /* Child input slots.  */
-+};
-+
-+/* For ARGP, increments the NUM_GROUPS field in SZS by the total number of
-+ argp structures descended from it, and the SHORT_LEN & LONG_LEN fields by
-+ the maximum lengths of the resulting merged getopt short options string and
-+ long-options array, respectively.  */
-+static void
-+calc_sizes (const struct argp *argp,  struct parser_sizes *szs)
-+{
-+  const struct argp_child *child = argp->children;
-+  const struct argp_option *opt = argp->options;
-+
-+  if (opt || argp->parser)
-+    {
-+      szs->num_groups++;
-+      if (opt)
-+       {
-+         int num_opts = 0;
-+         while (!__option_is_end (opt++))
-+           num_opts++;
-+         szs->short_len += num_opts * 3; /* opt + up to 2 `:'s */
-+         szs->long_len += num_opts;
-+       }
-+    }
-+
-+  if (child)
-+    while (child->argp)
-+      {
-+       calc_sizes ((child++)->argp, szs);
-+       szs->num_child_inputs++;
-+      }
-+}
-+
-+
-+extern char * __argp_short_program_name (void);
-+/* Initializes PARSER to parse ARGP in a manner described by FLAGS.  */
-+static error_t
-+parser_init (struct parser *parser, const struct argp *argp,
-+            int argc, char **argv, int flags, void *input)
-+{
-+  error_t err = 0;
-+  struct group *group;
-+  struct parser_sizes szs;
-+  struct _getopt_data opt_data = _GETOPT_DATA_INITIALIZER;
-+
-+  szs.short_len = (flags & ARGP_NO_ARGS) ? 0 : 1;
-+  szs.long_len = 0;
-+  szs.num_groups = 0;
-+  szs.num_child_inputs = 0;
-+
-+  if (argp)
-+    calc_sizes (argp, &szs);
-+
-+  /* Lengths of the various bits of storage used by PARSER.  */
-+#define GLEN (szs.num_groups + 1) * sizeof (struct group)
-+#define CLEN (szs.num_child_inputs * sizeof (void *))
-+#define LLEN ((szs.long_len + 1) * sizeof (struct option))
-+#define SLEN (szs.short_len + 1)
-+
-+  parser->storage = malloc (GLEN + CLEN + LLEN + SLEN);
-+  if (! parser->storage)
-+    return ENOMEM;
-+
-+  parser->groups = parser->storage;
-+  parser->child_inputs = parser->storage + GLEN;
-+  parser->long_opts = parser->storage + GLEN + CLEN;
-+  parser->short_opts = parser->storage + GLEN + CLEN + LLEN;
-+  parser->opt_data = opt_data;
-+
-+  memset (parser->child_inputs, 0, szs.num_child_inputs * sizeof (void *));
-+  parser_convert (parser, argp, flags);
-+
-+  memset (&parser->state, 0, sizeof (struct argp_state));
-+  parser->state.root_argp = parser->argp;
-+  parser->state.argc = argc;
-+  parser->state.argv = argv;
-+  parser->state.flags = flags;
-+  parser->state.err_stream = stderr;
-+  parser->state.out_stream = stdout;
-+  parser->state.next = 0;      /* Tell getopt to initialize.  */
-+  parser->state.pstate = parser;
-+
-+  parser->try_getopt = 1;
-+
-+  /* Call each parser for the first time, giving it a chance to propagate
-+     values to child parsers.  */
-+  if (parser->groups < parser->egroup)
-+    parser->groups->input = input;
-+  for (group = parser->groups;
-+       group < parser->egroup && (!err || err == EBADKEY);
-+       group++)
-+    {
-+      if (group->parent)
-+       /* If a child parser, get the initial input value from the parent. */
-+       group->input = group->parent->child_inputs[group->parent_index];
-+
-+      if (!group->parser
-+         && group->argp->children && group->argp->children->argp)
-+       /* For the special case where no parsing function is supplied for an
-+          argp, propagate its input to its first child, if any (this just
-+          makes very simple wrapper argps more convenient).  */
-+       group->child_inputs[0] = group->input;
-+
-+      err = group_parse (group, &parser->state, ARGP_KEY_INIT, 0);
-+    }
-+  if (err == EBADKEY)
-+    err = 0;                   /* Some parser didn't understand.  */
-+
-+  if (err)
-+    return err;
-+
-+  if (parser->state.flags & ARGP_NO_ERRS)
-+    {
-+      parser->opt_data.opterr = 0;
-+      if (parser->state.flags & ARGP_PARSE_ARGV0)
-+       /* getopt always skips ARGV[0], so we have to fake it out.  As long
-+          as OPTERR is 0, then it shouldn't actually try to access it.  */
-+       parser->state.argv--, parser->state.argc++;
-+    }
-+  else
-+    parser->opt_data.opterr = 1;       /* Print error messages.  */
-+
-+  if (parser->state.argv == argv && argv[0])
-+    /* There's an argv[0]; use it for messages.  */
-+    {
-+      char *short_name = strrchr (argv[0], '/');
-+      parser->state.name = short_name ? short_name + 1 : argv[0];
-+    }
-+  else
-+    parser->state.name = __argp_short_program_name ();
-+
-+  return 0;
-+}
-+
-+/* Free any storage consumed by PARSER (but not PARSER itself).  */
-+static error_t
-+parser_finalize (struct parser *parser,
-+                error_t err, int arg_ebadkey, int *end_index)
-+{
-+  struct group *group;
-+
-+  if (err == EBADKEY && arg_ebadkey)
-+    /* Suppress errors generated by unparsed arguments.  */
-+    err = 0;
-+
-+  if (! err)
-+    {
-+      if (parser->state.next == parser->state.argc)
-+       /* We successfully parsed all arguments!  Call all the parsers again,
-+          just a few more times... */
-+       {
-+         for (group = parser->groups;
-+              group < parser->egroup && (!err || err==EBADKEY);
-+              group++)
-+           if (group->args_processed == 0)
-+             err = group_parse (group, &parser->state, ARGP_KEY_NO_ARGS, 0);
-+         for (group = parser->egroup - 1;
-+              group >= parser->groups && (!err || err==EBADKEY);
-+              group--)
-+           err = group_parse (group, &parser->state, ARGP_KEY_END, 0);
-+
-+         if (err == EBADKEY)
-+           err = 0;            /* Some parser didn't understand.  */
-+
-+         /* Tell the user that all arguments are parsed.  */
-+         if (end_index)
-+           *end_index = parser->state.next;
-+       }
-+      else if (end_index)
-+       /* Return any remaining arguments to the user.  */
-+       *end_index = parser->state.next;
-+      else
-+       /* No way to return the remaining arguments, they must be bogus. */
-+       {
-+         if (!(parser->state.flags & ARGP_NO_ERRS)
-+             && parser->state.err_stream)
-+           fprintf (parser->state.err_stream,
-+                    dgettext (parser->argp->argp_domain,
-+                              "%s: Too many arguments\n"),
-+                    parser->state.name);
-+         err = EBADKEY;
-+       }
-+    }
-+
-+  /* Okay, we're all done, with either an error or success; call the parsers
-+     to indicate which one.  */
-+
-+  if (err)
-+    {
-+      /* Maybe print an error message.  */
-+      if (err == EBADKEY)
-+       /* An appropriate message describing what the error was should have
-+          been printed earlier.  */
-+       argp_state_help (&parser->state, parser->state.err_stream,
-+                          ARGP_HELP_STD_ERR);
-+
-+      /* Since we didn't exit, give each parser an error indication.  */
-+      for (group = parser->groups; group < parser->egroup; group++)
-+       group_parse (group, &parser->state, ARGP_KEY_ERROR, 0);
-+    }
-+  else
-+    /* Notify parsers of success, and propagate back values from parsers.  */
-+    {
-+      /* We pass over the groups in reverse order so that child groups are
-+        given a chance to do there processing before passing back a value to
-+        the parent.  */
-+      for (group = parser->egroup - 1
-+          ; group >= parser->groups && (!err || err == EBADKEY)
-+          ; group--)
-+       err = group_parse (group, &parser->state, ARGP_KEY_SUCCESS, 0);
-+      if (err == EBADKEY)
-+       err = 0;                /* Some parser didn't understand.  */
-+    }
-+
-+  /* Call parsers once more, to do any final cleanup.  Errors are ignored.  */
-+  for (group = parser->egroup - 1; group >= parser->groups; group--)
-+    group_parse (group, &parser->state, ARGP_KEY_FINI, 0);
-+
-+  if (err == EBADKEY)
-+    err = EINVAL;
-+
-+  free (parser->storage);
-+
-+  return err;
-+}
-+
-+/* Call the user parsers to parse the non-option argument VAL, at the current
-+   position, returning any error.  The state NEXT pointer is assumed to have
-+   been adjusted (by getopt) to point after this argument; this function will
-+   adjust it correctly to reflect however many args actually end up being
-+   consumed.  */
-+static error_t
-+parser_parse_arg (struct parser *parser, char *val)
-+{
-+  /* Save the starting value of NEXT, first adjusting it so that the arg
-+     we're parsing is again the front of the arg vector.  */
-+  int index = --parser->state.next;
-+  error_t err = EBADKEY;
-+  struct group *group;
-+  int key = 0;                 /* Which of ARGP_KEY_ARG[S] we used.  */
-+
-+  /* Try to parse the argument in each parser.  */
-+  for (group = parser->groups
-+       ; group < parser->egroup && err == EBADKEY
-+       ; group++)
-+    {
-+      parser->state.next++;    /* For ARGP_KEY_ARG, consume the arg.  */
-+      key = ARGP_KEY_ARG;
-+      err = group_parse (group, &parser->state, key, val);
-+
-+      if (err == EBADKEY)
-+       /* This parser doesn't like ARGP_KEY_ARG; try ARGP_KEY_ARGS instead. */
-+       {
-+         parser->state.next--; /* For ARGP_KEY_ARGS, put back the arg.  */
-+         key = ARGP_KEY_ARGS;
-+         err = group_parse (group, &parser->state, key, 0);
-+       }
-+    }
-+
-+  if (! err)
-+    {
-+      if (key == ARGP_KEY_ARGS)
-+       /* The default for ARGP_KEY_ARGS is to assume that if NEXT isn't
-+          changed by the user, *all* arguments should be considered
-+          consumed.  */
-+       parser->state.next = parser->state.argc;
-+
-+      if (parser->state.next > index)
-+       /* Remember that we successfully processed a non-option
-+          argument -- but only if the user hasn't gotten tricky and set
-+          the clock back.  */
-+       (--group)->args_processed += (parser->state.next - index);
-+      else
-+       /* The user wants to reparse some args, give getopt another try.  */
-+       parser->try_getopt = 1;
-+    }
-+
-+  return err;
-+}
-+
-+/* Call the user parsers to parse the option OPT, with argument VAL, at the
-+   current position, returning any error.  */
-+static error_t
-+parser_parse_opt (struct parser *parser, int opt, char *val)
-+{
-+  /* The group key encoded in the high bits; 0 for short opts or
-+     group_number + 1 for long opts.  */
-+  int group_key = opt >> USER_BITS;
-+  error_t err = EBADKEY;
-+
-+  if (group_key == 0)
-+    /* A short option.  By comparing OPT's position in SHORT_OPTS to the
-+       various starting positions in each group's SHORT_END field, we can
-+       determine which group OPT came from.  */
-+    {
-+      struct group *group;
-+      char *short_index = strchr (parser->short_opts, opt);
-+
-+      if (short_index)
-+       for (group = parser->groups; group < parser->egroup; group++)
-+         if (group->short_end > short_index)
-+           {
-+             err = group_parse (group, &parser->state, opt,
-+                                parser->opt_data.optarg);
-+             break;
-+           }
-+    }
-+  else
-+    /* A long option.  We use shifts instead of masking for extracting
-+       the user value in order to preserve the sign.  */
-+    err =
-+      group_parse (&parser->groups[group_key - 1], &parser->state,
-+                  (opt << GROUP_BITS) >> GROUP_BITS,
-+                  parser->opt_data.optarg);
-+
-+  if (err == EBADKEY)
-+    /* At least currently, an option not recognized is an error in the
-+       parser, because we pre-compute which parser is supposed to deal
-+       with each option.  */
-+    {
-+      static const char bad_key_err[] =
-+       N_("(PROGRAM ERROR) Option should have been recognized!?");
-+      if (group_key == 0)
-+       argp_error (&parser->state, "-%c: %s", opt,
-+                     dgettext (parser->argp->argp_domain, bad_key_err));
-+      else
-+       {
-+         struct option *long_opt = parser->long_opts;
-+         while (long_opt->val != opt && long_opt->name)
-+           long_opt++;
-+         argp_error (&parser->state, "--%s: %s",
-+                       long_opt->name ? long_opt->name : "???",
-+                       dgettext (parser->argp->argp_domain, bad_key_err));
-+       }
-+    }
-+
-+  return err;
-+}
-+
-+/* Parse the next argument in PARSER (as indicated by PARSER->state.next).
-+   Any error from the parsers is returned, and *ARGP_EBADKEY indicates
-+   whether a value of EBADKEY is due to an unrecognized argument (which is
-+   generally not fatal).  */
-+static error_t
-+parser_parse_next (struct parser *parser, int *arg_ebadkey)
-+{
-+  int opt;
-+  error_t err = 0;
-+
-+  if (parser->state.quoted && parser->state.next < parser->state.quoted)
-+    /* The next argument pointer has been moved to before the quoted
-+       region, so pretend we never saw the quoting `--', and give getopt
-+       another chance.  If the user hasn't removed it, getopt will just
-+       process it again.  */
-+    parser->state.quoted = 0;
-+
-+  if (parser->try_getopt && !parser->state.quoted)
-+    /* Give getopt a chance to parse this.  */
-+    {
-+      /* Put it back in OPTIND for getopt.  */
-+      parser->opt_data.optind = parser->state.next;
-+      /* Distinguish KEY_ERR from a real option.  */
-+      parser->opt_data.optopt = KEY_END;
-+      if (parser->state.flags & ARGP_LONG_ONLY)
-+       opt = _getopt_long_only_r (parser->state.argc, parser->state.argv,
-+                                  parser->short_opts, parser->long_opts, 0,
-+                                  &parser->opt_data);
-+      else
-+       opt = _getopt_long_r (parser->state.argc, parser->state.argv,
-+                             parser->short_opts, parser->long_opts, 0,
-+                             &parser->opt_data);
-+      /* And see what getopt did.  */
-+      parser->state.next = parser->opt_data.optind;
-+
-+      if (opt == KEY_END)
-+       /* Getopt says there are no more options, so stop using
-+          getopt; we'll continue if necessary on our own.  */
-+       {
-+         parser->try_getopt = 0;
-+         if (parser->state.next > 1
-+             && strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
-+                  == 0)
-+           /* Not only is this the end of the options, but it's a
-+              `quoted' region, which may have args that *look* like
-+              options, so we definitely shouldn't try to use getopt past
-+              here, whatever happens.  */
-+           parser->state.quoted = parser->state.next;
-+       }
-+      else if (opt == KEY_ERR && parser->opt_data.optopt != KEY_END)
-+       /* KEY_ERR can have the same value as a valid user short
-+          option, but in the case of a real error, getopt sets OPTOPT
-+          to the offending character, which can never be KEY_END.  */
-+       {
-+         *arg_ebadkey = 0;
-+         return EBADKEY;
-+       }
-+    }
-+  else
-+    opt = KEY_END;
-+
-+  if (opt == KEY_END)
-+    {
-+      /* We're past what getopt considers the options.  */
-+      if (parser->state.next >= parser->state.argc
-+         || (parser->state.flags & ARGP_NO_ARGS))
-+       /* Indicate that we're done.  */
-+       {
-+         *arg_ebadkey = 1;
-+         return EBADKEY;
-+       }
-+      else
-+       /* A non-option arg; simulate what getopt might have done.  */
-+       {
-+         opt = KEY_ARG;
-+         parser->opt_data.optarg = parser->state.argv[parser->state.next++];
-+       }
-+    }
-+
-+  if (opt == KEY_ARG)
-+    /* A non-option argument; try each parser in turn.  */
-+    err = parser_parse_arg (parser, parser->opt_data.optarg);
-+  else
-+    err = parser_parse_opt (parser, opt, parser->opt_data.optarg);
-+
-+  if (err == EBADKEY)
-+    *arg_ebadkey = (opt == KEY_END || opt == KEY_ARG);
-+
-+  return err;
-+}
-+
-+/* Parse the options strings in ARGC & ARGV according to the argp in ARGP.
-+   FLAGS is one of the ARGP_ flags above.  If END_INDEX is non-NULL, the
-+   index in ARGV of the first unparsed option is returned in it.  If an
-+   unknown option is present, EINVAL is returned; if some parser routine
-+   returned a non-zero value, it is returned; otherwise 0 is returned.  */
-+error_t
-+argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
-+             int *end_index, void *input)
-+{
-+  error_t err;
-+  struct parser parser;
-+
-+  /* If true, then err == EBADKEY is a result of a non-option argument failing
-+     to be parsed (which in some cases isn't actually an error).  */
-+  int arg_ebadkey = 0;
-+
-+  if (! (flags & ARGP_NO_HELP))
-+    /* Add our own options.  */
-+    {
-+      struct argp_child *child = alloca (4 * sizeof (struct argp_child));
-+      struct argp *top_argp = alloca (sizeof (struct argp));
-+
-+      /* TOP_ARGP has no options, it just serves to group the user & default
-+        argps.  */
-+      memset (top_argp, 0, sizeof (*top_argp));
-+      top_argp->children = child;
-+
-+      memset (child, 0, 4 * sizeof (struct argp_child));
-+
-+      if (argp)
-+       (child++)->argp = argp;
-+      (child++)->argp = &argp_default_argp;
-+      if (argp_program_version || argp_program_version_hook)
-+       (child++)->argp = &argp_version_argp;
-+      child->argp = 0;
-+
-+      argp = top_argp;
-+    }
-+
-+  /* Construct a parser for these arguments.  */
-+  err = parser_init (&parser, argp, argc, argv, flags, input);
-+
-+  if (! err)
-+    /* Parse! */
-+    {
-+      while (! err)
-+       err = parser_parse_next (&parser, &arg_ebadkey);
-+      err = parser_finalize (&parser, err, arg_ebadkey, end_index);
-+    }
-+
-+  return err;
-+}
-+
-+/* Return the input field for ARGP in the parser corresponding to STATE; used
-+   by the help routines.  */
-+void *
-+__argp_input (const struct argp *argp, const struct argp_state *state)
-+{
-+  if (state)
-+    {
-+      struct group *group;
-+      struct parser *parser = state->pstate;
-+
-+      for (group = parser->groups; group < parser->egroup; group++)
-+       if (group->argp == argp)
-+         return group->input;
-+    }
-+
-+  return 0;
-+}
-diff --git a/libuargp/argp-pv.c b/libuargp/argp-pv.c
-new file mode 100644
-index 0000000..f1227b5
---- /dev/null
-+++ b/libuargp/argp-pv.c
-@@ -0,0 +1,25 @@
-+/* Default definition for ARGP_PROGRAM_VERSION.
-+   Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+/* If set by the user program to a non-zero value, then a default option
-+   --version is added (unless the ARGP_NO_HELP flag is used), which will
-+   print this this string followed by a newline and exit (unless the
-+   ARGP_NO_EXIT flag is used).  Overridden by ARGP_PROGRAM_VERSION_HOOK.  */
-+const char *argp_program_version;
-diff --git a/libuargp/argp-pvh.c b/libuargp/argp-pvh.c
-new file mode 100644
-index 0000000..1f1d962
---- /dev/null
-+++ b/libuargp/argp-pvh.c
-@@ -0,0 +1,32 @@
-+/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
-+   Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
-+#include <argp.h>
-+
-+/* If set by the user program to a non-zero value, then a default option
-+   --version is added (unless the ARGP_NO_HELP flag is used), which calls
-+   this function with a stream to print the version to and a pointer to the
-+   current parsing state, and then exits (unless the ARGP_NO_EXIT flag is
-+   used).  This variable takes precedent over ARGP_PROGRAM_VERSION.  */
-+void (*argp_program_version_hook) (FILE *stream, struct argp_state *state);
-diff --git a/libuargp/argp-xinl.c b/libuargp/argp-xinl.c
-new file mode 100644
-index 0000000..f1d3000
---- /dev/null
-+++ b/libuargp/argp-xinl.c
-@@ -0,0 +1,35 @@
-+/* Real definitions for extern inline functions in argp.h
-+   Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#if defined _LIBC || defined HAVE_FEATURES_H
-+# include <features.h>
-+#endif
-+
-+#ifndef __USE_EXTERN_INLINES
-+# define __USE_EXTERN_INLINES  1
-+#endif
-+#define ARGP_EI
-+#undef __OPTIMIZE__
-+#define __OPTIMIZE__ 1
-+#include <argp.h>
-diff --git a/test/argp/Makefile b/test/argp/Makefile
-new file mode 100644
-index 0000000..616fe71
---- /dev/null
-+++ b/test/argp/Makefile
-@@ -0,0 +1,7 @@
-+# uClibc argp tests
-+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+
-+top_builddir=../../
-+include ../Rules.mak
-+-include Makefile.in
-+include ../Test.mak
-diff --git a/test/argp/Makefile.in b/test/argp/Makefile.in
-new file mode 100644
-index 0000000..d81b359
---- /dev/null
-+++ b/test/argp/Makefile.in
-@@ -0,0 +1,12 @@
-+# uClibc argp tests
-+# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-+
-+TESTS := $(addprefix argp-, ex1 ex2 ex3 ex4 test) \
-+         bug-argp1 tst-argp1 tst-argp2
-+
-+EXTRA_LDFLAGS = -luargp
-+
-+OPTS_argp-ex3 = ARG1 ARG2
-+OPTS_argp-ex4 = ARG1 string1 string2 string3
-+OPTS_bug-argp1 = -- --help
-+
-diff --git a/test/argp/argp-ex1.c b/test/argp/argp-ex1.c
-new file mode 100644
-index 0000000..7bb5f22
---- /dev/null
-+++ b/test/argp/argp-ex1.c
-@@ -0,0 +1,15 @@
-+/* Argp example #1 -- a minimal program using argp */
-+
-+/* This is (probably) the smallest possible program that
-+   uses argp.  It won't do much except give an error
-+   messages and exit when there are any arguments, and print
-+   a (rather pointless) messages for --help.  */
-+
-+#include <stdlib.h>
-+#include <argp.h>
-+
-+int main (int argc, char **argv)
-+{
-+  argp_parse (0, argc, argv, 0, 0, 0);
-+  exit (0);
-+}
-diff --git a/test/argp/argp-ex2.c b/test/argp/argp-ex2.c
-new file mode 100644
-index 0000000..c49fbac
---- /dev/null
-+++ b/test/argp/argp-ex2.c
-@@ -0,0 +1,45 @@
-+/* Argp example #2 -- a pretty minimal program using argp */
-+
-+/* This program doesn't use any options or arguments, but uses
-+   argp to be compliant with the GNU standard command line
-+   format.
-+
-+   In addition to making sure no arguments are given, and
-+   implementing a --help option, this example will have a
-+   --version option, and will put the given documentation string
-+   and bug address in the --help output, as per GNU standards.
-+
-+   The variable ARGP contains the argument parser specification;
-+   adding fields to this structure is the way most parameters are
-+   passed to argp_parse (the first three fields are usually used,
-+   but not in this small program).  There are also two global
-+   variables that argp knows about defined here,
-+   ARGP_PROGRAM_VERSION and ARGP_PROGRAM_BUG_ADDRESS (they are
-+   global variables because they will almost always be constant
-+   for a given program, even if it uses different argument
-+   parsers for various tasks).  */
-+
-+#include <stdlib.h>
-+#include <argp.h>
-+
-+const char *argp_program_version =
-+  "argp-ex2 1.0";
-+const char *argp_program_bug_address =
-+  "<bug-gnu-utils@@gnu.org>";
-+
-+/* Program documentation.  */
-+static char doc[] =
-+  "Argp example #2 -- a pretty minimal program using argp";
-+
-+/* Our argument parser.  The @code{options}, @code{parser}, and
-+   @code{args_doc} fields are zero because we have neither options or
-+   arguments; @code{doc} and @code{argp_program_bug_address} will be
-+   used in the output for @samp{--help}, and the @samp{--version}
-+   option will print out @code{argp_program_version}.  */
-+static struct argp argp = { 0, 0, 0, doc };
-+
-+int main (int argc, char **argv)
-+{
-+  argp_parse (&argp, argc, argv, 0, 0, 0);
-+  exit (0);
-+}
-diff --git a/test/argp/argp-ex3.c b/test/argp/argp-ex3.c
-new file mode 100644
-index 0000000..24d5c50
---- /dev/null
-+++ b/test/argp/argp-ex3.c
-@@ -0,0 +1,153 @@
-+/* Argp example #3 -- a program with options and arguments using argp */
-+
-+/* This program uses the same features as example 2, and uses options and
-+   arguments.
-+
-+   We now use the first four fields in ARGP, so here's a description of them:
-+     OPTIONS  -- A pointer to a vector of struct argp_option (see below)
-+     PARSER   -- A function to parse a single option, called by argp
-+     ARGS_DOC -- A string describing how the non-option arguments should look
-+     DOC      -- A descriptive string about this program; if it contains a
-+                 vertical tab character (\v), the part after it will be
-+                 printed *following* the options
-+
-+   The function PARSER takes the following arguments:
-+     KEY  -- An integer specifying which option this is (taken
-+             from the KEY field in each struct argp_option), or
-+             a special key specifying something else; the only
-+             special keys we use here are ARGP_KEY_ARG, meaning
-+             a non-option argument, and ARGP_KEY_END, meaning
-+             that all arguments have been parsed
-+     ARG  -- For an option KEY, the string value of its
-+             argument, or NULL if it has none
-+     STATE-- A pointer to a struct argp_state, containing
-+             various useful information about the parsing state; used here
-+             are the INPUT field, which reflects the INPUT argument to
-+             argp_parse, and the ARG_NUM field, which is the number of the
-+             current non-option argument being parsed
-+   It should return either 0, meaning success, ARGP_ERR_UNKNOWN, meaning the
-+   given KEY wasn't recognized, or an errno value indicating some other
-+   error.
-+
-+   Note that in this example, main uses a structure to communicate with the
-+   parse_opt function, a pointer to which it passes in the INPUT argument to
-+   argp_parse.  Of course, it's also possible to use global variables
-+   instead, but this is somewhat more flexible.
-+
-+   The OPTIONS field contains a pointer to a vector of struct argp_option's;
-+   that structure has the following fields (if you assign your option
-+   structures using array initialization like this example, unspecified
-+   fields will be defaulted to 0, and need not be specified):
-+     NAME   -- The name of this option's long option (may be zero)
-+     KEY    -- The KEY to pass to the PARSER function when parsing this option,
-+               *and* the name of this option's short option, if it is a
-+               printable ascii character
-+     ARG    -- The name of this option's argument, if any
-+     FLAGS  -- Flags describing this option; some of them are:
-+                 OPTION_ARG_OPTIONAL -- The argument to this option is optional
-+                 OPTION_ALIAS        -- This option is an alias for the
-+                                        previous option
-+                 OPTION_HIDDEN       -- Don't show this option in --help output
-+     DOC    -- A documentation string for this option, shown in --help output
-+
-+   An options vector should be terminated by an option with all fields zero. */
-+
-+#include <stdlib.h>
-+#include <argp.h>
-+
-+const char *argp_program_version =
-+  "argp-ex3 1.0";
-+const char *argp_program_bug_address =
-+  "<bug-gnu-utils@@gnu.org>";
-+
-+/* Program documentation.  */
-+static char doc[] =
-+  "Argp example #3 -- a program with options and arguments using argp";
-+
-+/* A description of the arguments we accept.  */
-+static char args_doc[] = "ARG1 ARG2";
-+
-+/* The options we understand.  */
-+static struct argp_option options[] = {
-+  {"verbose",  'v', 0,      0,  "Produce verbose output" },
-+  {"quiet",    'q', 0,      0,  "Don't produce any output" },
-+  {"silent",   's', 0,      OPTION_ALIAS },
-+  {"output",   'o', "FILE", 0,
-+   "Output to FILE instead of standard output" },
-+  { 0 }
-+};
-+
-+/* Used by @code{main} to communicate with @code{parse_opt}.  */
-+struct arguments
-+{
-+  char *args[2];               /* @var{arg1} & @var{arg2} */
-+  int silent, verbose;
-+  char *output_file;
-+};
-+
-+/* Parse a single option.  */
-+static error_t
-+parse_opt (int key, char *arg, struct argp_state *state)
-+{
-+  /* Get the @var{input} argument from @code{argp_parse}, which we
-+     know is a pointer to our arguments structure.  */
-+  struct arguments *arguments = state->input;
-+
-+  switch (key)
-+    {
-+    case 'q': case 's':
-+      arguments->silent = 1;
-+      break;
-+    case 'v':
-+      arguments->verbose = 1;
-+      break;
-+    case 'o':
-+      arguments->output_file = arg;
-+      break;
-+
-+    case ARGP_KEY_ARG:
-+      if (state->arg_num >= 2)
-+       /* Too many arguments.  */
-+       argp_usage (state);
-+
-+      arguments->args[state->arg_num] = arg;
-+
-+      break;
-+
-+    case ARGP_KEY_END:
-+      if (state->arg_num < 2)
-+       /* Not enough arguments.  */
-+       argp_usage (state);
-+      break;
-+
-+    default:
-+      return ARGP_ERR_UNKNOWN;
-+    }
-+  return 0;
-+}
-+
-+/* Our argp parser.  */
-+static struct argp argp = { options, parse_opt, args_doc, doc };
-+
-+int main (int argc, char **argv)
-+{
-+  struct arguments arguments;
-+
-+  /* Default values.  */
-+  arguments.silent = 0;
-+  arguments.verbose = 0;
-+  arguments.output_file = "-";
-+
-+  /* Parse our arguments; every option seen by @code{parse_opt} will
-+     be reflected in @code{arguments}.  */
-+  argp_parse (&argp, argc, argv, 0, 0, &arguments);
-+
-+  printf ("ARG1 = %s\nARG2 = %s\nOUTPUT_FILE = %s\n"
-+         "VERBOSE = %s\nSILENT = %s\n",
-+         arguments.args[0], arguments.args[1],
-+         arguments.output_file,
-+         arguments.verbose ? "yes" : "no",
-+         arguments.silent ? "yes" : "no");
-+
-+  exit (0);
-+}
-diff --git a/test/argp/argp-ex4.c b/test/argp/argp-ex4.c
-new file mode 100644
-index 0000000..c77c7ef
---- /dev/null
-+++ b/test/argp/argp-ex4.c
-@@ -0,0 +1,167 @@
-+/* Argp example #4 -- a program with somewhat more complicated options */
-+
-+/* This program uses the same features as example 3, but has more
-+   options, and somewhat more structure in the -help output.  It
-+   also shows how you can `steal' the remainder of the input
-+   arguments past a certain point, for programs that accept a
-+   list of items.  It also shows the special argp KEY value
-+   ARGP_KEY_NO_ARGS, which is only given if no non-option
-+   arguments were supplied to the program.
-+
-+   For structuring the help output, two features are used,
-+   *headers* which are entries in the options vector with the
-+   first four fields being zero, and a two part documentation
-+   string (in the variable DOC), which allows documentation both
-+   before and after the options; the two parts of DOC are
-+   separated by a vertical-tab character ('\v', or '\013').  By
-+   convention, the documentation before the options is just a
-+   short string saying what the program does, and that afterwards
-+   is longer, describing the behavior in more detail.  All
-+   documentation strings are automatically filled for output,
-+   although newlines may be included to force a line break at a
-+   particular point.  All documentation strings are also passed to
-+   the `gettext' function, for possible translation into the
-+   current locale.  */
-+
-+#include <stdlib.h>
-+#include <error.h>
-+#include <argp.h>
-+
-+const char *argp_program_version =
-+  "argp-ex4 1.0";
-+const char *argp_program_bug_address =
-+  "<bug-gnu-utils@@prep.ai.mit.edu>";
-+
-+/* Program documentation.  */
-+static char doc[] =
-+  "Argp example #4 -- a program with somewhat more complicated\
-+options\
-+\vThis part of the documentation comes *after* the options;\
-+ note that the text is automatically filled, but it's possible\
-+ to force a line-break, e.g.\n<-- here.";
-+
-+/* A description of the arguments we accept.  */
-+static char args_doc[] = "ARG1 [STRING...]";
-+
-+/* Keys for options without short-options.  */
-+#define OPT_ABORT  1           /* --abort */
-+
-+/* The options we understand.  */
-+static struct argp_option options[] = {
-+  {"verbose",  'v', 0,       0, "Produce verbose output" },
-+  {"quiet",    'q', 0,       0, "Don't produce any output" },
-+  {"silent",   's', 0,       OPTION_ALIAS },
-+  {"output",   'o', "FILE",  0,
-+   "Output to FILE instead of standard output" },
-+
-+  {0,0,0,0, "The following options should be grouped together:" },
-+  {"repeat",   'r', "COUNT", OPTION_ARG_OPTIONAL,
-+   "Repeat the output COUNT (default 10) times"},
-+  {"abort",    OPT_ABORT, 0, 0, "Abort before showing any output"},
-+
-+  { 0 }
-+};
-+
-+/* Used by @code{main} to communicate with @code{parse_opt}.  */
-+struct arguments
-+{
-+  char *arg1;                  /* @var{arg1} */
-+  char **strings;              /* [@var{string}@dots{}] */
-+  int silent, verbose, abort;  /* @samp{-s}, @samp{-v}, @samp{--abort} */
-+  char *output_file;           /* @var{file} arg to @samp{--output} */
-+  int repeat_count;            /* @var{count} arg to @samp{--repeat} */
-+};
-+
-+/* Parse a single option.  */
-+static error_t
-+parse_opt (int key, char *arg, struct argp_state *state)
-+{
-+  /* Get the @code{input} argument from @code{argp_parse}, which we
-+     know is a pointer to our arguments structure.  */
-+  struct arguments *arguments = state->input;
-+
-+  switch (key)
-+    {
-+    case 'q': case 's':
-+      arguments->silent = 1;
-+      break;
-+    case 'v':
-+      arguments->verbose = 1;
-+      break;
-+    case 'o':
-+      arguments->output_file = arg;
-+      break;
-+    case 'r':
-+      arguments->repeat_count = arg ? atoi (arg) : 10;
-+      break;
-+    case OPT_ABORT:
-+      arguments->abort = 1;
-+      break;
-+
-+    case ARGP_KEY_NO_ARGS:
-+      argp_usage (state);
-+
-+    case ARGP_KEY_ARG:
-+      /* Here we know that @code{state->arg_num == 0}, since we
-+        force argument parsing to end before any more arguments can
-+        get here.  */
-+      arguments->arg1 = arg;
-+
-+      /* Now we consume all the rest of the arguments.
-+        @code{state->next} is the index in @code{state->argv} of the
-+        next argument to be parsed, which is the first @var{string}
-+        we're interested in, so we can just use
-+        @code{&state->argv[state->next]} as the value for
-+        arguments->strings.
-+
-+        @emph{In addition}, by setting @code{state->next} to the end
-+        of the arguments, we can force argp to stop parsing here and
-+        return.  */
-+      arguments->strings = &state->argv[state->next];
-+      state->next = state->argc;
-+
-+      break;
-+
-+    default:
-+      return ARGP_ERR_UNKNOWN;
-+    }
-+  return 0;
-+}
-+
-+/* Our argp parser.  */
-+static struct argp argp = { options, parse_opt, args_doc, doc };
-+
-+int main (int argc, char **argv)
-+{
-+  int i, j;
-+  struct arguments arguments;
-+
-+  /* Default values.  */
-+  arguments.silent = 0;
-+  arguments.verbose = 0;
-+  arguments.output_file = "-";
-+  arguments.repeat_count = 1;
-+  arguments.abort = 0;
-+
-+  /* Parse our arguments; every option seen by @code{parse_opt} will be
-+     reflected in @code{arguments}.  */
-+  argp_parse (&argp, argc, argv, 0, 0, &arguments);
-+
-+  if (arguments.abort)
-+    error (10, 0, "ABORTED");
-+
-+  for (i = 0; i < arguments.repeat_count; i++)
-+    {
-+      printf ("ARG1 = %s\n", arguments.arg1);
-+      printf ("STRINGS = ");
-+      for (j = 0; arguments.strings[j]; j++)
-+       printf (j == 0 ? "%s" : ", %s", arguments.strings[j]);
-+      printf ("\n");
-+      printf ("OUTPUT_FILE = %s\nVERBOSE = %s\nSILENT = %s\n",
-+             arguments.output_file,
-+             arguments.verbose ? "yes" : "no",
-+             arguments.silent ? "yes" : "no");
-+    }
-+
-+  exit (0);
-+}
-diff --git a/test/argp/argp-test.c b/test/argp/argp-test.c
-new file mode 100644
-index 0000000..b3d573b
---- /dev/null
-+++ b/test/argp/argp-test.c
-@@ -0,0 +1,209 @@
-+/* Test program for argp argument parser
-+   Copyright (C) 1997 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Written by Miles Bader <miles at gnu.ai.mit.edu>.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#ifdef HAVE_CONFIG_H
-+#include <config.h>
-+#endif
-+
-+#include <stdlib.h>
-+#include <time.h>
-+#include <string.h>
-+#include <argp.h>
-+
-+const char *argp_program_version = "argp-test 1.0";
-+
-+struct argp_option sub_options[] =
-+{
-+  {"subopt1",       's',     0,  0, "Nested option 1"},
-+  {"subopt2",       'S',     0,  0, "Nested option 2"},
-+
-+  { 0, 0, 0, 0, "Some more nested options:", 10},
-+  {"subopt3",       'p',     0,  0, "Nested option 3"},
-+
-+  {"subopt4",       'q',     0,  0, "Nested option 4", 1},
-+
-+  {0}
-+};
-+
-+static const char sub_args_doc[] = "STRING...\n-";
-+static const char sub_doc[] = "\vThis is the doc string from the sub-arg-parser.";
-+
-+static error_t
-+sub_parse_opt (int key, char *arg, struct argp_state *state)
-+{
-+  switch (key)
-+    {
-+    case ARGP_KEY_NO_ARGS:
-+      printf ("NO SUB ARGS\n");
-+      break;
-+    case ARGP_KEY_ARG:
-+      printf ("SUB ARG: %s\n", arg);
-+      break;
-+
-+    case 's' : case 'S': case 'p': case 'q':
-+      printf ("SUB KEY %c\n", key);
-+      break;
-+
-+    default:
-+      return ARGP_ERR_UNKNOWN;
-+    }
-+  return 0;
-+}
-+
-+static char *
-+sub_help_filter (int key, const char *text, void *input)
-+{
-+  if (key == ARGP_KEY_HELP_EXTRA)
-+    return strdup ("This is some extra text from the sub parser (note that it \
-+is preceded by a blank line).");
-+  else
-+    return (char *)text;
-+}
-+
-+static struct argp sub_argp = {
-+  sub_options, sub_parse_opt, sub_args_doc, sub_doc, 0, sub_help_filter
-+};
-+
-+/* Structure used to communicate with the parsing functions.  */
-+struct params
-+{
-+  unsigned foonly;             /* Value parsed for foonly.  */
-+  unsigned foonly_default;     /* Default value for it.  */
-+};
-+
-+#define OPT_PGRP 1
-+#define OPT_SESS 2
-+
-+struct argp_option options[] =
-+{
-+  {"pid",       'p',     "PID", 0, "List the process PID"},
-+  {"pgrp",      OPT_PGRP,"PGRP",0, "List processes in the process group PGRP"},
-+  {"no-parent", 'P',    0,     0, "Include processes without parents"},
-+  {0,           'x',     0,     OPTION_ALIAS},
-+  {"all-fields",'Q',     0,     0, "Don't elide unusable fields (normally"
-+                                  " if there's some reason ps can't"
-+                                  " print a field for any process, it's"
-+                                  " removed from the output entirely)" },
-+  {"reverse",   'r',    0,      0, "Reverse the order of any sort"},
-+  {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
-+  {"session",  OPT_SESS,"SID",  OPTION_ARG_OPTIONAL,
-+                                  "Add the processes from the session"
-+                                  " SID (which defaults to the sid of"
-+                                  " the current process)" },
-+
-+  {0,0,0,0, "Here are some more options:"},
-+  {"foonly", 'f', "ZOT", OPTION_ARG_OPTIONAL, "Glork a foonly"},
-+  {"zaza", 'z', 0, 0, "Snit a zar"},
-+
-+  {0}
-+};
-+
-+static const char args_doc[] = "STRING";
-+static const char doc[] = "Test program for argp."
-+ "\vThis doc string comes after the options."
-+ "\nHey!  Some manual formatting!"
-+ "\nThe current time is: %s";
-+
-+static void
-+popt (int key, char *arg)
-+{
-+  char buf[10];
-+  if (isprint (key))
-+    sprintf (buf, "%c", key);
-+  else
-+    sprintf (buf, "%d", key);
-+  if (arg)
-+    printf ("KEY %s: %s\n", buf, arg);
-+  else
-+    printf ("KEY %s\n", buf);
-+}
-+
-+static error_t
-+parse_opt (int key, char *arg, struct argp_state *state)
-+{
-+  struct params *params = state->input;
-+
-+  switch (key)
-+    {
-+    case ARGP_KEY_NO_ARGS:
-+      printf ("NO ARGS\n");
-+      break;
-+
-+    case ARGP_KEY_ARG:
-+      if (state->arg_num > 0)
-+       return ARGP_ERR_UNKNOWN; /* Leave it for the sub-arg parser.  */
-+      printf ("ARG: %s\n", arg);
-+      break;
-+
-+    case 'f':
-+      if (arg)
-+       params->foonly = atoi (arg);
-+      else
-+       params->foonly = params->foonly_default;
-+      popt (key, arg);
-+      break;
-+
-+    case 'p': case 'P': case OPT_PGRP: case 'x': case 'Q':
-+    case 'r': case OPT_SESS: case 'z':
-+      popt (key, arg);
-+      break;
-+
-+    default:
-+      return ARGP_ERR_UNKNOWN;
-+    }
-+  return 0;
-+}
-+
-+static char *
-+help_filter (int key, const char *text, void *input)
-+{
-+  char *new_text;
-+  struct params *params = input;
-+
-+  if (key == ARGP_KEY_HELP_POST_DOC && text)
-+    {
-+      time_t now = time (0);
-+      asprintf (&new_text, text, ctime (&now));
-+    }
-+  else if (key == 'f')
-+    /* Show the default for the --foonly option.  */
-+    asprintf (&new_text, "%s (ZOT defaults to %x)",
-+             text, params->foonly_default);
-+  else
-+    new_text = (char *)text;
-+
-+  return new_text;
-+}
-+
-+static struct argp_child argp_children[] = { { &sub_argp }, { 0 } };
-+static struct argp argp = {
-+  options, parse_opt, args_doc, doc, argp_children, help_filter
-+};
-+
-+int
-+main (int argc, char **argv)
-+{
-+  struct params params;
-+  params.foonly = 0;
-+  params.foonly_default = random ();
-+  argp_parse (&argp, argc, argv, 0, 0, &params);
-+  printf ("After parsing: foonly = %x\n", params.foonly);
-+  return 0;
-+}
-diff --git a/test/argp/bug-argp1.c b/test/argp/bug-argp1.c
-new file mode 100644
-index 0000000..a28cf4b
---- /dev/null
-+++ b/test/argp/bug-argp1.c
-@@ -0,0 +1,26 @@
-+#include <argp.h>
-+
-+
-+static const struct argp_option test_options[] =
-+{
-+  { NULL, 'a', NULL, OPTION_DOC, NULL },
-+  { NULL, 'b', NULL, OPTION_DOC, NULL },
-+  { NULL, 0, NULL, 0, NULL }
-+};
-+
-+static struct argp test_argp =
-+{
-+  test_options
-+};
-+
-+
-+static int
-+do_test (int argc, char *argv[])
-+{
-+  int i;
-+  argp_parse (&test_argp, argc, argv, 0, &i, NULL);
-+  return 0;
-+}
-+
-+#define TEST_FUNCTION do_test (argc, argv)
-+#include "../test-skeleton.c"
-diff --git a/test/argp/tst-argp1.c b/test/argp/tst-argp1.c
-new file mode 100644
-index 0000000..827daca
---- /dev/null
-+++ b/test/argp/tst-argp1.c
-@@ -0,0 +1,118 @@
-+/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Contributed by Ulrich Drepper <drepper at redhat.com>, 2002.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#include <argp.h>
-+
-+
-+
-+
-+#define OPT_TO_THREAD          300
-+#define OPT_TO_PROCESS         301
-+#define OPT_SYNC_SIGNAL                302
-+#define OPT_SYNC_JOIN          303
-+#define OPT_TOPLEVEL           304
-+
-+
-+static const struct argp_option test_options[] =
-+  {
-+    { NULL, 0, NULL, 0, "\
-+This is a test for threads so we allow ther user to selection the number of \
-+threads which are used at any one time.  Independently the total number of \
-+rounds can be selected.  This is the total number of threads which will have \
-+run when the process terminates:" },
-+    { "threads", 't', "NUMBER", 0, "Number of threads used at once" },
-+    { "starts", 's', "NUMBER", 0, "Total number of working threads" },
-+    { "toplevel", OPT_TOPLEVEL, "NUMBER", 0,
-+      "Number of toplevel threads which start the other threads; this \
-+implies --sync-join" },
-+
-+    { NULL, 0, NULL, 0, "\
-+Each thread can do one of two things: sleep or do work.  The latter is 100% \
-+CPU bound.  The work load is the probability a thread does work.  All values \
-+from zero to 100 (inclusive) are valid.  How often each thread repeats this \
-+can be determined by the number of rounds.  The work cost determines how long \
-+each work session (not sleeping) takes.  If it is zero a thread would \
-+effectively nothing.  By setting the number of rounds to zero the thread \
-+does no work at all and pure thread creation times can be measured." },
-+    { "workload", 'w', "PERCENT", 0, "Percentage of time spent working" },
-+    { "workcost", 'c', "NUMBER", 0,
-+      "Factor in the cost of each round of working" },
-+    { "rounds", 'r', "NUMBER", 0, "Number of rounds each thread runs" },
-+
-+    { NULL, 0, NULL, 0, "\
-+There are a number of different methods how thread creation can be \
-+synchronized.  Synchronization is necessary since the number of concurrently \
-+running threads is limited." },
-+    { "sync-signal", OPT_SYNC_SIGNAL, NULL, 0,
-+      "Synchronize using a signal (default)" },
-+    { "sync-join", OPT_SYNC_JOIN, NULL, 0, "Synchronize using pthread_join" },
-+
-+    { NULL, 0, NULL, 0, "\
-+One parameter for each threads execution is the size of the stack.  If this \
-+parameter is not used the system's default stack size is used.  If many \
-+threads are used the stack size should be chosen quite small." },
-+    { "stacksize", 'S', "BYTES", 0, "Size of threads stack" },
-+    { "guardsize", 'g', "BYTES", 0,
-+      "Size of stack guard area; must fit into the stack" },
-+
-+    { NULL, 0, NULL, 0, "Signal options:" },
-+    { "to-thread", OPT_TO_THREAD, NULL, 0, "Send signal to main thread" },
-+    { "to-process", OPT_TO_PROCESS, NULL, 0,
-+      "Send signal to process (default)" },
-+
-+    { NULL, 0, NULL, 0, "Administrative options:" },
-+    { "progress", 'p', NULL, 0, "Show signs of progress" },
-+    { "timing", 'T', NULL, 0,
-+      "Measure time from startup to the last thread finishing" },
-+    { NULL, 0, NULL, 0, NULL }
-+  };
-+
-+/* Prototype for option handler.  */
-+static error_t parse_opt (int key, char *arg, struct argp_state *state);
-+
-+/* Data structure to communicate with argp functions.  */
-+static struct argp argp =
-+{
-+  test_options, parse_opt
-+};
-+
-+
-+static int
-+do_test (void)
-+{
-+  int argc = 2;
-+  char *argv[3] = { (char *) "tst-argp1", (char *) "--help", NULL };
-+  int remaining;
-+
-+  /* Parse and process arguments.  */
-+  argp_parse (&argp, argc, argv, 0, &remaining, NULL);
-+
-+  return 0;
-+}
-+
-+
-+/* Handle program arguments.  */
-+static error_t
-+parse_opt (int key, char *arg, struct argp_state *state)
-+{
-+  return ARGP_ERR_UNKNOWN;
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-diff --git a/test/argp/tst-argp2.c b/test/argp/tst-argp2.c
-new file mode 100644
-index 0000000..705cdca
---- /dev/null
-+++ b/test/argp/tst-argp2.c
-@@ -0,0 +1,101 @@
-+/* Copyright (C) 2007 Free Software Foundation, Inc.
-+   This file is part of the GNU C Library.
-+   Contributed by Jakub Jelinek <jakub at redhat.com>, 2007.
-+
-+   The GNU C Library is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU Lesser General Public
-+   License as published by the Free Software Foundation; either
-+   version 2.1 of the License, or (at your option) any later version.
-+
-+   The GNU C Library is distributed in the hope that it will be useful,
-+   but WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   Lesser General Public License for more details.
-+
-+   You should have received a copy of the GNU Lesser General Public
-+   License along with the GNU C Library; if not, write to the Free
-+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+   02111-1307 USA.  */
-+
-+#include <argp.h>
-+
-+static const struct argp_option opt1[] =
-+  {
-+    { "opt1", '1', "NUMBER", 0, "Option 1" },
-+    { NULL, 0, NULL, 0, NULL }
-+  };
-+
-+static const struct argp_option opt2[] =
-+  {
-+    { "opt2", '2', "NUMBER", 0, "Option 2" },
-+    { NULL, 0, NULL, 0, NULL }
-+  };
-+
-+static const struct argp_option opt3[] =
-+  {
-+    { "opt3", '3', "NUMBER", 0, "Option 3" },
-+    { NULL, 0, NULL, 0, NULL }
-+  };
-+
-+static const struct argp_option opt4[] =
-+  {
-+    { "opt4", '4', "NUMBER", 0, "Option 4" },
-+    { NULL, 0, NULL, 0, NULL }
-+  };
-+
-+static const struct argp_option opt5[] =
-+  {
-+    { "opt5", '5', "NUMBER", 0, "Option 5" },
-+    { NULL, 0, NULL, 0, NULL }
-+  };
-+
-+static struct argp argp5 =
-+  {
-+    opt5, NULL, "args doc5", "doc5", NULL, NULL, NULL
-+  };
-+
-+static struct argp argp4 =
-+  {
-+    opt4, NULL, "args doc4", "doc4", NULL, NULL, NULL
-+  };
-+
-+static struct argp argp3 =
-+  {
-+    opt3, NULL, "args doc3", "doc3", NULL, NULL, NULL
-+  };
-+
-+static struct argp_child children2[] =
-+  {
-+    { &argp4, 0, "child3", 3 },
-+    { &argp5, 0, "child4", 4 },
-+    { NULL, 0, NULL, 0 }
-+  };
-+
-+static struct argp argp2 =
-+  {
-+    opt2, NULL, "args doc2", "doc2", children2, NULL, NULL
-+  };
-+
-+static struct argp_child children1[] =
-+  {
-+    { &argp2, 0, "child1", 1 },
-+    { &argp3, 0, "child2", 2 },
-+    { NULL, 0, NULL, 0 }
-+  };
-+
-+static struct argp argp1 =
-+  {
-+    opt1, NULL, "args doc1", "doc1", children1, NULL, NULL
-+  };
-+
-+
-+static int
-+do_test (void)
-+{
-+  argp_help (&argp1, stdout, ARGP_HELP_LONG, (char *) "tst-argp2");
-+  return 0;
-+}
-+
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0004-Dont-support-localised-optimizations-this-helps-to-h.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0004-Dont-support-localised-optimizations-this-helps-to-h.patch
deleted file mode 100644
index 629e13c..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0004-Dont-support-localised-optimizations-this-helps-to-h.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 31785c544abe8b215dbb2264fb11ee7051515797 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 16 Aug 2015 20:58:59 -0700
-Subject: [PATCH 4/7] Dont support localised optimizations this helps to have a
- global -O level
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- libpthread/nptl/pthread_mutex_timedlock.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/libpthread/nptl/pthread_mutex_timedlock.c b/libpthread/nptl/pthread_mutex_timedlock.c
-index 04187f6..f56f6c5 100644
---- a/libpthread/nptl/pthread_mutex_timedlock.c
-+++ b/libpthread/nptl/pthread_mutex_timedlock.c
-@@ -28,7 +28,9 @@
-  * error: can't find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
-  */
- int
-+#ifndef  __OPTIMIZE__
- attribute_optimize("Os")
-+#endif
- pthread_mutex_timedlock (
-      pthread_mutex_t *mutex,
-      const struct timespec *abstime)
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0005-Always-use-O2-for-compiling-fork.c.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0005-Always-use-O2-for-compiling-fork.c.patch
deleted file mode 100644
index ad9b246..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0005-Always-use-O2-for-compiling-fork.c.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 883debc22e30a947fe5858cc07ee5aebd3d07a2e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 16 Aug 2015 20:59:56 -0700
-Subject: [PATCH 5/7] Always use -O2 for compiling fork.c
-
-When compiling in thumb mode for arm with -Os gcc gives up since it can
-not find registers to spill. So we use -O2 option for compiling fork.c
-It may be addressable in gcc.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
-index 0ea0b29..0767e9c 100644
---- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
-+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
-@@ -21,3 +21,9 @@ ASFLAGS-pt-vfork.S = -marm
- CFLAGS-OMIT-pt-vfork.S = -mthumb
- ASFLAGS-vfork.S = -marm
- CFLAGS-OMIT-vfork.S = -mthumb
-+
-+# For arm fork.c does not compile with -Os when compiling
-+# in thumb1 mode
-+ifeq ($(COMPILE_IN_THUMB_MODE),y)
-+CFLAGS-fork.c = -O2
-+endif
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0006-ldso-limited-support-for-ORIGIN-in-rpath.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0006-ldso-limited-support-for-ORIGIN-in-rpath.patch
deleted file mode 100644
index f0d8737..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0006-ldso-limited-support-for-ORIGIN-in-rpath.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-From b40c129ed2d53b69463883a5422dd4a012a398f9 Mon Sep 17 00:00:00 2001
-From: Junling Zheng <zhengjunling@huawei.com>
-Date: Fri, 3 Apr 2015 05:02:27 +0000
-Subject: [PATCH 6/7] ldso: limited support for $ORIGIN in rpath
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Derived from:
-http://lists.busybox.net/pipermail/uclibc/2011-March/045003.html
-
-However, the above patch introduced '_dl_strchr' in ldso/ldso/dl-elf.c,
-and caused the following undefined referencing compiling error:
-
-  | .../libdl.a(libdl.os): In function `search_for_named_library':
-  | .../dl-elf.c:156: undefined reference to `_dl_strchr'
-  | collect2: error: ld returned 1 exit status
-
-This problem would be reproduced through compiling gdb in static mode
-using uclibc.
-
-So, add the definition of '_dl_strchr' to fix it. The '_dl_strstr' is
-added as well.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Timo Teräs <timo.teras at iki.fi>
-Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- ldso/include/dl-string.h |  2 ++
- ldso/ldso/dl-elf.c       | 79 +++++++++++++++++++++++++-----------------------
- ldso/ldso/ldso.c         | 18 +++++++++--
- 3 files changed, 59 insertions(+), 40 deletions(-)
-
-diff --git a/ldso/include/dl-string.h b/ldso/include/dl-string.h
-index aacad10..14ae617 100644
---- a/ldso/include/dl-string.h
-+++ b/ldso/include/dl-string.h
-@@ -204,7 +204,9 @@ static __always_inline char * _dl_get_last_path_component(char *path)
- # define _dl_strcat strcat
- # define _dl_strcpy strcpy
- # define _dl_strcmp strcmp
-+# define _dl_strchr strchr
- # define _dl_strrchr strrchr
-+# define _dl_strstr strstr
- # define _dl_memcpy memcpy
- # define _dl_memcmp memcmp
- # define _dl_memset memset
-diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
-index 5631905..6ab7afe 100644
---- a/ldso/ldso/dl-elf.c
-+++ b/ldso/ldso/dl-elf.c
-@@ -133,56 +133,60 @@ _dl_protect_relro (struct elf_resolve *l)
-  * in uClibc/ldso/util/ldd.c */
- static struct elf_resolve *
- search_for_named_library(const char *name, unsigned rflags, const char *path_list,
--	struct dyn_elf **rpnt)
-+	struct dyn_elf **rpnt, const char* origin)
- {
--	char *path, *path_n, *mylibname;
-+	char *mylibname;
-+	const char *p, *pn;
- 	struct elf_resolve *tpnt;
--	int done;
-+	int plen;
- 
- 	if (path_list==NULL)
- 		return NULL;
- 
--	/* We need a writable copy of this string, but we don't
--	 * need this allocated permanently since we don't want
--	 * to leak memory, so use alloca to put path on the stack */
--	done = _dl_strlen(path_list);
--	path = alloca(done + 1);
--
- 	/* another bit of local storage */
- 	mylibname = alloca(2050);
- 
--	_dl_memcpy(path, path_list, done+1);
--
- 	/* Unlike ldd.c, don't bother to eliminate double //s */
- 
- 	/* Replace colons with zeros in path_list */
- 	/* : at the beginning or end of path maps to CWD */
- 	/* :: anywhere maps CWD */
- 	/* "" maps to CWD */
--	done = 0;
--	path_n = path;
--	do {
--		if (*path == 0) {
--			*path = ':';
--			done = 1;
-+	for (p = path_list; p != NULL; p = pn) {
-+		pn = _dl_strchr(p + 1, ':');
-+		if (pn != NULL) {
-+			plen = pn - p;
-+			pn++;
-+		} else
-+			plen = _dl_strlen(p);
-+
-+		if (plen >= 7 && _dl_memcmp(p, "$ORIGIN", 7) == 0) {
-+			int olen;
-+			if (rflags && plen != 7)
-+				continue;
-+			if (origin == NULL)
-+				continue;
-+			for (olen = _dl_strlen(origin) - 1; olen >= 0 && origin[olen] != '/'; olen--)
-+				;
-+			if (olen <= 0)
-+				continue;
-+			_dl_memcpy(&mylibname[0], origin, olen);
-+			_dl_memcpy(&mylibname[olen], p + 7, plen - 7);
-+			mylibname[olen + plen - 7] = 0;
-+		} else if (plen != 0) {
-+			_dl_memcpy(mylibname, p, plen);
-+			mylibname[plen] = 0;
-+		} else {
-+			_dl_strcpy(mylibname, ".");
- 		}
--		if (*path == ':') {
--			*path = 0;
--			if (*path_n)
--				_dl_strcpy(mylibname, path_n);
--			else
--				_dl_strcpy(mylibname, "."); /* Assume current dir if empty path */
--			_dl_strcat(mylibname, "/");
--			_dl_strcat(mylibname, name);
-+		_dl_strcat(mylibname, "/");
-+		_dl_strcat(mylibname, name);
- #ifdef __LDSO_SAFE_RUNPATH__
--			if (*mylibname == '/')
-+		if (*mylibname == '/')
- #endif
--				if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
--					return tpnt;
--			path_n = path+1;
--		}
--		path++;
--	} while (!done);
-+		if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
-+			return tpnt;
-+	}
- 	return NULL;
- }
- 
-@@ -234,7 +238,8 @@ struct elf_resolve *_dl_load_shared_library(unsigned rflags, struct dyn_elf **rp
- 	if (pnt) {
- 		pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
- 		_dl_if_debug_dprint("\tsearching RPATH='%s'\n", pnt);
--		if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt)) != NULL)
-+		if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt,
-+						      tpnt->libname)) != NULL)
- 			return tpnt1;
- 	}
- #endif
-@@ -243,7 +248,7 @@ struct elf_resolve *_dl_load_shared_library(unsigned rflags, struct dyn_elf **rp
- 	/* Check in LD_{ELF_}LIBRARY_PATH, if specified and allowed */
- 	if (_dl_library_path) {
- 		_dl_if_debug_dprint("\tsearching LD_LIBRARY_PATH='%s'\n", _dl_library_path);
--		if ((tpnt1 = search_for_named_library(libname, rflags, _dl_library_path, rpnt)) != NULL)
-+		if ((tpnt1 = search_for_named_library(libname, rflags, _dl_library_path, rpnt, NULL)) != NULL)
- 		{
- 			return tpnt1;
- 		}
-@@ -257,7 +262,7 @@ struct elf_resolve *_dl_load_shared_library(unsigned rflags, struct dyn_elf **rp
- 	if (pnt) {
- 		pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
- 		_dl_if_debug_dprint("\tsearching RUNPATH='%s'\n", pnt);
--		if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt)) != NULL)
-+		if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt, NULL)) != NULL)
- 			return tpnt1;
- 	}
- #endif
-@@ -291,7 +296,7 @@ struct elf_resolve *_dl_load_shared_library(unsigned rflags, struct dyn_elf **rp
- 	/* Look for libraries wherever the shared library loader
- 	 * was installed */
- 	_dl_if_debug_dprint("\tsearching ldso dir='%s'\n", _dl_ldsopath);
--	tpnt1 = search_for_named_library(libname, rflags, _dl_ldsopath, rpnt);
-+	tpnt1 = search_for_named_library(libname, rflags, _dl_ldsopath, rpnt, NULL);
- 	if (tpnt1 != NULL)
- 		return tpnt1;
- #endif
-@@ -304,7 +309,7 @@ struct elf_resolve *_dl_load_shared_library(unsigned rflags, struct dyn_elf **rp
- #ifndef __LDSO_CACHE_SUPPORT__
- 					":" UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib"
- #endif
--					, rpnt);
-+					, rpnt, NULL);
- 	if (tpnt1 != NULL)
- 		return tpnt1;
- 
-diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
-index f38f9e3..3812908 100644
---- a/ldso/ldso/ldso.c
-+++ b/ldso/ldso/ldso.c
-@@ -402,6 +402,20 @@ static ptrdiff_t _dl_build_local_scope (struct elf_resolve **list,
- 				p += _dl_build_local_scope (p, q->tpnt);
- 	return p - list;
- }
-+ 
-+static void _dl_setup_progname(const char *argv0)
-+{
-+	char image[PATH_MAX];
-+	ssize_t s;
-+
-+	s = _dl_readlink("/proc/self/exe", image, sizeof(image));
-+	if (s > 0 && image[0] == '/') {
-+		image[s] = 0;
-+		_dl_progname = _dl_strdup(image);
-+	} else if (argv0) {
-+		_dl_progname = argv0;
-+	}
-+}
- 
- void *_dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
- 			  ElfW(auxv_t) auxvt[AT_EGID + 1], char **envp, char **argv
-@@ -454,9 +468,7 @@ void *_dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
- 	 * been fixed up by now.  Still no function calls outside of this
- 	 * library, since the dynamic resolver is not yet ready.
- 	 */
--	if (argv[0]) {
--		_dl_progname = argv[0];
--	}
-+	_dl_setup_progname(argv[0]);
- 
- #ifdef __DSBT__
- 	_dl_ldso_dsbt = (void *)tpnt->dynamic_info[DT_DSBT_BASE_IDX];
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0007-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0007-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch
deleted file mode 100644
index ee932c3..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/0007-nptl-atfork-Hide-pthread_atfork-in-shared-versions.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 90516af9f776f9c2835b47fc52775dcb307a85ac Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 23 Jun 2012 15:59:01 -0700
-Subject: [PATCH 7/7] nptl/atfork: Hide pthread_atfork in shared versions
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
----
- libpthread/nptl/Makefile.in | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/libpthread/nptl/Makefile.in b/libpthread/nptl/Makefile.in
-index 55eeba2..8cb8fa9 100644
---- a/libpthread/nptl/Makefile.in
-+++ b/libpthread/nptl/Makefile.in
-@@ -16,6 +16,7 @@ libc-shared-routines-y = forward.c libc-cancellation.c
- libc-static-routines-y = alloca_cutoff.c libc-cancellation.c
- libpthread-shared-only-routines-y = version.c
- libpthread-static-only-routines-y = pthread_atfork.c
-+
- libpthread-routines- += $(notdir $(wildcard $(libpthread_DIR)/gen_*.c)) # dummy generated files
- libpthread-routines- += allocatestack.c # dummy included by pthread_create.c
- libpthread-routines- += pthread_mutex_getprioceiling.c pthread_mutex_setprioceiling.c # XXX: delete those or use them!
-@@ -201,7 +202,7 @@ CFLAGS-msgsnd.c = -fexceptions -fasynchronous-unwind-tables
- CFLAGS-tcdrain.c = -fexceptions -fasynchronous-unwind-tables
- 
- CFLAGS-pt-system.c = -fexceptions -I$(top_srcdir)libc/stdlib
--
-+CFLAGS-pthread_atfork.c = -DNOT_IN_libc
- #
- # The rest of this file is uClibc specific.
- #
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/CVE-2016-2224.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/CVE-2016-2224.patch
deleted file mode 100644
index 218b60a..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/CVE-2016-2224.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 16719c1a7078421928e6d31dd1dec574825ef515 Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Sun, 17 Jan 2016 15:47:22 +0100
-Subject: [PATCH] Do not follow compressed items forever.
-
-It is possible to get stuck in an infinite loop when receiving a
-specially crafted DNS reply. Exit the loop after a number of iteration
-and consider the packet invalid.
-
-Signed-off-by: Daniel Fahlgren <daniel@fahlgren.se>
-Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
-
-Upstream-status: Backport
-http://repo.or.cz/uclibc-ng.git/commit/16719c1a7078421928e6d31dd1dec574825ef515
-
-CVE: CVE-2016-2224
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- libc/inet/resolv.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-Index: git/libc/inet/resolv.c
-===================================================================
---- git.orig/libc/inet/resolv.c
-+++ git/libc/inet/resolv.c
-@@ -666,11 +666,12 @@ int __decode_dotted(const unsigned char
- 	bool measure = 1;
- 	unsigned total = 0;
- 	unsigned used = 0;
-+	unsigned maxiter = 256;
- 
- 	if (!packet)
- 		return -1;
- 
--	while (1) {
-+	while (--maxiter) {
- 		if (offset >= packet_len)
- 			return -1;
- 		b = packet[offset++];
-@@ -707,6 +708,8 @@ int __decode_dotted(const unsigned char
- 		else
- 			dest[used++] = '\0';
- 	}
-+	if (!maxiter)
-+		return -1;
- 
- 	/* The null byte must be counted too */
- 	if (measure)
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/CVE-2016-2225.patch b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/CVE-2016-2225.patch
deleted file mode 100644
index 0217e4b..0000000
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/CVE-2016-2225.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From bb01edff0377f2585ce304ecbadcb7b6cde372ac Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbx@openadk.org>
-Date: Mon, 25 Jan 2016 21:11:34 +0100
-Subject: [PATCH] Make sure to always terminate decoded string
-
-Write a terminating '\0' to dest when the first byte of the encoded data
-is 0. This corner case was previously missed.
-
-Signed-off-by: Daniel Fahlgren <daniel@fahlgren.se>
-Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
-
-Upstream-Status: Backport
-http://repo.or.cz/uclibc-ng.git/commit/bb01edff0377f2585ce304ecbadcb7b6cde372ac
-CVE: CVE-2016-2225
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- libc/inet/resolv.c | 1 +
- 1 file changed, 1 insertion(+)
-
-Index: git/libc/inet/resolv.c
-===================================================================
---- git.orig/libc/inet/resolv.c
-+++ git/libc/inet/resolv.c
-@@ -671,6 +671,7 @@ int __decode_dotted(const unsigned char
- 	if (!packet)
- 		return -1;
- 
-+	dest[0] = '\0';
- 	while (--maxiter) {
- 		if (offset >= packet_len)
- 			return -1;
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.distro b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.distro
index 3827b66..7785ce8 100644
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.distro
+++ b/yocto-poky/meta/recipes-core/uclibc/uclibc-git/uClibc.distro
@@ -79,11 +79,11 @@
 UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
 UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
 # UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
-UCLIBC_HAS_STDIO_BUFSIZ_256=y
+# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
 # UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
 # UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
 # UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_4096 is not set
+UCLIBC_HAS_STDIO_BUFSIZ_4096=y
 # UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
 UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
 # UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc-package.inc b/yocto-poky/meta/recipes-core/uclibc/uclibc-package.inc
index c1815f9..439f84e 100644
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc-package.inc
+++ b/yocto-poky/meta/recipes-core/uclibc/uclibc-package.inc
@@ -1,6 +1,6 @@
 # Ensure the uclibc-dev package is processed before uclibc-staticdev to allow
 # *_nonshared.a libraries to be packaged in the uclibc-dev package.
-PACKAGES = "ldd uclibc-utils-dbg uclibc-utils uclibc-gconv uclibc-thread-db uclibc-argp uclibc-backtrace uclibc-libcrypt uclibc-libintl uclibc-libnsl uclibc-libresolv uclibc-libm uclibc-libdl uclibc-libutil uclibc-libpthread uclibc-librt ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
+PACKAGES = "ldd uclibc-utils uclibc-gconv uclibc-thread-db uclibc-argp uclibc-backtrace uclibc-libcrypt uclibc-libintl uclibc-libnsl uclibc-libresolv uclibc-libm uclibc-libdl uclibc-libutil uclibc-libpthread uclibc-librt ${PN}-dbg ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}"
 
 FILES_uclibc-libcrypt = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so"
 FILES_uclibc-libintl = "${base_libdir}/libintl*.so.* ${base_libdir}/libintl-*.so"
@@ -14,7 +14,6 @@
 
 FILES_ldd = "${bindir}/ldd"
 FILES_uclibc-utils = "${bindir} ${sbindir}"
-FILES_uclibc-utils-dbg += "${bindir}/.debug ${sbindir}/.debug"
 FILES_uclibc-gconv = "${libdir}/gconv"
 FILES_uclibc-thread-db = "${base_libdir}/libthread_db*"
 FILES_uclibc-argp = "${base_libdir}/libuargp-*.so ${base_libdir}/libuargp*.so.*"
diff --git a/yocto-poky/meta/recipes-core/uclibc/uclibc.inc b/yocto-poky/meta/recipes-core/uclibc/uclibc.inc
index 533aa3d..1d42284 100644
--- a/yocto-poky/meta/recipes-core/uclibc/uclibc.inc
+++ b/yocto-poky/meta/recipes-core/uclibc/uclibc.inc
@@ -13,7 +13,6 @@
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
 		    file://COPYING.LIB.boilerplate;md5=aaddeadcddeb918297e0e4afc52ce46f \
 file://${S}/test/regex/testregex.c;beginline=1;endline=31;md5=234efb227d0a40677f895e4a1e26e960"
-PR = "r9"
 
 require uclibc-config.inc
 
@@ -40,6 +39,12 @@
 
 INHIBIT_DEFAULT_DEPS = "1"
 
+# There appears to be a parallel race in uclibc:
+# GEN /extra/locale/locale_collate.h
+# xargs: ../..//extra/locale/gen_collate: Text file busy
+# make[1]: *** [../..//extra/locale/locale_collate.h] Error 126
+PARALLEL_MAKE = ""
+
 # do_stage barfs on a CC with whitespace, therefore put the 'HOST_CC_ARCH' in
 # the CFLAGS (when building the utils).
 OEMAKE_NO_CC = "'STRIPTOOL=true' 'LD=${LD}'"
@@ -57,13 +62,8 @@
 # -O<n> -fno-omit-frame-pointer ends up with GCC ICE on thumb as reported
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44860
 #
-CFLAGS_arm := "${@oe_filter_out('-fno-omit-frame-pointer', '${CFLAGS}', d)}"
-UCLIBC_EXTRA_CFLAGS  := "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
-
-do_compile_prepend () {
-  unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
-  oe_runmake pregen
-}
+CFLAGS_remove_arm = "-fno-omit-frame-pointer"
+UCLIBC_EXTRA_CFLAGS  = "${@oe_filter_out('(-I\S+|-i\S+)', '${CFLAGS}', d)}"
 
 configmangle = '/^KERNEL_HEADERS/d; \
                 /^RUNTIME_PREFIX/d; \
@@ -71,7 +71,7 @@
                 /^SHARED_LIB_LOADER_PREFIX/d; \
                 /^UCLIBC_EXTRA_CFLAGS/d; \
                 s,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g; \
-                ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][d.getVar("ARM_INSTRUCTION_SET", True) != "arm"]} \
+                ${@["","s,.*COMPILE_IN_THUMB_MODE.*,COMPILE_IN_THUMB_MODE=y,;"][d.getVar("ARM_INSTRUCTION_SET", True) == "thumb"]} \
                 ${@["","s,.*UCLIBC_HAS_LOCALE.*,UCLIBC_HAS_LOCALE=y,;"][d.getVar("USE_NLS", True) == "yes"]} \
                 ${@["","s,.*LDSO_GNU_HASH_SUPPORT.*,# LDSO_GNU_HASH_SUPPORT is not set,;"][d.getVar("TARGET_ARCH", True) in ['mips', 'mipsel', 'mips64', 'mips64el', 'avr32']]} \
                 /^CROSS/d; \
@@ -82,8 +82,8 @@
                 /HAS_FPU/d; \
                 ${@["","s,.*MULTILIB_DIR.*,MULTILIB_DIR=\"${baselib}\",;"][d.getVar("baselib", True) != "lib"]} \
                '
-OE_FEATURES := "${@features_to_uclibc_conf(d)}"
-OE_DEL      := "${@features_to_uclibc_del(d)}"
+OE_FEATURES = "${@features_to_uclibc_conf(d)}"
+OE_DEL      = "${@features_to_uclibc_del(d)}"
 python () {
     if "${OE_DEL}":
         d.setVar('configmangle_append', "${OE_DEL}" + "\n")
diff --git a/yocto-poky/meta/recipes-core/udev/udev/devfs-udev.rules b/yocto-poky/meta/recipes-core/udev/eudev/devfs-udev.rules
similarity index 100%
rename from yocto-poky/meta/recipes-core/udev/udev/devfs-udev.rules
rename to yocto-poky/meta/recipes-core/udev/eudev/devfs-udev.rules
diff --git a/yocto-poky/meta/recipes-core/udev/udev/init b/yocto-poky/meta/recipes-core/udev/eudev/init
similarity index 100%
rename from yocto-poky/meta/recipes-core/udev/udev/init
rename to yocto-poky/meta/recipes-core/udev/eudev/init
diff --git a/yocto-poky/meta/recipes-core/udev/udev/links.conf b/yocto-poky/meta/recipes-core/udev/eudev/links.conf
similarity index 100%
rename from yocto-poky/meta/recipes-core/udev/udev/links.conf
rename to yocto-poky/meta/recipes-core/udev/eudev/links.conf
diff --git a/yocto-poky/meta/recipes-core/udev/udev/local.rules b/yocto-poky/meta/recipes-core/udev/eudev/local.rules
similarity index 100%
rename from yocto-poky/meta/recipes-core/udev/udev/local.rules
rename to yocto-poky/meta/recipes-core/udev/eudev/local.rules
diff --git a/yocto-poky/meta/recipes-core/udev/udev/permissions.rules b/yocto-poky/meta/recipes-core/udev/eudev/permissions.rules
similarity index 100%
rename from yocto-poky/meta/recipes-core/udev/udev/permissions.rules
rename to yocto-poky/meta/recipes-core/udev/eudev/permissions.rules
diff --git a/yocto-poky/meta/recipes-core/udev/udev/run.rules b/yocto-poky/meta/recipes-core/udev/eudev/run.rules
similarity index 100%
rename from yocto-poky/meta/recipes-core/udev/udev/run.rules
rename to yocto-poky/meta/recipes-core/udev/eudev/run.rules
diff --git a/yocto-poky/meta/recipes-core/udev/udev/udev-cache b/yocto-poky/meta/recipes-core/udev/eudev/udev-cache
similarity index 100%
rename from yocto-poky/meta/recipes-core/udev/udev/udev-cache
rename to yocto-poky/meta/recipes-core/udev/eudev/udev-cache
diff --git a/yocto-poky/meta/recipes-core/udev/udev/udev-cache.default b/yocto-poky/meta/recipes-core/udev/eudev/udev-cache.default
similarity index 100%
rename from yocto-poky/meta/recipes-core/udev/udev/udev-cache.default
rename to yocto-poky/meta/recipes-core/udev/eudev/udev-cache.default
diff --git a/yocto-poky/meta/recipes-core/udev/udev/udev.rules b/yocto-poky/meta/recipes-core/udev/eudev/udev.rules
similarity index 100%
rename from yocto-poky/meta/recipes-core/udev/udev/udev.rules
rename to yocto-poky/meta/recipes-core/udev/eudev/udev.rules
diff --git a/yocto-poky/meta/recipes-core/udev/eudev_3.1.5.bb b/yocto-poky/meta/recipes-core/udev/eudev_3.1.5.bb
new file mode 100644
index 0000000..ea19ec4
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/udev/eudev_3.1.5.bb
@@ -0,0 +1,107 @@
+SUMMARY = "eudev is a fork of systemd's udev"
+HOMEPAGE = "https://wiki.gentoo.org/wiki/Eudev"
+LICENSE = "GPLv2.0+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "glib-2.0 glib-2.0-native gperf-native kmod libxslt-native util-linux"
+
+PROVIDES = "udev"
+
+SRC_URI = "https://github.com/gentoo/${BPN}/archive/v${PV}.tar.gz \
+           file://devfs-udev.rules \
+           file://init \
+           file://links.conf \
+           file://local.rules \
+           file://permissions.rules \
+           file://run.rules \
+           file://udev-cache \
+           file://udev-cache.default \
+           file://udev.rules \
+"
+UPSTREAM_CHECK_URI = "https://github.com/gentoo/eudev/releases"
+
+SRC_URI[md5sum] = "e130f892d8744e292cb855db79935f68"
+SRC_URI[sha256sum] = "ce9d5fa91e3a42c7eb95512ca0fa2a631e89833053066bb6cdf42046b2a88553"
+
+inherit autotools update-rc.d qemu
+
+EXTRA_OECONF = " \
+    --sbindir=${base_sbindir} \
+    --libexecdir=${nonarch_base_libdir} \
+    --with-rootlibdir=${base_libdir} \
+    --with-rootprefix= \
+"
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+	install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
+	sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev
+	sed -i s%@UDEVD@%${base_sbindir}/udevd% ${D}${sysconfdir}/init.d/udev-cache
+
+	install -d ${D}${sysconfdir}/default
+	install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
+
+	touch ${D}${sysconfdir}/udev/cache.data
+
+	install -d ${D}${sysconfdir}/udev/rules.d
+	install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
+
+	# Use classic network interface naming scheme
+	touch ${D}${sysconfdir}/udev/rules.d/80-net-name-slot.rules
+
+	# Fix for multilib systems where libs along with confs are installed incorrectly
+	if ! [ -d ${D}${nonarch_base_libdir}/udev ]
+	then
+		install -d ${D}${nonarch_base_libdir}/udev
+		mv ${D}${base_libdir}/udev ${D}${nonarch_base_libdir}
+	fi
+
+	# hid2hci has moved to bluez4. removed in udev as of version 169
+	rm -f ${D}${base_libdir}/udev/hid2hci
+}
+
+INITSCRIPT_PACKAGES = "eudev udev-cache"
+INITSCRIPT_NAME_eudev = "udev"
+INITSCRIPT_PARAMS_eudev = "start 04 S ."
+INITSCRIPT_NAME_udev-cache = "udev-cache"
+INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
+
+PACKAGES =+ "libudev"
+PACKAGES =+ "udev-cache"
+PACKAGES =+ "eudev-hwdb"
+
+
+FILES_${PN} += "${libexecdir} ${nonarch_base_libdir}/udev ${bindir}/udevadm"
+FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
+                   ${includedir}/libudev.h ${libdir}/libudev.so \
+                   ${includedir}/udev.h ${libdir}/libudev.la \
+                   ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc"
+FILES_libudev = "${base_libdir}/libudev.so.*"
+FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache"
+FILES_eudev-hwdb = "${sysconfdir}/udev/hwdb.d"
+
+RDEPENDS_eudev-hwdb += "eudev"
+
+RRECOMMENDS_${PN} += "udev-cache eudev-hwdb"
+
+RPROVIDES_${PN} = "hotplug udev"
+
+python () {
+    if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
+        raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
+}
+
+pkg_postinst_eudev-hwdb () {
+    if test -n "$D"; then
+        ${@qemu_run_binary(d, '$D', '${bindir}/udevadm')} hwdb --update --root $D
+        chown root:root $D${sysconfdir}/udev/hwdb.bin
+    else
+        udevadm hwdb --update
+    fi
+}
+
+pkg_prerm_eudev-hwdb () {
+        rm -f $D${sysconfdir}/udev/hwdb.bin
+}
+
diff --git a/yocto-poky/meta/recipes-core/udev/udev-extraconf/mount.sh b/yocto-poky/meta/recipes-core/udev/udev-extraconf/mount.sh
index 3eea910..d760328 100644
--- a/yocto-poky/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/yocto-poky/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -8,7 +8,7 @@
 MOUNT="/bin/mount"
 PMOUNT="/usr/bin/pmount"
 UMOUNT="/bin/umount"
-for line in `grep -v ^# /etc/udev/mount.blacklist`
+for line in `grep -h -v ^# /etc/udev/mount.blacklist /etc/udev/mount.blacklist.d/*`
 do
 	if [ ` expr match "$DEVNAME" "$line" ` -gt 0 ];
 	then
diff --git a/yocto-poky/meta/recipes-core/udev/udev-extraconf_1.1.bb b/yocto-poky/meta/recipes-core/udev/udev-extraconf_1.1.bb
index 6fbd925..ecd4a8a 100644
--- a/yocto-poky/meta/recipes-core/udev/udev-extraconf_1.1.bb
+++ b/yocto-poky/meta/recipes-core/udev/udev-extraconf_1.1.bb
@@ -23,6 +23,7 @@
     install -m 0644 ${WORKDIR}/autonet.rules       ${D}${sysconfdir}/udev/rules.d/autonet.rules
     install -m 0644 ${WORKDIR}/localextra.rules    ${D}${sysconfdir}/udev/rules.d/localextra.rules
 
+    install -d ${D}${sysconfdir}/udev/mount.blacklist.d
     install -m 0644 ${WORKDIR}/mount.blacklist     ${D}${sysconfdir}/udev/
 
     install -d ${D}${sysconfdir}/udev/scripts/
diff --git a/yocto-poky/meta/recipes-core/udev/udev.inc b/yocto-poky/meta/recipes-core/udev/udev.inc
deleted file mode 100644
index c378ae3..0000000
--- a/yocto-poky/meta/recipes-core/udev/udev.inc
+++ /dev/null
@@ -1,113 +0,0 @@
-SUMMARY = "/dev/ and hotplug management daemon"
-DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \
-/dev/, handles hotplug events and loads drivers at boot time."
-HOMEPAGE = "http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev/udev.html"
-LICENSE = "GPLv2.0+ & LGPLv2.1+"
-LICENSE_${PN} = "GPLv2.0+"
-LICENSE_libudev = "LGPLv2.1+"
-LICENSE_libgudev = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://src/COPYING;md5=17c4e5fb495e6707ac92a3864926f979 \
-                    file://src/gudev/COPYING;md5=fb494485a7d0505308cb68e4997cc266"
-
-LDFLAGS += "-lrt"
-
-DEPENDS = "glib-2.0 libusb usbutils pciutils glib-2.0-native gperf-native libxslt-native util-linux"
-RPROVIDES_${PN} = "hotplug"
-
-PROVIDES = "libgudev"
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
-           file://0001-Fixing-keyboard_force_release.sh-shell-script-path.patch \
-           file://avoid-mouse-autosuspend.patch \
-           file://run.rules \
-           file://udev.rules \
-           file://devfs-udev.rules \
-           file://links.conf \
-           file://permissions.rules \
-           file://local.rules \
-           file://udev-cache \
-           file://udev-cache.default \
-           file://add-install-ptest.patch \
-           file://fix_rule-syntax-regex-ptest.patch \
-           file://run-ptest \
-           file://init"
-
-inherit autotools pkgconfig update-rc.d ptest
-RDEPENDS_${PN}-ptest += "make perl python"
-
-libexecdir = "${base_libdir}"
-EXTRA_OECONF = "--disable-introspection \
-                --with-rootlibdir=${base_libdir} \
-                --with-pci-ids-path=${datadir}/pci.ids \
-                ac_cv_file__usr_share_pci_ids=no \
-                ac_cv_file__usr_share_hwdata_pci_ids=no \
-                ac_cv_file__usr_share_misc_pci_ids=yes \
-                --sbindir=${base_sbindir} \
-                --libexecdir=${nonarch_base_libdir} \
-                --with-rootlibdir=${base_libdir} \
-                --with-rootprefix= \
-                --without-systemdsystemunitdir \
-               "
-
-PACKAGES =+ "udev-cache"
-PACKAGES =+ "libudev"
-PACKAGES =+ "libgudev"
-
-INITSCRIPT_PACKAGES = "udev udev-cache"
-INITSCRIPT_NAME_udev = "udev"
-INITSCRIPT_PARAMS_udev = "start 04 S ."
-INITSCRIPT_NAME_udev-cache = "udev-cache"
-INITSCRIPT_PARAMS_udev-cache = "start 36 S ."
-
-FILES_${PN} += "${libexecdir} ${libdir}/ConsoleKit ${nonarch_base_libdir}/udev ${bindir}/udevadm"
-RRECOMMENDS_${PN} += "udev-cache"
-
-# udev-utils has been removed as a package.  Note that udev conflicts with udev-utils so that
-# udev-utils is removed from systems on upgrade.
-RCONFLICTS_${PN} += "udev-utils"
-RREPLACES_${PN} += "udev-utils"
-
-FILES_${PN}-dbg += "${libexecdir}/.debug"
-FILES_${PN}-dbg += "${base_libdir}/udev/.debug/"
-FILES_${PN}-dbg += "${base_libdir}/udev/.debug/*"
-FILES_${PN}-dbg += "${nonarch_base_libdir}/udev/.debug/*"
-FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc \
-                   ${includedir}/libudev.h ${libdir}/libudev.so ${libdir}/libudev.la \
-                   ${libdir}/libudev.a ${libdir}/pkgconfig/libudev.pc \
-                   ${includedir}/gudev* ${libdir}/libgudev*.so ${libdir}/libgudev*.la \
-                   ${libdir}/libgudev*.a ${libdir}/pkgconfig/gudev*.pc"
-FILES_libudev = "${base_libdir}/libudev.so.*"
-FILES_libgudev = "${base_libdir}/libgudev*.so.* ${libdir}/libgudev*.so.*"
-FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache"
-
-do_install_append () {
-	install -d ${D}${sysconfdir}/init.d
-	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
-	install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache
-	sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev
-	sed -i s%@UDEVD@%${nonarch_base_libdir}/udev/udevd% ${D}${sysconfdir}/init.d/udev-cache
-
-	install -d ${D}${sysconfdir}/default
-	install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache
-
-	touch ${D}${sysconfdir}/udev/cache.data
-
-	install -d ${D}${sysconfdir}/udev/rules.d/
-
-	install -m 0644 ${WORKDIR}/local.rules         ${D}${sysconfdir}/udev/rules.d/local.rules
-
-	# hid2hci has moved to bluez4. removed in udev as of version 169
-	rm -f ${D}${base_libdir}/udev/hid2hci
-
-	echo 'udev_run="/var/run/udev"' >> ${D}${sysconfdir}/udev/udev.conf
-}
-
-# As systemd also builds udev, skip this package if we're doing a systemd build.
-python () {
-    if bb.utils.contains ('DISTRO_FEATURES', 'systemd', True, False, d):
-        raise bb.parse.SkipPackage("'systemd' in DISTRO_FEATURES")
-}
-do_compile_ptest() {
-    oe_runmake test-udev
-}
diff --git a/yocto-poky/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch b/yocto-poky/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch
deleted file mode 100644
index 41deafa..0000000
--- a/yocto-poky/meta/recipes-core/udev/udev/0001-Fixing-keyboard_force_release.sh-shell-script-path.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 0f8290c943da298abd269ca60fd8375dfb219971 Mon Sep 17 00:00:00 2001
-From: Alexandru DAMIAN <alexandru.damian@intel.com>
-Date: Thu, 12 Jul 2012 12:54:48 +0300
-Subject: [PATCH] Fixing keyboard_force_release.sh shell script path
-
-With the introduction of rootprefix, the keyboard-force-release.sh.in
-was modified to be executed with @rootprefix@/bin/sh, which is wrong
-because @rootprefix@ defaults to /usr (which is correct), but the
-shell is always at /bin/sh (IEEE Std 1003.2-1992).
-
-Therefore the interpreter for shell scripts needs to be /bin/sh at all times.
-
-The upstream moved to configurable root prefix, this patch taclkes a 
-transition bug, and will not be applied upstream.
-
-Upstream-Status: Inappropriate [legacy version]
-
-Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
----
- src/keymap/keyboard-force-release.sh.in |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/keymap/keyboard-force-release.sh.in b/src/keymap/keyboard-force-release.sh.in
-index dd040ce..597a3a6 100755
---- a/src/keymap/keyboard-force-release.sh.in
-+++ b/src/keymap/keyboard-force-release.sh.in
-@@ -1,4 +1,4 @@
--#!@rootprefix@/bin/sh -e
-+#!/bin/sh -e
- # read list of scancodes, convert hex to decimal and
- # append to the atkbd force_release sysfs attribute
- # $1 sysfs devpath for serioX
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-core/udev/udev/add-install-ptest.patch b/yocto-poky/meta/recipes-core/udev/udev/add-install-ptest.patch
deleted file mode 100644
index bfc2e94..0000000
--- a/yocto-poky/meta/recipes-core/udev/udev/add-install-ptest.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-Adjustements for ptest:
-
-- Add 'install-ptest' rule.
-- Print a standard result line for each test.
-- Replace the use of "tree" with "find".
-
-Signed-off-by: Björn Stenberg <bjst@enea.com>
-Signed-off-by: Alexandra Safta <alst@enea.com>
-Upstream-Status: Pending
-
-Add missing files for rule-syntax-check
-- Add rule-syntax-check.py
-- Add the deployed udev rules to the testdata
-
-Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
-Upstream-Status: Pending
---- a/Makefile.am	2012-03-18 16:28:14.000000000 +0100
-+++ b/Makefile.am	2013-02-18 10:03:36.531101244 +0100
-@@ -708,3 +708,18 @@
- 	for i in src/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/libudev/; done
- 	for i in src/gudev/docs/html/*.{html,css,png}; do rm -f $$i.sign; gpg --armor --detach-sign --output=$$i.sign $$i; done
- 	for i in src/gudev/docs/html/*.{html,css,png}; do echo $$i; kup put $$i $$i.sign /pub/linux/utils/kernel/hotplug/gudev/; done
-+
-+RULES = rules/* src/accelerometer/61-accelerometer.rules \
-+	 src/cdrom_id/60-cdrom_id.rules \
-+	 src/keymap/95-keyboard-force-release.rules src/keymap/95-keymap.rules \
-+	 src/mtd_probe/75-probe_mtd.rules src/v4l_id/60-persistent-v4l.rules
-+
-+install-ptest:
-+	install test-udev $(DESTDIR)
-+	cp Makefile $(DESTDIR)
-+	sed -i -e 's|^Makefile:|_Makefile:|' $(DESTDIR)/Makefile
-+	install -d $(DESTDIR)/test $(DESTDIR)/rules
-+	(cd $(top_srcdir) && install $(TESTS) $(DESTDIR)/test)
-+	(cd $(top_srcdir) && install test/rule-syntax-check.py $(DESTDIR)/test)
-+	(cd $(top_srcdir) && install $(RULES) $(DESTDIR)/rules)
-+	cp $(top_srcdir)/test/sys.tar.xz $(DESTDIR)/test/
---- a/test/udev-test.pl	2012-03-18 16:43:36.000000000 +0100
-+++ b/test/udev-test.pl	2013-02-18 10:31:29.706357321 +0100
-@@ -1459,11 +1459,13 @@
-                 print "add:         error";
-                 if ($rules->{exp_add_error}) {
-                         print " as expected\n";
-+                        print "XFAIL: TEST $number: $rules->{desc}: add\n";
-                 } else {
-                         print "\n";
--                        system("tree $udev_root");
-+                        system("find $udev_root");
-                         print "\n";
-                         $error++;
-+                        print "FAIL: TEST $number: $rules->{desc}: add\n";
-                         sleep(1);
-                 }
-         }
-@@ -1479,15 +1481,18 @@
-                 print "remove:      error";
-                 if ($rules->{exp_rem_error}) {
-                         print " as expected\n";
-+                        print "XFAIL: TEST $number: $rules->{desc}: remove\n";
-                 } else {
-                         print "\n";
--                        system("tree $udev_root");
-+                        system("find $udev_root");
-                         print "\n";
-                         $error++;
-+                        print "FAIL: TEST $number: $rules->{desc}: remove\n";
-                         sleep(1);
-                 }
-         } else {
-                 print "remove:      ok\n";
-+                print "PASS: TEST $number: $rules->{desc}: remove\n";
-         }
- 
-         print "\n";
---- a/configure.ac      2013-11-28 09:14:02.814248826 +0100
-+++ b/configure.ac      2013-11-28 09:14:34.260874296 +0100
-@@ -6,7 +6,7 @@
-        [http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html])
- AC_CONFIG_SRCDIR([src/udevd.c])
- AC_CONFIG_AUX_DIR([build-aux])
--AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects])
-+AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects serial-tests])
- AC_USE_SYSTEM_EXTENSIONS
- AC_SYS_LARGEFILE
- AC_CONFIG_MACRO_DIR([m4])
-
diff --git a/yocto-poky/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch b/yocto-poky/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch
deleted file mode 100644
index 2c31b33..0000000
--- a/yocto-poky/meta/recipes-core/udev/udev/avoid-mouse-autosuspend.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Source: http://cgit.freedesktop.org/systemd/systemd/commit/rules/42-usb-hid-pm.rules?id=e0386cf2809219bbdd30895f46f1f567b56902b6
-
-Some USB ports on external hubs may be reported as "fixed". We only want
-to auto-enable this on ports that are internal to the machine, so check
-the parent state as well.
-
-Upstream-Status: backport
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-2013/09/13
-
-Index: udev-182/rules/42-usb-hid-pm.rules
-===================================================================
---- udev-182.orig/rules/42-usb-hid-pm.rules
-+++ udev-182/rules/42-usb-hid-pm.rules
-@@ -46,4 +46,9 @@ ACTION=="add", SUBSYSTEM=="usb", ATTRS{i
- ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="14dd", ATTR{idProduct}="0002", TEST=="power/control", ATTR{power/control}="auto"
-
- # USB HID devices that are internal to the machine should also be safe to autosuspend
-+# And skip it for devices which are external but say "fixed"
-+ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="removable", GOTO="usb_hid_pm_end"
-+ACTION=="add", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", ATTRS{removable}=="unknown", GOTO="usb_hid_pm_end"
- ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="03", ATTRS{removable}=="fixed", TEST=="../power/control", ATTR{../power/control}="auto"
-+LABEL="usb_hid_pm_end"
-+
diff --git a/yocto-poky/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch b/yocto-poky/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch
deleted file mode 100644
index 593c46c..0000000
--- a/yocto-poky/meta/recipes-core/udev/udev/fix_rule-syntax-regex-ptest.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-The rule-syntax-check script fails with errors like this:
-
-Invalid line /lib/udev/rules.d/95-keymap.rules:49: ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", ATTR{[dmi/id]product_name}=="W3J", RUN+="keymap $name module-asus-w3j"
-('  clause:', 'ATTR{[dmi/id]product_name}=="W3J"')
-()
-
-
-Move line comment from end of rules file to its own line, the regex used to
-test correct syntax choke on it.
-
-The rule-syntax-check.py uses regex which errournessly complains on ATTR rules
-of the form ATTR{[dmi/id]board_name}=="30B7"
-Use the regex from systemd's script which allow [] characters and additional
-compare operators
-
-The Makefile passes rules-test.sh script a build host path to the testdata.
-Ignore the argument and use a relative path instead.
-
-
-Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
-Upstream-Status: Inappropriate (cross environment path)
-
-diff -Naur udev-182.orig/src/keymap/95-keymap.rules udev-182/src/keymap/95-keymap.rules
---- udev-182.orig/src/keymap/95-keymap.rules	2012-02-07 00:01:55.154640792 +0100
-+++ udev-182/src/keymap/95-keymap.rules	2015-01-24 20:58:40.156930520 +0100
-@@ -94,7 +94,8 @@
- ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP G62 Notebook PC", RUN+="keymap $name 0xB2 www"
- ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill"
- # HP Pavillion dv6315ea has empty DMI_VENDOR
--ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play
-+# "quick play"
-+ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media"
- 
- # Gateway clone of Acer Aspire One AOA110/AOA150
- ENV{DMI_VENDOR}=="Gateway*", ATTR{[dmi/id]product_name}=="*AOA1*", RUN+="keymap $name acer"
-diff -Naur udev-182.orig/test/rule-syntax-check.py udev-182/test/rule-syntax-check.py
---- udev-182.orig/test/rule-syntax-check.py	2012-02-15 20:10:12.872333342 +0100
-+++ udev-182/test/rule-syntax-check.py	2015-01-24 21:08:00.496049600 +0100
-@@ -28,7 +28,7 @@
- no_args_tests = re.compile('(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$')
- args_tests = re.compile('(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$')
- no_args_assign = re.compile('(NAME|SYMLINK|OWNER|GROUP|MODE|TAG|PROGRAM|RUN|LABEL|GOTO|WAIT_FOR|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*"([^"]*)"$')
--args_assign = re.compile('(ATTR|ENV|IMPORT){([a-zA-Z0-9/_.*%-]+)}\s*=\s*"([^"]*)"$')
-+args_assign = re.compile('(ATTR|ENV|IMPORT|RUN){([][a-zA-Z0-9/_.*%-]+)}\s*(=|==|\+=)\s*"([^"]*)"$')
- 
- result = 0
- buffer = ''
---- udev-182.orig/test/rules-test.sh	2012-01-29 01:15:46.000000000 +0100
-+++ udev-182/test/rules-test.sh	2015-01-24 17:53:51.201858658 +0100
-@@ -4,7 +4,7 @@
- # (C) 2010 Canonical Ltd.
- # Author: Martin Pitt <martin.pitt@ubuntu.com>
- 
--[ -n "$srcdir" ] || srcdir=`dirname $0`/..
-+srcdir=`dirname $0`/..
- 
- # skip if we don't have python
- type python >/dev/null 2>&1 || {
diff --git a/yocto-poky/meta/recipes-core/udev/udev/run-ptest b/yocto-poky/meta/recipes-core/udev/udev/run-ptest
deleted file mode 100644
index 0e39806..0000000
--- a/yocto-poky/meta/recipes-core/udev/udev/run-ptest
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-tar -C test/ -xJf test/sys.tar.xz
-make -k check-TESTS
-make test-sys-distclean
diff --git a/yocto-poky/meta/recipes-core/udev/udev_182.bb b/yocto-poky/meta/recipes-core/udev/udev_182.bb
deleted file mode 100644
index b216352..0000000
--- a/yocto-poky/meta/recipes-core/udev/udev_182.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-include udev.inc
-
-PR = "r9"
-
-# module-init-tools from kmod_git will provide libkmod runtime
-DEPENDS += "module-init-tools"
-
-SRC_URI[md5sum] = "1b964456177fbf48023dfee7db3a708d"
-SRC_URI[sha256sum] = "7857ed19fafd8f3ca8de410194e8c7336e9eb8a20626ea8a4ba6449b017faba4"
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux.inc b/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
index 594108f..a1614c2 100644
--- a/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
+++ b/yocto-poky/meta/recipes-core/util-linux/util-linux.inc
@@ -17,7 +17,7 @@
                     file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \
                     file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
 
-inherit autotools gettext pkgconfig systemd update-alternatives python-dir
+inherit autotools gettext pkgconfig systemd update-alternatives python-dir ptest bash-completion
 DEPENDS = "zlib ncurses"
 DEPENDS_append_class-native = " lzo-native"
 DEPENDS_append_class-nativesdk = " lzo-native"
@@ -31,9 +31,10 @@
              util-linux-uuidgen util-linux-lscpu util-linux-fsck util-linux-blkid \
              util-linux-mkfs util-linux-mcookie util-linux-reset \
              util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \
-             util-linux-partx ${PN}-bash-completion util-linux-hwclock \
+             util-linux-partx util-linux-hwclock util-linux-mountpoint \
              util-linux-findfs util-linux-getopt util-linux-sulogin"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
+PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
 
 PACKAGES_DYNAMIC = "^util-linux-lib.*"
 
@@ -61,11 +62,12 @@
 # Build python bindings for libmount
 PACKAGECONFIG[pylibmount] = "--with-python --enable-pylibmount,--without-python --disable-pylibmount,python"
 
-FILES_${PN}-bash-completion += "${datadir}/bash-completion"
+# Readline support
+PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
+
 FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
 
 FILES_${PN}-dev += "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.la"
-FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/dist-packages/libmount/.debug/"
 
 FILES_util-linux-agetty = "${base_sbindir}/agetty"
 FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}"
@@ -85,6 +87,7 @@
 FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
 FILES_util-linux-findfs = "${sbindir}/findfs"
 FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
+FILES_util-linux-runuser = "${sbindir}/runuser"
 
 FILES_util-linux-pylibmount = "${libdir}/${PYTHON_DIR}/dist-packages/libmount/pylibmount.so \
                                ${libdir}/${PYTHON_DIR}/dist-packages/libmount/__init__.*"
@@ -97,6 +100,7 @@
 FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
 
 FILES_util-linux-sulogin = "${base_sbindir}/sulogin*"
+FILES_util-linux-mountpoint = "${base_bindir}/mountpoint.${BPN}"
 
 # Util-linux' blkid replaces the e2fsprogs one
 FILES_util-linux-blkid = "${base_sbindir}/blkid*"
@@ -106,8 +110,12 @@
 # reset calls 'tput'
 RDEPENDS_util-linux-reset += "ncurses"
 
+RDEPENDS_util-linux-runuser += "libpam"
+
 RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin"
-RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs "
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
+
+RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint"
 
 RRECOMMENDS_${PN}_class-native = ""
 RRECOMMENDS_${PN}_class-nativesdk = ""
@@ -124,7 +132,7 @@
 
 do_compile () {
 	set -e
-	oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}' 
+	oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'
 }
 
 do_install () {
@@ -139,7 +147,7 @@
 
         sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
         sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root"
-        binprogs_a="dmesg getopt kill more umount mount login reset su"
+        binprogs_a="dmesg getopt kill more umount mount login reset su mountpoint"
 
         if [ "${base_sbindir}" != "${sbindir}" ]; then
         	mkdir -p ${D}${base_sbindir}
@@ -177,7 +185,7 @@
 	rm -f ${D}${base_sbindir}/nologin
 }
 
-ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_PRIORITY = "80"
 
 ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root switch_root"
 ALTERNATIVE_${PN} += "mkfs.minix hexdump last lastb logger mesg renice wall"
@@ -212,9 +220,6 @@
 ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3"
 
 ALTERNATIVE_util-linux-hwclock = "hwclock"
-# There seems to be problem, atleast on nslu2, with these, untill they are
-# fixed the busybox ones have higher priority
-ALTERNATIVE_PRIORITY[hwclock] = "10"
 ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock"
 
 ALTERNATIVE_util-linux-fdisk = "fdisk"
@@ -257,6 +262,9 @@
 ALTERNATIVE_util-linux-sulogin = "sulogin"
 ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
 
+ALTERNATIVE_util-linux-mountpoint = "mountpoint"
+ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
+
 BBCLASSEXTEND = "native nativesdk"
 
 python do_package_prepend () {
@@ -272,3 +280,32 @@
                       description='util-linux lib%s',
                       extra_depends='', prepend=True, allow_links=True)
 }
+
+RDEPENDS_${PN}-ptest = "bash"
+
+do_compile_ptest() {
+    oe_runmake buildtest-TESTS
+}
+
+do_install_ptest() {
+    mkdir -p ${D}${PTEST_PATH}/tests/ts
+    find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
+    cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/
+    cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/
+    cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/
+    cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
+
+    list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look md5 misc more namei paths schedutils script swapon tailf"
+    # The following tests are not installed  yet:
+    # blkid scsi_debug module dependent
+    # cramfs gcc dependent
+    # eject gcc dependent
+    # fdisk scsi_debug module and gcc dependent
+    # lscpu gcc dependant
+    # libmount uuidgen dependent
+    # mount gcc dependant
+    # partx blkid dependant
+    for d in $list; do
+        cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/
+    done
+}
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
new file mode 100644
index 0000000..46d4d37
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_parallel_tests.patch
@@ -0,0 +1,19 @@
+Ptest needs buildtest-TESTS and runtest-TESTS targets.
+serial-tests is required to generate those targets.
+Revert run.sh script accordingly to serialize running tests 
+
+Signed-off-by: Tudor Florea  <tudor.florea@enea.com>
+Upstream-Status: Inappropriate 
+
+diff -ruN a/configure.ac b/configure.ac
+--- a/configure.ac	2014-05-27 12:37:42.119772658 +0200
++++ b/configure.ac	2014-05-27 12:41:46.225573272 +0200
+@@ -10,7 +10,7 @@
+ dnl AC_USE_SYSTEM_EXTENSIONS must be called before any macros that run
+ dnl the compiler (like AC_PROG_LIBTOOL) to avoid autoconf errors.
+ AC_USE_SYSTEM_EXTENSIONS
+-AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects])
++AM_INIT_AUTOMAKE([-Wall foreign 1.10 tar-pax dist-bzip2 no-dist-gzip dist-xz -Wno-portability subdir-objects serial-tests])
+
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
+ 			    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch
new file mode 100644
index 0000000..a0d5efa
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_grep_opts.patch
@@ -0,0 +1,57 @@
+Avoid unsupported grep options
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Upstream-Status: Pending
+
+diff -ruN a/ts/ipcs/headers b/ts/ipcs/headers
+--- a/tests/ts/ipcs/headers	2013-09-04 11:03:36.118613250 +0200
++++ b/teste/ts/ipcs/headers	2013-09-04 11:03:27.906958437 +0200
+@@ -22,35 +22,35 @@
+ ts_init "$*"
+ 
+ ts_log "test: shm headers"
+-$TS_CMD_IPCS -m -t | grep --after-context=1 "^---"  >> $TS_OUTPUT
+-$TS_CMD_IPCS -m -p | grep --after-context=1 "^---"  >> $TS_OUTPUT
+-$TS_CMD_IPCS -m -c | grep --after-context=1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -m -t | grep -A 1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -m -p | grep -A 1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -m -c | grep -A 1 "^---"  >> $TS_OUTPUT
+ $TS_CMD_IPCS -m -l | grep "^---"  >> $TS_OUTPUT
+ $TS_CMD_IPCS -m -u | grep "^---"  >> $TS_OUTPUT
+ echo >> $TS_OUTPUT
+ 
+ ts_log "test: mesg headers"
+-$TS_CMD_IPCS -q -t | grep --after-context=1 "^---"  >> $TS_OUTPUT
+-$TS_CMD_IPCS -q -p | grep --after-context=1 "^---"  >> $TS_OUTPUT
+-$TS_CMD_IPCS -q -c | grep --after-context=1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -q -t | grep -A 1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -q -p | grep -A 1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -q -c | grep -A 1 "^---"  >> $TS_OUTPUT
+ $TS_CMD_IPCS -q -l | grep  "^---"  >> $TS_OUTPUT
+ $TS_CMD_IPCS -q -u | grep  "^---"  >> $TS_OUTPUT
+ echo >> $TS_OUTPUT
+ 
+ ts_log "test: sem headers"
+-$TS_CMD_IPCS -s -t | grep --after-context=1 "^---"  >> $TS_OUTPUT
+-$TS_CMD_IPCS -s -p | grep --after-context=1 "^---"  >> $TS_OUTPUT
+-$TS_CMD_IPCS -s -c | grep --after-context=1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -s -t | grep -A 1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -s -p | grep -A 1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -s -c | grep -A 1 "^---"  >> $TS_OUTPUT
+ $TS_CMD_IPCS -s -l | grep  "^---"  >> $TS_OUTPUT
+ $TS_CMD_IPCS -s -u | grep  "^---"  >> $TS_OUTPUT
+ echo >> $TS_OUTPUT
+ 
+ ts_log "test: all headers"
+-$TS_CMD_IPCS -a | grep --after-context=1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -a | grep -A 1 "^---"  >> $TS_OUTPUT
+ 
+-$TS_CMD_IPCS -a -t | grep --after-context=1 "^---"  >> $TS_OUTPUT
+-$TS_CMD_IPCS -a -p | grep --after-context=1 "^---"  >> $TS_OUTPUT
+-$TS_CMD_IPCS -a -c | grep --after-context=1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -a -t | grep -A 1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -a -p | grep -A 1 "^---"  >> $TS_OUTPUT
++$TS_CMD_IPCS -a -c | grep -A 1 "^---"  >> $TS_OUTPUT
+ $TS_CMD_IPCS -a -l | grep "^---"  >> $TS_OUTPUT
+ $TS_CMD_IPCS -a -u | grep "^---"  >> $TS_OUTPUT
+ 
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch
new file mode 100644
index 0000000..7a63a4e
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/avoid_unsupported_sleep_param.patch
@@ -0,0 +1,20 @@
+Avoid unsupported sleep parameter
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Upstream-Status: Pending
+
+diff -ruN a/simple b/simple
+--- a/tests/ts/tailf/simple	2015-11-12 11:34:49.971817130 +0200
++++ b/tests/ts/tailf/simple	2013-11-12 11:34:37.876325128 +0200
+@@ -27,9 +27,9 @@
+ 
+ $TS_CMD_TAILF $INPUT > $TS_OUTPUT 2>&1 &
+ 
+-sleep 0.5
++sleep 1
+ echo {0..9} >> $INPUT
+-sleep 0.5
++sleep 1
+ 
+ rm -f $INPUT
+ 
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
new file mode 100644
index 0000000..0eb8810
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/display_testname_for_subtest.patch
@@ -0,0 +1,18 @@
+Display testname for subtest
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Upstream-Status: Pending
+
+diff -ruN a/functions.sh b/functions.sh
+--- a/tests/functions.sh	2015-11-12 21:32:02.434542124 +0100
++++ b/tests/functions.sh	2015-11-12 21:40:37.095317280 +0100
+@@ -297,7 +297,7 @@
+ 	if [ "$TS_PARALLEL" == "yes" ]; then
+ 		TS_TITLE=$(printf "%13s: %-30s ...\n%16s: %-27s ..." "$TS_COMPONENT" "$TS_DESC" "" "$TS_SUBNAME")
+ 	else
+-		TS_TITLE=$(printf "%16s: %-27s ..." "" "$TS_SUBNAME")
++               TS_TITLE=$(printf "%13s: %-30s ..." "$TS_COMPONENT" "$TS_SUBNAME")
+ 		echo -n "$TS_TITLE"
+ 	fi
+ }
+
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/fix-parallel-build.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/fix-parallel-build.patch
deleted file mode 100644
index adb271c..0000000
--- a/yocto-poky/meta/recipes-core/util-linux/util-linux/fix-parallel-build.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 774f55f9dd22c01e4041a183d8dff14811f29114 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Fri, 4 Apr 2014 17:33:04 +0800
-Subject: [PATCH] sys-utils/Makemodule.am: fix parallel build issue
-
-The rule SETARCH_MAN_LINKS is used for the files under the sys-utils
-dir, for example:
-
-echo ".so man8/setarch.8" > sys-utils/linux32.8
-
-but it depends on nothing so that the sys-utils dir may not exist, we
-can create the sys-utils dir to fix problem.
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- sys-utils/Makemodule.am | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/sys-utils/Makemodule.am b/sys-utils/Makemodule.am
-index 6265282..62ead37 100644
---- a/sys-utils/Makemodule.am
-+++ b/sys-utils/Makemodule.am
-@@ -124,6 +124,7 @@ man_MANS += $(SETARCH_MAN_LINKS)
- CLEANFILES += $(SETARCH_MAN_LINKS)
- 
- $(SETARCH_MAN_LINKS):
-+	$(MKDIR_P) sys-utils
- 	$(AM_V_GEN)echo ".so man8/setarch.8" > $@
- 
- install-exec-hook-setarch:
--- 
-1.8.2.1
-
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch
new file mode 100644
index 0000000..837f189
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/ptest.patch
@@ -0,0 +1,17 @@
+Define TESTS variable
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Upstream-Status: Pending
+
+diff -ruN a/Makefile.am b/Makefile.am
+--- a/Makefile.am	2015-11-12 20:29:46.778396936 +0100
++++ b/Makefile.am	2015-11-12 20:32:24.342450279 +0100
+@@ -48,7 +48,7 @@
+ dist_bashcompletion_DATA =
+ check_PROGRAMS =
+ dist_check_SCRIPTS =
+-TESTS =
++TESTS = $(check_PROGRAMS)
+ 
+ PATHFILES =
+
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/run-ptest b/yocto-poky/meta/recipes-core/util-linux/util-linux/run-ptest
new file mode 100644
index 0000000..fbc2f9b
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/run-ptest
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+cd tests || exit 1                                                          
+
+comps=$(find ts/ -type f -perm -111 -regex ".*/[^\.~]*" |  sort)
+
+
+echo
+echo "-------------------- util-linux regression tests --------------------"
+echo
+echo "                    For development purpose only.                    "
+echo "                 Don't execute on production system!                 "
+echo
+
+res=0
+count=0
+for ts in $comps; 
+do 
+   $ts | sed '{        
+      s/^\(.*\):\(.*\) \.\.\. OK$/PASS: \1:\2/                              
+      s/^\(.*\):\(.*\) \.\.\. FAILED \(.*\)$/FAIL: \1:\2 \3/                
+      s/^\(.*\):\(.*\) \.\.\. SKIPPED \(.*\)$/SKIP: \1:\2 \3/               
+   }' 
+done
+
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch
deleted file mode 100644
index 5031a73..0000000
--- a/yocto-poky/meta/recipes-core/util-linux/util-linux/uclibc-__progname-conflict.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-configure should include errno.h instead of argp.h when
-checking for presence of program_invocation_short_name
-uclibc defines this to be const char* unlike util-linux-ng
-which defines this to be char* so this error goes unnoticed
-on glibc/eglibc systems.
-
-here is the error it fixes
-
-in file included from mountP.h:14:0,                                                                               
-                 from cache.c:29:                                                                                  
-/home/kraj/work/slugos/build/tmp-slugos-uclibc/sysroots/nslu2le/usr/include/errno.h:55:46: error: conflicting types for '__progname'                                                                                                  
-../../../include/c.h:118:14: note: previous declaration of '__progname' was here                                   
-make[3]: *** [cache.lo] Error 1          
-
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-Upstream-Status: Pending
-Index: util-linux-2.22.1/configure.ac
-===================================================================
---- util-linux-2.22.1.orig/configure.ac
-+++ util-linux-2.22.1/configure.ac
-@@ -372,7 +372,7 @@ esac
- 
- AC_MSG_CHECKING([whether program_invocation_short_name is defined])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
--	#include <argp.h>
-+	#include <errno.h>
- ]], [[
- 	program_invocation_short_name = "test";
- ]])], [
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch
deleted file mode 100644
index 6717a75..0000000
--- a/yocto-poky/meta/recipes-core/util-linux/util-linux/util-linux-ng-replace-siginterrupt.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- login-utils/login.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/login-utils/login.c b/login-utils/login.c
-index ebb76f5..38c881b 100644
---- a/login-utils/login.c
-+++ b/login-utils/login.c
-@@ -1110,6 +1110,7 @@ int main(int argc, char **argv)
- 	char *buff;
- 	int childArgc = 0;
- 	int retcode;
-+	struct sigaction act;
- 
- 	char *pwdbuf = NULL;
- 	struct passwd *pwd = NULL, _pwd;
-@@ -1123,7 +1124,9 @@ int main(int argc, char **argv)
- 	timeout = (unsigned int)getlogindefs_num("LOGIN_TIMEOUT", LOGIN_TIMEOUT);
- 
- 	signal(SIGALRM, timedout);
--	siginterrupt(SIGALRM, 1);	/* we have to interrupt syscalls like ioctl() */
-+	(void) sigaction(SIGALRM, NULL, &act);
-+	act.sa_flags &= ~SA_RESTART;
-+	sigaction(SIGALRM, &act, NULL);
- 	alarm(timeout);
- 	signal(SIGQUIT, SIG_IGN);
- 	signal(SIGINT, SIG_IGN);
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch b/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
new file mode 100644
index 0000000..1b0ff79
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/util-linux/util-linux/uuid-test-error-api.patch
@@ -0,0 +1,92 @@
+This patch adds error() API implementation for non-glibc system C libs
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: util-linux-2.27.1/tests/helpers/test_uuidd.c
+===================================================================
+--- util-linux-2.27.1.orig/tests/helpers/test_uuidd.c
++++ util-linux-2.27.1/tests/helpers/test_uuidd.c
+@@ -23,7 +23,6 @@
+  *
+  *	make uuidd uuidgen localstatedir=/var
+  */
+-#include <error.h>
+ #include <libgen.h>
+ #include <pthread.h>
+ #include <stdio.h>
+@@ -39,6 +38,17 @@
+ #include "xalloc.h"
+ #include "strutils.h"
+ 
++#ifdef __GLIBC__
++#include <error.h>
++#else
++extern void (*error_print_progname)(void);
++extern unsigned int error_message_count;
++extern int error_one_per_line;
++
++void error(int, int, const char *, ...);
++void error_at_line(int, int, const char *, unsigned int, const char *, ...);
++#endif
++
+ #define LOG(level,args) if (loglev >= level) { fprintf args; }
+ 
+ size_t nprocesses = 4;
+@@ -257,6 +267,56 @@ static void object_dump(size_t idx, obje
+ 	fprintf(stderr, "}\n");
+ }
+ 
++#ifndef __GLIBC__
++extern char *__progname;
++
++void (*error_print_progname)(void) = 0;
++unsigned int error_message_count = 0;
++int error_one_per_line = 0;
++
++static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap)
++{
++	if (file && error_one_per_line) {
++		static const char *oldfile;
++		static unsigned int oldline;
++		if (line == oldline && strcmp(file, oldfile) == 0)
++			return;
++		oldfile = file;
++		oldline = line;
++	}
++	if (error_print_progname)
++		error_print_progname();
++	else
++		fprintf(stderr, "%s: ", __progname);
++	if (file)
++		fprintf(stderr, "%s:%u: ", file, line);
++	vfprintf(stderr, fmt, ap);
++	if (e)
++		fprintf(stderr, ": %s", strerror(e));
++	putc('\n', stderr);
++	fflush(stderr);
++	error_message_count++;
++	if (status)
++		exit(status);
++}
++
++void error(int status, int e, const char *fmt, ...)
++{
++	va_list ap;
++	va_start(ap,fmt);
++	eprint(status, e, 0, 0, fmt, ap);
++	va_end(ap);
++}
++
++void error_at_line(int status, int e, const char *file, unsigned int line, const char *fmt, ...)
++{
++	va_list ap;
++	va_start(ap,fmt);
++	eprint(status, e, file, line, fmt, ap);
++	va_end(ap);
++}
++#endif /* __GLIBC__ */
++
+ int main(int argc, char *argv[])
+ {
+ 	size_t i, nfailed = 0, nignored = 0;
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux_2.26.2.bb b/yocto-poky/meta/recipes-core/util-linux/util-linux_2.26.2.bb
deleted file mode 100644
index e09fdfa..0000000
--- a/yocto-poky/meta/recipes-core/util-linux/util-linux_2.26.2.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-MAJOR_VERSION = "2.26"
-require util-linux.inc
-
-# To support older hosts, we need to patch and/or revert
-# some upstream changes.  Only do this for native packages.
-OLDHOST = ""
-OLDHOST_class-native = "file://util-linux-native.patch \
-                        file://util-linux-native-qsort.patch \
-			"
-
-SRC_URI += "file://util-linux-ng-replace-siginterrupt.patch \
-            file://util-linux-ng-2.16-mount_lock_path.patch \
-            file://uclibc-__progname-conflict.patch \
-            file://configure-sbindir.patch \
-            file://fix-parallel-build.patch \
-            file://runuser.pamd \
-            file://runuser-l.pamd \
-            ${OLDHOST} \
-"
-SRC_URI[md5sum] = "9bdf368c395f1b70325d0eb22c7f48fb"
-SRC_URI[sha256sum] = "0e29bda142528a48a0a953c39ff63093651a4809042e1790fbd6aa8663fd9666"
-
-CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
-
-EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
-                             --disable-fallocate \
-			     --disable-use-tty-group \
-"
-EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \
-                                --disable-fallocate \
-				--disable-use-tty-group \
-"
diff --git a/yocto-poky/meta/recipes-core/util-linux/util-linux_2.27.1.bb b/yocto-poky/meta/recipes-core/util-linux/util-linux_2.27.1.bb
new file mode 100644
index 0000000..7549158
--- /dev/null
+++ b/yocto-poky/meta/recipes-core/util-linux/util-linux_2.27.1.bb
@@ -0,0 +1,36 @@
+MAJOR_VERSION = "2.27"
+require util-linux.inc
+
+# To support older hosts, we need to patch and/or revert
+# some upstream changes.  Only do this for native packages.
+OLDHOST = ""
+OLDHOST_class-native = "file://util-linux-native.patch \
+                        file://util-linux-native-qsort.patch \
+			"
+
+SRC_URI += "file://util-linux-ng-2.16-mount_lock_path.patch \
+            file://configure-sbindir.patch \
+            file://runuser.pamd \
+            file://runuser-l.pamd \
+            ${OLDHOST} \
+            file://ptest.patch \
+            file://run-ptest \
+            file://avoid_unsupported_sleep_param.patch \
+            file://avoid_unsupported_grep_opts.patch \
+            file://display_testname_for_subtest.patch \
+            file://avoid_parallel_tests.patch \
+            file://uuid-test-error-api.patch \
+"
+SRC_URI[md5sum] = "3cd2698d1363a2c64091c2dadc974647"
+SRC_URI[sha256sum] = "0a818fcdede99aec43ffe6ca5b5388bff80d162f2f7bd4541dca94fecb87a290"
+
+CACHED_CONFIGUREVARS += "scanf_cv_alloc_modifier=ms"
+
+EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
+                             --disable-fallocate \
+			     --disable-use-tty-group \
+"
+EXTRA_OECONF_class-nativesdk = "${SHARED_EXTRA_OECONF} \
+                                --disable-fallocate \
+				--disable-use-tty-group \
+"
diff --git a/yocto-poky/meta/recipes-devtools/apt/apt.inc b/yocto-poky/meta/recipes-devtools/apt/apt.inc
index 3248b9a..78ef5a7 100644
--- a/yocto-poky/meta/recipes-devtools/apt/apt.inc
+++ b/yocto-poky/meta/recipes-devtools/apt/apt.inc
@@ -11,11 +11,16 @@
            file://nodoc.patch \
            file://disable-configure-in-makefile.patch \
            file://disable-test.patch \
+           file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
            "
 SRC_URI[md5sum] = "6505c4297b338adb2087ce87bbc4a276"
 SRC_URI[sha256sum] = "3fb1de9598363c416591d49e3c285458e095b035e6c06d5b944a54e15fc9b543"
 LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=0636e73ff0215e8d672dc4c32c317bb3"
 
+# 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/a/apt/"
+
 inherit autotools gettext
 
 EXTRA_AUTORECONF = "--exclude=autopoint,autoheader"
@@ -24,5 +29,3 @@
     rm -rf ${S}/buildlib/config.sub
     rm -rf ${S}/buildlib/config.guess
 }
-
-FILES_${PN}-dbg += "${libdir}/apt/methods/.debug/"
diff --git a/yocto-poky/meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch b/yocto-poky/meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch
new file mode 100644
index 0000000..042372b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/apt/apt/0001-environment.mak-musl-based-systems-can-generate-shar.patch
@@ -0,0 +1,29 @@
+From 2f8aa21ace375c18977ed908b291c80a210a93c6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 08:06:12 +0000
+Subject: [PATCH] environment.mak: musl based systems can generate shared
+ objects too
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ buildlib/environment.mak.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in
+index b0a8d9d..3a52344 100644
+--- a/buildlib/environment.mak.in
++++ b/buildlib/environment.mak.in
+@@ -68,7 +68,7 @@ NEED_SOCKLEN_T_DEFINE = @NEED_SOCKLEN_T_DEFINE@
+ 
+ # Shared library things
+ HOST_OS = @host_os@
+-ifneq ($(words $(filter gnu% linux-gnu% kfreebsd-gnu% %-gnu,$(HOST_OS))),0)
++ifneq ($(words $(filter gnu% linux-gnu% kfreebsd-gnu% %-gnu linux-musl%,$(HOST_OS))),0)
+    SONAME_MAGIC=-Wl,-soname -Wl,
+    LFLAGS_SO=
+ else
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-devtools/apt/apt_1.0.10.1.bb b/yocto-poky/meta/recipes-devtools/apt/apt_1.0.10.1.bb
index bf77e2a..85c0d56 100644
--- a/yocto-poky/meta/recipes-devtools/apt/apt_1.0.10.1.bb
+++ b/yocto-poky/meta/recipes-devtools/apt/apt_1.0.10.1.bb
@@ -1,4 +1,4 @@
-DEPENDS = "curl db"
+DEPENDS = "curl db zlib"
 RDEPENDS_${PN} = "dpkg bash debianutils"
 require apt.inc
 
@@ -6,6 +6,7 @@
 
 PACKAGECONFIG ??= "lzma"
 PACKAGECONFIG[lzma] = "ac_cv_lib_lzma_lzma_easy_encoder=yes,ac_cv_lib_lzma_lzma_easy_encoder=no,xz"
+PACKAGECONFIG[bz2] = "ac_cv_lib_bz2_BZ2_bzopen=yes,ac_cv_lib_bz2_BZ2_bzopen=no,bzip2"
 
 FILES_${PN} += "${bindir}/apt-key"
 apt-manpages += "doc/apt-key.8"
diff --git a/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc b/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
index 78b77e8..b4e3356 100644
--- a/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
+++ b/yocto-poky/meta/recipes-devtools/autoconf/autoconf.inc
@@ -20,6 +20,7 @@
 		  perl-module-file-glob \
 		  perl-module-file-path \
 		  perl-module-file-stat \
+		  perl-module-file-find \
 		  perl-module-getopt-long \
 		  perl-module-io-file \
 		  perl-module-posix \
diff --git a/yocto-poky/meta/recipes-devtools/autoconf/autoconf/add_musl_config.patch b/yocto-poky/meta/recipes-devtools/autoconf/autoconf/add_musl_config.patch
new file mode 100644
index 0000000..a9094d2
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/autoconf/autoconf/add_musl_config.patch
@@ -0,0 +1,26 @@
+backport http://git.savannah.gnu.org/cgit/config.git/commit/config.sub?id=062587eaa891396c936555ae51f7e77eeb71a5fe
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+Index: autoconf-2.69/build-aux/config.sub
+===================================================================
+--- autoconf-2.69.orig/build-aux/config.sub
++++ autoconf-2.69/build-aux/config.sub
+@@ -123,7 +123,7 @@ esac
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+-  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
++  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+   knetbsd*-gnu* | netbsd*-gnu* | \
+   kopensolaris*-gnu* | \
+   storm-chaos* | os2-emx* | rtmk-nova*)
+@@ -1360,7 +1360,7 @@ case $os in
+ 	      | -chorusos* | -chorusrdb* | -cegcc* \
+ 	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ 	      | -mingw32* | -linux-gnu* | -linux-android* \
+-	      | -linux-newlib* | -linux-uclibc* \
++	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ 	      | -uxpv* | -beos* | -mpeix* | -udk* \
+ 	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
diff --git a/yocto-poky/meta/recipes-devtools/autoconf/autoconf/performance.patch b/yocto-poky/meta/recipes-devtools/autoconf/autoconf/performance.patch
new file mode 100644
index 0000000..1842fe9
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/autoconf/autoconf/performance.patch
@@ -0,0 +1,60 @@
+The check for solaris 'print' causes significant problems on a linux machine
+with dash as /bin/sh since it triggers the execution of "print" which on some 
+linux systems is a perl script which is part of mailcap. Worse, this perl 
+script calls "which file" and if successful ignores the path file was found 
+in and just runs "file" without a path. Each exection causes PATH to be searched.
+
+Simply assuming the shell's printf function works cuts out all the fork overhead
+and when parallel tasks are running, this overhead appears to be significant.
+
+RP
+2015/11/28
+Upstream-Status: Inappropriate
+
+Index: autoconf-2.69/lib/m4sugar/m4sh.m4
+===================================================================
+--- autoconf-2.69.orig/lib/m4sugar/m4sh.m4
++++ autoconf-2.69/lib/m4sugar/m4sh.m4
+@@ -1045,40 +1045,8 @@ m4_defun([_AS_ECHO_PREPARE],
+ [[as_nl='
+ '
+ export as_nl
+-# Printing a long string crashes Solaris 7 /usr/bin/printf.
+-as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+-as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+-# Prefer a ksh shell builtin over an external printf program on Solaris,
+-# but without wasting forks for bash or zsh.
+-if test -z "$BASH_VERSION$ZSH_VERSION" \
+-    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+-  as_echo='print -r --'
+-  as_echo_n='print -rn --'
+-elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+-  as_echo='printf %s\n'
+-  as_echo_n='printf %s'
+-else
+-  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+-    as_echo_body='eval /usr/ucb/echo -n "$][1$as_nl"'
+-    as_echo_n='/usr/ucb/echo -n'
+-  else
+-    as_echo_body='eval expr "X$][1" : "X\\(.*\\)"'
+-    as_echo_n_body='eval
+-      arg=$][1;
+-      case $arg in @%:@(
+-      *"$as_nl"*)
+-	expr "X$arg" : "X\\(.*\\)$as_nl";
+-	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+-      esac;
+-      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+-    '
+-    export as_echo_n_body
+-    as_echo_n='sh -c $as_echo_n_body as_echo'
+-  fi
+-  export as_echo_body
+-  as_echo='sh -c $as_echo_body as_echo'
+-fi
++as_echo='printf %s\n'
++as_echo_n='printf %s'
+ ]])# _AS_ECHO_PREPARE
+ 
+ 
diff --git a/yocto-poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb b/yocto-poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb
index 809007f..adb6ad7 100644
--- a/yocto-poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb
+++ b/yocto-poky/meta/recipes-devtools/autoconf/autoconf_2.69.bb
@@ -13,6 +13,8 @@
             file://remove-usr-local-lib-from-m4.patch \
             file://preferbash.patch \
             file://autotest-automake-result-format.patch \
+            file://add_musl_config.patch \
+            file://performance.patch \
            "
 
 SRC_URI[md5sum] = "82d05e03b93e45f5a39b828dc9c6c29b"
diff --git a/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.5.bb b/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.5.bb
deleted file mode 100644
index 2a28512..0000000
--- a/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.5.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "Automated text and program generation tool"
-DESCRIPTION = "AutoGen is a tool designed to simplify the creation and\
- maintenance of programs that contain large amounts of repetitious text.\
- It is especially valuable in programs that have several blocks of text\
- that must be kept synchronized."
-HOMEPAGE = "http://www.gnu.org/software/autogen/"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
-           file://increase-timeout-limit.patch \
-           file://mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch \
-           file://redirect-output-dir.patch \
-"
-
-SRC_URI[md5sum] = "385d7c7dfbe60babbee261c054923a53"
-SRC_URI[sha256sum] = "7bbdb73b5518baf64c6d3739fb2ecc66d2cccda888ce5ad573abe235ab5d96ba"
-
-DEPENDS = "guile-native libtool-native libxml2-native"
-
-inherit autotools texinfo native pkgconfig
-
-# autogen-native links against libguile which may have been relocated with sstate
-# these environment variables ensure there isn't a relocation issue
-export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
-export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
-
-do_install_append () {
-	create_wrapper ${D}/${bindir}/autogen \
-		GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
-		GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
-}
diff --git a/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.6.bb b/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.6.bb
new file mode 100644
index 0000000..d77b827
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/autogen/autogen-native_5.18.6.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Automated text and program generation tool"
+DESCRIPTION = "AutoGen is a tool designed to simplify the creation and\
+ maintenance of programs that contain large amounts of repetitious text.\
+ It is especially valuable in programs that have several blocks of text\
+ that must be kept synchronized."
+HOMEPAGE = "http://www.gnu.org/software/autogen/"
+SECTION = "devel"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "${GNU_MIRROR}/autogen/rel${PV}/autogen-${PV}.tar.gz \
+           file://increase-timeout-limit.patch \
+           file://mk-tpl-config.sh-force-exit-value-to-be-0-in-subproc.patch \
+           file://redirect-output-dir.patch \
+"
+
+SRC_URI[md5sum] = "fdee403e524c0af3ded6b3becb365671"
+SRC_URI[sha256sum] = "2fc7f12a5ecb3b1e8bd4364aa906b837cff01f80edb7d2fb38ed8b9dfbcd3271"
+
+UPSTREAM_CHECK_URI = "http://ftp.gnu.org/gnu/autogen/"
+UPSTREAM_CHECK_REGEX = "rel(?P<pver>\d+(\.\d+)+)/"
+
+DEPENDS = "guile-native libtool-native libxml2-native"
+
+inherit autotools texinfo native pkgconfig
+
+# autogen-native links against libguile which may have been relocated with sstate
+# these environment variables ensure there isn't a relocation issue
+export GUILE_LOAD_PATH = "${STAGING_DATADIR_NATIVE}/guile/2.0"
+export GUILE_LOAD_COMPILED_PATH = "${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache"
+
+do_install_append () {
+	create_wrapper ${D}/${bindir}/autogen \
+		GUILE_LOAD_PATH=${STAGING_DATADIR_NATIVE}/guile/2.0 \
+		GUILE_LOAD_COMPILED_PATH=${STAGING_LIBDIR_NATIVE}/guile/2.0/ccache
+}
diff --git a/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch b/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch
index 3d4c1d6..9efd7e5 100644
--- a/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch
+++ b/yocto-poky/meta/recipes-devtools/autogen/autogen/increase-timeout-limit.patch
@@ -12,22 +12,19 @@
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index 0af7c18..5544f59 100644
+index 58a848b..170dd9e 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -175,9 +175,9 @@ config_end_time=`date +%s 2>/dev/null`
- time_delta=`expr ${config_end_time} - ${config_start_time} 2>/dev/null`
+@@ -178,9 +178,9 @@ time_delta=`expr ${config_end_time} - ${config_start_time} 2>/dev/null`
+ if test -z "${AG_TIMEOUT}"
+ then
+   if test -z "${time_delta}"
+-  then time_delta=10
+-  elif test ${time_delta} -lt 5
+-  then time_delta=5 ; fi
++  then time_delta=60
++  elif test ${time_delta} -lt 30
++  then time_delta=30 ; fi
  
- if test -z "${time_delta}"
--then time_delta=10
--elif test ${time_delta} -lt 5
--then time_delta=5 ; fi
-+then time_delta=60
-+elif test ${time_delta} -lt 30
-+then time_delta=30 ; fi
- 
- AG_TIMEOUT=${time_delta}
- ]
--- 
-1.7.9.5
-
+   AG_TIMEOUT=${time_delta}
+ fi
diff --git a/yocto-poky/meta/recipes-devtools/autogen/autogen/redirect-output-dir.patch b/yocto-poky/meta/recipes-devtools/autogen/autogen/redirect-output-dir.patch
index de126ed..fc5a71b 100644
--- a/yocto-poky/meta/recipes-devtools/autogen/autogen/redirect-output-dir.patch
+++ b/yocto-poky/meta/recipes-devtools/autogen/autogen/redirect-output-dir.patch
@@ -1,6 +1,6 @@
 [PATCH] redirect the dir of mklibsrc-log.tx
 
-Upstream-Statue: Pending
+Upstream-Status: Pending
 
 redirect mklibsrc-log.tx to builddir, not /tmp; otherwise mklibsrc-log.tx
 maybe unable to be written if other users is building autogen at the same time.
diff --git a/yocto-poky/meta/recipes-devtools/automake/automake.inc b/yocto-poky/meta/recipes-devtools/automake/automake.inc
index a1debd8..4f9b5f7 100644
--- a/yocto-poky/meta/recipes-devtools/automake/automake.inc
+++ b/yocto-poky/meta/recipes-devtools/automake/automake.inc
@@ -10,6 +10,9 @@
 inherit autotools texinfo
 
 do_configure() {
+	# We can end up patching macros, which would then mean autoreconf
+	# Cheat by saying everything is up to date.
+	touch ${S}/aclocal.m4 ${S}/Makefile.in ${S}/configure
 	oe_runconf
 }
 
diff --git a/yocto-poky/meta/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch b/yocto-poky/meta/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch
new file mode 100644
index 0000000..2c6594f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/automake/automake/new_rt_path_for_test-driver.patch
@@ -0,0 +1,36 @@
+Set relative to top_builddir path in Makefile to access test-driver
+
+Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
+Upstream-Status: Pending
+Bug-Report: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19042
+
+--- a/bin/automake.in
++++ b/bin/automake.in
+@@ -272,6 +272,9 @@
+ # $AM_CONFIG_AUX_DIR is prefixed with $(top_srcdir), so it can be used
+ # in Makefiles.
+ my $am_config_aux_dir = '';
++# Directory used at runtime like running test-driver that should not
++# depend on $(top_srcdir)
++my $am_config_rt_aux_dir = '';
+
+ # Directory to search for AC_LIBSOURCE files, as set by AC_CONFIG_LIBOBJ_DIR
+ # in configure.ac.
+@@ -4700,7 +4703,7 @@
+     {
+       require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
+       define_variable ("${pfx}LOG_DRIVER",
+-                       "\$(SHELL) $am_config_aux_dir/test-driver",
++                       "\$(SHELL) $am_config_rt_aux_dir/test-driver",
+                        INTERNAL);
+     }
+   my $driver = '$(' . $pfx . 'LOG_DRIVER)';
+@@ -7284,6 +7287,10 @@
+   $am_config_aux_dir =
+     '$(top_srcdir)' . ($config_aux_dir eq '.' ? "" : "/$config_aux_dir");
+   $am_config_aux_dir =~ s,/*$,,;
++
++  $am_config_rt_aux_dir =
++    '$(top_builddir)' . ($config_aux_dir eq '.' ? "" : "/$config_aux_dir");
++  $am_config_rt_aux_dir =~ s,/*$,,;
+ }
diff --git a/yocto-poky/meta/recipes-devtools/automake/automake/performance.patch b/yocto-poky/meta/recipes-devtools/automake/automake/performance.patch
new file mode 100644
index 0000000..3e6d569
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/automake/automake/performance.patch
@@ -0,0 +1,73 @@
+By default automake puts "sleep 1" into the start of configure scripts
+which adds pointless delays to them. Rather than do this, lets just assume 
+our systems are sane.
+
+RP
+2015/12/7
+Upstream-Status: Inappropriate
+
+Index: automake-1.15/m4/sanity.m4
+===================================================================
+--- automake-1.15.orig/m4/sanity.m4
++++ automake-1.15/m4/sanity.m4
+@@ -23,60 +23,5 @@ case $srcdir in
+     AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+ esac
+ 
+-# Do 'set' in a subshell so we don't clobber the current shell's
+-# arguments.  Must try -L first in case configure is actually a
+-# symlink; some systems play weird games with the mod time of symlinks
+-# (eg FreeBSD returns the mod time of the symlink's containing
+-# directory).
+-if (
+-   am_has_slept=no
+-   for am_try in 1 2; do
+-     echo "timestamp, slept: $am_has_slept" > conftest.file
+-     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+-     if test "$[*]" = "X"; then
+-	# -L didn't work.
+-	set X `ls -t "$srcdir/configure" conftest.file`
+-     fi
+-     if test "$[*]" != "X $srcdir/configure conftest.file" \
+-	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
+-
+-	# If neither matched, then we have a broken ls.  This can happen
+-	# if, for instance, CONFIG_SHELL is bash and it inherits a
+-	# broken ls alias from the environment.  This has actually
+-	# happened.  Such a system could not be considered "sane".
+-	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+-  alias in your environment])
+-     fi
+-     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+-       break
+-     fi
+-     # Just in case.
+-     sleep 1
+-     am_has_slept=yes
+-   done
+-   test "$[2]" = conftest.file
+-   )
+-then
+-   # Ok.
+-   :
+-else
+-   AC_MSG_ERROR([newly created file is older than distributed files!
+-Check your system clock])
+-fi
+ AC_MSG_RESULT([yes])
+-# If we didn't sleep, we still need to ensure time stamps of config.status and
+-# generated files are strictly newer.
+-am_sleep_pid=
+-if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+-  ( sleep 1 ) &
+-  am_sleep_pid=$!
+-fi
+-AC_CONFIG_COMMANDS_PRE(
+-  [AC_MSG_CHECKING([that generated files are newer than configure])
+-   if test -n "$am_sleep_pid"; then
+-     # Hide warnings about reused PIDs.
+-     wait $am_sleep_pid 2>/dev/null
+-   fi
+-   AC_MSG_RESULT([done])])
+-rm -f conftest.file
+ ])
diff --git a/yocto-poky/meta/recipes-devtools/automake/automake/py-compile-compile-only-optimized-byte-code.patch b/yocto-poky/meta/recipes-devtools/automake/automake/py-compile-compile-only-optimized-byte-code.patch
deleted file mode 100644
index f8334a7..0000000
--- a/yocto-poky/meta/recipes-devtools/automake/automake/py-compile-compile-only-optimized-byte-code.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-* OE-Core's python creates the same binary output
-  for both pyc and pyo, so disable the creation of
-  pyc files by automake.
-
-Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
-
-Updated for automake-1.12.6
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-
-diff -Nurd automake-1.12.6/lib/py-compile automake-1.12.6/lib/py-compile
---- automake-1.12.6/lib/py-compile	2012-12-13 21:57:31.000000000 +0200
-+++ automake-1.12.6/lib/py-compile	2012-12-27 19:34:01.426015140 +0200
-@@ -115,26 +115,6 @@
-     filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
- fi
- 
--$PYTHON -c "
--import sys, os, py_compile, imp
--
--files = '''$files'''
--
--sys.stdout.write('Byte-compiling python modules...\n')
--for file in files.split():
--    $pathtrans
--    $filetrans
--    if not os.path.exists(filepath) or not (len(filepath) >= 3
--                                            and filepath[-3:] == '.py'):
--	    continue
--    sys.stdout.write(file)
--    sys.stdout.flush()
--    if hasattr(imp, 'get_tag'):
--        py_compile.compile(filepath, imp.cache_from_source(filepath), path)
--    else:
--        py_compile.compile(filepath, filepath + 'c', path)
--sys.stdout.write('\n')" || exit $?
--
- # this will fail for python < 1.5, but that doesn't matter ...
- $PYTHON -O -c "
- import sys, os, py_compile, imp
diff --git a/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb b/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb
index c33dc22..a3c72fd 100644
--- a/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb
+++ b/yocto-poky/meta/recipes-devtools/automake/automake_1.15.bb
@@ -16,11 +16,12 @@
     perl-module-threads \
     perl-module-vars "
 
-RDEPENDS_${PN}_class-native = "autoconf-native perl-native-runtime"
+RDEPENDS_${PN}_class-native = "autoconf-native hostperl-runtime-native"
 
 SRC_URI += " file://python-libdir.patch \
-            file://py-compile-compile-only-optimized-byte-code.patch \
-            file://buildtest.patch"
+            file://buildtest.patch \
+            file://performance.patch \
+            file://new_rt_path_for_test-driver.patch"
 
 SRC_URI[md5sum] = "716946a105ca228ab545fc37a70df3a3"
 SRC_URI[sha256sum] = "7946e945a96e28152ba5a6beb0625ca715c6e32ac55f2e353ef54def0c8ed924"
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils-2.25.1.inc b/yocto-poky/meta/recipes-devtools/binutils/binutils-2.25.1.inc
deleted file mode 100644
index f3817fa..0000000
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils-2.25.1.inc
+++ /dev/null
@@ -1,43 +0,0 @@
-LIC_FILES_CHKSUM="\
-    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
-    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
-    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
-    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
-    file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
-    file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
-    file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
-    file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
-    file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
-    "
-
-def binutils_branch_version(d):
-    pvsplit = d.getVar('PV', True).split('.')
-    return pvsplit[0] + "_" + pvsplit[1]
-
-BINUPV = "${@binutils_branch_version(d)}"
-
-SRCREV = "2bd25930221dea4bf33c13a89c111514491440e2"
-SRC_URI = "\
-     git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
-     file://0002-configure-widen-the-regexp-for-SH-architectures.patch \
-     file://0003-Point-scripts-location-to-libdir.patch \
-     file://0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
-     file://0005-Explicitly-link-with-libm-on-uclibc.patch \
-     file://0006-Use-libtool-2.4.patch \
-     file://0007-Add-the-armv5e-architecture-to-binutils.patch \
-     file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
-     file://0009-Upstream-Status-Inappropriate-distribution-codesourc.patch \
-     file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
-     file://0011-Change-default-emulation-for-mips64-linux.patch \
-     file://0012-Add-XLP-instructions-support.patch \
-     file://0013-Fix-an-internal-error-in-do_print_to_mapfile-seen-wi.patch \
-     file://0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch \
-     file://0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch \
-     file://binutils-octeon3.patch \
-     file://add-thunderx-support-for-gas.patch \
-     "
-S  = "${WORKDIR}/git"
-
-do_configure_prepend () {
-        rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
-}
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils-2.26.inc b/yocto-poky/meta/recipes-devtools/binutils/binutils-2.26.inc
new file mode 100644
index 0000000..6d535fc
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils-2.26.inc
@@ -0,0 +1,42 @@
+LIC_FILES_CHKSUM="\
+    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+    file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+    file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+    file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+    file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+    file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+    "
+
+def binutils_branch_version(d):
+    pvsplit = d.getVar('PV', True).split('.')
+    return pvsplit[0] + "_" + pvsplit[1]
+
+BINUPV = "${@binutils_branch_version(d)}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
+
+SRCREV = "71fa566a9cf2597b60a58c1d7c148bab637454a6"
+SRC_URI = "\
+     git://sourceware.org/git/binutils-gdb.git;branch=binutils-${BINUPV}-branch;protocol=git \
+     file://0002-configure-widen-the-regexp-for-SH-architectures.patch \
+     file://0003-Point-scripts-location-to-libdir.patch \
+     file://0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
+     file://0005-Explicitly-link-with-libm-on-uclibc.patch \
+     file://0006-Use-libtool-2.4.patch \
+     file://0007-Add-the-armv5e-architecture-to-binutils.patch \
+     file://0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
+     file://0009-warn-for-uses-of-system-directories-when-cross-linki.patch \
+     file://0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
+     file://0011-Change-default-emulation-for-mips64-linux.patch \
+     file://0012-Add-support-for-Netlogic-XLP.patch \
+     file://0013-Fix-GOT-address-computations-in-initial-PLT-entries-.patch \
+     file://0014-Correct-nios2-_gp-address-computation.patch \
+"
+S  = "${WORKDIR}/git"
+
+do_configure_prepend () {
+        rm -rf ${S}/gdb ${S}/libdecnumber ${S}/readline ${S}/sim
+}
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.25.1.bb b/yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.26.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.25.1.bb
rename to yocto-poky/meta/recipes-devtools/binutils/binutils-cross-canadian_2.26.bb
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.25.1.bb b/yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.26.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.25.1.bb
rename to yocto-poky/meta/recipes-devtools/binutils/binutils-cross_2.26.bb
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.25.1.bb b/yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.26.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.25.1.bb
rename to yocto-poky/meta/recipes-devtools/binutils/binutils-crosssdk_2.26.bb
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils.inc b/yocto-poky/meta/recipes-devtools/binutils/binutils.inc
index a304867..43e2aa2 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils.inc
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils.inc
@@ -13,6 +13,12 @@
 
 DEPENDS = "flex-native bison-native zlib-native gnu-config-native autoconf-native"
 
+#
+# we need chrpath > 0.14 and some distros like centos 7 still have older chrpath
+#
+DEPENDS_append_class-target = " chrpath-replacement-native"
+EXTRANATIVEPATH_append_class-target = " chrpath-native"
+
 inherit autotools gettext multilib_header texinfo
 
 FILES_${PN} = " \
@@ -51,6 +57,7 @@
 	strings \
 	strip \
 "
+USE_ALTERNATIVES_FOR_remove_mips = "ld.gold dwp"
 
 python do_package_prepend() {
     make_alts = d.getVar("USE_ALTERNATIVES_FOR", True) or ""
@@ -61,8 +68,6 @@
         d.setVarFlag('ALTERNATIVE_LINK_NAME', alt, bindir + "/" + alt)
 }
 
-# FILES_${PN}-dbg = "${prefix}/${TARGET_SYS}/bin/.debug ${prefix}/${libdir}/.debug"
-
 B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
 
 EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
@@ -113,6 +118,10 @@
 	done
 }
 
+do_compile_append_class-target() {
+	chrpath -d ${B}/binutils/elfedit
+	chrpath -d ${B}/binutils/readelf
+}
 do_install () {
 	autotools_do_install
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch
index 1e80c1f..91f9017 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0001-Generate-relocatable-SDKs.patch
@@ -1,7 +1,7 @@
-From f71ecf251f84b4bbc9b7a832d5cd4a8bae95d83b Mon Sep 17 00:00:00 2001
+From 3c75355342a8562ccb65b8bbbe81a0495fec5c57 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:58:54 +0000
-Subject: [PATCH 01/13] Generate relocatable SDKs
+Subject: [PATCH 01/14] Generate relocatable SDKs
 
 This patch will modify the ELF linker scripts so that the crosssdk
 linker will generate binaries with a 4096 bytes PT_INTERP section. When the binaries
@@ -18,7 +18,7 @@
  2 files changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index 499607a..075dd04 100755
+index a84d233..d12c4e2 100755
 --- a/ld/genscripts.sh
 +++ b/ld/genscripts.sh
 @@ -277,6 +277,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@@ -43,10 +43,10 @@
  LD_FLAG=
  DATA_ALIGNMENT=${DATA_ALIGNMENT_}
 diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index 4368fd9..9f01e8c 100644
+index ec78c90..f9e7a31 100644
 --- a/ld/scripttempl/elf.sc
 +++ b/ld/scripttempl/elf.sc
-@@ -131,8 +131,8 @@ if test -n "${COMMONPAGESIZE}"; then
+@@ -136,8 +136,8 @@ if test -n "${COMMONPAGESIZE}"; then
    DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
    DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
  fi
@@ -58,5 +58,5 @@
  if test -z "$PLT"; then
    IPLT=".iplt         ${RELOCATING-0} : { *(.iplt) }"
 -- 
-2.1.4
+2.7.1
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch
index 34e21d1..4a202d0 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0002-configure-widen-the-regexp-for-SH-architectures.patch
@@ -1,7 +1,7 @@
-From dfbcfb0d71765b337e63562299a943043928d2d2 Mon Sep 17 00:00:00 2001
+From b1ae604880562ed065f614a745d3f8922838bc5a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:07:33 +0000
-Subject: [PATCH 02/13] configure: widen the regexp for SH architectures
+Subject: [PATCH 02/14] configure: widen the regexp for SH architectures
 
 gprof needs to know about uclibc
 
@@ -14,10 +14,10 @@
  2 files changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/configure b/configure
-index 87677bc..e9f2f13 100755
+index 34b66f7..85414ab 100755
 --- a/configure
 +++ b/configure
-@@ -3341,7 +3341,7 @@ case "${target}" in
+@@ -3445,7 +3445,7 @@ case "${target}" in
      ;;
    s390-*-* | s390x-*-*)
      ;;
@@ -26,7 +26,7 @@
      ;;
    sh64-*-* | sh5*-*-*)
      ;;
-@@ -3812,7 +3812,7 @@ case "${target}" in
+@@ -3939,7 +3939,7 @@ case "${target}" in
    or1k*-*-*)
      noconfigdirs="$noconfigdirs gdb"
      ;;
@@ -36,7 +36,7 @@
        sh*-*-elf)
           ;;
 diff --git a/gprof/configure b/gprof/configure
-index b09c8fb..79961c5 100755
+index 693b927..d4db554 100755
 --- a/gprof/configure
 +++ b/gprof/configure
 @@ -5869,6 +5869,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
@@ -52,5 +52,5 @@
    if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
      lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
 -- 
-2.1.4
+2.7.1
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch
index f5ce767..2c70ecd 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0003-Point-scripts-location-to-libdir.patch
@@ -1,7 +1,7 @@
-From dfb1412da67bbfe3e993d107d0b5e392f44141ab Mon Sep 17 00:00:00 2001
+From 01808e8ef8ee709c8218d962601c18a63a063a1f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:09:58 +0000
-Subject: [PATCH 03/13] Point scripts location to libdir
+Subject: [PATCH 03/14] Point scripts location to libdir
 
 Upstream-Status: Inappropriate [debian patch]
 
@@ -12,10 +12,10 @@
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 9575f1f..84df0bf 100644
+index 0b3b049..3871c74 100644
 --- a/ld/Makefile.am
 +++ b/ld/Makefile.am
-@@ -54,7 +54,7 @@ endif
+@@ -57,7 +57,7 @@ endif
  # We put the scripts in the directory $(scriptdir)/ldscripts.
  # We can't put the scripts in $(datadir) because the SEARCH_DIR
  # directives need to be different for native and cross linkers.
@@ -25,10 +25,10 @@
  EMUL = @EMUL@
  EMULATION_OFILES = @EMULATION_OFILES@
 diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 9f56ca1..272860f 100644
+index ed98f87..530e4c9 100644
 --- a/ld/Makefile.in
 +++ b/ld/Makefile.in
-@@ -388,7 +388,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
+@@ -413,7 +413,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
  # We put the scripts in the directory $(scriptdir)/ldscripts.
  # We can't put the scripts in $(datadir) because the SEARCH_DIR
  # directives need to be different for native and cross linkers.
@@ -38,5 +38,5 @@
  BFDDIR = $(BASEDIR)/bfd
  INCDIR = $(BASEDIR)/include
 -- 
-2.1.4
+2.7.1
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
index e3cd2a4..8f0a402 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0004-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
@@ -1,7 +1,7 @@
-From 3126608b8c95a792ade56cf62a531d935d391c50 Mon Sep 17 00:00:00 2001
+From c008c7f97c1cf487749c6c375820a1f3b3c6c53d Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:27:17 +0000
-Subject: [PATCH 04/13] Only generate an RPATH entry if LD_RUN_PATH is not
+Subject: [PATCH 04/14] Only generate an RPATH entry if LD_RUN_PATH is not
  empty
 
 for cases where -rpath isn't specified. debian (#151024)
@@ -15,10 +15,10 @@
  1 file changed, 4 insertions(+)
 
 diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
-index 36dee8e..07bea52 100644
+index 0405d4f..73c5447 100644
 --- a/ld/emultempl/elf32.em
 +++ b/ld/emultempl/elf32.em
-@@ -1198,6 +1198,8 @@ fragment <<EOF
+@@ -1242,6 +1242,8 @@ fragment <<EOF
  	      && command_line.rpath == NULL)
  	    {
  	      lib_path = (const char *) getenv ("LD_RUN_PATH");
@@ -27,7 +27,7 @@
  	      if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
  						      force))
  		break;
-@@ -1461,6 +1463,8 @@ gld${EMULATION_NAME}_before_allocation (void)
+@@ -1523,6 +1525,8 @@ gld${EMULATION_NAME}_before_allocation (void)
    rpath = command_line.rpath;
    if (rpath == NULL)
      rpath = (const char *) getenv ("LD_RUN_PATH");
@@ -37,5 +37,5 @@
    for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
      if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
 -- 
-2.1.4
+2.7.1
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch
index 9bbd93e..92ead7f 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0005-Explicitly-link-with-libm-on-uclibc.patch
@@ -1,7 +1,7 @@
-From f1703bcc7a5c507e471e2630b5a2de129100315a Mon Sep 17 00:00:00 2001
+From 6a41635e29c4a6c064b1f66e79a8fe2026f4361b Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:32:49 +0000
-Subject: [PATCH 05/13] Explicitly link with libm on uclibc
+Subject: [PATCH 05/14] Explicitly link with libm on uclibc
 
 Description:
 
@@ -31,10 +31,10 @@
  1 file changed, 6 insertions(+)
 
 diff --git a/gas/configure.tgt b/gas/configure.tgt
-index 9abc768..1d92f55 100644
+index 0b490d4..086e0d2 100644
 --- a/gas/configure.tgt
 +++ b/gas/configure.tgt
-@@ -477,6 +477,12 @@ case ${generic_target} in
+@@ -487,6 +487,12 @@ case ${generic_target} in
    *-*-netware)				fmt=elf em=netware ;;
  esac
  
@@ -48,5 +48,5 @@
    aarch64 | alpha | arm | i386 | ia64 | microblaze | mips | ns32k | or1k | or1knd | pdp11 | ppc | sparc | z80 | z8k)
      bfd_gas=yes
 -- 
-2.1.4
+2.7.1
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
index 62967ef..e54ab1b 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0006-Use-libtool-2.4.patch
@@ -1,35 +1,36 @@
-From 03eb9b4fe583e88a22fd8c25b43fbd9bafe21af6 Mon Sep 17 00:00:00 2001
+From da70f0876cdd8ed703d9ed1524212ccfefb09ef3 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:34:41 +0000
-Subject: [PATCH 06/13] Use libtool 2.4
+Date: Sun, 14 Feb 2016 17:04:07 +0000
+Subject: [PATCH 06/14] Use libtool 2.4
 
-So we can get libtool sysroot support
-
-Upstream-Status: Pending
+get libtool sysroot support
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
- bfd/configure        | 1320 +++++++++++++++++------
+Upstream-Status: Pending
+
+ bfd/configure        | 1322 +++++++++++++++++------
  bfd/configure.ac     |    2 +-
- binutils/configure   | 1318 +++++++++++++++++------
- configure            |    2 +-
- gas/configure        | 1318 +++++++++++++++++------
- gprof/configure      | 1323 +++++++++++++++++------
- ld/configure         | 1701 +++++++++++++++++++++--------
- libtool.m4           | 1086 +++++++++++++------
+ binutils/configure   | 1320 +++++++++++++++++------
+ configure            |    4 +-
+ gas/configure        | 1320 +++++++++++++++++------
+ gprof/configure      | 1325 +++++++++++++++++------
+ ld/configure         | 1695 +++++++++++++++++++++--------
+ libtool.m4           | 1080 +++++++++++++------
  ltmain.sh            | 2925 +++++++++++++++++++++++++++++++++-----------------
  ltoptions.m4         |    2 +-
  ltversion.m4         |   12 +-
  lt~obsolete.m4       |    2 +-
- opcodes/configure    | 1320 +++++++++++++++++------
+ opcodes/configure    | 1322 +++++++++++++++++------
  opcodes/configure.ac |    2 +-
- 14 files changed, 8952 insertions(+), 3381 deletions(-)
+ zlib/configure       | 1320 +++++++++++++++++------
+ 15 files changed, 9944 insertions(+), 3709 deletions(-)
 
 diff --git a/bfd/configure b/bfd/configure
-index 85e6b82..3d3dd88 100755
+index 7411c6d..eae743e 100755
 --- a/bfd/configure
 +++ b/bfd/configure
-@@ -668,6 +668,9 @@ OTOOL
+@@ -670,6 +670,9 @@ OTOOL
  LIPO
  NMEDIT
  DSYMUTIL
@@ -39,7 +40,7 @@
  OBJDUMP
  LN_S
  NM
-@@ -780,6 +783,7 @@ enable_static
+@@ -782,6 +785,7 @@ enable_static
  with_pic
  enable_fast_install
  with_gnu_ld
@@ -47,7 +48,7 @@
  enable_libtool_lock
  enable_plugins
  enable_largefile
-@@ -1456,6 +1460,8 @@ Optional Packages:
+@@ -1458,6 +1462,8 @@ Optional Packages:
    --with-pic              try to use only PIC/non-PIC objects [default=use
                            both]
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -56,7 +57,7 @@
    --with-mmap             try using mmap for BFD input files if available
    --with-separate-debug-dir=DIR
                            Look for global separate debug info in DIR
-@@ -5386,8 +5392,8 @@ esac
+@@ -5388,8 +5394,8 @@ esac
  
  
  
@@ -67,7 +68,7 @@
  
  
  
-@@ -5427,7 +5433,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5429,7 +5435,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
  $as_echo_n "checking how to print strings... " >&6; }
  # Test print first, because it will be a builtin if present.
@@ -76,7 +77,7 @@
     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
    ECHO='print -r --'
  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6113,8 +6119,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6115,8 +6121,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
  # Try some XSI features
  xsi_shell=no
  ( _lt_dummy="a/b/c"
@@ -87,7 +88,7 @@
      && eval 'test $(( 1 + 1 )) -eq 2 \
      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
    && xsi_shell=yes
-@@ -6163,6 +6169,80 @@ esac
+@@ -6165,6 +6171,80 @@ esac
  
  
  
@@ -168,7 +169,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  $as_echo_n "checking for $LD option to reload object files... " >&6; }
  if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -6179,6 +6259,11 @@ case $reload_flag in
+@@ -6181,6 +6261,11 @@ case $reload_flag in
  esac
  reload_cmds='$LD$reload_flag -o $output$reload_objs'
  case $host_os in
@@ -180,7 +181,7 @@
    darwin*)
      if test "$GCC" = yes; then
        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6347,7 +6432,8 @@ mingw* | pw32*)
+@@ -6349,7 +6434,8 @@ mingw* | pw32*)
      lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
      lt_cv_file_magic_cmd='func_win32_libid'
    else
@@ -190,7 +191,7 @@
      lt_cv_file_magic_cmd='$OBJDUMP -f'
    fi
    ;;
-@@ -6501,6 +6587,21 @@ esac
+@@ -6503,6 +6589,21 @@ esac
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
  $as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -212,7 +213,7 @@
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6516,9 +6617,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6518,9 +6619,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
  
  
  
@@ -377,7 +378,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6534,7 +6788,7 @@ do
+@@ -6536,7 +6790,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -386,7 +387,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6554,11 +6808,15 @@ $as_echo "no" >&6; }
+@@ -6556,11 +6810,15 @@ $as_echo "no" >&6; }
  fi
  
  
@@ -405,7 +406,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6574,7 +6832,7 @@ do
+@@ -6576,7 +6834,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -414,7 +415,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6593,6 +6851,10 @@ else
+@@ -6595,6 +6853,10 @@ else
  $as_echo "no" >&6; }
  fi
  
@@ -425,7 +426,7 @@
    if test "x$ac_ct_AR" = x; then
      AR="false"
    else
-@@ -6604,16 +6866,72 @@ ac_tool_warned=yes ;;
+@@ -6606,16 +6868,72 @@ ac_tool_warned=yes ;;
  esac
      AR=$ac_ct_AR
    fi
@@ -502,7 +503,7 @@
  
  
  
-@@ -6955,8 +7273,8 @@ esac
+@@ -6957,8 +7275,8 @@ esac
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  
  # Transform an extracted symbol line into symbol name and symbol address
@@ -513,7 +514,7 @@
  
  # Handle CRLF in mingw tool chain
  opt_cr=
-@@ -6992,6 +7310,7 @@ for ac_symprfx in "" "_"; do
+@@ -6994,6 +7312,7 @@ for ac_symprfx in "" "_"; do
    else
      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    fi
@@ -521,7 +522,7 @@
  
    # Check to see that the pipe works correctly.
    pipe_works=no
-@@ -7033,6 +7352,18 @@ _LT_EOF
+@@ -7035,6 +7354,18 @@ _LT_EOF
        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  	  cat <<_LT_EOF > conftest.$ac_ext
@@ -540,7 +541,7 @@
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -7044,7 +7375,7 @@ _LT_EOF
+@@ -7046,7 +7377,7 @@ _LT_EOF
  	  cat <<_LT_EOF >> conftest.$ac_ext
  
  /* The mapping between symbol names and symbols.  */
@@ -549,7 +550,7 @@
    const char *name;
    void       *address;
  }
-@@ -7070,8 +7401,8 @@ static const void *lt_preloaded_setup() {
+@@ -7072,8 +7403,8 @@ static const void *lt_preloaded_setup() {
  _LT_EOF
  	  # Now try linking the two files.
  	  mv conftest.$ac_objext conftstm.$ac_objext
@@ -560,7 +561,7 @@
  	  LIBS="conftstm.$ac_objext"
  	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
  	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7081,8 +7412,8 @@ _LT_EOF
+@@ -7083,8 +7414,8 @@ _LT_EOF
    test $ac_status = 0; } && test -s conftest${ac_exeext}; then
  	    pipe_works=yes
  	  fi
@@ -571,7 +572,7 @@
  	else
  	  echo "cannot find nm_test_func in $nlist" >&5
  	fi
-@@ -7119,6 +7450,16 @@ else
+@@ -7121,6 +7452,16 @@ else
  $as_echo "ok" >&6; }
  fi
  
@@ -588,7 +589,7 @@
  
  
  
-@@ -7140,6 +7481,45 @@ fi
+@@ -7142,6 +7483,45 @@ fi
  
  
  
@@ -634,7 +635,7 @@
  # Check whether --enable-libtool-lock was given.
  if test "${enable_libtool_lock+set}" = set; then :
    enableval=$enable_libtool_lock;
-@@ -7346,6 +7726,123 @@ esac
+@@ -7348,6 +7728,123 @@ esac
  
  need_locks="$enable_libtool_lock"
  
@@ -758,7 +759,7 @@
  
    case $host_os in
      rhapsody* | darwin*)
-@@ -7909,6 +8406,8 @@ _LT_EOF
+@@ -7911,6 +8408,8 @@ _LT_EOF
        $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
        echo "$AR cru libconftest.a conftest.o" >&5
        $AR cru libconftest.a conftest.o 2>&5
@@ -767,7 +768,7 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -8073,7 +8572,8 @@ fi
+@@ -8075,7 +8574,8 @@ fi
  LIBTOOL_DEPS="$ltmain"
  
  # Always use our own libtool.
@@ -777,7 +778,7 @@
  
  
  
-@@ -8162,7 +8662,7 @@ aix3*)
+@@ -8164,7 +8664,7 @@ aix3*)
  esac
  
  # Global variables:
@@ -786,7 +787,7 @@
  can_build_shared=yes
  
  # All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8460,8 +8960,6 @@ fi
+@@ -8462,8 +8962,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
  
@@ -795,7 +796,7 @@
  
    if test "$GCC" = yes; then
      lt_prog_compiler_wl='-Wl,'
-@@ -8627,6 +9125,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8629,6 +9127,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	lt_prog_compiler_pic='--shared'
  	lt_prog_compiler_static='--static'
  	;;
@@ -808,7 +809,7 @@
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
          # Portland Group compilers (*not* the Pentium gcc compiler,
  	# which looks to be a dead project)
-@@ -8689,7 +9193,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8691,7 +9195,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-Bstatic'
        case $cc_basename in
@@ -817,7 +818,7 @@
  	lt_prog_compiler_wl='-Qoption ld ';;
        *)
  	lt_prog_compiler_wl='-Wl,';;
-@@ -8746,13 +9250,17 @@ case $host_os in
+@@ -8748,13 +9252,17 @@ case $host_os in
      lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
      ;;
  esac
@@ -841,7 +842,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -8813,6 +9321,11 @@ fi
+@@ -8815,6 +9323,11 @@ fi
  
  
  
@@ -853,7 +854,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -9163,7 +9676,8 @@ _LT_EOF
+@@ -9165,7 +9678,8 @@ _LT_EOF
        allow_undefined_flag=unsupported
        always_export_symbols=no
        enable_shared_with_static_runtimes=yes
@@ -863,16 +864,7 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9211,7 +9725,7 @@ _LT_EOF
-       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- 	 && test "$tmp_diet" = no
-       then
--	tmp_addflag=
-+	tmp_addflag=' $pic_flag'
- 	tmp_sharedflag='-shared'
- 	case $cc_basename,$host_cpu in
-         pgcc*)				# Portland Group C compiler
-@@ -9262,12 +9776,12 @@ _LT_EOF
+@@ -9264,12 +9778,12 @@ _LT_EOF
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  	  hardcode_libdir_flag_spec=
  	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -887,7 +879,7 @@
  	  fi
  	  ;;
  	esac
-@@ -9281,8 +9795,8 @@ _LT_EOF
+@@ -9283,8 +9797,8 @@ _LT_EOF
  	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
        else
@@ -898,7 +890,7 @@
        fi
        ;;
  
-@@ -9300,8 +9814,8 @@ _LT_EOF
+@@ -9302,8 +9816,8 @@ _LT_EOF
  
  _LT_EOF
        elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -909,7 +901,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9347,8 +9861,8 @@ _LT_EOF
+@@ -9349,8 +9863,8 @@ _LT_EOF
  
      *)
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -920,7 +912,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9478,7 +9992,13 @@ _LT_EOF
+@@ -9480,7 +9994,13 @@ _LT_EOF
  	allow_undefined_flag='-berok'
          # Determine the default libpath from the value encoded in an
          # empty executable.
@@ -935,7 +927,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9491,22 +10011,29 @@ main ()
+@@ -9493,22 +10013,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -978,7 +970,7 @@
  
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
          archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9518,7 +10045,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9520,7 +10047,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	else
  	 # Determine the default libpath from the value encoded in an
  	 # empty executable.
@@ -993,7 +985,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9531,22 +10064,29 @@ main ()
+@@ -9533,22 +10066,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -1036,7 +1028,7 @@
  
  	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
  	  # Warning - without using the other run time loading flags,
-@@ -9591,20 +10131,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9593,20 +10133,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        # Microsoft Visual C++.
        # hardcode_libdir_flag_spec is actually meaningless, as there is
        # no search path for DLLs.
@@ -1114,7 +1106,7 @@
        ;;
  
      darwin* | rhapsody*)
-@@ -9665,7 +10248,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9667,7 +10250,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
      freebsd* | dragonfly*)
@@ -1123,7 +1115,7 @@
        hardcode_libdir_flag_spec='-R$libdir'
        hardcode_direct=yes
        hardcode_shlibpath_var=no
-@@ -9673,7 +10256,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9675,7 +10258,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux9*)
        if test "$GCC" = yes; then
@@ -1132,7 +1124,7 @@
        else
  	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        fi
-@@ -9689,7 +10272,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9691,7 +10274,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux10*)
        if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -1141,7 +1133,7 @@
        else
  	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
        fi
-@@ -9713,10 +10296,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9715,10 +10298,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  	  ;;
  	ia64*)
@@ -1154,7 +1146,7 @@
  	  ;;
  	esac
        else
-@@ -9795,23 +10378,36 @@ fi
+@@ -9797,23 +10380,36 @@ fi
  
      irix5* | irix6* | nonstopux*)
        if test "$GCC" = yes; then
@@ -1199,7 +1191,7 @@
        else
  	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9896,7 +10492,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9898,7 +10494,7 @@ rm -f core conftest.err conftest.$ac_objext \
      osf4* | osf5*)	# as osf3* with the addition of -msym flag
        if test "$GCC" = yes; then
  	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -1208,7 +1200,7 @@
  	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
        else
  	allow_undefined_flag=' -expect_unresolved \*'
-@@ -9915,9 +10511,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9917,9 +10513,9 @@ rm -f core conftest.err conftest.$ac_objext \
        no_undefined_flag=' -z defs'
        if test "$GCC" = yes; then
  	wlarc='${wl}'
@@ -1220,7 +1212,7 @@
        else
  	case `$CC -V 2>&1` in
  	*"Compilers 5.0"*)
-@@ -10493,8 +11089,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10495,8 +11091,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -1232,7 +1224,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -10527,13 +11124,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10529,13 +11126,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -1305,7 +1297,7 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -10625,7 +11280,7 @@ haiku*)
+@@ -10627,7 +11282,7 @@ haiku*)
    soname_spec='${libname}${release}${shared_ext}$major'
    shlibpath_var=LIBRARY_PATH
    shlibpath_overrides_runpath=yes
@@ -1314,7 +1306,16 @@
    hardcode_into_libs=yes
    ;;
  
-@@ -11465,10 +12120,10 @@ else
+@@ -11423,7 +12078,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11426 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -11467,10 +12122,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -1327,7 +1328,16 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11571,10 +12226,10 @@ else
+@@ -11529,7 +12184,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11532 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -11573,10 +12228,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -1340,7 +1350,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15163,7 +15818,7 @@ SHARED_LDFLAGS=
+@@ -15121,7 +15776,7 @@ SHARED_LDFLAGS=
  if test "$enable_shared" = "yes"; then
    x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
    if test -n "$x"; then
@@ -1349,7 +1359,7 @@
    fi
  
  # More hacks to build DLLs on Windows.
-@@ -16780,13 +17435,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -16746,13 +17401,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -1370,7 +1380,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -16801,14 +17463,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -16767,14 +17429,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -1389,7 +1399,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -16841,12 +17506,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -16807,12 +17472,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -1403,7 +1413,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -16901,8 +17566,13 @@ reload_flag \
+@@ -16867,8 +17532,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -1417,7 +1427,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -16912,12 +17582,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -16878,12 +17548,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -1433,7 +1443,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -16933,7 +17605,6 @@ no_undefined_flag \
+@@ -16899,7 +17571,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -1441,7 +1451,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -16969,6 +17640,7 @@ module_cmds \
+@@ -16935,6 +17606,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -1449,7 +1459,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -17748,7 +18420,8 @@ $as_echo X"$file" |
+@@ -17714,7 +18386,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -1459,7 +1469,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -17851,19 +18524,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -17817,19 +18490,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -1503,7 +1513,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -17893,6 +18589,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -17859,6 +18555,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -1516,7 +1526,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -17902,6 +18604,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -17868,6 +18570,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -1526,7 +1536,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -18016,12 +18721,12 @@ with_gcc=$GCC
+@@ -17982,12 +18687,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -1542,7 +1552,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -18108,9 +18813,6 @@ inherit_rpath=$inherit_rpath
+@@ -18074,9 +18779,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -1552,7 +1562,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -18126,6 +18828,9 @@ include_expsyms=$lt_include_expsyms
+@@ -18092,6 +18794,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -1562,7 +1572,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -18158,210 +18863,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -18124,210 +18829,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -1937,10 +1947,10 @@
    chmod +x "$ofile"
  
 diff --git a/bfd/configure.ac b/bfd/configure.ac
-index ba98e39..88063cf 100644
+index 6f5e85f..44bd02c 100644
 --- a/bfd/configure.ac
 +++ b/bfd/configure.ac
-@@ -564,7 +564,7 @@ changequote(,)dnl
+@@ -567,7 +567,7 @@ changequote(,)dnl
    x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
  changequote([,])dnl
    if test -n "$x"; then
@@ -1950,10 +1960,10 @@
  
  # More hacks to build DLLs on Windows.
 diff --git a/binutils/configure b/binutils/configure
-index be4b81c..6606a5f 100755
+index d4f3e1e..a6df5bb 100755
 --- a/binutils/configure
 +++ b/binutils/configure
-@@ -655,8 +655,11 @@ OTOOL
+@@ -657,8 +657,11 @@ OTOOL
  LIPO
  NMEDIT
  DSYMUTIL
@@ -1965,7 +1975,7 @@
  OBJDUMP
  LN_S
  NM
-@@ -767,6 +770,7 @@ enable_static
+@@ -769,6 +772,7 @@ enable_static
  with_pic
  enable_fast_install
  with_gnu_ld
@@ -1973,16 +1983,16 @@
  enable_libtool_lock
  enable_plugins
  enable_largefile
-@@ -1439,6 +1443,8 @@ Optional Packages:
+@@ -1441,6 +1445,8 @@ Optional Packages:
    --with-pic              try to use only PIC/non-PIC objects [default=use
                            both]
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
 +  --with-libtool-sysroot=DIR Search for dependent libraries within DIR
 +                        (or the compiler's sysroot if not specified).
-   --with-zlib             include zlib support (auto/yes/no) default=auto
+   --with-system-zlib      use installed libz
    --with-gnu-ld           assume the C compiler uses GNU ld default=no
    --with-libiconv-prefix[=DIR]  search for libiconv in DIR/include and DIR/lib
-@@ -5153,8 +5159,8 @@ esac
+@@ -5155,8 +5161,8 @@ esac
  
  
  
@@ -1993,7 +2003,7 @@
  
  
  
-@@ -5194,7 +5200,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5196,7 +5202,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
  $as_echo_n "checking how to print strings... " >&6; }
  # Test print first, because it will be a builtin if present.
@@ -2002,7 +2012,7 @@
     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
    ECHO='print -r --'
  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -5880,8 +5886,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -5882,8 +5888,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
  # Try some XSI features
  xsi_shell=no
  ( _lt_dummy="a/b/c"
@@ -2013,7 +2023,7 @@
      && eval 'test $(( 1 + 1 )) -eq 2 \
      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
    && xsi_shell=yes
-@@ -5930,6 +5936,80 @@ esac
+@@ -5932,6 +5938,80 @@ esac
  
  
  
@@ -2094,7 +2104,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  $as_echo_n "checking for $LD option to reload object files... " >&6; }
  if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -5946,6 +6026,11 @@ case $reload_flag in
+@@ -5948,6 +6028,11 @@ case $reload_flag in
  esac
  reload_cmds='$LD$reload_flag -o $output$reload_objs'
  case $host_os in
@@ -2106,7 +2116,7 @@
    darwin*)
      if test "$GCC" = yes; then
        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6114,7 +6199,8 @@ mingw* | pw32*)
+@@ -6116,7 +6201,8 @@ mingw* | pw32*)
      lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
      lt_cv_file_magic_cmd='func_win32_libid'
    else
@@ -2116,7 +2126,7 @@
      lt_cv_file_magic_cmd='$OBJDUMP -f'
    fi
    ;;
-@@ -6268,6 +6354,21 @@ esac
+@@ -6270,6 +6356,21 @@ esac
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
  $as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -2138,7 +2148,7 @@
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6283,9 +6384,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6285,9 +6386,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
  
  
  
@@ -2152,9 +2162,7 @@
 +
 +
 +
- if test -n "$ac_tool_prefix"; then
--  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
--set dummy ${ac_tool_prefix}ar; ac_word=$2
++if test -n "$ac_tool_prefix"; then
 +  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
 +set dummy ${ac_tool_prefix}dlltool; ac_word=$2
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
@@ -2295,7 +2303,9 @@
 +
 +
 +
-+if test -n "$ac_tool_prefix"; then
+ if test -n "$ac_tool_prefix"; then
+-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}ar; ac_word=$2
 +  for ac_prog in ar
 +  do
 +    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
@@ -2303,7 +2313,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6301,7 +6555,7 @@ do
+@@ -6303,7 +6557,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -2312,7 +2322,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6321,11 +6575,15 @@ $as_echo "no" >&6; }
+@@ -6323,11 +6577,15 @@ $as_echo "no" >&6; }
  fi
  
  
@@ -2331,7 +2341,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6341,7 +6599,7 @@ do
+@@ -6343,7 +6601,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -2340,7 +2350,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6360,6 +6618,10 @@ else
+@@ -6362,6 +6620,10 @@ else
  $as_echo "no" >&6; }
  fi
  
@@ -2351,7 +2361,7 @@
    if test "x$ac_ct_AR" = x; then
      AR="false"
    else
-@@ -6371,16 +6633,72 @@ ac_tool_warned=yes ;;
+@@ -6373,12 +6635,10 @@ ac_tool_warned=yes ;;
  esac
      AR=$ac_ct_AR
    fi
@@ -2363,17 +2373,13 @@
 -test -z "$AR_FLAGS" && AR_FLAGS=cru
 +: ${AR=ar}
 +: ${AR_FLAGS=cru}
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
-+
+ 
+ 
+ 
+@@ -6390,6 +6650,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+ 
+ 
+ 
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
 +$as_echo_n "checking for archiver @FILE support... " >&6; }
 +if test "${lt_cv_ar_at_file+set}" = set; then :
@@ -2386,7 +2392,7 @@
 +int
 +main ()
 +{
- 
++
 +  ;
 +  return 0;
 +}
@@ -2412,23 +2418,30 @@
 +        fi
 +      fi
 +      rm -f conftest.* libconftest.a
- 
++
 +fi
 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- 
++
 +fi
 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
 +$as_echo "$lt_cv_ar_at_file" >&6; }
- 
++
 +if test "x$lt_cv_ar_at_file" = xno; then
 +  archiver_list_spec=
 +else
 +  archiver_list_spec=$lt_cv_ar_at_file
 +fi
- 
- 
- 
-@@ -6722,8 +7040,8 @@ esac
++
++
++
++
++
++
++
+ if test -n "$ac_tool_prefix"; then
+   # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+ set dummy ${ac_tool_prefix}strip; ac_word=$2
+@@ -6724,8 +7042,8 @@ esac
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  
  # Transform an extracted symbol line into symbol name and symbol address
@@ -2439,7 +2452,7 @@
  
  # Handle CRLF in mingw tool chain
  opt_cr=
-@@ -6759,6 +7077,7 @@ for ac_symprfx in "" "_"; do
+@@ -6761,6 +7079,7 @@ for ac_symprfx in "" "_"; do
    else
      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    fi
@@ -2447,7 +2460,7 @@
  
    # Check to see that the pipe works correctly.
    pipe_works=no
-@@ -6800,6 +7119,18 @@ _LT_EOF
+@@ -6802,6 +7121,18 @@ _LT_EOF
        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  	  cat <<_LT_EOF > conftest.$ac_ext
@@ -2466,7 +2479,7 @@
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -6811,7 +7142,7 @@ _LT_EOF
+@@ -6813,7 +7144,7 @@ _LT_EOF
  	  cat <<_LT_EOF >> conftest.$ac_ext
  
  /* The mapping between symbol names and symbols.  */
@@ -2475,7 +2488,7 @@
    const char *name;
    void       *address;
  }
-@@ -6837,8 +7168,8 @@ static const void *lt_preloaded_setup() {
+@@ -6839,8 +7170,8 @@ static const void *lt_preloaded_setup() {
  _LT_EOF
  	  # Now try linking the two files.
  	  mv conftest.$ac_objext conftstm.$ac_objext
@@ -2486,7 +2499,7 @@
  	  LIBS="conftstm.$ac_objext"
  	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
  	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -6848,8 +7179,8 @@ _LT_EOF
+@@ -6850,8 +7181,8 @@ _LT_EOF
    test $ac_status = 0; } && test -s conftest${ac_exeext}; then
  	    pipe_works=yes
  	  fi
@@ -2497,7 +2510,7 @@
  	else
  	  echo "cannot find nm_test_func in $nlist" >&5
  	fi
-@@ -6886,6 +7217,20 @@ else
+@@ -6888,6 +7219,21 @@ else
  $as_echo "ok" >&6; }
  fi
  
@@ -2515,10 +2528,11 @@
 +
 +
 +
++
  
  
  
-@@ -6905,6 +7250,41 @@ fi
+@@ -6906,6 +7252,40 @@ fi
  
  
  
@@ -2556,11 +2570,10 @@
 +$as_echo "${lt_sysroot:-no}" >&6; }
 +
 +
-+
  
  
- # Check whether --enable-libtool-lock was given.
-@@ -7113,6 +7493,123 @@ esac
+ 
+@@ -7115,6 +7495,123 @@ esac
  
  need_locks="$enable_libtool_lock"
  
@@ -2684,7 +2697,7 @@
  
    case $host_os in
      rhapsody* | darwin*)
-@@ -7676,6 +8173,8 @@ _LT_EOF
+@@ -7678,6 +8175,8 @@ _LT_EOF
        $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
        echo "$AR cru libconftest.a conftest.o" >&5
        $AR cru libconftest.a conftest.o 2>&5
@@ -2693,7 +2706,7 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7871,7 +8370,8 @@ fi
+@@ -7873,7 +8372,8 @@ fi
  LIBTOOL_DEPS="$ltmain"
  
  # Always use our own libtool.
@@ -2703,7 +2716,7 @@
  
  
  
-@@ -7960,7 +8460,7 @@ aix3*)
+@@ -7962,7 +8462,7 @@ aix3*)
  esac
  
  # Global variables:
@@ -2712,7 +2725,7 @@
  can_build_shared=yes
  
  # All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8258,8 +8758,6 @@ fi
+@@ -8260,8 +8760,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
  
@@ -2721,7 +2734,7 @@
  
    if test "$GCC" = yes; then
      lt_prog_compiler_wl='-Wl,'
-@@ -8425,6 +8923,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8427,6 +8925,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	lt_prog_compiler_pic='--shared'
  	lt_prog_compiler_static='--static'
  	;;
@@ -2734,7 +2747,7 @@
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
          # Portland Group compilers (*not* the Pentium gcc compiler,
  	# which looks to be a dead project)
-@@ -8487,7 +8991,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8489,7 +8993,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-Bstatic'
        case $cc_basename in
@@ -2743,7 +2756,7 @@
  	lt_prog_compiler_wl='-Qoption ld ';;
        *)
  	lt_prog_compiler_wl='-Wl,';;
-@@ -8544,13 +9048,17 @@ case $host_os in
+@@ -8546,13 +9050,17 @@ case $host_os in
      lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
      ;;
  esac
@@ -2767,7 +2780,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -8611,6 +9119,11 @@ fi
+@@ -8613,6 +9121,11 @@ fi
  
  
  
@@ -2779,7 +2792,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -8961,7 +9474,8 @@ _LT_EOF
+@@ -8963,7 +9476,8 @@ _LT_EOF
        allow_undefined_flag=unsupported
        always_export_symbols=no
        enable_shared_with_static_runtimes=yes
@@ -2789,16 +2802,7 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9009,7 +9523,7 @@ _LT_EOF
-       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- 	 && test "$tmp_diet" = no
-       then
--	tmp_addflag=
-+	tmp_addflag=' $pic_flag'
- 	tmp_sharedflag='-shared'
- 	case $cc_basename,$host_cpu in
-         pgcc*)				# Portland Group C compiler
-@@ -9060,12 +9574,12 @@ _LT_EOF
+@@ -9062,12 +9576,12 @@ _LT_EOF
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  	  hardcode_libdir_flag_spec=
  	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -2813,7 +2817,7 @@
  	  fi
  	  ;;
  	esac
-@@ -9079,8 +9593,8 @@ _LT_EOF
+@@ -9081,8 +9595,8 @@ _LT_EOF
  	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
        else
@@ -2824,7 +2828,7 @@
        fi
        ;;
  
-@@ -9098,8 +9612,8 @@ _LT_EOF
+@@ -9100,8 +9614,8 @@ _LT_EOF
  
  _LT_EOF
        elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -2835,7 +2839,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9145,8 +9659,8 @@ _LT_EOF
+@@ -9147,8 +9661,8 @@ _LT_EOF
  
      *)
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -2846,7 +2850,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9276,7 +9790,13 @@ _LT_EOF
+@@ -9278,7 +9792,13 @@ _LT_EOF
  	allow_undefined_flag='-berok'
          # Determine the default libpath from the value encoded in an
          # empty executable.
@@ -2861,7 +2865,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9289,22 +9809,29 @@ main ()
+@@ -9291,22 +9811,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -2904,7 +2908,7 @@
  
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
          archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9316,7 +9843,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9318,7 +9845,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	else
  	 # Determine the default libpath from the value encoded in an
  	 # empty executable.
@@ -2919,7 +2923,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9329,22 +9862,29 @@ main ()
+@@ -9331,22 +9864,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -2962,7 +2966,7 @@
  
  	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
  	  # Warning - without using the other run time loading flags,
-@@ -9389,20 +9929,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9391,20 +9931,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        # Microsoft Visual C++.
        # hardcode_libdir_flag_spec is actually meaningless, as there is
        # no search path for DLLs.
@@ -3040,7 +3044,7 @@
        ;;
  
      darwin* | rhapsody*)
-@@ -9463,7 +10046,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9465,7 +10048,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
      freebsd* | dragonfly*)
@@ -3049,7 +3053,7 @@
        hardcode_libdir_flag_spec='-R$libdir'
        hardcode_direct=yes
        hardcode_shlibpath_var=no
-@@ -9471,7 +10054,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9473,7 +10056,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux9*)
        if test "$GCC" = yes; then
@@ -3058,7 +3062,7 @@
        else
  	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        fi
-@@ -9487,7 +10070,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9489,7 +10072,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux10*)
        if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -3067,7 +3071,7 @@
        else
  	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
        fi
-@@ -9511,10 +10094,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9513,10 +10096,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  	  ;;
  	ia64*)
@@ -3080,7 +3084,7 @@
  	  ;;
  	esac
        else
-@@ -9593,23 +10176,36 @@ fi
+@@ -9595,23 +10178,36 @@ fi
  
      irix5* | irix6* | nonstopux*)
        if test "$GCC" = yes; then
@@ -3125,7 +3129,7 @@
        else
  	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9694,7 +10290,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9696,7 +10292,7 @@ rm -f core conftest.err conftest.$ac_objext \
      osf4* | osf5*)	# as osf3* with the addition of -msym flag
        if test "$GCC" = yes; then
  	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -3134,7 +3138,7 @@
  	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
        else
  	allow_undefined_flag=' -expect_unresolved \*'
-@@ -9713,9 +10309,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9715,9 +10311,9 @@ rm -f core conftest.err conftest.$ac_objext \
        no_undefined_flag=' -z defs'
        if test "$GCC" = yes; then
  	wlarc='${wl}'
@@ -3146,7 +3150,7 @@
        else
  	case `$CC -V 2>&1` in
  	*"Compilers 5.0"*)
-@@ -10291,8 +10887,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10293,8 +10889,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -3158,7 +3162,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -10325,13 +10922,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10327,13 +10924,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -3231,7 +3235,7 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -10423,7 +11078,7 @@ haiku*)
+@@ -10425,7 +11080,7 @@ haiku*)
    soname_spec='${libname}${release}${shared_ext}$major'
    shlibpath_var=LIBRARY_PATH
    shlibpath_overrides_runpath=yes
@@ -3240,7 +3244,16 @@
    hardcode_into_libs=yes
    ;;
  
-@@ -11263,10 +11918,10 @@ else
+@@ -11221,7 +11876,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11224 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -11265,10 +11920,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -3253,7 +3266,16 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11369,10 +12024,10 @@ else
+@@ -11327,7 +11982,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11330 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -11371,10 +12026,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -3266,7 +3288,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15373,13 +16028,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15355,13 +16010,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -3287,7 +3309,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -15394,14 +16056,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15376,14 +16038,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -3306,7 +3328,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15434,12 +16099,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15416,12 +16081,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -3320,7 +3342,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -15494,8 +16159,13 @@ reload_flag \
+@@ -15476,8 +16141,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -3334,7 +3356,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -15505,12 +16175,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -15487,12 +16157,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -3350,7 +3372,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -15526,7 +16198,6 @@ no_undefined_flag \
+@@ -15508,7 +16180,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -3358,7 +3380,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -15562,6 +16233,7 @@ module_cmds \
+@@ -15544,6 +16215,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -3366,7 +3388,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -16319,7 +16991,8 @@ $as_echo X"$file" |
+@@ -16301,7 +16973,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -3376,7 +3398,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -16422,19 +17095,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16404,19 +17077,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -3420,7 +3442,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -16464,6 +17160,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -16446,6 +17142,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -3433,7 +3455,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -16473,6 +17175,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -16455,6 +17157,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -3443,7 +3465,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -16587,12 +17292,12 @@ with_gcc=$GCC
+@@ -16569,12 +17274,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -3459,7 +3481,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -16679,9 +17384,6 @@ inherit_rpath=$inherit_rpath
+@@ -16661,9 +17366,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -3469,7 +3491,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -16697,6 +17399,9 @@ include_expsyms=$lt_include_expsyms
+@@ -16679,6 +17381,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -3479,7 +3501,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -16729,210 +17434,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -16711,210 +17416,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -3854,23 +3876,32 @@
    chmod +x "$ofile"
  
 diff --git a/configure b/configure
-index e9f2f13..cbccb18 100755
+index 85414ab..34b66f7 100755
 --- a/configure
 +++ b/configure
-@@ -8041,7 +8041,7 @@ case " $build_configdirs " in
-     # For an installed makeinfo, we require it to be from texinfo 4.7 or
-     # higher, else we use the "missing" dummy.
-     if ${MAKEINFO} --version \
--       | egrep 'texinfo[^0-9]*(4\.([7-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
-+       | egrep 'texinfo[^0-9]*([1-3][0-9]|4.[4-9]|4.[1-9][0-9]+|[5-9])' >/dev/null 2>&1; then
-       :
-     else
-       MAKEINFO="$MISSING makeinfo"
+@@ -3445,7 +3445,7 @@ case "${target}" in
+     ;;
+   s390-*-* | s390x-*-*)
+     ;;
+-  sh*-*-* | sh[34]*-*-*)
++  sh-*-* | sh[34]*-*-*)
+     ;;
+   sh64-*-* | sh5*-*-*)
+     ;;
+@@ -3939,7 +3939,7 @@ case "${target}" in
+   or1k*-*-*)
+     noconfigdirs="$noconfigdirs gdb"
+     ;;
+-  sh*-*-* | sh64-*-*)
++  sh-*-* | sh64-*-*)
+     case "${target}" in
+       sh*-*-elf)
+          ;;
 diff --git a/gas/configure b/gas/configure
-index e9ba550..074886f 100755
+index dd9c953..89f18b3 100755
 --- a/gas/configure
 +++ b/gas/configure
-@@ -645,8 +645,11 @@ OTOOL
+@@ -647,8 +647,11 @@ OTOOL
  LIPO
  NMEDIT
  DSYMUTIL
@@ -3882,7 +3913,7 @@
  OBJDUMP
  LN_S
  NM
-@@ -757,6 +760,7 @@ enable_static
+@@ -759,6 +762,7 @@ enable_static
  with_pic
  enable_fast_install
  with_gnu_ld
@@ -3890,16 +3921,16 @@
  enable_libtool_lock
  enable_plugins
  enable_largefile
-@@ -1422,6 +1426,8 @@ Optional Packages:
+@@ -1430,6 +1434,8 @@ Optional Packages:
    --with-pic              try to use only PIC/non-PIC objects [default=use
                            both]
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
 +  --with-libtool-sysroot=DIR Search for dependent libraries within DIR
 +                        (or the compiler's sysroot if not specified).
-   --with-zlib             include zlib support (auto/yes/no) default=auto
+   --with-system-zlib      use installed libz
  
  Some influential environment variables:
-@@ -4901,8 +4907,8 @@ esac
+@@ -4909,8 +4915,8 @@ esac
  
  
  
@@ -3910,7 +3941,7 @@
  
  
  
-@@ -4942,7 +4948,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -4950,7 +4956,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
  $as_echo_n "checking how to print strings... " >&6; }
  # Test print first, because it will be a builtin if present.
@@ -3919,7 +3950,7 @@
     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
    ECHO='print -r --'
  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -5628,8 +5634,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -5636,8 +5642,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
  # Try some XSI features
  xsi_shell=no
  ( _lt_dummy="a/b/c"
@@ -3930,7 +3961,7 @@
      && eval 'test $(( 1 + 1 )) -eq 2 \
      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
    && xsi_shell=yes
-@@ -5678,6 +5684,80 @@ esac
+@@ -5686,6 +5692,80 @@ esac
  
  
  
@@ -4011,7 +4042,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  $as_echo_n "checking for $LD option to reload object files... " >&6; }
  if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -5694,6 +5774,11 @@ case $reload_flag in
+@@ -5702,6 +5782,11 @@ case $reload_flag in
  esac
  reload_cmds='$LD$reload_flag -o $output$reload_objs'
  case $host_os in
@@ -4023,7 +4054,7 @@
    darwin*)
      if test "$GCC" = yes; then
        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -5862,7 +5947,8 @@ mingw* | pw32*)
+@@ -5870,7 +5955,8 @@ mingw* | pw32*)
      lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
      lt_cv_file_magic_cmd='func_win32_libid'
    else
@@ -4033,7 +4064,7 @@
      lt_cv_file_magic_cmd='$OBJDUMP -f'
    fi
    ;;
-@@ -6016,6 +6102,21 @@ esac
+@@ -6024,6 +6110,21 @@ esac
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
  $as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -4055,7 +4086,7 @@
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6031,9 +6132,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6039,9 +6140,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
  
  
  
@@ -4220,7 +4251,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6049,7 +6303,7 @@ do
+@@ -6057,7 +6311,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -4229,7 +4260,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6069,11 +6323,15 @@ $as_echo "no" >&6; }
+@@ -6077,11 +6331,15 @@ $as_echo "no" >&6; }
  fi
  
  
@@ -4248,7 +4279,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6089,7 +6347,7 @@ do
+@@ -6097,7 +6355,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -4257,7 +4288,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6108,6 +6366,10 @@ else
+@@ -6116,6 +6374,10 @@ else
  $as_echo "no" >&6; }
  fi
  
@@ -4268,7 +4299,7 @@
    if test "x$ac_ct_AR" = x; then
      AR="false"
    else
-@@ -6119,12 +6381,10 @@ ac_tool_warned=yes ;;
+@@ -6127,12 +6389,10 @@ ac_tool_warned=yes ;;
  esac
      AR=$ac_ct_AR
    fi
@@ -4283,7 +4314,7 @@
  
  
  
-@@ -6136,6 +6396,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6144,6 +6404,64 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
  
  
  
@@ -4348,7 +4379,7 @@
  if test -n "$ac_tool_prefix"; then
    # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
  set dummy ${ac_tool_prefix}strip; ac_word=$2
-@@ -6470,8 +6788,8 @@ esac
+@@ -6478,8 +6796,8 @@ esac
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  
  # Transform an extracted symbol line into symbol name and symbol address
@@ -4359,7 +4390,7 @@
  
  # Handle CRLF in mingw tool chain
  opt_cr=
-@@ -6507,6 +6825,7 @@ for ac_symprfx in "" "_"; do
+@@ -6515,6 +6833,7 @@ for ac_symprfx in "" "_"; do
    else
      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    fi
@@ -4367,7 +4398,7 @@
  
    # Check to see that the pipe works correctly.
    pipe_works=no
-@@ -6548,6 +6867,18 @@ _LT_EOF
+@@ -6556,6 +6875,18 @@ _LT_EOF
        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  	  cat <<_LT_EOF > conftest.$ac_ext
@@ -4386,7 +4417,7 @@
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -6559,7 +6890,7 @@ _LT_EOF
+@@ -6567,7 +6898,7 @@ _LT_EOF
  	  cat <<_LT_EOF >> conftest.$ac_ext
  
  /* The mapping between symbol names and symbols.  */
@@ -4395,7 +4426,7 @@
    const char *name;
    void       *address;
  }
-@@ -6585,8 +6916,8 @@ static const void *lt_preloaded_setup() {
+@@ -6593,8 +6924,8 @@ static const void *lt_preloaded_setup() {
  _LT_EOF
  	  # Now try linking the two files.
  	  mv conftest.$ac_objext conftstm.$ac_objext
@@ -4406,7 +4437,7 @@
  	  LIBS="conftstm.$ac_objext"
  	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
  	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -6596,8 +6927,8 @@ _LT_EOF
+@@ -6604,8 +6935,8 @@ _LT_EOF
    test $ac_status = 0; } && test -s conftest${ac_exeext}; then
  	    pipe_works=yes
  	  fi
@@ -4417,7 +4448,7 @@
  	else
  	  echo "cannot find nm_test_func in $nlist" >&5
  	fi
-@@ -6634,6 +6965,21 @@ else
+@@ -6642,6 +6973,21 @@ else
  $as_echo "ok" >&6; }
  fi
  
@@ -4439,7 +4470,7 @@
  
  
  
-@@ -6652,6 +6998,40 @@ fi
+@@ -6660,6 +7006,40 @@ fi
  
  
  
@@ -4480,7 +4511,7 @@
  
  
  
-@@ -6861,6 +7241,123 @@ esac
+@@ -6869,6 +7249,123 @@ esac
  
  need_locks="$enable_libtool_lock"
  
@@ -4604,7 +4635,7 @@
  
    case $host_os in
      rhapsody* | darwin*)
-@@ -7424,6 +7921,8 @@ _LT_EOF
+@@ -7432,6 +7929,8 @@ _LT_EOF
        $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
        echo "$AR cru libconftest.a conftest.o" >&5
        $AR cru libconftest.a conftest.o 2>&5
@@ -4613,7 +4644,7 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -7619,7 +8118,8 @@ fi
+@@ -7627,7 +8126,8 @@ fi
  LIBTOOL_DEPS="$ltmain"
  
  # Always use our own libtool.
@@ -4623,7 +4654,7 @@
  
  
  
-@@ -7708,7 +8208,7 @@ aix3*)
+@@ -7716,7 +8216,7 @@ aix3*)
  esac
  
  # Global variables:
@@ -4632,7 +4663,7 @@
  can_build_shared=yes
  
  # All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8006,8 +8506,6 @@ fi
+@@ -8014,8 +8514,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
  
@@ -4641,7 +4672,7 @@
  
    if test "$GCC" = yes; then
      lt_prog_compiler_wl='-Wl,'
-@@ -8173,6 +8671,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8181,6 +8679,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	lt_prog_compiler_pic='--shared'
  	lt_prog_compiler_static='--static'
  	;;
@@ -4654,7 +4685,7 @@
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
          # Portland Group compilers (*not* the Pentium gcc compiler,
  	# which looks to be a dead project)
-@@ -8235,7 +8739,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8243,7 +8747,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-Bstatic'
        case $cc_basename in
@@ -4663,7 +4694,7 @@
  	lt_prog_compiler_wl='-Qoption ld ';;
        *)
  	lt_prog_compiler_wl='-Wl,';;
-@@ -8292,13 +8796,17 @@ case $host_os in
+@@ -8300,13 +8804,17 @@ case $host_os in
      lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
      ;;
  esac
@@ -4687,7 +4718,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -8359,6 +8867,11 @@ fi
+@@ -8367,6 +8875,11 @@ fi
  
  
  
@@ -4699,7 +4730,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -8709,7 +9222,8 @@ _LT_EOF
+@@ -8717,7 +9230,8 @@ _LT_EOF
        allow_undefined_flag=unsupported
        always_export_symbols=no
        enable_shared_with_static_runtimes=yes
@@ -4709,16 +4740,7 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8757,7 +9271,7 @@ _LT_EOF
-       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- 	 && test "$tmp_diet" = no
-       then
--	tmp_addflag=
-+	tmp_addflag=' $pic_flag'
- 	tmp_sharedflag='-shared'
- 	case $cc_basename,$host_cpu in
-         pgcc*)				# Portland Group C compiler
-@@ -8808,12 +9322,12 @@ _LT_EOF
+@@ -8816,12 +9330,12 @@ _LT_EOF
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  	  hardcode_libdir_flag_spec=
  	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -4733,7 +4755,7 @@
  	  fi
  	  ;;
  	esac
-@@ -8827,8 +9341,8 @@ _LT_EOF
+@@ -8835,8 +9349,8 @@ _LT_EOF
  	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
        else
@@ -4744,7 +4766,7 @@
        fi
        ;;
  
-@@ -8846,8 +9360,8 @@ _LT_EOF
+@@ -8854,8 +9368,8 @@ _LT_EOF
  
  _LT_EOF
        elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -4755,7 +4777,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -8893,8 +9407,8 @@ _LT_EOF
+@@ -8901,8 +9415,8 @@ _LT_EOF
  
      *)
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -4766,7 +4788,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9024,7 +9538,13 @@ _LT_EOF
+@@ -9032,7 +9546,13 @@ _LT_EOF
  	allow_undefined_flag='-berok'
          # Determine the default libpath from the value encoded in an
          # empty executable.
@@ -4781,7 +4803,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9037,22 +9557,29 @@ main ()
+@@ -9045,22 +9565,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -4824,7 +4846,7 @@
  
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
          archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9064,7 +9591,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9072,7 +9599,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	else
  	 # Determine the default libpath from the value encoded in an
  	 # empty executable.
@@ -4839,7 +4861,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9077,22 +9610,29 @@ main ()
+@@ -9085,22 +9618,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -4882,7 +4904,7 @@
  
  	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
  	  # Warning - without using the other run time loading flags,
-@@ -9137,20 +9677,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9145,20 +9685,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        # Microsoft Visual C++.
        # hardcode_libdir_flag_spec is actually meaningless, as there is
        # no search path for DLLs.
@@ -4960,7 +4982,7 @@
        ;;
  
      darwin* | rhapsody*)
-@@ -9211,7 +9794,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9219,7 +9802,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
      freebsd* | dragonfly*)
@@ -4969,7 +4991,7 @@
        hardcode_libdir_flag_spec='-R$libdir'
        hardcode_direct=yes
        hardcode_shlibpath_var=no
-@@ -9219,7 +9802,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9227,7 +9810,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux9*)
        if test "$GCC" = yes; then
@@ -4978,7 +5000,7 @@
        else
  	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        fi
-@@ -9235,7 +9818,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9243,7 +9826,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux10*)
        if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -4987,7 +5009,7 @@
        else
  	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
        fi
-@@ -9259,10 +9842,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9267,10 +9850,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  	  ;;
  	ia64*)
@@ -5000,7 +5022,7 @@
  	  ;;
  	esac
        else
-@@ -9341,23 +9924,36 @@ fi
+@@ -9349,23 +9932,36 @@ fi
  
      irix5* | irix6* | nonstopux*)
        if test "$GCC" = yes; then
@@ -5045,7 +5067,7 @@
        else
  	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -9442,7 +10038,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9450,7 +10046,7 @@ rm -f core conftest.err conftest.$ac_objext \
      osf4* | osf5*)	# as osf3* with the addition of -msym flag
        if test "$GCC" = yes; then
  	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -5054,7 +5076,7 @@
  	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
        else
  	allow_undefined_flag=' -expect_unresolved \*'
-@@ -9461,9 +10057,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -9469,9 +10065,9 @@ rm -f core conftest.err conftest.$ac_objext \
        no_undefined_flag=' -z defs'
        if test "$GCC" = yes; then
  	wlarc='${wl}'
@@ -5066,7 +5088,7 @@
        else
  	case `$CC -V 2>&1` in
  	*"Compilers 5.0"*)
-@@ -10039,8 +10635,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10047,8 +10643,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -5078,7 +5100,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -10073,13 +10670,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10081,13 +10678,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -5151,7 +5173,7 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -10171,7 +10826,7 @@ haiku*)
+@@ -10179,7 +10834,7 @@ haiku*)
    soname_spec='${libname}${release}${shared_ext}$major'
    shlibpath_var=LIBRARY_PATH
    shlibpath_overrides_runpath=yes
@@ -5160,7 +5182,16 @@
    hardcode_into_libs=yes
    ;;
  
-@@ -11011,10 +11666,10 @@ else
+@@ -10975,7 +11630,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 10978 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -11019,10 +11674,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -5173,7 +5204,16 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11117,10 +11772,10 @@ else
+@@ -11081,7 +11736,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11084 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -11125,10 +11780,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -5186,7 +5226,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -15274,13 +15929,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -15276,13 +15931,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -5207,7 +5247,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -15295,14 +15957,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -15297,14 +15959,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -5226,7 +5266,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -15335,12 +16000,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -15337,12 +16002,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -5240,7 +5280,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -15395,8 +16060,13 @@ reload_flag \
+@@ -15397,8 +16062,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -5254,7 +5294,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -15406,12 +16076,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -15408,12 +16078,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -5270,7 +5310,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -15427,7 +16099,6 @@ no_undefined_flag \
+@@ -15429,7 +16101,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -5278,7 +5318,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -15463,6 +16134,7 @@ module_cmds \
+@@ -15465,6 +16136,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -5286,7 +5326,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -16227,7 +16899,8 @@ $as_echo X"$file" |
+@@ -16229,7 +16901,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -5296,7 +5336,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -16330,19 +17003,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -16332,19 +17005,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -5340,7 +5380,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -16372,6 +17068,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -16374,6 +17070,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -5353,7 +5393,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -16381,6 +17083,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -16383,6 +17085,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -5363,7 +5403,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -16495,12 +17200,12 @@ with_gcc=$GCC
+@@ -16497,12 +17202,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -5379,7 +5419,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -16587,9 +17292,6 @@ inherit_rpath=$inherit_rpath
+@@ -16589,9 +17294,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -5389,7 +5429,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -16605,6 +17307,9 @@ include_expsyms=$lt_include_expsyms
+@@ -16607,6 +17309,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -5399,7 +5439,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -16637,210 +17342,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -16639,210 +17344,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -5774,7 +5814,7 @@
    chmod +x "$ofile"
  
 diff --git a/gprof/configure b/gprof/configure
-index 79961c5..c4f6ac9 100755
+index d4db554..78b292c 100755
 --- a/gprof/configure
 +++ b/gprof/configure
 @@ -629,8 +629,11 @@ OTOOL
@@ -6628,15 +6668,6 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8692,7 +9201,7 @@ _LT_EOF
-       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- 	 && test "$tmp_diet" = no
-       then
--	tmp_addflag=
-+	tmp_addflag=' $pic_flag'
- 	tmp_sharedflag='-shared'
- 	case $cc_basename,$host_cpu in
-         pgcc*)				# Portland Group C compiler
 @@ -8743,12 +9252,12 @@ _LT_EOF
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  	  hardcode_libdir_flag_spec=
@@ -7079,6 +7110,15 @@
    hardcode_into_libs=yes
    ;;
  
+@@ -10902,7 +11552,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 10900 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
 @@ -10946,10 +11596,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
@@ -7092,6 +7132,15 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+@@ -11008,7 +11658,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11006 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
 @@ -11052,10 +11702,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
@@ -7693,10 +7742,10 @@
    chmod +x "$ofile"
  
 diff --git a/ld/configure b/ld/configure
-index 4408b0d..2fbaebf 100755
+index 8095b71..eb4f0d7 100755
 --- a/ld/configure
 +++ b/ld/configure
-@@ -654,8 +654,11 @@ OTOOL
+@@ -657,8 +657,11 @@ OTOOL
  LIPO
  NMEDIT
  DSYMUTIL
@@ -7708,7 +7757,7 @@
  OBJDUMP
  LN_S
  NM
-@@ -776,6 +779,7 @@ enable_static
+@@ -779,6 +782,7 @@ enable_static
  with_pic
  enable_fast_install
  with_gnu_ld
@@ -7716,7 +7765,7 @@
  enable_libtool_lock
  enable_plugins
  enable_largefile
-@@ -1453,6 +1457,8 @@ Optional Packages:
+@@ -1458,6 +1462,8 @@ Optional Packages:
    --with-pic              try to use only PIC/non-PIC objects [default=use
                            both]
    --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
@@ -7724,8 +7773,8 @@
 +                        (or the compiler's sysroot if not specified).
    --with-lib-path=dir1:dir2...  set default LIB_PATH
    --with-sysroot=DIR Search for usr/lib et al within DIR.
-   --with-zlib             include zlib support (auto/yes/no) default=auto
-@@ -5645,8 +5651,8 @@ esac
+ 
+@@ -5649,8 +5655,8 @@ esac
  
  
  
@@ -7736,7 +7785,7 @@
  
  
  
-@@ -5686,7 +5692,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+@@ -5690,7 +5696,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
  $as_echo_n "checking how to print strings... " >&6; }
  # Test print first, because it will be a builtin if present.
@@ -7745,7 +7794,7 @@
     test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
    ECHO='print -r --'
  elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
-@@ -6372,8 +6378,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+@@ -6376,8 +6382,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
  # Try some XSI features
  xsi_shell=no
  ( _lt_dummy="a/b/c"
@@ -7756,7 +7805,7 @@
      && eval 'test $(( 1 + 1 )) -eq 2 \
      && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
    && xsi_shell=yes
-@@ -6422,6 +6428,80 @@ esac
+@@ -6426,6 +6432,80 @@ esac
  
  
  
@@ -7837,7 +7886,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
  $as_echo_n "checking for $LD option to reload object files... " >&6; }
  if test "${lt_cv_ld_reload_flag+set}" = set; then :
-@@ -6438,6 +6518,11 @@ case $reload_flag in
+@@ -6442,6 +6522,11 @@ case $reload_flag in
  esac
  reload_cmds='$LD$reload_flag -o $output$reload_objs'
  case $host_os in
@@ -7849,7 +7898,7 @@
    darwin*)
      if test "$GCC" = yes; then
        reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-@@ -6606,7 +6691,8 @@ mingw* | pw32*)
+@@ -6610,7 +6695,8 @@ mingw* | pw32*)
      lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
      lt_cv_file_magic_cmd='func_win32_libid'
    else
@@ -7859,7 +7908,7 @@
      lt_cv_file_magic_cmd='$OBJDUMP -f'
    fi
    ;;
-@@ -6760,6 +6846,21 @@ esac
+@@ -6764,6 +6850,21 @@ esac
  fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
  $as_echo "$lt_cv_deplibs_check_method" >&6; }
@@ -7881,7 +7930,7 @@
  file_magic_cmd=$lt_cv_file_magic_cmd
  deplibs_check_method=$lt_cv_deplibs_check_method
  test -z "$deplibs_check_method" && deplibs_check_method=unknown
-@@ -6775,9 +6876,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -6779,9 +6880,162 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
  
  
  
@@ -8046,7 +8095,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if test "${ac_cv_prog_AR+set}" = set; then :
-@@ -6793,7 +7047,7 @@ do
+@@ -6797,7 +7051,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -8055,7 +8104,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6813,11 +7067,15 @@ $as_echo "no" >&6; }
+@@ -6817,11 +7071,15 @@ $as_echo "no" >&6; }
  fi
  
  
@@ -8074,7 +8123,7 @@
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  $as_echo_n "checking for $ac_word... " >&6; }
  if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
-@@ -6833,7 +7091,7 @@ do
+@@ -6837,7 +7095,7 @@ do
    test -z "$as_dir" && as_dir=.
      for ac_exec_ext in '' $ac_executable_extensions; do
    if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
@@ -8083,7 +8132,7 @@
      $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
      break 2
    fi
-@@ -6852,6 +7110,10 @@ else
+@@ -6856,6 +7114,10 @@ else
  $as_echo "no" >&6; }
  fi
  
@@ -8094,7 +8143,7 @@
    if test "x$ac_ct_AR" = x; then
      AR="false"
    else
-@@ -6863,12 +7125,12 @@ ac_tool_warned=yes ;;
+@@ -6867,12 +7129,12 @@ ac_tool_warned=yes ;;
  esac
      AR=$ac_ct_AR
    fi
@@ -8111,7 +8160,7 @@
  
  
  
-@@ -6878,6 +7140,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
+@@ -6882,6 +7144,62 @@ test -z "$AR_FLAGS" && AR_FLAGS=cru
  
  
  
@@ -8174,7 +8223,7 @@
  
  
  if test -n "$ac_tool_prefix"; then
-@@ -7214,8 +7532,8 @@ esac
+@@ -7218,8 +7536,8 @@ esac
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  
  # Transform an extracted symbol line into symbol name and symbol address
@@ -8185,7 +8234,7 @@
  
  # Handle CRLF in mingw tool chain
  opt_cr=
-@@ -7251,6 +7569,7 @@ for ac_symprfx in "" "_"; do
+@@ -7255,6 +7573,7 @@ for ac_symprfx in "" "_"; do
    else
      lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
    fi
@@ -8193,7 +8242,7 @@
  
    # Check to see that the pipe works correctly.
    pipe_works=no
-@@ -7292,6 +7611,18 @@ _LT_EOF
+@@ -7296,6 +7615,18 @@ _LT_EOF
        if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
  	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
  	  cat <<_LT_EOF > conftest.$ac_ext
@@ -8212,7 +8261,7 @@
  #ifdef __cplusplus
  extern "C" {
  #endif
-@@ -7303,7 +7634,7 @@ _LT_EOF
+@@ -7307,7 +7638,7 @@ _LT_EOF
  	  cat <<_LT_EOF >> conftest.$ac_ext
  
  /* The mapping between symbol names and symbols.  */
@@ -8221,7 +8270,7 @@
    const char *name;
    void       *address;
  }
-@@ -7329,8 +7660,8 @@ static const void *lt_preloaded_setup() {
+@@ -7333,8 +7664,8 @@ static const void *lt_preloaded_setup() {
  _LT_EOF
  	  # Now try linking the two files.
  	  mv conftest.$ac_objext conftstm.$ac_objext
@@ -8232,7 +8281,7 @@
  	  LIBS="conftstm.$ac_objext"
  	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
  	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
-@@ -7340,8 +7671,8 @@ _LT_EOF
+@@ -7344,8 +7675,8 @@ _LT_EOF
    test $ac_status = 0; } && test -s conftest${ac_exeext}; then
  	    pipe_works=yes
  	  fi
@@ -8243,7 +8292,7 @@
  	else
  	  echo "cannot find nm_test_func in $nlist" >&5
  	fi
-@@ -7378,6 +7709,19 @@ else
+@@ -7382,6 +7713,19 @@ else
  $as_echo "ok" >&6; }
  fi
  
@@ -8263,7 +8312,7 @@
  
  
  
-@@ -7398,6 +7742,42 @@ fi
+@@ -7402,6 +7746,42 @@ fi
  
  
  
@@ -8306,7 +8355,7 @@
  
  # Check whether --enable-libtool-lock was given.
  if test "${enable_libtool_lock+set}" = set; then :
-@@ -7605,6 +7985,123 @@ esac
+@@ -7609,6 +7989,123 @@ esac
  
  need_locks="$enable_libtool_lock"
  
@@ -8430,7 +8479,7 @@
  
    case $host_os in
      rhapsody* | darwin*)
-@@ -8168,6 +8665,8 @@ _LT_EOF
+@@ -8172,6 +8669,8 @@ _LT_EOF
        $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
        echo "$AR cru libconftest.a conftest.o" >&5
        $AR cru libconftest.a conftest.o 2>&5
@@ -8439,7 +8488,7 @@
        cat > conftest.c << _LT_EOF
  int main() { return 0;}
  _LT_EOF
-@@ -8236,6 +8735,16 @@ done
+@@ -8240,6 +8739,16 @@ done
  
  
  
@@ -8456,7 +8505,7 @@
  
  
  # Set options
-@@ -8364,7 +8873,8 @@ fi
+@@ -8368,7 +8877,8 @@ fi
  LIBTOOL_DEPS="$ltmain"
  
  # Always use our own libtool.
@@ -8466,7 +8515,7 @@
  
  
  
-@@ -8453,7 +8963,7 @@ aix3*)
+@@ -8457,7 +8967,7 @@ aix3*)
  esac
  
  # Global variables:
@@ -8475,7 +8524,7 @@
  can_build_shared=yes
  
  # All known linkers require a `.a' archive for static linking (except MSVC,
-@@ -8751,8 +9261,6 @@ fi
+@@ -8755,8 +9265,6 @@ fi
  lt_prog_compiler_pic=
  lt_prog_compiler_static=
  
@@ -8484,7 +8533,7 @@
  
    if test "$GCC" = yes; then
      lt_prog_compiler_wl='-Wl,'
-@@ -8918,6 +9426,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8922,6 +9430,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	lt_prog_compiler_pic='--shared'
  	lt_prog_compiler_static='--static'
  	;;
@@ -8497,7 +8546,7 @@
        pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
          # Portland Group compilers (*not* the Pentium gcc compiler,
  	# which looks to be a dead project)
-@@ -8980,7 +9494,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -8984,7 +9498,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-Bstatic'
        case $cc_basename in
@@ -8506,7 +8555,7 @@
  	lt_prog_compiler_wl='-Qoption ld ';;
        *)
  	lt_prog_compiler_wl='-Wl,';;
-@@ -9037,13 +9551,17 @@ case $host_os in
+@@ -9041,13 +9555,17 @@ case $host_os in
      lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
      ;;
  esac
@@ -8530,7 +8579,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -9104,6 +9622,11 @@ fi
+@@ -9108,6 +9626,11 @@ fi
  
  
  
@@ -8542,7 +8591,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -9454,7 +9977,8 @@ _LT_EOF
+@@ -9458,7 +9981,8 @@ _LT_EOF
        allow_undefined_flag=unsupported
        always_export_symbols=no
        enable_shared_with_static_runtimes=yes
@@ -8552,16 +8601,7 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -9502,7 +10026,7 @@ _LT_EOF
-       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- 	 && test "$tmp_diet" = no
-       then
--	tmp_addflag=
-+	tmp_addflag=' $pic_flag'
- 	tmp_sharedflag='-shared'
- 	case $cc_basename,$host_cpu in
-         pgcc*)				# Portland Group C compiler
-@@ -9553,12 +10077,12 @@ _LT_EOF
+@@ -9557,12 +10081,12 @@ _LT_EOF
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  	  hardcode_libdir_flag_spec=
  	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
@@ -8576,7 +8616,7 @@
  	  fi
  	  ;;
  	esac
-@@ -9572,8 +10096,8 @@ _LT_EOF
+@@ -9576,8 +10100,8 @@ _LT_EOF
  	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  	wlarc=
        else
@@ -8587,7 +8627,7 @@
        fi
        ;;
  
-@@ -9591,8 +10115,8 @@ _LT_EOF
+@@ -9595,8 +10119,8 @@ _LT_EOF
  
  _LT_EOF
        elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8598,7 +8638,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9638,8 +10162,8 @@ _LT_EOF
+@@ -9642,8 +10166,8 @@ _LT_EOF
  
      *)
        if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
@@ -8609,7 +8649,7 @@
        else
  	ld_shlibs=no
        fi
-@@ -9769,7 +10293,13 @@ _LT_EOF
+@@ -9773,7 +10297,13 @@ _LT_EOF
  	allow_undefined_flag='-berok'
          # Determine the default libpath from the value encoded in an
          # empty executable.
@@ -8624,7 +8664,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9782,22 +10312,29 @@ main ()
+@@ -9786,22 +10316,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -8667,7 +8707,7 @@
  
          hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
          archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-@@ -9809,7 +10346,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9813,7 +10350,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	else
  	 # Determine the default libpath from the value encoded in an
  	 # empty executable.
@@ -8682,7 +8722,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -9822,22 +10365,29 @@ main ()
+@@ -9826,22 +10369,29 @@ main ()
  _ACEOF
  if ac_fn_c_try_link "$LINENO"; then :
  
@@ -8725,7 +8765,7 @@
  
  	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
  	  # Warning - without using the other run time loading flags,
-@@ -9881,21 +10431,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9885,21 +10435,64 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
        # When not using gcc, we currently assume that we are using
        # Microsoft Visual C++.
        # hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -8805,7 +8845,7 @@
        ;;
  
      darwin* | rhapsody*)
-@@ -9956,7 +10549,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9960,7 +10553,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
      freebsd* | dragonfly*)
@@ -8814,7 +8854,7 @@
        hardcode_libdir_flag_spec='-R$libdir'
        hardcode_direct=yes
        hardcode_shlibpath_var=no
-@@ -9964,7 +10557,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9968,7 +10561,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux9*)
        if test "$GCC" = yes; then
@@ -8823,7 +8863,7 @@
        else
  	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
        fi
-@@ -9980,7 +10573,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -9984,7 +10577,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
      hpux10*)
        if test "$GCC" = yes && test "$with_gnu_ld" = no; then
@@ -8832,7 +8872,7 @@
        else
  	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
        fi
-@@ -10004,10 +10597,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -10008,10 +10601,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  	  ;;
  	ia64*)
@@ -8845,7 +8885,7 @@
  	  ;;
  	esac
        else
-@@ -10086,23 +10679,36 @@ fi
+@@ -10090,23 +10683,36 @@ fi
  
      irix5* | irix6* | nonstopux*)
        if test "$GCC" = yes; then
@@ -8890,7 +8930,7 @@
        else
  	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
  	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
-@@ -10187,7 +10793,7 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10191,7 +10797,7 @@ rm -f core conftest.err conftest.$ac_objext \
      osf4* | osf5*)	# as osf3* with the addition of -msym flag
        if test "$GCC" = yes; then
  	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
@@ -8899,7 +8939,7 @@
  	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
        else
  	allow_undefined_flag=' -expect_unresolved \*'
-@@ -10206,9 +10812,9 @@ rm -f core conftest.err conftest.$ac_objext \
+@@ -10210,9 +10816,9 @@ rm -f core conftest.err conftest.$ac_objext \
        no_undefined_flag=' -z defs'
        if test "$GCC" = yes; then
  	wlarc='${wl}'
@@ -8911,7 +8951,7 @@
        else
  	case `$CC -V 2>&1` in
  	*"Compilers 5.0"*)
-@@ -10784,8 +11390,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10788,8 +11394,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -8923,7 +8963,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -10818,13 +11425,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -10822,13 +11429,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -8996,7 +9036,7 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -10916,7 +11581,7 @@ haiku*)
+@@ -10920,7 +11585,7 @@ haiku*)
    soname_spec='${libname}${release}${shared_ext}$major'
    shlibpath_var=LIBRARY_PATH
    shlibpath_overrides_runpath=yes
@@ -9005,16 +9045,16 @@
    hardcode_into_libs=yes
    ;;
  
-@@ -11712,7 +12377,7 @@ else
+@@ -11716,7 +12381,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 11715 "configure"
+-#line 11719 "configure"
 +#line $LINENO "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -11756,10 +12421,10 @@ else
+@@ -11760,10 +12425,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -9027,16 +9067,16 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -11818,7 +12483,7 @@ else
+@@ -11822,7 +12487,7 @@ else
    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    lt_status=$lt_dlunknown
    cat > conftest.$ac_ext <<_LT_EOF
--#line 11821 "configure"
+-#line 11825 "configure"
 +#line $LINENO "configure"
  #include "confdefs.h"
  
  #if HAVE_DLFCN_H
-@@ -11862,10 +12527,10 @@ else
+@@ -11866,10 +12531,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
  #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
@@ -9049,7 +9089,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12257,6 +12922,7 @@ $RM -r conftest*
+@@ -12261,6 +12926,7 @@ $RM -r conftest*
  
    # Allow CC to be a program name with arguments.
    lt_save_CC=$CC
@@ -9057,7 +9097,7 @@
    lt_save_LD=$LD
    lt_save_GCC=$GCC
    GCC=$GXX
-@@ -12274,6 +12940,7 @@ $RM -r conftest*
+@@ -12278,6 +12944,7 @@ $RM -r conftest*
    fi
    test -z "${LDCXX+set}" || LD=$LDCXX
    CC=${CXX-"c++"}
@@ -9065,18 +9105,7 @@
    compiler=$CC
    compiler_CXX=$CC
    for cc_temp in $compiler""; do
-@@ -12413,8 +13080,8 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
-       # Check if GNU C++ uses GNU ld as the underlying linker, since the
-       # archiving commands below assume that GNU ld is being used.
-       if test "$with_gnu_ld" = yes; then
--        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
--        archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-+        archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-+        archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- 
-         hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-         export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-@@ -12556,7 +13223,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -12560,7 +13227,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
            allow_undefined_flag_CXX='-berok'
            # Determine the default libpath from the value encoded in an empty
            # executable.
@@ -9091,7 +9120,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -12569,22 +13242,29 @@ main ()
+@@ -12573,22 +13246,29 @@ main ()
  _ACEOF
  if ac_fn_cxx_try_link "$LINENO"; then :
  
@@ -9134,7 +9163,7 @@
  
            hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
  
-@@ -12597,7 +13277,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12601,7 +13281,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
            else
  	    # Determine the default libpath from the value encoded in an
  	    # empty executable.
@@ -9149,7 +9178,7 @@
  /* end confdefs.h.  */
  
  int
-@@ -12610,22 +13296,29 @@ main ()
+@@ -12614,22 +13300,29 @@ main ()
  _ACEOF
  if ac_fn_cxx_try_link "$LINENO"; then :
  
@@ -9192,7 +9221,7 @@
  
  	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
  	    # Warning - without using the other run time loading flags,
-@@ -12668,29 +13361,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12672,29 +13365,75 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
          ;;
  
        cygwin* | mingw* | pw32* | cegcc*)
@@ -9291,7 +9320,7 @@
        darwin* | rhapsody*)
  
  
-@@ -12796,7 +13535,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12800,7 +13539,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
              ;;
            *)
              if test "$GXX" = yes; then
@@ -9300,7 +9329,7 @@
              else
                # FIXME: insert proper C++ library support
                ld_shlibs_CXX=no
-@@ -12867,10 +13606,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12871,10 +13610,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  	            ;;
  	          ia64*)
@@ -9313,7 +9342,7 @@
  	            ;;
  	        esac
  	      fi
-@@ -12911,9 +13650,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12915,9 +13654,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
            *)
  	    if test "$GXX" = yes; then
  	      if test "$with_gnu_ld" = no; then
@@ -9325,7 +9354,7 @@
  	      fi
  	    fi
  	    link_all_deplibs_CXX=yes
-@@ -12983,20 +13722,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -12987,20 +13726,20 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	      prelink_cmds_CXX='tpldir=Template.dir~
  		rm -rf $tpldir~
  		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
@@ -9350,7 +9379,7 @@
  	      ;;
  	    *) # Version 6 and above use weak symbols
  	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-@@ -13191,7 +13930,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13195,7 +13934,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  		  ;;
  	        *)
@@ -9359,7 +9388,7 @@
  		  ;;
  	      esac
  
-@@ -13237,7 +13976,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13241,7 +13980,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  
        solaris*)
          case $cc_basename in
@@ -9368,7 +9397,7 @@
  	    # Sun C++ 4.2, 5.x and Centerline C++
              archive_cmds_need_lc_CXX=yes
  	    no_undefined_flag_CXX=' -zdefs'
-@@ -13278,9 +14017,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+@@ -13282,9 +14021,9 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
  	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
@@ -9380,7 +9409,7 @@
  
  	        # Commands to make compiler produce verbose output that lists
  	        # what "hidden" libraries, object files and flags are used when
-@@ -13415,6 +14154,13 @@ private:
+@@ -13419,6 +14158,13 @@ private:
  };
  _LT_EOF
  
@@ -9394,7 +9423,7 @@
  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    (eval $ac_compile) 2>&5
    ac_status=$?
-@@ -13428,7 +14174,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13432,7 +14178,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
    pre_test_object_deps_done=no
  
    for p in `eval "$output_verbose_link_cmd"`; do
@@ -9403,7 +9432,7 @@
  
      -L* | -R* | -l*)
         # Some compilers place space between "-{L,R}" and the path.
-@@ -13437,13 +14183,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13441,13 +14187,22 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
            test $p = "-R"; then
  	 prev=$p
  	 continue
@@ -9430,7 +9459,7 @@
  	   # Internal compiler library paths should come after those
  	   # provided the user.  The postdeps already come after the
  	   # user supplied libs so there is no need to process them.
-@@ -13463,8 +14218,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+@@ -13467,8 +14222,10 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
  	 fi
         fi
@@ -9441,7 +9470,7 @@
      *.$objext)
         # This assumes that the test object file only shows up
         # once in the compiler output.
-@@ -13500,6 +14257,7 @@ else
+@@ -13504,6 +14261,7 @@ else
  fi
  
  $RM -f confest.$objext
@@ -9449,7 +9478,7 @@
  
  # PORTME: override above test on systems where it is broken
  case $host_os in
-@@ -13535,7 +14293,7 @@ linux*)
+@@ -13539,7 +14297,7 @@ linux*)
  
  solaris*)
    case $cc_basename in
@@ -9458,7 +9487,7 @@
      # The more standards-conforming stlport4 library is
      # incompatible with the Cstd library. Avoid specifying
      # it if it's in CXXFLAGS. Ignore libCrun as
-@@ -13600,8 +14358,6 @@ fi
+@@ -13604,8 +14362,6 @@ fi
  lt_prog_compiler_pic_CXX=
  lt_prog_compiler_static_CXX=
  
@@ -9467,7 +9496,7 @@
  
    # C++ specific cases for pic, static, wl, etc.
    if test "$GXX" = yes; then
-@@ -13706,6 +14462,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -13710,6 +14466,11 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	  ;;
  	esac
  	;;
@@ -9479,7 +9508,7 @@
        dgux*)
  	case $cc_basename in
  	  ec++*)
-@@ -13858,7 +14619,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+@@ -13862,7 +14623,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
  	;;
        solaris*)
  	case $cc_basename in
@@ -9488,7 +9517,7 @@
  	    # Sun C++ 4.2, 5.x and Centerline C++
  	    lt_prog_compiler_pic_CXX='-KPIC'
  	    lt_prog_compiler_static_CXX='-Bstatic'
-@@ -13923,10 +14684,17 @@ case $host_os in
+@@ -13927,10 +14688,17 @@ case $host_os in
      lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
      ;;
  esac
@@ -9509,7 +9538,7 @@
  
  #
  # Check to make sure the PIC flag actually works.
-@@ -13984,6 +14752,8 @@ fi
+@@ -13988,6 +14756,8 @@ fi
  
  
  
@@ -9518,7 +9547,7 @@
  #
  # Check to make sure the static flag actually works.
  #
-@@ -14161,6 +14931,7 @@ fi
+@@ -14165,6 +14935,7 @@ fi
  $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
  
    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
@@ -9526,7 +9555,7 @@
    case $host_os in
    aix[4-9]*)
      # If we're using GNU nm, then we don't want the "-C" option.
-@@ -14175,15 +14946,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+@@ -14179,15 +14950,20 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
      ;;
    pw32*)
      export_symbols_cmds_CXX="$ltdll_cmds"
@@ -9552,7 +9581,7 @@
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
  $as_echo "$ld_shlibs_CXX" >&6; }
-@@ -14446,8 +15222,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14450,8 +15226,9 @@ cygwin* | mingw* | pw32* | cegcc*)
    need_version=no
    need_lib_prefix=no
  
@@ -9564,7 +9593,7 @@
      library_names_spec='$libname.dll.a'
      # DLL is installed to $(libdir)/../bin by postinstall_cmds
      postinstall_cmds='base_file=`basename \${file}`~
-@@ -14479,13 +15256,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+@@ -14483,13 +15260,71 @@ cygwin* | mingw* | pw32* | cegcc*)
        library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
        ;;
      esac
@@ -9637,7 +9666,7 @@
    # FIXME: first we should search . and the directory the executable is in
    shlibpath_var=PATH
    ;;
-@@ -14576,7 +15411,7 @@ haiku*)
+@@ -14580,7 +15415,7 @@ haiku*)
    soname_spec='${libname}${release}${shared_ext}$major'
    shlibpath_var=LIBRARY_PATH
    shlibpath_overrides_runpath=yes
@@ -9646,7 +9675,7 @@
    hardcode_into_libs=yes
    ;;
  
-@@ -15035,6 +15870,7 @@ fi
+@@ -15039,6 +15874,7 @@ fi
    fi # test -n "$compiler"
  
    CC=$lt_save_CC
@@ -9654,7 +9683,7 @@
    LDCXX=$LD
    LD=$lt_save_LD
    GCC=$lt_save_GCC
-@@ -17807,13 +18643,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -17953,13 +18789,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -9675,7 +9704,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -17828,14 +18671,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -17974,14 +18817,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -9694,7 +9723,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -17868,12 +18714,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -18014,12 +18860,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -9708,7 +9737,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -17912,8 +18758,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
+@@ -18058,8 +18904,8 @@ old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote
  compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`'
  GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`'
  lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9718,7 +9747,7 @@
  lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`'
  lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`'
  archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -17940,12 +18786,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
+@@ -18086,12 +18932,12 @@ hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_
  hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`'
  inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`'
@@ -9732,7 +9761,7 @@
  file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`'
  hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`'
  compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`'
-@@ -17983,8 +18829,13 @@ reload_flag \
+@@ -18129,8 +18975,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -9746,7 +9775,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -17994,12 +18845,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -18140,12 +18991,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -9762,7 +9791,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -18015,7 +18868,6 @@ no_undefined_flag \
+@@ -18161,7 +19014,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -9770,7 +9799,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -18037,8 +18889,8 @@ LD_CXX \
+@@ -18183,8 +19035,8 @@ LD_CXX \
  reload_flag_CXX \
  compiler_CXX \
  lt_prog_compiler_no_builtin_flag_CXX \
@@ -9780,7 +9809,7 @@
  lt_prog_compiler_static_CXX \
  lt_cv_prog_compiler_c_o_CXX \
  export_dynamic_flag_spec_CXX \
-@@ -18050,7 +18902,6 @@ no_undefined_flag_CXX \
+@@ -18196,7 +19048,6 @@ no_undefined_flag_CXX \
  hardcode_libdir_flag_spec_CXX \
  hardcode_libdir_flag_spec_ld_CXX \
  hardcode_libdir_separator_CXX \
@@ -9788,7 +9817,7 @@
  exclude_expsyms_CXX \
  include_expsyms_CXX \
  file_list_spec_CXX \
-@@ -18084,6 +18935,7 @@ module_cmds \
+@@ -18230,6 +19081,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -9796,7 +9825,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -18098,7 +18950,8 @@ archive_expsym_cmds_CXX \
+@@ -18244,7 +19096,8 @@ archive_expsym_cmds_CXX \
  module_cmds_CXX \
  module_expsym_cmds_CXX \
  export_symbols_cmds_CXX \
@@ -9806,7 +9835,7 @@
      case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
      *[\\\\\\\`\\"\\\$]*)
        eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
-@@ -18891,7 +19744,8 @@ $as_echo X"$file" |
+@@ -19037,7 +19890,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -9816,7 +9845,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -18994,19 +19848,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -19140,19 +19994,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -9860,7 +9889,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -19036,6 +19913,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -19182,6 +20059,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -9873,7 +9902,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -19045,6 +19928,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -19191,6 +20074,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -9883,7 +9912,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -19159,12 +20045,12 @@ with_gcc=$GCC
+@@ -19305,12 +20191,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -9899,7 +9928,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -19251,9 +20137,6 @@ inherit_rpath=$inherit_rpath
+@@ -19397,9 +20283,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -9909,7 +9938,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -19269,6 +20152,9 @@ include_expsyms=$lt_include_expsyms
+@@ -19415,6 +20298,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -9919,7 +9948,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -19315,210 +20201,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -19461,210 +20347,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -10293,7 +10322,7 @@
      (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
    chmod +x "$ofile"
  
-@@ -19546,12 +20391,12 @@ with_gcc=$GCC_CXX
+@@ -19692,12 +20537,12 @@ with_gcc=$GCC_CXX
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
  
@@ -10309,7 +10338,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static_CXX
  
-@@ -19638,9 +20483,6 @@ inherit_rpath=$inherit_rpath_CXX
+@@ -19784,9 +20629,6 @@ inherit_rpath=$inherit_rpath_CXX
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs_CXX
  
@@ -10319,7 +10348,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols_CXX
  
-@@ -19656,6 +20498,9 @@ include_expsyms=$lt_include_expsyms_CXX
+@@ -19802,6 +20644,9 @@ include_expsyms=$lt_include_expsyms_CXX
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds_CXX
  
@@ -10330,7 +10359,7 @@
  file_list_spec=$lt_file_list_spec_CXX
  
 diff --git a/libtool.m4 b/libtool.m4
-index 797468f..02b15b3 100644
+index 4b2d30a..008d331 100644
 --- a/libtool.m4
 +++ b/libtool.m4
 @@ -1,7 +1,8 @@
@@ -11052,15 +11081,6 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -4459,7 +4731,7 @@ _LT_EOF
-       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- 	 && test "$tmp_diet" = no
-       then
--	tmp_addflag=
-+	tmp_addflag=' $pic_flag'
- 	tmp_sharedflag='-shared'
- 	case $cc_basename,$host_cpu in
-         pgcc*)				# Portland Group C compiler
 @@ -4510,12 +4782,12 @@ _LT_EOF
  	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
  	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
@@ -11347,17 +11367,6 @@
    compiler=$CC
    _LT_TAGVAR(compiler, $1)=$CC
    _LT_CC_BASENAME([$compiler])
-@@ -5525,8 +5858,8 @@ if test "$_lt_caught_CXX_error" != yes; then
-       # Check if GNU C++ uses GNU ld as the underlying linker, since the
-       # archiving commands below assume that GNU ld is being used.
-       if test "$with_gnu_ld" = yes; then
--        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
--        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-+        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- 
-         _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-         _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
 @@ -5667,7 +6000,7 @@ if test "$_lt_caught_CXX_error" != yes; then
            _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
            # Determine the default libpath from the value encoded in an empty
@@ -17433,7 +17442,7 @@
  # These exist entirely to fool aclocal when bootstrapping libtool.
  #
 diff --git a/opcodes/configure b/opcodes/configure
-index c9c04ce..31141d9 100755
+index eedb184..d3076e1 100755
 --- a/opcodes/configure
 +++ b/opcodes/configure
 @@ -648,6 +648,9 @@ OTOOL
@@ -18270,15 +18279,6 @@
  
        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
          archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-@@ -8936,7 +9450,7 @@ _LT_EOF
-       if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- 	 && test "$tmp_diet" = no
-       then
--	tmp_addflag=
-+	tmp_addflag=' $pic_flag'
- 	tmp_sharedflag='-shared'
- 	case $cc_basename,$host_cpu in
-         pgcc*)				# Portland Group C compiler
 @@ -8987,12 +9501,12 @@ _LT_EOF
  	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
  	  hardcode_libdir_flag_spec=
@@ -18721,6 +18721,15 @@
    hardcode_into_libs=yes
    ;;
  
+@@ -11146,7 +11801,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11149 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
 @@ -11190,10 +11845,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
@@ -18734,6 +18743,15 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+@@ -11252,7 +11907,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 11255 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
 @@ -11296,10 +11951,10 @@ else
  /* When -fvisbility=hidden is used, assume the code has been annotated
     correspondingly for the symbols needed.  */
@@ -18747,7 +18765,7 @@
  int main ()
  {
    void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-@@ -12450,7 +13105,7 @@ if test "$enable_shared" = "yes"; then
+@@ -12462,7 +13117,7 @@ if test "$enable_shared" = "yes"; then
  # since libbfd may not pull in the entirety of libiberty.
    x=`sed -n -e 's/^[ 	]*PICFLAG[ 	]*=[ 	]*//p' < ../libiberty/Makefile | sed -n '$p'`
    if test -n "$x"; then
@@ -18756,7 +18774,7 @@
    fi
  
    case "${host}" in
-@@ -13422,13 +14077,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+@@ -13436,13 +14091,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
  lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
  lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
  lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
@@ -18777,7 +18795,7 @@
  STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
  RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
  old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
-@@ -13443,14 +14105,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+@@ -13457,14 +14119,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
  lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
@@ -18796,7 +18814,7 @@
  DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
  NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
  LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
-@@ -13483,12 +14148,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+@@ -13497,12 +14162,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
  hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
  inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
  link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
@@ -18810,7 +18828,7 @@
  file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
  variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
  need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
-@@ -13543,8 +14208,13 @@ reload_flag \
+@@ -13557,8 +14222,13 @@ reload_flag \
  OBJDUMP \
  deplibs_check_method \
  file_magic_cmd \
@@ -18824,7 +18842,7 @@
  STRIP \
  RANLIB \
  CC \
-@@ -13554,12 +14224,14 @@ lt_cv_sys_global_symbol_pipe \
+@@ -13568,12 +14238,14 @@ lt_cv_sys_global_symbol_pipe \
  lt_cv_sys_global_symbol_to_cdecl \
  lt_cv_sys_global_symbol_to_c_name_address \
  lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
@@ -18840,7 +18858,7 @@
  DSYMUTIL \
  NMEDIT \
  LIPO \
-@@ -13575,7 +14247,6 @@ no_undefined_flag \
+@@ -13589,7 +14261,6 @@ no_undefined_flag \
  hardcode_libdir_flag_spec \
  hardcode_libdir_flag_spec_ld \
  hardcode_libdir_separator \
@@ -18848,7 +18866,7 @@
  exclude_expsyms \
  include_expsyms \
  file_list_spec \
-@@ -13611,6 +14282,7 @@ module_cmds \
+@@ -13625,6 +14296,7 @@ module_cmds \
  module_expsym_cmds \
  export_symbols_cmds \
  prelink_cmds \
@@ -18856,7 +18874,7 @@
  postinstall_cmds \
  postuninstall_cmds \
  finish_cmds \
-@@ -14367,7 +15039,8 @@ $as_echo X"$file" |
+@@ -14381,7 +15053,8 @@ $as_echo X"$file" |
  # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  #
  #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
@@ -18866,7 +18884,7 @@
  #   Written by Gordon Matzigkeit, 1996
  #
  #   This file is part of GNU Libtool.
-@@ -14470,19 +15143,42 @@ SP2NL=$lt_lt_SP2NL
+@@ -14484,19 +15157,42 @@ SP2NL=$lt_lt_SP2NL
  # turn newlines into spaces.
  NL2SP=$lt_lt_NL2SP
  
@@ -18910,7 +18928,7 @@
  # A symbol stripping program.
  STRIP=$lt_STRIP
  
-@@ -14512,6 +15208,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+@@ -14526,6 +15222,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  # Transform the output of nm in a C name address pair when lib prefix is needed.
  global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
  
@@ -18923,7 +18941,7 @@
  # The name of the directory that contains temporary libtool files.
  objdir=$objdir
  
-@@ -14521,6 +15223,9 @@ MAGIC_CMD=$MAGIC_CMD
+@@ -14535,6 +15237,9 @@ MAGIC_CMD=$MAGIC_CMD
  # Must we lock files when doing compilation?
  need_locks=$lt_need_locks
  
@@ -18933,7 +18951,7 @@
  # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
  DSYMUTIL=$lt_DSYMUTIL
  
-@@ -14635,12 +15340,12 @@ with_gcc=$GCC
+@@ -14649,12 +15354,12 @@ with_gcc=$GCC
  # Compiler flag to turn off builtin functions.
  no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
  
@@ -18949,7 +18967,7 @@
  # Compiler flag to prevent dynamic linking.
  link_static_flag=$lt_lt_prog_compiler_static
  
-@@ -14727,9 +15432,6 @@ inherit_rpath=$inherit_rpath
+@@ -14741,9 +15446,6 @@ inherit_rpath=$inherit_rpath
  # Whether libtool must link a program against all its dependency libraries.
  link_all_deplibs=$link_all_deplibs
  
@@ -18959,7 +18977,7 @@
  # Set to "yes" if exported symbols are required.
  always_export_symbols=$always_export_symbols
  
-@@ -14745,6 +15447,9 @@ include_expsyms=$lt_include_expsyms
+@@ -14759,6 +15461,9 @@ include_expsyms=$lt_include_expsyms
  # Commands necessary for linking programs (against libraries) with templates.
  prelink_cmds=$lt_prelink_cmds
  
@@ -18969,7 +18987,7 @@
  # Specify filename containing input files.
  file_list_spec=$lt_file_list_spec
  
-@@ -14777,210 +15482,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+@@ -14791,210 +15496,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
    # if finds mixed CR/LF and LF-only lines.  Since sed operates in
    # text mode, it properly converts lines to CR/LF.  This bash problem
    # is reportedly fixed, but why not run on old versions too?
@@ -19344,7 +19362,7 @@
    chmod +x "$ofile"
  
 diff --git a/opcodes/configure.ac b/opcodes/configure.ac
-index b93e855..43ba976 100644
+index 07e3162..c0c75d4 100644
 --- a/opcodes/configure.ac
 +++ b/opcodes/configure.ac
 @@ -167,7 +167,7 @@ changequote(,)dnl
@@ -19356,6 +19374,1922 @@
    fi
  
    case "${host}" in
+diff --git a/zlib/configure b/zlib/configure
+index 8378857..7584940 100755
+--- a/zlib/configure
++++ b/zlib/configure
+@@ -614,8 +614,11 @@ OTOOL
+ LIPO
+ NMEDIT
+ DSYMUTIL
++MANIFEST_TOOL
+ RANLIB
++ac_ct_AR
+ AR
++DLLTOOL
+ OBJDUMP
+ LN_S
+ NM
+@@ -736,6 +739,7 @@ enable_static
+ with_pic
+ enable_fast_install
+ with_gnu_ld
++with_libtool_sysroot
+ enable_libtool_lock
+ enable_host_shared
+ '
+@@ -1384,6 +1388,8 @@ Optional Packages:
+   --with-pic              try to use only PIC/non-PIC objects [default=use
+                           both]
+   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
++  --with-libtool-sysroot=DIR Search for dependent libraries within DIR
++                        (or the compiler's sysroot if not specified).
+ 
+ Some influential environment variables:
+   CC          C compiler command
+@@ -3907,8 +3913,8 @@ esac
+ 
+ 
+ 
+-macro_version='2.2.7a'
+-macro_revision='1.3134'
++macro_version='2.4'
++macro_revision='1.3293'
+ 
+ 
+ 
+@@ -3948,7 +3954,7 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
+ $as_echo_n "checking how to print strings... " >&6; }
+ # Test print first, because it will be a builtin if present.
+-if test "X`print -r -- -n 2>/dev/null`" = X-n && \
++if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+    test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+   ECHO='print -r --'
+ elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+@@ -4764,8 +4770,8 @@ $as_echo_n "checking whether the shell understands some XSI constructs... " >&6;
+ # Try some XSI features
+ xsi_shell=no
+ ( _lt_dummy="a/b/c"
+-  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+-      = c,a/b,, \
++  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
++      = c,a/b,b/c, \
+     && eval 'test $(( 1 + 1 )) -eq 2 \
+     && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+   && xsi_shell=yes
+@@ -4814,6 +4820,80 @@ esac
+ 
+ 
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5
++$as_echo_n "checking how to convert $build file names to $host format... " >&6; }
++if test "${lt_cv_to_host_file_cmd+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  case $host in
++  *-*-mingw* )
++    case $build in
++      *-*-mingw* ) # actually msys
++        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
++        ;;
++      *-*-cygwin* )
++        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
++        ;;
++      * ) # otherwise, assume *nix
++        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
++        ;;
++    esac
++    ;;
++  *-*-cygwin* )
++    case $build in
++      *-*-mingw* ) # actually msys
++        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
++        ;;
++      *-*-cygwin* )
++        lt_cv_to_host_file_cmd=func_convert_file_noop
++        ;;
++      * ) # otherwise, assume *nix
++        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
++        ;;
++    esac
++    ;;
++  * ) # unhandled hosts (and "normal" native builds)
++    lt_cv_to_host_file_cmd=func_convert_file_noop
++    ;;
++esac
++
++fi
++
++to_host_file_cmd=$lt_cv_to_host_file_cmd
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
++$as_echo "$lt_cv_to_host_file_cmd" >&6; }
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
++$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; }
++if test "${lt_cv_to_tool_file_cmd+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  #assume ordinary cross tools, or native build.
++lt_cv_to_tool_file_cmd=func_convert_file_noop
++case $host in
++  *-*-mingw* )
++    case $build in
++      *-*-mingw* ) # actually msys
++        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
++        ;;
++    esac
++    ;;
++esac
++
++fi
++
++to_tool_file_cmd=$lt_cv_to_tool_file_cmd
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
++$as_echo "$lt_cv_to_tool_file_cmd" >&6; }
++
++
++
++
++
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+ $as_echo_n "checking for $LD option to reload object files... " >&6; }
+ if test "${lt_cv_ld_reload_flag+set}" = set; then :
+@@ -4830,6 +4910,11 @@ case $reload_flag in
+ esac
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ case $host_os in
++  cygwin* | mingw* | pw32* | cegcc*)
++    if test "$GCC" != yes; then
++      reload_cmds=false
++    fi
++    ;;
+   darwin*)
+     if test "$GCC" = yes; then
+       reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+@@ -4998,7 +5083,8 @@ mingw* | pw32*)
+     lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+     lt_cv_file_magic_cmd='func_win32_libid'
+   else
+-    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
++    # Keep this pattern in sync with the one in func_win32_libid.
++    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+     lt_cv_file_magic_cmd='$OBJDUMP -f'
+   fi
+   ;;
+@@ -5152,6 +5238,21 @@ esac
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+ $as_echo "$lt_cv_deplibs_check_method" >&6; }
++
++file_magic_glob=
++want_nocaseglob=no
++if test "$build" = "$host"; then
++  case $host_os in
++  mingw* | pw32*)
++    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
++      want_nocaseglob=yes
++    else
++      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
++    fi
++    ;;
++  esac
++fi
++
+ file_magic_cmd=$lt_cv_file_magic_cmd
+ deplibs_check_method=$lt_cv_deplibs_check_method
+ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+@@ -5167,9 +5268,163 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
+ 
+ 
+ 
++
++
++
++
++
++
++
++
++
++
+ if test -n "$ac_tool_prefix"; then
+-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+-set dummy ${ac_tool_prefix}ar; ac_word=$2
++  # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
++set dummy ${ac_tool_prefix}dlltool; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$DLLTOOL"; then
++  ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++DLLTOOL=$ac_cv_prog_DLLTOOL
++if test -n "$DLLTOOL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
++$as_echo "$DLLTOOL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_DLLTOOL"; then
++  ac_ct_DLLTOOL=$DLLTOOL
++  # Extract the first word of "dlltool", so it can be a program name with args.
++set dummy dlltool; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_DLLTOOL"; then
++  ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
++if test -n "$ac_ct_DLLTOOL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
++$as_echo "$ac_ct_DLLTOOL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_DLLTOOL" = x; then
++    DLLTOOL="false"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    DLLTOOL=$ac_ct_DLLTOOL
++  fi
++else
++  DLLTOOL="$ac_cv_prog_DLLTOOL"
++fi
++
++test -z "$DLLTOOL" && DLLTOOL=dlltool
++
++
++
++
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
++$as_echo_n "checking how to associate runtime and link libraries... " >&6; }
++if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_sharedlib_from_linklib_cmd='unknown'
++
++case $host_os in
++cygwin* | mingw* | pw32* | cegcc*)
++  # two different shell functions defined in ltmain.sh
++  # decide which to use based on capabilities of $DLLTOOL
++  case `$DLLTOOL --help 2>&1` in
++  *--identify-strict*)
++    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
++    ;;
++  *)
++    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
++    ;;
++  esac
++  ;;
++*)
++  # fallback: assume linklib IS sharedlib
++  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
++  ;;
++esac
++
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
++$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
++sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
++test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
++
++
++
++
++
++
++
++
++if test -n "$ac_tool_prefix"; then
++  for ac_prog in ar
++  do
++    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
++set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+ if test "${ac_cv_prog_AR+set}" = set; then :
+@@ -5185,7 +5440,7 @@ do
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_prog_AR="${ac_tool_prefix}ar"
++    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+@@ -5205,11 +5460,15 @@ $as_echo "no" >&6; }
+ fi
+ 
+ 
++    test -n "$AR" && break
++  done
+ fi
+-if test -z "$ac_cv_prog_AR"; then
++if test -z "$AR"; then
+   ac_ct_AR=$AR
+-  # Extract the first word of "ar", so it can be a program name with args.
+-set dummy ar; ac_word=$2
++  for ac_prog in ar
++do
++  # Extract the first word of "$ac_prog", so it can be a program name with args.
++set dummy $ac_prog; ac_word=$2
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+ $as_echo_n "checking for $ac_word... " >&6; }
+ if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+@@ -5225,7 +5484,7 @@ do
+   test -z "$as_dir" && as_dir=.
+     for ac_exec_ext in '' $ac_executable_extensions; do
+   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_prog_ac_ct_AR="ar"
++    ac_cv_prog_ac_ct_AR="$ac_prog"
+     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+     break 2
+   fi
+@@ -5244,6 +5503,10 @@ else
+ $as_echo "no" >&6; }
+ fi
+ 
++
++  test -n "$ac_ct_AR" && break
++done
++
+   if test "x$ac_ct_AR" = x; then
+     AR="false"
+   else
+@@ -5255,16 +5518,72 @@ ac_tool_warned=yes ;;
+ esac
+     AR=$ac_ct_AR
+   fi
+-else
+-  AR="$ac_cv_prog_AR"
+ fi
+ 
+-test -z "$AR" && AR=ar
+-test -z "$AR_FLAGS" && AR_FLAGS=cru
++: ${AR=ar}
++: ${AR_FLAGS=cru}
++
++
++
++
++
++
++
++
++
++
++
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
++$as_echo_n "checking for archiver @FILE support... " >&6; }
++if test "${lt_cv_ar_at_file+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_ar_at_file=no
++   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++int
++main ()
++{
+ 
++  ;
++  return 0;
++}
++_ACEOF
++if ac_fn_c_try_compile "$LINENO"; then :
++  echo conftest.$ac_objext > conftest.lst
++      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
++      { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
++  (eval $lt_ar_try) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++      if test "$ac_status" -eq 0; then
++	# Ensure the archiver fails upon bogus file names.
++	rm -f conftest.$ac_objext libconftest.a
++	{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
++  (eval $lt_ar_try) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }
++	if test "$ac_status" -ne 0; then
++          lt_cv_ar_at_file=@
++        fi
++      fi
++      rm -f conftest.* libconftest.a
+ 
++fi
++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ 
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
++$as_echo "$lt_cv_ar_at_file" >&6; }
+ 
++if test "x$lt_cv_ar_at_file" = xno; then
++  archiver_list_spec=
++else
++  archiver_list_spec=$lt_cv_ar_at_file
++fi
+ 
+ 
+ 
+@@ -5606,8 +5925,8 @@ esac
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ 
+ # Transform an extracted symbol line into symbol name and symbol address
+-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
+-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
++lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (void *) \&\2},/p'"
++lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+ 
+ # Handle CRLF in mingw tool chain
+ opt_cr=
+@@ -5643,6 +5962,7 @@ for ac_symprfx in "" "_"; do
+   else
+     lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[	 ]\($symcode$symcode*\)[	 ][	 ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+   fi
++  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+ 
+   # Check to see that the pipe works correctly.
+   pipe_works=no
+@@ -5684,6 +6004,18 @@ _LT_EOF
+       if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ 	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ 	  cat <<_LT_EOF > conftest.$ac_ext
++/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
++#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
++/* DATA imports from DLLs on WIN32 con't be const, because runtime
++   relocations are performed -- see ld's documentation on pseudo-relocs.  */
++# define LT_DLSYM_CONST
++#elif defined(__osf__)
++/* This system does not cope well with relocations in const data.  */
++# define LT_DLSYM_CONST
++#else
++# define LT_DLSYM_CONST const
++#endif
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+@@ -5695,7 +6027,7 @@ _LT_EOF
+ 	  cat <<_LT_EOF >> conftest.$ac_ext
+ 
+ /* The mapping between symbol names and symbols.  */
+-const struct {
++LT_DLSYM_CONST struct {
+   const char *name;
+   void       *address;
+ }
+@@ -5721,8 +6053,8 @@ static const void *lt_preloaded_setup() {
+ _LT_EOF
+ 	  # Now try linking the two files.
+ 	  mv conftest.$ac_objext conftstm.$ac_objext
+-	  lt_save_LIBS="$LIBS"
+-	  lt_save_CFLAGS="$CFLAGS"
++	  lt_globsym_save_LIBS=$LIBS
++	  lt_globsym_save_CFLAGS=$CFLAGS
+ 	  LIBS="conftstm.$ac_objext"
+ 	  CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ 	  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+@@ -5732,8 +6064,8 @@ _LT_EOF
+   test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ 	    pipe_works=yes
+ 	  fi
+-	  LIBS="$lt_save_LIBS"
+-	  CFLAGS="$lt_save_CFLAGS"
++	  LIBS=$lt_globsym_save_LIBS
++	  CFLAGS=$lt_globsym_save_CFLAGS
+ 	else
+ 	  echo "cannot find nm_test_func in $nlist" >&5
+ 	fi
+@@ -5770,6 +6102,19 @@ else
+ $as_echo "ok" >&6; }
+ fi
+ 
++# Response file support.
++if test "$lt_cv_nm_interface" = "MS dumpbin"; then
++  nm_file_list_spec='@'
++elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
++  nm_file_list_spec='@'
++fi
++
++
++
++
++
++
++
+ 
+ 
+ 
+@@ -5790,6 +6135,41 @@ fi
+ 
+ 
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
++$as_echo_n "checking for sysroot... " >&6; }
++
++# Check whether --with-libtool-sysroot was given.
++if test "${with_libtool_sysroot+set}" = set; then :
++  withval=$with_libtool_sysroot;
++else
++  with_libtool_sysroot=no
++fi
++
++
++lt_sysroot=
++case ${with_libtool_sysroot} in #(
++ yes)
++   if test "$GCC" = yes; then
++     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
++   fi
++   ;; #(
++ /*)
++   lt_sysroot=`echo "$with_libtool_sysroot" | sed -e "$sed_quote_subst"`
++   ;; #(
++ no|'')
++   ;; #(
++ *)
++   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libtool_sysroot}" >&5
++$as_echo "${with_libtool_sysroot}" >&6; }
++   as_fn_error "The sysroot must be an absolute path." "$LINENO" 5
++   ;;
++esac
++
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
++$as_echo "${lt_sysroot:-no}" >&6; }
++
++
++
+ 
+ 
+ # Check whether --enable-libtool-lock was given.
+@@ -6001,6 +6381,123 @@ esac
+ 
+ need_locks="$enable_libtool_lock"
+ 
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
++set dummy ${ac_tool_prefix}mt; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$MANIFEST_TOOL"; then
++  ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
++if test -n "$MANIFEST_TOOL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
++$as_echo "$MANIFEST_TOOL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
++  ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
++  # Extract the first word of "mt", so it can be a program name with args.
++set dummy mt; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_MANIFEST_TOOL"; then
++  ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
++if test -n "$ac_ct_MANIFEST_TOOL"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
++$as_echo "$ac_ct_MANIFEST_TOOL" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_MANIFEST_TOOL" = x; then
++    MANIFEST_TOOL=":"
++  else
++    case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
++ac_tool_warned=yes ;;
++esac
++    MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
++  fi
++else
++  MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
++fi
++
++test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
++$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
++if test "${lt_cv_path_mainfest_tool+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_path_mainfest_tool=no
++  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
++  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
++  cat conftest.err >&5
++  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
++    lt_cv_path_mainfest_tool=yes
++  fi
++  rm -f conftest*
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
++$as_echo "$lt_cv_path_mainfest_tool" >&6; }
++if test "x$lt_cv_path_mainfest_tool" != xyes; then
++  MANIFEST_TOOL=:
++fi
++
++
++
++
++
+ 
+   case $host_os in
+     rhapsody* | darwin*)
+@@ -6567,6 +7064,8 @@ _LT_EOF
+       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
+       echo "$AR cru libconftest.a conftest.o" >&5
+       $AR cru libconftest.a conftest.o 2>&5
++      echo "$RANLIB libconftest.a" >&5
++      $RANLIB libconftest.a 2>&5
+       cat > conftest.c << _LT_EOF
+ int main() { return 0;}
+ _LT_EOF
+@@ -7030,7 +7529,8 @@ fi
+ LIBTOOL_DEPS="$ltmain"
+ 
+ # Always use our own libtool.
+-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
++LIBTOOL='$(SHELL) $(top_builddir)'
++LIBTOOL="$LIBTOOL/${host_alias}-libtool"
+ 
+ 
+ 
+@@ -7119,7 +7619,7 @@ aix3*)
+ esac
+ 
+ # Global variables:
+-ofile=libtool
++ofile=${host_alias}-libtool
+ can_build_shared=yes
+ 
+ # All known linkers require a `.a' archive for static linking (except MSVC,
+@@ -7417,8 +7917,6 @@ fi
+ lt_prog_compiler_pic=
+ lt_prog_compiler_static=
+ 
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+ 
+   if test "$GCC" = yes; then
+     lt_prog_compiler_wl='-Wl,'
+@@ -7584,6 +8082,12 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+ 	lt_prog_compiler_pic='--shared'
+ 	lt_prog_compiler_static='--static'
+ 	;;
++      nagfor*)
++	# NAG Fortran compiler
++	lt_prog_compiler_wl='-Wl,-Wl,,'
++	lt_prog_compiler_pic='-PIC'
++	lt_prog_compiler_static='-Bstatic'
++	;;
+       pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+         # Portland Group compilers (*not* the Pentium gcc compiler,
+ 	# which looks to be a dead project)
+@@ -7646,7 +8150,7 @@ $as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+       lt_prog_compiler_pic='-KPIC'
+       lt_prog_compiler_static='-Bstatic'
+       case $cc_basename in
+-      f77* | f90* | f95*)
++      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+ 	lt_prog_compiler_wl='-Qoption ld ';;
+       *)
+ 	lt_prog_compiler_wl='-Wl,';;
+@@ -7703,13 +8207,17 @@ case $host_os in
+     lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+     ;;
+ esac
+-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+-$as_echo "$lt_prog_compiler_pic" >&6; }
+-
+-
+-
+-
+ 
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
++$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
++if test "${lt_cv_prog_compiler_pic+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
++$as_echo "$lt_cv_prog_compiler_pic" >&6; }
++lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
+ 
+ #
+ # Check to make sure the PIC flag actually works.
+@@ -7770,6 +8278,11 @@ fi
+ 
+ 
+ 
++
++
++
++
++
+ #
+ # Check to make sure the static flag actually works.
+ #
+@@ -8120,7 +8633,8 @@ _LT_EOF
+       allow_undefined_flag=unsupported
+       always_export_symbols=no
+       enable_shared_with_static_runtimes=yes
+-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
++      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
++      exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
+ 
+       if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+         archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+@@ -8219,12 +8733,12 @@ _LT_EOF
+ 	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ 	  hardcode_libdir_flag_spec=
+ 	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
+-	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
++	  archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+ 	  if test "x$supports_anon_versioning" = xyes; then
+ 	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ 	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ 	      echo "local: *; };" >> $output_objdir/$libname.ver~
+-	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
++	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ 	  fi
+ 	  ;;
+ 	esac
+@@ -8238,8 +8752,8 @@ _LT_EOF
+ 	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ 	wlarc=
+       else
+-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       fi
+       ;;
+ 
+@@ -8257,8 +8771,8 @@ _LT_EOF
+ 
+ _LT_EOF
+       elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       else
+ 	ld_shlibs=no
+       fi
+@@ -8304,8 +8818,8 @@ _LT_EOF
+ 
+     *)
+       if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
++	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
++	archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+       else
+ 	ld_shlibs=no
+       fi
+@@ -8435,7 +8949,13 @@ _LT_EOF
+ 	allow_undefined_flag='-berok'
+         # Determine the default libpath from the value encoded in an
+         # empty executable.
+-        if test x$gcc_no_link = xyes; then
++        if test "${lt_cv_aix_libpath+set}" = set; then
++  aix_libpath=$lt_cv_aix_libpath
++else
++  if test "${lt_cv_aix_libpath_+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test x$gcc_no_link = xyes; then
+   as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -8451,22 +8971,29 @@ main ()
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ 
+-lt_aix_libpath_sed='
+-    /Import File Strings/,/^$/ {
+-	/^0/ {
+-	    s/^0  *\(.*\)$/\1/
+-	    p
+-	}
+-    }'
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-# Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then
+-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-fi
++  lt_aix_libpath_sed='
++      /Import File Strings/,/^$/ {
++	  /^0/ {
++	      s/^0  *\([^ ]*\) *$/\1/
++	      p
++	  }
++      }'
++  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++  # Check for a 64-bit object if we didn't find anything.
++  if test -z "$lt_cv_aix_libpath_"; then
++    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++  fi
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
++  if test -z "$lt_cv_aix_libpath_"; then
++    lt_cv_aix_libpath_="/usr/lib:/lib"
++  fi
++
++fi
++
++  aix_libpath=$lt_cv_aix_libpath_
++fi
+ 
+         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+         archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+@@ -8478,7 +9005,13 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ 	else
+ 	 # Determine the default libpath from the value encoded in an
+ 	 # empty executable.
+-	 if test x$gcc_no_link = xyes; then
++	 if test "${lt_cv_aix_libpath+set}" = set; then
++  aix_libpath=$lt_cv_aix_libpath
++else
++  if test "${lt_cv_aix_libpath_+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test x$gcc_no_link = xyes; then
+   as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+@@ -8494,22 +9027,29 @@ main ()
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+ 
+-lt_aix_libpath_sed='
+-    /Import File Strings/,/^$/ {
+-	/^0/ {
+-	    s/^0  *\(.*\)$/\1/
+-	    p
+-	}
+-    }'
+-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-# Check for a 64-bit object if we didn't find anything.
+-if test -z "$aix_libpath"; then
+-  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+-fi
++  lt_aix_libpath_sed='
++      /Import File Strings/,/^$/ {
++	  /^0/ {
++	      s/^0  *\([^ ]*\) *$/\1/
++	      p
++	  }
++      }'
++  lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++  # Check for a 64-bit object if we didn't find anything.
++  if test -z "$lt_cv_aix_libpath_"; then
++    lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
++  fi
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
++  if test -z "$lt_cv_aix_libpath_"; then
++    lt_cv_aix_libpath_="/usr/lib:/lib"
++  fi
++
++fi
++
++  aix_libpath=$lt_cv_aix_libpath_
++fi
+ 
+ 	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ 	  # Warning - without using the other run time loading flags,
+@@ -8554,20 +9094,63 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+       # Microsoft Visual C++.
+       # hardcode_libdir_flag_spec is actually meaningless, as there is
+       # no search path for DLLs.
+-      hardcode_libdir_flag_spec=' '
+-      allow_undefined_flag=unsupported
+-      # Tell ltmain to make .lib files, not .a files.
+-      libext=lib
+-      # Tell ltmain to make .dll files, not .so files.
+-      shrext_cmds=".dll"
+-      # FIXME: Setting linknames here is a bad hack.
+-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+-      # The linker will automatically build a .lib file if we build a DLL.
+-      old_archive_from_new_cmds='true'
+-      # FIXME: Should let the user specify the lib program.
+-      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+-      fix_srcfile_path='`cygpath -w "$srcfile"`'
+-      enable_shared_with_static_runtimes=yes
++      case $cc_basename in
++      cl*)
++	# Native MSVC
++	hardcode_libdir_flag_spec=' '
++	allow_undefined_flag=unsupported
++	always_export_symbols=yes
++	file_list_spec='@'
++	# Tell ltmain to make .lib files, not .a files.
++	libext=lib
++	# Tell ltmain to make .dll files, not .so files.
++	shrext_cmds=".dll"
++	# FIXME: Setting linknames here is a bad hack.
++	archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
++	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
++	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
++	  else
++	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
++	  fi~
++	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
++	  linknames='
++	# The linker will not automatically build a static lib if we build a DLL.
++	# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
++	enable_shared_with_static_runtimes=yes
++	export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
++	# Don't use ranlib
++	old_postinstall_cmds='chmod 644 $oldlib'
++	postlink_cmds='lt_outputfile="@OUTPUT@"~
++	  lt_tool_outputfile="@TOOL_OUTPUT@"~
++	  case $lt_outputfile in
++	    *.exe|*.EXE) ;;
++	    *)
++	      lt_outputfile="$lt_outputfile.exe"
++	      lt_tool_outputfile="$lt_tool_outputfile.exe"
++	      ;;
++	  esac~
++	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
++	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
++	    $RM "$lt_outputfile.manifest";
++	  fi'
++	;;
++      *)
++	# Assume MSVC wrapper
++	hardcode_libdir_flag_spec=' '
++	allow_undefined_flag=unsupported
++	# Tell ltmain to make .lib files, not .a files.
++	libext=lib
++	# Tell ltmain to make .dll files, not .so files.
++	shrext_cmds=".dll"
++	# FIXME: Setting linknames here is a bad hack.
++	archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
++	# The linker will automatically build a .lib file if we build a DLL.
++	old_archive_from_new_cmds='true'
++	# FIXME: Should let the user specify the lib program.
++	old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
++	enable_shared_with_static_runtimes=yes
++	;;
++      esac
+       ;;
+ 
+     darwin* | rhapsody*)
+@@ -8628,7 +9211,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ 
+     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+     freebsd* | dragonfly*)
+-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
++      archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+       hardcode_libdir_flag_spec='-R$libdir'
+       hardcode_direct=yes
+       hardcode_shlibpath_var=no
+@@ -8636,7 +9219,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ 
+     hpux9*)
+       if test "$GCC" = yes; then
+-	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
++	archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       else
+ 	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+       fi
+@@ -8652,7 +9235,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ 
+     hpux10*)
+       if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+-	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++	archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+       else
+ 	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+       fi
+@@ -8676,10 +9259,10 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+ 	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	ia64*)
+-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
++	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	*)
+-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
++	  archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ 	  ;;
+ 	esac
+       else
+@@ -8758,26 +9341,39 @@ fi
+ 
+     irix5* | irix6* | nonstopux*)
+       if test "$GCC" = yes; then
+-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++	archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ 	# Try to use the -exported_symbol ld option, if it does not
+ 	# work, assume that -exports_file does not work either and
+ 	# implicitly export all symbols.
+-        save_LDFLAGS="$LDFLAGS"
+-        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+-        if test x$gcc_no_link = xyes; then
++	# This should be the same for all languages, so no per-tag cache variable.
++	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5
++$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; }
++if test "${lt_cv_irix_exported_symbol+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  save_LDFLAGS="$LDFLAGS"
++	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
++	   if test x$gcc_no_link = xyes; then
+   as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
+ fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-int foo(void) {}
++int foo (void) { return 0; }
+ _ACEOF
+ if ac_fn_c_try_link "$LINENO"; then :
+-  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+-
++  lt_cv_irix_exported_symbol=yes
++else
++  lt_cv_irix_exported_symbol=no
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
+-        LDFLAGS="$save_LDFLAGS"
++           LDFLAGS="$save_LDFLAGS"
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
++$as_echo "$lt_cv_irix_exported_symbol" >&6; }
++	if test "$lt_cv_irix_exported_symbol" = yes; then
++          archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
++	fi
+       else
+ 	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ 	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+@@ -8862,7 +9458,7 @@ rm -f core conftest.err conftest.$ac_objext \
+     osf4* | osf5*)	# as osf3* with the addition of -msym flag
+       if test "$GCC" = yes; then
+ 	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
++	archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ 	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+       else
+ 	allow_undefined_flag=' -expect_unresolved \*'
+@@ -8881,9 +9477,9 @@ rm -f core conftest.err conftest.$ac_objext \
+       no_undefined_flag=' -z defs'
+       if test "$GCC" = yes; then
+ 	wlarc='${wl}'
+-	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
++	archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ 	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+-	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
++	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+       else
+ 	case `$CC -V 2>&1` in
+ 	*"Compilers 5.0"*)
+@@ -9459,8 +10055,9 @@ cygwin* | mingw* | pw32* | cegcc*)
+   need_version=no
+   need_lib_prefix=no
+ 
+-  case $GCC,$host_os in
+-  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
++  case $GCC,$cc_basename in
++  yes,*)
++    # gcc
+     library_names_spec='$libname.dll.a'
+     # DLL is installed to $(libdir)/../bin by postinstall_cmds
+     postinstall_cmds='base_file=`basename \${file}`~
+@@ -9493,13 +10090,71 @@ cygwin* | mingw* | pw32* | cegcc*)
+       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+       ;;
+     esac
++    dynamic_linker='Win32 ld.exe'
++    ;;
++
++  *,cl*)
++    # Native MSVC
++    libname_spec='$name'
++    soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
++    library_names_spec='${libname}.dll.lib'
++
++    case $build_os in
++    mingw*)
++      sys_lib_search_path_spec=
++      lt_save_ifs=$IFS
++      IFS=';'
++      for lt_path in $LIB
++      do
++        IFS=$lt_save_ifs
++        # Let DOS variable expansion print the short 8.3 style file name.
++        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
++        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
++      done
++      IFS=$lt_save_ifs
++      # Convert to MSYS style.
++      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
++      ;;
++    cygwin*)
++      # Convert to unix form, then to dos form, then back to unix form
++      # but this time dos style (no spaces!) so that the unix form looks
++      # like /cygdrive/c/PROGRA~1:/cygdr...
++      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
++      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
++      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
++      ;;
++    *)
++      sys_lib_search_path_spec="$LIB"
++      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
++        # It is most probably a Windows format PATH.
++        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
++      else
++        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
++      fi
++      # FIXME: find the short name or the path components, as spaces are
++      # common. (e.g. "Program Files" -> "PROGRA~1")
++      ;;
++    esac
++
++    # DLL is installed to $(libdir)/../bin by postinstall_cmds
++    postinstall_cmds='base_file=`basename \${file}`~
++      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
++      dldir=$destdir/`dirname \$dlpath`~
++      test -d \$dldir || mkdir -p \$dldir~
++      $install_prog $dir/$dlname \$dldir/$dlname'
++    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
++      dlpath=$dir/\$dldll~
++       $RM \$dlpath'
++    shlibpath_overrides_runpath=yes
++    dynamic_linker='Win32 link.exe'
+     ;;
+ 
+   *)
++    # Assume MSVC wrapper
+     library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
++    dynamic_linker='Win32 ld.exe'
+     ;;
+   esac
+-  dynamic_linker='Win32 ld.exe'
+   # FIXME: first we should search . and the directory the executable is in
+   shlibpath_var=PATH
+   ;;
+@@ -9591,7 +10246,7 @@ haiku*)
+   soname_spec='${libname}${release}${shared_ext}$major'
+   shlibpath_var=LIBRARY_PATH
+   shlibpath_overrides_runpath=yes
+-  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib'
++  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+   hardcode_into_libs=yes
+   ;;
+ 
+@@ -10405,7 +11060,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 10408 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -10449,10 +11104,10 @@ else
+ /* When -fvisbility=hidden is used, assume the code has been annotated
+    correspondingly for the symbols needed.  */
+ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+-void fnord () __attribute__((visibility("default")));
++int fnord () __attribute__((visibility("default")));
+ #endif
+ 
+-void fnord () { int i=42; }
++int fnord () { return 42; }
+ int main ()
+ {
+   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+@@ -10511,7 +11166,7 @@ else
+   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+   lt_status=$lt_dlunknown
+   cat > conftest.$ac_ext <<_LT_EOF
+-#line 10514 "configure"
++#line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ #if HAVE_DLFCN_H
+@@ -10555,10 +11210,10 @@ else
+ /* When -fvisbility=hidden is used, assume the code has been annotated
+    correspondingly for the symbols needed.  */
+ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+-void fnord () __attribute__((visibility("default")));
++int fnord () __attribute__((visibility("default")));
+ #endif
+ 
+-void fnord () { int i=42; }
++int fnord () { return 42; }
+ int main ()
+ {
+   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+@@ -11990,13 +12645,20 @@ exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
+ lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
+ lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
+ lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
++lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
++lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
+ reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
+ reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
+ OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
+ deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
+ file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
++file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
++want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
++DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
++sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
+ AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
+ AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
++archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
+ STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
+ RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
+ old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
+@@ -12011,14 +12673,17 @@ lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$de
+ lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+ lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
+ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
++nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
++lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+ objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
+ MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
+ lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
+-lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+ lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
++lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
+ lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
+ lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
+ need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
++MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
+ DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
+ NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
+ LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
+@@ -12051,12 +12716,12 @@ hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_q
+ hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
+ inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
+ link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
+-fix_srcfile_path='`$ECHO "$fix_srcfile_path" | $SED "$delay_single_quote_subst"`'
+ always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
+ export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
+ exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
+ include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
+ prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
++postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
+ file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
+ variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
+ need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
+@@ -12111,8 +12776,13 @@ reload_flag \
+ OBJDUMP \
+ deplibs_check_method \
+ file_magic_cmd \
++file_magic_glob \
++want_nocaseglob \
++DLLTOOL \
++sharedlib_from_linklib_cmd \
+ AR \
+ AR_FLAGS \
++archiver_list_spec \
+ STRIP \
+ RANLIB \
+ CC \
+@@ -12122,12 +12792,14 @@ lt_cv_sys_global_symbol_pipe \
+ lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
+ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
++nm_file_list_spec \
+ lt_prog_compiler_no_builtin_flag \
+-lt_prog_compiler_wl \
+ lt_prog_compiler_pic \
++lt_prog_compiler_wl \
+ lt_prog_compiler_static \
+ lt_cv_prog_compiler_c_o \
+ need_locks \
++MANIFEST_TOOL \
+ DSYMUTIL \
+ NMEDIT \
+ LIPO \
+@@ -12143,7 +12815,6 @@ no_undefined_flag \
+ hardcode_libdir_flag_spec \
+ hardcode_libdir_flag_spec_ld \
+ hardcode_libdir_separator \
+-fix_srcfile_path \
+ exclude_expsyms \
+ include_expsyms \
+ file_list_spec \
+@@ -12179,6 +12850,7 @@ module_cmds \
+ module_expsym_cmds \
+ export_symbols_cmds \
+ prelink_cmds \
++postlink_cmds \
+ postinstall_cmds \
+ postuninstall_cmds \
+ finish_cmds \
+@@ -12768,7 +13440,8 @@ $as_echo X"$file" |
+ # NOTE: Changes made to this file will be lost: look at ltmain.sh.
+ #
+ #   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+-#                 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
++#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
++#                 Inc.
+ #   Written by Gordon Matzigkeit, 1996
+ #
+ #   This file is part of GNU Libtool.
+@@ -12871,19 +13544,42 @@ SP2NL=$lt_lt_SP2NL
+ # turn newlines into spaces.
+ NL2SP=$lt_lt_NL2SP
+ 
++# convert \$build file names to \$host format.
++to_host_file_cmd=$lt_cv_to_host_file_cmd
++
++# convert \$build files to toolchain format.
++to_tool_file_cmd=$lt_cv_to_tool_file_cmd
++
+ # An object symbol dumper.
+ OBJDUMP=$lt_OBJDUMP
+ 
+ # Method to check whether dependent libraries are shared objects.
+ deplibs_check_method=$lt_deplibs_check_method
+ 
+-# Command to use when deplibs_check_method == "file_magic".
++# Command to use when deplibs_check_method = "file_magic".
+ file_magic_cmd=$lt_file_magic_cmd
+ 
++# How to find potential files when deplibs_check_method = "file_magic".
++file_magic_glob=$lt_file_magic_glob
++
++# Find potential files using nocaseglob when deplibs_check_method = "file_magic".
++want_nocaseglob=$lt_want_nocaseglob
++
++# DLL creation program.
++DLLTOOL=$lt_DLLTOOL
++
++# Command to associate shared and link libraries.
++sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
++
+ # The archiver.
+ AR=$lt_AR
++
++# Flags to create an archive.
+ AR_FLAGS=$lt_AR_FLAGS
+ 
++# How to feed a file listing to the archiver.
++archiver_list_spec=$lt_archiver_list_spec
++
+ # A symbol stripping program.
+ STRIP=$lt_STRIP
+ 
+@@ -12913,6 +13609,12 @@ global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+ # Transform the output of nm in a C name address pair when lib prefix is needed.
+ global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+ 
++# Specify filename containing input files for \$NM.
++nm_file_list_spec=$lt_nm_file_list_spec
++
++# The root where to search for dependent libraries,and in which our libraries should be installed.
++lt_sysroot=$lt_sysroot
++
+ # The name of the directory that contains temporary libtool files.
+ objdir=$objdir
+ 
+@@ -12922,6 +13624,9 @@ MAGIC_CMD=$MAGIC_CMD
+ # Must we lock files when doing compilation?
+ need_locks=$lt_need_locks
+ 
++# Manifest tool.
++MANIFEST_TOOL=$lt_MANIFEST_TOOL
++
+ # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+ DSYMUTIL=$lt_DSYMUTIL
+ 
+@@ -13036,12 +13741,12 @@ with_gcc=$GCC
+ # Compiler flag to turn off builtin functions.
+ no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+ 
+-# How to pass a linker flag through the compiler.
+-wl=$lt_lt_prog_compiler_wl
+-
+ # Additional compiler flags for building library objects.
+ pic_flag=$lt_lt_prog_compiler_pic
+ 
++# How to pass a linker flag through the compiler.
++wl=$lt_lt_prog_compiler_wl
++
+ # Compiler flag to prevent dynamic linking.
+ link_static_flag=$lt_lt_prog_compiler_static
+ 
+@@ -13128,9 +13833,6 @@ inherit_rpath=$inherit_rpath
+ # Whether libtool must link a program against all its dependency libraries.
+ link_all_deplibs=$link_all_deplibs
+ 
+-# Fix the shell variable \$srcfile for the compiler.
+-fix_srcfile_path=$lt_fix_srcfile_path
+-
+ # Set to "yes" if exported symbols are required.
+ always_export_symbols=$always_export_symbols
+ 
+@@ -13146,6 +13848,9 @@ include_expsyms=$lt_include_expsyms
+ # Commands necessary for linking programs (against libraries) with templates.
+ prelink_cmds=$lt_prelink_cmds
+ 
++# Commands necessary for finishing linking programs.
++postlink_cmds=$lt_postlink_cmds
++
+ # Specify filename containing input files.
+ file_list_spec=$lt_file_list_spec
+ 
+@@ -13178,210 +13883,169 @@ ltmain="$ac_aux_dir/ltmain.sh"
+   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+   # text mode, it properly converts lines to CR/LF.  This bash problem
+   # is reportedly fixed, but why not run on old versions too?
+-  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+-    || (rm -f "$cfgfile"; exit 1)
+-
+-  case $xsi_shell in
+-  yes)
+-    cat << \_LT_EOF >> "$cfgfile"
+-
+-# func_dirname file append nondir_replacement
+-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+-# otherwise set result to NONDIR_REPLACEMENT.
+-func_dirname ()
+-{
+-  case ${1} in
+-    */*) func_dirname_result="${1%/*}${2}" ;;
+-    *  ) func_dirname_result="${3}" ;;
+-  esac
+-}
+-
+-# func_basename file
+-func_basename ()
+-{
+-  func_basename_result="${1##*/}"
+-}
+-
+-# func_dirname_and_basename file append nondir_replacement
+-# perform func_basename and func_dirname in a single function
+-# call:
+-#   dirname:  Compute the dirname of FILE.  If nonempty,
+-#             add APPEND to the result, otherwise set result
+-#             to NONDIR_REPLACEMENT.
+-#             value returned in "$func_dirname_result"
+-#   basename: Compute filename of FILE.
+-#             value retuned in "$func_basename_result"
+-# Implementation must be kept synchronized with func_dirname
+-# and func_basename. For efficiency, we do not delegate to
+-# those functions but instead duplicate the functionality here.
+-func_dirname_and_basename ()
+-{
+-  case ${1} in
+-    */*) func_dirname_result="${1%/*}${2}" ;;
+-    *  ) func_dirname_result="${3}" ;;
+-  esac
+-  func_basename_result="${1##*/}"
+-}
+-
+-# func_stripname prefix suffix name
+-# strip PREFIX and SUFFIX off of NAME.
+-# PREFIX and SUFFIX must not contain globbing or regex special
+-# characters, hashes, percent signs, but SUFFIX may contain a leading
+-# dot (in which case that matches only a dot).
+-func_stripname ()
+-{
+-  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+-  # positional parameters, so assign one to ordinary parameter first.
+-  func_stripname_result=${3}
+-  func_stripname_result=${func_stripname_result#"${1}"}
+-  func_stripname_result=${func_stripname_result%"${2}"}
+-}
+-
+-# func_opt_split
+-func_opt_split ()
+-{
+-  func_opt_split_opt=${1%%=*}
+-  func_opt_split_arg=${1#*=}
+-}
+-
+-# func_lo2o object
+-func_lo2o ()
+-{
+-  case ${1} in
+-    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+-    *)    func_lo2o_result=${1} ;;
+-  esac
+-}
+-
+-# func_xform libobj-or-source
+-func_xform ()
+-{
+-  func_xform_result=${1%.*}.lo
+-}
+-
+-# func_arith arithmetic-term...
+-func_arith ()
+-{
+-  func_arith_result=$(( $* ))
+-}
+-
+-# func_len string
+-# STRING may not start with a hyphen.
+-func_len ()
+-{
+-  func_len_result=${#1}
+-}
+-
+-_LT_EOF
+-    ;;
+-  *) # Bourne compatible functions.
+-    cat << \_LT_EOF >> "$cfgfile"
+-
+-# func_dirname file append nondir_replacement
+-# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+-# otherwise set result to NONDIR_REPLACEMENT.
+-func_dirname ()
+-{
+-  # Extract subdirectory from the argument.
+-  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+-  if test "X$func_dirname_result" = "X${1}"; then
+-    func_dirname_result="${3}"
+-  else
+-    func_dirname_result="$func_dirname_result${2}"
+-  fi
+-}
+-
+-# func_basename file
+-func_basename ()
+-{
+-  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+-}
+-
+-
+-# func_stripname prefix suffix name
+-# strip PREFIX and SUFFIX off of NAME.
+-# PREFIX and SUFFIX must not contain globbing or regex special
+-# characters, hashes, percent signs, but SUFFIX may contain a leading
+-# dot (in which case that matches only a dot).
+-# func_strip_suffix prefix name
+-func_stripname ()
+-{
+-  case ${2} in
+-    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+-    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+-  esac
+-}
+-
+-# sed scripts:
+-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+-my_sed_long_arg='1s/^-[^=]*=//'
+-
+-# func_opt_split
+-func_opt_split ()
+-{
+-  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
+-  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
+-}
+-
+-# func_lo2o object
+-func_lo2o ()
+-{
+-  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+-}
+-
+-# func_xform libobj-or-source
+-func_xform ()
+-{
+-  func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+-}
+-
+-# func_arith arithmetic-term...
+-func_arith ()
+-{
+-  func_arith_result=`expr "$@"`
+-}
+-
+-# func_len string
+-# STRING may not start with a hyphen.
+-func_len ()
+-{
+-  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+-}
+-
+-_LT_EOF
+-esac
+-
+-case $lt_shell_append in
+-  yes)
+-    cat << \_LT_EOF >> "$cfgfile"
+-
+-# func_append var value
+-# Append VALUE to the end of shell variable VAR.
+-func_append ()
+-{
+-  eval "$1+=\$2"
+-}
+-_LT_EOF
+-    ;;
+-  *)
+-    cat << \_LT_EOF >> "$cfgfile"
+-
+-# func_append var value
+-# Append VALUE to the end of shell variable VAR.
+-func_append ()
+-{
+-  eval "$1=\$$1\$2"
+-}
+-
+-_LT_EOF
+-    ;;
+-  esac
+-
+-
+-  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+-    || (rm -f "$cfgfile"; exit 1)
+-
+-  mv -f "$cfgfile" "$ofile" ||
++  sed '$q' "$ltmain" >> "$cfgfile" \
++     || (rm -f "$cfgfile"; exit 1)
++
++  if test x"$xsi_shell" = xyes; then
++  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
++func_dirname ()\
++{\
++\    case ${1} in\
++\      */*) func_dirname_result="${1%/*}${2}" ;;\
++\      *  ) func_dirname_result="${3}" ;;\
++\    esac\
++} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_basename ()$/,/^} # func_basename /c\
++func_basename ()\
++{\
++\    func_basename_result="${1##*/}"\
++} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
++func_dirname_and_basename ()\
++{\
++\    case ${1} in\
++\      */*) func_dirname_result="${1%/*}${2}" ;;\
++\      *  ) func_dirname_result="${3}" ;;\
++\    esac\
++\    func_basename_result="${1##*/}"\
++} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
++func_stripname ()\
++{\
++\    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
++\    # positional parameters, so assign one to ordinary parameter first.\
++\    func_stripname_result=${3}\
++\    func_stripname_result=${func_stripname_result#"${1}"}\
++\    func_stripname_result=${func_stripname_result%"${2}"}\
++} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
++func_split_long_opt ()\
++{\
++\    func_split_long_opt_name=${1%%=*}\
++\    func_split_long_opt_arg=${1#*=}\
++} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
++func_split_short_opt ()\
++{\
++\    func_split_short_opt_arg=${1#??}\
++\    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
++} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
++func_lo2o ()\
++{\
++\    case ${1} in\
++\      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
++\      *)    func_lo2o_result=${1} ;;\
++\    esac\
++} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_xform ()$/,/^} # func_xform /c\
++func_xform ()\
++{\
++    func_xform_result=${1%.*}.lo\
++} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_arith ()$/,/^} # func_arith /c\
++func_arith ()\
++{\
++    func_arith_result=$(( $* ))\
++} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_len ()$/,/^} # func_len /c\
++func_len ()\
++{\
++    func_len_result=${#1}\
++} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++fi
++
++if test x"$lt_shell_append" = xyes; then
++  sed -e '/^func_append ()$/,/^} # func_append /c\
++func_append ()\
++{\
++    eval "${1}+=\\${2}"\
++} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
++func_append_quoted ()\
++{\
++\    func_quote_for_eval "${2}"\
++\    eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
++} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
++  && mv -f "$cfgfile.tmp" "$cfgfile" \
++    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++test 0 -eq $? || _lt_function_replace_fail=:
++
++
++  # Save a `func_append' function call where possible by direct use of '+='
++  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
++    && mv -f "$cfgfile.tmp" "$cfgfile" \
++      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++  test 0 -eq $? || _lt_function_replace_fail=:
++else
++  # Save a `func_append' function call even when '+=' is not available
++  sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
++    && mv -f "$cfgfile.tmp" "$cfgfile" \
++      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
++  test 0 -eq $? || _lt_function_replace_fail=:
++fi
++
++if test x"$_lt_function_replace_fail" = x":"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
++$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
++fi
++
++
++   mv -f "$cfgfile" "$ofile" ||
+     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+   chmod +x "$ofile"
+ 
 -- 
-2.1.4
+2.7.1
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
index a037634..cb3f83b 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0007-Add-the-armv5e-architecture-to-binutils.patch
@@ -1,7 +1,7 @@
-From 743f42aaecb1ab89eba0eaf5e88ed67bbf3ba304 Mon Sep 17 00:00:00 2001
+From 4ff9dbe13f38e4fea24fbcc9879cf7352c0561ff Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:37:10 +0000
-Subject: [PATCH 07/13] Add the armv5e architecture to binutils
+Subject: [PATCH 07/14] Add the armv5e architecture to binutils
 
 Binutils has a comment that indicates it is supposed to match gcc for
 all of the support "-march=" settings, but it was lacking the armv5e setting.
@@ -19,10 +19,10 @@
  1 file changed, 1 insertion(+)
 
 diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
-index 2db6c2d..ab48168 100644
+index 3bd4bc9..5d99921 100644
 --- a/gas/config/tc-arm.c
 +++ b/gas/config/tc-arm.c
-@@ -24463,6 +24463,7 @@ static const struct arm_arch_option_table arm_archs[] =
+@@ -24791,6 +24791,7 @@ static const struct arm_arch_option_table arm_archs[] =
    ARM_ARCH_OPT ("armv4t",	ARM_ARCH_V4T,	 FPU_ARCH_FPA),
    ARM_ARCH_OPT ("armv4txm",	ARM_ARCH_V4TxM,	 FPU_ARCH_FPA),
    ARM_ARCH_OPT ("armv5",	ARM_ARCH_V5,	 FPU_ARCH_VFP),
@@ -31,5 +31,5 @@
    ARM_ARCH_OPT ("armv5txm",	ARM_ARCH_V5TxM,	 FPU_ARCH_VFP),
    ARM_ARCH_OPT ("armv5te",	ARM_ARCH_V5TE,	 FPU_ARCH_VFP),
 -- 
-2.1.4
+2.7.1
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
index 0ae68fc..f8382f8 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0008-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
@@ -1,7 +1,7 @@
-From 4d3a9f6db604055348332b56889d466c058fa5f3 Mon Sep 17 00:00:00 2001
+From cb36d94dbd521752e6444418af500e139a26eabb Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:39:01 +0000
-Subject: [PATCH 08/13] don't let the distro compiler point to the wrong
+Subject: [PATCH 08/14] don't let the distro compiler point to the wrong
  installation location
 
 Thanks to RP for helping find the source code causing the issue.
@@ -17,10 +17,10 @@
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index 9b87720..ff43f53 100644
+index 7d7e2f4..1aaaf0e 100644
 --- a/libiberty/Makefile.in
 +++ b/libiberty/Makefile.in
-@@ -361,7 +361,8 @@ install-strip: install
+@@ -364,7 +364,8 @@ install-strip: install
  # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
  # default multilib, so we have to take CFLAGS into account as well,
  # since it will be passed the multilib flags.
@@ -31,5 +31,5 @@
  	if test -n "${target_header_dir}"; then \
  		${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
 -- 
-2.1.4
+2.7.1
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-Upstream-Status-Inappropriate-distribution-codesourc.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-Upstream-Status-Inappropriate-distribution-codesourc.patch
deleted file mode 100644
index f800796..0000000
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-Upstream-Status-Inappropriate-distribution-codesourc.patch
+++ /dev/null
@@ -1,278 +0,0 @@
-From e02e119b278c3f404e97669e7180cac944134c91 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:41:04 +0000
-Subject: [PATCH 09/13] Upstream-Status: Inappropriate [distribution:
- codesourcery]
-
-Patch originally created by Mark Hatle, forward-ported to
-binutils 2.21 by Scott Garman.
-
-purpose:  warn for uses of system directories when cross linking
-
-Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
-
-2008-07-02  Joseph Myers  <joseph@codesourcery.com>
-
-    ld/
-    * ld.h (args_type): Add error_poison_system_directories.
-    * ld.texinfo (--error-poison-system-directories): Document.
-    * ldfile.c (ldfile_add_library_path): Check
-    command_line.error_poison_system_directories.
-    * ldmain.c (main): Initialize
-    command_line.error_poison_system_directories.
-    * lexsup.c (enum option_values): Add
-    OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
-    (ld_options): Add --error-poison-system-directories.
-    (parse_args): Handle new option.
-
-2007-06-13  Joseph Myers  <joseph@codesourcery.com>
-
-    ld/
-    * config.in: Regenerate.
-    * ld.h (args_type): Add poison_system_directories.
-    * ld.texinfo (--no-poison-system-directories): Document.
-    * ldfile.c (ldfile_add_library_path): Check
-    command_line.poison_system_directories.
-    * ldmain.c (main): Initialize
-    command_line.poison_system_directories.
-    * lexsup.c (enum option_values): Add
-    OPTION_NO_POISON_SYSTEM_DIRECTORIES.
-    (ld_options): Add --no-poison-system-directories.
-    (parse_args): Handle new option.
-
-2007-04-20  Joseph Myers  <joseph@codesourcery.com>
-
-    Merge from Sourcery G++ binutils 2.17:
-
-    2007-03-20  Joseph Myers  <joseph@codesourcery.com>
-    Based on patch by Mark Hatle <mark.hatle@windriver.com>.
-    ld/
-    * configure.in (--enable-poison-system-directories): New option.
-    * configure, config.in: Regenerate.
-    * ldfile.c (ldfile_add_library_path): If
-    ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
-    /usr/lib, /usr/local/lib or /usr/X11R6/lib.
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ld/config.in    |  3 +++
- ld/configure    | 14 ++++++++++++++
- ld/configure.ac | 10 ++++++++++
- ld/ld.h         |  8 ++++++++
- ld/ld.texinfo   | 12 ++++++++++++
- ld/ldfile.c     | 17 +++++++++++++++++
- ld/ldlex.h      |  2 ++
- ld/ldmain.c     |  2 ++
- ld/lexsup.c     | 16 ++++++++++++++++
- 9 files changed, 84 insertions(+)
-
-diff --git a/ld/config.in b/ld/config.in
-index 2ab4844..766d23c 100644
---- a/ld/config.in
-+++ b/ld/config.in
-@@ -11,6 +11,9 @@
-    language is requested. */
- #undef ENABLE_NLS
- 
-+/* Define to warn for use of native system library directories */
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+
- /* Additional extension a shared object might have. */
- #undef EXTRA_SHLIB_EXTENSION
- 
-diff --git a/ld/configure b/ld/configure
-index 2fbaebf..5726a08 100755
---- a/ld/configure
-+++ b/ld/configure
-@@ -787,6 +787,7 @@ with_lib_path
- enable_targets
- enable_64_bit_bfd
- with_sysroot
-+enable_poison_system_directories
- enable_gold
- enable_got
- enable_werror
-@@ -1443,6 +1444,8 @@ Optional Features:
-   --disable-largefile     omit support for large files
-   --enable-targets        alternative target configurations
-   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
-+  --enable-poison-system-directories
-+                          warn for use of native system library directories
-   --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
-   --enable-got=<type>     GOT handling scheme (target, single, negative,
-                           multigot)
-@@ -16323,7 +16326,18 @@ else
- fi
- 
- 
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+  enableval=$enable_poison_system_directories;
-+else
-+  enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
- 
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
- 
- # Check whether --enable-got was given.
- if test "${enable_got+set}" = set; then :
-diff --git a/ld/configure.ac b/ld/configure.ac
-index 1bddfc9..e9edb7f 100644
---- a/ld/configure.ac
-+++ b/ld/configure.ac
-@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot)
- AC_SUBST(TARGET_SYSTEM_ROOT)
- AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
- 
-+AC_ARG_ENABLE([poison-system-directories],
-+         AS_HELP_STRING([--enable-poison-system-directories],
-+                [warn for use of native system library directories]),,
-+         [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+  AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+       [1],
-+       [Define to warn for use of native system library directories])
-+fi
-+
- dnl Use --enable-gold to decide if this linker should be the default.
- dnl "install_as_default" is set to false if gold is the default linker.
- dnl "installed_linker" is the installed BFD linker name.
-diff --git a/ld/ld.h b/ld/ld.h
-index f773ce7..adba0f6 100644
---- a/ld/ld.h
-+++ b/ld/ld.h
-@@ -161,6 +161,14 @@ typedef struct {
-   /* If TRUE we'll just print the default output on stdout.  */
-   bfd_boolean print_output_format;
- 
-+  /* If TRUE (the default) warn for uses of system directories when
-+     cross linking.  */
-+  bfd_boolean poison_system_directories;
-+
-+  /* If TRUE (default FALSE) give an error for uses of system
-+     directories when cross linking instead of a warning.  */
-+  bfd_boolean error_poison_system_directories;
-+
-   /* Big or little endian as set on command line.  */
-   enum endian_enum endian;
- 
-diff --git a/ld/ld.texinfo b/ld/ld.texinfo
-index 502582c..dae168a 100644
---- a/ld/ld.texinfo
-+++ b/ld/ld.texinfo
-@@ -2212,6 +2212,18 @@ string identifying the original linked file does not change.
- 
- Passing @code{none} for @var{style} disables the setting from any
- @code{--build-id} options earlier on the command line.
-+
-+@kindex --no-poison-system-directories
-+@item --no-poison-system-directories
-+Do not warn for @option{-L} options using system directories such as
-+@file{/usr/lib} when cross linking.  This option is intended for use
-+in chroot environments when such directories contain the correct
-+libraries for the target system rather than the host.
-+
-+@kindex --error-poison-system-directories
-+@item --error-poison-system-directories
-+Give an error instead of a warning for @option{-L} options using
-+system directories when cross linking.
- @end table
- 
- @c man end
-diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 782ed7f..19a9ab4 100644
---- a/ld/ldfile.c
-+++ b/ld/ldfile.c
-@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
-     new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
-   else
-     new_dirs->name = xstrdup (name);
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+  if (command_line.poison_system_directories
-+  && ((!strncmp (name, "/lib", 4))
-+      || (!strncmp (name, "/usr/lib", 8))
-+      || (!strncmp (name, "/usr/local/lib", 14))
-+      || (!strncmp (name, "/usr/X11R6/lib", 14))))
-+   {
-+     if (command_line.error_poison_system_directories)
-+       einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
-+            "cross-compilation\n"), name);
-+     else
-+       einfo (_("%P: warning: library search path \"%s\" is unsafe for "
-+            "cross-compilation\n"), name);
-+   }
-+#endif
-+
- }
- 
- /* Try to open a BFD for a lang_input_statement.  */
-diff --git a/ld/ldlex.h b/ld/ldlex.h
-index e3e9b24..29487a3 100644
---- a/ld/ldlex.h
-+++ b/ld/ldlex.h
-@@ -140,6 +140,8 @@ enum option_values
-   OPTION_IGNORE_UNRESOLVED_SYMBOL,
-   OPTION_PUSH_STATE,
-   OPTION_POP_STATE,
-+  OPTION_NO_POISON_SYSTEM_DIRECTORIES,
-+  OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
- };
- 
- /* The initial parser states.  */
-diff --git a/ld/ldmain.c b/ld/ldmain.c
-index 818d108..54c49f2 100644
---- a/ld/ldmain.c
-+++ b/ld/ldmain.c
-@@ -266,6 +266,8 @@ main (int argc, char **argv)
-   command_line.warn_mismatch = TRUE;
-   command_line.warn_search_mismatch = TRUE;
-   command_line.check_section_addresses = -1;
-+  command_line.poison_system_directories = TRUE;
-+  command_line.error_poison_system_directories = FALSE;
- 
-   /* We initialize DEMANGLING based on the environment variable
-      COLLECT_NO_DEMANGLE.  The gcc collect2 program will demangle the
-diff --git a/ld/lexsup.c b/ld/lexsup.c
-index 4812c97..21b49df 100644
---- a/ld/lexsup.c
-+++ b/ld/lexsup.c
-@@ -513,6 +513,14 @@ static const struct ld_option ld_options[] =
-   { {"pop-state", no_argument, NULL, OPTION_POP_STATE},
-     '\0', NULL, N_("Pop state of flags governing input file handling"),
-     TWO_DASHES },
-+  { {"no-poison-system-directories", no_argument, NULL,
-+     OPTION_NO_POISON_SYSTEM_DIRECTORIES},
-+    '\0', NULL, N_("Do not warn for -L options using system directories"),
-+    TWO_DASHES },
-+  { {"error-poison-system-directories", no_argument, NULL,
-+    +     OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
-+    '\0', NULL, N_("Give an error for -L options using system directories"),
-+    TWO_DASHES },
- };
- 
- #define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -1474,6 +1482,14 @@ parse_args (unsigned argc, char **argv)
- 	      free (oldp);
- 	    }
- 	  break;
-+
-+	case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
-+	  command_line.poison_system_directories = FALSE;
-+	  break;
-+
-+	case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
-+	  command_line.error_poison_system_directories = TRUE;
-+	  break;
- 	}
-     }
- 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
new file mode 100644
index 0000000..d3f510b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0009-warn-for-uses-of-system-directories-when-cross-linki.patch
@@ -0,0 +1,273 @@
+From 4daa841ce16ba52b717bdff9eb1dfc4f19638814 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 15 Jan 2016 06:31:09 +0000
+Subject: [PATCH 09/14] warn for uses of system directories when cross linking
+
+2008-07-02  Joseph Myers  <joseph@codesourcery.com>
+
+    ld/
+    * ld.h (args_type): Add error_poison_system_directories.
+    * ld.texinfo (--error-poison-system-directories): Document.
+    * ldfile.c (ldfile_add_library_path): Check
+    command_line.error_poison_system_directories.
+    * ldmain.c (main): Initialize
+    command_line.error_poison_system_directories.
+    * lexsup.c (enum option_values): Add
+    OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
+    (ld_options): Add --error-poison-system-directories.
+    (parse_args): Handle new option.
+
+2007-06-13  Joseph Myers  <joseph@codesourcery.com>
+
+    ld/
+    * config.in: Regenerate.
+    * ld.h (args_type): Add poison_system_directories.
+    * ld.texinfo (--no-poison-system-directories): Document.
+    * ldfile.c (ldfile_add_library_path): Check
+    command_line.poison_system_directories.
+    * ldmain.c (main): Initialize
+    command_line.poison_system_directories.
+    * lexsup.c (enum option_values): Add
+    OPTION_NO_POISON_SYSTEM_DIRECTORIES.
+    (ld_options): Add --no-poison-system-directories.
+    (parse_args): Handle new option.
+
+2007-04-20  Joseph Myers  <joseph@codesourcery.com>
+
+    Merge from Sourcery G++ binutils 2.17:
+
+    2007-03-20  Joseph Myers  <joseph@codesourcery.com>
+    Based on patch by Mark Hatle <mark.hatle@windriver.com>.
+    ld/
+    * configure.in (--enable-poison-system-directories): New option.
+    * configure, config.in: Regenerate.
+    * ldfile.c (ldfile_add_library_path): If
+    ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
+    /usr/lib, /usr/local/lib or /usr/X11R6/lib.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ ld/config.in    |  3 +++
+ ld/configure    | 16 ++++++++++++++++
+ ld/configure.ac | 10 ++++++++++
+ ld/ld.h         |  8 ++++++++
+ ld/ld.texinfo   | 12 ++++++++++++
+ ld/ldfile.c     | 17 +++++++++++++++++
+ ld/ldlex.h      |  2 ++
+ ld/ldmain.c     |  2 ++
+ ld/lexsup.c     | 16 ++++++++++++++++
+ 9 files changed, 86 insertions(+)
+
+diff --git a/ld/config.in b/ld/config.in
+index 276fb77..35c58eb 100644
+--- a/ld/config.in
++++ b/ld/config.in
+@@ -14,6 +14,9 @@
+    language is requested. */
+ #undef ENABLE_NLS
+ 
++/* Define to warn for use of native system library directories */
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES
++
+ /* Additional extension a shared object might have. */
+ #undef EXTRA_SHLIB_EXTENSION
+ 
+diff --git a/ld/configure b/ld/configure
+index eb4f0d7..e9054b4 100755
+--- a/ld/configure
++++ b/ld/configure
+@@ -790,6 +790,7 @@ with_lib_path
+ enable_targets
+ enable_64_bit_bfd
+ with_sysroot
++enable_poison_system_directories
+ enable_gold
+ enable_got
+ enable_compressed_debug_sections
+@@ -1446,6 +1447,8 @@ Optional Features:
+   --disable-largefile     omit support for large files
+   --enable-targets        alternative target configurations
+   --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
++  --enable-poison-system-directories
++                          warn for use of native system library directories
+   --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
+   --enable-got=<type>     GOT handling scheme (target, single, negative,
+                           multigot)
+@@ -16306,6 +16309,19 @@ fi
+ 
+ 
+ 
++# Check whether --enable-poison-system-directories was given.
++if test "${enable_poison_system_directories+set}" = set; then :
++  enableval=$enable_poison_system_directories;
++else
++  enable_poison_system_directories=no
++fi
++
++if test "x${enable_poison_system_directories}" = "xyes"; then
++
++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
++
++fi
++
+ # Check whether --enable-gold was given.
+ if test "${enable_gold+set}" = set; then :
+   enableval=$enable_gold; case "${enableval}" in
+diff --git a/ld/configure.ac b/ld/configure.ac
+index e28f38e..7b474e7 100644
+--- a/ld/configure.ac
++++ b/ld/configure.ac
+@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot)
+ AC_SUBST(TARGET_SYSTEM_ROOT)
+ AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
+ 
++AC_ARG_ENABLE([poison-system-directories],
++         AS_HELP_STRING([--enable-poison-system-directories],
++                [warn for use of native system library directories]),,
++         [enable_poison_system_directories=no])
++if test "x${enable_poison_system_directories}" = "xyes"; then
++  AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
++       [1],
++       [Define to warn for use of native system library directories])
++fi
++
+ dnl Use --enable-gold to decide if this linker should be the default.
+ dnl "install_as_default" is set to false if gold is the default linker.
+ dnl "installed_linker" is the installed BFD linker name.
+diff --git a/ld/ld.h b/ld/ld.h
+index d84ec4e..3476b26 100644
+--- a/ld/ld.h
++++ b/ld/ld.h
+@@ -164,6 +164,14 @@ typedef struct {
+   /* If set, display the target memory usage (per memory region).  */
+   bfd_boolean print_memory_usage;
+ 
++  /* If TRUE (the default) warn for uses of system directories when
++     cross linking.  */
++  bfd_boolean poison_system_directories;
++
++  /* If TRUE (default FALSE) give an error for uses of system
++     directories when cross linking instead of a warning.  */
++  bfd_boolean error_poison_system_directories;
++
+   /* Big or little endian as set on command line.  */
+   enum endian_enum endian;
+ 
+diff --git a/ld/ld.texinfo b/ld/ld.texinfo
+index 2389661..d06112b 100644
+--- a/ld/ld.texinfo
++++ b/ld/ld.texinfo
+@@ -2338,6 +2338,18 @@ string identifying the original linked file does not change.
+ 
+ Passing @code{none} for @var{style} disables the setting from any
+ @code{--build-id} options earlier on the command line.
++
++@kindex --no-poison-system-directories
++@item --no-poison-system-directories
++Do not warn for @option{-L} options using system directories such as
++@file{/usr/lib} when cross linking.  This option is intended for use
++in chroot environments when such directories contain the correct
++libraries for the target system rather than the host.
++
++@kindex --error-poison-system-directories
++@item --error-poison-system-directories
++Give an error instead of a warning for @option{-L} options using
++system directories when cross linking.
+ @end table
+ 
+ @c man end
+diff --git a/ld/ldfile.c b/ld/ldfile.c
+index 96f9ecc..af231c0 100644
+--- a/ld/ldfile.c
++++ b/ld/ldfile.c
+@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
+     new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
+   else
+     new_dirs->name = xstrdup (name);
++
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
++  if (command_line.poison_system_directories
++  && ((!strncmp (name, "/lib", 4))
++      || (!strncmp (name, "/usr/lib", 8))
++      || (!strncmp (name, "/usr/local/lib", 14))
++      || (!strncmp (name, "/usr/X11R6/lib", 14))))
++   {
++     if (command_line.error_poison_system_directories)
++       einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
++            "cross-compilation\n"), name);
++     else
++       einfo (_("%P: warning: library search path \"%s\" is unsafe for "
++            "cross-compilation\n"), name);
++   }
++#endif
++
+ }
+ 
+ /* Try to open a BFD for a lang_input_statement.  */
+diff --git a/ld/ldlex.h b/ld/ldlex.h
+index 6f11e7b..0ca3110 100644
+--- a/ld/ldlex.h
++++ b/ld/ldlex.h
+@@ -144,6 +144,8 @@ enum option_values
+   OPTION_PRINT_MEMORY_USAGE,
+   OPTION_REQUIRE_DEFINED_SYMBOL,
+   OPTION_ORPHAN_HANDLING,
++  OPTION_NO_POISON_SYSTEM_DIRECTORIES,
++  OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
+ };
+ 
+ /* The initial parser states.  */
+diff --git a/ld/ldmain.c b/ld/ldmain.c
+index bb0b9cc..a23c56c 100644
+--- a/ld/ldmain.c
++++ b/ld/ldmain.c
+@@ -257,6 +257,8 @@ main (int argc, char **argv)
+   command_line.warn_mismatch = TRUE;
+   command_line.warn_search_mismatch = TRUE;
+   command_line.check_section_addresses = -1;
++  command_line.poison_system_directories = TRUE;
++  command_line.error_poison_system_directories = FALSE;
+ 
+   /* We initialize DEMANGLING based on the environment variable
+      COLLECT_NO_DEMANGLE.  The gcc collect2 program will demangle the
+diff --git a/ld/lexsup.c b/ld/lexsup.c
+index e2fb212..a2064f1 100644
+--- a/ld/lexsup.c
++++ b/ld/lexsup.c
+@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] =
+   { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING},
+     '\0', N_("=MODE"), N_("Control how orphan sections are handled."),
+     TWO_DASHES },
++  { {"no-poison-system-directories", no_argument, NULL,
++     OPTION_NO_POISON_SYSTEM_DIRECTORIES},
++    '\0', NULL, N_("Do not warn for -L options using system directories"),
++    TWO_DASHES },
++  { {"error-poison-system-directories", no_argument, NULL,
++    +     OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
++    '\0', NULL, N_("Give an error for -L options using system directories"),
++    TWO_DASHES },
+ };
+ 
+ #define OPTION_COUNT ARRAY_SIZE (ld_options)
+@@ -1550,6 +1558,14 @@ parse_args (unsigned argc, char **argv)
+ 	    einfo (_("%P%F: invalid argument to option"
+ 		     " \"--orphan-handling\"\n"));
+ 	  break;
++
++	case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
++	  command_line.poison_system_directories = FALSE;
++	  break;
++
++	case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
++	  command_line.error_poison_system_directories = TRUE;
++	  break;
+ 	}
+     }
+ 
+-- 
+2.7.1
+
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
index 5451e74..4074241 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0010-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
@@ -1,7 +1,7 @@
-From edbee9a68e1c2e11c059668aa1d13001d9f3de06 Mon Sep 17 00:00:00 2001
+From bb9eb09411ddcef515f0f7ad7c29214b0766e960 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:42:38 +0000
-Subject: [PATCH 10/13] Fix rpath in libtool when sysroot is enabled
+Subject: [PATCH 10/14] Fix rpath in libtool when sysroot is enabled
 
 Enabling sysroot support in libtool exposed a bug where the final
 library had an RPATH encoded into it which still pointed to the
@@ -48,5 +48,5 @@
  	    if test -z "$hardcode_libdirs"; then
  	      hardcode_libdirs="$libdir"
 -- 
-2.1.4
+2.7.1
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
index d9d57ee..c0d2d71 100644
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0011-Change-default-emulation-for-mips64-linux.patch
@@ -1,7 +1,7 @@
-From 2a5e8813d3c5db3e2b7d9dfa2ab27cccd5111e53 Mon Sep 17 00:00:00 2001
+From af1b4ee69b4fd617b88127ed40c3ca7351a9532f Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:44:14 +0000
-Subject: [PATCH 11/13] Change default emulation for mips64*-*-linux
+Subject: [PATCH 11/14] Change default emulation for mips64*-*-linux
 
 we change the default emulations to be N64 instead of N32
 
@@ -14,10 +14,10 @@
  2 files changed, 8 insertions(+), 8 deletions(-)
 
 diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 7bcb92a..03d2c6f 100644
+index c5688cb..5c27b49 100644
 --- a/bfd/config.bfd
 +++ b/bfd/config.bfd
-@@ -1062,12 +1062,12 @@ case "${targ}" in
+@@ -1087,12 +1087,12 @@ case "${targ}" in
      targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
      ;;
    mips64*el-*-linux*)
@@ -35,10 +35,10 @@
    mips*el-*-linux*)
      targ_defvec=mips_elf32_trad_le_vec
 diff --git a/ld/configure.tgt b/ld/configure.tgt
-index 24e36d1..740b2ea 100644
+index 6b6bbf2..b45b1e5 100644
 --- a/ld/configure.tgt
 +++ b/ld/configure.tgt
-@@ -476,11 +476,11 @@ mips*el-*-vxworks*)	targ_emul=elf32elmipvxworks
+@@ -509,11 +509,11 @@ mips*el-*-vxworks*)	targ_emul=elf32elmipvxworks
  mips*-*-vxworks*)	targ_emul=elf32ebmipvxworks
  		        targ_extra_emuls="elf32elmipvxworks" ;;
  mips*-*-windiss)	targ_emul=elf32mipswindiss ;;
@@ -55,5 +55,5 @@
  mips*el-*-linux-*)	targ_emul=elf32ltsmip
  			targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
 -- 
-2.1.4
+2.7.1
 
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch
deleted file mode 100644
index c56ff91..0000000
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-XLP-instructions-support.patch
+++ /dev/null
@@ -1,428 +0,0 @@
-From 448329ea097447aee73d050045295c5a0ae8519e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 2 Mar 2015 01:51:05 +0000
-Subject: [PATCH 12/13] Add XLP instructions support
-
-From 26adb06ce515aadfec08ce13109b4b98287f677b Mon Sep 17 00:00:00 2001
-From: Nebu Philips <nphilips@netlogicmicro.com>
-Date: Fri, 30 Jul 2010 15:10:03 -0700
-Subject: [PATCH] Add support for Netlogic XLP
-
-Using the mipsisa64r2nlm target, add support for XLP from
-Netlogic. Also, update vendor name to NLM wherever applicable.
----
- bfd/aoutx.h           |    1 +
- bfd/archures.c        |    1 +
- bfd/bfd-in2.h         |    1 +
- bfd/config.bfd        |    5 +++++
- bfd/cpu-mips.c        |    6 ++++--
- bfd/elfxx-mips.c      |    8 ++++++++
- binutils/readelf.c    |    1 +
- gas/config/tc-mips.c  |    4 +++-
- gas/configure         |    3 +++
- gas/configure.tgt     |    2 +-
- include/elf/mips.h    |    1 +
- include/opcode/mips.h |   10 ++++++++--
- ld/configure.tgt      |    2 ++
- opcodes/mips-dis.c    |   12 +++++-------
- opcodes/mips-opc.c    |   33 +++++++++++++++++++++------------
- 15 files changed, 65 insertions(+), 25 deletions(-)
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- bfd/aoutx.h           |  1 +
- bfd/archures.c        |  1 +
- bfd/bfd-in2.h         |  1 +
- bfd/config.bfd        |  5 +++++
- bfd/cpu-mips.c        |  6 ++++--
- bfd/elfxx-mips.c      |  8 ++++++++
- binutils/readelf.c    |  1 +
- gas/config/tc-mips.c  |  4 +++-
- gas/configure         |  3 +++
- gas/configure.tgt     |  2 +-
- include/elf/mips.h    |  1 +
- include/opcode/mips.h | 10 ++++++++--
- ld/configure.tgt      |  2 ++
- opcodes/mips-dis.c    | 12 +++++-------
- opcodes/mips-opc.c    | 33 +++++++++++++++++++++------------
- 15 files changed, 65 insertions(+), 25 deletions(-)
-
-diff --git a/bfd/aoutx.h b/bfd/aoutx.h
-index 9385a98..a88df99 100644
---- a/bfd/aoutx.h
-+++ b/bfd/aoutx.h
-@@ -802,6 +802,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
- 	case bfd_mach_mipsisa64r6:
- 	case bfd_mach_mips_sb1:
- 	case bfd_mach_mips_xlr:
-+	case bfd_mach_mips_xlp:
- 	  /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc.  */
- 	  arch_flags = M_MIPS2;
- 	  break;
-diff --git a/bfd/archures.c b/bfd/archures.c
-index c9fd6c8..547bd09 100644
---- a/bfd/archures.c
-+++ b/bfd/archures.c
-@@ -180,6 +180,7 @@ DESCRIPTION
- .#define bfd_mach_mips_octeonp		6601
- .#define bfd_mach_mips_octeon2		6502
- .#define bfd_mach_mips_xlr              887682   {* decimal 'XLR'  *}
-+.#define bfd_mach_mips_xlp              887680   {* decimal 'XLP'  *}
- .#define bfd_mach_mipsisa32             32
- .#define bfd_mach_mipsisa32r2           33
- .#define bfd_mach_mipsisa32r3           34
-diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
-index c7a2bb5..413b773 100644
---- a/bfd/bfd-in2.h
-+++ b/bfd/bfd-in2.h
-@@ -1967,6 +1967,7 @@ enum bfd_architecture
- #define bfd_mach_mips_octeonp          6601
- #define bfd_mach_mips_octeon2          6502
- #define bfd_mach_mips_xlr              887682   /* decimal 'XLR'  */
-+#define bfd_mach_mips_xlp              887680   /* decimal 'XLP'  */
- #define bfd_mach_mipsisa32             32
- #define bfd_mach_mipsisa32r2           33
- #define bfd_mach_mipsisa32r3           34
-diff --git a/bfd/config.bfd b/bfd/config.bfd
-index 03d2c6f..27086db 100644
---- a/bfd/config.bfd
-+++ b/bfd/config.bfd
-@@ -1041,6 +1041,11 @@ case "${targ}" in
-     targ_defvec=mips_elf32_le_vec
-     targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
-     ;;
-+  mipsisa64*-*-elf*)
-+	targ_defvec=mips_elf32_trad_be_vec
-+	targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
-+	want64=true
-+	;;
-   mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks | mips*-*-windiss)
-     targ_defvec=mips_elf32_be_vec
-     targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
-diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
-index b617aaa..19a99d1 100644
---- a/bfd/cpu-mips.c
-+++ b/bfd/cpu-mips.c
-@@ -103,7 +103,8 @@ enum
-   I_mipsocteonp,
-   I_mipsocteon2,
-   I_xlr,
--  I_micromips
-+  I_micromips,
-+  I_xlp
- };
- 
- #define NN(index) (&arch_info_struct[(index) + 1])
-@@ -153,7 +154,8 @@ static const bfd_arch_info_type arch_info_struct[] =
-   N (64, 64, bfd_mach_mips_octeonp,"mips:octeon+",  FALSE, NN(I_mipsocteonp)),
-   N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2",  FALSE, NN(I_mipsocteon2)),
-   N (64, 64, bfd_mach_mips_xlr, "mips:xlr",       FALSE, NN(I_xlr)),
--  N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
-+  N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,NN(I_micromips)),
-+  N (64, 64, bfd_mach_mips_xlp, "mips:xlp",      FALSE, 0)
- };
- 
- /* The default architecture is mips:3000, but with a machine number of
-diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
-index 0df7abf..d268e86 100644
---- a/bfd/elfxx-mips.c
-+++ b/bfd/elfxx-mips.c
-@@ -6608,6 +6608,9 @@ _bfd_elf_mips_mach (flagword flags)
-     case E_MIPS_MACH_XLR:
-       return bfd_mach_mips_xlr;
- 
-+	case E_MIPS_MACH_XLP:
-+      return bfd_mach_mips_xlp;
-+
-     default:
-       switch (flags & EF_MIPS_ARCH)
- 	{
-@@ -11878,6 +11881,10 @@ mips_set_isa_flags (bfd *abfd)
-       val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
-       break;
- 
-+	case bfd_mach_mips_xlp:
-+	  val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_XLP;
-+	  break;
-+
-     case bfd_mach_mipsisa32:
-       val = E_MIPS_ARCH_32;
-       break;
-@@ -14765,6 +14772,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
-   { bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
-   { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
-   { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
-+  { bfd_mach_mips_xlp, bfd_mach_mipsisa64r2 },
- 
-   /* MIPS64 extensions.  */
-   { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
-diff --git a/binutils/readelf.c b/binutils/readelf.c
-index 0c00b2f..6e9d5e4 100644
---- a/binutils/readelf.c
-+++ b/binutils/readelf.c
-@@ -2898,6 +2898,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
- 	    case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
- 	    case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
- 	    case E_MIPS_MACH_XLR:  strcat (buf, ", xlr"); break;
-+		case E_MIPS_MACH_XLP:  strcat (buf, ", xlp"); break;
- 	    case 0:
- 	    /* We simply ignore the field in this case to avoid confusion:
- 	       MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
-diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
-index c3e3e2a..8d64344 100644
---- a/gas/config/tc-mips.c
-+++ b/gas/config/tc-mips.c
-@@ -551,6 +551,7 @@ static int mips_32bitmode = 0;
-    || mips_opts.arch == CPU_RM7000                    \
-    || mips_opts.arch == CPU_VR5500                    \
-    || mips_opts.micromips                             \
-+   || mips_opts.arch == CPU_XLP                       \
-    )
- 
- /* Whether the processor uses hardware interlocks to protect reads
-@@ -580,6 +581,7 @@ static int mips_32bitmode = 0;
-     && mips_opts.isa != ISA_MIPS3)                    \
-    || mips_opts.arch == CPU_R4300                     \
-    || mips_opts.micromips                             \
-+   || mips_opts.arch == CPU_XLP                       \
-    )
- 
- /* Whether the processor uses hardware interlocks to protect reads
-@@ -18682,7 +18684,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
-   /* Broadcom XLP.
-      XLP is mostly like XLR, with the prominent exception that it is
-      MIPS64R2 rather than MIPS64.  */
--  { "xlp",	      0, 0,			ISA_MIPS64R2, CPU_XLR },
-+  { "xlp",	      0, 0,			ISA_MIPS64R2, CPU_XLP },
- 
-   /* End marker */
-   { NULL, 0, 0, 0, 0 }
-diff --git a/gas/configure b/gas/configure
-index 074886f..8091f2f 100755
---- a/gas/configure
-+++ b/gas/configure
-@@ -12808,6 +12808,9 @@ _ACEOF
- 	  mipsisa64r6 | mipsisa64r6el)
- 	    mips_cpu=mips64r6
- 	    ;;
-+	  mipsisa64r2nlm | mipsisa64r2nlmel)
-+		mips_cpu=xlp
-+		;;
- 	  mipstx39 | mipstx39el)
- 	    mips_cpu=r3900
- 	    ;;
-diff --git a/gas/configure.tgt b/gas/configure.tgt
-index 1d92f55..06e8b4f 100644
---- a/gas/configure.tgt
-+++ b/gas/configure.tgt
-@@ -332,7 +332,7 @@ case ${generic_target} in
-   mips-*-sysv4*MP* | mips-*-gnu*)	fmt=elf em=tmips ;;
-   mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
- 					fmt=elf em=tmips ;;
--  mips-*-elf* | mips-*-rtems*)		fmt=elf ;;
-+  mips-*-elf* | mips-*-rtems*)		fmt=elf em=tmips ;;
-   mips-*-netbsd*)			fmt=elf em=tmips ;;
-   mips-*-openbsd*)			fmt=elf em=tmips ;;
- 
-diff --git a/include/elf/mips.h b/include/elf/mips.h
-index 2ed6acd..e541f50 100644
---- a/include/elf/mips.h
-+++ b/include/elf/mips.h
-@@ -285,6 +285,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
- #define E_MIPS_MACH_SB1         0x008a0000
- #define E_MIPS_MACH_OCTEON	0x008b0000
- #define E_MIPS_MACH_XLR     	0x008c0000
-+#define E_MIPS_MACH_XLP         0x008f0000
- #define E_MIPS_MACH_OCTEON2	0x008d0000
- #define E_MIPS_MACH_OCTEON3	0x008e0000
- #define E_MIPS_MACH_5400	0x00910000
-diff --git a/include/opcode/mips.h b/include/opcode/mips.h
-index ef26167..ef53ec6 100644
---- a/include/opcode/mips.h
-+++ b/include/opcode/mips.h
-@@ -1227,8 +1227,10 @@ static const unsigned int mips_isa_table[] = {
- #define INSN_LOONGSON_2F          0x80000000
- /* Loongson 3A.  */
- #define INSN_LOONGSON_3A          0x00000400
--/* RMI Xlr instruction */
--#define INSN_XLR                 0x00000020
-+/* Netlogic Xlr instruction */
-+#define INSN_XLR		0x00000020
-+/* Netlogic XlP instruction */
-+#define INSN_XLP		0x00000040
- 
- /* DSP ASE */
- #define ASE_DSP			0x00000001
-@@ -1324,6 +1326,7 @@ static const unsigned int mips_isa_table[] = {
- #define CPU_OCTEONP	6601
- #define CPU_OCTEON2	6502
- #define CPU_XLR     	887682   	/* decimal 'XLR'   */
-+#define CPU_XLP         887680      /* decimal 'XLP'   */
- 
- /* Return true if the given CPU is included in INSN_* mask MASK.  */
- 
-@@ -1398,6 +1401,9 @@ cpu_is_member (int cpu, unsigned int mask)
-       return ((mask & INSN_ISA_MASK) == INSN_ISA32R6)
- 	     || ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
- 
-+    case CPU_XLP:
-+      return (mask & INSN_XLP) != 0;
-+
-     default:
-       return FALSE;
-     }
-diff --git a/ld/configure.tgt b/ld/configure.tgt
-index 740b2ea..4df13a7 100644
---- a/ld/configure.tgt
-+++ b/ld/configure.tgt
-@@ -462,6 +462,8 @@ mips*el-sde-elf*)	targ_emul=elf32ltsmip
- mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
- 			targ_emul=elf32btsmip
- 			targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
-+mipsisa64*-*-elf*)	targ_emul=elf32btsmip
-+			targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" ;;
- mips64*el-ps2-elf*)	targ_emul=elf32lr5900n32
- 			targ_extra_emuls="elf32lr5900"
- 			targ_extra_libpath=$targ_extra_emuls ;;
-diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
-index 1eb1d45..d6881af 100644
---- a/opcodes/mips-dis.c
-+++ b/opcodes/mips-dis.c
-@@ -655,13 +655,11 @@ const struct mips_arch_choice mips_arch_choices[] =
-     mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
-     mips_cp1_names_mips3264, mips_hwr_names_numeric },
- 
--  /* XLP is mostly like XLR, with the prominent exception it is being
--     MIPS64R2.  */
--  { "xlp", 1, bfd_mach_mips_xlr, CPU_XLR,
--    ISA_MIPS64R2 | INSN_XLR, 0,
--    mips_cp0_names_xlr,
--    mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
--    mips_cp1_names_mips3264, mips_hwr_names_numeric },
-+  { "xlp", 1, bfd_mach_mips_xlp, CPU_XLP,
-+    ISA_MIPS64R2 | INSN_XLP, 0,
-+    mips_cp0_names_mips3264r2,
-+    mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
-+    mips_hwr_names_mips3264r2 },
- 
-   /* This entry, mips16, is here only for ISA/processor selection; do
-      not print its name.  */
-diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
-index 2c3bbad..9785a7e 100644
---- a/opcodes/mips-opc.c
-+++ b/opcodes/mips-opc.c
-@@ -319,7 +319,8 @@ decode_mips_operand (const char *p)
- #define IOCT	(INSN_OCTEON | INSN_OCTEONP | INSN_OCTEON2)
- #define IOCTP	(INSN_OCTEONP | INSN_OCTEON2)
- #define IOCT2	INSN_OCTEON2
--#define XLR     INSN_XLR
-+#define XLR	INSN_XLR
-+#define XLP	INSN_XLP
- #define IVIRT	ASE_VIRT
- #define IVIRT64	ASE_VIRT64
- 
-@@ -956,6 +957,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"clo",			"U,s",		0x70000021, 0xfc0007ff, WR_1|RD_2,		0,		I32|N55,	0,	I37 },
- {"clz",			"d,s",		0x00000050, 0xfc1f07ff, WR_1|RD_2,		0,		I37,		0,	0 },
- {"clz",			"U,s",		0x70000020, 0xfc0007ff, WR_1|RD_2,		0,		I32|N55,	0,	I37 },
-+{"crc",			"d,s,t",	0x7000001c, 0xfc0007ff,	WR_1|RD_2|RD_3,	0,		XLP, 		0,	0 },
- /* ctc0 is at the bottom of the table.  */
- {"ctc1",		"t,G",		0x44c00000, 0xffe007ff,	RD_1|WR_CC|CM,		0,		I1,		0,	0 },
- {"ctc1",		"t,S",		0x44c00000, 0xffe007ff,	RD_1|WR_CC|CM,		0,		I1,		0,	0 },
-@@ -988,12 +990,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"daddiu",		"t,r,j",	0x64000000, 0xfc000000, WR_1|RD_2,		0,		I3,		0,	0 },
- {"daddu",		"d,v,t",	0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I3,		0,	0 },
- {"daddu",		"t,r,I",	0,    (int) M_DADDU_I,	INSN_MACRO,		0,		I3,		0,	0 },
--{"daddwc",		"d,s,t", 	0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0,		XLR,		0,	0 },
-+{"daddwc",		"d,s,t", 	0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0,		XLR|XLP,	0,	0 },
- {"dbreak",		"",		0x7000003f, 0xffffffff,	0,			0,		N5,		0,	0 },
- {"dclo",		"d,s",		0x00000053, 0xfc1f07ff, WR_1|RD_2,		0,		I69,		0,	0 },
- {"dclo",		"U,s",	 	0x70000025, 0xfc0007ff, WR_1|RD_2, 	0,		I64|N55,	0,	I69 },
- {"dclz",		"d,s",		0x00000052, 0xfc1f07ff, WR_1|RD_2,		0,		I69,		0,	0 },
- {"dclz",		"U,s",	 	0x70000024, 0xfc0007ff, WR_1|RD_2, 	0,		I64|N55,	0,	I69 },
-+{"dcrc",		"d,s,t",	0x7000001d, 0xfc0007ff, WR_1|RD_2|RD_3,	0,		XLP, 		0,	0 },
- /* dctr and dctw are used on the r5000.  */
- {"dctr",		"o(b)",	 	0xbc050000, 0xfc1f0000, RD_2,			0,		I3,		0,	0 },
- {"dctw",		"o(b)",		0xbc090000, 0xfc1f0000, RD_2,			0,		I3,		0,	0 },
-@@ -1065,6 +1068,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"dmfc0",		"t,G,H",	0x40200000, 0xffe007f8,	WR_1|RD_C0|LC,		0,		I64,		0,	0 },
- {"dmfgc0",		"t,G",		0x40600100, 0xffe007ff, WR_1|RD_C0|LC,		0,		0,		IVIRT64, 0 },
- {"dmfgc0",		"t,G,H",	0x40600100, 0xffe007f8, WR_1|RD_C0|LC,		0,		0,		IVIRT64, 0 },
-+{"dmfur",		"t,d",		0x7000001e, 0xffe007ff, WR_1,			0,		XLP,		0,	0 },
- {"dmt",			"",		0x41600bc1, 0xffffffff, TRAP,			0,		0,		MT32,	0 },
- {"dmt",			"t",		0x41600bc1, 0xffe0ffff, WR_1|TRAP,		0,		0,		MT32,	0 },
- {"dmtc0",		"t,G",		0x40a00000, 0xffe007ff,	RD_1|WR_C0|WR_CC|CM,	0,		I3,		0,	EE },
-@@ -1080,6 +1084,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
- /* dmfc3 is at the bottom of the table.  */
- /* dmtc3 is at the bottom of the table.  */
- {"dmuh",		"d,s,t",	0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I69,		0,	0 },
-+{"dmtur",		"t,d",		0x7000001f, 0xffe007ff,	RD_1,			0,		XLP,		0,	0 },
-+{"dmul",		"d,s,t",	0x70000006, 0xfc0007ff,	WR_1|RD_2|RD_3,		0,		XLP,		0,	0 },
- {"dmul",		"d,s,t",	0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I69,		0,	0 },
- {"dmul",		"d,v,t",	0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO,	0,		IOCT,		0,	0 },
- {"dmul",		"d,v,t",	0,    (int) M_DMUL,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
-@@ -1229,9 +1235,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"ld",			"s,-b(+R)",	0xec180000, 0xfc1c0000, WR_1,			RD_pc,		I69,		0,	0 },
- {"ld",			"t,A(b)",	0,    (int) M_LD_AB,	INSN_MACRO,		0,		I1,		0,	0 },
- {"ld",			"t,o(b)",	0xdc000000, 0xfc000000, WR_1|RD_3|LM,		0,		I3,		0,	0 },
--{"ldaddw",		"t,b",		0x70000010, 0xfc00ffff,	MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
--{"ldaddwu",		"t,b",		0x70000011, 0xfc00ffff,	MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
--{"ldaddd",		"t,b",		0x70000012, 0xfc00ffff,	MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
-+{"ldaddw",		"t,b",		0x70000010, 0xfc00ffff,	MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
-+{"ldaddwu",		"t,b",		0x70000011, 0xfc00ffff,	MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
-+{"ldaddd",		"t,b",		0x70000012, 0xfc00ffff,	MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
- {"ldc1",		"T,o(b)",	0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D,	0,		I2,		0,	SF },
- {"ldc1",		"E,o(b)",	0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D,	0,		I2,		0,	SF },
- {"ldc1",		"T,A(b)",	0,    (int) M_LDC1_AB,	INSN_MACRO,		INSN2_M_FP_D,	I2,		0,	SF },
-@@ -1396,7 +1402,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"mflo",		"d,9",		0x00000012, 0xff9f07ff, WR_1|RD_LO,		0,		0,		D32,	0 },
- {"mflo1",		"d",		0x70000012, 0xffff07ff,	WR_1|RD_LO,		0,		EE,		0,	0 },
- {"mflhxu",		"d",		0x00000052, 0xffff07ff,	WR_1|MOD_HILO,		0,		0,		SMT,	0 },
--{"mfcr",		"t,s",		0x70000018, 0xfc00ffff, WR_1|RD_2,		0,		XLR,		0,	0 },
-+{"mfcr",		"t,s",		0x70000018, 0xfc00ffff, WR_1,			0,		XLR|XLP,	0,	0 },
- {"mfsa",		"d",		0x00000028, 0xffff07ff,	WR_1,			0,		EE,		0,	0 },
- {"min.ob",		"X,Y,Q",	0x78000006, 0xfc20003f,	WR_1|RD_2|RD_3|FP_D,	0,		SB1,		MX,	0 },
- {"min.ob",		"D,S,Q",	0x48000006, 0xfc20003f,	WR_1|RD_2|RD_3|FP_D,	0,		N54,		0,	0 },
-@@ -1441,10 +1447,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
- /* move is at the top of the table.  */
- {"msgn.qh",		"X,Y,Q",	0x78200000, 0xfc20003f,	WR_1|RD_2|RD_3|FP_D,	0,		0,		MX,	0 },
- {"msgsnd",		"t",		0,    (int) M_MSGSND,	INSN_MACRO,		0,		XLR,		0,	0 },
-+{"msgsnds",		"d,t",		0x4a000001, 0xffe007ff,	WR_1|RD_2|RD_C0|WR_C0,	0,		XLP,		0,	0 },
- {"msgld",		"", 		0,    (int) M_MSGLD,	INSN_MACRO,		0,		XLR,		0,	0 },
- {"msgld",		"t",		0,    (int) M_MSGLD_T,	INSN_MACRO,		0,		XLR,		0,	0 },
--{"msgwait",		"", 		0,    (int) M_MSGWAIT,	INSN_MACRO,		0,		XLR,		0,	0 },
--{"msgwait",		"t",		0,    (int) M_MSGWAIT_T,INSN_MACRO,		0,		XLR,		0,	0 },
-+{"msglds",		"d,t",		0x4a000002, 0xffe007ff,	WR_1|RD_2|RD_C0|WR_C0,	0,		XLP,		0,	0 },
-+{"msgwait",		"",		0,    (int) M_MSGWAIT,  INSN_MACRO,		0,		XLR|XLP,	0,	0 },
-+{"msgwait",		"t",		0,    (int) M_MSGWAIT_T,INSN_MACRO,		0,		XLR|XLP,	0,	0 },
-+{"msgsync",		"",		0x4a000004, 0xffffffff,0,			0,		XLP,		0,	0 },
- {"msub.d",		"D,R,S,T",	0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0,		I4_33,		0,	I37 },
- {"msub.d",		"D,S,T",	0x46200019, 0xffe0003f,	WR_1|RD_2|RD_3|FP_D,	0,		IL2E,		0,	0 },
- {"msub.d",		"D,S,T",	0x72200019, 0xffe0003f,	WR_1|RD_2|RD_3|FP_D,	0,		IL2F,		0,	0 },
-@@ -1494,7 +1503,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"mtlo",		"s,7",		0x00000013, 0xfc1fe7ff, RD_1|WR_LO,		0,		0,		D32,	0 },
- {"mtlo1",		"s",		0x70000013, 0xfc1fffff,	RD_1|WR_LO,		0,		EE,		0,	0 },
- {"mtlhx",		"s",		0x00000053, 0xfc1fffff,	RD_1|MOD_HILO,		0,		0,		SMT,	0 },
--{"mtcr",		"t,s",		0x70000019, 0xfc00ffff, RD_1|RD_2,		0,		XLR,		0,	0 },
-+{"mtcr",		"t,s",		0x70000019, 0xfc00ffff, RD_1,			0,		XLR|XLP,	0,	0 },
- {"mtm0",		"s",		0x70000008, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
- {"mtm1",		"s",		0x7000000c, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
- {"mtm2",		"s",		0x7000000d, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
-@@ -1924,9 +1933,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
- {"suxc1",		"S,t(b)",	0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D,	0,		I5_33|N55,	0,	I37},
- {"sw",			"t,o(b)",	0xac000000, 0xfc000000,	RD_1|RD_3|SM,		0,		I1,		0,	0 },
- {"sw",			"t,A(b)",	0,    (int) M_SW_AB,	INSN_MACRO,		0,		I1,		0,	0 },
--{"swapw",		"t,b",		0x70000014, 0xfc00ffff, MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
--{"swapwu",		"t,b",		0x70000015, 0xfc00ffff, MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
--{"swapd",		"t,b",		0x70000016, 0xfc00ffff, MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
-+{"swapw",		"t,b",		0x70000014, 0xfc00ffff, MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
-+{"swapwu",		"t,b",		0x70000015, 0xfc00ffff, MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
-+{"swapd",		"t,b",		0x70000016, 0xfc00ffff, MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
- {"swc0",		"E,o(b)",	0xe0000000, 0xfc000000,	RD_3|RD_C0|SM,		0,		I1,		0,	IOCT|IOCTP|IOCT2|I37 },
- {"swc0",		"E,A(b)",	0,    (int) M_SWC0_AB,	INSN_MACRO,		0,		I1,		0,	IOCT|IOCTP|IOCT2|I37 },
- {"swc1",		"T,o(b)",	0xe4000000, 0xfc000000,	RD_1|RD_3|SM|FP_S,	0,		I1,		0,	0 },
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
new file mode 100644
index 0000000..af7f12f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0012-Add-support-for-Netlogic-XLP.patch
@@ -0,0 +1,413 @@
+From 9f967c555b3fda64af4549ae252a0fba00120529 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 14 Feb 2016 17:06:19 +0000
+Subject: [PATCH 12/14] Add support for Netlogic XLP
+
+Patch From: Nebu Philips <nphilips@netlogicmicro.com>
+
+Using the mipsisa64r2nlm target, add support for XLP from
+Netlogic. Also, update vendor name to NLM wherever applicable.
+
+Use 0x00000080 for INSN_XLP, the value 0x00000040 has already been
+assigned to INSN_OCTEON3
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Baoshan Pang <baoshan.pang@windriver.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+Upstream-Status: Pending
+
+ bfd/aoutx.h           |  1 +
+ bfd/archures.c        |  1 +
+ bfd/bfd-in2.h         |  1 +
+ bfd/config.bfd        |  5 +++++
+ bfd/cpu-mips.c        |  6 ++++--
+ bfd/elfxx-mips.c      |  8 ++++++++
+ binutils/readelf.c    |  1 +
+ gas/config/tc-mips.c  |  4 +++-
+ gas/configure         |  3 +++
+ gas/configure.tgt     |  2 +-
+ include/elf/mips.h    |  1 +
+ include/opcode/mips.h | 10 ++++++++--
+ ld/configure.tgt      |  2 ++
+ opcodes/mips-dis.c    | 12 +++++-------
+ opcodes/mips-opc.c    | 33 +++++++++++++++++++++------------
+ 15 files changed, 65 insertions(+), 25 deletions(-)
+
+diff --git a/bfd/aoutx.h b/bfd/aoutx.h
+index f78b910..d0d8dd3 100644
+--- a/bfd/aoutx.h
++++ b/bfd/aoutx.h
+@@ -802,6 +802,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch,
+ 	case bfd_mach_mipsisa64r6:
+ 	case bfd_mach_mips_sb1:
+ 	case bfd_mach_mips_xlr:
++	case bfd_mach_mips_xlp:
+ 	  /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc.  */
+ 	  arch_flags = M_MIPS2;
+ 	  break;
+diff --git a/bfd/archures.c b/bfd/archures.c
+index 51068b9..727741f 100644
+--- a/bfd/archures.c
++++ b/bfd/archures.c
+@@ -181,6 +181,7 @@ DESCRIPTION
+ .#define bfd_mach_mips_octeon2		6502
+ .#define bfd_mach_mips_octeon3          6503
+ .#define bfd_mach_mips_xlr              887682   {* decimal 'XLR'  *}
++.#define bfd_mach_mips_xlp              887680   {* decimal 'XLP'  *}
+ .#define bfd_mach_mipsisa32             32
+ .#define bfd_mach_mipsisa32r2           33
+ .#define bfd_mach_mipsisa32r3           34
+diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
+index 779ffbf..bf5a565 100644
+--- a/bfd/bfd-in2.h
++++ b/bfd/bfd-in2.h
+@@ -1993,6 +1993,7 @@ enum bfd_architecture
+ #define bfd_mach_mips_octeon2          6502
+ #define bfd_mach_mips_octeon3          6503
+ #define bfd_mach_mips_xlr              887682   /* decimal 'XLR'  */
++#define bfd_mach_mips_xlp              887680   /* decimal 'XLP'  */
+ #define bfd_mach_mipsisa32             32
+ #define bfd_mach_mipsisa32r2           33
+ #define bfd_mach_mipsisa32r3           34
+diff --git a/bfd/config.bfd b/bfd/config.bfd
+index 5c27b49..d553039 100644
+--- a/bfd/config.bfd
++++ b/bfd/config.bfd
+@@ -1066,6 +1066,11 @@ case "${targ}" in
+     targ_defvec=mips_elf32_le_vec
+     targ_selvecs="mips_elf32_be_vec mips_elf64_be_vec mips_elf64_le_vec"
+     ;;
++  mipsisa64*-*-elf*)
++	targ_defvec=mips_elf32_trad_be_vec
++	targ_selvecs="mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
++	want64=true
++	;;
+   mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks | mips*-*-windiss)
+     targ_defvec=mips_elf32_be_vec
+     targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec"
+diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
+index 8a9475d..de7e5a3 100644
+--- a/bfd/cpu-mips.c
++++ b/bfd/cpu-mips.c
+@@ -104,7 +104,8 @@ enum
+   I_mipsocteon2,
+   I_mipsocteon3,
+   I_xlr,
+-  I_micromips
++  I_micromips,
++  I_xlp
+ };
+ 
+ #define NN(index) (&arch_info_struct[(index) + 1])
+@@ -155,7 +156,8 @@ static const bfd_arch_info_type arch_info_struct[] =
+   N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2",  FALSE, NN(I_mipsocteon2)),
+   N (64, 64, bfd_mach_mips_octeon3, "mips:octeon3",  FALSE, NN(I_mipsocteon3)),
+   N (64, 64, bfd_mach_mips_xlr, "mips:xlr",       FALSE, NN(I_xlr)),
+-  N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,0)
++  N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,NN(I_micromips)),
++  N (64, 64, bfd_mach_mips_xlp, "mips:xlp",      FALSE, 0)
+ };
+ 
+ /* The default architecture is mips:3000, but with a machine number of
+diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
+index 1f2f4a3..700afd3 100644
+--- a/bfd/elfxx-mips.c
++++ b/bfd/elfxx-mips.c
+@@ -6605,6 +6605,9 @@ _bfd_elf_mips_mach (flagword flags)
+     case E_MIPS_MACH_XLR:
+       return bfd_mach_mips_xlr;
+ 
++	case E_MIPS_MACH_XLP:
++      return bfd_mach_mips_xlp;
++
+     default:
+       switch (flags & EF_MIPS_ARCH)
+ 	{
+@@ -11901,6 +11904,10 @@ mips_set_isa_flags (bfd *abfd)
+       val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON2;
+       break;
+ 
++	case bfd_mach_mips_xlp:
++	  val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_XLP;
++	  break;
++
+     case bfd_mach_mipsisa32:
+       val = E_MIPS_ARCH_32;
+       break;
+@@ -13931,6 +13938,7 @@ static const struct mips_mach_extension mips_mach_extensions[] =
+   { bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
+   { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
+   { bfd_mach_mips_loongson_3a, bfd_mach_mipsisa64r2 },
++  { bfd_mach_mips_xlp, bfd_mach_mipsisa64r2 },
+ 
+   /* MIPS64 extensions.  */
+   { bfd_mach_mipsisa64r2, bfd_mach_mipsisa64 },
+diff --git a/binutils/readelf.c b/binutils/readelf.c
+index d5dd46f..66810cc 100644
+--- a/binutils/readelf.c
++++ b/binutils/readelf.c
+@@ -3140,6 +3140,7 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
+ 	    case E_MIPS_MACH_OCTEON2: strcat (buf, ", octeon2"); break;
+ 	    case E_MIPS_MACH_OCTEON3: strcat (buf, ", octeon3"); break;
+ 	    case E_MIPS_MACH_XLR:  strcat (buf, ", xlr"); break;
++		case E_MIPS_MACH_XLP:  strcat (buf, ", xlp"); break;
+ 	    case 0:
+ 	    /* We simply ignore the field in this case to avoid confusion:
+ 	       MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
+diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
+index a2d45a4..75902c0 100644
+--- a/gas/config/tc-mips.c
++++ b/gas/config/tc-mips.c
+@@ -552,6 +552,7 @@ static int mips_32bitmode = 0;
+    || mips_opts.arch == CPU_RM7000                    \
+    || mips_opts.arch == CPU_VR5500                    \
+    || mips_opts.micromips                             \
++   || mips_opts.arch == CPU_XLP                       \
+    )
+ 
+ /* Whether the processor uses hardware interlocks to protect reads
+@@ -581,6 +582,7 @@ static int mips_32bitmode = 0;
+     && mips_opts.isa != ISA_MIPS3)                    \
+    || mips_opts.arch == CPU_R4300                     \
+    || mips_opts.micromips                             \
++   || mips_opts.arch == CPU_XLP                       \
+    )
+ 
+ /* Whether the processor uses hardware interlocks to protect reads
+@@ -18702,7 +18704,7 @@ static const struct mips_cpu_info mips_cpu_info_table[] =
+   /* Broadcom XLP.
+      XLP is mostly like XLR, with the prominent exception that it is
+      MIPS64R2 rather than MIPS64.  */
+-  { "xlp",	      0, 0,			ISA_MIPS64R2, CPU_XLR },
++  { "xlp",	      0, 0,			ISA_MIPS64R2, CPU_XLP },
+ 
+   /* i6400.  */
+   { "i6400",	      0, ASE_MSA,		ISA_MIPS64R6, CPU_MIPS64R6},
+diff --git a/gas/configure b/gas/configure
+index 89f18b3..86b19ae 100755
+--- a/gas/configure
++++ b/gas/configure
+@@ -12851,6 +12851,9 @@ _ACEOF
+ 	  mipsisa64r6 | mipsisa64r6el)
+ 	    mips_cpu=mips64r6
+ 	    ;;
++	  mipsisa64r2nlm | mipsisa64r2nlmel)
++		mips_cpu=xlp
++		;;
+ 	  mipstx39 | mipstx39el)
+ 	    mips_cpu=r3900
+ 	    ;;
+diff --git a/gas/configure.tgt b/gas/configure.tgt
+index 086e0d2..2b71270 100644
+--- a/gas/configure.tgt
++++ b/gas/configure.tgt
+@@ -339,7 +339,7 @@ case ${generic_target} in
+   mips-*-sysv4*MP* | mips-*-gnu*)	fmt=elf em=tmips ;;
+   mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
+ 					fmt=elf em=tmips ;;
+-  mips-*-elf* | mips-*-rtems*)		fmt=elf ;;
++  mips-*-elf* | mips-*-rtems*)		fmt=elf em=tmips ;;
+   mips-*-netbsd*)			fmt=elf em=tmips ;;
+   mips-*-openbsd*)			fmt=elf em=tmips ;;
+ 
+diff --git a/include/elf/mips.h b/include/elf/mips.h
+index 57de3bc..9ba141d 100644
+--- a/include/elf/mips.h
++++ b/include/elf/mips.h
+@@ -285,6 +285,7 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
+ #define E_MIPS_MACH_SB1         0x008a0000
+ #define E_MIPS_MACH_OCTEON	0x008b0000
+ #define E_MIPS_MACH_XLR     	0x008c0000
++#define E_MIPS_MACH_XLP         0x008f0000
+ #define E_MIPS_MACH_OCTEON2	0x008d0000
+ #define E_MIPS_MACH_OCTEON3	0x008e0000
+ #define E_MIPS_MACH_5400	0x00910000
+diff --git a/include/opcode/mips.h b/include/opcode/mips.h
+index 9318fcc..9be5645 100644
+--- a/include/opcode/mips.h
++++ b/include/opcode/mips.h
+@@ -1228,8 +1228,10 @@ static const unsigned int mips_isa_table[] = {
+ #define INSN_LOONGSON_2F          0x80000000
+ /* Loongson 3A.  */
+ #define INSN_LOONGSON_3A          0x00000400
+-/* RMI Xlr instruction */
+-#define INSN_XLR                 0x00000020
++/* Netlogic Xlr instruction */
++#define INSN_XLR		0x00000020
++/* Netlogic XlP instruction */
++#define INSN_XLP		0x00000080
+ 
+ /* DSP ASE */
+ #define ASE_DSP			0x00000001
+@@ -1326,6 +1328,7 @@ static const unsigned int mips_isa_table[] = {
+ #define CPU_OCTEON2	6502
+ #define CPU_OCTEON3	6503
+ #define CPU_XLR     	887682   	/* decimal 'XLR'   */
++#define CPU_XLP         887680      /* decimal 'XLP'   */
+ 
+ /* Return true if the given CPU is included in INSN_* mask MASK.  */
+ 
+@@ -1403,6 +1406,9 @@ cpu_is_member (int cpu, unsigned int mask)
+       return ((mask & INSN_ISA_MASK) == INSN_ISA32R6)
+ 	     || ((mask & INSN_ISA_MASK) == INSN_ISA64R6);
+ 
++    case CPU_XLP:
++      return (mask & INSN_XLP) != 0;
++
+     default:
+       return FALSE;
+     }
+diff --git a/ld/configure.tgt b/ld/configure.tgt
+index b45b1e5..fb2f36a 100644
+--- a/ld/configure.tgt
++++ b/ld/configure.tgt
+@@ -495,6 +495,8 @@ mips*el-sde-elf*)	targ_emul=elf32ltsmip
+ mips*-sde-elf* | mips*-mti-elf* | mips*-img-elf*)
+ 			targ_emul=elf32btsmip
+ 			targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
++mipsisa64*-*-elf*)	targ_emul=elf32btsmip
++			targ_extra_emuls="elf32ltsmip elf64btsmip elf64ltsmip" ;;
+ mips64*el-ps2-elf*)	targ_emul=elf32lr5900n32
+ 			targ_extra_emuls="elf32lr5900"
+ 			targ_extra_libpath=$targ_extra_emuls ;;
+diff --git a/opcodes/mips-dis.c b/opcodes/mips-dis.c
+index 8200920..40d9fe2 100644
+--- a/opcodes/mips-dis.c
++++ b/opcodes/mips-dis.c
+@@ -648,13 +648,11 @@ const struct mips_arch_choice mips_arch_choices[] =
+     mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
+     mips_cp1_names_mips3264, mips_hwr_names_numeric },
+ 
+-  /* XLP is mostly like XLR, with the prominent exception it is being
+-     MIPS64R2.  */
+-  { "xlp", 1, bfd_mach_mips_xlr, CPU_XLR,
+-    ISA_MIPS64R2 | INSN_XLR, 0,
+-    mips_cp0_names_xlr,
+-    mips_cp0sel_names_xlr, ARRAY_SIZE (mips_cp0sel_names_xlr),
+-    mips_cp1_names_mips3264, mips_hwr_names_numeric },
++  { "xlp", 1, bfd_mach_mips_xlp, CPU_XLP,
++    ISA_MIPS64R2 | INSN_XLP, 0,
++    mips_cp0_names_mips3264r2,
++    mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
++    mips_cp1_names_mips3264, mips_hwr_names_mips3264r2 },
+ 
+   /* This entry, mips16, is here only for ISA/processor selection; do
+      not print its name.  */
+diff --git a/opcodes/mips-opc.c b/opcodes/mips-opc.c
+index 402f887..3764836 100644
+--- a/opcodes/mips-opc.c
++++ b/opcodes/mips-opc.c
+@@ -320,7 +320,8 @@ decode_mips_operand (const char *p)
+ #define IOCTP	(INSN_OCTEONP | INSN_OCTEON2 | INSN_OCTEON3)
+ #define IOCT2	(INSN_OCTEON2 | INSN_OCTEON3)
+ #define IOCT3	INSN_OCTEON3
+-#define XLR     INSN_XLR
++#define XLR	INSN_XLR
++#define XLP	INSN_XLP
+ #define IVIRT	ASE_VIRT
+ #define IVIRT64	ASE_VIRT64
+ 
+@@ -957,6 +958,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+ {"clo",			"U,s",		0x70000021, 0xfc0007ff, WR_1|RD_2,		0,		I32|N55,	0,	I37 },
+ {"clz",			"d,s",		0x00000050, 0xfc1f07ff, WR_1|RD_2,		0,		I37,		0,	0 },
+ {"clz",			"U,s",		0x70000020, 0xfc0007ff, WR_1|RD_2,		0,		I32|N55,	0,	I37 },
++{"crc",			"d,s,t",	0x7000001c, 0xfc0007ff,	WR_1|RD_2|RD_3,	0,		XLP, 		0,	0 },
+ /* ctc0 is at the bottom of the table.  */
+ {"ctc1",		"t,G",		0x44c00000, 0xffe007ff,	RD_1|WR_CC|CM,		0,		I1,		0,	0 },
+ {"ctc1",		"t,S",		0x44c00000, 0xffe007ff,	RD_1|WR_CC|CM,		0,		I1,		0,	0 },
+@@ -989,12 +991,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
+ {"daddiu",		"t,r,j",	0x64000000, 0xfc000000, WR_1|RD_2,		0,		I3,		0,	0 },
+ {"daddu",		"d,v,t",	0x0000002d, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I3,		0,	0 },
+ {"daddu",		"t,r,I",	0,    (int) M_DADDU_I,	INSN_MACRO,		0,		I3,		0,	0 },
+-{"daddwc",		"d,s,t", 	0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0,		XLR,		0,	0 },
++{"daddwc",		"d,s,t", 	0x70000038, 0xfc0007ff, WR_1|RD_2|RD_3|WR_C0|RD_C0, 0,		XLR|XLP,	0,	0 },
+ {"dbreak",		"",		0x7000003f, 0xffffffff,	0,			0,		N5,		0,	0 },
+ {"dclo",		"d,s",		0x00000053, 0xfc1f07ff, WR_1|RD_2,		0,		I69,		0,	0 },
+ {"dclo",		"U,s",	 	0x70000025, 0xfc0007ff, WR_1|RD_2, 	0,		I64|N55,	0,	I69 },
+ {"dclz",		"d,s",		0x00000052, 0xfc1f07ff, WR_1|RD_2,		0,		I69,		0,	0 },
+ {"dclz",		"U,s",	 	0x70000024, 0xfc0007ff, WR_1|RD_2, 	0,		I64|N55,	0,	I69 },
++{"dcrc",		"d,s,t",	0x7000001d, 0xfc0007ff, WR_1|RD_2|RD_3,	0,		XLP, 		0,	0 },
+ /* dctr and dctw are used on the r5000.  */
+ {"dctr",		"o(b)",	 	0xbc050000, 0xfc1f0000, RD_2,			0,		I3,		0,	0 },
+ {"dctw",		"o(b)",		0xbc090000, 0xfc1f0000, RD_2,			0,		I3,		0,	0 },
+@@ -1066,6 +1069,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+ {"dmfc0",		"t,G,H",	0x40200000, 0xffe007f8,	WR_1|RD_C0|LC,		0,		I64,		0,	0 },
+ {"dmfgc0",		"t,G",		0x40600100, 0xffe007ff, WR_1|RD_C0|LC,		0,		0,		IVIRT64, 0 },
+ {"dmfgc0",		"t,G,H",	0x40600100, 0xffe007f8, WR_1|RD_C0|LC,		0,		0,		IVIRT64, 0 },
++{"dmfur",		"t,d",		0x7000001e, 0xffe007ff, WR_1,			0,		XLP,		0,	0 },
+ {"dmt",			"",		0x41600bc1, 0xffffffff, TRAP,			0,		0,		MT32,	0 },
+ {"dmt",			"t",		0x41600bc1, 0xffe0ffff, WR_1|TRAP,		0,		0,		MT32,	0 },
+ {"dmtc0",		"t,G",		0x40a00000, 0xffe007ff,	RD_1|WR_C0|WR_CC|CM,	0,		I3,		0,	EE },
+@@ -1081,6 +1085,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
+ /* dmfc3 is at the bottom of the table.  */
+ /* dmtc3 is at the bottom of the table.  */
+ {"dmuh",		"d,s,t",	0x000000dc, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I69,		0,	0 },
++{"dmtur",		"t,d",		0x7000001f, 0xffe007ff,	RD_1,			0,		XLP,		0,	0 },
++{"dmul",		"d,s,t",	0x70000006, 0xfc0007ff,	WR_1|RD_2|RD_3,		0,		XLP,		0,	0 },
+ {"dmul",		"d,s,t",	0x0000009c, 0xfc0007ff, WR_1|RD_2|RD_3,		0,		I69,		0,	0 },
+ {"dmul",		"d,v,t",	0x70000003, 0xfc0007ff, WR_1|RD_2|RD_3|WR_HILO,	0,		IOCT,		0,	0 },
+ {"dmul",		"d,v,t",	0,    (int) M_DMUL,	INSN_MACRO,		0,		I3,		0,	M32|I69 },
+@@ -1234,9 +1240,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
+ {"ld",			"s,-b(+R)",	0xec180000, 0xfc1c0000, WR_1,			RD_pc,		I69,		0,	0 },
+ {"ld",			"t,A(b)",	0,    (int) M_LD_AB,	INSN_MACRO,		0,		I1,		0,	0 },
+ {"ld",			"t,o(b)",	0xdc000000, 0xfc000000, WR_1|RD_3|LM,		0,		I3,		0,	0 },
+-{"ldaddw",		"t,b",		0x70000010, 0xfc00ffff,	MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
+-{"ldaddwu",		"t,b",		0x70000011, 0xfc00ffff,	MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
+-{"ldaddd",		"t,b",		0x70000012, 0xfc00ffff,	MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
++{"ldaddw",		"t,b",		0x70000010, 0xfc00ffff,	MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
++{"ldaddwu",		"t,b",		0x70000011, 0xfc00ffff,	MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
++{"ldaddd",		"t,b",		0x70000012, 0xfc00ffff,	MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
+ {"ldc1",		"T,o(b)",	0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D,	0,		I2,		0,	SF },
+ {"ldc1",		"E,o(b)",	0xd4000000, 0xfc000000, WR_1|RD_3|CLD|FP_D,	0,		I2,		0,	SF },
+ {"ldc1",		"T,A(b)",	0,    (int) M_LDC1_AB,	INSN_MACRO,		INSN2_M_FP_D,	I2,		0,	SF },
+@@ -1401,7 +1407,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+ {"mflo",		"d,9",		0x00000012, 0xff9f07ff, WR_1|RD_LO,		0,		0,		D32,	0 },
+ {"mflo1",		"d",		0x70000012, 0xffff07ff,	WR_1|RD_LO,		0,		EE,		0,	0 },
+ {"mflhxu",		"d",		0x00000052, 0xffff07ff,	WR_1|MOD_HILO,		0,		0,		SMT,	0 },
+-{"mfcr",		"t,s",		0x70000018, 0xfc00ffff, WR_1|RD_2,		0,		XLR,		0,	0 },
++{"mfcr",		"t,s",		0x70000018, 0xfc00ffff, WR_1,			0,		XLR|XLP,	0,	0 },
+ {"mfsa",		"d",		0x00000028, 0xffff07ff,	WR_1,			0,		EE,		0,	0 },
+ {"min.ob",		"X,Y,Q",	0x78000006, 0xfc20003f,	WR_1|RD_2|RD_3|FP_D,	0,		SB1,		MX,	0 },
+ {"min.ob",		"D,S,Q",	0x48000006, 0xfc20003f,	WR_1|RD_2|RD_3|FP_D,	0,		N54,		0,	0 },
+@@ -1446,10 +1452,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
+ /* move is at the top of the table.  */
+ {"msgn.qh",		"X,Y,Q",	0x78200000, 0xfc20003f,	WR_1|RD_2|RD_3|FP_D,	0,		0,		MX,	0 },
+ {"msgsnd",		"t",		0,    (int) M_MSGSND,	INSN_MACRO,		0,		XLR,		0,	0 },
++{"msgsnds",		"d,t",		0x4a000001, 0xffe007ff,	WR_1|RD_2|RD_C0|WR_C0,	0,		XLP,		0,	0 },
+ {"msgld",		"", 		0,    (int) M_MSGLD,	INSN_MACRO,		0,		XLR,		0,	0 },
+ {"msgld",		"t",		0,    (int) M_MSGLD_T,	INSN_MACRO,		0,		XLR,		0,	0 },
+-{"msgwait",		"", 		0,    (int) M_MSGWAIT,	INSN_MACRO,		0,		XLR,		0,	0 },
+-{"msgwait",		"t",		0,    (int) M_MSGWAIT_T,INSN_MACRO,		0,		XLR,		0,	0 },
++{"msglds",		"d,t",		0x4a000002, 0xffe007ff,	WR_1|RD_2|RD_C0|WR_C0,	0,		XLP,		0,	0 },
++{"msgwait",		"",		0,    (int) M_MSGWAIT,  INSN_MACRO,		0,		XLR|XLP,	0,	0 },
++{"msgwait",		"t",		0,    (int) M_MSGWAIT_T,INSN_MACRO,		0,		XLR|XLP,	0,	0 },
++{"msgsync",		"",		0x4a000004, 0xffffffff,0,			0,		XLP,		0,	0 },
+ {"msub.d",		"D,R,S,T",	0x4c000029, 0xfc00003f, WR_1|RD_2|RD_3|RD_4|FP_D, 0,		I4_33,		0,	I37 },
+ {"msub.d",		"D,S,T",	0x46200019, 0xffe0003f,	WR_1|RD_2|RD_3|FP_D,	0,		IL2E,		0,	0 },
+ {"msub.d",		"D,S,T",	0x72200019, 0xffe0003f,	WR_1|RD_2|RD_3|FP_D,	0,		IL2F,		0,	0 },
+@@ -1499,7 +1508,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
+ {"mtlo",		"s,7",		0x00000013, 0xfc1fe7ff, RD_1|WR_LO,		0,		0,		D32,	0 },
+ {"mtlo1",		"s",		0x70000013, 0xfc1fffff,	RD_1|WR_LO,		0,		EE,		0,	0 },
+ {"mtlhx",		"s",		0x00000053, 0xfc1fffff,	RD_1|MOD_HILO,		0,		0,		SMT,	0 },
+-{"mtcr",		"t,s",		0x70000019, 0xfc00ffff, RD_1|RD_2,		0,		XLR,		0,	0 },
++{"mtcr",		"t,s",		0x70000019, 0xfc00ffff, RD_1,			0,		XLR|XLP,	0,	0 },
+ {"mtm0",		"s",		0x70000008, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
+ {"mtm0",    		"s,t",		0x70000008, 0xfc00ffff, RD_1|RD_2,		0,		IOCT3,		0,	0 },
+ {"mtm1",		"s",		0x7000000c, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
+@@ -1936,9 +1945,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
+ {"suxc1",		"S,t(b)",	0x4c00000d, 0xfc0007ff, RD_1|RD_2|RD_3|SM|FP_D,	0,		I5_33|N55,	0,	I37},
+ {"sw",			"t,o(b)",	0xac000000, 0xfc000000,	RD_1|RD_3|SM,		0,		I1,		0,	0 },
+ {"sw",			"t,A(b)",	0,    (int) M_SW_AB,	INSN_MACRO,		0,		I1,		0,	0 },
+-{"swapw",		"t,b",		0x70000014, 0xfc00ffff, MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
+-{"swapwu",		"t,b",		0x70000015, 0xfc00ffff, MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
+-{"swapd",		"t,b",		0x70000016, 0xfc00ffff, MOD_1|RD_2|LM|SM,	0,		XLR,		0,	0 },
++{"swapw",		"t,b",		0x70000014, 0xfc00ffff, MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
++{"swapwu",		"t,b",		0x70000015, 0xfc00ffff, MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
++{"swapd",		"t,b",		0x70000016, 0xfc00ffff, MOD_1|RD_2|SM,		0,		XLR|XLP,	0,	0 },
+ {"swc0",		"E,o(b)",	0xe0000000, 0xfc000000,	RD_3|RD_C0|SM,		0,		I1,		0,	IOCT|IOCTP|IOCT2|I37 },
+ {"swc0",		"E,A(b)",	0,    (int) M_SWC0_AB,	INSN_MACRO,		0,		I1,		0,	IOCT|IOCTP|IOCT2|I37 },
+ {"swc1",		"T,o(b)",	0xe4000000, 0xfc000000,	RD_1|RD_3|SM|FP_S,	0,		I1,		0,	0 },
+-- 
+2.7.1
+
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Fix-GOT-address-computations-in-initial-PLT-entries-.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Fix-GOT-address-computations-in-initial-PLT-entries-.patch
new file mode 100644
index 0000000..24af120
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Fix-GOT-address-computations-in-initial-PLT-entries-.patch
@@ -0,0 +1,72 @@
+From 9619a608528383a44ccc1637ae939b5f3e97adc5 Mon Sep 17 00:00:00 2001
+From: Sandra Loosemore <sandra@codesourcery.com>
+Date: Wed, 9 Dec 2015 16:13:58 -0800
+Subject: [PATCH 13/14] Fix GOT address computations in initial PLT entries for
+ nios2.
+
+2015-12-09  Sandra Loosemore  <sandra@codesourcery.com>
+
+	bfd/
+	* elf32-nios2.c (nios2_elf32_finish_dynamic_sections): Correct
+	%hiadj/%lo computations for _GLOBAL_OFFSET_TABLE_ in initial
+	PLT entries.  Assert alignment requirements.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport
+---
+ bfd/elf32-nios2.c | 23 ++++++++++++++++-------
+ 1 file changed, 16 insertions(+), 7 deletions(-)
+
+diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
+index 6b29d8b..1c54320 100644
+--- a/bfd/elf32-nios2.c
++++ b/bfd/elf32-nios2.c
+@@ -5383,12 +5383,17 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
+ 				 + sgotplt->output_offset);
+ 	  if (bfd_link_pic (info))
+ 	    {
+-	      bfd_vma corrected = got_address - (splt->output_section->vma
+-						 + splt->output_offset + 4);
++	      bfd_vma got_pcrel = got_address - (splt->output_section->vma
++						 + splt->output_offset);
++	      /* Both GOT and PLT must be aligned to a 16-byte boundary
++		 for the two loads to share the %hiadj part.  The 4-byte
++		 offset for nextpc is accounted for in the %lo offsets
++		 on the loads.  */
++	      BFD_ASSERT ((got_pcrel & 0xf) == 0);
+ 	      nios2_elf32_install_data (splt, nios2_so_plt0_entry, 0, 6);
+-	      nios2_elf32_install_imm16 (splt, 4, hiadj (corrected));
+-	      nios2_elf32_install_imm16 (splt, 12, (corrected & 0xffff) + 4);
+-	      nios2_elf32_install_imm16 (splt, 16, (corrected & 0xffff) + 8);
++	      nios2_elf32_install_imm16 (splt, 4, hiadj (got_pcrel));
++	      nios2_elf32_install_imm16 (splt, 12, got_pcrel & 0xffff);
++	      nios2_elf32_install_imm16 (splt, 16, (got_pcrel + 4) & 0xffff);
+ 	    }
+ 	  else
+ 	    {
+@@ -5404,6 +5409,10 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
+ 			    6 | ((res_size - (res_offset + 4)) << 6),
+ 			    splt->contents + res_offset);
+ 
++	      /* The GOT must be aligned to a 16-byte boundary for the
++		 two loads to share the same %hiadj part.  */
++	      BFD_ASSERT ((got_address & 0xf) == 0);
++
+ 	      nios2_elf32_install_data (splt, nios2_plt0_entry, res_size, 7);
+ 	      nios2_elf32_install_imm16 (splt, res_size, hiadj (res_start));
+ 	      nios2_elf32_install_imm16 (splt, res_size + 4,
+@@ -5411,9 +5420,9 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd,
+ 	      nios2_elf32_install_imm16 (splt, res_size + 12,
+ 					 hiadj (got_address));
+ 	      nios2_elf32_install_imm16 (splt, res_size + 16,
+-					 (got_address & 0xffff) + 4);
++					 (got_address + 4) & 0xffff);
+ 	      nios2_elf32_install_imm16 (splt, res_size + 20,
+-					 (got_address & 0xffff) + 8);
++					 (got_address + 8) & 0xffff);
+ 	    }
+ 	}
+     }
+-- 
+2.7.1
+
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Fix-an-internal-error-in-do_print_to_mapfile-seen-wi.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Fix-an-internal-error-in-do_print_to_mapfile-seen-wi.patch
deleted file mode 100644
index aee01c0..0000000
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0013-Fix-an-internal-error-in-do_print_to_mapfile-seen-wi.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 8e8f77ec2b6262e7d10af54700c340173d957267 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 27 Feb 2015 09:05:49 +0000
-Subject: [PATCH 13/13] Fix an internal error in do_print_to_mapfile seen with
- gold on arm
-
-This is due to missing implementation of do_print_to_mapfile for
-atrributea section (ARM.attributes), it started to show up after fix
-for PR gold/16980 was installed
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Submitted
----
- gold/attributes.h | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/gold/attributes.h b/gold/attributes.h
-index 2aa7a78..3d126e6 100644
---- a/gold/attributes.h
-+++ b/gold/attributes.h
-@@ -387,6 +387,10 @@ class Output_attributes_section_data : public Output_section_data
-   { }
- 
-  protected:
-+  // Write to a map file.
-+  void
-+  do_print_to_mapfile(Mapfile* mapfile) const
-+  { mapfile->print_output_data(this, _("** attributes")); }
-   // Write the data to the output file.
-   void
-   do_write(Output_file*);
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Correct-nios2-_gp-address-computation.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Correct-nios2-_gp-address-computation.patch
new file mode 100644
index 0000000..86eeded
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-Correct-nios2-_gp-address-computation.patch
@@ -0,0 +1,106 @@
+From 27f155fd0ab4ba954366643dbfdc3c7104933794 Mon Sep 17 00:00:00 2001
+From: Sandra Loosemore <sandra@codesourcery.com>
+Date: Sun, 27 Dec 2015 12:30:26 -0800
+Subject: [PATCH 14/14] Correct nios2 _gp address computation.
+
+2015-12-27  Sandra Loosemore  <sandra@codesourcery.com>
+
+	bfd/
+	* elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp
+	address.
+	(nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error
+	messages.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport
+---
+ bfd/elf32-nios2.c | 31 +++++++++++++++++++++----------
+ 1 file changed, 21 insertions(+), 10 deletions(-)
+
+diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c
+index 1c54320..babecf3 100644
+--- a/bfd/elf32-nios2.c
++++ b/bfd/elf32-nios2.c
+@@ -3086,7 +3086,15 @@ lookup:
+ 	case bfd_link_hash_defined:
+ 	case bfd_link_hash_defweak:
+ 	  gp_found = TRUE;
+-	  *pgp = lh->u.def.value;
++	  {
++	    asection *sym_sec = lh->u.def.section;
++	    bfd_vma sym_value = lh->u.def.value;
++
++	    if (sym_sec->output_section)
++	      sym_value = (sym_value + sym_sec->output_offset
++			   + sym_sec->output_section->vma);
++	    *pgp = sym_value;
++	  }
+ 	  break;
+ 	case bfd_link_hash_indirect:
+ 	case bfd_link_hash_warning:
+@@ -3719,7 +3727,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+       struct elf32_nios2_link_hash_entry *eh;
+       bfd_vma relocation;
+       bfd_vma gp;
+-      bfd_vma reloc_address;
+       bfd_reloc_status_type r = bfd_reloc_ok;
+       const char *name = NULL;
+       int r_type;
+@@ -3762,12 +3769,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+       if (bfd_link_relocatable (info))
+ 	continue;
+ 
+-      if (sec && sec->output_section)
+-	reloc_address = (sec->output_section->vma + sec->output_offset
+-			 + rel->r_offset);
+-      else
+-	reloc_address = 0;
+-
+       if (howto)
+ 	{
+ 	  switch (howto->type)
+@@ -3816,6 +3817,15 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 	      /* Turns an absolute address into a gp-relative address.  */
+ 	      if (!nios2_elf_assign_gp (output_bfd, &gp, info))
+ 		{
++		  bfd_vma reloc_address;
++
++		  if (sec && sec->output_section)
++		    reloc_address = (sec->output_section->vma
++				     + sec->output_offset
++				     + rel->r_offset);
++		  else
++		    reloc_address = 0;
++
+ 		  format = _("global pointer relative relocation at address "
+ 			     "0x%08x when _gp not defined\n");
+ 		  sprintf (msgbuf, format, reloc_address);
+@@ -3825,7 +3835,7 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 	      else
+ 		{
+ 		  bfd_vma symbol_address = rel->r_addend + relocation;
+-		  relocation = relocation + rel->r_addend - gp;
++		  relocation = symbol_address - gp;
+ 		  rel->r_addend = 0;
+ 		  if (((signed) relocation < -32768
+ 		       || (signed) relocation > 32767)
+@@ -3833,6 +3843,8 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 			  || h->root.type == bfd_link_hash_defined
+ 			  || h->root.type == bfd_link_hash_defweak))
+ 		    {
++		      if (h)
++			name = h->root.root.string;
+ 		      format = _("Unable to reach %s (at 0x%08x) from the "
+ 				 "global pointer (at 0x%08x) because the "
+ 				 "offset (%d) is out of the allowed range, "
+@@ -3848,7 +3860,6 @@ nios2_elf32_relocate_section (bfd *output_bfd,
+ 						  rel->r_offset, relocation,
+ 						  rel->r_addend);
+ 		}
+-
+ 	      break;
+ 	    case R_NIOS2_UJMP:
+ 	      r = nios2_elf32_do_ujmp_relocate (input_bfd, howto,
+-- 
+2.7.1
+
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch
deleted file mode 100644
index e024302..0000000
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0014-gold-arm-Skip-pic-check-for-R_ARM_REL32.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From ebe26d855452d07e0152bd78d4966475d2de1de8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 5 Mar 2015 07:30:31 +0000
-Subject: [PATCH] gold/arm: Skip pic check for R_ARM_REL32
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gold/arm.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/gold/arm.cc b/gold/arm.cc
-index 6c472bb..fb80435 100644
---- a/gold/arm.cc
-+++ b/gold/arm.cc
-@@ -7829,6 +7829,7 @@ Target_arm<big_endian>::Scan::check_non_pic(Relobj* object,
-     case elfcpp::R_ARM_TLS_DTPMOD32:
-     case elfcpp::R_ARM_TLS_DTPOFF32:
-     case elfcpp::R_ARM_TLS_TPOFF32:
-+    case elfcpp::R_ARM_REL32:
-       return;
- 
-     default:
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch
deleted file mode 100644
index ee49c38..0000000
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/0015-Fix-dynamic-list-so-that-symbols-not-in-the-list-are.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From e9c1bdad269c0c3352eebcc9481ed65144001b0b Mon Sep 17 00:00:00 2001
-From: Cary Coutant <ccoutant@google.com>
-Date: Mon, 16 Feb 2015 22:15:12 -0800
-Subject: [PATCH] Fix --dynamic-list so that symbols not in the list are still
- exported.
-
-In PR 13577, the complaint was that -Bsymbolic was overriding the binding
-behavior for symbols listed in the --dynamic-list by setting the DT_SYMBOLIC
-tag in the dynamic table. In reading the Gnu ld manual, I decided that
---dynamic-list should be mutually exclusive of -Bsymbolic, and modified
-gold so that --dynamic-list would treat symbols listed as preemptible,
-and all other symbols as internally bound. I was wrong.
-
-PR 16992 shows that with --dynamic-list (and not -Bsymbolic), a symbol
-not listed in the dynamic list is being internally bound within the
-shared library, but because it's still in the dynamic symbol table, we
-expose it to a COPY relocation, and things go really bad from there.
-
-(I can reproduce the same failure, simply by turning on -Bsymbolic-functions
-with the Gnu linker. Even though the symbol is bound internally, it's
-still exported to the dynamic symbol table, and is exposed to a COPY
-relocation.)
-
-I've backed out part of the fix for PR 13577, and -Bsymbolic (or
--Bsymbolic-functions) can now be used with --dynamic-list, but if the
-two are used together, we do not set DT_SYMBOLIC or DF_SYMBOLIC
-(this matches Gnu ld behavior). We now treat symbols listed in the
-dynamic list as premptible, but we do not automatically treat symbols
-not listed there as non-premptible.
-
-gold/
-	PR gold/13577
-	PR gold/16992
-	* layout.cc (Layout::finish_dynamic_section): Don't set DT_SYMBOLIC or
-	DF_SYMBOLIC if --dynamic-list option is used.
-	* options.cc (General_options::finalize): --dynamic-list is not
-	mutually exclusive with -Bsymbolic.
-	* symtab.h (Symbol::is_preemptible): Don't exclude dynamic symbols not
-	listed in --dynamic-list.
-	* testsuite/Makefile.am (dynamic_list_lib2.so): Add
-	-Bsymbolic-functions.
-	* testsuite/Makefile.in: Regenerate.
----
-Upstream-Status: Backport
-
- gold/ChangeLog             | 14 ++++++++++++++
- gold/layout.cc             |  3 ++-
- gold/options.cc            |  7 -------
- gold/symtab.h              |  6 ++----
- gold/testsuite/Makefile.am |  2 +-
- gold/testsuite/Makefile.in |  2 +-
- 6 files changed, 20 insertions(+), 14 deletions(-)
-
-diff --git a/gold/layout.cc b/gold/layout.cc
-index bcdaac8..7836640 100644
---- a/gold/layout.cc
-+++ b/gold/layout.cc
-@@ -4873,7 +4873,8 @@ Layout::finish_dynamic_section(const Input_objects* input_objects,
-     flags |= elfcpp::DF_STATIC_TLS;
-   if (parameters->options().origin())
-     flags |= elfcpp::DF_ORIGIN;
--  if (parameters->options().Bsymbolic())
-+  if (parameters->options().Bsymbolic()
-+      && !parameters->options().have_dynamic_list())
-     {
-       flags |= elfcpp::DF_SYMBOLIC;
-       // Add DT_SYMBOLIC for compatibility with older loaders.
-diff --git a/gold/options.cc b/gold/options.cc
-index 7eb8f27..7f1f69e 100644
---- a/gold/options.cc
-+++ b/gold/options.cc
-@@ -1200,13 +1200,6 @@ General_options::finalize()
-   // in the path, as appropriate.
-   this->add_sysroot();
- 
--  // --dynamic-list overrides -Bsymbolic and -Bsymbolic-functions.
--  if (this->have_dynamic_list())
--    {
--      this->set_Bsymbolic(false);
--      this->set_Bsymbolic_functions(false);
--    }
--
-   // Now that we've normalized the options, check for contradictory ones.
-   if (this->shared() && this->is_static())
-     gold_fatal(_("-shared and -static are incompatible"));
-diff --git a/gold/symtab.h b/gold/symtab.h
-index aa0cb68..9413360 100644
---- a/gold/symtab.h
-+++ b/gold/symtab.h
-@@ -604,10 +604,8 @@ class Symbol
-     if (parameters->options().in_dynamic_list(this->name()))
-       return true;
- 
--    // If the user used -Bsymbolic or provided a --dynamic-list script,
--    // then nothing (else) is preemptible.
--    if (parameters->options().Bsymbolic()
--        || parameters->options().have_dynamic_list())
-+    // If the user used -Bsymbolic, then nothing (else) is preemptible.
-+    if (parameters->options().Bsymbolic())
-       return false;
- 
-     // If the user used -Bsymbolic-functions, then functions are not
-diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
-index f767c21..7b73f9d 100644
---- a/gold/testsuite/Makefile.am
-+++ b/gold/testsuite/Makefile.am
-@@ -1518,7 +1518,7 @@ dynamic_list_lib1.o: dynamic_list_lib1.cc
- 	$(CXXCOMPILE) -c -fpic -o $@ $<
- 
- dynamic_list_lib2.so: gcctestdir/ld dynamic_list_lib2.o $(srcdir)/dynamic_list_2.t
--	$(CXXLINK) -Bgcctestdir/ -shared -Wl,--dynamic-list,$(srcdir)/dynamic_list_2.t dynamic_list_lib2.o
-+	$(CXXLINK) -Bgcctestdir/ -shared -Wl,-Bsymbolic-functions -Wl,--dynamic-list,$(srcdir)/dynamic_list_2.t dynamic_list_lib2.o
- dynamic_list_lib2.o: dynamic_list_lib2.cc
- 	$(CXXCOMPILE) -c -fpic -o $@ $<
- 
-diff --git a/gold/testsuite/Makefile.in b/gold/testsuite/Makefile.in
-index 217e472..b4ae3fd 100644
---- a/gold/testsuite/Makefile.in
-+++ b/gold/testsuite/Makefile.in
-@@ -5319,7 +5319,7 @@ uninstall-am:
- @GCC_TRUE@@NATIVE_LINKER_TRUE@	$(CXXCOMPILE) -c -fpic -o $@ $<
- 
- @GCC_TRUE@@NATIVE_LINKER_TRUE@dynamic_list_lib2.so: gcctestdir/ld dynamic_list_lib2.o $(srcdir)/dynamic_list_2.t
--@GCC_TRUE@@NATIVE_LINKER_TRUE@	$(CXXLINK) -Bgcctestdir/ -shared -Wl,--dynamic-list,$(srcdir)/dynamic_list_2.t dynamic_list_lib2.o
-+@GCC_TRUE@@NATIVE_LINKER_TRUE@	$(CXXLINK) -Bgcctestdir/ -shared -Wl,-Bsymbolic-functions -Wl,--dynamic-list,$(srcdir)/dynamic_list_2.t dynamic_list_lib2.o
- @GCC_TRUE@@NATIVE_LINKER_TRUE@dynamic_list_lib2.o: dynamic_list_lib2.cc
- @GCC_TRUE@@NATIVE_LINKER_TRUE@	$(CXXCOMPILE) -c -fpic -o $@ $<
- 
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/add-thunderx-support-for-gas.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/add-thunderx-support-for-gas.patch
deleted file mode 100644
index 0f6875e..0000000
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/add-thunderx-support-for-gas.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-Add thunderx support to gas
-
-Upstream-Status: Submitted [https://sourceware.org/ml/binutils/2014-10/msg00170.html]
-
-Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
-
-Author: Andrew Pinski <apinski@cavium.com>
-Date: Mon, 20 Oct 2014 11:42:58 -0700
-
-    This patch adds -mcpu=thunderx support to gas.
-
-diff -Naurp git_org/gas/config/tc-aarch64.c git/gas/config/tc-aarch64.c
---- git_org/gas/config/tc-aarch64.c	2015-09-07 02:13:51.988973523 -0700
-+++ git/gas/config/tc-aarch64.c	2015-09-07 02:15:21.705981540 -0700
-@@ -7206,6 +7206,7 @@ static const struct aarch64_cpu_option_t
- 				 AARCH64_FEATURE_CRC), "Cortex-A57"},
-   {"cortex-a72", AARCH64_FEATURE (AARCH64_ARCH_V8,
- 				  AARCH64_FEATURE_CRC), "Cortex-A72"},
-+  {"thunderx",		AARCH64_ARCH_V8, "Cavium ThunderX"},				  
-   {"exynos-m1", AARCH64_FEATURE (AARCH64_ARCH_V8,
- 				 AARCH64_FEATURE_CRC | AARCH64_FEATURE_CRYPTO),
- 				 "Samsung Exynos M1"},
-diff -Naurp git_org/gas/doc/c-aarch64.texi git/gas/doc/c-aarch64.texi
---- git_org/gas/doc/c-aarch64.texi	2015-09-07 02:13:51.969973522 -0700
-+++ git/gas/doc/c-aarch64.texi	2015-09-07 02:16:03.364985262 -0700
-@@ -58,6 +58,7 @@ on the target processor.  The following
- @code{cortex-a53},
- @code{cortex-a57},
- @code{cortex-a72},
-+@code{thunderx},
- @code{exynos-m1},
- @code{xgene1},
- and
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils/binutils-octeon3.patch b/yocto-poky/meta/recipes-devtools/binutils/binutils/binutils-octeon3.patch
deleted file mode 100644
index 4e8c69f..0000000
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils/binutils-octeon3.patch
+++ /dev/null
@@ -1,272 +0,0 @@
-Upstream-Status: Backport
-
-https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=2c62985659da21a3fe16062d211a7158f79ad2e9
-
-Signed-off-By: Armin Kuster <akuster@mvista.com>
-
-Index: git/bfd/archures.c
-===================================================================
---- git.orig/bfd/archures.c
-+++ git/bfd/archures.c
-@@ -179,6 +179,7 @@ DESCRIPTION
- .#define bfd_mach_mips_octeon		6501
- .#define bfd_mach_mips_octeonp		6601
- .#define bfd_mach_mips_octeon2		6502
-+.#define bfd_mach_mips_octeon3		6503
- .#define bfd_mach_mips_xlr              887682   {* decimal 'XLR'  *}
- .#define bfd_mach_mips_xlp              887680   {* decimal 'XLP'  *}
- .#define bfd_mach_mipsisa32             32
-Index: git/bfd/bfd-in2.h
-===================================================================
---- git.orig/bfd/bfd-in2.h
-+++ git/bfd/bfd-in2.h
-@@ -1969,6 +1969,7 @@ enum bfd_architecture
- #define bfd_mach_mips_octeon           6501
- #define bfd_mach_mips_octeonp          6601
- #define bfd_mach_mips_octeon2          6502
-+#define bfd_mach_mips_octeon3          6503
- #define bfd_mach_mips_xlr              887682   /* decimal 'XLR'  */
- #define bfd_mach_mips_xlp              887680   /* decimal 'XLP'  */
- #define bfd_mach_mipsisa32             32
-Index: git/bfd/cpu-mips.c
-===================================================================
---- git.orig/bfd/cpu-mips.c
-+++ git/bfd/cpu-mips.c
-@@ -102,6 +102,7 @@ enum
-   I_mipsocteon,
-   I_mipsocteonp,
-   I_mipsocteon2,
-+  I_mipsocteon3,
-   I_xlr,
-   I_micromips,
-   I_xlp
-@@ -153,6 +154,7 @@ static const bfd_arch_info_type arch_inf
-   N (64, 64, bfd_mach_mips_octeon,"mips:octeon",  FALSE, NN(I_mipsocteon)),
-   N (64, 64, bfd_mach_mips_octeonp,"mips:octeon+",  FALSE, NN(I_mipsocteonp)),
-   N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2",  FALSE, NN(I_mipsocteon2)),
-+  N (64, 64, bfd_mach_mips_octeon3,"mips:octeon3",  FALSE, NN(I_mipsocteon3)),
-   N (64, 64, bfd_mach_mips_xlr, "mips:xlr",       FALSE, NN(I_xlr)),
-   N (64, 64, bfd_mach_mips_micromips,"mips:micromips",FALSE,NN(I_micromips)),
-   N (64, 64, bfd_mach_mips_xlp, "mips:xlp",      FALSE, 0)
-Index: git/bfd/elfxx-mips.c
-===================================================================
---- git.orig/bfd/elfxx-mips.c
-+++ git/bfd/elfxx-mips.c
-@@ -6604,6 +6604,9 @@ _bfd_elf_mips_mach (flagword flags)
-     case E_MIPS_MACH_LS3A:
-       return bfd_mach_mips_loongson_3a;
- 
-+    case E_MIPS_MACH_OCTEON3:
-+      return bfd_mach_mips_octeon3;
-+
-     case E_MIPS_MACH_OCTEON2:
-       return bfd_mach_mips_octeon2;
- 
-@@ -11878,6 +11881,10 @@ mips_set_isa_flags (bfd *abfd)
-       val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON;
-       break;
- 
-+    case bfd_mach_mips_octeon3:
-+      val = E_MIPS_ARCH_64R2 | E_MIPS_MACH_OCTEON3;
-+      break;
-+
-     case bfd_mach_mips_xlr:
-       val = E_MIPS_ARCH_64 | E_MIPS_MACH_XLR;
-       break;
-@@ -14773,6 +14780,7 @@ struct mips_mach_extension
- static const struct mips_mach_extension mips_mach_extensions[] =
- {
-   /* MIPS64r2 extensions.  */
-+  { bfd_mach_mips_octeon3, bfd_mach_mips_octeon2 },
-   { bfd_mach_mips_octeon2, bfd_mach_mips_octeonp },
-   { bfd_mach_mips_octeonp, bfd_mach_mips_octeon },
-   { bfd_mach_mips_octeon, bfd_mach_mipsisa64r2 },
-Index: git/gas/config/tc-mips.c
-===================================================================
---- git.orig/gas/config/tc-mips.c
-+++ git/gas/config/tc-mips.c
-@@ -306,7 +306,7 @@ static unsigned int file_ase_explicit;
- unsigned long mips_gprmask;
- unsigned long mips_cprmask[4];
- 
--/* True if any MIPS16 code was produced.  */
-+/* 2True if any MIPS16 code was produced.  */
- static int file_ase_mips16;
- 
- #define ISA_SUPPORTS_MIPS16E (mips_opts.isa == ISA_MIPS32		\
-@@ -510,7 +510,8 @@ static int mips_32bitmode = 0;
- #define CPU_HAS_ROR(CPU)	CPU_HAS_DROR (CPU)
- 
- /* True if CPU is in the Octeon family */
--#define CPU_IS_OCTEON(CPU) ((CPU) == CPU_OCTEON || (CPU) == CPU_OCTEONP || (CPU) == CPU_OCTEON2)
-+#define CPU_IS_OCTEON(CPU) ((CPU) == CPU_OCTEON || (CPU) == CPU_OCTEONP \
-+                           || (CPU) == CPU_OCTEON2 || (CPU) == CPU_OCTEON3)
- 
- /* True if CPU has seq/sne and seqi/snei instructions.  */
- #define CPU_HAS_SEQ(CPU)	(CPU_IS_OCTEON (CPU))
-@@ -18677,6 +18678,7 @@ static const struct mips_cpu_info mips_c
-   { "octeon",	      0, 0,			ISA_MIPS64R2, CPU_OCTEON },
-   { "octeon+",	      0, 0,			ISA_MIPS64R2, CPU_OCTEONP },
-   { "octeon2",	      0, 0,			ISA_MIPS64R2, CPU_OCTEON2 },
-+  { "octeon3",        0, ASE_VIRT | ASE_VIRT64, ISA_MIPS64R2, CPU_OCTEON3 },
- 
-   /* RMI Xlr */
-   { "xlr",	      0, 0,			ISA_MIPS64,   CPU_XLR },
-Index: git/gas/doc/c-mips.texi
-===================================================================
---- git.orig/gas/doc/c-mips.texi
-+++ git/gas/doc/c-mips.texi
-@@ -382,6 +382,7 @@ loongson3a,
- octeon,
- octeon+,
- octeon2,
-+octeon3,
- xlr,
- xlp
- @end quotation
-Index: git/gas/testsuite/gas/mips/mips.exp
-===================================================================
---- git.orig/gas/testsuite/gas/mips/mips.exp
-+++ git/gas/testsuite/gas/mips/mips.exp
-@@ -1102,6 +1102,7 @@ if { [istarget mips*-*-vxworks*] } {
-     run_list_test_arches "octeon-ill"	[mips_arch_list_matching octeon]
-     run_dump_test_arches "octeon-pref"	[mips_arch_list_matching octeon]
-     run_dump_test_arches "octeon2"	[mips_arch_list_matching octeon2]
-+    run_dump_test_arches "octeon3"	[mips_arch_list_matching octeon3]
- 
-     run_dump_test "smartmips"
-     run_dump_test_arches "mips32-dsp"	[mips_arch_list_matching mips32r2 \
-Index: git/gas/testsuite/gas/mips/octeon3.d
-===================================================================
---- /dev/null
-+++ git/gas/testsuite/gas/mips/octeon3.d
-@@ -0,0 +1,20 @@
-+#objdump: -d -r --show-raw-insn
-+#name: MIPS octeon3 instructions
-+
-+.*: +file format .*mips.*
-+
-+Disassembly of section .text:
-+
-+[0-9a-f]+ <foo>:
-+.*:    71ec0008        mtm0    t3,t0
-+.*:    71a40008        mtm0    t1,a0
-+.*:    7083000c        mtm1    a0,v1
-+.*:    70e1000c        mtm1    a3,at
-+.*:    7022000d        mtm2    at,v0
-+.*:    7083000c        mtm1    a0,v1
-+.*:    70a20009        mtp0    a1,v0
-+.*:    70c40009        mtp0    a2,a0
-+.*:    7083000a        mtp1    a0,v1
-+.*:    70e1000a        mtp1    a3,at
-+.*:    7022000b        mtp2    at,v0
-+.*:    7083000a        mtp1    a0,v1
-Index: git/gas/testsuite/gas/mips/octeon3.s
-===================================================================
---- /dev/null
-+++ git/gas/testsuite/gas/mips/octeon3.s
-@@ -0,0 +1,22 @@
-++       .text
-+       .set noreorder
-+       .set noat
-+
-+foo:
-+        mtm0 $15,$12
-+        mtm0 $13,$4
-+
-+        mtm1 $4,$3
-+        mtm1 $7,$1
-+
-+        mtm2 $1,$2
-+        mtm1 $4,$3
-+
-+        mtp0 $5,$2
-+        mtp0 $6,$4
-+
-+        mtp1 $4,$3
-+        mtp1 $7,$1
-+
-+        mtp2 $1,$2
-+        mtp1 $4,$3
-Index: git/include/opcode/mips.h
-===================================================================
---- git.orig/include/opcode/mips.h
-+++ git/include/opcode/mips.h
-@@ -1196,6 +1196,7 @@ static const unsigned int mips_isa_table
- #define INSN_OCTEON		  0x00000800
- #define INSN_OCTEONP		  0x00000200
- #define INSN_OCTEON2		  0x00000100
-+#define INSN_OCTEON3		  0x00000040
- 
- /* MIPS R5900 instruction */
- #define INSN_5900                 0x00004000
-@@ -1325,6 +1326,7 @@ static const unsigned int mips_isa_table
- #define CPU_OCTEON	6501
- #define CPU_OCTEONP	6601
- #define CPU_OCTEON2	6502
-+#define CPU_OCTEON3	6503
- #define CPU_XLR     	887682   	/* decimal 'XLR'   */
- #define CPU_XLP         887680      /* decimal 'XLP'   */
- 
-@@ -1391,6 +1393,9 @@ cpu_is_member (int cpu, unsigned int mas
-     case CPU_OCTEON2:
-       return (mask & INSN_OCTEON2) != 0;
- 
-+    case CPU_OCTEON3:
-+      return (mask & INSN_OCTEON3) != 0;
-+
-     case CPU_XLR:
-       return (mask & INSN_XLR) != 0;
- 
-Index: git/opcodes/mips-dis.c
-===================================================================
---- git.orig/opcodes/mips-dis.c
-+++ git/opcodes/mips-dis.c
-@@ -649,6 +649,11 @@ const struct mips_arch_choice mips_arch_
-     ISA_MIPS64R2 | INSN_OCTEON2, 0, mips_cp0_names_numeric,
-     NULL, 0, mips_cp1_names_mips3264, mips_hwr_names_numeric },
- 
-+  { "octeon3",   1, bfd_mach_mips_octeon3, CPU_OCTEON3,
-+    ISA_MIPS64R2 | INSN_OCTEON3, ASE_VIRT | ASE_VIRT64,
-+    mips_cp0_names_numeric,
-+    NULL, 0, mips_cp1_names_mips3264, mips_hwr_names_numeric },
-+
-   { "xlr", 1, bfd_mach_mips_xlr, CPU_XLR,
-     ISA_MIPS64 | INSN_XLR, 0,
-     mips_cp0_names_xlr,
-Index: git/opcodes/mips-opc.c
-===================================================================
---- git.orig/opcodes/mips-opc.c
-+++ git/opcodes/mips-opc.c
-@@ -316,9 +316,10 @@ decode_mips_operand (const char *p)
- #define N5	(INSN_5400 | INSN_5500)
- #define N54	INSN_5400
- #define N55	INSN_5500
--#define IOCT	(INSN_OCTEON | INSN_OCTEONP | INSN_OCTEON2)
--#define IOCTP	(INSN_OCTEONP | INSN_OCTEON2)
--#define IOCT2	INSN_OCTEON2
-+#define IOCT	(INSN_OCTEON | INSN_OCTEONP | INSN_OCTEON2 | INSN_OCTEON3)
-+#define IOCTP	(INSN_OCTEONP | INSN_OCTEON2 | INSN_OCTEON3)
-+#define IOCT2	(INSN_OCTEON2 | INSN_OCTEON3)
-+#define IOCT3  INSN_OCTEON3
- #define XLR	INSN_XLR
- #define XLP	INSN_XLP
- #define IVIRT	ASE_VIRT
-@@ -1505,11 +1506,17 @@ const struct mips_opcode mips_builtin_op
- {"mtlhx",		"s",		0x00000053, 0xfc1fffff,	RD_1|MOD_HILO,		0,		0,		SMT,	0 },
- {"mtcr",		"t,s",		0x70000019, 0xfc00ffff, RD_1,			0,		XLR|XLP,	0,	0 },
- {"mtm0",		"s",		0x70000008, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
-+{"mtm0",                "s,t",          0x70000008, 0xfc00ffff, RD_1|RD_2,              0,              IOCT3,          0,      0 },
- {"mtm1",		"s",		0x7000000c, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
-+{"mtm1",                "s,t",          0x7000000c, 0xfc00ffff, RD_1|RD_2,              0,              IOCT3,          0,      0 },
- {"mtm2",		"s",		0x7000000d, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
-+{"mtm2",                "s,t",          0x7000000d, 0xfc00ffff, RD_1|RD_2,              0,              IOCT3,          0,      0 },
- {"mtp0",		"s",		0x70000009, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
-+{"mtp0",                "s,t",          0x70000009, 0xfc00ffff, RD_1|RD_2,              0,              IOCT3,          0,      0 },
- {"mtp1",		"s",		0x7000000a, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
-+{"mtp1",                "s,t",          0x7000000a, 0xfc00ffff, RD_1|RD_2,              0,              IOCT3,          0,      0 },
- {"mtp2",		"s",		0x7000000b, 0xfc1fffff, RD_1,			0,		IOCT,		0,	0 },
-+{"mtp2",                "s,t",          0x7000000b, 0xfc00ffff, RD_1|RD_2,              0,              IOCT3,          0,      0 },
- {"mtsa",		"s",		0x00000029, 0xfc1fffff,	RD_1,			0,		EE,		0,	0 },
- {"mtsab",		"s,j",		0x04180000, 0xfc1f0000,	RD_1,			0,		EE,		0,	0 },
- {"mtsah",		"s,j",		0x04190000, 0xfc1f0000,	RD_1,			0,		EE,		0,	0 },
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils_2.25.1.bb b/yocto-poky/meta/recipes-devtools/binutils/binutils_2.25.1.bb
deleted file mode 100644
index 6f42671..0000000
--- a/yocto-poky/meta/recipes-devtools/binutils/binutils_2.25.1.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-require binutils.inc
-require binutils-${PV}.inc
-
-DEPENDS += "flex bison zlib"
-
-EXTRA_OECONF += "--with-sysroot=/ \
-                --enable-install-libbfd \
-                --enable-install-libiberty \
-                --enable-shared \
-                "
-
-EXTRA_OECONF_class-native = "--enable-targets=all \
-                             --enable-64-bit-bfd \
-                             --enable-install-libiberty \
-                             --enable-install-libbfd"
-
-do_install_class-native () {
-	autotools_do_install
-
-	# Install the libiberty header
-	install -d ${D}${includedir}
-	install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
-	install -m 644 ${S}/include/libiberty.h ${D}${includedir}
-
-	# We only want libiberty, libbfd and libopcodes
-	rm -rf ${D}${bindir}
-	rm -rf ${D}${prefix}/${TARGET_SYS}
-	rm -rf ${D}${prefix}/lib/ldscripts
-	rm -rf ${D}${prefix}/share/info
-	rm -rf ${D}${prefix}/share/locale
-	rm -rf ${D}${prefix}/share/man
-	rmdir ${D}${prefix}/share || :
-	rmdir ${D}/${libdir}/gcc-lib || :
-	rmdir ${D}/${libdir}64/gcc-lib || :
-	rmdir ${D}/${libdir} || :
-	rmdir ${D}/${libdir}64 || :
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/binutils/binutils_2.26.bb b/yocto-poky/meta/recipes-devtools/binutils/binutils_2.26.bb
new file mode 100644
index 0000000..b70ffbf
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/binutils/binutils_2.26.bb
@@ -0,0 +1,40 @@
+require binutils.inc
+require binutils-${PV}.inc
+
+DEPENDS += "flex bison zlib"
+
+EXTRA_OECONF += "--with-sysroot=/ \
+                --enable-install-libbfd \
+                --enable-install-libiberty \
+                --enable-shared \
+                --with-system-zlib \
+                "
+
+EXTRA_OECONF_class-native = "--enable-targets=all \
+                             --enable-64-bit-bfd \
+                             --enable-install-libiberty \
+                             --enable-install-libbfd"
+
+do_install_class-native () {
+	autotools_do_install
+
+	# Install the libiberty header
+	install -d ${D}${includedir}
+	install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
+	install -m 644 ${S}/include/libiberty.h ${D}${includedir}
+
+	# We only want libiberty, libbfd and libopcodes
+	rm -rf ${D}${bindir}
+	rm -rf ${D}${prefix}/${TARGET_SYS}
+	rm -rf ${D}${prefix}/lib/ldscripts
+	rm -rf ${D}${prefix}/share/info
+	rm -rf ${D}${prefix}/share/locale
+	rm -rf ${D}${prefix}/share/man
+	rmdir ${D}${prefix}/share || :
+	rmdir ${D}/${libdir}/gcc-lib || :
+	rmdir ${D}/${libdir}64/gcc-lib || :
+	rmdir ${D}/${libdir} || :
+	rmdir ${D}/${libdir}64 || :
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/bison/bison/add-with-bisonlocaledir.patch b/yocto-poky/meta/recipes-devtools/bison/bison/add-with-bisonlocaledir.patch
new file mode 100644
index 0000000..35c0f6f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/bison/bison/add-with-bisonlocaledir.patch
@@ -0,0 +1,58 @@
+From 41fdca818cdc7bd686c31aff4088b89280d71a42 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 17 Feb 2016 22:01:28 -0500
+Subject: [PATCH] m4/bison-i18n.m4: add --with-bisonlocaledir to assign
+ BISON_LOCALEDIR
+
+The variable BISON_LOCALEDIR is assigned only by the output of
+'bison --print-localedir', we add option --with-bisonlocaledir
+to assign it explicitly. It is helpful for user to split the
+native compile and cross compile.
+
+For backward compatibility, if option not used, it still
+make use of the output of 'bison --print-localedir'.
+
+Upstream-Status: Submitted [bison-patches@gnu.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ m4/bison-i18n.m4 | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/m4/bison-i18n.m4 b/m4/bison-i18n.m4
+index 8e57caf..c36f498 100644
+--- a/m4/bison-i18n.m4
++++ b/m4/bison-i18n.m4
+@@ -16,11 +16,16 @@ dnl sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files
+ dnl and defines YYENABLE_NLS if there are bison-runtime.mo files at all.
+ AC_DEFUN([BISON_I18N],
+ [
++  dnl Default is not to set bisonlocaledir
++  AC_ARG_WITH([bisonlocaledir],
++    [  --with-bisonlocaledir   sets BISON_LOCALEDIR to indicate where to find the bison-runtime.mo files],
++    BISON_LOCALEDIR=$withval,
++    BISON_LOCALEDIR=)
++
+   if test -z "$USE_NLS"; then
+     echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." 1>&2
+     exit 1
+   fi
+-  BISON_LOCALEDIR=
+   BISON_USE_NLS=no
+   if test "$USE_NLS" = yes; then
+     dnl Determine bison's localedir.
+@@ -28,9 +33,10 @@ AC_DEFUN([BISON_I18N],
+     dnl But even is YACC is called "yacc", it may be a script that invokes bison
+     dnl and accepts the --print-localedir option.
+     dnl YACC's default value is empty; BISON's default value is :.
+-    if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then
++    if test -z "$BISON_LOCALEDIR" -a ${YACC-${BISON-:}} --print-localedir >/dev/null 2>&1; then
+       BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir`
+     fi
++    AC_MSG_RESULT([$BISON_LOCALEDIR])
+     AC_SUBST([BISON_LOCALEDIR])
+     if test -n "$BISON_LOCALEDIR"; then
+       dnl There is no need to enable internationalization if the user doesn't
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb b/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
index 708e9a3..cffcd88 100644
--- a/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
+++ b/yocto-poky/meta/recipes-devtools/bison/bison_3.0.4.bb
@@ -14,6 +14,7 @@
            file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
            file://dont-depend-on-help2man.patch.patch \
            file://0001-src-local.mk-fix-parallel-issue.patch \
+           file://add-with-bisonlocaledir.patch \
 "
 
 # No point in hardcoding path to m4, just use PATH
diff --git a/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.7.bb b/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.7.bb
deleted file mode 100644
index 4b0a980..0000000
--- a/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.7.bb
+++ /dev/null
@@ -1,154 +0,0 @@
-# Copyright (c) 2013 LG Electronics, Inc.
-# Copyright (C) 2014 Intel Corp.
-
-# This recipe creates packages for the bootchart2 system-wide profiler daemon 
-# and related utilities. Depending on the images you're building, additional
-# configuration may be needed in order to use it.
-#
-# Packages:
-#   *   bootchart2 - The daemon itself.
-#   *   pybootchartgui - Python program to visualize and display the data
-#       collected by bootchart2 or compatible daemons such as the original 
-#       bootchart.
-#   *   bootchartd-stop-initscript - A SysV init script to stop data collection
-#       when booting completes (see below for details.)
-#
-# While bootchart2 is designed to stop collecting data roughly when the boot 
-# process completes, it is not exactly a stopwatch. It has a list of programs 
-# which are supposed signify that the boot process has completed (for example,
-# openbox or gnome-shell,) but it waits a full 20 seconds after such a program
-# is launched before stopping itself, to collect additional data.
-#
-# If you are using a window manager or GUI which isn't included in bootchart2's
-# default configuration file, you should write bbappend file to amend
-# bootchartd.conf and add it to EXIT_PROC. An example of this is shown in this
-# recipe, where the Matchbox window manager (used by Sato) is added.
-#
-# If you want data collection to end at a certain point exactly, you should
-# arrange for the following command to be run:
-#   bootchartd stop
-# You might set this command to be launched by the desktop environment shipped
-# on the image you're building after the other startup programs are complete.
-# This will not incur the 20 second wait period and will cause bootchart2 to
-# behave a bit more like a stopwatch. An example of this is shown in this 
-# recipe, specifically the bootchartd-stop-initscript package, which stops data
-# collection as the last action when switching to runlevels 2 through 5. You can
-# add bootchartd-stop-initscript to IMAGE_INSTALL if you need to use it.
-#
-# Unless you're doing something special, if your image does not launch an X 
-# window manager, you will need to add bootchartd-stop-initscript to your image.
-#
-# Bootchart2 can be started in two ways. Data collection can be initiated by
-# running the following command:
-#   bootchartd start
-# However, for the most complete data, the bootchart2 developers recommend
-# running it as PID 1. This can be done by adding the following to the kernel 
-# command line parameters in the bootloader setup:
-#   init=/sbin/bootchartd
-# When invoked this way, bootchart2 will set itself up and then automatically 
-# run /sbin/init. For example, when booting the default qemux86 image, one might
-# use a command like this:
-#   runqemu qemux86 bootparams="initcall_debug printk.time=y quiet \
-#                               init=/sbin/bootchartd"
-#
-# Neither method is actually implemented here, choose what works for you.
-#
-# If you are building your image with systemd instead of SysV init, bootchart2
-# includes systemd service files to begin collection automatically at boot and 
-# end collection automatically 20 seconds after the boot process has completed.
-# However, be aware that systemd tends to start bootchart2 relatively late into
-# the boot process, so it's highly recommended to use bootchart2 as PID 1. If 
-# you're using systemd and you wish to use another method to stop data
-# collection at a time of your choosing, you may do so as long as you get to it
-# before the 20 second timeout of the systemd service files. Also, you may write
-# a bbappend to patch bootchart2-done.timer.in to increase or decrease the
-# timeout. Decreasing it to 0 will make it behave like
-# bootchartd-stop-initscript.
-#
-# By default, when data collection is stopped, a file named bootchart.tgz will
-# be created in /var/log. If pybootchartgui is included in your image,
-# bootchart.png will also be created at the same time. However, this results in
-# a noticeable hitch or pause at boot time, which may not be what you want on an
-# embedded device. So you may prefer to omit pybootchartgui from your image. In
-# that case, copy bootchart.tgz over to your development system and generate
-# bootchart.png there. To get pybootchartgui on your development system, you can
-# either install it directly from some other source, or build bootchart2-native
-# and find pybootchartgui in the native sysroot:
-#    bitbake bootchart2-native
-#   ./tmp/sysroots/x86_64-linux/usr/bin/pybootchartgui /path/to/bootchart.tgz
-# Note that, whether installed on your build system or on your image, the 
-# pybootchartgui provided by this recipe does not support the -i option. You 
-# will need to install pybootchartgui by other means in order to run it in
-# interactive mode.
-
-SUMMARY = "Booting sequence and CPU,I/O usage monitor"
-DESCRIPTION = "Monitors where the system spends its time at start, creating a graph of all processes, disk utilization, and wait time."
-AUTHOR = "Wonhong Kwon <wonhong.kwon@lge.com>"
-HOMEPAGE = "https://github.com/mmeeks/bootchart"
-LICENSE = "GPL-3.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=44ac4678311254db62edf8fd39cb8124"
-
-SRC_URI = "git://github.com/mmeeks/bootchart.git \
-           file://bootchartd_stop.sh \
-          "
-
-S = "${WORKDIR}/git"
-SRCREV = "6f050b65ae9f266645f04f0aecab9efb88375f1c"
-
-inherit systemd
-inherit update-rc.d
-inherit pythonnative
-
-# The only reason to build bootchart2-native is for a native pybootchartgui.
-BBCLASSEXTEND = "native"
-
-SYSTEMD_SERVICE_${PN} = "bootchart2.service bootchart2-done.service bootchart2-done.timer"
-
-UPDATERCPN = "bootchartd-stop-initscript"
-INITSCRIPT_NAME = "bootchartd_stop.sh"
-INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
-
-# We want native pybootchartgui to execute with the correct Python interpeter.
-do_compile_append_class-native () {
-    echo "#! ${PYTHON}" | cat - ${S}/pybootchartgui.py > ${WORKDIR}/temp_pybootchartgui
-    mv ${WORKDIR}/temp_pybootchartgui ${S}/pybootchartgui.py
-    chmod +x ${S}/pybootchartgui
-}
-
-do_compile_prepend () {
-    export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
-    export BINDIR="${bindir}"
-    export LIBDIR="${base_libdir}"
-}
-
-do_install () {
-    install -d ${D}${sysconfdir} # needed for -native
-    export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
-    export BINDIR="${bindir}"
-    export DESTDIR="${D}"
-    export LIBDIR="${base_libdir}"
-
-    oe_runmake install
-    install -d ${D}${sysconfdir}/init.d
-    install -m 0755 ${WORKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d
-
-    echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf
-}
-
-PACKAGES =+ "pybootchartgui"
-FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui"
-RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image python-textutils python-shell python-compression python-codecs"
-RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
-RDEPENDS_${PN}_class-target += "lsb"
-DEPENDS_append_class-native = " python-pycairo-native"
-
-PACKAGES =+ "bootchartd-stop-initscript"
-FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d"
-
-FILES_${PN} += "${base_libdir}/bootchart/bootchart-collector"
-FILES_${PN} += "${base_libdir}/bootchart/tmpfs"
-FILES_${PN} += "${libdir}"
-FILES_${PN}-dbg += "${base_libdir}/bootchart/.debug"
-FILES_${PN}-doc += "${datadir}/docs"
-
-RCONFLICTS_${PN} = "bootchart"
diff --git a/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb b/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
new file mode 100644
index 0000000..86c614a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/bootchart2/bootchart2_0.14.8.bb
@@ -0,0 +1,155 @@
+# Copyright (c) 2013 LG Electronics, Inc.
+# Copyright (C) 2014 Intel Corp.
+
+# This recipe creates packages for the bootchart2 system-wide profiler daemon 
+# and related utilities. Depending on the images you're building, additional
+# configuration may be needed in order to use it.
+#
+# Packages:
+#   *   bootchart2 - The daemon itself.
+#   *   pybootchartgui - Python program to visualize and display the data
+#       collected by bootchart2 or compatible daemons such as the original 
+#       bootchart.
+#   *   bootchartd-stop-initscript - A SysV init script to stop data collection
+#       when booting completes (see below for details.)
+#
+# While bootchart2 is designed to stop collecting data roughly when the boot 
+# process completes, it is not exactly a stopwatch. It has a list of programs 
+# which are supposed signify that the boot process has completed (for example,
+# openbox or gnome-shell,) but it waits a full 20 seconds after such a program
+# is launched before stopping itself, to collect additional data.
+#
+# If you are using a window manager or GUI which isn't included in bootchart2's
+# default configuration file, you should write bbappend file to amend
+# bootchartd.conf and add it to EXIT_PROC. An example of this is shown in this
+# recipe, where the Matchbox window manager (used by Sato) is added.
+#
+# If you want data collection to end at a certain point exactly, you should
+# arrange for the following command to be run:
+#   bootchartd stop
+# You might set this command to be launched by the desktop environment shipped
+# on the image you're building after the other startup programs are complete.
+# This will not incur the 20 second wait period and will cause bootchart2 to
+# behave a bit more like a stopwatch. An example of this is shown in this 
+# recipe, specifically the bootchartd-stop-initscript package, which stops data
+# collection as the last action when switching to runlevels 2 through 5. You can
+# add bootchartd-stop-initscript to IMAGE_INSTALL if you need to use it.
+#
+# Unless you're doing something special, if your image does not launch an X 
+# window manager, you will need to add bootchartd-stop-initscript to your image.
+#
+# Bootchart2 can be started in two ways. Data collection can be initiated by
+# running the following command:
+#   bootchartd start
+# However, for the most complete data, the bootchart2 developers recommend
+# running it as PID 1. This can be done by adding the following to the kernel 
+# command line parameters in the bootloader setup:
+#   init=/sbin/bootchartd
+# When invoked this way, bootchart2 will set itself up and then automatically 
+# run /sbin/init. For example, when booting the default qemux86 image, one might
+# use a command like this:
+#   runqemu qemux86 bootparams="initcall_debug printk.time=y quiet \
+#                               init=/sbin/bootchartd"
+#
+# Neither method is actually implemented here, choose what works for you.
+#
+# If you are building your image with systemd instead of SysV init, bootchart2
+# includes systemd service files to begin collection automatically at boot and 
+# end collection automatically 20 seconds after the boot process has completed.
+# However, be aware that systemd tends to start bootchart2 relatively late into
+# the boot process, so it's highly recommended to use bootchart2 as PID 1. If 
+# you're using systemd and you wish to use another method to stop data
+# collection at a time of your choosing, you may do so as long as you get to it
+# before the 20 second timeout of the systemd service files. Also, you may write
+# a bbappend to patch bootchart2-done.timer.in to increase or decrease the
+# timeout. Decreasing it to 0 will make it behave like
+# bootchartd-stop-initscript.
+#
+# By default, when data collection is stopped, a file named bootchart.tgz will
+# be created in /var/log. If pybootchartgui is included in your image,
+# bootchart.png will also be created at the same time. However, this results in
+# a noticeable hitch or pause at boot time, which may not be what you want on an
+# embedded device. So you may prefer to omit pybootchartgui from your image. In
+# that case, copy bootchart.tgz over to your development system and generate
+# bootchart.png there. To get pybootchartgui on your development system, you can
+# either install it directly from some other source, or build bootchart2-native
+# and find pybootchartgui in the native sysroot:
+#    bitbake bootchart2-native
+#   ./tmp/sysroots/x86_64-linux/usr/bin/pybootchartgui /path/to/bootchart.tgz
+# Note that, whether installed on your build system or on your image, the 
+# pybootchartgui provided by this recipe does not support the -i option. You 
+# will need to install pybootchartgui by other means in order to run it in
+# interactive mode.
+
+SUMMARY = "Booting sequence and CPU,I/O usage monitor"
+DESCRIPTION = "Monitors where the system spends its time at start, creating a graph of all processes, disk utilization, and wait time."
+AUTHOR = "Wonhong Kwon <wonhong.kwon@lge.com>"
+HOMEPAGE = "https://github.com/mmeeks/bootchart"
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=44ac4678311254db62edf8fd39cb8124"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
+
+SRC_URI = "git://github.com/mmeeks/bootchart.git \
+           file://bootchartd_stop.sh \
+          "
+
+S = "${WORKDIR}/git"
+SRCREV = "48e0071048564c6af75ab969e842d6dec808da09"
+
+inherit systemd
+inherit update-rc.d
+inherit pythonnative
+
+# The only reason to build bootchart2-native is for a native pybootchartgui.
+BBCLASSEXTEND = "native"
+
+SYSTEMD_SERVICE_${PN} = "bootchart2.service bootchart2-done.service bootchart2-done.timer"
+
+UPDATERCPN = "bootchartd-stop-initscript"
+INITSCRIPT_NAME = "bootchartd_stop.sh"
+INITSCRIPT_PARAMS = "start 99 2 3 4 5 ."
+
+# We want native pybootchartgui to execute with the correct Python interpeter.
+do_compile_append_class-native () {
+    echo "#! ${PYTHON}" | cat - ${S}/pybootchartgui.py > ${WORKDIR}/temp_pybootchartgui
+    mv ${WORKDIR}/temp_pybootchartgui ${S}/pybootchartgui.py
+    chmod +x ${S}/pybootchartgui
+}
+
+do_compile_prepend () {
+    export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
+    export BINDIR="${bindir}"
+    export LIBDIR="${base_libdir}"
+}
+
+do_install () {
+    install -d ${D}${sysconfdir} # needed for -native
+    export PY_LIBDIR="${libdir}/${PYTHON_DIR}"
+    export BINDIR="${bindir}"
+    export DESTDIR="${D}"
+    export LIBDIR="${base_libdir}"
+
+    oe_runmake install
+    install -d ${D}${sysconfdir}/init.d
+    install -m 0755 ${WORKDIR}/bootchartd_stop.sh ${D}${sysconfdir}/init.d
+
+    echo 'EXIT_PROC="$EXIT_PROC matchbox-window-manager"' >> ${D}${sysconfdir}/bootchartd.conf
+}
+
+PACKAGES =+ "pybootchartgui"
+FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui ${bindir}/pybootchartgui"
+RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image python-textutils python-shell python-compression python-codecs"
+RDEPENDS_${PN}_class-target += "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'sysvinit-pidof', 'procps', d)}"
+RDEPENDS_${PN}_class-target += "lsb"
+DEPENDS_append_class-native = " python-pycairo-native"
+
+PACKAGES =+ "bootchartd-stop-initscript"
+FILES_bootchartd-stop-initscript += "${sysconfdir}/init.d ${sysconfdir}/rc*.d"
+
+FILES_${PN} += "${base_libdir}/bootchart/bootchart-collector"
+FILES_${PN} += "${base_libdir}/bootchart/tmpfs"
+FILES_${PN} += "${libdir}"
+FILES_${PN}-doc += "${datadir}/docs"
+
+RCONFLICTS_${PN} = "bootchart"
diff --git a/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch b/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch
new file mode 100644
index 0000000..a945496
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools/fix-symlink-creation-multiple-times.patch
@@ -0,0 +1,46 @@
+From 05ab78e9183575e38f342e05a056cb7bcd1e52e1 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 18 Feb 2016 20:41:28 -0500
+Subject: [PATCH] btrfs-progs: fix symlink creation multiple times
+
+The rule to create symlink in Makefile caused parallel issue:
+$ make -j 40 DESTDIR=/image install BUILD_VERBOSE=1
+...
+  1     [LN]     libbtrfs.so.0
+  2     [LN]     libbtrfs.so
+  3 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0
+  4 ln -s -f libbtrfs.so.0.1 libbtrfs.so.0
+  5 ln -s -f libbtrfs.so.0.1 libbtrfs.so
+  6 ln -s -f libbtrfs.so.0.1 libbtrfs.so
+...
+
+It failed occasionally:
+...
+|symlinkat: couldn't stat 'git/libbtrfs.so' even though symlink
+creation succeeded (No such file or directory).
+|ln: failed to create symbolic link 'libbtrfs.so': No such file or directory
+...
+
+Upstream-Status: Submitted [linux-btrfs@vger.kernel.org]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ Makefile.in | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index 1f4002e..16eeaf9 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -236,8 +236,7 @@ $(libs_static): $(libbtrfs_objects)
+ 
+ $(lib_links):
+ 	@echo "    [LN]     $@"
+-	$(Q)$(LN_S) -f libbtrfs.so.0.1 libbtrfs.so.0
+-	$(Q)$(LN_S) -f libbtrfs.so.0.1 libbtrfs.so
++	$(Q)$(LN_S) -f libbtrfs.so.0.1 $@
+ 
+ # keep intermediate files from the below implicit rules around
+ .PRECIOUS: $(addsuffix .o,$(progs))
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.1.2.bb b/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.1.2.bb
deleted file mode 100644
index 37c622b..0000000
--- a/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.1.2.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Checksumming Copy on Write Filesystem utilities"
-DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
-implementing advanced features while focusing on fault tolerance, repair and \
-easy administration. \
-This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
-btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
-
-HOMEPAGE = "https://btrfs.wiki.kernel.org"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
-SECTION = "base"
-DEPENDS = "util-linux attr e2fsprogs lzo acl"
-
-SRCREV = "7f1328ccb5d159efe850d4eaea9b49bbe8c4181e"
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
-           file://fix-parallel.patch \
-"
-
-inherit autotools-brokensep pkgconfig
-
-EXTRA_OECONF += "--disable-documentation"
-
-do_configure_prepend() {
-      sh autogen.sh
-}
-
-S = "${WORKDIR}/git"
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb b/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb
new file mode 100644
index 0000000..32e7bae
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.4.bb
@@ -0,0 +1,34 @@
+SUMMARY = "Checksumming Copy on Write Filesystem utilities"
+DESCRIPTION = "Btrfs is a new copy on write filesystem for Linux aimed at \
+implementing advanced features while focusing on fault tolerance, repair and \
+easy administration. \
+This package contains utilities (mkfs, fsck, btrfsctl) used to work with \
+btrfs and an utility (btrfs-convert) to make a btrfs filesystem from an ext3."
+
+HOMEPAGE = "https://btrfs.wiki.kernel.org"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
+SECTION = "base"
+DEPENDS = "util-linux attr e2fsprogs lzo acl"
+RDEPENDS_${PN} = "libgcc"
+
+SRCREV = "21258fab2caeade405a15ba932d373b364aa6e8c"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git \
+           file://fix-parallel.patch \
+           file://fix-symlink-creation-multiple-times.patch \
+"
+
+inherit autotools-brokensep pkgconfig
+
+EXTRA_OECONF += "--disable-documentation"
+EXTRA_OECONF_append_libc-musl = " --disable-backtrace "
+
+
+do_configure_prepend() {
+      sh autogen.sh
+}
+
+S = "${WORKDIR}/git"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.3.bb b/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.3.bb
deleted file mode 100644
index 97f557a..0000000
--- a/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.3.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require ccache.inc
-
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b3c337e7664559a789d9f7a93e5283c1"
-
-SRCREV = "4cad46e8ee0053144bb00919f0dadd20c1f87013"
-
-SRC_URI += "file://0001-Fix-regression-in-recent-change-related-to-zlib-in-n.patch \
-            file://0002-dev.mk.in-fix-file-name-too-long.patch \
-"
diff --git a/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.4.bb b/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.4.bb
new file mode 100644
index 0000000..fd45e41
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/ccache/ccache_3.2.4.bb
@@ -0,0 +1,10 @@
+require ccache.inc
+
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b3c337e7664559a789d9f7a93e5283c1"
+
+SRCREV = "2254797f1c5cfb83c4272da7b138f7f47218eb7d"
+
+SRC_URI += " \
+            file://0002-dev.mk.in-fix-file-name-too-long.patch \
+"
diff --git a/yocto-poky/meta/recipes-devtools/ccache/files/0001-Fix-regression-in-recent-change-related-to-zlib-in-n.patch b/yocto-poky/meta/recipes-devtools/ccache/files/0001-Fix-regression-in-recent-change-related-to-zlib-in-n.patch
deleted file mode 100644
index f5bd9aa..0000000
--- a/yocto-poky/meta/recipes-devtools/ccache/files/0001-Fix-regression-in-recent-change-related-to-zlib-in-n.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From f74c76107933046309861680b741adc67ac2a34e Mon Sep 17 00:00:00 2001
-From: Joel Rosdahl <joel@rosdahl.net>
-Date: Mon, 17 Aug 2015 19:05:14 +0200
-Subject: [PATCH] Fix regression in recent change related to zlib in
- nonstandard location
-
-To allow for specifying a -L flag in LDFLAGS and have it take effect for
--lz, 0220de9c8ebfb18caae2ac1aa163d060e98ceade put -lz in extra_libs
-instead of extra_ldflags. However, extra_libs is supposed to contain
-paths to libraries which are prerequisites of the ccache link rule, and
-some older versions of make got confused by seeing -lz as a
-prerequisite.
-
-This fix is to revert 0220de9c8ebfb18caae2ac1aa163d060e98ceade and
-instead make sure that LDFLAGS comes before extra_ldflags.
-
-Upstream-Status: Backport
----
- Makefile.in  |  2 +-
- NEWS.txt     | 10 ++++++++++
- configure.ac |  2 +-
- 3 files changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index e7515b1..d3621cd 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -20,7 +20,7 @@ RANLIB = @RANLIB@
- 
- all_cflags = $(CFLAGS)
- all_cppflags = @DEFS@ @extra_cppflags@ -DSYSCONFDIR=$(sysconfdir) -I. -I$(srcdir) $(CPPFLAGS)
--all_ldflags = @extra_ldflags@ $(LDFLAGS)
-+all_ldflags = $(LDFLAGS) @extra_ldflags@
- extra_libs = @extra_libs@
- 
- base_sources = \
-diff --git a/NEWS.txt b/NEWS.txt
-index f13feeb..eaeadf6 100644
---- a/NEWS.txt
-+++ b/NEWS.txt
-@@ -2,6 +2,16 @@ ccache news
- ===========
- 
- 
-+Unreleased 3.2.4
-+----------------
-+
-+Bug fixes
-+~~~~~~~~~
-+
-+- Fixed build error related to zlib on systems with older make versions
-+  (regression in ccache 3.2.3).
-+
-+
- ccache 3.2.3
- ------------
- Release date: 2015-08-16
-diff --git a/configure.ac b/configure.ac
-index 8d8ce92..9e65588 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -120,7 +120,7 @@ if test x${use_bundled_zlib} = xyes; then
-     extra_libs="zlib/libz.a"
-     mkdir -p zlib
- else
--    extra_libs="-lz"
-+    extra_ldflags="-lz"
- fi
- 
- dnl Linking on Windows needs ws2_32
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb b/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
new file mode 100644
index 0000000..ff4d5ac
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01.bb
@@ -0,0 +1,26 @@
+# cdrtools-native OE build file
+# Copyright (C) 2004-2006, Advanced Micro Devices, Inc.  All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+SUMMARY = "A set of tools for CD recording, including cdrecord"
+HOMEPAGE = "http://sourceforge.net/projects/cdrtools/"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & CDDL-1.0 & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/cdrtools-${REALPV}.tar.bz2"
+
+SRC_URI[md5sum] = "7d45c5b7e1f78d85d1583b361aee6e8b"
+SRC_URI[sha256sum] = "ed282eb6276c4154ce6a0b5dee0bdb81940d0cbbfc7d03f769c4735ef5f5860f"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+inherit native
+
+PV = "3.01a31+really3.01"
+REALPV = "3.01"
+
+S = "${WORKDIR}/${BPN}-${REALPV}"
+
+do_install() {
+	make install GMAKE_NOWARN=true INS_BASE=${prefix} DESTDIR=${D}
+}
diff --git a/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a31.bb b/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a31.bb
deleted file mode 100644
index d0f36e2..0000000
--- a/yocto-poky/meta/recipes-devtools/cdrtools/cdrtools-native_3.01a31.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-# cdrtools-native OE build file
-# Copyright (C) 2004-2006, Advanced Micro Devices, Inc.  All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-SUMMARY = "A set of tools for CD recording, including cdrecord"
-HOMEPAGE = "http://sourceforge.net/projects/cdrtools/"
-SECTION = "console/utils"
-LICENSE = "GPLv2 & CDDL-1.0 & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=32f68170be424c2cd64804337726b312"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/cdrtools/alpha/cdrtools-${PV}.tar.bz2"
-
-SRC_URI[md5sum] = "78172557894f469b4584d008e93ec469"
-SRC_URI[sha256sum] = "183b5c12777779e78d8b69461aae52401f863768e7e7391d60730006f8cadc5a"
-
-S = "${WORKDIR}/cdrtools-3.01"
-
-inherit native
-
-do_install() {
-	make install GMAKE_NOWARN=true INS_BASE=${prefix} DESTDIR=${D}
-}
diff --git a/yocto-poky/meta/recipes-devtools/chrpath/chrpath_0.16.bb b/yocto-poky/meta/recipes-devtools/chrpath/chrpath_0.16.bb
index 0a3b06e..e115eb5 100644
--- a/yocto-poky/meta/recipes-devtools/chrpath/chrpath_0.16.bb
+++ b/yocto-poky/meta/recipes-devtools/chrpath/chrpath_0.16.bb
@@ -13,6 +13,8 @@
 SRC_URI[md5sum] = "2bf8d1d1ee345fc8a7915576f5649982"
 SRC_URI[sha256sum] = "bb0d4c54bac2990e1bdf8132f2c9477ae752859d523e141e72b3b11a12c26e7b"
 
+UPSTREAM_CHECK_URI = "http://alioth.debian.org/frs/?group_id=31052"
+
 inherit autotools
 
 # We don't have a staged chrpath-native for ensuring our binary is
diff --git a/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.3.1.bb b/yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.4.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.3.1.bb
rename to yocto-poky/meta/recipes-devtools/cmake/cmake-native_3.4.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/cmake/cmake.inc b/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
index 57e93ac..968d003 100644
--- a/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
+++ b/yocto-poky/meta/recipes-devtools/cmake/cmake.inc
@@ -11,13 +11,16 @@
 
 CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
 
-SRC_URI = "http://www.cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
+SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
            file://support-oe-qt4-tools-names.patch \
            file://qt4-fail-silent.patch \
+           file://0001-Add-NIOS2-CPU-support.patch \
            "
 
-SRC_URI[md5sum] = "52638576f4e1e621fed6c3410d3a1b12"
-SRC_URI[sha256sum] = "cd65022c6a0707f1c7112f99e9c981677fdd5518f7ddfa0f778d4cee7113e3d6"
+SRC_URI[md5sum] = "4cb3ff35b2472aae70f542116d616e63"
+SRC_URI[sha256sum] = "b73f8c1029611df7ed81796bf5ca8ba0ef41c6761132340c73ffe42704f980fa"
+
+UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
 
 inherit autotools
 
diff --git a/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-Add-NIOS2-CPU-support.patch b/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-Add-NIOS2-CPU-support.patch
new file mode 100644
index 0000000..6e0ab9f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/cmake/cmake/0001-Add-NIOS2-CPU-support.patch
@@ -0,0 +1,50 @@
+From 3f8c3d3011ea192da2c761560b615f55763715ef Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Thu, 26 Nov 2015 21:31:04 +0100
+Subject: [PATCH] Add NIOS2 CPU support
+
+Add necessary bits to support the NIOS2 little-endian CPU.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Cc: Ley Foon Tan <lftan@altera.com>
+Cc: Thomas Chou <thomas@wytron.com.tw>
+Cc: Walter Goossens <waltergoossens@home.nl>
+Upstream-Status: Submitted
+---
+ Source/kwsys/CPU.h.in    | 4 ++++
+ Utilities/KWIML/ABI.h.in | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/Source/kwsys/CPU.h.in b/Source/kwsys/CPU.h.in
+index 884d71a..66ffbb1 100644
+--- a/Source/kwsys/CPU.h.in
++++ b/Source/kwsys/CPU.h.in
+@@ -88,6 +88,10 @@
+ #elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
+ # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
+ 
++/* NIOS2 */
++#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__)
++# define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_LITTLE
++
+ /* OpenRISC 1000 */
+ #elif defined(__or1k__)
+ # define @KWSYS_NAMESPACE@_CPU_ENDIAN_ID @KWSYS_NAMESPACE@_CPU_ENDIAN_ID_BIG
+diff --git a/Utilities/KWIML/ABI.h.in b/Utilities/KWIML/ABI.h.in
+index 6300ada..87b6e96 100644
+--- a/Utilities/KWIML/ABI.h.in
++++ b/Utilities/KWIML/ABI.h.in
+@@ -398,6 +398,10 @@ suppression macro @KWIML@_ABI_NO_VERIFY was defined.
+ #elif defined(__mips) || defined(__mips__) || defined(__MIPS__)
+ # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
+ 
++/* NIOS2 */
++#elif defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__)
++# define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_LITTLE
++
+ /* OpenRISC 1000 */
+ #elif defined(__or1k__)
+ # define @KWIML@_ABI_ENDIAN_ID @KWIML@_ABI_ENDIAN_ID_BIG
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch b/yocto-poky/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch
deleted file mode 100644
index 0c059f1..0000000
--- a/yocto-poky/meta/recipes-devtools/cmake/cmake/dont-run-cross-binaries.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-cmake: don't run cross-binaries on host machine
-
-When doing the cross build we obviously cannot run those binaries on
-host since they can be binary incompatible.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-
-Index: cmake-2.8.10.1/CMakeLists.txt
-===================================================================
---- cmake-2.8.10.1.orig/CMakeLists.txt
-+++ cmake-2.8.10.1/CMakeLists.txt
-@@ -588,7 +588,8 @@ mark_as_advanced(CMAKE_STRICT)
- 
- # build the remaining subdirectories
- add_subdirectory(Source)
--add_subdirectory(Utilities)
-+# Come on! Running the cross-binaries on host is not a good idea.
-+#add_subdirectory(Utilities)
- add_subdirectory(Tests)
- 
- if(BUILD_TESTING)
diff --git a/yocto-poky/meta/recipes-devtools/cmake/cmake_3.3.1.bb b/yocto-poky/meta/recipes-devtools/cmake/cmake_3.4.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/cmake/cmake_3.3.1.bb
rename to yocto-poky/meta/recipes-devtools/cmake/cmake_3.4.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.22.bb b/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.22.bb
index 6f73564..f899cd2 100644
--- a/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.22.bb
+++ b/yocto-poky/meta/recipes-devtools/desktop-file-utils/desktop-file-utils-native_0.22.bb
@@ -14,3 +14,5 @@
 inherit autotools native
 
 S = "${WORKDIR}/desktop-file-utils-${PV}"
+
+EXTRA_OECONF += "ac_cv_prog_EMACS=no"
diff --git a/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.60.bb b/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.60.bb
deleted file mode 100644
index 25ba4da..0000000
--- a/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.60.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Tool to produce a statistics based on a diff"
-DESCRIPTION = "diffstat reads the output of diff and displays a histogram of \
-the insertions, deletions, and modifications per-file. It is useful for \
-reviewing large, complex patch files."
-HOMEPAGE = "http://invisible-island.net/diffstat/"
-SECTION = "devel"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://install-sh;endline=42;md5=b3549726c1022bee09c174c72a0ca4a5"
-
-SRC_URI = "ftp://invisible-island.net/diffstat/diffstat-${PV}.tgz \
-           file://run-ptest \
-"
-
-SRC_URI[md5sum] = "ba889da4c06b547aa2d78fa96800ae6f"
-SRC_URI[sha256sum] = "2032e418b43bae70d548e32da901ebc4ac12972381de1314bebde0b126fb0123"
-
-S = "${WORKDIR}/diffstat-${PV}"
-
-inherit autotools gettext ptest
-
-LDFLAGS += "${TOOLCHAIN_OPTIONS}"
-
-do_configure () {
-	if [ ! -e ${S}/acinclude.m4 ]; then
-		mv ${S}/aclocal.m4 ${S}/acinclude.m4
-	fi
-	autotools_do_configure
-}
-
-do_install_ptest() {
-	cp -r ${S}/testing ${D}${PTEST_PATH}
-}
diff --git a/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb b/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb
new file mode 100644
index 0000000..0ec41c3
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/diffstat/diffstat_1.61.bb
@@ -0,0 +1,32 @@
+SUMMARY = "Tool to produce a statistics based on a diff"
+DESCRIPTION = "diffstat reads the output of diff and displays a histogram of \
+the insertions, deletions, and modifications per-file. It is useful for \
+reviewing large, complex patch files."
+HOMEPAGE = "http://invisible-island.net/diffstat/"
+SECTION = "devel"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://install-sh;endline=42;md5=b3549726c1022bee09c174c72a0ca4a5"
+
+SRC_URI = "ftp://invisible-island.net/diffstat/diffstat-${PV}.tgz \
+           file://run-ptest \
+"
+
+SRC_URI[md5sum] = "c048a32d55d8bd6724f382baf41f325f"
+SRC_URI[sha256sum] = "25359e0c27183f997b36c9202583b5dc2df390c20e22a92606af4bf7856a55ee"
+
+S = "${WORKDIR}/diffstat-${PV}"
+
+inherit autotools gettext ptest
+
+LDFLAGS += "${TOOLCHAIN_OPTIONS}"
+
+do_configure () {
+	if [ ! -e ${S}/acinclude.m4 ]; then
+		mv ${S}/aclocal.m4 ${S}/acinclude.m4
+	fi
+	autotools_do_configure
+}
+
+do_install_ptest() {
+	cp -r ${S}/testing ${D}${PTEST_PATH}
+}
diff --git a/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb b/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
deleted file mode 100644
index 4c16556..0000000
--- a/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_2.12.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "DMI (Desktop Management Interface) table related utilities"
-HOMEPAGE = "http://www.nongnu.org/dmidecode/"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
-
-SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.bz2"
-
-COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux"
-
-do_install() {
-	oe_runmake DESTDIR="${D}" install
-}
-
-do_unpack_extra() {
-	sed -i -e '/^prefix/s:/usr/local:${exec_prefix}:' ${S}/Makefile
-}
-addtask unpack_extra after do_unpack before do_patch
-
-SRC_URI[md5sum] = "a406f3cbb27736491698697beeddb781"
-SRC_URI[sha256sum] = "913ff3055d563a62a420789b8ee33b038de9afa18ea61254760ddf8ab87a5088"
diff --git a/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb b/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb
new file mode 100644
index 0000000..109a9d2
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/dmidecode/dmidecode_3.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "DMI (Desktop Management Interface) table related utilities"
+HOMEPAGE = "http://www.nongnu.org/dmidecode/"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/dmidecode/${BP}.tar.xz"
+
+COMPATIBLE_HOST = "(i.86|x86_64|aarch64|arm|powerpc|powerpc64).*-linux"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_install() {
+	oe_runmake DESTDIR="${D}" install
+}
+
+do_unpack_extra() {
+	sed -i -e '/^prefix/s:/usr/local:${exec_prefix}:' ${S}/Makefile
+}
+addtask unpack_extra after do_unpack before do_patch
+
+SRC_URI[md5sum] = "281ee572d45c78eca73a14834c495ffd"
+SRC_URI[sha256sum] = "7ec35bb193729c1d593a1460b59d82d24b89102ab23fd0416e6cf4325d077e45"
+
diff --git a/yocto-poky/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb b/yocto-poky/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
index 461b48f..b7791f3 100644
--- a/yocto-poky/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
+++ b/yocto-poky/meta/recipes-devtools/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-native_1.79.bb
@@ -13,6 +13,9 @@
 SRC_URI[md5sum] = "bc192d23266b9a664ca0aba4a7794c7c"
 SRC_URI[sha256sum] = "2f329e120bee9ef42fbdd74ddd60e05e49786c5a7953a0ff4c680ae6bdf0e2bc"
 
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/docbook/files/docbook-dsssl/"
+UPSTREAM_CHECK_REGEX = "/docbook-dsssl/(?P<pver>(\d+[\.\-_]*)+)/"
+
 S = "${WORKDIR}/docbook-dsssl-${PV}"
 
 inherit native
diff --git a/yocto-poky/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native_3.1.bb b/yocto-poky/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native_3.1.bb
index a7df4f9..a3ee5d8 100644
--- a/yocto-poky/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native_3.1.bb
+++ b/yocto-poky/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-3.1-native_3.1.bb
@@ -16,6 +16,9 @@
 SRC_URI[md5sum] = "432749c0c806dbae81c8bcb70da3b5d3"
 SRC_URI[sha256sum] = "20261d2771b9a052abfa3d8fab1aa62be05791a010281c566f9073bf0e644538"
 
+UPSTREAM_CHECK_URI = "http://www.docbook.org/sgml/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>3\..+)/"
+
 do_compile() {
 	# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd-3.html
 	# for details.
diff --git a/yocto-poky/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native_4.1.bb b/yocto-poky/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native_4.1.bb
index 88c9396..be59680 100644
--- a/yocto-poky/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native_4.1.bb
+++ b/yocto-poky/meta/recipes-devtools/docbook-sgml-dtd/docbook-sgml-dtd-4.1-native_4.1.bb
@@ -16,6 +16,9 @@
 SRC_URI[md5sum] = "489f6ff2a2173eb1e14216c10533ede2"
 SRC_URI[sha256sum] = "deaafcf0a3677692e7ad4412c0e41c1db3e9da6cdcdb3dd32b2cc1f9c97d6311"
 
+UPSTREAM_CHECK_URI = "http://www.docbook.org/sgml/"
+UPSTREAM_CHECK_REGEX = "(?P<pver>4\.1(\.\d+)*)/"
+
 do_compile() {
 	# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/sgml-dtd.html
 	# for details.
diff --git a/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb b/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb
index 2a1bdc4..52de3ab 100644
--- a/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb
+++ b/yocto-poky/meta/recipes-devtools/docbook-xml/docbook-xsl-stylesheets_1.78.1.bb
@@ -11,6 +11,10 @@
 SRC_URI[md5sum] = "6dd0f89131cc35bf4f2ed105a1c17771"
 SRC_URI[sha256sum] = "c98f7296ab5c8ccd2e0bc07634976a37f50847df2d8a59bdb1e157664700b467"
 
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/docbook/files/docbook-xsl/"
+# Reject versions ending in .0 as those are release candidates
+UPSTREAM_CHECK_REGEX = "/docbook-xsl/(?P<pver>(\d+[\.\-_]*)+(?!\.0)\.\d+)/"
+
 S = "${WORKDIR}/docbook-xsl-${PV}"
 
 inherit allarch
@@ -30,7 +34,8 @@
 do_install () {
 	# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/docbook-xsl.html
 	# for details.
-	install -v -m755 -d ${D}${datadir}/xml/docbook/xsl-stylesheets-1.78.1
+	install -v -m755 -d ${D}${datadir}/xml/docbook/xsl-stylesheets-${PV}
+	ln -s xsl-stylesheets-${PV} ${D}${datadir}/xml/docbook/xsl-stylesheets
 
 	cp -v -R VERSION common eclipse epub extensions fo highlighting html \
 		htmlhelp images javahelp lib manpages params profiling \
diff --git a/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch b/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch
new file mode 100644
index 0000000..3497ca5
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch
@@ -0,0 +1,46 @@
+From 3b95786af13e28157d889bd90a384ee255f2d91d Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Date: Sun, 16 Aug 2015 15:55:43 +0200
+Subject: [PATCH] mkfs.fat: fix incorrect int type
+
+u_int32_t is not a stanard type, while uint32_t is. This fixes builds
+with the musl C library, which only defines so-called "clean" headers;
+build failures are like (back-quotes and elision manually added for
+readability):
+
+    http://autobuild.buildroot.org/results/a09/a0923d7f6d4dbae02eba4c5024bbdae3a52aa85a/build-end.log
+
+    /home/peko/autobuild/instance-1/output/host/usr/bin/x86_64-linux-gcc -D_LARGEFILE_SOURCE \
+        -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Os  -D_GNU_SOURCE -D_LARGEFILE_SOURCE \
+        -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -c -o mkfs.fat.o src/mkfs.fat.c
+    src/mkfs.fat.c: In function 'main':
+    src/mkfs.fat.c:1415:18: error: 'u_int32_t' undeclared (first use in this function)
+         volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); [...]
+                      ^
+    src/mkfs.fat.c:1415:18: note: each undeclared identifier is reported only once for each
+    function it appears in
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Signed-off-by: Andreas Bombe <aeb@debian.org>
+---
+Upstream-Status: Backport
+
+ src/mkfs.fat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c
+index b38d116..dddbe24 100644
+--- a/src/mkfs.fat.c
++++ b/src/mkfs.fat.c
+@@ -1412,7 +1412,7 @@ int main(int argc, char **argv)
+ 
+     gettimeofday(&create_timeval, NULL);
+     create_time = create_timeval.tv_sec;
+-    volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec);	/* Default volume ID = creation time, fudged for more uniqueness */
++    volume_id = (uint32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec);	/* Default volume ID = creation time, fudged for more uniqueness */
+     check_atari();
+ 
+     printf("mkfs.fat " VERSION " (" VERSION_DATE ")\n");
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/largefile.patch b/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/largefile.patch
new file mode 100644
index 0000000..7f7d835
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools/largefile.patch
@@ -0,0 +1,19 @@
+defer setting largefile flags to build makery
+in a cross build we can not do runtime config tests
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Inappropriate[Cross compile Specific]
+Index: dosfstools-3.0.28/Makefile
+===================================================================
+--- dosfstools-3.0.28.orig/Makefile
++++ dosfstools-3.0.28/Makefile
+@@ -27,8 +27,7 @@ SBINDIR = $(PREFIX)/sbin
+ DOCDIR = $(PREFIX)/share/doc
+ MANDIR = $(PREFIX)/share/man
+ 
+-#OPTFLAGS = -O2 -fomit-frame-pointer -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+-OPTFLAGS = -O2 -fomit-frame-pointer -D_GNU_SOURCE $(shell getconf LFS_CFLAGS)
++OPTFLAGS = -O2 -fomit-frame-pointer
+ #WARNFLAGS = -Wall -pedantic -std=c99
+ WARNFLAGS = -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings
+ DEBUGFLAGS = -g
diff --git a/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb b/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
index beec488..176504d 100644
--- a/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
+++ b/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_2.11.bb
@@ -2,7 +2,7 @@
 # Copyright (C) 2004-2006, Advanced Micro Devices, Inc.  All Rights Reserved
 # Released under the MIT license (see packages/COPYING)
 SUMMARY = "DOS FAT Filesystem Utilities"
-HOMEPAGE = "http://daniel-baumann.ch/software/dosfstools/"
+HOMEPAGE = "https://github.com/dosfstools/dosfstools"
 
 SECTION = "base"
 LICENSE = "GPLv2"
@@ -18,21 +18,17 @@
            file://include-linux-types.patch \
            file://nofat32_autoselect.patch \
            file://fix_populated_dosfs_creation.patch \
-	   file://0001-Include-fcntl.h-for-getting-loff_t-definition.patch \
-	   "
+           file://0001-Include-fcntl.h-for-getting-loff_t-definition.patch \
+"
 
 SRC_URI[md5sum] = "407d405ade410f7597d364ab5dc8c9f6"
 SRC_URI[sha256sum] = "0eac6d12388b3d9ed78684529c1b0d9346fa2abbe406c4d4a3eb5a023c98a484"
 
-# Makefile sets this, but we clobber its CFLAGS, so
-# add this in here to for sure allow for big files.
-#
-CFLAGS_append = " -D_FILE_OFFSET_BITS=64"
-CFLAGS_append_libc-musl = " -D_GNU_SOURCE"
+CFLAGS += "-D_GNU_SOURCE ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', '', d)}"
+
+EXTRA_OEMAKE = "CC='${CC}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
 
 do_install () {
 	oe_runmake "PREFIX=${D}" "SBINDIR=${D}${base_sbindir}" \
 		   "MANDIR=${D}${mandir}/man8" install
 }
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_3.0.28.bb b/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_3.0.28.bb
index ac131cb..6fc3e41 100644
--- a/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_3.0.28.bb
+++ b/yocto-poky/meta/recipes-devtools/dosfstools/dosfstools_3.0.28.bb
@@ -9,10 +9,17 @@
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-SRC_URI = "https://github.com/dosfstools/dosfstools/releases/download/v3.0.28/dosfstools-3.0.28.tar.xz"
+SRC_URI = "https://github.com/dosfstools/dosfstools/releases/download/v3.0.28/dosfstools-3.0.28.tar.xz \
+           file://largefile.patch \
+           file://0001-mkfs.fat-fix-incorrect-int-type.patch \
+          "
 SRC_URI[md5sum] = "6a047a6c65186b9ebb1853709adb36db"
 SRC_URI[sha256sum] = "ee95913044ecf2719b63ea11212917649709a6e53209a72d622135aaa8517ee2"
 
+UPSTREAM_CHECK_URI = "https://github.com/dosfstools/dosfstools/releases"
+
+CFLAGS += "-D_GNU_SOURCE ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', '', d)}"
+
 FILES_${PN} = "${base_sbindir}"
 FILES_${PN}-doc = "${mandir} ${docdir}"
 
diff --git a/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc b/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc
index 6eec2cd..3d9e7e3 100644
--- a/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/yocto-poky/meta/recipes-devtools/dpkg/dpkg.inc
@@ -34,7 +34,7 @@
 		--without-selinux \
 		"
 
-EXTRA_OECONF_append_class-target = " TAR=tar"
+EXTRA_OECONF += "TAR=tar"
 
 do_configure () {
     echo >> ${S}/m4/compiler.m4
diff --git a/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch b/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch
index 6967ef4..49ef853 100644
--- a/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch
+++ b/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0001-When-running-do_package_write_deb-we-have-trees-of-h.patch
@@ -1,7 +1,7 @@
-From d14ffd786993da60ca84c4812da8a6594a8c764e Mon Sep 17 00:00:00 2001
+From e391bdba238d1371fc5b67cdae08b06eb5ada5c2 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Wed, 26 Aug 2015 15:48:13 +0300
-Subject: [PATCH 1/5] When running do_package_write_deb, we have trees of
+Subject: [PATCH] When running do_package_write_deb, we have trees of
  hardlinked files such as the dbg source files in ${PN}-dbg. If something
  makes another copy of one of those files (or deletes one), the number of
  links a file has changes and tar can notice this, e.g.:
@@ -19,23 +19,43 @@
 Upstream-Status: Inappropriate
 RP 2015/3/27
 ---
- dpkg-deb/build.c | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
+ dpkg-deb/build.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
 
 diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
-index ea3d861..1589927 100644
+index 2ddeec6..af363f0 100644
 --- a/dpkg-deb/build.c
 +++ b/dpkg-deb/build.c
-@@ -458,7 +458,7 @@ do_build(const char *const *argv)
+@@ -452,7 +452,7 @@ static void
+ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
+              struct compress_params *tar_compress_params, int fd_out)
+ {
+-  int pipe_filenames[2], pipe_tarball[2];
++  int pipe_filenames[2], pipe_tarball[2], rc;
+   pid_t pid_tar, pid_comp;
+ 
+   /* Fork off a tar. We will feed it a list of filenames on stdin later. */
+@@ -493,7 +493,9 @@ tarball_pack(const char *dir, filenames_feed_func *tar_filenames_feeder,
+   /* All done, clean up wait for tar and <compress> to finish their job. */
+   close(pipe_filenames[1]);
+   subproc_reap(pid_comp, _("<compress> from tar -cf"), 0);
+-  subproc_reap(pid_tar, "tar -cf", 0);
++  rc = subproc_reap(pid_tar, "tar -cf", SUBPROC_RETERROR);
++  if (rc && rc != 1)
++    ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
+ }
+ 
+ /**
+@@ -509,7 +511,7 @@ do_build(const char *const *argv)
    char *debar;
    char *tfbuf;
    int arfd;
--  int p1[2], p2[2], gzfd;
-+  int p1[2], p2[2], gzfd, rc;
+-  int p1[2], gzfd;
++  int p1[2], gzfd, rc;
    pid_t c1, c2;
  
    /* Decode our arguments. */
-@@ -538,7 +538,9 @@ do_build(const char *const *argv)
+@@ -590,7 +592,9 @@ do_build(const char *const *argv)
    }
    close(p1[0]);
    subproc_reap(c2, _("<compress> from tar -cf"), 0);
@@ -46,18 +66,6 @@
  
    if (lseek(gzfd, 0, SEEK_SET))
      ohshite(_("failed to rewind temporary file (%s)"), _("control member"));
-@@ -626,7 +628,10 @@ do_build(const char *const *argv)
-   /* All done, clean up wait for tar and <compress> to finish their job. */
-   close(p1[1]);
-   subproc_reap(c2, _("<compress> from tar -cf"), 0);
--  subproc_reap(c1, "tar -cf", 0);
-+  rc = subproc_reap(c1, "tar -cf", SUBPROC_RETERROR);
-+  if (rc && rc != 1)
-+    ohshite(_("subprocess %s returned error exit status %d"), "tar -cf", rc);
-+
-   /* Okay, we have data.tar as well now, add it to the ar wrapper. */
-   if (deb_format.major == 2) {
-     char datamember[16 + 1];
 -- 
-2.1.4
+2.7.0
 
diff --git a/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch b/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
new file mode 100644
index 0000000..a6b0088
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/dpkg/dpkg/0006-add-musleabi-to-known-target-tripets.patch
@@ -0,0 +1,42 @@
+From f8910022dc3ec622272f168cd0022dbdf6dff93a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Dec 2015 23:05:41 +0000
+Subject: [PATCH] add musleabi to known target tripets
+
+helps compiling dpkg for musl/arm-softfloat
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ ostable      | 1 +
+ triplettable | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/ostable b/ostable
+index 3bb6819..d0ffdc7 100644
+--- a/ostable
++++ b/ostable
+@@ -15,6 +15,7 @@
+ uclibceabi-linux	linux-uclibceabi	linux[^-]*-uclibceabi
+ uclibc-linux		linux-uclibc		linux[^-]*-uclibc
+ musleabihf-linux	linux-musleabihf	linux[^-]*-musleabihf
++musleabi-linux		linux-musleabi		linux[^-]*-musleabi
+ musl-linux		linux-musl		linux[^-]*-musl
+ gnueabihf-linux		linux-gnueabihf		linux[^-]*-gnueabihf
+ gnueabi-linux		linux-gnueabi		linux[^-]*-gnueabi
+diff --git a/triplettable b/triplettable
+index 1213584..70d24c1 100644
+--- a/triplettable
++++ b/triplettable
+@@ -6,6 +6,7 @@
+ uclibceabi-linux-arm	uclibc-linux-armel
+ uclibc-linux-<cpu>	uclibc-linux-<cpu>
+ musleabihf-linux-arm	musl-linux-armhf
++musleabi-linux-arm	musl-linux-armel
+ musl-linux-<cpu>	musl-linux-<cpu>
+ gnueabihf-linux-arm	armhf
+ gnueabi-linux-arm	armel
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-devtools/dpkg/dpkg/CVE-2015-0860.patch b/yocto-poky/meta/recipes-devtools/dpkg/dpkg/CVE-2015-0860.patch
deleted file mode 100644
index 1f259d3..0000000
--- a/yocto-poky/meta/recipes-devtools/dpkg/dpkg/CVE-2015-0860.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From f1aac7d933819569bf6f347c3c0d5a64a90bbce0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Hanno=20B=C3=B6ck?= <hanno@hboeck.de>
-Date: Thu, 19 Nov 2015 20:03:10 +0100
-Subject: [PATCH] dpkg-deb: Fix off-by-one write access on ctrllenbuf variable
-
-This affects old format .deb packages.
-
-Fixes: CVE-2015-0860
-Warned-by: afl
-Signed-off-by: Guillem Jover <guillem@debian.org>
-
-Upstream-Status: Backport
-
-https://anonscm.debian.org/cgit/dpkg/dpkg.git/commit/?h=wheezy&id=f1aac7d933819569bf6f347c3c0d5a64a90bbce0
-
-CVE: CVE-2015-0860
-
-hand merge Changelog
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- debian/changelog   | 3 +++
- dpkg-deb/extract.c | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-Index: dpkg-1.18.2/dpkg-deb/extract.c
-===================================================================
---- dpkg-1.18.2.orig/dpkg-deb/extract.c
-+++ dpkg-1.18.2/dpkg-deb/extract.c
-@@ -247,7 +247,7 @@ extracthalf(const char *debar, const cha
-     if (errstr)
-       ohshit(_("archive has invalid format version: %s"), errstr);
- 
--    r = read_line(arfd, ctrllenbuf, 1, sizeof(ctrllenbuf));
-+    r = read_line(arfd, ctrllenbuf, 1, sizeof(ctrllenbuf) - 1);
-     if (r < 0)
-       read_fail(r, debar, _("archive control member size"));
-     if (sscanf(ctrllenbuf, "%jd%c%d", &ctrllennum, &nlc, &dummy) != 2 ||
-Index: dpkg-1.18.2/ChangeLog
-===================================================================
---- dpkg-1.18.2.orig/ChangeLog
-+++ dpkg-1.18.2/ChangeLog
-@@ -1,3 +1,8 @@
-+[ Guillem Jover ]
-+  * Fix an off-by-one write access in dpkg-deb when parsing the old format
-+    .deb control member size. Thanks to Hanno Böck <hanno@hboeck.de>.
-+    Fixes CVE-2015-0860.
-+
- commit 5459d330c73cdcfd1327bc93c0ebddc2da4a3a3a (HEAD -> master, tag: 1.18.2)
- Author: Guillem Jover <guillem@debian.org>
- Date:   Mon Aug 3 15:41:05 2015 +0200
diff --git a/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.2.bb b/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.2.bb
deleted file mode 100644
index 2fc096d..0000000
--- a/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.2.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require dpkg.inc
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-SRC_URI += "file://noman.patch \
-            file://remove-tar-no-timestamp.patch \
-            file://fix-abs-redefine.patch \
-            file://arch_pm.patch \
-            file://dpkg-configure.service \
-            file://glibc2.5-sync_file_range.patch \
-            file://add_armeb_triplet_entry.patch \
-	    file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \
-	    file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \
-	    file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \
-	    file://0005-dpkg-compiler.m4-remove-Wvla.patch \
-        file://CVE-2015-0860.patch \
-           "
-
-SRC_URI[md5sum] = "63b9d869081ec49adeef6c5ff62d6576"
-SRC_URI[sha256sum] = "11484f2a73d027d696e720a60380db71978bb5c06cd88fe30c291e069ac457a4"
-
diff --git a/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb b/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb
new file mode 100644
index 0000000..7876944
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/dpkg/dpkg_1.18.4.bb
@@ -0,0 +1,20 @@
+require dpkg.inc
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SRC_URI_append_class-native =" file://glibc2.5-sync_file_range.patch "
+SRC_URI += "file://noman.patch \
+            file://remove-tar-no-timestamp.patch \
+            file://fix-abs-redefine.patch \
+            file://arch_pm.patch \
+            file://dpkg-configure.service \
+            file://add_armeb_triplet_entry.patch \
+	    file://0002-Adapt-to-linux-wrs-kernel-version-which-has-characte.patch \
+	    file://0003-Our-pre-postinsts-expect-D-to-be-set-when-running-in.patch \
+	    file://0004-The-lutimes-function-doesn-t-work-properly-for-all-s.patch \
+	    file://0005-dpkg-compiler.m4-remove-Wvla.patch \
+	    file://0006-add-musleabi-to-known-target-tripets.patch \
+           "
+
+SRC_URI[md5sum] = "e95b513c89693f6ec3ab53b6b1c3defd"
+SRC_URI[sha256sum] = "fe89243868888ce715bf45861f26264f767d4e4dbd0d6f1a26ce60bbbbf106da"
+
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
index bcd9ba7..09e4ea5 100644
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
+++ b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs.inc
@@ -19,7 +19,9 @@
 SECTION = "base"
 DEPENDS = "util-linux"
 
-SRC_URI = "${SOURCEFORGE_MIRROR}/e2fsprogs/e2fsprogs-${PV}.tar.gz \
-           file://mkdir.patch"
+SRC_URI = "git://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git"
+S = "${WORKDIR}/git"
 
-inherit autotools gettext texinfo pkgconfig multilib_header
+inherit autotools gettext texinfo pkgconfig multilib_header update-alternatives ptest
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch
deleted file mode 100644
index 73043be..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-e2fsprogs-fix-cross-compilation-problem.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Upstream-Status: Pending
-
-Subject: e2fsprogs: fix cross compilation problem
-
-The checking of types in parse-types.sh doesn't make much sense in a
-cross-compilation environment, because the generated binary is executed
-on build machine.
-
-So even if asm_types.h has got correct statements for types, it's possible
-that the generated binary will report an error. Because these types are for
-the target machine.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- config/parse-types.sh |    6 ++++--
- configure.in          |    6 +++++-
- 2 files changed, 9 insertions(+), 3 deletions(-)
-
-diff --git a/config/parse-types.sh b/config/parse-types.sh
-index 5076f6c..24d2a99 100755
---- a/config/parse-types.sh
-+++ b/config/parse-types.sh
-@@ -118,8 +118,10 @@ if ./asm_types
- then
-     true
- else
--    echo "Problem detected with asm_types.h"
--    echo "" > asm_types.h
-+    if [ "${CROSS_COMPILE}" != "1" ]; then
-+	echo "Problem detected with asm_types.h"
-+	echo "" > asm_types.h
-+    fi
- fi
- rm asm_types.c asm_types
- 
-diff --git a/configure.in b/configure.in
-index 68adf0d..ed1697b 100644
---- a/configure.in
-+++ b/configure.in
-@@ -953,7 +953,11 @@ AC_SUBST(SIZEOF_LONG)
- AC_SUBST(SIZEOF_LONG_LONG)
- AC_SUBST(SIZEOF_OFF_T)
- AC_C_BIGENDIAN
--BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
-+if test $cross_compiling = no; then
-+  BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
-+else
-+  CROSS_COMPILE="1" BUILD_CC="$BUILD_CC" CPP="$CPP" /bin/sh $ac_aux_dir/parse-types.sh
-+fi
- ASM_TYPES_HEADER=./asm_types.h
- AC_SUBST_FILE(ASM_TYPES_HEADER)
- dnl
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-potential-buffer-overflow-in-closefs.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-potential-buffer-overflow-in-closefs.patch
deleted file mode 100644
index 72f77cc..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-libext2fs-fix-potential-buffer-overflow-in-closefs.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 49d0fe2a14f2a23da2fe299643379b8c1d37df73 Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Fri, 6 Feb 2015 12:46:39 -0500
-Subject: [PATCH] libext2fs: fix potential buffer overflow in closefs()
-
-Upstream-Status: Backport
-
-The bug fix in f66e6ce4446: "libext2fs: avoid buffer overflow if
-s_first_meta_bg is too big" had a typo in the fix for
-ext2fs_closefs().  In practice most of the security exposure was from
-the openfs path, since this meant if there was a carefully crafted
-file system, buffer overrun would be triggered when the file system was
-opened.
-
-However, if corrupted file system didn't trip over some corruption
-check, and then the file system was modified via tune2fs or debugfs,
-such that the superblock was marked dirty and then written out via the
-closefs() path, it's possible that the buffer overrun could be
-triggered when the file system is closed.
-
-Also clear up a signed vs unsigned warning while we're at it.
-
-Thanks to Nick Kralevich <nnk@google.com> for asking me to look at
-compiler warning in the code in question, which led me to notice the
-bug in f66e6ce4446.
-
-Addresses: CVE-2015-1572
-
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
----
- lib/ext2fs/closefs.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
-index 1f99113..ab5b2fb 100644
---- a/lib/ext2fs/closefs.c
-+++ b/lib/ext2fs/closefs.c
-@@ -287,7 +287,7 @@ errcode_t ext2fs_flush2(ext2_filsys fs, int flags)
- 	dgrp_t		j;
- #endif
- 	char	*group_ptr;
--	int	old_desc_blocks;
-+	blk64_t	old_desc_blocks;
- 	struct ext2fs_numeric_progress_struct progress;
- 
- 	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
-@@ -346,7 +346,7 @@ errcode_t ext2fs_flush2(ext2_filsys fs, int flags)
- 	group_ptr = (char *) group_shadow;
- 	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) {
- 		old_desc_blocks = fs->super->s_first_meta_bg;
--		if (old_desc_blocks > fs->super->s_first_meta_bg)
-+		if (old_desc_blocks > fs->desc_blocks)
- 			old_desc_blocks = fs->desc_blocks;
- 	} else
- 		old_desc_blocks = fs->desc_blocks;
--- 
-2.1.0
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-mke2fs-add-the-ability-to-copy-files-from-a-given-di.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-mke2fs-add-the-ability-to-copy-files-from-a-given-di.patch
deleted file mode 100644
index 9ea413e..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-mke2fs-add-the-ability-to-copy-files-from-a-given-di.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From c98fec004f077e566b9dfa20b25e3b86cb462a2e Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 24 Dec 2013 01:41:08 -0500
-Subject: [PATCH 01/11] mke2fs: add the ability to copy files from a given
- directory
-
-We will add a -d option which will be used for adding the files from a
-given directory to the filesystem, it is similiar to genext2fs, but
-genext2fs doesn't fully support ext4.
-
-* We already have the basic operations in debugfs:
-  - Copy regular file
-  - Create directory
-  - Create symlink
-  - Create special file
-
-  We will move these operations into create_inode.h and create_inode.c,
-  then let both mke2fs and debugfs use them.
-
-* What we need to do are:
-  - Copy the given directory recursively, this will be done by the
-    populate_fs()
-  - Set the owner, mode and other informations
-  - Handle the hard links
-
-TODO:
-  - The libext2fs can't create the socket file (S_IFSOCK), do we have a
-    plan to support it ?
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- misc/create_inode.c |   26 ++++++++++++++++++++++++++
- misc/create_inode.h |   17 +++++++++++++++++
- 2 files changed, 43 insertions(+)
- create mode 100644 misc/create_inode.c
- create mode 100644 misc/create_inode.h
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-new file mode 100644
-index 0000000..46aaa60
---- /dev/null
-+++ b/misc/create_inode.c
-@@ -0,0 +1,26 @@
-+#include "create_inode.h"
-+
-+/* Make a special file which is block, character and fifo */
-+errcode_t do_mknod_internal(ext2_ino_t cwd, const char *name, struct stat *st)
-+{
-+}
-+
-+/* Make a symlink name -> target */
-+errcode_t do_symlink_internal(ext2_ino_t cwd, const char *name, char *target)
-+{
-+}
-+
-+/* Make a directory in the fs */
-+errcode_t do_mkdir_internal(ext2_ino_t cwd, const char *name, struct stat *st)
-+{
-+}
-+
-+/* Copy the native file to the fs */
-+errcode_t do_write_internal(ext2_ino_t cwd, const char *src, const char *dest)
-+{
-+}
-+
-+/* Copy files from source_dir to fs */
-+errcode_t populate_fs(ext2_ino_t parent_ino, const char *source_dir)
-+{
-+}
-diff --git a/misc/create_inode.h b/misc/create_inode.h
-new file mode 100644
-index 0000000..9fc97fa
---- /dev/null
-+++ b/misc/create_inode.h
-@@ -0,0 +1,17 @@
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+#include "et/com_err.h"
-+#include "e2p/e2p.h"
-+#include "ext2fs/ext2fs.h"
-+#include "nls-enable.h"
-+
-+ext2_filsys    current_fs;
-+ext2_ino_t     root;
-+
-+/* For populating the filesystem */
-+extern errcode_t populate_fs(ext2_ino_t parent_ino, const char *source_dir);
-+extern errcode_t do_mknod_internal(ext2_ino_t cwd, const char *name, struct stat *st);
-+extern errcode_t do_symlink_internal(ext2_ino_t cwd, const char *name, char *target);
-+extern errcode_t do_mkdir_internal(ext2_ino_t cwd, const char *name, struct stat *st);
-+extern errcode_t do_write_internal(ext2_ino_t cwd, const char *src, const char *dest);
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0002-misc-create_inode.c-copy-files-recursively.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0002-misc-create_inode.c-copy-files-recursively.patch
deleted file mode 100644
index 9bff644..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0002-misc-create_inode.c-copy-files-recursively.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 08dfbaf4e3f704232ff46d78c0758a6cfe3961c8 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 23 Dec 2013 02:59:10 -0500
-Subject: [PATCH 02/11] misc/create_inode.c: copy files recursively
-
-Use opendir() and readdir() to read the native directory, then use
-lstat() to identify the file type and call the corresponding function to
-add the file to the filesystem, call the populate_fs() recursively if it
-is a directory.
-
-NOTE: the libext2fs can't create the socket file.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- misc/create_inode.c |   97 +++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 97 insertions(+)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index 46aaa60..b68b910 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -1,5 +1,13 @@
- #include "create_inode.h"
- 
-+#if __STDC_VERSION__ < 199901L
-+# if __GNUC__ >= 2
-+#  define __func__ __FUNCTION__
-+# else
-+#  define __func__ "<unknown>"
-+# endif
-+#endif
-+
- /* Make a special file which is block, character and fifo */
- errcode_t do_mknod_internal(ext2_ino_t cwd, const char *name, struct stat *st)
- {
-@@ -23,4 +31,93 @@ errcode_t do_write_internal(ext2_ino_t cwd, const char *src, const char *dest)
- /* Copy files from source_dir to fs */
- errcode_t populate_fs(ext2_ino_t parent_ino, const char *source_dir)
- {
-+	const char	*name;
-+	DIR		*dh;
-+	struct dirent	*dent;
-+	struct stat	st;
-+	char		ln_target[PATH_MAX];
-+	ext2_ino_t	ino;
-+	errcode_t	retval;
-+	int		read_cnt;
-+
-+	root = EXT2_ROOT_INO;
-+
-+	if (chdir(source_dir) < 0) {
-+		com_err(__func__, errno,
-+			_("while changing working directory to \"%s\""), source_dir);
-+		return errno;
-+	}
-+
-+	if (!(dh = opendir("."))) {
-+		com_err(__func__, errno,
-+			_("while openning directory \"%s\""), source_dir);
-+		return errno;
-+	}
-+
-+	while((dent = readdir(dh))) {
-+		if((!strcmp(dent->d_name, ".")) || (!strcmp(dent->d_name, "..")))
-+			continue;
-+		lstat(dent->d_name, &st);
-+		name = dent->d_name;
-+
-+		switch(st.st_mode & S_IFMT) {
-+			case S_IFCHR:
-+			case S_IFBLK:
-+			case S_IFIFO:
-+				if ((retval = do_mknod_internal(parent_ino, name, &st))) {
-+					com_err(__func__, retval,
-+						_("while creating special file \"%s\""), name);
-+					return retval;
-+				}
-+				break;
-+			case S_IFSOCK:
-+				/* FIXME: there is no make socket function atm. */
-+				com_err(__func__, 0,
-+					_("ignoring socket file \"%s\""), name);
-+				continue;
-+			case S_IFLNK:
-+				if((read_cnt = readlink(name, ln_target, sizeof(ln_target))) == -1) {
-+					com_err(__func__, errno,
-+						_("while trying to readlink \"%s\""), name);
-+					return errno;
-+				}
-+				ln_target[read_cnt] = '\0';
-+				if ((retval = do_symlink_internal(parent_ino, name, ln_target))) {
-+					com_err(__func__, retval,
-+						_("while writing symlink\"%s\""), name);
-+					return retval;
-+				}
-+				break;
-+			case S_IFREG:
-+				if ((retval = do_write_internal(parent_ino, name, name))) {
-+					com_err(__func__, retval,
-+						_("while writing file \"%s\""), name);
-+					return retval;
-+				}
-+				break;
-+			case S_IFDIR:
-+				if ((retval = do_mkdir_internal(parent_ino, name, &st))) {
-+					com_err(__func__, retval,
-+						_("while making dir \"%s\""), name);
-+					return retval;
-+				}
-+				if ((retval = ext2fs_namei(current_fs, root, parent_ino, name, &ino))) {
-+					com_err(name, retval, 0);
-+						return retval;
-+				}
-+				/* Populate the dir recursively*/
-+				retval = populate_fs(ino, name);
-+				if (retval) {
-+					com_err(__func__, retval, _("while adding dir \"%s\""), name);
-+					return retval;
-+				}
-+				chdir("..");
-+				break;
-+			default:
-+				com_err(__func__, 0,
-+					_("ignoring entry \"%s\""), name);
-+		}
-+	}
-+	closedir(dh);
-+	return retval;
- }
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0003-misc-create_inode.c-create-special-file.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0003-misc-create_inode.c-create-special-file.patch
deleted file mode 100644
index 3847b6e..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0003-misc-create_inode.c-create-special-file.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From ae7d33823bfc330e08b25c5fe4d25838ef7c77ce Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 23 Dec 2013 03:13:28 -0500
-Subject: [PATCH 03/11] misc/create_inode.c: create special file
-
-The do_mknod_internal() is used for creating special file which is
-block, character and fifo, most of the code are from debugfs/debugfs.c,
-the debugfs/debugfs.c will be modified to use this function.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- misc/create_inode.c |   72 +++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 72 insertions(+)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index b68b910..4da8aff 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -11,6 +11,78 @@
- /* Make a special file which is block, character and fifo */
- errcode_t do_mknod_internal(ext2_ino_t cwd, const char *name, struct stat *st)
- {
-+	ext2_ino_t		ino;
-+	errcode_t 		retval;
-+	struct ext2_inode	inode;
-+	unsigned long		major, minor, mode;
-+	int			filetype;
-+
-+	switch(st->st_mode & S_IFMT) {
-+		case S_IFCHR:
-+			mode = LINUX_S_IFCHR;
-+			filetype = EXT2_FT_CHRDEV;
-+			break;
-+		case S_IFBLK:
-+			mode = LINUX_S_IFBLK;
-+			filetype =  EXT2_FT_BLKDEV;
-+			break;
-+		case S_IFIFO:
-+			mode = LINUX_S_IFIFO;
-+			filetype = EXT2_FT_FIFO;
-+			break;
-+	}
-+
-+	if (!(current_fs->flags & EXT2_FLAG_RW)) {
-+		com_err(__func__, 0, "Filesystem opened read/only");
-+		return -1;
-+	}
-+	retval = ext2fs_new_inode(current_fs, cwd, 010755, 0, &ino);
-+	if (retval) {
-+		com_err(__func__, retval, 0);
-+		return retval;
-+	}
-+
-+#ifdef DEBUGFS
-+	printf("Allocated inode: %u\n", ino);
-+#endif
-+	retval = ext2fs_link(current_fs, cwd, name, ino, filetype);
-+	if (retval == EXT2_ET_DIR_NO_SPACE) {
-+		retval = ext2fs_expand_dir(current_fs, cwd);
-+		if (retval) {
-+			com_err(__func__, retval, "while expanding directory");
-+			return retval;
-+		}
-+		retval = ext2fs_link(current_fs, cwd, name, ino, filetype);
-+	}
-+	if (retval) {
-+		com_err(name, retval, 0);
-+		return -1;
-+	}
-+        if (ext2fs_test_inode_bitmap2(current_fs->inode_map, ino))
-+		com_err(__func__, 0, "Warning: inode already set");
-+	ext2fs_inode_alloc_stats2(current_fs, ino, +1, 0);
-+	memset(&inode, 0, sizeof(inode));
-+	inode.i_mode = mode;
-+	inode.i_atime = inode.i_ctime = inode.i_mtime =
-+		current_fs->now ? current_fs->now : time(0);
-+
-+	major = major(st->st_rdev);
-+	minor = minor(st->st_rdev);
-+
-+	if ((major < 256) && (minor < 256)) {
-+		inode.i_block[0] = major * 256 + minor;
-+		inode.i_block[1] = 0;
-+	} else {
-+		inode.i_block[0] = 0;
-+		inode.i_block[1] = (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
-+	}
-+	inode.i_links_count = 1;
-+
-+	retval = ext2fs_write_new_inode(current_fs, ino, &inode);
-+	if (retval)
-+		com_err(__func__, retval, "while creating inode %u", ino);
-+
-+	return retval;
- }
- 
- /* Make a symlink name -> target */
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0004-misc-create_inode.c-create-symlink.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0004-misc-create_inode.c-create-symlink.patch
deleted file mode 100644
index 83d198c..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0004-misc-create_inode.c-create-symlink.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 09d3049776882167f7249ee26265b4163d7222c1 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 23 Dec 2013 03:19:55 -0500
-Subject: [PATCH 04/11] misc/create_inode.c: create symlink
-
-The do_symlink_internal() is used for creating symlinks, most of the
-code are from debugfs/debugfs.c, the debugfs/debugfs.c will be modified
-to use this function.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- misc/create_inode.c |   32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index 4da8aff..f845103 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -88,6 +88,38 @@ errcode_t do_mknod_internal(ext2_ino_t cwd, const char *name, struct stat *st)
- /* Make a symlink name -> target */
- errcode_t do_symlink_internal(ext2_ino_t cwd, const char *name, char *target)
- {
-+	char			*cp;
-+	ext2_ino_t		parent_ino;
-+	errcode_t		retval;
-+	struct ext2_inode	inode;
-+	struct stat		st;
-+
-+	cp = strrchr(name, '/');
-+	if (cp) {
-+		*cp = 0;
-+		if ((retval =  ext2fs_namei(current_fs, root, cwd, name, &parent_ino))){
-+			com_err(name, retval, 0);
-+			return retval;
-+		}
-+		name = cp+1;
-+	} else
-+		parent_ino = cwd;
-+
-+try_again:
-+	retval = ext2fs_symlink(current_fs, parent_ino, 0, name, target);
-+	if (retval == EXT2_ET_DIR_NO_SPACE) {
-+		retval = ext2fs_expand_dir(current_fs, parent_ino);
-+		if (retval) {
-+			com_err("do_symlink_internal", retval, "while expanding directory");
-+			return retval;
-+		}
-+		goto try_again;
-+	}
-+	if (retval) {
-+		com_err("ext2fs_symlink", retval, 0);
-+		return retval;
-+	}
-+
- }
- 
- /* Make a directory in the fs */
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0005-misc-create_inode.c-copy-regular-file.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0005-misc-create_inode.c-copy-regular-file.patch
deleted file mode 100644
index 7935cd8..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0005-misc-create_inode.c-copy-regular-file.patch
+++ /dev/null
@@ -1,224 +0,0 @@
-From 2973c74afaa532f3f72639b463322b2523519c20 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 23 Dec 2013 03:28:12 -0500
-Subject: [PATCH 05/11] misc/create_inode.c: copy regular file
-
-The do_write_internal() is used for copying file from native fs to
-target, most of the code are from debugfs/debugfs.c, the
-debugfs/debugfs.c will be modified to use this function.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- misc/create_inode.c |  183 +++++++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 183 insertions(+)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index f845103..98f4a93 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -8,6 +8,16 @@
- # endif
- #endif
- 
-+/* 64KiB is the minimium blksize to best minimize system call overhead. */
-+#ifndef IO_BUFSIZE
-+#define IO_BUFSIZE 64*1024
-+#endif
-+
-+/* Block size for `st_blocks' */
-+#ifndef S_BLKSIZE
-+#define S_BLKSIZE 512
-+#endif
-+
- /* Make a special file which is block, character and fifo */
- errcode_t do_mknod_internal(ext2_ino_t cwd, const char *name, struct stat *st)
- {
-@@ -127,9 +137,182 @@ errcode_t do_mkdir_internal(ext2_ino_t cwd, const char *name, struct stat *st)
- {
- }
- 
-+static errcode_t copy_file(int fd, ext2_ino_t newfile, int bufsize, int make_holes)
-+{
-+	ext2_file_t	e2_file;
-+	errcode_t	retval;
-+	int		got;
-+	unsigned int	written;
-+	char		*buf;
-+	char		*ptr;
-+	char		*zero_buf;
-+	int		cmp;
-+
-+	retval = ext2fs_file_open(current_fs, newfile,
-+				  EXT2_FILE_WRITE, &e2_file);
-+	if (retval)
-+		return retval;
-+
-+	retval = ext2fs_get_mem(bufsize, &buf);
-+	if (retval) {
-+		com_err("copy_file", retval, "can't allocate buffer\n");
-+		return retval;
-+	}
-+
-+	/* This is used for checking whether the whole block is zero */
-+	retval = ext2fs_get_memzero(bufsize, &zero_buf);
-+	if (retval) {
-+		com_err("copy_file", retval, "can't allocate buffer\n");
-+		ext2fs_free_mem(&buf);
-+		return retval;
-+	}
-+
-+	while (1) {
-+		got = read(fd, buf, bufsize);
-+		if (got == 0)
-+			break;
-+		if (got < 0) {
-+			retval = errno;
-+			goto fail;
-+		}
-+		ptr = buf;
-+
-+		/* Sparse copy */
-+		if (make_holes) {
-+			/* Check whether all is zero */
-+			cmp = memcmp(ptr, zero_buf, got);
-+			if (cmp == 0) {
-+				 /* The whole block is zero, make a hole */
-+				retval = ext2fs_file_lseek(e2_file, got, EXT2_SEEK_CUR, NULL);
-+				if (retval)
-+					goto fail;
-+				got = 0;
-+			}
-+		}
-+
-+		/* Normal copy */
-+		while (got > 0) {
-+			retval = ext2fs_file_write(e2_file, ptr,
-+						   got, &written);
-+			if (retval)
-+				goto fail;
-+
-+			got -= written;
-+			ptr += written;
-+		}
-+	}
-+	ext2fs_free_mem(&buf);
-+	ext2fs_free_mem(&zero_buf);
-+	retval = ext2fs_file_close(e2_file);
-+	return retval;
-+
-+fail:
-+	ext2fs_free_mem(&buf);
-+	ext2fs_free_mem(&zero_buf);
-+	(void) ext2fs_file_close(e2_file);
-+	return retval;
-+}
-+
- /* Copy the native file to the fs */
- errcode_t do_write_internal(ext2_ino_t cwd, const char *src, const char *dest)
- {
-+	int		fd;
-+	struct stat	statbuf;
-+	ext2_ino_t	newfile;
-+	errcode_t	retval;
-+	struct ext2_inode inode;
-+	int		bufsize = IO_BUFSIZE;
-+	int		make_holes = 0;
-+
-+	fd = open(src, O_RDONLY);
-+	if (fd < 0) {
-+		com_err(src, errno, 0);
-+		return errno;
-+	}
-+	if (fstat(fd, &statbuf) < 0) {
-+		com_err(src, errno, 0);
-+		close(fd);
-+		return errno;
-+	}
-+
-+	retval = ext2fs_namei(current_fs, root, cwd, dest, &newfile);
-+	if (retval == 0) {
-+		com_err(__func__, 0, "The file '%s' already exists\n", dest);
-+		close(fd);
-+		return retval;
-+	}
-+
-+	retval = ext2fs_new_inode(current_fs, cwd, 010755, 0, &newfile);
-+	if (retval) {
-+		com_err(__func__, retval, 0);
-+		close(fd);
-+		return retval;
-+	}
-+#ifdef DEBUGFS
-+	printf("Allocated inode: %u\n", newfile);
-+#endif
-+	retval = ext2fs_link(current_fs, cwd, dest, newfile,
-+				EXT2_FT_REG_FILE);
-+	if (retval == EXT2_ET_DIR_NO_SPACE) {
-+		retval = ext2fs_expand_dir(current_fs, cwd);
-+		if (retval) {
-+			com_err(__func__, retval, "while expanding directory");
-+			close(fd);
-+			return retval;
-+		}
-+		retval = ext2fs_link(current_fs, cwd, dest, newfile,
-+					EXT2_FT_REG_FILE);
-+	}
-+	if (retval) {
-+		com_err(dest, retval, 0);
-+		close(fd);
-+		return retval;
-+	}
-+        if (ext2fs_test_inode_bitmap2(current_fs->inode_map, newfile))
-+		com_err(__func__, 0, "Warning: inode already set");
-+	ext2fs_inode_alloc_stats2(current_fs, newfile, +1, 0);
-+	memset(&inode, 0, sizeof(inode));
-+	inode.i_mode = (statbuf.st_mode & ~LINUX_S_IFMT) | LINUX_S_IFREG;
-+	inode.i_atime = inode.i_ctime = inode.i_mtime =
-+		current_fs->now ? current_fs->now : time(0);
-+	inode.i_links_count = 1;
-+	inode.i_size = statbuf.st_size;
-+	if (current_fs->super->s_feature_incompat &
-+	    EXT3_FEATURE_INCOMPAT_EXTENTS) {
-+		int i;
-+		struct ext3_extent_header *eh;
-+
-+		eh = (struct ext3_extent_header *) &inode.i_block[0];
-+		eh->eh_depth = 0;
-+		eh->eh_entries = 0;
-+		eh->eh_magic = ext2fs_cpu_to_le16(EXT3_EXT_MAGIC);
-+		i = (sizeof(inode.i_block) - sizeof(*eh)) /
-+			sizeof(struct ext3_extent);
-+		eh->eh_max = ext2fs_cpu_to_le16(i);
-+		inode.i_flags |= EXT4_EXTENTS_FL;
-+	}
-+
-+	if ((retval = ext2fs_write_new_inode(current_fs, newfile, &inode))) {
-+		com_err(__func__, retval, "while creating inode %u", newfile);
-+		close(fd);
-+		return retval;
-+	}
-+	if (LINUX_S_ISREG(inode.i_mode)) {
-+		if (statbuf.st_blocks < statbuf.st_size / S_BLKSIZE) {
-+			make_holes = 1;
-+			/*
-+			 * Use I/O blocksize as buffer size when
-+			 * copying sparse files.
-+			 */
-+			bufsize = statbuf.st_blksize;
-+		}
-+		retval = copy_file(fd, newfile, bufsize, make_holes);
-+		if (retval)
-+			com_err("copy_file", retval, 0);
-+	}
-+	close(fd);
-+
-+	return 0;
- }
- 
- /* Copy files from source_dir to fs */
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0006-misc-create_inode.c-create-directory.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0006-misc-create_inode.c-create-directory.patch
deleted file mode 100644
index 5c7ca9c..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0006-misc-create_inode.c-create-directory.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From c8d1c43be24489036137f8fdebcfccc208f7cc8b Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 23 Dec 2013 03:34:14 -0500
-Subject: [PATCH 06/11] misc/create_inode.c: create directory
-
-The do_mkdir_internal() is used for making dir on the target fs, most of
-the code are from debugfs/debugfs.c, the debugfs/debugfs.c will be
-modified to use this function.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- misc/create_inode.c |   31 +++++++++++++++++++++++++++++++
- 1 file changed, 31 insertions(+)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index 98f4a93..6a8c92a 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -135,6 +135,37 @@ try_again:
- /* Make a directory in the fs */
- errcode_t do_mkdir_internal(ext2_ino_t cwd, const char *name, struct stat *st)
- {
-+	char			*cp;
-+	ext2_ino_t		parent_ino, ino;
-+	errcode_t		retval;
-+	struct ext2_inode	inode;
-+
-+
-+	cp = strrchr(name, '/');
-+	if (cp) {
-+		*cp = 0;
-+		if ((retval =  ext2fs_namei(current_fs, root, cwd, name, &parent_ino))){
-+			com_err(name, retval, 0);
-+			return retval;
-+		}
-+		name = cp+1;
-+	} else
-+		parent_ino = cwd;
-+
-+try_again:
-+	retval = ext2fs_mkdir(current_fs, parent_ino, 0, name);
-+	if (retval == EXT2_ET_DIR_NO_SPACE) {
-+		retval = ext2fs_expand_dir(current_fs, parent_ino);
-+		if (retval) {
-+			com_err(__func__, retval, "while expanding directory");
-+			return retval;
-+		}
-+		goto try_again;
-+	}
-+	if (retval) {
-+		com_err("ext2fs_mkdir", retval, 0);
-+		return retval;
-+	}
- }
- 
- static errcode_t copy_file(int fd, ext2_ino_t newfile, int bufsize, int make_holes)
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0007-misc-create_inode.c-set-owner-mode-time-for-the-inod.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0007-misc-create_inode.c-set-owner-mode-time-for-the-inod.patch
deleted file mode 100644
index f296393..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0007-misc-create_inode.c-set-owner-mode-time-for-the-inod.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 2b1f6e6b386703a5d7e60b7d8b72746f3d31a8bc Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 23 Dec 2013 03:39:56 -0500
-Subject: [PATCH 07/11] misc/create_inode.c: set owner/mode/time for the inode
-
-Set the uid, gid, mode and time for inode.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- misc/create_inode.c |   45 +++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 45 insertions(+)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index 6a8c92a..aad7354 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -18,6 +18,40 @@
- #define S_BLKSIZE 512
- #endif
- 
-+/* Fill the uid, gid, mode and time for the inode */
-+static void fill_inode(struct ext2_inode *inode, struct stat *st)
-+{
-+	if (st != NULL) {
-+		inode->i_uid = st->st_uid;
-+		inode->i_gid = st->st_gid;
-+		inode->i_mode |= st->st_mode;
-+		inode->i_atime = st->st_atime;
-+		inode->i_mtime = st->st_mtime;
-+		inode->i_ctime = st->st_ctime;
-+	}
-+}
-+
-+/* Set the uid, gid, mode and time for the inode */
-+errcode_t set_inode_extra(ext2_ino_t cwd, ext2_ino_t ino, struct stat *st)
-+{
-+	errcode_t		retval;
-+	struct ext2_inode	inode;
-+
-+	retval = ext2fs_read_inode(current_fs, ino, &inode);
-+        if (retval) {
-+		com_err(__func__, retval, "while reading inode %u", ino);
-+		return retval;
-+	}
-+
-+	fill_inode(&inode, st);
-+
-+	retval = ext2fs_write_inode(current_fs, ino, &inode);
-+	if (retval) {
-+		com_err(__func__, retval, "while writing inode %u", ino);
-+		return retval;
-+	}
-+}
-+
- /* Make a special file which is block, character and fifo */
- errcode_t do_mknod_internal(ext2_ino_t cwd, const char *name, struct stat *st)
- {
-@@ -435,6 +469,17 @@ errcode_t populate_fs(ext2_ino_t parent_ino, const char *source_dir)
- 				com_err(__func__, 0,
- 					_("ignoring entry \"%s\""), name);
- 		}
-+
-+		if ((retval =  ext2fs_namei(current_fs, root, parent_ino, name, &ino))){
-+			com_err(name, retval, 0);
-+			return retval;
-+		}
-+
-+		if ((retval = set_inode_extra(parent_ino, ino, &st))) {
-+			com_err(__func__, retval,
-+				_("while setting inode for \"%s\""), name);
-+			return retval;
-+		}
- 	}
- 	closedir(dh);
- 	return retval;
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0008-mke2fs.c-add-an-option-d-root-directory.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0008-mke2fs.c-add-an-option-d-root-directory.patch
deleted file mode 100644
index 1f98673..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0008-mke2fs.c-add-an-option-d-root-directory.patch
+++ /dev/null
@@ -1,168 +0,0 @@
-From df856929e42bd4f3bdc8d4f59ee82ae8b28532e6 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 24 Dec 2013 01:50:45 -0500
-Subject: [PATCH 08/11] mke2fs.c: add an option: -d root-directory
-
-This option is used for adding the files from a given directory (the
-root-directory) to the filesystem, it is similiar to genext2fs, but
-genext2fs doesn't fully support ext4.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- misc/Makefile.in |   14 ++++++++++----
- misc/mke2fs.c    |   32 +++++++++++++++++++++++---------
- 2 files changed, 33 insertions(+), 13 deletions(-)
-
-diff --git a/misc/Makefile.in b/misc/Makefile.in
-index 553c361..8253723 100644
---- a/misc/Makefile.in
-+++ b/misc/Makefile.in
-@@ -42,7 +42,8 @@ LPROGS=		@E2INITRD_PROG@
- 
- TUNE2FS_OBJS=	tune2fs.o util.o
- MKLPF_OBJS=	mklost+found.o
--MKE2FS_OBJS=	mke2fs.o util.o profile.o prof_err.o default_profile.o
-+MKE2FS_OBJS=	mke2fs.o util.o profile.o prof_err.o default_profile.o \
-+			create_inode.o
- CHATTR_OBJS=	chattr.o
- LSATTR_OBJS=	lsattr.o
- UUIDGEN_OBJS=	uuidgen.o
-@@ -60,7 +61,8 @@ E2FREEFRAG_OBJS= e2freefrag.o
- PROFILED_TUNE2FS_OBJS=	profiled/tune2fs.o profiled/util.o
- PROFILED_MKLPF_OBJS=	profiled/mklost+found.o
- PROFILED_MKE2FS_OBJS=	profiled/mke2fs.o profiled/util.o profiled/profile.o \
--			profiled/prof_err.o profiled/default_profile.o
-+			profiled/prof_err.o profiled/default_profile.o \
-+			profiled/create_inode.o
- PROFILED_CHATTR_OBJS=	profiled/chattr.o
- PROFILED_LSATTR_OBJS=	profiled/lsattr.o
- PROFILED_UUIDGEN_OBJS=	profiled/uuidgen.o
-@@ -82,7 +84,7 @@ SRCS=	$(srcdir)/tune2fs.c $(srcdir)/mklost+found.c $(srcdir)/mke2fs.c \
- 		$(srcdir)/uuidgen.c $(srcdir)/blkid.c $(srcdir)/logsave.c \
- 		$(srcdir)/filefrag.c $(srcdir)/base_device.c \
- 		$(srcdir)/ismounted.c $(srcdir)/../e2fsck/profile.c \
--		$(srcdir)/e2undo.c $(srcdir)/e2freefrag.c
-+		$(srcdir)/e2undo.c $(srcdir)/e2freefrag.c $(srcdir)/create_inode.c
- 
- LIBS= $(LIBEXT2FS) $(LIBCOM_ERR) 
- DEPLIBS= $(LIBEXT2FS) $(DEPLIBCOM_ERR)
-@@ -630,7 +632,7 @@ mke2fs.o: $(srcdir)/mke2fs.c $(top_builddir)/lib/config.h \
-  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
-  $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
-  $(srcdir)/util.h profile.h prof_err.h $(top_srcdir)/version.h \
-- $(srcdir)/nls-enable.h $(top_srcdir)/lib/quota/mkquota.h \
-+ $(srcdir)/nls-enable.h $(top_srcdir)/lib/quota/mkquota.h $(srcdir)/create_inode.h\
-  $(top_srcdir)/lib/quota/quotaio.h $(top_srcdir)/lib/quota/dqblk_v2.h \
-  $(top_srcdir)/lib/quota/quotaio_tree.h $(top_srcdir)/lib/../e2fsck/dict.h
- chattr.o: $(srcdir)/chattr.c $(top_builddir)/lib/config.h \
-@@ -710,3 +712,7 @@ e2freefrag.o: $(srcdir)/e2freefrag.c $(top_builddir)/lib/config.h \
-  $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
-  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
-  $(srcdir)/e2freefrag.h
-+create_inode.o: $(srcdir)/create_inode.h $(srcdir)/create_inode.c \
-+ $(top_builddir)/lib/config.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
-+ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/e2p/e2p.h \
-+ $(srcdir)/nls-enable.h
-diff --git a/misc/mke2fs.c b/misc/mke2fs.c
-index 2e8ba60..578b62d 100644
---- a/misc/mke2fs.c
-+++ b/misc/mke2fs.c
-@@ -22,7 +22,6 @@
- #include <stdio.h>
- #include <string.h>
- #include <strings.h>
--#include <fcntl.h>
- #include <ctype.h>
- #include <time.h>
- #ifdef __linux__
-@@ -44,24 +43,19 @@ extern int optind;
- #include <errno.h>
- #endif
- #include <sys/ioctl.h>
--#include <sys/types.h>
--#include <sys/stat.h>
- #include <libgen.h>
- #include <limits.h>
- #include <blkid/blkid.h>
- 
- #include "ext2fs/ext2_fs.h"
- #include "ext2fs/ext2fsP.h"
--#include "et/com_err.h"
- #include "uuid/uuid.h"
--#include "e2p/e2p.h"
--#include "ext2fs/ext2fs.h"
- #include "util.h"
- #include "profile.h"
- #include "prof_err.h"
- #include "../version.h"
--#include "nls-enable.h"
- #include "quota/mkquota.h"
-+#include "create_inode.h"
- 
- #define STRIDE_LENGTH 8
- 
-@@ -105,6 +99,7 @@ static char *mount_dir;
- char *journal_device;
- static int sync_kludge;	/* Set using the MKE2FS_SYNC env. option */
- static char **fs_types;
-+const char *root_dir;  /* Copy files from the specified directory */
- 
- static profile_t	profile;
- 
-@@ -116,7 +111,8 @@ static void usage(void)
- 	fprintf(stderr, _("Usage: %s [-c|-l filename] [-b block-size] "
- 	"[-C cluster-size]\n\t[-i bytes-per-inode] [-I inode-size] "
- 	"[-J journal-options]\n"
--	"\t[-G flex-group-size] [-N number-of-inodes]\n"
-+	"\t[-G flex-group-size] [-N number-of-inodes] "
-+	"[-d root-directory]\n"
- 	"\t[-m reserved-blocks-percentage] [-o creator-os]\n"
- 	"\t[-g blocks-per-group] [-L volume-label] "
- 	"[-M last-mounted-directory]\n\t[-O feature[,...]] "
-@@ -1394,7 +1390,7 @@ profile_error:
- 	}
- 
- 	while ((c = getopt (argc, argv,
--		    "b:cg:i:jl:m:no:qr:s:t:vC:DE:FG:I:J:KL:M:N:O:R:ST:U:V")) != EOF) {
-+		    "b:cg:i:jl:m:no:qr:s:t:d:vC:DE:FG:I:J:KL:M:N:O:R:ST:U:V")) != EOF) {
- 		switch (c) {
- 		case 'b':
- 			blocksize = parse_num_blocks2(optarg, -1);
-@@ -1582,6 +1578,9 @@ profile_error:
- 		case 'U':
- 			fs_uuid = optarg;
- 			break;
-+		case 'd':
-+			root_dir = optarg;
-+			break;
- 		case 'v':
- 			verbose = 1;
- 			break;
-@@ -2726,6 +2725,21 @@ no_journal:
- 				       EXT4_FEATURE_RO_COMPAT_QUOTA))
- 		create_quota_inodes(fs);
- 
-+	/* Copy files from the specified directory */
-+	if (root_dir) {
-+		if (!quiet)
-+			printf("%s", _("Copying files into the device: "));
-+
-+		current_fs = fs;
-+		root = EXT2_ROOT_INO;
-+		retval = populate_fs(root, root_dir);
-+		if (retval)
-+			fprintf(stderr, "%s",
-+				_("\nError while populating file system"));
-+		else if (!quiet)
-+			printf("%s", _("done\n"));
-+	}
-+
- 	if (!quiet)
- 		printf("%s", _("Writing superblocks and "
- 		       "filesystem accounting information: "));
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0009-misc-create_inode.c-handle-hardlinks.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0009-misc-create_inode.c-handle-hardlinks.patch
deleted file mode 100644
index a330ee4..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0009-misc-create_inode.c-handle-hardlinks.patch
+++ /dev/null
@@ -1,210 +0,0 @@
-From d83dc950b3ec1fbde33b23d42c5154091a74f4d9 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 23 Dec 2013 03:44:03 -0500
-Subject: [PATCH 09/11] misc/create_inode.c: handle hardlinks
-
-Create the inode and save the native inode number when we meet the hard
-link (st_nlink > 1) at the first time, use ext2fs_link() to link the
-name to the target inode number when we meet the same native inode
-number again.
-
-This algorithm is referred from the genext2fs.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- misc/create_inode.c |   88 +++++++++++++++++++++++++++++++++++++++++++++++++++
- misc/create_inode.h |   18 +++++++++++
- misc/mke2fs.c       |   12 +++++++
- 3 files changed, 118 insertions(+)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index aad7354..763504d 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -18,6 +18,44 @@
- #define S_BLKSIZE 512
- #endif
- 
-+/* For saving the hard links */
-+int hdlink_cnt = HDLINK_CNT;
-+
-+/* Link an inode number to a directory */
-+static errcode_t add_link(ext2_ino_t parent_ino, ext2_ino_t ino, const char *name)
-+{
-+	struct ext2_inode	inode;
-+	errcode_t		retval;
-+
-+	retval = ext2fs_read_inode(current_fs, ino, &inode);
-+        if (retval) {
-+		com_err(__func__, retval, "while reading inode %u", ino);
-+		return retval;
-+	}
-+
-+	retval = ext2fs_link(current_fs, parent_ino, name, ino, inode.i_flags);
-+	if (retval == EXT2_ET_DIR_NO_SPACE) {
-+		retval = ext2fs_expand_dir(current_fs, parent_ino);
-+		if (retval) {
-+			com_err(__func__, retval, "while expanding directory");
-+			return retval;
-+		}
-+		retval = ext2fs_link(current_fs, parent_ino, name, ino, inode.i_flags);
-+	}
-+	if (retval) {
-+		com_err(__func__, retval, "while linking %s", name);
-+		return retval;
-+	}
-+
-+	inode.i_links_count++;
-+
-+	retval = ext2fs_write_inode(current_fs, ino, &inode);
-+	if (retval)
-+		com_err(__func__, retval, "while writing inode %u", ino);
-+
-+	return retval;
-+}
-+
- /* Fill the uid, gid, mode and time for the inode */
- static void fill_inode(struct ext2_inode *inode, struct stat *st)
- {
-@@ -278,6 +316,17 @@ fail:
- 	return retval;
- }
- 
-+int is_hardlink(ext2_ino_t ino)
-+{
-+	int i;
-+
-+	for(i = 0; i < hdlinks.count; i++) {
-+		if(hdlinks.hdl[i].src_ino == ino)
-+			return i;
-+	}
-+	return -1;
-+}
-+
- /* Copy the native file to the fs */
- errcode_t do_write_internal(ext2_ino_t cwd, const char *src, const char *dest)
- {
-@@ -388,9 +437,11 @@ errcode_t populate_fs(ext2_ino_t parent_ino, const char *source_dir)
- 	struct dirent	*dent;
- 	struct stat	st;
- 	char		ln_target[PATH_MAX];
-+	unsigned int	save_inode;
- 	ext2_ino_t	ino;
- 	errcode_t	retval;
- 	int		read_cnt;
-+	int		hdlink;
- 
- 	root = EXT2_ROOT_INO;
- 
-@@ -412,6 +463,22 @@ errcode_t populate_fs(ext2_ino_t parent_ino, const char *source_dir)
- 		lstat(dent->d_name, &st);
- 		name = dent->d_name;
- 
-+		/* Check for hardlinks */
-+		save_inode = 0;
-+		if (!S_ISDIR(st.st_mode) && !S_ISLNK(st.st_mode) && st.st_nlink > 1) {
-+			hdlink = is_hardlink(st.st_ino);
-+			if (hdlink >= 0) {
-+				retval = add_link(parent_ino,
-+						hdlinks.hdl[hdlink].dst_ino, name);
-+				if (retval) {
-+					com_err(__func__, retval, "while linking %s", name);
-+					return retval;
-+				}
-+				continue;
-+			} else
-+				save_inode = 1;
-+		}
-+
- 		switch(st.st_mode & S_IFMT) {
- 			case S_IFCHR:
- 			case S_IFBLK:
-@@ -480,6 +547,27 @@ errcode_t populate_fs(ext2_ino_t parent_ino, const char *source_dir)
- 				_("while setting inode for \"%s\""), name);
- 			return retval;
- 		}
-+
-+		/* Save the hardlink ino */
-+		if (save_inode) {
-+			/*
-+			 * Check whether need more memory, and we don't need
-+			 * free() since the lifespan will be over after the fs
-+			 * populated.
-+			 */
-+			if (hdlinks.count == hdlink_cnt) {
-+				if ((hdlinks.hdl = realloc (hdlinks.hdl,
-+						(hdlink_cnt + HDLINK_CNT) *
-+						sizeof (struct hdlink_s))) == NULL) {
-+					com_err(name, errno, "Not enough memory");
-+					return errno;
-+				}
-+				hdlink_cnt += HDLINK_CNT;
-+			}
-+			hdlinks.hdl[hdlinks.count].src_ino = st.st_ino;
-+			hdlinks.hdl[hdlinks.count].dst_ino = ino;
-+			hdlinks.count++;
-+		}
- 	}
- 	closedir(dh);
- 	return retval;
-diff --git a/misc/create_inode.h b/misc/create_inode.h
-index 9fc97fa..2b6d429 100644
---- a/misc/create_inode.h
-+++ b/misc/create_inode.h
-@@ -6,9 +6,27 @@
- #include "ext2fs/ext2fs.h"
- #include "nls-enable.h"
- 
-+struct hdlink_s
-+{
-+	ext2_ino_t src_ino;
-+	ext2_ino_t dst_ino;
-+};
-+
-+struct hdlinks_s
-+{
-+	int count;
-+	struct hdlink_s *hdl;
-+};
-+
-+struct hdlinks_s hdlinks;
-+
- ext2_filsys    current_fs;
- ext2_ino_t     root;
- 
-+/* For saving the hard links */
-+#define HDLINK_CNT     4
-+extern int hdlink_cnt;
-+
- /* For populating the filesystem */
- extern errcode_t populate_fs(ext2_ino_t parent_ino, const char *source_dir);
- extern errcode_t do_mknod_internal(ext2_ino_t cwd, const char *name, struct stat *st);
-diff --git a/misc/mke2fs.c b/misc/mke2fs.c
-index 578b62d..a63f0b7 100644
---- a/misc/mke2fs.c
-+++ b/misc/mke2fs.c
-@@ -2730,6 +2730,18 @@ no_journal:
- 		if (!quiet)
- 			printf("%s", _("Copying files into the device: "));
- 
-+		/*
-+		 * Allocate memory for the hardlinks, we don't need free()
-+		 * since the lifespan will be over after the fs populated.
-+		 */
-+		if ((hdlinks.hdl = (struct hdlink_s *)
-+				malloc(hdlink_cnt * sizeof(struct hdlink_s))) == NULL) {
-+			fprintf(stderr, "%s", _("\nNot enough memory\n"));
-+			retval = ext2fs_close(fs);
-+			return retval;
-+		}
-+
-+		hdlinks.count = 0;
- 		current_fs = fs;
- 		root = EXT2_ROOT_INO;
- 		retval = populate_fs(root, root_dir);
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0010-debugfs-use-the-functions-in-misc-create_inode.c.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0010-debugfs-use-the-functions-in-misc-create_inode.c.patch
deleted file mode 100644
index 2a6ca8f..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0010-debugfs-use-the-functions-in-misc-create_inode.c.patch
+++ /dev/null
@@ -1,496 +0,0 @@
-From db89992fab2215f52dce4c595a39271b4ff3000b Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 23 Dec 2013 04:22:22 -0500
-Subject: [PATCH 10/11] debugfs: use the functions in misc/create_inode.c
-
-* Use the functions in misc/create_inode.c, and remove the duplicated
-  code.
-
-* The CREATE_INODE_DEPS in the debugfs/Makefile.in is used for recording
-  create_inode.o's depends which is from misc/Makefile.in, we have to
-  recompile create_inode.o because we need it to print more messages when
-  it is used by debugfs, just like we recompile e2freefrag.o, but it seems
-  that the e2freefrag.o's depends in debugfs/Makefile.in is incorrect, it
-  would not rebuild when its depends (e.g.: lib/config.h) is changed,
-  which would cause unexpected errors. Make duplicated code in
-  debugfs/Makefile.in and misc/Makefile.in is not a good idea, maybe we'd
-  better define CREATE_INODE_DEPS in the top Makefile, I'd like to send
-  another patch and fix the e2freefrag if you are fine with it.
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- debugfs/Makefile.in |   17 ++-
- debugfs/debugfs.c   |  305 +++------------------------------------------------
- debugfs/debugfs.h   |    1 +
- 3 files changed, 31 insertions(+), 292 deletions(-)
-
-diff --git a/debugfs/Makefile.in b/debugfs/Makefile.in
-index bf037e0..f51b78e 100644
---- a/debugfs/Makefile.in
-+++ b/debugfs/Makefile.in
-@@ -18,7 +18,7 @@ MK_CMDS=	_SS_DIR_OVERRIDE=../lib/ss ../lib/ss/mk_cmds
- 
- DEBUG_OBJS= debug_cmds.o debugfs.o util.o ncheck.o icheck.o ls.o \
- 	lsdel.o dump.o set_fields.o logdump.o htree.o unused.o e2freefrag.o \
--	filefrag.o extent_cmds.o extent_inode.o zap.o
-+	filefrag.o extent_cmds.o extent_inode.o zap.o create_inode.o
- 
- RO_DEBUG_OBJS= ro_debug_cmds.o ro_debugfs.o util.o ncheck.o icheck.o ls.o \
- 	lsdel.o logdump.o htree.o e2freefrag.o filefrag.o extent_cmds.o \
-@@ -28,7 +28,13 @@ SRCS= debug_cmds.c $(srcdir)/debugfs.c $(srcdir)/util.c $(srcdir)/ls.c \
- 	$(srcdir)/ncheck.c $(srcdir)/icheck.c $(srcdir)/lsdel.c \
- 	$(srcdir)/dump.c $(srcdir)/set_fields.c ${srcdir}/logdump.c \
- 	$(srcdir)/htree.c $(srcdir)/unused.c ${srcdir}/../misc/e2freefrag.c \
--	$(srcdir)/filefrag.c $(srcdir)/extent_inode.c $(srcdir)/zap.c
-+	$(srcdir)/filefrag.c $(srcdir)/extent_inode.c $(srcdir)/zap.c \
-+	$(srcdir)/../misc/create_inode.c
-+
-+CREATE_INODE_DEPS= $(srcdir)/../misc/create_inode.h \
-+	$(srcdir)/../misc/create_inode.c $(top_builddir)/lib/config.h \
-+	$(srcdir)/../lib/ext2fs/ext2fs.h $(srcdir)/../lib/et/com_err.h \
-+	$(srcdir)/../lib/e2p/e2p.h $(srcdir)/../misc/nls-enable.h
- 
- LIBS= $(LIBEXT2FS) $(LIBE2P) $(LIBSS) $(LIBCOM_ERR) $(LIBBLKID) \
- 	$(LIBUUID)
-@@ -81,6 +87,11 @@ e2freefrag.o: $(srcdir)/../misc/e2freefrag.c
- 	$(E) "	CC $@"
- 	$(Q) $(CC) -c $(ALL_CFLAGS) -I$(srcdir) $< -DDEBUGFS -o $@
- 
-+create_inode.o: $(CREATE_INODE_DEPS)
-+	$(E) "	CC $@"
-+	$(Q) $(CC) -c $(ALL_CFLAGS) -I$(srcdir) \
-+		 $(srcdir)/../misc/create_inode.c -DDEBUGFS -o $@
-+
- debugfs.8: $(DEP_SUBSTITUTE) $(srcdir)/debugfs.8.in
- 	$(E) "	SUBST $@"
- 	$(Q) $(SUBSTITUTE_UPTIME) $(srcdir)/debugfs.8.in debugfs.8
-@@ -142,7 +153,7 @@ debugfs.o: $(srcdir)/debugfs.c $(top_srcdir)/lib/et/com_err.h \
-  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
-  $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/version.h $(srcdir)/jfs_user.h \
-  $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
-- $(top_srcdir)/lib/ext2fs/kernel-list.h
-+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(top_srcdir)/misc/util.h
- util.o: $(srcdir)/util.c $(srcdir)/debugfs.h \
-  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
-  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
-diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
-index 9c215f7..62e9f44 100644
---- a/debugfs/debugfs.c
-+++ b/debugfs/debugfs.c
-@@ -25,8 +25,6 @@ extern char *optarg;
- #include <errno.h>
- #endif
- #include <fcntl.h>
--#include <sys/types.h>
--#include <sys/stat.h>
- 
- #include "debugfs.h"
- #include "uuid/uuid.h"
-@@ -41,22 +39,11 @@ extern char *optarg;
- #define BUFSIZ 8192
- #endif
- 
--/* 64KiB is the minimium blksize to best minimize system call overhead. */
--#ifndef IO_BUFSIZE
--#define IO_BUFSIZE 64*1024
--#endif
--
--/* Block size for `st_blocks' */
--#ifndef S_BLKSIZE
--#define S_BLKSIZE 512
--#endif
--
- ss_request_table *extra_cmds;
- const char *debug_prog_name;
- int sci_idx;
- 
--ext2_filsys	current_fs = NULL;
--ext2_ino_t	root, cwd;
-+ext2_ino_t	cwd;
- 
- static void open_filesystem(char *device, int open_flags, blk64_t superblock,
- 			    blk64_t blocksize, int catastrophic,
-@@ -1576,189 +1563,24 @@ void do_find_free_inode(int argc, char *argv[])
- }
- 
- #ifndef READ_ONLY
--static errcode_t copy_file(int fd, ext2_ino_t newfile, int bufsize, int make_holes)
--{
--	ext2_file_t	e2_file;
--	errcode_t	retval;
--	int		got;
--	unsigned int	written;
--	char		*buf;
--	char		*ptr;
--	char		*zero_buf;
--	int		cmp;
--
--	retval = ext2fs_file_open(current_fs, newfile,
--				  EXT2_FILE_WRITE, &e2_file);
--	if (retval)
--		return retval;
--
--	retval = ext2fs_get_mem(bufsize, &buf);
--	if (retval) {
--		com_err("copy_file", retval, "can't allocate buffer\n");
--		return retval;
--	}
--
--	/* This is used for checking whether the whole block is zero */
--	retval = ext2fs_get_memzero(bufsize, &zero_buf);
--	if (retval) {
--		com_err("copy_file", retval, "can't allocate buffer\n");
--		ext2fs_free_mem(&buf);
--		return retval;
--	}
--
--	while (1) {
--		got = read(fd, buf, bufsize);
--		if (got == 0)
--			break;
--		if (got < 0) {
--			retval = errno;
--			goto fail;
--		}
--		ptr = buf;
--
--		/* Sparse copy */
--		if (make_holes) {
--			/* Check whether all is zero */
--			cmp = memcmp(ptr, zero_buf, got);
--			if (cmp == 0) {
--				 /* The whole block is zero, make a hole */
--				retval = ext2fs_file_lseek(e2_file, got, EXT2_SEEK_CUR, NULL);
--				if (retval)
--					goto fail;
--				got = 0;
--			}
--		}
--
--		/* Normal copy */
--		while (got > 0) {
--			retval = ext2fs_file_write(e2_file, ptr,
--						   got, &written);
--			if (retval)
--				goto fail;
--
--			got -= written;
--			ptr += written;
--		}
--	}
--	ext2fs_free_mem(&buf);
--	ext2fs_free_mem(&zero_buf);
--	retval = ext2fs_file_close(e2_file);
--	return retval;
--
--fail:
--	ext2fs_free_mem(&buf);
--	ext2fs_free_mem(&zero_buf);
--	(void) ext2fs_file_close(e2_file);
--	return retval;
--}
--
--
- void do_write(int argc, char *argv[])
- {
--	int		fd;
--	struct stat	statbuf;
--	ext2_ino_t	newfile;
- 	errcode_t	retval;
--	struct ext2_inode inode;
--	int		bufsize = IO_BUFSIZE;
--	int		make_holes = 0;
- 
- 	if (common_args_process(argc, argv, 3, 3, "write",
- 				"<native file> <new file>", CHECK_FS_RW))
- 		return;
- 
--	fd = open(argv[1], O_RDONLY);
--	if (fd < 0) {
--		com_err(argv[1], errno, 0);
--		return;
--	}
--	if (fstat(fd, &statbuf) < 0) {
--		com_err(argv[1], errno, 0);
--		close(fd);
--		return;
--	}
--
--	retval = ext2fs_namei(current_fs, root, cwd, argv[2], &newfile);
--	if (retval == 0) {
--		com_err(argv[0], 0, "The file '%s' already exists\n", argv[2]);
--		close(fd);
--		return;
--	}
--
--	retval = ext2fs_new_inode(current_fs, cwd, 010755, 0, &newfile);
--	if (retval) {
-+	if ((retval = do_write_internal(cwd, argv[1], argv[2])))
- 		com_err(argv[0], retval, 0);
--		close(fd);
--		return;
--	}
--	printf("Allocated inode: %u\n", newfile);
--	retval = ext2fs_link(current_fs, cwd, argv[2], newfile,
--			     EXT2_FT_REG_FILE);
--	if (retval == EXT2_ET_DIR_NO_SPACE) {
--		retval = ext2fs_expand_dir(current_fs, cwd);
--		if (retval) {
--			com_err(argv[0], retval, "while expanding directory");
--			close(fd);
--			return;
--		}
--		retval = ext2fs_link(current_fs, cwd, argv[2], newfile,
--				     EXT2_FT_REG_FILE);
--	}
--	if (retval) {
--		com_err(argv[2], retval, 0);
--		close(fd);
--		return;
--	}
--        if (ext2fs_test_inode_bitmap2(current_fs->inode_map,newfile))
--		com_err(argv[0], 0, "Warning: inode already set");
--	ext2fs_inode_alloc_stats2(current_fs, newfile, +1, 0);
--	memset(&inode, 0, sizeof(inode));
--	inode.i_mode = (statbuf.st_mode & ~LINUX_S_IFMT) | LINUX_S_IFREG;
--	inode.i_atime = inode.i_ctime = inode.i_mtime =
--		current_fs->now ? current_fs->now : time(0);
--	inode.i_links_count = 1;
--	inode.i_size = statbuf.st_size;
--	if (current_fs->super->s_feature_incompat &
--	    EXT3_FEATURE_INCOMPAT_EXTENTS) {
--		int i;
--		struct ext3_extent_header *eh;
--
--		eh = (struct ext3_extent_header *) &inode.i_block[0];
--		eh->eh_depth = 0;
--		eh->eh_entries = 0;
--		eh->eh_magic = ext2fs_cpu_to_le16(EXT3_EXT_MAGIC);
--		i = (sizeof(inode.i_block) - sizeof(*eh)) /
--			sizeof(struct ext3_extent);
--		eh->eh_max = ext2fs_cpu_to_le16(i);
--		inode.i_flags |= EXT4_EXTENTS_FL;
--	}
--	if (debugfs_write_new_inode(newfile, &inode, argv[0])) {
--		close(fd);
--		return;
--	}
--	if (LINUX_S_ISREG(inode.i_mode)) {
--		if (statbuf.st_blocks < statbuf.st_size / S_BLKSIZE) {
--			make_holes = 1;
--			/*
--			 * Use I/O blocksize as buffer size when
--			 * copying sparse files.
--			 */
--			bufsize = statbuf.st_blksize;
--		}
--		retval = copy_file(fd, newfile, bufsize, make_holes);
--		if (retval)
--			com_err("copy_file", retval, 0);
--	}
--	close(fd);
- }
- 
- void do_mknod(int argc, char *argv[])
- {
- 	unsigned long	mode, major, minor;
--	ext2_ino_t	newfile;
- 	errcode_t 	retval;
--	struct ext2_inode inode;
- 	int		filetype, nr;
-+	struct stat	st;
- 
- 	if (check_fs_open(argv[0]))
- 		return;
-@@ -1767,115 +1589,50 @@ void do_mknod(int argc, char *argv[])
- 		com_err(argv[0], 0, "Usage: mknod <name> [p| [c|b] <major> <minor>]");
- 		return;
- 	}
-+
- 	mode = minor = major = 0;
- 	switch (argv[2][0]) {
- 		case 'p':
--			mode = LINUX_S_IFIFO;
--			filetype = EXT2_FT_FIFO;
-+			st.st_mode = S_IFIFO;
- 			nr = 3;
- 			break;
- 		case 'c':
--			mode = LINUX_S_IFCHR;
--			filetype = EXT2_FT_CHRDEV;
-+			st.st_mode = S_IFCHR;
- 			nr = 5;
- 			break;
- 		case 'b':
--			mode = LINUX_S_IFBLK;
--			filetype = EXT2_FT_BLKDEV;
-+			st.st_mode = S_IFBLK;
- 			nr = 5;
- 			break;
- 		default:
--			filetype = 0;
- 			nr = 0;
- 	}
-+
- 	if (nr == 5) {
- 		major = strtoul(argv[3], argv+3, 0);
- 		minor = strtoul(argv[4], argv+4, 0);
- 		if (major > 65535 || minor > 65535 || argv[3][0] || argv[4][0])
- 			nr = 0;
- 	}
-+
- 	if (argc != nr)
- 		goto usage;
--	if (check_fs_read_write(argv[0]))
--		return;
--	retval = ext2fs_new_inode(current_fs, cwd, 010755, 0, &newfile);
--	if (retval) {
-+
-+	st.st_rdev = makedev(major, minor);
-+	if ((retval = do_mknod_internal(cwd, argv[1], &st)))
- 		com_err(argv[0], retval, 0);
--		return;
--	}
--	printf("Allocated inode: %u\n", newfile);
--	retval = ext2fs_link(current_fs, cwd, argv[1], newfile, filetype);
--	if (retval == EXT2_ET_DIR_NO_SPACE) {
--		retval = ext2fs_expand_dir(current_fs, cwd);
--		if (retval) {
--			com_err(argv[0], retval, "while expanding directory");
--			return;
--		}
--		retval = ext2fs_link(current_fs, cwd, argv[1], newfile,
--				     filetype);
--	}
--	if (retval) {
--		com_err(argv[1], retval, 0);
--		return;
--	}
--        if (ext2fs_test_inode_bitmap2(current_fs->inode_map,newfile))
--		com_err(argv[0], 0, "Warning: inode already set");
--	ext2fs_inode_alloc_stats2(current_fs, newfile, +1, 0);
--	memset(&inode, 0, sizeof(inode));
--	inode.i_mode = mode;
--	inode.i_atime = inode.i_ctime = inode.i_mtime =
--		current_fs->now ? current_fs->now : time(0);
--	if ((major < 256) && (minor < 256)) {
--		inode.i_block[0] = major*256+minor;
--		inode.i_block[1] = 0;
--	} else {
--		inode.i_block[0] = 0;
--		inode.i_block[1] = (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
--	}
--	inode.i_links_count = 1;
--	if (debugfs_write_new_inode(newfile, &inode, argv[0]))
--		return;
- }
- 
- void do_mkdir(int argc, char *argv[])
- {
--	char	*cp;
--	ext2_ino_t	parent;
--	char	*name;
- 	errcode_t retval;
- 
- 	if (common_args_process(argc, argv, 2, 2, "mkdir",
- 				"<filename>", CHECK_FS_RW))
- 		return;
- 
--	cp = strrchr(argv[1], '/');
--	if (cp) {
--		*cp = 0;
--		parent = string_to_inode(argv[1]);
--		if (!parent) {
--			com_err(argv[1], ENOENT, 0);
--			return;
--		}
--		name = cp+1;
--	} else {
--		parent = cwd;
--		name = argv[1];
--	}
--
--try_again:
--	retval = ext2fs_mkdir(current_fs, parent, 0, name);
--	if (retval == EXT2_ET_DIR_NO_SPACE) {
--		retval = ext2fs_expand_dir(current_fs, parent);
--		if (retval) {
--			com_err(argv[0], retval, "while expanding directory");
--			return;
--		}
--		goto try_again;
--	}
--	if (retval) {
--		com_err("ext2fs_mkdir", retval, 0);
--		return;
--	}
-+	if ((retval = do_mkdir_internal(cwd, argv[1], NULL)))
-+		com_err(argv[0], retval, 0);
- 
- }
- 
-@@ -2270,44 +2027,14 @@ void do_punch(int argc, char *argv[])
- 
- void do_symlink(int argc, char *argv[])
- {
--	char		*cp;
--	ext2_ino_t	parent;
--	char		*name, *target;
- 	errcode_t	retval;
- 
- 	if (common_args_process(argc, argv, 3, 3, "symlink",
- 				"<filename> <target>", CHECK_FS_RW))
- 		return;
- 
--	cp = strrchr(argv[1], '/');
--	if (cp) {
--		*cp = 0;
--		parent = string_to_inode(argv[1]);
--		if (!parent) {
--			com_err(argv[1], ENOENT, 0);
--			return;
--		}
--		name = cp+1;
--	} else {
--		parent = cwd;
--		name = argv[1];
--	}
--	target = argv[2];
--
--try_again:
--	retval = ext2fs_symlink(current_fs, parent, 0, name, target);
--	if (retval == EXT2_ET_DIR_NO_SPACE) {
--		retval = ext2fs_expand_dir(current_fs, parent);
--		if (retval) {
--			com_err(argv[0], retval, "while expanding directory");
--			return;
--		}
--		goto try_again;
--	}
--	if (retval) {
--		com_err("ext2fs_symlink", retval, 0);
--		return;
--	}
-+	if ((retval = do_symlink_internal(cwd, argv[1], argv[2])))
-+		com_err(argv[0], retval, 0);
- 
- }
- 
-diff --git a/debugfs/debugfs.h b/debugfs/debugfs.h
-index 6b4f6ef..2d464c1 100644
---- a/debugfs/debugfs.h
-+++ b/debugfs/debugfs.h
-@@ -5,6 +5,7 @@
- #include "ss/ss.h"
- #include "ext2fs/ext2_fs.h"
- #include "ext2fs/ext2fs.h"
-+#include "../misc/create_inode.h"
- 
- #ifdef __STDC__
- #define NOARGS void
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0011-mke2fs.8.in-update-the-manual-for-the-d-option.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0011-mke2fs.8.in-update-the-manual-for-the-d-option.patch
deleted file mode 100644
index ddd2cb8..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0011-mke2fs.8.in-update-the-manual-for-the-d-option.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 89fca439f1b58595f2f424598a27869f8c7bd815 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Mon, 23 Dec 2013 04:43:18 -0500
-Subject: [PATCH 11/11] mke2fs.8.in: update the manual for the -d option
-
-Update the manual for the -d option
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Reviewed-by: Darren Hart <dvhart@linux.intel.com>
----
- misc/mke2fs.8.in |    7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/misc/mke2fs.8.in b/misc/mke2fs.8.in
-index fea50da..b1ca486 100644
---- a/misc/mke2fs.8.in
-+++ b/misc/mke2fs.8.in
-@@ -52,6 +52,10 @@ mke2fs \- create an ext2/ext3/ext4 filesystem
- .I number-of-inodes
- ]
- [
-+.B \-d
-+.I root-directory
-+]
-+[
- .B \-n
- ]
- [
-@@ -502,6 +506,9 @@ the
- ratio).  This allows the user to specify the number
- of desired inodes directly.
- .TP
-+.BI \-d " root-directory"
-+Add the files from the root-directory to the filesystem.
-+.TP
- .BI \-o " creator-os"
- Overrides the default value of the "creator operating system" field of the
- filesystem.  The creator field is set by default to the name of the OS the
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch
deleted file mode 100644
index 0b8008d..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/0012-Fix-musl-build-failures.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From c6ff7feb9038d6e8aaffe2e69b205ad5fa33df2f Mon Sep 17 00:00:00 2001
-From: Paul Barker <paul@paulbarker.me.uk>
-Date: Mon, 18 Aug 2014 21:02:56 +0200
-Subject: [PATCH] Fix musl build failures
-
-In lib/ext2fs/unix_io.c, __u64 should be used instead of __uint64_t. This type
-is guaranteed by the e2fsprogs build system.
-(795c02def3681a99cc792a5ebc162d06f8a1eeb7)
-
-In misc/create_inode.c, <limits.h> is needed for the definition of PATH_MAX.
-(bbccc6f3c6a106721fb6f1ef4df6bc32c7986235)
-
-Both of these fixes have been made upstream with the git commit IDs given but
-those are larger commits containing other changes not needed here.
-
-Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-
-Upstream-Status: Backport
----
- lib/ext2fs/unix_io.c | 6 +++---
- misc/create_inode.c  | 1 +
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
-index 19be630..0cc0f52 100644
---- a/lib/ext2fs/unix_io.c
-+++ b/lib/ext2fs/unix_io.c
-@@ -931,10 +931,10 @@ static errcode_t unix_discard(io_channel channel, unsigned long long block,
- 
- 	if (channel->flags & CHANNEL_FLAGS_BLOCK_DEVICE) {
- #ifdef BLKDISCARD
--		__uint64_t range[2];
-+		__u64 range[2];
- 
--		range[0] = (__uint64_t)(block) * channel->block_size;
--		range[1] = (__uint64_t)(count) * channel->block_size;
-+		range[0] = (__u64)(block) * channel->block_size;
-+		range[1] = (__u64)(count) * channel->block_size;
- 
- 		ret = ioctl(data->dev, BLKDISCARD, &range);
- #else
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index 6d8de04..fcec5aa 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -1,4 +1,5 @@
- #include "create_inode.h"
-+#include <limits.h>
- 
- #if __STDC_VERSION__ < 199901L
- # if __GNUC__ >= 2
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/CVE-2015-0247.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/CVE-2015-0247.patch
deleted file mode 100644
index 4de67c9..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/CVE-2015-0247.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From f66e6ce4446738c2c7f43d41988a3eb73347e2f5 Mon Sep 17 00:00:00 2001
-From: Theodore Ts'o <tytso@mit.edu>
-Date: Sat, 9 Aug 2014 12:24:54 -0400
-Subject: libext2fs: avoid buffer overflow if s_first_meta_bg is too big
-
-If s_first_meta_bg is greater than the of number block group
-descriptor blocks, then reading or writing the block group descriptors
-will end up overruning the memory buffer allocated for the
-descriptors.  Fix this by limiting first_meta_bg to no more than
-fs->desc_blocks.  This doesn't correct the bad s_first_meta_bg value,
-but it avoids causing the e2fsprogs userspace programs from
-potentially crashing.
-
-Fixes CVE-2015-0247
-Upstream-Status: Backport
-
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
-
-diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
-index 4599eef..1f99113 100644
---- a/lib/ext2fs/closefs.c
-+++ b/lib/ext2fs/closefs.c
-@@ -344,9 +344,11 @@ errcode_t ext2fs_flush2(ext2_filsys fs, int flags)
- 	 * superblocks and group descriptors.
- 	 */
- 	group_ptr = (char *) group_shadow;
--	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
-+	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) {
- 		old_desc_blocks = fs->super->s_first_meta_bg;
--	else
-+		if (old_desc_blocks > fs->super->s_first_meta_bg)
-+			old_desc_blocks = fs->desc_blocks;
-+	} else
- 		old_desc_blocks = fs->desc_blocks;
- 
- 	ext2fs_numeric_progress_init(fs, &progress, NULL,
-diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
-index a1a3517..ba501e6 100644
---- a/lib/ext2fs/openfs.c
-+++ b/lib/ext2fs/openfs.c
-@@ -378,9 +378,11 @@ errcode_t ext2fs_open2(const char *name, const char *io_options,
- #ifdef WORDS_BIGENDIAN
- 	groups_per_block = EXT2_DESC_PER_BLOCK(fs->super);
- #endif
--	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG)
-+	if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) {
- 		first_meta_bg = fs->super->s_first_meta_bg;
--	else
-+		if (first_meta_bg > fs->desc_blocks)
-+			first_meta_bg = fs->desc_blocks;
-+	} else
- 		first_meta_bg = fs->desc_blocks;
- 	if (first_meta_bg) {
- 		retval = io_channel_read_blk(fs->io, group_block +
--- 
-cgit v0.10.2
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
new file mode 100644
index 0000000..656fb6e
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch
@@ -0,0 +1,34 @@
+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>
+---
+ 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 a049d61..106ee80 100644
+--- a/misc/mke2fs.conf.in
++++ b/misc/mke2fs.conf.in
+@@ -11,7 +11,8 @@
+ 		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,uninit_bg,dir_nlink,extra_isize
++		auto_64-bit_support = 1
+ 		inode_size = 256
+ 	}
+ 	ext4dev = {
+-- 
+2.7.2
+
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/cache_inode.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/cache_inode.patch
deleted file mode 100644
index f9ef8e5..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/cache_inode.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-The comment to this function says:
-
-"""
-  * Stupid algorithm --- we now just search forward starting from the
-  * goal.  Should put in a smarter one someday....
-"""
-
-This adds in a rather hacky algorthim which starts where we finished
-searching previously using a static variable rather than starting 
-from scratch if a hint isn't provided.
-
-This was after noticing that mkfs.ext4 -F X -d Y was spending *lots*
-of time in ext2fs_new_block2 called from ext2fs_bmap from ext2fs_file_write().
-
-Numbers wise, this took a core-image-sato-sdk mkfs time from over 
-8 minutes to around 35 seconds.
-
-Upstream-Status: Pending
-
-RP 2015/02/20
-
-Index: e2fsprogs-1.42.9/lib/ext2fs/alloc.c
-===================================================================
---- e2fsprogs-1.42.9.orig/lib/ext2fs/alloc.c
-+++ e2fsprogs-1.42.9/lib/ext2fs/alloc.c
-@@ -160,6 +160,8 @@ errcode_t ext2fs_new_inode(ext2_filsys f
- 	return 0;
- }
- 
-+static blk64_t last_goal = 0;
-+
- /*
-  * Stupid algorithm --- we now just search forward starting from the
-  * goal.  Should put in a smarter one someday....
-@@ -170,6 +172,9 @@ errcode_t ext2fs_new_block2(ext2_filsys
- 	blk64_t	i;
- 	int	c_ratio;
- 
-+        if (!goal)
-+            goal = last_goal;
-+
- 	EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS);
- 
- 	if (!map)
-@@ -194,6 +199,7 @@ errcode_t ext2fs_new_block2(ext2_filsys
- 
- 		if (!ext2fs_fast_test_block_bitmap2(map, i)) {
- 			*ret = i;
-+			last_goal = i;
- 			return 0;
- 		}
- 		i = (i + c_ratio) & ~(c_ratio - 1);
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/copy-in-create-hardlinks-with-the-correct-directory-.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/copy-in-create-hardlinks-with-the-correct-directory-.patch
deleted file mode 100644
index f549693..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/copy-in-create-hardlinks-with-the-correct-directory-.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 2dcf8e92bc39e05b3c799f53fe911c024aee4375 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Fri, 23 Oct 2015 03:21:05 -0700
-Subject: [PATCH] copy-in: create hardlinks with the correct directory
- filetype
-
-When we're creating hard links via ext2fs_link, the (misnamed?) flags
-argument specifies the filetype for the directory entry.  This is
-*derived* from i_mode, so provide a translator.  Otherwise, fsck will
-complain about unset file types.
-
-Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- misc/create_inode.c |   33 +++++++++++++++++++++++++++++++--
- 1 file changed, 31 insertions(+), 2 deletions(-)
-
-diff --git a/misc/create_inode.c b/misc/create_inode.c
-index fcec5aa..b8565da 100644
---- a/misc/create_inode.c
-+++ b/misc/create_inode.c
-@@ -22,6 +22,33 @@
- /* For saving the hard links */
- int hdlink_cnt = HDLINK_CNT;
- 
-+static int ext2_file_type(unsigned int mode)
-+{
-+	if (LINUX_S_ISREG(mode))
-+		return EXT2_FT_REG_FILE;
-+
-+	if (LINUX_S_ISDIR(mode))
-+		return EXT2_FT_DIR;
-+
-+	if (LINUX_S_ISCHR(mode))
-+		return EXT2_FT_CHRDEV;
-+
-+	if (LINUX_S_ISBLK(mode))
-+		return EXT2_FT_BLKDEV;
-+
-+	if (LINUX_S_ISLNK(mode))
-+		return EXT2_FT_SYMLINK;
-+
-+	if (LINUX_S_ISFIFO(mode))
-+		return EXT2_FT_FIFO;
-+
-+	if (LINUX_S_ISSOCK(mode))
-+		return EXT2_FT_SOCK;
-+
-+	return 0;
-+}
-+
-+
- /* Link an inode number to a directory */
- static errcode_t add_link(ext2_ino_t parent_ino, ext2_ino_t ino, const char *name)
- {
-@@ -34,14 +61,16 @@ static errcode_t add_link(ext2_ino_t parent_ino, ext2_ino_t ino, const char *nam
- 		return retval;
- 	}
- 
--	retval = ext2fs_link(current_fs, parent_ino, name, ino, inode.i_flags);
-+	retval = ext2fs_link(current_fs, parent_ino, name, ino,
-+	             ext2_file_type(inode.i_mode));
- 	if (retval == EXT2_ET_DIR_NO_SPACE) {
- 		retval = ext2fs_expand_dir(current_fs, parent_ino);
- 		if (retval) {
- 			com_err(__func__, retval, "while expanding directory");
- 			return retval;
- 		}
--		retval = ext2fs_link(current_fs, parent_ino, name, ino, inode.i_flags);
-+		retval = ext2fs_link(current_fs, parent_ino, name, ino,
-+	                     ext2_file_type(inode.i_mode));
- 	}
- 	if (retval) {
- 		com_err(__func__, retval, "while linking %s", name);
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/fix-icache.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/fix-icache.patch
deleted file mode 100644
index d38cc4d..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/fix-icache.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-inode.c: only update the icache for ext2_inode
-
-We only read the cache when:
-
-bufsize == sizeof(struct ext2_inode)
-
-then we should only update the cache in the same condition, otherwise
-there would be errors, for example:
-
-cache[0]: cached ino 14 when bufsize = 128 by ext2fs_write_inode_full()
-cache[1]: cached ino 14 when bufsize = 156 by ext2fs_read_inode_full()
-
-Then update the cache:
-cache[0]: cached ino 15 when bufsize = 156 by ext2fs_read_inode_full()
-
-Then the ino 14 would hit the cache[1] when bufsize = 128 (but it was
-cached by bufsize = 156), so there would be errors.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- lib/ext2fs/inode.c | 20 ++++++++++++--------
- 1 file changed, 12 insertions(+), 8 deletions(-)
-
-diff --git a/lib/ext2fs/inode.c b/lib/ext2fs/inode.c
---- a/lib/ext2fs/inode.c
-+++ b/lib/ext2fs/inode.c
-@@ -612,10 +612,12 @@ errcode_t ext2fs_read_inode_full(ext2_filsys fs, ext2_ino_t ino,
- #endif
- 
- 	/* Update the inode cache */
--	fs->icache->cache_last = (fs->icache->cache_last + 1) %
--		fs->icache->cache_size;
--	fs->icache->cache[fs->icache->cache_last].ino = ino;
--	fs->icache->cache[fs->icache->cache_last].inode = *inode;
-+	if (bufsize == sizeof(struct ext2_inode)) {
-+		fs->icache->cache_last = (fs->icache->cache_last + 1) %
-+			fs->icache->cache_size;
-+		fs->icache->cache[fs->icache->cache_last].ino = ino;
-+		fs->icache->cache[fs->icache->cache_last].inode = *inode;
-+	}
- 
- 	return 0;
- }
-@@ -648,10 +650,12 @@ errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino,
- 
- 	/* Check to see if the inode cache needs to be updated */
- 	if (fs->icache) {
--		for (i=0; i < fs->icache->cache_size; i++) {
--			if (fs->icache->cache[i].ino == ino) {
--				fs->icache->cache[i].inode = *inode;
--				break;
-+		if (bufsize == sizeof(struct ext2_inode)) {
-+			for (i=0; i < fs->icache->cache_size; i++) {
-+				if (fs->icache->cache[i].ino == ino) {
-+					fs->icache->cache[i].inode = *inode;
-+					break;
-+				}
- 			}
- 		}
- 	} else {
--- 
-1.8.1.2
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch
deleted file mode 100644
index cba0ce0..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From e4ffd6fe975888d306b5f700ba54af18b59f6759 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 20 Mar 2014 11:10:21 +0800
-Subject: [PATCH] misc/mke2fs.c: return error when failed to populate filesystem
-
-We need return retval when "mke2fs -d" failed, otherwise the "$?" would
-be 0 which is misleading.
-
-Upstream-Status: Submitted
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- misc/mke2fs.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/misc/mke2fs.c b/misc/mke2fs.c
-index a63f0b7..846190e 100644
---- a/misc/mke2fs.c
-+++ b/misc/mke2fs.c
-@@ -2745,10 +2745,11 @@ no_journal:
- 		current_fs = fs;
- 		root = EXT2_ROOT_INO;
- 		retval = populate_fs(root, root_dir);
--		if (retval)
-+		if (retval) {
- 			fprintf(stderr, "%s",
--				_("\nError while populating file system"));
--		else if (!quiet)
-+				_("\nError while populating file system\n"));
-+			return retval;
-+		} else if (!quiet)
- 			printf("%s", _("done\n"));
- 	}
- 
--- 
-1.8.3.1
-
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
index aa7a298..2a3aeff 100644
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
+++ b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/mkdir.patch
@@ -2,29 +2,17 @@
 
 Signed-off-by: Mei Lei <lei.mei@intel.com>
 
-Index: e2fsprogs-1.41.5/po/Makefile.in.in
-===================================================================
---- e2fsprogs-1.41.5.orig/po/Makefile.in.in	2009-02-14 13:49:08.000000000 +0000
-+++ e2fsprogs-1.41.5/po/Makefile.in.in	2009-08-19 17:52:31.000000000 +0100
-@@ -30,7 +30,7 @@
- INSTALL = @INSTALL@
- INSTALL_DATA = @INSTALL_DATA@
- MKINSTALLDIRS = @MKINSTALLDIRS@
--mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
-+mkinstalldirs = $(MKINSTALLDIRS)
- 
- GMSGFMT = @GMSGFMT@
- MSGFMT = @MSGFMT@
-Index: e2fsprogs-1.41.5/configure.in
-===================================================================
---- e2fsprogs-1.41.5.orig/configure.in	2009-08-19 17:53:50.000000000 +0100
-+++ e2fsprogs-1.41.5/configure.in	2009-08-19 17:48:38.000000000 +0100
-@@ -970,6 +970,8 @@
+diff --git a/configure.ac b/configure.ac
+index c1fe224..f5ac628 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1374,7 +1374,8 @@ if test -n "$WITH_DIET_LIBC" ; then
+ 	INCLUDES="$INCLUDES -D_REENTRANT"
  fi
- AC_SUBST(BUILD_CFLAGS)
- AC_SUBST(BUILD_LDFLAGS)
+ AC_SUBST(INCLUDES)
+-AM_MKINSTALLDIRS
 +MKINSTALLDIRS="mkdir -p"
 +AC_SUBST(MKINSTALLDIRS)
  dnl
- dnl Make our output files, being sure that we create the some miscellaneous 
- dnl directories
+ dnl Build CFLAGS
+ dnl
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
index b8a53e9..ef1ce58 100644
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
+++ b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/ptest.patch
@@ -1,17 +1,17 @@
-Index: e2fsprogs-1.42.9/tests/Makefile.in
-===================================================================
---- e2fsprogs-1.42.9.orig/tests/Makefile.in
-+++ e2fsprogs-1.42.9/tests/Makefile.in
-@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile
+diff --git a/tests/Makefile.in b/tests/Makefile.in
+index 60cf655..ce220f1 100644
+--- a/tests/Makefile.in
++++ b/tests/Makefile.in
+@@ -18,7 +18,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
  	@echo "#!/bin/sh" > test_one
- @HTREE_CMT@	@echo "HTREE=y" >> test_one
- @QUOTA_CMT@	@echo "QUOTA=y" >> test_one
+ 	@echo "HTREE=y" >> test_one
+ 	@echo "QUOTA=y" >> test_one
 -	@echo "SRCDIR=@srcdir@" >> test_one
 +	@echo "SRCDIR=/usr/lib/e2fsprogs/ptest/test" >> test_one
  	@echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
  	@cat $(srcdir)/test_one.in >> test_one
  	@chmod +x test_one
-@@ -26,7 +26,7 @@ test_one: $(srcdir)/test_one.in Makefile
+@@ -26,7 +26,7 @@ test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
  test_script: test_one test_script.in Makefile mke2fs.conf
  	@echo "Creating test_script..."
  	@echo "#!/bin/sh" > test_script
@@ -20,11 +20,11 @@
  	@cat $(srcdir)/test_script.in >> test_script
  	@chmod +x test_script
  
-Index: e2fsprogs-1.42.9/tests/test_config
-===================================================================
---- e2fsprogs-1.42.9.orig/tests/test_config
-+++ e2fsprogs-1.42.9/tests/test_config
-@@ -3,23 +3,23 @@
+diff --git a/tests/test_config b/tests/test_config
+index 7f39157..c815a44 100644
+--- a/tests/test_config
++++ b/tests/test_config
+@@ -3,24 +3,24 @@
  #
  
  unset LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME PAGER
@@ -54,13 +54,14 @@
 +RESIZE2FS_EXE="/sbin/resize2fs"
  RESIZE2FS="$USE_VALGRIND $RESIZE2FS_EXE"
 -E2UNDO_EXE="../misc/e2undo"
++E2UNDO_EXE="/sbin/e2undo"
+ E2UNDO="$USE_VALGRIND $E2UNDO_EXE"
 -TEST_REL=../tests/progs/test_rel
 -TEST_ICOUNT=../tests/progs/test_icount
 -CRCSUM=../tests/progs/crcsum
-+E2UNDO_EXE="/sbin/e2undo"
 +TEST_REL=./progs/test_rel
 +TEST_ICOUNT=./progs/test_icount
 +CRCSUM=./progs/crcsum
- LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
- DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss
- export LD_LIBRARY_PATH
+ CLEAN_OUTPUT="sed -f $cmd_dir/filter.sed"
+ LD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${LD_LIBRARY_PATH}
+ DYLD_LIBRARY_PATH=../lib:../lib/ext2fs:../lib/e2p:../lib/et:../lib/ss:${DYLD_LIBRARY_PATH}
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch
new file mode 100644
index 0000000..782a7b1
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs/xattr_ordering.patch
@@ -0,0 +1,219 @@
+From: "Darrick J. Wong" <darrick.wong@oracle.com>
+To: tytso@mit.edu, darrick.wong@oracle.com
+Cc: linux-ext4@vger.kernel.org, Darren Hart <dvhart@linux.intel.com>,
+ Richard Purdie <richard.purdie@linuxfoundation.org>
+Date: Sat, 13 Feb 2016 14:38:24 -0800
+Message-ID: <20160213223824.25381.8002.stgit@birch.djwong.org>
+In-Reply-To: <20160213223725.25381.20929.stgit@birch.djwong.org>
+References: <20160213223725.25381.20929.stgit@birch.djwong.org>
+User-Agent: StGit/0.17.1-dirty
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+X-Source-IP: aserv0022.oracle.com [141.146.126.234]
+X-Evolution-Source: 1358860361.4566.33@ted
+Content-Transfer-Encoding: 8bit
+
+Richard Purdie reports that libext2fs doesn't sort attribute keys in
+the xattr block correctly, causing the kernel to return -ENODATA when
+querying attributes that should be there.  Therefore, sort attributes
+so that whatever ends up in the xattr block is sorted according to
+what the kernel expects.
+
+Cc: Darren Hart <dvhart@linux.intel.com>
+Reported-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+---
+ lib/ext2fs/ext_attr.c        |   24 +++++++++++-
+ tests/d_xattr_sorting/expect |   29 ++++++++++++++
+ tests/d_xattr_sorting/name   |    1 
+ tests/d_xattr_sorting/script |   86 ++++++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 139 insertions(+), 1 deletion(-)
+ create mode 100644 tests/d_xattr_sorting/expect
+ create mode 100644 tests/d_xattr_sorting/name
+ create mode 100644 tests/d_xattr_sorting/script
+
+Upstream-Status: Submitted
+
+
+diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
+index 0a4f8c0..b121837 100644
+--- a/lib/ext2fs/ext_attr.c
++++ b/lib/ext2fs/ext_attr.c
+@@ -254,10 +254,15 @@ static struct ea_name_index ea_names[] = {
+ 	{0, NULL},
+ };
+ 
++static int find_ea_index(char *fullname, char **name, int *index);
++
+ /* Push empty attributes to the end and inlinedata to the front. */
+ static int attr_compare(const void *a, const void *b)
+ {
+ 	const struct ext2_xattr *xa = a, *xb = b;
++	char *xa_suffix, *xb_suffix;
++	int xa_idx, xb_idx;
++	int cmp;
+ 
+ 	if (xa->name == NULL)
+ 		return +1;
+@@ -267,7 +272,24 @@ static int attr_compare(const void *a, const void *b)
+ 		return -1;
+ 	else if (!strcmp(xb->name, "system.data"))
+ 		return +1;
+-	return 0;
++
++	/*
++	 * Duplicate the kernel's sorting algorithm because xattr blocks
++	 * require sorted keys.
++	 */
++	xa_suffix = xa->name;
++	xb_suffix = xb->name;
++	xa_idx = xb_idx = 0;
++	find_ea_index(xa->name, &xa_suffix, &xa_idx);
++	find_ea_index(xb->name, &xb_suffix, &xb_idx);
++	cmp = xa_idx - xb_idx;
++	if (cmp)
++		return cmp;
++	cmp = strlen(xa_suffix) - strlen(xb_suffix);
++	if (cmp)
++		return cmp;
++	cmp = strcmp(xa_suffix, xb_suffix);
++	return cmp;
+ }
+ 
+ static const char *find_ea_prefix(int index)
+diff --git a/tests/d_xattr_sorting/expect b/tests/d_xattr_sorting/expect
+new file mode 100644
+index 0000000..17da663
+--- /dev/null
++++ b/tests/d_xattr_sorting/expect
+@@ -0,0 +1,29 @@
++debugfs sort extended attributes
++mke2fs -Fq -b 1024 test.img 512
++Exit status is 0
++ea_set / security.SMEG64 -f /tmp/b
++Exit status is 0
++ea_set / security.imb -f /tmp/b
++Exit status is 0
++ea_set / user.moo cow
++Exit status is 0
++ea_list /
++Extended attributes:
++  user.moo = "cow" (3)
++  security.imb = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" (256)
++  security.SMEG64 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" (256)
++Exit status is 0
++ea_get / security.imb
++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
++Exit status is 0
++ea_get / nosuchea
++ea_get: Extended attribute key not found while getting extended attribute
++Exit status is 0
++e2fsck -yf -N test_filesys
++Pass 1: Checking inodes, blocks, and sizes
++Pass 2: Checking directory structure
++Pass 3: Checking directory connectivity
++Pass 4: Checking reference counts
++Pass 5: Checking group summary information
++test_filesys: 11/64 files (0.0% non-contiguous), 29/512 blocks
++Exit status is 0
+diff --git a/tests/d_xattr_sorting/name b/tests/d_xattr_sorting/name
+new file mode 100644
+index 0000000..dde8926
+--- /dev/null
++++ b/tests/d_xattr_sorting/name
+@@ -0,0 +1 @@
++sort extended attributes in debugfs
+diff --git a/tests/d_xattr_sorting/script b/tests/d_xattr_sorting/script
+new file mode 100644
+index 0000000..30c189a
+--- /dev/null
++++ b/tests/d_xattr_sorting/script
+@@ -0,0 +1,86 @@
++if test -x $DEBUGFS_EXE; then
++
++OUT=$test_name.log
++EXP=$test_dir/expect
++VERIFY_FSCK_OPT=-yf
++
++TEST_DATA=$test_name.tmp
++VERIFY_DATA=$test_name.ver.tmp
++
++echo "debugfs sort extended attributes" > $OUT
++
++dd if=/dev/zero of=$TMPFILE bs=1k count=512 > /dev/null 2>&1
++
++echo "mke2fs -Fq -b 1024 test.img 512" >> $OUT
++
++$MKE2FS -Fq $TMPFILE 512 > /dev/null 2>&1
++status=$?
++echo Exit status is $status >> $OUT
++
++perl -e 'print "x" x 256;' > /tmp/b
++
++echo "ea_set / security.SMEG64 -f /tmp/b" > $OUT.new
++$DEBUGFS -w -R "ea_set / security.SMEG64 -f /tmp/b" $TMPFILE >> $OUT.new 2>&1
++status=$?
++echo Exit status is $status >> $OUT.new
++sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
++
++echo "ea_set / security.imb -f /tmp/b" > $OUT.new
++$DEBUGFS -w -R "ea_set / security.imb -f /tmp/b" $TMPFILE >> $OUT.new 2>&1
++status=$?
++echo Exit status is $status >> $OUT.new
++sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
++
++echo "ea_set / user.moo cow" > $OUT.new
++$DEBUGFS -w -R "ea_set / user.moo cow" $TMPFILE >> $OUT.new 2>&1
++status=$?
++echo Exit status is $status >> $OUT.new
++sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
++
++rm -rf /tmp/b
++
++echo "ea_list /" > $OUT.new
++$DEBUGFS -w -R "ea_list /" $TMPFILE >> $OUT.new 2>&1
++status=$?
++echo Exit status is $status >> $OUT.new
++sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
++
++echo "ea_get / security.imb" > $OUT.new
++$DEBUGFS -w -R "ea_get / security.imb" $TMPFILE >> $OUT.new 2>&1
++status=$?
++echo Exit status is $status >> $OUT.new
++sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
++
++echo "ea_get / nosuchea" > $OUT.new
++$DEBUGFS -w -R "ea_get / nosuchea" $TMPFILE >> $OUT.new 2>&1
++status=$?
++echo Exit status is $status >> $OUT.new
++sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
++
++echo e2fsck $VERIFY_FSCK_OPT -N test_filesys > $OUT.new
++$FSCK $VERIFY_FSCK_OPT -N test_filesys $TMPFILE >> $OUT.new 2>&1
++status=$?
++echo Exit status is $status >> $OUT.new
++sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
++
++#
++# Do the verification
++#
++
++rm -f $TMPFILE $OUT.new
++cmp -s $OUT $EXP
++status=$?
++
++if [ "$status" = 0 ] ; then
++	echo "$test_name: $test_description: ok"
++	touch $test_name.ok
++else
++	echo "$test_name: $test_description: failed"
++	diff $DIFF_OPTS $EXP $OUT > $test_name.failed
++fi
++
++unset VERIFY_FSCK_OPT NATIVE_FSCK_OPT OUT EXP TEST_DATA VERIFY_DATA
++
++else #if test -x $DEBUGFS_EXE; then
++	echo "$test_name: $test_description: skipped"
++fi
+
+
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
deleted file mode 100644
index a8edeef..0000000
--- a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ /dev/null
@@ -1,132 +0,0 @@
-require e2fsprogs.inc
-
-RECIPE_NO_UPDATE_REASON = "Updating backported patches to 1.42.13 is too much pain. Let's wait until 1.43 is released."
-
-SRC_URI += "file://acinclude.m4 \
-            file://remove.ldconfig.call.patch \
-            file://fix-icache.patch \
-            file://quiet-debugfs.patch \
-            file://0001-mke2fs-add-the-ability-to-copy-files-from-a-given-di.patch \
-            file://0002-misc-create_inode.c-copy-files-recursively.patch \
-            file://0003-misc-create_inode.c-create-special-file.patch \
-            file://0004-misc-create_inode.c-create-symlink.patch \
-            file://0005-misc-create_inode.c-copy-regular-file.patch \
-            file://0006-misc-create_inode.c-create-directory.patch \
-            file://0007-misc-create_inode.c-set-owner-mode-time-for-the-inod.patch \
-            file://0008-mke2fs.c-add-an-option-d-root-directory.patch \
-            file://0009-misc-create_inode.c-handle-hardlinks.patch \
-            file://0010-debugfs-use-the-functions-in-misc-create_inode.c.patch \
-            file://0011-mke2fs.8.in-update-the-manual-for-the-d-option.patch \
-            file://0012-Fix-musl-build-failures.patch \
-            file://0001-e2fsprogs-fix-cross-compilation-problem.patch \
-            file://misc-mke2fs.c-return-error-when-failed-to-populate-fs.patch \
-            file://cache_inode.patch \
-            file://CVE-2015-0247.patch \
-            file://0001-libext2fs-fix-potential-buffer-overflow-in-closefs.patch \
-            file://copy-in-create-hardlinks-with-the-correct-directory-.patch \
-"
-
-SRC_URI[md5sum] = "3f8e41e63b432ba114b33f58674563f7"
-SRC_URI[sha256sum] = "2f92ac06e92fa00f2ada3ee67dad012d74d685537527ad1241d82f2d041f2802"
-
-EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-elf-shlibs --disable-libuuid --disable-uuidd --enable-verbose-makecmds"
-EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
-
-do_configure_prepend () {
-	cp ${WORKDIR}/acinclude.m4 ${S}/
-}
-
-do_install () {
-	oe_runmake 'DESTDIR=${D}' install
-	oe_runmake 'DESTDIR=${D}' install-libs
-	# We use blkid from util-linux now so remove from here
-	rm -f ${D}${base_libdir}/libblkid*
-	rm -rf ${D}${includedir}/blkid
-	rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
-	rm -f ${D}${base_sbindir}/blkid
-	rm -f ${D}${base_sbindir}/fsck
-	rm -f ${D}${base_sbindir}/findfs
-
-	# e2initrd_helper and the pkgconfig files belong in libdir
-	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
-		install -d ${D}${libdir}
-		mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
-		mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
-	fi
-
-	oe_multilib_header ext2fs/ext2_types.h
-	install -d ${D}${base_bindir}
-	mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
-
-	install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
-}
-
-# Need to find the right mke2fs.conf file
-e2fsprogs_conf_fixup () {
-	for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.ext4dev; do
-		create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf
-	done
-}
-
-do_install_append_class-target() {
-	# Clean host path in compile_et, mk_cmds
-	sed -i -e "s,ET_DIR=\"${S}/lib/et\",ET_DIR=\"${datadir}/et\",g" ${D}${bindir}/compile_et
-	sed -i -e "s,SS_DIR=\"${S}/lib/ss\",SS_DIR=\"${datadir}/ss\",g" ${D}${bindir}/mk_cmds
-}
-
-do_install_append_class-native() {
-	e2fsprogs_conf_fixup
-}
-
-do_install_append_class-nativesdk() {
-	e2fsprogs_conf_fixup
-}
-
-RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
-RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
-
-PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
-PACKAGES =+ "libcomerr libss libe2p libext2fs"
-
-FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
-FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
-FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
-FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label"
-FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
-FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
-FILES_libss = "${base_libdir}/libss.so.*"
-FILES_libe2p = "${base_libdir}/libe2p.so.*"
-FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
-FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so"
-
-BBCLASSEXTEND = "native nativesdk"
-
-inherit update-alternatives
-
-ALTERNATIVE_${PN} = "chattr"
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
-ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
-
-ALTERNATIVE_${PN}-doc = "libblkid.3 blkid.8 findfs.8 fsck.8"
-ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3"
-ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8"
-ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8"
-ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
-
-inherit ptest
-SRC_URI += "file://run-ptest"
-SRC_URI += "file://ptest.patch"
-
-RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps"
-#RDEPENDS_${PN}-ptest += "expect"
-
-do_compile_ptest() {
-	oe_runmake -C ${B}/tests
-}
-
-do_install_ptest() {
-	cp -a ${B}/tests ${D}${PTEST_PATH}/test
-	cp -a ${S}/tests/* ${D}${PTEST_PATH}/test
-	sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
-}
diff --git a/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb
new file mode 100644
index 0000000..9cde8e4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/e2fsprogs/e2fsprogs_git.bb
@@ -0,0 +1,111 @@
+require e2fsprogs.inc
+
+SRC_URI += "file://acinclude.m4 \
+            file://remove.ldconfig.call.patch \
+            file://quiet-debugfs.patch \
+            file://run-ptest \
+            file://ptest.patch \
+            file://mkdir.patch \
+            file://xattr_ordering.patch \
+            file://Revert-mke2fs-enable-the-metadata_csum-and-64bit-fea.patch \
+"
+
+SRCREV = "0f26747167cc9d82df849b0aad387bf824f04544"
+PV = "1.42.99+1.43+git${SRCPV}"
+UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
+
+EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
+                --enable-elf-shlibs --disable-libuuid --disable-uuidd \
+                --disable-libblkid --enable-verbose-makecmds"
+
+EXTRA_OECONF_darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[fuse] = '--enable-fuse2fs,--disable-fuse2fs,fuse'
+
+do_configure_prepend () {
+	cp ${WORKDIR}/acinclude.m4 ${S}/
+}
+
+do_install () {
+	oe_runmake 'DESTDIR=${D}' install
+	oe_runmake 'DESTDIR=${D}' install-libs
+	# We use blkid from util-linux now so remove from here
+	rm -f ${D}${base_libdir}/libblkid*
+	rm -rf ${D}${includedir}/blkid
+	rm -f ${D}${base_libdir}/pkgconfig/blkid.pc
+	rm -f ${D}${base_sbindir}/blkid
+	rm -f ${D}${base_sbindir}/fsck
+	rm -f ${D}${base_sbindir}/findfs
+
+	# e2initrd_helper and the pkgconfig files belong in libdir
+	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+		install -d ${D}${libdir}
+		mv ${D}${base_libdir}/e2initrd_helper ${D}${libdir}
+		mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
+	fi
+
+	oe_multilib_header ext2fs/ext2_types.h
+	install -d ${D}${base_bindir}
+	mv ${D}${bindir}/chattr ${D}${base_bindir}/chattr.e2fsprogs
+
+	install -v -m 755 ${S}/contrib/populate-extfs.sh ${D}${base_sbindir}/
+}
+
+# Need to find the right mke2fs.conf file
+e2fsprogs_conf_fixup () {
+	for i in mke2fs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.ext4dev; do
+		create_wrapper ${D}${base_sbindir}/$i MKE2FS_CONFIG=${sysconfdir}/mke2fs.conf
+	done
+}
+
+do_install_append_class-target() {
+	# Clean host path in compile_et, mk_cmds
+	sed -i -e "s,ET_DIR=\"${S}/lib/et\",ET_DIR=\"${datadir}/et\",g" ${D}${bindir}/compile_et
+	sed -i -e "s,SS_DIR=\"${S}/lib/ss\",SS_DIR=\"${datadir}/ss\",g" ${D}${bindir}/mk_cmds
+}
+
+do_install_append_class-native() {
+	e2fsprogs_conf_fixup
+}
+
+do_install_append_class-nativesdk() {
+	e2fsprogs_conf_fixup
+}
+
+RDEPENDS_e2fsprogs = "e2fsprogs-badblocks"
+RRECOMMENDS_e2fsprogs = "e2fsprogs-mke2fs e2fsprogs-e2fsck"
+
+PACKAGES =+ "e2fsprogs-e2fsck e2fsprogs-mke2fs e2fsprogs-tune2fs e2fsprogs-badblocks e2fsprogs-resize2fs"
+PACKAGES =+ "libcomerr libss libe2p libext2fs"
+
+FILES_e2fsprogs-resize2fs = "${base_sbindir}/resize2fs*"
+FILES_e2fsprogs-e2fsck = "${base_sbindir}/e2fsck ${base_sbindir}/fsck.ext*"
+FILES_e2fsprogs-mke2fs = "${base_sbindir}/mke2fs ${base_sbindir}/mkfs.ext* ${sysconfdir}/mke2fs.conf"
+FILES_e2fsprogs-tune2fs = "${base_sbindir}/tune2fs ${base_sbindir}/e2label"
+FILES_e2fsprogs-badblocks = "${base_sbindir}/badblocks"
+FILES_libcomerr = "${base_libdir}/libcom_err.so.*"
+FILES_libss = "${base_libdir}/libss.so.*"
+FILES_libe2p = "${base_libdir}/libe2p.so.*"
+FILES_libext2fs = "${libdir}/e2initrd_helper ${base_libdir}/libext2fs.so.*"
+FILES_${PN}-dev += "${datadir}/*/*.awk ${datadir}/*/*.sed ${base_libdir}/*.so"
+
+ALTERNATIVE_${PN} = "chattr"
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_LINK_NAME[chattr] = "${base_bindir}/chattr"
+ALTERNATIVE_TARGET[chattr] = "${base_bindir}/chattr.e2fsprogs"
+
+ALTERNATIVE_${PN}-doc = "fsck.8"
+ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
+
+RDEPENDS_${PN}-ptest += "${PN} ${PN}-tune2fs coreutils procps bash"
+
+do_compile_ptest() {
+	oe_runmake -C ${B}/tests
+}
+
+do_install_ptest() {
+	cp -a ${B}/tests ${D}${PTEST_PATH}/test
+	cp -a ${S}/tests/* ${D}${PTEST_PATH}/test
+	sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
+}
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch
index 84e8ddc..deba45f 100644
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.148/elf_begin.c-CVE-2014-9447-fix.patch
@@ -7,6 +7,7 @@
  https://git.fedorahosted.org/cgit/elfutils.git/commit/?id=147018e729e7c22eeabf15b82d26e4bf68a0d18e
 
 Upstream-Status: Backport
+CVE: CVE-2014-9447
 
 Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
 ---
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/arm_backend.diff b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/arm_backend.diff
deleted file mode 100644
index c97c4e4..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/arm_backend.diff
+++ /dev/null
@@ -1,625 +0,0 @@
-From 0db1687eee0b4d16ccbc40db5a06b574fca6614c Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Fri, 14 Nov 2014 15:25:42 +0800
-Subject: [PATCH] Rebase arm_backend.diff from 0.159 to 0.160
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- backends/arm_init.c                 |  18 ++++-
- backends/arm_regs.c                 | 132 ++++++++++++++++++++++++++++++++++++
- backends/arm_retval.c               |  44 +++++++++++-
- backends/libebl_arm.h               |   9 +++
- libelf/elf.h                        |  11 +++
- tests/run-addrcfi.sh                |  93 ++++++++++++++++++++++++-
- tests/run-allregs.sh                |  95 +++++++++++++++++++++++++-
- tests/run-readelf-mixed-corenote.sh |  11 ++-
- 8 files changed, 401 insertions(+), 12 deletions(-)
- create mode 100644 backends/libebl_arm.h
-
-diff --git a/backends/arm_init.c b/backends/arm_init.c
-index 3283c97..8b57d3f 100644
---- a/backends/arm_init.c
-+++ b/backends/arm_init.c
-@@ -35,21 +35,32 @@
- #define RELOC_PREFIX	R_ARM_
- #include "libebl_CPU.h"
- 
-+#include "libebl_arm.h"
-+
- /* This defines the common reloc hooks based on arm_reloc.def.  */
- #include "common-reloc.c"
- 
- 
- const char *
- arm_init (elf, machine, eh, ehlen)
--     Elf *elf __attribute__ ((unused));
-+     Elf *elf;
-      GElf_Half machine __attribute__ ((unused));
-      Ebl *eh;
-      size_t ehlen;
- {
-+  int soft_float = 0;
-+
-   /* Check whether the Elf_BH object has a sufficent size.  */
-   if (ehlen < sizeof (Ebl))
-     return NULL;
- 
-+  if (elf) {
-+    GElf_Ehdr ehdr_mem;
-+    GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
-+    if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT))
-+      soft_float = 1;
-+  }
-+
-   /* We handle it.  */
-   eh->name = "ARM";
-   arm_init_reloc (eh);
-@@ -61,7 +72,10 @@ arm_init (elf, machine, eh, ehlen)
-   HOOK (eh, core_note);
-   HOOK (eh, auxv_info);
-   HOOK (eh, check_object_attribute);
--  HOOK (eh, return_value_location);
-+  if (soft_float)
-+    eh->return_value_location = arm_return_value_location_soft;
-+  else
-+    eh->return_value_location = arm_return_value_location_hard;
-   HOOK (eh, abi_cfi);
-   HOOK (eh, check_reloc_target_type);
- 
-diff --git a/backends/arm_regs.c b/backends/arm_regs.c
-index 21c5ad3..4ee1039 100644
---- a/backends/arm_regs.c
-+++ b/backends/arm_regs.c
-@@ -31,6 +31,7 @@
- #endif
- 
- #include <string.h>
-+#include <stdio.h>
- #include <dwarf.h>
- 
- #define BACKEND arm_
-@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
-       break;
- 
-     case 16 + 0 ... 16 + 7:
-+      /* AADWARF says that there are no registers in that range,
-+       * but gcc maps FPA registers here
-+       */
-       regno += 96 - 16;
-       /* Fall through.  */
-     case 96 + 0 ... 96 + 7:
-@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute__ ((unused)),
-       namelen = 2;
-       break;
- 
-+    case 64 + 0 ... 64 + 9:
-+      *setname = "VFP";
-+      *bits = 32;
-+      *type = DW_ATE_float;
-+      name[0] = 's';
-+      name[1] = regno - 64 + '0';
-+      namelen = 2;
-+      break;
-+
-+    case 64 + 10 ... 64 + 31:
-+      *setname = "VFP";
-+      *bits = 32;
-+      *type = DW_ATE_float;
-+      name[0] = 's';
-+      name[1] = (regno - 64) / 10 + '0';
-+      name[2] = (regno - 64) % 10 + '0';
-+      namelen = 3;
-+      break;
-+
-+    case 104 + 0 ... 104 + 7:
-+      /* XXX TODO:
-+       * This can be either intel wireless MMX general purpose/control
-+       * registers or xscale accumulator, which have different usage.
-+       * We only have the intel wireless MMX here now.
-+       * The name needs to be changed for the xscale accumulator too. */
-+      *setname = "MMX";
-+      *type = DW_ATE_unsigned;
-+      *bits = 32;
-+      memcpy(name, "wcgr", 4);
-+      name[4] = regno - 104 + '0';
-+      namelen = 5;
-+      break;
-+
-+    case 112 + 0 ... 112 + 9:
-+      *setname = "MMX";
-+      *type = DW_ATE_unsigned;
-+      *bits = 64;
-+      name[0] = 'w';
-+      name[1] = 'r';
-+      name[2] = regno - 112 + '0';
-+      namelen = 3;
-+      break;
-+
-+    case 112 + 10 ... 112 + 15:
-+      *setname = "MMX";
-+      *type = DW_ATE_unsigned;
-+      *bits = 64;
-+      name[0] = 'w';
-+      name[1] = 'r';
-+      name[2] = '1';
-+      name[3] = regno - 112 - 10 + '0';
-+      namelen = 4;
-+      break;
-+
-     case 128:
-+      *setname = "state";
-       *type = DW_ATE_unsigned;
-       return stpcpy (name, "spsr") + 1 - name;
- 
-+    case 129:
-+      *setname = "state";
-+      *type = DW_ATE_unsigned;
-+      return stpcpy(name, "spsr_fiq") + 1 - name;
-+
-+    case 130:
-+      *setname = "state";
-+      *type = DW_ATE_unsigned;
-+      return stpcpy(name, "spsr_irq") + 1 - name;
-+
-+    case 131:
-+      *setname = "state";
-+      *type = DW_ATE_unsigned;
-+      return stpcpy(name, "spsr_abt") + 1 - name;
-+
-+    case 132:
-+      *setname = "state";
-+      *type = DW_ATE_unsigned;
-+      return stpcpy(name, "spsr_und") + 1 - name;
-+
-+    case 133:
-+      *setname = "state";
-+      *type = DW_ATE_unsigned;
-+      return stpcpy(name, "spsr_svc") + 1 - name;
-+
-+    case 144 ... 150:
-+      *setname = "integer";
-+      *type = DW_ATE_signed;
-+      *bits = 32;
-+      return sprintf(name, "r%d_usr", regno - 144 + 8) + 1;
-+
-+    case 151 ... 157:
-+      *setname = "integer";
-+      *type = DW_ATE_signed;
-+      *bits = 32;
-+      return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1;
-+
-+    case 158 ... 159:
-+      *setname = "integer";
-+      *type = DW_ATE_signed;
-+      *bits = 32;
-+      return sprintf(name, "r%d_irq", regno - 158 + 13) + 1;
-+
-+    case 160 ... 161:
-+      *setname = "integer";
-+      *type = DW_ATE_signed;
-+      *bits = 32;
-+      return sprintf(name, "r%d_abt", regno - 160 + 13) + 1;
-+
-+    case 162 ... 163:
-+      *setname = "integer";
-+      *type = DW_ATE_signed;
-+      *bits = 32;
-+      return sprintf(name, "r%d_und", regno - 162 + 13) + 1;
-+
-+    case 164 ... 165:
-+      *setname = "integer";
-+      *type = DW_ATE_signed;
-+      *bits = 32;
-+      return sprintf(name, "r%d_svc", regno - 164 + 13) + 1;
-+
-+    case 192 ... 199:
-+     *setname = "MMX";
-+      *bits = 32;
-+      *type = DW_ATE_unsigned;
-+      name[0] = 'w';
-+      name[1] = 'c';
-+      name[2] = regno - 192 + '0';
-+      namelen = 3;
-+      break;
-+
-     case 256 + 0 ... 256 + 9:
-+      /* XXX TODO: Neon also uses those registers and can contain
-+       * both float and integers */
-       *setname = "VFP";
-       *type = DW_ATE_float;
-       *bits = 64;
-diff --git a/backends/arm_retval.c b/backends/arm_retval.c
-index 7aced74..052132e 100644
---- a/backends/arm_retval.c
-+++ b/backends/arm_retval.c
-@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] =
- #define nloc_intreg	1
- #define nloc_intregs(n)	(2 * (n))
- 
-+/* f1  */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */
-+static const Dwarf_Op loc_fpreg[] =
-+  {
-+    { .atom = DW_OP_reg16 },
-+  };
-+#define nloc_fpreg  1
-+
- /* The return value is a structure and is actually stored in stack space
-    passed in a hidden argument by the caller.  But, the compiler
-    helpfully returns the address of that space in r0.  */
-@@ -58,8 +65,9 @@ static const Dwarf_Op loc_aggregate[] =
- #define nloc_aggregate 1
- 
- 
--int
--arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+static int
-+arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
-+		            int soft_float)
- {
-   /* Start with the function's type, and get the DW_AT_type attribute,
-      which is the type of the return value.  */
-@@ -98,14 +106,31 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
- 	    else
- 	      return -1;
- 	  }
-+	if (tag == DW_TAG_base_type)
-+	{
-+	  Dwarf_Word encoding;
-+	  if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+	                       &attr_mem), &encoding) != 0)
-+	    return -1;
-+
-+	  if ((encoding == DW_ATE_float) && !soft_float)
-+	    {
-+	      *locp = loc_fpreg;
-+	      if (size <= 8)
-+		return nloc_fpreg;
-+	      goto aggregate;
-+	    }
-+	}
- 	if (size <= 16)
- 	  {
- 	  intreg:
- 	    *locp = loc_intreg;
- 	    return size <= 4 ? nloc_intreg : nloc_intregs ((size + 3) / 4);
- 	  }
-+	  /* fall through. */
- 
-       aggregate:
-+	/* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
- 	*locp = loc_aggregate;
- 	return nloc_aggregate;
-       }
-@@ -125,3 +150,18 @@ arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-      DWARF and might be valid.  */
-   return -2;
- }
-+
-+/* return location for -mabi=apcs-gnu -msoft-float */
-+int
-+arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+   return arm_return_value_location_ (functypedie, locp, 1);
-+}
-+
-+/* return location for -mabi=apcs-gnu -mhard-float (current default) */
-+int
-+arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+   return arm_return_value_location_ (functypedie, locp, 0);
-+}
-+
-diff --git a/backends/libebl_arm.h b/backends/libebl_arm.h
-new file mode 100644
-index 0000000..c00770c
---- /dev/null
-+++ b/backends/libebl_arm.h
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_ARM_H
-+#define _LIBEBL_ARM_H 1
-+
-+#include <libdw.h>
-+
-+extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-diff --git a/libelf/elf.h b/libelf/elf.h
-index a3cce3e..0891674 100644
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -2346,6 +2346,9 @@ typedef Elf32_Addr Elf32_Conflict;
- #define EF_ARM_EABI_VER4	0x04000000
- #define EF_ARM_EABI_VER5	0x05000000
- 
-+/* EI_OSABI values */
-+#define ELFOSABI_ARM_AEABI    64      /* Contains symbol versioning. */
-+
- /* Additional symbol types for Thumb.  */
- #define STT_ARM_TFUNC		STT_LOPROC /* A Thumb function.  */
- #define STT_ARM_16BIT		STT_HIPROC /* A Thumb label.  */
-@@ -2363,12 +2366,19 @@ typedef Elf32_Addr Elf32_Conflict;
- 
- /* Processor specific values for the Phdr p_type field.  */
- #define PT_ARM_EXIDX		(PT_LOPROC + 1)	/* ARM unwind segment.  */
-+#define PT_ARM_UNWIND		PT_ARM_EXIDX
- 
- /* Processor specific values for the Shdr sh_type field.  */
- #define SHT_ARM_EXIDX		(SHT_LOPROC + 1) /* ARM unwind section.  */
- #define SHT_ARM_PREEMPTMAP	(SHT_LOPROC + 2) /* Preemption details.  */
- #define SHT_ARM_ATTRIBUTES	(SHT_LOPROC + 3) /* ARM attributes section.  */
- 
-+/* Processor specific values for the Dyn d_tag field.  */
-+#define DT_ARM_RESERVED1	(DT_LOPROC + 0)
-+#define DT_ARM_SYMTABSZ		(DT_LOPROC + 1)
-+#define DT_ARM_PREEMTMAB	(DT_LOPROC + 2)
-+#define DT_ARM_RESERVED2	(DT_LOPROC + 3)
-+#define DT_ARM_NUM		4
- 
- /* AArch64 relocs.  */
- 
-@@ -2647,6 +2657,7 @@ typedef Elf32_Addr Elf32_Conflict;
- 					   TLS block (LDR, STR).  */
- #define R_ARM_TLS_IE12GP	111	/* 12 bit GOT entry relative
- 					   to GOT origin (LDR).  */
-+/* 112 - 127 private range */
- #define R_ARM_ME_TOO		128	/* Obsolete.  */
- #define R_ARM_THM_TLS_DESCSEQ	129
- #define R_ARM_THM_TLS_DESCSEQ16	129
-diff --git a/tests/run-addrcfi.sh b/tests/run-addrcfi.sh
-index 5d33246..78464a8 100755
---- a/tests/run-addrcfi.sh
-+++ b/tests/run-addrcfi.sh
-@@ -2530,6 +2530,38 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
- 	FPA reg21 (f5): undefined
- 	FPA reg22 (f6): undefined
- 	FPA reg23 (f7): undefined
-+	VFP reg64 (s0): undefined
-+	VFP reg65 (s1): undefined
-+	VFP reg66 (s2): undefined
-+	VFP reg67 (s3): undefined
-+	VFP reg68 (s4): undefined
-+	VFP reg69 (s5): undefined
-+	VFP reg70 (s6): undefined
-+	VFP reg71 (s7): undefined
-+	VFP reg72 (s8): undefined
-+	VFP reg73 (s9): undefined
-+	VFP reg74 (s10): undefined
-+	VFP reg75 (s11): undefined
-+	VFP reg76 (s12): undefined
-+	VFP reg77 (s13): undefined
-+	VFP reg78 (s14): undefined
-+	VFP reg79 (s15): undefined
-+	VFP reg80 (s16): undefined
-+	VFP reg81 (s17): undefined
-+	VFP reg82 (s18): undefined
-+	VFP reg83 (s19): undefined
-+	VFP reg84 (s20): undefined
-+	VFP reg85 (s21): undefined
-+	VFP reg86 (s22): undefined
-+	VFP reg87 (s23): undefined
-+	VFP reg88 (s24): undefined
-+	VFP reg89 (s25): undefined
-+	VFP reg90 (s26): undefined
-+	VFP reg91 (s27): undefined
-+	VFP reg92 (s28): undefined
-+	VFP reg93 (s29): undefined
-+	VFP reg94 (s30): undefined
-+	VFP reg95 (s31): undefined
- 	FPA reg96 (f0): undefined
- 	FPA reg97 (f1): undefined
- 	FPA reg98 (f2): undefined
-@@ -2538,7 +2570,66 @@ dwarf_cfi_addrframe (.eh_frame): no matching address range
- 	FPA reg101 (f5): undefined
- 	FPA reg102 (f6): undefined
- 	FPA reg103 (f7): undefined
--	integer reg128 (spsr): undefined
-+	MMX reg104 (wcgr0): undefined
-+	MMX reg105 (wcgr1): undefined
-+	MMX reg106 (wcgr2): undefined
-+	MMX reg107 (wcgr3): undefined
-+	MMX reg108 (wcgr4): undefined
-+	MMX reg109 (wcgr5): undefined
-+	MMX reg110 (wcgr6): undefined
-+	MMX reg111 (wcgr7): undefined
-+	MMX reg112 (wr0): undefined
-+	MMX reg113 (wr1): undefined
-+	MMX reg114 (wr2): undefined
-+	MMX reg115 (wr3): undefined
-+	MMX reg116 (wr4): undefined
-+	MMX reg117 (wr5): undefined
-+	MMX reg118 (wr6): undefined
-+	MMX reg119 (wr7): undefined
-+	MMX reg120 (wr8): undefined
-+	MMX reg121 (wr9): undefined
-+	MMX reg122 (wr10): undefined
-+	MMX reg123 (wr11): undefined
-+	MMX reg124 (wr12): undefined
-+	MMX reg125 (wr13): undefined
-+	MMX reg126 (wr14): undefined
-+	MMX reg127 (wr15): undefined
-+	state reg128 (spsr): undefined
-+	state reg129 (spsr_fiq): undefined
-+	state reg130 (spsr_irq): undefined
-+	state reg131 (spsr_abt): undefined
-+	state reg132 (spsr_und): undefined
-+	state reg133 (spsr_svc): undefined
-+	integer reg144 (r8_usr): undefined
-+	integer reg145 (r9_usr): undefined
-+	integer reg146 (r10_usr): undefined
-+	integer reg147 (r11_usr): undefined
-+	integer reg148 (r12_usr): undefined
-+	integer reg149 (r13_usr): undefined
-+	integer reg150 (r14_usr): undefined
-+	integer reg151 (r8_fiq): undefined
-+	integer reg152 (r9_fiq): undefined
-+	integer reg153 (r10_fiq): undefined
-+	integer reg154 (r11_fiq): undefined
-+	integer reg155 (r12_fiq): undefined
-+	integer reg156 (r13_fiq): undefined
-+	integer reg157 (r14_fiq): undefined
-+	integer reg158 (r13_irq): undefined
-+	integer reg159 (r14_irq): undefined
-+	integer reg160 (r13_abt): undefined
-+	integer reg161 (r14_abt): undefined
-+	integer reg162 (r13_und): undefined
-+	integer reg163 (r14_und): undefined
-+	integer reg164 (r13_svc): undefined
-+	integer reg165 (r14_svc): undefined
-+	MMX reg192 (wc0): undefined
-+	MMX reg193 (wc1): undefined
-+	MMX reg194 (wc2): undefined
-+	MMX reg195 (wc3): undefined
-+	MMX reg196 (wc4): undefined
-+	MMX reg197 (wc5): undefined
-+	MMX reg198 (wc6): undefined
-+	MMX reg199 (wc7): undefined
- 	VFP reg256 (d0): undefined
- 	VFP reg257 (d1): undefined
- 	VFP reg258 (d2): undefined
-diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh
-index 6f3862e..13557d5 100755
---- a/tests/run-allregs.sh
-+++ b/tests/run-allregs.sh
-@@ -2671,7 +2671,28 @@ integer registers:
- 	 13: sp (sp), address 32 bits
- 	 14: lr (lr), address 32 bits
- 	 15: pc (pc), address 32 bits
--	128: spsr (spsr), unsigned 32 bits
-+	144: r8_usr (r8_usr), signed 32 bits
-+	145: r9_usr (r9_usr), signed 32 bits
-+	146: r10_usr (r10_usr), signed 32 bits
-+	147: r11_usr (r11_usr), signed 32 bits
-+	148: r12_usr (r12_usr), signed 32 bits
-+	149: r13_usr (r13_usr), signed 32 bits
-+	150: r14_usr (r14_usr), signed 32 bits
-+	151: r8_fiq (r8_fiq), signed 32 bits
-+	152: r9_fiq (r9_fiq), signed 32 bits
-+	153: r10_fiq (r10_fiq), signed 32 bits
-+	154: r11_fiq (r11_fiq), signed 32 bits
-+	155: r12_fiq (r12_fiq), signed 32 bits
-+	156: r13_fiq (r13_fiq), signed 32 bits
-+	157: r14_fiq (r14_fiq), signed 32 bits
-+	158: r13_irq (r13_irq), signed 32 bits
-+	159: r14_irq (r14_irq), signed 32 bits
-+	160: r13_abt (r13_abt), signed 32 bits
-+	161: r14_abt (r14_abt), signed 32 bits
-+	162: r13_und (r13_und), signed 32 bits
-+	163: r14_und (r14_und), signed 32 bits
-+	164: r13_svc (r13_svc), signed 32 bits
-+	165: r14_svc (r14_svc), signed 32 bits
- FPA registers:
- 	 16: f0 (f0), float 96 bits
- 	 17: f1 (f1), float 96 bits
-@@ -2689,7 +2710,72 @@ FPA registers:
- 	101: f5 (f5), float 96 bits
- 	102: f6 (f6), float 96 bits
- 	103: f7 (f7), float 96 bits
-+MMX registers:
-+	104: wcgr0 (wcgr0), unsigned 32 bits
-+	105: wcgr1 (wcgr1), unsigned 32 bits
-+	106: wcgr2 (wcgr2), unsigned 32 bits
-+	107: wcgr3 (wcgr3), unsigned 32 bits
-+	108: wcgr4 (wcgr4), unsigned 32 bits
-+	109: wcgr5 (wcgr5), unsigned 32 bits
-+	110: wcgr6 (wcgr6), unsigned 32 bits
-+	111: wcgr7 (wcgr7), unsigned 32 bits
-+	112: wr0 (wr0), unsigned 64 bits
-+	113: wr1 (wr1), unsigned 64 bits
-+	114: wr2 (wr2), unsigned 64 bits
-+	115: wr3 (wr3), unsigned 64 bits
-+	116: wr4 (wr4), unsigned 64 bits
-+	117: wr5 (wr5), unsigned 64 bits
-+	118: wr6 (wr6), unsigned 64 bits
-+	119: wr7 (wr7), unsigned 64 bits
-+	120: wr8 (wr8), unsigned 64 bits
-+	121: wr9 (wr9), unsigned 64 bits
-+	122: wr10 (wr10), unsigned 64 bits
-+	123: wr11 (wr11), unsigned 64 bits
-+	124: wr12 (wr12), unsigned 64 bits
-+	125: wr13 (wr13), unsigned 64 bits
-+	126: wr14 (wr14), unsigned 64 bits
-+	127: wr15 (wr15), unsigned 64 bits
-+	192: wc0 (wc0), unsigned 32 bits
-+	193: wc1 (wc1), unsigned 32 bits
-+	194: wc2 (wc2), unsigned 32 bits
-+	195: wc3 (wc3), unsigned 32 bits
-+	196: wc4 (wc4), unsigned 32 bits
-+	197: wc5 (wc5), unsigned 32 bits
-+	198: wc6 (wc6), unsigned 32 bits
-+	199: wc7 (wc7), unsigned 32 bits
- VFP registers:
-+	 64: s0 (s0), float 32 bits
-+	 65: s1 (s1), float 32 bits
-+	 66: s2 (s2), float 32 bits
-+	 67: s3 (s3), float 32 bits
-+	 68: s4 (s4), float 32 bits
-+	 69: s5 (s5), float 32 bits
-+	 70: s6 (s6), float 32 bits
-+	 71: s7 (s7), float 32 bits
-+	 72: s8 (s8), float 32 bits
-+	 73: s9 (s9), float 32 bits
-+	 74: s10 (s10), float 32 bits
-+	 75: s11 (s11), float 32 bits
-+	 76: s12 (s12), float 32 bits
-+	 77: s13 (s13), float 32 bits
-+	 78: s14 (s14), float 32 bits
-+	 79: s15 (s15), float 32 bits
-+	 80: s16 (s16), float 32 bits
-+	 81: s17 (s17), float 32 bits
-+	 82: s18 (s18), float 32 bits
-+	 83: s19 (s19), float 32 bits
-+	 84: s20 (s20), float 32 bits
-+	 85: s21 (s21), float 32 bits
-+	 86: s22 (s22), float 32 bits
-+	 87: s23 (s23), float 32 bits
-+	 88: s24 (s24), float 32 bits
-+	 89: s25 (s25), float 32 bits
-+	 90: s26 (s26), float 32 bits
-+	 91: s27 (s27), float 32 bits
-+	 92: s28 (s28), float 32 bits
-+	 93: s29 (s29), float 32 bits
-+	 94: s30 (s30), float 32 bits
-+	 95: s31 (s31), float 32 bits
- 	256: d0 (d0), float 64 bits
- 	257: d1 (d1), float 64 bits
- 	258: d2 (d2), float 64 bits
-@@ -2722,6 +2808,13 @@ VFP registers:
- 	285: d29 (d29), float 64 bits
- 	286: d30 (d30), float 64 bits
- 	287: d31 (d31), float 64 bits
-+state registers:
-+	128: spsr (spsr), unsigned 32 bits
-+	129: spsr_fiq (spsr_fiq), unsigned 32 bits
-+	130: spsr_irq (spsr_irq), unsigned 32 bits
-+	131: spsr_abt (spsr_abt), unsigned 32 bits
-+	132: spsr_und (spsr_und), unsigned 32 bits
-+	133: spsr_svc (spsr_svc), unsigned 32 bits
- EOF
- 
- # See run-readelf-mixed-corenote.sh for instructions to regenerate
-diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh
-index 01e4594..9a8a380 100755
---- a/tests/run-readelf-mixed-corenote.sh
-+++ b/tests/run-readelf-mixed-corenote.sh
-@@ -30,12 +30,11 @@ Note segment of 892 bytes at offset 0x274:
-     pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
-     utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
-     orig_r0: -1, fpvalid: 1
--    r0:             1  r1:   -1091672508  r2:   -1091672500
--    r3:             0  r4:             0  r5:             0
--    r6:         33728  r7:             0  r8:             0
--    r9:             0  r10:  -1225703496  r11:  -1091672844
--    r12:            0  sp:    0xbeee64f4  lr:    0xb6dc3f48
--    pc:    0x00008500  spsr:  0x60000010
-+    r0:            1  r1:  -1091672508  r2:  -1091672500  r3:            0
-+    r4:            0  r5:            0  r6:        33728  r7:            0
-+    r8:            0  r9:            0  r10: -1225703496  r11: -1091672844
-+    r12:           0  sp:   0xbeee64f4  lr:   0xb6dc3f48  pc:   0x00008500
-+    spsr:  0x60000010
-   CORE                 124  PRPSINFO
-     state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
-     uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/arm_func_value.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/arm_func_value.patch
deleted file mode 100644
index 2fe4df6..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/arm_func_value.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-From: Mark Wielaard <mjw@redhat.com>
-Date: Sun, 15 Jun 2014 11:30:35 +0200
-Subject: libebl: Add sym_func_value hook.
-
-The ARM EABI says that the zero bit of function symbol st_value indicates
-whether the symbol points to a THUMB or ARM function. Add a new ebl hook
-to adjust the st_value in such a case so that we get the actual value that
-the symbol points to. It isn't easily possible to reuse the existing
-resolve_sym_value for this purpose, so we end up with another hook that
-can be used from dwfl_module_getsym and elflint.
-
-Rebase arm_func_value.patch from 0.159 to 0.160
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- backends/arm_init.c          |    1 +
- backends/arm_symbol.c        |    8 ++++++++
- libdwfl/dwfl_module_getsym.c |    2 +-
- libebl/Makefile.am           |    3 ++-
- libebl/ebl-hooks.h           |    3 +++
- libebl/eblsymfuncval.c       |   43 ++++++++++++++++++++++++++++++++++++++++++
- libebl/libebl.h              |   11 +++++++++++
- 7 files changed, 69 insertions(+), 2 deletions(-)
-
-diff --git a/backends/arm_init.c b/backends/arm_init.c
-index 7171186..9f03630 100644
---- a/backends/arm_init.c
-+++ b/backends/arm_init.c
-@@ -78,6 +78,7 @@ arm_init (elf, machine, eh, ehlen)
-     eh->return_value_location = arm_return_value_location_hard;
-   HOOK (eh, abi_cfi);
-   HOOK (eh, check_reloc_target_type);
-+  HOOK (eh, sym_func_value);
-   HOOK (eh, symbol_type_name);
- 
-   /* We only unwind the core integer registers.  */
-diff --git a/backends/arm_symbol.c b/backends/arm_symbol.c
-index da4a50a..ccea03b 100644
---- a/backends/arm_symbol.c
-+++ b/backends/arm_symbol.c
-@@ -130,6 +130,14 @@ arm_check_reloc_target_type (Ebl *ebl __attribute__ ((unused)), Elf64_Word sh_ty
-   return sh_type == SHT_ARM_EXIDX;
- }
- 
-+/* ARM EABI says that the low bit indicates whether the function
-+   symbol value is a THUMB function or not.  Mask it off.  */
-+GElf_Addr
-+arm_sym_func_value (Ebl *ebl __attribute__ ((unused)), GElf_Addr val)
-+{
-+  return val & ~(GElf_Addr)1;
-+}
-+
- const char *
- arm_symbol_type_name (int type,
- 		      char *buf __attribute__ ((unused)),
-diff --git a/libdwfl/dwfl_module_getsym.c b/libdwfl/dwfl_module_getsym.c
-index 42d2b67..fb192d7 100644
---- a/libdwfl/dwfl_module_getsym.c
-+++ b/libdwfl/dwfl_module_getsym.c
-@@ -119,7 +119,7 @@ __libdwfl_getsym (Dwfl_Module *mod, int ndx, GElf_Sym *sym, GElf_Addr *addr,
-      descriptors).  */
- 
-   char *ident;
--  GElf_Addr st_value = sym->st_value & ebl_func_addr_mask (mod->ebl);
-+  GElf_Addr st_value = ebl_sym_func_value (mod->ebl, sym->st_value);
-   *resolved = false;
-   if (! adjust_st_value && mod->e_type != ET_REL && alloc
-       && (GELF_ST_TYPE (sym->st_info) == STT_FUNC
-diff --git a/libebl/Makefile.am b/libebl/Makefile.am
-index ec4477b..889c21b 100644
---- a/libebl/Makefile.am
-+++ b/libebl/Makefile.am
-@@ -55,7 +55,8 @@ gen_SOURCES = eblopenbackend.c eblclosebackend.c eblstrtab.c \
- 	      eblsysvhashentrysize.c eblauxvinfo.c eblcheckobjattr.c \
- 	      ebl_check_special_section.c ebl_syscall_abi.c eblabicfi.c \
- 	      eblstother.c eblinitreg.c ebldwarftoregno.c eblnormalizepc.c \
--	      eblunwind.c eblresolvesym.c eblcheckreloctargettype.c
-+	      eblunwind.c eblresolvesym.c eblcheckreloctargettype.c \
-+	      eblsymfuncval.c
- 
- libebl_a_SOURCES = $(gen_SOURCES)
- 
-diff --git a/libebl/ebl-hooks.h b/libebl/ebl-hooks.h
-index 2e31446..9df945d 100644
---- a/libebl/ebl-hooks.h
-+++ b/libebl/ebl-hooks.h
-@@ -191,5 +191,8 @@ bool EBLHOOK(unwind) (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc,
-    (e.g. function descriptor resolving)  */
- bool EBLHOOK(resolve_sym_value) (Ebl *ebl, GElf_Addr *addr);
- 
-+/* Returns the real value of a symbol function address or offset.  */
-+GElf_Addr EBLHOOK(sym_func_value) (Ebl *ebl, GElf_Addr val);
-+
- /* Destructor for ELF backend handle.  */
- void EBLHOOK(destr) (struct ebl *);
-diff --git a/libebl/eblsymfuncval.c b/libebl/eblsymfuncval.c
-new file mode 100644
-index 0000000..c0b322f
---- /dev/null
-+++ b/libebl/eblsymfuncval.c
-@@ -0,0 +1,43 @@
-+/* Turn a symbol function value into a real function address or offset.
-+   Copyright (C) 2014 Red Hat, Inc.
-+   This file is part of elfutils.
-+
-+   This file is free software; you can redistribute it and/or modify
-+   it under the terms of either
-+
-+     * the GNU Lesser General Public License as published by the Free
-+       Software Foundation; either version 3 of the License, or (at
-+       your option) any later version
-+
-+   or
-+
-+     * 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
-+
-+   or both in parallel, as here.
-+
-+   elfutils 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 copies of the GNU General Public License and
-+   the GNU Lesser General Public License along with this program.  If
-+   not, see <http://www.gnu.org/licenses/>.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <libeblP.h>
-+#include <assert.h>
-+
-+GElf_Addr
-+ebl_sym_func_value (Ebl *ebl, GElf_Addr val)
-+{
-+  if (ebl == NULL || ebl->sym_func_value == NULL)
-+    return val;
-+
-+  return ebl->sym_func_value (ebl, val);
-+}
-diff --git a/libebl/libebl.h b/libebl/libebl.h
-index 7dbf460..96c076b 100644
---- a/libebl/libebl.h
-+++ b/libebl/libebl.h
-@@ -472,6 +472,17 @@ extern bool ebl_unwind (Ebl *ebl, Dwarf_Addr pc, ebl_tid_registers_t *setfunc,
- extern bool ebl_resolve_sym_value (Ebl *ebl, GElf_Addr *addr)
-    __nonnull_attribute__ (2);
- 
-+/* Returns the real value of a symbol function address or offset
-+   (e.g. when the st_value contains some flag bits that need to be
-+   masked off).  This is different from ebl_resolve_sym_value which
-+   only works for actual symbol addresses (in non-ET_REL files) that
-+   might resolve to an address in a different section.
-+   ebl_sym_func_value is called to turn the given value into the a
-+   real address or offset (the original value might not be a real
-+   address).  This works for both ET_REL when the value is a section
-+   offset or ET_EXEC or ET_DYN symbol values, which are addresses.  */
-+extern GElf_Addr ebl_sym_func_value (Ebl *ebl, GElf_Addr val);
-+
- #ifdef __cplusplus
- }
- #endif
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/arm_unwind_ret_mask.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/arm_unwind_ret_mask.patch
deleted file mode 100644
index 8abb36b..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/arm_unwind_ret_mask.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From: Mark Wielaard <mjw@redhat.com>
-Date: Sun, 15 Jun 2014 12:30:02 +0200
-Subject: libebl: Add ebl_unwind_ret_mask.
-
-Another ARM oddity. A return value address in an unwind will contain an
-extra bit to indicate whether to return to a regular ARM or THUMB function.
-Add a new ebl function to return a mask to use to get the actual return
-address during an unwind ebl_unwind_ret_mask.
-
-Rebase arm_unwind_ret_mask.patch from 0.159 to 0.160
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- backends/arm_init.c | 3 +++
- libebl/eblinitreg.c | 8 ++++++++
- libebl/libebl.h     | 4 ++++
- libebl/libeblP.h    | 6 ++++++
- 4 files changed, 21 insertions(+)
-
-diff --git a/backends/arm_init.c b/backends/arm_init.c
-index 2266829..f8df042 100644
---- a/backends/arm_init.c
-+++ b/backends/arm_init.c
-@@ -87,5 +87,8 @@ arm_init (elf, machine, eh, ehlen)
-   /* Bit zero encodes whether an function address is THUMB or ARM. */
-   eh->func_addr_mask = ~(GElf_Addr)1;
- 
-+  /* Bit zero encodes whether to return to a THUMB or ARM function. */
-+  eh->unwind_ret_mask = ~(GElf_Addr)1;
-+
-   return MODVERSION;
- }
-diff --git a/libebl/eblinitreg.c b/libebl/eblinitreg.c
-index 5729b3c..ca681c0 100644
---- a/libebl/eblinitreg.c
-+++ b/libebl/eblinitreg.c
-@@ -56,3 +56,11 @@ ebl_func_addr_mask (Ebl *ebl)
-   return ((ebl == NULL || ebl->func_addr_mask == 0)
- 	  ? ~(GElf_Addr)0 : ebl->func_addr_mask);
- }
-+
-+GElf_Addr
-+ebl_unwind_ret_mask (Ebl *ebl)
-+{
-+  return ((ebl == NULL || ebl->unwind_ret_mask == 0)
-+	  ? ~(GElf_Addr)0 : ebl->unwind_ret_mask);
-+}
-+
-diff --git a/libebl/libebl.h b/libebl/libebl.h
-index 40cf635..be70027 100644
---- a/libebl/libebl.h
-+++ b/libebl/libebl.h
-@@ -420,6 +420,10 @@ extern size_t ebl_frame_nregs (Ebl *ebl)
-    tables) is needed.  */
- extern GElf_Addr ebl_func_addr_mask (Ebl *ebl);
- 
-+/* Mask to use for unwind return address in case the architecture adds
-+   some extra non-address bits to it.  */
-+extern GElf_Addr ebl_unwind_ret_mask (Ebl *ebl);
-+
- /* Convert *REGNO as is in DWARF to a lower range suitable for
-    Dwarf_Frame->REGS indexing.  */
- extern bool ebl_dwarf_to_regno (Ebl *ebl, unsigned *regno)
-diff --git a/libebl/libeblP.h b/libebl/libeblP.h
-index dbd67f3..e18ace6 100644
---- a/libebl/libeblP.h
-+++ b/libebl/libeblP.h
-@@ -70,6 +70,12 @@ struct ebl
-      otherwise it should be the actual mask to use.  */
-   GElf_Addr func_addr_mask;
- 
-+  /* Mask to use to get the return address from an unwind in case the
-+     architecture adds some extra non-address bits to it.  When not
-+     initialized (0) then ebl_unwind_ret_mask will return ~0, otherwise
-+     it should be the actual mask to use.  */
-+  GElf_Addr unwind_ret_mask;
-+
-   /* Function descriptor load address and table as used by
-      ebl_resolve_sym_value if available for this arch.  */
-   GElf_Addr fd_addr;
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/hppa_backend.diff b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/hppa_backend.diff
deleted file mode 100644
index d51a720..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/hppa_backend.diff
+++ /dev/null
@@ -1,800 +0,0 @@
-Index: elfutils-0.158/backends/parisc_init.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/parisc_init.c	2014-04-21 11:12:12.228150280 +0000
-@@ -0,0 +1,74 @@
-+/* Initialization of PA-RISC specific backend library.
-+   Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
-+   This file is part of Red Hat elfutils.
-+   Written by Ulrich Drepper <drepper@redhat.com>, 2002.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#define BACKEND		parisc_
-+#define RELOC_PREFIX	R_PARISC_
-+#include "libebl_CPU.h"
-+#include "libebl_parisc.h"
-+
-+/* This defines the common reloc hooks based on parisc_reloc.def.  */
-+#include "common-reloc.c"
-+
-+
-+const char *
-+parisc_init (elf, machine, eh, ehlen)
-+     Elf *elf __attribute__ ((unused));
-+     GElf_Half machine __attribute__ ((unused));
-+     Ebl *eh;
-+     size_t ehlen;
-+{
-+  int pa64 = 0;
-+
-+  /* Check whether the Elf_BH object has a sufficent size.  */
-+  if (ehlen < sizeof (Ebl))
-+    return NULL;
-+
-+  if (elf) {
-+    GElf_Ehdr ehdr_mem;
-+    GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
-+    if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE))
-+      pa64 = 1;
-+  }
-+  /* We handle it.  */
-+  eh->name = "PA-RISC";
-+  parisc_init_reloc (eh);
-+  HOOK (eh, reloc_simple_type);
-+  HOOK (eh, machine_flag_check);
-+  HOOK (eh, symbol_type_name);
-+  HOOK (eh, segment_type_name);
-+  HOOK (eh, section_type_name);
-+  HOOK (eh, register_info);
-+  if (pa64)
-+    eh->return_value_location = parisc_return_value_location_64;
-+  else
-+    eh->return_value_location = parisc_return_value_location_32;
-+
-+  return MODVERSION;
-+}
-Index: elfutils-0.158/backends/parisc_regs.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/parisc_regs.c	2014-04-21 11:12:12.228150280 +0000
-@@ -0,0 +1,159 @@
-+/* Register names and numbers for PA-RISC DWARF.
-+   Copyright (C) 2005, 2006 Red Hat, Inc.
-+   This file is part of Red Hat elfutils.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <dwarf.h>
-+
-+#define BACKEND parisc_
-+#include "libebl_CPU.h"
-+
-+ssize_t
-+parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen,
-+		     const char **prefix, const char **setname,
-+		     int *bits, int *type)
-+{
-+  int pa64 = 0;
-+
-+  if (ebl->elf) {
-+    GElf_Ehdr ehdr_mem;
-+    GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem);
-+    if (ehdr->e_flags & EF_PARISC_WIDE)
-+      pa64 = 1;
-+  }
-+
-+  int nregs = pa64 ? 127 : 128;
-+
-+  if (name == NULL)
-+    return nregs;
-+
-+  if (regno < 0 || regno >= nregs || namelen < 6)
-+    return -1;
-+
-+  *prefix = "%";
-+
-+  if (regno < 32)
-+  {
-+    *setname = "integer";
-+    *type = DW_ATE_signed;
-+    if (pa64)
-+    {
-+	*bits = 64;
-+    }
-+    else
-+    {
-+    	*bits = 32;
-+    }
-+  }
-+  else if (regno == 32)
-+  {
-+    *setname = "special";
-+    if (pa64)
-+    {
-+	*bits = 6;
-+    }
-+    else
-+    {
-+    	*bits = 5;
-+    }
-+    *type = DW_ATE_unsigned;
-+  }
-+  else
-+  {
-+    *setname = "FPU";
-+    *type = DW_ATE_float;
-+    if (pa64)
-+    {
-+	*bits = 64;
-+    }
-+    else
-+    {
-+    	*bits = 32;
-+    }
-+  }
-+
-+  if (regno < 33) {
-+    switch (regno)
-+      {
-+      case 0 ... 9:
-+        name[0] = 'r';
-+        name[1] = regno + '0';
-+        namelen = 2;
-+        break;
-+      case 10 ... 31:
-+        name[0] = 'r';
-+        name[1] = regno / 10 + '0';
-+        name[2] = regno % 10 + '0';
-+        namelen = 3;
-+        break;
-+      case 32:
-+	*prefix = NULL;
-+	name[0] = 'S';
-+	name[1] = 'A';
-+	name[2] = 'R';
-+	namelen = 3;
-+	break;
-+      }
-+  }
-+  else {
-+    if (pa64 && ((regno - 72) % 2)) {
-+      *setname = NULL;
-+      return 0;
-+    }
-+
-+    switch (regno)
-+      {
-+      case 72 + 0 ... 72 + 11:
-+        name[0] = 'f';
-+	name[1] = 'r';
-+        name[2] = (regno + 8 - 72) / 2 + '0';
-+        namelen = 3;
-+        if ((regno + 8 - 72) % 2) {
-+	  name[3] = 'R';
-+	  namelen++;
-+        }
-+        break;
-+      case 72 + 12 ... 72 + 55:
-+        name[0] = 'f';
-+	name[1] = 'r';
-+        name[2] = (regno + 8 - 72) / 2 / 10 + '0';
-+        name[3] = (regno + 8 - 72) / 2 % 10 + '0';
-+        namelen = 4;
-+        if ((regno + 8 - 72) % 2) {
-+	  name[4] = 'R';
-+	  namelen++;
-+        }
-+        break;
-+      default:
-+        *setname = NULL;
-+        return 0;
-+      }
-+  }
-+  name[namelen++] = '\0';
-+  return namelen;
-+}
-Index: elfutils-0.158/backends/parisc_reloc.def
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/parisc_reloc.def	2014-04-21 11:12:12.228150280 +0000
-@@ -0,0 +1,128 @@
-+/* List the relocation types for PA-RISC.  -*- C -*-
-+   Copyright (C) 2005 Red Hat, Inc.
-+   This file is part of Red Hat elfutils.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+/*	    NAME,		REL|EXEC|DYN	*/
-+
-+RELOC_TYPE (NONE,		EXEC|DYN)
-+RELOC_TYPE (DIR32,		REL|EXEC|DYN)
-+RELOC_TYPE (DIR21L,		REL|EXEC|DYN)
-+RELOC_TYPE (DIR17R,		REL)
-+RELOC_TYPE (DIR17F,		REL)
-+RELOC_TYPE (DIR14R,		REL|DYN)
-+RELOC_TYPE (PCREL32,		REL)
-+RELOC_TYPE (PCREL21L,		REL)
-+RELOC_TYPE (PCREL17R,		REL)
-+RELOC_TYPE (PCREL17F,		REL)
-+RELOC_TYPE (PCREL14R,		REL|EXEC)
-+RELOC_TYPE (DPREL21L,		REL)
-+RELOC_TYPE (DPREL14WR,		REL)
-+RELOC_TYPE (DPREL14DR,          REL)
-+RELOC_TYPE (DPREL14R,		REL)
-+RELOC_TYPE (GPREL21L,		0)
-+RELOC_TYPE (GPREL14R,		0)
-+RELOC_TYPE (LTOFF21L,		REL)
-+RELOC_TYPE (LTOFF14R,		REL)
-+RELOC_TYPE (DLTIND14F,		0)
-+RELOC_TYPE (SETBASE,		0)
-+RELOC_TYPE (SECREL32,		REL)
-+RELOC_TYPE (BASEREL21L,		0)
-+RELOC_TYPE (BASEREL17R,		0)
-+RELOC_TYPE (BASEREL14R,		0)
-+RELOC_TYPE (SEGBASE,		0)
-+RELOC_TYPE (SEGREL32,		REL)
-+RELOC_TYPE (PLTOFF21L,		0)
-+RELOC_TYPE (PLTOFF14R,		0)
-+RELOC_TYPE (PLTOFF14F,		0)
-+RELOC_TYPE (LTOFF_FPTR32,	0)
-+RELOC_TYPE (LTOFF_FPTR21L,	0)
-+RELOC_TYPE (LTOFF_FPTR14R,	0)
-+RELOC_TYPE (FPTR64,		0)
-+RELOC_TYPE (PLABEL32,		REL|DYN)
-+RELOC_TYPE (PCREL64,		0)
-+RELOC_TYPE (PCREL22C,		0)
-+RELOC_TYPE (PCREL22F,		0)
-+RELOC_TYPE (PCREL14WR,		0)
-+RELOC_TYPE (PCREL14DR,		0)
-+RELOC_TYPE (PCREL16F,		0)
-+RELOC_TYPE (PCREL16WF,		0)
-+RELOC_TYPE (PCREL16DF,		0)
-+RELOC_TYPE (DIR64,		REL|DYN)
-+RELOC_TYPE (DIR14WR,		REL)
-+RELOC_TYPE (DIR14DR,		REL)
-+RELOC_TYPE (DIR16F,		REL)
-+RELOC_TYPE (DIR16WF,		REL)
-+RELOC_TYPE (DIR16DF,		REL)
-+RELOC_TYPE (GPREL64,		0)
-+RELOC_TYPE (GPREL14WR,		0)
-+RELOC_TYPE (GPREL14DR,		0)
-+RELOC_TYPE (GPREL16F,		0)
-+RELOC_TYPE (GPREL16WF,		0)
-+RELOC_TYPE (GPREL16DF,		0)
-+RELOC_TYPE (LTOFF64,		0)
-+RELOC_TYPE (LTOFF14WR,		0)
-+RELOC_TYPE (LTOFF14DR,		0)
-+RELOC_TYPE (LTOFF16F,		0)
-+RELOC_TYPE (LTOFF16WF,		0)
-+RELOC_TYPE (LTOFF16DF,		0)
-+RELOC_TYPE (SECREL64,		0)
-+RELOC_TYPE (BASEREL14WR,	0)
-+RELOC_TYPE (BASEREL14DR,	0)
-+RELOC_TYPE (SEGREL64,		0)
-+RELOC_TYPE (PLTOFF14WR,		0)
-+RELOC_TYPE (PLTOFF14DR,		0)
-+RELOC_TYPE (PLTOFF16F,		0)
-+RELOC_TYPE (PLTOFF16WF,		0)
-+RELOC_TYPE (PLTOFF16DF,		0)
-+RELOC_TYPE (LTOFF_FPTR64,	0)
-+RELOC_TYPE (LTOFF_FPTR14WR,	0)
-+RELOC_TYPE (LTOFF_FPTR14DR,	0)
-+RELOC_TYPE (LTOFF_FPTR16F,	0)
-+RELOC_TYPE (LTOFF_FPTR16WF,	0)
-+RELOC_TYPE (LTOFF_FPTR16DF,	0)
-+RELOC_TYPE (COPY,		EXEC)
-+RELOC_TYPE (IPLT,		EXEC|DYN)
-+RELOC_TYPE (EPLT,		0)
-+RELOC_TYPE (TPREL32,		DYN)
-+RELOC_TYPE (TPREL21L,		0)
-+RELOC_TYPE (TPREL14R,		0)
-+RELOC_TYPE (LTOFF_TP21L,	0)
-+RELOC_TYPE (LTOFF_TP14R,	0)
-+RELOC_TYPE (LTOFF_TP14F,	0)
-+RELOC_TYPE (TPREL64,		0)
-+RELOC_TYPE (TPREL14WR,		0)
-+RELOC_TYPE (TPREL14DR,		0)
-+RELOC_TYPE (TPREL16F,		0)
-+RELOC_TYPE (TPREL16WF,		0)
-+RELOC_TYPE (TPREL16DF,		0)
-+RELOC_TYPE (LTOFF_TP64,		0)
-+RELOC_TYPE (LTOFF_TP14WR,	0)
-+RELOC_TYPE (LTOFF_TP14DR,	0)
-+RELOC_TYPE (LTOFF_TP16F,	0)
-+RELOC_TYPE (LTOFF_TP16WF,	0)
-+RELOC_TYPE (LTOFF_TP16DF,	0)
-+RELOC_TYPE (TLS_DTPMOD32,	DYN)
-+RELOC_TYPE (TLS_DTPMOD64,	DYN)
-+
-+#define NO_RELATIVE_RELOC       1
-Index: elfutils-0.158/backends/parisc_retval.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/parisc_retval.c	2014-04-21 11:12:12.228150280 +0000
-@@ -0,0 +1,213 @@
-+/* Function return value location for Linux/PA-RISC ABI.
-+   Copyright (C) 2005 Red Hat, Inc.
-+   This file is part of Red Hat elfutils.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <assert.h>
-+#include <dwarf.h>
-+
-+#define BACKEND parisc_
-+#include "libebl_CPU.h"
-+#include "libebl_parisc.h"
-+
-+/* %r28, or pair %r28, %r29.  */
-+static const Dwarf_Op loc_intreg32[] =
-+  {
-+    { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 },
-+    { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 },
-+  };
-+
-+static const Dwarf_Op loc_intreg[] =
-+  {
-+    { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 },
-+    { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 },
-+  };
-+#define nloc_intreg	1
-+#define nloc_intregpair	4
-+
-+/* %fr4L, or pair %fr4L, %fr4R on pa-32 */
-+static const Dwarf_Op loc_fpreg32[] =
-+  {
-+    { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 },
-+    { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 },
-+  };
-+#define nloc_fpreg32 2
-+#define nloc_fpregpair32 4
-+
-+/* $fr4 */
-+static const Dwarf_Op loc_fpreg[] =
-+  {
-+    { .atom = DW_OP_regx, .number = 72 },
-+  };
-+#define nloc_fpreg  1
-+
-+#if 0
-+/* The return value is a structure and is actually stored in stack space
-+   passed in a hidden argument by the caller. Address of the location is stored
-+   in %r28 before function call, but it may be changed by function. */
-+static const Dwarf_Op loc_aggregate[] =
-+  {
-+    { .atom = DW_OP_breg28 },
-+  };
-+#define nloc_aggregate 1
-+#endif
-+
-+static int
-+parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, int pa64)
-+{
-+  Dwarf_Word regsize = pa64 ? 8 : 4;
-+
-+  /* Start with the function's type, and get the DW_AT_type attribute,
-+     which is the type of the return value.  */
-+
-+  Dwarf_Attribute attr_mem;
-+  Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
-+  if (attr == NULL)
-+    /* The function has no return value, like a `void' function in C.  */
-+    return 0;
-+
-+  Dwarf_Die die_mem;
-+  Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
-+  int tag = dwarf_tag (typedie);
-+
-+  /* Follow typedefs and qualifiers to get to the actual type.  */
-+  while (tag == DW_TAG_typedef
-+	 || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+	 || tag == DW_TAG_restrict_type)
-+    {
-+      attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+      typedie = dwarf_formref_die (attr, &die_mem);
-+      tag = dwarf_tag (typedie);
-+    }
-+
-+  switch (tag)
-+    {
-+    case -1:
-+      return -1;
-+
-+    case DW_TAG_subrange_type:
-+      if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
-+	{
-+	  attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+	  typedie = dwarf_formref_die (attr, &die_mem);
-+	  tag = dwarf_tag (typedie);
-+	}
-+      /* Fall through.  */
-+
-+    case DW_TAG_base_type:
-+    case DW_TAG_enumeration_type:
-+    case DW_TAG_pointer_type:
-+    case DW_TAG_ptr_to_member_type:
-+      {
-+        Dwarf_Word size;
-+	if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
-+					 &attr_mem), &size) != 0)
-+	  {
-+	    if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
-+	      size = 4;
-+	    else
-+	      return -1;
-+	  }
-+	if (tag == DW_TAG_base_type)
-+	  {
-+	    Dwarf_Word encoding;
-+	    if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+					     &attr_mem), &encoding) != 0)
-+	      return -1;
-+
-+	    if (encoding == DW_ATE_float)
-+	      {
-+		if (pa64) {
-+		  *locp = loc_fpreg;
-+		  if (size <= 8)
-+		      return nloc_fpreg;
-+		}
-+		else {
-+		  *locp = loc_fpreg32;
-+		  if (size <= 4)
-+		    return nloc_fpreg32;
-+		  else if (size <= 8)
-+		    return nloc_fpregpair32;
-+		}
-+		goto aggregate;
-+	      }
-+	  }
-+	if (pa64)
-+	  *locp = loc_intreg;
-+	else
-+	  *locp = loc_intreg32;
-+	if (size <= regsize)
-+	  return nloc_intreg;
-+	if (size <= 2 * regsize)
-+	  return nloc_intregpair;
-+
-+	/* Else fall through.  */
-+      }
-+
-+    case DW_TAG_structure_type:
-+    case DW_TAG_class_type:
-+    case DW_TAG_union_type:
-+    case DW_TAG_array_type:
-+    aggregate: {
-+        Dwarf_Word size;
-+	if (dwarf_aggregate_size (typedie, &size) != 0)
-+	  return -1;
-+	if (pa64)
-+          *locp = loc_intreg;
-+	else
-+	  *locp = loc_intreg32;
-+        if (size <= regsize)
-+	  return nloc_intreg;
-+        if (size <= 2 * regsize)
-+	  return nloc_intregpair;
-+#if 0
-+	/* there should be some way to know this location... But I do not see it. */
-+        *locp = loc_aggregate;
-+        return nloc_aggregate;
-+#endif
-+	/* fall through.  */
-+      }
-+    }
-+
-+  /* XXX We don't have a good way to return specific errors from ebl calls.
-+     This value means we do not understand the type, but it is well-formed
-+     DWARF and might be valid.  */
-+  return -2;
-+}
-+
-+int
-+parisc_return_value_location_32 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+  return parisc_return_value_location_ (functypedie, locp, 0);
-+}
-+
-+int
-+parisc_return_value_location_64 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+  return parisc_return_value_location_ (functypedie, locp, 1);
-+}
-+
-Index: elfutils-0.158/backends/parisc_symbol.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/parisc_symbol.c	2014-04-21 11:12:12.228150280 +0000
-@@ -0,0 +1,112 @@
-+/* PA-RISC specific symbolic name handling.
-+   Copyright (C) 2002, 2005 Red Hat, Inc.
-+   This file is part of Red Hat elfutils.
-+   Written by Ulrich Drepper <drepper@redhat.com>, 2002.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <elf.h>
-+#include <stddef.h>
-+
-+#define BACKEND		parisc_
-+#include "libebl_CPU.h"
-+
-+const char *
-+parisc_segment_type_name (int segment, char *buf __attribute__ ((unused)),
-+			size_t len __attribute__ ((unused)))
-+{
-+  switch (segment)
-+    {
-+    case PT_PARISC_ARCHEXT:
-+      return "PARISC_ARCHEXT";
-+    case PT_PARISC_UNWIND:
-+      return "PARISC_UNWIND";
-+    default:
-+      break;
-+    }
-+  return NULL;
-+}
-+
-+/* Return symbolic representation of symbol type.  */
-+const char *
-+parisc_symbol_type_name(int symbol, char *buf __attribute__ ((unused)),
-+    size_t len __attribute__ ((unused)))
-+{
-+	if (symbol == STT_PARISC_MILLICODE)
-+	  return "PARISC_MILLI";
-+	return NULL;
-+}
-+
-+/* Return symbolic representation of section type.  */
-+const char *
-+parisc_section_type_name (int type,
-+			char *buf __attribute__ ((unused)),
-+			size_t len __attribute__ ((unused)))
-+{
-+  switch (type)
-+    {
-+    case SHT_PARISC_EXT:
-+      return "PARISC_EXT";
-+    case SHT_PARISC_UNWIND:
-+      return "PARISC_UNWIND";
-+    case SHT_PARISC_DOC:
-+      return "PARISC_DOC";
-+    }
-+
-+  return NULL;
-+}
-+
-+/* Check whether machine flags are valid.  */
-+bool
-+parisc_machine_flag_check (GElf_Word flags)
-+{
-+  if (flags &~ (EF_PARISC_TRAPNIL | EF_PARISC_EXT | EF_PARISC_LSB |
-+	EF_PARISC_WIDE | EF_PARISC_NO_KABP |
-+	EF_PARISC_LAZYSWAP | EF_PARISC_ARCH))
-+    return 0;
-+
-+  GElf_Word arch = flags & EF_PARISC_ARCH;
-+
-+  return ((arch == EFA_PARISC_1_0) || (arch == EFA_PARISC_1_1) ||
-+      (arch == EFA_PARISC_2_0));
-+}
-+
-+/* Check for the simple reloc types.  */
-+Elf_Type
-+parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
-+{
-+  switch (type)
-+    {
-+    case R_PARISC_DIR64:
-+    case R_PARISC_SECREL64:
-+      return ELF_T_XWORD;
-+    case R_PARISC_DIR32:
-+    case R_PARISC_SECREL32:
-+      return ELF_T_WORD;
-+    default:
-+      return ELF_T_NUM;
-+    }
-+}
-Index: elfutils-0.158/backends/libebl_parisc.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/libebl_parisc.h	2014-04-21 11:12:12.228150280 +0000
-@@ -0,0 +1,9 @@
-+#ifndef _LIBEBL_HPPA_H
-+#define _LIBEBL_HPPA_H 1
-+
-+#include <libdw.h>
-+
-+extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
-+extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
-+
-+#endif
-Index: elfutils-0.158/backends/Makefile.am
-===================================================================
---- elfutils-0.158.orig/backends/Makefile.am	2014-04-21 11:12:12.252149737 +0000
-+++ elfutils-0.158/backends/Makefile.am	2014-04-21 11:13:11.910801105 +0000
-@@ -33,11 +33,12 @@
- 
- 
- modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
--	  tilegx
-+	  tilegx parisc
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a    \
- 	     libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a    \
- 	     libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
--	     libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a
-+	     libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
-+	     libebl_parisc_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
- 
-@@ -116,6 +117,9 @@
- libebl_tilegx_pic_a_SOURCES = $(tilegx_SRCS)
- am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os)
- 
-+parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
-+libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
-+am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
- 
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- 	@rm -f $(@:.so=.map)
-Index: elfutils-0.158/libelf/elf.h
-===================================================================
---- elfutils-0.158.orig/libelf/elf.h	2014-04-21 11:12:12.252149737 +0000
-+++ elfutils-0.158/libelf/elf.h	2014-04-21 11:12:12.228150280 +0000
-@@ -1814,16 +1814,24 @@
- #define R_PARISC_PCREL17F	12	/* 17 bits of rel. address.  */
- #define R_PARISC_PCREL14R	14	/* Right 14 bits of rel. address.  */
- #define R_PARISC_DPREL21L	18	/* Left 21 bits of rel. address.  */
-+#define R_PARISC_DPREL14WR	19
-+#define R_PARISC_DPREL14DR	20
- #define R_PARISC_DPREL14R	22	/* Right 14 bits of rel. address.  */
- #define R_PARISC_GPREL21L	26	/* GP-relative, left 21 bits.  */
- #define R_PARISC_GPREL14R	30	/* GP-relative, right 14 bits.  */
- #define R_PARISC_LTOFF21L	34	/* LT-relative, left 21 bits.  */
- #define R_PARISC_LTOFF14R	38	/* LT-relative, right 14 bits.  */
-+#define R_PARISC_DLTIND14F	39
-+#define R_PARISC_SETBASE	40
- #define R_PARISC_SECREL32	41	/* 32 bits section rel. address.  */
-+#define R_PARISC_BASEREL21L	42
-+#define R_PARISC_BASEREL17R	43
-+#define R_PARISC_BASEREL14R	46
- #define R_PARISC_SEGBASE	48	/* No relocation, set segment base.  */
- #define R_PARISC_SEGREL32	49	/* 32 bits segment rel. address.  */
- #define R_PARISC_PLTOFF21L	50	/* PLT rel. address, left 21 bits.  */
- #define R_PARISC_PLTOFF14R	54	/* PLT rel. address, right 14 bits.  */
-+#define R_PARISC_PLTOFF14F	55
- #define R_PARISC_LTOFF_FPTR32	57	/* 32 bits LT-rel. function pointer. */
- #define R_PARISC_LTOFF_FPTR21L	58	/* LT-rel. fct ptr, left 21 bits. */
- #define R_PARISC_LTOFF_FPTR14R	62	/* LT-rel. fct ptr, right 14 bits. */
-@@ -1832,6 +1840,7 @@
- #define R_PARISC_PLABEL21L	66	/* Left 21 bits of fdesc address.  */
- #define R_PARISC_PLABEL14R	70	/* Right 14 bits of fdesc address.  */
- #define R_PARISC_PCREL64	72	/* 64 bits PC-rel. address.  */
-+#define R_PARISC_PCREL22C	73
- #define R_PARISC_PCREL22F	74	/* 22 bits PC-rel. address.  */
- #define R_PARISC_PCREL14WR	75	/* PC-rel. address, right 14 bits.  */
- #define R_PARISC_PCREL14DR	76	/* PC rel. address, right 14 bits.  */
-@@ -1857,6 +1866,8 @@
- #define R_PARISC_LTOFF16WF	102	/* 16 bits LT-rel. address.  */
- #define R_PARISC_LTOFF16DF	103	/* 16 bits LT-rel. address.  */
- #define R_PARISC_SECREL64	104	/* 64 bits section rel. address.  */
-+#define R_PARISC_BASEREL14WR	107
-+#define R_PARISC_BASEREL14DR	108
- #define R_PARISC_SEGREL64	112	/* 64 bits segment rel. address.  */
- #define R_PARISC_PLTOFF14WR	115	/* PLT-rel. address, right 14 bits.  */
- #define R_PARISC_PLTOFF14DR	116	/* PLT-rel. address, right 14 bits.  */
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/m68k_backend.diff b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/m68k_backend.diff
deleted file mode 100644
index f5b566f..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/m68k_backend.diff
+++ /dev/null
@@ -1,493 +0,0 @@
-From: Kurt Roeckx <kurt@roeckx.be>
-From: Thorsten Glaser <tg@mirbsd.de>
-Subject: m68k support
-
-Written by Kurt Roeckx, except for the retval support which was written
-by Thorsten Glaser
-
-
-Index: elfutils-0.158/backends/m68k_init.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/m68k_init.c	2014-04-21 11:14:23.813175704 +0000
-@@ -0,0 +1,50 @@
-+/* Initialization of m68k specific backend library.
-+   Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+   This software is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   This softare 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 software; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+*/
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#define BACKEND		m68k_
-+#define RELOC_PREFIX	R_68K_
-+#include "libebl_CPU.h"
-+
-+/* This defines the common reloc hooks based on m68k_reloc.def.  */
-+#include "common-reloc.c"
-+
-+
-+const char *
-+m68k_init (elf, machine, eh, ehlen)
-+     Elf *elf __attribute__ ((unused));
-+     GElf_Half machine __attribute__ ((unused));
-+     Ebl *eh;
-+     size_t ehlen;
-+{
-+  /* Check whether the Elf_BH object has a sufficent size.  */
-+  if (ehlen < sizeof (Ebl))
-+    return NULL;
-+
-+  /* We handle it.  */
-+  eh->name = "m68k";
-+  m68k_init_reloc (eh);
-+  HOOK (eh, reloc_simple_type);
-+  HOOK (eh, return_value_location);
-+  HOOK (eh, register_info);
-+
-+  return MODVERSION;
-+}
-Index: elfutils-0.158/backends/m68k_regs.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/m68k_regs.c	2014-04-21 11:14:23.813175704 +0000
-@@ -0,0 +1,106 @@
-+/* Register names and numbers for m68k DWARF.
-+   Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+   This software is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   This software 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 software; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <dwarf.h>
-+
-+#define BACKEND m68k_
-+#include "libebl_CPU.h"
-+
-+ssize_t
-+m68k_register_info (Ebl *ebl __attribute__ ((unused)),
-+		   int regno, char *name, size_t namelen,
-+		   const char **prefix, const char **setname,
-+		   int *bits, int *type)
-+{
-+	if (name == NULL)
-+		return 25;
-+
-+	if (regno < 0 || regno > 24 || namelen < 5)
-+		return -1;
-+
-+	*prefix = "%";
-+	*bits = 32;
-+	*type = (regno < 8 ? DW_ATE_signed
-+		: regno < 16 ? DW_ATE_address : DW_ATE_float);
-+
-+	if (regno < 8)
-+	{
-+		*setname = "integer";
-+	}
-+	else if (regno < 16)
-+	{
-+		*setname = "address";
-+	}
-+	else if (regno < 24)
-+	{
-+		*setname = "FPU";
-+	}
-+	else
-+	{
-+		*setname = "address";
-+		*type = DW_ATE_address;
-+	}
-+
-+	switch (regno)
-+	{
-+	case 0 ... 7:
-+		name[0] = 'd';
-+		name[1] = regno + '0';
-+		namelen = 2;
-+		break;
-+
-+	case 8 ... 13:
-+		name[0] = 'a';
-+		name[1] = regno - 8 + '0';
-+		namelen = 2;
-+		break;
-+
-+	case 14:
-+		name[0] = 'f';
-+		name[1] = 'p';
-+   		namelen = 2;
-+		break;
-+
-+	case 15:
-+		name[0] = 's';
-+		name[1] = 'p';
-+   		namelen = 2;
-+		break;
-+
-+	case 16 ... 23:
-+		name[0] = 'f';
-+		name[1] = 'p';
-+		name[2] = regno - 16 + '0';
-+   		namelen = 3;
-+		break;
-+
-+	case 24:
-+		name[0] = 'p';
-+		name[1] = 'c';
-+		namelen = 2;
-+	}
-+
-+	name[namelen++] = '\0';
-+	return namelen;
-+}
-+
-Index: elfutils-0.158/backends/m68k_reloc.def
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/m68k_reloc.def	2014-04-21 11:14:23.813175704 +0000
-@@ -0,0 +1,45 @@
-+/* List the relocation types for m68k.  -*- C -*-
-+   Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+   This software is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   This software 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 software; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+*/
-+
-+/* 	    NAME,		REL|EXEC|DYN	*/
-+
-+RELOC_TYPE (NONE,		0)
-+RELOC_TYPE (32,			REL|EXEC|DYN)
-+RELOC_TYPE (16,			REL)
-+RELOC_TYPE (8,			REL)
-+RELOC_TYPE (PC32,		REL|EXEC|DYN)
-+RELOC_TYPE (PC16,		REL)
-+RELOC_TYPE (PC8,		REL)
-+RELOC_TYPE (GOT32,		REL)
-+RELOC_TYPE (GOT16,		REL)
-+RELOC_TYPE (GOT8,		REL)
-+RELOC_TYPE (GOT32O,		REL)
-+RELOC_TYPE (GOT16O,		REL)
-+RELOC_TYPE (GOT8O,		REL)
-+RELOC_TYPE (PLT32,		REL)
-+RELOC_TYPE (PLT16,		REL)
-+RELOC_TYPE (PLT8,		REL)
-+RELOC_TYPE (PLT32O,		REL)
-+RELOC_TYPE (PLT16O,		REL)
-+RELOC_TYPE (PLT8O,		REL)
-+RELOC_TYPE (COPY,		EXEC)
-+RELOC_TYPE (GLOB_DAT,		EXEC|DYN)
-+RELOC_TYPE (JMP_SLOT,		EXEC|DYN)
-+RELOC_TYPE (RELATIVE,		EXEC|DYN)
-+RELOC_TYPE (GNU_VTINHERIT,	REL)
-+RELOC_TYPE (GNU_VTENTRY,	REL)
-+
-Index: elfutils-0.158/libelf/elf.h
-===================================================================
---- elfutils-0.158.orig/libelf/elf.h	2014-04-21 11:14:23.813175704 +0000
-+++ elfutils-0.158/libelf/elf.h	2014-04-21 11:14:23.813175704 +0000
-@@ -1157,6 +1157,9 @@
- #define R_68K_GLOB_DAT	20		/* Create GOT entry */
- #define R_68K_JMP_SLOT	21		/* Create PLT entry */
- #define R_68K_RELATIVE	22		/* Adjust by program base */
-+/* The next 2 are GNU extensions to enable C++ vtable garbage collection.  */
-+#define R_68K_GNU_VTINHERIT 23
-+#define R_68K_GNU_VTENTRY   24
- #define R_68K_TLS_GD32      25          /* 32 bit GOT offset for GD */
- #define R_68K_TLS_GD16      26          /* 16 bit GOT offset for GD */
- #define R_68K_TLS_GD8       27          /* 8 bit GOT offset for GD */
-Index: elfutils-0.158/backends/Makefile.am
-===================================================================
---- elfutils-0.158.orig/backends/Makefile.am	2014-04-21 11:14:23.813175704 +0000
-+++ elfutils-0.158/backends/Makefile.am	2014-04-21 11:14:48.344621167 +0000
-@@ -33,12 +33,12 @@
- 
- 
- modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
--	  tilegx parisc mips
-+	  tilegx parisc mips m68k
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a    \
- 	     libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a    \
- 	     libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
- 	     libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
--	     libebl_parisc_pic.a libebl_mips_pic.a
-+	     libebl_parisc_pic.a libebl_mips_pic.a libebl_m68k_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
- 
-@@ -125,6 +125,10 @@
- libebl_mips_pic_a_SOURCES = $(mips_SRCS)
- am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
- 
-+m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c m68k_retval.c
-+libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
-+am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)
-+
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- 	@rm -f $(@:.so=.map)
- 	echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
-Index: elfutils-0.158/backends/m68k_symbol.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/m68k_symbol.c	2014-04-21 11:14:23.813175704 +0000
-@@ -0,0 +1,43 @@
-+/* m68k specific symbolic name handling.
-+   Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
-+
-+   This software is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   This software 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 software; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+*/
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <elf.h>
-+#include <stddef.h>
-+
-+#define BACKEND		m68k_
-+#include "libebl_CPU.h"
-+
-+/* Check for the simple reloc types.  */
-+Elf_Type
-+m68k_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
-+{
-+  switch (type)
-+    {
-+    case R_68K_32:
-+      return ELF_T_SWORD;
-+    case R_68K_16:
-+      return ELF_T_HALF;
-+    case R_68K_8:
-+      return ELF_T_BYTE;
-+    default:
-+      return ELF_T_NUM;
-+    }
-+}
-Index: elfutils-0.158/backends/m68k_retval.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/m68k_retval.c	2014-04-21 11:14:23.813175704 +0000
-@@ -0,0 +1,172 @@
-+/* Function return value location for Linux/m68k ABI.
-+   Copyright (C) 2005-2010 Red Hat, Inc.
-+   Copyright (c) 2011 Thorsten Glaser, Debian.
-+   This file is part of Red Hat elfutils.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <assert.h>
-+#include <dwarf.h>
-+
-+#define BACKEND m68k_
-+#include "libebl_CPU.h"
-+
-+
-+/* %d0, or pair %d0, %d1, or %a0 */
-+static const Dwarf_Op loc_intreg[] =
-+  {
-+    { .atom = DW_OP_reg0 }, { .atom = DW_OP_piece, .number = 4 },
-+    { .atom = DW_OP_reg1 }, { .atom = DW_OP_piece, .number = 4 },
-+  };
-+static const Dwarf_Op loc_ptrreg[] =
-+  {
-+    { .atom = DW_OP_reg8 },
-+  };
-+#define nloc_intreg	1
-+#define nloc_intregpair	4
-+#define nloc_ptrreg	1
-+
-+/* %f0 */
-+static const Dwarf_Op loc_fpreg[] =
-+  {
-+    { .atom = DW_OP_reg16 }
-+  };
-+#define nloc_fpreg	1
-+
-+/* Structures are a bit more complicated - small structures are returned
-+   in %d0 / %d1 (-freg-struct-return which is enabled by default), large
-+   structures use %a1 (in constrast to the SYSV psABI which says %a0) as
-+   reentrant storage space indicator.  */
-+static const Dwarf_Op loc_aggregate[] =
-+  {
-+    { .atom = DW_OP_breg9, .number = 0 }
-+  };
-+#define nloc_aggregate 1
-+
-+int
-+m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+  Dwarf_Word size;
-+
-+  /* Start with the function's type, and get the DW_AT_type attribute,
-+     which is the type of the return value.  */
-+
-+  Dwarf_Attribute attr_mem;
-+  Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type,
-+						&attr_mem);
-+  if (attr == NULL)
-+    /* The function has no return value, like a `void' function in C.  */
-+    return 0;
-+
-+  Dwarf_Die die_mem;
-+  Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
-+  int tag = dwarf_tag (typedie);
-+
-+  /* Follow typedefs and qualifiers to get to the actual type.  */
-+  while (tag == DW_TAG_typedef
-+	 || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+	 || tag == DW_TAG_restrict_type)
-+    {
-+      attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+      typedie = dwarf_formref_die (attr, &die_mem);
-+      tag = dwarf_tag (typedie);
-+    }
-+
-+  switch (tag)
-+    {
-+    case -1:
-+      return -1;
-+
-+    case DW_TAG_subrange_type:
-+      if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
-+	{
-+	  attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+	  typedie = dwarf_formref_die (attr, &die_mem);
-+	  tag = dwarf_tag (typedie);
-+	}
-+      /* Fall through.  */
-+
-+    case DW_TAG_base_type:
-+    case DW_TAG_enumeration_type:
-+    case DW_TAG_pointer_type:
-+    case DW_TAG_ptr_to_member_type:
-+      if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
-+						 &attr_mem), &size) != 0)
-+	{
-+	  if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
-+	    size = 4;
-+	  else
-+	    return -1;
-+	}
-+      if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
-+	{
-+	  *locp = loc_ptrreg;
-+          return nloc_ptrreg;
-+	}
-+      if (tag == DW_TAG_base_type)
-+	{
-+	  Dwarf_Word encoding;
-+	  if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+						     &attr_mem),
-+			       &encoding) != 0)
-+	    return -1;
-+	  if (encoding == DW_ATE_float)
-+	    {
-+	      /* XXX really 10? */
-+              if (size > 10)
-+                return -2;
-+              *locp = loc_fpreg;
-+              return nloc_fpreg;
-+	    }
-+	}
-+      if (size <= 8)
-+	{
-+	intreg:
-+	  /* XXX check endianness of dword pair, int64 vs aggregate */
-+	  *locp = loc_intreg;
-+	  return size <= 4 ? nloc_intreg : nloc_intregpair;
-+	}
-+
-+    aggregate:
-+      *locp = loc_aggregate;
-+      return nloc_aggregate;
-+
-+    case DW_TAG_structure_type:
-+    case DW_TAG_class_type:
-+    case DW_TAG_union_type:
-+    case DW_TAG_array_type:
-+      if (dwarf_aggregate_size (typedie, &size) == 0
-+	  && size > 0 && size <= 8)
-+	/* not accurate for a struct whose only member is a float */
-+	goto intreg;
-+      goto aggregate;
-+    }
-+
-+  /* XXX We don't have a good way to return specific errors from ebl calls.
-+     This value means we do not understand the type, but it is well-formed
-+     DWARF and might be valid.  */
-+  return -2;
-+}
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/mips_backend.diff b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/mips_backend.diff
deleted file mode 100644
index d73a3f2..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/mips_backend.diff
+++ /dev/null
@@ -1,712 +0,0 @@
-Index: elfutils-0.158/backends/mips_init.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/mips_init.c	2014-04-21 11:13:36.910235965 +0000
-@@ -0,0 +1,60 @@
-+/* Initialization of mips specific backend library.
-+   Copyright (C) 2006 Red Hat, Inc.
-+   This file is part of Red Hat elfutils.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#define BACKEND		mips_
-+#define RELOC_PREFIX	R_MIPS_
-+#include "libebl_CPU.h"
-+
-+/* This defines the common reloc hooks based on mips_reloc.def.  */
-+#include "common-reloc.c"
-+
-+const char *
-+mips_init (elf, machine, eh, ehlen)
-+     Elf *elf __attribute__ ((unused));
-+     GElf_Half machine __attribute__ ((unused));
-+     Ebl *eh;
-+     size_t ehlen;
-+{
-+  /* Check whether the Elf_BH object has a sufficent size.  */
-+  if (ehlen < sizeof (Ebl))
-+    return NULL;
-+
-+  /* We handle it.  */
-+  if (machine == EM_MIPS)
-+    eh->name = "MIPS R3000 big-endian";
-+  else if (machine == EM_MIPS_RS3_LE)
-+    eh->name = "MIPS R3000 little-endian";
-+
-+  mips_init_reloc (eh);
-+  HOOK (eh, reloc_simple_type);
-+  HOOK (eh, return_value_location);
-+  HOOK (eh, register_info);
-+
-+  return MODVERSION;
-+}
-Index: elfutils-0.158/backends/mips_regs.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/mips_regs.c	2014-04-21 11:13:36.910235965 +0000
-@@ -0,0 +1,104 @@
-+/* Register names and numbers for MIPS DWARF.
-+   Copyright (C) 2006 Red Hat, Inc.
-+   This file is part of Red Hat elfutils.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <dwarf.h>
-+
-+#define BACKEND mips_
-+#include "libebl_CPU.h"
-+
-+ssize_t
-+mips_register_info (Ebl *ebl __attribute__((unused)),
-+		    int regno, char *name, size_t namelen,
-+		    const char **prefix, const char **setname,
-+		    int *bits, int *type)
-+{
-+  if (name == NULL)
-+    return 66;
-+
-+  if (regno < 0 || regno > 65 || namelen < 4)
-+    return -1;
-+
-+  *prefix = "$";
-+
-+  if (regno < 32)
-+    {
-+      *setname = "integer";
-+      *type = DW_ATE_signed;
-+      *bits = 32;
-+      if (regno < 32 + 10)
-+        {
-+          name[0] = regno + '0';
-+          namelen = 1;
-+        }
-+      else
-+        {
-+          name[0] = (regno / 10) + '0';
-+          name[1] = (regno % 10) + '0';
-+          namelen = 2;
-+        }
-+    }
-+  else if (regno < 64)
-+    {
-+      *setname = "FPU";
-+      *type = DW_ATE_float;
-+      *bits = 32;
-+      name[0] = 'f';
-+      if (regno < 32 + 10)
-+	{
-+	  name[1] = (regno - 32) + '0';
-+	  namelen = 2;
-+	}
-+      else
-+	{
-+	  name[1] = (regno - 32) / 10 + '0';
-+	  name[2] = (regno - 32) % 10 + '0';
-+	  namelen = 3;
-+	}
-+    }
-+  else if (regno == 64)
-+    {
-+      *type = DW_ATE_signed;
-+      *bits = 32;
-+      name[0] = 'h';
-+      name[1] = 'i';
-+      namelen = 2;
-+    }
-+  else
-+    {
-+      *type = DW_ATE_signed;
-+      *bits = 32;
-+      name[0] = 'l';
-+      name[1] = 'o';
-+      namelen = 2;
-+    }
-+
-+  name[namelen++] = '\0';
-+  return namelen;
-+}
-Index: elfutils-0.158/backends/mips_reloc.def
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/mips_reloc.def	2014-04-21 11:13:36.910235965 +0000
-@@ -0,0 +1,79 @@
-+/* List the relocation types for mips.  -*- C -*-
-+   Copyright (C) 2006 Red Hat, Inc.
-+   This file is part of Red Hat elfutils.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+/* 	    NAME,		REL|EXEC|DYN	*/
-+
-+RELOC_TYPE (NONE,               0)
-+RELOC_TYPE (16,                 0)
-+RELOC_TYPE (32,                 0)
-+RELOC_TYPE (REL32,              0)
-+RELOC_TYPE (26,                 0)
-+RELOC_TYPE (HI16,               0)
-+RELOC_TYPE (LO16,               0)
-+RELOC_TYPE (GPREL16,            0)
-+RELOC_TYPE (LITERAL,            0)
-+RELOC_TYPE (GOT16,              0)
-+RELOC_TYPE (PC16,               0)
-+RELOC_TYPE (CALL16,             0)
-+RELOC_TYPE (GPREL32,            0)
-+
-+RELOC_TYPE (SHIFT5,             0)
-+RELOC_TYPE (SHIFT6,             0)
-+RELOC_TYPE (64,                 0)
-+RELOC_TYPE (GOT_DISP,           0)
-+RELOC_TYPE (GOT_PAGE,           0)
-+RELOC_TYPE (GOT_OFST,           0)
-+RELOC_TYPE (GOT_HI16,           0)
-+RELOC_TYPE (GOT_LO16,           0)
-+RELOC_TYPE (SUB,                0)
-+RELOC_TYPE (INSERT_A,           0)
-+RELOC_TYPE (INSERT_B,           0)
-+RELOC_TYPE (DELETE,             0)
-+RELOC_TYPE (HIGHER,             0)
-+RELOC_TYPE (HIGHEST,            0)
-+RELOC_TYPE (CALL_HI16,          0)
-+RELOC_TYPE (CALL_LO16,          0)
-+RELOC_TYPE (SCN_DISP,           0)
-+RELOC_TYPE (REL16,              0)
-+RELOC_TYPE (ADD_IMMEDIATE,      0)
-+RELOC_TYPE (PJUMP,              0)
-+RELOC_TYPE (RELGOT,             0)
-+RELOC_TYPE (JALR,               0)
-+RELOC_TYPE (TLS_DTPMOD32,       0)
-+RELOC_TYPE (TLS_DTPREL32,       0)
-+RELOC_TYPE (TLS_DTPMOD64,       0)
-+RELOC_TYPE (TLS_DTPREL64,       0)
-+RELOC_TYPE (TLS_GD,             0)
-+RELOC_TYPE (TLS_LDM,            0)
-+RELOC_TYPE (TLS_DTPREL_HI16,    0)
-+RELOC_TYPE (TLS_DTPREL_LO16,    0)
-+RELOC_TYPE (TLS_GOTTPREL,       0)
-+RELOC_TYPE (TLS_TPREL32,        0)
-+RELOC_TYPE (TLS_TPREL64,        0)
-+RELOC_TYPE (TLS_TPREL_HI16,     0)
-+RELOC_TYPE (TLS_TPREL_LO16,     0)
-+
-+#define NO_COPY_RELOC 1
-+#define NO_RELATIVE_RELOC 1
-Index: elfutils-0.158/backends/mips_retval.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/mips_retval.c	2014-04-21 11:13:36.910235965 +0000
-@@ -0,0 +1,321 @@
-+/* Function return value location for Linux/mips ABI.
-+   Copyright (C) 2005 Red Hat, Inc.
-+   This file is part of Red Hat elfutils.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <string.h>
-+#include <assert.h>
-+#include <dwarf.h>
-+#include <elf.h>
-+
-+#include "../libebl/libeblP.h"
-+#include "../libdw/libdwP.h"
-+
-+#define BACKEND mips_
-+#include "libebl_CPU.h"
-+
-+/* The ABI of the file.  Also see EF_MIPS_ABI2 above. */
-+#define EF_MIPS_ABI		0x0000F000
-+
-+/* The original o32 abi. */
-+#define E_MIPS_ABI_O32          0x00001000
-+
-+/* O32 extended to work on 64 bit architectures */
-+#define E_MIPS_ABI_O64          0x00002000
-+
-+/* EABI in 32 bit mode */
-+#define E_MIPS_ABI_EABI32       0x00003000
-+
-+/* EABI in 64 bit mode */
-+#define E_MIPS_ABI_EABI64       0x00004000
-+
-+/* All the possible MIPS ABIs. */
-+enum mips_abi
-+  {
-+    MIPS_ABI_UNKNOWN = 0,
-+    MIPS_ABI_N32,
-+    MIPS_ABI_O32,
-+    MIPS_ABI_N64,
-+    MIPS_ABI_O64,
-+    MIPS_ABI_EABI32,
-+    MIPS_ABI_EABI64,
-+    MIPS_ABI_LAST
-+  };
-+
-+/* Find the mips ABI of the current file */
-+enum mips_abi find_mips_abi(Elf *elf)
-+{
-+  GElf_Ehdr ehdr_mem;
-+  GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
-+
-+  if (ehdr == NULL)
-+    return MIPS_ABI_LAST;
-+
-+  GElf_Word elf_flags = ehdr->e_flags;
-+
-+  /* Check elf_flags to see if it specifies the ABI being used.  */
-+  switch ((elf_flags & EF_MIPS_ABI))
-+    {
-+    case E_MIPS_ABI_O32:
-+      return MIPS_ABI_O32;
-+    case E_MIPS_ABI_O64:
-+      return MIPS_ABI_O64;
-+    case E_MIPS_ABI_EABI32:
-+      return MIPS_ABI_EABI32;
-+    case E_MIPS_ABI_EABI64:
-+      return MIPS_ABI_EABI64;
-+    default:
-+      if ((elf_flags & EF_MIPS_ABI2))
-+	return MIPS_ABI_N32;
-+    }
-+
-+  /* GCC creates a pseudo-section whose name describes the ABI.  */
-+  size_t shstrndx;
-+  if (elf_getshdrstrndx (elf, &shstrndx) < 0)
-+    return MIPS_ABI_LAST;
-+
-+  const char *name;
-+  Elf_Scn *scn = NULL;
-+  while ((scn = elf_nextscn (elf, scn)) != NULL)
-+    {
-+      GElf_Shdr shdr_mem;
-+      GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
-+      if (shdr == NULL)
-+        return MIPS_ABI_LAST;
-+
-+      name = elf_strptr (elf, shstrndx, shdr->sh_name) ?: "";
-+      if (strncmp (name, ".mdebug.", 8) != 0)
-+        continue;
-+
-+      if (strcmp (name, ".mdebug.abi32") == 0)
-+        return MIPS_ABI_O32;
-+      else if (strcmp (name, ".mdebug.abiN32") == 0)
-+        return MIPS_ABI_N32;
-+      else if (strcmp (name, ".mdebug.abi64") == 0)
-+        return MIPS_ABI_N64;
-+      else if (strcmp (name, ".mdebug.abiO64") == 0)
-+        return MIPS_ABI_O64;
-+      else if (strcmp (name, ".mdebug.eabi32") == 0)
-+        return MIPS_ABI_EABI32;
-+      else if (strcmp (name, ".mdebug.eabi64") == 0)
-+        return MIPS_ABI_EABI64;
-+      else
-+        return MIPS_ABI_UNKNOWN;
-+    }
-+
-+  return MIPS_ABI_UNKNOWN;
-+}
-+
-+unsigned int
-+mips_abi_regsize (enum mips_abi abi)
-+{
-+  switch (abi)
-+    {
-+    case MIPS_ABI_EABI32:
-+    case MIPS_ABI_O32:
-+      return 4;
-+    case MIPS_ABI_N32:
-+    case MIPS_ABI_N64:
-+    case MIPS_ABI_O64:
-+    case MIPS_ABI_EABI64:
-+      return 8;
-+    case MIPS_ABI_UNKNOWN:
-+    case MIPS_ABI_LAST:
-+    default:
-+      return 0;
-+    }
-+}
-+
-+
-+/* $v0 or pair $v0, $v1 */
-+static const Dwarf_Op loc_intreg_o32[] =
-+  {
-+    { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 4 },
-+    { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 4 },
-+  };
-+
-+static const Dwarf_Op loc_intreg[] =
-+  {
-+    { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 8 },
-+    { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 8 },
-+  };
-+#define nloc_intreg	1
-+#define nloc_intregpair	4
-+
-+/* $f0 (float), or pair $f0, $f1 (double).
-+ * f2/f3 are used for COMPLEX (= 2 doubles) returns in Fortran */
-+static const Dwarf_Op loc_fpreg_o32[] =
-+  {
-+    { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 4 },
-+    { .atom = DW_OP_regx, .number = 33 }, { .atom = DW_OP_piece, .number = 4 },
-+    { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 4 },
-+    { .atom = DW_OP_regx, .number = 35 }, { .atom = DW_OP_piece, .number = 4 },
-+  };
-+
-+/* $f0, or pair $f0, $f2.  */
-+static const Dwarf_Op loc_fpreg[] =
-+  {
-+    { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 8 },
-+    { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 8 },
-+  };
-+#define nloc_fpreg  1
-+#define nloc_fpregpair 4
-+#define nloc_fpregquad 8
-+
-+/* The return value is a structure and is actually stored in stack space
-+   passed in a hidden argument by the caller.  But, the compiler
-+   helpfully returns the address of that space in $v0.  */
-+static const Dwarf_Op loc_aggregate[] =
-+  {
-+    { .atom = DW_OP_breg2, .number = 0 }
-+  };
-+#define nloc_aggregate 1
-+
-+int
-+mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
-+{
-+  /* First find the ABI used by the elf object */
-+  enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf);
-+
-+  /* Something went seriously wrong while trying to figure out the ABI */
-+  if (abi == MIPS_ABI_LAST)
-+    return -1;
-+
-+  /* We couldn't identify the ABI, but the file seems valid */
-+  if (abi == MIPS_ABI_UNKNOWN)
-+    return -2;
-+
-+  /* Can't handle EABI variants */
-+  if ((abi == MIPS_ABI_EABI32) || (abi == MIPS_ABI_EABI64))
-+    return -2;
-+
-+  unsigned int regsize = mips_abi_regsize (abi);
-+  if (!regsize)
-+    return -2;
-+
-+  /* Start with the function's type, and get the DW_AT_type attribute,
-+     which is the type of the return value.  */
-+
-+  Dwarf_Attribute attr_mem;
-+  Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
-+  if (attr == NULL)
-+    /* The function has no return value, like a `void' function in C.  */
-+    return 0;
-+
-+  Dwarf_Die die_mem;
-+  Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
-+  int tag = dwarf_tag (typedie);
-+
-+  /* Follow typedefs and qualifiers to get to the actual type.  */
-+  while (tag == DW_TAG_typedef
-+	 || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
-+	 || tag == DW_TAG_restrict_type)
-+    {
-+      attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+      typedie = dwarf_formref_die (attr, &die_mem);
-+      tag = dwarf_tag (typedie);
-+    }
-+
-+  switch (tag)
-+    {
-+    case -1:
-+      return -1;
-+
-+    case DW_TAG_subrange_type:
-+      if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
-+	{
-+	  attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
-+	  typedie = dwarf_formref_die (attr, &die_mem);
-+	  tag = dwarf_tag (typedie);
-+	}
-+      /* Fall through.  */
-+
-+    case DW_TAG_base_type:
-+    case DW_TAG_enumeration_type:
-+    case DW_TAG_pointer_type:
-+    case DW_TAG_ptr_to_member_type:
-+      {
-+        Dwarf_Word size;
-+	if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
-+					 &attr_mem), &size) != 0)
-+	  {
-+	    if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
-+	      size = regsize;
-+	    else
-+	      return -1;
-+	  }
-+	if (tag == DW_TAG_base_type)
-+	  {
-+	    Dwarf_Word encoding;
-+	    if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
-+					     &attr_mem), &encoding) != 0)
-+	      return -1;
-+
-+#define ABI_LOC(loc, regsize) ((regsize) == 4 ? (loc ## _o32) : (loc))
-+
-+	    if (encoding == DW_ATE_float)
-+	      {
-+		*locp = ABI_LOC(loc_fpreg, regsize);
-+		if (size <= regsize)
-+		    return nloc_fpreg;
-+
-+		if (size <= 2*regsize)
-+                  return nloc_fpregpair;
-+
-+		if (size <= 4*regsize && abi == MIPS_ABI_O32)
-+                  return nloc_fpregquad;
-+
-+		goto aggregate;
-+	      }
-+	  }
-+	*locp = ABI_LOC(loc_intreg, regsize);
-+	if (size <= regsize)
-+	  return nloc_intreg;
-+	if (size <= 2*regsize)
-+	  return nloc_intregpair;
-+
-+	/* Else fall through. Shouldn't happen though (at least with gcc) */
-+      }
-+
-+    case DW_TAG_structure_type:
-+    case DW_TAG_class_type:
-+    case DW_TAG_union_type:
-+    case DW_TAG_array_type:
-+    aggregate:
-+      /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */
-+      if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64))
-+        return -2;
-+
-+      *locp = loc_aggregate;
-+      return nloc_aggregate;
-+    }
-+
-+  /* XXX We don't have a good way to return specific errors from ebl calls.
-+     This value means we do not understand the type, but it is well-formed
-+     DWARF and might be valid.  */
-+  return -2;
-+}
-Index: elfutils-0.158/backends/mips_symbol.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ elfutils-0.158/backends/mips_symbol.c	2014-04-21 11:13:36.910235965 +0000
-@@ -0,0 +1,52 @@
-+/* MIPS specific symbolic name handling.
-+   Copyright (C) 2002, 2003, 2005 Red Hat, Inc.
-+   This file is part of Red Hat elfutils.
-+   Written by Jakub Jelinek <jakub@redhat.com>, 2002.
-+
-+   Red Hat elfutils is free software; you can redistribute it and/or modify
-+   it under the terms of the GNU General Public License as published by the
-+   Free Software Foundation; version 2 of the License.
-+
-+   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
-+   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
-+
-+   Red Hat elfutils is an included package of the Open Invention Network.
-+   An included package of the Open Invention Network is a package for which
-+   Open Invention Network licensees cross-license their patents.  No patent
-+   license is granted, either expressly or impliedly, by designation as an
-+   included package.  Should you wish to participate in the Open Invention
-+   Network licensing program, please visit www.openinventionnetwork.com
-+   <http://www.openinventionnetwork.com>.  */
-+
-+#ifdef HAVE_CONFIG_H
-+# include <config.h>
-+#endif
-+
-+#include <elf.h>
-+#include <stddef.h>
-+
-+#define BACKEND		mips_
-+#include "libebl_CPU.h"
-+
-+/* Check for the simple reloc types.  */
-+Elf_Type
-+mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
-+{
-+  switch (type)
-+    {
-+    case R_MIPS_16:
-+      return ELF_T_HALF;
-+    case R_MIPS_32:
-+      return ELF_T_WORD;
-+    case R_MIPS_64:
-+      return ELF_T_XWORD;
-+    default:
-+      return ELF_T_NUM;
-+    }
-+}
-Index: elfutils-0.158/libebl/eblopenbackend.c
-===================================================================
---- elfutils-0.158.orig/libebl/eblopenbackend.c	2014-04-21 11:13:36.914235875 +0000
-+++ elfutils-0.158/libebl/eblopenbackend.c	2014-04-21 11:13:36.910235965 +0000
-@@ -71,6 +71,8 @@
-   { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
-   { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
-   { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
-+  { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 },
-+  { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 },
- 
-   { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
-   { "m68k", "elf_m68k", "m68k", 4, EM_68K, 0, 0 },
-Index: elfutils-0.158/backends/common-reloc.c
-===================================================================
---- elfutils-0.158.orig/backends/common-reloc.c	2014-04-21 11:13:36.914235875 +0000
-+++ elfutils-0.158/backends/common-reloc.c	2014-04-21 11:13:36.910235965 +0000
-@@ -112,11 +112,13 @@
- }
- 
- 
-+#ifndef NO_COPY_RELOC
- bool
- EBLHOOK(copy_reloc_p) (int reloc)
- {
-   return reloc == R_TYPE (COPY);
- }
-+#endif
- 
- bool
- EBLHOOK(none_reloc_p) (int reloc)
-@@ -138,7 +140,9 @@
-   ebl->reloc_type_name = EBLHOOK(reloc_type_name);
-   ebl->reloc_type_check = EBLHOOK(reloc_type_check);
-   ebl->reloc_valid_use = EBLHOOK(reloc_valid_use);
-+#ifndef NO_COPY_RELOC
-   ebl->copy_reloc_p = EBLHOOK(copy_reloc_p);
-+#endif
-   ebl->none_reloc_p = EBLHOOK(none_reloc_p);
- #ifndef NO_RELATIVE_RELOC
-   ebl->relative_reloc_p = EBLHOOK(relative_reloc_p);
-Index: elfutils-0.158/backends/Makefile.am
-===================================================================
---- elfutils-0.158.orig/backends/Makefile.am	2014-04-21 11:13:36.914235875 +0000
-+++ elfutils-0.158/backends/Makefile.am	2014-04-21 11:14:10.841468934 +0000
-@@ -33,12 +33,12 @@
- 
- 
- modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
--	  tilegx parisc
-+	  tilegx parisc mips
- libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a    \
- 	     libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a    \
- 	     libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
- 	     libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
--	     libebl_parisc_pic.a
-+	     libebl_parisc_pic.a libebl_mips_pic.a
- noinst_LIBRARIES = $(libebl_pic)
- noinst_DATA = $(libebl_pic:_pic.a=.so)
- 
-@@ -121,6 +121,10 @@
- libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
- am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
- 
-+mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
-+libebl_mips_pic_a_SOURCES = $(mips_SRCS)
-+am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
-+
- libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- 	@rm -f $(@:.so=.map)
- 	echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/mips_readelf_w.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/mips_readelf_w.patch
deleted file mode 100644
index 8e669e7..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/mips_readelf_w.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: Kurt Roeckx <kurt@roeckx.be>
-Subject: Make readelf -w output debug information on mips
-Bug-Debian: http://bugs.debian.org/662041
-Forwarded: not-needed
-
-Upstreams wants a change where this is handled by a hook that needs
-to be filled in by the backend for the arch.
-
-Index: elfutils-0.153/src/readelf.c
-===================================================================
---- elfutils-0.153.orig/src/readelf.c	2012-08-10 22:01:55.000000000 +0200
-+++ elfutils-0.153/src/readelf.c	2012-09-18 21:46:27.000000000 +0200
-@@ -7364,7 +7364,8 @@
-       GElf_Shdr shdr_mem;
-       GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
- 
--      if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
-+      if (shdr != NULL && (
-+	 (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF)))
- 	{
- 	  static const struct
- 	  {
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/non_linux.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/non_linux.patch
deleted file mode 100644
index 35b1b38..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/non_linux.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Index: elfutils-0.159/libdwfl/linux-pid-attach.c
-===================================================================
---- elfutils-0.159.orig/libdwfl/linux-pid-attach.c
-+++ elfutils-0.159/libdwfl/linux-pid-attach.c
-@@ -393,6 +393,16 @@ pid_getthread (Dwfl *dwfl __attribute__
-   return false;
- }
- 
-+bool
-+internal_function
-+__libdwfl_ptrace_attach (pid_t tid __attribute__ ((unused)),
-+			 bool *tid_was_stoppedp __attribute__ ((unused)))
-+{
-+  errno = ENOSYS;
-+  __libdwfl_seterrno (DWFL_E_ERRNO);
-+  return false;
-+}
-+
- static bool
- pid_memory_read (Dwfl *dwfl __attribute__ ((unused)),
-                  Dwarf_Addr addr __attribute__ ((unused)),
-@@ -419,6 +429,13 @@ pid_detach (Dwfl *dwfl __attribute__ ((u
- {
- }
- 
-+void
-+internal_function
-+__libdwfl_ptrace_detach (pid_t tid __attribute__ ((unused)),
-+			 bool tid_was_stopped __attribute__ ((unused)))
-+{
-+}
-+
- static void
- pid_thread_detach (Dwfl_Thread *thread __attribute__ ((unused)),
- 		  void *thread_arg __attribute__ ((unused)))
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/redhat-portability.diff b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/redhat-portability.diff
deleted file mode 100644
index a0ff07d..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/redhat-portability.diff
+++ /dev/null
@@ -1,1021 +0,0 @@
-Rebase to 1.162
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- ChangeLog                   |   30 +++++++++++++++++++++
- backends/ChangeLog          |   12 +++++++++
- backends/Makefile.am        |    2 +-
- config/ChangeLog            |    4 +++
- config/eu.am                |   14 +++++++---
- configure.ac                |   61 +++++++++++++++++++++++++++++++++++++++++--
- lib/ChangeLog               |    8 ++++++
- lib/eu-config.h             |   10 +++++++
- libasm/ChangeLog            |    5 ++++
- libcpu/ChangeLog            |    8 ++++++
- libcpu/i386_disasm.c        |    1 +
- libdw/ChangeLog             |   13 +++++++++
- libdw/dwarf_begin_elf.c     |    8 ++++++
- libdw/libdw.h               |    2 +-
- libdwfl/ChangeLog           |   20 ++++++++++++++
- libdwfl/linux-core-attach.c |   29 ++++++++++++++++++++
- libdwfl/linux-pid-attach.c  |   14 ++++++++++
- libebl/ChangeLog            |    5 ++++
- libelf/ChangeLog            |   10 +++++++
- libelf/common.h             |    4 +--
- libelf/gnuhash_xlate.h      |    6 +++--
- src/ChangeLog               |   30 +++++++++++++++++++++
- src/Makefile.am             |    5 ++++
- src/addr2line.c             |    4 +--
- src/findtextrel.c           |    6 ++++-
- src/ld.h                    |    2 ++
- src/readelf.c               |   15 +++++++----
- src/strings.c               |   11 ++++++++
- src/strip.c                 |    6 +++++
- tests/ChangeLog             |   14 ++++++++++
- tests/Makefile.am           |    1 +
- tests/backtrace.c           |    1 +
- tests/line2addr.c           |    2 +-
- 33 files changed, 343 insertions(+), 20 deletions(-)
-
-diff --git a/ChangeLog b/ChangeLog
-index d829783..89bfd24 100644
---- a/ChangeLog
-+++ b/ChangeLog
-@@ -253,6 +253,8 @@
- 
- 2012-01-24  Mark Wielaard  <mjw@redhat.com>
- 
-+	* configure.ac: Wrap AC_COMPILE_IFELSE sources in AC_LANG_SOURCE.
-+
- 	* COPYING: Fix address. Updated version from gnulib.
- 
- 2012-01-23  Mark Wielaard  <mjw@redhat.com>
-@@ -271,6 +273,9 @@
- 
- 2011-10-08  Mike Frysinger  <vapier@gentoo.org>
- 
-+	* configure.ac (--disable-werror): Handle it, controlling BUILD_WERROR
-+	automake option.
-+
- 	* configure.ac: Fix use of AC_ARG_ENABLE to handle $enableval correctly.
- 
- 2011-10-02  Ulrich Drepper  <drepper@gmail.com>
-@@ -292,6 +297,10 @@
- 
- 	* configure.ac (LOCALEDIR, DATADIRNAME): Removed.
- 
-+2009-11-22  Roland McGrath  <roland@redhat.com>
-+
-+	* configure.ac: Use sed and expr instead of modern bash extensions.
-+
- 2009-09-21  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* configure.ac: Update for more modern autoconf.
-@@ -300,6 +309,10 @@
- 
- 	* configure.ac (zip_LIBS): Check for liblzma too.
- 
-+2009-08-17  Roland McGrath  <roland@redhat.com>
-+
-+	* configure.ac: Check for -fgnu89-inline; add it to WEXTRA if it works.
-+
- 2009-04-19  Roland McGrath  <roland@redhat.com>
- 
- 	* configure.ac (eu_version): Round down here, not in version.h macros.
-@@ -311,6 +324,8 @@
- 
- 2009-01-23  Roland McGrath  <roland@redhat.com>
- 
-+	* configure.ac: Check for __builtin_popcount.
-+
- 	* configure.ac (zlib check): Check for gzdirect, need zlib >= 1.2.2.3.
- 
- 	* configure.ac (__thread check): Use AC_LINK_IFELSE, in case of
-@@ -391,6 +406,10 @@
- 	* configure.ac: Add dummy automake conditional to get dependencies
- 	for non-generic linker right.  See src/Makefile.am.
- 
-+2005-11-22  Roland McGrath  <roland@redhat.com>
-+
-+	* configure.ac: Check for --as-needed linker option.
-+
- 2005-11-18  Roland McGrath  <roland@redhat.com>
- 
- 	* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New variable.
-@@ -438,6 +457,17 @@
- 	* Makefile.am (all_SUBDIRS): Add libdwfl.
- 	* configure.ac: Write libdwfl/Makefile.
- 
-+2005-05-31  Roland McGrath  <roland@redhat.com>
-+
-+	* configure.ac (WEXTRA): Check for -Wextra and set this substitution.
-+
-+	* configure.ac: Check for struct stat st_?tim members.
-+	* src/strip.c (process_file): Use st_?time if st_?tim are not there.
-+
-+	* configure.ac: Check for futimes function.
-+	* src/strip.c (handle_elf) [! HAVE_FUTIMES]: Use utimes instead.
-+	(handle_ar) [! HAVE_FUTIMES]: Likewise.
-+
- 2005-05-19  Roland McGrath  <roland@redhat.com>
- 
- 	* configure.ac [AH_BOTTOM] (INTDECL, _INTDECL): New macros.
-diff --git a/backends/ChangeLog b/backends/ChangeLog
-index fe61d9c..9599623 100644
---- a/backends/ChangeLog
-+++ b/backends/ChangeLog
-@@ -498,6 +498,10 @@
- 	* ppc_attrs.c (ppc_check_object_attribute): Handle tag
- 	GNU_Power_ABI_Struct_Return.
- 
-+2009-01-23  Roland McGrath  <roland@redhat.com>
-+
-+	* Makefile.am (libebl_%.so): Use $(LD_AS_NEEDED).
-+
- 2008-10-04  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* i386_reloc.def: Fix entries for TLS_GOTDESC, TLS_DESC_CALL, and
-@@ -825,6 +829,11 @@
- 	* sparc_init.c: Likewise.
- 	* x86_64_init.c: Likewise.
- 
-+2005-11-22  Roland McGrath  <roland@redhat.com>
-+
-+	* Makefile.am (LD_AS_NEEDED): New variable, substituted by configure.
-+	(libebl_%.so rule): Use it in place of -Wl,--as-needed.
-+
- 2005-11-19  Roland McGrath  <roland@redhat.com>
- 
- 	* ppc64_reloc.def: REL30 -> ADDR30.
-@@ -847,6 +856,9 @@
- 	* Makefile.am (uninstall): Don't try to remove $(pkgincludedir).
- 	(CLEANFILES): Add libebl_$(m).so.
- 
-+	* Makefile.am (WEXTRA): New variable, substituted by configure.
-+	(AM_CFLAGS): Use it in place of -Wextra.
-+
- 	* ppc_reloc.def: Update bits per Alan Modra <amodra@bigpond.net.au>.
- 	* ppc64_reloc.def: Likewise.
- 
-diff --git a/backends/Makefile.am b/backends/Makefile.am
-index 21d7bd2..fe920c9 100644
---- a/backends/Makefile.am
-+++ b/backends/Makefile.am
-@@ -119,7 +119,7 @@ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
- 	$(LINK) -shared -o $(@:.map=.so) \
- 		-Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \
- 		-Wl,--version-script,$(@:.so=.map) \
--		-Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw)
-+		-Wl,-z,defs $(LD_AS_NEEDED) $(libelf) $(libdw)
- 	@$(textrel_check)
- 
- libebl_i386.so: $(cpu_i386)
-diff --git a/config/ChangeLog b/config/ChangeLog
-index 64b58e1..63b3e90 100644
---- a/config/ChangeLog
-+++ b/config/ChangeLog
-@@ -106,6 +106,10 @@
- 
- 	* known-dwarf.awk: Use gawk.
- 
-+2011-10-08  Mike Frysinger  <vapier@gentoo.org>
-+
-+	* eu.am [BUILD_WERROR]: Conditionalize -Werror use on this.
-+
- 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* elfutils.spec.in: Add more BuildRequires.
-diff --git a/config/eu.am b/config/eu.am
-index 70d32de..65af085 100644
---- a/config/eu.am
-+++ b/config/eu.am
-@@ -1,6 +1,6 @@
- ## Common automake fragments for elfutils subdirectory makefiles.
- ##
--## Copyright (C) 2010, 2014 Red Hat, Inc.
-+## Copyright (C) 2010-2011, 2014 Red Hat, Inc.
- ##
- ## This file is part of elfutils.
- ##
-@@ -29,6 +29,9 @@
- ## not, see <http://www.gnu.org/licenses/>.
- ##
- 
-+WEXTRA = @WEXTRA@
-+LD_AS_NEEDED = @LD_AS_NEEDED@
-+
- DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"'
- AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I..
- 
-@@ -38,12 +41,17 @@ STACK_USAGE_WARNING=-Wstack-usage=262144
- else
- STACK_USAGE_WARNING=
- endif
--AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
-+AM_CFLAGS = -std=gnu99 -Wall -Wshadow \
- 	    $(if $($(*F)_no_Werror),,-Werror) \
--	    $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
-+	    $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \
-+	    $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \
- 	    $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
- 	    $($(*F)_CFLAGS)
- 
-+if BUILD_WERROR
-+AM_CFLAGS += $(if $($(*F)_no_Werror),,-Werror)
-+endif
-+
- COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE))
- 
- DEFS.os = -DPIC -DSHARED
-diff --git a/configure.ac b/configure.ac
-index bc9ff56..27a1ef3 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -106,6 +106,55 @@ CFLAGS="$old_CFLAGS"])
- AS_IF([test "x$ac_cv_c99" != xyes],
-       AC_MSG_ERROR([gcc with GNU99 support required]))
- 
-+AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, [dnl
-+old_CFLAGS="$CFLAGS"
-+CFLAGS="$CFLAGS -Wextra"
-+AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo (void) { }])],
-+		  ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no)
-+CFLAGS="$old_CFLAGS"])
-+AC_SUBST(WEXTRA)
-+AS_IF([test "x$ac_cv_cc_wextra" = xyes], [WEXTRA=-Wextra], [WEXTRA=-W])
-+
-+AC_CACHE_CHECK([for -fgnu89-inline option to $CC], ac_cv_cc_gnu89_inline, [dnl
-+old_CFLAGS="$CFLAGS"
-+CFLAGS="$CFLAGS -fgnu89-inline -Werror"
-+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-+void foo (void)
-+{
-+  inline void bar (void) {}
-+  bar ();
-+}
-+extern inline void baz (void) {}
-+])], ac_cv_cc_gnu89_inline=yes, ac_cv_cc_gnu89_inline=no)
-+CFLAGS="$old_CFLAGS"])
-+AS_IF([test "x$ac_cv_cc_gnu89_inline" = xyes],
-+      [WEXTRA="${WEXTRA:+$WEXTRA }-fgnu89-inline"])
-+
-+AC_CACHE_CHECK([for --as-needed linker option],
-+	       ac_cv_as_needed, [dnl
-+cat > conftest.c <<EOF
-+int main (void) { return 0; }
-+EOF
-+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS
-+			    -fPIC -shared -o conftest.so conftest.c
-+			    -Wl,--as-needed 1>&AS_MESSAGE_LOG_FD])
-+then
-+  ac_cv_as_needed=yes
-+else
-+  ac_cv_as_needed=no
-+fi
-+rm -f conftest*])
-+AS_IF([test "x$ac_cv_as_needed" = xyes],
-+      [LD_AS_NEEDED=-Wl,--as-needed], [LD_AS_NEEDED=])
-+AC_SUBST(LD_AS_NEEDED)
-+
-+AC_CACHE_CHECK([for __builtin_popcount], ac_cv_popcount, [dnl
-+AC_LINK_IFELSE([AC_LANG_PROGRAM([], [[exit (__builtin_popcount (127));]])],
-+	       ac_cv_popcount=yes, ac_cv_popcount=no)])
-+AS_IF([test "x$ac_cv_popcount" = xyes],
-+      [AC_DEFINE([HAVE_BUILTIN_POPCOUNT], [1], [Have __builtin_popcount.])])
-+
-+
- AC_CACHE_CHECK([for __thread support], ac_cv_tls, [dnl
- # Use the same flags that we use for our DSOs, so the test is representative.
- # Some old compiler/linker/libc combinations fail some ways and not others.
-@@ -122,7 +171,10 @@ static __thread int a; int foo (int b) { return a + b; }]],
- CFLAGS="$save_CFLAGS"
- LDFLAGS="$save_LDFLAGS"])
- AS_IF([test "x$ac_cv_tls" != xyes],
--      AC_MSG_ERROR([__thread support required]))
-+      [AS_IF([test "$use_locks" = yes],
-+	     [AC_MSG_ERROR([--enable-thread-safety requires __thread support])],
-+	     [AC_DEFINE([__thread], [/* empty: no multi-thread support */],
-+			[Stubbed out if missing compiler support.])])])
- 
- dnl This test must come as early as possible after the compiler configuration
- dnl tests, because the choice of the file model can (in principle) affect
-@@ -224,6 +276,11 @@ AM_CONDITIONAL(USE_VALGRIND, test "$use_valgrind" = yes)
- AM_CONDITIONAL(BUILD_STATIC, [dnl
- test "$use_gprof" = yes -o "$use_gcov" = yes])
- 
-+AC_ARG_ENABLE([werror],
-+AS_HELP_STRING([--disable-werror],[do not build with -Werror]),
-+	       [enable_werror=$enableval], [enable_werror=yes])
-+AM_CONDITIONAL(BUILD_WERROR, test "$enable_werror" = yes)
-+
- AC_ARG_ENABLE([tests-rpath],
- AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
- 	       [tests_use_rpath=$enableval], [tests_use_rpath=no])
-@@ -388,7 +445,7 @@ case "$eu_version" in
- esac
- 
- # Round up to the next release API (x.y) version.
--eu_version=$(( (eu_version + 999) / 1000 ))
-+eu_version=`expr \( $eu_version + 999 \) / 1000`
- 
- dnl Unique ID for this build.
- MODVERSION="Build for ${LIBEBL_SUBDIR} ${eu_version} ${ac_cv_build}"
-diff --git a/lib/ChangeLog b/lib/ChangeLog
-index d04bf17..720c98d 100644
---- a/lib/ChangeLog
-+++ b/lib/ChangeLog
-@@ -73,6 +73,9 @@
- 
- 2009-01-23  Roland McGrath  <roland@redhat.com>
- 
-+	* eu-config.h [! HAVE_BUILTIN_POPCOUNT]
-+	(__builtin_popcount): New inline function.
-+
- 	* eu-config.h: Add multiple inclusion protection.
- 
- 2009-01-17  Ulrich Drepper  <drepper@redhat.com>
-@@ -129,6 +132,11 @@
- 	* Makefile.am (libeu_a_SOURCES): Add it.
- 	* system.h: Declare crc32_file.
- 
-+2005-02-07  Roland McGrath  <roland@redhat.com>
-+
-+	* Makefile.am (WEXTRA): New variable, substituted by configure.
-+	(AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-04-30  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* Makefile.am: Use -ffunction-sections for xmalloc.c.
-diff --git a/lib/eu-config.h b/lib/eu-config.h
-index 400cdc6..872f6bc 100644
---- a/lib/eu-config.h
-+++ b/lib/eu-config.h
-@@ -163,6 +163,16 @@ asm (".section predict_data, \"aw\"; .previous\n"
- /* This macro is used by the tests conditionalize for standalone building.  */
- #define ELFUTILS_HEADER(name) <lib##name.h>
- 
-+#ifndef HAVE_BUILTIN_POPCOUNT
-+# define __builtin_popcount hakmem_popcount
-+static inline unsigned int __attribute__ ((unused))
-+hakmem_popcount (unsigned int x)
-+{
-+  /* HAKMEM 169 */
-+  unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111);
-+  return ((n + (n >> 3)) & 030707070707) % 63;
-+}
-+#endif	/* HAVE_BUILTIN_POPCOUNT */
- 
- #ifdef SYMBOL_VERSIONING
- # define OLD_VERSION(name, version) \
-diff --git a/libasm/ChangeLog b/libasm/ChangeLog
-index 9b25af9..32b9fd0 100644
---- a/libasm/ChangeLog
-+++ b/libasm/ChangeLog
-@@ -87,6 +87,11 @@
- 	* asm_error.c: Add new error ASM_E_IOERROR.
- 	* libasmP.h: Add ASM_E_IOERROR definition.
- 
-+2005-05-31  Roland McGrath  <roland@redhat.com>
-+
-+	* Makefile.am (WEXTRA): New variable, substituted by configure.
-+	(AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* Makefile.am (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
-diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
-index a20f440..5ea23b7 100644
---- a/libcpu/ChangeLog
-+++ b/libcpu/ChangeLog
-@@ -51,6 +51,9 @@
- 
- 2009-01-23  Roland McGrath  <roland@redhat.com>
- 
-+	* i386_disasm.c (i386_disasm): Add abort after assert-constant for old
-+	compilers that don't realize it's noreturn.
-+
- 	* Makefile.am (i386_parse_CFLAGS): Use quotes around command
- 	substitution that can produce leading whitespace.
- 
-@@ -380,6 +383,11 @@
- 	* defs/i386.doc: New file.
- 	* defs/x86_64: New file.
- 
-+2005-04-04  Roland McGrath  <roland@redhat.com>
-+
-+	* Makefile.am (WEXTRA): New variable, substituted by configure.
-+	(AM_CFLAGS): Use it instead of -Wextra.
-+
- 2005-02-15  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* Makefile (AM_CFLAGS): Add -Wunused -Wextra -Wformat=2.
-diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
-index 832241f..c7a0df0 100644
---- a/libcpu/i386_disasm.c
-+++ b/libcpu/i386_disasm.c
-@@ -822,6 +822,7 @@ i386_disasm (const uint8_t **startp, const uint8_t *end, GElf_Addr addr,
- 
- 			default:
- 			  assert (! "INVALID not handled");
-+			  abort ();
- 			}
- 		    }
- 		  else
-diff --git a/libdw/ChangeLog b/libdw/ChangeLog
-index 487e34a..06c737b 100644
---- a/libdw/ChangeLog
-+++ b/libdw/ChangeLog
-@@ -889,6 +889,10 @@
- 
- 	* Makefile.am (known-dwarf.h): Run gawk on config/known-dwarf.awk.
- 
-+2011-07-20  Mark Wielaard  <mjw@redhat.com>
-+
-+	* dwarf_begin_elf.c: Add fallback for be64toh if not defined.
-+
- 2011-07-14  Mark Wielaard  <mjw@redhat.com>
- 
- 	* libdw.h (dwarf_offdie): Fix documentation to mention .debug_info.
-@@ -1248,6 +1252,10 @@
- 
- 	* dwarf_hasattr_integrate.c: Integrate DW_AT_specification too.
- 
-+2009-08-17  Roland McGrath  <roland@redhat.com>
-+
-+	* libdw.h: Disable extern inlines for GCC 4.2.
-+
- 2009-08-10  Roland McGrath  <roland@redhat.com>
- 
- 	* dwarf_getscopevar.c: Use dwarf_diename.
-@@ -2016,6 +2024,11 @@
- 
- 2005-05-31  Roland McGrath  <roland@redhat.com>
- 
-+	* Makefile.am (WEXTRA): New variable, substituted by configure.
-+	(AM_CFLAGS): Use it in place of -Wextra.
-+
-+2005-05-31  Roland McGrath  <roland@redhat.com>
-+
- 	* dwarf_formref_die.c (dwarf_formref_die): Add CU header offset to
- 	formref offset.
- 
-diff --git a/libdw/dwarf_begin_elf.c b/libdw/dwarf_begin_elf.c
-index 4e0d590..a6616a1 100644
---- a/libdw/dwarf_begin_elf.c
-+++ b/libdw/dwarf_begin_elf.c
-@@ -47,6 +47,14 @@
- #if USE_ZLIB
- # include <endian.h>
- # define crc32		loser_crc32
-+# ifndef be64toh
-+#  include <byteswap.h>
-+#  if __BYTE_ORDER == __LITTLE_ENDIAN
-+#   define be64toh(x) bswap_64 (x)
-+#  else
-+#   define be64toh(x) (x)
-+#  endif
-+# endif
- # include <zlib.h>
- # undef crc32
- #endif
-diff --git a/libdw/libdw.h b/libdw/libdw.h
-index 473e1a2..5a511cd 100644
---- a/libdw/libdw.h
-+++ b/libdw/libdw.h
-@@ -1004,7 +1004,7 @@ extern Dwarf_OOM dwarf_new_oom_handler (Dwarf *dbg, Dwarf_OOM handler);
- 
- 
- /* Inline optimizations.  */
--#ifdef __OPTIMIZE__
-+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
- /* Return attribute code of given attribute.  */
- __libdw_extern_inline unsigned int
- dwarf_whatattr (Dwarf_Attribute *attr)
-diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
-index a5253e2..59abfac 100644
---- a/libdwfl/ChangeLog
-+++ b/libdwfl/ChangeLog
-@@ -704,6 +704,21 @@
- 	(dwfl_module_addrsym) (i_to_symfile): New function.
- 	(dwfl_module_addrsym) (search_table): Use it.
- 
-+2013-11-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
-+
-+	Older OS compatibility bits.
-+	* linux-core-attach.c (be64toh, le64toh, be32toh, le32toh): Provide
-+	fallbacks if not defined by system.
-+
-+2013-11-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
-+
-+	Handle T-stopped detach for old kernels.
-+	* linux-pid-attach.c (struct pid_arg): New field stopped.
-+	(ptrace_attach): New parameter stoppedp.  Set it appropriately.
-+	(pid_set_initial_registers): Pass the new field.
-+	(pid_thread_detach): Handle the case of STOPPED for old kernels.
-+	(__libdwfl_attach_state_for_pid): Initialize STOPPED.
-+
- 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
- 	    Mark Wielaard  <mjw@redhat.com>
- 
-@@ -2469,6 +2484,11 @@
- 
- 2005-07-21  Roland McGrath  <roland@redhat.com>
- 
-+	* Makefile.am (WEXTRA): New variable, substituted by configure.
-+	(AM_CFLAGS): Use it in place of -Wextra.
-+
-+2005-07-21  Roland McGrath  <roland@redhat.com>
-+
- 	* Makefile.am (noinst_HEADERS): Add loc2c.c.
- 
- 	* test2.c (main): Check sscanf result to quiet warning.
-diff --git a/libdwfl/linux-core-attach.c b/libdwfl/linux-core-attach.c
-index 5a7b3b3..d05ac7e 100644
---- a/libdwfl/linux-core-attach.c
-+++ b/libdwfl/linux-core-attach.c
-@@ -29,6 +29,35 @@
- #include "libdwflP.h"
- #include <fcntl.h>
- #include "system.h"
-+#include <endian.h>
-+#include <byteswap.h>
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+# ifndef be64toh
-+#  define be64toh(x) bswap_64 (x)
-+# endif
-+# ifndef le64toh
-+#  define le64toh(x) (x)
-+# endif
-+# ifndef be32toh
-+#  define be32toh(x) bswap_32 (x)
-+# endif
-+# ifndef le32toh
-+#  define le32toh(x) (x)
-+# endif
-+#else
-+# ifndef be64toh
-+#  define be64toh(x) (x)
-+# endif
-+# ifndef le64toh
-+#  define le64toh(x) bswap_64 (x)
-+# endif
-+# ifndef be32toh
-+#  define be32toh(x) (x)
-+# endif
-+# ifndef le32toh
-+#  define le32toh(x) bswap_32 (x)
-+# endif
-+#endif
- 
- #include "../libdw/memory-access.h"
- 
-diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c
-index ae71702..076b2c3 100644
---- a/libdwfl/linux-pid-attach.c
-+++ b/libdwfl/linux-pid-attach.c
-@@ -255,6 +255,11 @@ void
- internal_function
- __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
- {
-+  // Older kernels (tested kernel-2.6.18-348.12.1.el5.x86_64) need special
-+  // handling of the detachment to keep the process State: T (stopped).
-+  if (tid_was_stopped)
-+    syscall (__NR_tkill, tid, SIGSTOP);
-+
-   /* This handling is needed only on older Linux kernels such as
-      2.6.32-358.23.2.el6.ppc64.  Later kernels such as
-      3.11.7-200.fc19.x86_64 remember the T (stopped) state
-@@ -262,6 +267,15 @@ __libdwfl_ptrace_detach (pid_t tid, bool tid_was_stopped)
-      PTRACE_DETACH.  */
-   ptrace (PTRACE_DETACH, tid, NULL,
- 	  (void *) (intptr_t) (tid_was_stopped ? SIGSTOP : 0));
-+
-+  if (tid_was_stopped)
-+    {
-+      // Wait till the SIGSTOP settles down.
-+      int i;
-+      for (i = 0; i < 100000; i++)
-+	if (linux_proc_pid_is_stopped (tid))
-+	  break;
-+    }
- }
- 
- static void
-diff --git a/libebl/ChangeLog b/libebl/ChangeLog
-index 51ae60f..aee0217 100644
---- a/libebl/ChangeLog
-+++ b/libebl/ChangeLog
-@@ -780,6 +780,11 @@
- 	* Makefile.am (libebl_*_so_SOURCES): Set to $(*_SRCS) so dependency
- 	tracking works right.
- 
-+2005-05-31  Roland McGrath  <roland@redhat.com>
-+
-+	* Makefile.am (WEXTRA): New variable, substituted by configure.
-+	(AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-05-21  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* libebl_x86_64.map: Add x86_64_core_note.
-diff --git a/libelf/ChangeLog b/libelf/ChangeLog
-index 30017cd..9ca9c73 100644
---- a/libelf/ChangeLog
-+++ b/libelf/ChangeLog
-@@ -398,6 +398,11 @@
- 
- 	* elf-knowledge.h (SECTION_STRIP_P): Remove < SHT_NUM check.
- 
-+2011-03-10  Roland McGrath  <roland@redhat.com>
-+
-+	* gnuhash_xlate.h (elf_cvt_gnuhash): Avoid post-increment in bswap_32
-+	argument, since some implementations are buggy macros.
-+
- 2011-02-26  Mark Wielaard  <mjw@redhat.com>
- 
- 	* elf_end.c (elf_end): Call rwlock_unlock before rwlock_fini.
-@@ -1075,6 +1080,11 @@
- 
- 	* elf.h: Update from glibc.
- 
-+2005-05-31  Roland McGrath  <roland@redhat.com>
-+
-+	* Makefile.am (WEXTRA): New variable, substituted by configure.
-+	(AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-05-08  Roland McGrath  <roland@redhat.com>
- 
- 	* elf_begin.c (read_file) [_MUDFLAP]: Don't use mmap for now.
-diff --git a/libelf/common.h b/libelf/common.h
-index 744f1bb..185ea59 100644
---- a/libelf/common.h
-+++ b/libelf/common.h
-@@ -139,7 +139,7 @@ libelf_release_all (Elf *elf)
-   (Var) = (sizeof (Var) == 1						      \
- 	   ? (unsigned char) (Var)					      \
- 	   : (sizeof (Var) == 2						      \
--	      ? bswap_16 (Var)						      \
-+	      ? (unsigned short int) bswap_16 (Var)			      \
- 	      : (sizeof (Var) == 4					      \
- 		 ? bswap_32 (Var)					      \
- 		 : bswap_64 (Var))))
-@@ -148,7 +148,7 @@ libelf_release_all (Elf *elf)
-   (Dst) = (sizeof (Var) == 1						      \
- 	   ? (unsigned char) (Var)					      \
- 	   : (sizeof (Var) == 2						      \
--	      ? bswap_16 (Var)						      \
-+	      ? (unsigned short int) bswap_16 (Var)			      \
- 	      : (sizeof (Var) == 4					      \
- 		 ? bswap_32 (Var)					      \
- 		 : bswap_64 (Var))))
-diff --git a/libelf/gnuhash_xlate.h b/libelf/gnuhash_xlate.h
-index 04d9ca1..3e25936 100644
---- a/libelf/gnuhash_xlate.h
-+++ b/libelf/gnuhash_xlate.h
-@@ -1,5 +1,5 @@
- /* Conversion functions for versioning information.
--   Copyright (C) 2006, 2007 Red Hat, Inc.
-+   Copyright (C) 2006-2011 Red Hat, Inc.
-    This file is part of elfutils.
-    Written by Ulrich Drepper <drepper@redhat.com>, 2006.
- 
-@@ -69,7 +69,9 @@ elf_cvt_gnuhash (void *dest, const void *src, size_t len, int encode)
-   dest32 = (Elf32_Word *) &dest64[bitmask_words];
-   while (len >= 4)
-     {
--      *dest32++ = bswap_32 (*src32++);
-+      *dest32 = bswap_32 (*src32);
-+      ++dest32;
-+      ++src32;
-       len -= 4;
-     }
- }
-diff --git a/src/ChangeLog b/src/ChangeLog
-index 15e6fae..78535c8 100644
---- a/src/ChangeLog
-+++ b/src/ChangeLog
-@@ -1598,8 +1598,16 @@
- 	* readelf.c (attr_callback): Use print_block only when we don't use
- 	print_ops.
- 
-+2009-08-17  Roland McGrath  <roland@redhat.com>
-+
-+	* ld.h: Disable extern inlines for GCC 4.2.
-+
- 2009-08-14  Roland McGrath  <roland@redhat.com>
- 
-+	* strings.c (read_block): Conditionalize posix_fadvise use
-+	on [POSIX_FADV_SEQUENTIAL].
-+	From Petr Salinger <Petr.Salinger@seznam.cz>.
-+
- 	* ar.c (do_oper_extract): Use pathconf instead of statfs.
- 
- 2009-08-01  Ulrich Drepper  <drepper@redhat.com>
-@@ -1763,6 +1771,8 @@
- 	* readelf.c (print_debug_frame_section): Use t instead of j formats
- 	for ptrdiff_t OFFSET.
- 
-+	* addr2line.c (handle_address): Use %a instead of %m for compatibility.
-+
- 2009-01-21  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* elflint.c (check_program_header): Fix typo in .eh_frame_hdr section
-@@ -1946,6 +1956,11 @@
- 	that matches its PT_LOAD's p_flags &~ PF_W.  On sparc, PF_X really
- 	is valid in RELRO.
- 
-+2008-03-01  Roland McGrath  <roland@redhat.com>
-+
-+	* readelf.c (dump_archive_index): Tweak portability hack
-+	to match [__GNUC__ < 4] too.
-+
- 2008-02-29  Roland McGrath  <roland@redhat.com>
- 
- 	* readelf.c (print_attributes): Add a cast.
-@@ -2197,6 +2212,8 @@
- 
- 	* readelf.c (hex_dump): Fix rounding error in whitespace calculation.
- 
-+	* Makefile.am (readelf_no_Werror): New variable.
-+
- 2007-10-15  Roland McGrath  <roland@redhat.com>
- 
- 	* make-debug-archive.in: New file.
-@@ -2636,6 +2653,10 @@
- 	* elflint.c (valid_e_machine): Add EM_ALPHA.
- 	Reported by Christian Aichinger <Greek0@gmx.net>.
- 
-+	* strings.c (map_file): Define POSIX_MADV_SEQUENTIAL to
-+	MADV_SEQUENTIAL if undefined.  	Don't call posix_madvise
-+	if neither is defined.
-+
- 2006-08-08  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* elflint.c (check_dynamic): Don't require DT_HASH for DT_SYMTAB.
-@@ -2712,6 +2733,10 @@
- 	* Makefile.am: Add hacks to create dependency files for non-generic
- 	linker.
- 
-+2006-04-05  Roland McGrath  <roland@redhat.com>
-+
-+	* strings.c (MAP_POPULATE): Define to 0 if undefined.
-+
- 2006-06-12  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* ldgeneric.c (ld_generic_generate_sections): Don't create .interp
-@@ -3060,6 +3085,11 @@
- 	* readelf.c (print_debug_loc_section): Fix indentation for larger
- 	address size.
- 
-+2005-05-31  Roland McGrath  <roland@redhat.com>
-+
-+	* Makefile.am (WEXTRA): New variable, substituted by configure.
-+	(AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-05-30  Roland McGrath  <roland@redhat.com>
- 
- 	* readelf.c (print_debug_line_section): Print section offset of each
-diff --git a/src/Makefile.am b/src/Makefile.am
-index dbac3eb..9028aa1 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -90,6 +90,11 @@ endif
- ldgeneric_no_Wunused = yes
- ldgeneric_no_Wstack_usage = yes
- 
-+# Buggy old compilers or libc headers.
-+readelf_no_Werror = yes
-+strings_no_Werror = yes
-+addr2line_no_Wformat = yes
-+
- # Bad, bad stack usage...
- readelf_no_Wstack_usage = yes
- nm_no_Wstack_usage = yes
-diff --git a/src/addr2line.c b/src/addr2line.c
-index 0ce854f..d2d0c8c 100644
---- a/src/addr2line.c
-+++ b/src/addr2line.c
-@@ -622,10 +622,10 @@ handle_address (const char *string, Dwfl *dwfl)
-       bool parsed = false;
-       int i, j;
-       char *name = NULL;
--      if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
-+      if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
- 	  && string[i] == '\0')
- 	parsed = adjust_to_section (name, &addr, dwfl);
--      switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
-+      switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
- 	{
- 	default:
- 	  break;
-diff --git a/src/findtextrel.c b/src/findtextrel.c
-index 264a06b..d7de202 100644
---- a/src/findtextrel.c
-+++ b/src/findtextrel.c
-@@ -502,7 +502,11 @@ ptrcompare (const void *p1, const void *p2)
- 
- 
- static void
--check_rel (size_t nsegments, struct segments segments[nsegments],
-+check_rel (size_t nsegments, struct segments segments[
-+#if __GNUC__ >= 4
-+						      nsegments
-+#endif
-+	   ],
- 	   GElf_Addr addr, Elf *elf, Elf_Scn *symscn, Dwarf *dw,
- 	   const char *fname, bool more_than_one, void **knownsrcs)
- {
-diff --git a/src/ld.h b/src/ld.h
-index 29f4031..8695c31 100644
---- a/src/ld.h
-+++ b/src/ld.h
-@@ -1114,6 +1114,7 @@ extern bool dynamically_linked_p (void);
- 
- /* Checked whether the symbol is undefined and referenced from a DSO.  */
- extern bool linked_from_dso_p (struct scninfo *scninfo, size_t symidx);
-+#if defined __OPTIMIZE__ && !(__GNUC__ == 4 && __GNUC_MINOR__ == 2)
- #ifdef __GNUC_STDC_INLINE__
- __attribute__ ((__gnu_inline__))
- #endif
-@@ -1131,5 +1132,6 @@ linked_from_dso_p (struct scninfo *scninfo, size_t symidx)
- 
-   return sym->defined && sym->in_dso;
- }
-+#endif	/* Optimizing and not GCC 4.2.  */
- 
- #endif	/* ld.h */
-diff --git a/src/readelf.c b/src/readelf.c
-index b4cb3a8..606d220 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -4364,10 +4364,12 @@ listptr_base (struct listptr *p)
-   return base;
- }
- 
-+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;
-+  const char *const name = listptr_name;
-   struct listptr *p1 = (void *) a;
-   struct listptr *p2 = (void *) b;
- 
-@@ -4463,8 +4465,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
-@@ -9561,7 +9566,7 @@ dump_archive_index (Elf *elf, const char *fname)
- 	  if (unlikely (elf_rand (elf, as_off) == 0)
- 	      || unlikely ((subelf = elf_begin (-1, ELF_C_READ_MMAP, elf))
- 			   == NULL))
--#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
-+#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) || __GNUC__ < 4
- 	    while (1)
- #endif
- 	      error (EXIT_FAILURE, 0,
-diff --git a/src/strings.c b/src/strings.c
-index b2bce7b..fe0ab6c 100644
---- a/src/strings.c
-+++ b/src/strings.c
-@@ -43,6 +43,10 @@
- 
- #include <system.h>
- 
-+#ifndef MAP_POPULATE
-+# define MAP_POPULATE 0
-+#endif
-+
- 
- /* Prototypes of local functions.  */
- static int read_fd (int fd, const char *fname, off64_t fdlen);
-@@ -489,8 +493,13 @@ map_file (int fd, off64_t start_off, off64_t fdlen, size_t *map_sizep)
- 		    fd, start_off);
-       if (mem != MAP_FAILED)
- 	{
-+#if !defined POSIX_MADV_SEQUENTIAL && defined MADV_SEQUENTIAL
-+# define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
-+#endif
-+#ifdef POSIX_MADV_SEQUENTIAL
- 	  /* We will go through the mapping sequentially.  */
- 	  (void) posix_madvise (mem, map_size, POSIX_MADV_SEQUENTIAL);
-+#endif
- 	  break;
- 	}
-       if (errno != EINVAL && errno != ENOMEM)
-@@ -581,9 +590,11 @@ read_block (int fd, const char *fname, off64_t fdlen, off64_t from, off64_t to)
-       elfmap_off = from & ~(ps - 1);
-       elfmap_base = elfmap = map_file (fd, elfmap_off, fdlen, &elfmap_size);
- 
-+#ifdef POSIX_FADV_SEQUENTIAL
-       if (unlikely (elfmap == MAP_FAILED))
- 	/* Let the kernel know we are going to read everything in sequence.  */
- 	(void) posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
-+#endif
-     }
- 
-   if (unlikely (elfmap == MAP_FAILED))
-diff --git a/src/strip.c b/src/strip.c
-index 5e69334..8bd1790 100644
---- a/src/strip.c
-+++ b/src/strip.c
-@@ -44,6 +44,12 @@
- #include <libebl.h>
- #include <system.h>
- 
-+#ifdef HAVE_FUTIMES
-+# define FUTIMES(fd, fname, tvp) futimes (fd, tvp)
-+#else
-+# define FUTIMES(fd, fname, tvp) utimes (fname, tvp)
-+#endif
-+
- typedef uint8_t GElf_Byte;
- 
- /* Name and version of program.  */
-diff --git a/tests/ChangeLog b/tests/ChangeLog
-index 19878ac..6815028 100644
---- a/tests/ChangeLog
-+++ b/tests/ChangeLog
-@@ -609,6 +609,13 @@
- 
- 2013-12-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
- 
-+	Handle T-stopped detach for old kernels.
-+	* backtrace.c: Include sys/syscall.h.
-+	(linux_proc_pid_is_stopped): New function.
-+	(ptrace_detach_stopped): Handle old kernels.
-+
-+2013-12-02  Jan Kratochvil  <jan.kratochvil@redhat.com>
-+
- 	* Makefile.am (check_PROGRAMS): Add backtrace, backtrace-child,
- 	backtrace-data and backtrace-dwarf.
- 	(BUILT_SOURCES, clean-local, backtrace-child-biarch): New.
-@@ -1473,6 +1480,8 @@
- 
- 2008-01-21  Roland McGrath  <roland@redhat.com>
- 
-+	* line2addr.c (main): Revert last change.
-+
- 	* testfile45.S.bz2: Add tests for cltq, cqto.
- 	* testfile45.expect.bz2: Adjust.
- 
-@@ -2181,6 +2190,11 @@
- 	* Makefile.am (TESTS): Add run-elflint-test.sh.
- 	(EXTRA_DIST): Add run-elflint-test.sh and testfile18.bz2.
- 
-+2005-05-31  Roland McGrath  <roland@redhat.com>
-+
-+	* Makefile.am (WEXTRA): New variable, substituted by configure.
-+	(AM_CFLAGS): Use it in place of -Wextra.
-+
- 2005-05-24  Ulrich Drepper  <drepper@redhat.com>
- 
- 	* get-files.c (main): Use correct format specifier.
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 425f8cd..69760a4 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -382,6 +382,7 @@ get_lines_LDADD = $(libdw) $(libelf)
- get_files_LDADD = $(libdw) $(libelf)
- get_aranges_LDADD = $(libdw) $(libelf)
- allfcts_LDADD = $(libdw) $(libelf)
-+line2addr_no_Wformat = yes
- line2addr_LDADD = $(libdw) $(argp_LDADD)
- addrscopes_LDADD = $(libdw) $(argp_LDADD)
- funcscopes_LDADD = $(libdw) $(argp_LDADD)
-diff --git a/tests/backtrace.c b/tests/backtrace.c
-index abd56ab..6a7c661 100644
---- a/tests/backtrace.c
-+++ b/tests/backtrace.c
-@@ -36,6 +36,7 @@
- #include <fcntl.h>
- #include <string.h>
- #include <argp.h>
-+#include <sys/syscall.h>
- #include ELFUTILS_HEADER(dwfl)
- 
- #ifndef __linux__
-diff --git a/tests/line2addr.c b/tests/line2addr.c
-index e0d65d3..7c171b9 100644
---- a/tests/line2addr.c
-+++ b/tests/line2addr.c
-@@ -124,7 +124,7 @@ main (int argc, char *argv[])
-     {
-       struct args a = { .arg = argv[cnt] };
- 
--      switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
-+      switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
- 	{
- 	default:
- 	case 0:
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch
deleted file mode 100644
index c08519c..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/scanf-format.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: Kurt Roeckx <kurt@roeckx.be>
-Subject: Use %m[ instead of %a[ in scanf()
-
-%a was a gnu extention, but C99 made this a float.  So it got
-changed to %m (supported by glibc 2.7), but %a[ and %as are
-still supported by glibc.  The portability branch changed this
-from %m to %a again since that's supported by more versions of
-glibc.  However gcc gives a warning about this using -Wformat
-and we have a new enough libc to use %m.
-
-Index: elfutils-0.153/src/addr2line.c
-===================================================================
---- elfutils-0.153.orig/src/addr2line.c	2012-02-24 22:29:50.000000000 +0000
-+++ elfutils-0.153/src/addr2line.c	2012-02-24 22:29:52.000000000 +0000
-@@ -455,10 +455,10 @@
-       bool parsed = false;
-       int i, j;
-       char *name = NULL;
--      if (sscanf (string, "(%a[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
-+      if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &i) == 2
- 	  && string[i] == '\0')
- 	parsed = adjust_to_section (name, &addr, dwfl);
--      switch (sscanf (string, "%a[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
-+      switch (sscanf (string, "%m[^-+]%n%" PRIiMAX "%n", &name, &i, &addr, &j))
- 	{
- 	default:
- 	  break;
-Index: elfutils-0.153/tests/line2addr.c
-===================================================================
---- elfutils-0.153.orig/tests/line2addr.c	2012-02-24 22:29:50.000000000 +0000
-+++ elfutils-0.153/tests/line2addr.c	2012-02-24 22:29:52.000000000 +0000
-@@ -132,7 +132,7 @@
-     {
-       struct args a = { .arg = argv[cnt] };
- 
--      switch (sscanf (a.arg, "%a[^:]:%d", &a.file, &a.line))
-+      switch (sscanf (a.arg, "%m[^:]:%d", &a.file, &a.line))
- 	{
- 	default:
- 	case 0:
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/uclibc-support-for-elfutils-0.161.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/uclibc-support-for-elfutils-0.161.patch
deleted file mode 100644
index f1533bf..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/uclibc-support-for-elfutils-0.161.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 3daec2dd11a04955f95e8f65a48820103d84dbec Mon Sep 17 00:00:00 2001
-From: Junling Zheng <zhengjunling@huawei.com>
-Date: Thu, 9 Apr 2015 12:12:49 +0000
-Subject: [PATCH] uclibc support for elfutils 0.161
-
-on uclibc systems libintl and libuargp are separate from libc.
-so they need to be specified on commandline when we use proxy-libintl
-then libintl is a static archive so it should be listed last since
-elfutils does not respect disable-nls we need to link in libintl
-
-We add a new option --enable-uclibc which will be used to control
-the uclibc specific configurations during build.
-
-Upstream-Status: Inappropriate [uclibc specific]
-
-Signed-off-by: Khem Raj <raj.khem>
-Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
-[Junling Zheng:
- - adjust context
-]
----
- configure.ac       | 8 ++++++++
- libcpu/Makefile.am | 4 ++++
- libdw/Makefile.am  | 7 ++++++-
- libelf/Makefile.am | 5 +++++
- 4 files changed, 23 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index a1ad6db..81fc33f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -70,6 +70,14 @@ AS_IF([test "$use_locks" = yes],
- 
- AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
- 
-+AC_ARG_ENABLE([uclibc],
-+AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
-+use_uclibc=yes, use_uclibc=no)
-+AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes)
-+AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)])
-+
-+AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
-+
- AC_PROG_CC
- AC_PROG_RANLIB
- AC_PROG_YACC
-diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
-index 3beccf3..9ba6c04 100644
---- a/libcpu/Makefile.am
-+++ b/libcpu/Makefile.am
-@@ -80,6 +80,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i386.mnemonics`"
- i386_lex.o: i386_parse.h
- i386_gendis_LDADD = $(libeu) -lm
- 
-+if USE_UCLIBC
-+i386_gendis_LDADD += -luargp -lintl
-+endif
-+
- i386_parse.h: i386_parse.c ;
- 
- EXTRA_DIST = defs/i386
-diff --git a/libdw/Makefile.am b/libdw/Makefile.am
-index 887da6b..d31b428 100644
---- a/libdw/Makefile.am
-+++ b/libdw/Makefile.am
-@@ -102,6 +102,11 @@ endif
- libdw_pic_a_SOURCES =
- am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
- 
-+libdw_so_LDLIBS =
-+if USE_UCLIBC
-+libdw_so_LDLIBS += -lintl -luargp
-+endif
-+
- libdw_so_SOURCES =
- libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
- 	  ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
-@@ -112,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
- 		-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
- 		-Wl,--version-script,$<,--no-undefined \
- 		-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
--		-ldl $(zip_LIBS)
-+		-ldl $(zip_LIBS) $(libdw_so_LDLIBS)
- 	@$(textrel_check)
- 	ln -fs $@ $@.$(VERSION)
- 
-diff --git a/libelf/Makefile.am b/libelf/Makefile.am
-index afcb2aa..02836a1 100644
---- a/libelf/Makefile.am
-+++ b/libelf/Makefile.am
-@@ -93,7 +93,12 @@ libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
- libelf_pic_a_SOURCES =
- am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
- 
-+
- libelf_so_LDLIBS =
-+if USE_UCLIBC
-+libelf_so_LDLIBS += -lintl -luargp
-+endif
-+
- if USE_LOCKS
- libelf_so_LDLIBS += -lpthread
- endif
--- 
-1.8.3.4
-
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch
new file mode 100644
index 0000000..3f110f9
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-Ignore-differences-between-mips-machine-identifiers.patch
@@ -0,0 +1,34 @@
+From 77cb4a53c270d5854d3af24f19547bc3de825233 Mon Sep 17 00:00:00 2001
+From: James Cowgill <james410@cowgill.org.uk>
+Date: Mon, 5 Jan 2015 15:16:58 +0000
+Subject: [PATCH 1/3] Ignore differences between mips machine identifiers
+
+Little endian binaries actually use EM_MIPS so you can't tell the endianness
+from the elf machine id. Also, the EM_MIPS_RS3_LE machine is dead anyway (the
+kernel will not load binaries containing it).
+
+Signed-off-by: James Cowgill <james410@cowgill.org.uk>
+---
+ backends/mips_init.c | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/backends/mips_init.c b/backends/mips_init.c
+index 7429a89..d10e940 100644
+--- a/backends/mips_init.c
++++ b/backends/mips_init.c
+@@ -46,11 +46,7 @@ mips_init (elf, machine, eh, ehlen)
+     return NULL;
+ 
+   /* We handle it.  */
+-  if (machine == EM_MIPS)
+-    eh->name = "MIPS R3000 big-endian";
+-  else if (machine == EM_MIPS_RS3_LE)
+-    eh->name = "MIPS R3000 little-endian";
+-
++  eh->name = "MIPS";
+   mips_init_reloc (eh);
+   HOOK (eh, reloc_simple_type);
+   HOOK (eh, return_value_location);
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
new file mode 100644
index 0000000..c8d1c89
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch
@@ -0,0 +1,1163 @@
+From 4b0fe80b3951f044c1c1b14d1d7f5f0b8ab67507 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 06:35:34 +0000
+Subject: [PATCH] build: Provide alternatives for glibc assumptions helps
+ compiling it on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ Makefile.am                      |  2 +-
+ lib/color.c                      |  2 +-
+ lib/crc32_file.c                 |  4 +++-
+ lib/fixedsizehash.h              |  4 ++--
+ lib/system.h                     | 11 +++++++++++
+ lib/xmalloc.c                    |  2 +-
+ libasm/asm_end.c                 |  2 +-
+ libasm/asm_newscn.c              |  2 +-
+ libcpu/i386_gendis.c             |  2 +-
+ libcpu/i386_lex.c                |  2 +-
+ libcpu/i386_parse.c              |  2 +-
+ libdw/Makefile.am                |  2 +-
+ libdw/libdw_alloc.c              |  3 ++-
+ libdwfl/Makefile.am              |  2 ++
+ libdwfl/dwfl_build_id_find_elf.c |  3 ++-
+ libdwfl/dwfl_error.c             |  4 +++-
+ libdwfl/dwfl_module_getdwarf.c   |  1 +
+ libdwfl/find-debuginfo.c         |  2 +-
+ libdwfl/libdwfl_crc32_file.c     | 10 ++++++++++
+ libdwfl/linux-kernel-modules.c   |  1 +
+ libebl/eblopenbackend.c          |  2 +-
+ libebl/eblwstrtab.c              |  2 +-
+ libelf/elf.h                     |  9 ++++++---
+ libelf/libelf.h                  |  1 +
+ libelf/libelfP.h                 |  1 +
+ src/addr2line.c                  |  2 +-
+ src/ar.c                         |  2 +-
+ src/arlib.c                      |  2 +-
+ src/arlib2.c                     |  2 +-
+ src/elfcmp.c                     |  2 +-
+ src/elflint.c                    |  2 +-
+ src/findtextrel.c                |  2 +-
+ src/i386_ld.c                    |  2 +-
+ src/ld.c                         |  2 +-
+ src/ldgeneric.c                  |  2 +-
+ src/ldlex.c                      |  2 +-
+ src/ldscript.c                   |  2 +-
+ src/nm.c                         |  2 +-
+ src/objdump.c                    |  2 +-
+ src/ranlib.c                     |  2 +-
+ src/readelf.c                    |  2 +-
+ src/size.c                       |  2 +-
+ src/stack.c                      |  2 +-
+ src/strings.c                    |  2 +-
+ src/strip.c                      |  2 +-
+ src/unstrip.c                    |  2 +-
+ tests/addrscopes.c               |  2 +-
+ tests/allregs.c                  |  2 +-
+ tests/backtrace-data.c           |  2 +-
+ tests/backtrace-dwarf.c          |  2 +-
+ tests/backtrace.c                |  2 +-
+ tests/buildid.c                  |  2 +-
+ tests/debugaltlink.c             |  2 +-
+ tests/debuglink.c                |  2 +-
+ tests/deleted.c                  |  2 +-
+ tests/dwfl-addr-sect.c           |  2 +-
+ tests/dwfl-bug-addr-overflow.c   |  2 +-
+ tests/dwfl-bug-fd-leak.c         |  2 +-
+ tests/dwfl-bug-getmodules.c      |  2 +-
+ tests/dwfl-report-elf-align.c    |  2 +-
+ tests/dwfllines.c                |  2 +-
+ tests/dwflmodtest.c              |  2 +-
+ tests/dwflsyms.c                 |  2 +-
+ tests/early-offscn.c             |  2 +-
+ tests/ecp.c                      |  2 +-
+ tests/find-prologues.c           |  2 +-
+ tests/funcretval.c               |  2 +-
+ tests/funcscopes.c               |  2 +-
+ tests/getsrc_die.c               |  2 +-
+ tests/line2addr.c                |  2 +-
+ tests/low_high_pc.c              |  2 +-
+ tests/md5-sha1-test.c            |  2 +-
+ tests/rdwrmmap.c                 |  2 +-
+ tests/saridx.c                   |  2 +-
+ tests/sectiondump.c              |  2 +-
+ tests/varlocs.c                  |  2 +-
+ tests/vdsosyms.c                 |  2 +-
+ 77 files changed, 109 insertions(+), 73 deletions(-)
+
+Index: elfutils-0.164/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/Makefile.am
++++ elfutils-0.164/Makefile.am
+@@ -24,7 +24,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
+Index: elfutils-0.164/lib/color.c
+===================================================================
+--- elfutils-0.164.orig/lib/color.c
++++ elfutils-0.164/lib/color.c
+@@ -32,7 +32,7 @@
+ #endif
+ 
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+ #include <string.h>
+Index: elfutils-0.164/lib/crc32_file.c
+===================================================================
+--- elfutils-0.164.orig/lib/crc32_file.c
++++ elfutils-0.164/lib/crc32_file.c
+@@ -30,12 +30,14 @@
+ # include <config.h>
+ #endif
+ 
+-#include "system.h"
+ #include <errno.h>
+ #include <unistd.h>
++#include <stdint.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+ 
++#include "system.h"
++
+ int
+ crc32_file (int fd, uint32_t *resp)
+ {
+Index: elfutils-0.164/lib/fixedsizehash.h
+===================================================================
+--- elfutils-0.164.orig/lib/fixedsizehash.h
++++ elfutils-0.164/lib/fixedsizehash.h
+@@ -30,12 +30,12 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <sys/cdefs.h>
+ #include <sys/param.h>
+ 
+ #include <system.h>
+ 
+-#define CONCAT(t1,t2) __CONCAT (t1,t2)
++#define CONCAT1(x,y) x##y
++#define CONCAT(x,y) CONCAT1(x,y)
+ 
+ /* Before including this file the following macros must be defined:
+ 
+Index: elfutils-0.164/lib/system.h
+===================================================================
+--- elfutils-0.164.orig/lib/system.h
++++ elfutils-0.164/lib/system.h
+@@ -49,6 +49,16 @@
+ #else
+ # error "Unknown byte order"
+ #endif
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++  (__extension__							      \
++    ({ long int __result;						      \
++       do __result = (long int) (expression);				      \
++       while (__result == -1L && errno == EINTR);			      \
++       __result; }))
++#endif
++
++#define error(status, errno, ...) err(status, __VA_ARGS__)
+ 
+ extern void *xmalloc (size_t) __attribute__ ((__malloc__));
+ extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
+Index: elfutils-0.164/lib/xmalloc.c
+===================================================================
+--- elfutils-0.164.orig/lib/xmalloc.c
++++ elfutils-0.164/lib/xmalloc.c
+@@ -30,7 +30,7 @@
+ # include <config.h>
+ #endif
+ 
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stddef.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/libasm/asm_end.c
+===================================================================
+--- elfutils-0.164.orig/libasm/asm_end.c
++++ elfutils-0.164/libasm/asm_end.c
+@@ -32,7 +32,7 @@
+ #endif
+ 
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/libasm/asm_newscn.c
+===================================================================
+--- elfutils-0.164.orig/libasm/asm_newscn.c
++++ elfutils-0.164/libasm/asm_newscn.c
+@@ -32,7 +32,7 @@
+ #endif
+ 
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+ #include <string.h>
+Index: elfutils-0.164/libcpu/i386_gendis.c
+===================================================================
+--- elfutils-0.164.orig/libcpu/i386_gendis.c
++++ elfutils-0.164/libcpu/i386_gendis.c
+@@ -31,7 +31,7 @@
+ # include <config.h>
+ #endif
+ 
+-#include <error.h>
++#include <err.h>
+ #include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/libcpu/i386_lex.c
+===================================================================
+--- elfutils-0.164.orig/libcpu/i386_lex.c
++++ elfutils-0.164/libcpu/i386_lex.c
+@@ -571,7 +571,7 @@ char *i386_text;
+ #endif
+ 
+ #include <ctype.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ 
+ #include <system.h>
+Index: elfutils-0.164/libcpu/i386_parse.c
+===================================================================
+--- elfutils-0.164.orig/libcpu/i386_parse.c
++++ elfutils-0.164/libcpu/i386_parse.c
+@@ -107,7 +107,7 @@
+ #include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <inttypes.h>
+ #include <libintl.h>
+ #include <math.h>
+Index: elfutils-0.164/libdw/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/libdw/Makefile.am
++++ elfutils-0.164/libdw/Makefile.am
+@@ -117,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
+ 		-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
+ 		-Wl,--version-script,$<,--no-undefined \
+ 		-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+-		-ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
++		-ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS) -lfts -largp
+ 	@$(textrel_check)
+ 	$(AM_V_at)ln -fs $@ $@.$(VERSION)
+ 
+Index: elfutils-0.164/libdw/libdw_alloc.c
+===================================================================
+--- elfutils-0.164.orig/libdw/libdw_alloc.c
++++ elfutils-0.164/libdw/libdw_alloc.c
+@@ -31,11 +31,12 @@
+ # include <config.h>
+ #endif
+ 
+-#include <error.h>
++#include <err.h>
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <sys/param.h>
+ #include "libdwP.h"
++#include "system.h"
+ 
+ 
+ void *
+Index: elfutils-0.164/libdwfl/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/libdwfl/Makefile.am
++++ elfutils-0.164/libdwfl/Makefile.am
+@@ -86,6 +86,8 @@ libelf = ../libelf/libelf.so
+ libebl = ../libebl/libebl.a
+ libeu = ../lib/libeu.a
+ 
++LDADD = -lfts
++
+ libdwfl_pic_a_SOURCES =
+ am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os)
+ 
+Index: elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/dwfl_build_id_find_elf.c
++++ elfutils-0.164/libdwfl/dwfl_build_id_find_elf.c
+@@ -27,6 +27,7 @@
+    not, see <http://www.gnu.org/licenses/>.  */
+ 
+ #include "libdwflP.h"
++#include "system.h"
+ #include <inttypes.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+@@ -94,7 +95,7 @@ __libdwfl_open_by_build_id (Dwfl_Module
+ 	{
+ 	  if (*file_name != NULL)
+ 	    free (*file_name);
+-	  *file_name = canonicalize_file_name (name);
++	  *file_name = realpath (name, NULL);
+ 	  if (*file_name == NULL)
+ 	    {
+ 	      *file_name = name;
+Index: elfutils-0.164/libdwfl/dwfl_error.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/dwfl_error.c
++++ elfutils-0.164/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):
+Index: elfutils-0.164/libdwfl/dwfl_module_getdwarf.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/dwfl_module_getdwarf.c
++++ elfutils-0.164/libdwfl/dwfl_module_getdwarf.c
+@@ -31,6 +31,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"
+ 
+Index: elfutils-0.164/libdwfl/find-debuginfo.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/find-debuginfo.c
++++ elfutils-0.164/libdwfl/find-debuginfo.c
+@@ -372,7 +372,7 @@ dwfl_standard_find_debuginfo (Dwfl_Modul
+       /* If FILE_NAME is a symlink, the debug file might be associated
+ 	 with the symlink target name instead.  */
+ 
+-      char *canon = canonicalize_file_name (file_name);
++      char *canon = realpath (file_name, NULL);
+       if (canon != NULL && strcmp (file_name, canon))
+ 	fd = find_debuginfo_in_path (mod, canon,
+ 				     debuglink_file, debuglink_crc,
+Index: elfutils-0.164/libdwfl/libdwfl_crc32_file.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/libdwfl_crc32_file.c
++++ elfutils-0.164/libdwfl/libdwfl_crc32_file.c
+@@ -31,6 +31,16 @@
+ 
+ #define crc32_file attribute_hidden __libdwfl_crc32_file
+ #define crc32 __libdwfl_crc32
++
++#ifndef TEMP_FAILURE_RETRY
++#define TEMP_FAILURE_RETRY(expression) \
++  (__extension__							      \
++    ({ long int __result;						      \
++       do __result = (long int) (expression);				      \
++       while (__result == -1L && errno == EINTR);			      \
++       __result; }))
++#endif
++
+ #define LIB_SYSTEM_H	1
+ #include <libdwflP.h>
+ #include "../lib/crc32_file.c"
+Index: elfutils-0.164/libdwfl/linux-kernel-modules.c
+===================================================================
+--- elfutils-0.164.orig/libdwfl/linux-kernel-modules.c
++++ elfutils-0.164/libdwfl/linux-kernel-modules.c
+@@ -34,6 +34,7 @@
+ #include <config.h>
+ 
+ #include "libdwflP.h"
++#include "system.h"
+ #include <inttypes.h>
+ #include <errno.h>
+ #include <stdio.h>
+Index: elfutils-0.164/libebl/eblopenbackend.c
+===================================================================
+--- elfutils-0.164.orig/libebl/eblopenbackend.c
++++ elfutils-0.164/libebl/eblopenbackend.c
+@@ -32,7 +32,7 @@
+ 
+ #include <assert.h>
+ #include <dlfcn.h>
+-#include <error.h>
++#include <err.h>
+ #include <libelfP.h>
+ #include <dwarf.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/libebl/eblwstrtab.c
+===================================================================
+--- elfutils-0.164.orig/libebl/eblwstrtab.c
++++ elfutils-0.164/libebl/eblwstrtab.c
+@@ -305,7 +305,7 @@ copystrings (struct Ebl_WStrent *nodep,
+ 
+   /* Process the current node.  */
+   nodep->offset = *offsetp;
+-  *freep = wmempcpy (*freep, nodep->string, nodep->len);
++  *freep = wmemcpy (*freep, nodep->string, nodep->len) + nodep->len;
+   *offsetp += nodep->len * sizeof (wchar_t);
+ 
+   for (subs = nodep->next; subs != NULL; subs = subs->next)
+Index: elfutils-0.164/libelf/elf.h
+===================================================================
+--- elfutils-0.164.orig/libelf/elf.h
++++ elfutils-0.164/libelf/elf.h
+@@ -21,7 +21,9 @@
+ 
+ #include <features.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /* Standard ELF types.  */
+ 
+@@ -3552,7 +3554,8 @@ enum
+ 
+ #define R_TILEGX_NUM		130
+ 
+-
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif	/* elf.h */
+Index: elfutils-0.164/libelf/libelf.h
+===================================================================
+--- elfutils-0.164.orig/libelf/libelf.h
++++ elfutils-0.164/libelf/libelf.h
+@@ -29,6 +29,7 @@
+ #ifndef _LIBELF_H
+ #define _LIBELF_H 1
+ 
++#include <fcntl.h>
+ #include <stdint.h>
+ #include <sys/types.h>
+ 
+Index: elfutils-0.164/libelf/libelfP.h
+===================================================================
+--- elfutils-0.164.orig/libelf/libelfP.h
++++ elfutils-0.164/libelf/libelfP.h
+@@ -36,6 +36,7 @@
+ 
+ #include <ar.h>
+ #include <gelf.h>
++#include <libelf.h>
+ 
+ #include <errno.h>
+ #include <stdint.h>
+Index: elfutils-0.164/src/addr2line.c
+===================================================================
+--- elfutils-0.164.orig/src/addr2line.c
++++ elfutils-0.164/src/addr2line.c
+@@ -23,7 +23,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <libdwfl.h>
+Index: elfutils-0.164/src/ar.c
+===================================================================
+--- elfutils-0.164.orig/src/ar.c
++++ elfutils-0.164/src/ar.c
+@@ -22,7 +22,7 @@
+ 
+ #include <argp.h>
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libintl.h>
+Index: elfutils-0.164/src/arlib.c
+===================================================================
+--- elfutils-0.164.orig/src/arlib.c
++++ elfutils-0.164/src/arlib.c
+@@ -21,7 +21,7 @@
+ #endif
+ 
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <gelf.h>
+ #include <libintl.h>
+ #include <stdio.h>
+Index: elfutils-0.164/src/arlib2.c
+===================================================================
+--- elfutils-0.164.orig/src/arlib2.c
++++ elfutils-0.164/src/arlib2.c
+@@ -20,7 +20,7 @@
+ # include <config.h>
+ #endif
+ 
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <limits.h>
+ #include <string.h>
+Index: elfutils-0.164/src/elfcmp.c
+===================================================================
+--- elfutils-0.164.orig/src/elfcmp.c
++++ elfutils-0.164/src/elfcmp.c
+@@ -23,7 +23,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <locale.h>
+ #include <libintl.h>
+Index: elfutils-0.164/src/elflint.c
+===================================================================
+--- elfutils-0.164.orig/src/elflint.c
++++ elfutils-0.164/src/elflint.c
+@@ -24,7 +24,7 @@
+ #include <assert.h>
+ #include <byteswap.h>
+ #include <endian.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/src/findtextrel.c
+===================================================================
+--- elfutils-0.164.orig/src/findtextrel.c
++++ elfutils-0.164/src/findtextrel.c
+@@ -23,7 +23,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libdw.h>
+Index: elfutils-0.164/src/i386_ld.c
+===================================================================
+--- elfutils-0.164.orig/src/i386_ld.c
++++ elfutils-0.164/src/i386_ld.c
+@@ -20,7 +20,7 @@
+ #endif
+ 
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdlib.h>
+ #include <string.h>
+Index: elfutils-0.164/src/ld.c
+===================================================================
+--- elfutils-0.164.orig/src/ld.c
++++ elfutils-0.164/src/ld.c
+@@ -21,7 +21,7 @@
+ 
+ #include <argp.h>
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <libelf.h>
+ #include <libintl.h>
+Index: elfutils-0.164/src/ldgeneric.c
+===================================================================
+--- elfutils-0.164.orig/src/ldgeneric.c
++++ elfutils-0.164/src/ldgeneric.c
+@@ -23,7 +23,7 @@
+ #include <ctype.h>
+ #include <dlfcn.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+ #include <gelf.h>
+Index: elfutils-0.164/src/ldlex.c
+===================================================================
+--- elfutils-0.164.orig/src/ldlex.c
++++ elfutils-0.164/src/ldlex.c
+@@ -1099,7 +1099,7 @@ char *ldtext;
+ #include <assert.h>
+ #include <ctype.h>
+ #include <elf.h>
+-#include <error.h>
++#include <err.h>
+ #include <inttypes.h>
+ #include <libintl.h>
+ #include <stdbool.h>
+Index: elfutils-0.164/src/ldscript.c
+===================================================================
+--- elfutils-0.164.orig/src/ldscript.c
++++ elfutils-0.164/src/ldscript.c
+@@ -95,7 +95,7 @@
+ #endif
+ 
+ #include <assert.h>
+-#include <error.h>
++#include <err.h>
+ #include <libintl.h>
+ #include <stdbool.h>
+ #include <stdint.h>
+Index: elfutils-0.164/src/nm.c
+===================================================================
+--- elfutils-0.164.orig/src/nm.c
++++ elfutils-0.164/src/nm.c
+@@ -26,7 +26,7 @@
+ #include <ctype.h>
+ #include <dwarf.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/src/objdump.c
+===================================================================
+--- elfutils-0.164.orig/src/objdump.c
++++ elfutils-0.164/src/objdump.c
+@@ -21,7 +21,7 @@
+ #endif
+ 
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <libintl.h>
+Index: elfutils-0.164/src/ranlib.c
+===================================================================
+--- elfutils-0.164.orig/src/ranlib.c
++++ elfutils-0.164/src/ranlib.c
+@@ -24,7 +24,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libintl.h>
+Index: elfutils-0.164/src/readelf.c
+===================================================================
+--- elfutils-0.164.orig/src/readelf.c
++++ elfutils-0.164/src/readelf.c
+@@ -25,7 +25,7 @@
+ #include <ctype.h>
+ #include <dwarf.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/src/size.c
+===================================================================
+--- elfutils-0.164.orig/src/size.c
++++ elfutils-0.164/src/size.c
+@@ -21,7 +21,7 @@
+ #endif
+ 
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/src/stack.c
+===================================================================
+--- elfutils-0.164.orig/src/stack.c
++++ elfutils-0.164/src/stack.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ #include <assert.h>
+ #include <argp.h>
+-#include <error.h>
++#include <err.h>
+ #include <stdlib.h>
+ #include <inttypes.h>
+ #include <stdio.h>
+Index: elfutils-0.164/src/strings.c
+===================================================================
+--- elfutils-0.164.orig/src/strings.c
++++ elfutils-0.164/src/strings.c
+@@ -25,7 +25,7 @@
+ #include <ctype.h>
+ #include <endian.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/src/strip.c
+===================================================================
+--- elfutils-0.164.orig/src/strip.c
++++ elfutils-0.164/src/strip.c
+@@ -24,7 +24,7 @@
+ #include <assert.h>
+ #include <byteswap.h>
+ #include <endian.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <libelf.h>
+Index: elfutils-0.164/src/unstrip.c
+===================================================================
+--- elfutils-0.164.orig/src/unstrip.c
++++ elfutils-0.164/src/unstrip.c
+@@ -31,7 +31,7 @@
+ #include <argp.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+ #include <libintl.h>
+Index: elfutils-0.164/tests/addrscopes.c
+===================================================================
+--- elfutils-0.164.orig/tests/addrscopes.c
++++ elfutils-0.164/tests/addrscopes.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ 
+ 
+Index: elfutils-0.164/tests/allregs.c
+===================================================================
+--- elfutils-0.164.orig/tests/allregs.c
++++ elfutils-0.164/tests/allregs.c
+@@ -21,7 +21,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <argp.h>
+ #include <assert.h>
+Index: elfutils-0.164/tests/backtrace-data.c
+===================================================================
+--- elfutils-0.164.orig/tests/backtrace-data.c
++++ elfutils-0.164/tests/backtrace-data.c
+@@ -27,7 +27,7 @@
+ #include <dirent.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <dwarf.h>
+ #if defined(__x86_64__) && defined(__linux__)
+Index: elfutils-0.164/tests/backtrace-dwarf.c
+===================================================================
+--- elfutils-0.164.orig/tests/backtrace-dwarf.c
++++ elfutils-0.164/tests/backtrace-dwarf.c
+@@ -22,7 +22,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <sys/ptrace.h>
+ #include <sys/types.h>
+Index: elfutils-0.164/tests/backtrace.c
+===================================================================
+--- elfutils-0.164.orig/tests/backtrace.c
++++ elfutils-0.164/tests/backtrace.c
+@@ -24,7 +24,7 @@
+ #include <dirent.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <dwarf.h>
+ #ifdef __linux__
+Index: elfutils-0.164/tests/buildid.c
+===================================================================
+--- elfutils-0.164.orig/tests/buildid.c
++++ elfutils-0.164/tests/buildid.c
+@@ -23,7 +23,7 @@
+ #include ELFUTILS_HEADER(elf)
+ #include ELFUTILS_HEADER(dwelf)
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+Index: elfutils-0.164/tests/debugaltlink.c
+===================================================================
+--- elfutils-0.164.orig/tests/debugaltlink.c
++++ elfutils-0.164/tests/debugaltlink.c
+@@ -23,7 +23,7 @@
+ #include ELFUTILS_HEADER(dw)
+ #include ELFUTILS_HEADER(dwelf)
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+Index: elfutils-0.164/tests/debuglink.c
+===================================================================
+--- elfutils-0.164.orig/tests/debuglink.c
++++ elfutils-0.164/tests/debuglink.c
+@@ -21,7 +21,7 @@
+ #include <errno.h>
+ #include ELFUTILS_HEADER(dwelf)
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/types.h>
+Index: elfutils-0.164/tests/deleted.c
+===================================================================
+--- elfutils-0.164.orig/tests/deleted.c
++++ elfutils-0.164/tests/deleted.c
+@@ -21,7 +21,7 @@
+ #include <unistd.h>
+ #include <assert.h>
+ #include <stdio.h>
+-#include <error.h>
++#include <err.h>
+ #include <errno.h>
+ #ifdef __linux__
+ #include <sys/prctl.h>
+Index: elfutils-0.164/tests/dwfl-addr-sect.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfl-addr-sect.c
++++ elfutils-0.164/tests/dwfl-addr-sect.c
+@@ -23,7 +23,7 @@
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <argp.h>
+ #include ELFUTILS_HEADER(dwfl)
+Index: elfutils-0.164/tests/dwfl-bug-addr-overflow.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfl-bug-addr-overflow.c
++++ elfutils-0.164/tests/dwfl-bug-addr-overflow.c
+@@ -20,7 +20,7 @@
+ #include <inttypes.h>
+ #include <stdio.h>
+ #include <stdio_ext.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include ELFUTILS_HEADER(dwfl)
+ 
+Index: elfutils-0.164/tests/dwfl-bug-fd-leak.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfl-bug-fd-leak.c
++++ elfutils-0.164/tests/dwfl-bug-fd-leak.c
+@@ -24,7 +24,7 @@
+ #include <dirent.h>
+ #include <stdlib.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <unistd.h>
+ #include <dwarf.h>
+ #include <sys/resource.h>
+Index: elfutils-0.164/tests/dwfl-bug-getmodules.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfl-bug-getmodules.c
++++ elfutils-0.164/tests/dwfl-bug-getmodules.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ #include ELFUTILS_HEADER(dwfl)
+ 
+-#include <error.h>
++#include <err.h>
+ 
+ static const Dwfl_Callbacks callbacks =
+   {
+Index: elfutils-0.164/tests/dwfl-report-elf-align.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfl-report-elf-align.c
++++ elfutils-0.164/tests/dwfl-report-elf-align.c
+@@ -20,7 +20,7 @@
+ #include <inttypes.h>
+ #include <stdio.h>
+ #include <stdio_ext.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <string.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/tests/dwfllines.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwfllines.c
++++ elfutils-0.164/tests/dwfllines.c
+@@ -27,7 +27,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ 
+ int
+ main (int argc, char *argv[])
+Index: elfutils-0.164/tests/dwflmodtest.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwflmodtest.c
++++ elfutils-0.164/tests/dwflmodtest.c
+@@ -23,7 +23,7 @@
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ #include <locale.h>
+ #include <argp.h>
+ #include ELFUTILS_HEADER(dwfl)
+Index: elfutils-0.164/tests/dwflsyms.c
+===================================================================
+--- elfutils-0.164.orig/tests/dwflsyms.c
++++ elfutils-0.164/tests/dwflsyms.c
+@@ -25,7 +25,7 @@
+ #include <stdio.h>
+ #include <stdio_ext.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ 
+ static const char *
+Index: elfutils-0.164/tests/early-offscn.c
+===================================================================
+--- elfutils-0.164.orig/tests/early-offscn.c
++++ elfutils-0.164/tests/early-offscn.c
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <stdio.h>
+Index: elfutils-0.164/tests/ecp.c
+===================================================================
+--- elfutils-0.164.orig/tests/ecp.c
++++ elfutils-0.164/tests/ecp.c
+@@ -20,7 +20,7 @@
+ #endif
+ 
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <stdlib.h>
+Index: elfutils-0.164/tests/find-prologues.c
+===================================================================
+--- elfutils-0.164.orig/tests/find-prologues.c
++++ elfutils-0.164/tests/find-prologues.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+ 
+Index: elfutils-0.164/tests/funcretval.c
+===================================================================
+--- elfutils-0.164.orig/tests/funcretval.c
++++ elfutils-0.164/tests/funcretval.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+ 
+Index: elfutils-0.164/tests/funcscopes.c
+===================================================================
+--- elfutils-0.164.orig/tests/funcscopes.c
++++ elfutils-0.164/tests/funcscopes.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+ 
+Index: elfutils-0.164/tests/getsrc_die.c
+===================================================================
+--- elfutils-0.164.orig/tests/getsrc_die.c
++++ elfutils-0.164/tests/getsrc_die.c
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <libelf.h>
+Index: elfutils-0.164/tests/line2addr.c
+===================================================================
+--- elfutils-0.164.orig/tests/line2addr.c
++++ elfutils-0.164/tests/line2addr.c
+@@ -26,7 +26,7 @@
+ #include <locale.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ 
+ 
+ static void
+Index: elfutils-0.164/tests/low_high_pc.c
+===================================================================
+--- elfutils-0.164.orig/tests/low_high_pc.c
++++ elfutils-0.164/tests/low_high_pc.c
+@@ -25,7 +25,7 @@
+ #include <stdio_ext.h>
+ #include <locale.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <fnmatch.h>
+ 
+Index: elfutils-0.164/tests/md5-sha1-test.c
+===================================================================
+--- elfutils-0.164.orig/tests/md5-sha1-test.c
++++ elfutils-0.164/tests/md5-sha1-test.c
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ #include <string.h>
+-#include <error.h>
++#include <err.h>
+ 
+ #include "md5.h"
+ #include "sha1.h"
+Index: elfutils-0.164/tests/rdwrmmap.c
+===================================================================
+--- elfutils-0.164.orig/tests/rdwrmmap.c
++++ elfutils-0.164/tests/rdwrmmap.c
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+Index: elfutils-0.164/tests/saridx.c
+===================================================================
+--- elfutils-0.164.orig/tests/saridx.c
++++ elfutils-0.164/tests/saridx.c
+@@ -17,7 +17,7 @@
+ 
+ #include <config.h>
+ 
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <stdio.h>
+Index: elfutils-0.164/tests/sectiondump.c
+===================================================================
+--- elfutils-0.164.orig/tests/sectiondump.c
++++ elfutils-0.164/tests/sectiondump.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ 
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <fcntl.h>
+ #include <gelf.h>
+ #include <inttypes.h>
+Index: elfutils-0.164/tests/varlocs.c
+===================================================================
+--- elfutils-0.164.orig/tests/varlocs.c
++++ elfutils-0.164/tests/varlocs.c
+@@ -25,7 +25,7 @@
+ #include <dwarf.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <error.h>
++#include <err.h>
+ #include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+Index: elfutils-0.164/tests/vdsosyms.c
+===================================================================
+--- elfutils-0.164.orig/tests/vdsosyms.c
++++ elfutils-0.164/tests/vdsosyms.c
+@@ -18,7 +18,7 @@
+ #include <config.h>
+ #include <assert.h>
+ #include <errno.h>
+-#include <error.h>
++#include <err.h>
+ #include <inttypes.h>
+ #include <stdio.h>
+ #include <string.h>
+Index: elfutils-0.164/libelf/elf_getarsym.c
+===================================================================
+--- elfutils-0.164.orig/libelf/elf_getarsym.c
++++ elfutils-0.164/libelf/elf_getarsym.c
+@@ -302,7 +302,7 @@ elf_getarsym (Elf *elf, size_t *ptr)
+ 		arsym[cnt].as_off = (*u32)[cnt];
+ 
+ 	      arsym[cnt].as_hash = _dl_elf_hash (str_data);
+-	      str_data = rawmemchr (str_data, '\0') + 1;
++	      str_data = memchr (str_data, '\0', SIZE_MAX) + 1;
+ 	    }
+ 
+ 	  /* At the end a special entry.  */
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
rename to yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-fix-a-stack-usage-warning.patch
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/0001-fix-a-stack-usage-warning.patch
rename to yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-fix-a-stack-usage-warning.patch
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/0001-remove-the-unneed-checking.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-remove-the-unneed-checking.patch
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/0001-remove-the-unneed-checking.patch
rename to yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0001-remove-the-unneed-checking.patch
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
new file mode 100644
index 0000000..72125c9
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0002-Add-support-for-mips64-abis-in-mips_retval.c.patch
@@ -0,0 +1,168 @@
+From fdaab18a65ed2529656baa64cb6169f34d7e507b Mon Sep 17 00:00:00 2001
+From: James Cowgill <james410@cowgill.org.uk>
+Date: Mon, 5 Jan 2015 15:17:01 +0000
+Subject: [PATCH 2/3] Add support for mips64 abis in mips_retval.c
+
+Signed-off-by: James Cowgill <james410@cowgill.org.uk>
+---
+ backends/mips_retval.c | 104 ++++++++++++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 94 insertions(+), 10 deletions(-)
+
+diff --git a/backends/mips_retval.c b/backends/mips_retval.c
+index 33f12a7..d5c6ef0 100644
+--- a/backends/mips_retval.c
++++ b/backends/mips_retval.c
+@@ -91,6 +91,8 @@ enum mips_abi find_mips_abi(Elf *elf)
+     default:
+       if ((elf_flags & EF_MIPS_ABI2))
+ 	return MIPS_ABI_N32;
++      else if ((ehdr->e_ident[EI_CLASS] == ELFCLASS64))
++	return MIPS_ABI_N64;
+     }
+ 
+   /* GCC creates a pseudo-section whose name describes the ABI.  */
+@@ -195,6 +197,57 @@ static const Dwarf_Op loc_aggregate[] =
+   };
+ #define nloc_aggregate 1
+ 
++/* Test if a struct member is a float */
++static int is_float_child(Dwarf_Die *childdie)
++{
++  /* Test if this is actually a struct member */
++  if (dwarf_tag(childdie) != DW_TAG_member)
++    return 0;
++
++  /* Get type of member */
++  Dwarf_Attribute attr_mem;
++  Dwarf_Die child_type_mem;
++  Dwarf_Die *child_typedie =
++    dwarf_formref_die(dwarf_attr_integrate(childdie,
++                                           DW_AT_type,
++                                           &attr_mem), &child_type_mem);
++
++  if (dwarf_tag(child_typedie) != DW_TAG_base_type)
++    return 0;
++
++  /* Get base subtype */
++  Dwarf_Word encoding;
++  if (dwarf_formudata (dwarf_attr_integrate (child_typedie,
++                                             DW_AT_encoding,
++                                             &attr_mem), &encoding) != 0)
++    return 0;
++
++  return encoding == DW_ATE_float;
++}
++
++/* Returns the number of fpregs which can be returned in the given struct */
++static int get_struct_fpregs(Dwarf_Die *structtypedie)
++{
++  Dwarf_Die child_mem;
++  int fpregs = 0;
++
++  /* Get first structure member */
++  if (dwarf_child(structtypedie, &child_mem) != 0)
++    return 0;
++
++  do
++    {
++      /* Ensure this register is a float */
++      if (!is_float_child(&child_mem))
++        return 0;
++
++      fpregs++;
++    }
++  while (dwarf_siblingof (&child_mem, &child_mem) == 0);
++
++  return fpregs;
++}
++
+ int
+ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ {
+@@ -240,6 +293,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+       tag = dwarf_tag (typedie);
+     }
+ 
++  Dwarf_Word size;
+   switch (tag)
+     {
+     case -1:
+@@ -258,8 +312,6 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+     case DW_TAG_enumeration_type:
+     case DW_TAG_pointer_type:
+     case DW_TAG_ptr_to_member_type:
+-      {
+-        Dwarf_Word size;
+ 	if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
+ 					 &attr_mem), &size) != 0)
+ 	  {
+@@ -289,7 +341,7 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 		if (size <= 4*regsize && abi == MIPS_ABI_O32)
+                   return nloc_fpregquad;
+ 
+-		goto aggregate;
++		goto large;
+ 	      }
+ 	  }
+ 	*locp = ABI_LOC(loc_intreg, regsize);
+@@ -298,18 +350,50 @@ mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
+ 	if (size <= 2*regsize)
+ 	  return nloc_intregpair;
+ 
+-	/* Else fall through. Shouldn't happen though (at least with gcc) */
+-      }
++	/* Else pass in memory. Shouldn't happen though (at least with gcc) */
++	goto large;
+ 
+     case DW_TAG_structure_type:
+     case DW_TAG_class_type:
+     case DW_TAG_union_type:
+-    case DW_TAG_array_type:
+-    aggregate:
+-      /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */
+-      if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64))
+-        return -2;
++      /* Handle special cases for structures <= 128 bytes in newer ABIs */
++      if (abi == MIPS_ABI_EABI32 || abi == MIPS_ABI_EABI64 ||
++          abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64)
++        {
++          if (dwarf_aggregate_size (typedie, &size) == 0 && size <= 16)
++            {
++              /*
++               * Special case in N64 / N32 -
++               * structures containing only floats are returned in fp regs.
++               * Everything else is returned in integer regs.
++               */
++              if (tag != DW_TAG_union_type &&
++                  (abi == MIPS_ABI_N32 || abi == MIPS_ABI_N64))
++                {
++                  int num_fpregs = get_struct_fpregs(typedie);
++                  if (num_fpregs == 1 || num_fpregs == 2)
++                    {
++                      *locp = loc_fpreg;
++                      if (num_fpregs == 1)
++                        return nloc_fpreg;
++                      else
++                        return nloc_fpregpair;
++                    }
++                }
++
++              *locp = loc_intreg;
++              if (size <= 8)
++                return nloc_intreg;
++              else
++                return nloc_intregpair;
++            }
++        }
++
++      /* Fallthrough to handle large types */
+ 
++    case DW_TAG_array_type:
++    large:
++      /* Return large structures in memory */
+       *locp = loc_aggregate;
+       return nloc_aggregate;
+     }
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch
new file mode 100644
index 0000000..14b7985
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/0003-Add-mips-n64-relocation-format-hack.patch
@@ -0,0 +1,226 @@
+From 59d4b8c48e5040af7e02b34eb26ea602ec82a38e Mon Sep 17 00:00:00 2001
+From: James Cowgill <james410@cowgill.org.uk>
+Date: Mon, 5 Jan 2015 15:17:02 +0000
+Subject: [PATCH 3/3] Add mips n64 relocation format hack
+
+MIPSEL N64 ELF files use a slightly different format for storing relocation
+entries which is incompatible with the normal R_SYM / R_INFO macros.
+To workaround this, we rearrange the bytes in the relocation's r_info field
+when reading and writing the relocations.
+
+This patch also ensures that strip.c sets the correct value of e_machine
+before manipulating relocations so that these changes take effect.
+
+Signed-off-by: James Cowgill <james410@cowgill.org.uk>
+---
+ libelf/gelf_getrel.c      | 25 +++++++++++++++++++++++--
+ libelf/gelf_getrela.c     | 25 +++++++++++++++++++++++--
+ libelf/gelf_update_rel.c  | 20 +++++++++++++++++++-
+ libelf/gelf_update_rela.c | 20 +++++++++++++++++++-
+ src/strip.c               | 17 +++++++++++++++++
+ 5 files changed, 101 insertions(+), 6 deletions(-)
+
+Index: elfutils-0.164/libelf/gelf_getrel.c
+===================================================================
+--- elfutils-0.164.orig/libelf/gelf_getrel.c
++++ elfutils-0.164/libelf/gelf_getrel.c
+@@ -36,6 +36,7 @@
+ 
+ #include "libelfP.h"
+ 
++#define EF_MIPS_ABI	0x0000F000
+ 
+ GElf_Rel *
+ gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst)
+@@ -89,8 +90,28 @@ gelf_getrel (Elf_Data *data, int ndx, GE
+ 	  result = NULL;
+ 	}
+       else
+-	result = memcpy (dst, &((Elf64_Rel *) data_scn->d.d_buf)[ndx],
+-			 sizeof (Elf64_Rel));
++        {
++          GElf_Ehdr hdr;
++          result = memcpy (dst, &((Elf64_Rel *) data_scn->d.d_buf)[ndx],
++                           sizeof (Elf64_Rel));
++
++          if (gelf_getehdr(scn->elf, &hdr) != NULL &&
++              hdr.e_ident[EI_DATA] == ELFDATA2LSB &&
++              hdr.e_machine == EM_MIPS &&
++              (hdr.e_flags & EF_MIPS_ABI) == 0)
++            {
++              /*
++               * The relocation format is mangled on MIPSEL N64
++               *  We'll adjust it so at least R_SYM will work on it
++               */
++              GElf_Xword r_info = dst->r_info;
++              dst->r_info = (r_info << 32) |
++                            ((r_info >> 8) & 0xFF000000) |
++                            ((r_info >> 24) & 0x00FF0000) |
++                            ((r_info >> 40) & 0x0000FF00) |
++                            ((r_info >> 56) & 0x000000FF);
++            }
++        }
+     }
+ 
+   rwlock_unlock (scn->elf->lock);
+Index: elfutils-0.164/libelf/gelf_getrela.c
+===================================================================
+--- elfutils-0.164.orig/libelf/gelf_getrela.c
++++ elfutils-0.164/libelf/gelf_getrela.c
+@@ -36,6 +36,7 @@
+ 
+ #include "libelfP.h"
+ 
++#define EF_MIPS_ABI	0x0000F000
+ 
+ GElf_Rela *
+ gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst)
+@@ -90,8 +91,28 @@ gelf_getrela (Elf_Data *data, int ndx, G
+ 	  result = NULL;
+ 	}
+       else
+-	result = memcpy (dst, &((Elf64_Rela *) data_scn->d.d_buf)[ndx],
+-			 sizeof (Elf64_Rela));
++        {
++          GElf_Ehdr hdr;
++          result = memcpy (dst, &((Elf64_Rela *) data_scn->d.d_buf)[ndx],
++                           sizeof (Elf64_Rela));
++
++          if (gelf_getehdr(scn->elf, &hdr) != NULL &&
++              hdr.e_ident[EI_DATA] == ELFDATA2LSB &&
++              hdr.e_machine == EM_MIPS &&
++              (hdr.e_flags & EF_MIPS_ABI) == 0)
++            {
++              /*
++               * The relocation format is mangled on MIPSEL N64
++               *  We'll adjust it so at least R_SYM will work on it
++               */
++              GElf_Xword r_info = dst->r_info;
++              dst->r_info = (r_info << 32) |
++                            ((r_info >> 8) & 0xFF000000) |
++                            ((r_info >> 24) & 0x00FF0000) |
++                            ((r_info >> 40) & 0x0000FF00) |
++                            ((r_info >> 56) & 0x000000FF);
++            }
++        }
+     }
+ 
+   rwlock_unlock (scn->elf->lock);
+Index: elfutils-0.164/libelf/gelf_update_rel.c
+===================================================================
+--- elfutils-0.164.orig/libelf/gelf_update_rel.c
++++ elfutils-0.164/libelf/gelf_update_rel.c
+@@ -36,6 +36,7 @@
+ 
+ #include "libelfP.h"
+ 
++#define EF_MIPS_ABI	0x0000F000
+ 
+ int
+ gelf_update_rel (Elf_Data *dst, int ndx, GElf_Rel *src)
+@@ -86,6 +87,9 @@ gelf_update_rel (Elf_Data *dst, int ndx,
+     }
+   else
+     {
++      GElf_Ehdr hdr;
++      GElf_Rel value = *src;
++
+       /* Check whether we have to resize the data buffer.  */
+       if (INVALID_NDX (ndx, Elf64_Rel, &data_scn->d))
+ 	{
+@@ -93,7 +97,21 @@ gelf_update_rel (Elf_Data *dst, int ndx,
+ 	  goto out;
+ 	}
+ 
+-      ((Elf64_Rel *) data_scn->d.d_buf)[ndx] = *src;
++      if (gelf_getehdr(scn->elf, &hdr) != NULL &&
++          hdr.e_ident[EI_DATA] == ELFDATA2LSB &&
++          hdr.e_machine == EM_MIPS &&
++          (hdr.e_flags & EF_MIPS_ABI) == 0)
++        {
++          /* Undo the MIPSEL N64 hack from gelf_getrel */
++          GElf_Xword r_info = value.r_info;
++          value.r_info = (r_info >> 32) |
++                         ((r_info << 8) &  0x000000FF00000000) |
++                         ((r_info << 24) & 0x0000FF0000000000) |
++                         ((r_info << 40) & 0x00FF000000000000) |
++                         ((r_info << 56) & 0xFF00000000000000);
++        }
++
++      ((Elf64_Rel *) data_scn->d.d_buf)[ndx] = value;
+     }
+ 
+   result = 1;
+Index: elfutils-0.164/libelf/gelf_update_rela.c
+===================================================================
+--- elfutils-0.164.orig/libelf/gelf_update_rela.c
++++ elfutils-0.164/libelf/gelf_update_rela.c
+@@ -36,6 +36,7 @@
+ 
+ #include "libelfP.h"
+ 
++#define EF_MIPS_ABI	0x0000F000
+ 
+ int
+ gelf_update_rela (Elf_Data *dst, int ndx, GElf_Rela *src)
+@@ -89,6 +90,9 @@ gelf_update_rela (Elf_Data *dst, int ndx
+     }
+   else
+     {
++      GElf_Ehdr hdr;
++      GElf_Rela value = *src;
++
+       /* Check whether we have to resize the data buffer.  */
+       if (INVALID_NDX (ndx, Elf64_Rela, &data_scn->d))
+ 	{
+@@ -96,7 +100,21 @@ gelf_update_rela (Elf_Data *dst, int ndx
+ 	  goto out;
+ 	}
+ 
+-      ((Elf64_Rela *) data_scn->d.d_buf)[ndx] = *src;
++      if (gelf_getehdr(scn->elf, &hdr) != NULL &&
++          hdr.e_ident[EI_DATA] == ELFDATA2LSB &&
++          hdr.e_machine == EM_MIPS &&
++          (hdr.e_flags & EF_MIPS_ABI) == 0)
++        {
++          /* Undo the MIPSEL N64 hack from gelf_getrel */
++          GElf_Xword r_info = value.r_info;
++          value.r_info = (r_info >> 32) |
++                         ((r_info << 8) &  0x000000FF00000000) |
++                         ((r_info << 24) & 0x0000FF0000000000) |
++                         ((r_info << 40) & 0x00FF000000000000) |
++                         ((r_info << 56) & 0xFF00000000000000);
++        }
++
++      ((Elf64_Rela *) data_scn->d.d_buf)[ndx] = value;
+     }
+ 
+   result = 1;
+Index: elfutils-0.164/src/strip.c
+===================================================================
+--- elfutils-0.164.orig/src/strip.c
++++ elfutils-0.164/src/strip.c
+@@ -546,6 +546,23 @@ handle_elf (int fd, Elf *elf, const char
+       goto fail;
+     }
+ 
++  /* Copy identity part of the ELF header now */
++  newehdr = gelf_getehdr (newelf, &newehdr_mem);
++  if (newehdr == NULL)
++    INTERNAL_ERROR (fname);
++
++  memcpy (newehdr->e_ident, ehdr->e_ident, EI_NIDENT);
++  newehdr->e_type = ehdr->e_type;
++  newehdr->e_machine = ehdr->e_machine;
++  newehdr->e_version = ehdr->e_version;
++
++  if (gelf_update_ehdr (newelf, newehdr) == 0)
++    {
++      error (0, 0, gettext ("%s: error while creating ELF header: %s"),
++	     fname, elf_errmsg (-1));
++      return 1;
++    }
++
+   /* Copy over the old program header if needed.  */
+   if (ehdr->e_type != ET_REL)
+     for (cnt = 0; cnt < phnum; ++cnt)
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch
new file mode 100644
index 0000000..38dc57b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/aarch64_uio.patch
@@ -0,0 +1,47 @@
+Fix build on aarch64/musl
+
+Errors
+
+invalid operands to binary & (have 'long double' and 'unsigned int')
+
+error: redefinition
+ of 'struct iovec'
+ struct iovec { void *iov_base; size_t iov_len; };
+        ^
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: elfutils-0.163/backends/aarch64_initreg.c
+===================================================================
+--- elfutils-0.163.orig/backends/aarch64_initreg.c
++++ elfutils-0.163/backends/aarch64_initreg.c
+@@ -33,7 +33,7 @@
+ #include "system.h"
+ #include <assert.h>
+ #ifdef __aarch64__
+-# include <linux/uio.h>
++# include <sys/uio.h>
+ # include <sys/user.h>
+ # include <sys/ptrace.h>
+ /* Deal with old glibc defining user_pt_regs instead of user_regs_struct.  */
+@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t
+ 
+   Dwarf_Word dwarf_fregs[32];
+   for (int r = 0; r < 32; r++)
+-    dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF;
++    dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF;
+ 
+   if (! setfunc (64, 32, dwarf_fregs, arg))
+     return false;
+Index: elfutils-0.163/backends/arm_initreg.c
+===================================================================
+--- elfutils-0.163.orig/backends/arm_initreg.c
++++ elfutils-0.163/backends/arm_initreg.c
+@@ -37,7 +37,7 @@
+ #endif
+ 
+ #ifdef __aarch64__
+-# include <linux/uio.h>
++# include <sys/uio.h>
+ # include <sys/user.h>
+ # include <sys/ptrace.h>
+ /* Deal with old glibc defining user_pt_regs instead of user_regs_struct.  */
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff
new file mode 100644
index 0000000..9d47f95
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/arm_backend.diff
@@ -0,0 +1,600 @@
+Index: elfutils-0.164/backends/arm_init.c
+===================================================================
+--- elfutils-0.164.orig/backends/arm_init.c
++++ elfutils-0.164/backends/arm_init.c
+@@ -35,20 +35,31 @@
+ #define RELOC_PREFIX	R_ARM_
+ #include "libebl_CPU.h"
+ 
++#include "libebl_arm.h"
++
+ /* This defines the common reloc hooks based on arm_reloc.def.  */
+ #include "common-reloc.c"
+ 
+ 
+ const char *
+-arm_init (Elf *elf __attribute__ ((unused)),
++arm_init (Elf *elf,
+ 	  GElf_Half machine __attribute__ ((unused)),
+ 	  Ebl *eh,
+ 	  size_t ehlen)
+ {
++  int soft_float = 0;
++
+   /* Check whether the Elf_BH object has a sufficent size.  */
+   if (ehlen < sizeof (Ebl))
+     return NULL;
+ 
++  if (elf) {
++    GElf_Ehdr ehdr_mem;
++    GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
++    if (ehdr && (ehdr->e_flags & EF_ARM_SOFT_FLOAT))
++      soft_float = 1;
++  }
++
+   /* We handle it.  */
+   eh->name = "ARM";
+   arm_init_reloc (eh);
+@@ -60,7 +71,10 @@ arm_init (Elf *elf __attribute__ ((unuse
+   HOOK (eh, core_note);
+   HOOK (eh, auxv_info);
+   HOOK (eh, check_object_attribute);
+-  HOOK (eh, return_value_location);
++  if (soft_float)
++    eh->return_value_location = arm_return_value_location_soft;
++  else
++    eh->return_value_location = arm_return_value_location_hard;
+   HOOK (eh, abi_cfi);
+   HOOK (eh, check_reloc_target_type);
+   HOOK (eh, symbol_type_name);
+Index: elfutils-0.164/backends/arm_regs.c
+===================================================================
+--- elfutils-0.164.orig/backends/arm_regs.c
++++ elfutils-0.164/backends/arm_regs.c
+@@ -31,6 +31,7 @@
+ #endif
+ 
+ #include <string.h>
++#include <stdio.h>
+ #include <dwarf.h>
+ 
+ #define BACKEND arm_
+@@ -76,6 +77,9 @@ arm_register_info (Ebl *ebl __attribute_
+       break;
+ 
+     case 16 + 0 ... 16 + 7:
++      /* AADWARF says that there are no registers in that range,
++       * but gcc maps FPA registers here
++       */
+       regno += 96 - 16;
+       /* Fall through.  */
+     case 96 + 0 ... 96 + 7:
+@@ -87,11 +91,139 @@ arm_register_info (Ebl *ebl __attribute_
+       namelen = 2;
+       break;
+ 
++    case 64 + 0 ... 64 + 9:
++      *setname = "VFP";
++      *bits = 32;
++      *type = DW_ATE_float;
++      name[0] = 's';
++      name[1] = regno - 64 + '0';
++      namelen = 2;
++      break;
++
++    case 64 + 10 ... 64 + 31:
++      *setname = "VFP";
++      *bits = 32;
++      *type = DW_ATE_float;
++      name[0] = 's';
++      name[1] = (regno - 64) / 10 + '0';
++      name[2] = (regno - 64) % 10 + '0';
++      namelen = 3;
++      break;
++
++    case 104 + 0 ... 104 + 7:
++      /* XXX TODO:
++       * This can be either intel wireless MMX general purpose/control
++       * registers or xscale accumulator, which have different usage.
++       * We only have the intel wireless MMX here now.
++       * The name needs to be changed for the xscale accumulator too. */
++      *setname = "MMX";
++      *type = DW_ATE_unsigned;
++      *bits = 32;
++      memcpy(name, "wcgr", 4);
++      name[4] = regno - 104 + '0';
++      namelen = 5;
++      break;
++
++    case 112 + 0 ... 112 + 9:
++      *setname = "MMX";
++      *type = DW_ATE_unsigned;
++      *bits = 64;
++      name[0] = 'w';
++      name[1] = 'r';
++      name[2] = regno - 112 + '0';
++      namelen = 3;
++      break;
++
++    case 112 + 10 ... 112 + 15:
++      *setname = "MMX";
++      *type = DW_ATE_unsigned;
++      *bits = 64;
++      name[0] = 'w';
++      name[1] = 'r';
++      name[2] = '1';
++      name[3] = regno - 112 - 10 + '0';
++      namelen = 4;
++      break;
++
+     case 128:
++      *setname = "state";
+       *type = DW_ATE_unsigned;
+       return stpcpy (name, "spsr") + 1 - name;
+ 
++    case 129:
++      *setname = "state";
++      *type = DW_ATE_unsigned;
++      return stpcpy(name, "spsr_fiq") + 1 - name;
++
++    case 130:
++      *setname = "state";
++      *type = DW_ATE_unsigned;
++      return stpcpy(name, "spsr_irq") + 1 - name;
++
++    case 131:
++      *setname = "state";
++      *type = DW_ATE_unsigned;
++      return stpcpy(name, "spsr_abt") + 1 - name;
++
++    case 132:
++      *setname = "state";
++      *type = DW_ATE_unsigned;
++      return stpcpy(name, "spsr_und") + 1 - name;
++
++    case 133:
++      *setname = "state";
++      *type = DW_ATE_unsigned;
++      return stpcpy(name, "spsr_svc") + 1 - name;
++
++    case 144 ... 150:
++      *setname = "integer";
++      *type = DW_ATE_signed;
++      *bits = 32;
++      return sprintf(name, "r%d_usr", regno - 144 + 8) + 1;
++
++    case 151 ... 157:
++      *setname = "integer";
++      *type = DW_ATE_signed;
++      *bits = 32;
++      return sprintf(name, "r%d_fiq", regno - 151 + 8) + 1;
++
++    case 158 ... 159:
++      *setname = "integer";
++      *type = DW_ATE_signed;
++      *bits = 32;
++      return sprintf(name, "r%d_irq", regno - 158 + 13) + 1;
++
++    case 160 ... 161:
++      *setname = "integer";
++      *type = DW_ATE_signed;
++      *bits = 32;
++      return sprintf(name, "r%d_abt", regno - 160 + 13) + 1;
++
++    case 162 ... 163:
++      *setname = "integer";
++      *type = DW_ATE_signed;
++      *bits = 32;
++      return sprintf(name, "r%d_und", regno - 162 + 13) + 1;
++
++    case 164 ... 165:
++      *setname = "integer";
++      *type = DW_ATE_signed;
++      *bits = 32;
++      return sprintf(name, "r%d_svc", regno - 164 + 13) + 1;
++
++    case 192 ... 199:
++     *setname = "MMX";
++      *bits = 32;
++      *type = DW_ATE_unsigned;
++      name[0] = 'w';
++      name[1] = 'c';
++      name[2] = regno - 192 + '0';
++      namelen = 3;
++      break;
++
+     case 256 + 0 ... 256 + 9:
++      /* XXX TODO: Neon also uses those registers and can contain
++       * both float and integers */
+       *setname = "VFP";
+       *type = DW_ATE_float;
+       *bits = 64;
+Index: elfutils-0.164/backends/arm_retval.c
+===================================================================
+--- elfutils-0.164.orig/backends/arm_retval.c
++++ elfutils-0.164/backends/arm_retval.c
+@@ -48,6 +48,13 @@ static const Dwarf_Op loc_intreg[] =
+ #define nloc_intreg	1
+ #define nloc_intregs(n)	(2 * (n))
+ 
++/* f1  */ /* XXX TODO: f0 can also have number 96 if program was compiled with -mabi=aapcs */
++static const Dwarf_Op loc_fpreg[] =
++  {
++    { .atom = DW_OP_reg16 },
++  };
++#define nloc_fpreg  1
++
+ /* The return value is a structure and is actually stored in stack space
+    passed in a hidden argument by the caller.  But, the compiler
+    helpfully returns the address of that space in r0.  */
+@@ -58,8 +65,9 @@ static const Dwarf_Op loc_aggregate[] =
+ #define nloc_aggregate 1
+ 
+ 
+-int
+-arm_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++static int
++arm_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp,
++		            int soft_float)
+ {
+   /* Start with the function's type, and get the DW_AT_type attribute,
+      which is the type of the return value.  */
+@@ -98,6 +106,21 @@ arm_return_value_location (Dwarf_Die *fu
+ 	    else
+ 	      return -1;
+ 	  }
++	if (tag == DW_TAG_base_type)
++	  {
++	    Dwarf_Word encoding;
++	    if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
++				 &attr_mem), &encoding) != 0)
++	      return -1;
++
++	    if ((encoding == DW_ATE_float) && !soft_float)
++	      {
++		*locp = loc_fpreg;
++		if (size <= 8)
++		  return nloc_fpreg;
++		goto aggregate;
++	      }
++	  }
+ 	if (size <= 16)
+ 	  {
+ 	  intreg:
+@@ -106,6 +129,7 @@ arm_return_value_location (Dwarf_Die *fu
+ 	  }
+ 
+       aggregate:
++	/* XXX TODO sometimes aggregates are returned in r0 (-mabi=aapcs) */
+ 	*locp = loc_aggregate;
+ 	return nloc_aggregate;
+       }
+@@ -125,3 +149,18 @@ arm_return_value_location (Dwarf_Die *fu
+      DWARF and might be valid.  */
+   return -2;
+ }
++
++/* return location for -mabi=apcs-gnu -msoft-float */
++int
++arm_return_value_location_soft (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++   return arm_return_value_location_ (functypedie, locp, 1);
++}
++
++/* return location for -mabi=apcs-gnu -mhard-float (current default) */
++int
++arm_return_value_location_hard (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++   return arm_return_value_location_ (functypedie, locp, 0);
++}
++
+Index: elfutils-0.164/libelf/elf.h
+===================================================================
+--- elfutils-0.164.orig/libelf/elf.h
++++ elfutils-0.164/libelf/elf.h
+@@ -2450,6 +2450,9 @@ enum
+ #define EF_ARM_EABI_VER4	0x04000000
+ #define EF_ARM_EABI_VER5	0x05000000
+ 
++/* EI_OSABI values */
++#define ELFOSABI_ARM_AEABI    64      /* Contains symbol versioning. */
++
+ /* Additional symbol types for Thumb.  */
+ #define STT_ARM_TFUNC		STT_LOPROC /* A Thumb function.  */
+ #define STT_ARM_16BIT		STT_HIPROC /* A Thumb label.  */
+@@ -2467,12 +2470,19 @@ enum
+ 
+ /* Processor specific values for the Phdr p_type field.  */
+ #define PT_ARM_EXIDX		(PT_LOPROC + 1)	/* ARM unwind segment.  */
++#define PT_ARM_UNWIND		PT_ARM_EXIDX
+ 
+ /* Processor specific values for the Shdr sh_type field.  */
+ #define SHT_ARM_EXIDX		(SHT_LOPROC + 1) /* ARM unwind section.  */
+ #define SHT_ARM_PREEMPTMAP	(SHT_LOPROC + 2) /* Preemption details.  */
+ #define SHT_ARM_ATTRIBUTES	(SHT_LOPROC + 3) /* ARM attributes section.  */
+ 
++/* Processor specific values for the Dyn d_tag field.  */
++#define DT_ARM_RESERVED1	(DT_LOPROC + 0)
++#define DT_ARM_SYMTABSZ		(DT_LOPROC + 1)
++#define DT_ARM_PREEMTMAB	(DT_LOPROC + 2)
++#define DT_ARM_RESERVED2	(DT_LOPROC + 3)
++#define DT_ARM_NUM		4
+ 
+ /* AArch64 relocs.  */
+ 
+@@ -2765,6 +2775,7 @@ enum
+ 					   TLS block (LDR, STR).  */
+ #define R_ARM_TLS_IE12GP	111	/* 12 bit GOT entry relative
+ 					   to GOT origin (LDR).  */
++/* 112 - 127 private range */
+ #define R_ARM_ME_TOO		128	/* Obsolete.  */
+ #define R_ARM_THM_TLS_DESCSEQ	129
+ #define R_ARM_THM_TLS_DESCSEQ16	129
+Index: elfutils-0.164/backends/libebl_arm.h
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/libebl_arm.h
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_ARM_H
++#define _LIBEBL_ARM_H 1
++
++#include <libdw.h>
++
++extern int arm_return_value_location_soft(Dwarf_Die *, const Dwarf_Op **locp);
++extern int arm_return_value_location_hard(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+Index: elfutils-0.164/tests/run-allregs.sh
+===================================================================
+--- elfutils-0.164.orig/tests/run-allregs.sh
++++ elfutils-0.164/tests/run-allregs.sh
+@@ -2672,7 +2672,28 @@ integer registers:
+ 	 13: sp (sp), address 32 bits
+ 	 14: lr (lr), address 32 bits
+ 	 15: pc (pc), address 32 bits
+-	128: spsr (spsr), unsigned 32 bits
++	144: r8_usr (r8_usr), signed 32 bits
++	145: r9_usr (r9_usr), signed 32 bits
++	146: r10_usr (r10_usr), signed 32 bits
++	147: r11_usr (r11_usr), signed 32 bits
++	148: r12_usr (r12_usr), signed 32 bits
++	149: r13_usr (r13_usr), signed 32 bits
++	150: r14_usr (r14_usr), signed 32 bits
++	151: r8_fiq (r8_fiq), signed 32 bits
++	152: r9_fiq (r9_fiq), signed 32 bits
++	153: r10_fiq (r10_fiq), signed 32 bits
++	154: r11_fiq (r11_fiq), signed 32 bits
++	155: r12_fiq (r12_fiq), signed 32 bits
++	156: r13_fiq (r13_fiq), signed 32 bits
++	157: r14_fiq (r14_fiq), signed 32 bits
++	158: r13_irq (r13_irq), signed 32 bits
++	159: r14_irq (r14_irq), signed 32 bits
++	160: r13_abt (r13_abt), signed 32 bits
++	161: r14_abt (r14_abt), signed 32 bits
++	162: r13_und (r13_und), signed 32 bits
++	163: r14_und (r14_und), signed 32 bits
++	164: r13_svc (r13_svc), signed 32 bits
++	165: r14_svc (r14_svc), signed 32 bits
+ FPA registers:
+ 	 16: f0 (f0), float 96 bits
+ 	 17: f1 (f1), float 96 bits
+@@ -2690,7 +2711,72 @@ FPA registers:
+ 	101: f5 (f5), float 96 bits
+ 	102: f6 (f6), float 96 bits
+ 	103: f7 (f7), float 96 bits
++MMX registers:
++	104: wcgr0 (wcgr0), unsigned 32 bits
++	105: wcgr1 (wcgr1), unsigned 32 bits
++	106: wcgr2 (wcgr2), unsigned 32 bits
++	107: wcgr3 (wcgr3), unsigned 32 bits
++	108: wcgr4 (wcgr4), unsigned 32 bits
++	109: wcgr5 (wcgr5), unsigned 32 bits
++	110: wcgr6 (wcgr6), unsigned 32 bits
++	111: wcgr7 (wcgr7), unsigned 32 bits
++	112: wr0 (wr0), unsigned 64 bits
++	113: wr1 (wr1), unsigned 64 bits
++	114: wr2 (wr2), unsigned 64 bits
++	115: wr3 (wr3), unsigned 64 bits
++	116: wr4 (wr4), unsigned 64 bits
++	117: wr5 (wr5), unsigned 64 bits
++	118: wr6 (wr6), unsigned 64 bits
++	119: wr7 (wr7), unsigned 64 bits
++	120: wr8 (wr8), unsigned 64 bits
++	121: wr9 (wr9), unsigned 64 bits
++	122: wr10 (wr10), unsigned 64 bits
++	123: wr11 (wr11), unsigned 64 bits
++	124: wr12 (wr12), unsigned 64 bits
++	125: wr13 (wr13), unsigned 64 bits
++	126: wr14 (wr14), unsigned 64 bits
++	127: wr15 (wr15), unsigned 64 bits
++	192: wc0 (wc0), unsigned 32 bits
++	193: wc1 (wc1), unsigned 32 bits
++	194: wc2 (wc2), unsigned 32 bits
++	195: wc3 (wc3), unsigned 32 bits
++	196: wc4 (wc4), unsigned 32 bits
++	197: wc5 (wc5), unsigned 32 bits
++	198: wc6 (wc6), unsigned 32 bits
++	199: wc7 (wc7), unsigned 32 bits
+ VFP registers:
++	 64: s0 (s0), float 32 bits
++	 65: s1 (s1), float 32 bits
++	 66: s2 (s2), float 32 bits
++	 67: s3 (s3), float 32 bits
++	 68: s4 (s4), float 32 bits
++	 69: s5 (s5), float 32 bits
++	 70: s6 (s6), float 32 bits
++	 71: s7 (s7), float 32 bits
++	 72: s8 (s8), float 32 bits
++	 73: s9 (s9), float 32 bits
++	 74: s10 (s10), float 32 bits
++	 75: s11 (s11), float 32 bits
++	 76: s12 (s12), float 32 bits
++	 77: s13 (s13), float 32 bits
++	 78: s14 (s14), float 32 bits
++	 79: s15 (s15), float 32 bits
++	 80: s16 (s16), float 32 bits
++	 81: s17 (s17), float 32 bits
++	 82: s18 (s18), float 32 bits
++	 83: s19 (s19), float 32 bits
++	 84: s20 (s20), float 32 bits
++	 85: s21 (s21), float 32 bits
++	 86: s22 (s22), float 32 bits
++	 87: s23 (s23), float 32 bits
++	 88: s24 (s24), float 32 bits
++	 89: s25 (s25), float 32 bits
++	 90: s26 (s26), float 32 bits
++	 91: s27 (s27), float 32 bits
++	 92: s28 (s28), float 32 bits
++	 93: s29 (s29), float 32 bits
++	 94: s30 (s30), float 32 bits
++	 95: s31 (s31), float 32 bits
+ 	256: d0 (d0), float 64 bits
+ 	257: d1 (d1), float 64 bits
+ 	258: d2 (d2), float 64 bits
+@@ -2723,6 +2809,13 @@ VFP registers:
+ 	285: d29 (d29), float 64 bits
+ 	286: d30 (d30), float 64 bits
+ 	287: d31 (d31), float 64 bits
++state registers:
++	128: spsr (spsr), unsigned 32 bits
++	129: spsr_fiq (spsr_fiq), unsigned 32 bits
++	130: spsr_irq (spsr_irq), unsigned 32 bits
++	131: spsr_abt (spsr_abt), unsigned 32 bits
++	132: spsr_und (spsr_und), unsigned 32 bits
++	133: spsr_svc (spsr_svc), unsigned 32 bits
+ EOF
+ 
+ # See run-readelf-mixed-corenote.sh for instructions to regenerate
+Index: elfutils-0.164/tests/run-readelf-mixed-corenote.sh
+===================================================================
+--- elfutils-0.164.orig/tests/run-readelf-mixed-corenote.sh
++++ elfutils-0.164/tests/run-readelf-mixed-corenote.sh
+@@ -31,12 +31,11 @@ Note segment of 892 bytes at offset 0x27
+     pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
+     utime: 0.000000, stime: 0.010000, cutime: 0.000000, cstime: 0.000000
+     orig_r0: -1, fpvalid: 1
+-    r0:             1  r1:   -1091672508  r2:   -1091672500
+-    r3:             0  r4:             0  r5:             0
+-    r6:         33728  r7:             0  r8:             0
+-    r9:             0  r10:  -1225703496  r11:  -1091672844
+-    r12:            0  sp:    0xbeee64f4  lr:    0xb6dc3f48
+-    pc:    0x00008500  spsr:  0x60000010
++    r0:            1  r1:  -1091672508  r2:  -1091672500  r3:            0
++    r4:            0  r5:            0  r6:        33728  r7:            0
++    r8:            0  r9:            0  r10: -1225703496  r11: -1091672844
++    r12:           0  sp:   0xbeee64f4  lr:   0xb6dc3f48  pc:   0x00008500
++    spsr:  0x60000010
+   CORE                 124  PRPSINFO
+     state: 0, sname: R, zomb: 0, nice: 0, flag: 0x00400500
+     uid: 0, gid: 0, pid: 11087, ppid: 11063, pgrp: 11087, sid: 11063
+Index: elfutils-0.164/tests/run-addrcfi.sh
+===================================================================
+--- elfutils-0.164.orig/tests/run-addrcfi.sh
++++ elfutils-0.164/tests/run-addrcfi.sh
+@@ -3554,6 +3554,38 @@ dwarf_cfi_addrframe (.eh_frame): no matc
+ 	FPA reg21 (f5): undefined
+ 	FPA reg22 (f6): undefined
+ 	FPA reg23 (f7): undefined
++	VFP reg64 (s0): undefined
++	VFP reg65 (s1): undefined
++	VFP reg66 (s2): undefined
++	VFP reg67 (s3): undefined
++	VFP reg68 (s4): undefined
++	VFP reg69 (s5): undefined
++	VFP reg70 (s6): undefined
++	VFP reg71 (s7): undefined
++	VFP reg72 (s8): undefined
++	VFP reg73 (s9): undefined
++	VFP reg74 (s10): undefined
++	VFP reg75 (s11): undefined
++	VFP reg76 (s12): undefined
++	VFP reg77 (s13): undefined
++	VFP reg78 (s14): undefined
++	VFP reg79 (s15): undefined
++	VFP reg80 (s16): undefined
++	VFP reg81 (s17): undefined
++	VFP reg82 (s18): undefined
++	VFP reg83 (s19): undefined
++	VFP reg84 (s20): undefined
++	VFP reg85 (s21): undefined
++	VFP reg86 (s22): undefined
++	VFP reg87 (s23): undefined
++	VFP reg88 (s24): undefined
++	VFP reg89 (s25): undefined
++	VFP reg90 (s26): undefined
++	VFP reg91 (s27): undefined
++	VFP reg92 (s28): undefined
++	VFP reg93 (s29): undefined
++	VFP reg94 (s30): undefined
++	VFP reg95 (s31): undefined
+ 	FPA reg96 (f0): undefined
+ 	FPA reg97 (f1): undefined
+ 	FPA reg98 (f2): undefined
+@@ -3562,7 +3594,66 @@ dwarf_cfi_addrframe (.eh_frame): no matc
+ 	FPA reg101 (f5): undefined
+ 	FPA reg102 (f6): undefined
+ 	FPA reg103 (f7): undefined
+-	integer reg128 (spsr): undefined
++	MMX reg104 (wcgr0): undefined
++	MMX reg105 (wcgr1): undefined
++	MMX reg106 (wcgr2): undefined
++	MMX reg107 (wcgr3): undefined
++	MMX reg108 (wcgr4): undefined
++	MMX reg109 (wcgr5): undefined
++	MMX reg110 (wcgr6): undefined
++	MMX reg111 (wcgr7): undefined
++	MMX reg112 (wr0): undefined
++	MMX reg113 (wr1): undefined
++	MMX reg114 (wr2): undefined
++	MMX reg115 (wr3): undefined
++	MMX reg116 (wr4): undefined
++	MMX reg117 (wr5): undefined
++	MMX reg118 (wr6): undefined
++	MMX reg119 (wr7): undefined
++	MMX reg120 (wr8): undefined
++	MMX reg121 (wr9): undefined
++	MMX reg122 (wr10): undefined
++	MMX reg123 (wr11): undefined
++	MMX reg124 (wr12): undefined
++	MMX reg125 (wr13): undefined
++	MMX reg126 (wr14): undefined
++	MMX reg127 (wr15): undefined
++	state reg128 (spsr): undefined
++	state reg129 (spsr_fiq): undefined
++	state reg130 (spsr_irq): undefined
++	state reg131 (spsr_abt): undefined
++	state reg132 (spsr_und): undefined
++	state reg133 (spsr_svc): undefined
++	integer reg144 (r8_usr): undefined
++	integer reg145 (r9_usr): undefined
++	integer reg146 (r10_usr): undefined
++	integer reg147 (r11_usr): undefined
++	integer reg148 (r12_usr): undefined
++	integer reg149 (r13_usr): undefined
++	integer reg150 (r14_usr): undefined
++	integer reg151 (r8_fiq): undefined
++	integer reg152 (r9_fiq): undefined
++	integer reg153 (r10_fiq): undefined
++	integer reg154 (r11_fiq): undefined
++	integer reg155 (r12_fiq): undefined
++	integer reg156 (r13_fiq): undefined
++	integer reg157 (r14_fiq): undefined
++	integer reg158 (r13_irq): undefined
++	integer reg159 (r14_irq): undefined
++	integer reg160 (r13_abt): undefined
++	integer reg161 (r14_abt): undefined
++	integer reg162 (r13_und): undefined
++	integer reg163 (r14_und): undefined
++	integer reg164 (r13_svc): undefined
++	integer reg165 (r14_svc): undefined
++	MMX reg192 (wc0): undefined
++	MMX reg193 (wc1): undefined
++	MMX reg194 (wc2): undefined
++	MMX reg195 (wc3): undefined
++	MMX reg196 (wc4): undefined
++	MMX reg197 (wc5): undefined
++	MMX reg198 (wc6): undefined
++	MMX reg199 (wc7): undefined
+ 	VFP reg256 (d0): undefined
+ 	VFP reg257 (d1): undefined
+ 	VFP reg258 (d2): undefined
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/fixheadercheck.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/fixheadercheck.patch
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/fixheadercheck.patch
rename to yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/fixheadercheck.patch
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/hppa_backend.diff b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/hppa_backend.diff
new file mode 100644
index 0000000..4545671
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/hppa_backend.diff
@@ -0,0 +1,799 @@
+Index: elfutils-0.164/backends/parisc_init.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/parisc_init.c
+@@ -0,0 +1,73 @@
++/* Initialization of PA-RISC specific backend library.
++   Copyright (C) 2002, 2005, 2006 Red Hat, Inc.
++   This file is part of Red Hat elfutils.
++   Written by Ulrich Drepper <drepper@redhat.com>, 2002.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#define BACKEND		parisc_
++#define RELOC_PREFIX	R_PARISC_
++#include "libebl_CPU.h"
++#include "libebl_parisc.h"
++
++/* This defines the common reloc hooks based on parisc_reloc.def.  */
++#include "common-reloc.c"
++
++
++const char *
++parisc_init (Elf *elf __attribute__ ((unused)),
++     GElf_Half machine __attribute__ ((unused)),
++     Ebl *eh,
++     size_t ehlen)
++{
++  int pa64 = 0;
++
++  /* Check whether the Elf_BH object has a sufficent size.  */
++  if (ehlen < sizeof (Ebl))
++    return NULL;
++
++  if (elf) {
++    GElf_Ehdr ehdr_mem;
++    GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
++    if (ehdr && (ehdr->e_flags & EF_PARISC_WIDE))
++      pa64 = 1;
++  }
++  /* We handle it.  */
++  eh->name = "PA-RISC";
++  parisc_init_reloc (eh);
++  HOOK (eh, reloc_simple_type);
++  HOOK (eh, machine_flag_check);
++  HOOK (eh, symbol_type_name);
++  HOOK (eh, segment_type_name);
++  HOOK (eh, section_type_name);
++  HOOK (eh, register_info);
++  if (pa64)
++    eh->return_value_location = parisc_return_value_location_64;
++  else
++    eh->return_value_location = parisc_return_value_location_32;
++
++  return MODVERSION;
++}
+Index: elfutils-0.164/backends/parisc_regs.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/parisc_regs.c
+@@ -0,0 +1,159 @@
++/* Register names and numbers for PA-RISC DWARF.
++   Copyright (C) 2005, 2006 Red Hat, Inc.
++   This file is part of Red Hat elfutils.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <dwarf.h>
++
++#define BACKEND parisc_
++#include "libebl_CPU.h"
++
++ssize_t
++parisc_register_info (Ebl *ebl, int regno, char *name, size_t namelen,
++		     const char **prefix, const char **setname,
++		     int *bits, int *type)
++{
++  int pa64 = 0;
++
++  if (ebl->elf) {
++    GElf_Ehdr ehdr_mem;
++    GElf_Ehdr *ehdr = gelf_getehdr (ebl->elf, &ehdr_mem);
++    if (ehdr->e_flags & EF_PARISC_WIDE)
++      pa64 = 1;
++  }
++
++  int nregs = pa64 ? 127 : 128;
++
++  if (name == NULL)
++    return nregs;
++
++  if (regno < 0 || regno >= nregs || namelen < 6)
++    return -1;
++
++  *prefix = "%";
++
++  if (regno < 32)
++  {
++    *setname = "integer";
++    *type = DW_ATE_signed;
++    if (pa64)
++    {
++	*bits = 64;
++    }
++    else
++    {
++    	*bits = 32;
++    }
++  }
++  else if (regno == 32)
++  {
++    *setname = "special";
++    if (pa64)
++    {
++	*bits = 6;
++    }
++    else
++    {
++    	*bits = 5;
++    }
++    *type = DW_ATE_unsigned;
++  }
++  else
++  {
++    *setname = "FPU";
++    *type = DW_ATE_float;
++    if (pa64)
++    {
++	*bits = 64;
++    }
++    else
++    {
++    	*bits = 32;
++    }
++  }
++
++  if (regno < 33) {
++    switch (regno)
++      {
++      case 0 ... 9:
++        name[0] = 'r';
++        name[1] = regno + '0';
++        namelen = 2;
++        break;
++      case 10 ... 31:
++        name[0] = 'r';
++        name[1] = regno / 10 + '0';
++        name[2] = regno % 10 + '0';
++        namelen = 3;
++        break;
++      case 32:
++	*prefix = NULL;
++	name[0] = 'S';
++	name[1] = 'A';
++	name[2] = 'R';
++	namelen = 3;
++	break;
++      }
++  }
++  else {
++    if (pa64 && ((regno - 72) % 2)) {
++      *setname = NULL;
++      return 0;
++    }
++
++    switch (regno)
++      {
++      case 72 + 0 ... 72 + 11:
++        name[0] = 'f';
++	name[1] = 'r';
++        name[2] = (regno + 8 - 72) / 2 + '0';
++        namelen = 3;
++        if ((regno + 8 - 72) % 2) {
++	  name[3] = 'R';
++	  namelen++;
++        }
++        break;
++      case 72 + 12 ... 72 + 55:
++        name[0] = 'f';
++	name[1] = 'r';
++        name[2] = (regno + 8 - 72) / 2 / 10 + '0';
++        name[3] = (regno + 8 - 72) / 2 % 10 + '0';
++        namelen = 4;
++        if ((regno + 8 - 72) % 2) {
++	  name[4] = 'R';
++	  namelen++;
++        }
++        break;
++      default:
++        *setname = NULL;
++        return 0;
++      }
++  }
++  name[namelen++] = '\0';
++  return namelen;
++}
+Index: elfutils-0.164/backends/parisc_reloc.def
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/parisc_reloc.def
+@@ -0,0 +1,128 @@
++/* List the relocation types for PA-RISC.  -*- C -*-
++   Copyright (C) 2005 Red Hat, Inc.
++   This file is part of Red Hat elfutils.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++/*	    NAME,		REL|EXEC|DYN	*/
++
++RELOC_TYPE (NONE,		EXEC|DYN)
++RELOC_TYPE (DIR32,		REL|EXEC|DYN)
++RELOC_TYPE (DIR21L,		REL|EXEC|DYN)
++RELOC_TYPE (DIR17R,		REL)
++RELOC_TYPE (DIR17F,		REL)
++RELOC_TYPE (DIR14R,		REL|DYN)
++RELOC_TYPE (PCREL32,		REL)
++RELOC_TYPE (PCREL21L,		REL)
++RELOC_TYPE (PCREL17R,		REL)
++RELOC_TYPE (PCREL17F,		REL)
++RELOC_TYPE (PCREL14R,		REL|EXEC)
++RELOC_TYPE (DPREL21L,		REL)
++RELOC_TYPE (DPREL14WR,		REL)
++RELOC_TYPE (DPREL14DR,          REL)
++RELOC_TYPE (DPREL14R,		REL)
++RELOC_TYPE (GPREL21L,		0)
++RELOC_TYPE (GPREL14R,		0)
++RELOC_TYPE (LTOFF21L,		REL)
++RELOC_TYPE (LTOFF14R,		REL)
++RELOC_TYPE (DLTIND14F,		0)
++RELOC_TYPE (SETBASE,		0)
++RELOC_TYPE (SECREL32,		REL)
++RELOC_TYPE (BASEREL21L,		0)
++RELOC_TYPE (BASEREL17R,		0)
++RELOC_TYPE (BASEREL14R,		0)
++RELOC_TYPE (SEGBASE,		0)
++RELOC_TYPE (SEGREL32,		REL)
++RELOC_TYPE (PLTOFF21L,		0)
++RELOC_TYPE (PLTOFF14R,		0)
++RELOC_TYPE (PLTOFF14F,		0)
++RELOC_TYPE (LTOFF_FPTR32,	0)
++RELOC_TYPE (LTOFF_FPTR21L,	0)
++RELOC_TYPE (LTOFF_FPTR14R,	0)
++RELOC_TYPE (FPTR64,		0)
++RELOC_TYPE (PLABEL32,		REL|DYN)
++RELOC_TYPE (PCREL64,		0)
++RELOC_TYPE (PCREL22C,		0)
++RELOC_TYPE (PCREL22F,		0)
++RELOC_TYPE (PCREL14WR,		0)
++RELOC_TYPE (PCREL14DR,		0)
++RELOC_TYPE (PCREL16F,		0)
++RELOC_TYPE (PCREL16WF,		0)
++RELOC_TYPE (PCREL16DF,		0)
++RELOC_TYPE (DIR64,		REL|DYN)
++RELOC_TYPE (DIR14WR,		REL)
++RELOC_TYPE (DIR14DR,		REL)
++RELOC_TYPE (DIR16F,		REL)
++RELOC_TYPE (DIR16WF,		REL)
++RELOC_TYPE (DIR16DF,		REL)
++RELOC_TYPE (GPREL64,		0)
++RELOC_TYPE (GPREL14WR,		0)
++RELOC_TYPE (GPREL14DR,		0)
++RELOC_TYPE (GPREL16F,		0)
++RELOC_TYPE (GPREL16WF,		0)
++RELOC_TYPE (GPREL16DF,		0)
++RELOC_TYPE (LTOFF64,		0)
++RELOC_TYPE (LTOFF14WR,		0)
++RELOC_TYPE (LTOFF14DR,		0)
++RELOC_TYPE (LTOFF16F,		0)
++RELOC_TYPE (LTOFF16WF,		0)
++RELOC_TYPE (LTOFF16DF,		0)
++RELOC_TYPE (SECREL64,		0)
++RELOC_TYPE (BASEREL14WR,	0)
++RELOC_TYPE (BASEREL14DR,	0)
++RELOC_TYPE (SEGREL64,		0)
++RELOC_TYPE (PLTOFF14WR,		0)
++RELOC_TYPE (PLTOFF14DR,		0)
++RELOC_TYPE (PLTOFF16F,		0)
++RELOC_TYPE (PLTOFF16WF,		0)
++RELOC_TYPE (PLTOFF16DF,		0)
++RELOC_TYPE (LTOFF_FPTR64,	0)
++RELOC_TYPE (LTOFF_FPTR14WR,	0)
++RELOC_TYPE (LTOFF_FPTR14DR,	0)
++RELOC_TYPE (LTOFF_FPTR16F,	0)
++RELOC_TYPE (LTOFF_FPTR16WF,	0)
++RELOC_TYPE (LTOFF_FPTR16DF,	0)
++RELOC_TYPE (COPY,		EXEC)
++RELOC_TYPE (IPLT,		EXEC|DYN)
++RELOC_TYPE (EPLT,		0)
++RELOC_TYPE (TPREL32,		DYN)
++RELOC_TYPE (TPREL21L,		0)
++RELOC_TYPE (TPREL14R,		0)
++RELOC_TYPE (LTOFF_TP21L,	0)
++RELOC_TYPE (LTOFF_TP14R,	0)
++RELOC_TYPE (LTOFF_TP14F,	0)
++RELOC_TYPE (TPREL64,		0)
++RELOC_TYPE (TPREL14WR,		0)
++RELOC_TYPE (TPREL14DR,		0)
++RELOC_TYPE (TPREL16F,		0)
++RELOC_TYPE (TPREL16WF,		0)
++RELOC_TYPE (TPREL16DF,		0)
++RELOC_TYPE (LTOFF_TP64,		0)
++RELOC_TYPE (LTOFF_TP14WR,	0)
++RELOC_TYPE (LTOFF_TP14DR,	0)
++RELOC_TYPE (LTOFF_TP16F,	0)
++RELOC_TYPE (LTOFF_TP16WF,	0)
++RELOC_TYPE (LTOFF_TP16DF,	0)
++RELOC_TYPE (TLS_DTPMOD32,	DYN)
++RELOC_TYPE (TLS_DTPMOD64,	DYN)
++
++#define NO_RELATIVE_RELOC       1
+Index: elfutils-0.164/backends/parisc_retval.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/parisc_retval.c
+@@ -0,0 +1,213 @@
++/* Function return value location for Linux/PA-RISC ABI.
++   Copyright (C) 2005 Red Hat, Inc.
++   This file is part of Red Hat elfutils.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <assert.h>
++#include <dwarf.h>
++
++#define BACKEND parisc_
++#include "libebl_CPU.h"
++#include "libebl_parisc.h"
++
++/* %r28, or pair %r28, %r29.  */
++static const Dwarf_Op loc_intreg32[] =
++  {
++    { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 4 },
++    { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 4 },
++  };
++
++static const Dwarf_Op loc_intreg[] =
++  {
++    { .atom = DW_OP_reg28 }, { .atom = DW_OP_piece, .number = 8 },
++    { .atom = DW_OP_reg29 }, { .atom = DW_OP_piece, .number = 8 },
++  };
++#define nloc_intreg	1
++#define nloc_intregpair	4
++
++/* %fr4L, or pair %fr4L, %fr4R on pa-32 */
++static const Dwarf_Op loc_fpreg32[] =
++  {
++    { .atom = DW_OP_regx, .number = 72 }, { .atom = DW_OP_piece, .number = 4 },
++    { .atom = DW_OP_regx, .number = 73 }, { .atom = DW_OP_piece, .number = 4 },
++  };
++#define nloc_fpreg32 2
++#define nloc_fpregpair32 4
++
++/* $fr4 */
++static const Dwarf_Op loc_fpreg[] =
++  {
++    { .atom = DW_OP_regx, .number = 72 },
++  };
++#define nloc_fpreg  1
++
++#if 0
++/* The return value is a structure and is actually stored in stack space
++   passed in a hidden argument by the caller. Address of the location is stored
++   in %r28 before function call, but it may be changed by function. */
++static const Dwarf_Op loc_aggregate[] =
++  {
++    { .atom = DW_OP_breg28 },
++  };
++#define nloc_aggregate 1
++#endif
++
++static int
++parisc_return_value_location_ (Dwarf_Die *functypedie, const Dwarf_Op **locp, int pa64)
++{
++  Dwarf_Word regsize = pa64 ? 8 : 4;
++
++  /* Start with the function's type, and get the DW_AT_type attribute,
++     which is the type of the return value.  */
++
++  Dwarf_Attribute attr_mem;
++  Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
++  if (attr == NULL)
++    /* The function has no return value, like a `void' function in C.  */
++    return 0;
++
++  Dwarf_Die die_mem;
++  Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
++  int tag = dwarf_tag (typedie);
++
++  /* Follow typedefs and qualifiers to get to the actual type.  */
++  while (tag == DW_TAG_typedef
++	 || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
++	 || tag == DW_TAG_restrict_type)
++    {
++      attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++      typedie = dwarf_formref_die (attr, &die_mem);
++      tag = dwarf_tag (typedie);
++    }
++
++  switch (tag)
++    {
++    case -1:
++      return -1;
++
++    case DW_TAG_subrange_type:
++      if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
++	{
++	  attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++	  typedie = dwarf_formref_die (attr, &die_mem);
++	  tag = dwarf_tag (typedie);
++	}
++      /* Fall through.  */
++
++    case DW_TAG_base_type:
++    case DW_TAG_enumeration_type:
++    case DW_TAG_pointer_type:
++    case DW_TAG_ptr_to_member_type:
++      {
++        Dwarf_Word size;
++	if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
++					 &attr_mem), &size) != 0)
++	  {
++	    if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
++	      size = 4;
++	    else
++	      return -1;
++	  }
++	if (tag == DW_TAG_base_type)
++	  {
++	    Dwarf_Word encoding;
++	    if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
++					     &attr_mem), &encoding) != 0)
++	      return -1;
++
++	    if (encoding == DW_ATE_float)
++	      {
++		if (pa64) {
++		  *locp = loc_fpreg;
++		  if (size <= 8)
++		      return nloc_fpreg;
++		}
++		else {
++		  *locp = loc_fpreg32;
++		  if (size <= 4)
++		    return nloc_fpreg32;
++		  else if (size <= 8)
++		    return nloc_fpregpair32;
++		}
++		goto aggregate;
++	      }
++	  }
++	if (pa64)
++	  *locp = loc_intreg;
++	else
++	  *locp = loc_intreg32;
++	if (size <= regsize)
++	  return nloc_intreg;
++	if (size <= 2 * regsize)
++	  return nloc_intregpair;
++
++	/* Else fall through.  */
++      }
++
++    case DW_TAG_structure_type:
++    case DW_TAG_class_type:
++    case DW_TAG_union_type:
++    case DW_TAG_array_type:
++    aggregate: {
++        Dwarf_Word size;
++	if (dwarf_aggregate_size (typedie, &size) != 0)
++	  return -1;
++	if (pa64)
++          *locp = loc_intreg;
++	else
++	  *locp = loc_intreg32;
++        if (size <= regsize)
++	  return nloc_intreg;
++        if (size <= 2 * regsize)
++	  return nloc_intregpair;
++#if 0
++	/* there should be some way to know this location... But I do not see it. */
++        *locp = loc_aggregate;
++        return nloc_aggregate;
++#endif
++	/* fall through.  */
++      }
++    }
++
++  /* XXX We don't have a good way to return specific errors from ebl calls.
++     This value means we do not understand the type, but it is well-formed
++     DWARF and might be valid.  */
++  return -2;
++}
++
++int
++parisc_return_value_location_32 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++  return parisc_return_value_location_ (functypedie, locp, 0);
++}
++
++int
++parisc_return_value_location_64 (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++  return parisc_return_value_location_ (functypedie, locp, 1);
++}
++
+Index: elfutils-0.164/backends/parisc_symbol.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/parisc_symbol.c
+@@ -0,0 +1,112 @@
++/* PA-RISC specific symbolic name handling.
++   Copyright (C) 2002, 2005 Red Hat, Inc.
++   This file is part of Red Hat elfutils.
++   Written by Ulrich Drepper <drepper@redhat.com>, 2002.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <elf.h>
++#include <stddef.h>
++
++#define BACKEND		parisc_
++#include "libebl_CPU.h"
++
++const char *
++parisc_segment_type_name (int segment, char *buf __attribute__ ((unused)),
++			size_t len __attribute__ ((unused)))
++{
++  switch (segment)
++    {
++    case PT_PARISC_ARCHEXT:
++      return "PARISC_ARCHEXT";
++    case PT_PARISC_UNWIND:
++      return "PARISC_UNWIND";
++    default:
++      break;
++    }
++  return NULL;
++}
++
++/* Return symbolic representation of symbol type.  */
++const char *
++parisc_symbol_type_name(int symbol, char *buf __attribute__ ((unused)),
++    size_t len __attribute__ ((unused)))
++{
++	if (symbol == STT_PARISC_MILLICODE)
++	  return "PARISC_MILLI";
++	return NULL;
++}
++
++/* Return symbolic representation of section type.  */
++const char *
++parisc_section_type_name (int type,
++			char *buf __attribute__ ((unused)),
++			size_t len __attribute__ ((unused)))
++{
++  switch (type)
++    {
++    case SHT_PARISC_EXT:
++      return "PARISC_EXT";
++    case SHT_PARISC_UNWIND:
++      return "PARISC_UNWIND";
++    case SHT_PARISC_DOC:
++      return "PARISC_DOC";
++    }
++
++  return NULL;
++}
++
++/* Check whether machine flags are valid.  */
++bool
++parisc_machine_flag_check (GElf_Word flags)
++{
++  if (flags &~ (EF_PARISC_TRAPNIL | EF_PARISC_EXT | EF_PARISC_LSB |
++	EF_PARISC_WIDE | EF_PARISC_NO_KABP |
++	EF_PARISC_LAZYSWAP | EF_PARISC_ARCH))
++    return 0;
++
++  GElf_Word arch = flags & EF_PARISC_ARCH;
++
++  return ((arch == EFA_PARISC_1_0) || (arch == EFA_PARISC_1_1) ||
++      (arch == EFA_PARISC_2_0));
++}
++
++/* Check for the simple reloc types.  */
++Elf_Type
++parisc_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
++{
++  switch (type)
++    {
++    case R_PARISC_DIR64:
++    case R_PARISC_SECREL64:
++      return ELF_T_XWORD;
++    case R_PARISC_DIR32:
++    case R_PARISC_SECREL32:
++      return ELF_T_WORD;
++    default:
++      return ELF_T_NUM;
++    }
++}
+Index: elfutils-0.164/backends/libebl_parisc.h
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/libebl_parisc.h
+@@ -0,0 +1,9 @@
++#ifndef _LIBEBL_HPPA_H
++#define _LIBEBL_HPPA_H 1
++
++#include <libdw.h>
++
++extern int parisc_return_value_location_32(Dwarf_Die *, const Dwarf_Op **locp);
++extern int parisc_return_value_location_64(Dwarf_Die *, const Dwarf_Op **locp);
++
++#endif
+Index: elfutils-0.164/backends/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/backends/Makefile.am
++++ elfutils-0.164/backends/Makefile.am
+@@ -33,11 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
+ 
+ 
+ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
+-	  tilegx
++	  tilegx parisc
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a    \
+ 	     libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a    \
+ 	     libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
+-	     libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a
++	     libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
++	     libebl_parisc_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+ 
+@@ -111,6 +112,9 @@ tilegx_SRCS = tilegx_init.c tilegx_symbo
+ libebl_tilegx_pic_a_SOURCES = $(tilegx_SRCS)
+ am_libebl_tilegx_pic_a_OBJECTS = $(tilegx_SRCS:.c=.os)
+ 
++parisc_SRCS = parisc_init.c parisc_symbol.c parisc_regs.c parisc_retval.c
++libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
++am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
+ 
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ 	@rm -f $(@:.so=.map)
+Index: elfutils-0.164/libelf/elf.h
+===================================================================
+--- elfutils-0.164.orig/libelf/elf.h
++++ elfutils-0.164/libelf/elf.h
+@@ -1912,16 +1912,24 @@ enum
+ #define R_PARISC_PCREL17F	12	/* 17 bits of rel. address.  */
+ #define R_PARISC_PCREL14R	14	/* Right 14 bits of rel. address.  */
+ #define R_PARISC_DPREL21L	18	/* Left 21 bits of rel. address.  */
++#define R_PARISC_DPREL14WR	19
++#define R_PARISC_DPREL14DR	20
+ #define R_PARISC_DPREL14R	22	/* Right 14 bits of rel. address.  */
+ #define R_PARISC_GPREL21L	26	/* GP-relative, left 21 bits.  */
+ #define R_PARISC_GPREL14R	30	/* GP-relative, right 14 bits.  */
+ #define R_PARISC_LTOFF21L	34	/* LT-relative, left 21 bits.  */
+ #define R_PARISC_LTOFF14R	38	/* LT-relative, right 14 bits.  */
++#define R_PARISC_DLTIND14F	39
++#define R_PARISC_SETBASE	40
+ #define R_PARISC_SECREL32	41	/* 32 bits section rel. address.  */
++#define R_PARISC_BASEREL21L	42
++#define R_PARISC_BASEREL17R	43
++#define R_PARISC_BASEREL14R	46
+ #define R_PARISC_SEGBASE	48	/* No relocation, set segment base.  */
+ #define R_PARISC_SEGREL32	49	/* 32 bits segment rel. address.  */
+ #define R_PARISC_PLTOFF21L	50	/* PLT rel. address, left 21 bits.  */
+ #define R_PARISC_PLTOFF14R	54	/* PLT rel. address, right 14 bits.  */
++#define R_PARISC_PLTOFF14F	55
+ #define R_PARISC_LTOFF_FPTR32	57	/* 32 bits LT-rel. function pointer. */
+ #define R_PARISC_LTOFF_FPTR21L	58	/* LT-rel. fct ptr, left 21 bits. */
+ #define R_PARISC_LTOFF_FPTR14R	62	/* LT-rel. fct ptr, right 14 bits. */
+@@ -1930,6 +1938,7 @@ enum
+ #define R_PARISC_PLABEL21L	66	/* Left 21 bits of fdesc address.  */
+ #define R_PARISC_PLABEL14R	70	/* Right 14 bits of fdesc address.  */
+ #define R_PARISC_PCREL64	72	/* 64 bits PC-rel. address.  */
++#define R_PARISC_PCREL22C	73
+ #define R_PARISC_PCREL22F	74	/* 22 bits PC-rel. address.  */
+ #define R_PARISC_PCREL14WR	75	/* PC-rel. address, right 14 bits.  */
+ #define R_PARISC_PCREL14DR	76	/* PC rel. address, right 14 bits.  */
+@@ -1955,6 +1964,8 @@ enum
+ #define R_PARISC_LTOFF16WF	102	/* 16 bits LT-rel. address.  */
+ #define R_PARISC_LTOFF16DF	103	/* 16 bits LT-rel. address.  */
+ #define R_PARISC_SECREL64	104	/* 64 bits section rel. address.  */
++#define R_PARISC_BASEREL14WR	107
++#define R_PARISC_BASEREL14DR	108
+ #define R_PARISC_SEGREL64	112	/* 64 bits segment rel. address.  */
+ #define R_PARISC_PLTOFF14WR	115	/* PLT-rel. address, right 14 bits.  */
+ #define R_PARISC_PLTOFF14DR	116	/* PLT-rel. address, right 14 bits.  */
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch
new file mode 100644
index 0000000..ba454ee
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/kfreebsd_path.patch
@@ -0,0 +1,15 @@
+--- elfutils/tests/run-native-test.sh.orig
++++ elfutils/tests/run-native-test.sh
+@@ -78,6 +78,12 @@
+   test $native -eq 0 || testrun "$@" -p $native > /dev/null
+ }
+ 
++# On the Debian buildds, GNU/kFreeBSD linprocfs /proc/$PID/maps does
++# not give absolute paths due to sbuild's bind mounts (bug #570805)
++# therefore the next two test programs are expected to fail with
++# "cannot attach to process: Function not implemented".
++[ "$(uname)" = "GNU/kFreeBSD" ] && exit 77
++
+ native_test ${abs_builddir}/allregs
+ native_test ${abs_builddir}/funcretval
+ 
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/m68k_backend.diff b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/m68k_backend.diff
new file mode 100644
index 0000000..d73855b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/m68k_backend.diff
@@ -0,0 +1,492 @@
+From: Kurt Roeckx <kurt@roeckx.be>
+From: Thorsten Glaser <tg@mirbsd.de>
+Subject: m68k support
+
+Written by Kurt Roeckx, except for the retval support which was written
+by Thorsten Glaser
+
+
+Index: elfutils-0.164/backends/m68k_init.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/m68k_init.c
+@@ -0,0 +1,49 @@
++/* Initialization of m68k specific backend library.
++   Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
++
++   This software is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   This softare 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 software; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++*/
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#define BACKEND		m68k_
++#define RELOC_PREFIX	R_68K_
++#include "libebl_CPU.h"
++
++/* This defines the common reloc hooks based on m68k_reloc.def.  */
++#include "common-reloc.c"
++
++
++const char *
++m68k_init (Elf *elf __attribute__ ((unused)),
++     GElf_Half machine __attribute__ ((unused)),
++     Ebl *eh,
++     size_t ehlen)
++{
++  /* Check whether the Elf_BH object has a sufficent size.  */
++  if (ehlen < sizeof (Ebl))
++    return NULL;
++
++  /* We handle it.  */
++  eh->name = "m68k";
++  m68k_init_reloc (eh);
++  HOOK (eh, reloc_simple_type);
++  HOOK (eh, return_value_location);
++  HOOK (eh, register_info);
++
++  return MODVERSION;
++}
+Index: elfutils-0.164/backends/m68k_regs.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/m68k_regs.c
+@@ -0,0 +1,106 @@
++/* Register names and numbers for m68k DWARF.
++   Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
++
++   This software is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   This software 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 software; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <dwarf.h>
++
++#define BACKEND m68k_
++#include "libebl_CPU.h"
++
++ssize_t
++m68k_register_info (Ebl *ebl __attribute__ ((unused)),
++		   int regno, char *name, size_t namelen,
++		   const char **prefix, const char **setname,
++		   int *bits, int *type)
++{
++	if (name == NULL)
++		return 25;
++
++	if (regno < 0 || regno > 24 || namelen < 5)
++		return -1;
++
++	*prefix = "%";
++	*bits = 32;
++	*type = (regno < 8 ? DW_ATE_signed
++		: regno < 16 ? DW_ATE_address : DW_ATE_float);
++
++	if (regno < 8)
++	{
++		*setname = "integer";
++	}
++	else if (regno < 16)
++	{
++		*setname = "address";
++	}
++	else if (regno < 24)
++	{
++		*setname = "FPU";
++	}
++	else
++	{
++		*setname = "address";
++		*type = DW_ATE_address;
++	}
++
++	switch (regno)
++	{
++	case 0 ... 7:
++		name[0] = 'd';
++		name[1] = regno + '0';
++		namelen = 2;
++		break;
++
++	case 8 ... 13:
++		name[0] = 'a';
++		name[1] = regno - 8 + '0';
++		namelen = 2;
++		break;
++
++	case 14:
++		name[0] = 'f';
++		name[1] = 'p';
++   		namelen = 2;
++		break;
++
++	case 15:
++		name[0] = 's';
++		name[1] = 'p';
++   		namelen = 2;
++		break;
++
++	case 16 ... 23:
++		name[0] = 'f';
++		name[1] = 'p';
++		name[2] = regno - 16 + '0';
++   		namelen = 3;
++		break;
++
++	case 24:
++		name[0] = 'p';
++		name[1] = 'c';
++		namelen = 2;
++	}
++
++	name[namelen++] = '\0';
++	return namelen;
++}
++
+Index: elfutils-0.164/backends/m68k_reloc.def
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/m68k_reloc.def
+@@ -0,0 +1,45 @@
++/* List the relocation types for m68k.  -*- C -*-
++   Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
++
++   This software is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   This software 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 software; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++*/
++
++/* 	    NAME,		REL|EXEC|DYN	*/
++
++RELOC_TYPE (NONE,		0)
++RELOC_TYPE (32,			REL|EXEC|DYN)
++RELOC_TYPE (16,			REL)
++RELOC_TYPE (8,			REL)
++RELOC_TYPE (PC32,		REL|EXEC|DYN)
++RELOC_TYPE (PC16,		REL)
++RELOC_TYPE (PC8,		REL)
++RELOC_TYPE (GOT32,		REL)
++RELOC_TYPE (GOT16,		REL)
++RELOC_TYPE (GOT8,		REL)
++RELOC_TYPE (GOT32O,		REL)
++RELOC_TYPE (GOT16O,		REL)
++RELOC_TYPE (GOT8O,		REL)
++RELOC_TYPE (PLT32,		REL)
++RELOC_TYPE (PLT16,		REL)
++RELOC_TYPE (PLT8,		REL)
++RELOC_TYPE (PLT32O,		REL)
++RELOC_TYPE (PLT16O,		REL)
++RELOC_TYPE (PLT8O,		REL)
++RELOC_TYPE (COPY,		EXEC)
++RELOC_TYPE (GLOB_DAT,		EXEC|DYN)
++RELOC_TYPE (JMP_SLOT,		EXEC|DYN)
++RELOC_TYPE (RELATIVE,		EXEC|DYN)
++RELOC_TYPE (GNU_VTINHERIT,	REL)
++RELOC_TYPE (GNU_VTENTRY,	REL)
++
+Index: elfutils-0.164/libelf/elf.h
+===================================================================
+--- elfutils-0.164.orig/libelf/elf.h
++++ elfutils-0.164/libelf/elf.h
+@@ -1158,6 +1158,9 @@ typedef struct
+ #define R_68K_GLOB_DAT	20		/* Create GOT entry */
+ #define R_68K_JMP_SLOT	21		/* Create PLT entry */
+ #define R_68K_RELATIVE	22		/* Adjust by program base */
++/* The next 2 are GNU extensions to enable C++ vtable garbage collection.  */
++#define R_68K_GNU_VTINHERIT 23
++#define R_68K_GNU_VTENTRY   24
+ #define R_68K_TLS_GD32      25          /* 32 bit GOT offset for GD */
+ #define R_68K_TLS_GD16      26          /* 16 bit GOT offset for GD */
+ #define R_68K_TLS_GD8       27          /* 8 bit GOT offset for GD */
+Index: elfutils-0.164/backends/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/backends/Makefile.am
++++ elfutils-0.164/backends/Makefile.am
+@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
+ 
+ 
+ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
+-	  tilegx parisc mips
++	  tilegx parisc mips m68k
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a    \
+ 	     libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a    \
+ 	     libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
+ 	     libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
+-	     libebl_parisc_pic.a libebl_mips_pic.a
++	     libebl_parisc_pic.a libebl_mips_pic.a libebl_m68k_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+ 
+@@ -120,6 +120,10 @@ mips_SRCS = mips_init.c mips_symbol.c mi
+ libebl_mips_pic_a_SOURCES = $(mips_SRCS)
+ am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
+ 
++m68k_SRCS = m68k_init.c m68k_symbol.c m68k_regs.c m68k_retval.c
++libebl_m68k_pic_a_SOURCES = $(m68k_SRCS)
++am_libebl_m68k_pic_a_OBJECTS = $(m68k_SRCS:.c=.os)
++
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ 	@rm -f $(@:.so=.map)
+ 	$(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
+Index: elfutils-0.164/backends/m68k_symbol.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/m68k_symbol.c
+@@ -0,0 +1,43 @@
++/* m68k specific symbolic name handling.
++   Copyright (C) 2007 Kurt Roeckx <kurt@roeckx.be>
++
++   This software is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   This software 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 software; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++*/
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <elf.h>
++#include <stddef.h>
++
++#define BACKEND		m68k_
++#include "libebl_CPU.h"
++
++/* Check for the simple reloc types.  */
++Elf_Type
++m68k_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
++{
++  switch (type)
++    {
++    case R_68K_32:
++      return ELF_T_SWORD;
++    case R_68K_16:
++      return ELF_T_HALF;
++    case R_68K_8:
++      return ELF_T_BYTE;
++    default:
++      return ELF_T_NUM;
++    }
++}
+Index: elfutils-0.164/backends/m68k_retval.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/m68k_retval.c
+@@ -0,0 +1,172 @@
++/* Function return value location for Linux/m68k ABI.
++   Copyright (C) 2005-2010 Red Hat, Inc.
++   Copyright (c) 2011 Thorsten Glaser, Debian.
++   This file is part of Red Hat elfutils.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <assert.h>
++#include <dwarf.h>
++
++#define BACKEND m68k_
++#include "libebl_CPU.h"
++
++
++/* %d0, or pair %d0, %d1, or %a0 */
++static const Dwarf_Op loc_intreg[] =
++  {
++    { .atom = DW_OP_reg0 }, { .atom = DW_OP_piece, .number = 4 },
++    { .atom = DW_OP_reg1 }, { .atom = DW_OP_piece, .number = 4 },
++  };
++static const Dwarf_Op loc_ptrreg[] =
++  {
++    { .atom = DW_OP_reg8 },
++  };
++#define nloc_intreg	1
++#define nloc_intregpair	4
++#define nloc_ptrreg	1
++
++/* %f0 */
++static const Dwarf_Op loc_fpreg[] =
++  {
++    { .atom = DW_OP_reg16 }
++  };
++#define nloc_fpreg	1
++
++/* Structures are a bit more complicated - small structures are returned
++   in %d0 / %d1 (-freg-struct-return which is enabled by default), large
++   structures use %a1 (in constrast to the SYSV psABI which says %a0) as
++   reentrant storage space indicator.  */
++static const Dwarf_Op loc_aggregate[] =
++  {
++    { .atom = DW_OP_breg9, .number = 0 }
++  };
++#define nloc_aggregate 1
++
++int
++m68k_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++  Dwarf_Word size;
++
++  /* Start with the function's type, and get the DW_AT_type attribute,
++     which is the type of the return value.  */
++
++  Dwarf_Attribute attr_mem;
++  Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type,
++						&attr_mem);
++  if (attr == NULL)
++    /* The function has no return value, like a `void' function in C.  */
++    return 0;
++
++  Dwarf_Die die_mem;
++  Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
++  int tag = dwarf_tag (typedie);
++
++  /* Follow typedefs and qualifiers to get to the actual type.  */
++  while (tag == DW_TAG_typedef
++	 || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
++	 || tag == DW_TAG_restrict_type)
++    {
++      attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++      typedie = dwarf_formref_die (attr, &die_mem);
++      tag = dwarf_tag (typedie);
++    }
++
++  switch (tag)
++    {
++    case -1:
++      return -1;
++
++    case DW_TAG_subrange_type:
++      if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
++	{
++	  attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++	  typedie = dwarf_formref_die (attr, &die_mem);
++	  tag = dwarf_tag (typedie);
++	}
++      /* Fall through.  */
++
++    case DW_TAG_base_type:
++    case DW_TAG_enumeration_type:
++    case DW_TAG_pointer_type:
++    case DW_TAG_ptr_to_member_type:
++      if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
++						 &attr_mem), &size) != 0)
++	{
++	  if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
++	    size = 4;
++	  else
++	    return -1;
++	}
++      if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
++	{
++	  *locp = loc_ptrreg;
++          return nloc_ptrreg;
++	}
++      if (tag == DW_TAG_base_type)
++	{
++	  Dwarf_Word encoding;
++	  if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
++						     &attr_mem),
++			       &encoding) != 0)
++	    return -1;
++	  if (encoding == DW_ATE_float)
++	    {
++	      /* XXX really 10? */
++              if (size > 10)
++                return -2;
++              *locp = loc_fpreg;
++              return nloc_fpreg;
++	    }
++	}
++      if (size <= 8)
++	{
++	intreg:
++	  /* XXX check endianness of dword pair, int64 vs aggregate */
++	  *locp = loc_intreg;
++	  return size <= 4 ? nloc_intreg : nloc_intregpair;
++	}
++
++    aggregate:
++      *locp = loc_aggregate;
++      return nloc_aggregate;
++
++    case DW_TAG_structure_type:
++    case DW_TAG_class_type:
++    case DW_TAG_union_type:
++    case DW_TAG_array_type:
++      if (dwarf_aggregate_size (typedie, &size) == 0
++	  && size > 0 && size <= 8)
++	/* not accurate for a struct whose only member is a float */
++	goto intreg;
++      goto aggregate;
++    }
++
++  /* XXX We don't have a good way to return specific errors from ebl calls.
++     This value means we do not understand the type, but it is well-formed
++     DWARF and might be valid.  */
++  return -2;
++}
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_backend.diff b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_backend.diff
new file mode 100644
index 0000000..de1237b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_backend.diff
@@ -0,0 +1,711 @@
+Index: elfutils-0.164/backends/mips_init.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/mips_init.c
+@@ -0,0 +1,59 @@
++/* Initialization of mips specific backend library.
++   Copyright (C) 2006 Red Hat, Inc.
++   This file is part of Red Hat elfutils.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#define BACKEND		mips_
++#define RELOC_PREFIX	R_MIPS_
++#include "libebl_CPU.h"
++
++/* This defines the common reloc hooks based on mips_reloc.def.  */
++#include "common-reloc.c"
++
++const char *
++mips_init (Elf *elf __attribute__ ((unused)),
++     GElf_Half machine __attribute__ ((unused)),
++     Ebl *eh,
++     size_t ehlen)
++{
++  /* Check whether the Elf_BH object has a sufficent size.  */
++  if (ehlen < sizeof (Ebl))
++    return NULL;
++
++  /* We handle it.  */
++  if (machine == EM_MIPS)
++    eh->name = "MIPS R3000 big-endian";
++  else if (machine == EM_MIPS_RS3_LE)
++    eh->name = "MIPS R3000 little-endian";
++
++  mips_init_reloc (eh);
++  HOOK (eh, reloc_simple_type);
++  HOOK (eh, return_value_location);
++  HOOK (eh, register_info);
++
++  return MODVERSION;
++}
+Index: elfutils-0.164/backends/mips_regs.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/mips_regs.c
+@@ -0,0 +1,104 @@
++/* Register names and numbers for MIPS DWARF.
++   Copyright (C) 2006 Red Hat, Inc.
++   This file is part of Red Hat elfutils.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <dwarf.h>
++
++#define BACKEND mips_
++#include "libebl_CPU.h"
++
++ssize_t
++mips_register_info (Ebl *ebl __attribute__((unused)),
++		    int regno, char *name, size_t namelen,
++		    const char **prefix, const char **setname,
++		    int *bits, int *type)
++{
++  if (name == NULL)
++    return 66;
++
++  if (regno < 0 || regno > 65 || namelen < 4)
++    return -1;
++
++  *prefix = "$";
++
++  if (regno < 32)
++    {
++      *setname = "integer";
++      *type = DW_ATE_signed;
++      *bits = 32;
++      if (regno < 32 + 10)
++        {
++          name[0] = regno + '0';
++          namelen = 1;
++        }
++      else
++        {
++          name[0] = (regno / 10) + '0';
++          name[1] = (regno % 10) + '0';
++          namelen = 2;
++        }
++    }
++  else if (regno < 64)
++    {
++      *setname = "FPU";
++      *type = DW_ATE_float;
++      *bits = 32;
++      name[0] = 'f';
++      if (regno < 32 + 10)
++	{
++	  name[1] = (regno - 32) + '0';
++	  namelen = 2;
++	}
++      else
++	{
++	  name[1] = (regno - 32) / 10 + '0';
++	  name[2] = (regno - 32) % 10 + '0';
++	  namelen = 3;
++	}
++    }
++  else if (regno == 64)
++    {
++      *type = DW_ATE_signed;
++      *bits = 32;
++      name[0] = 'h';
++      name[1] = 'i';
++      namelen = 2;
++    }
++  else
++    {
++      *type = DW_ATE_signed;
++      *bits = 32;
++      name[0] = 'l';
++      name[1] = 'o';
++      namelen = 2;
++    }
++
++  name[namelen++] = '\0';
++  return namelen;
++}
+Index: elfutils-0.164/backends/mips_reloc.def
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/mips_reloc.def
+@@ -0,0 +1,79 @@
++/* List the relocation types for mips.  -*- C -*-
++   Copyright (C) 2006 Red Hat, Inc.
++   This file is part of Red Hat elfutils.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++/* 	    NAME,		REL|EXEC|DYN	*/
++
++RELOC_TYPE (NONE,               0)
++RELOC_TYPE (16,                 0)
++RELOC_TYPE (32,                 0)
++RELOC_TYPE (REL32,              0)
++RELOC_TYPE (26,                 0)
++RELOC_TYPE (HI16,               0)
++RELOC_TYPE (LO16,               0)
++RELOC_TYPE (GPREL16,            0)
++RELOC_TYPE (LITERAL,            0)
++RELOC_TYPE (GOT16,              0)
++RELOC_TYPE (PC16,               0)
++RELOC_TYPE (CALL16,             0)
++RELOC_TYPE (GPREL32,            0)
++
++RELOC_TYPE (SHIFT5,             0)
++RELOC_TYPE (SHIFT6,             0)
++RELOC_TYPE (64,                 0)
++RELOC_TYPE (GOT_DISP,           0)
++RELOC_TYPE (GOT_PAGE,           0)
++RELOC_TYPE (GOT_OFST,           0)
++RELOC_TYPE (GOT_HI16,           0)
++RELOC_TYPE (GOT_LO16,           0)
++RELOC_TYPE (SUB,                0)
++RELOC_TYPE (INSERT_A,           0)
++RELOC_TYPE (INSERT_B,           0)
++RELOC_TYPE (DELETE,             0)
++RELOC_TYPE (HIGHER,             0)
++RELOC_TYPE (HIGHEST,            0)
++RELOC_TYPE (CALL_HI16,          0)
++RELOC_TYPE (CALL_LO16,          0)
++RELOC_TYPE (SCN_DISP,           0)
++RELOC_TYPE (REL16,              0)
++RELOC_TYPE (ADD_IMMEDIATE,      0)
++RELOC_TYPE (PJUMP,              0)
++RELOC_TYPE (RELGOT,             0)
++RELOC_TYPE (JALR,               0)
++RELOC_TYPE (TLS_DTPMOD32,       0)
++RELOC_TYPE (TLS_DTPREL32,       0)
++RELOC_TYPE (TLS_DTPMOD64,       0)
++RELOC_TYPE (TLS_DTPREL64,       0)
++RELOC_TYPE (TLS_GD,             0)
++RELOC_TYPE (TLS_LDM,            0)
++RELOC_TYPE (TLS_DTPREL_HI16,    0)
++RELOC_TYPE (TLS_DTPREL_LO16,    0)
++RELOC_TYPE (TLS_GOTTPREL,       0)
++RELOC_TYPE (TLS_TPREL32,        0)
++RELOC_TYPE (TLS_TPREL64,        0)
++RELOC_TYPE (TLS_TPREL_HI16,     0)
++RELOC_TYPE (TLS_TPREL_LO16,     0)
++
++#define NO_COPY_RELOC 1
++#define NO_RELATIVE_RELOC 1
+Index: elfutils-0.164/backends/mips_retval.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/mips_retval.c
+@@ -0,0 +1,321 @@
++/* Function return value location for Linux/mips ABI.
++   Copyright (C) 2005 Red Hat, Inc.
++   This file is part of Red Hat elfutils.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <string.h>
++#include <assert.h>
++#include <dwarf.h>
++#include <elf.h>
++
++#include "../libebl/libeblP.h"
++#include "../libdw/libdwP.h"
++
++#define BACKEND mips_
++#include "libebl_CPU.h"
++
++/* The ABI of the file.  Also see EF_MIPS_ABI2 above. */
++#define EF_MIPS_ABI		0x0000F000
++
++/* The original o32 abi. */
++#define E_MIPS_ABI_O32          0x00001000
++
++/* O32 extended to work on 64 bit architectures */
++#define E_MIPS_ABI_O64          0x00002000
++
++/* EABI in 32 bit mode */
++#define E_MIPS_ABI_EABI32       0x00003000
++
++/* EABI in 64 bit mode */
++#define E_MIPS_ABI_EABI64       0x00004000
++
++/* All the possible MIPS ABIs. */
++enum mips_abi
++  {
++    MIPS_ABI_UNKNOWN = 0,
++    MIPS_ABI_N32,
++    MIPS_ABI_O32,
++    MIPS_ABI_N64,
++    MIPS_ABI_O64,
++    MIPS_ABI_EABI32,
++    MIPS_ABI_EABI64,
++    MIPS_ABI_LAST
++  };
++
++/* Find the mips ABI of the current file */
++enum mips_abi find_mips_abi(Elf *elf)
++{
++  GElf_Ehdr ehdr_mem;
++  GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
++
++  if (ehdr == NULL)
++    return MIPS_ABI_LAST;
++
++  GElf_Word elf_flags = ehdr->e_flags;
++
++  /* Check elf_flags to see if it specifies the ABI being used.  */
++  switch ((elf_flags & EF_MIPS_ABI))
++    {
++    case E_MIPS_ABI_O32:
++      return MIPS_ABI_O32;
++    case E_MIPS_ABI_O64:
++      return MIPS_ABI_O64;
++    case E_MIPS_ABI_EABI32:
++      return MIPS_ABI_EABI32;
++    case E_MIPS_ABI_EABI64:
++      return MIPS_ABI_EABI64;
++    default:
++      if ((elf_flags & EF_MIPS_ABI2))
++	return MIPS_ABI_N32;
++    }
++
++  /* GCC creates a pseudo-section whose name describes the ABI.  */
++  size_t shstrndx;
++  if (elf_getshdrstrndx (elf, &shstrndx) < 0)
++    return MIPS_ABI_LAST;
++
++  const char *name;
++  Elf_Scn *scn = NULL;
++  while ((scn = elf_nextscn (elf, scn)) != NULL)
++    {
++      GElf_Shdr shdr_mem;
++      GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
++      if (shdr == NULL)
++        return MIPS_ABI_LAST;
++
++      name = elf_strptr (elf, shstrndx, shdr->sh_name) ?: "";
++      if (strncmp (name, ".mdebug.", 8) != 0)
++        continue;
++
++      if (strcmp (name, ".mdebug.abi32") == 0)
++        return MIPS_ABI_O32;
++      else if (strcmp (name, ".mdebug.abiN32") == 0)
++        return MIPS_ABI_N32;
++      else if (strcmp (name, ".mdebug.abi64") == 0)
++        return MIPS_ABI_N64;
++      else if (strcmp (name, ".mdebug.abiO64") == 0)
++        return MIPS_ABI_O64;
++      else if (strcmp (name, ".mdebug.eabi32") == 0)
++        return MIPS_ABI_EABI32;
++      else if (strcmp (name, ".mdebug.eabi64") == 0)
++        return MIPS_ABI_EABI64;
++      else
++        return MIPS_ABI_UNKNOWN;
++    }
++
++  return MIPS_ABI_UNKNOWN;
++}
++
++unsigned int
++mips_abi_regsize (enum mips_abi abi)
++{
++  switch (abi)
++    {
++    case MIPS_ABI_EABI32:
++    case MIPS_ABI_O32:
++      return 4;
++    case MIPS_ABI_N32:
++    case MIPS_ABI_N64:
++    case MIPS_ABI_O64:
++    case MIPS_ABI_EABI64:
++      return 8;
++    case MIPS_ABI_UNKNOWN:
++    case MIPS_ABI_LAST:
++    default:
++      return 0;
++    }
++}
++
++
++/* $v0 or pair $v0, $v1 */
++static const Dwarf_Op loc_intreg_o32[] =
++  {
++    { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 4 },
++    { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 4 },
++  };
++
++static const Dwarf_Op loc_intreg[] =
++  {
++    { .atom = DW_OP_reg2 }, { .atom = DW_OP_piece, .number = 8 },
++    { .atom = DW_OP_reg3 }, { .atom = DW_OP_piece, .number = 8 },
++  };
++#define nloc_intreg	1
++#define nloc_intregpair	4
++
++/* $f0 (float), or pair $f0, $f1 (double).
++ * f2/f3 are used for COMPLEX (= 2 doubles) returns in Fortran */
++static const Dwarf_Op loc_fpreg_o32[] =
++  {
++    { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 4 },
++    { .atom = DW_OP_regx, .number = 33 }, { .atom = DW_OP_piece, .number = 4 },
++    { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 4 },
++    { .atom = DW_OP_regx, .number = 35 }, { .atom = DW_OP_piece, .number = 4 },
++  };
++
++/* $f0, or pair $f0, $f2.  */
++static const Dwarf_Op loc_fpreg[] =
++  {
++    { .atom = DW_OP_regx, .number = 32 }, { .atom = DW_OP_piece, .number = 8 },
++    { .atom = DW_OP_regx, .number = 34 }, { .atom = DW_OP_piece, .number = 8 },
++  };
++#define nloc_fpreg  1
++#define nloc_fpregpair 4
++#define nloc_fpregquad 8
++
++/* The return value is a structure and is actually stored in stack space
++   passed in a hidden argument by the caller.  But, the compiler
++   helpfully returns the address of that space in $v0.  */
++static const Dwarf_Op loc_aggregate[] =
++  {
++    { .atom = DW_OP_breg2, .number = 0 }
++  };
++#define nloc_aggregate 1
++
++int
++mips_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
++{
++  /* First find the ABI used by the elf object */
++  enum mips_abi abi = find_mips_abi(functypedie->cu->dbg->elf);
++
++  /* Something went seriously wrong while trying to figure out the ABI */
++  if (abi == MIPS_ABI_LAST)
++    return -1;
++
++  /* We couldn't identify the ABI, but the file seems valid */
++  if (abi == MIPS_ABI_UNKNOWN)
++    return -2;
++
++  /* Can't handle EABI variants */
++  if ((abi == MIPS_ABI_EABI32) || (abi == MIPS_ABI_EABI64))
++    return -2;
++
++  unsigned int regsize = mips_abi_regsize (abi);
++  if (!regsize)
++    return -2;
++
++  /* Start with the function's type, and get the DW_AT_type attribute,
++     which is the type of the return value.  */
++
++  Dwarf_Attribute attr_mem;
++  Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type, &attr_mem);
++  if (attr == NULL)
++    /* The function has no return value, like a `void' function in C.  */
++    return 0;
++
++  Dwarf_Die die_mem;
++  Dwarf_Die *typedie = dwarf_formref_die (attr, &die_mem);
++  int tag = dwarf_tag (typedie);
++
++  /* Follow typedefs and qualifiers to get to the actual type.  */
++  while (tag == DW_TAG_typedef
++	 || tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
++	 || tag == DW_TAG_restrict_type)
++    {
++      attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++      typedie = dwarf_formref_die (attr, &die_mem);
++      tag = dwarf_tag (typedie);
++    }
++
++  switch (tag)
++    {
++    case -1:
++      return -1;
++
++    case DW_TAG_subrange_type:
++      if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
++	{
++	  attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
++	  typedie = dwarf_formref_die (attr, &die_mem);
++	  tag = dwarf_tag (typedie);
++	}
++      /* Fall through.  */
++
++    case DW_TAG_base_type:
++    case DW_TAG_enumeration_type:
++    case DW_TAG_pointer_type:
++    case DW_TAG_ptr_to_member_type:
++      {
++        Dwarf_Word size;
++	if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
++					 &attr_mem), &size) != 0)
++	  {
++	    if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
++	      size = regsize;
++	    else
++	      return -1;
++	  }
++	if (tag == DW_TAG_base_type)
++	  {
++	    Dwarf_Word encoding;
++	    if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
++					     &attr_mem), &encoding) != 0)
++	      return -1;
++
++#define ABI_LOC(loc, regsize) ((regsize) == 4 ? (loc ## _o32) : (loc))
++
++	    if (encoding == DW_ATE_float)
++	      {
++		*locp = ABI_LOC(loc_fpreg, regsize);
++		if (size <= regsize)
++		    return nloc_fpreg;
++
++		if (size <= 2*regsize)
++                  return nloc_fpregpair;
++
++		if (size <= 4*regsize && abi == MIPS_ABI_O32)
++                  return nloc_fpregquad;
++
++		goto aggregate;
++	      }
++	  }
++	*locp = ABI_LOC(loc_intreg, regsize);
++	if (size <= regsize)
++	  return nloc_intreg;
++	if (size <= 2*regsize)
++	  return nloc_intregpair;
++
++	/* Else fall through. Shouldn't happen though (at least with gcc) */
++      }
++
++    case DW_TAG_structure_type:
++    case DW_TAG_class_type:
++    case DW_TAG_union_type:
++    case DW_TAG_array_type:
++    aggregate:
++      /* XXX TODO: Can't handle structure return with other ABI's yet :-/ */
++      if ((abi != MIPS_ABI_O32) && (abi != MIPS_ABI_O64))
++        return -2;
++
++      *locp = loc_aggregate;
++      return nloc_aggregate;
++    }
++
++  /* XXX We don't have a good way to return specific errors from ebl calls.
++     This value means we do not understand the type, but it is well-formed
++     DWARF and might be valid.  */
++  return -2;
++}
+Index: elfutils-0.164/backends/mips_symbol.c
+===================================================================
+--- /dev/null
++++ elfutils-0.164/backends/mips_symbol.c
+@@ -0,0 +1,52 @@
++/* MIPS specific symbolic name handling.
++   Copyright (C) 2002, 2003, 2005 Red Hat, Inc.
++   This file is part of Red Hat elfutils.
++   Written by Jakub Jelinek <jakub@redhat.com>, 2002.
++
++   Red Hat elfutils is free software; you can redistribute it and/or modify
++   it under the terms of the GNU General Public License as published by the
++   Free Software Foundation; version 2 of the License.
++
++   Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation,
++   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
++
++   Red Hat elfutils is an included package of the Open Invention Network.
++   An included package of the Open Invention Network is a package for which
++   Open Invention Network licensees cross-license their patents.  No patent
++   license is granted, either expressly or impliedly, by designation as an
++   included package.  Should you wish to participate in the Open Invention
++   Network licensing program, please visit www.openinventionnetwork.com
++   <http://www.openinventionnetwork.com>.  */
++
++#ifdef HAVE_CONFIG_H
++# include <config.h>
++#endif
++
++#include <elf.h>
++#include <stddef.h>
++
++#define BACKEND		mips_
++#include "libebl_CPU.h"
++
++/* Check for the simple reloc types.  */
++Elf_Type
++mips_reloc_simple_type (Ebl *ebl __attribute__ ((unused)), int type)
++{
++  switch (type)
++    {
++    case R_MIPS_16:
++      return ELF_T_HALF;
++    case R_MIPS_32:
++      return ELF_T_WORD;
++    case R_MIPS_64:
++      return ELF_T_XWORD;
++    default:
++      return ELF_T_NUM;
++    }
++}
+Index: elfutils-0.164/libebl/eblopenbackend.c
+===================================================================
+--- elfutils-0.164.orig/libebl/eblopenbackend.c
++++ elfutils-0.164/libebl/eblopenbackend.c
+@@ -71,6 +71,8 @@ static const struct
+   { "sparc", "elf_sparc", "sparc", 5, EM_SPARC, 0, 0 },
+   { "sparc", "elf_sparcv8plus", "sparc", 5, EM_SPARC32PLUS, 0, 0 },
+   { "s390", "ebl_s390", "s390", 4, EM_S390, 0, 0 },
++  { "mips", "elf_mips", "mips", 4, EM_MIPS, 0, 0 },
++  { "mips", "elf_mipsel", "mipsel", 4, EM_MIPS_RS3_LE, 0, 0 },
+ 
+   { "m32", "elf_m32", "m32", 3, EM_M32, 0, 0 },
+   { "m68k", "elf_m68k", "m68k", 4, EM_68K, 0, 0 },
+Index: elfutils-0.164/backends/common-reloc.c
+===================================================================
+--- elfutils-0.164.orig/backends/common-reloc.c
++++ elfutils-0.164/backends/common-reloc.c
+@@ -125,11 +125,13 @@ EBLHOOK(reloc_valid_use) (Elf *elf, int
+ }
+ 
+ 
++#ifndef NO_COPY_RELOC
+ bool
+ EBLHOOK(copy_reloc_p) (int reloc)
+ {
+   return reloc == R_TYPE (COPY);
+ }
++#endif
+ 
+ bool
+ EBLHOOK(none_reloc_p) (int reloc)
+@@ -151,7 +153,9 @@ EBLHOOK(init_reloc) (Ebl *ebl)
+   ebl->reloc_type_name = EBLHOOK(reloc_type_name);
+   ebl->reloc_type_check = EBLHOOK(reloc_type_check);
+   ebl->reloc_valid_use = EBLHOOK(reloc_valid_use);
++#ifndef NO_COPY_RELOC
+   ebl->copy_reloc_p = EBLHOOK(copy_reloc_p);
++#endif
+   ebl->none_reloc_p = EBLHOOK(none_reloc_p);
+ #ifndef NO_RELATIVE_RELOC
+   ebl->relative_reloc_p = EBLHOOK(relative_reloc_p);
+Index: elfutils-0.164/backends/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/backends/Makefile.am
++++ elfutils-0.164/backends/Makefile.am
+@@ -33,12 +33,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/libebl -I
+ 
+ 
+ modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
+-	  tilegx parisc
++	  tilegx parisc mips
+ libebl_pic = libebl_i386_pic.a libebl_sh_pic.a libebl_x86_64_pic.a    \
+ 	     libebl_ia64_pic.a libebl_alpha_pic.a libebl_arm_pic.a    \
+ 	     libebl_aarch64_pic.a libebl_sparc_pic.a libebl_ppc_pic.a \
+ 	     libebl_ppc64_pic.a libebl_s390_pic.a libebl_tilegx_pic.a \
+-	     libebl_parisc_pic.a
++	     libebl_parisc_pic.a libebl_mips_pic.a
+ noinst_LIBRARIES = $(libebl_pic)
+ noinst_DATA = $(libebl_pic:_pic.a=.so)
+ 
+@@ -116,6 +116,10 @@ parisc_SRCS = parisc_init.c parisc_symbo
+ libebl_parisc_pic_a_SOURCES = $(parisc_SRCS)
+ am_libebl_parisc_pic_a_OBJECTS = $(parisc_SRCS:.c=.os)
+ 
++mips_SRCS = mips_init.c mips_symbol.c mips_regs.c mips_retval.c
++libebl_mips_pic_a_SOURCES = $(mips_SRCS)
++am_libebl_mips_pic_a_OBJECTS = $(mips_SRCS:.c=.os)
++
+ libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw)
+ 	@rm -f $(@:.so=.map)
+ 	$(AM_V_at)echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_readelf_w.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_readelf_w.patch
new file mode 100644
index 0000000..930d6f6
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/mips_readelf_w.patch
@@ -0,0 +1,22 @@
+From: Kurt Roeckx <kurt@roeckx.be>
+Subject: Make readelf -w output debug information on mips
+Bug-Debian: http://bugs.debian.org/662041
+Forwarded: not-needed
+
+Upstreams wants a change where this is handled by a hook that needs
+to be filled in by the backend for the arch.
+
+Index: elfutils-0.164/src/readelf.c
+===================================================================
+--- elfutils-0.164.orig/src/readelf.c
++++ elfutils-0.164/src/readelf.c
+@@ -8218,7 +8218,8 @@ print_debug (Dwfl_Module *dwflmod, Ebl *
+       GElf_Shdr shdr_mem;
+       GElf_Shdr *shdr = gelf_getshdr (scn, &shdr_mem);
+ 
+-      if (shdr != NULL && shdr->sh_type == SHT_PROGBITS)
++      if (shdr != NULL && (
++	 (shdr->sh_type == SHT_PROGBITS) || (shdr->sh_type == SHT_MIPS_DWARF)))
+ 	{
+ 	  static const struct
+ 	  {
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch
new file mode 100644
index 0000000..d31961f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/shadow.patch
@@ -0,0 +1,23 @@
+Fix control path where we have str as uninitialized string
+
+| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c: In function 'i386_disasm':
+| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5: error: 'str' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+|      memcpy (buf + bufcnt, _str, _len);           \
+|      ^
+| /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17: note: 'str' was declared here
+|      const char *str;
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: elfutils-0.164/libcpu/i386_disasm.c
+===================================================================
+--- elfutils-0.164.orig/libcpu/i386_disasm.c
++++ elfutils-0.164/libcpu/i386_disasm.c
+@@ -821,6 +821,7 @@ i386_disasm (const uint8_t **startp, con
+ 			    }
+ 
+ 			default:
++			  str = "";
+ 			  assert (! "INVALID not handled");
+ 			}
+ 		    }
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/testsuite-ignore-elflint.diff b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/testsuite-ignore-elflint.diff
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.163/testsuite-ignore-elflint.diff
rename to yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/testsuite-ignore-elflint.diff
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
new file mode 100644
index 0000000..966b70f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils-0.164/uclibc-support.patch
@@ -0,0 +1,129 @@
+From 3daec2dd11a04955f95e8f65a48820103d84dbec Mon Sep 17 00:00:00 2001
+From: Junling Zheng <zhengjunling@huawei.com>
+Date: Thu, 9 Apr 2015 12:12:49 +0000
+Subject: [PATCH] uclibc support for elfutils 0.161
+
+on uclibc systems libintl and libuargp are separate from libc.
+so they need to be specified on commandline when we use proxy-libintl
+then libintl is a static archive so it should be listed last since
+elfutils does not respect disable-nls we need to link in libintl
+
+We add a new option --enable-uclibc which will be used to control
+the uclibc specific configurations during build.
+
+Upstream-Status: Inappropriate [uclibc specific]
+
+Signed-off-by: Khem Raj <raj.khem>
+Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
+[Junling Zheng:
+ - adjust context
+]
+---
+ configure.ac       | 8 ++++++++
+ libcpu/Makefile.am | 4 ++++
+ libdw/Makefile.am  | 7 ++++++-
+ libelf/Makefile.am | 5 +++++
+ 4 files changed, 23 insertions(+), 1 deletion(-)
+
+Index: elfutils-0.164/configure.ac
+===================================================================
+--- elfutils-0.164.orig/configure.ac
++++ elfutils-0.164/configure.ac
+@@ -66,6 +66,14 @@ AS_IF([test "$use_locks" = yes],
+ 
+ AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
+ 
++AC_ARG_ENABLE([uclibc],
++AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
++use_uclibc=yes, use_uclibc=no)
++AM_CONDITIONAL(USE_UCLIBC, test "$use_uclibc" = yes)
++AS_IF([test "$use_uclibc" = yes], [AC_DEFINE(USE_UCLIBC)])
++
++AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
++
+ AC_PROG_CC
+ AC_PROG_RANLIB
+ AC_PROG_YACC
+@@ -291,18 +299,13 @@ AC_LINK_IFELSE(
+ )
+ 
+ dnl If our libc doesn't provide argp, then test for libargp
+-if test "$libc_has_argp" = "false" ; then
+-	AC_MSG_WARN("libc does not have argp")
+-	AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
+-
+-	if test "$have_argp" = "false"; then
+-		AC_MSG_ERROR("no libargp found")
+-	else
+-		argp_LDADD="-largp"
+-	fi
+-else
+-	argp_LDADD=""
+-fi
++AS_IF([test "x$libc_has_argp" = "xfalse"],
++	[AC_MSG_WARN("libc does not have argp")
++	AC_CHECK_LIB([argp], [argp_parse], [have_argp="true" argp_LDADD="-largp"], [have_argp="false"])], [argp_LDADD=""])
++
++AS_IF([test "x$libc_has_argp" = "xfalse" -a "x$have_argp" = "xfalse"],
++	AC_CHECK_LIB([uargp], [argp_parse], [have_uargp="true" argp_LDADD="-luargp"], [have_uargp="false"])], [argp_LDADD=""])
++
+ AC_SUBST([argp_LDADD])
+ 
+ dnl The directories with content.
+Index: elfutils-0.164/libcpu/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/libcpu/Makefile.am
++++ elfutils-0.164/libcpu/Makefile.am
+@@ -80,6 +80,10 @@ i386_parse_CFLAGS = -DNMNES="`wc -l < i3
+ i386_lex.o: i386_parse.h
+ i386_gendis_LDADD = $(libeu) -lm
+ 
++if USE_UCLIBC
++i386_gendis_LDADD += -lintl
++endif
++
+ i386_parse.h: i386_parse.c ;
+ 
+ EXTRA_DIST = defs/i386
+Index: elfutils-0.164/libdw/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/libdw/Makefile.am
++++ elfutils-0.164/libdw/Makefile.am
+@@ -102,6 +102,11 @@ endif
+ libdw_pic_a_SOURCES =
+ am_libdw_pic_a_OBJECTS = $(libdw_a_SOURCES:.c=.os)
+ 
++libdw_so_LDLIBS =
++if USE_UCLIBC
++libdw_so_LDLIBS += -lintl
++endif
++
+ libdw_so_SOURCES =
+ libdw.so$(EXEEXT): $(srcdir)/libdw.map libdw_pic.a ../libdwelf/libdwelf_pic.a \
+ 	  ../libdwfl/libdwfl_pic.a ../libebl/libebl.a \
+@@ -112,7 +117,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l
+ 		-Wl,--enable-new-dtags,-rpath,$(pkglibdir) \
+ 		-Wl,--version-script,$<,--no-undefined \
+ 		-Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\
+-		-ldl $(argp_LDADD) $(zip_LIBS)
++		-ldl $(argp_LDADD) $(zip_LIBS) $(libdw_so_LDLIBS)
+ 	@$(textrel_check)
+ 	$(AM_V_at)ln -fs $@ $@.$(VERSION)
+ 
+Index: elfutils-0.164/libelf/Makefile.am
+===================================================================
+--- elfutils-0.164.orig/libelf/Makefile.am
++++ elfutils-0.164/libelf/Makefile.am
+@@ -93,7 +93,12 @@ libelf_a_SOURCES = elf_version.c elf_has
+ libelf_pic_a_SOURCES =
+ am_libelf_pic_a_OBJECTS = $(libelf_a_SOURCES:.c=.os)
+ 
++
+ libelf_so_LDLIBS =
++if USE_UCLIBC
++libelf_so_LDLIBS += -lintl
++endif
++
+ if USE_LOCKS
+ libelf_so_LDLIBS += -lpthread
+ endif
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils/mempcpy.patch b/yocto-poky/meta/recipes-devtools/elfutils/elfutils/mempcpy.patch
deleted file mode 100644
index 24e31fa..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils/mempcpy.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-
-uclibc does not export __mempcpy like glibc so we alias it here.
-This patch may make sense for upstream but elfutils uses more
-glibc specific features like obstack_printf which are missing in
-uclibc they need to be fixed along to make it work all the way
-
-Upstream-Status: Inappropriate[Elfutils uses more glibc specific features]
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: elfutils-0.148/libelf/elf_begin.c
-===================================================================
---- elfutils-0.148.orig/libelf/elf_begin.c
-+++ elfutils-0.148/libelf/elf_begin.c
-@@ -68,6 +68,9 @@
- #include "libelfP.h"
- #include "common.h"
- 
-+#ifdef __UCLIBC__
-+#define __mempcpy mempcpy
-+#endif
- 
- /* Create descriptor for archive in memory.  */
- static inline Elf *
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb b/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb
index 0d8490d..ff53257 100644
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.148.bb
@@ -27,7 +27,6 @@
         file://elf_additions.diff \
         file://elfutils-fsize.patch \
         file://remove-unused.patch \
-        file://mempcpy.patch \
         file://fix_for_gcc-4.7.patch \
         file://dso-link-change.patch \
         file://nm-Fix-size-passed-to-snprintf-for-invalid-sh_name-case.patch \
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.163.bb b/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.163.bb
deleted file mode 100644
index e391813..0000000
--- a/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.163.bb
+++ /dev/null
@@ -1,87 +0,0 @@
-SUMMARY = "Utilities and libraries for handling compiled object files"
-HOMEPAGE = "https://fedorahosted.org/elfutils"
-SECTION = "base"
-LICENSE = "(GPLv3 & Elfutils-Exception)"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "libtool bzip2 zlib virtual/libintl"
-
-SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/${BP}.tar.bz2"
-
-SRC_URI[md5sum] = "77ce87f259987d2e54e4d87b86cbee41"
-SRC_URI[sha256sum] = "7c774f1eef329309f3b05e730bdac50013155d437518a2ec0e24871d312f2e23"
-
-SRC_URI += "\
-        file://mempcpy.patch \
-        file://dso-link-change.patch \
-        file://Fix_elf_cvt_gunhash.patch \
-        file://fixheadercheck.patch \
-        file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
-        file://0001-remove-the-unneed-checking.patch \
-        file://0001-fix-a-stack-usage-warning.patch \
-"
-
-# pick the patch from debian
-# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.159-4.debian.tar.xz
-SRC_URI += "\
-        file://redhat-portability.diff \
-        file://hppa_backend.diff \
-        file://arm_backend.diff \
-        file://mips_backend.diff \
-        file://m68k_backend.diff \
-        file://testsuite-ignore-elflint.diff \
-        file://scanf-format.patch \
-        file://mips_readelf_w.patch \
-        file://arm_func_value.patch \
-        file://arm_unwind_ret_mask.patch \
-        file://non_linux.patch \
-"
-
-# Only apply when building uclibc based target recipe
-SRC_URI_append_libc-uclibc = " file://uclibc-support-for-elfutils-0.161.patch"
-
-# The buildsystem wants to generate 2 .h files from source using a binary it just built,
-# which can not pass the cross compiling, so let's work around it by adding 2 .h files
-# along with the do_configure_prepend()
-
-inherit autotools gettext
-
-EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
-EXTRA_OECONF_append_class-native = " --without-bzlib"
-EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
-
-do_install_append() {
-	if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
-		rm ${D}${bindir}/eu-objdump
-	fi
-}
-
-# we can not build complete elfutils when using uclibc
-# but some recipes e.g. gcc 4.5 depends on libelf so we
-# build only libelf for uclibc case
-
-EXTRA_OEMAKE_libc-uclibc = "-C libelf"
-EXTRA_OEMAKE_class-native = ""
-EXTRA_OEMAKE_class-nativesdk = ""
-
-BBCLASSEXTEND = "native nativesdk"
-
-# Package utilities separately
-PACKAGES =+ "${PN}-binutils libelf libasm libdw"
-FILES_${PN}-binutils = "\
-    ${bindir}/eu-addr2line \
-    ${bindir}/eu-ld \
-    ${bindir}/eu-nm \
-    ${bindir}/eu-readelf \
-    ${bindir}/eu-size \
-    ${bindir}/eu-strip"
-
-FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
-FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
-FILES_libdw  = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
-# Some packages have the version preceeding the .so instead properly
-# versioned .so.<version>, so we need to reorder and repackage.
-#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
-#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
-
-# The package contains symlinks that trip up insane
-INSANE_SKIP_${MLPREFIX}libdw = "dev-so"
diff --git a/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.164.bb b/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.164.bb
new file mode 100644
index 0000000..4964c05
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/elfutils/elfutils_0.164.bb
@@ -0,0 +1,89 @@
+SUMMARY = "Utilities and libraries for handling compiled object files"
+HOMEPAGE = "https://fedorahosted.org/elfutils"
+SECTION = "base"
+LICENSE = "(GPLv3 & Elfutils-Exception)"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "libtool bzip2 zlib virtual/libintl"
+DEPENDS_append_libc-musl = " argp-standalone fts "
+
+SRC_URI = "https://fedorahosted.org/releases/e/l/elfutils/${PV}/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "2e4536c1c48034f188a80789a59114d8"
+SRC_URI[sha256sum] = "9683c025928a12d06b7fe812928aa6235249e22d197d086f7084606a48165900"
+
+SRC_URI += "\
+        file://dso-link-change.patch \
+        file://Fix_elf_cvt_gunhash.patch \
+        file://fixheadercheck.patch \
+        file://0001-elf_getarsym-Silence-Werror-maybe-uninitialized-fals.patch \
+        file://0001-remove-the-unneed-checking.patch \
+        file://0001-fix-a-stack-usage-warning.patch \
+        file://aarch64_uio.patch \
+        file://shadow.patch \
+"
+
+# pick the patch from debian
+# http://ftp.de.debian.org/debian/pool/main/e/elfutils/elfutils_0.164-1.debian.tar.xz
+SRC_URI += "\
+        file://hppa_backend.diff \
+        file://arm_backend.diff \
+        file://mips_backend.diff \
+        file://m68k_backend.diff \
+        file://testsuite-ignore-elflint.diff \
+        file://mips_readelf_w.patch \
+        file://kfreebsd_path.patch \
+        file://0001-Ignore-differences-between-mips-machine-identifiers.patch \
+        file://0002-Add-support-for-mips64-abis-in-mips_retval.c.patch \
+        file://0003-Add-mips-n64-relocation-format-hack.patch \
+        file://uclibc-support.patch \
+"
+SRC_URI_append_libc-musl = " file://0001-build-Provide-alternatives-for-glibc-assumptions-hel.patch "
+
+# The buildsystem wants to generate 2 .h files from source using a binary it just built,
+# which can not pass the cross compiling, so let's work around it by adding 2 .h files
+# along with the do_configure_prepend()
+
+inherit autotools gettext
+
+EXTRA_OECONF = "--program-prefix=eu- --without-lzma"
+EXTRA_OECONF_append_class-native = " --without-bzlib"
+EXTRA_OECONF_append_libc-uclibc = " --enable-uclibc"
+
+do_install_append() {
+	if [ "${TARGET_ARCH}" != "x86_64" ] && [ -z `echo "${TARGET_ARCH}"|grep 'i.86'` ];then
+		rm -f ${D}${bindir}/eu-objdump
+	fi
+}
+
+# we can not build complete elfutils when using uclibc
+# but some recipes e.g. gcc 4.5 depends on libelf so we
+# build only libelf for uclibc case
+
+EXTRA_OEMAKE_libc-uclibc = "-C libelf"
+EXTRA_OEMAKE_class-native = ""
+EXTRA_OEMAKE_class-nativesdk = ""
+
+ALLOW_EMPTY_${PN}_libc-musl = "1"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Package utilities separately
+PACKAGES =+ "${PN}-binutils libelf libasm libdw"
+FILES_${PN}-binutils = "\
+    ${bindir}/eu-addr2line \
+    ${bindir}/eu-ld \
+    ${bindir}/eu-nm \
+    ${bindir}/eu-readelf \
+    ${bindir}/eu-size \
+    ${bindir}/eu-strip"
+
+FILES_libelf = "${libdir}/libelf-${PV}.so ${libdir}/libelf.so.*"
+FILES_libasm = "${libdir}/libasm-${PV}.so ${libdir}/libasm.so.*"
+FILES_libdw  = "${libdir}/libdw-${PV}.so ${libdir}/libdw.so.* ${libdir}/elfutils/lib*"
+# Some packages have the version preceeding the .so instead properly
+# versioned .so.<version>, so we need to reorder and repackage.
+#FILES_${PN} += "${libdir}/*-${PV}.so ${base_libdir}/*-${PV}.so"
+#FILES_SOLIBSDEV = "${libdir}/libasm.so ${libdir}/libdw.so ${libdir}/libelf.so"
+
+# The package contains symlinks that trip up insane
+INSANE_SKIP_${MLPREFIX}libdw = "dev-so"
diff --git a/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb b/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb
index 3c2aab4..b4dfe15 100644
--- a/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb
+++ b/yocto-poky/meta/recipes-devtools/expect/expect_5.45.bb
@@ -29,6 +29,9 @@
 SRC_URI[md5sum] = "44e1a4f4c877e9ddc5a542dfa7ecc92b"
 SRC_URI[sha256sum] = "b28dca90428a3b30e650525cdc16255d76bb6ccd65d448be53e620d95d5cc040"
 
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/expect/files/Expect/"
+UPSTREAM_CHECK_REGEX = "/Expect/(?P<pver>(\d+[\.\-_]*)+)/"
+
 S = "${WORKDIR}/${BPN}${PV}"
 
 do_install_append() {
@@ -48,9 +51,6 @@
                 "
 EXTRA_OEMAKE_install = " 'SCRIPTS=' "
 
-FILES_${PN}-dbg += "${libdir}/${BPN}${PV}/.debug \
-                    ${libdir}/.debug \
-                   "
 FILES_${PN}-dev = "${libdir_native}/expect${PV}/libexpect*.so \
                    ${includedir}/expect.h \
                    ${includedir}/expect_tcl.h \
diff --git a/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.0.bb b/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.0.bb
deleted file mode 100644
index f4b0e32..0000000
--- a/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks."
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-DEPENDS = "util-linux popt ncurses"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz"
-SRC_URI[md5sum] = "2061f917af084215898d4fea04d8388f"
-SRC_URI[sha256sum] = "5b66956743a799fc0471cdb032665c1391e82f9c5b3f1d7d726d29fe2ba01d6c"
-
-do_install() {
-    install -d ${D}${sbindir}
-    install -m 0755 cgdisk ${D}${sbindir}
-    install -m 0755 gdisk ${D}${sbindir}
-    install -m 0755 sgdisk ${D}${sbindir}
-    install -m 0755 fixparts ${D}${sbindir}
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb b/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
new file mode 100644
index 0000000..8fab28f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Utility for modifying GPT disk partitioning"
+DESCRIPTION = "GPT fdisk is a disk partitioning tool loosely modeled on Linux fdisk, but used for modifying GUID Partition Table (GPT) disks. The related FixParts utility fixes some common problems on Master Boot Record (MBR) disks."
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+DEPENDS = "util-linux popt ncurses"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${PV}/${BP}.tar.gz"
+SRC_URI[md5sum] = "d7f3d306b083123bcc6f5941efade586"
+SRC_URI[sha256sum] = "864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fdfaeac7"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/"
+UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P<pver>(\d+[\.\-_]*)+)/"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_install() {
+    install -d ${D}${sbindir}
+    install -m 0755 cgdisk ${D}${sbindir}
+    install -m 0755 gdisk ${D}${sbindir}
+    install -m 0755 sgdisk ${D}${sbindir}
+    install -m 0755 fixparts ${D}${sbindir}
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/file/file_5.24.bb b/yocto-poky/meta/recipes-devtools/file/file_5.24.bb
deleted file mode 100644
index d04f121..0000000
--- a/yocto-poky/meta/recipes-devtools/file/file_5.24.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "File classification tool"
-DESCRIPTION = "File attempts to classify files depending \
-on their contents and prints a description if a match is found."
-HOMEPAGE = "http://www.darwinsys.com/file/"
-SECTION = "console/utils"
-
-# two clause BSD
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
-
-DEPENDS = "zlib file-replacement-native"
-DEPENDS_class-native = "zlib-native"
-
-SRC_URI = "git://github.com/file/file.git \
-        file://debian-742262.patch \
-        file://0001-Add-P-prompt-into-Usage-info.patch \
-        file://host-file.patch \
-        "
-
-SRCREV = "3c0874be4d3232d672b20f513451a39cfd7c585a"
-S = "${WORKDIR}/git"
-
-inherit autotools
-
-EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
-EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
-
-FILES_${PN} += "${datadir}/misc/*.mgc"
-
-do_install_append_class-native() {
-	create_cmdline_wrapper ${D}/${bindir}/file \
-		--magic-file ${datadir}/misc/magic.mgc
-}
-
-do_install_append_class-nativesdk() {
-	create_cmdline_wrapper ${D}/${bindir}/file \
-		--magic-file ${datadir}/misc/magic.mgc
-}
-
-BBCLASSEXTEND = "native nativesdk"
-PROVIDES_append_class-native = " file-replacement-native"
-# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
-# depends on file-replacement-native.
-bindir_append_class-native = "/file-native"
diff --git a/yocto-poky/meta/recipes-devtools/file/file_5.25.bb b/yocto-poky/meta/recipes-devtools/file/file_5.25.bb
new file mode 100644
index 0000000..68bad69
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/file/file_5.25.bb
@@ -0,0 +1,47 @@
+SUMMARY = "File classification tool"
+DESCRIPTION = "File attempts to classify files depending \
+on their contents and prints a description if a match is found."
+HOMEPAGE = "http://www.darwinsys.com/file/"
+SECTION = "console/utils"
+
+# two clause BSD
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=2;md5=6a7382872edb68d33e1a9398b6e03188"
+
+DEPENDS = "zlib file-replacement-native"
+DEPENDS_class-native = "zlib-native"
+
+# Blacklist a bogus tag in upstream check
+UPSTREAM_CHECK_GITTAGREGEX = "FILE(?P<pver>(?!6_23).+)"
+
+SRC_URI = "git://github.com/file/file.git \
+        file://debian-742262.patch \
+        file://0001-Add-P-prompt-into-Usage-info.patch \
+        file://host-file.patch \
+        "
+
+SRCREV = "f45db89ddc91692b662fffbabbdafc7bc4c00f5e"
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
+EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
+
+FILES_${PN} += "${datadir}/misc/*.mgc"
+
+do_install_append_class-native() {
+	create_cmdline_wrapper ${D}/${bindir}/file \
+		--magic-file ${datadir}/misc/magic.mgc
+}
+
+do_install_append_class-nativesdk() {
+	create_cmdline_wrapper ${D}/${bindir}/file \
+		--magic-file ${datadir}/misc/magic.mgc
+}
+
+BBCLASSEXTEND = "native nativesdk"
+PROVIDES_append_class-native = " file-replacement-native"
+# Don't use NATIVE_PACKAGE_PATH_SUFFIX as that hides libmagic from anyone who
+# depends on file-replacement-native.
+bindir_append_class-native = "/file-native"
diff --git a/yocto-poky/meta/recipes-devtools/flex/files/run-ptest b/yocto-poky/meta/recipes-devtools/flex/files/run-ptest
deleted file mode 100755
index bffba16..0000000
--- a/yocto-poky/meta/recipes-devtools/flex/files/run-ptest
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/bin/sh
-
-test1="test-alloc-extra test-array-nr test-array-r test-basic-nr test-basic-r test-extended test-quotes \
-test-bison-nr test-bison-yylloc test-bison-yylval test-c++-basic test-c-cpp-nr test-prefix-nr test-ccl \
-test-c-cpp-r test-c++-multiple-scanners test-mem-r test-mem-nr test-debug-nr test-linedir-r test-noansi-r \
-test-yyextra test-header-r test-noansi-nr test-debug-r TEMPLATE test-top test-header-nr test-prefix-r"
-test2="test-multiple-scanners-nr test-posixly-correct test-posix test-string-r test-string-nr"
-test3="test-pthread test-include-by-push test-include-by-buffer test-include-by-reentrant"
-test4="test-lineno-nr test-lineno-r test-lineno-trailing"
-test5="test-c++-yywrap test-rescan-r test-rescan-nr"
-test6="test-reject-nr test-reject-r"
-test7="test-reject-ser test-reject-ver"
-test8="test-multiple-scanners-r"
-
-output() {
-  if [ $? -eq 0 ]; \
-    then echo "PASS: $i"; \
-    else echo "FAIL: $i"; \
-  fi;
-}
-
-for i in $test1; do $i/$i < $i/test.input >/dev/null; output; done
-for i in $test2; do $i/$i >/dev/null; output; done
-for i in $test3; do cd $i; ./$i test-1.input >/dev/null; output; cd ..; done
-for i in $test4; do test `$i/$i < $i/test.input` -eq `$i/$i 1 < $i/test.input` >/dev/null; output; done
-for i in $test5; do $i/$i $i/test.input >/dev/null; output; done
-for i in $test6; do test-reject/$i < test-reject/test.input >/dev/null; output; done
-for i in $test7; do test-reject/$i test-reject/$i.tables < test-reject/test.input >/dev/null; output; done
-cd $test8; ./$test8 >/dev/null; i=$test8 output
diff --git a/yocto-poky/meta/recipes-devtools/flex/flex.inc b/yocto-poky/meta/recipes-devtools/flex/flex.inc
deleted file mode 100644
index a4a26e2..0000000
--- a/yocto-poky/meta/recipes-devtools/flex/flex.inc
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "Flex (The Fast Lexical Analyzer)"
-DESCRIPTION = "Flex is a fast lexical analyser generator.  Flex is a tool for generating programs that recognize \
-lexical patterns in text."
-HOMEPAGE = "http://sourceforge.net/projects/flex/"
-
-SECTION = "devel"
-LICENSE = "BSD"
-DEPENDS += "${@'bison-native flex-native' if '${PTEST_ENABLED}' == '1' else ''}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
-           file://run-ptest \
-"
-
-inherit autotools gettext texinfo ptest
-
-
-M4 = "${bindir}/m4"
-M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
-
-EXTRA_OECONF += "ac_cv_path_M4=${M4}"
-EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
-
-do_install_append_class-native() {
-	create_wrapper ${D}/${bindir}/flex M4=${M4}
-}
-
-do_install_append_class-nativesdk() {
-	create_wrapper ${D}/${bindir}/flex M4=${M4}
-}
-
-RDEPENDS_${PN} += "m4"
-
-do_compile_ptest() {
-	for i in `find ${S}/tests/ -type d |grep -Ev "concatenated-options|reject|table-opts" | awk -F/ '{print $NF}'`; \
-	  do oe_runmake -C ${S}/tests/$i -f ${B}/tests/$i/Makefile top_builddir=${B} FLEX=flex $i; \
-	done
-	oe_runmake -C ${S}/tests/test-reject -f ${B}/tests/test-reject/Makefile top_builddir=${B} FLEX=flex test-reject-nr test-reject-r test-reject-ser test-reject-ver
-}
-
-do_install_ptest() {
-	for i in `find ${S}/tests/ -type d | awk -F/ '{print $NF}'`; \
-	  do cp -r ${S}/tests/$i ${D}${PTEST_PATH}; \
-	done
-}
diff --git a/yocto-poky/meta/recipes-devtools/flex/flex/0001-tests-add-a-target-for-building-tests-without-runnin.patch b/yocto-poky/meta/recipes-devtools/flex/flex/0001-tests-add-a-target-for-building-tests-without-runnin.patch
new file mode 100644
index 0000000..556c240
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/flex/flex/0001-tests-add-a-target-for-building-tests-without-runnin.patch
@@ -0,0 +1,28 @@
+From b4aa18d939fc0c8825fa584dfcee1a7da61099cf Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 10 Dec 2015 16:09:26 +0200
+Subject: [PATCH] tests: add a target for building tests without running them
+
+Upstream-Status: Inappropriate [oe specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tests/Makefile.am | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 4ac3c17..0025cfe 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -21,6 +21,9 @@
+ 
+ TESTS = $(check_PROGRAMS) options.cn
+ 
++# This allows building tests without running them
++buildtests: $(TESTS)
++
+ # The script testwrapper.sh will run most tests as is. A couple tests
+ # in the suite end in .reject, .table and the like so that we can pass
+ # different arguments to the test runner. We list those extensions so
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-devtools/flex/flex/disable-tests.patch b/yocto-poky/meta/recipes-devtools/flex/flex/disable-tests.patch
new file mode 100644
index 0000000..4dc801d
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/flex/flex/disable-tests.patch
@@ -0,0 +1,19 @@
+Due to automake stupidity the Makefile in tests/ has an 'all' target that
+depends on $(BUILD_SOURCES), which means when building flex parts of the test
+suite are built even if they're not needed, resulting in flex needing
+flex-native and bison-native to build.
+
+This patch removes the tests directory from SUBDIRS and will be conditionally
+applied by the recipe.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.am b/Makefile.am
+index 076ccad..0574d7b 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -55,3 +55,2 @@ SUBDIRS = \
+ 	po \
+-	tests \
+ 	tools
diff --git a/yocto-poky/meta/recipes-devtools/flex/files/do_not_create_pdf_doc.patch b/yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/flex/files/do_not_create_pdf_doc.patch
rename to yocto-poky/meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
diff --git a/yocto-poky/meta/recipes-devtools/flex/flex/run-ptest b/yocto-poky/meta/recipes-devtools/flex/flex/run-ptest
new file mode 100755
index 0000000..19db337
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/flex/flex/run-ptest
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# make would want to rebuild some files with a compiler otherwise :-/
+make FLEX=/usr/bin/flex -t check-TESTS || true
+make FLEX=/usr/bin/flex check-TESTS
diff --git a/yocto-poky/meta/recipes-devtools/flex/flex_2.5.39.bb b/yocto-poky/meta/recipes-devtools/flex/flex_2.5.39.bb
deleted file mode 100644
index 7485743..0000000
--- a/yocto-poky/meta/recipes-devtools/flex/flex_2.5.39.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require flex.inc
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI += "file://do_not_create_pdf_doc.patch"
-
-SRC_URI[md5sum] = "77d44c6bb8c0705e0017ab9a84a1502b"
-SRC_URI[sha256sum] = "add2b55f3bc38cb512b48fad7d72f43b11ef244487ff25fc00aabec1e32b617f"
diff --git a/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb b/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
new file mode 100644
index 0000000..8285426
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/flex/flex_2.6.0.bb
@@ -0,0 +1,55 @@
+SUMMARY = "Flex (The Fast Lexical Analyzer)"
+DESCRIPTION = "Flex is a fast lexical analyser generator.  Flex is a tool for generating programs that recognize \
+lexical patterns in text."
+HOMEPAGE = "http://sourceforge.net/projects/flex/"
+SECTION = "devel"
+LICENSE = "BSD"
+
+DEPENDS = "${@bb.utils.contains('PTEST_ENABLED', '1', 'bison-native flex-native', '', d)}"
+BBCLASSEXTEND = "native nativesdk"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4742cf92e89040b39486a6219b68067"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/flex/flex-${PV}.tar.bz2 \
+           file://run-ptest \
+           file://do_not_create_pdf_doc.patch \
+           file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \
+           ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
+           "
+
+SRC_URI[md5sum] = "266270f13c48ed043d95648075084d59"
+SRC_URI[sha256sum] = "24e611ef5a4703a191012f80c1027dc9d12555183ce0ecd46f3636e587e9b8e9"
+
+UPSTREAM_CHECK_REGEX = "flex-(?P<pver>\d+(\.\d+)+)\.tar"
+
+inherit autotools gettext texinfo ptest
+
+M4 = "${bindir}/m4"
+M4_class-native = "${STAGING_BINDIR_NATIVE}/m4"
+EXTRA_OECONF += "ac_cv_path_M4=${M4}"
+EXTRA_OEMAKE += "m4=${STAGING_BINDIR_NATIVE}/m4"
+
+EXTRA_OEMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', 'FLEX=${STAGING_BINDIR_NATIVE}/flex', '', d)}"
+
+do_install_append_class-native() {
+	create_wrapper ${D}/${bindir}/flex M4=${M4}
+}
+
+do_install_append_class-nativesdk() {
+	create_wrapper ${D}/${bindir}/flex M4=${M4}
+}
+
+RDEPENDS_${PN} += "m4"
+RDEPENDS_${PN}-ptest += "bash gawk"
+
+do_compile_ptest() {
+	oe_runmake -C ${B}/tests -f ${B}/tests/Makefile top_builddir=${B} INCLUDES=-I${S}/src buildtests
+}
+
+do_install_ptest() {
+	mkdir -p ${D}${PTEST_PATH}/build-aux/
+	cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
+	cp -r ${S}/tests/* ${D}${PTEST_PATH}
+	cp -r ${B}/tests/* ${D}${PTEST_PATH}
+	sed -e 's/^Makefile:/_Makefile:/' -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./'  -i ${D}${PTEST_PATH}/Makefile
+}
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8.inc
deleted file mode 100644
index b3e1c33..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ /dev/null
@@ -1,119 +0,0 @@
-require gcc-common.inc
-
-# Third digit in PV should be incremented after a minor release
-
-PV = "4.8.4"
-
-# BINV should be incremented to a revision after a minor gcc release
-
-BINV = "4.8.4"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-4.8:"
-
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
-
-LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-
-LIC_FILES_CHKSUM = "\
-    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
-    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
-    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-    file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
-"
-
-SRC_URI = "\
-    ${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
-    file://0002-uclibc-conf.patch \
-    file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
-    file://0004-uclibc-locale.patch \
-    file://0005-uclibc-locale-no__x.patch \
-    file://0006-uclibc-locale-wchar_fix.patch \
-    file://0007-uclibc-locale-update.patch \
-    file://0008-missing-execinfo_h.patch \
-    file://0009-c99-snprintf.patch \
-    file://0010-c99-complex-ugly-hack.patch \
-    file://0011-index_macro.patch \
-    file://0012-libmudflap-susv3-legacy.patch \
-    file://0013-libstdc-namespace.patch \
-    file://0014-sh-pr24836.patch \
-    file://0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch \
-    file://0016-gcc-poison-system-directories.patch \
-    file://0017-gcc-poison-dir-extend.patch \
-    file://0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
-    file://0019-64-bit-multilib-hack.patch \
-    file://0020-optional-libstdc.patch \
-    file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
-    file://0022-COLLECT_GCC_OPTIONS.patch \
-    file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
-    file://0024-PR-target-32219.patch \
-    file://0025-fortran-cross-compile-hack.patch \
-    file://0026-libgcc-sjlj-check.patch \
-    file://0027-cpp-honor-sysroot.patch \
-    file://0028-MIPS64-Default-to-N64-ABI.patch \
-    file://0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
-    file://0030-gcc-Fix-argument-list-too-long-error.patch \
-    file://0031-Disable-sdt.patch \
-    file://0032-libtool.patch \
-    file://0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
-    file://0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
-    file://0035-wcast-qual-PR-55383.patch \
-    file://0038-gcc-4.8-build-args.patch \
-    file://0040-fix-g++-sysroot.patch \
-    file://0041-libtool-avoid-libdir.patch \
-    file://0042-pr57748.patch \
-    file://0043-cpp.patch \
-    file://0044-gengtypes.patch \
-    file://0046-libatomic-deptracking.patch \
-    file://0047-repomembug.patch \
-    file://0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
-    file://target-gcc-includedir.patch \
-    file://0051-gcc-483-universal-initializer-no-warning.patch \
-"
-SRC_URI[md5sum] = "5a84a30839b2aca22a2d723de2a626ec"
-SRC_URI[sha256sum] = "4a80aa23798b8e9b5793494b8c976b39b8d9aa2e53cd5ed5534aff662a7f8695"
-
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-
-# Language Overrides
-FORTRAN = ""
-JAVA = ""
-
-LTO = "--enable-lto"
-
-EXTRA_OECONF_BASE = "\
-    ${LTO} \
-    --enable-libssp \
-    --disable-bootstrap \
-    --disable-libmudflap \
-    --with-system-zlib \
-    --with-linker-hash-style=${LINKER_HASH_STYLE} \
-    --enable-linker-build-id \
-    --with-ppl=no \
-    --with-cloog=no \
-    --enable-checking=release \
-    --enable-cheaders=c_global \
-"
-
-EXTRA_OECONF_INITIAL = "\
-    --disable-libmudflap \
-    --disable-libgomp \
-    --disable-libssp \
-    --disable-libquadmath \
-    --with-system-zlib \
-    --disable-lto \
-    --disable-plugin \
-    --enable-decimal-float=no \
-"
-
-EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-
-EXTRA_OECONF_PATHS = "\ 
-    --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++/${BINV} \ 
-    --with-sysroot=${STAGING_DIR_TARGET} \ 
-    --with-build-sysroot=${STAGING_DIR_TARGET} \
-"
-
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
deleted file mode 100644
index e588011..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From bf3d96ae58fa180b8b468d25dc2e0209daca2751 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:37:11 +0400
-Subject: [PATCH 01/35] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- configure    |    2 +-
- configure.ac |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index d809535..1b76c90 100755
---- a/configure
-+++ b/configure
-@@ -7439,7 +7439,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
- 
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
-  *" newlib "*)
-   case " $target_configargs " in
-diff --git a/configure.ac b/configure.ac
-index 48ec1aa..89d1d3f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -2873,7 +2873,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
- 
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
-  *" newlib "*)
-   case " $target_configargs " in
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0002-uclibc-conf.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0002-uclibc-conf.patch
deleted file mode 100644
index dda3b10..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0002-uclibc-conf.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From d030973c872c00d916921d84deee0af2c0d38081 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:38:25 +0400
-Subject: [PATCH 02/35] uclibc-conf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- contrib/regression/objs-gcc.sh |    4 ++++
- libjava/classpath/ltconfig     |    4 ++--
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
-index 60b0497..6dc7ead 100755
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
-  then
-   make all-gdb all-dejagnu all-ld || exit 1
-   make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+  make all-gdb all-dejagnu all-ld || exit 1
-+  make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
-   make bootstrap || exit 1
-   make install || exit 1
-diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
-index 743d951..ae4ea60 100755
---- a/libjava/classpath/ltconfig
-+++ b/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- 
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
- 
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
-   ;;
- 
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0003-gcc-uclibc-locale-ctype_touplow_t.patch
deleted file mode 100644
index 7098e99..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0003-gcc-uclibc-locale-ctype_touplow_t.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From d2d9dd756c4356d14dd7ae003856344cb4f37985 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:40:12 +0400
-Subject: [PATCH 03/35] gcc-uclibc-locale-ctype_touplow_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/generic/c_locale.cc |    5 +++++
- libstdc++-v3/config/locale/generic/c_locale.h  |    9 +++++++++
- libstdc++-v3/config/os/gnu-linux/ctype_base.h  |    9 +++++++++
- 3 files changed, 23 insertions(+)
-
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
-index 0d309a5..f2f1e1f 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.cc
-+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
-@@ -263,5 +263,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
- #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
- #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
-   extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
-+#ifdef __UCLIBC__
-+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
-+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
-+#else
- _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
-+#endif
- #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
-index b5fd989..3da9a5d 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -40,13 +40,22 @@
- 
- #include <clocale>
- 
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- #define _GLIBCXX_NUM_CATEGORIES 0
- 
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
- 
-+#ifdef __UCLIBC__
-+  typedef __ctype_touplow_t*	__c_locale;
-+#else
-   typedef int*			__c_locale;
-+#endif
- 
-   // Convert numeric value of type double and long double to string and
-   // return length of string.  If vsnprintf is available use it, otherwise
-diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-index 2d8e978..14eb08f 100644
---- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-@@ -33,6 +33,11 @@
- 
- // Information as gleaned from /usr/include/ctype.h
- 
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
-   struct ctype_base
-   {
-     // Non-standard typedefs.
-+#ifdef __UCLIBC__
-+    typedef const __ctype_touplow_t*	__to_type;
-+#else
-     typedef const int* 		__to_type;
-+#endif
- 
-     // NB: Offsets into ctype<char>::_M_table force a particular size
-     // on the mask type. Because of this, we don't use an enum.
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0004-uclibc-locale.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0004-uclibc-locale.patch
deleted file mode 100644
index 49f5f33..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0004-uclibc-locale.patch
+++ /dev/null
@@ -1,2862 +0,0 @@
-From a55c751a449c2cbf0b3fcc07aab1b86bf9661510 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:41:39 +0400
-Subject: [PATCH 04/35] uclibc-locale
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/acinclude.m4                          |   37 ++
- .../config/locale/uclibc/c++locale_internal.h      |   63 ++
- libstdc++-v3/config/locale/uclibc/c_locale.cc      |  160 +++++
- libstdc++-v3/config/locale/uclibc/c_locale.h       |  117 ++++
- .../config/locale/uclibc/codecvt_members.cc        |  308 +++++++++
- .../config/locale/uclibc/collate_members.cc        |   80 +++
- libstdc++-v3/config/locale/uclibc/ctype_members.cc |  300 +++++++++
- .../config/locale/uclibc/messages_members.cc       |  100 +++
- .../config/locale/uclibc/messages_members.h        |  118 ++++
- .../config/locale/uclibc/monetary_members.cc       |  692 ++++++++++++++++++++
- .../config/locale/uclibc/numeric_members.cc        |  160 +++++
- libstdc++-v3/config/locale/uclibc/time_members.cc  |  406 ++++++++++++
- libstdc++-v3/config/locale/uclibc/time_members.h   |   68 ++
- libstdc++-v3/configure                             |   75 +++
- libstdc++-v3/include/c_compatibility/wchar.h       |    2 +
- libstdc++-v3/include/c_std/cwchar                  |    2 +
- 16 files changed, 2688 insertions(+)
- create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h
-
-diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
-index 0871a6a..326d7ef 100644
---- a/libstdc++-v3/acinclude.m4
-+++ b/libstdc++-v3/acinclude.m4
-@@ -1905,6 +1905,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
-   # Default to "generic".
-   if test $enable_clocale_flag = auto; then
-     case ${target_os} in
-+      *-uclibc*)
-+        enable_clocale_flag=uclibc
-+        ;;
-       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- 	enable_clocale_flag=gnu
- 	;;
-@@ -2069,6 +2072,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
-       CTIME_CC=config/locale/generic/time_members.cc
-       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
-       ;;
-+    uclibc)
-+      AC_MSG_RESULT(uclibc)
-+
-+      # Declare intention to use gettext, and add support for specific
-+      # languages.
-+      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+      ALL_LINGUAS="de fr"
-+
-+      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
-+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+        USE_NLS=yes
-+      fi
-+      # Export the build objects.
-+      for ling in $ALL_LINGUAS; do \
-+        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+      done
-+      AC_SUBST(glibcxx_MOFILES)
-+      AC_SUBST(glibcxx_POFILES)
-+
-+      CLOCALE_H=config/locale/uclibc/c_locale.h
-+      CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+      CMESSAGES_H=config/locale/uclibc/messages_members.h
-+      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+      CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+      CTIME_H=config/locale/uclibc/time_members.h
-+      CTIME_CC=config/locale/uclibc/time_members.cc
-+      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+      ;;
-   esac
- 
-   # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-new file mode 100644
-index 0000000..2ae3e4a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -0,0 +1,63 @@
-+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-+
-+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+// Written by Jakub Jelinek <jakub@redhat.com>
-+
-+#include <bits/c++config.h>
-+#include <clocale>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning clean this up
-+#endif
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+
-+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
-+extern "C" __typeof(strcoll_l) __strcoll_l;
-+extern "C" __typeof(strftime_l) __strftime_l;
-+extern "C" __typeof(strtod_l) __strtod_l;
-+extern "C" __typeof(strtof_l) __strtof_l;
-+extern "C" __typeof(strtold_l) __strtold_l;
-+extern "C" __typeof(strxfrm_l) __strxfrm_l;
-+extern "C" __typeof(newlocale) __newlocale;
-+extern "C" __typeof(freelocale) __freelocale;
-+extern "C" __typeof(duplocale) __duplocale;
-+extern "C" __typeof(uselocale) __uselocale;
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+extern "C" __typeof(iswctype_l) __iswctype_l;
-+extern "C" __typeof(towlower_l) __towlower_l;
-+extern "C" __typeof(towupper_l) __towupper_l;
-+extern "C" __typeof(wcscoll_l) __wcscoll_l;
-+extern "C" __typeof(wcsftime_l) __wcsftime_l;
-+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
-+extern "C" __typeof(wctype_l) __wctype_l;
-+#endif
-+
-+#endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-new file mode 100644
-index 0000000..5081dc1
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -0,0 +1,160 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8  Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <cerrno>  // For errno
-+#include <locale>
-+#include <stdexcept>
-+#include <langinfo.h>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
-+#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
-+#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
-+#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
-+#define __strtof_l(S, E, L)         strtof((S), (E))
-+#define __strtod_l(S, E, L)         strtod((S), (E))
-+#define __strtold_l(S, E, L)        strtold((S), (E))
-+#warning should dummy __newlocale check for C|POSIX ?
-+#define __newlocale(a, b, c)        NULL
-+#define __freelocale(a)             ((void)0)
-+#define __duplocale(a)              __c_locale()
-+#endif
-+
-+namespace std
-+{
-+  template<>
-+    void
-+    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
-+		   const __c_locale& __cloc)
-+    {
-+      if (!(__err & ios_base::failbit))
-+	{
-+	  char* __sanity;
-+	  errno = 0;
-+	  float __f = __strtof_l(__s, &__sanity, __cloc);
-+          if (__sanity != __s && errno != ERANGE)
-+	    __v = __f;
-+	  else
-+	    __err |= ios_base::failbit;
-+	}
-+    }
-+
-+  template<>
-+    void
-+    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
-+		   const __c_locale& __cloc)
-+    {
-+      if (!(__err & ios_base::failbit))
-+	{
-+	  char* __sanity;
-+	  errno = 0;
-+	  double __d = __strtod_l(__s, &__sanity, __cloc);
-+          if (__sanity != __s && errno != ERANGE)
-+	    __v = __d;
-+	  else
-+	    __err |= ios_base::failbit;
-+	}
-+    }
-+
-+  template<>
-+    void
-+    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
-+		   const __c_locale& __cloc)
-+    {
-+      if (!(__err & ios_base::failbit))
-+	{
-+	  char* __sanity;
-+	  errno = 0;
-+	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+          if (__sanity != __s && errno != ERANGE)
-+	    __v = __ld;
-+	  else
-+	    __err |= ios_base::failbit;
-+	}
-+    }
-+
-+  void
-+  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
-+				    __c_locale __old)
-+  {
-+    __cloc = __newlocale(1 << LC_ALL, __s, __old);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    if (!__cloc)
-+      {
-+	// This named locale is not supported by the underlying OS.
-+	__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
-+			      "name not valid"));
-+      }
-+#endif
-+  }
-+
-+  void
-+  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-+  {
-+    if (_S_get_c_locale() != __cloc)
-+      __freelocale(__cloc);
-+  }
-+
-+  __c_locale
-+  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
-+  { return __duplocale(__cloc); }
-+} // namespace std
-+
-+namespace __gnu_cxx
-+{
-+  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-+    {
-+      "LC_CTYPE",
-+      "LC_NUMERIC",
-+      "LC_TIME",
-+      "LC_COLLATE",
-+      "LC_MONETARY",
-+      "LC_MESSAGES",
-+#if _GLIBCXX_NUM_CATEGORIES != 0
-+      "LC_PAPER",
-+      "LC_NAME",
-+      "LC_ADDRESS",
-+      "LC_TELEPHONE",
-+      "LC_MEASUREMENT",
-+      "LC_IDENTIFICATION"
-+#endif
-+    };
-+}
-+
-+namespace std
-+{
-+  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
-+}  // namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-new file mode 100644
-index 0000000..da07c1f
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -0,0 +1,117 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8  Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifndef _C_LOCALE_H
-+#define _C_LOCALE_H 1
-+
-+#pragma GCC system_header
-+
-+#include <cstring>              // get std::strlen
-+#include <cstdio>               // get std::snprintf or std::sprintf
-+#include <clocale>
-+#include <langinfo.h>		// For codecvt
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this
-+#endif
-+#ifdef __UCLIBC_HAS_LOCALE__
-+#include <iconv.h>		// For codecvt using iconv, iconv_t
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#include <libintl.h> 		// For messages
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning what is _GLIBCXX_C_LOCALE_GNU for
-+#endif
-+#define _GLIBCXX_C_LOCALE_GNU 1
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix categories
-+#endif
-+// #define _GLIBCXX_NUM_CATEGORIES 6
-+#define _GLIBCXX_NUM_CATEGORIES 0
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+namespace __gnu_cxx
-+{
-+  extern "C" __typeof(uselocale) __uselocale;
-+}
-+#endif
-+
-+namespace std
-+{
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+  typedef __locale_t		__c_locale;
-+#else
-+  typedef int*			__c_locale;
-+#endif
-+
-+  // Convert numeric value of type _Tv to string and return length of
-+  // string.  If snprintf is available use it, otherwise fall back to
-+  // the unsafe sprintf which, in general, can be dangerous and should
-+  // be avoided.
-+  template<typename _Tv>
-+    int
-+    __convert_from_v(char* __out,
-+		     const int __size __attribute__ ((__unused__)),
-+		     const char* __fmt,
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+		     _Tv __v, const __c_locale& __cloc, int __prec)
-+    {
-+      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
-+#else
-+		     _Tv __v, const __c_locale&, int __prec)
-+    {
-+# ifdef __UCLIBC_HAS_LOCALE__
-+      char* __old = std::setlocale(LC_ALL, NULL);
-+      char* __sav = new char[std::strlen(__old) + 1];
-+      std::strcpy(__sav, __old);
-+      std::setlocale(LC_ALL, "C");
-+# endif
-+#endif
-+
-+      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+      __gnu_cxx::__uselocale(__old);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+      std::setlocale(LC_ALL, __sav);
-+      delete [] __sav;
-+#endif
-+      return __ret;
-+    }
-+}
-+
-+#endif
-diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-new file mode 100644
-index 0000000..64aa962
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-@@ -0,0 +1,308 @@
-+// std::codecvt implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <cstdlib>  // For MB_CUR_MAX
-+#include <climits>  // For MB_LEN_MAX
-+#include <bits/c++locale_internal.h>
-+
-+namespace std
-+{
-+  // Specializations.
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  codecvt_base::result
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_out(state_type& __state, const intern_type* __from,
-+	 const intern_type* __from_end, const intern_type*& __from_next,
-+	 extern_type* __to, extern_type* __to_end,
-+	 extern_type*& __to_next) const
-+  {
-+    result __ret = ok;
-+    state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
-+    // in case we fall back to wcrtomb and then continue, in a loop.
-+    // NB: wcsnrtombs is a GNU extension
-+    for (__from_next = __from, __to_next = __to;
-+	 __from_next < __from_end && __to_next < __to_end
-+	 && __ret == ok;)
-+      {
-+	const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
-+						      __from_end - __from_next);
-+	if (!__from_chunk_end)
-+	  __from_chunk_end = __from_end;
-+
-+	__from = __from_next;
-+	const size_t __conv = wcsnrtombs(__to_next, &__from_next,
-+					 __from_chunk_end - __from_next,
-+					 __to_end - __to_next, &__state);
-+	if (__conv == static_cast<size_t>(-1))
-+	  {
-+	    // In case of error, in order to stop at the exact place we
-+	    // have to start again from the beginning with a series of
-+	    // wcrtomb.
-+	    for (; __from < __from_next; ++__from)
-+	      __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
-+	    __state = __tmp_state;
-+	    __ret = error;
-+	  }
-+	else if (__from_next && __from_next < __from_chunk_end)
-+	  {
-+	    __to_next += __conv;
-+	    __ret = partial;
-+	  }
-+	else
-+	  {
-+	    __from_next = __from_chunk_end;
-+	    __to_next += __conv;
-+	  }
-+
-+	if (__from_next < __from_end && __ret == ok)
-+	  {
-+	    extern_type __buf[MB_LEN_MAX];
-+	    __tmp_state = __state;
-+	    const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
-+	    if (__conv > static_cast<size_t>(__to_end - __to_next))
-+	      __ret = partial;
-+	    else
-+	      {
-+		memcpy(__to_next, __buf, __conv);
-+		__state = __tmp_state;
-+		__to_next += __conv;
-+		++__from_next;
-+	      }
-+	  }
-+      }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+
-+    return __ret;
-+  }
-+
-+  codecvt_base::result
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_in(state_type& __state, const extern_type* __from,
-+	const extern_type* __from_end, const extern_type*& __from_next,
-+	intern_type* __to, intern_type* __to_end,
-+	intern_type*& __to_next) const
-+  {
-+    result __ret = ok;
-+    state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+    // in case we store a L'\0' and then continue, in a loop.
-+    // NB: mbsnrtowcs is a GNU extension
-+    for (__from_next = __from, __to_next = __to;
-+	 __from_next < __from_end && __to_next < __to_end
-+	 && __ret == ok;)
-+      {
-+	const extern_type* __from_chunk_end;
-+	__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
-+								  __from_end
-+								  - __from_next));
-+	if (!__from_chunk_end)
-+	  __from_chunk_end = __from_end;
-+
-+	__from = __from_next;
-+	size_t __conv = mbsnrtowcs(__to_next, &__from_next,
-+				   __from_chunk_end - __from_next,
-+				   __to_end - __to_next, &__state);
-+	if (__conv == static_cast<size_t>(-1))
-+	  {
-+	    // In case of error, in order to stop at the exact place we
-+	    // have to start again from the beginning with a series of
-+	    // mbrtowc.
-+	    for (;; ++__to_next, __from += __conv)
-+	      {
-+		__conv = mbrtowc(__to_next, __from, __from_end - __from,
-+				 &__tmp_state);
-+		if (__conv == static_cast<size_t>(-1)
-+		    || __conv == static_cast<size_t>(-2))
-+		  break;
-+	      }
-+	    __from_next = __from;
-+	    __state = __tmp_state;
-+	    __ret = error;
-+	  }
-+	else if (__from_next && __from_next < __from_chunk_end)
-+	  {
-+	    // It is unclear what to return in this case (see DR 382).
-+	    __to_next += __conv;
-+	    __ret = partial;
-+	  }
-+	else
-+	  {
-+	    __from_next = __from_chunk_end;
-+	    __to_next += __conv;
-+	  }
-+
-+	if (__from_next < __from_end && __ret == ok)
-+	  {
-+	    if (__to_next < __to_end)
-+	      {
-+		// XXX Probably wrong for stateful encodings
-+		__tmp_state = __state;
-+		++__from_next;
-+		*__to_next++ = L'\0';
-+	      }
-+	    else
-+	      __ret = partial;
-+	  }
-+      }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+
-+    return __ret;
-+  }
-+
-+  int
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_encoding() const throw()
-+  {
-+    // XXX This implementation assumes that the encoding is
-+    // stateless and is either single-byte or variable-width.
-+    int __ret = 0;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+    if (MB_CUR_MAX == 1)
-+      __ret = 1;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return __ret;
-+  }
-+
-+  int
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_max_length() const throw()
-+  {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+    // XXX Probably wrong for stateful encodings.
-+    int __ret = MB_CUR_MAX;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return __ret;
-+  }
-+
-+  int
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_length(state_type& __state, const extern_type* __from,
-+	    const extern_type* __end, size_t __max) const
-+  {
-+    int __ret = 0;
-+    state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+    // in case we advance past it and then continue, in a loop.
-+    // NB: mbsnrtowcs is a GNU extension
-+
-+    // A dummy internal buffer is needed in order for mbsnrtocws to consider
-+    // its fourth parameter (it wouldn't with NULL as first parameter).
-+    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
-+							   * __max));
-+    while (__from < __end && __max)
-+      {
-+	const extern_type* __from_chunk_end;
-+	__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
-+								  __end
-+								  - __from));
-+	if (!__from_chunk_end)
-+	  __from_chunk_end = __end;
-+
-+	const extern_type* __tmp_from = __from;
-+	size_t __conv = mbsnrtowcs(__to, &__from,
-+				   __from_chunk_end - __from,
-+				   __max, &__state);
-+	if (__conv == static_cast<size_t>(-1))
-+	  {
-+	    // In case of error, in order to stop at the exact place we
-+	    // have to start again from the beginning with a series of
-+	    // mbrtowc.
-+	    for (__from = __tmp_from;; __from += __conv)
-+	      {
-+		__conv = mbrtowc(NULL, __from, __end - __from,
-+				 &__tmp_state);
-+		if (__conv == static_cast<size_t>(-1)
-+		    || __conv == static_cast<size_t>(-2))
-+		  break;
-+	      }
-+	    __state = __tmp_state;
-+	    __ret += __from - __tmp_from;
-+	    break;
-+	  }
-+	if (!__from)
-+	  __from = __from_chunk_end;
-+
-+	__ret += __from - __tmp_from;
-+	__max -= __conv;
-+
-+	if (__from < __end && __max)
-+	  {
-+	    // XXX Probably wrong for stateful encodings
-+	    __tmp_state = __state;
-+	    ++__from;
-+	    ++__ret;
-+	    --__max;
-+	  }
-+      }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+
-+    return __ret;
-+  }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-new file mode 100644
-index 0000000..c2664a7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -0,0 +1,80 @@
-+// std::collate implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.4.1.2  collate virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
-+#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
-+#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
-+#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
-+#endif
-+
-+namespace std
-+{
-+  // These are basically extensions to char_traits, and perhaps should
-+  // be put there instead of here.
-+  template<>
-+    int
-+    collate<char>::_M_compare(const char* __one, const char* __two) const
-+    {
-+      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
-+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+    }
-+
-+  template<>
-+    size_t
-+    collate<char>::_M_transform(char* __to, const char* __from,
-+				size_t __n) const
-+    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    int
-+    collate<wchar_t>::_M_compare(const wchar_t* __one,
-+				 const wchar_t* __two) const
-+    {
-+      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
-+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+    }
-+
-+  template<>
-+    size_t
-+    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
-+				   size_t __n) const
-+    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-new file mode 100644
-index 0000000..7294e3a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -0,0 +1,300 @@
-+// std::ctype implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.1.2  ctype virtual functions.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __wctype_l(S, L)           wctype((S))
-+#define __towupper_l(C, L)         towupper((C))
-+#define __towlower_l(C, L)         towlower((C))
-+#define __iswctype_l(C, M, L)      iswctype((C), (M))
-+#endif
-+
-+namespace std
-+{
-+  // NB: The other ctype<char> specializations are in src/locale.cc and
-+  // various /config/os/* files.
-+  template<>
-+    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-+    : ctype<char>(0, false, __refs)
-+    {
-+      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+	{
-+	  this->_S_destroy_c_locale(this->_M_c_locale_ctype);
-+	  this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
-+	  this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
-+	  this->_M_table = this->_M_c_locale_ctype->__ctype_b;
-+#endif
-+	}
-+    }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  ctype<wchar_t>::__wmask_type
-+  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
-+  {
-+    __wmask_type __ret;
-+    switch (__m)
-+      {
-+      case space:
-+	__ret = __wctype_l("space", _M_c_locale_ctype);
-+	break;
-+      case print:
-+	__ret = __wctype_l("print", _M_c_locale_ctype);
-+	break;
-+      case cntrl:
-+	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
-+	break;
-+      case upper:
-+	__ret = __wctype_l("upper", _M_c_locale_ctype);
-+	break;
-+      case lower:
-+	__ret = __wctype_l("lower", _M_c_locale_ctype);
-+	break;
-+      case alpha:
-+	__ret = __wctype_l("alpha", _M_c_locale_ctype);
-+	break;
-+      case digit:
-+	__ret = __wctype_l("digit", _M_c_locale_ctype);
-+	break;
-+      case punct:
-+	__ret = __wctype_l("punct", _M_c_locale_ctype);
-+	break;
-+      case xdigit:
-+	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
-+	break;
-+      case alnum:
-+	__ret = __wctype_l("alnum", _M_c_locale_ctype);
-+	break;
-+      case graph:
-+	__ret = __wctype_l("graph", _M_c_locale_ctype);
-+	break;
-+      default:
-+	__ret = __wmask_type();
-+      }
-+    return __ret;
-+  }
-+
-+  wchar_t
-+  ctype<wchar_t>::do_toupper(wchar_t __c) const
-+  { return __towupper_l(__c, _M_c_locale_ctype); }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
-+  {
-+    while (__lo < __hi)
-+      {
-+        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
-+        ++__lo;
-+      }
-+    return __hi;
-+  }
-+
-+  wchar_t
-+  ctype<wchar_t>::do_tolower(wchar_t __c) const
-+  { return __towlower_l(__c, _M_c_locale_ctype); }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
-+  {
-+    while (__lo < __hi)
-+      {
-+        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
-+        ++__lo;
-+      }
-+    return __hi;
-+  }
-+
-+  bool
-+  ctype<wchar_t>::
-+  do_is(mask __m, wchar_t __c) const
-+  {
-+    // Highest bitmask in ctype_base == 10, but extra in "C"
-+    // library for blank.
-+    bool __ret = false;
-+    const size_t __bitmasksize = 11;
-+    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+      if (__m & _M_bit[__bitcur]
-+	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+	{
-+	  __ret = true;
-+	  break;
-+	}
-+    return __ret;
-+  }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::
-+  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
-+  {
-+    for (; __lo < __hi; ++__vec, ++__lo)
-+      {
-+	// Highest bitmask in ctype_base == 10, but extra in "C"
-+	// library for blank.
-+	const size_t __bitmasksize = 11;
-+	mask __m = 0;
-+	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+	  if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
-+	    __m |= _M_bit[__bitcur];
-+	*__vec = __m;
-+      }
-+    return __hi;
-+  }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::
-+  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
-+  {
-+    while (__lo < __hi && !this->do_is(__m, *__lo))
-+      ++__lo;
-+    return __lo;
-+  }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::
-+  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
-+  {
-+    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
-+      ++__lo;
-+    return __lo;
-+  }
-+
-+  wchar_t
-+  ctype<wchar_t>::
-+  do_widen(char __c) const
-+  { return _M_widen[static_cast<unsigned char>(__c)]; }
-+
-+  const char*
-+  ctype<wchar_t>::
-+  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
-+  {
-+    while (__lo < __hi)
-+      {
-+	*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
-+	++__lo;
-+	++__dest;
-+      }
-+    return __hi;
-+  }
-+
-+  char
-+  ctype<wchar_t>::
-+  do_narrow(wchar_t __wc, char __dfault) const
-+  {
-+    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
-+      return _M_narrow[__wc];
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+    const int __c = wctob(__wc);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return (__c == EOF ? __dfault : static_cast<char>(__c));
-+  }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::
-+  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
-+	    char* __dest) const
-+  {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+    if (_M_narrow_ok)
-+      while (__lo < __hi)
-+	{
-+	  if (*__lo >= 0 && *__lo < 128)
-+	    *__dest = _M_narrow[*__lo];
-+	  else
-+	    {
-+	      const int __c = wctob(*__lo);
-+	      *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+	    }
-+	  ++__lo;
-+	  ++__dest;
-+	}
-+    else
-+      while (__lo < __hi)
-+	{
-+	  const int __c = wctob(*__lo);
-+	  *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+	  ++__lo;
-+	  ++__dest;
-+	}
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return __hi;
-+  }
-+
-+  void
-+  ctype<wchar_t>::_M_initialize_ctype()
-+  {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+    wint_t __i;
-+    for (__i = 0; __i < 128; ++__i)
-+      {
-+	const int __c = wctob(__i);
-+	if (__c == EOF)
-+	  break;
-+	else
-+	  _M_narrow[__i] = static_cast<char>(__c);
-+      }
-+    if (__i == 128)
-+      _M_narrow_ok = true;
-+    else
-+      _M_narrow_ok = false;
-+    for (size_t __j = 0;
-+	 __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
-+      _M_widen[__j] = btowc(__j);
-+
-+    for (size_t __k = 0; __k <= 11; ++__k)
-+      {
-+	_M_bit[__k] = static_cast<mask>(_ISbit(__k));
-+	_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
-+      }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+  }
-+#endif //  _GLIBCXX_USE_WCHAR_T
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-new file mode 100644
-index 0000000..13594d9
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -0,0 +1,100 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2  messages virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix gettext stuff
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__dcgettext(const char *domainname,
-+			     const char *msgid, int category);
-+#undef gettext
-+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#else
-+#undef gettext
-+#define gettext(msgid) (msgid)
-+#endif
-+
-+namespace std
-+{
-+  // Specializations.
-+  template<>
-+    string
-+    messages<char>::do_get(catalog, int, int, const string& __dfault) const
-+    {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+      __c_locale __old = __uselocale(_M_c_locale_messages);
-+      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
-+      __uselocale(__old);
-+      return string(__msg);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_messages);
-+      const char* __msg = gettext(__dfault.c_str());
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+      return string(__msg);
-+#else
-+      const char* __msg = gettext(__dfault.c_str());
-+      return string(__msg);
-+#endif
-+    }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    wstring
-+    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
-+    {
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+      __c_locale __old = __uselocale(_M_c_locale_messages);
-+      char* __msg = gettext(_M_convert_to_char(__dfault));
-+      __uselocale(__old);
-+      return _M_convert_from_char(__msg);
-+# elif defined __UCLIBC_HAS_LOCALE__
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_messages);
-+      char* __msg = gettext(_M_convert_to_char(__dfault));
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+      return _M_convert_from_char(__msg);
-+# else
-+      char* __msg = gettext(_M_convert_to_char(__dfault));
-+      return _M_convert_from_char(__msg);
-+# endif
-+    }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-new file mode 100644
-index 0000000..1424078
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -0,0 +1,118 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2  messages functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix prototypes for *textdomain funcs
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__textdomain(const char *domainname);
-+extern "C" char *__bindtextdomain(const char *domainname,
-+				  const char *dirname);
-+#else
-+#undef __textdomain
-+#undef __bindtextdomain
-+#define __textdomain(D)           ((void)0)
-+#define __bindtextdomain(D,P)     ((void)0)
-+#endif
-+
-+  // Non-virtual member functions.
-+  template<typename _CharT>
-+     messages<_CharT>::messages(size_t __refs)
-+     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
-+     _M_name_messages(_S_get_c_name())
-+     { }
-+
-+  template<typename _CharT>
-+     messages<_CharT>::messages(__c_locale __cloc, const char* __s,
-+				size_t __refs)
-+     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-+     _M_name_messages(__s)
-+     {
-+       char* __tmp = new char[std::strlen(__s) + 1];
-+       std::strcpy(__tmp, __s);
-+       _M_name_messages = __tmp;
-+     }
-+
-+  template<typename _CharT>
-+    typename messages<_CharT>::catalog
-+    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
-+			   const char* __dir) const
-+    {
-+      __bindtextdomain(__s.c_str(), __dir);
-+      return this->do_open(__s, __loc);
-+    }
-+
-+  // Virtual member functions.
-+  template<typename _CharT>
-+    messages<_CharT>::~messages()
-+    {
-+      if (_M_name_messages != _S_get_c_name())
-+	delete [] _M_name_messages;
-+      _S_destroy_c_locale(_M_c_locale_messages);
-+    }
-+
-+  template<typename _CharT>
-+    typename messages<_CharT>::catalog
-+    messages<_CharT>::do_open(const basic_string<char>& __s,
-+			      const locale&) const
-+    {
-+      // No error checking is done, assume the catalog exists and can
-+      // be used.
-+      __textdomain(__s.c_str());
-+      return 0;
-+    }
-+
-+  template<typename _CharT>
-+    void
-+    messages<_CharT>::do_close(catalog) const
-+    { }
-+
-+   // messages_byname
-+   template<typename _CharT>
-+     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
-+     : messages<_CharT>(__refs)
-+     {
-+       if (this->_M_name_messages != locale::facet::_S_get_c_name())
-+	 delete [] this->_M_name_messages;
-+       char* __tmp = new char[std::strlen(__s) + 1];
-+       std::strcpy(__tmp, __s);
-+       this->_M_name_messages = __tmp;
-+
-+       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+	 {
-+	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
-+	   this->_S_create_c_locale(this->_M_c_locale_messages, __s);
-+	 }
-+     }
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-new file mode 100644
-index 0000000..aa52731
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -0,0 +1,692 @@
-+// std::moneypunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.6.3.2  moneypunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning optimize this for uclibc
-+#warning tailor for stub locale support
-+#endif
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+  // Construct and return valid pattern consisting of some combination of:
-+  // space none symbol sign value
-+  money_base::pattern
-+  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
-+  {
-+    pattern __ret;
-+
-+    // This insanely complicated routine attempts to construct a valid
-+    // pattern for use with monyepunct. A couple of invariants:
-+
-+    // if (__precedes) symbol -> value
-+    // else value -> symbol
-+
-+    // if (__space) space
-+    // else none
-+
-+    // none == never first
-+    // space never first or last
-+
-+    // Any elegant implementations of this are welcome.
-+    switch (__posn)
-+      {
-+      case 0:
-+      case 1:
-+	// 1 The sign precedes the value and symbol.
-+	__ret.field[0] = sign;
-+	if (__space)
-+	  {
-+	    // Pattern starts with sign.
-+	    if (__precedes)
-+	      {
-+		__ret.field[1] = symbol;
-+		__ret.field[3] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = value;
-+		__ret.field[3] = symbol;
-+	      }
-+	    __ret.field[2] = space;
-+	  }
-+	else
-+	  {
-+	    // Pattern starts with sign and ends with none.
-+	    if (__precedes)
-+	      {
-+		__ret.field[1] = symbol;
-+		__ret.field[2] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = value;
-+		__ret.field[2] = symbol;
-+	      }
-+	    __ret.field[3] = none;
-+	  }
-+	break;
-+      case 2:
-+	// 2 The sign follows the value and symbol.
-+	if (__space)
-+	  {
-+	    // Pattern either ends with sign.
-+	    if (__precedes)
-+	      {
-+		__ret.field[0] = symbol;
-+		__ret.field[2] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[0] = value;
-+		__ret.field[2] = symbol;
-+	      }
-+	    __ret.field[1] = space;
-+	    __ret.field[3] = sign;
-+	  }
-+	else
-+	  {
-+	    // Pattern ends with sign then none.
-+	    if (__precedes)
-+	      {
-+		__ret.field[0] = symbol;
-+		__ret.field[1] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[0] = value;
-+		__ret.field[1] = symbol;
-+	      }
-+	    __ret.field[2] = sign;
-+	    __ret.field[3] = none;
-+	  }
-+	break;
-+      case 3:
-+	// 3 The sign immediately precedes the symbol.
-+	if (__precedes)
-+	  {
-+	    __ret.field[0] = sign;
-+	    __ret.field[1] = symbol;
-+	    if (__space)
-+	      {
-+		__ret.field[2] = space;
-+		__ret.field[3] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[2] = value;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	else
-+	  {
-+	    __ret.field[0] = value;
-+	    if (__space)
-+	      {
-+		__ret.field[1] = space;
-+		__ret.field[2] = sign;
-+		__ret.field[3] = symbol;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = sign;
-+		__ret.field[2] = symbol;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	break;
-+      case 4:
-+	// 4 The sign immediately follows the symbol.
-+	if (__precedes)
-+	  {
-+	    __ret.field[0] = symbol;
-+	    __ret.field[1] = sign;
-+	    if (__space)
-+	      {
-+		__ret.field[2] = space;
-+		__ret.field[3] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[2] = value;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	else
-+	  {
-+	    __ret.field[0] = value;
-+	    if (__space)
-+	      {
-+		__ret.field[1] = space;
-+		__ret.field[2] = symbol;
-+		__ret.field[3] = sign;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = symbol;
-+		__ret.field[2] = sign;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	break;
-+      default:
-+	;
-+      }
-+    return __ret;
-+  }
-+
-+  template<>
-+    void
-+    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+						     const char*)
-+    {
-+      if (!_M_data)
-+	_M_data = new __moneypunct_cache<char, true>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = '.';
-+	  _M_data->_M_thousands_sep = ',';
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = "";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = "";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = "";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+							__cloc));
-+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+							__cloc));
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+	  if (!__nposn)
-+	    _M_data->_M_negative_sign = "()";
-+	  else
-+	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+							__cloc);
-+	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+	  // _Intl == true
-+	  _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+						      __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+							__pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+							__nposn);
-+	}
-+    }
-+
-+  template<>
-+    void
-+    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+						      const char*)
-+    {
-+      if (!_M_data)
-+	_M_data = new __moneypunct_cache<char, false>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = '.';
-+	  _M_data->_M_thousands_sep = ',';
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = "";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = "";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = "";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+							__cloc));
-+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+							__cloc));
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+	  if (!__nposn)
-+	    _M_data->_M_negative_sign = "()";
-+	  else
-+	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+							__cloc);
-+	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+	  // _Intl == false
-+	  _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+							__pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+							__nposn);
-+	}
-+    }
-+
-+  template<>
-+    moneypunct<char, true>::~moneypunct()
-+    { delete _M_data; }
-+
-+  template<>
-+    moneypunct<char, false>::~moneypunct()
-+    { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    void
-+    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+							const char*)
-+#else
-+							const char* __name)
-+#endif
-+    {
-+      if (!_M_data)
-+	_M_data = new __moneypunct_cache<wchar_t, true>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = L'.';
-+	  _M_data->_M_thousands_sep = L',';
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = L"";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = L"";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = L"";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  // Use ctype::widen code without the facet...
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    _M_data->_M_atoms[__i] =
-+	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+	}
-+      else
-+	{
-+	  // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __c_locale __old = __uselocale(__cloc);
-+#else
-+	  // Switch to named locale so that mbsrtowcs will work.
-+	  char* __old = strdup(setlocale(LC_ALL, NULL));
-+	  setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+	  union { char *__s; wchar_t __w; } __u;
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+	  _M_data->_M_decimal_point = __u.__w;
-+
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+	  _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+
-+	  wchar_t* __wcs_ps = 0;
-+	  wchar_t* __wcs_ns = 0;
-+	  const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+	  try
-+	    {
-+	      mbstate_t __state;
-+	      size_t __len = strlen(__cpossign);
-+	      if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ps = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+		  _M_data->_M_positive_sign = __wcs_ps;
-+		}
-+	      else
-+		_M_data->_M_positive_sign = L"";
-+	      _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+	      __len = strlen(__cnegsign);
-+	      if (!__nposn)
-+		_M_data->_M_negative_sign = L"()";
-+	      else if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ns = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+		  _M_data->_M_negative_sign = __wcs_ns;
-+		}
-+	      else
-+		_M_data->_M_negative_sign = L"";
-+	      _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+	      // _Intl == true.
-+	      __len = strlen(__ccurr);
-+	      if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  wchar_t* __wcs = new wchar_t[__len];
-+		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+		  _M_data->_M_curr_symbol = __wcs;
-+		}
-+	      else
-+		_M_data->_M_curr_symbol = L"";
-+	      _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+	    }
-+	  catch (...)
-+	    {
-+	      delete _M_data;
-+	      _M_data = 0;
-+	      delete __wcs_ps;
-+	      delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	      __uselocale(__old);
-+#else
-+	      setlocale(LC_ALL, __old);
-+	      free(__old);
-+#endif
-+	      __throw_exception_again;
-+	    }
-+
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+						      __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+							__pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+							__nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __uselocale(__old);
-+#else
-+	  setlocale(LC_ALL, __old);
-+	  free(__old);
-+#endif
-+	}
-+    }
-+
-+  template<>
-+  void
-+  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+						       const char*)
-+#else
-+                                                       const char* __name)
-+#endif
-+  {
-+    if (!_M_data)
-+      _M_data = new __moneypunct_cache<wchar_t, false>;
-+
-+    if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = L'.';
-+	  _M_data->_M_thousands_sep = L',';
-+	  _M_data->_M_grouping = "";
-+          _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = L"";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = L"";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = L"";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  // Use ctype::widen code without the facet...
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    _M_data->_M_atoms[__i] =
-+	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+	}
-+      else
-+	{
-+	  // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __c_locale __old = __uselocale(__cloc);
-+#else
-+	  // Switch to named locale so that mbsrtowcs will work.
-+	  char* __old = strdup(setlocale(LC_ALL, NULL));
-+	  setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+          union { char *__s; wchar_t __w; } __u;
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+	  _M_data->_M_decimal_point = __u.__w;
-+
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+	  _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+
-+	  wchar_t* __wcs_ps = 0;
-+	  wchar_t* __wcs_ns = 0;
-+	  const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+	  try
-+            {
-+              mbstate_t __state;
-+              size_t __len;
-+              __len = strlen(__cpossign);
-+              if (__len)
-+                {
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ps = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+		  _M_data->_M_positive_sign = __wcs_ps;
-+		}
-+	      else
-+		_M_data->_M_positive_sign = L"";
-+              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+	      __len = strlen(__cnegsign);
-+	      if (!__nposn)
-+		_M_data->_M_negative_sign = L"()";
-+	      else if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ns = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+		  _M_data->_M_negative_sign = __wcs_ns;
-+		}
-+	      else
-+		_M_data->_M_negative_sign = L"";
-+              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+	      // _Intl == true.
-+	      __len = strlen(__ccurr);
-+	      if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  wchar_t* __wcs = new wchar_t[__len];
-+		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+		  _M_data->_M_curr_symbol = __wcs;
-+		}
-+	      else
-+		_M_data->_M_curr_symbol = L"";
-+              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+	    }
-+          catch (...)
-+	    {
-+	      delete _M_data;
-+              _M_data = 0;
-+	      delete __wcs_ps;
-+	      delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	      __uselocale(__old);
-+#else
-+	      setlocale(LC_ALL, __old);
-+	      free(__old);
-+#endif
-+              __throw_exception_again;
-+	    }
-+
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+	                                                __pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+	                                                __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __uselocale(__old);
-+#else
-+	  setlocale(LC_ALL, __old);
-+	  free(__old);
-+#endif
-+	}
-+    }
-+
-+  template<>
-+    moneypunct<wchar_t, true>::~moneypunct()
-+    {
-+      if (_M_data->_M_positive_sign_size)
-+	delete [] _M_data->_M_positive_sign;
-+      if (_M_data->_M_negative_sign_size
-+          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+	delete [] _M_data->_M_negative_sign;
-+      if (_M_data->_M_curr_symbol_size)
-+	delete [] _M_data->_M_curr_symbol;
-+      delete _M_data;
-+    }
-+
-+  template<>
-+    moneypunct<wchar_t, false>::~moneypunct()
-+    {
-+      if (_M_data->_M_positive_sign_size)
-+	delete [] _M_data->_M_positive_sign;
-+      if (_M_data->_M_negative_sign_size
-+          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+	delete [] _M_data->_M_negative_sign;
-+      if (_M_data->_M_curr_symbol_size)
-+	delete [] _M_data->_M_curr_symbol;
-+      delete _M_data;
-+    }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-new file mode 100644
-index 0000000..883ec1a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -0,0 +1,160 @@
-+// std::numpunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.3.1.2  numpunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+  template<>
-+    void
-+    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __numpunct_cache<char>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_use_grouping = false;
-+
-+	  _M_data->_M_decimal_point = '.';
-+	  _M_data->_M_thousands_sep = ',';
-+
-+	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+	    _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
-+
-+	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+	    _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
-+							__cloc));
-+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
-+							__cloc));
-+
-+	  // Check for NULL, which implies no grouping.
-+	  if (_M_data->_M_thousands_sep == '\0')
-+	    _M_data->_M_grouping = "";
-+	  else
-+	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	}
-+
-+      // NB: There is no way to extact this info from posix locales.
-+      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+      _M_data->_M_truename = "true";
-+      _M_data->_M_truename_size = 4;
-+      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+      _M_data->_M_falsename = "false";
-+      _M_data->_M_falsename_size = 5;
-+    }
-+
-+  template<>
-+    numpunct<char>::~numpunct()
-+    { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    void
-+    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __numpunct_cache<wchar_t>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_use_grouping = false;
-+
-+	  _M_data->_M_decimal_point = L'.';
-+	  _M_data->_M_thousands_sep = L',';
-+
-+	  // Use ctype::widen code without the facet...
-+	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+	    _M_data->_M_atoms_out[__i] =
-+	      static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
-+
-+	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+	    _M_data->_M_atoms_in[__j] =
-+	      static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  // NB: In the GNU model wchar_t is always 32 bit wide.
-+	  union { char *__s; wchar_t __w; } __u;
-+	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
-+	  _M_data->_M_decimal_point = __u.__w;
-+
-+	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
-+	  _M_data->_M_thousands_sep = __u.__w;
-+
-+	  if (_M_data->_M_thousands_sep == L'\0')
-+	    _M_data->_M_grouping = "";
-+	  else
-+	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	}
-+
-+      // NB: There is no way to extact this info from posix locales.
-+      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+      _M_data->_M_truename = L"true";
-+      _M_data->_M_truename_size = 4;
-+      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+      _M_data->_M_falsename = L"false";
-+      _M_data->_M_falsename_size = 5;
-+    }
-+
-+  template<>
-+    numpunct<wchar_t>::~numpunct()
-+    { delete _M_data; }
-+ #endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-new file mode 100644
-index 0000000..e0707d7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -0,0 +1,406 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+  template<>
-+    void
-+    __timepunct<char>::
-+    _M_put(char* __s, size_t __maxlen, const char* __format,
-+	   const tm* __tm) const
-+    {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
-+					_M_c_locale_timepunct);
-+#else
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_timepunct);
-+      const size_t __len = strftime(__s, __maxlen, __format, __tm);
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+#endif
-+      // Make sure __s is null terminated.
-+      if (__len == 0)
-+	__s[0] = '\0';
-+    }
-+
-+  template<>
-+    void
-+    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __timepunct_cache<char>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_c_locale_timepunct = _S_get_c_locale();
-+
-+	  _M_data->_M_date_format = "%m/%d/%y";
-+	  _M_data->_M_date_era_format = "%m/%d/%y";
-+	  _M_data->_M_time_format = "%H:%M:%S";
-+	  _M_data->_M_time_era_format = "%H:%M:%S";
-+	  _M_data->_M_date_time_format = "";
-+	  _M_data->_M_date_time_era_format = "";
-+	  _M_data->_M_am = "AM";
-+	  _M_data->_M_pm = "PM";
-+	  _M_data->_M_am_pm_format = "";
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  _M_data->_M_day1 = "Sunday";
-+	  _M_data->_M_day2 = "Monday";
-+	  _M_data->_M_day3 = "Tuesday";
-+	  _M_data->_M_day4 = "Wednesday";
-+	  _M_data->_M_day5 = "Thursday";
-+	  _M_data->_M_day6 = "Friday";
-+	  _M_data->_M_day7 = "Saturday";
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  _M_data->_M_aday1 = "Sun";
-+	  _M_data->_M_aday2 = "Mon";
-+	  _M_data->_M_aday3 = "Tue";
-+	  _M_data->_M_aday4 = "Wed";
-+	  _M_data->_M_aday5 = "Thu";
-+	  _M_data->_M_aday6 = "Fri";
-+	  _M_data->_M_aday7 = "Sat";
-+
-+	  // Month names, starting with "C"'s January.
-+	  _M_data->_M_month01 = "January";
-+	  _M_data->_M_month02 = "February";
-+	  _M_data->_M_month03 = "March";
-+	  _M_data->_M_month04 = "April";
-+	  _M_data->_M_month05 = "May";
-+	  _M_data->_M_month06 = "June";
-+	  _M_data->_M_month07 = "July";
-+	  _M_data->_M_month08 = "August";
-+	  _M_data->_M_month09 = "September";
-+	  _M_data->_M_month10 = "October";
-+	  _M_data->_M_month11 = "November";
-+	  _M_data->_M_month12 = "December";
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  _M_data->_M_amonth01 = "Jan";
-+	  _M_data->_M_amonth02 = "Feb";
-+	  _M_data->_M_amonth03 = "Mar";
-+	  _M_data->_M_amonth04 = "Apr";
-+	  _M_data->_M_amonth05 = "May";
-+	  _M_data->_M_amonth06 = "Jun";
-+	  _M_data->_M_amonth07 = "Jul";
-+	  _M_data->_M_amonth08 = "Aug";
-+	  _M_data->_M_amonth09 = "Sep";
-+	  _M_data->_M_amonth10 = "Oct";
-+	  _M_data->_M_amonth11 = "Nov";
-+	  _M_data->_M_amonth12 = "Dec";
-+	}
-+      else
-+	{
-+	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+	  _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
-+	  _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
-+	  _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
-+	  _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
-+	  _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
-+	  _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
-+							     __cloc);
-+	  _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
-+	  _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
-+	  _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
-+	  _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
-+	  _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
-+	  _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
-+	  _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
-+	  _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
-+	  _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
-+	  _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
-+	  _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
-+	  _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
-+	  _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
-+	  _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
-+	  _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
-+
-+	  // Month names, starting with "C"'s January.
-+	  _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
-+	  _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
-+	  _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
-+	  _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
-+	  _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
-+	  _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
-+	  _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
-+	  _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
-+	  _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
-+	  _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
-+	  _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
-+	  _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
-+	  _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
-+	  _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
-+	  _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
-+	  _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
-+	  _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
-+	  _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
-+	  _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
-+	  _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
-+	  _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
-+	  _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
-+	  _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
-+	}
-+    }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    void
-+    __timepunct<wchar_t>::
-+    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
-+	   const tm* __tm) const
-+    {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
-+      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
-+					_M_c_locale_timepunct);
-+#else
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_timepunct);
-+      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+#endif
-+      // Make sure __s is null terminated.
-+      if (__len == 0)
-+	__s[0] = L'\0';
-+    }
-+
-+  template<>
-+    void
-+    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __timepunct_cache<wchar_t>;
-+
-+#warning wide time stuff
-+//       if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_c_locale_timepunct = _S_get_c_locale();
-+
-+	  _M_data->_M_date_format = L"%m/%d/%y";
-+	  _M_data->_M_date_era_format = L"%m/%d/%y";
-+	  _M_data->_M_time_format = L"%H:%M:%S";
-+	  _M_data->_M_time_era_format = L"%H:%M:%S";
-+	  _M_data->_M_date_time_format = L"";
-+	  _M_data->_M_date_time_era_format = L"";
-+	  _M_data->_M_am = L"AM";
-+	  _M_data->_M_pm = L"PM";
-+	  _M_data->_M_am_pm_format = L"";
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  _M_data->_M_day1 = L"Sunday";
-+	  _M_data->_M_day2 = L"Monday";
-+	  _M_data->_M_day3 = L"Tuesday";
-+	  _M_data->_M_day4 = L"Wednesday";
-+	  _M_data->_M_day5 = L"Thursday";
-+	  _M_data->_M_day6 = L"Friday";
-+	  _M_data->_M_day7 = L"Saturday";
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  _M_data->_M_aday1 = L"Sun";
-+	  _M_data->_M_aday2 = L"Mon";
-+	  _M_data->_M_aday3 = L"Tue";
-+	  _M_data->_M_aday4 = L"Wed";
-+	  _M_data->_M_aday5 = L"Thu";
-+	  _M_data->_M_aday6 = L"Fri";
-+	  _M_data->_M_aday7 = L"Sat";
-+
-+	  // Month names, starting with "C"'s January.
-+	  _M_data->_M_month01 = L"January";
-+	  _M_data->_M_month02 = L"February";
-+	  _M_data->_M_month03 = L"March";
-+	  _M_data->_M_month04 = L"April";
-+	  _M_data->_M_month05 = L"May";
-+	  _M_data->_M_month06 = L"June";
-+	  _M_data->_M_month07 = L"July";
-+	  _M_data->_M_month08 = L"August";
-+	  _M_data->_M_month09 = L"September";
-+	  _M_data->_M_month10 = L"October";
-+	  _M_data->_M_month11 = L"November";
-+	  _M_data->_M_month12 = L"December";
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  _M_data->_M_amonth01 = L"Jan";
-+	  _M_data->_M_amonth02 = L"Feb";
-+	  _M_data->_M_amonth03 = L"Mar";
-+	  _M_data->_M_amonth04 = L"Apr";
-+	  _M_data->_M_amonth05 = L"May";
-+	  _M_data->_M_amonth06 = L"Jun";
-+	  _M_data->_M_amonth07 = L"Jul";
-+	  _M_data->_M_amonth08 = L"Aug";
-+	  _M_data->_M_amonth09 = L"Sep";
-+	  _M_data->_M_amonth10 = L"Oct";
-+	  _M_data->_M_amonth11 = L"Nov";
-+	  _M_data->_M_amonth12 = L"Dec";
-+	}
-+#if 0
-+      else
-+	{
-+	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+	  union { char *__s; wchar_t *__w; } __u;
-+
-+	  __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
-+	  _M_data->_M_date_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
-+	  _M_data->_M_date_era_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
-+	  _M_data->_M_time_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
-+	  _M_data->_M_time_era_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
-+	  _M_data->_M_date_time_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
-+	  _M_data->_M_date_time_era_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
-+	  _M_data->_M_am = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
-+	  _M_data->_M_pm = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
-+	  _M_data->_M_am_pm_format = __u.__w;
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
-+	  _M_data->_M_day1 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
-+	  _M_data->_M_day2 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
-+	  _M_data->_M_day3 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
-+	  _M_data->_M_day4 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
-+	  _M_data->_M_day5 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
-+	  _M_data->_M_day6 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
-+	  _M_data->_M_day7 = __u.__w;
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
-+	  _M_data->_M_aday1 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
-+	  _M_data->_M_aday2 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
-+	  _M_data->_M_aday3 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
-+	  _M_data->_M_aday4 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
-+	  _M_data->_M_aday5 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
-+	  _M_data->_M_aday6 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
-+	  _M_data->_M_aday7 = __u.__w;
-+
-+	  // Month names, starting with "C"'s January.
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
-+	  _M_data->_M_month01 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
-+	  _M_data->_M_month02 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
-+	  _M_data->_M_month03 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
-+	  _M_data->_M_month04 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
-+	  _M_data->_M_month05 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
-+	  _M_data->_M_month06 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
-+	  _M_data->_M_month07 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
-+	  _M_data->_M_month08 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
-+	  _M_data->_M_month09 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
-+	  _M_data->_M_month10 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
-+	  _M_data->_M_month11 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
-+	  _M_data->_M_month12 = __u.__w;
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
-+	  _M_data->_M_amonth01 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
-+	  _M_data->_M_amonth02 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
-+	  _M_data->_M_amonth03 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
-+	  _M_data->_M_amonth04 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
-+	  _M_data->_M_amonth05 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
-+	  _M_data->_M_amonth06 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
-+	  _M_data->_M_amonth07 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
-+	  _M_data->_M_amonth08 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
-+	  _M_data->_M_amonth09 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
-+	  _M_data->_M_amonth10 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
-+	  _M_data->_M_amonth11 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
-+	  _M_data->_M_amonth12 = __u.__w;
-+	}
-+#endif // 0
-+    }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-new file mode 100644
-index 0000000..ba8e858
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -0,0 +1,68 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::__timepunct(size_t __refs)
-+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+    _M_name_timepunct(_S_get_c_name())
-+    { _M_initialize_timepunct(); }
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
-+    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
-+    _M_name_timepunct(_S_get_c_name())
-+    { _M_initialize_timepunct(); }
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
-+				     size_t __refs)
-+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+    _M_name_timepunct(__s)
-+    {
-+      char* __tmp = new char[std::strlen(__s) + 1];
-+      std::strcpy(__tmp, __s);
-+      _M_name_timepunct = __tmp;
-+      _M_initialize_timepunct(__cloc);
-+    }
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::~__timepunct()
-+    {
-+      if (_M_name_timepunct != _S_get_c_name())
-+	delete [] _M_name_timepunct;
-+      delete _M_data;
-+      _S_destroy_c_locale(_M_c_locale_timepunct);
-+    }
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index f40ddcf..c57a751 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -15822,6 +15822,9 @@ fi
-   # Default to "generic".
-   if test $enable_clocale_flag = auto; then
-     case ${target_os} in
-+      *-uclibc*)
-+        enable_clocale_flag=uclibc
-+        ;;
-       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- 	enable_clocale_flag=gnu
- 	;;
-@@ -16079,6 +16082,78 @@ $as_echo "newlib" >&6; }
-       CTIME_CC=config/locale/generic/time_members.cc
-       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
-       ;;
-+    uclibc)
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5
-+$as_echo "uclibc" >&6; }
-+
-+      # Declare intention to use gettext, and add support for specific
-+      # languages.
-+      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+      ALL_LINGUAS="de fr"
-+
-+      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+      # Extract the first word of "msgfmt", so it can be a program name with args.
-+set dummy msgfmt; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_check_msgfmt+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  if test -n "$check_msgfmt"; then
-+  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_prog_check_msgfmt="yes"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
-+
-+  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
-+fi
-+fi
-+check_msgfmt=$ac_cv_prog_check_msgfmt
-+if test -n "$check_msgfmt"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5
-+$as_echo "$check_msgfmt" >&6; }
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+        USE_NLS=yes
-+      fi
-+      # Export the build objects.
-+      for ling in $ALL_LINGUAS; do \
-+        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+      done
-+
-+
-+
-+      CLOCALE_H=config/locale/uclibc/c_locale.h
-+      CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+      CMESSAGES_H=config/locale/uclibc/messages_members.h
-+      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+      CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+      CTIME_H=config/locale/uclibc/time_members.h
-+      CTIME_CC=config/locale/uclibc/time_members.cc
-+      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+      ;;
-   esac
- 
-   # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
-index 580d725..3fe61b8 100644
---- a/libstdc++-v3/include/c_compatibility/wchar.h
-+++ b/libstdc++-v3/include/c_compatibility/wchar.h
-@@ -101,7 +101,9 @@ using std::wmemcmp;
- using std::wmemcpy;
- using std::wmemmove;
- using std::wmemset;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using std::wcsftime;
-+#endif
- 
- #if _GLIBCXX_USE_C99
- using std::wcstold;
-diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
-index 0e6b1fc..405aee2 100644
---- a/libstdc++-v3/include/c_std/cwchar
-+++ b/libstdc++-v3/include/c_std/cwchar
-@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
-   using ::wcscoll;
-   using ::wcscpy;
-   using ::wcscspn;
-+#if _GLIBCXX_HAVE_WCSFTIME
-   using ::wcsftime;
-+#endif
-   using ::wcslen;
-   using ::wcsncat;
-   using ::wcsncmp;
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0005-uclibc-locale-no__x.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0005-uclibc-locale-no__x.patch
deleted file mode 100644
index dcbbfe4..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0005-uclibc-locale-no__x.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From 6a3e8506a12c12728d8b29901defd738be43757f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:42:36 +0400
-Subject: [PATCH 05/35] uclibc-locale-no__x
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h      |   45 ++++++++++++++++++++
- libstdc++-v3/config/locale/uclibc/c_locale.cc      |   14 ------
- libstdc++-v3/config/locale/uclibc/c_locale.h       |    1 +
- .../config/locale/uclibc/collate_members.cc        |    7 ---
- libstdc++-v3/config/locale/uclibc/ctype_members.cc |    7 ---
- .../config/locale/uclibc/messages_members.cc       |    7 +--
- .../config/locale/uclibc/messages_members.h        |   18 +++-----
- .../config/locale/uclibc/monetary_members.cc       |    4 --
- .../config/locale/uclibc/numeric_members.cc        |    3 --
- libstdc++-v3/config/locale/uclibc/time_members.cc  |    3 --
- 10 files changed, 55 insertions(+), 54 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index 2ae3e4a..e74fddf 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
- extern "C" __typeof(wctype_l) __wctype_l;
- #endif
- 
-+# define __nl_langinfo_l nl_langinfo_l
-+# define __strcoll_l strcoll_l
-+# define __strftime_l strftime_l
-+# define __strtod_l strtod_l
-+# define __strtof_l strtof_l
-+# define __strtold_l strtold_l
-+# define __strxfrm_l strxfrm_l
-+# define __newlocale newlocale
-+# define __freelocale freelocale
-+# define __duplocale duplocale
-+# define __uselocale uselocale
-+
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+#  define __iswctype_l iswctype_l
-+#  define __towlower_l towlower_l
-+#  define __towupper_l towupper_l
-+#  define __wcscoll_l wcscoll_l
-+#  define __wcsftime_l wcsftime_l
-+#  define __wcsxfrm_l wcsxfrm_l
-+#  define __wctype_l wctype_l
-+# endif
-+
-+#else
-+# define __nl_langinfo_l(N, L)       nl_langinfo((N))
-+# define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
-+# define __strtod_l(S, E, L)         strtod((S), (E))
-+# define __strtof_l(S, E, L)         strtof((S), (E))
-+# define __strtold_l(S, E, L)        strtold((S), (E))
-+# define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
-+# warning should dummy __newlocale check for C|POSIX ?
-+# define __newlocale(a, b, c)        NULL
-+# define __freelocale(a)             ((void)0)
-+# define __duplocale(a)              __c_locale()
-+//# define __uselocale ?
-+//
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+#  define __iswctype_l(C, M, L)       iswctype((C), (M))
-+#  define __towlower_l(C, L)          towlower((C))
-+#  define __towupper_l(C, L)          towupper((C))
-+#  define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
-+//#  define __wcsftime_l(S, M, F, T, L)  wcsftime((S), (M), (F), (T))
-+#  define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
-+#  define __wctype_l(S, L)            wctype((S))
-+# endif
-+
- #endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 5081dc1..21430d0 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,20 +39,6 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
- 
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
--#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
--#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
--#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
--#define __strtof_l(S, E, L)         strtof((S), (E))
--#define __strtod_l(S, E, L)         strtod((S), (E))
--#define __strtold_l(S, E, L)        strtold((S), (E))
--#warning should dummy __newlocale check for C|POSIX ?
--#define __newlocale(a, b, c)        NULL
--#define __freelocale(a)             ((void)0)
--#define __duplocale(a)              __c_locale()
--#endif
--
- namespace std
- {
-   template<>
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index da07c1f..4bca5f1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -68,6 +68,7 @@ namespace __gnu_cxx
- {
-   extern "C" __typeof(uselocale) __uselocale;
- }
-+#define __uselocale uselocale
- #endif
- 
- namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-index c2664a7..ec5c329 100644
---- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -36,13 +36,6 @@
- #include <locale>
- #include <bits/c++locale_internal.h>
- 
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
--#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
--#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
--#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
--#endif
--
- namespace std
- {
-   // These are basically extensions to char_traits, and perhaps should
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7294e3a..7b12861 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -38,13 +38,6 @@
- #undef _LIBC
- #include <bits/c++locale_internal.h>
- 
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __wctype_l(S, L)           wctype((S))
--#define __towupper_l(C, L)         towupper((C))
--#define __towlower_l(C, L)         towlower((C))
--#define __iswctype_l(C, M, L)      iswctype((C), (M))
--#endif
--
- namespace std
- {
-   // NB: The other ctype<char> specializations are in src/locale.cc and
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-index 13594d9..d7693b4 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -39,13 +39,10 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix gettext stuff
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__dcgettext(const char *domainname,
--			     const char *msgid, int category);
- #undef gettext
--#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
- #else
--#undef gettext
- #define gettext(msgid) (msgid)
- #endif
- 
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index 1424078..d89da33 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -36,15 +36,11 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix prototypes for *textdomain funcs
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__textdomain(const char *domainname);
--extern "C" char *__bindtextdomain(const char *domainname,
--				  const char *dirname);
--#else
--#undef __textdomain
--#undef __bindtextdomain
--#define __textdomain(D)           ((void)0)
--#define __bindtextdomain(D,P)     ((void)0)
-+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#undef textdomain
-+#undef bindtextdomain
-+#define textdomain(D)           ((void)0)
-+#define bindtextdomain(D,P)     ((void)0)
- #endif
- 
-   // Non-virtual member functions.
-@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
-     messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
- 			   const char* __dir) const
-     {
--      __bindtextdomain(__s.c_str(), __dir);
-+      bindtextdomain(__s.c_str(), __dir);
-       return this->do_open(__s, __loc);
-     }
- 
-@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
-     {
-       // No error checking is done, assume the catalog exists and can
-       // be used.
--      __textdomain(__s.c_str());
-+      textdomain(__s.c_str());
-       return 0;
-     }
- 
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index aa52731..2e6f80a 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -43,10 +43,6 @@
- #warning tailor for stub locale support
- #endif
- 
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L)         nl_langinfo((N))
--#endif
--
- namespace std
- {
-   // Construct and return valid pattern consisting of some combination of:
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 883ec1a..2c70642 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -41,9 +41,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L)         nl_langinfo((N))
--#endif
- 
- namespace std
- {
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index e0707d7..d848ed5 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -40,9 +40,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L)         nl_langinfo((N))
--#endif
- 
- namespace std
- {
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0006-uclibc-locale-wchar_fix.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0006-uclibc-locale-wchar_fix.patch
deleted file mode 100644
index 3406859..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0006-uclibc-locale-wchar_fix.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 225511a3aeb193a916b3999f0b640a392caa67cd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:45:57 +0400
-Subject: [PATCH 06/35] uclibc-locale-wchar_fix
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/uclibc/monetary_members.cc |    4 ++--
- libstdc++-v3/config/locale/uclibc/numeric_members.cc  |   13 +++++++++++++
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 2e6f80a..31ebb9f 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -401,7 +401,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-@@ -556,7 +556,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 2c70642..d5c8961 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -127,12 +127,25 @@ namespace std
- 	{
- 	  // Named locale.
- 	  // NB: In the GNU model wchar_t is always 32 bit wide.
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be numeric
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# elif defined __UCLIBC_HAS_LOCALE__
-+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
- 	  union { char *__s; wchar_t __w; } __u;
- 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
- 	  _M_data->_M_decimal_point = __u.__w;
- 
- 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
- 	  _M_data->_M_thousands_sep = __u.__w;
-+#endif
- 
- 	  if (_M_data->_M_thousands_sep == L'\0')
- 	    _M_data->_M_grouping = "";
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0007-uclibc-locale-update.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0007-uclibc-locale-update.patch
deleted file mode 100644
index 5851123..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0007-uclibc-locale-update.patch
+++ /dev/null
@@ -1,542 +0,0 @@
-From 6ffe7c46f52d27864c3df3663e16ec9ddee71e8f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:46:58 +0400
-Subject: [PATCH 07/35] uclibc-locale-update
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h      |    3 +
- libstdc++-v3/config/locale/uclibc/c_locale.cc      |   74 +++++++++-----------
- libstdc++-v3/config/locale/uclibc/c_locale.h       |   42 ++++++-----
- libstdc++-v3/config/locale/uclibc/ctype_members.cc |   51 ++++++++++----
- .../config/locale/uclibc/messages_members.h        |   12 ++--
- .../config/locale/uclibc/monetary_members.cc       |   34 +++++----
- .../config/locale/uclibc/numeric_members.cc        |    5 ++
- libstdc++-v3/config/locale/uclibc/time_members.cc  |   18 +++--
- libstdc++-v3/config/locale/uclibc/time_members.h   |   17 +++--
- 9 files changed, 158 insertions(+), 98 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index e74fddf..971a6b4 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -31,6 +31,9 @@
- 
- #include <bits/c++config.h>
- #include <clocale>
-+#include <cstdlib>
-+#include <cstring>
-+#include <cstddef>
- 
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning clean this up
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 21430d0..1b9d8e1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,23 +39,20 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
- 
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
-   template<>
-     void
-     __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
- 		   const __c_locale& __cloc)
-     {
--      if (!(__err & ios_base::failbit))
--	{
--	  char* __sanity;
--	  errno = 0;
--	  float __f = __strtof_l(__s, &__sanity, __cloc);
--          if (__sanity != __s && errno != ERANGE)
--	    __v = __f;
--	  else
--	    __err |= ios_base::failbit;
--	}
-+      char* __sanity;
-+      errno = 0;
-+      float __f = __strtof_l(__s, &__sanity, __cloc);
-+      if (__sanity != __s && errno != ERANGE)
-+	__v = __f;
-+      else
-+	__err |= ios_base::failbit;
-     }
- 
-   template<>
-@@ -63,16 +60,13 @@ namespace std
-     __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
- 		   const __c_locale& __cloc)
-     {
--      if (!(__err & ios_base::failbit))
--	{
--	  char* __sanity;
--	  errno = 0;
--	  double __d = __strtod_l(__s, &__sanity, __cloc);
--          if (__sanity != __s && errno != ERANGE)
--	    __v = __d;
--	  else
--	    __err |= ios_base::failbit;
--	}
-+      char* __sanity;
-+      errno = 0;
-+      double __d = __strtod_l(__s, &__sanity, __cloc);
-+      if (__sanity != __s && errno != ERANGE)
-+	__v = __d;
-+      else
-+	__err |= ios_base::failbit;
-     }
- 
-   template<>
-@@ -80,16 +74,13 @@ namespace std
-     __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
- 		   const __c_locale& __cloc)
-     {
--      if (!(__err & ios_base::failbit))
--	{
--	  char* __sanity;
--	  errno = 0;
--	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
--          if (__sanity != __s && errno != ERANGE)
--	    __v = __ld;
--	  else
--	    __err |= ios_base::failbit;
--	}
-+      char* __sanity;
-+      errno = 0;
-+      long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+      if (__sanity != __s && errno != ERANGE)
-+	__v = __ld;
-+      else
-+	__err |= ios_base::failbit;
-     }
- 
-   void
-@@ -110,17 +101,18 @@ namespace std
-   void
-   locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-   {
--    if (_S_get_c_locale() != __cloc)
-+    if (__cloc && _S_get_c_locale() != __cloc)
-       __freelocale(__cloc);
-   }
- 
-   __c_locale
-   locale::facet::_S_clone_c_locale(__c_locale& __cloc)
-   { return __duplocale(__cloc); }
--} // namespace std
- 
--namespace __gnu_cxx
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-+
-   const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-     {
-       "LC_CTYPE",
-@@ -138,9 +130,11 @@ namespace __gnu_cxx
-       "LC_IDENTIFICATION"
- #endif
-     };
--}
- 
--namespace std
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
-   const char* const* const locale::_S_categories = __gnu_cxx::category_names;
--}  // namespace std
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index 4bca5f1..64a6d46 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -39,21 +39,23 @@
- #pragma GCC system_header
- 
- #include <cstring>              // get std::strlen
--#include <cstdio>               // get std::snprintf or std::sprintf
-+#include <cstdio>               // get std::vsnprintf or std::vsprintf
- #include <clocale>
- #include <langinfo.h>		// For codecvt
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix this
- #endif
--#ifdef __UCLIBC_HAS_LOCALE__
-+#ifdef _GLIBCXX_USE_ICONV
- #include <iconv.h>		// For codecvt using iconv, iconv_t
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--#include <libintl.h> 		// For messages
-+#ifdef HAVE_LIBINTL_H
-+#include <libintl.h>		// For messages
- #endif
-+#include <cstdarg>
- 
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning what is _GLIBCXX_C_LOCALE_GNU for
-+// psm: used in os/gnu-linux/ctype_noninline.h
- #endif
- #define _GLIBCXX_C_LOCALE_GNU 1
- 
-@@ -78,23 +80,25 @@ namespace std
- #else
-   typedef int*			__c_locale;
- #endif
--
--  // Convert numeric value of type _Tv to string and return length of
--  // string.  If snprintf is available use it, otherwise fall back to
--  // the unsafe sprintf which, in general, can be dangerous and should
-+  // Convert numeric value of type double to string and return length of
-+  // string.  If vsnprintf is available use it, otherwise fall back to
-+  // the unsafe vsprintf which, in general, can be dangerous and should
-   // be avoided.
--  template<typename _Tv>
--    int
--    __convert_from_v(char* __out,
--		     const int __size __attribute__ ((__unused__)),
--		     const char* __fmt,
--#ifdef __UCLIBC_HAS_XCLOCALE__
--		     _Tv __v, const __c_locale& __cloc, int __prec)
-+    inline int
-+    __convert_from_v(const __c_locale&
-+#ifndef __UCLIBC_HAS_XCLOCALE__
-+	__cloc __attribute__ ((__unused__))
-+#endif
-+		     ,
-+		     char* __out,
-+		     const int __size,
-+		     const char* __fmt, ...)
-     {
-+      va_list __args;
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+
-       __c_locale __old = __gnu_cxx::__uselocale(__cloc);
- #else
--		     _Tv __v, const __c_locale&, int __prec)
--    {
- # ifdef __UCLIBC_HAS_LOCALE__
-       char* __old = std::setlocale(LC_ALL, NULL);
-       char* __sav = new char[std::strlen(__old) + 1];
-@@ -103,7 +107,9 @@ namespace std
- # endif
- #endif
- 
--      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+      va_start(__args, __fmt);
-+      const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
-+      va_end(__args);
- 
- #ifdef __UCLIBC_HAS_XCLOCALE__
-       __gnu_cxx::__uselocale(__old);
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7b12861..13e011d 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -33,16 +33,20 @@
- 
- // Written by Benjamin Kosnik <bkoz@redhat.com>
- 
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
- 
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
-   // NB: The other ctype<char> specializations are in src/locale.cc and
-   // various /config/os/* files.
--  template<>
-     ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-     : ctype<char>(0, false, __refs)
-     {
-@@ -57,6 +61,8 @@ namespace std
- #endif
- 	}
-     }
-+    ctype_byname<char>::~ctype_byname()
-+    { }
- 
- #ifdef _GLIBCXX_USE_WCHAR_T
-   ctype<wchar_t>::__wmask_type
-@@ -138,17 +144,33 @@ namespace std
-   ctype<wchar_t>::
-   do_is(mask __m, wchar_t __c) const
-   {
--    // Highest bitmask in ctype_base == 10, but extra in "C"
--    // library for blank.
-+    // The case of __m == ctype_base::space is particularly important,
-+    // due to its use in many istream functions.  Therefore we deal with
-+    // it first, exploiting the knowledge that on GNU systems _M_bit[5]
-+    // is the mask corresponding to ctype_base::space.  NB: an encoding
-+    // change would not affect correctness!
-+
-     bool __ret = false;
--    const size_t __bitmasksize = 11;
--    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
--      if (__m & _M_bit[__bitcur]
--	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
--	{
--	  __ret = true;
--	  break;
--	}
-+    if (__m == _M_bit[5])
-+      __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
-+    else
-+      {
-+	// Highest bitmask in ctype_base == 10, but extra in "C"
-+	// library for blank.
-+	const size_t __bitmasksize = 11;
-+	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+	  if (__m & _M_bit[__bitcur])
-+	    {
-+	      if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+		{
-+		  __ret = true;
-+		  break;
-+		}
-+	      else if (__m == _M_bit[__bitcur])
-+		break;
-+	    }
-+      }
-+
-     return __ret;
-   }
- 
-@@ -290,4 +312,5 @@ namespace std
- #endif
-   }
- #endif //  _GLIBCXX_USE_WCHAR_T
--}
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index d89da33..067657a 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -53,12 +53,16 @@
-   template<typename _CharT>
-      messages<_CharT>::messages(__c_locale __cloc, const char* __s,
- 				size_t __refs)
--     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
--     _M_name_messages(__s)
-+     : facet(__refs), _M_c_locale_messages(NULL),
-+     _M_name_messages(NULL)
-      {
--       char* __tmp = new char[std::strlen(__s) + 1];
--       std::strcpy(__tmp, __s);
-+       const size_t __len = std::strlen(__s) + 1;
-+       char* __tmp = new char[__len];
-+       std::memcpy(__tmp, __s, __len);
-        _M_name_messages = __tmp;
-+
-+       // Last to avoid leaking memory if new throws.
-+       _M_c_locale_messages = _S_clone_c_locale(__cloc);
-      }
- 
-   template<typename _CharT>
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 31ebb9f..7679b9c 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -33,9 +33,14 @@
- 
- // Written by Benjamin Kosnik <bkoz@redhat.com>
- 
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
- 
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -206,7 +211,7 @@ namespace std
- 	  }
- 	break;
-       default:
--	;
-+	__ret = pattern();
-       }
-     return __ret;
-   }
-@@ -390,7 +395,9 @@ namespace std
- 	  __c_locale __old = __uselocale(__cloc);
- #else
- 	  // Switch to named locale so that mbsrtowcs will work.
--	  char* __old = strdup(setlocale(LC_ALL, NULL));
-+  	  char* __old = setlocale(LC_ALL, NULL);
-+          const size_t __llen = strlen(__old) + 1;
-+          char* __sav = new char[__llen];
- 	  setlocale(LC_ALL, __name);
- #endif
- 
-@@ -477,8 +484,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- 	      __uselocale(__old);
- #else
--	      setlocale(LC_ALL, __old);
--	      free(__old);
-+	      setlocale(LC_ALL, __sav);
-+	      delete [] __sav;
- #endif
- 	      __throw_exception_again;
- 	    }
-@@ -498,8 +505,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- 	  __uselocale(__old);
- #else
--	  setlocale(LC_ALL, __old);
--	  free(__old);
-+	  setlocale(LC_ALL, __sav);
-+	  delete [] __sav;
- #endif
- 	}
-     }
-@@ -545,8 +552,11 @@ namespace std
- 	  __c_locale __old = __uselocale(__cloc);
- #else
- 	  // Switch to named locale so that mbsrtowcs will work.
--	  char* __old = strdup(setlocale(LC_ALL, NULL));
--	  setlocale(LC_ALL, __name);
-+          char* __old = setlocale(LC_ALL, NULL);
-+          const size_t __llen = strlen(__old) + 1;
-+          char* __sav = new char[__llen];
-+          memcpy(__sav, __old, __llen);
-+          setlocale(LC_ALL, __name);
- #endif
- 
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -633,8 +643,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- 	      __uselocale(__old);
- #else
--	      setlocale(LC_ALL, __old);
--	      free(__old);
-+	      setlocale(LC_ALL, __sav);
-+	      delete [] __sav;
- #endif
-               __throw_exception_again;
- 	    }
-@@ -653,8 +663,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- 	  __uselocale(__old);
- #else
--	  setlocale(LC_ALL, __old);
--	  free(__old);
-+	  setlocale(LC_ALL, __sav);
-+	  delete [] __sav;
- #endif
- 	}
-     }
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index d5c8961..8ae8969 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -33,9 +33,14 @@
- 
- // Written by Benjamin Kosnik <bkoz@redhat.com>
- 
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
- 
- #ifdef __UCLIBC_MJN3_ONLY__
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index d848ed5..f24d53e 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -53,11 +53,14 @@ namespace std
-       const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
- 					_M_c_locale_timepunct);
- #else
--      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      char* __old = setlocale(LC_ALL, NULL);
-+      const size_t __llen = strlen(__old) + 1;
-+      char* __sav = new char[__llen];
-+      memcpy(__sav, __old, __llen);
-       setlocale(LC_ALL, _M_name_timepunct);
-       const size_t __len = strftime(__s, __maxlen, __format, __tm);
--      setlocale(LC_ALL, __old);
--      free(__old);
-+      setlocale(LC_ALL, __sav);
-+      delete [] __sav;
- #endif
-       // Make sure __s is null terminated.
-       if (__len == 0)
-@@ -207,11 +210,14 @@ namespace std
-       const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
- 					_M_c_locale_timepunct);
- #else
--      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      char* __old = setlocale(LC_ALL, NULL);
-+      const size_t __llen = strlen(__old) + 1;
-+      char* __sav = new char[__llen];
-+      memcpy(__sav, __old, __llen);
-       setlocale(LC_ALL, _M_name_timepunct);
-       const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
--      setlocale(LC_ALL, __old);
--      free(__old);
-+      setlocale(LC_ALL, __sav);
-+      delete [] __sav;
- #endif
-       // Make sure __s is null terminated.
-       if (__len == 0)
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-index ba8e858..1665dde 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -50,12 +50,21 @@
-     __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
- 				     size_t __refs)
-     : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
--    _M_name_timepunct(__s)
-+    _M_name_timepunct(NULL)
-     {
--      char* __tmp = new char[std::strlen(__s) + 1];
--      std::strcpy(__tmp, __s);
-+      const size_t __len = std::strlen(__s) + 1;
-+      char* __tmp = new char[__len];
-+      std::memcpy(__tmp, __s, __len);
-       _M_name_timepunct = __tmp;
--      _M_initialize_timepunct(__cloc);
-+
-+      try
-+	{ _M_initialize_timepunct(__cloc); }
-+      catch(...)
-+	{
-+	  delete [] _M_name_timepunct;
-+	  __throw_exception_again;
-+	}
-+
-     }
- 
-   template<typename _CharT>
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0008-missing-execinfo_h.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0008-missing-execinfo_h.patch
deleted file mode 100644
index 2823809..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0008-missing-execinfo_h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 9f2158451981cf0a80cfabdc79ae31bb6976a801 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:48:10 +0400
-Subject: [PATCH 08/35] missing-execinfo_h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- boehm-gc/include/gc.h |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
-index c51e017..a7ba8dc 100644
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
--     && !defined(__ia64__)
-+     && !defined(__ia64__) && !defined(__UCLIBC__)
- #   ifndef GC_HAVE_BUILTIN_BACKTRACE
- #     define GC_HAVE_BUILTIN_BACKTRACE
- #   endif
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0009-c99-snprintf.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0009-c99-snprintf.patch
deleted file mode 100644
index 7168778..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0009-c99-snprintf.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From e393e076f1ab82d25e1aa04d6edea27b41d3eb06 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:49:03 +0400
-Subject: [PATCH 09/35] c99-snprintf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/include/c_std/cstdio |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
-index e85bd83..6af839a 100644
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -139,7 +139,7 @@ namespace std
-   using ::vsprintf;
- } // namespace std
- 
--#if _GLIBCXX_USE_C99
-+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
- 
- #undef snprintf
- #undef vfscanf
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0010-c99-complex-ugly-hack.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0010-c99-complex-ugly-hack.patch
deleted file mode 100644
index b628571..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0010-c99-complex-ugly-hack.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 73f69d806e2c9561a54995223431a1076cfd6164 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:49:57 +0400
-Subject: [PATCH 10/35] c99-complex-ugly-hack
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libstdc++-v3/configure |    3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index c57a751..a1333e2 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -18734,6 +18734,9 @@ $as_echo_n "checking for ISO C99 support to TR1 in <complex.h>... " >&6; }
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h.  */
- #include <complex.h>
-+#ifdef __UCLIBC__
-+#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
-+#endif
- int
- main ()
- {
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0011-index_macro.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0011-index_macro.patch
deleted file mode 100644
index 8ee79b0..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0011-index_macro.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From b037953e40312b45ab84ed0a3ad882bb5e413101 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:51:02 +0400
-Subject: [PATCH 11/35] index_macro
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/include/ext/rope       |    3 +++
- libstdc++-v3/include/ext/ropeimpl.h |    3 +++
- 2 files changed, 6 insertions(+)
-
-diff --git a/libstdc++-v3/include/ext/rope b/libstdc++-v3/include/ext/rope
-index 38eb1e8..158d21a 100644
---- a/libstdc++-v3/include/ext/rope
-+++ b/libstdc++-v3/include/ext/rope
-@@ -55,6 +55,9 @@
- #include <bits/gthr.h>
- #include <tr1/functional>
- 
-+/* cope w/ index defined as macro, SuSv3 proposal */
-+#undef index
-+
- # ifdef __GC
- #   define __GC_CONST const
- # else
-diff --git a/libstdc++-v3/include/ext/ropeimpl.h b/libstdc++-v3/include/ext/ropeimpl.h
-index d7b5cbd..b9b3acb 100644
---- a/libstdc++-v3/include/ext/ropeimpl.h
-+++ b/libstdc++-v3/include/ext/ropeimpl.h
-@@ -48,6 +48,9 @@
- #include <ext/memory> // For uninitialized_copy_n
- #include <ext/numeric> // For power
- 
-+/* cope w/ index defined as macro, SuSv3 proposal */
-+#undef index
-+
- namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0012-libmudflap-susv3-legacy.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0012-libmudflap-susv3-legacy.patch
deleted file mode 100644
index 968d45e..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0012-libmudflap-susv3-legacy.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From a0cb13bdd98a941b81fdafe4cd96e4c569feb651 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:52:36 +0400
-Subject: [PATCH 12/35] libmudflap-susv3-legacy
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libmudflap/mf-hooks2.c |   10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/libmudflap/mf-hooks2.c b/libmudflap/mf-hooks2.c
-index 4af17df..a3c6b2f 100644
---- a/libmudflap/mf-hooks2.c
-+++ b/libmudflap/mf-hooks2.c
-@@ -424,7 +424,7 @@ WRAPPER2(void, bzero, void *s, size_t n)
- {
-   TRACE ("%s\n", __PRETTY_FUNCTION__);
-   MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
--  bzero (s, n);
-+  memset (s, 0, n);
- }
- 
- 
-@@ -434,7 +434,7 @@ WRAPPER2(void, bcopy, const void *src, void *dest, size_t n)
-   TRACE ("%s\n", __PRETTY_FUNCTION__);
-   MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
-   MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
--  bcopy (src, dest, n);
-+  memmove (dest, src, n);
- }
- 
- 
-@@ -444,7 +444,7 @@ WRAPPER2(int, bcmp, const void *s1, const void *s2, size_t n)
-   TRACE ("%s\n", __PRETTY_FUNCTION__);
-   MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
-   MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
--  return bcmp (s1, s2, n);
-+  return n == 0 ? 0 : memcmp (s1, s2, n);
- }
- 
- 
-@@ -453,7 +453,7 @@ WRAPPER2(char *, index, const char *s, int c)
-   size_t n = strlen (s);
-   TRACE ("%s\n", __PRETTY_FUNCTION__);
-   MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
--  return index (s, c);
-+  return strchr (s, c);
- }
- 
- 
-@@ -462,7 +462,7 @@ WRAPPER2(char *, rindex, const char *s, int c)
-   size_t n = strlen (s);
-   TRACE ("%s\n", __PRETTY_FUNCTION__);
-   MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
--  return rindex (s, c);
-+  return strrchr (s, c);
- }
- 
- /* XXX:  stpcpy, memccpy */
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0013-libstdc-namespace.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0013-libstdc-namespace.patch
deleted file mode 100644
index 4a3efde..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0013-libstdc-namespace.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 104e4d66208f2726b14d2f5eebce90700cbc83c8 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:54:02 +0400
-Subject: [PATCH 13/35] libstdc++-namespace
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/uclibc/messages_members.h |    4 +++-
- libstdc++-v3/config/locale/uclibc/time_members.h     |    4 +++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index 067657a..dd76a6c 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -32,7 +32,8 @@
- //
- 
- // Written by Benjamin Kosnik <bkoz@redhat.com>
--
-+namespace std
-+{
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix prototypes for *textdomain funcs
- #endif
-@@ -116,3 +117,4 @@
- 	   this->_S_create_c_locale(this->_M_c_locale_messages, __s);
- 	 }
-      }
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-index 1665dde..905c433 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -33,7 +33,8 @@
- //
- 
- // Written by Benjamin Kosnik <bkoz@redhat.com>
--
-+namespace std
-+{
-   template<typename _CharT>
-     __timepunct<_CharT>::__timepunct(size_t __refs)
-     : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-@@ -75,3 +76,4 @@
-       delete _M_data;
-       _S_destroy_c_locale(_M_c_locale_timepunct);
-     }
-+}
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0014-sh-pr24836.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0014-sh-pr24836.patch
deleted file mode 100644
index cb8fd52..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0014-sh-pr24836.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From edc9acb181810f234b6b9f7d2820b0e4f6a1eeaf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:54:48 +0400
-Subject: [PATCH 14/35] sh-pr24836
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
----
- gcc/configure    |    2 +-
- gcc/configure.ac |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index e12a180..135bbf5 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -23378,7 +23378,7 @@ foo:	.long	25
- 	tls_first_minor=14
- 	tls_as_opt="-m64 -Aesame --fatal-warnings"
- 	;;
--  sh-*-* | sh[34]-*-*)
-+  sh-*-* | sh[34]*-*-*)
-     conftest_s='
- 	.section ".tdata","awT",@progbits
- foo:	.long	25
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index eba3577..6363a21 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -3141,7 +3141,7 @@ foo:	.long	25
- 	tls_first_minor=14
- 	tls_as_opt="-m64 -Aesame --fatal-warnings"
- 	;;
--  sh-*-* | sh[34]-*-*)
-+  sh-*-* | sh[34]*-*-*)
-     conftest_s='
- 	.section ".tdata","awT",@progbits
- foo:	.long	25
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
deleted file mode 100644
index 1081222..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0015-arm-Use-TARGET_ENDIAN_OPTION-for-determining-MULTILI.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 50e5366005b0f6af27378e2a5c3cb9f9936a7e62 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:58:36 +0400
-Subject: [PATCH 15/35] arm: Use TARGET_ENDIAN_OPTION for determining
- MULTILIB_DEFAULTS
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/arm/linux-elf.h |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index 488efa4..753dc3a 100644
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -46,7 +46,7 @@
- 
- #undef  MULTILIB_DEFAULTS
- #define MULTILIB_DEFAULTS \
--	{ "marm", "mlittle-endian", "mfloat-abi=hard", "mno-thumb-interwork" }
-+	{ "marm", TARGET_ENDIAN_OPTION, "mfloat-abi=hard", "mno-thumb-interwork" }
- 
- /* Now we define the strings used to build the spec file.  */
- #undef  LIB_SPEC
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0016-gcc-poison-system-directories.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0016-gcc-poison-system-directories.patch
deleted file mode 100644
index c955e49..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0016-gcc-poison-system-directories.patch
+++ /dev/null
@@ -1,221 +0,0 @@
-From 160397ef3c3331099af028f1b8d3e085b07d88ad Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:59:00 +0400
-Subject: [PATCH 16/35] gcc: poison-system-directories
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
----
- gcc/Makefile.in     |    2 +-
- gcc/common.opt      |    4 ++++
- gcc/config.in       |    6 ++++++
- gcc/configure       |   20 ++++++++++++++++++--
- gcc/configure.ac    |   10 ++++++++++
- gcc/doc/invoke.texi |    9 +++++++++
- gcc/gcc.c           |    2 ++
- gcc/incpath.c       |   19 +++++++++++++++++++
- 8 files changed, 69 insertions(+), 3 deletions(-)
-
-Index: gcc-4.8.4/gcc/Makefile.in
-===================================================================
---- gcc-4.8.4.orig/gcc/Makefile.in
-+++ gcc-4.8.4/gcc/Makefile.in
-@@ -2019,7 +2019,7 @@ attribs.o : attribs.c $(CONFIG_H) $(SYST
- 
- incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \
- 		intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \
--		$(MACHMODE_H)
-+		$(MACHMODE_H) $(FLAGS_H) toplev.h
- 
- CFLAGS-prefix.o += -DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s)
- prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h prefix.h \
-Index: gcc-4.8.4/gcc/common.opt
-===================================================================
---- gcc-4.8.4.orig/gcc/common.opt
-+++ gcc-4.8.4/gcc/common.opt
-@@ -595,6 +595,10 @@ Wpedantic
- Common Var(pedantic) Warning
- Issue warnings needed for strict compliance to the standard
- 
-+Wpoison-system-directories
-+Common Var(flag_poison_system_directories) Init(1) Warning
-+Warn for -I and -L options using system directories if cross compiling
-+
- Wshadow
- Common Var(warn_shadow) Warning
- Warn when one local variable shadows another
-Index: gcc-4.8.4/gcc/config.in
-===================================================================
---- gcc-4.8.4.orig/gcc/config.in
-+++ gcc-4.8.4/gcc/config.in
-@@ -138,6 +138,12 @@
- #endif
- 
- 
-+/* Define to warn for use of native system header directories */
-+#ifndef USED_FOR_TARGET
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+#endif
-+
-+
- /* Define if you want all operations on RTL (the basic data structure of the
-    optimizer and back end) to be checked for dynamic type safety at runtime.
-    This is quite expensive. */
-Index: gcc-4.8.4/gcc/configure
-===================================================================
---- gcc-4.8.4.orig/gcc/configure
-+++ gcc-4.8.4/gcc/configure
-@@ -918,6 +918,7 @@ with_gc
- with_system_zlib
- enable_maintainer_mode
- enable_version_specific_runtime_libs
-+enable_poison_system_directories
- enable_plugin
- enable_libquadmath_support
- with_linker_hash_style
-@@ -1639,6 +1640,8 @@ Optional Features:
-   --enable-version-specific-runtime-libs
-                           specify that runtime libraries should be installed
-                           in a compiler-specific directory
-+  --enable-poison-system-directories
-+                          warn for use of native system header directories
-   --enable-plugin         enable plugin support
-   --disable-libquadmath-support
-                           disable libquadmath support for Fortran
-@@ -17847,7 +17850,7 @@ else
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 17850 "configure"
-+#line 17853 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -17953,7 +17956,7 @@ else
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 17956 "configure"
-+#line 17959 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -27219,6 +27222,19 @@ if test "${enable_version_specific_runti
- fi
- 
- 
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+  enableval=$enable_poison_system_directories;
-+else
-+  enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
-+
- # Substitute configuration variables
- 
- 
-Index: gcc-4.8.4/gcc/configure.ac
-===================================================================
---- gcc-4.8.4.orig/gcc/configure.ac
-+++ gcc-4.8.4/gcc/configure.ac
-@@ -5120,6 +5120,16 @@ AC_ARG_ENABLE(version-specific-runtime-l
-                 [specify that runtime libraries should be
-                  installed in a compiler-specific directory])])
- 
-+AC_ARG_ENABLE([poison-system-directories],
-+             AS_HELP_STRING([--enable-poison-system-directories],
-+                            [warn for use of native system header directories]),,
-+             [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+  AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+           [1],
-+           [Define to warn for use of native system header directories])
-+fi
-+
- # Substitute configuration variables
- AC_SUBST(subdirs)
- AC_SUBST(srcdir)
-Index: gcc-4.8.4/gcc/doc/invoke.texi
-===================================================================
---- gcc-4.8.4.orig/gcc/doc/invoke.texi
-+++ gcc-4.8.4/gcc/doc/invoke.texi
-@@ -258,6 +258,7 @@ Objective-C and Objective-C++ Dialects}.
- -Woverlength-strings  -Wpacked  -Wpacked-bitfield-compat  -Wpadded @gol
- -Wparentheses  -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
- -Wpointer-arith  -Wno-pointer-to-int-cast @gol
-+-Wno-poison-system-directories @gol
- -Wredundant-decls  -Wno-return-local-addr @gol
- -Wreturn-type  -Wsequence-point  -Wshadow @gol
- -Wsign-compare  -Wsign-conversion  -Wsizeof-pointer-memaccess @gol
-@@ -4022,6 +4023,14 @@ headers---for that, @option{-Wunknown-pr
-  for most targets, it is made up of code and thus requires the stack
-  to be made executable in order for the program to work properly.
- 
-+@item -Wno-poison-system-directories
-+@opindex Wno-poison-system-directories
-+Do not warn for @option{-I} or @option{-L} options using system
-+directories such as @file{/usr/include} when cross compiling.  This
-+option is intended for use in chroot environments when such
-+directories contain the correct headers and libraries for the target
-+system rather than the host.
-+
- @item -Wfloat-equal
- @opindex Wfloat-equal
- @opindex Wno-float-equal
-Index: gcc-4.8.4/gcc/gcc.c
-===================================================================
---- gcc-4.8.4.orig/gcc/gcc.c
-+++ gcc-4.8.4/gcc/gcc.c
-@@ -741,6 +741,8 @@ proper position among the other output f
-    "%{fuse-ld=*:-fuse-ld=%*}\
-     %X %{o*} %{e*} %{N} %{n} %{r}\
-     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\
-+    %{Wno-poison-system-directories:--no-poison-system-directories}\
-+    %{Werror=poison-system-directories:--error-poison-system-directories}\
-     %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
-     %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
-     %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
-Index: gcc-4.8.4/gcc/incpath.c
-===================================================================
---- gcc-4.8.4.orig/gcc/incpath.c
-+++ gcc-4.8.4/gcc/incpath.c
-@@ -28,6 +28,7 @@
- #include "intl.h"
- #include "incpath.h"
- #include "cppdefault.h"
-+#include "diagnostic-core.h"
- 
- /* Microsoft Windows does not natively support inodes.
-    VMS has non-numeric inodes.  */
-@@ -382,6 +383,24 @@ merge_include_chains (const char *sysroo
- 	}
-       fprintf (stderr, _("End of search list.\n"));
-     }
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+  if (flag_poison_system_directories)
-+    {
-+       struct cpp_dir *p;
-+
-+       for (p = heads[QUOTE]; p; p = p->next)
-+         {
-+          if ((!strncmp (p->name, "/usr/include", 12))
-+              || (!strncmp (p->name, "/usr/local/include", 18))
-+              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+            warning (OPT_Wpoison_system_directories,
-+                     "include location \"%s\" is unsafe for "
-+                     "cross-compilation",
-+                     p->name);
-+         }
-+    }
-+#endif
- }
- 
- /* Use given -I paths for #include "..." but not #include <...>, and
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0017-gcc-poison-dir-extend.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0017-gcc-poison-dir-extend.patch
deleted file mode 100644
index 9e81efd..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0017-gcc-poison-dir-extend.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From e99c9c97266d6d3e8cac798aa91408250c4d60cf Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:00:34 +0400
-Subject: [PATCH 17/35] gcc-poison-dir-extend
-
-Add /sw/include and /opt/include based on the original
-zecke-no-host-includes.patch patch.  The original patch checked for
-/usr/include, /sw/include and /opt/include and then triggered a failure and
-aborted.
-
-Instead, we add the two missing items to the current scan.  If the user
-wants this to be a failure, they can add "-Werror=poison-system-directories".
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/incpath.c |    4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index cd41c78..eac4a92 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -393,7 +393,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
-          {
-           if ((!strncmp (p->name, "/usr/include", 12))
-               || (!strncmp (p->name, "/usr/local/include", 18))
--              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+              || (!strncmp (p->name, "/usr/X11R6/include", 18))
-+              || (!strncmp (p->name, "/sw/include", 11))
-+              || (!strncmp (p->name, "/opt/include", 12)))
-             warning (OPT_Wpoison_system_directories,
-                      "include location \"%s\" is unsafe for "
-                      "cross-compilation",
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
deleted file mode 100644
index a28cafd..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0018-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 56207fa2923e8edf774e98ffac82666091076be3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:08:31 +0400
-Subject: [PATCH 18/35] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
-
-Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
-
-This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
-
-Other changes I had to do include:
-
-- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
-
-- passing the right CFLAGS to configure scripts as exported environment variables
-
-I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
-
-Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
-
-Signed-off-by: Paolo Bonzini  <bonzini@gnu.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- configure |   32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/configure b/configure
-index 1b76c90..e4dce7c 100755
---- a/configure
-+++ b/configure
-@@ -6772,6 +6772,38 @@ fi
- 
- 
- 
-+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
-+# might be empty or "-g".  We don't require a C++ compiler, so CXXFLAGS
-+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
-+# We want to ensure that TARGET libraries (which we know are built with
-+# gcc) are built with "-O2 -g", so include those options when setting
-+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
-+if test "x$CFLAGS_FOR_TARGET" = x; then
-+  CFLAGS_FOR_TARGET=$CFLAGS
-+  case " $CFLAGS " in
-+    *" -O2 "*) ;;
-+    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
-+  esac
-+  case " $CFLAGS " in
-+    *" -g "* | *" -g3 "*) ;;
-+    *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
-+  esac
-+fi
-+
-+
-+if test "x$CXXFLAGS_FOR_TARGET" = x; then
-+  CXXFLAGS_FOR_TARGET=$CXXFLAGS
-+  case " $CXXFLAGS " in
-+    *" -O2 "*) ;;
-+    *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
-+  esac
-+  case " $CXXFLAGS " in
-+    *" -g "* | *" -g3 "*) ;;
-+    *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
-+  esac
-+fi
-+
-+
- # Handle --with-headers=XXX.  If the value is not "yes", the contents of
- # the named directory are copied to $(tooldir)/sys-include.
- if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0019-64-bit-multilib-hack.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0019-64-bit-multilib-hack.patch
deleted file mode 100644
index a975cfb..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0019-64-bit-multilib-hack.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 18fde5740b09324dfb9cf41e9849672573ff5fa0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:10:06 +0400
-Subject: [PATCH 19/35] 64-bit multilib hack.
-
-GCC has internal multilib handling code but it assumes a very specific rigid directory
-layout. The build system implementation of multilib layout is very generic and allows
-complete customisation of the library directories.
-
-This patch is a partial solution to allow any custom directories to be passed into gcc
-and handled correctly. It forces gcc to use the base_libdir (which is the current
-directory, "."). We need to do this for each multilib that is configured as we don't
-know which compiler options may be being passed into the compiler. Since we have a compiler
-per mulitlib at this point that isn't an issue.
-
-The one problem is the target compiler is only going to work for the default multlilib at
-this point. Ideally we'd figure out which multilibs were being enabled with which paths
-and be able to patch these entries with a complete set of correct paths but this we
-don't have such code at this point. This is something the target gcc recipe should do
-and override these platform defaults in its build config.
-
-RP 15/8/11
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/i386/t-linux64   |    6 ++----
- gcc/config/mips/t-linux64   |   10 +++-------
- gcc/config/rs6000/t-linux64 |    5 ++---
- 3 files changed, 7 insertions(+), 14 deletions(-)
-
-Index: gcc-4.8.4/gcc/config/i386/t-linux64
-===================================================================
---- gcc-4.8.4.orig/gcc/config/i386/t-linux64
-+++ gcc-4.8.4/gcc/config/i386/t-linux64
-@@ -32,7 +32,5 @@
- #
- comma=,
- MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
--MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
--MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
--MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
--MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
-+MULTILIB_DIRNAMES = . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-Index: gcc-4.8.4/gcc/config/mips/t-linux64
-===================================================================
---- gcc-4.8.4.orig/gcc/config/mips/t-linux64
-+++ gcc-4.8.4/gcc/config/mips/t-linux64
-@@ -17,10 +17,6 @@
- # <http://www.gnu.org/licenses/>.
- 
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
--MULTILIB_DIRNAMES = n32 32 64
--MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
--MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
--MULTILIB_OSDIRNAMES = \
--	../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
--	../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
--	../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
-+MULTILIB_DIRNAMES = . . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-+
-Index: gcc-4.8.4/gcc/config/rs6000/t-linux64
-===================================================================
---- gcc-4.8.4.orig/gcc/config/rs6000/t-linux64
-+++ gcc-4.8.4/gcc/config/rs6000/t-linux64
-@@ -26,7 +26,6 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
- 
- MULTILIB_OPTIONS    := m64/m32
--MULTILIB_DIRNAMES   := 64 32
-+MULTILIB_DIRNAMES   := . .
- MULTILIB_EXTRA_OPTS := 
--MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
--MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
-+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0020-optional-libstdc.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0020-optional-libstdc.patch
deleted file mode 100644
index eff021e..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0020-optional-libstdc.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 307c8ff3ef666b7bd5ac733863f2fbb27a9d521e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:12:56 +0400
-Subject: [PATCH 20/35] optional libstdc
-
-gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
-will not run correctly since by default the linker will try to link against libstdc++
-which shouldn't exist yet. We need an option to disable -lstdc++
-option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
-driver. This patch adds such an option which only disables the -lstdc++.
-
-A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
-do this officially, the likely answer is don't build libstdc++ separately.
-
-RP 29/6/10
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- gcc/c-family/c.opt  |    4 ++++
- gcc/cp/g++spec.c    |    1 +
- gcc/doc/invoke.texi |    9 +++++++--
- gcc/gcc.c           |    1 +
- 4 files changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 10ae84d..dc3ffdf 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1299,6 +1299,10 @@ nostdinc++
- C++ ObjC++
- Do not search standard system include directories for C++
- 
-+nostdlib++
-+Driver
-+Do not link standard C++ runtime library
-+
- o
- C ObjC C++ ObjC++ Joined Separate
- ; Documented in common.opt
-diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
-index b896eea..f55216b 100644
---- a/gcc/cp/g++spec.c
-+++ b/gcc/cp/g++spec.c
-@@ -126,6 +126,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
-       switch (decoded_options[i].opt_index)
- 	{
- 	case OPT_nostdlib:
-+	case OPT_nostdlib__:
- 	case OPT_nodefaultlibs:
- 	  library = -1;
- 	  break;
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index a022622..f15c991 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -190,7 +190,7 @@ in the following sections.
- -frepo  -fno-rtti  -fstats  -ftemplate-backtrace-limit=@var{n} @gol
- -ftemplate-depth=@var{n} @gol
- -fno-threadsafe-statics -fuse-cxa-atexit  -fno-weak  -nostdinc++ @gol
---fno-default-inline  -fvisibility-inlines-hidden @gol
-+-nostdlib++ -fno-default-inline  -fvisibility-inlines-hidden @gol
- -fvisibility-ms-compat @gol
- -fext-numeric-literals @gol
- -Wabi  -Wconversion-null  -Wctor-dtor-privacy @gol
-@@ -453,7 +453,7 @@ Objective-C and Objective-C++ Dialects}.
- -nostartfiles  -nodefaultlibs  -nostdlib -pie -rdynamic @gol
- -s  -static -static-libgcc -static-libstdc++ @gol
- -static-libasan -static-libtsan @gol
---shared -shared-libgcc  -symbolic @gol
-+-shared -shared-libgcc  -symbolic -nostdlib++ @gol
- -T @var{script}  -Wl,@var{option}  -Xlinker @var{option} @gol
- -u @var{symbol}}
- 
-@@ -9886,6 +9886,11 @@ These entries are usually resolved by entries in
- libc.  These entry points should be supplied through some other
- mechanism when this option is specified.
- 
-+@item -nostdlib++
-+@opindex nostdlib++
-+Do not use the standard system C++ runtime libraries when linking.
-+Only the libraries you specify will be passed to the linker.
-+
- @cindex @option{-lgcc}, use with @option{-nostdlib}
- @cindex @option{-nostdlib} and unresolved references
- @cindex unresolved references and @option{-nostdlib}
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index efdb625..477752f 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -748,6 +748,7 @@ proper position among the other output files.  */
-     %(mflib) " STACK_SPLIT_SPEC "\
-     %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
-     %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
-+    %{!nostdlib++:}\
-     %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
- #endif
- 
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
deleted file mode 100644
index eb3c61f..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 004696e054ae9dc71d512cc755ccc4074fc62b2d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:14:20 +0400
-Subject: [PATCH 21/35] gcc: disable MASK_RELAX_PIC_CALLS bit
-
-The new feature added after 4.3.3
-"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
-will cause cc1plus eat up all the system memory when build webkit-gtk.
-The function mips_get_pic_call_symbol keeps on recursively calling itself.
-Disable this feature to walk aside the bug.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure    |    7 -------
- gcc/configure.ac |    7 -------
- 2 files changed, 14 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index b65d21d..bdab45a 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -25829,13 +25829,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
-         rm -f conftest.*
-       fi
-     fi
--    if test $gcc_cv_as_ld_jalr_reloc = yes; then
--      if test x$target_cpu_default = x; then
--        target_cpu_default=MASK_RELAX_PIC_CALLS
--      else
--        target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
--      fi
--    fi
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
- $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
- 
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index e226b85..5f5c909 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4099,13 +4099,6 @@ x:
-         rm -f conftest.*
-       fi
-     fi
--    if test $gcc_cv_as_ld_jalr_reloc = yes; then
--      if test x$target_cpu_default = x; then
--        target_cpu_default=MASK_RELAX_PIC_CALLS
--      else
--        target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
--      fi
--    fi
-     AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
- 
-     AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0022-COLLECT_GCC_OPTIONS.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0022-COLLECT_GCC_OPTIONS.patch
deleted file mode 100644
index 40c8abf..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0022-COLLECT_GCC_OPTIONS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 7f5c9dcc71c8b83a0b5596266cc4bdf0936e8e00 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:16:28 +0400
-Subject: [PATCH 22/35] COLLECT_GCC_OPTIONS
-
-This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
-invoke collect2.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/gcc.c |    9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 477752f..51062aa 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -4098,6 +4098,15 @@ set_collect_gcc_options (void)
- 		sizeof ("COLLECT_GCC_OPTIONS=") - 1);
- 
-   first_time = TRUE;
-+#ifdef HAVE_LD_SYSROOT
-+  if (target_system_root_changed && target_system_root)
-+    {
-+      obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
-+      obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
-+      obstack_grow (&collect_obstack, "'", 1);
-+      first_time = FALSE;
-+    }
-+#endif
-   for (i = 0; (int) i < n_switches; i++)
-     {
-       const char *const *args;
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
deleted file mode 100644
index 9e4435c..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 46d52439052f0876a92dcf8a0ab9c60d75c8030b Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:17:25 +0400
-Subject: [PATCH 23/35] Use the defaults.h in ${B} instead of ${S}, and t-oe
- in ${B}
-
-Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
-the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/Makefile.in  |    2 +-
- gcc/configure    |    4 ++--
- gcc/configure.ac |    4 ++--
- gcc/mkconfig.sh  |    4 ++--
- 4 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 90a2bba..2320497 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -469,7 +469,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
- TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
- 
- xmake_file=@xmake_file@
--tmake_file=@tmake_file@
-+tmake_file=@tmake_file@ ./t-oe
- TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
- TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
- TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
-diff --git a/gcc/configure b/gcc/configure
-index bdab45a..d587993 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11539,8 +11539,8 @@ for f in $tm_file; do
-        tm_include_list="${tm_include_list} $f"
-        ;;
-     defaults.h )
--       tm_file_list="${tm_file_list} \$(srcdir)/$f"
--       tm_include_list="${tm_include_list} $f"
-+       tm_file_list="${tm_file_list} ./$f"
-+       tm_include_list="${tm_include_list} ./$f"
-        ;;
-     * )
-        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 5f5c909..5e5e84f 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1720,8 +1720,8 @@ for f in $tm_file; do
-        tm_include_list="${tm_include_list} $f"
-        ;;
-     defaults.h )
--       tm_file_list="${tm_file_list} \$(srcdir)/$f"
--       tm_include_list="${tm_include_list} $f"
-+       tm_file_list="${tm_file_list} ./$f"
-+       tm_include_list="${tm_include_list} ./$f"
-        ;;
-     * )
-        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index 29fdfc7..e048dce 100644
---- a/gcc/mkconfig.sh
-+++ b/gcc/mkconfig.sh
-@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
-     if [ $# -ge 1 ]; then
- 	echo '#ifdef IN_GCC' >> ${output}T
- 	for file in "$@"; do
--	    if test x"$file" = x"defaults.h"; then
-+	    if test x"$file" = x"./defaults.h"; then
- 		postpone_defaults_h="yes"
- 	    else
- 		echo "# include \"$file\"" >> ${output}T
-@@ -103,7 +103,7 @@ esac
- 
- # If we postponed including defaults.h, add the #include now.
- if test x"$postpone_defaults_h" = x"yes"; then
--    echo "# include \"defaults.h\"" >> ${output}T
-+    echo "# include \"./defaults.h\"" >> ${output}T
- fi
- 
- # Add multiple inclusion protection guard, part two.
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch
deleted file mode 100644
index b47d841..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0024-PR-target-32219.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From e0d15f4f8bf28c351b9215ca37f1caa24df0e1fd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:18:54 +0400
-Subject: [PATCH 24/35] PR target/32219
-
-* varasm.c (default_binds_local_p_1): Weak data is not local.
-
-Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Backport
----
- gcc/testsuite/gcc.dg/visibility-21.c |   14 ++++++++++++++
- gcc/varasm.c                         |    9 ++++-----
- 2 files changed, 18 insertions(+), 5 deletions(-)
- create mode 100644 gcc/testsuite/gcc.dg/visibility-21.c
-
-diff --git a/gcc/testsuite/gcc.dg/visibility-21.c b/gcc/testsuite/gcc.dg/visibility-21.c
-new file mode 100644
-index 0000000..be7deda
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/visibility-21.c
-@@ -0,0 +1,14 @@
-+/* PR target/32219 */
-+/* { dg-do run } */
-+/* { dg-require-visibility "" } */
-+/* { dg-options "-fPIC" { target fpic } } */
-+
-+extern void f() __attribute__((weak,visibility("hidden")));
-+extern int puts( char const* );
-+int main()
-+{
-+	if (f)
-+		f();
-+	return 0;
-+}
-+
-diff --git a/gcc/varasm.c b/gcc/varasm.c
-index 6648103..fadba78 100644
---- a/gcc/varasm.c
-+++ b/gcc/varasm.c
-@@ -6675,6 +6675,10 @@ default_binds_local_p_1 (const_tree exp, int shlib)
-   /* Static variables are always local.  */
-   else if (! TREE_PUBLIC (exp))
-     local_p = true;
-+  /* hidden weak can't be overridden by something non-local, all
-+     that is possible is that it is not defined at all. */
-+  else if (DECL_WEAK (exp))
-+    local_p = false;
-   /* A variable is local if the user has said explicitly that it will
-      be.  */
-   else if ((DECL_VISIBILITY_SPECIFIED (exp)
-@@ -6688,11 +6692,6 @@ default_binds_local_p_1 (const_tree exp, int shlib)
-      local.  */
-   else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
-     local_p = true;
--  /* Default visibility weak data can be overridden by a strong symbol
--     in another module and so are not local.  */
--  else if (DECL_WEAK (exp)
--	   && !resolved_locally)
--    local_p = false;
-   /* If PIC, then assume that any global name can be overridden by
-      symbols resolved from other modules.  */
-   else if (shlib)
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0025-fortran-cross-compile-hack.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0025-fortran-cross-compile-hack.patch
deleted file mode 100644
index 0e7914d..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0025-fortran-cross-compile-hack.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From af8a56ea4e17b2909eff2c57704ab43ef24f28d3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:01 +0400
-Subject: [PATCH 25/35] fortran cross-compile hack.
-
-* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
-used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
-directory.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libgfortran/configure    |    2 +-
- libgfortran/configure.ac |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/configure b/libgfortran/configure
-index 8385e96..b8f7a92 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -12704,7 +12704,7 @@ esac
- 
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- ac_ext=${ac_fc_srcext-f}
- ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
- ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
-index 7d97fed..3f9f484 100644
---- a/libgfortran/configure.ac
-+++ b/libgfortran/configure.ac
-@@ -227,7 +227,7 @@ AC_SUBST(enable_static)
- 
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- AC_PROG_FC(gfortran)
- 
- # extra LD Flags which are required for targets
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0026-libgcc-sjlj-check.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0026-libgcc-sjlj-check.patch
deleted file mode 100644
index d4efab9..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0026-libgcc-sjlj-check.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 08c2398445e6cac282488f64ae6bf29cbcd8db23 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:50 +0400
-Subject: [PATCH 26/35] libgcc-sjlj-check
-
-ac_fn_c_try_compile doesnt seem to keep the intermediate files
-which are needed for sjlj test to pass since it greps into the
-generated file. So we run the compiler command using AC_TRY_COMMAND
-which then generates the needed .s file
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libgcc/configure    |   10 ++++++----
- libgcc/configure.ac |   10 ++++------
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/libgcc/configure b/libgcc/configure
-index 1425df6..d18e3cb 100644
---- a/libgcc/configure
-+++ b/libgcc/configure
-@@ -4208,17 +4208,19 @@ void foo ()
- }
- 
- _ACEOF
--CFLAGS_hold=$CFLAGS
--CFLAGS="--save-temps -fexceptions"
- libgcc_cv_lib_sjlj_exceptions=unknown
--if ac_fn_c_try_compile; then :
-+if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5'
-+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-+  (eval $ac_try) 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; }; then
-   if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-     libgcc_cv_lib_sjlj_exceptions=yes
-   elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
-     libgcc_cv_lib_sjlj_exceptions=no
-   fi
- fi
--CFLAGS=$CFLAGS_hold
- rm -f conftest*
- 
- fi
-diff --git a/libgcc/configure.ac b/libgcc/configure.ac
-index 8b7aba5..c7c9644 100644
---- a/libgcc/configure.ac
-+++ b/libgcc/configure.ac
-@@ -216,16 +216,14 @@ void foo ()
-   bar();
- }
- ])])
--CFLAGS_hold=$CFLAGS
--CFLAGS="--save-temps -fexceptions"
- libgcc_cv_lib_sjlj_exceptions=unknown
--AS_IF([ac_fn_c_try_compile],
--  [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-+if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
-+  if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-     libgcc_cv_lib_sjlj_exceptions=yes
-   elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
-     libgcc_cv_lib_sjlj_exceptions=no
--  fi])
--CFLAGS=$CFLAGS_hold
-+  fi
-+fi
- rm -f conftest*
- ])
- 
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0027-cpp-honor-sysroot.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0027-cpp-honor-sysroot.patch
deleted file mode 100644
index 05e9521..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0027-cpp-honor-sysroot.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From a0f9bd09c816ad29ecf7c29d6c27f7df97710364 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:22:00 +0400
-Subject: [PATCH 27/35] cpp: honor sysroot.
-
-Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
-preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
-rather than the --sysroot option specified on the commandline. If access to that directory is
-permission denied (unreadable), gcc will error.
-
-This happens when ccache is in use due to the fact it uses preprocessed source files.
-
-The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
--isystem, -isysroot happen and the correct sysroot is used.
-
-[YOCTO #2074]
-
-RP 2012/04/13
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/cp/lang-specs.h |    2 +-
- gcc/gcc.c           |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index a001c3e..1aae1e4 100644
---- a/gcc/cp/lang-specs.h
-+++ b/gcc/cp/lang-specs.h
-@@ -63,5 +63,5 @@ along with GCC; see the file COPYING3.  If not see
-   {".ii", "@c++-cpp-output", 0, 0, 0},
-   {"@c++-cpp-output",
-    "%{!M:%{!MM:%{!E:\
--    cc1plus -fpreprocessed %i %(cc1_options) %2\
-+    cc1plus -fpreprocessed %i %I %(cc1_options) %2\
-     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 51062aa..cf6b99e 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1042,7 +1042,7 @@ static const struct compiler default_compilers[] =
-                     %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0},
-   {".i", "@cpp-output", 0, 0, 0},
-   {"@cpp-output",
--   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-+   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-   {".s", "@assembler", 0, 0, 0},
-   {"@assembler",
-    "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0028-MIPS64-Default-to-N64-ABI.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0028-MIPS64-Default-to-N64-ABI.patch
deleted file mode 100644
index 2638720..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0028-MIPS64-Default-to-N64-ABI.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 301e18d4711db5925e767fad08dffa9cfe0a2f1f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:23:08 +0400
-Subject: [PATCH 28/35] MIPS64: Default to N64 ABI
-
-MIPS64 defaults to n32 ABI, this patch makes it
-so that it defaults to N64 ABI
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE config specific]
----
- gcc/config.gcc |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index 1a0be50..989c2fb 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -1797,7 +1797,7 @@ mips*-mti-linux*)
- mips64*-*-linux* | mipsisa64*-*-linux*)
- 	tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/gnu-user64.h mips/linux64.h mips/linux-common.h"
- 	tmake_file="${tmake_file} mips/t-linux64"
--	tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32"
-+	tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_64"
- 	case ${target} in
- 		mips64el-st-linux-gnu)
- 			tm_file="${tm_file} mips/st.h"
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
deleted file mode 100644
index 0aa6d92..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0029-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-From 29d12344fb682a053de53eb08b95704cf3b67af2 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 29/35] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
- relative to SYSTEMLIBS_DIR
-
-This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
-relative to SYSTEMLIBS_DIR which can be set in generated headers
-This breaks the assumption of hardcoded multilib in gcc
-Change is only for the supported architectures in OE including
-SH, sparc, alpha for possible future support (if any)
-
-Removes the do_headerfix task in metadata
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE configuration]
----
- gcc/config/alpha/linux-elf.h |    4 ++--
- gcc/config/arm/linux-eabi.h  |    4 ++--
- gcc/config/arm/linux-elf.h   |    2 +-
- gcc/config/i386/linux.h      |    2 +-
- gcc/config/i386/linux64.h    |    6 +++---
- gcc/config/mips/linux.h      |    2 +-
- gcc/config/mips/linux64.h    |    8 ++++----
- gcc/config/rs6000/linux64.h  |    8 ++++----
- gcc/config/sh/linux.h        |    2 +-
- gcc/config/sparc/linux.h     |    2 +-
- gcc/config/sparc/linux64.h   |    4 ++--
- 11 files changed, 22 insertions(+), 22 deletions(-)
-
-Index: gcc-4.8.4/gcc/config/alpha/linux-elf.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/alpha/linux-elf.h
-+++ gcc-4.8.4/gcc/config/alpha/linux-elf.h
-@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3.
- #define EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
- 
--#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER	SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-Index: gcc-4.8.4/gcc/config/arm/linux-eabi.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/arm/linux-eabi.h
-+++ gcc-4.8.4/gcc/config/arm/linux-eabi.h
-@@ -68,8 +68,8 @@
-    GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
- 
- #undef  GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
--#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
-+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
- #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
- 
- #define GLIBC_DYNAMIC_LINKER \
-Index: gcc-4.8.4/gcc/config/arm/linux-elf.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/arm/linux-elf.h
-+++ gcc-4.8.4/gcc/config/arm/linux-elf.h
-@@ -57,7 +57,7 @@
- 
- #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #define LINUX_TARGET_LINK_SPEC  "%{h*} \
-    %{static:-Bstatic} \
-Index: gcc-4.8.4/gcc/config/i386/linux.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/i386/linux.h
-+++ gcc-4.8.4/gcc/config/i386/linux.h
-@@ -20,4 +20,4 @@ along with GCC; see the file COPYING3.
- <http://www.gnu.org/licenses/>.  */
- 
- #define GNU_USER_LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-Index: gcc-4.8.4/gcc/config/i386/linux64.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/i386/linux64.h
-+++ gcc-4.8.4/gcc/config/i386/linux64.h
-@@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTI
- #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
- #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
--#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
-Index: gcc-4.8.4/gcc/config/mips/linux.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/mips/linux.h
-+++ gcc-4.8.4/gcc/config/mips/linux.h
-@@ -17,4 +17,4 @@ You should have received a copy of the G
- along with GCC; see the file COPYING3.  If not see
- <http://www.gnu.org/licenses/>.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld.so.1"
-Index: gcc-4.8.4/gcc/config/mips/linux64.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/mips/linux64.h
-+++ gcc-4.8.4/gcc/config/mips/linux64.h
-@@ -22,10 +22,10 @@ along with GCC; see the file COPYING3.
- #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
- #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
--#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
--#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld.so.1"
-+#define GLIBC_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld.so.1"
-+#define UCLIBC_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
-   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
-Index: gcc-4.8.4/gcc/config/rs6000/linux64.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/rs6000/linux64.h
-+++ gcc-4.8.4/gcc/config/rs6000/linux64.h
-@@ -366,14 +366,14 @@ extern int dot_symbols;
- #undef	LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
- #ifdef LINUX64_DEFAULT_ABI_ELFv2
- #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
- #else
- #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
- #endif
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-Index: gcc-4.8.4/gcc/config/sh/linux.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/sh/linux.h
-+++ gcc-4.8.4/gcc/config/sh/linux.h
-@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3.
- 
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
-Index: gcc-4.8.4/gcc/config/sparc/linux.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/sparc/linux.h
-+++ gcc-4.8.4/gcc/config/sparc/linux.h
-@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu
-    When the -shared link option is used a final link is not being
-    done.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #undef  LINK_SPEC
- #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
-Index: gcc-4.8.4/gcc/config/sparc/linux64.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/sparc/linux64.h
-+++ gcc-4.8.4/gcc/config/sparc/linux64.h
-@@ -92,8 +92,8 @@ along with GCC; see the file COPYING3.
-    When the -shared link option is used a final link is not being
-    done.  */
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #ifdef SPARC_BI_ARCH
- 
-Index: gcc-4.8.4/gcc/config/linux.h
-===================================================================
---- gcc-4.8.4.orig/gcc/config/linux.h
-+++ gcc-4.8.4/gcc/config/linux.h
-@@ -73,10 +73,10 @@ see the files COPYING3 and COPYING.RUNTI
-    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
-    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
-    supporting both 32-bit and 64-bit compilation.  */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0030-gcc-Fix-argument-list-too-long-error.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0030-gcc-Fix-argument-list-too-long-error.patch
deleted file mode 100644
index 2ceaff6..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0030-gcc-Fix-argument-list-too-long-error.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From c1816c160156f99c34e6a0a0311bb0219326804e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:26:37 +0400
-Subject: [PATCH 30/35] gcc: Fix argument list too long error.
-
-There would be an "Argument list too long" error when the
-build directory is longer than 200, this is caused by:
-
-headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
-
-The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
-it, use the $(sort list) of GNU make which can handle the too long list
-would fix the problem, the header would be short enough after sorted.
-The "tr ' ' '\012'" was used for translating the space to "\n", the
-$(sort list) doesn't need this.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/Makefile.in |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 2320497..8562a62 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -4627,7 +4627,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
- # We keep the directory structure for files in config or c-family and .def
- # files. All other files are flattened to a single directory.
- 	$(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
--	headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`; \
-+	headers="$(sort $(PLUGIN_HEADERS))"; \
- 	srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
- 	for file in $$headers; do \
- 	  if [ -f $$file ] ; then \
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0031-Disable-sdt.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0031-Disable-sdt.patch
deleted file mode 100644
index 2c1d5e0..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0031-Disable-sdt.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From b85265bc94ec1beaf1d3b697c03db62991553467 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:28:10 +0400
-Subject: [PATCH 31/35] Disable sdt.
-
-We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
-It may or may not exist from preivous builds though. To be determinstic, disable
-sdt.h usage always. This avoids build failures if the header is removed after configure
-but before libgcc is compiled for example.
-
-RP 2012/8/7
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Disable sdt for libstdc++-v3.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Inappropriate [hack]
----
- gcc/configure             | 12 ++++++------
- gcc/configure.ac          | 18 +++++++++---------
- libstdc++-v3/configure    |  6 +++---
- libstdc++-v3/configure.ac |  2 +-
- 4 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 3c550a6..01c7626 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -26812,12 +26812,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
- $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
- have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
--  have_sys_sdt_h=yes
--
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
--
--fi
-+#if test -f $target_header_dir/sys/sdt.h; then
-+#  have_sys_sdt_h=yes
-+#
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#
-+#fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
- $as_echo "$have_sys_sdt_h" >&6; }
- 
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 3601ab6..06e501f 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4779,15 +4779,15 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
- fi
- 
- # Test for <sys/sdt.h> on the target.
--GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
--AC_MSG_CHECKING(sys/sdt.h in the target C library)
--have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
--  have_sys_sdt_h=yes
--  AC_DEFINE(HAVE_SYS_SDT_H, 1,
--            [Define if your target C library provides sys/sdt.h])
--fi
--AC_MSG_RESULT($have_sys_sdt_h)
-+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
-+#AC_MSG_CHECKING(sys/sdt.h in the target C library)
-+#have_sys_sdt_h=no
-+#if test -f $target_header_dir/sys/sdt.h; then
-+#  have_sys_sdt_h=yes
-+#  AC_DEFINE(HAVE_SYS_SDT_H, 1,
-+#            [Define if your target C library provides sys/sdt.h])
-+#fi
-+#AC_MSG_RESULT($have_sys_sdt_h)
- 
- # Check if TFmode long double should be used by default or not.
- # Some glibc targets used DFmode long double, but with glibc 2.4
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index 4953c9f..53a1145 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -20578,11 +20578,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
--  if test $glibcxx_cv_sys_sdt_h = yes; then
-+#  if test $glibcxx_cv_sys_sdt_h = yes; then
- 
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
- 
--  fi
-+#  fi
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
- $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
- 
-diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 73d430a..f2135e2 100644
---- a/libstdc++-v3/configure.ac
-+++ b/libstdc++-v3/configure.ac
-@@ -211,7 +211,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
- GLIBCXX_CHECK_SC_NPROC_ONLN
- GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
- GLIBCXX_CHECK_SYSCTL_HW_NCPU
--GLIBCXX_CHECK_SDT_H
-+#GLIBCXX_CHECK_SDT_H
- 
- # Check for available headers.
- AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
--- 
-1.8.3.1
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0032-libtool.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0032-libtool.patch
deleted file mode 100644
index 3b3d1b6..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0032-libtool.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6c715fcfa262adadca81c68a1f3f69aa3187a501 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:29:11 +0400
-Subject: [PATCH 32/35] libtool
-
-libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
-when running on am x86_64 build host.
-
-This patch stops this speading to libdir in the libstdc++.la file within libtool.
-Arguably, it shouldn't be passing this into libtool in the first place but
-for now this resolves the nastiest problems this causes.
-
-func_normal_abspath would resolve an empty path to `pwd` so we need
-to filter the zero case.
-
-RP 2012/8/24
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- ltmain.sh |    4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index a03433f..46f47c2 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6359,6 +6359,10 @@ func_mode_link ()
- 	func_warning "ignoring multiple \`-rpath's for a libtool library"
- 
-       install_libdir="$1"
-+      if test -n "$install_libdir"; then
-+	func_normal_abspath "$install_libdir"
-+	install_libdir=$func_normal_abspath_result
-+      fi
- 
-       oldlibs=
-       if test -z "$rpath"; then
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
deleted file mode 100644
index 199984d..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0033-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 97e4591c20310425e7aca0e6712a8d9480e7744c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:30:32 +0400
-Subject: [PATCH 33/35] gcc: armv4: pass fix-v4bx to linker to support EABI.
-
-The LINK_SPEC for linux gets overwritten by linux-eabi.h which
-means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
-the option is not passed to linker when chosing march=armv4
-This patch redefines this in linux-eabi.h and reinserts it
-for eabi defaulting toolchains.
-
-We might want to send it upstream.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/arm/linux-eabi.h |    6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index 80f454d..4db3eb9 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -77,10 +77,14 @@
-     %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
-     %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
- 
-+/* For armv4 we pass --fix-v4bx to linker to support EABI */
-+#undef TARGET_FIX_V4BX_SPEC
-+#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
-    use the GNU/Linux version, not the generic BPABI version.  */
- #undef  LINK_SPEC
--#define LINK_SPEC BE8_LINK_SPEC						\
-+#define LINK_SPEC BE8_LINK_SPEC TARGET_FIX_V4BX_SPEC			\
-   LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC,				\
- 		       LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
- 
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch
deleted file mode 100644
index 66b9f89..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0034-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From fc5e4beaea856a2b486c770ad3addc0f5bb3100e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:33:04 +0400
-Subject: [PATCH 34/35] Use the multilib config files from ${B} instead of
- using the ones from ${S}
-
-Use the multilib config files from ${B} instead of using the ones from ${S}
-so that the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure    |   22 ++++++++++++++++++----
- gcc/configure.ac |   22 ++++++++++++++++++----
- 2 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 8bc0c98..3cd0817 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11519,10 +11519,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
--	if test -f ${srcdir}/config/$f
--	then
--		tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
--	fi
-+  case $f in
-+    */t-linux64 )
-+       if test -f ./config/$f
-+       then
-+         tmake_file_="${tmake_file_} ./config/$f"
-+       fi
-+       ;;
-+    * )
-+       if test -f ${srcdir}/config/$f
-+       then
-+         tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+       fi
-+       ;;
-+  esac
- done
- tmake_file="${tmake_file_}"
- 
-@@ -11533,6 +11543,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
-   case $f in
-+    */linux64.h )
-+       tm_file_list="${tm_file_list} ./config/$f"
-+       tm_include_list="${tm_include_list} ./config/$f"
-+       ;;
-     ./* )
-        f=`echo $f | sed 's/^..//'`
-        tm_file_list="${tm_file_list} $f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 5e5e84f..415a6df 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1700,10 +1700,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
--	if test -f ${srcdir}/config/$f
--	then
--		tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
--	fi
-+  case $f in
-+    */t-linux64 )
-+       if test -f ./config/$f
-+       then
-+         tmake_file_="${tmake_file_} ./config/$f"
-+       fi
-+       ;;
-+    * )
-+       if test -f ${srcdir}/config/$f
-+       then
-+         tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+       fi
-+       ;;
-+  esac
- done
- tmake_file="${tmake_file_}"
- 
-@@ -1714,6 +1724,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
-   case $f in
-+    */linux64.h )
-+       tm_file_list="${tm_file_list} ./config/$f"
-+       tm_include_list="${tm_include_list} ./config/$f"
-+       ;;
-     ./* )
-        f=`echo $f | sed 's/^..//'`
-        tm_file_list="${tm_file_list} $f"
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch
deleted file mode 100644
index be4cf4a..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0035-wcast-qual-PR-55383.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From deffdb0b2497a106061d3ea2c6a3fef4fba3445e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:39:51 +0400
-Subject: [PATCH 35/35] wcast-qual PR/55383
-
-This is a backport from gcc bugzilla
-
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55383
-
-This commit fixes a wrong warning behavior. This bug which has no
-workaround other than disabling the warning.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Backport
----
- gcc/c/c-typeck.c                          |    2 +-
- gcc/testsuite/c-c++-common/Wcast-qual-1.c |    6 +++---
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
-index ddb6d39..c624120 100644
---- a/gcc/c/c-typeck.c
-+++ b/gcc/c/c-typeck.c
-@@ -4464,7 +4464,7 @@ handle_warn_cast_qual (location_t loc, tree type, tree otype)
-     /* There are qualifiers present in IN_OTYPE that are not present
-        in IN_TYPE.  */
-     warning_at (loc, OPT_Wcast_qual,
--		"cast discards %q#v qualifier from pointer target type",
-+		"cast discards %qv qualifier from pointer target type",
- 		discarded);
- 
-   if (added || discarded)
-diff --git a/gcc/testsuite/c-c++-common/Wcast-qual-1.c b/gcc/testsuite/c-c++-common/Wcast-qual-1.c
-index 640e4f0..56382c7 100644
---- a/gcc/testsuite/c-c++-common/Wcast-qual-1.c
-+++ b/gcc/testsuite/c-c++-common/Wcast-qual-1.c
-@@ -85,11 +85,11 @@ f3 (void ***bar)
- void
- f4 (void * const **bar)
- {
--  const void ***p9 = (const void ***) bar; /* { dg-warning "cast" } */
-+  const void ***p9 = (const void ***) bar; /* { dg-warning "cast discards .const. qualifier" } */
-   void * const **p11 = (void * const **) bar;
--  void ** const *p13 = (void ** const *) bar; /* { dg-warning "cast" } */
-+  void ** const *p13 = (void ** const *) bar; /* { dg-warning "cast discards .const. qualifier" } */
-   const void * const **p15 = (const void * const **) bar; /* { dg-warning "cast" } */
--  const void ** const *p17 = (const void ** const *) bar; /* { dg-warning "cast" } */
-+  const void ** const *p17 = (const void ** const *) bar; /* { dg-warning "cast discards .const. qualifier" } */
-   void * const * const * p19 = (void * const * const *) bar;
-   const void * const * const *p21 = (const void * const * const *) bar;
- }
--- 
-1.7.10.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0038-gcc-4.8-build-args.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0038-gcc-4.8-build-args.patch
deleted file mode 100644
index 7c8290f..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0038-gcc-4.8-build-args.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-When cross compiling a target gcc, target flags may be used on the host
-
-Configure identifies a number of warning flags (WARN_CFLAGS and
-WARN_CXXFLAGS) from the $CC value.  The cross compiler may be different
-from the host compiler and may not support the same set of flags.  This
-leads to problems such as:
-
-cc1plus: error: unrecognized command line option "-Wno-narrowing"
-cc1plus: error: unrecognized command line option "-Wno-overlength-strings"
-
-Work around this problem by removing the warning flags from the
-BUILD_CXXFLAGS value, in a way similar to the BUILD_CFLAGS.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: gcc-4.8.4/gcc/configure
-===================================================================
---- gcc-4.8.4.orig/gcc/configure
-+++ gcc-4.8.4/gcc/configure
-@@ -17864,7 +17864,7 @@ else
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 17853 "configure"
-+#line 17867 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -17970,7 +17970,7 @@ else
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 17959 "configure"
-+#line 17973 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -26918,18 +26918,15 @@ $as_echo "#define TARGET_LIBC_PROVIDES_S
- fi
- 
- # Test for <sys/sdt.h> on the target.
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
--$as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
--have_sys_sdt_h=no
-+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
-+#AC_MSG_CHECKING(sys/sdt.h in the target C library)
-+#have_sys_sdt_h=no
- #if test -f $target_header_dir/sys/sdt.h; then
- #  have_sys_sdt_h=yes
--#
--#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
--#
-+#  AC_DEFINE(HAVE_SYS_SDT_H, 1,
-+#            [Define if your target C library provides sys/sdt.h])
- #fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
--$as_echo "$have_sys_sdt_h" >&6; }
-+#AC_MSG_RESULT($have_sys_sdt_h)
- 
- # Check if TFmode long double should be used by default or not.
- # Some glibc targets used DFmode long double, but with glibc 2.4
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0040-fix-g++-sysroot.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0040-fix-g++-sysroot.patch
deleted file mode 100644
index d50aa5c..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0040-fix-g++-sysroot.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Portions of
-
-http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html
-
-are not upstreamed yet. So lets keep missing pieces.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: gcc-4.8.1/gcc/configure.ac
-===================================================================
---- gcc-4.8.1.orig/gcc/configure.ac	2013-07-15 15:55:49.488399132 -0700
-+++ gcc-4.8.1/gcc/configure.ac	2013-07-15 16:02:31.772406679 -0700
-@@ -148,7 +148,9 @@
- if test "${with_sysroot+set}" = set; then
-   gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
-   if test "${gcc_gxx_without_sysroot}"; then
--    gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+    if test x${with_sysroot} != x/; then
-+      gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+    fi
-     gcc_gxx_include_dir_add_sysroot=1
-   fi
- fi
-Index: gcc-4.8.1/gcc/configure
-===================================================================
---- gcc-4.8.1.orig/gcc/configure	2013-07-15 15:55:49.472399132 -0700
-+++ gcc-4.8.1/gcc/configure	2013-07-15 16:02:31.780406680 -0700
-@@ -3325,7 +3325,9 @@
- if test "${with_sysroot+set}" = set; then
-   gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
-   if test "${gcc_gxx_without_sysroot}"; then
--    gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+    if test x${with_sysroot} != x/; then
-+      gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+    fi
-     gcc_gxx_include_dir_add_sysroot=1
-   fi
- fi
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0041-libtool-avoid-libdir.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0041-libtool-avoid-libdir.patch
deleted file mode 100644
index 2dd9610..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0041-libtool-avoid-libdir.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Avoid using libdir from .la which usually points to a host path
-
-Upstream-Status: Inappropriate [embedded specific]
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-
-diff --git a/ltmain.sh b/ltmain.sh
-index a03433f..1902a90 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -5628,6 +5628,9 @@ func_mode_link ()
- 	    absdir="$abs_ladir"
- 	    libdir="$abs_ladir"
- 	  else
-+	    # Instead of using libdir from .la which usually points to a host path,
-+	    # use the path the .la is contained in.
-+	    libdir="$abs_ladir"
- 	    dir="$libdir"
- 	    absdir="$libdir"
- 	  fi
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0042-pr57748.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0042-pr57748.patch
deleted file mode 100644
index 5356f72..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0042-pr57748.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Khem Raj
-
-2013-08-01  Martin Jambor  <mjambor@suse.cz>
-
-	PR middle-end/57748
-	* stor-layout.c (compute_record_mode): Treat zero-sized array fields
-	like incomplete types.
-
-testsuite/
-	* gcc.dg/torture/pr57748.c: New test.
-
-
-Index: gcc-4.8.1/gcc/stor-layout.c
-===================================================================
---- gcc-4.8.1.orig/gcc/stor-layout.c	2013-04-28 10:29:18.000000000 -0700
-+++ gcc-4.8.1/gcc/stor-layout.c	2013-08-01 15:02:08.018006125 -0700
-@@ -1618,7 +1618,9 @@
- 		   && integer_zerop (TYPE_SIZE (TREE_TYPE (field)))))
- 	  || ! host_integerp (bit_position (field), 1)
- 	  || DECL_SIZE (field) == 0
--	  || ! host_integerp (DECL_SIZE (field), 1))
-+	  || ! host_integerp (DECL_SIZE (field), 1)
-+	  || (TREE_CODE (TREE_TYPE (field)) == ARRAY_TYPE
-+	      && tree_low_cst (DECL_SIZE (field), 1) == 0))
- 	return;
- 
-       /* If this field is the whole struct, remember its mode so
-Index: gcc-4.8.1/gcc/testsuite/gcc.dg/torture/pr57748.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ gcc-4.8.1/gcc/testsuite/gcc.dg/torture/pr57748.c	2013-08-01 15:02:08.062006126 -0700
-@@ -0,0 +1,45 @@
-+/* PR middle-end/57748 */
-+/* { dg-do run } */
-+
-+#include <stdlib.h>
-+
-+extern void abort (void);
-+
-+typedef long long V
-+  __attribute__ ((vector_size (2 * sizeof (long long)), may_alias));
-+
-+typedef struct S { V a; V b[0]; } P __attribute__((aligned (1)));
-+
-+struct __attribute__((packed)) T { char c; P s; };
-+
-+void __attribute__((noinline, noclone))
-+check (struct T *t)
-+{
-+  if (t->s.b[0][0] != 3 || t->s.b[0][1] != 4)
-+    abort ();
-+}
-+
-+int __attribute__((noinline, noclone))
-+get_i (void)
-+{
-+  return 0;
-+}
-+
-+void __attribute__((noinline, noclone))
-+foo (P *p)
-+{
-+  V a = { 3, 4 };
-+  int i = get_i();
-+  p->b[i] = a;
-+}
-+
-+int
-+main ()
-+{
-+  struct T *t = (struct T *) malloc (128);
-+
-+  foo (&t->s);
-+  check (t);
-+
-+  return 0;
-+}
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0043-cpp.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0043-cpp.patch
deleted file mode 100644
index eaf8646..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0043-cpp.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-The OE environment sets and exports CPP as being the target gcc. When building 
-gcc-cross-canadian for a mingw targetted sdk, the following can be found in
-build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
-
-configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
-configure:3666: gcc  -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe  conftest.c >&5
-configure:3666: $? = 0
-configure:3698: result: no
-configure:3786: checking how to run the C preprocessor
-configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
-configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32  conftest.c
-configure:3876: $? = 0
-
-Note this is a *build* target (in build-x86_64-linux) so it should be using 
-the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32 headers are 
-very different, using the wrong cpp is a real problem. It is leaking into 
-configure through the CPP variable. Ultimately this leads to build failures 
-related to not being able to include a process.h file for pem-unix.c.
-
-The fix is to ensure we export a sane CPP value into the build environment when
-using build targets. We could define a CPP_FOR_BUILD value which may be the version
-which needs to be upstreamed but for now, this fix is good enough to avoid the 
-problem.
-
-RP 22/08/2013
-
-Upstream-Status: Pending
-
-Index: gcc-4.8.1/Makefile.in
-===================================================================
---- gcc-4.8.1.orig/Makefile.in	2013-03-30 11:25:03.000000000 +0000
-+++ gcc-4.8.1/Makefile.in	2013-08-13 12:03:17.151988882 +0000
-@@ -149,6 +149,7 @@
- 	AR="$(AR_FOR_BUILD)"; export AR; \
- 	AS="$(AS_FOR_BUILD)"; export AS; \
- 	CC="$(CC_FOR_BUILD)"; export CC; \
-+	CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0044-gengtypes.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0044-gengtypes.patch
deleted file mode 100644
index e38761d..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0044-gengtypes.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-gengtype is generated for both the build system and the target. -DGENERATOR_FILE
-was added in the patch http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00273.html
-and was applied to both versions of gengtype.
-
-Unfortunately the presence of this flag triggers the build configuration (bconfig.h) 
-to be included for the target build of gengtype. Compiling gengtype with the target 
-compiler and bconfig.h can result in errors if the build and target systems are 
-dissimilar. An example case this fails is cross compiling gcc on linux for a darwin 
-target system:
-
-In file included from /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/gengtype-parse.c:25:0:
-| /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/gengtype-parse.c: In function 'void parse_error(const char*, ...)':
-| /media/build1/poky/build/tmp/work-shared/gcc-4.8.1-r0/gcc-4.8.1/gcc/system.h:93:53: error: 'fputc_unlocked' was not declared in this scope
-|  #  define fputc(C, Stream) fputc_unlocked (C, Stream)
-
-which occurs since auto-build.h and auto-host.h have differnet values of
-HAVE_FPUTC_UNLOCKED:
-
-#define HAVE_FPUTC_UNLOCKED 1
-/* #undef HAVE_FPUTS_UNLOCKED */
-
-The obvious fix is to only include the flag on build/ targets which this patch does, however 
-this also leads to compile errors due to const_tree being undefined but used in double_int.h
-
-I added a GENERATOR_FILE2 flag to workaround those in the 
-target case and allow the build to succeed.
-
-Only the build/gengtypes should have the -DGENERATOR_FILE 
-
-RP 22/8/2013
-
-Upstream-Status: Pending
-
-Index: gcc-4.8.1/gcc/Makefile.in
-===================================================================
---- gcc-4.8.1.orig/gcc/Makefile.in	2013-08-19 11:40:36.844014424 +0000
-+++ gcc-4.8.1/gcc/Makefile.in	2013-08-19 11:40:37.784014402 +0000
-@@ -3903,27 +3903,29 @@
- 
- gengtype-lex.o build/gengtype-lex.o : gengtype-lex.c gengtype.h $(SYSTEM_H)
- gengtype-lex.o: $(CONFIG_H) $(BCONFIG_H)
--CFLAGS-gengtype-lex.o += -DGENERATOR_FILE
-+CFLAGS-build/gengtype-lex.o += -DGENERATOR_FILE
- build/gengtype-lex.o: $(BCONFIG_H)
- 
- gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \
-   $(SYSTEM_H)
- gengtype-parse.o: $(CONFIG_H)
--CFLAGS-gengtype-parse.o += -DGENERATOR_FILE
-+CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE
- build/gengtype-parse.o: $(BCONFIG_H)
- 
- gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
-   gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
-   $(XREGEX_H)
- gengtype-state.o: $(CONFIG_H)
--CFLAGS-gengtype-state.o += -DGENERATOR_FILE
-+CFLAGS-gengtype-state.o += -DGENERATOR_FILE2
-+CFLAGS-build/gengtype-state.o += -DGENERATOR_FILE
- build/gengtype-state.o: $(BCONFIG_H)
- 
- gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h 	\
-   rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \
-   $(OBSTACK_H) $(XREGEX_H)
- gengtype.o: $(CONFIG_H)
--CFLAGS-gengtype.o += -DGENERATOR_FILE
-+CFLAGS-gengtype.o += -DGENERATOR_FILE2
-+CFLAGS-build/gengtype.o += -DGENERATOR_FILE
- build/gengtype.o: $(BCONFIG_H)
- 
- build/genmddeps.o: genmddeps.c $(BCONFIG_H) $(SYSTEM_H) coretypes.h	\
-@@ -3988,7 +3990,7 @@
- # any system header is included.
- gengtype-lex.c : gengtype-lex.l
- 	-$(FLEX) $(FLEXFLAGS) -o$@ $< && { \
--	  echo '#include "bconfig.h"' > $@.tmp; \
-+	  echo '' > $@.tmp; \
- 	  cat $@ >> $@.tmp; \
- 	  mv $@.tmp $@; \
- 	}
-Index: gcc-4.8.1/gcc/double-int.h
-===================================================================
---- gcc-4.8.1.orig/gcc/double-int.h	2013-01-30 11:04:30.000000000 +0000
-+++ gcc-4.8.1/gcc/double-int.h	2013-08-19 11:41:51.564012719 +0000
-@@ -448,10 +448,12 @@
- 
- 
- #ifndef GENERATOR_FILE
-+#ifndef GENERATOR_FILE2
- /* Conversion to and from GMP integer representations.  */
- 
- void mpz_set_double_int (mpz_t, double_int, bool);
- double_int mpz_get_double_int (const_tree, mpz_t, bool);
- #endif
-+#endif
- 
- #endif /* DOUBLE_INT_H */
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0046-libatomic-deptracking.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0046-libatomic-deptracking.patch
deleted file mode 100644
index 6ea4f42..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0046-libatomic-deptracking.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-gcc 4.8 won't build with --disable-dependency-tracking since the *.Ppo files
-don't get created unless --enable-dependency-tracking is true.
-
-This patch ensures we only use those compiler options when its enabled.
-
-Upstream-Status: Submitted
-
-(Problem was already reported upstream, attached this patch there
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
-
-RP 
-2012/09/22
-
-Index: gcc-4.8.1/libatomic/Makefile.am
-===================================================================
---- gcc-4.8.1.orig/libatomic/Makefile.am	2013-01-14 18:16:23.000000000 +0000
-+++ gcc-4.8.1/libatomic/Makefile.am	2013-09-22 10:38:18.904064750 +0000
-@@ -100,7 +100,8 @@
- IFUNC_DEF	= -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT	= $(word $(PAT_S),$(IFUNC_OPTIONS))
- 
--M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS		= 
- M_SIZE		= -DN=$(PAT_N)
- M_IFUNC		= $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE		= $(PAT_BASE)_n.c
-Index: gcc-4.8.1/libatomic/Makefile.in
-===================================================================
---- gcc-4.8.1.orig/libatomic/Makefile.in	2013-05-31 09:09:26.000000000 +0000
-+++ gcc-4.8.1/libatomic/Makefile.in	2013-09-22 10:40:42.520059917 +0000
-@@ -298,7 +298,8 @@
- PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS = 
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0047-repomembug.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0047-repomembug.patch
deleted file mode 100644
index 9afd55c..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0047-repomembug.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-When compiling a project using -frepo, .rpo files are written alongside
-the .o file, the symbols either have O or C against them. During final linking,
-the objects can be recompiled with some of the entries tweaked/chosen by the 
-tlink.c code (visible with TLINK_VERBOSE=3), it does this by changing O -> C
-in the .rpo files.
-
-My tests showed that init_repo (cp/repo.c) was correctly calling 
-IDENTIFIER_REPO_CHOSEN against the right identifers and setting the
-chosen bit.
-
-By the time finish_repo() or emit_repo_p() were called, the pointer returned
-by get_identifier() for the symbol marked during init_repo had changed and
-the chosen bit was no longer set. This lead to linking bugs like:
-
-collect: relinking
-collect2: error: '_ZNK6sudoku5ClearINS_8SequenceEEclERS1_' was assigned to 'board.rpo', but was not defined during recompilation, or vice versa
-
-The problem is that the garbage collection is getting called before
-finish_repo() is called and ggc_protect_identifiers is set to false 
-so the identifiers are not preserved. They are recreated but the 
-chosen bits get wiped out which is why the pointer changes and the 
-chosen bit is not set.
-
-The fix is to change ggc_protect_identifiers *after* the finish_repo 
-calls are made.
-
-Reproduction is tricky since you need to trigger the garbage collector at
-just the right moment.
-
-RP 2013/10/9
-
-[YOCTO #5133]
-
-Upstream-Status: Pending
-
-Index: gcc-4.8.1/gcc/toplev.c
-===================================================================
---- gcc-4.8.1.orig/gcc/toplev.c	2013-03-28 08:29:51.000000000 +0000
-+++ gcc-4.8.1/gcc/toplev.c	2013-10-09 20:27:17.089228023 +0000
-@@ -551,11 +551,11 @@
-   if (flag_syntax_only || flag_wpa)
-     return;
- 
--  ggc_protect_identifiers = false;
--
-   /* This must also call finalize_compilation_unit.  */
-   lang_hooks.decls.final_write_globals ();
- 
-+  ggc_protect_identifiers = false;
-+
-   if (seen_error ())
-     return;
- 
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
deleted file mode 100644
index b98f8ff..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0049-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 9e0e19eac2562f73858602fe26e2044eb8b20c47 Mon Sep 17 00:00:00 2001
-From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
-Date: Wed, 5 Feb 2014 16:52:31 +0200
-Subject: [PATCH] Enable SPE & AltiVec generation on powepc*linux target
-
-When is configured with --target=powerpc-linux, the resulting GCC will 
-not be able to generate code for SPE targets (e500v1/v2).
-GCC configured with --target=powerpc-linuxspe will not be able to
-generate AltiVec instructions (for e6500).
-This patch modifies the configured file such that SPE or AltiVec code
-can be generated when gcc is configured with --target=powerpc-linux.
-The ABI and speciffic instructions can be selected through the
-"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
----
- gcc/config.gcc |    7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index cb7a94e..d392c2b 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2068,7 +2068,12 @@ powerpc-*-rtems*)
- 	tmake_file="rs6000/t-fprules rs6000/t-rtems t-rtems rs6000/t-ppccomm"
- 	;;
- powerpc*-*-linux*)
--	tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h"
-+	case ${target} in
-+	    powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
-+		tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h" ;;
-+	    *)
-+		tm_file="${tm_file} dbxelf.h elfos.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h" ;;
-+	esac
- 	extra_options="${extra_options} rs6000/sysv4.opt"
- 	tmake_file="rs6000/t-fprules rs6000/t-ppcos ${tmake_file} rs6000/t-ppccomm"
- 	case ${target} in
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0051-gcc-483-universal-initializer-no-warning.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0051-gcc-483-universal-initializer-no-warning.patch
deleted file mode 100644
index fde227b..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/0051-gcc-483-universal-initializer-no-warning.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-Upstream-Status: Backport
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-Fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
-wrong warning when using the universal zero initializer {0}
-
-Backported to GCC 4.8.3
-
-Subject: 2014-06-05  S. Gilles  <sgilles@terpmail.umd.edu>
-X-Git-Url: http://repo.or.cz/w/official-gcc.git/commitdiff_plain/95cdf3fdf2d440eb7775def8e35ab970651c33d9?hp=14a3093e9943937cbc63dfbf4d51ca60f8325b29
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211289 138bc75d-0d04-0410-961f-82ee72b054a4
-
---- gcc-4.8.3.org/gcc/c/c-typeck.c	2014-08-03 20:52:09.257042137 +0200
-+++ gcc-4.8.3/gcc/c/c-typeck.c	2014-08-03 20:57:10.645042614 +0200
-@@ -62,9 +62,9 @@
-    if expr.original_code == SIZEOF_EXPR.  */
- tree c_last_sizeof_arg;
- 
--/* Nonzero if we've already printed a "missing braces around initializer"
--   message within this initializer.  */
--static int missing_braces_mentioned;
-+/* Nonzero if we might need to print a "missing braces around
-+   initializer" message within this initializer.  */
-+static int found_missing_braces;
- 
- static int require_constant_value;
- static int require_constant_elements;
-@@ -6379,6 +6379,9 @@
- /* 1 if this constructor is erroneous so far.  */
- static int constructor_erroneous;
- 
-+/* 1 if this constructor is the universal zero initializer { 0 }.  */
-+static int constructor_zeroinit;
-+
- /* Structure for managing pending initializer elements, organized as an
-    AVL tree.  */
- 
-@@ -6540,7 +6543,7 @@
-   constructor_stack = 0;
-   constructor_range_stack = 0;
- 
--  missing_braces_mentioned = 0;
-+  found_missing_braces = 0;
- 
-   spelling_base = 0;
-   spelling_size = 0;
-@@ -6635,6 +6638,7 @@
-   constructor_type = type;
-   constructor_incremental = 1;
-   constructor_designated = 0;
-+  constructor_zeroinit = 1;
-   designator_depth = 0;
-   designator_erroneous = 0;
- 
-@@ -6832,11 +6836,8 @@
- 	set_nonincremental_init (braced_init_obstack);
-     }
- 
--  if (implicit == 1 && warn_missing_braces && !missing_braces_mentioned)
--    {
--      missing_braces_mentioned = 1;
--      warning_init (OPT_Wmissing_braces, "missing braces around initializer");
--    }
-+  if (implicit == 1)
-+    found_missing_braces = 1;
- 
-   if (TREE_CODE (constructor_type) == RECORD_TYPE
- 	   || TREE_CODE (constructor_type) == UNION_TYPE)
-@@ -6969,16 +6970,23 @@
- 	}
-     }
- 
-+  if (vec_safe_length (constructor_elements) != 1)
-+    constructor_zeroinit = 0;
-+
-+  /* Warn when some structs are initialized with direct aggregation.  */
-+  if (!implicit && found_missing_braces && warn_missing_braces
-+      && !constructor_zeroinit)
-+    {
-+      warning_init (OPT_Wmissing_braces,
-+		    "missing braces around initializer");
-+    }
-+
-   /* Warn when some struct elements are implicitly initialized to zero.  */
-   if (warn_missing_field_initializers
-       && constructor_type
-       && TREE_CODE (constructor_type) == RECORD_TYPE
-       && constructor_unfilled_fields)
-     {
--	bool constructor_zeroinit =
--	 (vec_safe_length (constructor_elements) == 1
--	  && integer_zerop ((*constructor_elements)[0].value));
--
- 	/* Do not warn for flexible array members or zero-length arrays.  */
- 	while (constructor_unfilled_fields
- 	       && (!DECL_SIZE (constructor_unfilled_fields)
-@@ -8093,6 +8101,9 @@
-   designator_depth = 0;
-   designator_erroneous = 0;
- 
-+  if (!implicit && value.value && !integer_zerop (value.value))
-+    constructor_zeroinit = 0;
-+
-   /* Handle superfluous braces around string cst as in
-      char x[] = {"foo"}; */
-   if (string_flag
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
deleted file mode 100644
index f48c66d..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.8/target-gcc-includedir.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Ensure target gcc headers can be included
-
-There are a few headers installed as part of the OpenEmbedded
-gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
-built for the target architecture, these are within the target
-sysroot and not cross/nativesdk; thus they weren't able to be
-found by gcc with the existing search paths. Add support for
-picking up these headers under the sysroot supplied on the gcc
-command line in order to resolve this.
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-Upstream-Status: Pending
-
---- a/gcc/Makefile.in	2014-12-23 11:57:33.327873331 +0000
-+++ b/gcc/Makefile.in	2015-01-21 11:32:35.447305394 +0000
-@@ -587,6 +587,7 @@
- 
- # Directory in which the compiler finds libraries etc.
- libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
-+libsubdir_target = gcc/$(target_noncanonical)/$(version)
- # Directory in which the compiler finds executables
- libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
- # Directory in which all plugin resources are installed
-@@ -2534,6 +2535,7 @@
- 
- PREPROCESSOR_DEFINES = \
-   -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-+  -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
-   -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
-   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-   -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
---- a/gcc/cppdefault.c	2015-01-13 17:40:26.131012725 +0000
-+++ b/gcc/cppdefault.c	2015-01-21 11:30:08.928426492 +0000
-@@ -59,6 +59,10 @@
-     /* This is the dir for gcc's private headers.  */
-     { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
- #endif
-+#ifdef GCC_INCLUDE_SUBDIR_TARGET
-+    /* This is the dir for gcc's private headers under the specified sysroot.  */
-+    { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+#endif
- #ifdef LOCAL_INCLUDE_DIR
-     /* /usr/local/include comes before the fixincluded header files.  */
-     { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-diff --git a/gcc/defaults.h b/gcc/defaults.h
-index f94ae17..d98b40b 100644
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -1390,4 +1390,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
- 
- #endif /* GCC_INSN_FLAGS_H  */
- 
-+/* Default prefixes to attach to command names.  */
-+
-+#ifndef STANDARD_STARTFILE_PREFIX_1
-+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#endif
-+#ifndef STANDARD_STARTFILE_PREFIX_2
-+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
-+#endif
-+
- #endif  /* ! GCC_DEFAULTS_H */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 9f0b781..174fca8 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1189,13 +1189,6 @@ static const char *gcc_libexec_prefix;
- 
- /* Default prefixes to attach to command names.  */
- 
--#ifndef STANDARD_STARTFILE_PREFIX_1
--#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
--#endif
--#ifndef STANDARD_STARTFILE_PREFIX_2
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
--#endif
--
- #ifdef CROSS_DIRECTORY_STRUCTURE  /* Don't use these prefixes for a cross compiler.  */
- #undef MD_EXEC_PREFIX
- #undef MD_STARTFILE_PREFIX
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9.inc
index 95b553c..7e03f31 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9.inc
@@ -47,7 +47,6 @@
     file://0021-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
     file://0022-COLLECT_GCC_OPTIONS.patch \
     file://0023-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
-    file://0024-PR-target-32219.patch \
     file://0025-fortran-cross-compile-hack.patch \
     file://0026-libgcc-sjlj-check.patch \
     file://0027-cpp-honor-sysroot.patch \
@@ -81,10 +80,22 @@
     file://0063-nativesdk-gcc-support.patch \
     file://0064-handle-target-sysroot-multilib.patch \
     file://0065-gcc-483-universal-initializer-no-warning.patch \
+    file://0066-cxxflags-for-build.patch \
+    file://0067-fix-arm-thumb.patch \
+    file://0067-gcc-musl-support.patch \
+    file://0068-musl-dynamic-linker.patch \
+    file://0069-musl-no-fixincludes.patch \
+    file://0070-libstdc-musl.patch \
+    file://0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \
+    file://0072-support-ffile-prefix-map.patch \
+    file://0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
+    file://0074-fdebug-prefix-map-support-to-remap-relative-path.patch \
 "
 SRC_URI[md5sum] = "6f831b4d251872736e8e9cc09746f327"
 SRC_URI[sha256sum] = "2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e"
 
+UPSTREAM_CHECK_REGEX = "gcc-(?P<pver>4\.9\.\d+).tar"
+
 S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
 B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
 
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0024-PR-target-32219.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0024-PR-target-32219.patch
deleted file mode 100644
index 45acf7f..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0024-PR-target-32219.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From e0d15f4f8bf28c351b9215ca37f1caa24df0e1fd Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:18:54 +0400
-Subject: [PATCH 24/35] PR target/32219
-
-* varasm.c (default_binds_local_p_1): Weak data is not local.
-
-Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Backport
----
- gcc/testsuite/gcc.dg/visibility-21.c |   14 ++++++++++++++
- gcc/varasm.c                         |    9 ++++-----
- 2 files changed, 18 insertions(+), 5 deletions(-)
- create mode 100644 gcc/testsuite/gcc.dg/visibility-21.c
-
-Index: gcc-4.9-20140316/gcc/varasm.c
-===================================================================
---- gcc-4.9-20140316.orig/gcc/varasm.c
-+++ gcc-4.9-20140316/gcc/varasm.c
-@@ -6771,6 +6771,10 @@ default_binds_local_p_1 (const_tree exp,
-   /* Static variables are always local.  */
-   else if (! TREE_PUBLIC (exp))
-     local_p = true;
-+  /* hidden weak can't be overridden by something non-local, all
-+     that is possible is that it is not defined at all. */
-+  else if (DECL_WEAK (exp))
-+    local_p = false;
-   /* A variable is local if the user has said explicitly that it will
-      be.  */
-   else if ((DECL_VISIBILITY_SPECIFIED (exp)
-@@ -6784,11 +6788,6 @@ default_binds_local_p_1 (const_tree exp,
-      local.  */
-   else if (DECL_VISIBILITY (exp) != VISIBILITY_DEFAULT)
-     local_p = true;
--  /* Default visibility weak data can be overridden by a strong symbol
--     in another module and so are not local.  */
--  else if (DECL_WEAK (exp)
--	   && !resolved_locally)
--    local_p = false;
-   /* If PIC, then assume that any global name can be overridden by
-      symbols resolved from other modules.  */
-   else if (shlib)
-Index: gcc-4.9-20140316/gcc/testsuite/gcc.dg/visibility-22.c
-===================================================================
---- /dev/null
-+++ gcc-4.9-20140316/gcc/testsuite/gcc.dg/visibility-22.c
-@@ -0,0 +1,13 @@
-+/* PR target/32219 */
-+/* { dg-do run } */
-+/* { dg-require-visibility "" } */
-+/* { dg-options "-fPIC" { target fpic } } */
-+
-+extern void f() __attribute__((weak,visibility("hidden")));
-+extern int puts( char const* );
-+int main()
-+{
-+  if (f)
-+    f();
-+  return 0;
-+}
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0042-cxxflags-for-build.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0066-cxxflags-for-build.patch
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0042-cxxflags-for-build.patch
rename to yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0066-cxxflags-for-build.patch
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-fix-arm-thumb.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-fix-arm-thumb.patch
new file mode 100644
index 0000000..2f262e3
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-fix-arm-thumb.patch
@@ -0,0 +1,39 @@
+Upstream-Status: Accepted
+
+Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
+---
+
+2015-11-25  Vladimir Makarov  <vmakarov@redhat.com>
+
+	PR rtl-optimization/67954
+	* lra-constraints.c (curr_insn_transform): Add check on scratch
+	pseudo when change class to NO_REGS.  Add an assert.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230894 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+
+diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
+index 4670e81..c62bf6a 100644
+--- a/gcc/lra-constraints.c
++++ b/gcc/lra-constraints.c
+@@ -3725,7 +3725,8 @@ curr_insn_transform (bool check_only_p)
+ 		 assigment pass and the scratch pseudo will be
+ 		 spilled.  Spilled scratch pseudos are transformed
+ 		 back to scratches at the LRA end.  */
+-	      && lra_former_scratch_operand_p (curr_insn, i))
++	      && lra_former_scratch_operand_p (curr_insn, i)
++	      && lra_former_scratch_p (REGNO (op)))
+ 	    {
+ 	      int regno = REGNO (op);
+ 	      lra_change_class (regno, NO_REGS, "      Change to", true);
+@@ -3734,6 +3735,8 @@ curr_insn_transform (bool check_only_p)
+ 		   spilled pseudo as there is only one such insn, the
+ 		   current one.  */
+ 		reg_renumber[regno] = -1;
++	      lra_assert (bitmap_single_bit_set_p
++			  (&lra_reg_info[REGNO (op)].insn_bitmap));
+ 	    }
+ 	  /* We can do an optional reload.  If the pseudo got a hard
+ 	     reg, we might improve the code through inheritance.  If
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-gcc-musl-support.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-gcc-musl-support.patch
new file mode 100644
index 0000000..9a0b5ad
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0067-gcc-musl-support.patch
@@ -0,0 +1,267 @@
+# HG changeset patch
+# Parent e5b4564f249f8634194bdabef4b3057d0e54ee97
+Adding -mmusl as a musl libc specifier, and the necessary hacks for it to know how to find musl's dynamic linker.
+Upstream-Status: backport [partial]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+
+Index: gcc-4.9.0/gcc/config.gcc
+===================================================================
+--- gcc-4.9.0.orig/gcc/config.gcc	2014-04-22 22:44:17.153567150 -0700
++++ gcc-4.9.0/gcc/config.gcc	2014-04-23 23:54:31.427357051 -0700
+@@ -594,7 +594,7 @@
+ esac
+ 
+ # Common C libraries.
+-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
+ 
+ # 32-bit x86 processors supported by --with-arch=.  Each processor
+ # MUST be separated by exactly one space.
+@@ -719,6 +719,9 @@
+     *-*-*uclibc*)
+       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
+       ;;
++    *-*-*musl*)
++      tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
++      ;;
+     *)
+       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
+       ;;
+@@ -2328,6 +2331,11 @@
+ 	    powerpc*-*-linux*paired*)
+ 		tm_file="${tm_file} rs6000/750cl.h" ;;
+ 	esac
++        case ${target} in
++	    *-linux*-musl*)
++		enable_secureplt=yes ;;
++	esac
++
+ 	if test x${enable_secureplt} = xyes; then
+ 		tm_file="rs6000/secureplt.h ${tm_file}"
+ 	fi
+Index: gcc-4.9.0/gcc/config/linux.h
+===================================================================
+--- gcc-4.9.0.orig/gcc/config/linux.h	2014-01-02 14:23:26.000000000 -0800
++++ gcc-4.9.0/gcc/config/linux.h	2014-04-24 00:11:29.034028895 -0700
+@@ -32,10 +32,12 @@
+ #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
+ #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
+ #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
++#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
+ #else
+ #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
+ #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
+ #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
++#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
+ #endif
+ 
+ #define GNU_USER_TARGET_OS_CPP_BUILTINS()			\
+@@ -53,18 +55,21 @@
+    uClibc or Bionic is the default C library and whether
+    -muclibc or -mglibc or -mbionic has been passed to change the default.  */
+ 
+-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3)	\
+-  "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4)	\
++  "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
+ 
+ #if DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+-  CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
+ #elif DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+-  CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
+ #elif DEFAULT_LIBC == LIBC_BIONIC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+-  CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif /* DEFAULT_LIBC */
+@@ -84,16 +89,16 @@
+ 
+ #define GNU_USER_DYNAMIC_LINKER						\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER,	\
+-			 BIONIC_DYNAMIC_LINKER)
++			 BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
+ #define GNU_USER_DYNAMIC_LINKER32					\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
+-			 BIONIC_DYNAMIC_LINKER32)
++			 BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
+ #define GNU_USER_DYNAMIC_LINKER64					\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
+-			 BIONIC_DYNAMIC_LINKER64)
++			 BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
+ #define GNU_USER_DYNAMIC_LINKERX32					\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
+-			 BIONIC_DYNAMIC_LINKERX32)
++			 BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
+ 
+ /* Whether we have Bionic libc runtime */
+ #undef TARGET_HAS_BIONIC
+@@ -127,3 +132,74 @@
+ # define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
+ 
+ #endif
++
++/* musl avoids problematic includes by rearranging the include directories.
++ * Unfortunately, this is mostly duplicated from cppdefault.c */
++#if DEFAULT_LIBC == LIBC_MUSL
++#define INCLUDE_DEFAULTS_MUSL_GPP			\
++    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,		\
++      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },		\
++    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,		\
++      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },		\
++    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,	\
++      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
++
++#ifdef LOCAL_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_LOCAL			\
++    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },		\
++    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
++#else
++#define INCLUDE_DEFAULTS_MUSL_LOCAL
++#endif
++
++#ifdef PREFIX_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_PREFIX			\
++    { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_PREFIX
++#endif
++
++#ifdef CROSS_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_CROSS			\
++    { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_CROSS
++#endif
++
++#ifdef TOOL_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_TOOL			\
++    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_TOOL
++#endif
++
++#ifdef NATIVE_SYSTEM_HEADER_DIR
++#define INCLUDE_DEFAULTS_MUSL_NATIVE			\
++    { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 },	\
++    { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
++#else
++#define INCLUDE_DEFAULTS_MUSL_NATIVE
++#endif
++
++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
++# undef INCLUDE_DEFAULTS_MUSL_LOCAL
++# define INCLUDE_DEFAULTS_MUSL_LOCAL
++# undef INCLUDE_DEFAULTS_MUSL_NATIVE
++# define INCLUDE_DEFAULTS_MUSL_NATIVE
++#else
++# undef INCLUDE_DEFAULTS_MUSL_CROSS
++# define INCLUDE_DEFAULTS_MUSL_CROSS
++#endif
++
++#undef INCLUDE_DEFAULTS
++#define INCLUDE_DEFAULTS				\
++  {							\
++    INCLUDE_DEFAULTS_MUSL_GPP				\
++    INCLUDE_DEFAULTS_MUSL_PREFIX			\
++    INCLUDE_DEFAULTS_MUSL_CROSS				\
++    INCLUDE_DEFAULTS_MUSL_TOOL				\
++    INCLUDE_DEFAULTS_MUSL_NATIVE			\
++    { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 },		\
++    { 0, 0, 0, 0, 0, 0 }				\
++  }
++#endif
+Index: gcc-4.9.0/gcc/config/linux.opt
+===================================================================
+--- gcc-4.9.0.orig/gcc/config/linux.opt	2014-01-02 14:23:26.000000000 -0800
++++ gcc-4.9.0/gcc/config/linux.opt	2014-04-22 22:44:17.280233817 -0700
+@@ -30,3 +30,7 @@
+ muclibc
+ Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
+ Use uClibc C library
++
++mmusl
++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
++Use musl C library
+Index: gcc-4.9.0/gcc/ginclude/stddef.h
+===================================================================
+--- gcc-4.9.0.orig/gcc/ginclude/stddef.h	2014-01-02 14:23:26.000000000 -0800
++++ gcc-4.9.0/gcc/ginclude/stddef.h	2014-04-22 22:44:17.280233817 -0700
+@@ -181,6 +181,7 @@
+ #ifndef _GCC_SIZE_T
+ #ifndef _SIZET_
+ #ifndef __size_t
++#ifndef __DEFINED_size_t /* musl */
+ #define __size_t__	/* BeOS */
+ #define __SIZE_T__	/* Cray Unicos/Mk */
+ #define _SIZE_T
+@@ -197,6 +198,7 @@
+ #define ___int_size_t_h
+ #define _GCC_SIZE_T
+ #define _SIZET_
++#define __DEFINED_size_t /* musl */
+ #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
+   || defined(__FreeBSD_kernel__)
+ /* __size_t is a typedef on FreeBSD 5, must not trash it. */
+@@ -214,6 +216,7 @@
+ typedef long ssize_t;
+ #endif /* __BEOS__ */
+ #endif /* !(defined (__GNUG__) && defined (size_t)) */
++#endif /* __DEFINED_size_t */
+ #endif /* __size_t */
+ #endif /* _SIZET_ */
+ #endif /* _GCC_SIZE_T */
+Index: gcc-4.9.0/gcc/config/rs6000/secureplt.h
+===================================================================
+--- gcc-4.9.0.orig/gcc/config/rs6000/secureplt.h	2014-01-02 14:23:26.000000000 -0800
++++ gcc-4.9.0/gcc/config/rs6000/secureplt.h	2014-04-23 23:55:15.114024175 -0700
+@@ -18,3 +18,4 @@
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
++#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
+Index: gcc-4.9.0/gcc/config/rs6000/sysv4.h
+===================================================================
+--- gcc-4.9.0.orig/gcc/config/rs6000/sysv4.h	2014-04-23 23:52:13.854023015 -0700
++++ gcc-4.9.0/gcc/config/rs6000/sysv4.h	2014-04-24 00:10:55.550695334 -0700
+@@ -538,6 +538,10 @@
+ #define CC1_SECURE_PLT_DEFAULT_SPEC ""
+ #endif
+ 
++#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
++#define LINK_SECURE_PLT_DEFAULT_SPEC ""
++#endif
++
+ /* Pass -G xxx to the compiler.  */
+ #define	CC1_SPEC "%{G*} %(cc1_cpu)" \
+ "%{meabi: %{!mcall-*: -mcall-sysv }} \
+@@ -585,7 +589,8 @@
+ 
+ /* Override the default target of the linker.  */
+ #define	LINK_TARGET_SPEC \
+-  ENDIAN_SELECT("", " --oformat elf32-powerpcle", "")
++  ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \
++  "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}"
+ 
+ /* Any specific OS flags.  */
+ #define LINK_OS_SPEC "\
+@@ -894,6 +899,7 @@
+   { "link_os_openbsd",		LINK_OS_OPENBSD_SPEC },			\
+   { "link_os_default",		LINK_OS_DEFAULT_SPEC },			\
+   { "cc1_secure_plt_default",	CC1_SECURE_PLT_DEFAULT_SPEC },		\
++  { "link_secure_plt_default",	LINK_SECURE_PLT_DEFAULT_SPEC },		\
+   { "cpp_os_ads",		CPP_OS_ADS_SPEC },			\
+   { "cpp_os_yellowknife",	CPP_OS_YELLOWKNIFE_SPEC },		\
+   { "cpp_os_mvme",		CPP_OS_MVME_SPEC },			\
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0068-musl-dynamic-linker.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0068-musl-dynamic-linker.patch
new file mode 100644
index 0000000..605ac66
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0068-musl-dynamic-linker.patch
@@ -0,0 +1,205 @@
+# HG changeset patch
+# Parent 6738fd6f6fcc2a72f2ba527bda3325642af26885
+Support for arm-linux-musl.
+Upstream-Status: Backport [partial]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+
+Index: gcc-4.9.2/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.9.2.orig/gcc/config/arm/linux-eabi.h
++++ gcc-4.9.2/gcc/config/arm/linux-eabi.h
+@@ -81,6 +81,23 @@
+ #undef TARGET_FIX_V4BX_SPEC
+ #define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
+ 
++/* For ARM musl currently supports four dynamic linkers:
++   - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
++   - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
++   - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
++   - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
++   musl does not support the legacy OABI mode.
++   All the dynamic linkers live in /lib.
++   We default to soft-float, EL. */
++#undef  MUSL_DYNAMIC_LINKER
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
++#else
++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
++#endif
++#define MUSL_DYNAMIC_LINKER \
++  SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
++
+ /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
+    use the GNU/Linux version, not the generic BPABI version.  */
+ #undef  LINK_SPEC
+Index: gcc-4.9.2/libitm/config/arm/hwcap.cc
+===================================================================
+--- gcc-4.9.2.orig/libitm/config/arm/hwcap.cc
++++ gcc-4.9.2/libitm/config/arm/hwcap.cc
+@@ -40,7 +40,11 @@ int GTM_hwcap HIDDEN = 0
+ 
+ #ifdef __linux__
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <sys/fcntl.h>
++#else
++#include <fcntl.h>
++#endif
+ #include <elf.h>
+ 
+ static void __attribute__((constructor))
+Index: gcc-4.9.2/gcc/config/i386/linux.h
+===================================================================
+--- gcc-4.9.2.orig/gcc/config/i386/linux.h
++++ gcc-4.9.2/gcc/config/i386/linux.h
+@@ -21,3 +21,4 @@ along with GCC; see the file COPYING3.
+ 
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+ #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1"
+Index: gcc-4.9.2/gcc/config/i386/linux64.h
+===================================================================
+--- gcc-4.9.2.orig/gcc/config/i386/linux64.h
++++ gcc-4.9.2/gcc/config/i386/linux64.h
+@@ -30,3 +30,8 @@ see the files COPYING3 and COPYING.RUNTI
+ #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
+ #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
+ #define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
++
++#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-i386.so.1"
++#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-x86_64.so.1"
++#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1"
++
+Index: gcc-4.9.2/gcc/config/mips/linux.h
+===================================================================
+--- gcc-4.9.2.orig/gcc/config/mips/linux.h
++++ gcc-4.9.2/gcc/config/mips/linux.h
+@@ -23,3 +23,6 @@ along with GCC; see the file COPYING3.
+ #undef UCLIBC_DYNAMIC_LINKER
+ #define UCLIBC_DYNAMIC_LINKER \
+   "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
++
++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-mips.so.1"
++
+Index: gcc-4.9.2/gcc/config/mips/linux64.h
+===================================================================
+--- gcc-4.9.2.orig/gcc/config/mips/linux64.h
++++ gcc-4.9.2/gcc/config/mips/linux64.h
+@@ -39,6 +39,11 @@ along with GCC; see the file COPYING3.
+   "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
+ 
+ #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
++
++#define MUSL_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld-musl-mips.so.1"
++#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-mips.so.1"
++#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-mips.so.1"
++
+ #define GNU_USER_DYNAMIC_LINKERN32 \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+-			 BIONIC_DYNAMIC_LINKERN32)
++			 BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32)
+Index: gcc-4.9.2/gcc/config/rs6000/linux64.h
+===================================================================
+--- gcc-4.9.2.orig/gcc/config/rs6000/linux64.h
++++ gcc-4.9.2/gcc/config/rs6000/linux64.h
+@@ -375,17 +375,22 @@ extern int dot_symbols;
+ #endif
+ #define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
+ #define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
++#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-powerpc.so.1"
++#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-powerpc64.so.1"
++
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif
+ #define GNU_USER_DYNAMIC_LINKER32 \
+-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
++  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
+ #define GNU_USER_DYNAMIC_LINKER64 \
+-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
++  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
+ 
+ #undef  DEFAULT_ASM_ENDIAN
+ #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
+Index: gcc-4.9.2/gcc/config/rs6000/sysv4.h
+===================================================================
+--- gcc-4.9.2.orig/gcc/config/rs6000/sysv4.h
++++ gcc-4.9.2/gcc/config/rs6000/sysv4.h
+@@ -768,15 +768,19 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEF
+ 
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+ #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
++
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
+ #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif
+ #define GNU_USER_DYNAMIC_LINKER \
+-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
++  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
+ 
+ #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+   %{rdynamic:-export-dynamic} \
+Index: gcc-4.9.2/libitm/config/linux/x86/tls.h
+===================================================================
+--- gcc-4.9.2.orig/libitm/config/linux/x86/tls.h
++++ gcc-4.9.2/libitm/config/linux/x86/tls.h
+@@ -25,16 +25,19 @@
+ #ifndef LIBITM_X86_TLS_H
+ #define LIBITM_X86_TLS_H 1
+ 
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
++#if defined(__GLIBC_PREREQ)
++#if __GLIBC_PREREQ(2, 10)
+ /* Use slots in the TCB head rather than __thread lookups.
+    GLIBC has reserved words 10 through 13 for TM.  */
+ #define HAVE_ARCH_GTM_THREAD 1
+ #define HAVE_ARCH_GTM_THREAD_DISP 1
+ #endif
++#endif
+ 
+ #include "config/generic/tls.h"
+ 
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
++#if defined(__GLIBC_PREREQ)
++#if __GLIBC_PREREQ(2, 10)
+ namespace GTM HIDDEN {
+ 
+ #ifdef __x86_64__
+@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a
+ 
+ } // namespace GTM
+ #endif /* >= GLIBC 2.10 */
++#endif
+ 
+ #endif // LIBITM_X86_TLS_H
+Index: gcc-4.9.2/gcc/config/aarch64/aarch64-linux.h
+===================================================================
+--- gcc-4.9.2.orig/gcc/config/aarch64/aarch64-linux.h
++++ gcc-4.9.2/gcc/config/aarch64/aarch64-linux.h
+@@ -25,6 +25,8 @@
+ 
+ #define CPP_SPEC "%{pthread:-D_REENTRANT}"
+ 
++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
++
+ #define LINUX_TARGET_LINK_SPEC  "%{h*}		\
+    %{static:-Bstatic}				\
+    %{shared:-shared}				\
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0069-musl-no-fixincludes.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0069-musl-no-fixincludes.patch
new file mode 100644
index 0000000..e2b18a4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0069-musl-no-fixincludes.patch
@@ -0,0 +1,21 @@
+# HG changeset patch
+# Parent 600a8a422ccaf5627ad1f5a138e7398df2b9e9d8
+Get rid of ever-broken fixincludes on musl.
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+
+Index: gcc-4.9-20140316/fixincludes/mkfixinc.sh
+===================================================================
+--- gcc-4.9-20140316.orig/fixincludes/mkfixinc.sh
++++ gcc-4.9-20140316/fixincludes/mkfixinc.sh
+@@ -19,7 +19,8 @@ case $machine in
+     powerpc-*-eabi*    | \
+     powerpc-*-rtems*   | \
+     powerpcle-*-eabisim* | \
+-    powerpcle-*-eabi* )
++    powerpcle-*-eabi* | \
++    *-musl* )
+ 	#  IF there is no include fixing,
+ 	#  THEN create a no-op fixer and exit
+ 	(echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0070-libstdc-musl.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0070-libstdc-musl.patch
new file mode 100644
index 0000000..048e481
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0070-libstdc-musl.patch
@@ -0,0 +1,32 @@
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: gcc-4.9-20140316/libstdc++-v3/configure.host
+===================================================================
+--- gcc-4.9-20140316.orig/libstdc++-v3/configure.host	2014-03-26 01:12:19.466008193 -0700
++++ gcc-4.9-20140316/libstdc++-v3/configure.host	2014-03-26 01:43:48.222684357 -0700
+@@ -264,14 +264,24 @@
+     os_include_dir="os/bsd/freebsd"
+     ;;
+   gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
++    # check for musl by target
++    case "${host_os}" in
++      *-musl*)
++        os_include_dir="os/generic"
++        ;;
++      *)
+     if [ "$uclibc" = "yes" ]; then
+       os_include_dir="os/uclibc"
+     elif [ "$bionic" = "yes" ]; then
+       os_include_dir="os/bionic"
++    elif [ "$musl" = "yes" ]; then
++      os_include_dir="os/generic"
+     else
+       os_include_dir="os/gnu-linux"
+     fi
+     ;;
++    esac
++    ;;
+   hpux*)
+     os_include_dir="os/hpux"
+     ;;
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
new file mode 100644
index 0000000..e8f79b5
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
@@ -0,0 +1,31 @@
+From 32593b38082ea65f4c82159254adf1e0dc2423be Mon Sep 17 00:00:00 2001
+From: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Feb 2016 03:15:15 -0500
+Subject: [PATCH] Ignore -fdebug-prefix-map in producer string (by Daniel Kahn
+ Gillmor)
+
+* dwarf2out.c (gen_producer_string): Ignore -fdebug-prefix-map.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231835 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/dwarf2out.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
+index 3614c10..526f114 100644
+--- a/gcc/dwarf2out.c
++++ b/gcc/dwarf2out.c
+@@ -19670,6 +19670,7 @@ gen_producer_string (void)
+       case OPT_fpreprocessed:
+       case OPT_fltrans_output_list_:
+       case OPT_fresolution_:
++      case OPT_fdebug_prefix_map_:
+ 	/* Ignore these.  */
+ 	continue;
+       default:
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0072-support-ffile-prefix-map.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0072-support-ffile-prefix-map.patch
new file mode 100644
index 0000000..9809a6a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0072-support-ffile-prefix-map.patch
@@ -0,0 +1,284 @@
+From e863be798ed13312a0faf0b961275f211a8123ab Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 17 Mar 2016 00:32:17 -0400
+Subject: [PATCH] gcc/libcpp: support -ffile-prefix-map=<old>=<new>
+
+Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one
+directory name (old) to another (new) in __FILE__, __BASE_FILE__ and
+__builtin_FILE ().
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
+
+Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/c-family/c-opts.c     |  6 ++++
+ gcc/c-family/c.opt        |  4 +++
+ gcc/dwarf2out.c           |  1 +
+ gcc/gimplify.c            |  2 ++
+ libcpp/Makefile.in        | 10 +++---
+ libcpp/file-map.c         | 92 +++++++++++++++++++++++++++++++++++++++++++++++
+ libcpp/include/file-map.h | 30 ++++++++++++++++
+ libcpp/macro.c            |  2 ++
+ 8 files changed, 142 insertions(+), 5 deletions(-)
+ create mode 100644 libcpp/file-map.c
+ create mode 100644 libcpp/include/file-map.h
+
+diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
+index dd5fd23..9c004a1 100644
+--- a/gcc/c-family/c-opts.c
++++ b/gcc/c-family/c-opts.c
+@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3.  If not see
+ #include "options.h"
+ #include "plugin.h"		/* For PLUGIN_INCLUDE_FILE event.  */
+ #include "mkdeps.h"
++#include "file-map.h"
+ #include "c-target.h"
+ #include "tm.h"			/* For BYTES_BIG_ENDIAN,
+ 				   DOLLARS_IN_IDENTIFIERS,
+@@ -553,6 +554,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
+       cpp_opts->narrow_charset = arg;
+       break;
+ 
++    case OPT_ffile_prefix_map_:
++      if (add_file_prefix_map (arg) < 0)
++        error ("invalid argument %qs to -ffile-prefix-map", arg);
++      break;
++
+     case OPT_fwide_exec_charset_:
+       cpp_opts->wide_charset = arg;
+       break;
+diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
+index f295805..3a99662 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -928,6 +928,10 @@ fexec-charset=
+ C ObjC C++ ObjC++ Joined RejectNegative
+ -fexec-charset=<cset>	Convert all strings and character constants to character set <cset>
+ 
++ffile-prefix-map=
++C ObjC C++ ObjC++ Joined RejectNegative
++-ffile-prefix-map=<old=new>	Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE ()
++
+ fextended-identifiers
+ C ObjC C++ ObjC++
+ Permit universal character names (\\u and \\U) in identifiers
+diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
+index 99bf6e2..3e58cfd 100644
+--- a/gcc/dwarf2out.c
++++ b/gcc/dwarf2out.c
+@@ -19199,6 +19199,7 @@ gen_producer_string (void)
+       case OPT_fltrans_output_list_:
+       case OPT_fresolution_:
+       case OPT_fdebug_prefix_map_:
++      case OPT_ffile_prefix_map_:
+ 	/* Ignore these.  */
+ 	continue;
+       default:
+diff --git a/gcc/gimplify.c b/gcc/gimplify.c
+index 89e7334..a7a97c0 100644
+--- a/gcc/gimplify.c
++++ b/gcc/gimplify.c
+@@ -59,6 +59,7 @@ along with GCC; see the file COPYING3.  If not see
+ #include "omp-low.h"
+ #include "gimple-low.h"
+ #include "cilk.h"
++#include "file-map.h"
+ 
+ #include "langhooks-def.h"	/* FIXME: for lhd_set_decl_assembler_name */
+ #include "tree-pass.h"		/* FIXME: only for PROP_gimple_any */
+@@ -2288,6 +2289,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
+       case BUILT_IN_FILE:
+ 	{
+ 	  expanded_location loc = expand_location (EXPR_LOCATION (*expr_p));
++	  loc.file = remap_file_filename (loc.file);
+ 	  *expr_p = build_string_literal (strlen (loc.file) + 1, loc.file);
+ 	  return GS_OK;
+ 	}
+diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
+index 5561c97..5017256 100644
+--- a/libcpp/Makefile.in
++++ b/libcpp/Makefile.in
+@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE)
+ 
+ 
+ libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
+-	expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
+-	mkdeps.o pch.o symtab.o traditional.o
++	expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \
++	macro.o mkdeps.o pch.o symtab.o traditional.o
+ 
+ libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
+-	expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
+-	mkdeps.c pch.c symtab.c traditional.c
++	expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \
++	macro.c mkdeps.c pch.c symtab.c traditional.c
+ 
+ all: libcpp.a $(USED_CATALOGS)
+ 
+@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
+ 
+ TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
+     include/line-map.h include/symtab.h include/cpp-id-data.h \
+-    include/cpplib.h include/mkdeps.h system.h
++    include/cpplib.h include/mkdeps.h system.h include/file-map.h
+ 
+ TAGS: $(TAGS_SOURCES)
+ 	cd $(srcdir) && etags $(TAGS_SOURCES)
+diff --git a/libcpp/file-map.c b/libcpp/file-map.c
+new file mode 100644
+index 0000000..04e851b
+--- /dev/null
++++ b/libcpp/file-map.c
+@@ -0,0 +1,92 @@
++/* Map one directory name to another in __FILE__, __BASE_FILE__
++   and __builtin_FILE ().
++   Copyright (C) 2001-2016 Free Software Foundation, Inc.
++
++This program is free software; you can redistribute it and/or modify it
++under the terms of the GNU General Public License as published by the
++Free Software Foundation; either version 3, or (at your option) any
++later version.
++
++This program is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; see the file COPYING3.  If not see
++<http://www.gnu.org/licenses/>.
++
++ In other words, you are welcome to use, share and improve this program.
++ You are forbidden to forbid anyone else to use, share and improve
++ what you give them.   Help stamp out software-hoarding!  */
++
++#include "config.h"
++#include "system.h"
++#include "file-map.h"
++
++/* Structure recording the mapping from source file and directory
++   names at compile time to __FILE__ */
++typedef struct file_prefix_map
++{
++  const char *old_prefix;
++  const char *new_prefix;
++  size_t old_len;
++  size_t new_len;
++  struct file_prefix_map *next;
++} file_prefix_map;
++
++/* Linked list of such structures.  */
++static file_prefix_map *file_prefix_maps;
++
++/* Record prefix mapping of __FILE__.  ARG is the argument to
++   -ffile-prefix-map and must be of the form OLD=NEW.  */
++int
++add_file_prefix_map (const char *arg)
++{
++  file_prefix_map *map;
++  const char *p;
++
++  p = strchr (arg, '=');
++  if (!p)
++  {
++      fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg);
++      return -1;
++  }
++  map = XNEW (file_prefix_map);
++  map->old_prefix = xstrndup (arg, p - arg);
++  map->old_len = p - arg;
++  p++;
++  map->new_prefix = xstrdup (p);
++  map->new_len = strlen (p);
++  map->next = file_prefix_maps;
++  file_prefix_maps = map;
++
++  return 0;
++}
++
++/* Perform user-specified mapping of __FILE__ prefixes.  Return
++   the new name corresponding to filename.  */
++
++const char *
++remap_file_filename (const char *filename)
++{
++  file_prefix_map *map;
++  char *s;
++  const char *name;
++  size_t name_len;
++
++  for (map = file_prefix_maps; map; map = map->next)
++    if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
++      break;
++  if (!map)
++    return filename;
++  name = filename + map->old_len;
++  name_len = strlen (name) + 1;
++  s = (char *) alloca (name_len + map->new_len);
++  memcpy (s, map->new_prefix, map->new_len);
++  memcpy (s + map->new_len, name, name_len);
++
++  return xstrdup (s);
++}
++
++
+diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h
+new file mode 100644
+index 0000000..e6f8cbf
+--- /dev/null
++++ b/libcpp/include/file-map.h
+@@ -0,0 +1,30 @@
++/* Map one directory name to another in __FILE__, __BASE_FILE__
++   and __builtin_FILE ().
++   Copyright (C) 2001-2016 Free Software Foundation, Inc.
++
++This program is free software; you can redistribute it and/or modify it
++under the terms of the GNU General Public License as published by the
++Free Software Foundation; either version 3, or (at your option) any
++later version.
++
++This program is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; see the file COPYING3.  If not see
++<http://www.gnu.org/licenses/>.
++
++ In other words, you are welcome to use, share and improve this program.
++ You are forbidden to forbid anyone else to use, share and improve
++ what you give them.   Help stamp out software-hoarding!  */
++
++#ifndef LIBCPP_FILE_MAP_H
++#define LIBCPP_FILE_MAP_H
++
++const char * remap_file_filename (const char *filename);
++
++int add_file_prefix_map (const char *arg);
++
++#endif /* !LIBCPP_FILE_MAP_H  */
+diff --git a/libcpp/macro.c b/libcpp/macro.c
+index 11e50f4..5c6f90e 100644
+--- a/libcpp/macro.c
++++ b/libcpp/macro.c
+@@ -26,6 +26,7 @@ along with this program; see the file COPYING3.  If not see
+ #include "system.h"
+ #include "cpplib.h"
+ #include "internal.h"
++#include "file-map.h"
+ 
+ typedef struct macro_arg macro_arg;
+ /* This structure represents the tokens of a macro argument.  These
+@@ -288,6 +289,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node)
+ 	    if (!name)
+ 	      abort ();
+ 	  }
++	name = remap_file_filename (name);
+ 	len = strlen (name);
+ 	buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
+ 	result = buf;
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
new file mode 100644
index 0000000..94e45ed
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
@@ -0,0 +1,43 @@
+From 5e10baff84038d26dc3d59b2412ba1db92cb8274 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 17 Mar 2016 00:34:01 -0400
+Subject: [PATCH 2/2] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
+
+The oe-core may use external toolchain to compile,
+which may not support -ffile-prefix-map.
+
+Since we use -fdebug-prefix-map to do the same thing,
+so we could reuse it to replace -ffile-prefix-map.
+
+Upstream-Status: Inappropriate[oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/opts-global.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/gcc/opts-global.c b/gcc/opts-global.c
+index 111884b..037f6c8 100644
+--- a/gcc/opts-global.c
++++ b/gcc/opts-global.c
+@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3.  If not see
+ #include "toplev.h"
+ #include "tree-pass.h"
+ #include "context.h"
++#include "file-map.h"
+ 
+ typedef const char *const_char_p; /* For DEF_VEC_P.  */
+ 
+@@ -354,6 +355,9 @@ handle_common_deferred_options (void)
+ 
+ 	case OPT_fdebug_prefix_map_:
+ 	  add_debug_prefix_map (opt->arg);
++
++	  /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
++	  add_file_prefix_map (opt->arg);
+ 	  break;
+ 
+ 	case OPT_fdump_:
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0074-fdebug-prefix-map-support-to-remap-relative-path.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0074-fdebug-prefix-map-support-to-remap-relative-path.patch
new file mode 100644
index 0000000..0b91fdb
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-4.9/0074-fdebug-prefix-map-support-to-remap-relative-path.patch
@@ -0,0 +1,51 @@
+From 289ad2969a5966c603bf6928ce442db74c4cbb25 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 24 Mar 2016 11:23:14 -0400
+Subject: [PATCH] gcc/final.c: -fdebug-prefix-map support to remap sources with
+ relative path
+
+PR other/70428
+* final.c (remap_debug_filename): Use lrealpath to translate
+relative path before remapping
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428
+Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+diff --git a/gcc/final.c b/gcc/final.c
+index 55cf509..c3594c2 100644
+--- a/gcc/final.c
++++ b/gcc/final.c
+@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename)
+   const char *name;
+   size_t name_len;
+ 
++  /* Support to remap filename with relative path  */
++  char *realpath = lrealpath (filename);
++  if (realpath == NULL)
++    return filename;
++
+   for (map = debug_prefix_maps; map; map = map->next)
+-    if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
++    if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0)
+       break;
+   if (!map)
+-    return filename;
+-  name = filename + map->old_len;
++    {
++      free (realpath);
++      return filename;
++    }
++  name = realpath + map->old_len;
+   name_len = strlen (name) + 1;
+   s = (char *) alloca (name_len + map->new_len);
+   memcpy (s, map->new_prefix, map->new_len);
+   memcpy (s + map->new_len, name, name_len);
++  free (realpath);
+   return ggc_strdup (s);
+ }
+ 
+-- 
+2.7.4
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2.inc
deleted file mode 100644
index a6b385a..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2.inc
+++ /dev/null
@@ -1,123 +0,0 @@
-require gcc-common.inc
-
-# Third digit in PV should be incremented after a minor release
-
-PV = "5.2.0"
-
-#SNAP = "5-20150405"
-
-# BINV should be incremented to a revision after a minor gcc release
-
-BINV = "5.2.0"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-5.2:${FILE_DIRNAME}/gcc-5.2/backport:"
-
-DEPENDS =+ "mpfr gmp libmpc zlib"
-NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
-
-LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
-
-LIC_FILES_CHKSUM = "\
-    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
-    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
-    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-    file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
-"
-#BASEURI = "http://www.netgull.com/gcc/snapshots/${SNAP}/gcc-${SNAP}.tar.bz2"
-BASEURI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2"
-SRC_URI[md5sum] = "a51bcfeb3da7dd4c623e27207ed43467"
-SRC_URI[sha256sum] = "5f835b04b5f7dd4f4d2dc96190ec1621b8d89f2dc6f638f9f8bc1b1014ba8cad"
-
-SRC_URI = "\
-           ${BASEURI} \
-           ${BACKPORTS} \
-           file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
-           file://0002-uclibc-conf.patch \
-           file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
-           file://0004-uclibc-locale.patch \
-           file://0005-uclibc-locale-no__x.patch \
-           file://0006-uclibc-locale-wchar_fix.patch \
-           file://0007-uclibc-locale-update.patch \
-           file://0008-missing-execinfo_h.patch \
-           file://0009-c99-snprintf.patch \
-           file://0010-gcc-poison-system-directories.patch \
-           file://0011-gcc-poison-dir-extend.patch \
-           file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
-           file://0013-64-bit-multilib-hack.patch \
-           file://0014-optional-libstdc.patch \
-           file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
-           file://0016-COLLECT_GCC_OPTIONS.patch \
-           file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
-           file://0018-fortran-cross-compile-hack.patch \
-           file://0019-libgcc-sjlj-check.patch \
-           file://0020-cpp-honor-sysroot.patch \
-           file://0021-MIPS64-Default-to-N64-ABI.patch \
-           file://0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
-           file://0023-gcc-Fix-argument-list-too-long-error.patch \
-           file://0024-Disable-sdt.patch \
-           file://0025-libtool.patch \
-           file://0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
-           file://0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
-           file://0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
-           file://0029-export-CPP.patch \
-           file://0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
-           file://0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
-           file://0032-Ensure-target-gcc-headers-can-be-included.patch \
-           file://0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
-           file://0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
-           file://0035-Dont-link-the-plugins-with-libgomp-explicitly.patch \
-           file://0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
-           file://0037-pr65779.patch \
-           file://0038-fix-g++-sysroot.patch \
-           file://0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
-           file://0040-nativesdk-gcc-support.patch \
-           file://0041-handle-target-sysroot-multilib.patch \
-           file://0042-cxxflags-for-build.patch \
-          "
-
-BACKPORTS = ""
-#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${SNAP}"
-S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
-B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
-
-# Language Overrides
-FORTRAN = ""
-JAVA = ""
-
-LTO = "--enable-lto"
-
-EXTRA_OECONF_BASE = "\
-    ${LTO} \
-    --enable-libssp \
-    --disable-bootstrap \
-    --disable-libmudflap \
-    --with-system-zlib \
-    --with-linker-hash-style=${LINKER_HASH_STYLE} \
-    --enable-linker-build-id \
-    --with-ppl=no \
-    --with-cloog=no \
-    --enable-checking=release \
-    --enable-cheaders=c_global \
-    --without-isl \
-"
-
-EXTRA_OECONF_INITIAL = "\
-    --disable-libmudflap \
-    --disable-libgomp \
-    --disable-libssp \
-    --disable-libquadmath \
-    --with-system-zlib \
-    --disable-lto \
-    --disable-plugin \
-    --enable-decimal-float=no \
-    --without-isl \
-"
-
-EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-
-EXTRA_OECONF_PATHS = "\
-    --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
-    --with-sysroot=/not/exist \
-    --with-build-sysroot=${STAGING_DIR_TARGET} \
-"
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
deleted file mode 100644
index 2c766f4..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From a0fee0cee3d4bd4aab1e3a8e04446f99d918c4ff Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:37:11 +0400
-Subject: [PATCH 01/35] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- configure    | 2 +-
- configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure b/configure
-index 7616f88..50e7cbc 100755
---- a/configure
-+++ b/configure
-@@ -7464,7 +7464,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
- 
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
-  *" newlib "*)
-   case " $target_configargs " in
-diff --git a/configure.ac b/configure.ac
-index 8c85a08..f34af7e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -3104,7 +3104,7 @@ fi
- # for target_alias and gcc doesn't manage it consistently.
- target_configargs="--cache-file=./config.cache ${target_configargs}"
- 
--FLAGS_FOR_TARGET=
-+FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
- case " $target_configdirs " in
-  *" newlib "*)
-   case " $target_configargs " in
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0002-uclibc-conf.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0002-uclibc-conf.patch
deleted file mode 100644
index 69d33a0..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0002-uclibc-conf.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 7635248a4c9b51d723d721acaeeb5f2f11957987 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:38:25 +0400
-Subject: [PATCH 02/35] uclibc-conf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- contrib/regression/objs-gcc.sh | 4 ++++
- libjava/classpath/ltconfig     | 4 ++--
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
-index 60b0497..6dc7ead 100755
---- a/contrib/regression/objs-gcc.sh
-+++ b/contrib/regression/objs-gcc.sh
-@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
-  then
-   make all-gdb all-dejagnu all-ld || exit 1
-   make install-gdb install-dejagnu install-ld || exit 1
-+elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
-+ then
-+  make all-gdb all-dejagnu all-ld || exit 1
-+  make install-gdb install-dejagnu install-ld || exit 1
- elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
-   make bootstrap || exit 1
-   make install || exit 1
-diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
-index 743d951..ae4ea60 100755
---- a/libjava/classpath/ltconfig
-+++ b/libjava/classpath/ltconfig
-@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- 
- # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
- case $host_os in
--linux-gnu*) ;;
-+linux-gnu*|linux-uclibc*) ;;
- linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
- esac
- 
-@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
-   ;;
- 
- # This must be Linux ELF.
--linux-gnu*)
-+linux*)
-   version_type=linux
-   need_lib_prefix=no
-   need_version=no
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch
deleted file mode 100644
index bca254d..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0003-gcc-uclibc-locale-ctype_touplow_t.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 3aee58ad043af33ab00c9cd7bc88f0cade83f236 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:40:12 +0400
-Subject: [PATCH 03/35] gcc-uclibc-locale-ctype_touplow_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++
- libstdc++-v3/config/locale/generic/c_locale.h  | 9 +++++++++
- libstdc++-v3/config/os/gnu-linux/ctype_base.h  | 9 +++++++++
- 3 files changed, 23 insertions(+)
-
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
-index 6da5f22..2f85c2f 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.cc
-+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
-@@ -263,5 +263,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
- #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
- #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
-   extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
-+#ifdef __UCLIBC__
-+// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
-+_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
-+#else
- _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
-+#endif
- #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
-diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
-index ee3ef86..7fd5485 100644
---- a/libstdc++-v3/config/locale/generic/c_locale.h
-+++ b/libstdc++-v3/config/locale/generic/c_locale.h
-@@ -40,13 +40,22 @@
- 
- #include <clocale>
- 
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- #define _GLIBCXX_NUM_CATEGORIES 0
- 
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
- 
-+#ifdef __UCLIBC__
-+  typedef __ctype_touplow_t*	__c_locale;
-+#else
-   typedef int*			__c_locale;
-+#endif
- 
-   // Convert numeric value of type double and long double to string and
-   // return length of string.  If vsnprintf is available use it, otherwise
-diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-index fd52b73..2627cf3 100644
---- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-+++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
-@@ -33,6 +33,11 @@
- 
- // Information as gleaned from /usr/include/ctype.h
- 
-+#ifdef __UCLIBC__
-+#include <features.h>
-+#include <ctype.h>
-+#endif
-+
- namespace std _GLIBCXX_VISIBILITY(default)
- {
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
-   struct ctype_base
-   {
-     // Non-standard typedefs.
-+#ifdef __UCLIBC__
-+    typedef const __ctype_touplow_t*	__to_type;
-+#else
-     typedef const int* 		__to_type;
-+#endif
- 
-     // NB: Offsets into ctype<char>::_M_table force a particular size
-     // on the mask type. Because of this, we don't use an enum.
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0004-uclibc-locale.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0004-uclibc-locale.patch
deleted file mode 100644
index 03947a7..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0004-uclibc-locale.patch
+++ /dev/null
@@ -1,2862 +0,0 @@
-From 9f73e06315c94629fb902bd94219667cf8307b8f Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:41:39 +0400
-Subject: [PATCH 04/35] uclibc-locale
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/acinclude.m4                          |  37 ++
- .../config/locale/uclibc/c++locale_internal.h      |  63 ++
- libstdc++-v3/config/locale/uclibc/c_locale.cc      | 160 +++++
- libstdc++-v3/config/locale/uclibc/c_locale.h       | 117 ++++
- .../config/locale/uclibc/codecvt_members.cc        | 308 +++++++++
- .../config/locale/uclibc/collate_members.cc        |  80 +++
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++
- .../config/locale/uclibc/messages_members.cc       | 100 +++
- .../config/locale/uclibc/messages_members.h        | 118 ++++
- .../config/locale/uclibc/monetary_members.cc       | 692 +++++++++++++++++++++
- .../config/locale/uclibc/numeric_members.cc        | 160 +++++
- libstdc++-v3/config/locale/uclibc/time_members.cc  | 406 ++++++++++++
- libstdc++-v3/config/locale/uclibc/time_members.h   |  68 ++
- libstdc++-v3/configure                             |  75 +++
- libstdc++-v3/include/c_compatibility/wchar.h       |   2 +
- libstdc++-v3/include/c_std/cwchar                  |   2 +
- 16 files changed, 2688 insertions(+)
- create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h
- create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc
- create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h
-
-diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
-index a1e301f..0fe9326 100644
---- a/libstdc++-v3/acinclude.m4
-+++ b/libstdc++-v3/acinclude.m4
-@@ -1983,6 +1983,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
-   # Default to "generic".
-   if test $enable_clocale_flag = auto; then
-     case ${target_os} in
-+      *-uclibc*)
-+        enable_clocale_flag=uclibc
-+        ;;
-       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- 	enable_clocale_flag=gnu
- 	;;
-@@ -2167,6 +2170,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
-       CTIME_CC=config/locale/generic/time_members.cc
-       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
-       ;;
-+    uclibc)
-+      AC_MSG_RESULT(uclibc)
-+
-+      # Declare intention to use gettext, and add support for specific
-+      # languages.
-+      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+      ALL_LINGUAS="de fr"
-+
-+      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
-+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+        USE_NLS=yes
-+      fi
-+      # Export the build objects.
-+      for ling in $ALL_LINGUAS; do \
-+        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+      done
-+      AC_SUBST(glibcxx_MOFILES)
-+      AC_SUBST(glibcxx_POFILES)
-+
-+      CLOCALE_H=config/locale/uclibc/c_locale.h
-+      CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+      CMESSAGES_H=config/locale/uclibc/messages_members.h
-+      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+      CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+      CTIME_H=config/locale/uclibc/time_members.h
-+      CTIME_CC=config/locale/uclibc/time_members.cc
-+      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+      ;;
-   esac
- 
-   # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-new file mode 100644
-index 0000000..2ae3e4a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -0,0 +1,63 @@
-+// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
-+
-+// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+// Written by Jakub Jelinek <jakub@redhat.com>
-+
-+#include <bits/c++config.h>
-+#include <clocale>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning clean this up
-+#endif
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+
-+extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
-+extern "C" __typeof(strcoll_l) __strcoll_l;
-+extern "C" __typeof(strftime_l) __strftime_l;
-+extern "C" __typeof(strtod_l) __strtod_l;
-+extern "C" __typeof(strtof_l) __strtof_l;
-+extern "C" __typeof(strtold_l) __strtold_l;
-+extern "C" __typeof(strxfrm_l) __strxfrm_l;
-+extern "C" __typeof(newlocale) __newlocale;
-+extern "C" __typeof(freelocale) __freelocale;
-+extern "C" __typeof(duplocale) __duplocale;
-+extern "C" __typeof(uselocale) __uselocale;
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+extern "C" __typeof(iswctype_l) __iswctype_l;
-+extern "C" __typeof(towlower_l) __towlower_l;
-+extern "C" __typeof(towupper_l) __towupper_l;
-+extern "C" __typeof(wcscoll_l) __wcscoll_l;
-+extern "C" __typeof(wcsftime_l) __wcsftime_l;
-+extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
-+extern "C" __typeof(wctype_l) __wctype_l;
-+#endif
-+
-+#endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-new file mode 100644
-index 0000000..5081dc1
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -0,0 +1,160 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8  Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <cerrno>  // For errno
-+#include <locale>
-+#include <stdexcept>
-+#include <langinfo.h>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
-+#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
-+#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
-+#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
-+#define __strtof_l(S, E, L)         strtof((S), (E))
-+#define __strtod_l(S, E, L)         strtod((S), (E))
-+#define __strtold_l(S, E, L)        strtold((S), (E))
-+#warning should dummy __newlocale check for C|POSIX ?
-+#define __newlocale(a, b, c)        NULL
-+#define __freelocale(a)             ((void)0)
-+#define __duplocale(a)              __c_locale()
-+#endif
-+
-+namespace std
-+{
-+  template<>
-+    void
-+    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
-+		   const __c_locale& __cloc)
-+    {
-+      if (!(__err & ios_base::failbit))
-+	{
-+	  char* __sanity;
-+	  errno = 0;
-+	  float __f = __strtof_l(__s, &__sanity, __cloc);
-+          if (__sanity != __s && errno != ERANGE)
-+	    __v = __f;
-+	  else
-+	    __err |= ios_base::failbit;
-+	}
-+    }
-+
-+  template<>
-+    void
-+    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
-+		   const __c_locale& __cloc)
-+    {
-+      if (!(__err & ios_base::failbit))
-+	{
-+	  char* __sanity;
-+	  errno = 0;
-+	  double __d = __strtod_l(__s, &__sanity, __cloc);
-+          if (__sanity != __s && errno != ERANGE)
-+	    __v = __d;
-+	  else
-+	    __err |= ios_base::failbit;
-+	}
-+    }
-+
-+  template<>
-+    void
-+    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
-+		   const __c_locale& __cloc)
-+    {
-+      if (!(__err & ios_base::failbit))
-+	{
-+	  char* __sanity;
-+	  errno = 0;
-+	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+          if (__sanity != __s && errno != ERANGE)
-+	    __v = __ld;
-+	  else
-+	    __err |= ios_base::failbit;
-+	}
-+    }
-+
-+  void
-+  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
-+				    __c_locale __old)
-+  {
-+    __cloc = __newlocale(1 << LC_ALL, __s, __old);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    if (!__cloc)
-+      {
-+	// This named locale is not supported by the underlying OS.
-+	__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
-+			      "name not valid"));
-+      }
-+#endif
-+  }
-+
-+  void
-+  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-+  {
-+    if (_S_get_c_locale() != __cloc)
-+      __freelocale(__cloc);
-+  }
-+
-+  __c_locale
-+  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
-+  { return __duplocale(__cloc); }
-+} // namespace std
-+
-+namespace __gnu_cxx
-+{
-+  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-+    {
-+      "LC_CTYPE",
-+      "LC_NUMERIC",
-+      "LC_TIME",
-+      "LC_COLLATE",
-+      "LC_MONETARY",
-+      "LC_MESSAGES",
-+#if _GLIBCXX_NUM_CATEGORIES != 0
-+      "LC_PAPER",
-+      "LC_NAME",
-+      "LC_ADDRESS",
-+      "LC_TELEPHONE",
-+      "LC_MEASUREMENT",
-+      "LC_IDENTIFICATION"
-+#endif
-+    };
-+}
-+
-+namespace std
-+{
-+  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
-+}  // namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-new file mode 100644
-index 0000000..da07c1f
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -0,0 +1,117 @@
-+// Wrapper for underlying C-language localization -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.8  Standard locale categories.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifndef _C_LOCALE_H
-+#define _C_LOCALE_H 1
-+
-+#pragma GCC system_header
-+
-+#include <cstring>              // get std::strlen
-+#include <cstdio>               // get std::snprintf or std::sprintf
-+#include <clocale>
-+#include <langinfo.h>		// For codecvt
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this
-+#endif
-+#ifdef __UCLIBC_HAS_LOCALE__
-+#include <iconv.h>		// For codecvt using iconv, iconv_t
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#include <libintl.h> 		// For messages
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning what is _GLIBCXX_C_LOCALE_GNU for
-+#endif
-+#define _GLIBCXX_C_LOCALE_GNU 1
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix categories
-+#endif
-+// #define _GLIBCXX_NUM_CATEGORIES 6
-+#define _GLIBCXX_NUM_CATEGORIES 0
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+namespace __gnu_cxx
-+{
-+  extern "C" __typeof(uselocale) __uselocale;
-+}
-+#endif
-+
-+namespace std
-+{
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+  typedef __locale_t		__c_locale;
-+#else
-+  typedef int*			__c_locale;
-+#endif
-+
-+  // Convert numeric value of type _Tv to string and return length of
-+  // string.  If snprintf is available use it, otherwise fall back to
-+  // the unsafe sprintf which, in general, can be dangerous and should
-+  // be avoided.
-+  template<typename _Tv>
-+    int
-+    __convert_from_v(char* __out,
-+		     const int __size __attribute__ ((__unused__)),
-+		     const char* __fmt,
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+		     _Tv __v, const __c_locale& __cloc, int __prec)
-+    {
-+      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
-+#else
-+		     _Tv __v, const __c_locale&, int __prec)
-+    {
-+# ifdef __UCLIBC_HAS_LOCALE__
-+      char* __old = std::setlocale(LC_ALL, NULL);
-+      char* __sav = new char[std::strlen(__old) + 1];
-+      std::strcpy(__sav, __old);
-+      std::setlocale(LC_ALL, "C");
-+# endif
-+#endif
-+
-+      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+      __gnu_cxx::__uselocale(__old);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+      std::setlocale(LC_ALL, __sav);
-+      delete [] __sav;
-+#endif
-+      return __ret;
-+    }
-+}
-+
-+#endif
-diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-new file mode 100644
-index 0000000..64aa962
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
-@@ -0,0 +1,308 @@
-+// std::codecvt implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.5 - Template class codecvt
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <cstdlib>  // For MB_CUR_MAX
-+#include <climits>  // For MB_LEN_MAX
-+#include <bits/c++locale_internal.h>
-+
-+namespace std
-+{
-+  // Specializations.
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  codecvt_base::result
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_out(state_type& __state, const intern_type* __from,
-+	 const intern_type* __from_end, const intern_type*& __from_next,
-+	 extern_type* __to, extern_type* __to_end,
-+	 extern_type*& __to_next) const
-+  {
-+    result __ret = ok;
-+    state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
-+    // in case we fall back to wcrtomb and then continue, in a loop.
-+    // NB: wcsnrtombs is a GNU extension
-+    for (__from_next = __from, __to_next = __to;
-+	 __from_next < __from_end && __to_next < __to_end
-+	 && __ret == ok;)
-+      {
-+	const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
-+						      __from_end - __from_next);
-+	if (!__from_chunk_end)
-+	  __from_chunk_end = __from_end;
-+
-+	__from = __from_next;
-+	const size_t __conv = wcsnrtombs(__to_next, &__from_next,
-+					 __from_chunk_end - __from_next,
-+					 __to_end - __to_next, &__state);
-+	if (__conv == static_cast<size_t>(-1))
-+	  {
-+	    // In case of error, in order to stop at the exact place we
-+	    // have to start again from the beginning with a series of
-+	    // wcrtomb.
-+	    for (; __from < __from_next; ++__from)
-+	      __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
-+	    __state = __tmp_state;
-+	    __ret = error;
-+	  }
-+	else if (__from_next && __from_next < __from_chunk_end)
-+	  {
-+	    __to_next += __conv;
-+	    __ret = partial;
-+	  }
-+	else
-+	  {
-+	    __from_next = __from_chunk_end;
-+	    __to_next += __conv;
-+	  }
-+
-+	if (__from_next < __from_end && __ret == ok)
-+	  {
-+	    extern_type __buf[MB_LEN_MAX];
-+	    __tmp_state = __state;
-+	    const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
-+	    if (__conv > static_cast<size_t>(__to_end - __to_next))
-+	      __ret = partial;
-+	    else
-+	      {
-+		memcpy(__to_next, __buf, __conv);
-+		__state = __tmp_state;
-+		__to_next += __conv;
-+		++__from_next;
-+	      }
-+	  }
-+      }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+
-+    return __ret;
-+  }
-+
-+  codecvt_base::result
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_in(state_type& __state, const extern_type* __from,
-+	const extern_type* __from_end, const extern_type*& __from_next,
-+	intern_type* __to, intern_type* __to_end,
-+	intern_type*& __to_next) const
-+  {
-+    result __ret = ok;
-+    state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+    // in case we store a L'\0' and then continue, in a loop.
-+    // NB: mbsnrtowcs is a GNU extension
-+    for (__from_next = __from, __to_next = __to;
-+	 __from_next < __from_end && __to_next < __to_end
-+	 && __ret == ok;)
-+      {
-+	const extern_type* __from_chunk_end;
-+	__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
-+								  __from_end
-+								  - __from_next));
-+	if (!__from_chunk_end)
-+	  __from_chunk_end = __from_end;
-+
-+	__from = __from_next;
-+	size_t __conv = mbsnrtowcs(__to_next, &__from_next,
-+				   __from_chunk_end - __from_next,
-+				   __to_end - __to_next, &__state);
-+	if (__conv == static_cast<size_t>(-1))
-+	  {
-+	    // In case of error, in order to stop at the exact place we
-+	    // have to start again from the beginning with a series of
-+	    // mbrtowc.
-+	    for (;; ++__to_next, __from += __conv)
-+	      {
-+		__conv = mbrtowc(__to_next, __from, __from_end - __from,
-+				 &__tmp_state);
-+		if (__conv == static_cast<size_t>(-1)
-+		    || __conv == static_cast<size_t>(-2))
-+		  break;
-+	      }
-+	    __from_next = __from;
-+	    __state = __tmp_state;
-+	    __ret = error;
-+	  }
-+	else if (__from_next && __from_next < __from_chunk_end)
-+	  {
-+	    // It is unclear what to return in this case (see DR 382).
-+	    __to_next += __conv;
-+	    __ret = partial;
-+	  }
-+	else
-+	  {
-+	    __from_next = __from_chunk_end;
-+	    __to_next += __conv;
-+	  }
-+
-+	if (__from_next < __from_end && __ret == ok)
-+	  {
-+	    if (__to_next < __to_end)
-+	      {
-+		// XXX Probably wrong for stateful encodings
-+		__tmp_state = __state;
-+		++__from_next;
-+		*__to_next++ = L'\0';
-+	      }
-+	    else
-+	      __ret = partial;
-+	  }
-+      }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+
-+    return __ret;
-+  }
-+
-+  int
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_encoding() const throw()
-+  {
-+    // XXX This implementation assumes that the encoding is
-+    // stateless and is either single-byte or variable-width.
-+    int __ret = 0;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+    if (MB_CUR_MAX == 1)
-+      __ret = 1;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return __ret;
-+  }
-+
-+  int
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_max_length() const throw()
-+  {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+    // XXX Probably wrong for stateful encodings.
-+    int __ret = MB_CUR_MAX;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return __ret;
-+  }
-+
-+  int
-+  codecvt<wchar_t, char, mbstate_t>::
-+  do_length(state_type& __state, const extern_type* __from,
-+	    const extern_type* __end, size_t __max) const
-+  {
-+    int __ret = 0;
-+    state_type __tmp_state(__state);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_codecvt);
-+#endif
-+
-+    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
-+    // in case we advance past it and then continue, in a loop.
-+    // NB: mbsnrtowcs is a GNU extension
-+
-+    // A dummy internal buffer is needed in order for mbsnrtocws to consider
-+    // its fourth parameter (it wouldn't with NULL as first parameter).
-+    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
-+							   * __max));
-+    while (__from < __end && __max)
-+      {
-+	const extern_type* __from_chunk_end;
-+	__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
-+								  __end
-+								  - __from));
-+	if (!__from_chunk_end)
-+	  __from_chunk_end = __end;
-+
-+	const extern_type* __tmp_from = __from;
-+	size_t __conv = mbsnrtowcs(__to, &__from,
-+				   __from_chunk_end - __from,
-+				   __max, &__state);
-+	if (__conv == static_cast<size_t>(-1))
-+	  {
-+	    // In case of error, in order to stop at the exact place we
-+	    // have to start again from the beginning with a series of
-+	    // mbrtowc.
-+	    for (__from = __tmp_from;; __from += __conv)
-+	      {
-+		__conv = mbrtowc(NULL, __from, __end - __from,
-+				 &__tmp_state);
-+		if (__conv == static_cast<size_t>(-1)
-+		    || __conv == static_cast<size_t>(-2))
-+		  break;
-+	      }
-+	    __state = __tmp_state;
-+	    __ret += __from - __tmp_from;
-+	    break;
-+	  }
-+	if (!__from)
-+	  __from = __from_chunk_end;
-+
-+	__ret += __from - __tmp_from;
-+	__max -= __conv;
-+
-+	if (__from < __end && __max)
-+	  {
-+	    // XXX Probably wrong for stateful encodings
-+	    __tmp_state = __state;
-+	    ++__from;
-+	    ++__ret;
-+	    --__max;
-+	  }
-+      }
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+
-+    return __ret;
-+  }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-new file mode 100644
-index 0000000..c2664a7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -0,0 +1,80 @@
-+// std::collate implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.4.1.2  collate virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
-+#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
-+#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
-+#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
-+#endif
-+
-+namespace std
-+{
-+  // These are basically extensions to char_traits, and perhaps should
-+  // be put there instead of here.
-+  template<>
-+    int
-+    collate<char>::_M_compare(const char* __one, const char* __two) const
-+    {
-+      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
-+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+    }
-+
-+  template<>
-+    size_t
-+    collate<char>::_M_transform(char* __to, const char* __from,
-+				size_t __n) const
-+    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    int
-+    collate<wchar_t>::_M_compare(const wchar_t* __one,
-+				 const wchar_t* __two) const
-+    {
-+      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
-+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
-+    }
-+
-+  template<>
-+    size_t
-+    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
-+				   size_t __n) const
-+    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-new file mode 100644
-index 0000000..7294e3a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -0,0 +1,300 @@
-+// std::ctype implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.1.1.2  ctype virtual functions.
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __wctype_l(S, L)           wctype((S))
-+#define __towupper_l(C, L)         towupper((C))
-+#define __towlower_l(C, L)         towlower((C))
-+#define __iswctype_l(C, M, L)      iswctype((C), (M))
-+#endif
-+
-+namespace std
-+{
-+  // NB: The other ctype<char> specializations are in src/locale.cc and
-+  // various /config/os/* files.
-+  template<>
-+    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-+    : ctype<char>(0, false, __refs)
-+    {
-+      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+	{
-+	  this->_S_destroy_c_locale(this->_M_c_locale_ctype);
-+	  this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
-+	  this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
-+	  this->_M_table = this->_M_c_locale_ctype->__ctype_b;
-+#endif
-+	}
-+    }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  ctype<wchar_t>::__wmask_type
-+  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
-+  {
-+    __wmask_type __ret;
-+    switch (__m)
-+      {
-+      case space:
-+	__ret = __wctype_l("space", _M_c_locale_ctype);
-+	break;
-+      case print:
-+	__ret = __wctype_l("print", _M_c_locale_ctype);
-+	break;
-+      case cntrl:
-+	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
-+	break;
-+      case upper:
-+	__ret = __wctype_l("upper", _M_c_locale_ctype);
-+	break;
-+      case lower:
-+	__ret = __wctype_l("lower", _M_c_locale_ctype);
-+	break;
-+      case alpha:
-+	__ret = __wctype_l("alpha", _M_c_locale_ctype);
-+	break;
-+      case digit:
-+	__ret = __wctype_l("digit", _M_c_locale_ctype);
-+	break;
-+      case punct:
-+	__ret = __wctype_l("punct", _M_c_locale_ctype);
-+	break;
-+      case xdigit:
-+	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
-+	break;
-+      case alnum:
-+	__ret = __wctype_l("alnum", _M_c_locale_ctype);
-+	break;
-+      case graph:
-+	__ret = __wctype_l("graph", _M_c_locale_ctype);
-+	break;
-+      default:
-+	__ret = __wmask_type();
-+      }
-+    return __ret;
-+  }
-+
-+  wchar_t
-+  ctype<wchar_t>::do_toupper(wchar_t __c) const
-+  { return __towupper_l(__c, _M_c_locale_ctype); }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
-+  {
-+    while (__lo < __hi)
-+      {
-+        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
-+        ++__lo;
-+      }
-+    return __hi;
-+  }
-+
-+  wchar_t
-+  ctype<wchar_t>::do_tolower(wchar_t __c) const
-+  { return __towlower_l(__c, _M_c_locale_ctype); }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
-+  {
-+    while (__lo < __hi)
-+      {
-+        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
-+        ++__lo;
-+      }
-+    return __hi;
-+  }
-+
-+  bool
-+  ctype<wchar_t>::
-+  do_is(mask __m, wchar_t __c) const
-+  {
-+    // Highest bitmask in ctype_base == 10, but extra in "C"
-+    // library for blank.
-+    bool __ret = false;
-+    const size_t __bitmasksize = 11;
-+    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+      if (__m & _M_bit[__bitcur]
-+	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+	{
-+	  __ret = true;
-+	  break;
-+	}
-+    return __ret;
-+  }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::
-+  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
-+  {
-+    for (; __lo < __hi; ++__vec, ++__lo)
-+      {
-+	// Highest bitmask in ctype_base == 10, but extra in "C"
-+	// library for blank.
-+	const size_t __bitmasksize = 11;
-+	mask __m = 0;
-+	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+	  if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
-+	    __m |= _M_bit[__bitcur];
-+	*__vec = __m;
-+      }
-+    return __hi;
-+  }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::
-+  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
-+  {
-+    while (__lo < __hi && !this->do_is(__m, *__lo))
-+      ++__lo;
-+    return __lo;
-+  }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::
-+  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
-+  {
-+    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
-+      ++__lo;
-+    return __lo;
-+  }
-+
-+  wchar_t
-+  ctype<wchar_t>::
-+  do_widen(char __c) const
-+  { return _M_widen[static_cast<unsigned char>(__c)]; }
-+
-+  const char*
-+  ctype<wchar_t>::
-+  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
-+  {
-+    while (__lo < __hi)
-+      {
-+	*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
-+	++__lo;
-+	++__dest;
-+      }
-+    return __hi;
-+  }
-+
-+  char
-+  ctype<wchar_t>::
-+  do_narrow(wchar_t __wc, char __dfault) const
-+  {
-+    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
-+      return _M_narrow[__wc];
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+    const int __c = wctob(__wc);
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return (__c == EOF ? __dfault : static_cast<char>(__c));
-+  }
-+
-+  const wchar_t*
-+  ctype<wchar_t>::
-+  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
-+	    char* __dest) const
-+  {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+    if (_M_narrow_ok)
-+      while (__lo < __hi)
-+	{
-+	  if (*__lo >= 0 && *__lo < 128)
-+	    *__dest = _M_narrow[*__lo];
-+	  else
-+	    {
-+	      const int __c = wctob(*__lo);
-+	      *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+	    }
-+	  ++__lo;
-+	  ++__dest;
-+	}
-+    else
-+      while (__lo < __hi)
-+	{
-+	  const int __c = wctob(*__lo);
-+	  *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
-+	  ++__lo;
-+	  ++__dest;
-+	}
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+    return __hi;
-+  }
-+
-+  void
-+  ctype<wchar_t>::_M_initialize_ctype()
-+  {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __c_locale __old = __uselocale(_M_c_locale_ctype);
-+#endif
-+    wint_t __i;
-+    for (__i = 0; __i < 128; ++__i)
-+      {
-+	const int __c = wctob(__i);
-+	if (__c == EOF)
-+	  break;
-+	else
-+	  _M_narrow[__i] = static_cast<char>(__c);
-+      }
-+    if (__i == 128)
-+      _M_narrow_ok = true;
-+    else
-+      _M_narrow_ok = false;
-+    for (size_t __j = 0;
-+	 __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
-+      _M_widen[__j] = btowc(__j);
-+
-+    for (size_t __k = 0; __k <= 11; ++__k)
-+      {
-+	_M_bit[__k] = static_cast<mask>(_ISbit(__k));
-+	_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
-+      }
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+    __uselocale(__old);
-+#endif
-+  }
-+#endif //  _GLIBCXX_USE_WCHAR_T
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-new file mode 100644
-index 0000000..13594d9
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -0,0 +1,100 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2  messages virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix gettext stuff
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__dcgettext(const char *domainname,
-+			     const char *msgid, int category);
-+#undef gettext
-+#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#else
-+#undef gettext
-+#define gettext(msgid) (msgid)
-+#endif
-+
-+namespace std
-+{
-+  // Specializations.
-+  template<>
-+    string
-+    messages<char>::do_get(catalog, int, int, const string& __dfault) const
-+    {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+      __c_locale __old = __uselocale(_M_c_locale_messages);
-+      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
-+      __uselocale(__old);
-+      return string(__msg);
-+#elif defined __UCLIBC_HAS_LOCALE__
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_messages);
-+      const char* __msg = gettext(__dfault.c_str());
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+      return string(__msg);
-+#else
-+      const char* __msg = gettext(__dfault.c_str());
-+      return string(__msg);
-+#endif
-+    }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    wstring
-+    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
-+    {
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+      __c_locale __old = __uselocale(_M_c_locale_messages);
-+      char* __msg = gettext(_M_convert_to_char(__dfault));
-+      __uselocale(__old);
-+      return _M_convert_from_char(__msg);
-+# elif defined __UCLIBC_HAS_LOCALE__
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_messages);
-+      char* __msg = gettext(_M_convert_to_char(__dfault));
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+      return _M_convert_from_char(__msg);
-+# else
-+      char* __msg = gettext(_M_convert_to_char(__dfault));
-+      return _M_convert_from_char(__msg);
-+# endif
-+    }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-new file mode 100644
-index 0000000..1424078
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -0,0 +1,118 @@
-+// std::messages implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.7.1.2  messages functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix prototypes for *textdomain funcs
-+#endif
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+extern "C" char *__textdomain(const char *domainname);
-+extern "C" char *__bindtextdomain(const char *domainname,
-+				  const char *dirname);
-+#else
-+#undef __textdomain
-+#undef __bindtextdomain
-+#define __textdomain(D)           ((void)0)
-+#define __bindtextdomain(D,P)     ((void)0)
-+#endif
-+
-+  // Non-virtual member functions.
-+  template<typename _CharT>
-+     messages<_CharT>::messages(size_t __refs)
-+     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
-+     _M_name_messages(_S_get_c_name())
-+     { }
-+
-+  template<typename _CharT>
-+     messages<_CharT>::messages(__c_locale __cloc, const char* __s,
-+				size_t __refs)
-+     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
-+     _M_name_messages(__s)
-+     {
-+       char* __tmp = new char[std::strlen(__s) + 1];
-+       std::strcpy(__tmp, __s);
-+       _M_name_messages = __tmp;
-+     }
-+
-+  template<typename _CharT>
-+    typename messages<_CharT>::catalog
-+    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
-+			   const char* __dir) const
-+    {
-+      __bindtextdomain(__s.c_str(), __dir);
-+      return this->do_open(__s, __loc);
-+    }
-+
-+  // Virtual member functions.
-+  template<typename _CharT>
-+    messages<_CharT>::~messages()
-+    {
-+      if (_M_name_messages != _S_get_c_name())
-+	delete [] _M_name_messages;
-+      _S_destroy_c_locale(_M_c_locale_messages);
-+    }
-+
-+  template<typename _CharT>
-+    typename messages<_CharT>::catalog
-+    messages<_CharT>::do_open(const basic_string<char>& __s,
-+			      const locale&) const
-+    {
-+      // No error checking is done, assume the catalog exists and can
-+      // be used.
-+      __textdomain(__s.c_str());
-+      return 0;
-+    }
-+
-+  template<typename _CharT>
-+    void
-+    messages<_CharT>::do_close(catalog) const
-+    { }
-+
-+   // messages_byname
-+   template<typename _CharT>
-+     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
-+     : messages<_CharT>(__refs)
-+     {
-+       if (this->_M_name_messages != locale::facet::_S_get_c_name())
-+	 delete [] this->_M_name_messages;
-+       char* __tmp = new char[std::strlen(__s) + 1];
-+       std::strcpy(__tmp, __s);
-+       this->_M_name_messages = __tmp;
-+
-+       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
-+	 {
-+	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
-+	   this->_S_create_c_locale(this->_M_c_locale_messages, __s);
-+	 }
-+     }
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-new file mode 100644
-index 0000000..aa52731
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -0,0 +1,692 @@
-+// std::moneypunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.6.3.2  moneypunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning optimize this for uclibc
-+#warning tailor for stub locale support
-+#endif
-+
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+  // Construct and return valid pattern consisting of some combination of:
-+  // space none symbol sign value
-+  money_base::pattern
-+  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
-+  {
-+    pattern __ret;
-+
-+    // This insanely complicated routine attempts to construct a valid
-+    // pattern for use with monyepunct. A couple of invariants:
-+
-+    // if (__precedes) symbol -> value
-+    // else value -> symbol
-+
-+    // if (__space) space
-+    // else none
-+
-+    // none == never first
-+    // space never first or last
-+
-+    // Any elegant implementations of this are welcome.
-+    switch (__posn)
-+      {
-+      case 0:
-+      case 1:
-+	// 1 The sign precedes the value and symbol.
-+	__ret.field[0] = sign;
-+	if (__space)
-+	  {
-+	    // Pattern starts with sign.
-+	    if (__precedes)
-+	      {
-+		__ret.field[1] = symbol;
-+		__ret.field[3] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = value;
-+		__ret.field[3] = symbol;
-+	      }
-+	    __ret.field[2] = space;
-+	  }
-+	else
-+	  {
-+	    // Pattern starts with sign and ends with none.
-+	    if (__precedes)
-+	      {
-+		__ret.field[1] = symbol;
-+		__ret.field[2] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = value;
-+		__ret.field[2] = symbol;
-+	      }
-+	    __ret.field[3] = none;
-+	  }
-+	break;
-+      case 2:
-+	// 2 The sign follows the value and symbol.
-+	if (__space)
-+	  {
-+	    // Pattern either ends with sign.
-+	    if (__precedes)
-+	      {
-+		__ret.field[0] = symbol;
-+		__ret.field[2] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[0] = value;
-+		__ret.field[2] = symbol;
-+	      }
-+	    __ret.field[1] = space;
-+	    __ret.field[3] = sign;
-+	  }
-+	else
-+	  {
-+	    // Pattern ends with sign then none.
-+	    if (__precedes)
-+	      {
-+		__ret.field[0] = symbol;
-+		__ret.field[1] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[0] = value;
-+		__ret.field[1] = symbol;
-+	      }
-+	    __ret.field[2] = sign;
-+	    __ret.field[3] = none;
-+	  }
-+	break;
-+      case 3:
-+	// 3 The sign immediately precedes the symbol.
-+	if (__precedes)
-+	  {
-+	    __ret.field[0] = sign;
-+	    __ret.field[1] = symbol;
-+	    if (__space)
-+	      {
-+		__ret.field[2] = space;
-+		__ret.field[3] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[2] = value;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	else
-+	  {
-+	    __ret.field[0] = value;
-+	    if (__space)
-+	      {
-+		__ret.field[1] = space;
-+		__ret.field[2] = sign;
-+		__ret.field[3] = symbol;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = sign;
-+		__ret.field[2] = symbol;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	break;
-+      case 4:
-+	// 4 The sign immediately follows the symbol.
-+	if (__precedes)
-+	  {
-+	    __ret.field[0] = symbol;
-+	    __ret.field[1] = sign;
-+	    if (__space)
-+	      {
-+		__ret.field[2] = space;
-+		__ret.field[3] = value;
-+	      }
-+	    else
-+	      {
-+		__ret.field[2] = value;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	else
-+	  {
-+	    __ret.field[0] = value;
-+	    if (__space)
-+	      {
-+		__ret.field[1] = space;
-+		__ret.field[2] = symbol;
-+		__ret.field[3] = sign;
-+	      }
-+	    else
-+	      {
-+		__ret.field[1] = symbol;
-+		__ret.field[2] = sign;
-+		__ret.field[3] = none;
-+	      }
-+	  }
-+	break;
-+      default:
-+	;
-+      }
-+    return __ret;
-+  }
-+
-+  template<>
-+    void
-+    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+						     const char*)
-+    {
-+      if (!_M_data)
-+	_M_data = new __moneypunct_cache<char, true>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = '.';
-+	  _M_data->_M_thousands_sep = ',';
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = "";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = "";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = "";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+							__cloc));
-+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+							__cloc));
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+	  if (!__nposn)
-+	    _M_data->_M_negative_sign = "()";
-+	  else
-+	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+							__cloc);
-+	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+	  // _Intl == true
-+	  _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+						      __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+							__pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+							__nposn);
-+	}
-+    }
-+
-+  template<>
-+    void
-+    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+						      const char*)
-+    {
-+      if (!_M_data)
-+	_M_data = new __moneypunct_cache<char, false>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = '.';
-+	  _M_data->_M_thousands_sep = ',';
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = "";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = "";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = "";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
-+							__cloc));
-+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
-+							__cloc));
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
-+
-+	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+	  if (!__nposn)
-+	    _M_data->_M_negative_sign = "()";
-+	  else
-+	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
-+							__cloc);
-+	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
-+
-+	  // _Intl == false
-+	  _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+							__pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+							__nposn);
-+	}
-+    }
-+
-+  template<>
-+    moneypunct<char, true>::~moneypunct()
-+    { delete _M_data; }
-+
-+  template<>
-+    moneypunct<char, false>::~moneypunct()
-+    { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    void
-+    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+							const char*)
-+#else
-+							const char* __name)
-+#endif
-+    {
-+      if (!_M_data)
-+	_M_data = new __moneypunct_cache<wchar_t, true>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = L'.';
-+	  _M_data->_M_thousands_sep = L',';
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = L"";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = L"";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = L"";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  // Use ctype::widen code without the facet...
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    _M_data->_M_atoms[__i] =
-+	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+	}
-+      else
-+	{
-+	  // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __c_locale __old = __uselocale(__cloc);
-+#else
-+	  // Switch to named locale so that mbsrtowcs will work.
-+	  char* __old = strdup(setlocale(LC_ALL, NULL));
-+	  setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+	  union { char *__s; wchar_t __w; } __u;
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+	  _M_data->_M_decimal_point = __u.__w;
-+
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+	  _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
-+
-+	  wchar_t* __wcs_ps = 0;
-+	  wchar_t* __wcs_ns = 0;
-+	  const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
-+	  try
-+	    {
-+	      mbstate_t __state;
-+	      size_t __len = strlen(__cpossign);
-+	      if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ps = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+		  _M_data->_M_positive_sign = __wcs_ps;
-+		}
-+	      else
-+		_M_data->_M_positive_sign = L"";
-+	      _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+	      __len = strlen(__cnegsign);
-+	      if (!__nposn)
-+		_M_data->_M_negative_sign = L"()";
-+	      else if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ns = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+		  _M_data->_M_negative_sign = __wcs_ns;
-+		}
-+	      else
-+		_M_data->_M_negative_sign = L"";
-+	      _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+	      // _Intl == true.
-+	      __len = strlen(__ccurr);
-+	      if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  wchar_t* __wcs = new wchar_t[__len];
-+		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+		  _M_data->_M_curr_symbol = __wcs;
-+		}
-+	      else
-+		_M_data->_M_curr_symbol = L"";
-+	      _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+	    }
-+	  catch (...)
-+	    {
-+	      delete _M_data;
-+	      _M_data = 0;
-+	      delete __wcs_ps;
-+	      delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	      __uselocale(__old);
-+#else
-+	      setlocale(LC_ALL, __old);
-+	      free(__old);
-+#endif
-+	      __throw_exception_again;
-+	    }
-+
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
-+						      __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+							__pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+							__nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __uselocale(__old);
-+#else
-+	  setlocale(LC_ALL, __old);
-+	  free(__old);
-+#endif
-+	}
-+    }
-+
-+  template<>
-+  void
-+  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+						       const char*)
-+#else
-+                                                       const char* __name)
-+#endif
-+  {
-+    if (!_M_data)
-+      _M_data = new __moneypunct_cache<wchar_t, false>;
-+
-+    if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_decimal_point = L'.';
-+	  _M_data->_M_thousands_sep = L',';
-+	  _M_data->_M_grouping = "";
-+          _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_curr_symbol = L"";
-+	  _M_data->_M_curr_symbol_size = 0;
-+	  _M_data->_M_positive_sign = L"";
-+	  _M_data->_M_positive_sign_size = 0;
-+	  _M_data->_M_negative_sign = L"";
-+	  _M_data->_M_negative_sign_size = 0;
-+	  _M_data->_M_frac_digits = 0;
-+	  _M_data->_M_pos_format = money_base::_S_default_pattern;
-+	  _M_data->_M_neg_format = money_base::_S_default_pattern;
-+
-+	  // Use ctype::widen code without the facet...
-+	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
-+	    _M_data->_M_atoms[__i] =
-+	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
-+	}
-+      else
-+	{
-+	  // Named locale.
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __c_locale __old = __uselocale(__cloc);
-+#else
-+	  // Switch to named locale so that mbsrtowcs will work.
-+	  char* __old = strdup(setlocale(LC_ALL, NULL));
-+	  setlocale(LC_ALL, __name);
-+#endif
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be monetary
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# else
-+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
-+          union { char *__s; wchar_t __w; } __u;
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
-+	  _M_data->_M_decimal_point = __u.__w;
-+
-+	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
-+	  _M_data->_M_thousands_sep = __u.__w;
-+#endif
-+	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
-+          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+
-+	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
-+	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
-+	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
-+
-+	  wchar_t* __wcs_ps = 0;
-+	  wchar_t* __wcs_ns = 0;
-+	  const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
-+	  try
-+            {
-+              mbstate_t __state;
-+              size_t __len;
-+              __len = strlen(__cpossign);
-+              if (__len)
-+                {
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ps = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
-+		  _M_data->_M_positive_sign = __wcs_ps;
-+		}
-+	      else
-+		_M_data->_M_positive_sign = L"";
-+              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
-+
-+	      __len = strlen(__cnegsign);
-+	      if (!__nposn)
-+		_M_data->_M_negative_sign = L"()";
-+	      else if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  __wcs_ns = new wchar_t[__len];
-+		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
-+		  _M_data->_M_negative_sign = __wcs_ns;
-+		}
-+	      else
-+		_M_data->_M_negative_sign = L"";
-+              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
-+
-+	      // _Intl == true.
-+	      __len = strlen(__ccurr);
-+	      if (__len)
-+		{
-+		  ++__len;
-+		  memset(&__state, 0, sizeof(mbstate_t));
-+		  wchar_t* __wcs = new wchar_t[__len];
-+		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
-+		  _M_data->_M_curr_symbol = __wcs;
-+		}
-+	      else
-+		_M_data->_M_curr_symbol = L"";
-+              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
-+	    }
-+          catch (...)
-+	    {
-+	      delete _M_data;
-+              _M_data = 0;
-+	      delete __wcs_ps;
-+	      delete __wcs_ns;
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	      __uselocale(__old);
-+#else
-+	      setlocale(LC_ALL, __old);
-+	      free(__old);
-+#endif
-+              __throw_exception_again;
-+	    }
-+
-+	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
-+	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
-+	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
-+	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
-+	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
-+	                                                __pposn);
-+	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
-+	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
-+	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
-+	                                                __nposn);
-+
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+	  __uselocale(__old);
-+#else
-+	  setlocale(LC_ALL, __old);
-+	  free(__old);
-+#endif
-+	}
-+    }
-+
-+  template<>
-+    moneypunct<wchar_t, true>::~moneypunct()
-+    {
-+      if (_M_data->_M_positive_sign_size)
-+	delete [] _M_data->_M_positive_sign;
-+      if (_M_data->_M_negative_sign_size
-+          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+	delete [] _M_data->_M_negative_sign;
-+      if (_M_data->_M_curr_symbol_size)
-+	delete [] _M_data->_M_curr_symbol;
-+      delete _M_data;
-+    }
-+
-+  template<>
-+    moneypunct<wchar_t, false>::~moneypunct()
-+    {
-+      if (_M_data->_M_positive_sign_size)
-+	delete [] _M_data->_M_positive_sign;
-+      if (_M_data->_M_negative_sign_size
-+          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
-+	delete [] _M_data->_M_negative_sign;
-+      if (_M_data->_M_curr_symbol_size)
-+	delete [] _M_data->_M_curr_symbol;
-+      delete _M_data;
-+    }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-new file mode 100644
-index 0000000..883ec1a
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -0,0 +1,160 @@
-+// std::numpunct implementation details, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.3.1.2  numpunct virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#define _LIBC
-+#include <locale>
-+#undef _LIBC
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+  template<>
-+    void
-+    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __numpunct_cache<char>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_use_grouping = false;
-+
-+	  _M_data->_M_decimal_point = '.';
-+	  _M_data->_M_thousands_sep = ',';
-+
-+	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+	    _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
-+
-+	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+	    _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
-+							__cloc));
-+	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
-+							__cloc));
-+
-+	  // Check for NULL, which implies no grouping.
-+	  if (_M_data->_M_thousands_sep == '\0')
-+	    _M_data->_M_grouping = "";
-+	  else
-+	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	}
-+
-+      // NB: There is no way to extact this info from posix locales.
-+      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+      _M_data->_M_truename = "true";
-+      _M_data->_M_truename_size = 4;
-+      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+      _M_data->_M_falsename = "false";
-+      _M_data->_M_falsename_size = 5;
-+    }
-+
-+  template<>
-+    numpunct<char>::~numpunct()
-+    { delete _M_data; }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    void
-+    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __numpunct_cache<wchar_t>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_data->_M_grouping = "";
-+	  _M_data->_M_grouping_size = 0;
-+	  _M_data->_M_use_grouping = false;
-+
-+	  _M_data->_M_decimal_point = L'.';
-+	  _M_data->_M_thousands_sep = L',';
-+
-+	  // Use ctype::widen code without the facet...
-+	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
-+	    _M_data->_M_atoms_out[__i] =
-+	      static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
-+
-+	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
-+	    _M_data->_M_atoms_in[__j] =
-+	      static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
-+	}
-+      else
-+	{
-+	  // Named locale.
-+	  // NB: In the GNU model wchar_t is always 32 bit wide.
-+	  union { char *__s; wchar_t __w; } __u;
-+	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
-+	  _M_data->_M_decimal_point = __u.__w;
-+
-+	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
-+	  _M_data->_M_thousands_sep = __u.__w;
-+
-+	  if (_M_data->_M_thousands_sep == L'\0')
-+	    _M_data->_M_grouping = "";
-+	  else
-+	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
-+	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
-+	}
-+
-+      // NB: There is no way to extact this info from posix locales.
-+      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
-+      _M_data->_M_truename = L"true";
-+      _M_data->_M_truename_size = 4;
-+      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
-+      _M_data->_M_falsename = L"false";
-+      _M_data->_M_falsename_size = 5;
-+    }
-+
-+  template<>
-+    numpunct<wchar_t>::~numpunct()
-+    { delete _M_data; }
-+ #endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-new file mode 100644
-index 0000000..e0707d7
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -0,0 +1,406 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+#include <locale>
-+#include <bits/c++locale_internal.h>
-+
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning tailor for stub locale support
-+#endif
-+#ifndef __UCLIBC_HAS_XLOCALE__
-+#define __nl_langinfo_l(N, L)         nl_langinfo((N))
-+#endif
-+
-+namespace std
-+{
-+  template<>
-+    void
-+    __timepunct<char>::
-+    _M_put(char* __s, size_t __maxlen, const char* __format,
-+	   const tm* __tm) const
-+    {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
-+					_M_c_locale_timepunct);
-+#else
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_timepunct);
-+      const size_t __len = strftime(__s, __maxlen, __format, __tm);
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+#endif
-+      // Make sure __s is null terminated.
-+      if (__len == 0)
-+	__s[0] = '\0';
-+    }
-+
-+  template<>
-+    void
-+    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __timepunct_cache<char>;
-+
-+      if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_c_locale_timepunct = _S_get_c_locale();
-+
-+	  _M_data->_M_date_format = "%m/%d/%y";
-+	  _M_data->_M_date_era_format = "%m/%d/%y";
-+	  _M_data->_M_time_format = "%H:%M:%S";
-+	  _M_data->_M_time_era_format = "%H:%M:%S";
-+	  _M_data->_M_date_time_format = "";
-+	  _M_data->_M_date_time_era_format = "";
-+	  _M_data->_M_am = "AM";
-+	  _M_data->_M_pm = "PM";
-+	  _M_data->_M_am_pm_format = "";
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  _M_data->_M_day1 = "Sunday";
-+	  _M_data->_M_day2 = "Monday";
-+	  _M_data->_M_day3 = "Tuesday";
-+	  _M_data->_M_day4 = "Wednesday";
-+	  _M_data->_M_day5 = "Thursday";
-+	  _M_data->_M_day6 = "Friday";
-+	  _M_data->_M_day7 = "Saturday";
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  _M_data->_M_aday1 = "Sun";
-+	  _M_data->_M_aday2 = "Mon";
-+	  _M_data->_M_aday3 = "Tue";
-+	  _M_data->_M_aday4 = "Wed";
-+	  _M_data->_M_aday5 = "Thu";
-+	  _M_data->_M_aday6 = "Fri";
-+	  _M_data->_M_aday7 = "Sat";
-+
-+	  // Month names, starting with "C"'s January.
-+	  _M_data->_M_month01 = "January";
-+	  _M_data->_M_month02 = "February";
-+	  _M_data->_M_month03 = "March";
-+	  _M_data->_M_month04 = "April";
-+	  _M_data->_M_month05 = "May";
-+	  _M_data->_M_month06 = "June";
-+	  _M_data->_M_month07 = "July";
-+	  _M_data->_M_month08 = "August";
-+	  _M_data->_M_month09 = "September";
-+	  _M_data->_M_month10 = "October";
-+	  _M_data->_M_month11 = "November";
-+	  _M_data->_M_month12 = "December";
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  _M_data->_M_amonth01 = "Jan";
-+	  _M_data->_M_amonth02 = "Feb";
-+	  _M_data->_M_amonth03 = "Mar";
-+	  _M_data->_M_amonth04 = "Apr";
-+	  _M_data->_M_amonth05 = "May";
-+	  _M_data->_M_amonth06 = "Jun";
-+	  _M_data->_M_amonth07 = "Jul";
-+	  _M_data->_M_amonth08 = "Aug";
-+	  _M_data->_M_amonth09 = "Sep";
-+	  _M_data->_M_amonth10 = "Oct";
-+	  _M_data->_M_amonth11 = "Nov";
-+	  _M_data->_M_amonth12 = "Dec";
-+	}
-+      else
-+	{
-+	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+	  _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
-+	  _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
-+	  _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
-+	  _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
-+	  _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
-+	  _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
-+							     __cloc);
-+	  _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
-+	  _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
-+	  _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
-+	  _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
-+	  _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
-+	  _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
-+	  _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
-+	  _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
-+	  _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
-+	  _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
-+	  _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
-+	  _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
-+	  _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
-+	  _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
-+	  _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
-+
-+	  // Month names, starting with "C"'s January.
-+	  _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
-+	  _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
-+	  _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
-+	  _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
-+	  _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
-+	  _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
-+	  _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
-+	  _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
-+	  _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
-+	  _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
-+	  _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
-+	  _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
-+	  _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
-+	  _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
-+	  _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
-+	  _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
-+	  _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
-+	  _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
-+	  _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
-+	  _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
-+	  _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
-+	  _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
-+	  _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
-+	}
-+    }
-+
-+#ifdef _GLIBCXX_USE_WCHAR_T
-+  template<>
-+    void
-+    __timepunct<wchar_t>::
-+    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
-+	   const tm* __tm) const
-+    {
-+#ifdef __UCLIBC_HAS_XLOCALE__
-+      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
-+      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
-+					_M_c_locale_timepunct);
-+#else
-+      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      setlocale(LC_ALL, _M_name_timepunct);
-+      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
-+      setlocale(LC_ALL, __old);
-+      free(__old);
-+#endif
-+      // Make sure __s is null terminated.
-+      if (__len == 0)
-+	__s[0] = L'\0';
-+    }
-+
-+  template<>
-+    void
-+    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
-+    {
-+      if (!_M_data)
-+	_M_data = new __timepunct_cache<wchar_t>;
-+
-+#warning wide time stuff
-+//       if (!__cloc)
-+	{
-+	  // "C" locale
-+	  _M_c_locale_timepunct = _S_get_c_locale();
-+
-+	  _M_data->_M_date_format = L"%m/%d/%y";
-+	  _M_data->_M_date_era_format = L"%m/%d/%y";
-+	  _M_data->_M_time_format = L"%H:%M:%S";
-+	  _M_data->_M_time_era_format = L"%H:%M:%S";
-+	  _M_data->_M_date_time_format = L"";
-+	  _M_data->_M_date_time_era_format = L"";
-+	  _M_data->_M_am = L"AM";
-+	  _M_data->_M_pm = L"PM";
-+	  _M_data->_M_am_pm_format = L"";
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  _M_data->_M_day1 = L"Sunday";
-+	  _M_data->_M_day2 = L"Monday";
-+	  _M_data->_M_day3 = L"Tuesday";
-+	  _M_data->_M_day4 = L"Wednesday";
-+	  _M_data->_M_day5 = L"Thursday";
-+	  _M_data->_M_day6 = L"Friday";
-+	  _M_data->_M_day7 = L"Saturday";
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  _M_data->_M_aday1 = L"Sun";
-+	  _M_data->_M_aday2 = L"Mon";
-+	  _M_data->_M_aday3 = L"Tue";
-+	  _M_data->_M_aday4 = L"Wed";
-+	  _M_data->_M_aday5 = L"Thu";
-+	  _M_data->_M_aday6 = L"Fri";
-+	  _M_data->_M_aday7 = L"Sat";
-+
-+	  // Month names, starting with "C"'s January.
-+	  _M_data->_M_month01 = L"January";
-+	  _M_data->_M_month02 = L"February";
-+	  _M_data->_M_month03 = L"March";
-+	  _M_data->_M_month04 = L"April";
-+	  _M_data->_M_month05 = L"May";
-+	  _M_data->_M_month06 = L"June";
-+	  _M_data->_M_month07 = L"July";
-+	  _M_data->_M_month08 = L"August";
-+	  _M_data->_M_month09 = L"September";
-+	  _M_data->_M_month10 = L"October";
-+	  _M_data->_M_month11 = L"November";
-+	  _M_data->_M_month12 = L"December";
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  _M_data->_M_amonth01 = L"Jan";
-+	  _M_data->_M_amonth02 = L"Feb";
-+	  _M_data->_M_amonth03 = L"Mar";
-+	  _M_data->_M_amonth04 = L"Apr";
-+	  _M_data->_M_amonth05 = L"May";
-+	  _M_data->_M_amonth06 = L"Jun";
-+	  _M_data->_M_amonth07 = L"Jul";
-+	  _M_data->_M_amonth08 = L"Aug";
-+	  _M_data->_M_amonth09 = L"Sep";
-+	  _M_data->_M_amonth10 = L"Oct";
-+	  _M_data->_M_amonth11 = L"Nov";
-+	  _M_data->_M_amonth12 = L"Dec";
-+	}
-+#if 0
-+      else
-+	{
-+	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
-+
-+	  union { char *__s; wchar_t *__w; } __u;
-+
-+	  __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
-+	  _M_data->_M_date_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
-+	  _M_data->_M_date_era_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
-+	  _M_data->_M_time_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
-+	  _M_data->_M_time_era_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
-+	  _M_data->_M_date_time_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
-+	  _M_data->_M_date_time_era_format = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
-+	  _M_data->_M_am = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
-+	  _M_data->_M_pm = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
-+	  _M_data->_M_am_pm_format = __u.__w;
-+
-+	  // Day names, starting with "C"'s Sunday.
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
-+	  _M_data->_M_day1 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
-+	  _M_data->_M_day2 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
-+	  _M_data->_M_day3 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
-+	  _M_data->_M_day4 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
-+	  _M_data->_M_day5 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
-+	  _M_data->_M_day6 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
-+	  _M_data->_M_day7 = __u.__w;
-+
-+	  // Abbreviated day names, starting with "C"'s Sun.
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
-+	  _M_data->_M_aday1 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
-+	  _M_data->_M_aday2 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
-+	  _M_data->_M_aday3 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
-+	  _M_data->_M_aday4 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
-+	  _M_data->_M_aday5 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
-+	  _M_data->_M_aday6 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
-+	  _M_data->_M_aday7 = __u.__w;
-+
-+	  // Month names, starting with "C"'s January.
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
-+	  _M_data->_M_month01 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
-+	  _M_data->_M_month02 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
-+	  _M_data->_M_month03 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
-+	  _M_data->_M_month04 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
-+	  _M_data->_M_month05 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
-+	  _M_data->_M_month06 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
-+	  _M_data->_M_month07 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
-+	  _M_data->_M_month08 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
-+	  _M_data->_M_month09 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
-+	  _M_data->_M_month10 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
-+	  _M_data->_M_month11 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
-+	  _M_data->_M_month12 = __u.__w;
-+
-+	  // Abbreviated month names, starting with "C"'s Jan.
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
-+	  _M_data->_M_amonth01 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
-+	  _M_data->_M_amonth02 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
-+	  _M_data->_M_amonth03 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
-+	  _M_data->_M_amonth04 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
-+	  _M_data->_M_amonth05 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
-+	  _M_data->_M_amonth06 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
-+	  _M_data->_M_amonth07 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
-+	  _M_data->_M_amonth08 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
-+	  _M_data->_M_amonth09 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
-+	  _M_data->_M_amonth10 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
-+	  _M_data->_M_amonth11 = __u.__w;
-+	  __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
-+	  _M_data->_M_amonth12 = __u.__w;
-+	}
-+#endif // 0
-+    }
-+#endif
-+}
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-new file mode 100644
-index 0000000..ba8e858
---- /dev/null
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -0,0 +1,68 @@
-+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
-+
-+// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-+//
-+// This file is part of the GNU ISO C++ Library.  This library is free
-+// software; you can redistribute it and/or modify it under the
-+// terms of the GNU General Public License as published by the
-+// Free Software Foundation; either version 2, or (at your option)
-+// any later version.
-+
-+// This library is distributed in the hope that it will be useful,
-+// but WITHOUT ANY WARRANTY; without even the implied warranty of
-+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+// GNU General Public License for more details.
-+
-+// You should have received a copy of the GNU General Public License along
-+// with this library; see the file COPYING.  If not, write to the Free
-+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-+// USA.
-+
-+// As a special exception, you may use this file as part of a free software
-+// library without restriction.  Specifically, if other files instantiate
-+// templates or use macros or inline functions from this file, or you compile
-+// this file and link it with other files to produce an executable, this
-+// file does not by itself cause the resulting executable to be covered by
-+// the GNU General Public License.  This exception does not however
-+// invalidate any other reasons why the executable file might be covered by
-+// the GNU General Public License.
-+
-+//
-+// ISO C++ 14882: 22.2.5.1.2 - time_get functions
-+// ISO C++ 14882: 22.2.5.3.2 - time_put functions
-+//
-+
-+// Written by Benjamin Kosnik <bkoz@redhat.com>
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::__timepunct(size_t __refs)
-+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+    _M_name_timepunct(_S_get_c_name())
-+    { _M_initialize_timepunct(); }
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
-+    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
-+    _M_name_timepunct(_S_get_c_name())
-+    { _M_initialize_timepunct(); }
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
-+				     size_t __refs)
-+    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
-+    _M_name_timepunct(__s)
-+    {
-+      char* __tmp = new char[std::strlen(__s) + 1];
-+      std::strcpy(__tmp, __s);
-+      _M_name_timepunct = __tmp;
-+      _M_initialize_timepunct(__cloc);
-+    }
-+
-+  template<typename _CharT>
-+    __timepunct<_CharT>::~__timepunct()
-+    {
-+      if (_M_name_timepunct != _S_get_c_name())
-+	delete [] _M_name_timepunct;
-+      delete _M_data;
-+      _S_destroy_c_locale(_M_c_locale_timepunct);
-+    }
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index f5b28f4..fbad667 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -15913,6 +15913,9 @@ fi
-   # Default to "generic".
-   if test $enable_clocale_flag = auto; then
-     case ${target_os} in
-+      *-uclibc*)
-+        enable_clocale_flag=uclibc
-+        ;;
-       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
- 	enable_clocale_flag=gnu
- 	;;
-@@ -16191,6 +16194,78 @@ $as_echo "newlib" >&6; }
-       CTIME_CC=config/locale/generic/time_members.cc
-       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
-       ;;
-+    uclibc)
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5
-+$as_echo "uclibc" >&6; }
-+
-+      # Declare intention to use gettext, and add support for specific
-+      # languages.
-+      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
-+      ALL_LINGUAS="de fr"
-+
-+      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
-+      # Extract the first word of "msgfmt", so it can be a program name with args.
-+set dummy msgfmt; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if test "${ac_cv_prog_check_msgfmt+set}" = set; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  if test -n "$check_msgfmt"; then
-+  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
-+    ac_cv_prog_check_msgfmt="yes"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
-+
-+  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
-+fi
-+fi
-+check_msgfmt=$ac_cv_prog_check_msgfmt
-+if test -n "$check_msgfmt"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5
-+$as_echo "$check_msgfmt" >&6; }
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
-+
-+
-+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
-+        USE_NLS=yes
-+      fi
-+      # Export the build objects.
-+      for ling in $ALL_LINGUAS; do \
-+        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
-+        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
-+      done
-+
-+
-+
-+      CLOCALE_H=config/locale/uclibc/c_locale.h
-+      CLOCALE_CC=config/locale/uclibc/c_locale.cc
-+      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
-+      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
-+      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
-+      CMESSAGES_H=config/locale/uclibc/messages_members.h
-+      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
-+      CMONEY_CC=config/locale/uclibc/monetary_members.cc
-+      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
-+      CTIME_H=config/locale/uclibc/time_members.h
-+      CTIME_CC=config/locale/uclibc/time_members.cc
-+      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
-+      ;;
-   esac
- 
-   # This is where the testsuite looks for locale catalogs, using the
-diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
-index 06b5d47..7d3f835 100644
---- a/libstdc++-v3/include/c_compatibility/wchar.h
-+++ b/libstdc++-v3/include/c_compatibility/wchar.h
-@@ -101,7 +101,9 @@ using std::wmemcmp;
- using std::wmemcpy;
- using std::wmemmove;
- using std::wmemset;
-+#if _GLIBCXX_HAVE_WCSFTIME
- using std::wcsftime;
-+#endif
- 
- #if _GLIBCXX_USE_C99
- using std::wcstold;
-diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
-index aa1b2fa..45c4617 100644
---- a/libstdc++-v3/include/c_std/cwchar
-+++ b/libstdc++-v3/include/c_std/cwchar
-@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
-   using ::wcscoll;
-   using ::wcscpy;
-   using ::wcscspn;
-+#if _GLIBCXX_HAVE_WCSFTIME
-   using ::wcsftime;
-+#endif
-   using ::wcslen;
-   using ::wcsncat;
-   using ::wcsncmp;
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0005-uclibc-locale-no__x.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0005-uclibc-locale-no__x.patch
deleted file mode 100644
index ac053ea..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0005-uclibc-locale-no__x.patch
+++ /dev/null
@@ -1,257 +0,0 @@
-From a8e683917a3e8a6642639e65c06d4d4fc46cc8ab Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:42:36 +0400
-Subject: [PATCH 05/35] uclibc-locale-no__x
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h      | 45 ++++++++++++++++++++++
- libstdc++-v3/config/locale/uclibc/c_locale.cc      | 14 -------
- libstdc++-v3/config/locale/uclibc/c_locale.h       |  1 +
- .../config/locale/uclibc/collate_members.cc        |  7 ----
- libstdc++-v3/config/locale/uclibc/ctype_members.cc |  7 ----
- .../config/locale/uclibc/messages_members.cc       |  7 +---
- .../config/locale/uclibc/messages_members.h        | 18 ++++-----
- .../config/locale/uclibc/monetary_members.cc       |  4 --
- .../config/locale/uclibc/numeric_members.cc        |  3 --
- libstdc++-v3/config/locale/uclibc/time_members.cc  |  3 --
- 10 files changed, 55 insertions(+), 54 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index 2ae3e4a..e74fddf 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
- extern "C" __typeof(wctype_l) __wctype_l;
- #endif
- 
-+# define __nl_langinfo_l nl_langinfo_l
-+# define __strcoll_l strcoll_l
-+# define __strftime_l strftime_l
-+# define __strtod_l strtod_l
-+# define __strtof_l strtof_l
-+# define __strtold_l strtold_l
-+# define __strxfrm_l strxfrm_l
-+# define __newlocale newlocale
-+# define __freelocale freelocale
-+# define __duplocale duplocale
-+# define __uselocale uselocale
-+
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+#  define __iswctype_l iswctype_l
-+#  define __towlower_l towlower_l
-+#  define __towupper_l towupper_l
-+#  define __wcscoll_l wcscoll_l
-+#  define __wcsftime_l wcsftime_l
-+#  define __wcsxfrm_l wcsxfrm_l
-+#  define __wctype_l wctype_l
-+# endif
-+
-+#else
-+# define __nl_langinfo_l(N, L)       nl_langinfo((N))
-+# define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
-+# define __strtod_l(S, E, L)         strtod((S), (E))
-+# define __strtof_l(S, E, L)         strtof((S), (E))
-+# define __strtold_l(S, E, L)        strtold((S), (E))
-+# define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
-+# warning should dummy __newlocale check for C|POSIX ?
-+# define __newlocale(a, b, c)        NULL
-+# define __freelocale(a)             ((void)0)
-+# define __duplocale(a)              __c_locale()
-+//# define __uselocale ?
-+//
-+# ifdef _GLIBCXX_USE_WCHAR_T
-+#  define __iswctype_l(C, M, L)       iswctype((C), (M))
-+#  define __towlower_l(C, L)          towlower((C))
-+#  define __towupper_l(C, L)          towupper((C))
-+#  define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
-+//#  define __wcsftime_l(S, M, F, T, L)  wcsftime((S), (M), (F), (T))
-+#  define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
-+#  define __wctype_l(S, L)            wctype((S))
-+# endif
-+
- #endif // GLIBC 2.3 and later
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 5081dc1..21430d0 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,20 +39,6 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
- 
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
--#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
--#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
--#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
--#define __strtof_l(S, E, L)         strtof((S), (E))
--#define __strtod_l(S, E, L)         strtod((S), (E))
--#define __strtold_l(S, E, L)        strtold((S), (E))
--#warning should dummy __newlocale check for C|POSIX ?
--#define __newlocale(a, b, c)        NULL
--#define __freelocale(a)             ((void)0)
--#define __duplocale(a)              __c_locale()
--#endif
--
- namespace std
- {
-   template<>
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index da07c1f..4bca5f1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -68,6 +68,7 @@ namespace __gnu_cxx
- {
-   extern "C" __typeof(uselocale) __uselocale;
- }
-+#define __uselocale uselocale
- #endif
- 
- namespace std
-diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-index c2664a7..ec5c329 100644
---- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
-@@ -36,13 +36,6 @@
- #include <locale>
- #include <bits/c++locale_internal.h>
- 
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
--#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
--#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
--#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
--#endif
--
- namespace std
- {
-   // These are basically extensions to char_traits, and perhaps should
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7294e3a..7b12861 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -38,13 +38,6 @@
- #undef _LIBC
- #include <bits/c++locale_internal.h>
- 
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __wctype_l(S, L)           wctype((S))
--#define __towupper_l(C, L)         towupper((C))
--#define __towlower_l(C, L)         towlower((C))
--#define __iswctype_l(C, M, L)      iswctype((C), (M))
--#endif
--
- namespace std
- {
-   // NB: The other ctype<char> specializations are in src/locale.cc and
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-index 13594d9..d7693b4 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
-@@ -39,13 +39,10 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix gettext stuff
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__dcgettext(const char *domainname,
--			     const char *msgid, int category);
- #undef gettext
--#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
-+#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
- #else
--#undef gettext
- #define gettext(msgid) (msgid)
- #endif
- 
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index 1424078..d89da33 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -36,15 +36,11 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix prototypes for *textdomain funcs
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--extern "C" char *__textdomain(const char *domainname);
--extern "C" char *__bindtextdomain(const char *domainname,
--				  const char *dirname);
--#else
--#undef __textdomain
--#undef __bindtextdomain
--#define __textdomain(D)           ((void)0)
--#define __bindtextdomain(D,P)     ((void)0)
-+#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
-+#undef textdomain
-+#undef bindtextdomain
-+#define textdomain(D)           ((void)0)
-+#define bindtextdomain(D,P)     ((void)0)
- #endif
- 
-   // Non-virtual member functions.
-@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
-     messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
- 			   const char* __dir) const
-     {
--      __bindtextdomain(__s.c_str(), __dir);
-+      bindtextdomain(__s.c_str(), __dir);
-       return this->do_open(__s, __loc);
-     }
- 
-@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
-     {
-       // No error checking is done, assume the catalog exists and can
-       // be used.
--      __textdomain(__s.c_str());
-+      textdomain(__s.c_str());
-       return 0;
-     }
- 
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index aa52731..2e6f80a 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -43,10 +43,6 @@
- #warning tailor for stub locale support
- #endif
- 
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L)         nl_langinfo((N))
--#endif
--
- namespace std
- {
-   // Construct and return valid pattern consisting of some combination of:
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 883ec1a..2c70642 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -41,9 +41,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L)         nl_langinfo((N))
--#endif
- 
- namespace std
- {
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index e0707d7..d848ed5 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -40,9 +40,6 @@
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning tailor for stub locale support
- #endif
--#ifndef __UCLIBC_HAS_XLOCALE__
--#define __nl_langinfo_l(N, L)         nl_langinfo((N))
--#endif
- 
- namespace std
- {
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0006-uclibc-locale-wchar_fix.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0006-uclibc-locale-wchar_fix.patch
deleted file mode 100644
index 9112a2b..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0006-uclibc-locale-wchar_fix.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From cdb9e9c9440beb59bc20476eea5a9cf2538cd194 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:45:57 +0400
-Subject: [PATCH 06/35] uclibc-locale-wchar_fix
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/config/locale/uclibc/monetary_members.cc |  4 ++--
- libstdc++-v3/config/locale/uclibc/numeric_members.cc  | 13 +++++++++++++
- 2 files changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 2e6f80a..31ebb9f 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -401,7 +401,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-@@ -556,7 +556,7 @@ namespace std
- # ifdef __UCLIBC_HAS_XLOCALE__
- 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
- 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
--# else
-+# elif defined __UCLIBC_HAS_LOCALE__
- 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
- 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
- # endif
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index 2c70642..d5c8961 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -127,12 +127,25 @@ namespace std
- 	{
- 	  // Named locale.
- 	  // NB: In the GNU model wchar_t is always 32 bit wide.
-+#ifdef __UCLIBC_MJN3_ONLY__
-+#warning fix this... should be numeric
-+#endif
-+#ifdef __UCLIBC__
-+# ifdef __UCLIBC_HAS_XLOCALE__
-+	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
-+# elif defined __UCLIBC_HAS_LOCALE__
-+	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
-+	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
-+# endif
-+#else
- 	  union { char *__s; wchar_t __w; } __u;
- 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
- 	  _M_data->_M_decimal_point = __u.__w;
- 
- 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
- 	  _M_data->_M_thousands_sep = __u.__w;
-+#endif
- 
- 	  if (_M_data->_M_thousands_sep == L'\0')
- 	    _M_data->_M_grouping = "";
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0007-uclibc-locale-update.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0007-uclibc-locale-update.patch
deleted file mode 100644
index 728b790..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0007-uclibc-locale-update.patch
+++ /dev/null
@@ -1,542 +0,0 @@
-From 244b9d1b5cc6d5382935192998531ee70afb262d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:46:58 +0400
-Subject: [PATCH 07/35] uclibc-locale-update
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- .../config/locale/uclibc/c++locale_internal.h      |  3 +
- libstdc++-v3/config/locale/uclibc/c_locale.cc      | 74 ++++++++++------------
- libstdc++-v3/config/locale/uclibc/c_locale.h       | 42 ++++++------
- libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 +++++++++++----
- .../config/locale/uclibc/messages_members.h        | 12 ++--
- .../config/locale/uclibc/monetary_members.cc       | 34 ++++++----
- .../config/locale/uclibc/numeric_members.cc        |  5 ++
- libstdc++-v3/config/locale/uclibc/time_members.cc  | 18 ++++--
- libstdc++-v3/config/locale/uclibc/time_members.h   | 17 +++--
- 9 files changed, 158 insertions(+), 98 deletions(-)
-
-diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-index e74fddf..971a6b4 100644
---- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-+++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
-@@ -31,6 +31,9 @@
- 
- #include <bits/c++config.h>
- #include <clocale>
-+#include <cstdlib>
-+#include <cstring>
-+#include <cstddef>
- 
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning clean this up
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-index 21430d0..1b9d8e1 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
-@@ -39,23 +39,20 @@
- #include <langinfo.h>
- #include <bits/c++locale_internal.h>
- 
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
-   template<>
-     void
-     __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
- 		   const __c_locale& __cloc)
-     {
--      if (!(__err & ios_base::failbit))
--	{
--	  char* __sanity;
--	  errno = 0;
--	  float __f = __strtof_l(__s, &__sanity, __cloc);
--          if (__sanity != __s && errno != ERANGE)
--	    __v = __f;
--	  else
--	    __err |= ios_base::failbit;
--	}
-+      char* __sanity;
-+      errno = 0;
-+      float __f = __strtof_l(__s, &__sanity, __cloc);
-+      if (__sanity != __s && errno != ERANGE)
-+	__v = __f;
-+      else
-+	__err |= ios_base::failbit;
-     }
- 
-   template<>
-@@ -63,16 +60,13 @@ namespace std
-     __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
- 		   const __c_locale& __cloc)
-     {
--      if (!(__err & ios_base::failbit))
--	{
--	  char* __sanity;
--	  errno = 0;
--	  double __d = __strtod_l(__s, &__sanity, __cloc);
--          if (__sanity != __s && errno != ERANGE)
--	    __v = __d;
--	  else
--	    __err |= ios_base::failbit;
--	}
-+      char* __sanity;
-+      errno = 0;
-+      double __d = __strtod_l(__s, &__sanity, __cloc);
-+      if (__sanity != __s && errno != ERANGE)
-+	__v = __d;
-+      else
-+	__err |= ios_base::failbit;
-     }
- 
-   template<>
-@@ -80,16 +74,13 @@ namespace std
-     __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
- 		   const __c_locale& __cloc)
-     {
--      if (!(__err & ios_base::failbit))
--	{
--	  char* __sanity;
--	  errno = 0;
--	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
--          if (__sanity != __s && errno != ERANGE)
--	    __v = __ld;
--	  else
--	    __err |= ios_base::failbit;
--	}
-+      char* __sanity;
-+      errno = 0;
-+      long double __ld = __strtold_l(__s, &__sanity, __cloc);
-+      if (__sanity != __s && errno != ERANGE)
-+	__v = __ld;
-+      else
-+	__err |= ios_base::failbit;
-     }
- 
-   void
-@@ -110,17 +101,18 @@ namespace std
-   void
-   locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
-   {
--    if (_S_get_c_locale() != __cloc)
-+    if (__cloc && _S_get_c_locale() != __cloc)
-       __freelocale(__cloc);
-   }
- 
-   __c_locale
-   locale::facet::_S_clone_c_locale(__c_locale& __cloc)
-   { return __duplocale(__cloc); }
--} // namespace std
- 
--namespace __gnu_cxx
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
-+
-   const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
-     {
-       "LC_CTYPE",
-@@ -138,9 +130,11 @@ namespace __gnu_cxx
-       "LC_IDENTIFICATION"
- #endif
-     };
--}
- 
--namespace std
--{
-+_GLIBCXX_END_NAMESPACE
-+
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
-   const char* const* const locale::_S_categories = __gnu_cxx::category_names;
--}  // namespace std
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
-index 4bca5f1..64a6d46 100644
---- a/libstdc++-v3/config/locale/uclibc/c_locale.h
-+++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
-@@ -39,21 +39,23 @@
- #pragma GCC system_header
- 
- #include <cstring>              // get std::strlen
--#include <cstdio>               // get std::snprintf or std::sprintf
-+#include <cstdio>               // get std::vsnprintf or std::vsprintf
- #include <clocale>
- #include <langinfo.h>		// For codecvt
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning fix this
- #endif
--#ifdef __UCLIBC_HAS_LOCALE__
-+#ifdef _GLIBCXX_USE_ICONV
- #include <iconv.h>		// For codecvt using iconv, iconv_t
- #endif
--#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
--#include <libintl.h> 		// For messages
-+#ifdef HAVE_LIBINTL_H
-+#include <libintl.h>		// For messages
- #endif
-+#include <cstdarg>
- 
- #ifdef __UCLIBC_MJN3_ONLY__
- #warning what is _GLIBCXX_C_LOCALE_GNU for
-+// psm: used in os/gnu-linux/ctype_noninline.h
- #endif
- #define _GLIBCXX_C_LOCALE_GNU 1
- 
-@@ -78,23 +80,25 @@ namespace std
- #else
-   typedef int*			__c_locale;
- #endif
--
--  // Convert numeric value of type _Tv to string and return length of
--  // string.  If snprintf is available use it, otherwise fall back to
--  // the unsafe sprintf which, in general, can be dangerous and should
-+  // Convert numeric value of type double to string and return length of
-+  // string.  If vsnprintf is available use it, otherwise fall back to
-+  // the unsafe vsprintf which, in general, can be dangerous and should
-   // be avoided.
--  template<typename _Tv>
--    int
--    __convert_from_v(char* __out,
--		     const int __size __attribute__ ((__unused__)),
--		     const char* __fmt,
--#ifdef __UCLIBC_HAS_XCLOCALE__
--		     _Tv __v, const __c_locale& __cloc, int __prec)
-+    inline int
-+    __convert_from_v(const __c_locale&
-+#ifndef __UCLIBC_HAS_XCLOCALE__
-+	__cloc __attribute__ ((__unused__))
-+#endif
-+		     ,
-+		     char* __out,
-+		     const int __size,
-+		     const char* __fmt, ...)
-     {
-+      va_list __args;
-+#ifdef __UCLIBC_HAS_XCLOCALE__
-+
-       __c_locale __old = __gnu_cxx::__uselocale(__cloc);
- #else
--		     _Tv __v, const __c_locale&, int __prec)
--    {
- # ifdef __UCLIBC_HAS_LOCALE__
-       char* __old = std::setlocale(LC_ALL, NULL);
-       char* __sav = new char[std::strlen(__old) + 1];
-@@ -103,7 +107,9 @@ namespace std
- # endif
- #endif
- 
--      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
-+      va_start(__args, __fmt);
-+      const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
-+      va_end(__args);
- 
- #ifdef __UCLIBC_HAS_XCLOCALE__
-       __gnu_cxx::__uselocale(__old);
-diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-index 7b12861..13e011d 100644
---- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
-@@ -33,16 +33,20 @@
- 
- // Written by Benjamin Kosnik <bkoz@redhat.com>
- 
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
- 
--namespace std
--{
-+_GLIBCXX_BEGIN_NAMESPACE(std)
-+
-   // NB: The other ctype<char> specializations are in src/locale.cc and
-   // various /config/os/* files.
--  template<>
-     ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
-     : ctype<char>(0, false, __refs)
-     {
-@@ -57,6 +61,8 @@ namespace std
- #endif
- 	}
-     }
-+    ctype_byname<char>::~ctype_byname()
-+    { }
- 
- #ifdef _GLIBCXX_USE_WCHAR_T
-   ctype<wchar_t>::__wmask_type
-@@ -138,17 +144,33 @@ namespace std
-   ctype<wchar_t>::
-   do_is(mask __m, wchar_t __c) const
-   {
--    // Highest bitmask in ctype_base == 10, but extra in "C"
--    // library for blank.
-+    // The case of __m == ctype_base::space is particularly important,
-+    // due to its use in many istream functions.  Therefore we deal with
-+    // it first, exploiting the knowledge that on GNU systems _M_bit[5]
-+    // is the mask corresponding to ctype_base::space.  NB: an encoding
-+    // change would not affect correctness!
-+
-     bool __ret = false;
--    const size_t __bitmasksize = 11;
--    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
--      if (__m & _M_bit[__bitcur]
--	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
--	{
--	  __ret = true;
--	  break;
--	}
-+    if (__m == _M_bit[5])
-+      __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
-+    else
-+      {
-+	// Highest bitmask in ctype_base == 10, but extra in "C"
-+	// library for blank.
-+	const size_t __bitmasksize = 11;
-+	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
-+	  if (__m & _M_bit[__bitcur])
-+	    {
-+	      if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
-+		{
-+		  __ret = true;
-+		  break;
-+		}
-+	      else if (__m == _M_bit[__bitcur])
-+		break;
-+	    }
-+      }
-+
-     return __ret;
-   }
- 
-@@ -290,4 +312,5 @@ namespace std
- #endif
-   }
- #endif //  _GLIBCXX_USE_WCHAR_T
--}
-+
-+_GLIBCXX_END_NAMESPACE
-diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
-index d89da33..067657a 100644
---- a/libstdc++-v3/config/locale/uclibc/messages_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
-@@ -53,12 +53,16 @@
-   template<typename _CharT>
-      messages<_CharT>::messages(__c_locale __cloc, const char* __s,
- 				size_t __refs)
--     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
--     _M_name_messages(__s)
-+     : facet(__refs), _M_c_locale_messages(NULL),
-+     _M_name_messages(NULL)
-      {
--       char* __tmp = new char[std::strlen(__s) + 1];
--       std::strcpy(__tmp, __s);
-+       const size_t __len = std::strlen(__s) + 1;
-+       char* __tmp = new char[__len];
-+       std::memcpy(__tmp, __s, __len);
-        _M_name_messages = __tmp;
-+
-+       // Last to avoid leaking memory if new throws.
-+       _M_c_locale_messages = _S_clone_c_locale(__cloc);
-      }
- 
-   template<typename _CharT>
-diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-index 31ebb9f..7679b9c 100644
---- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
-@@ -33,9 +33,14 @@
- 
- // Written by Benjamin Kosnik <bkoz@redhat.com>
- 
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
- 
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -206,7 +211,7 @@ namespace std
- 	  }
- 	break;
-       default:
--	;
-+	__ret = pattern();
-       }
-     return __ret;
-   }
-@@ -390,7 +395,9 @@ namespace std
- 	  __c_locale __old = __uselocale(__cloc);
- #else
- 	  // Switch to named locale so that mbsrtowcs will work.
--	  char* __old = strdup(setlocale(LC_ALL, NULL));
-+  	  char* __old = setlocale(LC_ALL, NULL);
-+          const size_t __llen = strlen(__old) + 1;
-+          char* __sav = new char[__llen];
- 	  setlocale(LC_ALL, __name);
- #endif
- 
-@@ -477,8 +484,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- 	      __uselocale(__old);
- #else
--	      setlocale(LC_ALL, __old);
--	      free(__old);
-+	      setlocale(LC_ALL, __sav);
-+	      delete [] __sav;
- #endif
- 	      __throw_exception_again;
- 	    }
-@@ -498,8 +505,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- 	  __uselocale(__old);
- #else
--	  setlocale(LC_ALL, __old);
--	  free(__old);
-+	  setlocale(LC_ALL, __sav);
-+	  delete [] __sav;
- #endif
- 	}
-     }
-@@ -545,8 +552,11 @@ namespace std
- 	  __c_locale __old = __uselocale(__cloc);
- #else
- 	  // Switch to named locale so that mbsrtowcs will work.
--	  char* __old = strdup(setlocale(LC_ALL, NULL));
--	  setlocale(LC_ALL, __name);
-+          char* __old = setlocale(LC_ALL, NULL);
-+          const size_t __llen = strlen(__old) + 1;
-+          char* __sav = new char[__llen];
-+          memcpy(__sav, __old, __llen);
-+          setlocale(LC_ALL, __name);
- #endif
- 
- #ifdef __UCLIBC_MJN3_ONLY__
-@@ -633,8 +643,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- 	      __uselocale(__old);
- #else
--	      setlocale(LC_ALL, __old);
--	      free(__old);
-+	      setlocale(LC_ALL, __sav);
-+	      delete [] __sav;
- #endif
-               __throw_exception_again;
- 	    }
-@@ -653,8 +663,8 @@ namespace std
- #ifdef __UCLIBC_HAS_XLOCALE__
- 	  __uselocale(__old);
- #else
--	  setlocale(LC_ALL, __old);
--	  free(__old);
-+	  setlocale(LC_ALL, __sav);
-+	  delete [] __sav;
- #endif
- 	}
-     }
-diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-index d5c8961..8ae8969 100644
---- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
-@@ -33,9 +33,14 @@
- 
- // Written by Benjamin Kosnik <bkoz@redhat.com>
- 
-+#include <features.h>
-+#ifdef __UCLIBC_HAS_LOCALE__
- #define _LIBC
- #include <locale>
- #undef _LIBC
-+#else
-+#include <locale>
-+#endif
- #include <bits/c++locale_internal.h>
- 
- #ifdef __UCLIBC_MJN3_ONLY__
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
-index d848ed5..f24d53e 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.cc
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
-@@ -53,11 +53,14 @@ namespace std
-       const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
- 					_M_c_locale_timepunct);
- #else
--      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      char* __old = setlocale(LC_ALL, NULL);
-+      const size_t __llen = strlen(__old) + 1;
-+      char* __sav = new char[__llen];
-+      memcpy(__sav, __old, __llen);
-       setlocale(LC_ALL, _M_name_timepunct);
-       const size_t __len = strftime(__s, __maxlen, __format, __tm);
--      setlocale(LC_ALL, __old);
--      free(__old);
-+      setlocale(LC_ALL, __sav);
-+      delete [] __sav;
- #endif
-       // Make sure __s is null terminated.
-       if (__len == 0)
-@@ -207,11 +210,14 @@ namespace std
-       const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
- 					_M_c_locale_timepunct);
- #else
--      char* __old = strdup(setlocale(LC_ALL, NULL));
-+      char* __old = setlocale(LC_ALL, NULL);
-+      const size_t __llen = strlen(__old) + 1;
-+      char* __sav = new char[__llen];
-+      memcpy(__sav, __old, __llen);
-       setlocale(LC_ALL, _M_name_timepunct);
-       const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
--      setlocale(LC_ALL, __old);
--      free(__old);
-+      setlocale(LC_ALL, __sav);
-+      delete [] __sav;
- #endif
-       // Make sure __s is null terminated.
-       if (__len == 0)
-diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
-index ba8e858..1665dde 100644
---- a/libstdc++-v3/config/locale/uclibc/time_members.h
-+++ b/libstdc++-v3/config/locale/uclibc/time_members.h
-@@ -50,12 +50,21 @@
-     __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
- 				     size_t __refs)
-     : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
--    _M_name_timepunct(__s)
-+    _M_name_timepunct(NULL)
-     {
--      char* __tmp = new char[std::strlen(__s) + 1];
--      std::strcpy(__tmp, __s);
-+      const size_t __len = std::strlen(__s) + 1;
-+      char* __tmp = new char[__len];
-+      std::memcpy(__tmp, __s, __len);
-       _M_name_timepunct = __tmp;
--      _M_initialize_timepunct(__cloc);
-+
-+      try
-+	{ _M_initialize_timepunct(__cloc); }
-+      catch(...)
-+	{
-+	  delete [] _M_name_timepunct;
-+	  __throw_exception_again;
-+	}
-+
-     }
- 
-   template<typename _CharT>
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0008-missing-execinfo_h.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0008-missing-execinfo_h.patch
deleted file mode 100644
index b2f6b18..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0008-missing-execinfo_h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 0a80f60de08bd5829ca1b3758f70a92b61dda143 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:48:10 +0400
-Subject: [PATCH 08/35] missing-execinfo_h
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- boehm-gc/include/gc.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
-index 6b38f2d..fca98ff 100644
---- a/boehm-gc/include/gc.h
-+++ b/boehm-gc/include/gc.h
-@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
- #if defined(__linux__) || defined(__GLIBC__)
- # include <features.h>
- # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
--     && !defined(__ia64__)
-+     && !defined(__ia64__) && !defined(__UCLIBC__)
- #   ifndef GC_HAVE_BUILTIN_BACKTRACE
- #     define GC_HAVE_BUILTIN_BACKTRACE
- #   endif
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0009-c99-snprintf.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0009-c99-snprintf.patch
deleted file mode 100644
index 525b2a1..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0009-c99-snprintf.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 7b7caf4305a54fa4dfdd0efd5bd41cb94cbcf43d Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:49:03 +0400
-Subject: [PATCH 09/35] c99-snprintf
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libstdc++-v3/include/c_std/cstdio | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
-index 37f01ca..f00c06d 100644
---- a/libstdc++-v3/include/c_std/cstdio
-+++ b/libstdc++-v3/include/c_std/cstdio
-@@ -144,7 +144,7 @@ namespace std
-   using ::vsprintf;
- } // namespace std
- 
--#if _GLIBCXX_USE_C99
-+#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
- 
- #undef snprintf
- #undef vfscanf
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0010-gcc-poison-system-directories.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0010-gcc-poison-system-directories.patch
deleted file mode 100644
index 4e02ef8..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0010-gcc-poison-system-directories.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-From d1e85a363ffcd259e9b0841b85ca10af2f31bd72 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 08:59:00 +0400
-Subject: [PATCH 10/35] gcc: poison-system-directories
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [distribution: codesourcery]
----
- gcc/common.opt      |  4 ++++
- gcc/config.in       |  6 ++++++
- gcc/configure       | 16 ++++++++++++++++
- gcc/configure.ac    | 10 ++++++++++
- gcc/doc/invoke.texi |  9 +++++++++
- gcc/gcc.c           |  2 ++
- gcc/incpath.c       | 19 +++++++++++++++++++
- 7 files changed, 66 insertions(+)
-
-diff --git a/gcc/common.opt b/gcc/common.opt
-index b49ac46..783d231 100644
---- a/gcc/common.opt
-+++ b/gcc/common.opt
-@@ -623,6 +623,10 @@ Wreturn-local-addr
- Common Var(warn_return_local_addr) Init(1) Warning
- Warn about returning a pointer/reference to a local or temporary variable.
- 
-+Wpoison-system-directories
-+Common Var(flag_poison_system_directories) Init(1) Warning
-+Warn for -I and -L options using system directories if cross compiling
-+
- Wshadow
- Common Var(warn_shadow) Warning
- Warn when one local variable shadows another
-diff --git a/gcc/config.in b/gcc/config.in
-index f2ed301..f290c6b 100644
---- a/gcc/config.in
-+++ b/gcc/config.in
-@@ -168,6 +168,12 @@
- #endif
- 
- 
-+/* Define to warn for use of native system header directories */
-+#ifndef USED_FOR_TARGET
-+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
-+#endif
-+
-+
- /* Define if you want all operations on RTL (the basic data structure of the
-    optimizer and back end) to be checked for dynamic type safety at runtime.
-    This is quite expensive. */
-diff --git a/gcc/configure b/gcc/configure
-index 9523773..181748e 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -932,6 +932,7 @@ with_system_zlib
- enable_maintainer_mode
- enable_link_mutex
- enable_version_specific_runtime_libs
-+enable_poison_system_directories
- enable_plugin
- enable_host_shared
- enable_libquadmath_support
-@@ -1661,6 +1662,8 @@ Optional Features:
-   --enable-version-specific-runtime-libs
-                           specify that runtime libraries should be installed
-                           in a compiler-specific directory
-+  --enable-poison-system-directories
-+                          warn for use of native system header directories
-   --enable-plugin         enable plugin support
-   --enable-host-shared    build host code as shared libraries
-   --disable-libquadmath-support
-@@ -28087,6 +28090,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
- fi
- 
- 
-+# Check whether --enable-poison-system-directories was given.
-+if test "${enable_poison_system_directories+set}" = set; then :
-+  enableval=$enable_poison_system_directories;
-+else
-+  enable_poison_system_directories=no
-+fi
-+
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+
-+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
-+
-+fi
-+
- # Substitute configuration variables
- 
- 
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 68b0ee8..8b07078 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5571,6 +5571,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
-                 [specify that runtime libraries should be
-                  installed in a compiler-specific directory])])
- 
-+AC_ARG_ENABLE([poison-system-directories],
-+             AS_HELP_STRING([--enable-poison-system-directories],
-+                            [warn for use of native system header directories]),,
-+             [enable_poison_system_directories=no])
-+if test "x${enable_poison_system_directories}" = "xyes"; then
-+  AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
-+           [1],
-+           [Define to warn for use of native system header directories])
-+fi
-+
- # Substitute configuration variables
- AC_SUBST(subdirs)
- AC_SUBST(srcdir)
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 520c2c5..0df8a47 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -269,6 +269,7 @@ Objective-C and Objective-C++ Dialects}.
- -Woverlength-strings  -Wpacked  -Wpacked-bitfield-compat  -Wpadded @gol
- -Wparentheses  -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
- -Wpointer-arith  -Wno-pointer-to-int-cast @gol
-+-Wno-poison-system-directories @gol
- -Wredundant-decls  -Wno-return-local-addr @gol
- -Wreturn-type  -Wsequence-point  -Wshadow  -Wno-shadow-ivar @gol
- -Wshift-count-negative -Wshift-count-overflow @gol
-@@ -4432,6 +4433,14 @@ made up of data only and thus requires no special treatment.  But, for
- most targets, it is made up of code and thus requires the stack to be
- made executable in order for the program to work properly.
- 
-+@item -Wno-poison-system-directories
-+@opindex Wno-poison-system-directories
-+Do not warn for @option{-I} or @option{-L} options using system
-+directories such as @file{/usr/include} when cross compiling.  This
-+option is intended for use in chroot environments when such
-+directories contain the correct headers and libraries for the target
-+system rather than the host.
-+
- @item -Wfloat-equal
- @opindex Wfloat-equal
- @opindex Wno-float-equal
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index d956c36..675bcc1 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -835,6 +835,8 @@ proper position among the other output files.  */
-    "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
-    "%X %{o*} %{e*} %{N} %{n} %{r}\
-     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \
-+    %{Wno-poison-system-directories:--no-poison-system-directories}\
-+    %{Werror=poison-system-directories:--error-poison-system-directories}\
-     %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
-     " CHKP_SPEC " \
-     %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index 6c54ca6..cc0c921 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -28,6 +28,7 @@
- #include "intl.h"
- #include "incpath.h"
- #include "cppdefault.h"
-+#include "diagnostic-core.h"
- 
- /* Microsoft Windows does not natively support inodes.
-    VMS has non-numeric inodes.  */
-@@ -383,6 +384,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
- 	}
-       fprintf (stderr, _("End of search list.\n"));
-     }
-+
-+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
-+  if (flag_poison_system_directories)
-+    {
-+       struct cpp_dir *p;
-+
-+       for (p = heads[QUOTE]; p; p = p->next)
-+         {
-+          if ((!strncmp (p->name, "/usr/include", 12))
-+              || (!strncmp (p->name, "/usr/local/include", 18))
-+              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+            warning (OPT_Wpoison_system_directories,
-+                     "include location \"%s\" is unsafe for "
-+                     "cross-compilation",
-+                     p->name);
-+         }
-+    }
-+#endif
- }
- 
- /* Use given -I paths for #include "..." but not #include <...>, and
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0011-gcc-poison-dir-extend.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0011-gcc-poison-dir-extend.patch
deleted file mode 100644
index 067d985..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0011-gcc-poison-dir-extend.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From f158fcc084e88b1d8d1ecf5b005d377765aef16e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:00:34 +0400
-Subject: [PATCH 11/35] gcc-poison-dir-extend
-
-Add /sw/include and /opt/include based on the original
-zecke-no-host-includes.patch patch.  The original patch checked for
-/usr/include, /sw/include and /opt/include and then triggered a failure and
-aborted.
-
-Instead, we add the two missing items to the current scan.  If the user
-wants this to be a failure, they can add "-Werror=poison-system-directories".
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/incpath.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/incpath.c b/gcc/incpath.c
-index cc0c921..0bc1f67 100644
---- a/gcc/incpath.c
-+++ b/gcc/incpath.c
-@@ -394,7 +394,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
-          {
-           if ((!strncmp (p->name, "/usr/include", 12))
-               || (!strncmp (p->name, "/usr/local/include", 18))
--              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
-+              || (!strncmp (p->name, "/usr/X11R6/include", 18))
-+              || (!strncmp (p->name, "/sw/include", 11))
-+              || (!strncmp (p->name, "/opt/include", 12)))
-             warning (OPT_Wpoison_system_directories,
-                      "include location \"%s\" is unsafe for "
-                      "cross-compilation",
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
deleted file mode 100644
index befca73..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From a54239cbdc6f93c6d74ea6b078f1470770c4f5aa Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:08:31 +0400
-Subject: [PATCH 12/35] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
-
-Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
-
-This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
-
-Other changes I had to do include:
-
-- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
-
-- passing the right CFLAGS to configure scripts as exported environment variables
-
-I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
-
-Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
-
-Signed-off-by: Paolo Bonzini  <bonzini@gnu.org>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- configure | 32 ++++++++++++++++++++++++++++++++
- 1 file changed, 32 insertions(+)
-
-diff --git a/configure b/configure
-index 50e7cbc..6b97693 100755
---- a/configure
-+++ b/configure
-@@ -6733,6 +6733,38 @@ fi
- 
- 
- 
-+# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
-+# might be empty or "-g".  We don't require a C++ compiler, so CXXFLAGS
-+# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
-+# We want to ensure that TARGET libraries (which we know are built with
-+# gcc) are built with "-O2 -g", so include those options when setting
-+# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
-+if test "x$CFLAGS_FOR_TARGET" = x; then
-+  CFLAGS_FOR_TARGET=$CFLAGS
-+  case " $CFLAGS " in
-+    *" -O2 "*) ;;
-+    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
-+  esac
-+  case " $CFLAGS " in
-+    *" -g "* | *" -g3 "*) ;;
-+    *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
-+  esac
-+fi
-+
-+
-+if test "x$CXXFLAGS_FOR_TARGET" = x; then
-+  CXXFLAGS_FOR_TARGET=$CXXFLAGS
-+  case " $CXXFLAGS " in
-+    *" -O2 "*) ;;
-+    *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
-+  esac
-+  case " $CXXFLAGS " in
-+    *" -g "* | *" -g3 "*) ;;
-+    *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
-+  esac
-+fi
-+
-+
- # Handle --with-headers=XXX.  If the value is not "yes", the contents of
- # the named directory are copied to $(tooldir)/sys-include.
- if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0013-64-bit-multilib-hack.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0013-64-bit-multilib-hack.patch
deleted file mode 100644
index 67c0661..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0013-64-bit-multilib-hack.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From d5151bebd079e981dc710f2a031830d89cb1e72e Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:10:06 +0400
-Subject: [PATCH 13/35] 64-bit multilib hack.
-
-GCC has internal multilib handling code but it assumes a very specific rigid directory
-layout. The build system implementation of multilib layout is very generic and allows
-complete customisation of the library directories.
-
-This patch is a partial solution to allow any custom directories to be passed into gcc
-and handled correctly. It forces gcc to use the base_libdir (which is the current
-directory, "."). We need to do this for each multilib that is configured as we don't
-know which compiler options may be being passed into the compiler. Since we have a compiler
-per mulitlib at this point that isn't an issue.
-
-The one problem is the target compiler is only going to work for the default multlilib at
-this point. Ideally we'd figure out which multilibs were being enabled with which paths
-and be able to patch these entries with a complete set of correct paths but this we
-don't have such code at this point. This is something the target gcc recipe should do
-and override these platform defaults in its build config.
-
-RP 15/8/11
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/i386/t-linux64   |  6 ++----
- gcc/config/mips/t-linux64   | 10 +++-------
- gcc/config/rs6000/t-linux64 |  5 ++---
- 3 files changed, 7 insertions(+), 14 deletions(-)
-
-diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
-index f6dbb78..d770da5 100644
---- a/gcc/config/i386/t-linux64
-+++ b/gcc/config/i386/t-linux64
-@@ -32,7 +32,5 @@
- #
- comma=,
- MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
--MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
--MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
--MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
--MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
-+MULTILIB_DIRNAMES = . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
-index 7e96406..b72dcb0 100644
---- a/gcc/config/mips/t-linux64
-+++ b/gcc/config/mips/t-linux64
-@@ -17,10 +17,6 @@
- # <http://www.gnu.org/licenses/>.
- 
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
--MULTILIB_DIRNAMES = n32 32 64
--MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
--MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
--MULTILIB_OSDIRNAMES = \
--	../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
--	../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
--	../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
-+MULTILIB_DIRNAMES = . . .
-+MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
-+
-diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
-index b6b351d..1d5b37a 100644
---- a/gcc/config/rs6000/t-linux64
-+++ b/gcc/config/rs6000/t-linux64
-@@ -26,10 +26,9 @@
- # MULTILIB_OSDIRNAMES according to what is found on the target.
- 
- MULTILIB_OPTIONS    := m64/m32
--MULTILIB_DIRNAMES   := 64 32
-+MULTILIB_DIRNAMES   := . .
- MULTILIB_EXTRA_OPTS := 
--MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
--MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
-+MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
- 
- rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
- 	$(COMPILE) $<
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0014-optional-libstdc.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0014-optional-libstdc.patch
deleted file mode 100644
index 374fe43..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0014-optional-libstdc.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From d7b42d93d077b2523c26f0dff0b6c44fdfff9d3c Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:12:56 +0400
-Subject: [PATCH 14/35] optional libstdc
-
-gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
-will not run correctly since by default the linker will try to link against libstdc++
-which shouldn't exist yet. We need an option to disable -lstdc++
-option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
-driver. This patch adds such an option which only disables the -lstdc++.
-
-A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
-do this officially, the likely answer is don't build libstdc++ separately.
-
-RP 29/6/10
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- gcc/c-family/c.opt  | 4 ++++
- gcc/cp/g++spec.c    | 1 +
- gcc/doc/invoke.texi | 8 +++++++-
- gcc/gcc.c           | 1 +
- 4 files changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
-index 983f4a8..96924f6 100644
---- a/gcc/c-family/c.opt
-+++ b/gcc/c-family/c.opt
-@@ -1543,6 +1543,10 @@ nostdinc++
- C++ ObjC++
- Do not search standard system include directories for C++
- 
-+nostdlib++
-+Driver
-+Do not link standard C++ runtime library
-+
- o
- C ObjC C++ ObjC++ Joined Separate
- ; Documented in common.opt
-diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
-index 6536d7e..f57a5d4 100644
---- a/gcc/cp/g++spec.c
-+++ b/gcc/cp/g++spec.c
-@@ -138,6 +138,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
-       switch (decoded_options[i].opt_index)
- 	{
- 	case OPT_nostdlib:
-+	case OPT_nostdlib__:
- 	case OPT_nodefaultlibs:
- 	  library = -1;
- 	  break;
-diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
-index 0df8a47..73856d0 100644
---- a/gcc/doc/invoke.texi
-+++ b/gcc/doc/invoke.texi
-@@ -195,6 +195,7 @@ in the following sections.
- -fvisibility-inlines-hidden @gol
- -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
- -fvtv-counts -fvtv-debug @gol
-+-nostdlib++ @gol
- -fvisibility-ms-compat @gol
- -fext-numeric-literals @gol
- -Wabi=@var{n}  -Wabi-tag  -Wconversion-null  -Wctor-dtor-privacy @gol
-@@ -488,7 +489,7 @@ Objective-C and Objective-C++ Dialects}.
- -s  -static -static-libgcc -static-libstdc++ @gol
- -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
- -static-libmpx -static-libmpxwrappers @gol
---shared -shared-libgcc  -symbolic @gol
-+-shared -shared-libgcc  -symbolic -nostdlib++ @gol
- -T @var{script}  -Wl,@var{option}  -Xlinker @var{option} @gol
- -u @var{symbol} -z @var{keyword}}
- 
-@@ -11185,6 +11186,11 @@ These entries are usually resolved by entries in
- libc.  These entry points should be supplied through some other
- mechanism when this option is specified.
- 
-+@item -nostdlib++
-+@opindex nostdlib++
-+Do not use the standard system C++ runtime libraries when linking.
-+Only the libraries you specify will be passed to the linker.
-+
- @cindex @option{-lgcc}, use with @option{-nostdlib}
- @cindex @option{-nostdlib} and unresolved references
- @cindex unresolved references and @option{-nostdlib}
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 675bcc1..a37ec8b 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -845,6 +845,7 @@ proper position among the other output files.  */
-     %(mflib) " STACK_SPLIT_SPEC "\
-     %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
-     %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
-+    %{!nostdlib++:}\
-     %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
- #endif
- 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
deleted file mode 100644
index 6cf1e3d..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From ad1592791698286b80626ddd5679ff2ef457ab76 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:14:20 +0400
-Subject: [PATCH 15/35] gcc: disable MASK_RELAX_PIC_CALLS bit
-
-The new feature added after 4.3.3
-"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
-will cause cc1plus eat up all the system memory when build webkit-gtk.
-The function mips_get_pic_call_symbol keeps on recursively calling itself.
-Disable this feature to walk aside the bug.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure    | 7 -------
- gcc/configure.ac | 7 -------
- 2 files changed, 14 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 181748e..9009064 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -26451,13 +26451,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
-         rm -f conftest.*
-       fi
-     fi
--    if test $gcc_cv_as_ld_jalr_reloc = yes; then
--      if test x$target_cpu_default = x; then
--        target_cpu_default=MASK_RELAX_PIC_CALLS
--      else
--        target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
--      fi
--    fi
-     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
- $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
- 
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 8b07078..c7a28b4 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -4361,13 +4361,6 @@ x:
-         rm -f conftest.*
-       fi
-     fi
--    if test $gcc_cv_as_ld_jalr_reloc = yes; then
--      if test x$target_cpu_default = x; then
--        target_cpu_default=MASK_RELAX_PIC_CALLS
--      else
--        target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
--      fi
--    fi
-     AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
- 
-     AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0016-COLLECT_GCC_OPTIONS.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0016-COLLECT_GCC_OPTIONS.patch
deleted file mode 100644
index 359de35..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0016-COLLECT_GCC_OPTIONS.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 2b22ee2e44688f8a72b9af76a0431d86bac00d47 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:16:28 +0400
-Subject: [PATCH 16/35] COLLECT_GCC_OPTIONS
-
-This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
-invoke collect2.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/gcc.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index a37ec8b..87b47c5 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -4352,6 +4352,15 @@ set_collect_gcc_options (void)
- 		sizeof ("COLLECT_GCC_OPTIONS=") - 1);
- 
-   first_time = TRUE;
-+#ifdef HAVE_LD_SYSROOT
-+  if (target_system_root_changed && target_system_root)
-+    {
-+      obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
-+      obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
-+      obstack_grow (&collect_obstack, "'", 1);
-+      first_time = FALSE;
-+    }
-+#endif
-   for (i = 0; (int) i < n_switches; i++)
-     {
-       const char *const *args;
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
deleted file mode 100644
index 8506131..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 12f467bc6d8953ba342fe5166b9a2f397b334794 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:17:25 +0400
-Subject: [PATCH 17/35] Use the defaults.h in ${B} instead of ${S}, and t-oe in
- ${B}
-
-Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
-the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-While compiling gcc-crosssdk-initial-x86_64 on some host, there is
-occasionally failure that test the existance of default.h doesn't
-work, the reason is tm_include_list='** defaults.h' rather than
-tm_include_list='** ./defaults.h'
-
-So we add the test condition for this situation.
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- gcc/Makefile.in  | 2 +-
- gcc/configure    | 4 ++--
- gcc/configure.ac | 4 ++--
- gcc/mkconfig.sh  | 4 ++--
- 4 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 4ab7405..661ae17 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -502,7 +502,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
- TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
- 
- xmake_file=@xmake_file@
--tmake_file=@tmake_file@
-+tmake_file=@tmake_file@ ./t-oe
- TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
- TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
- TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
-diff --git a/gcc/configure b/gcc/configure
-index 9009064..f059c2f 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11841,8 +11841,8 @@ for f in $tm_file; do
-        tm_include_list="${tm_include_list} $f"
-        ;;
-     defaults.h )
--       tm_file_list="${tm_file_list} \$(srcdir)/$f"
--       tm_include_list="${tm_include_list} $f"
-+       tm_file_list="${tm_file_list} ./$f"
-+       tm_include_list="${tm_include_list} ./$f"
-        ;;
-     * )
-        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index c7a28b4..2e668a5 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1832,8 +1832,8 @@ for f in $tm_file; do
-        tm_include_list="${tm_include_list} $f"
-        ;;
-     defaults.h )
--       tm_file_list="${tm_file_list} \$(srcdir)/$f"
--       tm_include_list="${tm_include_list} $f"
-+       tm_file_list="${tm_file_list} ./$f"
-+       tm_include_list="${tm_include_list} ./$f"
-        ;;
-     * )
-        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
-diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
-index c32f087..6803ab9 100644
---- a/gcc/mkconfig.sh
-+++ b/gcc/mkconfig.sh
-@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
-     if [ $# -ge 1 ]; then
- 	echo '#ifdef IN_GCC' >> ${output}T
- 	for file in "$@"; do
--	    if test x"$file" = x"defaults.h"; then
-+	    if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
- 		postpone_defaults_h="yes"
- 	    else
- 		echo "# include \"$file\"" >> ${output}T
-@@ -109,7 +109,7 @@ esac
- 
- # If we postponed including defaults.h, add the #include now.
- if test x"$postpone_defaults_h" = x"yes"; then
--    echo "# include \"defaults.h\"" >> ${output}T
-+    echo "# include \"./defaults.h\"" >> ${output}T
- fi
- 
- # Add multiple inclusion protection guard, part two.
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0018-fortran-cross-compile-hack.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0018-fortran-cross-compile-hack.patch
deleted file mode 100644
index da73392..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0018-fortran-cross-compile-hack.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 95506b44c9ef4725fef52fa864d3d3fcf931e443 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:01 +0400
-Subject: [PATCH 18/35] fortran cross-compile hack.
-
-* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
-used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
-directory.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [embedded specific]
----
- libgfortran/configure    | 2 +-
- libgfortran/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libgfortran/configure b/libgfortran/configure
-index e1592f7..76d19b3 100755
---- a/libgfortran/configure
-+++ b/libgfortran/configure
-@@ -12747,7 +12747,7 @@ esac
- 
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- ac_ext=${ac_fc_srcext-f}
- ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
- ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
-diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
-index 35a8b39..6a0d8a9 100644
---- a/libgfortran/configure.ac
-+++ b/libgfortran/configure.ac
-@@ -240,7 +240,7 @@ AC_SUBST(enable_static)
- 
- # We need gfortran to compile parts of the library
- #AC_PROG_FC(gfortran)
--FC="$GFORTRAN"
-+#FC="$GFORTRAN"
- AC_PROG_FC(gfortran)
- 
- # extra LD Flags which are required for targets
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0019-libgcc-sjlj-check.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0019-libgcc-sjlj-check.patch
deleted file mode 100644
index ec5394a..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0019-libgcc-sjlj-check.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 94f619cd3257e35e20a877640d0cb90c2b3efc15 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:20:50 +0400
-Subject: [PATCH 19/35] libgcc-sjlj-check
-
-ac_fn_c_try_compile doesnt seem to keep the intermediate files
-which are needed for sjlj test to pass since it greps into the
-generated file. So we run the compiler command using AC_TRY_COMMAND
-which then generates the needed .s file
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- libgcc/configure    | 10 ++++++----
- libgcc/configure.ac | 10 ++++------
- 2 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/libgcc/configure b/libgcc/configure
-index 08c9319..5ffaeb3 100644
---- a/libgcc/configure
-+++ b/libgcc/configure
-@@ -4570,17 +4570,19 @@ void foo ()
- }
- 
- _ACEOF
--CFLAGS_hold=$CFLAGS
--CFLAGS="--save-temps -fexceptions"
- libgcc_cv_lib_sjlj_exceptions=unknown
--if ac_fn_c_try_compile; then :
-+if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5'
-+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-+  (eval $ac_try) 2>&5
-+  ac_status=$?
-+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-+  test $ac_status = 0; }; }; then
-   if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-     libgcc_cv_lib_sjlj_exceptions=yes
-   elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
-     libgcc_cv_lib_sjlj_exceptions=no
-   fi
- fi
--CFLAGS=$CFLAGS_hold
- rm -f conftest*
- 
- fi
-diff --git a/libgcc/configure.ac b/libgcc/configure.ac
-index 1c405e8..f52975d 100644
---- a/libgcc/configure.ac
-+++ b/libgcc/configure.ac
-@@ -255,16 +255,14 @@ void foo ()
-   bar();
- }
- ])])
--CFLAGS_hold=$CFLAGS
--CFLAGS="--save-temps -fexceptions"
- libgcc_cv_lib_sjlj_exceptions=unknown
--AS_IF([ac_fn_c_try_compile],
--  [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-+if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
-+  if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
-     libgcc_cv_lib_sjlj_exceptions=yes
-   elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
-     libgcc_cv_lib_sjlj_exceptions=no
--  fi])
--CFLAGS=$CFLAGS_hold
-+  fi
-+fi
- rm -f conftest*
- ])
- 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0020-cpp-honor-sysroot.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0020-cpp-honor-sysroot.patch
deleted file mode 100644
index 71bc68b..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0020-cpp-honor-sysroot.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 6e6283d645c83ca534219a02ae882a3d7be95ff1 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:22:00 +0400
-Subject: [PATCH 20/35] cpp: honor sysroot.
-
-Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
-preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
-rather than the --sysroot option specified on the commandline. If access to that directory is
-permission denied (unreadable), gcc will error.
-
-This happens when ccache is in use due to the fact it uses preprocessed source files.
-
-The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
--isystem, -isysroot happen and the correct sysroot is used.
-
-[YOCTO #2074]
-
-RP 2012/04/13
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/cp/lang-specs.h | 2 +-
- gcc/gcc.c           | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
-index b0728f0..e69ee7d 100644
---- a/gcc/cp/lang-specs.h
-+++ b/gcc/cp/lang-specs.h
-@@ -63,5 +63,5 @@ along with GCC; see the file COPYING3.  If not see
-   {".ii", "@c++-cpp-output", 0, 0, 0},
-   {"@c++-cpp-output",
-    "%{!M:%{!MM:%{!E:\
--    cc1plus -fpreprocessed %i %(cc1_options) %2\
-+    cc1plus -fpreprocessed %i %I %(cc1_options) %2\
-     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 87b47c5..e6efae7 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1142,7 +1142,7 @@ static const struct compiler default_compilers[] =
-                     %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0},
-   {".i", "@cpp-output", 0, 0, 0},
-   {"@cpp-output",
--   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-+   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
-   {".s", "@assembler", 0, 0, 0},
-   {"@assembler",
-    "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0021-MIPS64-Default-to-N64-ABI.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0021-MIPS64-Default-to-N64-ABI.patch
deleted file mode 100644
index caad489..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0021-MIPS64-Default-to-N64-ABI.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 7f766fc47f9388dd0094852a43f1af2568b4b9b2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:23:08 +0400
-Subject: [PATCH 21/35] MIPS64: Default to N64 ABI
-
-MIPS64 defaults to n32 ABI, this patch makes it
-so that it defaults to N64 ABI
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE config specific]
----
- gcc/config.gcc | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index cb08a5c..b155744 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2011,29 +2011,29 @@ mips*-*-linux*)				# Linux MIPS, either endian.
- 			default_mips_arch=mips32
- 			;;
- 		mips64el-st-linux-gnu)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			tm_file="${tm_file} mips/st.h"
- 			tmake_file="${tmake_file} mips/t-st"
- 			enable_mips_multilibs="yes"
- 			;;
- 		mips64octeon*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
- 			target_cpu_default=MASK_SOFT_FLOAT_ABI
- 			enable_mips_multilibs="yes"
- 			;;
- 		mipsisa64r6*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			default_mips_arch=mips64r6
- 			enable_mips_multilibs="yes"
- 			;;
- 		mipsisa64r2*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			default_mips_arch=mips64r2
- 			enable_mips_multilibs="yes"
- 			;;
- 		mips64*-*-linux* | mipsisa64*-*-linux*)
--			default_mips_abi=n32
-+			default_mips_abi=64
- 			enable_mips_multilibs="yes"
- 			;;
- 	esac
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
deleted file mode 100644
index 54520d0..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From 4f94added8b7043642386b31ed4c3a1bd016f316 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 22/35] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
- relative to SYSTEMLIBS_DIR
-
-This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
-relative to SYSTEMLIBS_DIR which can be set in generated headers
-This breaks the assumption of hardcoded multilib in gcc
-Change is only for the supported architectures in OE including
-SH, sparc, alpha for possible future support (if any)
-
-Removes the do_headerfix task in metadata
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Inappropriate [OE configuration]
----
- gcc/config/alpha/linux-elf.h |  4 ++--
- gcc/config/arm/linux-eabi.h  |  4 ++--
- gcc/config/arm/linux-elf.h   |  2 +-
- gcc/config/i386/linux.h      |  2 +-
- gcc/config/i386/linux64.h    |  6 +++---
- gcc/config/linux.h           |  8 ++++----
- gcc/config/mips/linux.h      | 12 ++++++------
- gcc/config/rs6000/linux64.h  | 10 +++++-----
- gcc/config/sh/linux.h        |  2 +-
- gcc/config/sparc/linux.h     |  2 +-
- gcc/config/sparc/linux64.h   |  4 ++--
- 11 files changed, 28 insertions(+), 28 deletions(-)
-
-diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
-index 2c70a2f..dd048db 100644
---- a/gcc/config/alpha/linux-elf.h
-+++ b/gcc/config/alpha/linux-elf.h
-@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3.  If not see
- #define EXTRA_SPECS \
- { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
- 
--#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
-+#define GLIBC_DYNAMIC_LINKER	SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define UCLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index e9d65dc..cfdf3f0 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -68,8 +68,8 @@
-    GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
- 
- #undef  GLIBC_DYNAMIC_LINKER
--#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
--#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
-+#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
-+#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
- #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
- 
- #define GLIBC_DYNAMIC_LINKER \
-diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
-index 1279cba..1dde747 100644
---- a/gcc/config/arm/linux-elf.h
-+++ b/gcc/config/arm/linux-elf.h
-@@ -62,7 +62,7 @@
- 
- #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #define LINUX_TARGET_LINK_SPEC  "%{h*} \
-    %{static:-Bstatic} \
-diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
-index a100963..21ba2b2 100644
---- a/gcc/config/i386/linux.h
-+++ b/gcc/config/i386/linux.h
-@@ -20,4 +20,4 @@ along with GCC; see the file COPYING3.  If not see
- <http://www.gnu.org/licenses/>.  */
- 
- #define GNU_USER_LINK_EMULATION "elf_i386"
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
-diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
-index a27d3be..6185cce 100644
---- a/gcc/config/i386/linux64.h
-+++ b/gcc/config/i386/linux64.h
-@@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
- #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
- #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
--#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
-+#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
-diff --git a/gcc/config/linux.h b/gcc/config/linux.h
-index 857389a..22b9be5 100644
---- a/gcc/config/linux.h
-+++ b/gcc/config/linux.h
-@@ -73,10 +73,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
-    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
-    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
-    supporting both 32-bit and 64-bit compilation.  */
--#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
- #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
- #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
-diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
-index 91df261..c306afb 100644
---- a/gcc/config/mips/linux.h
-+++ b/gcc/config/mips/linux.h
-@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3.  If not see
- #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
- 
- #define GLIBC_DYNAMIC_LINKER32 \
--  "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKER64 \
--  "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- #define GLIBC_DYNAMIC_LINKERN32 \
--  "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
- 
- #undef UCLIBC_DYNAMIC_LINKER32
- #define UCLIBC_DYNAMIC_LINKER32 \
--  "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
- #undef UCLIBC_DYNAMIC_LINKER64
- #define UCLIBC_DYNAMIC_LINKER64 \
--  "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
- #define UCLIBC_DYNAMIC_LINKERN32 \
--  "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
-+  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
- 
- #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
- #define GNU_USER_DYNAMIC_LINKERN32 \
-diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
-index 0879e7e..31c4338 100644
---- a/gcc/config/rs6000/linux64.h
-+++ b/gcc/config/rs6000/linux64.h
-@@ -357,14 +357,14 @@ extern int dot_symbols;
- #undef	LINK_OS_DEFAULT_SPEC
- #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
- #ifdef LINUX64_DEFAULT_ABI_ELFv2
--#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
- #else
--#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
-+#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
- #endif
--#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
--#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
-+#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
- #if DEFAULT_LIBC == LIBC_UCLIBC
- #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
- #elif DEFAULT_LIBC == LIBC_GLIBC
-diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
-index 0f5d614..168416c 100644
---- a/gcc/config/sh/linux.h
-+++ b/gcc/config/sh/linux.h
-@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3.  If not see
- 
- #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #undef SUBTARGET_LINK_EMUL_SUFFIX
- #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
-diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
-index 56def4b..00b564c 100644
---- a/gcc/config/sparc/linux.h
-+++ b/gcc/config/sparc/linux.h
-@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
-    When the -shared link option is used a final link is not being
-    done.  */
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #undef  LINK_SPEC
- #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
-diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
-index fa805fd..0eb4acd 100644
---- a/gcc/config/sparc/linux64.h
-+++ b/gcc/config/sparc/linux64.h
-@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3.  If not see
-    When the -shared link option is used a final link is not being
-    done.  */
- 
--#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
--#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
-+#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
- 
- #ifdef SPARC_BI_ARCH
- 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0023-gcc-Fix-argument-list-too-long-error.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0023-gcc-Fix-argument-list-too-long-error.patch
deleted file mode 100644
index b337df5..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0023-gcc-Fix-argument-list-too-long-error.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 8db606205487ebb03eae788826faf64bd6918450 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:26:37 +0400
-Subject: [PATCH 23/35] gcc: Fix argument list too long error.
-
-There would be an "Argument list too long" error when the
-build directory is longer than 200, this is caused by:
-
-headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
-
-The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
-it, use the $(sort list) of GNU make which can handle the too long list
-would fix the problem, the header would be short enough after sorted.
-The "tr ' ' '\012'" was used for translating the space to "\n", the
-$(sort list) doesn't need this.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 661ae17..9470a92 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -3255,7 +3255,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
- # We keep the directory structure for files in config or c-family and .def
- # files. All other files are flattened to a single directory.
- 	$(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
--	headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
-+	headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \
- 	srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
- 	for file in $$headers; do \
- 	  if [ -f $$file ] ; then \
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0024-Disable-sdt.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0024-Disable-sdt.patch
deleted file mode 100644
index 9f219ca..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0024-Disable-sdt.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From e136342d2f7c0bdb1cf4b57ad3440d3c9e710322 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:28:10 +0400
-Subject: [PATCH 24/35] Disable sdt.
-
-We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
-It may or may not exist from preivous builds though. To be determinstic, disable
-sdt.h usage always. This avoids build failures if the header is removed after configure
-but before libgcc is compiled for example.
-
-RP 2012/8/7
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Disable sdt for libstdc++-v3.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
-Upstream-Status: Inappropriate [hack]
----
- gcc/configure             | 12 ++++++------
- gcc/configure.ac          | 18 +++++++++---------
- libstdc++-v3/configure    |  6 +++---
- libstdc++-v3/configure.ac |  2 +-
- 4 files changed, 19 insertions(+), 19 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index f059c2f..98853b3 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -27733,12 +27733,12 @@ fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
- $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
- have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
--  have_sys_sdt_h=yes
--
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
--
--fi
-+#if test -f $target_header_dir/sys/sdt.h; then
-+#  have_sys_sdt_h=yes
-+#
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#
-+#fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
- $as_echo "$have_sys_sdt_h" >&6; }
- 
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 2e668a5..52cdcb8 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -5232,15 +5232,15 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
- fi
- 
- # Test for <sys/sdt.h> on the target.
--GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
--AC_MSG_CHECKING(sys/sdt.h in the target C library)
--have_sys_sdt_h=no
--if test -f $target_header_dir/sys/sdt.h; then
--  have_sys_sdt_h=yes
--  AC_DEFINE(HAVE_SYS_SDT_H, 1,
--            [Define if your target C library provides sys/sdt.h])
--fi
--AC_MSG_RESULT($have_sys_sdt_h)
-+#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
-+#AC_MSG_CHECKING(sys/sdt.h in the target C library)
-+#have_sys_sdt_h=no
-+#if test -f $target_header_dir/sys/sdt.h; then
-+#  have_sys_sdt_h=yes
-+#  AC_DEFINE(HAVE_SYS_SDT_H, 1,
-+#            [Define if your target C library provides sys/sdt.h])
-+#fi
-+#AC_MSG_RESULT($have_sys_sdt_h)
- 
- # Check if TFmode long double should be used by default or not.
- # Some glibc targets used DFmode long double, but with glibc 2.4
-diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
-index fbad667..7d5a6c6 100755
---- a/libstdc++-v3/configure
-+++ b/libstdc++-v3/configure
-@@ -20897,11 +20897,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
- ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
- ac_compiler_gnu=$ac_cv_c_compiler_gnu
- 
--  if test $glibcxx_cv_sys_sdt_h = yes; then
-+#  if test $glibcxx_cv_sys_sdt_h = yes; then
- 
--$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
-+#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
- 
--  fi
-+#  fi
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
- $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
- 
-diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
-index 7a7c1d8..b13eabc 100644
---- a/libstdc++-v3/configure.ac
-+++ b/libstdc++-v3/configure.ac
-@@ -229,7 +229,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
- GLIBCXX_CHECK_SC_NPROC_ONLN
- GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
- GLIBCXX_CHECK_SYSCTL_HW_NCPU
--GLIBCXX_CHECK_SDT_H
-+#GLIBCXX_CHECK_SDT_H
- 
- # Check for available headers.
- AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0025-libtool.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0025-libtool.patch
deleted file mode 100644
index b8977d6..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0025-libtool.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 1ca54967d8f67ab0eca772334e5c925a5e8c80cc Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:29:11 +0400
-Subject: [PATCH 25/35] libtool
-
-libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
-when running on am x86_64 build host.
-
-This patch stops this speading to libdir in the libstdc++.la file within libtool.
-Arguably, it shouldn't be passing this into libtool in the first place but
-for now this resolves the nastiest problems this causes.
-
-func_normal_abspath would resolve an empty path to `pwd` so we need
-to filter the zero case.
-
-RP 2012/8/24
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- ltmain.sh | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 9503ec8..0121fba 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6359,6 +6359,10 @@ func_mode_link ()
- 	func_warning "ignoring multiple \`-rpath's for a libtool library"
- 
-       install_libdir="$1"
-+      if test -n "$install_libdir"; then
-+	func_normal_abspath "$install_libdir"
-+	install_libdir=$func_normal_abspath_result
-+      fi
- 
-       oldlibs=
-       if test -z "$rpath"; then
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
deleted file mode 100644
index a8a652a..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 5f5ca57fcec4bafe3780371d1342acd40c608697 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:30:32 +0400
-Subject: [PATCH 26/35] gcc: armv4: pass fix-v4bx to linker to support EABI.
-
-The LINK_SPEC for linux gets overwritten by linux-eabi.h which
-means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
-the option is not passed to linker when chosing march=armv4
-This patch redefines this in linux-eabi.h and reinserts it
-for eabi defaulting toolchains.
-
-We might want to send it upstream.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
----
- gcc/config/arm/linux-eabi.h | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
-index cfdf3f0..048a062 100644
---- a/gcc/config/arm/linux-eabi.h
-+++ b/gcc/config/arm/linux-eabi.h
-@@ -77,10 +77,14 @@
-     %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
-     %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
- 
-+/* For armv4 we pass --fix-v4bx to linker to support EABI */
-+#undef TARGET_FIX_V4BX_SPEC
-+#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
-+
- /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
-    use the GNU/Linux version, not the generic BPABI version.  */
- #undef  LINK_SPEC
--#define LINK_SPEC EABI_LINK_SPEC					\
-+#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC			\
-   LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC,				\
- 		       LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
- 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch
deleted file mode 100644
index 445da37..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 484e8c1e8d43e626ee2ddbde9eb8e0af7a176aef Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 Mar 2013 09:33:04 +0400
-Subject: [PATCH 27/35] Use the multilib config files from ${B} instead of
- using the ones from ${S}
-
-Use the multilib config files from ${B} instead of using the ones from ${S}
-so that the source can be shared between gcc-cross-initial,
-gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
----
- gcc/configure    | 22 ++++++++++++++++++----
- gcc/configure.ac | 22 ++++++++++++++++++----
- 2 files changed, 36 insertions(+), 8 deletions(-)
-
-diff --git a/gcc/configure b/gcc/configure
-index 98853b3..d0ec50f 100755
---- a/gcc/configure
-+++ b/gcc/configure
-@@ -11821,10 +11821,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
--	if test -f ${srcdir}/config/$f
--	then
--		tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
--	fi
-+  case $f in
-+    */t-linux64 )
-+       if test -f ./config/$f
-+       then
-+         tmake_file_="${tmake_file_} ./config/$f"
-+       fi
-+       ;;
-+    * )
-+       if test -f ${srcdir}/config/$f
-+       then
-+         tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+       fi
-+       ;;
-+  esac
- done
- tmake_file="${tmake_file_}"
- 
-@@ -11835,6 +11845,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
-   case $f in
-+    */linux64.h )
-+       tm_file_list="${tm_file_list} ./config/$f"
-+       tm_include_list="${tm_include_list} ./config/$f"
-+       ;;
-     ./* )
-        f=`echo $f | sed 's/^..//'`
-        tm_file_list="${tm_file_list} $f"
-diff --git a/gcc/configure.ac b/gcc/configure.ac
-index 52cdcb8..3cf606a 100644
---- a/gcc/configure.ac
-+++ b/gcc/configure.ac
-@@ -1812,10 +1812,20 @@ done
- tmake_file_=
- for f in ${tmake_file}
- do
--	if test -f ${srcdir}/config/$f
--	then
--		tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
--	fi
-+  case $f in
-+    */t-linux64 )
-+       if test -f ./config/$f
-+       then
-+         tmake_file_="${tmake_file_} ./config/$f"
-+       fi
-+       ;;
-+    * )
-+       if test -f ${srcdir}/config/$f
-+       then
-+         tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
-+       fi
-+       ;;
-+  esac
- done
- tmake_file="${tmake_file_}"
- 
-@@ -1826,6 +1836,10 @@ tm_file_list="options.h"
- tm_include_list="options.h insn-constants.h"
- for f in $tm_file; do
-   case $f in
-+    */linux64.h )
-+       tm_file_list="${tm_file_list} ./config/$f"
-+       tm_include_list="${tm_include_list} ./config/$f"
-+       ;;
-     ./* )
-        f=`echo $f | sed 's/^..//'`
-        tm_file_list="${tm_file_list} $f"
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
deleted file mode 100644
index 4902e90..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 112ca9f860114bc79273a79ed42722fdc9ded6ea Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:39:38 +0000
-Subject: [PATCH 28/35] Avoid using libdir from .la which usually points to a
- host path
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 0121fba..52bdbdb 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -5628,6 +5628,9 @@ func_mode_link ()
- 	    absdir="$abs_ladir"
- 	    libdir="$abs_ladir"
- 	  else
-+	    # Instead of using libdir from .la which usually points to a host path,
-+	    # use the path the .la is contained in.
-+	    libdir="$abs_ladir"
- 	    dir="$libdir"
- 	    absdir="$libdir"
- 	  fi
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0029-export-CPP.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0029-export-CPP.patch
deleted file mode 100644
index 0a05ae5..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0029-export-CPP.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From a983033f1327a692af55be8d1aa61aede18c4afb Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 09:40:59 +0000
-Subject: [PATCH 29/35] export CPP
-
-The OE environment sets and exports CPP as being the target gcc. When
-building gcc-cross-canadian for a mingw targetted sdk, the following can be found
-in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
-
-configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
-configure:3666: gcc  -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe  conftest.c >&5
-configure:3666: $? = 0
-configure:3698: result: no
-configure:3786: checking how to run the C preprocessor
-configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
-configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
-configure:3876: $? = 0
-
-Note this is a *build* target (in build-x86_64-linux) so it should be
-using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
-headers are very different, using the wrong cpp is a real problem. It is leaking
-into configure through the CPP variable. Ultimately this leads to build
-failures related to not being able to include a process.h file for pem-unix.c.
-
-The fix is to ensure we export a sane CPP value into the build
-environment when using build targets. We could define a CPP_FOR_BUILD value which may be
-the version which needs to be upstreamed but for now, this fix is good enough to
-avoid the problem.
-
-RP 22/08/2013
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- Makefile.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Makefile.in b/Makefile.in
-index 36b4008..a783e1e 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
- 	AR="$(AR_FOR_BUILD)"; export AR; \
- 	AS="$(AS_FOR_BUILD)"; export AS; \
- 	CC="$(CC_FOR_BUILD)"; export CC; \
-+	CPP="$(CC_FOR_BUILD) -E"; export CPP; \
- 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
- 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
- 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
deleted file mode 100644
index 873dca9..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 3d870a184c05df1338db1870301c4144ba99fc3d Mon Sep 17 00:00:00 2001
-From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
-Date: Wed, 5 Feb 2014 16:52:31 +0200
-Subject: [PATCH 30/35] Enable SPE & AltiVec generation on powepc*linux target
-
-When is configured with --target=powerpc-linux, the resulting GCC will
-not be able to generate code for SPE targets (e500v1/v2).
-GCC configured with --target=powerpc-linuxspe will not be able to
-generate AltiVec instructions (for e6500).
-This patch modifies the configured file such that SPE or AltiVec code
-can be generated when gcc is configured with --target=powerpc-linux.
-The ABI and speciffic instructions can be selected through the
-"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
----
- gcc/config.gcc | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config.gcc b/gcc/config.gcc
-index b155744..0541b8a 100644
---- a/gcc/config.gcc
-+++ b/gcc/config.gcc
-@@ -2337,7 +2337,14 @@ powerpc-*-rtems*)
- 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
- 	;;
- powerpc*-*-linux*)
--	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+	case ${target} in
-+	    powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
-+		tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
-+		;;
-+	    *)
-+		tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h"
-+		;;
-+	esac
- 	extra_options="${extra_options} rs6000/sysv4.opt"
- 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
- 	extra_objs="$extra_objs rs6000-linux.o"
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
deleted file mode 100644
index f06cba8..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From a824cd3f45875f6c1c47ccdbf33534947bd2b587 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:21:55 +0000
-Subject: [PATCH 31/35] Disable the MULTILIB_OSDIRNAMES and other multilib
- options.
-
-Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
-systems where the libdir is NOT set to /lib64.  This is allowed by the
-ABI, as
-long as the dynamic loader is present in /lib.
-
-We simply want to use the default rules in gcc to find and configure the
-normal libdir.
-
-Upstream-Status: Inappropriate[OE-Specific]
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/t-aarch64-linux | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
-index c296376..3bb59bf 100644
---- a/gcc/config/aarch64/t-aarch64-linux
-+++ b/gcc/config/aarch64/t-aarch64-linux
-@@ -21,8 +21,8 @@
- LIB1ASMSRC   = aarch64/lib1funcs.asm
- LIB1ASMFUNCS = _aarch64_sync_cache_range
- 
--AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
--MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
--MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
-+#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
-+#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
-+#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
- 
--MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
-+#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0032-Ensure-target-gcc-headers-can-be-included.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0032-Ensure-target-gcc-headers-can-be-included.patch
deleted file mode 100644
index 4513306..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0032-Ensure-target-gcc-headers-can-be-included.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From e60090f7c537c84fd1b22307edd9f386228c7339 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 10:25:11 +0000
-Subject: [PATCH 32/35] Ensure target gcc headers can be included
-
-There are a few headers installed as part of the OpenEmbedded
-gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
-built for the target architecture, these are within the target
-sysroot and not cross/nativesdk; thus they weren't able to be
-found by gcc with the existing search paths. Add support for
-picking up these headers under the sysroot supplied on the gcc
-command line in order to resolve this.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/Makefile.in  | 2 ++
- gcc/cppdefault.c | 4 ++++
- gcc/defaults.h   | 9 +++++++++
- gcc/gcc.c        | 7 -------
- 4 files changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/gcc/Makefile.in b/gcc/Makefile.in
-index 9470a92..1497ede 100644
---- a/gcc/Makefile.in
-+++ b/gcc/Makefile.in
-@@ -582,6 +582,7 @@ libexecdir = @libexecdir@
- 
- # Directory in which the compiler finds libraries etc.
- libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
-+libsubdir_target = gcc/$(target_noncanonical)/$(version)
- # Directory in which the compiler finds executables
- libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
- # Directory in which all plugin resources are installed
-@@ -2603,6 +2604,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
- 
- PREPROCESSOR_DEFINES = \
-   -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-+  -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
-   -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
-   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-   -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
-index 580c1ba..03a0287 100644
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
-     /* This is the dir for gcc's private headers.  */
-     { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
- #endif
-+#ifdef GCC_INCLUDE_SUBDIR_TARGET
-+    /* This is the dir for gcc's private headers under the specified sysroot.  */
-+    { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+#endif
- #ifdef LOCAL_INCLUDE_DIR
-     /* /usr/local/include comes before the fixincluded header files.  */
-     { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
-diff --git a/gcc/defaults.h b/gcc/defaults.h
-index 1d54798..983d45e 100644
---- a/gcc/defaults.h
-+++ b/gcc/defaults.h
-@@ -1361,4 +1361,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
- 
- #endif /* GCC_INSN_FLAGS_H  */
- 
-+/* Default prefixes to attach to command names.  */
-+
-+#ifndef STANDARD_STARTFILE_PREFIX_1
-+#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
-+#endif
-+#ifndef STANDARD_STARTFILE_PREFIX_2
-+#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
-+#endif
-+
- #endif  /* ! GCC_DEFAULTS_H */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
-index e6efae7..3ca27b9 100644
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -1263,13 +1263,6 @@ static const char *gcc_libexec_prefix;
- 
- /* Default prefixes to attach to command names.  */
- 
--#ifndef STANDARD_STARTFILE_PREFIX_1
--#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
--#endif
--#ifndef STANDARD_STARTFILE_PREFIX_2
--#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
--#endif
--
- #ifdef CROSS_DIRECTORY_STRUCTURE  /* Don't use these prefixes for a cross compiler.  */
- #undef MD_EXEC_PREFIX
- #undef MD_STARTFILE_PREFIX
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
deleted file mode 100644
index 519e413..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 997f9e939f85f651b22a48251cfb1444831d54ca Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 20 Feb 2015 11:17:19 +0000
-Subject: [PATCH 33/35] gcc 4.8+ won't build with --disable-dependency-tracking
-
-since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
-
-This patch ensures we only use those compiler options when its enabled.
-
-Upstream-Status: Submitted
-
-(Problem was already reported upstream, attached this patch there
-http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
-
-RP
-2012/09/22
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libatomic/Makefile.am | 3 ++-
- libatomic/Makefile.in | 3 ++-
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
-index 3d8ab62..23dff7e 100644
---- a/libatomic/Makefile.am
-+++ b/libatomic/Makefile.am
-@@ -101,7 +101,8 @@ PAT_S		= $(word 3,$(PAT_SPLIT))
- IFUNC_DEF	= -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT	= $(word $(PAT_S),$(IFUNC_OPTIONS))
- 
--M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS		=
- M_SIZE		= -DN=$(PAT_N)
- M_IFUNC		= $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE		= $(PAT_BASE)_n.c
-diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
-index 9288652..3720256 100644
---- a/libatomic/Makefile.in
-+++ b/libatomic/Makefile.in
-@@ -330,7 +330,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
- PAT_S = $(word 3,$(PAT_SPLIT))
- IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
- IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
--M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
-+@AMDEP_FALSE@M_DEPS =
- M_SIZE = -DN=$(PAT_N)
- M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
- M_FILE = $(PAT_BASE)_n.c
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch
deleted file mode 100644
index 207cd7c..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From c94da257a219873b946e08306141af7749679f67 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 3 Mar 2015 08:21:19 +0000
-Subject: [PATCH 34/35] Don't search host directory during "relink" if
- $inst_prefix is provided
-
-http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
-
-Upstream-Status: Submitted
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- ltmain.sh | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/ltmain.sh b/ltmain.sh
-index 52bdbdb..82bcec3 100644
---- a/ltmain.sh
-+++ b/ltmain.sh
-@@ -6004,12 +6004,13 @@ func_mode_link ()
- 	      fi
- 	    else
- 	      # We cannot seem to hardcode it, guess we'll fake it.
-+	      # Default if $libdir is not relative to the prefix:
- 	      add_dir="-L$libdir"
--	      # Try looking first in the location we're being installed to.
-+
- 	      if test -n "$inst_prefix_dir"; then
- 		case $libdir in
- 		  [\\/]*)
--		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
-+		    add_dir="-L$inst_prefix_dir$libdir"
- 		    ;;
- 		esac
- 	      fi
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
deleted file mode 100644
index b75f385..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 3a09545f3d18ce492ef55639215a072282de03d0 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 8 Mar 2015 03:41:39 +0000
-Subject: [PATCH 35/35] Dont link the plugins with libgomp explicitly
-
-They are dlopened by libgomp anyway. This fixes
-the libtool relink issue which causes issues during
-cross compilation
-
-libtool: install: /usr/bin/install -c .libs/libgomp.lai
-/home/ubuntu/work/bleeding/build-qemux86-64mc/tmp/work/core2-64-rdk-linux/gcc-runtime/5.0-r0/image/usr/lib/../lib/libgomp.la
-libtool: install: error: cannot install `libgomp-plugin-host_nonshm.la'
-to a directory not ending in /usr/lib
-Makefile:517: recipe for target 'install-toolexeclibLTLIBRARIES' failed
-make[2]: *** [install-toolexeclibLTLIBRARIES] Error 1
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- libgomp/Makefile.in        | 7 +++----
- libgomp/plugin/Makefrag.am | 3 +--
- 2 files changed, 4 insertions(+), 6 deletions(-)
-
-diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in
-index b61b108..71b2627 100644
---- a/libgomp/Makefile.in
-+++ b/libgomp/Makefile.in
-@@ -123,7 +123,7 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(infodir)" \
- 	"$(DESTDIR)$(fincludedir)" "$(DESTDIR)$(libsubincludedir)" \
- 	"$(DESTDIR)$(toolexeclibdir)"
- LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
--libgomp_plugin_host_nonshm_la_DEPENDENCIES = libgomp.la
-+libgomp_plugin_host_nonshm_la_LIBADD =
- am_libgomp_plugin_host_nonshm_la_OBJECTS =  \
- 	libgomp_plugin_host_nonshm_la-plugin-host.lo
- libgomp_plugin_host_nonshm_la_OBJECTS =  \
-@@ -133,7 +133,7 @@ libgomp_plugin_host_nonshm_la_LINK = $(LIBTOOL) --tag=CC \
- 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- 	$(libgomp_plugin_host_nonshm_la_LDFLAGS) $(LDFLAGS) -o $@
- am__DEPENDENCIES_1 =
--@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_DEPENDENCIES = libgomp.la \
-+@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_DEPENDENCIES =  \
- @PLUGIN_NVPTX_TRUE@	$(am__DEPENDENCIES_1)
- @PLUGIN_NVPTX_TRUE@am_libgomp_plugin_nvptx_la_OBJECTS =  \
- @PLUGIN_NVPTX_TRUE@	libgomp_plugin_nvptx_la-plugin-nvptx.lo
-@@ -407,7 +407,7 @@ libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
- @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LDFLAGS =  \
- @PLUGIN_NVPTX_TRUE@	$(libgomp_plugin_nvptx_version_info) \
- @PLUGIN_NVPTX_TRUE@	$(lt_host_flags) $(PLUGIN_NVPTX_LDFLAGS)
--@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBADD = libgomp.la $(PLUGIN_NVPTX_LIBS)
-+@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS)
- @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static
- libgomp_plugin_host_nonshm_version_info = -version-info $(libtool_VERSION)
- libgomp_plugin_host_nonshm_la_SOURCES = plugin/plugin-host.c
-@@ -415,7 +415,6 @@ libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN
- libgomp_plugin_host_nonshm_la_LDFLAGS = \
- 	$(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags)
- 
--libgomp_plugin_host_nonshm_la_LIBADD = libgomp.la
- libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static
- nodist_noinst_HEADERS = libgomp_f.h
- nodist_libsubinclude_HEADERS = omp.h openacc.h
-diff --git a/libgomp/plugin/Makefrag.am b/libgomp/plugin/Makefrag.am
-index 167485f..d2c5428 100644
---- a/libgomp/plugin/Makefrag.am
-+++ b/libgomp/plugin/Makefrag.am
-@@ -35,7 +35,7 @@ libgomp_plugin_nvptx_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_NVPTX_CPPFLAGS)
- libgomp_plugin_nvptx_la_LDFLAGS = $(libgomp_plugin_nvptx_version_info) \
- 	$(lt_host_flags)
- libgomp_plugin_nvptx_la_LDFLAGS += $(PLUGIN_NVPTX_LDFLAGS)
--libgomp_plugin_nvptx_la_LIBADD = libgomp.la $(PLUGIN_NVPTX_LIBS)
-+libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS)
- libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static
- endif
- 
-@@ -45,5 +45,4 @@ libgomp_plugin_host_nonshm_la_SOURCES = plugin/plugin-host.c
- libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN
- libgomp_plugin_host_nonshm_la_LDFLAGS = \
- 	$(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags)
--libgomp_plugin_host_nonshm_la_LIBADD = libgomp.la
- libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
deleted file mode 100644
index b691946..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 861bcfd4ae814f351e0c668ee26d01d1331e0422 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 28 Apr 2015 23:15:27 -0700
-Subject: [PATCH 36/37] Use SYSTEMLIBS_DIR replacement instead of hardcoding
- base_libdir
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/aarch64/aarch64-linux.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
-index 9abb252..79525ee 100644
---- a/gcc/config/aarch64/aarch64-linux.h
-+++ b/gcc/config/aarch64/aarch64-linux.h
-@@ -21,7 +21,7 @@
- #ifndef GCC_AARCH64_LINUX_H
- #define GCC_AARCH64_LINUX_H
- 
--#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
-+#define GLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
- 
- #undef  ASAN_CC1_SPEC
- #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0037-pr65779.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0037-pr65779.patch
deleted file mode 100644
index 1424673..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0037-pr65779.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-List-Id: <gcc-patches.gcc.gnu.org>
-List-Archive: <http://gcc.gnu.org/ml/gcc-patches/>
-List-Post: <mailto:gcc-patches at gcc dot gnu dot org>
-List-Help: <mailto:gcc-patches-help at gcc dot gnu dot org>
-Date: Mon, 20 Apr 2015 12:40:49 +0930
-From: Alan Modra <amodra at gmail dot com>
-To: gcc-patches at gcc dot gnu dot org
-Subject: [Patch] pr65779 - [5/6 Regression] undefined local symbol on powerpc
-
-This patch removes bogus debug info left around by shrink-wrapping,
-which on some powerpc targets with just the right register allocation
-led to assembly errors.
-
-Bootstrapped and regression tested powerpc64-linux and x86_64-linux.
-
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65779
-
-gcc/
-	PR debug/65779
-	* shrink-wrap.c (insn_uses_reg): New function.
-	(move_insn_for_shrink_wrap): Remove debug insns using regs set
-	by the moved insn.
-gcc/testsuite/
-	* gcc.dg/pr65779.c: New.
-	
-Upstream-Status: Pending (from mailing list, not merged yet)
-
-Index: a/gcc/shrink-wrap.c
-===================================================================
---- a/gcc/shrink-wrap.c.orig
-+++ b/gcc/shrink-wrap.c
-@@ -182,6 +182,21 @@ live_edge_for_reg (basic_block bb, int r
-   return live_edge;
- }
- 
-+static bool
-+insn_uses_reg (rtx_insn *insn, unsigned int regno, unsigned int end_regno)
-+{
-+  df_ref use;
-+
-+  FOR_EACH_INSN_USE (use, insn)
-+    {
-+      rtx reg = DF_REF_REG (use);
-+
-+      if (REG_P (reg) && REGNO (reg) >= regno && REGNO (reg) < end_regno)
-+	return true;
-+    }
-+  return false;
-+}
-+
- /* Try to move INSN from BB to a successor.  Return true on success.
-    USES and DEFS are the set of registers that are used and defined
-    after INSN in BB.  SPLIT_P indicates whether a live edge from BB
-@@ -340,10 +355,15 @@ move_insn_for_shrink_wrap (basic_block b
-       *split_p = true;
-     }
- 
-+  vec<basic_block> live_bbs;
-+  if (MAY_HAVE_DEBUG_INSNS)
-+    live_bbs.create (5);
-   /* At this point we are committed to moving INSN, but let's try to
-      move it as far as we can.  */
-   do
-     {
-+      if (MAY_HAVE_DEBUG_INSNS)
-+	live_bbs.safe_push (bb);
-       live_out = df_get_live_out (bb);
-       live_in = df_get_live_in (next_block);
-       bb = next_block;
-@@ -426,6 +446,34 @@ move_insn_for_shrink_wrap (basic_block b
- 	SET_REGNO_REG_SET (bb_uses, i);
-     }
- 
-+  /* Remove debug insns using regs set by the insn we are moving.  */
-+  if (MAY_HAVE_DEBUG_INSNS)
-+    {
-+      while (!live_bbs.is_empty ())
-+	{
-+	  rtx_insn *dinsn;
-+	  basic_block tmp_bb = live_bbs.pop ();
-+
-+	  FOR_BB_INSNS_REVERSE (tmp_bb, dinsn)
-+	    {
-+	      if (dinsn == insn)
-+		break;
-+	      if (DEBUG_INSN_P (dinsn)
-+		  && insn_uses_reg (dinsn, dregno, end_dregno))
-+		{
-+		  if (*split_p)
-+		    /* If split, then we will be moving insn into a
-+		       newly created block immediately after the entry
-+		       block.  Move the debug info there too.  */
-+		    emit_debug_insn_after (PATTERN (dinsn), bb_note (bb));
-+		  delete_insn (dinsn);
-+		  break;
-+		}
-+	    }
-+	}
-+      live_bbs.release ();
-+    }
-+
-   emit_insn_after (PATTERN (insn), bb_note (bb));
-   delete_insn (insn);
-   return true;
-Index: b/gcc/testsuite/gcc.dg/pr65779.c
-===================================================================
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr65779.c
-@@ -0,0 +1,64 @@
-+/* { dg-do run } */
-+/* { dg-options "-O2 -g" } */
-+/* { dg-additional-options "-mrelocatable" { target powerpc-*-rtems* } } */
-+
-+unsigned long __attribute__ ((noinline))
-+adler32 (unsigned long adler, unsigned char *buf, unsigned int len)
-+{
-+  unsigned long s1 = adler & 0xffff;
-+  unsigned long s2 = (adler >> 16) & 0xffff;
-+  int k;
-+
-+  if (buf == 0)
-+    return 1L;
-+
-+  while (len > 0)
-+    {
-+      k = len < 5552 ? len : 5552;
-+      len -= k;
-+      while (k >= 16)
-+	{
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  s1 += *buf++; s2 += s1;
-+	  k -= 16;
-+	}
-+      if (k != 0)
-+	do
-+	  {
-+	    s1 += *buf++; s2 += s1;
-+	  } while (--k);
-+      s1 &= 0xffffffffUL;
-+      s2 &= 0xffffffffUL;
-+      s1 %= 65521L;
-+      s2 %= 65521L;
-+    }
-+  return (s2 << 16) | s1;
-+}
-+
-+unsigned char buf[] = { 0, 1, 2, 3, 4, 5, 6, 7,
-+			8, 9, 10, 11, 12, 13, 14, 15,
-+			0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
-+			0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
-+			0x55, 0xaa };
-+int
-+main ()
-+{
-+  unsigned long x = adler32 (0, buf, sizeof buf);
-+  if (x != 0x640409efUL)
-+    __builtin_abort ();
-+  return 0;
-+}
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0038-fix-g++-sysroot.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0038-fix-g++-sysroot.patch
deleted file mode 100644
index f024dd5..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0038-fix-g++-sysroot.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Portions of
-
-http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html
-
-are not upstreamed yet. So lets keep missing pieces.
-
-Upstream-Status: Pending
-
-Without this, compiling something simple like #include <limits> on target
-with c++ test.cpp fails unable to find the header. strace shows it looking in
-usr/include/xxxx rather than /usr/include/xxxx
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: gcc-4.8.1/gcc/configure.ac
-===================================================================
---- gcc-4.8.1.orig/gcc/configure.ac	2013-07-15 15:55:49.488399132 -0700
-+++ gcc-4.8.1/gcc/configure.ac	2013-07-15 16:02:31.772406679 -0700
-@@ -148,7 +148,9 @@
- if test "${with_sysroot+set}" = set; then
-   gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
-   if test "${gcc_gxx_without_sysroot}"; then
--    gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+    if test x${with_sysroot} != x/; then
-+      gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+    fi
-     gcc_gxx_include_dir_add_sysroot=1
-   fi
- fi
-Index: gcc-4.8.1/gcc/configure
-===================================================================
---- gcc-4.8.1.orig/gcc/configure	2013-07-15 15:55:49.472399132 -0700
-+++ gcc-4.8.1/gcc/configure	2013-07-15 16:02:31.780406680 -0700
-@@ -3325,7 +3325,9 @@
- if test "${with_sysroot+set}" = set; then
-   gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
-   if test "${gcc_gxx_without_sysroot}"; then
--    gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+    if test x${with_sysroot} != x/; then
-+      gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
-+    fi
-     gcc_gxx_include_dir_add_sysroot=1
-   fi
- fi
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
deleted file mode 100644
index 2f025c6..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From acea0df9997a47f8b8224b6ca1618c8c9dfbe6d5 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sun, 5 Jul 2015 20:25:18 -0700
-Subject: [PATCH] libcc1: fix libcc1's install path and rpath
-
-* Install libcc1.so and libcc1plugin.so into
-  $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
-  had done to lto-plugin.
-* Fix bad RPATH iussue:
-  gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
- /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
- [rpaths]
-
-Upstream-Status: Inappropriate [OE configuration]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- libcc1/Makefile.am  |    4 ++--
- libcc1/Makefile.in  |    4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
-index 7a274b3..db69bea 100644
---- a/libcc1/Makefile.am
-+++ b/libcc1/Makefile.am
-@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- 	    $(Wc)$(libiberty_normal)))
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
- 
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
- 
- if ENABLE_PLUGIN
- plugin_LTLIBRARIES = libcc1plugin.la
-diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
-index 1916134..c8995d2 100644
---- a/libcc1/Makefile.in
-+++ b/libcc1/Makefile.in
-@@ -262,8 +262,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
- 	    $(Wc)$(libiberty_normal)))
- 
- libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
--plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
--cc1libdir = $(libdir)/$(libsuffix)
-+cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
-+plugindir = $(cc1libdir)
- @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
- @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
- BUILT_SOURCES = compiler-name.h
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0040-nativesdk-gcc-support.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0040-nativesdk-gcc-support.patch
deleted file mode 100644
index fd81ae2..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0040-nativesdk-gcc-support.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-Being able to build a nativesdk gcc is useful, particularly in cases
-where the host compiler may be of an incompatible version (or a 32
-bit compiler is needed).
-
-Sadly, building nativesdk-gcc is not straight forward. We install
-nativesdk-gcc into a relocatable location and this means that its
-library locations can change. "Normal" sysroot support doesn't help
-in this case since the values of paths like "libdir" change, not just
-base root directory of the system.
-
-In order to handle this we do two things:
-
-a) Add %r into spec file markup which can be used for injected paths
-   such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
-b) Add other paths which need relocation into a .gccrelocprefix section
-   which the relocation code will notice and adjust automatically.
-
-
-Upstream-Status: Inappropriate
-RP 2015/7/28
-
-diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
---- a/gcc/cppdefault.c
-+++ b/gcc/cppdefault.c
-@@ -35,6 +35,30 @@
- # undef CROSS_INCLUDE_DIR
- #endif
- 
-+static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
-+static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
-+static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
-+static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
-+static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
-+#ifdef LOCAL_INCLUDE_DIR
-+static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
-+#endif
-+#ifdef PREFIX_INCLUDE_DIR
-+static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
-+#endif
-+#ifdef FIXED_INCLUDE_DIR
-+static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
-+#endif
-+#ifdef CROSS_INCLUDE_DIR
-+static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
-+#endif
-+#ifdef TOOL_INCLUDE_DIR
-+static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
-+#endif
-+#ifdef NATIVE_SYSTEM_HEADER_DIR
-+static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
-+#endif
-+
- const struct default_include cpp_include_defaults[]
- #ifdef INCLUDE_DEFAULTS
- = INCLUDE_DEFAULTS;
-@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
- = {
- #ifdef GPLUSPLUS_INCLUDE_DIR
-     /* Pick up GNU C++ generic include files.  */
--    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
-+    { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
-       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
-     /* Pick up GNU C++ target-dependent include files.  */
--    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
-+    { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
-       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
- #endif
- #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
-     /* Pick up GNU C++ backward and deprecated include files.  */
--    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
-+    { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
-       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
- #endif
- #ifdef GCC_INCLUDE_DIR
-     /* This is the dir for gcc's private headers.  */
--    { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+    { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef GCC_INCLUDE_SUBDIR_TARGET
-     /* This is the dir for gcc's private headers under the specified sysroot.  */
--    { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
-+    { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
- #endif
- #ifdef LOCAL_INCLUDE_DIR
-     /* /usr/local/include comes before the fixincluded header files.  */
--    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
--    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
-+    { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
-+    { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
- #endif
- #ifdef PREFIX_INCLUDE_DIR
--    { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
-+    { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
- #endif
- #ifdef FIXED_INCLUDE_DIR
-     /* This is the dir for fixincludes.  */
--    { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
-+    { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
-       /* A multilib suffix needs adding if different multilibs use
- 	 different headers.  */
- #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
-@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[]
- #endif
- #ifdef CROSS_INCLUDE_DIR
-     /* One place the target system's headers might be.  */
--    { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
-+    { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
- #endif
- #ifdef TOOL_INCLUDE_DIR
-     /* Another place the target system's headers might be.  */
--    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
-+    { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
- #endif
- #ifdef NATIVE_SYSTEM_HEADER_DIR
-     /* /usr/include comes dead last.  */
--    { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
--    { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
-+    { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
-+    { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
- #endif
-     { 0, 0, 0, 0, 0, 0 }
-   };
-diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
---- a/gcc/cppdefault.h
-+++ b/gcc/cppdefault.h
-@@ -33,7 +33,8 @@
- 
- struct default_include
- {
--  const char *const fname;	/* The name of the directory.  */
-+  const char *fname;     /* The name of the directory.  */
-+
-   const char *const component;	/* The component containing the directory
- 				   (see update_path in prefix.c) */
-   const char cplusplus;		/* Only look here if we're compiling C++.  */
-diff --git a/gcc/gcc.c b/gcc/gcc.c
---- a/gcc/gcc.c
-+++ b/gcc/gcc.c
-@@ -120,6 +120,8 @@ static const char *target_system_root = TARGET_SYSTEM_ROOT;
- #else
- static const char *target_system_root = 0;
- #endif
-+ 
-+static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
- 
- /* Nonzero means pass the updated target_system_root to the compiler.  */
- 
-@@ -390,6 +392,7 @@ or with constant text in a single argument.
-  %G     process LIBGCC_SPEC as a spec.
-  %R     Output the concatenation of target_system_root and
-         target_sysroot_suffix.
-+ %r     Output the base path target_relocatable_prefix
-  %S     process STARTFILE_SPEC as a spec.  A capital S is actually used here.
-  %E     process ENDFILE_SPEC as a spec.  A capital E is actually used here.
-  %C     process CPP_SPEC as a spec.
-@@ -1286,10 +1289,10 @@ static const char *gcc_libexec_prefix;
-    gcc_exec_prefix is set because, in that case, we know where the
-    compiler has been installed, and use paths relative to that
-    location instead.  */
--static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
--static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
--static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
--static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
-+static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
-+static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
-+static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
-+static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- 
- /* For native compilers, these are well-known paths containing
-    components that may be provided by the system.  For cross
-@@ -1297,9 +1300,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- static const char *md_exec_prefix = MD_EXEC_PREFIX;
- static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
- static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_1
-+static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
-   = STANDARD_STARTFILE_PREFIX_1;
--static const char *const standard_startfile_prefix_2
-+static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
-   = STANDARD_STARTFILE_PREFIX_2;
- 
- /* A relative path to be used in finding the location of tools
-@@ -5550,6 +5553,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
- 	      }
- 	    break;
- 
-+          case 'r':
-+              obstack_grow (&obstack, target_relocatable_prefix,
-+		      strlen (target_relocatable_prefix));
-+            break;
-+
- 	  case 'S':
- 	    value = do_spec_1 (startfile_spec, 0, NULL);
- 	    if (value != 0)
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0041-handle-target-sysroot-multilib.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0041-handle-target-sysroot-multilib.patch
deleted file mode 100644
index 5356984..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.2/0041-handle-target-sysroot-multilib.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-Search target sysroot gcc version specific dirs with multilib.
-
-We install the gcc libraries (such as crtbegin.p) into
-<sysroot><libdir>/<target-sys>/5.2.0/
-which is a default search path for GCC (aka multi_suffix in the 
-code below). <target-sys> is 'machine' in gcc's terminology. We use
-these directories so that multiple gcc versions could in theory 
-co-exist on target.
-
-We only want to build one gcc-cross-canadian per arch and have this work 
-for all multilibs. <target-sys> can be handled by mapping the multilib
-<target-sys> to the one used by gcc-cross-canadian, e.g. mips64-polkmllib32-linux 
-is symlinked to by mips64-poky-linux.
-
-The default gcc search path in the target sysroot for a "lib64" mutlilib is:
-
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-which means that the lib32 crtbegin.o will be found and the lib64 ones
-will not which leads to compiler failures.
-
-This patch injects a multilib version of that path first so the lib64
-binaries can be found first. With this change the search path becomes:
-
-<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/lib32/../lib64/
-<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
-<sysroot>/usr/lib32/../lib64/
-<sysroot>/lib32/
-<sysroot>/usr/lib32/
-
-Upstream-Status: Pending
-RP 2015/7/31
-
-Index: gcc-5.2.0/gcc/gcc.c
-===================================================================
---- gcc-5.2.0.orig/gcc/gcc.c
-+++ gcc-5.2.0/gcc/gcc.c
-@@ -2305,7 +2305,7 @@ for_each_path (const struct path_prefix
-       if (path == NULL)
- 	{
- 	  len = paths->max_len + extra_space + 1;
--	  len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
-+	  len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
- 	  path = XNEWVEC (char, len);
- 	}
- 
-@@ -2317,6 +2317,33 @@ for_each_path (const struct path_prefix
- 	  /* Look first in MACHINE/VERSION subdirectory.  */
- 	  if (!skip_multi_dir)
- 	    {
-+	      if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
-+	        {
-+	          const char *this_multi;
-+	          size_t this_multi_len;
-+
-+	          if (pl->os_multilib)
-+		    {
-+		      this_multi = multi_os_dir;
-+		      this_multi_len = multi_os_dir_len;
-+		    }
-+	          else
-+		    {
-+		      this_multi = multi_dir;
-+		      this_multi_len = multi_dir_len;
-+		    }
-+
-+	          /* Look in multilib MACHINE/VERSION subdirectory first */
-+	          if (this_multi_len)
-+	            {
-+		      memcpy (path + len, this_multi, this_multi_len + 1);
-+	              memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
-+	              ret = callback (path, callback_info);
-+	                if (ret)
-+		          break;
-+	            }
-+	        }
-+
- 	      memcpy (path + len, multi_suffix, suffix_len + 1);
- 	      ret = callback (path, callback_info);
- 	      if (ret)
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3.inc
new file mode 100644
index 0000000..9808be1
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3.inc
@@ -0,0 +1,143 @@
+require gcc-common.inc
+
+# Third digit in PV should be incremented after a minor release
+
+PV = "5.3.0"
+
+#SNAP = "5-20150405"
+
+# BINV should be incremented to a revision after a minor gcc release
+
+BINV = "5.3.0"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-5.3:${FILE_DIRNAME}/gcc-5.3/backport:"
+
+DEPENDS =+ "mpfr gmp libmpc zlib"
+NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native"
+
+LICENSE = "GPL-3.0-with-GCC-exception & GPLv3"
+
+LIC_FILES_CHKSUM = "\
+    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+    file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \
+"
+#BASEURI = "http://www.netgull.com/gcc/snapshots/${SNAP}/gcc-${SNAP}.tar.bz2"
+BASEURI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2"
+
+SRC_URI = "\
+           ${BASEURI} \
+           ${BACKPORTS} \
+           file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
+           file://0002-uclibc-conf.patch \
+           file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
+           file://0004-uclibc-locale.patch \
+           file://0005-uclibc-locale-no__x.patch \
+           file://0006-uclibc-locale-wchar_fix.patch \
+           file://0007-uclibc-locale-update.patch \
+           file://0008-missing-execinfo_h.patch \
+           file://0009-c99-snprintf.patch \
+           file://0010-gcc-poison-system-directories.patch \
+           file://0011-gcc-poison-dir-extend.patch \
+           file://0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \
+           file://0013-64-bit-multilib-hack.patch \
+           file://0014-optional-libstdc.patch \
+           file://0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \
+           file://0016-COLLECT_GCC_OPTIONS.patch \
+           file://0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \
+           file://0018-fortran-cross-compile-hack.patch \
+           file://0019-libgcc-sjlj-check.patch \
+           file://0020-cpp-honor-sysroot.patch \
+           file://0021-MIPS64-Default-to-N64-ABI.patch \
+           file://0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \
+           file://0023-gcc-Fix-argument-list-too-long-error.patch \
+           file://0024-Disable-sdt.patch \
+           file://0025-libtool.patch \
+           file://0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \
+           file://0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch \
+           file://0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \
+           file://0029-export-CPP.patch \
+           file://0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch \
+           file://0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \
+           file://0032-Ensure-target-gcc-headers-can-be-included.patch \
+           file://0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \
+           file://0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch \
+           file://0035-Dont-link-the-plugins-with-libgomp-explicitly.patch \
+           file://0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \
+           file://0037-aarch64-Add-support-for-musl-ldso.patch \
+           file://0038-fix-g-sysroot.patch \
+           file://0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch \
+           file://0040-handle-sysroot-support-for-nativesdk-gcc.patch \
+           file://0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
+           file://0042-Fix-various-_FOR_BUILD-and-related-variables.patch \
+           file://0043-libstdc-Support-musl.patch \
+           file://0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch \
+           file://0045-Support-for-arm-linux-musl.patch \
+           file://0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch \
+           file://0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
+           file://0048-ssp_nonshared.patch \
+           file://0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch \
+           file://0050-powerpc-pass-secure-plt-to-the-linker.patch \
+           file://0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \
+           file://0052-nios2-use-ret-with-r31.patch \
+           file://0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch \
+           file://0054-support-ffile-prefix-map.patch \
+           file://0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
+           file://0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch \
+           file://0057-unwind-fix-for-musl.patch \
+           file://0058-fdebug-prefix-map-support-to-remap-relative-path.patch \
+"
+
+BACKPORTS = ""
+
+SRC_URI[md5sum] = "c9616fd448f980259c31de613e575719"
+SRC_URI[sha256sum] = "b84f5592e9218b73dbae612b5253035a7b34a9a1f7688d2e1bfaaf7267d5c4db"
+
+#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${SNAP}"
+S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
+
+# Language Overrides
+FORTRAN = ""
+JAVA = ""
+
+LTO = "--enable-lto"
+
+EXTRA_OECONF_BASE = "\
+    ${LTO} \
+    --enable-libssp \
+    --enable-libitm \
+    --disable-bootstrap \
+    --disable-libmudflap \
+    --with-system-zlib \
+    --with-linker-hash-style=${LINKER_HASH_STYLE} \
+    --enable-linker-build-id \
+    --with-ppl=no \
+    --with-cloog=no \
+    --enable-checking=release \
+    --enable-cheaders=c_global \
+    --without-isl \
+"
+
+EXTRA_OECONF_INITIAL = "\
+    --disable-libmudflap \
+    --disable-libgomp \
+    --disable-libitm \
+    --disable-libquadmath \
+    --with-system-zlib \
+    --disable-lto \
+    --disable-plugin \
+    --enable-decimal-float=no \
+    --without-isl \
+    gcc_cv_libc_provides_ssp=yes \
+"
+
+EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
+
+EXTRA_OECONF_PATHS = "\
+    --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
+    --with-sysroot=/not/exist \
+    --with-build-sysroot=${STAGING_DIR_TARGET} \
+"
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
new file mode 100644
index 0000000..1aead96
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
@@ -0,0 +1,42 @@
+From 6029bb338305a5d1403ee23427ed8d58eae1ff53 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:37:11 +0400
+Subject: [PATCH 01/46] gcc-4.3.1: ARCH_FLAGS_FOR_TARGET
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ configure    | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index a3f66ba..1cba3a9 100755
+--- a/configure
++++ b/configure
+@@ -7464,7 +7464,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+ 
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+  *" newlib "*)
+   case " $target_configargs " in
+diff --git a/configure.ac b/configure.ac
+index 987dfab..d3adb95 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3104,7 +3104,7 @@ fi
+ # for target_alias and gcc doesn't manage it consistently.
+ target_configargs="--cache-file=./config.cache ${target_configargs}"
+ 
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+  *" newlib "*)
+   case " $target_configargs " in
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0002-uclibc-conf.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0002-uclibc-conf.patch
new file mode 100644
index 0000000..8d6aeb5
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0002-uclibc-conf.patch
@@ -0,0 +1,53 @@
+From b67c3a844bccec1766a7ec120e2d18cdcbc5f114 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:38:25 +0400
+Subject: [PATCH 02/46] uclibc-conf
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ contrib/regression/objs-gcc.sh | 4 ++++
+ libjava/classpath/ltconfig     | 4 ++--
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
+index 60b0497..6dc7ead 100755
+--- a/contrib/regression/objs-gcc.sh
++++ b/contrib/regression/objs-gcc.sh
+@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
+  then
+   make all-gdb all-dejagnu all-ld || exit 1
+   make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++  make all-gdb all-dejagnu all-ld || exit 1
++  make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+   make bootstrap || exit 1
+   make install || exit 1
+diff --git a/libjava/classpath/ltconfig b/libjava/classpath/ltconfig
+index 743d951..ae4ea60 100755
+--- a/libjava/classpath/ltconfig
++++ b/libjava/classpath/ltconfig
+@@ -603,7 +603,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+ 
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+ 
+@@ -1247,7 +1247,7 @@ linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+   ;;
+ 
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+   version_type=linux
+   need_lib_prefix=no
+   need_version=no
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch
new file mode 100644
index 0000000..bd03263
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0003-gcc-uclibc-locale-ctype_touplow_t.patch
@@ -0,0 +1,87 @@
+From 9bcb3a1848ff0f8990301ca09a25b15c2cf90c6f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:40:12 +0400
+Subject: [PATCH 03/46] gcc-uclibc-locale-ctype_touplow_t
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/config/locale/generic/c_locale.cc | 5 +++++
+ libstdc++-v3/config/locale/generic/c_locale.h  | 9 +++++++++
+ libstdc++-v3/config/os/gnu-linux/ctype_base.h  | 9 +++++++++
+ 3 files changed, 23 insertions(+)
+
+diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
+index 6da5f22..2f85c2f 100644
+--- a/libstdc++-v3/config/locale/generic/c_locale.cc
++++ b/libstdc++-v3/config/locale/generic/c_locale.cc
+@@ -263,5 +263,10 @@ _GLIBCXX_END_NAMESPACE_VERSION
+ #ifdef _GLIBCXX_LONG_DOUBLE_COMPAT
+ #define _GLIBCXX_LDBL_COMPAT(dbl, ldbl) \
+   extern "C" void ldbl (void) __attribute__ ((alias (#dbl)))
++#ifdef __UCLIBC__
++// This is because __c_locale is of type __ctype_touplow_t* which is short on uclibc. for glibc its int*
++_GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPs, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPs);
++#else
+ _GLIBCXX_LDBL_COMPAT(_ZSt14__convert_to_vIdEvPKcRT_RSt12_Ios_IostateRKPi, _ZSt14__convert_to_vIeEvPKcRT_RSt12_Ios_IostateRKPi);
++#endif
+ #endif // _GLIBCXX_LONG_DOUBLE_COMPAT
+diff --git a/libstdc++-v3/config/locale/generic/c_locale.h b/libstdc++-v3/config/locale/generic/c_locale.h
+index ee3ef86..7fd5485 100644
+--- a/libstdc++-v3/config/locale/generic/c_locale.h
++++ b/libstdc++-v3/config/locale/generic/c_locale.h
+@@ -40,13 +40,22 @@
+ 
+ #include <clocale>
+ 
++#ifdef __UCLIBC__
++#include <features.h>
++#include <ctype.h>
++#endif
++
+ #define _GLIBCXX_NUM_CATEGORIES 0
+ 
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ 
++#ifdef __UCLIBC__
++  typedef __ctype_touplow_t*	__c_locale;
++#else
+   typedef int*			__c_locale;
++#endif
+ 
+   // Convert numeric value of type double and long double to string and
+   // return length of string.  If vsnprintf is available use it, otherwise
+diff --git a/libstdc++-v3/config/os/gnu-linux/ctype_base.h b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
+index fd52b73..2627cf3 100644
+--- a/libstdc++-v3/config/os/gnu-linux/ctype_base.h
++++ b/libstdc++-v3/config/os/gnu-linux/ctype_base.h
+@@ -33,6 +33,11 @@
+ 
+ // Information as gleaned from /usr/include/ctype.h
+ 
++#ifdef __UCLIBC__
++#include <features.h>
++#include <ctype.h>
++#endif
++
+ namespace std _GLIBCXX_VISIBILITY(default)
+ {
+ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+@@ -41,7 +46,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+   struct ctype_base
+   {
+     // Non-standard typedefs.
++#ifdef __UCLIBC__
++    typedef const __ctype_touplow_t*	__to_type;
++#else
+     typedef const int* 		__to_type;
++#endif
+ 
+     // NB: Offsets into ctype<char>::_M_table force a particular size
+     // on the mask type. Because of this, we don't use an enum.
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0004-uclibc-locale.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0004-uclibc-locale.patch
new file mode 100644
index 0000000..656265a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0004-uclibc-locale.patch
@@ -0,0 +1,2862 @@
+From bd9dd472d162fc72522f96f70f6391c7c63d2bf7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:41:39 +0400
+Subject: [PATCH 04/46] uclibc-locale
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/acinclude.m4                          |  37 ++
+ .../config/locale/uclibc/c++locale_internal.h      |  63 ++
+ libstdc++-v3/config/locale/uclibc/c_locale.cc      | 160 +++++
+ libstdc++-v3/config/locale/uclibc/c_locale.h       | 117 ++++
+ .../config/locale/uclibc/codecvt_members.cc        | 308 +++++++++
+ .../config/locale/uclibc/collate_members.cc        |  80 +++
+ libstdc++-v3/config/locale/uclibc/ctype_members.cc | 300 +++++++++
+ .../config/locale/uclibc/messages_members.cc       | 100 +++
+ .../config/locale/uclibc/messages_members.h        | 118 ++++
+ .../config/locale/uclibc/monetary_members.cc       | 692 +++++++++++++++++++++
+ .../config/locale/uclibc/numeric_members.cc        | 160 +++++
+ libstdc++-v3/config/locale/uclibc/time_members.cc  | 406 ++++++++++++
+ libstdc++-v3/config/locale/uclibc/time_members.h   |  68 ++
+ libstdc++-v3/configure                             |  75 +++
+ libstdc++-v3/include/c_compatibility/wchar.h       |   2 +
+ libstdc++-v3/include/c_std/cwchar                  |   2 +
+ 16 files changed, 2688 insertions(+)
+ create mode 100644 libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+ create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/c_locale.h
+ create mode 100644 libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/collate_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/ctype_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/messages_members.h
+ create mode 100644 libstdc++-v3/config/locale/uclibc/monetary_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/numeric_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.cc
+ create mode 100644 libstdc++-v3/config/locale/uclibc/time_members.h
+
+diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
+index 826ef86..79cc716 100644
+--- a/libstdc++-v3/acinclude.m4
++++ b/libstdc++-v3/acinclude.m4
+@@ -2029,6 +2029,9 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+   # Default to "generic".
+   if test $enable_clocale_flag = auto; then
+     case ${target_os} in
++      *-uclibc*)
++        enable_clocale_flag=uclibc
++        ;;
+       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ 	enable_clocale_flag=gnu
+ 	;;
+@@ -2213,6 +2216,40 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+       CTIME_CC=config/locale/generic/time_members.cc
+       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+       ;;
++    uclibc)
++      AC_MSG_RESULT(uclibc)
++
++      # Declare intention to use gettext, and add support for specific
++      # languages.
++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++      ALL_LINGUAS="de fr"
++
++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++        USE_NLS=yes
++      fi
++      # Export the build objects.
++      for ling in $ALL_LINGUAS; do \
++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++      done
++      AC_SUBST(glibcxx_MOFILES)
++      AC_SUBST(glibcxx_POFILES)
++
++      CLOCALE_H=config/locale/uclibc/c_locale.h
++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++      CMESSAGES_H=config/locale/uclibc/messages_members.h
++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++      CTIME_H=config/locale/uclibc/time_members.h
++      CTIME_CC=config/locale/uclibc/time_members.cc
++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++      ;;
+   esac
+ 
+   # This is where the testsuite looks for locale catalogs, using the
+diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+new file mode 100644
+index 0000000..2ae3e4a
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+@@ -0,0 +1,63 @@
++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
++
++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++// Written by Jakub Jelinek <jakub@redhat.com>
++
++#include <bits/c++config.h>
++#include <clocale>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning clean this up
++#endif
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++
++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
++extern "C" __typeof(strcoll_l) __strcoll_l;
++extern "C" __typeof(strftime_l) __strftime_l;
++extern "C" __typeof(strtod_l) __strtod_l;
++extern "C" __typeof(strtof_l) __strtof_l;
++extern "C" __typeof(strtold_l) __strtold_l;
++extern "C" __typeof(strxfrm_l) __strxfrm_l;
++extern "C" __typeof(newlocale) __newlocale;
++extern "C" __typeof(freelocale) __freelocale;
++extern "C" __typeof(duplocale) __duplocale;
++extern "C" __typeof(uselocale) __uselocale;
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++extern "C" __typeof(iswctype_l) __iswctype_l;
++extern "C" __typeof(towlower_l) __towlower_l;
++extern "C" __typeof(towupper_l) __towupper_l;
++extern "C" __typeof(wcscoll_l) __wcscoll_l;
++extern "C" __typeof(wcsftime_l) __wcsftime_l;
++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
++extern "C" __typeof(wctype_l) __wctype_l;
++#endif
++
++#endif // GLIBC 2.3 and later
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+new file mode 100644
+index 0000000..5081dc1
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+@@ -0,0 +1,160 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8  Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <cerrno>  // For errno
++#include <locale>
++#include <stdexcept>
++#include <langinfo.h>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
++#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
++#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
++#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
++#define __strtof_l(S, E, L)         strtof((S), (E))
++#define __strtod_l(S, E, L)         strtod((S), (E))
++#define __strtold_l(S, E, L)        strtold((S), (E))
++#warning should dummy __newlocale check for C|POSIX ?
++#define __newlocale(a, b, c)        NULL
++#define __freelocale(a)             ((void)0)
++#define __duplocale(a)              __c_locale()
++#endif
++
++namespace std
++{
++  template<>
++    void
++    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
++		   const __c_locale& __cloc)
++    {
++      if (!(__err & ios_base::failbit))
++	{
++	  char* __sanity;
++	  errno = 0;
++	  float __f = __strtof_l(__s, &__sanity, __cloc);
++          if (__sanity != __s && errno != ERANGE)
++	    __v = __f;
++	  else
++	    __err |= ios_base::failbit;
++	}
++    }
++
++  template<>
++    void
++    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
++		   const __c_locale& __cloc)
++    {
++      if (!(__err & ios_base::failbit))
++	{
++	  char* __sanity;
++	  errno = 0;
++	  double __d = __strtod_l(__s, &__sanity, __cloc);
++          if (__sanity != __s && errno != ERANGE)
++	    __v = __d;
++	  else
++	    __err |= ios_base::failbit;
++	}
++    }
++
++  template<>
++    void
++    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
++		   const __c_locale& __cloc)
++    {
++      if (!(__err & ios_base::failbit))
++	{
++	  char* __sanity;
++	  errno = 0;
++	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
++          if (__sanity != __s && errno != ERANGE)
++	    __v = __ld;
++	  else
++	    __err |= ios_base::failbit;
++	}
++    }
++
++  void
++  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
++				    __c_locale __old)
++  {
++    __cloc = __newlocale(1 << LC_ALL, __s, __old);
++#ifdef __UCLIBC_HAS_XLOCALE__
++    if (!__cloc)
++      {
++	// This named locale is not supported by the underlying OS.
++	__throw_runtime_error(__N("locale::facet::_S_create_c_locale "
++			      "name not valid"));
++      }
++#endif
++  }
++
++  void
++  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
++  {
++    if (_S_get_c_locale() != __cloc)
++      __freelocale(__cloc);
++  }
++
++  __c_locale
++  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
++  { return __duplocale(__cloc); }
++} // namespace std
++
++namespace __gnu_cxx
++{
++  const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
++    {
++      "LC_CTYPE",
++      "LC_NUMERIC",
++      "LC_TIME",
++      "LC_COLLATE",
++      "LC_MONETARY",
++      "LC_MESSAGES",
++#if _GLIBCXX_NUM_CATEGORIES != 0
++      "LC_PAPER",
++      "LC_NAME",
++      "LC_ADDRESS",
++      "LC_TELEPHONE",
++      "LC_MEASUREMENT",
++      "LC_IDENTIFICATION"
++#endif
++    };
++}
++
++namespace std
++{
++  const char* const* const locale::_S_categories = __gnu_cxx::category_names;
++}  // namespace std
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
+new file mode 100644
+index 0000000..da07c1f
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
+@@ -0,0 +1,117 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8  Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifndef _C_LOCALE_H
++#define _C_LOCALE_H 1
++
++#pragma GCC system_header
++
++#include <cstring>              // get std::strlen
++#include <cstdio>               // get std::snprintf or std::sprintf
++#include <clocale>
++#include <langinfo.h>		// For codecvt
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this
++#endif
++#ifdef __UCLIBC_HAS_LOCALE__
++#include <iconv.h>		// For codecvt using iconv, iconv_t
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#include <libintl.h> 		// For messages
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning what is _GLIBCXX_C_LOCALE_GNU for
++#endif
++#define _GLIBCXX_C_LOCALE_GNU 1
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix categories
++#endif
++// #define _GLIBCXX_NUM_CATEGORIES 6
++#define _GLIBCXX_NUM_CATEGORIES 0
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++namespace __gnu_cxx
++{
++  extern "C" __typeof(uselocale) __uselocale;
++}
++#endif
++
++namespace std
++{
++#ifdef __UCLIBC_HAS_XLOCALE__
++  typedef __locale_t		__c_locale;
++#else
++  typedef int*			__c_locale;
++#endif
++
++  // Convert numeric value of type _Tv to string and return length of
++  // string.  If snprintf is available use it, otherwise fall back to
++  // the unsafe sprintf which, in general, can be dangerous and should
++  // be avoided.
++  template<typename _Tv>
++    int
++    __convert_from_v(char* __out,
++		     const int __size __attribute__ ((__unused__)),
++		     const char* __fmt,
++#ifdef __UCLIBC_HAS_XCLOCALE__
++		     _Tv __v, const __c_locale& __cloc, int __prec)
++    {
++      __c_locale __old = __gnu_cxx::__uselocale(__cloc);
++#else
++		     _Tv __v, const __c_locale&, int __prec)
++    {
++# ifdef __UCLIBC_HAS_LOCALE__
++      char* __old = std::setlocale(LC_ALL, NULL);
++      char* __sav = new char[std::strlen(__old) + 1];
++      std::strcpy(__sav, __old);
++      std::setlocale(LC_ALL, "C");
++# endif
++#endif
++
++      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++
++#ifdef __UCLIBC_HAS_XCLOCALE__
++      __gnu_cxx::__uselocale(__old);
++#elif defined __UCLIBC_HAS_LOCALE__
++      std::setlocale(LC_ALL, __sav);
++      delete [] __sav;
++#endif
++      return __ret;
++    }
++}
++
++#endif
+diff --git a/libstdc++-v3/config/locale/uclibc/codecvt_members.cc b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+new file mode 100644
+index 0000000..64aa962
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+@@ -0,0 +1,308 @@
++// std::codecvt implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <cstdlib>  // For MB_CUR_MAX
++#include <climits>  // For MB_LEN_MAX
++#include <bits/c++locale_internal.h>
++
++namespace std
++{
++  // Specializations.
++#ifdef _GLIBCXX_USE_WCHAR_T
++  codecvt_base::result
++  codecvt<wchar_t, char, mbstate_t>::
++  do_out(state_type& __state, const intern_type* __from,
++	 const intern_type* __from_end, const intern_type*& __from_next,
++	 extern_type* __to, extern_type* __to_end,
++	 extern_type*& __to_next) const
++  {
++    result __ret = ok;
++    state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++    // wcsnrtombs is *very* fast but stops if encounters NUL characters:
++    // in case we fall back to wcrtomb and then continue, in a loop.
++    // NB: wcsnrtombs is a GNU extension
++    for (__from_next = __from, __to_next = __to;
++	 __from_next < __from_end && __to_next < __to_end
++	 && __ret == ok;)
++      {
++	const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
++						      __from_end - __from_next);
++	if (!__from_chunk_end)
++	  __from_chunk_end = __from_end;
++
++	__from = __from_next;
++	const size_t __conv = wcsnrtombs(__to_next, &__from_next,
++					 __from_chunk_end - __from_next,
++					 __to_end - __to_next, &__state);
++	if (__conv == static_cast<size_t>(-1))
++	  {
++	    // In case of error, in order to stop at the exact place we
++	    // have to start again from the beginning with a series of
++	    // wcrtomb.
++	    for (; __from < __from_next; ++__from)
++	      __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
++	    __state = __tmp_state;
++	    __ret = error;
++	  }
++	else if (__from_next && __from_next < __from_chunk_end)
++	  {
++	    __to_next += __conv;
++	    __ret = partial;
++	  }
++	else
++	  {
++	    __from_next = __from_chunk_end;
++	    __to_next += __conv;
++	  }
++
++	if (__from_next < __from_end && __ret == ok)
++	  {
++	    extern_type __buf[MB_LEN_MAX];
++	    __tmp_state = __state;
++	    const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
++	    if (__conv > static_cast<size_t>(__to_end - __to_next))
++	      __ret = partial;
++	    else
++	      {
++		memcpy(__to_next, __buf, __conv);
++		__state = __tmp_state;
++		__to_next += __conv;
++		++__from_next;
++	      }
++	  }
++      }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++
++    return __ret;
++  }
++
++  codecvt_base::result
++  codecvt<wchar_t, char, mbstate_t>::
++  do_in(state_type& __state, const extern_type* __from,
++	const extern_type* __from_end, const extern_type*& __from_next,
++	intern_type* __to, intern_type* __to_end,
++	intern_type*& __to_next) const
++  {
++    result __ret = ok;
++    state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++    // in case we store a L'\0' and then continue, in a loop.
++    // NB: mbsnrtowcs is a GNU extension
++    for (__from_next = __from, __to_next = __to;
++	 __from_next < __from_end && __to_next < __to_end
++	 && __ret == ok;)
++      {
++	const extern_type* __from_chunk_end;
++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
++								  __from_end
++								  - __from_next));
++	if (!__from_chunk_end)
++	  __from_chunk_end = __from_end;
++
++	__from = __from_next;
++	size_t __conv = mbsnrtowcs(__to_next, &__from_next,
++				   __from_chunk_end - __from_next,
++				   __to_end - __to_next, &__state);
++	if (__conv == static_cast<size_t>(-1))
++	  {
++	    // In case of error, in order to stop at the exact place we
++	    // have to start again from the beginning with a series of
++	    // mbrtowc.
++	    for (;; ++__to_next, __from += __conv)
++	      {
++		__conv = mbrtowc(__to_next, __from, __from_end - __from,
++				 &__tmp_state);
++		if (__conv == static_cast<size_t>(-1)
++		    || __conv == static_cast<size_t>(-2))
++		  break;
++	      }
++	    __from_next = __from;
++	    __state = __tmp_state;
++	    __ret = error;
++	  }
++	else if (__from_next && __from_next < __from_chunk_end)
++	  {
++	    // It is unclear what to return in this case (see DR 382).
++	    __to_next += __conv;
++	    __ret = partial;
++	  }
++	else
++	  {
++	    __from_next = __from_chunk_end;
++	    __to_next += __conv;
++	  }
++
++	if (__from_next < __from_end && __ret == ok)
++	  {
++	    if (__to_next < __to_end)
++	      {
++		// XXX Probably wrong for stateful encodings
++		__tmp_state = __state;
++		++__from_next;
++		*__to_next++ = L'\0';
++	      }
++	    else
++	      __ret = partial;
++	  }
++      }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++
++    return __ret;
++  }
++
++  int
++  codecvt<wchar_t, char, mbstate_t>::
++  do_encoding() const throw()
++  {
++    // XXX This implementation assumes that the encoding is
++    // stateless and is either single-byte or variable-width.
++    int __ret = 0;
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++    if (MB_CUR_MAX == 1)
++      __ret = 1;
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++    return __ret;
++  }
++
++  int
++  codecvt<wchar_t, char, mbstate_t>::
++  do_max_length() const throw()
++  {
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++    // XXX Probably wrong for stateful encodings.
++    int __ret = MB_CUR_MAX;
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++    return __ret;
++  }
++
++  int
++  codecvt<wchar_t, char, mbstate_t>::
++  do_length(state_type& __state, const extern_type* __from,
++	    const extern_type* __end, size_t __max) const
++  {
++    int __ret = 0;
++    state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++    // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++    // in case we advance past it and then continue, in a loop.
++    // NB: mbsnrtowcs is a GNU extension
++
++    // A dummy internal buffer is needed in order for mbsnrtocws to consider
++    // its fourth parameter (it wouldn't with NULL as first parameter).
++    wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
++							   * __max));
++    while (__from < __end && __max)
++      {
++	const extern_type* __from_chunk_end;
++	__from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
++								  __end
++								  - __from));
++	if (!__from_chunk_end)
++	  __from_chunk_end = __end;
++
++	const extern_type* __tmp_from = __from;
++	size_t __conv = mbsnrtowcs(__to, &__from,
++				   __from_chunk_end - __from,
++				   __max, &__state);
++	if (__conv == static_cast<size_t>(-1))
++	  {
++	    // In case of error, in order to stop at the exact place we
++	    // have to start again from the beginning with a series of
++	    // mbrtowc.
++	    for (__from = __tmp_from;; __from += __conv)
++	      {
++		__conv = mbrtowc(NULL, __from, __end - __from,
++				 &__tmp_state);
++		if (__conv == static_cast<size_t>(-1)
++		    || __conv == static_cast<size_t>(-2))
++		  break;
++	      }
++	    __state = __tmp_state;
++	    __ret += __from - __tmp_from;
++	    break;
++	  }
++	if (!__from)
++	  __from = __from_chunk_end;
++
++	__ret += __from - __tmp_from;
++	__max -= __conv;
++
++	if (__from < __end && __max)
++	  {
++	    // XXX Probably wrong for stateful encodings
++	    __tmp_state = __state;
++	    ++__from;
++	    ++__ret;
++	    --__max;
++	  }
++      }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++
++    return __ret;
++  }
++#endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
+new file mode 100644
+index 0000000..c2664a7
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
+@@ -0,0 +1,80 @@
++// std::collate implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.4.1.2  collate virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
++#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
++#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
++#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
++#endif
++
++namespace std
++{
++  // These are basically extensions to char_traits, and perhaps should
++  // be put there instead of here.
++  template<>
++    int
++    collate<char>::_M_compare(const char* __one, const char* __two) const
++    {
++      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++    }
++
++  template<>
++    size_t
++    collate<char>::_M_transform(char* __to, const char* __from,
++				size_t __n) const
++    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++  template<>
++    int
++    collate<wchar_t>::_M_compare(const wchar_t* __one,
++				 const wchar_t* __two) const
++    {
++      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
++      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++    }
++
++  template<>
++    size_t
++    collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
++				   size_t __n) const
++    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++#endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+new file mode 100644
+index 0000000..7294e3a
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+@@ -0,0 +1,300 @@
++// std::ctype implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.1.2  ctype virtual functions.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __wctype_l(S, L)           wctype((S))
++#define __towupper_l(C, L)         towupper((C))
++#define __towlower_l(C, L)         towlower((C))
++#define __iswctype_l(C, M, L)      iswctype((C), (M))
++#endif
++
++namespace std
++{
++  // NB: The other ctype<char> specializations are in src/locale.cc and
++  // various /config/os/* files.
++  template<>
++    ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
++    : ctype<char>(0, false, __refs)
++    {
++      if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++	{
++	  this->_S_destroy_c_locale(this->_M_c_locale_ctype);
++	  this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
++#ifdef __UCLIBC_HAS_XLOCALE__
++	  this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
++	  this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
++	  this->_M_table = this->_M_c_locale_ctype->__ctype_b;
++#endif
++	}
++    }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++  ctype<wchar_t>::__wmask_type
++  ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
++  {
++    __wmask_type __ret;
++    switch (__m)
++      {
++      case space:
++	__ret = __wctype_l("space", _M_c_locale_ctype);
++	break;
++      case print:
++	__ret = __wctype_l("print", _M_c_locale_ctype);
++	break;
++      case cntrl:
++	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
++	break;
++      case upper:
++	__ret = __wctype_l("upper", _M_c_locale_ctype);
++	break;
++      case lower:
++	__ret = __wctype_l("lower", _M_c_locale_ctype);
++	break;
++      case alpha:
++	__ret = __wctype_l("alpha", _M_c_locale_ctype);
++	break;
++      case digit:
++	__ret = __wctype_l("digit", _M_c_locale_ctype);
++	break;
++      case punct:
++	__ret = __wctype_l("punct", _M_c_locale_ctype);
++	break;
++      case xdigit:
++	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
++	break;
++      case alnum:
++	__ret = __wctype_l("alnum", _M_c_locale_ctype);
++	break;
++      case graph:
++	__ret = __wctype_l("graph", _M_c_locale_ctype);
++	break;
++      default:
++	__ret = __wmask_type();
++      }
++    return __ret;
++  }
++
++  wchar_t
++  ctype<wchar_t>::do_toupper(wchar_t __c) const
++  { return __towupper_l(__c, _M_c_locale_ctype); }
++
++  const wchar_t*
++  ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
++  {
++    while (__lo < __hi)
++      {
++        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
++        ++__lo;
++      }
++    return __hi;
++  }
++
++  wchar_t
++  ctype<wchar_t>::do_tolower(wchar_t __c) const
++  { return __towlower_l(__c, _M_c_locale_ctype); }
++
++  const wchar_t*
++  ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
++  {
++    while (__lo < __hi)
++      {
++        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
++        ++__lo;
++      }
++    return __hi;
++  }
++
++  bool
++  ctype<wchar_t>::
++  do_is(mask __m, wchar_t __c) const
++  {
++    // Highest bitmask in ctype_base == 10, but extra in "C"
++    // library for blank.
++    bool __ret = false;
++    const size_t __bitmasksize = 11;
++    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++      if (__m & _M_bit[__bitcur]
++	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++	{
++	  __ret = true;
++	  break;
++	}
++    return __ret;
++  }
++
++  const wchar_t*
++  ctype<wchar_t>::
++  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
++  {
++    for (; __lo < __hi; ++__vec, ++__lo)
++      {
++	// Highest bitmask in ctype_base == 10, but extra in "C"
++	// library for blank.
++	const size_t __bitmasksize = 11;
++	mask __m = 0;
++	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++	  if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
++	    __m |= _M_bit[__bitcur];
++	*__vec = __m;
++      }
++    return __hi;
++  }
++
++  const wchar_t*
++  ctype<wchar_t>::
++  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
++  {
++    while (__lo < __hi && !this->do_is(__m, *__lo))
++      ++__lo;
++    return __lo;
++  }
++
++  const wchar_t*
++  ctype<wchar_t>::
++  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
++  {
++    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
++      ++__lo;
++    return __lo;
++  }
++
++  wchar_t
++  ctype<wchar_t>::
++  do_widen(char __c) const
++  { return _M_widen[static_cast<unsigned char>(__c)]; }
++
++  const char*
++  ctype<wchar_t>::
++  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
++  {
++    while (__lo < __hi)
++      {
++	*__dest = _M_widen[static_cast<unsigned char>(*__lo)];
++	++__lo;
++	++__dest;
++      }
++    return __hi;
++  }
++
++  char
++  ctype<wchar_t>::
++  do_narrow(wchar_t __wc, char __dfault) const
++  {
++    if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
++      return _M_narrow[__wc];
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++    const int __c = wctob(__wc);
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++    return (__c == EOF ? __dfault : static_cast<char>(__c));
++  }
++
++  const wchar_t*
++  ctype<wchar_t>::
++  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
++	    char* __dest) const
++  {
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++    if (_M_narrow_ok)
++      while (__lo < __hi)
++	{
++	  if (*__lo >= 0 && *__lo < 128)
++	    *__dest = _M_narrow[*__lo];
++	  else
++	    {
++	      const int __c = wctob(*__lo);
++	      *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++	    }
++	  ++__lo;
++	  ++__dest;
++	}
++    else
++      while (__lo < __hi)
++	{
++	  const int __c = wctob(*__lo);
++	  *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++	  ++__lo;
++	  ++__dest;
++	}
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++    return __hi;
++  }
++
++  void
++  ctype<wchar_t>::_M_initialize_ctype()
++  {
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++    wint_t __i;
++    for (__i = 0; __i < 128; ++__i)
++      {
++	const int __c = wctob(__i);
++	if (__c == EOF)
++	  break;
++	else
++	  _M_narrow[__i] = static_cast<char>(__c);
++      }
++    if (__i == 128)
++      _M_narrow_ok = true;
++    else
++      _M_narrow_ok = false;
++    for (size_t __j = 0;
++	 __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
++      _M_widen[__j] = btowc(__j);
++
++    for (size_t __k = 0; __k <= 11; ++__k)
++      {
++	_M_bit[__k] = static_cast<mask>(_ISbit(__k));
++	_M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
++      }
++#ifdef __UCLIBC_HAS_XLOCALE__
++    __uselocale(__old);
++#endif
++  }
++#endif //  _GLIBCXX_USE_WCHAR_T
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
+new file mode 100644
+index 0000000..13594d9
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
+@@ -0,0 +1,100 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2  messages virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix gettext stuff
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__dcgettext(const char *domainname,
++			     const char *msgid, int category);
++#undef gettext
++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#else
++#undef gettext
++#define gettext(msgid) (msgid)
++#endif
++
++namespace std
++{
++  // Specializations.
++  template<>
++    string
++    messages<char>::do_get(catalog, int, int, const string& __dfault) const
++    {
++#ifdef __UCLIBC_HAS_XLOCALE__
++      __c_locale __old = __uselocale(_M_c_locale_messages);
++      const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
++      __uselocale(__old);
++      return string(__msg);
++#elif defined __UCLIBC_HAS_LOCALE__
++      char* __old = strdup(setlocale(LC_ALL, NULL));
++      setlocale(LC_ALL, _M_name_messages);
++      const char* __msg = gettext(__dfault.c_str());
++      setlocale(LC_ALL, __old);
++      free(__old);
++      return string(__msg);
++#else
++      const char* __msg = gettext(__dfault.c_str());
++      return string(__msg);
++#endif
++    }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++  template<>
++    wstring
++    messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
++    {
++# ifdef __UCLIBC_HAS_XLOCALE__
++      __c_locale __old = __uselocale(_M_c_locale_messages);
++      char* __msg = gettext(_M_convert_to_char(__dfault));
++      __uselocale(__old);
++      return _M_convert_from_char(__msg);
++# elif defined __UCLIBC_HAS_LOCALE__
++      char* __old = strdup(setlocale(LC_ALL, NULL));
++      setlocale(LC_ALL, _M_name_messages);
++      char* __msg = gettext(_M_convert_to_char(__dfault));
++      setlocale(LC_ALL, __old);
++      free(__old);
++      return _M_convert_from_char(__msg);
++# else
++      char* __msg = gettext(_M_convert_to_char(__dfault));
++      return _M_convert_from_char(__msg);
++# endif
++    }
++#endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
+new file mode 100644
+index 0000000..1424078
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
+@@ -0,0 +1,118 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2  messages functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix prototypes for *textdomain funcs
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__textdomain(const char *domainname);
++extern "C" char *__bindtextdomain(const char *domainname,
++				  const char *dirname);
++#else
++#undef __textdomain
++#undef __bindtextdomain
++#define __textdomain(D)           ((void)0)
++#define __bindtextdomain(D,P)     ((void)0)
++#endif
++
++  // Non-virtual member functions.
++  template<typename _CharT>
++     messages<_CharT>::messages(size_t __refs)
++     : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
++     _M_name_messages(_S_get_c_name())
++     { }
++
++  template<typename _CharT>
++     messages<_CharT>::messages(__c_locale __cloc, const char* __s,
++				size_t __refs)
++     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
++     _M_name_messages(__s)
++     {
++       char* __tmp = new char[std::strlen(__s) + 1];
++       std::strcpy(__tmp, __s);
++       _M_name_messages = __tmp;
++     }
++
++  template<typename _CharT>
++    typename messages<_CharT>::catalog
++    messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
++			   const char* __dir) const
++    {
++      __bindtextdomain(__s.c_str(), __dir);
++      return this->do_open(__s, __loc);
++    }
++
++  // Virtual member functions.
++  template<typename _CharT>
++    messages<_CharT>::~messages()
++    {
++      if (_M_name_messages != _S_get_c_name())
++	delete [] _M_name_messages;
++      _S_destroy_c_locale(_M_c_locale_messages);
++    }
++
++  template<typename _CharT>
++    typename messages<_CharT>::catalog
++    messages<_CharT>::do_open(const basic_string<char>& __s,
++			      const locale&) const
++    {
++      // No error checking is done, assume the catalog exists and can
++      // be used.
++      __textdomain(__s.c_str());
++      return 0;
++    }
++
++  template<typename _CharT>
++    void
++    messages<_CharT>::do_close(catalog) const
++    { }
++
++   // messages_byname
++   template<typename _CharT>
++     messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
++     : messages<_CharT>(__refs)
++     {
++       if (this->_M_name_messages != locale::facet::_S_get_c_name())
++	 delete [] this->_M_name_messages;
++       char* __tmp = new char[std::strlen(__s) + 1];
++       std::strcpy(__tmp, __s);
++       this->_M_name_messages = __tmp;
++
++       if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++	 {
++	   this->_S_destroy_c_locale(this->_M_c_locale_messages);
++	   this->_S_create_c_locale(this->_M_c_locale_messages, __s);
++	 }
++     }
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+new file mode 100644
+index 0000000..aa52731
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -0,0 +1,692 @@
++// std::moneypunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.6.3.2  moneypunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning optimize this for uclibc
++#warning tailor for stub locale support
++#endif
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
++#endif
++
++namespace std
++{
++  // Construct and return valid pattern consisting of some combination of:
++  // space none symbol sign value
++  money_base::pattern
++  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
++  {
++    pattern __ret;
++
++    // This insanely complicated routine attempts to construct a valid
++    // pattern for use with monyepunct. A couple of invariants:
++
++    // if (__precedes) symbol -> value
++    // else value -> symbol
++
++    // if (__space) space
++    // else none
++
++    // none == never first
++    // space never first or last
++
++    // Any elegant implementations of this are welcome.
++    switch (__posn)
++      {
++      case 0:
++      case 1:
++	// 1 The sign precedes the value and symbol.
++	__ret.field[0] = sign;
++	if (__space)
++	  {
++	    // Pattern starts with sign.
++	    if (__precedes)
++	      {
++		__ret.field[1] = symbol;
++		__ret.field[3] = value;
++	      }
++	    else
++	      {
++		__ret.field[1] = value;
++		__ret.field[3] = symbol;
++	      }
++	    __ret.field[2] = space;
++	  }
++	else
++	  {
++	    // Pattern starts with sign and ends with none.
++	    if (__precedes)
++	      {
++		__ret.field[1] = symbol;
++		__ret.field[2] = value;
++	      }
++	    else
++	      {
++		__ret.field[1] = value;
++		__ret.field[2] = symbol;
++	      }
++	    __ret.field[3] = none;
++	  }
++	break;
++      case 2:
++	// 2 The sign follows the value and symbol.
++	if (__space)
++	  {
++	    // Pattern either ends with sign.
++	    if (__precedes)
++	      {
++		__ret.field[0] = symbol;
++		__ret.field[2] = value;
++	      }
++	    else
++	      {
++		__ret.field[0] = value;
++		__ret.field[2] = symbol;
++	      }
++	    __ret.field[1] = space;
++	    __ret.field[3] = sign;
++	  }
++	else
++	  {
++	    // Pattern ends with sign then none.
++	    if (__precedes)
++	      {
++		__ret.field[0] = symbol;
++		__ret.field[1] = value;
++	      }
++	    else
++	      {
++		__ret.field[0] = value;
++		__ret.field[1] = symbol;
++	      }
++	    __ret.field[2] = sign;
++	    __ret.field[3] = none;
++	  }
++	break;
++      case 3:
++	// 3 The sign immediately precedes the symbol.
++	if (__precedes)
++	  {
++	    __ret.field[0] = sign;
++	    __ret.field[1] = symbol;
++	    if (__space)
++	      {
++		__ret.field[2] = space;
++		__ret.field[3] = value;
++	      }
++	    else
++	      {
++		__ret.field[2] = value;
++		__ret.field[3] = none;
++	      }
++	  }
++	else
++	  {
++	    __ret.field[0] = value;
++	    if (__space)
++	      {
++		__ret.field[1] = space;
++		__ret.field[2] = sign;
++		__ret.field[3] = symbol;
++	      }
++	    else
++	      {
++		__ret.field[1] = sign;
++		__ret.field[2] = symbol;
++		__ret.field[3] = none;
++	      }
++	  }
++	break;
++      case 4:
++	// 4 The sign immediately follows the symbol.
++	if (__precedes)
++	  {
++	    __ret.field[0] = symbol;
++	    __ret.field[1] = sign;
++	    if (__space)
++	      {
++		__ret.field[2] = space;
++		__ret.field[3] = value;
++	      }
++	    else
++	      {
++		__ret.field[2] = value;
++		__ret.field[3] = none;
++	      }
++	  }
++	else
++	  {
++	    __ret.field[0] = value;
++	    if (__space)
++	      {
++		__ret.field[1] = space;
++		__ret.field[2] = symbol;
++		__ret.field[3] = sign;
++	      }
++	    else
++	      {
++		__ret.field[1] = symbol;
++		__ret.field[2] = sign;
++		__ret.field[3] = none;
++	      }
++	  }
++	break;
++      default:
++	;
++      }
++    return __ret;
++  }
++
++  template<>
++    void
++    moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
++						     const char*)
++    {
++      if (!_M_data)
++	_M_data = new __moneypunct_cache<char, true>;
++
++      if (!__cloc)
++	{
++	  // "C" locale
++	  _M_data->_M_decimal_point = '.';
++	  _M_data->_M_thousands_sep = ',';
++	  _M_data->_M_grouping = "";
++	  _M_data->_M_grouping_size = 0;
++	  _M_data->_M_curr_symbol = "";
++	  _M_data->_M_curr_symbol_size = 0;
++	  _M_data->_M_positive_sign = "";
++	  _M_data->_M_positive_sign_size = 0;
++	  _M_data->_M_negative_sign = "";
++	  _M_data->_M_negative_sign_size = 0;
++	  _M_data->_M_frac_digits = 0;
++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++	}
++      else
++	{
++	  // Named locale.
++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++							__cloc));
++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++							__cloc));
++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++	  if (!__nposn)
++	    _M_data->_M_negative_sign = "()";
++	  else
++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++							__cloc);
++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++	  // _Intl == true
++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++						      __cloc));
++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++							__pposn);
++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++							__nposn);
++	}
++    }
++
++  template<>
++    void
++    moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
++						      const char*)
++    {
++      if (!_M_data)
++	_M_data = new __moneypunct_cache<char, false>;
++
++      if (!__cloc)
++	{
++	  // "C" locale
++	  _M_data->_M_decimal_point = '.';
++	  _M_data->_M_thousands_sep = ',';
++	  _M_data->_M_grouping = "";
++	  _M_data->_M_grouping_size = 0;
++	  _M_data->_M_curr_symbol = "";
++	  _M_data->_M_curr_symbol_size = 0;
++	  _M_data->_M_positive_sign = "";
++	  _M_data->_M_positive_sign_size = 0;
++	  _M_data->_M_negative_sign = "";
++	  _M_data->_M_negative_sign_size = 0;
++	  _M_data->_M_frac_digits = 0;
++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++	    _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++	}
++      else
++	{
++	  // Named locale.
++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++							__cloc));
++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++							__cloc));
++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++	  _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++	  _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++	  if (!__nposn)
++	    _M_data->_M_negative_sign = "()";
++	  else
++	    _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++							__cloc);
++	  _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++	  // _Intl == false
++	  _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++	  _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++							__pposn);
++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++							__nposn);
++	}
++    }
++
++  template<>
++    moneypunct<char, true>::~moneypunct()
++    { delete _M_data; }
++
++  template<>
++    moneypunct<char, false>::~moneypunct()
++    { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++  template<>
++    void
++    moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++							const char*)
++#else
++							const char* __name)
++#endif
++    {
++      if (!_M_data)
++	_M_data = new __moneypunct_cache<wchar_t, true>;
++
++      if (!__cloc)
++	{
++	  // "C" locale
++	  _M_data->_M_decimal_point = L'.';
++	  _M_data->_M_thousands_sep = L',';
++	  _M_data->_M_grouping = "";
++	  _M_data->_M_grouping_size = 0;
++	  _M_data->_M_curr_symbol = L"";
++	  _M_data->_M_curr_symbol_size = 0;
++	  _M_data->_M_positive_sign = L"";
++	  _M_data->_M_positive_sign_size = 0;
++	  _M_data->_M_negative_sign = L"";
++	  _M_data->_M_negative_sign_size = 0;
++	  _M_data->_M_frac_digits = 0;
++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++	  // Use ctype::widen code without the facet...
++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++	    _M_data->_M_atoms[__i] =
++	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
++	}
++      else
++	{
++	  // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++	  __c_locale __old = __uselocale(__cloc);
++#else
++	  // Switch to named locale so that mbsrtowcs will work.
++	  char* __old = strdup(setlocale(LC_ALL, NULL));
++	  setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++	  union { char *__s; wchar_t __w; } __u;
++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++	  _M_data->_M_decimal_point = __u.__w;
++
++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++	  _M_data->_M_thousands_sep = __u.__w;
++#endif
++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++
++	  wchar_t* __wcs_ps = 0;
++	  wchar_t* __wcs_ns = 0;
++	  const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++	  try
++	    {
++	      mbstate_t __state;
++	      size_t __len = strlen(__cpossign);
++	      if (__len)
++		{
++		  ++__len;
++		  memset(&__state, 0, sizeof(mbstate_t));
++		  __wcs_ps = new wchar_t[__len];
++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++		  _M_data->_M_positive_sign = __wcs_ps;
++		}
++	      else
++		_M_data->_M_positive_sign = L"";
++	      _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++	      __len = strlen(__cnegsign);
++	      if (!__nposn)
++		_M_data->_M_negative_sign = L"()";
++	      else if (__len)
++		{
++		  ++__len;
++		  memset(&__state, 0, sizeof(mbstate_t));
++		  __wcs_ns = new wchar_t[__len];
++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++		  _M_data->_M_negative_sign = __wcs_ns;
++		}
++	      else
++		_M_data->_M_negative_sign = L"";
++	      _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++	      // _Intl == true.
++	      __len = strlen(__ccurr);
++	      if (__len)
++		{
++		  ++__len;
++		  memset(&__state, 0, sizeof(mbstate_t));
++		  wchar_t* __wcs = new wchar_t[__len];
++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++		  _M_data->_M_curr_symbol = __wcs;
++		}
++	      else
++		_M_data->_M_curr_symbol = L"";
++	      _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++	    }
++	  catch (...)
++	    {
++	      delete _M_data;
++	      _M_data = 0;
++	      delete __wcs_ps;
++	      delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++	      __uselocale(__old);
++#else
++	      setlocale(LC_ALL, __old);
++	      free(__old);
++#endif
++	      __throw_exception_again;
++	    }
++
++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++						      __cloc));
++	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++							__pposn);
++	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++							__nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++	  __uselocale(__old);
++#else
++	  setlocale(LC_ALL, __old);
++	  free(__old);
++#endif
++	}
++    }
++
++  template<>
++  void
++  moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++						       const char*)
++#else
++                                                       const char* __name)
++#endif
++  {
++    if (!_M_data)
++      _M_data = new __moneypunct_cache<wchar_t, false>;
++
++    if (!__cloc)
++	{
++	  // "C" locale
++	  _M_data->_M_decimal_point = L'.';
++	  _M_data->_M_thousands_sep = L',';
++	  _M_data->_M_grouping = "";
++          _M_data->_M_grouping_size = 0;
++	  _M_data->_M_curr_symbol = L"";
++	  _M_data->_M_curr_symbol_size = 0;
++	  _M_data->_M_positive_sign = L"";
++	  _M_data->_M_positive_sign_size = 0;
++	  _M_data->_M_negative_sign = L"";
++	  _M_data->_M_negative_sign_size = 0;
++	  _M_data->_M_frac_digits = 0;
++	  _M_data->_M_pos_format = money_base::_S_default_pattern;
++	  _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++	  // Use ctype::widen code without the facet...
++	  for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++	    _M_data->_M_atoms[__i] =
++	      static_cast<wchar_t>(money_base::_S_atoms[__i]);
++	}
++      else
++	{
++	  // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++	  __c_locale __old = __uselocale(__cloc);
++#else
++	  // Switch to named locale so that mbsrtowcs will work.
++	  char* __old = strdup(setlocale(LC_ALL, NULL));
++	  setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++          union { char *__s; wchar_t __w; } __u;
++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++	  _M_data->_M_decimal_point = __u.__w;
++
++	  __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++	  _M_data->_M_thousands_sep = __u.__w;
++#endif
++	  _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++          _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++
++	  wchar_t* __wcs_ps = 0;
++	  wchar_t* __wcs_ns = 0;
++	  const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++	  try
++            {
++              mbstate_t __state;
++              size_t __len;
++              __len = strlen(__cpossign);
++              if (__len)
++                {
++		  ++__len;
++		  memset(&__state, 0, sizeof(mbstate_t));
++		  __wcs_ps = new wchar_t[__len];
++		  mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++		  _M_data->_M_positive_sign = __wcs_ps;
++		}
++	      else
++		_M_data->_M_positive_sign = L"";
++              _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++	      __len = strlen(__cnegsign);
++	      if (!__nposn)
++		_M_data->_M_negative_sign = L"()";
++	      else if (__len)
++		{
++		  ++__len;
++		  memset(&__state, 0, sizeof(mbstate_t));
++		  __wcs_ns = new wchar_t[__len];
++		  mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++		  _M_data->_M_negative_sign = __wcs_ns;
++		}
++	      else
++		_M_data->_M_negative_sign = L"";
++              _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++	      // _Intl == true.
++	      __len = strlen(__ccurr);
++	      if (__len)
++		{
++		  ++__len;
++		  memset(&__state, 0, sizeof(mbstate_t));
++		  wchar_t* __wcs = new wchar_t[__len];
++		  mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++		  _M_data->_M_curr_symbol = __wcs;
++		}
++	      else
++		_M_data->_M_curr_symbol = L"";
++              _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++	    }
++          catch (...)
++	    {
++	      delete _M_data;
++              _M_data = 0;
++	      delete __wcs_ps;
++	      delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++	      __uselocale(__old);
++#else
++	      setlocale(LC_ALL, __old);
++	      free(__old);
++#endif
++              __throw_exception_again;
++	    }
++
++	  _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++	  _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++	                                                __pposn);
++	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++	  _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++	                                                __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++	  __uselocale(__old);
++#else
++	  setlocale(LC_ALL, __old);
++	  free(__old);
++#endif
++	}
++    }
++
++  template<>
++    moneypunct<wchar_t, true>::~moneypunct()
++    {
++      if (_M_data->_M_positive_sign_size)
++	delete [] _M_data->_M_positive_sign;
++      if (_M_data->_M_negative_sign_size
++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++	delete [] _M_data->_M_negative_sign;
++      if (_M_data->_M_curr_symbol_size)
++	delete [] _M_data->_M_curr_symbol;
++      delete _M_data;
++    }
++
++  template<>
++    moneypunct<wchar_t, false>::~moneypunct()
++    {
++      if (_M_data->_M_positive_sign_size)
++	delete [] _M_data->_M_positive_sign;
++      if (_M_data->_M_negative_sign_size
++          && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++	delete [] _M_data->_M_negative_sign;
++      if (_M_data->_M_curr_symbol_size)
++	delete [] _M_data->_M_curr_symbol;
++      delete _M_data;
++    }
++#endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+new file mode 100644
+index 0000000..883ec1a
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -0,0 +1,160 @@
++// std::numpunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.3.1.2  numpunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
++#endif
++
++namespace std
++{
++  template<>
++    void
++    numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
++    {
++      if (!_M_data)
++	_M_data = new __numpunct_cache<char>;
++
++      if (!__cloc)
++	{
++	  // "C" locale
++	  _M_data->_M_grouping = "";
++	  _M_data->_M_grouping_size = 0;
++	  _M_data->_M_use_grouping = false;
++
++	  _M_data->_M_decimal_point = '.';
++	  _M_data->_M_thousands_sep = ',';
++
++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++	    _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
++
++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++	    _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
++	}
++      else
++	{
++	  // Named locale.
++	  _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
++							__cloc));
++	  _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
++							__cloc));
++
++	  // Check for NULL, which implies no grouping.
++	  if (_M_data->_M_thousands_sep == '\0')
++	    _M_data->_M_grouping = "";
++	  else
++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++	}
++
++      // NB: There is no way to extact this info from posix locales.
++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++      _M_data->_M_truename = "true";
++      _M_data->_M_truename_size = 4;
++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++      _M_data->_M_falsename = "false";
++      _M_data->_M_falsename_size = 5;
++    }
++
++  template<>
++    numpunct<char>::~numpunct()
++    { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++  template<>
++    void
++    numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
++    {
++      if (!_M_data)
++	_M_data = new __numpunct_cache<wchar_t>;
++
++      if (!__cloc)
++	{
++	  // "C" locale
++	  _M_data->_M_grouping = "";
++	  _M_data->_M_grouping_size = 0;
++	  _M_data->_M_use_grouping = false;
++
++	  _M_data->_M_decimal_point = L'.';
++	  _M_data->_M_thousands_sep = L',';
++
++	  // Use ctype::widen code without the facet...
++	  for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++	    _M_data->_M_atoms_out[__i] =
++	      static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
++
++	  for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++	    _M_data->_M_atoms_in[__j] =
++	      static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
++	}
++      else
++	{
++	  // Named locale.
++	  // NB: In the GNU model wchar_t is always 32 bit wide.
++	  union { char *__s; wchar_t __w; } __u;
++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
++	  _M_data->_M_decimal_point = __u.__w;
++
++	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
++	  _M_data->_M_thousands_sep = __u.__w;
++
++	  if (_M_data->_M_thousands_sep == L'\0')
++	    _M_data->_M_grouping = "";
++	  else
++	    _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++	  _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++	}
++
++      // NB: There is no way to extact this info from posix locales.
++      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++      _M_data->_M_truename = L"true";
++      _M_data->_M_truename_size = 4;
++      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++      _M_data->_M_falsename = L"false";
++      _M_data->_M_falsename_size = 5;
++    }
++
++  template<>
++    numpunct<wchar_t>::~numpunct()
++    { delete _M_data; }
++ #endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
+new file mode 100644
+index 0000000..e0707d7
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
+@@ -0,0 +1,406 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L)         nl_langinfo((N))
++#endif
++
++namespace std
++{
++  template<>
++    void
++    __timepunct<char>::
++    _M_put(char* __s, size_t __maxlen, const char* __format,
++	   const tm* __tm) const
++    {
++#ifdef __UCLIBC_HAS_XLOCALE__
++      const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
++					_M_c_locale_timepunct);
++#else
++      char* __old = strdup(setlocale(LC_ALL, NULL));
++      setlocale(LC_ALL, _M_name_timepunct);
++      const size_t __len = strftime(__s, __maxlen, __format, __tm);
++      setlocale(LC_ALL, __old);
++      free(__old);
++#endif
++      // Make sure __s is null terminated.
++      if (__len == 0)
++	__s[0] = '\0';
++    }
++
++  template<>
++    void
++    __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
++    {
++      if (!_M_data)
++	_M_data = new __timepunct_cache<char>;
++
++      if (!__cloc)
++	{
++	  // "C" locale
++	  _M_c_locale_timepunct = _S_get_c_locale();
++
++	  _M_data->_M_date_format = "%m/%d/%y";
++	  _M_data->_M_date_era_format = "%m/%d/%y";
++	  _M_data->_M_time_format = "%H:%M:%S";
++	  _M_data->_M_time_era_format = "%H:%M:%S";
++	  _M_data->_M_date_time_format = "";
++	  _M_data->_M_date_time_era_format = "";
++	  _M_data->_M_am = "AM";
++	  _M_data->_M_pm = "PM";
++	  _M_data->_M_am_pm_format = "";
++
++	  // Day names, starting with "C"'s Sunday.
++	  _M_data->_M_day1 = "Sunday";
++	  _M_data->_M_day2 = "Monday";
++	  _M_data->_M_day3 = "Tuesday";
++	  _M_data->_M_day4 = "Wednesday";
++	  _M_data->_M_day5 = "Thursday";
++	  _M_data->_M_day6 = "Friday";
++	  _M_data->_M_day7 = "Saturday";
++
++	  // Abbreviated day names, starting with "C"'s Sun.
++	  _M_data->_M_aday1 = "Sun";
++	  _M_data->_M_aday2 = "Mon";
++	  _M_data->_M_aday3 = "Tue";
++	  _M_data->_M_aday4 = "Wed";
++	  _M_data->_M_aday5 = "Thu";
++	  _M_data->_M_aday6 = "Fri";
++	  _M_data->_M_aday7 = "Sat";
++
++	  // Month names, starting with "C"'s January.
++	  _M_data->_M_month01 = "January";
++	  _M_data->_M_month02 = "February";
++	  _M_data->_M_month03 = "March";
++	  _M_data->_M_month04 = "April";
++	  _M_data->_M_month05 = "May";
++	  _M_data->_M_month06 = "June";
++	  _M_data->_M_month07 = "July";
++	  _M_data->_M_month08 = "August";
++	  _M_data->_M_month09 = "September";
++	  _M_data->_M_month10 = "October";
++	  _M_data->_M_month11 = "November";
++	  _M_data->_M_month12 = "December";
++
++	  // Abbreviated month names, starting with "C"'s Jan.
++	  _M_data->_M_amonth01 = "Jan";
++	  _M_data->_M_amonth02 = "Feb";
++	  _M_data->_M_amonth03 = "Mar";
++	  _M_data->_M_amonth04 = "Apr";
++	  _M_data->_M_amonth05 = "May";
++	  _M_data->_M_amonth06 = "Jun";
++	  _M_data->_M_amonth07 = "Jul";
++	  _M_data->_M_amonth08 = "Aug";
++	  _M_data->_M_amonth09 = "Sep";
++	  _M_data->_M_amonth10 = "Oct";
++	  _M_data->_M_amonth11 = "Nov";
++	  _M_data->_M_amonth12 = "Dec";
++	}
++      else
++	{
++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++	  _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
++	  _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
++	  _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
++	  _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
++	  _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
++	  _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
++							     __cloc);
++	  _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
++	  _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
++	  _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
++
++	  // Day names, starting with "C"'s Sunday.
++	  _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
++	  _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
++	  _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
++	  _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
++	  _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
++	  _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
++	  _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
++
++	  // Abbreviated day names, starting with "C"'s Sun.
++	  _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
++	  _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
++	  _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
++	  _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
++	  _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
++	  _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
++	  _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
++
++	  // Month names, starting with "C"'s January.
++	  _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
++	  _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
++	  _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
++	  _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
++	  _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
++	  _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
++	  _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
++	  _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
++	  _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
++	  _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
++	  _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
++	  _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
++
++	  // Abbreviated month names, starting with "C"'s Jan.
++	  _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
++	  _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
++	  _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
++	  _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
++	  _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
++	  _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
++	  _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
++	  _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
++	  _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
++	  _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
++	  _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
++	  _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
++	}
++    }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++  template<>
++    void
++    __timepunct<wchar_t>::
++    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
++	   const tm* __tm) const
++    {
++#ifdef __UCLIBC_HAS_XLOCALE__
++      __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
++      const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
++					_M_c_locale_timepunct);
++#else
++      char* __old = strdup(setlocale(LC_ALL, NULL));
++      setlocale(LC_ALL, _M_name_timepunct);
++      const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
++      setlocale(LC_ALL, __old);
++      free(__old);
++#endif
++      // Make sure __s is null terminated.
++      if (__len == 0)
++	__s[0] = L'\0';
++    }
++
++  template<>
++    void
++    __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
++    {
++      if (!_M_data)
++	_M_data = new __timepunct_cache<wchar_t>;
++
++#warning wide time stuff
++//       if (!__cloc)
++	{
++	  // "C" locale
++	  _M_c_locale_timepunct = _S_get_c_locale();
++
++	  _M_data->_M_date_format = L"%m/%d/%y";
++	  _M_data->_M_date_era_format = L"%m/%d/%y";
++	  _M_data->_M_time_format = L"%H:%M:%S";
++	  _M_data->_M_time_era_format = L"%H:%M:%S";
++	  _M_data->_M_date_time_format = L"";
++	  _M_data->_M_date_time_era_format = L"";
++	  _M_data->_M_am = L"AM";
++	  _M_data->_M_pm = L"PM";
++	  _M_data->_M_am_pm_format = L"";
++
++	  // Day names, starting with "C"'s Sunday.
++	  _M_data->_M_day1 = L"Sunday";
++	  _M_data->_M_day2 = L"Monday";
++	  _M_data->_M_day3 = L"Tuesday";
++	  _M_data->_M_day4 = L"Wednesday";
++	  _M_data->_M_day5 = L"Thursday";
++	  _M_data->_M_day6 = L"Friday";
++	  _M_data->_M_day7 = L"Saturday";
++
++	  // Abbreviated day names, starting with "C"'s Sun.
++	  _M_data->_M_aday1 = L"Sun";
++	  _M_data->_M_aday2 = L"Mon";
++	  _M_data->_M_aday3 = L"Tue";
++	  _M_data->_M_aday4 = L"Wed";
++	  _M_data->_M_aday5 = L"Thu";
++	  _M_data->_M_aday6 = L"Fri";
++	  _M_data->_M_aday7 = L"Sat";
++
++	  // Month names, starting with "C"'s January.
++	  _M_data->_M_month01 = L"January";
++	  _M_data->_M_month02 = L"February";
++	  _M_data->_M_month03 = L"March";
++	  _M_data->_M_month04 = L"April";
++	  _M_data->_M_month05 = L"May";
++	  _M_data->_M_month06 = L"June";
++	  _M_data->_M_month07 = L"July";
++	  _M_data->_M_month08 = L"August";
++	  _M_data->_M_month09 = L"September";
++	  _M_data->_M_month10 = L"October";
++	  _M_data->_M_month11 = L"November";
++	  _M_data->_M_month12 = L"December";
++
++	  // Abbreviated month names, starting with "C"'s Jan.
++	  _M_data->_M_amonth01 = L"Jan";
++	  _M_data->_M_amonth02 = L"Feb";
++	  _M_data->_M_amonth03 = L"Mar";
++	  _M_data->_M_amonth04 = L"Apr";
++	  _M_data->_M_amonth05 = L"May";
++	  _M_data->_M_amonth06 = L"Jun";
++	  _M_data->_M_amonth07 = L"Jul";
++	  _M_data->_M_amonth08 = L"Aug";
++	  _M_data->_M_amonth09 = L"Sep";
++	  _M_data->_M_amonth10 = L"Oct";
++	  _M_data->_M_amonth11 = L"Nov";
++	  _M_data->_M_amonth12 = L"Dec";
++	}
++#if 0
++      else
++	{
++	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++	  union { char *__s; wchar_t *__w; } __u;
++
++	  __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
++	  _M_data->_M_date_format = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
++	  _M_data->_M_date_era_format = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
++	  _M_data->_M_time_format = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
++	  _M_data->_M_time_era_format = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
++	  _M_data->_M_date_time_format = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
++	  _M_data->_M_date_time_era_format = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
++	  _M_data->_M_am = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
++	  _M_data->_M_pm = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
++	  _M_data->_M_am_pm_format = __u.__w;
++
++	  // Day names, starting with "C"'s Sunday.
++	  __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
++	  _M_data->_M_day1 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
++	  _M_data->_M_day2 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
++	  _M_data->_M_day3 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
++	  _M_data->_M_day4 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
++	  _M_data->_M_day5 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
++	  _M_data->_M_day6 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
++	  _M_data->_M_day7 = __u.__w;
++
++	  // Abbreviated day names, starting with "C"'s Sun.
++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
++	  _M_data->_M_aday1 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
++	  _M_data->_M_aday2 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
++	  _M_data->_M_aday3 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
++	  _M_data->_M_aday4 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
++	  _M_data->_M_aday5 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
++	  _M_data->_M_aday6 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
++	  _M_data->_M_aday7 = __u.__w;
++
++	  // Month names, starting with "C"'s January.
++	  __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
++	  _M_data->_M_month01 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
++	  _M_data->_M_month02 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
++	  _M_data->_M_month03 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
++	  _M_data->_M_month04 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
++	  _M_data->_M_month05 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
++	  _M_data->_M_month06 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
++	  _M_data->_M_month07 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
++	  _M_data->_M_month08 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
++	  _M_data->_M_month09 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
++	  _M_data->_M_month10 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
++	  _M_data->_M_month11 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
++	  _M_data->_M_month12 = __u.__w;
++
++	  // Abbreviated month names, starting with "C"'s Jan.
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
++	  _M_data->_M_amonth01 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
++	  _M_data->_M_amonth02 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
++	  _M_data->_M_amonth03 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
++	  _M_data->_M_amonth04 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
++	  _M_data->_M_amonth05 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
++	  _M_data->_M_amonth06 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
++	  _M_data->_M_amonth07 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
++	  _M_data->_M_amonth08 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
++	  _M_data->_M_amonth09 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
++	  _M_data->_M_amonth10 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
++	  _M_data->_M_amonth11 = __u.__w;
++	  __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
++	  _M_data->_M_amonth12 = __u.__w;
++	}
++#endif // 0
++    }
++#endif
++}
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
+new file mode 100644
+index 0000000..ba8e858
+--- /dev/null
++++ b/libstdc++-v3/config/locale/uclibc/time_members.h
+@@ -0,0 +1,68 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library.  This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING.  If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction.  Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License.  This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++  template<typename _CharT>
++    __timepunct<_CharT>::__timepunct(size_t __refs)
++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++    _M_name_timepunct(_S_get_c_name())
++    { _M_initialize_timepunct(); }
++
++  template<typename _CharT>
++    __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
++    : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
++    _M_name_timepunct(_S_get_c_name())
++    { _M_initialize_timepunct(); }
++
++  template<typename _CharT>
++    __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
++				     size_t __refs)
++    : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++    _M_name_timepunct(__s)
++    {
++      char* __tmp = new char[std::strlen(__s) + 1];
++      std::strcpy(__tmp, __s);
++      _M_name_timepunct = __tmp;
++      _M_initialize_timepunct(__cloc);
++    }
++
++  template<typename _CharT>
++    __timepunct<_CharT>::~__timepunct()
++    {
++      if (_M_name_timepunct != _S_get_c_name())
++	delete [] _M_name_timepunct;
++      delete _M_data;
++      _S_destroy_c_locale(_M_c_locale_timepunct);
++    }
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index 8cd4c76..217012e 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -15918,6 +15918,9 @@ fi
+   # Default to "generic".
+   if test $enable_clocale_flag = auto; then
+     case ${target_os} in
++      *-uclibc*)
++        enable_clocale_flag=uclibc
++        ;;
+       linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ 	enable_clocale_flag=gnu
+ 	;;
+@@ -16196,6 +16199,78 @@ $as_echo "newlib" >&6; }
+       CTIME_CC=config/locale/generic/time_members.cc
+       CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+       ;;
++    uclibc)
++      { $as_echo "$as_me:${as_lineno-$LINENO}: result: uclibc" >&5
++$as_echo "uclibc" >&6; }
++
++      # Declare intention to use gettext, and add support for specific
++      # languages.
++      # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++      ALL_LINGUAS="de fr"
++
++      # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++      # Extract the first word of "msgfmt", so it can be a program name with args.
++set dummy msgfmt; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if test "${ac_cv_prog_check_msgfmt+set}" = set; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$check_msgfmt"; then
++  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++    for ac_exec_ext in '' $ac_executable_extensions; do
++  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
++    ac_cv_prog_check_msgfmt="yes"
++    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
++    break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
++fi
++fi
++check_msgfmt=$ac_cv_prog_check_msgfmt
++if test -n "$check_msgfmt"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $check_msgfmt" >&5
++$as_echo "$check_msgfmt" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++        USE_NLS=yes
++      fi
++      # Export the build objects.
++      for ling in $ALL_LINGUAS; do \
++        glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++        glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++      done
++
++
++
++      CLOCALE_H=config/locale/uclibc/c_locale.h
++      CLOCALE_CC=config/locale/uclibc/c_locale.cc
++      CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++      CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++      CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++      CMESSAGES_H=config/locale/uclibc/messages_members.h
++      CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++      CMONEY_CC=config/locale/uclibc/monetary_members.cc
++      CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++      CTIME_H=config/locale/uclibc/time_members.h
++      CTIME_CC=config/locale/uclibc/time_members.cc
++      CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++      ;;
+   esac
+ 
+   # This is where the testsuite looks for locale catalogs, using the
+diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
+index 06b5d47..7d3f835 100644
+--- a/libstdc++-v3/include/c_compatibility/wchar.h
++++ b/libstdc++-v3/include/c_compatibility/wchar.h
+@@ -101,7 +101,9 @@ using std::wmemcmp;
+ using std::wmemcpy;
+ using std::wmemmove;
+ using std::wmemset;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using std::wcsftime;
++#endif
+ 
+ #if _GLIBCXX_USE_C99
+ using std::wcstold;
+diff --git a/libstdc++-v3/include/c_std/cwchar b/libstdc++-v3/include/c_std/cwchar
+index aa1b2fa..45c4617 100644
+--- a/libstdc++-v3/include/c_std/cwchar
++++ b/libstdc++-v3/include/c_std/cwchar
+@@ -175,7 +175,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+   using ::wcscoll;
+   using ::wcscpy;
+   using ::wcscspn;
++#if _GLIBCXX_HAVE_WCSFTIME
+   using ::wcsftime;
++#endif
+   using ::wcslen;
+   using ::wcsncat;
+   using ::wcsncmp;
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0005-uclibc-locale-no__x.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0005-uclibc-locale-no__x.patch
new file mode 100644
index 0000000..19a86a4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0005-uclibc-locale-no__x.patch
@@ -0,0 +1,257 @@
+From 72a1a4af3c18627f59aa5ba1f753a89011b4e4f0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:42:36 +0400
+Subject: [PATCH 05/46] uclibc-locale-no__x
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ .../config/locale/uclibc/c++locale_internal.h      | 45 ++++++++++++++++++++++
+ libstdc++-v3/config/locale/uclibc/c_locale.cc      | 14 -------
+ libstdc++-v3/config/locale/uclibc/c_locale.h       |  1 +
+ .../config/locale/uclibc/collate_members.cc        |  7 ----
+ libstdc++-v3/config/locale/uclibc/ctype_members.cc |  7 ----
+ .../config/locale/uclibc/messages_members.cc       |  7 +---
+ .../config/locale/uclibc/messages_members.h        | 18 ++++-----
+ .../config/locale/uclibc/monetary_members.cc       |  4 --
+ .../config/locale/uclibc/numeric_members.cc        |  3 --
+ libstdc++-v3/config/locale/uclibc/time_members.cc  |  3 --
+ 10 files changed, 55 insertions(+), 54 deletions(-)
+
+diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+index 2ae3e4a..e74fddf 100644
+--- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
++++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+@@ -60,4 +60,49 @@ extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
+ extern "C" __typeof(wctype_l) __wctype_l;
+ #endif
+ 
++# define __nl_langinfo_l nl_langinfo_l
++# define __strcoll_l strcoll_l
++# define __strftime_l strftime_l
++# define __strtod_l strtod_l
++# define __strtof_l strtof_l
++# define __strtold_l strtold_l
++# define __strxfrm_l strxfrm_l
++# define __newlocale newlocale
++# define __freelocale freelocale
++# define __duplocale duplocale
++# define __uselocale uselocale
++
++# ifdef _GLIBCXX_USE_WCHAR_T
++#  define __iswctype_l iswctype_l
++#  define __towlower_l towlower_l
++#  define __towupper_l towupper_l
++#  define __wcscoll_l wcscoll_l
++#  define __wcsftime_l wcsftime_l
++#  define __wcsxfrm_l wcsxfrm_l
++#  define __wctype_l wctype_l
++# endif
++
++#else
++# define __nl_langinfo_l(N, L)       nl_langinfo((N))
++# define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
++# define __strtod_l(S, E, L)         strtod((S), (E))
++# define __strtof_l(S, E, L)         strtof((S), (E))
++# define __strtold_l(S, E, L)        strtold((S), (E))
++# define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
++# warning should dummy __newlocale check for C|POSIX ?
++# define __newlocale(a, b, c)        NULL
++# define __freelocale(a)             ((void)0)
++# define __duplocale(a)              __c_locale()
++//# define __uselocale ?
++//
++# ifdef _GLIBCXX_USE_WCHAR_T
++#  define __iswctype_l(C, M, L)       iswctype((C), (M))
++#  define __towlower_l(C, L)          towlower((C))
++#  define __towupper_l(C, L)          towupper((C))
++#  define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
++//#  define __wcsftime_l(S, M, F, T, L)  wcsftime((S), (M), (F), (T))
++#  define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
++#  define __wctype_l(S, L)            wctype((S))
++# endif
++
+ #endif // GLIBC 2.3 and later
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+index 5081dc1..21430d0 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+@@ -39,20 +39,6 @@
+ #include <langinfo.h>
+ #include <bits/c++locale_internal.h>
+ 
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strtol_l(S, E, B, L)      strtol((S), (E), (B))
+-#define __strtoul_l(S, E, B, L)     strtoul((S), (E), (B))
+-#define __strtoll_l(S, E, B, L)     strtoll((S), (E), (B))
+-#define __strtoull_l(S, E, B, L)    strtoull((S), (E), (B))
+-#define __strtof_l(S, E, L)         strtof((S), (E))
+-#define __strtod_l(S, E, L)         strtod((S), (E))
+-#define __strtold_l(S, E, L)        strtold((S), (E))
+-#warning should dummy __newlocale check for C|POSIX ?
+-#define __newlocale(a, b, c)        NULL
+-#define __freelocale(a)             ((void)0)
+-#define __duplocale(a)              __c_locale()
+-#endif
+-
+ namespace std
+ {
+   template<>
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
+index da07c1f..4bca5f1 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.h
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
+@@ -68,6 +68,7 @@ namespace __gnu_cxx
+ {
+   extern "C" __typeof(uselocale) __uselocale;
+ }
++#define __uselocale uselocale
+ #endif
+ 
+ namespace std
+diff --git a/libstdc++-v3/config/locale/uclibc/collate_members.cc b/libstdc++-v3/config/locale/uclibc/collate_members.cc
+index c2664a7..ec5c329 100644
+--- a/libstdc++-v3/config/locale/uclibc/collate_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/collate_members.cc
+@@ -36,13 +36,6 @@
+ #include <locale>
+ #include <bits/c++locale_internal.h>
+ 
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strcoll_l(S1, S2, L)      strcoll((S1), (S2))
+-#define __strxfrm_l(S1, S2, N, L)   strxfrm((S1), (S2), (N))
+-#define __wcscoll_l(S1, S2, L)      wcscoll((S1), (S2))
+-#define __wcsxfrm_l(S1, S2, N, L)   wcsxfrm((S1), (S2), (N))
+-#endif
+-
+ namespace std
+ {
+   // These are basically extensions to char_traits, and perhaps should
+diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+index 7294e3a..7b12861 100644
+--- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+@@ -38,13 +38,6 @@
+ #undef _LIBC
+ #include <bits/c++locale_internal.h>
+ 
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __wctype_l(S, L)           wctype((S))
+-#define __towupper_l(C, L)         towupper((C))
+-#define __towlower_l(C, L)         towlower((C))
+-#define __iswctype_l(C, M, L)      iswctype((C), (M))
+-#endif
+-
+ namespace std
+ {
+   // NB: The other ctype<char> specializations are in src/locale.cc and
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.cc b/libstdc++-v3/config/locale/uclibc/messages_members.cc
+index 13594d9..d7693b4 100644
+--- a/libstdc++-v3/config/locale/uclibc/messages_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.cc
+@@ -39,13 +39,10 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix gettext stuff
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__dcgettext(const char *domainname,
+-			     const char *msgid, int category);
+ #undef gettext
+-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
+ #else
+-#undef gettext
+ #define gettext(msgid) (msgid)
+ #endif
+ 
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
+index 1424078..d89da33 100644
+--- a/libstdc++-v3/config/locale/uclibc/messages_members.h
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
+@@ -36,15 +36,11 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__textdomain(const char *domainname);
+-extern "C" char *__bindtextdomain(const char *domainname,
+-				  const char *dirname);
+-#else
+-#undef __textdomain
+-#undef __bindtextdomain
+-#define __textdomain(D)           ((void)0)
+-#define __bindtextdomain(D,P)     ((void)0)
++#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#undef textdomain
++#undef bindtextdomain
++#define textdomain(D)           ((void)0)
++#define bindtextdomain(D,P)     ((void)0)
+ #endif
+ 
+   // Non-virtual member functions.
+@@ -70,7 +66,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
+     messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ 			   const char* __dir) const
+     {
+-      __bindtextdomain(__s.c_str(), __dir);
++      bindtextdomain(__s.c_str(), __dir);
+       return this->do_open(__s, __loc);
+     }
+ 
+@@ -90,7 +86,7 @@ extern "C" char *__bindtextdomain(const char *domainname,
+     {
+       // No error checking is done, assume the catalog exists and can
+       // be used.
+-      __textdomain(__s.c_str());
++      textdomain(__s.c_str());
+       return 0;
+     }
+ 
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+index aa52731..2e6f80a 100644
+--- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -43,10 +43,6 @@
+ #warning tailor for stub locale support
+ #endif
+ 
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L)         nl_langinfo((N))
+-#endif
+-
+ namespace std
+ {
+   // Construct and return valid pattern consisting of some combination of:
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+index 883ec1a..2c70642 100644
+--- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -41,9 +41,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L)         nl_langinfo((N))
+-#endif
+ 
+ namespace std
+ {
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
+index e0707d7..d848ed5 100644
+--- a/libstdc++-v3/config/locale/uclibc/time_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
+@@ -40,9 +40,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L)         nl_langinfo((N))
+-#endif
+ 
+ namespace std
+ {
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0006-uclibc-locale-wchar_fix.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0006-uclibc-locale-wchar_fix.patch
new file mode 100644
index 0000000..d7dbe68
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0006-uclibc-locale-wchar_fix.patch
@@ -0,0 +1,68 @@
+From b1298344f0c221c382a95af689f7f3ecd864f531 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:45:57 +0400
+Subject: [PATCH 06/46] uclibc-locale-wchar_fix
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/config/locale/uclibc/monetary_members.cc |  4 ++--
+ libstdc++-v3/config/locale/uclibc/numeric_members.cc  | 13 +++++++++++++
+ 2 files changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+index 2e6f80a..31ebb9f 100644
+--- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -401,7 +401,7 @@ namespace std
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+@@ -556,7 +556,7 @@ namespace std
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ 	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ 	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ 	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ 	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+index 2c70642..d5c8961 100644
+--- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -127,12 +127,25 @@ namespace std
+ 	{
+ 	  // Named locale.
+ 	  // NB: In the GNU model wchar_t is always 32 bit wide.
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be numeric
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++	  _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++	  _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# elif defined __UCLIBC_HAS_LOCALE__
++	  _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++	  _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
+ 	  union { char *__s; wchar_t __w; } __u;
+ 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
+ 	  _M_data->_M_decimal_point = __u.__w;
+ 
+ 	  __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
+ 	  _M_data->_M_thousands_sep = __u.__w;
++#endif
+ 
+ 	  if (_M_data->_M_thousands_sep == L'\0')
+ 	    _M_data->_M_grouping = "";
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0007-uclibc-locale-update.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0007-uclibc-locale-update.patch
new file mode 100644
index 0000000..cde7499
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0007-uclibc-locale-update.patch
@@ -0,0 +1,542 @@
+From e9d7cb62741c22d667fe56e98d50753d89aefdc3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:46:58 +0400
+Subject: [PATCH 07/46] uclibc-locale-update
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ .../config/locale/uclibc/c++locale_internal.h      |  3 +
+ libstdc++-v3/config/locale/uclibc/c_locale.cc      | 74 ++++++++++------------
+ libstdc++-v3/config/locale/uclibc/c_locale.h       | 42 ++++++------
+ libstdc++-v3/config/locale/uclibc/ctype_members.cc | 51 +++++++++++----
+ .../config/locale/uclibc/messages_members.h        | 12 ++--
+ .../config/locale/uclibc/monetary_members.cc       | 34 ++++++----
+ .../config/locale/uclibc/numeric_members.cc        |  5 ++
+ libstdc++-v3/config/locale/uclibc/time_members.cc  | 18 ++++--
+ libstdc++-v3/config/locale/uclibc/time_members.h   | 17 +++--
+ 9 files changed, 158 insertions(+), 98 deletions(-)
+
+diff --git a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+index e74fddf..971a6b4 100644
+--- a/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
++++ b/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+@@ -31,6 +31,9 @@
+ 
+ #include <bits/c++config.h>
+ #include <clocale>
++#include <cstdlib>
++#include <cstring>
++#include <cstddef>
+ 
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning clean this up
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.cc b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+index 21430d0..1b9d8e1 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.cc
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.cc
+@@ -39,23 +39,20 @@
+ #include <langinfo.h>
+ #include <bits/c++locale_internal.h>
+ 
+-namespace std
+-{
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+   template<>
+     void
+     __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
+ 		   const __c_locale& __cloc)
+     {
+-      if (!(__err & ios_base::failbit))
+-	{
+-	  char* __sanity;
+-	  errno = 0;
+-	  float __f = __strtof_l(__s, &__sanity, __cloc);
+-          if (__sanity != __s && errno != ERANGE)
+-	    __v = __f;
+-	  else
+-	    __err |= ios_base::failbit;
+-	}
++      char* __sanity;
++      errno = 0;
++      float __f = __strtof_l(__s, &__sanity, __cloc);
++      if (__sanity != __s && errno != ERANGE)
++	__v = __f;
++      else
++	__err |= ios_base::failbit;
+     }
+ 
+   template<>
+@@ -63,16 +60,13 @@ namespace std
+     __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
+ 		   const __c_locale& __cloc)
+     {
+-      if (!(__err & ios_base::failbit))
+-	{
+-	  char* __sanity;
+-	  errno = 0;
+-	  double __d = __strtod_l(__s, &__sanity, __cloc);
+-          if (__sanity != __s && errno != ERANGE)
+-	    __v = __d;
+-	  else
+-	    __err |= ios_base::failbit;
+-	}
++      char* __sanity;
++      errno = 0;
++      double __d = __strtod_l(__s, &__sanity, __cloc);
++      if (__sanity != __s && errno != ERANGE)
++	__v = __d;
++      else
++	__err |= ios_base::failbit;
+     }
+ 
+   template<>
+@@ -80,16 +74,13 @@ namespace std
+     __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
+ 		   const __c_locale& __cloc)
+     {
+-      if (!(__err & ios_base::failbit))
+-	{
+-	  char* __sanity;
+-	  errno = 0;
+-	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
+-          if (__sanity != __s && errno != ERANGE)
+-	    __v = __ld;
+-	  else
+-	    __err |= ios_base::failbit;
+-	}
++      char* __sanity;
++      errno = 0;
++      long double __ld = __strtold_l(__s, &__sanity, __cloc);
++      if (__sanity != __s && errno != ERANGE)
++	__v = __ld;
++      else
++	__err |= ios_base::failbit;
+     }
+ 
+   void
+@@ -110,17 +101,18 @@ namespace std
+   void
+   locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
+   {
+-    if (_S_get_c_locale() != __cloc)
++    if (__cloc && _S_get_c_locale() != __cloc)
+       __freelocale(__cloc);
+   }
+ 
+   __c_locale
+   locale::facet::_S_clone_c_locale(__c_locale& __cloc)
+   { return __duplocale(__cloc); }
+-} // namespace std
+ 
+-namespace __gnu_cxx
+-{
++_GLIBCXX_END_NAMESPACE
++
++_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
++
+   const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
+     {
+       "LC_CTYPE",
+@@ -138,9 +130,11 @@ namespace __gnu_cxx
+       "LC_IDENTIFICATION"
+ #endif
+     };
+-}
+ 
+-namespace std
+-{
++_GLIBCXX_END_NAMESPACE
++
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+   const char* const* const locale::_S_categories = __gnu_cxx::category_names;
+-}  // namespace std
++
++_GLIBCXX_END_NAMESPACE
+diff --git a/libstdc++-v3/config/locale/uclibc/c_locale.h b/libstdc++-v3/config/locale/uclibc/c_locale.h
+index 4bca5f1..64a6d46 100644
+--- a/libstdc++-v3/config/locale/uclibc/c_locale.h
++++ b/libstdc++-v3/config/locale/uclibc/c_locale.h
+@@ -39,21 +39,23 @@
+ #pragma GCC system_header
+ 
+ #include <cstring>              // get std::strlen
+-#include <cstdio>               // get std::snprintf or std::sprintf
++#include <cstdio>               // get std::vsnprintf or std::vsprintf
+ #include <clocale>
+ #include <langinfo.h>		// For codecvt
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix this
+ #endif
+-#ifdef __UCLIBC_HAS_LOCALE__
++#ifdef _GLIBCXX_USE_ICONV
+ #include <iconv.h>		// For codecvt using iconv, iconv_t
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-#include <libintl.h> 		// For messages
++#ifdef HAVE_LIBINTL_H
++#include <libintl.h>		// For messages
+ #endif
++#include <cstdarg>
+ 
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning what is _GLIBCXX_C_LOCALE_GNU for
++// psm: used in os/gnu-linux/ctype_noninline.h
+ #endif
+ #define _GLIBCXX_C_LOCALE_GNU 1
+ 
+@@ -78,23 +80,25 @@ namespace std
+ #else
+   typedef int*			__c_locale;
+ #endif
+-
+-  // Convert numeric value of type _Tv to string and return length of
+-  // string.  If snprintf is available use it, otherwise fall back to
+-  // the unsafe sprintf which, in general, can be dangerous and should
++  // Convert numeric value of type double to string and return length of
++  // string.  If vsnprintf is available use it, otherwise fall back to
++  // the unsafe vsprintf which, in general, can be dangerous and should
+   // be avoided.
+-  template<typename _Tv>
+-    int
+-    __convert_from_v(char* __out,
+-		     const int __size __attribute__ ((__unused__)),
+-		     const char* __fmt,
+-#ifdef __UCLIBC_HAS_XCLOCALE__
+-		     _Tv __v, const __c_locale& __cloc, int __prec)
++    inline int
++    __convert_from_v(const __c_locale&
++#ifndef __UCLIBC_HAS_XCLOCALE__
++	__cloc __attribute__ ((__unused__))
++#endif
++		     ,
++		     char* __out,
++		     const int __size,
++		     const char* __fmt, ...)
+     {
++      va_list __args;
++#ifdef __UCLIBC_HAS_XCLOCALE__
++
+       __c_locale __old = __gnu_cxx::__uselocale(__cloc);
+ #else
+-		     _Tv __v, const __c_locale&, int __prec)
+-    {
+ # ifdef __UCLIBC_HAS_LOCALE__
+       char* __old = std::setlocale(LC_ALL, NULL);
+       char* __sav = new char[std::strlen(__old) + 1];
+@@ -103,7 +107,9 @@ namespace std
+ # endif
+ #endif
+ 
+-      const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++      va_start(__args, __fmt);
++      const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
++      va_end(__args);
+ 
+ #ifdef __UCLIBC_HAS_XCLOCALE__
+       __gnu_cxx::__uselocale(__old);
+diff --git a/libstdc++-v3/config/locale/uclibc/ctype_members.cc b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+index 7b12861..13e011d 100644
+--- a/libstdc++-v3/config/locale/uclibc/ctype_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+@@ -33,16 +33,20 @@
+ 
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+ 
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+ 
+-namespace std
+-{
++_GLIBCXX_BEGIN_NAMESPACE(std)
++
+   // NB: The other ctype<char> specializations are in src/locale.cc and
+   // various /config/os/* files.
+-  template<>
+     ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
+     : ctype<char>(0, false, __refs)
+     {
+@@ -57,6 +61,8 @@ namespace std
+ #endif
+ 	}
+     }
++    ctype_byname<char>::~ctype_byname()
++    { }
+ 
+ #ifdef _GLIBCXX_USE_WCHAR_T
+   ctype<wchar_t>::__wmask_type
+@@ -138,17 +144,33 @@ namespace std
+   ctype<wchar_t>::
+   do_is(mask __m, wchar_t __c) const
+   {
+-    // Highest bitmask in ctype_base == 10, but extra in "C"
+-    // library for blank.
++    // The case of __m == ctype_base::space is particularly important,
++    // due to its use in many istream functions.  Therefore we deal with
++    // it first, exploiting the knowledge that on GNU systems _M_bit[5]
++    // is the mask corresponding to ctype_base::space.  NB: an encoding
++    // change would not affect correctness!
++
+     bool __ret = false;
+-    const size_t __bitmasksize = 11;
+-    for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
+-      if (__m & _M_bit[__bitcur]
+-	  && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
+-	{
+-	  __ret = true;
+-	  break;
+-	}
++    if (__m == _M_bit[5])
++      __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
++    else
++      {
++	// Highest bitmask in ctype_base == 10, but extra in "C"
++	// library for blank.
++	const size_t __bitmasksize = 11;
++	for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++	  if (__m & _M_bit[__bitcur])
++	    {
++	      if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++		{
++		  __ret = true;
++		  break;
++		}
++	      else if (__m == _M_bit[__bitcur])
++		break;
++	    }
++      }
++
+     return __ret;
+   }
+ 
+@@ -290,4 +312,5 @@ namespace std
+ #endif
+   }
+ #endif //  _GLIBCXX_USE_WCHAR_T
+-}
++
++_GLIBCXX_END_NAMESPACE
+diff --git a/libstdc++-v3/config/locale/uclibc/messages_members.h b/libstdc++-v3/config/locale/uclibc/messages_members.h
+index d89da33..067657a 100644
+--- a/libstdc++-v3/config/locale/uclibc/messages_members.h
++++ b/libstdc++-v3/config/locale/uclibc/messages_members.h
+@@ -53,12 +53,16 @@
+   template<typename _CharT>
+      messages<_CharT>::messages(__c_locale __cloc, const char* __s,
+ 				size_t __refs)
+-     : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
+-     _M_name_messages(__s)
++     : facet(__refs), _M_c_locale_messages(NULL),
++     _M_name_messages(NULL)
+      {
+-       char* __tmp = new char[std::strlen(__s) + 1];
+-       std::strcpy(__tmp, __s);
++       const size_t __len = std::strlen(__s) + 1;
++       char* __tmp = new char[__len];
++       std::memcpy(__tmp, __s, __len);
+        _M_name_messages = __tmp;
++
++       // Last to avoid leaking memory if new throws.
++       _M_c_locale_messages = _S_clone_c_locale(__cloc);
+      }
+ 
+   template<typename _CharT>
+diff --git a/libstdc++-v3/config/locale/uclibc/monetary_members.cc b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+index 31ebb9f..7679b9c 100644
+--- a/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -33,9 +33,14 @@
+ 
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+ 
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+ 
+ #ifdef __UCLIBC_MJN3_ONLY__
+@@ -206,7 +211,7 @@ namespace std
+ 	  }
+ 	break;
+       default:
+-	;
++	__ret = pattern();
+       }
+     return __ret;
+   }
+@@ -390,7 +395,9 @@ namespace std
+ 	  __c_locale __old = __uselocale(__cloc);
+ #else
+ 	  // Switch to named locale so that mbsrtowcs will work.
+-	  char* __old = strdup(setlocale(LC_ALL, NULL));
++  	  char* __old = setlocale(LC_ALL, NULL);
++          const size_t __llen = strlen(__old) + 1;
++          char* __sav = new char[__llen];
+ 	  setlocale(LC_ALL, __name);
+ #endif
+ 
+@@ -477,8 +484,8 @@ namespace std
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ 	      __uselocale(__old);
+ #else
+-	      setlocale(LC_ALL, __old);
+-	      free(__old);
++	      setlocale(LC_ALL, __sav);
++	      delete [] __sav;
+ #endif
+ 	      __throw_exception_again;
+ 	    }
+@@ -498,8 +505,8 @@ namespace std
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ 	  __uselocale(__old);
+ #else
+-	  setlocale(LC_ALL, __old);
+-	  free(__old);
++	  setlocale(LC_ALL, __sav);
++	  delete [] __sav;
+ #endif
+ 	}
+     }
+@@ -545,8 +552,11 @@ namespace std
+ 	  __c_locale __old = __uselocale(__cloc);
+ #else
+ 	  // Switch to named locale so that mbsrtowcs will work.
+-	  char* __old = strdup(setlocale(LC_ALL, NULL));
+-	  setlocale(LC_ALL, __name);
++          char* __old = setlocale(LC_ALL, NULL);
++          const size_t __llen = strlen(__old) + 1;
++          char* __sav = new char[__llen];
++          memcpy(__sav, __old, __llen);
++          setlocale(LC_ALL, __name);
+ #endif
+ 
+ #ifdef __UCLIBC_MJN3_ONLY__
+@@ -633,8 +643,8 @@ namespace std
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ 	      __uselocale(__old);
+ #else
+-	      setlocale(LC_ALL, __old);
+-	      free(__old);
++	      setlocale(LC_ALL, __sav);
++	      delete [] __sav;
+ #endif
+               __throw_exception_again;
+ 	    }
+@@ -653,8 +663,8 @@ namespace std
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ 	  __uselocale(__old);
+ #else
+-	  setlocale(LC_ALL, __old);
+-	  free(__old);
++	  setlocale(LC_ALL, __sav);
++	  delete [] __sav;
+ #endif
+ 	}
+     }
+diff --git a/libstdc++-v3/config/locale/uclibc/numeric_members.cc b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+index d5c8961..8ae8969 100644
+--- a/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -33,9 +33,14 @@
+ 
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+ 
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+ 
+ #ifdef __UCLIBC_MJN3_ONLY__
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.cc b/libstdc++-v3/config/locale/uclibc/time_members.cc
+index d848ed5..f24d53e 100644
+--- a/libstdc++-v3/config/locale/uclibc/time_members.cc
++++ b/libstdc++-v3/config/locale/uclibc/time_members.cc
+@@ -53,11 +53,14 @@ namespace std
+       const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
+ 					_M_c_locale_timepunct);
+ #else
+-      char* __old = strdup(setlocale(LC_ALL, NULL));
++      char* __old = setlocale(LC_ALL, NULL);
++      const size_t __llen = strlen(__old) + 1;
++      char* __sav = new char[__llen];
++      memcpy(__sav, __old, __llen);
+       setlocale(LC_ALL, _M_name_timepunct);
+       const size_t __len = strftime(__s, __maxlen, __format, __tm);
+-      setlocale(LC_ALL, __old);
+-      free(__old);
++      setlocale(LC_ALL, __sav);
++      delete [] __sav;
+ #endif
+       // Make sure __s is null terminated.
+       if (__len == 0)
+@@ -207,11 +210,14 @@ namespace std
+       const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
+ 					_M_c_locale_timepunct);
+ #else
+-      char* __old = strdup(setlocale(LC_ALL, NULL));
++      char* __old = setlocale(LC_ALL, NULL);
++      const size_t __llen = strlen(__old) + 1;
++      char* __sav = new char[__llen];
++      memcpy(__sav, __old, __llen);
+       setlocale(LC_ALL, _M_name_timepunct);
+       const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
+-      setlocale(LC_ALL, __old);
+-      free(__old);
++      setlocale(LC_ALL, __sav);
++      delete [] __sav;
+ #endif
+       // Make sure __s is null terminated.
+       if (__len == 0)
+diff --git a/libstdc++-v3/config/locale/uclibc/time_members.h b/libstdc++-v3/config/locale/uclibc/time_members.h
+index ba8e858..1665dde 100644
+--- a/libstdc++-v3/config/locale/uclibc/time_members.h
++++ b/libstdc++-v3/config/locale/uclibc/time_members.h
+@@ -50,12 +50,21 @@
+     __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+ 				     size_t __refs)
+     : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+-    _M_name_timepunct(__s)
++    _M_name_timepunct(NULL)
+     {
+-      char* __tmp = new char[std::strlen(__s) + 1];
+-      std::strcpy(__tmp, __s);
++      const size_t __len = std::strlen(__s) + 1;
++      char* __tmp = new char[__len];
++      std::memcpy(__tmp, __s, __len);
+       _M_name_timepunct = __tmp;
+-      _M_initialize_timepunct(__cloc);
++
++      try
++	{ _M_initialize_timepunct(__cloc); }
++      catch(...)
++	{
++	  delete [] _M_name_timepunct;
++	  __throw_exception_again;
++	}
++
+     }
+ 
+   template<typename _CharT>
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0008-missing-execinfo_h.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0008-missing-execinfo_h.patch
new file mode 100644
index 0000000..9f87931
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0008-missing-execinfo_h.patch
@@ -0,0 +1,28 @@
+From 9b7442069eb68a42d2437181c1b2e710dd077e8b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:48:10 +0400
+Subject: [PATCH 08/46] missing-execinfo_h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ boehm-gc/include/gc.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h
+index 6b38f2d..fca98ff 100644
+--- a/boehm-gc/include/gc.h
++++ b/boehm-gc/include/gc.h
+@@ -503,7 +503,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
+ #if defined(__linux__) || defined(__GLIBC__)
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+-     && !defined(__ia64__)
++     && !defined(__ia64__) && !defined(__UCLIBC__)
+ #   ifndef GC_HAVE_BUILTIN_BACKTRACE
+ #     define GC_HAVE_BUILTIN_BACKTRACE
+ #   endif
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0009-c99-snprintf.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0009-c99-snprintf.patch
new file mode 100644
index 0000000..6b236c6
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0009-c99-snprintf.patch
@@ -0,0 +1,28 @@
+From fde97f80d2d931ed3fa4a86294799366b2359331 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:49:03 +0400
+Subject: [PATCH 09/46] c99-snprintf
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libstdc++-v3/include/c_std/cstdio | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio
+index 37f01ca..f00c06d 100644
+--- a/libstdc++-v3/include/c_std/cstdio
++++ b/libstdc++-v3/include/c_std/cstdio
+@@ -144,7 +144,7 @@ namespace std
+   using ::vsprintf;
+ } // namespace std
+ 
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+ 
+ #undef snprintf
+ #undef vfscanf
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0010-gcc-poison-system-directories.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0010-gcc-poison-system-directories.patch
new file mode 100644
index 0000000..2da8877
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0010-gcc-poison-system-directories.patch
@@ -0,0 +1,192 @@
+From 7a90e62d557c78ae52006dff30c99006e10d9357 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 08:59:00 +0400
+Subject: [PATCH 10/46] gcc: poison-system-directories
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [distribution: codesourcery]
+---
+ gcc/common.opt      |  4 ++++
+ gcc/config.in       |  6 ++++++
+ gcc/configure       | 16 ++++++++++++++++
+ gcc/configure.ac    | 10 ++++++++++
+ gcc/doc/invoke.texi |  9 +++++++++
+ gcc/gcc.c           |  2 ++
+ gcc/incpath.c       | 19 +++++++++++++++++++
+ 7 files changed, 66 insertions(+)
+
+diff --git a/gcc/common.opt b/gcc/common.opt
+index 1218a71..bfba114 100644
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -623,6 +623,10 @@ Wreturn-local-addr
+ Common Var(warn_return_local_addr) Init(1) Warning
+ Warn about returning a pointer/reference to a local or temporary variable.
+ 
++Wpoison-system-directories
++Common Var(flag_poison_system_directories) Init(1) Warning
++Warn for -I and -L options using system directories if cross compiling
++
+ Wshadow
+ Common Var(warn_shadow) Warning
+ Warn when one local variable shadows another
+diff --git a/gcc/config.in b/gcc/config.in
+index 5335258..f079826 100644
+--- a/gcc/config.in
++++ b/gcc/config.in
+@@ -168,6 +168,12 @@
+ #endif
+ 
+ 
++/* Define to warn for use of native system header directories */
++#ifndef USED_FOR_TARGET
++#undef ENABLE_POISON_SYSTEM_DIRECTORIES
++#endif
++
++
+ /* Define if you want all operations on RTL (the basic data structure of the
+    optimizer and back end) to be checked for dynamic type safety at runtime.
+    This is quite expensive. */
+diff --git a/gcc/configure b/gcc/configure
+index 3c92795..34371a3 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -933,6 +933,7 @@ with_system_zlib
+ enable_maintainer_mode
+ enable_link_mutex
+ enable_version_specific_runtime_libs
++enable_poison_system_directories
+ enable_plugin
+ enable_host_shared
+ enable_libquadmath_support
+@@ -1670,6 +1671,8 @@ Optional Features:
+   --enable-version-specific-runtime-libs
+                           specify that runtime libraries should be installed
+                           in a compiler-specific directory
++  --enable-poison-system-directories
++                          warn for use of native system header directories
+   --enable-plugin         enable plugin support
+   --enable-host-shared    build host code as shared libraries
+   --disable-libquadmath-support
+@@ -28211,6 +28214,19 @@ if test "${enable_version_specific_runtime_libs+set}" = set; then :
+ fi
+ 
+ 
++# Check whether --enable-poison-system-directories was given.
++if test "${enable_poison_system_directories+set}" = set; then :
++  enableval=$enable_poison_system_directories;
++else
++  enable_poison_system_directories=no
++fi
++
++if test "x${enable_poison_system_directories}" = "xyes"; then
++
++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
++
++fi
++
+ # Substitute configuration variables
+ 
+ 
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index d414081..240d322 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5654,6 +5654,16 @@ AC_ARG_ENABLE(version-specific-runtime-libs,
+                 [specify that runtime libraries should be
+                  installed in a compiler-specific directory])])
+ 
++AC_ARG_ENABLE([poison-system-directories],
++             AS_HELP_STRING([--enable-poison-system-directories],
++                            [warn for use of native system header directories]),,
++             [enable_poison_system_directories=no])
++if test "x${enable_poison_system_directories}" = "xyes"; then
++  AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
++           [1],
++           [Define to warn for use of native system header directories])
++fi
++
+ # Substitute configuration variables
+ AC_SUBST(subdirs)
+ AC_SUBST(srcdir)
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index d3be589..c81b55b 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -269,6 +269,7 @@ Objective-C and Objective-C++ Dialects}.
+ -Woverlength-strings  -Wpacked  -Wpacked-bitfield-compat  -Wpadded @gol
+ -Wparentheses  -Wpedantic-ms-format -Wno-pedantic-ms-format @gol
+ -Wpointer-arith  -Wno-pointer-to-int-cast @gol
++-Wno-poison-system-directories @gol
+ -Wredundant-decls  -Wno-return-local-addr @gol
+ -Wreturn-type  -Wsequence-point  -Wshadow  -Wno-shadow-ivar @gol
+ -Wshift-count-negative -Wshift-count-overflow @gol
+@@ -4433,6 +4434,14 @@ made up of data only and thus requires no special treatment.  But, for
+ most targets, it is made up of code and thus requires the stack to be
+ made executable in order for the program to work properly.
+ 
++@item -Wno-poison-system-directories
++@opindex Wno-poison-system-directories
++Do not warn for @option{-I} or @option{-L} options using system
++directories such as @file{/usr/include} when cross compiling.  This
++option is intended for use in chroot environments when such
++directories contain the correct headers and libraries for the target
++system rather than the host.
++
+ @item -Wfloat-equal
+ @opindex Wfloat-equal
+ @opindex Wno-float-equal
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index d956c36..675bcc1 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -835,6 +835,8 @@ proper position among the other output files.  */
+    "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
+    "%X %{o*} %{e*} %{N} %{n} %{r}\
+     %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} " VTABLE_VERIFICATION_SPEC " \
++    %{Wno-poison-system-directories:--no-poison-system-directories}\
++    %{Werror=poison-system-directories:--error-poison-system-directories}\
+     %{static:} %{L*} %(mfwrap) %(link_libgcc) " SANITIZER_EARLY_SPEC " %o\
+     " CHKP_SPEC " \
+     %{fopenacc|fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
+diff --git a/gcc/incpath.c b/gcc/incpath.c
+index 6c54ca6..cc0c921 100644
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -28,6 +28,7 @@
+ #include "intl.h"
+ #include "incpath.h"
+ #include "cppdefault.h"
++#include "diagnostic-core.h"
+ 
+ /* Microsoft Windows does not natively support inodes.
+    VMS has non-numeric inodes.  */
+@@ -383,6 +384,24 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
+ 	}
+       fprintf (stderr, _("End of search list.\n"));
+     }
++
++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
++  if (flag_poison_system_directories)
++    {
++       struct cpp_dir *p;
++
++       for (p = heads[QUOTE]; p; p = p->next)
++         {
++          if ((!strncmp (p->name, "/usr/include", 12))
++              || (!strncmp (p->name, "/usr/local/include", 18))
++              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
++            warning (OPT_Wpoison_system_directories,
++                     "include location \"%s\" is unsafe for "
++                     "cross-compilation",
++                     p->name);
++         }
++    }
++#endif
+ }
+ 
+ /* Use given -I paths for #include "..." but not #include <...>, and
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0011-gcc-poison-dir-extend.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0011-gcc-poison-dir-extend.patch
new file mode 100644
index 0000000..511e694
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0011-gcc-poison-dir-extend.patch
@@ -0,0 +1,39 @@
+From db406054de6b0967cd76cbb998f05b0c5af0bd94 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:00:34 +0400
+Subject: [PATCH 11/46] gcc-poison-dir-extend
+
+Add /sw/include and /opt/include based on the original
+zecke-no-host-includes.patch patch.  The original patch checked for
+/usr/include, /sw/include and /opt/include and then triggered a failure and
+aborted.
+
+Instead, we add the two missing items to the current scan.  If the user
+wants this to be a failure, they can add "-Werror=poison-system-directories".
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/incpath.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/incpath.c b/gcc/incpath.c
+index cc0c921..0bc1f67 100644
+--- a/gcc/incpath.c
++++ b/gcc/incpath.c
+@@ -394,7 +394,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose)
+          {
+           if ((!strncmp (p->name, "/usr/include", 12))
+               || (!strncmp (p->name, "/usr/local/include", 18))
+-              || (!strncmp (p->name, "/usr/X11R6/include", 18)))
++              || (!strncmp (p->name, "/usr/X11R6/include", 18))
++              || (!strncmp (p->name, "/sw/include", 11))
++              || (!strncmp (p->name, "/opt/include", 12)))
+             warning (OPT_Wpoison_system_directories,
+                      "include location \"%s\" is unsafe for "
+                      "cross-compilation",
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
new file mode 100644
index 0000000..750bbc8
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0012-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
@@ -0,0 +1,73 @@
+From 278d293c4cee9482a23aa3443741861ff2f67212 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:08:31 +0400
+Subject: [PATCH 12/46] gcc-4.3.3: SYSROOT_CFLAGS_FOR_TARGET
+
+Before committing, I noticed that PR/32161 was marked as a dup of PR/32009, but my previous patch did not fix it.
+
+This alternative patch is better because it lets you just use CFLAGS_FOR_TARGET to set the compilation flags for libgcc. Since bootstrapped target libraries are never compiled with the native compiler, it makes little sense to use different flags for stage1 and later stages. And it also makes little sense to use a different variable than CFLAGS_FOR_TARGET.
+
+Other changes I had to do include:
+
+- moving the creation of default CFLAGS_FOR_TARGET from Makefile.am to configure.ac, because otherwise the BOOT_CFLAGS are substituted into CFLAGS_FOR_TARGET (which is "-O2 -g $(CFLAGS)") via $(CFLAGS). It is also cleaner this way though.
+
+- passing the right CFLAGS to configure scripts as exported environment variables
+
+I also stopped passing LIBCFLAGS to configure scripts since they are unused in the whole src tree. And I updated the documentation as H-P reminded me to do.
+
+Bootstrapped/regtested i686-pc-linux-gnu, will commit to 4.4 shortly. Ok for 4.3?
+
+Signed-off-by: Paolo Bonzini  <bonzini@gnu.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ configure | 32 ++++++++++++++++++++++++++++++++
+ 1 file changed, 32 insertions(+)
+
+diff --git a/configure b/configure
+index 1cba3a9..9cae8da 100755
+--- a/configure
++++ b/configure
+@@ -6733,6 +6733,38 @@ fi
+ 
+ 
+ 
++# During gcc bootstrap, if we use some random cc for stage1 then CFLAGS
++# might be empty or "-g".  We don't require a C++ compiler, so CXXFLAGS
++# might also be empty (or "-g", if a non-GCC C++ compiler is in the path).
++# We want to ensure that TARGET libraries (which we know are built with
++# gcc) are built with "-O2 -g", so include those options when setting
++# CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET.
++if test "x$CFLAGS_FOR_TARGET" = x; then
++  CFLAGS_FOR_TARGET=$CFLAGS
++  case " $CFLAGS " in
++    *" -O2 "*) ;;
++    *) CFLAGS_FOR_TARGET="-O2 $CFLAGS" ;;
++  esac
++  case " $CFLAGS " in
++    *" -g "* | *" -g3 "*) ;;
++    *) CFLAGS_FOR_TARGET="-g $CFLAGS" ;;
++  esac
++fi
++
++
++if test "x$CXXFLAGS_FOR_TARGET" = x; then
++  CXXFLAGS_FOR_TARGET=$CXXFLAGS
++  case " $CXXFLAGS " in
++    *" -O2 "*) ;;
++    *) CXXFLAGS_FOR_TARGET="-O2 $CXXFLAGS" ;;
++  esac
++  case " $CXXFLAGS " in
++    *" -g "* | *" -g3 "*) ;;
++    *) CXXFLAGS_FOR_TARGET="-g $CXXFLAGS" ;;
++  esac
++fi
++
++
+ # Handle --with-headers=XXX.  If the value is not "yes", the contents of
+ # the named directory are copied to $(tooldir)/sys-include.
+ if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0013-64-bit-multilib-hack.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0013-64-bit-multilib-hack.patch
new file mode 100644
index 0000000..45aaf4c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0013-64-bit-multilib-hack.patch
@@ -0,0 +1,85 @@
+From bdde4f5efa3c89ac7ee0bc05f322f27e3dabeab9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:10:06 +0400
+Subject: [PATCH 13/46] 64-bit multilib hack.
+
+GCC has internal multilib handling code but it assumes a very specific rigid directory
+layout. The build system implementation of multilib layout is very generic and allows
+complete customisation of the library directories.
+
+This patch is a partial solution to allow any custom directories to be passed into gcc
+and handled correctly. It forces gcc to use the base_libdir (which is the current
+directory, "."). We need to do this for each multilib that is configured as we don't
+know which compiler options may be being passed into the compiler. Since we have a compiler
+per mulitlib at this point that isn't an issue.
+
+The one problem is the target compiler is only going to work for the default multlilib at
+this point. Ideally we'd figure out which multilibs were being enabled with which paths
+and be able to patch these entries with a complete set of correct paths but this we
+don't have such code at this point. This is something the target gcc recipe should do
+and override these platform defaults in its build config.
+
+RP 15/8/11
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/config/i386/t-linux64   |  6 ++----
+ gcc/config/mips/t-linux64   | 10 +++-------
+ gcc/config/rs6000/t-linux64 |  5 ++---
+ 3 files changed, 7 insertions(+), 14 deletions(-)
+
+diff --git a/gcc/config/i386/t-linux64 b/gcc/config/i386/t-linux64
+index f6dbb78..d770da5 100644
+--- a/gcc/config/i386/t-linux64
++++ b/gcc/config/i386/t-linux64
+@@ -32,7 +32,5 @@
+ #
+ comma=,
+ MULTILIB_OPTIONS    = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
+-MULTILIB_DIRNAMES   = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
+-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
+-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
++MULTILIB_DIRNAMES = . .
++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+diff --git a/gcc/config/mips/t-linux64 b/gcc/config/mips/t-linux64
+index 7e96406..b72dcb0 100644
+--- a/gcc/config/mips/t-linux64
++++ b/gcc/config/mips/t-linux64
+@@ -17,10 +17,6 @@
+ # <http://www.gnu.org/licenses/>.
+ 
+ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+-MULTILIB_DIRNAMES = n32 32 64
+-MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
+-MIPS_SOFT = $(if $(strip $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)) $(filter soft, $(with_float))),soft)
+-MULTILIB_OSDIRNAMES = \
+-	../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
+-	../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
+-	../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
++MULTILIB_DIRNAMES = . . .
++MULTILIB_OSDIRNAMES = ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
++
+diff --git a/gcc/config/rs6000/t-linux64 b/gcc/config/rs6000/t-linux64
+index b6b351d..1d5b37a 100644
+--- a/gcc/config/rs6000/t-linux64
++++ b/gcc/config/rs6000/t-linux64
+@@ -26,10 +26,9 @@
+ # MULTILIB_OSDIRNAMES according to what is found on the target.
+ 
+ MULTILIB_OPTIONS    := m64/m32
+-MULTILIB_DIRNAMES   := 64 32
++MULTILIB_DIRNAMES   := . .
+ MULTILIB_EXTRA_OPTS := 
+-MULTILIB_OSDIRNAMES := m64=../lib64$(call if_multiarch,:powerpc64-linux-gnu)
+-MULTILIB_OSDIRNAMES += m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
++MULTILIB_OSDIRNAMES := ../$(shell basename $(base_libdir)) ../$(shell basename $(base_libdir))
+ 
+ rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
+ 	$(COMPILE) $<
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0014-optional-libstdc.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0014-optional-libstdc.patch
new file mode 100644
index 0000000..73741f8
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0014-optional-libstdc.patch
@@ -0,0 +1,101 @@
+From a13763f8a1d413a432e7b40835a062f86208f29a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:12:56 +0400
+Subject: [PATCH 14/46] optional libstdc
+
+gcc-runtime builds libstdc++ separately from gcc-cross-*. Its configure tests using g++
+will not run correctly since by default the linker will try to link against libstdc++
+which shouldn't exist yet. We need an option to disable -lstdc++
+option whilst leaving -lc, -lgcc and other automatic library dependencies added by gcc
+driver. This patch adds such an option which only disables the -lstdc++.
+
+A "standard" gcc build uses xgcc and hence avoids this. We should ask upstream how to
+do this officially, the likely answer is don't build libstdc++ separately.
+
+RP 29/6/10
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ gcc/c-family/c.opt  | 4 ++++
+ gcc/cp/g++spec.c    | 1 +
+ gcc/doc/invoke.texi | 8 +++++++-
+ gcc/gcc.c           | 1 +
+ 4 files changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
+index 4162566..453ec8e 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -1543,6 +1543,10 @@ nostdinc++
+ C++ ObjC++
+ Do not search standard system include directories for C++
+ 
++nostdlib++
++Driver
++Do not link standard C++ runtime library
++
+ o
+ C ObjC C++ ObjC++ Joined Separate
+ ; Documented in common.opt
+diff --git a/gcc/cp/g++spec.c b/gcc/cp/g++spec.c
+index 6536d7e..f57a5d4 100644
+--- a/gcc/cp/g++spec.c
++++ b/gcc/cp/g++spec.c
+@@ -138,6 +138,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
+       switch (decoded_options[i].opt_index)
+ 	{
+ 	case OPT_nostdlib:
++	case OPT_nostdlib__:
+ 	case OPT_nodefaultlibs:
+ 	  library = -1;
+ 	  break;
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index c81b55b..6d3f68c 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -195,6 +195,7 @@ in the following sections.
+ -fvisibility-inlines-hidden @gol
+ -fvtable-verify=@r{[}std@r{|}preinit@r{|}none@r{]} @gol
+ -fvtv-counts -fvtv-debug @gol
++-nostdlib++ @gol
+ -fvisibility-ms-compat @gol
+ -fext-numeric-literals @gol
+ -Wabi=@var{n}  -Wabi-tag  -Wconversion-null  -Wctor-dtor-privacy @gol
+@@ -488,7 +489,7 @@ Objective-C and Objective-C++ Dialects}.
+ -s  -static -static-libgcc -static-libstdc++ @gol
+ -static-libasan -static-libtsan -static-liblsan -static-libubsan @gol
+ -static-libmpx -static-libmpxwrappers @gol
+--shared -shared-libgcc  -symbolic @gol
++-shared -shared-libgcc  -symbolic -nostdlib++ @gol
+ -T @var{script}  -Wl,@var{option}  -Xlinker @var{option} @gol
+ -u @var{symbol} -z @var{keyword}}
+ 
+@@ -11187,6 +11188,11 @@ These entries are usually resolved by entries in
+ libc.  These entry points should be supplied through some other
+ mechanism when this option is specified.
+ 
++@item -nostdlib++
++@opindex nostdlib++
++Do not use the standard system C++ runtime libraries when linking.
++Only the libraries you specify will be passed to the linker.
++
+ @cindex @option{-lgcc}, use with @option{-nostdlib}
+ @cindex @option{-nostdlib} and unresolved references
+ @cindex unresolved references and @option{-nostdlib}
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 675bcc1..a37ec8b 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -845,6 +845,7 @@ proper position among the other output files.  */
+     %(mflib) " STACK_SPLIT_SPEC "\
+     %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} " SANITIZER_SPEC " \
+     %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
++    %{!nostdlib++:}\
+     %{!nostdlib:%{!nostartfiles:%E}} %{T*} }}}}}}"
+ #endif
+ 
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
new file mode 100644
index 0000000..1b62ef8
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0015-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
@@ -0,0 +1,59 @@
+From 4bd21a1d63cfb14e261d90adc0c5d4f9462dc555 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:14:20 +0400
+Subject: [PATCH 15/46] gcc: disable MASK_RELAX_PIC_CALLS bit
+
+The new feature added after 4.3.3
+"http://www.pubbs.net/200909/gcc/94048-patch-add-support-for-rmipsjalr.html"
+will cause cc1plus eat up all the system memory when build webkit-gtk.
+The function mips_get_pic_call_symbol keeps on recursively calling itself.
+Disable this feature to walk aside the bug.
+
+Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/configure    | 7 -------
+ gcc/configure.ac | 7 -------
+ 2 files changed, 14 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 34371a3..8caecdc 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -26479,13 +26479,6 @@ $as_echo_n "checking assembler and linker for explicit JALR relocation... " >&6;
+         rm -f conftest.*
+       fi
+     fi
+-    if test $gcc_cv_as_ld_jalr_reloc = yes; then
+-      if test x$target_cpu_default = x; then
+-        target_cpu_default=MASK_RELAX_PIC_CALLS
+-      else
+-        target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
+-      fi
+-    fi
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_as_ld_jalr_reloc" >&5
+ $as_echo "$gcc_cv_as_ld_jalr_reloc" >&6; }
+ 
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 240d322..57819ff 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -4384,13 +4384,6 @@ x:
+         rm -f conftest.*
+       fi
+     fi
+-    if test $gcc_cv_as_ld_jalr_reloc = yes; then
+-      if test x$target_cpu_default = x; then
+-        target_cpu_default=MASK_RELAX_PIC_CALLS
+-      else
+-        target_cpu_default="($target_cpu_default)|MASK_RELAX_PIC_CALLS"
+-      fi
+-    fi
+     AC_MSG_RESULT($gcc_cv_as_ld_jalr_reloc)
+ 
+     AC_CACHE_CHECK([linker for .eh_frame personality relaxation],
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0016-COLLECT_GCC_OPTIONS.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0016-COLLECT_GCC_OPTIONS.patch
new file mode 100644
index 0000000..e6ae262
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0016-COLLECT_GCC_OPTIONS.patch
@@ -0,0 +1,38 @@
+From 92427ebb94dc66f8e64ebf3ffbcd6dd5ce0935c1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:16:28 +0400
+Subject: [PATCH 16/46] COLLECT_GCC_OPTIONS
+
+This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to
+invoke collect2.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/gcc.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index a37ec8b..87b47c5 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -4352,6 +4352,15 @@ set_collect_gcc_options (void)
+ 		sizeof ("COLLECT_GCC_OPTIONS=") - 1);
+ 
+   first_time = TRUE;
++#ifdef HAVE_LD_SYSROOT
++  if (target_system_root_changed && target_system_root)
++    {
++      obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1);
++      obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root));
++      obstack_grow (&collect_obstack, "'", 1);
++      first_time = FALSE;
++    }
++#endif
+   for (i = 0; (int) i < n_switches; i++)
+     {
+       const char *const *args;
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
new file mode 100644
index 0000000..b89a279
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0017-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
@@ -0,0 +1,96 @@
+From b1f3118e439459c26a3e19c617b7b0c93745e77a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:17:25 +0400
+Subject: [PATCH 17/46] Use the defaults.h in ${B} instead of ${S}, and t-oe in
+ ${B}
+
+Use the defaults.h in ${B} instead of ${S}, and t-oe in ${B}, so that
+the source can be shared between gcc-cross-initial,
+gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+
+While compiling gcc-crosssdk-initial-x86_64 on some host, there is
+occasionally failure that test the existance of default.h doesn't
+work, the reason is tm_include_list='** defaults.h' rather than
+tm_include_list='** ./defaults.h'
+
+So we add the test condition for this situation.
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/Makefile.in  | 2 +-
+ gcc/configure    | 4 ++--
+ gcc/configure.ac | 4 ++--
+ gcc/mkconfig.sh  | 4 ++--
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 07c6f0a..e1e63e8 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -502,7 +502,7 @@ TARGET_SYSTEM_ROOT = @TARGET_SYSTEM_ROOT@
+ TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
+ 
+ xmake_file=@xmake_file@
+-tmake_file=@tmake_file@
++tmake_file=@tmake_file@ ./t-oe
+ TM_ENDIAN_CONFIG=@TM_ENDIAN_CONFIG@
+ TM_MULTILIB_CONFIG=@TM_MULTILIB_CONFIG@
+ TM_MULTILIB_EXCEPTIONS_CONFIG=@TM_MULTILIB_EXCEPTIONS_CONFIG@
+diff --git a/gcc/configure b/gcc/configure
+index 8caecdc..8ec3d40 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11850,8 +11850,8 @@ for f in $tm_file; do
+        tm_include_list="${tm_include_list} $f"
+        ;;
+     defaults.h )
+-       tm_file_list="${tm_file_list} \$(srcdir)/$f"
+-       tm_include_list="${tm_include_list} $f"
++       tm_file_list="${tm_file_list} ./$f"
++       tm_include_list="${tm_include_list} ./$f"
+        ;;
+     * )
+        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 57819ff..643a47e 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1832,8 +1832,8 @@ for f in $tm_file; do
+        tm_include_list="${tm_include_list} $f"
+        ;;
+     defaults.h )
+-       tm_file_list="${tm_file_list} \$(srcdir)/$f"
+-       tm_include_list="${tm_include_list} $f"
++       tm_file_list="${tm_file_list} ./$f"
++       tm_include_list="${tm_include_list} ./$f"
+        ;;
+     * )
+        tm_file_list="${tm_file_list} \$(srcdir)/config/$f"
+diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
+index c32f087..6803ab9 100644
+--- a/gcc/mkconfig.sh
++++ b/gcc/mkconfig.sh
+@@ -77,7 +77,7 @@ if [ -n "$HEADERS" ]; then
+     if [ $# -ge 1 ]; then
+ 	echo '#ifdef IN_GCC' >> ${output}T
+ 	for file in "$@"; do
+-	    if test x"$file" = x"defaults.h"; then
++	    if test x"$file" = x"./defaults.h" -o x"$file" = x"defaults.h"; then
+ 		postpone_defaults_h="yes"
+ 	    else
+ 		echo "# include \"$file\"" >> ${output}T
+@@ -109,7 +109,7 @@ esac
+ 
+ # If we postponed including defaults.h, add the #include now.
+ if test x"$postpone_defaults_h" = x"yes"; then
+-    echo "# include \"defaults.h\"" >> ${output}T
++    echo "# include \"./defaults.h\"" >> ${output}T
+ fi
+ 
+ # Add multiple inclusion protection guard, part two.
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0018-fortran-cross-compile-hack.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0018-fortran-cross-compile-hack.patch
new file mode 100644
index 0000000..e8ba325
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0018-fortran-cross-compile-hack.patch
@@ -0,0 +1,46 @@
+From d11c73c1295565ff3766ae04e2a410a89fc84dd5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:20:01 +0400
+Subject: [PATCH 18/46] fortran cross-compile hack.
+
+* Fortran would have searched for arm-angstrom-gnueabi-gfortran but would have used
+used gfortan. For gcc_4.2.2.bb we want to use the gfortran compiler from our cross
+directory.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [embedded specific]
+---
+ libgfortran/configure    | 2 +-
+ libgfortran/configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libgfortran/configure b/libgfortran/configure
+index bb3107b..5d47e65 100755
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -12747,7 +12747,7 @@ esac
+ 
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ ac_ext=${ac_fc_srcext-f}
+ ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
+index adafb3f..b4ade28 100644
+--- a/libgfortran/configure.ac
++++ b/libgfortran/configure.ac
+@@ -240,7 +240,7 @@ AC_SUBST(enable_static)
+ 
+ # We need gfortran to compile parts of the library
+ #AC_PROG_FC(gfortran)
+-FC="$GFORTRAN"
++#FC="$GFORTRAN"
+ AC_PROG_FC(gfortran)
+ 
+ # extra LD Flags which are required for targets
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0019-libgcc-sjlj-check.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0019-libgcc-sjlj-check.patch
new file mode 100644
index 0000000..01a4d1f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0019-libgcc-sjlj-check.patch
@@ -0,0 +1,74 @@
+From 7b40212ed6c0c9fe4efe51f31bccd3d9f892f238 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:20:50 +0400
+Subject: [PATCH 19/46] libgcc-sjlj-check
+
+ac_fn_c_try_compile doesnt seem to keep the intermediate files
+which are needed for sjlj test to pass since it greps into the
+generated file. So we run the compiler command using AC_TRY_COMMAND
+which then generates the needed .s file
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ libgcc/configure    | 10 ++++++----
+ libgcc/configure.ac | 10 ++++------
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/libgcc/configure b/libgcc/configure
+index 203d384..6aef3e7 100644
+--- a/libgcc/configure
++++ b/libgcc/configure
+@@ -4570,17 +4570,19 @@ void foo ()
+ }
+ 
+ _ACEOF
+-CFLAGS_hold=$CFLAGS
+-CFLAGS="--save-temps -fexceptions"
+ libgcc_cv_lib_sjlj_exceptions=unknown
+-if ac_fn_c_try_compile; then :
++if { ac_try='${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&5'
++  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++  test $ac_status = 0; }; }; then
+   if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
+     libgcc_cv_lib_sjlj_exceptions=yes
+   elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
+     libgcc_cv_lib_sjlj_exceptions=no
+   fi
+ fi
+-CFLAGS=$CFLAGS_hold
+ rm -f conftest*
+ 
+ fi
+diff --git a/libgcc/configure.ac b/libgcc/configure.ac
+index a10a952..cc324f3 100644
+--- a/libgcc/configure.ac
++++ b/libgcc/configure.ac
+@@ -255,16 +255,14 @@ void foo ()
+   bar();
+ }
+ ])])
+-CFLAGS_hold=$CFLAGS
+-CFLAGS="--save-temps -fexceptions"
+ libgcc_cv_lib_sjlj_exceptions=unknown
+-AS_IF([ac_fn_c_try_compile],
+-  [if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
++if AC_TRY_COMMAND(${CC-cc} -fexceptions -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
++  if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
+     libgcc_cv_lib_sjlj_exceptions=yes
+   elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
+     libgcc_cv_lib_sjlj_exceptions=no
+-  fi])
+-CFLAGS=$CFLAGS_hold
++  fi
++fi
+ rm -f conftest*
+ ])
+ 
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0020-cpp-honor-sysroot.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0020-cpp-honor-sysroot.patch
new file mode 100644
index 0000000..13f66d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0020-cpp-honor-sysroot.patch
@@ -0,0 +1,54 @@
+From 5f9759a85fff3d78e3f71ae01c970b10d326c406 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:22:00 +0400
+Subject: [PATCH 20/46] cpp: honor sysroot.
+
+Currently, if the gcc toolchain is relocated and installed from sstate, then you try and compile
+preprocessed source (.i or .ii files), the compiler will try and access the builtin sysroot location
+rather than the --sysroot option specified on the commandline. If access to that directory is
+permission denied (unreadable), gcc will error.
+
+This happens when ccache is in use due to the fact it uses preprocessed source files.
+
+The fix below adds %I to the cpp-output spec macro so the default substitutions for -iprefix,
+-isystem, -isysroot happen and the correct sysroot is used.
+
+[YOCTO #2074]
+
+RP 2012/04/13
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/cp/lang-specs.h | 2 +-
+ gcc/gcc.c           | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h
+index b0728f0..e69ee7d 100644
+--- a/gcc/cp/lang-specs.h
++++ b/gcc/cp/lang-specs.h
+@@ -63,5 +63,5 @@ along with GCC; see the file COPYING3.  If not see
+   {".ii", "@c++-cpp-output", 0, 0, 0},
+   {"@c++-cpp-output",
+    "%{!M:%{!MM:%{!E:\
+-    cc1plus -fpreprocessed %i %(cc1_options) %2\
++    cc1plus -fpreprocessed %i %I %(cc1_options) %2\
+     %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 87b47c5..e6efae7 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1142,7 +1142,7 @@ static const struct compiler default_compilers[] =
+                     %W{o*:--output-pch=%*}}%V}}}}}}", 0, 0, 0},
+   {".i", "@cpp-output", 0, 0, 0},
+   {"@cpp-output",
+-   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
++   "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %I %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
+   {".s", "@assembler", 0, 0, 0},
+   {"@assembler",
+    "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 0, 0},
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0021-MIPS64-Default-to-N64-ABI.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0021-MIPS64-Default-to-N64-ABI.patch
new file mode 100644
index 0000000..c7cffe4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0021-MIPS64-Default-to-N64-ABI.patch
@@ -0,0 +1,57 @@
+From 34d22ab6cfd2dfe6dd171c8d0b31cafcdeb86298 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:23:08 +0400
+Subject: [PATCH 21/46] MIPS64: Default to N64 ABI
+
+MIPS64 defaults to n32 ABI, this patch makes it
+so that it defaults to N64 ABI
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [OE config specific]
+---
+ gcc/config.gcc | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index c835734..dd0739d 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -2017,29 +2017,29 @@ mips*-*-linux*)				# Linux MIPS, either endian.
+ 			default_mips_arch=mips32
+ 			;;
+ 		mips64el-st-linux-gnu)
+-			default_mips_abi=n32
++			default_mips_abi=64
+ 			tm_file="${tm_file} mips/st.h"
+ 			tmake_file="${tmake_file} mips/t-st"
+ 			enable_mips_multilibs="yes"
+ 			;;
+ 		mips64octeon*-*-linux*)
+-			default_mips_abi=n32
++			default_mips_abi=64
+ 			tm_defines="${tm_defines} MIPS_CPU_STRING_DEFAULT=\\\"octeon\\\""
+ 			target_cpu_default=MASK_SOFT_FLOAT_ABI
+ 			enable_mips_multilibs="yes"
+ 			;;
+ 		mipsisa64r6*-*-linux*)
+-			default_mips_abi=n32
++			default_mips_abi=64
+ 			default_mips_arch=mips64r6
+ 			enable_mips_multilibs="yes"
+ 			;;
+ 		mipsisa64r2*-*-linux*)
+-			default_mips_abi=n32
++			default_mips_abi=64
+ 			default_mips_arch=mips64r2
+ 			enable_mips_multilibs="yes"
+ 			;;
+ 		mips64*-*-linux* | mipsisa64*-*-linux*)
+-			default_mips_abi=n32
++			default_mips_abi=64
+ 			enable_mips_multilibs="yes"
+ 			;;
+ 	esac
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
new file mode 100644
index 0000000..6208351
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0022-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
@@ -0,0 +1,216 @@
+From f6b41b62ea62a0f1447d9fc235f7fd2bbf3fe7c2 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 22/46] Define GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+ relative to SYSTEMLIBS_DIR
+
+This patch defines GLIBC_DYNAMIC_LINKER and UCLIBC_DYNAMIC_LINKER
+relative to SYSTEMLIBS_DIR which can be set in generated headers
+This breaks the assumption of hardcoded multilib in gcc
+Change is only for the supported architectures in OE including
+SH, sparc, alpha for possible future support (if any)
+
+Removes the do_headerfix task in metadata
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Inappropriate [OE configuration]
+---
+ gcc/config/alpha/linux-elf.h |  4 ++--
+ gcc/config/arm/linux-eabi.h  |  4 ++--
+ gcc/config/arm/linux-elf.h   |  2 +-
+ gcc/config/i386/linux.h      |  2 +-
+ gcc/config/i386/linux64.h    |  6 +++---
+ gcc/config/linux.h           |  8 ++++----
+ gcc/config/mips/linux.h      | 12 ++++++------
+ gcc/config/rs6000/linux64.h  | 10 +++++-----
+ gcc/config/sh/linux.h        |  2 +-
+ gcc/config/sparc/linux.h     |  2 +-
+ gcc/config/sparc/linux64.h   |  4 ++--
+ 11 files changed, 28 insertions(+), 28 deletions(-)
+
+diff --git a/gcc/config/alpha/linux-elf.h b/gcc/config/alpha/linux-elf.h
+index 2c70a2f..dd048db 100644
+--- a/gcc/config/alpha/linux-elf.h
++++ b/gcc/config/alpha/linux-elf.h
+@@ -23,8 +23,8 @@ along with GCC; see the file COPYING3.  If not see
+ #define EXTRA_SPECS \
+ { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
+ 
+-#define GLIBC_DYNAMIC_LINKER	"/lib/ld-linux.so.2"
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define GLIBC_DYNAMIC_LINKER	SYSTEMLIBS_DIR "ld-linux.so.2"
++#define UCLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index e9d65dc..cfdf3f0 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -68,8 +68,8 @@
+    GLIBC_DYNAMIC_LINKER_DEFAULT and TARGET_DEFAULT_FLOAT_ABI.  */
+ 
+ #undef  GLIBC_DYNAMIC_LINKER
+-#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3"
+-#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3"
++#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT SYSTEMLIBS_DIR "ld-linux.so.3"
++#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT SYSTEMLIBS_DIR "ld-linux-armhf.so.3"
+ #define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT
+ 
+ #define GLIBC_DYNAMIC_LINKER \
+diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
+index 49ad954..a5ab559 100644
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
+@@ -62,7 +62,7 @@
+ 
+ #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+ 
+ #define LINUX_TARGET_LINK_SPEC  "%{h*} \
+    %{static:-Bstatic} \
+diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
+index a100963..21ba2b2 100644
+--- a/gcc/config/i386/linux.h
++++ b/gcc/config/i386/linux.h
+@@ -20,4 +20,4 @@ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
+index a27d3be..6185cce 100644
+--- a/gcc/config/i386/linux64.h
++++ b/gcc/config/i386/linux64.h
+@@ -27,6 +27,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ #define GNU_USER_LINK_EMULATION64 "elf_x86_64"
+ #define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
++#define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
+diff --git a/gcc/config/linux.h b/gcc/config/linux.h
+index 857389a..22b9be5 100644
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -73,10 +73,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+    GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
+    GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
+    supporting both 32-bit and 64-bit compilation.  */
+-#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKERX32 "/lib/ldx32-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ldx32-uClibc.so.0"
+ #define BIONIC_DYNAMIC_LINKER "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker"
+ #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64"
+diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
+index 91df261..c306afb 100644
+--- a/gcc/config/mips/linux.h
++++ b/gcc/config/mips/linux.h
+@@ -22,20 +22,20 @@ along with GCC; see the file COPYING3.  If not see
+ #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
+ 
+ #define GLIBC_DYNAMIC_LINKER32 \
+-  "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ #define GLIBC_DYNAMIC_LINKER64 \
+-  "%{mnan=2008:/lib64/ld-linux-mipsn8.so.1;:/lib64/ld.so.1}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ #define GLIBC_DYNAMIC_LINKERN32 \
+-  "%{mnan=2008:/lib32/ld-linux-mipsn8.so.1;:/lib32/ld.so.1}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ 
+ #undef UCLIBC_DYNAMIC_LINKER32
+ #define UCLIBC_DYNAMIC_LINKER32 \
+-  "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
+ #undef UCLIBC_DYNAMIC_LINKER64
+ #define UCLIBC_DYNAMIC_LINKER64 \
+-  "%{mnan=2008:/lib/ld64-uClibc-mipsn8.so.0;:/lib/ld64-uClibc.so.0}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld64-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld64-uClibc.so.0}"
+ #define UCLIBC_DYNAMIC_LINKERN32 \
+-  "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}"
++  "%{mnan=2008:" SYSTEMLIBS_DIR "ld-uClibc-mipsn8.so.0;:" SYSTEMLIBS_DIR "ld-uClibc.so.0}"
+ 
+ #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+ #define GNU_USER_DYNAMIC_LINKERN32 \
+diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
+index 0879e7e..31c4338 100644
+--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h
+@@ -357,14 +357,14 @@ extern int dot_symbols;
+ #undef	LINK_OS_DEFAULT_SPEC
+ #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld.so.1"
+ #ifdef LINUX64_DEFAULT_ABI_ELFv2
+-#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:" SYSTEMLIBS_DIR "ld64.so.1;:" SYSTEMLIBS_DIR "ld64.so.2}"
+ #else
+-#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}"
++#define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:" SYSTEMLIBS_DIR "ld64.so.2;:" SYSTEMLIBS_DIR "ld64.so.1}"
+ #endif
+-#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
+-#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
++#define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+ #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
+index 0f5d614..168416c 100644
+--- a/gcc/config/sh/linux.h
++++ b/gcc/config/sh/linux.h
+@@ -43,7 +43,7 @@ along with GCC; see the file COPYING3.  If not see
+ 
+ #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+ 
+ #undef SUBTARGET_LINK_EMUL_SUFFIX
+ #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
+diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
+index 56def4b..00b564c 100644
+--- a/gcc/config/sparc/linux.h
++++ b/gcc/config/sparc/linux.h
+@@ -83,7 +83,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
+ 
+ #undef  LINK_SPEC
+ #define LINK_SPEC "-m elf32_sparc %{shared:-shared} \
+diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
+index fa805fd..0eb4acd 100644
+--- a/gcc/config/sparc/linux64.h
++++ b/gcc/config/sparc/linux64.h
+@@ -84,8 +84,8 @@ along with GCC; see the file COPYING3.  If not see
+    When the -shared link option is used a final link is not being
+    done.  */
+ 
+-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
++#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux.so.2"
+ 
+ #ifdef SPARC_BI_ARCH
+ 
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0023-gcc-Fix-argument-list-too-long-error.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0023-gcc-Fix-argument-list-too-long-error.patch
new file mode 100644
index 0000000..be91c9e
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0023-gcc-Fix-argument-list-too-long-error.patch
@@ -0,0 +1,40 @@
+From 9701f596bbe5bf51bbf48661bc515b45d4b6f4d2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:26:37 +0400
+Subject: [PATCH 23/46] gcc: Fix argument list too long error.
+
+There would be an "Argument list too long" error when the
+build directory is longer than 200, this is caused by:
+
+headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u`
+
+The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle
+it, use the $(sort list) of GNU make which can handle the too long list
+would fix the problem, the header would be short enough after sorted.
+The "tr ' ' '\012'" was used for translating the space to "\n", the
+$(sort list) doesn't need this.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index e1e63e8..7b49f88 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3262,7 +3262,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype
+ # We keep the directory structure for files in config or c-family and .def
+ # files. All other files are flattened to a single directory.
+ 	$(mkinstalldirs) $(DESTDIR)$(plugin_includedir)
+-	headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \
++	headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \
+ 	srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \
+ 	for file in $$headers; do \
+ 	  if [ -f $$file ] ; then \
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0024-Disable-sdt.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0024-Disable-sdt.patch
new file mode 100644
index 0000000..b23ce97
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0024-Disable-sdt.patch
@@ -0,0 +1,113 @@
+From 946e047614103e1f2982613c7aa5f76587500c0e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:28:10 +0400
+Subject: [PATCH 24/46] Disable sdt.
+
+We don't list dtrace in DEPENDS so we shouldn't be depending on this header.
+It may or may not exist from preivous builds though. To be determinstic, disable
+sdt.h usage always. This avoids build failures if the header is removed after configure
+but before libgcc is compiled for example.
+
+RP 2012/8/7
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Disable sdt for libstdc++-v3.
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+
+Upstream-Status: Inappropriate [hack]
+---
+ gcc/configure             | 12 ++++++------
+ gcc/configure.ac          | 18 +++++++++---------
+ libstdc++-v3/configure    |  6 +++---
+ libstdc++-v3/configure.ac |  2 +-
+ 4 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 8ec3d40..eaa3b07 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -27857,12 +27857,12 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5
+ $as_echo_n "checking sys/sdt.h in the target C library... " >&6; }
+ have_sys_sdt_h=no
+-if test -f $target_header_dir/sys/sdt.h; then
+-  have_sys_sdt_h=yes
+-
+-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
+-
+-fi
++#if test -f $target_header_dir/sys/sdt.h; then
++#  have_sys_sdt_h=yes
++#
++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
++#
++#fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5
+ $as_echo "$have_sys_sdt_h" >&6; }
+ 
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 643a47e..9f6cacb 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5315,15 +5315,15 @@ if test x$gcc_cv_libc_provides_ssp = xyes; then
+ fi
+ 
+ # Test for <sys/sdt.h> on the target.
+-GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
+-AC_MSG_CHECKING(sys/sdt.h in the target C library)
+-have_sys_sdt_h=no
+-if test -f $target_header_dir/sys/sdt.h; then
+-  have_sys_sdt_h=yes
+-  AC_DEFINE(HAVE_SYS_SDT_H, 1,
+-            [Define if your target C library provides sys/sdt.h])
+-fi
+-AC_MSG_RESULT($have_sys_sdt_h)
++#GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
++#AC_MSG_CHECKING(sys/sdt.h in the target C library)
++#have_sys_sdt_h=no
++#if test -f $target_header_dir/sys/sdt.h; then
++#  have_sys_sdt_h=yes
++#  AC_DEFINE(HAVE_SYS_SDT_H, 1,
++#            [Define if your target C library provides sys/sdt.h])
++#fi
++#AC_MSG_RESULT($have_sys_sdt_h)
+ 
+ # Check if TFmode long double should be used by default or not.
+ # Some glibc targets used DFmode long double, but with glibc 2.4
+diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
+index 217012e..81240b9 100755
+--- a/libstdc++-v3/configure
++++ b/libstdc++-v3/configure
+@@ -20964,11 +20964,11 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+-  if test $glibcxx_cv_sys_sdt_h = yes; then
++#  if test $glibcxx_cv_sys_sdt_h = yes; then
+ 
+-$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
++#$as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h
+ 
+-  fi
++#  fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sdt_h" >&5
+ $as_echo "$glibcxx_cv_sys_sdt_h" >&6; }
+ 
+diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac
+index 580fb8b..5a41083 100644
+--- a/libstdc++-v3/configure.ac
++++ b/libstdc++-v3/configure.ac
+@@ -230,7 +230,7 @@ GLIBCXX_CHECK_SC_NPROCESSORS_ONLN
+ GLIBCXX_CHECK_SC_NPROC_ONLN
+ GLIBCXX_CHECK_PTHREADS_NUM_PROCESSORS_NP
+ GLIBCXX_CHECK_SYSCTL_HW_NCPU
+-GLIBCXX_CHECK_SDT_H
++#GLIBCXX_CHECK_SDT_H
+ 
+ # Check for available headers.
+ AC_CHECK_HEADERS([endian.h execinfo.h float.h fp.h ieeefp.h inttypes.h \
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0025-libtool.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0025-libtool.patch
new file mode 100644
index 0000000..8d5eb97
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0025-libtool.patch
@@ -0,0 +1,42 @@
+From f68c5b78751660505b22b46dad99240db0df3456 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:29:11 +0400
+Subject: [PATCH 25/46] libtool
+
+libstdc++ from gcc-runtime gets created with -rpath=/usr/lib/../lib for qemux86-64
+when running on am x86_64 build host.
+
+This patch stops this speading to libdir in the libstdc++.la file within libtool.
+Arguably, it shouldn't be passing this into libtool in the first place but
+for now this resolves the nastiest problems this causes.
+
+func_normal_abspath would resolve an empty path to `pwd` so we need
+to filter the zero case.
+
+RP 2012/8/24
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ ltmain.sh | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 9503ec8..0121fba 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -6359,6 +6359,10 @@ func_mode_link ()
+ 	func_warning "ignoring multiple \`-rpath's for a libtool library"
+ 
+       install_libdir="$1"
++      if test -n "$install_libdir"; then
++	func_normal_abspath "$install_libdir"
++	install_libdir=$func_normal_abspath_result
++      fi
+ 
+       oldlibs=
+       if test -z "$rpath"; then
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
new file mode 100644
index 0000000..a22d95f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0026-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
@@ -0,0 +1,43 @@
+From 4c75e349aa7abd1e285720328b23690636bea242 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:30:32 +0400
+Subject: [PATCH 26/46] gcc: armv4: pass fix-v4bx to linker to support EABI.
+
+The LINK_SPEC for linux gets overwritten by linux-eabi.h which
+means the value of TARGET_FIX_V4BX_SPEC gets lost and as a result
+the option is not passed to linker when chosing march=armv4
+This patch redefines this in linux-eabi.h and reinserts it
+for eabi defaulting toolchains.
+
+We might want to send it upstream.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Pending
+---
+ gcc/config/arm/linux-eabi.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index cfdf3f0..048a062 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -77,10 +77,14 @@
+     %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \
+     %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}"
+ 
++/* For armv4 we pass --fix-v4bx to linker to support EABI */
++#undef TARGET_FIX_V4BX_SPEC
++#define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
++
+ /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
+    use the GNU/Linux version, not the generic BPABI version.  */
+ #undef  LINK_SPEC
+-#define LINK_SPEC EABI_LINK_SPEC					\
++#define LINK_SPEC TARGET_FIX_V4BX_SPEC EABI_LINK_SPEC			\
+   LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC,				\
+ 		       LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
+ 
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch
new file mode 100644
index 0000000..46815d1
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0027-Use-the-multilib-config-files-from-B-instead-of-usin.patch
@@ -0,0 +1,102 @@
+From 8217dd7fb318f9abc6564f67b424c433d8398d61 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 29 Mar 2013 09:33:04 +0400
+Subject: [PATCH 27/46] Use the multilib config files from ${B} instead of
+ using the ones from ${S}
+
+Use the multilib config files from ${B} instead of using the ones from ${S}
+so that the source can be shared between gcc-cross-initial,
+gcc-cross-intermediate, gcc-cross, gcc-runtime, and also the sdk build.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
+
+Upstream-Status: Inappropriate [configuration]
+---
+ gcc/configure    | 22 ++++++++++++++++++----
+ gcc/configure.ac | 22 ++++++++++++++++++----
+ 2 files changed, 36 insertions(+), 8 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index eaa3b07..9b60aad 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11830,10 +11830,20 @@ done
+ tmake_file_=
+ for f in ${tmake_file}
+ do
+-	if test -f ${srcdir}/config/$f
+-	then
+-		tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+-	fi
++  case $f in
++    */t-linux64 )
++       if test -f ./config/$f
++       then
++         tmake_file_="${tmake_file_} ./config/$f"
++       fi
++       ;;
++    * )
++       if test -f ${srcdir}/config/$f
++       then
++         tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
++       fi
++       ;;
++  esac
+ done
+ tmake_file="${tmake_file_}"
+ 
+@@ -11844,6 +11854,10 @@ tm_file_list="options.h"
+ tm_include_list="options.h insn-constants.h"
+ for f in $tm_file; do
+   case $f in
++    */linux64.h )
++       tm_file_list="${tm_file_list} ./config/$f"
++       tm_include_list="${tm_include_list} ./config/$f"
++       ;;
+     ./* )
+        f=`echo $f | sed 's/^..//'`
+        tm_file_list="${tm_file_list} $f"
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 9f6cacb..e1e54f2 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1812,10 +1812,20 @@ done
+ tmake_file_=
+ for f in ${tmake_file}
+ do
+-	if test -f ${srcdir}/config/$f
+-	then
+-		tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
+-	fi
++  case $f in
++    */t-linux64 )
++       if test -f ./config/$f
++       then
++         tmake_file_="${tmake_file_} ./config/$f"
++       fi
++       ;;
++    * )
++       if test -f ${srcdir}/config/$f
++       then
++         tmake_file_="${tmake_file_} \$(srcdir)/config/$f"
++       fi
++       ;;
++  esac
+ done
+ tmake_file="${tmake_file_}"
+ 
+@@ -1826,6 +1836,10 @@ tm_file_list="options.h"
+ tm_include_list="options.h insn-constants.h"
+ for f in $tm_file; do
+   case $f in
++    */linux64.h )
++       tm_file_list="${tm_file_list} ./config/$f"
++       tm_include_list="${tm_include_list} ./config/$f"
++       ;;
+     ./* )
+        f=`echo $f | sed 's/^..//'`
+        tm_file_list="${tm_file_list} $f"
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
new file mode 100644
index 0000000..60ddd9c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0028-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
@@ -0,0 +1,31 @@
+From 08a0e45b308fc97d06f5c3ef77a257e7a6bd1a48 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 09:39:38 +0000
+Subject: [PATCH 28/46] Avoid using libdir from .la which usually points to a
+ host path
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Jonathan Liu <net147@gmail.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 0121fba..52bdbdb 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -5628,6 +5628,9 @@ func_mode_link ()
+ 	    absdir="$abs_ladir"
+ 	    libdir="$abs_ladir"
+ 	  else
++	    # Instead of using libdir from .la which usually points to a host path,
++	    # use the path the .la is contained in.
++	    libdir="$abs_ladir"
+ 	    dir="$libdir"
+ 	    absdir="$libdir"
+ 	  fi
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0029-export-CPP.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0029-export-CPP.patch
new file mode 100644
index 0000000..62195aa
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0029-export-CPP.patch
@@ -0,0 +1,53 @@
+From 95f494d1544857ad38949a7da37e2d7264475233 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 09:40:59 +0000
+Subject: [PATCH 29/46] export CPP
+
+The OE environment sets and exports CPP as being the target gcc. When
+building gcc-cross-canadian for a mingw targetted sdk, the following can be found
+in build.x86_64-pokysdk-mingw32.i586-poky-linux/build-x86_64-linux/libiberty/config.log:
+
+configure:3641: checking for _FILE_OFFSET_BITS value needed for large files
+configure:3666: gcc  -c -isystem/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe  conftest.c >&5
+configure:3666: $? = 0
+configure:3698: result: no
+configure:3786: checking how to run the C preprocessor
+configure:3856: result: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32
+configure:3876: x86_64-pokysdk-mingw32-gcc -E --sysroot=/media/build1/poky/build/tmp/sysroots/x86_64-nativesdk-mingw32-pokysdk-mingw32 conftest.c
+configure:3876: $? = 0
+
+Note this is a *build* target (in build-x86_64-linux) so it should be
+using the host "gcc", not x86_64-pokysdk-mingw32-gcc. Since the mingw32
+headers are very different, using the wrong cpp is a real problem. It is leaking
+into configure through the CPP variable. Ultimately this leads to build
+failures related to not being able to include a process.h file for pem-unix.c.
+
+The fix is to ensure we export a sane CPP value into the build
+environment when using build targets. We could define a CPP_FOR_BUILD value which may be
+the version which needs to be upstreamed but for now, this fix is good enough to
+avoid the problem.
+
+RP 22/08/2013
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.in b/Makefile.in
+index 36b4008..a783e1e 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -149,6 +149,7 @@ BUILD_EXPORTS = \
+ 	AR="$(AR_FOR_BUILD)"; export AR; \
+ 	AS="$(AS_FOR_BUILD)"; export AS; \
+ 	CC="$(CC_FOR_BUILD)"; export CC; \
++	CPP="$(CC_FOR_BUILD) -E"; export CPP; \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
new file mode 100644
index 0000000..5705187
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0030-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
@@ -0,0 +1,52 @@
+From 4ed8c1fd9dc05f7a9db9298a55396c8f0ff549a7 Mon Sep 17 00:00:00 2001
+From: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
+Date: Wed, 5 Feb 2014 16:52:31 +0200
+Subject: [PATCH 30/46] Enable SPE & AltiVec generation on powepc*linux target
+
+When is configured with --target=powerpc-linux, the resulting GCC will
+not be able to generate code for SPE targets (e500v1/v2).
+GCC configured with --target=powerpc-linuxspe will not be able to
+generate AltiVec instructions (for e6500).
+This patch modifies the configured file such that SPE or AltiVec code
+can be generated when gcc is configured with --target=powerpc-linux.
+The ABI and speciffic instructions can be selected through the
+"-mabi=spe or -mabi=altivec" and the "-mspe or -maltivec" parameters.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Alexandru-Cezar Sardan <alexandru.sardan@freescale.com>
+---
+ gcc/config.gcc | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+Index: gcc-5.3.0/gcc/config.gcc
+===================================================================
+--- gcc-5.3.0.orig/gcc/config.gcc
++++ gcc-5.3.0/gcc/config.gcc
+@@ -2346,7 +2346,14 @@ powerpc-*-rtems*)
+ 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-rtems rs6000/t-ppccomm"
+ 	;;
+ powerpc*-*-linux*)
+-	tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
++	case ${target} in
++	    powerpc*-*-linux*spe* | powerpc*-*-linux*altivec*)
++		tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h"
++		;;
++	    *)
++		tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h freebsd-spec.h rs6000/sysv4.h rs6000/linuxaltivec.h rs6000/linuxspe.h rs6000/e500.h"
++		;;
++	esac
+ 	extra_options="${extra_options} rs6000/sysv4.opt"
+ 	tmake_file="${tmake_file} rs6000/t-fprules rs6000/t-ppccomm"
+ 	extra_objs="$extra_objs rs6000-linux.o"
+Index: gcc-5.3.0/gcc/config/rs6000/linuxspe.h
+===================================================================
+--- gcc-5.3.0.orig/gcc/config/rs6000/linuxspe.h
++++ gcc-5.3.0/gcc/config/rs6000/linuxspe.h
+@@ -27,6 +27,3 @@
+ #undef	TARGET_DEFAULT
+ #define TARGET_DEFAULT MASK_STRICT_ALIGN
+ #endif
+-
+-#undef  ASM_DEFAULT_SPEC
+-#define	ASM_DEFAULT_SPEC "-mppc -mspe -me500"
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
new file mode 100644
index 0000000..f2bc664
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0031-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
@@ -0,0 +1,42 @@
+From bb6fea821483aa3259b34e101a39c993edd01411 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 10:21:55 +0000
+Subject: [PATCH 31/46] Disable the MULTILIB_OSDIRNAMES and other multilib
+ options.
+
+Hard coding the MULTILIB_OSDIRNAMES with ../lib64 is causing problems on
+systems where the libdir is NOT set to /lib64.  This is allowed by the
+ABI, as
+long as the dynamic loader is present in /lib.
+
+We simply want to use the default rules in gcc to find and configure the
+normal libdir.
+
+Upstream-Status: Inappropriate[OE-Specific]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/aarch64/t-aarch64-linux | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/gcc/config/aarch64/t-aarch64-linux b/gcc/config/aarch64/t-aarch64-linux
+index c296376..3bb59bf 100644
+--- a/gcc/config/aarch64/t-aarch64-linux
++++ b/gcc/config/aarch64/t-aarch64-linux
+@@ -21,8 +21,8 @@
+ LIB1ASMSRC   = aarch64/lib1funcs.asm
+ LIB1ASMFUNCS = _aarch64_sync_cache_range
+ 
+-AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
+-MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
+-MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
++#AARCH_BE = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),_be)
++#MULTILIB_OSDIRNAMES = mabi.lp64=../lib64$(call if_multiarch,:aarch64$(AARCH_BE)-linux-gnu)
++#MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
+ 
+-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
++#MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0032-Ensure-target-gcc-headers-can-be-included.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0032-Ensure-target-gcc-headers-can-be-included.patch
new file mode 100644
index 0000000..89503ff
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0032-Ensure-target-gcc-headers-can-be-included.patch
@@ -0,0 +1,98 @@
+From bb26f90f5e0accc3539f62b6fec663682959dd36 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 10:25:11 +0000
+Subject: [PATCH 32/46] Ensure target gcc headers can be included
+
+There are a few headers installed as part of the OpenEmbedded
+gcc-runtime target (omp.h, ssp/*.h). Being installed from a recipe
+built for the target architecture, these are within the target
+sysroot and not cross/nativesdk; thus they weren't able to be
+found by gcc with the existing search paths. Add support for
+picking up these headers under the sysroot supplied on the gcc
+command line in order to resolve this.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/Makefile.in  | 2 ++
+ gcc/cppdefault.c | 4 ++++
+ gcc/defaults.h   | 9 +++++++++
+ gcc/gcc.c        | 7 -------
+ 4 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 7b49f88..cd5bc4a 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -582,6 +582,7 @@ libexecdir = @libexecdir@
+ 
+ # Directory in which the compiler finds libraries etc.
+ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
++libsubdir_target = gcc/$(target_noncanonical)/$(version)
+ # Directory in which the compiler finds executables
+ libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
+ # Directory in which all plugin resources are installed
+@@ -2610,6 +2611,7 @@ CFLAGS-intl.o += -DLOCALEDIR=\"$(localedir)\"
+ 
+ PREPROCESSOR_DEFINES = \
+   -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
++  -DGCC_INCLUDE_SUBDIR_TARGET=\"$(libsubdir_target)/include\" \
+   -DFIXED_INCLUDE_DIR=\"$(libsubdir)/include-fixed\" \
+   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
+   -DGPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT=$(gcc_gxx_include_dir_add_sysroot) \
+diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
+index 580c1ba..03a0287 100644
+--- a/gcc/cppdefault.c
++++ b/gcc/cppdefault.c
+@@ -59,6 +59,10 @@ const struct default_include cpp_include_defaults[]
+     /* This is the dir for gcc's private headers.  */
+     { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
+ #endif
++#ifdef GCC_INCLUDE_SUBDIR_TARGET
++    /* This is the dir for gcc's private headers under the specified sysroot.  */
++    { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
++#endif
+ #ifdef LOCAL_INCLUDE_DIR
+     /* /usr/local/include comes before the fixincluded header files.  */
+     { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
+diff --git a/gcc/defaults.h b/gcc/defaults.h
+index 1d54798..983d45e 100644
+--- a/gcc/defaults.h
++++ b/gcc/defaults.h
+@@ -1361,4 +1361,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ 
+ #endif /* GCC_INSN_FLAGS_H  */
+ 
++/* Default prefixes to attach to command names.  */
++
++#ifndef STANDARD_STARTFILE_PREFIX_1
++#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
++#endif
++#ifndef STANDARD_STARTFILE_PREFIX_2
++#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
++#endif
++
+ #endif  /* ! GCC_DEFAULTS_H */
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index e6efae7..3ca27b9 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -1263,13 +1263,6 @@ static const char *gcc_libexec_prefix;
+ 
+ /* Default prefixes to attach to command names.  */
+ 
+-#ifndef STANDARD_STARTFILE_PREFIX_1
+-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+-#endif
+-#ifndef STANDARD_STARTFILE_PREFIX_2
+-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
+-#endif
+-
+ #ifdef CROSS_DIRECTORY_STRUCTURE  /* Don't use these prefixes for a cross compiler.  */
+ #undef MD_EXEC_PREFIX
+ #undef MD_STARTFILE_PREFIX
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
new file mode 100644
index 0000000..19d480f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0033-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
@@ -0,0 +1,54 @@
+From 629fcc7d0075c9b4261da6435e122429fb028ec0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 20 Feb 2015 11:17:19 +0000
+Subject: [PATCH 33/46] gcc 4.8+ won't build with --disable-dependency-tracking
+
+since the *.Ppo files don't get created unless --enable-dependency-tracking is true.
+
+This patch ensures we only use those compiler options when its enabled.
+
+Upstream-Status: Submitted
+
+(Problem was already reported upstream, attached this patch there
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55930)
+
+RP
+2012/09/22
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libatomic/Makefile.am | 3 ++-
+ libatomic/Makefile.in | 3 ++-
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am
+index 3d8ab62..23dff7e 100644
+--- a/libatomic/Makefile.am
++++ b/libatomic/Makefile.am
+@@ -101,7 +101,8 @@ PAT_S		= $(word 3,$(PAT_SPLIT))
+ IFUNC_DEF	= -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT	= $(word $(PAT_S),$(IFUNC_OPTIONS))
+ 
+-M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS		= -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS		=
+ M_SIZE		= -DN=$(PAT_N)
+ M_IFUNC		= $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE		= $(PAT_BASE)_n.c
+diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in
+index 9288652..3720256 100644
+--- a/libatomic/Makefile.in
++++ b/libatomic/Makefile.in
+@@ -330,7 +330,8 @@ PAT_N = $(word 2,$(PAT_SPLIT))
+ PAT_S = $(word 3,$(PAT_SPLIT))
+ IFUNC_DEF = -DIFUNC_ALT=$(PAT_S)
+ IFUNC_OPT = $(word $(PAT_S),$(IFUNC_OPTIONS))
+-M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_TRUE@M_DEPS = -MT $@ -MD -MP -MF $(DEPDIR)/$(@F).Ppo
++@AMDEP_FALSE@M_DEPS =
+ M_SIZE = -DN=$(PAT_N)
+ M_IFUNC = $(if $(PAT_S),$(IFUNC_DEF) $(IFUNC_OPT))
+ M_FILE = $(PAT_BASE)_n.c
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch
new file mode 100644
index 0000000..a453fa6
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0034-Don-t-search-host-directory-during-relink-if-inst_pr.patch
@@ -0,0 +1,38 @@
+From a4efc9ca85734c283d4da09b628121e1c1f49c4e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 3 Mar 2015 08:21:19 +0000
+Subject: [PATCH 34/46] Don't search host directory during "relink" if
+ $inst_prefix is provided
+
+http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html
+
+Upstream-Status: Submitted
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ ltmain.sh | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/ltmain.sh b/ltmain.sh
+index 52bdbdb..82bcec3 100644
+--- a/ltmain.sh
++++ b/ltmain.sh
+@@ -6004,12 +6004,13 @@ func_mode_link ()
+ 	      fi
+ 	    else
+ 	      # We cannot seem to hardcode it, guess we'll fake it.
++	      # Default if $libdir is not relative to the prefix:
+ 	      add_dir="-L$libdir"
+-	      # Try looking first in the location we're being installed to.
++
+ 	      if test -n "$inst_prefix_dir"; then
+ 		case $libdir in
+ 		  [\\/]*)
+-		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
++		    add_dir="-L$inst_prefix_dir$libdir"
+ 		    ;;
+ 		esac
+ 	      fi
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
new file mode 100644
index 0000000..6ed589b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0035-Dont-link-the-plugins-with-libgomp-explicitly.patch
@@ -0,0 +1,83 @@
+From 5b0125a792842ae02df507bc55555661cb10f9a3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 8 Mar 2015 03:41:39 +0000
+Subject: [PATCH 35/46] Dont link the plugins with libgomp explicitly
+
+They are dlopened by libgomp anyway. This fixes
+the libtool relink issue which causes issues during
+cross compilation
+
+libtool: install: /usr/bin/install -c .libs/libgomp.lai
+/home/ubuntu/work/bleeding/build-qemux86-64mc/tmp/work/core2-64-rdk-linux/gcc-runtime/5.0-r0/image/usr/lib/../lib/libgomp.la
+libtool: install: error: cannot install `libgomp-plugin-host_nonshm.la'
+to a directory not ending in /usr/lib
+Makefile:517: recipe for target 'install-toolexeclibLTLIBRARIES' failed
+make[2]: *** [install-toolexeclibLTLIBRARIES] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libgomp/Makefile.in        | 7 +++----
+ libgomp/plugin/Makefrag.am | 3 +--
+ 2 files changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/libgomp/Makefile.in b/libgomp/Makefile.in
+index b61b108..71b2627 100644
+--- a/libgomp/Makefile.in
++++ b/libgomp/Makefile.in
+@@ -123,7 +123,7 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(infodir)" \
+ 	"$(DESTDIR)$(fincludedir)" "$(DESTDIR)$(libsubincludedir)" \
+ 	"$(DESTDIR)$(toolexeclibdir)"
+ LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
+-libgomp_plugin_host_nonshm_la_DEPENDENCIES = libgomp.la
++libgomp_plugin_host_nonshm_la_LIBADD =
+ am_libgomp_plugin_host_nonshm_la_OBJECTS =  \
+ 	libgomp_plugin_host_nonshm_la-plugin-host.lo
+ libgomp_plugin_host_nonshm_la_OBJECTS =  \
+@@ -133,7 +133,7 @@ libgomp_plugin_host_nonshm_la_LINK = $(LIBTOOL) --tag=CC \
+ 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ 	$(libgomp_plugin_host_nonshm_la_LDFLAGS) $(LDFLAGS) -o $@
+ am__DEPENDENCIES_1 =
+-@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_DEPENDENCIES = libgomp.la \
++@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_DEPENDENCIES =  \
+ @PLUGIN_NVPTX_TRUE@	$(am__DEPENDENCIES_1)
+ @PLUGIN_NVPTX_TRUE@am_libgomp_plugin_nvptx_la_OBJECTS =  \
+ @PLUGIN_NVPTX_TRUE@	libgomp_plugin_nvptx_la-plugin-nvptx.lo
+@@ -407,7 +407,7 @@ libgomp_la_SOURCES = alloc.c barrier.c critical.c env.c error.c iter.c \
+ @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LDFLAGS =  \
+ @PLUGIN_NVPTX_TRUE@	$(libgomp_plugin_nvptx_version_info) \
+ @PLUGIN_NVPTX_TRUE@	$(lt_host_flags) $(PLUGIN_NVPTX_LDFLAGS)
+-@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBADD = libgomp.la $(PLUGIN_NVPTX_LIBS)
++@PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS)
+ @PLUGIN_NVPTX_TRUE@libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static
+ libgomp_plugin_host_nonshm_version_info = -version-info $(libtool_VERSION)
+ libgomp_plugin_host_nonshm_la_SOURCES = plugin/plugin-host.c
+@@ -415,7 +415,6 @@ libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN
+ libgomp_plugin_host_nonshm_la_LDFLAGS = \
+ 	$(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags)
+ 
+-libgomp_plugin_host_nonshm_la_LIBADD = libgomp.la
+ libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static
+ nodist_noinst_HEADERS = libgomp_f.h
+ nodist_libsubinclude_HEADERS = omp.h openacc.h
+diff --git a/libgomp/plugin/Makefrag.am b/libgomp/plugin/Makefrag.am
+index 167485f..d2c5428 100644
+--- a/libgomp/plugin/Makefrag.am
++++ b/libgomp/plugin/Makefrag.am
+@@ -35,7 +35,7 @@ libgomp_plugin_nvptx_la_CPPFLAGS = $(AM_CPPFLAGS) $(PLUGIN_NVPTX_CPPFLAGS)
+ libgomp_plugin_nvptx_la_LDFLAGS = $(libgomp_plugin_nvptx_version_info) \
+ 	$(lt_host_flags)
+ libgomp_plugin_nvptx_la_LDFLAGS += $(PLUGIN_NVPTX_LDFLAGS)
+-libgomp_plugin_nvptx_la_LIBADD = libgomp.la $(PLUGIN_NVPTX_LIBS)
++libgomp_plugin_nvptx_la_LIBADD = $(PLUGIN_NVPTX_LIBS)
+ libgomp_plugin_nvptx_la_LIBTOOLFLAGS = --tag=disable-static
+ endif
+ 
+@@ -45,5 +45,4 @@ libgomp_plugin_host_nonshm_la_SOURCES = plugin/plugin-host.c
+ libgomp_plugin_host_nonshm_la_CPPFLAGS = $(AM_CPPFLAGS) -DHOST_NONSHM_PLUGIN
+ libgomp_plugin_host_nonshm_la_LDFLAGS = \
+ 	$(libgomp_plugin_host_nonshm_version_info) $(lt_host_flags)
+-libgomp_plugin_host_nonshm_la_LIBADD = libgomp.la
+ libgomp_plugin_host_nonshm_la_LIBTOOLFLAGS = --tag=disable-static
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
new file mode 100644
index 0000000..41c0294
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0036-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
@@ -0,0 +1,27 @@
+From b0b0688176a9482777e9b2e98408bfc4505d31af Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Apr 2015 23:15:27 -0700
+Subject: [PATCH 36/46] Use SYSTEMLIBS_DIR replacement instead of hardcoding
+ base_libdir
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/aarch64/aarch64-linux.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
+index 257acf0..abeb948 100644
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -21,7 +21,7 @@
+ #ifndef GCC_AARCH64_LINUX_H
+ #define GCC_AARCH64_LINUX_H
+ 
+-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++#define GLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+ 
+ #undef  ASAN_CC1_SPEC
+ #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0037-aarch64-Add-support-for-musl-ldso.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0037-aarch64-Add-support-for-musl-ldso.patch
new file mode 100644
index 0000000..30dbe74
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0037-aarch64-Add-support-for-musl-ldso.patch
@@ -0,0 +1,26 @@
+From 420ca64a86d560a77ee596a9774d672b08ca8278 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 28 Apr 2015 23:18:39 -0700
+Subject: [PATCH 37/46] aarch64: Add support for musl ldso
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/aarch64/aarch64-linux.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
+index abeb948..f9e65fc 100644
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -23,6 +23,8 @@
+ 
+ #define GLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
+ 
++#define MUSL_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
++
+ #undef  ASAN_CC1_SPEC
+ #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}"
+ 
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0038-fix-g-sysroot.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0038-fix-g-sysroot.patch
new file mode 100644
index 0000000..9ba574a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0038-fix-g-sysroot.patch
@@ -0,0 +1,56 @@
+From 8df3e7007a22c9d6be5d5ae4b9b169c5c8431917 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 27 May 2015 17:06:06 -0700
+Subject: [PATCH 38/46] fix g++ sysroot
+
+Portions of
+
+http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html
+
+are not upstreamed yet. So lets keep missing pieces.
+
+Upstream-Status: Pending
+
+Without this, compiling something simple like #include <limits> on target
+with c++ test.cpp fails unable to find the header. strace shows it looking in
+usr/include/xxxx rather than /usr/include/xxxx
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/configure    | 4 +++-
+ gcc/configure.ac | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/configure b/gcc/configure
+index 9b60aad..6df594c 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -3375,7 +3375,9 @@ gcc_gxx_include_dir_add_sysroot=0
+ if test "${with_sysroot+set}" = set; then
+   gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
+   if test "${gcc_gxx_without_sysroot}"; then
+-    gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
++    if test x${with_sysroot} != x/; then
++      gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
++    fi
+     gcc_gxx_include_dir_add_sysroot=1
+   fi
+ fi
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index e1e54f2..3bb2173 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -152,7 +152,9 @@ gcc_gxx_include_dir_add_sysroot=0
+ if test "${with_sysroot+set}" = set; then
+   gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'`
+   if test "${gcc_gxx_without_sysroot}"; then
+-    gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
++    if test x${with_sysroot} != x/; then
++      gcc_gxx_include_dir="${gcc_gxx_without_sysroot}"
++    fi
+     gcc_gxx_include_dir_add_sysroot=1
+   fi
+ fi
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
new file mode 100644
index 0000000..2e0df96
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0039-libcc1-fix-libcc1-s-install-path-and-rpath.patch
@@ -0,0 +1,54 @@
+From 1eede9e4a10d3532db826a6eeced695df3ad5b89 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 5 Jul 2015 20:25:18 -0700
+Subject: [PATCH 39/46] libcc1: fix libcc1's install path and rpath
+
+* Install libcc1.so and libcc1plugin.so into
+  $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version), as what we
+  had done to lto-plugin.
+* Fix bad RPATH iussue:
+  gcc-5.2.0: package gcc-plugins contains bad RPATH /patht/to/tmp/sysroots/qemux86-64/usr/lib64/../lib64 in file
+ /path/to/gcc/5.2.0-r0/packages-split/gcc-plugins/usr/lib64/gcc/x86_64-poky-linux/5.2.0/plugin/libcc1plugin.so.0.0.0
+ [rpaths]
+
+Upstream-Status: Inappropriate [OE configuration]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ libcc1/Makefile.am | 4 ++--
+ libcc1/Makefile.in | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libcc1/Makefile.am b/libcc1/Makefile.am
+index 7a274b3..db69bea 100644
+--- a/libcc1/Makefile.am
++++ b/libcc1/Makefile.am
+@@ -35,8 +35,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+ 	    $(Wc)$(libiberty_normal)))
+ libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
+ 
+-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
+-cc1libdir = $(libdir)/$(libsuffix)
++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
++plugindir = $(cc1libdir)
+ 
+ if ENABLE_PLUGIN
+ plugin_LTLIBRARIES = libcc1plugin.la
+diff --git a/libcc1/Makefile.in b/libcc1/Makefile.in
+index 1916134..c8995d2 100644
+--- a/libcc1/Makefile.in
++++ b/libcc1/Makefile.in
+@@ -262,8 +262,8 @@ libiberty = $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
+ 	    $(Wc)$(libiberty_normal)))
+ 
+ libiberty_dep = $(patsubst $(Wc)%,%,$(libiberty))
+-plugindir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/plugin
+-cc1libdir = $(libdir)/$(libsuffix)
++cc1libdir = $(libexecdir)/gcc/$(target_noncanonical)/$(gcc_version)
++plugindir = $(cc1libdir)
+ @ENABLE_PLUGIN_TRUE@plugin_LTLIBRARIES = libcc1plugin.la
+ @ENABLE_PLUGIN_TRUE@cc1lib_LTLIBRARIES = libcc1.la
+ BUILT_SOURCES = compiler-name.h
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0040-handle-sysroot-support-for-nativesdk-gcc.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0040-handle-sysroot-support-for-nativesdk-gcc.patch
new file mode 100644
index 0000000..11e1310
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0040-handle-sysroot-support-for-nativesdk-gcc.patch
@@ -0,0 +1,213 @@
+From b41674d357c4ba320b9860e0f313d2f5a332f27d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:39:54 +0000
+Subject: [PATCH 40/46] handle sysroot support for nativesdk-gcc
+
+Being able to build a nativesdk gcc is useful, particularly in cases
+where the host compiler may be of an incompatible version (or a 32
+bit compiler is needed).
+
+Sadly, building nativesdk-gcc is not straight forward. We install
+nativesdk-gcc into a relocatable location and this means that its
+library locations can change. "Normal" sysroot support doesn't help
+in this case since the values of paths like "libdir" change, not just
+base root directory of the system.
+
+In order to handle this we do two things:
+
+a) Add %r into spec file markup which can be used for injected paths
+   such as SYSTEMLIBS_DIR (see gcc_multilib_setup()).
+b) Add other paths which need relocation into a .gccrelocprefix section
+   which the relocation code will notice and adjust automatically.
+
+Upstream-Status: Inappropriate
+RP 2015/7/28
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/cppdefault.c | 50 +++++++++++++++++++++++++++++++++++++-------------
+ gcc/cppdefault.h |  3 ++-
+ gcc/gcc.c        | 20 ++++++++++++++------
+ 3 files changed, 53 insertions(+), 20 deletions(-)
+
+diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c
+index 03a0287..f44c1d8 100644
+--- a/gcc/cppdefault.c
++++ b/gcc/cppdefault.c
+@@ -35,6 +35,30 @@
+ # undef CROSS_INCLUDE_DIR
+ #endif
+ 
++static char GPLUSPLUS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_INCLUDE_DIR;
++static char GCC_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GCC_INCLUDE_DIR;
++static char GPLUSPLUS_TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_TOOL_INCLUDE_DIR;
++static char GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = GPLUSPLUS_BACKWARD_INCLUDE_DIR;
++static char STANDARD_STARTFILE_PREFIX_2VAR[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET;
++#ifdef LOCAL_INCLUDE_DIR
++static char LOCAL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = LOCAL_INCLUDE_DIR;
++#endif
++#ifdef PREFIX_INCLUDE_DIR
++static char PREFIX_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = PREFIX_INCLUDE_DIR;
++#endif
++#ifdef FIXED_INCLUDE_DIR
++static char FIXED_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = FIXED_INCLUDE_DIR;
++#endif
++#ifdef CROSS_INCLUDE_DIR
++static char CROSS_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = CROSS_INCLUDE_DIR;
++#endif
++#ifdef TOOL_INCLUDE_DIR
++static char TOOL_INCLUDE_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = TOOL_INCLUDE_DIR;
++#endif
++#ifdef NATIVE_SYSTEM_HEADER_DIR
++static char NATIVE_SYSTEM_HEADER_DIRVAR[4096] __attribute__ ((section (".gccrelocprefix"))) = NATIVE_SYSTEM_HEADER_DIR;
++#endif
++
+ const struct default_include cpp_include_defaults[]
+ #ifdef INCLUDE_DEFAULTS
+ = INCLUDE_DEFAULTS;
+@@ -42,38 +66,38 @@ const struct default_include cpp_include_defaults[]
+ = {
+ #ifdef GPLUSPLUS_INCLUDE_DIR
+     /* Pick up GNU C++ generic include files.  */
+-    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,
++    { GPLUSPLUS_INCLUDE_DIRVAR, "G++", 1, 1,
+       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
+ #endif
+ #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
+     /* Pick up GNU C++ target-dependent include files.  */
+-    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,
++    { GPLUSPLUS_TOOL_INCLUDE_DIRVAR, "G++", 1, 1,
+       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },
+ #endif
+ #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
+     /* Pick up GNU C++ backward and deprecated include files.  */
+-    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,
++    { GPLUSPLUS_BACKWARD_INCLUDE_DIRVAR, "G++", 1, 1,
+       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
+ #endif
+ #ifdef GCC_INCLUDE_DIR
+     /* This is the dir for gcc's private headers.  */
+-    { GCC_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
++    { GCC_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
+ #endif
+ #ifdef GCC_INCLUDE_SUBDIR_TARGET
+     /* This is the dir for gcc's private headers under the specified sysroot.  */
+-    { STANDARD_STARTFILE_PREFIX_2 GCC_INCLUDE_SUBDIR_TARGET, "GCC", 0, 0, 1, 0 },
++    { STANDARD_STARTFILE_PREFIX_2VAR, "GCC", 0, 0, 1, 0 },
+ #endif
+ #ifdef LOCAL_INCLUDE_DIR
+     /* /usr/local/include comes before the fixincluded header files.  */
+-    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
+-    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
++    { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 2 },
++    { LOCAL_INCLUDE_DIRVAR, 0, 0, 1, 1, 0 },
+ #endif
+ #ifdef PREFIX_INCLUDE_DIR
+-    { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0 },
++    { PREFIX_INCLUDE_DIRVAR, 0, 0, 1, 0, 0 },
+ #endif
+ #ifdef FIXED_INCLUDE_DIR
+     /* This is the dir for fixincludes.  */
+-    { FIXED_INCLUDE_DIR, "GCC", 0, 0, 0,
++    { FIXED_INCLUDE_DIRVAR, "GCC", 0, 0, 0,
+       /* A multilib suffix needs adding if different multilibs use
+ 	 different headers.  */
+ #ifdef SYSROOT_HEADERS_SUFFIX_SPEC
+@@ -85,16 +109,16 @@ const struct default_include cpp_include_defaults[]
+ #endif
+ #ifdef CROSS_INCLUDE_DIR
+     /* One place the target system's headers might be.  */
+-    { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0 },
++    { CROSS_INCLUDE_DIRVAR, "GCC", 0, 0, 0, 0 },
+ #endif
+ #ifdef TOOL_INCLUDE_DIR
+     /* Another place the target system's headers might be.  */
+-    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0 },
++    { TOOL_INCLUDE_DIRVAR, "BINUTILS", 0, 1, 0, 0 },
+ #endif
+ #ifdef NATIVE_SYSTEM_HEADER_DIR
+     /* /usr/include comes dead last.  */
+-    { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
+-    { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
++    { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
++    { NATIVE_SYSTEM_HEADER_DIRVAR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
+ #endif
+     { 0, 0, 0, 0, 0, 0 }
+   };
+diff --git a/gcc/cppdefault.h b/gcc/cppdefault.h
+index c98644f..4198669 100644
+--- a/gcc/cppdefault.h
++++ b/gcc/cppdefault.h
+@@ -33,7 +33,8 @@
+ 
+ struct default_include
+ {
+-  const char *const fname;	/* The name of the directory.  */
++  const char *fname;     /* The name of the directory.  */
++
+   const char *const component;	/* The component containing the directory
+ 				   (see update_path in prefix.c) */
+   const char cplusplus;		/* Only look here if we're compiling C++.  */
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 3ca27b9..2b7756e 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -120,6 +120,8 @@ static const char *target_system_root = TARGET_SYSTEM_ROOT;
+ #else
+ static const char *target_system_root = 0;
+ #endif
++ 
++static char target_relocatable_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = SYSTEMLIBS_DIR;
+ 
+ /* Nonzero means pass the updated target_system_root to the compiler.  */
+ 
+@@ -390,6 +392,7 @@ or with constant text in a single argument.
+  %G     process LIBGCC_SPEC as a spec.
+  %R     Output the concatenation of target_system_root and
+         target_sysroot_suffix.
++ %r     Output the base path target_relocatable_prefix
+  %S     process STARTFILE_SPEC as a spec.  A capital S is actually used here.
+  %E     process ENDFILE_SPEC as a spec.  A capital E is actually used here.
+  %C     process CPP_SPEC as a spec.
+@@ -1286,10 +1289,10 @@ static const char *gcc_libexec_prefix;
+    gcc_exec_prefix is set because, in that case, we know where the
+    compiler has been installed, and use paths relative to that
+    location instead.  */
+-static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
+-static const char *const standard_libexec_prefix = STANDARD_LIBEXEC_PREFIX;
+-static const char *const standard_bindir_prefix = STANDARD_BINDIR_PREFIX;
+-static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
++static char standard_exec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_EXEC_PREFIX;
++static char standard_libexec_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_LIBEXEC_PREFIX;
++static char standard_bindir_prefix[4096] __attribute__ ((section (".gccrelocprefix"))) = STANDARD_BINDIR_PREFIX;
++static char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
+ 
+ /* For native compilers, these are well-known paths containing
+    components that may be provided by the system.  For cross
+@@ -1297,9 +1300,9 @@ static const char *const standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
+ static const char *md_exec_prefix = MD_EXEC_PREFIX;
+ static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
+ static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
+-static const char *const standard_startfile_prefix_1
++static char standard_startfile_prefix_1[4096] __attribute__ ((section (".gccrelocprefix")))
+   = STANDARD_STARTFILE_PREFIX_1;
+-static const char *const standard_startfile_prefix_2
++static char standard_startfile_prefix_2[4096] __attribute__ ((section (".gccrelocprefix")))
+   = STANDARD_STARTFILE_PREFIX_2;
+ 
+ /* A relative path to be used in finding the location of tools
+@@ -5523,6 +5526,11 @@ do_spec_1 (const char *spec, int inswitch, const char *soft_matched_part)
+ 	      }
+ 	    break;
+ 
++          case 'r':
++              obstack_grow (&obstack, target_relocatable_prefix,
++		      strlen (target_relocatable_prefix));
++            break;
++
+ 	  case 'S':
+ 	    value = do_spec_1 (startfile_spec, 0, NULL);
+ 	    if (value != 0)
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch
new file mode 100644
index 0000000..5a504a1
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0041-Search-target-sysroot-gcc-version-specific-dirs-with.patch
@@ -0,0 +1,102 @@
+From 99cadb4d8415dd5a275d7d6410f20db33d0f8433 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:41:45 +0000
+Subject: [PATCH 41/46] Search target sysroot gcc version specific dirs with
+ multilib.
+
+We install the gcc libraries (such as crtbegin.p) into
+<sysroot><libdir>/<target-sys>/5.2.0/
+which is a default search path for GCC (aka multi_suffix in the
+code below). <target-sys> is 'machine' in gcc's terminology. We use
+these directories so that multiple gcc versions could in theory
+co-exist on target.
+
+We only want to build one gcc-cross-canadian per arch and have this work
+for all multilibs. <target-sys> can be handled by mapping the multilib
+<target-sys> to the one used by gcc-cross-canadian, e.g.
+mips64-polkmllib32-linux
+is symlinked to by mips64-poky-linux.
+
+The default gcc search path in the target sysroot for a "lib64" mutlilib
+is:
+
+<sysroot>/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/../lib64/
+<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/../lib64/
+<sysroot>/lib32/
+<sysroot>/usr/lib32/
+
+which means that the lib32 crtbegin.o will be found and the lib64 ones
+will not which leads to compiler failures.
+
+This patch injects a multilib version of that path first so the lib64
+binaries can be found first. With this change the search path becomes:
+
+<sysroot>/lib32/../lib64/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/lib32/../lib64/
+<sysroot>/usr/lib32/../lib64/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/mips64-poky-linux/5.2.0/
+<sysroot>/usr/lib32/../lib64/
+<sysroot>/lib32/
+<sysroot>/usr/lib32/
+
+Upstream-Status: Pending
+RP 2015/7/31
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/gcc.c | 29 ++++++++++++++++++++++++++++-
+ 1 file changed, 28 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 2b7756e..8f53aea 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -2305,7 +2305,7 @@ for_each_path (const struct path_prefix *paths,
+       if (path == NULL)
+ 	{
+ 	  len = paths->max_len + extra_space + 1;
+-	  len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
++	  len += MAX ((suffix_len + multi_os_dir_len), multiarch_len);
+ 	  path = XNEWVEC (char, len);
+ 	}
+ 
+@@ -2317,6 +2317,33 @@ for_each_path (const struct path_prefix *paths,
+ 	  /* Look first in MACHINE/VERSION subdirectory.  */
+ 	  if (!skip_multi_dir)
+ 	    {
++	      if (!(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
++	        {
++	          const char *this_multi;
++	          size_t this_multi_len;
++
++	          if (pl->os_multilib)
++		    {
++		      this_multi = multi_os_dir;
++		      this_multi_len = multi_os_dir_len;
++		    }
++	          else
++		    {
++		      this_multi = multi_dir;
++		      this_multi_len = multi_dir_len;
++		    }
++
++	          /* Look in multilib MACHINE/VERSION subdirectory first */
++	          if (this_multi_len)
++	            {
++		      memcpy (path + len, this_multi, this_multi_len + 1);
++	              memcpy (path + len + this_multi_len, multi_suffix, suffix_len + 1);
++	              ret = callback (path, callback_info);
++	                if (ret)
++		          break;
++	            }
++	        }
++
+ 	      memcpy (path + len, multi_suffix, suffix_len + 1);
+ 	      ret = callback (path, callback_info);
+ 	      if (ret)
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0042-Fix-various-_FOR_BUILD-and-related-variables.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0042-Fix-various-_FOR_BUILD-and-related-variables.patch
new file mode 100644
index 0000000..5af764b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0042-Fix-various-_FOR_BUILD-and-related-variables.patch
@@ -0,0 +1,137 @@
+From 78e77206902349c9256f06c3dd179197a39af2e1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Dec 2015 23:42:45 +0000
+Subject: [PATCH 42/46] Fix various _FOR_BUILD and related variables
+
+When doing a FOR_BUILD thing, you have to override CFLAGS with
+CFLAGS_FOR_BUILD. And if you use C++, you also have to override
+CXXFLAGS with CXXFLAGS_FOR_BUILD.
+Without this, when building for mingw, you end up trying to use
+the mingw headers for a host build.
+
+The same goes for other variables as well, such as CPPFLAGS,
+CPP, and GMPINC.
+
+Upstream-Status: Pending
+
+Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile.in      | 6 ++++++
+ Makefile.tpl     | 5 +++++
+ gcc/Makefile.in  | 2 +-
+ gcc/configure    | 2 +-
+ gcc/configure.ac | 2 +-
+ 5 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index a783e1e..8b6d3d2 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -152,6 +152,7 @@ BUILD_EXPORTS = \
+ 	CPP="$(CC_FOR_BUILD) -E"; export CPP; \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
++	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
+ 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ 	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ 	GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+@@ -170,6 +171,9 @@ BUILD_EXPORTS = \
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)" \
++	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
++	CPP="$(CC_FOR_BUILD) -E" \
++	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
+ 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+ 
+ # This is the list of directories to built for the host system.
+@@ -187,6 +191,7 @@ HOST_SUBDIR = @host_subdir@
+ HOST_EXPORTS = \
+ 	$(BASE_EXPORTS) \
+ 	CC="$(CC)"; export CC; \
++	CPP="$(CC) -E"; export CPP; \
+ 	ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
+ 	CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+@@ -710,6 +715,7 @@ BASE_FLAGS_TO_PASS = \
+ 	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ 	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+ 	"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
++	"CXXFLAGS_FOR_BUILD=$(CXXFLAGS_FOR_BUILD)" \
+ 	"EXPECT=$(EXPECT)" \
+ 	"FLEX=$(FLEX)" \
+ 	"INSTALL=$(INSTALL)" \
+diff --git a/Makefile.tpl b/Makefile.tpl
+index 1ea1954..78a59c3 100644
+--- a/Makefile.tpl
++++ b/Makefile.tpl
+@@ -154,6 +154,7 @@ BUILD_EXPORTS = \
+ 	CC="$(CC_FOR_BUILD)"; export CC; \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
++	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
+ 	CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ 	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ 	GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+@@ -172,6 +173,9 @@ BUILD_EXPORTS = \
+ # built for the build system to override those in BASE_FLAGS_TO_PASS.
+ EXTRA_BUILD_FLAGS = \
+ 	CFLAGS="$(CFLAGS_FOR_BUILD)" \
++	CXXFLAGS="$(CXXFLAGS_FOR_BUILD)" \
++	CPP="$(CC_FOR_BUILD) -E" \
++	CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
+ 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+ 
+ # This is the list of directories to built for the host system.
+@@ -189,6 +193,7 @@ HOST_SUBDIR = @host_subdir@
+ HOST_EXPORTS = \
+ 	$(BASE_EXPORTS) \
+ 	CC="$(CC)"; export CC; \
++	CPP="$(CC) -E"; export CPP; \
+ 	ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
+ 	CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index cd5bc4a..98ae4f4 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -762,7 +762,7 @@ BUILD_LINKERFLAGS = $(BUILD_CXXFLAGS)
+ # Native linker and preprocessor flags.  For x-fragment overrides.
+ BUILD_LDFLAGS=@BUILD_LDFLAGS@
+ BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) -I$(srcdir)/$(@D) \
+-		-I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS)
++		-I$(srcdir)/../include @INCINTL@ $(CPPINC) $(CPPFLAGS_FOR_BUILD)
+ 
+ # Actual name to use when installing a native compiler.
+ GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)')
+diff --git a/gcc/configure b/gcc/configure
+index 6df594c..fcb05e7 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -11521,7 +11521,7 @@ else
+ 	CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ 	CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
+ 	LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+-	GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
++	GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
+ 	${realsrcdir}/configure \
+ 		--enable-languages=${enable_languages-all} \
+ 		--target=$target_alias --host=$build_alias --build=$build_alias
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 3bb2173..923bc9a 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -1633,7 +1633,7 @@ else
+ 	CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ 	CXX="${CXX_FOR_BUILD}" CXXFLAGS="${CXXFLAGS_FOR_BUILD}" \
+ 	LD="${LD_FOR_BUILD}" LDFLAGS="${LDFLAGS_FOR_BUILD}" \
+-	GMPINC="" CPPFLAGS="${CPPFLAGS} -DGENERATOR_FILE" \
++	GMPINC="" CPPFLAGS="${CPPFLAGS_FOR_BUILD} -DGENERATOR_FILE" \
+ 	${realsrcdir}/configure \
+ 		--enable-languages=${enable_languages-all} \
+ 		--target=$target_alias --host=$build_alias --build=$build_alias
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0043-libstdc-Support-musl.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0043-libstdc-Support-musl.patch
new file mode 100644
index 0000000..bad8402
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0043-libstdc-Support-musl.patch
@@ -0,0 +1,44 @@
+From df430b943a2df6b72054c808d4b93338a82562de Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Dec 2015 08:23:34 +0000
+Subject: [PATCH 43/46] libstdc++: Support musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libstdc++-v3/configure.host | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
+index 640199c..1756444 100644
+--- a/libstdc++-v3/configure.host
++++ b/libstdc++-v3/configure.host
+@@ -274,14 +274,24 @@ case "${host_os}" in
+     os_include_dir="os/bsd/freebsd"
+     ;;
+   gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
++    # check for musl by target
++    case "${host_os}" in
++      *-musl*)
++        os_include_dir="os/generic"
++        ;;
++      *)
+     if [ "$uclibc" = "yes" ]; then
+       os_include_dir="os/uclibc"
+     elif [ "$bionic" = "yes" ]; then
+       os_include_dir="os/bionic"
++    elif [ "$musl" = "yes" ]; then
++      os_include_dir="os/generic"
+     else
+       os_include_dir="os/gnu-linux"
+     fi
+     ;;
++    esac
++    ;;
+   hpux*)
+     os_include_dir="os/hpux"
+     ;;
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch
new file mode 100644
index 0000000..b91c02d
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0044-Adding-mmusl-as-a-musl-libc-specifier-and-the-necess.patch
@@ -0,0 +1,270 @@
+From 0b54799d80fb859c7b142467e4d42c99db59df50 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Dec 2015 08:30:35 +0000
+Subject: [PATCH 44/46] Adding -mmusl as a musl libc specifier, and the
+ necessary hacks for it to know how to find musl's dynamic linker.
+
+Upstream-Status: Backport [partial]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config.gcc                |  10 ++++-
+ gcc/config/linux.h            | 100 +++++++++++++++++++++++++++++++++++++-----
+ gcc/config/linux.opt          |   4 ++
+ gcc/config/rs6000/secureplt.h |   1 +
+ gcc/config/rs6000/sysv4.h     |   5 +++
+ gcc/ginclude/stddef.h         |   3 ++
+ 6 files changed, 110 insertions(+), 13 deletions(-)
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 3825bd5..39ce047 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -575,7 +575,7 @@ case ${target} in
+ esac
+ 
+ # Common C libraries.
+-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4"
+ 
+ # 32-bit x86 processors supported by --with-arch=.  Each processor
+ # MUST be separated by exactly one space.
+@@ -720,6 +720,9 @@ case ${target} in
+     *-*-*uclibc*)
+       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
+       ;;
++    *-*-*musl*)
++      tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL"
++      ;;
+     *)
+       tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
+       ;;
+@@ -2420,6 +2423,11 @@ powerpc*-*-linux*)
+ 	    powerpc*-*-linux*paired*)
+ 		tm_file="${tm_file} rs6000/750cl.h" ;;
+ 	esac
++        case ${target} in
++	    *-linux*-musl*)
++		enable_secureplt=yes ;;
++	esac
++
+ 	if test x${enable_secureplt} = xyes; then
+ 		tm_file="rs6000/secureplt.h ${tm_file}"
+ 	fi
+diff --git a/gcc/config/linux.h b/gcc/config/linux.h
+index 22b9be5..ca9a17f 100644
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -32,10 +32,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ #define OPTION_GLIBC  (DEFAULT_LIBC == LIBC_GLIBC)
+ #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
+ #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
++#define OPTION_MUSL   (DEFAULT_LIBC == LIBC_MUSL)
+ #else
+ #define OPTION_GLIBC  (linux_libc == LIBC_GLIBC)
+ #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
+ #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
++#define OPTION_MUSL   (linux_libc == LIBC_MUSL)
+ #endif
+ 
+ #define GNU_USER_TARGET_OS_CPP_BUILTINS()			\
+@@ -53,18 +55,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+    uClibc or Bionic is the default C library and whether
+    -muclibc or -mglibc or -mbionic has been passed to change the default.  */
+ 
+-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3)	\
+-  "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}"
++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4)	\
++  "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}"
+ 
+ #if DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+-  CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M)
+ #elif DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+-  CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M)
+ #elif DEFAULT_LIBC == LIBC_BIONIC
+-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \
+-  CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U)
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M)
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \
++  CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B)
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif /* DEFAULT_LIBC */
+@@ -84,16 +89,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ 
+ #define GNU_USER_DYNAMIC_LINKER						\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER,	\
+-			 BIONIC_DYNAMIC_LINKER)
++			 BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
+ #define GNU_USER_DYNAMIC_LINKER32					\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \
+-			 BIONIC_DYNAMIC_LINKER32)
++			 BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
+ #define GNU_USER_DYNAMIC_LINKER64					\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \
+-			 BIONIC_DYNAMIC_LINKER64)
++			 BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
+ #define GNU_USER_DYNAMIC_LINKERX32					\
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \
+-			 BIONIC_DYNAMIC_LINKERX32)
++			 BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32)
+ 
+ /* Whether we have Bionic libc runtime */
+ #undef TARGET_HAS_BIONIC
+@@ -123,3 +128,74 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ # define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function
+ 
+ #endif
++
++/* musl avoids problematic includes by rearranging the include directories.
++ * Unfortunately, this is mostly duplicated from cppdefault.c */
++#if DEFAULT_LIBC == LIBC_MUSL
++#define INCLUDE_DEFAULTS_MUSL_GPP			\
++    { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1,		\
++      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },		\
++    { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1,		\
++      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 },		\
++    { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,	\
++      GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
++
++#ifdef LOCAL_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_LOCAL			\
++    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },		\
++    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
++#else
++#define INCLUDE_DEFAULTS_MUSL_LOCAL
++#endif
++
++#ifdef PREFIX_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_PREFIX			\
++    { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_PREFIX
++#endif
++
++#ifdef CROSS_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_CROSS			\
++    { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_CROSS
++#endif
++
++#ifdef TOOL_INCLUDE_DIR
++#define INCLUDE_DEFAULTS_MUSL_TOOL			\
++    { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0},
++#else
++#define INCLUDE_DEFAULTS_MUSL_TOOL
++#endif
++
++#ifdef NATIVE_SYSTEM_HEADER_DIR
++#define INCLUDE_DEFAULTS_MUSL_NATIVE			\
++    { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 },	\
++    { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 },
++#else
++#define INCLUDE_DEFAULTS_MUSL_NATIVE
++#endif
++
++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT)
++# undef INCLUDE_DEFAULTS_MUSL_LOCAL
++# define INCLUDE_DEFAULTS_MUSL_LOCAL
++# undef INCLUDE_DEFAULTS_MUSL_NATIVE
++# define INCLUDE_DEFAULTS_MUSL_NATIVE
++#else
++# undef INCLUDE_DEFAULTS_MUSL_CROSS
++# define INCLUDE_DEFAULTS_MUSL_CROSS
++#endif
++
++#undef INCLUDE_DEFAULTS
++#define INCLUDE_DEFAULTS				\
++  {							\
++    INCLUDE_DEFAULTS_MUSL_GPP				\
++    INCLUDE_DEFAULTS_MUSL_PREFIX			\
++    INCLUDE_DEFAULTS_MUSL_CROSS				\
++    INCLUDE_DEFAULTS_MUSL_TOOL				\
++    INCLUDE_DEFAULTS_MUSL_NATIVE			\
++    { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 },		\
++    { 0, 0, 0, 0, 0, 0 }				\
++  }
++#endif
+diff --git a/gcc/config/linux.opt b/gcc/config/linux.opt
+index c054338..9334f74 100644
+--- a/gcc/config/linux.opt
++++ b/gcc/config/linux.opt
+@@ -30,3 +30,7 @@ Use GNU C library
+ muclibc
+ Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic)
+ Use uClibc C library
++
++mmusl
++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc)
++Use musl C library
+diff --git a/gcc/config/rs6000/secureplt.h b/gcc/config/rs6000/secureplt.h
+index b463463..77edf2a 100644
+--- a/gcc/config/rs6000/secureplt.h
++++ b/gcc/config/rs6000/secureplt.h
+@@ -18,3 +18,4 @@ along with GCC; see the file COPYING3.  If not see
+ <http://www.gnu.org/licenses/>.  */
+ 
+ #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt"
++#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt"
+diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
+index c6c31dc..7cd07e0 100644
+--- a/gcc/config/rs6000/sysv4.h
++++ b/gcc/config/rs6000/sysv4.h
+@@ -538,6 +538,10 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
+ #define CC1_SECURE_PLT_DEFAULT_SPEC ""
+ #endif
+ 
++#ifndef LINK_SECURE_PLT_DEFAULT_SPEC
++#define LINK_SECURE_PLT_DEFAULT_SPEC ""
++#endif
++
+ /* Pass -G xxx to the compiler.  */
+ #undef CC1_SPEC
+ #define	CC1_SPEC "%{G*} %(cc1_cpu)" \
+@@ -889,6 +893,7 @@ ncrtn.o%s"
+   { "link_os_openbsd",		LINK_OS_OPENBSD_SPEC },			\
+   { "link_os_default",		LINK_OS_DEFAULT_SPEC },			\
+   { "cc1_secure_plt_default",	CC1_SECURE_PLT_DEFAULT_SPEC },		\
++  { "link_secure_plt_default",	LINK_SECURE_PLT_DEFAULT_SPEC },		\
+   { "cpp_os_ads",		CPP_OS_ADS_SPEC },			\
+   { "cpp_os_yellowknife",	CPP_OS_YELLOWKNIFE_SPEC },		\
+   { "cpp_os_mvme",		CPP_OS_MVME_SPEC },			\
+diff --git a/gcc/ginclude/stddef.h b/gcc/ginclude/stddef.h
+index f20a41b..eb879ef 100644
+--- a/gcc/ginclude/stddef.h
++++ b/gcc/ginclude/stddef.h
+@@ -184,6 +184,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+ #ifndef _GCC_SIZE_T
+ #ifndef _SIZET_
+ #ifndef __size_t
++#ifndef __DEFINED_size_t /* musl */
+ #define __size_t__	/* BeOS */
+ #define __SIZE_T__	/* Cray Unicos/Mk */
+ #define _SIZE_T
+@@ -200,6 +201,7 @@ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+ #define ___int_size_t_h
+ #define _GCC_SIZE_T
+ #define _SIZET_
++#define __DEFINED_size_t /* musl */
+ #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \
+   || defined(__DragonFly__) \
+   || defined(__FreeBSD_kernel__)
+@@ -218,6 +220,7 @@ typedef __SIZE_TYPE__ size_t;
+ typedef long ssize_t;
+ #endif /* __BEOS__ */
+ #endif /* !(defined (__GNUG__) && defined (size_t)) */
++#endif /* __DEFINED_size_t */
+ #endif /* __size_t */
+ #endif /* _SIZET_ */
+ #endif /* _GCC_SIZE_T */
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0045-Support-for-arm-linux-musl.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0045-Support-for-arm-linux-musl.patch
new file mode 100644
index 0000000..3c1115a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0045-Support-for-arm-linux-musl.patch
@@ -0,0 +1,216 @@
+From a6c649571d49c972e6d207577780ada7e9b6bad5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Dec 2015 08:31:52 +0000
+Subject: [PATCH 45/57] Support for arm-linux-musl.
+
+Fix musl ldso for all arches
+
+Upstream-Status: backport [partial]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gcc/config/aarch64/aarch64-linux.h |  1 +
+ gcc/config/arm/linux-eabi.h        | 17 +++++++++++++++++
+ gcc/config/i386/linux.h            |  1 +
+ gcc/config/i386/linux64.h          |  5 +++++
+ gcc/config/mips/linux.h            |  8 +++++++-
+ gcc/config/rs6000/linux64.h        | 13 +++++++++----
+ gcc/config/rs6000/sysv4.h          | 10 +++++++---
+ libitm/config/arm/hwcap.cc         |  4 ++++
+ libitm/config/linux/x86/tls.h      |  8 ++++++--
+ 9 files changed, 57 insertions(+), 10 deletions(-)
+
+diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
+index f9e65fc..1b2d0c0 100644
+--- a/gcc/config/aarch64/aarch64-linux.h
++++ b/gcc/config/aarch64/aarch64-linux.h
+@@ -22,6 +22,7 @@
+ #define GCC_AARCH64_LINUX_H
+ 
+ #define GLIBC_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1"
++#define MUSL_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
+ 
+ #define MUSL_DYNAMIC_LINKER  SYSTEMLIBS_DIR "ld-musl-aarch64.so.1"
+ 
+diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
+index 048a062..adb9c44 100644
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -81,6 +81,23 @@
+ #undef TARGET_FIX_V4BX_SPEC
+ #define TARGET_FIX_V4BX_SPEC "%{mcpu=arm8|mcpu=arm810|mcpu=strongarm*|march=armv4: --fix-v4bx}"
+ 
++/* For ARM musl currently supports four dynamic linkers:
++   - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI
++   - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI
++   - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB
++   - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB
++   musl does not support the legacy OABI mode.
++   All the dynamic linkers live in /lib.
++   We default to soft-float, EL. */
++#undef  MUSL_DYNAMIC_LINKER
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}"
++#else
++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}"
++#endif
++#define MUSL_DYNAMIC_LINKER \
++  SYSTEMLIBS_DIR "ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1"
++
+ /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
+    use the GNU/Linux version, not the generic BPABI version.  */
+ #undef  LINK_SPEC
+diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h
+index 21ba2b2..e2b81e5 100644
+--- a/gcc/config/i386/linux.h
++++ b/gcc/config/i386/linux.h
+@@ -21,3 +21,4 @@ along with GCC; see the file COPYING3.  If not see
+ 
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+ #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux.so.2"
++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-i386.so.1"
+diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h
+index 6185cce..5a3a977 100644
+--- a/gcc/config/i386/linux64.h
++++ b/gcc/config/i386/linux64.h
+@@ -30,3 +30,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ #define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-linux.so.2"
+ #define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-linux-x86-64.so.2"
+ #define GLIBC_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-linux-x32.so.2"
++
++#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-i386.so.1"
++#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-x86_64.so.1"
++#define MUSL_DYNAMIC_LINKERX32 SYSTEMLIBS_DIR "ld-musl-x32.so.1"
++
+diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h
+index c306afb..b899388 100644
+--- a/gcc/config/mips/linux.h
++++ b/gcc/config/mips/linux.h
+@@ -21,6 +21,12 @@ along with GCC; see the file COPYING3.  If not see
+ #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
+ #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
+ 
++#undef MUSL_DYNAMIC_LINKER32
++#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1"
++#undef MUSL_DYNAMIC_LINKER64
++#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1"
++#define MUSL_DYNAMIC_LINKERN32 SYSTEMLIBS_DIR "ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1"
++
+ #define GLIBC_DYNAMIC_LINKER32 \
+   "%{mnan=2008:" SYSTEMLIBS_DIR "ld-linux-mipsn8.so.1;:" SYSTEMLIBS_DIR "ld.so.1}"
+ #define GLIBC_DYNAMIC_LINKER64 \
+@@ -40,4 +46,4 @@ along with GCC; see the file COPYING3.  If not see
+ #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+ #define GNU_USER_DYNAMIC_LINKERN32 \
+   CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
+-                         BIONIC_DYNAMIC_LINKERN32)
++                         BIONIC_DYNAMIC_LINKERN32,  MUSL_DYNAMIC_LINKERN32)
+diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
+index 31c4338..679da4b 100644
+--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h
+@@ -365,17 +365,22 @@ extern int dot_symbols;
+ #endif
+ #define UCLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-uClibc.so.0"
+ #define UCLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld64-uClibc.so.0"
++#define MUSL_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "ld-musl-powerpc.so.1"
++#define MUSL_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "ld-musl-powerpc64.so.1"
++
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
+ #elif DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif
+ #define GNU_USER_DYNAMIC_LINKER32 \
+-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
++  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32)
+ #define GNU_USER_DYNAMIC_LINKER64 \
+-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
++  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64)
+ 
+ #undef  DEFAULT_ASM_ENDIAN
+ #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
+diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
+index 7cd07e0..8794fa5 100644
+--- a/gcc/config/rs6000/sysv4.h
++++ b/gcc/config/rs6000/sysv4.h
+@@ -763,15 +763,19 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
+ 
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+ #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1"
++
+ #if DEFAULT_LIBC == LIBC_UCLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}"
++#elif DEFAULT_LIBC == LIBC_MUSL
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}"
+ #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC
+-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}"
+ #else
+ #error "Unsupported DEFAULT_LIBC"
+ #endif
+ #define GNU_USER_DYNAMIC_LINKER \
+-  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
++  CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER)
+ 
+ #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
+   %{rdynamic:-export-dynamic} \
+diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc
+index a1c2cfd..dd4fad2 100644
+--- a/libitm/config/arm/hwcap.cc
++++ b/libitm/config/arm/hwcap.cc
+@@ -40,7 +40,11 @@ int GTM_hwcap HIDDEN = 0
+ 
+ #ifdef __linux__
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <sys/fcntl.h>
++#else
++#include <fcntl.h>
++#endif
+ #include <elf.h>
+ 
+ static void __attribute__((constructor))
+diff --git a/libitm/config/linux/x86/tls.h b/libitm/config/linux/x86/tls.h
+index e731ab7..54ad8b6 100644
+--- a/libitm/config/linux/x86/tls.h
++++ b/libitm/config/linux/x86/tls.h
+@@ -25,16 +25,19 @@
+ #ifndef LIBITM_X86_TLS_H
+ #define LIBITM_X86_TLS_H 1
+ 
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
++#if defined(__GLIBC_PREREQ)
++#if __GLIBC_PREREQ(2, 10)
+ /* Use slots in the TCB head rather than __thread lookups.
+    GLIBC has reserved words 10 through 13 for TM.  */
+ #define HAVE_ARCH_GTM_THREAD 1
+ #define HAVE_ARCH_GTM_THREAD_DISP 1
+ #endif
++#endif
+ 
+ #include "config/generic/tls.h"
+ 
+-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
++#if defined(__GLIBC_PREREQ)
++#if __GLIBC_PREREQ(2, 10)
+ namespace GTM HIDDEN {
+ 
+ #ifdef __x86_64__
+@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct abi_dispatch *x)
+ 
+ } // namespace GTM
+ #endif /* >= GLIBC 2.10 */
++#endif
+ 
+ #endif // LIBITM_X86_TLS_H
+-- 
+2.7.4
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch
new file mode 100644
index 0000000..ddb0fc4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0046-Get-rid-of-ever-broken-fixincludes-on-musl.patch
@@ -0,0 +1,28 @@
+From 047116e8c9cbb340264f4f28db3f21a68ba57ff3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Dec 2015 08:32:24 +0000
+Subject: [PATCH 46/46] Get rid of ever-broken fixincludes on musl.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ fixincludes/mkfixinc.sh | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/fixincludes/mkfixinc.sh b/fixincludes/mkfixinc.sh
+index 6653fedb..0d96c8c 100755
+--- a/fixincludes/mkfixinc.sh
++++ b/fixincludes/mkfixinc.sh
+@@ -19,7 +19,8 @@ case $machine in
+     powerpc-*-eabi*    | \
+     powerpc-*-rtems*   | \
+     powerpcle-*-eabisim* | \
+-    powerpcle-*-eabi* )
++    powerpcle-*-eabi* | \
++    *-musl* )
+ 	#  IF there is no include fixing,
+ 	#  THEN create a no-op fixer and exit
+ 	(echo "#! /bin/sh" ; echo "exit 0" ) > ${target}
+-- 
+2.6.3
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch
new file mode 100644
index 0000000..a1cfb9c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0047-nios2-Define-MUSL_DYNAMIC_LINKER.patch
@@ -0,0 +1,28 @@
+From f5ca07132b9292d2045ca7204e9cbfde2e59d0bf Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 2 Feb 2016 10:26:10 -0800
+Subject: [PATCH 47/48] nios2: Define MUSL_DYNAMIC_LINKER
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ gcc/config/nios2/linux.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h
+index f43f655..5587ab3 100644
+--- a/gcc/config/nios2/linux.h
++++ b/gcc/config/nios2/linux.h
+@@ -30,6 +30,7 @@
+ #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}"
+ 
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1"
++#define MUSL_DYNAMIC_LINKER  "/lib/ld-musl-nios2.so.1"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC LINK_SPEC_ENDIAN \
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch
new file mode 100644
index 0000000..5ddd40a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0048-ssp_nonshared.patch
@@ -0,0 +1,29 @@
+From 3cb6013cf287ed9b1247ea37541e64b9810a121d Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Sat, 7 Nov 2015 14:58:40 +0000
+Subject: [PATCH 48/48] ssp_nonshared
+
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+ gcc/gcc.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/gcc.c b/gcc/gcc.c
+index 8f53aea..3ddc658 100644
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -732,7 +732,8 @@ proper position among the other output files.  */
+ #ifndef LINK_SSP_SPEC
+ #ifdef TARGET_LIBC_PROVIDES_SSP
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+-		       "|fstack-protector-strong|fstack-protector-explicit:}"
++		       "|fstack-protector-strong|fstack-protector-explicit" \
++		       ":-lssp_nonshared}"
+ #else
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+ 		       "|fstack-protector-strong|fstack-protector-explicit" \
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch
new file mode 100644
index 0000000..0ea5143
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0049-Disable-the-weak-reference-logic-in-gthr.h-for-os-ge.patch
@@ -0,0 +1,78 @@
+From 553d8e3b9073ff3e0a9d2fac9b1823fb17ad247c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 2 Feb 2016 21:00:18 -0800
+Subject: [PATCH 49/51] Disable the weak reference logic in gthr.h for
+ os/generic
+
+It does not work unless work arounds are there in gthr-posix.h
+
+origin of patch
+http://port70.net/~nsz/musl/gcc-5.3.0/0004-gthr.patch
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ libgfortran/acinclude.m4                    | 2 +-
+ libgfortran/configure                       | 2 +-
+ libstdc++-v3/config/os/generic/os_defines.h | 5 +++++
+ libstdc++-v3/configure.host                 | 3 +++
+ 4 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4
+index ba890f9..30b8b1a6 100644
+--- a/libgfortran/acinclude.m4
++++ b/libgfortran/acinclude.m4
+@@ -100,7 +100,7 @@ void foo (void);
+ 	      [Define to 1 if the target supports #pragma weak])
+   fi
+   case "$host" in
+-    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
++    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
+       AC_DEFINE(GTHREAD_USE_WEAK, 0,
+ 		[Define to 0 if the target shouldn't use #pragma weak])
+       ;;
+diff --git a/libgfortran/configure b/libgfortran/configure
+index 5d47e65..cdf9695 100755
+--- a/libgfortran/configure
++++ b/libgfortran/configure
+@@ -26456,7 +26456,7 @@ $as_echo "#define SUPPORTS_WEAK 1" >>confdefs.h
+ 
+   fi
+   case "$host" in
+-    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
++    *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* )
+ 
+ $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
+ 
+diff --git a/libstdc++-v3/config/os/generic/os_defines.h b/libstdc++-v3/config/os/generic/os_defines.h
+index 45bf52a..103ec0e 100644
+--- a/libstdc++-v3/config/os/generic/os_defines.h
++++ b/libstdc++-v3/config/os/generic/os_defines.h
+@@ -33,4 +33,9 @@
+ // System-specific #define, typedefs, corrections, etc, go here.  This
+ // file will come before all others.
+ 
++// Disable the weak reference logic in gthr.h for os/generic because it
++// is broken on every platform unless there is implementation specific
++// workaround in gthr-posix.h and at link-time for static linking.
++#define _GLIBCXX_GTHREAD_USE_WEAK 0
++
+ #endif
+diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host
+index 1756444..2a87bb8 100644
+--- a/libstdc++-v3/configure.host
++++ b/libstdc++-v3/configure.host
+@@ -273,6 +273,9 @@ case "${host_os}" in
+   freebsd*)
+     os_include_dir="os/bsd/freebsd"
+     ;;
++  linux-musl*)
++    os_include_dir="os/generic"
++    ;;
+   gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu)
+     # check for musl by target
+     case "${host_os}" in
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0050-powerpc-pass-secure-plt-to-the-linker.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0050-powerpc-pass-secure-plt-to-the-linker.patch
new file mode 100644
index 0000000..b2f2bbd
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0050-powerpc-pass-secure-plt-to-the-linker.patch
@@ -0,0 +1,66 @@
+From 4fa0cf03678f849917dcc3d149989b7fecdbe276 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 2 Feb 2016 21:10:00 -0800
+Subject: [PATCH 50/51] powerpc pass --secure-plt to the linker
+
+Secure-plt when enabled does not pass right options to linker
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+ gcc/config/rs6000/linux64.h | 4 ++++
+ gcc/config/rs6000/sysv4.h   | 2 ++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
+index 679da4b..3ca7cd7 100644
+--- a/gcc/config/rs6000/linux64.h
++++ b/gcc/config/rs6000/linux64.h
+@@ -174,20 +174,24 @@ extern int dot_symbols;
+ #undef	ASM_DEFAULT_SPEC
+ #undef	ASM_SPEC
+ #undef	LINK_OS_LINUX_SPEC
++#undef	LINK_SECURE_PLT_SPEC
+ 
+ #ifndef	RS6000_BI_ARCH
+ #define	ASM_DEFAULT_SPEC "-mppc64"
+ #define	ASM_SPEC	 "%(asm_spec64) %(asm_spec_common)"
+ #define	LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)"
++#define	LINK_SECURE_PLT_SPEC ""
+ #else
+ #if DEFAULT_ARCH64_P
+ #define	ASM_DEFAULT_SPEC "-mppc%{!m32:64}"
+ #define	ASM_SPEC	 "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)"
+ #define	LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}"
++#define	LINK_SECURE_PLT_SPEC "%{m32: " LINK_SECURE_PLT_DEFAULT_SPEC "}"
+ #else
+ #define	ASM_DEFAULT_SPEC "-mppc%{m64:64}"
+ #define	ASM_SPEC	 "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)"
+ #define	LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}"
++#define	LINK_SECURE_PLT_SPEC "%{!m64: " LINK_SECURE_PLT_DEFAULT_SPEC "}"
+ #endif
+ #endif
+ 
+diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
+index 8794fa5..0835551 100644
+--- a/gcc/config/rs6000/sysv4.h
++++ b/gcc/config/rs6000/sysv4.h
+@@ -571,6 +571,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
+                : %(link_start_default)     }"
+ 
+ #define LINK_START_DEFAULT_SPEC ""
++#define LINK_SECURE_PLT_SPEC LINK_SECURE_PLT_DEFAULT_SPEC
+ 
+ #undef	LINK_SPEC
+ #define	LINK_SPEC "\
+@@ -578,6 +579,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN)
+ %{R*} \
+ %(link_shlib) \
+ %{!T*: %(link_start) } \
++%{!static: %{!mbss-plt: %(link_secure_plt_default)}} \
+ %(link_os)"
+ 
+ /* Shared libraries are not default.  */
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
new file mode 100644
index 0000000..e8f79b5
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0051-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch
@@ -0,0 +1,31 @@
+From 32593b38082ea65f4c82159254adf1e0dc2423be Mon Sep 17 00:00:00 2001
+From: bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 16 Feb 2016 03:15:15 -0500
+Subject: [PATCH] Ignore -fdebug-prefix-map in producer string (by Daniel Kahn
+ Gillmor)
+
+* dwarf2out.c (gen_producer_string): Ignore -fdebug-prefix-map.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231835 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/dwarf2out.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
+index 3614c10..526f114 100644
+--- a/gcc/dwarf2out.c
++++ b/gcc/dwarf2out.c
+@@ -19670,6 +19670,7 @@ gen_producer_string (void)
+       case OPT_fpreprocessed:
+       case OPT_fltrans_output_list_:
+       case OPT_fresolution_:
++      case OPT_fdebug_prefix_map_:
+ 	/* Ignore these.  */
+ 	continue;
+       default:
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0052-nios2-use-ret-with-r31.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0052-nios2-use-ret-with-r31.patch
new file mode 100644
index 0000000..f3cb47f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0052-nios2-use-ret-with-r31.patch
@@ -0,0 +1,103 @@
+From 1d67120d95c2c6e0ed4f7357d1cc62887eaba463 Mon Sep 17 00:00:00 2001
+From: sandra <sandra@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 12 May 2015 15:57:22 +0000
+Subject: [PATCH] 2015-05-12  Chung-Lin Tang  <cltang@codesourcery.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+	gcc/
+	* config/nios2/nios2.h (enum reg_class): Add IJMP_REGS enum
+	value.
+	(REG_CLASS_NAMES): Add "IJMP_REGS".
+	(REG_CLASS_CONTENTS): Add new entry for IJMP_REGS.
+	* config/nios2/nios2.md (indirect_jump,*tablejump): Adjust to
+	use new "c" register constraint.
+	* config/nios2/constraint.md (c): New register constraint
+	corresponding to IJMP_REGS.
+
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223082 138bc75d-0d04-0410-961f-82ee72b054a4
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport [ git://gcc.gnu.org/git/gcc.git 1d67120d95c2c6e0ed4f7357d1cc62887eaba463 ]
+---
+ gcc/ChangeLog                   | 12 ++++++++++++
+ gcc/config/nios2/constraints.md |  3 +++
+ gcc/config/nios2/nios2.h        | 11 +++++++----
+ gcc/config/nios2/nios2.md       |  4 ++--
+ 4 files changed, 24 insertions(+), 6 deletions(-)
+
+diff --git a/gcc/config/nios2/constraints.md b/gcc/config/nios2/constraints.md
+index f4bd9f7..735f892 100644
+--- a/gcc/config/nios2/constraints.md
++++ b/gcc/config/nios2/constraints.md
+@@ -39,6 +39,9 @@
+ 
+ ;; Register constraints
+ 
++(define_register_constraint "c" "IJMP_REGS"
++  "A register suitable for an indirect jump.")
++
+ (define_register_constraint "j" "SIB_REGS"
+   "A register suitable for an indirect sibcall.")
+ 
+diff --git a/gcc/config/nios2/nios2.h b/gcc/config/nios2/nios2.h
+index 510ab5f..ac33978 100644
+--- a/gcc/config/nios2/nios2.h
++++ b/gcc/config/nios2/nios2.h
+@@ -173,6 +173,7 @@ enum reg_class
+ {
+   NO_REGS,
+   SIB_REGS,
++  IJMP_REGS,
+   GP_REGS,
+   ALL_REGS,
+   LIM_REG_CLASSES
+@@ -183,6 +184,7 @@ enum reg_class
+ #define REG_CLASS_NAMES   \
+   {  "NO_REGS",		  \
+      "SIB_REGS",	  \
++     "IJMP_REGS",	  \
+      "GP_REGS",           \
+      "ALL_REGS" }
+ 
+@@ -190,10 +192,11 @@ enum reg_class
+ 
+ #define REG_CLASS_CONTENTS			\
+   {						\
+-    /* NO_REGS  */ { 0, 0},			\
+-    /* SIB_REGS */ { 0xfe0c, 0},		\
+-    /* GP_REGS  */ {~0, 0},			\
+-    /* ALL_REGS */ {~0,~0}			\
++    /* NO_REGS    */ { 0, 0},			\
++    /* SIB_REGS   */ { 0xfe0c, 0},		\
++    /* IJMP_REGS  */ { 0x7fffffff, 0},		\
++    /* GP_REGS    */ {~0, 0},			\
++    /* ALL_REGS   */ {~0,~0}			\
+   }
+ 
+ 
+diff --git a/gcc/config/nios2/nios2.md b/gcc/config/nios2/nios2.md
+index 7b35d269..36ef101 100644
+--- a/gcc/config/nios2/nios2.md
++++ b/gcc/config/nios2/nios2.md
+@@ -697,7 +697,7 @@
+ ; check or adjust for overflow.
+ 
+ (define_insn "indirect_jump"
+-  [(set (pc) (match_operand:SI 0 "register_operand" "r"))]
++  [(set (pc) (match_operand:SI 0 "register_operand" "c"))]
+   ""
+   "jmp\\t%0"
+   [(set_attr "type" "control")])
+@@ -811,7 +811,7 @@
+ 
+ (define_insn "*tablejump"
+   [(set (pc)
+-        (match_operand:SI 0 "register_operand" "r"))
++        (match_operand:SI 0 "register_operand" "c"))
+    (use (label_ref (match_operand 1 "" "")))]
+   ""
+   "jmp\\t%0"
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch
new file mode 100644
index 0000000..c18f40e
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch
@@ -0,0 +1,307 @@
+From 536b8318974495cde2b42c3c2742748e2b271be0 Mon Sep 17 00:00:00 2001
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 27 May 2015 13:25:01 +0000
+Subject: [PATCH] PR target/65358 Avoid clobbering partial argument during
+ sibcall
+
+	PR target/65358
+	* expr.c (memory_load_overlap): New function.
+	(emit_push_insn): When pushing partial args to the stack would
+	clobber the register part load the overlapping part into a pseudo
+	and put it into the hard reg after pushing.  Change return type
+	to bool.  Add bool argument.
+	* expr.h (emit_push_insn): Change return type to bool.
+	Add bool argument.
+	* calls.c (expand_call): Cancel sibcall optimization when encountering
+	partial argument on targets with ARGS_GROW_DOWNWARD and
+	!STACK_GROWS_DOWNWARD.
+	(emit_library_call_value_1): Update callsite of emit_push_insn.
+	(store_one_arg): Likewise.
+
+	PR target/65358
+	* gcc.dg/pr65358.c: New test.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223753 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Upstream-Status: Backport from 6.0
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ gcc/calls.c                    | 17 ++++++--
+ gcc/expr.c                     | 90 +++++++++++++++++++++++++++++++++++++-----
+ gcc/expr.h                     |  4 +-
+ gcc/testsuite/gcc.dg/pr65358.c | 33 ++++++++++++++++
+ 4 files changed, 129 insertions(+), 15 deletions(-)
+ create mode 100644 gcc/testsuite/gcc.dg/pr65358.c
+
+diff --git a/gcc/calls.c b/gcc/calls.c
+index ee8ea5f..2334381 100644
+--- a/gcc/calls.c
++++ b/gcc/calls.c
+@@ -3236,6 +3236,14 @@ expand_call (tree exp, rtx target, int ignore)
+ 	    {
+ 	      rtx_insn *before_arg = get_last_insn ();
+ 
++	     /* On targets with weird calling conventions (e.g. PA) it's
++		hard to ensure that all cases of argument overlap between
++		stack and registers work.  Play it safe and bail out.  */
++#if defined(ARGS_GROW_DOWNWARD) && !defined(STACK_GROWS_DOWNWARD)
++		  sibcall_failure = 1;
++		  break;
++#endif
++
+ 	      if (store_one_arg (&args[i], argblock, flags,
+ 				 adjusted_args_size.var != 0,
+ 				 reg_parm_stack_space)
+@@ -4279,7 +4287,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value,
+ 			  partial, reg, 0, argblock,
+ 			  GEN_INT (argvec[argnum].locate.offset.constant),
+ 			  reg_parm_stack_space,
+-			  ARGS_SIZE_RTX (argvec[argnum].locate.alignment_pad));
++			  ARGS_SIZE_RTX (argvec[argnum].locate.alignment_pad), false);
+ 
+ 	  /* Now mark the segment we just used.  */
+ 	  if (ACCUMULATE_OUTGOING_ARGS)
+@@ -4886,10 +4894,11 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
+ 
+       /* This isn't already where we want it on the stack, so put it there.
+ 	 This can either be done with push or copy insns.  */
+-      emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX,
++      if (!emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), NULL_RTX,
+ 		      parm_align, partial, reg, used - size, argblock,
+ 		      ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space,
+-		      ARGS_SIZE_RTX (arg->locate.alignment_pad));
++		      ARGS_SIZE_RTX (arg->locate.alignment_pad), true))
++	sibcall_failure = 1;
+ 
+       /* Unless this is a partially-in-register argument, the argument is now
+ 	 in the stack.  */
+@@ -5001,7 +5010,7 @@ store_one_arg (struct arg_data *arg, rtx argblock, int flags,
+       emit_push_insn (arg->value, arg->mode, TREE_TYPE (pval), size_rtx,
+ 		      parm_align, partial, reg, excess, argblock,
+ 		      ARGS_SIZE_RTX (arg->locate.offset), reg_parm_stack_space,
+-		      ARGS_SIZE_RTX (arg->locate.alignment_pad));
++		      ARGS_SIZE_RTX (arg->locate.alignment_pad), false);
+ 
+       /* Unless this is a partially-in-register argument, the argument is now
+ 	 in the stack.
+diff --git a/gcc/expr.c b/gcc/expr.c
+index 5c09550..24a6293 100644
+--- a/gcc/expr.c
++++ b/gcc/expr.c
+@@ -4121,12 +4121,35 @@ emit_single_push_insn (machine_mode mode, rtx x, tree type)
+ }
+ #endif
+ 
++/* If reading SIZE bytes from X will end up reading from
++   Y return the number of bytes that overlap.  Return -1
++   if there is no overlap or -2 if we can't determine
++   (for example when X and Y have different base registers).  */
++
++static int
++memory_load_overlap (rtx x, rtx y, HOST_WIDE_INT size)
++{
++  rtx tmp = plus_constant (Pmode, x, size);
++  rtx sub = simplify_gen_binary (MINUS, Pmode, tmp, y);
++
++  if (!CONST_INT_P (sub))
++    return -2;
++
++  HOST_WIDE_INT val = INTVAL (sub);
++
++  return IN_RANGE (val, 1, size) ? val : -1;
++}
++
+ /* Generate code to push X onto the stack, assuming it has mode MODE and
+    type TYPE.
+    MODE is redundant except when X is a CONST_INT (since they don't
+    carry mode info).
+    SIZE is an rtx for the size of data to be copied (in bytes),
+    needed only if X is BLKmode.
++   Return true if successful.  May return false if asked to push a
++   partial argument during a sibcall optimization (as specified by
++   SIBCALL_P) and the incoming and outgoing pointers cannot be shown
++   to not overlap.
+ 
+    ALIGN (in bits) is maximum alignment we can assume.
+ 
+@@ -4152,11 +4175,11 @@ emit_single_push_insn (machine_mode mode, rtx x, tree type)
+    for arguments passed in registers.  If nonzero, it will be the number
+    of bytes required.  */
+ 
+-void
++bool
+ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
+ 		unsigned int align, int partial, rtx reg, int extra,
+ 		rtx args_addr, rtx args_so_far, int reg_parm_stack_space,
+-		rtx alignment_pad)
++		rtx alignment_pad, bool sibcall_p)
+ {
+   rtx xinner;
+   enum direction stack_direction
+@@ -4179,6 +4202,10 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
+ 
+   xinner = x;
+ 
++  int nregs = partial / UNITS_PER_WORD;
++  rtx *tmp_regs = NULL;
++  int overlapping = 0;
++
+   if (mode == BLKmode
+       || (STRICT_ALIGNMENT && align < GET_MODE_ALIGNMENT (mode)))
+     {
+@@ -4309,6 +4336,43 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
+ 	     PARM_BOUNDARY.  Assume the caller isn't lying.  */
+ 	  set_mem_align (target, align);
+ 
++	  /* If part should go in registers and pushing to that part would
++	     overwrite some of the values that need to go into regs, load the
++	     overlapping values into temporary pseudos to be moved into the hard
++	     regs at the end after the stack pushing has completed.
++	     We cannot load them directly into the hard regs here because
++	     they can be clobbered by the block move expansions.
++	     See PR 65358.  */
++
++	  if (partial > 0 && reg != 0 && mode == BLKmode
++	      && GET_CODE (reg) != PARALLEL)
++	    {
++	      overlapping = memory_load_overlap (XEXP (x, 0), temp, partial);
++	      if (overlapping > 0)
++	        {
++		  gcc_assert (overlapping % UNITS_PER_WORD == 0);
++		  overlapping /= UNITS_PER_WORD;
++
++		  tmp_regs = XALLOCAVEC (rtx, overlapping);
++
++		  for (int i = 0; i < overlapping; i++)
++		    tmp_regs[i] = gen_reg_rtx (word_mode);
++
++		  for (int i = 0; i < overlapping; i++)
++		    emit_move_insn (tmp_regs[i],
++				    operand_subword_force (target, i, mode));
++	        }
++	      else if (overlapping == -1)
++		overlapping = 0;
++	      /* Could not determine whether there is overlap.
++	         Fail the sibcall.  */
++	      else
++		{
++		  overlapping = 0;
++		  if (sibcall_p)
++		    return false;
++		}
++	    }
+ 	  emit_block_move (target, xinner, size, BLOCK_OP_CALL_PARM);
+ 	}
+     }
+@@ -4363,12 +4427,13 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
+ 	 has a size a multiple of a word.  */
+       for (i = size - 1; i >= not_stack; i--)
+ 	if (i >= not_stack + offset)
+-	  emit_push_insn (operand_subword_force (x, i, mode),
++	  if (!emit_push_insn (operand_subword_force (x, i, mode),
+ 			  word_mode, NULL_TREE, NULL_RTX, align, 0, NULL_RTX,
+ 			  0, args_addr,
+ 			  GEN_INT (args_offset + ((i - not_stack + skip)
+ 						  * UNITS_PER_WORD)),
+-			  reg_parm_stack_space, alignment_pad);
++			  reg_parm_stack_space, alignment_pad, sibcall_p))
++	    return false;
+     }
+   else
+     {
+@@ -4411,9 +4476,8 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
+ 	}
+     }
+ 
+-  /* If part should go in registers, copy that part
+-     into the appropriate registers.  Do this now, at the end,
+-     since mem-to-mem copies above may do function calls.  */
++  /* Move the partial arguments into the registers and any overlapping
++     values that we moved into the pseudos in tmp_regs.  */
+   if (partial > 0 && reg != 0)
+     {
+       /* Handle calls that pass values in multiple non-contiguous locations.
+@@ -4421,9 +4485,15 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
+       if (GET_CODE (reg) == PARALLEL)
+ 	emit_group_load (reg, x, type, -1);
+       else
+-	{
++        {
+ 	  gcc_assert (partial % UNITS_PER_WORD == 0);
+-	  move_block_to_reg (REGNO (reg), x, partial / UNITS_PER_WORD, mode);
++	  move_block_to_reg (REGNO (reg), x, nregs - overlapping, mode);
++
++	  for (int i = 0; i < overlapping; i++)
++	    emit_move_insn (gen_rtx_REG (word_mode, REGNO (reg)
++						    + nregs - overlapping + i),
++			    tmp_regs[i]);
++
+ 	}
+     }
+ 
+@@ -4432,6 +4502,8 @@ emit_push_insn (rtx x, machine_mode mode, tree type, rtx size,
+ 
+   if (alignment_pad && args_addr == 0)
+     anti_adjust_stack (alignment_pad);
++
++  return true;
+ }
+ 
+ /* Return X if X can be used as a subtarget in a sequence of arithmetic
+diff --git a/gcc/expr.h b/gcc/expr.h
+index 867852e..5fcc13f 100644
+--- a/gcc/expr.h
++++ b/gcc/expr.h
+@@ -218,8 +218,8 @@ extern rtx emit_move_resolve_push (machine_mode, rtx);
+ extern rtx push_block (rtx, int, int);
+ 
+ /* Generate code to push something onto the stack, given its mode and type.  */
+-extern void emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int,
+-			    int, rtx, int, rtx, rtx, int, rtx);
++extern bool emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int,
++			    int, rtx, int, rtx, rtx, int, rtx, bool);
+ 
+ /* Expand an assignment that stores the value of FROM into TO.  */
+ extern void expand_assignment (tree, tree, bool);
+diff --git a/gcc/testsuite/gcc.dg/pr65358.c b/gcc/testsuite/gcc.dg/pr65358.c
+new file mode 100644
+index 0000000..ba89fd4
+--- /dev/null
++++ b/gcc/testsuite/gcc.dg/pr65358.c
+@@ -0,0 +1,33 @@
++/* { dg-do run } */
++/* { dg-options "-O2" } */
++
++struct pack
++{
++  int fine;
++  int victim;
++  int killer;
++};
++
++int __attribute__ ((__noinline__, __noclone__))
++bar (int a, int b, struct pack p)
++{
++  if (a != 20 || b != 30)
++    __builtin_abort ();
++  if (p.fine != 40 || p.victim != 50 || p.killer != 60)
++    __builtin_abort ();
++  return 0;
++}
++
++int __attribute__ ((__noinline__, __noclone__))
++foo (int arg1, int arg2, int arg3, struct pack p)
++{
++  return bar (arg2, arg3, p);
++}
++
++int main (void)
++{
++  struct pack p = { 40, 50, 60 };
++
++  (void) foo (10, 20, 30, p);
++  return 0;
++}
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0054-support-ffile-prefix-map.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0054-support-ffile-prefix-map.patch
new file mode 100644
index 0000000..da16879
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0054-support-ffile-prefix-map.patch
@@ -0,0 +1,284 @@
+From ef7c2bda6b4c88f8007ed663b1108cd4651598c8 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 16 Mar 2016 02:27:43 -0400
+Subject: [PATCH] gcc/libcpp: support -ffile-prefix-map=<old>=<new>
+
+Similar -fdebug-prefix-map, add option -ffile-prefix-map to map one
+directory name (old) to another (new) in __FILE__, __BASE_FILE__ and
+__builtin_FILE ().
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70268
+
+Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/c-family/c-opts.c     |  6 ++++
+ gcc/c-family/c.opt        |  4 +++
+ gcc/dwarf2out.c           |  1 +
+ gcc/gimplify.c            |  2 ++
+ libcpp/Makefile.in        | 10 +++---
+ libcpp/file-map.c         | 92 +++++++++++++++++++++++++++++++++++++++++++++++
+ libcpp/include/file-map.h | 30 ++++++++++++++++
+ libcpp/macro.c            |  2 ++
+ 8 files changed, 142 insertions(+), 5 deletions(-)
+ create mode 100644 libcpp/file-map.c
+ create mode 100644 libcpp/include/file-map.h
+
+diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
+index 718a052..3f93c56 100644
+--- a/gcc/c-family/c-opts.c
++++ b/gcc/c-family/c-opts.c
+@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3.  If not see
+ #include "opts.h"
+ #include "plugin.h"		/* For PLUGIN_INCLUDE_FILE event.  */
+ #include "mkdeps.h"
++#include "file-map.h"
+ #include "c-target.h"
+ #include "tm.h"			/* For BYTES_BIG_ENDIAN,
+ 				   DOLLARS_IN_IDENTIFIERS,
+@@ -510,6 +511,11 @@ c_common_handle_option (size_t scode, const char *arg, int value,
+       cpp_opts->narrow_charset = arg;
+       break;
+ 
++    case OPT_ffile_prefix_map_:
++      if (add_file_prefix_map (arg) < 0)
++        error ("invalid argument %qs to -ffile-prefix-map", arg);
++      break;
++
+     case OPT_fwide_exec_charset_:
+       cpp_opts->wide_charset = arg;
+       break;
+diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
+index 453ec8e..30ad053 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -1117,6 +1117,10 @@ fexec-charset=
+ C ObjC C++ ObjC++ Joined RejectNegative
+ -fexec-charset=<cset>	Convert all strings and character constants to character set <cset>
+ 
++ffile-prefix-map=
++C ObjC C++ ObjC++ Joined RejectNegative
++-ffile-prefix-map=<old=new>	Map one directory name to another in __FILE__, __BASE_FILE__ and __builtin_FILE ()
++
+ fextended-identifiers
+ C ObjC C++ ObjC++
+ Permit universal character names (\\u and \\U) in identifiers
+diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
+index 526f114..438a475 100644
+--- a/gcc/dwarf2out.c
++++ b/gcc/dwarf2out.c
+@@ -19671,6 +19671,7 @@ gen_producer_string (void)
+       case OPT_fltrans_output_list_:
+       case OPT_fresolution_:
+       case OPT_fdebug_prefix_map_:
++      case OPT_ffile_prefix_map_:
+ 	/* Ignore these.  */
+ 	continue;
+       default:
+diff --git a/gcc/gimplify.c b/gcc/gimplify.c
+index c85f83a..1ffe1e1 100644
+--- a/gcc/gimplify.c
++++ b/gcc/gimplify.c
+@@ -87,6 +87,7 @@ along with GCC; see the file COPYING3.  If not see
+ #include "gimple-low.h"
+ #include "cilk.h"
+ #include "gomp-constants.h"
++#include "file-map.h"
+ 
+ #include "langhooks-def.h"	/* FIXME: for lhd_set_decl_assembler_name */
+ #include "tree-pass.h"		/* FIXME: only for PROP_gimple_any */
+@@ -2370,6 +2371,7 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
+       case BUILT_IN_FILE:
+ 	{
+ 	  const char *locfile = LOCATION_FILE (EXPR_LOCATION (*expr_p));
++	  locfile = remap_file_filename (locfile);
+ 	  *expr_p = build_string_literal (strlen (locfile) + 1, locfile);
+ 	  return GS_OK;
+ 	}
+diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in
+index ad35563..c210ff9 100644
+--- a/libcpp/Makefile.in
++++ b/libcpp/Makefile.in
+@@ -84,12 +84,12 @@ DEPMODE = $(CXXDEPMODE)
+ 
+ 
+ libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \
+-	expr.o files.o identifiers.o init.o lex.o line-map.o macro.o \
+-	mkdeps.o pch.o symtab.o traditional.o
++	expr.o file-map.o files.o identifiers.o init.o lex.o line-map.o \
++	macro.o mkdeps.o pch.o symtab.o traditional.o
+ 
+ libcpp_a_SOURCES = charset.c directives.c directives-only.c errors.c \
+-	expr.c files.c identifiers.c init.c lex.c line-map.c macro.c \
+-	mkdeps.c pch.c symtab.c traditional.c
++	expr.c file-map.c files.c identifiers.c init.c lex.c line-map.c \
++	macro.c mkdeps.c pch.c symtab.c traditional.c
+ 
+ all: libcpp.a $(USED_CATALOGS)
+ 
+@@ -263,7 +263,7 @@ po/$(PACKAGE).pot: $(libcpp_a_SOURCES)
+ 
+ TAGS_SOURCES = $(libcpp_a_SOURCES) internal.h ucnid.h \
+     include/line-map.h include/symtab.h include/cpp-id-data.h \
+-    include/cpplib.h include/mkdeps.h system.h
++    include/cpplib.h include/mkdeps.h system.h include/file-map.h
+ 
+ TAGS: $(TAGS_SOURCES)
+ 	cd $(srcdir) && etags $(TAGS_SOURCES)
+diff --git a/libcpp/file-map.c b/libcpp/file-map.c
+new file mode 100644
+index 0000000..04e851b
+--- /dev/null
++++ b/libcpp/file-map.c
+@@ -0,0 +1,92 @@
++/* Map one directory name to another in __FILE__, __BASE_FILE__
++   and __builtin_FILE ().
++   Copyright (C) 2001-2016 Free Software Foundation, Inc.
++
++This program is free software; you can redistribute it and/or modify it
++under the terms of the GNU General Public License as published by the
++Free Software Foundation; either version 3, or (at your option) any
++later version.
++
++This program is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; see the file COPYING3.  If not see
++<http://www.gnu.org/licenses/>.
++
++ In other words, you are welcome to use, share and improve this program.
++ You are forbidden to forbid anyone else to use, share and improve
++ what you give them.   Help stamp out software-hoarding!  */
++
++#include "config.h"
++#include "system.h"
++#include "file-map.h"
++
++/* Structure recording the mapping from source file and directory
++   names at compile time to __FILE__ */
++typedef struct file_prefix_map
++{
++  const char *old_prefix;
++  const char *new_prefix;
++  size_t old_len;
++  size_t new_len;
++  struct file_prefix_map *next;
++} file_prefix_map;
++
++/* Linked list of such structures.  */
++static file_prefix_map *file_prefix_maps;
++
++/* Record prefix mapping of __FILE__.  ARG is the argument to
++   -ffile-prefix-map and must be of the form OLD=NEW.  */
++int
++add_file_prefix_map (const char *arg)
++{
++  file_prefix_map *map;
++  const char *p;
++
++  p = strchr (arg, '=');
++  if (!p)
++  {
++      fprintf(stderr, "invalid argument %qs to -ffile-prefix-map", arg);
++      return -1;
++  }
++  map = XNEW (file_prefix_map);
++  map->old_prefix = xstrndup (arg, p - arg);
++  map->old_len = p - arg;
++  p++;
++  map->new_prefix = xstrdup (p);
++  map->new_len = strlen (p);
++  map->next = file_prefix_maps;
++  file_prefix_maps = map;
++
++  return 0;
++}
++
++/* Perform user-specified mapping of __FILE__ prefixes.  Return
++   the new name corresponding to filename.  */
++
++const char *
++remap_file_filename (const char *filename)
++{
++  file_prefix_map *map;
++  char *s;
++  const char *name;
++  size_t name_len;
++
++  for (map = file_prefix_maps; map; map = map->next)
++    if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
++      break;
++  if (!map)
++    return filename;
++  name = filename + map->old_len;
++  name_len = strlen (name) + 1;
++  s = (char *) alloca (name_len + map->new_len);
++  memcpy (s, map->new_prefix, map->new_len);
++  memcpy (s + map->new_len, name, name_len);
++
++  return xstrdup (s);
++}
++
++
+diff --git a/libcpp/include/file-map.h b/libcpp/include/file-map.h
+new file mode 100644
+index 0000000..e6f8cbf
+--- /dev/null
++++ b/libcpp/include/file-map.h
+@@ -0,0 +1,30 @@
++/* Map one directory name to another in __FILE__, __BASE_FILE__
++   and __builtin_FILE ().
++   Copyright (C) 2001-2016 Free Software Foundation, Inc.
++
++This program is free software; you can redistribute it and/or modify it
++under the terms of the GNU General Public License as published by the
++Free Software Foundation; either version 3, or (at your option) any
++later version.
++
++This program is distributed in the hope that it will be useful,
++but WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++GNU General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with this program; see the file COPYING3.  If not see
++<http://www.gnu.org/licenses/>.
++
++ In other words, you are welcome to use, share and improve this program.
++ You are forbidden to forbid anyone else to use, share and improve
++ what you give them.   Help stamp out software-hoarding!  */
++
++#ifndef LIBCPP_FILE_MAP_H
++#define LIBCPP_FILE_MAP_H
++
++const char * remap_file_filename (const char *filename);
++
++int add_file_prefix_map (const char *arg);
++
++#endif /* !LIBCPP_FILE_MAP_H  */
+diff --git a/libcpp/macro.c b/libcpp/macro.c
+index 1e0a0b5..c3d330c 100644
+--- a/libcpp/macro.c
++++ b/libcpp/macro.c
+@@ -26,6 +26,7 @@ along with this program; see the file COPYING3.  If not see
+ #include "system.h"
+ #include "cpplib.h"
+ #include "internal.h"
++#include "file-map.h"
+ 
+ typedef struct macro_arg macro_arg;
+ /* This structure represents the tokens of a macro argument.  These
+@@ -297,6 +298,7 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node)
+ 	    if (!name)
+ 	      abort ();
+ 	  }
++	name = remap_file_filename (name);
+ 	len = strlen (name);
+ 	buf = _cpp_unaligned_alloc (pfile, len * 2 + 3);
+ 	result = buf;
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
new file mode 100644
index 0000000..c7caed8
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
@@ -0,0 +1,43 @@
+From 14b79641ff6b0008aef7fbf7aa300daec11d1e78 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 16 Mar 2016 05:39:59 -0400
+Subject: [PATCH] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
+
+The oe-core may use external toolchain to compile,
+which may not support -ffile-prefix-map.
+
+Since we use -fdebug-prefix-map to do the same thing,
+so we could reuse it to replace -ffile-prefix-map.
+
+Upstream-Status: Inappropriate[oe-core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/opts-global.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/gcc/opts-global.c b/gcc/opts-global.c
+index b61bdcf..51bb177 100644
+--- a/gcc/opts-global.c
++++ b/gcc/opts-global.c
+@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3.  If not see
+ #include "rtl.h"
+ #include "dbgcnt.h"
+ #include "debug.h"
++#include "file-map.h"
+ #include "hash-map.h"
+ #include "plugin-api.h"
+ #include "ipa-ref.h"
+@@ -378,6 +379,9 @@ handle_common_deferred_options (void)
+ 
+ 	case OPT_fdebug_prefix_map_:
+ 	  add_debug_prefix_map (opt->arg);
++
++	  /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
++	  add_file_prefix_map (opt->arg);
+ 	  break;
+ 
+ 	case OPT_fdump_:
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch
new file mode 100644
index 0000000..9791342
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0056-Enable-libc-provide-ssp-and-gcc_cv_target_dl_iterate.patch
@@ -0,0 +1,85 @@
+From 5c7bd853c8703f65904083778712ef625c3f3814 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 27 Mar 2016 20:31:50 -0700
+Subject: [PATCH 56/57] Enable libc provide ssp and
+ gcc_cv_target_dl_iterate_phdr for musl
+
+        * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*.
+        (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*.
+        * configure: Regenerate.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Backport
+
+ gcc/configure    | 7 +++++++
+ gcc/configure.ac | 7 +++++++
+ 2 files changed, 14 insertions(+)
+
+diff --git a/gcc/configure b/gcc/configure
+index fcb05e7..81a449c 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -27814,6 +27814,9 @@ if test "${gcc_cv_libc_provides_ssp+set}" = set; then :
+ else
+   gcc_cv_libc_provides_ssp=no
+     case "$target" in
++       *-*-musl*)
++        # All versions of musl provide stack protector
++        gcc_cv_libc_provides_ssp=yes;;
+        *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
+       # glibc 2.4 and later provides __stack_chk_fail and
+       # either __stack_chk_guard, or TLS access to stack guard canary.
+@@ -27846,6 +27849,7 @@ fi
+ 	 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
+ 	 # simply assert that glibc does provide this, which is true for all
+ 	 # realistically usable GNU/Hurd configurations.
++	 # All supported versions of musl provide it as well
+ 	 gcc_cv_libc_provides_ssp=yes;;
+        *-*-darwin* | *-*-freebsd*)
+ 	 ac_fn_c_check_func "$LINENO" "__stack_chk_fail" "ac_cv_func___stack_chk_fail"
+@@ -27942,6 +27946,9 @@ case "$target" in
+       gcc_cv_target_dl_iterate_phdr=no
+     fi
+     ;;
++  *-linux-musl*)
++    gcc_cv_target_dl_iterate_phdr=yes
++    ;;
+ esac
+ 
+ if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
+diff --git a/gcc/configure.ac b/gcc/configure.ac
+index 923bc9a..b08e3dc 100644
+--- a/gcc/configure.ac
++++ b/gcc/configure.ac
+@@ -5291,6 +5291,9 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library,
+       gcc_cv_libc_provides_ssp,
+       [gcc_cv_libc_provides_ssp=no
+     case "$target" in
++       *-*-musl*)
++        # All versions of musl provide stack protector
++        gcc_cv_libc_provides_ssp=yes;;
+        *-*-linux* | *-*-kfreebsd*-gnu | *-*-knetbsd*-gnu)
+       # glibc 2.4 and later provides __stack_chk_fail and
+       # either __stack_chk_guard, or TLS access to stack guard canary.
+@@ -5317,6 +5320,7 @@ AC_CACHE_CHECK(__stack_chk_fail in target C library,
+ 	 # <http://gcc.gnu.org/ml/gcc/2008-10/msg00130.html>) and for now
+ 	 # simply assert that glibc does provide this, which is true for all
+ 	 # realistically usable GNU/Hurd configurations.
++	 # All supported versions of musl provide it as well
+ 	 gcc_cv_libc_provides_ssp=yes;;
+        *-*-darwin* | *-*-freebsd*)
+ 	 AC_CHECK_FUNC(__stack_chk_fail,[gcc_cv_libc_provides_ssp=yes],
+@@ -5390,6 +5394,9 @@ case "$target" in
+       gcc_cv_target_dl_iterate_phdr=no
+     fi
+     ;;
++  *-linux-musl*)
++    gcc_cv_target_dl_iterate_phdr=yes
++    ;;
+ esac
+ GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR])
+ if test x$gcc_cv_target_dl_iterate_phdr = xyes; then
+-- 
+2.7.4
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0057-unwind-fix-for-musl.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0057-unwind-fix-for-musl.patch
new file mode 100644
index 0000000..c193587
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0057-unwind-fix-for-musl.patch
@@ -0,0 +1,42 @@
+From c5c33bf881a2aea355310dd90873ed39bc272b3c Mon Sep 17 00:00:00 2001
+From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Wed, 22 Apr 2015 14:20:01 +0000
+Subject: [PATCH 57/57] unwind fix for musl
+
+On behalf of szabolcs.nagy@arm.com
+
+2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
+	    Szabolcs Nagy  <szabolcs.nagy@arm.com>
+
+	* unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on
+	Linux if target provides dl_iterate_phdr.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Backport
+
+ libgcc/unwind-dw2-fde-dip.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
+index e1e566b..137dced 100644
+--- a/libgcc/unwind-dw2-fde-dip.c
++++ b/libgcc/unwind-dw2-fde-dip.c
+@@ -59,6 +59,12 @@
+ 
+ #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+     && defined(TARGET_DL_ITERATE_PHDR) \
++    && defined(__linux__)
++# define USE_PT_GNU_EH_FRAME
++#endif
++
++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
++    && defined(TARGET_DL_ITERATE_PHDR) \
+     && (defined(__DragonFly__) || defined(__FreeBSD__))
+ # define ElfW __ElfN
+ # define USE_PT_GNU_EH_FRAME
+-- 
+2.7.4
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0058-fdebug-prefix-map-support-to-remap-relative-path.patch b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0058-fdebug-prefix-map-support-to-remap-relative-path.patch
new file mode 100644
index 0000000..0b91fdb
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-5.3/0058-fdebug-prefix-map-support-to-remap-relative-path.patch
@@ -0,0 +1,51 @@
+From 289ad2969a5966c603bf6928ce442db74c4cbb25 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 24 Mar 2016 11:23:14 -0400
+Subject: [PATCH] gcc/final.c: -fdebug-prefix-map support to remap sources with
+ relative path
+
+PR other/70428
+* final.c (remap_debug_filename): Use lrealpath to translate
+relative path before remapping
+
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428
+Upstream-Status: Submitted [gcc-patches@gcc.gnu.org]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+diff --git a/gcc/final.c b/gcc/final.c
+index 55cf509..c3594c2 100644
+--- a/gcc/final.c
++++ b/gcc/final.c
+@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename)
+   const char *name;
+   size_t name_len;
+ 
++  /* Support to remap filename with relative path  */
++  char *realpath = lrealpath (filename);
++  if (realpath == NULL)
++    return filename;
++
+   for (map = debug_prefix_maps; map; map = map->next)
+-    if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
++    if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0)
+       break;
+   if (!map)
+-    return filename;
+-  name = filename + map->old_len;
++    {
++      free (realpath);
++      return filename;
++    }
++  name = realpath + map->old_len;
+   name_len = strlen (name) + 1;
+   s = (char *) alloca (name_len + map->new_len);
+   memcpy (s, map->new_prefix, map->new_len);
+   memcpy (s + map->new_len, name, name_len);
++  free (realpath);
+   return ggc_strdup (s);
+ }
+ 
+-- 
+2.7.4
+
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc
index 6f2f224..e4fd4d6 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-common.inc
@@ -54,7 +54,7 @@
 def get_tune_parameters(tune, d):
     availtunes = d.getVar('AVAILTUNES', True)
     if tune not in availtunes.split():
-        bb.error('The tune: %s is not one of the available tunes: %s', tune or None, availtunes)
+        bb.error('The tune: %s is not one of the available tunes: %s' % (tune or None, availtunes))
 
     localdata = bb.data.createCopy(d)
     override = ':tune-' + tune
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
index cee6f4a..f4f76bd 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -14,13 +14,6 @@
 # gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
 FORTRAN ?= ",f77"
 LANGUAGES ?= "c,c++${FORTRAN}${JAVA}"
-# disable --enable-target-optspace for powerpc SPE
-# at -Os libgcc.so.1 creates references into
-# hidden symbols in libgcc.a which linker complains
-# when linking shared libraries further in the build like (gnutls)
-
-SPECIAL_ARCH_LIST = "powerpc"
-OPTSPACE = '${@bb.utils.contains("SPECIAL_ARCH_LIST", "${TARGET_ARCH}", "", "--enable-target-optspace",d)}'
 
 EXTRA_OECONF_BASE ?= ""
 EXTRA_OECONF_PATHS ?= ""
@@ -42,7 +35,6 @@
     --enable-libstdcxx-pch \
     --program-prefix=${TARGET_PREFIX} \
     --without-local-prefix \
-    ${OPTSPACE} \
     ${EXTRA_OECONF_BASE} \
     ${EXTRA_OECONF_GCC_FLOAT} \
     ${EXTRA_OECONF_PATHS} \
@@ -72,6 +64,7 @@
 # features used in OE.
 EXTRA_OECONF_append_armv6 = " --with-arch=armv6"
 EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a"
+EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a"
 
 EXTRA_OECONF_GCC_FLOAT ??= ""
 CPPFLAGS = ""
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 54e4881..ec1d281 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -3,7 +3,7 @@
 SUMMARY = "GNU cc and gcc C compilers (cross-canadian for ${TARGET_ARCH} target)"
 PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc nativesdk-gettext"
 
 GCCMULTILIB = "--enable-multilib"
 
@@ -84,11 +84,6 @@
 "
 INSANE_SKIP_${PN} += "dev-so"
 
-FILES_${PN}-dbg += " \
-    ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/.debug \
-    ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/.debug \
-"
-
 FILES_${PN}-doc = "\
     ${infodir} \
     ${mandir} \
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.2.bb
deleted file mode 100644
index bf53c5c..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.2.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-cross-canadian.inc
-
-
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_4.8.bb
rename to yocto-poky/meta/recipes-devtools/gcc/gcc-cross-canadian_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc
index c0fa139..048b530 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial.inc
@@ -5,6 +5,9 @@
 INHIBIT_AUTOTOOLS_DEPS = "1"
 INHIBIT_DEFAULT_DEPS = "1"
 
+# We still need gnu-config-native
+DEPENDS_prepend = "gnu-config-native autoconf-native "
+
 PN = "gcc-cross-initial-${TARGET_ARCH}"
 
 CROSS_TARGET_SYS_DIR_append = ".${PN}"
@@ -19,7 +22,6 @@
     --disable-multilib \
     --disable-__cxa_atexit \
     --enable-languages=c \
-    ${OPTSPACE} \
     --program-prefix=${TARGET_PREFIX} \
     --with-sysroot=/not/exist \
     --with-build-sysroot=${GCCCROSS_BUILDSYSROOT} \
@@ -95,3 +97,4 @@
 do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_HOST}/ ${SYSROOT_DESTDIR}/${STAGING_DIR_TARGET}/${target_base_libdir}/"
 do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_HOST}/ ${STAGING_DIR_TCBOOTSTRAP}/${target_base_libdir}/"
 
+inherit nopackages
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.2.bb
deleted file mode 100644
index 4c73e5c..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-cross-initial.inc
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_4.8.bb
rename to yocto-poky/meta/recipes-devtools/gcc/gcc-cross-initial_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc
index aa10633..f479360 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -72,7 +72,6 @@
 	sed -i -e "/^'/d" ${B}/${TARGET_PREFIX}testgcc
 	sed -i -e "/^UID/d" ${B}/${TARGET_PREFIX}testgcc
 	sed -i -e "/^TERM/d" ${B}/${TARGET_PREFIX}testgcc
-	sed -i -e "/^PATCH_GET/d" ${B}/${TARGET_PREFIX}testgcc
 	sed -i -e "/^PKG_/d" ${B}/${TARGET_PREFIX}testgcc
 	sed -i -e "/^POSIXLY_/d" ${B}/${TARGET_PREFIX}testgcc
 	sed -i -e "/^PPID/d" ${B}/${TARGET_PREFIX}testgcc
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.2.bb
deleted file mode 100644
index b43cca0..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.2.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-cross.inc
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/gcc-cross_4.8.bb
rename to yocto-poky/meta/recipes-devtools/gcc/gcc-cross_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.2.bb
deleted file mode 100644
index fd90e11..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.2.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-cross-initial_${PV}.bb
-require gcc-crosssdk-initial.inc
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_4.8.bb
rename to yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk-initial_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.2.bb
deleted file mode 100644
index 40a6c4f..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-cross_${PV}.bb
-require gcc-crosssdk.inc
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_4.8.bb
rename to yocto-poky/meta/recipes-devtools/gcc/gcc-crosssdk_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-multilib-config.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-multilib-config.inc
index 1c0a45a..a0a2ac0 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-multilib-config.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-multilib-config.inc
@@ -29,6 +29,9 @@
     bb.utils.remove(build_conf_dir, True)
     ml_globs = ('%s/*/t-linux64' % src_conf_dir,
                 '%s/*/linux64.h' % src_conf_dir,
+                '%s/aarch64/t-aarch64' % src_conf_dir,
+                '%s/aarch64/aarch64.h' % src_conf_dir,
+                '%s/aarch64/aarch64-cores.def' % src_conf_dir,
                 '%s/*/linux.h' % src_conf_dir,
                 '%s/linux.h' % src_conf_dir)
 
@@ -130,6 +133,8 @@
         'mips64'    : ['gcc/config/mips/t-linux64'],
         'powerpc'   : ['gcc/config/rs6000/t-linux64'],
         'powerpc64' : ['gcc/config/rs6000/t-linux64'],
+        'aarch64'   : ['gcc/config/aarch64/t-aarch64'],
+        'arm'       : ['gcc/config/aarch64/t-aarch64'],
     }
 
     gcc_header_config_files = {
@@ -140,6 +145,8 @@
         'mips64'    : ['gcc/config/mips/linux.h', 'gcc/config/mips/linux64.h'],
         'powerpc'   : ['gcc/config/rs6000/linux64.h'],
         'powerpc64' : ['gcc/config/rs6000/linux64.h'],
+        'aarch64'   : ['gcc/config/aarch64/aarch64.h'],
+        'arm'       : ['gcc/config/aarch64/aarch64.h'],
     }
 
     libdir32 = 'SYSTEMLIBS_DIR'
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
index 690d780..8639c1c 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -1,6 +1,10 @@
 require gcc-configure-common.inc
 
-CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
+# Over-ride the LICENSE set by gcc-${PV}.inc to remove "& GPLv3"
+# All gcc-runtime packages are now covered by the runtime exception.
+LICENSE = "GPL-3.0-with-GCC-exception"
+
+CXXFLAGS_remove = "-fvisibility-inlines-hidden"
 
 EXTRA_OECONF_PATHS = "\
     --with-gxx-include-dir=${includedir}/c++/${BINV} \
@@ -10,7 +14,18 @@
 
 EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
 
-RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic"
+RUNTIMELIBITM = "libitm"
+RUNTIMELIBITM_mips = ""
+RUNTIMELIBITM_mipsel = ""
+RUNTIMELIBITM_mips64 = ""
+RUNTIMELIBITM_mips64el = ""
+RUNTIMELIBITM_nios2 = ""
+RUNTIMELIBITM_microblaze = ""
+
+RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \
+    ${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \
+"
+
 #  ?
 # libiberty
 # libmudflap
@@ -27,7 +42,8 @@
 		mkdir -p ${B}/$target/$d/
 		cd ${B}/$target/$d/
 		chmod a+x ${S}/$d/configure
-		${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+		relpath=${@os.path.relpath("${S}/$d", "${B}/$target/$d")}
+		$relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
 	done
 }
 
@@ -46,6 +62,7 @@
 		oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
 	done
 	rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
+	rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir
 	rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
 	if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
 		rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
@@ -91,38 +108,11 @@
     libatomic \
     libatomic-dev \
     libatomic-staticdev \
+    libitm \
+    libitm-dev \
+    libitm-staticdev \
 "
 
-# Most libraries are licensed with the exception, but
-# one library is really GPLv3.
-#
-LICENSE_${PN}-dbg = "GPL-3.0-with-GCC-exception & GPLv3"
-LICENSE_libstdc++ = "GPL-3.0-with-GCC-exception"
-LICENSE_libstdc++-precompile-dev = "GPL-3.0-with-GCC-exception"
-LICENSE_libstdc++-dev = "GPL-3.0-with-GCC-exception"
-LICENSE_libstdc++-staticdev = "GPL-3.0-with-GCC-exception"
-LICENSE_libg2c = "GPL-3.0-with-GCC-exception"
-LICENSE_libg2c-dev = "GPL-3.0-with-GCC-exception"
-LICENSE_libssp = "GPL-3.0-with-GCC-exception"
-LICENSE_libssp-dev = "GPL-3.0-with-GCC-exception"
-LICENSE_libssp-staticdev = "GPL-3.0-with-GCC-exception"
-LICENSE_libgfortran = "GPL-3.0-with-GCC-exception"
-LICENSE_libgfortran-dev = "GPL-3.0-with-GCC-exception"
-LICENSE_libgfortran-staticdev = "GPL-3.0-with-GCC-exception"
-LICENSE_libmudflap = "GPL-3.0-with-GCC-exception"
-LICENSE_libmudflap-dev = "GPL-3.0-with-GCC-exception"
-LICENSE_libmudflap-staticdev = "GPL-3.0-with-GCC-exception"
-LICENSE_libquadmath = "GPL-3.0-with-GCC-exception"
-LICENSE_libquadmath-dev = "GPL-3.0-with-GCC-exception"
-LICENSE_libquadmath-staticdev = "GPL-3.0-with-GCC-exception"
-LICENSE_libatomic = "GPL-3.0-with-GCC-exception"
-LICENSE_libatomic-dev = "GPL-3.0-with-GCC-exception"
-LICENSE_libatomic-staticdev = "GPL-3.0-with-GCC-exception"
-
-LICENSE_libgomp = "GPLv3"
-LICENSE_libgomp-dev = "GPLv3"
-LICENSE_libgomp-staticdev = "GPLv3"
-
 # The base package doesn't exist, so we clear the recommends.
 RRECOMMENDS_${PN}-dbg = ""
 
@@ -143,11 +133,11 @@
 FILES_libstdc++-dev = "\
     ${includedir}/c++/ \
     ${libdir}/libstdc++.so \
-    ${libdir}/libstdc++.la \
+    ${libdir}/libstdc++*.la \
     ${libdir}/libsupc++.la \
 "
 FILES_libstdc++-staticdev = "\
-    ${libdir}/libstdc++.a \
+    ${libdir}/libstdc++*.a \
     ${libdir}/libsupc++.a \
 "
 
@@ -193,6 +183,14 @@
 "
 FILES_libatomic-staticdev = "${libdir}/libatomic.a"
 
+FILES_libitm = "${libdir}/libitm.so.*"
+FILES_libitm-dev = "\
+    ${libdir}/libitm.so \
+    ${libdir}/libitm.la \
+    ${libdir}/libitm.spec \
+"
+FILES_libitm-staticdev = "${libdir}/libitm.a"
+
 do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
 do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
 do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_4.8.bb
deleted file mode 100644
index 497d691..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_4.8.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-runtime.inc
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.2.bb
rename to yocto-poky/meta/recipes-devtools/gcc/gcc-runtime_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
index c987ccb..6091a0b 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers.inc
@@ -21,19 +21,15 @@
     echo "Configuring libsanitizer"
     rm -rf ${B}/$target/libsanitizer/
     mkdir -p ${B}/$target/libsanitizer/
-    # This is kind of gross, but it's an easy way to make configure happy
-    # without hacking it up to use the system stdc++ instead of the one it
-    # expects to be newly built.
-    rm -rf ${B}/$target/libstdc++-v3/
-    mkdir -p ${B}/$target/libstdc++-v3/src/
-    ln -s ${STAGING_LIBDIR}/libstdc++.la ${B}/$target/libstdc++-v3/src/
-    ln -s ${STAGING_LIBDIR}/libstdc++.so ${B}/$target/libstdc++-v3/src/
     cd ${B}/$target/libsanitizer/
     chmod a+x ${S}/libsanitizer/configure
-    ${S}/libsanitizer/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+    relpath=${@os.path.relpath("${S}/libsanitizer", "${B}/$target/libsanitizer")}
+    $relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
     # Easiest way to stop bad RPATHs getting into the library since we have a
     # broken libtool here
     sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libsanitizer/libtool
+    # Link to the sysroot's libstdc++ instead of one gcc thinks it just built
+    sed -i -e '/LIBSTDCXX_RAW_CXX_\(CXXFLAGS\|LDFLAGS\)\s*=/d' ${B}/$target/libsanitizer/*/Makefile
 }
 
 do_compile () {
@@ -58,10 +54,9 @@
 
 BBCLASSEXTEND = "nativesdk"
 
-PACKAGES = "${PN}"
+PACKAGES = "${PN} ${PN}-dbg"
 PACKAGES += "libasan libubsan liblsan libtsan"
 PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev"
-PACKAGES += "libasan-dbg libubsan-dbg liblsan-dbg libtsan-dbg"
 PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev"
 
 RDEPENDS_libasan += "libstdc++"
@@ -84,7 +79,6 @@
 COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm).*-linux'
 
 FILES_libasan += "${libdir}/libasan.so.*"
-FILES_libasan-dbg += "${libdir}/.debug/libasan.so.*"
 FILES_libasan-dev += "\
     ${libdir}/libasan_preinit.o \
     ${libdir}/libasan.so \
@@ -93,7 +87,6 @@
 FILES_libasan-staticdev += "${libdir}/libasan.a"
 
 FILES_libubsan += "${libdir}/libubsan.so.*"
-FILES_libubsan-dbg += "${libdir}/.debug/libubsan.so.*"
 FILES_libubsan-dev += "\
     ${libdir}/libubsan.so \
     ${libdir}/libubsan.la \
@@ -101,7 +94,6 @@
 FILES_libubsan-staticdev += "${libdir}/libubsan.a"
 
 FILES_liblsan += "${libdir}/liblsan.so.*"
-FILES_liblsan-dbg += "${libdir}/.debug/liblsan.so.*"
 FILES_liblsan-dev += "\
     ${libdir}/liblsan.so \
     ${libdir}/liblsan.la \
@@ -109,7 +101,6 @@
 FILES_liblsan-staticdev += "${libdir}/liblsan.a"
 
 FILES_libtsan += "${libdir}/libtsan.so.*"
-FILES_libtsan-dbg += "${libdir}/.debug/libtsan.so.*"
 FILES_libtsan-dev += "\
     ${libdir}/libtsan.so \
     ${libdir}/libtsan.la \
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.2.bb
deleted file mode 100644
index 601f666..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-sanitizers.inc
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_4.8.bb
rename to yocto-poky/meta/recipes-devtools/gcc/gcc-sanitizers_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-source.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-source.inc
index 794fd4d..49bde92 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-source.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-source.inc
@@ -1,16 +1,12 @@
 deltask do_configure 
 deltask do_compile 
-deltask do_package 
-deltask do_package_write_rpm 
-deltask do_package_write_ipk 
-deltask do_package_write_deb
 deltask do_install 
 deltask do_populate_sysroot
 deltask do_populate_lic 
-deltask do_package_qa
-deltask do_packagedata
 deltask do_rm_work
 
+inherit nopackages
+
 PN = "gcc-source-${PV}"
 WORKDIR = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
 SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.2.bb
deleted file mode 100644
index b890fa3..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.2.bb
+++ /dev/null
@@ -1,4 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require recipes-devtools/gcc/gcc-source.inc
-
-EXCLUDE_FROM_WORLD = "1"
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-source_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/gcc-source_4.8.bb
rename to yocto-poky/meta/recipes-devtools/gcc/gcc-source_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc b/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc
index d62c15a..b8dabe5 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/gcc-target.inc
@@ -44,10 +44,6 @@
 "
 INSANE_SKIP_${PN} += "dev-so"
 
-FILES_${PN}-dbg += "\
-    ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/.debug/ \
-    ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/plugin/.debug/ \
-"
 FILES_${PN}-dev = "\
     ${gcclibdir}/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
     ${libexecdir}/gcc/${TARGET_SYS}/${BINV}/lib*${SOLIBSDEV} \
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc_4.8.bb
deleted file mode 100644
index 2c618df..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/gcc_4.8.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-target.inc
-
-# Building with thumb enabled on armv4t fails with
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7438:(.text.unlikely+0x2fa): relocation truncated to fit: R_ARM_THM_CALL against symbol `fancy_abort(char const*, int, char const*)' defined in .glue_7 section in linker stubs
-# | gcc-4.8.1-r0/gcc-4.8.1/gcc/cp/decl.c:7442:(.text.unlikely+0x318): additional relocation overflows omitted from the output
-ARM_INSTRUCTION_SET_armv4 = "arm"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/gcc/gcc_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/gcc_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/gcc_5.2.bb
rename to yocto-poky/meta/recipes-devtools/gcc/gcc_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/libgcc-common.inc b/yocto-poky/meta/recipes-devtools/gcc/libgcc-common.inc
index b09ea65..dae07e9 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/libgcc-common.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/libgcc-common.inc
@@ -12,7 +12,8 @@
 	mkdir -p ${B}/$target/${BPN}/
 	cd ${B}/${BPN}
 	chmod a+x ${S}/${BPN}/configure
-	${S}/${BPN}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+	relpath=${@os.path.relpath("${S}/${BPN}", "${B}/${BPN}")}
+	$relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
 }
 
 do_compile () {
diff --git a/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial.inc b/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial.inc
index 4e92f00..59e8a62 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial.inc
@@ -16,3 +16,4 @@
 
 do_populate_sysroot[sstate-outputdirs] = "${STAGING_DIR_TCBOOTSTRAP}/"
 
+inherit nopackages
diff --git a/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.2.bb
deleted file mode 100644
index 19f253f..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc-initial.inc
diff --git a/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_4.8.bb
rename to yocto-poky/meta/recipes-devtools/gcc/libgcc-initial_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc b/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
index 95fa3f4..6837786 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/libgcc.inc
@@ -21,8 +21,6 @@
     ${libdir}/${TARGET_SYS}/${BINV}* \
 "
 
-FILES_${PN}-dbg += "${base_libdir}/.debug/"
-
 LIBGCCBUILDTREENAME = "gcc-build-internal-"
 
 do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
diff --git a/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.2.bb
deleted file mode 100644
index a5152f2..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.2.bb
+++ /dev/null
@@ -1,2 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgcc.inc
diff --git a/yocto-poky/meta/recipes-devtools/gcc/libgcc_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/libgcc_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/libgcc_4.8.bb
rename to yocto-poky/meta/recipes-devtools/gcc/libgcc_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc b/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
index e42843d..58ceb2e 100644
--- a/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
+++ b/yocto-poky/meta/recipes-devtools/gcc/libgfortran.inc
@@ -15,7 +15,8 @@
 	mkdir -p ${B}/$target/libgfortran/
 	cd ${B}/$target/libgfortran/
 	chmod a+x ${S}/libgfortran/configure
-	${S}/libgfortran/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+	relpath=${@os.path.relpath("${S}/libgfortran", "${B}/$target/libgfortran")}
+	$relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
 	# Easiest way to stop bad RPATHs getting into the library since we have a
 	# broken libtool here
 	sed -i -e 's/hardcode_into_libs=yes/hardcode_into_libs=no/' ${B}/$target/libgfortran/libtool
diff --git a/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.2.bb b/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.2.bb
deleted file mode 100644
index 71dd8b4..0000000
--- a/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.2.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require recipes-devtools/gcc/gcc-${PV}.inc
-require libgfortran.inc
-
diff --git a/yocto-poky/meta/recipes-devtools/gcc/libgfortran_4.8.bb b/yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.3.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gcc/libgfortran_4.8.bb
rename to yocto-poky/meta/recipes-devtools/gcc/libgfortran_5.3.bb
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb-7.10.1.inc b/yocto-poky/meta/recipes-devtools/gdb/gdb-7.10.1.inc
new file mode 100644
index 0000000..a9267d5
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb-7.10.1.inc
@@ -0,0 +1,9 @@
+LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+		    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
+		    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
+		    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
+
+SRC_URI[md5sum] = "b93a2721393e5fa226375b42d567d90b"
+SRC_URI[sha256sum] = "ff14f8050e6484508c73cbfa63731e57901478490ca1672dc0b5e2b03f6af622"
+
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb-7.9.1.inc b/yocto-poky/meta/recipes-devtools/gdb/gdb-7.9.1.inc
deleted file mode 100644
index 1ca95af..0000000
--- a/yocto-poky/meta/recipes-devtools/gdb/gdb-7.9.1.inc
+++ /dev/null
@@ -1,9 +0,0 @@
-LICENSE = "GPLv2 & GPLv3 & LGPLv2 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-		    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
-		    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
-		    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674"
-
-SRC_URI[md5sum] = "f3b97de919a9dba84490b2e076ec4cb0"
-SRC_URI[sha256sum] = "4994ad986726ac4128a6f1bd8020cd672e9a92aa76b80736563ef992992764ef"
-
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc b/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
index 166ba8e..0d28ee4 100644
--- a/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb-common.inc
@@ -2,7 +2,7 @@
 HOMEPAGE = "http://www.gnu.org/software/gdb/"
 LICENSE = "GPLv3+"
 SECTION = "devel"
-DEPENDS = "expat zlib ncurses readline ${LTTNGUST}"
+DEPENDS = "expat zlib ncurses ${LTTNGUST}"
 
 LTTNGUST = "lttng-ust"
 LTTNGUST_aarch64 = ""
@@ -22,16 +22,11 @@
 		file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
 		file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
 		file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+
 inherit autotools texinfo
 
 SRC_URI = "${GNU_MIRROR}/gdb/gdb-${PV}.tar.gz \
           "
-export CC_FOR_BUILD = "${BUILD_CC}"
-export CXX_FOR_BUILD = "${BUILD_CXX}"
-export CPP_FOR_BUILD = "${BUILD_CPP}"
-export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
-export CXXFLAGS_FOR_BUILD = "${BUILD_CXXFLAGS}"
-export CPPFLAGS_FOR_BUILD = "${BUILD_CPPFLAGS}"
 
 B = "${WORKDIR}/build-${TARGET_SYS}"
 
@@ -40,13 +35,19 @@
 EXPAT = "--with-expat --with-libexpat-prefix=${STAGING_DIR_HOST}"
 
 EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --disable-werror \
-                --with-curses --disable-multilib --with-system-readline --disable-sim \
+                --with-curses --disable-multilib --disable-sim \
                 --without-lzma --without-guile \
                 ${GDBPROPREFIX} ${EXPAT} \
                 ${@bb.utils.contains('DISTRO_FEATURES', 'multiarch', '--enable-64-bit-bfd', '', d)} \
                 --disable-rpath \
                "
 
+PACKAGECONFIG ??= "readline"
+# Use --without-system-readline to compile with readline 5.
+PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
+PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python,python python-codecs"
+PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
+
 GDBPROPREFIX = "--program-prefix=''"
 
 do_configure () {
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index 4fd60a6..6e42af1 100644
--- a/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -5,13 +5,17 @@
 PN = "gdb-cross-canadian-${TRANSLATED_TARGET_ARCH}"
 BPN = "gdb"
 
-DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-readline nativesdk-python"
-RDEPENDS_${PN} += "nativesdk-python-core nativesdk-python-lang nativesdk-python-re \
-                   nativesdk-python-codecs nativesdk-python-netclient"
+DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext \
+           virtual/${HOST_PREFIX}gcc-crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-${HOST_PREFIX}libc-for-gcc"
 
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
-EXTRA_OECONF_append = " --with-python=${WORKDIR}/python"
+# Overrides PACKAGECONFIG variables in gdb-common.inc
+PACKAGECONFIG ??= "python readline"
+PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python, \
+                         nativesdk-python-core nativesdk-python-lang nativesdk-python-re \
+                         nativesdk-python-codecs nativesdk-python-netclient"
+PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
 
 SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
 
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bb b/yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.10.1.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.9.1.bb
rename to yocto-poky/meta/recipes-devtools/gdb/gdb-cross-canadian_7.10.1.bb
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb-cross.inc b/yocto-poky/meta/recipes-devtools/gdb/gdb-cross.inc
index 6e44778..2468d23 100644
--- a/yocto-poky/meta/recipes-devtools/gdb/gdb-cross.inc
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -1,10 +1,13 @@
 require gdb-common.inc
 
-DEPENDS = "expat-native ncurses-native readline-native python-native"
+DEPENDS = "expat-native ncurses-native"
 
 inherit pythonnative
 
-EXTRA_OECONF += "--with-python=${STAGING_BINDIR_NATIVE}/python-native/python"
+# Overrides PACKAGECONFIG variables in gdb-common.inc
+PACKAGECONFIG ??= "python readline"
+PACKAGECONFIG[python] = "--with-python=${STAGING_BINDIR_NATIVE}/python-native/python,--without-python,python-native"
+PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline-native"
 
 do_compile_prepend() {
     export BUILD_SYS="${BUILD_SYS}"
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.9.1.bb b/yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.10.1.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.9.1.bb
rename to yocto-poky/meta/recipes-devtools/gdb/gdb-cross_7.10.1.bb
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb.inc b/yocto-poky/meta/recipes-devtools/gdb/gdb.inc
index 88c0213..d9c864d 100644
--- a/yocto-poky/meta/recipes-devtools/gdb/gdb.inc
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb.inc
@@ -4,7 +4,11 @@
 
 SRC_URI += "file://0002-Change-order-of-CFLAGS.patch \
             file://0003-Add-support-for-Renesas-SH-sh4-architecture.patch \
-            file://fix-detection-of-64-bit-PPC-inferior-in-gdbserver.patch \
+            file://0001-Use-exported-definitions-of-SIGRTMIN.patch \
+            file://0001-include-sys-types.h-for-mode_t.patch \
+            file://0001-use-asm-sgidefs.h.patch \
+            file://force-readline-static.patch \
+            file://0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch \
            "
 #LDFLAGS_append = " -s"
 #export CFLAGS_append=" -L${STAGING_LIBDIR}"
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch b/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch
new file mode 100644
index 0000000..5f0c096
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-Use-exported-definitions-of-SIGRTMIN.patch
@@ -0,0 +1,54 @@
+From 2f97e89e9e4e5797d0d973e1d05c1f44c46b4912 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 5 Jun 2015 20:21:38 -0700
+Subject: [PATCH] Use exorted definitions of SIGRTMIN
+
+Define W_STOPCODE if not defined already
+
+__SIGRTMIN is internal to glibc and other libcs e.g. musl
+may not provide them
+
+Fixes
+https://sourceware.org/bugzilla/show_bug.cgi?id=13012
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ gdb/linux-nat.c     | 4 ++--
+ gdb/nat/linux-nat.h | 4 ++++
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
+index 396c30c..50320ee 100644
+--- a/gdb/linux-nat.c
++++ b/gdb/linux-nat.c
+@@ -4856,10 +4856,10 @@ lin_thread_get_thread_signals (sigset_t *set)
+      fortunately they don't change!  */
+ 
+   if (restart == 0)
+-    restart = __SIGRTMIN;
++    restart = SIGRTMIN;
+ 
+   if (cancel == 0)
+-    cancel = __SIGRTMIN + 1;
++    cancel = SIGRTMIN + 1;
+ 
+   sigaddset (set, restart);
+   sigaddset (set, cancel);
+diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h
+index 83a6d91..efbe0fd 100644
+--- a/gdb/nat/linux-nat.h
++++ b/gdb/nat/linux-nat.h
+@@ -25,4 +25,8 @@
+    instead SIGTRAP with bit 7 set.  */
+ #define SYSCALL_SIGTRAP (SIGTRAP | 0x80)
+ 
++#ifndef W_STOPCODE
++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f)
++#endif
++
+ #endif /* LINUX_NAT_H */
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch b/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
new file mode 100644
index 0000000..a0292e4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-include-sys-types.h-for-mode_t.patch
@@ -0,0 +1,30 @@
+From acbee4edacb80b5eeaff2480712fe98e56443997 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 19 Jan 2016 18:18:52 -0800
+Subject: [PATCH] include sys/types.h for mode_t
+
+mode_t is used in target.h, so we need to include sys/types.h to get the
+defintion
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ gdb/gdbserver/target.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
+index 9a40867..aaecab9 100644
+--- a/gdb/gdbserver/target.h
++++ b/gdb/gdbserver/target.h
+@@ -27,6 +27,7 @@
+ #include "target/waitstatus.h"
+ #include "mem-break.h"
+ #include "btrace-common.h"
++#include <sys/types.h>
+ 
+ struct emit_ops;
+ struct buffer;
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch b/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
new file mode 100644
index 0000000..3173952
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-mips-linux-nat-Define-_ABIO32-if-not-defined.patch
@@ -0,0 +1,37 @@
+From e92f8932ef488de2a56db4299131ce6a4eb170bd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 23 Mar 2016 06:30:09 +0000
+Subject: [PATCH] mips-linux-nat: Define _ABIO32 if not defined
+
+This helps building gdb on mips64 on musl, since
+musl does not provide sgidefs.h this define is
+only defined when GCC is using o32 ABI, in that
+case gcc emits it as built-in define and hence
+it works ok for mips32
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ gdb/mips-linux-nat.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
+index fd5c705..753f29d 100644
+--- a/gdb/mips-linux-nat.c
++++ b/gdb/mips-linux-nat.c
+@@ -46,6 +46,11 @@
+ #define PTRACE_GET_THREAD_AREA 25
+ #endif
+ 
++/* musl does not define and relies on compiler built-in macros for it   */
++#ifndef _ABIO32
++#define _ABIO32 1
++#endif
++
+ /* Assume that we have PTRACE_GETREGS et al. support.  If we do not,
+    we'll clear this and use PTRACE_PEEKUSER instead.  */
+ static int have_ptrace_regsets = 1;
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch b/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch
new file mode 100644
index 0000000..eaec390
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb/0001-use-asm-sgidefs.h.patch
@@ -0,0 +1,35 @@
+From 677b5b56135141c0d259e370aacd0e11c810aa15 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Fri, 5 Feb 2016 14:00:00 -0800
+Subject: [PATCH] use <asm/sgidefs.h>
+
+Build fix for MIPS with musl libc
+
+The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
+but not by musl. Regardless of the libc, the kernel headers provide
+<asm/sgidefs.h> which provides the same definitions, so use that
+instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ gdb/mips-linux-nat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
+index a36bb63..fd5c705 100644
+--- a/gdb/mips-linux-nat.c
++++ b/gdb/mips-linux-nat.c
+@@ -31,7 +31,7 @@
+ #include "gdb_proc_service.h"
+ #include "gregset.h"
+ 
+-#include <sgidefs.h>
++#include <asm/sgidefs.h>
+ #include <sys/ptrace.h>
+ #include <asm/ptrace.h>
+ 
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb/fix-detection-of-64-bit-PPC-inferior-in-gdbserver.patch b/yocto-poky/meta/recipes-devtools/gdb/gdb/fix-detection-of-64-bit-PPC-inferior-in-gdbserver.patch
deleted file mode 100644
index 2854352..0000000
--- a/yocto-poky/meta/recipes-devtools/gdb/gdb/fix-detection-of-64-bit-PPC-inferior-in-gdbserver.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 4fe67dbafa1bee679daecc12ed30621d5c2605de Mon Sep 17 00:00:00 2001
-From: Yao Qi <yao@codesourcery.com>
-Date: Mon, 11 May 2015 10:57:33 +0800
-Subject: [PATCH] Fix detection of 64-bit PPC inferior in gdbserver
-
-Issue #16775
-
-* gdbserver/linux-ppc-low.c (ppc_arch_setup): Change variable msr to type
-'unsigned long'.  Check bit 63 or bit 31 is one.
-
-https://sourceware.org/ml/gdb-patches/2014-12/msg00239.html
-Written by: Yao Qi <yao@codesourcery.com>
-
-Upstream-Status: Pending
-
-Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com>
----
- gdb/gdbserver/linux-ppc-low.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
-index 63d4218..a62cf22 100644
---- a/gdb/gdbserver/linux-ppc-low.c
-+++ b/gdb/gdbserver/linux-ppc-low.c
-@@ -374,7 +374,7 @@ ppc_arch_setup (void)
- {
-   const struct target_desc *tdesc;
- #ifdef __powerpc64__
--  long msr;
-+  unsigned long msr;
-   struct regcache *regcache;
- 
-   /* On a 64-bit host, assume 64-bit inferior process with no
-@@ -384,13 +384,16 @@ ppc_arch_setup (void)
-   current_process ()->tdesc = tdesc;
-   ppc_hwcap = 0;
- 
--  /* Only if the high bit of the MSR is set, we actually have
--     a 64-bit inferior.  */
-+  /* We actually have a 64-bit inferior only if the certain bit of the
-+     MSR is set.  The PowerISA Book III-S MSR is different from the
-+     PowerISA Book III-E MSR.  The Book III-S MSR is 64 bits wide, and
-+     its MSR[SF] is the bit 0 of a 64-bit value.  Book III-E MSR is 32
-+     bits wide, and its MSR[CM] is the bit 0 of a 32-bit value.  */
-   regcache = new_register_cache (tdesc);
-   fetch_inferior_registers (regcache, find_regno (tdesc, "msr"));
-   collect_register_by_name (regcache, "msr", &msr);
-   free_register_cache (regcache);
--  if (msr < 0)
-+  if (msr & 0x8000000080000000)
-     {
-       ppc_get_hwcap (&ppc_hwcap);
-       if (ppc_hwcap & PPC_FEATURE_CELL)
--- 
-1.8.5.2.233.g932f7e4
-
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb/force-readline-static.patch b/yocto-poky/meta/recipes-devtools/gdb/gdb/force-readline-static.patch
new file mode 100644
index 0000000..d34ee8c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb/force-readline-static.patch
@@ -0,0 +1,37 @@
+If gdb is configured with --disable-static then this is dutifully passed to
+readline which then disables libreadline.a, which causes a problem when gdb
+tries to link against that.
+
+To ensure that readline always builds static libraries, pass --enable-static to
+the sub-configure.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.def b/Makefile.def
+index 4394188..05c661a 100644
+--- a/Makefile.def
++++ b/Makefile.def
+@@ -100,7 +100,8 @@ host_modules= { module= libiconv;
+ 		missing= install-html;
+ 		missing= install-info; };
+ host_modules= { module= m4; };
+-host_modules= { module= readline; };
++host_modules= { module= readline;
++                extra_configure_flags='--enable-static';};
+ host_modules= { module= sid; };
+ host_modules= { module= sim; };
+ host_modules= { module= texinfo; no_install= true; };
+diff --git a/Makefile.in b/Makefile.in
+index 61e0ab6..837f36e 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -24971,7 +24971,7 @@ configure-readline:
+ 	  $$s/$$module_srcdir/configure \
+ 	  --srcdir=$${topdir}/$$module_srcdir \
+ 	  $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+-	  --target=${target_alias}  \
++	  --target=${target_alias} --enable-static \
+ 	  || exit 1
+ @endif readline
+ 
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb_7.10.1.bb b/yocto-poky/meta/recipes-devtools/gdb/gdb_7.10.1.bb
new file mode 100644
index 0000000..f897e12
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/gdb/gdb_7.10.1.bb
@@ -0,0 +1,20 @@
+require gdb.inc
+require gdb-${PV}.inc
+
+inherit python-dir
+
+do_configure_prepend() {
+	if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
+		cat > ${WORKDIR}/python << EOF
+#!/bin/sh
+case "\$2" in
+	--includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;;
+	--ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
+	--exec-prefix) echo "${exec_prefix}" ;;
+	*) exit 1 ;;
+esac
+exit 0
+EOF
+		chmod +x ${WORKDIR}/python
+	fi
+}
diff --git a/yocto-poky/meta/recipes-devtools/gdb/gdb_7.9.1.bb b/yocto-poky/meta/recipes-devtools/gdb/gdb_7.9.1.bb
deleted file mode 100644
index cd52e27..0000000
--- a/yocto-poky/meta/recipes-devtools/gdb/gdb_7.9.1.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-require gdb.inc
-require gdb-${PV}.inc
-
-inherit python-dir
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python,python python-codecs"
-PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
-
-do_configure_prepend() {
-	if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
-		cat > ${WORKDIR}/python << EOF
-#!/bin/sh
-case "\$2" in
-	--includes) echo "-I${STAGING_INCDIR}/${PYTHON_DIR}/" ;;
-	--ldflags) echo "-Wl,-rpath-link,${STAGING_LIBDIR}/.. -Wl,-rpath,${libdir}/.. -lpthread -ldl -lutil -lm -lpython${PYTHON_BASEVERSION}" ;;
-	--exec-prefix) echo "${exec_prefix}" ;;
-	*) exit 1 ;;
-esac
-exit 0
-EOF
-		chmod +x ${WORKDIR}/python
-	fi
-}
diff --git a/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0008-CVE-2015-7545-1.patch b/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0008-CVE-2015-7545-1.patch
deleted file mode 100644
index b552c09..0000000
--- a/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0008-CVE-2015-7545-1.patch
+++ /dev/null
@@ -1,446 +0,0 @@
-From a5adaced2e13c135d5d9cc65be9eb95aa3bacedf Mon Sep 17 00:00:00 2001
-From: Jeff King <peff@peff.net>
-Date: Wed, 16 Sep 2015 13:12:52 -0400
-Subject: [PATCH] transport: add a protocol-whitelist environment variable
-
-If we are cloning an untrusted remote repository into a
-sandbox, we may also want to fetch remote submodules in
-order to get the complete view as intended by the other
-side. However, that opens us up to attacks where a malicious
-user gets us to clone something they would not otherwise
-have access to (this is not necessarily a problem by itself,
-but we may then act on the cloned contents in a way that
-exposes them to the attacker).
-
-Ideally such a setup would sandbox git entirely away from
-high-value items, but this is not always practical or easy
-to set up (e.g., OS network controls may block multiple
-protocols, and we would want to enable some but not others).
-
-We can help this case by providing a way to restrict
-particular protocols. We use a whitelist in the environment.
-This is more annoying to set up than a blacklist, but
-defaults to safety if the set of protocols git supports
-grows). If no whitelist is specified, we continue to default
-to allowing all protocols (this is an "unsafe" default, but
-since the minority of users will want this sandboxing
-effect, it is the only sensible one).
-
-A note on the tests: ideally these would all be in a single
-test file, but the git-daemon and httpd test infrastructure
-is an all-or-nothing proposition rather than a test-by-test
-prerequisite. By putting them all together, we would be
-unable to test the file-local code on machines without
-apache.
-
-Signed-off-by: Jeff King <peff@peff.net>
-Signed-off-by: Junio C Hamano <gitster@pobox.com>
-
-Upstream-Status: Backport
-
-http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_2.5.0-1ubuntu0.1.debian.tar.xz
-
-CVE: CVE-2015-7545 #1
-Singed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- Documentation/git.txt          | 32 ++++++++++++++
- connect.c                      |  5 +++
- t/lib-proto-disable.sh         | 96 ++++++++++++++++++++++++++++++++++++++++++
- t/t5810-proto-disable-local.sh | 14 ++++++
- t/t5811-proto-disable-git.sh   | 20 +++++++++
- t/t5812-proto-disable-http.sh  | 20 +++++++++
- t/t5813-proto-disable-ssh.sh   | 20 +++++++++
- t/t5814-proto-disable-ext.sh   | 18 ++++++++
- transport-helper.c             |  2 +
- transport.c                    | 21 ++++++++-
- transport.h                    |  7 +++
- 11 files changed, 254 insertions(+), 1 deletion(-)
- create mode 100644 t/lib-proto-disable.sh
- create mode 100755 t/t5810-proto-disable-local.sh
- create mode 100755 t/t5811-proto-disable-git.sh
- create mode 100755 t/t5812-proto-disable-http.sh
- create mode 100755 t/t5813-proto-disable-ssh.sh
- create mode 100755 t/t5814-proto-disable-ext.sh
-
-Index: git-2.5.0/Documentation/git.txt
-===================================================================
---- git-2.5.0.orig/Documentation/git.txt	2015-12-11 12:46:48.975637719 -0500
-+++ git-2.5.0/Documentation/git.txt	2015-12-11 12:46:48.967637661 -0500
-@@ -1069,6 +1069,38 @@
- 	an operation has touched every ref (e.g., because you are
- 	cloning a repository to make a backup).
- 
-+`GIT_ALLOW_PROTOCOL`::
-+	If set, provide a colon-separated list of protocols which are
-+	allowed to be used with fetch/push/clone. This is useful to
-+	restrict recursive submodule initialization from an untrusted
-+	repository. Any protocol not mentioned will be disallowed (i.e.,
-+	this is a whitelist, not a blacklist). If the variable is not
-+	set at all, all protocols are enabled.  The protocol names
-+	currently used by git are:
-+
-+	  - `file`: any local file-based path (including `file://` URLs,
-+	    or local paths)
-+
-+	  - `git`: the anonymous git protocol over a direct TCP
-+	    connection (or proxy, if configured)
-+
-+	  - `ssh`: git over ssh (including `host:path` syntax,
-+	    `git+ssh://`, etc).
-+
-+	  - `rsync`: git over rsync
-+
-+	  - `http`: git over http, both "smart http" and "dumb http".
-+	    Note that this does _not_ include `https`; if you want both,
-+	    you should specify both as `http:https`.
-+
-+	  - any external helpers are named by their protocol (e.g., use
-+	    `hg` to allow the `git-remote-hg` helper)
-++
-+Note that this controls only git's internal protocol selection.
-+If libcurl is used (e.g., by the `http` transport), it may
-+redirect to other protocols. There is not currently any way to
-+restrict this.
-+
- 
- Discussion[[Discussion]]
- ------------------------
-Index: git-2.5.0/connect.c
-===================================================================
---- git-2.5.0.orig/connect.c	2015-12-11 12:46:48.975637719 -0500
-+++ git-2.5.0/connect.c	2015-12-11 12:46:48.967637661 -0500
-@@ -9,6 +9,7 @@
- #include "url.h"
- #include "string-list.h"
- #include "sha1-array.h"
-+#include "transport.h"
- 
- static char *server_capabilities;
- static const char *parse_feature_value(const char *, const char *, int *);
-@@ -694,6 +695,8 @@
- 		else
- 			target_host = xstrdup(hostandport);
- 
-+		transport_check_allowed("git");
-+
- 		/* These underlying connection commands die() if they
- 		 * cannot connect.
- 		 */
-@@ -727,6 +730,7 @@
- 			int putty, tortoiseplink = 0;
- 			char *ssh_host = hostandport;
- 			const char *port = NULL;
-+			transport_check_allowed("ssh");
- 			get_host_and_port(&ssh_host, &port);
- 
- 			if (!port)
-@@ -781,6 +785,7 @@
- 			/* remove repo-local variables from the environment */
- 			conn->env = local_repo_env;
- 			conn->use_shell = 1;
-+			transport_check_allowed("file");
- 		}
- 		argv_array_push(&conn->args, cmd.buf);
- 
-Index: git-2.5.0/t/lib-proto-disable.sh
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ git-2.5.0/t/lib-proto-disable.sh	2015-12-11 12:46:48.967637661 -0500
-@@ -0,0 +1,96 @@
-+# Test routines for checking protocol disabling.
-+
-+# test cloning a particular protocol
-+#   $1 - description of the protocol
-+#   $2 - machine-readable name of the protocol
-+#   $3 - the URL to try cloning
-+test_proto () {
-+	desc=$1
-+	proto=$2
-+	url=$3
-+
-+	test_expect_success "clone $1 (enabled)" '
-+		rm -rf tmp.git &&
-+		(
-+			GIT_ALLOW_PROTOCOL=$proto &&
-+			export GIT_ALLOW_PROTOCOL &&
-+			git clone --bare "$url" tmp.git
-+		)
-+	'
-+
-+	test_expect_success "fetch $1 (enabled)" '
-+		(
-+			cd tmp.git &&
-+			GIT_ALLOW_PROTOCOL=$proto &&
-+			export GIT_ALLOW_PROTOCOL &&
-+			git fetch
-+		)
-+	'
-+
-+	test_expect_success "push $1 (enabled)" '
-+		(
-+			cd tmp.git &&
-+			GIT_ALLOW_PROTOCOL=$proto &&
-+			export GIT_ALLOW_PROTOCOL &&
-+			git push origin HEAD:pushed
-+		)
-+	'
-+
-+	test_expect_success "push $1 (disabled)" '
-+		(
-+			cd tmp.git &&
-+			GIT_ALLOW_PROTOCOL=none &&
-+			export GIT_ALLOW_PROTOCOL &&
-+			test_must_fail git push origin HEAD:pushed
-+		)
-+	'
-+
-+	test_expect_success "fetch $1 (disabled)" '
-+		(
-+			cd tmp.git &&
-+			GIT_ALLOW_PROTOCOL=none &&
-+			export GIT_ALLOW_PROTOCOL &&
-+			test_must_fail git fetch
-+		)
-+	'
-+
-+	test_expect_success "clone $1 (disabled)" '
-+		rm -rf tmp.git &&
-+		(
-+			GIT_ALLOW_PROTOCOL=none &&
-+			export GIT_ALLOW_PROTOCOL &&
-+			test_must_fail git clone --bare "$url" tmp.git
-+		)
-+	'
-+}
-+
-+# set up an ssh wrapper that will access $host/$repo in the
-+# trash directory, and enable it for subsequent tests.
-+setup_ssh_wrapper () {
-+	test_expect_success 'setup ssh wrapper' '
-+		write_script ssh-wrapper <<-\EOF &&
-+		echo >&2 "ssh: $*"
-+		host=$1; shift
-+		cd "$TRASH_DIRECTORY/$host" &&
-+		eval "$*"
-+		EOF
-+		GIT_SSH="$PWD/ssh-wrapper" &&
-+		export GIT_SSH &&
-+		export TRASH_DIRECTORY
-+	'
-+}
-+
-+# set up a wrapper that can be used with remote-ext to
-+# access repositories in the "remote" directory of trash-dir,
-+# like "ext::fake-remote %S repo.git"
-+setup_ext_wrapper () {
-+	test_expect_success 'setup ext wrapper' '
-+		write_script fake-remote <<-\EOF &&
-+		echo >&2 "fake-remote: $*"
-+		cd "$TRASH_DIRECTORY/remote" &&
-+		eval "$*"
-+		EOF
-+		PATH=$TRASH_DIRECTORY:$PATH &&
-+		export TRASH_DIRECTORY
-+	'
-+}
-Index: git-2.5.0/t/t5810-proto-disable-local.sh
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ git-2.5.0/t/t5810-proto-disable-local.sh	2015-12-11 12:46:48.967637661 -0500
-@@ -0,0 +1,14 @@
-+#!/bin/sh
-+
-+test_description='test disabling of local paths in clone/fetch'
-+. ./test-lib.sh
-+. "$TEST_DIRECTORY/lib-proto-disable.sh"
-+
-+test_expect_success 'setup repository to clone' '
-+	test_commit one
-+'
-+
-+test_proto "file://" file "file://$PWD"
-+test_proto "path" file .
-+
-+test_done
-Index: git-2.5.0/t/t5811-proto-disable-git.sh
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ git-2.5.0/t/t5811-proto-disable-git.sh	2015-12-11 12:46:48.967637661 -0500
-@@ -0,0 +1,20 @@
-+#!/bin/sh
-+
-+test_description='test disabling of git-over-tcp in clone/fetch'
-+. ./test-lib.sh
-+. "$TEST_DIRECTORY/lib-proto-disable.sh"
-+. "$TEST_DIRECTORY/lib-git-daemon.sh"
-+start_git_daemon
-+
-+test_expect_success 'create git-accessible repo' '
-+	bare="$GIT_DAEMON_DOCUMENT_ROOT_PATH/repo.git" &&
-+	test_commit one &&
-+	git --bare init "$bare" &&
-+	git push "$bare" HEAD &&
-+	>"$bare/git-daemon-export-ok" &&
-+	git -C "$bare" config daemon.receivepack true
-+'
-+
-+test_proto "git://" git "$GIT_DAEMON_URL/repo.git"
-+
-+test_done
-Index: git-2.5.0/t/t5812-proto-disable-http.sh
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ git-2.5.0/t/t5812-proto-disable-http.sh	2015-12-11 12:46:48.967637661 -0500
-@@ -0,0 +1,20 @@
-+#!/bin/sh
-+
-+test_description='test disabling of git-over-http in clone/fetch'
-+. ./test-lib.sh
-+. "$TEST_DIRECTORY/lib-proto-disable.sh"
-+. "$TEST_DIRECTORY/lib-httpd.sh"
-+start_httpd
-+
-+test_expect_success 'create git-accessible repo' '
-+	bare="$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&
-+	test_commit one &&
-+	git --bare init "$bare" &&
-+	git push "$bare" HEAD &&
-+	git -C "$bare" config http.receivepack true
-+'
-+
-+test_proto "smart http" http "$HTTPD_URL/smart/repo.git"
-+
-+stop_httpd
-+test_done
-Index: git-2.5.0/t/t5813-proto-disable-ssh.sh
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ git-2.5.0/t/t5813-proto-disable-ssh.sh	2015-12-11 12:46:48.967637661 -0500
-@@ -0,0 +1,20 @@
-+#!/bin/sh
-+
-+test_description='test disabling of git-over-ssh in clone/fetch'
-+. ./test-lib.sh
-+. "$TEST_DIRECTORY/lib-proto-disable.sh"
-+
-+setup_ssh_wrapper
-+
-+test_expect_success 'setup repository to clone' '
-+	test_commit one &&
-+	mkdir remote &&
-+	git init --bare remote/repo.git &&
-+	git push remote/repo.git HEAD
-+'
-+
-+test_proto "host:path" ssh "remote:repo.git"
-+test_proto "ssh://" ssh "ssh://remote/$PWD/remote/repo.git"
-+test_proto "git+ssh://" ssh "git+ssh://remote/$PWD/remote/repo.git"
-+
-+test_done
-Index: git-2.5.0/t/t5814-proto-disable-ext.sh
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ git-2.5.0/t/t5814-proto-disable-ext.sh	2015-12-11 12:46:48.967637661 -0500
-@@ -0,0 +1,18 @@
-+#!/bin/sh
-+
-+test_description='test disabling of remote-helper paths in clone/fetch'
-+. ./test-lib.sh
-+. "$TEST_DIRECTORY/lib-proto-disable.sh"
-+
-+setup_ext_wrapper
-+
-+test_expect_success 'setup repository to clone' '
-+	test_commit one &&
-+	mkdir remote &&
-+	git init --bare remote/repo.git &&
-+	git push remote/repo.git HEAD
-+'
-+
-+test_proto "remote-helper" ext "ext::fake-remote %S repo.git"
-+
-+test_done
-Index: git-2.5.0/transport-helper.c
-===================================================================
---- git-2.5.0.orig/transport-helper.c	2015-12-11 12:46:48.975637719 -0500
-+++ git-2.5.0/transport-helper.c	2015-12-11 12:46:48.967637661 -0500
-@@ -1039,6 +1039,8 @@
- 	struct helper_data *data = xcalloc(1, sizeof(*data));
- 	data->name = name;
- 
-+	transport_check_allowed(name);
-+
- 	if (getenv("GIT_TRANSPORT_HELPER_DEBUG"))
- 		debug = 1;
- 
-Index: git-2.5.0/transport.c
-===================================================================
---- git-2.5.0.orig/transport.c	2015-12-11 12:46:48.975637719 -0500
-+++ git-2.5.0/transport.c	2015-12-11 12:46:48.967637661 -0500
-@@ -912,6 +912,20 @@
- 	return strchr(url, ':') - url;
- }
- 
-+void transport_check_allowed(const char *type)
-+{
-+	struct string_list allowed = STRING_LIST_INIT_DUP;
-+	const char *v = getenv("GIT_ALLOW_PROTOCOL");
-+
-+	if (!v)
-+		return;
-+
-+	string_list_split(&allowed, v, ':', -1);
-+	if (!unsorted_string_list_has_string(&allowed, type))
-+		die("transport '%s' not allowed", type);
-+	string_list_clear(&allowed, 0);
-+}
-+
- struct transport *transport_get(struct remote *remote, const char *url)
- {
- 	const char *helper;
-@@ -943,12 +957,14 @@
- 	if (helper) {
- 		transport_helper_init(ret, helper);
- 	} else if (starts_with(url, "rsync:")) {
-+		transport_check_allowed("rsync");
- 		ret->get_refs_list = get_refs_via_rsync;
- 		ret->fetch = fetch_objs_via_rsync;
- 		ret->push = rsync_transport_push;
- 		ret->smart_options = NULL;
- 	} else if (url_is_local_not_ssh(url) && is_file(url) && is_bundle(url, 1)) {
- 		struct bundle_transport_data *data = xcalloc(1, sizeof(*data));
-+		transport_check_allowed("file");
- 		ret->data = data;
- 		ret->get_refs_list = get_refs_from_bundle;
- 		ret->fetch = fetch_refs_from_bundle;
-@@ -960,7 +976,10 @@
- 		|| starts_with(url, "ssh://")
- 		|| starts_with(url, "git+ssh://")
- 		|| starts_with(url, "ssh+git://")) {
--		/* These are builtin smart transports. */
-+		/*
-+		 * These are builtin smart transports; "allowed" transports
-+		 * will be checked individually in git_connect.
-+		 */
- 		struct git_transport_data *data = xcalloc(1, sizeof(*data));
- 		ret->data = data;
- 		ret->set_option = NULL;
-Index: git-2.5.0/transport.h
-===================================================================
---- git-2.5.0.orig/transport.h	2015-12-11 12:46:48.975637719 -0500
-+++ git-2.5.0/transport.h	2015-12-11 12:46:48.971637690 -0500
-@@ -133,6 +133,13 @@
- /* Returns a transport suitable for the url */
- struct transport *transport_get(struct remote *, const char *);
- 
-+/*
-+ * Check whether a transport is allowed by the environment,
-+ * and die otherwise. type should generally be the URL scheme,
-+ * as described in Documentation/git.txt
-+ */
-+void transport_check_allowed(const char *type);
-+
- /* Transport options which apply to git:// and scp-style URLs */
- 
- /* The program to use on the remote side to send a pack */
diff --git a/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0009-CVE-2015-7545-2.patch b/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0009-CVE-2015-7545-2.patch
deleted file mode 100644
index 8000e26..0000000
--- a/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0009-CVE-2015-7545-2.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 33cfccbbf35a56e190b79bdec5c85457c952a021 Mon Sep 17 00:00:00 2001
-From: Jeff King <peff@peff.net>
-Date: Wed, 16 Sep 2015 13:13:12 -0400
-Subject: [PATCH] submodule: allow only certain protocols for submodule fetches
-
-Some protocols (like git-remote-ext) can execute arbitrary
-code found in the URL. The URLs that submodules use may come
-from arbitrary sources (e.g., .gitmodules files in a remote
-repository). Let's restrict submodules to fetching from a
-known-good subset of protocols.
-
-Note that we apply this restriction to all submodule
-commands, whether the URL comes from .gitmodules or not.
-This is more restrictive than we need to be; for example, in
-the tests we run:
-
-  git submodule add ext::...
-
-which should be trusted, as the URL comes directly from the
-command line provided by the user. But doing it this way is
-simpler, and makes it much less likely that we would miss a
-case. And since such protocols should be an exception
-(especially because nobody who clones from them will be able
-to update the submodules!), it's not likely to inconvenience
-anyone in practice.
-
-Reported-by: Blake Burkhart <bburky@bburky.com>
-Signed-off-by: Jeff King <peff@peff.net>
-Signed-off-by: Junio C Hamano <gitster@pobox.com>
-
-Upstream-Status: Backport
-
-http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_2.5.0-1ubuntu0.1.debian.tar.xz
-
-CVE: CVE-2015-7545 #2
-Singed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- git-submodule.sh            |  9 +++++++++
- t/t5815-submodule-protos.sh | 43 +++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 52 insertions(+)
- create mode 100755 t/t5815-submodule-protos.sh
-
-diff --git a/git-submodule.sh b/git-submodule.sh
-index 36797c3..78c2740 100755
---- a/git-submodule.sh
-+++ b/git-submodule.sh
-@@ -22,6 +22,15 @@ require_work_tree
- wt_prefix=$(git rev-parse --show-prefix)
- cd_to_toplevel
- 
-+# Restrict ourselves to a vanilla subset of protocols; the URLs
-+# we get are under control of a remote repository, and we do not
-+# want them kicking off arbitrary git-remote-* programs.
-+#
-+# If the user has already specified a set of allowed protocols,
-+# we assume they know what they're doing and use that instead.
-+: ${GIT_ALLOW_PROTOCOL=file:git:http:https:ssh}
-+export GIT_ALLOW_PROTOCOL
-+
- command=
- branch=
- force=
-diff --git a/t/t5815-submodule-protos.sh b/t/t5815-submodule-protos.sh
-new file mode 100755
-index 0000000..06f55a1
---- /dev/null
-+++ b/t/t5815-submodule-protos.sh
-@@ -0,0 +1,43 @@
-+#!/bin/sh
-+
-+test_description='test protocol whitelisting with submodules'
-+. ./test-lib.sh
-+. "$TEST_DIRECTORY"/lib-proto-disable.sh
-+
-+setup_ext_wrapper
-+setup_ssh_wrapper
-+
-+test_expect_success 'setup repository with submodules' '
-+	mkdir remote &&
-+	git init remote/repo.git &&
-+	(cd remote/repo.git && test_commit one) &&
-+	# submodule-add should probably trust what we feed it on the cmdline,
-+	# but its implementation is overly conservative.
-+	GIT_ALLOW_PROTOCOL=ssh git submodule add remote:repo.git ssh-module &&
-+	GIT_ALLOW_PROTOCOL=ext git submodule add "ext::fake-remote %S repo.git" ext-module &&
-+	git commit -m "add submodules"
-+'
-+
-+test_expect_success 'clone with recurse-submodules fails' '
-+	test_must_fail git clone --recurse-submodules . dst
-+'
-+
-+test_expect_success 'setup individual updates' '
-+	rm -rf dst &&
-+	git clone . dst &&
-+	git -C dst submodule init
-+'
-+
-+test_expect_success 'update of ssh allowed' '
-+	git -C dst submodule update ssh-module
-+'
-+
-+test_expect_success 'update of ext not allowed' '
-+	test_must_fail git -C dst submodule update ext-module
-+'
-+
-+test_expect_success 'user can override whitelist' '
-+	GIT_ALLOW_PROTOCOL=ext git -C dst submodule update ext-module
-+'
-+
-+test_done
diff --git a/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0010-CVE-2015-7545-3.patch b/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0010-CVE-2015-7545-3.patch
deleted file mode 100644
index b6edc9d..0000000
--- a/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0010-CVE-2015-7545-3.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 5088d3b38775f8ac12d7f77636775b16059b67ef Mon Sep 17 00:00:00 2001
-From: Jeff King <peff@peff.net>
-Date: Tue, 22 Sep 2015 18:03:49 -0400
-Subject: [PATCH] transport: refactor protocol whitelist code
-
-The current callers only want to die when their transport is
-prohibited. But future callers want to query the mechanism
-without dying.
-
-Let's break out a few query functions, and also save the
-results in a static list so we don't have to re-parse for
-each query.
-
-Based-on-a-patch-by: Blake Burkhart <bburky@bburky.com>
-Signed-off-by: Jeff King <peff@peff.net>
-Signed-off-by: Junio C Hamano <gitster@pobox.com>
-
-Upstream-Status: Backport
-
-http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_2.5.0-1ubuntu0.1.debian.tar.xz
-
-CVE: CVE-2015-7545 #3
-Singed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- transport.c | 38 ++++++++++++++++++++++++++++++--------
- transport.h | 15 +++++++++++++--
- 2 files changed, 43 insertions(+), 10 deletions(-)
-
-Index: git-2.5.0/transport.c
-===================================================================
---- git-2.5.0.orig/transport.c	2015-12-11 12:47:09.547784038 -0500
-+++ git-2.5.0/transport.c	2015-12-11 12:47:09.543784009 -0500
-@@ -912,18 +912,40 @@
- 	return strchr(url, ':') - url;
- }
- 
--void transport_check_allowed(const char *type)
-+static const struct string_list *protocol_whitelist(void)
- {
--	struct string_list allowed = STRING_LIST_INIT_DUP;
--	const char *v = getenv("GIT_ALLOW_PROTOCOL");
-+	static int enabled = -1;
-+	static struct string_list allowed = STRING_LIST_INIT_DUP;
-+
-+	if (enabled < 0) {
-+		const char *v = getenv("GIT_ALLOW_PROTOCOL");
-+		if (v) {
-+			string_list_split(&allowed, v, ':', -1);
-+			string_list_sort(&allowed);
-+			enabled = 1;
-+		} else {
-+			enabled = 0;
-+		}
-+	}
-+
-+	return enabled ? &allowed : NULL;
-+}
- 
--	if (!v)
--		return;
-+int is_transport_allowed(const char *type)
-+{
-+	const struct string_list *allowed = protocol_whitelist();
-+	return !allowed || string_list_has_string(allowed, type);
-+}
- 
--	string_list_split(&allowed, v, ':', -1);
--	if (!unsorted_string_list_has_string(&allowed, type))
-+void transport_check_allowed(const char *type)
-+{
-+	if (!is_transport_allowed(type))
- 		die("transport '%s' not allowed", type);
--	string_list_clear(&allowed, 0);
-+}
-+
-+int transport_restrict_protocols(void)
-+{
-+	return !!protocol_whitelist();
- }
- 
- struct transport *transport_get(struct remote *remote, const char *url)
-Index: git-2.5.0/transport.h
-===================================================================
---- git-2.5.0.orig/transport.h	2015-12-11 12:47:09.547784038 -0500
-+++ git-2.5.0/transport.h	2015-12-11 12:47:09.543784009 -0500
-@@ -134,12 +134,23 @@
- struct transport *transport_get(struct remote *, const char *);
- 
- /*
-+ * Check whether a transport is allowed by the environment. Type should
-+ * generally be the URL scheme, as described in Documentation/git.txt
-+ */
-+int is_transport_allowed(const char *type);
-+
-+/*
-  * Check whether a transport is allowed by the environment,
-- * and die otherwise. type should generally be the URL scheme,
-- * as described in Documentation/git.txt
-+ * and die otherwise.
-  */
- void transport_check_allowed(const char *type);
- 
-+/*
-+ * Returns true if the user has attempted to turn on protocol
-+ * restrictions at all.
-+ */
-+int transport_restrict_protocols(void);
-+
- /* Transport options which apply to git:// and scp-style URLs */
- 
- /* The program to use on the remote side to send a pack */
diff --git a/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0011-CVE-2015-7545-4.patch b/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0011-CVE-2015-7545-4.patch
deleted file mode 100644
index 44dcd1e..0000000
--- a/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0011-CVE-2015-7545-4.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-Backport of:
-
-From f4113cac0c88b4f36ee6f3abf3218034440a68e3 Mon Sep 17 00:00:00 2001
-From: Blake Burkhart <bburky@bburky.com>
-Date: Tue, 22 Sep 2015 18:06:04 -0400
-Subject: [PATCH] http: limit redirection to protocol-whitelist
-
-Previously, libcurl would follow redirection to any protocol
-it was compiled for support with. This is desirable to allow
-redirection from HTTP to HTTPS. However, it would even
-successfully allow redirection from HTTP to SFTP, a protocol
-that git does not otherwise support at all. Furthermore
-git's new protocol-whitelisting could be bypassed by
-following a redirect within the remote helper, as it was
-only enforced at transport selection time.
-
-This patch limits redirects within libcurl to HTTP, HTTPS,
-FTP and FTPS. If there is a protocol-whitelist present, this
-list is limited to those also allowed by the whitelist. As
-redirection happens from within libcurl, it is impossible
-for an HTTP redirect to a protocol implemented within
-another remote helper.
-
-When the curl version git was compiled with is too old to
-support restrictions on protocol redirection, we warn the
-user if GIT_ALLOW_PROTOCOL restrictions were requested. This
-is a little inaccurate, as even without that variable in the
-environment, we would still restrict SFTP, etc, and we do
-not warn in that case. But anything else means we would
-literally warn every time git accesses an http remote.
-
-This commit includes a test, but it is not as robust as we
-would hope. It redirects an http request to ftp, and checks
-that curl complained about the protocol, which means that we
-are relying on curl's specific error message to know what
-happened. Ideally we would redirect to a working ftp server
-and confirm that we can clone without protocol restrictions,
-and not with them. But we do not have a portable way of
-providing an ftp server, nor any other protocol that curl
-supports (https is the closest, but we would have to deal
-with certificates).
-
-[jk: added test and version warning]
-
-Signed-off-by: Jeff King <peff@peff.net>
-Signed-off-by: Junio C Hamano <gitster@pobox.com>
-
-Upstream-Status: Backport
-
-http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_2.5.0-1ubuntu0.1.debian.tar.xz
-
-CVE: CVE-2015-7545 #4
-Singed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- Documentation/git.txt         |  5 -----
- http.c                        | 17 +++++++++++++++++
- t/lib-httpd/apache.conf       |  1 +
- t/t5812-proto-disable-http.sh |  9 +++++++++
- 4 files changed, 27 insertions(+), 5 deletions(-)
-
-Index: git-2.5.0/Documentation/git.txt
-===================================================================
---- git-2.5.0.orig/Documentation/git.txt	2015-12-11 12:47:18.707849212 -0500
-+++ git-2.5.0/Documentation/git.txt	2015-12-11 12:47:18.703849183 -0500
-@@ -1095,11 +1095,6 @@
- 
- 	  - any external helpers are named by their protocol (e.g., use
- 	    `hg` to allow the `git-remote-hg` helper)
--+
--Note that this controls only git's internal protocol selection.
--If libcurl is used (e.g., by the `http` transport), it may
--redirect to other protocols. There is not currently any way to
--restrict this.
- 
- 
- Discussion[[Discussion]]
-Index: git-2.5.0/http.c
-===================================================================
---- git-2.5.0.orig/http.c	2015-12-11 12:47:18.707849212 -0500
-+++ git-2.5.0/http.c	2015-12-11 12:47:34.171959268 -0500
-@@ -8,6 +8,7 @@
- #include "credential.h"
- #include "version.h"
- #include "pkt-line.h"
-+#include "transport.h"
- #include "gettext.h"
- 
- int active_requests;
-@@ -340,6 +341,7 @@
- static CURL *get_curl_handle(void)
- {
- 	CURL *result = curl_easy_init();
-+	long allowed_protocols = 0;
- 
- 	if (!result)
- 		die("curl_easy_init failed");
-@@ -399,6 +401,21 @@
- #elif LIBCURL_VERSION_NUM >= 0x071101
- 	curl_easy_setopt(result, CURLOPT_POST301, 1);
- #endif
-+#if LIBCURL_VERSION_NUM >= 0x071304
-+	if (is_transport_allowed("http"))
-+		allowed_protocols |= CURLPROTO_HTTP;
-+	if (is_transport_allowed("https"))
-+		allowed_protocols |= CURLPROTO_HTTPS;
-+	if (is_transport_allowed("ftp"))
-+		allowed_protocols |= CURLPROTO_FTP;
-+	if (is_transport_allowed("ftps"))
-+		allowed_protocols |= CURLPROTO_FTPS;
-+	curl_easy_setopt(result, CURLOPT_REDIR_PROTOCOLS, allowed_protocols);
-+#else
-+	if (transport_restrict_protocols())
-+		warning("protocol restrictions not applied to curl redirects because\n"
-+			"your curl version is too old (>= 7.19.4)");
-+#endif
- 
- 	if (getenv("GIT_CURL_VERBOSE"))
- 		curl_easy_setopt(result, CURLOPT_VERBOSE, 1);
-Index: git-2.5.0/t/lib-httpd/apache.conf
-===================================================================
---- git-2.5.0.orig/t/lib-httpd/apache.conf	2015-12-11 12:47:18.707849212 -0500
-+++ git-2.5.0/t/lib-httpd/apache.conf	2015-12-11 12:47:18.703849183 -0500
-@@ -119,6 +119,7 @@
- RewriteRule ^/smart-redir-temp/(.*)$ /smart/$1 [R=302]
- RewriteRule ^/smart-redir-auth/(.*)$ /auth/smart/$1 [R=301]
- RewriteRule ^/smart-redir-limited/(.*)/info/refs$ /smart/$1/info/refs [R=301]
-+RewriteRule ^/ftp-redir/(.*)$ ftp://localhost:1000/$1 [R=302]
- 
- <IfDefine SSL>
- LoadModule ssl_module modules/mod_ssl.so
-Index: git-2.5.0/t/t5812-proto-disable-http.sh
-===================================================================
---- git-2.5.0.orig/t/t5812-proto-disable-http.sh	2015-12-11 12:47:18.707849212 -0500
-+++ git-2.5.0/t/t5812-proto-disable-http.sh	2015-12-11 12:47:18.703849183 -0500
-@@ -16,5 +16,14 @@
- 
- test_proto "smart http" http "$HTTPD_URL/smart/repo.git"
- 
-+test_expect_success 'curl redirects respect whitelist' '
-+	test_must_fail env GIT_ALLOW_PROTOCOL=http:https \
-+		git clone "$HTTPD_URL/ftp-redir/repo.git" 2>stderr &&
-+	{
-+		test_i18ngrep "ftp.*disabled" stderr ||
-+		test_i18ngrep "your curl version is too old"
-+	}
-+'
-+
- stop_httpd
- test_done
diff --git a/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0012-CVE-2015-7545-5.patch b/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0012-CVE-2015-7545-5.patch
deleted file mode 100644
index 76d66ba..0000000
--- a/yocto-poky/meta/recipes-devtools/git/git-2.5.0/0012-CVE-2015-7545-5.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From b258116462399b318c86165c61a5c7123043cfd4 Mon Sep 17 00:00:00 2001
-From: Blake Burkhart <bburky@bburky.com>
-Date: Tue, 22 Sep 2015 18:06:20 -0400
-Subject: [PATCH] http: limit redirection depth
-
-By default, libcurl will follow circular http redirects
-forever. Let's put a cap on this so that somebody who can
-trigger an automated fetch of an arbitrary repository (e.g.,
-for CI) cannot convince git to loop infinitely.
-
-The value chosen is 20, which is the same default that
-Firefox uses.
-
-Signed-off-by: Jeff King <peff@peff.net>
-Signed-off-by: Junio C Hamano <gitster@pobox.com>
-
-Upstream-Status: Backport
-
-http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_2.5.0-1ubuntu0.1.debian.tar.xz
-
-CVE: CVE-2015-7545 #5
-Singed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- http.c                        | 1 +
- t/lib-httpd/apache.conf       | 3 +++
- t/t5812-proto-disable-http.sh | 4 ++++
- 3 files changed, 8 insertions(+)
-
-Index: git-2.5.0/http.c
-===================================================================
---- git-2.5.0.orig/http.c	2015-12-11 12:48:02.900163824 -0500
-+++ git-2.5.0/http.c	2015-12-11 12:48:02.896163796 -0500
-@@ -396,6 +396,7 @@
- 	}
- 
- 	curl_easy_setopt(result, CURLOPT_FOLLOWLOCATION, 1);
-+	curl_easy_setopt(result, CURLOPT_MAXREDIRS, 20);
- #if LIBCURL_VERSION_NUM >= 0x071301
- 	curl_easy_setopt(result, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL);
- #elif LIBCURL_VERSION_NUM >= 0x071101
-Index: git-2.5.0/t/lib-httpd/apache.conf
-===================================================================
---- git-2.5.0.orig/t/lib-httpd/apache.conf	2015-12-11 12:48:02.900163824 -0500
-+++ git-2.5.0/t/lib-httpd/apache.conf	2015-12-11 12:48:02.896163796 -0500
-@@ -121,6 +121,9 @@
- RewriteRule ^/smart-redir-limited/(.*)/info/refs$ /smart/$1/info/refs [R=301]
- RewriteRule ^/ftp-redir/(.*)$ ftp://localhost:1000/$1 [R=302]
- 
-+RewriteRule ^/loop-redir/x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-x-(.*) /$1 [R=302]
-+RewriteRule ^/loop-redir/(.*)$ /loop-redir/x-$1 [R=302]
-+
- <IfDefine SSL>
- LoadModule ssl_module modules/mod_ssl.so
- 
-Index: git-2.5.0/t/t5812-proto-disable-http.sh
-===================================================================
---- git-2.5.0.orig/t/t5812-proto-disable-http.sh	2015-12-11 12:48:02.900163824 -0500
-+++ git-2.5.0/t/t5812-proto-disable-http.sh	2015-12-11 12:48:02.896163796 -0500
-@@ -25,5 +25,9 @@
- 	}
- '
- 
-+test_expect_success 'curl limits redirects' '
-+	test_must_fail git clone "$HTTPD_URL/loop-redir/smart/repo.git"
-+'
-+
- stop_httpd
- test_done
diff --git a/yocto-poky/meta/recipes-devtools/git/git.inc b/yocto-poky/meta/recipes-devtools/git/git.inc
index 4da4a27..a1d0300 100644
--- a/yocto-poky/meta/recipes-devtools/git/git.inc
+++ b/yocto-poky/meta/recipes-devtools/git/git.inc
@@ -17,7 +17,7 @@
 		--without-tcltk \
 "
 
-inherit autotools-brokensep perlnative
+inherit autotools-brokensep perlnative bash-completion
 
 EXTRA_OEMAKE = "NO_PYTHON=1 CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'"
 EXTRA_OEMAKE += "'PERL_PATH=/usr/bin/env perl'"
@@ -50,6 +50,8 @@
 
 	# ${libdir} is not applicable here, perl-native files are always
 	# installed to /usr/lib on both 32/64 bits targets.
+
+	mkdir -p ${D}${libdir}
 	mv ${D}${exec_prefix}/lib/perl-native/perl ${D}${libdir}
 	rmdir -p ${D}${exec_prefix}/lib/perl-native || true
 }
@@ -75,7 +77,6 @@
 }
 
 FILES_${PN} += "${datadir}/git-core ${libexecdir}/git-core/"
-FILES_${PN}-dbg += "${libexecdir}/git-core/.debug"
 
 PERLTOOLS = " \
     ${libexecdir}/git-core/git-add--interactive \
@@ -97,10 +98,6 @@
     ${datadir}/git-core/templates/hooks/pre-rebase.sample \
 "
 
-# Basic tab completion support
-PACKAGES =+ "${PN}-bash-completion"
-FILES_${PN}-bash-completion = "${datadir}/bash-completion/completions/*"
-
 # Git tools requiring perl
 PACKAGES =+ "${PN}-perltools"
 FILES_${PN}-perltools += " \
diff --git a/yocto-poky/meta/recipes-devtools/git/git_2.5.0.bb b/yocto-poky/meta/recipes-devtools/git/git_2.5.0.bb
deleted file mode 100644
index 792f258..0000000
--- a/yocto-poky/meta/recipes-devtools/git/git_2.5.0.bb
+++ /dev/null
@@ -1,19 +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] = "3bc9b0a803ae8ec6c5316cc64f0b7f78"
-SRC_URI[tarball.sha256sum] = "8fa13ba8434ff83d24f57f831d55dbb9046434c266641180a37744facfce72ac"
-SRC_URI[manpages.md5sum] = "134b049e51420a336049aac21c88a75a"
-SRC_URI[manpages.sha256sum] = "745e4e797fe5061e781c880d370b1beb480199127da5acaf4e376e0b09d4d685"
-
-SRC_URI += "\
-    file://0008-CVE-2015-7545-1.patch \
-    file://0009-CVE-2015-7545-2.patch \
-    file://0010-CVE-2015-7545-3.patch \
-    file://0011-CVE-2015-7545-4.patch \
-    file://0012-CVE-2015-7545-5.patch \
-    "
diff --git a/yocto-poky/meta/recipes-devtools/git/git_2.7.4.bb b/yocto-poky/meta/recipes-devtools/git/git_2.7.4.bb
new file mode 100644
index 0000000..bc72793
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/git/git_2.7.4.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] = "c64012d491e24c7d65cd389f75383d91"
+SRC_URI[tarball.sha256sum] = "7104c4f5d948a75b499a954524cb281fe30c6649d8abe20982936f75ec1f275b"
+SRC_URI[manpages.md5sum] = "58020dc13a5801c49f7986fef7027535"
+SRC_URI[manpages.sha256sum] = "0dfe1931ad302873470e0280248e3aa50502b5edd00dcc3e9c9173667b6fea6a"
diff --git a/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb b/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
index eb7e420..0d05e79 100644
--- a/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
+++ b/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_20120814.bb
@@ -4,7 +4,7 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://config.guess;endline=39;md5=b79a4663475f4d724846463277817e0d"
 
-DEPENDS_class-native = "perl-native-runtime"
+DEPENDS_class-native = "hostperl-runtime-native"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
diff --git a/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb b/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
index 3d5f2b8..072726f 100644
--- a/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
+++ b/yocto-poky/meta/recipes-devtools/gnu-config/gnu-config_git.bb
@@ -4,7 +4,7 @@
 LICENSE = "GPL-3.0-with-autoconf-exception"
 LIC_FILES_CHKSUM = "file://config.guess;beginline=7;endline=27;md5=9bac8b1743c2240ae07cce6e546ac2f2"
 
-DEPENDS_class-native = "perl-native-runtime"
+DEPENDS_class-native = "hostperl-runtime-native"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
diff --git a/yocto-poky/meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch b/yocto-poky/meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch
new file mode 100644
index 0000000..24f073f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/guile/files/0001-libguile-Check-for-strtol_l-during-configure.patch
@@ -0,0 +1,56 @@
+From 814d6fb6c1f4a544c8fd37f5a390ba020c2d8c85 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 10 Jan 2016 22:28:17 +0000
+Subject: [PATCH] libguile: Check for strtol_l during configure
+
+strtol_l is a gnu extention which may not be available on other linux
+libc implementations e.g. musl. Therefore check for this funciton and
+conditionalize the use of it.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac    | 5 +++--
+ libguile/i18n.c | 2 +-
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3969929..f8a6a1a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -752,7 +752,8 @@ AC_CHECK_HEADERS([assert.h crt_externs.h])
+ #   truncate - not in mingw
+ #   isblank - available as a GNU extension or in C99
+ #   _NSGetEnviron - Darwin specific
+-#   strcoll_l, newlocale - GNU extensions (glibc), also available on Darwin
++#   strcoll_l, newlocale, strtol_l - GNU extensions (glibc),
++#                                    also available on Darwin
+ #   fork - unavailable on Windows
+ #   utimensat - posix.1-2008
+ #   sched_getaffinity, sched_setaffinity - GNU extensions (glibc)
+@@ -768,7 +769,7 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid		\
+   getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp	\
+   index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron	\
+   strcoll strcoll_l newlocale utimensat sched_getaffinity		\
+-  sched_setaffinity sendfile])
++  sched_setaffinity sendfile strtol_l])
+ 
+ AM_CONDITIONAL([BUILD_ICE_9_POPEN],
+   [test "x$enable_posix" = "xyes" && test "x$ac_cv_func_fork" = "xyes"])
+diff --git a/libguile/i18n.c b/libguile/i18n.c
+index 97d44b0..9fb6976 100644
+--- a/libguile/i18n.c
++++ b/libguile/i18n.c
+@@ -1352,7 +1352,7 @@ SCM_DEFINE (scm_locale_string_to_integer, "locale-string->integer",
+ 
+   if (c_locale != NULL)
+     {
+-#ifdef USE_GNU_LOCALE_API
++#if defined(USE_GNU_LOCALE_API) && defined(HAVE_STRTOL_L)
+       c_result = strtol_l (c_str, &c_endptr, c_base, c_locale);
+ #else
+       RUN_IN_LOCALE_SECTION (c_locale,
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch b/yocto-poky/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch
new file mode 100644
index 0000000..519585b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/guile/files/0002-Recognize-nios2-as-compilation-target.patch
@@ -0,0 +1,36 @@
+From 76155065c70b5ab65c6c805423183b360141db84 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Thu, 28 Jan 2016 04:46:23 +0100
+Subject: [PATCH] Recognize nios2 as compilation target
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Submitted [ http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22480 ]
+---
+ module/system/base/target.scm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/module/system/base/target.scm b/module/system/base/target.scm
+index d60a8e0..d1f6cff 100644
+--- a/module/system/base/target.scm
++++ b/module/system/base/target.scm
+@@ -65,7 +65,7 @@
+       (cond ((string-match "^i[0-9]86$" cpu)
+              (endianness little))
+             ((member cpu '("x86_64" "ia64"
+-                           "powerpcle" "powerpc64le" "mipsel" "mips64el"))
++                           "powerpcle" "powerpc64le" "mipsel" "mips64el" "nios2"))
+              (endianness little))
+             ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu"
+                            "mips" "mips64"))
+@@ -100,7 +100,7 @@
+ 
+           ((string-match "64$" cpu) 8)
+           ((string-match "64[lbe][lbe]$" cpu) 8)
+-          ((member cpu '("sparc" "powerpc" "mips" "mipsel")) 4)
++          ((member cpu '("sparc" "powerpc" "mips" "mipsel" "nios2")) 4)
+           ((string-match "^arm.*" cpu) 4)
+           (else (error "unknown CPU word size" cpu)))))
+ 
+-- 
+2.7.0.rc3
+
diff --git a/yocto-poky/meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch b/yocto-poky/meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch
new file mode 100644
index 0000000..e7a06fe
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/guile/files/remove_strcase_l_funcs.patch
@@ -0,0 +1,38 @@
+These unused functions cause build failures with uclibc since they reference __uclibc_locale_struct
+and this is exposed by uclibc API headers only if C locales are built, but for OE we build full locale
+support
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: guile-2.0.11/libguile/i18n.c
+===================================================================
+--- guile-2.0.11.orig/libguile/i18n.c
++++ guile-2.0.11/libguile/i18n.c
+@@ -851,27 +851,6 @@ str_downcase (register char *dst, regist
+   *dst = '\0';
+ }
+ 
+-#ifdef USE_GNU_LOCALE_API
+-static inline void
+-str_upcase_l (register char *dst, register const char *src,
+-	      scm_t_locale locale)
+-{
+-  for (; *src != '\0'; src++, dst++)
+-    *dst = toupper_l (*src, locale);
+-  *dst = '\0';
+-}
+-
+-static inline void
+-str_downcase_l (register char *dst, register const char *src,
+-		scm_t_locale locale)
+-{
+-  for (; *src != '\0'; src++, dst++)
+-    *dst = tolower_l (*src, locale);
+-  *dst = '\0';
+-}
+-#endif
+-
+-
+ SCM_DEFINE (scm_string_locale_lt, "string-locale<?", 2, 1, 0,
+ 	    (SCM s1, SCM s2, SCM locale),
+ 	    "Compare strings @var{s1} and @var{s2} in a locale-dependent way."
diff --git a/yocto-poky/meta/recipes-devtools/guile/guile_2.0.11.bb b/yocto-poky/meta/recipes-devtools/guile/guile_2.0.11.bb
index 98b465b..6cefe66 100644
--- a/yocto-poky/meta/recipes-devtools/guile/guile_2.0.11.bb
+++ b/yocto-poky/meta/recipes-devtools/guile/guile_2.0.11.bb
@@ -23,6 +23,9 @@
            file://workaround-ice-ssa-corruption.patch \
            file://libguile-Makefile.am-hook.patch \
            file://libguile-VM-ASM_MUL-for-ARM-Add-earlyclobber.patch \
+           file://remove_strcase_l_funcs.patch \
+           file://0001-libguile-Check-for-strtol_l-during-configure.patch \
+           file://0002-Recognize-nios2-as-compilation-target.patch \
            "
 
 #           file://debian/0001-Change-guile-to-guile-X.Y-for-info-pages.patch
@@ -50,6 +53,13 @@
 EXTRA_OECONF_append_class-target = " --with-libunistring-prefix=${STAGING_LIBDIR} \
                                      --with-libgmp-prefix=${STAGING_LIBDIR} \
                                      --with-libltdl-prefix=${STAGING_LIBDIR}"
+EXTRA_OECONF_append_libc-uclibc = " guile_cv_use_csqrt=no "
+
+CFLAGS_append_libc-musl = " -DHAVE_GC_SET_FINALIZER_NOTIFIER \
+	                    -DHAVE_GC_GET_HEAP_USAGE_SAFE \
+	                    -DHAVE_GC_GET_FREE_SPACE_DIVISOR \
+	                    -DHAVE_GC_SET_FINALIZE_ON_DEMAND \
+                           "
 
 do_configure_prepend() {
 	mkdir -p po
@@ -57,19 +67,6 @@
 
 export GUILE_FOR_BUILD="${BUILD_SYS}-guile"
 
-do_compile_append() {
-	# just for target recipe
-	if [ "${PN}" = "guile" ]
-	then
-		sed -i -e s:${STAGING_DIR_TARGET}::g \
-	               -e s:/${TARGET_SYS}::g \
-	               -e s:-L/usr/lib::g \
-        	       -e s:-isystem/usr/include::g \
-	               -e s:,/usr/lib:,\$\{libdir\}:g \
-	                  meta/guile-2.0.pc
-	fi
-}
-
 do_install_append_class-native() {
 	install -m 0755  ${D}${bindir}/guile ${D}${bindir}/${HOST_SYS}-guile
 
@@ -83,8 +80,14 @@
 
 do_install_append_class-target() {
 	# cleanup buildpaths in scripts
-	sed -i -e 's:${STAGING_DIR_NATIVE}::' ${D}/usr/bin/guile-config
-	sed -i -e 's:${STAGING_DIR_HOST}::' ${D}/usr/bin/guile-snarf
+	sed -i -e 's:${STAGING_DIR_NATIVE}::' ${D}${bindir}/guile-config
+	sed -i -e 's:${STAGING_DIR_HOST}::' ${D}${bindir}/guile-snarf
+
+	sed -i -e 's:${STAGING_DIR_TARGET}::g' ${D}${libdir}/pkgconfig/guile-2.0.pc
+}
+
+do_install_append_libc-musl() {
+	rm -f ${D}${libdir}/charset.alias
 }
 
 SYSROOT_PREPROCESS_FUNCS = "guile_cross_config"
diff --git a/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.1.bb b/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.1.bb
deleted file mode 100644
index bc6d50e..0000000
--- a/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.1.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Program for creating simple man pages"
-SECTION = "devel"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-DEPENDS = "autoconf-native automake-native"
-
-SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "cf7aaaeea40bff1176df825430694173"
-SRC_URI[sha256sum] = "c59b26f60cb06e45b00e729dea721e7a17220e2c17d800eb428271a750382b06"
-
-inherit autotools native
-
-EXTRA_OECONF = "--disable-nls"
-
-# We don't want to reconfigure things as it would require 'perlnative' to be
-# used.
-do_configure() {
-	oe_runconf
-}
-
-do_install_append () {
-	# Make sure we use /usr/bin/env perl
-	sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${D}${bindir}/help2man
-}
diff --git a/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.3.bb b/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.3.bb
new file mode 100644
index 0000000..232b0c3
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/help2man/help2man-native_1.47.3.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Program for creating simple man pages"
+SECTION = "devel"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+DEPENDS = "autoconf-native automake-native"
+
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "d1d44a7a7b2bd61755a2045d96ecaea0"
+SRC_URI[sha256sum] = "c232af6475ef65bee02770862a362f4c4c2e6c9967d39e987eb94cadcfc13856"
+
+inherit autotools native
+
+EXTRA_OECONF = "--disable-nls"
+
+# We don't want to reconfigure things as it would require 'perlnative' to be
+# used.
+do_configure() {
+	oe_runconf
+}
+
+do_install_append () {
+	# Make sure we use /usr/bin/env perl
+	sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${D}${bindir}/help2man
+}
diff --git a/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb b/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
index 042695b..4d25542 100644
--- a/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
+++ b/yocto-poky/meta/recipes-devtools/i2c-tools/i2c-tools_3.1.2.bb
@@ -3,7 +3,7 @@
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
-SRC_URI = "http://dl.lm-sensors.org/i2c-tools/releases/${BP}.tar.bz2 \
+SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2 \
            file://Module.mk \
 "
 SRC_URI[md5sum] = "7104a1043d11a5e2c7b131614eb1b962"
diff --git a/yocto-poky/meta/recipes-devtools/installer/adt-installer/adt_installer b/yocto-poky/meta/recipes-devtools/installer/adt-installer/adt_installer
deleted file mode 100755
index b8cfb2e..0000000
--- a/yocto-poky/meta/recipes-devtools/installer/adt-installer/adt_installer
+++ /dev/null
@@ -1,420 +0,0 @@
-#!/bin/bash
-# Yocto ADT Installer
-#
-# Copyright 2010-2011 by Intel Corp.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy 
-# of this software and associated documentation files (the "Software"), to deal 
-# in the Software without restriction, including without limitation the rights 
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-# copies of the Software, and to permit persons to whom the Software is 
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in 
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-# THE SOFTWARE.
-
-
-usage ()
-{
-
-  INST_ARCH=`uname -m`
-  INST_OS=`uname -o| tr '[A-Z]' '[a-z]'`
-  INST_KR=`uname -r| tr '[A-Z]' '[a-z]'`
-
-  echo_info "#########################################################################"
-  echo_info "# Welcome to Yocto Application Developement Tools (ADT) Installer"
-  echo_info "# "
-  echo_info "# Host Machine:\t\t\t\t"$INST_ARCH
-  echo_info "# OS info:\t\t\t\t$INST_KR"  
-  echo_info "# Yocto ADT version to be installed:\t$YOCTOADT_VERSION"
-  echo_info "# supported target architectures:\t$YOCTOADT_SUPPORTED_TARGETS"
-  echo_info "# supported target root_fs images:\t$YOCTOADT_SUPPORTED_ROOTFS"
-  echo_info "#########################################################################\n"
-
-  echo_info "Systemwide installation. Installation will occur under $INSTALL_FOLDER\n"
-  echo_info "############################################################################"
-  echo_info "# Your system installation configurations from adt_installer.conf"
-  echo_info "############################################################################"
-
-  echo_info "# Cross toolchains:\t\t$YOCTOADT_TARGETS"
-  echo_info "# Install Qemu:\t\t\t$YOCTOADT_QEMU"
-  echo_info "# Install NFS utilities:\t$YOCTOADT_NFS_UTIL"
-  #echo_info "# Install bitbake + UI:\t\t$YOCTOADT_BITBAKE"
-  #echo_info "# Install metadata:\t$YOCTOADT_METADATA"
-  #echo_info "############################################################################\n"
-
-    echo_info "\n##############################################################################"
-    echo_info "# Your rootfs image(s) and target sysroot selections from adt_installer.conf"
-    echo_info "##############################################################################"
-prompt=1
-for arch_type in $YOCTOADT_TARGETS; do
-  download_images $arch_type $prompt
-done
-    echo_info "############################################################################\n"
-  select_install_type
-}
-
-validate_config()
-{
-
-  for selected_arch_type in $YOCTOADT_TARGETS; do
-    found=0
-    select_machine_var="\$YOCTOADT_TARGET_MACHINE_$selected_arch_type"
-    select_machine=`eval echo $select_machine_var`
-    show_error_banner=0
-
-    for supported_arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
-      if [ "$selected_arch_type" == "$supported_arch_type" ]; then
-        found=1
-        break
-      fi
-    done
-    if [ $found == 0 ]; then
-       echo_info "[ADT_INST] Error: YOCTADT_TARGETS in adt_installer.conf contains invalid entries: $YOCTOADT_TARGETS. Valid values are: $YOCTOADT_SUPPORTED_TARGETS"
-       show_error_banner=1
-    elif [ -z "$select_machine" ]; then
-       echo_info "[ADT_INST] Error: No MACHINE was defined for $selected_arch_type architecture! This is needed to install the toolchain and the correct environment settings."
-       echo_info "[ADT_INST] To do that, in adt-installer.conf, set the following variable: YOCTOADT_TARGET_MACHINE_$selected_arch_type"
-       show_error_banner=1
-    fi
-
-    if [ $show_error_banner == 1 ]; then
-       echo -e "\n#############################################################################"
-       echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-       echo -e "#############################################################################\n"
-       exit -1
-    fi
-  done
-
-  for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
-    #select_target_var="\$YOCTOADT_TARGET_$arch_type"
-    #select_target=`eval echo $select_target_var`
-
-    #if [ "$select_target" != "Y" ] || [ "$selected_target" != "y" ]; then
-    #  continue;
-    #fi
-
-    target_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$arch_type"
-    target_sysroot_image=`eval echo $target_sysroot_image_var`
-
-
-    select_rootfs_var="\$YOCTOADT_ROOTFS_$arch_type"
-    select_rootfs=`eval echo $select_rootfs_var`
-
-    if [ "$select_rootfs" == "" ] && [ "$target_sysroot_image" == "" ]; then
-       continue;
-    fi
-
-    for image_type in $select_rootfs; do
-#validate rootfs type defined in YOCTOADT_ROOTFS_{ARCH} is valid and in YOCTOADT_SUPPORTED_ROOTFS
-      found=0
-      for supported_rootfs_type in $YOCTOADT_SUPPORTED_ROOTFS; do
-        if [ "$image_type" == "$supported_rootfs_type" ]; then
-          found=1
-          break
-        fi
-      done
-      if [ $found == 0 ]; then
-#the rootfs type listed for downloading is not valid
-        echo_info "[ADT_INST] Error: Selected YOCTOADT_ROOTFS_$arch_type value: $image_type, is not valid! Valid values are: $YOCTOADT_SUPPORTED_ROOTFS "
-       echo -e "\n#############################################################################"
-       echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-       echo -e "#############################################################################\n"
-        exit -1
-      fi
-    done
-
-    found=0
-    for image_type in $select_rootfs; do
-#validate that rootfs to be extracted must be in the item: YOCTOADT_ROOTFS_${ARCH}
-      if [ "$target_sysroot_image" == "$image_type" ]; then
-        found=1
-        break
-      fi
-    done
-# the rootfs image to be extracted is not selected
-    if [ $found == 0 ]; then
-      echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT_IMAGE_$arch_type selection: $target_sysroot_image is not included in YOCTOADT_ROOTFS_$arch_type selections: $select_rootfs"
-      echo -e "\n#############################################################################"
-      echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-      echo -e "#############################################################################\n"
-      exit -1
-    fi
-  done
-}
-
-
-#detect opkg installed or not, for installing sdk, we will use
-#this installed local opkg
-install_opkg()
-{
-if [ ! -x "$LOCAL_OPKG_LOC/bin/opkg" ]; then
-  echo_info "OPKG is not setup, setting up opkg in local, which is required for installing yocto ADT...\n"
-
-  if [ -d $LOCAL_OPKG_LOC ]; then
-    echo_info "Deleting old OPKG folder, which doesn't contain executables... "
-    rm -rf $LOCAL_OPKG_LOC
-  fi
-
-  parent_folder=`pwd`
-  cd $LOCAL_OPKG_FOLDER
-  check_result
-
-  opkg_source_dir=`ls -d opkg-*`
-
-  if [ $opkg_source_dir == "" ]; then
-    echo_info "[ADT_INST] Error: OPKG source directory is not found!"
-    echo -e "\n#############################################################################"
-    echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-    echo -e "#############################################################################\n"
-    exit -1
-  fi
-
-  cd $opkg_source_dir
-  check_result
-
-  echo_info "Configure opkg ...\n"
-  autoreconf -i
-  ./configure --prefix=$parent_folder/$LOCAL_OPKG_LOC --enable-shared=no --disable-curl --disable-ssl-curl --disable-gpg >> $parent_folder/$YOCTOADT_INSTALL_LOG_FILE
-  check_result
-
-  echo_info "Make opkg ...\n"
-  make &>> $parent_folder/$YOCTOADT_INSTALL_LOG_FILE
-  check_result
-
-  echo_info "Make Install opkg ...\n"
-  make install &>> $parent_folder/$YOCTOADT_INSTALL_LOG_FILE
-  #if meet error when installing opkg, cancel the installation
-  check_result
-
-  cd $parent_folder
-  echo_info "Successfully installed OPKG.\n"
-fi
-}
-
-confirm_download()
-{
-#avoid repeated reminding
-if [ "$override_oldfile" == 1 ]; then
-  return $pre_result
-else
-  override_oldfile=1
-fi
-
-while true; do
-  #echo_info "[ADT_INST] Files [$1] already exists. If you continue downloading, old files will be overrided."
-  #echo_info "[ADT_INST] Further prompts will not be given if there're more existing files to be downloaded."
-  #echo_info "[ADT_INST] Do you want to continue downloading? Please enter Y/N:"
-  echo_info "\nFile [$1] already exists, which means you've downloaded the qemu kernel and rootfs file(s) before.  If you choose continue downloading, old files will be overridden."
-  echo_info "[ADT_INST] Do you want to continue downloading? Please enter Y/N:"
-  read YOCTOADT_INSTALL
-  YOCTOADT_INSTALL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_INSTALL"`
-  if [ "$YOCTOADT_INSTALL" == "Y" ]; then
-    pre_result=0
-    return 0
-  elif [ "$YOCTOADT_INSTALL" == "N" ]; then
-    pre_result=1
-    return 1
-  fi
-done
-}
-
-download_file()
-{
-local filename=`echo ${1##*/}`
-if [ -f "$LOCAL_DOWNLOAD/$filename" ]; then
-  confirm_download $filename
-  result="$?"
-  if [ ! "$result" == "0" ]; then
-    return
-  else
-    echo "Removing old file [$1]"
-    rm -rf "$LOCAL_DOWNLOAD/$filename" 
-  fi
-fi
-echo_info "Downloading file: $filename..."
-wget "$YOCTOADT_REPO/rootfs/$1" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
-}
-
-
-
-#Need three input params:
-# $1 arch_type(arm powerpc x86 mips)
-# $2 machine(qemuarm beagleboard)
-# $3 rootfs_image_type (a list of sdk sato minimal lsb)
-get_image()
-{
-  local machine=$2
- 
-  if [ "$1" == "x86" ] || [ "$1" == "x86_64" ]; then
-    kernel="bzImage-$machine.bin"
-  elif [ "$1" == "ppc" ] || [ "$1" == "mips" ]; then
-    kernel="vmlinux-$machine.bin"
-  else
-    kernel="zImage-$machine.bin"
-  fi
-
-  #echo_info "[ADT_INST] Downloading qemu kernel binary: $qemu_kernel"
-  download_file $machine/$kernel
-  check_result
-  
-  for image_type in $select_rootfs; do
-    #echo_info "[ADT_INST] Downloading rootfs file: core-image-$image_type-$machine.tar.bz2"
-    filename="core-image-$image_type-$machine.tar.bz2"
-    download_file $machine/$filename
-    check_result
-  done
-}
-
-download_images()
-{
-  select_rootfs_var="\$YOCTOADT_ROOTFS_$1"
-  select_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1"
-  select_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_LOC_$1"
-  select_machine_var="\$YOCTOADT_TARGET_MACHINE_$1"
-  select_rootfs=`eval echo $select_rootfs_var`
-  select_sysroot_image=`eval echo $select_sysroot_image_var`
-  select_sysroot=`eval echo $select_sysroot_var`
-  select_machine=`eval echo $select_machine_var`
-
-  if [ -n "$select_sysroot" ]; then
-    select_sysroot=`readlink -m $select_sysroot`
-  fi
-
-  if [ "$select_rootfs" != "" ]; then
-    if [ $2 ]; then
-    #echo_info "\n############################################################################"
-    #echo_info "# To be downloaded rootfs image details defined in adt_installer.conf"
-    #echo_info "############################################################################"
-    echo_info "# Target architecture:\t\t$1"
-    echo_info "# Target machine:\t\t$select_machine"
-    echo_info "# Root_fs images:\t\t$select_rootfs"
-    echo_info "# Target sysroot image:\t\t$select_sysroot_image"
-    echo_info "# Target sysroot loc:\t\t$select_sysroot"
-    echo_info "\n"
-    #echo_info "############################################################################\n"
-    else
-    get_image $1 $select_machine $select_rootfs
-    fi
-  fi
-}
-
-
-
-
-#Main body of installer
-
-clear
-
-run_path=`dirname $0`
-cd $run_path
-
-if [ ! -f "scripts/util" ]; then
-  echo -e "[ADT_INST] Error: Script file: util, can't be found under: $run_path!"
-  echo -e "\n#############################################################################"
-  echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-  echo -e "#############################################################################\n"
-  exit -1
-fi
-
-if [ ! -f "scripts/adt_installer_internal" ]; then
-  echo -e "[ADT_INST] Error: Script file: adt_installer_internal, can't be found under: $run_path!"
-  echo -e "\n#############################################################################"
-  echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-  echo -e "#############################################################################\n"
-  exit -1
-fi
-
-config_file="adt_installer.conf"
-if [ ! -f "$config_file" ]; then
-  echo_info "[ADT_INST] Error: Installation configuration file: adt_installer.conf is not found!\n"
-  echo_info "\n##################################################################################"
-  echo_info "# Meet error(s) when installing Yocto ADT. Please check log file for details. "
-  echo_info "##################################################################################\n"
-  exit -1
-fi
-
-. scripts/data_define
-. scripts/util
-
-
-if [ -f "$YOCTOADT_INSTALL_LOG_FILE" ]; then
-  rm $YOCTOADT_INSTALL_LOG_FILE
-fi
-
-echo -n "Please enter the install location (default: $DEFAULT_INSTALL_FOLDER): "
-read INSTALL_FOLDER
-
-if [ "$INSTALL_FOLDER" = "" ]; then
-    INSTALL_FOLDER=$DEFAULT_INSTALL_FOLDER
-fi
-
-eval INSTALL_FOLDER=$(printf "%q" "$INSTALL_FOLDER")
-if [ -d "$INSTALL_FOLDER" ]; then
-	export INSTALL_FOLDER=$(cd "$INSTALL_FOLDER"; pwd)
-else
-	export INSTALL_FOLDER=$(readlink -m "$INSTALL_FOLDER")
-fi
-
-if [ -n "$(echo $INSTALL_FOLDER|grep ' ')" ]; then
-       echo "The target directory path ($INSTALL_FOLDER) contains spaces. Abort!"
-       exit 1
-fi
-
-clear
-
-usage
-
-user_inst_type="$?"
-
-validate_config
-check_result
-
-#check adt_repo exist
-wget --spider $YOCTOADT_REPO 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE"
-if grep -q "404 Not Found" $YOCTOADT_INSTALL_LOG_FILE; then
-  echo -e "[ADT_INST] Error: YOCTOADT_REPO does not exist: $YOCTOADT_REPO"
-  echo -e "\n#############################################################################"
-  echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-  echo -e "#############################################################################\n"
-  exit -1
-fi
-
-#firstly we need to install opkg host
-install_opkg
-
-#Create folders for holding rootfs/qemu images
-if [ ! -d "$LOCAL_DOWNLOAD" ]; then
-  echo_info "Creating new images downloading folder: $LOCAL_DOWNLOAD ..."
-  mkdir -p $LOCAL_DOWNLOAD
-fi
-
-#downloading required qemu images/rootfs
-if [ "$user_inst_type" == "0" ]; then
-  override_oldfile=1
-else
-  override_oldfile=0
-fi
-
-for arch_type in $YOCTOADT_TARGETS; do
-  download_images $arch_type
-done
-
-scripts/adt_installer_internal $user_inst_type
-
-result="$?"
-#echo_info "\n############################################################"
-if [ "$result" == "0" ]; then
-  echo_info "\n############################################################"
-  echo_info "# Yocto ADT has been successfully installed."
-  echo_info "############################################################\n"
-fi
-
diff --git a/yocto-poky/meta/recipes-devtools/installer/adt-installer/adt_installer.conf b/yocto-poky/meta/recipes-devtools/installer/adt-installer/adt_installer.conf
deleted file mode 100644
index 867fbd1..0000000
--- a/yocto-poky/meta/recipes-devtools/installer/adt-installer/adt_installer.conf
+++ /dev/null
@@ -1,75 +0,0 @@
-# Yocto ADT Installer Configuration File
-#
-# Copyright 2010-2011 by Intel Corp.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy 
-# of this software and associated documentation files (the "Software"), to deal 
-# in the Software without restriction, including without limitation the rights 
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-# copies of the Software, and to permit persons to whom the Software is 
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in 
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-# THE SOFTWARE.
-
-
-# Your yocto distro repository, this should include IPKG based packages and root filesystem files where the installation is based on
-
-YOCTOADT_REPO="ADTREPO"
-
-# The following are for system wide setup
-# Target architectures that you want to setup host cross dev environment for
-# valid values are: arm, x86, x86_64, ppc, mips with space separation between entries
-YOCTOADT_TARGETS="arm x86"
-# Whether install qemu or not, valid entries are: Y/N
-YOCTOADT_QEMU="Y"
-# Whether install user-mode nfs or not, valid entries are: Y/N.  If you want to use Yocto Eclipse plug-in as your dev IDE, you need to select both qemu and NFS
-YOCTOADT_NFS_UTIL="Y"
-
-# These 2 values will be supported in the furture installer
-#YOCTOADT_BITBAKE="Y"
-#YOCTOADT_METADATA="Y"
-
-#The followings are for setting up specific target architecture
-#YOCTOADT_ROOTFS_$arch is for specifying what root filesystem image files you want to download from the repository. The valid values to replace $arch are: arm, x86, x86_64, powerpc, mips.  The valid image files are: minimal, minimal-dev, sato, sato-dev, sato-sdk,lsb, lsb-dev, lsb-sdk.  If you want to download multiple images, the entries are space separated
-YOCTOADT_ROOTFS_arm="minimal sato-sdk"
-#Specify which root filesystem file to use to extract as target sysroot.  Please ensure the entry is in the list of downloaded root filesystem files that specified above in YOCTOADT_ROOTFS_$arch
-YOCTOADT_TARGET_SYSROOT_IMAGE_arm="sato-sdk"
-#The machine for which you want to download the image. Each machine might have
-#different compilation options in order to select certain hardware models or
-#configurations
-YOCTOADT_TARGET_MACHINE_arm="qemuarm"
-#The location where the target sysroot will be setup
-YOCTOADT_TARGET_SYSROOT_LOC_arm="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_arm"
-
-
-#Here's a template for setting up target arch of x86 
-YOCTOADT_ROOTFS_x86="sato-sdk"
-YOCTOADT_TARGET_SYSROOT_IMAGE_x86="sato-sdk"
-YOCTOADT_TARGET_MACHINE_x86="qemux86"
-YOCTOADT_TARGET_SYSROOT_LOC_x86="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_x86"
-
-#Here's some template of other arches, which you need to change the value in ""
-YOCTOADT_ROOTFS_x86_64="sato-sdk"
-YOCTOADT_TARGET_SYSROOT_IMAGE_x86_64="sato-sdk"
-YOCTOADT_TARGET_MACHINE_x86_64="qemux86-64"
-YOCTOADT_TARGET_SYSROOT_LOC_x86_64="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_x86_64"
-
-YOCTOADT_ROOTFS_ppc="sato-sdk"
-YOCTOADT_TARGET_SYSROOT_IMAGE_ppc="sato-sdk"
-YOCTOADT_TARGET_MACHINE_ppc="qemuppc"
-YOCTOADT_TARGET_SYSROOT_LOC_ppc="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_ppc"
-
-YOCTOADT_ROOTFS_mips="sato-sdk"
-YOCTOADT_TARGET_SYSROOT_IMAGE_mips="sato-sdk"
-YOCTOADT_TARGET_MACHINE_mips="qemumips"
-YOCTOADT_TARGET_SYSROOT_LOC_mips="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_mips"
-
diff --git a/yocto-poky/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-i686.conf b/yocto-poky/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-i686.conf
deleted file mode 100644
index ba627b3..0000000
--- a/yocto-poky/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-i686.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-arch all 1
-arch any 6
-arch noarch 11
-arch i686-nativesdk 16
-src yp-i686-nativesdk ADTREPO_URL/adt-ipk/i686-nativesdk
-src yp-i686-all ADTREPO_URL/adt-ipk/all
diff --git a/yocto-poky/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-x86_64.conf b/yocto-poky/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-x86_64.conf
deleted file mode 100644
index 10504a9..0000000
--- a/yocto-poky/meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-x86_64.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-arch all 1
-arch any 6
-arch noarch 11
-arch x86_64-nativesdk 16
-src yp-x86_64-nativesdk ADTREPO_URL/adt-ipk/x86_64-nativesdk
-src yp-x86_64-all ADTREPO_URL/adt-ipk/all
diff --git a/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
deleted file mode 100755
index 6f5fb49..0000000
--- a/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ /dev/null
@@ -1,312 +0,0 @@
-#!/bin/bash
-
-# Yocto ADT Installer
-#
-# Copyright 2010-2011 by Intel Corp.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy 
-# of this software and associated documentation files (the "Software"), to deal 
-# in the Software without restriction, including without limitation the rights 
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-# copies of the Software, and to permit persons to whom the Software is 
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in 
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-# THE SOFTWARE.
-
-parse_config()
-{
-  INST_ARCH=`uname -m`
-
-  case $INST_ARCH in 
-  i[3-6]86)
-    OPKG_CONFIG_FILE=$YOCTOADT_OPKG_CONF_FILE_32
-    OECORE_NATIVE_SYSROOT="$INSTALL_FOLDER/sysroots/$INST_ARCH$SDK_VENDOR-linux/"
-    ;;
-  x86_64)
-    OPKG_CONFIG_FILE=$YOCTOADT_OPKG_CONF_FILE_64
-    OECORE_NATIVE_SYSROOT="$INSTALL_FOLDER/sysroots/x86_64$SDK_VENDOR-linux/"
-    ;;
-  *)
-    echo_info "[ADT_INST] Error: Installation Machine is not supported!"
-    exit -1
-    ;;
-  esac
-}
-
-get_sudo_app()
-{
-  username=$(id -nu)
-
-  # find the owner of the parent
-  dir=$1
-  while [ 1 ]; do
-      if [ -d $dir ]; then
-          owner=$(stat -c %U $dir)
-          break
-     else
-          dir=$(dirname $dir)
-     fi
-  done
-
-  if [ "$owner" = "$username" ]; then
-      true
-  else
-      echo sudo
-  fi
-}
-
-# this function accepts arch_type (x86, x86_64, arm, ppc, mips) as the first
-# argument, returning the location of the target rootfs
-get_target_rootfs_location() {
-	[ -z "$1" ] && return
-
-	arch_type=$1
-	# rootfs extraction directory
-	target_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_LOC_$arch_type"
-	target_sysroot=`eval echo $target_sysroot_var`
-
-	if [ "$target_sysroot" == "" ]; then
-		return
-	else
-		echo "`readlink -m $target_sysroot`"
-	fi
-}
-
-
-#let us install a qemu-native firstly
-#installation step 2
-install_native_sdk()
-{
-
-echo_info "\nStart installing selected native ADT for archs: $YOCTOADT_TARGETS..."
-
-# where the packages are installed.
-NATIVE_INSTALL_DIR=$INSTALL_FOLDER
-
-if [ -d "$INSTALL_FOLDER" ]; then
-  echo_info "\nNative ADT installation directory \"$INSTALL_FOLDER\" already exists! Continue installation will override its contents!"
-  confirm_install $1
-fi
-
-#Now begin to install native sdk and extract qemu rootfs which needs privilege rights
-#depending on the install location
-SUDO=$(get_sudo_app $NATIVE_INSTALL_DIR)
-if [ -n "$SUDO" ]; then
-  echo_info "#######################################################################"
-  echo_info "Please note from this point on installation requires sudo password ..."
-  echo_info "#######################################################################"
-fi
-
-#we need to make this directory firstly since opkg need to use it.
-OPKG_LOCK_DIR="$NATIVE_INSTALL_DIR/$OPKG_LIBDIR/opkg"
-if [ ! -d "$OPKG_LOCK_DIR" ]; then
-  $SUDO mkdir -p $OPKG_LOCK_DIR
-  echo_info "Successfully create directory $OPKG_LOCK_DIR. "
-#if user delete /opt/xxx, while dangling folders there, report error
-elif [ ! -d "$INSTALL_FOLDER" ]; then
-  echo_info "\nDangling opkg cache folder $OPKG_LOCK_DIR detected. Continue installation will remove the folder!"
-  confirm_install $1
-  $SUDO rm -rf $OPKG_LOCK_DIR
-  $SUDO mkdir -p $OPKG_LOCK_DIR
-#if user are updating installing, just let him/her go, give her/him prompt
-else
-  echo_info "ADT has already been installed. Will update its contents..."
-fi
-
-#first update repository
-if [ "x$SUDO" = "x" ]; then
-    OPKG_CMD="$LOCAL_OPKG_LOC/bin/opkg"
-else
-    OPKG_CMD="sudo -E $LOCAL_OPKG_LOC/bin/opkg"
-fi
-
-echo_info "Updating opkg..."
-$OPKG_CMD -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR update &>> $YOCTOADT_INSTALL_LOG_FILE
-check_result
-echo_info "opkg update process ended..."
-
-#install below must sdk-host packages
-OPKG_INSTALL_CMD="$OPKG_CMD "
-OPKG_INSTALL_NATIVE_CMD="$OPKG_INSTALL_CMD  --force-overwrite -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR install"
-
-BASE_HOSTSDK_PKGNAMES="pseudo opkg pkgconfig libtool autoconf automake"
-for pkg in $BASE_HOSTSDK_PKGNAMES; do
-  echo_info "Installing ${pkg} nativesdk ...\n"
-  $OPKG_INSTALL_NATIVE_CMD nativesdk-${pkg} &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-done
-
-for target_type in $YOCTOADT_TARGETS; do
-  machine_var="\$YOCTOADT_TARGET_MACHINE_$target_type"
-  machine=`eval echo $machine_var`
-  echo_info "Installing cross canadian packages for $machine ..."
-  $OPKG_INSTALL_NATIVE_CMD packagegroup-cross-canadian-$machine &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-
-  target_sysroot=`get_target_rootfs_location $target_type`
-  [ -z "$target_sysroot" ] && continue
-
-  # get the environment setup script paths: original (the one before relocation)
-  # and relocated
-  env_script_original=`$OPKG_CMD -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR files meta-environment-$machine|\
-							grep environment-setup`
-  env_script_relocated=$INSTALL_FOLDER/${env_script_original##*/}
-
-  # opkg will not install packagegroup-cross-canadian package if it was already
-  # installed. So, the environment script is in one place or the other.
-  [ -e "$INSTALL_FOLDER/$env_script_original" ] && env_script=$INSTALL_FOLDER/$env_script_original
-  [ -e "$env_script_original" ] && env_script=$env_script_original
-  [ -e "$env_script_relocated" ] && env_script=$env_script_relocated
-
-  $SUDO sed -i -e "s%SDKTARGETSYSROOT=.*%SDKTARGETSYSROOT=$target_sysroot%g" $env_script
-done
-
-if [ "$YOCTOADT_QEMU" == "Y" ] || [ "$YOCTOADT_QEMU" == "y" ]; then
-  echo_info "\nInstalling qemu native ..."
-  $OPKG_INSTALL_NATIVE_CMD nativesdk-qemu &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-  $OPKG_INSTALL_NATIVE_CMD nativesdk-qemu-helper &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-fi
-
-if [ "$YOCTOADT_NFS_UTIL" == "Y" ] || [ "$YOCTOADT_NFS_UTIL" == "y" ]; then
-  echo_info "\nInstalling unfs ..."
-  $OPKG_INSTALL_NATIVE_CMD nativesdk-unfs3 &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-fi
-
-# Lose the ./opt/${DISTRO}/${SDK_VERSION} part, we don't really need to keep
-# the entire directory structure. We could patch opkg to do that but it's far
-# simpler to do that here and achieve the same result.
-# This is done in two steps:
-if [ -d $NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER ]; then
-    # Step 1: copy ./opt/${DISTRO}/${SDK_VERSION} contents to $NATIVE_INSTALL_DIR.
-    # We cannot use move if $NATIVE_INSTALL_DIR is not empty (for example: contains
-    # another SDK)
-    $SUDO cp -r $NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER/* $NATIVE_INSTALL_DIR
-
-    # delete the source directory now
-    $SUDO rm -rf $NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER/*
-
-    # Step 2: Delete the ./opt/${DISTRO}/${SDK_VERSION} directories too, they should be empty
-    dir=$NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER
-    while [ "$dir" != "$NATIVE_INSTALL_DIR" ]; do
-        # if the user chose / as the install folder, then we should leave /opt in place
-        if [ "$dir" = "/opt" ]; then
-            break
-        fi
-
-        # try to delete the directory, only if it's empty
-        $SUDO rmdir $dir
-        if [ $? -ne 0 ]; then
-            break
-        fi
-
-        # go to the next directory
-        dir=$(dirname $dir)
-    done
-    # Step 3: Rewrite the *.list files to contain the correct paths
-    $SUDO find $NATIVE_INSTALL_DIR/var/lib/opkg -type f -exec sed -i -e '#^$DEFAULT_INSTALL_FOLDER#$NATIVE_INSTALL_DIR#' {} \;
-fi
-
-# Link the ld.so.cache file into the hosts filesystem
-if [ ! -f "$OECORE_NATIVE_SYSROOT/etc/ld.so.cache" ]; then
-echo_info "Link the ld.so.cache file into the host filesystem"
-$SUDO ln -s /etc/ld.so.cache $OECORE_NATIVE_SYSROOT/etc/ld.so.cache
-check_result
-fi
-
-# relocate binaries
-echo_info "\nRelocating binaries ..."
-escaped_sdkpath=$(echo $DEFAULT_INSTALL_FOLDER |sed -e "s:[\+\.]:\\\\\\\\\0:g")
-
-# We don't change the script in-place since we may want the user to re-run
-# adt-installer script
-sed -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:" scripts/relocate_sdk.py > scripts/relocate_sdk_tmp.py
-chmod +x scripts/relocate_sdk_tmp.py
-
-dl_path=$(find $OECORE_NATIVE_SYSROOT/lib -name "ld-linux*")
-executable_files=$(find $OECORE_NATIVE_SYSROOT -type f -perm /111)
-
-$SUDO scripts/relocate_sdk_tmp.py $INSTALL_FOLDER $dl_path $executable_files
-check_result
-
-# replace /opt/${DISTRO}/${SDK_VERSION} with the install folder in all configs
-env_setup_script=$(find $NATIVE_INSTALL_DIR/ -name "environment-setup-*")
-$SUDO sed -i -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:g" $env_setup_script
-
-find $OECORE_NATIVE_SYSROOT -type f -exec file '{}' \; | grep ":.*\(ASCII\|script\|source\).*text" | \
-    cut -d':' -f1 | xargs $SUDO sed -i -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:g"
-
-# change all symlinks pointing to /opt/${DISTRO}/${SDK_VERSION}
-for l in $(find $NATIVE_INSTALL_DIR -type l); do
-    $SUDO ln -sfn $(readlink $l|sed -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:") $l
-done
-
-# find out all perl scripts in $OECORE_NATIVE_SYSROOT and modify them
-# replacing the host perl with SDK perl.
-for perl_script in $($SUDO grep -m 1 "^#!.*perl" -rl $OECORE_NATIVE_SYSROOT); do
-    $SUDO sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
-        "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
-done
-
-echo_info "\nSuccessfully installed selected native ADT!"
-}
-
-#Need three input params, $1 -- arch_type(arm powerpc x86 mips) #2 -- user installation type
-#customer or scilent
-
-install_target()
-{
-
-target_sysroot=`get_target_rootfs_location $1`
-[ -z "$target_sysroot" ] && return 0
-
-target_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1"
-target_sysroot_image=`eval echo $target_sysroot_image_var`
-if [ "$target_sysroot_image" == "" ]; then
-  echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT_IMAGE_$1 selection is empty, failed to create target sysroot!"
-  return 1
-fi
-
-echo_info "Installing target sysroot for arch: $1, rootfs type: $target_sysroot_image, location: $target_sysroot"
-
-target_machine_var="\$YOCTOADT_TARGET_MACHINE_$1"
-target_machine=`eval echo $target_machine_var`
-sysroot_image_name="core-image-$target_sysroot_image-$target_machine.tar.bz2"
-    #echo_info "Extracting rootfs: $sysroot_image_name, using pseudo..."
-
-# sudo password might be needed to install the target sysroot
-SUDO=$(get_sudo_app $target_sysroot)
-
-$SUDO scripts/extract_rootfs $sysroot_image_name $target_sysroot $OECORE_NATIVE_SYSROOT $user_inst_type
-check_result
-}
-
-
-#Main part
-. scripts/data_define
-. scripts/util
-
-parse_config
-
-#secondly we will start to install native tools
-user_inst_type=$1
-install_native_sdk $user_inst_type
-check_result
-
-for arch_type in $YOCTOADT_TARGETS; do
-  install_target $arch_type
-  check_result
-done
-
-
diff --git a/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/data_define b/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/data_define
deleted file mode 100644
index cfd6716..0000000
--- a/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/data_define
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/bash
-
-# Yocto ADT Installer
-#
-# Copyright 2010-2011 by Intel Corp.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy 
-# of this software and associated documentation files (the "Software"), to deal 
-# in the Software without restriction, including without limitation the rights 
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-# copies of the Software, and to permit persons to whom the Software is 
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in 
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-# THE SOFTWARE.
-
-config_file="adt_installer.conf"
-source `pwd`/$config_file
-
-LOCAL_OPKG_LOC="./opkg/build/opkg"
-LOCAL_OPKG_FOLDER="./opkg/build"
-
-# List all supported root fs types and target types,
-# it will be used in user configuration validity checking
-YOCTOADT_SUPPORTED_ROOTFS="minimal minimal-dev sato sato-dev sato-sdk lsb lsb-dev lsb-sdk"
-YOCTOADT_SUPPORTED_TARGETS="x86 x86_64 arm ppc mips"
-# Different host (32 bit or 64 bit) will have different opkg
-# configuration files
-YOCTOADT_OPKG_CONF_FILE_32="./opkg/conf/opkg-sdk-i686.conf"
-YOCTOADT_OPKG_CONF_FILE_64="./opkg/conf/opkg-sdk-x86_64.conf"
diff --git a/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs b/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs
deleted file mode 100755
index d1a595b..0000000
--- a/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-
-# Yocto ADT Installer
-#
-# Copyright 2010-2011 by Intel Corp.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy 
-# of this software and associated documentation files (the "Software"), to deal 
-# in the Software without restriction, including without limitation the rights 
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-# copies of the Software, and to permit persons to whom the Software is 
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in 
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-# THE SOFTWARE.
-
-extract_rootfs()
-{
-
-  native_sysroot=$3
-  target_sysroot=$2
-  PSEUDO_COMMAND="$native_sysroot/usr/bin/pseudo"
-  TAR_OPTS="-xjf"
-  PSEUDO_OPTS="-P $native_sysroot/usr"
-
-
-  rm -rf $PSEUDO_LOCALSTATEDIR
-
-  if [ -d "$target_sysroot" ]; then
-    echo_info "\nTarget sysroot location: $target_sysroot, already exists! If you continue installation, this folder will be re-created."
-    confirm_install $4
-    rm -rf "$target_sysroot"
-  fi
-
-  if [ ! -d "$target_sysroot" ]; then
-    echo_info "Creating directory $target_sysroot..."
-    mkdir -p "$target_sysroot"
-  fi
-
-  pseudo_state_dir="$target_sysroot/../$(basename "$target_sysroot").pseudo_state"
-  mkdir -p "$pseudo_state_dir"
-  touch "$pseudo_state_dir/pseudo.pid"
-  PSEUDO_LOCALSTATEDIR="$pseudo_state_dir"
-  export PSEUDO_LOCALSTATEDIR
-
-  echo_info "Extracting rootfs: $1, using pseudo..."
-  $PSEUDO_COMMAND $PSEUDO_OPTS tar -C $2 "$TAR_OPTS" $LOCAL_DOWNLOAD/$1 &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-}
-
-#Main part
-. scripts/util
-
-#Parameter detail is listed below:
-#Param 4: Silent install or customize install
-#Param 3: OECORE_NATIVE_SYSROOT
-#Param 2: user defined rootfs extraction directory
-#param 1: sysroot image name
-extract_rootfs $1 $2 $3 $4
diff --git a/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/util b/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/util
deleted file mode 100644
index 9be7517..0000000
--- a/yocto-poky/meta/recipes-devtools/installer/adt-installer/scripts/util
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/bash
-
-# Yocto ADT Installer
-#
-# Copyright 2010-2011 by Intel Corp.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy 
-# of this software and associated documentation files (the "Software"), to deal 
-# in the Software without restriction, including without limitation the rights 
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-# copies of the Software, and to permit persons to whom the Software is 
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in 
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-# THE SOFTWARE.
-
-echo_info()
-{
-  echo -e $1 | tee -a $YOCTOADT_INSTALL_LOG_FILE
-}
-
-select_install_type()
-{
-# If choosing silent install, all older installation data will be
-# overriden without user's interaction
-while true; do
-  #echo_info "[ADT_INST] Silent install means overrides all existing older"
-  #echo_info "[ADT_INST] data and the installation needs least user interaction"
-  #echo_info "[ADT_INST] If you want to use silent installation, please enter S:"
-  #echo_info "[ADT_INST] If you want to customize installation, please enter C:"
-  #echo_info "[ADT_INST} If you want to exit current installation, please enter X:"
-  echo_info "There're two ways you can do installation: silent mode or interactive mode. To choose silent mode, which means you opt for the system to override the existing data under the specified installation directories without prompting for your confirmation.  Please be cautious with this selection which may trigger your losing data.  With the interactive mode, you have to closely monitor the installation process, since it will prompt you each step it needs to override some existing data.  To choose silent mode, please enter [S], for interactive mode, please enter [I] or [X] to exit the installation."
-  echo_info "[ADT_INST] Please enter your selections here:"
-  read YOCTOADT_SEL
-  YOCTOADT_SEL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_SEL"`
-  if [ "$YOCTOADT_SEL" == "S" ]; then
-    return "0"
-  elif [ "$YOCTOADT_SEL" == "I" ]; then
-    return "1"
-  elif [ "$YOCTOADT_SEL" == "X" ]; then
-    echo_info "\n############################################################"
-    echo_info "# User cancelled installation!"
-    echo_info "############################################################\n"
-    exit 1
-  fi
-done
-
-
-}
-
-confirm_install()
-{
-# below are prompt, make sure user still want to install even meet
-# some prompts
-
-#User likes to enjoy silent installation, we will not break his
-#installation process here
-if [ "$1" == "0" ]; then
-  return
-fi
-
-while true; do
-  echo_info "[ADT_INST] Do you want to continue installation? Please enter Y/N:"
-  read YOCTOADT_INSTALL
-  YOCTOADT_INSTALL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_INSTALL"`
-  if [ "$YOCTOADT_INSTALL" == "Y" ]; then
-    break
-  elif [ "$YOCTOADT_INSTALL" == "N" ]; then
-    echo_info "\n############################################################"
-    echo_info "# User cancelled installation!"
-    echo_info "############################################################\n"
-    exit 1
-  fi
-done
-}
-
-check_result()
-{
-  result=$?
-  if [ $result -eq 1 ]; then
-    exit -1
-  elif [  $result -ne 0 ]; then
-     echo_info "\n#############################################################################"
-     echo_info "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-     echo_info "#############################################################################\n"
-    exit -1
-  fi
-}
-
-# yocto adt installation log file
-YOCTOADT_INSTALL_LOG_FILE="adt_installer.log"
-# Temp folders holding qemu/rootfs downloaded images
-# It will be put into the installation folder
-LOCAL_DOWNLOAD="./download_image"
-
-
diff --git a/yocto-poky/meta/recipes-devtools/installer/adt-installer_1.0.bb b/yocto-poky/meta/recipes-devtools/installer/adt-installer_1.0.bb
deleted file mode 100644
index 4c2f097..0000000
--- a/yocto-poky/meta/recipes-devtools/installer/adt-installer_1.0.bb
+++ /dev/null
@@ -1,94 +0,0 @@
-# Yocto ADT Installer bb file
-#
-# Copyright 2010-2012 by Intel Corp.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy 
-# of this software and associated documentation files (the "Software"), to deal 
-# in the Software without restriction, including without limitation the rights 
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
-# copies of the Software, and to permit persons to whom the Software is 
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in 
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
-# THE SOFTWARE.
-
-
-SUMMARY = "Application Development Toolkit"
-DESCRIPTION = "Creates the Application Development Toolkit (ADT) installer tarball"
-HOMEPAGE = "http://www.yoctoproject.org/tools-resources/projects/application-development-toolkit-adt"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
-                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-LICENSE = "MIT"
-
-PACKAGES = ""
-INHIBIT_DEFAULT_DEPS = "1"
-
-PR = "r11"
-
-ADT_DEPLOY = "${DEPLOY_DIR}/sdk/"
-ADT_DIR = "${WORKDIR}/adt-installer/"
-S = "${WORKDIR}/opkg-${PV}"
-
-PV = "0.3.0"
-SRC_URI = "http://downloads.yoctoproject.org/releases/opkg/opkg-${PV}.tar.gz \
-           file://wget_cache.patch \
-           file://adt_installer \
-           file://scripts/adt_installer_internal \
-           file://scripts/util \
-           file://scripts/data_define \
-           file://scripts/extract_rootfs \
-           file://adt_installer.conf \
-           file://opkg/conf/opkg-sdk-x86_64.conf \
-           file://opkg/conf/opkg-sdk-i686.conf \
-	  "
-
-SRC_URI[md5sum] = "3412cdc71d78b98facc84b19331ec64e"
-SRC_URI[sha256sum] = "7f735d1cdb8ef3718fb0f9fba44ca0d9a5c90d3a7f014f37a6d2f9474f54988f"
-
-ADTREPO ?= "http://adtrepo.yoctoproject.org/${SDK_VERSION}"
-
-# This recipe makes no sense as a multilib
-MULTILIBS = ""
-
-do_populate_adt[umask] = "022"
-
-fakeroot do_populate_adt () {
-	cd ${WORKDIR}
-	mkdir -p ${ADT_DEPLOY}
-	rm -f ${ADT_DEPLOY}/adt_installer.tar.bz2
-	rm -rf ${ADT_DIR}
-	mkdir -p ${ADT_DIR}/opkg/build
-	cp -r opkg ${ADT_DIR}/
-	sed -i -e 's#ADTREPO_URL#${ADTREPO}#' ${ADT_DIR}/opkg/conf/*.conf
-	cp -r opkg-${PV} ${ADT_DIR}/opkg/build/
-	mv ${ADT_DIR}/opkg/build/opkg-${PV} ${ADT_DIR}/opkg/build/opkg-svn
-	rm -rf ${ADT_DIR}/opkg/build/opkg-svn/patches ${ADT_DIR}/opkg/build/opkg-svn/.pc
-	cp -r scripts ${ADT_DIR}/
-	cp adt_installer ${ADT_DIR}
-	cp adt_installer.conf ${ADT_DIR}
-	sed -i -e 's#ADTREPO#${ADTREPO}#' ${ADT_DIR}/adt_installer.conf
-	echo 'SDK_VENDOR=${SDK_VENDOR}' >> ${ADT_DIR}/scripts/data_define
-	echo 'DEFAULT_INSTALL_FOLDER=${SDKPATH}' >> ${ADT_DIR}/scripts/data_define
-	cp ${COREBASE}/scripts/relocate_sdk.py ${ADT_DIR}/scripts/
-	tar cfj adt_installer.tar.bz2 adt-installer
-	cp ${WORKDIR}/adt_installer.tar.bz2 ${ADT_DEPLOY}
-}
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_package[noexec] = "1"
-do_packagedata[noexec] = "1"
-do_package_write_ipk[noexec] = "1"
-do_package_write_rpm[noexec] = "1"
-do_package_write_deb[noexec] = "1"
-do_poplulate_sysroot[noexec] = "1"
-
-addtask populate_adt before do_build after do_install
diff --git a/yocto-poky/meta/recipes-devtools/installer/files/wget_cache.patch b/yocto-poky/meta/recipes-devtools/installer/files/wget_cache.patch
deleted file mode 100644
index 9117510..0000000
--- a/yocto-poky/meta/recipes-devtools/installer/files/wget_cache.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
----
- libopkg/opkg_download_wget.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libopkg/opkg_download_wget.c b/libopkg/opkg_download_wget.c
-index 9001493..18ef91e 100644
---- a/libopkg/opkg_download_wget.c
-+++ b/libopkg/opkg_download_wget.c
-@@ -50,6 +50,7 @@ int opkg_download_backend(const char *src, const char *dest,
- 
-     argv[i++] = "wget";
-     argv[i++] = "-q";
-+    argv[i++] = "--no-cache";
-     if (opkg_config->http_proxy || opkg_config->ftp_proxy) {
-         argv[i++] = "-Y";
-         argv[i++] = "on";
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/intltool/intltool.inc b/yocto-poky/meta/recipes-devtools/intltool/intltool.inc
index be77704..eb7ae00 100644
--- a/yocto-poky/meta/recipes-devtools/intltool/intltool.inc
+++ b/yocto-poky/meta/recipes-devtools/intltool/intltool.inc
@@ -4,6 +4,9 @@
 
 URLV="${@'.'.join(d.getVar('PV',1).split('.')[0:2])}"
 SRC_URI = "http://launchpad.net/${BPN}/trunk/${PV}/+download/${BP}.tar.gz"
+
+UPSTREAM_CHECK_URI = "https://launchpad.net/intltool/trunk/"
+
 S = "${WORKDIR}/intltool-${PV}"
 
 DEPENDS = "libxml-parser-perl-native"
diff --git a/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb b/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb
index cfef03d..1a5c394 100644
--- a/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb
+++ b/yocto-poky/meta/recipes-devtools/json-c/json-c_0.12.bb
@@ -11,6 +11,14 @@
 SRC_URI[md5sum] = "3ca4bbb881dfc4017e8021b5e0a8c491"
 SRC_URI[sha256sum] = "000c01b2b3f82dcb4261751eb71f1b084404fb7d6a282f06074d3c17078b9f3f"
 
+UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+).tar"
+# json-c releases page is fetching the list of releases in some weird XML format
+# from https://s3.amazonaws.com/json-c_releases and processes it with javascript :-/
+#UPSTREAM_CHECK_URI = "https://s3.amazonaws.com/json-c_releases/releases/index.html"
+RECIPE_UPSTREAM_VERSION = "0.12"
+RECIPE_UPSTREAM_DATE = "Apr 11, 2014"
+CHECK_DATE = "Dec 04, 2015"
+
 RPROVIDES_${PN} = "libjson"
 
 inherit autotools
diff --git a/yocto-poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc b/yocto-poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc
index de06ccb..f307a10 100644
--- a/yocto-poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc
+++ b/yocto-poky/meta/recipes-devtools/libtool/libtool-2.4.6.inc
@@ -35,6 +35,8 @@
 inherit autotools texinfo
 EXTRA_AUTORECONF = "--exclude=libtoolize"
 
+CACHED_CONFIGUREVARS += "ac_cv_path_GREP=grep"
+
 DEPENDS = "libtool-native"
 
 PACKAGES =+ "libltdl"
diff --git a/yocto-poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb b/yocto-poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
index 8478802..0204d34 100644
--- a/yocto-poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
+++ b/yocto-poky/meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb
@@ -16,7 +16,11 @@
 do_install () {
 	install -d ${D}${bindir_crossscripts}/
 	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
-	install -d ${D}${bindir_crossscripts}/
+	sed -e 's@^\(predep_objects="\).*@\1"@' \
+	    -e 's@^\(postdep_objects="\).*@\1"@' \
+	    -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
+	sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
+	sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
 	GREP='/bin/grep' SED='sed' ${S}/build-aux/inline-source libtoolize > ${D}${bindir_crossscripts}/libtoolize
 	chmod 0755 ${D}${bindir_crossscripts}/libtoolize
 	install -d ${D}${target_datadir}/libtool/build-aux/
diff --git a/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb b/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
index 45f1b2f..3851ec7 100644
--- a/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
+++ b/yocto-poky/meta/recipes-devtools/libtool/libtool_2.4.6.bb
@@ -10,6 +10,7 @@
 do_install_append () {
         sed -e 's@--sysroot=${STAGING_DIR_HOST}@@g' \
             -e 's@${STAGING_DIR_HOST}@@g' \
+            -e 's@${STAGING_DIR_NATIVE}@@g' \
             -e 's@^\(sys_lib_search_path_spec="\).*@\1${libdir} ${base_libdir}"@' \
             -e 's@^\(compiler_lib_search_dirs="\).*@\1${libdir} ${base_libdir}"@' \
             -e 's@^\(compiler_lib_search_path="\).*@\1${libdir} ${base_libdir}"@' \
diff --git a/yocto-poky/meta/recipes-devtools/m4/m4/make.patch b/yocto-poky/meta/recipes-devtools/m4/m4/make.patch
deleted file mode 100644
index 79fb415..0000000
--- a/yocto-poky/meta/recipes-devtools/m4/m4/make.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
---- m4-1.4.2/doc/Makefile.in~make
-+++ m4-1.4.2/doc/Makefile.in
-@@ -57,9 +57,9 @@
- 	date > $(srcdir)/stamp-vti
- 
- install: all
--	$(srcdir)/../mkinstalldirs $(infodir)
-+	$(srcdir)/../mkinstalldirs $(DESTDIR)$(infodir)
- 	cd $(srcdir) && for file in m4.info*; do \
--	  $(INSTALL_DATA) $$file $(infodir)/$$file; \
-+	  $(INSTALL_DATA) $$file $(DESTDIR)$(infodir)/$$file; \
- 	done
- 
- uninstall:
---- m4-1.4.2/src/Makefile.in~make
-+++ m4-1.4.2/src/Makefile.in
-@@ -35,7 +35,7 @@
- prefix = @prefix@
- exec_prefix = @exec_prefix@
- transform = @program_transform_name@
--bindir = $(exec_prefix)/bin
-+bindir = @bindir@
- 
- COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
- LINK = $(CC) $(LDFLAGS) -o $@
-@@ -84,8 +84,8 @@
- 	$(LINK) ansi2knr.o $(LIBS)
- 
- install: all
--	$(srcdir)/../mkinstalldirs $(bindir)
--	$(INSTALL_PROGRAM) m4 $(bindir)/`echo m4 | sed '$(transform)'`
-+	$(srcdir)/../mkinstalldirs $(DESTDIR)$(bindir)
-+	$(INSTALL_PROGRAM) m4 $(DESTDIR)$(bindir)/`echo m4 | sed '$(transform)'`
- 
- uninstall:
- 	rm -f $(bindir)/`echo m4 | sed '$(transform)'`
diff --git a/yocto-poky/meta/recipes-devtools/make/make-4.1/0001-main.c-main-SV-43434-Handle-NULL-returns-from-ttynam.patch b/yocto-poky/meta/recipes-devtools/make/make-4.1/0001-main.c-main-SV-43434-Handle-NULL-returns-from-ttynam.patch
new file mode 100644
index 0000000..7a5f4ba
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/make/make-4.1/0001-main.c-main-SV-43434-Handle-NULL-returns-from-ttynam.patch
@@ -0,0 +1,63 @@
+From 292da6f6867b75a5af7ddbb639a1feae022f438f Mon Sep 17 00:00:00 2001
+From: Paul Smith <psmith@gnu.org>
+Date: Mon, 20 Oct 2014 01:54:56 -0400
+Subject: [PATCH] * main.c (main): [SV 43434] Handle NULL returns from
+ ttyname().
+
+Upstream-Status: Backport
+
+From: http://git.savannah.gnu.org/cgit/make.git/commit/?id=292da6f6867b75a5af7ddbb639a1feae022f438f
+
+---
+ main.c    | 15 ++++++++++-----
+ makeint.h |  3 ++-
+ 2 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/main.c b/main.c
+index b2d169c..0cdb8a8 100644
+--- a/main.c
++++ b/main.c
+@@ -1429,13 +1429,18 @@ main (int argc, char **argv, char **envp)
+ #ifdef HAVE_ISATTY
+     if (isatty (fileno (stdout)))
+       if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMOUT")))
+-        define_variable_cname ("MAKE_TERMOUT", TTYNAME (fileno (stdout)),
+-                               o_default, 0)->export = v_export;
+-
++        {
++          const char *tty = TTYNAME (fileno (stdout));
++          define_variable_cname ("MAKE_TERMOUT", tty ? tty : DEFAULT_TTYNAME,
++                                 o_default, 0)->export = v_export;
++        }
+     if (isatty (fileno (stderr)))
+       if (! lookup_variable (STRING_SIZE_TUPLE ("MAKE_TERMERR")))
+-        define_variable_cname ("MAKE_TERMERR", TTYNAME (fileno (stderr)),
+-                               o_default, 0)->export = v_export;
++        {
++          const char *tty = TTYNAME (fileno (stderr));
++          define_variable_cname ("MAKE_TERMERR", tty ? tty : DEFAULT_TTYNAME,
++                                 o_default, 0)->export = v_export;
++        }
+ #endif
+ 
+   /* Reset in case the switches changed our minds.  */
+diff --git a/makeint.h b/makeint.h
+index 6223936..2009f41 100644
+--- a/makeint.h
++++ b/makeint.h
+@@ -436,10 +436,11 @@ extern struct rlimit stack_limit;
+ /* The number of bytes needed to represent the largest integer as a string.  */
+ #define INTSTR_LENGTH         CSTRLEN ("18446744073709551616")
+ 
++#define DEFAULT_TTYNAME "true"
+ #ifdef HAVE_TTYNAME
+ # define TTYNAME(_f) ttyname (_f)
+ #else
+-# define TTYNAME(_f) "true"
++# define TTYNAME(_f) DEFAULT_TTYNAME
+ #endif
+ 
+ 
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/make/make.inc b/yocto-poky/meta/recipes-devtools/make/make.inc
index 57ea605..849b742 100644
--- a/yocto-poky/meta/recipes-devtools/make/make.inc
+++ b/yocto-poky/meta/recipes-devtools/make/make.inc
@@ -8,3 +8,5 @@
 SRC_URI = "${GNU_MIRROR}/make/make-${PV}.tar.bz2"
 
 inherit autotools gettext pkgconfig texinfo
+
+PROVIDES = "virtual/make"
diff --git a/yocto-poky/meta/recipes-devtools/make/make_4.1.bb b/yocto-poky/meta/recipes-devtools/make/make_4.1.bb
index a1b0d7c..78fe0b5 100644
--- a/yocto-poky/meta/recipes-devtools/make/make_4.1.bb
+++ b/yocto-poky/meta/recipes-devtools/make/make_4.1.bb
@@ -4,6 +4,8 @@
                     file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
 require make.inc
 
+SRC_URI += "file://0001-main.c-main-SV-43434-Handle-NULL-returns-from-ttynam.patch"
+
 EXTRA_OECONF += "--without-guile"
 
 SRC_URI[md5sum] = "57a7a224a822f94789a587ccbcedff69"
diff --git a/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
index e1c33a6..92435cd 100644
--- a/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ b/yocto-poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
@@ -14,8 +14,10 @@
 
 SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
            file://cross-compile.patch   \
-           file://fix-makefile-to-find-libz.patch   \
           "
+SRC_URI_append_class-native = " \
+           file://fix-makefile-to-find-libz.patch   \
+"
 
 CLEANBROKEN = "1"
 
diff --git a/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc.h-don-t-include-asm-generic-int-ll64.h.patch b/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc.h-don-t-include-asm-generic-int-ll64.h.patch
deleted file mode 100644
index 1724de5..0000000
--- a/yocto-poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc.h-don-t-include-asm-generic-int-ll64.h.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Upstream-Status: Pending
-
-mmc.h: don't include <asm-generic/int-ll64.h>
-
-Including this file causes a compile failure for qemumips64.
-This file is not needed to be explicitly included, because it will be
-included by the <linux/mmc/ioctl.h> file if _MIPS_SZLONG is not 64.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- mmc.h |    1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/mmc.h b/mmc.h
-index 9871d62..3df2cdf 100644
---- a/mmc.h
-+++ b/mmc.h
-@@ -14,7 +14,6 @@
-  * Boston, MA 021110-1307, USA.
-  */
- 
--#include <asm-generic/int-ll64.h>
- #include <linux/mmc/ioctl.h>
- #include <stdio.h>
- 
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb b/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
index 546f7f2..64b8910 100644
--- a/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
+++ b/yocto-poky/meta/recipes-devtools/mmc/mmc-utils_git.bb
@@ -1,21 +1,20 @@
-DESCRIPTION = "Userspace tools for MMC/SD devices"
+SUMMARY = "Userspace tools for MMC/SD devices"
 HOMEPAGE = "http://git.kernel.org/cgit/linux/kernel/git/cjb/mmc-utils.git/"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://mmc.c;beginline=1;endline=17;md5=d7747fc87f1eb22b946ef819969503f0"
 
 SRCBRANCH ?= "master"
-SRCREV = "f4eb241519f8d500ce6068a70d2389be39ac5189"
+SRCREV = "44f94b925894577f9ffcf2c418dd013a5e582648"
 
 PV = "0.1"
 
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH} \
-           file://0001-mmc.h-don-t-include-asm-generic-int-ll64.h.patch"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;branch=${SRCBRANCH}"
 
 S = "${WORKDIR}/git"
 
-do_configure_prepend() {
-    sed -i "s:-Werror::g" ${S}/Makefile
-}
+CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mips64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mips64n32 = " -D__SANE_USERSPACE_TYPES__"
 
 do_install() {
     install -d ${D}${bindir}
diff --git a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
new file mode 100644
index 0000000..305be52
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-Fix-build-with-musl.patch
@@ -0,0 +1,29 @@
+From e16fa28bc57c29923ab60af2ac343da83e1992d8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 6 Oct 2015 23:51:34 +0000
+Subject: [PATCH] Fix build with musl
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ mkfs.jffs2.c  | 44 ++++++++++++++++++++++++++++++++++++++++++--
+ recv_image.c  |  1 -
+ serve_image.c |  1 -
+ 3 files changed, 42 insertions(+), 4 deletions(-)
+
+diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
+index f09c0b2..ed2dc43 100644
+--- a/mkfs.jffs2.c
++++ b/mkfs.jffs2.c
+@@ -72,6 +72,7 @@
+ #include <byteswap.h>
+ #include <crc32.h>
+ #include <inttypes.h>
++#include <limits.h>
+ 
+ #include "rbtree.h"
+ #include "common.h"
+-- 
+2.6.1
+
diff --git a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
deleted file mode 100644
index 2d36158..0000000
--- a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From b856ff35c20124ceae40bbc4d32584df47618c96 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 25 Feb 2015 09:28:26 +0000
-Subject: [PATCH] hashtable: Remove duplicate hashtable_iterator_value/hashtable_iterator_key
-
-gcc5 is defaulting to gnu11 instead of gnu89 like previous versions
-as a result the semantics of 'extern inline' changes where in gnu89 for 'extern inline' no external
-visible function is generated,in c99 'external inline' generates externally visible function
-there is no equivalent in c99+ because redefinitions arent allowed
-but 'static inline' remains same for for c89 and c99+, thats why we change the semantics
-so we make the functions static inline, and achieve the same effect
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: pending
-
----
- mkfs.ubifs/hashtable/hashtable_itr.c | 12 ------------
- 1 file changed, 12 deletions(-)
-
-Index: git/mkfs.ubifs/hashtable/hashtable_itr.h
-===================================================================
---- git.orig/mkfs.ubifs/hashtable/hashtable_itr.h
-+++ git/mkfs.ubifs/hashtable/hashtable_itr.h
-@@ -28,7 +28,7 @@ hashtable_iterator(struct hashtable *h);
- /* hashtable_iterator_key
-  * - return the value of the (key,value) pair at the current position */
- 
--extern inline void *
-+static inline void *
- hashtable_iterator_key(struct hashtable_itr *i)
- {
-     return i->e->k;
-@@ -37,7 +37,7 @@ hashtable_iterator_key(struct hashtable_
- /*****************************************************************************/
- /* value - return the value of the (key,value) pair at the current position */
- 
--extern inline void *
-+static inline void *
- hashtable_iterator_value(struct hashtable_itr *i)
- {
-     return i->e->v;
-Index: git/mkfs.ubifs/hashtable/hashtable_itr.c
-===================================================================
---- git.orig/mkfs.ubifs/hashtable/hashtable_itr.c
-+++ git/mkfs.ubifs/hashtable/hashtable_itr.c
-@@ -35,18 +35,6 @@ hashtable_iterator(struct hashtable *h)
- }
- 
- /*****************************************************************************/
--/* key      - return the key of the (key,value) pair at the current position */
--/* value    - return the value of the (key,value) pair at the current position */
--
--void *
--hashtable_iterator_key(struct hashtable_itr *i)
--{ return i->e->k; }
--
--void *
--hashtable_iterator_value(struct hashtable_itr *i)
--{ return i->e->v; }
--
--/*****************************************************************************/
- /* advance - advance the iterator to the next element
-  *           returns zero if advanced to end of table */
- 
diff --git a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
new file mode 100644
index 0000000..7d783e7
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
@@ -0,0 +1,24 @@
+Replace rpmatch() usage with checking first character of line
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- a/include/common.h
++++ b/include/common.h
+@@ -122,10 +122,12 @@
+ 		}
+ 
+ 		if (strcmp("\n", line) != 0) {
+-			switch (rpmatch(line)) {
+-			case 0: ret = false; break;
+-			case 1: ret = true; break;
+-			case -1:
++			switch (line[0]) {
++			case 'N':
++			case 'n': ret = false; break;
++			case 'Y':
++			case 'y': ret = true; break;
++			default:
+ 				puts("unknown response; please try again");
+ 				continue;
+ 			}
diff --git a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 17dca77..cd9ae06 100644
--- a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -7,16 +7,18 @@
 
 DEPENDS = "zlib lzo e2fsprogs util-linux"
 
-PV = "1.5.1+git${SRCPV}"
+PV = "1.5.2"
 
-SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
+SRCREV = "aea36417067dade75192bafa03af70b6eb2677b1"
 SRC_URI = "git://git.infradead.org/mtd-utils.git \
            file://add-exclusion-to-mkfs-jffs2-git-2.patch \
            file://fix-armv7-neon-alignment.patch \
-           file://0001-hashtable-Remove-duplicate-hashtable_iterator_value-.patch \
            file://mtd-utils-fix-corrupt-cleanmarker-with-flash_erase--j-command.patch \
+           file://0001-Fix-build-with-musl.patch \
 "
 
+SRC_URI_append_libc-musl = " file://010-fix-rpmatch.patch "
+
 S = "${WORKDIR}/git/"
 
 # xattr support creates an additional compile-time dependency on acl because
diff --git a/yocto-poky/meta/recipes-devtools/mtools/mtools_3.9.9.bb b/yocto-poky/meta/recipes-devtools/mtools/mtools_3.9.9.bb
index c284a71..3423917 100644
--- a/yocto-poky/meta/recipes-devtools/mtools/mtools_3.9.9.bb
+++ b/yocto-poky/meta/recipes-devtools/mtools/mtools_3.9.9.bb
@@ -1,16 +1,15 @@
-# mtools OE build file
-# Copyright (C) 2004-2006, Advanced Micro Devices, Inc.  All Rights Reserved
-# Released under the MIT license (see packages/COPYING)
-
 SUMMARY = "Utilities to access MS-DOS disks without mounting them"
-DESCRIPTION = "Mtools is a collection of utilities for accessing MS-DOS disks from Unix without mounting them."
+DESCRIPTION = "Mtools is a collection of utilities to access MS-DOS disks from GNU and Unix without mounting them."
 HOMEPAGE = "http://www.gnu.org/software/mtools/"
+SECTION = "optional"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=92b58ec77696788ce278b044d2a8e9d3"
 PR = "r6"
 
-RDEPENDS_${PN} = "glibc-gconv-ibm850"
-RRECOMMENDS_${PN} = "\
+DEPENDS += "virtual/libiconv"
+
+RDEPENDS_${PN}_libc-glibc = "glibc-gconv-ibm850"
+RRECOMMENDS_${PN}_libc-glibc = "\
 	glibc-gconv-ibm437 \
 	glibc-gconv-ibm737 \
 	glibc-gconv-ibm775 \
@@ -26,24 +25,22 @@
 	glibc-gconv-ibm866 \
 	glibc-gconv-ibm869 \
 	"
-
-#http://mtools.linux.lu/mtools-${PV}.tar.gz 
-SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/mtools-${PV}.tar.gz \
-	file://mtools-makeinfo.patch \
-	file://mtools.patch \
-	file://no-x11.patch \
-	file://fix-broken-lz.patch \
-"
-
 SRC_URI[md5sum] = "3e68b857b4e1f3a6521d1dfefbd30a36"
 SRC_URI[sha256sum] = "af083a73425d664d4607ef6c6564fd9319a0e47ee7c105259a45356cb834690e"
 
-S = "${WORKDIR}/mtools-${PV}"
+#http://mtools.linux.lu/mtools-${PV}.tar.gz 
+SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/mtools-${PV}.tar.gz \
+           file://mtools-makeinfo.patch \
+           file://mtools.patch \
+           file://no-x11.patch \
+           file://fix-broken-lz.patch"
 
 inherit autotools texinfo
 
 EXTRA_OECONF = "--without-x"
 
+LDFLAGS_append_libc-uclibc = " -liconv "
+
 BBCLASSEXTEND = "native nativesdk"
 
 PACKAGECONFIG ??= ""
diff --git a/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb b/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb
index 24c9d49..efde547 100644
--- a/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb
+++ b/yocto-poky/meta/recipes-devtools/mtools/mtools_4.0.18.bb
@@ -5,9 +5,10 @@
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
+DEPENDS += "virtual/libiconv"
 
-RDEPENDS_${PN} = "glibc-gconv-ibm850"
-RRECOMMENDS_${PN} = "\
+RDEPENDS_${PN}_libc-glibc = "glibc-gconv-ibm850"
+RRECOMMENDS_${PN}_libc-glibc = "\
 	glibc-gconv-ibm437 \
 	glibc-gconv-ibm737 \
 	glibc-gconv-ibm775 \
@@ -35,6 +36,8 @@
 
 EXTRA_OECONF = "--without-x"
 
+LDFLAGS_append_libc-uclibc = " -liconv "
+
 BBCLASSEXTEND = "native nativesdk"
 
 PACKAGECONFIG ??= ""
@@ -45,8 +48,3 @@
     mkdir -p ${D}/${bindir}
     mkdir -p ${D}/${datadir}
 }
-
-do_install_append_class-native () {
-    create_wrapper ${D}${bindir}/mcopy \
-        GCONV_PATH=${libdir}/gconv
-}
diff --git a/yocto-poky/meta/recipes-devtools/openjade/openjade-1.3.2/no-libtool.patch b/yocto-poky/meta/recipes-devtools/openjade/openjade-1.3.2/no-libtool.patch
new file mode 100644
index 0000000..2f57c00
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/openjade/openjade-1.3.2/no-libtool.patch
@@ -0,0 +1,20 @@
+The openjade build is fairly unique in auto-generating explicit dependencies to
+installed .la files.  As some distributions may delete these files unless
+clearly required, change the Makefile fragment to depend on the .so instead.
+
+Patch originally by Phil Blundell <philb@brightsign.biz>.
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Upstream-Status: Inappropriate
+
+--- openjade-1.3.2/Makefile.prog.in~	2013-05-14 11:42:02.646782318 +0100
++++ openjade-1.3.2/Makefile.prog.in	2013-05-14 11:54:55.051728343 +0100
+@@ -12,7 +12,7 @@
+ 
+ ALL_LIBS = $(XLIBS) $(LIBS)
+ Makefile.lt:
+-	echo 'LT_LIBS='`echo $(ALL_LIBS) | sed 's/\.a\s/\.la /g' | sed s/\.a$$/\.la/` > Makefile.lt
++	echo 'LT_LIBS='`for d in $(ALL_LIBS); do case $$d in ../*) echo $$d | sed s/\.a$$/.la/g ;; *) echo $$d | sed s/\.a$$/.so/g ;; esac ; done` >Makefile.lt
+ 
+ PROG:=$(shell echo "$(PROG)" | sed '@program_transform_name@')
+ 
diff --git a/yocto-poky/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb b/yocto-poky/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
index fa7aa62..bc25008 100644
--- a/yocto-poky/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
+++ b/yocto-poky/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
@@ -17,13 +17,20 @@
            file://msggen.pl.patch \
            file://reautoconf.patch \
 	   file://user-declared-default-constructor.patch \
-           file://fix-regex.patch"
+           file://fix-regex.patch \
+	   file://no-libtool.patch"
 
 SRC_URI[md5sum] = "7df692e3186109cc00db6825b777201e"
 SRC_URI[sha256sum] = "1d2d7996cc94f9b87d0c51cf0e028070ac177c4123ecbfd7ac1cb8d0b7d322d1"
 
+UPSTREAM_CHECK_URI = "http://openjade.sourceforge.net/download.html"
+
 inherit autotools-brokensep native
 
+# Statically link local libs to avoid gold link issue [YOCTO #2972]
+PACKAGECONFIG ?= "static-only-libs"
+PACKAGECONFIG[static-only-libs] = "--enable-static --disable-shared,--enable-static --enable-shared,,"
+
 EXTRA_OECONF = "--enable-spincludedir=${STAGING_INCDIR}/OpenSP \
                 --enable-splibdir=${STAGING_LIBDIR}"
 
@@ -57,14 +64,20 @@
 do_install() {
 	# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/openjade.html
 	# for details.
-	install -d ${D}${bindir}	
-	install -m 0755 ${S}/jade/.libs/openjade ${D}${bindir}/openjade
+	install -d ${D}${bindir} ${D}${libdir}
+	if ${@bb.utils.contains('PACKAGECONFIG', 'static-only-libs', 'true', 'false', d)}; then
+		install -m 0755 jade/openjade ${D}${bindir}/openjade
+		oe_libinstall -a -C style libostyle ${D}${libdir}
+		oe_libinstall -a -C spgrove libospgrove ${D}${libdir}
+		oe_libinstall -a -C grove libogrove ${D}${libdir}
+	else
+		install -m 0755 jade/.libs/openjade ${D}${bindir}/openjade
+		oe_libinstall -a -so -C style libostyle ${D}${libdir}
+		oe_libinstall -a -so -C spgrove libospgrove ${D}${libdir}
+		oe_libinstall -a -so -C grove libogrove ${D}${libdir}
+	fi
 	ln -sf openjade ${D}${bindir}/jade
 
-	oe_libinstall -a -so -C style libostyle ${D}${libdir}
-	oe_libinstall -a -so -C spgrove libospgrove ${D}${libdir}
-	oe_libinstall -a -so -C grove libogrove ${D}${libdir}
-
 	install -d ${D}${datadir}/sgml/openjade-${PV}
 	install -m 644 dsssl/catalog ${D}${datadir}/sgml/openjade-${PV}
 	install -m 644 dsssl/*.dtd ${D}${datadir}/sgml/openjade-${PV}
diff --git a/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-re-do-find-ls-code-to-not-fail-on-filenam.patch b/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-re-do-find-ls-code-to-not-fail-on-filenam.patch
new file mode 100644
index 0000000..5cbb55a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-re-do-find-ls-code-to-not-fail-on-filenam.patch
@@ -0,0 +1,56 @@
+From 8e424296ce2af4a5a7392c38a31f8723f9b9fbda Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <denys@ti.com>
+Date: Thu, 7 Apr 2016 20:43:13 -0400
+Subject: [PATCH] opkg-build: re-do find/ls code to not fail on filenames with
+ spaces
+
+Signed-off-by: Denys Dmytriyenko <denys@ti.com>
+---
+ opkg-build | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index a9ccad2..07305b2 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -6,7 +6,6 @@
+ # 2003-04-25 rea@sr.unh.edu
+ #   Updated to work on Familiar Pre0.7rc1, with busybox tar.
+ #   Note it Requires: binutils-ar (since the busybox ar can't create)
+-#   For UID debugging it needs a better "find".
+ set -e
+ 
+ version=1.0
+@@ -47,12 +46,12 @@ pkg_appears_sane() {
+ 
+ 	PKG_ERROR=0
+ 
+-	tilde_files=`find . -name '*~'`
++	tilde_files=`find . -name '*~' -ls -printf '\\\n'`
+ 	if [ -n "$tilde_files" ]; then
+ 	    if [ "$noclean" = "1" ]; then
+ 		echo "*** Warning: The following files have names ending in '~'.
+ You probably want to remove them: " >&2
+-		ls -ld $tilde_files
++		echo -e $tilde_files
+ 		if [ $? -ne 0 ]; then
+ 			echo "*** Error: Fail to list files have names ending in '~'."
+ 			exit 1
+@@ -64,12 +63,12 @@ You probably want to remove them: " >&2
+ 	    fi
+ 	fi
+ 
+-	large_uid_files=`find . -uid +99 || true`
++	large_uid_files=`find . -uid +99 -ls -printf '\\\n' || true`
+ 
+ 	if [ "$ogargs" = "" ]  && [ -n "$large_uid_files" ]; then
+ 		echo "*** Warning: The following files have a UID greater than 99.
+ You probably want to chown these to a system user: " >&2
+-		ls -ld $large_uid_files
++		echo -e $large_uid_files
+ 		if [ $? -ne 0 ]; then
+ 			echo "*** Error: Fail to list files have a UID greater than 99."
+ 			exit 1
+-- 
+2.2.0
+
diff --git a/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch b/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch
new file mode 100644
index 0000000..6c66902
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils/opkg-build-Exit-when-fail-to-list-files.patch
@@ -0,0 +1,45 @@
+We have an issue when ls segfaults in some cases [1] so it's
+better to detect the failure at this level instead of continue
+the build process.
+
+[YOCTO #8926]
+
+Upstream-Status: Submitted [2]
+
+[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8926#c0
+[2] https://groups.google.com/forum/#!topic/opkg-devel/cmX02bgHZms
+
+Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
+---
+ opkg-build | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/opkg-build b/opkg-build
+index 98008b6..a9ccad2 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -53,6 +53,10 @@ pkg_appears_sane() {
+ 		echo "*** Warning: The following files have names ending in '~'.
+ You probably want to remove them: " >&2
+ 		ls -ld $tilde_files
++		if [ $? -ne 0 ]; then
++			echo "*** Error: Fail to list files have names ending in '~'."
++			exit 1
++		fi
+ 		echo >&2
+ 	    else
+ 		echo "*** Removing the following files: $tilde_files"
+@@ -66,6 +70,10 @@ You probably want to remove them: " >&2
+ 		echo "*** Warning: The following files have a UID greater than 99.
+ You probably want to chown these to a system user: " >&2
+ 		ls -ld $large_uid_files
++		if [ $? -ne 0 ]; then
++			echo "*** Error: Fail to list files have a UID greater than 99."
++			exit 1
++		fi
+ 		echo >&2
+ 	fi
+ 	    
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb b/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
index 5f518d2..8873b28 100644
--- a/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
+++ b/yocto-poky/meta/recipes-devtools/opkg-utils/opkg-utils_git.bb
@@ -5,13 +5,14 @@
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
                     file://opkg.py;beginline=1;endline=18;md5=15917491ad6bf7acc666ca5f7cc1e083"
-PROVIDES += "virtual/update-alternatives"
+PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtual/update-alternatives', '', d)}"
 
 SRCREV = "53274f087565fd45d8452c5367997ba6a682a37a"
 PV = "0.1.8+git${SRCPV}"
 
-SRC_URI = "git://git.yoctoproject.org/opkg-utils"
-
+SRC_URI = "git://git.yoctoproject.org/opkg-utils \
+           file://opkg-build-Exit-when-fail-to-list-files.patch \
+           file://0001-opkg-build-re-do-find-ls-code-to-not-fail-on-filenam.patch"
 SRC_URI_append_class-native = " file://tar_ignore_error.patch"
 
 S = "${WORKDIR}/git"
@@ -21,15 +22,21 @@
 PYTHONRDEPS = "python python-shell python-io python-math python-crypt python-logging python-fcntl python-subprocess python-pickle python-compression python-textutils python-stringold"
 PYTHONRDEPS_class-native = ""
 
-PACKAGECONFIG = "python"
+PACKAGECONFIG = "python update-alternatives"
 PACKAGECONFIG[python] = ",,,${PYTHONRDEPS}"
+PACKAGECONFIG[update-alternatives] = ",,,"
 
 do_install() {
 	oe_runmake PREFIX=${prefix} DESTDIR=${D} install
+	if ! ${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'true', 'false', d)}; then
+		rm -f "${D}${bindir}/update-alternatives"
+	fi
 }
 
 do_install_append_class-target() {
-	sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${libdir},g'
+	if [ -e "${D}${bindir}/update-alternatives" ]; then
+		sed -i ${D}${bindir}/update-alternatives -e 's,/usr/bin,${bindir},g; s,/usr/lib,${nonarch_libdir},g'
+	fi
 }
 
 PACKAGES =+ "update-alternatives-opkg"
diff --git a/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-configure.ac-use-pkg-config-for-libsolv.patch b/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-configure.ac-use-pkg-config-for-libsolv.patch
new file mode 100644
index 0000000..e67ec74
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-configure.ac-use-pkg-config-for-libsolv.patch
@@ -0,0 +1,36 @@
+From 2a43027f7ecf2bb3ce73f95bcf575c56bc495d07 Mon Sep 17 00:00:00 2001
+From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Date: Wed, 9 Dec 2015 17:38:05 -0600
+Subject: [PATCH] configure.ac: use pkg-config for libsolv
+
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+ configure.ac | 12 +-----------
+ 1 file changed, 1 insertion(+), 11 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 52e1025..d17dc5c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -159,17 +159,7 @@ if test "x$want_solver" != "xno"; then
+                  AC_MSG_ERROR(Specify which solver with --enable-solver=<SOLVER>)],
+             [libsolv],
+                 [AC_MSG_RESULT(libsolv)
+-
+-                SOLVER_CFLAGS="-I/usr/local/include/"
+-                SOLVER_LIBS="-lsolv -lsolvext"
+-                AC_CHECK_LIB([solv],
+-                             [solver_solve],
+-                             [],
+-                             [AC_MSG_ERROR(libsolv not found)])
+-                dnl TODO: remove previous 6 lines and uncomment line below to use
+-                dnl pkg-config once there is a release of libsolv with pkg-config:
+-                dnl PKG_CHECK_MODULES(SOLVER, libsolv)
+-
++                PKG_CHECK_MODULES(SOLVER, libsolv)
+                 AC_DEFINE(HAVE_SOLVER_LIBSOLV,1,[Define if you want to use libsolv])],
+             # default
+             [AC_MSG_RESULT(no)
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch b/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch
deleted file mode 100644
index acc1338..0000000
--- a/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 58f4d3d63cd6097154205ea7ee042005036659b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Thu, 10 Sep 2015 21:43:32 -0700
-Subject: [PATCH] libopkg: include stdio.h for getting FILE defined
-To: opkg-devel@googlegroups.com
-Cc: paul@paulbarker.me.uk
-
-For some libc(musl) stdio.h may not get included indirectly which means
-we need to mention it in explicit include list
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- libopkg/opkg_verify.c | 1 +
- libopkg/pkg_src.c     | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/libopkg/opkg_verify.c b/libopkg/opkg_verify.c
-index 41dc3f4..a71591d 100644
---- a/libopkg/opkg_verify.c
-+++ b/libopkg/opkg_verify.c
-@@ -18,6 +18,7 @@
- 
- #include <malloc.h>
- #include <string.h>
-+#include <stdio.h>
- 
- #include "file_util.h"
- #include "opkg_conf.h"
-diff --git a/libopkg/pkg_src.c b/libopkg/pkg_src.c
-index e31ec21..6b49a00 100644
---- a/libopkg/pkg_src.c
-+++ b/libopkg/pkg_src.c
-@@ -20,6 +20,7 @@
- 
- #include <malloc.h>
- #include <unistd.h>
-+#include <stdio.h>
- 
- #include "file_util.h"
- #include "opkg_conf.h"
--- 
-2.5.1
-
diff --git a/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-libsolv_solver_set_arch_policy-use-correct-logic-dur.patch b/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-libsolv_solver_set_arch_policy-use-correct-logic-dur.patch
new file mode 100644
index 0000000..1ab1790
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-libsolv_solver_set_arch_policy-use-correct-logic-dur.patch
@@ -0,0 +1,35 @@
+From 3e562bed7dced25eb3e9174ca9395324b6c873c1 Mon Sep 17 00:00:00 2001
+From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+Date: Wed, 9 Dec 2015 13:36:14 -0600
+Subject: [PATCH] libsolv_solver_set_arch_policy: use correct logic during
+ archs resizing
+
+If there are more than INITIAL_ARCH_LIST_SIZE archs defined in the
+configuration, libsolv_solver_set_arch_policy crashes due to flawed
+logic when resizing the archs array.
+
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+ libopkg/opkg_solver_libsolv.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/libopkg/opkg_solver_libsolv.c b/libopkg/opkg_solver_libsolv.c
+index 1cdcf1f..b5af0fa 100644
+--- a/libopkg/opkg_solver_libsolv.c
++++ b/libopkg/opkg_solver_libsolv.c
+@@ -66,8 +66,10 @@ static void libsolv_solver_set_arch_policy(libsolv_solver_t *libsolv_solver)
+     nv_pair_list_elt_t *arch_info;
+ 
+     list_for_each_entry(arch_info, &opkg_config->arch_list.head, node) {
+-        if (arch_count > arch_list_size)
+-            archs = xrealloc(archs, arch_list_size *= 2);
++        if (arch_count >= arch_list_size) {
++            arch_list_size *= 2;
++            archs = xrealloc(archs, arch_list_size * sizeof(arch_data_t));
++        }
+ 
+         archs[arch_count].arch = ((nv_pair_t *)(arch_info->data))->name;
+         archs[arch_count].priority = atoi(((nv_pair_t *)
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-opkg_archive-add-support-for-empty-compressed-files.patch b/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-opkg_archive-add-support-for-empty-compressed-files.patch
deleted file mode 100644
index dabd196..0000000
--- a/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-opkg_archive-add-support-for-empty-compressed-files.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From bd32bb8646459508bb0b0ce54a14bd6fe0e19b75 Mon Sep 17 00:00:00 2001
-From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-Date: Thu, 27 Aug 2015 15:52:16 -0500
-Subject: [PATCH] opkg_archive: add support for empty compressed files
-
-Regression from 0.2.x: opkg used to support empty Package.gz files.
-
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-
-Upstream-Status: Accepted
----
- libopkg/opkg_archive.c | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c
-index be903e4..7e91e48 100644
---- a/libopkg/opkg_archive.c
-+++ b/libopkg/opkg_archive.c
-@@ -121,6 +121,9 @@ static int copy_to_stream(struct archive *a, FILE * stream)
-     int eof;
-     size_t len = EXTRACT_BUFFER_LEN;
- 
-+    if (archive_format(a) == ARCHIVE_FORMAT_EMPTY)
-+        return 0;
-+
-     buffer = xmalloc(len);
- 
-     while (1) {
-@@ -654,6 +657,13 @@ static struct archive *open_compressed_file(const char *filename)
-         goto err_cleanup;
-     }
- 
-+    r = archive_read_support_format_empty(ar);
-+    if (r != ARCHIVE_OK) {
-+        opkg_msg(ERROR, "Empty format not supported: %s\n",
-+                 archive_error_string(ar));
-+        goto err_cleanup;
-+    }
-+
-     /* Open input file and prepare for reading. */
-     r = archive_read_open_filename(ar, filename, EXTRACT_BUFFER_LEN);
-     if (r != ARCHIVE_OK) {
-@@ -723,6 +733,7 @@ struct opkg_ar *ar_open_compressed_file(const char *filename)
- {
-     struct opkg_ar *ar;
-     struct archive_entry *entry;
-+    int eof;
- 
-     ar = (struct opkg_ar *)xmalloc(sizeof(struct opkg_ar));
- 
-@@ -737,8 +748,8 @@ struct opkg_ar *ar_open_compressed_file(const char *filename)
-      * header. We skip over this header here so that the caller doesn't need
-      * to know about it.
-      */
--    entry = read_header(ar->ar, NULL);
--    if (!entry)
-+    entry = read_header(ar->ar, &eof);
-+    if (!entry && !eof)
-         goto err_cleanup;
- 
-     return ar;
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-string_util-New-file-with-bin_to_hex-function.patch b/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-string_util-New-file-with-bin_to_hex-function.patch
deleted file mode 100644
index fb3ac46..0000000
--- a/yocto-poky/meta/recipes-devtools/opkg/opkg/0001-string_util-New-file-with-bin_to_hex-function.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 646b80024567a6245c598be3374653fa1fa09a12 Mon Sep 17 00:00:00 2001
-From: Paul Barker <paul@paulbarker.me.uk>
-Date: Sat, 7 Nov 2015 10:23:49 +0000
-Subject: [PATCH 1/4] string_util: New file with bin_to_hex function
-
-This function does very simple conversion from binary data to a hex string.
-
-Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-
-Upstream-Status: Accepted
----
- libopkg/Makefile.am   |  4 ++--
- libopkg/string_util.c | 42 ++++++++++++++++++++++++++++++++++++++++++
- libopkg/string_util.h | 24 ++++++++++++++++++++++++
- 3 files changed, 68 insertions(+), 2 deletions(-)
- create mode 100644 libopkg/string_util.c
- create mode 100644 libopkg/string_util.h
-
-diff --git a/libopkg/Makefile.am b/libopkg/Makefile.am
-index ee3fbee..3e62c24 100644
---- a/libopkg/Makefile.am
-+++ b/libopkg/Makefile.am
-@@ -13,7 +13,7 @@ opkg_headers = active_list.h cksum_list.h conffile.h conffile_list.h \
- 	pkg_depends.h pkg_dest.h pkg_dest_list.h pkg_extract.h pkg_hash.h \
- 	pkg_parse.h pkg_src.h pkg_src_list.h pkg_vec.h release.h \
- 	release_parse.h sha256.h sprintf_alloc.h str_list.h void_list.h \
--	xregex.h xsystem.h xfuncs.h opkg_verify.h
-+	xregex.h xsystem.h xfuncs.h opkg_verify.h string_util.h
- 
- opkg_sources = opkg_cmd.c opkg_configure.c opkg_download.c \
- 	opkg_install.c opkg_remove.c opkg_conf.c release.c \
-@@ -23,7 +23,7 @@ opkg_sources = opkg_cmd.c opkg_configure.c opkg_download.c \
- 	pkg_src.c pkg_src_list.c str_list.c void_list.c active_list.c \
- 	file_util.c opkg_message.c md5.c parse_util.c cksum_list.c \
- 	sprintf_alloc.c xregex.c xsystem.c xfuncs.c opkg_archive.c \
--	opkg_verify.c
-+	opkg_verify.c string_util.c
- 
- if HAVE_CURL
- opkg_sources += opkg_download_curl.c
-diff --git a/libopkg/string_util.c b/libopkg/string_util.c
-new file mode 100644
-index 0000000..822cab6
---- /dev/null
-+++ b/libopkg/string_util.c
-@@ -0,0 +1,42 @@
-+/* vi: set expandtab sw=4 sts=4: */
-+/* string_util.c - convenience routines for common string operations
-+
-+   Copyright (C) 2015 Paul Barker
-+
-+   This program is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU General Public License as
-+   published by the Free Software Foundation; either version 2, or (at
-+   your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful, but
-+   WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   General Public License for more details.
-+*/
-+
-+#include "config.h"
-+
-+#include "string_util.h"
-+#include "xfuncs.h"
-+
-+char *bin_to_hex(const void *bin_data, size_t len)
-+{
-+    const unsigned char *src = (const unsigned char *)bin_data;
-+    char *buf = xmalloc(2 * len + 1);
-+    int i;
-+
-+    static const unsigned char bin2hex[16] = {
-+        '0', '1', '2', '3',
-+        '4', '5', '6', '7',
-+        '8', '9', 'a', 'b',
-+        'c', 'd', 'e', 'f'
-+    };
-+
-+    for (i = 0; i < len; i++) {
-+        buf[i * 2] = bin2hex[src[i] >> 4];
-+        buf[i * 2 + 1] = bin2hex[src[i] & 0xf];
-+    }
-+
-+    buf[len * 2] = '\0';
-+    return buf;
-+}
-diff --git a/libopkg/string_util.h b/libopkg/string_util.h
-new file mode 100644
-index 0000000..a920e2a
---- /dev/null
-+++ b/libopkg/string_util.h
-@@ -0,0 +1,24 @@
-+/* vi: set expandtab sw=4 sts=4: */
-+/* string_util.h - convenience routines for common file operations
-+
-+   Copyright (C) 2015 Paul Barker
-+
-+   This program is free software; you can redistribute it and/or
-+   modify it under the terms of the GNU General Public License as
-+   published by the Free Software Foundation; either version 2, or (at
-+   your option) any later version.
-+
-+   This program is distributed in the hope that it will be useful, but
-+   WITHOUT ANY WARRANTY; without even the implied warranty of
-+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-+   General Public License for more details.
-+*/
-+
-+#ifndef STRING_UTIL_H
-+#define STRING_UTIL_H
-+
-+#include <stddef.h>
-+
-+char *bin_to_hex(const void *bin_data, size_t len);
-+
-+#endif /* STRING_UTIL_H */
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/opkg/opkg/0002-md5-Add-md5_to_string-function.patch b/yocto-poky/meta/recipes-devtools/opkg/opkg/0002-md5-Add-md5_to_string-function.patch
deleted file mode 100644
index 3b823c6..0000000
--- a/yocto-poky/meta/recipes-devtools/opkg/opkg/0002-md5-Add-md5_to_string-function.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From ecad8afab377d8be95eeaafc08afa228c8e030c3 Mon Sep 17 00:00:00 2001
-From: Paul Barker <paul@paulbarker.me.uk>
-Date: Sat, 7 Nov 2015 10:23:50 +0000
-Subject: [PATCH 2/4] md5: Add md5_to_string function
-
-Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-
-Upstream-Status: Accepted
----
- libopkg/file_util.c | 28 +++-------------------------
- libopkg/md5.c       |  7 +++++++
- libopkg/md5.h       |  3 +++
- 3 files changed, 13 insertions(+), 25 deletions(-)
-
-diff --git a/libopkg/file_util.c b/libopkg/file_util.c
-index 5eff469..cb3dbf0 100644
---- a/libopkg/file_util.c
-+++ b/libopkg/file_util.c
-@@ -349,27 +349,13 @@ int file_mkdir_hier(const char *path, long mode)
- 
- char *file_md5sum_alloc(const char *file_name)
- {
--    static const int md5sum_bin_len = 16;
--    static const int md5sum_hex_len = 32;
--
--    static const unsigned char bin2hex[16] = {
--        '0', '1', '2', '3',
--        '4', '5', '6', '7',
--        '8', '9', 'a', 'b',
--        'c', 'd', 'e', 'f'
--    };
--
--    int i, err;
-+    int err;
-     FILE *file;
--    char *md5sum_hex;
--    unsigned char md5sum_bin[md5sum_bin_len];
--
--    md5sum_hex = xcalloc(1, md5sum_hex_len + 1);
-+    unsigned char md5sum_bin[16];
- 
-     file = fopen(file_name, "r");
-     if (file == NULL) {
-         opkg_perror(ERROR, "Failed to open file %s", file_name);
--        free(md5sum_hex);
-         return NULL;
-     }
- 
-@@ -377,20 +363,12 @@ char *file_md5sum_alloc(const char *file_name)
-     if (err) {
-         opkg_msg(ERROR, "Could't compute md5sum for %s.\n", file_name);
-         fclose(file);
--        free(md5sum_hex);
-         return NULL;
-     }
- 
-     fclose(file);
- 
--    for (i = 0; i < md5sum_bin_len; i++) {
--        md5sum_hex[i * 2] = bin2hex[md5sum_bin[i] >> 4];
--        md5sum_hex[i * 2 + 1] = bin2hex[md5sum_bin[i] & 0xf];
--    }
--
--    md5sum_hex[md5sum_hex_len] = '\0';
--
--    return md5sum_hex;
-+    return md5_to_string(md5sum_bin);
- }
- 
- #ifdef HAVE_SHA256
-diff --git a/libopkg/md5.c b/libopkg/md5.c
-index d476b8b..bc2b229 100644
---- a/libopkg/md5.c
-+++ b/libopkg/md5.c
-@@ -30,6 +30,8 @@
- #include <string.h>
- #include <sys/types.h>
- 
-+#include "string_util.h"
-+
- #if USE_UNLOCKED_IO
- #include "unlocked-io.h"
- #endif
-@@ -431,3 +433,8 @@ void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ctx)
-     ctx->C = C;
-     ctx->D = D;
- }
-+
-+char *md5_to_string(const void *md5sum_bin)
-+{
-+    return bin_to_hex(md5sum_bin, 16);
-+}
-diff --git a/libopkg/md5.h b/libopkg/md5.h
-index 01320f5..2a7274d 100644
---- a/libopkg/md5.h
-+++ b/libopkg/md5.h
-@@ -118,6 +118,9 @@ extern int __md5_stream(FILE * stream, void *resblock) __THROW;
- extern void *__md5_buffer(const char *buffer, size_t len,
-                           void *resblock) __THROW;
- 
-+/* Convert a binary md5sum value to an ASCII string. */
-+char *md5_to_string(const void *md5sum_bin);
-+
- #ifdef __cplusplus
- }
- #endif
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/opkg/opkg/0003-sha256-Add-sha256_to_string-function.patch b/yocto-poky/meta/recipes-devtools/opkg/opkg/0003-sha256-Add-sha256_to_string-function.patch
deleted file mode 100644
index 16e82d7..0000000
--- a/yocto-poky/meta/recipes-devtools/opkg/opkg/0003-sha256-Add-sha256_to_string-function.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 92e8378103bba3b91f2dec4e6fda3e1755a7c0fd Mon Sep 17 00:00:00 2001
-From: Paul Barker <paul@paulbarker.me.uk>
-Date: Sat, 7 Nov 2015 10:23:51 +0000
-Subject: [PATCH 3/4] sha256: Add sha256_to_string function
-
-Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-
-Upstream-Status: Accepted
----
- libopkg/file_util.c | 28 +++-------------------------
- libopkg/sha256.c    |  7 +++++++
- libopkg/sha256.h    |  3 +++
- 3 files changed, 13 insertions(+), 25 deletions(-)
-
-diff --git a/libopkg/file_util.c b/libopkg/file_util.c
-index cb3dbf0..864aedb 100644
---- a/libopkg/file_util.c
-+++ b/libopkg/file_util.c
-@@ -374,27 +374,13 @@ char *file_md5sum_alloc(const char *file_name)
- #ifdef HAVE_SHA256
- char *file_sha256sum_alloc(const char *file_name)
- {
--    static const int sha256sum_bin_len = 32;
--    static const int sha256sum_hex_len = 64;
--
--    static const unsigned char bin2hex[16] = {
--        '0', '1', '2', '3',
--        '4', '5', '6', '7',
--        '8', '9', 'a', 'b',
--        'c', 'd', 'e', 'f'
--    };
--
--    int i, err;
-+    int err;
-     FILE *file;
--    char *sha256sum_hex;
--    unsigned char sha256sum_bin[sha256sum_bin_len];
--
--    sha256sum_hex = xcalloc(1, sha256sum_hex_len + 1);
-+    unsigned char sha256sum_bin[32];
- 
-     file = fopen(file_name, "r");
-     if (file == NULL) {
-         opkg_perror(ERROR, "Failed to open file %s", file_name);
--        free(sha256sum_hex);
-         return NULL;
-     }
- 
-@@ -402,20 +388,12 @@ char *file_sha256sum_alloc(const char *file_name)
-     if (err) {
-         opkg_msg(ERROR, "Could't compute sha256sum for %s.\n", file_name);
-         fclose(file);
--        free(sha256sum_hex);
-         return NULL;
-     }
- 
-     fclose(file);
- 
--    for (i = 0; i < sha256sum_bin_len; i++) {
--        sha256sum_hex[i * 2] = bin2hex[sha256sum_bin[i] >> 4];
--        sha256sum_hex[i * 2 + 1] = bin2hex[sha256sum_bin[i] & 0xf];
--    }
--
--    sha256sum_hex[sha256sum_hex_len] = '\0';
--
--    return sha256sum_hex;
-+    return sha256_to_string(sha256sum_bin);
- }
- 
- #endif
-diff --git a/libopkg/sha256.c b/libopkg/sha256.c
-index 0816858..bceed72 100644
---- a/libopkg/sha256.c
-+++ b/libopkg/sha256.c
-@@ -29,6 +29,8 @@
- #include <stddef.h>
- #include <string.h>
- 
-+#include "string_util.h"
-+
- #if USE_UNLOCKED_IO
- #include "unlocked-io.h"
- #endif
-@@ -517,3 +519,8 @@ void sha256_process_block(const void *buffer, size_t len,
-         h = ctx->state[7] += h;
-     }
- }
-+
-+char *sha256_to_string(const void *sha256sum_bin)
-+{
-+    return bin_to_hex(sha256sum_bin, 32);
-+}
-diff --git a/libopkg/sha256.h b/libopkg/sha256.h
-index 734ab54..0d1e9e5 100644
---- a/libopkg/sha256.h
-+++ b/libopkg/sha256.h
-@@ -85,6 +85,9 @@ extern int sha224_stream(FILE * stream, void *resblock);
- extern void *sha256_buffer(const char *buffer, size_t len, void *resblock);
- extern void *sha224_buffer(const char *buffer, size_t len, void *resblock);
- 
-+/* Convert a binary sha256sum value to an ASCII string. */
-+char *sha256_to_string(const void *sha256sum_bin);
-+
- #ifdef __cplusplus
- }
- #endif
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/opkg/opkg/0004-opkg_download-Use-short-cache-file-name.patch b/yocto-poky/meta/recipes-devtools/opkg/opkg/0004-opkg_download-Use-short-cache-file-name.patch
deleted file mode 100644
index 7ea661d..0000000
--- a/yocto-poky/meta/recipes-devtools/opkg/opkg/0004-opkg_download-Use-short-cache-file-name.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 61636f15718edc7ea17b91f22f1d97b905eaf951 Mon Sep 17 00:00:00 2001
-From: Paul Barker <paul@paulbarker.me.uk>
-Date: Sat, 7 Nov 2015 10:23:52 +0000
-Subject: [PATCH 4/4] opkg_download: Use short cache file name
-
-Source URIs can be very long. The cache directory itself may already have a very
-long path, especially if we're installing packages into an offline rootfs.
-Therefore it's not a good idea to simply tag the source URI onto the cache
-directory path to create a cache file name.
-
-To create shorter cache file names which are deterministic and very likely to be
-unique, we use the md5sum of the source URI along with the basename of the
-source URI. The basename is length limited to ensure that it the resulting
-filename length is always reasonable.
-
-Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
-Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
-
-Upstream-Status: Accepted
----
- libopkg/opkg_download.c | 35 ++++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/libopkg/opkg_download.c b/libopkg/opkg_download.c
-index e9b86a5..a37b10d 100644
---- a/libopkg/opkg_download.c
-+++ b/libopkg/opkg_download.c
-@@ -29,10 +29,18 @@
- #include "opkg_verify.h"
- #include "opkg_utils.h"
- 
-+#include "md5.h"
- #include "sprintf_alloc.h"
- #include "file_util.h"
- #include "xfuncs.h"
- 
-+/* Limit the short file name used to generate cache file names to 90 characters
-+ * so that when added to the md5sum (32 characters) and an underscore, the
-+ * resulting length is below 128 characters. The maximum file name length
-+ * differs between plaforms but 128 characters should be reasonable.
-+ */
-+#define MAX_SHORT_FILE_NAME_LENGTH 90
-+
- static int opkg_download_set_env()
- {
-     int r;
-@@ -135,15 +143,28 @@ int opkg_download_internal(const char *src, const char *dest,
-  */
- char *get_cache_location(const char *src)
- {
--    char *cache_name = xstrdup(src);
--    char *cache_location, *p;
-+    unsigned char md5sum_bin[16];
-+    char *md5sum_hex;
-+    char *cache_location;
-+    char *short_file_name;
-+    char *tmp = xstrdup(src);
- 
--    for (p = cache_name; *p; p++)
--        if (*p == '/')
--            *p = '_';
-+    md5_buffer(src, strlen(src), md5sum_bin);
-+    md5sum_hex = md5_to_string(md5sum_bin);
- 
--    sprintf_alloc(&cache_location, "%s/%s", opkg_config->cache_dir, cache_name);
--    free(cache_name);
-+    /* Generate a short file name which will be used along with an md5sum of the
-+     * full src URI in the cache file name. This short file name is limited to
-+     * MAX_SHORT_FILE_NAME_LENGTH to ensure that the total cache file name
-+     * length is reasonable.
-+     */
-+    short_file_name = basename(tmp);
-+    if (strlen(short_file_name) > MAX_SHORT_FILE_NAME_LENGTH)
-+        short_file_name[MAX_SHORT_FILE_NAME_LENGTH] = '\0';
-+
-+    sprintf_alloc(&cache_location, "%s/%s_%s", opkg_config->cache_dir,
-+                  md5sum_hex, short_file_name);
-+    free(md5sum_hex);
-+    free(tmp);
-     return cache_location;
- }
- 
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.0.bb b/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.0.bb
deleted file mode 100644
index 5ad3e92..0000000
--- a/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.0.bb
+++ /dev/null
@@ -1,78 +0,0 @@
-SUMMARY = "Open Package Manager"
-SUMMARY_libopkg = "Open Package Manager library"
-SECTION = "base"
-HOMEPAGE = "http://code.google.com/p/opkg/"
-BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0"
-
-DEPENDS = "libarchive"
-
-PE = "1"
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
-           file://opkg-configure.service \
-           file://opkg.conf \
-           file://0001-opkg_archive-add-support-for-empty-compressed-files.patch \
-           file://0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch \
-           file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
-           file://0001-string_util-New-file-with-bin_to_hex-function.patch \
-           file://0002-md5-Add-md5_to_string-function.patch \
-           file://0003-sha256-Add-sha256_to_string-function.patch \
-           file://0004-opkg_download-Use-short-cache-file-name.patch \
-"
-
-SRC_URI[md5sum] = "3412cdc71d78b98facc84b19331ec64e"
-SRC_URI[sha256sum] = "7f735d1cdb8ef3718fb0f9fba44ca0d9a5c90d3a7f014f37a6d2f9474f54988f"
-
-inherit autotools pkgconfig systemd
-
-SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
-
-target_localstatedir := "${localstatedir}"
-OPKGLIBDIR = "${target_localstatedir}/lib"
-
-PACKAGECONFIG ??= ""
-
-PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
-PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
-PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
-
-do_install_append () {
-	install -d ${D}${sysconfdir}/opkg
-	install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
-	echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
-
-	# We need to create the lock directory
-	install -d ${D}${OPKGLIBDIR}/opkg
-
-	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
-		install -d ${D}${systemd_unitdir}/system
-		install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
-		sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-			-e 's,@SYSCONFDIR@,${sysconfdir},g' \
-			-e 's,@BINDIR@,${bindir},g' \
-			-e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
-			${D}${systemd_unitdir}/system/opkg-configure.service
-	fi
-}
-
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts libarchive"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
-RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
-RCONFLICTS_${PN} = "opkg-collateral"
-RPROVIDES_${PN} = "opkg-collateral"
-
-PACKAGES =+ "libopkg"
-
-FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
-FILES_${PN} += "${systemd_unitdir}/system/"
-
-BBCLASSEXTEND = "native nativesdk"
-
-CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.1.bb b/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.1.bb
new file mode 100644
index 0000000..577f495
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/opkg/opkg_0.3.1.bb
@@ -0,0 +1,75 @@
+SUMMARY = "Open Package Manager"
+SUMMARY_libopkg = "Open Package Manager library"
+SECTION = "base"
+HOMEPAGE = "http://code.google.com/p/opkg/"
+BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://src/opkg.c;beginline=2;endline=21;md5=90435a519c6ea69ef22e4a88bcc52fa0"
+
+DEPENDS = "libarchive"
+
+PE = "1"
+
+SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
+           file://opkg-configure.service \
+           file://opkg.conf \
+           file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
+           file://0001-libsolv_solver_set_arch_policy-use-correct-logic-dur.patch \
+           file://0001-configure.ac-use-pkg-config-for-libsolv.patch \
+"
+
+SRC_URI[md5sum] = "43735e5dc1ebf46bd6ce56a7cdfdc720"
+SRC_URI[sha256sum] = "d2c6c02a8384ec21168a1f0a186cb5e9f577d1452f491d02ed3e56b2ea8b87df"
+
+inherit autotools pkgconfig systemd
+
+SYSTEMD_SERVICE_${PN} = "opkg-configure.service"
+
+target_localstatedir := "${localstatedir}"
+OPKGLIBDIR = "${target_localstatedir}/lib"
+
+PACKAGECONFIG ??= ""
+
+PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,gpgme libgpg-error,gnupg"
+PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
+PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
+PACKAGECONFIG[pathfinder] = "--enable-pathfinder,--disable-pathfinder,pathfinder"
+PACKAGECONFIG[libsolv] = "--enable-solver=libsolv,--disable-solver,libsolv"
+
+do_install_append () {
+	install -d ${D}${sysconfdir}/opkg
+	install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
+	echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
+
+	# We need to create the lock directory
+	install -d ${D}${OPKGLIBDIR}/opkg
+
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
+		install -d ${D}${systemd_unitdir}/system
+		install -m 0644 ${WORKDIR}/opkg-configure.service ${D}${systemd_unitdir}/system/
+		sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
+			-e 's,@SYSCONFDIR@,${sysconfdir},g' \
+			-e 's,@BINDIR@,${bindir},g' \
+			-e 's,@SYSTEMD_UNITDIR@,${systemd_unitdir},g' \
+			${D}${systemd_unitdir}/system/opkg-configure.service
+	fi
+}
+
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config run-postinsts libarchive"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
+RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
+RCONFLICTS_${PN} = "opkg-collateral"
+RPROVIDES_${PN} = "opkg-collateral"
+
+PACKAGES =+ "libopkg"
+
+FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
+FILES_${PN} += "${systemd_unitdir}/system/"
+
+BBCLASSEXTEND = "native nativesdk"
+
+CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"
diff --git a/yocto-poky/meta/recipes-devtools/orc/orc_0.4.23.bb b/yocto-poky/meta/recipes-devtools/orc/orc_0.4.23.bb
deleted file mode 100644
index d4257c3..0000000
--- a/yocto-poky/meta/recipes-devtools/orc/orc_0.4.23.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Optimised Inner Loop Runtime Compiler"
-HOMEPAGE = "http://code.entropywave.com/projects/orc/"
-LICENSE = "BSD-2-Clause & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
-
-SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz;name=orc"
-SRC_URI[orc.md5sum] = "72e0612ace54d77aa2f7a006348ee81a"
-SRC_URI[orc.sha256sum] = "767eaebce2941737b43368225ec54598b3055ca78b4dc50c4092f5fcdc0bdfe7"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
-
-PACKAGES =+ "orc-examples"
-FILES_orc-examples = "${libdir}/orc/*"
-FILES_${PN} = "${bindir}/*"
-
-python populate_packages_prepend () {
-    libdir = d.expand('${libdir}')
-    do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
-}
-
-do_compile_prepend_class-native () {
-    sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c
-}
diff --git a/yocto-poky/meta/recipes-devtools/orc/orc_0.4.24.bb b/yocto-poky/meta/recipes-devtools/orc/orc_0.4.24.bb
new file mode 100644
index 0000000..520f88d
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/orc/orc_0.4.24.bb
@@ -0,0 +1,27 @@
+SUMMARY = "Optimised Inner Loop Runtime Compiler"
+HOMEPAGE = "http://gstreamer.freedesktop.org/modules/orc.html"
+LICENSE = "BSD-2-Clause & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1400bd9d09e8af56b9ec982b3d85797e"
+
+SRC_URI = "http://gstreamer.freedesktop.org/src/orc/orc-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "9e793ec34c0e20339659dd4bbbf62135"
+SRC_URI[sha256sum] = "338cd493b5247300149821c6312bdf7422a3593ae98691fc75d7e4fe727bd39b"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
+
+PACKAGES =+ "orc-examples"
+PACKAGES_DYNAMIC += "^liborc-.*"
+FILES_orc-examples = "${libdir}/orc/*"
+FILES_${PN} = "${bindir}/*"
+
+python populate_packages_prepend () {
+    libdir = d.expand('${libdir}')
+    do_split_packages(d, libdir, '^lib(.*)\.so\.*', 'lib%s', 'ORC %s library', extra_depends='', allow_links=True)
+}
+
+do_compile_prepend_class-native () {
+    sed -i -e 's#/tmp#.#g' ${S}/orc/orccodemem.c
+}
diff --git a/yocto-poky/meta/recipes-devtools/patchelf/patchelf/maxsize.patch b/yocto-poky/meta/recipes-devtools/patchelf/patchelf/maxsize.patch
new file mode 100644
index 0000000..cc04a89
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/patchelf/patchelf/maxsize.patch
@@ -0,0 +1,30 @@
+From f6886c2c33a1cf8771163919f3d20f6340c0ce38 Mon Sep 17 00:00:00 2001
+From: Eelco Dolstra <eelco.dolstra@logicblox.com>
+Date: Fri, 10 Jul 2015 18:12:37 +0200
+Subject: [PATCH] Quick fix for #47
+
+https://github.com/NixOS/patchelf/issues/47
+
+Avoid issues with holes in binaries such as qemu-pcc from qemu-native.
+
+Upstream-Status: Submitted
+RP
+2016/2/3
+
+---
+ src/patchelf.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/patchelf.cc b/src/patchelf.cc
+index 8566ed9..df75593 100644
+--- a/src/patchelf.cc
++++ b/src/patchelf.cc
+@@ -248,7 +248,7 @@ static void readFile(string fileName, mode_t * fileMode)
+     if (stat(fileName.c_str(), &st) != 0) error("stat");
+     fileSize = st.st_size;
+     *fileMode = st.st_mode;
+-    maxSize = fileSize + 8 * 1024 * 1024;
++    maxSize = fileSize + 64 * 1024 * 1024;
+ 
+     contents = (unsigned char *) malloc(fileSize + maxSize);
+     if (!contents) abort();
\ No newline at end of file
diff --git a/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.8.bb b/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.8.bb
index c1b87f5..8484a7e 100644
--- a/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.8.bb
+++ b/yocto-poky/meta/recipes-devtools/patchelf/patchelf_0.8.bb
@@ -1,4 +1,5 @@
-SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://nixos.org/releases/${BPN}/${BPN}-${PV}/${BPN}-${PV}.tar.bz2 \
+           file://maxsize.patch"
 LICENSE = "GPLv3"
 SUMMARY = "Tool to allow editing of RPATH and interpreter fields in ELF binaries"
 
diff --git a/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.0.5.bb b/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.0.5.bb
deleted file mode 100644
index 0716a08..0000000
--- a/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.0.5.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Security-focused ELF files checking tool"
-DESCRIPTION = "This is a small set of various PaX aware and related \
-utilities for ELF binaries. It can check ELF binary files and running \
-processes for issues that might be relevant when using ELF binaries \
-along with PaX, such as non-PIC code or executable stack and heap."
-HOMEPAGE = "http://www.gentoo.org/proj/en/hardened/pax-utils.xml"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-
-SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "d731f5385682a7a62ee2e7b7dacc13a7"
-SRC_URI[sha256sum] = "f69a9938e4af7912d26d585094bc0203e43571a990fdd048319088a8b8ad906f"
-
-RDEPENDS_${PN} += "bash python"
-
-do_install() {
-    oe_runmake PREFIX=${D}${prefix} DESTDIR=${D} install
-}
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.5.bb b/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.5.bb
new file mode 100644
index 0000000..a887c03
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/pax-utils/pax-utils_1.1.5.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Security-focused ELF files checking tool"
+DESCRIPTION = "This is a small set of various PaX aware and related \
+utilities for ELF binaries. It can check ELF binary files and running \
+processes for issues that might be relevant when using ELF binaries \
+along with PaX, such as non-PIC code or executable stack and heap."
+HOMEPAGE = "http://www.gentoo.org/proj/en/hardened/pax-utils.xml"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
+
+SRC_URI = "http://gentoo.osuosl.org/distfiles/pax-utils-${PV}.tar.xz \
+"
+
+SRC_URI[md5sum] = "bc3614322eaf88f167a608ae85d6b207"
+SRC_URI[sha256sum] = "2945b3e4df2e0dc95800bfbd3d88ab2243b2ee4ff064bbfc75734f6d9d986a89"
+
+RDEPENDS_${PN} += "bash"
+
+do_configure_prepend() {
+    touch ${S}/NEWS ${S}/AUTHORS ${S}/ChangeLog ${S}/README
+}
+
+do_install() {
+    oe_runmake PREFIX=${D}${prefix} DESTDIR=${D} install
+}
+
+BBCLASSEXTEND = "native"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
+"
+PACKAGECONFIG[libcap] = "--with-caps, --without-caps, libcap"
+PACKAGECONFIG[libseccomp] = "--with-seccomp, --without-seccomp, libseccomp"
+PACKAGECONFIG[largefile] = "--enable-largefile,--disable-largefile,,"
+PACKAGECONFIG[pyelftools] = "--with-python, --without-python,, pyelftools"
diff --git a/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb b/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
index 9ccd417..9561a59 100644
--- a/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
+++ b/yocto-poky/meta/recipes-devtools/perl/libxml-parser-perl_2.44.bb
@@ -31,7 +31,5 @@
 	cpan_do_compile
 }
 
-FILES_${PN}-dbg += "${libdir}/perl/vendor_perl/*/auto/XML/Parser/Expat/.debug/"
-
 BBCLASSEXTEND="native"
 
diff --git a/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb b/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
deleted file mode 100644
index 4721b4b..0000000
--- a/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.20.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Perl module for reading and writing XML"
-DESCRIPTION = "The XML::Simple Perl module provides a simple API layer \
-on top of an underlying XML parsing module to maintain XML files \
-(especially configuration files). It is a blunt rewrite of XML::Simple \
-(by Grant McLean) to use the XML::LibXML parser for XML structures, \
-where the original uses plain Perl or SAX parsers."
-HOMEPAGE = "http://search.cpan.org/~markov/XML-LibXML-Simple-0.93/lib/XML/LibXML/Simple.pod"
-SECTION = "libs"
-LICENSE = "Artistic-1.0 | GPL-1.0+"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e7dbb3e2241fac8457967053fc1a1ddb"
-DEPENDS += "libxml-parser-perl"
-
-SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Simple-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4d10964e123b76eca36678464daa63cd"
-SRC_URI[sha256sum] = "5cff13d0802792da1eb45895ce1be461903d98ec97c9c953bc8406af7294434a"
-
-S = "${WORKDIR}/XML-Simple-${PV}"
-
-EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
-
-inherit cpan
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb b/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb
new file mode 100644
index 0000000..2243bb2
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/perl/libxml-simple-perl_2.22.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Perl module for reading and writing XML"
+DESCRIPTION = "The XML::Simple Perl module provides a simple API layer \
+on top of an underlying XML parsing module to maintain XML files \
+(especially configuration files). It is a blunt rewrite of XML::Simple \
+(by Grant McLean) to use the XML::LibXML parser for XML structures, \
+where the original uses plain Perl or SAX parsers."
+HOMEPAGE = "http://search.cpan.org/~markov/XML-LibXML-Simple-0.93/lib/XML/LibXML/Simple.pod"
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fa1187fceda00eee10b62961407ea7be"
+DEPENDS += "libxml-parser-perl"
+
+SRC_URI = "http://www.cpan.org/modules/by-module/XML/XML-Simple-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "0914abddfce749453ed89b54029f2643"
+SRC_URI[sha256sum] = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49"
+
+S = "${WORKDIR}/XML-Simple-${PV}"
+
+EXTRA_PERLFLAGS = "-I ${PERLHOSTLIB}"
+
+inherit cpan
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.0.bb b/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.0.bb
deleted file mode 100644
index b4dda31..0000000
--- a/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.0.bb
+++ /dev/null
@@ -1,125 +0,0 @@
-require perl.inc
-
-SRC_URI += "\
-           file://Configure-multilib.patch \
-           file://perl-configpm-switch.patch \
-           file://native-nopacklist.patch \
-           file://native-perlinc.patch \
-           file://MM_Unix.pm.patch \
-           file://debian/errno_ver.diff \
-           file://dynaloaderhack.patch \
-           file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
-          "
-
-SRC_URI[md5sum] = "ff0f09b17de426eff323426cb140ee79"
-SRC_URI[sha256sum] = "be83ead0c5c26cbbe626fa4bac1a4beabe23a9eebc15d35ba49ccde11878e196"
-
-inherit native
-
-NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
-
-export LD="${CCLD}"
-
-do_configure () {
-	./Configure \
-		-Dcc="${CC}" \
-		-Dcflags="${CFLAGS}" \
-		-Dldflags="${LDFLAGS}" \
-		-Dcf_by="Open Embedded" \
-		-Dprefix=${prefix} \
-		-Dvendorprefix=${prefix} \
-		-Dsiteprefix=${prefix} \
-		\
-		-Dbin=${STAGING_BINDIR}/${PN} \
-		-Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
-		-Darchlib=${STAGING_LIBDIR}/perl/${PV} \
-		-Dvendorlib=${STAGING_LIBDIR}/perl/vendor_perl/${PV} \
-		-Dvendorarch=${STAGING_LIBDIR}/perl/vendor_perl/${PV} \
-		-Dsitelib=${STAGING_LIBDIR}/perl/site_perl/${PV} \
-		-Dsitearch=${STAGING_LIBDIR}/perl/site_perl/${PV} \
-		\
-		-Duseshrplib \
-		-Dusethreads \
-		-Duseithreads \
-		-Duselargefiles \
-		-Dnoextensions=ODBM_File \
-		-Ud_dosuid \
-		-Ui_db \
-		-Ui_ndbm \
-		-Ui_gdbm \
-		-Ui_gdbm_ndbm \
-		-Ui_gdbmndbm \
-		-Di_shadow \
-		-Di_syslog \
-		-Duseperlio \
-		-Dman3ext=3pm \
-		-Dsed=/bin/sed \
-		-Uafs \
-		-Ud_csh \
-		-Uusesfio \
-		-Uusenm -des
-}
-
-do_install () {
-	oe_runmake 'DESTDIR=${D}' install
-
-	# We need a hostperl link for building perl
-	ln -sf perl${PV} ${D}${bindir}/hostperl
-
-        ln -sf perl ${D}${libdir}/perl5
-
-	install -d ${D}${libdir}/perl/${PV}/CORE \
-	           ${D}${datadir}/perl/${PV}/ExtUtils
-
-	# Save native config 
-	install config.sh ${D}${libdir}/perl
-	install lib/Config.pm ${D}${libdir}/perl/${PV}/
-	install lib/ExtUtils/typemap ${D}${libdir}/perl/${PV}/ExtUtils/
-
-	# perl shared library headers
-	# reference perl 5.20.0-1 in debian:
-	# https://packages.debian.org/experimental/i386/perl/filelist
-	for i in av.h bitcount.h charclass_invlists.h config.h cop.h cv.h dosish.h \
-		embed.h embedvar.h EXTERN.h fakesdio.h feature.h form.h git_version.h \
-		gv.h handy.h hv_func.h hv.h inline.h INTERN.h intrpvar.h iperlsys.h \
-		keywords.h l1_char_class_tab.h malloc_ctl.h metaconfig.h mg_data.h \
-		mg.h mg_raw.h mg_vtable.h mydtrace.h nostdio.h opcode.h op.h \
-		opnames.h op_reg_common.h overload.h pad.h parser.h patchlevel.h \
-		perlapi.h perl.h perlio.h perliol.h perlsdio.h perlvars.h perly.h \
-		pp.h pp_proto.h proto.h reentr.h regcharclass.h regcomp.h regexp.h \
-		regnodes.h scope.h sv.h thread.h time64_config.h time64.h uconfig.h \
-		unicode_constants.h unixish.h utf8.h utfebcdic.h util.h uudmap.h \
-		vutil.h warnings.h XSUB.h
-	do
-		install $i ${D}${libdir}/perl/${PV}/CORE
-	done
-
-	# Those wrappers mean that perl installed from sstate (which may change
-	# path location) works and that in the nativesdk case, the SDK can be
-	# installed to a different location from the one it was built for.
-	create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}:${STAGING_LIBDIR}/perl/${PV}'
-	create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}:${STAGING_LIBDIR}/perl/${PV}'
-
-	# Use /usr/bin/env nativeperl for the perl script.
-	for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
-		sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
-	done
-}
-
-SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
-
-perl_sysroot_create_wrapper () {
-	mkdir -p ${SYSROOT_DESTDIR}${bindir}
-	# Create a wrapper that /usr/bin/env perl will use to get perl-native.
-	# This MUST live in the normal bindir.
-	cat > ${SYSROOT_DESTDIR}${bindir}/../nativeperl << EOF
-#!/bin/sh
-realpath=\`readlink -fn \$0\`
-exec \`dirname \$realpath\`/perl-native/perl "\$@"
-EOF
-	chmod 0755 ${SYSROOT_DESTDIR}${bindir}/../nativeperl
-	cat ${SYSROOT_DESTDIR}${bindir}/../nativeperl
-}
-
-# Fix the path in sstate
-SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.1.bb b/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.1.bb
new file mode 100644
index 0000000..ed8222f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/perl/perl-native_5.22.1.bb
@@ -0,0 +1,127 @@
+require perl.inc
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+SRC_URI += "\
+           file://Configure-multilib.patch \
+           file://perl-configpm-switch.patch \
+           file://native-nopacklist.patch \
+           file://native-perlinc.patch \
+           file://MM_Unix.pm.patch \
+           file://debian/errno_ver.diff \
+           file://dynaloaderhack.patch \
+           file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
+          "
+
+SRC_URI[md5sum] = "6671e4829cbaf9cecafa9a84f141b0a3"
+SRC_URI[sha256sum] = "9e87317d693ce828095204be0d09af8d60b8785533fadea1a82b6f0e071e5c79"
+
+inherit native
+
+NATIVE_PACKAGE_PATH_SUFFIX = "/${PN}"
+
+export LD="${CCLD}"
+
+do_configure () {
+	./Configure \
+		-Dcc="${CC}" \
+		-Dcflags="${CFLAGS}" \
+		-Dldflags="${LDFLAGS}" \
+		-Dcf_by="Open Embedded" \
+		-Dprefix=${prefix} \
+		-Dvendorprefix=${prefix} \
+		-Dsiteprefix=${prefix} \
+		\
+		-Dbin=${STAGING_BINDIR}/${PN} \
+		-Dprivlib=${STAGING_LIBDIR}/perl/${PV} \
+		-Darchlib=${STAGING_LIBDIR}/perl/${PV} \
+		-Dvendorlib=${STAGING_LIBDIR}/perl/vendor_perl/${PV} \
+		-Dvendorarch=${STAGING_LIBDIR}/perl/vendor_perl/${PV} \
+		-Dsitelib=${STAGING_LIBDIR}/perl/site_perl/${PV} \
+		-Dsitearch=${STAGING_LIBDIR}/perl/site_perl/${PV} \
+		\
+		-Duseshrplib \
+		-Dusethreads \
+		-Duseithreads \
+		-Duselargefiles \
+		-Dnoextensions=ODBM_File \
+		-Ud_dosuid \
+		-Ui_db \
+		-Ui_ndbm \
+		-Ui_gdbm \
+		-Ui_gdbm_ndbm \
+		-Ui_gdbmndbm \
+		-Di_shadow \
+		-Di_syslog \
+		-Duseperlio \
+		-Dman3ext=3pm \
+		-Dsed=/bin/sed \
+		-Uafs \
+		-Ud_csh \
+		-Uusesfio \
+		-Uusenm -des
+}
+
+do_install () {
+	oe_runmake 'DESTDIR=${D}' install
+
+	# We need a hostperl link for building perl
+	ln -sf perl${PV} ${D}${bindir}/hostperl
+
+        ln -sf perl ${D}${libdir}/perl5
+
+	install -d ${D}${libdir}/perl/${PV}/CORE \
+	           ${D}${datadir}/perl/${PV}/ExtUtils
+
+	# Save native config 
+	install config.sh ${D}${libdir}/perl
+	install lib/Config.pm ${D}${libdir}/perl/${PV}/
+	install lib/ExtUtils/typemap ${D}${libdir}/perl/${PV}/ExtUtils/
+
+	# perl shared library headers
+	# reference perl 5.20.0-1 in debian:
+	# https://packages.debian.org/experimental/i386/perl/filelist
+	for i in av.h bitcount.h charclass_invlists.h config.h cop.h cv.h dosish.h \
+		embed.h embedvar.h EXTERN.h fakesdio.h feature.h form.h git_version.h \
+		gv.h handy.h hv_func.h hv.h inline.h INTERN.h intrpvar.h iperlsys.h \
+		keywords.h l1_char_class_tab.h malloc_ctl.h metaconfig.h mg_data.h \
+		mg.h mg_raw.h mg_vtable.h mydtrace.h nostdio.h opcode.h op.h \
+		opnames.h op_reg_common.h overload.h pad.h parser.h patchlevel.h \
+		perlapi.h perl.h perlio.h perliol.h perlsdio.h perlvars.h perly.h \
+		pp.h pp_proto.h proto.h reentr.h regcharclass.h regcomp.h regexp.h \
+		regnodes.h scope.h sv.h thread.h time64_config.h time64.h uconfig.h \
+		unicode_constants.h unixish.h utf8.h utfebcdic.h util.h uudmap.h \
+		vutil.h warnings.h XSUB.h
+	do
+		install $i ${D}${libdir}/perl/${PV}/CORE
+	done
+
+	# Those wrappers mean that perl installed from sstate (which may change
+	# path location) works and that in the nativesdk case, the SDK can be
+	# installed to a different location from the one it was built for.
+	create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}:${STAGING_LIBDIR}/perl/${PV}'
+	create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/site_perl/${PV}:${STAGING_LIBDIR}/perl/vendor_perl/${PV}:${STAGING_LIBDIR}/perl/${PV}'
+
+	# Use /usr/bin/env nativeperl for the perl script.
+	for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
+		sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
+	done
+}
+
+SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
+
+perl_sysroot_create_wrapper () {
+	mkdir -p ${SYSROOT_DESTDIR}${bindir}
+	# Create a wrapper that /usr/bin/env perl will use to get perl-native.
+	# This MUST live in the normal bindir.
+	cat > ${SYSROOT_DESTDIR}${bindir}/../nativeperl << EOF
+#!/bin/sh
+realpath=\`readlink -fn \$0\`
+exec \`dirname \$realpath\`/perl-native/perl "\$@"
+EOF
+	chmod 0755 ${SYSROOT_DESTDIR}${bindir}/../nativeperl
+	cat ${SYSROOT_DESTDIR}${bindir}/../nativeperl
+}
+
+# Fix the path in sstate
+SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.0.inc b/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.0.inc
deleted file mode 100644
index 7f886f3..0000000
--- a/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.0.inc
+++ /dev/null
@@ -1,2567 +0,0 @@
-# To create/update the perl-rdepends_${PV}.inc use this piece of ugly script (modified for your arch/paths etc):
-
-#jiahongxu:5.20.0-r1$ pwd
-#/home/jiahongxu/yocto/build-20140618-perl/tmp/work/i586-poky-linux/perl/5.20.0-r1
-
-#1 cp -r packages-split packages-split.new && cd packages-split.new
-#2 find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
-#3 egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" 
-#| sed "s/\/.*\.pm: */ += /g;s/[\"\']//g;s/;.*/\"/g;s/+= .*\(require\|use\)\> */+= \"perl-module-/g;s/CPANPLUS::.*/cpanplus/g;s/CPAN::.*/cpan/g;s/::/-/g;s/ [^+\"].*//g;s/_/-/g;s/\.pl\"$/\"/;s/\"\?\$/\"/;s/(//;" | tr [:upper:] [:lower:] 
-#| grep -v -e "\-vms\-" -e module-5 -e "^$" -e "\\$" -e your -e tk -e autoperl -e html -e http -e parse-cpan -e perl-ostype -e ndbm-file -e module-mac -e fcgi -e lwp -e dbd -e dbix 
-#| sort -u 
-#| sed 's/^/RDEPENDS_/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' 
-#| egrep -wv '=>|module-a|module-apache.?|module-apr|module-authen-sasl|module-b-asmdata|module-convert-ebcdic|module-devel-size|module-digest-perl-md5|module-dumpvalue|module-extutils-constant-aaargh56hash|module-extutils-xssymset|module-file-bsdglob|module-for|module-it|module-io-string|module-ipc-system-simple|module-lexical|module-local-lib|metadata|module-modperl-util|module-pluggable-object|module-test-builder-io-scalar|module-text-unidecode|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s' > /tmp/perl-rdepends
-
-RDEPENDS_perl-misc += "perl"
-RDEPENDS_${PN}-pod += "perl"
-
-# Some additional dependencies that the above doesn't manage to figure out
-RDEPENDS_${PN}-module-file-spec += "${PN}-module-file-spec-unix"
-DEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-attributes"
-
-
-# Depends list
-# copy contents of /tmp/perl-rdepends in this file
-RDEPENDS_${PN}-module-anydbm-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-anydbm-file += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-carp"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-config"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-constant"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-cpan"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-getopt-std"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-if"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-net-ping"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-strict"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-user-pwent"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-vars"
-RDEPENDS_${PN}-module-app-cpan += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-app-prove-state"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-base"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-carp"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-constant"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-getopt-long"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-strict"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-tap-harness"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-tap-harness-env"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-app-prove += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-app-prove-state-result"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-base"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-carp"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-constant"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-strict"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-tap-parser-yamlish-reader"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-tap-parser-yamlish-writer"
-RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-app-prove-state-result-test"
-RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-carp"
-RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-constant"
-RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-strict"
-RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-app-prove-state-result-test += "${PN}-module-strict"
-RDEPENDS_${PN}-module-app-prove-state-result-test += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-constant"
-RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-io-compress-bzip2"
-RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-time-local"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-archive-tar"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-archive-tar-constant"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-carp"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-vars"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-archive-tar-constant"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-archive-tar-file"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-carp"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-config"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-io-zlib"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-strict"
-RDEPENDS_${PN}-module-archive-tar += "${PN}-module-vars"
-RDEPENDS_${PN}-module-arybase += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-carp"
-RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-strict"
-RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-vars"
-RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-attributes += "${PN}-module-carp"
-RDEPENDS_${PN}-module-attributes += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-attributes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-attributes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-attributes += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-constant"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-fatal"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-overload"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-parent"
-RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-b"
-RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-constant"
-RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-constant"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-lib"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-parent"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-scope-guard += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-scope-guard += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-scope-guardstack += "${PN}-module-autodie-scope-guard"
-RDEPENDS_${PN}-module-autodie-scope-guardstack += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-scope-guardstack += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-autodie-scope-guardstack"
-RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autodie-skip += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autodie-skip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-autoloader += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autoloader += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-carp"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-config"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-autosplit += "${PN}-module-strict"
-RDEPENDS_${PN}-module-autouse += "${PN}-module-carp"
-RDEPENDS_${PN}-module-base += "${PN}-module-carp"
-RDEPENDS_${PN}-module-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-base += "${PN}-module-vars"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-b-op-private"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-config"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b-concise += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-b-debug += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-debug += "${PN}-module-config"
-RDEPENDS_${PN}-module-b-debug += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-carp"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-feature"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-overloading"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-re"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-vars"
-RDEPENDS_${PN}-module-b-deparse += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-benchmark += "${PN}-module-carp"
-RDEPENDS_${PN}-module-benchmark += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-benchmark += "${PN}-module-strict"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-carp"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-constant"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-math-bigint-trace"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-overload"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-strict"
-RDEPENDS_${PN}-module-bigint += "${PN}-module-vars"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-bigint"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-carp"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigfloat-trace"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigint-trace"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-overload"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-strict"
-RDEPENDS_${PN}-module-bignum += "${PN}-module-vars"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-bigint"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-carp"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigint-trace"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigrat"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-overload"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-strict"
-RDEPENDS_${PN}-module-bigrat += "${PN}-module-vars"
-RDEPENDS_${PN}-module-blib += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-blib += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-blib += "${PN}-module-vars"
-RDEPENDS_${PN}-module-b += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-b += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-b-showlex += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-showlex += "${PN}-module-b-concise"
-RDEPENDS_${PN}-module-b-showlex += "${PN}-module-b-terse"
-RDEPENDS_${PN}-module-b-showlex += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b-terse += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-terse += "${PN}-module-b-concise"
-RDEPENDS_${PN}-module-b-terse += "${PN}-module-carp"
-RDEPENDS_${PN}-module-b-terse += "${PN}-module-strict"
-RDEPENDS_${PN}-module-b-xref += "${PN}-module-b"
-RDEPENDS_${PN}-module-b-xref += "${PN}-module-config"
-RDEPENDS_${PN}-module-b-xref += "${PN}-module-strict"
-RDEPENDS_${PN}-module-bytes += "${PN}-module-bytes-heavy"
-RDEPENDS_${PN}-module-bytes += "${PN}-module-carp"
-RDEPENDS_${PN}-module-carp-heavy += "${PN}-module-carp"
-RDEPENDS_${PN}-module-carp += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-carp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-carp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-carp"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-re"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-strict"
-RDEPENDS_${PN}-module-charnames += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-class-struct += "${PN}-module-carp"
-RDEPENDS_${PN}-module-class-struct += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-class-struct += "${PN}-module-strict"
-RDEPENDS_${PN}-module-class-struct += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-bytes "
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-carp "
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-constant"
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-strict "
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-warnings "
-RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-bytes "
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-carp "
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-constant"
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-strict "
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-warnings "
-RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-bytes "
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-carp "
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-constant"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-compress-gzip"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-compress-gzip-constants"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-handle "
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-uncompress-gunzip"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-strict "
-RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-warnings "
-RDEPENDS_${PN}-module-config-extensions += "${PN}-module-config"
-RDEPENDS_${PN}-module-config-extensions += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-config-extensions += "${PN}-module-strict"
-RDEPENDS_${PN}-module-config-extensions += "${PN}-module-vars"
-RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-config"
-RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-strict"
-RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-vars"
-RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-constant += "${PN}-module-carp"
-RDEPENDS_${PN}-module-constant += "${PN}-module-strict"
-RDEPENDS_${PN}-module-constant += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-list-util"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-corelist"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-strict"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-vars"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-version"
-RDEPENDS_${PN}-module-corelist += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-b"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-carp"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-config"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-cpan"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-dirhandle"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-manifest"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-file-copy"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-lib"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-net-ping"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-overload"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-posix"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-safe"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-strict"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-sys-hostname"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-term-readline"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-text-wrap"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-time-local"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-vars"
-RDEPENDS_${PN}-module-cpan += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-strict"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-vars"
-RDEPENDS_${PN}-module-cwd += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-b-deparse"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-carp"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-config"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-constant"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-overload"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-data-dumper += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-dbm-filter-compress += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dbm-filter-compress += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter-compress += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dbm-filter-encode += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dbm-filter-encode += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter-encode += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dbm-filter-int32 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter-int32 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dbm-filter-null += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter-null += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dbm-filter += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dbm-filter += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dbm-filter-utf8 += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dbm-filter-utf8 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-dbm-filter-utf8 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-db += "${PN}-module-strict"
-RDEPENDS_${PN}-module-deprecate += "${PN}-module-carp"
-RDEPENDS_${PN}-module-deprecate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-deprecate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-devel-peek += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-devel-peek += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-getopt-long"
-RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-strict"
-RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-vars"
-RDEPENDS_${PN}-module-devel-selfstubber += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-devel-selfstubber += "${PN}-module-selfloader"
-RDEPENDS_${PN}-module-diagnostics += "${PN}-module-carp"
-RDEPENDS_${PN}-module-diagnostics += "${PN}-module-config"
-RDEPENDS_${PN}-module-diagnostics += "${PN}-module-getopt-std"
-RDEPENDS_${PN}-module-diagnostics += "${PN}-module-strict"
-RDEPENDS_${PN}-module-diagnostics += "${PN}-module-text-tabs"
-RDEPENDS_${PN}-module-digest-base += "${PN}-module-carp"
-RDEPENDS_${PN}-module-digest-base += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-digest-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-digest-base += "${PN}-module-vars"
-RDEPENDS_${PN}-module-digest-file += "${PN}-module-carp"
-RDEPENDS_${PN}-module-digest-file += "${PN}-module-digest"
-RDEPENDS_${PN}-module-digest-file += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-digest-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-digest-file += "${PN}-module-vars"
-RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-digest-base"
-RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-digest += "${PN}-module-strict"
-RDEPENDS_${PN}-module-digest += "${PN}-module-vars"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-carp"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-digest-base"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-integer"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-strict"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-vars"
-RDEPENDS_${PN}-module-digest-sha += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-dirhandle += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dirhandle += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-dynaloader += "${PN}-module-carp"
-RDEPENDS_${PN}-module-dynaloader += "${PN}-module-config"
-RDEPENDS_${PN}-module-encode-alias += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode-alias += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-alias += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-encode-alias += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-alias += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-byte += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-byte += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-byte += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-byte += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-vars"
-RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-cn += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-cn += "${PN}-module-encode-cn-hz"
-RDEPENDS_${PN}-module-encode-cn += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-cn += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-cn += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-config += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-config += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-overload"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-encode-mime-name"
-RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-encode-unicode"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-guess += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-encode-cjkconstants"
-RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-vars"
-RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-encode-cjkconstants"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-encode-jp-h2z"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-jp += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-jp += "${PN}-module-encode-jp-jis7"
-RDEPENDS_${PN}-module-encode-jp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-jp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-jp += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-encode-cjkconstants"
-RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-kr += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-kr += "${PN}-module-encode-kr-2022-kr"
-RDEPENDS_${PN}-module-encode-kr += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-kr += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-kr += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-encode-cjkconstants"
-RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-mime-name += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-mime-name += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-encode += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encode += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encode += "${PN}-module-encode-alias"
-RDEPENDS_${PN}-module-encode += "${PN}-module-encode-config"
-RDEPENDS_${PN}-module-encode += "${PN}-module-encode-configlocal-pm"
-RDEPENDS_${PN}-module-encode += "${PN}-module-encode-encoding"
-RDEPENDS_${PN}-module-encode += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-encode += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-tw += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-tw += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-tw += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-tw += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-parent"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-re"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-config"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-constant"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-encode"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-filter-util-call"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-i18n-langinfo"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-strict"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-encoding += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-encoding-warnings += "${PN}-module-carp"
-RDEPENDS_${PN}-module-encoding-warnings += "${PN}-module-strict"
-RDEPENDS_${PN}-module-english += "${PN}-module-carp "
-RDEPENDS_${PN}-module-english += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-env += "${PN}-module-config"
-RDEPENDS_${PN}-module-env += "${PN}-module-tie-array"
-RDEPENDS_${PN}-module-errno += "${PN}-module-carp"
-RDEPENDS_${PN}-module-errno += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-errno += "${PN}-module-strict"
-RDEPENDS_${PN}-module-experimental += "${PN}-module-carp"
-RDEPENDS_${PN}-module-experimental += "${PN}-module-feature"
-RDEPENDS_${PN}-module-experimental += "${PN}-module-strict"
-RDEPENDS_${PN}-module-experimental += "${PN}-module-version"
-RDEPENDS_${PN}-module-experimental += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-exporter-heavy += "${PN}-module-carp"
-RDEPENDS_${PN}-module-exporter-heavy += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-exporter-heavy += "${PN}-module-strict"
-RDEPENDS_${PN}-module-exporter += "${PN}-module-exporter-heavy"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-extutils-mksymlists"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-file-temp"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-ipc-cmd"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-darwin += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-darwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-darwin += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-os2 += "${PN}-module-extutils-cbuilder-platform-unix"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-os2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-os2 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-unix += "${PN}-module-extutils-cbuilder-base"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-unix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-unix += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-extutils-cbuilder-base"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-extutils-cbuilder-base"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-extutils-command"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-extutils-install"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-getopt-long"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-test-harness"
-RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-copy"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-command += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-constant"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-extutils-constant-utils"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-text-wrap"
-RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-extutils-constant-proxysubs"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-extutils-constant-utils"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-extutils-constant-xs"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-extutils-constant-utils"
-RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-extutils-constant-xs"
-RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-constant"
-RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-posix"
-RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-extutils-constant"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-extutils-constant-base"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-extutils-constant-utils"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-extutils-liblist"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-getopt-std"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-extutils-packlist"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-autosplit"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-extutils-packlist"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-compare"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-copy"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-install += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-liblist += "${PN}-module-extutils-liblist-kid"
-RDEPENDS_${PN}-module-extutils-liblist += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-liblist += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker-config += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-makemaker-config += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-base"
-RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-encode"
-RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-encode-alias"
-RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-i18n-langinfo"
-RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-b"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-makemaker-version"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-manifest"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-mm"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-my"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-version"
-RDEPENDS_${PN}-module-extutils-makemaker-version += "${PN}-module-extutils-makemaker-version-regex"
-RDEPENDS_${PN}-module-extutils-makemaker-version += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker-version += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-makemaker-version-regex += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker-version-regex += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-b"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-extutils-makemaker-version-regex"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-locale"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-overload"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-universal"
-RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-copy"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-extutils-embed"
-RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-aix += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-aix += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-aix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-autosplit"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-cpan"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-data-dumper"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-version"
-RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-extutils-mm-win32"
-RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-darwin += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-darwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-dos += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-dos += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-dos += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-macos += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-extutils-mm-win32"
-RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-extutils-liblist"
-RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-qnx += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-qnx += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-dirhandle"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-encode"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-liblist"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-version"
-RDEPENDS_${PN}-module-extutils-mm-uwin += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-uwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-liblist-kid"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-vos += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-vos += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-mm-any"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-mm-unix"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-mm-win95 += "${PN}-module-extutils-makemaker-config"
-RDEPENDS_${PN}-module-extutils-mm-win95 += "${PN}-module-extutils-mm-win32"
-RDEPENDS_${PN}-module-extutils-mm-win95 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-my += "${PN}-module-extutils-mm"
-RDEPENDS_${PN}-module-extutils-my += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-carp"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-vars"
-RDEPENDS_${PN}-module-extutils-parsexs-constants += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-parsexs-constants += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-extutils-parsexs-constants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-parsexs-countlines += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-parsexs-eval += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-parsexs-eval += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-config"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-constants"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-countlines"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-eval"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-utilities"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-re"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-extutils-parsexs-constants"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-extutils-typemaps"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-lib"
-RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-extutils-typemaps"
-RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-typemaps-inputmap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-typemaps-inputmap += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-typemaps-outputmap += "${PN}-module-re"
-RDEPENDS_${PN}-module-extutils-typemaps-outputmap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-typemaps-outputmap += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-parsexs"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-parsexs-constants"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-typemaps-inputmap"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-typemaps-outputmap"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-typemaps-type"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-extutils-typemaps-type += "${PN}-module-extutils-typemaps"
-RDEPENDS_${PN}-module-extutils-typemaps-type += "${PN}-module-strict"
-RDEPENDS_${PN}-module-extutils-typemaps-type += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-autodie-exception-system"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-autodie-hints"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-autodie-scopeutil"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-carp"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-config"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-constant"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-fatal"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-posix"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-strict"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-tie-refhash"
-RDEPENDS_${PN}-module-fatal += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-fcntl += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-fcntl += "${PN}-module-strict"
-RDEPENDS_${PN}-module-fcntl += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-feature += "${PN}-module-carp"
-RDEPENDS_${PN}-module-fields += "${PN}-module-base"
-RDEPENDS_${PN}-module-fields += "${PN}-module-carp"
-RDEPENDS_${PN}-module-fields += "${PN}-module-hash-util"
-RDEPENDS_${PN}-module-fields += "${PN}-module-strict"
-RDEPENDS_${PN}-module-fields += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-basename += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-basename += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-basename += "${PN}-module-re"
-RDEPENDS_${PN}-module-file-basename += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-basename += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-filecache += "${PN}-module-carp"
-RDEPENDS_${PN}-module-filecache += "${PN}-module-parent"
-RDEPENDS_${PN}-module-filecache += "${PN}-module-strict"
-RDEPENDS_${PN}-module-filecache += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-compare += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-compare += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-compare += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-compare += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-config"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-copy += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-constant"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-copy"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-temp"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-ipc-cmd"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-locale-maketext-simple"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-load"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-params-check"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-fetch += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-config"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-find += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-file-glob"
-RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-glob += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-glob += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-glob += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-filehandle += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-filehandle += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-filehandle += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-filehandle += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-path += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-cygwin += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-cygwin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-cygwin += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-epoc += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-epoc += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-epoc += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-mac += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-mac += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-mac += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-os2 += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-os2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-os2 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-constant"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-cwd "
-RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-file-spec-unix"
-RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-constant"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-overload "
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-vars"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-file-stat += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-errno"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-io-seekable"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-overload"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-parent"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-posix"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-file-temp += "${PN}-module-vars"
-RDEPENDS_${PN}-module-filter-simple += "${PN}-module-carp"
-RDEPENDS_${PN}-module-filter-simple += "${PN}-module-filter-util-call"
-RDEPENDS_${PN}-module-filter-simple += "${PN}-module-text-balanced"
-RDEPENDS_${PN}-module-filter-simple += "${PN}-module-vars"
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-carp "
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-strict"
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-vars"
-RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-findbin += "${PN}-module-carp"
-RDEPENDS_${PN}-module-findbin += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-findbin += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-findbin += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-findbin += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-constant"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-overload"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-pod-usage"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-strict"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-getopt-long += "${PN}-module-vars"
-RDEPENDS_${PN}-module-getopt-std += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-strict"
-RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-carp"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-hash-util-fieldhash"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-strict"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-hash-util += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-overload"
-RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-posix"
-RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-carp"
-RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-strict"
-RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-i18n-langtags-detect += "${PN}-module-i18n-langtags"
-RDEPENDS_${PN}-module-i18n-langtags-detect += "${PN}-module-strict"
-RDEPENDS_${PN}-module-i18n-langtags-detect += "${PN}-module-vars"
-RDEPENDS_${PN}-module-i18n-langtags-list += "${PN}-module-strict"
-RDEPENDS_${PN}-module-i18n-langtags-list += "${PN}-module-vars"
-RDEPENDS_${PN}-module-i18n-langtags += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-i18n-langtags += "${PN}-module-i18n-langtags"
-RDEPENDS_${PN}-module-i18n-langtags += "${PN}-module-strict"
-RDEPENDS_${PN}-module-i18n-langtags += "${PN}-module-vars"
-RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-compress-raw-bzip2"
-RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-encode"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-file-globmapper"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-io-handle "
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-io-compress-adapter-bzip2"
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-io-compress-base"
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-adapter-deflate"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-rawdeflate"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-zlib-constants"
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-adapter-deflate"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-gzip-constants"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-rawdeflate"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-zlib-extra"
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-io-compress-adapter-deflate"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-io-compress-base"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-config"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-adapter-deflate"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-adapter-identity"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-bzip2 "
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-rawdeflate"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-zip-constants"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-zlib-extra"
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-io-compress-gzip-constants"
-RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-file-stat"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-dir += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-io-seekable"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-selectsaver"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-file += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-io"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-selectsaver"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-handle += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-io-pipe += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-pipe += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-pipe += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-io-pipe += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-pipe += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-poll += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-poll += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-io-poll += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-seekable += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-seekable += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-seekable += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-seekable += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-io-seekable += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-select += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-select += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-select += "${PN}-module-vars"
-RDEPENDS_${PN}-module-io-select += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-errno"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-socket"
-RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-base"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-errno"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-posix"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-socket"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-errno"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-select"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-socket-inet"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-socket-unix"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-socket"
-RDEPENDS_${PN}-module-io-socket += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-socket-unix += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-socket-unix += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-io-socket-unix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-compress-raw-bzip2"
-RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-io-compress-zip-constants "
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-adapter-inflate"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-base"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-gunzip"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-inflate"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-rawinflate"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-unzip"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-io-uncompress-base"
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-carp "
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-io-file "
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-list-util"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-io-uncompress-adapter-bunzip2"
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-io-uncompress-base"
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-compress-gzip-constants"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-compress-zlib-extra"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-uncompress-rawinflate"
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-io-compress-zlib-constants"
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-io-uncompress-rawinflate"
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-io-uncompress-adapter-inflate"
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-io-uncompress-base"
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-compress-raw-zlib"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-constant"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-exporter "
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-compress-base-common"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-compress-zip-constants"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-compress-zlib-extra"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-uncompress-adapter-identity"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-uncompress-adapter-inflate"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-uncompress-rawinflate"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-posix"
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-strict "
-RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-carp"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-strict"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-tie-handle"
-RDEPENDS_${PN}-module-io-zlib += "${PN}-module-vars"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-constant"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-extutils-makemaker"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-io-select"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-ipc-open3"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-locale-maketext-simple"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-load"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-params-check"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-posix"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-socket"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-time-hires"
-RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-vars"
-RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-ipc-sysv"
-RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-vars"
-RDEPENDS_${PN}-module-ipc-open2 += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-ipc-open2 += "${PN}-module-ipc-open3"
-RDEPENDS_${PN}-module-ipc-open2 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-constant"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-io-pipe"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-posix"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-ipc-sysv"
-RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-vars"
-RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-ipc-sysv"
-RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-vars"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-config"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-vars"
-RDEPENDS_${PN}-module-json-pp-boolean += "${PN}-module-json-pp"
-RDEPENDS_${PN}-module-json-pp-boolean += "${PN}-module-strict"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-b"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-base"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-bytes"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-encode"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-overload"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-json-pp += "${PN}-module-subs"
-RDEPENDS_${PN}-module-less += "${PN}-module-strict"
-RDEPENDS_${PN}-module-less += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-lib += "${PN}-module-carp"
-RDEPENDS_${PN}-module-lib += "${PN}-module-config"
-RDEPENDS_${PN}-module-lib += "${PN}-module-strict"
-RDEPENDS_${PN}-module-list-util += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-list-util += "${PN}-module-strict"
-RDEPENDS_${PN}-module-list-util += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-list-util-xs += "${PN}-module-list-util"
-RDEPENDS_${PN}-module-list-util-xs += "${PN}-module-strict"
-RDEPENDS_${PN}-module-loaded += "${PN}-module-carp"
-RDEPENDS_${PN}-module-loaded += "${PN}-module-strict"
-RDEPENDS_${PN}-module-loaded += "${PN}-module-vars"
-RDEPENDS_${PN}-module-load += "${PN}-module-carp"
-RDEPENDS_${PN}-module-load += "${PN}-module-config"
-RDEPENDS_${PN}-module-load += "${PN}-module-constant"
-RDEPENDS_${PN}-module-load += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-load += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-load += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-load += "${PN}-module-locale-maketext-simple"
-RDEPENDS_${PN}-module-load += "${PN}-module-corelist"
-RDEPENDS_${PN}-module-load += "${PN}-module-load"
-RDEPENDS_${PN}-module-load += "${PN}-module-params-check"
-RDEPENDS_${PN}-module-load += "${PN}-module-strict"
-RDEPENDS_${PN}-module-load += "${PN}-module-vars"
-RDEPENDS_${PN}-module-load += "${PN}-module-version"
-RDEPENDS_${PN}-module-load += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-constant"
-RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-country-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-country-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-country-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes-country-codes"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes-country-retired"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-country-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-country-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-country-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-currency-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-currency-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-currency-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes-currency-codes"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes-currency-retired"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-currency-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-currency-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-currency-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langext-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langext-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-langext-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes-langext-codes"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes-langext-retired"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langext-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langext-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-langext-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langfam-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langfam-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-langfam-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes-langfam-codes"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes-langfam-retired"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langfam-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langfam-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-language-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-language-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-language-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes-language-codes"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes-language-retired"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-language-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-language-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-language-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langvar-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langvar-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-langvar-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes-langvar-codes"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes-langvar-retired"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-langvar-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-langvar-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-langvar-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-script-codes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-script-codes += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-script-codes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes-constants"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes-script-codes"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes-script-retired"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-codes-script-retired += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-codes-script-retired += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-locale-codes-script-retired += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-country += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-country += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-country += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-currency += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-currency += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-currency += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-language += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-language += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-language += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-locale-maketext-gutsloader += "${PN}-module-locale-maketext"
-RDEPENDS_${PN}-module-locale-maketext-guts += "${PN}-module-locale-maketext"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-i18n-langtags"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-i18n-langtags-detect"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-integer"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-vars"
-RDEPENDS_${PN}-module-locale-maketext-simple += "${PN}-module-base"
-RDEPENDS_${PN}-module-locale-maketext-simple += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale += "${PN}-module-carp"
-RDEPENDS_${PN}-module-locale += "${PN}-module-config"
-RDEPENDS_${PN}-module-locale-script += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-locale-script += "${PN}-module-strict"
-RDEPENDS_${PN}-module-locale-script += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-carp"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigint-calcemu += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigint-calcemu += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-carp"
-RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-constant"
-RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-integer"
-RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-math-bigint-calc"
-RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-carp"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigint += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-carp"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-math-bigfloat"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-math-bigint"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-vars"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-config"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-overload"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-strict"
-RDEPENDS_${PN}-module-math-complex += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-math-trig += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-math-trig += "${PN}-module-math-complex"
-RDEPENDS_${PN}-module-math-trig += "${PN}-module-strict"
-RDEPENDS_${PN}-module-memoize-anydbm-file += "${PN}-module-vars"
-RDEPENDS_${PN}-module-memoize-expirefile += "${PN}-module-carp"
-RDEPENDS_${PN}-module-memoize-expire += "${PN}-module-carp"
-RDEPENDS_${PN}-module-memoize += "${PN}-module-carp"
-RDEPENDS_${PN}-module-memoize += "${PN}-module-config"
-RDEPENDS_${PN}-module-memoize += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-memoize += "${PN}-module-strict"
-RDEPENDS_${PN}-module-memoize += "${PN}-module-vars"
-RDEPENDS_${PN}-module-memoize-sdbm-file += "${PN}-module-sdbm-file"
-RDEPENDS_${PN}-module-memoize-storable += "${PN}-module-carp"
-RDEPENDS_${PN}-module-memoize-storable += "${PN}-module-storable"
-RDEPENDS_${PN}-module-meta-notation += "${PN}-module-strict"
-RDEPENDS_${PN}-module-meta-notation += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-vars"
-RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-strict"
-RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-vars"
-RDEPENDS_${PN}-module-mro += "${PN}-module-strict"
-RDEPENDS_${PN}-module-mro += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-mro += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-constant"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-net-cmd += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-config += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-config += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-config += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-config += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-posix"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-domain += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-net-ftp-dataconn"
-RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-errno"
-RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-net-cmd"
-RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp-e += "${PN}-module-net-ftp-i"
-RDEPENDS_${PN}-module-net-ftp-e += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp-e += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-net-ftp-dataconn"
-RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp-l += "${PN}-module-net-ftp-i"
-RDEPENDS_${PN}-module-net-ftp-l += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp-l += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-io-socket-ip"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-cmd"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-ftp-a"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-netrc"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-time-local"
-RDEPENDS_${PN}-module-net-ftp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-hostent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-net-hostent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-hostent += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-hostent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-hostent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-net-netent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-net-netent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-netent += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-netent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-netent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-net-netrc += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-netrc += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-net-netrc += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-netrc += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-io-socket-ip"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-net-cmd"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-time-local"
-RDEPENDS_${PN}-module-net-nntp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-constant"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-filehandle"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-posix"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-time-hires"
-RDEPENDS_${PN}-module-net-ping += "${PN}-module-vars"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-io-socket-ip"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-net-cmd"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-net-netrc"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-protoent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-net-protoent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-protoent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-protoent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-net-servent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-net-servent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-servent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-servent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-io-socket-ip"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-mime-base64"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-net-cmd"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-socket"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-smtp += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-carp"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-io-select"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-io-socket"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-net-config"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-strict"
-RDEPENDS_${PN}-module-net-time += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-next += "${PN}-module-carp"
-RDEPENDS_${PN}-module-next += "${PN}-module-overload"
-RDEPENDS_${PN}-module-next += "${PN}-module-strict"
-RDEPENDS_${PN}-module-odbm-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-odbm-file += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-odbm-file += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-odbm-file += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-ok += "${PN}-module-strict"
-RDEPENDS_${PN}-module-ok += "${PN}-module-test-more"
-RDEPENDS_${PN}-module-opcode += "${PN}-module-carp"
-RDEPENDS_${PN}-module-opcode += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-opcode += "${PN}-module-strict"
-RDEPENDS_${PN}-module-opcode += "${PN}-module-subs"
-RDEPENDS_${PN}-module-opcode += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-open += "${PN}-module-carp"
-RDEPENDS_${PN}-module-open += "${PN}-module-encode"
-RDEPENDS_${PN}-module-open += "${PN}-module-encoding"
-RDEPENDS_${PN}-module-open += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-o += "${PN}-module-b"
-RDEPENDS_${PN}-module-o += "${PN}-module-carp"
-RDEPENDS_${PN}-module-ops += "${PN}-module-opcode"
-RDEPENDS_${PN}-module-overloading += "${PN}-module-overload-numbers"
-RDEPENDS_${PN}-module-overloading += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-overload += "${PN}-module-mro"
-RDEPENDS_${PN}-module-overload += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-overload += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-params-check += "${PN}-module-carp"
-RDEPENDS_${PN}-module-params-check += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-params-check += "${PN}-module-locale-maketext-simple"
-RDEPENDS_${PN}-module-params-check += "${PN}-module-strict"
-RDEPENDS_${PN}-module-params-check += "${PN}-module-vars"
-RDEPENDS_${PN}-module-parent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-parent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-perlfaq += "${PN}-module-strict"
-RDEPENDS_${PN}-module-perlfaq += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-perlio-encoding += "${PN}-module-strict"
-RDEPENDS_${PN}-module-perlio-encoding += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-perlio-mmap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-perlio-mmap += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-perlio-mmap += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-perlio-scalar += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-perlio-via += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-perlio-via-quotedprint += "${PN}-module-mime-quotedprint"
-RDEPENDS_${PN}-module-perlio-via-quotedprint += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-pod-parser"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-pod-parseutils"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-checker += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-config"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-file-find"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-find += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-functions += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-functions += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-inputobjects += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-inputobjects += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-encode"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-subs"
-RDEPENDS_${PN}-module-pod-man += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-parselink += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-parselink += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-parselink += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-pod-inputobjects"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-parser += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-parseutils += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-parseutils += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-parseutils += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-config"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-getoptsoo += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-getoptsoo += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-config"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-encode"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-file-temp"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-pod-perldoc-getoptsoo"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-pod-text-color"
-RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-pod-checker"
-RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-encode"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-file-spec-functions"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-io-select"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-ipc-open3"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-pod-man"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-pod-perldoc-topod"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-pod-man"
-RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-pod-text-termcap"
-RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-pod-text"
-RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-parent"
-RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-pod-select"
-RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-select += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-select += "${PN}-module-pod-parser"
-RDEPENDS_${PN}-module-pod-select += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-select += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-integer"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-pod-simple-transcode"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-pod-simple-methody"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-text-wrap"
-RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-dumpastext += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-dumpastext += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-dumpastext += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-text-wrap"
-RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-overload"
-RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-pod-simple-blackbox"
-RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-methody += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-methody += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-methody += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-integer"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-escapes"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-simple-blackbox"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-simple-linksection"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-simple-tiedoutfh"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-simple += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-progress += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-pullparserendtoken += "${PN}-module-pod-simple-pullparsertoken"
-RDEPENDS_${PN}-module-pod-simple-pullparserendtoken += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-pullparserendtoken += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple-pullparserendtoken"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple-pullparserstarttoken"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple-pullparsertexttoken"
-RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-pod-simple-pullparsertoken"
-RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-pullparsertexttoken += "${PN}-module-pod-simple-pullparsertoken"
-RDEPENDS_${PN}-module-pod-simple-pullparsertexttoken += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-pullparsertexttoken += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-pullparsertoken += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-integer"
-RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-pod-simple-pullparser"
-RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-config"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-cwd"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-pod-simple-methody"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-text-wrap"
-RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-transcodedumb += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-transcodedumb += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-transcode += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-encode"
-RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-pod-text"
-RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-term-ansicolor"
-RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-text-overstrike += "${PN}-module-pod-text"
-RDEPENDS_${PN}-module-pod-text-overstrike += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-text-overstrike += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-encode"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-pod-simple"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-text += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-pod-text"
-RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-posix"
-RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-term-cap"
-RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-vars"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-carp"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-config"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-strict"
-RDEPENDS_${PN}-module-pod-usage += "${PN}-module-vars"
-RDEPENDS_${PN}-module-posix += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-posix += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-posix += "${PN}-module-strict"
-RDEPENDS_${PN}-module-posix += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-posix += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-posix += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-re += "${PN}-module-carp"
-RDEPENDS_${PN}-module-re += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-re += "${PN}-module-strict"
-RDEPENDS_${PN}-module-re += "${PN}-module-term-cap"
-RDEPENDS_${PN}-module-re += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-re += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-safe += "${PN}-module-b"
-RDEPENDS_${PN}-module-safe += "${PN}-module-carp"
-RDEPENDS_${PN}-module-safe += "${PN}-module-carp-heavy"
-RDEPENDS_${PN}-module-safe += "${PN}-module-opcode"
-RDEPENDS_${PN}-module-safe += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-safe += "${PN}-module-strict"
-RDEPENDS_${PN}-module-safe += "${PN}-module-utf8"
-RDEPENDS_${PN}-module-scalar-util += "${PN}-module-carp"
-RDEPENDS_${PN}-module-scalar-util += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-scalar-util += "${PN}-module-list-util"
-RDEPENDS_${PN}-module-scalar-util += "${PN}-module-strict"
-RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-search-dict += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-search-dict += "${PN}-module-feature"
-RDEPENDS_${PN}-module-search-dict += "${PN}-module-strict"
-RDEPENDS_${PN}-module-selectsaver += "${PN}-module-carp"
-RDEPENDS_${PN}-module-selectsaver += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-selfloader += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-selfloader += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-selfloader += "${PN}-module-strict"
-RDEPENDS_${PN}-module-selfloader += "${PN}-module-vars"
-RDEPENDS_${PN}-module-sigtrap += "${PN}-module-carp"
-RDEPENDS_${PN}-module-sigtrap += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-socket += "${PN}-module-carp"
-RDEPENDS_${PN}-module-socket += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-socket += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-socket += "${PN}-module-strict"
-RDEPENDS_${PN}-module-socket += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-socket += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-sort += "${PN}-module-carp"
-RDEPENDS_${PN}-module-sort += "${PN}-module-strict"
-RDEPENDS_${PN}-module-storable += "${PN}-module-carp"
-RDEPENDS_${PN}-module-storable += "${PN}-module-config"
-RDEPENDS_${PN}-module-storable += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-storable += "${PN}-module-io-file"
-RDEPENDS_${PN}-module-storable += "${PN}-module-vars"
-RDEPENDS_${PN}-module-storable += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-sub-util += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-sub-util += "${PN}-module-list-util"
-RDEPENDS_${PN}-module-sub-util += "${PN}-module-strict"
-RDEPENDS_${PN}-module-sub-util += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-symbol += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-carp"
-RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-posix"
-RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-strict"
-RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-carp"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-posix"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-socket"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-strict"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-sys-hostname"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-vars"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-tap-base += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-base += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-base += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-posix"
-RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-tap-formatter-color"
-RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-posix"
-RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-console-session += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-console-session += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-console-session += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-posix"
-RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-tap-formatter-file-session"
-RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-tap-object"
-RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-file-path"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-harness += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-object += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-object += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-object += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-benchmark"
-RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-tap-parser-resultfactory"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-tap-parser-yamlish-reader"
-RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-iterator-array += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-iterator-array += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-iterator-array += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-config"
-RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-io-handle"
-RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-iterator-stream += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-iterator-stream += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-iterator-stream += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-io-select"
-RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-grammar"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-iterator"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-result"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-resultfactory"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-source"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-executable"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-file"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-handle"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-perl"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-rawtap"
-RDEPENDS_${PN}-module-tap-parser += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-bailout += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-bailout += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-bailout += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-comment += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-comment += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-comment += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-bailout"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-comment"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-plan"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-pragma"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-test"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-unknown"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-version"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-yaml"
-RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-plan += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-plan += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-plan += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-pragma += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-pragma += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-pragma += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-test += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-test += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-test += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-unknown += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-unknown += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-unknown += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-version += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-version += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-version += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-result-yaml += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-result-yaml += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-result-yaml += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-scheduler-job += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-scheduler-job += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-scheduler-job += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-tap-parser-scheduler-job"
-RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-tap-parser-scheduler-spinner"
-RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-scheduler-spinner += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tap-parser-scheduler-spinner += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-scheduler-spinner += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-tap-parser-iterator-process"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-tap-parser-iterator-stream"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-tap-parser-iterator-stream"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-tap-parser-iterator"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-config"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-tap-parser-iterator-process"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-tap-parser-iterator-array"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-tap-parser-iteratorfactory"
-RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-constant"
-RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-file-basename"
-RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-yamlish-reader += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-yamlish-reader += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-yamlish-reader += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-tap-parser-yamlish-writer += "${PN}-module-base"
-RDEPENDS_${PN}-module-tap-parser-yamlish-writer += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tap-parser-yamlish-writer += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-carp"
-RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-strict"
-RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-term-cap += "${PN}-module-carp"
-RDEPENDS_${PN}-module-term-cap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-term-cap += "${PN}-module-vars"
-RDEPENDS_${PN}-module-term-complete += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-term-complete += "${PN}-module-strict"
-RDEPENDS_${PN}-module-term-readline += "${PN}-module-strict"
-RDEPENDS_${PN}-module-term-readline += "${PN}-module-term-cap"
-RDEPENDS_${PN}-module-test-builder-module += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-test-builder-module += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-builder-module += "${PN}-module-test-builder"
-RDEPENDS_${PN}-module-test-builder += "${PN}-module-config"
-RDEPENDS_${PN}-module-test-builder += "${PN}-module-perlio"
-RDEPENDS_${PN}-module-test-builder += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-builder += "${PN}-module-threads-shared"
-RDEPENDS_${PN}-module-test-builder += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-test-builder-tester-color += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-builder-tester-color += "${PN}-module-test-builder-tester"
-RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-carp"
-RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-test-builder"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-base"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-config"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-constant"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-harness"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-parser-aggregator"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-parser-source"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-parser-sourcehandler-perl"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-text-parsewords"
-RDEPENDS_${PN}-module-test-harness += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-test-more += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-test-more += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-more += "${PN}-module-test-builder-module"
-RDEPENDS_${PN}-module-test-more += "${PN}-module-test-more"
-RDEPENDS_${PN}-module-test-more += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-test += "${PN}-module-carp"
-RDEPENDS_${PN}-module-test += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-test += "${PN}-module-file-temp"
-RDEPENDS_${PN}-module-test += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test += "${PN}-module-vars"
-RDEPENDS_${PN}-module-test-simple += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-simple += "${PN}-module-test-builder-module"
-RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-config"
-RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-test-builder"
-RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-threads-shared"
-RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-vars"
-RDEPENDS_${PN}-module-test-tester-capturerunner += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-test-tester-capturerunner += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-tester-capturerunner += "${PN}-module-test-tester-capture"
-RDEPENDS_${PN}-module-test-tester-delegate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-tester-delegate += "${PN}-module-vars"
-RDEPENDS_${PN}-module-test-tester-delegate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-strict"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-test-builder"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-test-tester-capturerunner"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-test-tester-delegate"
-RDEPENDS_${PN}-module-test-tester += "${PN}-module-vars"
-RDEPENDS_${PN}-module-text-abbrev += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-carp"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-overload"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-selfloader"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-strict"
-RDEPENDS_${PN}-module-text-balanced += "${PN}-module-vars"
-RDEPENDS_${PN}-module-text-parsewords += "${PN}-module-carp"
-RDEPENDS_${PN}-module-text-parsewords += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-text-parsewords += "${PN}-module-strict"
-RDEPENDS_${PN}-module-text-tabs += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-text-tabs += "${PN}-module-strict"
-RDEPENDS_${PN}-module-text-tabs += "${PN}-module-vars"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-re"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-strict"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-text-tabs"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-vars"
-RDEPENDS_${PN}-module-text-wrap += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-thread += "${PN}-module-config"
-RDEPENDS_${PN}-module-thread += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-thread += "${PN}-module-strict"
-RDEPENDS_${PN}-module-thread += "${PN}-module-threads"
-RDEPENDS_${PN}-module-thread += "${PN}-module-threads-shared"
-RDEPENDS_${PN}-module-thread += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-carp"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-strict"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-threads-shared"
-RDEPENDS_${PN}-module-thread-queue += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-carp"
-RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-strict"
-RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-threads-shared"
-RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-threads += "${PN}-module-carp"
-RDEPENDS_${PN}-module-threads += "${PN}-module-config"
-RDEPENDS_${PN}-module-threads += "${PN}-module-overload"
-RDEPENDS_${PN}-module-threads += "${PN}-module-strict"
-RDEPENDS_${PN}-module-threads += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-threads += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-threads-shared += "${PN}-module-carp"
-RDEPENDS_${PN}-module-threads-shared += "${PN}-module-scalar-util"
-RDEPENDS_${PN}-module-threads-shared += "${PN}-module-strict"
-RDEPENDS_${PN}-module-threads-shared += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-threads-shared += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-tie-array += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-array += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-array += "${PN}-module-vars"
-RDEPENDS_${PN}-module-tie-file += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-file += "${PN}-module-fcntl"
-RDEPENDS_${PN}-module-tie-file += "${PN}-module-posix"
-RDEPENDS_${PN}-module-tie-file += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-file += "${PN}-module-symbol"
-RDEPENDS_${PN}-module-tie-handle += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-handle += "${PN}-module-tie-stdhandle"
-RDEPENDS_${PN}-module-tie-handle += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-tie-hash-namedcapture += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-hash-namedcapture += "${PN}-module-xsloader"
-RDEPENDS_${PN}-module-tie-hash += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-hash += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-tie-memoize += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-memoize += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-config"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-overload"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-tie-hash"
-RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-vars"
-RDEPENDS_${PN}-module-tie-scalar += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-scalar += "${PN}-module-warnings-register"
-RDEPENDS_${PN}-module-tie-stdhandle += "${PN}-module-strict"
-RDEPENDS_${PN}-module-tie-stdhandle += "${PN}-module-tie-handle"
-RDEPENDS_${PN}-module-tie-stdhandle += "${PN}-module-vars"
-RDEPENDS_${PN}-module-tie-substrhash += "${PN}-module-carp"
-RDEPENDS_${PN}-module-tie-substrhash += "${PN}-module-integer"
-RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-time-tm"
-RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-vars"
-RDEPENDS_${PN}-module-time-hires += "${PN}-module-carp"
-RDEPENDS_${PN}-module-time-hires += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-time-hires += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-hires += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-carp"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-config"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-constant"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-local += "${PN}-module-vars"
-RDEPENDS_${PN}-module-time-localtime += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-localtime += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-localtime += "${PN}-module-time-tm"
-RDEPENDS_${PN}-module-time-localtime += "${PN}-module-vars"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-carp"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-constant"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-integer"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-overload"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-time-local"
-RDEPENDS_${PN}-module-time-piece += "${PN}-module-time-seconds"
-RDEPENDS_${PN}-module-time-seconds += "${PN}-module-constant"
-RDEPENDS_${PN}-module-time-seconds += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-time-seconds += "${PN}-module-overload "
-RDEPENDS_${PN}-module-time-seconds += "${PN}-module-strict"
-RDEPENDS_${PN}-module-time-seconds += "${PN}-module-vars"
-RDEPENDS_${PN}-module-time-tm += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-time-tm += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-big5 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-big5 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-gb2312 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-gb2312 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-jisx0208 += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-jisx0208 += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-korean += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-korean += "${PN}-module-unicode-collate"
-RDEPENDS_${PN}-module-unicode-collate-cjk-korean += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-pinyin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-pinyin += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-stroke += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-stroke += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-cjk-zhuyin += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-cjk-zhuyin += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-base"
-RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-carp"
-RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-carp"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-constant"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-dynaloader"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-carp"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-constant"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-carp"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-charnames"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-feature"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-file-spec"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-if"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-integer"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-strict"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-unicode-normalize"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-unicore"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-utf8-heavy"
-RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-unicore += "${PN}-module-integer"
-RDEPENDS_${PN}-module-universal += "${PN}-module-carp"
-RDEPENDS_${PN}-module-user-grent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-user-grent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-user-grent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-user-grent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-carp"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-class-struct"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-config"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-exporter"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-strict"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-vars"
-RDEPENDS_${PN}-module-user-pwent += "${PN}-module-warnings"
-RDEPENDS_${PN}-module-utf8 += "${PN}-module-carp"
-RDEPENDS_${PN}-module-utf8 += "${PN}-module-utf8-heavy"
-RDEPENDS_${PN}-module-version += "${PN}-module-strict"
-RDEPENDS_${PN}-module-version += "${PN}-module-vars"
-RDEPENDS_${PN}-module-version += "${PN}-module-version-regex"
-RDEPENDS_${PN}-module-version-regex += "${PN}-module-strict"
-RDEPENDS_${PN}-module-version-regex += "${PN}-module-vars"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-b"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-carp"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-config"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-constant"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-if"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-overload"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-posix"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-strict"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-universal"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-vars"
-RDEPENDS_${PN}-module-version-vpp += "${PN}-module-version-regex"
-RDEPENDS_${PN}-module-xsloader += "${PN}-module-carp"
-RDEPENDS_${PN}-module-xsloader += "${PN}-module-dynaloader"
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc b/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc
new file mode 100644
index 0000000..830ecce
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/perl/perl-rdepends_5.22.1.inc
@@ -0,0 +1,2562 @@
+# To create/update the perl-rdepends_${PV}.inc use this piece of ugly script (modified for your arch/paths etc):
+
+#jiahongxu:5.20.0-r1$ pwd
+#/home/jiahongxu/yocto/build-20140618-perl/tmp/work/i586-poky-linux/perl/5.20.0-r1
+
+#1 cp -r packages-split packages-split.new && cd packages-split.new
+#2 find . -name \*.pm | xargs sed -i '/^=head/,/^=cut/d'
+#3 egrep -r "^\s*(\<use .*|\<require .*);?" perl-module-* --include="*.pm" 
+#| sed "s/\/.*\.pm: */ += /g;s/[\"\']//g;s/;.*/\"/g;s/+= .*\(require\|use\)\> */+= \"perl-module-/g;s/CPANPLUS::.*/cpanplus/g;s/CPAN::.*/cpan/g;s/::/-/g;s/ [^+\"].*//g;s/_/-/g;s/\.pl\"$/\"/;s/\"\?\$/\"/;s/(//;" | tr [:upper:] [:lower:] 
+#| awk '{if ($3 != "\x22"$1"\x22"){ print $0}}'
+#| grep -v -e "\-vms\-" -e module-5 -e "^$" -e "\\$" -e your -e tk -e autoperl -e html -e http -e parse-cpan -e perl-ostype -e ndbm-file -e module-mac -e fcgi -e lwp -e dbd -e dbix 
+#| sort -u 
+#| sed 's/^/RDEPENDS_/;s/perl-module-/${PN}-module-/g;s/module-\(module-\)/\1/g;s/\(module-load\)-conditional/\1/g;s/encode-configlocal/&-pm/;' 
+#| egrep -wv '=>|module-a|module-apache.?|module-apr|module-authen-sasl|module-b-asmdata|module-convert-ebcdic|module-devel-size|module-digest-perl-md5|module-dumpvalue|module-extutils-constant-aaargh56hash|module-extutils-xssymset|module-file-bsdglob|module-for|module-it|module-io-string|module-ipc-system-simple|module-lexical|module-local-lib|metadata|module-modperl-util|module-pluggable-object|module-test-builder-io-scalar|module-text-unidecode|module-win32|objects\sload|syscall.ph|systeminfo.ph|%s' > /tmp/perl-rdepends
+
+RDEPENDS_perl-misc += "perl perl-modules"
+RDEPENDS_${PN}-pod += "perl"
+
+# Some additional dependencies that the above doesn't manage to figure out
+RDEPENDS_${PN}-module-file-spec += "${PN}-module-file-spec-unix"
+DEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigint-calc"
+RDEPENDS_${PN}-module-thread-queue += "${PN}-module-attributes"
+
+
+# Depends list
+# copy contents of /tmp/perl-rdepends in this file
+RDEPENDS_${PN}-module-anydbm-file += "${PN}-module-strict"
+RDEPENDS_${PN}-module-anydbm-file += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-carp"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-config"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-constant"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-cpan"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-data-dumper"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-file-spec-functions"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-getopt-std"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-if"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-net-ping"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-strict"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-user-pwent"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-vars"
+RDEPENDS_${PN}-module-app-cpan += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-app-prove-state"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-base"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-carp"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-constant"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-getopt-long"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-strict"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-tap-harness"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-tap-harness-env"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-app-prove += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-app-prove-state-result"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-base"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-carp"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-constant"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-strict"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-tap-parser-yamlish-reader"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-tap-parser-yamlish-writer"
+RDEPENDS_${PN}-module-app-prove-state += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-app-prove-state-result-test"
+RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-carp"
+RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-constant"
+RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-strict"
+RDEPENDS_${PN}-module-app-prove-state-result += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-app-prove-state-result-test += "${PN}-module-strict"
+RDEPENDS_${PN}-module-app-prove-state-result-test += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-constant"
+RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-io-compress-bzip2"
+RDEPENDS_${PN}-module-archive-tar-constant += "${PN}-module-time-local"
+RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-archive-tar"
+RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-archive-tar-constant"
+RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-carp"
+RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-io-file"
+RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-strict"
+RDEPENDS_${PN}-module-archive-tar-file += "${PN}-module-vars"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-archive-tar-constant"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-archive-tar-file"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-carp"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-config"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-io-file"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-io-zlib"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-strict"
+RDEPENDS_${PN}-module-archive-tar += "${PN}-module-vars"
+RDEPENDS_${PN}-module-arybase += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-carp"
+RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-strict"
+RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-vars"
+RDEPENDS_${PN}-module-attribute-handlers += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-attributes += "${PN}-module-carp"
+RDEPENDS_${PN}-module-attributes += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-attributes += "${PN}-module-strict"
+RDEPENDS_${PN}-module-attributes += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-attributes += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-carp"
+RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-constant"
+RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-fatal"
+RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-overload"
+RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-strict"
+RDEPENDS_${PN}-module-autodie-exception += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-carp"
+RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-parent"
+RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-strict"
+RDEPENDS_${PN}-module-autodie-exception-system += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-b"
+RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-carp"
+RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-constant"
+RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-strict"
+RDEPENDS_${PN}-module-autodie-hints += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-autodie += "${PN}-module-carp"
+RDEPENDS_${PN}-module-autodie += "${PN}-module-constant"
+RDEPENDS_${PN}-module-autodie += "${PN}-module-lib"
+RDEPENDS_${PN}-module-autodie += "${PN}-module-parent"
+RDEPENDS_${PN}-module-autodie += "${PN}-module-strict"
+RDEPENDS_${PN}-module-autodie += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-autodie-scope-guard += "${PN}-module-strict"
+RDEPENDS_${PN}-module-autodie-scope-guard += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-autodie-scope-guardstack += "${PN}-module-autodie-scope-guard"
+RDEPENDS_${PN}-module-autodie-scope-guardstack += "${PN}-module-strict"
+RDEPENDS_${PN}-module-autodie-scope-guardstack += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-autodie-scope-guardstack"
+RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-strict"
+RDEPENDS_${PN}-module-autodie-scopeutil += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-autodie-skip += "${PN}-module-strict"
+RDEPENDS_${PN}-module-autodie-skip += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-autoloader += "${PN}-module-carp"
+RDEPENDS_${PN}-module-autoloader += "${PN}-module-strict"
+RDEPENDS_${PN}-module-autosplit += "${PN}-module-carp"
+RDEPENDS_${PN}-module-autosplit += "${PN}-module-config"
+RDEPENDS_${PN}-module-autosplit += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-autosplit += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-autosplit += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-autosplit += "${PN}-module-file-spec-functions"
+RDEPENDS_${PN}-module-autosplit += "${PN}-module-strict"
+RDEPENDS_${PN}-module-autouse += "${PN}-module-carp"
+RDEPENDS_${PN}-module-base += "${PN}-module-carp"
+RDEPENDS_${PN}-module-base += "${PN}-module-strict"
+RDEPENDS_${PN}-module-base += "${PN}-module-vars"
+RDEPENDS_${PN}-module-b-concise += "${PN}-module-b"
+RDEPENDS_${PN}-module-b-concise += "${PN}-module-b-op-private"
+RDEPENDS_${PN}-module-b-concise += "${PN}-module-config"
+RDEPENDS_${PN}-module-b-concise += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-b-concise += "${PN}-module-strict"
+RDEPENDS_${PN}-module-b-concise += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-b-debug += "${PN}-module-b"
+RDEPENDS_${PN}-module-b-debug += "${PN}-module-config"
+RDEPENDS_${PN}-module-b-debug += "${PN}-module-strict"
+RDEPENDS_${PN}-module-b-deparse += "${PN}-module-b"
+RDEPENDS_${PN}-module-b-deparse += "${PN}-module-carp"
+RDEPENDS_${PN}-module-b-deparse += "${PN}-module-data-dumper"
+RDEPENDS_${PN}-module-b-deparse += "${PN}-module-feature"
+RDEPENDS_${PN}-module-b-deparse += "${PN}-module-overloading"
+RDEPENDS_${PN}-module-b-deparse += "${PN}-module-re"
+RDEPENDS_${PN}-module-b-deparse += "${PN}-module-strict"
+RDEPENDS_${PN}-module-b-deparse += "${PN}-module-vars"
+RDEPENDS_${PN}-module-b-deparse += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-benchmark += "${PN}-module-carp"
+RDEPENDS_${PN}-module-benchmark += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-benchmark += "${PN}-module-strict"
+RDEPENDS_${PN}-module-bigint += "${PN}-module-carp"
+RDEPENDS_${PN}-module-bigint += "${PN}-module-constant"
+RDEPENDS_${PN}-module-bigint += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-bigint += "${PN}-module-math-bigint"
+RDEPENDS_${PN}-module-bigint += "${PN}-module-math-bigint-trace"
+RDEPENDS_${PN}-module-bigint += "${PN}-module-overload"
+RDEPENDS_${PN}-module-bigint += "${PN}-module-strict"
+RDEPENDS_${PN}-module-bigint += "${PN}-module-vars"
+RDEPENDS_${PN}-module-bignum += "${PN}-module-bigint"
+RDEPENDS_${PN}-module-bignum += "${PN}-module-carp"
+RDEPENDS_${PN}-module-bignum += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigfloat"
+RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigfloat-trace"
+RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigint"
+RDEPENDS_${PN}-module-bignum += "${PN}-module-math-bigint-trace"
+RDEPENDS_${PN}-module-bignum += "${PN}-module-overload"
+RDEPENDS_${PN}-module-bignum += "${PN}-module-strict"
+RDEPENDS_${PN}-module-bignum += "${PN}-module-vars"
+RDEPENDS_${PN}-module-bigrat += "${PN}-module-bigint"
+RDEPENDS_${PN}-module-bigrat += "${PN}-module-carp"
+RDEPENDS_${PN}-module-bigrat += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigfloat"
+RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigint"
+RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigint-trace"
+RDEPENDS_${PN}-module-bigrat += "${PN}-module-math-bigrat"
+RDEPENDS_${PN}-module-bigrat += "${PN}-module-overload"
+RDEPENDS_${PN}-module-bigrat += "${PN}-module-strict"
+RDEPENDS_${PN}-module-bigrat += "${PN}-module-vars"
+RDEPENDS_${PN}-module-blib += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-blib += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-blib += "${PN}-module-vars"
+RDEPENDS_${PN}-module-b += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-b += "${PN}-module-strict"
+RDEPENDS_${PN}-module-b += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-b-showlex += "${PN}-module-b"
+RDEPENDS_${PN}-module-b-showlex += "${PN}-module-b-concise"
+RDEPENDS_${PN}-module-b-showlex += "${PN}-module-b-terse"
+RDEPENDS_${PN}-module-b-showlex += "${PN}-module-strict"
+RDEPENDS_${PN}-module-b-terse += "${PN}-module-b"
+RDEPENDS_${PN}-module-b-terse += "${PN}-module-b-concise"
+RDEPENDS_${PN}-module-b-terse += "${PN}-module-carp"
+RDEPENDS_${PN}-module-b-terse += "${PN}-module-strict"
+RDEPENDS_${PN}-module-b-xref += "${PN}-module-b"
+RDEPENDS_${PN}-module-b-xref += "${PN}-module-config"
+RDEPENDS_${PN}-module-b-xref += "${PN}-module-strict"
+RDEPENDS_${PN}-module-bytes += "${PN}-module-bytes-heavy"
+RDEPENDS_${PN}-module-bytes += "${PN}-module-carp"
+RDEPENDS_${PN}-module-carp-heavy += "${PN}-module-carp"
+RDEPENDS_${PN}-module-carp += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-carp += "${PN}-module-strict"
+RDEPENDS_${PN}-module-carp += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-charnames += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-charnames += "${PN}-module-carp"
+RDEPENDS_${PN}-module-charnames += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-charnames += "${PN}-module-re"
+RDEPENDS_${PN}-module-charnames += "${PN}-module-strict"
+RDEPENDS_${PN}-module-charnames += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-class-struct += "${PN}-module-carp"
+RDEPENDS_${PN}-module-class-struct += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-class-struct += "${PN}-module-strict"
+RDEPENDS_${PN}-module-class-struct += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-bytes "
+RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-carp "
+RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-constant"
+RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-strict "
+RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-warnings "
+RDEPENDS_${PN}-module-compress-raw-bzip2 += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-bytes "
+RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-carp "
+RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-constant"
+RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-strict "
+RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-warnings "
+RDEPENDS_${PN}-module-compress-raw-zlib += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-bytes "
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-carp "
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-compress-raw-zlib"
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-constant"
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-compress-gzip"
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-compress-gzip-constants"
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-handle "
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-io-uncompress-gunzip"
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-strict "
+RDEPENDS_${PN}-module-compress-zlib += "${PN}-module-warnings "
+RDEPENDS_${PN}-module-config-extensions += "${PN}-module-config"
+RDEPENDS_${PN}-module-config-extensions += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-config-extensions += "${PN}-module-strict"
+RDEPENDS_${PN}-module-config-extensions += "${PN}-module-vars"
+RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-config"
+RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-strict"
+RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-vars"
+RDEPENDS_${PN}-module-config-perl-v += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-constant += "${PN}-module-carp"
+RDEPENDS_${PN}-module-constant += "${PN}-module-strict"
+RDEPENDS_${PN}-module-constant += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-corelist += "${PN}-module-list-util"
+RDEPENDS_${PN}-module-corelist += "${PN}-module-strict"
+RDEPENDS_${PN}-module-corelist += "${PN}-module-vars"
+RDEPENDS_${PN}-module-corelist += "${PN}-module-version"
+RDEPENDS_${PN}-module-corelist += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-b"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-carp"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-config"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-data-dumper"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-dirhandle"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-extutils-manifest"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-file-copy"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-filehandle"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-lib"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-net-ping"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-overload"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-posix"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-safe"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-strict"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-sys-hostname"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-term-readline"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-text-wrap"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-time-local"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-vars"
+RDEPENDS_${PN}-module-cpan += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-cwd += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-cwd += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-cwd += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-cwd += "${PN}-module-strict"
+RDEPENDS_${PN}-module-cwd += "${PN}-module-vars"
+RDEPENDS_${PN}-module-cwd += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-data-dumper += "${PN}-module-b-deparse"
+RDEPENDS_${PN}-module-data-dumper += "${PN}-module-carp"
+RDEPENDS_${PN}-module-data-dumper += "${PN}-module-config"
+RDEPENDS_${PN}-module-data-dumper += "${PN}-module-constant"
+RDEPENDS_${PN}-module-data-dumper += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-data-dumper += "${PN}-module-overload"
+RDEPENDS_${PN}-module-data-dumper += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-data-dumper += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-dbm-filter-compress += "${PN}-module-carp"
+RDEPENDS_${PN}-module-dbm-filter-compress += "${PN}-module-strict"
+RDEPENDS_${PN}-module-dbm-filter-compress += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-dbm-filter-encode += "${PN}-module-carp"
+RDEPENDS_${PN}-module-dbm-filter-encode += "${PN}-module-strict"
+RDEPENDS_${PN}-module-dbm-filter-encode += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-dbm-filter-int32 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-dbm-filter-int32 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-dbm-filter-null += "${PN}-module-strict"
+RDEPENDS_${PN}-module-dbm-filter-null += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-dbm-filter += "${PN}-module-carp"
+RDEPENDS_${PN}-module-dbm-filter += "${PN}-module-strict"
+RDEPENDS_${PN}-module-dbm-filter += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-dbm-filter-utf8 += "${PN}-module-carp"
+RDEPENDS_${PN}-module-dbm-filter-utf8 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-dbm-filter-utf8 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-db += "${PN}-module-strict"
+RDEPENDS_${PN}-module-deprecate += "${PN}-module-carp"
+RDEPENDS_${PN}-module-deprecate += "${PN}-module-strict"
+RDEPENDS_${PN}-module-deprecate += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-devel-peek += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-devel-peek += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-getopt-long"
+RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-strict"
+RDEPENDS_${PN}-module-devel-ppport += "${PN}-module-vars"
+RDEPENDS_${PN}-module-devel-selfstubber += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-devel-selfstubber += "${PN}-module-selfloader"
+RDEPENDS_${PN}-module-diagnostics += "${PN}-module-carp"
+RDEPENDS_${PN}-module-diagnostics += "${PN}-module-config"
+RDEPENDS_${PN}-module-diagnostics += "${PN}-module-getopt-std"
+RDEPENDS_${PN}-module-diagnostics += "${PN}-module-strict"
+RDEPENDS_${PN}-module-diagnostics += "${PN}-module-text-tabs"
+RDEPENDS_${PN}-module-digest-base += "${PN}-module-carp"
+RDEPENDS_${PN}-module-digest-base += "${PN}-module-mime-base64"
+RDEPENDS_${PN}-module-digest-base += "${PN}-module-strict"
+RDEPENDS_${PN}-module-digest-base += "${PN}-module-vars"
+RDEPENDS_${PN}-module-digest-file += "${PN}-module-carp"
+RDEPENDS_${PN}-module-digest-file += "${PN}-module-digest"
+RDEPENDS_${PN}-module-digest-file += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-digest-file += "${PN}-module-strict"
+RDEPENDS_${PN}-module-digest-file += "${PN}-module-vars"
+RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-digest-base"
+RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-vars"
+RDEPENDS_${PN}-module-digest-md5 += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-digest += "${PN}-module-strict"
+RDEPENDS_${PN}-module-digest += "${PN}-module-vars"
+RDEPENDS_${PN}-module-digest-sha += "${PN}-module-carp"
+RDEPENDS_${PN}-module-digest-sha += "${PN}-module-digest-base"
+RDEPENDS_${PN}-module-digest-sha += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-digest-sha += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-digest-sha += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-digest-sha += "${PN}-module-integer"
+RDEPENDS_${PN}-module-digest-sha += "${PN}-module-strict"
+RDEPENDS_${PN}-module-digest-sha += "${PN}-module-vars"
+RDEPENDS_${PN}-module-digest-sha += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-dirhandle += "${PN}-module-carp"
+RDEPENDS_${PN}-module-dirhandle += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-dynaloader += "${PN}-module-carp"
+RDEPENDS_${PN}-module-dynaloader += "${PN}-module-config"
+RDEPENDS_${PN}-module-encode-alias += "${PN}-module-constant"
+RDEPENDS_${PN}-module-encode-alias += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-alias += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-encode-alias += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-alias += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-byte += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-byte += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-byte += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-byte += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-carp"
+RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-cjkconstants += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-parent"
+RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-vars"
+RDEPENDS_${PN}-module-encode-cn-hz += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-cn += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-cn += "${PN}-module-encode-cn-hz"
+RDEPENDS_${PN}-module-encode-cn += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-cn += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-cn += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-encode-config += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-config += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-ebcdic += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-carp"
+RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-constant"
+RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-overload"
+RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-encoder += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-carp"
+RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-encode-mime-name"
+RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-encoding += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-carp"
+RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-parent"
+RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-vars"
+RDEPENDS_${PN}-module-encode-gsm0338 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-guess += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-encode-guess += "${PN}-module-carp"
+RDEPENDS_${PN}-module-encode-guess += "${PN}-module-constant"
+RDEPENDS_${PN}-module-encode-guess += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-guess += "${PN}-module-encode-unicode"
+RDEPENDS_${PN}-module-encode-guess += "${PN}-module-parent"
+RDEPENDS_${PN}-module-encode-guess += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-guess += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-encode-cjkconstants"
+RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-vars"
+RDEPENDS_${PN}-module-encode-jp-h2z += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-encode-cjkconstants"
+RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-encode-jp-h2z"
+RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-parent"
+RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-jp-jis7 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-jp += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-jp += "${PN}-module-encode-jp-jis7"
+RDEPENDS_${PN}-module-encode-jp += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-jp += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-jp += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-encode-cjkconstants"
+RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-parent"
+RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-kr-2022-kr += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-kr += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-kr += "${PN}-module-encode-kr-2022-kr"
+RDEPENDS_${PN}-module-encode-kr += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-kr += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-kr += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-constant"
+RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-encode-cjkconstants"
+RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-parent"
+RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-mime-header-iso-2022-jp += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-carp"
+RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-constant"
+RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-mime-base64"
+RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-parent"
+RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-encode-mime-header += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-mime-name += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-mime-name += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-encode += "${PN}-module-carp"
+RDEPENDS_${PN}-module-encode += "${PN}-module-constant"
+RDEPENDS_${PN}-module-encode += "${PN}-module-encode-alias"
+RDEPENDS_${PN}-module-encode += "${PN}-module-encode-config"
+RDEPENDS_${PN}-module-encode += "${PN}-module-encode-configlocal-pm"
+RDEPENDS_${PN}-module-encode += "${PN}-module-encode-encoding"
+RDEPENDS_${PN}-module-encode += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-encode += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-symbol += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-encode-tw += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-tw += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-tw += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-tw += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-parent"
+RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encode-unicode += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-mime-base64"
+RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-parent"
+RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-re"
+RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encode-unicode-utf7 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encoding += "${PN}-module-carp"
+RDEPENDS_${PN}-module-encoding += "${PN}-module-config"
+RDEPENDS_${PN}-module-encoding += "${PN}-module-constant"
+RDEPENDS_${PN}-module-encoding += "${PN}-module-encode"
+RDEPENDS_${PN}-module-encoding += "${PN}-module-filter-util-call"
+RDEPENDS_${PN}-module-encoding += "${PN}-module-i18n-langinfo"
+RDEPENDS_${PN}-module-encoding += "${PN}-module-strict"
+RDEPENDS_${PN}-module-encoding += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-encoding += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-encoding-warnings += "${PN}-module-carp"
+RDEPENDS_${PN}-module-encoding-warnings += "${PN}-module-strict"
+RDEPENDS_${PN}-module-english += "${PN}-module-carp "
+RDEPENDS_${PN}-module-english += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-env += "${PN}-module-config"
+RDEPENDS_${PN}-module-env += "${PN}-module-tie-array"
+RDEPENDS_${PN}-module-errno += "${PN}-module-carp"
+RDEPENDS_${PN}-module-errno += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-errno += "${PN}-module-strict"
+RDEPENDS_${PN}-module-experimental += "${PN}-module-carp"
+RDEPENDS_${PN}-module-experimental += "${PN}-module-feature"
+RDEPENDS_${PN}-module-experimental += "${PN}-module-strict"
+RDEPENDS_${PN}-module-experimental += "${PN}-module-version"
+RDEPENDS_${PN}-module-experimental += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-exporter-heavy += "${PN}-module-carp"
+RDEPENDS_${PN}-module-exporter-heavy += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-exporter-heavy += "${PN}-module-strict"
+RDEPENDS_${PN}-module-exporter += "${PN}-module-exporter-heavy"
+RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-extutils-mksymlists"
+RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-file-temp"
+RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-ipc-cmd"
+RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-cbuilder-base += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-cbuilder += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-extutils-cbuilder-platform-unix"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-aix += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-extutils-cbuilder-platform-unix"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-android += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-extutils-cbuilder-platform-unix"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-cygwin += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-darwin += "${PN}-module-extutils-cbuilder-platform-unix"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-darwin += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-darwin += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-extutils-cbuilder-platform-unix"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-dec-osf += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-os2 += "${PN}-module-extutils-cbuilder-platform-unix"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-os2 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-os2 += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-unix += "${PN}-module-extutils-cbuilder-base"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-unix += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-unix += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-extutils-cbuilder-base"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-file-spec-functions"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-vms += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-extutils-cbuilder-base"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-io-file"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-cbuilder-platform-windows += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-extutils-command"
+RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-extutils-install"
+RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-getopt-long"
+RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-test-harness"
+RDEPENDS_${PN}-module-extutils-command-mm += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-command += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-command += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-copy"
+RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-extutils-command += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-command += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-command += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-constant"
+RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-extutils-constant-utils"
+RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-text-wrap"
+RDEPENDS_${PN}-module-extutils-constant-base += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-extutils-constant-proxysubs"
+RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-extutils-constant-utils"
+RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-extutils-constant-xs"
+RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-filehandle"
+RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-constant += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-extutils-constant-utils"
+RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-extutils-constant-xs"
+RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-constant-proxysubs += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-constant"
+RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-posix"
+RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-constant-utils += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-data-dumper"
+RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-extutils-constant"
+RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-extutils-constant-base"
+RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-extutils-constant-utils"
+RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-constant-xs += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-extutils-liblist"
+RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-getopt-std"
+RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-embed += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-data-dumper"
+RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-extutils-packlist"
+RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-installed += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-autosplit"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-extutils-packlist"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-compare"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-copy"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-install += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-extutils-liblist-kid += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-liblist += "${PN}-module-extutils-liblist-kid"
+RDEPENDS_${PN}-module-extutils-liblist += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-liblist += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-makemaker-config += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-makemaker-config += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-base"
+RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-encode"
+RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-encode-alias"
+RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-i18n-langinfo"
+RDEPENDS_${PN}-module-extutils-makemaker-locale += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-b"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-makemaker-version"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-manifest"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-mm"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-extutils-my"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-makemaker += "${PN}-module-version"
+RDEPENDS_${PN}-module-extutils-makemaker-version += "${PN}-module-extutils-makemaker-version-regex"
+RDEPENDS_${PN}-module-extutils-makemaker-version += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-makemaker-version += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-makemaker-version-regex += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-makemaker-version-regex += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-b"
+RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-constant"
+RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-extutils-makemaker-version-regex"
+RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-locale"
+RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-overload"
+RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-universal"
+RDEPENDS_${PN}-module-extutils-makemaker-version-vpp += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-copy"
+RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-manifest += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-extutils-embed"
+RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-miniperl += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-mkbootstrap += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-mksymlists += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-aix += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-extutils-mm-aix += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-aix += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-autosplit"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-cpan"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-data-dumper"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-any += "${PN}-module-version"
+RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-extutils-mm-any"
+RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-mm-beos += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-extutils-mm-win32"
+RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-mm-cygwin += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-darwin += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-darwin += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-dos += "${PN}-module-extutils-mm-any"
+RDEPENDS_${PN}-module-extutils-mm-dos += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-dos += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-macos += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-extutils-mm-win32"
+RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-mm-nw5 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-extutils-mm-any"
+RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-mm-os2 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-extutils-liblist"
+RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-mm += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-qnx += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-qnx += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-dirhandle"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-encode"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-liblist"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-extutils-mm-any"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-mm-unix += "${PN}-module-version"
+RDEPENDS_${PN}-module-extutils-mm-uwin += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-uwin += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-liblist-kid"
+RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-mm-any"
+RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-extutils-mm-vms += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-vos += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-vos += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-mm-any"
+RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-extutils-mm-unix"
+RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-mm-win32 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-mm-win95 += "${PN}-module-extutils-makemaker-config"
+RDEPENDS_${PN}-module-extutils-mm-win95 += "${PN}-module-extutils-mm-win32"
+RDEPENDS_${PN}-module-extutils-mm-win95 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-my += "${PN}-module-extutils-mm"
+RDEPENDS_${PN}-module-extutils-my += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-carp"
+RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-packlist += "${PN}-module-vars"
+RDEPENDS_${PN}-module-extutils-parsexs-constants += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-parsexs-constants += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-extutils-parsexs-constants += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-parsexs-countlines += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-parsexs-eval += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-parsexs-eval += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-config"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-constants"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-countlines"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-eval"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-extutils-parsexs-utilities"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-re"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-parsexs += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-extutils-parsexs-constants"
+RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-extutils-typemaps"
+RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-parsexs-utilities += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-lib"
+RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-testlib += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-extutils-typemaps"
+RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-typemaps-cmd += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-typemaps-inputmap += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-typemaps-inputmap += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-typemaps-outputmap += "${PN}-module-re"
+RDEPENDS_${PN}-module-extutils-typemaps-outputmap += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-typemaps-outputmap += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-parsexs"
+RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-parsexs-constants"
+RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-typemaps-inputmap"
+RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-typemaps-outputmap"
+RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-extutils-typemaps-type"
+RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-typemaps += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-extutils-typemaps-type += "${PN}-module-extutils-typemaps"
+RDEPENDS_${PN}-module-extutils-typemaps-type += "${PN}-module-strict"
+RDEPENDS_${PN}-module-extutils-typemaps-type += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-autodie-exception-system"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-autodie-hints"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-autodie-scopeutil"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-carp"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-config"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-constant"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-posix"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-strict"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-tie-refhash"
+RDEPENDS_${PN}-module-fatal += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-fcntl += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-fcntl += "${PN}-module-strict"
+RDEPENDS_${PN}-module-fcntl += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-feature += "${PN}-module-carp"
+RDEPENDS_${PN}-module-fields += "${PN}-module-base"
+RDEPENDS_${PN}-module-fields += "${PN}-module-carp"
+RDEPENDS_${PN}-module-fields += "${PN}-module-hash-util"
+RDEPENDS_${PN}-module-fields += "${PN}-module-strict"
+RDEPENDS_${PN}-module-fields += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-basename += "${PN}-module-carp"
+RDEPENDS_${PN}-module-file-basename += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-file-basename += "${PN}-module-re"
+RDEPENDS_${PN}-module-file-basename += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-basename += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-filecache += "${PN}-module-carp"
+RDEPENDS_${PN}-module-filecache += "${PN}-module-parent"
+RDEPENDS_${PN}-module-filecache += "${PN}-module-strict"
+RDEPENDS_${PN}-module-filecache += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-compare += "${PN}-module-carp"
+RDEPENDS_${PN}-module-file-compare += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-file-compare += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-compare += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-file-copy += "${PN}-module-carp"
+RDEPENDS_${PN}-module-file-copy += "${PN}-module-config"
+RDEPENDS_${PN}-module-file-copy += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-file-copy += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-file-copy += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-file-copy += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-copy += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-file-dosglob += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-carp"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-constant"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-copy"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-filehandle"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-file-temp"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-ipc-cmd"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-locale-maketext-simple"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-load"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-params-check"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-fetch += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-find += "${PN}-module-config"
+RDEPENDS_${PN}-module-file-find += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-file-find += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-file-find += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-file-find += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-file-find += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-find += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-file-find += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-carp"
+RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-file-glob"
+RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-globmapper += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-file-glob += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-file-glob += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-glob += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-filehandle += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-filehandle += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-filehandle += "${PN}-module-io-file"
+RDEPENDS_${PN}-module-filehandle += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-path += "${PN}-module-carp"
+RDEPENDS_${PN}-module-file-path += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-file-path += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-file-path += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-file-path += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-file-path += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-path += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-spec-cygwin += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-file-spec-cygwin += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-spec-cygwin += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-spec-epoc += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-file-spec-epoc += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-spec-epoc += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-spec-functions += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-spec-mac += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-file-spec-mac += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-spec-mac += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-spec-os2 += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-file-spec-os2 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-spec-os2 += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-spec += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-spec += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-constant"
+RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-spec-unix += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-spec-vms += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-cwd "
+RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-file-spec-unix"
+RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-spec-win32 += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-carp"
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-constant"
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-overload "
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-vars"
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-file-stat += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-carp"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-constant"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-errno"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-io-seekable"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-overload"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-parent"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-posix"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-strict"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-file-temp += "${PN}-module-vars"
+RDEPENDS_${PN}-module-filter-simple += "${PN}-module-carp"
+RDEPENDS_${PN}-module-filter-simple += "${PN}-module-filter-util-call"
+RDEPENDS_${PN}-module-filter-simple += "${PN}-module-text-balanced"
+RDEPENDS_${PN}-module-filter-simple += "${PN}-module-vars"
+RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-carp "
+RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-strict"
+RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-vars"
+RDEPENDS_${PN}-module-filter-util-call += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-findbin += "${PN}-module-carp"
+RDEPENDS_${PN}-module-findbin += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-findbin += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-findbin += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-findbin += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-getopt-long += "${PN}-module-constant"
+RDEPENDS_${PN}-module-getopt-long += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-getopt-long += "${PN}-module-overload"
+RDEPENDS_${PN}-module-getopt-long += "${PN}-module-pod-usage"
+RDEPENDS_${PN}-module-getopt-long += "${PN}-module-strict"
+RDEPENDS_${PN}-module-getopt-long += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-getopt-long += "${PN}-module-vars"
+RDEPENDS_${PN}-module-getopt-std += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-strict"
+RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-hash-util-fieldhash += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-hash-util += "${PN}-module-carp"
+RDEPENDS_${PN}-module-hash-util += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-hash-util += "${PN}-module-hash-util-fieldhash"
+RDEPENDS_${PN}-module-hash-util += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-hash-util += "${PN}-module-strict"
+RDEPENDS_${PN}-module-hash-util += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-hash-util += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-hash-util += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-overload"
+RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-posix"
+RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-strict"
+RDEPENDS_${PN}-module-i18n-collate += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-carp"
+RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-strict"
+RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-i18n-langinfo += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-i18n-langtags-detect += "${PN}-module-i18n-langtags"
+RDEPENDS_${PN}-module-i18n-langtags-detect += "${PN}-module-strict"
+RDEPENDS_${PN}-module-i18n-langtags-detect += "${PN}-module-vars"
+RDEPENDS_${PN}-module-i18n-langtags-list += "${PN}-module-strict"
+RDEPENDS_${PN}-module-i18n-langtags-list += "${PN}-module-vars"
+RDEPENDS_${PN}-module-i18n-langtags += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-i18n-langtags += "${PN}-module-strict"
+RDEPENDS_${PN}-module-i18n-langtags += "${PN}-module-vars"
+RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-compress-raw-bzip2"
+RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-compress-adapter-bzip2 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-compress-raw-zlib"
+RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-compress-adapter-deflate += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-compress-adapter-identity += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-constant"
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-encode"
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-file-globmapper"
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-io-compress-base-common += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-io-file"
+RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-io-handle "
+RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-io-compress-base += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-io-compress-adapter-bzip2"
+RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-io-compress-base"
+RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-bzip2 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-adapter-deflate"
+RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-rawdeflate"
+RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-io-compress-zlib-constants"
+RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-deflate += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-constant"
+RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-gzip-constants += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-adapter-deflate"
+RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-gzip-constants"
+RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-rawdeflate"
+RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-io-compress-zlib-extra"
+RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-gzip += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-compress-raw-zlib"
+RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-io-compress-adapter-deflate"
+RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-io-compress-base"
+RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-rawdeflate += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-constant"
+RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-zip-constants += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-compress-raw-zlib"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-config"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-adapter-deflate"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-adapter-identity"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-bzip2 "
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-rawdeflate"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-zip-constants"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-io-compress-zlib-extra"
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-zip += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-constant"
+RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-zlib-constants += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-io-compress-gzip-constants"
+RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-compress-zlib-extra += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-dir += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-dir += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-dir += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-io-dir += "${PN}-module-file-stat"
+RDEPENDS_${PN}-module-io-dir += "${PN}-module-io-file"
+RDEPENDS_${PN}-module-io-dir += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-dir += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-io-dir += "${PN}-module-tie-hash"
+RDEPENDS_${PN}-module-io-file += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-file += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-file += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-io-file += "${PN}-module-io-seekable"
+RDEPENDS_${PN}-module-io-file += "${PN}-module-selectsaver"
+RDEPENDS_${PN}-module-io-file += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-file += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-io-handle += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-handle += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-handle += "${PN}-module-io"
+RDEPENDS_${PN}-module-io-handle += "${PN}-module-io-file"
+RDEPENDS_${PN}-module-io-handle += "${PN}-module-selectsaver"
+RDEPENDS_${PN}-module-io-handle += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-handle += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-io += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-io-pipe += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-pipe += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-io-pipe += "${PN}-module-io-handle"
+RDEPENDS_${PN}-module-io-pipe += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-pipe += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-io-poll += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-poll += "${PN}-module-io-handle"
+RDEPENDS_${PN}-module-io-poll += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-seekable += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-seekable += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-seekable += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-io-seekable += "${PN}-module-io-handle"
+RDEPENDS_${PN}-module-io-seekable += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-select += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-select += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-select += "${PN}-module-vars"
+RDEPENDS_${PN}-module-io-select += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-errno"
+RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-io-socket"
+RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-socket"
+RDEPENDS_${PN}-module-io-socket-inet += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-base"
+RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-constant"
+RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-errno"
+RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-posix"
+RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-socket"
+RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-socket-ip += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-socket += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-socket += "${PN}-module-errno"
+RDEPENDS_${PN}-module-io-socket += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-handle"
+RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-select"
+RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-socket-inet"
+RDEPENDS_${PN}-module-io-socket += "${PN}-module-io-socket-unix"
+RDEPENDS_${PN}-module-io-socket += "${PN}-module-socket"
+RDEPENDS_${PN}-module-io-socket += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-socket-unix += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-socket-unix += "${PN}-module-io-socket"
+RDEPENDS_${PN}-module-io-socket-unix += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-compress-raw-bzip2"
+RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-uncompress-adapter-bunzip2 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-compress-raw-zlib"
+RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-io-compress-zip-constants "
+RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-uncompress-adapter-identity += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-compress-raw-zlib"
+RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-uncompress-adapter-inflate += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-adapter-inflate"
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-base"
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-gunzip"
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-inflate"
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-rawinflate"
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-io-uncompress-unzip"
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-uncompress-anyinflate += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-io-uncompress-base"
+RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-uncompress-anyuncompress += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-carp "
+RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-constant"
+RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-io-file "
+RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-list-util"
+RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-io-uncompress-base += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-io-uncompress-adapter-bunzip2"
+RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-io-uncompress-base"
+RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-uncompress-bunzip2 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-compress-raw-zlib"
+RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-compress-gzip-constants"
+RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-compress-zlib-extra"
+RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-io-uncompress-rawinflate"
+RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-uncompress-gunzip += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-io-compress-zlib-constants"
+RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-io-uncompress-rawinflate"
+RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-uncompress-inflate += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-compress-raw-zlib"
+RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-io-uncompress-adapter-inflate"
+RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-io-uncompress-base"
+RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-uncompress-rawinflate += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-compress-raw-zlib"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-constant"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-exporter "
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-compress-base-common"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-compress-zip-constants"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-compress-zlib-extra"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-file"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-uncompress-adapter-identity"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-uncompress-adapter-inflate"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-io-uncompress-rawinflate"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-posix"
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-strict "
+RDEPENDS_${PN}-module-io-uncompress-unzip += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-io-zlib += "${PN}-module-carp"
+RDEPENDS_${PN}-module-io-zlib += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-io-zlib += "${PN}-module-io-handle"
+RDEPENDS_${PN}-module-io-zlib += "${PN}-module-strict"
+RDEPENDS_${PN}-module-io-zlib += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-io-zlib += "${PN}-module-tie-handle"
+RDEPENDS_${PN}-module-io-zlib += "${PN}-module-vars"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-carp"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-constant"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-extutils-makemaker"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-filehandle"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-io-handle"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-io-select"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-ipc-open3"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-locale-maketext-simple"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-load"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-params-check"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-posix"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-socket"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-strict"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-time-hires"
+RDEPENDS_${PN}-module-ipc-cmd += "${PN}-module-vars"
+RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-carp"
+RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-ipc-sysv"
+RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-strict"
+RDEPENDS_${PN}-module-ipc-msg += "${PN}-module-vars"
+RDEPENDS_${PN}-module-ipc-open2 += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-ipc-open2 += "${PN}-module-ipc-open3"
+RDEPENDS_${PN}-module-ipc-open2 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-carp"
+RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-constant"
+RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-io-pipe"
+RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-posix"
+RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-ipc-open3 += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-carp"
+RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-ipc-sysv"
+RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-strict"
+RDEPENDS_${PN}-module-ipc-semaphore += "${PN}-module-vars"
+RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-carp"
+RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-ipc-sysv"
+RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-strict"
+RDEPENDS_${PN}-module-ipc-sharedmem += "${PN}-module-vars"
+RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-carp"
+RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-config"
+RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-strict"
+RDEPENDS_${PN}-module-ipc-sysv += "${PN}-module-vars"
+RDEPENDS_${PN}-module-json-pp-boolean += "${PN}-module-json-pp"
+RDEPENDS_${PN}-module-json-pp-boolean += "${PN}-module-strict"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-b"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-base"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-bytes"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-carp"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-constant"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-encode"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-math-bigfloat"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-math-bigint"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-overload"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-strict"
+RDEPENDS_${PN}-module-json-pp += "${PN}-module-subs"
+RDEPENDS_${PN}-module-less += "${PN}-module-strict"
+RDEPENDS_${PN}-module-less += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-lib += "${PN}-module-carp"
+RDEPENDS_${PN}-module-lib += "${PN}-module-config"
+RDEPENDS_${PN}-module-lib += "${PN}-module-strict"
+RDEPENDS_${PN}-module-list-util += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-list-util += "${PN}-module-strict"
+RDEPENDS_${PN}-module-list-util += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-list-util-xs += "${PN}-module-list-util"
+RDEPENDS_${PN}-module-list-util-xs += "${PN}-module-strict"
+RDEPENDS_${PN}-module-loaded += "${PN}-module-carp"
+RDEPENDS_${PN}-module-loaded += "${PN}-module-strict"
+RDEPENDS_${PN}-module-loaded += "${PN}-module-vars"
+RDEPENDS_${PN}-module-load += "${PN}-module-carp"
+RDEPENDS_${PN}-module-load += "${PN}-module-config"
+RDEPENDS_${PN}-module-load += "${PN}-module-constant"
+RDEPENDS_${PN}-module-load += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-load += "${PN}-module-filehandle"
+RDEPENDS_${PN}-module-load += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-load += "${PN}-module-locale-maketext-simple"
+RDEPENDS_${PN}-module-load += "${PN}-module-corelist"
+RDEPENDS_${PN}-module-load += "${PN}-module-params-check"
+RDEPENDS_${PN}-module-load += "${PN}-module-strict"
+RDEPENDS_${PN}-module-load += "${PN}-module-vars"
+RDEPENDS_${PN}-module-load += "${PN}-module-version"
+RDEPENDS_${PN}-module-load += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-constant"
+RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-constants += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-country-codes += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-country-codes += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-country-codes += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-carp"
+RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes"
+RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes-constants"
+RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes-country-codes"
+RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-locale-codes-country-retired"
+RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-country += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-country-retired += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-country-retired += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-country-retired += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-currency-codes += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-currency-codes += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-currency-codes += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-carp"
+RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes"
+RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes-constants"
+RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes-currency-codes"
+RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-locale-codes-currency-retired"
+RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-currency += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-currency-retired += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-currency-retired += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-currency-retired += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-langext-codes += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-langext-codes += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-langext-codes += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-carp"
+RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes"
+RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes-constants"
+RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes-langext-codes"
+RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-locale-codes-langext-retired"
+RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-langext += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-langext-retired += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-langext-retired += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-langext-retired += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-langfam-codes += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-langfam-codes += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-langfam-codes += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-carp"
+RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes"
+RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes-constants"
+RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes-langfam-codes"
+RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-locale-codes-langfam-retired"
+RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-langfam += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-langfam-retired += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-langfam-retired += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-language-codes += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-language-codes += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-language-codes += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-carp"
+RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes"
+RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes-constants"
+RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes-language-codes"
+RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-locale-codes-language-retired"
+RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-language += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-language-retired += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-language-retired += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-language-retired += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-langvar-codes += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-langvar-codes += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-langvar-codes += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-carp"
+RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes"
+RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes-constants"
+RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes-langvar-codes"
+RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-locale-codes-langvar-retired"
+RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-langvar += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-langvar-retired += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-langvar-retired += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-langvar-retired += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes += "${PN}-module-carp"
+RDEPENDS_${PN}-module-locale-codes += "${PN}-module-locale-codes-constants"
+RDEPENDS_${PN}-module-locale-codes += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-script-codes += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-script-codes += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-script-codes += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-carp"
+RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes"
+RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes-constants"
+RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes-script-codes"
+RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-locale-codes-script-retired"
+RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-script += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-codes-script-retired += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-codes-script-retired += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-locale-codes-script-retired += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-country += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-country += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-country += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-currency += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-currency += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-currency += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-language += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-language += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-language += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-locale-maketext-gutsloader += "${PN}-module-locale-maketext"
+RDEPENDS_${PN}-module-locale-maketext-guts += "${PN}-module-locale-maketext"
+RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-carp"
+RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-i18n-langtags"
+RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-i18n-langtags-detect"
+RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-integer"
+RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-maketext += "${PN}-module-vars"
+RDEPENDS_${PN}-module-locale-maketext-simple += "${PN}-module-base"
+RDEPENDS_${PN}-module-locale-maketext-simple += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale += "${PN}-module-carp"
+RDEPENDS_${PN}-module-locale += "${PN}-module-config"
+RDEPENDS_${PN}-module-locale-script += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-locale-script += "${PN}-module-strict"
+RDEPENDS_${PN}-module-locale-script += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-carp"
+RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-math-bigint"
+RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-overload"
+RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-strict"
+RDEPENDS_${PN}-module-math-bigfloat += "${PN}-module-vars"
+RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-math-bigfloat"
+RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-overload"
+RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-strict"
+RDEPENDS_${PN}-module-math-bigfloat-trace += "${PN}-module-vars"
+RDEPENDS_${PN}-module-math-bigint-calcemu += "${PN}-module-strict"
+RDEPENDS_${PN}-module-math-bigint-calcemu += "${PN}-module-vars"
+RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-carp"
+RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-constant"
+RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-integer"
+RDEPENDS_${PN}-module-math-bigint-calc += "${PN}-module-strict"
+RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-math-bigint-calc"
+RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-strict"
+RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-vars"
+RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-math-bigint-fastcalc += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-math-bigint += "${PN}-module-carp"
+RDEPENDS_${PN}-module-math-bigint += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-math-bigint += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-math-bigint += "${PN}-module-math-bigfloat"
+RDEPENDS_${PN}-module-math-bigint += "${PN}-module-overload"
+RDEPENDS_${PN}-module-math-bigint += "${PN}-module-strict"
+RDEPENDS_${PN}-module-math-bigint += "${PN}-module-vars"
+RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-math-bigint"
+RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-overload"
+RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-strict"
+RDEPENDS_${PN}-module-math-bigint-trace += "${PN}-module-vars"
+RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-carp"
+RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-math-bigfloat"
+RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-math-bigint"
+RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-overload"
+RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-strict"
+RDEPENDS_${PN}-module-math-bigrat += "${PN}-module-vars"
+RDEPENDS_${PN}-module-math-complex += "${PN}-module-config"
+RDEPENDS_${PN}-module-math-complex += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-math-complex += "${PN}-module-overload"
+RDEPENDS_${PN}-module-math-complex += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-math-complex += "${PN}-module-strict"
+RDEPENDS_${PN}-module-math-complex += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-math-trig += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-math-trig += "${PN}-module-math-complex"
+RDEPENDS_${PN}-module-math-trig += "${PN}-module-strict"
+RDEPENDS_${PN}-module-memoize-anydbm-file += "${PN}-module-vars"
+RDEPENDS_${PN}-module-memoize-expirefile += "${PN}-module-carp"
+RDEPENDS_${PN}-module-memoize-expire += "${PN}-module-carp"
+RDEPENDS_${PN}-module-memoize += "${PN}-module-carp"
+RDEPENDS_${PN}-module-memoize += "${PN}-module-config"
+RDEPENDS_${PN}-module-memoize += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-memoize += "${PN}-module-strict"
+RDEPENDS_${PN}-module-memoize += "${PN}-module-vars"
+RDEPENDS_${PN}-module-memoize-sdbm-file += "${PN}-module-sdbm-file"
+RDEPENDS_${PN}-module-memoize-storable += "${PN}-module-carp"
+RDEPENDS_${PN}-module-memoize-storable += "${PN}-module-storable"
+RDEPENDS_${PN}-module-meta-notation += "${PN}-module-strict"
+RDEPENDS_${PN}-module-meta-notation += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-vars"
+RDEPENDS_${PN}-module-mime-base64 += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-mime-base64"
+RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-strict"
+RDEPENDS_${PN}-module-mime-quotedprint += "${PN}-module-vars"
+RDEPENDS_${PN}-module-mro += "${PN}-module-strict"
+RDEPENDS_${PN}-module-mro += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-mro += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-net-cmd += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-cmd += "${PN}-module-constant"
+RDEPENDS_${PN}-module-net-cmd += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-net-cmd += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-cmd += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-net-cmd += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-config += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-net-config += "${PN}-module-socket"
+RDEPENDS_${PN}-module-net-config += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-config += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-domain += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-domain += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-net-domain += "${PN}-module-net-config"
+RDEPENDS_${PN}-module-net-domain += "${PN}-module-posix"
+RDEPENDS_${PN}-module-net-domain += "${PN}-module-socket"
+RDEPENDS_${PN}-module-net-domain += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-domain += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-net-ftp-dataconn"
+RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-ftp-a += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-errno"
+RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-net-cmd"
+RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-ftp-dataconn += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-ftp-e += "${PN}-module-net-ftp-i"
+RDEPENDS_${PN}-module-net-ftp-e += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-ftp-e += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-net-ftp-dataconn"
+RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-ftp-i += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-ftp-l += "${PN}-module-net-ftp-i"
+RDEPENDS_${PN}-module-net-ftp-l += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-ftp-l += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-constant"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-io-socket"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-io-socket-ip"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-cmd"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-config"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-ftp-a"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-net-netrc"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-socket"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-time-local"
+RDEPENDS_${PN}-module-net-ftp += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-hostent += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-net-hostent += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-net-hostent += "${PN}-module-socket"
+RDEPENDS_${PN}-module-net-hostent += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-hostent += "${PN}-module-vars"
+RDEPENDS_${PN}-module-net-netent += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-net-netent += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-net-netent += "${PN}-module-socket"
+RDEPENDS_${PN}-module-net-netent += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-netent += "${PN}-module-vars"
+RDEPENDS_${PN}-module-net-netrc += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-netrc += "${PN}-module-filehandle"
+RDEPENDS_${PN}-module-net-netrc += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-netrc += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-nntp += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-nntp += "${PN}-module-io-socket"
+RDEPENDS_${PN}-module-net-nntp += "${PN}-module-io-socket-ip"
+RDEPENDS_${PN}-module-net-nntp += "${PN}-module-net-cmd"
+RDEPENDS_${PN}-module-net-nntp += "${PN}-module-net-config"
+RDEPENDS_${PN}-module-net-nntp += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-nntp += "${PN}-module-time-local"
+RDEPENDS_${PN}-module-net-nntp += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-ping += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-ping += "${PN}-module-constant"
+RDEPENDS_${PN}-module-net-ping += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-net-ping += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-net-ping += "${PN}-module-filehandle"
+RDEPENDS_${PN}-module-net-ping += "${PN}-module-posix"
+RDEPENDS_${PN}-module-net-ping += "${PN}-module-socket"
+RDEPENDS_${PN}-module-net-ping += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-ping += "${PN}-module-time-hires"
+RDEPENDS_${PN}-module-net-ping += "${PN}-module-vars"
+RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-io-socket"
+RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-io-socket-ip"
+RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-mime-base64"
+RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-net-cmd"
+RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-net-config"
+RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-net-netrc"
+RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-pop3 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-protoent += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-net-protoent += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-net-protoent += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-protoent += "${PN}-module-vars"
+RDEPENDS_${PN}-module-net-servent += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-net-servent += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-net-servent += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-servent += "${PN}-module-vars"
+RDEPENDS_${PN}-module-net-smtp += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-smtp += "${PN}-module-io-socket"
+RDEPENDS_${PN}-module-net-smtp += "${PN}-module-io-socket-ip"
+RDEPENDS_${PN}-module-net-smtp += "${PN}-module-mime-base64"
+RDEPENDS_${PN}-module-net-smtp += "${PN}-module-net-cmd"
+RDEPENDS_${PN}-module-net-smtp += "${PN}-module-net-config"
+RDEPENDS_${PN}-module-net-smtp += "${PN}-module-socket"
+RDEPENDS_${PN}-module-net-smtp += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-smtp += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-net-time += "${PN}-module-carp"
+RDEPENDS_${PN}-module-net-time += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-net-time += "${PN}-module-io-select"
+RDEPENDS_${PN}-module-net-time += "${PN}-module-io-socket"
+RDEPENDS_${PN}-module-net-time += "${PN}-module-net-config"
+RDEPENDS_${PN}-module-net-time += "${PN}-module-strict"
+RDEPENDS_${PN}-module-net-time += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-next += "${PN}-module-carp"
+RDEPENDS_${PN}-module-next += "${PN}-module-overload"
+RDEPENDS_${PN}-module-next += "${PN}-module-strict"
+RDEPENDS_${PN}-module-odbm-file += "${PN}-module-strict"
+RDEPENDS_${PN}-module-odbm-file += "${PN}-module-tie-hash"
+RDEPENDS_${PN}-module-odbm-file += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-odbm-file += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-ok += "${PN}-module-strict"
+RDEPENDS_${PN}-module-ok += "${PN}-module-test-more"
+RDEPENDS_${PN}-module-opcode += "${PN}-module-carp"
+RDEPENDS_${PN}-module-opcode += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-opcode += "${PN}-module-strict"
+RDEPENDS_${PN}-module-opcode += "${PN}-module-subs"
+RDEPENDS_${PN}-module-opcode += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-open += "${PN}-module-carp"
+RDEPENDS_${PN}-module-open += "${PN}-module-encode"
+RDEPENDS_${PN}-module-open += "${PN}-module-encoding"
+RDEPENDS_${PN}-module-open += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-o += "${PN}-module-b"
+RDEPENDS_${PN}-module-o += "${PN}-module-carp"
+RDEPENDS_${PN}-module-ops += "${PN}-module-opcode"
+RDEPENDS_${PN}-module-overloading += "${PN}-module-overload-numbers"
+RDEPENDS_${PN}-module-overloading += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-overload += "${PN}-module-mro"
+RDEPENDS_${PN}-module-overload += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-overload += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-params-check += "${PN}-module-carp"
+RDEPENDS_${PN}-module-params-check += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-params-check += "${PN}-module-locale-maketext-simple"
+RDEPENDS_${PN}-module-params-check += "${PN}-module-strict"
+RDEPENDS_${PN}-module-params-check += "${PN}-module-vars"
+RDEPENDS_${PN}-module-parent += "${PN}-module-strict"
+RDEPENDS_${PN}-module-parent += "${PN}-module-vars"
+RDEPENDS_${PN}-module-perlfaq += "${PN}-module-strict"
+RDEPENDS_${PN}-module-perlfaq += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-perlio-encoding += "${PN}-module-strict"
+RDEPENDS_${PN}-module-perlio-encoding += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-perlio-mmap += "${PN}-module-strict"
+RDEPENDS_${PN}-module-perlio-mmap += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-perlio-mmap += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-perlio-scalar += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-perlio-via += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-perlio-via-quotedprint += "${PN}-module-mime-quotedprint"
+RDEPENDS_${PN}-module-perlio-via-quotedprint += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-checker += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-checker += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-pod-checker += "${PN}-module-pod-parser"
+RDEPENDS_${PN}-module-pod-checker += "${PN}-module-pod-parseutils"
+RDEPENDS_${PN}-module-pod-checker += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-checker += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-escapes += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-find += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-find += "${PN}-module-config"
+RDEPENDS_${PN}-module-pod-find += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-pod-find += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-pod-find += "${PN}-module-file-find"
+RDEPENDS_${PN}-module-pod-find += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-pod-find += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-find += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-pod-find += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-functions += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-pod-functions += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-inputobjects += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-inputobjects += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-man += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-man += "${PN}-module-encode"
+RDEPENDS_${PN}-module-pod-man += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-pod-man += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-pod-man += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-man += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-man += "${PN}-module-subs"
+RDEPENDS_${PN}-module-pod-man += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-parselink += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-pod-parselink += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-parselink += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-parser += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-parser += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-pod-parser += "${PN}-module-pod-inputobjects"
+RDEPENDS_${PN}-module-pod-parser += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-parser += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-pod-parser += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-parseutils += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-parseutils += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-parseutils += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-config"
+RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-file-spec-functions"
+RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-baseto += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-perldoc-getoptsoo += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-getoptsoo += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-config"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-encode"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-file-spec-functions"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-file-temp"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-pod-perldoc-getoptsoo"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-parent"
+RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-pod-text-color"
+RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-toansi += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-pod-checker"
+RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-tochecker += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-encode"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-file-spec-functions"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-io-handle"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-io-select"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-ipc-open3"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-parent"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-pod-man"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-pod-perldoc-topod"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-toman += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-parent"
+RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-pod-man"
+RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-tonroff += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-parent"
+RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-topod += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-parent"
+RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-tortf += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-parent"
+RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-pod-text-termcap"
+RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-toterm += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-parent"
+RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-pod-text"
+RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-totext += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-parent"
+RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-perldoc-toxml += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-pod-select"
+RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-pod-plaintext += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-select += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-select += "${PN}-module-pod-parser"
+RDEPENDS_${PN}-module-pod-select += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-select += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-integer"
+RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-pod-simple-transcode"
+RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-blackbox += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-pod-simple-methody"
+RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-text-wrap"
+RDEPENDS_${PN}-module-pod-simple-checker += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-debug += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-dumpastext += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-dumpastext += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-dumpastext += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-dumpasxml += "${PN}-module-text-wrap"
+RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-overload"
+RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-pod-simple-blackbox"
+RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-linksection += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-methody += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-methody += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-methody += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple += "${PN}-module-integer"
+RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-escapes"
+RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-simple-blackbox"
+RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-simple-linksection"
+RDEPENDS_${PN}-module-pod-simple += "${PN}-module-pod-simple-tiedoutfh"
+RDEPENDS_${PN}-module-pod-simple += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-pod-simple += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-progress += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-pullparserendtoken += "${PN}-module-pod-simple-pullparsertoken"
+RDEPENDS_${PN}-module-pod-simple-pullparserendtoken += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-pullparserendtoken += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple-pullparserendtoken"
+RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple-pullparserstarttoken"
+RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-pod-simple-pullparsertexttoken"
+RDEPENDS_${PN}-module-pod-simple-pullparser += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-pod-simple-pullparsertoken"
+RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-pullparserstarttoken += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-pullparsertexttoken += "${PN}-module-pod-simple-pullparsertoken"
+RDEPENDS_${PN}-module-pod-simple-pullparsertexttoken += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-pullparsertexttoken += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-pullparsertoken += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-integer"
+RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-pod-simple-pullparser"
+RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-rtf += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-config"
+RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-cwd"
+RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-search += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-simpletree += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-textcontent += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-pod-simple-methody"
+RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-text-wrap"
+RDEPENDS_${PN}-module-pod-simple-text += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-pod-simple-tiedoutfh += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-transcodedumb += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-transcodedumb += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-transcode += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-encode"
+RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-transcodesmart += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-simple-xmloutstream += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-pod-text"
+RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-term-ansicolor"
+RDEPENDS_${PN}-module-pod-text-color += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-text-overstrike += "${PN}-module-pod-text"
+RDEPENDS_${PN}-module-pod-text-overstrike += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-text-overstrike += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-text += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-text += "${PN}-module-encode"
+RDEPENDS_${PN}-module-pod-text += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-pod-text += "${PN}-module-pod-simple"
+RDEPENDS_${PN}-module-pod-text += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-text += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-pod-text"
+RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-posix"
+RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-term-cap"
+RDEPENDS_${PN}-module-pod-text-termcap += "${PN}-module-vars"
+RDEPENDS_${PN}-module-pod-usage += "${PN}-module-carp"
+RDEPENDS_${PN}-module-pod-usage += "${PN}-module-config"
+RDEPENDS_${PN}-module-pod-usage += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-pod-usage += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-pod-usage += "${PN}-module-strict"
+RDEPENDS_${PN}-module-pod-usage += "${PN}-module-vars"
+RDEPENDS_${PN}-module-posix += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-posix += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-posix += "${PN}-module-strict"
+RDEPENDS_${PN}-module-posix += "${PN}-module-tie-hash"
+RDEPENDS_${PN}-module-posix += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-posix += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-re += "${PN}-module-carp"
+RDEPENDS_${PN}-module-re += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-re += "${PN}-module-strict"
+RDEPENDS_${PN}-module-re += "${PN}-module-term-cap"
+RDEPENDS_${PN}-module-re += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-re += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-safe += "${PN}-module-b"
+RDEPENDS_${PN}-module-safe += "${PN}-module-carp"
+RDEPENDS_${PN}-module-safe += "${PN}-module-carp-heavy"
+RDEPENDS_${PN}-module-safe += "${PN}-module-opcode"
+RDEPENDS_${PN}-module-safe += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-safe += "${PN}-module-strict"
+RDEPENDS_${PN}-module-safe += "${PN}-module-utf8"
+RDEPENDS_${PN}-module-scalar-util += "${PN}-module-carp"
+RDEPENDS_${PN}-module-scalar-util += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-scalar-util += "${PN}-module-list-util"
+RDEPENDS_${PN}-module-scalar-util += "${PN}-module-strict"
+RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-strict"
+RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-tie-hash"
+RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-sdbm-file += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-search-dict += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-search-dict += "${PN}-module-feature"
+RDEPENDS_${PN}-module-search-dict += "${PN}-module-strict"
+RDEPENDS_${PN}-module-selectsaver += "${PN}-module-carp"
+RDEPENDS_${PN}-module-selectsaver += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-selfloader += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-selfloader += "${PN}-module-io-handle"
+RDEPENDS_${PN}-module-selfloader += "${PN}-module-strict"
+RDEPENDS_${PN}-module-selfloader += "${PN}-module-vars"
+RDEPENDS_${PN}-module-sigtrap += "${PN}-module-carp"
+RDEPENDS_${PN}-module-sigtrap += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-socket += "${PN}-module-carp"
+RDEPENDS_${PN}-module-socket += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-socket += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-socket += "${PN}-module-strict"
+RDEPENDS_${PN}-module-socket += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-socket += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-sort += "${PN}-module-carp"
+RDEPENDS_${PN}-module-sort += "${PN}-module-strict"
+RDEPENDS_${PN}-module-storable += "${PN}-module-carp"
+RDEPENDS_${PN}-module-storable += "${PN}-module-config"
+RDEPENDS_${PN}-module-storable += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-storable += "${PN}-module-io-file"
+RDEPENDS_${PN}-module-storable += "${PN}-module-vars"
+RDEPENDS_${PN}-module-storable += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-sub-util += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-sub-util += "${PN}-module-list-util"
+RDEPENDS_${PN}-module-sub-util += "${PN}-module-strict"
+RDEPENDS_${PN}-module-sub-util += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-symbol += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-carp"
+RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-posix"
+RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-strict"
+RDEPENDS_${PN}-module-sys-hostname += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-carp"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-posix"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-socket"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-strict"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-sys-hostname"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-vars"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-sys-syslog += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-tap-base += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-base += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-base += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-base += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-posix"
+RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-tap-formatter-color"
+RDEPENDS_${PN}-module-tap-formatter-base += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-formatter-color += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-formatter-console-parallelsession += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-posix"
+RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-formatter-console += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-formatter-console-session += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-formatter-console-session += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-formatter-console-session += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-posix"
+RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-tap-formatter-file-session"
+RDEPENDS_${PN}-module-tap-formatter-file += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-formatter-file-session += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-formatter-session += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-tap-object"
+RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-tap-harness-env += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-harness += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-harness += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-harness += "${PN}-module-file-path"
+RDEPENDS_${PN}-module-tap-harness += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-tap-harness += "${PN}-module-io-handle"
+RDEPENDS_${PN}-module-tap-harness += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-harness += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-object += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-object += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-object += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-benchmark"
+RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-aggregator += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-tap-parser-resultfactory"
+RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-tap-parser-yamlish-reader"
+RDEPENDS_${PN}-module-tap-parser-grammar += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-iterator-array += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-iterator-array += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-iterator-array += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-iteratorfactory += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-iterator += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-config"
+RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-io-handle"
+RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-iterator-process += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-iterator-stream += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-iterator-stream += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-iterator-stream += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-io-select"
+RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-multiplexer += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-grammar"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-iterator"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-iteratorfactory"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-result"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-resultfactory"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-source"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-executable"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-file"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-handle"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-perl"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-tap-parser-sourcehandler-rawtap"
+RDEPENDS_${PN}-module-tap-parser += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-result-bailout += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-result-bailout += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-result-bailout += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-result-comment += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-result-comment += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-result-comment += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-bailout"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-comment"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-plan"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-pragma"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-test"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-unknown"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-version"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-tap-parser-result-yaml"
+RDEPENDS_${PN}-module-tap-parser-resultfactory += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-result += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-result += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-result += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-result-plan += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-result-plan += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-result-plan += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-result-pragma += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-result-pragma += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-result-pragma += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-result-test += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-result-test += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-result-test += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-result-unknown += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-result-unknown += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-result-unknown += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-result-version += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-result-version += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-result-version += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-result-yaml += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-result-yaml += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-result-yaml += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-scheduler-job += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-parser-scheduler-job += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-scheduler-job += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-tap-parser-scheduler-job"
+RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-tap-parser-scheduler-spinner"
+RDEPENDS_${PN}-module-tap-parser-scheduler += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-scheduler-spinner += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tap-parser-scheduler-spinner += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-scheduler-spinner += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-tap-parser-iteratorfactory"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-tap-parser-iterator-process"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-executable += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-tap-parser-iteratorfactory"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-tap-parser-iterator-stream"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-file += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-tap-parser-iteratorfactory"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-tap-parser-iterator-stream"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-handle += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-tap-parser-iterator"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-config"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-tap-parser-iteratorfactory"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-tap-parser-iterator-process"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-perl += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-tap-parser-iterator-array"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-tap-parser-iteratorfactory"
+RDEPENDS_${PN}-module-tap-parser-sourcehandler-rawtap += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-constant"
+RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-file-basename"
+RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-source += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-yamlish-reader += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-yamlish-reader += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-yamlish-reader += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-tap-parser-yamlish-writer += "${PN}-module-base"
+RDEPENDS_${PN}-module-tap-parser-yamlish-writer += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tap-parser-yamlish-writer += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-carp"
+RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-strict"
+RDEPENDS_${PN}-module-term-ansicolor += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-term-cap += "${PN}-module-carp"
+RDEPENDS_${PN}-module-term-cap += "${PN}-module-strict"
+RDEPENDS_${PN}-module-term-cap += "${PN}-module-vars"
+RDEPENDS_${PN}-module-term-complete += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-term-complete += "${PN}-module-strict"
+RDEPENDS_${PN}-module-term-readline += "${PN}-module-strict"
+RDEPENDS_${PN}-module-term-readline += "${PN}-module-term-cap"
+RDEPENDS_${PN}-module-test-builder-module += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-test-builder-module += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-builder-module += "${PN}-module-test-builder"
+RDEPENDS_${PN}-module-test-builder += "${PN}-module-config"
+RDEPENDS_${PN}-module-test-builder += "${PN}-module-perlio"
+RDEPENDS_${PN}-module-test-builder += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-builder += "${PN}-module-threads-shared"
+RDEPENDS_${PN}-module-test-builder += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-test-builder-tester-color += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-builder-tester-color += "${PN}-module-test-builder-tester"
+RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-carp"
+RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-test-builder-tester += "${PN}-module-test-builder"
+RDEPENDS_${PN}-module-test-harness += "${PN}-module-base"
+RDEPENDS_${PN}-module-test-harness += "${PN}-module-config"
+RDEPENDS_${PN}-module-test-harness += "${PN}-module-constant"
+RDEPENDS_${PN}-module-test-harness += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-harness"
+RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-parser-aggregator"
+RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-parser-source"
+RDEPENDS_${PN}-module-test-harness += "${PN}-module-tap-parser-sourcehandler-perl"
+RDEPENDS_${PN}-module-test-harness += "${PN}-module-text-parsewords"
+RDEPENDS_${PN}-module-test-harness += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-test-more += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-test-more += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-more += "${PN}-module-test-builder-module"
+RDEPENDS_${PN}-module-test-more += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-test += "${PN}-module-carp"
+RDEPENDS_${PN}-module-test += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-test += "${PN}-module-file-temp"
+RDEPENDS_${PN}-module-test += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test += "${PN}-module-vars"
+RDEPENDS_${PN}-module-test-simple += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-simple += "${PN}-module-test-builder-module"
+RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-config"
+RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-test-builder"
+RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-threads-shared"
+RDEPENDS_${PN}-module-test-tester-capture += "${PN}-module-vars"
+RDEPENDS_${PN}-module-test-tester-capturerunner += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-test-tester-capturerunner += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-tester-capturerunner += "${PN}-module-test-tester-capture"
+RDEPENDS_${PN}-module-test-tester-delegate += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-tester-delegate += "${PN}-module-vars"
+RDEPENDS_${PN}-module-test-tester-delegate += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-test-tester += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-test-tester += "${PN}-module-strict"
+RDEPENDS_${PN}-module-test-tester += "${PN}-module-test-builder"
+RDEPENDS_${PN}-module-test-tester += "${PN}-module-test-tester-capturerunner"
+RDEPENDS_${PN}-module-test-tester += "${PN}-module-test-tester-delegate"
+RDEPENDS_${PN}-module-test-tester += "${PN}-module-vars"
+RDEPENDS_${PN}-module-text-abbrev += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-text-balanced += "${PN}-module-carp"
+RDEPENDS_${PN}-module-text-balanced += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-text-balanced += "${PN}-module-overload"
+RDEPENDS_${PN}-module-text-balanced += "${PN}-module-selfloader"
+RDEPENDS_${PN}-module-text-balanced += "${PN}-module-strict"
+RDEPENDS_${PN}-module-text-balanced += "${PN}-module-vars"
+RDEPENDS_${PN}-module-text-parsewords += "${PN}-module-carp"
+RDEPENDS_${PN}-module-text-parsewords += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-text-parsewords += "${PN}-module-strict"
+RDEPENDS_${PN}-module-text-tabs += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-text-tabs += "${PN}-module-strict"
+RDEPENDS_${PN}-module-text-tabs += "${PN}-module-vars"
+RDEPENDS_${PN}-module-text-wrap += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-text-wrap += "${PN}-module-re"
+RDEPENDS_${PN}-module-text-wrap += "${PN}-module-strict"
+RDEPENDS_${PN}-module-text-wrap += "${PN}-module-text-tabs"
+RDEPENDS_${PN}-module-text-wrap += "${PN}-module-vars"
+RDEPENDS_${PN}-module-text-wrap += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-thread += "${PN}-module-config"
+RDEPENDS_${PN}-module-thread += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-thread += "${PN}-module-strict"
+RDEPENDS_${PN}-module-thread += "${PN}-module-threads"
+RDEPENDS_${PN}-module-thread += "${PN}-module-threads-shared"
+RDEPENDS_${PN}-module-thread += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-thread-queue += "${PN}-module-carp"
+RDEPENDS_${PN}-module-thread-queue += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-thread-queue += "${PN}-module-strict"
+RDEPENDS_${PN}-module-thread-queue += "${PN}-module-threads-shared"
+RDEPENDS_${PN}-module-thread-queue += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-carp"
+RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-strict"
+RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-threads-shared"
+RDEPENDS_${PN}-module-thread-semaphore += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-threads += "${PN}-module-carp"
+RDEPENDS_${PN}-module-threads += "${PN}-module-config"
+RDEPENDS_${PN}-module-threads += "${PN}-module-overload"
+RDEPENDS_${PN}-module-threads += "${PN}-module-strict"
+RDEPENDS_${PN}-module-threads += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-threads += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-threads-shared += "${PN}-module-carp"
+RDEPENDS_${PN}-module-threads-shared += "${PN}-module-scalar-util"
+RDEPENDS_${PN}-module-threads-shared += "${PN}-module-strict"
+RDEPENDS_${PN}-module-threads-shared += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-threads-shared += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-tie-array += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tie-array += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tie-array += "${PN}-module-vars"
+RDEPENDS_${PN}-module-tie-file += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tie-file += "${PN}-module-fcntl"
+RDEPENDS_${PN}-module-tie-file += "${PN}-module-posix"
+RDEPENDS_${PN}-module-tie-file += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tie-file += "${PN}-module-symbol"
+RDEPENDS_${PN}-module-tie-handle += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tie-handle += "${PN}-module-tie-stdhandle"
+RDEPENDS_${PN}-module-tie-handle += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-tie-hash-namedcapture += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tie-hash-namedcapture += "${PN}-module-xsloader"
+RDEPENDS_${PN}-module-tie-hash += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tie-hash += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-tie-memoize += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tie-memoize += "${PN}-module-tie-hash"
+RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-config"
+RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-overload"
+RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-tie-hash"
+RDEPENDS_${PN}-module-tie-refhash += "${PN}-module-vars"
+RDEPENDS_${PN}-module-tie-scalar += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tie-scalar += "${PN}-module-warnings-register"
+RDEPENDS_${PN}-module-tie-stdhandle += "${PN}-module-strict"
+RDEPENDS_${PN}-module-tie-stdhandle += "${PN}-module-tie-handle"
+RDEPENDS_${PN}-module-tie-stdhandle += "${PN}-module-vars"
+RDEPENDS_${PN}-module-tie-substrhash += "${PN}-module-carp"
+RDEPENDS_${PN}-module-tie-substrhash += "${PN}-module-integer"
+RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-strict"
+RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-time-tm"
+RDEPENDS_${PN}-module-time-gmtime += "${PN}-module-vars"
+RDEPENDS_${PN}-module-time-hires += "${PN}-module-carp"
+RDEPENDS_${PN}-module-time-hires += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-time-hires += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-time-hires += "${PN}-module-strict"
+RDEPENDS_${PN}-module-time-local += "${PN}-module-carp"
+RDEPENDS_${PN}-module-time-local += "${PN}-module-config"
+RDEPENDS_${PN}-module-time-local += "${PN}-module-constant"
+RDEPENDS_${PN}-module-time-local += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-time-local += "${PN}-module-strict"
+RDEPENDS_${PN}-module-time-local += "${PN}-module-vars"
+RDEPENDS_${PN}-module-time-localtime += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-time-localtime += "${PN}-module-strict"
+RDEPENDS_${PN}-module-time-localtime += "${PN}-module-time-tm"
+RDEPENDS_${PN}-module-time-localtime += "${PN}-module-vars"
+RDEPENDS_${PN}-module-time-piece += "${PN}-module-carp"
+RDEPENDS_${PN}-module-time-piece += "${PN}-module-constant"
+RDEPENDS_${PN}-module-time-piece += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-time-piece += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-time-piece += "${PN}-module-integer"
+RDEPENDS_${PN}-module-time-piece += "${PN}-module-overload"
+RDEPENDS_${PN}-module-time-piece += "${PN}-module-strict"
+RDEPENDS_${PN}-module-time-piece += "${PN}-module-time-local"
+RDEPENDS_${PN}-module-time-piece += "${PN}-module-time-seconds"
+RDEPENDS_${PN}-module-time-seconds += "${PN}-module-constant"
+RDEPENDS_${PN}-module-time-seconds += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-time-seconds += "${PN}-module-overload "
+RDEPENDS_${PN}-module-time-seconds += "${PN}-module-strict"
+RDEPENDS_${PN}-module-time-seconds += "${PN}-module-vars"
+RDEPENDS_${PN}-module-time-tm += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-time-tm += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-collate-cjk-big5 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-collate-cjk-big5 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicode-collate-cjk-gb2312 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-collate-cjk-gb2312 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicode-collate-cjk-jisx0208 += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-collate-cjk-jisx0208 += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicode-collate-cjk-korean += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-collate-cjk-korean += "${PN}-module-unicode-collate"
+RDEPENDS_${PN}-module-unicode-collate-cjk-korean += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicode-collate-cjk-pinyin += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-collate-cjk-pinyin += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicode-collate-cjk-stroke += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-collate-cjk-stroke += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicode-collate-cjk-zhuyin += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-collate-cjk-zhuyin += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-base"
+RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-carp"
+RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-collate-locale += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-carp"
+RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-constant"
+RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-dynaloader"
+RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-collate += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-carp"
+RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-constant"
+RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-normalize += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-carp"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-charnames"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-feature"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-file-spec"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-if"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-integer"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-strict"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-unicode-normalize"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-unicore"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-utf8-heavy"
+RDEPENDS_${PN}-module-unicode-ucd += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-unicore += "${PN}-module-integer"
+RDEPENDS_${PN}-module-universal += "${PN}-module-carp"
+RDEPENDS_${PN}-module-user-grent += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-user-grent += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-user-grent += "${PN}-module-strict"
+RDEPENDS_${PN}-module-user-grent += "${PN}-module-vars"
+RDEPENDS_${PN}-module-user-pwent += "${PN}-module-carp"
+RDEPENDS_${PN}-module-user-pwent += "${PN}-module-class-struct"
+RDEPENDS_${PN}-module-user-pwent += "${PN}-module-config"
+RDEPENDS_${PN}-module-user-pwent += "${PN}-module-exporter"
+RDEPENDS_${PN}-module-user-pwent += "${PN}-module-strict"
+RDEPENDS_${PN}-module-user-pwent += "${PN}-module-vars"
+RDEPENDS_${PN}-module-user-pwent += "${PN}-module-warnings"
+RDEPENDS_${PN}-module-utf8 += "${PN}-module-carp"
+RDEPENDS_${PN}-module-utf8 += "${PN}-module-utf8-heavy"
+RDEPENDS_${PN}-module-version += "${PN}-module-strict"
+RDEPENDS_${PN}-module-version += "${PN}-module-vars"
+RDEPENDS_${PN}-module-version += "${PN}-module-version-regex"
+RDEPENDS_${PN}-module-version-regex += "${PN}-module-strict"
+RDEPENDS_${PN}-module-version-regex += "${PN}-module-vars"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-b"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-carp"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-config"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-constant"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-if"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-overload"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-posix"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-strict"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-universal"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-vars"
+RDEPENDS_${PN}-module-version-vpp += "${PN}-module-version-regex"
+RDEPENDS_${PN}-module-xsloader += "${PN}-module-carp"
+RDEPENDS_${PN}-module-xsloader += "${PN}-module-dynaloader"
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl.inc b/yocto-poky/meta/recipes-devtools/perl/perl.inc
index 0d9716c..3313a94 100644
--- a/yocto-poky/meta/recipes-devtools/perl/perl.inc
+++ b/yocto-poky/meta/recipes-devtools/perl/perl.inc
@@ -6,3 +6,5 @@
 		    file://Artistic;md5=2e6fd2475335af892494fe1f7327baf3"
 
 SRC_URI = "http://www.cpan.org/src/5.0/${BP}.tar.xz"
+
+inherit upstream-version-is-even
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch b/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
index 3de2331..edf49d6 100644
--- a/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
+++ b/yocto-poky/meta/recipes-devtools/perl/perl/Makefile.SH.patch
@@ -5,10 +5,10 @@
  Makefile.SH |  145 +++++++++++++++++++++++++++--------------------------------
  1 file changed, 67 insertions(+), 78 deletions(-)
 
-diff --git a/Makefile.SH b/Makefile.SH
-index 034d812..67e08fd 100755
---- a/Makefile.SH
-+++ b/Makefile.SH
+Index: perl-5.22.1/Makefile.SH
+===================================================================
+--- perl-5.22.1.orig/Makefile.SH
++++ perl-5.22.1/Makefile.SH
 @@ -39,10 +39,10 @@ case "$useshrplib" in
  true)
  	# Prefix all runs of 'miniperl' and 'perl' with
@@ -67,6 +67,10 @@
 -all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
 -	@echo " ";
 -	@echo "	Everything is up to date. Type '$(MAKE) test' to run test suite."
+-
+-$(MANIFEST_SRT):	MANIFEST $(PERL_EXE)
+-	@$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
+-	    $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true)
 +#all: $(FIRSTMAKEFILE) $(MINIPERL_EXE) $(generated_pods) $(private) $(unidatafiles) $(public) $(dynamic_ext) $(nonxs_ext) extras.make $(MANIFEST_SRT)
 +#	@echo " ";
 +#	@echo "	Everything is up to date. Type '$(MAKE) test' to run test suite."
@@ -76,10 +80,7 @@
 +more: $(generated_pods) $(private) $(public)
 +
 +more2: $(dynamic_ext)
- 
--$(MANIFEST_SRT):	MANIFEST $(PERL_EXE)
--	@$(RUN_PERL) Porting/manisort -q || (echo "WARNING: re-sorting MANIFEST"; \
--	    $(RUN_PERL) Porting/manisort -q -o MANIFEST; sh -c true)
++
 +more3: $(nonxs_ext)
 +
 +more4: extras.make $(MANIFEST_SRT)
@@ -144,7 +145,7 @@
  	./$(MINIPERLEXP) makedef.pl PLATFORM=os2 -DPERL_DLL=$(PERL_DLL) CC_FLAGS="$(OPTIMIZE)" > perl5.def
  
  !NO!SUBS!
-@@ -829,7 +829,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LIBPERLEXPORT)
+@@ -829,7 +829,7 @@ $(LIBPERL): $& $(obj) $(DYNALOADER) $(LI
  	true)
  		$spitshell >>$Makefile <<'!NO!SUBS!'
  	rm -f $@
@@ -175,7 +176,7 @@
  	$(MINIPERL) -f write_buildcustomize.pl    
  !NO!SUBS!
  		;;
-@@ -907,7 +911,9 @@ lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl
+@@ -907,7 +911,9 @@ lib/buildcustomize.pl: $& $(mini_obj) wr
  	-@rm -f miniperl.xok
  	$(CC) $(CLDFLAGS) $(NAMESPACEFLAGS) -o $(MINIPERL_EXE) \
  	    $(mini_obj) $(libs)
@@ -186,7 +187,7 @@
  	$(MINIPERL) -f write_buildcustomize.pl
  !NO!SUBS!
  		;;
-@@ -918,7 +924,9 @@ lib/buildcustomize.pl: \$& \$(mini_obj) write_buildcustomize.pl
+@@ -918,7 +924,9 @@ lib/buildcustomize.pl: \$& \$(mini_obj)
  	-@rm -f miniperl.xok
  	-@rm \$(MINIPERL_EXE)
  	\$(LNS) \$(HOST_PERL) \$(MINIPERL_EXE)
@@ -197,7 +198,7 @@
  	\$(MINIPERL) -f write_buildcustomize.pl 'osname' "$osname"
  !GROK!THIS!
  		else
-@@ -927,7 +935,9 @@ lib/buildcustomize.pl: $& $(mini_obj) write_buildcustomize.pl
+@@ -927,7 +935,9 @@ lib/buildcustomize.pl: $& $(mini_obj) wr
  	-@rm -f miniperl.xok
  	$(CC) $(CLDFLAGS) -o $(MINIPERL_EXE) \
  	    $(mini_obj) $(libs)
@@ -217,7 +218,7 @@
  	-@for f in Makefile.PL PPPort_pm.PL PPPort_xs.PL ppport_h.PL; do \
  	(cd ext/Devel-PPPort && `pwd`/run.sh ../../$(MINIPERL_EXE) -I../../lib \$\$f); \
  	done
-@@ -981,7 +991,7 @@ makeppport: \$(MINIPERL_EXE) \$(CONFIGPM)
+@@ -981,7 +991,7 @@ makeppport: \$(MINIPERL_EXE) \$(CONFIGPM
  *)
  $spitshell >>$Makefile <<'!NO!SUBS!'
  .PHONY: makeppport
@@ -246,7 +247,7 @@
  	$(MINIPERL) lib/unicore/mktables -C lib/unicore -P pod -maketest -makelist -p
  #	Commented out so always runs, mktables looks at far more files than we
  #	can in this makefile to decide if needs to run or not
-@@ -1009,12 +1019,12 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) lib/unicore/mktables $(nonxs_ext)
+@@ -1009,12 +1019,12 @@ uni.data: $(MINIPERL_EXE) $(CONFIGPM) li
  # $(PERL_EXE) and ext because pod_lib.pl needs Digest::MD5
  # But also this ensures that all extensions are built before we try to scan
  # them, which picks up Devel::PPPort's documentation.
@@ -262,9 +263,9 @@
  	$(MINIPERL) autodoc.pl
  
  pod/perlmodlib.pod: $(MINIPERL_EXE) pod/perlmodlib.PL MANIFEST
-@@ -1024,7 +1034,7 @@ pod/perl5220delta.pod: pod/perldelta.pod
- 	$(RMS) pod/perl5220delta.pod
- 	$(LNS) perldelta.pod pod/perl5220delta.pod
+@@ -1024,7 +1034,7 @@ pod/perl5221delta.pod: pod/perldelta.pod
+ 	$(RMS) pod/perl5221delta.pod
+ 	$(LNS) perldelta.pod pod/perl5221delta.pod
  
 -extra.pods: $(MINIPERL_EXE)
 +extra.pods:
@@ -300,11 +301,11 @@
  install.perl:	$(INSTALL_DEPENDENCE) installperl
 -	$(RUN_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
 -	-@test ! -s extras.lst || PATH="`pwd`:\${PATH}" PERL5LIB="`pwd`/lib" \$(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst`
-+	./hostperl -Ifake_config_library -Ilib -MConfig installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
- 
+-
 -install.man:	all installman
 -	$(RUN_PERL) installman --destdir=$(DESTDIR) $(INSTALLFLAGS)
--
++	./hostperl -Ifake_config_library -Ilib -MConfig installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS)
+ 
 -# XXX Experimental. Hardwired values, but useful for testing.
 -# Eventually Configure could ask for some of these values.
 -install.html: all installhtml
@@ -337,7 +338,7 @@
  	$(MINIPERL) make_ext.pl $@ $(MAKE_EXT_ARGS) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=static $(STATIC_LDFLAGS)
  
  n_dummy $(nonxs_ext):	$(MINIPERL_EXE) lib/buildcustomize.pl preplibrary FORCE
-@@ -1405,14 +1394,14 @@ test_prep_pre: preplibrary utilities $(nonxs_ext)
+@@ -1405,14 +1394,14 @@ test_prep_pre: preplibrary utilities $(n
  
  case "$targethost" in
  '') $spitshell >>$Makefile <<'!NO!SUBS!'
@@ -354,7 +355,7 @@
  	\$(dynamic_ext) \$(TEST_PERL_DLL) runtests \
  	\$(generated_pods)
  	$to libperl.*
-@@ -1465,7 +1454,7 @@ test_prep test-prep: test_prep_pre \$(MINIPERL_EXE) \$(unidatafiles) \$(PERL_EXE
+@@ -1465,7 +1454,7 @@ test_prep test-prep: test_prep_pre \$(MI
  esac
  
  $spitshell >>$Makefile <<'!NO!SUBS!'
@@ -363,12 +364,12 @@
  	$(MINIPERL) make_ext.pl $(dynamic_ext_re) MAKE="$(MAKE)" LIBPERL_A=$(LIBPERL) LINKTYPE=dynamic
  	cd t && (rm -f $(PERL_EXE); $(LNS) ../$(PERL_EXE) $(PERL_EXE))
  !NO!SUBS!
-@@ -1516,7 +1505,7 @@ $spitshell >>$Makefile <<'!NO!SUBS!'
+@@ -1526,7 +1515,7 @@ minitest_prep:
  
- # Can't depend on lib/Config.pm because that might be where miniperl
- # is crashing.
--minitest: $(MINIPERL_EXE)
-+minitest:
- 	-@test -f lib/Config.pm || $(MAKE) lib/Config.pm $(unidatafiles)
- 	@echo " "
- 	@echo "You may see some irrelevant test failures if you have been unable"
+ MINITEST_TESTS = base/*.t comp/*.t cmd/*.t run/*.t io/*.t re/*.t opbasic/*.t op/*.t uni/*.t perf/*.t
+ 
+-minitest: $(MINIPERL_EXE) minitest_prep
++minitest: minitest_prep
+ 	- cd t && $(RUN_PERL) TEST $(MINITEST_TESTS) </dev/tty
+ 
+ minitest-notty minitest_notty: $(MINIPERL_EXE) minitest_prep
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl/config.sh b/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
index 9fb5042..59e016e 100644
--- a/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
+++ b/yocto-poky/meta/recipes-devtools/perl/perl/config.sh
@@ -14,7 +14,7 @@
 
 : Configure command line arguments.
 config_arg0='Configure'
-config_args='-des -Doptimize=-O2 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Open Embedded -Dinstallprefix=@EXECPREFIX@ -Dprefix=@EXECPREFIX@ -Dvendorprefix=@EXECPREFIX@ -Dsiteprefix=@EXECPREFIX@ -Dotherlibdirs=@LIBDIR@/perl/5.22.0 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db -Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=@USRBIN@/less -isr'
+config_args='-des -Doptimize=-O2 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Open Embedded -Dinstallprefix=@EXECPREFIX@ -Dprefix=@EXECPREFIX@ -Dvendorprefix=@EXECPREFIX@ -Dsiteprefix=@EXECPREFIX@ -Dotherlibdirs=@LIBDIR@/perl/5.22.1 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Ud_dosuid -Dd_semctl_semun -Ui_db -Ui_ndbm -Ui_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=@USRBIN@/less -isr'
 config_argc=28
 config_arg1='-des'
 config_arg2='-Doptimize=-O2'
@@ -26,7 +26,7 @@
 config_arg8='-Dprefix=@EXECPREFIX@'
 config_arg9='-Dvendorprefix=@EXECPREFIX@'
 config_arg10='-Dsiteprefix=@EXECPREFIX@'
-config_arg11='-Dotherlibdirs=@LIBDIR@/perl/5.22.0'
+config_arg11='-Dotherlibdirs=@LIBDIR@/perl/5.22.1'
 config_arg12='-Duseshrplib'
 config_arg13='-Dusethreads'
 config_arg14='-Duseithreads'
@@ -66,11 +66,11 @@
 api_revision='5'
 api_subversion='0'
 api_version='22'
-api_versionstring='5.22.0'
+api_versionstring='5.22.1'
 ar='ar'
-archlib='@LIBDIR@/perl/5.22.0/@ARCH@-thread-multi'
-archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.22.0/@ARCH@-thread-multi'
-archlib_exp='@LIBDIR@/perl/5.22.0/@ARCH@-thread-multi'
+archlib='@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi'
+archlibexp='@STAGINGDIR@@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi'
+archlib_exp='@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi'
 archname64=''
 archname='@ARCH@-thread-multi'
 archobjs=''
@@ -88,7 +88,7 @@
 cat='cat'
 cc='gcc'
 cccdlflags='-fPIC'
-ccdlflags='-Wl,-E -Wl,-rpath,@LIBDIR@/perl/5.22.0/@ARCH@-thread-multi/CORE'
+ccdlflags='-Wl,-E -Wl,-rpath,@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi/CORE'
 ccflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
 ccflags_uselargefiles='-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
 ccname='gcc'
@@ -834,7 +834,7 @@
 incpath=''
 inews=''
 initialinstalllocation='@USRBIN@'
-installarchlib='@LIBDIR@/perl/5.22.0/@ARCH@-thread-multi'
+installarchlib='@LIBDIR@/perl/5.22.1/@ARCH@-thread-multi'
 installbin='@USRBIN@'
 installhtml1dir=''
 installhtml3dir=''
@@ -842,23 +842,23 @@
 installman3dir=''
 installprefix='@EXECPREFIX@'
 installprefixexp='@EXECPREFIX@'
-installprivlib='@LIBDIR@/perl/5.22.0'
+installprivlib='@LIBDIR@/perl/5.22.1'
 installscript='@USRBIN@'
-installsitearch='@LIBDIR@/perl/site_perl/5.22.0/@ARCH@-thread-multi'
+installsitearch='@LIBDIR@/perl/site_perl/5.22.1/@ARCH@-thread-multi'
 installsitebin='@USRBIN@'
 installsitehtml1dir=''
 installsitehtml3dir=''
-installsitelib='@LIBDIR@/perl/site_perl/5.22.0'
+installsitelib='@LIBDIR@/perl/site_perl/5.22.1'
 installsiteman1dir=''
 installsiteman3dir=''
 installsitescript='@USRBIN@'
 installstyle='lib/perl'
 installusrbinperl='define'
-installvendorarch='@LIBDIR@/perl/vendor_perl/5.22.0/@ARCH@-thread-multi'
+installvendorarch='@LIBDIR@/perl/vendor_perl/5.22.1/@ARCH@-thread-multi'
 installvendorbin='@USRBIN@'
 installvendorhtml1dir=''
 installvendorhtml3dir=''
-installvendorlib='@LIBDIR@/perl/vendor_perl/5.22.0'
+installvendorlib='@LIBDIR@/perl/vendor_perl/5.22.1'
 installvendorman1dir=''
 installvendorman3dir=''
 installvendorscript='@USRBIN@'
@@ -957,7 +957,7 @@
 orderlib='false'
 osname='linux'
 osvers='3.19.5-yocto-standard'
-otherlibdirs='@LIBDIR@/perl/5.22.0'
+otherlibdirs='@LIBDIR@/perl/5.22.1'
 package='perl'
 pager='/usr/bin/less -isr'
 passcat='cat /etc/passwd'
@@ -978,8 +978,8 @@
 pr=''
 prefix='@EXECPREFIX@'
 prefixexp='@EXECPREFIX@'
-privlib='@LIBDIR@/perl/5.22.0'
-privlibexp='@LIBDIR@/perl/5.22.0'
+privlib='@LIBDIR@/perl/5.22.1'
+privlibexp='@LIBDIR@/perl/5.22.1'
 procselfexe='"/proc/self/exe"'
 prototype='define'
 ptrsize='8'
@@ -1045,17 +1045,17 @@
 sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 6, 17, 29, 31, 0'
 sig_size='69'
 signal_t='void'
-sitearch='@LIBDIR@/perl/site_perl/5.22.0/@ARCH@-thread-multi'
-sitearchexp='@LIBDIR@/perl/site_perl/5.22.0/@ARCH@-thread-multi'
+sitearch='@LIBDIR@/perl/site_perl/5.22.1/@ARCH@-thread-multi'
+sitearchexp='@LIBDIR@/perl/site_perl/5.22.1/@ARCH@-thread-multi'
 sitebin='@USRBIN@'
 sitebinexp='@USRBIN@'
 sitehtml1dir=''
 sitehtml1direxp=''
 sitehtml3dir=''
 sitehtml3direxp=''
-sitelib='@LIBDIR@/perl/site_perl/5.22.0'
+sitelib='@LIBDIR@/perl/site_perl/5.22.1'
 sitelib_stem='@LIBDIR@/perl/site_perl'
-sitelibexp='@LIBDIR@/perl/site_perl/5.22.0'
+sitelibexp='@LIBDIR@/perl/site_perl/5.22.1'
 siteman1dir=''
 siteman1direxp=''
 siteman3dir=''
@@ -1174,17 +1174,17 @@
 uvuformat='"lu"'
 uvxformat='"lx"'
 vaproto='define'
-vendorarch='@LIBDIR@/perl/vendor_perl/5.22.0/@ARCH@-thread-multi'
-vendorarchexp='@LIBDIR@/perl/vendor_perl/5.22.0/@ARCH@-thread-multi'
+vendorarch='@LIBDIR@/perl/vendor_perl/5.22.1/@ARCH@-thread-multi'
+vendorarchexp='@LIBDIR@/perl/vendor_perl/5.22.1/@ARCH@-thread-multi'
 vendorbin='@USRBIN@'
 vendorbinexp='@USRBIN@'
 vendorhtml1dir=' '
 vendorhtml1direxp=''
 vendorhtml3dir=' '
 vendorhtml3direxp=''
-vendorlib='@LIBDIR@/perl/vendor_perl/5.22.0'
+vendorlib='@LIBDIR@/perl/vendor_perl/5.22.1'
 vendorlib_stem='@LIBDIR@/perl/vendor_perl'
-vendorlibexp='@LIBDIR@/perl/vendor_perl/5.22.0'
+vendorlibexp='@LIBDIR@/perl/vendor_perl/5.22.1'
 vendorman1dir=' '
 vendorman1direxp=''
 vendorman3dir=' '
@@ -1193,7 +1193,7 @@
 vendorprefixexp='@EXECPREFIX@'
 vendorscript='@USRBIN@'
 vendorscriptexp='@USRBIN@'
-version='5.22.0'
+version='5.22.1'
 version_patchlevel_string='version 22 subversion 0'
 versiononly='undef'
 vi=''
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl/perl-errno-generation-gcc5.patch b/yocto-poky/meta/recipes-devtools/perl/perl/perl-errno-generation-gcc5.patch
index efbc55d..7379d8b 100644
--- a/yocto-poky/meta/recipes-devtools/perl/perl/perl-errno-generation-gcc5.patch
+++ b/yocto-poky/meta/recipes-devtools/perl/perl/perl-errno-generation-gcc5.patch
@@ -5,14 +5,25 @@
 systems with gcc 5, it is unlikely that it will work on any supported host. Switch out gccversion
 for the version extracted from $CC --version.
 
---- perl-5.22.0/ext/Errno/Errno_pm.PL	2015-10-19 18:01:20.622143786 -0400
-+++ perl-5.22.0-fixed/ext/Errno/Errno_pm.PL	2015-10-19 17:50:35.662137367 -0400
-@@ -224,9 +224,12 @@
+Jeremy Puhlman <jpuhlman@mvista.com>
+
+Fix spaces in brackets while running $CC --version
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ ext/Errno/Errno_pm.PL | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/ext/Errno/Errno_pm.PL b/ext/Errno/Errno_pm.PL
+index 1fd29d0..7976ea2 100644
+--- a/ext/Errno/Errno_pm.PL
++++ b/ext/Errno/Errno_pm.PL
+@@ -224,9 +224,13 @@ sub write_errno_pm {
  
      {	# BeOS (support now removed) did not enter this block
      # invoke CPP and read the output
 +        my $compiler = $ENV{'CC'};
 +        my $compiler_out = `$compiler --version`;
++        $compiler_out =~ s/\(.*\)/;/;
 +        my @compiler_version = split / /,$compiler_out; 
  
  	my $inhibit_linemarkers = '';
@@ -21,3 +32,6 @@
  	    # GCC 5.0 interleaves expanded macros with line numbers breaking
  	    # each line into multiple lines. RT#123784
  	    $inhibit_linemarkers = ' -P';
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl_5.22.0.bb b/yocto-poky/meta/recipes-devtools/perl/perl_5.22.0.bb
deleted file mode 100644
index 9df8d04..0000000
--- a/yocto-poky/meta/recipes-devtools/perl/perl_5.22.0.bb
+++ /dev/null
@@ -1,372 +0,0 @@
-require perl.inc
-
-# We need gnugrep (for -I)
-DEPENDS = "virtual/db grep-native"
-DEPENDS += "gdbm zlib"
-
-# Pick up patches from debian
-# http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz
-SRC_URI += " \
-	file://debian/cpan_definstalldirs.diff \
-	file://debian/db_file_ver.diff \
-	file://debian/doc_info.diff \
-	file://debian/enc2xs_inc.diff \
-	file://debian/errno_ver.diff \
-	file://debian/libperl_embed_doc.diff \
-	file://debian/fixes/respect_umask.diff \
-	file://debian/writable_site_dirs.diff \
-	file://debian/extutils_set_libperl_path.diff \
-	file://debian/no_packlist_perllocal.diff \
-	file://debian/prefix_changes.diff \
-	file://debian/instmodsh_doc.diff \
-	file://debian/ld_run_path.diff \
-	file://debian/libnet_config_path.diff \
-	file://debian/mod_paths.diff \
-	file://debian/prune_libs.diff \
-	file://debian/fixes/net_smtp_docs.diff \
-	file://debian/perlivp.diff \
-	file://debian/squelch-locale-warnings.diff \
-	file://debian/skip-upstream-git-tests.diff \
-	file://debian/skip-kfreebsd-crash.diff \
-	file://debian/fixes/document_makemaker_ccflags.diff \
-	file://debian/find_html2text.diff \
-	file://debian/perl5db-x-terminal-emulator.patch \
-	file://debian/cpan-missing-site-dirs.diff \
-	file://debian/fixes/memoize_storable_nstore.diff \
-	file://debian/regen-skip.diff \
-"
-
-SRC_URI += " \
-        file://Makefile.patch \
-        file://Makefile.SH.patch \
-        file://installperl.patch \
-        file://perl-dynloader.patch \
-        file://perl-moreconfig.patch \
-        file://letgcc-find-errno.patch \
-        file://generate-sh.patch \
-        file://native-perlinc.patch \
-        file://perl-enable-gdbm.patch \
-        file://cross-generate_uudmap.patch \
-        file://fix_bad_rpath.patch \
-        file://perl-archlib-exp.patch \
-        file://dynaloaderhack.patch \
-        file://config.sh \
-        file://config.sh-32 \
-        file://config.sh-32-le \
-        file://config.sh-32-be \
-        file://config.sh-64 \
-        file://config.sh-64-le \
-        file://config.sh-64-be \
-        file://make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch \
-        file://t-run-switches.t-perl5-perl.patch \
-        file://ext-ODBM_File-hints-linux.pl-link-libgdbm_compat.patch \
-        file://ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch \
-        file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
-        file://perl-errno-generation-gcc5.patch \
-"
-
-# Fix test case issues
-SRC_URI_append_class-target = " \
-            file://test/dist-threads-t-join.t-adjust-ps-option.patch \
-            file://test/ext-DynaLoader-t-DynaLoader.t-fix-calling-dl_findfil.patch \
-           "
-
-SRC_URI[md5sum] = "ff0f09b17de426eff323426cb140ee79"
-SRC_URI[sha256sum] = "be83ead0c5c26cbbe626fa4bac1a4beabe23a9eebc15d35ba49ccde11878e196"
-
-inherit perlnative siteinfo
-
-# Where to find the native perl
-HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
-
-# Where to find .so files - use the -native versions not those from the target build
-export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
-
-# Where to find perl @INC/#include files
-# - use the -native versions not those from the target build
-export PERL_LIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
-export PERL_ARCHLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
-
-# LDFLAGS for shared libraries
-export LDDLFLAGS = "${LDFLAGS} -shared"
-
-LDFLAGS_append = " -fstack-protector"
-
-# We're almost Debian, aren't we?
-CFLAGS += "-DDEBIAN"
-
-do_nolargefile() {
-	sed -i -e "s,\(uselargefiles=\)'define',\1'undef',g" \
-		-e "s,\(d_readdir64_r=\)'define',\1'undef',g" \
-		-e "s,\(readdir64_r_proto=\)'\w+',\1'0',g" \
-		-e "/ccflags_uselargefiles/d" \
-		-e "s/-Duselargefiles//" \
-		-e "s/-D_FILE_OFFSET_BITS=64//" \
-		-e "s/-D_LARGEFILE_SOURCE//" \
-		${S}/Cross/config.sh-${TARGET_ARCH}-${TARGET_OS}
-}
-
-do_configure() {
-        # Make hostperl in build directory be the native perl
-        ln -sf ${HOSTPERL} hostperl
-
-	if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
-		if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a -e Makefile ]; then
-			${MAKE} clean
-		fi
-		find ${S} -name *.so -delete
-	fi
-	if [ -n "${CONFIGURESTAMPFILE}" ]; then
-		echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
-	fi
-
-        # Do our work in the cross subdir
-        cd Cross
-
-        # Generate configuration
-        rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
-        for i in ${WORKDIR}/config.sh \
-                 ${WORKDIR}/config.sh-${SITEINFO_BITS} \
-                 ${WORKDIR}/config.sh-${SITEINFO_BITS}-${SITEINFO_ENDIANNESS}; do
-            cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
-        done
-
-        # Fixups for uclibc
-        if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
-                sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \
-                       -e "s,\(d_futimes=\)'define',\1'undef',g" \
-                       -e "s,\(d_finitel=\)'define',\1'undef',g" \
-                       -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \
-                       -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
-                       -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \
-                       -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \
-                       -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \
-                       -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \
-                       -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \
-                       -e "s,\(d_sockatmark=\)'define',\1'undef',g" \
-                       -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \
-                       -e "s,\(d_eaccess=\)'define',\1'undef',g" \
-                       -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
-                       -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
-                       -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
-                       -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
-                       -e "s,-fstack-protector,-fno-stack-protector,g" \
-                    config.sh-${TARGET_ARCH}-${TARGET_OS}
-        fi
-        # Fixups for musl
-        if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" ]; then
-                sed -i -e "s,\(d_libm_lib_version=\)'define',\1'undef',g" \
-                       -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
-                       -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
-                       -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
-                       -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
-                       -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
-                       -e "s,\(d_finitel=\)'define',\1'undef',g" \
-                       -e "s,\(getprotobyname_r=\)'define',\1'undef',g" \
-                       -e "s,\(getpwent_r=\)'define',\1'undef',g" \
-                       -e "s,\(getservent_r=\)'define',\1'undef',g" \
-                       -e "s,\(gethostent_r=\)'define',\1'undef',g" \
-                       -e "s,\(getnetent_r=\)'define',\1'undef',g" \
-                       -e "s,\(getnetbyaddr_r=\)'define',\1'undef',g" \
-                       -e "s,\(getprotoent_r=\)'define',\1'undef',g" \
-                       -e "s,\(getprotobynumber_r=\)'define',\1'undef',g" \
-                       -e "s,\(getgrent_r=\)'define',\1'undef',g" \
-                       -e "s,\(i_fcntl=\)'undef',\1'define',g" \
-                       -e "s,\(h_fcntl=\)'false',\1'true',g" \
-                       -e "s,-fstack-protector,-fno-stack-protector,g" \
-                       -e "s,-lnsl,,g" \
-                    config.sh-${TARGET_ARCH}-${TARGET_OS}
-        fi
-
-	${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '', 'do_nolargefile', d)}
-
-        # Update some paths in the configuration
-        sed -i -e 's,@ARCH@-thread-multi,,g' \
-               -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
-               -e 's,@STAGINGDIR@,${STAGING_DIR_HOST},g' \
-               -e "s,@INCLUDEDIR@,${STAGING_INCDIR},g" \
-               -e "s,@LIBDIR@,${libdir},g" \
-               -e "s,@BASELIBDIR@,${base_libdir},g" \
-               -e "s,@EXECPREFIX@,${exec_prefix},g" \
-               -e 's,@USRBIN@,${bindir},g' \
-            config.sh-${TARGET_ARCH}-${TARGET_OS}
-
-	case "${TARGET_ARCH}" in
-		x86_64 | powerpc | s390)
-			sed -i -e "s,\(need_va_copy=\)'undef',\1'define',g" \
-				config.sh-${TARGET_ARCH}-${TARGET_OS}
-			;;
-		arm)
-			sed -i -e "s,\(d_u32align=\)'undef',\1'define',g" \
-				config.sh-${TARGET_ARCH}-${TARGET_OS}
-			;;
-	esac
-        # These are strewn all over the source tree
-        for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" -m1 "/usr/include/.*\.h" ${S}/* -r -l` ${S}/utils/h2xs.PL ; do
-            echo Fixing: $foo
-            sed -e 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i $foo
-        done
-
-        rm -f config
-        echo "ARCH = ${TARGET_ARCH}" > config
-        echo "OS = ${TARGET_OS}" >> config
-}
-
-do_compile() {
-        # Fix to avoid recursive substitution of path
-        sed -i -e 's|(@libpath, ".*"|(@libpath, "${STAGING_LIBDIR}"|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
-
-        cd Cross
-        oe_runmake perl LD="${CCLD}"
-}
-
-do_install() {
-	#export hostperl="${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
-	oe_runmake install DESTDIR=${D}
-        # Add perl pointing at current version
-        ln -sf perl${PV} ${D}${bindir}/perl
-
-        ln -sf perl ${D}/${libdir}/perl5
-
-        # Remove unwanted file and empty directories
-        rm -f ${D}/${libdir}/perl/${PV}/.packlist
-	rmdir ${D}/${libdir}/perl/site_perl/${PV}
-	rmdir ${D}/${libdir}/perl/site_perl
-
-        # Fix up shared library
-        mv ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
-        ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
-        ln -sf ../../../libperl.so.${PV} ${D}/${libdir}/perl/${PV}/CORE/libperl.so
-
-        # target config, used by cpan.bbclass to extract version information
-        install config.sh ${D}${libdir}/perl
-
-        ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl
-}
-
-do_install_append_class-nativesdk () {
-        create_wrapper ${D}${bindir}/perl \
-            PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}'
-}
-
-PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
-
-perl_package_preprocess () {
-        # Fix up installed configuration
-        sed -i -e "s,${D},,g" \
-               -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
-               -e "s,-isystem${STAGING_INCDIR} ,,g" \
-               -e "s,${STAGING_LIBDIR},${libdir},g" \
-               -e "s,${STAGING_BINDIR},${bindir},g" \
-               -e "s,${STAGING_INCDIR},${includedir},g" \
-               -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
-               -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
-               -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
-            ${PKGD}${bindir}/h2xs \
-            ${PKGD}${bindir}/h2ph \
-            ${PKGD}${bindir}/pod2man \
-            ${PKGD}${bindir}/pod2text \
-            ${PKGD}${bindir}/pod2usage \
-            ${PKGD}${bindir}/podchecker \
-            ${PKGD}${bindir}/podselect \
-            ${PKGD}${libdir}/perl/${PV}/CORE/config.h \
-            ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
-            ${PKGD}${libdir}/perl/${PV}/CORE/pp.h \
-            ${PKGD}${libdir}/perl/${PV}/Config.pm \
-            ${PKGD}${libdir}/perl/${PV}/Config.pod \
-            ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
-            ${PKGD}${libdir}/perl/${PV}/ExtUtils/Liblist/Kid.pm \
-            ${PKGD}${libdir}/perl/${PV}/FileCache.pm \
-            ${PKGD}${libdir}/perl/${PV}/pod/*.pod \
-            ${PKGD}${libdir}/perl/config.sh
-}
-
-PACKAGES = "perl-dbg perl perl-misc perl-dev perl-pod perl-doc perl-lib \
-            perl-module-cpan perl-module-cpanplus perl-module-unicore"
-FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV} \
-               ${libdir}/perl/${PV}/Config.pm \
-               ${libdir}/perl/${PV}/strict.pm \
-               ${libdir}/perl/${PV}/warnings.pm \
-               ${libdir}/perl/${PV}/warnings \
-               ${libdir}/perl/${PV}/vars.pm \
-              "
-FILES_${PN}_append_class-nativesdk = " ${bindir}/perl.real"
-RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
-                    perl-module-warnings-register"
-FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
-FILES_${PN}-lib = "${libdir}/libperl.so* \
-                   ${libdir}/perl5 \
-                   ${libdir}/perl/config.sh \
-                   ${libdir}/perl/${PV}/Config_heavy.pl \
-                   ${libdir}/perl/${PV}/Config_heavy-target.pl"
-FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \
-		   ${libdir}/perl/${PV}/*.pod \
-                   ${libdir}/perl/${PV}/*/*.pod \
-                   ${libdir}/perl/${PV}/*/*/*.pod "
-FILES_perl-misc = "${bindir}/*"
-FILES_${PN}-dbg += "${libdir}/perl/${PV}/auto/*/.debug \
-                    ${libdir}/perl/${PV}/auto/*/*/.debug \
-                    ${libdir}/perl/${PV}/auto/*/*/*/.debug \
-                    ${libdir}/perl/${PV}/CORE/.debug \
-                    ${libdir}/perl/${PV}/*/.debug \
-                    ${libdir}/perl/${PV}/*/*/.debug \
-                    ${libdir}/perl/${PV}/*/*/*/.debug "
-FILES_${PN}-doc = "${libdir}/perl/${PV}/*/*.txt \
-                   ${libdir}/perl/${PV}/*/*/*.txt \
-                   ${libdir}/perl/${PV}/auto/XS/Typemap \
-                   ${libdir}/perl/${PV}/B/assemble \
-                   ${libdir}/perl/${PV}/B/cc_harness \
-                   ${libdir}/perl/${PV}/B/disassemble \
-                   ${libdir}/perl/${PV}/B/makeliblinks \
-                   ${libdir}/perl/${PV}/CGI/eg \
-                   ${libdir}/perl/${PV}/CPAN/PAUSE2003.pub \
-                   ${libdir}/perl/${PV}/CPAN/SIGNATURE \
-		   ${libdir}/perl/${PV}/CPANPLUS/Shell/Default/Plugins/HOWTO.pod \
-                   ${libdir}/perl/${PV}/Encode/encode.h \
-                   ${libdir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
-                   ${libdir}/perl/${PV}/ExtUtils/NOTES \
-                   ${libdir}/perl/${PV}/ExtUtils/PATCHING \
-                   ${libdir}/perl/${PV}/ExtUtils/typemap \
-                   ${libdir}/perl/${PV}/ExtUtils/xsubpp \
-		   ${libdir}/perl/${PV}/ExtUtils/Changes_EU-Install \
-                   ${libdir}/perl/${PV}/Net/*.eg \
-                   ${libdir}/perl/${PV}/unicore/mktables \
-                   ${libdir}/perl/${PV}/unicore/mktables.lst \
-                   ${libdir}/perl/${PV}/unicore/version "
-
-FILES_perl-module-cpan += "${libdir}/perl/${PV}/CPAN \
-                           ${libdir}/perl/${PV}/CPAN.pm"
-FILES_perl-module-cpanplus += "${libdir}/perl/${PV}/CPANPLUS \
-                               ${libdir}/perl/${PV}/CPANPLUS.pm"
-FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore"
-
-# Create a perl-modules package recommending all the other perl
-# packages (actually the non modules packages and not created too)
-ALLOW_EMPTY_perl-modules = "1"
-PACKAGES_append = " perl-modules "
-
-python populate_packages_prepend () {
-    libdir = d.expand('${libdir}/perl/${PV}')
-    do_split_packages(d, libdir, 'auto/([^.]*)/[^/]*\.(so|ld|ix|al)', 'perl-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
-    do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
-    do_split_packages(d, libdir, 'Module/([^\/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
-    do_split_packages(d, libdir, '(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|auto\/)[^\/]).*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
-
-    # perl-modules should recommend every perl module, and only the
-    # modules. Don't attempt to use the result of do_split_packages() as some
-    # modules are manually split (eg. perl-module-unicore).
-    packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES', True).split())
-    d.setVar("RRECOMMENDS_${PN}-modules", ' '.join(packages))
-}
-
-PACKAGES_DYNAMIC += "^perl-module-.*"
-PACKAGES_DYNAMIC_class-nativesdk += "^nativesdk-perl-module-.*"
-
-RPROVIDES_perl-lib = "perl-lib"
-
-require perl-rdepends_${PV}.inc
-require perl-ptest.inc
-
-SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/perl/perl_5.22.1.bb b/yocto-poky/meta/recipes-devtools/perl/perl_5.22.1.bb
new file mode 100644
index 0000000..bf8b3b6
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/perl/perl_5.22.1.bb
@@ -0,0 +1,367 @@
+require perl.inc
+
+# We need gnugrep (for -I)
+DEPENDS = "virtual/db grep-native"
+DEPENDS += "gdbm zlib"
+
+# Pick up patches from debian
+# http://ftp.de.debian.org/debian/pool/main/p/perl/perl_5.22.0-1.debian.tar.xz
+SRC_URI += " \
+	file://debian/cpan_definstalldirs.diff \
+	file://debian/db_file_ver.diff \
+	file://debian/doc_info.diff \
+	file://debian/enc2xs_inc.diff \
+	file://debian/errno_ver.diff \
+	file://debian/libperl_embed_doc.diff \
+	file://debian/fixes/respect_umask.diff \
+	file://debian/writable_site_dirs.diff \
+	file://debian/extutils_set_libperl_path.diff \
+	file://debian/no_packlist_perllocal.diff \
+	file://debian/prefix_changes.diff \
+	file://debian/instmodsh_doc.diff \
+	file://debian/ld_run_path.diff \
+	file://debian/libnet_config_path.diff \
+	file://debian/mod_paths.diff \
+	file://debian/prune_libs.diff \
+	file://debian/fixes/net_smtp_docs.diff \
+	file://debian/perlivp.diff \
+	file://debian/squelch-locale-warnings.diff \
+	file://debian/skip-upstream-git-tests.diff \
+	file://debian/skip-kfreebsd-crash.diff \
+	file://debian/fixes/document_makemaker_ccflags.diff \
+	file://debian/find_html2text.diff \
+	file://debian/perl5db-x-terminal-emulator.patch \
+	file://debian/cpan-missing-site-dirs.diff \
+	file://debian/fixes/memoize_storable_nstore.diff \
+	file://debian/regen-skip.diff \
+"
+
+SRC_URI += " \
+        file://Makefile.patch \
+        file://Makefile.SH.patch \
+        file://installperl.patch \
+        file://perl-dynloader.patch \
+        file://perl-moreconfig.patch \
+        file://letgcc-find-errno.patch \
+        file://generate-sh.patch \
+        file://native-perlinc.patch \
+        file://perl-enable-gdbm.patch \
+        file://cross-generate_uudmap.patch \
+        file://fix_bad_rpath.patch \
+        file://perl-archlib-exp.patch \
+        file://dynaloaderhack.patch \
+        file://config.sh \
+        file://config.sh-32 \
+        file://config.sh-32-le \
+        file://config.sh-32-be \
+        file://config.sh-64 \
+        file://config.sh-64-le \
+        file://config.sh-64-be \
+        file://make_ext.pl-fix-regenerate-makefile-failed-while-cc-.patch \
+        file://t-run-switches.t-perl5-perl.patch \
+        file://ext-ODBM_File-hints-linux.pl-link-libgdbm_compat.patch \
+        file://ext-ODBM_File-t-odbm.t-fix-the-path-of-dbmt_common.p.patch \
+        file://perl-PathTools-don-t-filter-out-blib-from-INC.patch \
+        file://perl-errno-generation-gcc5.patch \
+"
+
+# Fix test case issues
+SRC_URI_append_class-target = " \
+            file://test/dist-threads-t-join.t-adjust-ps-option.patch \
+            file://test/ext-DynaLoader-t-DynaLoader.t-fix-calling-dl_findfil.patch \
+           "
+
+SRC_URI[md5sum] = "6671e4829cbaf9cecafa9a84f141b0a3"
+SRC_URI[sha256sum] = "9e87317d693ce828095204be0d09af8d60b8785533fadea1a82b6f0e071e5c79"
+
+inherit perlnative siteinfo
+
+# Where to find the native perl
+HOSTPERL = "${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
+
+# Where to find .so files - use the -native versions not those from the target build
+export PERLHOSTLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
+
+# Where to find perl @INC/#include files
+# - use the -native versions not those from the target build
+export PERL_LIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
+export PERL_ARCHLIB = "${STAGING_LIBDIR_NATIVE}/perl-native/perl/${PV}/"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+# LDFLAGS for shared libraries
+export LDDLFLAGS = "${LDFLAGS} -shared"
+
+LDFLAGS_append = " -fstack-protector"
+
+# We're almost Debian, aren't we?
+CFLAGS += "-DDEBIAN"
+
+do_nolargefile() {
+	sed -i -e "s,\(uselargefiles=\)'define',\1'undef',g" \
+		-e "s,\(d_readdir64_r=\)'define',\1'undef',g" \
+		-e "s,\(readdir64_r_proto=\)'\w+',\1'0',g" \
+		-e "/ccflags_uselargefiles/d" \
+		-e "s/-Duselargefiles//" \
+		-e "s/-D_FILE_OFFSET_BITS=64//" \
+		-e "s/-D_LARGEFILE_SOURCE//" \
+		${S}/Cross/config.sh-${TARGET_ARCH}-${TARGET_OS}
+}
+
+do_configure() {
+        # Make hostperl in build directory be the native perl
+        ln -sf ${HOSTPERL} hostperl
+
+	if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
+		if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a -e Makefile ]; then
+			${MAKE} clean
+		fi
+		find ${S} -name *.so -delete
+	fi
+	if [ -n "${CONFIGURESTAMPFILE}" ]; then
+		echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
+	fi
+
+        # Do our work in the cross subdir
+        cd Cross
+
+        # Generate configuration
+        rm -f config.sh-${TARGET_ARCH}-${TARGET_OS}
+        for i in ${WORKDIR}/config.sh \
+                 ${WORKDIR}/config.sh-${SITEINFO_BITS} \
+                 ${WORKDIR}/config.sh-${SITEINFO_BITS}-${SITEINFO_ENDIANNESS}; do
+            cat $i >> config.sh-${TARGET_ARCH}-${TARGET_OS}
+        done
+
+        # Fixups for uclibc
+        if [ "${TARGET_OS}" = "linux-uclibc" -o "${TARGET_OS}" = "linux-uclibceabi" ]; then
+                sed -i -e "s,\(d_crypt_r=\)'define',\1'undef',g" \
+                       -e "s,\(d_futimes=\)'define',\1'undef',g" \
+                       -e "s,\(d_finitel=\)'define',\1'undef',g" \
+                       -e "s,\(crypt_r_proto=\)'\w+',\1'0',g" \
+                       -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
+                       -e "s,\(getnetbyname_r_proto=\)'\w+',\1'0',g" \
+                       -e "s,\(d_getnetbyaddr_r=\)'define',\1'undef',g" \
+                       -e "s,\(getnetbyaddr_r_proto=\)'\w+',\1'0',g" \
+                       -e "s,\(d_getnetent_r=\)'define',\1'undef',g" \
+                       -e "s,\(getnetent_r_proto=\)'\w+',\1'0',g" \
+                       -e "s,\(d_sockatmark=\)'define',\1'undef',g" \
+                       -e "s,\(d_sockatmarkproto=\)'\w+',\1'0',g" \
+                       -e "s,\(d_eaccess=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
+                       -e "s,-fstack-protector,-fno-stack-protector,g" \
+                    config.sh-${TARGET_ARCH}-${TARGET_OS}
+        fi
+        # Fixups for musl
+        if [ "${TARGET_OS}" = "linux-musl" -o "${TARGET_OS}" = "linux-musleabi" ]; then
+                sed -i -e "s,\(d_libm_lib_version=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdio_ptr_lval=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdio_ptr_lval_sets_cnt=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdiobase=\)'define',\1'undef',g" \
+                       -e "s,\(d_stdstdio=\)'define',\1'undef',g" \
+                       -e "s,\(d_getnetbyname_r=\)'define',\1'undef',g" \
+                       -e "s,\(d_finitel=\)'define',\1'undef',g" \
+                       -e "s,\(getprotobyname_r=\)'define',\1'undef',g" \
+                       -e "s,\(getpwent_r=\)'define',\1'undef',g" \
+                       -e "s,\(getservent_r=\)'define',\1'undef',g" \
+                       -e "s,\(gethostent_r=\)'define',\1'undef',g" \
+                       -e "s,\(getnetent_r=\)'define',\1'undef',g" \
+                       -e "s,\(getnetbyaddr_r=\)'define',\1'undef',g" \
+                       -e "s,\(getprotoent_r=\)'define',\1'undef',g" \
+                       -e "s,\(getprotobynumber_r=\)'define',\1'undef',g" \
+                       -e "s,\(getgrent_r=\)'define',\1'undef',g" \
+                       -e "s,\(i_fcntl=\)'undef',\1'define',g" \
+                       -e "s,\(h_fcntl=\)'false',\1'true',g" \
+                       -e "s,-fstack-protector,-fno-stack-protector,g" \
+                       -e "s,-lnsl,,g" \
+                    config.sh-${TARGET_ARCH}-${TARGET_OS}
+        fi
+
+	${@bb.utils.contains('DISTRO_FEATURES', 'largefile', '', 'do_nolargefile', d)}
+
+        # Update some paths in the configuration
+        sed -i -e 's,@ARCH@-thread-multi,,g' \
+               -e 's,@ARCH@,${TARGET_ARCH}-${TARGET_OS},g' \
+               -e 's,@STAGINGDIR@,${STAGING_DIR_HOST},g' \
+               -e "s,@INCLUDEDIR@,${STAGING_INCDIR},g" \
+               -e "s,@LIBDIR@,${libdir},g" \
+               -e "s,@BASELIBDIR@,${base_libdir},g" \
+               -e "s,@EXECPREFIX@,${exec_prefix},g" \
+               -e 's,@USRBIN@,${bindir},g' \
+            config.sh-${TARGET_ARCH}-${TARGET_OS}
+
+	case "${TARGET_ARCH}" in
+		x86_64 | powerpc | s390)
+			sed -i -e "s,\(need_va_copy=\)'undef',\1'define',g" \
+				config.sh-${TARGET_ARCH}-${TARGET_OS}
+			;;
+		arm)
+			sed -i -e "s,\(d_u32align=\)'undef',\1'define',g" \
+				config.sh-${TARGET_ARCH}-${TARGET_OS}
+			;;
+	esac
+        # These are strewn all over the source tree
+        for foo in `grep -I --exclude="*.patch" --exclude="*.diff" --exclude="*.pod" --exclude="README*" -m1 "/usr/include/.*\.h" ${S}/* -r -l` ${S}/utils/h2xs.PL ; do
+            echo Fixing: $foo
+            sed -e 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i $foo
+        done
+
+        rm -f config
+        echo "ARCH = ${TARGET_ARCH}" > config
+        echo "OS = ${TARGET_OS}" >> config
+}
+
+do_compile() {
+        # Fix to avoid recursive substitution of path
+        sed -i -e 's|(@libpath, ".*"|(@libpath, "${STAGING_LIBDIR}"|g' cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblist/Kid.pm
+
+        cd Cross
+        oe_runmake perl LD="${CCLD}"
+}
+
+do_install() {
+	#export hostperl="${STAGING_BINDIR_NATIVE}/perl-native/perl${PV}"
+	oe_runmake install DESTDIR=${D}
+        # Add perl pointing at current version
+        ln -sf perl${PV} ${D}${bindir}/perl
+
+        ln -sf perl ${D}/${libdir}/perl5
+
+        # Remove unwanted file and empty directories
+        rm -f ${D}/${libdir}/perl/${PV}/.packlist
+	rmdir ${D}/${libdir}/perl/site_perl/${PV}
+	rmdir ${D}/${libdir}/perl/site_perl
+
+        # Fix up shared library
+        mv ${D}/${libdir}/perl/${PV}/CORE/libperl.so ${D}/${libdir}/libperl.so.${PV}
+        ln -sf libperl.so.${PV} ${D}/${libdir}/libperl.so.5
+        ln -sf ../../../libperl.so.${PV} ${D}/${libdir}/perl/${PV}/CORE/libperl.so
+
+        # target config, used by cpan.bbclass to extract version information
+        install config.sh ${D}${libdir}/perl
+
+        ln -s Config_heavy.pl ${D}${libdir}/perl/${PV}/Config_heavy-target.pl
+}
+
+do_install_append_class-nativesdk () {
+        create_wrapper ${D}${bindir}/perl \
+            PERL5LIB='$PERL5LIB:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/site_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/vendor_perl/${PV}:$OECORE_NATIVE_SYSROOT/${libdir_nativesdk}/perl/${PV}'
+}
+
+PACKAGE_PREPROCESS_FUNCS += "perl_package_preprocess"
+
+perl_package_preprocess () {
+        # Fix up installed configuration
+        sed -i -e "s,${D},,g" \
+               -e "s,--sysroot=${STAGING_DIR_HOST},,g" \
+               -e "s,-isystem${STAGING_INCDIR} ,,g" \
+               -e "s,${STAGING_LIBDIR},${libdir},g" \
+               -e "s,${STAGING_BINDIR},${bindir},g" \
+               -e "s,${STAGING_INCDIR},${includedir},g" \
+               -e "s,${STAGING_BINDIR_NATIVE}/perl-native/,${bindir}/,g" \
+               -e "s,${STAGING_BINDIR_NATIVE}/,,g" \
+               -e "s,${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX},${bindir},g" \
+            ${PKGD}${bindir}/h2xs \
+            ${PKGD}${bindir}/h2ph \
+            ${PKGD}${bindir}/pod2man \
+            ${PKGD}${bindir}/pod2text \
+            ${PKGD}${bindir}/pod2usage \
+            ${PKGD}${bindir}/podchecker \
+            ${PKGD}${bindir}/podselect \
+            ${PKGD}${libdir}/perl/${PV}/CORE/config.h \
+            ${PKGD}${libdir}/perl/${PV}/CORE/perl.h \
+            ${PKGD}${libdir}/perl/${PV}/CORE/pp.h \
+            ${PKGD}${libdir}/perl/${PV}/Config.pm \
+            ${PKGD}${libdir}/perl/${PV}/Config.pod \
+            ${PKGD}${libdir}/perl/${PV}/Config_heavy.pl \
+            ${PKGD}${libdir}/perl/${PV}/ExtUtils/Liblist/Kid.pm \
+            ${PKGD}${libdir}/perl/${PV}/FileCache.pm \
+            ${PKGD}${libdir}/perl/${PV}/pod/*.pod \
+            ${PKGD}${libdir}/perl/config.sh
+}
+
+PACKAGES = "perl-dbg perl perl-misc perl-dev perl-pod perl-doc perl-lib \
+            perl-module-cpan perl-module-cpanplus perl-module-unicore"
+FILES_${PN} = "${bindir}/perl ${bindir}/perl${PV} \
+               ${libdir}/perl/${PV}/Config.pm \
+               ${libdir}/perl/${PV}/strict.pm \
+               ${libdir}/perl/${PV}/warnings.pm \
+               ${libdir}/perl/${PV}/warnings \
+               ${libdir}/perl/${PV}/vars.pm \
+              "
+FILES_${PN}_append_class-nativesdk = " ${bindir}/perl.real"
+RPROVIDES_${PN} += "perl-module-strict perl-module-vars perl-module-config perl-module-warnings \
+                    perl-module-warnings-register"
+FILES_${PN}-dev = "${libdir}/perl/${PV}/CORE"
+FILES_${PN}-lib = "${libdir}/libperl.so* \
+                   ${libdir}/perl5 \
+                   ${libdir}/perl/config.sh \
+                   ${libdir}/perl/${PV}/Config_heavy.pl \
+                   ${libdir}/perl/${PV}/Config_heavy-target.pl"
+FILES_${PN}-pod = "${libdir}/perl/${PV}/pod \
+		   ${libdir}/perl/${PV}/*.pod \
+                   ${libdir}/perl/${PV}/*/*.pod \
+                   ${libdir}/perl/${PV}/*/*/*.pod "
+FILES_perl-misc = "${bindir}/*"
+FILES_${PN}-doc = "${libdir}/perl/${PV}/*/*.txt \
+                   ${libdir}/perl/${PV}/*/*/*.txt \
+                   ${libdir}/perl/${PV}/auto/XS/Typemap \
+                   ${libdir}/perl/${PV}/B/assemble \
+                   ${libdir}/perl/${PV}/B/cc_harness \
+                   ${libdir}/perl/${PV}/B/disassemble \
+                   ${libdir}/perl/${PV}/B/makeliblinks \
+                   ${libdir}/perl/${PV}/CGI/eg \
+                   ${libdir}/perl/${PV}/CPAN/PAUSE2003.pub \
+                   ${libdir}/perl/${PV}/CPAN/SIGNATURE \
+		   ${libdir}/perl/${PV}/CPANPLUS/Shell/Default/Plugins/HOWTO.pod \
+                   ${libdir}/perl/${PV}/Encode/encode.h \
+                   ${libdir}/perl/${PV}/ExtUtils/MANIFEST.SKIP \
+                   ${libdir}/perl/${PV}/ExtUtils/NOTES \
+                   ${libdir}/perl/${PV}/ExtUtils/PATCHING \
+                   ${libdir}/perl/${PV}/ExtUtils/typemap \
+                   ${libdir}/perl/${PV}/ExtUtils/xsubpp \
+		   ${libdir}/perl/${PV}/ExtUtils/Changes_EU-Install \
+                   ${libdir}/perl/${PV}/Net/*.eg \
+                   ${libdir}/perl/${PV}/unicore/mktables \
+                   ${libdir}/perl/${PV}/unicore/mktables.lst \
+                   ${libdir}/perl/${PV}/unicore/version "
+
+FILES_perl-module-cpan += "${libdir}/perl/${PV}/CPAN \
+                           ${libdir}/perl/${PV}/CPAN.pm"
+FILES_perl-module-cpanplus += "${libdir}/perl/${PV}/CPANPLUS \
+                               ${libdir}/perl/${PV}/CPANPLUS.pm"
+FILES_perl-module-unicore += "${libdir}/perl/${PV}/unicore"
+
+# Create a perl-modules package recommending all the other perl
+# packages (actually the non modules packages and not created too)
+ALLOW_EMPTY_perl-modules = "1"
+PACKAGES_append = " perl-modules "
+
+python populate_packages_prepend () {
+    libdir = d.expand('${libdir}/perl/${PV}')
+    do_split_packages(d, libdir, 'auto/([^.]*)/[^/]*\.(so|ld|ix|al)', 'perl-module-%s', 'perl module %s', recursive=True, match_path=True, prepend=False)
+    do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+    do_split_packages(d, libdir, 'Module/([^\/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+    do_split_packages(d, libdir, '(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|auto\/)[^\/]).*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
+
+    # perl-modules should recommend every perl module, and only the
+    # modules. Don't attempt to use the result of do_split_packages() as some
+    # modules are manually split (eg. perl-module-unicore).
+    packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES', True).split())
+    d.setVar(d.expand("RRECOMMENDS_${PN}-modules"), ' '.join(packages))
+}
+
+PACKAGES_DYNAMIC += "^perl-module-.*"
+PACKAGES_DYNAMIC_class-nativesdk += "^nativesdk-perl-module-.*"
+
+RPROVIDES_perl-lib = "perl-lib"
+
+require perl-rdepends_${PV}.inc
+require perl-ptest.inc
+
+SSTATE_SCAN_FILES += "*.pm *.pod *.h *.pl *.sh"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig.inc b/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig.inc
deleted file mode 100644
index 55ab5c4..0000000
--- a/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig.inc
+++ /dev/null
@@ -1,49 +0,0 @@
-SUMMARY = "Helper tool used when compiling"
-DESCRIPTION = "pkg-config is a helper tool used when compiling applications and libraries. It helps determined \
-the correct compiler/link options.  It is also language-agnostic."
-HOMEPAGE = "http://pkg-config.freedesktop.org/wiki/"
-BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=pkg-config"
-SECTION = "console/utils"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-DEPENDS = "glib-2.0"
-DEPENDS_class-native = ""
-DEPENDS_class-nativesdk = ""
-
-SRCREV = "40342dd0ead05d457a2a4e692cf865f50033a709"
-PV = "0.28+git${SRCPV}"
-SRC_URI = "git://anongit.freedesktop.org/pkg-config"
-
-S = "${WORKDIR}/git"
-
-inherit autotools
-
-EXTRA_OECONF = "--without-internal-glib"
-EXTRA_OECONF_class-native = "--with-internal-glib"
-EXTRA_OECONF_class-nativesdk = "--with-internal-glib"
-
-acpaths = "-I ."
-
-BBCLASSEXTEND = "native nativesdk"
-
-# Set an empty dev package to ensure the base PN package gets
-# the pkg.m4 macros, pkgconfig does not deliver any other -dev
-# files.
-FILES_${PN}-dev = ""
-FILES_${PN} += "${datadir}/aclocal/pkg.m4"
-
-# When using the RPM generated automatic package dependencies, some packages
-# will end up requiring 'pkgconfig(pkg-config)'.  Allow this behavior by
-# specifying an appropriate provide.
-RPROVIDES_${PN} += "pkgconfig(pkg-config)"
-
-# Install a pkg-config-native wrapper that will use the native sysroot instead
-# of the MACHINE sysroot, for using pkg-config when building native tools.
-do_install_append_class-native () {
-    sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
-        -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
-        < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
-    install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
-}
diff --git a/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
index eaa511a..d34f608 100644
--- a/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
+++ b/yocto-poky/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -1,6 +1,53 @@
-require pkgconfig.inc
+SUMMARY = "Helper tool used when compiling"
+DESCRIPTION = "pkg-config is a helper tool used when compiling applications and libraries. It helps determined \
+the correct compiler/link options.  It is also language-agnostic."
+HOMEPAGE = "http://pkg-config.freedesktop.org/wiki/"
+BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=pkg-config"
+SECTION = "console/utils"
 
-SRC_URI += " \
-            file://pkg-config-native.in \
-            file://fix-glib-configure-libtool-usage.patch \
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "glib-2.0"
+DEPENDS_class-native = ""
+DEPENDS_class-nativesdk = ""
+
+SRCREV = "5914edfe9604abfedd220103cbac382fc4d268bb"
+PV = "0.29+git${SRCPV}"
+
+SRC_URI = "git://anongit.freedesktop.org/pkg-config \
+           file://pkg-config-native.in \
+           file://fix-glib-configure-libtool-usage.patch \
            "
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OECONF = "--without-internal-glib"
+EXTRA_OECONF_class-native = "--with-internal-glib"
+EXTRA_OECONF_class-nativesdk = "--with-internal-glib"
+
+acpaths = "-I ."
+
+BBCLASSEXTEND = "native nativesdk"
+
+# Set an empty dev package to ensure the base PN package gets
+# the pkg.m4 macros, pkgconfig does not deliver any other -dev
+# files.
+FILES_${PN}-dev = ""
+FILES_${PN} += "${datadir}/aclocal/pkg.m4"
+
+# When using the RPM generated automatic package dependencies, some packages
+# will end up requiring 'pkgconfig(pkg-config)'.  Allow this behavior by
+# specifying an appropriate provide.
+RPROVIDES_${PN} += "pkgconfig(pkg-config)"
+
+# Install a pkg-config-native wrapper that will use the native sysroot instead
+# of the MACHINE sysroot, for using pkg-config when building native tools.
+do_install_append_class-native () {
+    sed -e "s|@PATH_NATIVE@|${PKG_CONFIG_PATH}|" \
+        -e "s|@LIBDIR_NATIVE@|${PKG_CONFIG_LIBDIR}|" \
+        < ${WORKDIR}/pkg-config-native.in > ${B}/pkg-config-native
+    install -m755 ${B}/pkg-config-native ${D}${bindir}/pkg-config-native
+}
diff --git a/yocto-poky/meta/recipes-devtools/pseudo/files/0001-configure-Prune-PIE-flags.patch b/yocto-poky/meta/recipes-devtools/pseudo/files/0001-configure-Prune-PIE-flags.patch
new file mode 100644
index 0000000..43504ea
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/pseudo/files/0001-configure-Prune-PIE-flags.patch
@@ -0,0 +1,44 @@
+From b5545c08e6c674c49aef14b47a56a3e92df4d2a7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 17 Feb 2016 07:36:34 +0000
+Subject: [pseudo][PATCH] configure: Prune PIE flags
+
+LDFLAGS are not taken from environment and CFLAGS is used for LDFLAGS
+however when using security options -fpie and -pie options are coming
+as part of ARCH_FLAGS and they get into LDFLAGS of shared objects as
+well so we end up with conflicting options -shared -pie, which gold
+rejects outright and bfd linker lets the one appearning last in cmdline
+take effect. This create quite a unpleasant situation in OE when
+security flags are enabled and gold or not-gold options are used
+it errors out but errors are not same.
+
+Anyway, with this patch we filter pie options from ARCH_FLAGS
+ouright and take control of generating PIC objects
+
+Helps with errors like
+
+| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: pseudo_client.o: relocation R_X86_64_PC32 against symbol `pseudo_util_debug_flags' can not be used when making a shared object; recompile with -fPIC
+| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: final link failed: Bad value
+| collect2: error: ld returned 1 exit status
+| make: *** [lib/pseudo/lib64/libpseudo.so] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ configure | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure b/configure
+index e5ef9ce..83b0890 100755
+--- a/configure
++++ b/configure
+@@ -339,3 +339,5 @@ sed -e '
+   s,@ARCH@,'"$opt_arch"',g
+   s,@BITS@,'"$opt_bits"',g
+ ' < Makefile.in > Makefile
++
++sed -i -e 's/\-[f]*pie//g' Makefile
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-devtools/pseudo/files/handle-remove-xattr.patch b/yocto-poky/meta/recipes-devtools/pseudo/files/handle-remove-xattr.patch
new file mode 100644
index 0000000..8b7f30c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/pseudo/files/handle-remove-xattr.patch
@@ -0,0 +1,36 @@
+From a24cf102967a4966bfabe36c3542fb65f35bf539 Mon Sep 17 00:00:00 2001
+From: Peter Seebach <peter.seebach@windriver.com>
+Date: Wed, 23 Mar 2016 11:55:25 -0500
+Subject: actually handle remove_xattr correctly
+
+The path is required but wasn't being extracted from the client's message,
+resulting in xattr removal never working. This does not fully address some
+deeper problems with the xattr implementation, but at least the common
+removal case works.
+
+Upstream-Status: Backport
+
+Index: pseudo-1.7.5/ChangeLog.txt
+===================================================================
+--- pseudo-1.7.5.orig/ChangeLog.txt
++++ pseudo-1.7.5/ChangeLog.txt
+@@ -1,3 +1,7 @@
++2016-03-22:
++       * (seebs) extract path from message for remove_xattr so it
++         actually works.
++
+ 2016-02-09:
+         * (seebs) 1.7.5 release
+ 
+Index: pseudo-1.7.5/pseudo.c
+===================================================================
+--- pseudo-1.7.5.orig/pseudo.c
++++ pseudo-1.7.5/pseudo.c
+@@ -543,6 +543,7 @@ pseudo_op(pseudo_msg_t *msg, const char
+ 		case OP_GET_XATTR:
+ 		case OP_LIST_XATTR:
+ 		case OP_REPLACE_XATTR:
++		case OP_REMOVE_XATTR:
+ 		case OP_SET_XATTR:
+ 			/* In a rename there are two paths, null separated in msg->path */
+ 			initial_len = strlen(msg->path);
diff --git a/yocto-poky/meta/recipes-devtools/pseudo/files/moreretries.patch b/yocto-poky/meta/recipes-devtools/pseudo/files/moreretries.patch
new file mode 100644
index 0000000..c1e5552
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/pseudo/files/moreretries.patch
@@ -0,0 +1,19 @@
+Increase the number of retries in pseudo due to occasional slow
+server shutdowns.
+
+Upstream-Status: Pending
+RP 2016/2/28
+
+Index: pseudo-1.7.5/pseudo_client.c
+===================================================================
+--- pseudo-1.7.5.orig/pseudo_client.c
++++ pseudo-1.7.5/pseudo_client.c
+@@ -1214,7 +1214,7 @@ pseudo_client_setup(void) {
+ 	return 1;
+ }
+ 
+-#define PSEUDO_RETRIES 50
++#define PSEUDO_RETRIES 250
+ static pseudo_msg_t *
+ pseudo_client_request(pseudo_msg_t *msg, size_t len, const char *path) {
+ 	pseudo_msg_t *response = 0;
diff --git a/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc b/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
index fe12258..0de7b36 100644
--- a/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
+++ b/yocto-poky/meta/recipes-devtools/pseudo/pseudo.inc
@@ -10,7 +10,6 @@
 DEPENDS = "sqlite3 attr"
 
 FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
-FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
 INSANE_SKIP_${PN} += "libdir"
 INSANE_SKIP_${PN}-dbg += "libdir"
 
diff --git a/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.7.4.bb b/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.7.4.bb
deleted file mode 100644
index d68e0af..0000000
--- a/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.7.4.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require pseudo.inc
-
-SRC_URI = " \
-    http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz2 \
-    file://fallback-passwd \
-    file://fallback-group \
-"
-
-SRC_URI[md5sum] = "6e4b59a346d08d4a29133c335ea12052"
-SRC_URI[sha256sum] = "f33ff84da328f943155f22cfd49030ef4ad85ad35fc2d9419a203521b65c384c"
-
-PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
-
-do_install_append_class-native () {
-	install -d ${D}${sysconfdir}
-	# The fallback files should never be modified
-	install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd
-	install -m 444 ${WORKDIR}/fallback-group ${D}${sysconfdir}/group
-}
diff --git a/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb b/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb
new file mode 100644
index 0000000..d90e644
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/pseudo/pseudo_1.7.5.bb
@@ -0,0 +1,22 @@
+require pseudo.inc
+
+SRC_URI = " \
+    http://downloads.yoctoproject.org/releases/pseudo/${BPN}-${PV}.tar.bz2 \
+    file://0001-configure-Prune-PIE-flags.patch \
+    file://fallback-passwd \
+    file://fallback-group \
+    file://moreretries.patch \
+    file://handle-remove-xattr.patch \
+"
+
+SRC_URI[md5sum] = "c10209938f03128d0c193f041ff3596d"
+SRC_URI[sha256sum] = "fd89cadec984d3b8202aca465898b1bb4350e0d63ba9aa9ac899f6f50270e688"
+
+PSEUDO_EXTRA_OPTS ?= "--enable-force-async --without-passwd-fallback"
+
+do_install_append_class-native () {
+	install -d ${D}${sysconfdir}
+	# The fallback files should never be modified
+	install -m 444 ${WORKDIR}/fallback-passwd ${D}${sysconfdir}/passwd
+	install -m 444 ${WORKDIR}/fallback-group ${D}${sysconfdir}/group
+}
diff --git a/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb b/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
index eb666c0..abff1cf 100644
--- a/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/yocto-poky/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -1,7 +1,7 @@
 require pseudo.inc
 
-SRCREV = "3bc3909fa70535c2ef876009dc58e577b10a7e0e"
-PV = "1.7.4+git${SRCPV}"
+SRCREV = "786c6d3813622d18e12d36c4aa722af6a417c8fa"
+PV = "1.7.5+git${SRCPV}"
 
 DEFAULT_PREFERENCE = "-1"
 
diff --git a/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc b/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc
index dd8d825..189689d 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc
+++ b/yocto-poky/meta/recipes-devtools/python/python-2.7-manifest.inc
@@ -5,9 +5,9 @@
 
  
 
-PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
+PROVIDES+="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib "
 
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
+PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib ${PN}-modules"
 
 SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
 RDEPENDS_${PN}-2to3="${PN}-core"
@@ -47,7 +47,7 @@
 
 SUMMARY_${PN}-core="Python interpreter and core modules"
 RDEPENDS_${PN}-core="${PN}-lang ${PN}-re"
-FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/_sysconfigdata.* ${libdir}/python2.7/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
+FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/ast.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/_sysconfigdata.* ${libdir}/python2.7/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
 
 SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
 RDEPENDS_${PN}-crypt="${PN}-core"
@@ -82,7 +82,7 @@
 FILES_${PN}-difflib="${libdir}/python2.7/difflib.* "
 
 SUMMARY_${PN}-distutils="Python Distribution Utilities"
-RDEPENDS_${PN}-distutils="${PN}-core"
+RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
 FILES_${PN}-distutils="${libdir}/python2.7/config ${libdir}/python2.7/distutils "
 
 SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
@@ -93,10 +93,6 @@
 RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
 FILES_${PN}-doctest="${libdir}/python2.7/doctest.* "
 
-SUMMARY_${PN}-elementtree="Python elementree"
-RDEPENDS_${PN}-elementtree="${PN}-core"
-FILES_${PN}-elementtree="${libdir}/python2.7/lib-dynload/_elementtree.so "
-
 SUMMARY_${PN}-email="Python email support"
 RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
 FILES_${PN}-email="${libdir}/python2.7/imaplib.* ${libdir}/python2.7/email "
@@ -185,6 +181,10 @@
 RDEPENDS_${PN}-pkgutil="${PN}-core"
 FILES_${PN}-pkgutil="${libdir}/python2.7/pkgutil.* "
 
+SUMMARY_${PN}-plistlib="Generate and parse Mac OS X .plist files"
+RDEPENDS_${PN}-plistlib="${PN}-core ${PN}-datetime ${PN}-io"
+FILES_${PN}-plistlib="${libdir}/python2.7/plistlib.* "
+
 SUMMARY_${PN}-pprint="Python pretty-print support"
 RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
 FILES_${PN}-pprint="${libdir}/python2.7/pprint.* "
@@ -270,8 +270,8 @@
 FILES_${PN}-unixadmin="${libdir}/python2.7/lib-dynload/nis.so ${libdir}/python2.7/lib-dynload/grp.so ${libdir}/python2.7/lib-dynload/pwd.so ${libdir}/python2.7/getpass.* "
 
 SUMMARY_${PN}-xml="Python basic XML support"
-RDEPENDS_${PN}-xml="${PN}-core ${PN}-elementtree ${PN}-re"
-FILES_${PN}-xml="${libdir}/python2.7/lib-dynload/pyexpat.so ${libdir}/python2.7/xml ${libdir}/python2.7/xmllib.* "
+RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
+FILES_${PN}-xml="${libdir}/python2.7/lib-dynload/_elementtree.so ${libdir}/python2.7/lib-dynload/pyexpat.so ${libdir}/python2.7/xml ${libdir}/python2.7/xmllib.* "
 
 SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
 RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
@@ -282,7 +282,7 @@
 FILES_${PN}-zlib="${libdir}/python2.7/lib-dynload/zlib.so "
 
 SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib  "
+RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-audio ${PN}-bsddb ${PN}-codecs ${PN}-compile ${PN}-compiler ${PN}-compression ${PN}-contextlib ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-hotshot ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-plistlib ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-resource ${PN}-robotparser ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-zlib  "
 ALLOW_EMPTY_${PN}-modules = "1"
 
 
diff --git a/yocto-poky/meta/recipes-devtools/python/python-3.4-manifest.inc b/yocto-poky/meta/recipes-devtools/python/python-3.4-manifest.inc
deleted file mode 100644
index 97070b6..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-3.4-manifest.inc
+++ /dev/null
@@ -1,268 +0,0 @@
-
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '../../../scripts/contrib/python/generate-manifest-3.4.py' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
-
- 
-
-PROVIDES+="${PN}-2to3 ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
-
-PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
-
-SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
-RDEPENDS_${PN}-2to3="${PN}-core"
-FILES_${PN}-2to3="${libdir}/python3.4/lib2to3 "
-
-SUMMARY_${PN}-asyncio="Python Asynchronous I/O, event loop, coroutines and tasks"
-RDEPENDS_${PN}-asyncio="${PN}-core"
-FILES_${PN}-asyncio="${libdir}/python3.4/asyncio "
-
-SUMMARY_${PN}-audio="Python Audio Handling"
-RDEPENDS_${PN}-audio="${PN}-core"
-FILES_${PN}-audio="${libdir}/python3.4/wave.* ${libdir}/python3.4/chunk.* ${libdir}/python3.4/sndhdr.* ${libdir}/python3.4/lib-dynload/ossaudiodev.*.so ${libdir}/python3.4/lib-dynload/audioop.*.so ${libdir}/python3.4/audiodev.* ${libdir}/python3.4/sunaudio.* ${libdir}/python3.4/sunau.* ${libdir}/python3.4/toaiff.* "
-
-SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
-RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
-FILES_${PN}-codecs="${libdir}/python3.4/codecs.* ${libdir}/python3.4/encodings ${libdir}/python3.4/gettext.* ${libdir}/python3.4/locale.* ${libdir}/python3.4/lib-dynload/_locale.*.so ${libdir}/python3.4/lib-dynload/_codecs* ${libdir}/python3.4/lib-dynload/_multibytecodec.*.so ${libdir}/python3.4/lib-dynload/unicodedata.*.so ${libdir}/python3.4/stringprep.* ${libdir}/python3.4/xdrlib.* "
-
-SUMMARY_${PN}-compile="Python bytecode compilation support"
-RDEPENDS_${PN}-compile="${PN}-core"
-FILES_${PN}-compile="${libdir}/python3.4/py_compile.* ${libdir}/python3.4/compileall.* "
-
-SUMMARY_${PN}-compression="Python high-level compression support"
-RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs"
-FILES_${PN}-compression="${libdir}/python3.4/gzip.* ${libdir}/python3.4/zipfile.* ${libdir}/python3.4/tarfile.* ${libdir}/python3.4/lib-dynload/bz2.*.so "
-
-SUMMARY_${PN}-core="Python interpreter and core modules"
-RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
-FILES_${PN}-core="${libdir}/python3.4/__future__.* ${libdir}/python3.4/_abcoll.* ${libdir}/python3.4/abc.* ${libdir}/python3.4/copy.* ${libdir}/python3.4/copyreg.* ${libdir}/python3.4/ConfigParser.* ${libdir}/python3.4/genericpath.* ${libdir}/python3.4/getopt.* ${libdir}/python3.4/linecache.* ${libdir}/python3.4/new.* ${libdir}/python3.4/os.* ${libdir}/python3.4/posixpath.* ${libdir}/python3.4/struct.* ${libdir}/python3.4/warnings.* ${libdir}/python3.4/site.* ${libdir}/python3.4/stat.* ${libdir}/python3.4/UserDict.* ${libdir}/python3.4/UserList.* ${libdir}/python3.4/UserString.* ${libdir}/python3.4/lib-dynload/binascii.*.so ${libdir}/python3.4/lib-dynload/_struct.*.so ${libdir}/python3.4/lib-dynload/time.*.so ${libdir}/python3.4/lib-dynload/xreadlines.*.so ${libdir}/python3.4/types.* ${libdir}/python3.4/platform.* ${bindir}/python* ${libdir}/python3.4/_weakrefset.* ${libdir}/python3.4/sysconfig.* ${libdir}/python3.4/_sysconfigdata.* ${libdir}/python3.4/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
-
-SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
-RDEPENDS_${PN}-crypt="${PN}-core"
-FILES_${PN}-crypt="${libdir}/python3.4/hashlib.* ${libdir}/python3.4/md5.* ${libdir}/python3.4/sha.* ${libdir}/python3.4/lib-dynload/crypt.*.so ${libdir}/python3.4/lib-dynload/_hashlib.*.so ${libdir}/python3.4/lib-dynload/_sha256.*.so ${libdir}/python3.4/lib-dynload/_sha512.*.so "
-
-SUMMARY_${PN}-ctypes="Python C types support"
-RDEPENDS_${PN}-ctypes="${PN}-core"
-FILES_${PN}-ctypes="${libdir}/python3.4/ctypes ${libdir}/python3.4/lib-dynload/_ctypes.*.so ${libdir}/python3.4/lib-dynload/_ctypes_test.*.so "
-
-SUMMARY_${PN}-curses="Python curses support"
-RDEPENDS_${PN}-curses="${PN}-core"
-FILES_${PN}-curses="${libdir}/python3.4/curses ${libdir}/python3.4/lib-dynload/_curses.*.so ${libdir}/python3.4/lib-dynload/_curses_panel.*.so "
-
-SUMMARY_${PN}-datetime="Python calendar and time support"
-RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python3.4/_strptime.* ${libdir}/python3.4/calendar.* ${libdir}/python3.4/lib-dynload/datetime.*.so "
-
-SUMMARY_${PN}-db="Python file-based database support"
-RDEPENDS_${PN}-db="${PN}-core"
-FILES_${PN}-db="${libdir}/python3.4/anydbm.* ${libdir}/python3.4/dumbdbm.* ${libdir}/python3.4/whichdb.* ${libdir}/python3.4/dbm ${libdir}/python3.4/lib-dynload/_dbm.*.so "
-
-SUMMARY_${PN}-debugger="Python debugger"
-RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil"
-FILES_${PN}-debugger="${libdir}/python3.4/bdb.* ${libdir}/python3.4/pdb.* "
-
-SUMMARY_${PN}-dev="Python development package"
-RDEPENDS_${PN}-dev="${PN}-core"
-FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig "
-
-SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
-RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
-FILES_${PN}-difflib="${libdir}/python3.4/difflib.* "
-
-SUMMARY_${PN}-distutils="Python Distribution Utilities"
-RDEPENDS_${PN}-distutils="${PN}-core"
-FILES_${PN}-distutils="${libdir}/python3.4/config ${libdir}/python3.4/distutils "
-
-SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
-RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
-FILES_${PN}-distutils-staticdev="${libdir}/python3.4/config/lib*.a "
-
-SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
-RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
-FILES_${PN}-doctest="${libdir}/python3.4/doctest.* "
-
-SUMMARY_${PN}-elementtree="Python elementree"
-RDEPENDS_${PN}-elementtree="${PN}-core"
-FILES_${PN}-elementtree="${libdir}/python3.4/lib-dynload/_elementtree.*.so "
-
-SUMMARY_${PN}-email="Python email support"
-RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
-FILES_${PN}-email="${libdir}/python3.4/imaplib.* ${libdir}/python3.4/email "
-
-SUMMARY_${PN}-fcntl="Python's fcntl interface"
-RDEPENDS_${PN}-fcntl="${PN}-core"
-FILES_${PN}-fcntl="${libdir}/python3.4/lib-dynload/fcntl.*.so "
-
-SUMMARY_${PN}-gdbm="Python GNU database support"
-RDEPENDS_${PN}-gdbm="${PN}-core"
-FILES_${PN}-gdbm="${libdir}/python3.4/lib-dynload/_gdbm.*.so "
-
-SUMMARY_${PN}-html="Python HTML processing support"
-RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python3.4/formatter.* ${libdir}/python3.4/htmlentitydefs.* ${libdir}/python3.4/htmllib.* ${libdir}/python3.4/markupbase.* ${libdir}/python3.4/sgmllib.* ${libdir}/python3.4/HTMLParser.* "
-
-SUMMARY_${PN}-idle="Python Integrated Development Environment"
-RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
-FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.4/idlelib "
-
-SUMMARY_${PN}-image="Python graphical image handling"
-RDEPENDS_${PN}-image="${PN}-core"
-FILES_${PN}-image="${libdir}/python3.4/colorsys.* ${libdir}/python3.4/imghdr.* ${libdir}/python3.4/lib-dynload/imageop.*.so ${libdir}/python3.4/lib-dynload/rgbimg.*.so "
-
-SUMMARY_${PN}-importlib="Python import implementation library"
-RDEPENDS_${PN}-importlib="${PN}-core"
-FILES_${PN}-importlib="${libdir}/python3.4/importlib "
-
-SUMMARY_${PN}-io="Python low-level I/O"
-RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-FILES_${PN}-io="${libdir}/python3.4/lib-dynload/_socket.*.so ${libdir}/python3.4/lib-dynload/_io.*.so ${libdir}/python3.4/lib-dynload/_ssl.*.so ${libdir}/python3.4/lib-dynload/select.*.so ${libdir}/python3.4/lib-dynload/termios.*.so ${libdir}/python3.4/lib-dynload/cStringIO.*.so ${libdir}/python3.4/pipes.* ${libdir}/python3.4/socket.* ${libdir}/python3.4/ssl.* ${libdir}/python3.4/tempfile.* ${libdir}/python3.4/StringIO.* ${libdir}/python3.4/io.* ${libdir}/python3.4/_pyio.* "
-
-SUMMARY_${PN}-json="Python JSON support"
-RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
-FILES_${PN}-json="${libdir}/python3.4/json ${libdir}/python3.4/lib-dynload/_json.*.so "
-
-SUMMARY_${PN}-lang="Python low-level language support"
-RDEPENDS_${PN}-lang="${PN}-core"
-FILES_${PN}-lang="${libdir}/python3.4/lib-dynload/_bisect.*.so ${libdir}/python3.4/lib-dynload/_collections.*.so ${libdir}/python3.4/lib-dynload/_heapq.*.so ${libdir}/python3.4/lib-dynload/_weakref.*.so ${libdir}/python3.4/lib-dynload/_functools.*.so ${libdir}/python3.4/lib-dynload/array.*.so ${libdir}/python3.4/lib-dynload/itertools.*.so ${libdir}/python3.4/lib-dynload/operator.*.so ${libdir}/python3.4/lib-dynload/parser.*.so ${libdir}/python3.4/atexit.* ${libdir}/python3.4/bisect.* ${libdir}/python3.4/code.* ${libdir}/python3.4/codeop.* ${libdir}/python3.4/collections.* ${libdir}/python3.4/_collections_abc.* ${libdir}/python3.4/dis.* ${libdir}/python3.4/functools.* ${libdir}/python3.4/heapq.* ${libdir}/python3.4/inspect.* ${libdir}/python3.4/keyword.* ${libdir}/python3.4/opcode.* ${libdir}/python3.4/symbol.* ${libdir}/python3.4/repr.* ${libdir}/python3.4/token.* ${libdir}/python3.4/tokenize.* ${libdir}/python3.4/traceback.* ${libdir}/python3.4/weakref.* "
-
-SUMMARY_${PN}-logging="Python logging support"
-RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
-FILES_${PN}-logging="${libdir}/python3.4/logging "
-
-SUMMARY_${PN}-mailbox="Python mailbox format support"
-RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
-FILES_${PN}-mailbox="${libdir}/python3.4/mailbox.* "
-
-SUMMARY_${PN}-math="Python math support"
-RDEPENDS_${PN}-math="${PN}-core"
-FILES_${PN}-math="${libdir}/python3.4/lib-dynload/cmath.*.so ${libdir}/python3.4/lib-dynload/math.*.so ${libdir}/python3.4/lib-dynload/_random.*.so ${libdir}/python3.4/random.* ${libdir}/python3.4/sets.* "
-
-SUMMARY_${PN}-mime="Python MIME handling APIs"
-RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
-FILES_${PN}-mime="${libdir}/python3.4/mimetools.* ${libdir}/python3.4/uu.* ${libdir}/python3.4/quopri.* ${libdir}/python3.4/rfc822.* ${libdir}/python3.4/MimeWriter.* "
-
-SUMMARY_${PN}-mmap="Python memory-mapped file support"
-RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
-FILES_${PN}-mmap="${libdir}/python3.4/lib-dynload/mmap.*.so "
-
-SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
-RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
-FILES_${PN}-multiprocessing="${libdir}/python3.4/lib-dynload/_multiprocessing.*.so ${libdir}/python3.4/multiprocessing "
-
-SUMMARY_${PN}-netclient="Python Internet Protocol clients"
-RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
-FILES_${PN}-netclient="${libdir}/python3.4/*Cookie*.* ${libdir}/python3.4/base64.* ${libdir}/python3.4/cookielib.* ${libdir}/python3.4/ftplib.* ${libdir}/python3.4/gopherlib.* ${libdir}/python3.4/hmac.* ${libdir}/python3.4/httplib.* ${libdir}/python3.4/mimetypes.* ${libdir}/python3.4/nntplib.* ${libdir}/python3.4/poplib.* ${libdir}/python3.4/smtplib.* ${libdir}/python3.4/telnetlib.* ${libdir}/python3.4/urllib ${libdir}/python3.4/uuid.* ${libdir}/python3.4/rfc822.* ${libdir}/python3.4/mimetools.* "
-
-SUMMARY_${PN}-netserver="Python Internet Protocol servers"
-RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python3.4/cgi.* ${libdir}/python3.4/*HTTPServer.* ${libdir}/python3.4/SocketServer.* "
-
-SUMMARY_${PN}-numbers="Python number APIs"
-RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
-FILES_${PN}-numbers="${libdir}/python3.4/decimal.* ${libdir}/python3.4/fractions.* ${libdir}/python3.4/numbers.* "
-
-SUMMARY_${PN}-pickle="Python serialisation/persistence support"
-RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python3.4/pickle.* ${libdir}/python3.4/shelve.* ${libdir}/python3.4/lib-dynload/cPickle.*.so ${libdir}/python3.4/pickletools.* "
-
-SUMMARY_${PN}-pkgutil="Python package extension utility support"
-RDEPENDS_${PN}-pkgutil="${PN}-core"
-FILES_${PN}-pkgutil="${libdir}/python3.4/pkgutil.* "
-
-SUMMARY_${PN}-pprint="Python pretty-print support"
-RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
-FILES_${PN}-pprint="${libdir}/python3.4/pprint.* "
-
-SUMMARY_${PN}-profile="Python basic performance profiling support"
-RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
-FILES_${PN}-profile="${libdir}/python3.4/profile.* ${libdir}/python3.4/pstats.* ${libdir}/python3.4/cProfile.* ${libdir}/python3.4/lib-dynload/_lsprof.*.so "
-
-SUMMARY_${PN}-pydoc="Python interactive help support"
-RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
-FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.4/pydoc.* ${libdir}/python3.4/pydoc_data "
-
-SUMMARY_${PN}-re="Python Regular Expression APIs"
-RDEPENDS_${PN}-re="${PN}-core"
-FILES_${PN}-re="${libdir}/python3.4/re.* ${libdir}/python3.4/sre.* ${libdir}/python3.4/sre_compile.* ${libdir}/python3.4/sre_constants* ${libdir}/python3.4/sre_parse.* "
-
-SUMMARY_${PN}-readline="Python readline support"
-RDEPENDS_${PN}-readline="${PN}-core"
-FILES_${PN}-readline="${libdir}/python3.4/lib-dynload/readline.*.so ${libdir}/python3.4/rlcompleter.* "
-
-SUMMARY_${PN}-reprlib="Python alternate repr() implementation"
-RDEPENDS_${PN}-reprlib="${PN}-core"
-FILES_${PN}-reprlib="${libdir}/python3.4/reprlib.py "
-
-SUMMARY_${PN}-resource="Python resource control interface"
-RDEPENDS_${PN}-resource="${PN}-core"
-FILES_${PN}-resource="${libdir}/python3.4/lib-dynload/resource.*.so "
-
-SUMMARY_${PN}-shell="Python shell-like functionality"
-RDEPENDS_${PN}-shell="${PN}-core ${PN}-re"
-FILES_${PN}-shell="${libdir}/python3.4/cmd.* ${libdir}/python3.4/commands.* ${libdir}/python3.4/dircache.* ${libdir}/python3.4/fnmatch.* ${libdir}/python3.4/glob.* ${libdir}/python3.4/popen2.* ${libdir}/python3.4/shlex.* ${libdir}/python3.4/shutil.* "
-
-SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
-RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
-FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.4/smtpd.* "
-
-SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
-RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading"
-FILES_${PN}-sqlite3="${libdir}/python3.4/lib-dynload/_sqlite3.*.so ${libdir}/python3.4/sqlite3/dbapi2.* ${libdir}/python3.4/sqlite3/__init__.* ${libdir}/python3.4/sqlite3/dump.* "
-
-SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
-RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
-FILES_${PN}-sqlite3-tests="${libdir}/python3.4/sqlite3/test "
-
-SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
-RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
-FILES_${PN}-stringold="${libdir}/python3.4/lib-dynload/strop.*.so ${libdir}/python3.4/string.* ${libdir}/python3.4/stringold.* "
-
-SUMMARY_${PN}-subprocess="Python subprocess support"
-RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle"
-FILES_${PN}-subprocess="${libdir}/python3.4/subprocess.* "
-
-SUMMARY_${PN}-syslog="Python syslog interface"
-RDEPENDS_${PN}-syslog="${PN}-core"
-FILES_${PN}-syslog="${libdir}/python3.4/lib-dynload/syslog.*.so "
-
-SUMMARY_${PN}-terminal="Python terminal controlling support"
-RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
-FILES_${PN}-terminal="${libdir}/python3.4/pty.* ${libdir}/python3.4/tty.* "
-
-SUMMARY_${PN}-tests="Python tests"
-RDEPENDS_${PN}-tests="${PN}-core"
-FILES_${PN}-tests="${libdir}/python3.4/test "
-
-SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
-RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
-FILES_${PN}-textutils="${libdir}/python3.4/lib-dynload/_csv.*.so ${libdir}/python3.4/csv.* ${libdir}/python3.4/optparse.* ${libdir}/python3.4/textwrap.* "
-
-SUMMARY_${PN}-threading="Python threading & synchronization support"
-RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python3.4/_threading_local.* ${libdir}/python3.4/dummy_thread.* ${libdir}/python3.4/dummy_threading.* ${libdir}/python3.4/mutex.* ${libdir}/python3.4/threading.* ${libdir}/python3.4/Queue.* "
-
-SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
-RDEPENDS_${PN}-tkinter="${PN}-core"
-FILES_${PN}-tkinter="${libdir}/python3.4/lib-dynload/_tkinter.*.so ${libdir}/python3.4/lib-tk ${libdir}/python3.4/tkinter "
-
-SUMMARY_${PN}-unittest="Python unit testing framework"
-RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
-FILES_${PN}-unittest="${libdir}/python3.4/unittest/ "
-
-SUMMARY_${PN}-unixadmin="Python Unix administration support"
-RDEPENDS_${PN}-unixadmin="${PN}-core"
-FILES_${PN}-unixadmin="${libdir}/python3.4/lib-dynload/nis.*.so ${libdir}/python3.4/lib-dynload/grp.*.so ${libdir}/python3.4/lib-dynload/pwd.*.so ${libdir}/python3.4/getpass.* "
-
-SUMMARY_${PN}-xml="Python basic XML support"
-RDEPENDS_${PN}-xml="${PN}-core ${PN}-elementtree ${PN}-re"
-FILES_${PN}-xml="${libdir}/python3.4/lib-dynload/pyexpat.*.so ${libdir}/python3.4/xml ${libdir}/python3.4/xmllib.* "
-
-SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
-RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
-FILES_${PN}-xmlrpc="${libdir}/python3.4/xmlrpclib.* ${libdir}/python3.4/SimpleXMLRPCServer.* ${libdir}/python3.4/DocXMLRPCServer.* ${libdir}/python3.4/xmlrpc "
-
-SUMMARY_${PN}-modules="All Python modules"
-RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-elementtree ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc  "
-ALLOW_EMPTY_${PN}-modules = "1"
-
-
diff --git a/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc b/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
new file mode 100644
index 0000000..335c3ff
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -0,0 +1,264 @@
+
+# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
+# Generator: '../../../scripts/contrib/python/generate-manifest-3.5.py' Version 20140131 (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
+
+ 
+
+PROVIDES+="${PN}-2to3 ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils ${PN}-distutils-staticdev ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
+
+PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-dev ${PN}-difflib ${PN}-distutils-staticdev ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc ${PN}-modules"
+
+SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
+RDEPENDS_${PN}-2to3="${PN}-core"
+FILES_${PN}-2to3="${libdir}/python3.5/lib2to3 "
+
+SUMMARY_${PN}-asyncio="Python Asynchronous I/O, event loop, coroutines and tasks"
+RDEPENDS_${PN}-asyncio="${PN}-core"
+FILES_${PN}-asyncio="${libdir}/python3.5/asyncio "
+
+SUMMARY_${PN}-audio="Python Audio Handling"
+RDEPENDS_${PN}-audio="${PN}-core"
+FILES_${PN}-audio="${libdir}/python3.5/wave.* ${libdir}/python3.5/chunk.* ${libdir}/python3.5/sndhdr.* ${libdir}/python3.5/lib-dynload/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/audioop.*.so ${libdir}/python3.5/audiodev.* ${libdir}/python3.5/sunaudio.* ${libdir}/python3.5/sunau.* ${libdir}/python3.5/toaiff.* "
+
+SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
+RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
+FILES_${PN}-codecs="${libdir}/python3.5/codecs.* ${libdir}/python3.5/encodings ${libdir}/python3.5/gettext.* ${libdir}/python3.5/locale.* ${libdir}/python3.5/lib-dynload/_locale.*.so ${libdir}/python3.5/lib-dynload/_codecs* ${libdir}/python3.5/lib-dynload/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/unicodedata.*.so ${libdir}/python3.5/stringprep.* ${libdir}/python3.5/xdrlib.* "
+
+SUMMARY_${PN}-compile="Python bytecode compilation support"
+RDEPENDS_${PN}-compile="${PN}-core"
+FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/compileall.* "
+
+SUMMARY_${PN}-compression="Python high-level compression support"
+RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs"
+FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so "
+
+SUMMARY_${PN}-core="Python interpreter and core modules"
+RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
+FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/ConfigParser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
+
+SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
+RDEPENDS_${PN}-crypt="${PN}-core"
+FILES_${PN}-crypt="${libdir}/python3.5/hashlib.* ${libdir}/python3.5/md5.* ${libdir}/python3.5/sha.* ${libdir}/python3.5/lib-dynload/crypt.*.so ${libdir}/python3.5/lib-dynload/_hashlib.*.so ${libdir}/python3.5/lib-dynload/_sha256.*.so ${libdir}/python3.5/lib-dynload/_sha512.*.so "
+
+SUMMARY_${PN}-ctypes="Python C types support"
+RDEPENDS_${PN}-ctypes="${PN}-core"
+FILES_${PN}-ctypes="${libdir}/python3.5/ctypes ${libdir}/python3.5/lib-dynload/_ctypes.*.so ${libdir}/python3.5/lib-dynload/_ctypes_test.*.so "
+
+SUMMARY_${PN}-curses="Python curses support"
+RDEPENDS_${PN}-curses="${PN}-core"
+FILES_${PN}-curses="${libdir}/python3.5/curses ${libdir}/python3.5/lib-dynload/_curses.*.so ${libdir}/python3.5/lib-dynload/_curses_panel.*.so "
+
+SUMMARY_${PN}-datetime="Python calendar and time support"
+RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
+FILES_${PN}-datetime="${libdir}/python3.5/_strptime.* ${libdir}/python3.5/calendar.* ${libdir}/python3.5/lib-dynload/datetime.*.so "
+
+SUMMARY_${PN}-db="Python file-based database support"
+RDEPENDS_${PN}-db="${PN}-core"
+FILES_${PN}-db="${libdir}/python3.5/anydbm.* ${libdir}/python3.5/dumbdbm.* ${libdir}/python3.5/whichdb.* ${libdir}/python3.5/dbm ${libdir}/python3.5/lib-dynload/_dbm.*.so "
+
+SUMMARY_${PN}-debugger="Python debugger"
+RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil"
+FILES_${PN}-debugger="${libdir}/python3.5/bdb.* ${libdir}/python3.5/pdb.* "
+
+SUMMARY_${PN}-dev="Python development package"
+RDEPENDS_${PN}-dev="${PN}-core"
+FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdir}/*.a ${libdir}/*.o ${libdir}/pkgconfig ${base_libdir}/*.a ${base_libdir}/*.o ${datadir}/aclocal ${datadir}/pkgconfig "
+
+SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
+RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
+FILES_${PN}-difflib="${libdir}/python3.5/difflib.* "
+
+SUMMARY_${PN}-distutils="Python Distribution Utilities"
+RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
+FILES_${PN}-distutils="${libdir}/python3.5/config ${libdir}/python3.5/distutils "
+
+SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
+RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
+FILES_${PN}-distutils-staticdev="${libdir}/python3.5/config/lib*.a "
+
+SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
+RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
+FILES_${PN}-doctest="${libdir}/python3.5/doctest.* "
+
+SUMMARY_${PN}-email="Python email support"
+RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
+FILES_${PN}-email="${libdir}/python3.5/imaplib.* ${libdir}/python3.5/email "
+
+SUMMARY_${PN}-fcntl="Python's fcntl interface"
+RDEPENDS_${PN}-fcntl="${PN}-core"
+FILES_${PN}-fcntl="${libdir}/python3.5/lib-dynload/fcntl.*.so "
+
+SUMMARY_${PN}-gdbm="Python GNU database support"
+RDEPENDS_${PN}-gdbm="${PN}-core"
+FILES_${PN}-gdbm="${libdir}/python3.5/lib-dynload/_gdbm.*.so "
+
+SUMMARY_${PN}-html="Python HTML processing support"
+RDEPENDS_${PN}-html="${PN}-core"
+FILES_${PN}-html="${libdir}/python3.5/formatter.* ${libdir}/python3.5/htmlentitydefs.* ${libdir}/python3.5/htmllib.* ${libdir}/python3.5/markupbase.* ${libdir}/python3.5/sgmllib.* ${libdir}/python3.5/HTMLParser.* "
+
+SUMMARY_${PN}-idle="Python Integrated Development Environment"
+RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
+FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.5/idlelib "
+
+SUMMARY_${PN}-image="Python graphical image handling"
+RDEPENDS_${PN}-image="${PN}-core"
+FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/imghdr.* ${libdir}/python3.5/lib-dynload/imageop.*.so ${libdir}/python3.5/lib-dynload/rgbimg.*.so "
+
+SUMMARY_${PN}-importlib="Python import implementation library"
+RDEPENDS_${PN}-importlib="${PN}-core"
+FILES_${PN}-importlib="${libdir}/python3.5/importlib "
+
+SUMMARY_${PN}-io="Python low-level I/O"
+RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
+FILES_${PN}-io="${libdir}/python3.5/lib-dynload/_socket.*.so ${libdir}/python3.5/lib-dynload/_io.*.so ${libdir}/python3.5/lib-dynload/_ssl.*.so ${libdir}/python3.5/lib-dynload/select.*.so ${libdir}/python3.5/lib-dynload/termios.*.so ${libdir}/python3.5/lib-dynload/cStringIO.*.so ${libdir}/python3.5/pipes.* ${libdir}/python3.5/socket.* ${libdir}/python3.5/ssl.* ${libdir}/python3.5/tempfile.* ${libdir}/python3.5/StringIO.* ${libdir}/python3.5/io.* ${libdir}/python3.5/_pyio.* "
+
+SUMMARY_${PN}-json="Python JSON support"
+RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
+FILES_${PN}-json="${libdir}/python3.5/json ${libdir}/python3.5/lib-dynload/_json.*.so "
+
+SUMMARY_${PN}-lang="Python low-level language support"
+RDEPENDS_${PN}-lang="${PN}-core"
+FILES_${PN}-lang="${libdir}/python3.5/lib-dynload/_bisect.*.so ${libdir}/python3.5/lib-dynload/_collections.*.so ${libdir}/python3.5/lib-dynload/_heapq.*.so ${libdir}/python3.5/lib-dynload/_weakref.*.so ${libdir}/python3.5/lib-dynload/_functools.*.so ${libdir}/python3.5/lib-dynload/array.*.so ${libdir}/python3.5/lib-dynload/itertools.*.so ${libdir}/python3.5/lib-dynload/operator.*.so ${libdir}/python3.5/lib-dynload/parser.*.so ${libdir}/python3.5/atexit.* ${libdir}/python3.5/bisect.* ${libdir}/python3.5/code.* ${libdir}/python3.5/codeop.* ${libdir}/python3.5/collections.* ${libdir}/python3.5/_collections_abc.* ${libdir}/python3.5/dis.* ${libdir}/python3.5/functools.* ${libdir}/python3.5/heapq.* ${libdir}/python3.5/inspect.* ${libdir}/python3.5/keyword.* ${libdir}/python3.5/opcode.* ${libdir}/python3.5/symbol.* ${libdir}/python3.5/repr.* ${libdir}/python3.5/token.* ${libdir}/python3.5/tokenize.* ${libdir}/python3.5/traceback.* ${libdir}/python3.5/weakref.* "
+
+SUMMARY_${PN}-logging="Python logging support"
+RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
+FILES_${PN}-logging="${libdir}/python3.5/logging "
+
+SUMMARY_${PN}-mailbox="Python mailbox format support"
+RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
+FILES_${PN}-mailbox="${libdir}/python3.5/mailbox.* "
+
+SUMMARY_${PN}-math="Python math support"
+RDEPENDS_${PN}-math="${PN}-core"
+FILES_${PN}-math="${libdir}/python3.5/lib-dynload/cmath.*.so ${libdir}/python3.5/lib-dynload/math.*.so ${libdir}/python3.5/lib-dynload/_random.*.so ${libdir}/python3.5/random.* ${libdir}/python3.5/sets.* "
+
+SUMMARY_${PN}-mime="Python MIME handling APIs"
+RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
+FILES_${PN}-mime="${libdir}/python3.5/mimetools.* ${libdir}/python3.5/uu.* ${libdir}/python3.5/quopri.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/MimeWriter.* "
+
+SUMMARY_${PN}-mmap="Python memory-mapped file support"
+RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
+FILES_${PN}-mmap="${libdir}/python3.5/lib-dynload/mmap.*.so "
+
+SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
+RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
+FILES_${PN}-multiprocessing="${libdir}/python3.5/lib-dynload/_multiprocessing.*.so ${libdir}/python3.5/multiprocessing "
+
+SUMMARY_${PN}-netclient="Python Internet Protocol clients"
+RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
+FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* ${libdir}/python3.5/base64.* ${libdir}/python3.5/cookielib.* ${libdir}/python3.5/ftplib.* ${libdir}/python3.5/gopherlib.* ${libdir}/python3.5/hmac.* ${libdir}/python3.5/httplib.* ${libdir}/python3.5/mimetypes.* ${libdir}/python3.5/nntplib.* ${libdir}/python3.5/poplib.* ${libdir}/python3.5/smtplib.* ${libdir}/python3.5/telnetlib.* ${libdir}/python3.5/urllib ${libdir}/python3.5/uuid.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/mimetools.* "
+
+SUMMARY_${PN}-netserver="Python Internet Protocol servers"
+RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
+FILES_${PN}-netserver="${libdir}/python3.5/cgi.* ${libdir}/python3.5/*HTTPServer.* ${libdir}/python3.5/SocketServer.* "
+
+SUMMARY_${PN}-numbers="Python number APIs"
+RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
+FILES_${PN}-numbers="${libdir}/python3.5/decimal.* ${libdir}/python3.5/fractions.* ${libdir}/python3.5/numbers.* "
+
+SUMMARY_${PN}-pickle="Python serialisation/persistence support"
+RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
+FILES_${PN}-pickle="${libdir}/python3.5/pickle.* ${libdir}/python3.5/shelve.* ${libdir}/python3.5/lib-dynload/cPickle.*.so ${libdir}/python3.5/pickletools.* "
+
+SUMMARY_${PN}-pkgutil="Python package extension utility support"
+RDEPENDS_${PN}-pkgutil="${PN}-core"
+FILES_${PN}-pkgutil="${libdir}/python3.5/pkgutil.* "
+
+SUMMARY_${PN}-pprint="Python pretty-print support"
+RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
+FILES_${PN}-pprint="${libdir}/python3.5/pprint.* "
+
+SUMMARY_${PN}-profile="Python basic performance profiling support"
+RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
+FILES_${PN}-profile="${libdir}/python3.5/profile.* ${libdir}/python3.5/pstats.* ${libdir}/python3.5/cProfile.* ${libdir}/python3.5/lib-dynload/_lsprof.*.so "
+
+SUMMARY_${PN}-pydoc="Python interactive help support"
+RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
+FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.5/pydoc.* ${libdir}/python3.5/pydoc_data "
+
+SUMMARY_${PN}-re="Python Regular Expression APIs"
+RDEPENDS_${PN}-re="${PN}-core"
+FILES_${PN}-re="${libdir}/python3.5/re.* ${libdir}/python3.5/sre.* ${libdir}/python3.5/sre_compile.* ${libdir}/python3.5/sre_constants* ${libdir}/python3.5/sre_parse.* "
+
+SUMMARY_${PN}-readline="Python readline support"
+RDEPENDS_${PN}-readline="${PN}-core"
+FILES_${PN}-readline="${libdir}/python3.5/lib-dynload/readline.*.so ${libdir}/python3.5/rlcompleter.* "
+
+SUMMARY_${PN}-reprlib="Python alternate repr() implementation"
+RDEPENDS_${PN}-reprlib="${PN}-core"
+FILES_${PN}-reprlib="${libdir}/python3.5/reprlib.py "
+
+SUMMARY_${PN}-resource="Python resource control interface"
+RDEPENDS_${PN}-resource="${PN}-core"
+FILES_${PN}-resource="${libdir}/python3.5/lib-dynload/resource.*.so "
+
+SUMMARY_${PN}-shell="Python shell-like functionality"
+RDEPENDS_${PN}-shell="${PN}-core ${PN}-re"
+FILES_${PN}-shell="${libdir}/python3.5/cmd.* ${libdir}/python3.5/commands.* ${libdir}/python3.5/dircache.* ${libdir}/python3.5/fnmatch.* ${libdir}/python3.5/glob.* ${libdir}/python3.5/popen2.* ${libdir}/python3.5/shlex.* ${libdir}/python3.5/shutil.* "
+
+SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
+RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
+FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.5/smtpd.* "
+
+SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
+RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading"
+FILES_${PN}-sqlite3="${libdir}/python3.5/lib-dynload/_sqlite3.*.so ${libdir}/python3.5/sqlite3/dbapi2.* ${libdir}/python3.5/sqlite3/__init__.* ${libdir}/python3.5/sqlite3/dump.* "
+
+SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
+RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
+FILES_${PN}-sqlite3-tests="${libdir}/python3.5/sqlite3/test "
+
+SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
+RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
+FILES_${PN}-stringold="${libdir}/python3.5/lib-dynload/strop.*.so ${libdir}/python3.5/string.* ${libdir}/python3.5/stringold.* "
+
+SUMMARY_${PN}-subprocess="Python subprocess support"
+RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle"
+FILES_${PN}-subprocess="${libdir}/python3.5/subprocess.* "
+
+SUMMARY_${PN}-syslog="Python syslog interface"
+RDEPENDS_${PN}-syslog="${PN}-core"
+FILES_${PN}-syslog="${libdir}/python3.5/lib-dynload/syslog.*.so "
+
+SUMMARY_${PN}-terminal="Python terminal controlling support"
+RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
+FILES_${PN}-terminal="${libdir}/python3.5/pty.* ${libdir}/python3.5/tty.* "
+
+SUMMARY_${PN}-tests="Python tests"
+RDEPENDS_${PN}-tests="${PN}-core"
+FILES_${PN}-tests="${libdir}/python3.5/test "
+
+SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
+RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
+FILES_${PN}-textutils="${libdir}/python3.5/lib-dynload/_csv.*.so ${libdir}/python3.5/csv.* ${libdir}/python3.5/optparse.* ${libdir}/python3.5/textwrap.* "
+
+SUMMARY_${PN}-threading="Python threading & synchronization support"
+RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
+FILES_${PN}-threading="${libdir}/python3.5/_threading_local.* ${libdir}/python3.5/dummy_thread.* ${libdir}/python3.5/dummy_threading.* ${libdir}/python3.5/mutex.* ${libdir}/python3.5/threading.* ${libdir}/python3.5/Queue.* "
+
+SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
+RDEPENDS_${PN}-tkinter="${PN}-core"
+FILES_${PN}-tkinter="${libdir}/python3.5/lib-dynload/_tkinter.*.so ${libdir}/python3.5/lib-tk ${libdir}/python3.5/tkinter "
+
+SUMMARY_${PN}-unittest="Python unit testing framework"
+RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
+FILES_${PN}-unittest="${libdir}/python3.5/unittest/ "
+
+SUMMARY_${PN}-unixadmin="Python Unix administration support"
+RDEPENDS_${PN}-unixadmin="${PN}-core"
+FILES_${PN}-unixadmin="${libdir}/python3.5/lib-dynload/nis.*.so ${libdir}/python3.5/lib-dynload/grp.*.so ${libdir}/python3.5/lib-dynload/pwd.*.so ${libdir}/python3.5/getpass.* "
+
+SUMMARY_${PN}-xml="Python basic XML support"
+RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
+FILES_${PN}-xml="${libdir}/python3.5/lib-dynload/_elementtree.*.so ${libdir}/python3.5/lib-dynload/pyexpat.*.so ${libdir}/python3.5/xml ${libdir}/python3.5/xmllib.* "
+
+SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
+RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
+FILES_${PN}-xmlrpc="${libdir}/python3.5/xmlrpclib.* ${libdir}/python3.5/SimpleXMLRPCServer.* ${libdir}/python3.5/DocXMLRPCServer.* ${libdir}/python3.5/xmlrpc "
+
+SUMMARY_${PN}-modules="All Python modules"
+RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-shell ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc  "
+ALLOW_EMPTY_${PN}-modules = "1"
+
+
diff --git a/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb b/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb
index 5a17a1a..ad0a617 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb
+++ b/yocto-poky/meta/recipes-devtools/python/python-async_0.6.2.bb
@@ -8,6 +8,8 @@
 SRC_URI[md5sum] = "9b06b5997de2154f3bc0273f80bcef6b"
 SRC_URI[sha256sum] = "ac6894d876e45878faae493b0cf61d0e28ec417334448ac0a6ea2229d8343051"
 
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/async/"
+
 S = "${WORKDIR}/async-${PV}"
 
 inherit setuptools
diff --git a/yocto-poky/meta/recipes-devtools/python/python-git_1.0.1.bb b/yocto-poky/meta/recipes-devtools/python/python-git_1.0.1.bb
deleted file mode 100644
index a78d7c8..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-git_1.0.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Python library used to interact with Git repositories"
-DESCRIPTION = "GitPython provides object model read and write access to \
-a git repository. Access repository information conveniently, alter the \
-index directly, handle remotes, or go down to low-level object database \
-access with big-files support."
-HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
-SECTION = "devel/python"
-LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
-DEPENDS = "python-gitdb"
-
-SRC_URI = "http://pypi.python.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "4659644b42c41e5e5170c0cd83ed6422"
-SRC_URI[sha256sum] = "9c88c17bbcae2a445ff64024ef13526224f70e35e38c33416be5ceb56ca7f760"
-
-S = "${WORKDIR}/GitPython-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} += "python-gitdb python-lang python-io python-shell python-math python-re python-subprocess python-stringold"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-git_1.0.2.bb b/yocto-poky/meta/recipes-devtools/python/python-git_1.0.2.bb
new file mode 100644
index 0000000..f00f805
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-git_1.0.2.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Python library used to interact with Git repositories"
+DESCRIPTION = "GitPython provides object model read and write access to \
+a git repository. Access repository information conveniently, alter the \
+index directly, handle remotes, or go down to low-level object database \
+access with big-files support."
+HOMEPAGE = "http://github.com/gitpython-developers/GitPython"
+SECTION = "devel/python"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=8b8d26c37c1d5a04f9b0186edbebc183"
+DEPENDS = "python-gitdb"
+
+SRC_URI = "http://pypi.python.org/packages/source/G/GitPython/GitPython-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "d92d96a8da0fc77cf141d3e16084e094"
+SRC_URI[sha256sum] = "85de72556781480a38897a77de5b458ae3838b0fd589593679a1b5f34d181d84"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/GitPython/"
+UPSTREAM_CHECK_REGEX = "/GitPython/(?P<pver>(\d+[\.\-_]*)+)"
+
+S = "${WORKDIR}/GitPython-${PV}"
+
+inherit setuptools
+
+RDEPENDS_${PN} += "python-gitdb python-lang python-io python-shell python-math python-re python-subprocess python-stringold python-unixadmin"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb b/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
index f0083bd..c82df1e 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
+++ b/yocto-poky/meta/recipes-devtools/python/python-gitdb_0.6.4.bb
@@ -10,6 +10,8 @@
 SRC_URI[md5sum] = "44e4366b8bdfd306b075c3a52c96ae1a"
 SRC_URI[sha256sum] = "a3ebbc27be035a2e874ed904df516e35f4a29a778a764385de09de9e0f139658"
 
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/gitdb/"
+
 S = "${WORKDIR}/gitdb-${PV}"
 
 inherit distutils
diff --git a/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.1.bb b/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.1.bb
deleted file mode 100644
index 5d42b0c..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Templating library for Python"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=deb3ff8e4c17aaf7b80889b6b2bf4c83"
-
-SRC_URI = "https://pypi.python.org/packages/source/M/Mako/Mako-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "9f0aafd177b039ef67b90ea350497a54"
-SRC_URI[sha256sum] = "45f0869febea59dab7efd256fb451c377cbb7947bef386ff0bb44627c31a8d1c"
-
-S = "${WORKDIR}/Mako-${PV}"
-
-inherit setuptools
-
-RDEPENDS_${PN} = "python-threading \
-                  python-netclient \
-                  python-html \
-"
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.3.bb b/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.3.bb
new file mode 100644
index 0000000..9efd700
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-mako_1.0.3.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Templating library for Python"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=deb3ff8e4c17aaf7b80889b6b2bf4c83"
+
+SRC_URI = "https://pypi.python.org/packages/source/M/Mako/Mako-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "a78f20f6366a8a0659ce5532f8614e53"
+SRC_URI[sha256sum] = "7644bc0ee35965d2e146dde31827b8982ed70a58281085fac42869a09764d38c"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/mako/"
+UPSTREAM_CHECK_REGEX = "/Mako/(?P<pver>(\d+[\.\-_]*)+)"
+
+S = "${WORKDIR}/Mako-${PV}"
+
+inherit setuptools
+
+RDEPENDS_${PN} = "python-threading \
+                  python-netclient \
+                  python-html \
+"
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-native_2.7.11.bb b/yocto-poky/meta/recipes-devtools/python/python-native_2.7.11.bb
new file mode 100644
index 0000000..4c204a4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-native_2.7.11.bb
@@ -0,0 +1,63 @@
+require python.inc
+
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
+PR = "${INC_PR}.1"
+
+SRC_URI += "\
+            file://05-enable-ctypes-cross-build.patch \
+            file://10-distutils-fix-swig-parameter.patch \
+            file://11-distutils-never-modify-shebang-line.patch \
+            file://12-distutils-prefix-is-inside-staging-area.patch \
+            file://debug.patch \
+            file://unixccompiler.patch \
+            file://nohostlibs.patch \
+            file://multilib.patch \
+            file://add-md5module-support.patch \
+            file://builddir.patch \
+            file://parallel-makeinst-create-bindir.patch \
+            file://revert_use_of_sysconfigdata.patch \
+            file://avoid_parallel_make_races_on_pgen.patch \
+           "
+S = "${WORKDIR}/Python-${PV}"
+
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
+
+inherit native
+
+RPROVIDES += "python-distutils-native python-compression-native python-textutils-native python-codecs-native python-core-native python-unittest-native"
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN}"
+
+EXTRA_OEMAKE = '\
+  BUILD_SYS="" \
+  HOST_SYS="" \
+  LIBC="" \
+  STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+  STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+'
+
+do_configure_append() {
+	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_install() {
+	oe_runmake 'DESTDIR=${D}' install
+	install -d ${D}${bindir}/${PN}
+	install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+	# Make sure we use /usr/bin/env python
+	for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+		sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
+	done
+
+	# Add a symlink to the native Python so that scripts can just invoke
+	# "nativepython" and get the right one without needing absolute paths
+	# (these often end up too long for the #! parser in the kernel as the
+	# buffer is 128 bytes long).
+	ln -s python-native/python ${D}${bindir}/nativepython
+
+	# We don't want modules in ~/.local being used in preference to those
+	# installed in the native sysroot, so disable user site support.
+	sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
+}
diff --git a/yocto-poky/meta/recipes-devtools/python/python-native_2.7.9.bb b/yocto-poky/meta/recipes-devtools/python/python-native_2.7.9.bb
deleted file mode 100644
index 34f5c29..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-native_2.7.9.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-require python.inc
-
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
-PR = "${INC_PR}.1"
-
-SRC_URI += "\
-            file://05-enable-ctypes-cross-build.patch \
-            file://10-distutils-fix-swig-parameter.patch \
-            file://11-distutils-never-modify-shebang-line.patch \
-            file://12-distutils-prefix-is-inside-staging-area.patch \
-            file://debug.patch \
-            file://unixccompiler.patch \
-            file://nohostlibs.patch \
-            file://multilib.patch \
-            file://add-md5module-support.patch \
-            file://builddir.patch \
-            file://parallel-makeinst-create-bindir.patch \
-            file://revert_use_of_sysconfigdata.patch \
-            file://avoid_parallel_make_races_on_pgen.patch \
-           "
-S = "${WORKDIR}/Python-${PV}"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
-
-inherit native
-
-RPROVIDES += "python-distutils-native python-compression-native python-textutils-native python-codecs-native python-core-native"
-
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN}"
-
-EXTRA_OEMAKE = '\
-  BUILD_SYS="" \
-  HOST_SYS="" \
-  LIBC="" \
-  STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
-  STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
-'
-
-do_configure_append() {
-	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_install() {
-	oe_runmake 'DESTDIR=${D}' install
-	install -d ${D}${bindir}/${PN}
-	install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
-	# Make sure we use /usr/bin/env python
-	for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
-		sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT
-	done
-
-	# Add a symlink to the native Python so that scripts can just invoke
-	# "nativepython" and get the right one without needing absolute paths
-	# (these often end up too long for the #! parser in the kernel as the
-	# buffer is 128 bytes long).
-	ln -s python-native/python ${D}${bindir}/nativepython
-
-	# We don't want modules in ~/.local being used in preference to those
-	# installed in the native sysroot, so disable user site support.
-	sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
-}
diff --git a/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.6.bb b/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.6.bb
deleted file mode 100644
index d6e8fc1..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.6.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-DESCRIPTION = "nose extends the test loading and running features of unittest, \
-making it easier to write, find and run tests."
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
-
-SRC_URI = "http://pypi.python.org/packages/source/n/nose/nose-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "0ca546d81ca8309080fc80cb389e7a16"
-SRC_URI[sha256sum] = "f61e0909a743eed37b1207e38a8e7b4a2fe0a82185e36f2be252ef1b3f901758"
-
-S = "${WORKDIR}/nose-${PV}"
-
-inherit setuptools
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb b/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
new file mode 100644
index 0000000..ec6158f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-nose_1.3.7.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Extends Python unittest to make testing easier"
+DESCRIPTION = "nose extends the test loading and running features of unittest, \
+making it easier to write, find and run tests."
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://lgpl.txt;md5=a6f89e2100d9b6cdffcea4f398e37343"
+
+SRC_URI = "http://pypi.python.org/packages/source/n/nose/nose-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "4d3ad0ff07b61373d2cefc89c5d0b20b"
+SRC_URI[sha256sum] = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/nose/"
+UPSTREAM_CHECK_REGEX = "/nose/(?P<pver>(\d+[\.\-_]*)+)"
+
+S = "${WORKDIR}/nose-${PV}"
+
+inherit setuptools
+
+RDEPENDS_${PN} = "\
+  python-unittest \
+  "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch b/yocto-poky/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
new file mode 100644
index 0000000..5b134ed
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy/0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch
@@ -0,0 +1,78 @@
+From cc2ce6d8b6a3e6e2c8874896c10897034a80cd4f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 10 Dec 2015 13:20:30 +0200
+Subject: [PATCH] Don't search /usr and so on for libraries by default to avoid
+ host contamination.
+
+Upstream-Status: Inappropriate (As the code stands, this is a hack)
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ numpy/distutils/system_info.py | 50 +++++-------------------------------------
+ 1 file changed, 6 insertions(+), 44 deletions(-)
+
+diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
+index 9dd48e2..80e197a 100644
+--- a/numpy/distutils/system_info.py
++++ b/numpy/distutils/system_info.py
+@@ -204,51 +204,13 @@ if sys.platform == 'win32':
+     default_x11_lib_dirs = []
+     default_x11_include_dirs = []
+ else:
+-    default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
+-                                 '/opt/local/lib', '/sw/lib'], platform_bits)
+     default_runtime_dirs = []
+-    default_include_dirs = ['/usr/local/include',
+-                            '/opt/include', '/usr/include',
+-                            # path of umfpack under macports
+-                            '/opt/local/include/ufsparse',
+-                            '/opt/local/include', '/sw/include',
+-                            '/usr/include/suitesparse']
+-    default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src']
+-
+-    default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib',
+-                                     '/usr/lib'], platform_bits)
+-    default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include',
+-                                '/usr/include']
+-
+-    if os.path.exists('/usr/lib/X11'):
+-        globbed_x11_dir = glob('/usr/lib/*/libX11.so')
+-        if globbed_x11_dir:
+-            x11_so_dir = os.path.split(globbed_x11_dir[0])[0]
+-            default_x11_lib_dirs.extend([x11_so_dir, '/usr/lib/X11'])
+-            default_x11_include_dirs.extend(['/usr/lib/X11/include',
+-                                             '/usr/include/X11'])
+-
+-    import subprocess as sp
+-    tmp = None
+-    try:
+-        # Explicitly open/close file to avoid ResourceWarning when
+-        # tests are run in debug mode Python 3.
+-        tmp = open(os.devnull, 'w')
+-        p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE,
+-                stderr=tmp)
+-    except (OSError, DistutilsError):
+-        # OSError if gcc is not installed, or SandboxViolation (DistutilsError
+-        # subclass) if an old setuptools bug is triggered (see gh-3160).
+-        pass
+-    else:
+-        triplet = str(p.communicate()[0].decode().strip())
+-        if p.returncode == 0:
+-            # gcc supports the "-print-multiarch" option
+-            default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
+-            default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
+-    finally:
+-        if tmp is not None:
+-            tmp.close()
++    default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
++    default_include_dirs = ['/deaddir/include']
++    default_src_dirs = ['.', '/deaddir/src']
++
++    default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
++    default_x11_include_dirs = ['/deaddir/include']
+ 
+ if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
+     default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h b/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h
index be57ac2..191e5a1 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy/aarch64/_numpyconfig.h
@@ -20,10 +20,11 @@
 #define NPY_HAVE_COMPLEX_DOUBLE 1
 #define NPY_HAVE_COMPLEX_FLOAT 1
 #define NPY_HAVE_COMPLEX_LONG_DOUBLE 1
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
 #define NPY_USE_C99_FORMATS 1
 #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
 #define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
 
 #ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS 1
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch b/yocto-poky/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch
new file mode 100644
index 0000000..29768f3
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy/add-glibc-check.patch
@@ -0,0 +1,36 @@
+Dont punish musl for glibc's trignometeric functions problems
+additionally ensure that glibc specific macros are not used
+unconditionally
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: numpy-1.10.4/numpy/core/src/private/npy_config.h
+===================================================================
+--- numpy-1.10.4.orig/numpy/core/src/private/npy_config.h
++++ numpy-1.10.4/numpy/core/src/private/npy_config.h
+@@ -75,10 +75,12 @@
+ 
+ #if defined(HAVE_FEATURES_H)
+ #include <features.h>
++#ifdef __GLIBC__
+ #define TRIG_OK __GLIBC_PREREQ(2, 16)
+ #else
+ #define TRIG_OK 0
+ #endif
++#endif
+ 
+ #if !TRIG_OK
+ #undef HAVE_CASIN
+Index: numpy-1.10.4/numpy/core/src/npymath/ieee754.c.src
+===================================================================
+--- numpy-1.10.4.orig/numpy/core/src/npymath/ieee754.c.src
++++ numpy-1.10.4/numpy/core/src/npymath/ieee754.c.src
+@@ -612,7 +612,7 @@ void npy_set_floatstatus_invalid(void)
+ }
+ 
+ 
+-#elif defined(__GLIBC__) || defined(__APPLE__) || \
++#elif defined(__linux__) || defined(__APPLE__) || \
+       defined(__CYGWIN__) || defined(__MINGW32__) || \
+       (defined(__FreeBSD__) && (__FreeBSD_version >= 502114))
+ #  include <fenv.h>
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h b/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h
index c0c4285..05d2b8b 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy/mips/_numpyconfig.h
@@ -8,6 +8,7 @@
 #define NPY_SIZEOF_COMPLEX_DOUBLE 16
 #define NPY_SIZEOF_LONGDOUBLE 8
 #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
 #define NPY_SIZEOF_PY_INTPTR_T 4
 #define NPY_SIZEOF_PY_LONG_LONG 8
 #define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
 #define NPY_USE_C99_FORMATS 1
 #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
 #define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
 
 #ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS 1
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h b/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h
index be57ac2..8e2b5d0 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64/_numpyconfig.h
@@ -8,6 +8,7 @@
 #define NPY_SIZEOF_COMPLEX_DOUBLE 16
 #define NPY_SIZEOF_LONGDOUBLE 16
 #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
 #define NPY_SIZEOF_PY_INTPTR_T 8
 #define NPY_SIZEOF_PY_LONG_LONG 8
 #define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
 #define NPY_USE_C99_FORMATS 1
 #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
 #define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
 
 #ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS 1
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h b/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
index be57ac2..8e2b5d0 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy/mips64n32/_numpyconfig.h
@@ -8,6 +8,7 @@
 #define NPY_SIZEOF_COMPLEX_DOUBLE 16
 #define NPY_SIZEOF_LONGDOUBLE 16
 #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
 #define NPY_SIZEOF_PY_INTPTR_T 8
 #define NPY_SIZEOF_PY_LONG_LONG 8
 #define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
 #define NPY_USE_C99_FORMATS 1
 #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
 #define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
 
 #ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS 1
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/no-host-paths.patch b/yocto-poky/meta/recipes-devtools/python/python-numpy/no-host-paths.patch
deleted file mode 100644
index d745036..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-numpy/no-host-paths.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Don't search /usr and so on for libraries by default to avoid host contamination.
-
-Upstream-Status: Inappropriate (As the code stands, this is a hack)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
-index bac90fb..a63d796 100644
---- a/numpy/distutils/system_info.py
-+++ b/numpy/distutils/system_info.py
-@@ -191,41 +191,12 @@ if sys.platform == 'win32':
-     default_x11_lib_dirs = []
-     default_x11_include_dirs = []
- else:
--    default_lib_dirs = libpaths(['/usr/local/lib', '/opt/lib', '/usr/lib',
--                                 '/opt/local/lib', '/sw/lib'], platform_bits)
--    default_include_dirs = ['/usr/local/include',
--                            '/opt/include', '/usr/include',
--                            # path of umfpack under macports
--                            '/opt/local/include/ufsparse',
--                            '/opt/local/include', '/sw/include',
--                            '/usr/include/suitesparse']
--    default_src_dirs = ['.', '/usr/local/src', '/opt/src', '/sw/src']
--
--    default_x11_lib_dirs = libpaths(['/usr/X11R6/lib', '/usr/X11/lib',
--                                     '/usr/lib'], platform_bits)
--    default_x11_include_dirs = ['/usr/X11R6/include', '/usr/X11/include',
--                                '/usr/include']
--
--    if os.path.exists('/usr/lib/X11'):
--        globbed_x11_dir = glob('/usr/lib/*/libX11.so')
--        if globbed_x11_dir:
--            x11_so_dir = os.path.split(globbed_x11_dir[0])[0]
--            default_x11_lib_dirs.extend([x11_so_dir, '/usr/lib/X11'])
--            default_x11_include_dirs.extend(['/usr/lib/X11/include',
--                                             '/usr/include/X11'])
--
--    import subprocess as sp
--    try:
--        p = sp.Popen(["gcc", "-print-multiarch"], stdout=sp.PIPE,
--                stderr=open(os.devnull, 'w'))
--    except OSError:
--        pass # gcc is not installed
--    else:
--        triplet = str(p.communicate()[0].decode().strip())
--        if p.returncode == 0:
--            # gcc supports the "-print-multiarch" option
--            default_x11_lib_dirs += [os.path.join("/usr/lib/", triplet)]
--            default_lib_dirs += [os.path.join("/usr/lib/", triplet)]
-+    default_lib_dirs = libpaths(['/deadir/lib'], platform_bits)
-+    default_include_dirs = ['/deaddir/include']
-+    default_src_dirs = ['.', '/deaddir/src']
-+
-+    default_x11_lib_dirs = libpaths(['/deaddir/lib'], platform_bits)
-+    default_x11_include_dirs = ['/deaddir/include']
- 
- if os.path.join(sys.prefix, 'lib') not in default_lib_dirs:
-     default_lib_dirs.insert(0, os.path.join(sys.prefix, 'lib'))
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h b/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h
index 73cbfb1..0f45d5b 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc/_numpyconfig.h
@@ -8,6 +8,7 @@
 #define NPY_SIZEOF_COMPLEX_DOUBLE 16
 #define NPY_SIZEOF_LONGDOUBLE 16
 #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
 #define NPY_SIZEOF_PY_INTPTR_T 4
 #define NPY_SIZEOF_PY_LONG_LONG 8
 #define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
 #define NPY_USE_C99_FORMATS 1
 #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
 #define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
 
 #ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS 1
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h b/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h
index be57ac2..8e2b5d0 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy/powerpc64/_numpyconfig.h
@@ -8,6 +8,7 @@
 #define NPY_SIZEOF_COMPLEX_DOUBLE 16
 #define NPY_SIZEOF_LONGDOUBLE 16
 #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
 #define NPY_SIZEOF_PY_INTPTR_T 8
 #define NPY_SIZEOF_PY_LONG_LONG 8
 #define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +24,7 @@
 #define NPY_USE_C99_FORMATS 1
 #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
 #define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
 
 #ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS 1
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch b/yocto-poky/meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch
new file mode 100644
index 0000000..eb8a71a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy/remove-build-path-in-comments.patch
@@ -0,0 +1,30 @@
+From c560abff71f98a39a7401f08c2c13dad9ae7f15f Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 25 Feb 2016 01:23:32 -0500
+Subject: [PATCH] remove build path in comments
+
+It has build path in comments, so remove it.
+
+Upstream-Status: Inappropriate [openembedded specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ numpy/distutils/misc_util.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py
+index 345e60f..dafb068 100644
+--- a/numpy/distutils/misc_util.py
++++ b/numpy/distutils/misc_util.py
+@@ -2254,7 +2254,7 @@ def generate_config_py(target):
+     from distutils.dir_util import mkpath
+     mkpath(os.path.dirname(target))
+     f = open(target, 'w')
+-    f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0])))
++    f.write('# This file is generated by %s\n' % (os.path.abspath(sys.argv[0]).replace(os.path.abspath('../'),'')))
+     f.write('# It contains system_info results at the time of building this package.\n')
+     f.write('__all__ = ["get_info","show"]\n\n')
+     for k, i in system_info.saved_results.items():
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h b/yocto-poky/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h
index be57ac2..b330361 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy/x86-64/_numpyconfig.h
@@ -5,9 +5,11 @@
 #define NPY_SIZEOF_FLOAT 4
 #define NPY_SIZEOF_COMPLEX_FLOAT 8
 #define NPY_SIZEOF_DOUBLE 8
+#define NPY_SIZEOF_OFF_T 8
 #define NPY_SIZEOF_COMPLEX_DOUBLE 16
 #define NPY_SIZEOF_LONGDOUBLE 16
 #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32
+#define NPY_ENABLE_SEPARATE_COMPILATION 1
 #define NPY_SIZEOF_PY_INTPTR_T 8
 #define NPY_SIZEOF_PY_LONG_LONG 8
 #define NPY_SIZEOF_LONGLONG 8
@@ -23,7 +25,7 @@
 #define NPY_USE_C99_FORMATS 1
 #define NPY_VISIBILITY_HIDDEN __attribute__((visibility("hidden")))
 #define NPY_ABI_VERSION 0x01000009
-#define NPY_API_VERSION 0x00000007
+#define NPY_API_VERSION 0x0000000A
 
 #ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS 1
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy_1.10.4.bb b/yocto-poky/meta/recipes-devtools/python/python-numpy_1.10.4.bb
new file mode 100644
index 0000000..8a562dc
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-numpy_1.10.4.bb
@@ -0,0 +1,102 @@
+SUMMARY = "A sophisticated Numeric Processing Package for Python"
+SECTION = "devel/python"
+LICENSE = "PSF"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=9f4e88b5748e8313caaf33d081ce65a3"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \
+           file://0001-Don-t-search-usr-and-so-on-for-libraries-by-default-.patch \
+           file://remove-build-path-in-comments.patch \
+           file://add-glibc-check.patch \
+           ${CONFIGFILESURI} "
+
+CONFIGFILESURI ?= ""
+
+CONFIGFILESURI_aarch64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_arm = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_armeb = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_mipsel = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_x86 = " \
+    file://config.h \
+    file://numpyconfig.h \
+"
+CONFIGFILESURI_x86-64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_powerpc64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips64 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+CONFIGFILESURI_mips64n32 = " \
+    file://config.h \
+    file://_numpyconfig.h \
+"
+
+S = "${WORKDIR}/numpy-${PV}"
+
+inherit distutils
+
+# Make the build fail and replace *config.h with proper one
+# This is a ugly, ugly hack - Koen
+do_compile_prepend_class-target() {
+    BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+    ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
+    true
+    cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
+}
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
+
+SRC_URI[md5sum] = "90bb9034652cefbada19cf7d141a6a61"
+SRC_URI[sha256sum] = "f7f91842056a7cf680b0eaf8cefc5e46c69e2521e651128d2e6aaaccec8652ae"
+
+# install what is needed for numpy.test()
+RDEPENDS_${PN} = "python-unittest \
+                  python-difflib \
+                  python-pprint \
+                  python-pickle \
+                  python-shell \
+                  python-nose \
+                  python-doctest \
+                  python-datetime \
+                  python-distutils \
+                  python-misc \
+                  python-mmap \
+                  python-netclient \
+                  python-numbers \
+                  python-pydoc \
+                  python-pkgutil \
+                  python-email \
+                  python-subprocess \
+                  python-compression \
+                  python-ctypes \
+                  python-threading \
+"
+
+RDEPENDS_${PN}_class-native = ""
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-numpy_1.7.0.bb b/yocto-poky/meta/recipes-devtools/python/python-numpy_1.7.0.bb
deleted file mode 100644
index 81cdfde..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-numpy_1.7.0.bb
+++ /dev/null
@@ -1,99 +0,0 @@
-SUMMARY = "A sophisticated Numeric Processing Package for Python"
-SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f87832d854acbade6e9f5c601c8b30b1"
-PR = "r1"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \
-           file://no-host-paths.patch \
-           ${CONFIGFILESURI} "
-
-CONFIGFILESURI ?= ""
-
-CONFIGFILESURI_aarch64 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_arm = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_armeb = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_mipsel = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_x86 = " \
-    file://config.h \
-    file://numpyconfig.h \
-"
-CONFIGFILESURI_x86-64 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_powerpc64 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips64 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-CONFIGFILESURI_mips64n32 = " \
-    file://config.h \
-    file://_numpyconfig.h \
-"
-
-S = "${WORKDIR}/numpy-${PV}"
-
-inherit distutils
-
-# Make the build fail and replace *config.h with proper one
-# This is a ugly, ugly hack - Koen
-do_compile_prepend_class-target() {
-    BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-    ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build ${DISTUTILS_BUILD_ARGS} || \
-    true
-    cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/
-}
-
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/numpy/core/lib/*.a"
-
-SRC_URI[md5sum] = "4fa54e40b6a243416f0248123b6ec332"
-SRC_URI[sha256sum] = "f4fa70b7edbab65ee6432eb63743f5489f1919c614632b20b2fb45aa7e682ac6"
-
-# install what is needed for numpy.test()
-RDEPENDS_${PN} = "python-unittest \
-                  python-difflib \
-                  python-pprint \
-                  python-pickle \
-                  python-shell \
-                  python-nose \
-                  python-doctest \
-                  python-datetime \
-                  python-distutils \
-                  python-misc \
-                  python-mmap \
-                  python-netclient \
-                  python-numbers \
-                  python-pydoc \
-                  python-pkgutil \
-                  python-email \
-                  python-subprocess \
-                  python-compression \
-"
-
-RDEPENDS_${PN}_class-native = ""
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pexpect_3.3.bb b/yocto-poky/meta/recipes-devtools/python/python-pexpect_3.3.bb
deleted file mode 100644
index cd80aeb..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pexpect_3.3.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "A Pure Python Expect like Module for Python"
-HOMEPAGE = "http://pexpect.readthedocs.org/"
-SECTION = "devel/python"
-LICENSE = "ISC"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c25d9a0770ba69a9965acc894e9f3644"
-
-SRC_URI = "https://pypi.python.org/packages/source/p/pexpect/pexpect-${PV}.tar.gz"
-SRC_URI[md5sum] = "0de72541d3f1374b795472fed841dce8"
-SRC_URI[sha256sum] = "dfea618d43e83cfff21504f18f98019ba520f330e4142e5185ef7c73527de5ba"
-
-S = "${WORKDIR}/pexpect-${PV}"
-
-inherit distutils
-
-RDEPENDS_${PN} = "\
-    python-core \
-    python-io \
-    python-terminal \
-    python-resource \
-    python-fcntl \
-"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.0.1.bb b/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.0.1.bb
new file mode 100644
index 0000000..7f142a3
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-pexpect_4.0.1.bb
@@ -0,0 +1,25 @@
+SUMMARY = "A Pure Python Expect like Module for Python"
+HOMEPAGE = "http://pexpect.readthedocs.org/"
+SECTION = "devel/python"
+LICENSE = "ISC"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=66c2378a96b307d56bfb3a9e58edafa8"
+
+SRC_URI = "https://pypi.python.org/packages/source/p/pexpect/pexpect-${PV}.tar.gz"
+SRC_URI[md5sum] = "056df81e6ca7081f1015b4b147b977b7"
+SRC_URI[sha256sum] = "232795ebcaaf2e120396dbbaa3a129eda51757eeaae1911558f4ef8ee414fc6c"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pexpect"
+
+S = "${WORKDIR}/pexpect-${PV}"
+
+inherit distutils
+
+RDEPENDS_${PN} = "\
+    python-core \
+    python-io \
+    python-terminal \
+    python-resource \
+    python-fcntl \
+"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch b/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
index c5349ee..212779c 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
+++ b/yocto-poky/meta/recipes-devtools/python/python-pycurl/no-static-link.patch
@@ -1,12 +1,12 @@
 Upstream-Status: Pending
 
 Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-
-Index: pycurl-7.19.3.1/setup.py
-===================================================================
---- pycurl-7.19.3.1.orig/setup.py	2014-07-16 12:57:24.065346887 +0000
-+++ pycurl-7.19.3.1/setup.py	2014-07-16 12:57:53.057347678 +0000
-@@ -147,7 +147,7 @@
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur pycurl-7.19.5.2-orig/setup.py pycurl-7.19.5.2/setup.py
+--- pycurl-7.19.5.2-orig/setup.py	2015-11-02 15:42:24.000000000 +0200
++++ pycurl-7.19.5.2/setup.py	2015-11-02 17:59:36.121527273 +0200
+@@ -154,7 +154,7 @@
          optbuf = ''
          sslhintbuf = ''
          errtext = ''
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.19.5.1.bb b/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.19.5.1.bb
deleted file mode 100644
index 0d0effe..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.19.5.1.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "Python bindings for libcurl"
-HOMEPAGE = "http://pycurl.sourceforge.net/"
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1+ | MIT"
-LIC_FILES_CHKSUM = "file://README.rst;beginline=166;endline=181;md5=57e5ab0c0f964533fc59d93dec5695bb \
-                    file://COPYING-LGPL;md5=3579a9fd0221d49a237aaa33492f988c \
-                    file://COPYING-MIT;md5=e8200955c773b2a0fd6cea36ea5e87be"
-
-DEPENDS = "curl python"
-RDEPENDS_${PN} = "python-core curl"
-SRCNAME = "pycurl"
-
-SRC_URI = "\
-  http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \
-  file://no-static-link.patch \
-"
-
-SRC_URI[archive.md5sum] = "f44cd54256d7a643ab7b16e3f409b26b"
-SRC_URI[archive.sha256sum] = "6e9770f80459757f73bd71af82fbb29cd398b38388cdf1beab31ea91a331bc6c"
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils
-
-# need to export these variables for python-config to work
-export BUILD_SYS
-export HOST_SYS
-export STAGING_INCDIR
-export STAGING_LIBDIR
-
-BBCLASSEXTEND = "native"
-
-# Ensure the docstrings are generated as make clean will remove them
-do_compile_prepend() {
-	${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py docstrings
-}
-
-do_install_append() {
-	rm -rf ${D}${datadir}/share
-}
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb b/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb
new file mode 100644
index 0000000..7b41f6d
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-pycurl_7.21.5.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Python bindings for libcurl"
+HOMEPAGE = "http://pycurl.sourceforge.net/"
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1+ | MIT"
+LIC_FILES_CHKSUM = "file://README.rst;beginline=166;endline=182;md5=a84a1caa65b89d4584b693d3680062fb \
+                    file://COPYING-LGPL;md5=3579a9fd0221d49a237aaa33492f988c \
+                    file://COPYING-MIT;md5=b7e434aeb228ed731c00bcf177e79b19"
+
+DEPENDS = "curl python"
+RDEPENDS_${PN} = "python-core curl"
+SRCNAME = "pycurl"
+
+SRC_URI = "\
+  http://${SRCNAME}.sourceforge.net/download/${SRCNAME}-${PV}.tar.gz;name=archive \
+  file://no-static-link.patch \
+"
+
+SRC_URI[archive.md5sum] = "bca7bf47320082588db544ced2ba8717"
+SRC_URI[archive.sha256sum] = "8a1e0eb55573388275a1d6c2534ca4cfca5d7fa772b99b505c08fa149b27aed0"
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit distutils
+
+BBCLASSEXTEND = "native"
+
+# Ensure the docstrings are generated as make clean will remove them
+do_compile_prepend() {
+	${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} setup.py docstrings
+}
+
+do_install_append() {
+	rm -rf ${D}${datadir}/share
+}
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch b/yocto-poky/meta/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
new file mode 100644
index 0000000..a391f7e
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-pygobject/0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch
@@ -0,0 +1,41 @@
+From 5e5350d730f85957a42c6d846d347d080e7dd996 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 23 Oct 2015 12:40:34 +0300
+Subject: [PATCH] configure.ac: add sysroot path to GI_DATADIR; don't set
+ introspection scanner and compiler paths
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 8 +-------
+ 1 file changed, 1 insertion(+), 7 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2c0cfbd..cfcb3bf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -194,7 +194,7 @@ PKG_CHECK_MODULES(GI,
+     gobject-introspection-1.0 >= introspection_required_version
+ )
+ 
+-GI_DATADIR=$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
++GI_DATADIR=$PKG_CONFIG_SYSROOT_DIR$($PKG_CONFIG --variable=gidatadir gobject-introspection-1.0)
+ AC_SUBST(GI_DATADIR)
+ 
+ if test "$enable_cairo" != no; then
+@@ -219,12 +219,6 @@ AC_ARG_WITH(common,
+     with_common=yes)
+ AM_CONDITIONAL(WITH_COMMON, test "$with_common" = "yes")
+ 
+-INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+-INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+-
+-AC_SUBST(INTROSPECTION_SCANNER)
+-AC_SUBST(INTROSPECTION_COMPILER)
+-
+ # compiler warnings, errors, required cflags, and code coverage support
+ GNOME_COMPILE_WARNINGS([maximum])
+ AC_MSG_CHECKING(for Gnome code coverage support)
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygobject/obsolete_automake_macros.patch b/yocto-poky/meta/recipes-devtools/python/python-pygobject/obsolete_automake_macros.patch
deleted file mode 100644
index c259112..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygobject/obsolete_automake_macros.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Accepted [https://bugzilla.gnome.org/show_bug.cgi?id=691101]
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd pygobject-2.27.91/configure.ac pygobject-2.27.91/configure.ac
---- pygobject-2.27.91/configure.ac	2011-02-23 22:14:37.000000000 +0200
-+++ pygobject-2.27.91/configure.ac	2013-01-03 05:13:44.034949954 +0200
-@@ -35,7 +35,7 @@
- AC_DEFINE(PYGOBJECT_MICRO_VERSION, pygobject_micro_version, [pygobject micro version])
- AC_SUBST(PYGOBJECT_MICRO_VERSION, pygobject_micro_version)
-
--AM_CONFIG_HEADER(config.h)
-+AC_CONFIG_HEADERS(config.h)
- m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES(yes)])
- AM_INIT_AUTOMAKE(foreign)
- AM_MAINTAINER_MODE
-@@ -82,7 +82,6 @@
- m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
- AC_ISC_POSIX
- AC_PROG_CC
--AM_PROG_CC_STDC
- AM_PROG_CC_C_O
-
- # check that we have the minimum version of python necisary to build
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygobject_2.28.3.bb b/yocto-poky/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
deleted file mode 100644
index 81d37b4..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygobject_2.28.3.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "Python GObject bindings"
-SECTION = "devel/python"
-LICENSE = "LGPLv2.1"
-
-RECIPE_NO_UPDATE_REASON = "Newer versions of python-pygobject depend on gobject-introspection which doesn't cross-compile"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-DEPENDS = "python python-pygobject-native libffi glib-2.0"
-DEPENDS_class-native = "python-native libffi-native glib-2.0-native"
-RDEPENDS_class-native = ""
-
-MAJ_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
-
-SRC_URI = "${GNOME_MIRROR}/pygobject/${MAJ_VER}/pygobject-${PV}.tar.bz2 \
-           file://obsolete_automake_macros.patch \
-"
-
-# libtool-native doesn't have fixinstall.patch applied which means
-# that libs get relinked at installation time. This triggers a 
-# relinking along the lines of:
-# gcc -L/tmp/foo/media/build1/poky/build/tmp/sysroots/x86_64-linux/usr/lib -lpyglib-2.0-python -o .libs/_glib.so
-# where /tmp/foo is DESTDIR and pyglib-2.0-python may be installed/reinstalled
-# at the same time as the gcc command runs.
-# If this happens between the handoff between gcc and ld, you can see:
-# /bin/ld: cannot find -lpyglib-2.0-python
-# Adding a dependency rule like  install-pyglibLTLIBRARIES: install-libLTLIBRARIES
-# would be ideal but automake can't cope with that without manually 
-# defining the whole function. Give up and disable parallel make in native builds.
-PARALLEL_MAKEINST_class-native = ""
-
-SRC_URI[md5sum] = "aa64900b274c4661a5c32e52922977f9"
-SRC_URI[sha256sum] = "7da88c169a56efccc516cebd9237da3fe518a343095a664607b368fe21df95b6"
-S = "${WORKDIR}/pygobject-${PV}"
-
-EXTRA_OECONF += "--disable-introspection"
-
-inherit autotools distutils-base pkgconfig
-
-# necessary to let the call for python-config succeed
-export BUILD_SYS
-export HOST_SYS
-export STAGING_INCDIR
-export STAGING_LIBDIR
-
-PACKAGES += "${PN}-lib"
-
-RDEPENDS_${PN} += "python-textutils"
-
-FILES_${PN} = "${libdir}/python*"
-FILES_${PN}-lib = "${libdir}/lib*.so.*"
-FILES_${PN}-dev += "${bindir} ${datadir}"
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygobject_3.18.2.bb b/yocto-poky/meta/recipes-devtools/python/python-pygobject_3.18.2.bb
new file mode 100644
index 0000000..a9871fe
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-pygobject_3.18.2.bb
@@ -0,0 +1,25 @@
+SUMMARY = "Python GObject bindings"
+SECTION = "devel/python"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
+
+inherit autotools pkgconfig gnomebase distutils-base gobject-introspection
+
+DEPENDS += "python glib-2.0 gnome-common"
+
+SRCNAME="pygobject"
+SRC_URI = " \
+    http://ftp.gnome.org/pub/GNOME/sources/${SRCNAME}/${@gnome_verdir("${PV}")}/${SRCNAME}-${PV}.tar.xz \
+    file://0001-configure.ac-add-sysroot-path-to-GI_DATADIR-don-t-se.patch \
+"
+
+SRC_URI[md5sum] = "0a956f3e785e23b0f136832f2e57a862"
+SRC_URI[sha256sum] = "2a3cad1517916b74e131e6002c3824361aee0671ffb0d55ded119477fc1c2c5f"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF = "--disable-cairo --with-python=python2.7"
+
+RDEPENDS_${PN} += "python-setuptools python-importlib"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygtk/acinclude.m4 b/yocto-poky/meta/recipes-devtools/python/python-pygtk/acinclude.m4
deleted file mode 100644
index 53518fb..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygtk/acinclude.m4
+++ /dev/null
@@ -1,90 +0,0 @@
-## this one is commonly used with AM_PATH_PYTHONDIR ...
-dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
-dnl Check if a module containing a given symbol is visible to python.
-AC_DEFUN(AM_CHECK_PYMOD,
-[AC_REQUIRE([AM_PATH_PYTHON])
-py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
-AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
-AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
-ifelse([$2],[], [prog="
-import sys
-try:
-        import $1
-except ImportError:
-        sys.exit(1)
-except:
-        sys.exit(0)
-sys.exit(0)"], [prog="
-import $1
-$1.$2"])
-if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
-  then
-    eval "py_cv_mod_$py_mod_var=yes"
-  else
-    eval "py_cv_mod_$py_mod_var=no"
-  fi
-])
-py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
-if test "x$py_val" != xno; then
-  AC_MSG_RESULT(yes)
-  ifelse([$3], [],, [$3
-])dnl
-else
-  AC_MSG_RESULT(no)
-  ifelse([$4], [],, [$4
-])dnl
-fi
-])
-
-dnl a macro to check for ability to create python extensions
-dnl  AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
-dnl function also defines PYTHON_INCLUDES
-AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
-[AC_REQUIRE([AM_PATH_PYTHON])
-AC_MSG_CHECKING(for headers required to compile python extensions)
-dnl deduce PYTHON_INCLUDES
-AC_ARG_WITH(python-includes,
-	[  --with-python-includes=DIR  path to Python includes], py_exec_prefix=$withval)
-if test x$py_exec_prefix != x; then
-PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
-else
-py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
-py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
-if test "$py_prefix" != "$py_exec_prefix"; then
-  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
-fi
-fi
-AC_SUBST(PYTHON_INCLUDES)
-dnl check if the headers exist:
-save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
-AC_TRY_CPP([#include <Python.h>],dnl
-[AC_MSG_RESULT(found)
-$1],dnl
-[AC_MSG_RESULT(not found)
-$2])
-CPPFLAGS="$save_CPPFLAGS"
-])
-
-dnl
-dnl JH_ADD_CFLAG(FLAG)
-dnl checks whether the C compiler supports the given flag, and if so, adds
-dnl it to $CFLAGS.  If the flag is already present in the list, then the
-dnl check is not performed.
-AC_DEFUN([JH_ADD_CFLAG],
-[
-case " $CFLAGS " in
-*@<:@\	\ @:>@$1@<:@\	\ @:>@*)
-  ;;
-*)
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $1"
-  AC_MSG_CHECKING([whether [$]CC understands $1])
-  AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
-  AC_MSG_RESULT($jh_has_option)
-  if test $jh_has_option = no; then
-    CFLAGS="$save_CFLAGS"
-  fi
-  ;;
-esac])
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygtk/add-gtk-types.defs-into-gdk.c-dependence.patch b/yocto-poky/meta/recipes-devtools/python/python-pygtk/add-gtk-types.defs-into-gdk.c-dependence.patch
deleted file mode 100644
index df0f9cd..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygtk/add-gtk-types.defs-into-gdk.c-dependence.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Submitted
-
-add gtk-types.defs into gdk.c dependence
-
-gdk.c depends on gtk-types.defs but
-gdk/Makefile.am miss this. This will cause
-build error sometimes when built
-with multi-jobbing, so add gtk-types.defs into
-gdk.c dependence.
-
-Signed-off-by: Song.Li <Song.Li@windriver.com>
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- gtk/Makefile.am |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/gtk/Makefile.am b/gtk/Makefile.am
-index 7bb5d0c..4a88351 100644
---- a/gtk/Makefile.am
-+++ b/gtk/Makefile.am
-@@ -214,7 +214,7 @@ gtkunixprint.defs: $(GTKUNIXPRINT_DEFS) Makefile
- gtkunixprint-types.defs: $(GTKUNIXPRINT_TYPES_DEFS) Makefile
- 	$(CREATEDEFS) $@ $(GTKUNIXPRINT_TYPES_DEFS)
- 
--gdk.c: gdk-types.defs gdk.defs $(GDK_OVERRIDES)
-+gdk.c: gdk-types.defs gtk-types.defs gdk.defs $(GDK_OVERRIDES)
- gtk.c: gdk-types.defs gtk-types.defs gtk.defs gdk-types.defs $(GTK_OVERRIDES)
- _gtk_la_CFLAGS = $(PYCAIRO_CFLAGS) $(GTK_CFLAGS)
- _gtk_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gtk
--- 
-1.7.4
-
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch b/yocto-poky/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch
deleted file mode 100644
index 16c0e8e..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygtk/fix-gtkunixprint.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: pygtk-2.24.0/gtk/gtkunixprint.override
-===================================================================
---- pygtk-2.24.0.orig/gtk/gtkunixprint.override
-+++ pygtk-2.24.0/gtk/gtkunixprint.override
-@@ -102,11 +102,6 @@ _wrap_gtk_print_job_get_surface(PyGObjec
-     if (pyg_error_check(&error))
-         return NULL;
- 
--#if PYCAIRO_VERSION_HEX >= 0x1010600
--    return PycairoSurface_FromSurface(cairo_surface_reference(surface), NULL);
--#else
--    return PycairoSurface_FromSurface(cairo_surface_reference(surface), NULL, NULL);
--#endif
- }
- %%
- override gtk_print_job_send kwargs
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch b/yocto-poky/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch
deleted file mode 100644
index b615654..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygtk/fix-pygtk-2.0.pc.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: pygtk-2.24.0/pygtk-2.0.pc.in
-===================================================================
---- pygtk-2.24.0.orig/pygtk-2.0.pc.in
-+++ pygtk-2.24.0/pygtk-2.0.pc.in
-@@ -1,5 +1,6 @@
- prefix=@prefix@
- exec_prefix=@exec_prefix@
-+libdir=@libdir@
- includedir=@includedir@
- datarootdir=@datarootdir@
- datadir=@datadir@
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygtk/nodocs.patch b/yocto-poky/meta/recipes-devtools/python/python-pygtk/nodocs.patch
deleted file mode 100644
index f07309a..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygtk/nodocs.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: pygtk-2.17.0/Makefile.am
-===================================================================
---- pygtk-2.17.0.orig/Makefile.am
-+++ pygtk-2.17.0/Makefile.am
-@@ -4,7 +4,7 @@ if BUILD_GTK
-   GTK_SUBDIR = gtk
- endif
- 
--SUBDIRS = . $(GTK_SUBDIR) examples tests docs
-+SUBDIRS = . $(GTK_SUBDIR) examples tests
- 
- PLATFORM_VERSION = 2.0
- 
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch b/yocto-poky/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch
deleted file mode 100644
index 833038e..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygtk/prevent_to_get_display_during_import.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Upstream-Status: Pending
-
-Index: pygtk-2.10.4/gtk/__init__.py
-===================================================================
---- pygtk-2.10.4.orig/gtk/__init__.py	2007-11-27 19:27:05.000000000 -0300
-+++ pygtk-2.10.4/gtk/__init__.py	2007-11-27 19:28:22.000000000 -0300
-@@ -78,7 +78,8 @@
- 
- keysyms = LazyModule('keysyms', locals())
- 
--_init()
-+if not hasattr(sys.modules['__main__'], 'python_launcher_enabled'):
-+    _init()
- 
- # CAPI
- _PyGtk_API = _gtk._PyGtk_API
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4 b/yocto-poky/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4
deleted file mode 100644
index 53518fb..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygtk/python-pygtk2/acinclude.m4
+++ /dev/null
@@ -1,90 +0,0 @@
-## this one is commonly used with AM_PATH_PYTHONDIR ...
-dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
-dnl Check if a module containing a given symbol is visible to python.
-AC_DEFUN(AM_CHECK_PYMOD,
-[AC_REQUIRE([AM_PATH_PYTHON])
-py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
-AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
-AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
-ifelse([$2],[], [prog="
-import sys
-try:
-        import $1
-except ImportError:
-        sys.exit(1)
-except:
-        sys.exit(0)
-sys.exit(0)"], [prog="
-import $1
-$1.$2"])
-if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
-  then
-    eval "py_cv_mod_$py_mod_var=yes"
-  else
-    eval "py_cv_mod_$py_mod_var=no"
-  fi
-])
-py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
-if test "x$py_val" != xno; then
-  AC_MSG_RESULT(yes)
-  ifelse([$3], [],, [$3
-])dnl
-else
-  AC_MSG_RESULT(no)
-  ifelse([$4], [],, [$4
-])dnl
-fi
-])
-
-dnl a macro to check for ability to create python extensions
-dnl  AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE])
-dnl function also defines PYTHON_INCLUDES
-AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
-[AC_REQUIRE([AM_PATH_PYTHON])
-AC_MSG_CHECKING(for headers required to compile python extensions)
-dnl deduce PYTHON_INCLUDES
-AC_ARG_WITH(python-includes,
-	[  --with-python-includes=DIR  path to Python includes], py_exec_prefix=$withval)
-if test x$py_exec_prefix != x; then
-PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
-else
-py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
-py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
-PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
-if test "$py_prefix" != "$py_exec_prefix"; then
-  PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
-fi
-fi
-AC_SUBST(PYTHON_INCLUDES)
-dnl check if the headers exist:
-save_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
-AC_TRY_CPP([#include <Python.h>],dnl
-[AC_MSG_RESULT(found)
-$1],dnl
-[AC_MSG_RESULT(not found)
-$2])
-CPPFLAGS="$save_CPPFLAGS"
-])
-
-dnl
-dnl JH_ADD_CFLAG(FLAG)
-dnl checks whether the C compiler supports the given flag, and if so, adds
-dnl it to $CFLAGS.  If the flag is already present in the list, then the
-dnl check is not performed.
-AC_DEFUN([JH_ADD_CFLAG],
-[
-case " $CFLAGS " in
-*@<:@\	\ @:>@$1@<:@\	\ @:>@*)
-  ;;
-*)
-  save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS $1"
-  AC_MSG_CHECKING([whether [$]CC understands $1])
-  AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no])
-  AC_MSG_RESULT($jh_has_option)
-  if test $jh_has_option = no; then
-    CFLAGS="$save_CFLAGS"
-  fi
-  ;;
-esac])
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygtk/update-dependences-of-defs.c.patch b/yocto-poky/meta/recipes-devtools/python/python-pygtk/update-dependences-of-defs.c.patch
deleted file mode 100644
index 3ed954e..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygtk/update-dependences-of-defs.c.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From dc024e9079bbffbb44436ba3e70a758ebad5520f Mon Sep 17 00:00:00 2001
-From: "Song.Li" <Song.Li@windriver.com>
-Date: Sat, 5 Jan 2013 14:55:59 +0800
-Subject: [PATCH] update dependences of defs.c in Makefile.am
-
-In gtk/Makefile.am, defs.c should dependes on gdk-types.defs and
-gtk-types.defs, otherwise it fails occasionally when parallel compile.
-The error message:
-"IOError: [Errno 2] No such file or directory: 'gtk-types.defs'"
-
-Add them to dependences of defs.c to fix this issue.
-
-Upstream-Status: Submitted
-https://bugzilla.gnome.org/show_bug.cgi?id=702706
-
-Signed-off-by: Song.Li <Song.Li@windriver.com>
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
----
- gtk/Makefile.am |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gtk/Makefile.am b/gtk/Makefile.am
-index 7bb5d0c..91826cb 100644
---- a/gtk/Makefile.am
-+++ b/gtk/Makefile.am
-@@ -289,7 +289,7 @@ if HAVE_GIO_TYPES_DEFS
- extra_codegen_args += --register $(PYGOBJECT_DEFSDIR)/gio-types.defs
- endif
- 
--.defs.c: 
-+.defs.c: gdk-types.defs gtk-types.defs
- 	($(PYTHON) $(CODEGENDIR)/codegen.py \
- 	   $(PYGTK_CODEGEN_DEFINES) \
- 	    -I $(srcdir) \
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-devtools/python/python-pygtk_2.24.0.bb b/yocto-poky/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
deleted file mode 100644
index 79b3110..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-pygtk_2.24.0.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "Python bindings for the GTK+ UI toolkit"
-SECTION = "devel/python"
-# needs gtk+ 2.17.x
-DEPENDS = "gtk+ libglade python-pycairo python-pygobject"
-RDEPENDS_${PN} = "python-shell python-pycairo python-pygobject"
-PROVIDES = "python-pygtk2"
-SRCNAME = "pygtk"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
-
-PR = "r1"
-
-SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.24/${SRCNAME}-${PV}.tar.bz2 \
-           file://add-gtk-types.defs-into-gdk.c-dependence.patch \
-           file://fix-gtkunixprint.patch \
-           file://prevent_to_get_display_during_import.patch \
-           file://nodocs.patch \
-	   file://fix-pygtk-2.0.pc.patch \
-           file://acinclude.m4 \
-           file://update-dependences-of-defs.c.patch"
-
-SRC_URI[md5sum] = "a1051d5794fd7696d3c1af6422d17a49"
-SRC_URI[sha256sum] = "cd1c1ea265bd63ff669e92a2d3c2a88eb26bcd9e5363e0f82c896e649f206912"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-EXTRA_OECONF = "--disable-docs --with-python-includes=${STAGING_INCDIR}/../"
-
-inherit autotools pkgconfig distutils-base distro_features_check
-
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-do_configure_prepend() {
-	install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
-	sed -i \
-		-e s:'`$PKG_CONFIG --variable defsdir pygobject-2.0`':\"${STAGING_DATADIR}/pygobject/2.0/defs\":g \
-		-e s:'`$PKG_CONFIG --variable=pygtkincludedir pygobject-2.0`':\"${STAGING_INCDIR}/pygtk-2.0\":g \
-		-e s:'`$PKG_CONFIG --variable=datadir pygobject-2.0`':\"${STAGING_DATADIR}\":g \
-		-e s:'`$PKG_CONFIG --variable codegendir pygobject-2.0`':\"${STAGING_DATADIR}/pygobject/2.0/codegen\":g \
-		-e s:'`$PKG_CONFIG --variable=fixxref pygobject-2.0`':\"${STAGING_DATADIR}/pygobject/xsl/fixxref.py\":g \
-		${S}/configure.ac
-}
-
-# dirty fix #2: fix build system paths leaking in
-do_install_append() {
-	sed -i -e '1s|^#!.*python|#!/usr/bin/env python|' ${D}${bindir}/pygtk-demo
-}
-
-PACKAGES =+ "${PN}-demo"
-FILES_${PN}-demo = " ${bindir}/pygtk-demo ${libdir}/pygtk "
-RDEPENDS_${PN}-demo = "python-pygtk python-stringold python-lang"
-
-# todo: revamp packaging, package demo seperatly
-FILES_${PN}-dev += " ${libdir}/pygtk/2.0 ${bindir}/pygtk-* ${datadir}/pygtk/2.0"
-
diff --git a/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.3.6.bb b/yocto-poky/meta/recipes-devtools/python/python-scons-native_2.4.1.bb
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/python/python-scons-native_2.3.6.bb
rename to yocto-poky/meta/recipes-devtools/python/python-scons-native_2.4.1.bb
diff --git a/yocto-poky/meta/recipes-devtools/python/python-scons_2.3.6.bb b/yocto-poky/meta/recipes-devtools/python/python-scons_2.3.6.bb
deleted file mode 100644
index c4ad7d3..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-scons_2.3.6.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Software Construction tool (make/autotools replacement)"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=23bc1530c55e9f0d1b709056bcea237d"
-SRCNAME = "scons"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "9c6a1c3c716cbe5f16515f163c91d928"
-SRC_URI[sha256sum] = "98adaa351d8f4e4068a5bf1894bdd7f85b390c8c3f80d437cf8bb266012404df"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils
diff --git a/yocto-poky/meta/recipes-devtools/python/python-scons_2.4.1.bb b/yocto-poky/meta/recipes-devtools/python/python-scons_2.4.1.bb
new file mode 100644
index 0000000..096cf5c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-scons_2.4.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Software Construction tool (make/autotools replacement)"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=23bc1530c55e9f0d1b709056bcea237d"
+SRCNAME = "scons"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/scons/scons-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "9a0ddf33d9839f04380e0fae87cc4b40"
+SRC_URI[sha256sum] = "8fc4f42928c69bcbb33e1be94b646f2c700b659693fabc778c192d4d22f753a7"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/scons/files/scons/"
+UPSTREAM_CHECK_REGEX = "/scons/(?P<pver>(\d+[\.\-_]*)+)/"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit distutils
+
+RDEPENDS_${PN} = "\
+  python-fcntl \
+  python-io \
+  "
diff --git a/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc b/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
new file mode 100644
index 0000000..0917e88
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-setuptools.inc
@@ -0,0 +1,21 @@
+SUMMARY = "Download, build, install, upgrade, and uninstall Python packages"
+HOMEPAGE = "https://pypi.python.org/pypi/setuptools"
+SECTION = "devel/python"
+LICENSE = "PSF | ZPL-2.0"
+
+LIC_FILES_CHKSUM = "file://setup.py;beginline=78;endline=78;md5=8a314270dd7a8dbca741775415f1716e"
+
+SRCNAME = "setuptools"
+
+SRC_URI = "http://pypi.python.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "c5a7d90c1e0acf8c4ec5c2bf31bc25b5"
+SRC_URI[sha256sum] = "214bf29933f47cf25e6faa569f710731728a07a19cae91ea64f826051f68a8cf"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/setuptools"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+do_install_prepend() {
+    install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
+}
diff --git a/yocto-poky/meta/recipes-devtools/python/python-setuptools_18.2.bb b/yocto-poky/meta/recipes-devtools/python/python-setuptools_18.2.bb
deleted file mode 100644
index 1de2b2e..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-setuptools_18.2.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "Downloads, builds, installs, upgrades, and uninstalls Python packages"
-HOMEPAGE = "https://pypi.python.org/pypi/setuptools"
-SECTION = "devel/python"
-LICENSE = "Python-2.0 | ZPL-2.0"
-LIC_FILES_CHKSUM = "file://setup.py;beginline=78;endline=78;md5=8a314270dd7a8dbca741775415f1716e"
-
-SRCNAME = "setuptools"
-
-PROVIDES = "python-distribute"
-
-DEPENDS += "python"
-DEPENDS_class-native += "python-native"
-
-inherit distutils
-
-SRC_URI = "https://pypi.python.org/packages/source/s/setuptools/setuptools-${PV}.tar.gz"
-SRC_URI[md5sum] = "52b4e48939ef311d7204f8fe940764f4"
-SRC_URI[sha256sum] = "0994a58df27ea5dc523782a601357a2198b7493dcc99a30d51827a23585b5b1d"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
-
-do_install_prepend() {
-    install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
-}
-
-RDEPENDS_${PN} = "\
-  python-stringold \
-  python-email \
-  python-shell \
-  python-distutils \
-  python-compression \
-"
-
-RDEPENDS_${PN}_class-native = "\
-  python-distutils \
-  python-compression \
-"
-
-RREPLACES_${PN} = "python-distribute"
-RPROVIDES_${PN} = "python-distribute"
-RCONFLICTS_${PN} = "python-distribute"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-setuptools_19.4.bb b/yocto-poky/meta/recipes-devtools/python/python-setuptools_19.4.bb
new file mode 100644
index 0000000..c172039
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python-setuptools_19.4.bb
@@ -0,0 +1,38 @@
+require python-setuptools.inc
+
+PROVIDES = "python-distribute"
+
+DEPENDS += "python"
+DEPENDS_class-native += "python-native"
+
+inherit distutils
+
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
+
+RDEPENDS_${PN} = "\
+  python-stringold \
+  python-email \
+  python-shell \
+  python-distutils \
+  python-compression \
+  python-pkgutil \
+  python-plistlib \
+  python-numbers \
+  python-html \
+  python-netserver \
+  python-ctypes \
+  python-subprocess \
+  python-unittest \
+  python-compile \
+"
+
+RDEPENDS_${PN}_class-native = "\
+  python-distutils \
+  python-compression \
+"
+
+RREPLACES_${PN} = "python-distribute"
+RPROVIDES_${PN} = "python-distribute"
+RCONFLICTS_${PN} = "python-distribute"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch b/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
index 8a27f25..fe98d07 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
+++ b/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-add-for-rpm-ignoresize-check.patch
@@ -17,14 +17,15 @@
  smart/backends/rpm/pm.py | 4 ++++
  1 file changed, 4 insertions(+)
 
-diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
-index 5da9ee6..f0488ec 100644
---- a/smart/backends/rpm/pm.py
-+++ b/smart/backends/rpm/pm.py
-@@ -241,6 +241,10 @@ class RPMPackageManager(PackageManager):
-         except AttributeError:
-             probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH
- 
+Index: git/smart/backends/rpm/pm.py
+===================================================================
+--- git.orig/smart/backends/rpm/pm.py
++++ git/smart/backends/rpm/pm.py
+@@ -233,6 +233,11 @@ class RPMPackageManager(PackageManager):
+         if sysconf.get("rpm-order"):
+             ts.order()
+         probfilter = rpm.RPMPROB_FILTER_OLDPACKAGE
++
 +        if sysconf.get("rpm-ignoresize", False):
 +            probfilter |= rpm.RPMPROB_FILTER_DISKNODES
 +            probfilter |= rpm.RPMPROB_FILTER_DISKSPACE
@@ -32,6 +33,3 @@
          if force or reinstall:
              probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG
              probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch b/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch
deleted file mode 100644
index 708ffe6..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python-smartpm/smart-rpm4-fixes.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-
-This patch checks for rpm5 related functions in order to allow rpm4 
-to work correctly. Currently the rpm4 archscore and filter work
-differently enough that they need to be changed.
-
-Upstream-Status: Inappropriate [OE-Core Specific]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: smart-1.4.1/smart/backends/rpm/base.py
-===================================================================
---- smart-1.4.1.orig/smart/backends/rpm/base.py
-+++ smart-1.4.1/smart/backends/rpm/base.py
-@@ -338,10 +338,14 @@ class RPMObsoletes(Depends):
- 
- _SCOREMAP = {}
- def getArchScore(arch, _sm=_SCOREMAP):
--    if arch not in _sm:
--        score = rpm.archscore(arch)
--        _sm[arch] = score
--    return _sm.get(arch, 0)
-+    try:
-+        rpm.platformscore(arch)
-+        if arch not in _sm:
-+            score = rpm.archscore(arch)
-+            _sm[arch] = score
-+        return _sm.get(arch, 0)
-+    except AttributeError:
-+        return 1
- 
- # TODO: Embed color into nameprovides and obsoletes relations.
- _COLORMAP = {"noarch": 0, "x86_64": 2, "ppc64": 2, "s390x": 2, "sparc64": 2}
-Index: smart-1.4.1/smart/backends/rpm/pm.py
-===================================================================
---- smart-1.4.1.orig/smart/backends/rpm/pm.py
-+++ smart-1.4.1/smart/backends/rpm/pm.py
-@@ -235,6 +235,12 @@ class RPMPackageManager(PackageManager):
-         if sysconf.get("rpm-order"):
-             ts.order()
-         probfilter = rpm.RPMPROB_FILTER_OLDPACKAGE
-+        try:
-+            # Test for RPM5 function
-+            rpm.platformscore("")
-+        except AttributeError:
-+            probfilter |= rpm.RPMPROB_FILTER_IGNOREARCH
-+
-         if force or reinstall:
-             probfilter |= rpm.RPMPROB_FILTER_REPLACEPKG
-             probfilter |= rpm.RPMPROB_FILTER_REPLACEOLDFILES
diff --git a/yocto-poky/meta/recipes-devtools/python/python-smartpm_git.bb b/yocto-poky/meta/recipes-devtools/python/python-smartpm_git.bb
index d6c378b..d9a908d 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-smartpm_git.bb
+++ b/yocto-poky/meta/recipes-devtools/python/python-smartpm_git.bb
@@ -19,7 +19,6 @@
           file://smart-channelsdir.patch \
           file://smart-attempt.patch \
           file://smart-attempt-fix.patch \
-          file://smart-rpm4-fixes.patch \
           file://smart-add-for-rpm-ignoresize-check.patch \
           file://smart-already-installed-message.patch \
           file://smart-set-noprogress-for-pycurl.patch \
@@ -128,8 +127,6 @@
 
 FILES_smartpm = "${bindir}/smart"
 
-FILES_${PN}-dbg += "${libdir}/python*/site-packages/smart/backends/rpm/.debug"
-
 FILES_${PN}-backend-rpm = "${libdir}/python*/site-packages/smart/backends/rpm"
 
 FILES_${PN}-interface-qt4 = "${libdir}/python*/site-packages/smart/interfaces/qt4"
diff --git a/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb b/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb
index b658be8..5f9cf45 100644
--- a/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb
+++ b/yocto-poky/meta/recipes-devtools/python/python-smmap_0.9.0.bb
@@ -11,6 +11,9 @@
 SRC_URI[md5sum] = "d7932d5ace206bf4ae15198cf36fb6ab"
 SRC_URI[sha256sum] = "0e2b62b497bd5f0afebc002eda4d90df9d209c30ef257e8673c90a6b5c119d62"
 
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/smmap/"
+UPSTREAM_CHECK_REGEX = "/smmap/(?P<pver>(\d+[\.\-_]*)+)"
+
 S = "${WORKDIR}/smmap-${PV}"
 
 inherit setuptools
diff --git a/yocto-poky/meta/recipes-devtools/python/python.inc b/yocto-poky/meta/recipes-devtools/python/python.inc
index 4d428f3..f4818c6 100644
--- a/yocto-poky/meta/recipes-devtools/python/python.inc
+++ b/yocto-poky/meta/recipes-devtools/python/python.inc
@@ -5,19 +5,21 @@
 # bump this on every change in contrib/python/generate-manifest-2.7.py
 INC_PR = "r1"
 
-LIC_FILES_CHKSUM = "file://LICENSE;md5=dff3d00f049545862992d2d097831a13"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03"
 
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
 
-SRC_URI[md5sum] = "38d530f7efc373d64a8fb1637e3baaa7"
-SRC_URI[sha256sum] = "90d27e14ea7e03570026850e2e50ba71ad20b7eb31035aada1cf3def8f8d4916"
+SRC_URI[md5sum] = "1dbcc848b4cd8399a8199d000f9f823c"
+SRC_URI[sha256sum] = "962b4c45af50124ea61f11a30deb4342fc0bc21126790fa1d7f6c79809413f46"
+
+# python recipe is actually python 2.x
+# also, exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>2(\.\d+)+).tar"
 
 PYTHON_MAJMIN = "2.7"
 
 inherit autotools
 
-PYTHONLSBOPTS_linuxstdbase = "ac_cv_sizeof_off_t=8"
-
 EXTRA_OECONF = "\
   --with-threads \
   --with-pymalloc \
diff --git a/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch b/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
new file mode 100644
index 0000000..a97ff6b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python/add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch
@@ -0,0 +1,28 @@
+configure.ac: add CROSSPYTHONPATH into PYTHONPATH for PYTHON_FOR_BUILD
+
+When building x86->x86 the system will try to execute .so and related items
+from the default PYTHONPATH.  This will fail if the target CPU contains
+instructions that the host CPU does not have, add CROSSPYTHONPATH
+into PYTHONPATH so we can prepend the list to find correct libs.
+
+Upstream-Status: Inappropriate [OE-Core integration specific]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: Python-2.7.11/configure.ac
+===================================================================
+--- Python-2.7.11.orig/configure.ac
++++ Python-2.7.11/configure.ac
+@@ -33,7 +33,7 @@ if test "$cross_compiling" = yes; then
+ 	    AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
+ 	fi
+         AC_MSG_RESULT($interp)
+-	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
++	PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(CROSSPYTHONPATH):$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
+     fi
+ elif test "$cross_compiling" = maybe; then
+     AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
diff --git a/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch b/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
index 208c57c..3347321 100644
--- a/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
+++ b/yocto-poky/meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch
@@ -4,6 +4,7 @@
 
 Upstream-Status: Inappropriate [distribution]
 
+Also simply disable the tk module since its not in DEPENDS.
 Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
 
 Index: Python-2.7.2/setup.py
@@ -23,3 +24,16 @@
  
          return missing
  
+diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
+index b4633b9..d7588c0 100644
+--- Python-3.5.1.orig/setup.py
++++ Python-3.5.1/setup.py
+@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
+         self.extensions.extend(exts)
+ 
+         # Call the method for detecting whether _tkinter can be compiled
+-        self.detect_tkinter(inc_dirs, lib_dirs)
++        # self.detect_tkinter(inc_dirs, lib_dirs)
+ 
+         # tkinter module will not be avalaible as yocto
+         # doesn't have tk integrated (yet)
diff --git a/yocto-poky/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch b/yocto-poky/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch
index 2b62db3..e6d6c65 100644
--- a/yocto-poky/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch
+++ b/yocto-poky/meta/recipes-devtools/python/python/check-if-target-is-64b-not-host.patch
@@ -11,11 +11,11 @@
 
 Upstream-Status: Pending
 
-Index: Python-2.7.2/setup.py
+Index: Python-2.7.11/setup.py
 ===================================================================
---- Python-2.7.2.orig/setup.py	2012-03-25 01:10:41.540163187 +0200
-+++ Python-2.7.2/setup.py	2012-03-25 01:26:06.092539990 +0200
-@@ -23,6 +23,21 @@
+--- Python-2.7.11.orig/setup.py
++++ Python-2.7.11/setup.py
+@@ -35,6 +35,21 @@ COMPILED_WITH_PYDEBUG = ('--with-pydebug
  # This global variable is used to hold the list of modules to be disabled.
  disabled_module_list = []
  
@@ -37,16 +37,16 @@
  def add_dir_to_list(dirlist, dir):
      """Add the directory 'dir' to the list 'dirlist' (at the front) if
      1) 'dir' is not already in 'dirlist'
-@@ -628,7 +643,7 @@
+@@ -716,7 +731,7 @@ class PyBuildExt(build_ext):
          exts.append( Extension('audioop', ['audioop.c']) )
  
          # Disabled on 64-bit platforms
--        if sys.maxint != 9223372036854775807L:
+-        if sys.maxsize != 9223372036854775807L:
 +        if not target_is_64bit_platform():
              # Operations on images
              exts.append( Extension('imageop', ['imageop.c']) )
          else:
-@@ -1418,7 +1433,7 @@
+@@ -1545,7 +1560,7 @@ class PyBuildExt(build_ext):
                  missing.append('_codecs_%s' % loc)
  
          # Dynamic loading module
@@ -54,4 +54,4 @@
 +        if not target_is_64bit_platform():
              # This requires sizeof(int) == sizeof(long) == sizeof(char*)
              dl_inc = find_file('dlfcn.h', [], inc_dirs)
-             if (dl_inc is not None) and (platform not in ['atheos']):
+             if (dl_inc is not None) and (host_platform not in ['atheos']):
diff --git a/yocto-poky/meta/recipes-devtools/python/python3-native_3.4.3.bb b/yocto-poky/meta/recipes-devtools/python/python3-native_3.4.3.bb
deleted file mode 100644
index 464ff05..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python3-native_3.4.3.bb
+++ /dev/null
@@ -1,76 +0,0 @@
-require recipes-devtools/python/python.inc
-
-PR = "${INC_PR}.0"
-PYTHON_MAJMIN = "3.4"
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-file://12-distutils-prefix-is-inside-staging-area.patch \
-file://python-config.patch \
-file://000-cross-compile.patch \
-file://020-dont-compile-python-files.patch \
-file://030-fixup-include-dirs.patch \
-file://070-dont-clean-ipkg-install.patch \
-file://080-distutils-dont_adjust_files.patch \
-file://110-enable-zlib.patch \
-file://130-readline-setup.patch \
-file://150-fix-setupterm.patch \
-file://python-3.3-multilib.patch \
-file://03-fix-tkinter-detection.patch \
-file://avoid_warning_about_tkinter.patch \
-file://shutil-follow-symlink-fix.patch \
-file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
-file://sysroot-include-headers.patch \
-file://unixccompiler.patch \
-file://makerace.patch \
-${DISTRO_SRC_URI} \
-file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
-file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
-"
-SRC_URI[md5sum] = "7d092d1bba6e17f0d9bd21b49e441dd5"
-SRC_URI[sha256sum] = "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03"
-
-S = "${WORKDIR}/Python-${PV}"
-
-EXTRANATIVEPATH += "bzip2-native"
-DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
-
-inherit native
-
-RPROVIDES += "python3-distutils-native python3-compression-native python3-textutils-native python3-core-native"
-
-EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
-
-EXTRA_OEMAKE = '\
-  BUILD_SYS="" \
-  HOST_SYS="" \
-  LIBC="" \
-  STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
-  STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
-  LIB=${baselib} \
-  ARCH=${TARGET_ARCH} \
-'
-
-# No ctypes option for python 3
-PYTHONLSBOPTS = ""
-
-do_configure_append() {
-	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_install() {
-	install -d ${D}${libdir}/pkgconfig
-	oe_runmake 'DESTDIR=${D}' install
-	if [ -e ${WORKDIR}/sitecustomize.py ]; then
-		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
-	fi
-	install -d ${D}${bindir}/${PN}
-	install -m 0755 Parser/pgen ${D}${bindir}/${PN}
-
-	# Make sure we use /usr/bin/env python
-	for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
-		sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
-	done
-}
diff --git a/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.1.bb b/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.1.bb
new file mode 100644
index 0000000..7bad11a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python3-native_3.5.1.bb
@@ -0,0 +1,79 @@
+require recipes-devtools/python/python.inc
+
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.5"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+file://12-distutils-prefix-is-inside-staging-area.patch \
+file://python-config.patch \
+file://000-cross-compile.patch \
+file://020-dont-compile-python-files.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://110-enable-zlib.patch \
+file://130-readline-setup.patch \
+file://150-fix-setupterm.patch \
+file://python-3.3-multilib.patch \
+file://03-fix-tkinter-detection.patch \
+file://avoid_warning_about_tkinter.patch \
+file://shutil-follow-symlink-fix.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
+file://sysroot-include-headers.patch \
+file://unixccompiler.patch \
+${DISTRO_SRC_URI} \
+file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
+file://0001-Do-not-use-the-shell-version-of-python-config-that-w.patch \
+"
+SRC_URI[md5sum] = "e9ea6f2623fffcdd871b7b19113fde80"
+SRC_URI[sha256sum] = "c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03"
+
+# exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
+
+S = "${WORKDIR}/Python-${PV}"
+
+EXTRANATIVEPATH += "bzip2-native"
+DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native"
+
+inherit native
+
+RPROVIDES += "python3-distutils-native python3-compression-native python3-textutils-native python3-core-native"
+
+EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --without-ensurepip"
+
+EXTRA_OEMAKE = '\
+  BUILD_SYS="" \
+  HOST_SYS="" \
+  LIBC="" \
+  STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \
+  STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \
+  LIB=${baselib} \
+  ARCH=${TARGET_ARCH} \
+'
+
+# No ctypes option for python 3
+PYTHONLSBOPTS = ""
+
+do_configure_append() {
+	autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_install() {
+	install -d ${D}${libdir}/pkgconfig
+	oe_runmake 'DESTDIR=${D}' install
+	if [ -e ${WORKDIR}/sitecustomize.py ]; then
+		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+	fi
+	install -d ${D}${bindir}/${PN}
+	install -m 0755 Parser/pgen ${D}${bindir}/${PN}
+
+	# Make sure we use /usr/bin/env python
+	for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do
+		sed -i -e '1s|^#!.*|#!/usr/bin/env python3|' $PYTHSCRIPT
+	done
+}
diff --git a/yocto-poky/meta/recipes-devtools/python/python3-pip_6.1.1.bb b/yocto-poky/meta/recipes-devtools/python/python3-pip_6.1.1.bb
deleted file mode 100644
index 7bfc30e..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python3-pip_6.1.1.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "The PyPA recommended tool for installing Python packages"
-sHOMEPAGEsss = "https://pypi.python.org/pypi/pip"
-SECTION = "devel/python"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=45665b53032c02b35e29ddab8e61fa91"
-
-SRCNAME = "pip"
-DEPENDS += "python3 python3-setuptools-native"
-
-SRC_URI = " \
-  http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
-"
-SRC_URI[md5sum] = "6b19e0a934d982a5a4b798e957cb6d45"
-SRC_URI[sha256sum] = "89f3b626d225e08e7f20d85044afa40f612eb3284484169813dc2d0631f2a556"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils3
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
-
-do_install_prepend() {
-    install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
-}
-
-# Use setuptools site.py instead, avoid shared state issue
-do_install_append() {
-    rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/site.py
-    rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/__pycache__/site.cpython-34.pyc
-}
-
-RDEPENDS_${PN} = "\
-  python3-compile \
-  python3-io \
-  python3-json \
-  python3-netserver \
-  python3-setuptools \
-  python3-unixadmin \
-  python3-xmlrpc \
-"
diff --git a/yocto-poky/meta/recipes-devtools/python/python3-pip_8.0.0.bb b/yocto-poky/meta/recipes-devtools/python/python3-pip_8.0.0.bb
new file mode 100644
index 0000000..834ecda
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python3-pip_8.0.0.bb
@@ -0,0 +1,48 @@
+SUMMARY = "The PyPA recommended tool for installing Python packages"
+sHOMEPAGEsss = "https://pypi.python.org/pypi/pip"
+SECTION = "devel/python"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=25fba45109565f87de20bae85bc39452"
+
+SRCNAME = "pip"
+DEPENDS += "python3 python3-setuptools-native"
+
+SRC_URI = " \
+  http://pypi.python.org/packages/source/p/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
+"
+SRC_URI[md5sum] = "5601c4323464add1482291634142894d"
+SRC_URI[sha256sum] = "90112b296152f270cb8dddcd19b7b87488d9e002e8cf622e14c4da9c2f6319b1"
+
+UPSTREAM_CHECK_URI = "https://pypi.python.org/pypi/pip"
+
+S = "${WORKDIR}/${SRCNAME}-${PV}"
+
+inherit distutils3
+
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
+
+do_install_prepend() {
+    install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
+}
+
+# Use setuptools site.py instead, avoid shared state issue
+do_install_append() {
+    rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/site.py
+    rm ${D}/${libdir}/${PYTHON_DIR}/site-packages/__pycache__/site.cpython-*.pyc
+
+    # Install as pip3 and leave pip2 as default
+    rm ${D}/${bindir}/pip
+
+    # Installed eggs need to be passed directly to the interpreter via a pth file
+    echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/${SRCNAME}-${PV}.pth
+}
+
+RDEPENDS_${PN} = "\
+  python3-compile \
+  python3-io \
+  python3-json \
+  python3-netserver \
+  python3-setuptools \
+  python3-unixadmin \
+  python3-xmlrpc \
+"
diff --git a/yocto-poky/meta/recipes-devtools/python/python3-setuptools_18.2.bb b/yocto-poky/meta/recipes-devtools/python/python3-setuptools_18.2.bb
deleted file mode 100644
index dc0ac80..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python3-setuptools_18.2.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "Download, build, install, upgrade, and uninstall Python packages"
-HOMEPAGE = "http://packages.python.org/setuptools"
-SECTION = "devel/python"
-LICENSE = "PSF"
-LIC_FILES_CHKSUM = "file://setup.py;beginline=78;endline=78;md5=8a314270dd7a8dbca741775415f1716e"
-
-SRCNAME = "setuptools"
-DEPENDS += "python3"
-DEPENDS_class-native += "python3-native"
-
-SRC_URI = " \
-  http://pypi.python.org/packages/source/s/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \
-"
-SRC_URI[md5sum] = "52b4e48939ef311d7204f8fe940764f4"
-SRC_URI[sha256sum] = "0994a58df27ea5dc523782a601357a2198b7493dcc99a30d51827a23585b5b1d"
-
-S = "${WORKDIR}/${SRCNAME}-${PV}"
-
-inherit distutils3
-
-DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
-
-do_install_prepend() {
-    install -d ${D}/${libdir}/${PYTHON_DIR}/site-packages
-}
-#
-#  The installer puts the wrong path in the setuptools.pth file.  Correct it.
-#
-do_install_append() {
-    rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
-    mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
-    echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
-}
-
-RDEPENDS_${PN} = "\
-  python3-distutils \
-  python3-compression \
-"
-RDEPENDS_${PN}_class-target = "\
-  python3-ctypes \
-  python3-distutils \
-  python3-email \
-  python3-importlib \
-  python3-numbers \
-  python3-compression \
-  python3-shell \
-  python3-subprocess \
-  python3-textutils \
-  python3-pkgutil \
-  python3-threading \
-  python3-misc \
-  python3-unittest \
-  python3-xml \
-"
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/python/python3-setuptools_19.4.bb b/yocto-poky/meta/recipes-devtools/python/python3-setuptools_19.4.bb
new file mode 100644
index 0000000..fb2931c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python3-setuptools_19.4.bb
@@ -0,0 +1,37 @@
+require python-setuptools.inc
+
+DEPENDS += "python3"
+DEPENDS_class-native += "python3-native"
+
+inherit distutils3
+
+DISTUTILS_INSTALL_ARGS += "--install-lib=${D}${libdir}/${PYTHON_DIR}/site-packages"
+
+# The installer puts the wrong path in the setuptools.pth file.  Correct it.
+do_install_append() {
+    rm ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+    mv ${D}${bindir}/easy_install ${D}${bindir}/easy3_install
+    echo "./${SRCNAME}-${PV}-py${PYTHON_BASEVERSION}.egg" > ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools.pth
+}
+
+RDEPENDS_${PN} = "\
+  python3-distutils \
+  python3-compression \
+"
+RDEPENDS_${PN}_class-target = "\
+  python3-ctypes \
+  python3-distutils \
+  python3-email \
+  python3-importlib \
+  python3-numbers \
+  python3-compression \
+  python3-shell \
+  python3-subprocess \
+  python3-textutils \
+  python3-pkgutil \
+  python3-threading \
+  python3-misc \
+  python3-unittest \
+  python3-xml \
+"
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch b/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch
index 2506a59..28fe70a 100644
--- a/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch
+++ b/yocto-poky/meta/recipes-devtools/python/python3/000-cross-compile.patch
@@ -9,9 +9,11 @@
  Makefile.pre.in |   25 +++++++++++++------------
  1 file changed, 13 insertions(+), 12 deletions(-)
 
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -193,6 +193,7 @@ LIBOBJS=	@LIBOBJS@
+Index: Python-3.5.1/Makefile.pre.in
+===================================================================
+--- Python-3.5.1.orig/Makefile.pre.in
++++ Python-3.5.1/Makefile.pre.in
+@@ -220,6 +220,7 @@ LIBOBJS=	@LIBOBJS@
  
  PYTHON=		python$(EXE)
  BUILDPYTHON=	python$(BUILDEXE)
@@ -19,7 +21,7 @@
  
  PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
  _PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
-@@ -239,6 +240,7 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
+@@ -276,6 +277,7 @@ LIBFFI_INCLUDEDIR=	@LIBFFI_INCLUDEDIR@
  ##########################################################################
  # Parser
  PGEN=		Parser/pgen$(EXE)
@@ -27,25 +29,25 @@
  
  PSRCS=		\
  		Parser/acceler.c \
-@@ -451,7 +453,7 @@ build_all_generate_profile:
+@@ -506,7 +508,7 @@ build_all_generate_profile:
  
  run_profile_task:
  	: # FIXME: can't run for a cross build
--	$(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK)
-+	$(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK)
+-	$(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) || true
++	$(LLVM_PROF_FILE) $(RUNSHARED) $(HOSTPYTHON) $(PROFILE_TASK) || true
  
- build_all_use_profile:
- 	$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use -fprofile-correction"
-@@ -640,7 +642,7 @@ $(IO_OBJS): $(IO_H)
- $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
+ build_all_merge_profile:
+ 	$(LLVM_PROF_MERGER)
+@@ -779,7 +781,7 @@ $(IO_OBJS): $(IO_H)
+ 
+ $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGEN)
  		@$(MKDIR_P) Include
- 		$(MAKE) $(PGEN)
 -		$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
 +		$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
- 		$(MAKE) $(GRAMMAR_H)
+ $(GRAMMAR_C): $(GRAMMAR_H)
  		touch $(GRAMMAR_C)
-@@ -820,7 +822,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
+ 
+@@ -968,7 +970,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Programs/pyth
  ######################################################################
  
  TESTOPTS=	$(EXTRATESTOPTS)
@@ -54,7 +56,7 @@
  TESTRUNNER=	$(TESTPYTHON) $(srcdir)/Tools/scripts/run_tests.py
  TESTTIMEOUT=	3600
  
-@@ -1229,7 +1231,7 @@ frameworkinstallstructure:	$(LDLIBRARY)
+@@ -1455,7 +1457,7 @@ frameworkinstallstructure:	$(LDLIBRARY)
  		fi; \
  	done
  	$(LN) -fsn include/python$(LDVERSION) $(DESTDIR)$(prefix)/Headers
@@ -63,7 +65,7 @@
  	$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
  	$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
  	$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
-@@ -1288,7 +1290,7 @@ config.status:	$(srcdir)/configure
+@@ -1521,7 +1523,7 @@ config.status:	$(srcdir)/configure
  
  # Run reindent on the library
  reindent:
@@ -72,12 +74,12 @@
  
  # Rerun configure with the same options as it was run last time,
  # provided the config.status script exists
-@@ -1414,7 +1416,7 @@ funny:
+@@ -1656,7 +1658,7 @@ funny:
  
  # Perform some verification checks on any modified files.
- patchcheck:
+ patchcheck: all
 -	$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
-+	$(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
++	$(RUNSHARED) ./$(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
  
  # Dependencies
  
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch b/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
new file mode 100644
index 0000000..b7e0ac6
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python3/0001-Do-not-use-the-shell-version-of-python-config-that-w.patch
@@ -0,0 +1,38 @@
+From 045c99b5f1eb6e4e0d8ad1ef9f0ba6574f738150 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 23 Oct 2015 12:25:09 +0300
+Subject: [PATCH] Do not use the shell version of python-config that was
+ introduced in 3.4
+
+Revert instead to the original python version: it has our tweaks and
+outputs directories correctly.
+
+Upstream-Status: Inappropriate [oe-specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile.pre.in | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index d7fc9a0..47e60bc 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1270,12 +1270,9 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
+ 	sed -e "s,@EXENAME@,$(BINDIR)/python$(LDVERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py
+ 	# Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
+ 	sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' < Misc/python-config.sh >python-config
+-	# On Darwin, always use the python version of the script, the shell
+-	# version doesn't use the compiler customizations that are provided
+-	# in python (_osx_support.py).
+-	if test `uname -s` = Darwin; then \
+-		cp python-config.py python-config; \
+-	fi
++	# In OpenEmbedded, always use the python version of the script, the shell
++	# version is broken in multiple ways, and doesn't return correct directories
++	cp python-config.py python-config
+ 
+ 
+ # Install the include files
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch b/yocto-poky/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
index 03ef286..819ba69 100644
--- a/yocto-poky/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
+++ b/yocto-poky/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
@@ -8,9 +8,11 @@
  Makefile.pre.in |   16 ----------------
  1 file changed, 16 deletions(-)
 
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1078,24 +1078,6 @@ libinstall:	build_all $(srcdir)/Lib/$(PL
+Index: Python-3.5.0/Makefile.pre.in
+===================================================================
+--- Python-3.5.0.orig/Makefile.pre.in
++++ Python-3.5.0/Makefile.pre.in
+@@ -1262,33 +1262,6 @@ libinstall:	build_all $(srcdir)/Lib/$(PL
  		$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
  			$(DESTDIR)$(LIBDEST)/distutils/tests ; \
  	fi
@@ -24,7 +26,12 @@
 -		-d $(LIBDEST) -f \
 -		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
 -		$(DESTDIR)$(LIBDEST)
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
+-	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-		$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-d $(LIBDEST) -f \
+-		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+-		$(DESTDIR)$(LIBDEST)
+-	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
 -		$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
 -		-d $(LIBDEST)/site-packages -f \
 -		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
@@ -32,6 +39,10 @@
 -		$(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
 -		-d $(LIBDEST)/site-packages -f \
 -		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+-	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+-		$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
+-		-d $(LIBDEST)/site-packages -f \
+-		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
  	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
  		$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
  	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/04-default-is-optimized.patch b/yocto-poky/meta/recipes-devtools/python/python3/04-default-is-optimized.patch
deleted file mode 100644
index 3b8f264..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python3/04-default-is-optimized.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
-# when compiling for an embedded system, we need every bit of
-# performance we can get. default to optimized with the option
-# of opt-out.
-# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
-
-
-2012/05/01
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-
-Rebased for 3.4.2 02/2015
-Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
-
-Index: Python-3.4.2/Python/compile.c
-===================================================================
---- Python-3.4.2.orig/Python/compile.c
-+++ Python-3.4.2/Python/compile.c
-@@ -30,7 +30,7 @@
- #include "symtable.h"
- #include "opcode.h"
- 
--int Py_OptimizeFlag = 0;
-+int Py_OptimizeFlag = 1;
- 
- #define DEFAULT_BLOCK_SIZE 16
- #define DEFAULT_BLOCKS 8
-Index: Python-3.4.2/Modules/main.c
-===================================================================
---- Python-3.4.2.orig/Modules/main.c
-+++ Python-3.4.2/Modules/main.c
-@@ -38,7 +38,7 @@ static wchar_t **orig_argv;
- static int  orig_argc;
- 
- /* command line options */
--#define BASE_OPTS L"bBc:dEhiIJm:OqRsStuvVW:xX:?"
-+#define BASE_OPTS L"bBc:dEhiIJm:NOqRsStuvVW:xX:?"
- 
- #define PROGRAM_OPTS BASE_OPTS
- 
-@@ -64,6 +64,7 @@ static char *usage_2 = "\
- -m mod : run library module as a script (terminates option list)\n\
- -O     : optimize generated bytecode slightly; also PYTHONOPTIMIZE=x\n\
- -OO    : remove doc-strings in addition to the -O optimizations\n\
-+-N     : do NOT optimize generated bytecode\n\
- -q     : don't print version and copyright messages on interactive startup\n\
- -s     : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
- -S     : don't imply 'import site' on initialization\n\
-@@ -418,8 +419,8 @@ Py_Main(int argc, wchar_t **argv)
- 
-         /* case 'J': reserved for Jython */
- 
--        case 'O':
--            Py_OptimizeFlag++;
-+        case 'N':
-+            Py_OptimizeFlag=0;
-             break;
- 
-         case 'B':
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/yocto-poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
index bf02df2..8b93c1c 100644
--- a/yocto-poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
+++ b/yocto-poky/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
@@ -1,3 +1,8 @@
+From d4dd67daa1555bf13272cc071706338572539bad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 14 May 2013 15:00:26 -0700
+Subject: [PATCH 01/20] python3: Add target and native recipes
+
 Upstream-Status: Inappropriate [embedded specific]
 
 02/2015 Rebased for Python 3.4.2
@@ -8,11 +13,12 @@
 # Signed-off-by: Khem Raj <raj.khem@gmail.com>
 # Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
 
-Index: Python-3.4.2/Lib/distutils/sysconfig.py
-===================================================================
---- Python-3.4.2.orig/Lib/distutils/sysconfig.py
-+++ Python-3.4.2/Lib/distutils/sysconfig.py
-@@ -16,10 +16,11 @@ import sys
+---
+diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
+index 573724d..418b478 100644
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -17,10 +17,11 @@ import sys
  from .errors import DistutilsPlatformError
  
  # These are needed in a couple of spots, so just compute them once.
@@ -27,8 +33,8 @@
 +
  
  # Path to the base directory of the project. On Windows the binary may
- # live in project/PCBuild9.  If we're dealing with an x64 Windows build,
-@@ -93,7 +94,9 @@ def get_python_inc(plat_specific=0, pref
+ # live in project/PCBuild/win32 or project/PCBuild/amd64.
+@@ -84,7 +85,9 @@ def get_python_inc(plat_specific=0, prefix=None):
      If 'prefix' is supplied, use it instead of sys.base_prefix or
      sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
      """
@@ -39,20 +45,18 @@
          prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
      if os.name == "posix":
          if python_build:
-@@ -134,6 +137,12 @@ def get_python_lib(plat_specific=0, stan
+@@ -125,6 +128,10 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
      If 'prefix' is supplied, use it instead of sys.base_prefix or
      sys.base_exec_prefix -- i.e., ignore 'plat_specific'.
      """
++    lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
 +    if prefix is None and os.environ['STAGING_LIBDIR'] != "":
-+        lib_basename = os.environ['STAGING_LIBDIR'].split('/')[-1]
 +        prefix = os.environ['STAGING_LIBDIR'].rstrip(lib_basename)
-+    else:
-+        lib_basename = sys.lib
 +
      if prefix is None:
          if standard_lib:
              prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX
-@@ -142,7 +151,7 @@ def get_python_lib(plat_specific=0, stan
+@@ -133,7 +140,7 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
  
      if os.name == "posix":
          libpython = os.path.join(prefix,
@@ -61,7 +65,7 @@
          if standard_lib:
              return libpython
          else:
-@@ -242,7 +251,7 @@ def get_config_h_filename():
+@@ -233,7 +240,7 @@ def get_config_h_filename():
      else:
          inc_dir = get_python_inc(plat_specific=1)
  
@@ -70,7 +74,7 @@
  
  
  def get_makefile_filename():
-@@ -251,7 +260,7 @@ def get_makefile_filename():
+@@ -242,7 +249,7 @@ def get_makefile_filename():
          return os.path.join(_sys_home or project_base, "Makefile")
      lib_dir = get_python_lib(plat_specific=0, standard_lib=1)
      config_file = 'config-{}{}'.format(get_python_version(), build_flags)
@@ -79,3 +83,6 @@
  
  
  def parse_config_h(fp, g=None):
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch b/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
index 208c57c..3347321 100644
--- a/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
+++ b/yocto-poky/meta/recipes-devtools/python/python3/avoid_warning_about_tkinter.patch
@@ -4,6 +4,7 @@
 
 Upstream-Status: Inappropriate [distribution]
 
+Also simply disable the tk module since its not in DEPENDS.
 Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
 
 Index: Python-2.7.2/setup.py
@@ -23,3 +24,16 @@
  
          return missing
  
+diff --git Python-3.5.1.orig/setup.py Python-3.5.1/setup.py
+index b4633b9..d7588c0 100644
+--- Python-3.5.1.orig/setup.py
++++ Python-3.5.1/setup.py
+@@ -1536,7 +1536,7 @@ class PyBuildExt(build_ext):
+         self.extensions.extend(exts)
+ 
+         # Call the method for detecting whether _tkinter can be compiled
+-        self.detect_tkinter(inc_dirs, lib_dirs)
++        # self.detect_tkinter(inc_dirs, lib_dirs)
+ 
+         # tkinter module will not be avalaible as yocto
+         # doesn't have tk integrated (yet)
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch b/yocto-poky/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch
new file mode 100644
index 0000000..97214f9
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python3/configure.ac-fix-LIBPL.patch
@@ -0,0 +1,30 @@
+From 7c4f8d87473d6238c120ec6031b58f83a17a39a5 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 28 Dec 2015 22:52:06 -0800
+Subject: [PATCH] configure.ac: fix LIBPL
+
+Use LIBDIR rather than prefix/lib, so that it would work when lib64.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ configure.ac |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 63aef8e..aefb27f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -4366,7 +4366,7 @@ AC_MSG_RESULT($LDVERSION)
+ 
+ dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
+ AC_SUBST(PY_ENABLE_SHARED)
+-LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
++LIBPL='$(LIBDIR)'"/python${VERSION}/config-${LDVERSION}"
+ AC_SUBST(LIBPL)
+ 
+ # Check whether right shifting a negative integer extends the sign bit
+-- 
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/makerace.patch b/yocto-poky/meta/recipes-devtools/python/python3/makerace.patch
deleted file mode 100644
index d8a6892..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python3/makerace.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-There is a race due to the execution of make inside the makefile:
-
-| gcc  -pthread -c -Wno-unused-result -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe   -I. -IInclude -I./Include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -fPIC -DPy_BUILD_CORE -o Objects/obmalloc.o Objects/obmalloc.c
-| gcc  -pthread -c -Wno-unused-result -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe   -I. -IInclude -I./Include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -fPIC -DPy_BUILD_CORE -o Parser/pgen.o Parser/pgen.c| gcc  -pthread -c -Wno-unused-result -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe   -I. -IInclude -I./Include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -fPIC -DPy_BUILD_CORE -o Objects/obmalloc.o Objects/obmalloc.c
-| gcc  -pthread -c -Wno-unused-result -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2 -pipe   -I. -IInclude -I./Include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -isystem/home/pokybuild/yocto-autobuilder-dev/yocto-slave/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -fPIC -DPy_BUILD_CORE -o Objects/obmalloc.o Objects/obmalloc.c
-| Objects/obmalloc.o: file not recognized: File truncated
-| collect2: error: ld returned 1 exit status
-| make[1]: *** [Parser/pgen] Error 1
-
-The easiest way to avoid this is to list the dependencies explictly.
-
-RP 28/2/2014
-
-Upstream-Status: Pending
-
-Index: Python-3.3.3/Makefile.pre.in
-===================================================================
---- Python-3.3.3.orig/Makefile.pre.in	2014-02-27 14:04:38.268339533 +0000
-+++ Python-3.3.3/Makefile.pre.in	2014-02-28 10:40:59.166361125 +0000
-@@ -676,7 +676,7 @@
- 
- $(IO_OBJS): $(IO_H)
- 
--$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
-+$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) $(PGEN)
- 		@$(MKDIR_P) Include
- 		$(MAKE) $(PGEN)
- 		$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
index b3e9860..44ec424 100644
--- a/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ b/yocto-poky/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -7,23 +7,24 @@
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
 
-Index: Python-3.4.2/Include/pythonrun.h
+Index: Python-3.5.0/Include/pythonrun.h
 ===================================================================
---- Python-3.4.2.orig/Include/pythonrun.h
-+++ Python-3.4.2/Include/pythonrun.h
-@@ -220,6 +220,8 @@ int _Py_CheckPython3();
- /* In their own files */
- PyAPI_FUNC(const char *) Py_GetVersion(void);
- PyAPI_FUNC(const char *) Py_GetPlatform(void);
+--- Python-3.5.0.orig/Include/pythonrun.h
++++ Python-3.5.0/Include/pythonrun.h
+@@ -23,6 +23,9 @@ typedef struct {
+ } PyCompilerFlags;
+ #endif
+ 
 +PyAPI_FUNC(const char *) Py_GetArch(void);
 +PyAPI_FUNC(const char *) Py_GetLib(void);
- PyAPI_FUNC(const char *) Py_GetCopyright(void);
- PyAPI_FUNC(const char *) Py_GetCompiler(void);
- PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
-Index: Python-3.4.2/Lib/distutils/command/install.py
++
+ #ifndef Py_LIMITED_API
+ PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
+ PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
+Index: Python-3.5.0/Lib/distutils/command/install.py
 ===================================================================
---- Python-3.4.2.orig/Lib/distutils/command/install.py
-+++ Python-3.4.2/Lib/distutils/command/install.py
+--- Python-3.5.0.orig/Lib/distutils/command/install.py
++++ Python-3.5.0/Lib/distutils/command/install.py
 @@ -19,6 +19,8 @@ from site import USER_BASE
  from site import USER_SITE
  HAS_USER_SITE = True
@@ -42,11 +43,11 @@
          'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
          'scripts': '$base/bin',
          'data'   : '$base',
-Index: Python-3.4.2/Lib/pydoc.py
+Index: Python-3.5.0/Lib/pydoc.py
 ===================================================================
---- Python-3.4.2.orig/Lib/pydoc.py
-+++ Python-3.4.2/Lib/pydoc.py
-@@ -394,7 +394,7 @@ class Doc:
+--- Python-3.5.0.orig/Lib/pydoc.py
++++ Python-3.5.0/Lib/pydoc.py
+@@ -393,7 +393,7 @@ class Doc:
  
          docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)
  
@@ -55,11 +56,11 @@
                                 "python%d.%d" %  sys.version_info[:2])
          if (isinstance(object, type(os)) and
              (object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
-Index: Python-3.4.2/Lib/trace.py
+Index: Python-3.5.0/Lib/trace.py
 ===================================================================
---- Python-3.4.2.orig/Lib/trace.py
-+++ Python-3.4.2/Lib/trace.py
-@@ -751,10 +751,10 @@ def main(argv=None):
+--- Python-3.5.0.orig/Lib/trace.py
++++ Python-3.5.0/Lib/trace.py
+@@ -749,10 +749,10 @@ def main(argv=None):
                  # should I also call expanduser? (after all, could use $HOME)
  
                  s = s.replace("$prefix",
@@ -72,10 +73,10 @@
                                             "python" + sys.version[:3]))
                  s = os.path.normpath(s)
                  ignore_dirs.append(s)
-Index: Python-3.4.2/Makefile.pre.in
+Index: Python-3.5.0/Makefile.pre.in
 ===================================================================
---- Python-3.4.2.orig/Makefile.pre.in
-+++ Python-3.4.2/Makefile.pre.in
+--- Python-3.5.0.orig/Makefile.pre.in
++++ Python-3.5.0/Makefile.pre.in
 @@ -101,6 +101,8 @@ PY_CORE_CFLAGS=	$(PY_CFLAGS) $(PY_CFLAGS
  
  # Machine-dependent subdirectories
@@ -94,15 +95,15 @@
  ABIFLAGS=	@ABIFLAGS@
  
  # Detailed destination directories
-@@ -712,6 +714,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
+@@ -729,6 +731,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
  		-DEXEC_PREFIX='"$(exec_prefix)"' \
  		-DVERSION='"$(VERSION)"' \
  		-DVPATH='"$(VPATH)"' \
 +		-DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \
  		-o $@ $(srcdir)/Modules/getpath.c
  
- Modules/python.o: $(srcdir)/Modules/python.c
-@@ -780,7 +783,7 @@ $(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN
+ Programs/python.o: $(srcdir)/Programs/python.c
+@@ -798,7 +801,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(O
  Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
  
  Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -111,10 +112,10 @@
  
  Python/importdl.o: $(srcdir)/Python/importdl.c
  		$(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
-Index: Python-3.4.2/Modules/getpath.c
+Index: Python-3.5.0/Modules/getpath.c
 ===================================================================
---- Python-3.4.2.orig/Modules/getpath.c
-+++ Python-3.4.2/Modules/getpath.c
+--- Python-3.5.0.orig/Modules/getpath.c
++++ Python-3.5.0/Modules/getpath.c
 @@ -117,9 +117,11 @@
  #define EXEC_PREFIX PREFIX
  #endif
@@ -135,12 +136,12 @@
  static wchar_t *module_search_path = NULL;
 +static wchar_t *lib_python = L"" LIB_PYTHON;
  
- static void
- reduce(wchar_t *dir)
-Index: Python-3.4.2/Python/getplatform.c
+ /* Get file status. Encode the path to the locale encoding. */
+ 
+Index: Python-3.5.0/Python/getplatform.c
 ===================================================================
---- Python-3.4.2.orig/Python/getplatform.c
-+++ Python-3.4.2/Python/getplatform.c
+--- Python-3.5.0.orig/Python/getplatform.c
++++ Python-3.5.0/Python/getplatform.c
 @@ -10,3 +10,23 @@ Py_GetPlatform(void)
  {
  	return PLATFORM;
@@ -165,11 +166,11 @@
 +{
 +	return LIB;
 +}
-Index: Python-3.4.2/Python/sysmodule.c
+Index: Python-3.5.0/Python/sysmodule.c
 ===================================================================
---- Python-3.4.2.orig/Python/sysmodule.c
-+++ Python-3.4.2/Python/sysmodule.c
-@@ -1697,6 +1697,10 @@ _PySys_Init(void)
+--- Python-3.5.0.orig/Python/sysmodule.c
++++ Python-3.5.0/Python/sysmodule.c
+@@ -1767,6 +1767,10 @@ _PySys_Init(void)
                          PyUnicode_FromString(Py_GetCopyright()));
      SET_SYS_FROM_STRING("platform",
                          PyUnicode_FromString(Py_GetPlatform()));
@@ -180,11 +181,11 @@
      SET_SYS_FROM_STRING("executable",
                          PyUnicode_FromWideChar(
                                 Py_GetProgramFullPath(), -1));
-Index: Python-3.4.2/setup.py
+Index: Python-3.5.0/setup.py
 ===================================================================
---- Python-3.4.2.orig/setup.py
-+++ Python-3.4.2/setup.py
-@@ -454,7 +454,7 @@ class PyBuildExt(build_ext):
+--- Python-3.5.0.orig/setup.py
++++ Python-3.5.0/setup.py
+@@ -472,7 +472,7 @@ class PyBuildExt(build_ext):
          # directories (i.e. '.' and 'Include') must be first.  See issue
          # 10520.
          if not cross_compiling:
@@ -193,7 +194,7 @@
              add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
          # only change this for cross builds for 3.3, issues on Mageia
          if cross_compiling:
-@@ -512,8 +512,7 @@ class PyBuildExt(build_ext):
+@@ -530,8 +530,7 @@ class PyBuildExt(build_ext):
          # be assumed that no additional -I,-L directives are needed.
          if not cross_compiling:
              lib_dirs = self.compiler.library_dirs + [
@@ -203,7 +204,7 @@
                  ]
              inc_dirs = self.compiler.include_dirs + ['/usr/include']
          else:
-@@ -696,11 +695,11 @@ class PyBuildExt(build_ext):
+@@ -716,11 +715,11 @@ class PyBuildExt(build_ext):
              elif curses_library:
                  readline_libs.append(curses_library)
              elif self.compiler.find_library_file(lib_dirs +
@@ -217,10 +218,10 @@
                                     extra_link_args=readline_extra_link_args,
                                     libraries=readline_libs) )
          else:
-Index: Python-3.4.2/Lib/sysconfig.py
+Index: Python-3.5.0/Lib/sysconfig.py
 ===================================================================
---- Python-3.4.2.orig/Lib/sysconfig.py
-+++ Python-3.4.2/Lib/sysconfig.py
+--- Python-3.5.0.orig/Lib/sysconfig.py
++++ Python-3.5.0/Lib/sysconfig.py
 @@ -20,10 +20,10 @@ __all__ = [
  
  _INSTALL_SCHEMES = {
@@ -263,13 +264,13 @@
          'include': '{userbase}/include/python{py_version_short}',
          'scripts': '{userbase}/bin',
          'data': '{userbase}',
-Index: Python-3.4.2/configure.ac
+Index: Python-3.5.0/configure.ac
 ===================================================================
---- Python-3.4.2.orig/configure.ac
-+++ Python-3.4.2/configure.ac
-@@ -791,6 +791,41 @@ esac
- MULTIARCH=$($CC --print-multiarch 2>/dev/null)
- AC_SUBST(MULTIARCH)
+--- Python-3.5.0.orig/configure.ac
++++ Python-3.5.0/configure.ac
+@@ -858,6 +858,41 @@ PLATDIR=plat-$MACHDEP
+ AC_SUBST(PLATDIR)
+ AC_SUBST(PLATFORM_TRIPLET)
  
 +AC_SUBST(ARCH)
 +AC_MSG_CHECKING(ARCH)
@@ -307,32 +308,5 @@
 +esac
 +AC_MSG_RESULT($LIB)
  
- AC_SUBST(LIBRARY)
- AC_MSG_CHECKING(LIBRARY)
-Index: Python-3.4.2/Lib/site.py
-===================================================================
---- Python-3.4.2.orig/Lib/site.py
-+++ Python-3.4.2/Lib/site.py
-@@ -304,13 +304,19 @@ def getsitepackages(prefixes=None):
-         seen.add(prefix)
- 
-         if os.sep == '/':
--            sitepackages.append(os.path.join(prefix, "lib",
-+            sitepackages.append(os.path.join(prefix, sys.lib,
-                                         "python" + sys.version[:3],
-                                         "site-packages"))
--            sitepackages.append(os.path.join(prefix, "lib", "site-python"))
-+            if sys.lib != "lib":
-+                sitepackages.append(os.path.join(prefix, "lib",
-+                                        "python" + sys.version[:3],
-+                                        "site-packages"))
-+            sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
-+            if sys.lib != "lib":
-+                sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
-         else:
-             sitepackages.append(prefix)
--            sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
-+            sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
-         if sys.platform == "darwin":
-             # for framework builds *only* we add the standard Apple
-             # locations.
+ AC_MSG_CHECKING([for -Wl,--no-as-needed])
+ save_LDFLAGS="$LDFLAGS"
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch b/yocto-poky/meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch
new file mode 100644
index 0000000..8d03727
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python3/tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch
@@ -0,0 +1,52 @@
+From 5d6509313198ec9b686cad50b002212e4344004b Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Fri, 11 Mar 2016 01:15:45 -0500
+Subject: [PATCH] configure.ac: tweak MULTIARCH for powerpc-linux-gnuspe
+
+For p1022ds bsp, the MULTIARCH is powerpc-linux-gnuspev1 and
+python3 did not recognize the extra 'v1' which caused python3
+configure error for the platform triplet.
+
+Q:Why Python3 check platform triplet?
+
+A:Under Linux, GNU/KFreeBSD and the Hurd, C extensions now include
+the architecture triplet in the extension name, to make it easy to
+test builds for different ABIs in the same working tree.
+
+Here is the generated  C extensions which take platform triplet into account.
+...
+|image/usr/lib/python3.5/lib-dynload/_datetime.cpython-35m-powerpc-linux-gnuspe.so
+...
+
+https://bugs.python.org/issue22980
+https://www.python.org/dev/peps/pep-3149/
+https://bugs.python.org/review/22980/patch/14593/54808
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9eb3d22..c34a9a0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -724,6 +724,13 @@ fi
+ 
+ 
+ MULTIARCH=$($CC --print-multiarch 2>/dev/null)
++
++# Tweak MULTIARCH
++if test x$MULTIARCH = xpowerpc-linux-gnuspev1
++then
++	MULTIARCH="powerpc-linux-gnuspe"
++fi
++
+ AC_SUBST(MULTIARCH)
+ 
+ AC_MSG_CHECKING([for the platform triplet based on compiler characteristics])
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/python/python3/use_packed_importlib.patch b/yocto-poky/meta/recipes-devtools/python/python3/use_packed_importlib.patch
new file mode 100644
index 0000000..6c4b0cd
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python3/use_packed_importlib.patch
@@ -0,0 +1,31 @@
+
+Upstream-Status: Inappropriate [embedded specific] 
+  
+The binary _freeze_importlib is built and also used during build time to generate
+importlib*.h files, this is impossible to do on a cross-compile environment,
+this avoids executing the binary and forces it to use the packed importlib*.h files.
+
+ 
+Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> 
+
+Index: Python-3.5.0/Makefile.pre.in
+===================================================================
+--- Python-3.5.0.orig/Makefile.pre.in
++++ Python-3.5.0/Makefile.pre.in
+@@ -700,12 +700,12 @@ Programs/_freeze_importlib.o: Programs/_
+ Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
+ 	$(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+ 
+-Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
+-	./Programs/_freeze_importlib \
++#Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
++#	./Programs/_freeze_importlib \
+ 		$(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h
+ 
+-Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
+-	./Programs/_freeze_importlib \
++#Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
++#	./Programs/_freeze_importlib \
+ 		$(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
+ 
+ 
diff --git a/yocto-poky/meta/recipes-devtools/python/python3_3.4.3.bb b/yocto-poky/meta/recipes-devtools/python/python3_3.4.3.bb
deleted file mode 100644
index f61d278..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python3_3.4.3.bb
+++ /dev/null
@@ -1,225 +0,0 @@
-require recipes-devtools/python/python.inc
-
-DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
-PR = "${INC_PR}.0"
-PYTHON_MAJMIN = "3.4"
-PYTHON_BINABI= "${PYTHON_MAJMIN}m"
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
-file://python-config.patch \
-file://000-cross-compile.patch \
-file://020-dont-compile-python-files.patch \
-file://030-fixup-include-dirs.patch \
-file://070-dont-clean-ipkg-install.patch \
-file://080-distutils-dont_adjust_files.patch \
-file://110-enable-zlib.patch \
-file://130-readline-setup.patch \
-file://150-fix-setupterm.patch \
-file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
-file://makerace.patch \
-${DISTRO_SRC_URI} \
-"
-
-SRC_URI += "\
-            file://03-fix-tkinter-detection.patch \
-            file://04-default-is-optimized.patch \
-            file://avoid_warning_about_tkinter.patch \
-            file://cgi_py.patch \
-            file://host_include_contamination.patch \
-            file://python-3.3-multilib.patch \
-            file://shutil-follow-symlink-fix.patch \
-            file://sysroot-include-headers.patch \
-            file://unixccompiler.patch \
-            file://avoid-ncursesw-include-path.patch \
-            file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
-            file://python3-setup.py-no-host-headers-libs.patch \
-            file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
-            file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
-            file://setup.py-find-libraries-in-staging-dirs.patch \
-           "
-SRC_URI[md5sum] = "7d092d1bba6e17f0d9bd21b49e441dd5"
-SRC_URI[sha256sum] = "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python3native pkgconfig
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
-                ac_cv_have_lchflags=no \
-                ac_cv_have_long_long_format=yes \
-                ac_cv_buggy_getaddrinfo=no \
-                ac_cv_file__dev_ptmx=yes \
-                ac_cv_file__dev_ptc=no \
-"
-# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
-#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
-TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
-TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
-TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
-EXTRA_OEMAKE += "CROSS_COMPILE=yes"
-EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
-
-export CROSS_COMPILE = "${TARGET_PREFIX}"
-export _PYTHON_PROJECT_BASE = "${B}"
-export _PYTHON_PROJECT_SRC = "${S}"
-export CCSHARED = "-fPIC"
-
-# Fix ctypes cross compilation
-export CROSSPYTHONPATH = "${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
-
-# No ctypes option for python 3
-PYTHONLSBOPTS = ""
-
-do_configure_append() {
-	rm -f ${S}/Makefile.orig
-	autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_compile() {
-        # regenerate platform specific files, because they depend on system headers
-        cd ${S}/Lib/plat-linux*
-        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
-                ${S}/Tools/scripts/h2py.py -i '(u_long)' \
-                ${STAGING_INCDIR}/dlfcn.h \
-                ${STAGING_INCDIR}/linux/cdrom.h \
-                ${STAGING_INCDIR}/netinet/in.h \
-                ${STAGING_INCDIR}/sys/types.h
-        sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
-        cd -
-
-
-	# remove any bogus LD_LIBRARY_PATH
-	sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
-	if [ ! -f Makefile.orig ]; then
-		install -m 0644 Makefile Makefile.orig
-	fi
-	sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
-		-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
-		-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
-		-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
-		-e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
-		-e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
-		-e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
-		Makefile
-	# save copy of it now, because if we do it in do_install and 
-	# then call do_install twice we get Makefile.orig == Makefile.sysroot
-	install -m 0644 Makefile Makefile.sysroot
-
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-		LIB=${baselib} \
-		ARCH=${TARGET_ARCH} \
-		OPT="${CFLAGS}" libpython3.so
-
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-		LIB=${baselib} \
-		ARCH=${TARGET_ARCH} \
-		OPT="${CFLAGS}"
-}
-
-do_install() {
-	# make install needs the original Makefile, or otherwise the inclues would
-	# go to ${D}${STAGING...}/...
-	install -m 0644 Makefile.orig Makefile
-
-	install -d ${D}${libdir}/pkgconfig
-	install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
-
-	# rerun the build once again with original makefile this time
-	# run install in a separate step to avoid compile/install race
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-		LIB=${baselib} \
-		ARCH=${TARGET_ARCH} \
-		DESTDIR=${D} LIBDIR=${libdir}
-	
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-		LIB=${baselib} \
-		ARCH=${TARGET_ARCH} \
-		DESTDIR=${D} LIBDIR=${libdir} install
-
-	# avoid conflict with 2to3 from Python 2
-	rm -f ${D}/${bindir}/2to3
-
-	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
-	if [ -e ${WORKDIR}/sitecustomize.py ]; then
-		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
-	fi
-
-	oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
-}
-
-do_install_append_class-nativesdk () {
-	create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
-	# copy back the old Makefile to fix target package
-	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
-	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
-
-require python-${PYTHON_MAJMIN}-manifest.inc
-
-# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
-RRECOMMENDS_${PN}-crypt = "openssl"
-RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
-
-FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
-FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
-FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
-
-PACKAGES =+ "${PN}-pyvenv"
-FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
-
-# package libpython3
-PACKAGES =+ "libpython3 libpython3-staticdev"
-FILES_libpython3 = "${libdir}/libpython*.so.*"
-FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
-
-# catch debug extensions (isn't that already in python-core-dbg?)
-FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-RDEPENDS_${PN}-misc += "${PN}-core"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python3_3.5.1.bb b/yocto-poky/meta/recipes-devtools/python/python3_3.5.1.bb
new file mode 100644
index 0000000..2fbb3cb
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python3_3.5.1.bb
@@ -0,0 +1,226 @@
+require recipes-devtools/python/python.inc
+
+DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz"
+PR = "${INC_PR}.0"
+PYTHON_MAJMIN = "3.5"
+PYTHON_BINABI= "${PYTHON_MAJMIN}m"
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
+file://python-config.patch \
+file://000-cross-compile.patch \
+file://020-dont-compile-python-files.patch \
+file://030-fixup-include-dirs.patch \
+file://070-dont-clean-ipkg-install.patch \
+file://080-distutils-dont_adjust_files.patch \
+file://110-enable-zlib.patch \
+file://130-readline-setup.patch \
+file://150-fix-setupterm.patch \
+file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \
+file://tweak-MULTIARCH-for-powerpc-linux-gnuspe.patch \
+${DISTRO_SRC_URI} \
+"
+
+SRC_URI += "\
+            file://03-fix-tkinter-detection.patch \
+            file://avoid_warning_about_tkinter.patch \
+            file://cgi_py.patch \
+            file://host_include_contamination.patch \
+            file://python-3.3-multilib.patch \
+            file://shutil-follow-symlink-fix.patch \
+            file://sysroot-include-headers.patch \
+            file://unixccompiler.patch \
+            file://avoid-ncursesw-include-path.patch \
+            file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+            file://python3-setup.py-no-host-headers-libs.patch \
+            file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \
+            file://setup.py-check-cross_compiling-when-get-FLAGS.patch \
+            file://setup.py-find-libraries-in-staging-dirs.patch \
+            file://use_packed_importlib.patch \
+            file://configure.ac-fix-LIBPL.patch \
+           "
+SRC_URI[md5sum] = "e9ea6f2623fffcdd871b7b19113fde80"
+SRC_URI[sha256sum] = "c6d57c0c366d9060ab6c0cdf889ebf3d92711d466cc0119c441dbf2746f725c9"
+
+# exclude pre-releases for both python 2.x and 3.x
+UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03"
+
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools multilib_header python3native pkgconfig
+
+CONFIGUREOPTS += " --with-system-ffi "
+
+CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \
+                ac_cv_have_lchflags=no \
+                ac_cv_have_long_long_format=yes \
+                ac_cv_buggy_getaddrinfo=no \
+                ac_cv_file__dev_ptmx=yes \
+                ac_cv_file__dev_ptc=no \
+"
+
+TARGET_CC_ARCH += "-DNDEBUG -fno-inline"
+SDK_CC_ARCH += "-DNDEBUG -fno-inline"
+EXTRA_OEMAKE += "CROSS_COMPILE=yes"
+EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip"
+
+export CROSS_COMPILE = "${TARGET_PREFIX}"
+export _PYTHON_PROJECT_BASE = "${B}"
+export _PYTHON_PROJECT_SRC = "${S}"
+export CCSHARED = "-fPIC"
+
+# Fix ctypes cross compilation
+export CROSSPYTHONPATH = "${B}/build/lib.linux-${TARGET_ARCH}-${PYTHON_MAJMIN}:${S}/Lib:${S}/Lib/plat-linux"
+
+# No ctypes option for python 3
+PYTHONLSBOPTS = ""
+
+do_configure_append() {
+	rm -f ${S}/Makefile.orig
+	autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_compile() {
+        # regenerate platform specific files, because they depend on system headers
+        cd ${S}/Lib/plat-linux*
+        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+                ${S}/Tools/scripts/h2py.py -i '(u_long)' \
+                ${STAGING_INCDIR}/dlfcn.h \
+                ${STAGING_INCDIR}/linux/cdrom.h \
+                ${STAGING_INCDIR}/netinet/in.h \
+                ${STAGING_INCDIR}/sys/types.h
+        sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
+        cd -
+
+
+	# remove any bogus LD_LIBRARY_PATH
+	sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
+
+	if [ ! -f Makefile.orig ]; then
+		install -m 0644 Makefile Makefile.orig
+	fi
+	sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \
+		-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+		-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+		-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+		-e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+		-e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+		-e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+		Makefile
+	# save copy of it now, because if we do it in do_install and 
+	# then call do_install twice we get Makefile.orig == Makefile.sysroot
+	install -m 0644 Makefile Makefile.sysroot
+
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+		LIB=${baselib} \
+		ARCH=${TARGET_ARCH} \
+		OPT="${CFLAGS}" libpython3.so
+
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+		LIB=${baselib} \
+		ARCH=${TARGET_ARCH} \
+		OPT="${CFLAGS}"
+}
+
+do_install() {
+	# make install needs the original Makefile, or otherwise the inclues would
+	# go to ${D}${STAGING...}/...
+	install -m 0644 Makefile.orig Makefile
+
+	install -d ${D}${libdir}/pkgconfig
+	install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config
+
+	# rerun the build once again with original makefile this time
+	# run install in a separate step to avoid compile/install race
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+		LIB=${baselib} \
+		ARCH=${TARGET_ARCH} \
+		DESTDIR=${D} LIBDIR=${libdir}
+	
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+		LIB=${baselib} \
+		ARCH=${TARGET_ARCH} \
+		DESTDIR=${D} LIBDIR=${libdir} install
+
+	# avoid conflict with 2to3 from Python 2
+	rm -f ${D}/${bindir}/2to3
+
+	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+	if [ -e ${WORKDIR}/sitecustomize.py ]; then
+		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+	fi
+
+	oe_multilib_header python${PYTHON_BINABI}/pyconfig.h
+}
+
+do_install_append_class-nativesdk () {
+	create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+}
+
+SSTATE_SCAN_FILES += "Makefile"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+	# copy back the old Makefile to fix target package
+	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
+	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
+		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+}
+
+require python-${PYTHON_MAJMIN}-manifest.inc
+
+# manual dependency additions
+RPROVIDES_${PN}-core = "${PN}"
+RRECOMMENDS_${PN}-core = "${PN}-readline"
+RRECOMMENDS_${PN}-crypt = "openssl"
+RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl"
+
+FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}"
+FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3"
+FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}"
+
+PACKAGES =+ "${PN}-pyvenv"
+FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv"
+
+# package libpython3
+PACKAGES =+ "libpython3 libpython3-staticdev"
+FILES_libpython3 = "${libdir}/libpython*.so.*"
+FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a"
+INSANE_SKIP_${PN}-dev += "dev-elf"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+RDEPENDS_${PN}-misc += "${PN}-core"
+RDEPENDS_${PN}-modules += "${PN}-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python_2.7.11.bb b/yocto-poky/meta/recipes-devtools/python/python_2.7.11.bb
new file mode 100644
index 0000000..606f153
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/python/python_2.7.11.bb
@@ -0,0 +1,173 @@
+require python.inc
+DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
+PR = "${INC_PR}"
+
+DISTRO_SRC_URI ?= "file://sitecustomize.py"
+DISTRO_SRC_URI_linuxstdbase = ""
+SRC_URI += "\
+  file://01-use-proper-tools-for-cross-build.patch \
+  file://03-fix-tkinter-detection.patch \
+  file://06-avoid_usr_lib_termcap_path_in_linking.patch \
+  ${DISTRO_SRC_URI} \
+  file://multilib.patch \
+  file://cgi_py.patch \
+  file://setup_py_skip_cross_import_check.patch \
+  file://add-md5module-support.patch \
+  file://host_include_contamination.patch \
+  file://fix_for_using_different_libdir.patch \
+  file://setuptweaks.patch \
+  file://check-if-target-is-64b-not-host.patch \
+  file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
+  file://avoid_warning_about_tkinter.patch \
+  file://avoid_warning_for_sunos_specific_module.patch \
+  file://python-2.7.3-remove-bsdb-rpath.patch \
+  file://fix-makefile-for-ptest.patch \
+  file://run-ptest \
+  file://parallel-makeinst-create-bindir.patch \
+  file://use_sysroot_ncurses_instead_of_host.patch \
+  file://avoid_parallel_make_races_on_pgen.patch \
+  file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
+"
+
+S = "${WORKDIR}/Python-${PV}"
+
+inherit autotools multilib_header python-dir pythonnative
+
+CONFIGUREOPTS += " --with-system-ffi "
+
+EXTRA_OECONF += "ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
+
+do_configure_append() {
+	rm -f ${S}/Makefile.orig
+        autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
+}
+
+do_compile() {
+        # regenerate platform specific files, because they depend on system headers
+        cd ${S}/Lib/plat-linux2
+        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
+                ${S}/Tools/scripts/h2py.py -i '(u_long)' \
+                ${STAGING_INCDIR}/dlfcn.h \
+                ${STAGING_INCDIR}/linux/cdrom.h \
+                ${STAGING_INCDIR}/netinet/in.h \
+                ${STAGING_INCDIR}/sys/types.h
+        sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
+        cd -
+
+	# remove any bogus LD_LIBRARY_PATH
+	sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
+
+	if [ ! -f Makefile.orig ]; then
+		install -m 0644 Makefile Makefile.orig
+	fi
+	sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
+		-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
+		-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
+		-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
+		-e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
+		-e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
+		-e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
+		Makefile
+	# save copy of it now, because if we do it in do_install and 
+	# then call do_install twice we get Makefile.orig == Makefile.sysroot
+	install -m 0644 Makefile Makefile.sysroot
+
+	export CROSS_COMPILE="${TARGET_PREFIX}"
+	export PYTHONBUILDDIR="${B}"
+
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+		OPT="${CFLAGS}"
+}
+
+do_install() {
+	# make install needs the original Makefile, or otherwise the inclues would
+	# go to ${D}${STAGING...}/...
+	install -m 0644 Makefile.orig Makefile
+
+	export CROSS_COMPILE="${TARGET_PREFIX}"
+	export PYTHONBUILDDIR="${B}"
+
+	# After swizzling the makefile, we need to run the build again.
+	# install can race with the build so we have to run this first, then install
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+		DESTDIR=${D} LIBDIR=${libdir}
+	
+	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
+		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
+		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
+		STAGING_LIBDIR=${STAGING_LIBDIR} \
+		STAGING_INCDIR=${STAGING_INCDIR} \
+		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
+		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
+		DESTDIR=${D} LIBDIR=${libdir} install
+
+	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+	if [ -e ${WORKDIR}/sitecustomize.py ]; then
+		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
+	fi
+
+	oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
+}
+
+do_install_append_class-nativesdk () {
+	create_wrapper ${D}${bindir}/python2.7 PYTHONHOME='${prefix}' TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
+}
+
+SSTATE_SCAN_FILES += "Makefile"
+PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
+
+py_package_preprocess () {
+	# copy back the old Makefile to fix target package
+	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
+
+	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
+	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
+		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
+		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
+}
+
+require python-${PYTHON_MAJMIN}-manifest.inc
+
+# manual dependency additions
+RPROVIDES_${PN}-core = "${PN}"
+RRECOMMENDS_${PN}-core = "${PN}-readline"
+RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
+RRECOMMENDS_${PN}-crypt = "openssl"
+
+# package libpython2
+PACKAGES =+ "lib${BPN}2"
+FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
+
+# catch all the rest (unsorted)
+PACKAGES += "${PN}-misc"
+FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
+RDEPENDS_${PN}-modules += "${PN}-misc"
+RDEPENDS_${PN}-ptest = "${PN}-modules"
+#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
+inherit ptest
+
+# This must come after inherit ptest for the override to take effect
+do_install_ptest() {
+	cp ${B}/Makefile ${D}${PTEST_PATH}
+	sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
+	 -e s:LIBDIR:${libdir}:g \
+	 -i ${D}${PTEST_PATH}/run-ptest
+}
+
+# catch manpage
+PACKAGES += "${PN}-man"
+FILES_${PN}-man = "${datadir}/man"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/python/python_2.7.9.bb b/yocto-poky/meta/recipes-devtools/python/python_2.7.9.bb
deleted file mode 100644
index f7e2f27..0000000
--- a/yocto-poky/meta/recipes-devtools/python/python_2.7.9.bb
+++ /dev/null
@@ -1,181 +0,0 @@
-require python.inc
-DEPENDS = "python-native libffi bzip2 db gdbm openssl readline sqlite3 zlib"
-PR = "${INC_PR}"
-
-DISTRO_SRC_URI ?= "file://sitecustomize.py"
-DISTRO_SRC_URI_linuxstdbase = ""
-SRC_URI += "\
-  file://01-use-proper-tools-for-cross-build.patch \
-  file://03-fix-tkinter-detection.patch \
-  file://06-avoid_usr_lib_termcap_path_in_linking.patch \
-  ${DISTRO_SRC_URI} \
-  file://multilib.patch \
-  file://cgi_py.patch \
-  file://setup_py_skip_cross_import_check.patch \
-  file://add-md5module-support.patch \
-  file://host_include_contamination.patch \
-  file://fix_for_using_different_libdir.patch \
-  file://setuptweaks.patch \
-  file://check-if-target-is-64b-not-host.patch \
-  file://search_db_h_in_inc_dirs_and_avoid_warning.patch \
-  file://avoid_warning_about_tkinter.patch \
-  file://avoid_warning_for_sunos_specific_module.patch \
-  file://python-2.7.3-remove-bsdb-rpath.patch \
-  file://fix-makefile-for-ptest.patch \
-  file://run-ptest \
-  file://parallel-makeinst-create-bindir.patch \
-  file://use_sysroot_ncurses_instead_of_host.patch \
-  file://avoid_parallel_make_races_on_pgen.patch \
-"
-
-S = "${WORKDIR}/Python-${PV}"
-
-inherit autotools multilib_header python-dir pythonnative
-
-CONFIGUREOPTS += " --with-system-ffi "
-
-# The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources
-#Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :(
-TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__"
-TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__"
-
-# The following is a hack until we drop ac_cv_sizeof_off_t from site files
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)} ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no"
-
-do_configure_append() {
-	rm -f ${S}/Makefile.orig
-        autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi
-}
-
-do_compile() {
-        # regenerate platform specific files, because they depend on system headers
-        cd ${S}/Lib/plat-linux2
-        include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python-native/python \
-                ${S}/Tools/scripts/h2py.py -i '(u_long)' \
-                ${STAGING_INCDIR}/dlfcn.h \
-                ${STAGING_INCDIR}/linux/cdrom.h \
-                ${STAGING_INCDIR}/netinet/in.h \
-                ${STAGING_INCDIR}/sys/types.h
-        sed -e 's,${STAGING_DIR_HOST},,g' -i *.py
-        cd -
-
-	# remove any bogus LD_LIBRARY_PATH
-	sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile
-
-	if [ ! -f Makefile.orig ]; then
-		install -m 0644 Makefile Makefile.orig
-	fi
-	sed -i -e 's#^LDFLAGS=.*#LDFLAGS=${LDFLAGS} -L. -L${STAGING_LIBDIR}#g' \
-		-e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \
-		-e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \
-		-e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \
-		-e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \
-		-e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \
-		-e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \
-		Makefile
-	# save copy of it now, because if we do it in do_install and 
-	# then call do_install twice we get Makefile.orig == Makefile.sysroot
-	install -m 0644 Makefile Makefile.sysroot
-
-	export CROSS_COMPILE="${TARGET_PREFIX}"
-	export PYTHONBUILDDIR="${B}"
-
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-		OPT="${CFLAGS}"
-}
-
-do_install() {
-	# make install needs the original Makefile, or otherwise the inclues would
-	# go to ${D}${STAGING...}/...
-	install -m 0644 Makefile.orig Makefile
-
-	export CROSS_COMPILE="${TARGET_PREFIX}"
-	export PYTHONBUILDDIR="${B}"
-
-	# After swizzling the makefile, we need to run the build again.
-	# install can race with the build so we have to run this first, then install
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
-		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-		DESTDIR=${D} LIBDIR=${libdir}
-	
-	oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python-native/pgen \
-		HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python-native/python \
-		CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ \
-		STAGING_LIBDIR=${STAGING_LIBDIR} \
-		STAGING_INCDIR=${STAGING_INCDIR} \
-		STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \
-		BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
-		DESTDIR=${D} LIBDIR=${libdir} install
-
-	install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
-	if [ -e ${WORKDIR}/sitecustomize.py ]; then
-		install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN}
-	fi
-
-	oe_multilib_header python${PYTHON_MAJMIN}/pyconfig.h
-}
-
-do_install_append_class-nativesdk () {
-	create_wrapper ${D}${bindir}/python2.7 TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo'
-}
-
-SSTATE_SCAN_FILES += "Makefile"
-PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess"
-
-py_package_preprocess () {
-	# copy back the old Makefile to fix target package
-	install -m 0644 ${B}/Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile
-
-	# Remove references to buildmachine paths in target Makefile and _sysconfigdata
-	sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile \
-		${PKGD}/${libdir}/python${PYTHON_MAJMIN}/_sysconfigdata.py
-}
-
-require python-${PYTHON_MAJMIN}-manifest.inc
-
-# manual dependency additions
-RPROVIDES_${PN}-core = "${PN}"
-RRECOMMENDS_${PN}-core = "${PN}-readline"
-RRECOMMENDS_${PN}-core_append_class-nativesdk = " nativesdk-python-modules"
-RRECOMMENDS_${PN}-crypt = "openssl"
-
-# package libpython2
-PACKAGES =+ "lib${BPN}2"
-FILES_lib${BPN}2 = "${libdir}/libpython*.so.*"
-
-# catch debug extensions (isn't that already in python-core-dbg?)
-FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug"
-
-# catch all the rest (unsorted)
-PACKAGES += "${PN}-misc"
-FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
-RDEPENDS_${PN}-modules += "${PN}-misc"
-RDEPENDS_${PN}-ptest = "${PN}-modules"
-#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
-inherit ptest
-
-# This must come after inherit ptest for the override to take effect
-do_install_ptest() {
-	cp ${B}/Makefile ${D}${PTEST_PATH}
-	sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
-	 -e s:LIBDIR:${libdir}:g \
-	 -i ${D}${PTEST_PATH}/run-ptest
-}
-
-# catch manpage
-PACKAGES += "${PN}-man"
-FILES_${PN}-man = "${datadir}/man"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu-targets.inc b/yocto-poky/meta/recipes-devtools/qemu/qemu-targets.inc
index 5c35655..a3e46a8 100644
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu-targets.inc
+++ b/yocto-poky/meta/recipes-devtools/qemu/qemu-targets.inc
@@ -7,7 +7,7 @@
     archs = d.getVar('QEMU_TARGETS', True).split()
     tos = d.getVar('HOST_OS', True)
     softmmuonly = ""
-    for arch in ['mips64', 'mips64el', 'ppcemb']:
+    for arch in ['ppcemb']:
         if arch in archs:
             softmmuonly += arch + "-softmmu,"
             archs.remove(arch)
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu.inc b/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
index b17da2f..269c898 100644
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
+++ b/yocto-poky/meta/recipes-devtools/qemu/qemu.inc
@@ -21,7 +21,6 @@
     file://wacom.patch \
     file://add-ptest-in-makefile.patch \
     file://run-ptest \
-    file://cpus.c-qemu_mutex_lock_iothread-fix-race-condition-a.patch \
     "
 
 SRC_URI_append_class-native = "\
@@ -111,17 +110,18 @@
 PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
 PACKAGECONFIG[xfs] = "--enable-xfsctl,--disable-xfsctl,xfsprogs,"
 PACKAGECONFIG[xen] = "--enable-xen,--disable-xen,xen,xen-libxenstore xen-libxenctrl xen-libxenguest"
-PACKAGECONFIG[vnc-tls] = "--enable-vnc --enable-vnc-tls,--disable-vnc-tls, gnutls,"
 PACKAGECONFIG[vnc-sasl] = "--enable-vnc --enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl,"
 PACKAGECONFIG[vnc-jpeg] = "--enable-vnc --enable-vnc-jpeg,--disable-vnc-jpeg,jpeg,"
 PACKAGECONFIG[vnc-png] = "--enable-vnc --enable-vnc-png,--disable-vnc-png,libpng,"
 PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,libcurl,"
-PACKAGECONFIG[nss] = "--enable-smartcard-nss,--disable-smartcard-nss,nss,"
+PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
 PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux,"
 PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
 PACKAGECONFIG[gtk+] = "--enable-gtk --enable-vte,--disable-gtk --disable-vte,gtk+ libvte,"
 PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
 PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,gcrypt,"
+PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle"
 PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
 PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
 PACKAGECONFIG[alsa] = ",,alsa-lib"
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_1.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_1.patch
deleted file mode 100644
index d7ae871..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_1.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From ce317461573bac12b10d67699b4ddf1f97cf066c Mon Sep 17 00:00:00 2001
-From: Jason Wang <jasowang@redhat.com>
-Date: Fri, 25 Sep 2015 13:21:28 +0800
-Subject: [PATCH] virtio: introduce virtqueue_unmap_sg()
-
-Factor out sg unmapping logic. This will be reused by the patch that
-can discard descriptor.
-
-Cc: Michael S. Tsirkin <mst@redhat.com>
-Cc: Andrew James <andrew.james@hpe.com>
-Signed-off-by: Jason Wang <jasowang@redhat.com>
-Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
-Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
-Upstream-Status: Backport
-
-git.qemu.org/?p=qemu.git;a=commit;h=ce317461573bac12b10d67699b4ddf1f97cf066c
-
-CVE: CVE-2015-7295 patch #1
-[Yocto # 9013]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- hw/virtio/virtio.c | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-Index: qemu-2.4.0/hw/virtio/virtio.c
-===================================================================
---- qemu-2.4.0.orig/hw/virtio/virtio.c
-+++ qemu-2.4.0/hw/virtio/virtio.c
-@@ -243,14 +243,12 @@ int virtio_queue_empty(VirtQueue *vq)
-     return vring_avail_idx(vq) == vq->last_avail_idx;
- }
- 
--void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
--                    unsigned int len, unsigned int idx)
-+static void virtqueue_unmap_sg(VirtQueue *vq, const VirtQueueElement *elem,
-+                               unsigned int len)
- {
-     unsigned int offset;
-     int i;
- 
--    trace_virtqueue_fill(vq, elem, len, idx);
--
-     offset = 0;
-     for (i = 0; i < elem->in_num; i++) {
-         size_t size = MIN(len - offset, elem->in_sg[i].iov_len);
-@@ -266,6 +264,14 @@ void virtqueue_fill(VirtQueue *vq, const
-         cpu_physical_memory_unmap(elem->out_sg[i].iov_base,
-                                   elem->out_sg[i].iov_len,
-                                   0, elem->out_sg[i].iov_len);
-+}
-+
-+void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
-+                    unsigned int len, unsigned int idx)
-+{
-+    trace_virtqueue_fill(vq, elem, len, idx);
-+
-+    virtqueue_unmap_sg(vq, elem, len);
- 
-     idx = (idx + vring_used_idx(vq)) % vq->vring.num;
- 
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_2.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_2.patch
deleted file mode 100644
index 45dfab3..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_2.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 29b9f5efd78ae0f9cc02dd169b6e80d2c404bade Mon Sep 17 00:00:00 2001
-From: Jason Wang <jasowang@redhat.com>
-Date: Fri, 25 Sep 2015 13:21:29 +0800
-Subject: [PATCH] virtio: introduce virtqueue_discard()
-
-This patch introduces virtqueue_discard() to discard a descriptor and
-unmap the sgs. This will be used by the patch that will discard
-descriptor when packet is truncated.
-
-Cc: Michael S. Tsirkin <mst@redhat.com>
-Signed-off-by: Jason Wang <jasowang@redhat.com>
-Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
-Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-Upstream-Status: Backport
-
-git.qemu.org/?p=qemu.git;a=commit;h=29b9f5efd78ae0f9cc02dd169b6e80d2c404bade
- 
-CVE: CVE-2015-7295 patch #2
-[Yocto # 9013]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- hw/virtio/virtio.c         | 7 +++++++
- include/hw/virtio/virtio.h | 2 ++
- 2 files changed, 9 insertions(+)
-
-Index: qemu-2.4.0/hw/virtio/virtio.c
-===================================================================
---- qemu-2.4.0.orig/hw/virtio/virtio.c
-+++ qemu-2.4.0/hw/virtio/virtio.c
-@@ -266,6 +266,13 @@ static void virtqueue_unmap_sg(VirtQueue
-                                   0, elem->out_sg[i].iov_len);
- }
- 
-+void virtqueue_discard(VirtQueue *vq, const VirtQueueElement *elem,
-+                       unsigned int len)
-+{
-+    vq->last_avail_idx--;
-+    virtqueue_unmap_sg(vq, elem, len);
-+}
-+
- void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
-                     unsigned int len, unsigned int idx)
- {
-Index: qemu-2.4.0/include/hw/virtio/virtio.h
-===================================================================
---- qemu-2.4.0.orig/include/hw/virtio/virtio.h
-+++ qemu-2.4.0/include/hw/virtio/virtio.h
-@@ -146,6 +146,8 @@ void virtio_del_queue(VirtIODevice *vdev
- void virtqueue_push(VirtQueue *vq, const VirtQueueElement *elem,
-                     unsigned int len);
- void virtqueue_flush(VirtQueue *vq, unsigned int count);
-+void virtqueue_discard(VirtQueue *vq, const VirtQueueElement *elem,
-+                       unsigned int len);
- void virtqueue_fill(VirtQueue *vq, const VirtQueueElement *elem,
-                     unsigned int len, unsigned int idx);
- 
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_3.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_3.patch
deleted file mode 100644
index 74442e3..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7295_3.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 0cf33fb6b49a19de32859e2cdc6021334f448fb3 Mon Sep 17 00:00:00 2001
-From: Jason Wang <jasowang@redhat.com>
-Date: Fri, 25 Sep 2015 13:21:30 +0800
-Subject: [PATCH] virtio-net: correctly drop truncated packets
-
-When packet is truncated during receiving, we drop the packets but
-neither discard the descriptor nor add and signal used
-descriptor. This will lead several issues:
-
-- sg mappings are leaked
-- rx will be stalled if a lots of packets were truncated
-
-In order to be consistent with vhost, fix by discarding the descriptor
-in this case.
-
-Cc: Michael S. Tsirkin <mst@redhat.com>
-Signed-off-by: Jason Wang <jasowang@redhat.com>
-Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
-Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-
-Upstream-Status: Backport
-
-git.qemu.org/?p=qemu.git;a=commit;h=0cf33fb6b49a19de32859e2cdc6021334f448fb3
-
-CVE: CVE-2015-7295 patch #3
-[Yocto # 9013]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- hw/net/virtio-net.c | 8 +-------
- 1 file changed, 1 insertion(+), 7 deletions(-)
-
-Index: qemu-2.4.0/hw/net/virtio-net.c
-===================================================================
---- qemu-2.4.0.orig/hw/net/virtio-net.c
-+++ qemu-2.4.0/hw/net/virtio-net.c
-@@ -1086,13 +1086,7 @@ static ssize_t virtio_net_receive(NetCli
-          * must have consumed the complete packet.
-          * Otherwise, drop it. */
-         if (!n->mergeable_rx_bufs && offset < size) {
--#if 0
--            error_report("virtio-net truncated non-mergeable packet: "
--                         "i %zd mergeable %d offset %zd, size %zd, "
--                         "guest hdr len %zd, host hdr len %zd",
--                         i, n->mergeable_rx_bufs,
--                         offset, size, n->guest_hdr_len, n->host_hdr_len);
--#endif
-+            virtqueue_discard(q->rx_vq, &elem, total);
-             return size;
-         }
- 
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7504.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7504.patch
deleted file mode 100644
index 90a7947..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7504.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 837f21aacf5a714c23ddaadbbc5212f9b661e3f7 Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Fri, 20 Nov 2015 11:50:31 +0530
-Subject: [PATCH] net: pcnet: add check to validate receive data
- size(CVE-2015-7504)
-
-In loopback mode, pcnet_receive routine appends CRC code to the
-receive buffer. If the data size given is same as the buffer size,
-the appended CRC code overwrites 4 bytes after s->buffer. Added a
-check to avoid that.
-
-Reported by: Qinghao Tang <luodalongde@gmail.com>
-Cc: qemu-stable@nongnu.org
-Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Signed-off-by: Jason Wang <jasowang@redhat.com>
-
-Upstream-Status: Backport
-
-http://git.qemu.org/?p=qemu.git;a=commit;h=837f21aacf5a714c23ddaadbbc5212f9b661e3f7
-
-CVE: CVE-2015-7504
-[Yocto # 9013]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- hw/net/pcnet.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-Index: qemu-2.4.0/hw/net/pcnet.c
-===================================================================
---- qemu-2.4.0.orig/hw/net/pcnet.c
-+++ qemu-2.4.0/hw/net/pcnet.c
-@@ -1085,7 +1085,7 @@ ssize_t pcnet_receive(NetClientState *nc
-                 uint32_t fcs = ~0;
-                 uint8_t *p = src;
- 
--                while (p != &src[size-4])
-+                while (p != &src[size])
-                     CRC(fcs, *p++);
-                 crc_err = (*(uint32_t *)p != htonl(fcs));
-             }
-@@ -1234,8 +1234,10 @@ static void pcnet_transmit(PCNetState *s
-         bcnt = 4096 - GET_FIELD(tmd.length, TMDL, BCNT);
- 
-         /* if multi-tmd packet outsizes s->buffer then skip it silently.
--           Note: this is not what real hw does */
--        if (s->xmit_pos + bcnt > sizeof(s->buffer)) {
-+         * Note: this is not what real hw does.
-+         * Last four bytes of s->buffer are used to store CRC FCS code.
-+         */
-+        if (s->xmit_pos + bcnt > sizeof(s->buffer) - 4) {
-             s->xmit_pos = -1;
-             goto txdone;
-         }
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7512.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7512.patch
deleted file mode 100644
index 50b8a6c..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-7512.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 8b98a2f07175d46c3f7217639bd5e03f2ec56343 Mon Sep 17 00:00:00 2001
-From: Jason Wang <jasowang@redhat.com>
-Date: Mon, 30 Nov 2015 15:00:06 +0800
-Subject: [PATCH] pcnet: fix rx buffer overflow(CVE-2015-7512)
-
-Backends could provide a packet whose length is greater than buffer
-size. Check for this and truncate the packet to avoid rx buffer
-overflow in this case.
-
-Cc: Prasad J Pandit <pjp@fedoraproject.org>
-Cc: qemu-stable@nongnu.org
-Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
-Signed-off-by: Jason Wang <jasowang@redhat.com>
-
-Upsteam_Status: Backport
-
-http://git.qemu.org/?p=qemu.git;a=commit;h=8b98a2f07175d46c3f7217639bd5e03f2ec56343
-
-CVE: CVE-2015-7512
-[Yocto # 9013]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- hw/net/pcnet.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-Index: qemu-2.4.0/hw/net/pcnet.c
-===================================================================
---- qemu-2.4.0.orig/hw/net/pcnet.c
-+++ qemu-2.4.0/hw/net/pcnet.c
-@@ -1065,6 +1065,12 @@ ssize_t pcnet_receive(NetClientState *nc
-             int pktcount = 0;
- 
-             if (!s->looptest) {
-+                if (size > 4092) {
-+#ifdef PCNET_DEBUG_RMD
-+                    fprintf(stderr, "pcnet: truncates rx packet.\n");
-+#endif
-+                    size = 4092;
-+                }
-                 memcpy(src, buf, size);
-                 /* no need to compute the CRC */
-                 src[size] = 0;
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-8345.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-8345.patch
deleted file mode 100644
index 310b458..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-8345.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 00837731d254908a841d69298a4f9f077babaf24 Mon Sep 17 00:00:00 2001
-From: Stefan Weil <sw@weilnetz.de>
-Date: Fri, 20 Nov 2015 08:42:33 +0100
-Subject: [PATCH] eepro100: Prevent two endless loops
-
-http://lists.nongnu.org/archive/html/qemu-devel/2015-11/msg04592.html
-shows an example how an endless loop in function action_command can
-be achieved.
-
-During my code review, I noticed a 2nd case which can result in an
-endless loop.
-
-Reported-by: Qinghao Tang <luodalongde@gmail.com>
-Signed-off-by: Stefan Weil <sw@weilnetz.de>
-Signed-off-by: Jason Wang <jasowang@redhat.com>
-
-Upstream-Status: Backport
-
-http://git.qemu.org/?p=qemu.git;a=commit;h=00837731d254908a841d69298a4f9f077babaf24
-
-CVE: CVE-2015-8345
-[Yocto # 9013]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- hw/net/eepro100.c | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
-index 60333b7..685a478 100644
---- a/hw/net/eepro100.c
-+++ b/hw/net/eepro100.c
-@@ -774,6 +774,11 @@ static void tx_command(EEPRO100State *s)
- #if 0
-         uint16_t tx_buffer_el = lduw_le_pci_dma(&s->dev, tbd_address + 6);
- #endif
-+        if (tx_buffer_size == 0) {
-+            /* Prevent an endless loop. */
-+            logout("loop in %s:%u\n", __FILE__, __LINE__);
-+            break;
-+        }
-         tbd_address += 8;
-         TRACE(RXTX, logout
-             ("TBD (simplified mode): buffer address 0x%08x, size 0x%04x\n",
-@@ -855,6 +860,10 @@ static void set_multicast_list(EEPRO100State *s)
- 
- static void action_command(EEPRO100State *s)
- {
-+    /* The loop below won't stop if it gets special handcrafted data.
-+       Therefore we limit the number of iterations. */
-+    unsigned max_loop_count = 16;
-+
-     for (;;) {
-         bool bit_el;
-         bool bit_s;
-@@ -870,6 +879,13 @@ static void action_command(EEPRO100State *s)
- #if 0
-         bool bit_sf = ((s->tx.command & COMMAND_SF) != 0);
- #endif
-+
-+        if (max_loop_count-- == 0) {
-+            /* Prevent an endless loop. */
-+            logout("loop in %s:%u\n", __FILE__, __LINE__);
-+            break;
-+        }
-+
-         s->cu_offset = s->tx.link;
-         TRACE(OTHER,
-               logout("val=(cu start), status=0x%04x, command=0x%04x, link=0x%08x\n",
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-8504.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-8504.patch
deleted file mode 100644
index 9e66021..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2015-8504.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3 Mon Sep 17 00:00:00 2001
-From: Prasad J Pandit <pjp@fedoraproject.org>
-Date: Thu, 3 Dec 2015 18:54:17 +0530
-Subject: [PATCH] ui: vnc: avoid floating point exception
-
-While sending 'SetPixelFormat' messages to a VNC server,
-the client could set the 'red-max', 'green-max' and 'blue-max'
-values to be zero. This leads to a floating point exception in
-write_png_palette while doing frame buffer updates.
-
-Reported-by: Lian Yihan <lianyihan@360.cn>
-Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
-Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
-Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-
-Upstream-Status: Backport
-
-http://git.qemu.org/?p=qemu.git;a=commitdiff;h=4c65fed8bdf96780735dbdb92a8
-
-CVE: CVE-2015-8504
-[Yocto # 9013]
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ui/vnc.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-Index: qemu-2.4.0/ui/vnc.c
-===================================================================
---- qemu-2.4.0.orig/ui/vnc.c
-+++ qemu-2.4.0/ui/vnc.c
-@@ -2189,15 +2189,15 @@ static void set_pixel_format(VncState *v
-         return;
-     }
- 
--    vs->client_pf.rmax = red_max;
-+    vs->client_pf.rmax = red_max ? red_max : 0xFF;
-     vs->client_pf.rbits = hweight_long(red_max);
-     vs->client_pf.rshift = red_shift;
-     vs->client_pf.rmask = red_max << red_shift;
--    vs->client_pf.gmax = green_max;
-+    vs->client_pf.gmax = green_max ? green_max : 0xFF;
-     vs->client_pf.gbits = hweight_long(green_max);
-     vs->client_pf.gshift = green_shift;
-     vs->client_pf.gmask = green_max << green_shift;
--    vs->client_pf.bmax = blue_max;
-+    vs->client_pf.bmax = blue_max ? blue_max : 0xFF;
-     vs->client_pf.bbits = hweight_long(blue_max);
-     vs->client_pf.bshift = blue_shift;
-     vs->client_pf.bmask = blue_max << blue_shift;
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-1568.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-1568.patch
index 9c40ffb..56fd346 100644
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-1568.patch
+++ b/yocto-poky/meta/recipes-devtools/qemu/qemu/CVE-2016-1568.patch
@@ -32,11 +32,11 @@
  hw/ide/ahci.c | 1 +
  1 file changed, 1 insertion(+)
 
-Index: qemu-2.4.0/hw/ide/ahci.c
+Index: qemu-2.5.0/hw/ide/ahci.c
 ===================================================================
---- qemu-2.4.0.orig/hw/ide/ahci.c
-+++ qemu-2.4.0/hw/ide/ahci.c
-@@ -898,6 +898,7 @@ static void ncq_err(NCQTransferState *nc
+--- qemu-2.5.0.orig/hw/ide/ahci.c
++++ qemu-2.5.0/hw/ide/ahci.c
+@@ -910,6 +910,7 @@ static void ncq_err(NCQTransferState *nc
      ide_state->error = ABRT_ERR;
      ide_state->status = READY_STAT | ERR_STAT;
      ncq_tfs->drive->port_regs.scr_err |= (1 << ncq_tfs->tag);
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_mutex_lock_iothread-fix-race-condition-a.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_mutex_lock_iothread-fix-race-condition-a.patch
deleted file mode 100644
index 45dffab..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/cpus.c-qemu_mutex_lock_iothread-fix-race-condition-a.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Upstream-Status: Submitted
-
-From f354b9333408d411854af058cc44cceda60b4473 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?An=C3=ADbal=20Lim=C3=B3n?= <anibal.limon@linux.intel.com>
-Date: Thu, 3 Sep 2015 14:07:34 -0500
-Subject: [PATCH] cpus.c: qemu_mutex_lock_iothread fix race condition at cpu
- thread init
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When QEMU starts the RCU thread executes qemu_mutex_lock_thread
-causing error "qemu:qemu_cpu_kick_thread: No such process" and exits.
-
-This isn't occur frequently but in glibc the thread id can exist and
-this not guarantee that the thread is on active/running state. If is
-inserted a sleep(1) after newthread assignment [1] the issue appears.
-
-So not make assumption that thread exist if first_cpu->thread is set
-then change the validation of cpu to created that is set into cpu
-threads (kvm, tcg, dummy).
-
-[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_create.c;h=d10f4ea8004e1d8f3a268b95cc0f8d93b8d89867;hb=HEAD#l621
-
-Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
----
- cpus.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/cpus.c b/cpus.c
-index 7e4786e..05e5400 100644
---- a/cpus.c
-+++ b/cpus.c
-@@ -1171,7 +1171,7 @@ void qemu_mutex_lock_iothread(void)
-      * TCG code execution.
-      */
-     if (!tcg_enabled() || qemu_in_vcpu_thread() ||
--        !first_cpu || !first_cpu->thread) {
-+        !first_cpu || !first_cpu->created) {
-         qemu_mutex_lock(&qemu_global_mutex);
-         atomic_dec(&iothread_requesting_mutex);
-     } else {
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/pathlimit.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/pathlimit.patch
new file mode 100644
index 0000000..57ab981
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/qemu/qemu/pathlimit.patch
@@ -0,0 +1,137 @@
+By default qemu builds a complete list of directories within the user
+emulation sysroot (-L option). The OE sysroot directory is large and
+this is confusing, for example it indexes all pkgdata. In particular this
+confuses strace of qemu binaries with tons of irrelevant paths.
+
+This patch stops the code indexing up front and instead only indexes
+things if/as/when it needs to. This drastically reduces the files it
+reads and reduces memory usage and cleans up strace.
+
+It would also avoid the infinite directory traversal bug in [YOCTO #6996]
+although the code could still be vulnerable if it parsed those specific 
+paths.
+
+RP
+2016/3/9
+Upstream-Status: Pending
+
+Index: qemu-2.5.0/util/path.c
+===================================================================
+--- qemu-2.5.0.orig/util/path.c
++++ qemu-2.5.0/util/path.c
+@@ -19,6 +19,7 @@ struct pathelem
+     char *name;
+     /* Full path name, eg. /usr/gnemul/x86-linux/lib. */
+     char *pathname;
++    int populated_entries;
+     struct pathelem *parent;
+     /* Children */
+     unsigned int num_entries;
+@@ -49,6 +50,7 @@ static struct pathelem *new_entry(const
+     new->name = g_strdup(name);
+     new->pathname = g_strdup_printf("%s/%s", root, name);
+     new->num_entries = 0;
++    new->populated_entries = 0;
+     return new;
+ }
+ 
+@@ -57,15 +59,16 @@ static struct pathelem *new_entry(const
+ /* Not all systems provide this feature */
+ #if defined(DT_DIR) && defined(DT_UNKNOWN) && defined(DT_LNK)
+ # define dirent_type(dirent) ((dirent)->d_type)
+-# define is_dir_maybe(type) \
+-    ((type) == DT_DIR || (type) == DT_UNKNOWN || (type) == DT_LNK)
++# define is_not_dir(type) \
++    ((type) != DT_DIR && (type) != DT_UNKNOWN && (type) != DT_LNK)
+ #else
+ # define dirent_type(dirent) (1)
+-# define is_dir_maybe(type)  (type)
++# define is_not_dir(type)  (0)
+ #endif
+ 
+ static struct pathelem *add_dir_maybe(struct pathelem *path)
+ {
++    unsigned int i;
+     DIR *dir;
+ 
+     if ((dir = opendir(path->pathname)) != NULL) {
+@@ -78,6 +81,11 @@ static struct pathelem *add_dir_maybe(st
+         }
+         closedir(dir);
+     }
++
++    for (i = 0; i < path->num_entries; i++)
++        (path->entries[i])->parent = path;
++
++    path->populated_entries = 1;
+     return path;
+ }
+ 
+@@ -93,26 +101,16 @@ static struct pathelem *add_entry(struct
+     e = &root->entries[root->num_entries-1];
+ 
+     *e = new_entry(root->pathname, root, name);
+-    if (is_dir_maybe(type)) {
+-        *e = add_dir_maybe(*e);
++    if (is_not_dir(type)) {
++        (*e)->populated_entries = 1;
+     }
+ 
+     return root;
+ }
+ 
+-/* This needs to be done after tree is stabilized (ie. no more reallocs!). */
+-static void set_parents(struct pathelem *child, struct pathelem *parent)
+-{
+-    unsigned int i;
+-
+-    child->parent = parent;
+-    for (i = 0; i < child->num_entries; i++)
+-        set_parents(child->entries[i], child);
+-}
+-
+ /* FIXME: Doesn't handle DIR/.. where DIR is not in emulated dir. */
+ static const char *
+-follow_path(const struct pathelem *cursor, const char *name)
++follow_path(struct pathelem *cursor, struct pathelem **source, const char *name)
+ {
+     unsigned int i, namelen;
+ 
+@@ -123,14 +121,18 @@ follow_path(const struct pathelem *curso
+         return cursor->pathname;
+ 
+     if (strneq(name, namelen, ".."))
+-        return follow_path(cursor->parent, name + namelen);
++        return follow_path(cursor->parent, &cursor->parent, name + namelen);
+ 
+     if (strneq(name, namelen, "."))
+-        return follow_path(cursor, name + namelen);
++        return follow_path(cursor, source, name + namelen);
++
++    if (!cursor->populated_entries)
++        *source = add_dir_maybe(cursor);
++        cursor = *source;
+ 
+     for (i = 0; i < cursor->num_entries; i++)
+         if (strneq(name, namelen, cursor->entries[i]->name))
+-            return follow_path(cursor->entries[i], name + namelen);
++            return follow_path(cursor->entries[i], &cursor->entries[i], name + namelen);
+ 
+     /* Not found */
+     return NULL;
+@@ -164,8 +166,6 @@ void init_paths(const char *prefix)
+         g_free(base->name);
+         g_free(base);
+         base = NULL;
+-    } else {
+-        set_parents(base, base);
+     }
+ }
+ 
+@@ -177,5 +177,5 @@ const char *path(const char *name)
+     if (!base || !name || name[0] != '/')
+         return name;
+ 
+-    return follow_path(base, name) ?: name;
++    return follow_path(base, &base, name) ?: name;
+ }
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix.patch
deleted file mode 100644
index e37e777..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-The smc91c111.c driver appears to have several issues. The can_receive()
-function can return that the driver is ready when rx_fifo has not been 
-freed yet. There is also no sanity check of rx_fifo() in _receive() which
-can lead to corruption of the rx_fifo array.
-
-release_packet() can also call qemu_flush_queued_packets() before rx_fifo 
-has been cleaned up, resulting in cases where packets are submitted
-for which there is not yet any space.
-
-This patch therefore:
-
-* fixes the logic in can_receive()
-* adds logic to receive() as a sanity check
-* moves the flush() calls to the correct places where data is ready
-  to be received
-
-Upstream-Status: Pending [discussion in progress on mailing list]
-RP 2015/9/7
-
-Index: qemu-2.4.0/hw/net/smc91c111.c
-===================================================================
---- qemu-2.4.0.orig/hw/net/smc91c111.c
-+++ qemu-2.4.0/hw/net/smc91c111.c
-@@ -185,7 +185,6 @@ static void smc91c111_release_packet(smc
-     s->allocated &= ~(1 << packet);
-     if (s->tx_alloc == 0x80)
-         smc91c111_tx_alloc(s);
--    qemu_flush_queued_packets(qemu_get_queue(s->nic));
- }
- 
- /* Flush the TX FIFO.  */
-@@ -237,9 +236,11 @@ static void smc91c111_do_tx(smc91c111_st
-             }
-         }
- #endif
--        if (s->ctr & CTR_AUTO_RELEASE)
-+        if (s->ctr & CTR_AUTO_RELEASE) {
-             /* Race?  */
-             smc91c111_release_packet(s, packetnum);
-+            qemu_flush_queued_packets(qemu_get_queue(s->nic));
-+        }
-         else if (s->tx_fifo_done_len < NUM_PACKETS)
-             s->tx_fifo_done[s->tx_fifo_done_len++] = packetnum;
-         qemu_send_packet(qemu_get_queue(s->nic), p, len);
-@@ -379,9 +380,11 @@ static void smc91c111_writeb(void *opaqu
-                     smc91c111_release_packet(s, s->rx_fifo[0]);
-                 }
-                 smc91c111_pop_rx_fifo(s);
-+                qemu_flush_queued_packets(qemu_get_queue(s->nic));
-                 break;
-             case 5: /* Release.  */
-                 smc91c111_release_packet(s, s->packet_num);
-+                qemu_flush_queued_packets(qemu_get_queue(s->nic));
-                 break;
-             case 6: /* Add to TX FIFO.  */
-                 smc91c111_queue_tx(s, s->packet_num);
-@@ -642,7 +642,7 @@ static int smc91c111_can_receive(NetClie
- 
-     if ((s->rcr & RCR_RXEN) == 0 || (s->rcr & RCR_SOFT_RST))
-         return 1;
--    if (s->allocated == (1 << NUM_PACKETS) - 1)
-+    if ((s->allocated == (1 << NUM_PACKETS) - 1) || (s->rx_fifo_len == NUM_PACKETS))
-         return 0;
-     return 1;
- }
-@@ -671,6 +671,8 @@ static ssize_t smc91c111_receive(NetClie
-     /* TODO: Flag overrun and receive errors.  */
-     if (packetsize > 2048)
-         return -1;
-+    if  (s->rx_fifo_len == NUM_PACKETS)
-+        return -1;    
-     packetnum = smc91c111_allocate_packet(s);
-     if (packetnum == 0x80)
-         return -1;
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix1.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix1.patch
deleted file mode 100644
index bd1223a..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix1.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
-Subject: [RFT PATCH v1 1/3] net: smc91c111: guard flush_queued_packets() on
- can_rx()
-Date: Thu, 10 Sep 2015 21:23:43 -0700
-
-Check that the core can once again receive packets before asking the
-net layer to do a flush. This will make it more convenient to flush
-packets when adding new conditions to can_receive.
-
-Add missing if braces while moving the can_receive() core code.
-
-Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
-
-Upstream-Status: Submitted
-
----
-
- hw/net/smc91c111.c | 30 ++++++++++++++++++++++--------
- 1 file changed, 22 insertions(+), 8 deletions(-)
-
-Index: qemu-2.4.0/hw/net/smc91c111.c
-===================================================================
---- qemu-2.4.0.orig/hw/net/smc91c111.c
-+++ qemu-2.4.0/hw/net/smc91c111.c
-@@ -124,6 +124,24 @@ static void smc91c111_update(smc91c111_s
-     qemu_set_irq(s->irq, level);
- }
- 
-+static int smc91c111_can_receive(smc91c111_state *s)
-+{
-+    if ((s->rcr & RCR_RXEN) == 0 || (s->rcr & RCR_SOFT_RST)) {
-+        return 1;
-+    }
-+    if (s->allocated == (1 << NUM_PACKETS) - 1) {
-+        return 0;
-+    }
-+    return 1;
-+}
-+
-+static inline void smc91c111_flush_queued_packets(smc91c111_state *s)
-+{
-+    if (smc91c111_can_receive(s)) {
-+        qemu_flush_queued_packets(qemu_get_queue(s->nic));
-+    }
-+}
-+
- /* Try to allocate a packet.  Returns 0x80 on failure.  */
- static int smc91c111_allocate_packet(smc91c111_state *s)
- {
-@@ -185,7 +203,7 @@ static void smc91c111_release_packet(smc
-     s->allocated &= ~(1 << packet);
-     if (s->tx_alloc == 0x80)
-         smc91c111_tx_alloc(s);
--    qemu_flush_queued_packets(qemu_get_queue(s->nic));
-+    smc91c111_flush_queued_packets(s);
- }
- 
- /* Flush the TX FIFO.  */
-@@ -636,15 +654,11 @@ static uint32_t smc91c111_readl(void *op
-     return val;
- }
- 
--static int smc91c111_can_receive(NetClientState *nc)
-+static int smc91c111_can_receive_nc(NetClientState *nc)
- {
-     smc91c111_state *s = qemu_get_nic_opaque(nc);
- 
--    if ((s->rcr & RCR_RXEN) == 0 || (s->rcr & RCR_SOFT_RST))
--        return 1;
--    if (s->allocated == (1 << NUM_PACKETS) - 1)
--        return 0;
--    return 1;
-+    return smc91c111_can_receive(s);
- }
- 
- static ssize_t smc91c111_receive(NetClientState *nc, const uint8_t *buf, size_t size)
-@@ -739,7 +753,7 @@ static const MemoryRegionOps smc91c111_m
- static NetClientInfo net_smc91c111_info = {
-     .type = NET_CLIENT_OPTIONS_KIND_NIC,
-     .size = sizeof(NICState),
--    .can_receive = smc91c111_can_receive,
-+    .can_receive = smc91c111_can_receive_nc,
-     .receive = smc91c111_receive,
- };
- 
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix2.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix2.patch
deleted file mode 100644
index 018aed5..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix2.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
-X-Google-Original-From: Peter Crosthwaite <crosthwaite.peter@gmail.com>
-To: qemu-devel@nongnu.org
-Cc: peter.maydell@linaro.org, richard.purdie@linuxfoundation.org
-Subject: [RFT PATCH v1 2/3] net: smc91c111: gate can_receive() on rx FIFO
- having a slot
-Date: Thu, 10 Sep 2015 21:23:57 -0700
-
-Return false from can_receive() when the FIFO doesn't have a free RX
-slot. This fixes a bug in the current code where the allocated buffer
-is freed before the fifo pop, triggering a premature flush of queued RX
-packets. It also will handle a corner case, where the guest manually
-frees the allocated buffer before popping the rx FIFO (hence it is not
-enough to just delay the flush_queued_packets()).
-
-Reported-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
-
-Upstream-Status: Submitted
----
-
- hw/net/smc91c111.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-Index: qemu-2.4.0/hw/net/smc91c111.c
-===================================================================
---- qemu-2.4.0.orig/hw/net/smc91c111.c
-+++ qemu-2.4.0/hw/net/smc91c111.c
-@@ -129,7 +129,8 @@ static int smc91c111_can_receive(smc91c1
-     if ((s->rcr & RCR_RXEN) == 0 || (s->rcr & RCR_SOFT_RST)) {
-         return 1;
-     }
--    if (s->allocated == (1 << NUM_PACKETS) - 1) {
-+    if (s->allocated == (1 << NUM_PACKETS) - 1 ||
-+        s->rx_fifo_len == NUM_PACKETS) {
-         return 0;
-     }
-     return 1;
-@@ -182,6 +183,7 @@ static void smc91c111_pop_rx_fifo(smc91c
-     } else {
-         s->int_level &= ~INT_RCV;
-     }
-+    smc91c111_flush_queued_packets(s);
-     smc91c111_update(s);
- }
- 
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix3.patch b/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix3.patch
deleted file mode 100644
index 9e865f7..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu/smc91c111_fix3.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
-To: qemu-devel@nongnu.org
-Cc: peter.maydell@linaro.org, richard.purdie@linuxfoundation.org
-Subject: [RFT PATCH v1 3/3] net: smc91c111: flush packets on RCR register
- changes
-Date: Thu, 10 Sep 2015 21:24:12 -0700
-
-The SOFT_RST or RXEN in the control register can be used as a condition
-to unblock the net layer via can_receive(). So check for possible
-flushes on RCR changes. This will drop all pending packets on soft
-reset or disable which is the functional intent of the can_receive()
-logic.
-
-Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
-
-Upstream-Status: Submitted
----
-
- hw/net/smc91c111.c | 1 +
- 1 file changed, 1 insertion(+)
-
-Index: qemu-2.4.0/hw/net/smc91c111.c
-===================================================================
---- qemu-2.4.0.orig/hw/net/smc91c111.c
-+++ qemu-2.4.0/hw/net/smc91c111.c
-@@ -331,6 +331,7 @@ static void smc91c111_writeb(void *opaqu
-             if (s->rcr & RCR_SOFT_RST) {
-                 smc91c111_reset(DEVICE(s));
-             }
-+            smc91c111_flush_queued_packets(s);
-             return;
-         case 10: case 11: /* RPCR */
-             /* Ignored */
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu_2.4.0.bb b/yocto-poky/meta/recipes-devtools/qemu/qemu_2.4.0.bb
deleted file mode 100644
index 8d47b16..0000000
--- a/yocto-poky/meta/recipes-devtools/qemu/qemu_2.4.0.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-require qemu.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
-                    file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
-
-SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
-            file://qemu-enlarge-env-entry-size.patch \
-            file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
-            file://smc91c111_fix1.patch \
-            file://smc91c111_fix2.patch \
-            file://smc91c111_fix3.patch \
-            file://no-valgrind.patch \
-            file://CVE-2015-8504.patch \
-            file://CVE-2015-7504.patch \
-            file://CVE-2015-7512.patch \
-            file://CVE-2015-8345.patch \
-            file://CVE-2016-1568.patch \
-            file://CVE-2015-7295_1.patch \
-            file://CVE-2015-7295_2.patch \
-            file://CVE-2015-7295_3.patch \
-            file://CVE-2016-2197.patch \
-            file://CVE-2016-2198.patch \
-           "
-SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
-SRC_URI[md5sum] = "186ee8194140a484a455f8e3c74589f4"
-SRC_URI[sha256sum] = "72b0b991bbcc540663a019e1e8c4f714053b691dda32c9b9ee80b25f367e6620"
-
-COMPATIBLE_HOST_class-target_mips64 = "null"
-
-do_install_append() {
-    # Prevent QA warnings about installed ${localstatedir}/run
-    if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
-}
diff --git a/yocto-poky/meta/recipes-devtools/qemu/qemu_2.5.0.bb b/yocto-poky/meta/recipes-devtools/qemu/qemu_2.5.0.bb
new file mode 100644
index 0000000..e9d9a8d
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/qemu/qemu_2.5.0.bb
@@ -0,0 +1,24 @@
+require qemu.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
+                    file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
+
+SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
+            file://qemu-enlarge-env-entry-size.patch \
+            file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
+            file://no-valgrind.patch \
+            file://CVE-2016-1568.patch \
+            file://CVE-2016-2197.patch \
+            file://CVE-2016-2198.patch \
+            file://pathlimit.patch \
+           "
+SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"
+SRC_URI[md5sum] = "f469f2330bbe76e3e39db10e9ac4f8db"
+SRC_URI[sha256sum] = "3443887401619fe33bfa5d900a4f2d6a79425ae2b7e43d5b8c36eb7a683772d4"
+
+COMPATIBLE_HOST_class-target_mips64 = "null"
+
+do_install_append() {
+    # Prevent QA warnings about installed ${localstatedir}/run
+    if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
+}
diff --git a/yocto-poky/meta/recipes-devtools/quilt/quilt.inc b/yocto-poky/meta/recipes-devtools/quilt/quilt.inc
index 837b36b..4e393c4 100644
--- a/yocto-poky/meta/recipes-devtools/quilt/quilt.inc
+++ b/yocto-poky/meta/recipes-devtools/quilt/quilt.inc
@@ -8,6 +8,7 @@
         file://install.patch \
         file://run-ptest \
         file://Makefile \
+	file://test.sh \
 "
 
 SRC_URI[md5sum] = "fc0310db5868a0873d602d4332a76d43"
@@ -50,8 +51,9 @@
 	tar -cf - bin/ --exclude \*.in | ( cd ${D}${PTEST_PATH} && tar -xf - )
 	tar -cf - compat/ --exclude \*.in | ( cd ${D}${PTEST_PATH} && tar -xf - )
 	tar -cf - quilt/ --exclude \*.in | ( cd ${D}${PTEST_PATH} && tar -xf - )
-	tar -cf - test/ --exclude mail.test --exclude delete.test | ( cd ${D}${PTEST_PATH} && tar -xf - )
+	tar -cf - test/ --exclude mail.test --exclude delete.test | ( cd ${D}${PTEST_PATH} && tar -xf - && chmod 777 test)
 	cp ${WORKDIR}/Makefile ${D}${PTEST_PATH}
+	cp ${WORKDIR}/test.sh ${D}${PTEST_PATH}
 }
 
 RDEPENDS_${PN}-ptest = "make file sed gawk diffutils findutils ed perl \
diff --git a/yocto-poky/meta/recipes-devtools/quilt/quilt/run-ptest b/yocto-poky/meta/recipes-devtools/quilt/quilt/run-ptest
index 958a9df..4b808ae 100755
--- a/yocto-poky/meta/recipes-devtools/quilt/quilt/run-ptest
+++ b/yocto-poky/meta/recipes-devtools/quilt/quilt/run-ptest
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+THIS_SH=/bin/sh
 ln -sf /bin/ed /usr/bin/ed
-for i in `ls test/*.test |awk -F. '{print $1}' |awk -F/ '{print $2}'`; do make check-$i; if [ $? -eq 0 ]; then echo PASS: $i.test; else echo FAIL: $i.test; fi; done
+/usr/sbin/adduser --disabled-password quilttest
+su -c "${THIS_SH} ./test.sh" quilttest
+/usr/sbin/deluser quilttest
 rm -f /usr/bin/ed
diff --git a/yocto-poky/meta/recipes-devtools/quilt/quilt/test.sh b/yocto-poky/meta/recipes-devtools/quilt/quilt/test.sh
new file mode 100755
index 0000000..6563e4a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/quilt/quilt/test.sh
@@ -0,0 +1 @@
+for i in `ls test/*.test |awk -F. '{print $1}' |awk -F/ '{print $2}'`; do make check-$i; if [ $? -eq 0 ]; then echo PASS: $i.test; else echo FAIL: $i.test; fi; done
diff --git a/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb b/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb
index c61913d..8eab7e3 100644
--- a/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb
+++ b/yocto-poky/meta/recipes-devtools/remake/remake_4.1+dbg-1.1.bb
@@ -4,6 +4,7 @@
                     file://glob/COPYING.LIB;md5=4a770b67e6be0f60da244beb2de0fce4"
 require remake.inc
 
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+)\+dbg.+)"
 SRC_URI += "file://version-remake.texi.patch \
            "
 SRCREV = "cf54641d50a0165bb17622b3e9770f426ccbc561"
@@ -14,7 +15,7 @@
 # By default only "gettext-minimal-native" is added
 # when inherit gettext.
 DEPENDS_class-native += "gettext-native"
-PROVIDES += "make"
+PROVIDES += "virtual/make"
 
 do_configure_prepend() {
     # remove the default LINGUAS since we are not going to generate languages
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch
deleted file mode 100644
index b877870..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/add_RPMSENSE_MISSINGOK_to_rpmmodule.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Upstream-Status: Inappropriate [OE-Specific]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org> 
-
-diff --git a/python/rpmmodule.c b/python/rpmmodule.c
-index a4fe217..728c66c 100644
---- a/python/rpmmodule.c
-+++ b/python/rpmmodule.c
-@@ -396,6 +396,10 @@ static int initModule(PyObject *m)
-     REGISTER_ENUM(RPMSENSE_STRONG);
-     REGISTER_ENUM(RPMSENSE_CONFIG);
- 
-+#if defined(RPM_VENDOR_OE)
-+    REGISTER_ENUM(RPMSENSE_MISSINGOK);
-+#endif
-+
-     REGISTER_ENUM(RPMTRANS_FLAG_TEST);
-     REGISTER_ENUM(RPMTRANS_FLAG_BUILD_PROBS);
-     REGISTER_ENUM(RPMTRANS_FLAG_NOSCRIPTS);
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch
deleted file mode 100644
index 7a646de..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/disable_shortcircuited.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
-
-
-Index: rpm-4.11.2/build/pack.c
-===================================================================
---- rpm-4.11.2.orig/build/pack.c
-+++ rpm-4.11.2/build/pack.c
-@@ -571,9 +571,9 @@ rpmRC packageBinaries(rpmSpec spec, cons
- 	    headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
- 	}
- 
--	if (cheating) {
--	    (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
--	}
-+//	if (cheating) {
-+//	    (void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
-+//	}
- 	
- 	{   char *binFormat = rpmGetPath("%{_rpmfilename}", NULL);
- 	    char *binRpm, *binDir;
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch
deleted file mode 100644
index be0626c..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/fix_libdir.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Inappropriate [OE-Core specific]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
-
-
-diff --git a/installplatform b/installplatform
-index 8c3eba0..fa15e91 100755
---- a/installplatform
-+++ b/installplatform
-@@ -112,7 +112,7 @@ for ARCH in noarch `grep ^arch_canon $RPMRC | cut -d: -f2`; do
-   [ -z "$CANONARCH" ] && continue
- 
-   if [ "$OS" = "linux" ] && [ "$CANONCOLOR" = 3 ]; then
--      LIB=${LIB}64
-+      LIB=${LIB}
-   fi
- 
-   PPD="${DESTDIR}/${platformdir}/${ARCH}-${OS}"
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh
deleted file mode 100755
index 083b174..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/pythondeps.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-[ $# -ge 1 ] || {
-    cat > /dev/null
-    exit 0
-}
-
-case $1 in
--R|--requires)
-    shift
-    grep "/usr/\(lib[^/]*\|share\)/python[^/]*/" >/dev/null && echo "python"
-    exit 0
-    ;;
-esac
-
-exit 0
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch
deleted file mode 100644
index 2640e54..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-db3-from-configure.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Disable configuring the db3 directory since we will be using the
-external DB provided as part of OE-Core already, no need to have
-duplicate database code.
-
-Upstream-Status: Inappropriate [OE-Core Specific]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: rpm-4.11.2/configure.ac
-===================================================================
---- rpm-4.11.2.orig/configure.ac
-+++ rpm-4.11.2/configure.ac
-@@ -825,9 +825,9 @@ AC_SUBST(RPMCONFIGDIR)
- 
- AC_SUBST(OBJDUMP)
- 
--if test "$with_external_db" = no; then
--    AC_CONFIG_SUBDIRS(db3)
--fi
-+#if test "$with_external_db" = no; then
-+#    AC_CONFIG_SUBDIRS(db3)
-+#fi
- 
- AM_CONDITIONAL([WITH_INTERNAL_DB],[test "$with_external_db" = no])
- AM_CONDITIONAL([DOXYGEN],[test "$DOXYGEN" != no])
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch
deleted file mode 100644
index f1ecab7..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/remove-dir-check.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
-
-
-Index: rpm-4.11.2/build/files.c
-===================================================================
---- rpm-4.11.2.orig/build/files.c
-+++ rpm-4.11.2/build/files.c
-@@ -1321,12 +1321,6 @@ static rpmRC addFile(FileList fl, const
- 	}
-     }
- 
--    /* Error out when a non-directory is specified as one in spec */
--    if (fl->cur.isDir && (statp == &statbuf) && !S_ISDIR(statp->st_mode)) {
--	rpmlog(RPMLOG_ERR, _("Not a directory: %s\n"), diskPath);
--	goto exit;
--    }
--
-     /* Don't recurse into explicit %dir, don't double-recurse from fts */
-     if ((fl->cur.isDir != 1) && (statp == &statbuf) && S_ISDIR(statp->st_mode)) {
- 	return recurseDir(fl, diskPath);
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch
deleted file mode 100644
index 9333dea..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/rpm-scriptetexechelp.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-Upstream-Status: Inappropriate [OE-Core]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
-
-
-Index: rpm-4.11.2/lib/psm.c
-===================================================================
---- rpm-4.11.2.orig/lib/psm.c
-+++ rpm-4.11.2/lib/psm.c
-@@ -421,7 +421,8 @@ static rpmRC runScript(rpmpsm psm, ARGV_
- 
-     rpmswEnter(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0);
-     rc = rpmScriptRun(script, arg1, arg2, sfd,
--		      prefixes, warn_only, selinux);
-+		      prefixes, warn_only, selinux, rpmtsRootDir(psm->ts) );
-+
-     rpmswExit(rpmtsOp(psm->ts, RPMTS_OP_SCRIPTLETS), 0);
- 
-     /* Map warn-only errors to "notfound" for script stop callback */
-@@ -958,15 +959,49 @@ static rpmRC rpmpsmStage(rpmpsm psm, pkg
-     case PSM_DESTROY:
- 	break;
-     case PSM_SCRIPT:	/* Run current package scriptlets. */
-+#ifdef RPM_VENDOR_OE
-+        {
-+        const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+	if (scriptletWrapper && *scriptletWrapper)
-+	     (void) rpmChrootOut();
-+#endif
-+
- 	rc = runInstScript(psm);
-+#ifdef RPM_VENDOR_OE
-+	if (scriptletWrapper && *scriptletWrapper)
-+	     (void) rpmChrootIn();
-+        }
-+#endif
- 	break;
-     case PSM_TRIGGERS:
- 	/* Run triggers in other package(s) this package sets off. */
-+#ifdef RPM_VENDOR_OE
-+        {
-+        const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+	if (scriptletWrapper && *scriptletWrapper)
-+	     (void) rpmChrootOut();
-+#endif
- 	rc = runTriggers(psm);
-+#ifdef RPM_VENDOR_OE
-+	if (scriptletWrapper && *scriptletWrapper)
-+	     (void) rpmChrootIn();
-+        }
-+#endif
- 	break;
-     case PSM_IMMED_TRIGGERS:
- 	/* Run triggers in this package other package(s) set off. */
-+#ifdef RPM_VENDOR_OE
-+	{
-+            const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+	    if (scriptletWrapper && *scriptletWrapper)
-+	     (void) rpmChrootOut();
-+#endif
- 	rc = runImmedTriggers(psm);
-+#ifdef RPM_VENDOR_OE
-+	    if (scriptletWrapper && *scriptletWrapper)
-+	     (void) rpmChrootIn();
-+	}
-+#endif
- 	break;
- 
-     case PSM_RPMDB_ADD: {
-Index: rpm-4.11.2/lib/rpmscript.c
-===================================================================
---- rpm-4.11.2.orig/lib/rpmscript.c
-+++ rpm-4.11.2/lib/rpmscript.c
-@@ -92,7 +92,7 @@ static rpmRC runLuaScript(int selinux, A
- static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
- 
- static void doScriptExec(int selinux, ARGV_const_t argv, ARGV_const_t prefixes,
--			FD_t scriptFd, FD_t out)
-+			FD_t scriptFd, FD_t out, char * rootDir )
- {
-     int pipes[2];
-     int flag;
-@@ -158,13 +158,12 @@ static void doScriptExec(int selinux, AR
- 	    setenv("RPM_INSTALL_PREFIX", *pf, 1);
- 	}
-     }
--	
--    if (chdir("/") == 0) {
-+    if (chdir(rootDir) == 0) {
- 	/* XXX Don't mtrace into children. */
- 	unsetenv("MALLOC_CHECK_");
- 
- 	/* Permit libselinux to do the scriptlet exec. */
--	if (selinux == 1) {	
-+	if (selinux == 1) {
- 	    xx = rpm_execcon(0, argv[0], argv, environ);
- 	}
- 
-@@ -175,12 +174,12 @@ static void doScriptExec(int selinux, AR
-     _exit(127); /* exit 127 for compatibility with bash(1) */
- }
- 
--static char * writeScript(const char *cmd, const char *script)
-+static char * writeScript(const char *cmd, const char *script, char * rootDir)
- {
-     char *fn = NULL;
-     size_t slen = strlen(script);
-     int ok = 0;
--    FD_t fd = rpmMkTempFile("/", &fn);
-+    FD_t fd = rpmMkTempFile(rootDir, &fn);
- 
-     if (Ferror(fd))
- 	goto exit;
-@@ -204,7 +203,7 @@ exit:
-  */
- static rpmRC runExtScript(int selinux, ARGV_const_t prefixes,
- 		   const char *sname, rpmlogLvl lvl, FD_t scriptFd,
--		   ARGV_t * argvp, const char *script, int arg1, int arg2)
-+		   ARGV_t * argvp, const char *script, int arg1, int arg2,char * rootDir)
- {
-     FD_t out = NULL;
-     char * fn = NULL;
-@@ -215,7 +214,7 @@ static rpmRC runExtScript(int selinux, A
-     rpmlog(RPMLOG_DEBUG, "%s: scriptlet start\n", sname);
- 
-     if (script) {
--	fn = writeScript(*argvp[0], script);
-+	fn = writeScript(*argvp[0], script, rootDir);
- 	if (fn == NULL) {
- 	    rpmlog(RPMLOG_ERR,
- 		   _("Couldn't create temporary file for %s: %s\n"),
-@@ -258,7 +257,7 @@ static rpmRC runExtScript(int selinux, A
-     } else if (pid == 0) {/* Child */
- 	rpmlog(RPMLOG_DEBUG, "%s: execv(%s) pid %d\n",
- 	       sname, *argvp[0], (unsigned)getpid());
--	doScriptExec(selinux, *argvp, prefixes, scriptFd, out);
-+	doScriptExec(selinux, *argvp, prefixes, scriptFd, out, rootDir);
-     }
- 
-     do {
-@@ -297,13 +296,27 @@ exit:
- }
- 
- rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
--		   ARGV_const_t prefixes, int warn_only, int selinux)
-+		   ARGV_const_t prefixes, int warn_only, int selinux, char * rootDir)
- {
-     ARGV_t args = NULL;
-     rpmlogLvl lvl = warn_only ? RPMLOG_WARNING : RPMLOG_ERR;
-     rpmRC rc;
--
--    if (script == NULL) return RPMRC_OK;
-+#ifdef RPM_VENDOR_OE
-+    const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
-+#endif
-+ 
-+     if (script == NULL) return RPMRC_OK;
-+#ifdef RPM_VENDOR_OE
-+    if (scriptletWrapper && *scriptletWrapper) {
-+       argvAdd(&args, scriptletWrapper);
-+
-+       if ( rootDir ) {
-+         argvAdd(&args, rootDir);
-+       } else {
-+         argvAdd(&args, "/");
-+       }
-+    }
-+#endif
- 
-     /* construct a new argv as we can't modify the one from header */
-     if (script->args) {
-@@ -315,7 +328,7 @@ rpmRC rpmScriptRun(rpmScript script, int
-     if (rstreq(args[0], "<lua>")) {
- 	rc = runLuaScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2);
-     } else {
--	rc = runExtScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2);
-+	rc = runExtScript(selinux, prefixes, script->descr, lvl, scriptFd, &args, script->body, arg1, arg2, rootDir);
-     }
-     argvFree(args);
- 
-Index: rpm-4.11.2/lib/rpmscript.h
-===================================================================
---- rpm-4.11.2.orig/lib/rpmscript.h
-+++ rpm-4.11.2/lib/rpmscript.h
-@@ -29,7 +29,7 @@ rpmScript rpmScriptFree(rpmScript script
- 
- RPM_GNUC_INTERNAL
- rpmRC rpmScriptRun(rpmScript script, int arg1, int arg2, FD_t scriptFd,
--                   ARGV_const_t prefixes, int warn_only, int selinux);
-+                   ARGV_const_t prefixes, int warn_only, int selinux, char * rootDir);
- 
- RPM_GNUC_INTERNAL
- rpmTagVal rpmScriptTag(rpmScript script);
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch
deleted file mode 100644
index 3da6085..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/support-suggests-tag.patch
+++ /dev/null
@@ -1,384 +0,0 @@
-
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
-
-diff --git a/build/pack.c b/build/pack.c
-index b6b2bea..5c3d8df 100644
---- a/build/pack.c
-+++ b/build/pack.c
-@@ -273,8 +273,10 @@ static rpmTagVal depevrtags[] = {
-     RPMTAG_CONFLICTVERSION,
-     RPMTAG_ORDERVERSION,
-     RPMTAG_TRIGGERVERSION,
--    RPMTAG_SUGGESTSVERSION,
--    RPMTAG_ENHANCESVERSION,
-+    RPMTAG_SUGGESTVERSION,
-+    RPMTAG_ENHANCEVERSION,
-+    RPMTAG_RECOMMENDVERSION,
-+    RPMTAG_SUPPLEMENTVERSION,
-     0
- };
- 
-diff --git a/build/parsePreamble.c b/build/parsePreamble.c
-index 5772bef..cbbbee3 100644
---- a/build/parsePreamble.c
-+++ b/build/parsePreamble.c
-@@ -821,6 +821,10 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
- 	}
- 	/* fallthrough */
-     case RPMTAG_PREREQ:
-+    case RPMTAG_RECOMMENDFLAGS:
-+    case RPMTAG_SUGGESTFLAGS:
-+    case RPMTAG_SUPPLEMENTFLAGS:
-+    case RPMTAG_ENHANCEFLAGS:
-     case RPMTAG_CONFLICTFLAGS:
-     case RPMTAG_OBSOLETEFLAGS:
-     case RPMTAG_PROVIDEFLAGS:
-@@ -922,6 +926,10 @@ static struct PreambleRec_s const preambleList[] = {
-     {RPMTAG_ICON,		0, 0, LEN_AND_STR("icon")},
-     {RPMTAG_PROVIDEFLAGS,	0, 0, LEN_AND_STR("provides")},
-     {RPMTAG_REQUIREFLAGS,	2, 0, LEN_AND_STR("requires")},
-+    {RPMTAG_RECOMMENDFLAGS,	0, 0, LEN_AND_STR("recommends")},
-+    {RPMTAG_SUGGESTFLAGS,	0, 0, LEN_AND_STR("suggests")},
-+    {RPMTAG_SUPPLEMENTFLAGS,	0, 0, LEN_AND_STR("supplements")},
-+    {RPMTAG_ENHANCEFLAGS,	0, 0, LEN_AND_STR("enhances")},
-     {RPMTAG_PREREQ,		2, 1, LEN_AND_STR("prereq")},
-     {RPMTAG_CONFLICTFLAGS,	0, 0, LEN_AND_STR("conflicts")},
-     {RPMTAG_OBSOLETEFLAGS,	0, 0, LEN_AND_STR("obsoletes")},
-diff --git a/build/parseReqs.c b/build/parseReqs.c
-index ba080a1..1427111 100644
---- a/build/parseReqs.c
-+++ b/build/parseReqs.c
-@@ -61,6 +61,18 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN,
- 	nametag = RPMTAG_REQUIRENAME;
- 	tagflags |= RPMSENSE_ANY;
- 	break;
-+    case RPMTAG_RECOMMENDFLAGS:
-+	nametag = RPMTAG_RECOMMENDNAME;
-+	break;
-+    case RPMTAG_SUGGESTFLAGS:
-+	nametag = RPMTAG_SUGGESTNAME;
-+	break;
-+    case RPMTAG_SUPPLEMENTFLAGS:
-+	nametag = RPMTAG_SUPPLEMENTNAME;
-+	break;
-+    case RPMTAG_ENHANCEFLAGS:
-+	nametag = RPMTAG_ENHANCENAME;
-+	break;
-     case RPMTAG_PROVIDEFLAGS:
- 	nametag = RPMTAG_PROVIDENAME;
- 	break;
-diff --git a/build/reqprov.c b/build/reqprov.c
-index a368f42..c270af6 100644
---- a/build/reqprov.c
-+++ b/build/reqprov.c
-@@ -81,6 +81,30 @@ int addReqProv(Package pkg, rpmTagVal tagN,
- 	extra = Flags & RPMSENSE_TRIGGER;
- 	dsp = &pkg->triggers;
- 	break;
-+    case RPMTAG_RECOMMENDNAME:
-+	versiontag = RPMTAG_RECOMMENDVERSION;
-+	flagtag = RPMTAG_RECOMMENDFLAGS;
-+	extra = Flags & _ALL_REQUIRES_MASK;
-+	dsp = &pkg->recommends;
-+	break;
-+    case RPMTAG_SUGGESTNAME:
-+	versiontag = RPMTAG_SUGGESTVERSION;
-+	flagtag = RPMTAG_SUGGESTFLAGS;
-+	extra = Flags & _ALL_REQUIRES_MASK;
-+	dsp = &pkg->suggests;
-+	break;
-+    case RPMTAG_SUPPLEMENTNAME:
-+	versiontag = RPMTAG_SUPPLEMENTVERSION;
-+	flagtag = RPMTAG_SUPPLEMENTFLAGS;
-+	extra = Flags & _ALL_REQUIRES_MASK;
-+	dsp = &pkg->supplements;
-+	break;
-+    case RPMTAG_ENHANCENAME:
-+	versiontag = RPMTAG_ENHANCEVERSION;
-+	flagtag = RPMTAG_ENHANCEFLAGS;
-+	extra = Flags & _ALL_REQUIRES_MASK;
-+	dsp = &pkg->enhances;
-+	break;
-     case RPMTAG_REQUIRENAME:
-     default:
- 	tagN = RPMTAG_REQUIRENAME;
-diff --git a/build/rpmbuild_internal.h b/build/rpmbuild_internal.h
-index a9e4c7c..0a1977f 100644
---- a/build/rpmbuild_internal.h
-+++ b/build/rpmbuild_internal.h
-@@ -93,6 +93,10 @@ struct Package_s {
-     rpmds ds;			/*!< Requires: N = EVR */
-     rpmds requires;
-     rpmds provides;
-+    rpmds recommends;
-+    rpmds suggests;
-+    rpmds supplements;
-+    rpmds enhances;
-     rpmds conflicts;
-     rpmds obsoletes;
-     rpmds triggers;
-diff --git a/build/spec.c b/build/spec.c
-index 703ec78..7ae2120 100644
---- a/build/spec.c
-+++ b/build/spec.c
-@@ -139,6 +139,11 @@ static Package freePackage(Package pkg)
-     pkg->ds = rpmdsFree(pkg->ds);
-     pkg->requires = rpmdsFree(pkg->requires);
-     pkg->provides = rpmdsFree(pkg->provides);
-+    pkg->recommends = rpmdsFree(pkg->recommends);
-+    pkg->suggests = rpmdsFree(pkg->suggests);
-+    pkg->supplements = rpmdsFree(pkg->supplements);
-+    pkg->enhances = rpmdsFree(pkg->enhances);
-+
-     pkg->conflicts = rpmdsFree(pkg->conflicts);
-     pkg->obsoletes = rpmdsFree(pkg->obsoletes);
-     pkg->triggers = rpmdsFree(pkg->triggers);
-diff --git a/lib/rpmds.c b/lib/rpmds.c
-index 7a51167..1e5dda0 100644
---- a/lib/rpmds.c
-+++ b/lib/rpmds.c
-@@ -52,6 +52,22 @@ static int dsType(rpmTagVal tag,
- 	t = "Requires";
- 	evr = RPMTAG_REQUIREVERSION;
- 	f = RPMTAG_REQUIREFLAGS;
-+    } else if (tag == RPMTAG_SUPPLEMENTNAME) {
-+	t = "Supplements";
-+	evr = RPMTAG_SUPPLEMENTVERSION;
-+	f = RPMTAG_SUPPLEMENTFLAGS;
-+    } else if (tag == RPMTAG_ENHANCENAME) {
-+	t = "Enhances";
-+	evr = RPMTAG_ENHANCEVERSION;
-+	f = RPMTAG_ENHANCEFLAGS;
-+    } else if (tag == RPMTAG_RECOMMENDNAME) {
-+	t = "Recommends";
-+	evr = RPMTAG_RECOMMENDVERSION;
-+	f = RPMTAG_RECOMMENDFLAGS;
-+    } else if (tag == RPMTAG_SUGGESTNAME) {
-+	t = "Suggests";
-+	evr = RPMTAG_SUGGESTVERSION;
-+	f = RPMTAG_SUGGESTFLAGS;
-     } else if (tag == RPMTAG_CONFLICTNAME) {
- 	t = "Conflicts";
- 	evr = RPMTAG_CONFLICTVERSION;
-diff --git a/lib/rpmtag.h b/lib/rpmtag.h
-index 64b03f1..b943229 100644
---- a/lib/rpmtag.h
-+++ b/lib/rpmtag.h
-@@ -217,14 +217,14 @@ typedef enum rpmTag_e {
-     RPMTAG_PRETRANSPROG		= 1153,	/* s[] */
-     RPMTAG_POSTTRANSPROG	= 1154,	/* s[] */
-     RPMTAG_DISTTAG		= 1155,	/* s */
--    RPMTAG_SUGGESTSNAME		= 1156,	/* s[] extension (unimplemented) */
--#define	RPMTAG_SUGGESTS RPMTAG_SUGGESTSNAME	/* s[] (unimplemented) */
--    RPMTAG_SUGGESTSVERSION	= 1157,	/* s[] extension (unimplemented) */
--    RPMTAG_SUGGESTSFLAGS	= 1158,	/* i[] extension (unimplemented) */
--    RPMTAG_ENHANCESNAME		= 1159,	/* s[] extension placeholder (unimplemented) */
--#define	RPMTAG_ENHANCES RPMTAG_ENHANCESNAME	/* s[] (unimplemented) */
--    RPMTAG_ENHANCESVERSION	= 1160,	/* s[] extension placeholder (unimplemented) */
--    RPMTAG_ENHANCESFLAGS	= 1161,	/* i[] extension placeholder (unimplemented) */
-+    RPMTAG_OLDSUGGESTSNAME	= 1156,	/* s[] (unimplemented) */
-+#define	RPMTAG_OLDSUGGESTS RPMTAG_OLDSUGGESTSNAME /* s[] (unimplemented) */
-+    RPMTAG_OLDSUGGESTSVERSION	= 1157,	/* s[] (unimplemented) */
-+    RPMTAG_OLDSUGGESTSFLAGS	= 1158,	/* i[] (unimplemented) */
-+    RPMTAG_OLDENHANCESNAME		= 1159,	/* s[] (unimplemented) */
-+#define	RPMTAG_OLDENHANCES RPMTAG_OLDENHANCESNAME /* s[] (unimplemented) */
-+    RPMTAG_OLDENHANCESVERSION	= 1160,	/* s[] (unimplemented) */
-+    RPMTAG_OLDENHANCESFLAGS	= 1161,	/* i[] (unimplemented) */
-     RPMTAG_PRIORITY		= 1162, /* i[] extension placeholder (unimplemented) */
-     RPMTAG_CVSID		= 1163, /* s (unimplemented) */
- #define	RPMTAG_SVNID	RPMTAG_CVSID	/* s (unimplemented) */
-@@ -261,6 +261,7 @@ typedef enum rpmTag_e {
-     RPMTAG_BUILDOBSOLETES	= 1194, /* internal (unimplemented) */
-     RPMTAG_DBINSTANCE		= 1195, /* i extension */
-     RPMTAG_NVRA			= 1196, /* s extension */
-+
-     /* tags 1997-4999 reserved */
-     RPMTAG_FILENAMES		= 5000, /* s[] extension */
-     RPMTAG_FILEPROVIDE		= 5001, /* s[] extension */
-@@ -307,6 +308,26 @@ typedef enum rpmTag_e {
-     RPMTAG_OBSOLETENEVRS	= 5043, /* s[] extension */
-     RPMTAG_CONFLICTNEVRS	= 5044, /* s[] extension */
-     RPMTAG_FILENLINKS		= 5045,	/* i[] extension */
-+    RPMTAG_RECOMMENDNAME	= 5046,	/* s[] */
-+#define	RPMTAG_RECOMMENDS RPMTAG_RECOMMENDNAME	/* s[] */
-+    RPMTAG_RECOMMENDVERSION	= 5047,	/* s[] */
-+    RPMTAG_RECOMMENDFLAGS	= 5048,	/* i[] */
-+    RPMTAG_SUGGESTNAME		= 5049,	/* s[] */
-+#define	RPMTAG_SUGGESTS RPMTAG_SUGGESTNAME	/* s[] */
-+    RPMTAG_SUGGESTVERSION	= 5050,	/* s[] extension */
-+    RPMTAG_SUGGESTFLAGS		= 5051,	/* i[] extension */
-+    RPMTAG_SUPPLEMENTNAME	= 5052,	/* s[] */
-+#define	RPMTAG_SUPPLEMENTS RPMTAG_SUPPLEMENTNAME /* s[] */
-+    RPMTAG_SUPPLEMENTVERSION	= 5053,	/* s[] */
-+    RPMTAG_SUPPLEMENTFLAGS	= 5054,	/* i[] */
-+    RPMTAG_ENHANCENAME		= 5055,	/* s[] */
-+#define	RPMTAG_ENHANCES RPMTAG_ENHANCENAME	/* s[] */
-+    RPMTAG_ENHANCEVERSION	= 5056,	/* s[] */
-+    RPMTAG_ENHANCEFLAGS		= 5057,	/* i[] */
-+    RPMTAG_RECOMMENDNEVRS	= 5058, /* s[] extension */
-+    RPMTAG_SUGGESTNEVRS		= 5059, /* s[] extension */
-+    RPMTAG_SUPPLEMENTNEVRS	= 5060, /* s[] extension */
-+    RPMTAG_ENHANCENEVRS		= 5061, /* s[] extension */
- 
-     RPMTAG_FIRSTFREE_TAG	/*!< internal */
- } rpmTag;
-diff --git a/lib/tagexts.c b/lib/tagexts.c
-index 29b2bae..e940310 100644
---- a/lib/tagexts.c
-+++ b/lib/tagexts.c
-@@ -761,6 +761,26 @@ static int requirenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
-     return depnevrsTag(h, td, hgflags, RPMTAG_REQUIRENAME);
- }
- 
-+static int recommendnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
-+{
-+    return depnevrsTag(h, td, hgflags, RPMTAG_RECOMMENDNAME);
-+}
-+
-+static int suggestnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
-+{
-+    return depnevrsTag(h, td, hgflags, RPMTAG_SUGGESTNAME);
-+}
-+
-+static int supplementnevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
-+{
-+    return depnevrsTag(h, td, hgflags, RPMTAG_SUPPLEMENTNAME);
-+}
-+
-+static int enhancenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
-+{
-+    return depnevrsTag(h, td, hgflags, RPMTAG_ENHANCENAME);
-+}
-+
- static int providenevrsTag(Header h, rpmtd td, headerGetFlags hgflags)
- {
-     return depnevrsTag(h, td, hgflags, RPMTAG_PROVIDENAME);
-@@ -823,6 +843,10 @@ static const struct headerTagFunc_s rpmHeaderTagExtensions[] = {
-     { RPMTAG_EPOCHNUM,		epochnumTag },
-     { RPMTAG_INSTFILENAMES,	instfilenamesTag },
-     { RPMTAG_REQUIRENEVRS,	requirenevrsTag },
-+    { RPMTAG_RECOMMENDNEVRS,	recommendnevrsTag},
-+    { RPMTAG_SUGGESTNEVRS,	suggestnevrsTag},
-+    { RPMTAG_SUPPLEMENTNEVRS,	supplementnevrsTag},
-+    { RPMTAG_ENHANCENEVRS,	enhancenevrsTag},
-     { RPMTAG_PROVIDENEVRS,	providenevrsTag },
-     { RPMTAG_OBSOLETENEVRS,	obsoletenevrsTag },
-     { RPMTAG_CONFLICTNEVRS,	conflictnevrsTag },
-diff --git a/rpmpopt.in b/rpmpopt.in
-index 805599e..036ab4e 100644
---- a/rpmpopt.in
-+++ b/rpmpopt.in
-@@ -67,6 +67,19 @@ rpm	alias --requires	--qf \
- 	--POPTdesc=$"list capabilities required by package(s)"
- rpm	alias -R --requires
- 
-+rpm	alias --recommends	--qf \
-+  "[%|VERBOSE?{%{RECOMMENDFLAGS:deptype}: }:{}|%{RECOMMENDNEVRS}\n]" \
-+	--POPTdesc=$"list capabilities recommended by package(s)"
-+rpm	alias --suggests	--qf \
-+  "[%|VERBOSE?{%{SUGGESTFLAGS:deptype}: }:{}|%{SUGGESTNEVRS}\n]" \
-+	--POPTdesc=$"list capabilities suggested by package(s)"
-+rpm	alias --supplements	--qf \
-+  "[%|VERBOSE?{%{SUPPLEMENTFLAGS:deptype}: }:{}|%{SUPPLEMENTNEVRS}\n]" \
-+	--POPTdesc=$"list capabilities supplemented by package(s)"
-+rpm	alias --enhances	--qf \
-+  "[%|VERBOSE?{%{ENHANCEFLAGS:deptype}: }:{}|%{ENHANCENEVRS}\n]" \
-+	--POPTdesc=$"list capabilities enhanced by package(s)"
-+
- rpm	alias --info --qf '\
- Name        : %{NAME}\n\
- %|EPOCH?{Epoch       : %{EPOCH}\n}|\
-diff --git a/tests/data/SPECS/deptest.spec b/tests/data/SPECS/deptest.spec
-index cb4cbbd..7c47f6d 100644
---- a/tests/data/SPECS/deptest.spec
-+++ b/tests/data/SPECS/deptest.spec
-@@ -10,6 +10,10 @@ BuildArch:	noarch
- %{?provs:Provides: %{provs}}
- %{?cfls:Conflicts: %{cfls}}
- %{?obs:Obsoletes: %{obs}}
-+%{?recs:Recommends: %{recs}}
-+%{?sugs:Suggests: %{sugs}}
-+%{?sups:Supplements: %{sups}}
-+%{?ens:Enhances: %{ens}}
- 
- %description
- %{summary}
-diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at
-index 6230903..c4c954c 100644
---- a/tests/rpmbuild.at
-+++ b/tests/rpmbuild.at
-@@ -185,3 +185,25 @@ lrwxrwxrwx /opt/globtest/linkgood
- ],
- [])
- AT_CLEANUP
-+
-+# ------------------------------
-+# Check if weak and reverse requires can be built
-+AT_SETUP([Weak and reverse requires])
-+AT_KEYWORDS([build])
-+AT_CHECK([
-+
-+runroot rpmbuild -bb --quiet \
-+	--define "pkg weakdeps" \
-+	--define "recs foo > 1.2.3" \
-+	--define "sugs bar >= 0.1.2" \
-+	--define "sups baz" \
-+	--define "ens zap = 3" \
-+	  /data/SPECS/deptest.spec
-+
-+runroot rpm -qp --qf "[%{supplementname}\n]" /build/RPMS/noarch/deptest-weakdeps-1.0-1.noarch.rpm
-+],
-+[0],
-+[baz
-+],
-+[ignore])
-+AT_CLEANUP
-diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at
-index 13131e2..80cca63 100644
---- a/tests/rpmgeneral.at
-+++ b/tests/rpmgeneral.at
-@@ -79,6 +79,11 @@ DISTTAG
- DISTURL
- DSAHEADER
- E
-+ENHANCEFLAGS
-+ENHANCENAME
-+ENHANCENEVRS
-+ENHANCES
-+ENHANCEVERSION
- EPOCH
- EPOCHNUM
- EVR
-@@ -199,6 +204,11 @@ PROVIDES
- PROVIDEVERSION
- PUBKEYS
- R
-+RECOMMENDFLAGS
-+RECOMMENDNAME
-+RECOMMENDNEVRS
-+RECOMMENDS
-+RECOMMENDVERSION
- RECONTEXTS
- RELEASE
- REMOVETID
-@@ -219,7 +229,17 @@ SOURCE
- SOURCEPACKAGE
- SOURCEPKGID
- SOURCERPM
-+SUGGESTFLAGS
-+SUGGESTNAME
-+SUGGESTNEVRS
-+SUGGESTS
-+SUGGESTVERSION
- SUMMARY
-+SUPPLEMENTFLAGS
-+SUPPLEMENTNAME
-+SUPPLEMENTNEVRS
-+SUPPLEMENTS
-+SUPPLEMENTVERSION
- TRIGGERCONDS
- TRIGGERFLAGS
- TRIGGERINDEX
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch
deleted file mode 100644
index 8d84cf8..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm-4.11.2/use-pkgconfig-for-python.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-
-Use pkgconfig to get the correct include paths
-
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Signed-off-by: Ronan Le Martret <ronan.lemartret@open.eurogiciel.org>
-
-diff --git a/configure.ac b/configure.ac
-index e97f727..8179f44 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -540,10 +540,10 @@ esac],
- 
- AS_IF([test "$enable_python" = yes],[
-   AM_PATH_PYTHON([2.6],[
--    WITH_PYTHON_INCLUDE=`${PYTHON} -c 'from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_inc())'`
-+    WITH_PYTHON_INCLUDE=$(${PKG_CONFIG} --cflags-only-I  python)
-     WITH_PYTHON_SUBPACKAGE=1
-     save_CPPFLAGS="$CPPFLAGS"
--    CPPFLAGS="$CPPFLAGS -I$WITH_PYTHON_INCLUDE"
-+    CPPFLAGS="$CPPFLAGS $WITH_PYTHON_INCLUDE"
-     AC_CHECK_HEADER([Python.h],[],
-       [AC_MSG_ERROR([missing Python.h])
-       ])
-diff --git a/python/Makefile.am b/python/Makefile.am
-index fff51ae..f37cb9d 100644
---- a/python/Makefile.am
-+++ b/python/Makefile.am
-@@ -4,7 +4,7 @@ EXTRA_DIST = rpm/__init__.py rpm/transaction.py
- 
- AM_CPPFLAGS = -I$(top_builddir)/include/
- AM_CPPFLAGS += -I$(top_srcdir)/python
--AM_CPPFLAGS += -I@WITH_PYTHON_INCLUDE@
-+AM_CPPFLAGS += @WITH_PYTHON_INCLUDE@
- 
- pkgpyexec_LTLIBRARIES = _rpmmodule.la _rpmbmodule.la _rpmsmodule.la
- pkgpyexec_DATA = rpm/__init__.py rpm/transaction.py
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
new file mode 100644
index 0000000..e9b73b8
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
@@ -0,0 +1,30 @@
+From 06967a50f20095f5ca30b8214f4c98ba0f5262bf Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Sun, 3 Apr 2016 06:55:25 +0200
+Subject: [PATCH] Disable __sync_add_and_fetch_8 on nios2
+
+The NIOS2 softcore does not implement the __sync_add_and_fetch_8,
+so disable it accordingly.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Submitted
+---
+ rpmio/bson.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rpmio/bson.h b/rpmio/bson.h
+index 57023f1..60c7d02 100644
+--- a/rpmio/bson.h
++++ b/rpmio/bson.h
+@@ -880,7 +880,7 @@ BSON_END_DECLS
+ BSON_BEGIN_DECLS
+ 
+ /* Some architectures do not support __sync_add_and_fetch_8 */
+-#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
++#if (__mips == 32) || (__nios2__) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
+ # define __BSON_NEED_ATOMIC_64 1
+ #endif
+ 
+-- 
+2.8.0.rc3
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch
new file mode 100644
index 0000000..c9fb268
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-define-EM_AARCH64.patch
@@ -0,0 +1,35 @@
+[PATCH] define EM_AARCH64
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+EM_AARCH64 maybe not be defined due to old version elf.h, and lead to
+that debugedit can not work on aarch64 elf object files, since there is
+no other dependence, except these two macro, define them to make
+debugedit work on aarch64 elf files.
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ tools/debugedit.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/tools/debugedit.c b/tools/debugedit.c
+index de693ed..d16a641 100644
+--- a/tools/debugedit.c
++++ b/tools/debugedit.c
+@@ -35,6 +35,13 @@
+ 
+ #include <gelf.h>
+ 
++#ifndef EM_AARCH64
++#define EM_AARCH64      183             /* ARM AARCH64 */
++#endif
++#ifndef R_AARCH64_ABS32
++#define R_AARCH64_ABS32 258
++#endif 
++
+ /* some defines taken from the dwarf standard */
+ 
+ #define DW_TAG_compile_unit	0x11
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch
new file mode 100644
index 0000000..70dd4ff
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-rpm-Fix-build-on-musl.patch
@@ -0,0 +1,294 @@
+From 0af17c2ae86c1e8e42b96f6dface08f535bb55ad Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 14 Feb 2016 08:33:24 +0000
+Subject: [PATCH] rpm: Fix build on musl
+
+Provide alternatives to assumptions about glibc
+on linux
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Updated to 5.4.16 (CVS)
+
+The patch will likely need additional rework before it can be accepted upsteam
+due to the way MUSL changes are patched in.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+---
+Upstream-Status: Pending
+
+ lib/poptALL.c          |    2 ++
+ rpmio/fts.c            |    4 ++++
+ rpmio/poptIO.c         |    2 ++
+ rpmqv.c                |    2 ++
+ system.h               |   13 ++++++-------
+ tools/debugedit.c      |   47 +++++++++++++++++++++++++++++++++++++++++++++++
+ tools/rpm2cpio.c       |    2 ++
+ tools/rpmcache.c       |    2 ++
+ tools/rpmcmp.c         |    2 ++
+ tools/rpmdeps-oecore.c |    2 ++
+ tools/rpmdeps.c        |    2 ++
+ tools/rpmdigest.c      |    2 ++
+ tools/rpmfind.c        |    6 +++---
+ 13 files changed, 78 insertions(+), 10 deletions(-)
+
+Index: rpm-5.4.15/rpmio/fts.c
+===================================================================
+--- rpm-5.4.15.orig/rpmio/fts.c
++++ rpm-5.4.15/rpmio/fts.c
+@@ -124,6 +124,10 @@ static char sccsid[] = "@(#)fts.c	8.6 (B
+ #   define __fxstat64(_stat_ver, _fd, _sbp)    fstat((_fd), (_sbp))
+ #endif
+ 
++#ifndef _STAT_VER
++#   define _STAT_VER      0
++#endif
++
+ #if !defined(_D_EXACT_NAMLEN)
+ #   define _D_EXACT_NAMLEN(d) (strlen((d)->d_name))
+ #endif
+Index: rpm-5.4.15/tools/debugedit.c
+===================================================================
+--- rpm-5.4.15.orig/tools/debugedit.c
++++ rpm-5.4.15/tools/debugedit.c
+@@ -22,7 +22,12 @@
+ #include <byteswap.h>
+ #include <endian.h>
+ #include <errno.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#else
++#include <stdarg.h>
++void error(int, int, const char *, ...);
++#endif
+ #include <limits.h>
+ #include <string.h>
+ #include <stdlib.h>
+@@ -1535,6 +1540,48 @@ handle_build_id (DSO *dso, Elf_Data *bui
+     puts (hex);
+   }
+ }
++#ifndef __GLIBC__
++extern char *__progname;
++
++void (*error_print_progname)(void) = 0;
++unsigned int error_message_count = 0;
++int error_one_per_line = 0;
++
++static void eprint(int status, int e, const char *file, unsigned int line, const char *fmt, va_list ap)
++{
++       if (file && error_one_per_line) {
++               static const char *oldfile;
++               static unsigned int oldline;
++               if (line == oldline && strcmp(file, oldfile) == 0)
++                       return;
++               oldfile = file;
++               oldline = line;
++       }
++       if (error_print_progname)
++               error_print_progname();
++       else
++               fprintf(stderr, "%s: ", __progname);
++       if (file)
++               fprintf(stderr, "%s:%u: ", file, line);
++       vfprintf(stderr, fmt, ap);
++      if (e)
++               fprintf(stderr, ": %s", strerror(e));
++       putc('\n', stderr);
++       fflush(stderr);
++       error_message_count++;
++       if (status)
++               exit(status);
++}
++
++void error(int status, int e, const char *fmt, ...)
++{
++       va_list ap;
++       va_start(ap,fmt);
++       eprint(status, e, 0, 0, fmt, ap);
++       va_end(ap);
++}
++
++#endif
+ 
+ /* It avoided the segment fault while file's bss offset have a large number.
+    See https://bugzilla.redhat.com/show_bug.cgi?id=1019707
+Index: rpm-5.4.15/tools/rpmfind.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmfind.c
++++ rpm-5.4.15/tools/rpmfind.c
+@@ -1175,7 +1175,7 @@ find_parsenum(PLAN *plan, const char *op
+      * and endchar points to the beginning of the string we know we have
+      * a syntax error.
+      */
+-#if defined(__sun)
++#if defined(__sun) || !defined(__GLIBC_)
+     value = strtoll(str, &endchar, 10);
+ #else
+     value = strtoq(str, &endchar, 10);
+@@ -1215,7 +1215,7 @@ find_parsetime(PLAN *plan, const char *o
+ 	break;
+     }
+ 
+-#if defined(__sun)
++#if defined(__sun) || !defined(__GLIBC_)
+     value = strtoll(str, &unit, 10);
+ #else
+     value = strtoq(str, &unit, 10);
+@@ -1253,7 +1253,7 @@ find_parsetime(PLAN *plan, const char *o
+ 	str = unit + 1;
+ 	if (*str == '\0')	/* EOS */
+ 	    break;
+-#if defined(__sun)
++#if defined(__sun) || !defined(__GLIBC_)
+ 	value = strtoll(str, &unit, 10);
+ #else
+ 	value = strtoq(str, &unit, 10);
+Index: rpm-5.4.15/system.h
+===================================================================
+--- rpm-5.4.15.orig/system.h
++++ rpm-5.4.15/system.h
+@@ -372,16 +372,15 @@ extern int _tolower(int) __THROW	/*@*/;
+ #define	__progname	__assert_program_name
+ #endif
+ #define	setprogname(pn)
++/*@unchecked@*/
++extern const char *__progname;
+ #else
+-#define	__progname	program_name
+-#define	setprogname(pn)	\
+-  { if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \
+-    else __progname = pn;		\
+-  }
+-#endif
++#define	setprogname(pn)
++#define	progname	__progname
+ 
+ /*@unchecked@*/
+-extern const char *__progname;
++extern char *__progname;
++#endif
+ 
+ /* -- Retrofit missing prototypes (if needed). */
+ #ifdef __cplusplus
+Index: rpm-5.4.15/rpmio/poptIO.c
+===================================================================
+--- rpm-5.4.15.orig/rpmio/poptIO.c
++++ rpm-5.4.15/rpmio/poptIO.c
+@@ -65,7 +65,9 @@ extern int _rpmsvn_debug;
+ GENfree(rpmioP)
+ #endif	/* __cplusplus */
+ 
++#ifdef __GLIBC__
+ const char *__progname;
++#endif
+ 
+ #if !defined(POPT_ARGFLAG_TOGGLE)	/* XXX compat with popt < 1.15 */
+ #define	POPT_ARGFLAG_TOGGLE	0
+Index: rpm-5.4.15/lib/poptALL.c
+===================================================================
+--- rpm-5.4.15.orig/lib/poptALL.c
++++ rpm-5.4.15/lib/poptALL.c
+@@ -4,7 +4,9 @@
+  */
+ 
+ #include "system.h"
++#ifdef __GLIBC__
+ extern const char *__progname;
++#endif
+ 
+ #if defined(RPM_VENDOR_WINDRIVER)
+ const char *__usrlibrpm = USRLIBRPM;
+Index: rpm-5.4.15/tools/rpm2cpio.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpm2cpio.c
++++ rpm-5.4.15/tools/rpm2cpio.c
+@@ -1,7 +1,9 @@
+ /* rpmarchive: spit out the main archive portion of a package */
+ 
+ #include "system.h"
++#ifdef __GLIBC__
+ const char *__progname;
++#endif
+ 
+ #include <rpmio.h>
+ #include <rpmiotypes.h>	/* XXX fnpyKey */
+Index: rpm-5.4.15/tools/rpmcache.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmcache.c
++++ rpm-5.4.15/tools/rpmcache.c
+@@ -3,7 +3,9 @@
+  */
+ 
+ #include "system.h"
++#ifdef __GLIBC__
+ const char *__progname;
++#endif
+ 
+ #include <fnmatch.h>
+ #include <fts.h>
+Index: rpm-5.4.15/tools/rpmdeps-oecore.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmdeps-oecore.c
++++ rpm-5.4.15/tools/rpmdeps-oecore.c
+@@ -1,5 +1,7 @@
+ #include "system.h"
++#ifdef __GLIBC__
+ const char *__progname;
++#endif
+ 
+ #include <rpmio.h>
+ #include <rpmiotypes.h>
+Index: rpm-5.4.15/tools/rpmdeps.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmdeps.c
++++ rpm-5.4.15/tools/rpmdeps.c
+@@ -1,5 +1,7 @@
+ #include "system.h"
++#ifdef __GLIBC__
+ const char *__progname;
++#endif
+ 
+ #include <rpmio.h>
+ #include <rpmiotypes.h>
+Index: rpm-5.4.15/tools/rpmdigest.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmdigest.c
++++ rpm-5.4.15/tools/rpmdigest.c
+@@ -1,6 +1,8 @@
+ #include "system.h"
++#ifdef __GLIBC__
+ /*@unchecked@*/
+ extern const char * __progname;
++#endif
+ 
+ #define	_RPMIOB_INTERNAL
+ #include <rpmiotypes.h>
+Index: rpm-5.4.15/tools/rpmcmp.c
+===================================================================
+--- rpm-5.4.15.orig/tools/rpmcmp.c
++++ rpm-5.4.15/tools/rpmcmp.c
+@@ -13,8 +13,10 @@
+ 
+ #include "debug.h"
+ 
++#ifdef __GLIBC__
+ const char *__progname;
+ #define	progname	__progname
++#endif
+ 
+ static int pointRpmEVR(ARGV_t av)
+ {
+Index: rpm-5.4.15/rpmqv.c
+===================================================================
+--- rpm-5.4.15.orig/rpmqv.c
++++ rpm-5.4.15/rpmqv.c
+@@ -1,5 +1,7 @@
+ #include "system.h"
++#ifdef __GLIBC__
+ extern const char *__progname;
++#endif
+ 
+ /* Copyright (C) 1998-2002 - Red Hat, Inc. */
+ 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
index 23bc336..7128250 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch
@@ -4,7 +4,7 @@
 Subject: [PATCH] using poptParseArgvString to parse the
  _gpg_check_password_cmd
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Both __gpg_check_password_cmd and __gpg_sign_cmd include "%{_gpg_name}", but
 strace shows that gpg_name has a quote when run _gpg_check_password,
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
index beef5ed..c83c8b5 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-segv.patch
@@ -11,38 +11,40 @@
 Also the process (...) function was modified to verify the data is not
 NULL as well.  This is an extra check and is not strictly necessary.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
-Index: rpm-5.4.14/tools/debugedit.c
+Index: rpm/tools/debugedit.c
 ===================================================================
---- rpm-5.4.14.orig/tools/debugedit.c
-+++ rpm-5.4.14/tools/debugedit.c
-@@ -1445,21 +1445,24 @@ handle_build_id (DSO *dso, Elf_Data *bui
-     auto inline void process (const void *data, size_t size)
-     {
-       memchunk chunk = { .data = (void *) data, .size = size };
--      hashFunctionContextUpdateMC (&ctx, &chunk);
-+      if (data != NULL && size != 0)
-+        hashFunctionContextUpdateMC (&ctx, &chunk);
-     }
-     union
-     {
+--- rpm.orig/tools/debugedit.c
++++ rpm/tools/debugedit.c
+@@ -1403,7 +1403,8 @@ static inline void process (hashFunction
+ 		const void *data, size_t size)
+ {
+     memchunk chunk = { .data = (void *) data, .size = size };
+-    hashFunctionContextUpdateMC (ctx, &chunk);
++    if (data != NULL && size != 0)
++      hashFunctionContextUpdateMC (ctx, &chunk);
+ }
+ 
+ /* Compute a fresh build ID bit-string from the editted file contents.  */
+@@ -1456,14 +1457,16 @@ handle_build_id (DSO *dso, Elf_Data *bui
        GElf_Ehdr ehdr;
        GElf_Phdr phdr;
        GElf_Shdr shdr;
 -    } u;
 -    Elf_Data x = { .d_version = EV_CURRENT, .d_buf = &u };
-+    } u1, u2;
-+    Elf_Data src  = { .d_version = EV_CURRENT, .d_buf = &u1 };
-+    Elf_Data dest = { .d_version = EV_CURRENT, .d_buf = &u2 };
- 
+-
 -    x.d_type = ELF_T_EHDR;
 -    x.d_size = sizeof u.ehdr;
 -    u.ehdr = dso->ehdr;
 -    u.ehdr.e_phoff = u.ehdr.e_shoff = 0;
 -    if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
++    } u1, u2;
++    Elf_Data src  = { .d_version = EV_CURRENT, .d_buf = &u1 };
++    Elf_Data dest = { .d_version = EV_CURRENT, .d_buf = &u2 };
++
 +    src.d_type = ELF_T_EHDR;
 +    src.d_size = sizeof u1.ehdr;
 +    dest.d_size = sizeof u2.ehdr;
@@ -52,7 +54,7 @@
        {
        bad:
  	fprintf (stderr, "Failed to compute header checksum: %s\n",
-@@ -1467,29 +1470,31 @@ handle_build_id (DSO *dso, Elf_Data *bui
+@@ -1471,29 +1474,31 @@ handle_build_id (DSO *dso, Elf_Data *bui
  	exit (1);
        }
  
@@ -69,8 +71,8 @@
 -	if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
 +	if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
  	  goto bad;
--	process (x.d_buf, x.d_size);
-+	process (dest.d_buf, dest.d_size);
+-	process (&ctx, x.d_buf, x.d_size);
++	process (&ctx, dest.d_buf, dest.d_size);
        }
  
 -    x.d_type = ELF_T_SHDR;
@@ -88,8 +90,8 @@
 +	  u1.shdr.sh_offset = 0;
 +	  if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
  	    goto bad;
--	  process (x.d_buf, x.d_size);
-+	  process (dest.d_buf, dest.d_size);
+-	  process (&ctx, x.d_buf, x.d_size);
++	  process (&ctx, dest.d_buf, dest.d_size);
  
 -	  if (u.shdr.sh_type != SHT_NOBITS)
 +	  if (u1.shdr.sh_type != SHT_NOBITS)
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
index f7c3100..8040482 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/debugedit-valid-file-to-fix-segment-fault.patch
@@ -14,7 +14,7 @@
 with ELF_C_RDWR and ELF_F_LAYOUT set to enlarge the above file, it
 could make sure the file is safe for the following elf operations.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
  tools/debugedit.c | 25 +++++++++++++++++++++++++
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
deleted file mode 100644
index 976af48..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/fstack-protector-configure-check.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Some options checked in this loop are needing linking to find out
-if the option can be used or not e.g. -fstack-protector which needs
-libssp to be staged and available for compiler to link against
-Therefore we change the compile only check to compile and link check
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: rpm-5.4.14/configure.ac
-===================================================================
---- rpm-5.4.14.orig/configure.ac
-+++ rpm-5.4.14/configure.ac
-@@ -201,7 +201,7 @@ dnl # GNU GCC (usually "gcc")
-  my_save_cflags="$CFLAGS"
-  CFLAGS=$c
-  AC_MSG_CHECKING([whether GCC supports $c])
-- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
-+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
-     [AC_MSG_RESULT([yes])]
-     [my_cflags=$c],
-     [AC_MSG_RESULT([no])]
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/header-include-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/header-include-fix.patch
index 5ffb187..e72df45 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/header-include-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/header-include-fix.patch
@@ -1,4 +1,14 @@
-Upstream-Status: Pending
+Update two rpm headers to include other headers.
+
+Using rpmdb.h w/o including errno.h may result in a warning.
+
+Using rpmtag.h w/o also adding stdint.h will result in numerous failures
+about unknown types on modern compilers.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Qing He <qing.he@intel.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
 Index: rpm-5.4.14/rpmdb/rpmdb.h
 ===================================================================
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
index 8fab9eb..5d936db 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/makefile-am-exec-hook.patch
@@ -14,7 +14,7 @@
 install-pkgbinPROGRAMS. This means install-pkgbinPROGRAMS will only be run once
 so there whould be any file contention.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Morgan Little <morgan.little@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
new file mode 100644
index 0000000..bcad8dc
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/popt-disable-auto-stack-protector.patch
@@ -0,0 +1,27 @@
+popt: Disable default stack protection on internal version of popt
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/popt/configure.ac
+===================================================================
+--- rpm-5.4.15.orig/popt/configure.ac
++++ rpm-5.4.15/popt/configure.ac
+@@ -123,7 +123,6 @@ AS_IF([test "x$popt_gcc_warnings" = xyes
+   popt_CFLAGS_ADD([-Wjump-misses-init],[POPT_CFLAGS])
+   popt_CFLAGS_ADD([-Wno-format-nonliteral],[POPT_CFLAGS])
+   popt_CFLAGS_ADD([-Wframe-larger-than=$MAX_STACK_SIZE],[POPT_CFLAGS])
+-  popt_CFLAGS_ADD([-fstack-protector-all],[POPT_CFLAGS])
+   popt_CFLAGS_ADD([-fasynchronous-unwind-tables],[POPT_CFLAGS])
+   popt_CFLAGS_ADD([-fdiagnostics-show-option],[POPT_CFLAGS])
+   popt_CFLAGS_ADD([-funit-at-a-time],[POPT_CFLAGS])
+@@ -203,7 +202,7 @@ AC_SUBST([POPT_LDFLAGS])
+ # -fno-delete-null-pointer as the kernel does http://patchwork.kernel.org/patch/36060/
+ # GNU GCC (usually "gcc")
+ AS_IF([test "x$GCC" != x],
+- [ for c in -fno-delete-null-pointer-checks -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector -fexceptions
++ [ for c in -fno-delete-null-pointer-checks -fexceptions
+    do
+   	popt_CFLAGS_ADD([$c], [POPT_CFLAGS])
+    done
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
index a538a60..590f58d 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch
@@ -4,30 +4,28 @@
 want to see the MISSINGOK value so we can avoid recommended packages causing
 failures.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
-Index: rpm-5.4.14/python/rpmmodule.c
+Index: rpm/python/rpmmodule.c
 ===================================================================
---- rpm-5.4.14.orig/python/rpmmodule.c
-+++ rpm-5.4.14/python/rpmmodule.c
-@@ -494,12 +494,16 @@ void init_rpm(void)
-     REGISTER_ENUM(RPMSENSE_EQUAL);
-     REGISTER_ENUM(RPMSENSE_NOTEQUAL);
-     REGISTER_ENUM(RPMSENSE_FIND_REQUIRES);
--#if defined(RPM_VENDOR_MANDRIVA)
-+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
+--- rpm.orig/python/rpmmodule.c
++++ rpm/python/rpmmodule.c
+@@ -525,12 +525,15 @@ static int initModule(PyObject *m)
      REGISTER_ENUM(RPMSENSE_PREREQ);
+     REGISTER_ENUM(RPMSENSE_PRETRANS);
+     REGISTER_ENUM(RPMSENSE_INTERP);
++#else
++ #if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
      REGISTER_ENUM(RPMSENSE_SCRIPT_PRE);
      REGISTER_ENUM(RPMSENSE_SCRIPT_POST);
      REGISTER_ENUM(RPMSENSE_SCRIPT_PREUN);
--    REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN)
-+    REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN);
-+#endif
-+
-+#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
+     REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN);
+     REGISTER_ENUM(RPMSENSE_SCRIPT_VERIFY);
+-#else
 +    REGISTER_ENUM(RPMSENSE_MISSINGOK);
++ #endif
+     REGISTER_ENUM(RPMSENSE_NOTEQUAL);
  #endif
- 
-     REGISTER_ENUM(RPMDEPS_FLAG_NOUPGRADE);
+     REGISTER_ENUM(RPMSENSE_FIND_REQUIRES);
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch
deleted file mode 100644
index b107e8f..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2013-6435.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From 08105acda1da63d32fbb18596a3d6c3e0aa106d1 Mon Sep 17 00:00:00 2001
-From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
-Date: Wed, 10 Jun 2015 14:36:56 +0000
-Subject: [PATCH 2/2] rpm: CVE-2013-6435
-
-Upstream-Status: Backport
-
-Reference:
-https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2013-6435
-
-Description:
-It was found that RPM wrote file contents to the target installation
-directory under a temporary name, and verified its cryptographic signature
-only after the temporary file has been written completely. Under certain
-conditions, the system interprets the unverified temporary file contents
-and extracts commands from it. This could allow an attacker to modify
-signed RPM files in such a way that they would execute code chosen
-by the attacker during package installation.
-
-Original Patch:
-https://bugzilla.redhat.com/attachment.cgi?id=956207
-
-Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
----
- lib/fsm.c     |  2 +-
- rpmio/rpmio.c | 18 ++++++++++++++----
- 2 files changed, 15 insertions(+), 5 deletions(-)
-
-diff --git a/lib/fsm.c b/lib/fsm.c
-index 1ee7e67..094eb1d 100644
---- a/lib/fsm.c
-+++ b/lib/fsm.c
-@@ -726,7 +726,7 @@ static int expandRegular(FSM_t fsm, rpmpsm psm, rpmcpio_t archive, int nodigest)
- {
-     FD_t wfd = NULL;
-     const struct stat * st = &fsm->sb;
--    rpm_loff_t left = st->st_size;
-+    rpm_loff_t left = rpmfiFSizeIndex(fsmGetFi(fsm), fsm->ix);
-     const unsigned char * fidigest = NULL;
-     pgpHashAlgo digestalgo = 0;
-     int rc = 0;
-diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c
-index cd223e8..0b12e31 100644
---- a/rpmio/rpmio.c
-+++ b/rpmio/rpmio.c
-@@ -1309,15 +1309,19 @@ int Fclose(FD_t fd)
-  * - bzopen:	[1-9] is block size (modulo 100K)
-  * - bzopen:	's' is smallmode
-  * - HACK:	'.' terminates, rest is type of I/O
-+ * -            'U' sets *mode to zero (no permissions) instead of 0666
-  */
- static void cvtfmode (const char *m,
- 				char *stdio, size_t nstdio,
- 				char *other, size_t nother,
--				const char **end, int * f)
-+				const char **end, int *f, mode_t *mode)
- {
-     int flags = 0;
-     char c;
- 
-+    if (mode)
-+    *mode = 0666;
-+
-     switch (*m) {
-     case 'a':
- 	flags |= O_WRONLY | O_CREAT | O_APPEND;
-@@ -1357,6 +1361,10 @@ static void cvtfmode (const char *m,
- 	    if (--nstdio > 0) *stdio++ = c;
- 	    continue;
- 	    break;
-+	case 'U':
-+	    if (mode)
-+		*mode = 0;
-+	    break;
- 	default:
- 	    if (--nother > 0) *other++ = c;
- 	    continue;
-@@ -1385,7 +1393,8 @@ fprintf(stderr, "*** Fdopen(%p,%s) %s\n", fd, fmode, fdbg(fd));
-     if (fd == NULL || fmode == NULL)
- 	return NULL;
- 
--    cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, NULL);
-+    cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, NULL,
-+        NULL);
-     if (stdio[0] == '\0')
- 	return NULL;
-     zstdio[0] = '\0';
-@@ -1436,7 +1445,7 @@ FD_t Fopen(const char *path, const char *fmode)
- {
-     char stdio[20], other[20];
-     const char *end = NULL;
--    mode_t perms = 0666;
-+    mode_t perms;
-     int flags = 0;
-     FD_t fd;
- 
-@@ -1444,7 +1453,8 @@ FD_t Fopen(const char *path, const char *fmode)
- 	return NULL;
- 
-     stdio[0] = '\0';
--    cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, &flags);
-+    cvtfmode(fmode, stdio, sizeof(stdio), other, sizeof(other), &end, &flags,
-+        &perms);
-     if (stdio[0] == '\0')
- 	return NULL;
- 
--- 
-1.8.4.5
-
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch
deleted file mode 100644
index bf1795c..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-CVE-2014-8118.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 71c812edf1431a9967bd99ba6ffa6ab89eb7ec7c Mon Sep 17 00:00:00 2001
-From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
-Date: Wed, 10 Jun 2015 12:56:55 +0000
-Subject: [PATCH 1/2] rpm: CVE-2014-8118
-
-Upstream-Status: Backport
-
-Reference:
-https://bugzilla.redhat.com/show_bug.cgi?id=1168715
-
-Description:
-It was found that RPM could encounter an integer overflow,
-leading to a stack-based overflow, while parsing a crafted
-CPIO header in the payload section of an RPM file.  This could
-allow an attacker to modify signed RPM files in such a way that
-they would execute code chosen by the attacker during package
-installation.
-
-Original Patch:
-https://bugzilla.redhat.com/attachment.cgi?id=962159
-
-Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
----
- lib/cpio.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/lib/cpio.c b/lib/cpio.c
-index 382eeb6..74ddd9c 100644
---- a/lib/cpio.c
-+++ b/lib/cpio.c
-@@ -296,6 +296,9 @@ int rpmcpioHeaderRead(rpmcpio_t cpio, char ** path, struct stat * st)
-     st->st_rdev = makedev(major, minor);
- 
-     GET_NUM_FIELD(hdr.namesize, nameSize);
-+    if (nameSize <= 0 || nameSize > 4096) {
-+        return CPIOERR_BAD_HEADER;
-+    }
- 
-     *path = xmalloc(nameSize + 1);
-     read = Fread(*path, nameSize, 1, cpio->fd);
--- 
-1.8.4.5
-
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch
new file mode 100644
index 0000000..cc241f4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-atomic-ops.patch
@@ -0,0 +1,73 @@
+Some architectures do not have __sync_add_and_fetch_8 implemented.
+
+MIPS (32-bit) and some PPC systems do not have sync_add_and_fetch_8.
+
+Provide an alternative.  This alternative function is based on code from:
+  https://github.com/mongodb/libbson/blob/master/src/bson/bson-atomic.c
+
+Code is under an Apache 2.0 License.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/rpmio/bson.h
+===================================================================
+--- rpm-5.4.15.orig/rpmio/bson.h
++++ rpm-5.4.15/rpmio/bson.h
+@@ -879,10 +879,18 @@ BSON_END_DECLS
+ 
+ BSON_BEGIN_DECLS
+ 
++/* Some architectures do not support __sync_add_and_fetch_8 */
++#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
++# define __BSON_NEED_ATOMIC_64 1
++#endif
+ 
+ #if defined(__GNUC__)
+ # define bson_atomic_int_add(p, v)   (__sync_add_and_fetch(p, v))
+-# define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
++#ifndef __BSON_NEED_ATOMIC_64
++#  define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
++# else
++   int64_t bson_atomic_int64_add (volatile int64_t *p, int64_t n);
++# endif
+ # define bson_memory_barrier         __sync_synchronize
+ #elif defined(_MSC_VER) || defined(_WIN32)
+ # define bson_atomic_int_add(p, v)   (InterlockedExchangeAdd((long int *)(p), v))
+Index: rpm-5.4.15/rpmio/bson.c
+===================================================================
+--- rpm-5.4.15.orig/rpmio/bson.c
++++ rpm-5.4.15/rpmio/bson.c
+@@ -3863,13 +3863,30 @@ _bson_context_get_oid_seq64_threadsafe (
+ #elif defined BSON_OS_WIN32
+    uint64_t seq = InterlockedIncrement64 ((int64_t *)&context->seq64);
+ #else
+-   uint64_t seq = __sync_fetch_and_add_8 (&context->seq64, 1);
++   uint64_t seq = bson_atomic_int64_add (&context->seq64, 1);
+ #endif
+ 
+    seq = BSON_UINT64_TO_BE (seq);
+    memcpy (&oid->bytes[4], &seq, 8);
+ }
+ 
++#ifdef __BSON_NEED_ATOMIC_64
++#include <pthread.h>
++static pthread_mutex_t gSync64 = PTHREAD_MUTEX_INITIALIZER;
++int64_t
++bson_atomic_int64_add (volatile int64_t *p,
++                       int64_t           n)
++{
++   int64_t ret;
++
++   pthread_mutex_lock (&gSync64);
++   *p += n;
++   ret = *p;
++   pthread_mutex_unlock (&gSync64);
++
++   return ret;
++}
++#endif
+ 
+ /**
+  * bson_context_new:
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch
new file mode 100644
index 0000000..258a7f6
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-autogen-force.patch
@@ -0,0 +1,78 @@
+In order to enable musl or other libc support, force update the config.guess
+
+In order to reliably replace config.guess and config.sub, we need to remove
+them prior to the call to automake.  Adding the --force-missing is likely
+not necessary, but matching normal OE autoreconf usage.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/autogen.sh
+===================================================================
+--- rpm-5.4.15.orig/autogen.sh
++++ rpm-5.4.15/autogen.sh
+@@ -73,7 +73,8 @@ rm -f aclocal.m4
+ aclocal -I m4
+ autoheader -I m4
+ echo "---> generate files via GNU automake (automake)"
+-automake -Wall -Wno-override -a -c
++rm -f config.guess config.sub
++automake -Wall -Wno-override -a -c --force-missing
+ echo "---> generate files via GNU autoconf (autoconf)"
+ autoconf -I m4
+ echo "<=== rpm"
+Index: rpm-5.4.15/beecrypt/autogen.sh
+===================================================================
+--- rpm-5.4.15.orig/beecrypt/autogen.sh
++++ rpm-5.4.15/beecrypt/autogen.sh
+@@ -25,6 +25,7 @@ libtoolize () {
+ 
+ libtoolize --force --copy
+ aclocal
+-automake -a -c
++rm -f config.guess config.sub
++automake -a -c --force-missing
+ autoconf
+ autoheader
+Index: rpm-5.4.15/libtpm/autogen.sh
+===================================================================
+--- rpm-5.4.15.orig/libtpm/autogen.sh
++++ rpm-5.4.15/libtpm/autogen.sh
+@@ -46,7 +46,8 @@ echo "---> generate files via GNU autoco
+ aclocal
+ autoheader
+ echo "---> generate files via GNU automake (automake)"
+-automake -Wall -Wno-override -a -c
++rm -f config.guess config.sub
++automake -Wall -Wno-override -a -c --force-missing
+ echo "---> generate files via GNU autoconf (autoconf)"
+ autoconf
+ 
+Index: rpm-5.4.15/neon/autogen.sh
+===================================================================
+--- rpm-5.4.15.orig/neon/autogen.sh
++++ rpm-5.4.15/neon/autogen.sh
+@@ -63,7 +63,8 @@ echo "---> generate files via GNU autoco
+ ${ACLOCAL:-aclocal} -I macros
+ ${AUTOHEADER:-autoheader}
+ echo "---> generate files via GNU automake (automake)"
+-${AUTOMAKE:-automake} -Wall -Wno-override -a -c
++rm -f config.guess config.sub
++${AUTOMAKE:-automake} -Wall -Wno-override -a -c --force-missing
+ echo "---> generate files via GNU autoconf (autoconf)"
+ ${AUTOCONF:-autoconf} -Wall
+ 
+Index: rpm-5.4.15/syck/autogen.sh
+===================================================================
+--- rpm-5.4.15.orig/syck/autogen.sh
++++ rpm-5.4.15/syck/autogen.sh
+@@ -40,6 +40,7 @@ echo "---> generate files via GNU autoco
+ aclocal
+ autoheader
+ echo "---> generate files via GNU automake (automake)"
+-automake -Wall -Wno-override -a -c
++rm -f config.guess config.sub
++automake -Wall -Wno-override -a -c --force-missing
+ echo "---> generate files via GNU autoconf (autoconf)"
+ autoconf
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
index 41ab498..81fc849 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-canonarch.patch
@@ -14,7 +14,7 @@
   <arch>-<vendor>-<os>
   <arch>-<vendor>-<os>-<extension>
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
index 77020a3..5d08d27 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db5-or-db6.patch
@@ -1,23 +1,29 @@
-Support both db5 and db6.
+From 7bad268de8b32281e2a12ccd88038b3ec5eb1be3 Mon Sep 17 00:00:00 2001
+From: Yuanjie Huang <Yuanjie.Huang@windriver.com>
+Date: Tue, 15 Dec 2015 18:50:21 +0800
+Subject: [PATCH] Support both db5 and db6.
 
 Upstream-Status: Inappropriate [configuration]
 
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com>
+---
+ configure.ac | 103 ++++++++++++++++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 81 insertions(+), 22 deletions(-)
 
 Index: rpm/configure.ac
 ===================================================================
 --- rpm.orig/configure.ac
 +++ rpm/configure.ac
-@@ -547,8 +547,6 @@ else
+@@ -871,8 +871,6 @@ else
      MYPATH=$PATH
  fi
  
--DBXY=db60
+-DBXY=db61
 -
  AC_PATH_PROG(__BASH, bash, %{_bindir}/bash, $MYPATH)
  AC_PATH_PROG(__BZIP2, bzip2, %{_bindir}/bzip2, $MYPATH)
  AC_PATH_PROG(__CAT, cat, /bin/cat, $MYPATH)
-@@ -560,22 +558,6 @@ AC_PATH_PROG(__CMAKE, cmake, %{_bindir}/
+@@ -884,22 +882,6 @@ AC_PATH_PROG(__CMAKE, cmake, %{_bindir}/
  AC_PATH_PROG(__CPIO, cpio, /bin/cpio, $MYPATH)
  AC_PATH_PROG(__CURL, curl, %{_bindir}/curl, $MYPATH)
  AC_PATH_PROG(__CVS, cvs, %{_bindir}/cvs, $MYPATH)
@@ -40,7 +46,7 @@
  AC_PATH_PROG(__DIFF, diff, /bin/diff, $MYPATH)
  AC_PATH_PROG(__DITTO, ditto, %{_bindir}/ditto, $MYPATH)
  AC_PATH_PROG(__FILE, file, %{_bindir}/file, $MYPATH)
-@@ -1604,13 +1586,18 @@ RPM_CHECK_LIB(
+@@ -2050,13 +2032,46 @@ RPM_CHECK_LIB(
  
  dnl # Berkeley-DB & SQLite
  DBLIBSRCS=""
@@ -48,68 +54,74 @@
 +
  # XXX won't handle --includedir override
 -CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}"
+-RPM_CHECK_LIB(
 +CPPFLAGS_save="${CPPFLAGS}"
-+CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-6.0"
++CPPFLAGS="${CPPFLAGS_save}"
 +with_db_save="${with_db}"
- RPM_CHECK_LIB(
++
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#include <db.h>
++]],
++[[
++#if DB_VERSION_MAJOR < 6
++#error DB_VERSION_MAJOR is below 6
++#endif
++]])],
++[RPM_CHECK_LIB(
      [Berkeley-DB], [db],
-     [db-6.0], [db_create], [db.h],
+     [db-6.1], [db_create], [db.h],
 -    [yes,external], [db3],
 +    [yes,external], [db6],
      [ DBLIBSRCS="$DBLIBSRCS db3.c"
-+      DBXY=db60
++      DBXY=db61
++      AM_CONDITIONAL(WITH_DB, [ true ])
++      AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
++      if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
++          AC_DEFINE(HAVE_DB_H, 1, [Have <db.h> header])
++      else
++          WITH_DB_SUBDIR=""
++      fi
++    ],
++    [ AM_CONDITIONAL(WITH_DB, [ false ])
++      AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
++    ])],
++[with_db="${with_db_save}"
++ CPPFLAGS="${CPPFLAGS_save}"
++ RPM_CHECK_LIB(
++    [Berkeley-DB], [db],
++    [db-5.3], [db_create], [db.h],
++    [yes,external], [db53],
++    [ DBLIBSRCS="$DBLIBSRCS db3.c"
++      DBXY=db53
        AM_CONDITIONAL(WITH_DB, [ true ])
        AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
        if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
-@@ -1619,10 +1606,32 @@ RPM_CHECK_LIB(
-           WITH_DB_SUBDIR=""
-       fi
-     ],
--    [ AM_CONDITIONAL(WITH_DB, [ false ])
--      AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
-+    [ # Reset a few variables to fresh
-+      with_db="${with_db_save}"
-+      CPPFLAGS="${CPPFLAGS_save} -I${prefix}/include/db-5.3"
-+      RPM_CHECK_LIB(
-+        [Berkeley-DB], [db],
-+        [db-5.3], [db_create], [db.h],
-+        [yes,external], [db53],
-+        [ DBLIBSRCS="$DBLIBSRCS db3.c"
-+          DBXY=db53
-+          AM_CONDITIONAL(WITH_DB, [ true ])
-+          AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
-+          if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
-+              AC_DEFINE(HAVE_DB_H, 1, [Have <db.h> header])
-+          else
-+              WITH_DB_SUBDIR=""
-+          fi
-+        ],
-+        [ AM_CONDITIONAL(WITH_DB, [ false ])
-+          AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
-+        ])
+@@ -2068,6 +2083,11 @@ RPM_CHECK_LIB(
+     [ AM_CONDITIONAL(WITH_DB, [ false ])
+       AM_CONDITIONAL(WITH_DB_INTERNAL, [ false ])
      ])
- 
-+if test ".$ac_cv_lib_db_6_0_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
++])
++
++if test ".$ac_cv_lib_db_6_1_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
 +    CPPFLAGS="${CPPFLAGS_save}"
 +fi
-+
+ 
  dnl # Sqlite external
  RPM_CHECK_LIB(
-     [SQLite], [sqlite],
-@@ -1633,10 +1642,11 @@ RPM_CHECK_LIB(
+@@ -2078,10 +2098,11 @@ RPM_CHECK_LIB(
+     [])
  
- dnl # Sqlite 3.7.0.1 from db-5.1.19
- dnl XXX error: `db3' is already registered with AC_CONFIG_SUBDIRS.
-+if test ".$ac_cv_lib_db_6_0_db_create" = .yes; then
+ dnl # Sqlite 3.8.3.1 from db-6.1.19
++if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then
  RPM_CHECK_LIB(
      [Berkeley-DB (+SQLite3)], [dbsql],
-     [db_sql-6.0], [sqlite3_open], [dbsql.h],
+     [db_sql-6.1], [sqlite3_open], [dbsql.h],
 -    [yes,external], [db3/sql],
 +    [yes,external], [db6/sql],
      [
        AM_CONDITIONAL(WITH_DBSQL, [ true ])
        AC_DEFINE(WITH_SQLITE, 1, [Define as 1 if building with SQLite library])
-@@ -1650,12 +1660,50 @@ RPM_CHECK_LIB(
+@@ -2095,12 +2116,50 @@ RPM_CHECK_LIB(
      ], [
        AM_CONDITIONAL(WITH_DBSQL, [ false ])
      ])
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db60.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db60.patch
new file mode 100644
index 0000000..b4df8b7
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-db60.patch
@@ -0,0 +1,56 @@
+Set the DB 6 version to match oe-core db 6.0.30
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/configure.ac
+===================================================================
+--- rpm.orig/configure.ac
++++ rpm/configure.ac
+@@ -2049,10 +2049,10 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ ]])],
+ [RPM_CHECK_LIB(
+     [Berkeley-DB], [db],
+-    [db-6.1], [db_create], [db.h],
++    [db-6.0], [db_create], [db.h],
+     [yes,external], [db6],
+     [ DBLIBSRCS="$DBLIBSRCS db3.c"
+-      DBXY=db61
++      DBXY=db60
+       AM_CONDITIONAL(WITH_DB, [ true ])
+       AM_CONDITIONAL(WITH_DB_INTERNAL, [ test ".$RPM_CHECK_LIB_LOCATION" = .internal ])
+       if test ".$RPM_CHECK_LIB_LOCATION" = .internal; then
+@@ -2085,7 +2085,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+     ])
+ ])
+ 
+-if test ".$ac_cv_lib_db_6_1_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
++if test ".$ac_cv_lib_db_6_0_db_create" != .yes -a ".$ac_cv_lib_db_5_3_db_create" != .yes; then
+     CPPFLAGS="${CPPFLAGS_save}"
+ fi
+ 
+@@ -2097,11 +2097,11 @@ RPM_CHECK_LIB(
+     [ DBLIBSRCS="$DBLIBSRCS sqlite.c" ],
+     [])
+ 
+-dnl # Sqlite 3.8.3.1 from db-6.1.19
+-if test ".$ac_cv_lib_db_6_1_db_create" = .yes; then
++dnl # Sqlite 3.8.3.1 from db-6.0.30
++if test ".$ac_cv_lib_db_6_0_db_create" = .yes; then
+ RPM_CHECK_LIB(
+     [Berkeley-DB (+SQLite3)], [dbsql],
+-    [db_sql-6.1], [sqlite3_open], [dbsql.h],
++    [db_sql-6.0], [sqlite3_open], [dbsql.h],
+     [yes,external], [db6/sql],
+     [
+       AM_CONDITIONAL(WITH_DBSQL, [ true ])
+@@ -2253,7 +2253,7 @@ AC_SUBST(WITH_RUBY_CPPFLAGS)
+ AC_SUBST(WITH_RUBY_SUBDIR)
+ AC_SUBST(WITH_RUBY_VENDORARCHDIR)
+ 
+-dnl # Java prerequisites (swiped from db-6.1.19/dist/aclocal_java et al)
++dnl # Java prerequisites (swiped from db-6.0.30/dist/aclocal_java et al)
+ WITH_JAVA=no
+ AC_ARG_WITH([java],
+     AS_HELP_STRING([--with-java], [build RPM with java support]),
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch
deleted file mode 100644
index 8b5f8d6..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-Wno-override-init.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 70d881873b443c9bad502db9665595455d4f0ac9 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 8 Jul 2014 07:41:10 +0800
-Subject: [PATCH] configure.ac: disable -Wno-override-init
-
-Fixed rpm-native.do_configure error on CentOS 5.x:
-
-cc1: error: unrecognized command line option "-Wno-override-init"
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index adeffe0..6746b4c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -163,7 +163,7 @@ AC_ARG_ENABLE(build-warnings,
- # XXX gcc-4.2 on Mac OS X hasn't
- #            CFLAGS="$CFLAGS -Wno-unused-but-set-variable"
- # XXX rpmio/set.c needs this
--            CFLAGS="$CFLAGS -Wno-override-init"
-+#            CFLAGS="$CFLAGS -Wno-override-init"
-         elif test ".`$CC -V 2>&1 | grep 'Sun C'`" != .; then
-             dnl # Sun Studio (usually "cc")
-             CFLAGS="$CFLAGS -v"
---
-1.8.2.1
-
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch
new file mode 100644
index 0000000..124606c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-auto-stack-protector.patch
@@ -0,0 +1,24 @@
+Make security switches manual settings
+
+RPM checks for the availability of the stack protector switch and
+transactional-memory support.  If supported it unconditionally
+enables the compiler options which can cause errors if the support has
+not been built into the compiler.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/configure.ac
+===================================================================
+--- rpm-5.4.15.orig/configure.ac
++++ rpm-5.4.15/configure.ac
+@@ -425,7 +425,7 @@ dnl #  rpm_CFLAGS_ADD([-fstack-arrays],[
+ dnl # build RPM instrumented for extra optimization/security (GCC only)
+ dnl # --- other optimizations
+   rpm_CFLAGS_ADD([-fexceptions], [RPM_CFLAGS])
+-  rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
++dnl  rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
+ dnl #  rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
+ 
+      if test \( ".`$CC --version 2>&1 | grep 'GCC'`" != . \); then
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch
new file mode 100644
index 0000000..adbef6d
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-disable-blaketest.patch
@@ -0,0 +1,28 @@
+rpmio: Disable building of the tblake2 test(s).
+
+There is some type of a dependency fault here that can occasionally result in:
+
+gcc: error: tblake2b.o: No such file or directory
+or
+gcc: error: tblake2bp.o: No such file or directory
+
+These items are simply test cases that are not packaged, so they can be
+safely disabled to resolve the dependency issue.
+
+Upstream-Status: Inappropriate [workaround]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/rpmio/Makefile.am
+===================================================================
+--- rpm-5.4.15.orig/rpmio/Makefile.am
++++ rpm-5.4.15/rpmio/Makefile.am
+@@ -29,7 +29,7 @@ EXTRA_PROGRAMS += bsdiff bspatch pcrsed
+ 	tmire todbc toid tperl tpython tput trpmio tsexp tsvn tsw ttcl \
+ 	dumpasn1 lookup3 trel twitter github tmicrojson duk
+ 
+-noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
++#noinst_PROGRAMS += b2sum tset tblake2b tblake2bp tblake2s tblake2sp tgfs
+ if WITH_LIBGIT2
+ noinst_PROGRAMS += tgit
+ else
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
index 27a0a8d..290ec1a 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-logio-cp.patch
@@ -1,7 +1,7 @@
 Occasionally the cp -p fails with a non-zero return code.  This will cause
 the system abort the build.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch
new file mode 100644
index 0000000..1a08243
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-lua-tests-compilation-failure.patch
@@ -0,0 +1,43 @@
+Upstream-Status: Pending
+
+Subject: lua: fix to build test libs correctly
+
+This patch fixes errors like below.
+
+  | gcc: error: lib21.c: No such file or directory
+  | gcc: fatal error: no input files
+
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ lua/tests/libs/Makefile.am | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/lua/tests/libs/Makefile.am b/lua/tests/libs/Makefile.am
+index 19d1a0b..1e5de72 100644
+--- a/lua/tests/libs/Makefile.am
++++ b/lua/tests/libs/Makefile.am
+@@ -28,16 +28,16 @@ clean:
+ 	rm -f lib1.so lib11.so lib2.so lib21.so lib2-v2.so
+ 
+ lib1.so: lib1.c
+-	$(CC) $(CFLAGS) -o lib1.so lib1.c
++	$(CC) $(CFLAGS) -o lib1.so $(top_srcdir)/lua/tests/libs/lib1.c
+ 
+ lib11.so: lib11.c
+-	$(CC) $(CFLAGS) -o lib11.so lib11.c
++	$(CC) $(CFLAGS) -o lib11.so $(top_srcdir)/lua/tests/libs/lib11.c
+ 
+ lib2.so: lib2.c
+-	$(CC) $(CFLAGS) -o lib2.so lib2.c
++	$(CC) $(CFLAGS) -o lib2.so $(top_srcdir)/lua/tests/libs/lib2.c
+ 
+ lib21.so: lib21.c
+-	$(CC) $(CFLAGS) -o lib21.so lib21.c
++	$(CC) $(CFLAGS) -o lib21.so $(top_srcdir)/lua/tests/libs/lib21.c
+ 
+ lib2-v2.so: lib2.so
+ 	mv lib2.so ./lib2-v2.so
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch
new file mode 100644
index 0000000..c57f24c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-fix-parseEmbedded.patch
@@ -0,0 +1,27 @@
+Fix an issue where parseEmbedded is not defined, but is still used.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/rpmio/macro.c
+===================================================================
+--- rpm.orig/rpmio/macro.c
++++ rpm/rpmio/macro.c
+@@ -1616,8 +1616,6 @@ exit:
+  * @retval *avp		invocation args
+  * @return		script string
+  */
+-#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_MOZJS) || defined(WITH_JNIEMBED) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) || defined(WITH_RUBYEMBED) || defined(WITH_MRUBY_EMBED) || defined(WITH_SQLITE) || defined(WITH_SQUIRREL) || defined(WITH_TCL)
+-
+ static char _FIXME_embedded_interpreter_eval_returned_null[] =
+     "FIXME: embedded interpreter eval returned null.";
+ 
+@@ -1668,7 +1666,6 @@ bingo:
+     script[nb] = '\0';
+     return script;
+ }
+-#endif
+ 
+ /**
+  * The main macro recursion loop.
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
new file mode 100644
index 0000000..36a418f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-gnu-atomic.patch
@@ -0,0 +1,64 @@
+configure.ac: Check if the current compiler supports the transactions
+
+Some distributions appear to have compilers that are built without support
+for transactions, even though they are GCC 4.7 or newer.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/configure.ac
+===================================================================
+--- rpm-5.4.15.orig/configure.ac
++++ rpm-5.4.15/configure.ac
+@@ -425,9 +425,34 @@ dnl # --- other optimizations
+   rpm_CFLAGS_ADD([-D_FORTIFY_SOURCE=2 -fstack-protector], [RPM_CFLAGS])
+ dnl #  rpm_CFLAGS_ADD([-fstack-protector-all],[RPM_CFLAGS])
+ 
+-     if test \( ".`$CC --version 2>&1 | grep 'GCC'`" != . \); then
+-         rpm_CFLAGS_ADD([-fgnu-tm], [RPM_CFLAGS])
+-     fi
++dnl # Check if the current gcc supports -fgnu-tm and __transaction_atomic
++AC_MSG_CHECKING([If the compiler supports __transaction_atomic])
++save_CFLAGS="$CFLAGS"
++save_LDFLAGS="$LDFLAGS"
++CFLAGS="${CFLAGS} -fgnu-tm -litm"
++LDFLAGS="${LDFLAGS} -litm"
++AC_LINK_IFELSE([AC_LANG_SOURCE([[
++int
++main()
++{
++#if !__clang__ &&  ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)) /* XXX gud enuf? */
++        int i = 0;
++        __transaction_atomic { i++; }
++#else
++# error Compiler does not support __transaction_atomic
++#endif
++        return 0;
++}
++]])], [
++        AC_DEFINE([HAVE_GNUC_TM_ATOMIC], [1],
++                [Define to 1 if the compiler supports __transaction_atomic.])
++        AC_MSG_RESULT([yes])
++], [
++	CFLAGS="$save_CFLAGS"
++	LDFLAGS="$save_LDFLAGS"
++	AC_MSG_RESULT([no])
++])
++
+ 
+ dnl # --- options below are added to RPM_CFLAGS but _NOT_ added to CFLAGS
+             CPPFLAGS="$CPPFLAGS $RPM_CPPFLAGS"
+Index: rpm-5.4.15/rpmio/rpmutil.h
+===================================================================
+--- rpm-5.4.15.orig/rpmio/rpmutil.h
++++ rpm-5.4.15/rpmio/rpmutil.h
+@@ -105,7 +105,7 @@
+ #  define RPM_GNUC_INTERNAL
+ #endif
+ 
+-#if !__clang__ &&  __GNUC__ == 4 && __GNUC_MINOR__ >= 7	/* XXX gud enuf? */
++#ifdef HAVE_GNUC_TM_ATOMIC
+ #  define RPM_GNUC_TM_SAFE	__attribute__((transaction_safe))
+ #  define RPM_GNUC_TM_PURE	__attribute__((transaction_pure))
+ #  define RPM_GNUC_TM_CALLABLE	__attribute__((transaction_callable))
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
index 5deb232..057925f 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-hardlink-segfault-fix.patch
@@ -8,7 +8,7 @@
 
 RP 2014/6/10
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Index: rpm-5.4.14/lib/fsm.c
 ===================================================================
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch
new file mode 100644
index 0000000..72884d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-keccak-sse-intrin.patch
@@ -0,0 +1,27 @@
+rpm - rpmio/keccak.c: make SSE/MMX dependent upon gcc config
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/rpmio/keccak.c
+===================================================================
+--- rpm-5.4.15.orig/rpmio/keccak.c
++++ rpm-5.4.15/rpmio/keccak.c
+@@ -17,9 +17,13 @@ http://keccak.noekeon.org/
+ #if OPTIMIZED == 64
+ /* ===== "KeccakOpt64-settings.h" */
+ #define Unrolling 18
+-//#define UseBebigokimisa
+-#define UseSSE
+-//#define UseMMX
++#if defined(__SSE2__)
++ #define UseSSE
++#elif defined(__MMX__)
++ #define UseMMX
++#else
++ #define UseBebigokimisa
++#endif
+ /* ===== */
+ #endif
+ 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
new file mode 100644
index 0000000..1a48db6
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
@@ -0,0 +1,52 @@
+From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 2 Dec 2015 00:56:07 -0800
+Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
+
+The following error can occur:
+  smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3
+error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
+error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32
+
+This was because:
+transactions_color = 001 (ELF32) & 010 (ELF64) & 100 (ELF32 N32 MIPS64)
+FColor = Current file color (001) & transaction_color (111)
+oFcolor = Previous file color (100) & transaction_color (111)
+
+There are two places where the conflict comparisons occur.  In both places
+the 'else' clause was too restrictive (opposite of the 'positive' clause).
+This caused the system to only permit a binary comparison - "new preferred" or
+"old preferred".  It did not permissing "neither preferred".  By removing the
+else comparison the system will now perform a 'last-in-wins' resolution when
+"neither is preferred".
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+---
+ lib/transaction.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+Index: rpm-5.4.14/lib/transaction.c
+===================================================================
+--- rpm-5.4.14.orig/lib/transaction.c
++++ rpm-5.4.14/lib/transaction.c
+@@ -154,7 +154,7 @@ static int handleInstInstalledFile(const
+ 		fi->actions[fx] = FA_SKIPCOLOR;
+ #endif
+ 		rConflicts = 0;
+-	    } else if (FColor & prefcolor) {
++	    } else {
+ #ifdef	REFERENCE
+ 		rpmfsSetAction(fs, fx, FA_CREATE);
+ #else
+@@ -420,7 +420,7 @@ assert(otherFi != NULL);
+ 			fi->actions[i] = FA_SKIPCOLOR;
+ 			rConflicts = 0;
+ 		    } else
+-		    if (FColor == 0 && oFColor == 0) {
++		    {
+ 			/* ... otherwise, do both, last in wins. */
+ 			otherFi->actions[otherFileNum] = FA_CREATE;
+ 			fi->actions[i] = FA_CREATE;
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
index 042e412..e87e02b 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-libsql-fix.patch
@@ -2,7 +2,7 @@
 The problem is that it hasn't been installed yet!  So small change causes
 the libtool to instead use the build version.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
index 790a662..a87518b 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lsb-compatibility.patch
@@ -5,7 +5,7 @@
 we also want to generate a perceived platform based on the valid rpm contents
 of arch and os.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch
deleted file mode 100644
index 7ab49e9..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-lua-fix-print.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-Lua 'print' statement is not working properly inside of RPM 5
-
-The print statement should capture the output and send it to the script
-processing engine, and not display it directly to the screen.
-
-This patch is from: http://rpm5.org/cvs/patchset?cn=17671
-
-Upstream-Status: backport (patchset 17671 from rpm5.org)
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm-5.4.14/CHANGES
-===================================================================
---- rpm-5.4.14.orig/CHANGES
-+++ rpm-5.4.14/CHANGES
-@@ -1,3 +1,4 @@
-+    - jbj: lua: fix: resurrect output capture with lua-5.2.
-     - jbj: verify: fix: broken logic for %ghost avoidance (Mark Hatle).
- 
- 5.4.13 -> 5.4.14:
-Index: rpm-5.4.14/rpmio/rpmlua.c
-===================================================================
---- rpm-5.4.14.orig/rpmio/rpmlua.c
-+++ rpm-5.4.14/rpmio/rpmlua.c
-@@ -175,7 +175,7 @@ rpmlua rpmluaNew(void)
-     };
-     /*@=readonlytrans =nullassign @*/
-     /*@observer@*/ /*@unchecked@*/
--    const luaL_Reg *lib = lualibs;
-+    const luaL_Reg *lib;
-     char *path_buf;
-     char *path_next;
-     char *path;
-@@ -190,31 +190,34 @@ rpmlua rpmluaNew(void)
- 
-     luaL_openlibs(L);
- 
--    for (; lib->name; lib++) {
-+    for (lib = lualibs; lib->name; lib++) {
- 	luaL_requiref(L, lib->name, lib->func, 1);
-+	lua_pop(L, 1);
-     }
- 
-     {	const char * _lua_path = rpmGetPath(rpmluaPath, NULL);
-  	if (_lua_path != NULL) {
-+#if defined(LUA_GLOBALSINDEX)
- 	    lua_pushliteral(L, "LUA_PATH");
- 	    lua_pushstring(L, _lua_path);
-+	    lua_rawset(L, LUA_GLOBALSINDEX);
-+#else
-+	    lua_pushstring(L, _lua_path);
-+	    lua_setglobal(L, "LUA_PATH");
-+#endif
- 	    _lua_path = _free(_lua_path);
- 	}
-     }
- 
- #if defined(LUA_GLOBALSINDEX)
--    lua_rawset(L, LUA_GLOBALSINDEX);
--#else
--    lua_pushglobaltable(L);
--#endif
-     lua_pushliteral(L, "print");
-     lua_pushcfunction(L, rpm_print);
--
--#if defined(LUA_GLOBALSINDEX)
-     lua_rawset(L, LUA_GLOBALSINDEX);
- #else
--    lua_pushglobaltable(L);
-+    lua_pushcfunction(L, rpm_print);
-+    lua_setglobal(L, "print");
- #endif
-+
-     rpmluaSetData(lua, "lua", lua);
- 
-     /* load all standard RPM Lua script files */
-@@ -351,6 +354,9 @@ void rpmluaSetVar(rpmlua _lua, rpmluav v
- #if defined(LUA_GLOBALSINDEX)
- 	if (lua->pushsize == 0)
- 	    lua_pushvalue(L, LUA_GLOBALSINDEX);
-+#else
-+	if (lua->pushsize == 0)
-+	    lua_pushglobaltable(L);
- #endif
- 	if (pushvar(L, var->keyType, &var->key) != -1) {
- 	    if (pushvar(L, var->valueType, &var->value) != -1)
-@@ -1039,14 +1045,15 @@ static int rpm_print (lua_State *L)
-     lua_getglobal(L, "tostring");
-     for (i = 1; i <= n; i++) {
- 	const char *s;
-+	size_t l;
- 	lua_pushvalue(L, -1);  /* function to be called */
- 	lua_pushvalue(L, i);   /* value to print */
- 	lua_call(L, 1, 1);
--	s = lua_tostring(L, -1);  /* get result */
-+	s = lua_tolstring(L, -1, &l);  /* get result */
- 	if (s == NULL)
- 	    return luaL_error(L, "`tostring' must return a string to `print'");
- 	if (lua->storeprint) {
--	    size_t sl = lua_rawlen(L, -1);
-+	    size_t sl = l;
- 	    if ((size_t)(lua->printbufused+sl+1) > lua->printbufsize) {
- 		lua->printbufsize += sl+512;
- 		lua->printbuf = (char *) xrealloc(lua->printbuf, lua->printbufsize);
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
index 07a0cfa..a08412a 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-macros.in-disable-external-key-server.patch
@@ -12,16 +12,20 @@
 
 Signed-off-by: yzhu1 <yanjun.zhu@windriver.com>
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---- a/macros/macros.in
-+++ b/macros/macros.in
-@@ -546,8 +546,8 @@ $_arbitrary_tags_tests	Foo:Bar
+Index: rpm/macros/macros.in
+===================================================================
+--- rpm.orig/macros/macros.in
++++ rpm/macros/macros.in
+@@ -563,10 +563,10 @@ $_arbitrary_tags_tests	Foo:Bar
+ 
  # Horowitz Key Protocol server configuration
  #
+-%_hkp_keyserver         hkp://keys.rpm5.org
++#%_hkp_keyserver         hkp://keys.rpm5.org
  #%_hkp_keyserver         hkp://keys.n3npq.net
--%_hkp_keyserver         hkp://pool.sks-keyservers.net
+ #%_hkp_keyserver         hkp://pool.sks-keyservers.net
 -%_hkp_keyserver_query   %{_hkp_keyserver}/pks/lookup?op=get&search=
-+#%_hkp_keyserver         hkp://pool.sks-keyservers.net
 +#%_hkp_keyserver_query   %{_hkp_keyserver}/pks/lookup?op=get&search=
  
  
- %_nssdb_path	/etc/pki/nssdb
+ # NSS_InitContext() parameter configuration
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch
new file mode 100644
index 0000000..6c3e471
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-mongodb-sasl.patch
@@ -0,0 +1,69 @@
+Fix errors when building with sasl2 disabled
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/rpmio/mongoc.c
+===================================================================
+--- rpm.orig/rpmio/mongoc.c
++++ rpm/rpmio/mongoc.c
+@@ -39,8 +39,10 @@
+ # include <winerror.h>
+ #endif
+ 
++#ifdef HAVE_LIBSASL2
+ #include <sasl/sasl.h>
+ #include <sasl/saslutil.h>
++#endif
+ 
+ #include <openssl/bio.h>
+ #include <openssl/ssl.h>
+@@ -14228,6 +14230,7 @@ mongoc_read_prefs_copy (const mongoc_rea
+    return ret;
+ }
+ 
++#ifdef MONGOC_ENABLE_SASL
+ /*==============================================================*/
+ /* --- mongoc-sasl.c */
+ 
+@@ -14555,6 +14558,7 @@ _mongoc_sasl_step (mongoc_sasl_t *sasl,
+ 
+    return true;
+ }
++#endif
+ 
+ /*==============================================================*/
+ /* --- mongoc-socket.c */
+Index: rpm/rpmio/mongoc.h
+===================================================================
+--- rpm.orig/rpmio/mongoc.h
++++ rpm/rpmio/mongoc.h
+@@ -38,8 +38,10 @@
+ # include <sys/un.h>
+ #endif
+ 
++#ifdef HAVE_LIBSASL2
+ #include <sasl/sasl.h>
+ #include <sasl/saslutil.h>
++#endif
+ 
+ #include <openssl/bio.h>
+ #include <openssl/ssl.h>
+@@ -2455,6 +2457,8 @@ BSON_END_DECLS
+ /*==============================================================*/
+ /* --- mongoc-sasl-private.h */
+ 
++#ifdef MONGOC_ENABLE_SASL
++
+ BSON_BEGIN_DECLS
+ 
+ 
+@@ -2498,6 +2502,7 @@ bool _mongoc_sasl_step             (mong
+ 
+ 
+ BSON_END_DECLS
++#endif
+ 
+ /*==============================================================*/
+ /* --- mongoc-ssl-private.h */
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
index ab6ed2c..e58cc13 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-no-loopmsg.patch
@@ -1,6 +1,6 @@
 lib/order.c: Make the dependency loop messages into debug msgs
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
index 07d586a..e219124 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-opendb-before-verifyscript-to-avoid-null-point.patch
@@ -6,7 +6,7 @@
 fault because of null point(rpmtsGetRdb(ts) == NULL and rpmtsGetRdb(ts)->db_txn).
 So we open rpmdb to avoid bad input when find headerIsEntry true.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
 Index: rpm-5.4.14/lib/verify.c
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
index c15e124..57fc6ce 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-packageorigin.patch
@@ -2,7 +2,7 @@
 
 Written by jbj at rpm5.org
 
-Upstream-Status: Inappropriate [not author]
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
index 9cd02a0..af643b1 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-payload-use-hashed-inode.patch
@@ -17,7 +17,7 @@
 
 RP 2014/6/10
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Index: rpm-5.4.14/build/files.c
 ===================================================================
@@ -124,23 +124,3 @@
      }
  
      ui32 = fl->totalFileSize;
-Index: rpm-5.4.14/lib/fsm.c
-===================================================================
---- rpm-5.4.14.orig/lib/fsm.c
-+++ rpm-5.4.14/lib/fsm.c
-@@ -904,6 +904,7 @@ int fsmMapAttrs(IOSM_t fsm)
- 
-     if (fi && i >= 0 && i < (int) fi->fc) {
- 	mode_t perms = (S_ISDIR(st->st_mode) ? fi->dperms : fi->fperms);
-+	ino_t finalInode = (fi->finodes ? (ino_t)fi->finodes[i] : 0);
- 	mode_t finalMode = (fi->fmodes ? (mode_t)fi->fmodes[i] : perms);
- 	dev_t finalRdev = (dev_t)(fi->frdevs ? fi->frdevs[i] : 0);
- 	rpmuint32_t finalMtime = (fi->fmtimes ? fi->fmtimes[i] : 0);
-@@ -943,6 +944,7 @@ int fsmMapAttrs(IOSM_t fsm)
- 	    if ((S_ISCHR(st->st_mode) || S_ISBLK(st->st_mode))
- 	    && st->st_nlink == 0)
- 		st->st_nlink = 1;
-+	    st->st_ino = finalInode;
- 	    st->st_rdev = finalRdev;
- 	    st->st_mtime = finalMtime;
- 	}
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
index 5d182ad..656de86 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-pkgconfigdeps.patch
@@ -9,14 +9,14 @@
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
-Index: rpm-5.4.14/scripts/pkgconfigdeps.sh
+Index: rpm/scripts/pkgconfigdeps.sh
 ===================================================================
---- rpm-5.4.14.orig/scripts/pkgconfigdeps.sh
-+++ rpm-5.4.14/scripts/pkgconfigdeps.sh
+--- rpm.orig/scripts/pkgconfigdeps.sh
++++ rpm/scripts/pkgconfigdeps.sh
 @@ -18,8 +18,8 @@ case $1 in
      *.pc)
  	# Query the dependencies of the package.
- 	DIR=`dirname ${filename}`
+ 	DIR=$(dirname ${filename})
 -	PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
 -	export PKG_CONFIG_PATH
 +	PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
@@ -27,7 +27,7 @@
 @@ -42,8 +42,8 @@ case $1 in
  	[ -n "$oneshot" ] && echo "$oneshot"; oneshot=""
  	# Query the dependencies of the package.
- 	DIR=`dirname ${filename}`
+ 	DIR=$(dirname ${filename})
 -	PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
 -	export PKG_CONFIG_PATH
 +	PKG_CONFIG_LIBDIR="$DIR:$DIR/../../share/pkgconfig"
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
index f26a6e7..200964f 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform-file-fix.patch
@@ -2,7 +2,7 @@
 to match when computing an arch score, use it just for getting
 information about the platform (cpu/vendor/os). Fixes #3864.
 
-Upstream-Status: Inappropriate [embedded specific]
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Index: rpm-5.4.14/lib/rpmrc.c
 ===================================================================
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform.patch
index 11fd039..3b40fea 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform.patch
@@ -1,6 +1,6 @@
 Fix up platform and related sysinfo file loading.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 This ensures that RPM knows the compatible set of package types at all times.
 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
index fed54e5..b9675c7 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
@@ -1,7 +1,5 @@
 Fix up platform and related sysinfo file loading (part 2).
 
-Upstream-Status: Pending
-
 We need to ensure that we set the _gnu flag somehow.  We do this by reading
 from the platform file, and setting a new _platform_gnu and related vars.
 
@@ -11,6 +9,8 @@
 versions have not been defined.  This preserves existing behavior, but
 ensures reasonable defaults are always available.
 
+Upstream-Status: Submitted [RPM5 maintainer]
+
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
 Index: rpm-5.4.14/lib/rpmrc.c
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
index 07d407d..92ef1dc 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-py-init.patch
@@ -11,15 +11,17 @@
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
-Index: rpm-5.4.14/python/rpmmodule.c
+Index: rpm/python/rpmmodule.c
 ===================================================================
---- rpm-5.4.14.orig/python/rpmmodule.c
-+++ rpm-5.4.14/python/rpmmodule.c
-@@ -392,7 +392,8 @@ void init_rpm(void)
-     if (Py_AtExit(rpm_exithook) == -1)
- 	return;
+--- rpm.orig/python/rpmmodule.c
++++ rpm/python/rpmmodule.c
+@@ -382,9 +382,8 @@ static int initModule(PyObject *m)
+     /* XXX add --noparentdirs --nolinktos to rpmtsCheck() */
+     global_depFlags = (RPMDEPS_FLAG_NOPARENTDIRS | RPMDEPS_FLAG_NOLINKTOS);
  
--    rpmReadConfigFiles(NULL, NULL);
+-    /* failure to initialize rpm (crypto and all) is rather fatal too... */
+-    if (rpmReadConfigFiles(NULL, NULL) == -1)
+-	return 0;
 +    const char *argv[1] = {"rpmmodule", 0};
 +    rpmcliInit(1, argv, NULL);
  
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch
new file mode 100644
index 0000000..df6f472
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-AddErase.patch
@@ -0,0 +1,35 @@
+rpm/python: The RPM5 API requires a hdrNum to be passed in
+
+The former behavior of passing in -1 as the hdrNum resulting in erase
+operations that did not complete, but also did not error.  Changing to
+using the header instance resolves this problem.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/python/rpmts-py.c
+===================================================================
+--- rpm-5.4.15.orig/python/rpmts-py.c
++++ rpm-5.4.15/python/rpmts-py.c
+@@ -241,12 +241,19 @@ static PyObject *
+ rpmts_AddErase(rpmtsObject * s, PyObject * args)
+ {
+     Header h;
++    uint32_t hdrNum;
+ 
+     if (!PyArg_ParseTuple(args, "O&:AddErase", hdrFromPyObject, &h))
+         return NULL;
+ 
+-SPEW((stderr, "*** %s(%p,%p) ts %p\n", __FUNCTION__, s, h, s->ts));
++    hdrNum = headerGetInstance(h);
++
++SPEW((stderr, "*** %s(%p,%p) ts %p hdrNum %ld\n", __FUNCTION__, s, h, s->ts, hdrNum));
++#ifdef REFERENCE /* this doesn't work, RPM5 requires a unique hdrNum */
+     return PyBool_FromLong(rpmtsAddEraseElement(s->ts, h, -1) == 0);
++#else
++    return PyBool_FromLong(rpmtsAddEraseElement(s->ts, h, hdrNum) == 0);
++#endif
+ }
+ 
+ static int
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
new file mode 100644
index 0000000..7a473db
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-restore-origin.patch
@@ -0,0 +1,49 @@
+Fix an issue where the PACKAGEORIGIN is not properly stored.
+
+Restore the rpmtsCallback fdSetOpen call and related code.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/python/rpmts-py.c
+===================================================================
+--- rpm.orig/python/rpmts-py.c
++++ rpm/python/rpmts-py.c
+@@ -672,6 +672,8 @@ rpmtsCallback(const void * hd, const rpm
+     Header h = (Header) hd;
+     struct rpmtsCallbackType_s * cbInfo = data;
+     PyObject * pkgObj = (PyObject *) pkgKey;
++    PyObject * oh = NULL;
++    const char * origin = NULL;
+     PyObject * args, * result;
+     static FD_t fd;
+ 
+@@ -693,8 +695,16 @@ rpmtsCallback(const void * hd, const rpm
+ 	    pkgObj = Py_None;
+ 	    Py_INCREF(pkgObj);
+ 	}
+-    } else
++    } else {
+ 	Py_INCREF(pkgObj);
++	/* XXX yum has (h, rpmloc) tuple as pkgKey. Extract the path. */
++	if (!(PyTuple_Check(pkgObj) && PyArg_ParseTuple(pkgObj, "|Os", &oh, &origin)))
++	    origin = NULL;
++	/* XXX clean up the path, yum paths start "//..." */
++	if (origin && origin[0] == '/' && origin[1] == '/')
++	    origin++;
++    }
++
+ 
+     PyEval_RestoreThread(cbInfo->_save);
+ 
+@@ -723,6 +733,9 @@ SPEW((stderr, "\t%p = fdDup(%d)\n", fd,
+ 
+ 	fcntl(Fileno(fd), F_SETFD, FD_CLOEXEC);
+ 
++	if (origin != NULL)
++	    (void) fdSetOpen(fd, origin, 0, 0);
++
+ 	return fd;
+     } else
+     if (what == RPMCALLBACK_INST_CLOSE_FILE) {
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch
new file mode 100644
index 0000000..dfb5513
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-python-tagname.patch
@@ -0,0 +1,24 @@
+rpm-python-module: Change the extension tag from PyCObject to PyInt
+
+Use the tagValue to determine the custom PyInt value to use for the extension
+tag.  Without this, any custom tag extensions will be returned in a format
+that the tagNumFromPyObject and related functions like hdr_subscript will
+failed to process.  Usually the failure is error: expected a string or integer
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/python/rpmmodule.c
+===================================================================
+--- rpm-5.4.15.orig/python/rpmmodule.c
++++ rpm-5.4.15/python/rpmmodule.c
+@@ -316,7 +316,7 @@ static void addRpmTags(PyObject *module)
+     {
+ 	if (ext->name == NULL || ext->type != HEADER_EXT_TAG)
+ 	    continue;
+-	PyDict_SetItemString(d, (char *) ext->name, to=PyCObject_FromVoidPtr((void *)ext, NULL));
++	PyDict_SetItemString(d, (char *) ext->name, to=PyInt_FromLong(tagValue(ext->name)));
+ 	Py_XDECREF(to);
+         PyDict_SetItem(dict, to, o=PyString_FromString(ext->name + 7));
+ 	Py_XDECREF(o);
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch
deleted file mode 100644
index 769016b..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-remove-sykcparse-decl.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: rpm-5.4.14/syck/lib/syck.h
-===================================================================
---- rpm-5.4.14.orig/syck/lib/syck.h
-+++ rpm-5.4.14/syck/lib/syck.h
-@@ -621,9 +621,6 @@ long syck_seq_count( SyckNode *seq )
-  */
- void syckerror( char *msg )
- 	/*@*/;
--int syckparse( void * )
--	/*@globals fileSystem @*/
--	/*@modifies fileSystem @*/;
- /* XXX union YYSTYPE *sycklval has issues on Mac OS X. */
- int sycklex( void *_sycklval, SyckParser *parser )
- 	/*@modifies _sycklval, parser @*/;
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
index 56a243d..526106d 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-resolvedep.patch
@@ -3,7 +3,7 @@
 When looking up a missing dependencies, such as /bin/sh, we need to lookup
 in both the providename and filepaths DB, not just the filepaths DB.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch
new file mode 100644
index 0000000..71dae49
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmdb-grammar.patch
@@ -0,0 +1,124 @@
+Disable various items that do not cross compile well.
+
+Upstream-Status: Inappropriate [Configuration]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/rpmdb/Makefile.am
+===================================================================
+--- rpm.orig/rpmdb/Makefile.am
++++ rpm/rpmdb/Makefile.am
+@@ -34,10 +34,10 @@ EXTRA_DIST = \
+ 	db3.c sqlite.c db_emu.h librpmdb.vers bdb.sql libsqldb.c \
+ 	logio.awk logio.src logio_recover_template logio_template logio.c \
+ 	logio_rec.c logio_auto.c logio_autop.c logio_auto.h \
+-	qf.l qf.y qf.inp tqf.l tqf.y tqf.inp grammar.y scanner.l json1.js
++	tqf.l tqf.y tqf.inp grammar.y scanner.l json1.js
+ 
+-EXTRA_PROGRAMS = qfcalc qfgraph logio tjfn tqf # tbdb
+-noinst_PROGRAMS = json
++EXTRA_PROGRAMS = qfcalc qfgraph logio # tjfn tqf tbdb
++noinst_PROGRAMS = # json
+ 
+ RPMMISC_LDADD_COMMON = \
+ 	$(top_builddir)/misc/librpmmisc.la \
+@@ -321,54 +321,39 @@ BUILT_SOURCES += .syntastic_c_config
+ .syntastic_c_config: Makefile
+ 	@echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
+ 
+-tjfn_SOURCES = tjfn.c
+-tjfn_LDADD = $(mylibs)
+-
+-LEX =	flex
+-LFLAGS=	-d -T -v -8 -b --yylineno --reentrant --bison-bridge --perf-report
+-YACC =	bison
+-YFLAGS=	-Dapi.pure -t -d -v --report=all
+-
+-BUILT_SOURCES += Jgrammar.c Jgrammar.h Jscanner.c
+-Jgrammar.c: grammar.y
+-	$(YACC) $(YFLAGS) -o $@ $<
+-Jscanner.c: scanner.l
+-	$(LEX) -R -o $@ $<
+-json_SOURCES = Jgrammar.c Jscanner.c json.c
+-
+-testjson: json1.js json
+-	./json json1.js
+-
+-BUILT_SOURCES += Qgrammar.c Qgrammar.h Qscanner.c
+-Qgrammar.c: qf.y
+-	$(YACC) $(YFLAGS) -o $@ $<
+-Qscanner.c: qf.l
+-	$(LEX) -R -o $@ $<
+-qfcalc_SOURCES = Qgrammar.c Qscanner.c interpreter.c
+-qfgraph_SOURCES = Qgrammar.c Qscanner.c graph.c
+-
+-testqf: qfcalc qfgraph
+-	./qfcalc < qf.inp
+-	./qfgraph < qf.inp
+-
+-BUILT_SOURCES += Tgrammar.c Tgrammar.h Tscanner.c
+-Tgrammar.c Tgrammar.h: tqf.y
+-	$(YACC) $(YFLAGS) -o $@ $<
+-Tscanner.c Tscanner.h: tqf.l
+-	$(LEX) --prefix="Tyy" $(LFLAGS) -o $@ $<
+-tqf_SOURCES =	Tgrammar.c Tscanner.c tgraph.c
+-tqf_CFLAGS =	$(CFLAGS) -fsanitize=address # -DTSCANNER_MAIN
+-tqf_LDADD =	../lib/librpm.la \
+-		./librpmdb.la \
+-		../popt/libpopt.la
+-
+-testdir =	$(abs_top_builddir)/tests
+-foo: tqf
+-	-../libtool --mode=execute \
+-	    ./tqf \
+-		--dbpath=$(testdir) \
+-		-r $(testdir)/fodder/*.rpm \
+-		   $(testdir)/fodder/fmtmod.qf
++#tjfn_SOURCES = tjfn.c
++#tjfn_LDADD = $(mylibs)
++#
++#LFLAGS=	-d -T -v -8 -b --yylineno --reentrant --bison-bridge --perf-report
++#
++#BUILT_SOURCES += Jgrammar.c Jgrammar.h Jscanner.c
++#Jgrammar.c Jgrammar.h: grammar.y
++#	$(YACC) $(YFLAGS) -t -d -v -o $@ $<
++#Jscanner.c: scanner.l
++#	$(LEX) -R -o $@ $<
++#json_SOURCES = Jgrammar.c Jscanner.c json.c
++#
++#testjson: json1.js json
++#	./json json1.js
++#
++#BUILT_SOURCES += Tgrammar.c Tgrammar.h Tscanner.c
++#Tgrammar.c Tgrammar.h: tqf.y
++#	$(YACC) $(YFLAGS) -t -d -v -o $@ $<
++#Tscanner.c Tscanner.h: tqf.l
++#	$(LEX) --prefix="Tyy" $(LFLAGS) -o $@ $<
++#tqf_SOURCES =	Tgrammar.c Tscanner.c tgraph.c
++#tqf_CFLAGS =	$(CFLAGS) -fsanitize=address # -DTSCANNER_MAIN
++#tqf_LDADD =	../lib/librpm.la \
++#		./librpmdb.la \
++#		../popt/libpopt.la
++
++#testdir =	$(abs_top_builddir)/tests
++#foo: tqf
++#	-../libtool --mode=execute \
++#	    ./tqf \
++#		--dbpath=$(testdir) \
++#		-r $(testdir)/fodder/*.rpm \
++#		   $(testdir)/fodder/fmtmod.qf
+ 
+ #tbdb_SOURCES = tbdb.c bdb.c
+ #tbdb_LDADD = $(mylibs)
+Index: rpm/configure.ac
+===================================================================
+--- rpm.orig/configure.ac
++++ rpm/configure.ac
+@@ -119,6 +119,7 @@ AC_PROG_MAKE_SET
+ AC_PROG_LIBTOOL
+ AC_PROG_RANLIB
+ AC_PROG_YACC
++AM_PROG_LEX
+ 
+ AC_PATH_PROG(AS, as, as)
+ 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
new file mode 100644
index 0000000..b9a2cbc
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
@@ -0,0 +1,34 @@
+From 16dc683aa50be9789d1674734b06a8a955ff22ad Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 26 Nov 2015 01:36:40 -0800
+Subject: [PATCH] lib/rpmfc.c: fix for N32 MIPS64
+
+It is 'N32 MIPS64', not 'N32 MIPS32' as command file shows:
+$ file image/usr/bin/getent
+getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip]
+
+And "rpm -qp --filecolor" was wrong (it was 1, but should be 4).
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ lib/rpmfc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/rpmfc.c b/lib/rpmfc.c
+index fde00c7..49779f8 100644
+--- a/lib/rpmfc.c
++++ b/lib/rpmfc.c
+@@ -575,7 +575,7 @@ static struct rpmfcTokens_s rpmfcTokens[] = {
+   { " not stripped",		RPMFC_NOTSTRIPPED },
+   { " archive",			RPMFC_ARCHIVE },
+ 
+-  { "MIPS, N32 MIPS32",		RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
++  { "MIPS, N32 MIPS64",		RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
+   { "ELF 32-bit",		RPMFC_ELF32|RPMFC_INCLUDE },
+   { "ELF 64-bit",		RPMFC_ELF64|RPMFC_INCLUDE },
+ 
+-- 
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch
new file mode 100644
index 0000000..9364576
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmio-headers.patch
@@ -0,0 +1,19 @@
+Fix a typo in the rpmio Makefile.am
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/rpmio/Makefile.am
+===================================================================
+--- rpm.orig/rpmio/Makefile.am
++++ rpm/rpmio/Makefile.am
+@@ -121,7 +121,7 @@ luaLPATHdir =	${pkgsharedir)/lua
+ 
+ pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
+ pkginc_HEADERS = argv.h mire.h rpmzlog.h yarn.h \
+-	rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h
++	rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h \
+ 	rpmpgp.h rpmsw.h rpmutil.h
+ noinst_HEADERS = \
+ 	ar.h bcon.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch
deleted file mode 100644
index d8feed7..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-fix.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-rpmpgp.c: Add missing if defs around crypto implementations
-
-Without these, the system will error trying to find the correct crypto 
-library to use.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-
-Index: rpm/rpmio/rpmpgp.c
-===================================================================
---- rpm.orig/rpmio/rpmpgp.c
-+++ rpm/rpmio/rpmpgp.c
-@@ -1339,16 +1339,26 @@ int pgpExportPubkey(pgpDig dig)
- {
-     int rc = 0;		/* assume failure */
- 
-+#if defined(WITH_BEECRYPT)
-     if (pgpImplVecs == &rpmbcImplVecs)
- 	rc = rpmbcExportPubkey(dig);
-+#endif
-+#if defined(WITH_SSL)
-     if (pgpImplVecs == &rpmsslImplVecs)
- 	rc = rpmsslExportPubkey(dig);
-+#endif
-+#if defined(WITH_NSS)
-     if (pgpImplVecs == &rpmnssImplVecs)
- 	rc = rpmnssExportPubkey(dig);
-+#endif
-+#if defined(WITH_GCRYPT)
-     if (pgpImplVecs == &rpmgcImplVecs)
- 	rc = rpmgcExportPubkey(dig);
-+#endif
-+#if defined(WITH_TOMCRYPT)
-     if (pgpImplVecs == &rpmltcImplVecs)
- 	rc = rpmltcExportPubkey(dig);
-+#endif
-     return rc;
- }
- 
-@@ -1356,16 +1366,26 @@ int pgpExportSignature(pgpDig dig, DIGES
- {
-     int rc = 0;		/* assume failure */
- 
-+#if defined(WITH_BEECRYPT)
-     if (pgpImplVecs == &rpmbcImplVecs)
- 	rc = rpmbcExportSignature(dig, ctx);
-+#endif
-+#if defined(WITH_SSL)
-     if (pgpImplVecs == &rpmsslImplVecs)
- 	rc = rpmsslExportSignature(dig, ctx);
-+#endif
-+#if defined(WITH_NSS)
-     if (pgpImplVecs == &rpmnssImplVecs)
- 	rc = rpmnssExportSignature(dig, ctx);
-+#endif
-+#if defined(WITH_GCRYPT)
-     if (pgpImplVecs == &rpmgcImplVecs)
- 	rc = rpmgcExportSignature(dig, ctx);
-+#endif
-+#if defined(WITH_TOMCRYPT)
-     if (pgpImplVecs == &rpmltcImplVecs)
- 	rc = rpmltcExportSignature(dig, ctx);
-+#endif
-     return rc;
- }
- 
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch
new file mode 100644
index 0000000..915d7ef
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-rpmpgp-popt.patch
@@ -0,0 +1,26 @@
+rpmpgp.h: We do not require the popt header in order to use rpmpgp functions
+
+This can cause failures if the internal libpopt is used, as it's header is
+not exported.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.14/rpmio/rpmpgp.h
+===================================================================
+--- rpm-5.4.14.orig/rpmio/rpmpgp.h
++++ rpm-5.4.14/rpmio/rpmpgp.h
+@@ -11,11 +11,11 @@
+  */
+ 
+ #include <string.h>
+-#include <popt.h>
+ #include <rpmiotypes.h>
+ #include <yarn.h>
+ 
+ #if defined(_RPMPGP_INTERNAL)
++#include <popt.h>
+ #include <rpmsw.h>
+ 
+ /*@unchecked@*/
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
index f825372..b55fe22 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-scriptletexechelper.patch
@@ -12,22 +12,21 @@
 
 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
 
-Index: rpm-5.4.14/lib/psm.c
+Index: rpm/lib/psm.c
 ===================================================================
---- rpm-5.4.14.orig/lib/psm.c
-+++ rpm-5.4.14/lib/psm.c
-@@ -806,6 +806,10 @@ static rpmRC runScript(rpmpsm psm, Heade
+--- rpm.orig/lib/psm.c
++++ rpm/lib/psm.c
+@@ -846,6 +846,9 @@ static rpmRC runScript(rpmpsm psm, Heade
+     pid_t pid;
      int xx;
      int i;
- 
 +#ifdef RPM_VENDOR_OE
 +    const char * scriptletWrapper = rpmExpand("%{?_cross_scriptlet_wrapper}", NULL);
 +#endif
-+    
-     if (psm->sstates != NULL && ix >= 0 && ix < RPMSCRIPT_MAX)
- 	ssp = psm->sstates + ix;
-     if (ssp != NULL)
-@@ -872,14 +876,29 @@ assert(he->p.str != NULL);
+ 
+ #ifdef	__clang__
+ #pragma clang diagnostic push
+@@ -923,14 +926,29 @@ assert(he->p.str != NULL);
  		(F_ISSET(psm, UNORDERED) ? "a" : ""));
  
      if (Phe->p.argv == NULL) {
@@ -63,7 +62,7 @@
  	ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path)
  		? 1 : 0);
      }
-@@ -930,7 +949,12 @@ assert(he->p.str != NULL);
+@@ -981,7 +999,12 @@ assert(he->p.str != NULL);
  	    goto exit;
  
  	if (rpmIsDebug() &&
@@ -77,7 +76,7 @@
  	{
  	    static const char set_x[] = "set -x\n";
  	    nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
-@@ -1065,12 +1089,22 @@ assert(he->p.str != NULL);
+@@ -1116,12 +1139,22 @@ assert(he->p.str != NULL);
  
  	{   const char * rootDir = rpmtsRootDir(ts);
  	    if (!rpmtsChrootDone(ts) && rootDir != NULL &&
@@ -100,7 +99,7 @@
  	    xx = Chdir("/");
  	    rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"),
  			psm->stepName, sln, NVRA,
-@@ -2985,6 +3019,13 @@ assert(psm->te != NULL);
+@@ -3052,6 +3085,13 @@ assert(psm->te != NULL);
      case PSM_SCRIPT:	/* Run current package scriptlets. */
  	/* XXX running %verifyscript/%sanitycheck doesn't have psm->te */
      {	rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL);
@@ -114,7 +113,7 @@
  	xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL);
  	rc = runInstScript(psm);
  	if (rc)
-@@ -2992,11 +3033,24 @@ assert(psm->te != NULL);
+@@ -3059,11 +3099,24 @@ assert(psm->te != NULL);
  	else
  	     xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
  	rpmtsGetRdb(ts)->db_txn = NULL;
@@ -139,7 +138,7 @@
  	break;
      case PSM_IMMED_TRIGGERS:
  	/* Run triggers in this package other package(s) set off. */
-@@ -3006,7 +3060,18 @@ assert(psm->te != NULL);
+@@ -3073,7 +3126,18 @@ assert(psm->te != NULL);
  	    F_SET(psm, GOTTRIGGERS);
  	}
  	if (psm->triggers != NULL)
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch
new file mode 100644
index 0000000..d6493c1
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-syck-fix-gram.patch
@@ -0,0 +1,1081 @@
+Fix the syck/lib/gram.y
+
+This resolves a problem during compilation:
+
+../../../rpm/syck/lib/gram.y:66:27: error: 'parser' undeclared (first use in this function)
+            ((SyckParser *)parser)->root = syck_hdlr_add_node( (SyckParser *)parser, $1 );
+                           ^
+../../../rpm/syck/lib/gram.y:66:27: note: each undeclared identifier is reported only once for each function it appears in
+../../../rpm/syck/lib/syck.c: In function 'syck_parse':
+../../../rpm/syck/lib/syck.c:516:5: warning: implicit declaration of function 'syckparse' [-Wimplicit-function-declaration]
+     syckparse( p );
+     ^
+
+This patch was generated by reverting the grammer back to a previous
+version.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/syck/lib/gram.y
+===================================================================
+--- rpm.orig/syck/lib/gram.y
++++ rpm/syck/lib/gram.y
+@@ -9,18 +9,10 @@
+ 
+ %start doc
+ %pure-parser
+-%parse-param {void* parser}
+-%lex-param {void* parser}
+ 
+ 
+ %{
+ 
+-#define YYDEBUG 1
+-#define YYERROR_VERBOSE 1
+-#ifndef YYSTACK_USE_ALLOCA
+-#define YYSTACK_USE_ALLOCA 0
+-#endif
+-
+ #include "system.h"
+ #include "syck.h"
+ #include "debug.h"
+@@ -28,6 +20,9 @@
+ void apply_seq_in_map( SyckParser *parser, SyckNode *n )
+ 	/*@*/;
+ 
++#define YYPARSE_PARAM   parser
++#define YYLEX_PARAM     parser
++
+ #define NULL_NODE(parser, node) \
+         SyckNode *node = syck_new_str( "", scalar_plain ); \
+         if ( ((SyckParser *)parser)->taguri_expansion == 1 ) \
+Index: rpm/syck/lib/Makefile.am
+===================================================================
+--- rpm.orig/syck/lib/Makefile.am
++++ rpm/syck/lib/Makefile.am
+@@ -49,25 +49,25 @@ SYCK_SPLINT_SRCS = \
+ 	token.c \
+ 	implicit.c
+ 
+-#gram.c:	gram.y
+-#	$(YACC) -d -t -v -p syck -o $@ $<
+-#	-@if test -f gram.c; then \
+-#	{ echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
+-#	  echo "/*@-noeffect -noeffectuncon @*/";\
+-#	  echo "/*@-nullassign @*/";\
+-#	  echo "/*@-readonlytrans @*/";\
+-#	  echo "/*@-uniondef @*/";\
+-#	  echo "/*@-warnlintcomments @*/";\
+-#	  cat gram.c;\
+-#	  echo "/*@=warnlintcomments @*/";\
+-#	  echo "/*@=uniondef @*/";\
+-#	  echo "/*@=readonlytrans @*/";\
+-#	  echo "/*@=nullassign @*/";\
+-#	  echo "/*@=noeffect =noeffectuncon @*/";\
+-#	  echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
+-#	} > _gram.c ;\
+-#	  mv -f _gram.c gram.c; \
+-#	fi
++gram.c:	gram.y
++	$(YACC) -d -t -v -p syck -o $@ $<
++	-@if test -f gram.c; then \
++	{ echo "/*@-globs -mods -modnomods -moduncon -modunconnomods @*/";\
++	  echo "/*@-noeffect -noeffectuncon @*/";\
++	  echo "/*@-nullassign @*/";\
++	  echo "/*@-readonlytrans @*/";\
++	  echo "/*@-uniondef @*/";\
++	  echo "/*@-warnlintcomments @*/";\
++	  cat gram.c;\
++	  echo "/*@=warnlintcomments @*/";\
++	  echo "/*@=uniondef @*/";\
++	  echo "/*@=readonlytrans @*/";\
++	  echo "/*@=nullassign @*/";\
++	  echo "/*@=noeffect =noeffectuncon @*/";\
++	  echo "/*@=globs =mods =modnomods =moduncon =modunconnomods @*/";\
++	} > _gram.c ;\
++	  mv -f _gram.c gram.c; \
++	fi
+ 
+ BUILT_SOURCES = gram.c gram.h
+ 
+Index: rpm/syck/lib/implicit.c
+===================================================================
+--- rpm.orig/syck/lib/implicit.c
++++ rpm/syck/lib/implicit.c
+@@ -19,11 +19,6 @@
+ #define YYLIMIT     limit
+ #define YYFILL(n)
+ 
+-#ifdef  __clang__
+-#pragma clang diagnostic push
+-#pragma clang diagnostic ignored "-Wempty-body"
+-#endif
+-
+ void
+ try_tag_implicit( SyckNode *n, int taguri )
+ {
+@@ -3000,8 +2995,4 @@ yy270:	++YYCURSOR;
+ 
+ }
+ 
+-#ifdef  __clang__
+-#pragma clang diagnostic pop
+-#endif
+-
+ /*@=noret@*/
+Index: rpm/syck/lib/syck.c
+===================================================================
+--- rpm.orig/syck/lib/syck.c
++++ rpm/syck/lib/syck.c
+@@ -519,7 +519,7 @@ syck_parse( SyckParser *p )
+ }
+ 
+ void
+-syck_default_error_handler( SyckParser *p, const char *msg )
++syck_default_error_handler( SyckParser *p, char *msg )
+ {
+     printf( "Error at [Line %d, Col %ld]: %s\n", 
+         p->linect,
+Index: rpm/syck/lib/syck.h
+===================================================================
+--- rpm.orig/syck/lib/syck.h
++++ rpm/syck/lib/syck.h
+@@ -175,7 +175,7 @@ typedef struct _syck_str SyckIoStr;
+ typedef struct _syck_level SyckLevel;
+ 
+ typedef SYMID (*SyckNodeHandler)(SyckParser *p, SyckNode *n);
+-typedef void (*SyckErrorHandler)(SyckParser *p, const char *);
++typedef void (*SyckErrorHandler)(SyckParser *p, char *);
+ typedef SyckNode * (*SyckBadAnchorHandler)(SyckParser *p, char *);
+ typedef long (*SyckIoFileRead)(char *, SyckIoFile *, long, long); 
+ typedef long (*SyckIoStrRead)(char *, SyckIoStr *, long, long);
+@@ -546,7 +546,7 @@ long syck_parser_readlen( SyckParser *p,
+ SYMID syck_parse( SyckParser *p )
+ 	/*@globals fileSystem @*/
+ 	/*@modifies p, fileSystem @*/;
+-void syck_default_error_handler( SyckParser *p, const char * )
++void syck_default_error_handler( SyckParser *p, char * )
+ 	/*@globals fileSystem @*/
+ 	/*@modifies p, fileSystem @*/;
+ SYMID syck_yaml2byte_handler( SyckParser *p, SyckNode *n )
+@@ -619,7 +619,7 @@ long syck_seq_count( SyckNode *seq )
+ /*
+  * Lexer prototypes
+  */
+-void syckerror( void *, const char *msg )
++void syckerror( char *msg )
+ 	/*@*/;
+ /* XXX union YYSTYPE *sycklval has issues on Mac OS X. */
+ int sycklex( void *_sycklval, SyckParser *parser )
+Index: rpm/syck/lib/token.c
+===================================================================
+--- rpm.orig/syck/lib/token.c
++++ rpm/syck/lib/token.c
+@@ -270,11 +270,11 @@ sycklex( void * _sycklval, SyckParser *p
+         return sycklex_yaml_utf8( sycklval, parser );
+ 
+         case syck_yaml_utf16:
+-            syckerror( parser, "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
++            syckerror( "UTF-16 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
+         break;
+ 
+         case syck_yaml_utf32:
+-            syckerror( parser, "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
++            syckerror( "UTF-32 is not currently supported in Syck.\nPlease contribute code to help this happen!" );
+         break;
+ 
+         case syck_bytecode_utf8:
+@@ -2739,15 +2739,14 @@ syckwrap(void)
+ }
+ 
+ void 
+-syckerror( void *p, const char *msg )
++syckerror( char *msg )
+ {
+-    SyckParser * parser = (SyckParser *)p;
+ /*@-mods@*/
+-    if ( parser->error_handler == NULL )
+-        parser->error_handler = syck_default_error_handler;
++    if ( syck_parser_ptr->error_handler == NULL )
++        syck_parser_ptr->error_handler = syck_default_error_handler;
+ 
+-    parser->root = parser->root_on_error;
++    syck_parser_ptr->root = syck_parser_ptr->root_on_error;
+ /*@=mods@*/
+-    (parser->error_handler)(parser, msg);
++    (syck_parser_ptr->error_handler)(syck_parser_ptr, msg);
+ }
+ 
+Index: rpm/syck/lib/bytecode.c
+===================================================================
+--- rpm.orig/syck/lib/bytecode.c
++++ rpm/syck/lib/bytecode.c
+@@ -1,10 +1,10 @@
+-/* Generated by re2c 0.9.12 on Tue Mar 14 00:14:53 2006 */
++/* Generated by re2c 0.13.5 on Tue Feb 23 12:04:00 2016 */
+ #line 1 "bytecode.re"
+ /*
+  * bytecode.re
+  *
+  * $Author: why $
+- * $Date: 2005-09-20 08:21:06 +0300 (Tue, 20 Sep 2005) $
++ * $Date: 2005/09/20 05:21:06 $
+  *
+  * Copyright (C) 2003 why the lucky stiff
+  */
+@@ -27,14 +27,11 @@
+ #define YYLINEPTR   parser->lineptr
+ #define YYLINECTPTR parser->linectptr
+ #define YYLINE      parser->linect
+-#define YYFILL(n)   (void) syck_parser_read(parser)
++#define YYFILL(n)   syck_parser_read(parser)
+ 
+-/*@unchecked@*/ /*@null@*/
+ extern SyckParser *syck_parser_ptr;
+ 
+-/*@null@*/
+-char *get_inline( SyckParser *parser )
+-	/*@modifies parser @*/;
++char *get_inline( SyckParser *parser );
+ 
+ /*
+  * Repositions the cursor at `n' offset from the token start.
+@@ -137,14 +134,12 @@ char *get_inline( SyckParser *parser )
+  */
+ int
+ sycklex_bytecode_utf8( YYSTYPE *sycklval, SyckParser *parser )
+-	/*@globals syck_parser_ptr @*/
+-	/*@modifies sycklval, parser, syck_parser_ptr @*/
+ {
+     SyckLevel *lvl;
+     syck_parser_ptr = parser;
+     if ( YYCURSOR == NULL ) 
+     {
+-        (void) syck_parser_read( parser );
++        syck_parser_read( parser );
+     }
+ 
+     if ( parser->force_token != 0 )
+@@ -171,42 +166,37 @@ sycklex_bytecode_utf8( YYSTYPE *sycklval
+ #line 165 "<stdout>"
+ {
+ 	YYCTYPE yych;
+-	unsigned int yyaccept = 0;
+-	goto yy0;
+-	/*@notreached@*/
+-	++YYCURSOR;
+-yy0:
+-	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
++
++	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+ 	yych = *YYCURSOR;
+-	switch(yych){
++	switch (yych) {
+ 	case 0x00:	goto yy2;
+ 	case 'D':	goto yy3;
+ 	default:	goto yy5;
+ 	}
+-yy2:	YYCURSOR = YYMARKER;
+-	switch(yyaccept){
+-	case 0:	goto yy4;
+-	}
+-yy3:	yyaccept = 0;
++yy2:
++	YYCURSOR = YYMARKER;
++	goto yy4;
++yy3:
+ 	yych = *(YYMARKER = ++YYCURSOR);
+-	switch(yych){
+-	case 0x0A:	goto yy6;
+-	case 0x0D:	goto yy8;
++	switch (yych) {
++	case '\n':	goto yy6;
++	case '\r':	goto yy8;
+ 	default:	goto yy4;
+ 	}
+ yy4:
+ #line 199 "bytecode.re"
+-{   YYPOS(0);
++	{   YYPOS(0);
+             goto Document;
+         }
+-#line 195 "<stdout>"
+-yy5:	yych = *++YYCURSOR;
++#line 191 "<stdout>"
++yy5:
++	yych = *++YYCURSOR;
+ 	goto yy4;
+-yy6:	++YYCURSOR;
+-	goto yy7;
+-yy7:
++yy6:
++	++YYCURSOR;
+ #line 186 "bytecode.re"
+-{   if ( lvl->status == syck_lvl_header )
++	{   if ( lvl->status == syck_lvl_header )
+             {
+                 CHK_NL(YYCURSOR);
+                 goto Directive;
+@@ -218,10 +208,11 @@ yy7:
+                 return 0;
+             }
+         }
+-#line 214 "<stdout>"
+-yy8:	++YYCURSOR;
+-	switch((yych = *YYCURSOR)) {
+-	case 0x0A:	goto yy6;
++#line 210 "<stdout>"
++yy8:
++	++YYCURSOR;
++	switch ((yych = *YYCURSOR)) {
++	case '\n':	goto yy6;
+ 	default:	goto yy2;
+ 	}
+ }
+@@ -239,19 +230,15 @@ Document:
+         YYTOKEN = YYCURSOR;
+ 
+ 
+-#line 235 "<stdout>"
++#line 232 "<stdout>"
+ {
+ 	YYCTYPE yych;
+-	goto yy9;
+-	/*@notreached@*/
+-	++YYCURSOR;
+-yy9:
+-	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
++	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+ 	yych = *YYCURSOR;
+-	switch(yych){
++	switch (yych) {
+ 	case 0x00:	goto yy30;
+-	case 0x0A:	goto yy27;
+-	case 0x0D:	goto yy29;
++	case '\n':	goto yy27;
++	case '\r':	goto yy29;
+ 	case 'A':	goto yy19;
+ 	case 'D':	goto yy12;
+ 	case 'E':	goto yy16;
+@@ -264,71 +251,73 @@ yy9:
+ 	case 'c':	goto yy25;
+ 	default:	goto yy11;
+ 	}
+-yy11:yy12:	yych = *++YYCURSOR;
+-	switch(yych){
+-	case 0x0A:	goto yy41;
+-	case 0x0D:	goto yy44;
++yy11:
++yy12:
++	yych = *++YYCURSOR;
++	switch (yych) {
++	case '\n':	goto yy41;
++	case '\r':	goto yy44;
+ 	default:	goto yy11;
+ 	}
+-yy13:	yych = *++YYCURSOR;
+-	switch(yych){
+-	case 0x0A:	goto yy41;
+-	case 0x0D:	goto yy43;
++yy13:
++	yych = *++YYCURSOR;
++	switch (yych) {
++	case '\n':	goto yy41;
++	case '\r':	goto yy43;
+ 	default:	goto yy11;
+ 	}
+-yy14:	yych = *++YYCURSOR;
+-	switch(yych){
+-	case 0x0A:	goto yy38;
+-	case 0x0D:	goto yy40;
++yy14:
++	yych = *++YYCURSOR;
++	switch (yych) {
++	case '\n':	goto yy38;
++	case '\r':	goto yy40;
+ 	default:	goto yy11;
+ 	}
+-yy15:	yych = *++YYCURSOR;
+-	switch(yych){
+-	case 0x0A:	goto yy35;
+-	case 0x0D:	goto yy37;
++yy15:
++	yych = *++YYCURSOR;
++	switch (yych) {
++	case '\n':	goto yy35;
++	case '\r':	goto yy37;
+ 	default:	goto yy11;
+ 	}
+-yy16:	yych = *++YYCURSOR;
+-	switch(yych){
+-	case 0x0A:	goto yy32;
+-	case 0x0D:	goto yy34;
++yy16:
++	yych = *++YYCURSOR;
++	switch (yych) {
++	case '\n':	goto yy32;
++	case '\r':	goto yy34;
+ 	default:	goto yy11;
+ 	}
+-yy17:	++YYCURSOR;
+-	goto yy18;
+-yy18:
++yy17:
++	++YYCURSOR;
+ #line 288 "bytecode.re"
+-{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str); 
++	{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str); 
+             goto Scalar;
+         }
+-#line 296 "<stdout>"
+-yy19:	++YYCURSOR;
+-	goto yy20;
+-yy20:
++#line 295 "<stdout>"
++yy19:
++	++YYCURSOR;
+ #line 292 "bytecode.re"
+-{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
++	{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
+             sycklval->name = get_inline( parser );
+             syck_hdlr_remove_anchor( parser, sycklval->name );
+             CHK_NL(YYCURSOR);
+             return YAML_ANCHOR;
+         }
+-#line 307 "<stdout>"
+-yy21:	++YYCURSOR;
+-	goto yy22;
+-yy22:
++#line 305 "<stdout>"
++yy21:
++	++YYCURSOR;
+ #line 299 "bytecode.re"
+-{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
++	{   ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_str);
+             sycklval->name = get_inline( parser );
+             POP_LEVEL();
+             if ( *( YYCURSOR - 1 ) == '\n' ) YYCURSOR--;
+             return YAML_ALIAS;
+         }
+-#line 318 "<stdout>"
+-yy23:	++YYCURSOR;
+-	goto yy24;
+-yy24:
++#line 315 "<stdout>"
++yy23:
++	++YYCURSOR;
+ #line 306 "bytecode.re"
+-{   char *qstr;
++	{   char *qstr;
+             ADD_BYTE_LEVEL(lvl, lvl->spaces + 1, syck_lvl_open);
+             qstr = get_inline( parser );
+             CHK_NL(YYCURSOR);
+@@ -387,18 +376,16 @@ yy24:
+             sycklval->name = qstr;
+             return YAML_TAGURI;
+         }
+-#line 382 "<stdout>"
+-yy25:	++YYCURSOR;
+-	goto yy26;
+-yy26:
++#line 378 "<stdout>"
++yy25:
++	++YYCURSOR;
+ #line 366 "bytecode.re"
+-{   goto Comment; }
+-#line 388 "<stdout>"
+-yy27:	++YYCURSOR;
+-	goto yy28;
+-yy28:
++	{   goto Comment; }
++#line 383 "<stdout>"
++yy27:
++	++YYCURSOR;
+ #line 368 "bytecode.re"
+-{   CHK_NL(YYCURSOR);
++	{   CHK_NL(YYCURSOR);
+             if ( lvl->status == syck_lvl_seq )
+             {
+                 return YAML_INDENT; 
+@@ -410,26 +397,25 @@ yy28:
+             }
+             goto Document;
+         }
+-#line 405 "<stdout>"
+-yy29:	yych = *++YYCURSOR;
+-	switch(yych){
+-	case 0x0A:	goto yy27;
++#line 399 "<stdout>"
++yy29:
++	yych = *++YYCURSOR;
++	switch (yych) {
++	case '\n':	goto yy27;
+ 	default:	goto yy11;
+ 	}
+-yy30:	++YYCURSOR;
+-	goto yy31;
+-yy31:
++yy30:
++	++YYCURSOR;
+ #line 381 "bytecode.re"
+-{   ENSURE_YAML_IEND(lvl, -1);
++	{   ENSURE_YAML_IEND(lvl, -1);
+             YYPOS(0);
+             return 0;
+         }
+-#line 419 "<stdout>"
+-yy32:	++YYCURSOR;
+-	goto yy33;
+-yy33:
++#line 413 "<stdout>"
++yy32:
++	++YYCURSOR;
+ #line 252 "bytecode.re"
+-{   if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
++	{   if ( lvl->status == syck_lvl_seq && lvl->ncount == 0 )
+             {
+                 lvl->ncount++;
+                 YYPOS(0);
+@@ -464,17 +450,17 @@ yy33:
+             CHK_NL(YYCURSOR);
+             return YAML_IEND;
+         }
+-#line 459 "<stdout>"
+-yy34:	yych = *++YYCURSOR;
+-	switch(yych){
+-	case 0x0A:	goto yy32;
++#line 452 "<stdout>"
++yy34:
++	yych = *++YYCURSOR;
++	switch (yych) {
++	case '\n':	goto yy32;
+ 	default:	goto yy11;
+ 	}
+-yy35:	++YYCURSOR;
+-	goto yy36;
+-yy36:
++yy35:
++	++YYCURSOR;
+ #line 237 "bytecode.re"
+-{   int complex = 0;
++	{   int complex = 0;
+             if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
+             {
+                 complex = 1;
+@@ -488,17 +474,17 @@ yy36:
+             }
+             return YAML_IOPEN;
+         }
+-#line 483 "<stdout>"
+-yy37:	yych = *++YYCURSOR;
+-	switch(yych){
+-	case 0x0A:	goto yy35;
++#line 476 "<stdout>"
++yy37:
++	yych = *++YYCURSOR;
++	switch (yych) {
++	case '\n':	goto yy35;
+ 	default:	goto yy11;
+ 	}
+-yy38:	++YYCURSOR;
+-	goto yy39;
+-yy39:
++yy38:
++	++YYCURSOR;
+ #line 222 "bytecode.re"
+-{   int complex = 0;
++	{   int complex = 0;
+             if ( lvl->ncount % 2 == 0 && ( lvl->status == syck_lvl_map || lvl->status == syck_lvl_seq ) )
+             {
+                 complex = 1;
+@@ -512,29 +498,31 @@ yy39:
+             }
+             return YAML_IOPEN;
+         }
+-#line 507 "<stdout>"
+-yy40:	yych = *++YYCURSOR;
+-	switch(yych){
+-	case 0x0A:	goto yy38;
++#line 500 "<stdout>"
++yy40:
++	yych = *++YYCURSOR;
++	switch (yych) {
++	case '\n':	goto yy38;
+ 	default:	goto yy11;
+ 	}
+-yy41:	++YYCURSOR;
+-	goto yy42;
+-yy42:
++yy41:
++	++YYCURSOR;
+ #line 217 "bytecode.re"
+-{   ENSURE_YAML_IEND(lvl, -1);
++	{   ENSURE_YAML_IEND(lvl, -1);
+                 YYPOS(0);
+                 return 0;
+             }
+-#line 521 "<stdout>"
+-yy43:	yych = *++YYCURSOR;
+-	switch(yych){
+-	case 0x0A:	goto yy41;
++#line 514 "<stdout>"
++yy43:
++	yych = *++YYCURSOR;
++	switch (yych) {
++	case '\n':	goto yy41;
+ 	default:	goto yy11;
+ 	}
+-yy44:	++YYCURSOR;
+-	switch((yych = *YYCURSOR)) {
+-	case 0x0A:	goto yy41;
++yy44:
++	++YYCURSOR;
++	switch ((yych = *YYCURSOR)) {
++	case '\n':	goto yy41;
+ 	default:	goto yy11;
+ 	}
+ }
+@@ -548,28 +536,22 @@ Directive:
+         YYTOKEN = YYCURSOR;
+ 
+ 
+-#line 543 "<stdout>"
++#line 538 "<stdout>"
+ {
+ 	YYCTYPE yych;
+-	unsigned int yyaccept = 0;
+-	goto yy45;
+-	/*@notreached@*/
+-	++YYCURSOR;
+-yy45:
+-	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
++	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ 	yych = *YYCURSOR;
+-	switch(yych){
++	switch (yych) {
+ 	case 0x00:	goto yy47;
+ 	case 'V':	goto yy48;
+ 	default:	goto yy50;
+ 	}
+-yy47:	YYCURSOR = YYMARKER;
+-	switch(yyaccept){
+-	case 0:	goto yy49;
+-	}
+-yy48:	yyaccept = 0;
++yy47:
++	YYCURSOR = YYMARKER;
++	goto yy49;
++yy48:
+ 	yych = *(YYMARKER = ++YYCURSOR);
+-	switch(yych){
++	switch (yych) {
+ 	case '.':
+ 	case '/':
+ 	case '0':
+@@ -619,7 +601,8 @@ yy48:	yyaccept = 0;
+ 	case '\\':
+ 	case ']':
+ 	case '^':
+-	case '_':	case 'a':
++	case '_':
++	case 'a':
+ 	case 'b':
+ 	case 'c':
+ 	case 'd':
+@@ -649,17 +632,18 @@ yy48:	yyaccept = 0;
+ 	}
+ yy49:
+ #line 399 "bytecode.re"
+-{   YYCURSOR = YYTOKEN;
++	{   YYCURSOR = YYTOKEN;
+                return YAML_DOCSEP;
+            }
+-#line 646 "<stdout>"
+-yy50:	yych = *++YYCURSOR;
++#line 637 "<stdout>"
++yy50:
++	yych = *++YYCURSOR;
+ 	goto yy49;
+-yy51:	++YYCURSOR;
+-	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
++yy51:
++	++YYCURSOR;
++	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ 	yych = *YYCURSOR;
+-	goto yy52;
+-yy52:	switch(yych){
++	switch (yych) {
+ 	case '.':
+ 	case '/':
+ 	case '0':
+@@ -671,7 +655,8 @@ yy52:	switch(yych){
+ 	case '6':
+ 	case '7':
+ 	case '8':
+-	case '9':	case ';':
++	case '9':
++	case ';':
+ 	case '<':
+ 	case '=':
+ 	case '>':
+@@ -707,7 +692,8 @@ yy52:	switch(yych){
+ 	case '\\':
+ 	case ']':
+ 	case '^':
+-	case '_':	case 'a':
++	case '_':
++	case 'a':
+ 	case 'b':
+ 	case 'c':
+ 	case 'd':
+@@ -736,8 +722,9 @@ yy52:	switch(yych){
+ 	case ':':	goto yy53;
+ 	default:	goto yy47;
+ 	}
+-yy53:	yych = *++YYCURSOR;
+-	switch(yych){
++yy53:
++	yych = *++YYCURSOR;
++	switch (yych) {
+ 	case '.':
+ 	case '/':
+ 	case '0':
+@@ -787,7 +774,8 @@ yy53:	yych = *++YYCURSOR;
+ 	case '\\':
+ 	case ']':
+ 	case '^':
+-	case '_':	case 'a':
++	case '_':
++	case 'a':
+ 	case 'b':
+ 	case 'c':
+ 	case 'd':
+@@ -815,13 +803,13 @@ yy53:	yych = *++YYCURSOR;
+ 	case 'z':	goto yy54;
+ 	default:	goto yy47;
+ 	}
+-yy54:	++YYCURSOR;
+-	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
++yy54:
++	++YYCURSOR;
++	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ 	yych = *YYCURSOR;
+-	goto yy55;
+-yy55:	switch(yych){
+-	case 0x0A:	goto yy56;
+-	case 0x0D:	goto yy58;
++	switch (yych) {
++	case '\n':	goto yy56;
++	case '\r':	goto yy58;
+ 	case '.':
+ 	case '/':
+ 	case '0':
+@@ -871,7 +859,8 @@ yy55:	switch(yych){
+ 	case '\\':
+ 	case ']':
+ 	case '^':
+-	case '_':	case 'a':
++	case '_':
++	case 'a':
+ 	case 'b':
+ 	case 'c':
+ 	case 'd':
+@@ -899,16 +888,16 @@ yy55:	switch(yych){
+ 	case 'z':	goto yy54;
+ 	default:	goto yy47;
+ 	}
+-yy56:	++YYCURSOR;
+-	goto yy57;
+-yy57:
++yy56:
++	++YYCURSOR;
+ #line 396 "bytecode.re"
+-{   CHK_NL(YYCURSOR);
++	{   CHK_NL(YYCURSOR);
+                goto Directive; }
+-#line 899 "<stdout>"
+-yy58:	++YYCURSOR;
+-	switch((yych = *YYCURSOR)) {
+-	case 0x0A:	goto yy56;
++#line 895 "<stdout>"
++yy58:
++	++YYCURSOR;
++	switch ((yych = *YYCURSOR)) {
++	case '\n':	goto yy56;
+ 	default:	goto yy47;
+ 	}
+ }
+@@ -922,40 +911,40 @@ Comment:
+         YYTOKEN = YYCURSOR;
+ 
+ 
+-#line 916 "<stdout>"
++#line 913 "<stdout>"
+ {
+ 	YYCTYPE yych;
+-	goto yy59;
+-	/*@notreached@*/
+-	++YYCURSOR;
+-yy59:
+-	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
++	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ 	yych = *YYCURSOR;
+-	switch(yych){
++	switch (yych) {
+ 	case 0x00:	goto yy61;
+-	case 0x0A:	goto yy62;
+-	case 0x0D:	goto yy64;
++	case '\n':	goto yy62;
++	case '\r':	goto yy64;
+ 	default:	goto yy66;
+ 	}
+-yy61:yy62:	++YYCURSOR;
+-	goto yy63;
++yy61:
++yy62:
++	++YYCURSOR;
+ yy63:
+ #line 412 "bytecode.re"
+-{   CHK_NL(YYCURSOR);
++	{   CHK_NL(YYCURSOR);
+                 goto Document; }
+-#line 936 "<stdout>"
+-yy64:	++YYCURSOR;
+-	switch((yych = *YYCURSOR)) {
+-	case 0x0A:	goto yy67;
++#line 931 "<stdout>"
++yy64:
++	++YYCURSOR;
++	switch ((yych = *YYCURSOR)) {
++	case '\n':	goto yy67;
+ 	default:	goto yy65;
+ 	}
+ yy65:
+ #line 415 "bytecode.re"
+-{   goto Comment; }
+-#line 945 "<stdout>"
+-yy66:	yych = *++YYCURSOR;
++	{   goto Comment; }
++#line 941 "<stdout>"
++yy66:
++	yych = *++YYCURSOR;
+ 	goto yy65;
+-yy67:	++YYCURSOR;
++yy67:
++	++YYCURSOR;
+ 	yych = *YYCURSOR;
+ 	goto yy63;
+ }
+@@ -977,23 +966,20 @@ Scalar2:
+     tok = YYCURSOR;
+ 
+ 
+-#line 970 "<stdout>"
++#line 968 "<stdout>"
+ {
+ 	YYCTYPE yych;
+-	goto yy68;
+-	/*@notreached@*/
+-	++YYCURSOR;
+-yy68:
+-	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
++	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+ 	yych = *YYCURSOR;
+-	switch(yych){
++	switch (yych) {
+ 	case 0x00:	goto yy74;
+-	case 0x0A:	goto yy70;
+-	case 0x0D:	goto yy72;
++	case '\n':	goto yy70;
++	case '\r':	goto yy72;
+ 	default:	goto yy76;
+ 	}
+-yy70:	++YYCURSOR;
+-	switch((yych = *YYCURSOR)) {
++yy70:
++	++YYCURSOR;
++	switch ((yych = *YYCURSOR)) {
+ 	case 'C':	goto yy78;
+ 	case 'N':	goto yy80;
+ 	case 'Z':	goto yy83;
+@@ -1001,50 +987,51 @@ yy70:	++YYCURSOR;
+ 	}
+ yy71:
+ #line 461 "bytecode.re"
+-{   YYCURSOR = tok;
++	{   YYCURSOR = tok;
+             goto ScalarEnd; 
+         }
+-#line 996 "<stdout>"
+-yy72:	++YYCURSOR;
+-	switch((yych = *YYCURSOR)) {
+-	case 0x0A:	goto yy77;
++#line 992 "<stdout>"
++yy72:
++	++YYCURSOR;
++	switch ((yych = *YYCURSOR)) {
++	case '\n':	goto yy77;
+ 	default:	goto yy73;
+ 	}
+ yy73:
+ #line 469 "bytecode.re"
+-{   CAT(str, cap, idx, tok[0]);
++	{   CAT(str, cap, idx, tok[0]);
+             goto Scalar2; 
+         }
+-#line 1007 "<stdout>"
+-yy74:	++YYCURSOR;
+-	goto yy75;
+-yy75:
++#line 1004 "<stdout>"
++yy74:
++	++YYCURSOR;
+ #line 465 "bytecode.re"
+-{   YYCURSOR = tok;
++	{   YYCURSOR = tok;
+             goto ScalarEnd;
+         }
+-#line 1015 "<stdout>"
+-yy76:	yych = *++YYCURSOR;
++#line 1011 "<stdout>"
++yy76:
++	yych = *++YYCURSOR;
+ 	goto yy73;
+-yy77:	yych = *++YYCURSOR;
+-	switch(yych){
++yy77:
++	yych = *++YYCURSOR;
++	switch (yych) {
+ 	case 'C':	goto yy78;
+ 	case 'N':	goto yy80;
+ 	case 'Z':	goto yy83;
+ 	default:	goto yy71;
+ 	}
+-yy78:	++YYCURSOR;
+-	goto yy79;
+-yy79:
++yy78:
++	++YYCURSOR;
+ #line 435 "bytecode.re"
+-{   CHK_NL(tok+1);
++	{   CHK_NL(tok+1);
+             goto Scalar2; }
+-#line 1031 "<stdout>"
+-yy80:	++YYCURSOR;
+-	if(YYLIMIT == YYCURSOR) YYFILL(1);
++#line 1028 "<stdout>"
++yy80:
++	++YYCURSOR;
++	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+ 	yych = *YYCURSOR;
+-	goto yy81;
+-yy81:	switch(yych){
++	switch (yych) {
+ 	case '0':
+ 	case '1':
+ 	case '2':
+@@ -1059,7 +1046,7 @@ yy81:	switch(yych){
+ 	}
+ yy82:
+ #line 438 "bytecode.re"
+-{   CHK_NL(tok+1);
++	{   CHK_NL(tok+1);
+             if ( tok + 2 < YYCURSOR )
+             {
+                 char *count = tok + 2;
+@@ -1076,16 +1063,15 @@ yy82:
+             }
+             goto Scalar2;
+         }
+-#line 1068 "<stdout>"
+-yy83:	++YYCURSOR;
+-	goto yy84;
+-yy84:
++#line 1065 "<stdout>"
++yy83:
++	++YYCURSOR;
+ #line 456 "bytecode.re"
+-{   CHK_NL(tok+1);
++	{   CHK_NL(tok+1);
+             CAT(str, cap, idx, '\0');
+             goto Scalar2; 
+         }
+-#line 1077 "<stdout>"
++#line 1073 "<stdout>"
+ }
+ #line 473 "bytecode.re"
+ 
+@@ -1122,50 +1108,48 @@ Inline:
+         tok = YYCURSOR;
+ 
+ 
+-#line 1114 "<stdout>"
++#line 1110 "<stdout>"
+ {
+ 	YYCTYPE yych;
+-	goto yy85;
+-	/*@notreached@*/
+-	++YYCURSOR;
+-yy85:
+-	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
++	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+ 	yych = *YYCURSOR;
+-	switch(yych){
++	switch (yych) {
+ 	case 0x00:	goto yy91;
+-	case 0x0A:	goto yy87;
+-	case 0x0D:	goto yy89;
++	case '\n':	goto yy87;
++	case '\r':	goto yy89;
+ 	default:	goto yy93;
+ 	}
+-yy87:	++YYCURSOR;
+-	goto yy88;
++yy87:
++	++YYCURSOR;
+ yy88:
+ #line 508 "bytecode.re"
+-{   CHK_NL(YYCURSOR);
++	{   CHK_NL(YYCURSOR);
+                 return str; }
+-#line 1134 "<stdout>"
+-yy89:	++YYCURSOR;
+-	switch((yych = *YYCURSOR)) {
+-	case 0x0A:	goto yy94;
++#line 1127 "<stdout>"
++yy89:
++	++YYCURSOR;
++	switch ((yych = *YYCURSOR)) {
++	case '\n':	goto yy94;
+ 	default:	goto yy90;
+ 	}
+ yy90:
+ #line 515 "bytecode.re"
+-{   CAT(str, cap, idx, tok[0]);
++	{   CAT(str, cap, idx, tok[0]);
+                 goto Inline; 
+             }
+-#line 1145 "<stdout>"
+-yy91:	++YYCURSOR;
+-	goto yy92;
+-yy92:
++#line 1139 "<stdout>"
++yy91:
++	++YYCURSOR;
+ #line 511 "bytecode.re"
+-{   YYCURSOR = tok;
++	{   YYCURSOR = tok;
+                 return str;
+             }
+-#line 1153 "<stdout>"
+-yy93:	yych = *++YYCURSOR;
++#line 1146 "<stdout>"
++yy93:
++	yych = *++YYCURSOR;
+ 	goto yy90;
+-yy94:	++YYCURSOR;
++yy94:
++	++YYCURSOR;
+ 	yych = *YYCURSOR;
+ 	goto yy88;
+ }
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
index 683275c..5fb40b6 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tag-generate-endian-conversion-fix.patch
@@ -6,7 +6,7 @@
 
 This patch resolves it by taking the byte order that host uses.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Ming Liu <ming.liu@windriver.com>
 ---
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
new file mode 100644
index 0000000..9eb675b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tagname-type.patch
@@ -0,0 +1,25 @@
+rpmdb/tagname.c: Add the 0x54aafb71 (filenames) type to rpmTagGetType
+
+There is already a workaround in the _tagName function to show that the
+special 'filenames' item is value.  This adds a similar patch to the
+_tagType to return the proper type, otherwise it comes back as a simple
+RPM_STRING_ARRAY_TYPE which limits the response to the first element.
+
+Upstream-Status: Submitted [RPM5 maintainer]
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm-5.4.15/rpmdb/tagname.c
+===================================================================
+--- rpm-5.4.15.orig/rpmdb/tagname.c
++++ rpm-5.4.15/rpmdb/tagname.c
+@@ -353,6 +353,9 @@ static unsigned int _tagType(rpmTag tag)
+     case RPMDBI_RECNO:
+     case RPMDBI_HEAP:
+ 	break;
++    /* XXX make sure that h.['filenames'] in python "works". */
++    case 0x54aafb71:
++	return (RPM_STRING_ARRAY_TYPE + RPM_ARRAY_RETURN_TYPE);
+     default:
+ 	if (_rpmTags.byValue == NULL)
+ 	    break;
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
index cb85beb..72d3509 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpm-tools-mtree-LDFLAGS.patch
@@ -1,5 +1,5 @@
 Source: None
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 Author: Khem Raj <raj.khem@gmail.com>
 Date: 2011-03-03
 Description:
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmatch.patch
index 20d13aa..9bbf580 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmatch.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmatch.patch
@@ -1,31 +1,23 @@
-Add configure check for rpmatch() and 
-creates a compatable macro if it is not provided by the C library.
+Create a compatable macro if rpmatch() is not provided by the C library.
+
+This uses an existing configure check.
 
 This is needed for uclibc since it does not have the above function
 implemented.
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
-Index: rpm-5.4.14/configure.ac
+Updated to rpm 5.4.15+.
+
+Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
+
+Index: rpm/system.h
 ===================================================================
---- rpm-5.4.14.orig/configure.ac
-+++ rpm-5.4.14/configure.ac
-@@ -943,7 +943,7 @@ AC_CHECK_FUNCS([dnl
-     ftok getaddrinfo getattrlist getcwd getdelim getline getmode getnameinfo dnl
-     getpassphrase getxattr getwd iconv inet_aton lchflags lchmod lchown dnl
-     lgetxattr lsetxattr lutimes madvise mempcpy mkdtemp mkstemp mtrace dnl
--    posix_fadvise posix_fallocate putenv realpath regcomp secure_getenv __secure_getenv dnl
-+    posix_fadvise posix_fallocate putenv realpath regcomp rpmatch secure_getenv __secure_getenv dnl
-     setattrlist setenv setlocale setmode setxattr dnl
-     sigaddset sigdelset sigemptyset sighold sigrelse sigpause dnl
-     sigprocmask sigsuspend sigaction dnl
-Index: rpm-5.4.14/system.h
-===================================================================
---- rpm-5.4.14.orig/system.h
-+++ rpm-5.4.14/system.h
-@@ -353,6 +353,14 @@ extern int _tolower(int) __THROW	/*@*/;
+--- rpm.orig/system.h
++++ rpm/system.h
+@@ -358,6 +358,14 @@ extern int _tolower(int) __THROW	/*@*/;
  #include <libgen.h>
  #endif
  
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
new file mode 100644
index 0000000..809e54e
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmdb-more-verbose-error-logging-in-rpmTempFile.patch
@@ -0,0 +1,53 @@
+rpmdb: more verbose error logging in rpmTempFile()
+
+Upstream-Status: Inappropriate [debugging]
+
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+
+diff --git a/rpmdb/signature.c b/rpmdb/signature.c
+index dce6c4e..a1d0f06 100644
+--- a/rpmdb/signature.c
++++ b/rpmdb/signature.c
+@@ -37,6 +37,7 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
+     int temput;
+     FD_t fd = NULL;
+     unsigned int ran;
++    int ret = 0;
+ 
+     if (!prefix) prefix = "";
+ 
+@@ -44,8 +45,11 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
+     if (!_initialized) {
+ 	_initialized = 1;
+ 	tempfn = rpmGenPath(prefix, tpmacro, NULL);
+-	if (rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1))
+-	    goto errxit;
++        ret = rpmioMkpath(tempfn, 0755, (uid_t) -1, (gid_t) -1);
++        if (ret) {
++            rpmlog(RPMLOG_ERR, _("error creating temporary directory %s: %d\n"), tempfn, ret);
++            goto errxit;
++        }
+     }
+ 
+     /* XXX should probably use mkstemp here */
+@@ -68,12 +72,16 @@ int rpmTempFile(const char * prefix, const char ** fnptr, void * fdptr)
+ #endif
+ 
+ 	temput = urlPath(tempfn, &tfn);
+-	if (*tfn == '\0') goto errxit;
++	if (*tfn == '\0') {
++            rpmlog(RPMLOG_ERR, _("error creating tempfile: empty filename\n"));
++            goto errxit;
++        }
+ 
+ 	switch (temput) {
+ 	case URL_IS_DASH:
+ 	case URL_IS_HKP:
+ 	case URL_IS_MONGO:	/* XXX FIXME */
++            rpmlog(RPMLOG_ERR, _("error creating temporary file, invalid uri type: %d\n"), temput);
+ 	    goto errxit;
+ 	    /*@notreached@*/ /*@switchbreak@*/ break;
+ 	case URL_IS_HTTPS:
+-- 
+2.6.6
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch
new file mode 100644
index 0000000..c68681c
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch
@@ -0,0 +1,70 @@
+From bb48dbc88a58bc05a43d71a3375fb05358119ec5 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Sun, 20 Mar 2016 20:20:16 -0700
+Subject: [PATCH] rpmqv.c: check _gpg_passphrase before ask for input
+
+rpm always asked for pass phrasae when add signature, which made it
+can't work non-interactively, this patch fix the problem. It will work
+non-interactively if _gpg_passphrase is defined, and work as before if
+not.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ macros/macros.in |    7 +++++--
+ rpmqv.c          |   17 ++++++++++-------
+ 2 files changed, 15 insertions(+), 9 deletions(-)
+
+diff --git a/macros/macros.in b/macros/macros.in
+index 2e5b07d..01b3aad 100644
+--- a/macros/macros.in
++++ b/macros/macros.in
+@@ -520,15 +520,18 @@ $_arbitrary_tags_tests	Foo:Bar
+ #	Macro(s) to hold the arguments passed to GPG/PGP for package
+ #	signing and verification.
+ #
++
++%_gpg_passphrase_way %{?_gpg_passphrase:--passphrase "%{_gpg_passphrase}"}%{!?_gpg_passphrase:--passphrase-fd 3}
++
+ %__gpg_check_password_cmd	%{__gpg} \
+-	gpg --batch --no-verbose --passphrase-fd 3 -u "%{_gpg_name}" -so -
++	gpg --batch --no-verbose %{_gpg_passphrase_way} -u "%{_gpg_name}" -so -
+ #%__pgp_check_password_cmd	%{__pgp} \
+ #	pgp +batchmode=on +verbose=0 "%{_pgp_name}" -sf
+ #%__pgp5_check_password_cmd	%{__pgp} \
+ #	pgps +batchmode=on +verbose=0 +armor=off "%{_pgp_name}" -f
+ 
+ %__gpg_sign_cmd			%{__gpg} \
+-	gpg --batch --no-verbose --no-armor --passphrase-fd 3 --no-secmem-warning \
++	gpg --batch --no-verbose --no-armor %{_gpg_passphrase_way}  --no-secmem-warning \
+ 	-u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}
+ #%__pgp_sign_cmd			%{__pgp} \
+ #	pgp +batchmode=on +verbose=0 +armor=off \
+diff --git a/rpmqv.c b/rpmqv.c
+index b306486..7604396 100644
+--- a/rpmqv.c
++++ b/rpmqv.c
+@@ -831,13 +831,16 @@ int main(int argc, const char ** argv)
+ #endif
+ 	    )
+ 	    {
+-		passPhrase = Getpass(_("Enter pass phrase: "));
+-		if (rpmCheckPassPhrase(passPhrase)) {
+-		    fprintf(stderr, _("Pass phrase check failed\n"));
+-		    ec = EXIT_FAILURE;
+-		    goto exit;
++		passPhrase = rpmExpand("%{?_gpg_passphrase}", NULL);
++		if (passPhrase == NULL || passPhrase[0] == '\0') {
++			passPhrase = Getpass(_("Enter pass phrase: "));
++			if (rpmCheckPassPhrase(passPhrase)) {
++			    fprintf(stderr, _("Pass phrase check failed\n"));
++			    ec = EXIT_FAILURE;
++			    goto exit;
++			}
++			fprintf(stderr, _("Pass phrase is good.\n"));
+ 		}
+-		fprintf(stderr, _("Pass phrase is good.\n"));
+ 		/* XXX Getpass() should realloc instead. */
+ 		passPhrase = xstrdup(passPhrase);
+ 	    }
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
index f08bd68..b2437a8 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/rpmqv_cc_b_gone.patch
@@ -1,4 +1,7 @@
-rpm: compile rpmqv.c instead of rpmqv.cc
+From e8bae261615e19ff8a28683765c9539cfb22a086 Mon Sep 17 00:00:00 2001
+From: Joe Slater <jslater@windriver.com>
+Date: Thu, 17 Jul 2014 18:14:54 -0700
+Subject: [PATCH 1/9] rpm: compile rpmqv.c instead of rpmqv.cc
 
 Some versions of gcc, 4.4.5 for example, will put a reference to __gxx_personality_v0
 into rpm.o and rpmbuild.o.  This means we must link with g++, and the Makefile we
@@ -10,23 +13,38 @@
 
    When linking with g++ is really necessary, the upstream package will do that.
 
-Signed-off-by: Joe Slater <joe.slater@windriver.com>
+Also instead of symlinking files in two places, which can and does race in
+parallel builds, simply refer to the file's full location [RB]
 
+Signed-off-by: Joe Slater <joe.slater@windriver.com>
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+---
+ Makefile.am | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 1dade0a..55f8669 100644
 --- a/Makefile.am
 +++ b/Makefile.am
-@@ -127,13 +127,13 @@ rpm_SOURCES =		build.c
+@@ -201,15 +201,13 @@ rpm_SOURCES =		build.c
  rpm_LDFLAGS =		@LDFLAGS_STATIC@ $(LDFLAGS)
  rpm_LDADD =		rpm.o $(myLDADD)
  rpm.o:	$(top_srcdir)/rpmqv.c
--	$(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.cc
-+	$(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $(top_srcdir)/rpmqv.c
+-	ln -sf $< rpmqv.cc
+-	$(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c rpmqv.cc
++	$(COMPILE) -DIAM_RPMBT -DIAM_RPMDB -DIAM_RPMEIU -DIAM_RPMK -DIAM_RPMQV -o $@ -c $^
  
  rpmbuild_SOURCES =	build.c
  rpmbuild_LDFLAGS =	@LDFLAGS_STATIC@ $(LDFLAGS)
  rpmbuild_LDADD =	rpmbuild.o $(myLDADD)
- rpmbuild.o: $(top_srcdir)/rpmqv.c
--	$(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.cc
-+	$(COMPILE) -DIAM_RPMBT -o $@ -c $(top_srcdir)/rpmqv.c
+ rpmbuild.o:	$(top_srcdir)/rpmqv.c
+-	ln -sf $< rpmqv.cc
+-	$(COMPILE) -DIAM_RPMBT -o $@ -c rpmqv.cc
++	$(COMPILE) -DIAM_RPMBT -o $@ -c $^
  
- .PHONY:	splint
- splint:
+ .syntastic_c_config: Makefile
+ 	@echo $(COMPILE) | tr ' ' '\n' | sed -e '1d' > $@
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/uclibc-support.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
index 8870adb..dc7b048 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm/uclibc-support.patch
@@ -1,13 +1,13 @@
 Define the x* wrappers for uclibc as well
 
-Upstream-Status: Pending
+Upstream-Status: Submitted [RPM5 maintainer]
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
 
-Index: rpm-5.4.14/rpmio/rpmio.h
+Index: rpm/rpmio/rpmio.h
 ===================================================================
---- rpm-5.4.14.orig/rpmio/rpmio.h
-+++ rpm-5.4.14/rpmio/rpmio.h
+--- rpm.orig/rpmio/rpmio.h
++++ rpm/rpmio/rpmio.h
 @@ -23,7 +23,8 @@
   */
  /*@{*/
@@ -18,11 +18,11 @@
  #define USE_COOKIE_SEEK_POINTER 1
  typedef _IO_off64_t 	_libio_off_t;
  typedef _libio_off_t *	_libio_pos_t;
-Index: rpm-5.4.14/system.h
+Index: rpm/system.h
 ===================================================================
---- rpm-5.4.14.orig/system.h
-+++ rpm-5.4.14/system.h
-@@ -481,7 +481,7 @@ extern void muntrace (void)
+--- rpm.orig/system.h
++++ rpm/system.h
+@@ -489,7 +489,7 @@ extern void muntrace (void)
  #endif /* defined(__LCLINT__) */
  
  /* Memory allocation via macro defs to get meaningful locations from mtrace() */
@@ -31,11 +31,11 @@
  #define	xmalloc(_size) 		(malloc(_size) ? : vmefail(_size))
  #define	xcalloc(_nmemb, _size)	(calloc((_nmemb), (_size)) ? : vmefail(_size))
  #define	xrealloc(_ptr, _size)	(realloc((_ptr), (_size)) ? : vmefail(_size))
-Index: rpm-5.4.14/lib/librpm.vers
+Index: rpm/lib/librpm.vers
 ===================================================================
---- rpm-5.4.14.orig/lib/librpm.vers
-+++ rpm-5.4.14/lib/librpm.vers
-@@ -405,6 +405,10 @@ LIBRPM_0
+--- rpm.orig/lib/librpm.vers
++++ rpm/lib/librpm.vers
+@@ -406,6 +406,10 @@ LIBRPM_0
      specedit;
      strict_erasures;
      XrpmtsiInit;
@@ -46,14 +46,14 @@
    local:
      *;
  };
-Index: rpm-5.4.14/rpmio/librpmio.vers
+Index: rpm/rpmio/librpmio.vers
 ===================================================================
---- rpm-5.4.14.orig/rpmio/librpmio.vers
-+++ rpm-5.4.14/rpmio/librpmio.vers
-@@ -1056,6 +1056,10 @@ LIBRPMIO_0
-     mongo_write_concern_set_mode;
-     mongo_write_concern_set_w;
-     mongo_write_concern_set_wtimeout;
+--- rpm.orig/rpmio/librpmio.vers
++++ rpm/rpmio/librpmio.vers
+@@ -1455,6 +1455,10 @@ LIBRPMIO_0
+     _mongoc_write_result_init;
+     _mongoc_write_result_merge;
+     _mongoc_write_result_merge_legacy;
 +    xmalloc;
 +    xrealloc;
 +    xcalloc;
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch b/yocto-poky/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch
deleted file mode 100644
index 71045ae..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm/verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 9e7b72ee0c994609975981e135fc18d0387aefb6 Mon Sep 17 00:00:00 2001
-From: jbj <jbj>
-Date: Wed, 14 May 2014 21:19:41 +0000
-Subject: [PATCH] - verify: fix: broken logic for %ghost avoidance (Mark
- Hatle).
-
-Upstream-Status: Backport
-
-Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
----
- CHANGES      | 1 +
- lib/verify.c | 3 +--
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-Index: rpm-5.4.14/CHANGES
-===================================================================
---- rpm-5.4.14.orig/CHANGES
-+++ rpm-5.4.14/CHANGES
-@@ -1,3 +1,5 @@
-+    - jbj: verify: fix: broken logic for %ghost avoidance (Mark Hatle).
-+
- 5.4.13 -> 5.4.14:
-     - mooney: use __sun instead of __sun__ in #define (lp#1243472).
-     - mooney: rpmconstant: ensure linkage w Oracle Studio 12.3 (lp#1243469).
-Index: rpm-5.4.14/lib/verify.c
-===================================================================
---- rpm-5.4.14.orig/lib/verify.c
-+++ rpm-5.4.14/lib/verify.c
-@@ -588,8 +588,7 @@ uint32_t fc = rpmfiFC(fi);
- 	    continue;
- 
- 	/* If not verifying %ghost, skip ghost files. */
--	/* XXX the broken!!! logic disables %ghost queries always. */
--	if (!(FF_ISSET(qva->qva_fflags, GHOST) && FF_ISSET(fflags, GHOST)))
-+	if (!FF_ISSET(qva->qva_fflags, GHOST) && FF_ISSET(fflags, GHOST))
- 	    continue;
- 
- 	/* Gather per-file data into a carrier. */
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm_4.11.2.bb b/yocto-poky/meta/recipes-devtools/rpm/rpm_4.11.2.bb
deleted file mode 100644
index f4a2110..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm_4.11.2.bb
+++ /dev/null
@@ -1,138 +0,0 @@
-SUMMARY = "The RPM package management system"
-DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
-package management system capable of installing, uninstalling, \
-verifying, querying, and updating software packages. Each software \
-package consists of an archive of files along with information about \
-the package like its version, a description, etc."
-
-SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
-DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
-development files will simplify the process of writing programs that \
-manipulate RPM packages and databases. These files are intended to \
-simplify the process of creating graphical package managers or any \
-other tools that need an intimate knowledge of RPM packages in order \
-to function."
-
-SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages"
-DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
-written in the Python programming language to use the interface \
-supplied by the RPM Package Manager libraries."
-
-HOMEPAGE = "http://www.rpm.org"
-LICENSE = "GPL-2.0+"
-LIC_FILES_CHKSUM ??= "file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
-
-DEPENDS = "db libxml2 xz findutils file popt nss bzip2 elfutils attr zlib acl gzip python"
-DEPENDS_append_class-native = " file-replacement-native"
-
-SRC_URI += "http://rpm.org/releases/rpm-4.11.x/${BP}.tar.bz2 \
-            file://use-pkgconfig-for-python.patch \
-            file://remove-db3-from-configure.patch \
-            file://add_RPMSENSE_MISSINGOK_to_rpmmodule.patch \
-            file://support-suggests-tag.patch \
-            file://remove-dir-check.patch \
-            file://disable_shortcircuited.patch \
-            file://fix_libdir.patch \
-            file://rpm-scriptetexechelp.patch \
-            file://pythondeps.sh \
-            file://rpm-CVE-2014-8118.patch \
-            file://rpm-CVE-2013-6435.patch \
-           "
-
-SRC_URI[md5sum] = "876ac9948a88367054f8ddb5c0e87173"
-SRC_URI[sha256sum] = "403f8de632b33846ce5746f429c21a60f40dff9dcb56f1b4118f37a0652a48d4"
-
-PR = "r1"
-
-inherit autotools
-inherit pythonnative
-inherit pkgconfig
-inherit gettext
-
-EXTRA_OECONF += "--host=${HOST_SYS} \
-                 --program-prefix= \
-                 --prefix=${prefix} \
-                 --exec-prefix=${prefix} \
-                 --bindir=${prefix}/bin \
-                 --sbindir=${prefix}/sbin \
-                 --sysconfdir=${sysconfdir} \
-                 --datadir=${prefix}/share \
-                 --includedir=${prefix}/include \
-                 --libdir=${prefix}/lib \
-                 --libexecdir=${prefix}/libexec \
-                 --localstatedir=${localstatedir} \
-                 --sharedstatedir=${prefix}/com \
-                 --mandir=${mandir} \
-                 --infodir=${infodir} \
-                 --disable-dependency-tracking \
-                 --with-acl \
-                 --without-lua \
-                 --without-cap \
-                 --enable-shared \
-                 --enable-python \
-                 --with-external-db \
-                "
-
-CPPFLAGS_append = " `pkg-config --cflags nss`"
-LDFLAGS_append = " -Wl,-Bsymbolic-functions -ffunction-sections"
-CCFLAGS_append = " -fPIC "
-CXXFLAGS_append = " -fPIC "
-CFLAGS_append = " -fPIC -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE "
-
-do_configure_prepend() {
-    rm -rf sqlite
-    rm -f m4/libtool.m4
-    rm -f m4/lt*.m4
-    rm -rf db3/configure*
-}
-
-do_install_append() {
-    mv ${D}/${base_bindir}/rpm ${D}/${bindir}/
-    rmdir ${D}/${base_bindir}
-    rm -f ${D}${prefix}/lib/*.la
-    rm -f ${D}${prefix}/lib/rpm-plugins/*.la
-    rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la}
-    rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la}
-    rm -fr ${D}/var
-    install -d ${D}${prefix}/lib/rpm/bin
-    ln -s ../debugedit ${D}${prefix}/lib/rpm/bin/debugedit
-    ln -s ../rpmdeps ${D}${prefix}/lib/rpm/bin/rpmdeps-oecore
-    install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
-}
-
-pkg_postinst_${PN}() {
-
-    [ "x\$D" == "x" ] && ldconfig
-    test -f ${localstatedir}/lib/rpm/Packages || rpm --initdb
-    rm -f ${localstatedir}/lib/rpm/Filemd5s \
-          ${localstatedir}/lib/rpm/Filedigests \
-          ${localstatedir}/lib/rpm/Requireversion \
-          ${localstatedir}/lib/rpm/Provideversion
-
-}
-
-pkg_postrm_${PN}() {
-    [ "x\$D" == "x" ] && ldconfig
-
-}
-
-PACKAGES += "python-${PN}"
-PROVIDES += "python-rpm"
-
-FILES_${PN} +=  "${libdir}/rpm \
-                 ${libdir}/rpm-plugins/exec.so \
-                "
-RDEPENDS_${PN} = "base-files run-postinsts"
-RDEPENDS_${PN}_class-native = ""
-
-FILES_${PN}-dbg += "${libdir}/rpm/.debug/* \
-                    ${libdir}/rpm-plugins/.debug/* \
-                    ${libdir}/python2.7/site-packages/rpm/.debug/* \
-                   "
-
-FILES_${PN}-dev += "${libdir}/python2.7/site-packages/rpm/*.la"
-
-FILES_python-${PN} = "${libdir}/python2.7/site-packages/rpm/*"
-RDEPENDS_python-${PN} = "${PN} python"
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb b/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
index 951b251..0991f6d 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
@@ -34,24 +34,22 @@
 written in the Perl programming language to use the interface \
 supplied by the RPM Package Manager libraries."
 
-SUMMARY_perl-module-rpm-dev = "Development components for perl bindings"
-DESCRIPTION_perl-modules-rpm-dev = "Development items such as man pages for use with the Perl \
-language bindings."
-
 HOMEPAGE = "http://rpm5.org/"
-LICENSE = "LGPLv2.1"
+LICENSE = "LGPLv2.1 & Apache-2.0"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
+LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901"
 
-DEPENDS = "libpcre attr acl popt ossp-uuid file byacc-native"
+# We must have gettext-native, we need gettextize, which may not be provided
+DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native"
 DEPENDS_append_class-native = " file-replacement-native"
 
-S = "${WORKDIR}/rpm"
-
 # Apply various fixups that are unique to the CVS environment
 do_fixup_unpack () {
-	ln -sf ../syck ${S}/syck || :
-	ln -sf ../lua ${S}/lua || :
-	ln ${S}/rpmqv.c ${S}/rpmqv.cc || :
+	# 'ln' isn't reliable, and 'mv' could break later builds
+	rm -rf ${S}/syck ; cp -r ${WORKDIR}/syck ${S}/.
+	rm -rf ${S}/lua ; cp -r ${WORKDIR}/lua ${S}/.
+	rm -rf ${S}/popt ; cp -r ${WORKDIR}/popt ${S}/.
+	rm -rf ${S}/beecrypt ; cp -r ${WORKDIR}/beecrypt ${S}/.
 }
 
 addtask fixup_unpack after do_unpack before do_patch
@@ -60,45 +58,34 @@
 # community work in progress.
 DEFAULT_PREFERENCE = "-1"
 
+S = "${WORKDIR}/rpm"
+
 # rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
 # in order to extract the distribution SRPM into a format we can extract...
 SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \
 	   cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=syck \
 	   cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=lua \
-	   file://rpm-log-auto-rm.patch \
-	   file://rpm-db-reduce.patch \
+	   cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=popt \
+	   cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=beecrypt \
 	   file://perfile_rpmdeps.sh \
-	   file://rpm-autogen.patch \
-	   file://rpm-libsql-fix.patch \
+	   file://pythondeps.sh \
+"
+
+# Bug fixes
+SRC_URI += " \
 	   file://header-include-fix.patch \
+	   file://rpm-libsql-fix.patch \
 	   file://rpm-platform.patch \
-	   file://rpm-showrc.patch \
+	   file://rpm-platform2.patch \
 	   file://rpm-tools-mtree-LDFLAGS.patch \
-	   file://rpm-fileclass.patch \
 	   file://rpm-canonarch.patch \
 	   file://rpm-no-loopmsg.patch \
-	   file://rpm-scriptletexechelper.patch \
-	   file://pythondeps.sh \
-	   file://rpmdeps-oecore.patch \
 	   file://rpm-resolvedep.patch \
-	   file://rpm-no-perl-urpm.patch \
-	   file://rpm-macros.patch \
-	   file://rpm-lua.patch \
-	   file://rpm-ossp-uuid.patch \
 	   file://rpm-packageorigin.patch \
-	   file://rpm-pkgconfigdeps.patch \
 	   file://uclibc-support.patch \
 	   file://rpmatch.patch \
-	   file://fstack-protector-configure-check.patch \
-	   file://dbconvert.patch \
-	   file://rpm-uuid-include.patch \
 	   file://makefile-am-exec-hook.patch \
-	   file://rpm-db_buffer_small.patch \
-	   file://rpm-py-init.patch \
 	   file://python-rpm-rpmsense.patch \
-	   file://rpm-reloc-macros.patch \
-	   file://rpm-platform2.patch \
-	   file://rpm-remove-sykcparse-decl.patch \
 	   file://debugedit-segv.patch \
 	   file://debugedit-valid-file-to-fix-segment-fault.patch \
 	   file://rpm-platform-file-fix.patch \
@@ -107,12 +94,63 @@
 	   file://rpm-hardlink-segfault-fix.patch \
 	   file://rpm-payload-use-hashed-inode.patch \
 	   file://rpm-fix-logio-cp.patch \
-	   file://rpm-db5-or-db6.patch \
-	   file://rpm-rpmpgp-fix.patch \
-	   file://rpm-disable-Wno-override-init.patch \
-	   file://rpm-realpath.patch \
-	  "
+	   file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
+	   file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
+	   file://0001-define-EM_AARCH64.patch \
+	   file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
+	   file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
+	   file://rpm-mongodb-sasl.patch \
+	   file://rpm-fix-parseEmbedded.patch \
+	   file://rpm-rpmio-headers.patch \
+	   file://rpm-python-restore-origin.patch \
+	   file://rpm-keccak-sse-intrin.patch \
+	   file://rpm-atomic-ops.patch \
+	   file://rpm-gnu-atomic.patch \
+	   file://rpm-tagname-type.patch \
+	   file://rpm-python-tagname.patch \
+	   file://rpm-python-AddErase.patch \
+	   file://rpm-rpmpgp-popt.patch \
+	   file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
+"
 
+# OE specific changes
+SRC_URI += " \
+	   file://rpm-log-auto-rm.patch \
+	   file://rpm-db-reduce.patch \
+	   file://rpm-autogen.patch \
+	   file://rpm-showrc.patch \
+	   file://rpm-fileclass.patch \
+	   file://rpm-scriptletexechelper.patch \
+	   file://rpmdeps-oecore.patch \
+	   file://rpm-no-perl-urpm.patch \
+	   file://rpm-macros.patch \
+	   file://rpm-lua.patch \
+	   file://rpm-ossp-uuid.patch \
+	   file://rpm-uuid-include.patch \
+	   file://rpm-pkgconfigdeps.patch \
+	   file://no-ldflags-in-pkgconfig.patch \
+	   file://dbconvert.patch \
+	   file://rpm-db_buffer_small.patch \
+	   file://rpm-py-init.patch \
+	   file://rpm-reloc-macros.patch \
+	   file://rpm-db5-or-db6.patch \
+	   file://rpm-db60.patch \
+	   file://rpmqv_cc_b_gone.patch \
+	   file://rpm-realpath.patch \
+	   file://rpm-check-rootpath-reasonableness.patch \
+	   file://rpm-macros.in-disable-external-key-server.patch \
+	   file://configure.ac-check-for-both-gpg2-and-gpg.patch \
+	   file://rpm-disable-auto-stack-protector.patch \
+	   file://popt-disable-auto-stack-protector.patch \
+	   file://rpm-syck-fix-gram.patch \
+	   file://rpm-rpmdb-grammar.patch \
+	   file://rpm-disable-blaketest.patch \
+	   file://rpm-autogen-force.patch \
+"
+
+SRC_URI_append_libc-musl = "\
+           file://0001-rpm-Fix-build-on-musl.patch \
+"
 # Uncomment the following line to enable platform score debugging
 # This is useful when identifying issues with Smart being unable
 # to process certain package feeds.
@@ -122,16 +160,87 @@
 
 acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
 
+# The local distribution macro directory
+distromacrodir = "${libdir}/rpm/poky"
+
 # Specify the default rpm macros in terms of adjustable variables
-rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
-rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
-rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
+rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
+rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
+rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
 
 # sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
 
+# Set the digest algorithm used for verifying file integrity
+# If this value changes, and two different packages have different values
+# the "same file" validation (two packages have a non-conflict file)
+# will fail.  This may lead to upgrade problems.  You should treat this
+# value as a distribution wide setting, and only change it when you intend
+# a full system upgrade!
+#
+# Defined file digest algorithm values (note: not all are available!):
+#       1       MD5 (legacy RPM default)
+#       2       SHA1
+#       3       RIPEMD-160
+#       5       MD2
+#       6       TIGER-192
+#       8       SHA256
+#       9       SHA384
+#       10      SHA512
+#       11      SHA224
+#       104     MD4
+#       105     RIPEMD-128
+#       106     CRC-32
+#       107     ADLER-32
+#       108     CRC-64 (ECMA-182 polynomial, untested uint64_t problems)
+#       109     Jenkins lookup3.c hashlittle()
+#       111     RIPEMD-256
+#       112     RIPEMD-320
+#       188     BLAKE2B
+#       189     BLAKE2BP
+#       190     BLAKE2S
+#       191     BLAKE2SP
+RPM_FILE_DIGEST_ALGO ?= "1"
+
+# All packages build with RPM5 contain a non-repudiable signature.
+# The purpose of this signature is not to show authenticity of a package,
+# but instead act as a secondary package wide validation that shows it
+# wasn't damaged by accident in transport.  (When later you sign the package, 
+# this signature may or may not be replaced as there are three signature 
+# slots, one for DSA/RSA, one for ECSDA, and one reserved.)
+#
+# There is a known issue w/ RSA signatures that if they start with an 0x00
+# the signing and validation may fail.
+#
+# The following is the list of choices for the non-rpudiable signature
+# (note: not all of these are implemented):
+#       DSA             (default)
+#       RSA             (implies SHA1)
+#       ECDSA           (implies SHA256)
+#       DSA/SHA1
+#       DSA/SHA224
+#       DSA/SHA256
+#       DSA/SHA384
+#       DSA/SHA512
+#       RSA/SHA1
+#       RSA/SHA224
+#       RSA/SHA256
+#       RSA/SHA384
+#       RSA/SHA512
+#       ECDSA/SHA224    (using NIST P-224)
+#       ECDSA/SHA256    (using NIST P-256)
+#       ECDSA/SHA384    (using NIST P-384)
+#       ECDSA/SHA512    (using NIST P-521)
+RPM_SELF_SIGN_ALGO ?= "DSA"
+
 # Note: perl and sqlite w/o db specified does not currently work.
 #       tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"
+PACKAGECONFIG ??= "db bzip2 zlib popt openssl libelf python"
+
+# Note: switching to internal popt may not work, as it will generate
+# a shared library which will intentionally not be packaged.
+#
+# If you intend to use the internal version, additional work may be required.
+PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt,"
 
 PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
 PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
@@ -158,10 +267,17 @@
 
 PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3,"
 
-PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--without-beecrypt,beecrypt,"
-PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
-PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss,"
-PACKAGECONFIG[gcrypt] = "--with-gcrypt,--without-gcrypt,gcrypt,"
+# This switch simply disables external beecrypt, RPM5 always uses beecrypt
+# for base64 processing and various digest algorithms.
+# Beecrypt is only the preferred crypto engine if it's the only engine enabled.
+PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--with-beecrypt=internal,beecrypt,"
+
+# --with-usecrypto= setting defined the item as the preferred system
+# crypto engine, which will take priority over the included beecrypt
+PACKAGECONFIG[openssl] = "--with-openssl --with-usecrypto=openssl,--without-openssl,openssl,"
+PACKAGECONFIG[nss] = "--with-nss --with-usecrypto=nss,--without-nss,nss,"
+PACKAGECONFIG[gcrypt] = "--with-gcrypt --with-usecrypto=gcrypt,--without-gcrypt,gcrypt,"
+
 PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils,"
 PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils,"
 
@@ -192,7 +308,6 @@
 		--with-uuid \
 		--with-attr \
 		--with-acl \
-		--with-popt=external \
 		--with-pthreads \
 		--without-cudf \
 		--without-ficl \
@@ -204,6 +319,7 @@
 		--without-gpsee \
 		--without-ruby \
 		--without-squirrel \
+		--without-sasl2 \
 		--with-build-extlibdep \
 		--with-build-maxextlibdep \
 		--without-valgrind \
@@ -223,7 +339,7 @@
 
 LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
 
-PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm-dev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale"
+PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale"
 
 SOLIBS = "5.4.so"
 
@@ -258,10 +374,6 @@
 		${bindir}/rpm2cpio.real \
 		"
 
-FILES_${PN}-dbg += "${libdir}/rpm/.debug \
-		${libdir}/rpm/bin/.debug \
-		"
-
 FILES_${PN}-common = "${bindir}/rpm2cpio \
 		${bindir}/gendiff \
 		${sysconfdir}/rpm \
@@ -345,25 +457,21 @@
 		${libdir}/rpm/vpkg-provides.sh \
 		${libdir}/rpm/vpkg-provides2.sh \
 		${libdir}/rpm/perfile_rpmdeps.sh \
+		${distromacrodir} \
 		"
 RDEPENDS_${PN} = "base-files run-postinsts"
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}-build = "file bash perl"
 
-RDEPENDS_python-rpm = "${PN}"
+RDEPENDS_python-rpm = "${PN} python"
 
-FILES_python-rpm-dbg = "${libdir}/python*/site-packages/rpm/.debug/_*"
-FILES_python-rpm-dev = "${libdir}/python*/site-packages/rpm/*.la"
-FILES_python-rpm-staticdev = "${libdir}/python*/site-packages/rpm/*.a"
 FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
+PROVIDES += "python-rpm"
 
 FILES_perl-module-rpm = "${libdir}/perl/*/* \
 		"
 
-FILES_perl-module-rpm-dev = "${prefix}/share/man/man3/RPM* \
-		"
-
 RDEPENDS_${PN}-dev += "bash"
 
 FILES_${PN}-dev = "${includedir}/rpm \
@@ -392,6 +500,7 @@
 		${libdir}/librpmmisc.a \
 		${libdir}/librpmbuild.a \
 		${libdir}/rpm/lib/liblua.a \
+		${libdir}/python*/site-packages/rpm/*.a \
 		"
 
 do_configure() {
@@ -412,12 +521,20 @@
 }
 
 do_install_append() {
+	# Configure -distribution wide- package crypto settings
+	# If these change, effectively all packages have to be upgraded!
+	sed -i -e 's,%_build_file_digest_algo.*,%_build_sign ${RPM_FILE_DIGEST_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
+	sed -i -e 's,%_build_sign.*,%_build_sign ${RPM_SELF_SIGN_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
+
 	sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
 	sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
 	sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
 	sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
 	sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
 
+	# Enable MIPS64 N32 transactions.  (This is a no-op on non-MIPS targets.)
+	sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros
+
 	# Enable Debian style arbitrary tags...
 	sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
 
@@ -452,16 +569,15 @@
 	rm -f ${D}/${mandir}/man1/lz*.1
 	rm -f ${D}/${libdir}/pkgconfig/liblzma*
 
-	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la}
-	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la}
+	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.a
+	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.la
+	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.a
+	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.la
 
 	#find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
 	#	-o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
 	#find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';'
 
-	# We don't want the default macro set
-	rm -rf ${D}/${libdir}/rpm/{i[3456]86*,athlon*,pentium*,x86_64*,alpha*,sparc*,ia64*,ppc*,s390*,armv[34][lb]*,armv[345]*,mips*,noarch*}
-
 	rm -f ${D}/${libdir}/rpm/dbconvert.sh
 
 	rm -f ${D}/${libdir}/rpm/libsqldb.*
@@ -489,6 +605,91 @@
 
 }
 
+do_install_append_class-target() {
+	# Create and install distribution specific macros
+	mkdir -p ${D}/${distromacrodir}
+	cat << EOF > ${D}/${distromacrodir}/macros
+%_defaultdocdir		${docdir}
+
+%_prefix                ${prefix}
+%_exec_prefix           ${exec_prefix}
+%_datarootdir           ${datadir}
+%_bindir                ${bindir}
+%_sbindir               ${sbindir}
+%_libexecdir            %{_libdir}/%{name}
+%_datadir               ${datadir}
+%_sysconfdir            ${sysconfdir}
+%_sharedstatedir        ${sharedstatedir}
+%_localstatedir         ${localstatedir}
+%_lib                   lib
+%_libdir                %{_exec_prefix}/%{_lib}
+%_includedir            ${includedir}
+%_oldincludedir         ${oldincludedir}
+%_infodir               ${infodir}
+%_mandir                ${mandir}
+%_localedir             %{_libdir}/locale
+EOF
+
+	# Create and install multilib specific macros
+	${@multilib_rpmmacros(d)}
+}
+
+do_install_append_class-native () {
+	sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+}
+
+do_install_append_class-nativesdk () {
+	sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+}
+
+def multilib_rpmmacros(d):
+    localdata = d.createCopy()
+    # We need to clear the TOOLCHAIN_OPTIONS (--sysroot)
+    localdata.delVar('TOOLCHAIN_OPTIONS')
+
+    # Set 'localdata' values to be consistent with 'd' values.
+    localdata.setVar('distromacrodir', d.getVar('distromacrodir', True))
+    localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
+
+    ret = gen_arch_macro(localdata)
+
+    variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+    for item in variants.split():
+        # Load overrides from 'd' to avoid having to reset the value...
+        localdata = d.createCopy()
+        overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
+        localdata.setVar("OVERRIDES", overrides)
+        localdata.setVar("MLPREFIX", item + "-")
+        bb.data.update_data(localdata)
+        ret += gen_arch_macro(localdata)
+    return ret
+
+def gen_arch_macro(d):
+    # Generate shell script to produce the file as part of do_install
+    val  = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n"
+    val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n"
+    val += "%_lib               ${baselib}\n"
+    val += "%_libdir            ${libdir}\n"
+    val += "%_localedir         ${localedir}\n"
+    val += "\n"
+    val += "# Toolchain configuration\n"
+    val += "%TOOLCHAIN_OPTIONS  %{nil}\n"
+    val += "%__ar               ${@d.getVar('AR', True).replace('$','%')}\n"
+    val += "%__as               ${@d.getVar('AS', True).replace('$','%')}\n"
+    val += "%__cc               ${@d.getVar('CC', True).replace('$','%')}\n"
+    val += "%__cpp              ${@d.getVar('CPP', True).replace('$','%')}\n"
+    val += "%__cxx              ${@d.getVar('CXX', True).replace('$','%')}\n"
+    val += "%__ld               ${@d.getVar('LD', True).replace('$','%')}\n"
+    val += "%__nm               ${@d.getVar('NM', True).replace('$','%')}\n"
+    val += "%__objcopy          ${@d.getVar('OBJCOPY', True).replace('$','%')}\n"
+    val += "%__objdump          ${@d.getVar('OBJDUMP', True).replace('$','%')}\n"
+    val += "%__ranlib           ${@d.getVar('RANLIB', True).replace('$','%')}\n"
+    val += "%__strip            ${@d.getVar('STRIP', True).replace('$','%')}\n"
+    val += "EOF\n"
+    val += "\n"
+    return d.expand(val)
+
+
 add_native_wrapper() {
         create_wrapper ${D}/${bindir}/rpm \
 		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.14.bb
deleted file mode 100644
index 73b3734..0000000
--- a/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.14.bb
+++ /dev/null
@@ -1,518 +0,0 @@
-SUMMARY = "The RPM package management system"
-DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
-package management system capable of installing, uninstalling, \
-verifying, querying, and updating software packages. Each software \
-package consists of an archive of files along with information about \
-the package like its version, a description, etc."
-
-RECIPE_NO_UPDATE_REASON = "5.4.15 has a package database issue: http://lists.openembedded.org/pipermail/openembedded-core/2015-August/109187.html"
-
-SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages"
-DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries."
-
-SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
-DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
-development files will simplify the process of writing programs that \
-manipulate RPM packages and databases. These files are intended to \
-simplify the process of creating graphical package managers or any \
-other tools that need an intimate knowledge of RPM packages in order \
-to function."
-
-SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration"
-DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \
-and configuration common between RPM Package Manager."
-
-SUMMARY_${PN}-build = "Scripts and executable programs used to build packages"
-DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \
-that are used to build packages using the RPM Package Manager."
-
-SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages"
-DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
-written in the Python programming language to use the interface \
-supplied by the RPM Package Manager libraries."
-
-SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages"
-DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \
-written in the Perl programming language to use the interface \
-supplied by the RPM Package Manager libraries."
-
-HOMEPAGE = "http://rpm5.org/"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
-
-DEPENDS = "libpcre attr acl popt ossp-uuid file byacc-native"
-DEPENDS_append_class-native = " file-replacement-native"
-
-# rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
-# in order to extract the distribution SRPM into a format we can extract...
-SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;extract=rpm-5.4.14.tar.gz \
-	   file://rpm-log-auto-rm.patch \
-	   file://rpm-db-reduce.patch \
-	   file://perfile_rpmdeps.sh \
-	   file://rpm-autogen.patch \
-	   file://rpm-libsql-fix.patch \
-	   file://header-include-fix.patch \
-	   file://rpm-platform.patch \
-	   file://rpm-showrc.patch \
-	   file://rpm-tools-mtree-LDFLAGS.patch \
-	   file://rpm-fileclass.patch \
-	   file://rpm-canonarch.patch \
-	   file://rpm-no-loopmsg.patch \
-	   file://rpm-scriptletexechelper.patch \
-	   file://pythondeps.sh \
-	   file://rpmdeps-oecore.patch \
-	   file://rpm-resolvedep.patch \
-	   file://rpm-no-perl-urpm.patch \
-	   file://rpm-macros.patch \
-	   file://rpm-lua.patch \
-	   file://rpm-ossp-uuid.patch \
-	   file://rpm-packageorigin.patch \
-	   file://rpm-pkgconfigdeps.patch \
-	   file://uclibc-support.patch \
-	   file://rpmatch.patch \
-	   file://fstack-protector-configure-check.patch \
-	   file://dbconvert.patch \
-	   file://rpm-uuid-include.patch \
-	   file://makefile-am-exec-hook.patch \
-	   file://rpm-db_buffer_small.patch \
-	   file://rpm-py-init.patch \
-	   file://python-rpm-rpmsense.patch \
-	   file://rpm-reloc-macros.patch \
-	   file://rpm-platform2.patch \
-	   file://rpm-remove-sykcparse-decl.patch \
-	   file://debugedit-segv.patch \
-	   file://debugedit-valid-file-to-fix-segment-fault.patch \
-	   file://rpm-platform-file-fix.patch \
-	   file://rpm-lsb-compatibility.patch \
-	   file://rpm-tag-generate-endian-conversion-fix.patch \
-	   file://verify-fix-broken-logic-for-ghost-avoidance-Mark-Hat.patch \
-	   file://rpm-hardlink-segfault-fix.patch \
-	   file://rpm-payload-use-hashed-inode.patch \
-	   file://rpm-fix-logio-cp.patch \
-	   file://rpm-db5-or-db6.patch \
-	   file://rpm-disable-Wno-override-init.patch \
-	   file://rpmqv_cc_b_gone.patch \
-	   file://rpm-realpath.patch \
-	   file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
-	   file://no-ldflags-in-pkgconfig.patch \
-	   file://rpm-lua-fix-print.patch \
-	   file://rpm-check-rootpath-reasonableness.patch \
-	   file://rpm-macros.in-disable-external-key-server.patch \
-	   file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
-	   file://configure.ac-check-for-both-gpg2-and-gpg.patch \
-	  "
-
-# Uncomment the following line to enable platform score debugging
-# This is useful when identifying issues with Smart being unable
-# to process certain package feeds.
-#SRC_URI += "file://rpm-debug-platform.patch"
-
-SRC_URI[md5sum] = "25093d399a0b5d1342d24900a91b347d"
-SRC_URI[sha256sum] = "676e3ab41f72e3b504e04109cfb565a300742f56a7da084f202013b30eeae467"
-
-inherit autotools gettext
-
-acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
-
-# Specify the default rpm macros in terms of adjustable variables
-rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
-rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
-rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
-
-# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
-
-# Note: perl and sqlite w/o db specified does not currently work.
-#       tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
-PACKAGECONFIG ??= "db bzip2 zlib beecrypt openssl libelf python"
-
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
-PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
-PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
-
-WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
-		--with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
-		--with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
-		--without-pythonembed"
-PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
-
-# Perl modules are not built, but they could be enabled fairly easily
-# the perl module creation and installation would need to be patched.
-# (currently has host perl contamination issues)
-WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm"
-WITHOUT_PERL = "--without-perl --without-perl-urpm"
-PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl,"
-
-# The --with-dbsql will only tell RPM to check for support, db
-# may or may not be built w/ the dbsql support.
-WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated"
-PACKAGECONFIG[db] = "${WITH_DB},--without-db,db,"
-
-PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3,"
-
-PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--without-beecrypt,beecrypt,"
-PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
-PACKAGECONFIG[nss] = "--with-nss,--without-nss,nss,"
-PACKAGECONFIG[gcrypt] = "--with-gcrypt,--without-gcrypt,gcrypt,"
-PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils,"
-PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils,"
-
-WITH_SELINUX = "--with-selinux --with-sepol --with-semanage"
-WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage"
-PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libselinux,"
-
-WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi"
-WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi"
-PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat,"
-
-PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat,"
-PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl,"
-
-PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas,"
-
-EXTRA_OECONF += "--verbose \
-		--sysconfdir=${sysconfdir} \
-		--with-file \
-		--with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \
-		--with-syck=internal \
-		--without-readline \
-		--without-libtasn1 \
-		--without-pakchois \
-		--without-gnutls \
-		--with-pcre \
-		--enable-utf8 \
-		--with-uuid \
-		--with-attr \
-		--with-acl \
-		--with-popt=external \
-		--with-pthreads \
-		--without-cudf \
-		--without-ficl \
-		--without-aterm \
-		--without-nix \
-		--without-bash \
-		--without-rc \
-		--without-js \
-		--without-gpsee \
-		--without-ruby \
-		--without-squirrel \
-		--with-build-extlibdep \
-		--with-build-maxextlibdep \
-		--without-valgrind \
-		--disable-openmp \
-		--enable-build-pic \
-		--enable-build-versionscript \
-		--enable-build-warnings \
-		--enable-build-debug \
-		--enable-maintainer-mode \
-		--with-path-macros=${rpm_macros} \
-		--with-path-lib=${libdir}/rpm \
-		--with-bugreport=http://bugzilla.yoctoproject.org \
-		--program-prefix= \
-		YACC=byacc"
-
-CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE"
-
-LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
-
-PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale"
-
-SOLIBS = "5.4.so"
-
-# Based on %files section in the rpm.spec
-
-FILES_${PN} =  "${bindir}/rpm \
-		${bindir}/rpmconstant \
-		${libdir}/rpm/rpm.* \
-		${libdir}/rpm/tgpg \
-		${libdir}/rpm/macros \
-		${libdir}/rpm/rpmpopt \
-		${libdir}/rpm/rpm2cpio \
-		${libdir}/rpm/vcheck \
-		${libdir}/rpm/helpers \
-		${libdir}/rpm/qf \
-		${libdir}/rpm/cpuinfo.yaml \
-		${libdir}/rpm/bin/mtree \
-		${libdir}/rpm/bin/rpmkey \
-		${libdir}/rpm/bin/rpmrepo \
-		${libdir}/rpm/bin/rpmrepo.real \
-		${libdir}/rpm/bin/rpmspecdump \
-		${libdir}/rpm/bin/rpmspecdump.real \
-		${libdir}/rpm/bin/wget \
-		${localstatedir}/cache \
-		${localstatedir}/cache/rpm \
-		${localstatedir}/cache/wdj \
-		${localstatedir}/lib \
-		${localstatedir}/lib/rpm \
-		${localstatedir}/lib/wdj \
-		${bindir}/rpm.real \
-		${bindir}/rpmconstant.real \
-		${bindir}/rpm2cpio.real \
-		"
-
-FILES_${PN}-dbg += "${libdir}/rpm/.debug \
-		${libdir}/rpm/bin/.debug \
-		${libdir}/python*/site-packages/rpm/.debug/_* \
-		"
-
-FILES_${PN}-common = "${bindir}/rpm2cpio \
-		${bindir}/gendiff \
-		${sysconfdir}/rpm \
-		${localstatedir}/spool/repackage \
-		"
-
-FILES_${PN}-libs = "${libdir}/librpm-*.so \
-		${libdir}/librpmconstant-*.so \
-		${libdir}/librpmdb-*.so \
-		${libdir}/librpmio-*.so \
-		${libdir}/librpmmisc-*.so \
-		${libdir}/librpmbuild-*.so \
-		"
-
-FILES_${PN}-build = "${prefix}/src/rpm \
-		${bindir}/rpmbuild \
-		${bindir}/rpmbuild.real \
-		${libdir}/rpm/brp-* \
-		${libdir}/rpm/check-files \
-		${libdir}/rpm/cross-build \
-		${libdir}/rpm/find-debuginfo.sh \
-		${libdir}/rpm/find-lang.sh \
-		${libdir}/rpm/find-prov.pl \
-		${libdir}/rpm/find-provides.perl \
-		${libdir}/rpm/find-req.pl \
-		${libdir}/rpm/find-requires.perl \
-		${libdir}/rpm/getpo.sh \
-		${libdir}/rpm/http.req \
-		${libdir}/rpm/javadeps.sh \
-		${libdir}/rpm/mono-find-provides \
-		${libdir}/rpm/mono-find-requires \
-		${libdir}/rpm/executabledeps.sh \
-		${libdir}/rpm/libtooldeps.sh \
-		${libdir}/rpm/osgideps.pl \
-		${libdir}/rpm/perldeps.pl \
-		${libdir}/rpm/perl.prov \
-		${libdir}/rpm/perl.req \
-		${libdir}/rpm/php.prov \
-		${libdir}/rpm/php.req \
-		${libdir}/rpm/pkgconfigdeps.sh \
-		${libdir}/rpm/pythondeps.sh \
-		${libdir}/rpm/bin/debugedit \
-		${libdir}/rpm/bin/debugedit.real \
-		${libdir}/rpm/bin/rpmcache \
-		${libdir}/rpm/bin/rpmcache.real \
-		${libdir}/rpm/bin/rpmcmp \
-		${libdir}/rpm/bin/rpmcmp.real \
-		${libdir}/rpm/bin/rpmdeps \
-		${libdir}/rpm/bin/rpmdeps.real \
-		${libdir}/rpm/bin/rpmdeps-oecore \
-		${libdir}/rpm/bin/rpmdeps-oecore.real \
-		${libdir}/rpm/bin/rpmdigest \
-		${libdir}/rpm/bin/rpmdigest.real \
-		${libdir}/rpm/bin/abi-compliance-checker.pl \
-		${libdir}/rpm/bin/api-sanity-autotest.pl \
-		${libdir}/rpm/bin/chroot \
-		${libdir}/rpm/bin/cp \
-		${libdir}/rpm/bin/dbsql \
-		${libdir}/rpm/bin/find \
-		${libdir}/rpm/bin/install-sh \
-		${libdir}/rpm/bin/lua \
-		${libdir}/rpm/bin/luac \
-		${libdir}/rpm/bin/mkinstalldirs \
-		${libdir}/rpm/bin/rpmlua \
-		${libdir}/rpm/bin/rpmluac \
-		${libdir}/rpm/bin/sqlite3 \
-		${libdir}/rpm/macros.d/cmake \
-		${libdir}/rpm/macros.d/java \
-		${libdir}/rpm/macros.d/libtool \
-		${libdir}/rpm/macros.d/mandriva \
-		${libdir}/rpm/macros.d/mono \
-		${libdir}/rpm/macros.d/perl \
-		${libdir}/rpm/macros.d/php \
-		${libdir}/rpm/macros.d/pkgconfig \
-		${libdir}/rpm/macros.d/python \
-		${libdir}/rpm/macros.d/ruby \
-		${libdir}/rpm/macros.d/selinux \
-		${libdir}/rpm/macros.d/tcl \
-		${libdir}/rpm/macros.rpmbuild \
-		${libdir}/rpm/u_pkg.sh \
-		${libdir}/rpm/vpkg-provides.sh \
-		${libdir}/rpm/vpkg-provides2.sh \
-		${libdir}/rpm/perfile_rpmdeps.sh \
-		"
-RDEPENDS_${PN} = "base-files run-postinsts"
-RDEPENDS_${PN}_class-native = ""
-RDEPENDS_${PN}_class-nativesdk = ""
-RDEPENDS_${PN}-build = "file bash perl"
-
-RDEPENDS_python-rpm = "${PN}"
-
-FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
-PROVIDES += "python-rpm"
-
-FILES_perl-module-rpm = "${libdir}/perl/*/* \
-		"
-
-RDEPENDS_${PN}-dev += "bash"
-
-FILES_${PN}-dev = "${includedir}/rpm \
-		${libdir}/librpm.la \
-		${libdir}/librpm.so \
-		${libdir}/librpmconstant.la \
-		${libdir}/librpmconstant.so \
-		${libdir}/librpmdb.la \
-		${libdir}/librpmdb.so \
-		${libdir}/librpmio.la \
-		${libdir}/librpmio.so \
-		${libdir}/librpmmisc.la \
-		${libdir}/librpmmisc.so \
-		${libdir}/librpmbuild.la \
-		${libdir}/librpmbuild.so \
-		${libdir}/rpm/lib/liblua.la \
-		${libdir}/pkgconfig/rpm.pc \
-		${libdir}/rpm/rpmdb_loadcvt \
-		"
-
-FILES_${PN}-staticdev = " \
-		${libdir}/librpm.a \
-		${libdir}/librpmconstant.a \
-		${libdir}/librpmdb.a \
-		${libdir}/librpmio.a \
-		${libdir}/librpmmisc.a \
-		${libdir}/librpmbuild.a \
-		${libdir}/rpm/lib/liblua.a \
-		${libdir}/python*/site-packages/rpm/*.a \
-		"
-
-do_configure() {
-	# Disable tests!
-	echo "all:" > ${S}/tests/Makefile.am
-	sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in
-
-	( cd ${S}; ${S}/autogen.sh )
-
-	# NASTY hack to make sure configure files the right pkg-config file...
-	sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \
-	    -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure
-
-	( cd ${S}/syck ; set +e ; rm -- -l* ; make distclean ) || :
-
-	export varprefix=${localstatedir}
-	oe_runconf
-}
-
-do_install_append() {
-	sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
-	sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
-	sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
-	sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
-	sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
-
-	# Enable Debian style arbitrary tags...
-	sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
-
-	install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
-	install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
-
-	# Remove unpackaged files (based on list in rpm.spec)
-	rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm}
-
-	rm -f ${D}/${mandir}/man8/rpmcache.8*
-	rm -f ${D}/${mandir}/man8/rpmgraph.8*
-	rm -f ${D}/${mandir}/*/man8/rpmcache.8*
-	rm -f ${D}/${mandir}/*/man8/rpmgraph.8*
-	rm -rf ${D}/${mandir}/{fr,ko}
-
-	rm -f ${D}/${includedir}/popt.h
-	rm -f ${D}/${libdir}/libpopt.*
-	rm -f ${D}/${libdir}/pkgconfig/popt.pc
-	rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo
-	rm -f ${D}/${mandir}/man3/popt.3
-
-	rm -f ${D}/${mandir}/man1/xar.1*
-	rm -f ${D}/${bindir}/xar
-	rm -rf ${D}/${includedir}/xar
-	rm -f ${D}/${libdir}/libxar*
-
-	rm -f ${D}/${bindir}/lz*
-	rm -f ${D}/${bindir}/unlzma
-	rm -f ${D}/${bindir}/unxz
-	rm -f ${D}/${bindir}/xz*
-	rm -rf ${D}/${includedir}/lzma*
-	rm -f ${D}/${mandir}/man1/lz*.1
-	rm -f ${D}/${libdir}/pkgconfig/liblzma*
-
-	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.{a,la}
-	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.{a,la}
-
-	#find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
-	#	-o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
-	#find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';'
-
-	# We don't want the default macro set
-	rm -rf ${D}/${libdir}/rpm/{i[3456]86*,athlon*,pentium*,x86_64*,alpha*,sparc*,ia64*,ppc*,s390*,armv[34][lb]*,armv[345]*,mips*,noarch*}
-
-	rm -f ${D}/${libdir}/rpm/dbconvert.sh
-
-	rm -f ${D}/${libdir}/rpm/libsqldb.*
-
-	# We don't want, nor need the Mandriva multiarch items
-	rm -f ${D}/${bindir}/multiarch-dispatch
-	rm -f ${D}/${bindir}/multiarch-platform
-	rm -f ${D}/${libdir}/rpm/check-multiarch-files
-	rm -f ${D}/${libdir}/rpm/mkmultiarch
-	rm -f ${D}/${includedir}/multiarch-dispatch.h
-
-	rm -f ${D}/${libdir}/rpm/gstreamer.sh
-	rm -f ${D}/${libdir}/rpm/gem_helper.rb
-	rm -f ${D}/${libdir}/rpm/rubygems.rb
-	rm -f ${D}/${libdir}/rpm/kmod-deps.sh
-	rm -f ${D}/${libdir}/rpm/pythoneggs.py
-	rm -f ${D}/${libdir}/rpm/macros.d/kernel
-	rm -f ${D}/${libdir}/rpm/macros.d/gstreamer
-	rm -f ${D}/${libdir}/rpm/bin/mgo
-	rm -f ${D}/${libdir}/rpm/bin/dbconvert
-	rm -f ${D}/${libdir}/rpm/bin/pom2spec
-
-	rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj
-	rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl
-
-}
-
-add_native_wrapper() {
-        create_wrapper ${D}/${bindir}/rpm \
-		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
-		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
-		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
-        create_wrapper ${D}/${bindir}/rpm2cpio \
-		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
-		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
-		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
-        create_wrapper ${D}/${bindir}/rpmbuild \
-		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
-		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
-		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
-        create_wrapper ${D}/${bindir}/rpmconstant \
-		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
-		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
-		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-
-	for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do
-        	create_wrapper $rpm_binary \
-			RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
-			RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
-			RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
-	done
-}
-
-do_install_append_class-native() {
-	add_native_wrapper
-}
-
-do_install_append_class-nativesdk() {
-	add_native_wrapper
-}
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb
new file mode 100644
index 0000000..cbdca88
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -0,0 +1,739 @@
+SUMMARY = "The RPM package management system"
+DESCRIPTION = "The RPM Package Manager (RPM) is a powerful command line driven \
+package management system capable of installing, uninstalling, \
+verifying, querying, and updating software packages. Each software \
+package consists of an archive of files along with information about \
+the package like its version, a description, etc."
+
+SUMMARY_${PN}-libs = "Libraries for manipulating RPM packages"
+DESCRIPTION_${PN}-libs = "This package contains the RPM shared libraries."
+
+SUMMARY_${PN}-dev = "Development files for manipulating RPM packages"
+DESCRIPTION_${PN}-dev = "This package contains the RPM C library and header files. These \
+development files will simplify the process of writing programs that \
+manipulate RPM packages and databases. These files are intended to \
+simplify the process of creating graphical package managers or any \
+other tools that need an intimate knowledge of RPM packages in order \
+to function."
+
+SUMMARY_${PN}-common = "Common RPM paths, scripts, documentation and configuration"
+DESCRIPTION_${PN}-common = "The rpm-common package contains paths, scripts, documentation \
+and configuration common between RPM Package Manager."
+
+SUMMARY_${PN}-build = "Scripts and executable programs used to build packages"
+DESCRIPTION_${PN}-build = "The rpm-build packagec ontains the scripts and executable programs \
+that are used to build packages using the RPM Package Manager."
+
+SUMMARY_python-rpm = "Python bindings for apps which will manupulate RPM packages"
+DESCRIPTION_python-rpm = "The rpm-python package contains a module that permits applications \
+written in the Python programming language to use the interface \
+supplied by the RPM Package Manager libraries."
+
+SUMMARY_perl-module-rpm = "Perl bindings for apps which will manipulate RPM packages"
+DESCRIPTION_perl-modules-rpm = "The perl-modules-rpm package contains a module that permits applications \
+written in the Perl programming language to use the interface \
+supplied by the RPM Package Manager libraries."
+
+HOMEPAGE = "http://rpm5.org/"
+LICENSE = "LGPLv2.1 & Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
+LIC_FILES_CHKSUM += "file://rpmio/mongo.c;begin=5;end=18;md5=d8327ba2c71664c059143e6d333b8901"
+
+# We must have gettext-native, we need gettextize, which may not be provided
+DEPENDS = "libpcre attr acl ossp-uuid file byacc-native gettext-native"
+DEPENDS_append_class-native = " file-replacement-native"
+
+# rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
+# in order to extract the distribution SRPM into a format we can extract...
+
+# There is no official 5.4.16 release yet, so start w/ 5.4.15 and patch it
+# based on CVS
+S = "${WORKDIR}/rpm-5.4.15"
+
+SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm;name=srpm;extract=rpm-5.4.15.tar.gz \
+	   http://downloads.yoctoproject.org/releases/rpm5/rpm-5.4.15-to-5.4.16-20160225.patch.gz;name=rpm-patch \
+	   http://downloads.yoctoproject.org/releases/rpm5/syck-5.4.15-to-5.4.16-20160225.patch.gz;name=syck-patch \
+	   http://downloads.yoctoproject.org/releases/rpm5/beecrypt-5.4.15-to-5.4.16-20160225.patch.gz;name=beecrypt-patch \
+	   http://downloads.yoctoproject.org/releases/rpm5/lua-5.4.15-to-5.4.16-20160225.patch.gz;name=lua-patch \
+	   file://perfile_rpmdeps.sh \
+	   file://pythondeps.sh \
+"
+
+SRC_URI[srpm.md5sum] = "d53782842ac11b3100a43fb2958c9bc0"
+SRC_URI[srpm.sha256sum] = "d4ae5e9ed5df8ab9931b660f491418d20ab5c4d72eb17ed9055b80b71ef6c4ee"
+
+SRC_URI[rpm-patch.md5sum] = "8b7deb1c9574d3d47ed8ba8c690fd8bf"
+SRC_URI[rpm-patch.sha256sum] = "1c1983d001b04eaa23eb2c8d9598b9d0899acb0a89f54a2d4c4e974086fd17a5"
+
+SRC_URI[syck-patch.md5sum] = "f31d7a32105a364688354419ec3559e4"
+SRC_URI[syck-patch.sha256sum] = "4dd1d04489206d8b5d1970f2a8d143a002f2895cefbe15d73459785096545e8a"
+
+SRC_URI[beecrypt-patch.md5sum] = "9e71ee3ccb0a52985a071dd250279132"
+SRC_URI[beecrypt-patch.sha256sum] ="df7c0708a7fab9bdf6d46194519b42e736f99cb0599dcc1c3c1bf1b228705cde"
+
+SRC_URI[lua-patch.md5sum] = "ca10d03d83b1fc1c31a0b50819534cd7"
+SRC_URI[lua-patch.sha256sum] = "6bde435cc827a7d4b2520e8f3e1c9bd2ca74375de0a4402aa99ef4d48eab9a7e"
+
+# Bug fixes
+SRC_URI += " \
+	   file://header-include-fix.patch \
+	   file://rpm-libsql-fix.patch \
+	   file://rpm-platform.patch \
+	   file://rpm-platform2.patch \
+	   file://rpm-tools-mtree-LDFLAGS.patch \
+	   file://rpm-canonarch.patch \
+	   file://rpm-no-loopmsg.patch \
+	   file://rpm-resolvedep.patch \
+	   file://rpm-packageorigin.patch \
+	   file://uclibc-support.patch \
+	   file://rpmatch.patch \
+	   file://makefile-am-exec-hook.patch \
+	   file://python-rpm-rpmsense.patch \
+	   file://debugedit-segv.patch \
+	   file://debugedit-valid-file-to-fix-segment-fault.patch \
+	   file://rpm-platform-file-fix.patch \
+	   file://rpm-lsb-compatibility.patch \
+	   file://rpm-tag-generate-endian-conversion-fix.patch \
+	   file://rpm-hardlink-segfault-fix.patch \
+	   file://rpm-payload-use-hashed-inode.patch \
+	   file://rpm-fix-logio-cp.patch \
+	   file://0001-using-poptParseArgvString-to-parse-the-_gpg_check_pa.patch \
+	   file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
+	   file://0001-define-EM_AARCH64.patch \
+	   file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
+	   file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
+	   file://rpm-mongodb-sasl.patch \
+	   file://rpm-fix-parseEmbedded.patch \
+	   file://rpm-rpmio-headers.patch \
+	   file://rpm-python-restore-origin.patch \
+	   file://rpm-keccak-sse-intrin.patch \
+	   file://rpm-atomic-ops.patch \
+	   file://rpm-gnu-atomic.patch \
+	   file://rpm-tagname-type.patch \
+	   file://rpm-python-tagname.patch \
+	   file://rpm-python-AddErase.patch \
+	   file://rpm-rpmpgp-popt.patch \
+	   file://rpm-fix-lua-tests-compilation-failure.patch \
+	   file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \
+	   file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
+"
+
+# OE specific changes
+SRC_URI += " \
+	   file://rpm-log-auto-rm.patch \
+	   file://rpm-db-reduce.patch \
+	   file://rpm-autogen.patch \
+	   file://rpm-showrc.patch \
+	   file://rpm-fileclass.patch \
+	   file://rpm-scriptletexechelper.patch \
+	   file://rpmdeps-oecore.patch \
+	   file://rpm-no-perl-urpm.patch \
+	   file://rpm-macros.patch \
+	   file://rpm-lua.patch \
+	   file://rpm-ossp-uuid.patch \
+	   file://rpm-uuid-include.patch \
+	   file://rpm-pkgconfigdeps.patch \
+	   file://no-ldflags-in-pkgconfig.patch \
+	   file://dbconvert.patch \
+	   file://rpm-db_buffer_small.patch \
+	   file://rpm-py-init.patch \
+	   file://rpm-reloc-macros.patch \
+	   file://rpm-db5-or-db6.patch \
+	   file://rpm-db60.patch \
+	   file://rpmqv_cc_b_gone.patch \
+	   file://rpm-realpath.patch \
+	   file://rpm-check-rootpath-reasonableness.patch \
+	   file://rpm-macros.in-disable-external-key-server.patch \
+	   file://configure.ac-check-for-both-gpg2-and-gpg.patch \
+	   file://rpm-disable-auto-stack-protector.patch \
+	   file://popt-disable-auto-stack-protector.patch \
+	   file://rpm-syck-fix-gram.patch \
+	   file://rpm-rpmdb-grammar.patch \
+	   file://rpm-disable-blaketest.patch \
+	   file://rpm-autogen-force.patch \
+	   file://rpmdb-more-verbose-error-logging-in-rpmTempFile.patch \
+"
+
+SRC_URI_append_libc-musl = "\
+           file://0001-rpm-Fix-build-on-musl.patch \
+"
+# Uncomment the following line to enable platform score debugging
+# This is useful when identifying issues with Smart being unable
+# to process certain package feeds.
+#SRC_URI += "file://rpm-debug-platform.patch"
+
+UPSTREAM_CHECK_REGEX = "rpm-(?P<pver>(\d+[\.\-_]*)+)-.*$"
+
+inherit autotools gettext
+
+acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
+
+# The local distribution macro directory
+distromacrodir = "${libdir}/rpm/poky"
+
+# Specify the default rpm macros in terms of adjustable variables
+rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:%{_etcrpm}/macros.*:%{_etcrpm}/macros:%{_etcrpm}/%{_target}/macros:~/.oerpmmacros"
+rpm_macros_class-native = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
+rpm_macros_class-nativesdk = "%{_usrlibrpm}/macros:%{_usrlibrpm}/${DISTRO}/macros:%{_usrlibrpm}/${DISTRO}/%{_target}/macros:~/.oerpmmacros"
+
+# sqlite lua tcl augeas nss gcrypt neon xz xar keyutils perl selinux
+
+# Set the digest algorithm used for verifying file integrity
+# If this value changes, and two different packages have different values
+# the "same file" validation (two packages have a non-conflict file)
+# will fail.  This may lead to upgrade problems.  You should treat this
+# value as a distribution wide setting, and only change it when you intend
+# a full system upgrade!
+#
+# Defined file digest algorithm values (note: not all are available!):
+#       1       MD5 (legacy RPM default)
+#       2       SHA1
+#       3       RIPEMD-160
+#       5       MD2
+#       6       TIGER-192
+#       8       SHA256
+#       9       SHA384
+#       10      SHA512
+#       11      SHA224
+#       104     MD4
+#       105     RIPEMD-128
+#       106     CRC-32
+#       107     ADLER-32
+#       108     CRC-64 (ECMA-182 polynomial, untested uint64_t problems)
+#       109     Jenkins lookup3.c hashlittle()
+#       111     RIPEMD-256
+#       112     RIPEMD-320
+#       188     BLAKE2B
+#       189     BLAKE2BP
+#       190     BLAKE2S
+#       191     BLAKE2SP
+RPM_FILE_DIGEST_ALGO ?= "1"
+
+# All packages build with RPM5 contain a non-repudiable signature.
+# The purpose of this signature is not to show authenticity of a package,
+# but instead act as a secondary package wide validation that shows it
+# wasn't damaged by accident in transport.  (When later you sign the package, 
+# this signature may or may not be replaced as there are three signature 
+# slots, one for DSA/RSA, one for ECSDA, and one reserved.)
+#
+# There is a known issue w/ RSA signatures that if they start with an 0x00
+# the signing and validation may fail.
+#
+# The following is the list of choices for the non-rpudiable signature
+# (note: not all of these are implemented):
+#       DSA             (default)
+#       RSA             (implies SHA1)
+#       ECDSA           (implies SHA256)
+#       DSA/SHA1
+#       DSA/SHA224
+#       DSA/SHA256
+#       DSA/SHA384
+#       DSA/SHA512
+#       RSA/SHA1
+#       RSA/SHA224
+#       RSA/SHA256
+#       RSA/SHA384
+#       RSA/SHA512
+#       ECDSA/SHA224    (using NIST P-224)
+#       ECDSA/SHA256    (using NIST P-256)
+#       ECDSA/SHA384    (using NIST P-384)
+#       ECDSA/SHA512    (using NIST P-521)
+RPM_SELF_SIGN_ALGO ?= "DSA"
+
+# Note: perl and sqlite w/o db specified does not currently work.
+#       tcl, augeas, nss, gcrypt, xar and keyutils support is untested.
+PACKAGECONFIG ??= "db bzip2 zlib popt openssl libelf python"
+
+# Note: switching to internal popt may not work, as it will generate
+# a shared library which will intentionally not be packaged.
+#
+# If you intend to use the internal version, additional work may be required.
+PACKAGECONFIG[popt] = "--with-popt=external,--with-popt=internal,popt,"
+
+PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2,"
+PACKAGECONFIG[xz] = "--with-xz,--without-xz,xz,"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib,"
+PACKAGECONFIG[xar] = "--with-xar,--without-xar,xar,"
+
+WITH_PYTHON = " --with-python=${PYTHON_BASEVERSION} \
+		--with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
+		--with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION}/site-packages \
+		--without-pythonembed"
+PACKAGECONFIG[python] = "${WITH_PYTHON},--without-python,python,"
+
+# Perl modules are not built, but they could be enabled fairly easily
+# the perl module creation and installation would need to be patched.
+# (currently has host perl contamination issues)
+WITH_PERL = "--with-perl --without-perlembed --without-perl-urpm"
+WITHOUT_PERL = "--without-perl --without-perl-urpm"
+PACKAGECONFIG[perl] = "${WITH_PERL},${WITHOUT_PERL},perl,"
+
+# The --with-dbsql will only tell RPM to check for support, db
+# may or may not be built w/ the dbsql support.
+WITH_DB = "--with-db --with-dbsql --without-db-tools-integrated"
+PACKAGECONFIG[db] = "${WITH_DB},--without-db,db,"
+
+PACKAGECONFIG[sqlite] = "--with-sqlite,--without-sqlite,sqlite3,"
+
+# This switch simply disables external beecrypt, RPM5 always uses beecrypt
+# for base64 processing and various digest algorithms.
+# Beecrypt is only the preferred crypto engine if it's the only engine enabled.
+PACKAGECONFIG[beecrypt] = "--with-beecrypt=external,--with-beecrypt=internal,beecrypt,"
+
+# --with-usecrypto= setting defined the item as the preferred system
+# crypto engine, which will take priority over the included beecrypt
+PACKAGECONFIG[openssl] = "--with-openssl --with-usecrypto=openssl,--without-openssl,openssl,"
+PACKAGECONFIG[nss] = "--with-nss --with-usecrypto=nss,--without-nss,nss,"
+PACKAGECONFIG[gcrypt] = "--with-gcrypt --with-usecrypto=gcrypt,--without-gcrypt,gcrypt,"
+
+PACKAGECONFIG[keyutils] = "--with-keyutils,--without-keyutils,keyutils,"
+PACKAGECONFIG[libelf] = "--with-libelf,--without-libelf,elfutils,"
+
+WITH_SELINUX = "--with-selinux --with-sepol --with-semanage"
+WITHOUT_SELINUX = "--without-selinux --without-sepol --without-semanage"
+PACKAGECONFIG[selinux] = "${WITH_SELINUX},${WITHOUT_SELINUX},libselinux,"
+
+WITH_NEON = "--with-neon --with-libproxy --with-expat --without-gssapi"
+WITHOUT_NEON = "--without-neon --without-libproxy --without-expat --without-gssapi"
+PACKAGECONFIG[neon] = "${WITH_NEON},${WITHOUT_NEON},neon expat,"
+
+PACKAGECONFIG[lua] = "--with-lua,--without-lua,expat,"
+PACKAGECONFIG[tcl] = "--with-tcl,--without-tcl,tcl,"
+
+PACKAGECONFIG[augeas] = "--with-augeas,--without-augeas,augeas,"
+
+EXTRA_OECONF += "--verbose \
+		--sysconfdir=${sysconfdir} \
+		--with-file \
+		--with-path-magic=%{_usrlibrpm}/../../share/misc/magic.mgc \
+		--with-syck=internal \
+		--without-readline \
+		--without-libtasn1 \
+		--without-pakchois \
+		--without-gnutls \
+		--with-pcre \
+		--enable-utf8 \
+		--with-uuid \
+		--with-attr \
+		--with-acl \
+		--with-pthreads \
+		--without-cudf \
+		--without-ficl \
+		--without-aterm \
+		--without-nix \
+		--without-bash \
+		--without-rc \
+		--without-js \
+		--without-gpsee \
+		--without-ruby \
+		--without-squirrel \
+		--without-sasl2 \
+		--with-build-extlibdep \
+		--with-build-maxextlibdep \
+		--without-valgrind \
+		--disable-openmp \
+		--enable-build-pic \
+		--enable-build-versionscript \
+		--enable-build-warnings \
+		--enable-build-debug \
+		--enable-maintainer-mode \
+		--with-path-macros=${rpm_macros} \
+		--with-path-lib=${libdir}/rpm \
+		--with-bugreport=http://bugzilla.yoctoproject.org \
+		--program-prefix= \
+		YACC=byacc"
+
+CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE"
+
+LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
+
+PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm perl-module-rpm ${PN}-locale"
+
+SOLIBS = "5.4.so"
+
+# Based on %files section in the rpm.spec
+
+FILES_${PN} =  "${bindir}/rpm \
+		${bindir}/rpmconstant \
+		${libdir}/rpm/rpm.* \
+		${libdir}/rpm/tgpg \
+		${libdir}/rpm/macros \
+		${libdir}/rpm/rpmpopt \
+		${libdir}/rpm/rpm2cpio \
+		${libdir}/rpm/vcheck \
+		${libdir}/rpm/helpers \
+		${libdir}/rpm/qf \
+		${libdir}/rpm/cpuinfo.yaml \
+		${libdir}/rpm/bin/mtree \
+		${libdir}/rpm/bin/rpmkey \
+		${libdir}/rpm/bin/rpmrepo \
+		${libdir}/rpm/bin/rpmrepo.real \
+		${libdir}/rpm/bin/rpmspecdump \
+		${libdir}/rpm/bin/rpmspecdump.real \
+		${libdir}/rpm/bin/wget \
+		${localstatedir}/cache \
+		${localstatedir}/cache/rpm \
+		${localstatedir}/cache/wdj \
+		${localstatedir}/lib \
+		${localstatedir}/lib/rpm \
+		${localstatedir}/lib/wdj \
+		${bindir}/rpm.real \
+		${bindir}/rpmconstant.real \
+		${bindir}/rpm2cpio.real \
+		"
+
+FILES_${PN}-common = "${bindir}/rpm2cpio \
+		${bindir}/gendiff \
+		${sysconfdir}/rpm \
+		${localstatedir}/spool/repackage \
+		"
+
+FILES_${PN}-libs = "${libdir}/librpm-*.so \
+		${libdir}/librpmconstant-*.so \
+		${libdir}/librpmdb-*.so \
+		${libdir}/librpmio-*.so \
+		${libdir}/librpmmisc-*.so \
+		${libdir}/librpmbuild-*.so \
+		"
+
+FILES_${PN}-build = "${prefix}/src/rpm \
+		${bindir}/rpmbuild \
+		${bindir}/rpmbuild.real \
+		${libdir}/rpm/brp-* \
+		${libdir}/rpm/check-files \
+		${libdir}/rpm/cross-build \
+		${libdir}/rpm/find-debuginfo.sh \
+		${libdir}/rpm/find-lang.sh \
+		${libdir}/rpm/find-prov.pl \
+		${libdir}/rpm/find-provides.perl \
+		${libdir}/rpm/find-req.pl \
+		${libdir}/rpm/find-requires.perl \
+		${libdir}/rpm/getpo.sh \
+		${libdir}/rpm/http.req \
+		${libdir}/rpm/javadeps.sh \
+		${libdir}/rpm/mono-find-provides \
+		${libdir}/rpm/mono-find-requires \
+		${libdir}/rpm/executabledeps.sh \
+		${libdir}/rpm/libtooldeps.sh \
+		${libdir}/rpm/osgideps.pl \
+		${libdir}/rpm/perldeps.pl \
+		${libdir}/rpm/perl.prov \
+		${libdir}/rpm/perl.req \
+		${libdir}/rpm/php.prov \
+		${libdir}/rpm/php.req \
+		${libdir}/rpm/pkgconfigdeps.sh \
+		${libdir}/rpm/pythondeps.sh \
+		${libdir}/rpm/bin/debugedit \
+		${libdir}/rpm/bin/debugedit.real \
+		${libdir}/rpm/bin/rpmcache \
+		${libdir}/rpm/bin/rpmcache.real \
+		${libdir}/rpm/bin/rpmcmp \
+		${libdir}/rpm/bin/rpmcmp.real \
+		${libdir}/rpm/bin/rpmdeps \
+		${libdir}/rpm/bin/rpmdeps.real \
+		${libdir}/rpm/bin/rpmdeps-oecore \
+		${libdir}/rpm/bin/rpmdeps-oecore.real \
+		${libdir}/rpm/bin/rpmdigest \
+		${libdir}/rpm/bin/rpmdigest.real \
+		${libdir}/rpm/bin/abi-compliance-checker.pl \
+		${libdir}/rpm/bin/api-sanity-autotest.pl \
+		${libdir}/rpm/bin/chroot \
+		${libdir}/rpm/bin/cp \
+		${libdir}/rpm/bin/dbsql \
+		${libdir}/rpm/bin/find \
+		${libdir}/rpm/bin/install-sh \
+		${libdir}/rpm/bin/lua \
+		${libdir}/rpm/bin/luac \
+		${libdir}/rpm/bin/mkinstalldirs \
+		${libdir}/rpm/bin/rpmlua \
+		${libdir}/rpm/bin/rpmluac \
+		${libdir}/rpm/bin/sqlite3 \
+		${libdir}/rpm/macros.d/cmake \
+		${libdir}/rpm/macros.d/java \
+		${libdir}/rpm/macros.d/libtool \
+		${libdir}/rpm/macros.d/mandriva \
+		${libdir}/rpm/macros.d/mono \
+		${libdir}/rpm/macros.d/perl \
+		${libdir}/rpm/macros.d/php \
+		${libdir}/rpm/macros.d/pkgconfig \
+		${libdir}/rpm/macros.d/python \
+		${libdir}/rpm/macros.d/ruby \
+		${libdir}/rpm/macros.d/selinux \
+		${libdir}/rpm/macros.d/tcl \
+		${libdir}/rpm/macros.rpmbuild \
+		${libdir}/rpm/u_pkg.sh \
+		${libdir}/rpm/vpkg-provides.sh \
+		${libdir}/rpm/vpkg-provides2.sh \
+		${libdir}/rpm/perfile_rpmdeps.sh \
+		${distromacrodir} \
+		"
+RDEPENDS_${PN} = "base-files run-postinsts"
+RDEPENDS_${PN}_class-native = ""
+RDEPENDS_${PN}_class-nativesdk = ""
+RDEPENDS_${PN}-build = "file bash perl"
+
+RDEPENDS_python-rpm = "${PN} python"
+
+FILES_python-rpm = "${libdir}/python*/site-packages/rpm"
+PROVIDES += "python-rpm"
+
+FILES_perl-module-rpm = "${libdir}/perl/*/* \
+		"
+
+RDEPENDS_${PN}-dev += "bash"
+
+FILES_${PN}-dev = "${includedir}/rpm \
+		${libdir}/librpm.la \
+		${libdir}/librpm.so \
+		${libdir}/librpmconstant.la \
+		${libdir}/librpmconstant.so \
+		${libdir}/librpmdb.la \
+		${libdir}/librpmdb.so \
+		${libdir}/librpmio.la \
+		${libdir}/librpmio.so \
+		${libdir}/librpmmisc.la \
+		${libdir}/librpmmisc.so \
+		${libdir}/librpmbuild.la \
+		${libdir}/librpmbuild.so \
+		${libdir}/rpm/lib/liblua.la \
+		${libdir}/pkgconfig/rpm.pc \
+		${libdir}/rpm/rpmdb_loadcvt \
+		${libdir}/rpm/include \
+		"
+
+FILES_${PN}-staticdev = " \
+		${libdir}/librpm.a \
+		${libdir}/librpmconstant.a \
+		${libdir}/librpmdb.a \
+		${libdir}/librpmio.a \
+		${libdir}/librpmmisc.a \
+		${libdir}/librpmbuild.a \
+		${libdir}/rpm/lib/liblua.a \
+		${libdir}/python*/site-packages/rpm/*.a \
+		"
+
+do_configure() {
+	# Disable tests!
+	echo "all:" > ${S}/tests/Makefile.am
+	sed -e 's/@__MKDIR_P@/%{__mkdir} -p/' -i ${S}/macros/macros.in
+
+	( cd ${S}; ${S}/autogen.sh )
+
+	# NASTY hack to make sure configure files the right pkg-config file...
+	sed -e 's/pkg-config --exists uuid/pkg-config --exists ossp-uuid/g' \
+	    -e 's/pkg-config uuid/pkg-config ossp-uuid/g' -i ${S}/configure
+
+	( cd ${S}/syck ; set +e ; rm -- -l* ; make distclean ) || :
+
+	export varprefix=${localstatedir}
+	oe_runconf
+}
+
+do_install_append() {
+	# Configure -distribution wide- package crypto settings
+	# If these change, effectively all packages have to be upgraded!
+	sed -i -e 's,%_build_file_digest_algo.*,%_build_sign ${RPM_FILE_DIGEST_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
+	sed -i -e 's,%_build_sign.*,%_build_sign ${RPM_SELF_SIGN_ALGO},' ${D}/${libdir}/rpm/macros.rpmbuild
+
+	sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros
+	sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
+	sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros ${D}/${libdir}/rpm/macros.d/*
+	sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
+	sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
+
+	# Enable MIPS64 N32 transactions.  (This is a no-op on non-MIPS targets.)
+	sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros
+
+	# Enable Debian style arbitrary tags...
+	sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
+
+	install -m 0755 ${WORKDIR}/pythondeps.sh ${D}/${libdir}/rpm/pythondeps.sh
+	install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
+
+	# Remove unpackaged files (based on list in rpm.spec)
+	rm -f ${D}/${libdir}/rpm/{Specfile.pm,cpanflute,cpanflute2,rpmdiff,rpmdiff.cgi,sql.prov,sql.req,tcl.req,trpm}
+
+	rm -f ${D}/${mandir}/man8/rpmcache.8*
+	rm -f ${D}/${mandir}/man8/rpmgraph.8*
+	rm -f ${D}/${mandir}/*/man8/rpmcache.8*
+	rm -f ${D}/${mandir}/*/man8/rpmgraph.8*
+	rm -rf ${D}/${mandir}/{fr,ko}
+
+	rm -f ${D}/${includedir}/popt.h
+	rm -f ${D}/${libdir}/libpopt.*
+	rm -f ${D}/${libdir}/pkgconfig/popt.pc
+	rm -f ${D}/${datadir}/locale/*/LC_MESSAGES/popt.mo
+	rm -f ${D}/${mandir}/man3/popt.3
+
+	rm -f ${D}/${mandir}/man1/xar.1*
+	rm -f ${D}/${bindir}/xar
+	rm -rf ${D}/${includedir}/xar
+	rm -f ${D}/${libdir}/libxar*
+
+	rm -f ${D}/${bindir}/lz*
+	rm -f ${D}/${bindir}/unlzma
+	rm -f ${D}/${bindir}/unxz
+	rm -f ${D}/${bindir}/xz*
+	rm -rf ${D}/${includedir}/lzma*
+	rm -f ${D}/${mandir}/man1/lz*.1
+	rm -f ${D}/${libdir}/pkgconfig/liblzma*
+
+	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.a
+	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/*.la
+	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.a
+	rm -f ${D}/${libdir}/python%{with_python_version}/site-packages/rpm/*.la
+
+	#find ${D}/${libdir}/perl5 -type f -a \( -name perllocal.pod -o -name .packlist \
+	#	-o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'
+	#find ${D}/${libdir}/perl5 -type d -depth -exec rmdir {} 2>/dev/null ';'
+
+	rm -f ${D}/${libdir}/rpm/dbconvert.sh
+
+	rm -f ${D}/${libdir}/rpm/libsqldb.*
+
+	# We don't want, nor need the Mandriva multiarch items
+	rm -f ${D}/${bindir}/multiarch-dispatch
+	rm -f ${D}/${bindir}/multiarch-platform
+	rm -f ${D}/${libdir}/rpm/check-multiarch-files
+	rm -f ${D}/${libdir}/rpm/mkmultiarch
+	rm -f ${D}/${includedir}/multiarch-dispatch.h
+
+	rm -f ${D}/${libdir}/rpm/gstreamer.sh
+	rm -f ${D}/${libdir}/rpm/gem_helper.rb
+	rm -f ${D}/${libdir}/rpm/rubygems.rb
+	rm -f ${D}/${libdir}/rpm/kmod-deps.sh
+	rm -f ${D}/${libdir}/rpm/pythoneggs.py
+	rm -f ${D}/${libdir}/rpm/macros.d/kernel
+	rm -f ${D}/${libdir}/rpm/macros.d/gstreamer
+	rm -f ${D}/${libdir}/rpm/bin/mgo
+	rm -f ${D}/${libdir}/rpm/bin/dbconvert
+	rm -f ${D}/${libdir}/rpm/bin/pom2spec
+
+	rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj
+	rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl
+
+}
+
+do_install_append_class-target() {
+	# Create and install distribution specific macros
+	mkdir -p ${D}/${distromacrodir}
+	cat << EOF > ${D}/${distromacrodir}/macros
+%_defaultdocdir		${docdir}
+
+%_prefix                ${prefix}
+%_exec_prefix           ${exec_prefix}
+%_datarootdir           ${datadir}
+%_bindir                ${bindir}
+%_sbindir               ${sbindir}
+%_libexecdir            %{_libdir}/%{name}
+%_datadir               ${datadir}
+%_sysconfdir            ${sysconfdir}
+%_sharedstatedir        ${sharedstatedir}
+%_localstatedir         ${localstatedir}
+%_lib                   lib
+%_libdir                %{_exec_prefix}/%{_lib}
+%_includedir            ${includedir}
+%_oldincludedir         ${oldincludedir}
+%_infodir               ${infodir}
+%_mandir                ${mandir}
+%_localedir             %{_libdir}/locale
+EOF
+
+	# Create and install multilib specific macros
+	${@multilib_rpmmacros(d)}
+}
+
+do_install_append_class-native () {
+	sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env nativepython|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+}
+
+do_install_append_class-nativesdk () {
+	sed -i -e 's|^#!.*/usr/bin/python|#! /usr/bin/env python|' ${D}/${libdir}/python2.7/site-packages/rpm/transaction.py
+}
+
+def multilib_rpmmacros(d):
+    localdata = d.createCopy()
+    # We need to clear the TOOLCHAIN_OPTIONS (--sysroot)
+    localdata.delVar('TOOLCHAIN_OPTIONS')
+
+    # Set 'localdata' values to be consistent with 'd' values.
+    localdata.setVar('distromacrodir', d.getVar('distromacrodir', True))
+    localdata.setVar('WORKDIR', d.getVar('WORKDIR', True))
+
+    ret = gen_arch_macro(localdata)
+
+    variants = d.getVar("MULTILIB_VARIANTS", True) or ""
+    for item in variants.split():
+        # Load overrides from 'd' to avoid having to reset the value...
+        localdata = d.createCopy()
+        overrides = d.getVar("OVERRIDES", False) + ":virtclass-multilib-" + item
+        localdata.setVar("OVERRIDES", overrides)
+        localdata.setVar("MLPREFIX", item + "-")
+        bb.data.update_data(localdata)
+        ret += gen_arch_macro(localdata)
+    return ret
+
+def gen_arch_macro(d):
+    # Generate shell script to produce the file as part of do_install
+    val  = "mkdir -p ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}\n"
+    val += "cat << EOF > ${D}/${distromacrodir}/${TARGET_ARCH}-${TARGET_OS}/macros\n"
+    val += "%_lib               ${baselib}\n"
+    val += "%_libdir            ${libdir}\n"
+    val += "%_localedir         ${localedir}\n"
+    val += "\n"
+    val += "# Toolchain configuration\n"
+    val += "%TOOLCHAIN_OPTIONS  %{nil}\n"
+    val += "%__ar               ${@d.getVar('AR', True).replace('$','%')}\n"
+    val += "%__as               ${@d.getVar('AS', True).replace('$','%')}\n"
+    val += "%__cc               ${@d.getVar('CC', True).replace('$','%')}\n"
+    val += "%__cpp              ${@d.getVar('CPP', True).replace('$','%')}\n"
+    val += "%__cxx              ${@d.getVar('CXX', True).replace('$','%')}\n"
+    val += "%__ld               ${@d.getVar('LD', True).replace('$','%')}\n"
+    val += "%__nm               ${@d.getVar('NM', True).replace('$','%')}\n"
+    val += "%__objcopy          ${@d.getVar('OBJCOPY', True).replace('$','%')}\n"
+    val += "%__objdump          ${@d.getVar('OBJDUMP', True).replace('$','%')}\n"
+    val += "%__ranlib           ${@d.getVar('RANLIB', True).replace('$','%')}\n"
+    val += "%__strip            ${@d.getVar('STRIP', True).replace('$','%')}\n"
+    val += "EOF\n"
+    val += "\n"
+    return d.expand(val)
+
+
+add_native_wrapper() {
+        create_wrapper ${D}/${bindir}/rpm \
+		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
+		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
+		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
+
+        create_wrapper ${D}/${bindir}/rpm2cpio \
+		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
+		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
+		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
+
+        create_wrapper ${D}/${bindir}/rpmbuild \
+		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
+		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
+		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
+
+        create_wrapper ${D}/${bindir}/rpmconstant \
+		RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
+		RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
+		RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
+
+	for rpm_binary in ${D}/${libdir}/rpm/bin/rpm* ${D}/${libdir}/rpm/bin/debugedit; do
+        	create_wrapper $rpm_binary \
+			RPM_USRLIBRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('libdir', True), d.getVar('bindir', True))}/rpm \
+			RPM_ETCRPM='$'{RPM_ETCRPM-'`dirname $''realpath`'/${@os.path.relpath(d.getVar('sysconfdir', True), d.getVar('bindir', True))}/rpm} \
+			RPM_LOCALEDIRRPM='`dirname $''realpath`'/${@os.path.relpath(d.getVar('datadir', True), d.getVar('bindir', True))}/locale
+	done
+}
+
+do_install_append_class-native() {
+	add_native_wrapper
+}
+
+do_install_append_class-nativesdk() {
+	add_native_wrapper
+}
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-devtools/rpm/rpmresolve_1.0.bb b/yocto-poky/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
index 04a55fd..0c13a67 100644
--- a/yocto-poky/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
+++ b/yocto-poky/meta/recipes-devtools/rpm/rpmresolve_1.0.bb
@@ -11,7 +11,7 @@
 S = "${WORKDIR}"
 
 do_compile() {
-	${CC} ${CFLAGS} -ggdb -I${STAGING_INCDIR}/rpm ${LDFLAGS} rpmresolve.c -o rpmresolve -lrpmbuild -lrpm -lrpmio -lrpmdb -lpopt
+	${CC} ${CFLAGS} -ggdb -I${STAGING_INCDIR}/rpm ${LDFLAGS} rpmresolve.c -o rpmresolve -lrpmbuild -lrpm -lrpmio -lrpmdb
 }
 
 do_install() {
diff --git a/yocto-poky/meta/recipes-devtools/rsync/files/acinclude.m4 b/yocto-poky/meta/recipes-devtools/rsync/files/acinclude.m4
deleted file mode 100644
index 735b41d..0000000
--- a/yocto-poky/meta/recipes-devtools/rsync/files/acinclude.m4
+++ /dev/null
@@ -1,95 +0,0 @@
-dnl verbatim renamed from aclocal.m4 in rsync_3.0.7
-dnl 07/06/2010 - qhe
-
-dnl AC_VALIDATE_CACHE_SYSTEM_TYPE[(cmd)]
-dnl if the cache file is inconsistent with the current host,
-dnl target and build system types, execute CMD or print a default
-dnl error message.
-AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
-    AC_REQUIRE([AC_CANONICAL_SYSTEM])
-    AC_MSG_CHECKING([config.cache system type])
-    if { test x"${ac_cv_host_system_type+set}" = x"set" &&
-         test x"$ac_cv_host_system_type" != x"$host"; } ||
-       { test x"${ac_cv_build_system_type+set}" = x"set" &&
-         test x"$ac_cv_build_system_type" != x"$build"; } ||
-       { test x"${ac_cv_target_system_type+set}" = x"set" &&
-         test x"$ac_cv_target_system_type" != x"$target"; }; then
-	AC_MSG_RESULT([different])
-	ifelse($#, 1, [$1],
-		[AC_MSG_ERROR(["you must remove config.cache and restart configure"])])
-    else
-	AC_MSG_RESULT([same])
-    fi
-    ac_cv_host_system_type="$host"
-    ac_cv_build_system_type="$build"
-    ac_cv_target_system_type="$target"
-])
-
-dnl Check for socklen_t: historically on BSD it is an int, and in
-dnl POSIX 1g it is a type of its own, but some platforms use different
-dnl types for the argument to getsockopt, getpeername, etc.  So we
-dnl have to test to find something that will work.
-
-dnl This is no good, because passing the wrong pointer on C compilers is
-dnl likely to only generate a warning, not an error.  We don't call this at
-dnl the moment.
-
-AC_DEFUN([TYPE_SOCKLEN_T],
-[
-   AC_CHECK_TYPE([socklen_t], ,[
-      AC_MSG_CHECKING([for socklen_t equivalent])
-      AC_CACHE_VAL([rsync_cv_socklen_t_equiv],
-      [
-         # Systems have either "struct sockaddr *" or
-         # "void *" as the second argument to getpeername
-         rsync_cv_socklen_t_equiv=
-         for arg2 in "struct sockaddr" void; do
-            for t in int size_t unsigned long "unsigned long"; do
-               AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-
-                  int getpeername (int, $arg2 *, $t *);
-               ],[
-                  $t len;
-                  getpeername(0,0,&len);
-               ],[
-                  rsync_cv_socklen_t_equiv="$t"
-                  break
-               ])
-            done
-         done
-
-         if test "x$rsync_cv_socklen_t_equiv" = x; then
-            AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
-         fi
-      ])
-      AC_MSG_RESULT($rsync_cv_socklen_t_equiv)
-      AC_DEFINE_UNQUOTED(socklen_t, $rsync_cv_socklen_t_equiv,
-			[type to use in place of socklen_t if not defined])],
-      [#include <sys/types.h>
-#include <sys/socket.h>])
-])
-
-dnl AC_HAVE_TYPE(TYPE,INCLUDES)
-AC_DEFUN([AC_HAVE_TYPE], [
-AC_REQUIRE([AC_HEADER_STDC])
-cv=`echo "$1" | sed 'y%./+- %__p__%'`
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL([ac_cv_type_$cv],
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-AC_INCLUDES_DEFAULT
-$2]],
-[[$1 foo;]])],
-[eval "ac_cv_type_$cv=yes"],
-[eval "ac_cv_type_$cv=no"]))dnl
-ac_foo=`eval echo \\$ac_cv_type_$cv`
-AC_MSG_RESULT($ac_foo)
-if test "$ac_foo" = yes; then
-  ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./- %ABCDEFGHIJKLMNOPQRSTUVWXYZ____%'`
-if false; then
-	AC_CHECK_TYPES($1)
-fi
-  AC_DEFINE_UNQUOTED($ac_tr_hdr, 1, [Define if you have type `$1'])
-fi
-])
diff --git a/yocto-poky/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch b/yocto-poky/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch
new file mode 100644
index 0000000..3d27fe7
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rsync/files/makefile-no-rebuild.patch
@@ -0,0 +1,69 @@
+Remove the Makefile rules to reinvoke autoconf, they're not out-of-tree safe and
+generally overcomplicated, and we ensure that autoreconf is invoked if required.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile.in b/Makefile.in
+index 151247d..8f3fdb6 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -141,58 +141,6 @@ gen: conf proto.h man
+ gensend: gen
+ 	rsync -aivzc $(GENFILES) $${SAMBA_HOST-samba.org}:/home/ftp/pub/rsync/generated-files/
+ 
+-conf:
+-	cd $(srcdir) && $(MAKE) -f prepare-source.mak conf
+-
+-aclocal.m4: $(srcdir)/m4/*.m4
+-	aclocal -I $(srcdir)/m4
+-
+-configure.sh config.h.in: configure.ac aclocal.m4
+-	@if test -f configure.sh; then cp -p configure.sh configure.sh.old; else touch configure.sh.old; fi
+-	@if test -f config.h.in; then cp -p config.h.in config.h.in.old; else touch config.h.in.old; fi
+-	autoconf -o configure.sh
+-	autoheader && touch config.h.in
+-	@if diff configure.sh configure.sh.old >/dev/null 2>&1; then \
+-	    echo "configure.sh is unchanged."; \
+-	    rm configure.sh.old; \
+-	else \
+-	    echo "configure.sh has CHANGED."; \
+-	fi
+-	@if diff config.h.in config.h.in.old >/dev/null 2>&1; then \
+-	    echo "config.h.in is unchanged."; \
+-	    rm config.h.in.old; \
+-	else \
+-	    echo "config.h.in has CHANGED."; \
+-	fi
+-	@if test -f configure.sh.old -o -f config.h.in.old; then \
+-	    if test "$(MAKECMDGOALS)" = reconfigure; then \
+-		echo 'Continuing with "make reconfigure".'; \
+-	    else \
+-		echo 'You may need to run:'; \
+-		echo '  make reconfigure'; \
+-		exit 1; \
+-	    fi \
+-	fi
+-
+-reconfigure: configure.sh
+-	./config.status --recheck
+-	./config.status
+-
+-Makefile: Makefile.in config.status configure.sh config.h.in
+-	@if test -f Makefile; then cp -p Makefile Makefile.old; else touch Makefile.old; fi
+-	@./config.status
+-	@if diff Makefile Makefile.old >/dev/null 2>&1; then \
+-	    echo "Makefile is unchanged."; \
+-	    rm Makefile.old; \
+-	else \
+-	    if test "$(MAKECMDGOALS)" = reconfigure; then \
+-		echo 'Continuing with "make reconfigure".'; \
+-	    else \
+-		echo "Makefile updated -- rerun your make command."; \
+-		exit 1; \
+-	    fi \
+-	fi
+-
+ rsync-ssl: $(srcdir)/rsync-ssl.in Makefile
+ 	sed 's;\@bindir\@;$(bindir);g' <$(srcdir)/rsync-ssl.in >rsync-ssl
+ 	@chmod +x rsync-ssl
diff --git a/yocto-poky/meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch b/yocto-poky/meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch
index f054452..bea325e 100644
--- a/yocto-poky/meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch
+++ b/yocto-poky/meta/recipes-devtools/rsync/rsync-2.6.9/rsync-2.6.9-fname-obo.patch
@@ -1,4 +1,5 @@
 Upstream-Status: Backport [ The patch is rsync-2.6.9 specific ]
+CVE: CVE-2007-4091
 
 The patch is from https://issues.rpath.com/browse/RPL-1647 and is used to
 address http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-4091
diff --git a/yocto-poky/meta/recipes-devtools/rsync/rsync-3.1.1/0001-Complain-if-an-inc-recursive-path-is-not-right-for-i.patch b/yocto-poky/meta/recipes-devtools/rsync/rsync-3.1.1/0001-Complain-if-an-inc-recursive-path-is-not-right-for-i.patch
deleted file mode 100644
index 5ece542..0000000
--- a/yocto-poky/meta/recipes-devtools/rsync/rsync-3.1.1/0001-Complain-if-an-inc-recursive-path-is-not-right-for-i.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 962f8b90045ab331fc04c9e65f80f1a53e68243b Mon Sep 17 00:00:00 2001
-From: Wayne Davison <wayned@samba.org>
-Date: Wed, 31 Dec 2014 12:41:03 -0800
-Subject: [PATCH] Complain if an inc-recursive path is not right for its dir.
- This ensures that a malicious sender can't use a just-sent symlink as a
- trasnfer path.
-
-Upstream-Status: BackPort
-
-Fix the CVE-2014-9512, rsync 3.1.1 allows remote attackers to write to arbitrary
-files via a symlink attack on a file in the synchronization path.
-
-BackPort and fix this patch to make it able to apply to source code
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- flist.c | 22 ++++++++++++++++++++--
- io.c    |  2 +-
- main.c  |  4 ++--
- rsync.c |  2 +-
- proto.h | 2 +-
- 6 files changed, 31 insertions(+), 8 deletions(-)
-
-diff --git a/flist.c b/flist.c
-index c24672e..92e4b65 100644
---- a/flist.c
-+++ b/flist.c
-@@ -2435,8 +2435,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
- 	return flist;
- }
- 
--struct file_list *recv_file_list(int f)
-+struct file_list *recv_file_list(int f, int dir_ndx)
- {
-+	const char *good_dirname = NULL;
- 	struct file_list *flist;
- 	int dstart, flags;
- 	int64 start_read;
-@@ -2492,6 +2493,23 @@ struct file_list *recv_file_list(int f)
- 		flist_expand(flist, 1);
- 		file = recv_file_entry(f, flist, flags);
- 
-+		if (inc_recurse) {
-+			static const char empty_dir[] = "\0";
-+			const char *cur_dir = file->dirname ? file->dirname : empty_dir;
-+			if (relative_paths && *cur_dir == '/')
-+				cur_dir++;
-+			if (cur_dir != good_dirname) {
-+				const char *d = dir_ndx >= 0 ? f_name(dir_flist->files[dir_ndx], NULL) : empty_dir;
-+				if (strcmp(cur_dir, d) != 0) {
-+					rprintf(FERROR,
-+						"ABORTING due to invalid dir prefix from sender: %s (should be: %s)\n",
-+						cur_dir, d);
-+					exit_cleanup(RERR_PROTOCOL);
-+				}
-+				good_dirname = cur_dir;
-+			}
-+		}
-+
- 		if (S_ISREG(file->mode)) {
- 			/* Already counted */
- 		} else if (S_ISDIR(file->mode)) {
-@@ -2615,7 +2633,7 @@ void recv_additional_file_list(int f)
- 			rprintf(FINFO, "[%s] receiving flist for dir %d\n",
- 				who_am_i(), ndx);
- 		}
--		flist = recv_file_list(f);
-+		flist = recv_file_list(f, ndx);
- 		flist->parent_ndx = ndx;
- 	}
- }
-diff --git a/io.c b/io.c
-index b9a9bd0..a868fa9 100644
---- a/io.c
-+++ b/io.c
-@@ -1685,7 +1685,7 @@ void wait_for_receiver(void)
- 				rprintf(FINFO, "[%s] receiving flist for dir %d\n",
- 					who_am_i(), ndx);
- 			}
--			flist = recv_file_list(iobuf.in_fd);
-+			flist = recv_file_list(iobuf.in_fd, ndx);
- 			flist->parent_ndx = ndx;
- #ifdef SUPPORT_HARD_LINKS
- 			if (preserve_hard_links)
-diff --git a/main.c b/main.c
-index e7a13f7..713b818 100644
---- a/main.c
-+++ b/main.c
-@@ -1009,7 +1009,7 @@ static void do_server_recv(int f_in, int f_out, int argc, char *argv[])
- 		filesfrom_fd = -1;
- 	}
- 
--	flist = recv_file_list(f_in);
-+	flist = recv_file_list(f_in, -1);
- 	if (!flist) {
- 		rprintf(FERROR,"server_recv: recv_file_list error\n");
- 		exit_cleanup(RERR_FILESELECT);
-@@ -1183,7 +1183,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
- 
- 	if (write_batch && !am_server)
- 		start_write_batch(f_in);
--	flist = recv_file_list(f_in);
-+	flist = recv_file_list(f_in, -1);
- 	if (inc_recurse && file_total == 1)
- 		recv_additional_file_list(f_in);
- 
-diff --git a/rsync.c b/rsync.c
-index 68ff6b1..c3ecc51 100644
---- a/rsync.c
-+++ b/rsync.c
-@@ -364,7 +364,7 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, uchar *type_ptr,
- 		}
- 		/* Send all the data we read for this flist to the generator. */
- 		start_flist_forward(ndx);
--		flist = recv_file_list(f_in);
-+		flist = recv_file_list(f_in, ndx);
- 		flist->parent_ndx = ndx;
- 		stop_flist_forward();
- 	}
-diff --git a/proto.h b/proto.h
-index 22fc539..247c558 100644
---- a/proto.h
-+++ b/proto.h
-@@ -89,7 +89,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
- void unmake_file(struct file_struct *file);
- void send_extra_file_list(int f, int at_least);
- struct file_list *send_file_list(int f, int argc, char *argv[]);
--struct file_list *recv_file_list(int f);
-+struct file_list *recv_file_list(int f, int dir_ndx);
- void recv_additional_file_list(int f);
- int flist_find(struct file_list *flist, struct file_struct *f);
- int flist_find_ignore_dirness(struct file_list *flist, struct file_struct *f);
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/rsync/rsync-3.1.1/rsync.git-eac858085.patch b/yocto-poky/meta/recipes-devtools/rsync/rsync-3.1.1/rsync.git-eac858085.patch
deleted file mode 100644
index 1fcac49..0000000
--- a/yocto-poky/meta/recipes-devtools/rsync/rsync-3.1.1/rsync.git-eac858085.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From eac858085e3ac94ec0ab5061d11f52652c90a869 Mon Sep 17 00:00:00 2001
-From: Wayne Davison <wayned@samba.org>
-Date: Mon, 11 May 2015 12:36:20 -0700
-Subject: [PATCH 1/1] Add compat flag to allow proper seed checksum order.
- Fixes the equivalent of librsync's CVE-2014-8242 issue.
-
-Upstream-Status: Backport
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- checksum.c | 17 +++++++++++++----
- compat.c   |  5 +++++
- options.c  |  1 +
- 3 files changed, 19 insertions(+), 4 deletions(-)
-
-diff --git a/checksum.c b/checksum.c
-index a1c2aa2..933b514 100644
---- a/checksum.c
-+++ b/checksum.c
-@@ -23,6 +23,7 @@
- 
- extern int checksum_seed;
- extern int protocol_version;
-+extern int proper_seed_order;
- 
- /*
-   a simple 32 bit checksum that can be upadted from either end
-@@ -54,10 +55,18 @@ void get_checksum2(char *buf, int32 len, char *sum)
- 	if (protocol_version >= 30) {
- 		uchar seedbuf[4];
- 		md5_begin(&m);
--		md5_update(&m, (uchar *)buf, len);
--		if (checksum_seed) {
--			SIVALu(seedbuf, 0, checksum_seed);
--			md5_update(&m, seedbuf, 4);
-+		if (proper_seed_order) {
-+			if (checksum_seed) {
-+				SIVALu(seedbuf, 0, checksum_seed);
-+				md5_update(&m, seedbuf, 4);
-+			}
-+			md5_update(&m, (uchar *)buf, len);
-+		} else {
-+			md5_update(&m, (uchar *)buf, len);
-+			if (checksum_seed) {
-+				SIVALu(seedbuf, 0, checksum_seed);
-+				md5_update(&m, seedbuf, 4);
-+			}
- 		}
- 		md5_result(&m, (uchar *)sum);
- 	} else {
-diff --git a/compat.c b/compat.c
-index 2454937..f89d466 100644
---- a/compat.c
-+++ b/compat.c
-@@ -27,6 +27,7 @@ int inc_recurse = 0;
- int compat_flags = 0;
- int use_safe_inc_flist = 0;
- int want_xattr_optim = 0;
-+int proper_seed_order = 0;
- 
- extern int am_server;
- extern int am_sender;
-@@ -78,6 +79,7 @@ int filesfrom_convert = 0;
- #define CF_SYMLINK_ICONV (1<<2)
- #define CF_SAFE_FLIST	 (1<<3)
- #define CF_AVOID_XATTR_OPTIM (1<<4)
-+#define CF_CHKSUM_SEED_FIX (1<<5)
- 
- static const char *client_info;
- 
-@@ -271,12 +273,15 @@ void setup_protocol(int f_out,int f_in)
- 				compat_flags |= CF_SAFE_FLIST;
- 			if (local_server || strchr(client_info, 'x') != NULL)
- 				compat_flags |= CF_AVOID_XATTR_OPTIM;
-+			if (local_server || strchr(client_info, 'C') != NULL)
-+				compat_flags |= CF_CHKSUM_SEED_FIX;
- 			write_byte(f_out, compat_flags);
- 		} else
- 			compat_flags = read_byte(f_in);
- 		/* The inc_recurse var MUST be set to 0 or 1. */
- 		inc_recurse = compat_flags & CF_INC_RECURSE ? 1 : 0;
- 		want_xattr_optim = protocol_version >= 31 && !(compat_flags & CF_AVOID_XATTR_OPTIM);
-+		proper_seed_order = compat_flags & CF_CHKSUM_SEED_FIX ? 1 : 0;
- 		if (am_sender) {
- 			receiver_symlink_times = am_server
- 			    ? strchr(client_info, 'L') != NULL
-diff --git a/options.c b/options.c
-index 19c2b7d..4128b59 100644
---- a/options.c
-+++ b/options.c
-@@ -2503,6 +2503,7 @@ void server_options(char **args, int *argc_p)
- #endif
- 		argstr[x++] = 'f'; /* flist I/O-error safety support */
- 		argstr[x++] = 'x'; /* xattr hardlink optimization not desired */
-+		argstr[x++] = 'C'; /* support checksum seed order fix */
- 	}
- 
- 	if (x >= (int)sizeof argstr) { /* Not possible... */
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.1.bb b/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.1.bb
deleted file mode 100644
index c74cdda..0000000
--- a/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.1.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-require rsync.inc
-
-
-SRC_URI += "file://acinclude.m4 \
-            file://0001-Complain-if-an-inc-recursive-path-is-not-right-for-i.patch \
-            file://rsync.git-eac858085.patch \
-"
-
-SRC_URI[md5sum] = "43bd6676f0b404326eee2d63be3cdcfe"
-SRC_URI[sha256sum] = "7de4364fcf5fe42f3bdb514417f1c40d10bbca896abe7e7f2c581c6ea08a2621"
-
-PACKAGECONFIG ??= "acl attr"
-PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
-PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
-
-# rsync 3.0 uses configure.sh instead of configure, and
-# makefile checks the existence of configure.sh
-do_configure_prepend () {
-	rm -f ${S}/configure ${S}/configure.sh
-	cp -f ${WORKDIR}/acinclude.m4 ${S}/
-
-	# By default, if crosscompiling, rsync disables a number of
-	# capabilities, hardlinking symlinks and special files (i.e. devices)
-	export rsync_cv_can_hardlink_special=yes
-	export rsync_cv_can_hardlink_symlink=yes
-}
-
-do_configure_append () {
-	cp -f ${S}/configure ${S}/configure.sh
-}
diff --git a/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb b/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
new file mode 100644
index 0000000..9637ed4
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/rsync/rsync_3.1.2.bb
@@ -0,0 +1,26 @@
+require rsync.inc
+
+SRC_URI += "file://makefile-no-rebuild.patch"
+
+SRC_URI[md5sum] = "0f758d7e000c0f7f7d3792610fad70cb"
+SRC_URI[sha256sum] = "ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2"
+
+PACKAGECONFIG ??= "acl attr"
+PACKAGECONFIG[acl] = "--enable-acl-support,--disable-acl-support,acl,"
+PACKAGECONFIG[attr] = "--enable-xattr-support,--disable-xattr-support,attr,"
+
+# By default, if crosscompiling, rsync disables a number of
+# capabilities, hardlinking symlinks and special files (i.e. devices)
+CACHED_CONFIGUREVARS += "rsync_cv_can_hardlink_special=yes rsync_cv_can_hardlink_symlink=yes"
+
+# rsync 3.0 uses configure.sh instead of configure, and
+# makefile checks the existence of configure.sh
+do_configure_prepend () {
+	rm -f ${S}/configure ${S}/configure.sh
+}
+
+do_configure_append () {
+	cp -f ${S}/configure ${S}/configure.sh
+}
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/ruby/ruby.inc b/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
index 17aa789..313e752 100644
--- a/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
+++ b/yocto-poky/meta/recipes-devtools/ruby/ruby.inc
@@ -15,7 +15,7 @@
 "
 
 DEPENDS = "ruby-native zlib openssl tcl libyaml db gdbm readline"
-DEPENDS_class-native = "libyaml-native"
+DEPENDS_class-native = "openssl-native libyaml-native"
 
 SHRT_VER = "${@oe.utils.trim_version("${PV}", 2)}"
 SRC_URI = "http://cache.ruby-lang.org/pub/ruby/${SHRT_VER}/ruby-${PV}.tar.gz \
diff --git a/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.2.bb b/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.2.bb
index 78c943c..6715023 100644
--- a/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.2.bb
+++ b/yocto-poky/meta/recipes-devtools/ruby/ruby_2.2.2.bb
@@ -31,12 +31,16 @@
     oe_runmake 'DESTDIR=${D}' install
 }
 
-FILES_${PN} += "${datadir}/rubygems \
-                ${datadir}/ri"
+PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
 
-FILES_${PN}-dbg += "${libdir}/ruby/*/.debug \
-                    ${libdir}/ruby/*/*/.debug \
-                    ${libdir}/ruby/*/*/*/.debug \
-                    ${libdir}/ruby/*/*/*/*/.debug"
+SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
+RDEPENDS_${PN}-ri-docs = "${PN}"
+FILES_${PN}-ri-docs += "${datadir}/ri"
+
+SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source"
+RDEPENDS_${PN}-rdoc = "${PN}"
+FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
+
+FILES_${PN} += "${datadir}/rubygems"
 
 BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/sgmlspl/sgmlspl-native_git.bb b/yocto-poky/meta/recipes-devtools/sgmlspl/sgmlspl-native_git.bb
index 5e3460f..01581c1 100644
--- a/yocto-poky/meta/recipes-devtools/sgmlspl/sgmlspl-native_git.bb
+++ b/yocto-poky/meta/recipes-devtools/sgmlspl/sgmlspl-native_git.bb
@@ -4,6 +4,7 @@
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
 
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
 SRC_URI = "git://github.com/gitpan/SGMLSpm \
           "
 
diff --git a/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch b/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
new file mode 100644
index 0000000..d545146
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch
@@ -0,0 +1,63 @@
+Define FNM_EXTMATCH if not defined its glibc specific define
+include missing sys/stat.h for stat* function declarations
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: squashfs-tools/action.c
+===================================================================
+--- squashfs-tools.orig/action.c
++++ squashfs-tools/action.c
+@@ -44,6 +44,10 @@
+ #include "action.h"
+ #include "error.h"
+ 
++#if !defined(FNM_EXTMATCH)
++#define FNM_EXTMATCH 0
++#endif
++
+ /*
+  * code to parse actions
+  */
+Index: squashfs-tools/mksquashfs.c
+===================================================================
+--- squashfs-tools.orig/mksquashfs.c
++++ squashfs-tools/mksquashfs.c
+@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st
+ 		dir_size + 3, directory_block, directory_offset, NULL, NULL,
+ 		dir, 0);
+ 
++#if !defined(FNM_EXTMATCH)
++#define FNM_EXTMATCH 0
++#endif
++
+ #ifdef SQUASHFS_TRACE
+ 	{
+ 		unsigned char *dirp;
+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"
+Index: squashfs-tools/unsquashfs.c
+===================================================================
+--- squashfs-tools.orig/unsquashfs.c
++++ squashfs-tools/unsquashfs.c
+@@ -38,6 +38,10 @@
+ #include <limits.h>
+ #include <ctype.h>
+ 
++#ifndef FNM_EXTMATCH
++#define FNM_EXTMATCH 0
++#endif
++
+ struct cache *fragment_cache, *data_cache;
+ struct queue *to_reader, *to_inflate, *to_writer, *from_writer;
+ pthread_t *thread, *inflator_thread;
diff --git a/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb b/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
index 7aebd00..33ed09a 100644
--- a/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
+++ b/yocto-poky/meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb
@@ -13,6 +13,7 @@
 SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \
            http://downloads.sourceforge.net/sevenzip/lzma465.tar.bz2;name=lzma \
            file://0001-mksquashfs.c-get-inline-functions-work-with-C99.patch;striplevel=2 \
+           file://fix-compat.patch \
 "
 SRC_URI[lzma.md5sum] = "29d5ffd03a5a3e51aef6a74e9eafb759"
 SRC_URI[lzma.sha256sum] = "c935fd04dd8e0e8c688a3078f3675d699679a90be81c12686837e0880aa0fa1e"
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch
deleted file mode 100644
index 0853959..0000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace/0001-Add-linux-aarch64-arch_regs.h.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From f85854131c8265f2eb59c714dcea5c4b3dc09bed Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen.kooi@linaro.org>
-Date: Wed, 15 Apr 2015 14:29:37 +0200
-Subject: [PATCH] Add linux/aarch64/arch_regs.h
-
-It is missing from the tarball, but it is present in git for v4.10
-
-Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
-Upstream-Status: Pending
----
- linux/aarch64/arch_regs.h | 2 ++
- 1 file changed, 2 insertions(+)
- create mode 100644 linux/aarch64/arch_regs.h
-
-diff --git a/linux/aarch64/arch_regs.h b/linux/aarch64/arch_regs.h
-new file mode 100644
-index 0000000..9a5e33e
---- /dev/null
-+++ b/linux/aarch64/arch_regs.h
-@@ -0,0 +1,2 @@
-+extern uint64_t *const aarch64_sp_ptr;
-+extern uint32_t *const arm_sp_ptr;
--- 
-1.9.3
-
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch
new file mode 100644
index 0000000..aa61e15
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/0001-Move-gcc-compat-macros-to-gcc_compat.h.patch
@@ -0,0 +1,176 @@
+From f32126ba790dd4e61d43a2140b24f02426297bb6 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Thu, 31 Dec 2015 14:19:41 +0000
+Subject: [PATCH] Move gcc compat macros to gcc_compat.h
+
+* defs.h: Include "gcc_compat.h".
+(GNUC_PREREQ, ATTRIBUTE_NORETURN, ATTRIBUTE_FORMAT,
+ATTRIBUTE_ALIGNED, ATTRIBUTE_PACKED, ATTRIBUTE_MALLOC,
+ATTRIBUTE_NOINLINE, ATTRIBUTE_ALLOC_SIZE): Move ...
+* gcc_compat.h: ... here.
+* Makefile.am (strace_SOURCES): Add gcc_compat.h.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ Makefile.am  |  1 +
+ defs.h       | 43 +----------------------------------
+ gcc_compat.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 75 insertions(+), 42 deletions(-)
+ create mode 100644 gcc_compat.h
+
+diff --git a/Makefile.am b/Makefile.am
+index ab52778..d43608d 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -97,6 +97,7 @@ strace_SOURCES =	\
+ 	flock.c		\
+ 	flock.h		\
+ 	futex.c		\
++	gcc_compat.h	\
+ 	get_robust_list.c \
+ 	getcpu.c	\
+ 	getcwd.c	\
+diff --git a/defs.h b/defs.h
+index 283ab1f..bae212c 100644
+--- a/defs.h
++++ b/defs.h
+@@ -55,6 +55,7 @@
+ #include <sys/syscall.h>
+ 
+ #include "mpers_type.h"
++#include "gcc_compat.h"
+ 
+ #ifndef HAVE_STRERROR
+ const char *strerror(int);
+@@ -68,48 +69,6 @@ const char *strerror(int);
+ extern char *stpcpy(char *dst, const char *src);
+ #endif
+ 
+-#if defined __GNUC__ && defined __GNUC_MINOR__
+-# define GNUC_PREREQ(maj, min)	\
+-	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+-#else
+-# define __attribute__(x)	/* empty */
+-# define GNUC_PREREQ(maj, min)	0
+-#endif
+-
+-#if GNUC_PREREQ(2, 5)
+-# define ATTRIBUTE_NORETURN	__attribute__((__noreturn__))
+-#else
+-# define ATTRIBUTE_NORETURN	/* empty */
+-#endif
+-
+-#if GNUC_PREREQ(2, 7)
+-# define ATTRIBUTE_FORMAT(args)	__attribute__((__format__ args))
+-# define ATTRIBUTE_ALIGNED(arg)	__attribute__((__aligned__(arg)))
+-# define ATTRIBUTE_PACKED	__attribute__((__packed__))
+-#else
+-# define ATTRIBUTE_FORMAT(args)	/* empty */
+-# define ATTRIBUTE_ALIGNED(arg)	/* empty */
+-# define ATTRIBUTE_PACKED	/* empty */
+-#endif
+-
+-#if GNUC_PREREQ(3, 0)
+-# define ATTRIBUTE_MALLOC	__attribute__((__malloc__))
+-#else
+-# define ATTRIBUTE_MALLOC	/* empty */
+-#endif
+-
+-#if GNUC_PREREQ(3, 1)
+-# define ATTRIBUTE_NOINLINE	__attribute__((__noinline__))
+-#else
+-# define ATTRIBUTE_NOINLINE	/* empty */
+-#endif
+-
+-#if GNUC_PREREQ(4, 3)
+-# define ATTRIBUTE_ALLOC_SIZE(args)	__attribute__((__alloc_size__ args))
+-#else
+-# define ATTRIBUTE_ALLOC_SIZE(args)	/* empty */
+-#endif
+-
+ #ifndef offsetof
+ # define offsetof(type, member)	\
+ 	(((char *) &(((type *) NULL)->member)) - ((char *) (type *) NULL))
+diff --git a/gcc_compat.h b/gcc_compat.h
+new file mode 100644
+index 0000000..1f2c835
+--- /dev/null
++++ b/gcc_compat.h
+@@ -0,0 +1,73 @@
++/*
++ * Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ *    derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#ifndef GCC_COMPAT_H_
++#define GCC_COMPAT_H_
++
++#if defined __GNUC__ && defined __GNUC_MINOR__
++# define GNUC_PREREQ(maj, min)	\
++	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++#else
++# define __attribute__(x)	/* empty */
++# define GNUC_PREREQ(maj, min)	0
++#endif
++
++#if GNUC_PREREQ(2, 5)
++# define ATTRIBUTE_NORETURN	__attribute__((__noreturn__))
++#else
++# define ATTRIBUTE_NORETURN	/* empty */
++#endif
++
++#if GNUC_PREREQ(2, 7)
++# define ATTRIBUTE_FORMAT(args)	__attribute__((__format__ args))
++# define ATTRIBUTE_ALIGNED(arg)	__attribute__((__aligned__(arg)))
++# define ATTRIBUTE_PACKED	__attribute__((__packed__))
++#else
++# define ATTRIBUTE_FORMAT(args)	/* empty */
++# define ATTRIBUTE_ALIGNED(arg)	/* empty */
++# define ATTRIBUTE_PACKED	/* empty */
++#endif
++
++#if GNUC_PREREQ(3, 0)
++# define ATTRIBUTE_MALLOC	__attribute__((__malloc__))
++#else
++# define ATTRIBUTE_MALLOC	/* empty */
++#endif
++
++#if GNUC_PREREQ(3, 1)
++# define ATTRIBUTE_NOINLINE	__attribute__((__noinline__))
++#else
++# define ATTRIBUTE_NOINLINE	/* empty */
++#endif
++
++#if GNUC_PREREQ(4, 3)
++# define ATTRIBUTE_ALLOC_SIZE(args)	__attribute__((__alloc_size__ args))
++#else
++# define ATTRIBUTE_ALLOC_SIZE(args)	/* empty */
++#endif
++
++#endif
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
new file mode 100644
index 0000000..a9d3203
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch
@@ -0,0 +1,117 @@
+From dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Thu, 24 Dec 2015 15:40:55 +0000
+Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build
+
+Fix build regression introduced by commit
+34683e3926d8c2daa368afb805da422ee7043396.
+
+* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap.
+* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff.
+* linux/nios2/syscallent.h: Likewise.
+* linux/or1k/syscallent.h: Likewise.
+* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff.
+* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap.
+* NEWS: Mention this build fix.
+
+Reported-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport
+---
+ NEWS                     | 3 +++
+ linux/32/syscallent.h    | 6 +++---
+ linux/arc/syscallent.h   | 2 +-
+ linux/nios2/syscallent.h | 2 +-
+ linux/or1k/syscallent.h  | 2 +-
+ linux/tile/syscallent1.h | 2 +-
+ pathtrace.c              | 1 +
+ 7 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/NEWS b/NEWS
+index fe40ca4..09263eb 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,9 @@
++Noteworthy changes in release ?.?? (????-??-??)
++===============================================
++
++* Bug fixes
++  * Fixed build on arc, metag, nios2, or1k, and tile architectures.
++
+ Noteworthy changes in release 4.11 (2015-12-21)
+ ===============================================
+ 
+diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h
+index 5f997e7..e6f895c 100644
+--- a/linux/32/syscallent.h
++++ b/linux/32/syscallent.h
+@@ -1,5 +1,5 @@
+-#ifndef ARCH_mmap
+-# define ARCH_mmap mmap
++#ifndef sys_ARCH_mmap
++# define sys_ARCH_mmap sys_mmap
+ #endif
+ [  0] = { 2,	0,		SEN(io_setup),			"io_setup"		},
+ [  1] = { 1,	0,		SEN(io_destroy),		"io_destroy"		},
+@@ -276,5 +276,5 @@
+ [283] = { 2,	0,		SEN(membarrier),		"membarrier",		},
+ [284] = { 3,	TM,		SEN(mlock2),			"mlock2"		},
+ 
+-#undef ARCH_mmap
++#undef sys_ARCH_mmap
+ #undef ARCH_WANT_SYNC_FILE_RANGE2
+diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h
+index 5847dc4..1100008 100644
+--- a/linux/arc/syscallent.h
++++ b/linux/arc/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = { 3,	0,	SEN(printargs),	"arc_cacheflush"},
+ [245] = { 1,	0,	SEN(printargs),	"arc_settls"	},
+diff --git a/linux/nios2/syscallent.h b/linux/nios2/syscallent.h
+index 8a4b70e..01efe3a 100644
+--- a/linux/nios2/syscallent.h
++++ b/linux/nios2/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = {4,    0,	SEN(cacheflush), "cacheflush"},
+ [245 ... 259] = { },
+diff --git a/linux/or1k/syscallent.h b/linux/or1k/syscallent.h
+index ed84b3b..351fe25 100644
+--- a/linux/or1k/syscallent.h
++++ b/linux/or1k/syscallent.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_pgoff
++#define sys_ARCH_mmap sys_mmap_pgoff
+ #include "32/syscallent.h"
+ [244] = { 3,	NF,	SEN(or1k_atomic),	"or1k_atomic"	},
+ [245 ... 259] = { },
+diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h
+index c86f059..28dbab4 100644
+--- a/linux/tile/syscallent1.h
++++ b/linux/tile/syscallent1.h
+@@ -1,4 +1,4 @@
+-#define ARCH_mmap mmap_4koff
++#define sys_ARCH_mmap sys_mmap_4koff
+ #define ARCH_WANT_SYNC_FILE_RANGE2 1
+ #include "32/syscallent.h"
+ [244] = { 1,	0,	SEN(printargs),	"cmpxchg_badaddr"	},
+diff --git a/pathtrace.c b/pathtrace.c
+index d530ec2..e72cdf7 100644
+--- a/pathtrace.c
++++ b/pathtrace.c
+@@ -216,6 +216,7 @@ pathtrace_match(struct tcb *tcp)
+ 	case SEN_mmap:
+ 	case SEN_mmap_4koff:
+ 	case SEN_mmap_pgoff:
++	case SEN_ARCH_mmap:
+ 		/* x, x, x, x, fd */
+ 		return fdmatch(tcp, tcp->u_arg[4]);
+ 
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch
new file mode 100644
index 0000000..c4e645b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/0001-scm_rights-fd.test-rewrite-without-fork.patch
@@ -0,0 +1,198 @@
+From 3fdcdd47c6a67585123a0a0c8fffabcc9f79a3a2 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Tue, 12 Jan 2016 14:47:12 +0000
+Subject: [PATCH] scm_rights-fd.test: rewrite without fork
+
+* tests/scm_rights.c (main): Rewrite without fork.
+Place all objects passed to sendmsg and recvmsg at the end
+of memory pages followed by inaccessible pages.
+* tests/scm_rights-fd.test: Update.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ tests/scm_rights-fd.test |  12 ++---
+ tests/scm_rights.c       | 122 ++++++++++++++++++++++-------------------------
+ 2 files changed, 63 insertions(+), 71 deletions(-)
+
+diff --git a/tests/scm_rights-fd.test b/tests/scm_rights-fd.test
+index a32ef36..48c5028 100755
+--- a/tests/scm_rights-fd.test
++++ b/tests/scm_rights-fd.test
+@@ -49,18 +49,18 @@ touch -- "$file" ||
+ 	framework_skip_ 'failed to create a file'
+ 
+ run_prog ./scm_rights /dev/zero
+-run_strace_merge -y -x -enetwork $args "$file"
++run_strace -y -x -enetwork $args "$file"
+ 
++sample='\\xf1\\xf2\\xf3\\xf4\\xf5\\xf6\\xf7\\xf8\\xf9\\xfa\\xfb\\xfc\\xfd\\xfe\\xff'
+ n='[1-9][0-9]*'
+-msg='\{msg_name\(0\)=NULL, msg_iov\(1\)=\[\{"\\x00\\x00\\x00\\x00[^"]*", '"$n"'\}\], msg_controllen='"$n"
+-rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, \[3</dev/null>, 4</dev/zero>, 5</[^}>]*/(A\\n){127}Z>\]\}'
++msg='\{msg_name\(0\)=NULL, msg_iov\(1\)=\[\{"'"$sample"'", 15\}\], msg_controllen='"$n"
++rights='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, \[4</dev/null>, 5</dev/zero>, 6</[^}>]*/(A\\n){127}Z>\]\}'
+ creds='\{cmsg_len='"$n"', cmsg_level=SOL_SOCKET, cmsg_type=SCM_CREDENTIALS, \{pid='"$n"', uid=[0-9]+, gid=[0-9]+\}\}'
+-prefix='[1-9][0-9]* +[0-9]+:[0-9]+:[0-9]+\.[0-9]+ +'
+ EXPECTED="$LOG.expected"
+ 
+ cat > "$EXPECTED" << __EOF__
+-${prefix}sendmsg\\(1<socket:\\[[0-9]+\\]>, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) += $n
+-${prefix}recvmsg\\(0<socket:\\[[0-9]+\\]>, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) += $n
++sendmsg\\(3<socket:\\[[0-9]+\\]>, $msg, \\[$rights\\], msg_flags=0\\}, 0\\) = 15
++recvmsg\\(0<socket:\\[[0-9]+\\]>, $msg, \\[$creds, $rights\\], msg_flags=0\\}, 0\\) = 15
+ __EOF__
+ 
+ match_grep "$LOG" "$EXPECTED"
+diff --git a/tests/scm_rights.c b/tests/scm_rights.c
+index 1e5e850..00af4d5 100644
+--- a/tests/scm_rights.c
++++ b/tests/scm_rights.c
+@@ -27,26 +27,39 @@
+ 
+ #include "tests.h"
+ #include <assert.h>
+-#include <string.h>
+-#include <stdlib.h>
+-#include <unistd.h>
+ #include <errno.h>
+ #include <fcntl.h>
++#include <stdlib.h>
++#include <string.h>
++#include <unistd.h>
+ #include <sys/socket.h>
+-#include <sys/wait.h>
+ 
+ int main(int ac, const char **av)
+ {
+-	int i;
+-	int data = 0;
+-	struct iovec iov = {
+-		.iov_base = &data,
+-		.iov_len = sizeof(iov)
+-	};
++	assert(ac > 0);
++	int fds[ac];
++
++	static const char sample[] =
++		"\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff";
++	const unsigned int data_size = sizeof(sample) - 1;
++	void *data = tail_alloc(data_size);
++	memcpy(data, sample, data_size);
++
++	struct iovec *iov = tail_alloc(sizeof(struct iovec));
++	iov->iov_base = data;
++	iov->iov_len = data_size;
+ 
+-	while ((i = open("/dev/null", O_RDWR)) < 3)
++	struct msghdr *mh = tail_alloc(sizeof(struct msghdr));
++	memset(mh, 0, sizeof(*mh));
++	mh->msg_iov = iov;
++	mh->msg_iovlen = 1;
++
++	int i;
++	while ((i = open("/dev/null", O_RDWR)) <= ac + 2)
+ 		assert(i >= 0);
+-	(void) close(3);
++	while (i > 2)
++		assert(close(i--) == 0);
++	assert(close(0) == 0);
+ 
+ 	int sv[2];
+ 	if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv))
+@@ -55,60 +68,39 @@ int main(int ac, const char **av)
+ 	if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)))
+ 		perror_msg_and_skip("setsockopt");
+ 
+-	pid_t pid = fork();
+-	if (pid < 0)
+-		perror_msg_and_fail("fork");
+-
+-	if (pid) {
+-		assert(close(sv[0]) == 0);
+-		assert(dup2(sv[1], 1) == 1);
+-		assert(close(sv[1]) == 0);
+-
+-		int fds[ac];
+-		assert((fds[0] = open("/dev/null", O_RDWR)) == 3);
+-		for (i = 1; i < ac; ++i)
+-			assert((fds[i] = open(av[i], O_RDONLY)) == i + 3);
+-
+-		union {
+-			struct cmsghdr cmsg;
+-			char buf[CMSG_LEN(sizeof(fds))];
+-		} control;
+-
+-		control.cmsg.cmsg_level = SOL_SOCKET;
+-		control.cmsg.cmsg_type = SCM_RIGHTS;
+-		control.cmsg.cmsg_len = CMSG_LEN(sizeof(fds));
+-		memcpy(CMSG_DATA(&control.cmsg), fds, sizeof(fds));
+-
+-		struct msghdr mh = {
+-			.msg_iov = &iov,
+-			.msg_iovlen = 1,
+-			.msg_control = &control,
+-			.msg_controllen = sizeof(control)
+-		};
+-
+-		assert(sendmsg(1, &mh, 0) == sizeof(iov));
+-		assert(close(1) == 0);
+-
+-                int status;
+-		assert(waitpid(pid, &status, 0) == pid);
+-		assert(status == 0);
+-	} else {
+-		assert(close(sv[1]) == 0);
+-		assert(dup2(sv[0], 0) == 0);
+-		assert(close(sv[0]) == 0);
+-
+-		struct cmsghdr control[4 + ac * sizeof(int) / sizeof(struct cmsghdr)];
+-
+-		struct msghdr mh = {
+-			.msg_iov = &iov,
+-			.msg_iovlen = 1,
+-			.msg_control = control,
+-			.msg_controllen = sizeof(control)
+-		};
+-
+-		assert(recvmsg(0, &mh, 0) == sizeof(iov));
+-		assert(close(0) == 0);
++	assert((fds[0] = open("/dev/null", O_RDWR)) == 4);
++	for (i = 1; i < ac; ++i)
++		assert((fds[i] = open(av[i], O_RDONLY)) == i + 4);
++
++	unsigned int cmsg_size = CMSG_SPACE(sizeof(fds));
++	struct cmsghdr *cmsg = tail_alloc(cmsg_size);
++	memset(cmsg, 0, cmsg_size);
++	cmsg->cmsg_level = SOL_SOCKET;
++	cmsg->cmsg_type = SCM_RIGHTS;
++	cmsg->cmsg_len = CMSG_LEN(sizeof(fds));
++	memcpy(CMSG_DATA(cmsg), fds, sizeof(fds));
++
++	mh->msg_control = cmsg;
++	mh->msg_controllen = cmsg_size;
++
++	assert(sendmsg(sv[1], mh, 0) == (int) data_size);
++
++	assert(close(sv[1]) == 0);
++	assert(open("/dev/null", O_RDWR) == sv[1]);
++
++	for (i = 0; i < ac; ++i) {
++		assert(close(fds[i]) == 0);
++		fds[i] = 0;
+ 	}
+ 
++	cmsg_size += CMSG_SPACE(sizeof(struct ucred));
++	cmsg = tail_alloc(cmsg_size);
++	memset(cmsg, 0, cmsg_size);
++	mh->msg_control = cmsg;
++	mh->msg_controllen = cmsg_size;
++
++	assert(recvmsg(0, mh, 0) == (int) data_size);
++	assert(close(0) == 0);
++
+ 	return 0;
+ }
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch
new file mode 100644
index 0000000..1575ecd
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-introduce-libtests.patch
@@ -0,0 +1,306 @@
+From 87e6b230fff800eb768b68b2e5173ebbe83fd3ef Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Sat, 2 Jan 2016 12:05:14 +0000
+Subject: [PATCH] tests: introduce libtests
+
+Introduce tests/libtests.a with common functions for use in tests.
+
+* tests/tests.h: New file.
+* tests/error_msg.c: Likewise.
+* tests/tail_alloc.c: Likewise.
+* tests/get_page_size.c: Likewise.
+* tests/Makefile.am (libtests_a_SOURCES, libtests_a_CPPFLAGS,
+check_LIBRARIES, LDADD): New variables.
+(clock_xettime_LDADD, filter_unavailable_LDADD, mq_LDADD,
+pc_LDADD, times_LDADD): Add $(LDADD).
+* tests/.gitignore: Add libtests.a.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ tests/.gitignore      |  1 +
+ tests/Makefile.am     | 20 ++++++++++----
+ tests/error_msg.c     | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++
+ tests/get_page_size.c | 13 +++++++++
+ tests/tail_alloc.c    | 52 ++++++++++++++++++++++++++++++++++++
+ tests/tests.h         | 62 ++++++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 217 insertions(+), 5 deletions(-)
+ create mode 100644 tests/error_msg.c
+ create mode 100644 tests/get_page_size.c
+ create mode 100644 tests/tail_alloc.c
+ create mode 100644 tests/tests.h
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 386a2c2..62d0e56 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -40,6 +40,16 @@ AM_CPPFLAGS = $(ARCH_MFLAGS) \
+ 	      -I$(top_srcdir)
+ AM_LDFLAGS = $(ARCH_MFLAGS)
+ 
++libtests_a_SOURCES = \
++	get_page_size.c \
++	error_msg.c \
++	tail_alloc.c \
++	tests.h \
++	# end of libtests_a_SOURCES
++libtests_a_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
++check_LIBRARIES = libtests.a
++LDADD = libtests.a
++
+ check_PROGRAMS = \
+ 	_newselect \
+ 	adjtimex \
+@@ -146,19 +156,19 @@ check_PROGRAMS = \
+ 	xettimeofday \
+ 	# end of check_PROGRAMS
+ 
+-clock_xettime_LDADD = -lrt
+-filter_unavailable_LDADD = -lpthread
++clock_xettime_LDADD = -lrt $(LDADD)
++filter_unavailable_LDADD = -lpthread $(LDADD)
+ fstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ fstatat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ ftruncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ lstat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ mmap64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+-mq_LDADD = -lrt
++mq_LDADD = -lrt $(LDADD)
+ newfstatat_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+-pc_LDADD = $(dl_LIBS)
++pc_LDADD = $(dl_LIBS) $(LDADD)
+ stat64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ statfs_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+-times_LDADD = -lrt
++times_LDADD = -lrt $(LDADD)
+ truncate64_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ uio_CPPFLAGS = $(AM_CPPFLAGS) -D_FILE_OFFSET_BITS=64
+ stack_fcall_SOURCES = stack-fcall.c \
+diff --git a/tests/error_msg.c b/tests/error_msg.c
+new file mode 100644
+index 0000000..3fd3411
+--- /dev/null
++++ b/tests/error_msg.c
+@@ -0,0 +1,74 @@
++/*
++ * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ *    derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#include "tests.h"
++#include <errno.h>
++#include <stdarg.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++
++void
++perror_msg_and_fail(const char *fmt, ...)
++{
++	int err_no = errno;
++	va_list p;
++
++	va_start(p, fmt);
++	vfprintf(stderr, fmt, p);
++	if (err_no)
++		fprintf(stderr, ": %s\n", strerror(err_no));
++	else
++		putc('\n', stderr);
++	exit(1);
++}
++
++void
++error_msg_and_skip(const char *fmt, ...)
++{
++	va_list p;
++
++	va_start(p, fmt);
++	vfprintf(stderr, fmt, p);
++	putc('\n', stderr);
++	exit(77);
++}
++
++void
++perror_msg_and_skip(const char *fmt, ...)
++{
++	int err_no = errno;
++	va_list p;
++
++	va_start(p, fmt);
++	vfprintf(stderr, fmt, p);
++	if (err_no)
++		fprintf(stderr, ": %s\n", strerror(err_no));
++	else
++		putc('\n', stderr);
++	exit(77);
++}
+diff --git a/tests/get_page_size.c b/tests/get_page_size.c
+new file mode 100644
+index 0000000..aeea861
+--- /dev/null
++++ b/tests/get_page_size.c
+@@ -0,0 +1,13 @@
++#include "tests.h"
++#include <unistd.h>
++
++size_t
++get_page_size(void)
++{
++	static size_t page_size;
++
++	if (!page_size)
++		page_size = sysconf(_SC_PAGESIZE);
++
++	return page_size;
++}
+diff --git a/tests/tail_alloc.c b/tests/tail_alloc.c
+new file mode 100644
+index 0000000..2b8b14e
+--- /dev/null
++++ b/tests/tail_alloc.c
+@@ -0,0 +1,52 @@
++/*
++ * Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ *    derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#include "tests.h"
++#include <string.h>
++#include <sys/mman.h>
++
++void *
++tail_alloc(const size_t size)
++{
++	const size_t page_size = get_page_size();
++	const size_t len = (size + page_size - 1) & -page_size;
++	const size_t alloc_size = len + 2 * page_size;
++
++	void *p = mmap(NULL, alloc_size, PROT_READ | PROT_WRITE,
++		       MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
++	if (MAP_FAILED == p)
++		perror_msg_and_fail("mmap(%zu)", alloc_size);
++
++	void *start_work = p + page_size;
++	void *tail_guard = start_work + len;
++
++	if (munmap(p, page_size) || munmap(tail_guard, page_size))
++		perror_msg_and_fail("munmap");
++
++	memset(start_work, 0xff, len);
++	return tail_guard - size;
++}
+diff --git a/tests/tests.h b/tests/tests.h
+new file mode 100644
+index 0000000..91fa24e
+--- /dev/null
++++ b/tests/tests.h
+@@ -0,0 +1,62 @@
++/*
++ * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 3. The name of the author may not be used to endorse or promote products
++ *    derived from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
++ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
++ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
++ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ */
++
++#ifndef TESTS_H_
++# define TESTS_H_
++
++# ifdef HAVE_CONFIG_H
++#  include "config.h"
++# endif
++
++# include <sys/types.h>
++# include "gcc_compat.h"
++
++/* Cached sysconf(_SC_PAGESIZE). */
++size_t get_page_size(void);
++
++/* Print message and strerror(errno) to stderr, then exit(1). */
++void perror_msg_and_fail(const char *, ...)
++	ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
++/* Print message to stderr, then exit(77). */
++void error_msg_and_skip(const char *, ...)
++	ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
++/* Print message and strerror(errno) to stderr, then exit(77). */
++void perror_msg_and_skip(const char *, ...)
++	ATTRIBUTE_FORMAT((printf, 1, 2)) ATTRIBUTE_NORETURN;
++
++/*
++ * Allocate memory that ends on the page boundary.
++ * Pages allocated by this call are preceeded by an unmapped page
++ * and followed also by an unmapped page.
++ */
++void *tail_alloc(const size_t)
++	ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE((1));
++
++# define SKIP_MAIN_UNDEFINED(arg) \
++	int main(void) { error_msg_and_skip("undefined: %s", arg); }
++
++#endif
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch b/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch
new file mode 100644
index 0000000..3fbab8b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/0001-tests-scm_rights.c-use-libtests.patch
@@ -0,0 +1,54 @@
+From 339a15b619b479c63cafba21d5fc359e613d9ee8 Mon Sep 17 00:00:00 2001
+From: "Dmitry V. Levin" <ldv@altlinux.org>
+Date: Mon, 4 Jan 2016 23:53:31 +0000
+Subject: [PATCH] tests/scm_rights.c: use libtests
+
+* tests/scm_rights.c (main): Use perror_msg_and_fail and perror_msg_and_skip.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Backport
+
+ tests/scm_rights.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/tests/scm_rights.c b/tests/scm_rights.c
+index c41444f..1e5e850 100644
+--- a/tests/scm_rights.c
++++ b/tests/scm_rights.c
+@@ -1,5 +1,5 @@
+ /*
+- * Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
++ * Copyright (c) 2014-2016 Dmitry V. Levin <ldv@altlinux.org>
+  * All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+@@ -25,6 +25,7 @@
+  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
++#include "tests.h"
+ #include <assert.h>
+ #include <string.h>
+ #include <stdlib.h>
+@@ -48,12 +49,15 @@ int main(int ac, const char **av)
+ 	(void) close(3);
+ 
+ 	int sv[2];
+-	assert(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0);
++	if (socketpair(AF_UNIX, SOCK_STREAM, 0, sv))
++		perror_msg_and_skip("socketpair");
+ 	int one = 1;
+-	assert(setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) == 0);
++	if (setsockopt(sv[0], SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)))
++		perror_msg_and_skip("setsockopt");
+ 
+ 	pid_t pid = fork();
+-	assert(pid >= 0);
++	if (pid < 0)
++		perror_msg_and_fail("fork");
+ 
+ 	if (pid) {
+ 		assert(close(sv[0]) == 0);
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/Include-linux-ioctl.h-for-_IOC_-macros.patch b/yocto-poky/meta/recipes-devtools/strace/strace/Include-linux-ioctl.h-for-_IOC_-macros.patch
deleted file mode 100644
index d9346a8..0000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace/Include-linux-ioctl.h-for-_IOC_-macros.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Upstream-Status: Backport
-
-  http://sourceforge.net/p/strace/code/ci/3460dc486d333231998de0f19918204aacee9ae3
-
-Expected to be released officially as part of strace 4.11
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From 3460dc486d333231998de0f19918204aacee9ae3 Mon Sep 17 00:00:00 2001
-From: Felix Janda <felix.janda@posteo.de>
-Date: Sat, 28 Mar 2015 18:40:13 +0100
-Subject: [PATCH] Include <linux/ioctl.h> for _IOC_* macros
-
-Fix a compilation failure with musl libc.
-
-* evdev.c: Include <linux/ioctl.h>.
-* ioctl.c: Include <linux/ioctl.h> instead of <asm/ioctl.h>.
-* ioctlsort.c: Likewise.
-
-Reported-by: Dima Krasner <dima@dimakrasner.com>
-Acked-by: Mike Frysinger <vapier@gentoo.org>
----
- evdev.c     | 2 ++
- ioctl.c     | 2 +-
- ioctlsort.c | 2 +-
- 3 files changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/evdev.c b/evdev.c
-index 9a7430d..e06f9c1 100644
---- a/evdev.c
-+++ b/evdev.c
-@@ -28,6 +28,8 @@
- 
- #include "defs.h"
- 
-+#include <linux/ioctl.h>
-+
- #ifdef HAVE_LINUX_INPUT_H
- #include <linux/input.h>
- #include "xlat/evdev_abs.h"
-diff --git a/ioctl.c b/ioctl.c
-index 46f8334..c67d048 100644
---- a/ioctl.c
-+++ b/ioctl.c
-@@ -29,7 +29,7 @@
-  */
- 
- #include "defs.h"
--#include <asm/ioctl.h>
-+#include <linux/ioctl.h>
- #include "xlat/ioctl_dirs.h"
- 
- #ifdef HAVE_LINUX_INPUT_H
-diff --git a/ioctlsort.c b/ioctlsort.c
-index 333556c..9c31691 100644
---- a/ioctlsort.c
-+++ b/ioctlsort.c
-@@ -33,7 +33,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
--#include <asm/ioctl.h>
-+#include <linux/ioctl.h>
- 
- struct ioctlent {
- 	const char *info;
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/Include-sys-stat.h-for-S_I-macros.patch b/yocto-poky/meta/recipes-devtools/strace/strace/Include-sys-stat.h-for-S_I-macros.patch
deleted file mode 100644
index 0b072fe..0000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace/Include-sys-stat.h-for-S_I-macros.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Upstream-Status: Backport
-
-  http://sourceforge.net/p/strace/code/ci/d34e00b293942b1012ddc49ed3ab379a32337611
-
-Expected to be released officially as part of strace 4.11
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-From d34e00b293942b1012ddc49ed3ab379a32337611 Mon Sep 17 00:00:00 2001
-From: Felix Janda <felix.janda@posteo.de>
-Date: Sat, 28 Mar 2015 18:21:09 +0100
-Subject: [PATCH] Include <sys/stat.h> for S_I* macros
-
-Fix a compilation failure with musl libc.
-
-* mknod.c: Include <sys/stat.h>.
-* printmode.c: Likewise.
-
-Reported-by: Dima Krasner <dima@dimakrasner.com>
-Acked-by: Mike Frysinger <vapier@gentoo.org>
----
- mknod.c     | 1 +
- printmode.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/mknod.c b/mknod.c
-index 07e9a45..1463232 100644
---- a/mknod.c
-+++ b/mknod.c
-@@ -1,6 +1,7 @@
- #include "defs.h"
- 
- #include <fcntl.h>
-+#include <sys/stat.h>
- 
- #ifdef MAJOR_IN_SYSMACROS
- # include <sys/sysmacros.h>
-diff --git a/printmode.c b/printmode.c
-index 4df1b9f..a721936 100644
---- a/printmode.c
-+++ b/printmode.c
-@@ -1,6 +1,7 @@
- #include "defs.h"
- 
- #include <fcntl.h>
-+#include <sys/stat.h>
- 
- #include "xlat/modetypes.h"
- 
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch b/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
index f360301..824031e 100644
--- a/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
@@ -10,32 +10,32 @@
  2 files changed, 19 insertions(+), 1 deletion(-)
 
 diff --git a/configure.ac b/configure.ac
-index e73958c..5f0dfee 100644
+index 0209bac..b969e25 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -6,7 +6,7 @@ AC_INIT([strace],
+@@ -36,7 +36,7 @@ AC_INIT([strace],
  AC_CONFIG_SRCDIR([strace.c])
  AC_CONFIG_AUX_DIR([.])
  AC_CONFIG_HEADERS([config.h])
--AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules parallel-tests])
-+AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip silent-rules serial-tests])
+-AM_INIT_AUTOMAKE([foreign nostdinc dist-xz no-dist-gzip silent-rules parallel-tests])
++AM_INIT_AUTOMAKE([foreign nostdinc dist-xz no-dist-gzip silent-rules serial-tests])
  AM_MAINTAINER_MODE
  AC_CANONICAL_HOST
  
 diff --git a/tests/Makefile.am b/tests/Makefile.am
-index ff5e136..984bdb6 100644
+index 0f23b4b..429f7e9 100644
 --- a/tests/Makefile.am
 +++ b/tests/Makefile.am
-@@ -101,3 +101,21 @@ EXTRA_DIST = init.sh run.sh \
- 	     $(TESTS)
+@@ -332,3 +332,21 @@ ksysent.h: $(srcdir)/ksysent.sed
  
- CLEANFILES = $(TESTS:=.tmp)
+ BUILT_SOURCES = ksysent.h
+ CLEANFILES = ksysent.h $(TESTS:=.tmp)
 +
 +buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
 +
 +install-ptest:
 +	install $(BUILDDIR)/strace $(DESTDIR)
-+	install "$(srcdir)/.."/strace-log-merge $(DESTDIR)
++	install $(srcdir)/../strace-log-merge $(DESTDIR)
 +	install -d $(DESTDIR)/$(TESTDIR)
 +	cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
 +	sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch b/yocto-poky/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
new file mode 100644
index 0000000..7bc1436
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/disable-git-version-gen.patch
@@ -0,0 +1,20 @@
+The git-version-gen script is not included in tarball releases,
+so we need to avoid attempts to call it when running autoreconf.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+Index: strace-4.10/configure.ac
+===================================================================
+--- strace-4.10.orig/configure.ac
++++ strace-4.10/configure.ac
+@@ -1,7 +1,7 @@
+ dnl Process this file with autoconf to create configure.  Use autoreconf.
+ AC_PREREQ(2.57)
+ AC_INIT([strace],
+-	m4_esyscmd([./git-version-gen .tarball-version]),
++	m4_esyscmd_s([cat .tarball-version]),
+ 	[strace-devel@lists.sourceforge.net])
+ AC_CONFIG_SRCDIR([strace.c])
+ AC_CONFIG_AUX_DIR([.])
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/git-version-gen b/yocto-poky/meta/recipes-devtools/strace/strace/git-version-gen
deleted file mode 100755
index 8fee74e..0000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace/git-version-gen
+++ /dev/null
@@ -1,225 +0,0 @@
-#!/bin/sh
-# Print a version string.
-scriptversion=2012-12-31.23; # UTC
-
-# Copyright (C) 2007-2013 Free Software Foundation, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
-# It may be run two ways:
-# - from a git repository in which the "git describe" command below
-#   produces useful output (thus requiring at least one signed tag)
-# - from a non-git-repo directory containing a .tarball-version file, which
-#   presumes this script is invoked like "./git-version-gen .tarball-version".
-
-# In order to use intra-version strings in your project, you will need two
-# separate generated version string files:
-#
-# .tarball-version - present only in a distribution tarball, and not in
-#   a checked-out repository.  Created with contents that were learned at
-#   the last time autoconf was run, and used by git-version-gen.  Must not
-#   be present in either $(srcdir) or $(builddir) for git-version-gen to
-#   give accurate answers during normal development with a checked out tree,
-#   but must be present in a tarball when there is no version control system.
-#   Therefore, it cannot be used in any dependencies.  GNUmakefile has
-#   hooks to force a reconfigure at distribution time to get the value
-#   correct, without penalizing normal development with extra reconfigures.
-#
-# .version - present in a checked-out repository and in a distribution
-#   tarball.  Usable in dependencies, particularly for files that don't
-#   want to depend on config.h but do want to track version changes.
-#   Delete this file prior to any autoconf run where you want to rebuild
-#   files to pick up a version string change; and leave it stale to
-#   minimize rebuild time after unrelated changes to configure sources.
-#
-# As with any generated file in a VC'd directory, you should add
-# /.version to .gitignore, so that you don't accidentally commit it.
-# .tarball-version is never generated in a VC'd directory, so needn't
-# be listed there.
-#
-# Use the following line in your configure.ac, so that $(VERSION) will
-# automatically be up-to-date each time configure is run (and note that
-# since configure.ac no longer includes a version string, Makefile rules
-# should not depend on configure.ac for version updates).
-#
-# AC_INIT([GNU project],
-#         m4_esyscmd([build-aux/git-version-gen .tarball-version]),
-#         [bug-project@example])
-#
-# Then use the following lines in your Makefile.am, so that .version
-# will be present for dependencies, and so that .version and
-# .tarball-version will exist in distribution tarballs.
-#
-# EXTRA_DIST = $(top_srcdir)/.version
-# BUILT_SOURCES = $(top_srcdir)/.version
-# $(top_srcdir)/.version:
-#	echo $(VERSION) > $@-t && mv $@-t $@
-# dist-hook:
-#	echo $(VERSION) > $(distdir)/.tarball-version
-
-
-me=$0
-
-version="git-version-gen $scriptversion
-
-Copyright 2011 Free Software Foundation, Inc.
-There is NO warranty.  You may redistribute this software
-under the terms of the GNU General Public License.
-For more information about these matters, see the files named COPYING."
-
-usage="\
-Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
-Print a version string.
-
-Options:
-
-   --prefix           prefix of git tags (default 'v')
-   --fallback         fallback version to use if \"git --version\" fails
-
-   --help             display this help and exit
-   --version          output version information and exit
-
-Running without arguments will suffice in most cases."
-
-prefix=v
-fallback=
-
-while test $# -gt 0; do
-  case $1 in
-    --help) echo "$usage"; exit 0;;
-    --version) echo "$version"; exit 0;;
-    --prefix) shift; prefix="$1";;
-    --fallback) shift; fallback="$1";;
-    -*)
-      echo "$0: Unknown option '$1'." >&2
-      echo "$0: Try '--help' for more information." >&2
-      exit 1;;
-    *)
-      if test "x$tarball_version_file" = x; then
-        tarball_version_file="$1"
-      elif test "x$tag_sed_script" = x; then
-        tag_sed_script="$1"
-      else
-        echo "$0: extra non-option argument '$1'." >&2
-        exit 1
-      fi;;
-  esac
-  shift
-done
-
-if test "x$tarball_version_file" = x; then
-    echo "$usage"
-    exit 1
-fi
-
-tag_sed_script="${tag_sed_script:-s/x/x/}"
-
-nl='
-'
-
-# Avoid meddling by environment variable of the same name.
-v=
-v_from_git=
-
-# First see if there is a tarball-only version file.
-# then try "git describe", then default.
-if test -f $tarball_version_file
-then
-    v=`cat $tarball_version_file` || v=
-    case $v in
-        *$nl*) v= ;; # reject multi-line output
-        [0-9]*) ;;
-        *) v= ;;
-    esac
-    test "x$v" = x \
-        && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
-fi
-
-if test "x$v" != x
-then
-    : # use $v
-# Otherwise, if there is at least one git commit involving the working
-# directory, and "git describe" output looks sensible, use that to
-# derive a version string.
-elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
-    && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
-          || git describe --abbrev=4 HEAD 2>/dev/null` \
-    && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
-    && case $v in
-         $prefix[0-9]*) ;;
-         *) (exit 1) ;;
-       esac
-then
-    # Is this a new git that lists number of commits since the last
-    # tag or the previous older version that did not?
-    #   Newer: v6.10-77-g0f8faeb
-    #   Older: v6.10-g0f8faeb
-    case $v in
-        *-*-*) : git describe is okay three part flavor ;;
-        *-*)
-            : git describe is older two part flavor
-            # Recreate the number of commits and rewrite such that the
-            # result is the same as if we were using the newer version
-            # of git describe.
-            vtag=`echo "$v" | sed 's/-.*//'`
-            commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \
-                || { commit_list=failed;
-                     echo "$0: WARNING: git rev-list failed" 1>&2; }
-            numcommits=`echo "$commit_list" | wc -l`
-            v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
-            test "$commit_list" = failed && v=UNKNOWN
-            ;;
-    esac
-
-    # Change the first '-' to a '.', so version-comparing tools work properly.
-    # Remove the "g" in git describe's output string, to save a byte.
-    v=`echo "$v" | sed 's/-/.0./;s/\(.*\)-g/\1-/'`;
-    v_from_git=1
-elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
-    v=UNKNOWN
-else
-    v=$fallback
-fi
-
-v=`echo "$v" |sed "s/^$prefix//"`
-
-# Test whether to append the "-dirty" suffix only if the version
-# string we're using came from git.  I.e., skip the test if it's "UNKNOWN"
-# or if it came from .tarball-version.
-if test "x$v_from_git" != x; then
-  # Don't declare a version "dirty" merely because a time stamp has changed.
-  git update-index --refresh > /dev/null 2>&1
-
-  dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
-  case "$dirty" in
-      '') ;;
-      *) # Append the suffix only if there isn't one already.
-          case $v in
-            *-dirty) ;;
-            *) v="$v-dirty" ;;
-          esac ;;
-  esac
-fi
-
-# Omit the trailing newline, so that m4_esyscmd can use the result directly.
-echo "$v" | tr -d "$nl"
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch b/yocto-poky/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch
new file mode 100644
index 0000000..756cd8b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch
@@ -0,0 +1,46 @@
+From 154af50ed7ed8b91838d713052ebf29b0b14f765 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Mon, 18 Jan 2016 11:00:00 -0800
+Subject: [PATCH] mpers.m4: more robust test for -m32/-mx32 compile support
+
+When using the default OE toolchain for x86-64, the basic checks for
+-m32 and -mx32 compile support in mpers.m4 pass but later attempts to
+actually use the toolchain with -m32 fail, e.g.
+
+ | In file included from /home/andre/build/tmp/sysroots/qemux86-64/usr/include/sys/syscall.h:31:0,
+ |                  from ../strace-4.11/defs.h:55,
+ |                  from mpers-m32/kernel_dirent.c:32:
+ | /home/andre/build/tmp/sysroots/qemux86-64/usr/include/bits/syscall.h:41:29: fatal error: bits/syscall-32.h: No such file or directory
+
+Make the mpers.m4 tests more robust so that configure correctly
+detects the limitations of the OE toolchain.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ m4/mpers.m4 | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/m4/mpers.m4 b/m4/mpers.m4
+index 1fe8a8e..d72c717 100644
+--- a/m4/mpers.m4
++++ b/m4/mpers.m4
+@@ -53,12 +53,14 @@ case "$arch" in
+ 	CFLAGS="$CFLAGS CFLAG $IFLAG"
+ 	AC_CACHE_CHECK([for CFLAG compile support], [st_cv_cc],
+ 		[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdint.h>
++						     #include <sys/syscall.h>
+ 						     int main(){return 0;}]])],
+ 				   [st_cv_cc=yes],
+ 				   [st_cv_cc=no])])
+ 	if test $st_cv_cc = yes; then
+ 		AC_CACHE_CHECK([for CFLAG runtime support], [st_cv_runtime],
+ 			[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdint.h>
++							 #include <sys/syscall.h>
+ 							 int main(){return 0;}]])],
+ 				       [st_cv_runtime=yes],
+ 				       [st_cv_runtime=no],
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/strace-add-configure-options.patch b/yocto-poky/meta/recipes-devtools/strace/strace/strace-add-configure-options.patch
deleted file mode 100644
index e48e4b3..0000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace/strace-add-configure-options.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Add options "aio" and "acl" to enable/disable libaio and acl support.
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- configure.ac |   26 ++++++++++++++++++++++++++
- 1 file changed, 26 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index e73958c..9099370 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -270,6 +270,18 @@ AC_CHECK_HEADERS(m4_normalize([
- 	sys/vfs.h
- 	sys/xattr.h
- ]))
-+
-+AC_ARG_ENABLE([acl],
-+	[AS_HELP_STRING([--enable-acl], [turn on acl support])],
-+	[case $enableval in
-+	yes)
-+		AC_CHECK_HEADERS([sys/acl.h])
-+		;;
-+	no)  ;;
-+	*)   AC_MSG_ERROR([bad value $enableval for aio option]) ;;
-+	esac]
-+)
-+
- AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/netlink.h linux/if_packet.h],
-                  [], [], [#include <stddef.h>
- #include <sys/socket.h>
-@@ -745,6 +757,20 @@ if test "x$ac_cv_lib_dl_dladdr" = xyes; then
- fi
- AC_SUBST(dl_LIBS)
- 
-+AC_ARG_ENABLE([aio],
-+	[AS_HELP_STRING([--enable-aio], [turn on libaio support])],
-+	[case $enableval in
-+	yes)
-+	AC_CHECK_HEADERS([libaio.h], [
-+		AC_CHECK_MEMBERS([struct iocb.u.c.flags],,, [#include <libaio.h>])
-+		AC_CHECK_DECLS([IO_CMD_PWRITE, IO_CMD_PWRITEV],,, [#include <libaio.h>])
-+	])
-+	;;
-+	no)  ;;
-+	*)   AC_MSG_ERROR([bad value $enableval for aio option]) ;;
-+	esac]
-+)
-+
- AC_PATH_PROG([PERL], [perl])
- 
- dnl stack trace with libunwind
---
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch b/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
new file mode 100644
index 0000000..bfc7f34
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/update-gawk-paths.patch
@@ -0,0 +1,118 @@
+From 3836518c46bd5bb3e71371b1b18274bf2d487133 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Mon, 18 Jan 2016 11:01:00 -0800
+Subject: [PATCH] update gawk paths, /bin/gawk -> /usr/bin/gawk
+
+The default path to gawk is /usr/bin/gawk, so update test scripts etc
+from #!/bin/gawk to #!/usr/bin/gawk. Fixes missing RDPENDS QA tests:
+
+  WARNING: QA Issue: /usr/lib/strace/ptest/tests/unix-yy-accept.awk_strace-ptest contained in package strace-ptest requires /bin/gawk, but no providers found in its RDEPENDS [file-rdeps]
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ mpers.awk                 | 2 +-
+ tests/caps.awk            | 2 +-
+ tests/match.awk           | 2 +-
+ tests/net-yy-accept.awk   | 2 +-
+ tests/net-yy-connect.awk  | 2 +-
+ tests/sigaction.awk       | 2 +-
+ tests/uid.awk             | 2 +-
+ tests/unix-yy-accept.awk  | 2 +-
+ tests/unix-yy-connect.awk | 2 +-
+ 9 files changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/mpers.awk b/mpers.awk
+index 73bf0b0..50e6c16 100644
+--- a/mpers.awk
++++ b/mpers.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2015 Elvira Khabirova <lineprinter0@gmail.com>
+ # Copyright (c) 2015 Dmitry V. Levin <ldv@altlinux.org>
+diff --git a/tests/caps.awk b/tests/caps.awk
+index bad8b0f..845f37c 100644
+--- a/tests/caps.awk
++++ b/tests/caps.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # All rights reserved.
+diff --git a/tests/match.awk b/tests/match.awk
+index abfbae9..f2740bf 100644
+--- a/tests/match.awk
++++ b/tests/match.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # All rights reserved.
+diff --git a/tests/net-yy-accept.awk b/tests/net-yy-accept.awk
+index fed3e30..e916ab0 100644
+--- a/tests/net-yy-accept.awk
++++ b/tests/net-yy-accept.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+diff --git a/tests/net-yy-connect.awk b/tests/net-yy-connect.awk
+index f4dcf91..b3cec8c 100644
+--- a/tests/net-yy-connect.awk
++++ b/tests/net-yy-connect.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+diff --git a/tests/sigaction.awk b/tests/sigaction.awk
+index 5c6b6d0..3e14464 100644
+--- a/tests/sigaction.awk
++++ b/tests/sigaction.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # All rights reserved.
+diff --git a/tests/uid.awk b/tests/uid.awk
+index a56c5be..67b0749 100644
+--- a/tests/uid.awk
++++ b/tests/uid.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+ # All rights reserved.
+diff --git a/tests/unix-yy-accept.awk b/tests/unix-yy-accept.awk
+index 4ed60e4..2a9d9c0 100644
+--- a/tests/unix-yy-accept.awk
++++ b/tests/unix-yy-accept.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+diff --git a/tests/unix-yy-connect.awk b/tests/unix-yy-connect.awk
+index 262bf2e..c809dfa 100644
+--- a/tests/unix-yy-connect.awk
++++ b/tests/unix-yy-connect.awk
+@@ -1,4 +1,4 @@
+-#!/bin/gawk
++#!/usr/bin/gawk
+ #
+ # Copyright (c) 2014 Masatake YAMATO <yamato@redhat.com>
+ # Copyright (c) 2014-2015 Dmitry V. Levin <ldv@altlinux.org>
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch b/yocto-poky/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch
new file mode 100644
index 0000000..db83d11
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace/use-asm-sgidefs.h.patch
@@ -0,0 +1,51 @@
+From 2995245d7e3f46e8b3995002995ebd28beca7d55 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Fri, 5 Feb 2016 14:00:00 -0800
+Subject: [PATCH] use <asm/sgidefs.h>
+
+Build fix for MIPS with musl libc.
+
+The MIPS specific header <sgidefs.h> is provided by glibc and uclibc
+but not by musl. Regardless of the libc, the kernel headers provide
+<asm/sgidefs.h> which provides the same definitions, so use that
+instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ configure.ac | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1524b9b..287e03d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -196,20 +196,20 @@ AC_SUBST(arch_mx32)
+ if test "$arch" = mips; then
+ 	AC_CACHE_CHECK([for _MIPS_SIM], [st_cv__MIPS_SIM],
+ 		       [AC_COMPUTE_INT([st_cv__MIPS_SIM], [_MIPS_SIM],
+-				       [#include <sgidefs.h>],
++				       [#include <asm/sgidefs.h>],
+ 				       [AC_MSG_ERROR([_MIPS_SIM cannot be determined])])])
+ 
+ 	AC_CACHE_CHECK([for MIPS ABI], [st_cv_mips_abi],
+ 		[AC_COMPILE_IFELSE(
+-			[AC_LANG_PROGRAM([[#include <sgidefs.h>]],
++			[AC_LANG_PROGRAM([[#include <asm/sgidefs.h>]],
+ 					 [[int i[_MIPS_SIM == _MIPS_SIM_ABI32 ? 1 : - 1];]])],
+ 			[st_cv_mips_abi=o32],
+ 		[AC_COMPILE_IFELSE(
+-			[AC_LANG_PROGRAM([[#include <sgidefs.h>]],
++			[AC_LANG_PROGRAM([[#include <asm/sgidefs.h>]],
+ 					 [[int i[_MIPS_SIM == _MIPS_SIM_NABI32 ? 1 : - 1];]])],
+ 			[st_cv_mips_abi=n32],
+ 		[AC_COMPILE_IFELSE(
+-			[AC_LANG_PROGRAM([[#include <sgidefs.h>]],
++			[AC_LANG_PROGRAM([[#include <asm/sgidefs.h>]],
+ 					 [[int i[_MIPS_SIM == _MIPS_SIM_ABI64 ? 1 : - 1];]])],
+ 			[st_cv_mips_abi=n64],
+ 			[st_cv_mips_abi=unknown])])])])
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace_4.10.bb b/yocto-poky/meta/recipes-devtools/strace/strace_4.10.bb
deleted file mode 100644
index 20b7e3d..0000000
--- a/yocto-poky/meta/recipes-devtools/strace/strace_4.10.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "System call tracing tool"
-HOMEPAGE = "http://strace.sourceforge.net"
-SECTION = "console/utils"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
-           file://0001-Add-linux-aarch64-arch_regs.h.patch \
-           file://git-version-gen \
-           file://strace-add-configure-options.patch \
-           file://Makefile-ptest.patch \
-           file://run-ptest \
-           file://Include-sys-stat.h-for-S_I-macros.patch \
-           file://Include-linux-ioctl.h-for-_IOC_-macros.patch \
-          "
-
-SRC_URI[md5sum] = "107a5be455493861189e9b57a3a51912"
-SRC_URI[sha256sum] = "e6180d866ef9e76586b96e2ece2bfeeb3aa23f5cc88153f76e9caedd65e40ee2"
-
-inherit autotools ptest bluetooth
-RDEPENDS_${PN}-ptest += "make coreutils grep gawk"
-
-PACKAGECONFIG_class-target ??= "\
-    libaio ${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
-"
-
-PACKAGECONFIG[libaio] = "--enable-aio,--disable-aio,libaio"
-PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
-PACKAGECONFIG[libunwind] = "--with-libunwind, --without-libunwind, libunwind"
-PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
-
-TESTDIR = "tests"
-
-do_configure_prepend() {
-	cp ${WORKDIR}/git-version-gen ${S}
-}
-
-do_install_append() {
-	# We don't ship strace-graph here because it needs perl
-	rm ${D}${bindir}/strace-graph
-}
-
-do_compile_ptest() {
-	oe_runmake -C ${TESTDIR} buildtest-TESTS OS=linux ARCH="${TARGET_ARCH}"
-}
-
-do_install_ptest() {
-	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
-}
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb b/yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb
new file mode 100644
index 0000000..7391388
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/strace/strace_4.11.bb
@@ -0,0 +1,51 @@
+SUMMARY = "System call tracing tool"
+HOMEPAGE = "http://strace.sourceforge.net"
+SECTION = "console/utils"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=124500c21e856f0912df29295ba104c7"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/strace/strace-${PV}.tar.xz \
+           file://disable-git-version-gen.patch \
+           file://more-robust-test-for-m32-mx32-compile-support.patch \
+           file://update-gawk-paths.patch \
+           file://use-asm-sgidefs.h.patch \
+           file://0001-arc-metag-nios2-or1k-tile-fix-build.patch \
+           file://Makefile-ptest.patch \
+           file://0001-tests-scm_rights.c-use-libtests.patch \
+           file://0001-scm_rights-fd.test-rewrite-without-fork.patch \
+           file://0001-Move-gcc-compat-macros-to-gcc_compat.h.patch \
+           file://0001-tests-introduce-libtests.patch \
+           file://run-ptest \
+          "
+
+SRC_URI[md5sum] = "a15d2555a7febb56d00c6e1a51c655dc"
+SRC_URI[sha256sum] = "e86a5f6cd8f941f67f3e4b28f4e60f3d9185c951cf266404533210a2e5cd8152"
+
+inherit autotools ptest bluetooth
+
+RDEPENDS_${PN}-ptest += "make coreutils grep gawk sed"
+
+PACKAGECONFIG_class-target ??= "\
+    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
+"
+
+PACKAGECONFIG[bluez] = "ac_cv_header_bluetooth_bluetooth_h=yes,ac_cv_header_bluetooth_bluetooth_h=no,${BLUEZ}"
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+
+TESTDIR = "tests"
+
+do_install_append() {
+	# We don't ship strace-graph here because it needs perl
+	rm ${D}${bindir}/strace-graph
+}
+
+do_compile_ptest() {
+	oe_runmake -C ${TESTDIR} buildtest-TESTS
+}
+
+do_install_ptest() {
+	oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
+	sed -i -e '/^src/s/strace.*[1-9]/ptest/' ${D}/${PTEST_PATH}/${TESTDIR}/Makefile
+}
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/libtool2.patch b/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/libtool2.patch
deleted file mode 100644
index 5cd572b..0000000
--- a/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/libtool2.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Upstream-Status: Inappropriate [embedded specific]
-
---- a/configure.ac	2011-10-20 21:56:02.230663987 +0200
-+++ b/configure.ac	2011-08-17 15:01:30.000000000 +0200
-@@ -227,8 +227,8 @@
-   LIBTOOL="$sh_libtool"
-   SVN_LIBTOOL="$sh_libtool"
- else
--  sh_libtool="$abs_builddir/libtool"
--  SVN_LIBTOOL="\$(SHELL) $sh_libtool"
-+  sh_libtool="$abs_builddir/$host_alias-libtool"
-+  SVN_LIBTOOL="\$(SHELL) \$(abs_builddir)/$host_alias-libtool"
- fi
- AC_SUBST(SVN_LIBTOOL)
- 
diff --git a/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/serf.m4-Regex-modified-to-allow-D-in-paths.patch b/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/serf.m4-Regex-modified-to-allow-D-in-paths.patch
deleted file mode 100644
index 140e522..0000000
--- a/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/serf.m4-Regex-modified-to-allow-D-in-paths.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From f1b6e49f12a18eabe88eb732b578a16281d09499 Mon Sep 17 00:00:00 2001
-From: Jose Lamego <jose.a.lamego@linux.intel.com>
-Date: Thu, 2 Jul 2015 11:37:43 +0000
-Subject: [PATCH] serf.m4: Regex modified to allow '-D' in paths
-
-Upstream-Status: Accepted
-
-The patch is merged by subversion upstream with replacing '[[:space:]]' with ' '.
-
-http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/serf.m4?r1=1594156&r2=1689824  
-
-Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
----
- build/ac-macros/serf.m4 | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build/ac-macros/serf.m4 b/build/ac-macros/serf.m4
-index ae11e75..ff8cbae 100644
---- a/build/ac-macros/serf.m4
-+++ b/build/ac-macros/serf.m4
-@@ -143,7 +143,7 @@ AC_DEFUN(SVN_SERF_PKG_CONFIG,
-         if $PKG_CONFIG $serf_major --atleast-version=$serf_check_version; then
-           AC_MSG_RESULT([yes])
-           serf_found=yes
--          SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_major --cflags | $SED -e 's/-D[^ ]*//g'`]
-+          SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_major --cflags | $SED -e 's/[[:space:]]-D[^ ]*//g' -e 's/^-D[^ ]*//g'`]
-           SVN_SERF_LIBS=`$PKG_CONFIG $serf_major --libs` 
-           break
-         else
--- 
-1.8.4.5
-
diff --git a/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/subversion-CVE-2015-3184.patch b/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/subversion-CVE-2015-3184.patch
deleted file mode 100644
index 0663bd2..0000000
--- a/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/subversion-CVE-2015-3184.patch
+++ /dev/null
@@ -1,2094 +0,0 @@
-Fix CVE-2015-3184
-
-Patch is from:
-http://subversion.apache.org/security/CVE-2015-3184-advisory.txt
-
-Upstream-Status: Backport
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-
-Index: Makefile.in
-===================================================================
---- a/Makefile.in	(revision 1691883)
-+++ b/Makefile.in	(working copy)
-@@ -357,6 +357,7 @@ TEST_SHLIB_VAR_SWIG_RB=\
-   fi;
- 
- APXS = @APXS@
-+HTTPD_VERSION = @HTTPD_VERSION@
- 
- PYTHON = @PYTHON@
- PERL = @PERL@
-@@ -509,6 +510,9 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $(TEST_DEPS
- 	  if test "$(HTTP_LIBRARY)" != ""; then                              \
- 	    flags="--http-library $(HTTP_LIBRARY) $$flags";                  \
- 	  fi;                                                                \
-+	  if test "$(HTTPD_VERSION)" != ""; then                              \
-+	    flags="--httpd-version $(HTTPD_VERSION) $$flags";                  \
-+	  fi;                                                                \
- 	  if test "$(SERVER_MINOR_VERSION)" != ""; then                      \
- 	    flags="--server-minor-version $(SERVER_MINOR_VERSION) $$flags";  \
- 	  fi;                                                                \
-Index: build/ac-macros/apache.m4
-===================================================================
---- a/build/ac-macros/apache.m4	(revision 1691883)
-+++ b/build/ac-macros/apache.m4	(working copy)
-@@ -160,6 +160,20 @@ if test -n "$APXS" && test "$APXS" != "no"; then
-     BUILD_APACHE_RULE=apache-mod
-     INSTALL_APACHE_RULE=install-mods-shared
-     INSTALL_APACHE_MODS=true
-+    HTTPD="`$APXS -q sbindir`/`$APXS -q PROGNAME`"
-+    if ! test -e $HTTPD ; then
-+      HTTPD="`$APXS -q bindir`/`$APXS -q PROGNAME`"
-+    fi
-+    HTTPD_VERSION=["`$HTTPD -v | $SED -e 's@^.*/\([0-9.]*\)\(.*$\)@\1@ ; 1q'`"]
-+    AC_ARG_ENABLE(broken-httpd-auth,
-+      AS_HELP_STRING([--enable-broken-httpd-auth],
-+                     [Allow building against httpd 2.4 with broken auth]),
-+      [broken_httpd_auth=$enableval],[broken_httpd_auth=no])
-+    if test "$enable_broken_httpd_auth" = "yes"; then
-+      AC_MSG_NOTICE([Building with broken httpd auth])
-+      AC_DEFINE(SVN_ALLOW_BROKEN_HTTPD_AUTH, 1,
-+                [Defined to allow building against httpd 2.4 with broken auth])
-+    fi
- 
-     case $host in
-       *-*-cygwin*)
-@@ -178,6 +192,7 @@ AC_SUBST(APACHE_LDFLAGS)
- AC_SUBST(APACHE_INCLUDES)
- AC_SUBST(APACHE_LIBEXECDIR)
- AC_SUBST(INSTALL_APACHE_MODS)
-+AC_SUBST(HTTPD_VERSION)
- 
- # there aren't any flags that interest us ...
- #if test -n "$APXS" && test "$APXS" != "no"; then
-Index: build/run_tests.py
-===================================================================
---- a/build/run_tests.py	(revision 1691883)
-+++ b/build/run_tests.py	(working copy)
-@@ -29,6 +29,7 @@
-             [--fs-type=<fs-type>] [--fsfs-packing] [--fsfs-sharding=<n>]
-             [--list] [--milestone-filter=<regex>] [--mode-filter=<type>]
-             [--server-minor-version=<version>] [--http-proxy=<host>:<port>]
-+            [--httpd-version=<version>]
-             [--config-file=<file>] [--ssl-cert=<file>]
-             <abs_srcdir> <abs_builddir>
-             <prog ...>
-@@ -125,7 +126,7 @@ class TestHarness:
-                fsfs_sharding=None, fsfs_packing=None,
-                list_tests=None, svn_bin=None, mode_filter=None,
-                milestone_filter=None, set_log_level=None, ssl_cert=None,
--               http_proxy=None):
-+               http_proxy=None, httpd_version=None):
-     '''Construct a TestHarness instance.
- 
-     ABS_SRCDIR and ABS_BUILDDIR are the source and build directories.
-@@ -178,6 +179,7 @@ class TestHarness:
-     self.log = None
-     self.ssl_cert = ssl_cert
-     self.http_proxy = http_proxy
-+    self.httpd_version = httpd_version
-     if not sys.stdout.isatty() or sys.platform == 'win32':
-       TextColors.disable()
- 
-@@ -481,6 +483,8 @@ class TestHarness:
-       svntest.main.options.ssl_cert = self.ssl_cert
-     if self.http_proxy is not None:
-       svntest.main.options.http_proxy = self.http_proxy
-+    if self.httpd_version is not None:
-+      svntest.main.options.httpd_version = self.httpd_version
- 
-     svntest.main.options.srcdir = self.srcdir
- 
-@@ -645,7 +649,7 @@ def main():
-                             'enable-sasl', 'parallel', 'config-file=',
-                             'log-to-stdout', 'list', 'milestone-filter=',
-                             'mode-filter=', 'set-log-level=', 'ssl-cert=',
--                            'http-proxy='])
-+                            'http-proxy=', 'httpd-version='])
-   except getopt.GetoptError:
-     args = []
- 
-@@ -656,9 +660,9 @@ def main():
-   base_url, fs_type, verbose, cleanup, enable_sasl, http_library, \
-     server_minor_version, fsfs_sharding, fsfs_packing, parallel, \
-     config_file, log_to_stdout, list_tests, mode_filter, milestone_filter, \
--    set_log_level, ssl_cert, http_proxy = \
-+    set_log_level, ssl_cert, http_proxy, httpd_version = \
-             None, None, None, None, None, None, None, None, None, None, None, \
--            None, None, None, None, None, None, None
-+            None, None, None, None, None, None, None, None
-   for opt, val in opts:
-     if opt in ['-u', '--url']:
-       base_url = val
-@@ -696,6 +700,8 @@ def main():
-       ssl_cert = val
-     elif opt in ['--http-proxy']:
-       http_proxy = val
-+    elif opt in ['--httpd-version']:
-+      httpd_version = val
-     else:
-       raise getopt.GetoptError
- 
-@@ -712,7 +718,7 @@ def main():
-                    fsfs_sharding, fsfs_packing, list_tests,
-                    mode_filter=mode_filter, milestone_filter=milestone_filter,
-                    set_log_level=set_log_level, ssl_cert=ssl_cert,
--                   http_proxy=http_proxy)
-+                   http_proxy=http_proxy, httpd_version=httpd_version)
- 
-   failed = th.run(args[2:])
-   if failed:
-Index: subversion/mod_authz_svn/mod_authz_svn.c
-===================================================================
---- a/subversion/mod_authz_svn/mod_authz_svn.c	(revision 1691883)
-+++ b/subversion/mod_authz_svn/mod_authz_svn.c	(working copy)
-@@ -48,6 +48,23 @@
- #include "svn_dirent_uri.h"
- #include "private/svn_fspath.h"
- 
-+/* The apache headers define these and they conflict with our definitions. */
-+#ifdef PACKAGE_BUGREPORT
-+#undef PACKAGE_BUGREPORT
-+#endif
-+#ifdef PACKAGE_NAME
-+#undef PACKAGE_NAME
-+#endif
-+#ifdef PACKAGE_STRING
-+#undef PACKAGE_STRING
-+#endif
-+#ifdef PACKAGE_TARNAME
-+#undef PACKAGE_TARNAME
-+#endif
-+#ifdef PACKAGE_VERSION
-+#undef PACKAGE_VERSION
-+#endif
-+#include "svn_private_config.h"
- 
- #ifdef APLOG_USE_MODULE
- APLOG_USE_MODULE(authz_svn);
-@@ -67,6 +84,30 @@ typedef struct authz_svn_config_rec {
-   const char *force_username_case;
- } authz_svn_config_rec;
- 
-+#if AP_MODULE_MAGIC_AT_LEAST(20060110,0) /* version where
-+                                            ap_some_auth_required breaks */
-+#  if AP_MODULE_MAGIC_AT_LEAST(20120211,47) /* first version with
-+                                               force_authn hook and
-+                                               ap_some_authn_required() which
-+                                               allows us to work without
-+                                               ap_some_auth_required() */
-+#    define USE_FORCE_AUTHN 1
-+#    define IN_SOME_AUTHN_NOTE "authz_svn-in-some-authn"
-+#    define FORCE_AUTHN_NOTE "authz_svn-force-authn"
-+#  else
-+     /* ap_some_auth_required() is busted and no viable alternative exists */
-+#    ifndef SVN_ALLOW_BROKEN_HTTPD_AUTH
-+#      error This version of httpd has a security hole with mod_authz_svn
-+#    else
-+       /* user wants to build anyway */
-+#      define USE_FORCE_AUTHN 0
-+#    endif
-+#  endif
-+#else
-+   /* old enough that ap_some_auth_required() still works */
-+#  define USE_FORCE_AUTHN 0
-+#endif
-+
- /*
-  * Configuration
-  */
-@@ -819,9 +860,51 @@ access_checker(request_rec *r)
-                                                     &authz_svn_module);
-   const char *repos_path = NULL;
-   const char *dest_repos_path = NULL;
--  int status;
-+  int status, authn_required;
- 
-+#if USE_FORCE_AUTHN
-+  /* Use the force_authn() hook available in 2.4.x to work securely
-+   * given that ap_some_auth_required() is no longer functional for our
-+   * purposes in 2.4.x.
-+   */
-+  int authn_configured;
-+
-   /* We are not configured to run */
-+  if (!conf->anonymous || apr_table_get(r->notes, IN_SOME_AUTHN_NOTE)
-+      || (! (conf->access_file || conf->repo_relative_access_file)))
-+    return DECLINED;
-+
-+  /* Authentication is configured */
-+  authn_configured = ap_auth_type(r) != NULL;
-+  if (authn_configured)
-+    {
-+      /* If the user is trying to authenticate, let him.  It doesn't
-+       * make much sense to grant anonymous access but deny authenticated
-+       * users access, even though you can do that with '$anon' in the
-+       * access file.
-+       */
-+      if (apr_table_get(r->headers_in,
-+                        (PROXYREQ_PROXY == r->proxyreq)
-+                        ? "Proxy-Authorization" : "Authorization"))
-+        {
-+          /* Set the note to force authn regardless of what access_checker_ex
-+             hook requires */
-+          apr_table_setn(r->notes, FORCE_AUTHN_NOTE, (const char*)1);
-+
-+          /* provide the proper return so the access_checker hook doesn't
-+           * prevent the code from continuing on to the other auth hooks */
-+          if (ap_satisfies(r) != SATISFY_ANY)
-+            return OK;
-+          else
-+            return HTTP_FORBIDDEN;
-+        }
-+    }    
-+
-+#else
-+  /* Support for older versions of httpd that have a working
-+   * ap_some_auth_required() */
-+
-+  /* We are not configured to run */
-   if (!conf->anonymous
-       || (! (conf->access_file || conf->repo_relative_access_file)))
-     return DECLINED;
-@@ -834,9 +917,10 @@ access_checker(request_rec *r)
-       if (ap_satisfies(r) != SATISFY_ANY)
-         return DECLINED;
- 
--      /* If the user is trying to authenticate, let him.  If anonymous
--       * access is allowed, so is authenticated access, by definition
--       * of the meaning of '*' in the access file.
-+      /* If the user is trying to authenticate, let him.  It doesn't
-+       * make much sense to grant anonymous access but deny authenticated
-+       * users access, even though you can do that with '$anon' in the
-+       * access file.
-        */
-       if (apr_table_get(r->headers_in,
-                         (PROXYREQ_PROXY == r->proxyreq)
-@@ -848,6 +932,7 @@ access_checker(request_rec *r)
-           return HTTP_FORBIDDEN;
-         }
-     }
-+#endif
- 
-   /* If anon access is allowed, return OK */
-   status = req_check_access(r, conf, &repos_path, &dest_repos_path);
-@@ -856,7 +941,26 @@ access_checker(request_rec *r)
-       if (!conf->authoritative)
-         return DECLINED;
- 
-+#if USE_FORCE_AUTHN
-+      if (authn_configured) {
-+          /* We have to check to see if authn is required because if so we must
-+           * return UNAUTHORIZED (401) rather than FORBIDDEN (403) since returning
-+           * the 403 leaks information about what paths may exist to
-+           * unauthenticated users.  We must set a note here in order
-+           * to use ap_some_authn_rquired() without triggering an infinite
-+           * loop since the call will trigger this function to be called again. */
-+          apr_table_setn(r->notes, IN_SOME_AUTHN_NOTE, (const char*)1);
-+          authn_required = ap_some_authn_required(r);
-+          apr_table_unset(r->notes, IN_SOME_AUTHN_NOTE);
-+          if (authn_required)
-+            {
-+              ap_note_auth_failure(r);
-+              return HTTP_UNAUTHORIZED;
-+            }
-+      }
-+#else
-       if (!ap_some_auth_required(r))
-+#endif
-         log_access_verdict(APLOG_MARK, r, 0, repos_path, dest_repos_path);
- 
-       return HTTP_FORBIDDEN;
-@@ -937,6 +1041,17 @@ auth_checker(request_rec *r)
-   return OK;
- }
- 
-+#if USE_FORCE_AUTHN
-+static int
-+force_authn(request_rec *r)
-+{
-+  if (apr_table_get(r->notes, FORCE_AUTHN_NOTE))
-+    return OK;
-+
-+  return DECLINED;
-+}
-+#endif
-+
- /*
-  * Module flesh
-  */
-@@ -953,6 +1068,9 @@ register_hooks(apr_pool_t *p)
-    * give SSLOptions +FakeBasicAuth a chance to work. */
-   ap_hook_check_user_id(check_user_id, mod_ssl, NULL, APR_HOOK_FIRST);
-   ap_hook_auth_checker(auth_checker, NULL, NULL, APR_HOOK_FIRST);
-+#if USE_FORCE_AUTHN
-+  ap_hook_force_authn(force_authn, NULL, NULL, APR_HOOK_FIRST);
-+#endif
-   ap_register_provider(p,
-                        AUTHZ_SVN__SUBREQ_BYPASS_PROV_GRP,
-                        AUTHZ_SVN__SUBREQ_BYPASS_PROV_NAME,
-Index: subversion/tests/cmdline/README
-===================================================================
---- a/subversion/tests/cmdline/README	(revision 1691883)
-+++ b/subversion/tests/cmdline/README	(working copy)
-@@ -83,6 +83,133 @@ paths adjusted appropriately:
-      Require valid-user
-    </Location>
- 
-+   <Location /authz-test-work/anon>
-+     DAV               svn
-+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
-+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
-+     SVNListParentPath On
-+     # This may seem unnecessary but granting access to everyone here is necessary
-+     # to exercise a bug with httpd 2.3.x+.  The "Require all granted" syntax is
-+     # new to 2.3.x+ which we can detect with the mod_authz_core.c module
-+     # signature.  Use the "Allow from all" syntax with older versions for symmetry.
-+     <IfModule mod_authz_core.c>
-+       Require all granted
-+     </IfModule>
-+     <IfModule !mod_authz_core.c>
-+       Allow from all
-+     </IfMOdule>
-+   </Location>
-+   <Location /authz-test-work/mixed>
-+     DAV               svn
-+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
-+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
-+     SVNListParentPath On
-+     AuthType          Basic
-+     AuthName          "Subversion Repository"
-+     AuthUserFile /usr/local/apache2/conf/users
-+     Require           valid-user
-+     Satisfy Any
-+   </Location>
-+   <Location /authz-test-work/mixed-noauthwhenanon>
-+     DAV               svn
-+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
-+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
-+     SVNListParentPath On
-+     AuthType          Basic
-+     AuthName          "Subversion Repository"
-+     AuthUserFile /usr/local/apache2/conf/users
-+     Require           valid-user
-+     AuthzSVNNoAuthWhenAnonymousAllowed On
-+   </Location>
-+   <Location /authz-test-work/authn>
-+     DAV               svn
-+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
-+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
-+     SVNListParentPath On
-+     AuthType          Basic
-+     AuthName          "Subversion Repository"
-+     AuthUserFile /usr/local/apache2/conf/users
-+     Require           valid-user
-+   </Location>
-+   <Location /authz-test-work/authn-anonoff>
-+     DAV               svn
-+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
-+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
-+     SVNListParentPath On
-+     AuthType          Basic
-+     AuthName          "Subversion Repository"
-+     AuthUserFile /usr/local/apache2/conf/users
-+     Require           valid-user
-+     AuthzSVNAnonymous Off
-+   </Location>
-+   <Location /authz-test-work/authn-lcuser>
-+     DAV               svn
-+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
-+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
-+     SVNListParentPath On
-+     AuthType          Basic
-+     AuthName          "Subversion Repository"
-+     AuthUserFile /usr/local/apache2/conf/users
-+     Require           valid-user
-+     AuthzForceUsernameCase Lower
-+   </Location>
-+   <Location /authz-test-work/authn-lcuser>
-+     DAV               svn
-+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
-+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
-+     SVNListParentPath On
-+     AuthType          Basic
-+     AuthName          "Subversion Repository"
-+     AuthUserFile /usr/local/apache2/conf/users
-+     Require           valid-user
-+     AuthzForceUsernameCase Lower
-+   </Location>
-+   <Location /authz-test-work/authn-group>
-+     DAV               svn
-+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
-+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
-+     SVNListParentPath On
-+     AuthType          Basic
-+     AuthName          "Subversion Repository"
-+     AuthUserFile /usr/local/apache2/conf/users
-+     AuthGroupFile /usr/local/apache2/conf/groups
-+     Require           group random
-+     AuthzSVNAuthoritative Off
-+   </Location>
-+   <IfModule mod_authz_core.c>
-+     <Location /authz-test-work/sallrany>
-+       DAV               svn
-+       SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
-+       AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
-+       SVNListParentPath On
-+       AuthType          Basic
-+       AuthName          "Subversion Repository"
-+       AuthUserFile /usr/local/apache2/conf/users
-+       AuthzSendForbiddenOnFailure On
-+       Satisfy All
-+       <RequireAny>
-+         Require valid-user
-+         Require expr req('ALLOW') == '1'
-+       </RequireAny>
-+     </Location>
-+     <Location /authz-test-work/sallrall>
-+       DAV               svn
-+       SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
-+       AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
-+       SVNListParentPath On
-+       AuthType          Basic
-+       AuthName          "Subversion Repository"
-+       AuthUserFile /usr/local/apache2/conf/users
-+       AuthzSendForbiddenOnFailure On
-+       Satisfy All
-+       <RequireAll>
-+         Require valid-user
-+         Require expr req('ALLOW') == '1'
-+       </RequireAll>
-+     </Location>
-+   </IfModule>
-+
-+
-    RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)$ /svn-test-work/repositories/$1
-    RedirectMatch           ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$ /svn-test-work/repositories/$1
- 
-@@ -101,8 +228,17 @@ just drop the following 2-line snippet into the
- ----------------------------
- jrandom:xCGl35kV9oWCY
- jconstant:xCGl35kV9oWCY
-+JRANDOM:xCGl35kV9oWCY
-+JCONSTANT:xCGl35kV9oWCY
- ----------------------------
- 
-+and these lines into the
-+/usr/local/apache/conf/groups file:
-+----------------------------
-+random: jrandom
-+constant: jconstant
-+----------------------------
-+
- Now, (re)start Apache and run the tests over mod_dav_svn.
- 
- You can run a test script over DAV:
-@@ -138,6 +274,8 @@ Note [1]: It would be quite too much to expect tho
-           ----------------------------
-           jrandom:$apr1$3p1.....$FQW6RceW5QhJ2blWDQgKn0
-           jconstant:$apr1$jp1.....$Usrqji1c9H6AbOxOGAzzb0
-+          JRANDOM:$apr1$3p1.....$FQW6RceW5QhJ2blWDQgKn0
-+          JCONSTANT:$apr1$jp1.....$Usrqji1c9H6AbOxOGAzzb0
-           ----------------------------
- 
- 
-Index: subversion/tests/cmdline/davautocheck.sh
-===================================================================
---- a/subversion/tests/cmdline/davautocheck.sh	(revision 1691883)
-+++ b/subversion/tests/cmdline/davautocheck.sh	(working copy)
-@@ -289,8 +289,6 @@ LOAD_MOD_AUTHN_CORE="$(get_loadmodule_config mod_a
-     || fail "Authn_Core module not found."
- LOAD_MOD_AUTHZ_CORE="$(get_loadmodule_config mod_authz_core)" \
-     || fail "Authz_Core module not found."
--LOAD_MOD_AUTHZ_HOST="$(get_loadmodule_config mod_authz_host)" \
--    || fail "Authz_Host module not found."
- LOAD_MOD_UNIXD=$(get_loadmodule_config mod_unixd) \
-     || fail "UnixD module not found"
- }
-@@ -298,6 +296,10 @@ LOAD_MOD_AUTHN_FILE="$(get_loadmodule_config mod_a
-     || fail "Authn_File module not found."
- LOAD_MOD_AUTHZ_USER="$(get_loadmodule_config mod_authz_user)" \
-     || fail "Authz_User module not found."
-+LOAD_MOD_AUTHZ_GROUPFILE="$(get_loadmodule_config mod_authz_groupfile)" \
-+    || fail "Authz_GroupFile module not found."
-+LOAD_MOD_AUTHZ_HOST="$(get_loadmodule_config mod_authz_host)" \
-+    || fail "Authz_Host module not found."
- }
- if [ ${APACHE_MPM:+set} ]; then
-     LOAD_MOD_MPM=$(get_loadmodule_config mod_mpm_$APACHE_MPM) \
-@@ -328,6 +330,7 @@ HTTPD_ERROR_LOG="$HTTPD_ROOT/error_log"
- HTTPD_MIME_TYPES="$HTTPD_ROOT/mime.types"
- BASE_URL="http://localhost:$HTTPD_PORT"
- HTTPD_USERS="$HTTPD_ROOT/users"
-+HTTPD_GROUPS="$HTTPD_ROOT/groups"
- 
- mkdir "$HTTPD_ROOT" \
-   || fail "couldn't create temporary directory '$HTTPD_ROOT'"
-@@ -388,6 +391,14 @@ fi
- say "Adding users for lock authentication"
- $HTPASSWD -bc $HTTPD_USERS jrandom   rayjandom
- $HTPASSWD -b  $HTTPD_USERS jconstant rayjandom
-+$HTPASSWD -b  $HTTPD_USERS JRANDOM   rayjandom
-+$HTPASSWD -b  $HTTPD_USERS JCONSTANT rayjandom
-+ 
-+say "Adding groups for mod_authz_svn tests"
-+cat > "$HTTPD_GROUPS" <<__EOF__
-+random: jrandom
-+constant: jconstant
-+__EOF__
- 
- touch $HTTPD_MIME_TYPES
- 
-@@ -405,7 +416,9 @@ $LOAD_MOD_AUTHN_CORE
- $LOAD_MOD_AUTHN_FILE
- $LOAD_MOD_AUTHZ_CORE
- $LOAD_MOD_AUTHZ_USER
-+$LOAD_MOD_AUTHZ_GROUPFILE
- $LOAD_MOD_AUTHZ_HOST
-+$LOAD_MOD_ACCESS_COMPAT
- LoadModule          authz_svn_module "$MOD_AUTHZ_SVN"
- 
- __EOF__
-@@ -497,6 +510,161 @@ CustomLog           "$HTTPD_ROOT/ops" "%t %u %{SVN
-   SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-   ${SVN_PATH_AUTHZ_LINE}
- </Location>
-+<Location /authz-test-work/anon>
-+  DAV               svn
-+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
-+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
-+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
-+  SVNListParentPath On
-+  # This may seem unnecessary but granting access to everyone here is necessary
-+  # to exercise a bug with httpd 2.3.x+.  The "Require all granted" syntax is
-+  # new to 2.3.x+ which we can detect with the mod_authz_core.c module
-+  # signature.  Use the "Allow from all" syntax with older versions for symmetry.
-+  <IfModule mod_authz_core.c>
-+    Require all granted
-+  </IfModule>
-+  <IfModule !mod_authz_core.c>
-+    Allow from all
-+  </IfMOdule>
-+  ${SVN_PATH_AUTHZ_LINE}
-+</Location>
-+<Location /authz-test-work/mixed>
-+  DAV               svn
-+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
-+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
-+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
-+  SVNListParentPath On
-+  AuthType          Basic
-+  AuthName          "Subversion Repository"
-+  AuthUserFile      $HTTPD_USERS
-+  Require           valid-user
-+  Satisfy Any
-+  ${SVN_PATH_AUTHZ_LINE}
-+</Location>
-+<Location /authz-test-work/mixed-noauthwhenanon>
-+  DAV               svn
-+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
-+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
-+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
-+  SVNListParentPath On
-+  AuthType          Basic
-+  AuthName          "Subversion Repository"
-+  AuthUserFile      $HTTPD_USERS
-+  Require           valid-user
-+  AuthzSVNNoAuthWhenAnonymousAllowed On
-+  SVNPathAuthz On
-+</Location>
-+<Location /authz-test-work/authn>
-+  DAV               svn
-+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
-+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
-+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
-+  SVNListParentPath On
-+  AuthType          Basic
-+  AuthName          "Subversion Repository"
-+  AuthUserFile      $HTTPD_USERS
-+  Require           valid-user
-+  ${SVN_PATH_AUTHZ_LINE}
-+</Location>
-+<Location /authz-test-work/authn-anonoff>
-+  DAV               svn
-+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
-+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
-+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
-+  SVNListParentPath On
-+  AuthType          Basic
-+  AuthName          "Subversion Repository"
-+  AuthUserFile      $HTTPD_USERS
-+  Require           valid-user
-+  AuthzSVNAnonymous Off
-+  SVNPathAuthz On
-+</Location>
-+<Location /authz-test-work/authn-lcuser>
-+  DAV               svn
-+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
-+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
-+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
-+  SVNListParentPath On
-+  AuthType          Basic
-+  AuthName          "Subversion Repository"
-+  AuthUserFile      $HTTPD_USERS
-+  Require           valid-user
-+  AuthzForceUsernameCase Lower
-+  ${SVN_PATH_AUTHZ_LINE}
-+</Location>
-+<Location /authz-test-work/authn-lcuser>
-+  DAV               svn
-+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
-+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
-+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
-+  SVNListParentPath On
-+  AuthType          Basic
-+  AuthName          "Subversion Repository"
-+  AuthUserFile      $HTTPD_USERS
-+  Require           valid-user
-+  AuthzForceUsernameCase Lower
-+  ${SVN_PATH_AUTHZ_LINE}
-+</Location>
-+<Location /authz-test-work/authn-group>
-+  DAV               svn
-+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
-+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
-+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
-+  SVNListParentPath On
-+  AuthType          Basic
-+  AuthName          "Subversion Repository"
-+  AuthUserFile      $HTTPD_USERS
-+  AuthGroupFile     $HTTPD_GROUPS
-+  Require           group random
-+  AuthzSVNAuthoritative Off
-+  SVNPathAuthz On
-+</Location>
-+<IfModule mod_authz_core.c>
-+  <Location /authz-test-work/sallrany>
-+    DAV               svn
-+    SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
-+    AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
-+    SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-+    SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
-+    SVNListParentPath On
-+    AuthType          Basic
-+    AuthName          "Subversion Repository"
-+    AuthUserFile      $HTTPD_USERS
-+    AuthzSendForbiddenOnFailure On
-+    Satisfy All
-+    <RequireAny>
-+      Require valid-user
-+      Require expr req('ALLOW') == '1'
-+    </RequireAny>
-+    ${SVN_PATH_AUTHZ_LINE}
-+  </Location>
-+  <Location /authz-test-work/sallrall>
-+    DAV               svn
-+    SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
-+    AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
-+    SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
-+    SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
-+    SVNListParentPath On
-+    AuthType          Basic
-+    AuthName          "Subversion Repository"
-+    AuthUserFile      $HTTPD_USERS
-+    AuthzSendForbiddenOnFailure On
-+    Satisfy All
-+    <RequireAll>
-+      Require valid-user
-+      Require expr req('ALLOW') == '1'
-+    </RequireAll>
-+    ${SVN_PATH_AUTHZ_LINE}
-+  </Location>
-+</IfModule>
- RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)\$ /svn-test-work/repositories/\$1
- RedirectMatch           ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)\$ /svn-test-work/repositories/\$1
- __EOF__
-Index: subversion/tests/cmdline/mod_authz_svn_tests.py
-===================================================================
---- a/subversion/tests/cmdline/mod_authz_svn_tests.py	(nonexistent)
-+++ b/subversion/tests/cmdline/mod_authz_svn_tests.py	(working copy)
-@@ -0,0 +1,1073 @@
-+#!/usr/bin/env python
-+#
-+#  mod_authz_svn_tests.py:  testing mod_authz_svn
-+#
-+#  Subversion is a tool for revision control.
-+#  See http://subversion.apache.org for more information.
-+#
-+# ====================================================================
-+#    Licensed to the Apache Software Foundation (ASF) under one
-+#    or more contributor license agreements.  See the NOTICE file
-+#    distributed with this work for additional information
-+#    regarding copyright ownership.  The ASF licenses this file
-+#    to you under the Apache License, Version 2.0 (the
-+#    "License"); you may not use this file except in compliance
-+#    with the License.  You may obtain a copy of the License at
-+#
-+#      http://www.apache.org/licenses/LICENSE-2.0
-+#
-+#    Unless required by applicable law or agreed to in writing,
-+#    software distributed under the License is distributed on an
-+#    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-+#    KIND, either express or implied.  See the License for the
-+#    specific language governing permissions and limitations
-+#    under the License.
-+######################################################################
-+
-+# General modules
-+import os, re, logging
-+
-+logger = logging.getLogger()
-+
-+# Our testing module
-+import svntest
-+
-+# (abbreviation)
-+Skip = svntest.testcase.Skip_deco
-+SkipUnless = svntest.testcase.SkipUnless_deco
-+XFail = svntest.testcase.XFail_deco
-+Issues = svntest.testcase.Issues_deco
-+Issue = svntest.testcase.Issue_deco
-+Wimp = svntest.testcase.Wimp_deco
-+
-+ls_of_D_no_H = '''<html><head><title>repos - Revision 1: /A/D</title></head>
-+<body>
-+ <h2>repos - Revision 1: /A/D</h2>
-+ <ul>
-+  <li><a href="../">..</a></li>
-+  <li><a href="G/">G/</a></li>
-+  <li><a href="gamma">gamma</a></li>
-+ </ul>
-+</body></html>'''
-+
-+ls_of_D_H = '''<html><head><title>repos - Revision 1: /A/D</title></head>
-+<body>
-+ <h2>repos - Revision 1: /A/D</h2>
-+ <ul>
-+  <li><a href="../">..</a></li>
-+  <li><a href="G/">G/</a></li>
-+  <li><a href="H/">H/</a></li>
-+  <li><a href="gamma">gamma</a></li>
-+ </ul>
-+</body></html>'''
-+
-+ls_of_H = '''<html><head><title>repos - Revision 1: /A/D/H</title></head>
-+<body>
-+ <h2>repos - Revision 1: /A/D/H</h2>
-+ <ul>
-+  <li><a href="../">..</a></li>
-+  <li><a href="chi">chi</a></li>
-+  <li><a href="omega">omega</a></li>
-+  <li><a href="psi">psi</a></li>
-+ </ul>
-+</body></html>'''
-+
-+user1 = svntest.main.wc_author
-+user1_upper = user1.upper()
-+user1_pass = svntest.main.wc_passwd
-+user1_badpass = 'XXX'
-+assert user1_pass != user1_badpass, "Passwords can't match"
-+user2 = svntest.main.wc_author2
-+user2_upper = user2.upper()
-+user2_pass = svntest.main.wc_passwd
-+user2_badpass = 'XXX'
-+assert user2_pass != user2_badpass, "Passwords can't match"
-+
-+def write_authz_file(sbox):
-+    svntest.main.write_authz_file(sbox, {
-+                                          '/':  '$anonymous = r\n' +
-+                                                'jrandom = rw\n' +
-+                                                'jconstant = rw',
-+                                          '/A/D/H': '$anonymous =\n' +
-+                                                    '$authenticated =\n' +
-+                                                    'jrandom = rw'
-+                                        })
-+
-+def write_authz_file_groups(sbox):
-+    authz_name = sbox.authz_name()
-+    svntest.main.write_authz_file(sbox,{
-+                                         '/':  '* =',
-+                                       })
-+
-+def verify_get(test_area_url, path, user, pw,
-+               expected_status, expected_body, headers):
-+  import httplib
-+  from urlparse import urlparse
-+  import base64
-+
-+  req_url = test_area_url + path
-+
-+  loc = urlparse(req_url)
-+
-+  if loc.scheme == 'http':
-+    h = httplib.HTTPConnection(loc.hostname, loc.port)
-+  else:
-+    h = httplib.HTTPSConnection(loc.hostname, loc.port)
-+
-+  if headers is None:
-+    headers = {}
-+
-+  if user and pw:
-+      auth_info = user + ':' + pw
-+      headers['Authorization'] = 'Basic ' + base64.b64encode(auth_info)
-+  else:
-+      auth_info = "anonymous"
-+
-+  h.request('GET', req_url, None, headers)
-+
-+  r = h.getresponse()
-+
-+  actual_status = r.status
-+  if expected_status and expected_status != actual_status:
-+
-+      logger.warn("Expected status '" + str(expected_status) +
-+                  "' but got '" + str(actual_status) +
-+                  "' on url '" + req_url + "' (" +
-+                  auth_info + ").")
-+      raise svntest.Failure
-+
-+  if expected_body:
-+      actual_body = r.read()
-+      if expected_body != actual_body:
-+        logger.warn("Expected body:")
-+        logger.warn(expected_body)
-+        logger.warn("But got:")
-+        logger.warn(actual_body)
-+        logger.warn("on url '" + req_url + "' (" + auth_info + ").")
-+        raise svntest.Failure
-+
-+def verify_gets(test_area_url, tests):
-+  for test in tests:
-+      verify_get(test_area_url, test['path'], test.get('user'), test.get('pw'),
-+                 test['status'], test.get('body'), test.get('headers'))
-+
-+
-+######################################################################
-+# Tests
-+#
-+#   Each test must return on success or raise on failure.
-+
-+
-+#----------------------------------------------------------------------
-+
-+
-+@SkipUnless(svntest.main.is_ra_type_dav)
-+def anon(sbox):
-+  "test anonymous access"
-+  sbox.build(read_only = True, create_wc = False)
-+
-+  test_area_url = sbox.repo_url.replace('/svn-test-work/local_tmp/repos',
-+                                        '/authz-test-work/anon')
-+
-+  write_authz_file(sbox)
-+
-+  anon_tests = ( 
-+                 { 'path': '', 'status': 301 },
-+                 { 'path': '/', 'status': 200 },
-+                 { 'path': '/repos', 'status': 301 },
-+                 { 'path': '/repos/', 'status': 200 },
-+                 { 'path': '/repos/A', 'status': 301 },
-+                 { 'path': '/repos/A/', 'status': 200 },
-+                 { 'path': '/repos/A/D', 'status': 301 },
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H },
-+                 { 'path': '/repos/A/D/gamma', 'status': 200 },
-+                 { 'path': '/repos/A/D/H', 'status': 403 },
-+                 { 'path': '/repos/A/D/H/', 'status': 403 },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403 },
-+                 # auth isn't configured so nothing should change when passing
-+                 # authn details
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '', 'status': 301, 'user': user2, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user2, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user2, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user2, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user2, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '', 'status': 301, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/', 'status': 200, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos', 'status': 301, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+               )
-+
-+  verify_gets(test_area_url, anon_tests)
-+
-+
-+@SkipUnless(svntest.main.is_ra_type_dav)
-+def mixed(sbox):
-+  "test mixed anonymous and authenticated access"
-+  sbox.build(read_only = True, create_wc = False)
-+
-+  test_area_url = sbox.repo_url.replace('/svn-test-work/local_tmp/repos',
-+                                        '/authz-test-work/mixed')
-+
-+  write_authz_file(sbox)
-+
-+  mixed_tests = (
-+                 { 'path': '', 'status': 301,  },
-+                 { 'path': '/', 'status': 200,  },
-+                 { 'path': '/repos', 'status': 301,  },
-+                 { 'path': '/repos/', 'status': 200,  },
-+                 { 'path': '/repos/A', 'status': 301,  },
-+                 { 'path': '/repos/A/', 'status': 200,  },
-+                 { 'path': '/repos/A/D', 'status': 301,  },
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   },
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, },
-+                 { 'path': '/repos/A/D/H', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, },
-+                 # auth is configured and user1 is allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_H,
-+                   'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 200, 'body': ls_of_H, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 # try with the wrong password for user1
-+                 { 'path': '', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 # auth is configured and user2 is not allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 # try with the wrong password for user2
-+                 { 'path': '', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 )
-+
-+  verify_gets(test_area_url, mixed_tests)
-+
-+@SkipUnless(svntest.main.is_ra_type_dav)
-+@XFail(svntest.main.is_httpd_authz_provider_enabled)
-+# uses the AuthzSVNNoAuthWhenAnonymousAllowed On directive
-+# this is broken with httpd 2.3.x+ since it requires the auth system to accept
-+# r->user == NULL and there is a test for this in server/request.c now.  It
-+# was intended as a workaround for the lack of Satisfy Any in 2.3.x+ which
-+# was resolved by httpd with mod_access_compat in 2.3.x+.
-+def mixed_noauthwhenanon(sbox):
-+  "test mixed with noauthwhenanon directive"
-+  sbox.build(read_only = True, create_wc = False)
-+
-+  test_area_url = sbox.repo_url.replace('/svn-test-work/local_tmp/repos',
-+                                        '/authz-test-work/mixed-noauthwhenanon')
-+
-+  write_authz_file(sbox)
-+
-+  noauthwhenanon_tests = (
-+                 { 'path': '', 'status': 301,  },
-+                 { 'path': '/', 'status': 200,  },
-+                 { 'path': '/repos', 'status': 301,  },
-+                 { 'path': '/repos/', 'status': 200,  },
-+                 { 'path': '/repos/A', 'status': 301,  },
-+                 { 'path': '/repos/A/', 'status': 200,  },
-+                 { 'path': '/repos/A/D', 'status': 301,  },
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   },
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, },
-+                 { 'path': '/repos/A/D/H', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, },
-+                 # auth is configured and user1 is allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_H,
-+                   'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 200, 'body': ls_of_H, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 # try with the wrong password for user1
-+                 # note that unlike doing this with Satisfy Any this case
-+                 # actually provides anon access when provided with an invalid
-+                 # password
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 # auth is configured and user2 is not allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 # try with the wrong password for user2
-+                 { 'path': '', 'status': 301, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/', 'status': 200, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos', 'status': 301, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 )
-+
-+  verify_gets(test_area_url, noauthwhenanon_tests)
-+
-+
-+@SkipUnless(svntest.main.is_ra_type_dav)
-+def authn(sbox):
-+  "test authenticated only access"
-+  sbox.build(read_only = True, create_wc = False)
-+
-+  test_area_url = sbox.repo_url.replace('/svn-test-work/local_tmp/repos',
-+                                        '/authz-test-work/authn')
-+
-+  write_authz_file(sbox)
-+
-+  authn_tests = (
-+                 { 'path': '', 'status': 401,  },
-+                 { 'path': '/', 'status': 401,  },
-+                 { 'path': '/repos', 'status': 401,  },
-+                 { 'path': '/repos/', 'status': 401,  },
-+                 { 'path': '/repos/A', 'status': 401,  },
-+                 { 'path': '/repos/A/', 'status': 401,  },
-+                 { 'path': '/repos/A/D', 'status': 401,  },
-+                 { 'path': '/repos/A/D/', 'status': 401, },
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, },
-+                 { 'path': '/repos/A/D/H', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, },
-+                 # auth is configured and user1 is allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_H,
-+                   'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 200, 'body': ls_of_H, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 # try with upper case username for user1
-+                 { 'path': '', 'status': 301, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 # try with the wrong password for user1
-+                 { 'path': '', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 # auth is configured and user2 is not allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 # try with upper case username for user2
-+                 { 'path': '', 'status': 301, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/', 'status': 200, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 # try with the wrong password for user2
-+                 { 'path': '', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 )
-+
-+  verify_gets(test_area_url, authn_tests)
-+
-+@SkipUnless(svntest.main.is_ra_type_dav)
-+def authn_anonoff(sbox):
-+  "test authenticated only access with anonoff"
-+  sbox.build(read_only = True, create_wc = False)
-+
-+  test_area_url = sbox.repo_url.replace('/svn-test-work/local_tmp/repos',
-+                                        '/authz-test-work/authn-anonoff')
-+
-+  write_authz_file(sbox)
-+
-+  anonoff_tests = (
-+                 { 'path': '', 'status': 401,  },
-+                 { 'path': '/', 'status': 401,  },
-+                 { 'path': '/repos', 'status': 401,  },
-+                 { 'path': '/repos/', 'status': 401,  },
-+                 { 'path': '/repos/A', 'status': 401,  },
-+                 { 'path': '/repos/A/', 'status': 401,  },
-+                 { 'path': '/repos/A/D', 'status': 401,  },
-+                 { 'path': '/repos/A/D/', 'status': 401, },
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, },
-+                 { 'path': '/repos/A/D/H', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, },
-+                 # auth is configured and user1 is allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_H,
-+                   'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 200, 'body': ls_of_H, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 # try with upper case username for user1
-+                 { 'path': '', 'status': 301, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user1_upper, 'pw': user1_pass},
-+                 # try with the wrong password for user1
-+                 { 'path': '', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 # auth is configured and user2 is not allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 # try with upper case username for user2
-+                 { 'path': '', 'status': 301, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/', 'status': 200, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 # try with the wrong password for user2
-+                 { 'path': '', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 )
-+
-+  verify_gets(test_area_url, anonoff_tests)
-+
-+@SkipUnless(svntest.main.is_ra_type_dav)
-+def authn_lcuser(sbox):
-+  "test authenticated only access with lcuser"
-+  sbox.build(read_only = True, create_wc = False)
-+
-+  test_area_url = sbox.repo_url.replace('/svn-test-work/local_tmp/repos',
-+                                        '/authz-test-work/authn-lcuser')
-+
-+  write_authz_file(sbox)
-+
-+  lcuser_tests = (
-+                 # try with upper case username for user1 (works due to lcuser option)
-+                 { 'path': '', 'status': 301, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_H,
-+                   'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 301, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 200, 'body': ls_of_H, 'user': user1_upper, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 200, 'user': user1_upper, 'pw': user1_pass},
-+                 # try with upper case username for user2 (works due to lcuser option)
-+                 { 'path': '', 'status': 301, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/', 'status': 200, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2_upper, 'pw': user2_pass},
-+                 )
-+
-+  verify_gets(test_area_url, lcuser_tests)
-+
-+# authenticated access only by group - a excuse to use AuthzSVNAuthoritative Off
-+# this is terribly messed up, Require group runs after mod_authz_svn.
-+# so if mod_authz_svn grants the access then it doesn't matter what the group
-+# requirement says.  If we reject the access then you can use the AuthzSVNAuthoritative Off
-+# directive to fall through to the group check.  Overall the behavior of setups like this
-+# is almost guaranteed to not be what users expect.
-+@SkipUnless(svntest.main.is_ra_type_dav)
-+def authn_group(sbox):
-+  "test authenticated only access via groups"
-+  sbox.build(read_only = True, create_wc = False)
-+
-+  test_area_url = sbox.repo_url.replace('/svn-test-work/local_tmp/repos',
-+                                        '/authz-test-work/authn-group')
-+
-+  # Can't use write_authz_file() as most tests because we want to deny all
-+  # access with mod_authz_svn so the tests fall through to the group handling
-+  authz_name = sbox.authz_name()
-+  svntest.main.write_authz_file(sbox, {
-+                                        '/':  '* =',
-+                                      })
-+
-+  group_tests = (
-+                 { 'path': '', 'status': 401, },
-+                 { 'path': '/', 'status': 401, },
-+                 { 'path': '/repos', 'status': 401, },
-+                 { 'path': '/repos/', 'status': 401, },
-+                 { 'path': '/repos/A', 'status': 401, },
-+                 { 'path': '/repos/A/', 'status': 401, },
-+                 { 'path': '/repos/A/D', 'status': 401, },
-+                 { 'path': '/repos/A/D/', 'status': 401, },
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, },
-+                 { 'path': '/repos/A/D/H', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, },
-+                 # auth is configured and user1 is allowed access repo including H
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_H,
-+                   'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 200, 'body': ls_of_H, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 )
-+
-+  verify_gets(test_area_url, group_tests)
-+
-+# This test exists to validate our behavior when used with the new authz
-+# provider system introduced in httpd 2.3.x.  The Satisfy directive
-+# determines how older authz hooks are combined and the RequireA(ll|ny)
-+# blocks handles how new authz providers are combined.  The overall results of
-+# all the authz providers (combined per the Require* blocks) are then
-+# combined with the other authz hooks via the Satisfy directive.
-+# Meaning this test requires that mod_authz_svn says yes and there is
-+# either a valid user or the ALLOW header is 1.  The header may seem
-+# like a silly test but it's easier to excercise than say a host directive
-+# in a repeatable test.
-+@SkipUnless(svntest.main.is_httpd_authz_provider_enabled)
-+def authn_sallrany(sbox):
-+  "test satisfy all require any config"
-+  sbox.build(read_only = True, create_wc = False)
-+
-+  test_area_url = sbox.repo_url.replace('/svn-test-work/local_tmp/repos',
-+                                        '/authz-test-work/sallrany')
-+
-+  write_authz_file(sbox)
-+
-+  allow_header = { 'ALLOW': '1' }
-+
-+  sallrany_tests = (
-+                 #anon access isn't allowed without ALLOW header
-+                 { 'path': '', 'status': 401, },
-+                 { 'path': '/', 'status': 401, },
-+                 { 'path': '/repos', 'status': 401, },
-+                 { 'path': '/repos/', 'status': 401, },
-+                 { 'path': '/repos/A', 'status': 401, },
-+                 { 'path': '/repos/A/', 'status': 401, },
-+                 { 'path': '/repos/A/D', 'status': 401, },
-+                 { 'path': '/repos/A/D/', 'status': 401, },
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, },
-+                 { 'path': '/repos/A/D/H', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, },
-+                 # auth is configured and user1 is allowed access repo including H
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_H,
-+                   'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 301, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 200, 'body': ls_of_H, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 200, 'user': user1, 'pw': user1_pass},
-+                 # try with the wrong password for user1
-+                 { 'path': '', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user1, 'pw': user1_badpass},
-+                 # auth is configured and user2 is not allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 # try with the wrong password for user2
-+                 { 'path': '', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user2, 'pw': user2_badpass},
-+                 # anon is allowed with the ALLOW header
-+                 { 'path': '', 'status': 301, 'headers': allow_header },
-+                 { 'path': '/', 'status': 200, 'headers': allow_header },
-+                 { 'path': '/repos', 'status': 301, 'headers': allow_header },
-+                 { 'path': '/repos/', 'status': 200, 'headers': allow_header },
-+                 { 'path': '/repos/A', 'status': 301, 'headers': allow_header },
-+                 { 'path': '/repos/A/', 'status': 200, 'headers': allow_header },
-+                 { 'path': '/repos/A/D', 'status': 301, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'headers': allow_header },
-+                 # these 3 tests return 403 instead of 401 becasue the config allows
-+                 # the anon user with the ALLOW header without any auth and the old hook
-+                 # system has no way of knowing it should return 401 since authentication is
-+                 # configured and can change the behavior.  It could decide to return 401 just on
-+                 # the basis of authentication being configured but then that leaks info in other
-+                 # cases so it's better for this case to be "broken".
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'headers': allow_header },
-+                 # auth is configured and user1 is allowed access repo including H
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_H,
-+                   'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H', 'status': 301, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/', 'status': 200, 'body': ls_of_H, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 200, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 # try with the wrong password for user1
-+                 { 'path': '', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 # auth is configured and user2 is not allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/', 'status': 200, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos', 'status': 301, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/', 'status': 200, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 # try with the wrong password for user2
-+                 { 'path': '', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+
-+                 )
-+
-+  verify_gets(test_area_url, sallrany_tests)
-+
-+# See comments on authn_sallrany test for some background on the interaction
-+# of Satisfy Any and the newer Require blocks.
-+@SkipUnless(svntest.main.is_httpd_authz_provider_enabled)
-+def authn_sallrall(sbox):
-+  "test satisfy all require all config"
-+  sbox.build(read_only = True, create_wc = False)
-+
-+  test_area_url = sbox.repo_url.replace('/svn-test-work/local_tmp/repos',
-+                                        '/authz-test-work/sallrall')
-+
-+  write_authz_file(sbox)
-+
-+  allow_header = { 'ALLOW': '1' }
-+
-+  sallrall_tests = (
-+                 #anon access isn't allowed without ALLOW header
-+                 { 'path': '', 'status': 403, },
-+                 { 'path': '/', 'status': 403, },
-+                 { 'path': '/repos', 'status': 403, },
-+                 { 'path': '/repos/', 'status': 403, },
-+                 { 'path': '/repos/A', 'status': 403, },
-+                 { 'path': '/repos/A/', 'status': 403, },
-+                 { 'path': '/repos/A/D', 'status': 403, },
-+                 { 'path': '/repos/A/D/', 'status': 403, },
-+                 { 'path': '/repos/A/D/gamma', 'status': 403, },
-+                 { 'path': '/repos/A/D/H', 'status': 403, },
-+                 { 'path': '/repos/A/D/H/', 'status': 403, },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, },
-+                 # auth is configured but no access is allowed without the ALLOW header
-+                 { 'path': '', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user1, 'pw': user1_pass},
-+                 # try with the wrong password for user1
-+                 { 'path': '', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user1, 'pw': user1_badpass},
-+                 # auth is configured but no access is allowed without the ALLOW header
-+                 { 'path': '', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_pass},
-+                 # try with the wrong password for user2
-+                 { 'path': '', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/gamma', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_badpass},
-+                 # anon is not allowed even with ALLOW header
-+                 { 'path': '', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/repos', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/repos/', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/repos/A', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/repos/A/', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/repos/A/D', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'headers': allow_header },
-+                 # auth is configured and user1 is allowed access repo including H
-+                 { 'path': '', 'status': 301, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/', 'status': 200, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos', 'status': 301, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/', 'status': 200, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A', 'status': 301, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_H,
-+                   'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H', 'status': 301, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/', 'status': 200, 'body': ls_of_H, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 200, 'user': user1, 'pw': user1_pass, 'headers': allow_header },
-+                 # try with the wrong password for user1
-+                 { 'path': '', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user1, 'pw': user1_badpass, 'headers': allow_header },
-+                 # auth is configured and user2 is not allowed access to H
-+                 { 'path': '', 'status': 301, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/', 'status': 200, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos', 'status': 301, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/', 'status': 200, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A', 'status': 301, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/', 'status': 200, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D', 'status': 301, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/', 'status': 200, 'body': ls_of_D_no_H,
-+                   'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/gamma', 'status': 200, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H', 'status': 403, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/', 'status': 403, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 403, 'user': user2, 'pw': user2_pass, 'headers': allow_header },
-+                 # try with the wrong password for user2
-+                 { 'path': '', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/gamma', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+                 { 'path': '/repos/A/D/H/chi', 'status': 401, 'user': user2, 'pw': user2_badpass, 'headers': allow_header },
-+
-+                 )
-+
-+  verify_gets(test_area_url, sallrall_tests)
-+
-+
-+########################################################################
-+# Run the tests
-+
-+
-+# list all tests here, starting with None:
-+test_list = [ None,
-+              anon,
-+              mixed,
-+              mixed_noauthwhenanon,
-+              authn,
-+              authn_anonoff,
-+              authn_lcuser,
-+              authn_group,
-+              authn_sallrany,
-+              authn_sallrall,
-+             ]
-+serial_only = True
-+
-+if __name__ == '__main__':
-+  svntest.main.run_tests(test_list)
-+  # NOTREACHED
-+
-+
-+### End of file.
-
-Property changes on: subversion/tests/cmdline/mod_authz_svn_tests.py
-___________________________________________________________________
-Added: svn:eol-style
-## -0,0 +1 ##
-+native
-\ No newline at end of property
-Index: subversion/tests/cmdline/svntest/main.py
-===================================================================
---- a/subversion/tests/cmdline/svntest/main.py	(revision 1691883)
-+++ b/subversion/tests/cmdline/svntest/main.py	(working copy)
-@@ -1378,6 +1378,30 @@ def is_plaintext_password_storage_disabled():
-     return False
-   return True
- 
-+
-+# https://issues.apache.org/bugzilla/show_bug.cgi?id=56480
-+# https://issues.apache.org/bugzilla/show_bug.cgi?id=55397
-+__mod_dav_url_quoting_broken_versions = frozenset([
-+    '2.2.27',
-+    '2.2.26',
-+    '2.2.25',
-+    '2.4.9',
-+    '2.4.8',
-+    '2.4.7',
-+    '2.4.6',
-+    '2.4.5',
-+])
-+def is_mod_dav_url_quoting_broken():
-+    if is_ra_type_dav():
-+        return (options.httpd_version in __mod_dav_url_quoting_broken_versions)
-+    return None
-+
-+def is_httpd_authz_provider_enabled():
-+    if is_ra_type_dav():
-+      v = options.httpd_version.split('.')
-+      return (v[0] == '2' and int(v[1]) >= 3) or int(v[0]) > 2
-+    return None
-+
- ######################################################################
- 
- 
-@@ -1435,6 +1459,8 @@ class TestSpawningThread(threading.Thread):
-       args.append('--ssl-cert=' + options.ssl_cert)
-     if options.http_proxy:
-       args.append('--http-proxy=' + options.http_proxy)
-+    if options.httpd_version:
-+      args.append('--httpd-version=' + options.httpd_version)
- 
-     result, stdout_lines, stderr_lines = spawn_process(command, 0, False, None,
-                                                        *args)
-@@ -1600,6 +1626,12 @@ class TestRunner:
-       sandbox.cleanup_test_paths()
-     return exit_code
- 
-+def is_httpd_authz_provider_enabled():
-+    if is_ra_type_dav():
-+      v = options.httpd_version.split('.')
-+      return (v[0] == '2' and int(v[1]) >= 3) or int(v[0]) > 2
-+    return None
-+
- ######################################################################
- # Main testing functions
- 
-@@ -1780,6 +1812,8 @@ def _create_parser():
-                     help='Path to SSL server certificate.')
-   parser.add_option('--http-proxy', action='store',
-                     help='Use the HTTP Proxy at hostname:port.')
-+  parser.add_option('--httpd-version', action='store',
-+                    help='Assume HTTPD is this version.')
-   parser.add_option('--tools-bin', action='store', dest='tools_bin',
-                     help='Use the svn tools installed in this path')
- 
-Index: win-tests.py
-===================================================================
---- a/win-tests.py	(revision 1691883)
-+++ b/win-tests.py	(working copy)
-@@ -481,6 +481,7 @@ class Httpd:
-     self.httpd_config = os.path.join(self.root, 'httpd.conf')
-     self.httpd_users = os.path.join(self.root, 'users')
-     self.httpd_mime_types = os.path.join(self.root, 'mime.types')
-+    self.httpd_groups = os.path.join(self.root, 'groups')
-     self.abs_builddir = abs_builddir
-     self.abs_objdir = abs_objdir
-     self.service_name = 'svn-test-httpd-' + str(httpd_port)
-@@ -494,6 +495,7 @@ class Httpd:
-     create_target_dir(self.root_dir)
- 
-     self._create_users_file()
-+    self._create_groups_file()
-     self._create_mime_types_file()
-     self._create_dontdothat_file()
- 
-@@ -540,6 +542,8 @@ class Httpd:
-     if self.httpd_ver >= 2.2:
-       fp.write(self._sys_module('auth_basic_module', 'mod_auth_basic.so'))
-       fp.write(self._sys_module('authn_file_module', 'mod_authn_file.so'))
-+      fp.write(self._sys_module('authz_groupfile_module', 'mod_authz_groupfile.so'))
-+      fp.write(self._sys_module('authz_host_module', 'mod_authz_host.so'))
-     else:
-       fp.write(self._sys_module('auth_module', 'mod_auth.so'))
-     fp.write(self._sys_module('alias_module', 'mod_alias.so'))
-@@ -562,6 +566,7 @@ class Httpd:
-     # Define two locations for repositories
-     fp.write(self._svn_repo('repositories'))
-     fp.write(self._svn_repo('local_tmp'))
-+    fp.write(self._svn_authz_repo())
- 
-     # And two redirects for the redirect tests
-     fp.write('RedirectMatch permanent ^/svn-test-work/repositories/'
-@@ -592,7 +597,18 @@ class Httpd:
-                                     'jrandom', 'rayjandom'])
-     os.spawnv(os.P_WAIT, htpasswd, ['htpasswd.exe', '-bp',  self.httpd_users,
-                                     'jconstant', 'rayjandom'])
-+    os.spawnv(os.P_WAIT, htpasswd, ['htpasswd.exe', '-bp',  self.httpd_users,
-+                                    'JRANDOM', 'rayjandom'])
-+    os.spawnv(os.P_WAIT, htpasswd, ['htpasswd.exe', '-bp',  self.httpd_users,
-+                                    'JCONSTANT', 'rayjandom'])
- 
-+  def _create_groups_file(self):
-+    "Create groups for mod_authz_svn tests"
-+    fp = open(self.httpd_groups, 'w')
-+    fp.write('random: jrandom\n')
-+    fp.write('constant: jconstant\n')
-+    fp.close()
-+
-   def _create_mime_types_file(self):
-     "Create empty mime.types file"
-     fp = open(self.httpd_mime_types, 'w')
-@@ -652,6 +668,153 @@ class Httpd:
-       '  DontDoThatConfigFile ' + self._quote(self.dontdothat_file) + '\n' \
-       '</Location>\n'
- 
-+  def _svn_authz_repo(self):
-+    local_tmp = os.path.join(self.abs_builddir,
-+                             CMDLINE_TEST_SCRIPT_NATIVE_PATH,
-+                             'svn-test-work', 'local_tmp')
-+    return \
-+      '<Location /authz-test-work/anon>' + '\n' \
-+      '  DAV               svn' + '\n' \
-+      '  SVNParentPath     ' + local_tmp + '\n' \
-+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
-+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
-+      '  SVNListParentPath On' + '\n' \
-+      '  <IfModule mod_authz_core.c>' + '\n' \
-+      '    Require all granted' + '\n' \
-+      '  </IfModule>' + '\n' \
-+      '  <IfModule !mod_authz_core.c>' + '\n' \
-+      '    Allow from all' + '\n' \
-+      '  </IfModule>' + '\n' \
-+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
-+      '</Location>' + '\n' \
-+      '<Location /authz-test-work/mixed>' + '\n' \
-+      '  DAV               svn' + '\n' \
-+      '  SVNParentPath     ' + local_tmp + '\n' \
-+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
-+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
-+      '  SVNListParentPath On' + '\n' \
-+      '  AuthType          Basic' + '\n' \
-+      '  AuthName          "Subversion Repository"' + '\n' \
-+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
-+      '  Require           valid-user' + '\n' \
-+      '  Satisfy Any' + '\n' \
-+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
-+      '</Location>' + '\n' \
-+      '<Location /authz-test-work/mixed-noauthwhenanon>' + '\n' \
-+      '  DAV               svn' + '\n' \
-+      '  SVNParentPath     ' + local_tmp + '\n' \
-+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
-+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
-+      '  SVNListParentPath On' + '\n' \
-+      '  AuthType          Basic' + '\n' \
-+      '  AuthName          "Subversion Repository"' + '\n' \
-+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
-+      '  Require           valid-user' + '\n' \
-+      '  AuthzSVNNoAuthWhenAnonymousAllowed On' + '\n' \
-+      '  SVNPathAuthz On' + '\n' \
-+      '</Location>' + '\n' \
-+      '<Location /authz-test-work/authn>' + '\n' \
-+      '  DAV               svn' + '\n' \
-+      '  SVNParentPath     ' + local_tmp + '\n' \
-+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
-+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
-+      '  SVNListParentPath On' + '\n' \
-+      '  AuthType          Basic' + '\n' \
-+      '  AuthName          "Subversion Repository"' + '\n' \
-+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
-+      '  Require           valid-user' + '\n' \
-+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
-+      '</Location>' + '\n' \
-+      '<Location /authz-test-work/authn-anonoff>' + '\n' \
-+      '  DAV               svn' + '\n' \
-+      '  SVNParentPath     ' + local_tmp + '\n' \
-+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
-+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
-+      '  SVNListParentPath On' + '\n' \
-+      '  AuthType          Basic' + '\n' \
-+      '  AuthName          "Subversion Repository"' + '\n' \
-+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
-+      '  Require           valid-user' + '\n' \
-+      '  AuthzSVNAnonymous Off' + '\n' \
-+      '  SVNPathAuthz On' + '\n' \
-+      '</Location>' + '\n' \
-+      '<Location /authz-test-work/authn-lcuser>' + '\n' \
-+      '  DAV               svn' + '\n' \
-+      '  SVNParentPath     ' + local_tmp + '\n' \
-+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
-+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
-+      '  SVNListParentPath On' + '\n' \
-+      '  AuthType          Basic' + '\n' \
-+      '  AuthName          "Subversion Repository"' + '\n' \
-+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
-+      '  Require           valid-user' + '\n' \
-+      '  AuthzForceUsernameCase Lower' + '\n' \
-+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
-+      '</Location>' + '\n' \
-+      '<Location /authz-test-work/authn-lcuser>' + '\n' \
-+      '  DAV               svn' + '\n' \
-+      '  SVNParentPath     ' + local_tmp + '\n' \
-+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
-+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
-+      '  SVNListParentPath On' + '\n' \
-+      '  AuthType          Basic' + '\n' \
-+      '  AuthName          "Subversion Repository"' + '\n' \
-+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
-+      '  Require           valid-user' + '\n' \
-+      '  AuthzForceUsernameCase Lower' + '\n' \
-+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
-+      '</Location>' + '\n' \
-+      '<Location /authz-test-work/authn-group>' + '\n' \
-+      '  DAV               svn' + '\n' \
-+      '  SVNParentPath     ' + local_tmp + '\n' \
-+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
-+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
-+      '  SVNListParentPath On' + '\n' \
-+      '  AuthType          Basic' + '\n' \
-+      '  AuthName          "Subversion Repository"' + '\n' \
-+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
-+      '  AuthGroupFile    ' + self._quote(self.httpd_groups) + '\n' \
-+      '  Require           group random' + '\n' \
-+      '  AuthzSVNAuthoritative Off' + '\n' \
-+      '  SVNPathAuthz On' + '\n' \
-+      '</Location>' + '\n' \
-+      '<IfModule mod_authz_core.c>' + '\n' \
-+      '<Location /authz-test-work/sallrany>' + '\n' \
-+      '  DAV               svn' + '\n' \
-+      '  SVNParentPath     ' + local_tmp + '\n' \
-+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
-+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
-+      '  SVNListParentPath On' + '\n' \
-+      '  AuthType          Basic' + '\n' \
-+      '  AuthName          "Subversion Repository"' + '\n' \
-+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
-+      '  AuthzSendForbiddenOnFailure On' + '\n' \
-+      '  Satisfy All' + '\n' \
-+      '  <RequireAny>' + '\n' \
-+      '    Require valid-user' + '\n' \
-+      '    Require expr req(\'ALLOW\') == \'1\'' + '\n' \
-+      '  </RequireAny>' + '\n' \
-+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
-+      '</Location>' + '\n' \
-+      '<Location /authz-test-work/sallrall>'+ '\n' \
-+      '  DAV               svn' + '\n' \
-+      '  SVNParentPath     ' + local_tmp + '\n' \
-+      '  AuthzSVNAccessFile ' + self._quote(self.authz_file) + '\n' \
-+      '  SVNAdvertiseV2Protocol ' + self.httpv2_option + '\n' \
-+      '  SVNListParentPath On' + '\n' \
-+      '  AuthType          Basic' + '\n' \
-+      '  AuthName          "Subversion Repository"' + '\n' \
-+      '  AuthUserFile    ' + self._quote(self.httpd_users) + '\n' \
-+      '  AuthzSendForbiddenOnFailure On' + '\n' \
-+      '  Satisfy All' + '\n' \
-+      '  <RequireAll>' + '\n' \
-+      '    Require valid-user' + '\n' \
-+      '    Require expr req(\'ALLOW\') == \'1\'' + '\n' \
-+      '  </RequireAll>' + '\n' \
-+      '  SVNPathAuthz ' + self.path_authz_option + '\n' \
-+      '</Location>' + '\n' \
-+      '</IfModule>' + '\n' \
-+
-   def start(self):
-     if self.service:
-       self._start_service()
-@@ -786,6 +949,10 @@ if not test_javahl:
-     log_file = os.path.join(abs_builddir, log)
-     fail_log_file = os.path.join(abs_builddir, faillog)
- 
-+  if run_httpd:
-+    httpd_version = "%.1f" % daemon.httpd_ver
-+  else:
-+    httpd_version = None
-   th = run_tests.TestHarness(abs_srcdir, abs_builddir,
-                              log_file,
-                              fail_log_file,
-@@ -795,6 +962,7 @@ if not test_javahl:
-                              fsfs_sharding, fsfs_packing,
-                              list_tests, svn_bin, mode_filter,
-                              milestone_filter,
-+                             httpd_version=httpd_version,
-                              set_log_level=log_level, ssl_cert=ssl_cert)
-   old_cwd = os.getcwd()
-   try:
diff --git a/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/subversion-CVE-2015-3187.patch b/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/subversion-CVE-2015-3187.patch
deleted file mode 100644
index 494e11c..0000000
--- a/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/subversion-CVE-2015-3187.patch
+++ /dev/null
@@ -1,346 +0,0 @@
-Fix CVE-2015-3187
-
-Patch is from:
-http://subversion.apache.org/security/CVE-2015-3187-advisory.txt
-
-Upstream-Status: Backport
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-
-Index: subversion/libsvn_repos/rev_hunt.c
-===================================================================
---- a/subversion/libsvn_repos/rev_hunt.c	(revision 1685077)
-+++ b/subversion/libsvn_repos/rev_hunt.c	(working copy)
-@@ -726,23 +726,6 @@ svn_repos_trace_node_locations(svn_fs_t *fs,
-       if (! prev_path)
-         break;
- 
--      if (authz_read_func)
--        {
--          svn_boolean_t readable;
--          svn_fs_root_t *tmp_root;
--
--          SVN_ERR(svn_fs_revision_root(&tmp_root, fs, revision, currpool));
--          SVN_ERR(authz_read_func(&readable, tmp_root, path,
--                                  authz_read_baton, currpool));
--          if (! readable)
--            {
--              svn_pool_destroy(lastpool);
--              svn_pool_destroy(currpool);
--
--              return SVN_NO_ERROR;
--            }
--        }
--
-       /* Assign the current path to all younger revisions until we reach
-          the copy target rev. */
-       while ((revision_ptr < revision_ptr_end)
-@@ -765,6 +748,20 @@ svn_repos_trace_node_locations(svn_fs_t *fs,
-       path = prev_path;
-       revision = prev_rev;
- 
-+      if (authz_read_func)
-+        {
-+          svn_boolean_t readable;
-+          SVN_ERR(svn_fs_revision_root(&root, fs, revision, currpool));
-+          SVN_ERR(authz_read_func(&readable, root, path,
-+                                  authz_read_baton, currpool));
-+          if (!readable)
-+            {
-+              svn_pool_destroy(lastpool);
-+              svn_pool_destroy(currpool);
-+              return SVN_NO_ERROR;
-+            }
-+        }
-+
-       /* Clear last pool and switch. */
-       svn_pool_clear(lastpool);
-       tmppool = lastpool;
-Index: subversion/tests/cmdline/authz_tests.py
-===================================================================
---- a/subversion/tests/cmdline/authz_tests.py	(revision 1685077)
-+++ b/subversion/tests/cmdline/authz_tests.py	(working copy)
-@@ -609,8 +609,10 @@ def authz_log_and_tracing_test(sbox):
- 
-   ## cat
- 
-+  expected_err2 = ".*svn: E195012: Unable to find repository location.*"
-+
-   # now see if we can look at the older version of rho
--  svntest.actions.run_and_verify_svn(None, None, expected_err,
-+  svntest.actions.run_and_verify_svn(None, None, expected_err2,
-                                      'cat', '-r', '2', D_url+'/rho')
- 
-   if sbox.repo_url.startswith('http'):
-@@ -627,10 +629,11 @@ def authz_log_and_tracing_test(sbox):
-   svntest.actions.run_and_verify_svn(None, None, expected_err,
-                                      'diff', '-r', 'HEAD', G_url+'/rho')
- 
--  svntest.actions.run_and_verify_svn(None, None, expected_err,
-+  # diff treats the unreadable path as indicating an add so no error
-+  svntest.actions.run_and_verify_svn(None, None, [],
-                                      'diff', '-r', '2', D_url+'/rho')
- 
--  svntest.actions.run_and_verify_svn(None, None, expected_err,
-+  svntest.actions.run_and_verify_svn(None, None, [],
-                                      'diff', '-r', '2:4', D_url+'/rho')
- 
- # test whether read access is correctly granted and denied
-Index: subversion/tests/libsvn_repos/repos-test.c
-===================================================================
---- a/subversion/tests/libsvn_repos/repos-test.c	(revision 1685077)
-+++ b/subversion/tests/libsvn_repos/repos-test.c	(working copy)
-@@ -3524,6 +3524,245 @@ test_load_r0_mergeinfo(const svn_test_opts_t *opts
-   return SVN_NO_ERROR;
- }
- 
-+static svn_error_t *
-+mkdir_delete_copy(svn_repos_t *repos,
-+                  const char *src,
-+                  const char *dst,
-+                  apr_pool_t *pool)
-+{
-+  svn_fs_t *fs = svn_repos_fs(repos);
-+  svn_revnum_t youngest_rev;
-+  svn_fs_txn_t *txn;
-+  svn_fs_root_t *txn_root, *rev_root;
-+
-+  SVN_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));
-+  
-+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
-+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-+  SVN_ERR(svn_fs_make_dir(txn_root, "A/T", pool));
-+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
-+
-+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
-+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-+  SVN_ERR(svn_fs_delete(txn_root, "A/T", pool));
-+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
-+
-+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
-+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-+  SVN_ERR(svn_fs_revision_root(&rev_root, fs, youngest_rev - 1, pool));
-+  SVN_ERR(svn_fs_copy(rev_root, src, txn_root, dst, pool));
-+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
-+
-+  return SVN_NO_ERROR;
-+}
-+
-+struct authz_read_baton_t {
-+  apr_hash_t *paths;
-+  apr_pool_t *pool;
-+  const char *deny;
-+};
-+
-+static svn_error_t *
-+authz_read_func(svn_boolean_t *allowed,
-+                svn_fs_root_t *root,
-+                const char *path,
-+                void *baton,
-+                apr_pool_t *pool)
-+{
-+  struct authz_read_baton_t *b = baton;
-+
-+  if (b->deny && !strcmp(b->deny, path))
-+    *allowed = FALSE;
-+  else
-+    *allowed = TRUE;
-+
-+  svn_hash_sets(b->paths, apr_pstrdup(b->pool, path), (void*)1);
-+
-+  return SVN_NO_ERROR;
-+}
-+
-+static svn_error_t *
-+verify_locations(apr_hash_t *actual,
-+                 apr_hash_t *expected,
-+                 apr_hash_t *checked,
-+                 apr_pool_t *pool)
-+{
-+  apr_hash_index_t *hi;
-+
-+  for (hi = apr_hash_first(pool, expected); hi; hi = apr_hash_next(hi))
-+    {
-+      const svn_revnum_t *rev = svn__apr_hash_index_key(hi);
-+      const char *path = apr_hash_get(actual, rev, sizeof(svn_revnum_t));
-+
-+      if (!path)
-+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
-+                                 "expected %s for %d found (null)",
-+                                 (char*)svn__apr_hash_index_val(hi),
-+                                 (int)*rev);
-+      else if (strcmp(path, svn__apr_hash_index_val(hi)))
-+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
-+                                 "expected %s for %d found %s",
-+                                 (char*)svn__apr_hash_index_val(hi),
-+                                 (int)*rev, path);
-+
-+    }
-+
-+  for (hi = apr_hash_first(pool, actual); hi; hi = apr_hash_next(hi))
-+    {
-+      const svn_revnum_t *rev = svn__apr_hash_index_key(hi);
-+      const char *path = apr_hash_get(expected, rev, sizeof(svn_revnum_t));
-+
-+      if (!path)
-+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
-+                                 "found %s for %d expected (null)",
-+                                 (char*)svn__apr_hash_index_val(hi),
-+                                 (int)*rev);
-+      else if (strcmp(path, svn__apr_hash_index_val(hi)))
-+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
-+                                 "found %s for %d expected %s",
-+                                 (char*)svn__apr_hash_index_val(hi),
-+                                 (int)*rev, path);
-+
-+      if (!svn_hash_gets(checked, path))
-+        return svn_error_createf(SVN_ERR_TEST_FAILED, NULL,
-+                                 "did not check %s", path);
-+    }
-+
-+  return SVN_NO_ERROR;
-+}
-+
-+static void
-+set_expected(apr_hash_t *expected,
-+             svn_revnum_t rev,
-+             const char *path,
-+             apr_pool_t *pool)
-+{
-+  svn_revnum_t *rp = apr_palloc(pool, sizeof(svn_revnum_t));
-+  *rp = rev;
-+  apr_hash_set(expected, rp, sizeof(svn_revnum_t), path);
-+}
-+
-+static svn_error_t *
-+trace_node_locations_authz(const svn_test_opts_t *opts,
-+                           apr_pool_t *pool)
-+{
-+  svn_repos_t *repos;
-+  svn_fs_t *fs;
-+  svn_revnum_t youngest_rev = 0;
-+  svn_fs_txn_t *txn;
-+  svn_fs_root_t *txn_root;
-+  struct authz_read_baton_t arb;
-+  apr_array_header_t *revs = apr_array_make(pool, 10, sizeof(svn_revnum_t));
-+  apr_hash_t *locations;
-+  apr_hash_t *expected = apr_hash_make(pool);
-+  int i;
-+
-+  /* Create test repository. */
-+  SVN_ERR(svn_test__create_repos(&repos, "test-repo-trace-node-locations-authz",
-+                                 opts, pool));
-+  fs = svn_repos_fs(repos);
-+
-+  /* r1 create A */
-+  SVN_ERR(svn_fs_begin_txn(&txn, fs, youngest_rev, pool));
-+  SVN_ERR(svn_fs_txn_root(&txn_root, txn, pool));
-+  SVN_ERR(svn_fs_make_dir(txn_root, "A", pool));
-+  SVN_ERR(svn_fs_make_file(txn_root, "A/f", pool));
-+  SVN_ERR(svn_test__set_file_contents(txn_root, "A/f", "foobar", pool));
-+  SVN_ERR(svn_repos_fs_commit_txn(NULL, repos, &youngest_rev, txn, pool));
-+
-+  /* r4 copy A to B */
-+  SVN_ERR(mkdir_delete_copy(repos, "A", "B", pool));
-+
-+  /* r7 copy B to C */
-+  SVN_ERR(mkdir_delete_copy(repos, "B", "C", pool));
-+
-+  /* r10 copy C to D */
-+  SVN_ERR(mkdir_delete_copy(repos, "C", "D", pool));
-+
-+  SVN_ERR(svn_fs_youngest_rev(&youngest_rev, fs, pool));
-+  SVN_ERR_ASSERT(youngest_rev == 10);
-+
-+  arb.paths = apr_hash_make(pool);
-+  arb.pool = pool;
-+  arb.deny = NULL;
-+
-+  apr_array_clear(revs);
-+  for (i = 0; i <= youngest_rev; ++i)
-+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
-+  set_expected(expected, 10, "/D/f", pool);
-+  set_expected(expected, 8, "/C/f", pool);
-+  set_expected(expected, 7, "/C/f", pool);
-+  set_expected(expected, 5, "/B/f", pool);
-+  set_expected(expected, 4, "/B/f", pool);
-+  set_expected(expected, 2, "/A/f", pool);
-+  set_expected(expected, 1, "/A/f", pool);
-+  apr_hash_clear(arb.paths);
-+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
-+                                         authz_read_func, &arb, pool));
-+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
-+
-+  apr_array_clear(revs);
-+  for (i = 1; i <= youngest_rev; ++i)
-+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
-+  apr_hash_clear(arb.paths);
-+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
-+                                         authz_read_func, &arb, pool));
-+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
-+
-+  apr_array_clear(revs);
-+  for (i = 2; i <= youngest_rev; ++i)
-+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
-+  set_expected(expected, 1, NULL, pool);
-+  apr_hash_clear(arb.paths);
-+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
-+                                         authz_read_func, &arb, pool));
-+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
-+
-+  apr_array_clear(revs);
-+  for (i = 3; i <= youngest_rev; ++i)
-+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
-+  set_expected(expected, 2, NULL, pool);
-+  apr_hash_clear(arb.paths);
-+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
-+                                         authz_read_func, &arb, pool));
-+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
-+
-+  apr_array_clear(revs);
-+  for (i = 6; i <= youngest_rev; ++i)
-+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
-+  set_expected(expected, 5, NULL, pool);
-+  set_expected(expected, 4, NULL, pool);
-+  apr_hash_clear(arb.paths);
-+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
-+                                         authz_read_func, &arb, pool));
-+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
-+
-+  arb.deny = "/B/f";
-+  apr_array_clear(revs);
-+  for (i = 0; i <= youngest_rev; ++i)
-+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
-+  apr_hash_clear(arb.paths);
-+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
-+                                         authz_read_func, &arb, pool));
-+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
-+
-+  apr_array_clear(revs);
-+  for (i = 6; i <= youngest_rev; ++i)
-+    APR_ARRAY_PUSH(revs, svn_revnum_t) = i;
-+  apr_hash_clear(arb.paths);
-+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
-+                                         authz_read_func, &arb, pool));
-+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
-+
-+  APR_ARRAY_PUSH(revs, svn_revnum_t) = 0;
-+  apr_hash_clear(arb.paths);
-+  SVN_ERR(svn_repos_trace_node_locations(fs, &locations, "D/f", 10, revs,
-+                                         authz_read_func, &arb, pool));
-+  SVN_ERR(verify_locations(locations, expected, arb.paths, pool));
-+
-+  return SVN_NO_ERROR;
-+}
-+
- /* The test table.  */
- 
- struct svn_test_descriptor_t test_funcs[] =
-@@ -3573,5 +3812,7 @@ struct svn_test_descriptor_t test_funcs[] =
-                        "test dumping with r0 mergeinfo"),
-     SVN_TEST_OPTS_PASS(test_load_r0_mergeinfo,
-                        "test loading with r0 mergeinfo"),
-+    SVN_TEST_OPTS_PASS(trace_node_locations_authz,
-+                       "authz for svn_repos_trace_node_locations"),
-     SVN_TEST_NULL
-   };
diff --git a/yocto-poky/meta/recipes-devtools/subversion/subversion/0001-Fix-libtool-name-in-configure.ac.patch b/yocto-poky/meta/recipes-devtools/subversion/subversion/0001-Fix-libtool-name-in-configure.ac.patch
new file mode 100644
index 0000000..5a1b10b
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/subversion/subversion/0001-Fix-libtool-name-in-configure.ac.patch
@@ -0,0 +1,29 @@
+From cbcfe0399347989e45a8fb695f55c855d6b3da72 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 7 Dec 2015 17:11:02 +0200
+Subject: [PATCH] Fix libtool name in configure.ac
+
+Upstream-Status: Inappropriate [embedded specific]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4ed66d4..ceb64f9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -221,8 +221,8 @@ if test "$experimental_libtool" = "yes"; then
+   LIBTOOL="$sh_libtool"
+   SVN_LIBTOOL="$sh_libtool"
+ else
+-  sh_libtool="$abs_builddir/libtool"
+-  SVN_LIBTOOL="\$(SHELL) \"$sh_libtool\""
++  sh_libtool="$abs_builddir/$host_alias-libtool"
++  SVN_LIBTOOL="\$(SHELL) \$(abs_builddir)/$host_alias-libtool"
+ fi
+ AC_SUBST(SVN_LIBTOOL)
+ 
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/disable_macos.patch b/yocto-poky/meta/recipes-devtools/subversion/subversion/disable_macos.patch
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/subversion/subversion-1.8.13/disable_macos.patch
rename to yocto-poky/meta/recipes-devtools/subversion/subversion/disable_macos.patch
diff --git a/yocto-poky/meta/recipes-devtools/subversion/subversion/serf.m4-Regex-modified-to-allow-D-in-paths.patch b/yocto-poky/meta/recipes-devtools/subversion/subversion/serf.m4-Regex-modified-to-allow-D-in-paths.patch
new file mode 100644
index 0000000..9fed3cf
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/subversion/subversion/serf.m4-Regex-modified-to-allow-D-in-paths.patch
@@ -0,0 +1,32 @@
+From f1b6e49f12a18eabe88eb732b578a16281d09499 Mon Sep 17 00:00:00 2001
+From: Jose Lamego <jose.a.lamego@linux.intel.com>
+Date: Thu, 2 Jul 2015 11:37:43 +0000
+Subject: [PATCH] serf.m4: Regex modified to allow '-D' in paths
+
+Upstream-Status: Accepted
+
+The patch is merged by subversion upstream with replacing '[[:space:]]' with ' '.
+
+http://svn.apache.org/viewvc/subversion/trunk/build/ac-macros/serf.m4?r1=1594156&r2=1689824  
+
+Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
+---
+ build/ac-macros/serf.m4 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/build/ac-macros/serf.m4 b/build/ac-macros/serf.m4
+index ae11e75..ff8cbae 100644
+--- a/build/ac-macros/serf.m4
++++ b/build/ac-macros/serf.m4
+@@ -168,7 +168,7 @@
+         if $PKG_CONFIG $serf_pc_arg --atleast-version=$serf_check_version; then
+           AC_MSG_RESULT([yes])
+           serf_found=yes
+-          SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_pc_arg --cflags | $SED -e 's/-D[^ ]*//g'`]
++          SVN_SERF_INCLUDES=[`$PKG_CONFIG $serf_pc_arg --cflags | $SED -e 's/ -D[^ ]*//g' -e 's/^-D[^ ]*//g'`]
+           SVN_SERF_LIBS=`$PKG_CONFIG $serf_pc_arg --libs-only-l` 
+           dnl don't use --libs-only-L because then we might miss some options
+           LDFLAGS=["$LDFLAGS `$PKG_CONFIG $serf_pc_arg --libs | $SED -e 's/-l[^ ]*//g'`"]
+-- 
+1.8.4.5
+
diff --git a/yocto-poky/meta/recipes-devtools/subversion/subversion_1.8.13.bb b/yocto-poky/meta/recipes-devtools/subversion/subversion_1.8.13.bb
deleted file mode 100644
index 68934b7..0000000
--- a/yocto-poky/meta/recipes-devtools/subversion/subversion_1.8.13.bb
+++ /dev/null
@@ -1,55 +0,0 @@
-SUMMARY = "Subversion (svn) version control system client"
-SECTION = "console/network"
-DEPENDS = "apr-util serf sqlite3 file"
-DEPENDS_append_class-native = " file-replacement-native"
-RDEPENDS_${PN} = "serf"
-LICENSE = "Apache-2"
-HOMEPAGE = "http://subversion.tigris.org"
-
-BBCLASSEXTEND = "native"
-
-inherit gettext pythonnative
-
-SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
-           file://libtool2.patch \
-           file://disable_macos.patch \
-           file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \
-           file://subversion-CVE-2015-3184.patch \
-           file://subversion-CVE-2015-3187.patch \
-"
-SRC_URI[md5sum] = "4413417b529d7bdf82f74e50df02e88b"
-SRC_URI[sha256sum] = "1099cc68840753b48aedb3a27ebd1e2afbcc84ddb871412e5d500e843d607579"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1c2f0119e478700b5428e26386cff923"
-
-PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
-PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
-
-EXTRA_OECONF = " \
-                --without-berkeley-db --without-apxs \
-                --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
-                --with-apr-util=${STAGING_BINDIR_CROSS} \
-                --disable-keychain \
-                ac_cv_path_RUBY=none"
-
-inherit autotools
-
-export LDFLAGS += " -L${STAGING_LIBDIR} "
-CPPFLAGS += "-P"
-BUILD_CPPFLAGS += "-P"
-
-acpaths = "-I build/ -I build/ac-macros/"
-
-do_configure_prepend () {
-	rm -f ${S}/libtool
-	rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
-	rm -f ${S}/aclocal.m4
-	sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
-}
-
-#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
-#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
-#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
-#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
-#| make: *** [install-serf-lib] Error 1
-PARALLEL_MAKEINST = ""
diff --git a/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.3.bb b/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.3.bb
new file mode 100644
index 0000000..a19a675
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/subversion/subversion_1.9.3.bb
@@ -0,0 +1,53 @@
+SUMMARY = "Subversion (svn) version control system client"
+SECTION = "console/network"
+DEPENDS = "apr-util serf sqlite3 file"
+DEPENDS_append_class-native = " file-replacement-native"
+RDEPENDS_${PN} = "serf"
+LICENSE = "Apache-2"
+HOMEPAGE = "http://subversion.tigris.org"
+
+BBCLASSEXTEND = "native"
+
+inherit gettext pythonnative
+
+SRC_URI = "${APACHE_MIRROR}/${BPN}/${BPN}-${PV}.tar.bz2 \
+           file://disable_macos.patch \
+           file://serf.m4-Regex-modified-to-allow-D-in-paths.patch \
+           file://0001-Fix-libtool-name-in-configure.ac.patch \
+           "
+SRC_URI[md5sum] = "243036eb28b50ce517fc228eb3250add"
+SRC_URI[sha256sum] = "8bbf6bb125003d88ee1c22935a36b7b1ab7d957e0c8b5fbfe5cb6310b6e86ae0"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=af81ae49ba359e70626c05e9bf313709"
+
+PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl"
+PACKAGECONFIG[gnome-keyring] = "--with-gnome-keyring,--without-gnome-keyring,glib-2.0 gnome-keyring"
+
+EXTRA_OECONF = " \
+                --without-berkeley-db --without-apxs \
+                --without-swig --with-apr=${STAGING_BINDIR_CROSS} \
+                --with-apr-util=${STAGING_BINDIR_CROSS} \
+                --disable-keychain \
+                ac_cv_path_RUBY=none"
+
+inherit autotools
+
+export LDFLAGS += " -L${STAGING_LIBDIR} "
+CPPFLAGS += "-P"
+BUILD_CPPFLAGS += "-P"
+
+acpaths = "-I build/ -I build/ac-macros/"
+
+do_configure_prepend () {
+	rm -f ${S}/libtool
+	rm -f ${S}/build/libtool.m4 ${S}/build/ltmain.sh ${S}/build/ltoptions.m4 ${S}/build/ltsugar.m4 ${S}/build/ltversion.m4 ${S}/build/lt~obsolete.m4
+	rm -f ${S}/aclocal.m4
+	sed -i -e 's:with_sasl="/usr/local":with_sasl="${STAGING_DIR}":' ${S}/build/ac-macros/sasl.m4
+}
+
+#| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_local/libsvn_ra_local-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| /usr/bin/ld: cannot find -lsvn_delta-1| collect2: ld returned 1 exit status| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_svn/libsvn_ra_svn-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'| x86_64-linux-libtool: install: warning: `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/build/subversion/libsvn_ra_serf/libsvn_ra_serf-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| x86_64-linux-libtool: install: error: relink `libsvn_ra_serf-1.la' with the above command before installing it
+#| x86_64-linux-libtool: install: warning: `../../subversion/libsvn_repos/libsvn_repos-1.la' has not been installed in `/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/sysroots/x86_64-linux/usr/lib'
+#| /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-qa-logrotate/build/build/tmp/work/x86_64-linux/subversion-native/1.8.9-r0/subversion-1.8.9/build-outputs.mk:1090: recipe for target 'install-serf-lib' failed
+#| make: *** [install-serf-lib] Error 1
+PARALLEL_MAKEINST = ""
diff --git a/yocto-poky/meta/recipes-devtools/swig/swig.inc b/yocto-poky/meta/recipes-devtools/swig/swig.inc
index 9821fa5..9da40df 100644
--- a/yocto-poky/meta/recipes-devtools/swig/swig.inc
+++ b/yocto-poky/meta/recipes-devtools/swig/swig.inc
@@ -1,4 +1,4 @@
-DESCRIPTION = "SWIG - Simplified Wrapper and Interface Generator"
+SUMMARY = "SWIG - Simplified Wrapper and Interface Generator"
 HOMEPAGE = "http://swig.sourceforge.net/"
 LICENSE = "BSD & GPLv3"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \
diff --git a/yocto-poky/meta/recipes-devtools/swig/swig_3.0.6.bb b/yocto-poky/meta/recipes-devtools/swig/swig_3.0.6.bb
deleted file mode 100644
index 2a0917e..0000000
--- a/yocto-poky/meta/recipes-devtools/swig/swig_3.0.6.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
-            file://0001-configure-use-pkg-config-for-pcre-detection.patch \
-           "
-SRC_URI[md5sum] = "df43ae271642bcfa61c1e59f970f9963"
-SRC_URI[sha256sum] = "c67f63ea11956106e4cda66416d5020330dc4ce2ee45057d39a9494ce33eca05"
-
diff --git a/yocto-poky/meta/recipes-devtools/swig/swig_3.0.8.bb b/yocto-poky/meta/recipes-devtools/swig/swig_3.0.8.bb
new file mode 100644
index 0000000..c1b820e
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/swig/swig_3.0.8.bb
@@ -0,0 +1,8 @@
+require ${BPN}.inc
+
+SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \
+            file://0001-configure-use-pkg-config-for-pcre-detection.patch \
+           "
+SRC_URI[md5sum] = "c96a1d5ecb13d38604d7e92148c73c97"
+SRC_URI[sha256sum] = "58a475dbbd4a4d7075e5fe86d4e54c9edde39847cdb96a3053d87cb64a23a453"
+
diff --git a/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb b/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb
index 8534528..ab8a51a 100644
--- a/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb
+++ b/yocto-poky/meta/recipes-devtools/syslinux/syslinux_6.03.bb
@@ -37,8 +37,6 @@
 	BINDIR=${bindir} SBINDIR=${sbindir} LIBDIR=${libdir} \
 	DATADIR=${datadir} MANDIR=${mandir} INCDIR=${includedir} \
 "
-# syslinux uses $LD for linking, strip `-Wl,' so it can work
-export LDFLAGS = "`echo $LDFLAGS | sed 's/-Wl,//g'`"
 
 do_configure() {
 	# drop win32 targets or build fails
@@ -59,11 +57,11 @@
 
 	# Rebuild only the installer; keep precompiled bootloaders
 	# as per author's request (doc/distrib.txt)
-	oe_runmake CC="${CC} ${CFLAGS}" LDFLAGS="${LDFLAGS}" firmware="bios" installer
+	oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" LDFLAGS="${LDFLAGS}" firmware="bios" installer
 }
 
 do_install() {
-	oe_runmake CC="${CC} ${CFLAGS}" install INSTALLROOT="${D}" firmware="bios"
+	oe_runmake CC="${CC} ${CFLAGS}" LD="${LD}" install INSTALLROOT="${D}" firmware="bios"
 
 	install -d ${D}${datadir}/syslinux/
 	install -m 644 ${S}/bios/core/ldlinux.sys ${D}${datadir}/syslinux/
diff --git a/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch b/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch
new file mode 100644
index 0000000..5f93c46
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/0001-canonicalize_file_name-is-specific-to-glibc.patch
@@ -0,0 +1,46 @@
+From 23a3759b74d081b3b2849b0d37a0e5219f37813e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 22:37:48 +0000
+Subject: [PATCH] canonicalize_file_name is specific to glibc
+
+When on Linux and not using glibc then we need to define
+canonicalize_file_name() API, therefore add a check for finding out if
+its not glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ agent/tcf/framework/mdep.c | 2 +-
+ agent/tcf/framework/mdep.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/agent/tcf/framework/mdep.c b/agent/tcf/framework/mdep.c
+index 2b52ca8..7d09655 100644
+--- a/agent/tcf/framework/mdep.c
++++ b/agent/tcf/framework/mdep.c
+@@ -1042,7 +1042,7 @@ char * canonicalize_file_name(const char * path) {
+     return strdup(res);
+ }
+ 
+-#elif defined(__UCLIBC__)
++#elif defined(__UCLIBC__) || !defined(__GLIBC__)
+ 
+ char * canonicalize_file_name(const char * path) {
+     return realpath(path, NULL);
+diff --git a/agent/tcf/framework/mdep.h b/agent/tcf/framework/mdep.h
+index 1e718a2..187c399 100644
+--- a/agent/tcf/framework/mdep.h
++++ b/agent/tcf/framework/mdep.h
+@@ -276,7 +276,7 @@ extern int loc_clock_gettime(int, struct timespec *);
+ 
+ #define O_BINARY 0
+ 
+-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__) || !defined(__GLIBC__)
+ #  define O_LARGEFILE 0
+ extern char ** environ;
+ extern char * canonicalize_file_name(const char * path);
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch b/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch
new file mode 100644
index 0000000..c03c55d
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+From d92af0483c20365fd0af740d0baef8870b4aa374 Mon Sep 17 00:00:00 2001
+From: Abdur Rehman <abdur_rehman@mentor.com>
+Date: Wed, 26 Aug 2015 19:18:11 +0500
+Subject: [PATCH] tcf-agent: obey LDFLAGS
+
+Signed-off-by: Abdur Rehman <abdur_rehman@mentor.com>
+---
+ Makefile.inc |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.inc b/Makefile.inc
+index 959028f..3148942 100644
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -96,7 +96,7 @@ NO_LINK_F	?= -c
+ # Linker definition and flags
+ 
+ LINK		?= $(CC)
+-LINK_FLAGS	?= $(CFLAGS)
++LINK_FLAGS	?= $(LDFLAGS) $(CFLAGS)
+ LINK_OUT_F	?= $(OUT_OBJ_F)
+ 
+ # Archiver definition and flags
+-- 
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb b/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
index f8fd390..ab2fcd7 100644
--- a/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
+++ b/yocto-poky/meta/recipes-devtools/tcf-agent/tcf-agent_git.bb
@@ -8,8 +8,11 @@
 SRCREV = "b9a735e9c7cf82f80d412b7ab15d08b89d5a4ccc"
 PV = "1.3.0+git${SRCPV}"
 
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
 SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git;branch=1.3_mars_bugfix \
            file://fix_ranlib.patch \
+           file://ldflags.patch \
+           file://0001-canonicalize_file_name-is-specific-to-glibc.patch;striplevel=2 \
            file://tcf-agent.init \
            file://tcf-agent.service \
           "
diff --git a/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix-configure.patch b/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix-configure.patch
deleted file mode 100644
index b692a0e..0000000
--- a/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix-configure.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Upstream-Status: Pending
-
-Index: unix/tcl.m4
-===================================================================
---- tcl8.4.11/unix.orig/tcl.m4
-+++ tcl8.4.11/unix/tcl.m4
-@@ -845,7 +845,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
- 	    # results, and the version is kept in special file).
- 	
- 	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
--		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-+		system=MP-RAS-`awk '{print $3}' /etc/.relid`
- 	    fi
- 	    if test "`uname -s`" = "AIX" ; then
- 		system=AIX-`uname -v`.`uname -r`
-@@ -2250,7 +2250,7 @@ AC_DEFUN(SC_BLOCKING_STYLE, [
- 	    # results, and the version is kept in special file).
- 	
- 	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
--		system=MP-RAS-`awk '{print $3}' /etc/.relid'`
-+		system=MP-RAS-`awk '{print $3}' /etc/.relid`
- 	    fi
- 	    if test "`uname -s`" = "AIX" ; then
- 		system=AIX-`uname -v`.`uname -r`
-Index: unix/configure
-===================================================================
---- tcl8.4.11/unix.orig/configure
-+++ tcl8.4.11/unix/configure
-@@ -2130,7 +2130,7 @@ echo "configure:2121: checking system ve
- 	    # results, and the version is kept in special file).
- 	
- 	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
--		system=MP-RAS-`awk '{print }' /etc/.relid'`
-+		system=MP-RAS-`awk '{print }' /etc/.relid`
- 	    fi
- 	    if test "`uname -s`" = "AIX" ; then
- 		system=AIX-`uname -v`.`uname -r`
-@@ -7608,7 +7608,7 @@ echo "configure:7600: checking FIONBIO v
- 	    # results, and the version is kept in special file).
- 	
- 	    if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
--		system=MP-RAS-`awk '{print }' /etc/.relid'`
-+		system=MP-RAS-`awk '{print }' /etc/.relid`
- 	    fi
- 	    if test "`uname -s`" = "AIX" ; then
- 		system=AIX-`uname -v`.`uname -r`
diff --git a/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix_issue_with_old_distro_glibc.patch b/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix_issue_with_old_distro_glibc.patch
index be27341..5b5de07 100644
--- a/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix_issue_with_old_distro_glibc.patch
+++ b/yocto-poky/meta/recipes-devtools/tcltk/tcl/fix_issue_with_old_distro_glibc.patch
@@ -1,4 +1,4 @@
-Upstream-Status: inappropriate [embedded specific]
+Upstream-Status: Inappropriate [embedded specific]
 
 Fixes tcl target recipe build on old distros which have glibc older than 2.14
 
diff --git a/yocto-poky/meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch b/yocto-poky/meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch
deleted file mode 100644
index cda8655..0000000
--- a/yocto-poky/meta/recipes-devtools/unfs3/unfs3/fix_warnings.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-exports.*: fix warnings.
-
-Fix these warnings:
-lex.yy.c:1207: warning: 'yyunput' defined but not used
-lex.yy.c:1248: warning: 'input' defined but not used
-exports.y: In function 'set_hostname':
-exports.y:334: warning: large integer implicitly truncated to unsigned type
-exports.y: In function 'set_ipaddr':
-exports.y:350: warning: large integer implicitly truncated to unsigned type
-
-Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
-
-Upstream-Status: Submitted http://sourceforge.net/p/unfs3/bugs/5/
-
----
- Config/exports.l |    3 +++
- Config/exports.y |    6 ++++--
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
---- a/Config/exports.l
-+++ b/Config/exports.l
-@@ -48,6 +48,9 @@ NETCOMP [0-9]{1,2}
- NET {IP}"/"{NETCOMP}
- OLDNET {IP}"/"{IP}
- 
-+%option nounput
-+%option noinput
-+
- %%
- 
- ^{WHITE}*\n		{ /* eat empty line */ }
---- a/Config/exports.y
-+++ b/Config/exports.y
-@@ -331,7 +331,8 @@ static void set_hostname(const char *nam
- 	if (ent) {
- 		memcpy(&cur_host.addr, ent->h_addr_list[0],
- 		       sizeof(struct in_addr));
--		cur_host.mask.s_addr = ~0UL;
-+		cur_host.mask.s_addr = 0;
-+		cur_host.mask.s_addr = ~cur_host.mask.s_addr;
- 	} else {
- 		logmsg(LOG_CRIT, "could not resolve hostname '%s'", name);
- 		e_error = TRUE;
-@@ -347,7 +348,8 @@ static void set_ipaddr(const char *addr)
- 	
- 	if (!inet_aton(addr, &cur_host.addr))
- 		e_error = TRUE;
--	cur_host.mask.s_addr = ~0UL;
-+	cur_host.mask.s_addr = 0;
-+	cur_host.mask.s_addr = ~cur_host.mask.s_addr;
- }
- 
- /*
diff --git a/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r490.bb b/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r490.bb
deleted file mode 100644
index 5130895..0000000
--- a/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r490.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Userspace NFS server v3 protocol"
-SECTION = "console/network"
-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.r495"
-RECIPE_UPSTREAM_DATE = "Feb 05, 2015"
-CHECK_DATE = "Jun 10, 2015"
-
-DEPENDS = "flex-native bison-native flex"
-DEPENDS_append_class-nativesdk += "flex-nativesdk"
-
-SRC_URI[md5sum] = "3687acc4ee992e536472365dd99712a7"
-SRC_URI[sha256sum] = "274b43ada9c6eea1da26eb7010d72889c5278984ba0b50dff4e093057d4d64f8"
-
-MOD_PV = "490"
-S = "${WORKDIR}/trunk"
-SRC_URI = "svn://svn.code.sf.net/p/unfs3/code;module=trunk;rev=${MOD_PV} \
-           file://unfs3_parallel_build.patch \
-           file://alternate_rpc_ports.patch \
-           file://fix_pid_race_parent_writes_child_pid.patch \
-           file://fix_compile_warning.patch \
-           file://rename_fh_cache.patch \
-           file://relative_max_socket_path_len.patch \
-           file://fix_warnings.patch \
-           file://tcp_no_delay.patch \
-          "
-BBCLASSEXTEND = "native nativesdk"
-
-inherit autotools
-EXTRA_OECONF_append_class-native = " --sbindir=${bindir}"
-
-# Turn off these header detects else the inode search
-# will walk entire file systems and this is a real problem
-# if you have 2 TB of files to walk in your file system
-CACHED_CONFIGUREVARS = "ac_cv_header_mntent_h=no ac_cv_header_sys_mnttab_h=no"
diff --git a/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb b/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
new file mode 100644
index 0000000..eba1139
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/unfs3/unfs3_0.9.22.r497.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Userspace NFS server v3 protocol"
+SECTION = "console/network"
+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_append_libc-musl = " libtirpc "
+DEPENDS_append_class-nativesdk += "flex-nativesdk"
+
+MOD_PV = "497"
+S = "${WORKDIR}/trunk"
+SRC_URI = "svn://svn.code.sf.net/p/unfs3/code;module=trunk;rev=${MOD_PV};protocol=http \
+           file://unfs3_parallel_build.patch \
+           file://alternate_rpc_ports.patch \
+           file://fix_pid_race_parent_writes_child_pid.patch \
+           file://fix_compile_warning.patch \
+           file://rename_fh_cache.patch \
+           file://relative_max_socket_path_len.patch \
+           file://tcp_no_delay.patch \
+          "
+SRC_URI[md5sum] = "3687acc4ee992e536472365dd99712a7"
+SRC_URI[sha256sum] = "274b43ada9c6eea1da26eb7010d72889c5278984ba0b50dff4e093057d4d64f8"
+
+BBCLASSEXTEND = "native nativesdk"
+
+inherit autotools
+EXTRA_OECONF_append_class-native = " --sbindir=${bindir}"
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc"
+
+# Turn off these header detects else the inode search
+# will walk entire file systems and this is a real problem
+# if you have 2 TB of files to walk in your file system
+CACHED_CONFIGUREVARS = "ac_cv_header_mntent_h=no ac_cv_header_sys_mnttab_h=no"
diff --git a/yocto-poky/meta/recipes-devtools/unifdef/unifdef_2.10.bb b/yocto-poky/meta/recipes-devtools/unifdef/unifdef_2.10.bb
deleted file mode 100644
index b8a0079..0000000
--- a/yocto-poky/meta/recipes-devtools/unifdef/unifdef_2.10.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "Selectively remove #ifdef statements from sources"
-SECTION = "devel"
-LICENSE = "BSD-2-Clause"
-
-LIC_FILES_CHKSUM = "file://unifdef.c;endline=32;md5=2cc23f0382a6f560f6a9ecf4e040c0da"
-
-SRC_URI = "http://dotat.at/prog/${BPN}/${BP}.tar.xz"
-SRC_URI[md5sum] = "bb5d895e5ebbba5c5cc0c2771cf97ebe"
-SRC_URI[sha256sum] = "3b9b2b6b1952e9b9c1b9f734edec270689a35bdbf33ae66b50e19b2ed0d2df06"
-
-do_install() {
-	oe_runmake install DESTDIR=${D} prefix=${prefix}
-}
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/unifdef/unifdef_2.11.bb b/yocto-poky/meta/recipes-devtools/unifdef/unifdef_2.11.bb
new file mode 100644
index 0000000..1d13b9a
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/unifdef/unifdef_2.11.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Selectively remove #ifdef statements from sources"
+SECTION = "devel"
+LICENSE = "BSD-2-Clause"
+HOMEPAGE = "http://dotat.at/prog/unifdef/"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=78fc6c2c1dc4f18c891ed5b7a469fe32 \
+                    file://unifdef.c;endline=32;md5=aaec84d8b68d8b6dea71f45e9949ebfe"
+
+SRC_URI = "http://dotat.at/prog/${BPN}/${BP}.tar.xz"
+SRC_URI[md5sum] = "337053fd8a7d9ab3adf5e50f88af95b7"
+SRC_URI[sha256sum] = "828ffc270ac262b88fe011136acef2780c05b0dc3c5435d005651740788d4537"
+
+do_install() {
+	oe_runmake install DESTDIR=${D} prefix=${prefix}
+}
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-devtools/vala/vala.inc b/yocto-poky/meta/recipes-devtools/vala/vala.inc
index 63056fd..2a8875f 100644
--- a/yocto-poky/meta/recipes-devtools/vala/vala.inc
+++ b/yocto-poky/meta/recipes-devtools/vala/vala.inc
@@ -3,6 +3,9 @@
 Vala compiles to plain C and has no runtime environment nor penalities whatsoever."
 SECTION = "devel"
 DEPENDS = "bison-native flex-native libxslt-native glib-2.0"
+
+# vala-native contains a native version of vapigen, which we use instead of the target one
+DEPENDS_append_class-target = " vala-native"
 BBCLASSEXTEND = "native"
 HOMEPAGE = "http://vala-project.org"
 LICENSE = "LGPLv2.1"
@@ -11,8 +14,38 @@
 SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
 
 SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/${BPN}/${SHRT_VER}/${BP}.tar.xz"
-inherit autotools pkgconfig
+inherit autotools pkgconfig upstream-version-is-even
 
 FILES_${PN} += "${datadir}/${BPN}-${SHRT_VER}/vapi ${libdir}/${BPN}-${SHRT_VER}/"
 FILES_${PN}-doc += "${datadir}/devhelp"
-FILES_${PN}-dbg += "${libdir}/${BPN}-${SHRT_VER}/.debug"
+
+do_configure_prepend_class-target() {
+        # Write out a vapigen wrapper that will be provided by pkg-config file installed in target sysroot
+        # The wrapper will call a native vapigen
+        cat > ${B}/vapigen-wrapper << EOF
+#!/bin/sh
+vapigen-${SHRT_VER} "\$@"
+EOF
+        chmod +x ${B}/vapigen-wrapper
+}
+
+# Vapigen wrapper needs to be available system-wide, because it will be used
+# to build vapi files from all other packages with vala support
+do_install_append_class-target() {
+        install -d ${D}${bindir}/
+        install ${B}/vapigen-wrapper ${D}${bindir}/
+}
+
+
+SYSROOT_PREPROCESS_FUNCS_append_class-target += "vapigen_sysroot_preprocess"
+
+vapigen_sysroot_preprocess() {
+        # Put vapigen wrapper into target sysroot so that it can be used when building vapi files.
+        sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
+
+        # Also, tweak the vapigen name in vapigen pkgconfig file, so that it picks up our
+        # wrapper.
+        sed -i \
+           -e "s|vapigen=.*|vapigen=${bindir}/vapigen-wrapper|" \
+           ${SYSROOT_DESTDIR}${datadir}/pkgconfig/vapigen-${SHRT_VER}.pc
+}
diff --git a/yocto-poky/meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch b/yocto-poky/meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch
new file mode 100644
index 0000000..ecab0fc
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/vala/vala/0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch
@@ -0,0 +1,38 @@
+From dbb1c58e86f2af4613f3ac9571d9b163d4bca675 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 23 Oct 2015 16:13:54 +0300
+Subject: [PATCH] vapigen.m4: use $PKG_CONFIG_SYSROOT_DIR
+
+This is necessary in cross-compiling environments, where directories
+returned by pkg-config should be prefixed with sysroot location.
+
+Upstream-Status: Pending [review in oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ vapigen/vapigen.m4 | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/vapigen/vapigen.m4 b/vapigen/vapigen.m4
+index 2c435e7..6228991 100644
+--- a/vapigen/vapigen.m4
++++ b/vapigen/vapigen.m4
+@@ -82,12 +82,12 @@ AC_DEFUN([VAPIGEN_CHECK],
+ 
+   AS_CASE([$enable_vala],
+     [yes], [
+-      VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
+-      VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
++      VAPIGEN=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name`
++      VAPIGEN_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen
+       AS_IF([test "x$2" = "x"], [
+-          VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
++          VAPIGEN_VAPIDIR=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name`
+         ], [
+-          VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
++          VAPIGEN_VAPIDIR=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name`
+         ])
+     ])
+ 
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-devtools/vala/vala_0.28.0.bb b/yocto-poky/meta/recipes-devtools/vala/vala_0.28.0.bb
deleted file mode 100644
index 120906c..0000000
--- a/yocto-poky/meta/recipes-devtools/vala/vala_0.28.0.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch"
-
-SRC_URI[md5sum] = "8d4ceac3451a0d5497e7be38e5e4c2ad"
-SRC_URI[sha256sum] = "0d9e3bd3f82145664875f7c29b2f544ba92d2814f75412948f774c0727fc977f"
diff --git a/yocto-poky/meta/recipes-devtools/vala/vala_0.30.1.bb b/yocto-poky/meta/recipes-devtools/vala/vala_0.30.1.bb
new file mode 100644
index 0000000..6394afc
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/vala/vala_0.30.1.bb
@@ -0,0 +1,8 @@
+require ${BPN}.inc
+
+SRC_URI += " file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.patch \
+             file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
+"
+
+SRC_URI[md5sum] = "cc2eb2384fc10038b643753d734a5a51"
+SRC_URI[sha256sum] = "23add78e5c6a5e6df019d4a885c9c79814c9e0b957519ec8a4f4d826c4e5df2c"
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch
new file mode 100644
index 0000000..a78e195
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch
@@ -0,0 +1,51 @@
+From 9762fd23e1f1db66d4b977c694a17d3bca3fe99a Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 8 Jan 2016 16:36:29 +0200
+Subject: [PATCH] Remove tests that fail to build on some PPC32 configurations
+
+Failures are documented here:
+http://errors.yoctoproject.org/Errors/Search/?items=10&query=862d702fbb99e484631315aa44b9e46f8fc567da&filter=valgrind&type=recipe
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+Upstream-Status: Pending
+---
+ memcheck/tests/ppc32/Makefile.am | 2 +-
+ none/tests/ppc32/Makefile.am     | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/memcheck/tests/ppc32/Makefile.am b/memcheck/tests/ppc32/Makefile.am
+index 26b95a2..8f05743 100644
+--- a/memcheck/tests/ppc32/Makefile.am
++++ b/memcheck/tests/ppc32/Makefile.am
+@@ -10,7 +10,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
+ 	power_ISA2_07.stderr.exp power_ISA2_07.vgtest
+ 
+ check_PROGRAMS = \
+-	power_ISA2_05 power_ISA2_07
++	power_ISA2_07
+ 
+ power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \
+ 		-I$(top_srcdir)/include @FLAG_M32@
+diff --git a/none/tests/ppc32/Makefile.am b/none/tests/ppc32/Makefile.am
+index 196239e..0fe3425 100644
+--- a/none/tests/ppc32/Makefile.am
++++ b/none/tests/ppc32/Makefile.am
+@@ -50,13 +50,13 @@ EXTRA_DIST = \
+ 
+ check_PROGRAMS = \
+ 	allexec \
+-	lsw jm-insns round \
++	lsw \
+ 	test_isa_2_06_part1 test_isa_2_06_part2 test_isa_2_06_part3 \
+ 	test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 \
+ 	test_isa_2_07_part1 test_isa_2_07_part2 \
+ 	test_tm test_touch_tm ldst_multiple data-cache-instructions \
+ 	test_fx test_gx \
+-	testVMX twi tw xlc_dbl_u32 power5+_round power6_bcmp \
++	twi tw xlc_dbl_u32 power6_bcmp \
+ 	bug129390-ppc32 bug139050-ppc32 \
+ 	ldstrev mftocrf mcrfs
+ 
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch
new file mode 100644
index 0000000..dc6feff
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-fix-build-for-musl-targets.patch
@@ -0,0 +1,69 @@
+From 1b1a024efd18d44294e184e792c1e039cab02bfe Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 14 Feb 2016 09:14:12 +0000
+Subject: [PATCH] fix build for musl targets
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac             | 2 --
+ coregrind/vg_preloaded.c | 2 +-
+ include/pub_tool_redir.h | 7 +++++--
+ 3 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9366dc7..679f514 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1066,8 +1066,6 @@ case "${GLIBC_VERSION}" in
+ 	;;
+      2.0|2.1|*)
+ 	AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
+-	AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later,])
+-	AC_MSG_ERROR([Darwin libc, Bionic libc or Solaris libc])
+ 	;;
+ esac
+ 
+diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c
+index 2ea7a7a..e49c832 100644
+--- a/coregrind/vg_preloaded.c
++++ b/coregrind/vg_preloaded.c
+@@ -56,7 +56,7 @@
+ void VG_NOTIFY_ON_LOAD(freeres)( void );
+ void VG_NOTIFY_ON_LOAD(freeres)( void )
+ {
+-#  if !defined(__UCLIBC__) \
++#  if !defined(__UCLIBC__) && defined(__GLIBC__) \
+       && !defined(VGPV_arm_linux_android) \
+       && !defined(VGPV_x86_linux_android) \
+       && !defined(VGPV_mips32_linux_android) \
+diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h
+index bac00d7..fbb2ef2 100644
+--- a/include/pub_tool_redir.h
++++ b/include/pub_tool_redir.h
+@@ -242,8 +242,7 @@
+ /* --- Soname of the standard C library. --- */
+ 
+ #if defined(VGO_linux) || defined(VGO_solaris)
+-#  define  VG_Z_LIBC_SONAME  libcZdsoZa              // libc.so*
+-
++#  define  VG_Z_LIBC_SONAME  libcZdZa                // libc.*
+ #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6)
+ #  define  VG_Z_LIBC_SONAME  libSystemZdZaZddylib    // libSystem.*.dylib
+ 
+@@ -274,7 +273,11 @@
+ /* --- Soname of the pthreads library. --- */
+ 
+ #if defined(VGO_linux)
++# if defined(__GLIBC__) || defined(__UCLIBC__)
+ #  define  VG_Z_LIBPTHREAD_SONAME  libpthreadZdsoZd0     // libpthread.so.0
++# else
++#  define  VG_Z_LIBPTHREAD_SONAME  libcZdZa              // libc.*
++#endif
+ #elif defined(VGO_darwin)
+ #  define  VG_Z_LIBPTHREAD_SONAME  libSystemZdZaZddylib  // libSystem.*.dylib
+ #elif defined(VGO_solaris)
+-- 
+2.7.1
+
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch
deleted file mode 100644
index 56bb5f5..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 1a8006f56342dae9f7100a3c33d80873676e0404 Mon Sep 17 00:00:00 2001
-From: Li Zhou <li.zhou@windriver.com>
-Date: Mon, 24 Aug 2015 03:55:18 -0400
-Subject: [PATCH] valgrind: Enable rt_sigpending syscall on ppc64 linux
-
-New Revision: 15133
-Enable rt_sigpending syscall on ppc64 linux.
-Patch from Thomas Huth <thuth@redhat.com>
-
-Get the patch from valgrind upstream:
-http://valgrind.10908.n7.nabble.com/Valgrind-r15133-in-trunk-NEWS-coregrind-m-syswrap-syswrap-ppc64-linux-c-td54589.html
-
-Upstream-Status: backport
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- coregrind/m_syswrap/syswrap-ppc64-linux.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/coregrind/m_syswrap/syswrap-ppc64-linux.c b/coregrind/m_syswrap/syswrap-ppc64-linux.c
-index 5946ee1..8aaa1d7 100644
---- a/coregrind/m_syswrap/syswrap-ppc64-linux.c
-+++ b/coregrind/m_syswrap/syswrap-ppc64-linux.c
-@@ -887,7 +887,7 @@ static SyscallTableEntry syscall_table[] = {
-    LINXY(__NR_rt_sigaction,      sys_rt_sigaction),       // 173
-    LINXY(__NR_rt_sigprocmask,    sys_rt_sigprocmask),     // 174
- 
--// _____(__NR_rt_sigpending,     sys_rt_sigpending),      // 175
-+   LINXY(__NR_rt_sigpending,     sys_rt_sigpending),      // 175
-    LINXY(__NR_rt_sigtimedwait,   sys_rt_sigtimedwait),    // 176
-    LINXY(__NR_rt_sigqueueinfo,   sys_rt_sigqueueinfo),    // 177
-    LINX_(__NR_rt_sigsuspend,     sys_rt_sigsuspend),      // 178
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
new file mode 100644
index 0000000..e9112da
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch
@@ -0,0 +1,35 @@
+From f96cf1f4eaa72860ab8b5e18ad10fdc704d78c5f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 15 Dec 2015 15:01:34 +0200
+Subject: [PATCH 2/5] remove rpath
+
+Upstream-Status: Inappropriate [embedded config]
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ none/tests/Makefile.am | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am
+index 54f2a7e..25b0f49 100644
+--- a/none/tests/Makefile.am
++++ b/none/tests/Makefile.am
+@@ -326,7 +326,6 @@ threadederrno_CFLAGS	+= --std=c99
+ endif
+ tls_SOURCES		= tls.c tls2.c
+ tls_DEPENDENCIES	= tls.so tls2.so
+-tls_LDFLAGS		= -Wl,-rpath,$(abs_top_builddir)/none/tests
+ tls_LDADD		= tls.so tls2.so -lpthread
+ tls_so_SOURCES		= tls_so.c
+ tls_so_DEPENDENCIES	= tls2.so
+@@ -334,7 +333,7 @@ if VGCONF_OS_IS_DARWIN
+  tls_so_LDFLAGS		= -dynamic -dynamiclib -all_load -fpic
+  tls_so_LDADD		= `pwd`/tls2.so
+ else
+- tls_so_LDFLAGS		= -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
++ tls_so_LDFLAGS		= -shared -fPIC
+  tls_so_LDADD		= tls2.so
+ endif
+ tls_so_CFLAGS		= $(AM_CFLAGS) -fPIC
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
new file mode 100644
index 0000000..ed313d6
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch
@@ -0,0 +1,175 @@
+From 38ae233b6893a4eec7f9ed6d8ad02392bca8eaed Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 15 Dec 2015 15:31:50 +0200
+Subject: [PATCH 1/2] Fix out of tree builds.
+
+The paths to these files need to be fully specified in
+the out of tree build case. glibc-2.X.supp is a generated file so the full path
+is deliberately not specified in that case.
+
+RP 2013/03/23
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ configure.ac | 64 ++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 32 insertions(+), 32 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 8ab7f9b..9366dc7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -377,44 +377,44 @@ case "${host_os}" in
+ 	     9.*)
+ 		  AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard])
+ 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version])
+-		  DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}"
+-		  DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}"
+ 		  ;;
+ 	     10.*)
+ 		  AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard])
+ 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_6, [Darwin / Mac OS X version])
+-		  DEFAULT_SUPP="darwin10.supp ${DEFAULT_SUPP}"
+-		  DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
+ 		  ;;
+ 	     11.*)
+ 		  AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion])
+ 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_7, [Darwin / Mac OS X version])
+-		  DEFAULT_SUPP="darwin11.supp ${DEFAULT_SUPP}"
+-		  DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
+ 		  ;;
+ 	     12.*)
+ 		  AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion])
+ 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_8, [Darwin / Mac OS X version])
+-		  DEFAULT_SUPP="darwin12.supp ${DEFAULT_SUPP}"
+-		  DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
+ 		  ;;
+ 	     13.*)
+ 		  AC_MSG_RESULT([Darwin 13.x (${kernel}) / Mac OS X 10.9 Mavericks])
+ 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_9, [Darwin / Mac OS X version])
+-		  DEFAULT_SUPP="darwin13.supp ${DEFAULT_SUPP}"
+-		  DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin13.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
+ 		  ;;
+ 	     14.*)
+ 		  AC_MSG_RESULT([Darwin 14.x (${kernel}) / Mac OS X 10.10 Yosemite])
+ 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_10, [Darwin / Mac OS X version])
+-		  DEFAULT_SUPP="darwin14.supp ${DEFAULT_SUPP}"
+-		  DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin14.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
+ 		  ;;
+ 	     15.*)
+ 		  AC_MSG_RESULT([Darwin 15.x (${kernel}) / Mac OS X 10.11 El Capitan])
+ 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_11, [Darwin / Mac OS X version])
+-		  DEFAULT_SUPP="darwin15.supp ${DEFAULT_SUPP}"
+-		  DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}"
++		  DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
+ 		  ;;
+              *) 
+ 		  AC_MSG_RESULT([unsupported (${kernel})])
+@@ -426,13 +426,13 @@ case "${host_os}" in
+      solaris2.11*)
+         AC_MSG_RESULT([ok (${host_os})])
+         VGCONF_OS="solaris"
+-        DEFAULT_SUPP="solaris11.supp ${DEFAULT_SUPP}"
++        DEFAULT_SUPP="$srcdir/solaris11.supp ${DEFAULT_SUPP}"
+         ;;
+ 
+      solaris2.12*)
+         AC_MSG_RESULT([ok (${host_os})])
+         VGCONF_OS="solaris"
+-        DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}"
++        DEFAULT_SUPP="$srcdir/solaris12.supp ${DEFAULT_SUPP}"
+         ;;
+ 
+      *) 
+@@ -1015,29 +1015,29 @@ AC_MSG_CHECKING([the glibc version])
+ case "${GLIBC_VERSION}" in
+      2.2)
+ 	AC_MSG_RESULT(${GLIBC_VERSION} family)
+-	DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}"
+-	DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
+-	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.2.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ 	;;
+      2.[[3-6]])
+ 	AC_MSG_RESULT(${GLIBC_VERSION} family)
+-	DEFAULT_SUPP="glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}"
+-	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+-	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ 	;;
+      2.[[7-9]])
+ 	AC_MSG_RESULT(${GLIBC_VERSION} family)
+ 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+-	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+-	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ 	;;
+      2.10|2.11)
+ 	AC_MSG_RESULT(${GLIBC_VERSION} family)
+ 	AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1,
+ 		  [Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)])
+ 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+-	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+-	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ 	;;
+      2.*)
+ 	AC_MSG_RESULT(${GLIBC_VERSION} family)
+@@ -1046,8 +1046,8 @@ case "${GLIBC_VERSION}" in
+ 	AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1,
+ 		  [Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)])
+ 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
+-	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+-	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ 	;;
+      darwin)
+ 	AC_MSG_RESULT(Darwin)
+@@ -1057,7 +1057,7 @@ case "${GLIBC_VERSION}" in
+      bionic)
+ 	AC_MSG_RESULT(Bionic)
+ 	AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic])
+-	DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}"
++	DEFAULT_SUPP="$srcdir/bionic.supp ${DEFAULT_SUPP}"
+ 	;;
+      solaris)
+ 	AC_MSG_RESULT(Solaris)
+@@ -1079,11 +1079,11 @@ if test "$VGCONF_OS" != "solaris"; then
+     # attempt to detect whether such libraries are installed on the
+     # build machine (or even if any X facilities are present); just
+     # add the suppressions antidisirregardless.
+-    DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}"
+-    DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}"
++    DEFAULT_SUPP="$srcdir/xfree-4.supp ${DEFAULT_SUPP}"
++    DEFAULT_SUPP="$srcdir/xfree-3.supp ${DEFAULT_SUPP}"
+ 
+     # Add glibc and X11 suppressions for exp-sgcheck
+-    DEFAULT_SUPP="exp-sgcheck.supp ${DEFAULT_SUPP}"
++    DEFAULT_SUPP="$srcdir/exp-sgcheck.supp ${DEFAULT_SUPP}"
+ fi
+ 
+ 
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
new file mode 100644
index 0000000..f5ac989
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch
@@ -0,0 +1,252 @@
+From f49f27f1bc67d07440b0ac9a7d767a8ea1589bfe Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 15 Dec 2015 15:50:44 +0200
+Subject: [PATCH 5/5] Modify vg_test wrapper to support PTEST formats
+
+Change the valgrind regression test script vg_regtest to
+support the yocto ptest stdout reporting format.  The commit adds
+'--yocto-ptest' as an optional argument to vg_regtest, which alters
+the output to use the ptest infrastructure reporting format:
+    "[PASS|SKIP|FAIL]: testname"
+instead of valgrind's internal test reporting format.  Without the added
+option, --yocto-ptest, the valgrind regression test output is unchanged.
+
+Enforce 30 seconds limit for the test.
+This resume execution of the remaining tests when valgrind hangs.
+
+Upstream-Status: Pending
+
+Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ tests/vg_regtest.in | 75 +++++++++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 55 insertions(+), 20 deletions(-)
+
+diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
+index a441f42..cb05b52 100755
+--- a/tests/vg_regtest.in
++++ b/tests/vg_regtest.in
+@@ -47,6 +47,7 @@
+ #   --loop-till-fail: loops on the test(s) till one fail, then exit
+ #              This is useful to obtain detailed trace or --keep-unfiltered
+ #              output of a non deterministic test failure
++#   --yocto-ptest: output in yocto ptest format
+ #
+ # The easiest way is to run all tests in valgrind/ with (assuming you installed
+ # in $PREFIX):
+@@ -139,7 +140,7 @@ my $usage="\n"
+      . "Usage:\n"
+      . "   vg_regtest [--all, --valgrind, --valgrind-lib, --keep-unfiltered\n"
+      . "                 --outer-valgrind, --outer-tool, --outer-args\n"
+-     . "                 --loop-till-fail]\n"
++     . "                 --loop-till-fail, --yocto-ptest]\n"
+      . "   Use EXTRA_REGTEST_OPTS to supply extra args for all tests\n"
+      . "\n";
+ 
+@@ -186,6 +187,7 @@ my $outer_args;
+ my $valgrind_lib = "$tests_dir/.in_place";
+ my $keepunfiltered = 0;
+ my $looptillfail = 0;
++my $yoctoptest = 0;
+ 
+ # default filter is the one named "filter_stderr" in the test's directory
+ my $default_stderr_filter = "filter_stderr";
+@@ -244,6 +246,8 @@ sub process_command_line()
+                 $keepunfiltered = 1;
+             } elsif ($arg =~ /^--loop-till-fail$/) {
+                 $looptillfail = 1;
++            } elsif ($arg =~ /^--yocto-ptest$/) {
++                $yoctoptest = 1;
+             } else {
+                 die $usage;
+             }
+@@ -365,13 +369,28 @@ sub read_vgtest_file($)
+ #----------------------------------------------------------------------------
+ # Since most of the program time is spent in system() calls, need this to
+ # propagate a Ctrl-C enabling us to quit.
+-sub mysystem($) 
++# Enforce 30 seconds limit for the test.
++# This resume execution of the remaining tests if valgrind hangs.
++sub mysystem($)
+ {
+-    my $exit_code = system($_[0]);
+-    ($exit_code == 2) and exit 1;      # 2 is SIGINT
+-    return $exit_code;
++    my $exit_code=0;
++    eval {
++        local $SIG{'ALRM'} = sub { die "timed out\n" };
++        alarm(30);
++        $exit_code = system($_[0]);
++        alarm (0);
++        ($exit_code == 2) and die "SIGINT\n";   # 2 is SIGINT
++    };
++    if ($@) {
++        if ($@ eq "timed out\n") {
++            print "timed out\n";
++            return 1;
++        }
++        if ($@ eq "SIGINT\n") {
++            exit 1;
++        }
++    }
+ }
+-
+ # if $keepunfiltered, copies $1 to $1.unfiltered.out
+ # renames $0 tp $1
+ sub filtered_rename($$) 
+@@ -419,23 +438,25 @@ sub do_diffs($$$$)
+                 # A match;  remove .out and any previously created .diff files.
+                 unlink("$name.$mid.out");
+                 unlink(<$name.$mid.diff*>);
+-                return;
++                return 1;
+             }
+         }
+     }
+     # If we reach here, none of the .exp files matched.
+-    print "*** $name failed ($mid) ***\n";
++    print "*** $name failed ($mid) ***\n" if ($yoctoptest == 0) ;
+     push(@failures, sprintf("%-40s ($mid)", "$fullname"));
+     $num_failures{$mid}++;
+     if ($looptillfail == 1) {
+        print "Failure encountered, stopping to loop\n";
+        exit 1
+     }
++    return 0;
+ }
+ 
+ sub do_one_test($$) 
+ {
+     my ($dir, $vgtest) = @_;
++    my $diffStatus = 0;
+     $vgtest =~ /^(.*)\.vgtest/;
+     my $name = $1;
+     my $fullname = "$dir/$name"; 
+@@ -454,7 +475,11 @@ sub do_one_test($$)
+         } elsif (256 == $prereq_res) {
+             # Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256...
+             # Prereq failed, skip.
+-            printf("%-16s (skipping, prereq failed: $prereq)\n", "$name:");
++            if ($yoctoptest == 0) {
++                printf("%-16s (skipping, prereq failed: $prereq)\n", "$name:");
++            } else {
++                printf("SKIP: $fullname\n");
++            }
+             return;
+         } else {
+             # Bad prereq; abort.
+@@ -472,7 +497,7 @@ sub do_one_test($$)
+         }
+         # If there is a progB, let's start it in background:
+         printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n",
+-               "$name:");
++               "$name:") if ($yoctoptest == 0);
+         # progB.done used to detect child has finished. See below.
+         # Note: redirection of stdout and stderr is before $progB to allow argsB
+         # to e.g. redirect stdoutB to stderrB
+@@ -488,7 +513,8 @@ sub do_one_test($$)
+                      . "touch progB.done)  &");
+         }
+     } else {
+-        printf("%-16s valgrind $extraopts $vgopts $prog $args\n", "$name:");
++        printf("%-16s valgrind $extraopts $vgopts $prog $args\n", "$name:")
++            if ($yoctoptest == 0);
+     }
+ 
+     # Collect environment variables, if any.
+@@ -529,7 +555,7 @@ sub do_one_test($$)
+     # Find all the .stdout.exp files.  If none, use /dev/null.
+     my @stdout_exps = <$name.stdout.exp*>;
+     @stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps);
+-    do_diffs($fullname, $name, "stdout", \@stdout_exps); 
++    $diffStatus |= do_diffs($fullname, $name, "stdout", \@stdout_exps);
+ 
+     # Filter stderr
+     $stderr_filter_args = $name if (! defined $stderr_filter_args);
+@@ -538,7 +564,7 @@ sub do_one_test($$)
+     # Find all the .stderr.exp files.  At least one must exist.
+     my @stderr_exps = <$name.stderr.exp*>;
+     (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n";
+-    do_diffs($fullname, $name, "stderr", \@stderr_exps); 
++    $diffStatus |= do_diffs($fullname, $name, "stderr", \@stderr_exps);
+ 
+     if (defined $progB) {
+         # wait for the child to be finished
+@@ -562,7 +588,7 @@ sub do_one_test($$)
+         # Find all the .stdoutB.exp files.  If none, use /dev/null.
+         my @stdoutB_exps = <$name.stdoutB.exp*>;
+         @stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps);
+-        do_diffs($fullname, $name, "stdoutB", \@stdoutB_exps); 
++        $diffStatus |= do_diffs($fullname, $name, "stdoutB", \@stdoutB_exps);
+         
+         # Filter stderr
+         $stderrB_filter_args = $name if (! defined $stderrB_filter_args);
+@@ -571,7 +597,7 @@ sub do_one_test($$)
+         # Find all the .stderrB.exp files.  At least one must exist.
+         my @stderrB_exps = <$name.stderrB.exp*>;
+         (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n";
+-        do_diffs($fullname, $name, "stderrB", \@stderrB_exps); 
++        $diffStatus |= do_diffs($fullname, $name, "stderrB", \@stderrB_exps);
+     }
+ 
+     # Maybe do post-test check
+@@ -583,7 +609,7 @@ sub do_one_test($$)
+ 	    # Find all the .post.exp files.  If none, use /dev/null.
+ 	    my @post_exps = <$name.post.exp*>;
+ 	    @post_exps = ( "/dev/null" ) if (0 == scalar @post_exps);
+-	    do_diffs($fullname, $name, "post", \@post_exps);
++	    $diffStatus |= do_diffs($fullname, $name, "post", \@post_exps);
+ 	}
+     }
+  
+@@ -592,6 +618,13 @@ sub do_one_test($$)
+             print("(cleanup operation failed: $cleanup)\n");
+     }
+ 
++    if ($yoctoptest == 1) {
++        if ($diffStatus == 0) {
++            print("PASS: $fullname\n");
++        } else {
++            print("FAIL: $fullname\n");
++        }
++    }
+     $num_tests_done++;
+ }
+ 
+@@ -631,7 +664,7 @@ sub test_one_dir($$)
+     my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs));
+ 
+     if ($found_tests) {
+-        print "-- Running  tests in $full_dir $dashes\n";
++        print "-- Running  tests in $full_dir $dashes\n" if ($yoctoptest == 0);
+     }
+     foreach my $f (@fs) {
+         if (-d $f) {
+@@ -641,7 +674,7 @@ sub test_one_dir($$)
+         }
+     }
+     if ($found_tests) {
+-        print "-- Finished tests in $full_dir $dashes\n";
++        print "-- Finished tests in $full_dir $dashes\n" if ($yoctoptest == 0);
+     }
+ 
+     chdir("..");
+@@ -667,10 +700,12 @@ sub summarise_results
+            $num_failures{"stdout"},   plural($num_failures{"stdout"}),
+            $num_failures{"stderrB"},  plural($num_failures{"stderrB"}),
+            $num_failures{"stdoutB"},  plural($num_failures{"stdoutB"}),
+-           $num_failures{"post"},     plural($num_failures{"post"}));
++           $num_failures{"post"},     plural($num_failures{"post"}))
++               if ($yoctoptest == 0);
+ 
+     foreach my $failure (@failures) {
+-        print "$failure\n";
++        print "$failure\n"
++           if ($yoctoptest == 0);
+     }
+     print "\n";
+ }
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch
new file mode 100644
index 0000000..ecb33b8
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/11_mips-link-tool.patch
@@ -0,0 +1,37 @@
+Debian fix for MIPS: mmap(0x400000, 32768) failed in UME with error 22 (Invalid argument)
+
+  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777704
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+
+
+Description: Disable the MIPS linker workarounds when using -Ttext-section
+Origin: vendor
+Bug-Debian: http://bugs.debian.org/777704
+Author: James Cowgill <james410@cowgill.org.uk>
+Last-Update: 2015-04-25
+
+--- a/coregrind/link_tool_exe_linux.in
++++ b/coregrind/link_tool_exe_linux.in
+@@ -76,12 +76,13 @@
+ my $arch = substr($x, 0, index($x, "'"));
+ 
+ my $extra_args;
+-if (($arch eq 'mips') || ($arch eq 'mipsel')
+-    || ($arch eq 'mipsisa32r2el')) {
+-   $extra_args = "-static -Wl,--section-start=.reginfo=$ala";
+-} elsif (($arch eq 'mips64') || ($arch eq 'mips64el') ||
+-         ($arch eq 'mipsisa64el')) {
+-   $extra_args = "-static -Wl,--section-start=.MIPS.options=$ala";
++if ($arch =~ /^mips/ && "@FLAG_T_TEXT@" eq '-Ttext') {
++   # We only need to use the special mips options when using -Ttext
++   if ($arch =~ /^mips(64|isa64)/) {
++      $extra_args = "-static -Wl,--section-start=.MIPS.options=$ala";
++   } else {
++      $extra_args = "-static -Wl,--section-start=.reginfo=$ala";
++   }
+ } else {
+    $extra_args = "-static -Wl,@FLAG_T_TEXT@=$ala";
+ }
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch
deleted file mode 100644
index 225f843..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/add-ptest.patch
+++ /dev/null
@@ -1,243 +0,0 @@
-Modify vg_test wrapper to support PTEST formats
-
-Change the valgrind regression test script vg_regtest to
-support the yocto ptest stdout reporting format.  The commit adds
-'--yocto-ptest' as an optional argument to vg_regtest, which alters
-the output to use the ptest infrastructure reporting format:
-    "[PASS|SKIP|FAIL]: testname"
-instead of valgrind's internal test reporting format.  Without the added
-option, --yocto-ptest, the valgrind regression test output is unchanged.
-
-Enforce 30 seconds limit for the test.
-This resume execution of the remaining tests when valgrind hangs.
-
-Upstream-Status: Pending
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-
-diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in
-index 224385f..3e0383b 100755
---- a/tests/vg_regtest.in
-+++ b/tests/vg_regtest.in
-@@ -39,11 +39,11 @@
- #               --valgrind.)
- #   --keep-unfiltered: keep a copy of the unfiltered output/error output
- #     of each test by adding an extension .unfiltered.out
--#
- #   --outer-valgrind: run this valgrind under the given outer valgrind.
- #     This valgrind must be configured with --enable-inner.
- #   --outer-tool: tool to use by the outer valgrind (default memcheck).
- #   --outer-args: use this as outer tool args.
-+#   --yocto-ptest: output in yocto ptest format
- #
- # The easiest way is to run all tests in valgrind/ with (assuming you installed
- # in $PREFIX):
-@@ -126,7 +126,7 @@ use strict;
- my $usage="\n"
-      . "Usage:\n"
-      . "   vg_regtest [--all, --valgrind, --valgrind-lib, --keep-unfiltered\n"
--     . "                 --outer-valgrind, --outer-tool, --outer-args]\n"
-+     . "                 --outer-valgrind, --outer-tool, --outer-args, --yocto-ptest]\n"
-      . "   Use EXTRA_REGTEST_OPTS to supply extra args for all tests\n"
-      . "\n";
- 
-@@ -170,6 +170,7 @@ my $outer_args;
- 
- my $valgrind_lib = "$tests_dir/.in_place";
- my $keepunfiltered = 0;
-+my $yoctoptest = 0;
- 
- # default filter is the one named "filter_stderr" in the test's directory
- my $default_stderr_filter = "filter_stderr";
-@@ -226,6 +227,8 @@ sub process_command_line()
-                 $valgrind_lib = $1;
-             } elsif ($arg =~ /^--keep-unfiltered$/) {
-                 $keepunfiltered = 1;
-+            } elsif ($arg =~ /^--yocto-ptest$/) {
-+                $yoctoptest = 1;
-             } else {
-                 die $usage;
-             }
-@@ -340,13 +343,28 @@ sub read_vgtest_file($)
- #----------------------------------------------------------------------------
- # Since most of the program time is spent in system() calls, need this to
- # propagate a Ctrl-C enabling us to quit.
--sub mysystem($) 
-+# Enforce 30 seconds limit for the test.
-+# This resume execution of the remaining tests if valgrind hangs.
-+sub mysystem($)
- {
--    my $exit_code = system($_[0]);
--    ($exit_code == 2) and exit 1;      # 2 is SIGINT
--    return $exit_code;
-+    my $exit_code=0;
-+    eval {
-+        local $SIG{'ALRM'} = sub { die "timed out\n" };
-+        alarm(30);
-+        $exit_code = system($_[0]);
-+        alarm (0);
-+        ($exit_code == 2) and die "SIGINT\n";   # 2 is SIGINT
-+    };
-+    if ($@) {
-+        if ($@ eq "timed out\n") {
-+            print "timed out\n";
-+            return 1;
-+        }
-+        if ($@ eq "SIGINT\n") {
-+            exit 1;
-+        }
-+    }
- }
--
- # if $keepunfiltered, copies $1 to $1.unfiltered.out
- # renames $0 tp $1
- sub filtered_rename($$) 
-@@ -394,19 +412,21 @@ sub do_diffs($$$$)
-                 # A match;  remove .out and any previously created .diff files.
-                 unlink("$name.$mid.out");
-                 unlink(<$name.$mid.diff*>);
--                return;
-+                return 0;
-             }
-         }
-     }
-     # If we reach here, none of the .exp files matched.
--    print "*** $name failed ($mid) ***\n";
-+    print "*** $name failed ($mid) ***\n" if ($yoctoptest == 0) ;
-     push(@failures, sprintf("%-40s ($mid)", "$fullname"));
-     $num_failures{$mid}++;
-+    return 1;
- }
- 
- sub do_one_test($$) 
- {
-     my ($dir, $vgtest) = @_;
-+    my $diffStatus = 0;
-     $vgtest =~ /^(.*)\.vgtest/;
-     my $name = $1;
-     my $fullname = "$dir/$name"; 
-@@ -425,7 +445,11 @@ sub do_one_test($$)
-         } elsif (256 == $prereq_res) {
-             # Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256...
-             # Prereq failed, skip.
--            printf("%-16s (skipping, prereq failed: $prereq)\n", "$name:");
-+            if ($yoctoptest == 0) {
-+                printf("%-16s (skipping, prereq failed: $prereq)\n", "$name:");
-+            } else {
-+                printf("SKIP: $fullname\n");
-+            }
-             return;
-         } else {
-             # Bad prereq; abort.
-@@ -438,7 +462,7 @@ sub do_one_test($$)
-     if (defined $progB) {
-         # If there is a progB, let's start it in background:
-         printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n",
--               "$name:");
-+               "$name:") if ($yoctoptest == 0);
-         # progB.done used to detect child has finished. See below.
-         # Note: redirection of stdout and stderr is before $progB to allow argsB
-         # to e.g. redirect stdoutB to stderrB
-@@ -452,7 +476,8 @@ sub do_one_test($$)
-                      . "touch progB.done)  &");
-         }
-     } else {
--        printf("%-16s valgrind $extraopts $vgopts $prog $args\n", "$name:");
-+        printf("%-16s valgrind $extraopts $vgopts $prog $args\n", "$name:")
-+            if ($yoctoptest == 0);
-     }
-  
-     # Pass the appropriate --tool option for the directory (can be overridden
-@@ -487,7 +512,7 @@ sub do_one_test($$)
-     # Find all the .stdout.exp files.  If none, use /dev/null.
-     my @stdout_exps = <$name.stdout.exp*>;
-     @stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps);
--    do_diffs($fullname, $name, "stdout", \@stdout_exps); 
-+    $diffStatus |= do_diffs($fullname, $name, "stdout", \@stdout_exps);
- 
-     # Filter stderr
-     $stderr_filter_args = $name if (! defined $stderr_filter_args);
-@@ -496,7 +521,7 @@ sub do_one_test($$)
-     # Find all the .stderr.exp files.  At least one must exist.
-     my @stderr_exps = <$name.stderr.exp*>;
-     (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n";
--    do_diffs($fullname, $name, "stderr", \@stderr_exps); 
-+    $diffStatus |= do_diffs($fullname, $name, "stderr", \@stderr_exps);
- 
-     if (defined $progB) {
-         # wait for the child to be finished
-@@ -520,7 +545,7 @@ sub do_one_test($$)
-         # Find all the .stdoutB.exp files.  If none, use /dev/null.
-         my @stdoutB_exps = <$name.stdoutB.exp*>;
-         @stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps);
--        do_diffs($fullname, $name, "stdoutB", \@stdoutB_exps); 
-+        $diffStatus |= do_diffs($fullname, $name, "stdoutB", \@stdoutB_exps);
-         
-         # Filter stderr
-         $stderrB_filter_args = $name if (! defined $stderrB_filter_args);
-@@ -529,7 +554,7 @@ sub do_one_test($$)
-         # Find all the .stderrB.exp files.  At least one must exist.
-         my @stderrB_exps = <$name.stderrB.exp*>;
-         (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n";
--        do_diffs($fullname, $name, "stderrB", \@stderrB_exps); 
-+        $diffStatus |= do_diffs($fullname, $name, "stderrB", \@stderrB_exps);
-     }
- 
-     # Maybe do post-test check
-@@ -541,7 +566,7 @@ sub do_one_test($$)
- 	    # Find all the .post.exp files.  If none, use /dev/null.
- 	    my @post_exps = <$name.post.exp*>;
- 	    @post_exps = ( "/dev/null" ) if (0 == scalar @post_exps);
--	    do_diffs($fullname, $name, "post", \@post_exps);
-+	    $diffStatus |= do_diffs($fullname, $name, "post", \@post_exps);
- 	}
-     }
-  
-@@ -550,6 +575,13 @@ sub do_one_test($$)
-             print("(cleanup operation failed: $cleanup)\n");
-     }
- 
-+    if ($yoctoptest == 1) {
-+        if ($diffStatus == 0) {
-+            print("PASS: $fullname\n");
-+        } else {
-+            print("FAIL: $fullname\n");
-+        }
-+    }
-     $num_tests_done++;
- }
- 
-@@ -589,7 +621,7 @@ sub test_one_dir($$)
-     my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs));
- 
-     if ($found_tests) {
--        print "-- Running  tests in $full_dir $dashes\n";
-+        print "-- Running  tests in $full_dir $dashes\n" if ($yoctoptest == 0);
-     }
-     foreach my $f (@fs) {
-         if (-d $f) {
-@@ -599,7 +631,7 @@ sub test_one_dir($$)
-         }
-     }
-     if ($found_tests) {
--        print "-- Finished tests in $full_dir $dashes\n";
-+        print "-- Finished tests in $full_dir $dashes\n" if ($yoctoptest == 0);
-     }
- 
-     chdir("..");
-@@ -625,10 +657,12 @@ sub summarise_results
-            $num_failures{"stdout"},   plural($num_failures{"stdout"}),
-            $num_failures{"stderrB"},  plural($num_failures{"stderrB"}),
-            $num_failures{"stdoutB"},  plural($num_failures{"stdoutB"}),
--           $num_failures{"post"},     plural($num_failures{"post"}));
-+           $num_failures{"post"},     plural($num_failures{"post"}))
-+               if ($yoctoptest == 0);
- 
-     foreach my $failure (@failures) {
--        print "$failure\n";
-+        print "$failure\n"
-+           if ($yoctoptest == 0);
-     }
-     print "\n";
- }
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch
new file mode 100644
index 0000000..5fcfec0
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch
@@ -0,0 +1,33 @@
+From 8facc29c3c56e6cf9cfef70986cf73876044a3fb Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 19 Jan 2016 16:42:36 -0800
+Subject: [PATCH] avoid neon for targets which don't support it
+
+The sh-mem-random.c test app tries to use neon loads and stores to
+test 64-bit float copies when building for ARM. Allow it to do so if
+possible, but fallback to C when building for ARM targets which don't
+support neon.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ memcheck/tests/sh-mem-random.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/memcheck/tests/sh-mem-random.c b/memcheck/tests/sh-mem-random.c
+index ae82248..816e139 100644
+--- a/memcheck/tests/sh-mem-random.c
++++ b/memcheck/tests/sh-mem-random.c
+@@ -191,7 +191,7 @@ void do_test_at ( U1* arr )
+                "emms"
+                : : "r"(arr+dst), "r"(arr+src) : "memory"
+             );
+-#elif defined(__linux__) && defined(__arm__) && !defined(__aarch64__)
++#elif defined(__linux__) && defined(__arm__) && defined(__ARM_NEON__) && !defined(__aarch64__)
+             /* On arm32, many compilers generate a 64-bit float move
+                using two 32 bit integer registers, which completely
+                defeats this test.  Hence force a 64-bit NEON load and
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch
deleted file mode 100644
index 300f2f1..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/enable.building.on.4.x.kernel.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Enable building valgrind on host with 4.x kernel.
-
-For OpenEmbedded builds we should be checking something like
-OLDEST_KERNEL instead of `uname -r`, but this is good enough for now.
-
-Building on 4.x* currently fails with:
-  configure:5556: checking for the kernel version
-  configure:5579: result: unsupported (4.0.0-rc3-00111-gaffb817)
-  configure:5581: error: Valgrind works on kernels 2.4, 2.6
-
-Upstream-Status: Pending
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
---- valgrind-3.9.0/configure.ac.orig	2015-03-13 19:17:01.247310868 +0100
-+++ valgrind-3.9.0/configure.ac	2015-03-13 19:19:27.388316108 +0100
-@@ -276,9 +276,9 @@
-         kernel=`uname -r`
- 
-         case "${kernel}" in
--             2.6.*|3.*) 
--        	    AC_MSG_RESULT([2.6.x/3.x family (${kernel})])
--        	    AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x])
-+             2.6.*|3.*|4.*) 
-+        	    AC_MSG_RESULT([2.6.x/3.x/4.x family (${kernel})])
-+        	    AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x or Linux 4.x])
-         	    ;;
- 
-              2.4.*) 
-@@ -288,7 +288,7 @@
- 
-              *) 
-         	    AC_MSG_RESULT([unsupported (${kernel})])
--        	    AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6])
-+        	    AC_MSG_ERROR([Valgrind works on kernels 2.4, 2.6, 3.x, 4.x])
-         	    ;;
-         esac
- 
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/force-nostabs.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/force-nostabs.patch
deleted file mode 100644
index 849dfc5..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/force-nostabs.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Suppress building ptest apps with the -gstabs option
-
-Force the configure tests for -gstabs compiler support to fail so that
-the regression tests don't try to build with the -gstabs option.
-Otherwise, the valgrind build when ptest is enabled fails with the
-error:
-    Stabs debuginfo not supported:
-    ../package/usr/lib/valgrind/ptest/memcheck/tests/deep_templates
-    ERROR: Function failed: split_and_strip_files
-
-Upstream-Status: Inappropriate [gstabs support is appropriate upstream,
-        but not for this distro]
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-
-diff --git a/configure.ac b/configure.ac
-index 755dfb9..cc8b5e1 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1743,22 +1743,7 @@ AM_CONDITIONAL(DWARF4, test x$ac_have_dwarf4 = xyes)
- CFLAGS=$safe_CFLAGS
- 
- 
--# does this compiler support -gstabs ?
--
--AC_MSG_CHECKING([if gcc accepts -gstabs])
--
--safe_CFLAGS=$CFLAGS
--CFLAGS="-gstabs"
--AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
--  return 0;
--]])], [
--ac_have_gstabs=yes
--AC_MSG_RESULT([yes])
--], [
- ac_have_gstabs=no
--AC_MSG_RESULT([no])
--])
--CFLAGS=$safe_CFLAGS
- AM_CONDITIONAL([HAVE_GSTABS], [test x$ac_have_gstabs = xyes])
- 
- 
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/glibc.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/glibc.patch
deleted file mode 100644
index 863499d..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/glibc.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Backport of glibc 2.19 and 2.20 and 2.21 support.
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-Index: valgrind-3.10.1/configure.ac
-===================================================================
---- valgrind-3.10.1.orig/configure.ac
-+++ valgrind-3.10.1/configure.ac
-@@ -1018,6 +1018,34 @@ case "${GLIBC_VERSION}" in
- 	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
- 	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-+     2.19)
-+	AC_MSG_RESULT(2.19 family)
-+	AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
-+	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	;;
-+     2.20)
-+	AC_MSG_RESULT(2.20 family)
-+	AC_DEFINE([GLIBC_2_20], 1, [Define to 1 if you're using glibc 2.20.x])
-+	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	;;
-+     2.21)
-+	AC_MSG_RESULT(2.21 family)
-+	AC_DEFINE([GLIBC_2_21], 1, [Define to 1 if you're using glibc 2.21.x])
-+	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	;;
-+     2.22)
-+	AC_MSG_RESULT(2.22 family)
-+	AC_DEFINE([GLIBC_2_22], 1, [Define to 1 if you're using glibc 2.22.x])
-+	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	;;
-      darwin)
- 	AC_MSG_RESULT(Darwin)
- 	AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch
deleted file mode 100644
index f8167cb..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/pass-maltivec-only-if-it-supported.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Upstream-Status: Backport
-
-r14566 | florian | 2014-09-24 17:02:54 -0500 (Wed, 24 Sep 2014) | 4 lines
-
-The testbuckets none/tests/ppc{32,64} did not build in case the
-toolchain did not support -maltivec -mabi=altivec.
-This should work now. Fixes BZ #338731
-
-Index: none/tests/ppc32/Makefile.am
-===================================================================
---- a/none/tests/ppc32/Makefile.am	(revision 14565)
-+++ b/none/tests/ppc32/Makefile.am	(revision 14566)
-@@ -72,8 +72,12 @@
- allexec_CFLAGS		= $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
- 
- if HAS_ALTIVEC
-+BUILD_FLAG_ALTIVEC = -maltivec
-+BUILD_FLAG_ABI_ALTIVEC = -mabi=altivec
- ALTIVEC_FLAG = -DHAS_ALTIVEC
- else
-+BUILD_FLAG_ALTIVEC =
-+BUILD_FLAG_ABI_ALTIVEC =
- ALTIVEC_FLAG =
- endif
- 
-@@ -101,11 +105,12 @@
- ISA_2_07_FLAG =
- endif
- 
--jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec \
--			@FLAG_M32@ $(ALTIVEC_FLAG)
-+jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames \
-+			@FLAG_M32@ $(ALTIVEC_FLAG) $(BUILD_FLAG_ALTIVEC)
- 
--testVMX_CFLAGS  = $(AM_CFLAGS) -O -g -Wall -maltivec -mabi=altivec -DALTIVEC \
--			-DGCC_COMPILER @FLAG_M32@
-+testVMX_CFLAGS  = $(AM_CFLAGS) -O -g -Wall -DALTIVEC \
-+			-DGCC_COMPILER @FLAG_M32@  $(BUILD_FLAG_ALTIVEC) \
-+			$(BUILD_FLAG_ABI_ALTIVEC)
- 
- test_isa_2_06_part1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) \
- 			@FLAG_M32@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX)
-Index: none/tests/ppc64/Makefile.am
-===================================================================
---- a/none/tests/ppc64/Makefile.am	(revision 14565)
-+++ b/none/tests/ppc64/Makefile.am	(revision 14566)
-@@ -50,8 +50,10 @@
- allexec_CFLAGS		= $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
- 
- if HAS_ALTIVEC
-+BUILD_FLAG_ALTIVEC = -maltivec
- ALTIVEC_FLAG = -DHAS_ALTIVEC
- else
-+BUILD_FLAG_ALTIVEC =
- ALTIVEC_FLAG =
- endif
- 
-@@ -88,8 +90,8 @@
- test_isa_2_06_part3_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(VSX_FLAG) \
- 			@FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_VSX)
- 
--jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames -maltivec \
--			@FLAG_M64@ $(ALTIVEC_FLAG)
-+jm_insns_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames \
-+			@FLAG_M64@ $(ALTIVEC_FLAG) $(BUILD_FLAG_ALTIVEC)
- 
- test_dfp1_CFLAGS = $(AM_CFLAGS) -Winline -Wall -O -g -mregnames $(DFP_FLAG) \
- 			@FLAG_M64@ $(BUILD_FLAGS_DFP)
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
deleted file mode 100644
index 2319ab9..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/remove-arm-variant-specific.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-Remove arm tests that don't compile
-
-Upstream-Status: Pending
-
-Corrects the original commit for the patch that removed ARM ptest CFLAGS
-settings. Since the flags could be set by a user, the flags should
-be kept in place during compilation.  By keeping the original up-stream
-CFLAGS for the tests, then additional tests successfully compile
-for all tested ARM tunings.
-
-However, there were still two tests listed below that did not compile
-for any beaglebone tuning that is valid for valgrind. With the updated
-patch, the set of excluded ARM ptests and their respective build
-failures are:
-  intdiv - fails for all beaglebone tunings with 2 errors:
-  {standard input}:(40 or 41): Error: selected processor does not
-       support Thumb mode `udiv r3,r9,r10'
-  {standard input}:(72 or 73): Error: selected processor does not
-       support Thumb mode `sdiv r3,r9,r10'
-
-  vcvt_fixed_float_VFP - fails for all beaglebone tunings in one of
-  two ways:
-    with neon tuning (-mfpu=neon) fails with Internal Compiler Error
-    without neon tuning fails with 3 errors:
-    {standard input}:33: Error: selected FPU does not support
-      instruction -- `vcvt.f32.s32 s15,s15,#1'
-    {standard input}:58: Error: selected FPU does not support
-      instruction -- `vcvt.f32.s32 s15,s15,#32'
-    {standard input}:136: Error: selected FPU does not support
-      instruction -- `vcvt.f32.u32 s15,s15,#1'
-
-After applying this commit, the valgrind ARM ptests compile without
-errors for tunings:
-  armv7[t][hf][b][-neon] cortexa8[t][hf][-neon]
-where the tuning [option] was successfully compiled, both with
-and without the 'option', and in combination with all other options.
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-
-Index: valgrind-3.10.1/none/tests/arm/Makefile.am
-===================================================================
---- valgrind-3.10.1.orig/none/tests/arm/Makefile.am	2015-05-19 15:11:59.224842927 -0500
-+++ valgrind-3.10.1/none/tests/arm/Makefile.am	2015-05-19 15:14:20.808847028 -0500
-@@ -17,9 +17,13 @@
- 	vfp.stdout.exp vfp.stderr.exp vfp.vgtest \
- 	vfpv4_fma.stdout.exp vfpv4_fma.stderr.exp vfpv4_fma.vgtest
- 
-+# Remove the following tests which cause compiler errors for all tunings
-+#  available for beagle bone (see remove-arm-variant-specific.patch):
-+#	intdiv
-+#	vcvt_fixed_float_VFP
-+
- check_PROGRAMS = \
- 	allexec \
--	intdiv \
- 	ldrt \
- 	ldrt_arm \
- 	neon128 \
-@@ -27,7 +31,6 @@
- 	v6intARM \
- 	v6intThumb \
- 	v6media \
--	vcvt_fixed_float_VFP \
- 	vfp \
- 	vfpv4_fma
- 
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
deleted file mode 100644
index 1c640ff..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/remove-ppc-tests-failing-build.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Remove test apps not building with ppc and PTEST
-
-For mpc8316-rdb in none/tests/ppc32, the oe compiler options are
-inconsistent with the imposed test compiler options generating errors
-as follows:
-test_isa_2_07_part1
-test_isa_2_07_part2
-test_tm
-test_touch_tm
-    : unrecognized command line option '-mhtm'
-
-jm-insns
-testVMX
-    : AltiVec not supported in this target
-
-For the following tests, their inline assembler is inconsistent with
-the ppce300c3 variant:
-round.c:393
-power5+_round.c:98
-    : impossible constraint in 'asm'
-
-For the following tests, with both mpc8316-rdb and with qemuppc bsp,
-the inline assember is inconsistent with the oe compiler machine
-tuning:
-In memcheck/tests/ppc32
- power_ISA2_05.c:56
-In none/tests/ppc32
- test_dfp1.c:85
- test_dfp2.c:160
- test_dfp3.c:157
- test_dfp4.c:73
- test_dfp5.c:73
-    : impossible constraint in 'asm'
-
-Upstream-Status: Pending
-
-Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
-
-Index: valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am
-===================================================================
---- valgrind-3.10.0.orig/memcheck/tests/ppc32/Makefile.am
-+++ valgrind-3.10.0/memcheck/tests/ppc32/Makefile.am
-@@ -7,8 +7,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \
- 	power_ISA2_05.stderr.exp power_ISA2_05.stdout.exp power_ISA2_05.vgtest \
- 	power_ISA2_05.stdout.exp_Without_FPPO
- 
--check_PROGRAMS = \
--	power_ISA2_05
-+check_PROGRAMS = 
- 
- power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \
- 		-I$(top_srcdir)/include @FLAG_M32@
-Index: valgrind-3.10.0/none/tests/ppc32/Makefile.am
-===================================================================
---- valgrind-3.10.0.orig/none/tests/ppc32/Makefile.am
-+++ valgrind-3.10.0/none/tests/ppc32/Makefile.am
-@@ -52,16 +52,8 @@ check_PROGRAMS = \
- 	allexec \
- 	bug129390-ppc32 \
- 	bug139050-ppc32 \
--	ldstrev lsw jm-insns mftocrf mcrfs round test_fx test_gx \
--	testVMX twi tw xlc_dbl_u32 power5+_round power6_bcmp \
--	test_isa_2_06_part1 \
--	test_isa_2_06_part2 \
--	test_isa_2_06_part3 \
--	test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 \
--	test_isa_2_07_part1 \
--	test_isa_2_07_part2 \
--	test_tm \
--	test_touch_tm \
-+	ldstrev lsw mftocrf mcrfs test_fx test_gx \
-+	twi tw xlc_dbl_u32 power6_bcmp \
- 	ldst_multiple \
- 	data-cache-instructions
- 
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/sepbuildfix.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/sepbuildfix.patch
deleted file mode 100644
index 5db0ef8..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/sepbuildfix.patch
+++ /dev/null
@@ -1,235 +0,0 @@
-Fix out of tree builds. The paths to these files need to be fully specified in
-the out of tree build case. glibc-2.X.supp is a generated file so the full path
-is deliberately not specified in that case.
-
-RP 2013/03/23
-
-Upstream-Status: Pending
-
-Index: valgrind-3.9.0/configure.ac
-===================================================================
---- valgrind-3.9.0.orig/configure.ac
-+++ valgrind-3.9.0/configure.ac
-@@ -325,26 +325,26 @@ case "${host_os}" in
- 	     9.*)
- 		  AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard])
- 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version])
--		  DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}"
--		  DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}"
-+		  DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}"
-+		  DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}"
- 		  ;;
- 	     10.*)
- 		  AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard])
- 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_6, [Darwin / Mac OS X version])
--		  DEFAULT_SUPP="darwin10.supp ${DEFAULT_SUPP}"
--		  DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
-+		  DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}"
-+		  DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
- 		  ;;
- 	     11.*)
- 		  AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion])
- 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_7, [Darwin / Mac OS X version])
--		  DEFAULT_SUPP="darwin11.supp ${DEFAULT_SUPP}"
--		  DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
-+		  DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}"
-+		  DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
- 		  ;;
- 	     12.*)
- 		  AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion])
- 		  AC_DEFINE([DARWIN_VERS], DARWIN_10_8, [Darwin / Mac OS X version])
--		  DEFAULT_SUPP="darwin12.supp ${DEFAULT_SUPP}"
--		  DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}"
-+		  DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}"
-+		  DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}"
- 		  ;;
-              *) 
- 		  AC_MSG_RESULT([unsupported (${kernel})])
-@@ -799,124 +799,124 @@ case "${GLIBC_VERSION}" in
-      2.2)
- 	AC_MSG_RESULT(2.2 family)
- 	AC_DEFINE([GLIBC_2_2], 1, [Define to 1 if you're using glibc 2.2.x])
--	DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.2.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
- 
-      2.3)
- 	AC_MSG_RESULT(2.3 family)
- 	AC_DEFINE([GLIBC_2_3], 1, [Define to 1 if you're using glibc 2.3.x])
--	DEFAULT_SUPP="glibc-2.3.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.3.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
- 
-      2.4)
- 	AC_MSG_RESULT(2.4 family)
- 	AC_DEFINE([GLIBC_2_4], 1, [Define to 1 if you're using glibc 2.4.x])
--	DEFAULT_SUPP="glibc-2.4.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.4.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
- 
-      2.5)
- 	AC_MSG_RESULT(2.5 family)
- 	AC_DEFINE([GLIBC_2_5], 1, [Define to 1 if you're using glibc 2.5.x])
--	DEFAULT_SUPP="glibc-2.5.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.5.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.6)
- 	AC_MSG_RESULT(2.6 family)
- 	AC_DEFINE([GLIBC_2_6], 1, [Define to 1 if you're using glibc 2.6.x])
--	DEFAULT_SUPP="glibc-2.6.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.6.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.7)
- 	AC_MSG_RESULT(2.7 family)
- 	AC_DEFINE([GLIBC_2_7], 1, [Define to 1 if you're using glibc 2.7.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.8)
- 	AC_MSG_RESULT(2.8 family)
- 	AC_DEFINE([GLIBC_2_8], 1, [Define to 1 if you're using glibc 2.8.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.9)
- 	AC_MSG_RESULT(2.9 family)
- 	AC_DEFINE([GLIBC_2_9], 1, [Define to 1 if you're using glibc 2.9.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.10)
- 	AC_MSG_RESULT(2.10 family)
- 	AC_DEFINE([GLIBC_2_10], 1, [Define to 1 if you're using glibc 2.10.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.11)
- 	AC_MSG_RESULT(2.11 family)
- 	AC_DEFINE([GLIBC_2_11], 1, [Define to 1 if you're using glibc 2.11.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-         ;;
-      2.12)
- 	AC_MSG_RESULT(2.12 family)
- 	AC_DEFINE([GLIBC_2_12], 1, [Define to 1 if you're using glibc 2.12.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.13)
- 	AC_MSG_RESULT(2.13 family)
- 	AC_DEFINE([GLIBC_2_13], 1, [Define to 1 if you're using glibc 2.13.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.14)
- 	AC_MSG_RESULT(2.14 family)
- 	AC_DEFINE([GLIBC_2_14], 1, [Define to 1 if you're using glibc 2.14.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.15)
- 	AC_MSG_RESULT(2.15 family)
- 	AC_DEFINE([GLIBC_2_15], 1, [Define to 1 if you're using glibc 2.15.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.16)
- 	AC_MSG_RESULT(2.16 family)
- 	AC_DEFINE([GLIBC_2_16], 1, [Define to 1 if you're using glibc 2.16.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.17)
- 	AC_MSG_RESULT(2.17 family)
- 	AC_DEFINE([GLIBC_2_17], 1, [Define to 1 if you're using glibc 2.17.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      2.18)
- 	AC_MSG_RESULT(2.18 family)
- 	AC_DEFINE([GLIBC_2_18], 1, [Define to 1 if you're using glibc 2.18.x])
- 	DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
--	DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}"
- 	;;
-      darwin)
- 	AC_MSG_RESULT(Darwin)
-@@ -926,7 +926,7 @@ case "${GLIBC_VERSION}" in
-      bionic)
- 	AC_MSG_RESULT(Bionic)
- 	AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic])
--	DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}"
-+	DEFAULT_SUPP="$srcdir/bionic.supp ${DEFAULT_SUPP}"
- 	;;
- 
-      *)
-@@ -943,11 +943,11 @@ AC_SUBST(GLIBC_VERSION)
- # attempt to detect whether such libraries are installed on the
- # build machine (or even if any X facilities are present); just
- # add the suppressions antidisirregardless.
--DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}"
--DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}"
-+DEFAULT_SUPP="$srcdir/xfree-4.supp ${DEFAULT_SUPP}"
-+DEFAULT_SUPP="$srcdir/xfree-3.supp ${DEFAULT_SUPP}"
- 
- # Add glibc and X11 suppressions for exp-sgcheck
--DEFAULT_SUPP="exp-sgcheck.supp ${DEFAULT_SUPP}"
-+DEFAULT_SUPP="$srcdir/exp-sgcheck.supp ${DEFAULT_SUPP}"
- 
- 
- #----------------------------------------------------------------------------
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch
new file mode 100644
index 0000000..adea405
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch
@@ -0,0 +1,44 @@
+From d134dafc2f11e0d247420a0ba360bcdef77b4093 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 19 Jan 2016 16:00:00 -0800
+Subject: [PATCH] use appropriate -march/-mcpu/-mfpu for ARM test apps
+
+Ensure that test apps in none/tests/arm are compiled with appropriate
+-march/-mcpu/-mfpu flags to support the instructions being tested.
+The aim is to build all tests, even ones which may not run correctly
+on all target CPUs.
+
+For tests requiring armv7ve instructions, ensure that we set both
+-march=armv7ve and -mcpu=cortex-a15 (since some TUNE_CCARGS may set
+-march=armv7-a and adding -mcpu=cortex-a15 alone is not enough to
+over-ride that).
+
+See similar cases in none/tests/arm/Makefile.am
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ none/tests/arm/Makefile.am | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am
+index 4507a20..825290f 100644
+--- a/none/tests/arm/Makefile.am
++++ b/none/tests/arm/Makefile.am
+@@ -62,8 +62,10 @@ neon64_CFLAGS     = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \
+ 			-mfpu=neon \
+ 			-mthumb
+ 
+-intdiv_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb
++intdiv_CFLAGS	  = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb
+ ldrt_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb
+ ldrt_arm_CFLAGS	  = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm
+ 
+-vfpv4_fma_CFLAGS  = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm
++vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3
++
++vfpv4_fma_CFLAGS  = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch b/yocto-poky/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch
deleted file mode 100644
index f72e9ca..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind/valgrind-remove-rpath.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Upstream-Status: Inappropriate [embedded config]
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: valgrind-3.10.0/none/tests/Makefile.am
-===================================================================
---- valgrind-3.10.0.orig/none/tests/Makefile.am
-+++ valgrind-3.10.0/none/tests/Makefile.am
-@@ -280,7 +280,6 @@ threaded_fork_LDADD	= -lpthread
- threadederrno_LDADD	= -lpthread
- tls_SOURCES		= tls.c tls2.c
- tls_DEPENDENCIES	= tls.so tls2.so
--tls_LDFLAGS		= -Wl,-rpath,$(abs_top_builddir)/none/tests
- tls_LDADD		= tls.so tls2.so -lpthread
- tls_so_SOURCES		= tls_so.c
- tls_so_DEPENDENCIES	= tls2.so
-@@ -288,7 +287,7 @@ if VGCONF_OS_IS_DARWIN
-  tls_so_LDFLAGS		= -dynamic -dynamiclib -all_load -fpic
-  tls_so_LDADD		= `pwd`/tls2.so
- else
-- tls_so_LDFLAGS		= -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC
-+ tls_so_LDFLAGS		= -shared -fPIC
-  tls_so_LDADD		= tls2.so
- endif
- tls_so_CFLAGS		= $(AM_CFLAGS) -fPIC
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb b/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
deleted file mode 100644
index 86ba979..0000000
--- a/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.10.1.bb
+++ /dev/null
@@ -1,105 +0,0 @@
-SUMMARY = "Valgrind memory debugger and instrumentation framework"
-HOMEPAGE = "http://valgrind.org/"
-BUGTRACKER = "http://valgrind.org/support/bug_reports.html"
-LICENSE = "GPLv2 & GPLv2+ & BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c46082167a314d785d012a244748d803 \
-                    file://include/pub_tool_basics.h;beginline=1;endline=29;md5=e7071929a50d4b0fc27a3014b315b0f7 \
-                    file://include/valgrind.h;beginline=1;endline=56;md5=92df8a1bde56fe2af70931ff55f6622f \
-                    file://COPYING.DOCS;md5=8fdeb5abdb235a08e76835f8f3260215"
-
-X11DEPENDS = "virtual/libx11"
-DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \
-        "
-
-SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
-           file://fixed-perl-path.patch \
-           file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
-           file://sepbuildfix.patch \
-           file://glibc.patch \
-           file://force-nostabs.patch \
-           file://remove-arm-variant-specific.patch \
-           file://remove-ppc-tests-failing-build.patch \
-           file://valgrind-remove-rpath.patch \
-           file://enable.building.on.4.x.kernel.patch \
-           file://add-ptest.patch \
-           file://pass-maltivec-only-if-it-supported.patch \
-           file://run-ptest \
-           file://0001-valgrind-Enable-rt_sigpending-syscall-on-ppc64-linux.patch \
-          "
-
-SRC_URI[md5sum] = "60ddae962bc79e7c95cfc4667245707f"
-SRC_URI[sha256sum] = "fa253dc26ddb661b6269df58144eff607ea3f76a9bcfe574b0c7726e1dfcb997"
-
-COMPATIBLE_HOST = '(i.86|x86_64|mips|powerpc|powerpc64).*-linux'
-COMPATIBLE_HOST_armv7a = 'arm.*-linux'
-
-PR = "r1"
-
-inherit autotools ptest
-
-EXTRA_OECONF = "--enable-tls --without-mpicc"
-EXTRA_OECONF_armv7a = "--enable-tls -host=armv7-none-linux-gnueabi --without-mpicc"
-EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS', True) != '32']}"
-EXTRA_OEMAKE = "-w"
-
-do_install_append () {
-    install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/
-}
-
-RDEPENDS_${PN} += "perl"
-
-FILES_${PN}-dbg += "${libdir}/${PN}/*/.debug/*"
-
-# valgrind needs debug information for ld.so at runtime in order to
-# redirect functions like strlen.
-RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
-
-RDEPENDS_${PN}-ptest += " sed perl glibc-utils perl-module-file-glob"
-
-do_compile_ptest() {
-    oe_runmake check CFLAGS="${CFLAGS} -O0" CXXFLAGS="${CXXFLAGS} -O0"
-}
-
-
-do_install_ptest() {
-    chmod +x ${B}/tests/vg_regtest
-
-    # The test application binaries are not automatically installed.
-    # Grab them from the build directory.
-    #
-    # The regression tests require scripts and data files that are not
-    # copied to the build directory.  They must be copied from the
-    # source directory. 
-    saved_dir=$PWD
-    for parent_dir in ${S} ${B} ; do
-        cd $parent_dir
-
-        # exclude shell or the package won't install
-        rm -rf none/tests/shell* 2>/dev/null
-
-        subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests"
-
-        # Get the vg test scripts, filters, and expected files
-        for dir in $subdirs ; do
-            find $dir | cpio -pvdu ${D}${PTEST_PATH}
-        done
-        cd $saved_dir
-    done
-
-    # clean out build artifacts before building the rpm
-    find ${D}${PTEST_PATH} \
-         \( -name "Makefile*" \
-        -o -name "*.o" \
-        -o -name "*.c" \
-        -o -name "*.S" \
-        -o -name "*.h" \) \
-        -exec rm {} \;
-
-    # needed by massif tests
-    cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print
-
-    # handle multilib
-    sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
-}
-
diff --git a/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb b/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
new file mode 100644
index 0000000..51c88bf
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/valgrind/valgrind_3.11.0.bb
@@ -0,0 +1,118 @@
+SUMMARY = "Valgrind memory debugger and instrumentation framework"
+HOMEPAGE = "http://valgrind.org/"
+BUGTRACKER = "http://valgrind.org/support/bug_reports.html"
+LICENSE = "GPLv2 & GPLv2+ & BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://include/pub_tool_basics.h;beginline=1;endline=29;md5=ebb8e640ef633f940c425686c873f9fa \
+                    file://include/valgrind.h;beginline=1;endline=56;md5=4b5e24908e53016ea561c45f4234a327 \
+                    file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56"
+
+X11DEPENDS = "virtual/libx11"
+DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \
+        "
+
+SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
+           file://fixed-perl-path.patch \
+           file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \
+           file://run-ptest \
+           file://11_mips-link-tool.patch \
+           file://0002-remove-rpath.patch \
+           file://0004-Fix-out-of-tree-builds.patch \
+           file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \
+           file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \
+           file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \
+           file://avoid-neon-for-targets-which-don-t-support-it.patch \
+"
+SRC_URI_append_libc-musl = "\
+           file://0001-fix-build-for-musl-targets.patch \
+"
+SRC_URI[md5sum] = "4ea62074da73ae82e0162d6550d3f129"
+SRC_URI[sha256sum] = "6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42"
+
+COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
+
+# valgrind supports armv7 and above
+COMPATIBLE_HOST_armv4 = 'null'
+COMPATIBLE_HOST_armv5 = 'null'
+COMPATIBLE_HOST_armv6 = 'null'
+
+inherit autotools ptest
+
+EXTRA_OECONF = "--enable-tls --without-mpicc"
+EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS', True) != '32']}"
+
+# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option
+EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}"
+
+EXTRA_OEMAKE = "-w"
+
+# valgrind likes to control its own optimisation flags. It generally defaults
+# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags
+# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it
+# which fixes build path issue in DWARF.
+SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}"
+
+CFLAGS_append_libc-uclibc = " -D__UCLIBC__ "
+
+do_install_append () {
+    install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/
+}
+
+RDEPENDS_${PN} += "perl"
+
+# valgrind needs debug information for ld.so at runtime in order to
+# redirect functions like strlen.
+RRECOMMENDS_${PN} += "${TCLIBC}-dbg"
+
+RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob"
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils"
+
+# One of the tests contains a bogus interpreter path on purpose, and QA
+# check complains about it
+INSANE_SKIP_${PN}-ptest += "file-rdeps"
+
+do_compile_ptest() {
+    oe_runmake check
+}
+
+do_install_ptest() {
+    chmod +x ${B}/tests/vg_regtest
+
+    # The test application binaries are not automatically installed.
+    # Grab them from the build directory.
+    #
+    # The regression tests require scripts and data files that are not
+    # copied to the build directory.  They must be copied from the
+    # source directory. 
+    saved_dir=$PWD
+    for parent_dir in ${S} ${B} ; do
+        cd $parent_dir
+
+        # exclude shell or the package won't install
+        rm -rf none/tests/shell* 2>/dev/null
+
+        subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests"
+
+        # Get the vg test scripts, filters, and expected files
+        for dir in $subdirs ; do
+            find $dir | cpio -pvdu ${D}${PTEST_PATH}
+        done
+        cd $saved_dir
+    done
+
+    # clean out build artifacts before building the rpm
+    find ${D}${PTEST_PATH} \
+         \( -name "Makefile*" \
+        -o -name "*.o" \
+        -o -name "*.c" \
+        -o -name "*.S" \
+        -o -name "*.h" \) \
+        -exec rm {} \;
+
+    # needed by massif tests
+    cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print
+
+    # handle multilib
+    sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
+}
diff --git a/yocto-poky/meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch b/yocto-poky/meta/recipes-devtools/xmlto/xmlto-0.0.28/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch
similarity index 100%
rename from yocto-poky/meta/recipes-devtools/xmlto/xmlto-0.0.26/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch
rename to yocto-poky/meta/recipes-devtools/xmlto/xmlto-0.0.28/configure.in-drop-the-test-of-xmllint-and-xsltproc.patch
diff --git a/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb b/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb
deleted file mode 100644
index a7a0183..0000000
--- a/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.26.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "A shell-script tool for converting XML files to various formats"
-HOMEPAGE = "https://fedorahosted.org/xmlto/"
-SECTION = "docs/xmlto"
-LICENSE = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
-
-SRC_URI = "https://fedorahosted.org/releases/x/m/xmlto/xmlto-${PV}.tar.gz \
-           file://configure.in-drop-the-test-of-xmllint-and-xsltproc.patch \
-           file://catalog.xml \
-"
-SRC_URI[md5sum] = "0cca8be787ba01e00c618cb390c988b9"
-SRC_URI[sha256sum] = "cfd8d2a26077be1d5566dfe22dd66099ae4f4600dea97d6e113a2cc5b8708977"
-
-inherit autotools
-
-# xmlto needs getopt/xmllint/xsltproc/bash at runtime
-RDEPENDS_${PN} = "docbook-xml-dtd4 \
-                  docbook-xsl-stylesheets \
-                  util-linux \
-                  libxml2 \
-                  bash \
-"
-RDEPENDS_${PN}_append_class-target = " \
-                  libxslt-bin \
-"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF_append = " XMLLINT=xmllint XSLTPROC=xsltproc"
-
-do_install_append() {
-    install -d ${D}${sysconfdir}/xml/
-    install -m 755  ${WORKDIR}/catalog.xml ${D}${sysconfdir}/xml/catalog.xml
-    create_wrapper ${D}/${bindir}/xmlto XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
-}
-
-do_populate_sysroot[rdeptask] = "do_populate_sysroot"
diff --git a/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb b/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
new file mode 100644
index 0000000..71f873f
--- /dev/null
+++ b/yocto-poky/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
@@ -0,0 +1,38 @@
+SUMMARY = "A shell-script tool for converting XML files to various formats"
+HOMEPAGE = "https://fedorahosted.org/xmlto/"
+SECTION = "docs/xmlto"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+SRC_URI = "https://fedorahosted.org/releases/x/m/xmlto/xmlto-${PV}.tar.gz \
+           file://configure.in-drop-the-test-of-xmllint-and-xsltproc.patch \
+           file://catalog.xml \
+"
+SRC_URI[md5sum] = "a1fefad9d83499a15576768f60f847c6"
+SRC_URI[sha256sum] = "2f986b7c9a0e9ac6728147668e776d405465284e13c74d4146c9cbc51fd8aad3"
+
+inherit autotools
+
+# xmlto needs getopt/xmllint/xsltproc/bash at runtime
+RDEPENDS_${PN} = "docbook-xml-dtd4 \
+                  docbook-xsl-stylesheets \
+                  util-linux \
+                  libxml2 \
+                  bash \
+"
+RDEPENDS_${PN}_append_class-target = " \
+                  libxslt-bin \
+"
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF_append = " BASH=/bin/bash GCP=/bin/cp XMLLINT=xmllint XSLTPROC=xsltproc"
+
+do_install_append() {
+    install -d ${D}${sysconfdir}/xml/
+    install -m 755  ${WORKDIR}/catalog.xml ${D}${sysconfdir}/xml/catalog.xml
+    create_wrapper ${D}/${bindir}/xmlto XML_CATALOG_FILES=${sysconfdir}/xml/catalog.xml
+}
+
+do_populate_sysroot[rdeptask] = "do_populate_sysroot"
diff --git a/yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch b/yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch
new file mode 100644
index 0000000..389af1e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/at/at/configure-fix-with-without-selinux.patch
@@ -0,0 +1,53 @@
+From c02354af7f3d9426da31503abfae70952c699a9d Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Fri, 18 Mar 2016 03:23:11 -0400
+Subject: [PATCH] configure: fix with/without selinux
+
+Problem:
+without-selinux doesn't work since WITH_SELINUX is always be defined no
+matter which option is given: with-selinux, without-selinux.
+
+Fix:
+Disable selinux support if without-selinux is given; otherwise check
+libselinux to determine if selinux support should be enabled.
+
+Upstream-Status: Submitted [at@packages.debian.org]
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ configure.ac | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 5a43419..8c9de62 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -240,10 +240,21 @@ AC_ARG_WITH(daemon_username,
+ AC_SUBST(DAEMON_USERNAME)
+ 
+ AC_ARG_WITH(selinux,
+-[ --with-selinux       Define to run with selinux],
+-AC_DEFINE(WITH_SELINUX, 1, [Define if you are building with_selinux]),
+-)
+-AC_CHECK_LIB(selinux, is_selinux_enabled, SELINUXLIB=-lselinux)
++[ --with-selinux       Define to run with selinux (default=check)],
++[],
++[with_selinux=check])
++
++if test "x$with_selinux" != xno; then
++  AC_CHECK_LIB([selinux], [is_selinux_enabled],
++    [SELINUXLIB=-lselinux
++     AC_DEFINE(WITH_SELINUX, 1, [Define if you are building with_selinux])
++    ],
++    [if test "x$with_selinux" != xcheck; then
++       AC_MSG_FAILURE([--with-selinux is given, but test for selinux failed])
++     fi
++    ]
++  )
++fi
+ AC_SUBST(SELINUXLIB)
+ AC_SUBST(WITH_SELINUX)
+ 
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch b/yocto-poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch
index 66ff3e1..100f889 100644
--- a/yocto-poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch
+++ b/yocto-poky/meta/recipes-extended/at/at/fix_parallel_build_error.patch
@@ -13,16 +13,23 @@
 
 Signed-off-by: Scott Garman <scott.a.garman@intel.com>
 
-Index: at-3.1.12/Makefile.in
-===================================================================
---- at-3.1.12.orig/Makefile.in
-+++ at-3.1.12/Makefile.in
-@@ -83,6 +83,8 @@ y.tab.c y.tab.h: parsetime.y
+---
+ Makefile.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Makefile.in b/Makefile.in
+index dd3c2f8..7897e45 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -82,6 +82,8 @@ y.tab.c y.tab.h: parsetime.y
  lex.yy.c: parsetime.l
  	$(LEX) -i parsetime.l
  
 +parsetime.l: y.tab.h
 +
- atrun: atrun.in
- 	configure
+ atd.service: atd.service.in
+ 	sed -e 's![@]sbindir[@]!$(sbindir)!g' < $< > $@
  
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/at/at_3.1.16.bb b/yocto-poky/meta/recipes-extended/at/at_3.1.16.bb
deleted file mode 100644
index 0512bcb..0000000
--- a/yocto-poky/meta/recipes-extended/at/at_3.1.16.bb
+++ /dev/null
@@ -1,69 +0,0 @@
-SUMMARY = "Delayed job execution and batch processing"
-DESCRIPTION = "At allows for commands to be run at a particular time.  Batch will execute commands when \
-the system load levels drop to a particular level."
-SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
-DEPENDS = "flex flex-native \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-
-RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
-"
-
-PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
-
-RCONFLICTS_${PN} = "atd"
-RREPLACES_${PN} = "atd"
-
-SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz \
-    file://fix_parallel_build_error.patch \
-    file://posixtm.c \
-    file://posixtm.h \
-    file://file_replacement_with_gplv2.patch \
-    file://atd.init \
-    file://atd.service \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
-    file://makefile-fix-parallel.patch \
-    file://0001-remove-glibc-assumption.patch \
-    "
-
-PAM_SRC_URI = "file://pam.conf.patch \
-               file://configure-add-enable-pam.patch"
-
-SRC_URI[md5sum] = "d05da75d9b75d93917ffb16ab48b1e19"
-SRC_URI[sha256sum] = "cb9af59c6a54edce9536ba629841055409d1f89d8ae26494727a97141fb4d5c1"
-
-EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
-                 --with-daemon_username=root \
-                 --with-daemon_groupname=root \
-                 --with-jobdir=/var/spool/at/jobs \
-                 --with-atspool=/var/spool/at/spool \
-                 ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
-
-inherit autotools-brokensep systemd update-rc.d
-
-INITSCRIPT_NAME = "atd"
-INITSCRIPT_PARAMS = "defaults"
-
-SYSTEMD_SERVICE_${PN} = "atd.service"
-
-
-do_compile_prepend () {
-	cp -f ${WORKDIR}/posixtm.[ch] ${S}
-}
-
-do_install () {
-	oe_runmake -e "IROOT=${D}" install
-
-	install -d ${D}${sysconfdir}/init.d
-	install -m 0755    ${WORKDIR}/atd.init		${D}${sysconfdir}/init.d/atd
-
-	# install systemd unit files
-	install -d ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
-	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
-
-	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
-		install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
-	fi
-}
diff --git a/yocto-poky/meta/recipes-extended/at/at_3.1.18.bb b/yocto-poky/meta/recipes-extended/at/at_3.1.18.bb
new file mode 100644
index 0000000..93044f5
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/at/at_3.1.18.bb
@@ -0,0 +1,70 @@
+SUMMARY = "Delayed job execution and batch processing"
+DESCRIPTION = "At allows for commands to be run at a particular time.  Batch will execute commands when \
+the system load levels drop to a particular level."
+SECTION = "base"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4325afd396febcb659c36b49533135d4"
+DEPENDS = "flex flex-native \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+
+RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_DEPS}', '', d)} \
+"
+
+PAM_DEPS = "libpam libpam-runtime pam-plugin-env pam-plugin-limits"
+
+RCONFLICTS_${PN} = "atd"
+RREPLACES_${PN} = "atd"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}.orig.tar.gz;subdir=${BP} \
+    file://fix_parallel_build_error.patch \
+    file://posixtm.c \
+    file://posixtm.h \
+    file://file_replacement_with_gplv2.patch \
+    file://atd.init \
+    file://atd.service \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+    file://makefile-fix-parallel.patch \
+    file://0001-remove-glibc-assumption.patch \
+    file://configure-fix-with-without-selinux.patch \
+    "
+
+PAM_SRC_URI = "file://pam.conf.patch \
+               file://configure-add-enable-pam.patch"
+
+SRC_URI[md5sum] = "f67a7aab557cd5b4a1311079a08acebe"
+SRC_URI[sha256sum] = "dbd5c8cb8edd53ef467363c3af0391c08769f1dbbd4d5002c59a4cd4cac11d52"
+
+EXTRA_OECONF += "ac_cv_path_SENDMAIL=/bin/true \
+                 --with-daemon_username=root \
+                 --with-daemon_groupname=root \
+                 --with-jobdir=/var/spool/at/jobs \
+                 --with-atspool=/var/spool/at/spool \
+                 ac_cv_header_security_pam_appl_h=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} "
+
+inherit autotools-brokensep systemd update-rc.d
+
+INITSCRIPT_NAME = "atd"
+INITSCRIPT_PARAMS = "defaults"
+
+SYSTEMD_SERVICE_${PN} = "atd.service"
+
+copy_sources() {
+	cp -f ${WORKDIR}/posixtm.[ch] ${S}
+}
+do_patch[postfuncs] += "copy_sources"
+
+do_install () {
+	oe_runmake -e "IROOT=${D}" install
+
+	install -d ${D}${sysconfdir}/init.d
+	install -m 0755    ${WORKDIR}/atd.init		${D}${sysconfdir}/init.d/atd
+
+	# install systemd unit files
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/atd.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/atd.service
+
+	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+		install -D -m 0644 ${WORKDIR}/${BP}/pam.conf ${D}${sysconfdir}/pam.d/atd
+	fi
+}
diff --git a/yocto-poky/meta/recipes-extended/bash/bash.inc b/yocto-poky/meta/recipes-extended/bash/bash.inc
index 020409f..93ca00b 100644
--- a/yocto-poky/meta/recipes-extended/bash/bash.inc
+++ b/yocto-poky/meta/recipes-extended/bash/bash.inc
@@ -23,6 +23,9 @@
 RDEPENDS_${PN}_class-nativesdk = ""
 RDEPENDS_${PN}-ptest += "make"
 
+USERADD_PACKAGES = "${PN}-ptest"
+USERADD_PARAM_${PN}-ptest = "--create-home --user-group test"
+
 do_configure_prepend () {
 	if [ ! -e ${S}/acinclude.m4 ]; then
 		cat ${S}/aclocal.m4 > ${S}/acinclude.m4
@@ -42,13 +45,15 @@
 }
 do_install_append_class-target () {
 	# Clean host path in bashbug
-	sed -i -e "s,${STAGING_DIR_TARGET},,g" ${D}${bindir}/bashbug
+	sed -i -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+		-e "s,-I${WORKDIR}/\S* ,,g" ${D}${bindir}/bashbug
 }
 
 do_install_ptest () {
 	make INSTALL_TEST_DIR=${D}${PTEST_PATH}/tests install-test
 	cp ${B}/Makefile ${D}${PTEST_PATH}
-        sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/Makefile
+        sed -i -e 's/^Makefile/_Makefile/' -e "s,--sysroot=${STAGING_DIR_TARGET},,g" \
+	    -e "s,${S},,g" -e "s,${B},,g" -e "s,${STAGING_DIR_NATIVE},,g" ${D}${PTEST_PATH}/Makefile
 }
 
 pkg_postinst_${PN} () {
diff --git a/yocto-poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch b/yocto-poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch
new file mode 100644
index 0000000..7f099ae
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/bash/bash/fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch
@@ -0,0 +1,169 @@
+From 2c30dff8ea8b17ad5ba9881e35ad1eba9c515f13 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Thu, 26 Nov 2015 22:09:07 -0500
+Subject: [PATCH] fix run-coproc/run-heredoc/run-execscript/run-test/ failed
+
+FAIL: run-coproc
+update test case:tests/coproc.right, tests/coproc.tests
+git://git.sv.gnu.org/bash.git bash-4.4-testing
+
+FAIL: run-heredoc
+update test case: tests/heredoc.right tests/heredoc3.sub
+git://git.sv.gnu.org/bash.git bash-4.4-testing
+
+FAIL: run-execscript:
+the test suite should not be run as root
+
+FAIL: run-test
+the test suite should not be run as root
+
+Upstream-Status: Pending
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ tests/coproc.right   |  5 +----
+ tests/coproc.tests   | 30 +++++++++++++++++++++++++-----
+ tests/heredoc.right  |  5 ++---
+ tests/heredoc3.sub   |  3 ++-
+ tests/run-execscript |  3 ++-
+ tests/run-test       |  3 ++-
+ 6 files changed, 34 insertions(+), 15 deletions(-)
+
+diff --git a/tests/coproc.right b/tests/coproc.right
+index 6d9deaa..94b001c 100644
+--- a/tests/coproc.right
++++ b/tests/coproc.right
+@@ -1,11 +1,8 @@
+-84575
+ 63 60
+ a b c
+-84577
+ 63 60
+ flop
+-./coproc.tests: line 22: 84577 Terminated              coproc REFLECT { cat -; }
+-84579
++coproc.tests: REFLECT: status 143
+ 63 60
+ FOO
+ 63 60
+diff --git a/tests/coproc.tests b/tests/coproc.tests
+index 8be3563..d347eb7 100644
+--- a/tests/coproc.tests
++++ b/tests/coproc.tests
+@@ -1,6 +1,13 @@
++: ${TMPDIR:=/tmp}
++TMPOUT=${TMPDIR}/coproc-wait-$BASHPID
++
+ coproc { echo a b c; sleep 2; }
+ 
+-echo $COPROC_PID
++case $COPROC_PID in
++[0-9]*)	;;
++*)	echo COPROC_PID not integer ;;
++esac
++
+ echo ${COPROC[@]}
+ 
+ read LINE <&${COPROC[0]}
+@@ -10,7 +17,11 @@ wait $COPROC_PID
+ 
+ coproc REFLECT { cat - ; }
+ 
+-echo $REFLECT_PID
++case $REFLECT_PID in
++[0-9]*)	;;
++*)	echo REFLECT_PID not integer ;;
++esac
++
+ echo ${REFLECT[@]}
+ 
+ echo flop >&${REFLECT[1]}
+@@ -18,12 +29,21 @@ read LINE <&${REFLECT[0]}
+ 
+ echo $LINE
+ 
+-kill $REFLECT_PID
+-wait $REFLECT_PID
++{ sleep 1; kill $REFLECT_PID; } &
++wait $REFLECT_PID >$TMPOUT 2>&1 || echo "coproc.tests: REFLECT: status $?"
++grep 'Terminated.*coproc.*REFLECT' < $TMPOUT >/dev/null 2>&1 || {
++	echo "coproc.tests: wait for REFLECT failed" >&2
++}
++rm -f $TMPOUT
++exec 2>&1
+ 
+ coproc xcase -n -u
+ 
+-echo $COPROC_PID
++case $COPROC_PID in
++[0-9]*)	;;
++*)	echo COPROC_PID not integer ;;
++esac
++
+ echo ${COPROC[@]}
+ 
+ echo foo >&${COPROC[1]}
+diff --git a/tests/heredoc.right b/tests/heredoc.right
+index 6abaa1f..8df91c5 100644
+--- a/tests/heredoc.right
++++ b/tests/heredoc.right
+@@ -76,15 +76,14 @@ ENDEND
+ end ENDEND
+ hello
+ end hello
+-x star x
+ end x*x
+ helloEND
+ end helloEND
+ hello
+ \END
+ end hello<NL>\END
+-./heredoc3.sub: line 74: warning: here-document at line 72 delimited by end-of-file (wanted `EOF')
+-./heredoc3.sub: line 75: syntax error: unexpected end of file
++./heredoc3.sub: line 75: warning: here-document at line 73 delimited by end-of-file (wanted `EOF')
++./heredoc3.sub: line 76: syntax error: unexpected end of file
+ comsub here-string
+ ./heredoc.tests: line 105: warning: here-document at line 103 delimited by end-of-file (wanted `EOF')
+ hi
+diff --git a/tests/heredoc3.sub b/tests/heredoc3.sub
+index 73a111e..9d3d846 100644
+--- a/tests/heredoc3.sub
++++ b/tests/heredoc3.sub
+@@ -49,9 +49,10 @@ hello
+     END    
+ echo end hello
+ 
+-cat <<x*x & touch 'x*x'
++cat <<x*x >/dev/null & touch 'x*x'
+ x star x
+ x*x
++wait $!
+ echo end 'x*x'
+ rm 'x*x'
+ 
+diff --git a/tests/run-execscript b/tests/run-execscript
+index f97ab21..0d00a1b 100644
+--- a/tests/run-execscript
++++ b/tests/run-execscript
+@@ -5,5 +5,6 @@ echo "warning: \`/tmp/bash-notthere' not being found or \`/' being a directory"
+ echo "warning: produce diff output, please do not consider this a test failure" >&2
+ echo "warning: if diff output differing only in the location of the bash" >&2
+ echo "warning: binary appears, please do not consider this a test failure" >&2
+-${THIS_SH} ./execscript > /tmp/xx 2>&1
++rm -f /tmp/xx
++su -c "${THIS_SH} ./execscript > /tmp/xx 2>&1" test
+ diff /tmp/xx exec.right && rm -f /tmp/xx
+diff --git a/tests/run-test b/tests/run-test
+index b2482c3..2e8f049 100644
+--- a/tests/run-test
++++ b/tests/run-test
+@@ -1,4 +1,5 @@
+ unset GROUPS UID 2>/dev/null
+ 
+-${THIS_SH} ./test.tests >/tmp/xx 2>&1
++rm -f /tmp/xx
++su -c "${THIS_SH} ./test.tests >/tmp/xx 2>&1" test
+ diff /tmp/xx test.right && rm -f /tmp/xx
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/bash/bash/run-ptest b/yocto-poky/meta/recipes-extended/bash/bash/run-ptest
index e3f8133..2098fa4 100644
--- a/yocto-poky/meta/recipes-extended/bash/bash/run-ptest
+++ b/yocto-poky/meta/recipes-extended/bash/bash/run-ptest
@@ -1,2 +1,2 @@
 #!/bin/sh
-make -k THIS_SH=/bin/bash BUILD_DIR=. srcdir=.  runtest
+make -k THIS_SH=/bin/bash BUILD_DIR=`pwd` srcdir=`pwd`  runtest
diff --git a/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb b/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb
index 811e61c..4426cf0 100644
--- a/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb
+++ b/yocto-poky/meta/recipes-extended/bash/bash_4.3.30.bb
@@ -18,6 +18,7 @@
            file://mkbuiltins_have_stringize.patch \
            file://build-tests.patch \
            file://test-output.patch \
+           file://fix-run-coproc-run-heredoc-run-execscript-run-test-f.patch \
            file://run-ptest \
            "
 
diff --git a/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb b/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb
index 679196b..d6250a9 100644
--- a/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb
+++ b/yocto-poky/meta/recipes-extended/blktool/blktool_4-7.bb
@@ -18,6 +18,10 @@
 SRC_URI[tarball.md5sum] = "62edc09c9908107e69391c87f4f3fd40"
 SRC_URI[tarball.sha256sum] = "b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764"
 
+# for this package we're mostly interested in tracking debian patches,
+# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
+
 S = "${WORKDIR}/${BPN}-4.orig"
 
 inherit autotools pkgconfig
diff --git a/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am b/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
index 1d163b6..05d389f 100644
--- a/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
+++ b/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/Makefile.am
@@ -1,5 +1,6 @@
 
 lib_LTLIBRARIES = libbz2.la
+libbz2_la_LDFLAGS = -version-info 1:6:0
 
 libbz2_la_SOURCES = blocksort.c  \
                     huffman.c    \
diff --git a/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac b/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
index 47ee576..e2bf1bf 100644
--- a/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
+++ b/yocto-poky/meta/recipes-extended/bzip2/bzip2-1.0.6/configure.ac
@@ -1,12 +1,9 @@
 AC_PREREQ([2.57])
 
-AC_INIT(bzip2, 2.0.5, , libXrender)
+AC_INIT(bzip2, 1.0.6)
 AM_INIT_AUTOMAKE(foreign)
 AM_MAINTAINER_MODE
 
-#AM_CONFIG_HEADER(config.h)
-
-# Check for progs
 AC_PROG_CC
 AC_PROG_LIBTOOL
 
diff --git a/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb b/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
index d7b8c06..f717d85 100644
--- a/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
+++ b/yocto-poky/meta/recipes-extended/bzip2/bzip2_1.0.6.bb
@@ -17,6 +17,8 @@
 SRC_URI[md5sum] = "00b516f4704d4a7cb50a1d97e6e8e15b"
 SRC_URI[sha256sum] = "a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd"
 
+UPSTREAM_CHECK_URI = "http://www.bzip.org/downloads.html"
+
 PACKAGES =+ "libbz2"
 
 CFLAGS_append = " -fPIC -fpic -Winline -fno-strength-reduce -D_FILE_OFFSET_BITS=64"
diff --git a/yocto-poky/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
index 7fd34aa..c0f7f16 100644
--- a/yocto-poky/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
+++ b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig-alternatives-native_1.3.59.bb
@@ -10,6 +10,7 @@
 # support for alternatives.
 SRC_URI = "git://github.com/kergoth/chkconfig;branch=sysroot"
 S = "${WORKDIR}/git"
+UPSTREAM_CHECK_GITTAGREGEX = "chkconfig-(?P<pver>(\d+(\.\d+)+))"
 
 SRCREV = "cd437ecbd8986c894442f8fce1e0061e20f04dee"
 PV = "1.3.59+${SRCPV}"
diff --git a/yocto-poky/meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch
new file mode 100644
index 0000000..96d1938
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig/replace_caddr_t.patch
@@ -0,0 +1,33 @@
+caddr_t is a legacy BSD type which was rejected by the POSIX standard.
+Use void * instead.
+
+sys/unitstd.h is not needed and moreover its not available on all C library
+implementations e.g. musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: chkconfig-1.3.58/alternatives.c
+===================================================================
+--- chkconfig-1.3.58.orig/alternatives.c
++++ chkconfig-1.3.58/alternatives.c
+@@ -22,7 +22,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/stat.h>
+-#include <sys/unistd.h>
+ #include <unistd.h>
+ 
+ #define	FLAGS_TEST	(1 << 0)
+Index: chkconfig-1.3.58/leveldb.c
+===================================================================
+--- chkconfig-1.3.58.orig/leveldb.c
++++ chkconfig-1.3.58/leveldb.c
+@@ -442,7 +442,7 @@ int parseServiceInfo(int fd, char * name
+     fstat(fd, &sb);
+ 
+     bufstart = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
+-    if (bufstart == ((caddr_t) -1)) {
++    if (bufstart == ((void*) -1)) {
+ 	close(fd);
+ 	return -1;
+     }
diff --git a/yocto-poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
index 488847a..e839026 100644
--- a/yocto-poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
+++ b/yocto-poky/meta/recipes-extended/chkconfig/chkconfig_1.3.58.bb
@@ -16,7 +16,9 @@
 
 PR = "r7"
 
-SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2"
+SRC_URI = "http://fedorahosted.org/releases/c/h/chkconfig/${BPN}-${PV}.tar.bz2 \
+           file://replace_caddr_t.patch \
+          "
 
 SRC_URI[md5sum] = "c2039ca67f2749fe0c06ef7c6f8ee246"
 SRC_URI[sha256sum] = "18b497d25b2cada955c72810e45fcad8280d105f17cf45e2970f18271211de68"
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch
deleted file mode 100644
index b54afb8..0000000
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/cpio-CVE-2015-1197.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-Description: CVE-2015-1197
- Apply patch by Vitezslav Cizek of SuSE to fix CVE-2015-1197.
- Upstream is dormant or no longer existing. To restore the old
- behaviour use --extract-over-symlinks (Closes: #774669)
- This issue has been discovered by Alexander Cherepanov.
-Author: Vitezslav Cizek <vcizek@suse.cz>
-Bug-Debian: https://bugs.debian.org/774669
-
-Upstream-Status: Backport
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
---- cpio-2.11+dfsg.orig/doc/cpio.1
-+++ cpio-2.11+dfsg/doc/cpio.1
-@@ -22,6 +22,7 @@ cpio \- copy files to and from archives
- [\-\-owner=[user][:.][group]] [\-\-no-preserve-owner] [\-\-message=message]
- [\-\-force\-local] [\-\-no\-absolute\-filenames] [\-\-sparse]
- [\-\-only\-verify\-crc] [\-\-to\-stdout] [\-\-quiet] [\-\-rsh-command=command]
-+[\-\-extract\-over\-symlinks]
- [\-\-help] [\-\-version] [pattern...] [< archive]
- 
- .B cpio
---- cpio-2.11+dfsg.orig/src/copyin.c
-+++ cpio-2.11+dfsg/src/copyin.c
-@@ -700,6 +700,51 @@ copyin_link (struct cpio_file_stat *file
-   free (link_name);
- }
- 
-+
-+static int
-+path_contains_symlink(char *path)
-+{
-+  struct stat st;
-+  char *slash;
-+  char *nextslash;
-+
-+  /* we got NULL pointer or empty string */
-+  if (!path || !*path) {
-+    return false;
-+  }
-+
-+  slash = path;
-+
-+  while ((nextslash = strchr(slash + 1, '/')) != NULL) {
-+    slash = nextslash;
-+    *slash = '\0';
-+
-+    if (lstat(path, &st) != 0) {
-+      if (errno == ELOOP) {
-+        /* ELOOP - too many symlinks */
-+        *slash = '/';
-+        return true;
-+      } else if (errno == ENOMEM) {
-+        /* No memory for lstat - terminate */
-+        xalloc_die();
-+      } else {
-+        /* cannot lstat path - give up */
-+        *slash = '/';
-+        return false;
-+      }
-+    }
-+
-+    if (S_ISLNK(st.st_mode)) {
-+      *slash = '/';
-+      return true;
-+    }
-+
-+    *slash = '/';
-+  }
-+
-+  return false;
-+}
-+
- static void
- copyin_file (struct cpio_file_stat *file_hdr, int in_file_des)
- {
-@@ -1471,6 +1516,23 @@ process_copy_in ()
- 	{
- 	  /* Copy the input file into the directory structure.  */
- 
-+          /* Can we write files over symlinks? */
-+          if (!extract_over_symlinks)
-+            {
-+              if (path_contains_symlink(file_hdr.c_name))
-+                {
-+                  /* skip the file */
-+                  /*
-+                  fprintf(stderr, "Can't write over symlinks. Skipping %s\n", file_hdr.c_name);
-+                  tape_toss_input (in_file_des, file_hdr.c_filesize);
-+                  tape_skip_padding (in_file_des, file_hdr.c_filesize);
-+                  continue;
-+                  */
-+                  /* terminate */
-+	          error (1, 0, _("Can't write over symlinks: %s\n"), file_hdr.c_name);
-+                }
-+            }
-+
- 	  /* Do we need to rename the file? */
- 	  if (rename_flag || rename_batch_file)
- 	    {
---- cpio-2.11+dfsg.orig/src/extern.h
-+++ cpio-2.11+dfsg/src/extern.h
-@@ -95,6 +95,7 @@ extern char input_is_special;
- extern char output_is_special;
- extern char input_is_seekable;
- extern char output_is_seekable;
-+extern bool extract_over_symlinks;
- extern int (*xstat) ();
- extern void (*copy_function) ();
- 
---- cpio-2.11+dfsg.orig/src/global.c
-+++ cpio-2.11+dfsg/src/global.c
-@@ -187,6 +187,9 @@ bool to_stdout_option = false;
- /* The name this program was run with.  */
- char *program_name;
- 
-+/* Extract files over symbolic links */
-+bool extract_over_symlinks;
-+
- /* A pointer to either lstat or stat, depending on whether
-    dereferencing of symlinks is done for input files.  */
- int (*xstat) ();
---- cpio-2.11+dfsg.orig/src/main.c
-+++ cpio-2.11+dfsg/src/main.c
-@@ -57,7 +57,8 @@ enum cpio_options {
-   FORCE_LOCAL_OPTION,            
-   DEBUG_OPTION,                  
-   BLOCK_SIZE_OPTION,             
--  TO_STDOUT_OPTION
-+  TO_STDOUT_OPTION,
-+  EXTRACT_OVER_SYMLINKS
- };
- 
- const char *program_authors[] =
-@@ -222,6 +223,8 @@ static struct argp_option options[] = {
-    N_("Create leading directories where needed"), GRID+1 },
-   {"no-preserve-owner", NO_PRESERVE_OWNER_OPTION, 0, 0,
-    N_("Do not change the ownership of the files"), GRID+1 },
-+  {"extract-over-symlinks", EXTRACT_OVER_SYMLINKS, 0, 0,
-+   N_("Force writing over symbolic links"), GRID+1 },
-   {"unconditional", 'u', NULL, 0,
-    N_("Replace all files unconditionally"), GRID+1 },
-   {"sparse", SPARSE_OPTION, NULL, 0,
-@@ -412,6 +415,10 @@ crc newc odc bin ustar tar (all-caps als
-       no_chown_flag = true;
-       break;
- 
-+    case EXTRACT_OVER_SYMLINKS:		        /* --extract-over-symlinks */
-+      extract_over_symlinks = true;
-+      break;
-+
-     case 'o':		/* Copy-out mode.  */
-       if (copy_function != 0)
- 	error (PAXEXIT_FAILURE, 0, _("Mode already defined"));
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch
deleted file mode 100644
index 89cd3cf..0000000
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/fix-memory-overrun.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-cpio: Fix memory overrun on reading improperly created link records
-
-Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
-
-http://git.savannah.gnu.org/cgit/cpio.git/commit/?id=746f3ff670dcfcdd28fcc990e79cd6fccc7ae48d
-
-  * src/copyin.c (get_link_name): New function.
-  (list_file, copyin_link): use get_link_name
-
-  * tests/symlink-bad-length.at: New file.
-  * tests/symlink-long.at: New file.
-  * tests/Makefile.am: Add new files.
-  * tests/testsuite.at: Likewise.
-
-  See http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
-
-Upstream-Status: Backport
-
-Signed-off-by: Sergey Poznyakoff <gray@gnu.org.ua>
-
-diff -Nurp cpio-2.11.orig/src/copyin.c cpio-2.11/src/copyin.c
---- cpio-2.11.orig/src/copyin.c	2010-02-15 18:02:23.000000000 +0800
-+++ cpio-2.11/src/copyin.c	2014-12-08 13:14:04.355547508 +0800
-@@ -126,6 +126,28 @@ tape_skip_padding (int in_file_des, off_
- }
- 
- 
-+static char *
-+get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
-+{
-+  off_t n = file_hdr->c_filesize + 1;
-+  char *link_name;
-+
-+  if (n == 0 || n > SIZE_MAX)
-+    {
-+      error (0, 0, _("%s: stored filename length too big"), file_hdr->c_name);
-+      link_name = NULL;
-+    }
-+  else
-+    {
-+      link_name = xmalloc (n);
-+      tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
-+      link_name[file_hdr->c_filesize] = '\0';
-+      tape_skip_padding (in_file_des, file_hdr->c_filesize);
-+    }
-+  return link_name;
-+}
-+
-+
- static void
- list_file(struct cpio_file_stat* file_hdr, int in_file_des)
- {
-@@ -136,21 +158,16 @@ list_file(struct cpio_file_stat* file_hd
- 	{
- 	  if (archive_format != arf_tar && archive_format != arf_ustar)
- 	    {
--	      char *link_name = NULL;	/* Name of hard and symbolic links.  */
--
--	      link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
--	      link_name[file_hdr->c_filesize] = '\0';
--	      tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
--	      long_format (file_hdr, link_name);
--	      free (link_name);
--	      tape_skip_padding (in_file_des, file_hdr->c_filesize);
--	      return;
-+	      char *link_name = get_link_name (file_hdr, in_file_des);
-+	      if (link_name)
-+		{
-+		  long_format (file_hdr, link_name);
-+		  free (link_name);
-+		}
- 	    }
- 	  else
--	    {
- 	      long_format (file_hdr, file_hdr->c_tar_linkname);
--	      return;
--	    }
-+	  return;
- 	}
-       else
- #endif
-@@ -650,10 +667,7 @@ copyin_link(struct cpio_file_stat *file_
- 
-   if (archive_format != arf_tar && archive_format != arf_ustar)
-     {
--      link_name = (char *) xmalloc ((unsigned int) file_hdr->c_filesize + 1);
--      link_name[file_hdr->c_filesize] = '\0';
--      tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
--      tape_skip_padding (in_file_des, file_hdr->c_filesize);
-+      link_name = get_link_name (file_hdr, in_file_des);
-     }
-   else
-     {
-diff -Nurp cpio-2.11.orig/tests/Makefile.am cpio-2.11/tests/Makefile.am
---- cpio-2.11.orig/tests/Makefile.am	2010-02-15 18:02:23.000000000 +0800
-+++ cpio-2.11/tests/Makefile.am	2014-12-08 13:14:49.931545727 +0800
-@@ -52,6 +52,8 @@ TESTSUITE_AT = \
-  setstat04.at\
-  setstat05.at\
-  symlink.at\
-+ symlink-bad-length.at\
-+ symlink-long.at\
-  version.at
- 
- TESTSUITE = $(srcdir)/testsuite
-diff -Nurp cpio-2.11.orig/tests/symlink-bad-length.at cpio-2.11/tests/symlink-bad-length.at
---- cpio-2.11.orig/tests/symlink-bad-length.at	1970-01-01 08:00:00.000000000 +0800
-+++ cpio-2.11/tests/symlink-bad-length.at	2014-12-08 13:17:45.979538847 +0800
-@@ -0,0 +1,49 @@
-+# Process this file with autom4te to create testsuite.  -*- Autotest -*-
-+# Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3, or (at your option)
-+# any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+# 02110-1301 USA.
-+
-+# Cpio v2.11 did segfault with badly set symlink length.
-+# References:
-+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
-+
-+AT_SETUP([symlink-bad-length])
-+AT_KEYWORDS([symlink-long copyout])
-+
-+AT_DATA([ARCHIVE.base64],
-+[x3EjAIBAtIEtJy8nAQAAAHRUYW0FAAAADQBGSUxFAABzb21lIGNvbnRlbnQKAMdxIwBgQ/+hLScv
-+JwEAAAB0VEhuBQD/////TElOSwAARklMRcdxAAAAAAAAAAAAAAEAAAAAAAAACwAAAAAAVFJBSUxF
-+UiEhIQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
-+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
-+])
-+
-+AT_CHECK([
-+base64 -d ARCHIVE.base64 > ARCHIVE || AT_SKIP_TEST
-+cpio -ntv < ARCHIVE
-+test $? -eq 2
-+],
-+[0],
-+[-rw-rw-r--   1 10029    10031          13 Nov 25 13:52 FILE
-+],[cpio: LINK: stored filename length too big
-+cpio: premature end of file
-+])
-+
-+AT_CLEANUP
-diff -Nurp cpio-2.11.orig/tests/symlink-long.at cpio-2.11/tests/symlink-long.at
---- cpio-2.11.orig/tests/symlink-long.at	1970-01-01 08:00:00.000000000 +0800
-+++ cpio-2.11/tests/symlink-long.at	2014-12-08 13:17:57.219538408 +0800
-@@ -0,0 +1,46 @@
-+# Process this file with autom4te to create testsuite.  -*- Autotest -*-
-+# Copyright (C) 2014 Free Software Foundation, Inc.
-+
-+# This program is free software; you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation; either version 3, or (at your option)
-+# any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program; if not, write to the Free Software
-+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-+# 02110-1301 USA.
-+
-+# Cpio v2.11.90 changed the way symlink name is read from archive.
-+# References:
-+# http://lists.gnu.org/archive/html/bug-cpio/2014-11/msg00007.html
-+
-+AT_SETUP([symlink-long])
-+AT_KEYWORDS([symlink-long copyout])
-+
-+AT_CHECK([
-+
-+# len(dirname) > READBUFSIZE
-+dirname=
-+for i in {1..52}; do
-+    dirname="xxxxxxxxx/$dirname"
-+    mkdir "$dirname"
-+done
-+ln -s "$dirname" x || AT_SKIP_TEST
-+
-+echo x | cpio -o > ar
-+list=`cpio -tv < ar | sed 's|.*-> ||'`
-+test "$list" = "$dirname" && echo success || echo fail
-+],
-+[0],
-+[success
-+],[2 blocks
-+2 blocks
-+])
-+
-+AT_CLEANUP
-diff -Nurp cpio-2.11.orig/tests/testsuite.at cpio-2.11/tests/testsuite.at
---- cpio-2.11.orig/tests/testsuite.at	2010-02-15 18:02:23.000000000 +0800
-+++ cpio-2.11/tests/testsuite.at	2014-12-08 13:15:13.515544805 +0800
-@@ -31,6 +31,8 @@ m4_include([version.at])
- 
- m4_include([inout.at])
- m4_include([symlink.at])
-+m4_include([symlink-bad-length.at])
-+m4_include([symlink-long.at])
- m4_include([interdir.at])
- 
- m4_include([setstat01.at])
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch
deleted file mode 100644
index b4d113d..0000000
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/remove-gets.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-Index: cpio-2.11/gnu/stdio.in.h
-===================================================================
---- cpio-2.11.orig/gnu/stdio.in.h	2012-07-04 12:13:43.133066247 -0700
-+++ cpio-2.11/gnu/stdio.in.h	2012-07-04 12:14:10.189067564 -0700
-@@ -138,8 +138,10 @@
- /* It is very rare that the developer ever has full control of stdin,
-    so any use of gets warrants an unconditional warning.  Assume it is
-    always declared, since it is required by C89.  */
-+#if defined gets
- #undef gets
- _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
-+#endif
- 
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/statdef.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
deleted file mode 100644
index a6b8e82..0000000
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/statdef.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Avoid multiple stat definitions
-Patch taken from cpio mailing list posting 2010-03-19
-
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -urN cpio-2.11.orig/src/filetypes.h cpio-2.11/src/filetypes.h
---- cpio-2.11.orig/src/filetypes.h	2010-02-12 02:19:23.000000000 -0800
-+++ cpio-2.11/src/filetypes.h	2010-07-23 13:17:25.000000000 -0700
-@@ -82,4 +82,6 @@
- #define lstat stat
- #endif
- int lstat ();
-+#ifndef stat
- int stat ();
-+#endif
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-CVE-2015-1197.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-CVE-2015-1197.patch
new file mode 100644
index 0000000..5c99919
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Fix-CVE-2015-1197.patch
@@ -0,0 +1,178 @@
+From dcee489f821c1260a0136fcdfdb6ff4dd11086ac Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 9 Dec 2015 17:58:03 +0200
+Subject: [PATCH] Fix CVE-2015-1197
+
+Apply patch by Vitezslav Cizek of SuSE to fix CVE-2015-1197.
+Upstream is dormant or no longer existing. To restore the old
+behaviour use --extract-over-symlinks (Closes: #774669)
+This issue has been discovered by Alexander Cherepanov.
+Author: Vitezslav Cizek <vcizek@suse.cz>
+Bug-Debian: https://bugs.debian.org/774669
+
+Upstream-Status: Pending
+CVE: CVE-2015-1197
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ doc/cpio.1   |  1 +
+ src/copyin.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/extern.h |  1 +
+ src/global.c |  3 +++
+ src/main.c   |  7 +++++++
+ 5 files changed, 74 insertions(+)
+
+diff --git a/doc/cpio.1 b/doc/cpio.1
+index 2a68241..dc4676c 100644
+--- a/doc/cpio.1
++++ b/doc/cpio.1
+@@ -49,6 +49,7 @@ cpio \- copy files to and from archives
+ [\fB\-\-no\-preserve\-owner\fR] [\fB\-\-message=\fIMESSAGE\fR]
+ [\fB\-\-force\-local\fR] [\fB\-\-no\-absolute\-filenames\fR] [\fB\-\-sparse\fR]
+ [\fB\-\-only\-verify\-crc\fR] [\fB\-\-to\-stdout\fR] [\fB\-\-quiet\fR]
++[\fB\-\-extract\-over\-symlinks\fR]
+ [\fB\-\-rsh\-command=\fICOMMAND\fR]
+ [\fIpattern\fR...] [\fB<\fR \fIarchive\fR]
+ 
+diff --git a/src/copyin.c b/src/copyin.c
+index cde911e..053afe7 100644
+--- a/src/copyin.c
++++ b/src/copyin.c
+@@ -695,6 +695,51 @@ copyin_link (struct cpio_file_stat *file_hdr, int in_file_des)
+   free (link_name);
+ }
+ 
++
++static int
++path_contains_symlink(char *path)
++{
++  struct stat st;
++  char *slash;
++  char *nextslash;
++
++  /* we got NULL pointer or empty string */
++  if (!path || !*path) {
++    return false;
++  }
++
++  slash = path;
++
++  while ((nextslash = strchr(slash + 1, '/')) != NULL) {
++    slash = nextslash;
++    *slash = '\0';
++
++    if (lstat(path, &st) != 0) {
++      if (errno == ELOOP) {
++        /* ELOOP - too many symlinks */
++        *slash = '/';
++        return true;
++      } else if (errno == ENOMEM) {
++        /* No memory for lstat - terminate */
++        xalloc_die();
++      } else {
++        /* cannot lstat path - give up */
++        *slash = '/';
++        return false;
++      }
++    }
++
++    if (S_ISLNK(st.st_mode)) {
++      *slash = '/';
++      return true;
++    }
++
++    *slash = '/';
++  }
++
++  return false;
++}
++
+ static void
+ copyin_file (struct cpio_file_stat *file_hdr, int in_file_des)
+ {
+@@ -1468,6 +1513,23 @@ process_copy_in ()
+ 	{
+ 	  /* Copy the input file into the directory structure.  */
+ 
++          /* Can we write files over symlinks? */
++          if (!extract_over_symlinks)
++            {
++              if (path_contains_symlink(file_hdr.c_name))
++                {
++                  /* skip the file */
++                  /*
++                  fprintf(stderr, "Can't write over symlinks. Skipping %s\n", file_hdr.c_name);
++                  tape_toss_input (in_file_des, file_hdr.c_filesize);
++                  tape_skip_padding (in_file_des, file_hdr.c_filesize);
++                  continue;
++                  */
++                  /* terminate */
++	          error (1, 0, _("Can't write over symlinks: %s\n"), file_hdr.c_name);
++                }
++            }
++
+ 	  /* Do we need to rename the file? */
+ 	  if (rename_flag || rename_batch_file)
+ 	    {
+diff --git a/src/extern.h b/src/extern.h
+index e27d662..d864bde 100644
+--- a/src/extern.h
++++ b/src/extern.h
+@@ -96,6 +96,7 @@ extern char input_is_special;
+ extern char output_is_special;
+ extern char input_is_seekable;
+ extern char output_is_seekable;
++extern bool extract_over_symlinks;
+ extern int (*xstat) ();
+ extern void (*copy_function) ();
+ extern char *change_directory_option;
+diff --git a/src/global.c b/src/global.c
+index 57e505a..336fce4 100644
+--- a/src/global.c
++++ b/src/global.c
+@@ -187,6 +187,9 @@ bool to_stdout_option = false;
+ /* The name this program was run with.  */
+ char *program_name;
+ 
++/* Extract files over symbolic links */
++bool extract_over_symlinks;
++
+ /* A pointer to either lstat or stat, depending on whether
+    dereferencing of symlinks is done for input files.  */
+ int (*xstat) ();
+diff --git a/src/main.c b/src/main.c
+index a13861f..87cb309 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -59,6 +59,7 @@ enum cpio_options {
+   DEBUG_OPTION,                  
+   BLOCK_SIZE_OPTION,             
+   TO_STDOUT_OPTION,
++  EXTRACT_OVER_SYMLINKS,
+   RENUMBER_INODES_OPTION,
+   IGNORE_DEVNO_OPTION,
+   DEVICE_INDEPENDENT_OPTION
+@@ -243,6 +244,8 @@ static struct argp_option options[] = {
+    N_("Create leading directories where needed"), GRID+1 },
+   {"no-preserve-owner", NO_PRESERVE_OWNER_OPTION, 0, 0,
+    N_("Do not change the ownership of the files"), GRID+1 },
++  {"extract-over-symlinks", EXTRACT_OVER_SYMLINKS, 0, 0,
++   N_("Force writing over symbolic links"), GRID+1 },
+   {"unconditional", 'u', NULL, 0,
+    N_("Replace all files unconditionally"), GRID+1 },
+   {"sparse", SPARSE_OPTION, NULL, 0,
+@@ -432,6 +435,10 @@ crc newc odc bin ustar tar (all-caps also recognized)"), arg));
+       no_chown_flag = true;
+       break;
+ 
++    case EXTRACT_OVER_SYMLINKS:                        /* --extract-over-symlinks */
++      extract_over_symlinks = true;
++      break;
++
+     case 'o':		/* Copy-out mode.  */
+       if (copy_function != 0)
+ 	USAGE_ERROR ((0, 0, _("Mode already defined")));
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Unset-need_charset_alias-when-building-for-musl.patch
similarity index 100%
rename from yocto-poky/meta/recipes-extended/cpio/cpio-2.11/0001-Unset-need_charset_alias-when-building-for-musl.patch
rename to yocto-poky/meta/recipes-extended/cpio/cpio-2.12/0001-Unset-need_charset_alias-when-building-for-musl.patch
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch b/yocto-poky/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
index 49a7cf5..a315735 100644
--- a/yocto-poky/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio-2.8/avoid_heap_overflow.patch
@@ -1,4 +1,5 @@
 Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
+CVE: CVE-2010-0624
 
 This patch avoids heap overflow reported by :
 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio_2.11.bb b/yocto-poky/meta/recipes-extended/cpio/cpio_2.11.bb
deleted file mode 100644
index c5d92bf..0000000
--- a/yocto-poky/meta/recipes-extended/cpio/cpio_2.11.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-include cpio_v2.inc
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
-
-PR = "r5"
-
-SRC_URI += "file://remove-gets.patch \
-        file://fix-memory-overrun.patch \
-        file://cpio-CVE-2015-1197.patch \
-        file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-        "
-
-SRC_URI[md5sum] = "1112bb6c45863468b5496ba128792f6c"
-SRC_URI[sha256sum] = "601b1d774cd6e4cd39416203c91ec59dbd65dd27d79d75e1a9b89497ea643978"
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio_2.12.bb b/yocto-poky/meta/recipes-extended/cpio/cpio_2.12.bb
new file mode 100644
index 0000000..e743999
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio_2.12.bb
@@ -0,0 +1,12 @@
+include cpio_v2.inc
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+
+SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+           file://0001-Fix-CVE-2015-1197.patch \
+           "
+
+SRC_URI[md5sum] = "fc207561a86b63862eea4b8300313e86"
+SRC_URI[sha256sum] = "08a35e92deb3c85d269a0059a27d4140a9667a6369459299d08c17f713a92e73"
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio_2.8.bb b/yocto-poky/meta/recipes-extended/cpio/cpio_2.8.bb
index 3f97dbe..624906b 100644
--- a/yocto-poky/meta/recipes-extended/cpio/cpio_2.8.bb
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio_2.8.bb
@@ -5,7 +5,9 @@
 
 PR = "r4"
 
-SRC_URI += "file://m4extensions.patch \
+SRC_URI += " \
+	    file://statdef.patch \
+	    file://m4extensions.patch \
 	    file://avoid_heap_overflow.patch \
 	    file://fix-memory-overrun.patch \
 	   "
diff --git a/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc b/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc
index 8520ff2..1bdc617 100644
--- a/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc
+++ b/yocto-poky/meta/recipes-extended/cpio/cpio_v2.inc
@@ -7,7 +7,6 @@
 DEPENDS = "texinfo-native"
 
 SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \
-    file://statdef.patch \
     "
 
 inherit autotools gettext texinfo
diff --git a/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb b/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
index c0ffe33..3bd3f93 100644
--- a/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
+++ b/yocto-poky/meta/recipes-extended/cracklib/cracklib_2.9.5.bb
@@ -18,6 +18,9 @@
 SRC_URI[md5sum] = "376790a95c1fb645e59e6e9803c78582"
 SRC_URI[sha256sum] = "59ab0138bc8cf90cccb8509b6969a024d5e58d2d02bcbdccbb9ba9b88be3fa33"
 
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/cracklib/files/cracklib/"
+UPSTREAM_CHECK_REGEX = "/cracklib/(?P<pver>(\d+[\.\-_]*)+)/"
+
 inherit autotools gettext pythonnative python-dir
 
 do_install_append_class-target() {
@@ -26,20 +29,19 @@
 
 do_install_append() {
 	src_dir="${D}${base_libdir}/${PYTHON_DIR}/site-packages"
-	rm -f $src_dir/*.pyo
-	rm -f $src_dir/test_cracklib.py
-	# Move python files from ${base_libdir} to ${libdir} since used --libdir=${base_libdir}
-	install -d -m 0755 ${D}${PYTHON_SITEPACKAGES_DIR}/
-	mv $src_dir/* ${D}${PYTHON_SITEPACKAGES_DIR}
-	rm -fr ${D}${base_libdir}/${PYTHON_DIR}
+	rm -f $src_dir/test_cracklib.py*
+
+	if [ "${base_libdir}" != "${libdir}" ] ; then
+	   # Move python files from ${base_libdir} to ${libdir} since used --libdir=${base_libdir}
+	   install -d -m 0755 ${D}${PYTHON_SITEPACKAGES_DIR}/
+	   mv $src_dir/* ${D}${PYTHON_SITEPACKAGES_DIR}
+	   rm -fr ${D}${base_libdir}/${PYTHON_DIR}
+	fi
 }
 
 BBCLASSEXTEND = "native nativesdk"
 
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/cracklib.py \
-	${PYTHON_SITEPACKAGES_DIR}/_cracklib.so \
-    "
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/_cracklib.so"
-FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_cracklib.a \
-	${PYTHON_SITEPACKAGES_DIR}/_cracklib.la \
-    "
+FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/cracklib.py* \
+	${PYTHON_SITEPACKAGES_DIR}/_cracklib.*"
+
+FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_cracklib.a"
diff --git a/yocto-poky/meta/recipes-extended/cups/cups.inc b/yocto-poky/meta/recipes-extended/cups/cups.inc
index 2c34da9..4b2d214 100644
--- a/yocto-poky/meta/recipes-extended/cups/cups.inc
+++ b/yocto-poky/meta/recipes-extended/cups/cups.inc
@@ -3,15 +3,15 @@
 LICENSE = "GPLv2 & LGPLv2"
 DEPENDS = "gnutls libpng jpeg dbus dbus-glib zlib libusb"
 
-SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
+SRC_URI = "https://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
            file://use_echo_only_in_init.patch \
            file://0001-don-t-try-to-run-generated-binaries.patch \
            file://cups_serverbin.patch \
-           file://cups.socket \
-           file://cups.path \
-           file://cups.service \
 	  "
 
+UPSTREAM_CHECK_URI = "http://www.cups.org/software.php"
+UPSTREAM_CHECK_REGEX = "cups-(?P<pver>\d+\.\d+(\.\d+)?)-source.tar"
+
 LEAD_SONAME = "libcupsdriver.so"
 
 CLEANBROKEN = "1"
@@ -21,13 +21,15 @@
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "--system lpadmin"
 
-SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service"
+SYSTEMD_SERVICE_${PN} = "org.cups.cupsd.socket org.cups.cupsd.path org.cups.cupsd.service org.cups.cups-lpd.socket org.cups.cups-lpd@.service"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
 PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
 PACKAGECONFIG[acl] = "--enable-acl,--disable-acl,acl"
 PACKAGECONFIG[pam] = "--enable-pam, --disable-pam, libpam"
+PACKAGECONFIG[systemd] = "--with-systemd=${systemd_system_unitdir},--without-systemd,systemd"
 PACKAGECONFIG[xinetd] = "--with-xinetd=${sysconfdir}/xinetd.d,--without-xinetd,xinetd"
 
 EXTRA_OECONF = " \
@@ -75,13 +77,6 @@
 	    rm -rf ${D}${sysconfdir}/init.d/
 	    rm -rf ${D}${sysconfdir}/rc*
 	fi
-
-	# Install systemd unit files
-	install -d ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system
-	sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service
 }
 
 python do_package_append() {
@@ -106,14 +101,6 @@
 
 FILES_${PN}-libimage = "${libdir}/libcupsimage.so.*"
 
-FILES_${PN}-dbg += "${libdir}/cups/backend/.debug \
-                    ${libdir}/cups/cgi-bin/.debug \
-                    ${libdir}/cups/filter/.debug \
-                    ${libdir}/cups/monitor/.debug \
-                    ${libdir}/cups/notifier/.debug \
-                    ${libdir}/cups/daemon/.debug \
-                   "
-
 #package the html for the webgui inside the main packages (~1MB uncompressed)
 
 FILES_${PN} += "${datadir}/doc/cups/images \
diff --git a/yocto-poky/meta/recipes-extended/cups/cups/cups.path b/yocto-poky/meta/recipes-extended/cups/cups/cups.path
deleted file mode 100644
index de8cc57..0000000
--- a/yocto-poky/meta/recipes-extended/cups/cups/cups.path
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=CUPS Printer Service Spool
-
-[Path]
-PathExistsGlob=/var/spool/cups/d*
-
-[Install]
-WantedBy=multi-user.target
diff --git a/yocto-poky/meta/recipes-extended/cups/cups/cups.service b/yocto-poky/meta/recipes-extended/cups/cups/cups.service
deleted file mode 100644
index 7d3e839..0000000
--- a/yocto-poky/meta/recipes-extended/cups/cups/cups.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=CUPS Printing Service
-
-[Service]
-ExecStart=@SBINDIR@/cupsd -f
-PrivateTmp=true
-
-[Install]
-Also=cups.socket cups.path
-WantedBy=printer.target
diff --git a/yocto-poky/meta/recipes-extended/cups/cups/cups.socket b/yocto-poky/meta/recipes-extended/cups/cups/cups.socket
deleted file mode 100644
index 3314870..0000000
--- a/yocto-poky/meta/recipes-extended/cups/cups/cups.socket
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=CUPS Printing Service Sockets
-
-[Socket]
-ListenStream=/var/run/cups/cups.sock
-
-[Install]
-WantedBy=sockets.target
diff --git a/yocto-poky/meta/recipes-extended/cups/cups_2.0.4.bb b/yocto-poky/meta/recipes-extended/cups/cups_2.0.4.bb
deleted file mode 100644
index bad73b3..0000000
--- a/yocto-poky/meta/recipes-extended/cups/cups_2.0.4.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require cups.inc
-
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
-
-SRC_URI[md5sum] = "f5c847d9a4fac6c4c66fb0526a7afaae"
-SRC_URI[sha256sum] = "e1d5e68d9f24faca317aeaebc164c34102813bc0f1d69c00b3a59b49c49f4abd"
diff --git a/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb b/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb
new file mode 100644
index 0000000..aef211d
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/cups/cups_2.1.3.bb
@@ -0,0 +1,6 @@
+require cups.inc
+
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6c5a350596fba02754bd96eb6df3afd0"
+
+SRC_URI[md5sum] = "62b8fafd590e75f72316915790b0850a"
+SRC_URI[sha256sum] = "36a70d43584aea2617da914b9331e23341c3501a8254c4d2eae9c11ec01fd4d3"
diff --git a/yocto-poky/meta/recipes-extended/ed/ed_0.5.bb b/yocto-poky/meta/recipes-extended/ed/ed_0.5.bb
index 143e636..e2df13f 100644
--- a/yocto-poky/meta/recipes-extended/ed/ed_0.5.bb
+++ b/yocto-poky/meta/recipes-extended/ed/ed_0.5.bb
@@ -15,7 +15,6 @@
 
 EXTRA_OECONF = "'CC=${CC}' 'CXX=${CXX}' 'CFLAGS=${CFLAGS}' 'CXXFLAGS=${CXXFLAGS}' 'CPPFLAGS=${CPPFLAGS}' 'LDFLAGS=${LDFLAGS}'"
 
-CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-dependency-tracking', ' ')}"
-CONFIGUREOPTS := "${@d.getVar('CONFIGUREOPTS', True).replace('--disable-silent-rules', ' ')}"
-
-
+CONFIGUREOPTS_remove = "--disable-dependency-tracking"
+CONFIGUREOPTS_remove = "--disable-silent-rules"
+EXTRA_OECONF_remove = "--disable-static"
diff --git a/yocto-poky/meta/recipes-extended/ed/ed_1.9.bb b/yocto-poky/meta/recipes-extended/ed/ed_1.9.bb
index 8e94eed..f2ec42a 100644
--- a/yocto-poky/meta/recipes-extended/ed/ed_1.9.bb
+++ b/yocto-poky/meta/recipes-extended/ed/ed_1.9.bb
@@ -16,6 +16,8 @@
 SRC_URI[md5sum] = "565b6d1d5a9a8816b9b304fc4ed9405d"
 SRC_URI[sha256sum] = "d5b372cfadf073001823772272fceac2cfa87552c5cd5a8efc1c8aae61f45a88"
 
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
 inherit texinfo
 
 do_configure() {
diff --git a/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.0.bb b/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.0.bb
deleted file mode 100644
index 13f2b1c..0000000
--- a/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.0.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Display or change ethernet card settings"
-DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
-HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
-SECTION = "console/network"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
-
-SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
-           file://run-ptest \
-           file://avoid_parallel_tests.patch \
-           "
-
-SRC_URI[md5sum] = "0a1c78787c7dcf077016ed86372a472f"
-SRC_URI[sha256sum] = "e200516727cc9583e8b63fd6e72f667f9ed41bb4f0577ff4803b60c64cfd1dbc"
-
-inherit autotools ptest
-RDEPENDS_${PN}-ptest += "make"
-
-do_compile_ptest() {
-   oe_runmake buildtest-TESTS
-}
-
-do_install_ptest () {
-   cp ${B}/Makefile                 ${D}${PTEST_PATH}
-   install ${B}/test-cmdline        ${D}${PTEST_PATH}
-   install ${B}/test-features       ${D}${PTEST_PATH}
-   install ${B}/ethtool             ${D}${PTEST_PATH}/ethtool
-   sed -i 's/^Makefile/_Makefile/'  ${D}${PTEST_PATH}/Makefile
-}
diff --git a/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.2.bb b/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.2.bb
new file mode 100644
index 0000000..95df784
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ethtool/ethtool_4.2.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Display or change ethernet card settings"
+DESCRIPTION = "A small utility for examining and tuning the settings of your ethernet-based network interfaces."
+HOMEPAGE = "http://www.kernel.org/pub/software/network/ethtool/"
+SECTION = "console/network"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://ethtool.c;beginline=4;endline=17;md5=c19b30548c582577fc6b443626fc1216"
+
+SRC_URI = "${KERNELORG_MIRROR}/software/network/ethtool/ethtool-${PV}.tar.gz \
+           file://run-ptest \
+           file://avoid_parallel_tests.patch \
+           "
+
+SRC_URI[md5sum] = "5b55f7cd76e901dfc2738ac22cab96ca"
+SRC_URI[sha256sum] = "f84226db8dd18afaf91d8d00f5cb8f87ec3d7f787d2a3605de08d6dfa95ab8ef"
+
+inherit autotools ptest
+RDEPENDS_${PN}-ptest += "make"
+
+do_compile_ptest() {
+   oe_runmake buildtest-TESTS
+}
+
+do_install_ptest () {
+   cp ${B}/Makefile                 ${D}${PTEST_PATH}
+   install ${B}/test-cmdline        ${D}${PTEST_PATH}
+   install ${B}/test-features       ${D}${PTEST_PATH}
+   install ${B}/ethtool             ${D}${PTEST_PATH}/ethtool
+   sed -i 's/^Makefile/_Makefile/'  ${D}${PTEST_PATH}/Makefile
+}
diff --git a/yocto-poky/meta/recipes-extended/findutils/findutils.inc b/yocto-poky/meta/recipes-extended/findutils/findutils.inc
index 37c84cc..bfedf87 100644
--- a/yocto-poky/meta/recipes-extended/findutils/findutils.inc
+++ b/yocto-poky/meta/recipes-extended/findutils/findutils.inc
@@ -6,10 +6,9 @@
 BUGTRACKER = "http://savannah.gnu.org/bugs/?group=findutils"
 SECTION = "console/utils"
 
+SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz"
 
-SRC_URI = "ftp://alpha.gnu.org/gnu/${BPN}/${BP}.tar.gz"
-
-inherit autotools gettext texinfo update-alternatives
+inherit autotools gettext texinfo update-alternatives upstream-version-is-even
 
 ALTERNATIVE_${PN} = "find xargs"
 ALTERNATIVE_PRIORITY = "100"
diff --git a/yocto-poky/meta/recipes-extended/findutils/findutils_4.5.14.bb b/yocto-poky/meta/recipes-extended/findutils/findutils_4.5.14.bb
deleted file mode 100644
index a58a82f..0000000
--- a/yocto-poky/meta/recipes-extended/findutils/findutils_4.5.14.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require findutils.inc
-
-# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
-LICENSE = "GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
- 
-DEPENDS = "bison-native"
-
-SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
-
-SRC_URI[md5sum] = "a8a8176282fd28e8d1234c84d847fa66"
-SRC_URI[sha256sum] = "0de3cf625a5c9f154eee3171e072515ffdde405244dd00502af617ac57b73ae2"
-
-# http://savannah.gnu.org/bugs/?27299
-CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
-
-EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
diff --git a/yocto-poky/meta/recipes-extended/findutils/findutils_4.6.0.bb b/yocto-poky/meta/recipes-extended/findutils/findutils_4.6.0.bb
new file mode 100644
index 0000000..072d3b3
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/findutils/findutils_4.6.0.bb
@@ -0,0 +1,17 @@
+require findutils.inc
+
+# GPLv2+ (<< 4.2.32), GPLv3+ (>= 4.2.32)
+LICENSE = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
+
+DEPENDS = "bison-native"
+
+SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch"
+
+SRC_URI[md5sum] = "9936aa8009438ce185bea2694a997fc1"
+SRC_URI[sha256sum] = "ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d"
+
+# http://savannah.gnu.org/bugs/?27299
+CACHED_CONFIGUREVARS += "${@bb.utils.contains('DISTRO_FEATURES', 'libc-posix-clang-wchar', 'gl_cv_func_wcwidth_works=yes', '', d)}"
+
+EXTRA_OECONF += "ac_cv_path_SORT=${bindir}/sort"
diff --git a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch b/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch
deleted file mode 100644
index aaedc88..0000000
--- a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8327.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Backport
-
-
-http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7406
-
-Hand applied change to util.c. Fix was for cups-filters but also applied to foomatic-filters.
-
-CVE: CVE-2015-8327
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: util.c
-===================================================================
---- a/util.c
-+++ b/util.c
-@@ -31,7 +31,7 @@
- #include <assert.h>
- 
- 
--const char* shellescapes = "|;<>&!$\'\"#*?()[]{}";
-+const char* shellescapes = "|;<>&!$\'\"`#*?()[]{}";
- 
- const char * temp_dir()
- {
diff --git a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch b/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch
deleted file mode 100644
index dc973c4..0000000
--- a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters-4.0.17/CVE-2015-8560.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Upstream-Status: Backport
-
-
-http://bzr.linuxfoundation.org/loggerhead/openprinting/cups-filters/revision/7419
-
-Hand applied change to util.c. Fix was for cups-filters but also applied to foomatic-filters.
-
-CVE: CVE-2015-8560
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: util.c
-===================================================================
---- a/util.c
-+++ b/util.c
-@@ -31,7 +31,7 @@
- #include <assert.h>
- 
- 
--const char* shellescapes = "|<>&!$\'\"#*?()[]{}";
-+const char* shellescapes = "|;<>&!$\'\"#*?()[]{}";
- 
- const char * temp_dir()
- {
diff --git a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb b/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
index 58ef1f5..0cffedd 100644
--- a/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
+++ b/yocto-poky/meta/recipes-extended/foomatic/foomatic-filters_4.0.17.bb
@@ -17,13 +17,11 @@
 
 SRC_URI = "http://www.openprinting.org/download/foomatic/foomatic-filters-${PV}.tar.gz"
 
-SRC_URI += "file://CVE-2015-8560.patch \
-            file://CVE-2015-8327.patch \
-           "
-
 SRC_URI[md5sum] = "b05f5dcbfe359f198eef3df5b283d896"
 SRC_URI[sha256sum] = "a2e2e53e502571e88eeb9010c45a0d54671f15707ee104f5c9c22b59ea7a33e3"
 
+UPSTREAM_CHECK_REGEX = "foomatic-filters-(?P<pver>((\d|\d\d)\.*)+)\.tar\.gz"
+
 inherit autotools pkgconfig
 
 EXTRA_OECONF += "--disable-file-converter-check --with-file-converter=texttops"
diff --git a/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb b/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb
index c7af4a9..7c92bde 100644
--- a/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb
+++ b/yocto-poky/meta/recipes-extended/gawk/gawk_3.1.5.bb
@@ -26,9 +26,8 @@
 PACKAGES += "gawk-common pgawk"
 
 FILES_${PN} = "${bindir}/gawk* ${bindir}/igawk"
-FILES_gawk-common += "${datadir}/awk/* ${libdir}/gawk/awk/*"
+FILES_gawk-common += "${datadir}/awk/* ${libexecdir}/awk/*"
 FILES_pgawk = "${bindir}/pgawk*"
-FILES_${PN}-dbg += "${libdir}/gawk/awk/.debug"
 
 ALTERNATIVE_${PN} = "awk"
 ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
diff --git a/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.3.bb b/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.3.bb
index d1a88e4..6ca7f3e 100644
--- a/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.3.bb
+++ b/yocto-poky/meta/recipes-extended/gawk/gawk_4.1.3.bb
@@ -26,7 +26,6 @@
 
 FILES_${PN} += "${datadir}/awk"
 FILES_${PN}-dev += "${libdir}/${BPN}/*.la"
-FILES_${PN}-dbg += "${libexecdir}/awk/.debug"
 
 ALTERNATIVE_${PN} = "awk"
 ALTERNATIVE_TARGET[awk] = "${bindir}/gawk"
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch b/yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch
new file mode 100644
index 0000000..d586a1d
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ghostscript/files/0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch
@@ -0,0 +1,81 @@
+From 1d19998091154f89b8294e4594a05986b4c2f822 Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Wed, 13 Jan 2016 02:08:42 -0500
+Subject: [PATCH 1/2] Bug 696497: Fix support for building with no jbig2
+ decoder
+
+Author: Chris Liddell <chris.liddell@artifex.com>
+
+Upstream-Status: Backport
+http://bugs.ghostscript.com/show_bug.cgi?id=696497
+http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=b0f5a975
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ base/lib.mak |  9 +++++++++
+ psi/int.mak  | 23 ++++++++++++++++++-----
+ 2 files changed, 27 insertions(+), 5 deletions(-)
+
+diff --git a/base/lib.mak b/base/lib.mak
+index 241df2f..daa7056 100644
+--- a/base/lib.mak
++++ b/base/lib.mak
+@@ -1732,6 +1732,10 @@ $(GLD)sjbig2_jbig2dec.dev : $(LIB_MAK) $(ECHOGS_XE) \
+ 	$(SETMOD) $(GLD)sjbig2_jbig2dec $(sjbig2_jbig2dec)
+ 	$(ADDMOD) $(GLD)sjbig2_jbig2dec -include $(GLD)jbig2dec.dev
+ 
++$(GLD)sjbig2_.dev : $(LIB_MAK) $(ECHOGS_XE) \
++  $(LIB_MAK) $(MAKEDIRS)
++	$(SETMOD) $(GLD)sjbig2_
++
+ # jbig2dec.dev is defined in jbig2.mak
+ 
+ $(GLOBJ)sjbig2.$(OBJ) : $(GLSRC)sjbig2.c $(AK) \
+@@ -1739,6 +1743,11 @@ $(GLOBJ)sjbig2.$(OBJ) : $(GLSRC)sjbig2.c $(AK) \
+  $(sjbig2_h) $(strimpl_h) $(MAKEDIRS)
+ 	$(GLJBIG2CC) $(GLO_)sjbig2.$(OBJ) $(C_) $(GLSRC)sjbig2.c
+ 
++$(GLOBJ)snojbig2.$(OBJ) : $(GLSRC)snojbig2.c $(AK) \
++ $(stdint__h) $(memory__h) $(stdio__h) $(gserrors_h) $(gdebug_h) \
++ $(strimpl_h) $(LIB_MAK) $(MAKEDIRS)
++	$(GLJBIG2CC) $(GLO_)snojbig2.$(OBJ) $(C_) $(GLSRC)snojbig2.c
++
+ # luratech version
+ sjbig2_luratech=$(GLOBJ)sjbig2_luratech.$(OBJ)
+ 
+diff --git a/psi/int.mak b/psi/int.mak
+index 6149a3b..f9d667d 100644
+--- a/psi/int.mak
++++ b/psi/int.mak
+@@ -1254,11 +1254,24 @@ $(PSOBJ)zfaes.$(OBJ) : $(PSSRC)zfaes.c $(OP) $(memory__h)\
+ # this can be turned on and off with a FEATURE_DEV
+ 
+ fjbig2_=$(PSOBJ)zfjbig2_$(JBIG2_LIB).$(OBJ)
+-$(PSD)jbig2.dev : $(INT_MAK) $(ECHOGS_XE) $(fjbig2_) $(GLD)sjbig2.dev\
+- $(MAKEDIRS)
+-	$(SETMOD) $(PSD)jbig2 $(fjbig2_)
+-	$(ADDMOD) $(PSD)jbig2 -include $(GLD)sjbig2
+-	$(ADDMOD) $(PSD)jbig2 -oper zfjbig2
++
++$(PSD)jbig2_jbig2dec.dev : $(ECHOGS_XE) $(fjbig2_) $(GLD)sjbig2.dev\
++ $(INT_MAK) $(MAKEDIRS)
++	$(SETMOD) $(PSD)jbig2_jbig2dec $(fjbig2_)
++	$(ADDMOD) $(PSD)jbig2_jbig2dec -include $(GLD)sjbig2
++	$(ADDMOD) $(PSD)jbig2_jbig2dec -oper zfjbig2
++
++$(PSD)jbig2_luratech.dev : $(ECHOGS_XE) $(fjbig2_) $(GLD)sjbig2.dev\
++ $(INT_MAK) $(MAKEDIRS)
++	$(SETMOD) $(PSD)jbig2_luratech $(fjbig2_)
++	$(ADDMOD) $(PSD)jbig2_luratech -include $(GLD)sjbig2
++	$(ADDMOD) $(PSD)jbig2_luratech -oper zfjbig2
++
++$(PSD)jbig2_.dev : $(ECHOGS_XE) $(INT_MAK) $(MAKEDIRS)
++	$(SETMOD) $(PSD)jbig2_ 
++
++$(PSD)jbig2.dev : $(PSD)jbig2_$(JBIG2_LIB).dev $(INT_MAK) $(MAKEDIRS)
++	$(CP_) $(PSD)jbig2_$(JBIG2_LIB).dev $(PSD)jbig2.dev
+ 
+ $(PSOBJ)zfjbig2_jbig2dec.$(OBJ) : $(PSSRC)zfjbig2.c $(OP) $(memory__h)\
+  $(gsstruct_h) $(gstypes_h) $(ialloc_h) $(idict_h) $(ifilter_h)\
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch b/yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch
new file mode 100644
index 0000000..fcfc479
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ghostscript/files/0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch
@@ -0,0 +1,48 @@
+From 3b43f93ec02611c4d554612953f5b64765b8683b Mon Sep 17 00:00:00 2001
+From: Chris Liddell <chris.liddell@artifex.com>
+Date: Wed, 13 Jan 2016 02:14:55 -0500
+Subject: [PATCH 2/2] Bug 696497 (part 2): fix support for building with a JPX
+ decoder
+
+Author: Chris Liddell <chris.liddell@artifex.com>
+
+Upstream-Status: Backport
+http://bugs.ghostscript.com/show_bug.cgi?id=696497
+http://git.ghostscript.com/?p=ghostpdl.git;a=commitdiff;h=b0f5a975
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ base/lib.mak | 3 +++
+ psi/int.mak  | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/base/lib.mak b/base/lib.mak
+index daa7056..8853dd5 100644
+--- a/base/lib.mak
++++ b/base/lib.mak
+@@ -1774,6 +1774,9 @@ $(GLOBJ)sjpx.$(OBJ) : $(GLSRC)sjpx.c $(AK) \
+  $(gdebug_h) $(strimpl_h) $(sjpx_h) $(MAKEDIRS)
+ 	$(GLJASCC) $(GLO_)sjpx.$(OBJ) $(C_) $(GLSRC)sjpx.c
+ 
++$(GLD)sjpx_.dev : $(LIB_MAK) $(ECHOGS_XE) $(LIB_MAK) $(MAKEDIRS)
++	$(SETMOD) $(GLD)sjpx_
++
+ # luratech version
+ sjpx_luratech=$(GLOBJ)sjpx_luratech.$(OBJ)
+ $(GLD)sjpx_luratech.dev : $(LIB_MAK) $(ECHOGS_XE) \
+diff --git a/psi/int.mak b/psi/int.mak
+index f9d667d..db01b65 100644
+--- a/psi/int.mak
++++ b/psi/int.mak
+@@ -1290,6 +1290,9 @@ $(PSD)jpx.dev : $(INT_MAK) $(ECHOGS_XE) $(PSD)jpx_$(JPX_LIB).dev\
+  $(MAKEDIRS)
+ 	$(CP_) $(PSD)jpx_$(JPX_LIB).dev $(PSD)jpx.dev
+ 
++$(PSD)jpx_.dev : $(ECHOGS_XE) $(INT_MAK) $(MAKEDIRS)
++	$(SETMOD) $(PSD)jpx_
++
+ fjpx_luratech=$(PSOBJ)zfjpx_luratech.$(OBJ)
+ 
+ $(PSOBJ)zfjpx.$(OBJ) : $(PSSRC)zfjpx.c $(OP) $(memory__h)\
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch b/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch
new file mode 100644
index 0000000..b445a6c
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ghostscript/files/do-not-check-local-libpng-source.patch
@@ -0,0 +1,38 @@
+From 5ef8b85bc98f3bd9a15d5f47e24d3e23ae27c265 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Mon, 18 Jan 2016 01:00:30 -0500
+Subject: [PATCH] configure.ac: do not check local png source
+
+In oe-core, it did not need to compile local libpng
+source in ghostscript, so do not check local png
+source, and directly check the existance of shared
+libpng library.
+
+Upstream-Status: Inappropriate [OE-Core specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ab30a97..b762fd7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -955,11 +955,11 @@ AC_SUBST(ZLIBDIR)
+ AC_SUBST(FT_SYS_ZLIB)
+ 
+ dnl png for the png output device; it also requires zlib
+-LIBPNGDIR=src
++LIBPNGDIR=$srcdir/libpng
+ PNGDEVS=''
+ PNGDEVS_ALL='png48 png16m pnggray pngmono png256 png16 pngalpha'
+ AC_MSG_CHECKING([for local png library source])
+-if test -f $srcdir/libpng/pngread.c; then
++if false; then
+         AC_MSG_RESULT([yes])
+         SHARE_LIBPNG=0
+         LIBPNGDIR=$srcdir/libpng
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/nios2/objarch.h b/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/nios2/objarch.h
new file mode 100644
index 0000000..3ec8101
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ghostscript/ghostscript/nios2/objarch.h
@@ -0,0 +1,40 @@
+/* Parameters derived from machine and compiler architecture. */
+/* This file is generated mechanically by genarch.c. */
+
+	 /* ---------------- Scalar alignments ---------------- */
+
+#define ARCH_ALIGN_SHORT_MOD 2
+#define ARCH_ALIGN_INT_MOD 4
+#define ARCH_ALIGN_LONG_MOD 4
+#define ARCH_ALIGN_PTR_MOD 4
+#define ARCH_ALIGN_FLOAT_MOD 4
+#define ARCH_ALIGN_DOUBLE_MOD 4
+
+	 /* ---------------- Scalar sizes ---------------- */
+
+#define ARCH_LOG2_SIZEOF_CHAR 0
+#define ARCH_LOG2_SIZEOF_SHORT 1
+#define ARCH_LOG2_SIZEOF_INT 2
+#define ARCH_LOG2_SIZEOF_LONG 2
+#define ARCH_LOG2_SIZEOF_LONG_LONG 3
+#define ARCH_SIZEOF_GX_COLOR_INDEX 8
+#define ARCH_SIZEOF_PTR 4
+#define ARCH_SIZEOF_FLOAT 4
+#define ARCH_SIZEOF_DOUBLE 8
+#define ARCH_FLOAT_MANTISSA_BITS 24
+#define ARCH_DOUBLE_MANTISSA_BITS 53
+
+	 /* ---------------- Unsigned max values ---------------- */
+
+#define ARCH_MAX_UCHAR ((unsigned char)0xff + (unsigned char)0)
+#define ARCH_MAX_USHORT ((unsigned short)0xffff + (unsigned short)0)
+#define ARCH_MAX_UINT ((unsigned int)~0 + (unsigned int)0)
+#define ARCH_MAX_ULONG ((unsigned long)~0L + (unsigned long)0)
+
+	 /* ---------------- Miscellaneous ---------------- */
+
+#define ARCH_IS_BIG_ENDIAN 0
+#define ARCH_PTRS_ARE_SIGNED 0
+#define ARCH_FLOATS_ARE_IEEE 1
+#define ARCH_ARITH_RSHIFT 2
+#define ARCH_DIV_NEG_POS_TRUNCATES 1
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.16.bb b/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.16.bb
deleted file mode 100644
index d584c49..0000000
--- a/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.16.bb
+++ /dev/null
@@ -1,104 +0,0 @@
-SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
-DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing.  Usually as \
-a back-end to a program such as ghostview, it can display PostScript and PDF \
-documents in an X11 environment. \
-\
-Furthermore, it can render PostScript and PDF files as graphics to be printed \
-on non-PostScript printers. Supported printers include common \
-dot-matrix, inkjet and laser models. \
-"
-HOMEPAGE = "http://www.ghostscript.com"
-SECTION = "console/utils"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b17cea54743435ab2a581c237bea294a"
-
-DEPENDS = "ghostscript-native tiff jpeg fontconfig cups"
-DEPENDS_class-native = ""
-
-SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz \
-                file://ghostscript-9.15-parallel-make.patch \
-                file://ghostscript-9.16-Werror-return-type.patch \
-                file://png_mak.patch \
-"
-
-SRC_URI = "${SRC_URI_BASE} \
-           file://ghostscript-9.02-prevent_recompiling.patch \
-           file://ghostscript-9.02-genarch.patch \
-           file://objarch.h \
-           file://cups-no-gcrypt.patch \
-           "
-
-SRC_URI_class-native = "${SRC_URI_BASE} \
-                        file://ghostscript-native-fix-disable-system-libtiff.patch \
-                        file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
-                        "
-
-SRC_URI[md5sum] = "829319325bbdb83f5c81379a8f86f38f"
-SRC_URI[sha256sum] = "746d77280cca8afdd3d4c2c1389e332ed9b0605bd107bcaae1d761b061d1a68d"
-
-EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
-                --with-fontpath=${datadir}/fonts \
-                --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \
-                --with-cups-datadir=${datadir}/cups \
-                ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--enable-little-endian', '--enable-big-endian', d)} \
-                "
-
-EXTRA_OECONF_append_mips = " --with-large_color_index=0"
-EXTRA_OECONF_append_mipsel = " --with-large_color_index=0"
-
-# Explicity disable libtiff, fontconfig,
-# freetype, cups for ghostscript-native
-EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
-                             --without-jbig2dec \
-                             --with-fontpath=${datadir}/fonts \
-                             --without-libidn --disable-fontconfig \
-                             --disable-freetype --disable-cups"
-
-# This has been fixed upstream but for now we need to subvert the check for time.h
-# http://bugs.ghostscript.com/show_bug.cgi?id=692443
-# http://bugs.ghostscript.com/show_bug.cgi?id=692426
-CFLAGS += "-DHAVE_SYS_TIME_H=1"
-BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
-
-inherit autotools
-
-do_configure_prepend () {
-	mkdir -p obj
-	mkdir -p soobj
-	if [ -e ${WORKDIR}/objarch.h ]; then
-		cp ${WORKDIR}/objarch.h obj/arch.h
-	fi
-}
-
-do_configure_append () {
-	# copy tools from the native ghostscript build
-	if [ "${PN}" != "ghostscript-native" ]; then
-		mkdir -p obj/aux soobj
-		for i in genarch genconf mkromfs echogs gendev genht; do
-			cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
-		done
-	fi
-}
-
-do_install_append () {
-    mkdir -p ${D}${datadir}/ghostscript/${PV}/
-    cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
-    cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
-}
-
-do_compile_class-native () {
-    mkdir -p obj
-    for i in genarch genconf mkromfs echogs gendev genht; do
-        oe_runmake obj/aux/$i
-    done
-}
-
-do_install_class-native () {
-    install -d ${D}${bindir}/ghostscript-${PV}
-    for i in genarch genconf mkromfs echogs gendev genht; do
-        install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
-    done
-}
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.18.bb b/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.18.bb
new file mode 100644
index 0000000..d4222c7
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ghostscript/ghostscript_9.18.bb
@@ -0,0 +1,107 @@
+SUMMARY = "The GPL Ghostscript PostScript/PDF interpreter"
+DESCRIPTION = "Ghostscript is used for PostScript/PDF preview and printing.  Usually as \
+a back-end to a program such as ghostview, it can display PostScript and PDF \
+documents in an X11 environment. \
+\
+Furthermore, it can render PostScript and PDF files as graphics to be printed \
+on non-PostScript printers. Supported printers include common \
+dot-matrix, inkjet and laser models. \
+"
+HOMEPAGE = "http://www.ghostscript.com"
+SECTION = "console/utils"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b17cea54743435ab2a581c237bea294a"
+
+DEPENDS = "ghostscript-native tiff jpeg fontconfig cups libpng"
+DEPENDS_class-native = "libpng-native"
+
+SRC_URI_BASE = "http://downloads.ghostscript.com/public/ghostscript-${PV}.tar.gz \
+                file://ghostscript-9.15-parallel-make.patch \
+                file://ghostscript-9.16-Werror-return-type.patch \
+                file://png_mak.patch \
+                file://0001-Bug-696497-Fix-support-for-building-with-no-jbig2-de.patch \
+                file://0002-Bug-696497-part-2-fix-support-for-building-with-a-JP.patch \
+                file://do-not-check-local-libpng-source.patch \
+"
+
+SRC_URI = "${SRC_URI_BASE} \
+           file://ghostscript-9.02-prevent_recompiling.patch \
+           file://ghostscript-9.02-genarch.patch \
+           file://objarch.h \
+           file://cups-no-gcrypt.patch \
+           "
+
+SRC_URI_class-native = "${SRC_URI_BASE} \
+                        file://ghostscript-native-fix-disable-system-libtiff.patch \
+                        file://base-genht.c-add-a-preprocessor-define-to-allow-fope.patch \
+                        "
+
+SRC_URI[md5sum] = "33a47567d7a591c00a253caddd12a88a"
+SRC_URI[sha256sum] = "5fc93079749a250be5404c465943850e3ed5ffbc0d5c07e10c7c5ee8afbbdb1b"
+
+EXTRA_OECONF = "--without-x --with-system-libtiff --without-jbig2dec \
+                --with-fontpath=${datadir}/fonts \
+                --without-libidn --with-cups-serverbin=${exec_prefix}/lib/cups \
+                --with-cups-datadir=${datadir}/cups \
+                ${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--enable-little-endian', '--enable-big-endian', d)} \
+                "
+
+EXTRA_OECONF_append_mips = " --with-large_color_index=0"
+EXTRA_OECONF_append_mipsel = " --with-large_color_index=0"
+
+# Explicity disable libtiff, fontconfig,
+# freetype, cups for ghostscript-native
+EXTRA_OECONF_class-native = "--without-x --with-system-libtiff=no \
+                             --without-jbig2dec \
+                             --with-fontpath=${datadir}/fonts \
+                             --without-libidn --disable-fontconfig \
+                             --disable-freetype --disable-cups"
+
+# This has been fixed upstream but for now we need to subvert the check for time.h
+# http://bugs.ghostscript.com/show_bug.cgi?id=692443
+# http://bugs.ghostscript.com/show_bug.cgi?id=692426
+CFLAGS += "-DHAVE_SYS_TIME_H=1"
+BUILD_CFLAGS += "-DHAVE_SYS_TIME_H=1"
+
+inherit autotools
+
+do_configure_prepend () {
+	mkdir -p obj
+	mkdir -p soobj
+	if [ -e ${WORKDIR}/objarch.h ]; then
+		cp ${WORKDIR}/objarch.h obj/arch.h
+	fi
+}
+
+do_configure_append () {
+	# copy tools from the native ghostscript build
+	if [ "${PN}" != "ghostscript-native" ]; then
+		mkdir -p obj/aux soobj
+		for i in genarch genconf mkromfs echogs gendev genht; do
+			cp ${STAGING_BINDIR_NATIVE}/ghostscript-${PV}/$i obj/aux/$i
+		done
+	fi
+}
+
+do_install_append () {
+    mkdir -p ${D}${datadir}/ghostscript/${PV}/
+    cp -r ${S}/Resource ${D}${datadir}/ghostscript/${PV}/
+    cp -r ${S}/iccprofiles ${D}${datadir}/ghostscript/${PV}/
+}
+
+do_compile_class-native () {
+    mkdir -p obj
+    for i in genarch genconf mkromfs echogs gendev genht; do
+        oe_runmake obj/aux/$i
+    done
+}
+
+do_install_class-native () {
+    install -d ${D}${bindir}/ghostscript-${PV}
+    for i in genarch genconf mkromfs echogs gendev genht; do
+        install -m 755 obj/aux/$i ${D}${bindir}/ghostscript-${PV}/$i
+    done
+}
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch b/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
index 059d068..721f2a0 100644
--- a/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
+++ b/yocto-poky/meta/recipes-extended/grep/grep-2.5.1a/grep-CVE-2012-5667.patch
@@ -10,6 +10,7 @@
 Upstream-Status: Inappropriate [other]
 This version of GNU Grep has been abandoned upstream and they are no longer
 accepting patches.  This is not a backport.
+CVE: CVE-2012-5667
 
 Signed-off-by Ming Liu <ming.liu@windriver.com>
 ---
diff --git a/yocto-poky/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch b/yocto-poky/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch
deleted file mode 100644
index e88a988..0000000
--- a/yocto-poky/meta/recipes-extended/grep/grep/grep-fix-CVE-2015-1345.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-Upstream-Status: Backport
-
-Backport patch to fix CVE-2015-1345.
-http://git.savannah.gnu.org/cgit/grep.git/commit/?id=83a95bd
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From 83a95bd8c8561875b948cadd417c653dbe7ef2e2 Mon Sep 17 00:00:00 2001
-From: Yuliy Pisetsky <ypisetsky@fb.com>
-Date: Thu, 1 Jan 2015 15:36:55 -0800
-Subject: [PATCH] grep -F: fix a heap buffer (read) overrun
-
-grep's read buffer is often filled to its full size, except when
-reading the final buffer of a file.  In that case, the number of
-bytes read may be far less than the size of the buffer.  However, for
-certain unusual pattern/text combinations, grep -F would mistakenly
-examine bytes in that uninitialized region of memory when searching
-for a match.  With carefully chosen inputs, one can cause grep -F to
-read beyond the end of that buffer altogether.  This problem arose via
-commit v2.18-90-g73893ff with the introduction of a more efficient
-heuristic using what is now the memchr_kwset function. The use of
-that function in bmexec_trans could leave TP much larger than EP,
-and the subsequent call to bm_delta2_search would mistakenly access
-beyond end of the main input read buffer.
-
-* src/kwset.c (bmexec_trans): When TP reaches or exceeds EP,
-do not call bm_delta2_search.
-* tests/kwset-abuse: New file.
-* tests/Makefile.am (TESTS): Add it.
-* THANKS.in: Update.
-* NEWS (Bug fixes): Mention it.
-
-Prior to this patch, this command would trigger a UMR:
-
-  printf %0360db 0 | valgrind src/grep -F $(printf %019dXb 0)
-
-  Use of uninitialised value of size 8
-     at 0x4142BE: bmexec_trans (kwset.c:657)
-     by 0x4143CA: bmexec (kwset.c:678)
-     by 0x414973: kwsexec (kwset.c:848)
-     by 0x414DC4: Fexecute (kwsearch.c:128)
-     by 0x404E2E: grepbuf (grep.c:1238)
-     by 0x4054BF: grep (grep.c:1417)
-     by 0x405CEB: grepdesc (grep.c:1645)
-     by 0x405EC1: grep_command_line_arg (grep.c:1692)
-     by 0x4077D4: main (grep.c:2570)
-
-See the accompanying test for how to trigger the heap buffer overrun.
-
-Thanks to Nima Aghdaii for testing and finding numerous
-ways to break early iterations of this patch.
----
- NEWS              |  5 +++++
- THANKS.in         |  1 +
- src/kwset.c       |  2 ++
- tests/Makefile.am |  1 +
- tests/kwset-abuse | 32 ++++++++++++++++++++++++++++++++
- 5 files changed, 41 insertions(+)
- create mode 100755 tests/kwset-abuse
-
-diff --git a/NEWS b/NEWS
-index 975440d..3835d8d 100644
---- a/NEWS
-+++ b/NEWS
-@@ -2,6 +2,11 @@ GNU grep NEWS                                    -*- outline -*-
- 
- * Noteworthy changes in release ?.? (????-??-??) [?]
- 
-+** Bug fixes
-+
-+  grep no longer reads from uninitialized memory or from beyond the end
-+  of the heap-allocated input buffer.
-+
- 
- * Noteworthy changes in release 2.21 (2014-11-23) [stable]
- 
-diff --git a/THANKS.in b/THANKS.in
-index aeaf516..624478d 100644
---- a/THANKS.in
-+++ b/THANKS.in
-@@ -62,6 +62,7 @@ Michael Aichlmayr                   mikla@nx.com
- Miles Bader                         miles@ccs.mt.nec.co.jp
- Mirraz Mirraz                       mirraz1@rambler.ru
- Nelson H. F. Beebe                  beebe@math.utah.edu
-+Nima Aghdaii                        naghdaii@fb.com
- Olaf Kirch                          okir@ns.lst.de
- Paul Kimoto                         kimoto@spacenet.tn.cornell.edu
- Péter Radics                        mitchnull@gmail.com
-diff --git a/src/kwset.c b/src/kwset.c
-index 4003c8d..376f7c3 100644
---- a/src/kwset.c
-+++ b/src/kwset.c
-@@ -643,6 +643,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size)
-                     if (! tp)
-                       return -1;
-                     tp++;
-+                    if (ep <= tp)
-+                      break;
-                   }
-               }
-           }
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 2cba2cd..0508cd2 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -75,6 +75,7 @@ TESTS =						\
-   inconsistent-range				\
-   invalid-multibyte-infloop			\
-   khadafy					\
-+  kwset-abuse					\
-   long-line-vs-2GiB-read			\
-   match-lines					\
-   max-count-overread				\
-diff --git a/tests/kwset-abuse b/tests/kwset-abuse
-new file mode 100755
-index 0000000..6d8ec0c
---- /dev/null
-+++ b/tests/kwset-abuse
-@@ -0,0 +1,32 @@
-+#! /bin/sh
-+# Evoke a segfault in a hard-to-reach code path of kwset.c.
-+# This bug affected grep versions 2.19 through 2.21.
-+#
-+# Copyright (C) 2015 Free Software Foundation, Inc.
-+#
-+# This program is free software: you can redistribute it and/or modify
-+# it under the terms of the GNU General Public License as published by
-+# the Free Software Foundation, either version 3 of the License, or
-+# (at your option) any later version.
-+
-+# This program is distributed in the hope that it will be useful,
-+# but WITHOUT ANY WARRANTY; without even the implied warranty of
-+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+# GNU General Public License for more details.
-+
-+# You should have received a copy of the GNU General Public License
-+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-+
-+. "${srcdir=.}/init.sh"; path_prepend_ ../src
-+
-+fail=0
-+
-+# This test case chooses a haystack of size 260,000, since prodding
-+# with gdb showed a reallocation slightly larger than that in fillbuf.
-+# To reach the buggy code, the needle must have length < 1/11 that of
-+# the haystack, and 10,000 is a nice round number that fits the bill.
-+printf '%0260000dXy\n' 0 | grep -F $(printf %010000dy 0)
-+
-+test $? = 1 || fail=1
-+
-+Exit $fail
--- 
-2.4.1
-
diff --git a/yocto-poky/meta/recipes-extended/grep/grep_2.21.bb b/yocto-poky/meta/recipes-extended/grep/grep_2.21.bb
deleted file mode 100644
index c51147b..0000000
--- a/yocto-poky/meta/recipes-extended/grep/grep_2.21.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-SUMMARY = "GNU grep utility"
-HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
-BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
-SECTION = "console/utils"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
-
-SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-           file://grep-fix-CVE-2015-1345.patch \
-          "
-
-SRC_URI[md5sum] = "43c48064d6409862b8a850db83c8038a"
-SRC_URI[sha256sum] = "5244a11c00dee8e7e5e714b9aaa053ac6cbfa27e104abee20d3c778e4bb0e5de"
-
-inherit autotools gettext texinfo
-
-EXTRA_OECONF = "--disable-perl-regexp"
-
-do_configure_prepend () {
-	rm -f ${S}/m4/init.m4
-}
-
-do_install () {
-	autotools_do_install
-	if [ "${base_bindir}" != "${bindir}" ]; then
-		install -d ${D}${base_bindir}
-		mv ${D}${bindir}/grep ${D}${base_bindir}/grep
-		mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
-		mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
-		rmdir ${D}${bindir}/
-	fi
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN} = "grep egrep fgrep"
-ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
-ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
-ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
-
-export CONFIG_SHELL="/bin/sh"
diff --git a/yocto-poky/meta/recipes-extended/grep/grep_2.23.bb b/yocto-poky/meta/recipes-extended/grep/grep_2.23.bb
new file mode 100644
index 0000000..13ff32d
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/grep/grep_2.23.bb
@@ -0,0 +1,43 @@
+SUMMARY = "GNU grep utility"
+HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
+BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
+SECTION = "console/utils"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=8006d9c814277c1bfc4ca22af94b59ee"
+
+SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+          "
+
+SRC_URI[md5sum] = "f46aa9d0d2577b9212a104348a286787"
+SRC_URI[sha256sum] = "54fc478ee1ce17780109820ef30730c9e18715a949f7d5c6afc673adb2a56ecf"
+
+inherit autotools gettext texinfo
+
+EXTRA_OECONF = "--disable-perl-regexp"
+
+do_configure_prepend () {
+	rm -f ${S}/m4/init.m4
+}
+
+do_install () {
+	autotools_do_install
+	if [ "${base_bindir}" != "${bindir}" ]; then
+		install -d ${D}${base_bindir}
+		mv ${D}${bindir}/grep ${D}${base_bindir}/grep
+		mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
+		mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
+		rmdir ${D}${bindir}/
+	fi
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN} = "grep egrep fgrep"
+ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
+ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
+ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/yocto-poky/meta/recipes-extended/gzip/gzip.inc b/yocto-poky/meta/recipes-extended/gzip/gzip.inc
index 58e5e0c..6e81883 100644
--- a/yocto-poky/meta/recipes-extended/gzip/gzip.inc
+++ b/yocto-poky/meta/recipes-extended/gzip/gzip.inc
@@ -6,8 +6,10 @@
 # change to GPLv3+ in 2007/07. Previous GPLv2 version is 1.3.12
 
 inherit autotools texinfo
+export DEFS="NO_ASM"
 
 EXTRA_OEMAKE_class-target = "GREP=${base_bindir}/grep"
+EXTRA_OECONF_append_libc-musl = " gl_cv_func_fflush_stdin=yes "
 
 do_install_append () {
 	if [ "${base_bindir}" != "${bindir}" ]; then
@@ -20,6 +22,11 @@
 	fi
 }
 
+do_install_append_libc-musl () {
+	rm ${D}${libdir}/charset.alias
+	rmdir ${D}${libdir}
+}
+
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
diff --git a/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb b/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb
index 8267fd9..ec3d26f 100644
--- a/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb
+++ b/yocto-poky/meta/recipes-extended/hdparm/hdparm_9.48.bb
@@ -21,7 +21,7 @@
 SRC_URI[md5sum] = "213efdbe7471fad3408198918e164354"
 SRC_URI[sha256sum] = "ce97b4a71cb04146f54cf6f69787e7f97ddfda9836dc803b459d3b3df3a4fbee"
 
-EXTRA_OEMAKE += 'STRIP="echo"'
+EXTRA_OEMAKE = '-e MAKEFLAGS= STRIP="echo"'
 
 inherit update-alternatives
 
diff --git a/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb b/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb
index 6b636ed..26b88c9 100644
--- a/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb
+++ b/yocto-poky/meta/recipes-extended/images/core-image-kernel-dev.bb
@@ -17,4 +17,4 @@
 IMAGE_ROOTFS_EXTRA_SPACE_append += "+ 3000000"
 
 # Let's define our own subset to test, we can later add a on-target kernel build even!
-DEFAULT_TEST_SUITES = "ping ssh df connman syslog scp date dmesg parselogs"
+DEFAULT_TEST_SUITES = "ping ssh df connman syslog scp date parselogs"
diff --git a/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb b/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
index 563260d..ad1407c 100644
--- a/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
+++ b/yocto-poky/meta/recipes-extended/images/core-image-testmaster-initramfs.bb
@@ -16,4 +16,5 @@
 inherit core-image
 
 IMAGE_ROOTFS_SIZE = "8192"
+IMAGE_ROOTFS_EXTRA_SPACE = "0"
 BAD_RECOMMENDATIONS += "busybox-syslog"
diff --git a/yocto-poky/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch b/yocto-poky/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
index ab609e2..b711b7a 100644
--- a/yocto-poky/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
+++ b/yocto-poky/meta/recipes-extended/iptables/iptables/0001-configure-Add-option-to-enable-disable-libnfnetlink.patch
@@ -1,47 +1,37 @@
-From 5c47cf5061b852c02178f01e23690bfe38a99d93 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 17 Mar 2013 11:21:35 -0700
-Subject: [PATCH] configure: Add option to enable/disable libnfnetlink
+[PATCH] configure: Add option to enable/disable libnfnetlink
 
 This changes the configure behaviour from autodetecting
 for libnfnetlink to having an option to disable it explicitly
 
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
 Upstream-Status: Pending
----
- configure.ac |   11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
 
-diff --git a/configure.ac b/configure.ac
-index ba616ab..ce2d315 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -53,6 +53,9 @@ AC_ARG_ENABLE([libipq],
- AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
- 	[Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
- 	[pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur iptables-1.6.0-old/configure.ac iptables-1.6.0/configure.ac
+--- iptables-1.6.0-old/configure.ac	2015-12-28 18:40:35.255417976 +0200
++++ iptables-1.6.0/configure.ac	2015-12-29 13:01:12.388840200 +0200
+@@ -63,6 +63,9 @@
+ AC_ARG_ENABLE([nftables],
+ 	AS_HELP_STRING([--disable-nftables], [Do not build nftables compat]),
+ 	[enable_nftables="$enableval"], [enable_nftables="yes"])
 +AC_ARG_ENABLE([libnfnetlink],
-+	AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]),
-+	[enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"])
++    AS_HELP_STRING([--disable-libnfnetlink], [Do not use netfilter netlink library]),
++    [enable_libnfnetlink="$enableval"], [enable_libnfnetlink="yes"])
  
  libiptc_LDFLAGS2="";
  AX_CHECK_LINKER_FLAGS([-Wl,--no-as-needed],
-@@ -89,9 +92,11 @@ AM_CONDITIONAL([ENABLE_LARGEFILE], [test "$enable_largefile" = "yes"])
- AM_CONDITIONAL([ENABLE_DEVEL], [test "$enable_devel" = "yes"])
- AM_CONDITIONAL([ENABLE_LIBIPQ], [test "$enable_libipq" = "yes"])
+@@ -123,9 +126,10 @@
+ 	AC_CHECK_LIB(pcap, pcap_compile,, AC_MSG_ERROR(missing libpcap library required by bpf compiler or nfsynproxy tool))
+ fi
  
 -PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0],
 -	[nfnetlink=1], [nfnetlink=0])
 -AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "$nfnetlink" = 1])
 +AS_IF([test "x$enable_libnfnetlink" = "xyes"], [
-+  PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0])
-+  ])
-+
++    PKG_CHECK_MODULES([libnfnetlink], [libnfnetlink >= 1.0])
++    ])
 +AM_CONDITIONAL([HAVE_LIBNFNETLINK], [test "x$enable_libnfnetlink" = "xyes"])
  
- regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
- 	-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
--- 
-1.7.9.5
-
+ if test "x$enable_nftables" = "xyes"; then
+ 	PKG_CHECK_MODULES([libmnl], [libmnl >= 1.0], [mnl=1], [mnl=0])
diff --git a/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch b/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
index 7a003d9..f1f85a6 100644
--- a/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
+++ b/yocto-poky/meta/recipes-extended/iptables/iptables/0001-fix-build-with-musl.patch
@@ -1,81 +1,41 @@
-From 7c07b7fd4fdd7844dd032af822306f08e4422c34 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 6 Apr 2015 20:47:29 -0700
-Subject: [PATCH] fix build with musl
+[PATCH] fix build with musl
 
-Add needed headers they are just not needed for glibc6+ but also
-for musl
 Define additional TCOPTS if not there
-
 u_initX types are in sys/types.h be explicit about it
 
 Upstream-Status: Pending
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
 ---
- extensions/libxt_TCPOPTSTRIP.c           | 15 +++++++++++++++
- include/libiptc/ipt_kernel_headers.h     | 12 ------------
- include/linux/netfilter_ipv4/ip_tables.h |  1 +
- 3 files changed, 16 insertions(+), 12 deletions(-)
-
-diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c
-index 6897857..8a170b2 100644
---- a/extensions/libxt_TCPOPTSTRIP.c
-+++ b/extensions/libxt_TCPOPTSTRIP.c
+diff -Naur iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c
+--- iptables-1.6.0-origin/extensions/libxt_TCPOPTSTRIP.c	2015-12-09 14:55:06.000000000 +0200
++++ iptables-1.6.0/extensions/libxt_TCPOPTSTRIP.c	2015-12-29 14:44:32.585327077 +0200
 @@ -12,6 +12,21 @@
  #ifndef TCPOPT_MD5SIG
  #	define TCPOPT_MD5SIG 19
  #endif
 +#ifndef TCPOPT_MAXSEG
-+#	define TCPOPT_MAXSEG 2
++#define TCPOPT_MAXSEG 2
 +#endif
 +#ifndef TCPOPT_WINDOW
-+#	define TCPOPT_WINDOW 3
++#define TCPOPT_WINDOW 3
 +#endif
 +#ifndef TCPOPT_SACK_PERMITTED
-+#	define TCPOPT_SACK_PERMITTED 4
++#define TCPOPT_SACK_PERMITTED 4
 +#endif
 +#ifndef TCPOPT_SACK
-+#	define TCPOPT_SACK 5
++#define TCPOPT_SACK 5
 +#endif
 +#ifndef TCPOPT_TIMESTAMP
-+#	define TCPOPT_TIMESTAMP 8
++#define TCPOPT_TIMESTAMP 8
 +#endif
  
  enum {
  	O_STRIP_OPTION = 0,
-diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h
-index 18861fe..a5963e9 100644
---- a/include/libiptc/ipt_kernel_headers.h
-+++ b/include/libiptc/ipt_kernel_headers.h
-@@ -5,7 +5,6 @@
- 
- #include <limits.h>
- 
--#if defined(__GLIBC__) && __GLIBC__ == 2
- #include <netinet/ip.h>
- #include <netinet/in.h>
- #include <netinet/ip_icmp.h>
-@@ -13,15 +12,4 @@
- #include <netinet/udp.h>
- #include <net/if.h>
- #include <sys/types.h>
--#else /* libc5 */
--#include <sys/socket.h>
--#include <linux/ip.h>
--#include <linux/in.h>
--#include <linux/if.h>
--#include <linux/icmp.h>
--#include <linux/tcp.h>
--#include <linux/udp.h>
--#include <linux/types.h>
--#include <linux/in6.h>
--#endif
- #endif
-diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
-index 57fd82a..4807246 100644
---- a/include/linux/netfilter_ipv4/ip_tables.h
-+++ b/include/linux/netfilter_ipv4/ip_tables.h
+diff -Naur iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h
+--- iptables-1.6.0-origin/include/linux/netfilter_ipv4/ip_tables.h	2015-12-09 14:55:06.000000000 +0200
++++ iptables-1.6.0/include/linux/netfilter_ipv4/ip_tables.h	2015-12-29 14:40:21.250469195 +0200
 @@ -15,6 +15,7 @@
  #ifndef _IPTABLES_H
  #define _IPTABLES_H
@@ -84,6 +44,3 @@
  #include <linux/types.h>
  
  #include <linux/netfilter_ipv4.h>
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-extended/iptables/iptables_1.4.21.bb b/yocto-poky/meta/recipes-extended/iptables/iptables_1.4.21.bb
deleted file mode 100644
index deea5e5..0000000
--- a/yocto-poky/meta/recipes-extended/iptables/iptables_1.4.21.bb
+++ /dev/null
@@ -1,48 +0,0 @@
-SUMMARY = "Tools for managing kernel packet filtering capabilities"
-DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
-filtering code in Linux."
-HOMEPAGE = "http://www.netfilter.org/"
-BUGTRACKER = "http://bugzilla.netfilter.org/"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
-                    file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
-
-RRECOMMENDS_${PN} = "kernel-module-x-tables \
-                     kernel-module-ip-tables \
-                     kernel-module-iptable-filter \
-                     kernel-module-iptable-nat \
-                     kernel-module-nf-defrag-ipv4 \
-                     kernel-module-nf-conntrack \
-                     kernel-module-nf-conntrack-ipv4 \
-                     kernel-module-nf-nat \
-                     kernel-module-ipt-masquerade"
-FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
-FILES_${PN}-dbg =+ "${libdir}/xtables/.debug"
-
-SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
-           file://types.h-add-defines-that-are-required-for-if_packet.patch \
-           file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
-           file://0001-fix-build-with-musl.patch \
-           file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
-          "
-
-SRC_URI[md5sum] = "536d048c8e8eeebcd9757d0863ebb0c0"
-SRC_URI[sha256sum] = "52004c68021da9a599feed27f65defcfb22128f7da2c0531c0f75de0f479d3e0"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
-               "
-PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
-                 "
-
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-
-# libnfnetlink recipe is in meta-networking layer
-PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
-
-do_configure_prepend() {
-	# Remove some libtool m4 files
-	# Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
-	rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
-}
diff --git a/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.0.bb b/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.0.bb
new file mode 100644
index 0000000..fbbe418
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/iptables/iptables_1.6.0.bb
@@ -0,0 +1,50 @@
+SUMMARY = "Tools for managing kernel packet filtering capabilities"
+DESCRIPTION = "iptables is the userspace command line program used to configure and control network packet \
+filtering code in Linux."
+HOMEPAGE = "http://www.netfilter.org/"
+BUGTRACKER = "http://bugzilla.netfilter.org/"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263\
+                    file://iptables/iptables.c;beginline=13;endline=25;md5=c5cffd09974558cf27d0f763df2a12dc"
+
+RRECOMMENDS_${PN} = "kernel-module-x-tables \
+                     kernel-module-ip-tables \
+                     kernel-module-iptable-filter \
+                     kernel-module-iptable-nat \
+                     kernel-module-nf-defrag-ipv4 \
+                     kernel-module-nf-conntrack \
+                     kernel-module-nf-conntrack-ipv4 \
+                     kernel-module-nf-nat \
+                     kernel-module-ipt-masquerade"
+FILES_${PN} =+ "${libdir}/xtables/ ${datadir}/xtables"
+
+SRC_URI = "http://netfilter.org/projects/iptables/files/iptables-${PV}.tar.bz2 \
+           file://types.h-add-defines-that-are-required-for-if_packet.patch \
+           file://0001-configure-Add-option-to-enable-disable-libnfnetlink.patch \
+           file://0002-configure.ac-only-check-conntrack-when-libnfnetlink-enabled.patch \
+          "
+SRC_URI_append_libc-musl = " file://0001-fix-build-with-musl.patch"
+
+SRC_URI[md5sum] = "27ba3451cb622467fc9267a176f19a31"
+SRC_URI[sha256sum] = "4bb72a0a0b18b5a9e79e87631ddc4084528e5df236bc7624472dcaa8480f1c60"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--with-kernel=${STAGING_INCDIR} \
+               "
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
+                 "
+
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+
+# libnfnetlink recipe is in meta-networking layer
+PACKAGECONFIG[libnfnetlink] = "--enable-libnfnetlink,--disable-libnfnetlink,libnfnetlink libnetfilter-conntrack"
+
+# libnftnl recipe is in meta-networking layer(previously known as libnftables)
+PACKAGECONFIG[libnftnl] = "--enable-nftables,--disable-nftables,libnftnl"
+
+do_configure_prepend() {
+	# Remove some libtool m4 files
+	# Keep ax_check_linker_flags.m4 which belongs to autoconf-archive.
+	rm -f libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4
+}
diff --git a/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch b/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
new file mode 100644
index 0000000..20ef07e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/iputils/files/0001-Fix-header-inclusion-for-musl.patch
@@ -0,0 +1,92 @@
+From be0bb81d72fea4d20da74f4f2236aa145684f332 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 6 Jan 2016 14:14:22 -0800
+Subject: [PATCH] Fix header inclusion for musl
+
+Fix errors e.g.
+
+In file included from tracepath.c:17:0:
+/usr/include/linux/errqueue.h:33:18:
+error: array type has incomplete element type 'struct timespec'
+  struct timespec ts[3];
+                  ^
+tracepath.c: In function 'main':
+tracepath.c:329:16: error: 'INT_MAX' undeclared (first use in this
+function)
+      overhead, INT_MAX);
+                ^
+tracepath.c:329:16: note: each undeclared identifier is reported only
+once for each function it appears in
+Makefile:131: recipe for target 'tracepath.o' failed
+make: *** [tracepath.o] Error 1
+
+ping_common.c: In function 'main_loop':
+ping_common.c:756:15: error: 'HZ' undeclared (first use in this
+function)
+    if (1000 % HZ == 0 ? next <= 1000 / HZ : (next < INT_MAX / HZ &&
+next * HZ <= 1000)) {
+
+protocols/timed.h is not needed and is absent in musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ clockdiff.c   | 1 -
+ ping_common.c | 1 +
+ tracepath.c   | 2 ++
+ tracepath6.c  | 1 +
+ 4 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/clockdiff.c b/clockdiff.c
+index 7c1ea1b..1d6341e 100644
+--- a/clockdiff.c
++++ b/clockdiff.c
+@@ -14,7 +14,6 @@
+ #include <netinet/ip.h>
+ #include <netinet/ip_icmp.h>
+ #define TSPTYPES
+-#include <protocols/timed.h>
+ #include <fcntl.h>
+ #include <netdb.h>
+ #include <arpa/inet.h>
+diff --git a/ping_common.c b/ping_common.c
+index 7f82851..3ce699d 100644
+--- a/ping_common.c
++++ b/ping_common.c
+@@ -2,6 +2,7 @@
+ #include <ctype.h>
+ #include <sched.h>
+ #include <math.h>
++#include <asm-generic/param.h>
+ 
+ int options;
+ 
+diff --git a/tracepath.c b/tracepath.c
+index 89e6d16..c9d6ddd 100644
+--- a/tracepath.c
++++ b/tracepath.c
+@@ -12,6 +12,8 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <limits.h>
++#include <time.h>
+ #include <sys/socket.h>
+ #include <linux/types.h>
+ #include <linux/errqueue.h>
+diff --git a/tracepath6.c b/tracepath6.c
+index 126fadf..9d5745c 100644
+--- a/tracepath6.c
++++ b/tracepath6.c
+@@ -12,6 +12,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <limits.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <netinet/icmp6.h>
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch b/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
new file mode 100644
index 0000000..6da01dc
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/iputils/files/0001-Intialize-struct-elements-by-name.patch
@@ -0,0 +1,52 @@
+From 000629f74908a2a95f6104444c77ad93cf40d62d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jan 2016 08:50:50 +0000
+Subject: [PATCH] Intialize struct elements by name
+
+makes it portable across glibc and musl
+
+Fixes errors
+
+| ping.c: In function 'send_probe':
+| ping.c:735:19: warning: initialization makes integer from pointer
+without a cast [-Wint-conversion]
+|           &iov, 1, &cmsg, 0, 0 };
+|                    ^
+| ping.c:735:19: note: (near initialization for 'm.__pad1')
+| ping.c:735:19: error: initializer element is not computable at load
+time
+| ping.c:735:19: note: (near initialization for 'm.__pad1')
+| make: *** [ping.o] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ ping.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/ping.c b/ping.c
+index 4989760..e67f381 100644
+--- a/ping.c
++++ b/ping.c
+@@ -731,8 +731,15 @@ int send_probe()
+ 
+ 	do {
+ 		static struct iovec iov = {outpack, 0};
+-		static struct msghdr m = { &whereto, sizeof(whereto),
+-						   &iov, 1, &cmsg, 0, 0 };
++		static struct msghdr m = {
++			.msg_name = &whereto,
++			.msg_namelen = sizeof(whereto),
++			.msg_iov = &iov,
++			.msg_iovlen = 1,
++			.msg_control = &cmsg,
++			.msg_controllen = 0,
++			.msg_flags= 0,
++		};
+ 		m.msg_controllen = cmsg_len;
+ 		iov.iov_len = cc;
+ 
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch b/yocto-poky/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch
deleted file mode 100644
index b9cd82e..0000000
--- a/yocto-poky/meta/recipes-extended/iputils/files/fix-build-command-line-argument-with-gnutls.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Upstream-Status: Backport
-
-From 568e990d30fc7e9416e0a6f8c74ea5013921eaec Mon Sep 17 00:00:00 2001
-From: Arjan van de Ven <arjanvandeven@gmail.com>
-Date: Wed, 16 Jan 2013 03:12:15 +0900
-Subject: [PATCH] ping6: Fix build command line argument with gnutls.
-
-The ping6 command can use either openssl or gnutls...
-and the Makefile has a bunch of setup for defining which of the two to use.
-
-Unfortunately, the final -D define on the commandline to enable gnutls
-inside the ping6.c file didn't actually make it onto the gcc
-commandline.
-This patch adds the $(DEF_CRYPTO) Makefile variable to fix this gap.
-
-Signed-off-by: Arjan van de Ven <arjanvandeven@gmail.com>
-Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
----
- Makefile |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index c62d9df..89249f5 100644
---- a/Makefile
-+++ b/Makefile
-@@ -149,7 +149,7 @@ LIB_clockdiff = $(LIB_CAP)
- DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
- DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
- LIB_ping  = $(LIB_CAP) $(LIB_IDN)
--DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR)
-+DEF_ping6 = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS) $(DEF_ENABLE_PING6_RTHDR) $(DEF_CRYPTO)
- LIB_ping6 = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) $(LIB_CRYPTO)
- 
- ping: ping_common.o
--- 
-1.7.2.5
-
diff --git a/yocto-poky/meta/recipes-extended/iputils/iputils_s20121221.bb b/yocto-poky/meta/recipes-extended/iputils/iputils_s20121221.bb
deleted file mode 100644
index e87a32a..0000000
--- a/yocto-poky/meta/recipes-extended/iputils/iputils_s20121221.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-SUMMARY = "Network monitoring tools"
-DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
-tracepath, tracepath6, ping, ping6 and arping."
-HOMEPAGE = "http://www.skbuff.net/iputils"
-SECTION = "console/network"
-
-LICENSE = "BSD & GPLv2+"
-
-LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
-                    file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
-                    file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
-                    file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
-
-DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap"
-
-
-SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
-           file://debian/use_gethostbyname2.diff \
-           file://debian/targets.diff \
-           file://nsgmls-path-fix.patch \
-           file://fix-build-command-line-argument-with-gnutls.patch \
-          "
-
-SRC_URI[md5sum] = "6072aef64205720dd1893b375e184171"
-SRC_URI[sha256sum] = "450f549fc5b620c23c5929aa6d54b7ddfc7ee1cb1e8efdc5e8bb21d8d0c5319f"
-
-do_compile () {
-	oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man
-}
-
-do_install () {
-	install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8
-	# SUID root programs
-	install -m 4555 ping ${D}${base_bindir}/ping
-	install -m 4555 ping6 ${D}${base_bindir}/ping6
-	install -m 4555 traceroute6 ${D}${base_bindir}/
-	install -m 4555 clockdiff ${D}${base_bindir}/
-	# Other programgs
-	for i in arping tracepath tracepath6; do
-	  install -m 0755 $i ${D}${base_bindir}/
-	done
-	# Manual pages for things we build packages for
-	for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
-	  install -m 0644 doc/$i ${D}${mandir}/man8/ || true
-	done
-}
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN}-ping = "ping"
-ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
-
-ALTERNATIVE_${PN}-ping6 = "ping6"
-ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
-
-PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
-
-ALLOW_EMPTY_${PN} = "1"
-RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
-
-FILES_${PN}	= ""
-FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
-FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
-FILES_${PN}-arping = "${base_bindir}/arping"
-FILES_${PN}-tracepath = "${base_bindir}/tracepath"
-FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
-FILES_${PN}-traceroute6	= "${base_bindir}/traceroute6"
-FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
-FILES_${PN}-doc	= "${mandir}/man8"
diff --git a/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb b/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb
new file mode 100644
index 0000000..7150454
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/iputils/iputils_s20151218.bb
@@ -0,0 +1,76 @@
+SUMMARY = "Network monitoring tools"
+DESCRIPTION = "Utilities for the IP protocol, including traceroute6, \
+tracepath, tracepath6, ping, ping6 and arping."
+HOMEPAGE = "http://www.skbuff.net/iputils"
+SECTION = "console/network"
+
+LICENSE = "BSD & GPLv2+"
+
+LIC_FILES_CHKSUM = "file://ping.c;beginline=1;endline=35;md5=f9ceb201733e9a6cf8f00766dd278d82 \
+                    file://tracepath.c;beginline=1;endline=10;md5=0ecea2bf60bff2f3d840096d87647f3d \
+                    file://arping.c;beginline=1;endline=11;md5=fe84301b5c2655c950f8b92a057fafa6 \
+                    file://tftpd.c;beginline=1;endline=32;md5=28834bf8a91a5b8a92755dbee709ef96 "
+
+DEPENDS = "gnutls docbook-utils-native sgmlspl-native libcap libgcrypt"
+
+
+SRC_URI = "http://www.skbuff.net/iputils/${BPN}-${PV}.tar.bz2 \
+           file://debian/use_gethostbyname2.diff \
+           file://debian/targets.diff \
+           file://nsgmls-path-fix.patch \
+           file://0001-Fix-header-inclusion-for-musl.patch \
+           file://0001-Intialize-struct-elements-by-name.patch \
+          "
+
+SRC_URI[md5sum] = "8aaa7395f27dff9f57ae016d4bc753ce"
+SRC_URI[sha256sum] = "549f58d71951e52b46595829134d4e330642f522f50026917fadc349a54825a1"
+
+UPSTREAM_CHECK_REGEX = "iputils-(?P<pver>s\d+).tar"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_compile () {
+	oe_runmake 'CC=${CC} -D_GNU_SOURCE' VPATH="${STAGING_LIBDIR}:${STAGING_DIR_HOST}/${base_libdir}" all man
+}
+
+do_install () {
+	install -m 0755 -d ${D}${base_bindir} ${D}${mandir}/man8
+	# SUID root programs
+	install -m 4555 ping ${D}${base_bindir}/ping
+	install -m 4555 ping6 ${D}${base_bindir}/ping6
+	install -m 4555 traceroute6 ${D}${base_bindir}/
+	install -m 4555 clockdiff ${D}${base_bindir}/
+	# Other programgs
+	for i in arping tracepath tracepath6; do
+	  install -m 0755 $i ${D}${base_bindir}/
+	done
+	# Manual pages for things we build packages for
+	for i in tracepath.8 traceroute6.8 ping.8 arping.8; do
+	  install -m 0644 doc/$i ${D}${mandir}/man8/ || true
+	done
+}
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+
+ALTERNATIVE_${PN}-ping = "ping"
+ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping"
+
+ALTERNATIVE_${PN}-ping6 = "ping6"
+ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6"
+
+PACKAGES += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
+
+ALLOW_EMPTY_${PN} = "1"
+RDEPENDS_${PN} += "${PN}-ping ${PN}-ping6 ${PN}-arping ${PN}-tracepath ${PN}-tracepath6 ${PN}-traceroute6 ${PN}-clockdiff"
+
+FILES_${PN}	= ""
+FILES_${PN}-ping = "${base_bindir}/ping.${BPN}"
+FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}"
+FILES_${PN}-arping = "${base_bindir}/arping"
+FILES_${PN}-tracepath = "${base_bindir}/tracepath"
+FILES_${PN}-tracepath6 = "${base_bindir}/tracepath6"
+FILES_${PN}-traceroute6	= "${base_bindir}/traceroute6"
+FILES_${PN}-clockdiff = "${base_bindir}/clockdiff"
+FILES_${PN}-doc	= "${mandir}/man8"
diff --git a/yocto-poky/meta/recipes-extended/less/less_479.bb b/yocto-poky/meta/recipes-extended/less/less_479.bb
deleted file mode 100644
index 618954b..0000000
--- a/yocto-poky/meta/recipes-extended/less/less_479.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Text file viewer similar to more"
-DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
-based program for viewing text files and the output from other \
-programs. Less offers many features beyond those that more does."
-HOMEPAGE = "http://www.greenwoodsoftware.com/"
-SECTION = "console/utils"
-
-# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
-# Including email author giving permissing to use BSD
-#
-# From: Mark Nudelman <markn@greenwoodsoftware.com>
-# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
-# Date: 12/19/11
-#
-# Hi Elizabeth,
-# Using a generic BSD license for less is fine with me.
-# Thanks,
-#
-# --Mark
-#
-
-LICENSE = "GPLv3+ | BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://LICENSE;md5=48c26a307f91af700e1f00585f215aaf"
-DEPENDS = "ncurses"
-
-SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
-	  "
-
-SRC_URI[md5sum] = "049f51ccfe2686009c6ce943eeb4bbaf"
-SRC_URI[sha256sum] = "5bf06cb30ee2a2bd1f79f39aa91e46444e7cb19b48c95c4992fa63cfe4527a80"
-
-inherit autotools update-alternatives
-
-do_install () {
-        oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
-}
-
-ALTERNATIVE_${PN} = "less"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/yocto-poky/meta/recipes-extended/less/less_481.bb b/yocto-poky/meta/recipes-extended/less/less_481.bb
new file mode 100644
index 0000000..0fcd819
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/less/less_481.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Text file viewer similar to more"
+DESCRIPTION = "Less is a program similar to more, i.e. a terminal \
+based program for viewing text files and the output from other \
+programs. Less offers many features beyond those that more does."
+HOMEPAGE = "http://www.greenwoodsoftware.com/"
+SECTION = "console/utils"
+
+# (GPLv2+ (<< 418), GPLv3+ (>= 418)) | less
+# Including email author giving permissing to use BSD
+#
+# From: Mark Nudelman <markn@greenwoodsoftware.com>
+# To: Elizabeth Flanagan <elizabeth.flanagan@intel.com
+# Date: 12/19/11
+#
+# Hi Elizabeth,
+# Using a generic BSD license for less is fine with me.
+# Thanks,
+#
+# --Mark
+#
+
+LICENSE = "GPLv3+ | BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://LICENSE;md5=48c26a307f91af700e1f00585f215aaf"
+DEPENDS = "ncurses"
+
+SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
+	  "
+
+SRC_URI[md5sum] = "50ef46065c65257141a7340123527767"
+SRC_URI[sha256sum] = "3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5"
+
+UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html"
+
+inherit autotools update-alternatives
+
+do_install () {
+        oe_runmake 'bindir=${D}${bindir}' 'mandir=${D}${mandir}' install
+}
+
+ALTERNATIVE_${PN} = "less"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch b/yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch
new file mode 100644
index 0000000..6d74e86
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libarchive/libarchive/0001-Set-xattrs-after-setting-times.patch
@@ -0,0 +1,59 @@
+From 545ded56095c570426fe102ff2192889681ea75c Mon Sep 17 00:00:00 2001
+From: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
+Date: Mon, 29 Feb 2016 14:38:25 +0200
+Subject: [PATCH] Set xattrs after setting times
+
+With Integrity Measurement Architecture (IMA) enabled in Linux
+kernel the security.ima extended attribute gets overwritten
+when setting times on a file with a futimens() call. So it's safer
+to set xattrs after times.
+
+Upstream-Status: Submitted [https://github.com/libarchive/libarchive/pull/664]
+
+Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
+
+---
+ libarchive/archive_write_disk_posix.c | 21 +++++++++++----------
+ 1 file changed, 11 insertions(+), 10 deletions(-)
+
+diff --git a/libarchive/archive_write_disk_posix.c b/libarchive/archive_write_disk_posix.c
+index 0fc6193..27c9c1e 100644
+--- a/libarchive/archive_write_disk_posix.c
++++ b/libarchive/archive_write_disk_posix.c
+@@ -1620,16 +1620,6 @@ _archive_write_disk_finish_entry(struct archive *_a)
+	}
+
+	/*
+-	 * Security-related extended attributes (such as
+-	 * security.capability on Linux) have to be restored last,
+-	 * since they're implicitly removed by other file changes.
+-	 */
+-	if (a->todo & TODO_XATTR) {
+-		int r2 = set_xattrs(a);
+-		if (r2 < ret) ret = r2;
+-	}
+-
+-	/*
+	 * Some flags prevent file modification; they must be restored after
+	 * file contents are written.
+	 */
+@@ -1648,6 +1638,17 @@ _archive_write_disk_finish_entry(struct archive *_a)
+	}
+
+	/*
++	 * Security-related extended attributes (such as
++	 * security.capability or security.ima on Linux) have to be restored last,
++	 * since they're implicitly removed by other file changes like setting
++	 * times.
++	 */
++	if (a->todo & TODO_XATTR) {
++		int r2 = set_xattrs(a);
++		if (r2 < ret) ret = r2;
++	}
++
++	/*
+	 * Mac extended metadata includes ACLs.
+	 */
+	if (a->todo & TODO_MAC_METADATA) {
+--
+2.5.0
diff --git a/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch b/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
index 126f80e..19523f4 100644
--- a/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
+++ b/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2013-0211.patch
@@ -6,6 +6,7 @@
 This patch comes from:https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4
 
 Upstream-Status: Backport
+CVE: CVE-2013-0211
 
 Signed-off-by: Baogen shang <baogen.shang@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch b/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch
index 4ca779c..5c24396 100644
--- a/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch
+++ b/yocto-poky/meta/recipes-extended/libarchive/libarchive/libarchive-CVE-2015-2304.patch
@@ -7,6 +7,7 @@
 
 
 Upstream-Status: backport
+CVE: CVE-2015-2304
 
 Signed-off-by: Li Zhou <li.zhou@windriver.com>
 ---
diff --git a/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb b/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
index 716db9a..ed677ac 100644
--- a/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
+++ b/yocto-poky/meta/recipes-extended/libarchive/libarchive_3.1.2.bb
@@ -7,9 +7,10 @@
 
 DEPENDS = "e2fsprogs-native"
 
-PACKAGECONFIG ?= "libxml2 zlib bz2"
+PACKAGECONFIG ?= "zlib bz2"
 
 PACKAGECONFIG_append_class-target = "\
+	libxml2 \
 	${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)} \
 	${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'xattr', '', d)} \
 	${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'largefile', '', d)} \
@@ -34,12 +35,13 @@
            file://pkgconfig.patch \
            file://libarchive-CVE-2015-2304.patch \
            file://mkdir.patch \
+           file://0001-Set-xattrs-after-setting-times.patch \
            "
 
 SRC_URI[md5sum] = "efad5a503f66329bb9d2f4308b5de98a"
 SRC_URI[sha256sum] = "eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e"
 
-inherit autotools lib_package pkgconfig
+inherit autotools update-alternatives pkgconfig
 
 CPPFLAGS += "-I${WORKDIR}/extra-includes"
 
@@ -50,4 +52,20 @@
 	cp -R ${STAGING_INCDIR_NATIVE}/ext2fs ${WORKDIR}/extra-includes/
 }
 
+ALTERNATIVE_PRIORITY = "100"
+
+PACKAGES =+ "bsdtar"
+FILES_bsdtar = "${bindir}/bsdtar"
+
+ALTERNATIVE_bsdtar = "tar"
+ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
+ALTERNATIVE_TARGET[tar] = "${bindir}/bsdtar"
+
+PACKAGES =+ "bsdcpio"
+FILES_bsdcpio = "${bindir}/bsdcpio"
+
+ALTERNATIVE_bsdcpio = "cpio"
+ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
+ALTERNATIVE_TARGET[cpio] = "${bindir}/bsdcpio"
+
 BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-extended/libidn/libidn_0.6.14.bb b/yocto-poky/meta/recipes-extended/libidn/libidn_0.6.14.bb
index 4df1d08..c681560 100644
--- a/yocto-poky/meta/recipes-extended/libidn/libidn_0.6.14.bb
+++ b/yocto-poky/meta/recipes-extended/libidn/libidn_0.6.14.bb
@@ -31,3 +31,6 @@
 	rm -rf ${D}${libdir}/Libidn.dll
 	rm -rf ${D}${datadir}/emacs
 }
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/yocto-poky/meta/recipes-extended/libidn/libidn_1.30.bb b/yocto-poky/meta/recipes-extended/libidn/libidn_1.30.bb
deleted file mode 100644
index 7234747..0000000
--- a/yocto-poky/meta/recipes-extended/libidn/libidn_1.30.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Internationalized Domain Name support library"
-DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
-HOMEPAGE = "http://www.gnu.org/software/libidn/"
-SECTION = "libs"
-LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=df4be47940a91ee69556f5f71eed4aec \
-                    file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
-                    file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
-                    file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://lib/idna.h;endline=21;md5=7c0b3828d1b153663be9a04ad4f7975f \
-                    file://src/idn.c;endline=20;md5=f4235f2a2cb2b65786b2979fb3cf7fbf"
-
-inherit pkgconfig autotools gettext texinfo
-
-SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
-           file://libidn_fix_for_automake-1.12.patch \
-           file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
-           file://dont-depend-on-help2man.patch \
-"
-
-SRC_URI[md5sum] = "b17edc8551cd31cc5f14c82a9dabf58e"
-SRC_URI[sha256sum] = "39b9fc94d74081c185757b12e0891ce5a22db55268e7d1bb24533ff4432eb053"
-
-# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
-# so package command into a separate package
-PACKAGES =+ "idn"
-FILES_idn = "${bindir}/*"
-
-EXTRA_OECONF = "--disable-csharp"
-
-do_install_append() {
-	rm -rf ${D}${datadir}/emacs
-}
diff --git a/yocto-poky/meta/recipes-extended/libidn/libidn_1.32.bb b/yocto-poky/meta/recipes-extended/libidn/libidn_1.32.bb
new file mode 100644
index 0000000..4d6e885
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libidn/libidn_1.32.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Internationalized Domain Name support library"
+DESCRIPTION = "Implementation of the Stringprep, Punycode and IDNA specifications defined by the IETF Internationalized Domain Names (IDN) working group."
+HOMEPAGE = "http://www.gnu.org/software/libidn/"
+SECTION = "libs"
+LICENSE = "(LGPLv2.1+ | LGPLv3) & GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=df4be47940a91ee69556f5f71eed4aec \
+                    file://COPYING.LESSERv2;md5=4fbd65380cdd255951079008b364516c \
+                    file://COPYING.LESSERv3;md5=e6a600fd5e1d9cbde2d983680233ad02 \
+                    file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYINGv3;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://lib/idna.h;endline=21;md5=7c0b3828d1b153663be9a04ad4f7975f \
+                    file://src/idn.c;endline=20;md5=f4235f2a2cb2b65786b2979fb3cf7fbf"
+
+inherit pkgconfig autotools gettext texinfo
+
+SRC_URI = "${GNU_MIRROR}/libidn/${BPN}-${PV}.tar.gz \
+           file://libidn_fix_for_automake-1.12.patch \
+           file://avoid_AM_PROG_MKDIR_P_warning_error_with_automake_1.12.patch \
+           file://dont-depend-on-help2man.patch \
+"
+
+SRC_URI[md5sum] = "4dd8356ba577287ea7076bfa1554b534"
+SRC_URI[sha256sum] = "ba5d5afee2beff703a34ee094668da5c6ea5afa38784cebba8924105e185c4f5"
+
+# command tool is under GPLv3+, while libidn itself is under LGPLv2.1+ or LGPLv3
+# so package command into a separate package
+PACKAGES =+ "idn"
+FILES_idn = "${bindir}/*"
+
+EXTRA_OECONF = "--disable-csharp"
+
+do_install_append() {
+	rm -rf ${D}${datadir}/emacs
+}
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch b/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch
new file mode 100644
index 0000000..972ecc9
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libsolv/libsolv/0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch
@@ -0,0 +1,37 @@
+From 280f0d37c642d68bad2a2e49ef437953474d99e6 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Wed, 6 Apr 2016 23:15:02 -0700
+Subject: [PATCH] CMakeLists.txt: fix MAN_INSTALL_DIR
+
+It checks ${CMAKE_INSTALL_PREFIX}/share/man when configure, but it may
+not exist when crosscompile, for example, when CMAKE_INSTALL_PREFIX="/",
+it is OK, but when CMAKE_INSTALL_PREFIX="/some/path/else", then it
+doesn't exist, and the man dir would be set to "/usr/man" which is
+incorrect.
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ CMakeLists.txt | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index fd1426b..747db22 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -57,10 +57,7 @@ else (DEFINED INCLUDE)
+ ENDIF (DEFINED  INCLUDE)
+ MESSAGE (STATUS "Header files will be installed in ${INCLUDE_INSTALL_DIR}")
+ SET (BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+-SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/man")
+-IF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man"  AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man")
+-  SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+-ENDIF (IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/man"  AND NOT IS_DIRECTORY "${CMAKE_INSTALL_PREFIX}/man")
++SET (MAN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+ MESSAGE(STATUS "Man pages will be installed in ${MAN_INSTALL_DIR}")
+ 
+ ####################################################################
+-- 
+2.7.4
+
diff --git a/yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb b/yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb
new file mode 100644
index 0000000..fb81c8a
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libsolv/libsolv_git.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Library for solving packages and reading repositories"
+HOMEPAGE = "https://github.com/openSUSE/libsolv"
+BUGTRACKER = "https://github.com/openSUSE/libsolv/issues"
+SECTION = "devel"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.BSD;md5=62272bd11c97396d4aaf1c41bc11f7d8"
+
+DEPENDS = "expat zlib"
+
+PV = "0.6.19"
+
+SRC_URI = "git://github.com/openSUSE/libsolv.git \
+           file://0001-CMakeLists.txt-fix-MAN_INSTALL_DIR.patch \
+"
+SRCREV = "4c5af401a89858d4cebbfe40c59a0031ff9db5b0"
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+EXTRA_OECMAKE = "-DLIB=${baselib}"
+
+PACKAGES =+ "${PN}-tools ${PN}ext"
+
+FILES_${PN}-dev += "${datadir}/cmake/Modules/FindLibSolv.cmake"
+FILES_${PN}-tools = "${bindir}/*"
+FILES_${PN}ext = "${libdir}/${PN}ext.so.*"
+
+BBCLASSEXTEND =+ "native nativesdk"
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch
new file mode 100644
index 0000000..50613ba
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/0001-Add-missing-rwlock_unlocks-in-xprt_register.patch
@@ -0,0 +1,62 @@
+Subject: [PATCH] Add missing rwlock_unlocks in xprt_register
+
+It looks like in b2c9430f46c4ac848957fb8adaac176a3f6ac03f when svc_run
+switched to poll, an early return was added, but the rwlock was not
+unlocked.
+
+I observed that rpcbind built against libtirpc-1.0.1 would handle only
+one request before hanging, and tracked it down to a missing
+rwlock_unlock here.
+
+Fixes: b2c9430f46c4 ('Use poll() instead of select() in svc_run()')
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Forney <mforney@mforney.org>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ src/svc.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/svc.c b/src/svc.c
+index 9c41445..b59467b 100644
+--- a/src/svc.c
++++ b/src/svc.c
+@@ -99,7 +99,7 @@ xprt_register (xprt)
+     {
+       __svc_xports = (SVCXPRT **) calloc (_rpc_dtablesize(), sizeof (SVCXPRT *));
+       if (__svc_xports == NULL)
+-	return;
++            goto unlock;
+     }
+   if (sock < _rpc_dtablesize())
+     {
+@@ -120,14 +120,14 @@ xprt_register (xprt)
+             svc_pollfd[i].fd = sock;
+             svc_pollfd[i].events = (POLLIN | POLLPRI |
+                                     POLLRDNORM | POLLRDBAND);
+-            return;
++            goto unlock;
+           }
+ 
+       new_svc_pollfd = (struct pollfd *) realloc (svc_pollfd,
+                                                   sizeof (struct pollfd)
+                                                   * (svc_max_pollfd + 1));
+       if (new_svc_pollfd == NULL) /* Out of memory */
+-        return;
++        goto unlock;
+       svc_pollfd = new_svc_pollfd;
+       ++svc_max_pollfd;
+ 
+@@ -135,6 +135,7 @@ xprt_register (xprt)
+       svc_pollfd[svc_max_pollfd - 1].events = (POLLIN | POLLPRI |
+                                                POLLRDNORM | POLLRDBAND);
+     }
++unlock:
+   rwlock_unlock (&svc_fd_lock);
+ }
+ 
+-- 
+2.5.3
+
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch
new file mode 100644
index 0000000..f93223f
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/Use-netbsd-queue.h.patch
@@ -0,0 +1,878 @@
+musl does not provide sys/queue.h implementation. Borrow queue.h from
+the NetBSD project
+http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.68
+
+Upstream-Status: Inappropriate [musl specific]
+
+Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur libtirpc-1.0.1-orig/src/clnt_bcast.c libtirpc-1.0.1/src/clnt_bcast.c
+--- libtirpc-1.0.1-orig/src/clnt_bcast.c	2015-10-30 17:15:14.000000000 +0200
++++ libtirpc-1.0.1/src/clnt_bcast.c	2015-12-21 17:03:52.066008311 +0200
+@@ -40,7 +40,6 @@
+  */
+ #include <sys/socket.h>
+ #include <sys/types.h>
+-#include <sys/queue.h>
+ 
+ #include <net/if.h>
+ #include <netinet/in.h>
+@@ -62,6 +61,7 @@
+ #include <err.h>
+ #include <string.h>
+ 
++#include "queue.h"
+ #include "rpc_com.h"
+ #include "debug.h"
+ 
+diff -Naur libtirpc-1.0.1-orig/tirpc/queue.h libtirpc-1.0.1/tirpc/queue.h
+--- libtirpc-1.0.1-orig/tirpc/queue.h	1970-01-01 02:00:00.000000000 +0200
++++ libtirpc-1.0.1/tirpc/queue.h	2015-12-21 17:02:44.427853905 +0200
+@@ -0,0 +1,846 @@
++/*	$NetBSD: queue.h,v 1.68 2014/11/19 08:10:01 uebayasi Exp $	*/
++
++/*
++ * Copyright (c) 1991, 1993
++ *	The Regents of the University of California.  All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ *    notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ *    notice, this list of conditions and the following disclaimer in the
++ *    documentation and/or other materials provided with the distribution.
++ * 3. Neither the name of the University nor the names of its contributors
++ *    may be used to endorse or promote products derived from this software
++ *    without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ *	@(#)queue.h	8.5 (Berkeley) 8/20/94
++ */
++
++#ifndef	_SYS_QUEUE_H_
++#define	_SYS_QUEUE_H_
++
++/*
++ * This file defines five types of data structures: singly-linked lists,
++ * lists, simple queues, tail queues, and circular queues.
++ *
++ * A singly-linked list is headed by a single forward pointer. The
++ * elements are singly linked for minimum space and pointer manipulation
++ * overhead at the expense of O(n) removal for arbitrary elements. New
++ * elements can be added to the list after an existing element or at the
++ * head of the list.  Elements being removed from the head of the list
++ * should use the explicit macro for this purpose for optimum
++ * efficiency. A singly-linked list may only be traversed in the forward
++ * direction.  Singly-linked lists are ideal for applications with large
++ * datasets and few or no removals or for implementing a LIFO queue.
++ *
++ * A list is headed by a single forward pointer (or an array of forward
++ * pointers for a hash table header). The elements are doubly linked
++ * so that an arbitrary element can be removed without a need to
++ * traverse the list. New elements can be added to the list before
++ * or after an existing element or at the head of the list. A list
++ * may only be traversed in the forward direction.
++ *
++ * A simple queue is headed by a pair of pointers, one the head of the
++ * list and the other to the tail of the list. The elements are singly
++ * linked to save space, so elements can only be removed from the
++ * head of the list. New elements can be added to the list after
++ * an existing element, at the head of the list, or at the end of the
++ * list. A simple queue may only be traversed in the forward direction.
++ *
++ * A tail queue is headed by a pair of pointers, one to the head of the
++ * list and the other to the tail of the list. The elements are doubly
++ * linked so that an arbitrary element can be removed without a need to
++ * traverse the list. New elements can be added to the list before or
++ * after an existing element, at the head of the list, or at the end of
++ * the list. A tail queue may be traversed in either direction.
++ *
++ * A circle queue is headed by a pair of pointers, one to the head of the
++ * list and the other to the tail of the list. The elements are doubly
++ * linked so that an arbitrary element can be removed without a need to
++ * traverse the list. New elements can be added to the list before or after
++ * an existing element, at the head of the list, or at the end of the list.
++ * A circle queue may be traversed in either direction, but has a more
++ * complex end of list detection.
++ *
++ * For details on the use of these macros, see the queue(3) manual page.
++ */
++
++/*
++ * Include the definition of NULL only on NetBSD because sys/null.h
++ * is not available elsewhere.  This conditional makes the header
++ * portable and it can simply be dropped verbatim into any system.
++ * The caveat is that on other systems some other header
++ * must provide NULL before the macros can be used.
++ */
++#ifdef __NetBSD__
++#include <sys/null.h>
++#endif
++
++#if defined(QUEUEDEBUG)
++# if defined(_KERNEL)
++#  define QUEUEDEBUG_ABORT(...) panic(__VA_ARGS__)
++# else
++#  include <err.h>
++#  define QUEUEDEBUG_ABORT(...) err(1, __VA_ARGS__)
++# endif
++#endif
++
++/*
++ * Singly-linked List definitions.
++ */
++#define	SLIST_HEAD(name, type)						\
++struct name {								\
++	struct type *slh_first;	/* first element */			\
++}
++
++#define	SLIST_HEAD_INITIALIZER(head)					\
++	{ NULL }
++
++#define	SLIST_ENTRY(type)						\
++struct {								\
++	struct type *sle_next;	/* next element */			\
++}
++
++/*
++ * Singly-linked List access methods.
++ */
++#define	SLIST_FIRST(head)	((head)->slh_first)
++#define	SLIST_END(head)		NULL
++#define	SLIST_EMPTY(head)	((head)->slh_first == NULL)
++#define	SLIST_NEXT(elm, field)	((elm)->field.sle_next)
++
++#define	SLIST_FOREACH(var, head, field)					\
++	for((var) = (head)->slh_first;					\
++	    (var) != SLIST_END(head);					\
++	    (var) = (var)->field.sle_next)
++
++#define	SLIST_FOREACH_SAFE(var, head, field, tvar)			\
++	for ((var) = SLIST_FIRST((head));				\
++	    (var) != SLIST_END(head) &&					\
++	    ((tvar) = SLIST_NEXT((var), field), 1);			\
++	    (var) = (tvar))
++
++/*
++ * Singly-linked List functions.
++ */
++#define	SLIST_INIT(head) do {						\
++	(head)->slh_first = SLIST_END(head);				\
++} while (/*CONSTCOND*/0)
++
++#define	SLIST_INSERT_AFTER(slistelm, elm, field) do {			\
++	(elm)->field.sle_next = (slistelm)->field.sle_next;		\
++	(slistelm)->field.sle_next = (elm);				\
++} while (/*CONSTCOND*/0)
++
++#define	SLIST_INSERT_HEAD(head, elm, field) do {			\
++	(elm)->field.sle_next = (head)->slh_first;			\
++	(head)->slh_first = (elm);					\
++} while (/*CONSTCOND*/0)
++
++#define	SLIST_REMOVE_AFTER(slistelm, field) do {			\
++	(slistelm)->field.sle_next =					\
++	    SLIST_NEXT(SLIST_NEXT((slistelm), field), field);		\
++} while (/*CONSTCOND*/0)
++
++#define	SLIST_REMOVE_HEAD(head, field) do {				\
++	(head)->slh_first = (head)->slh_first->field.sle_next;		\
++} while (/*CONSTCOND*/0)
++
++#define	SLIST_REMOVE(head, elm, type, field) do {			\
++	if ((head)->slh_first == (elm)) {				\
++		SLIST_REMOVE_HEAD((head), field);			\
++	}								\
++	else {								\
++		struct type *curelm = (head)->slh_first;		\
++		while(curelm->field.sle_next != (elm))			\
++			curelm = curelm->field.sle_next;		\
++		curelm->field.sle_next =				\
++		    curelm->field.sle_next->field.sle_next;		\
++	}								\
++} while (/*CONSTCOND*/0)
++
++
++/*
++ * List definitions.
++ */
++#define	LIST_HEAD(name, type)						\
++struct name {								\
++	struct type *lh_first;	/* first element */			\
++}
++
++#define	LIST_HEAD_INITIALIZER(head)					\
++	{ NULL }
++
++#define	LIST_ENTRY(type)						\
++struct {								\
++	struct type *le_next;	/* next element */			\
++	struct type **le_prev;	/* address of previous next element */	\
++}
++
++/*
++ * List access methods.
++ */
++#define	LIST_FIRST(head)		((head)->lh_first)
++#define	LIST_END(head)			NULL
++#define	LIST_EMPTY(head)		((head)->lh_first == LIST_END(head))
++#define	LIST_NEXT(elm, field)		((elm)->field.le_next)
++
++#define	LIST_FOREACH(var, head, field)					\
++	for ((var) = ((head)->lh_first);				\
++	    (var) != LIST_END(head);					\
++	    (var) = ((var)->field.le_next))
++
++#define	LIST_FOREACH_SAFE(var, head, field, tvar)			\
++	for ((var) = LIST_FIRST((head));				\
++	    (var) != LIST_END(head) &&					\
++	    ((tvar) = LIST_NEXT((var), field), 1);			\
++	    (var) = (tvar))
++
++#define	LIST_MOVE(head1, head2) do {					\
++	LIST_INIT((head2));						\
++	if (!LIST_EMPTY((head1))) {					\
++		(head2)->lh_first = (head1)->lh_first;			\
++		LIST_INIT((head1));					\
++	}								\
++} while (/*CONSTCOND*/0)
++
++/*
++ * List functions.
++ */
++#if defined(QUEUEDEBUG)
++#define	QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field)			\
++	if ((head)->lh_first &&						\
++	    (head)->lh_first->field.le_prev != &(head)->lh_first)	\
++		QUEUEDEBUG_ABORT("LIST_INSERT_HEAD %p %s:%d", (head),	\
++		    __FILE__, __LINE__);
++#define	QUEUEDEBUG_LIST_OP(elm, field)					\
++	if ((elm)->field.le_next &&					\
++	    (elm)->field.le_next->field.le_prev !=			\
++	    &(elm)->field.le_next)					\
++		QUEUEDEBUG_ABORT("LIST_* forw %p %s:%d", (elm),		\
++		    __FILE__, __LINE__);				\
++	if (*(elm)->field.le_prev != (elm))				\
++		QUEUEDEBUG_ABORT("LIST_* back %p %s:%d", (elm),		\
++		    __FILE__, __LINE__);
++#define	QUEUEDEBUG_LIST_POSTREMOVE(elm, field)				\
++	(elm)->field.le_next = (void *)1L;				\
++	(elm)->field.le_prev = (void *)1L;
++#else
++#define	QUEUEDEBUG_LIST_INSERT_HEAD(head, elm, field)
++#define	QUEUEDEBUG_LIST_OP(elm, field)
++#define	QUEUEDEBUG_LIST_POSTREMOVE(elm, field)
++#endif
++
++#define	LIST_INIT(head) do {						\
++	(head)->lh_first = LIST_END(head);				\
++} while (/*CONSTCOND*/0)
++
++#define	LIST_INSERT_AFTER(listelm, elm, field) do {			\
++	QUEUEDEBUG_LIST_OP((listelm), field)				\
++	if (((elm)->field.le_next = (listelm)->field.le_next) != 	\
++	    LIST_END(head))						\
++		(listelm)->field.le_next->field.le_prev =		\
++		    &(elm)->field.le_next;				\
++	(listelm)->field.le_next = (elm);				\
++	(elm)->field.le_prev = &(listelm)->field.le_next;		\
++} while (/*CONSTCOND*/0)
++
++#define	LIST_INSERT_BEFORE(listelm, elm, field) do {			\
++	QUEUEDEBUG_LIST_OP((listelm), field)				\
++	(elm)->field.le_prev = (listelm)->field.le_prev;		\
++	(elm)->field.le_next = (listelm);				\
++	*(listelm)->field.le_prev = (elm);				\
++	(listelm)->field.le_prev = &(elm)->field.le_next;		\
++} while (/*CONSTCOND*/0)
++
++#define	LIST_INSERT_HEAD(head, elm, field) do {				\
++	QUEUEDEBUG_LIST_INSERT_HEAD((head), (elm), field)		\
++	if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head))\
++		(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
++	(head)->lh_first = (elm);					\
++	(elm)->field.le_prev = &(head)->lh_first;			\
++} while (/*CONSTCOND*/0)
++
++#define	LIST_REMOVE(elm, field) do {					\
++	QUEUEDEBUG_LIST_OP((elm), field)				\
++	if ((elm)->field.le_next != NULL)				\
++		(elm)->field.le_next->field.le_prev = 			\
++		    (elm)->field.le_prev;				\
++	*(elm)->field.le_prev = (elm)->field.le_next;			\
++	QUEUEDEBUG_LIST_POSTREMOVE((elm), field)			\
++} while (/*CONSTCOND*/0)
++
++#define LIST_REPLACE(elm, elm2, field) do {				\
++	if (((elm2)->field.le_next = (elm)->field.le_next) != NULL)	\
++		(elm2)->field.le_next->field.le_prev =			\
++		    &(elm2)->field.le_next;				\
++	(elm2)->field.le_prev = (elm)->field.le_prev;			\
++	*(elm2)->field.le_prev = (elm2);				\
++	QUEUEDEBUG_LIST_POSTREMOVE((elm), field)			\
++} while (/*CONSTCOND*/0)
++
++/*
++ * Simple queue definitions.
++ */
++#define	SIMPLEQ_HEAD(name, type)					\
++struct name {								\
++	struct type *sqh_first;	/* first element */			\
++	struct type **sqh_last;	/* addr of last next element */		\
++}
++
++#define	SIMPLEQ_HEAD_INITIALIZER(head)					\
++	{ NULL, &(head).sqh_first }
++
++#define	SIMPLEQ_ENTRY(type)						\
++struct {								\
++	struct type *sqe_next;	/* next element */			\
++}
++
++/*
++ * Simple queue access methods.
++ */
++#define	SIMPLEQ_FIRST(head)		((head)->sqh_first)
++#define	SIMPLEQ_END(head)		NULL
++#define	SIMPLEQ_EMPTY(head)		((head)->sqh_first == SIMPLEQ_END(head))
++#define	SIMPLEQ_NEXT(elm, field)	((elm)->field.sqe_next)
++
++#define	SIMPLEQ_FOREACH(var, head, field)				\
++	for ((var) = ((head)->sqh_first);				\
++	    (var) != SIMPLEQ_END(head);					\
++	    (var) = ((var)->field.sqe_next))
++
++#define	SIMPLEQ_FOREACH_SAFE(var, head, field, next)			\
++	for ((var) = ((head)->sqh_first);				\
++	    (var) != SIMPLEQ_END(head) &&				\
++	    ((next = ((var)->field.sqe_next)), 1);			\
++	    (var) = (next))
++
++/*
++ * Simple queue functions.
++ */
++#define	SIMPLEQ_INIT(head) do {						\
++	(head)->sqh_first = NULL;					\
++	(head)->sqh_last = &(head)->sqh_first;				\
++} while (/*CONSTCOND*/0)
++
++#define	SIMPLEQ_INSERT_HEAD(head, elm, field) do {			\
++	if (((elm)->field.sqe_next = (head)->sqh_first) == NULL)	\
++		(head)->sqh_last = &(elm)->field.sqe_next;		\
++	(head)->sqh_first = (elm);					\
++} while (/*CONSTCOND*/0)
++
++#define	SIMPLEQ_INSERT_TAIL(head, elm, field) do {			\
++	(elm)->field.sqe_next = NULL;					\
++	*(head)->sqh_last = (elm);					\
++	(head)->sqh_last = &(elm)->field.sqe_next;			\
++} while (/*CONSTCOND*/0)
++
++#define	SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do {		\
++	if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
++		(head)->sqh_last = &(elm)->field.sqe_next;		\
++	(listelm)->field.sqe_next = (elm);				\
++} while (/*CONSTCOND*/0)
++
++#define	SIMPLEQ_REMOVE_HEAD(head, field) do {				\
++	if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
++		(head)->sqh_last = &(head)->sqh_first;			\
++} while (/*CONSTCOND*/0)
++
++#define SIMPLEQ_REMOVE_AFTER(head, elm, field) do {			\
++	if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \
++	    == NULL)							\
++		(head)->sqh_last = &(elm)->field.sqe_next;		\
++} while (/*CONSTCOND*/0)
++
++#define	SIMPLEQ_REMOVE(head, elm, type, field) do {			\
++	if ((head)->sqh_first == (elm)) {				\
++		SIMPLEQ_REMOVE_HEAD((head), field);			\
++	} else {							\
++		struct type *curelm = (head)->sqh_first;		\
++		while (curelm->field.sqe_next != (elm))			\
++			curelm = curelm->field.sqe_next;		\
++		if ((curelm->field.sqe_next =				\
++			curelm->field.sqe_next->field.sqe_next) == NULL) \
++			    (head)->sqh_last = &(curelm)->field.sqe_next; \
++	}								\
++} while (/*CONSTCOND*/0)
++
++#define	SIMPLEQ_CONCAT(head1, head2) do {				\
++	if (!SIMPLEQ_EMPTY((head2))) {					\
++		*(head1)->sqh_last = (head2)->sqh_first;		\
++		(head1)->sqh_last = (head2)->sqh_last;		\
++		SIMPLEQ_INIT((head2));					\
++	}								\
++} while (/*CONSTCOND*/0)
++
++#define	SIMPLEQ_LAST(head, type, field)					\
++	(SIMPLEQ_EMPTY((head)) ?						\
++		NULL :							\
++	        ((struct type *)(void *)				\
++		((char *)((head)->sqh_last) - offsetof(struct type, field))))
++
++/*
++ * Tail queue definitions.
++ */
++#define	_TAILQ_HEAD(name, type, qual)					\
++struct name {								\
++	qual type *tqh_first;		/* first element */		\
++	qual type *qual *tqh_last;	/* addr of last next element */	\
++}
++#define TAILQ_HEAD(name, type)	_TAILQ_HEAD(name, struct type,)
++
++#define	TAILQ_HEAD_INITIALIZER(head)					\
++	{ TAILQ_END(head), &(head).tqh_first }
++
++#define	_TAILQ_ENTRY(type, qual)					\
++struct {								\
++	qual type *tqe_next;		/* next element */		\
++	qual type *qual *tqe_prev;	/* address of previous next element */\
++}
++#define TAILQ_ENTRY(type)	_TAILQ_ENTRY(struct type,)
++
++/*
++ * Tail queue access methods.
++ */
++#define	TAILQ_FIRST(head)		((head)->tqh_first)
++#define	TAILQ_END(head)			(NULL)
++#define	TAILQ_NEXT(elm, field)		((elm)->field.tqe_next)
++#define	TAILQ_LAST(head, headname) \
++	(*(((struct headname *)((head)->tqh_last))->tqh_last))
++#define	TAILQ_PREV(elm, headname, field) \
++	(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
++#define	TAILQ_EMPTY(head)		(TAILQ_FIRST(head) == TAILQ_END(head))
++
++
++#define	TAILQ_FOREACH(var, head, field)					\
++	for ((var) = ((head)->tqh_first);				\
++	    (var) != TAILQ_END(head);					\
++	    (var) = ((var)->field.tqe_next))
++
++#define	TAILQ_FOREACH_SAFE(var, head, field, next)			\
++	for ((var) = ((head)->tqh_first);				\
++	    (var) != TAILQ_END(head) &&					\
++	    ((next) = TAILQ_NEXT(var, field), 1); (var) = (next))
++
++#define	TAILQ_FOREACH_REVERSE(var, head, headname, field)		\
++	for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));\
++	    (var) != TAILQ_END(head);					\
++	    (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
++
++#define	TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev)	\
++	for ((var) = TAILQ_LAST((head), headname);			\
++	    (var) != TAILQ_END(head) && 				\
++	    ((prev) = TAILQ_PREV((var), headname, field), 1); (var) = (prev))
++
++/*
++ * Tail queue functions.
++ */
++#if defined(QUEUEDEBUG)
++#define	QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field)			\
++	if ((head)->tqh_first &&					\
++	    (head)->tqh_first->field.tqe_prev != &(head)->tqh_first)	\
++		QUEUEDEBUG_ABORT("TAILQ_INSERT_HEAD %p %s:%d", (head),	\
++		    __FILE__, __LINE__);
++#define	QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field)			\
++	if (*(head)->tqh_last != NULL)					\
++		QUEUEDEBUG_ABORT("TAILQ_INSERT_TAIL %p %s:%d", (head),	\
++		    __FILE__, __LINE__);
++#define	QUEUEDEBUG_TAILQ_OP(elm, field)					\
++	if ((elm)->field.tqe_next &&					\
++	    (elm)->field.tqe_next->field.tqe_prev !=			\
++	    &(elm)->field.tqe_next)					\
++		QUEUEDEBUG_ABORT("TAILQ_* forw %p %s:%d", (elm),	\
++		    __FILE__, __LINE__);				\
++	if (*(elm)->field.tqe_prev != (elm))				\
++		QUEUEDEBUG_ABORT("TAILQ_* back %p %s:%d", (elm),	\
++		    __FILE__, __LINE__);
++#define	QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field)			\
++	if ((elm)->field.tqe_next == NULL &&				\
++	    (head)->tqh_last != &(elm)->field.tqe_next)			\
++		QUEUEDEBUG_ABORT("TAILQ_PREREMOVE head %p elm %p %s:%d",\
++		    (head), (elm), __FILE__, __LINE__);
++#define	QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field)				\
++	(elm)->field.tqe_next = (void *)1L;				\
++	(elm)->field.tqe_prev = (void *)1L;
++#else
++#define	QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field)
++#define	QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field)
++#define	QUEUEDEBUG_TAILQ_OP(elm, field)
++#define	QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field)
++#define	QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field)
++#endif
++
++#define	TAILQ_INIT(head) do {						\
++	(head)->tqh_first = TAILQ_END(head);				\
++	(head)->tqh_last = &(head)->tqh_first;				\
++} while (/*CONSTCOND*/0)
++
++#define	TAILQ_INSERT_HEAD(head, elm, field) do {			\
++	QUEUEDEBUG_TAILQ_INSERT_HEAD((head), (elm), field)		\
++	if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head))\
++		(head)->tqh_first->field.tqe_prev =			\
++		    &(elm)->field.tqe_next;				\
++	else								\
++		(head)->tqh_last = &(elm)->field.tqe_next;		\
++	(head)->tqh_first = (elm);					\
++	(elm)->field.tqe_prev = &(head)->tqh_first;			\
++} while (/*CONSTCOND*/0)
++
++#define	TAILQ_INSERT_TAIL(head, elm, field) do {			\
++	QUEUEDEBUG_TAILQ_INSERT_TAIL((head), (elm), field)		\
++	(elm)->field.tqe_next = TAILQ_END(head);			\
++	(elm)->field.tqe_prev = (head)->tqh_last;			\
++	*(head)->tqh_last = (elm);					\
++	(head)->tqh_last = &(elm)->field.tqe_next;			\
++} while (/*CONSTCOND*/0)
++
++#define	TAILQ_INSERT_AFTER(head, listelm, elm, field) do {		\
++	QUEUEDEBUG_TAILQ_OP((listelm), field)				\
++	if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != 	\
++	    TAILQ_END(head))						\
++		(elm)->field.tqe_next->field.tqe_prev = 		\
++		    &(elm)->field.tqe_next;				\
++	else								\
++		(head)->tqh_last = &(elm)->field.tqe_next;		\
++	(listelm)->field.tqe_next = (elm);				\
++	(elm)->field.tqe_prev = &(listelm)->field.tqe_next;		\
++} while (/*CONSTCOND*/0)
++
++#define	TAILQ_INSERT_BEFORE(listelm, elm, field) do {			\
++	QUEUEDEBUG_TAILQ_OP((listelm), field)				\
++	(elm)->field.tqe_prev = (listelm)->field.tqe_prev;		\
++	(elm)->field.tqe_next = (listelm);				\
++	*(listelm)->field.tqe_prev = (elm);				\
++	(listelm)->field.tqe_prev = &(elm)->field.tqe_next;		\
++} while (/*CONSTCOND*/0)
++
++#define	TAILQ_REMOVE(head, elm, field) do {				\
++	QUEUEDEBUG_TAILQ_PREREMOVE((head), (elm), field)		\
++	QUEUEDEBUG_TAILQ_OP((elm), field)				\
++	if (((elm)->field.tqe_next) != TAILQ_END(head))			\
++		(elm)->field.tqe_next->field.tqe_prev = 		\
++		    (elm)->field.tqe_prev;				\
++	else								\
++		(head)->tqh_last = (elm)->field.tqe_prev;		\
++	*(elm)->field.tqe_prev = (elm)->field.tqe_next;			\
++	QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field);			\
++} while (/*CONSTCOND*/0)
++
++#define TAILQ_REPLACE(head, elm, elm2, field) do {			\
++        if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != 	\
++	    TAILQ_END(head))   						\
++                (elm2)->field.tqe_next->field.tqe_prev =		\
++                    &(elm2)->field.tqe_next;				\
++        else								\
++                (head)->tqh_last = &(elm2)->field.tqe_next;		\
++        (elm2)->field.tqe_prev = (elm)->field.tqe_prev;			\
++        *(elm2)->field.tqe_prev = (elm2);				\
++	QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field);			\
++} while (/*CONSTCOND*/0)
++
++#define	TAILQ_CONCAT(head1, head2, field) do {				\
++	if (!TAILQ_EMPTY(head2)) {					\
++		*(head1)->tqh_last = (head2)->tqh_first;		\
++		(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last;	\
++		(head1)->tqh_last = (head2)->tqh_last;			\
++		TAILQ_INIT((head2));					\
++	}								\
++} while (/*CONSTCOND*/0)
++
++/*
++ * Singly-linked Tail queue declarations.
++ */
++#define	STAILQ_HEAD(name, type)						\
++struct name {								\
++	struct type *stqh_first;	/* first element */		\
++	struct type **stqh_last;	/* addr of last next element */	\
++}
++
++#define	STAILQ_HEAD_INITIALIZER(head)					\
++	{ NULL, &(head).stqh_first }
++
++#define	STAILQ_ENTRY(type)						\
++struct {								\
++	struct type *stqe_next;	/* next element */			\
++}
++
++/*
++ * Singly-linked Tail queue access methods.
++ */
++#define	STAILQ_FIRST(head)	((head)->stqh_first)
++#define	STAILQ_END(head)	NULL
++#define	STAILQ_NEXT(elm, field)	((elm)->field.stqe_next)
++#define	STAILQ_EMPTY(head)	(STAILQ_FIRST(head) == STAILQ_END(head))
++
++/*
++ * Singly-linked Tail queue functions.
++ */
++#define	STAILQ_INIT(head) do {						\
++	(head)->stqh_first = NULL;					\
++	(head)->stqh_last = &(head)->stqh_first;				\
++} while (/*CONSTCOND*/0)
++
++#define	STAILQ_INSERT_HEAD(head, elm, field) do {			\
++	if (((elm)->field.stqe_next = (head)->stqh_first) == NULL)	\
++		(head)->stqh_last = &(elm)->field.stqe_next;		\
++	(head)->stqh_first = (elm);					\
++} while (/*CONSTCOND*/0)
++
++#define	STAILQ_INSERT_TAIL(head, elm, field) do {			\
++	(elm)->field.stqe_next = NULL;					\
++	*(head)->stqh_last = (elm);					\
++	(head)->stqh_last = &(elm)->field.stqe_next;			\
++} while (/*CONSTCOND*/0)
++
++#define	STAILQ_INSERT_AFTER(head, listelm, elm, field) do {		\
++	if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
++		(head)->stqh_last = &(elm)->field.stqe_next;		\
++	(listelm)->field.stqe_next = (elm);				\
++} while (/*CONSTCOND*/0)
++
++#define	STAILQ_REMOVE_HEAD(head, field) do {				\
++	if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
++		(head)->stqh_last = &(head)->stqh_first;			\
++} while (/*CONSTCOND*/0)
++
++#define	STAILQ_REMOVE(head, elm, type, field) do {			\
++	if ((head)->stqh_first == (elm)) {				\
++		STAILQ_REMOVE_HEAD((head), field);			\
++	} else {							\
++		struct type *curelm = (head)->stqh_first;		\
++		while (curelm->field.stqe_next != (elm))			\
++			curelm = curelm->field.stqe_next;		\
++		if ((curelm->field.stqe_next =				\
++			curelm->field.stqe_next->field.stqe_next) == NULL) \
++			    (head)->stqh_last = &(curelm)->field.stqe_next; \
++	}								\
++} while (/*CONSTCOND*/0)
++
++#define	STAILQ_FOREACH(var, head, field)				\
++	for ((var) = ((head)->stqh_first);				\
++		(var);							\
++		(var) = ((var)->field.stqe_next))
++
++#define	STAILQ_FOREACH_SAFE(var, head, field, tvar)			\
++	for ((var) = STAILQ_FIRST((head));				\
++	    (var) && ((tvar) = STAILQ_NEXT((var), field), 1);		\
++	    (var) = (tvar))
++
++#define	STAILQ_CONCAT(head1, head2) do {				\
++	if (!STAILQ_EMPTY((head2))) {					\
++		*(head1)->stqh_last = (head2)->stqh_first;		\
++		(head1)->stqh_last = (head2)->stqh_last;		\
++		STAILQ_INIT((head2));					\
++	}								\
++} while (/*CONSTCOND*/0)
++
++#define	STAILQ_LAST(head, type, field)					\
++	(STAILQ_EMPTY((head)) ?						\
++		NULL :							\
++	        ((struct type *)(void *)				\
++		((char *)((head)->stqh_last) - offsetof(struct type, field))))
++
++
++#ifndef _KERNEL
++/*
++ * Circular queue definitions. Do not use. We still keep the macros
++ * for compatibility but because of pointer aliasing issues their use
++ * is discouraged!
++ */
++
++/*
++ * __launder_type():  We use this ugly hack to work around the the compiler
++ * noticing that two types may not alias each other and elide tests in code.
++ * We hit this in the CIRCLEQ macros when comparing 'struct name *' and
++ * 'struct type *' (see CIRCLEQ_HEAD()).  Modern compilers (such as GCC
++ * 4.8) declare these comparisons as always false, causing the code to
++ * not run as designed.
++ *
++ * This hack is only to be used for comparisons and thus can be fully const.
++ * Do not use for assignment.
++ *
++ * If we ever choose to change the ABI of the CIRCLEQ macros, we could fix
++ * this by changing the head/tail sentinal values, but see the note above
++ * this one.
++ */
++static __inline const void * __launder_type(const void *);
++static __inline const void *
++__launder_type(const void *__x)
++{
++	__asm __volatile("" : "+r" (__x));
++	return __x;
++}
++
++#if defined(QUEUEDEBUG)
++#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field)				\
++	if ((head)->cqh_first != CIRCLEQ_ENDC(head) &&			\
++	    (head)->cqh_first->field.cqe_prev != CIRCLEQ_ENDC(head))	\
++		QUEUEDEBUG_ABORT("CIRCLEQ head forw %p %s:%d", (head),	\
++		      __FILE__, __LINE__);				\
++	if ((head)->cqh_last != CIRCLEQ_ENDC(head) &&			\
++	    (head)->cqh_last->field.cqe_next != CIRCLEQ_ENDC(head))	\
++		QUEUEDEBUG_ABORT("CIRCLEQ head back %p %s:%d", (head),	\
++		      __FILE__, __LINE__);
++#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field)			\
++	if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) {		\
++		if ((head)->cqh_last != (elm))				\
++			QUEUEDEBUG_ABORT("CIRCLEQ elm last %p %s:%d",	\
++			    (elm), __FILE__, __LINE__);			\
++	} else {							\
++		if ((elm)->field.cqe_next->field.cqe_prev != (elm))	\
++			QUEUEDEBUG_ABORT("CIRCLEQ elm forw %p %s:%d",	\
++			    (elm), __FILE__, __LINE__);			\
++	}								\
++	if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) {		\
++		if ((head)->cqh_first != (elm))				\
++			QUEUEDEBUG_ABORT("CIRCLEQ elm first %p %s:%d",	\
++			    (elm), __FILE__, __LINE__);			\
++	} else {							\
++		if ((elm)->field.cqe_prev->field.cqe_next != (elm))	\
++			QUEUEDEBUG_ABORT("CIRCLEQ elm prev %p %s:%d",	\
++			    (elm), __FILE__, __LINE__);			\
++	}
++#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field)			\
++	(elm)->field.cqe_next = (void *)1L;				\
++	(elm)->field.cqe_prev = (void *)1L;
++#else
++#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field)
++#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field)
++#define QUEUEDEBUG_CIRCLEQ_POSTREMOVE(elm, field)
++#endif
++
++#define	CIRCLEQ_HEAD(name, type)					\
++struct name {								\
++	struct type *cqh_first;		/* first element */		\
++	struct type *cqh_last;		/* last element */		\
++}
++
++#define	CIRCLEQ_HEAD_INITIALIZER(head)					\
++	{ CIRCLEQ_END(&head), CIRCLEQ_END(&head) }
++
++#define	CIRCLEQ_ENTRY(type)						\
++struct {								\
++	struct type *cqe_next;		/* next element */		\
++	struct type *cqe_prev;		/* previous element */		\
++}
++
++/*
++ * Circular queue functions.
++ */
++#define	CIRCLEQ_INIT(head) do {						\
++	(head)->cqh_first = CIRCLEQ_END(head);				\
++	(head)->cqh_last = CIRCLEQ_END(head);				\
++} while (/*CONSTCOND*/0)
++
++#define	CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do {		\
++	QUEUEDEBUG_CIRCLEQ_HEAD((head), field)				\
++	QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field)		\
++	(elm)->field.cqe_next = (listelm)->field.cqe_next;		\
++	(elm)->field.cqe_prev = (listelm);				\
++	if ((listelm)->field.cqe_next == CIRCLEQ_ENDC(head))		\
++		(head)->cqh_last = (elm);				\
++	else								\
++		(listelm)->field.cqe_next->field.cqe_prev = (elm);	\
++	(listelm)->field.cqe_next = (elm);				\
++} while (/*CONSTCOND*/0)
++
++#define	CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do {		\
++	QUEUEDEBUG_CIRCLEQ_HEAD((head), field)				\
++	QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field)		\
++	(elm)->field.cqe_next = (listelm);				\
++	(elm)->field.cqe_prev = (listelm)->field.cqe_prev;		\
++	if ((listelm)->field.cqe_prev == CIRCLEQ_ENDC(head))		\
++		(head)->cqh_first = (elm);				\
++	else								\
++		(listelm)->field.cqe_prev->field.cqe_next = (elm);	\
++	(listelm)->field.cqe_prev = (elm);				\
++} while (/*CONSTCOND*/0)
++
++#define	CIRCLEQ_INSERT_HEAD(head, elm, field) do {			\
++	QUEUEDEBUG_CIRCLEQ_HEAD((head), field)				\
++	(elm)->field.cqe_next = (head)->cqh_first;			\
++	(elm)->field.cqe_prev = CIRCLEQ_END(head);			\
++	if ((head)->cqh_last == CIRCLEQ_ENDC(head))			\
++		(head)->cqh_last = (elm);				\
++	else								\
++		(head)->cqh_first->field.cqe_prev = (elm);		\
++	(head)->cqh_first = (elm);					\
++} while (/*CONSTCOND*/0)
++
++#define	CIRCLEQ_INSERT_TAIL(head, elm, field) do {			\
++	QUEUEDEBUG_CIRCLEQ_HEAD((head), field)				\
++	(elm)->field.cqe_next = CIRCLEQ_END(head);			\
++	(elm)->field.cqe_prev = (head)->cqh_last;			\
++	if ((head)->cqh_first == CIRCLEQ_ENDC(head))			\
++		(head)->cqh_first = (elm);				\
++	else								\
++		(head)->cqh_last->field.cqe_next = (elm);		\
++	(head)->cqh_last = (elm);					\
++} while (/*CONSTCOND*/0)
++
++#define	CIRCLEQ_REMOVE(head, elm, field) do {				\
++	QUEUEDEBUG_CIRCLEQ_HEAD((head), field)				\
++	QUEUEDEBUG_CIRCLEQ_ELM((head), (elm), field)			\
++	if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head))		\
++		(head)->cqh_last = (elm)->field.cqe_prev;		\
++	else								\
++		(elm)->field.cqe_next->field.cqe_prev =			\
++		    (elm)->field.cqe_prev;				\
++	if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head))		\
++		(head)->cqh_first = (elm)->field.cqe_next;		\
++	else								\
++		(elm)->field.cqe_prev->field.cqe_next =			\
++		    (elm)->field.cqe_next;				\
++	QUEUEDEBUG_CIRCLEQ_POSTREMOVE((elm), field)			\
++} while (/*CONSTCOND*/0)
++
++#define	CIRCLEQ_FOREACH(var, head, field)				\
++	for ((var) = ((head)->cqh_first);				\
++		(var) != CIRCLEQ_ENDC(head);				\
++		(var) = ((var)->field.cqe_next))
++
++#define	CIRCLEQ_FOREACH_REVERSE(var, head, field)			\
++	for ((var) = ((head)->cqh_last);				\
++		(var) != CIRCLEQ_ENDC(head);				\
++		(var) = ((var)->field.cqe_prev))
++
++/*
++ * Circular queue access methods.
++ */
++#define	CIRCLEQ_FIRST(head)		((head)->cqh_first)
++#define	CIRCLEQ_LAST(head)		((head)->cqh_last)
++/* For comparisons */
++#define	CIRCLEQ_ENDC(head)		(__launder_type(head))
++/* For assignments */
++#define	CIRCLEQ_END(head)		((void *)(head))
++#define	CIRCLEQ_NEXT(elm, field)	((elm)->field.cqe_next)
++#define	CIRCLEQ_PREV(elm, field)	((elm)->field.cqe_prev)
++#define	CIRCLEQ_EMPTY(head)						\
++    (CIRCLEQ_FIRST(head) == CIRCLEQ_ENDC(head))
++
++#define CIRCLEQ_LOOP_NEXT(head, elm, field)				\
++	(((elm)->field.cqe_next == CIRCLEQ_ENDC(head))			\
++	    ? ((head)->cqh_first)					\
++	    : (elm->field.cqe_next))
++#define CIRCLEQ_LOOP_PREV(head, elm, field)				\
++	(((elm)->field.cqe_prev == CIRCLEQ_ENDC(head))			\
++	    ? ((head)->cqh_last)					\
++	    : (elm->field.cqe_prev))
++#endif /* !_KERNEL */
++
++#endif	/* !_SYS_QUEUE_H_ */
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch
new file mode 100644
index 0000000..512e934
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-functionality.patch
@@ -0,0 +1,144 @@
+uclibc and musl does not provide des functionality. Lets disable it.
+
+Upstream-Status: Inappropriate [uclibc and musl specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur libtirpc-1.0.1-orig/src/Makefile.am libtirpc-1.0.1/src/Makefile.am
+--- libtirpc-1.0.1-orig/src/Makefile.am	2015-10-30 17:15:14.000000000 +0200
++++ libtirpc-1.0.1/src/Makefile.am	2015-12-21 15:56:17.094702429 +0200
+@@ -22,9 +22,8 @@
+         pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \
+         rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
+         rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
+-	svc_auth_des.c \
+         svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
+-        auth_time.c auth_des.c authdes_prot.c debug.c
++        debug.c
+ 
+ ## XDR
+ libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c
+@@ -41,8 +40,8 @@
+     libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS)
+ endif
+ 
+-libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
+-libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
++#libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c
++#libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c
+ 
+ CLEANFILES	       = cscope.* *~
+ DISTCLEANFILES	       = Makefile.in
+diff -Naur libtirpc-1.0.1-orig/src/rpc_soc.c libtirpc-1.0.1/src/rpc_soc.c
+--- libtirpc-1.0.1-orig/src/rpc_soc.c	2015-10-30 17:15:14.000000000 +0200
++++ libtirpc-1.0.1/src/rpc_soc.c	2015-12-21 15:56:17.095702416 +0200
+@@ -61,7 +61,6 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <rpcsvc/nis.h>
+ 
+ #include "rpc_com.h"
+ 
+@@ -522,86 +521,6 @@
+ }
+ 
+ /*
+- * Create the client des authentication object. Obsoleted by
+- * authdes_seccreate().
+- */
+-AUTH *
+-authdes_create(servername, window, syncaddr, ckey)
+-	char *servername;		/* network name of server */
+-	u_int window;			/* time to live */
+-	struct sockaddr *syncaddr;	/* optional hostaddr to sync with */
+-	des_block *ckey;		/* optional conversation key to use */
+-{
+-	AUTH *nauth;
+-	char hostname[NI_MAXHOST];
+-
+-	if (syncaddr) {
+-		/*
+-		 * Change addr to hostname, because that is the way
+-		 * new interface takes it.
+-		 */
+-	        switch (syncaddr->sa_family) {
+-		case AF_INET:
+-		  if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
+-				  sizeof hostname, NULL, 0, 0) != 0)
+-		    goto fallback;
+-		  break;
+-		case AF_INET6:
+-		  if (getnameinfo(syncaddr, sizeof(struct sockaddr_in6), hostname,
+-				  sizeof hostname, NULL, 0, 0) != 0)
+-		    goto fallback;
+-		  break;
+-		default:
+-		  goto fallback;
+-		}
+-		nauth = authdes_seccreate(servername, window, hostname, ckey);
+-		return (nauth);
+-	}
+-fallback:
+-	return authdes_seccreate(servername, window, NULL, ckey);
+-}
+-
+-/*
+- * Create the client des authentication object. Obsoleted by
+- * authdes_pk_seccreate().
+- */
+-extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *,
+-        const des_block *, nis_server *);
+-
+-AUTH *
+-authdes_pk_create(servername, pkey, window, syncaddr, ckey)
+-	char *servername;		/* network name of server */
+-	netobj *pkey;			/* public key */
+-	u_int window;			/* time to live */
+-	struct sockaddr *syncaddr;	/* optional hostaddr to sync with */
+-	des_block *ckey;		/* optional conversation key to use */
+-{
+-	AUTH *nauth;
+-	char hostname[NI_MAXHOST];
+-
+-	if (syncaddr) {
+-		/*
+-		 * Change addr to hostname, because that is the way
+-		 * new interface takes it.
+-		 */
+-	        switch (syncaddr->sa_family) {
+-		case AF_INET:
+-		  if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname,
+-				  sizeof hostname, NULL, 0, 0) != 0)
+-		    goto fallback;
+-		  break;
+-		default:
+-		  goto fallback;
+-		}
+-		nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL);
+-		return (nauth);
+-	}
+-fallback:
+-	return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL);
+-}
+-
+-
+-/*
+  * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
+  */
+ CLIENT *
+diff -Naur libtirpc-1.0.1-orig/src/svc_auth.c libtirpc-1.0.1/src/svc_auth.c
+--- libtirpc-1.0.1-orig/src/svc_auth.c	2015-10-30 17:15:14.000000000 +0200
++++ libtirpc-1.0.1/src/svc_auth.c	2015-12-21 15:56:17.095702416 +0200
+@@ -114,9 +114,6 @@
+ 	case AUTH_SHORT:
+ 		dummy = _svcauth_short(rqst, msg);
+ 		return (dummy);
+-	case AUTH_DES:
+-		dummy = _svcauth_des(rqst, msg);
+-		return (dummy);
+ #ifdef HAVE_RPCSEC_GSS
+ 	case RPCSEC_GSS:
+ 		dummy = _svcauth_gss(rqst, msg, no_dispatch);
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch
deleted file mode 100644
index 553b1ff..0000000
--- a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/remove-des-uclibc.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-uclibc does not provide des functionality unlike eglibc so lets disable ssl support
-
-Upstream-Status: Inappropriate [uclibc specific]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: libtirpc-0.2.5/src/rpc_soc.c
-===================================================================
---- libtirpc-0.2.5.orig/src/rpc_soc.c
-+++ libtirpc-0.2.5/src/rpc_soc.c
-@@ -520,6 +520,7 @@ clnt_broadcast(prog, vers, proc, xargs,
- 	    (resultproc_t) rpc_wrap_bcast, "udp");
- }
- 
-+#if 0
- /*
-  * Create the client des authentication object. Obsoleted by
-  * authdes_seccreate().
-@@ -551,6 +552,7 @@ fallback:
- 	dummy = authdes_seccreate(servername, window, NULL, ckey);
- 	return (dummy);
- }
-+#endif
- 
- /*
-  * Create a client handle for a unix connection. Obsoleted by clnt_vc_create()
-Index: libtirpc-0.2.5/src/Makefile.am
-===================================================================
---- libtirpc-0.2.5.orig/src/Makefile.am
-+++ libtirpc-0.2.5/src/Makefile.am
-@@ -51,7 +51,7 @@ libtirpc_la_SOURCES = auth_none.c auth_u
-         rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \
-         rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \
-         svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \
--        auth_time.c auth_des.c authdes_prot.c debug.c
-+        auth_time.c debug.c
- 
- ## XDR
- libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/va_list.patch b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/va_list.patch
deleted file mode 100644
index 855d15b..0000000
--- a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc/va_list.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-This patch is fixing build with uclibc where compiler ( gcc5 ) says it cant find va_list
-the patch is right for upstreaming as well
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Upstream-Status: Pending
-
-Index: libtirpc-0.2.5/src/debug.h
-===================================================================
---- libtirpc-0.2.5.orig/src/debug.h
-+++ libtirpc-0.2.5/src/debug.h
-@@ -22,6 +22,7 @@
- #ifndef _DEBUG_H
- #define _DEBUG_H
- #include <syslog.h>
-+#include <stdarg.h>
- 
- extern int libtirpc_debug_level;
- extern int  log_stderr;
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb
deleted file mode 100644
index 330b829..0000000
--- a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc_0.2.5.bb
+++ /dev/null
@@ -1,37 +0,0 @@
-SUMMARY = "Transport-Independent RPC library"
-DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux"
-SECTION = "libs/network"
-HOMEPAGE = "http://sourceforge.net/projects/libtirpc/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \
-                    file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
-
-DEPENDS += "xz-native"
-PROVIDES = "virtual/librpc"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \
-           ${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \
-           file://libtirpc-0.2.1-fortify.patch \
-          "
-
-SRC_URI_append_libc-uclibc = " file://remove-des-uclibc.patch \
-                               file://va_list.patch \
-                             "
-
-SRC_URI[libtirpc.md5sum] = "8cd41a5ef5a9b50d0fb6abb98af15368"
-SRC_URI[libtirpc.sha256sum] = "62f9de7c2c8686c568757730e1fef66502a0e00d6cacf33546d0267984e002db"
-SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445"
-SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF = "--disable-gssapi"
-
-do_configure_prepend () {
-        cp -r ${S}/../tirpc ${S}
-}
-
-do_install_append() {
-        chown root:root ${D}${sysconfdir}/netconfig
-}
diff --git a/yocto-poky/meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb
new file mode 100644
index 0000000..e321d47
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libtirpc/libtirpc_1.0.1.bb
@@ -0,0 +1,40 @@
+SUMMARY = "Transport-Independent RPC library"
+DESCRIPTION = "Libtirpc is a port of Suns Transport-Independent RPC library to Linux"
+SECTION = "libs/network"
+HOMEPAGE = "http://sourceforge.net/projects/libtirpc/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=183075&atid=903784"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \
+                    file://src/netname.c;beginline=1;endline=27;md5=f8a8cd2cb25ac5aa16767364fb0e3c24"
+
+PROVIDES = "virtual/librpc"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2;name=libtirpc \
+           ${GENTOO_MIRROR}/${BPN}-glibc-nfs.tar.xz;name=glibc-nfs \
+           file://libtirpc-0.2.1-fortify.patch \
+           file://0001-Add-missing-rwlock_unlocks-in-xprt_register.patch \
+          "
+
+SRC_URI_append_libc-uclibc = " file://remove-des-functionality.patch \
+                             "
+
+SRC_URI_append_libc-musl = " file://remove-des-functionality.patch \
+                             file://Use-netbsd-queue.h.patch \
+                           "
+
+SRC_URI[libtirpc.md5sum] = "36ce1c0ff80863bb0839d54aa0b94014"
+SRC_URI[libtirpc.sha256sum] = "5156974f31be7ccbc8ab1de37c4739af6d9d42c87b1d5caf4835dda75fcbb89e"
+SRC_URI[glibc-nfs.md5sum] = "5ae500b9d0b6b72cb875bc04944b9445"
+SRC_URI[glibc-nfs.sha256sum] = "2677cfedf626f3f5a8f6e507aed5bb8f79a7453b589d684dbbc086e755170d83"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-gssapi"
+
+do_configure_prepend () {
+        cp -r ${S}/../tirpc ${S}
+}
+
+do_install_append() {
+        chown root:root ${D}${sysconfdir}/netconfig
+}
diff --git a/yocto-poky/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch b/yocto-poky/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch
new file mode 100644
index 0000000..79756b9
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libuser/libuser/0001-Check-for-issetugid.patch
@@ -0,0 +1,62 @@
+From d0537cb7f2dc5877700ad78dfd191515379d4edc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 02:22:51 +0000
+Subject: [PATCH 1/2] Check for issetugid()
+
+If secure version of getenv is not there then we can use
+issetugid() as aid to call getenv()
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac |  1 +
+ lib/config.c | 12 +++++++++++-
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1ded1a2..ee19e1f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -125,6 +125,7 @@ AC_TYPE_OFF_T
+ AC_TYPE_SIZE_T
+ 
+ AC_CHECK_FUNCS([__secure_getenv secure_getenv])
++AC_CHECK_FUNCS([issetugid])
+ 
+ # Modify CFLAGS after all tests are run (some of them could fail because
+ # of the -Werror).
+diff --git a/lib/config.c b/lib/config.c
+index 29e7120..30f9daf 100644
+--- a/lib/config.c
++++ b/lib/config.c
+@@ -44,8 +44,10 @@
+ #  define safe_getenv(string) secure_getenv(string)
+ #elif defined(HAVE___SECURE_GETENV)
+ #  define safe_getenv(string) __secure_getenv(string)
++#elif defined(HAVE_ISSETUGID)
++#  define safe_getenv(string) safe_getenv_issetugid(string)
+ #else
+-#  error Neither secure_getenv not __secure_getenv are available
++#  error None of secure_getenv, __secure_getenv, or issetugid is available
+ #endif
+ 
+ struct config_config {
+@@ -59,6 +61,14 @@ struct config_key {
+ 	GList *values;
+ };
+ 
++static const char*
++safe_getenv_issetugid(const char* name)
++{
++	if (issetugid ())
++		return 0;
++	return getenv (name);
++}
++
+ /* Compare two section names */
+ static int
+ compare_section_names(gconstpointer a, gconstpointer b)
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch b/yocto-poky/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch
new file mode 100644
index 0000000..4bc0219
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/libuser/libuser/0002-remove-unused-execinfo.h.patch
@@ -0,0 +1,27 @@
+From 4b2f81f307ffeac12956e5c16e894e5ebb937ea5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 02:26:00 +0000
+Subject: [PATCH 2/2] remove unused execinfo.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ lib/error.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/lib/error.c b/lib/error.c
+index a5ec30a..443e601 100644
+--- a/lib/error.c
++++ b/lib/error.c
+@@ -18,7 +18,6 @@
+ #include <config.h>
+ #include <sys/types.h>
+ #include <errno.h>
+-#include <execinfo.h>
+ #include <libintl.h>
+ #include <stdarg.h>
+ #include <stdlib.h>
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb b/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
index c4ed459..1369ae8 100644
--- a/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
+++ b/yocto-poky/meta/recipes-extended/libuser/libuser_0.62.bb
@@ -12,12 +12,14 @@
 SECTION = "base"
 
 SRC_URI = "https://fedorahosted.org/releases/l/i/libuser/libuser-${PV}.tar.xz \
-           "
+           file://0001-Check-for-issetugid.patch \
+           file://0002-remove-unused-execinfo.h.patch \
+          "
 
 SRC_URI[md5sum] = "63e5e5c551e99dc5302b40b80bd6d4f2"
 SRC_URI[sha256sum] = "a58ff4fabb01a25043b142185a33eeea961109dd60d4b40b6a9df4fa3cace20b"
 
-DEPENDS = "popt libpam glib-2.0 xz-native docbook-utils-native linuxdoc-tools-native python"
+DEPENDS = "popt libpam glib-2.0 docbook-utils-native linuxdoc-tools-native python"
 
 inherit autotools gettext pythonnative python-dir pkgconfig
 
@@ -25,6 +27,5 @@
 
 PACKAGES += "${PN}-python "
 
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug"
 FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
 
diff --git a/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch b/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch
deleted file mode 100644
index a9df174..0000000
--- a/yocto-poky/meta/recipes-extended/lighttpd/lighttpd/0001-mod_cgi-buffers-data-without-bound.patch
+++ /dev/null
@@ -1,387 +0,0 @@
-From e6ccbab5d42b110ac4f6ce1f72cb1e9ccbe4400a Mon Sep 17 00:00:00 2001
-From: Li xin <lixin.fnst@cn.fujitsu.com>
-Date: Tue, 16 Jun 2015 19:02:38 +0900
-Subject: [PATCH] mod_cgi buffers data without bound so fix it
-
-Upstream-Status: Submitted [http://redmine.lighttpd.net/issues/1264]
-
-Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
-
-Update context for 1.4.36.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- doc/config/lighttpd.conf |   8 ++
- src/mod_cgi.c            | 188 ++++++++++++++++++++++++++++++++++++++++++++---
- 2 files changed, 187 insertions(+), 9 deletions(-)
-
-diff --git a/doc/config/lighttpd.conf b/doc/config/lighttpd.conf
-index 60b0ae1..9c101a7 100644
---- a/doc/config/lighttpd.conf
-+++ b/doc/config/lighttpd.conf
-@@ -375,6 +375,14 @@ server.upload-dirs = ( "/var/tmp" )
- ##
- #######################################################################
- 
-+#######################################################################
-+##
-+##
-+## maximum bytes in send_raw before backing off [KByte]
-+##  cgi.high-waterlevel        = 10240
-+## minimum bytes in send_raw to disable backoff [KByte]
-+##  cgi.low-waterlevel         = 5120
-+#######################################################################
- 
- #######################################################################
- ##
-diff --git a/src/mod_cgi.c b/src/mod_cgi.c
-index 01b1877..7c67eb5 100644
---- a/src/mod_cgi.c
-+++ b/src/mod_cgi.c
-@@ -38,6 +38,10 @@
- 
- #include "version.h"
- 
-+/* for output logs */
-+char msgbuf[2048];
-+
-+
- enum {EOL_UNSET, EOL_N, EOL_RN};
- 
- typedef struct {
-@@ -53,9 +57,19 @@ typedef struct {
- 	size_t size;
- } buffer_pid_t;
- 
-+struct handler_ctx;
-+
-+typedef struct {
-+	struct handler_ctx **hctx;
-+	size_t used;
-+	size_t size;
-+} buffer_ctx_t;
-+
- typedef struct {
- 	array *cgi;
- 	unsigned short execute_x_only;
-+	unsigned int high_waterlevel; /* maximum bytes in send_raw before backing off */
-+	unsigned int low_waterlevel;  /* minimum bytes in send_raw to disable backoff */
- } plugin_config;
- 
- typedef struct {
-@@ -68,9 +82,11 @@ typedef struct {
- 	plugin_config **config_storage;
- 
- 	plugin_config conf;
-+
-+	buffer_ctx_t cgi_ctx;
- } plugin_data;
- 
--typedef struct {
-+typedef struct handler_ctx {
- 	pid_t pid;
- 	int fd;
- 	int fde_ndx; /* index into the fd-event buffer */
-@@ -78,11 +94,16 @@ typedef struct {
- 	connection *remote_conn;  /* dumb pointer */
- 	plugin_data *plugin_data; /* dumb pointer */
- 
-+	int throttling;        /* 1=waiting for send_raw buffer to drain */
-+	off_t high_waterlevel; /* maximum bytes in send_raw before backing off */
-+	off_t low_waterlevel;  /* minimum bytes in send_raw to disable backoff */
-+	off_t bytes_in_buffer;
-+
- 	buffer *response;
- 	buffer *response_header;
- } handler_ctx;
- 
--static handler_ctx * cgi_handler_ctx_init(void) {
-+static handler_ctx * cgi_handler_ctx_init(plugin_data *p) {
- 	handler_ctx *hctx = calloc(1, sizeof(*hctx));
- 
- 	force_assert(hctx);
-@@ -90,13 +111,26 @@ static handler_ctx * cgi_handler_ctx_init(void) {
- 	hctx->response = buffer_init();
- 	hctx->response_header = buffer_init();
- 
-+	hctx->throttling = 0;
-+	hctx->high_waterlevel = (off_t)p->conf.high_waterlevel * 1024;
-+	hctx->low_waterlevel  = (off_t)p->conf.low_waterlevel  * 1024;
-+	if (hctx->low_waterlevel >= hctx->high_waterlevel) {
-+	    hctx->low_waterlevel = hctx->high_waterlevel * 3 / 4; /* 75% */
-+	}
-+	hctx->bytes_in_buffer = 0;
-+
- 	return hctx;
- }
- 
--static void cgi_handler_ctx_free(handler_ctx *hctx) {
-+static void cgi_handler_ctx_free(server *srv, handler_ctx *hctx) {
- 	buffer_free(hctx->response);
- 	buffer_free(hctx->response_header);
- 
-+	/* to avoid confusion */
-+	if (hctx->throttling) {
-+	    log_error_write(srv, __FILE__, __LINE__, "s", "unthrottled");
-+	}
-+
- 	free(hctx);
- }
- 
-@@ -154,6 +188,8 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
- 	config_values_t cv[] = {
- 		{ "cgi.assign",                  NULL, T_CONFIG_ARRAY, T_CONFIG_SCOPE_CONNECTION },       /* 0 */
- 		{ "cgi.execute-x-only",          NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION },     /* 1 */
-+		{ "cgi.high-waterlevel",         NULL, T_CONFIG_INT,   T_CONFIG_SCOPE_CONNECTION },       /* 2 */
-+		{ "cgi.low-waterlevel",          NULL, T_CONFIG_INT,   T_CONFIG_SCOPE_CONNECTION },       /* 3 */
- 		{ NULL,                          NULL, T_CONFIG_UNSET, T_CONFIG_SCOPE_UNSET}
- 	};
- 
-@@ -169,9 +205,13 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
- 
- 		s->cgi    = array_init();
- 		s->execute_x_only = 0;
-+		s->high_waterlevel = 0; /* 0 == disabled */
-+		s->low_waterlevel  = 0;
- 
- 		cv[0].destination = s->cgi;
- 		cv[1].destination = &(s->execute_x_only);
-+		cv[2].destination = &(s->high_waterlevel);
-+		cv[3].destination = &(s->low_waterlevel);
- 
- 		p->config_storage[i] = s;
- 
-@@ -184,6 +224,51 @@ SETDEFAULTS_FUNC(mod_fastcgi_set_defaults) {
- }
- 
- 
-+static void cgi_recount_bytes_in_buffer(handler_ctx *hctx)
-+{
-+	chunkqueue *cq = hctx->remote_conn->write_queue;
-+	hctx->bytes_in_buffer = chunkqueue_length(cq) - chunkqueue_written(cq);
-+}
-+
-+
-+static void cgi_throttling_control(server *srv, handler_ctx *hctx)
-+{
-+	cgi_recount_bytes_in_buffer(hctx);
-+
-+#ifdef DEBUG
-+	sprintf(msgbuf, "throttling=%d, chars=%llu, high=%llu, low=%llu",
-+		hctx->throttling, hctx->bytes_in_buffer,
-+		hctx->high_waterlevel, hctx->low_waterlevel);
-+	log_error_write(srv, __FILE__, __LINE__, "ss",
-+			"(debug) throttling control,", msgbuf);
-+#endif
-+
-+	if (hctx->throttling) {
-+		sprintf(msgbuf, "throttling; chars in queue=%llu,"
-+			" low-waterlevel=%llu, high-waterlevel=%llu",
-+			hctx->bytes_in_buffer,
-+			hctx->low_waterlevel, hctx->high_waterlevel);
-+		log_error_write(srv, __FILE__, __LINE__, "s", msgbuf);
-+		if (hctx->bytes_in_buffer <= hctx->low_waterlevel) {
-+			fdevent_event_set(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN);
-+			hctx->throttling = 0;
-+			log_error_write(srv, __FILE__, __LINE__, "s", "unthrottled");
-+		}
-+	} else {
-+		if (hctx->high_waterlevel != 0 &&
-+			hctx->high_waterlevel <= hctx->bytes_in_buffer) {
-+			fdevent_event_del(srv->ev, &(hctx->fde_ndx), hctx->fd);
-+			hctx->throttling = 1;
-+			sprintf(msgbuf, "throttled; chars in queue=%llu,"
-+				" low-waterlevel=%llu, high-waterlevel=%llu",
-+				hctx->bytes_in_buffer,
-+				hctx->low_waterlevel, hctx->high_waterlevel);
-+			log_error_write(srv, __FILE__, __LINE__, "s", msgbuf);
-+		}
-+	}
-+}
-+
-+
- static int cgi_pid_add(server *srv, plugin_data *p, pid_t pid) {
- 	int m = -1;
- 	size_t i;
-@@ -230,6 +315,39 @@ static int cgi_pid_del(server *srv, plugin_data *p, pid_t pid) {
- 	return 0;
- }
- 
-+
-+static void cgi_ctx_add(plugin_data *p, handler_ctx *hctx) {
-+	buffer_ctx_t *r = &(p->cgi_ctx);
-+
-+	if (r->size == 0) {
-+		r->size = 16;
-+		r->hctx = malloc(sizeof(*r->hctx) * r->size);
-+	} else if (r->used == r->size) {
-+		r->size += 16;
-+		r->hctx = realloc(r->hctx, sizeof(*r->hctx) * r->size);
-+	}
-+
-+	r->hctx[r->used++] = hctx;
-+}
-+
-+static void cgi_ctx_del(plugin_data *p, handler_ctx *hctx) {
-+	size_t i;
-+	buffer_ctx_t *r = &(p->cgi_ctx);
-+
-+	for (i = 0; i < r->used; i++) {
-+		if (r->hctx[i] == hctx) break;
-+	}
-+
-+	if (i != r->used) {
-+		/* found */
-+
-+		if (i != r->used - 1) {
-+			r->hctx[i] = r->hctx[r->used - 1];
-+		}
-+		r->used--;
-+	}
-+}
-+
- static int cgi_response_parse(server *srv, connection *con, plugin_data *p, buffer *in) {
- 	char *ns;
- 	const char *s;
-@@ -380,6 +498,14 @@ static int cgi_demux_response(server *srv, handler_ctx *hctx) {
- 
- 		buffer_commit(hctx->response, n);
- 
-+#ifdef DEBUG
-+		sprintf(msgbuf, "n=%d, bytes_out=%llu, bytes_in=%llu", n,
-+			(unsigned long long)con->write_queue->bytes_out,
-+			(unsigned long long)con->write_queue->bytes_in);
-+		log_error_write(srv, __FILE__, __LINE__, "ss",
-+				"(debug) read,", msgbuf);
-+#endif
-+
- 		/* split header from body */
- 
- 		if (con->file_started == 0) {
-@@ -503,7 +629,20 @@ static int cgi_demux_response(server *srv, handler_ctx *hctx) {
- 			}
- 		} else {
- 			http_chunk_append_buffer(srv, con, hctx->response);
-+#ifdef DEBUG
-+			sprintf(msgbuf, "n=%d, bytes_out=%llu, bytes_in=%llu, limit=%llu", n,
-+				(unsigned long long)con->write_queue->bytes_out,
-+				(unsigned long long)con->write_queue->bytes_in,
-+				(unsigned long long)hctx->high_waterlevel);
-+			log_error_write(srv, __FILE__, __LINE__,
-+					"ss", "(debug) append,", msgbuf);
-+#endif
- 			joblist_append(srv, con);
-+
-+			cgi_throttling_control(srv, hctx);
-+			if (hctx->throttling) {
-+				return FDEVENT_HANDLED_NOT_FINISHED;
-+			}
- 		}
- 
- #if 0
-@@ -553,8 +692,9 @@ static handler_t cgi_connection_close(server *srv, handler_ctx *hctx) {
- 	con->plugin_ctx[p->id] = NULL;
- 
- 	/* is this a good idea ? */
--	cgi_handler_ctx_free(hctx);
--
-+	cgi_ctx_del(p, hctx);
-+	cgi_handler_ctx_free(srv, hctx);
-+	
- 	/* if waitpid hasn't been called by response.c yet, do it here */
- 	if (pid) {
- 		/* check if the CGI-script is already gone */
-@@ -1105,7 +1245,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
- 		con->mode = p->id;
- 		buffer_reset(con->physical.path);
- 
--		hctx = cgi_handler_ctx_init();
-+		hctx = cgi_handler_ctx_init(p);
-+		cgi_ctx_add(p, hctx);
- 
- 		hctx->remote_conn = con;
- 		hctx->plugin_data = p;
-@@ -1114,6 +1255,11 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
- 		hctx->fde_ndx = -1;
- 
- 		con->plugin_ctx[p->id] = hctx;
-+#ifdef DEBUG
-+		sprintf(msgbuf, "hctx=%p, con=%p", (void*)hctx, (void*)con);
-+		log_error_write(srv, __FILE__, __LINE__, "ss",
-+				"(debug) hctx generated, ", msgbuf);
-+#endif
- 
- 		fdevent_register(srv->ev, hctx->fd, cgi_handle_fdevent, hctx);
- 		fdevent_event_set(srv->ev, &(hctx->fde_ndx), hctx->fd, FDEVENT_IN);
-@@ -1128,7 +1274,8 @@ static int cgi_create_env(server *srv, connection *con, plugin_data *p, buffer *
- 
- 			close(hctx->fd);
- 
--			cgi_handler_ctx_free(hctx);
-+			cgi_ctx_del(p, hctx);
-+			cgi_handler_ctx_free(srv, hctx);
- 
- 			con->plugin_ctx[p->id] = NULL;
- 
-@@ -1153,6 +1300,8 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p
- 
- 	PATCH(cgi);
- 	PATCH(execute_x_only);
-+	PATCH(high_waterlevel);
-+	PATCH(low_waterlevel);
- 
- 	/* skip the first, the global context */
- 	for (i = 1; i < srv->config_context->used; i++) {
-@@ -1170,6 +1319,10 @@ static int mod_cgi_patch_connection(server *srv, connection *con, plugin_data *p
- 				PATCH(cgi);
- 			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.execute-x-only"))) {
- 				PATCH(execute_x_only);
-+			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.high-waterlevel"))) {
-+				PATCH(high_waterlevel);
-+			} else if (buffer_is_equal_string(du->key, CONST_STR_LEN("cgi.low-waterlevel"))) {
-+				PATCH(low_waterlevel);
- 			}
- 		}
- 	}
-@@ -1222,6 +1375,21 @@ URIHANDLER_FUNC(cgi_is_handled) {
- TRIGGER_FUNC(cgi_trigger) {
- 	plugin_data *p = p_d;
- 	size_t ndx;
-+
-+	for (ndx = 0; ndx < p->cgi_ctx.used; ndx++) {
-+		handler_ctx *hctx = p->cgi_ctx.hctx[ndx];
-+#ifdef DEBUG
-+		connection *con = hctx->remote_conn;
-+	
-+		sprintf(msgbuf, "hctx=%p, con=%p, bytes_in_buffer=%llu",
-+			(void*)hctx, (void*)con,
-+			(unsigned long long)hctx->bytes_in_buffer);
-+		log_error_write(srv, __FILE__, __LINE__, "ss",
-+				"(debug) found using ctx,", msgbuf);
-+#endif
-+		cgi_throttling_control(srv, hctx);
-+	}
-+
- 	/* the trigger handle only cares about lonely PID which we have to wait for */
- #ifndef __WIN32
- 
-@@ -1330,7 +1498,8 @@ SUBREQUEST_FUNC(mod_cgi_handle_subrequest) {
- 			log_error_write(srv, __FILE__, __LINE__, "sds", "cgi close failed ", hctx->fd, strerror(errno));
- 		}
- 
--		cgi_handler_ctx_free(hctx);
-+		cgi_ctx_del(p, hctx);
-+		cgi_handler_ctx_free(srv, hctx);
- 
- 		con->plugin_ctx[p->id] = NULL;
- 
-@@ -1362,7 +1531,8 @@ SUBREQUEST_FUNC(mod_cgi_handle_subrequest) {
- 			log_error_write(srv, __FILE__, __LINE__, "sds", "cgi close failed ", hctx->fd, strerror(errno));
- 		}
- 
--		cgi_handler_ctx_free(hctx);
-+		cgi_ctx_del(p, hctx);
-+		cgi_handler_ctx_free(srv, hctx);
- 
- 		con->plugin_ctx[p->id] = NULL;
- 		return HANDLER_FINISHED;
diff --git a/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb b/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb
deleted file mode 100644
index 67b6e37..0000000
--- a/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.36.bb
+++ /dev/null
@@ -1,77 +0,0 @@
-SUMMARY = "Lightweight high-performance web server"
-HOMEPAGE = "http://www.lighttpd.net/"
-BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
-
-SECTION = "net"
-DEPENDS = "zlib libpcre"
-RDEPENDS_${PN} += " \
-               lighttpd-module-access \
-               lighttpd-module-accesslog \
-               lighttpd-module-indexfile \
-               lighttpd-module-dirlisting \
-               lighttpd-module-staticfile \
-"
-
-SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
-        file://index.html.lighttpd \
-        file://lighttpd.conf \
-        file://lighttpd \
-        file://lighttpd.service \
-        file://pkgconfig.patch \
-        file://0001-mod_cgi-buffers-data-without-bound.patch \
-        "
-
-SRC_URI[md5sum] = "1843daffcb018aa528f6d15d43544654"
-SRC_URI[sha256sum] = "897ab6b1cc7bd51671f8af759e7846245fbbca0685c30017e93a5882a9ac1a53"
-
-PACKAGECONFIG ??= "openssl"
-PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
-
-EXTRA_OECONF = " \
-             --without-bzip2 \
-             --without-ldap \
-             --without-lua \
-             --without-memcache \
-             --with-pcre \
-             --without-webdav-props \
-             --without-webdav-locks \
-             --disable-static \
-"
-
-inherit autotools pkgconfig update-rc.d gettext systemd
-
-INITSCRIPT_NAME = "lighttpd"
-INITSCRIPT_PARAMS = "defaults 70"
-
-SYSTEMD_SERVICE_${PN} = "lighttpd.service"
-
-do_install_append() {
-	install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
-	install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
-	install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
-	install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
-
-	install -d ${D}${systemd_unitdir}/system
-	install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
-	sed -i -e 's,@SBINDIR@,${sbindir},g' \
-		-e 's,@SYSCONFDIR@,${sysconfdir},g' \
-		-e 's,@BASE_BINDIR@,${base_bindir},g' \
-		${D}${systemd_unitdir}/system/lighttpd.service
-	#For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
-	ln -sf ${localstatedir}/log ${D}/www/logs
-	ln -sf ${localstatedir}/tmp ${D}/www/var
-}
-
-FILES_${PN} += "${sysconfdir} /www"
-
-CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
-
-PACKAGES_DYNAMIC += "^lighttpd-module-.*"
-
-python populate_packages_prepend () {
-    lighttpd_libdir = d.expand('${libdir}')
-    do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
-}
diff --git a/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.39.bb b/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.39.bb
new file mode 100644
index 0000000..378accb
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/lighttpd/lighttpd_1.4.39.bb
@@ -0,0 +1,76 @@
+SUMMARY = "Lightweight high-performance web server"
+HOMEPAGE = "http://www.lighttpd.net/"
+BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
+
+SECTION = "net"
+DEPENDS = "zlib libpcre"
+RDEPENDS_${PN} += " \
+               lighttpd-module-access \
+               lighttpd-module-accesslog \
+               lighttpd-module-indexfile \
+               lighttpd-module-dirlisting \
+               lighttpd-module-staticfile \
+"
+
+SRC_URI = "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
+        file://index.html.lighttpd \
+        file://lighttpd.conf \
+        file://lighttpd \
+        file://lighttpd.service \
+        file://pkgconfig.patch \
+        "
+
+SRC_URI[md5sum] = "63c7563be1c7a7a9819a51f07f1af8b2"
+SRC_URI[sha256sum] = "7eb9a1853c3d6dd5851682b0733a729ba4158d6bdff80974d5ef5f1f6887365b"
+
+PACKAGECONFIG ??= "openssl"
+PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl"
+
+EXTRA_OECONF = " \
+             --without-bzip2 \
+             --without-ldap \
+             --without-lua \
+             --without-memcache \
+             --with-pcre \
+             --without-webdav-props \
+             --without-webdav-locks \
+             --disable-static \
+"
+
+inherit autotools pkgconfig update-rc.d gettext systemd
+
+INITSCRIPT_NAME = "lighttpd"
+INITSCRIPT_PARAMS = "defaults 70"
+
+SYSTEMD_SERVICE_${PN} = "lighttpd.service"
+
+do_install_append() {
+	install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d ${D}/www/pages/dav
+	install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
+	install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
+	install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
+
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${WORKDIR}/lighttpd.service ${D}${systemd_unitdir}/system
+	sed -i -e 's,@SBINDIR@,${sbindir},g' \
+		-e 's,@SYSCONFDIR@,${sysconfdir},g' \
+		-e 's,@BASE_BINDIR@,${base_bindir},g' \
+		${D}${systemd_unitdir}/system/lighttpd.service
+	#For FHS compliance, create symbolic links to /var/log and /var/tmp for logs and temporary data
+	ln -sf ${localstatedir}/log ${D}/www/logs
+	ln -sf ${localstatedir}/tmp ${D}/www/var
+}
+
+FILES_${PN} += "${sysconfdir} /www"
+
+CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
+
+PACKAGES_DYNAMIC += "^lighttpd-module-.*"
+
+python populate_packages_prepend () {
+    lighttpd_libdir = d.expand('${libdir}')
+    do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
+}
diff --git a/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb b/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb
index c9f6a8b..ece0eab 100644
--- a/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/yocto-poky/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -24,6 +24,10 @@
 
 SRC_URI[md5sum] = "30537ef5a01e0ca94b7b8eb6a36bb1e4"
 SRC_URI[sha256sum] = "99321288f8d62e7a1d485b7c6bdccf06766fb8ca603c6195806e4457fdf17172"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lsb/files/lsb_release/"
+UPSTREAM_CHECK_REGEX = "/lsb_release/(?P<pver>(\d+[\.\-_]*)+)/"
+
 S = "${WORKDIR}/lsb-release-1.4"
 
 CLEANBROKEN = "1"
@@ -121,6 +125,7 @@
        fi
 }
 FILES_${PN} += "/lib64 \
+                ${base_libdir} \
                 /usr/lib/lsb \
                 ${base_libdir}/lsb/* \
                 /lib/lsb/* \
diff --git a/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb b/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb
index 150f6f2..7273050 100644
--- a/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb
+++ b/yocto-poky/meta/recipes-extended/lsb/lsbinitscripts_9.64.bb
@@ -30,5 +30,4 @@
 do_install(){
 	install -d ${D}${sysconfdir}/init.d/
 	install -m 0644 ${S}/rc.d/init.d/functions ${D}${sysconfdir}/init.d/functions
-	sed -i 's,${base_bindir}/mountpoint,${bindir}/mountpoint,g' ${D}${sysconfdir}/init.d/functions
 }
diff --git a/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb b/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb
index 9b7de9a..c10337b 100644
--- a/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb
+++ b/yocto-poky/meta/recipes-extended/lsof/lsof_4.89.bb
@@ -9,6 +9,8 @@
 SRC_URI[md5sum] = "1b9cd34f3fb86856a125abbf2be3a386"
 SRC_URI[sha256sum] = "81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718"
 
+UPSTREAM_CHECK_URI = "http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof"
+
 LOCALSRC = "file://${WORKDIR}/lsof_${PV}/lsof_${PV}_src.tar"
 S = "${WORKDIR}/lsof_${PV}_src"
 
@@ -44,7 +46,8 @@
 
 export I = "${STAGING_INCDIR}"
 export L = "${STAGING_INCDIR}"
-export EXTRA_OEMAKE = ""
+
+EXTRA_OEMAKE = ""
 
 do_compile () {
 	oe_runmake 'CC=${CC}' 'CFGL=${LDFLAGS} -L./lib -llsof' 'DEBUG=' 'INCL=${CFLAGS}'
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
deleted file mode 100644
index 1b4d232..0000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch
+++ /dev/null
@@ -1,202 +0,0 @@
-From 9751a6526cffcdf4e3dc2cb33641259a7be00e19 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Sat, 7 Dec 2013 18:24:32 +0100
-Subject: [PATCH] Rename runtests_noltp.sh script so have unique name
-
-* they are installed in the same target path
-  /opt/ltp/testcases/bin/runtests_noltp.sh
-  and overwrite each other in non-deterministic way
-  when multiple processes are used in "make install"
-
-  ./temp/log.do_install:install -m 00775
-    "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/sysvipc/runtests_noltp.sh"
-    "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
-  ./temp/log.do_install:install -m 00775
-    "ltp/20120903-r2/ltp-20120903/testcases/kernel/containers/utsname/runtests_noltp.sh"
-    "ltp/20120903-r2/image/opt/ltp/testcases/bin/runtests_noltp.sh"
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- .../kernel/containers/sysvipc/runipctests_noltp.sh | 31 ++++++++++++++++
- .../kernel/containers/sysvipc/runtests_noltp.sh    | 31 ----------------
- .../kernel/containers/utsname/runtests_noltp.sh    | 41 ----------------------
- .../kernel/containers/utsname/runutstests_noltp.sh | 41 ++++++++++++++++++++++
- 4 files changed, 72 insertions(+), 72 deletions(-)
- create mode 100644 testcases/kernel/containers/sysvipc/runipctests_noltp.sh
- delete mode 100644 testcases/kernel/containers/sysvipc/runtests_noltp.sh
- delete mode 100755 testcases/kernel/containers/utsname/runtests_noltp.sh
- create mode 100755 testcases/kernel/containers/utsname/runutstests_noltp.sh
-
-diff --git a/testcases/kernel/containers/sysvipc/runipctests_noltp.sh b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
-new file mode 100644
-index 0000000..84f398f
---- /dev/null
-+++ b/testcases/kernel/containers/sysvipc/runipctests_noltp.sh
-@@ -0,0 +1,31 @@
-+#!/bin/sh
-+################################################################################
-+##                                                                            ##
-+## Copyright (c) International Business Machines  Corp., 2007                 ##
-+##                                                                            ##
-+## This program is free software;  you can redistribute it and#or modify      ##
-+## it under the terms of the GNU General Public License as published by       ##
-+## the Free Software Foundation; either version 2 of the License, or          ##
-+## (at your option) any later version.                                        ##
-+##                                                                            ##
-+## This program is distributed in the hope that it will be useful, but        ##
-+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
-+## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
-+## for more details.                                                          ##
-+##                                                                            ##
-+## You should have received a copy of the GNU General Public License          ##
-+## along with this program;  if not, write to the Free Software               ##
-+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
-+##                                                                            ##
-+################################################################################
-+
-+exit_code=0
-+echo "sysvipc tests"
-+for type in none clone unshare; do
-+      echo "**sysvipc $type"
-+      ./shmnstest_noltp $type
-+      if [ $? -ne 0 ]; then
-+              exit_code=$?
-+      fi
-+done
-+exit $exit_code
-diff --git a/testcases/kernel/containers/sysvipc/runtests_noltp.sh b/testcases/kernel/containers/sysvipc/runtests_noltp.sh
-deleted file mode 100644
-index 84f398f..0000000
---- a/testcases/kernel/containers/sysvipc/runtests_noltp.sh
-+++ /dev/null
-@@ -1,31 +0,0 @@
--#!/bin/sh
--################################################################################
--##                                                                            ##
--## Copyright (c) International Business Machines  Corp., 2007                 ##
--##                                                                            ##
--## This program is free software;  you can redistribute it and#or modify      ##
--## it under the terms of the GNU General Public License as published by       ##
--## the Free Software Foundation; either version 2 of the License, or          ##
--## (at your option) any later version.                                        ##
--##                                                                            ##
--## This program is distributed in the hope that it will be useful, but        ##
--## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
--## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
--## for more details.                                                          ##
--##                                                                            ##
--## You should have received a copy of the GNU General Public License          ##
--## along with this program;  if not, write to the Free Software               ##
--## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
--##                                                                            ##
--################################################################################
--
--exit_code=0
--echo "sysvipc tests"
--for type in none clone unshare; do
--      echo "**sysvipc $type"
--      ./shmnstest_noltp $type
--      if [ $? -ne 0 ]; then
--              exit_code=$?
--      fi
--done
--exit $exit_code
-diff --git a/testcases/kernel/containers/utsname/runtests_noltp.sh b/testcases/kernel/containers/utsname/runtests_noltp.sh
-deleted file mode 100755
-index 43cb7e2..0000000
---- a/testcases/kernel/containers/utsname/runtests_noltp.sh
-+++ /dev/null
-@@ -1,41 +0,0 @@
--#!/bin/sh
--################################################################################
--##                                                                            ##
--## Copyright (c) International Business Machines  Corp., 2007                 ##
--##                                                                            ##
--## This program is free software;  you can redistribute it and#or modify      ##
--## it under the terms of the GNU General Public License as published by       ##
--## the Free Software Foundation; either version 2 of the License, or          ##
--## (at your option) any later version.                                        ##
--##                                                                            ##
--## This program is distributed in the hope that it will be useful, but        ##
--## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
--## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
--## for more details.                                                          ##
--##                                                                            ##
--## You should have received a copy of the GNU General Public License          ##
--## along with this program;  if not, write to the Free Software               ##
--## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
--##                                                                            ##
--################################################################################
--
--oldhostname=`hostname`
--exit_code=0
--echo "unshare tests"
--for i in `seq 1 5`; do
--	echo "test $i (unshare)"
--	./utstest_noltp unshare $i
--	if [ $? -ne 0 ]; then
--		exit_code=$?
--	fi
--done
--echo "clone tests"
--for i in `seq 1 5`; do
--	echo "test $i (clone)"
--	./utstest_noltp clone $i
--	if [ $? -ne 0 ]; then
--		exit_code=$?
--	fi
--done
--hostname "$oldhostname"
--exit $exit_code
-diff --git a/testcases/kernel/containers/utsname/runutstests_noltp.sh b/testcases/kernel/containers/utsname/runutstests_noltp.sh
-new file mode 100755
-index 0000000..43cb7e2
---- /dev/null
-+++ b/testcases/kernel/containers/utsname/runutstests_noltp.sh
-@@ -0,0 +1,41 @@
-+#!/bin/sh
-+################################################################################
-+##                                                                            ##
-+## Copyright (c) International Business Machines  Corp., 2007                 ##
-+##                                                                            ##
-+## This program is free software;  you can redistribute it and#or modify      ##
-+## it under the terms of the GNU General Public License as published by       ##
-+## the Free Software Foundation; either version 2 of the License, or          ##
-+## (at your option) any later version.                                        ##
-+##                                                                            ##
-+## This program is distributed in the hope that it will be useful, but        ##
-+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
-+## or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   ##
-+## for more details.                                                          ##
-+##                                                                            ##
-+## You should have received a copy of the GNU General Public License          ##
-+## along with this program;  if not, write to the Free Software               ##
-+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA    ##
-+##                                                                            ##
-+################################################################################
-+
-+oldhostname=`hostname`
-+exit_code=0
-+echo "unshare tests"
-+for i in `seq 1 5`; do
-+	echo "test $i (unshare)"
-+	./utstest_noltp unshare $i
-+	if [ $? -ne 0 ]; then
-+		exit_code=$?
-+	fi
-+done
-+echo "clone tests"
-+for i in `seq 1 5`; do
-+	echo "test $i (clone)"
-+	./utstest_noltp clone $i
-+	if [ $? -ne 0 ]; then
-+		exit_code=$?
-+	fi
-+done
-+hostname "$oldhostname"
-+exit $exit_code
--- 
-1.8.4.3
-
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch
new file mode 100644
index 0000000..585b7cb
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch
@@ -0,0 +1,30 @@
+From 14985fccf7428eaa0b45decc22bfd20fd780f621 Mon Sep 17 00:00:00 2001
+From: Chong Lu <Chong.Lu@windriver.com>
+Date: Tue, 11 Mar 2014 14:47:22 +0800
+Subject: [PATCH 01/32] ltp: Don't link against libfl
+
+We have already defined yywrap function in scan.l file. After this, we no longer need to
+link against libfl and so no longer get errors about undefined references to yylex.
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ pan/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pan/Makefile b/pan/Makefile
+index 4cc6466..a4b575b 100644
+--- a/pan/Makefile
++++ b/pan/Makefile
+@@ -31,7 +31,7 @@ CPPFLAGS		+= -Wno-error
+ 
+ CPPFLAGS		+= -I$(abs_srcdir)
+ 
+-LDLIBS			+= -lm $(LEXLIB)
++LDLIBS			+= -lm
+ 
+ LFLAGS			+= -l
+ 
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch
deleted file mode 100644
index 905eafb..0000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-ltp-vma03-fix-the-alginment-of-page-size.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 243881d71d2d49027c3dc15fe27ebe7f4ee68700 Mon Sep 17 00:00:00 2001
-From: Chuang Dong <Chuang.Dong@windriver.com>
-Date: Wed, 10 Jun 2015 09:51:09 +0800
-Subject: [PATCH] ltp: vma03 fix the alginment of page size
-
-the offset the param of mmap2() doesn't align the page size, but,
-this param allow must be a multiple of the page size as returned
-by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a
-multiple of the system page size, so modify the input param of offset
-pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
-
-Upstream-Status: Submitted
-
-Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com>
----
- testcases/kernel/mem/vma/vma03.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
-index 6af9960..b86d7ce 100644
---- a/testcases/kernel/mem/vma/vma03.c
-+++ b/testcases/kernel/mem/vma/vma03.c
-@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
- 		if (fd == -1)
- 			tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE);
- 
--		pgoff = ULONG_MAX - 1;
-+		pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
- 		map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE,
- 			    fd, pgoff);
- 		if (map == MAP_FAILED)
--- 
-1.8.5.2.233.g932f7e4
-
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch
deleted file mode 100644
index 0b594dc..0000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/0001-replace-inline-with-static-inline-for-gcc-5.x.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Upstream-Status: Backport [From https://github.com/linux-test-project/ltp/commit/40a2457cb8ec42a05a2f96b0810057efdb2a55f5]
-
-gcc 5.x defaults to -std=gnu11 instead of -std=gnu89 which causes
-semantics for inline functions changes.
-
-The standalone 'inline' causes error with gcc 5 such as:
-
-git/testcases/kernel/syscalls/kill/kill10.c:355: undefined reference to `k_sigaction'
-
-Replace inline with static inline to be compatible with both gcc 4 and 5.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- testcases/kernel/controllers/libcontrollers/libcontrollers.c | 2 +-
- testcases/kernel/controllers/libcontrollers/libcontrollers.h | 2 +-
- testcases/kernel/syscalls/kill/kill10.c                      | 4 ++--
- 3 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.c b/testcases/kernel/controllers/libcontrollers/libcontrollers.c
-index b01e1b8..8857bc9 100644
---- a/testcases/kernel/controllers/libcontrollers/libcontrollers.c
-+++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.c
-@@ -146,7 +146,7 @@ int read_file(char *filepath, int action, unsigned int *value)
-  * Prints error message and returns -1
-  */
- 
--inline int error_function(char *msg1, char *msg2)
-+static inline int error_function(char *msg1, char *msg2)
- {
- 	fprintf(stdout, "ERROR: %s ", msg1);
- 	fprintf(stdout, "%s\n", msg2);
-diff --git a/testcases/kernel/controllers/libcontrollers/libcontrollers.h b/testcases/kernel/controllers/libcontrollers/libcontrollers.h
-index 4001555..a1a0dfa 100644
---- a/testcases/kernel/controllers/libcontrollers/libcontrollers.h
-+++ b/testcases/kernel/controllers/libcontrollers/libcontrollers.h
-@@ -70,7 +70,7 @@ enum{
- 	GET_TASKS
- };
- 
--inline int error_function(char *msg1, char *msg2);
-+static inline int error_function(char *msg1, char *msg2);
- 
- unsigned int read_shares_file (char *filepath);
- 
-diff --git a/testcases/kernel/syscalls/kill/kill10.c b/testcases/kernel/syscalls/kill/kill10.c
-index 982d9da..33dbcd3 100644
---- a/testcases/kernel/syscalls/kill/kill10.c
-+++ b/testcases/kernel/syscalls/kill/kill10.c
-@@ -185,7 +185,7 @@ int child_checklist_total = 0;
- int checklist_cmp(const void *a, const void *b);
- void checklist_reset(int bit);
- 
--inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa);
-+static inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa);
- 
- char *TCID = "kill10";
- int TST_TOTAL = 1;
-@@ -756,7 +756,7 @@ void checklist_reset(int bit)
- 
- }
- 
--inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa)
-+static inline int k_sigaction(int sig, struct sigaction *sa, struct sigaction *osa)
- {
- 	int ret;
- 	if ((ret = sigaction(sig, sa, osa)) == -1) {
----
--1.9.1
--
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
new file mode 100644
index 0000000..68725dc
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0002-Add-knob-to-control-whether-numa-support-should-be-c.patch
@@ -0,0 +1,43 @@
+From 867ad5d5d64b9b27ee32148027532db0a00f6433 Mon Sep 17 00:00:00 2001
+From: "Roy.Li" <rongqing.li@windriver.com>
+Date: Thu, 7 Jan 2016 17:33:26 +0000
+Subject: [PATCH 02/32] Add knob to control whether numa support should be
+ checked
+
+otherwise undeterministic dependency will be generated
+during build depending upong numa being staged or not
+
+signed-off-by: Roy.Li <rongqing.li@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ m4/ltp-numa.m4 | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/m4/ltp-numa.m4 b/m4/ltp-numa.m4
+index 60ae07b..ed7078d 100644
+--- a/m4/ltp-numa.m4
++++ b/m4/ltp-numa.m4
+@@ -24,7 +24,13 @@ dnl ----------------------------
+ dnl
+ AC_DEFUN([LTP_CHECK_SYSCALL_NUMA],
+ [dnl
+-AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
++AC_MSG_CHECKING([for numa])
++AC_ARG_WITH(
++	[numa],
++	AC_HELP_STRING([--without-numa],
++	[without numa support]),
++	[],
++	[AC_CHECK_HEADERS([linux/mempolicy.h numa.h numaif.h],[
+ 	LTP_SYSCALL_NUMA_HEADERS=yes
+ 	AC_CHECK_LIB(numa,numa_alloc_onnode,[have_numa_alloc_onnode="yes"])
+ 	if  test "x$have_numa_alloc_onnode" = "xyes"; then
+@@ -48,3 +54,5 @@ if test "x$have_mpol_constants" = "xyes"; then
+ 	AC_DEFINE(HAVE_MPOL_CONSTANTS,1,[define to 1 if you have all constants required to use mbind tests])
+ fi
+ )])
++AC_MSG_RESULT([$with_numa])
++])
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch
new file mode 100644
index 0000000..bf1176f
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0003-Add-knob-to-control-tirpc-support.patch
@@ -0,0 +1,45 @@
+From b193011da301b3d944e8fddcf4817513c31c5b88 Mon Sep 17 00:00:00 2001
+From: Fathi Boudra <fathi.boudra@linaro.org>
+Date: Thu, 7 Jan 2016 17:36:19 +0000
+Subject: [PATCH 03/32] Add knob to control tirpc support
+
+allow to disable tirpc. Helps to disable it at top level for eg. musl it
+does not yet work.
+
+Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index cc50397..9e2936b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -98,6 +98,13 @@ if test "x$with_python" = xyes; then
+ else
+     AC_SUBST([WITH_PYTHON],["no"])
+ fi
++
++# TI RPC
++AC_ARG_WITH([tirpc],
++  AC_HELP_STRING([--without-tirpc],
++    [without libtirpc support]),
++  [],[with_tirpc=yes],
++)
+ # END tools knobs
+ 
+ # Testsuites knobs
+@@ -169,7 +176,9 @@ LTP_CHECK_RENAMEAT2
+ LTP_CHECK_FALLOCATE
+ LTP_CHECK_SYSCALL_FCNTL
+ LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
++if test "x$with_tirpc" = xyes; then
+ LTP_CHECK_TIRPC
++fi
+ LTP_CHECK_TEE
+ LTP_CHECK_SPLICE
+ LTP_CHECK_VMSPLICE
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
new file mode 100644
index 0000000..2de9363
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0004-build-Add-option-to-select-libc-implementation.patch
@@ -0,0 +1,147 @@
+From 53acddddf1b324e06af886ee4639b774e5c8c8bc 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
+
+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
+different and does not implement all GNU extentions
+
+Disable tests specifically not building _yet_ on musl based systems
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ Makefile                                    | 5 +++++
+ testcases/kernel/Makefile                   | 5 ++++-
+ testcases/kernel/sched/Makefile             | 4 +++-
+ testcases/kernel/syscalls/Makefile          | 5 +++++
+ testcases/network/nfsv4/acl/Makefile        | 4 ++++
+ testcases/network/rpc/basic_tests/Makefile  | 5 +++++
+ testcases/realtime/func/pi-tests/Makefile   | 4 ++++
+ testcases/realtime/stress/pi-tests/Makefile | 5 +++++
+ 8 files changed, 35 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 297f8e7..906b280 100644
+--- a/Makefile
++++ b/Makefile
+@@ -49,6 +49,11 @@ SKIP_IDCHECK		?= 0
+ UCLINUX			?= 0
+ export UCLINUX
+ 
++# System C library implementation (glibc,uclibc,musl etc.)
++# default to glibc if not set
++LIBC			?= glibc
++export LIBC
++
+ # CLEAN_TARGETS:	Targets which exist solely in clean.
+ # COMMON_TARGETS:	Targets which exist in all, clean, and install.
+ # INSTALL_TARGETS:	Targets which exist in clean and install (contains
+diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
+index 50a12fa..4f1987f 100644
+--- a/testcases/kernel/Makefile
++++ b/testcases/kernel/Makefile
+@@ -47,13 +47,16 @@ SUBDIRS			+= connectors \
+ 			   logging \
+ 			   mem \
+ 			   numa \
+-			   pty \
+ 			   sched \
+ 			   security \
+ 			   timers \
+ 			   tracing \
+ 			   module \
+ 
++ifneq ($(LIBC),musl)
++SUBDIRS			+= pty
++endif
++
+ ifeq ($(WITH_POWER_MANAGEMENT_TESTSUITE),yes)
+ SUBDIRS			+= power_management
+ endif
+diff --git a/testcases/kernel/sched/Makefile b/testcases/kernel/sched/Makefile
+index 6245ed0..aa4eb7f 100644
+--- a/testcases/kernel/sched/Makefile
++++ b/testcases/kernel/sched/Makefile
+@@ -23,5 +23,7 @@
+ top_srcdir		?= ../../..
+ 
+ include $(top_srcdir)/include/mk/env_pre.mk
+-
++ifeq ($(LIBC),musl)
++	FILTER_OUT_DIRS += process_stress
++endif
+ include $(top_srcdir)/include/mk/generic_trunk_target.mk
+diff --git a/testcases/kernel/syscalls/Makefile b/testcases/kernel/syscalls/Makefile
+index 8acb395..b749126 100644
+--- a/testcases/kernel/syscalls/Makefile
++++ b/testcases/kernel/syscalls/Makefile
+@@ -28,5 +28,10 @@ ifeq ($(UCLINUX),1)
+ FILTER_OUT_DIRS	+= capget capset chmod chown clone fork getcontext llseek \
+ 		   mincore mprotect nftw profil remap_file_pages sbrk
+ endif
++ifeq ($(LIBC),musl)
++FILTER_OUT_DIRS	+= confstr fmtmsg getcontext ioctl mallopt profil \
++		   rt_sigsuspend setdomainname sethostname sigsuspend \
++		   ustat
++endif
+ 
+ include $(top_srcdir)/include/mk/generic_trunk_target.mk
+diff --git a/testcases/network/nfsv4/acl/Makefile b/testcases/network/nfsv4/acl/Makefile
+index 8bc78c2..c36cf50 100644
+--- a/testcases/network/nfsv4/acl/Makefile
++++ b/testcases/network/nfsv4/acl/Makefile
+@@ -26,4 +26,8 @@ include $(top_srcdir)/include/mk/env_pre.mk
+ 
+ LDLIBS			+= $(ACL_LIBS)
+ 
++ifeq ($(LIBC),musl)
++FILTER_OUT_MAKE_TARGETS	:= acl1
++endif
++
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+diff --git a/testcases/network/rpc/basic_tests/Makefile b/testcases/network/rpc/basic_tests/Makefile
+index 3160813..9bdf5d0 100644
+--- a/testcases/network/rpc/basic_tests/Makefile
++++ b/testcases/network/rpc/basic_tests/Makefile
+@@ -23,4 +23,9 @@
+ top_srcdir		?= ../../../..
+ 
+ include $(top_srcdir)/include/mk/env_pre.mk
++
++ifeq ($(LIBC),musl)
++FILTER_OUT_DIRS += rpc01
++endif
++
+ include $(top_srcdir)/include/mk/generic_trunk_target.mk
+diff --git a/testcases/realtime/func/pi-tests/Makefile b/testcases/realtime/func/pi-tests/Makefile
+index 7a7a57a..5808866 100644
+--- a/testcases/realtime/func/pi-tests/Makefile
++++ b/testcases/realtime/func/pi-tests/Makefile
+@@ -27,5 +27,9 @@ include $(top_srcdir)/include/mk/env_pre.mk
+ include $(abs_srcdir)/../../config.mk
+ 
+ MAKE_TARGETS		:= testpi-0 testpi-1 testpi-2 testpi-4 testpi-5 testpi-6 testpi-7 sbrk_mutex
++ifeq ($(LIBC),musl)
++FILTER_OUT_MAKE_TARGETS	:= testpi-5 testpi-6 sbrk_mutex
++endif
++
+ 
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+diff --git a/testcases/realtime/stress/pi-tests/Makefile b/testcases/realtime/stress/pi-tests/Makefile
+index 5edc3b4..aa5987a 100644
+--- a/testcases/realtime/stress/pi-tests/Makefile
++++ b/testcases/realtime/stress/pi-tests/Makefile
+@@ -24,4 +24,9 @@ top_srcdir		?= ../../../..
+ 
+ include $(top_srcdir)/include/mk/env_pre.mk
+ include $(abs_srcdir)/../../config.mk
++
++ifeq ($(LIBC),musl)
++FILTER_OUT_MAKE_TARGETS	:= testpi-3
++endif
++
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
new file mode 100644
index 0000000..8dab1ed
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch
@@ -0,0 +1,45 @@
+From 6e3058521b50d91d4b0569c4d491c5af5ff798b2 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
+
+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>
+---
+ 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
+--- a/testcases/kernel/controllers/Makefile.inc
++++ b/testcases/kernel/controllers/Makefile.inc
+@@ -36,6 +36,9 @@ MAKE_DEPS		:= $(LIB)
+ CPPFLAGS		+= -I$(abs_srcdir)/../$(LIBDIR)
+ 
+ LDFLAGS			+= -L$(abs_builddir)/../$(LIBDIR)
++ifeq ($(LIBC),musl)
++LDLIBS			+= -lfts
++endif
+ 
+ INSTALL_TARGETS		?= *.sh
+ 
+diff --git a/testcases/kernel/controllers/cpuset/Makefile.inc b/testcases/kernel/controllers/cpuset/Makefile.inc
+index 9e002f4..e0fcb9c 100644
+--- a/testcases/kernel/controllers/cpuset/Makefile.inc
++++ b/testcases/kernel/controllers/cpuset/Makefile.inc
+@@ -42,6 +42,9 @@ MAKE_DEPS		:= $(LIBCONTROLLERS) $(LIBCPUSET)
+ LDFLAGS			+= -L$(abs_builddir)/$(LIBCPUSET_DIR) -L$(abs_builddir)/$(LIBCONTROLLERS_DIR)
+ 
+ LDLIBS			+= -lcpu_set -lcontrollers -lltp
++ifeq ($(LIBC),musl)
++LDLIBS			+= -lfts
++endif
+ 
+ INSTALL_TARGETS		?= *.sh
+ 
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch
new file mode 100644
index 0000000..56a48ab
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch
@@ -0,0 +1,31 @@
+From fb8b895385a641d74f2186fe5f20a872209692ed Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 18:24:20 +0000
+Subject: [PATCH 06/32] sendfile: Use off64_t instead of __off64_t
+
+__off64_t is specific to glibc where as off64_t is widely available
+Add _GNU_SOURCE for off64_t defines from sys/types.h
+Fixes
+<command-line>:0:7: error: unknown type name 'off64_t'
+sendfile02.c:97:18: note: in expansion of macro 'OFF_T'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/sendfile/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/syscalls/sendfile/Makefile b/testcases/kernel/syscalls/sendfile/Makefile
+index df7b63f..1bd1b57 100644
+--- a/testcases/kernel/syscalls/sendfile/Makefile
++++ b/testcases/kernel/syscalls/sendfile/Makefile
+@@ -21,6 +21,6 @@ top_srcdir		?= ../../../..
+ include $(top_srcdir)/include/mk/testcases.mk
+ include $(abs_srcdir)/../utils/newer_64.mk
+ 
+-%_64: CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DOFF_T=__off64_t
++%_64: CPPFLAGS += -D_FILE_OFFSET_BITS=64 -DOFF_T=off64_t -D_GNU_SOURCE
+ 
+ include $(top_srcdir)/include/mk/generic_leaf_target.mk
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch
new file mode 100644
index 0000000..4be906e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch
@@ -0,0 +1,394 @@
+From 405c03171e4bf0edd698cb602cf7bd7fe1d0401a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:33:53 +0000
+Subject: [PATCH 07/32] replace SIGCLD with SIGCHLD
+
+its defined to use SIGCHLD anyway in
+
+bits/signum.h:#define     SIGCLD          SIGCHLD /* Same as SIGCHLD
+(System V).  */
+
+plus it helps these tests compile with musl which adheres to posix
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/tst_sig.c                                   |  8 ++++----
+ testcases/kernel/connectors/pec/pec_listener.c  |  1 +
+ testcases/kernel/fs/doio/doio.c                 |  4 ++--
+ testcases/kernel/fs/doio/growfiles.c            |  2 +-
+ testcases/kernel/syscalls/fcntl/fcntl11.c       |  8 ++++----
+ testcases/kernel/syscalls/fcntl/fcntl17.c       |  8 ++++----
+ testcases/kernel/syscalls/fcntl/fcntl19.c       |  8 ++++----
+ testcases/kernel/syscalls/fcntl/fcntl20.c       |  8 ++++----
+ testcases/kernel/syscalls/fcntl/fcntl21.c       |  8 ++++----
+ testcases/kernel/syscalls/kill/kill02.c         |  6 +++---
+ testcases/kernel/syscalls/kill/kill12.c         |  8 ++++----
+ testcases/kernel/syscalls/mkdir/mkdir09.c       | 12 ++++++------
+ testcases/kernel/syscalls/sighold/sighold02.c   |  2 +-
+ testcases/network/tcp_cmds/perf_lan/pingpong.c  |  2 +-
+ testcases/network/tcp_cmds/perf_lan/pingpong6.c |  2 +-
+ 15 files changed, 44 insertions(+), 43 deletions(-)
+
+diff --git a/lib/tst_sig.c b/lib/tst_sig.c
+index 3af5ffd..36565e1 100644
+--- a/lib/tst_sig.c
++++ b/lib/tst_sig.c
+@@ -49,7 +49,7 @@
+ 		fork_flag - set to FORK or NOFORK depending upon whether the
+ 			calling program executes a fork() system call.  It
+ 			is normally the case that the calling program treats
+-			SIGCLD as an expected signal if fork() is being used.
++			SIGCHLD as an expected signal if fork() is being used.
+ 
+ 		handler - a pointer to the unexpected signal handler to
+ 			be executed after an unexpected signal has been
+@@ -82,7 +82,7 @@ static void (*tst_setup_signal(int, void (*)(int))) (int);
+ 
+ /****************************************************************************
+  * tst_sig() : set-up to catch unexpected signals.  fork_flag is set to NOFORK
+- *    if SIGCLD is to be an "unexpected signal", otherwise it is set to
++ *    if SIGCHLD is to be an "unexpected signal", otherwise it is set to
+  *    FORK.  cleanup points to a cleanup routine to be executed before
+  *    tst_exit is called (cleanup is set to NULL if no cleanup is desired).
+  *    handler is a pointer to the signal handling routine (if handler is
+@@ -117,7 +117,7 @@ void tst_sig(int fork_flag, void (*handler) (), void (*cleanup) ())
+ 	for (sig = 1; sig < NSIG; sig++) {
+ 		/*
+ 		 * SIGKILL is never unexpected.
+-		 * SIGCLD is only unexpected when
++		 * SIGCHLD is only unexpected when
+ 		 *    no forking is being done.
+ 		 * SIGINFO is used for file quotas and should be expected
+ 		 */
+@@ -205,7 +205,7 @@ void tst_sig(int fork_flag, void (*handler) (), void (*cleanup) ())
+ #endif
+ 			break;
+ 
+-		case SIGCLD:
++		case SIGCHLD:
+ 			if (fork_flag == FORK)
+ 				continue;
+ 
+diff --git a/testcases/kernel/connectors/pec/pec_listener.c b/testcases/kernel/connectors/pec/pec_listener.c
+index a1beb13..002750a 100644
+--- a/testcases/kernel/connectors/pec/pec_listener.c
++++ b/testcases/kernel/connectors/pec/pec_listener.c
+@@ -20,6 +20,7 @@
+ /*                                                                            */
+ /******************************************************************************/
+ 
++#define _GNU_SOURCE
+ #include <sys/socket.h>
+ #include <sys/poll.h>
+ #include <sys/types.h>
+diff --git a/testcases/kernel/fs/doio/doio.c b/testcases/kernel/fs/doio/doio.c
+index 4b0dec5..5f65ef9 100644
+--- a/testcases/kernel/fs/doio/doio.c
++++ b/testcases/kernel/fs/doio/doio.c
+@@ -573,7 +573,7 @@ int main(int argc, char **argv)
+ 		case SIGTSTP:
+ 		case SIGSTOP:
+ 		case SIGCONT:
+-		case SIGCLD:
++		case SIGCHLD:
+ 		case SIGBUS:
+ 		case SIGSEGV:
+ 		case SIGQUIT:
+@@ -615,7 +615,7 @@ int main(int argc, char **argv)
+ 	}
+ 
+ 	sigemptyset(&block_mask);
+-	sigaddset(&block_mask, SIGCLD);
++	sigaddset(&block_mask, SIGCHLD);
+ 	sigprocmask(SIG_BLOCK, &block_mask, &omask);
+ 
+ 	/*
+diff --git a/testcases/kernel/fs/doio/growfiles.c b/testcases/kernel/fs/doio/growfiles.c
+index 09e7f35..bbad230 100644
+--- a/testcases/kernel/fs/doio/growfiles.c
++++ b/testcases/kernel/fs/doio/growfiles.c
+@@ -1640,7 +1640,7 @@ int set_sig(void)
+ #ifdef SIGRESTART
+ 		case SIGRESTART:
+ #endif /* SIGRESTART */
+-		case SIGCLD:
++		case SIGCHLD:
+ 			break;
+ 
+ 		default:
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl11.c b/testcases/kernel/syscalls/fcntl/fcntl11.c
+index fa6ce53..2de2b6c 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl11.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl11.c
+@@ -105,10 +105,10 @@ void setup(void)
+ 	memset(&act, 0, sizeof(act));
+ 	act.sa_handler = catch_child;
+ 	sigemptyset(&act.sa_mask);
+-	sigaddset(&act.sa_mask, SIGCLD);
+-	if ((sigaction(SIGCLD, &act, NULL)) < 0)
++	sigaddset(&act.sa_mask, SIGCHLD);
++	if ((sigaction(SIGCHLD, &act, NULL)) < 0)
+ 		tst_brkm(TBROK | TERRNO, cleanup,
+-			 "sigaction(SIGCLD, ..) failed");
++			 "sigaction(SIGCHLD, ..) failed");
+ }
+ 
+ void do_child(void)
+@@ -227,7 +227,7 @@ void stop_child(void)
+ {
+ 	struct flock fl;
+ 
+-	signal(SIGCLD, SIG_DFL);
++	signal(SIGCHLD, SIG_DFL);
+ 	fl.l_type = STOP;
+ 	parent_put(&fl);
+ 	wait(0);
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl17.c b/testcases/kernel/syscalls/fcntl/fcntl17.c
+index 5b03e39..6598b20 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl17.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl17.c
+@@ -150,9 +150,9 @@ int setup(void)
+ 	memset(&act, 0, sizeof(act));
+ 	act.sa_handler = catch_child;
+ 	sigemptyset(&act.sa_mask);
+-	sigaddset(&act.sa_mask, SIGCLD);
+-	if (sigaction(SIGCLD, &act, NULL) < 0) {
+-		tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
++	sigaddset(&act.sa_mask, SIGCHLD);
++	if (sigaction(SIGCHLD, &act, NULL) < 0) {
++		tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
+ 		return 1;
+ 	}
+ 	return 0;
+@@ -381,7 +381,7 @@ void stop_children(void)
+ {
+ 	int arg;
+ 
+-	signal(SIGCLD, SIG_DFL);
++	signal(SIGCHLD, SIG_DFL);
+ 	arg = STOP;
+ 	child_free(child_pipe1[1], arg);
+ 	child_free(child_pipe2[1], arg);
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl19.c b/testcases/kernel/syscalls/fcntl/fcntl19.c
+index a542cfc..88c91d6 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl19.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl19.c
+@@ -112,9 +112,9 @@ void setup(void)
+ 	memset(&act, 0, sizeof(act));
+ 	act.sa_handler = catch_child;
+ 	sigemptyset(&act.sa_mask);
+-	sigaddset(&act.sa_mask, SIGCLD);
+-	if ((sigaction(SIGCLD, &act, NULL)) < 0) {
+-		tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
++	sigaddset(&act.sa_mask, SIGCHLD);
++	if ((sigaction(SIGCHLD, &act, NULL)) < 0) {
++		tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
+ 		fail = 1;
+ 	}
+ }
+@@ -265,7 +265,7 @@ void stop_child(void)
+ {
+ 	struct flock fl;
+ 
+-	signal(SIGCLD, SIG_DFL);
++	signal(SIGCHLD, SIG_DFL);
+ 	fl.l_type = STOP;
+ 	parent_put(&fl);
+ 	wait(0);
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl20.c b/testcases/kernel/syscalls/fcntl/fcntl20.c
+index aa06bab..99fd783 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl20.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl20.c
+@@ -109,9 +109,9 @@ void setup(void)
+ 	memset(&act, 0, sizeof(act));
+ 	act.sa_handler = catch_child;
+ 	sigemptyset(&act.sa_mask);
+-	sigaddset(&act.sa_mask, SIGCLD);
+-	if (sigaction(SIGCLD, &act, NULL) == -1)
+-		tst_brkm(TFAIL | TERRNO, cleanup, "SIGCLD signal setup failed");
++	sigaddset(&act.sa_mask, SIGCHLD);
++	if (sigaction(SIGCHLD, &act, NULL) == -1)
++		tst_brkm(TFAIL | TERRNO, cleanup, "SIGCHLD signal setup failed");
+ }
+ 
+ void cleanup(void)
+@@ -264,7 +264,7 @@ void stop_child(void)
+ {
+ 	struct flock fl;
+ 
+-	signal(SIGCLD, SIG_DFL);
++	signal(SIGCHLD, SIG_DFL);
+ 	fl.l_type = STOP;
+ 	parent_put(&fl);
+ 	wait(0);
+diff --git a/testcases/kernel/syscalls/fcntl/fcntl21.c b/testcases/kernel/syscalls/fcntl/fcntl21.c
+index 5307021..8f1a67c 100644
+--- a/testcases/kernel/syscalls/fcntl/fcntl21.c
++++ b/testcases/kernel/syscalls/fcntl/fcntl21.c
+@@ -110,9 +110,9 @@ void setup(void)
+ 	memset(&act, 0, sizeof(act));
+ 	act.sa_handler = catch_child;
+ 	sigemptyset(&act.sa_mask);
+-	sigaddset(&act.sa_mask, SIGCLD);
+-	if ((sigaction(SIGCLD, &act, NULL)) < 0) {
+-		tst_resm(TFAIL, "SIGCLD signal setup failed, errno: %d", errno);
++	sigaddset(&act.sa_mask, SIGCHLD);
++	if ((sigaction(SIGCHLD, &act, NULL)) < 0) {
++		tst_resm(TFAIL, "SIGCHLD signal setup failed, errno: %d", errno);
+ 		fail = 1;
+ 	}
+ }
+@@ -272,7 +272,7 @@ void stop_child(void)
+ {
+ 	struct flock fl;
+ 
+-	signal(SIGCLD, SIG_DFL);
++	signal(SIGCHLD, SIG_DFL);
+ 	fl.l_type = STOP;
+ 	parent_put(&fl);
+ 	wait(0);
+diff --git a/testcases/kernel/syscalls/kill/kill02.c b/testcases/kernel/syscalls/kill/kill02.c
+index 9d6cc68..08360dd 100644
+--- a/testcases/kernel/syscalls/kill/kill02.c
++++ b/testcases/kernel/syscalls/kill/kill02.c
+@@ -701,7 +701,7 @@ void setup(void)
+ 
+ 	/*
+ 	 *  Set to catch unexpected signals.
+-	 *  SIGCLD is set to be ignored because we do not wait for termination status.
++	 *  SIGCHLD is set to be ignored because we do not wait for termination status.
+ 	 *  SIGUSR1 is set to be ignored because this is the signal we are using for
+ 	 *  the test and we are not concerned with the parent getting it.
+ 	 */
+@@ -713,9 +713,9 @@ void setup(void)
+ 			 "signal(SIGUSR1, SIG_IGN) failed");
+ 	}
+ 
+-	if (signal(SIGCLD, SIG_IGN) == SIG_ERR) {
++	if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {
+ 		tst_brkm(TBROK | TERRNO, NULL,
+-			 "signal(SIGCLD, SIG_IGN) failed");
++			 "signal(SIGCHLD, SIG_IGN) failed");
+ 	}
+ 
+ 	TEST_PAUSE;
+diff --git a/testcases/kernel/syscalls/kill/kill12.c b/testcases/kernel/syscalls/kill/kill12.c
+index 7a47a4a..d7c4147 100644
+--- a/testcases/kernel/syscalls/kill/kill12.c
++++ b/testcases/kernel/syscalls/kill/kill12.c
+@@ -98,7 +98,7 @@ int main(int argc, char **argv)
+ 
+ 	exno = 1;
+ 
+-	if (sigset(SIGCLD, chsig) == SIG_ERR) {
++	if (sigset(SIGCHLD, chsig) == SIG_ERR) {
+ 		fprintf(temp, "\tsigset failed, errno = %d\n", errno);
+ 		fail_exit();
+ 	}
+@@ -128,7 +128,7 @@ int main(int argc, char **argv)
+ 				sleep(1);
+ 
+ 			kill(pid, sig);	/* child should ignroe this sig */
+-			kill(pid, SIGCLD);	/* child should exit */
++			kill(pid, SIGCHLD);	/* child should exit */
+ 
+ #ifdef BCS
+ 			while ((npid = wait(&status)) != pid
+@@ -222,14 +222,14 @@ void do_child(void)
+ 	int exno = 1;
+ 
+ #ifdef UCLINUX
+-	if (sigset(SIGCLD, chsig) == SIG_ERR) {
++	if (sigset(SIGCHLD, chsig) == SIG_ERR) {
+ 		fprintf(temp, "\tsigset failed, errno = %d\n", errno);
+ 		fail_exit();
+ 	}
+ #endif
+ 
+ 	sigset(sig, SIG_IGN);	/* set to ignore signal */
+-	kill(getppid(), SIGCLD);	/* tell parent we are ready */
++	kill(getppid(), SIGCHLD);	/* tell parent we are ready */
+ 	while (!chflag)
+ 		sleep(1);	/* wait for parent */
+ 
+diff --git a/testcases/kernel/syscalls/mkdir/mkdir09.c b/testcases/kernel/syscalls/mkdir/mkdir09.c
+index 41c20e9..07b4fb8 100644
+--- a/testcases/kernel/syscalls/mkdir/mkdir09.c
++++ b/testcases/kernel/syscalls/mkdir/mkdir09.c
+@@ -122,10 +122,10 @@ int main(int argc, char *argv[])
+ 
+ 	}
+ 
+-	/* Set up to catch SIGCLD signal */
+-	if (signal(SIGCLD, chld) == SIG_ERR) {
++	/* Set up to catch SIGCHLD signal */
++	if (signal(SIGCHLD, chld) == SIG_ERR) {
+ 		tst_brkm(TFAIL, cleanup,
+-			 "Error setting up SIGCLD signal, ERRNO = %d", errno);
++			 "Error setting up SIGCHLD signal, ERRNO = %d", errno);
+ 
+ 	}
+ 
+@@ -236,9 +236,9 @@ int runtest(void)
+ 		tst_brkm(TFAIL, cleanup,
+ 			 "Error resetting SIGTERM signal, ERRNO = %d", errno);
+ 	}
+-	if (signal(SIGCLD, SIG_DFL) == SIG_ERR) {
++	if (signal(SIGCHLD, SIG_DFL) == SIG_ERR) {
+ 		tst_brkm(TFAIL, cleanup,
+-			 "Error resetting SIGCLD signal, ERRNO = %d", errno);
++			 "Error resetting SIGCHLD signal, ERRNO = %d", errno);
+ 	}
+ 
+ 	if (test_time) {
+@@ -372,7 +372,7 @@ void term(int sig)
+ 
+ void chld(int sig)
+ {
+-	/* Routine to handle SIGCLD signal. */
++	/* Routine to handle SIGCHLD signal. */
+ 
+ 	sigchld++;
+ 	if (jump) {
+diff --git a/testcases/kernel/syscalls/sighold/sighold02.c b/testcases/kernel/syscalls/sighold/sighold02.c
+index e3076fb..be01874 100644
+--- a/testcases/kernel/syscalls/sighold/sighold02.c
++++ b/testcases/kernel/syscalls/sighold/sighold02.c
+@@ -77,7 +77,7 @@ static int sigs_map[NUMSIGS];
+ static int skip_sig(int sig)
+ {
+ 	switch (sig) {
+-	case SIGCLD:
++	case SIGCHLD:
+ 	case SIGKILL:
+ 	case SIGALRM:
+ 	case SIGSTOP:
+diff --git a/testcases/network/tcp_cmds/perf_lan/pingpong.c b/testcases/network/tcp_cmds/perf_lan/pingpong.c
+index 1196312..5b06798 100644
+--- a/testcases/network/tcp_cmds/perf_lan/pingpong.c
++++ b/testcases/network/tcp_cmds/perf_lan/pingpong.c
+@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
+ 
+ 	/* Setup traps */
+ 	signal(SIGINT, finish);
+-	signal(SIGCLD, finish);
++	signal(SIGCHLD, finish);
+ 
+ 	/* Fork a child process to continue sending packets */
+ 	tst_resm(TINFO, "Create a child process to continue to send packets");
+diff --git a/testcases/network/tcp_cmds/perf_lan/pingpong6.c b/testcases/network/tcp_cmds/perf_lan/pingpong6.c
+index 9747f58..0a0fb1d 100644
+--- a/testcases/network/tcp_cmds/perf_lan/pingpong6.c
++++ b/testcases/network/tcp_cmds/perf_lan/pingpong6.c
+@@ -153,7 +153,7 @@ char *argv[];
+ 
+ 	/* Setup traps */
+ 	signal(SIGINT, finish);
+-	signal(SIGCLD, finish);
++	signal(SIGCHLD, finish);
+ 
+ 	/* Fork a child process to continue sending packets */
+ 	printf("Create a child process to continue to send packets \n");
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
new file mode 100644
index 0000000..d123074
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch
@@ -0,0 +1,285 @@
+From a3cbee31daae2466bc8dcac36b33a01352693346 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 01/26] 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>
+
+---
+ testcases/kernel/syscalls/accept4/accept4_01.c     |  9 ++++-
+ testcases/kernel/syscalls/getcpu/getcpu01.c        | 40 +++++++++++++++++++++-
+ .../sched_getaffinity/sched_getaffinity01.c        | 26 ++++++++++++++
+ 3 files changed, 73 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/accept4/accept4_01.c b/testcases/kernel/syscalls/accept4/accept4_01.c
+index 6072bfa..2b090cb 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/getcpu/getcpu01.c b/testcases/kernel/syscalls/getcpu/getcpu01.c
+index c927512..921b107 100644
+--- a/testcases/kernel/syscalls/getcpu/getcpu01.c
++++ b/testcases/kernel/syscalls/getcpu/getcpu01.c
+@@ -62,6 +62,7 @@
+ #include <dirent.h>
+ 
+ #if defined(__i386__) || defined(__x86_64__)
++#if defined(__GLIBC__)
+ #if __GLIBC_PREREQ(2,6)
+ #if defined(__x86_64__)
+ #include <utmpx.h>
+@@ -75,10 +76,17 @@ int sys_support = 0;
+ #else
+ int sys_support = 0;
+ #endif
++#else
++int sys_support = 0;
++#endif
+ 
++#if defined(__GLIBC__)
+ #if !(__GLIBC_PREREQ(2, 7))
+ #define CPU_FREE(ptr) free(ptr)
+ #endif
++#else
++#define CPU_FREE(ptr) free(ptr)
++#endif
+ 
+ void cleanup(void);
+ void setup(void);
+@@ -164,9 +172,14 @@ static inline int getcpu(unsigned *cpu_id, unsigned *node_id,
+ {
+ #if defined(__i386__)
+ 	return syscall(318, cpu_id, node_id, cache_struct);
+-#elif __GLIBC_PREREQ(2,6)
++#if defined(__GLIBC__)
++#if __GLIBC_PREREQ(2,6)
++	*cpu_id = sched_getcpu();
++#endif
++#else
+ 	*cpu_id = sched_getcpu();
+ #endif
++#endif
+ 	return 0;
+ }
+ 
+@@ -191,15 +204,20 @@ unsigned int set_cpu_affinity(void)
+ 	cpu_set_t *set;
+ 	size_t size;
+ 	int nrcpus = 1024;
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ realloc:
+ 	set = CPU_ALLOC(nrcpus);
+ #else
+ 	set = malloc(sizeof(cpu_set_t));
+ #endif
++#else
++	set = malloc(sizeof(cpu_set_t));
++#endif
+ 	if (set == NULL) {
+ 		tst_brkm(TFAIL, NULL, "CPU_ALLOC:errno:%d", errno);
+ 	}
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ 	size = CPU_ALLOC_SIZE(nrcpus);
+ 	CPU_ZERO_S(size, set);
+@@ -207,8 +225,13 @@ realloc:
+ 	size = sizeof(cpu_set_t);
+ 	CPU_ZERO(set);
+ #endif
++#else
++	size = sizeof(cpu_set_t);
++	CPU_ZERO(set);
++#endif
+ 	if (sched_getaffinity(0, size, set) < 0) {
+ 		CPU_FREE(set);
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ 		if (errno == EINVAL && nrcpus < (1024 << 8)) {
+ 			nrcpus = nrcpus << 2;
+@@ -220,10 +243,17 @@ realloc:
+ 				 "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)");
+ 		else
+ #endif
++#else
++		if (errno == EINVAL)
++			tst_resm(TFAIL,
++				 "NR_CPUS of the kernel is more than 1024, so we'd better use a newer glibc(>= 2.7)");
++		else
++#endif
+ 			tst_resm(TFAIL, "sched_getaffinity:errno:%d", errno);
+ 		tst_exit();
+ 	}
+ 	cpu_max = max_cpuid(size, set);
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ 	CPU_ZERO_S(size, set);
+ 	CPU_SET_S(cpu_max, size, set);
+@@ -231,6 +261,10 @@ realloc:
+ 	CPU_ZERO(set);
+ 	CPU_SET(cpu_max, set);
+ #endif
++#else
++	CPU_ZERO(set);
++	CPU_SET(cpu_max, set);
++#endif
+ 	if (sched_setaffinity(0, size, set) < 0) {
+ 		CPU_FREE(set);
+ 		tst_brkm(TFAIL, NULL, "sched_setaffinity:errno:%d", errno);
+@@ -247,11 +281,15 @@ unsigned int max_cpuid(size_t size, cpu_set_t * set)
+ {
+ 	unsigned int index, max = 0;
+ 	for (index = 0; index < size * BITS_PER_BYTE; index++)
++#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
+ #if __GLIBC_PREREQ(2, 7)
+ 		if (CPU_ISSET_S(index, size, set))
+ #else
+ 		if (CPU_ISSET(index, set))
+ #endif
++#else
++		if (CPU_ISSET(index, set))
++#endif
+ 			max = index;
+ 	return max;
+ }
+diff --git a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
+index 9d6a81a..4ed13b2 100644
+--- a/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
++++ b/testcases/kernel/syscalls/sched_getaffinity/sched_getaffinity01.c
+@@ -66,9 +66,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)
+ {
+@@ -95,14 +97,19 @@ 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);
+@@ -110,10 +117,15 @@ realloc:
+ 	len = sizeof(cpu_set_t);
+ 	CPU_ZERO(mask);
+ #endif
++#else
++	len = sizeof(cpu_set_t);
++	CPU_ZERO(mask);
++#endif
+ 	/* positive test */
+ 	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;
+@@ -125,17 +137,27 @@ realloc:
+ 				 "newer glibc(>= 2.7)");
+ 		else
+ #endif
++#else
++		if (errno == EINVAL)
++			tst_resm(TFAIL, "NR_CPUS > 1024, we'd better use a "
++				 "newer glibc(>= 2.7)");
++		else
++#endif
+ 			tst_resm(TFAIL | TTERRNO, "fail to get cpu affinity");
+ 		cleanup();
+ 	} else {
+ 		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
+ 			if (TEST_RETURN != -1)
+ 				tst_resm(TPASS, "sched_getaffinity() succeed, "
+ 					 "this process %d is running "
+@@ -143,11 +165,15 @@ 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
+ 	/* negative tests */
+ 	QUICK_TEST(sched_getaffinity(0, len, (cpu_set_t *) - 1));
+ 	QUICK_TEST(sched_getaffinity(0, 0, mask));
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch
new file mode 100644
index 0000000..e58e5a9
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch
@@ -0,0 +1,270 @@
+From 4ba19d64e95a874995d0b554b891b5ec35bd9495 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:45:35 +0000
+Subject: [PATCH 09/32] Guard error.h with __GLIBC__
+
+error API is specific to glibc so use the guard to make it conditional
+on glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/faccessat/faccessat01.c   | 2 ++
+ testcases/kernel/syscalls/fallocate/fallocate01.c   | 2 ++
+ testcases/kernel/syscalls/fchmodat/fchmodat01.c     | 2 ++
+ testcases/kernel/syscalls/fchownat/fchownat01.c     | 2 ++
+ testcases/kernel/syscalls/fchownat/fchownat02.c     | 2 ++
+ testcases/kernel/syscalls/fstatat/fstatat01.c       | 2 ++
+ testcases/kernel/syscalls/futimesat/futimesat01.c   | 2 ++
+ testcases/kernel/syscalls/linkat/linkat01.c         | 2 ++
+ testcases/kernel/syscalls/linkat/linkat02.c         | 2 ++
+ testcases/kernel/syscalls/mkdirat/mkdirat01.c       | 2 ++
+ testcases/kernel/syscalls/mknodat/mknodat01.c       | 2 ++
+ testcases/kernel/syscalls/mknodat/mknodat02.c       | 2 ++
+ testcases/kernel/syscalls/openat/openat01.c         | 2 ++
+ testcases/kernel/syscalls/readlinkat/readlinkat01.c | 2 ++
+ testcases/kernel/syscalls/renameat/renameat01.c     | 2 ++
+ testcases/kernel/syscalls/symlinkat/symlinkat01.c   | 2 ++
+ testcases/kernel/syscalls/unlinkat/unlinkat01.c     | 2 ++
+ 17 files changed, 34 insertions(+)
+
+diff --git a/testcases/kernel/syscalls/faccessat/faccessat01.c b/testcases/kernel/syscalls/faccessat/faccessat01.c
+index 7f0e87a..c72dcf0 100644
+--- a/testcases/kernel/syscalls/faccessat/faccessat01.c
++++ b/testcases/kernel/syscalls/faccessat/faccessat01.c
+@@ -37,7 +37,9 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/fallocate/fallocate01.c b/testcases/kernel/syscalls/fallocate/fallocate01.c
+index e72b123..643c0e2 100644
+--- a/testcases/kernel/syscalls/fallocate/fallocate01.c
++++ b/testcases/kernel/syscalls/fallocate/fallocate01.c
+@@ -96,7 +96,9 @@
+ #include <fcntl.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <inttypes.h>
+ #include <sys/utsname.h>
+ 
+diff --git a/testcases/kernel/syscalls/fchmodat/fchmodat01.c b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
+index 19e9ad5..ae6d807 100644
+--- a/testcases/kernel/syscalls/fchmodat/fchmodat01.c
++++ b/testcases/kernel/syscalls/fchmodat/fchmodat01.c
+@@ -37,7 +37,9 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/fchownat/fchownat01.c b/testcases/kernel/syscalls/fchownat/fchownat01.c
+index b361253..a5218af 100644
+--- a/testcases/kernel/syscalls/fchownat/fchownat01.c
++++ b/testcases/kernel/syscalls/fchownat/fchownat01.c
+@@ -28,7 +28,9 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/fchownat/fchownat02.c b/testcases/kernel/syscalls/fchownat/fchownat02.c
+index 6b0304c..8d2863f 100644
+--- a/testcases/kernel/syscalls/fchownat/fchownat02.c
++++ b/testcases/kernel/syscalls/fchownat/fchownat02.c
+@@ -26,7 +26,9 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/fstatat/fstatat01.c b/testcases/kernel/syscalls/fstatat/fstatat01.c
+index 61531c6..e99fbd2 100644
+--- a/testcases/kernel/syscalls/fstatat/fstatat01.c
++++ b/testcases/kernel/syscalls/fstatat/fstatat01.c
+@@ -48,7 +48,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/futimesat/futimesat01.c b/testcases/kernel/syscalls/futimesat/futimesat01.c
+index ae8d4fe..316dd78 100644
+--- a/testcases/kernel/syscalls/futimesat/futimesat01.c
++++ b/testcases/kernel/syscalls/futimesat/futimesat01.c
+@@ -37,7 +37,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/linkat/linkat01.c b/testcases/kernel/syscalls/linkat/linkat01.c
+index fc0687b..83cbfe7 100644
+--- a/testcases/kernel/syscalls/linkat/linkat01.c
++++ b/testcases/kernel/syscalls/linkat/linkat01.c
+@@ -49,7 +49,9 @@
+ #include <sys/time.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/linkat/linkat02.c b/testcases/kernel/syscalls/linkat/linkat02.c
+index e9a752a..8d7e431 100644
+--- a/testcases/kernel/syscalls/linkat/linkat02.c
++++ b/testcases/kernel/syscalls/linkat/linkat02.c
+@@ -23,7 +23,9 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/mkdirat/mkdirat01.c b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
+index 7e15947..1dbc038 100644
+--- a/testcases/kernel/syscalls/mkdirat/mkdirat01.c
++++ b/testcases/kernel/syscalls/mkdirat/mkdirat01.c
+@@ -30,7 +30,9 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/mknodat/mknodat01.c b/testcases/kernel/syscalls/mknodat/mknodat01.c
+index 26e5538..f034f05 100644
+--- a/testcases/kernel/syscalls/mknodat/mknodat01.c
++++ b/testcases/kernel/syscalls/mknodat/mknodat01.c
+@@ -29,7 +29,9 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/mknodat/mknodat02.c b/testcases/kernel/syscalls/mknodat/mknodat02.c
+index f6368fa..7d0f7c0 100644
+--- a/testcases/kernel/syscalls/mknodat/mknodat02.c
++++ b/testcases/kernel/syscalls/mknodat/mknodat02.c
+@@ -29,7 +29,9 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <sys/stat.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/openat/openat01.c b/testcases/kernel/syscalls/openat/openat01.c
+index 85f9a91..4ee0117 100644
+--- a/testcases/kernel/syscalls/openat/openat01.c
++++ b/testcases/kernel/syscalls/openat/openat01.c
+@@ -29,7 +29,9 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/readlinkat/readlinkat01.c b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
+index 97a49e8..b162853 100644
+--- a/testcases/kernel/syscalls/readlinkat/readlinkat01.c
++++ b/testcases/kernel/syscalls/readlinkat/readlinkat01.c
+@@ -29,7 +29,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/renameat/renameat01.c b/testcases/kernel/syscalls/renameat/renameat01.c
+index f4cd51b..105a05b 100644
+--- a/testcases/kernel/syscalls/renameat/renameat01.c
++++ b/testcases/kernel/syscalls/renameat/renameat01.c
+@@ -42,7 +42,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/symlinkat/symlinkat01.c b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
+index 5c238d8..cb7a7e8 100644
+--- a/testcases/kernel/syscalls/symlinkat/symlinkat01.c
++++ b/testcases/kernel/syscalls/symlinkat/symlinkat01.c
+@@ -37,7 +37,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+diff --git a/testcases/kernel/syscalls/unlinkat/unlinkat01.c b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
+index 31fe4e7..26f6d9a 100644
+--- a/testcases/kernel/syscalls/unlinkat/unlinkat01.c
++++ b/testcases/kernel/syscalls/unlinkat/unlinkat01.c
+@@ -37,7 +37,9 @@
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <fcntl.h>
++#ifdef __GLIBC__
+ #include <error.h>
++#endif
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
new file mode 100644
index 0000000..5b0c444
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
@@ -0,0 +1,73 @@
+From 0130f4146ced320aadb01b22e36b13d269a8ebba Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:48:14 +0000
+Subject: [PATCH 10/32] replace __BEGIN_DECLS and __END_DECLS
+
+They are not portable across libc implementations
+therefore replace them with expanded macros
+
+Include <asm-generic/types.h> to get __s32 definitions
+its not a generally available typedef
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/epoll2/include/epoll.h | 8 ++++++--
+ utils/sctp/include/netinet/sctp.h                | 9 +++++++--
+ 2 files changed, 13 insertions(+), 4 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/epoll2/include/epoll.h b/testcases/kernel/syscalls/epoll2/include/epoll.h
+index be599c7..8cc5e7e 100644
+--- a/testcases/kernel/syscalls/epoll2/include/epoll.h
++++ b/testcases/kernel/syscalls/epoll2/include/epoll.h
+@@ -85,7 +85,9 @@ struct epoll_event
+ } EPOLL_PACKED;
+ 
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /* Creates an epoll instance.  Returns an fd for the new instance.
+    The "size" parameter is a hint specifying the number of file
+@@ -114,6 +116,8 @@ extern int epoll_ctl (int __epfd, int __op, int __fd,
+ extern int epoll_wait (int __epfd, struct epoll_event *__events,
+ 		       int __maxevents, int __timeout) __THROW;
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* sys/epoll.h */
+diff --git a/utils/sctp/include/netinet/sctp.h b/utils/sctp/include/netinet/sctp.h
+index 51f5bfb..c61aef3 100644
+--- a/utils/sctp/include/netinet/sctp.h
++++ b/utils/sctp/include/netinet/sctp.h
+@@ -35,9 +35,12 @@
+ 
+ #include <stdint.h>
+ #include <linux/types.h>
++#include <asm-generic/types.h>
+ #include <sys/socket.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ typedef __s32 sctp_assoc_t;
+ 
+@@ -862,6 +865,8 @@ int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from,
+ /* Return the address length for an address family. */
+ int sctp_getaddrlen(sa_family_t family);
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif /* __linux_sctp_h__ */
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
new file mode 100644
index 0000000..945280c
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0011-Rename-sigset-variable-to-sigset1.patch
@@ -0,0 +1,136 @@
+From aff0e2a8f011fa80b472355355a7e8cdacd50189 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:53:30 +0000
+Subject: [PATCH 11/32] Rename sigset variable to sigset1
+
+sigset API from signal.h is shadowed by this name conflict
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/mem/shmt/shmt04.c                    | 10 +++++-----
+ testcases/kernel/mem/shmt/shmt06.c                    | 10 +++++-----
+ testcases/kernel/syscalls/sigprocmask/sigprocmask01.c | 10 +++++-----
+ 3 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/testcases/kernel/mem/shmt/shmt04.c b/testcases/kernel/mem/shmt/shmt04.c
+index 7203e9e..fce87d6 100644
+--- a/testcases/kernel/mem/shmt/shmt04.c
++++ b/testcases/kernel/mem/shmt/shmt04.c
+@@ -56,7 +56,7 @@ int TST_TOTAL = 2;		/* Total number of test cases. */
+ /**************/
+ 
+ key_t key;
+-sigset_t sigset;
++sigset_t sigset1;
+ 
+ #define  SIZE  16*1024
+ 
+@@ -71,9 +71,9 @@ int main(void)
+ 
+ 	key = (key_t) getpid();
+ 
+-	sigemptyset(&sigset);
+-	sigaddset(&sigset, SIGUSR1);
+-	sigprocmask(SIG_BLOCK, &sigset, NULL);
++	sigemptyset(&sigset1);
++	sigaddset(&sigset1, SIGUSR1);
++	sigprocmask(SIG_BLOCK, &sigset1, NULL);
+ 
+ 	pid = fork();
+ 	switch (pid) {
+@@ -148,7 +148,7 @@ int child(void)
+ 	char *cp;
+ 	int sig;
+ 
+-	sigwait(&sigset, &sig);
++	sigwait(&sigset1, &sig);
+ 	chld_pid = getpid();
+ /*--------------------------------------------------------*/
+ 
+diff --git a/testcases/kernel/mem/shmt/shmt06.c b/testcases/kernel/mem/shmt/shmt06.c
+index a3c9ca3..77b0fc9 100644
+--- a/testcases/kernel/mem/shmt/shmt06.c
++++ b/testcases/kernel/mem/shmt/shmt06.c
+@@ -57,7 +57,7 @@ int TST_TOTAL = 2;		/* Total number of test cases. */
+ /**************/
+ 
+ key_t key;
+-sigset_t sigset;
++sigset_t sigset1;
+ 
+ int child();
+ static int rm_shm(int);
+@@ -70,9 +70,9 @@ int main(void)
+ 
+ 	key = (key_t) getpid();
+ 
+-	sigemptyset(&sigset);
+-	sigaddset(&sigset, SIGUSR1);
+-	sigprocmask(SIG_BLOCK, &sigset, NULL);
++	sigemptyset(&sigset1);
++	sigaddset(&sigset1, SIGUSR1);
++	sigprocmask(SIG_BLOCK, &sigset1, NULL);
+ 
+ 	pid = fork();
+ 	switch (pid) {
+@@ -147,7 +147,7 @@ int child(void)
+ 	char *cp;
+ 	int sig;
+ 
+-	sigwait(&sigset, &sig);
++	sigwait(&sigset1, &sig);
+ 	chld_pid = getpid();
+ 
+ 	if ((shmid = shmget(key, SIZE, 0)) < 0) {
+diff --git a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
+index 20fca52..6fb1d57 100644
+--- a/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
++++ b/testcases/kernel/syscalls/sigprocmask/sigprocmask01.c
+@@ -91,7 +91,7 @@ int TST_TOTAL = 1;
+ int sig_catch = 0;		/* variable to blocked/unblocked signals */
+ 
+ struct sigaction sa_new;	/* struct to hold signal info */
+-sigset_t sigset;		/* signal set to hold signal lists */
++sigset_t sigset1;		/* signal set to hold signal lists */
+ sigset_t sigset2;
+ 
+ int main(int ac, char **av)
+@@ -112,7 +112,7 @@ int main(int ac, char **av)
+ 		 * so that, signal will not be delivered to
+ 		 * the test process.
+ 		 */
+-		TEST(sigprocmask(SIG_BLOCK, &sigset, 0));
++		TEST(sigprocmask(SIG_BLOCK, &sigset1, 0));
+ 
+ 		/* Get the process id of test process */
+ 		my_pid = getpid();
+@@ -165,7 +165,7 @@ int main(int ac, char **av)
+ 				 */
+ 				errno = 0;
+ 				if (sigprocmask(SIG_UNBLOCK,
+-						&sigset, 0) == -1) {
++						&sigset1, 0) == -1) {
+ 					tst_brkm(TFAIL, cleanup,
+ 						 "sigprocmask() failed "
+ 						 "to unblock signal, "
+@@ -212,7 +212,7 @@ void setup(void)
+ 	 * Initialise the signal sets with the list that
+ 	 * excludes/includes  all system-defined signals.
+ 	 */
+-	if (sigemptyset(&sigset) == -1) {
++	if (sigemptyset(&sigset1) == -1) {
+ 		tst_brkm(TFAIL, cleanup,
+ 			 "sigemptyset() failed, errno=%d : %s",
+ 			 errno, strerror(errno));
+@@ -235,7 +235,7 @@ void setup(void)
+ 	 * Add specified signal (SIGINT) to the signal set
+ 	 * which excludes system-defined signals.
+ 	 */
+-	if (sigaddset(&sigset, SIGINT) == -1) {
++	if (sigaddset(&sigset1, SIGINT) == -1) {
+ 		tst_brkm(TFAIL, cleanup,
+ 			 "sigaddset() failed, errno=%d : %s",
+ 			 errno, strerror(errno));
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch
new file mode 100644
index 0000000..e1532c1
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch
@@ -0,0 +1,351 @@
+From 54e098a366a1d773c4d7d4124f2f5aab976681c3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 19:58:08 +0000
+Subject: [PATCH 12/32] fsstress.c: Replace __int64_t with int64_t
+
+int64_t is defined in ISO C99
+include limits.h to get defintions of PATH_MAX
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/fs/fsstress/fsstress.c       | 31 +++++++++---------
+ testcases/network/nfs/nfs_fsstress/fsstress.c | 47 ++++++++++++++-------------
+ 2 files changed, 40 insertions(+), 38 deletions(-)
+
+diff --git a/testcases/kernel/fs/fsstress/fsstress.c b/testcases/kernel/fs/fsstress/fsstress.c
+index 2f89903..89f0b19 100644
+--- a/testcases/kernel/fs/fsstress/fsstress.c
++++ b/testcases/kernel/fs/fsstress/fsstress.c
+@@ -36,6 +36,7 @@
+ #ifdef HAVE_SYS_PRCTL_H
+ # include <sys/prctl.h>
+ #endif
++#include <limits.h>
+ 
+ #define XFS_ERRTAG_MAX		17
+ 
+@@ -1572,7 +1573,7 @@ void bulkstat_f(int opno, long r)
+ 	__u64 last;
+ 	__s32 nent;
+ 	xfs_bstat_t *t;
+-	__int64_t total;
++	int64_t total;
+ 	xfs_fsop_bulkreq_t bsr;
+ 
+ 	last = 0;
+@@ -1764,14 +1765,14 @@ int setdirect(int fd)
+ 
+ void dread_f(int opno, long r)
+ {
+-	__int64_t align;
++	int64_t align;
+ 	char *buf = NULL;
+ 	struct dioattr diob;
+ 	int e;
+ 	pathname_t f;
+ 	int fd;
+ 	size_t len;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -1835,8 +1836,8 @@ void dread_f(int opno, long r)
+ 		return;
+ 	}
+ #endif
+-	align = (__int64_t) diob.d_miniosz;
+-	lr = ((__int64_t) random() << 32) + random();
++	align = (int64_t) diob.d_miniosz;
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % stb.st_size);
+ 	off -= (off % align);
+ 	lseek64(fd, off, SEEK_SET);
+@@ -1865,14 +1866,14 @@ void dread_f(int opno, long r)
+ 
+ void dwrite_f(int opno, long r)
+ {
+-	__int64_t align;
++	int64_t align;
+ 	char *buf = NULL;
+ 	struct dioattr diob;
+ 	int e;
+ 	pathname_t f;
+ 	int fd;
+ 	size_t len;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -1925,8 +1926,8 @@ void dwrite_f(int opno, long r)
+ 		return;
+ 	}
+ #endif
+-	align = (__int64_t) diob.d_miniosz;
+-	lr = ((__int64_t) random() << 32) + random();
++	align = (int64_t) diob.d_miniosz;
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ 	off -= (off % align);
+ 	lseek64(fd, off, SEEK_SET);
+@@ -2224,7 +2225,7 @@ void read_f(int opno, long r)
+ 	pathname_t f;
+ 	int fd;
+ 	size_t len;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -2262,7 +2263,7 @@ void read_f(int opno, long r)
+ 		close(fd);
+ 		return;
+ 	}
+-	lr = ((__int64_t) random() << 32) + random();
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % stb.st_size);
+ 	lseek64(fd, off, SEEK_SET);
+ 	len = (random() % (getpagesize() * 32)) + 1;
+@@ -2509,7 +2510,7 @@ void truncate_f(int opno, long r)
+ {
+ 	int e;
+ 	pathname_t f;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -2530,7 +2531,7 @@ void truncate_f(int opno, long r)
+ 		free_pathname(&f);
+ 		return;
+ 	}
+-	lr = ((__int64_t) random() << 32) + random();
++	lr = ((int64_t) random() << 32) + random();
+ 	off = lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE);
+ 	off %= maxfsize;
+ 	e = truncate64_path(&f, off) < 0 ? errno : 0;
+@@ -2626,7 +2627,7 @@ void write_f(int opno, long r)
+ 	pathname_t f;
+ 	int fd;
+ 	size_t len;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -2656,7 +2657,7 @@ void write_f(int opno, long r)
+ 		close(fd);
+ 		return;
+ 	}
+-	lr = ((__int64_t) random() << 32) + random();
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ 	off %= maxfsize;
+ 	lseek64(fd, off, SEEK_SET);
+diff --git a/testcases/network/nfs/nfs_fsstress/fsstress.c b/testcases/network/nfs/nfs_fsstress/fsstress.c
+index ac91262..a34c416 100644
+--- a/testcases/network/nfs/nfs_fsstress/fsstress.c
++++ b/testcases/network/nfs/nfs_fsstress/fsstress.c
+@@ -31,6 +31,7 @@
+  */
+ 
+ #include "global.h"
++#include <limits.h>
+ 
+ #define XFS_ERRTAG_MAX		17
+ 
+@@ -1368,7 +1369,7 @@ void allocsp_f(int opno, long r)
+ 	pathname_t f;
+ 	int fd;
+ 	struct flock64 fl;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -1398,7 +1399,7 @@ void allocsp_f(int opno, long r)
+ 		close(fd);
+ 		return;
+ 	}
+-	lr = ((__int64_t) random() << 32) + random();
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ 	off %= maxfsize;
+ 	fl.l_whence = SEEK_SET;
+@@ -1519,7 +1520,7 @@ void bulkstat_f(int opno, long r)
+ 	__uint64_t last;
+ 	int nent;
+ 	xfs_bstat_t *t;
+-	__int64_t total;
++	int64_t total;
+ 	xfs_fsop_bulkreq_t bsr;
+ 
+ 	last = 0;
+@@ -1708,14 +1709,14 @@ int setdirect(int fd)
+ 
+ void dread_f(int opno, long r)
+ {
+-	__int64_t align;
++	int64_t align;
+ 	char *buf;
+ 	struct dioattr diob;
+ 	int e;
+ 	pathname_t f;
+ 	int fd;
+ 	size_t len;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -1775,8 +1776,8 @@ void dread_f(int opno, long r)
+ 		return;
+ 	}
+ #endif
+-	align = (__int64_t) diob.d_miniosz;
+-	lr = ((__int64_t) random() << 32) + random();
++	align = (int64_t) diob.d_miniosz;
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % stb.st_size);
+ 	off -= (off % align);
+ 	lseek64(fd, off, SEEK_SET);
+@@ -1798,14 +1799,14 @@ void dread_f(int opno, long r)
+ 
+ void dwrite_f(int opno, long r)
+ {
+-	__int64_t align;
++	int64_t align;
+ 	char *buf;
+ 	struct dioattr diob;
+ 	int e;
+ 	pathname_t f;
+ 	int fd;
+ 	size_t len;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -1854,8 +1855,8 @@ void dwrite_f(int opno, long r)
+ 		return;
+ 	}
+ #endif
+-	align = (__int64_t) diob.d_miniosz;
+-	lr = ((__int64_t) random() << 32) + random();
++	align = (int64_t) diob.d_miniosz;
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ 	off -= (off % align);
+ 	lseek64(fd, off, SEEK_SET);
+@@ -1917,7 +1918,7 @@ void freesp_f(int opno, long r)
+ 	pathname_t f;
+ 	int fd;
+ 	struct flock64 fl;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -1947,7 +1948,7 @@ void freesp_f(int opno, long r)
+ 		close(fd);
+ 		return;
+ 	}
+-	lr = ((__int64_t) random() << 32) + random();
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ 	off %= maxfsize;
+ 	fl.l_whence = SEEK_SET;
+@@ -2145,7 +2146,7 @@ void read_f(int opno, long r)
+ 	pathname_t f;
+ 	int fd;
+ 	size_t len;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -2183,7 +2184,7 @@ void read_f(int opno, long r)
+ 		close(fd);
+ 		return;
+ 	}
+-	lr = ((__int64_t) random() << 32) + random();
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % stb.st_size);
+ 	lseek64(fd, off, SEEK_SET);
+ 	len = (random() % (getpagesize() * 32)) + 1;
+@@ -2281,7 +2282,7 @@ void resvsp_f(int opno, long r)
+ 	pathname_t f;
+ 	int fd;
+ 	struct flock64 fl;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -2311,7 +2312,7 @@ void resvsp_f(int opno, long r)
+ 		close(fd);
+ 		return;
+ 	}
+-	lr = ((__int64_t) random() << 32) + random();
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ 	off %= maxfsize;
+ 	fl.l_whence = SEEK_SET;
+@@ -2428,7 +2429,7 @@ void truncate_f(int opno, long r)
+ {
+ 	int e;
+ 	pathname_t f;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -2449,7 +2450,7 @@ void truncate_f(int opno, long r)
+ 		free_pathname(&f);
+ 		return;
+ 	}
+-	lr = ((__int64_t) random() << 32) + random();
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ 	off %= maxfsize;
+ 	e = truncate64_path(&f, off) < 0 ? errno : 0;
+@@ -2491,7 +2492,7 @@ void unresvsp_f(int opno, long r)
+ 	pathname_t f;
+ 	int fd;
+ 	struct flock64 fl;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -2521,7 +2522,7 @@ void unresvsp_f(int opno, long r)
+ 		close(fd);
+ 		return;
+ 	}
+-	lr = ((__int64_t) random() << 32) + random();
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ 	off %= maxfsize;
+ 	fl.l_whence = SEEK_SET;
+@@ -2543,7 +2544,7 @@ void write_f(int opno, long r)
+ 	pathname_t f;
+ 	int fd;
+ 	size_t len;
+-	__int64_t lr;
++	int64_t lr;
+ 	off64_t off;
+ 	struct stat64 stb;
+ 	int v;
+@@ -2573,7 +2574,7 @@ void write_f(int opno, long r)
+ 		close(fd);
+ 		return;
+ 	}
+-	lr = ((__int64_t) random() << 32) + random();
++	lr = ((int64_t) random() << 32) + random();
+ 	off = (off64_t) (lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
+ 	off %= maxfsize;
+ 	lseek64(fd, off, SEEK_SET);
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch
new file mode 100644
index 0000000..4266e4f
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch
@@ -0,0 +1,67 @@
+From 1ef8c32317064438ec3b37a114f5d82957f4e0c6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 20:05:54 +0000
+Subject: [PATCH 13/32] include fcntl.h for getting O_* definitions
+
+musl exposes this issue, with glibc fcntl.h is included via some other
+header and this problem remained latent
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/ipc/ipc_stress/shmem_test_03.c   | 1 +
+ testcases/kernel/syscalls/mq_notify/mq_notify01.c | 1 +
+ testcases/network/tcp_cmds/sendfile/testsf_c.c    | 1 +
+ testcases/network/tcp_cmds/sendfile/testsf_s.c    | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_03.c b/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
+index c1b11fd..8be156f 100644
+--- a/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
++++ b/testcases/kernel/ipc/ipc_stress/shmem_test_03.c
+@@ -72,6 +72,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <limits.h>
++#include <fcntl.h>
+ #include <sys/file.h>
+ #include <sys/ipc.h>
+ #include <sys/mman.h>
+diff --git a/testcases/kernel/syscalls/mq_notify/mq_notify01.c b/testcases/kernel/syscalls/mq_notify/mq_notify01.c
+index 4728c70..5c7846c 100644
+--- a/testcases/kernel/syscalls/mq_notify/mq_notify01.c
++++ b/testcases/kernel/syscalls/mq_notify/mq_notify01.c
+@@ -41,6 +41,7 @@
+ #include <mqueue.h>
+ #include <signal.h>
+ #include <stdlib.h>
++#include <fcntl.h>
+ 
+ #include "../utils/include_j_h.h"
+ 
+diff --git a/testcases/network/tcp_cmds/sendfile/testsf_c.c b/testcases/network/tcp_cmds/sendfile/testsf_c.c
+index 449784f..38d3274 100644
+--- a/testcases/network/tcp_cmds/sendfile/testsf_c.c
++++ b/testcases/network/tcp_cmds/sendfile/testsf_c.c
+@@ -9,6 +9,7 @@
+ #include <sys/types.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <fcntl.h>
+ #include <sys/file.h>
+ #include <arpa/inet.h>
+ #include <netinet/in.h>
+diff --git a/testcases/network/tcp_cmds/sendfile/testsf_s.c b/testcases/network/tcp_cmds/sendfile/testsf_s.c
+index 17e98ad..bce8dd1 100644
+--- a/testcases/network/tcp_cmds/sendfile/testsf_s.c
++++ b/testcases/network/tcp_cmds/sendfile/testsf_s.c
+@@ -6,6 +6,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
++#include <fcntl.h>
+ #include <sys/file.h>
+ #include <errno.h>
+ #include <sys/signal.h>
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch
new file mode 100644
index 0000000..84d81e9
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch
@@ -0,0 +1,56 @@
+From d63fefa86dac437c47b9ebbea0a82a1240aaba2c Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 20:09:56 +0000
+Subject: [PATCH 14/32] hyperthreading: Include sys/types.h for pid_t
+ definition
+
+If sys/types.h is not included then it will not define pid_t_needed
+and therefore typedef wont be included and we get errors about pid_t
+being not known
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h  | 1 +
+ testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h   | 1 +
+ testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h b/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h
+index 1ec9794..9084aa7 100644
+--- a/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h
++++ b/testcases/kernel/sched/hyperthreading/ht_affinity/ht_utils.h
+@@ -3,6 +3,7 @@
+ #define _HTUTILS_H_
+ 
+ #include <stdlib.h>
++#include <sys/types.h>
+ 
+ int is_cmdline_para(const char *para);
+ 
+diff --git a/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h b/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h
+index 1ec9794..c03a124 100644
+--- a/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h
++++ b/testcases/kernel/sched/hyperthreading/ht_enabled/ht_utils.h
+@@ -2,6 +2,7 @@
+ #ifndef _HTUTILS_H_
+ #define _HTUTILS_H_
+ 
++#include <sys/types.h>
+ #include <stdlib.h>
+ 
+ int is_cmdline_para(const char *para);
+diff --git a/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h b/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h
+index 2977ad0..6b484e1 100644
+--- a/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h
++++ b/testcases/kernel/sched/hyperthreading/ht_interrupt/ht_utils.h
+@@ -3,6 +3,7 @@
+ #define _HTUTILS_H_
+ 
+ #include <stdlib.h>
++#include <sys/types.h>
+ 
+ int is_cmdline_para(const char *para);
+ 
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch
new file mode 100644
index 0000000..963536f
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch
@@ -0,0 +1,64 @@
+From f091839532f3afe0a58e8ba0b45615c899a43a47 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 20:12:09 +0000
+Subject: [PATCH 15/32] mincore01: Rename PAGESIZE to pagesize
+
+PAGESIZE conflicts with system headers on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/mincore/mincore01.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/mincore/mincore01.c b/testcases/kernel/syscalls/mincore/mincore01.c
+index 97a3d95..fa426d1 100644
+--- a/testcases/kernel/syscalls/mincore/mincore01.c
++++ b/testcases/kernel/syscalls/mincore/mincore01.c
+@@ -45,7 +45,7 @@
+ #include "test.h"
+ #include "safe_macros.h"
+ 
+-static int PAGESIZE;
++static int pagesize;
+ static rlim_t STACK_LIMIT = 10485760;
+ 
+ static void cleanup(void);
+@@ -146,7 +146,7 @@ static void setup4(struct test_case_t *tc)
+ 	}
+ 
+ 	tc->addr = global_pointer;
+-	tc->len = as_lim.rlim_cur - (rlim_t)global_pointer + PAGESIZE;
++	tc->len = as_lim.rlim_cur - (rlim_t)global_pointer + pagesize;
+ 	tc->vector = global_vec;
+ 
+ 	/*
+@@ -161,7 +161,7 @@ static void setup(void)
+ 	char *buf;
+ 	int fd;
+ 
+-	PAGESIZE = getpagesize();
++	pagesize = getpagesize();
+ 
+ 	tst_sig(NOFORK, DEF_HANDLER, cleanup);
+ 
+@@ -170,7 +170,7 @@ static void setup(void)
+ 	TEST_PAUSE;
+ 
+ 	/* global_pointer will point to a mmapped area of global_len bytes */
+-	global_len = PAGESIZE * 2;
++	global_len = pagesize * 2;
+ 
+ 	buf = SAFE_MALLOC(cleanup, global_len);
+ 	memset(buf, 42, global_len);
+@@ -186,7 +186,7 @@ static void setup(void)
+ 				   PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
+ 
+ 	global_vec = SAFE_MALLOC(cleanup,
+-				 (global_len + PAGESIZE - 1) / PAGESIZE);
++				 (global_len + pagesize - 1) / pagesize);
+ 
+ 	SAFE_CLOSE(cleanup, fd);
+ }
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch
new file mode 100644
index 0000000..1b5b93a
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch
@@ -0,0 +1,45 @@
+From 2b9be924bbad8a1f84ae553fdd1aa8391aa8d2f4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 20:15:07 +0000
+Subject: [PATCH 16/32] ustat: Change header from ustat.h to sys/ustat.h
+
+makes it portable for musl, on glibc ustat.h is just including
+sys/ustat.h too
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/ustat/ustat01.c | 2 +-
+ testcases/kernel/syscalls/ustat/ustat02.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/ustat/ustat01.c b/testcases/kernel/syscalls/ustat/ustat01.c
+index 01b7688..494647b 100644
+--- a/testcases/kernel/syscalls/ustat/ustat01.c
++++ b/testcases/kernel/syscalls/ustat/ustat01.c
+@@ -20,8 +20,8 @@
+  */
+ 
+ #include <unistd.h>
+-#include <ustat.h>
+ #include <errno.h>
++#include <sys/ustat.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include "test.h"
+diff --git a/testcases/kernel/syscalls/ustat/ustat02.c b/testcases/kernel/syscalls/ustat/ustat02.c
+index 4e66236..edada31 100644
+--- a/testcases/kernel/syscalls/ustat/ustat02.c
++++ b/testcases/kernel/syscalls/ustat/ustat02.c
+@@ -21,8 +21,8 @@
+  */
+ 
+ #include <unistd.h>
+-#include <ustat.h>
+ #include <errno.h>
++#include <sys/ustat.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include "test.h"
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch
new file mode 100644
index 0000000..ed25802
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch
@@ -0,0 +1,88 @@
+From c882bcd18820b44a685f0d5edd7aaff77a88c912 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 7 Jan 2016 20:17:55 +0000
+Subject: [PATCH 17/32] replace sigval_t with union sigval
+
+This makes it compatible across musl and glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c | 2 +-
+ testcases/kernel/syscalls/timer_gettime/timer_gettime01.c       | 2 +-
+ testcases/kernel/timers/timer_create/timer_create02.c           | 4 ++--
+ testcases/kernel/timers/timer_create/timer_create03.c           | 4 ++--
+ 4 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
+index d186c1f..bc03544 100644
+--- a/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
++++ b/testcases/kernel/syscalls/timer_getoverrun/timer_getoverrun01.c
+@@ -54,7 +54,7 @@ int main(int ac, char **av)
+ 
+ 	setup();
+ 
+-	ev.sigev_value = (sigval_t) 0;
++	ev.sigev_value = (union sigval) 0;
+ 	ev.sigev_signo = SIGALRM;
+ 	ev.sigev_notify = SIGEV_SIGNAL;
+ 	TEST(ltp_syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &timer));
+diff --git a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
+index b583aee..9371a6a 100644
+--- a/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
++++ b/testcases/kernel/syscalls/timer_gettime/timer_gettime01.c
+@@ -55,7 +55,7 @@ int main(int ac, char **av)
+ 
+ 	setup();
+ 
+-	ev.sigev_value = (sigval_t) 0;
++	ev.sigev_value = (union sigval) 0;
+ 	ev.sigev_signo = SIGALRM;
+ 	ev.sigev_notify = SIGEV_SIGNAL;
+ 	TEST(ltp_syscall(__NR_timer_create, CLOCK_REALTIME, &ev, &timer));
+diff --git a/testcases/kernel/timers/timer_create/timer_create02.c b/testcases/kernel/timers/timer_create/timer_create02.c
+index 7f528ed..1127400 100644
+--- a/testcases/kernel/timers/timer_create/timer_create02.c
++++ b/testcases/kernel/timers/timer_create/timer_create02.c
+@@ -142,7 +142,7 @@ void setup_test(int option)
+ {
+ 	switch (option) {
+ 	case 0:
+-		evp.sigev_value = (sigval_t) 0;
++		evp.sigev_value = (union sigval) 0;
+ 		evp.sigev_signo = SIGALRM;
+ 		evp.sigev_notify = SIGEV_SIGNAL;
+ 		evp_ptr = &evp;
+@@ -151,7 +151,7 @@ void setup_test(int option)
+ 		evp_ptr = NULL;
+ 		break;
+ 	case 2:
+-		evp.sigev_value = (sigval_t) 0;
++		evp.sigev_value = (union sigval) 0;
+ 		evp.sigev_signo = SIGALRM;	/* any will do */
+ 		evp.sigev_notify = SIGEV_NONE;
+ 		evp_ptr = &evp;
+diff --git a/testcases/kernel/timers/timer_create/timer_create03.c b/testcases/kernel/timers/timer_create/timer_create03.c
+index 291fcfa..8b01bf7 100644
+--- a/testcases/kernel/timers/timer_create/timer_create03.c
++++ b/testcases/kernel/timers/timer_create/timer_create03.c
+@@ -129,7 +129,7 @@ void setup_test(int option)
+ {
+ 	switch (option) {
+ 	case 0:
+-		evp.sigev_value = (sigval_t) 0;
++		evp.sigev_value = (union sigval) 0;
+ 		evp.sigev_signo = SIGALRM;
+ 		evp.sigev_notify = SIGEV_SIGNAL;
+ 		evp_ptr = &evp;
+@@ -138,7 +138,7 @@ void setup_test(int option)
+ 		evp_ptr = NULL;
+ 		break;
+ 	case 2:
+-		evp.sigev_value = (sigval_t) 0;
++		evp.sigev_value = (union sigval) 0;
+ 		evp.sigev_signo = SIGALRM;	/* any will do */
+ 		evp.sigev_notify = SIGEV_NONE;
+ 		evp_ptr = &evp;
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch
new file mode 100644
index 0000000..5198fe9
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0018-guard-mallocopt-with-__GLIBC__.patch
@@ -0,0 +1,32 @@
+From f42b060e80c9f40627c712d4d56d45221bd7d9fa 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__
+
+mallocopt is not available on non glibc implementations
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ utils/benchmark/ebizzy-0.3/ebizzy.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/benchmark/ebizzy-0.3/ebizzy.c b/utils/benchmark/ebizzy-0.3/ebizzy.c
+index 5bb8eff..934d951 100644
+--- a/utils/benchmark/ebizzy-0.3/ebizzy.c
++++ b/utils/benchmark/ebizzy-0.3/ebizzy.c
+@@ -215,10 +215,10 @@ static void read_options(int argc, char *argv[])
+ 			"\"never mmap\" option specified\n");
+ 		usage();
+ 	}
+-
++#ifdef __GLIBC__
+ 	if (never_mmap)
+ 		mallopt(M_MMAP_MAX, 0);
+-
++#endif
+ 	if (chunk_size < record_size) {
+ 		fprintf(stderr, "Chunk size %u smaller than record size %u\n",
+ 			chunk_size, record_size);
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch
new file mode 100644
index 0000000..0a4c5f0
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch
@@ -0,0 +1,32 @@
+From 721e94985b9cff3e2724af7ea5be7d005bc12dec Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 06:55:27 +0000
+Subject: [PATCH 19/32] tomoyo: Replace canonicalize_file_name() with
+ realpath()
+
+canonicalize_file_name() API is specific to glibc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
+index da4af0f..5c1a3ca 100644
+--- a/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
++++ b/testcases/kernel/security/tomoyo/tomoyo_filesystem_test.c
+@@ -274,9 +274,9 @@ int main(int argc, char *argv[])
+ 	/* Test mount(). */
+ 	{
+ 		static char buf[4096];
+-		char *dev_ram_path = canonicalize_file_name("/dev/ram0");
++		char *dev_ram_path = realpath("/dev/ram0", NULL);
+ 		if (!dev_ram_path)
+-			dev_ram_path = canonicalize_file_name("/dev/ram");
++			dev_ram_path = realpath("/dev/ram", NULL);
+ 		if (!dev_ram_path) {
+ 			dev_ram_path = "/dev/ram0";
+ 			mknod(dev_ram_path, S_IFBLK, MKDEV(1, 0));
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch
new file mode 100644
index 0000000..0e4e458
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0020-getdents-define-getdents-getdents64-only-for-glibc.patch
@@ -0,0 +1,48 @@
+From aa3568e6ac28f377e75ce16b11e3c7738a373e53 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
+
+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>
+---
+ 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
+--- a/testcases/kernel/syscalls/getdents/getdents.h
++++ b/testcases/kernel/syscalls/getdents/getdents.h
+@@ -34,12 +34,13 @@ struct linux_dirent {
+ 	char            d_name[];
+ };
+ 
++#ifdef __GLIBC__
+ static inline int
+ getdents(unsigned int fd, struct linux_dirent *dirp, unsigned int size)
+ {
+ 	return ltp_syscall(__NR_getdents, fd, dirp, size);
+ }
+-
++#endif
+ struct linux_dirent64 {
+ 	uint64_t	d_ino;
+ 	int64_t		d_off;
+@@ -48,10 +49,11 @@ struct linux_dirent64 {
+ 	char		d_name[];
+ };
+ 
++#ifdef __GLIBC__
+ static inline int
+ getdents64(unsigned int fd, struct linux_dirent64 *dirp64, unsigned int size)
+ {
+ 	return ltp_syscall(__NR_getdents64, fd, dirp64, size);
+ }
+-
++#endif
+ #endif /* GETDENTS_H */
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
new file mode 100644
index 0000000..c8cbe58
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch
@@ -0,0 +1,71 @@
+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>
+---
+ 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"
+ 
+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/yocto-poky/meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch
new file mode 100644
index 0000000..413b44a
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch
@@ -0,0 +1,29 @@
+From 7ac6fd51991ac61d1d7594f601d87842060ee284 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:06:11 +0000
+Subject: [PATCH 22/32] include sys/types.h
+
+Fixes
+
+error: unknown type name 'uint'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/ipc/ipc_stress/shmem_test_04.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
+index 72c2e60..e7e5f61 100644
+--- a/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
++++ b/testcases/kernel/ipc/ipc_stress/shmem_test_04.c
+@@ -65,6 +65,7 @@
+ #include <signal.h>
+ #include <stdint.h>
+ #include <sys/mman.h>
++#include <sys/types.h>
+ 
+ #ifdef _LINUX_
+ typedef unsigned long ulong_t;
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch
new file mode 100644
index 0000000..4680c03
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch
@@ -0,0 +1,48 @@
+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>
+---
+ 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/yocto-poky/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch
new file mode 100644
index 0000000..03c67a5
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch
@@ -0,0 +1,68 @@
+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>
+---
+ 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/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch
new file mode 100644
index 0000000..aad3cb0
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0025-mc_gethost-include-sys-types.h.patch
@@ -0,0 +1,28 @@
+From 9d14edfc12eefac900dd54729a88b3ccf91c1c43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:18:15 +0000
+Subject: [PATCH 25/32] mc_gethost: include sys/types.h
+
+Fix build on musl
+error: unknown type name 'u_char'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/network/multicast/mc_gethost/mc_gethost.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/testcases/network/multicast/mc_gethost/mc_gethost.c b/testcases/network/multicast/mc_gethost/mc_gethost.c
+index 5b9a790..c799e2a 100644
+--- a/testcases/network/multicast/mc_gethost/mc_gethost.c
++++ b/testcases/network/multicast/mc_gethost/mc_gethost.c
+@@ -6,6 +6,7 @@
+ 
+ #include <sys/param.h>
+ #include <sys/socket.h>
++#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <arpa/nameser.h>
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch
new file mode 100644
index 0000000..58b8ed4
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0026-crash01-Define-_GNU_SOURCE.patch
@@ -0,0 +1,29 @@
+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>
+---
+ 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/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
new file mode 100644
index 0000000..b47d097
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
@@ -0,0 +1,29 @@
+From 4a74b275acc8158850f2500928a1467c3482c986 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:23:11 +0000
+Subject: [PATCH 27/32] sysconf01: Use _SC_2_C_VERSION conditionally
+
+_SC_2_C_VERSION is not available on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/syscalls/sysconf/sysconf01.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/testcases/kernel/syscalls/sysconf/sysconf01.c b/testcases/kernel/syscalls/sysconf/sysconf01.c
+index 8542e77..e806943 100644
+--- a/testcases/kernel/syscalls/sysconf/sysconf01.c
++++ b/testcases/kernel/syscalls/sysconf/sysconf01.c
+@@ -102,7 +102,9 @@ int main(void)
+ 	test_sysconf(_SC_ATEXIT_MAX);
+ 	test_sysconf(_SC_2_C_BIND);
+ 	test_sysconf(_SC_2_C_DEV);
++#ifdef __GLIBC__
+ 	test_sysconf(_SC_2_C_VERSION);
++#endif
+ 	/* 21 - 25 */
+ 	test_sysconf(_SC_2_CHAR_TERM);
+ 	test_sysconf(_SC_2_FORT_DEV);
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
new file mode 100644
index 0000000..fc82ff9
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch
@@ -0,0 +1,43 @@
+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>
+---
+ include/lapi/rt_sigaction.h                      | 2 +-
+ testcases/kernel/syscalls/rt_sigsuspend/Makefile | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/include/lapi/rt_sigaction.h b/include/lapi/rt_sigaction.h
+index 3a5a763..870918c 100644
+--- a/include/lapi/rt_sigaction.h
++++ b/include/lapi/rt_sigaction.h
+@@ -34,7 +34,7 @@
+ #define INVAL_SA_PTR ((void *)-1)
+ 
+ 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
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch
new file mode 100644
index 0000000..f7ece9e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch
@@ -0,0 +1,32 @@
+From 2f8a57f66a94210d34dd0361659a8297cf3d813f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:29:24 +0000
+Subject: [PATCH 29/32] trace_shed: Fix build with musl
+
+Errors on musl are
+
+trace_sched.c:425:16: error: invalid operands to binary & (have
+'thread_sched_t * {aka struct <anonymous> *}' and 'int')
+      thrd_ndx, WEXITSTATUS(status));
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/sched/tool/trace_sched.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/sched/tool/trace_sched.c b/testcases/kernel/sched/tool/trace_sched.c
+index 7815686..30dca5f 100644
+--- a/testcases/kernel/sched/tool/trace_sched.c
++++ b/testcases/kernel/sched/tool/trace_sched.c
+@@ -422,7 +422,7 @@ int main(int argc,		/* number of input parameters.                        */
+ 			if (status == (thread_sched_t *) - 1) {
+ 				fprintf(stderr,
+ 					"thread [%d] - process exited with errors %d\n",
+-					thrd_ndx, WEXITSTATUS(status));
++					thrd_ndx, WEXITSTATUS((int)status));
+ 				exit(-1);
+ 			} else {
+ 				exp_prio[thrd_ndx] = status->exp_prio;
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
new file mode 100644
index 0000000..d2d6d76
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
@@ -0,0 +1,33 @@
+From 77c95dacffe90382a1f131c801ac569120d95949 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:32:24 +0000
+Subject: [PATCH 30/32] lib: Use PTHREAD_MUTEX_RECURSIVE in place of
+ PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP for non-glibc
+
+e.g. musl does not implement the _NP mutex types
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ lib/tst_res.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/lib/tst_res.c b/lib/tst_res.c
+index 5c1c58c..3244b5e 100644
+--- a/lib/tst_res.c
++++ b/lib/tst_res.c
+@@ -104,8 +104,11 @@ int TEST_ERRNO;
+ 	assert(strlen(buf) > 0);		\
+ } while (0)
+ 
++#ifdef __GLIBC__
+ static pthread_mutex_t tmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
+-
++#else
++static pthread_mutex_t tmutex = {  PTHREAD_MUTEX_RECURSIVE };
++#endif
+ /*
+  * Define local function prototypes.
+  */
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch
new file mode 100644
index 0000000..473ca4c
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch
@@ -0,0 +1,33 @@
+From 293ff1da06748ed4c69be6ece262d42e562e7298 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 07:36:19 +0000
+Subject: [PATCH 31/32] vma03: fix page size offset as per page size alignment
+
+the offset the param of mmap2() doesn't align the page size, but,
+this param allow must be a multiple of the page size as returned
+by sysconf(_SC_PAGE_SIZE).meanwhile offset * 4096 must be a
+multiple of the system page size, so modify the input param of offset
+pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
+
+Signed-off-by: Chuang Dong <Chuang.Dong@windriver.com>
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/mem/vma/vma03.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/testcases/kernel/mem/vma/vma03.c b/testcases/kernel/mem/vma/vma03.c
+index ad8a7b4..a539233 100644
+--- a/testcases/kernel/mem/vma/vma03.c
++++ b/testcases/kernel/mem/vma/vma03.c
+@@ -85,7 +85,7 @@ int main(int argc, char *argv[])
+ 		if (fd == -1)
+ 			tst_brkm(TBROK | TERRNO, NULL, "open %s", TESTFILE);
+ 
+-		pgoff = ULONG_MAX - 1;
++		pgoff = (ULONG_MAX - 1)&(~((pgsz-1)>>12));
+ 		map = mmap2(NULL, pgsz, PROT_READ | PROT_WRITE, MAP_PRIVATE,
+ 			    fd, pgoff);
+ 		if (map == MAP_FAILED)
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch
new file mode 100644
index 0000000..5c6bf91
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0032-regen.sh-Include-asm-unistd.h-explicitly.patch
@@ -0,0 +1,30 @@
+From 4f1905ff09c730091674818bd1b48ee221347101 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 8 Jan 2016 08:30:29 +0000
+Subject: [PATCH 32/32] regen.sh: Include asm/unistd.h explicitly
+
+on musl this is not included indirectly and it results in errors like
+testcases/kernel/include/linux_syscall_numbers.h:1035:25: error:
+'__NR_SYSCALL_BASE' undeclared (first use in this function)
+|  #  define __NR_readdir (__NR_SYSCALL_BASE+ 89)
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ testcases/kernel/include/regen.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/testcases/kernel/include/regen.sh b/testcases/kernel/include/regen.sh
+index f93f49b..ee790af 100755
+--- a/testcases/kernel/include/regen.sh
++++ b/testcases/kernel/include/regen.sh
+@@ -32,6 +32,7 @@ cat << EOF > "${output_pid}"
+ 
+ #include <errno.h>
+ #include <sys/syscall.h>
++#include <asm/unistd.h>
+ #include "cleanup.c"
+ 
+ #define ltp_syscall(NR, ...) ({ \\
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch
new file mode 100644
index 0000000..868e1cf
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch
@@ -0,0 +1,41 @@
+From 5e3dea669e5b0b769f322d54a3bb9f320b5327da Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Mar 2016 15:47:14 +0000
+Subject: [PATCH 26/26] shmat1: Cover GNU specific code under __USE_GNU
+
+on x86, we use uc_mcontext element from sigcontext
+which is marked gnu-specific in glibc, this patch
+adds this condition around the code
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ testcases/kernel/mem/mtest06/shmat1.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/testcases/kernel/mem/mtest06/shmat1.c b/testcases/kernel/mem/mtest06/shmat1.c
+index 0d6d7a4..bee69f6 100644
+--- a/testcases/kernel/mem/mtest06/shmat1.c
++++ b/testcases/kernel/mem/mtest06/shmat1.c
+@@ -111,7 +111,7 @@ int done_shmat = 0;		/* disallow read and writes before shmat      */
+ static void sig_handler(int signal,	/* signal number, set to handle SIGALRM       */
+ 			int code, struct ucontext *ut)
+ {				/* contains pointer to sigcontext structure   */
+-#ifdef __i386__
++#if defined(__i386__) && defined(__USE_GNU)
+ 	unsigned long except;	/* exception type.                            */
+ 	int ret = 0;		/* exit code from signal handler.             */
+ 	struct sigcontext *scp =	/* pointer to sigcontext structure            */
+@@ -122,7 +122,7 @@ static void sig_handler(int signal,	/* signal number, set to handle SIGALRM
+ 		fprintf(stdout, "Test ended, success\n");
+ 		exit(0);
+ 	}
+-#ifdef __i386__
++#if defined(__i386__) && defined(__USE_GNU)
+ 	else {
+ 		except = scp->trapno;
+ 		fprintf(stderr, "signal caught - [%d] ", signal);
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
new file mode 100644
index 0000000..59caefe
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0034-periodic_output.patch
@@ -0,0 +1,43 @@
+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
+
+diff -ruN a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh
+--- a/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh	2013-11-08 15:54:09.515049081 +0100
++++ b/testcases/kernel/controllers/memcg/stress/memcg_stress_test.sh	2013-11-08 22:32:15.587370406 +0100
+@@ -37,7 +37,8 @@
+         exit 0
+ fi
+ 
+-RUN_TIME=$(( 60 * 60 ))
++ONE_MINUTE=60
++RUN_TIME=60
+ 
+ cleanup()
+ {
+@@ -62,7 +63,7 @@
+ # $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 @@
+ 		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
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
new file mode 100644
index 0000000..32ae8aa
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp/0035-fix-test_proc_kill-hang.patch
@@ -0,0 +1,23 @@
+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.
+
+Signed-off-by: George Nita <george.nita@enea.com>
+Upstream-Status: Pending 
+
+diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
+index ffbe006..e81bf74 100755
+--- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
++++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh
+@@ -220,8 +220,8 @@ test_proc_kill()
+ 
+ 	$TEST_PATH/memcg_process $2 -s $3 &
+ 	pid=$!
+-	sleep 1
+ 	echo $pid > tasks
++	sleep 1
+ 
+ 	kill -s USR1 $pid 2> /dev/null
+ 	sleep 1
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
deleted file mode 100644
index 064f00a..0000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-numa.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-[PATCH] add knob to control whether numa support should be checked
-
-Upstream-Status: Pending
-
-otherwise the random dependency will be generated
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- configure.ac                                       |   10 +-
-diff --git a/configure.ac b/configure.ac
-index 9f397e7..1357256 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -142,6 +142,12 @@ else
-     AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
- fi
- 
-+AC_ARG_WITH([numa],
-+  AC_HELP_STRING([--without-numa],
-+    [without the numa support]),
-+  [],[with_numa=yes],
-+)
-+
- AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
- 
- # END testsuites knobs
-@@ -159,7 +165,9 @@ LTP_CHECK_SIGNAL
- LTP_CHECK_SYSCALL_EVENTFD
- LTP_CHECK_SYSCALL_KEYCTL
- LTP_CHECK_SYSCALL_MODIFY_LDT
-+if test "x$with_numa" = xyes; then
- LTP_CHECK_SYSCALL_NUMA
-+fi
- LTP_CHECK_SYSCALL_QUOTACTL
- LTP_CHECK_SYSCALL_SIGNALFD
- LTP_CHECK_SYSCALL_UNSHARE
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch
deleted file mode 100644
index 36ff4c7..0000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/add-knob-for-tirpc.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-[PATCH] add knob to control whether tirpc support should be checked
-
-Upstream-Status: Pending
-
-tirpc support is broken upstream. in the meantime, allow to disable tirpc.
-
-Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
----
- configure.ac |    9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -98,6 +98,13 @@ if test "x$with_python" = xyes; then
- else
-     AC_SUBST([WITH_PYTHON],["no"])
- fi
-+
-+# TI RPC
-+AC_ARG_WITH([tirpc],
-+  AC_HELP_STRING([--without-tirpc],
-+    [without libtirpc support]),
-+  [],[with_tirpc=yes],
-+)
- # END tools knobs
- 
- # Testsuites knobs
-@@ -182,7 +189,9 @@ LTP_CHECK_RENAMEAT
- LTP_CHECK_FALLOCATE
- LTP_CHECK_SYSCALL_FCNTL
- LTP_CHECK_SYSCALL_PERF_EVENT_OPEN
-+if test "x$with_tirpc" = xyes; then
- LTP_CHECK_TIRPC
-+fi
- LTP_CHECK_TEE
- LTP_CHECK_SPLICE
- LTP_CHECK_VMSPLICE
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch
deleted file mode 100644
index 20fd4c3..0000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/ltp-Do-not-link-against-libfl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 5bda9c0af56869c6ff2c25d38ea087179c946bc6 Mon Sep 17 00:00:00 2001
-From: Chong Lu <Chong.Lu@windriver.com>
-Date: Tue, 11 Mar 2014 14:47:22 +0800
-Subject: [PATCH] ltp: Don't link against libfl
-
-We have already defined yywrap function in scan.l file. After this, we no longer need to
-link against libfl and so no longer get errors about undefined references to yylex.
-
-Upstream-Status: Pending
-
-Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
----
- pan/Makefile |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pan/Makefile b/pan/Makefile
-index 4cc6466..a4b575b 100644
---- a/pan/Makefile
-+++ b/pan/Makefile
-@@ -31,7 +31,7 @@ CPPFLAGS		+= -Wno-error
- 
- CPPFLAGS		+= -I$(abs_srcdir)
- 
--LDLIBS			+= -lm $(LEXLIB)
-+LDLIBS			+= -lm
- 
- LFLAGS			+= -l
- 
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch b/yocto-poky/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
deleted file mode 100644
index 4836010..0000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp/make-setregid02-work.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-[PATCH] make setregid02 work
-
-Upstream-Status: Inappropriate [configuration]
-
-there is no "nobody" group in oe-core, the user "nobody" belongs to
-"nogroup" group, so replace nobody with nogroup to make the test pass
-
-Signed-off-by: Roy.Li <rongqing.li@windriver.com>
----
- testcases/kernel/syscalls/setregid/setregid02.c | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/testcases/kernel/syscalls/setregid/setregid02.c b/testcases/kernel/syscalls/setregid/setregid02.c
-index 8058627..866bee4 100644
---- a/testcases/kernel/syscalls/setregid/setregid02.c
-+++ b/testcases/kernel/syscalls/setregid/setregid02.c
-@@ -41,7 +41,7 @@ static gid_t neg_one = -1;
- 
- static struct passwd *ltpuser;
- 
--static struct group nobody, root, bin;
-+static struct group nogroup, root, bin;
- 
- /*
-  * The following structure contains all test data.  Each structure in the array
-@@ -57,17 +57,17 @@ struct test_data_t {
- 	char *test_msg;
- } test_data[] = {
- 	{
--	&neg_one, &root.gr_gid, EPERM, &nobody, &nobody,
-+	&neg_one, &root.gr_gid, EPERM, &nogroup, &nogroup,
- 		    "After setregid(-1, root),"}, {
--	&neg_one, &bin.gr_gid, EPERM, &nobody, &nobody,
-+	&neg_one, &bin.gr_gid, EPERM, &nogroup, &nogroup,
- 		    "After setregid(-1, bin)"}, {
--	&root.gr_gid, &neg_one, EPERM, &nobody, &nobody,
-+	&root.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
- 		    "After setregid(root,-1),"}, {
--	&bin.gr_gid, &neg_one, EPERM, &nobody, &nobody,
-+	&bin.gr_gid, &neg_one, EPERM, &nogroup, &nogroup,
- 		    "After setregid(bin, -1),"}, {
--	&root.gr_gid, &bin.gr_gid, EPERM, &nobody, &nobody,
-+	&root.gr_gid, &bin.gr_gid, EPERM, &nogroup, &nogroup,
- 		    "After setregid(root, bin)"}, {
--	&bin.gr_gid, &root.gr_gid, EPERM, &nobody, &nobody,
-+	&bin.gr_gid, &root.gr_gid, EPERM, &nogroup, &nogroup,
- 		    "After setregid(bin, root),"}
- };
- 
-@@ -165,7 +165,7 @@ static void setup(void)
- } while (0)
- 
- 	GET_GID(root);
--	GET_GID(nobody);
-+	GET_GID(nogroup);
- 	GET_GID(bin);
- 
- 	TEST_PAUSE;
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp_20150420.bb b/yocto-poky/meta/recipes-extended/ltp/ltp_20150420.bb
deleted file mode 100644
index ed46b5e..0000000
--- a/yocto-poky/meta/recipes-extended/ltp/ltp_20150420.bb
+++ /dev/null
@@ -1,87 +0,0 @@
-SUMMARY = "Linux Test Project"
-DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features."
-HOMEPAGE = "http://ltp.sourceforge.net"
-SECTION = "console/utils"
-LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
-LIC_FILES_CHKSUM = "\
-    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-    file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
-    file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
-    file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
-    file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
-    file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \
-    file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
-    file://tools/netpipe-2.4/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
-    file://tools/netpipe-2.4-ipv6/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
-    file://tools/top-LTP/proc/COPYING;md5=aefc88eb8a41672fbfcfe6b69ab8c49c \
-    file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-    file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-    file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
-"
-
-DEPENDS = "attr libaio libcap acl openssl zip-native"
-SRCREV = "77d0b7fd0148ce657c5a25060667e978c07662a0"
-
-SRC_URI = "git://github.com/linux-test-project/ltp.git \
-    file://0001-Rename-runtests_noltp.sh-script-so-have-unique-name.patch \
-    file://ltp-Do-not-link-against-libfl.patch \
-    file://make-setregid02-work.patch \
-    file://add-knob-for-numa.patch \
-    file://add-knob-for-tirpc.patch \
-    file://0001-ltp-vma03-fix-the-alginment-of-page-size.patch \
-    file://0001-replace-inline-with-static-inline-for-gcc-5.x.patch \
-"
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-export prefix = "/opt/ltp"
-export exec_prefix = "/opt/ltp"
-
-PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
-EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
-EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
-# ltp network/rpc test cases ftbfs when libtirpc is found
-EXTRA_OECONF += " --without-tirpc "
-
-# The makefiles make excessive use of make -C and several include testcases.mk
-# which triggers a build of the syscall header. To reproduce, build ltp,
-# then delete the header, then "make -j XX" and watch regen.sh run multiple
-# times. Its easier to generate this once here instead.
-do_compile_prepend () {
-	( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h )
-}
-
-do_install(){
-    install -d ${D}/opt/ltp/
-    oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
-
-    # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
-    cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
-}
-
-RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect"
-
-FILES_${PN}-dbg += "\
-    /opt/ltp/runtest/.debug \
-    /opt/ltp/testcases/*/.debug \
-    /opt/ltp/testcases/*/*/.debug \
-    /opt/ltp/testcases/*/*/*/.debug \
-    /opt/ltp/scenario_groups/.debug \
-    /opt/ltp/testscripts/.debug \
-    /opt/ltp/testscripts/open_posix_testsuite/.debug \
-"
-
-FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a"
-
-FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/*"
-
-# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails
-INHIBIT_PACKAGE_STRIP = "1"
-INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
-# However, test_arch_stripped is already stripped, so...
-INSANE_SKIP_${PN} += "already-stripped"
-
diff --git a/yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb b/yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb
new file mode 100644
index 0000000..097c16d
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/ltp/ltp_20160126.bb
@@ -0,0 +1,109 @@
+SUMMARY = "Linux Test Project"
+DESCRIPTION = "The Linux Test Project is a joint project with SGI, IBM, OSDL, and Bull with a goal to deliver test suites to the open source community that validate the reliability, robustness, and stability of Linux. The Linux Test Project is a collection of tools for testing the Linux kernel and related features."
+HOMEPAGE = "http://ltp.sourceforge.net"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & GPLv2+ & LGPLv2+ & LGPLv2.1+ & BSD-2-Clause"
+LIC_FILES_CHKSUM = "\
+    file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+    file://testcases/kernel/controllers/freezer/COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
+    file://testcases/kernel/controllers/freezer/run_freezer.sh;beginline=5;endline=17;md5=86a61d2c042d59836ffb353a21456498 \
+    file://testcases/kernel/hotplug/memory_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+    file://testcases/kernel/hotplug/cpu_hotplug/COPYING;md5=e04a2e542b2b8629bf9cd2ba29b0fe41 \
+    file://testcases/open_posix_testsuite/COPYING;md5=216e43b72efbe4ed9017cc19c4c68b01 \
+    file://testcases/realtime/COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
+    file://tools/netpipe-2.4/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
+    file://tools/netpipe-2.4-ipv6/COPYING;md5=9e3781bb5fe787aa80e1f51f5006b6fa \
+    file://tools/top-LTP/proc/COPYING;md5=aefc88eb8a41672fbfcfe6b69ab8c49c \
+    file://tools/pounder21/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+    file://utils/benchmark/kernbench-0.42/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+    file://utils/ffsb-6.0-rc2/COPYING;md5=c46082167a314d785d012a244748d803 \
+"
+
+DEPENDS = "attr libaio libcap acl openssl zip-native"
+DEPENDS_append_libc-musl = " fts "
+EXTRA_OEMAKE_append_libc-musl = " LIBC=musl "
+CFLAGS_append_powerpc64 = " -D__SANE_USERSPACE_TYPES__"
+CFLAGS_append_mips64 = " -D__SANE_USERSPACE_TYPES__"
+SRCREV = "fce797676b14f50406718e7ef640b50da66c9b36"
+
+SRC_URI = "git://github.com/linux-test-project/ltp.git \
+           file://0001-ltp-Don-t-link-against-libfl.patch \
+           file://0002-Add-knob-to-control-whether-numa-support-should-be-c.patch \
+           file://0003-Add-knob-to-control-tirpc-support.patch \
+           file://0004-build-Add-option-to-select-libc-implementation.patch \
+           file://0005-kernel-controllers-Link-with-libfts-explicitly-on-mu.patch \
+           file://0006-sendfile-Use-off64_t-instead-of-__off64_t.patch \
+           file://0007-replace-SIGCLD-with-SIGCHLD.patch \
+           file://0008-Check-if-__GLIBC_PREREQ-is-defined-before-using-it.patch \
+           file://0009-Guard-error.h-with-__GLIBC__.patch \
+           file://0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch \
+           file://0011-Rename-sigset-variable-to-sigset1.patch \
+           file://0012-fsstress.c-Replace-__int64_t-with-int64_t.patch \
+           file://0013-include-fcntl.h-for-getting-O_-definitions.patch \
+           file://0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch \
+           file://0015-mincore01-Rename-PAGESIZE-to-pagesize.patch \
+           file://0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch \
+           file://0017-replace-sigval_t-with-union-sigval.patch \
+           file://0018-guard-mallocopt-with-__GLIBC__.patch \
+           file://0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch \
+           file://0020-getdents-define-getdents-getdents64-only-for-glibc.patch \
+           file://0021-Define-_GNU_SOURCE-for-MREMAP_MAYMOVE-definition.patch \
+           file://0022-include-sys-types.h.patch \
+           file://0023-ptrace-Use-int-instead-of-enum-__ptrace_request.patch \
+           file://0024-rt_sigaction-rt_sigprocmark-Define-_GNU_SOURCE.patch \
+           file://0025-mc_gethost-include-sys-types.h.patch \
+           file://0026-crash01-Define-_GNU_SOURCE.patch \
+           file://0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch \
+           file://0028-rt_sigaction.h-Use-sighandler_t-instead-of-__sighand.patch \
+           file://0029-trace_shed-Fix-build-with-musl.patch \
+           file://0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch \
+           file://0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch \
+           file://0032-regen.sh-Include-asm-unistd.h-explicitly.patch \
+           file://0033-shmat1-Cover-GNU-specific-code-under-__USE_GNU.patch \
+           file://0034-periodic_output.patch \
+           file://0035-fix-test_proc_kill-hang.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+export prefix = "/opt/ltp"
+export exec_prefix = "/opt/ltp"
+
+PACKAGECONFIG[numa] = "--with-numa, --without-numa, numactl,"
+EXTRA_AUTORECONF += "-I ${S}/testcases/realtime/m4"
+EXTRA_OECONF = " --with-power-management-testsuite --with-realtime-testsuite "
+# ltp network/rpc test cases ftbfs when libtirpc is found
+EXTRA_OECONF += " --without-tirpc "
+
+# The makefiles make excessive use of make -C and several include testcases.mk
+# which triggers a build of the syscall header. To reproduce, build ltp,
+# then delete the header, then "make -j XX" and watch regen.sh run multiple
+# times. Its easier to generate this once here instead.
+do_compile_prepend () {
+	( make -C ${B}/testcases/kernel include/linux_syscall_numbers.h )
+}
+
+do_install(){
+    install -d ${D}/opt/ltp/
+    oe_runmake DESTDIR=${D} SKIP_IDCHECK=1 install
+
+    # Copy POSIX test suite into ${D}/opt/ltp/testcases by manual
+    cp -r testcases/open_posix_testsuite ${D}/opt/ltp/testcases
+}
+
+RDEPENDS_${PN} = "perl e2fsprogs-mke2fs python-core libaio bash gawk expect ldd"
+
+FILES_${PN}-staticdev += "/opt/ltp/lib/libmem.a"
+
+FILES_${PN} += "/opt/ltp/* /opt/ltp/runtest/* /opt/ltp/scenario_groups/* /opt/ltp/testcases/bin/* /opt/ltp/testcases/bin/*/bin/* /opt/ltp/testscripts/* /opt/ltp/testcases/open_posix_testsuite/* /opt/ltp/testcases/open_posix_testsuite/conformance/* /opt/ltp/testcases/open_posix_testsuite/Documentation/* /opt/ltp/testcases/open_posix_testsuite/functional/* /opt/ltp/testcases/open_posix_testsuite/include/* /opt/ltp/testcases/open_posix_testsuite/scripts/* /opt/ltp/testcases/open_posix_testsuite/stress/* /opt/ltp/testcases/open_posix_testsuite/tools/*"
+
+# Avoid generated binaries stripping. Otherwise some of the ltp tests such as ldd01 & nm01 fails
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+# However, test_arch_stripped is already stripped, so...
+INSANE_SKIP_${PN} += "already-stripped"
+
diff --git a/yocto-poky/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch b/yocto-poky/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch
index 5d61645..13b955c 100644
--- a/yocto-poky/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch
+++ b/yocto-poky/meta/recipes-extended/mailx/files/0011-outof-Introduce-expandaddr-flag.patch
@@ -13,6 +13,7 @@
 ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
 
 Upstream-Status: Inappropriate [upstream is dead]
+CVE: CVE-2014-7844
 ---
  mailx.1 | 14 ++++++++++++++
  names.c |  3 +++
diff --git a/yocto-poky/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch b/yocto-poky/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch
index f65cfa8..ae14b8a 100644
--- a/yocto-poky/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch
+++ b/yocto-poky/meta/recipes-extended/mailx/files/0014-globname-Invoke-wordexp-with-WRDE_NOCMD.patch
@@ -7,6 +7,7 @@
 ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz
 
 Upstream-Status: Inappropriate [upstream is dead]
+CVE: CVE-2004-2771
 ---
  fio.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb b/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb
index c87c582..4a32d2f 100644
--- a/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb
+++ b/yocto-poky/meta/recipes-extended/mailx/mailx_12.5-5.bb
@@ -26,6 +26,10 @@
 SRC_URI[archive.md5sum] = "29a6033ef1412824d02eb9d9213cb1f2"
 SRC_URI[archive.sha256sum] = "015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad"
 
+# for this package we're mostly interested in tracking debian patches,
+# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
+
 S = "${WORKDIR}/heirloom-mailx-12.5"
 
 inherit autotools-brokensep
diff --git a/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.02.bb b/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.02.bb
deleted file mode 100644
index 1b90a44..0000000
--- a/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.02.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Linux man-pages"
-DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
-SECTION = "console/utils"
-HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
-LICENSE = "GPLv2+"
-
-LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
-SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "93df3279798a3345bb2c709584c83639"
-SRC_URI[sha256sum] = "42324f9ed47c89a43cb37b6bb0d5fbcad44838eee45cd394e181c98d038c49ff"
-
-RDEPENDS_${PN} = "man"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install() {
-        oe_runmake install DESTDIR=${D}
-}
-
-# Only deliveres man-pages so FILES_${PN} gets everything
-FILES_${PN}-doc = ""
-FILES_${PN} = "${mandir}/*"
-
-inherit update-alternatives
-
-ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
-ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
-ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.04.bb b/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.04.bb
new file mode 100644
index 0000000..65df0aa
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/man-pages/man-pages_4.04.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Linux man-pages"
+DESCRIPTION = "The Linux man-pages project documents the Linux kernel and C library interfaces that are employed by user programs"
+SECTION = "console/utils"
+HOMEPAGE = "http://www.kernel.org/pub/linux/docs/man-pages"
+LICENSE = "GPLv2+"
+
+LIC_FILES_CHKSUM = "file://README;md5=8f2a3d43057d458e5066714980567a60"
+SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/Archive/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "901cd52e0ee2a9d7508ae1ab15d5e835"
+SRC_URI[sha256sum] = "bff072462baea8d1b8e4568759324c5ed6c760716fe830bca71129cc09e00668"
+
+RDEPENDS_${PN} = "man"
+
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+
+do_install() {
+        oe_runmake install DESTDIR=${D}
+}
+
+# Only deliveres man-pages so FILES_${PN} gets everything
+FILES_${PN}-doc = ""
+FILES_${PN} = "${mandir}/*"
+
+inherit update-alternatives
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "passwd.5 getspnam.3"
+ALTERNATIVE_LINK_NAME[passwd.5] = "${mandir}/man5/passwd.5"
+ALTERNATIVE_LINK_NAME[getspnam.3] = "${mandir}/man3/getspnam.3"
diff --git a/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch b/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch
deleted file mode 100644
index fe66d759..0000000
--- a/yocto-poky/meta/recipes-extended/man/man/man-1.5m2-tv_fhs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-Upstream-Status: Pending
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
---- man/Makefile.in	2008-12-21 19:19:33.000000000 +0100
-+++ man/Makefile.in.oden	2008-12-21 19:19:39.000000000 +0100
-@@ -34,6 +34,15 @@
- 	for i in $(MAN8); \
- 		do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/man8/$$i.@man8ext@; fi; done
- 
-+install-l10n: $(ALL)
-+	mkdir -p $(mandir)/$(SLANG)/man1 $(mandir)/$(SLANG)/man5 $(mandir)/$(SLANG)/man8
-+	for i in $(MAN1); \
-+		do $(INSTALL) $$i.1 $(mandir)/$(SLANG)/man1/$$i.@man1ext@; done
-+	for i in $(MAN5); \
-+		do $(INSTALL) $$i.5 $(mandir)/$(SLANG)/man5/$$i.@man5ext@; done
-+	for i in $(MAN8); \
-+		do if test -f $$i.8; then $(INSTALL) $$i.8 $(mandir)/$(SLANG)/man8/$$i.@man8ext@; fi; done
-+
- clean:
- 	rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
- 
-@@ -49,7 +58,7 @@
- 	@for i in @languages@; do if test -d $$i; then echo; \
- 		echo "==== Installing the `cat $$i.txt` man pages. ===="; \
- 		cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
--		export SLANG; make -f ../Makefile install; cd ..; \
-+		export SLANG; make -f ../Makefile install-l10n; cd ..; \
- 		else echo "==== No $$i man pages found. ===="; fi; done
- 
- cleansubdirs:
diff --git a/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch
new file mode 100644
index 0000000..4631d2d
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-compile-warnings.patch
@@ -0,0 +1,105 @@
+Fix a build error when building man.config.5 (a remnant of a long
+ago previous patch). Optimized the manpages Makefile for parallel
+builds. Also, fix compile warnings in a couple other files.
+
+Upstream-Status: Pending
+
+Signed-off-by: Bill Randle <william.c.randle@intel.com>
+
+--- man-1.6g/man/Makefile.in.orig	2016-03-28 17:31:08.723949180 -0700
++++ man-1.6g/man/Makefile.in	2016-03-28 17:46:12.866910386 -0700
+@@ -5,6 +5,13 @@
+ ALL = man.1 whatis.1 apropos.1 man.config.5
+ MAYBE8 = makewhatis
+ 
++SUBDIRS := $(shell echo @languages@)
++
++.PHONY: subdirs $(SUBDIRS)
++
++man.config.man: man.conf.man
++	@cp $< $@
++
+ .SUFFIXES: .man .1 .5 .8
+ 
+ .man.1:
+@@ -19,11 +26,11 @@
+ INSTALL = @INSTALL@ -c -m 644
+ 
+ # Where to put the manual pages.
+-mandir = $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
++mandir := $(DESTDIR)$(PREFIX)@mandir@$(SLANG)
+ 
+ all:	$(ALL)
+ 	for i in $(MAYBE8); \
+-		do if test -f $$i.man; then make -f ../Makefile $$i.8; fi; done
++		do if test -f $$i.man; then $(MAKE) -f ../Makefile $$i.8; fi; done
+ 
+ install: $(ALL)
+ 	mkdir -p $(mandir)/man1 $(mandir)/man5 $(mandir)/man8
+@@ -38,24 +45,27 @@
+ 	rm -f core *.in *.@man1ext@ *.@man5ext@ *.@man8ext@ *~
+ 
+ spotless:
++	rm -f man.config.man
+ 
+ subdirs:
+-	@for i in @languages@; do if test -d $$i; then echo; \
+-		echo "==== Making the `cat $$i.txt` man pages. ===="; \
+-		cd $$i; make -f ../Makefile; cd ..; \
+-		else echo "==== No $$i man pages found. ===="; fi; done
++subdirs: $(SUBDIRS)
++$(SUBDIRS):
++	if test -d $@; then echo; \
++		echo "==== Making the `cat $@.txt` man pages. ===="; \
++		$(MAKE) -C $@ -f ../Makefile all; \
++		else echo "==== No $@ man pages found. ===="; fi
+ 
+ installsubdirs:
+ 	@for i in @languages@; do if test -d $$i; then echo; \
+ 		echo "==== Installing the `cat $$i.txt` man pages. ===="; \
+ 		cd $$i; SLANG=/$$i; if test $$SLANG = /en; then SLANG= ; fi; \
+-		export SLANG; make -f ../Makefile install; cd ..; \
++		export SLANG; $(MAKE) -f ../Makefile install; cd ..; \
+ 		else echo "==== No $$i man pages found. ===="; fi; done
+ 
+ cleansubdirs:
+-	@for i in ??; do cd $$i; make -f ../Makefile clean; cd ..; done
++	@for i in ??; do $(MAKE) -C $$i -f ../Makefile clean; done
+ 	rm -f core *~
+ 
+ spotlesssubdirs:
+-	for i in ??; do cd $$i; make -f ../Makefile spotless; cd ..; done
++	for i in ??; do $(MAKE) -C $$i -f ../Makefile spotless; done
+ 	rm -f Makefile
+
+--- man-1.6g/src/gripes.c.orig	2006-11-21 11:53:44.000000000 -0800
++++ man-1.6g/src/gripes.c	2016-03-30 16:32:31.601103487 -0700
+@@ -7,8 +7,6 @@
+ 
+ extern char *msg[];
+ 
+-static char *mantexts = "man";		/* e.g. /usr/lib/locale/%L/man.cat */
+-
+ #ifdef NONLS
+ 
+ static char *
+@@ -30,6 +28,8 @@
+ #include <nl_types.h>
+ #include "../catopen/catopen.c"
+ 
++static char *mantexts = "man";		/* e.g. /usr/lib/locale/%L/man.cat */
++
+ nl_catd catfd = (nl_catd) -1;
+ int cat_is_open = 0;
+ 
+--- man-1.6g/src/manfile.c.orig	2005-08-20 16:26:06.000000000 -0700
++++ man-1.6g/src/manfile.c	2016-03-29 09:10:21.527841285 -0700
+@@ -299,7 +299,7 @@
+ 	const char *((*tocat)(const char *man_filename, const char *ext,
+ 			      int flags))) {
+      char **sl;
+-     struct manpage *res;
++     struct manpage *res = 0;
+ 
+      standards = (flags & (FHS | FSSTND | DO_HP | DO_IRIX));
+      to_cat_filename = tocat;
diff --git a/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch
new file mode 100644
index 0000000..106cc98
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-configure.patch
@@ -0,0 +1,68 @@
+Use BUILD_CC and target include files for configuration tests.
+If cross-compiling, force pathnames for helper programs, since
+autodiscovery by the configure script will not work.
+
+Upstream-Status: Pending
+
+Signed-off-by: Bill Randle <william.c.randle at intel.com>
+
+--- man-1.6g/configure.orig	2016-03-28 17:46:12.734910976 -0700
++++ man-1.6g/configure	2016-03-30 21:47:45.110572908 -0700
+@@ -216,7 +216,8 @@
+ INCLUDEDIR=${INCLUDEDIR-/usr/include}
+ 
+ rm -f conftest conftest.c
+-compile="$CC $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
++# since we are interested in target feature support, use that sysroot
++compile="$BUILD_CC -isystem/${PKG_CONFIG_SYSROOT_DIR}/usr/include $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1"
+ 
+ # Check for various header files.
+ 
+@@ -455,19 +456,23 @@
+       fi
+     done
+   done
+-  Fgroff=/usr/bin/groff
+-  Fnroff=/usr/bin/nroff
+-  Fjnroff=/usr/bin/nroff
+-  Fgeqn=/usr/bin/geqn
+-  Fgtbl=/usr/bin/gtbl
+-  Fcol=/usr/bin/col
+-  Fgrefer=/usr/bin/grefer
+-  Fgpic=/usr/bin/gpic
+-  Fmore=/bin/more
+-  Fless=/usr/bin/less
+-  Fcmp=/usr/bin/cmp
+-  Fcat=/bin/cat
+-  Fgawk=/bin/gawk
++  if [ $BUILD_CC != $CC ]; then
++    # cross compiling => target fs not available, so force defaults
++    Fgroff=/usr/bin/groff
++    Fnroff=/usr/bin/nroff
++    Fjnroff=/usr/bin/nroff
++    Fgeqn=/usr/bin/eqn
++    Fgneqn=/usr/bin/neqn
++    Fgtbl=/usr/bin/tbl
++    Fcol=/usr/bin/col
++    Fgrefer=/usr/bin/refer
++    Fgpic=/usr/bin/pic
++    Fmore=/bin/more
++    Fless=/usr/bin/less
++    Fcmp=/usr/bin/cmp
++    Fcat=/bin/cat
++    Fgawk=/usr/bin/gawk
++  fi
+ 
+ 
+   for i in eqn tbl refer pic
+@@ -507,8 +512,8 @@
+     jnroff="$Fjnroff -Tutf8 -mandocj"
+   fi
+   eqn="$Fgeqn -Tps"
+-  neqn="$Fgeqn -Tutf8"
+-  jneqn="$Fgeqn -Tutf8"
++  neqn="$Fgneqn -Tutf8"
++  jneqn="$Fgneqn -Tutf8"
+   tbl="$Fgtbl"
+   col="$Fcol"
+   vgrind="$Fvgrind"
diff --git a/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch
new file mode 100644
index 0000000..72a88b8
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/man/man/man-1.6g-parallel.patch
@@ -0,0 +1,30 @@
+The Makefile for man has a rule to create two generated targets with
+a program run from the shell. Because the rule was run twice, with
+parallel make, the generated files were being overwritten at the same
+time they were being compiled. This patch forces the rule to be run
+only once.
+
+Upstream-Status: Pending
+
+Signed-off-by: Bill Randle <william.c.randle at intel.com>
+
+--- man-1.6g/src/Makefile.in.orig	2010-12-31 12:28:46.000000000 -0800
++++ man-1.6g/src/Makefile.in	2016-03-28 09:09:16.845458798 -0700
+@@ -43,8 +43,10 @@
+ makemsg:
+ 	$(BUILD_CC) -o makemsg makemsg.c
+ 
+-msg.c gripedefs.h: ../msgs/mess.en makemsg
++msg.c gripedefs.h: genfiles-stamp
++genfiles-stamp: ../msgs/mess.en makemsg
+ 	./makemsg ../msgs/mess.en gripedefs.h msg.c
++	touch genfiles-stamp
+ 
+ # glob.c does not have prototypes
+ glob.o: glob.c ndir.h
+@@ -117,4 +119,4 @@
+ 
+ spotless: clean
+ 	rm -f Makefile config.status paths.h version.h man.conf
+-	rm -f gripedefs.h msg.c mess.*.cat
++	rm -f gripedefs.h msg.c mess.*.cat genfiles-stamp
diff --git a/yocto-poky/meta/recipes-extended/man/man_1.6g.bb b/yocto-poky/meta/recipes-extended/man/man_1.6g.bb
index fa4736b..e78aa18 100644
--- a/yocto-poky/meta/recipes-extended/man/man_1.6g.bb
+++ b/yocto-poky/meta/recipes-extended/man/man_1.6g.bb
@@ -39,7 +39,6 @@
            file://man-1.5i2-initial.patch \
            file://man-1.5h1-gencat.patch;striplevel=0 \
            file://man-1.5g-nonrootbuild.patch \
-           file://man-1.5m2-tv_fhs.patch;striplevel=0 \
            file://man-1.5j-i18n.patch \
            file://man-1.6e-whatis2.patch \
            file://man-1.6e-use_i18n_vars_in_a_std_way.patch \
@@ -53,6 +52,9 @@
            file://manpath.5.gz;unpack=false \
            file://man-1.6g-whatis3.patch \
            file://configure_sed.patch \
+           file://man-1.6g-parallel.patch \
+           file://man-1.6g-compile-warnings.patch \
+           file://man-1.6g-configure.patch \
 "
 
 SRC_URI[md5sum] = "ba154d5796928b841c9c69f0ae376660"
diff --git a/yocto-poky/meta/recipes-extended/mc/mc_4.7.5.2.bb b/yocto-poky/meta/recipes-extended/mc/mc_4.7.5.2.bb
index b47eb02..b38964d 100644
--- a/yocto-poky/meta/recipes-extended/mc/mc_4.7.5.2.bb
+++ b/yocto-poky/meta/recipes-extended/mc/mc_4.7.5.2.bb
@@ -19,8 +19,6 @@
 
 EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x --without-samba"
 
-FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
-
 do_install_append () {
 	sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
 	sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
diff --git a/yocto-poky/meta/recipes-extended/mc/mc_4.8.14.bb b/yocto-poky/meta/recipes-extended/mc/mc_4.8.14.bb
deleted file mode 100644
index 3b6c2ff..0000000
--- a/yocto-poky/meta/recipes-extended/mc/mc_4.8.14.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Midnight Commander is an ncurses based file manager"
-HOMEPAGE = "http://www.midnight-commander.org/"
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
-SECTION = "console/utils"
-DEPENDS = "ncurses glib-2.0 util-linux"
-RDEPENDS_${PN} = "ncurses-terminfo"
-
-SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
-           "
-
-SRC_URI[md5sum] = "fe1cb75643c2bd4df64bbcf2dab76905"
-SRC_URI[sha256sum] = "61fd0fd2280c3d09d7e0aec8ab001fc89dad8e4fd9941f386414667b55152ec5"
-
-inherit autotools gettext pkgconfig
-
-#
-# Both Samba (smb) and sftp require package delivered from meta-openembedded
-#
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
-PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
-
-EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x"
-
-FILES_${PN}-dbg += "${libexecdir}/mc/.debug/"
-
-do_install_append () {
-	sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
-	sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
-}
-
-PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
-
-SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
-FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
-                             ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
-                             ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
-                             ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ 
-                             ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ 
-                             ${libexecdir}/mc/extfs.d/uzip"
-RDEPENDS_${BPN}-helpers-perl = "perl"
-
-SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts"
-FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
-RDEPENDS_${BPN}-helpers-python = "python"
-
-SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
-FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
-
-SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
-FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/yocto-poky/meta/recipes-extended/mc/mc_4.8.15.bb b/yocto-poky/meta/recipes-extended/mc/mc_4.8.15.bb
new file mode 100644
index 0000000..6c3a16a
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mc/mc_4.8.15.bb
@@ -0,0 +1,49 @@
+SUMMARY = "Midnight Commander is an ncurses based file manager"
+HOMEPAGE = "http://www.midnight-commander.org/"
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=270bbafe360e73f9840bd7981621f9c2"
+SECTION = "console/utils"
+DEPENDS = "ncurses glib-2.0 util-linux"
+RDEPENDS_${PN} = "ncurses-terminfo"
+
+SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
+           "
+SRC_URI[md5sum] = "db48ce26ba425a61edc51930e94227fd"
+SRC_URI[sha256sum] = "f74e3da70410975cdeb27ee9a66d1dd812250b6d3ede364bca728dd5a48e5471"
+
+inherit autotools gettext pkgconfig
+
+#
+# Both Samba (smb) and sftp require package delivered from meta-openembedded
+#
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[smb] = "--enable-vfs-smb,--disable-vfs-smb,samba,"
+PACKAGECONFIG[sftp] = "--enable-vfs-sftp,--disable-vfs-sftp,libssh2,"
+
+EXTRA_OECONF = "--with-screen=ncurses --without-gpm-mouse --without-x"
+
+do_install_append () {
+	sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${libexecdir}/mc/extfs.d/*
+	sed -i -e '1s,#!.*python,#!${bindir}/env python,' ${D}${libexecdir}/mc/extfs.d/*
+}
+
+PACKAGES =+ "${BPN}-helpers-perl ${BPN}-helpers-python ${BPN}-helpers ${BPN}-fish"
+
+SUMMARY_${BPN}-helpers-perl = "Midnight Commander Perl-based helper scripts"
+FILES_${BPN}-helpers-perl = "${libexecdir}/mc/extfs.d/a+ ${libexecdir}/mc/extfs.d/apt+ \
+                             ${libexecdir}/mc/extfs.d/deb ${libexecdir}/mc/extfs.d/deba \
+                             ${libexecdir}/mc/extfs.d/debd ${libexecdir}/mc/extfs.d/dpkg+ \
+                             ${libexecdir}/mc/extfs.d/mailfs ${libexecdir}/mc/extfs.d/patchfs \ 
+                             ${libexecdir}/mc/extfs.d/rpms+ ${libexecdir}/mc/extfs.d/ulib \ 
+                             ${libexecdir}/mc/extfs.d/uzip"
+RDEPENDS_${BPN}-helpers-perl = "perl"
+
+SUMMARY_${BPN}-helpers-python = "Midnight Commander Python-based helper scripts"
+FILES_${BPN}-helpers-python = "${libexecdir}/mc/extfs.d/s3+ ${libexecdir}/mc/extfs.d/uc1541"
+RDEPENDS_${BPN}-helpers-python = "python"
+
+SUMMARY_${BPN}-helpers = "Midnight Commander shell helper scripts"
+FILES_${BPN}-helpers = "${libexecdir}/mc/extfs.d/* ${libexecdir}/mc/ext.d/*"
+
+SUMMARY_${BPN}-fish = "Midnight Commander Fish scripts"
+FILES_${BPN}-fish = "${libexecdir}/mc/fish"
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch b/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
new file mode 100644
index 0000000..ee482b5
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-some-type-comparison-problems.patch
@@ -0,0 +1,50 @@
+From 835baf02fd42012bbc0603dffb1f80c6ecf0fb9e Mon Sep 17 00:00:00 2001
+From: Xiao Ni <xni@redhat.com>
+Date: Mon, 8 Feb 2016 11:18:52 +0200
+Subject: [PATCH] Fix some type comparison problems
+
+As 26714713cd2bad9e0bf7f4669f6cc4659ceaab6c said, 32 bit signed
+timestamps will overflow in the year 2038. It already changed the
+utime and ctime in struct mdu_array_info_s from int to unsigned
+int. So we need to change the values that compared with them to
+unsigned int too.
+
+Upstream-Status: Backport
+
+Signed-off-by : Xiao Ni <xni@redhat.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+
+ Monitor.c | 2 +-
+ util.c    | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Monitor.c b/Monitor.c
+index f19c2e5..6df80f9 100644
+--- a/Monitor.c
++++ b/Monitor.c
+@@ -33,7 +33,7 @@
+ struct state {
+ 	char *devname;
+ 	char devnm[32];	/* to sync with mdstat info */
+-	long utime;
++	unsigned int utime;
+ 	int err;
+ 	char *spare_group;
+ 	int active, working, failed, spare, raid;
+diff --git a/util.c b/util.c
+index 3e6d293..96a806d 100644
+--- a/util.c
++++ b/util.c
+@@ -1267,7 +1267,7 @@ struct supertype *guess_super_type(int fd, enum guess_types guess_type)
+ 	 */
+ 	struct superswitch  *ss;
+ 	struct supertype *st;
+-	time_t besttime = 0;
++	unsigned int besttime = 0;
+ 	int bestsuper = -1;
+ 	int i;
+ 
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch b/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
new file mode 100644
index 0000000..deb7486
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch
@@ -0,0 +1,33 @@
+From 1f5baf3ad95ae4c39efe4d8ad8b2e642b3a351da Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Tue, 9 Feb 2016 11:44:01 +0200
+Subject: [PATCH] Fix the path of corosync and dlm header files check
+
+Original Makefile will check headers on host instead of sysroot.
+Fix it.
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index fd79cfb..34150a9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -80,8 +80,8 @@ MDMON_DIR = $(RUN_DIR)
+ FAILED_SLOTS_DIR = $(RUN_DIR)/failed-slots
+ SYSTEMD_DIR=/lib/systemd/system
+ 
+-COROSYNC:=$(shell [ -d /usr/include/corosync ] || echo -DNO_COROSYNC)
+-DLM:=$(shell [ -f /usr/include/libdlm.h ] || echo -DNO_DLM)
++COROSYNC:=$(shell [ -d $(SYSROOT)/usr/include/corosync ] || echo -DNO_COROSYNC)
++DLM:=$(shell [ -f $(SYSROOT)/usr/include/libdlm.h ] || echo -DNO_DLM)
+ 
+ DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\"
+ DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\"
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch b/yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
new file mode 100644
index 0000000..1395473
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch
@@ -0,0 +1,55 @@
+From cf14a9987ea1040457ce53bc2ab7d096818cb780 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Fri, 5 Feb 2016 18:06:32 +0200
+Subject: [PATCH] mdadm.h: bswap is already defined in uclibc
+
+Fixes this build error:
+
+| In file included from mdadm.c:28:0:
+| mdadm.h:142:0: error: "bswap_16" redefined [-Werror]
+|  #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
+|  ^
+
+Upstream-Status: Submitted
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ mdadm.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/mdadm.h b/mdadm.h
+index dd02be7..230e60f 100755
+--- a/mdadm.h
++++ b/mdadm.h
+@@ -139,12 +139,20 @@ struct dlm_lksb {
+  * and there is no standard conversion function so... */
+ /* And dietlibc doesn't think byteswap is ok, so.. */
+ /*  #include <byteswap.h> */
++
++#ifndef bswap_16
+ #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
+ 		     ((x) & 0xff00U) >> 8)
++#endif
++
++#ifndef bswap_32
+ #define bswap_32(x) (((x) & 0x000000ffU) << 24 | \
+ 		     ((x) & 0xff000000U) >> 24 | \
+ 		     ((x) & 0x0000ff00U) << 8  | \
+ 		     ((x) & 0x00ff0000U) >> 8)
++#endif
++
++#ifndef bswap_64
+ #define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \
+ 		     ((x) & 0xff00000000000000ULL) >> 56 | \
+ 		     ((x) & 0x000000000000ff00ULL) << 40 | \
+@@ -153,6 +161,7 @@ struct dlm_lksb {
+ 		     ((x) & 0x0000ff0000000000ULL) >> 24 | \
+ 		     ((x) & 0x00000000ff000000ULL) << 8 | \
+ 		     ((x) & 0x000000ff00000000ULL) >> 8)
++#endif
+ 
+ #if !defined(__KLIBC__)
+ #if BYTE_ORDER == LITTLE_ENDIAN
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch b/yocto-poky/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch
new file mode 100644
index 0000000..d5cf003
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/0001-util.c-include-poll.h-instead-of-sys-poll.h.patch
@@ -0,0 +1,45 @@
+From 2645673a7ea948a1297d5b8f0daab29b898f044f Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Fri, 5 Feb 2016 17:14:04 +0200
+Subject: [PATCH] util.c: include poll.h instead of sys/poll.h
+
+This fixes a compile warning when building with musl:
+
+ In file included from util.c:27:0:
+ |
+ qemux86-64/usr/include/sys/poll.h:1:2:
+ error: #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+ [-Werror=cpp]
+ |  #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
+ |   ^
+
+Upstream-Status: Accepted
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ util.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/util.c b/util.c
+index 970d484..3e6d293 100644
+--- a/util.c
++++ b/util.c
+@@ -24,7 +24,6 @@
+ 
+ #include	"mdadm.h"
+ #include	"md_p.h"
+-#include	<sys/poll.h>
+ #include	<sys/socket.h>
+ #include	<sys/utsname.h>
+ #include	<sys/wait.h>
+@@ -32,6 +31,7 @@
+ #include	<sys/resource.h>
+ #include	<sys/vfs.h>
+ #include	<linux/magic.h>
++#include	<poll.h>
+ #include	<ctype.h>
+ #include	<dirent.h>
+ #include	<signal.h>
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch b/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
index 3b3db0a..40acc14 100644
--- a/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-3.2.2_fix_for_x32.patch
@@ -1,4 +1,4 @@
-Upstream-Status: pending
+Upstream-Status: Accepted
 
 By hardcoding CC's definition in the Makefile, all the gcc parameters 
 set by tune settings are lost. Causing compile failure with x32 toolchain
diff --git a/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch b/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
new file mode 100644
index 0000000..267c007
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
@@ -0,0 +1,45 @@
+From c65898b9da82df94e1bae7937e415a7eb80355d5 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" <maxin.john@intel.com>
+Date: Wed, 10 Feb 2016 17:28:05 +0200
+Subject: [PATCH] mdadm-fix-ptest-build-errors
+
+builds fail with ptest enabled:
+
+| restripe.c: In function 'test_stripes':
+| restripe.c:845:4: error: ignoring return value of 'read', declared with
+| attribute warn_unused_result [-Werror=unused-result]
+|     read(source[i], stripes[i], chunk_size);
+|     ^
+| cc1: all warnings being treated as errors
+| Makefile:214: recipe for target 'test_stripe' failed
+
+Upstream-Status: Pending
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ restripe.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/restripe.c b/restripe.c
+index 56dca73..d24b2b4 100644
+--- a/restripe.c
++++ b/restripe.c
+@@ -842,10 +842,14 @@ int test_stripes(int *source, unsigned long long *offsets,
+ 
+ 	while (length > 0) {
+ 		int disk;
++        ssize_t ret;
+ 
+ 		for (i = 0 ; i < raid_disks ; i++) {
+ 			lseek64(source[i], offsets[i]+start, 0);
+-			read(source[i], stripes[i], chunk_size);
++			ret = read(source[i], stripes[i], chunk_size);
++            if (ret == -1) {
++			  printf("Read Failed\n");
++            }
+ 		}
+ 		for (i = 0 ; i < data_disks ; i++) {
+ 			int disk = geo_map(i, start/chunk_size, raid_disks,
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.3.4.bb b/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
deleted file mode 100644
index 1198167..0000000
--- a/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-SUMMARY = "Tool for managing software RAID under Linux"
-HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/"
-
-# Some files are GPLv2+ while others are GPLv2.
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
-                    file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
-
-
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
-           file://mdadm-3.2.2_fix_for_x32.patch \
-           file://gcc-4.9.patch \
-           file://mdadm-3.3.2_x32_abi_time_t.patch \
-           file://0001-Fix-typo-in-comparision.patch \
-           file://run-ptest \
-	  "
-SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09"
-SRC_URI[sha256sum] = "8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68"
-
-CFLAGS += "-fno-strict-aliasing"
-
-inherit autotools-brokensep
-
-EXTRA_OEMAKE = "CHECK_RUN_DIR=0"
-# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
-# prevents 64-bit userland from seeing this definition, instead defaulting
-# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
-# int-ll64.h included
-EXTRA_OEMAKE_append_powerpc64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
-EXTRA_OEMAKE_append_mips64 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
-EXTRA_OEMAKE_append_mips64n32 = ' CFLAGS=-D__SANE_USERSPACE_TYPES__'
-
-do_compile() {
-	oe_runmake
-}
-
-do_install() {
-	export STRIP=""
-	autotools_do_install
-}
-
-FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules"
-
-inherit ptest
-
-do_compile_ptest() {
-	oe_runmake test
-}
-
-do_install_ptest() {
-	cp -a ${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
-	ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm
-	for prg in test_stripe swap_super raid6check
-	do
-		install -D -m 755 $prg ${D}${PTEST_PATH}/
-	done
-}
-RDEPENDS_${PN}-ptest += "bash"
-RRECOMMENDS_${PN}-ptest += " \
-    coreutils \
-    util-linux \
-    kernel-module-loop \
-    kernel-module-linear \
-    kernel-module-raid0 \
-    kernel-module-raid1 \
-    kernel-module-raid10 \
-    kernel-module-raid456 \
-"
diff --git a/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb b/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb
new file mode 100644
index 0000000..142dfdd
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/mdadm/mdadm_3.4.bb
@@ -0,0 +1,75 @@
+SUMMARY = "Tool for managing software RAID under Linux"
+HOMEPAGE = "http://www.kernel.org/pub/linux/utils/raid/mdadm/"
+
+# Some files are GPLv2+ while others are GPLv2.
+LICENSE = "GPLv2 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
+                    file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
+
+
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
+           file://mdadm-3.2.2_fix_for_x32.patch \
+           file://gcc-4.9.patch \
+           file://mdadm-3.3.2_x32_abi_time_t.patch \
+           file://0001-Fix-typo-in-comparision.patch \
+           file://mdadm-fix-ptest-build-errors.patch \
+           file://0001-util.c-include-poll.h-instead-of-sys-poll.h.patch \
+           file://0001-mdadm.h-bswap-is-already-defined-in-uclibc.patch \
+           file://0001-Fix-some-type-comparison-problems.patch \
+           file://0001-Fix-the-path-of-corosync-and-dlm-header-files-check.patch \
+           file://run-ptest \
+	  "
+SRC_URI[md5sum] = "04b8b21f637540350f8517c7e68d3c63"
+SRC_URI[sha256sum] = "27d0be4627d38a12ddcd1c1c3721d649d4e89e1093914497e22b57245cda8808"
+
+CFLAGS += "-fno-strict-aliasing"
+inherit autotools-brokensep
+
+EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
+# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
+# prevents 64-bit userland from seeing this definition, instead defaulting
+# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
+# int-ll64.h included
+CFLAGS_append_powerpc64 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mips64 = ' -D__SANE_USERSPACE_TYPES__'
+CFLAGS_append_mips64n32 = ' -D__SANE_USERSPACE_TYPES__'
+
+do_compile() {
+	oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
+}
+
+do_install() {
+	export STRIP=""
+	autotools_do_install
+}
+
+FILES_${PN} += "${base_libdir}/udev/rules.d/*.rules"
+
+inherit ptest
+
+do_compile_ptest() {
+	oe_runmake test
+}
+
+do_install_ptest() {
+	cp -a ${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
+	ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm
+	for prg in test_stripe swap_super raid6check
+	do
+		install -D -m 755 $prg ${D}${PTEST_PATH}/
+	done
+}
+RDEPENDS_${PN}-ptest += "bash"
+RRECOMMENDS_${PN}-ptest += " \
+    coreutils \
+    util-linux \
+    kernel-module-loop \
+    kernel-module-linear \
+    kernel-module-raid0 \
+    kernel-module-raid1 \
+    kernel-module-raid10 \
+    kernel-module-raid456 \
+"
diff --git a/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.bb b/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.bb
index 1575cfb..3118686 100644
--- a/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.bb
+++ b/yocto-poky/meta/recipes-extended/minicom/minicom_2.7.bb
@@ -15,6 +15,8 @@
 SRC_URI[md5sum] = "7044ca3e291268c33294f171d426dc2d"
 SRC_URI[sha256sum] = "9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4"
 
+UPSTREAM_CHECK_URI = "https://alioth.debian.org/frs/?group_id=30018"
+
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[lockdev] = "--enable-lockdev,--disable-lockdev,lockdev"
 
diff --git a/yocto-poky/meta/recipes-extended/mktemp/mktemp_1.7.bb b/yocto-poky/meta/recipes-extended/mktemp/mktemp_1.7.bb
index fe238ee..9accc6e 100644
--- a/yocto-poky/meta/recipes-extended/mktemp/mktemp_1.7.bb
+++ b/yocto-poky/meta/recipes-extended/mktemp/mktemp_1.7.bb
@@ -27,7 +27,7 @@
 
 ALTERNATIVE_${PN} = "mktemp"
 ALTERNATIVE_LINK_NAME[mktemp] = "${base_bindir}/mktemp"
-ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_PRIORITY = "60"
 
 ALTERNATIVE_${PN}-doc = "mktemp.1"
 ALTERNATIVE_PRIORITY_${PN}-doc = "300"
diff --git a/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.2.bb b/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.2.bb
deleted file mode 100644
index f9bf563..0000000
--- a/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.2.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "msmtp is an SMTP client"
-DESCRIPTION = "A sendmail replacement for use in MTAs like mutt"
-HOMEPAGE = "http://msmtp.sourceforge.net/"
-SECTION = "console/network"
-
-LICENSE = "GPLv3"
-DEPENDS = "zlib gnutls"
-
-#COPYING or Licence
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
-          "
-
-SRC_URI[md5sum] = "3baca93c7e5f1aa9d36a2e5b38739ab9"
-SRC_URI[sha256sum] = "2f6ecd7cbfadf548fd55205bd24cb63b84bcbb1185efed917dd7800595a48789"
-
-inherit gettext autotools update-alternatives pkgconfig
-
-EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
-
-ALTERNATIVE_${PN} = "sendmail"
-ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
-ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/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/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.3.bb b/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.3.bb
new file mode 100644
index 0000000..6dbd78f
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/msmtp/msmtp_1.6.3.bb
@@ -0,0 +1,30 @@
+SUMMARY = "msmtp is an SMTP client"
+DESCRIPTION = "A sendmail replacement for use in MTAs like mutt"
+HOMEPAGE = "http://msmtp.sourceforge.net/"
+SECTION = "console/network"
+
+LICENSE = "GPLv3"
+DEPENDS = "zlib gnutls"
+
+#COPYING or Licence
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+SRC_URI = "http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
+          "
+
+SRC_URI[md5sum] = "6d9384c09405db9476beaa2237c56705"
+SRC_URI[sha256sum] = "f982be069c0772c3ee83925f552f5dac5fb307d2d1c68202f9926bb13b757355"
+
+inherit gettext autotools update-alternatives pkgconfig
+
+EXTRA_OECONF += "--without-libsecret --without-libgsasl --without-libidn"
+
+ALTERNATIVE_${PN} = "sendmail"
+ALTERNATIVE_TARGET[sendmail] = "${bindir}/msmtp"
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/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/yocto-poky/meta/recipes-extended/net-tools/net-tools/musl-fixes.patch b/yocto-poky/meta/recipes-extended/net-tools/net-tools/musl-fixes.patch
new file mode 100644
index 0000000..f694d59
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/net-tools/net-tools/musl-fixes.patch
@@ -0,0 +1,100 @@
+Adjust headers for non-glibc cases
+especially exposed by musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: net-tools-1.60/lib/inet6_gr.c
+===================================================================
+--- net-tools-1.60.orig/lib/inet6_gr.c
++++ net-tools-1.60/lib/inet6_gr.c
+@@ -23,7 +23,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
+-#ifndef __GLIBC__
++#ifdef HAVE_IPV6_ROUTE_H
+ #include <netinet6/ipv6_route.h>	/* glibc doesn't have this */
+ #endif
+ #include "version.h"
+Index: net-tools-1.60/lib/inet6_sr.c
+===================================================================
+--- net-tools-1.60.orig/lib/inet6_sr.c
++++ net-tools-1.60/lib/inet6_sr.c
+@@ -23,10 +23,10 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
+-#ifdef __GLIBC__
+-#include <net/route.h>
+-#else
++#ifdef HAVE_IPV6_ROUTE_H
+ #include <netinet6/ipv6_route.h>	/* glibc does not have this */
++#else
++#include <net/route.h>
+ #endif
+ #include "version.h"
+ #include "net-support.h"
+Index: net-tools-1.60/lib/inet_sr.c
+===================================================================
+--- net-tools-1.60.orig/lib/inet_sr.c
++++ net-tools-1.60/lib/inet_sr.c
+@@ -26,6 +26,7 @@
+ #include <string.h>
+ #include <stdio.h>
+ #include <unistd.h>
++#include <asm-generic/param.h>
+ #include "version.h"
+ #include "net-support.h"
+ #include "pathnames.h"
+Index: net-tools-1.60/lib/util-ank.c
+===================================================================
+--- net-tools-1.60.orig/lib/util-ank.c
++++ net-tools-1.60/lib/util-ank.c
+@@ -14,6 +14,7 @@
+  * Rani Assaf <rani@magic.metawire.com> 980929:	resolve addresses
+  */
+ 
++#include <limits.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+Index: net-tools-1.60/mii-tool.c
+===================================================================
+--- net-tools-1.60.orig/mii-tool.c
++++ net-tools-1.60/mii-tool.c
+@@ -47,10 +47,6 @@ static char Version[] = "$Id: mii-tool.c
+ #include <net/if.h>
+ #include <linux/sockios.h>
+ 
+-#ifndef __GLIBC__
+-#include <linux/if_arp.h>
+-#include <linux/if_ether.h>
+-#endif
+ #include "mii.h"
+ #include "version.h"
+ 
+Index: net-tools-1.60/netstat.c
+===================================================================
+--- net-tools-1.60.orig/netstat.c
++++ net-tools-1.60/netstat.c
+@@ -87,6 +87,7 @@
+ #include <dirent.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <asm-generic/param.h>
+ 
+ #include "net-support.h"
+ #include "pathnames.h"
+Index: net-tools-1.60/slattach.c
+===================================================================
+--- net-tools-1.60.orig/slattach.c
++++ net-tools-1.60/slattach.c
+@@ -44,6 +44,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <getopt.h>
++#include <termios.h>
+ #include <linux/if_slip.h>
+ 
+ #if defined(__GLIBC__)
diff --git a/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
new file mode 100644
index 0000000..12eed17
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp1.patch
@@ -0,0 +1,638 @@
+From 23276afe270009420cfbc52bffafdd25ac0817fe Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 14 Jan 2016 17:01:29 +0800
+Subject: [PATCH 1/3] net-tools: add SCTP support for netstat
+
+Upstream-Status: pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ netstat.c    | 411 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
+ statistics.c |  68 +++++++++-
+ 2 files changed, 465 insertions(+), 14 deletions(-)
+
+diff --git a/netstat.c b/netstat.c
+index 1fb9e0c..5d1a4a1 100644
+--- a/netstat.c
++++ b/netstat.c
+@@ -58,6 +58,7 @@
+  *
+  *990420 {1.38} Tuan Hoang              removed a useless assignment from igmp_do_one()
+  *20010404 {1.39} Arnaldo Carvalho de Melo - use setlocale
++ *20050516 {1.40} Ivan Skytte Joergensen:Added SCTP support
+  *
+  *              This program is free software; you can redistribute it
+  *              and/or  modify it under  the terms of  the GNU General
+@@ -105,7 +106,7 @@
+ #endif
+ 
+ /* prototypes for statistics.c */
+-void parsesnmp(int, int, int);
++void parsesnmp(int, int, int, int);
+ void inittab(void);
+ void parsesnmp6(int, int, int);
+ void inittab6(void);
+@@ -118,6 +119,28 @@ typedef enum {
+     SS_DISCONNECTING		/* in process of disconnecting  */
+ } socket_state;
+ 
++#define SCTP_NSTATES  9         /* The number of states in array*/
++
++static const char *sctp_state[] = {
++    N_("EMPTY"),
++    N_("CLOSED"),
++    N_("COOKIE_WAIT"),
++    N_("COOKIE_ECHOED"),
++    N_("ESTABLISHED"),
++    N_("SHUTDOWN_PENDING"),
++    N_("SHUTDOWN_SENT"),
++    N_("SHUTDOWN_RECEIVED"),
++    N_("SHUTDOWN_ACK_SENT")
++};
++
++#define SCTP_NTYPES 3           /* The number of types in array */
++
++static const char *sctp_type[] = {
++    N_("udp"),
++    N_("udp-high-bw"),
++    N_("tcp")
++};
++
+ #define SO_ACCEPTCON    (1<<16)	/* performed a listen           */
+ #define SO_WAITDATA     (1<<17)	/* wait data to read            */
+ #define SO_NOSPACE      (1<<18)	/* no space to write            */
+@@ -148,6 +171,7 @@ int flag_opt = 0;
+ int flag_raw = 0;
+ int flag_tcp = 0;
+ int flag_udp = 0;
++int flag_sctp= 0;
+ int flag_igmp= 0;
+ int flag_rom = 0;
+ int flag_exp = 1;
+@@ -990,6 +1014,365 @@ static int udp_info(void)
+ 	       udp_do_one);
+ }
+ 
++static const char *sctp_socket_type_str(int type) {
++    if(type>=0 && type<SCTP_NTYPES)
++	return sctp_type[type];
++    else {
++	static char type_str_buf[64];
++	sprintf(type_str_buf,"UNKNOWN(%d)",type);
++	return type_str_buf;
++    }
++}
++
++static const char *sctp_state_str(int state)
++{
++    if(state>=0 && state<SCTP_NSTATES)
++	return sctp_state[state];
++    else {
++	static char state_str_buf[64];
++	sprintf(state_str_buf,"UNKNOWN(%d)",state);
++	return state_str_buf;
++    }
++}
++
++static const char *sctp_socket_state_str(int state)
++{
++    if(state>=0 && state<=10)
++        return tcp_state[state];
++    else {
++	static char state_str_buf[64];
++	sprintf(state_str_buf,"UNKNOWN(%d)",state);
++	return state_str_buf;
++    }
++}
++
++static struct aftype *process_sctp_addr_str(const char *addr_str, struct sockaddr *sa)
++{
++    if (strchr(addr_str,':')) {
++#if HAVE_AFINET6
++	extern struct aftype inet6_aftype;
++	/* Demangle what the kernel gives us */
++	struct in6_addr in6;
++	char addr6_str[INET6_ADDRSTRLEN];
++	unsigned u0,u1,u2,u3,u4,u5,u6,u7;
++	sscanf(addr_str, "%04X:%04X:%04X:%04X:%04X:%04X:%04X:%04X",
++	       &u0, &u1, &u2, &u3, &u4, &u5, &u6, &u7);
++	in6.s6_addr16[0] = htons(u0);
++	in6.s6_addr16[1] = htons(u1);
++	in6.s6_addr16[2] = htons(u2);
++	in6.s6_addr16[3] = htons(u3);
++	in6.s6_addr16[4] = htons(u4);
++	in6.s6_addr16[5] = htons(u5);
++	in6.s6_addr16[6] = htons(u6);
++	in6.s6_addr16[7] = htons(u7);
++
++	inet_ntop(AF_INET6, &in6, addr6_str, sizeof(addr6_str));
++	inet6_aftype.input(1, addr6_str, sa);
++	sa->sa_family = AF_INET6;
++#endif
++    } else {
++    	((struct sockaddr_in*)sa)->sin_addr.s_addr = inet_addr(addr_str);
++	sa->sa_family = AF_INET;
++    }
++    return get_afntype(sa->sa_family);
++}
++
++static void sctp_eps_do_one(int lnr, char *line)
++{
++    char buffer[1024];
++    int type, state, port;
++    int uid;
++    unsigned long inode;
++    
++    struct aftype *ap;
++#if HAVE_AFINET6
++    struct sockaddr_in6 localaddr;
++#else
++    struct sockaddr_in localaddr;
++#endif
++    const char *sty_str;
++    const char *sst_str;
++    const char *lport_str;
++    const char *uid_str;
++    const char *inode_str;
++    const char *pladdr_str;
++    char *laddrs_str;
++    
++    if(lnr == 0) {
++	/* ENDPT     SOCK   STY SST HBKT LPORT   uid inode pladdr LADDRS*/
++	return;
++    }
++    
++    strtok(line," \t\n"); /*skip ptr*/
++    strtok(0," \t\n");    /*skip ptr*/
++    sty_str = strtok(0," \t\n");
++    sst_str = strtok(0," \t\n");
++    strtok(0," \t\n"); /*skip hash bucket*/
++    lport_str=strtok(0," \t\n");
++    uid_str = strtok(0," \t\n");
++    inode_str = strtok(0," \t\n");
++    pladdr_str = strtok(0," \t\n");
++    laddrs_str=strtok(0,"\t\n");
++    
++    type = atoi(sty_str);
++    state = atoi(sst_str);
++    port = atoi(lport_str);
++    uid = atoi(uid_str);
++    inode = strtoul(inode_str,0,0);
++    
++    if(flag_sctp<=1) {
++	/* only print the primary address */
++	char local_addr[64];
++	char local_port[16];
++	
++	ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
++	if(ap)
++	    safe_strncpy(local_addr,
++	                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
++	                 sizeof(local_addr));
++	else
++	    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++	
++	snprintf(local_port, sizeof(local_port), "%s",
++	         get_sname(htons(port), "sctp",
++	                   flag_not & FLAG_NUM_PORT));
++	
++	printf("sctp                ");
++	sprintf(buffer,"%s:%s", local_addr, local_port);
++	printf("%-47s", buffer);
++    	printf(" %-12s", sctp_socket_state_str(state));
++    } else {
++    	/*print all addresses*/
++	const char *this_local_addr;
++	int first=1;
++	char local_port[16];
++	snprintf(local_port, sizeof(local_port), "%s",
++		 get_sname(htons(port), "sctp",
++			   flag_not & FLAG_NUM_PORT));
++	for(this_local_addr=strtok(laddrs_str," \t\n");
++	    this_local_addr;
++	    this_local_addr=strtok(0," \t\n"))
++	{
++	    char local_addr[64];
++	    ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++	    if(ap)
++		safe_strncpy(local_addr,
++		             ap->sprint((struct sockaddr *) &localaddr, flag_not),
++		             sizeof(local_addr));
++	    else
++		sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++
++	    if(!first) printf("\n");
++	    if(first)
++	        printf("sctp                ");
++	    else
++	        printf("                    ");
++	    sprintf(buffer,"%s:%s", local_addr, local_port);
++	    printf("%-47s", buffer);
++	    printf(" %-12s", first?sctp_socket_state_str(state):"");
++	    first = 0;
++	}
++    }
++
++    finish_this_one(uid,inode,"");
++}
++
++static void sctp_assoc_do_one(int lnr, char *line)
++{
++    char buffer[1024];
++    int type, state, state2, lport,rport;
++    int uid;
++    unsigned rxqueue,txqueue;
++    unsigned long inode;
++    
++    struct aftype *ap;
++#if HAVE_AFINET6
++    struct sockaddr_in6 localaddr,remoteaddr;
++#else
++    struct sockaddr_in localaddr,remoteaddr;
++#endif
++    const char *sty_str;
++    const char *sst_str;
++    const char *st_str;
++    const char *txqueue_str;
++    const char *rxqueue_str;
++    const char *lport_str,*rport_str;
++    const char *uid_str;
++    const char *inode_str;
++    const char *pladdr_str;
++    char *laddrs_str;
++    const char *praddr_str;
++    char *raddrs_str;
++    
++    if(lnr == 0) {
++	/* ASSOC     SOCK   STY SST ST HBKT tx_queue rx_queue uid inode LPORT RPORT pladdr praddr LADDRS <-> RADDRS*/
++	return;
++    }
++    
++    strtok(line," \t\n"); /*skip ptr*/
++    strtok(0," \t\n");    /*skip ptr*/
++    sty_str = strtok(0," \t\n");
++    sst_str = strtok(0," \t\n");
++    st_str = strtok(0," \t\n");
++    strtok(0," \t\n"); /*skip hash bucket*/
++    txqueue_str =  strtok(0," \t\n");
++    rxqueue_str =  strtok(0," \t\n");
++    uid_str = strtok(0," \t\n");
++    inode_str = strtok(0," \t\n");
++    lport_str=strtok(0," \t\n");
++    rport_str=strtok(0," \t\n");
++    pladdr_str = strtok(0," \t\n");
++    praddr_str = strtok(0," \t\n");
++    laddrs_str=strtok(0,"<->\t\n");
++    raddrs_str=strtok(0,"<->\t\n");
++
++    type = atoi(sty_str);
++    state = atoi(sst_str);
++    state2 = atoi(st_str);
++    txqueue = atoi(txqueue_str);
++    rxqueue = atoi(rxqueue_str);
++    uid = atoi(uid_str);
++    inode = strtoul(inode_str,0,0);
++    lport = atoi(lport_str);
++    rport = atoi(rport_str);
++    
++    if(flag_sctp<=1) {
++	/* only print the primary addresses */
++	char local_addr[64];
++	char local_port[16];
++	char remote_addr[64];
++	char remote_port[16];
++	
++	ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
++	if(ap)
++	    safe_strncpy(local_addr,
++	                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
++	                 sizeof(local_addr));
++	else
++	    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++	
++	snprintf(local_port, sizeof(local_port), "%s",
++	         get_sname(htons(lport), "sctp",
++	                   flag_not & FLAG_NUM_PORT));
++	
++	ap = process_sctp_addr_str(praddr_str, (struct sockaddr*)&remoteaddr);
++	if(ap)
++	    safe_strncpy(remote_addr,
++	                 ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
++	                 sizeof(remote_addr));
++	else
++	    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
++	
++	snprintf(remote_port, sizeof(remote_port), "%s",
++		 get_sname(htons(rport), "sctp",
++			   flag_not & FLAG_NUM_PORT));
++
++	printf("sctp");
++	printf("  %6u %6u ", rxqueue, txqueue);
++	sprintf(buffer,"%s:%s", local_addr, local_port);
++	printf("%-23s", buffer);
++	printf(" ");
++	sprintf(buffer,"%s:%s", remote_addr, remote_port);
++	printf("%-23s", buffer);
++    	printf(" %-12s", sctp_socket_state_str(state));
++    } else {
++    	/*print all addresses*/
++	const char *this_local_addr;
++	const char *this_remote_addr;
++	char *ss1,*ss2;
++	int first=1;
++	char local_port[16];
++	char remote_port[16];
++	snprintf(local_port, sizeof(local_port), "%s",
++	         get_sname(htons(lport), "sctp",
++	                   flag_not & FLAG_NUM_PORT));
++	snprintf(remote_port, sizeof(remote_port), "%s",
++	         get_sname(htons(rport), "sctp",
++	                   flag_not & FLAG_NUM_PORT));
++
++	this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
++	this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
++	while(this_local_addr || this_remote_addr) {
++	    char local_addr[64];
++	    char remote_addr[64];
++	    if(this_local_addr) {
++		ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++		if(ap)
++		    safe_strncpy(local_addr,
++		                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
++		                 sizeof(local_addr));
++		else
++		    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++	    }
++	    if(this_remote_addr) {
++		ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
++		if(ap)
++		    safe_strncpy(remote_addr,
++		                 ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
++		                 sizeof(remote_addr));
++		else
++		    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
++	    }
++
++	    if(!first) printf("\n");
++	    if(first)
++		printf("sctp  %6u %6u ", rxqueue, txqueue);
++	    else
++		printf("                    ");
++	    if(this_local_addr) {
++		if(first)
++		    sprintf(buffer,"%s:%s", local_addr, local_port);
++		else
++		    sprintf(buffer,"%s", local_addr);
++		printf("%-23s", buffer);
++	    } else
++	    	printf("%-23s", "");
++	    printf(" ");
++	    if(this_remote_addr) {
++		if(first)
++		    sprintf(buffer,"%s:%s", remote_addr, remote_port);
++		else
++		    sprintf(buffer,"%s", remote_addr);
++		printf("%-23s", buffer);
++	    } else
++		printf("%-23s", "");
++
++	    printf(" %-12s", first?sctp_socket_state_str(state):"");
++
++	    first = 0;
++	    this_local_addr=strtok_r(0," \t\n",&ss1);
++	    this_remote_addr=strtok_r(0," \t\n",&ss2);
++	}
++    }
++
++    finish_this_one(uid,inode,"");
++}
++
++static int sctp_info_eps(void)
++{
++#if !defined(_PATH_PROCNET_SCTP_EPS)
++#define	_PATH_PROCNET_SCTP_EPS	"/proc/net/sctp/eps"
++#endif
++    INFO_GUTS(_PATH_PROCNET_SCTP_EPS, "AF INET (sctp)",
++              sctp_eps_do_one);
++}
++
++static int sctp_info_assocs(void)
++{
++#if !defined(_PATH_PROCNET_SCTP_ASSOCS)
++#define	_PATH_PROCNET_SCTP_ASSOCS	"/proc/net/sctp/assocs"
++#endif
++    INFO_GUTS(_PATH_PROCNET_SCTP_ASSOCS, "AF INET (sctp)",
++              sctp_assoc_do_one);
++}
++
++static int sctp_info(void)
++{
++    if(flag_all)
++    	sctp_info_eps();
++    return sctp_info_assocs();
++}
++
+ static void raw_do_one(int lnr, const char *line)
+ {
+     char buffer[8192], local_addr[64], rem_addr[64];
+@@ -1549,7 +1932,7 @@ static void usage(void)
+     fprintf(stderr, _("        -F, --fib                display Forwarding Information Base (default)\n"));
+     fprintf(stderr, _("        -C, --cache              display routing cache instead of FIB\n\n"));
+ 
+-    fprintf(stderr, _("  <Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
++    fprintf(stderr, _("  <Socket>={-t|--tcp} {-u|--udp} {-S|--sctp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom\n"));
+     fprintf(stderr, _("  <AF>=Use '-6|-4' or '-A <af>' or '--<af>'; default: %s\n"), DFLT_AF);
+     fprintf(stderr, _("  List of possible address families (which support routing):\n"));
+     print_aflist(1); /* 1 = routeable */
+@@ -1574,6 +1957,7 @@ int main
+ 	{"protocol", 1, 0, 'A'},
+ 	{"tcp", 0, 0, 't'},
+ 	{"udp", 0, 0, 'u'},
++	{"sctp", 0, 0, 'S' },
+ 	{"raw", 0, 0, 'w'},
+ 	{"unix", 0, 0, 'x'},
+ 	{"listening", 0, 0, 'l'},
+@@ -1604,7 +1988,7 @@ int main
+     getroute_init();		/* Set up AF routing support */
+ 
+     afname[0] = '\0';
+-    while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuWVv?wxl64", longopts, &lop)) != EOF)
++    while ((i = getopt_long(argc, argv, "MCFA:acdegphinNorstuSWVv?wxl64", longopts, &lop)) != EOF)
+ 	switch (i) {
+ 	case -1:
+ 	    break;
+@@ -1696,10 +2080,12 @@ int main
+ 	case 't':
+ 	    flag_tcp++;
+ 	    break;
+-
+ 	case 'u':
+ 	    flag_udp++;
+ 	    break;
++	case 'S':
++	    flag_sctp++;
++	    break;
+ 	case 'w':
+ 	    flag_raw++;
+ 	    break;
+@@ -1717,13 +2103,13 @@ int main
+     if (flag_int + flag_rou + flag_mas + flag_sta > 1)
+ 	usage();
+ 
+-    if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_raw))
+-	flag_tcp = flag_udp = flag_raw = 1;
++    if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_sctp || flag_raw))
++	flag_tcp = flag_udp = flag_sctp = flag_raw = 1;
+ 
+-    if ((flag_tcp || flag_udp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
++    if ((flag_tcp || flag_udp || flag_sctp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
+         flag_inet = flag_inet6 = 1;
+ 
+-    flag_arg = flag_tcp + flag_udp + flag_raw + flag_unx + flag_ipx
++    flag_arg = flag_tcp + flag_udp + flag_sctp + flag_raw + flag_unx + flag_ipx
+ 	+ flag_ax25 + flag_netrom + flag_igmp + flag_x25;
+ 
+     if (flag_mas) {
+@@ -1751,7 +2137,7 @@ int main
+         char buf[256];
+         if (!afname[0]) {
+             inittab();
+-            parsesnmp(flag_raw, flag_tcp, flag_udp);
++            parsesnmp(flag_raw, flag_tcp, flag_udp, flag_sctp);
+         } else {
+             safe_strncpy(buf, afname, sizeof(buf));
+             tmp1 = buf;
+@@ -1804,7 +2190,7 @@ int main
+ 	return (i);
+     }
+     for (;;) {
+-	if (!flag_arg || flag_tcp || flag_udp || flag_raw) {
++	if (!flag_arg || flag_tcp || flag_udp || flag_sctp || flag_raw) {
+ #if HAVE_AFINET
+ 	    prg_cache_load();
+ 	    printf(_("Active Internet connections "));	/* xxx */
+@@ -1843,6 +2229,11 @@ int main
+ 	    if (i)
+ 		return (i);
+ 	}
++	if (!flag_arg || flag_sctp) {
++	    i = sctp_info();
++	    if (i)
++		return (i);
++	}
+ 	if (!flag_arg || flag_raw) {
+ 	    i = raw_info();
+ 	    if (i)
+diff --git a/statistics.c b/statistics.c
+index 03600d7..eb8d7dc 100644
+--- a/statistics.c
++++ b/statistics.c
+@@ -21,7 +21,7 @@
+ #define UFWARN(x)
+ #endif
+ 
+-int print_static,f_raw,f_tcp,f_udp,f_unknown = 1;
++int print_static,f_raw,f_tcp,f_udp,f_sctp,f_unknown = 1;
+ 
+ enum State {
+     number = 0, opt_number, i_forward, i_inp_icmp, i_outp_icmp, i_rto_alg,
+@@ -297,6 +297,27 @@ struct entry Tcpexttab[] =
+     { "TCPRenoRecoveryFail", N_("%u classic Reno fast retransmits failed"), opt_number },
+ };
+ 
++struct entry Sctptab[] =
++{
++    {"SctpCurrEstab", N_("%u Current Associations"), number},
++    {"SctpActiveEstabs", N_("%u Active Associations"), number},
++    {"SctpPassiveEstabs", N_("%u Passive Associations"), number},
++    {"SctpAborteds", N_("%u Number of Aborteds "), number},
++    {"SctpShutdowns", N_("%u Number of Graceful Terminations"), number},
++    {"SctpOutOfBlues", N_("%u Number of Out of Blue packets"), number},
++    {"SctpChecksumErrors", N_("%u Number of Packets with invalid Checksum"), number},
++    {"SctpOutCtrlChunks", N_("%u Number of control chunks sent"), number},
++    {"SctpOutOrderChunks", N_("%u Number of ordered chunks sent"), number},
++    {"SctpOutUnorderChunks", N_("%u Number of Unordered chunks sent"), number},
++    {"SctpInCtrlChunks", N_("%u Number of control chunks received"), number},
++    {"SctpInOrderChunks", N_("%u Number of ordered chunks received"), number},
++    {"SctpInUnorderChunks", N_("%u Number of Unordered chunks received"), number},
++    {"SctpFragUsrMsgs", N_("%u Number of messages fragmented"), number},
++    {"SctpReasmUsrMsgs", N_("%u Number of messages reassembled "), number},
++    {"SctpOutSCTPPacks", N_("%u Number of SCTP packets sent"), number},
++    {"SctpInSCTPPacks", N_("%u Number of SCTP packets received"), number},
++};
++
+ struct tabtab {
+     char *title;
+     struct entry *tab;
+@@ -310,6 +331,7 @@ struct tabtab snmptabs[] =
+     {"Icmp", Icmptab, sizeof(Icmptab), &f_raw},
+     {"Tcp", Tcptab, sizeof(Tcptab), &f_tcp},
+     {"Udp", Udptab, sizeof(Udptab), &f_udp},
++    {"Sctp", Sctptab, sizeof(Sctptab), &f_sctp},
+     {"TcpExt", Tcpexttab, sizeof(Tcpexttab), &f_tcp},
+     {NULL}
+ };
+@@ -499,12 +521,40 @@ void process6_fd(FILE *f)
+ 
+ }
+ 
+-void parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
++/* Process a file with name-value lines (like /proc/net/sctp/snmp) */
++void process_fd2(FILE *f, const char *filename)
++{
++    char buf1[1024];
++    char *sp;
++    struct tabtab *tab;
++    
++    tab = newtable(snmptabs, "Sctp");
++    
++    while (fgets(buf1, sizeof buf1, f)) {
++	sp = buf1 + strcspn(buf1, " \t\n");
++	if (!sp)
++	    goto formaterr;
++	*sp = '\0';
++    	sp++;
++
++	sp += strspn(sp, " \t\n"); 
++
++	if (*sp != '\0' && *(tab->flag)) 	
++	    printval(tab, buf1, strtoul(sp, 0, 10));
++    }
++  return;
++  
++formaterr:
++  fprintf(stderr,_("error parsing %s\n"), filename);
++  return;
++}
++
++void parsesnmp(int flag_raw, int flag_tcp, int flag_udp, int flag_sctp)
+ {
+     FILE *f;
+ 
+-    f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp;
+-    
++    f_raw = flag_raw; f_tcp = flag_tcp; f_udp = flag_udp; f_sctp = flag_sctp;
++
+     f = proc_fopen("/proc/net/snmp");
+     if (!f) {
+ 	perror(_("cannot open /proc/net/snmp"));
+@@ -530,6 +580,16 @@ void parsesnmp(int flag_raw, int flag_tcp, int flag_udp)
+     
+         fclose(f);
+     }
++
++    f = fopen("/proc/net/sctp/snmp", "r");
++    if (f) {
++	process_fd2(f,"/proc/net/sctp/snmp");
++	if (ferror(f))
++	    perror("/proc/net/sctp/snmp");
++
++	fclose(f);
++    }
++
+     return;
+ }
+     
+-- 
+1.8.5.2.233.g932f7e4
+
diff --git a/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp2-quiet.patch b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp2-quiet.patch
new file mode 100644
index 0000000..d34e651
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp2-quiet.patch
@@ -0,0 +1,28 @@
+From 14287b594e1f02b811f889fb515c1a51b72c08d4 Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 14 Jan 2016 17:07:48 +0800
+Subject: [PATCH 2/3] net-tools: add SCTP support for netstat
+
+Upstream-Status: pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ netstat.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/netstat.c b/netstat.c
+index 5d1a4a1..56a15c2 100644
+--- a/netstat.c
++++ b/netstat.c
+@@ -2104,7 +2104,7 @@ int main
+ 	usage();
+ 
+     if ((flag_inet || flag_inet6 || flag_sta) && !(flag_tcp || flag_udp || flag_sctp || flag_raw))
+-	flag_tcp = flag_udp = flag_sctp = flag_raw = 1;
++	flag_tcp = flag_udp = flag_raw = 1;
+ 
+     if ((flag_tcp || flag_udp || flag_sctp || flag_raw || flag_igmp) && !(flag_inet || flag_inet6))
+         flag_inet = flag_inet6 = 1;
+-- 
+1.8.5.2.233.g932f7e4
+
diff --git a/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp3-addrs.patch b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp3-addrs.patch
new file mode 100644
index 0000000..8b2ecab
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/net-tools/net-tools/net-tools-1.60-sctp3-addrs.patch
@@ -0,0 +1,363 @@
+From 1d386279a449a1a6b96b88a71f35bf13b14b2c2c Mon Sep 17 00:00:00 2001
+From: Li Zhou <li.zhou@windriver.com>
+Date: Thu, 14 Jan 2016 17:11:24 +0800
+Subject: [PATCH 3/3] net-tools: add SCTP support for netstat
+
+Upstream-Status: pending
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ netstat.c | 282 ++++++++++++++++++++++++--------------------------------------
+ 1 file changed, 108 insertions(+), 174 deletions(-)
+
+diff --git a/netstat.c b/netstat.c
+index 56a15c2..86adadb 100644
+--- a/netstat.c
++++ b/netstat.c
+@@ -1095,23 +1095,21 @@ static void sctp_eps_do_one(int lnr, char *line)
+     const char *lport_str;
+     const char *uid_str;
+     const char *inode_str;
+-    const char *pladdr_str;
+     char *laddrs_str;
+     
+     if(lnr == 0) {
+-	/* ENDPT     SOCK   STY SST HBKT LPORT   uid inode pladdr LADDRS*/
++        /* ENDPT     SOCK   STY SST HBKT LPORT   UID INODE LADDRS */
+ 	return;
+     }
+     
+-    strtok(line," \t\n"); /*skip ptr*/
+-    strtok(0," \t\n");    /*skip ptr*/
++    strtok(line," \t\n"); /*skip endpt*/
++    strtok(0," \t\n");    /*skip sock*/
+     sty_str = strtok(0," \t\n");
+     sst_str = strtok(0," \t\n");
+     strtok(0," \t\n"); /*skip hash bucket*/
+     lport_str=strtok(0," \t\n");
+     uid_str = strtok(0," \t\n");
+     inode_str = strtok(0," \t\n");
+-    pladdr_str = strtok(0," \t\n");
+     laddrs_str=strtok(0,"\t\n");
+     
+     type = atoi(sty_str);
+@@ -1119,61 +1117,35 @@ static void sctp_eps_do_one(int lnr, char *line)
+     port = atoi(lport_str);
+     uid = atoi(uid_str);
+     inode = strtoul(inode_str,0,0);
+-    
+-    if(flag_sctp<=1) {
+-	/* only print the primary address */
+-	char local_addr[64];
+-	char local_port[16];
+-	
+-	ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
+-	if(ap)
+-	    safe_strncpy(local_addr,
+-	                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
+-	                 sizeof(local_addr));
+-	else
+-	    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+-	
+-	snprintf(local_port, sizeof(local_port), "%s",
+-	         get_sname(htons(port), "sctp",
+-	                   flag_not & FLAG_NUM_PORT));
+-	
+-	printf("sctp                ");
+-	sprintf(buffer,"%s:%s", local_addr, local_port);
+-	printf("%-47s", buffer);
+-    	printf(" %-12s", sctp_socket_state_str(state));
+-    } else {
+-    	/*print all addresses*/
+-	const char *this_local_addr;
+-	int first=1;
+-	char local_port[16];
+-	snprintf(local_port, sizeof(local_port), "%s",
+-		 get_sname(htons(port), "sctp",
+-			   flag_not & FLAG_NUM_PORT));
+-	for(this_local_addr=strtok(laddrs_str," \t\n");
+-	    this_local_addr;
+-	    this_local_addr=strtok(0," \t\n"))
+-	{
+-	    char local_addr[64];
+-	    ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
+-	    if(ap)
+-		safe_strncpy(local_addr,
+-		             ap->sprint((struct sockaddr *) &localaddr, flag_not),
+-		             sizeof(local_addr));
+-	    else
+-		sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+ 
+-	    if(!first) printf("\n");
+-	    if(first)
+-	        printf("sctp                ");
+-	    else
+-	        printf("                    ");
+-	    sprintf(buffer,"%s:%s", local_addr, local_port);
+-	    printf("%-47s", buffer);
+-	    printf(" %-12s", first?sctp_socket_state_str(state):"");
+-	    first = 0;
+-	}
++    const char *this_local_addr;
++    int first=1;
++    char local_port[16];
++    snprintf(local_port, sizeof(local_port), "%s",
++        get_sname(htons(port), "sctp", flag_not & FLAG_NUM_PORT));
++    for(this_local_addr=strtok(laddrs_str," \t\n");
++        this_local_addr;
++        this_local_addr=strtok(0," \t\n"))
++    {
++        char local_addr[64];
++        ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++        if(ap)
++            safe_strncpy(local_addr,
++                ap->sprint((struct sockaddr *) &localaddr, flag_not),
++                sizeof(local_addr));
++        else
++            sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++
++        if(!first) printf("\n");
++        if(first)
++            printf("sctp                ");
++        else
++            printf("                    ");
++        sprintf(buffer,"%s:%s", local_addr, local_port);
++        printf("%-55s", buffer);
++        printf(" %-12s", first?sctp_socket_state_str(state):"");
++        first = 0;
+     }
+-
+     finish_this_one(uid,inode,"");
+ }
+ 
+@@ -1199,32 +1171,29 @@ static void sctp_assoc_do_one(int lnr, char *line)
+     const char *lport_str,*rport_str;
+     const char *uid_str;
+     const char *inode_str;
+-    const char *pladdr_str;
+     char *laddrs_str;
+-    const char *praddr_str;
+     char *raddrs_str;
+-    
++
+     if(lnr == 0) {
+-	/* ASSOC     SOCK   STY SST ST HBKT tx_queue rx_queue uid inode LPORT RPORT pladdr praddr LADDRS <-> RADDRS*/
++	/* ASSOC     SOCK   STY SST ST HBKT ASSOC-ID TX_QUEUE RX_QUEUE UID INODE LPORT RPORT LADDRS <-> RADDRS */
+ 	return;
+     }
+-    
+-    strtok(line," \t\n"); /*skip ptr*/
+-    strtok(0," \t\n");    /*skip ptr*/
++
++    strtok(line," \t\n"); /*skip assoc*/
++    strtok(0," \t\n");    /*skip sock*/
+     sty_str = strtok(0," \t\n");
+     sst_str = strtok(0," \t\n");
+     st_str = strtok(0," \t\n");
+     strtok(0," \t\n"); /*skip hash bucket*/
++    strtok(0," \t\n"); /*skip hash assoc-id*/
+     txqueue_str =  strtok(0," \t\n");
+     rxqueue_str =  strtok(0," \t\n");
+     uid_str = strtok(0," \t\n");
+     inode_str = strtok(0," \t\n");
+     lport_str=strtok(0," \t\n");
+     rport_str=strtok(0," \t\n");
+-    pladdr_str = strtok(0," \t\n");
+-    praddr_str = strtok(0," \t\n");
+-    laddrs_str=strtok(0,"<->\t\n");
+-    raddrs_str=strtok(0,"<->\t\n");
++    laddrs_str = strtok(0,"<->\t\n");
++    raddrs_str = strtok(0,"<->\t\n");
+ 
+     type = atoi(sty_str);
+     state = atoi(sst_str);
+@@ -1235,116 +1204,81 @@ static void sctp_assoc_do_one(int lnr, char *line)
+     inode = strtoul(inode_str,0,0);
+     lport = atoi(lport_str);
+     rport = atoi(rport_str);
+-    
+-    if(flag_sctp<=1) {
+-	/* only print the primary addresses */
+-	char local_addr[64];
+-	char local_port[16];
+-	char remote_addr[64];
+-	char remote_port[16];
+-	
+-	ap = process_sctp_addr_str(pladdr_str, (struct sockaddr*)&localaddr);
+-	if(ap)
+-	    safe_strncpy(local_addr,
+-	                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
+-	                 sizeof(local_addr));
+-	else
+-	    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+-	
+-	snprintf(local_port, sizeof(local_port), "%s",
+-	         get_sname(htons(lport), "sctp",
+-	                   flag_not & FLAG_NUM_PORT));
+-	
+-	ap = process_sctp_addr_str(praddr_str, (struct sockaddr*)&remoteaddr);
+-	if(ap)
+-	    safe_strncpy(remote_addr,
+-	                 ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
+-	                 sizeof(remote_addr));
+-	else
+-	    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
+-	
+-	snprintf(remote_port, sizeof(remote_port), "%s",
+-		 get_sname(htons(rport), "sctp",
+-			   flag_not & FLAG_NUM_PORT));
+-
+-	printf("sctp");
+-	printf("  %6u %6u ", rxqueue, txqueue);
+-	sprintf(buffer,"%s:%s", local_addr, local_port);
+-	printf("%-23s", buffer);
+-	printf(" ");
+-	sprintf(buffer,"%s:%s", remote_addr, remote_port);
+-	printf("%-23s", buffer);
+-    	printf(" %-12s", sctp_socket_state_str(state));
+-    } else {
+-    	/*print all addresses*/
+-	const char *this_local_addr;
+-	const char *this_remote_addr;
+-	char *ss1,*ss2;
+-	int first=1;
+-	char local_port[16];
+-	char remote_port[16];
+-	snprintf(local_port, sizeof(local_port), "%s",
+-	         get_sname(htons(lport), "sctp",
+-	                   flag_not & FLAG_NUM_PORT));
+-	snprintf(remote_port, sizeof(remote_port), "%s",
+-	         get_sname(htons(rport), "sctp",
+-	                   flag_not & FLAG_NUM_PORT));
+-
+-	this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
+-	this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
+-	while(this_local_addr || this_remote_addr) {
+-	    char local_addr[64];
+-	    char remote_addr[64];
+-	    if(this_local_addr) {
+-		ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
+-		if(ap)
+-		    safe_strncpy(local_addr,
+-		                 ap->sprint((struct sockaddr *) &localaddr, flag_not),
+-		                 sizeof(local_addr));
+-		else
+-		    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
+-	    }
+-	    if(this_remote_addr) {
+-		ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
+-		if(ap)
+-		    safe_strncpy(remote_addr,
+-		                 ap->sprint((struct sockaddr *) &remoteaddr, flag_not),
+-		                 sizeof(remote_addr));
+-		else
+-		    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
+-	    }
+ 
+-	    if(!first) printf("\n");
+-	    if(first)
+-		printf("sctp  %6u %6u ", rxqueue, txqueue);
+-	    else
+-		printf("                    ");
+-	    if(this_local_addr) {
+-		if(first)
+-		    sprintf(buffer,"%s:%s", local_addr, local_port);
++    /*print all addresses*/
++    const char *this_local_addr;
++    const char *this_remote_addr;
++    char *ss1,*ss2;
++    int first=1;
++    char local_port[16];
++    char remote_port[16];
++    snprintf(local_port, sizeof(local_port), "%s",
++             get_sname(htons(lport), "sctp",
++             flag_not & FLAG_NUM_PORT));
++    snprintf(remote_port, sizeof(remote_port), "%s",
++             get_sname(htons(rport), "sctp",
++             flag_not & FLAG_NUM_PORT));
++
++    this_local_addr=strtok_r(laddrs_str," \t\n",&ss1);
++    this_remote_addr=strtok_r(raddrs_str," \t\n",&ss2);
++    while(this_local_addr || this_remote_addr) {
++        char local_addr[64];
++        char remote_addr[64];
++
++        if(this_local_addr) {
++            if (this_local_addr[0] == '*') {
++                /* skip * */
++                this_local_addr++;
++            }
++            ap = process_sctp_addr_str(this_local_addr, (struct sockaddr*)&localaddr);
++            if(ap)
++                safe_strncpy(local_addr,
++                    ap->sprint((struct sockaddr *) &localaddr, flag_not), sizeof(local_addr));
+ 		else
+-		    sprintf(buffer,"%s", local_addr);
+-		printf("%-23s", buffer);
+-	    } else
+-	    	printf("%-23s", "");
+-	    printf(" ");
+-	    if(this_remote_addr) {
+-		if(first)
+-		    sprintf(buffer,"%s:%s", remote_addr, remote_port);
++                    sprintf(local_addr,_("unsupported address family %d"), ((struct sockaddr*)&localaddr)->sa_family);
++        }
++	if(this_remote_addr) {
++            if (this_remote_addr[0] == '*') {
++                /* skip * */
++                this_remote_addr++;
++            }
++            ap = process_sctp_addr_str(this_remote_addr, (struct sockaddr*)&remoteaddr);
++            if(ap)
++                safe_strncpy(remote_addr,
++                    ap->sprint((struct sockaddr *) &remoteaddr, flag_not), sizeof(remote_addr));
+ 		else
+-		    sprintf(buffer,"%s", remote_addr);
+-		printf("%-23s", buffer);
+-	    } else
+-		printf("%-23s", "");
+-
+-	    printf(" %-12s", first?sctp_socket_state_str(state):"");
++                    sprintf(remote_addr,_("unsupported address family %d"), ((struct sockaddr*)&remoteaddr)->sa_family);
++       }
+ 
+-	    first = 0;
+-	    this_local_addr=strtok_r(0," \t\n",&ss1);
+-	    this_remote_addr=strtok_r(0," \t\n",&ss2);
+-	}
++       if(!first) printf("\n");
++       if(first)
++           printf("sctp  %6u %6u ", rxqueue, txqueue);
++       else
++           printf("                    ");
++       if(this_local_addr) {
++           if(first)
++               sprintf(buffer,"%s:%s", local_addr, local_port);
++           else
++               sprintf(buffer,"%s", local_addr);
++           printf("%-27s", buffer);
++       } else
++           printf("%-27s", "");
++       printf(" ");
++       if(this_remote_addr) {
++           if(first)
++               sprintf(buffer,"%s:%s", remote_addr, remote_port);
++           else
++               sprintf(buffer,"%s", remote_addr);
++           printf("%-27s", buffer);
++       } else
++       printf("%-27s", "");
++
++       printf(" %-12s", first?sctp_socket_state_str(state):"");
++
++       first = 0;
++       this_local_addr=strtok_r(0," \t\n",&ss1);
++       this_remote_addr=strtok_r(0," \t\n",&ss2);
+     }
+-
+     finish_this_one(uid,inode,"");
+ }
+ 
+-- 
+1.8.5.2.233.g932f7e4
+
diff --git a/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb b/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
index aefc1e6..63b2051 100644
--- a/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
+++ b/yocto-poky/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
@@ -11,7 +11,15 @@
            file://net-tools-config.h \
            file://net-tools-config.make \
            file://ifconfig-interface-0-del-IP-will-remove-the-aliased-.patch \
-	   "
+           file://musl-fixes.patch \
+           file://net-tools-1.60-sctp1.patch \
+           file://net-tools-1.60-sctp2-quiet.patch \
+           file://net-tools-1.60-sctp3-addrs.patch \
+          "
+
+# for this package we're mostly interested in tracking debian patches,
+# and not in the upstream version where all development has effectively stopped
+UPSTREAM_CHECK_REGEX = "(?P<pver>((\d+\.*)+)-((\d+\.*)+))\.(diff|debian\.tar)\.(gz|xz)"
 
 S = "${WORKDIR}/net-tools-1.60"
 
@@ -21,8 +29,16 @@
 SRC_URI[patch.md5sum] = "ea3592f49ac8380962bc4d9b66c7e7e9"
 SRC_URI[patch.sha256sum] = "aeeeafaff68866a446f01bb639d4e0146a60af34dcd20e31a3e46585022fc76c"
 
+# 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/n/net-tools/"
+
 inherit gettext
 
+do_patch[depends] = "quilt-native:do_populate_sysroot"
+
+LDFLAGS_append_libc-uclibc = " -lintl "
+
 # The Makefile is lame, no parallel build
 PARALLEL_MAKE = ""
 
@@ -70,6 +86,10 @@
 }
 
 do_install() {
+	export COPTS="$CFLAGS"
+	export LOPTS="$LDFLAGS"
+	unset CFLAGS
+	unset LDFLAGS
 	oe_runmake 'BASEDIR=${D}' install
 }
 
diff --git a/yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch b/yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch
new file mode 100644
index 0000000..bc55582
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/newt/files/Makefile.in-Add-tinfo-library-to-the-linking-librari.patch
@@ -0,0 +1,26 @@
+From fad40cfc18a42946a9a9e440c3434cd6b847ff9d Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Mon, 18 Jan 2016 17:05:19 +0000
+Subject: [PATCH] Makefile.in: Add tinfo library to the linking libraries
+Organization: O.S. Systems Software LTDA.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.in b/Makefile.in
+index a85d00f..98b85f9 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -1,4 +1,4 @@
+-LIBS = -lslang @LIBS@
++LIBS = -lslang -ltinfo @LIBS@
+ LIBTCL = @TCL_LIB_FLAG@
+ 
+ CC = @CC@
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch b/yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch
new file mode 100644
index 0000000..8883e26
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/newt/files/pie-flags.patch
@@ -0,0 +1,36 @@
+specify -fPIC after CFLAGS so it can override the CFLAGS containing -pie and -fpie
+this makes sure the objects that go into shared objects are compiled with -fPIC
+and not with -fpie. We can not use -fpie on objects which will go into .so files
+Fixes errors like
+
+| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: shared/newt.o: relocation R_X86_64_PC32 against undefined symbol `SLtt_Screen_Rows@@SLANG2' can not be used when making a shared object; recompile with -fPIC
+| /mnt/oe/build/tmp-glibc/sysroots/x86_64-linux/usr/libexec/x86_64-oe-linux/gcc/x86_64-oe-linux/5.3.0/ld: final link failed: Bad value
+| collect2: error: ld returned 1 exit status
+| make: *** [libnewt.so.0.52.18] Error 1
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: newt-0.52.18/Makefile.in
+===================================================================
+--- newt-0.52.18.orig/Makefile.in
++++ newt-0.52.18/Makefile.in
+@@ -96,8 +96,8 @@ _snack.$(SOEXT):   snack.c $(LIBNEWTSH)
+ 		PIFLAGS=`$$pyconfig --includes`; \
+ 		PLDFLAGS=`$$pyconfig --ldflags`; \
+ 		PLFLAGS=`$$pyconfig --libs`; \
+-		echo $(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
+-		$(CC) $(SHCFLAGS) $(CPPFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
++		echo $(CC) $(CPPFLAGS) $(SHCFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
++		$(CC) $(CPPFLAGS) $(SHCFLAGS) $$PIFLAGS $$PCFLAGS -c -o $$ver/snack.o snack.c; \
+ 		echo $(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L.  -lnewt $(LIBS); \
+ 		$(CC) --shared $$PLDFLAGS $$PLFLAGS $(LDFLAGS) -o $$ver/_snack.$(SOEXT) $$ver/snack.o -L.  -lnewt $(LIBS); \
+ 	done || :
+@@ -135,7 +135,7 @@ $(LIBNEWTSH): $(SHAREDOBJS)
+ 	ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
+ 
+ $(SHAREDDIR)/%.o : %.c $(SHAREDDIR)
+-	$(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
++	$(CC) -c $(CFLAGS) $(CPPFLAGS) $(SHCFLAGS) -o $@ $<
+ 
+ install: $(LIBNEWT) install-sh whiptail
+ 	[ -d $(instroot)/$(bindir) ] || install -m 755 -d $(instroot)/$(bindir)
diff --git a/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb b/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
index 94a41a3..ba04757 100644
--- a/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
+++ b/yocto-poky/meta/recipes-extended/newt/libnewt-python_0.52.18.bb
@@ -24,6 +24,5 @@
 PACKAGES_remove = "whiptail"
 
 FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
 
 BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb b/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
index 302e418..9a2964b 100644
--- a/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
+++ b/yocto-poky/meta/recipes-extended/newt/libnewt_0.52.18.bb
@@ -21,6 +21,8 @@
            file://remove_slang_include.patch \
            file://fix_SHAREDDIR.patch \
            file://cross_ar.patch \
+           file://Makefile.in-Add-tinfo-library-to-the-linking-librari.patch \
+           file://pie-flags.patch \
 "
 
 SRC_URI[md5sum] = "685721bee1a318570704b19dcf31d268"
@@ -36,6 +38,7 @@
 
 export STAGING_INCDIR
 export STAGING_LIBDIR
+export CPPFLAGS
 
 export BUILD_SYS
 export HOST_SYS
diff --git a/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb b/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
index ce82385..a29c3d7 100644
--- a/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
+++ b/yocto-poky/meta/recipes-extended/packagegroups/packagegroup-core-lsb.bb
@@ -69,7 +69,6 @@
     minicom \
     neon \
     parted \
-    ${PTH} \
     quota \
     screen \
     setserial \
@@ -225,6 +224,16 @@
 QT4PKGS_mips64 = ""
 QT4PKGS_mips64n32 = ""
 
+def get_libqt4(d):
+    if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) or "":
+        if 'qt4' in d.getVar('BBFILE_COLLECTIONS', False) or "":
+            return d.getVar('QT4PKGS', False)
+
+        bb.warn('The meta-qt4 layer should be added, this layer provides Qt 4.x' \
+                'libraries. Its intended use is for passing LSB tests as Qt4 is' \
+                'a requirement for LSB.')
+    return ''
+
 SUMMARY_packagegroup-core-lsb-desktop = "LSB Desktop"
 DESCRIPTION_packagegroup-core-lsb-desktop = "Packages required to support libraries \
     specified in the LSB Desktop specification"
@@ -245,7 +254,7 @@
     gtk+ \
     atk \
     libasound \
-    ${QT4PKGS} \
+    ${@get_libqt4(d)} \
     ${@get_libqt3(d)} \
 "
 
@@ -272,7 +281,3 @@
     libi18n-collate-perl \
     libpod-plainer-perl \
 "
-
-PTH = "pth"
-PTH_libc-uclibc = ""
-
diff --git a/yocto-poky/meta/recipes-extended/pam/libpam/0001-Add-support-for-defining-missing-funcitonality.patch b/yocto-poky/meta/recipes-extended/pam/libpam/0001-Add-support-for-defining-missing-funcitonality.patch
new file mode 100644
index 0000000..c55b648
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pam/libpam/0001-Add-support-for-defining-missing-funcitonality.patch
@@ -0,0 +1,68 @@
+From 45d1ed58927593968faead7dbb295f3922f41a2f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 8 Aug 2015 14:16:43 -0700
+Subject: [PATCH] Add support for defining missing funcitonality
+
+In order to support alternative libc on linux ( musl, bioninc ) etc we
+need to check for glibc-only features and provide alternatives, in this
+list strndupa is first one, when configure detects that its not included
+in system C library then the altrnative implementation from missing.h is
+used
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac                |  3 +++
+ libpam/include/missing.h    | 12 ++++++++++++
+ modules/pam_exec/pam_exec.c |  1 +
+ 3 files changed, 16 insertions(+)
+ create mode 100644 libpam/include/missing.h
+
+diff --git a/configure.ac b/configure.ac
+index 9e1257f..cbed979 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -599,6 +599,9 @@ dnl
+ AC_CHECK_DECL(__NR_keyctl, [have_key_syscalls=1],[have_key_syscalls=0],[#include <sys/syscall.h>])
+ AC_CHECK_DECL(ENOKEY, [have_key_errors=1],[have_key_errors=0],[#include <errno.h>])
+ 
++# musl and bionic don't have strndupa
++AC_CHECK_DECLS_ONCE([strndupa])
++
+ HAVE_KEY_MANAGEMENT=0
+ if test $have_key_syscalls$have_key_errors = 11
+ then
+diff --git a/libpam/include/missing.h b/libpam/include/missing.h
+new file mode 100644
+index 0000000..3cf011c
+--- /dev/null
++++ b/libpam/include/missing.h
+@@ -0,0 +1,12 @@
++#pragma once
++
++#if !HAVE_DECL_STRNDUPA
++#define strndupa(s, n)                                                  \
++        ({                                                              \
++                const char *__old = (s);                                \
++                size_t __len = strnlen(__old, (n));                     \
++                char *__new = alloca(__len + 1);                        \
++                __new[__len] = '\0';                                    \
++                memcpy(__new, __old, __len);                            \
++         })
++#endif
+diff --git a/modules/pam_exec/pam_exec.c b/modules/pam_exec/pam_exec.c
+index 17ba6ca..3aa2694 100644
+--- a/modules/pam_exec/pam_exec.c
++++ b/modules/pam_exec/pam_exec.c
+@@ -59,6 +59,7 @@
+ #include <security/pam_modutil.h>
+ #include <security/pam_ext.h>
+ #include <security/_pam_macros.h>
++#include <missing.h>
+ 
+ #define ENV_ITEM(n) { (n), #n }
+ static struct {
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-extended/pam/libpam/include_paths_header.patch b/yocto-poky/meta/recipes-extended/pam/libpam/include_paths_header.patch
new file mode 100644
index 0000000..e4eb956
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pam/libpam/include_paths_header.patch
@@ -0,0 +1,59 @@
+This patch adds missing include for paths.h which should provide
+_PATH_LASTLOG definition
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: Linux-PAM-1.1.6/modules/pam_lastlog/pam_lastlog.c
+===================================================================
+--- Linux-PAM-1.1.6.orig/modules/pam_lastlog/pam_lastlog.c
++++ Linux-PAM-1.1.6/modules/pam_lastlog/pam_lastlog.c
+@@ -23,9 +23,11 @@
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <string.h>
++#include <sys/file.h>
+ #include <sys/types.h>
+ #include <syslog.h>
+ #include <unistd.h>
++#include <paths.h>
+ 
+ #if defined(hpux) || defined(sunos) || defined(solaris)
+ # ifndef _PATH_LASTLOG
+@@ -332,6 +334,23 @@ last_login_read(pam_handle_t *pamh, int
+     return retval;
+ }
+ 
++#ifndef __GLIBC__
++static void logwtmp(const char * line, const char * name, const char * host)
++{
++    struct utmp u;
++    memset(&u, 0, sizeof(u));
++
++    u.ut_pid = getpid();
++    u.ut_type = name[0] ? USER_PROCESS : DEAD_PROCESS;
++    strncpy(u.ut_line, line, sizeof(u.ut_line));
++    strncpy(u.ut_name, name, sizeof(u.ut_name));
++    strncpy(u.ut_host, host, sizeof(u.ut_host));
++    gettimeofday(&(u.ut_tv), NULL);
++
++    updwtmp(_PATH_WTMP, &u);
++}
++#endif /* __GLIBC__ */
++
+ static int
+ last_login_write(pam_handle_t *pamh, int announce, int last_fd,
+ 		 uid_t uid, const char *user)
+Index: Linux-PAM-1.1.6/modules/Makefile.am
+===================================================================
+--- Linux-PAM-1.1.6.orig/modules/Makefile.am
++++ Linux-PAM-1.1.6/modules/Makefile.am
+@@ -7,7 +7,7 @@ SUBDIRS = pam_access pam_cracklib pam_de
+ 	pam_group pam_issue pam_keyinit pam_lastlog pam_limits \
+ 	pam_listfile pam_localuser pam_loginuid pam_mail \
+ 	pam_mkhomedir pam_motd pam_namespace pam_nologin \
+-	pam_permit pam_pwhistory pam_rhosts pam_rootok pam_securetty \
++	pam_permit pam_pwhistory pam_rootok pam_securetty \
+ 	pam_selinux pam_sepermit pam_shells pam_stress \
+ 	pam_succeed_if pam_tally pam_tally2 pam_time pam_timestamp \
+ 	pam_tty_audit pam_umask \
diff --git a/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb b/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb
index 0353356..341ea24 100644
--- a/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb
+++ b/yocto-poky/meta/recipes-extended/pam/libpam_1.2.1.bb
@@ -31,7 +31,10 @@
 SRC_URI_append_libc-uclibc = " file://pam-no-innetgr.patch \
                                file://use-utmpx.patch"
 
-SRC_URI_append_libc-musl = " file://pam-no-innetgr.patch"
+SRC_URI_append_libc-musl = " file://pam-no-innetgr.patch \
+                             file://0001-Add-support-for-defining-missing-funcitonality.patch \
+                             file://include_paths_header.patch \
+                           "
 
 DEPENDS = "bison flex flex-native cracklib"
 
@@ -54,10 +57,6 @@
 
 PACKAGES += "${PN}-runtime ${PN}-xtests"
 FILES_${PN} = "${base_libdir}/lib*${SOLIBS}"
-FILES_${PN}-dbg += "${base_libdir}/security/.debug \
-                    ${base_libdir}/security/pam_filter/.debug \
-                    ${datadir}/Linux-PAM/xtests/.debug"
-
 FILES_${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}"
 FILES_${PN}-runtime = "${sysconfdir}"
 FILES_${PN}-xtests = "${datadir}/Linux-PAM/xtests"
@@ -169,3 +168,4 @@
 CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-password"
 CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-session-noninteractive"
 CONFFILES_${PN}-runtime += "${sysconfdir}/pam.d/common-account"
+CONFFILES_${PN}-runtime += "${sysconfdir}/security/limits.conf"
diff --git a/yocto-poky/meta/recipes-extended/parted/parted_3.2.bb b/yocto-poky/meta/recipes-extended/parted/parted_3.2.bb
index ff8ae09..30c00c8 100644
--- a/yocto-poky/meta/recipes-extended/parted/parted_3.2.bb
+++ b/yocto-poky/meta/recipes-extended/parted/parted_3.2.bb
@@ -3,7 +3,7 @@
 LICENSE = "GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
 SECTION = "console/tools"
-DEPENDS = "ncurses readline util-linux"
+DEPENDS = "ncurses readline util-linux virtual/libiconv"
 PR = "r1"
 
 SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
@@ -21,6 +21,7 @@
 SRC_URI[sha256sum] = "858b589c22297cacdf437f3baff6f04b333087521ab274f7ab677cb8c6bb78e4"
 
 EXTRA_OECONF = "--disable-device-mapper"
+LDFLAGS_append_libc-uclibc = " -liconv "
 
 inherit autotools pkgconfig gettext texinfo ptest
 
diff --git a/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch b/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
new file mode 100644
index 0000000..61bf2de
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pax/pax/0001-Fix-build-with-musl.patch
@@ -0,0 +1,1287 @@
+From 47c4db8d37248d968fac7ee4a71ca64398890723 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 6 Jan 2016 11:57:21 -0800
+Subject: [PATCH] Fix build with musl
+
+Remove BSDisms
+Remove fts, and link to libfts thats provided externally
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate[musl specific]
+
+ lib/Makefile.am |    4 +-
+ lib/fts.c       | 1025 -------------------------------------------------------
+ lib/fts.h       |  131 -------
+ lib/vis.h       |   13 +-
+ src/Makefile.am |    2 +-
+ src/extern.h    |    2 -
+ src/file_subs.c |    2 +-
+ src/tables.c    |    2 +-
+ 8 files changed, 14 insertions(+), 1167 deletions(-)
+ delete mode 100644 lib/fts.c
+ delete mode 100644 lib/fts.h
+
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 56d0859..7f5045a 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -8,8 +8,8 @@ AUTOMAKE_OPTIONS = 1.7 gnits
+ CLEANFILES = *~
+ 
+ noinst_LIBRARIES = libbsdfunc.a
+-noinst_HEADERS = vis.h bsdfunc.h fts.h
++noinst_HEADERS = vis.h bsdfunc.h
+ 
+ AM_CFLAGS = @EXTRA_CFLAGS@
+ 
+-libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c fts.c
++libbsdfunc_a_SOURCES = vis.c strlcpy.c strmode.c
+diff --git a/lib/fts.c b/lib/fts.c
+deleted file mode 100644
+index 45e90ca..0000000
+--- a/lib/fts.c
++++ /dev/null
+@@ -1,1025 +0,0 @@
+-/*-
+- * Copyright (c) 1990, 1993, 1994
+- *      The Regents of the University of California.  All rights reserved.
+- *
+- * Redistribution and use in source and binary forms, with or without
+- * modification, are permitted provided that the following conditions
+- * are met:
+- * 1. Redistributions of source code must retain the above copyright
+- *    notice, this list of conditions and the following disclaimer.
+- * 2. Redistributions in binary form must reproduce the above copyright
+- *    notice, this list of conditions and the following disclaimer in the
+- *    documentation and/or other materials provided with the distribution.
+- * 4. Neither the name of the University nor the names of its contributors
+- *    may be used to endorse or promote products derived from this software
+- *    without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+- * SUCH DAMAGE.
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-#include <config.h>
+-#endif
+-
+-#include <sys/stat.h>
+-#include <fcntl.h>
+-#include <dirent.h>
+-#include <errno.h>
+-#include <fts.h>
+-#include <stdlib.h>
+-#include <string.h>
+-#include <unistd.h>
+-
+-/* Largest alignment size needed, minus one.
+-   Usually long double is the worst case.  */
+-#ifndef ALIGNBYTES
+-#define ALIGNBYTES	(__alignof__ (long double) - 1)
+-#endif
+-/* Align P to that size.  */
+-#ifndef ALIGN
+-#define	ALIGN(p)	(((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES)
+-#endif
+-
+-
+-static FTSENT	*fts_alloc (FTS *, const char *, int);
+-static FTSENT	*fts_build (FTS *, int);
+-static void	 fts_lfree (FTSENT *);
+-static void	 fts_load (FTS *, FTSENT *);
+-static size_t	 fts_maxarglen (char * const *);
+-static void	 fts_padjust (FTS *, FTSENT *);
+-static int	 fts_palloc (FTS *, size_t);
+-static FTSENT	*fts_sort (FTS *, FTSENT *, int);
+-static u_short	 fts_stat (FTS *, FTSENT *, int);
+-static int      fts_safe_changedir (FTS *, FTSENT *, int, const char *);
+-
+-#ifndef MAX
+-#define MAX(a, b)	(a > b ? a : b)
+-#endif
+-
+-#define	ISDOT(a)	(a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
+-
+-#define CLR(opt)	(sp->fts_options &= ~(opt))
+-#define	ISSET(opt)	(sp->fts_options & (opt))
+-#define	SET(opt)	(sp->fts_options |= (opt))
+-
+-#define	FCHDIR(sp, fd)	(!ISSET(FTS_NOCHDIR) && fchdir(fd))
+-
+-#define	BREAD		3		/* fts_read */
+-
+-FTS *
+-fts_open(argv, koptions, compar)
+-	char * const *argv;
+-	register int koptions;
+-	int (*compar) (const FTSENT **, const FTSENT **);
+-{
+-	register FTS *sp;
+-	register FTSENT *p, *root;
+-	register int nitems;
+-	FTSENT *parent, *tmp;
+-	int len;
+-
+-tmp = NULL;	/* stop compiler whinging */
+-	/* Options check. */
+-	if (koptions & ~FTS_OPTIONMASK) {
+-		errno = EINVAL;
+-		return (NULL);
+-	}
+-
+-	/* Allocate/initialize the stream */
+-	if ((sp = malloc((u_int)sizeof(FTS))) == NULL)
+-		return (NULL);
+-	memset(sp, 0, sizeof(FTS));
+-	sp->fts_compar = (int (*) (const void *, const void *)) compar;
+-	sp->fts_options = koptions;
+-
+-	/* Logical walks turn on NOCHDIR; symbolic links are too hard. */
+-	if (ISSET(FTS_LOGICAL))
+-		SET(FTS_NOCHDIR);
+-
+-	/*
+-	 * Start out with 1K of path space, and enough, in any case,
+-	 * to hold the user's paths.
+-	 */
+-#ifndef MAXPATHLEN
+-#define MAXPATHLEN 1024
+-#endif
+-	if (fts_palloc(sp, MAX(fts_maxarglen(argv), MAXPATHLEN)))
+-		goto mem1;
+-
+-	/* Allocate/initialize root's parent. */
+-	if ((parent = fts_alloc(sp, "", 0)) == NULL)
+-		goto mem2;
+-	parent->fts_level = FTS_ROOTPARENTLEVEL;
+-
+-	/* Allocate/initialize root(s). */
+-	for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) {
+-		/* Don't allow zero-length paths. */
+-		if ((len = strlen(*argv)) == 0) {
+-			errno = ENOENT;
+-			goto mem3;
+-		}
+-
+-		p = fts_alloc(sp, *argv, len);
+-		p->fts_level = FTS_ROOTLEVEL;
+-		p->fts_parent = parent;
+-		p->fts_accpath = p->fts_name;
+-		p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW));
+-
+-		/* Command-line "." and ".." are real directories. */
+-		if (p->fts_info == FTS_DOT)
+-			p->fts_info = FTS_D;
+-
+-		/*
+-		 * If comparison routine supplied, traverse in sorted
+-		 * order; otherwise traverse in the order specified.
+-		 */
+-		if (compar) {
+-			p->fts_link = root;
+-			root = p;
+-		} else {
+-			p->fts_link = NULL;
+-			if (root == NULL)
+-				tmp = root = p;
+-			else {
+-				tmp->fts_link = p;
+-				tmp = p;
+-			}
+-		}
+-	}
+-	if (compar && nitems > 1)
+-		root = fts_sort(sp, root, nitems);
+-
+-	/*
+-	 * Allocate a dummy pointer and make fts_read think that we've just
+-	 * finished the node before the root(s); set p->fts_info to FTS_INIT
+-	 * so that everything about the "current" node is ignored.
+-	 */
+-	if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL)
+-		goto mem3;
+-	sp->fts_cur->fts_link = root;
+-	sp->fts_cur->fts_info = FTS_INIT;
+-
+-	/*
+-	 * If using chdir(2), grab a file descriptor pointing to dot to ensure
+-	 * that we can get back here; this could be avoided for some paths,
+-	 * but almost certainly not worth the effort.  Slashes, symbolic links,
+-	 * and ".." are all fairly nasty problems.  Note, if we can't get the
+-	 * descriptor we run anyway, just more slowly.
+-	 */
+-	if (!ISSET(FTS_NOCHDIR)
+-	    && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
+-		SET(FTS_NOCHDIR);
+-
+-	return (sp);
+-
+-mem3:	fts_lfree(root);
+-	free(parent);
+-mem2:	free(sp->fts_path);
+-mem1:	free(sp);
+-	return (NULL);
+-}
+-
+-static void
+-fts_load(sp, p)
+-	FTS *sp;
+-	register FTSENT *p;
+-{
+-	register int len;
+-	register char *cp;
+-
+-	/*
+-	 * Load the stream structure for the next traversal.  Since we don't
+-	 * actually enter the directory until after the preorder visit, set
+-	 * the fts_accpath field specially so the chdir gets done to the right
+-	 * place and the user can access the first node.  From fts_open it's
+-	 * known that the path will fit.
+-	 */
+-	len = p->fts_pathlen = p->fts_namelen;
+-	memmove(sp->fts_path, p->fts_name, len + 1);
+-	if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) {
+-		len = strlen(++cp);
+-		memmove(p->fts_name, cp, len + 1);
+-		p->fts_namelen = len;
+-	}
+-	p->fts_accpath = p->fts_path = sp->fts_path;
+-	sp->fts_dev = p->fts_dev;
+-}
+-
+-int
+-fts_close(sp)
+-	FTS *sp;
+-{
+-	register FTSENT *freep, *p;
+-	int saved_errno;
+-
+-	/*
+-	 * This still works if we haven't read anything -- the dummy structure
+-	 * points to the root list, so we step through to the end of the root
+-	 * list which has a valid parent pointer.
+-	 */
+-	if (sp->fts_cur) {
+-		for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) {
+-			freep = p;
+-			p = p->fts_link != NULL ? p->fts_link : p->fts_parent;
+-			free(freep);
+-		}
+-		free(p);
+-	}
+-
+-	/* Free up child linked list, sort array, path buffer. */
+-	if (sp->fts_child)
+-		fts_lfree(sp->fts_child);
+-	if (sp->fts_array)
+-		free(sp->fts_array);
+-	free(sp->fts_path);
+-
+-	/* Return to original directory, save errno if necessary. */
+-	if (!ISSET(FTS_NOCHDIR)) {
+-		saved_errno = fchdir(sp->fts_rfd) ? errno : 0;
+-		(void)close(sp->fts_rfd);
+-
+-		/* Set errno and return. */
+-		if (saved_errno != 0) {
+-			/* Free up the stream pointer. */
+-			free(sp);
+-			errno = saved_errno;
+-			return (-1);
+-		}
+-	}
+-
+-	/* Free up the stream pointer. */
+-	free(sp);
+-	return (0);
+-}
+-
+-/*
+- * Special case of "/" at the end of the path so that slashes aren't
+- * appended which would cause paths to be written as "....//foo".
+- */
+-#define	NAPPEND(p)							\
+-	(p->fts_path[p->fts_pathlen - 1] == '/'				\
+-	    ? p->fts_pathlen - 1 : p->fts_pathlen)
+-
+-FTSENT *
+-fts_read(sp)
+-	register FTS *sp;
+-{
+-	register FTSENT *p, *tmp;
+-	register int instr;
+-	register char *t;
+-	int saved_errno;
+-
+-	/* If finished or unrecoverable error, return NULL. */
+-	if (sp->fts_cur == NULL || ISSET(FTS_STOP))
+-		return (NULL);
+-
+-	/* Set current node pointer. */
+-	p = sp->fts_cur;
+-
+-	/* Save and zero out user instructions. */
+-	instr = p->fts_instr;
+-	p->fts_instr = FTS_NOINSTR;
+-
+-	/* Any type of file may be re-visited; re-stat and re-turn. */
+-	if (instr == FTS_AGAIN) {
+-		p->fts_info = fts_stat(sp, p, 0);
+-		return (p);
+-	}
+-
+-	/*
+-	 * Following a symlink -- SLNONE test allows application to see
+-	 * SLNONE and recover.  If indirecting through a symlink, have
+-	 * keep a pointer to current location.  If unable to get that
+-	 * pointer, follow fails.
+-	 */
+-	if (instr == FTS_FOLLOW &&
+-	    (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) {
+-		p->fts_info = fts_stat(sp, p, 1);
+-		if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
+-			if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) {
+-				p->fts_errno = errno;
+-				p->fts_info = FTS_ERR;
+-			} else
+-				p->fts_flags |= FTS_SYMFOLLOW;
+-		}
+-		return (p);
+-	}
+-
+-	/* Directory in pre-order. */
+-	if (p->fts_info == FTS_D) {
+-		/* If skipped or crossed mount point, do post-order visit. */
+-		if (instr == FTS_SKIP ||
+-		    (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
+-			if (p->fts_flags & FTS_SYMFOLLOW)
+-				(void)close(p->fts_symfd);
+-			if (sp->fts_child) {
+-				fts_lfree(sp->fts_child);
+-				sp->fts_child = NULL;
+-			}
+-			p->fts_info = FTS_DP;
+-			return (p);
+-		}
+-
+-		/* Rebuild if only read the names and now traversing. */
+-		if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) {
+-			CLR(FTS_NAMEONLY);
+-			fts_lfree(sp->fts_child);
+-			sp->fts_child = NULL;
+-		}
+-
+-		/*
+-		 * Cd to the subdirectory.
+-		 *
+-		 * If have already read and now fail to chdir, whack the list
+-		 * to make the names come out right, and set the parent errno
+-		 * so the application will eventually get an error condition.
+-		 * Set the FTS_DONTCHDIR flag so that when we logically change
+-		 * directories back to the parent we don't do a chdir.
+-		 *
+-		 * If haven't read do so.  If the read fails, fts_build sets
+-		 * FTS_STOP or the fts_info field of the node.
+-		 */
+-		if (sp->fts_child != NULL) {
+-			if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) {
+-				p->fts_errno = errno;
+-				p->fts_flags |= FTS_DONTCHDIR;
+-				for (p = sp->fts_child; p != NULL;
+-				     p = p->fts_link)
+-					p->fts_accpath =
+-					    p->fts_parent->fts_accpath;
+-			}
+-		} else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) {
+-			if (ISSET(FTS_STOP))
+-				return (NULL);
+-			return (p);
+-		}
+-		p = sp->fts_child;
+-		sp->fts_child = NULL;
+-		goto name;
+-	}
+-
+-	/* Move to the next node on this level. */
+-next:	tmp = p;
+-	if ((p = p->fts_link) != NULL) {
+-		free(tmp);
+-
+-		/*
+-		 * If reached the top, return to the original directory (or
+-		 * the root of the tree), and load the paths for the next root.
+-		 */
+-		if (p->fts_level == FTS_ROOTLEVEL) {
+-			if (FCHDIR(sp, sp->fts_rfd)) {
+-				SET(FTS_STOP);
+-				return (NULL);
+-			}
+-			fts_load(sp, p);
+-			return (sp->fts_cur = p);
+-		}
+-
+-		/*
+-		 * User may have called fts_set on the node.  If skipped,
+-		 * ignore.  If followed, get a file descriptor so we can
+-		 * get back if necessary.
+-		 */
+-		if (p->fts_instr == FTS_SKIP)
+-			goto next;
+-		if (p->fts_instr == FTS_FOLLOW) {
+-			p->fts_info = fts_stat(sp, p, 1);
+-			if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) {
+-				if ((p->fts_symfd =
+-				    open(".", O_RDONLY, 0)) < 0) {
+-					p->fts_errno = errno;
+-					p->fts_info = FTS_ERR;
+-				} else
+-					p->fts_flags |= FTS_SYMFOLLOW;
+-			}
+-			p->fts_instr = FTS_NOINSTR;
+-		}
+-
+-name:		t = sp->fts_path + NAPPEND(p->fts_parent);
+-		*t++ = '/';
+-		memmove(t, p->fts_name, p->fts_namelen + 1);
+-		return (sp->fts_cur = p);
+-	}
+-
+-	/* Move up to the parent node. */
+-	p = tmp->fts_parent;
+-	free(tmp);
+-
+-	if (p->fts_level == FTS_ROOTPARENTLEVEL) {
+-		/*
+-		 * Done; free everything up and set errno to 0 so the user
+-		 * can distinguish between error and EOF.
+-		 */
+-		free(p);
+-		errno = 0;
+-		return (sp->fts_cur = NULL);
+-	}
+-
+-	/* NUL terminate the pathname. */
+-	sp->fts_path[p->fts_pathlen] = '\0';
+-
+-	/*
+-	 * Return to the parent directory.  If at a root node or came through
+-	 * a symlink, go back through the file descriptor.  Otherwise, cd up
+-	 * one directory.
+-	 */
+-	if (p->fts_level == FTS_ROOTLEVEL) {
+-		if (FCHDIR(sp, sp->fts_rfd)) {
+-			SET(FTS_STOP);
+-			return (NULL);
+-		}
+-	} else if (p->fts_flags & FTS_SYMFOLLOW) {
+-		if (FCHDIR(sp, p->fts_symfd)) {
+-			saved_errno = errno;
+-			(void)close(p->fts_symfd);
+-			errno = saved_errno;
+-			SET(FTS_STOP);
+-			return (NULL);
+-		}
+-		(void)close(p->fts_symfd);
+-	} else if (!(p->fts_flags & FTS_DONTCHDIR) &&
+-		   fts_safe_changedir(sp, p->fts_parent, -1, "..")) {
+-		SET(FTS_STOP);
+-		return (NULL);
+-	}
+-	p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP;
+-	return (sp->fts_cur = p);
+-}
+-
+-/*
+- * Fts_set takes the stream as an argument although it's not used in this
+- * implementation; it would be necessary if anyone wanted to add global
+- * semantics to fts using fts_set.  An error return is allowed for similar
+- * reasons.
+- */
+-/* ARGSUSED */
+-int
+-fts_set(sp, p, instr)
+-	FTS __attribute__((__unused__)) *sp;
+-	FTSENT *p;
+-	int instr;
+-{
+-sp = NULL;	/* stop compiler whinging */
+-	if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW &&
+-	    instr != FTS_NOINSTR && instr != FTS_SKIP) {
+-		errno = EINVAL;
+-		return (1);
+-	}
+-	p->fts_instr = instr;
+-	return (0);
+-}
+-
+-/*
+- * This is the tricky part -- do not casually change *anything* in here.  The
+- * idea is to build the linked list of entries that are used by fts_children
+- * and fts_read.  There are lots of special cases.
+- *
+- * The real slowdown in walking the tree is the stat calls.  If FTS_NOSTAT is
+- * set and it's a physical walk (so that symbolic links can't be directories),
+- * we can do things quickly.  First, if it's a 4.4BSD file system, the type
+- * of the file is in the directory entry.  Otherwise, we assume that the number
+- * of subdirectories in a node is equal to the number of links to the parent.
+- * The former skips all stat calls.  The latter skips stat calls in any leaf
+- * directories and for any files after the subdirectories in the directory have
+- * been found, cutting the stat calls by about 2/3.
+- */
+-static FTSENT *
+-fts_build(sp, type)
+-	register FTS *sp;
+-	int type;
+-{
+-	register struct dirent *dp;
+-	register FTSENT *p, *head;
+-	register int nitems;
+-	FTSENT *cur, *tail;
+-	DIR *dirp;
+-	void *oldaddr;
+-	int cderrno, descend, len, level, nlinks, saved_errno,
+-	    nostat, doadjust;
+-	size_t maxlen;
+-	char *cp;
+-
+-	/* Set current node pointer. */
+-	cur = sp->fts_cur;
+-
+-	/*
+-	 * Open the directory for reading.  If this fails, we're done.
+-	 * If being called from fts_read, set the fts_info field.
+-	 */
+-       if ((dirp = opendir(cur->fts_accpath)) == NULL) {
+-		if (type == BREAD) {
+-			cur->fts_info = FTS_DNR;
+-			cur->fts_errno = errno;
+-		}
+-		return (NULL);
+-	}
+-
+-	/*
+-	 * Nlinks is the number of possible entries of type directory in the
+-	 * directory if we're cheating on stat calls, 0 if we're not doing
+-	 * any stat calls at all, -1 if we're doing stats on everything.
+-	 */
+-	nlinks = -1;
+-	nostat = 0;
+-
+-	/*
+-	 * If we're going to need to stat anything or we want to descend
+-	 * and stay in the directory, chdir.  If this fails we keep going,
+-	 * but set a flag so we don't chdir after the post-order visit.
+-	 * We won't be able to stat anything, but we can still return the
+-	 * names themselves.  Note, that since fts_read won't be able to
+-	 * chdir into the directory, it will have to return different path
+-	 * names than before, i.e. "a/b" instead of "b".  Since the node
+-	 * has already been visited in pre-order, have to wait until the
+-	 * post-order visit to return the error.  There is a special case
+-	 * here, if there was nothing to stat then it's not an error to
+-	 * not be able to stat.  This is all fairly nasty.  If a program
+-	 * needed sorted entries or stat information, they had better be
+-	 * checking FTS_NS on the returned nodes.
+-	 */
+-	cderrno = 0;
+-	if (nlinks || type == BREAD) {
+-		if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
+-			if (nlinks && type == BREAD)
+-				cur->fts_errno = errno;
+-			cur->fts_flags |= FTS_DONTCHDIR;
+-			descend = 0;
+-			cderrno = errno;
+-			(void)closedir(dirp);
+-			dirp = NULL;
+-		} else
+-			descend = 1;
+-	} else
+-		descend = 0;
+-
+-	/*
+-	 * Figure out the max file name length that can be stored in the
+-	 * current path -- the inner loop allocates more path as necessary.
+-	 * We really wouldn't have to do the maxlen calculations here, we
+-	 * could do them in fts_read before returning the path, but it's a
+-	 * lot easier here since the length is part of the dirent structure.
+-	 *
+-	 * If not changing directories set a pointer so that can just append
+-	 * each new name into the path.
+-	 */
+-	len = NAPPEND(cur);
+-	if (ISSET(FTS_NOCHDIR)) {
+-		cp = sp->fts_path + len;
+-		*cp++ = '/';
+-	} else {
+-		/* GCC, you're too verbose. */
+-		cp = NULL;
+-	}
+-	len++;
+-	maxlen = sp->fts_pathlen - len;
+-
+-	level = cur->fts_level + 1;
+-
+-	/* Read the directory, attaching each entry to the `link' pointer. */
+-	doadjust = 0;
+-	for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) {
+-		if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
+-			continue;
+-
+-		if ((p = fts_alloc(sp, dp->d_name, (int)_D_EXACT_NAMLEN (dp))) == NULL)
+-			goto mem1;
+-		if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */
+-			oldaddr = sp->fts_path;
+-			if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) {
+-				/*
+-				 * No more memory for path or structures.  Save
+-				 * errno, free up the current structure and the
+-				 * structures already allocated.
+-				 */
+-mem1:				saved_errno = errno;
+-				if (p)
+-					free(p);
+-				fts_lfree(head);
+-				(void)closedir(dirp);
+-				cur->fts_info = FTS_ERR;
+-				SET(FTS_STOP);
+-				errno = saved_errno;
+-				return (NULL);
+-			}
+-			/* Did realloc() change the pointer? */
+-			if (oldaddr != sp->fts_path) {
+-				doadjust = 1;
+-				if (ISSET(FTS_NOCHDIR))
+-					cp = sp->fts_path + len;
+-			}
+-			maxlen = sp->fts_pathlen - len;
+-		}
+-
+-		if (len + _D_EXACT_NAMLEN (dp) >= 0x10000) {
+-			/*
+-			 * In an FTSENT, fts_pathlen is a u_short so it is
+-			 * possible to wraparound here.  If we do, free up
+-			 * the current structure and the structures already
+-			 * allocated, then error out with ENAMETOOLONG.
+-			 */
+-			free(p);
+-			fts_lfree(head);
+-			(void)closedir(dirp);
+-			cur->fts_info = FTS_ERR;
+-			SET(FTS_STOP);
+-			errno = ENAMETOOLONG;
+-			return (NULL);
+-		}
+-		p->fts_level = level;
+-		p->fts_parent = sp->fts_cur;
+-		p->fts_pathlen = len + _D_EXACT_NAMLEN (dp);
+-
+-#if defined FTS_WHITEOUT && 0
+-		if (dp->d_type == DT_WHT)
+-			p->fts_flags |= FTS_ISW;
+-#endif
+-
+-		if (cderrno) {
+-			if (nlinks) {
+-				p->fts_info = FTS_NS;
+-				p->fts_errno = cderrno;
+-			} else
+-				p->fts_info = FTS_NSOK;
+-			p->fts_accpath = cur->fts_accpath;
+-		} else if (nlinks == 0
+-#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
+-			   || (nostat &&
+-			       dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
+-#endif
+-		    ) {
+-			p->fts_accpath =
+-			    ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name;
+-			p->fts_info = FTS_NSOK;
+-		} else {
+-			/* Build a file name for fts_stat to stat. */
+-			if (ISSET(FTS_NOCHDIR)) {
+-				p->fts_accpath = p->fts_path;
+-				memmove(cp, p->fts_name, p->fts_namelen + 1);
+-			} else
+-				p->fts_accpath = p->fts_name;
+-			/* Stat it. */
+-			p->fts_info = fts_stat(sp, p, 0);
+-
+-			/* Decrement link count if applicable. */
+-			if (nlinks > 0 && (p->fts_info == FTS_D ||
+-			    p->fts_info == FTS_DC || p->fts_info == FTS_DOT))
+-				--nlinks;
+-		}
+-
+-		/* We walk in directory order so "ls -f" doesn't get upset. */
+-		p->fts_link = NULL;
+-		if (head == NULL)
+-			head = tail = p;
+-		else {
+-			tail->fts_link = p;
+-			tail = p;
+-		}
+-		++nitems;
+-	}
+-	if (dirp)
+-		(void)closedir(dirp);
+-
+-	/*
+-	 * If realloc() changed the address of the path, adjust the
+-	 * addresses for the rest of the tree and the dir list.
+-	 */
+-	if (doadjust)
+-		fts_padjust(sp, head);
+-
+-	/*
+-	 * If not changing directories, reset the path back to original
+-	 * state.
+-	 */
+-	if (ISSET(FTS_NOCHDIR)) {
+-		if (len == sp->fts_pathlen || nitems == 0)
+-			--cp;
+-		*cp = '\0';
+-	}
+-
+-	/*
+-	 * If descended after called from fts_children or after called from
+-	 * fts_read and nothing found, get back.  At the root level we use
+-	 * the saved fd; if one of fts_open()'s arguments is a relative path
+-	 * to an empty directory, we wind up here with no other way back.  If
+-	 * can't get back, we're done.
+-	 */
+-	if (descend && nitems == 0 &&
+-	    (cur->fts_level == FTS_ROOTLEVEL ?
+-	     FCHDIR(sp, sp->fts_rfd) :
+-	     fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
+-		cur->fts_info = FTS_ERR;
+-		SET(FTS_STOP);
+-		return (NULL);
+-	}
+-
+-	/* If didn't find anything, return NULL. */
+-	if (!nitems) {
+-		if (type == BREAD)
+-			cur->fts_info = FTS_DP;
+-		return (NULL);
+-	}
+-
+-	/* Sort the entries. */
+-	if (sp->fts_compar && nitems > 1)
+-		head = fts_sort(sp, head, nitems);
+-	return (head);
+-}
+-
+-static u_short
+-fts_stat(sp, p, follow)
+-	FTS *sp;
+-	register FTSENT *p;
+-	int follow;
+-{
+-	register FTSENT *t;
+-	register dev_t dev;
+-	register ino_t ino;
+-	struct stat *sbp;
+-	int saved_errno;
+-
+-	/* If user needs stat info, stat buffer already allocated. */
+-	sbp = p->fts_statp;
+-
+-#if defined FTS_WHITEOUT && 0
+-	/* check for whiteout */
+-	if (p->fts_flags & FTS_ISW) {
+-		if (sbp != &sb) {
+-			memset(sbp, '\0', sizeof (*sbp));
+-			sbp->st_mode = S_IFWHT;
+-		}
+-		return (FTS_W);
+-       }
+-#endif
+-
+-	/*
+-	 * If doing a logical walk, or application requested FTS_FOLLOW, do
+-	 * a stat(2).  If that fails, check for a non-existent symlink.  If
+-	 * fail, set the errno from the stat call.
+-	 */
+-	if (ISSET(FTS_LOGICAL) || follow) {
+-		if (stat(p->fts_accpath, sbp)) {
+-			saved_errno = errno;
+-			if (!lstat(p->fts_accpath, sbp)) {
+-				errno = 0;
+-				return (FTS_SLNONE);
+-			}
+-			p->fts_errno = saved_errno;
+-			goto err;
+-		}
+-	} else if (lstat(p->fts_accpath, sbp)) {
+-		p->fts_errno = errno;
+-err:		memset(sbp, 0, sizeof(struct stat));
+-		return (FTS_NS);
+-	}
+-
+-	if (S_ISDIR(sbp->st_mode)) {
+-		/*
+-		 * Set the device/inode.  Used to find cycles and check for
+-		 * crossing mount points.  Also remember the link count, used
+-		 * in fts_build to limit the number of stat calls.  It is
+-		 * understood that these fields are only referenced if fts_info
+-		 * is set to FTS_D.
+-		 */
+-		dev = p->fts_dev = sbp->st_dev;
+-		ino = p->fts_ino = sbp->st_ino;
+-		p->fts_nlink = sbp->st_nlink;
+-
+-		if (ISDOT(p->fts_name))
+-			return (FTS_DOT);
+-
+-		/*
+-		 * Cycle detection is done by brute force when the directory
+-		 * is first encountered.  If the tree gets deep enough or the
+-		 * number of symbolic links to directories is high enough,
+-		 * something faster might be worthwhile.
+-		 */
+-		for (t = p->fts_parent;
+-		    t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent)
+-			if (ino == t->fts_ino && dev == t->fts_dev) {
+-				p->fts_cycle = t;
+-				return (FTS_DC);
+-			}
+-		return (FTS_D);
+-	}
+-	if (S_ISLNK(sbp->st_mode))
+-		return (FTS_SL);
+-	if (S_ISREG(sbp->st_mode))
+-		return (FTS_F);
+-	return (FTS_DEFAULT);
+-}
+-
+-static FTSENT *
+-fts_sort(sp, head, nitems)
+-	FTS *sp;
+-	FTSENT *head;
+-	register int nitems;
+-{
+-	register FTSENT **ap, *p;
+-
+-	/*
+-	 * Construct an array of pointers to the structures and call qsort(3).
+-	 * Reassemble the array in the order returned by qsort.  If unable to
+-	 * sort for memory reasons, return the directory entries in their
+-	 * current order.  Allocate enough space for the current needs plus
+-	 * 40 so don't realloc one entry at a time.
+-	 */
+-	if (nitems > sp->fts_nitems) {
+-		struct _ftsent **a;
+-
+-		sp->fts_nitems = nitems + 40;
+-		if ((a = realloc(sp->fts_array,
+- 		    (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) {
+-			free(sp->fts_array);
+-			sp->fts_array = NULL;
+-			sp->fts_nitems = 0;
+-			return (head);
+-		}
+-		sp->fts_array = a;
+-	}
+-	for (ap = sp->fts_array, p = head; p; p = p->fts_link)
+-		*ap++ = p;
+-	qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar);
+-	for (head = *(ap = sp->fts_array); --nitems; ++ap)
+-		ap[0]->fts_link = ap[1];
+-	ap[0]->fts_link = NULL;
+-	return (head);
+-}
+-
+-static FTSENT *
+-fts_alloc(sp, name, namelen)
+-	FTS *sp;
+-	const char *name;
+-	register int namelen;
+-{
+-	register FTSENT *p;
+-	size_t len;
+-
+-	/*
+-	 * The file name is a variable length array and no stat structure is
+-	 * necessary if the user has set the nostat bit.  Allocate the FTSENT
+-	 * structure, the file name and the stat structure in one chunk, but
+-	 * be careful that the stat structure is reasonably aligned.  Since the
+-	 * fts_name field is declared to be of size 1, the fts_name pointer is
+-	 * namelen + 2 before the first possible address of the stat structure.
+-	 */
+-	len = sizeof(FTSENT) + namelen;
+-	len += sizeof(struct stat) + ALIGNBYTES;
+-	if ((p = malloc(len)) == NULL)
+-		return (NULL);
+-
+-	/* Copy the name and guarantee NUL termination. */
+-	memmove(p->fts_name, name, namelen);
+-	p->fts_name[namelen] = '\0';
+-
+-	p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2);
+-	p->fts_namelen = namelen;
+-	p->fts_path = sp->fts_path;
+-	p->fts_errno = 0;
+-	p->fts_flags = 0;
+-	p->fts_instr = FTS_NOINSTR;
+-	p->fts_number = 0;
+-	p->fts_pointer = NULL;
+-	return (p);
+-}
+-
+-static void
+-fts_lfree(head)
+-	register FTSENT *head;
+-{
+-	register FTSENT *p;
+-
+-	/* Free a linked list of structures. */
+-	while ((p = head)) {
+-		head = head->fts_link;
+-		free(p);
+-	}
+-}
+-
+-/*
+- * Allow essentially unlimited paths; find, rm, ls should all work on any tree.
+- * Most systems will allow creation of paths much longer than MAXPATHLEN, even
+- * though the kernel won't resolve them.  Add the size (not just what's needed)
+- * plus 256 bytes so don't realloc the path 2 bytes at a time.
+- */
+-static int
+-fts_palloc(sp, more)
+-	FTS *sp;
+-	size_t more;
+-{
+-	char *p;
+-
+-	sp->fts_pathlen += more + 256;
+-	/*
+-	 * Check for possible wraparound.  In an FTS, fts_pathlen is
+-	 * a signed int but in an FTSENT it is an unsigned short.
+-	 * We limit fts_pathlen to USHRT_MAX to be safe in both cases.
+-	 */
+-	if (sp->fts_pathlen < 0 || sp->fts_pathlen >= 0x10000) {
+-		if (sp->fts_path) {
+-			free(sp->fts_path);
+-			sp->fts_path = NULL;
+-		}
+-		sp->fts_path = NULL;
+-		errno = ENAMETOOLONG;
+-		return (1);
+-	}
+-	p = realloc(sp->fts_path, sp->fts_pathlen);
+-	if (p == NULL) {
+-		free(sp->fts_path);
+-		sp->fts_path = NULL;
+-		return 1;
+-	}
+-	sp->fts_path = p;
+-	return 0;
+-}
+-
+-/*
+- * When the path is realloc'd, have to fix all of the pointers in structures
+- * already returned.
+- */
+-static void
+-fts_padjust(sp, head)
+-	FTS *sp;
+-	FTSENT *head;
+-{
+-	FTSENT *p;
+-	char *addr = sp->fts_path;
+-
+-#define	ADJUST(p) do {							\
+-	if ((p)->fts_accpath != (p)->fts_name) {			\
+-		(p)->fts_accpath =					\
+-		    (char *)addr + ((p)->fts_accpath - (p)->fts_path);	\
+-	}								\
+-	(p)->fts_path = addr;						\
+-} while (0)
+-	/* Adjust the current set of children. */
+-	for (p = sp->fts_child; p; p = p->fts_link)
+-		ADJUST(p);
+-
+-	/* Adjust the rest of the tree, including the current level. */
+-	for (p = head; p->fts_level >= FTS_ROOTLEVEL;) {
+-		ADJUST(p);
+-		p = p->fts_link ? p->fts_link : p->fts_parent;
+-	}
+-}
+-
+-static size_t
+-fts_maxarglen(argv)
+-	char * const *argv;
+-{
+-	size_t len, max;
+-
+-	for (max = 0; *argv; ++argv)
+-		if ((len = strlen(*argv)) > max)
+-			max = len;
+-	return (max + 1);
+-}
+-
+-/*
+- * Change to dir specified by fd or p->fts_accpath without getting
+- * tricked by someone changing the world out from underneath us.
+- * Assumes p->fts_dev and p->fts_ino are filled in.
+- */
+-static int
+-fts_safe_changedir(sp, p, fd, path)
+-	FTS *sp;
+-	FTSENT *p;
+-	int fd;
+-	const char *path;
+-{
+-	int ret, oerrno, newfd;
+-	struct stat sb;
+-
+-	newfd = fd;
+-	if (ISSET(FTS_NOCHDIR))
+-		return (0);
+-	if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0)
+-		return (-1);
+-	if (fstat(newfd, &sb)) {
+-		ret = -1;
+-		goto bail;
+-	}
+-	if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
+-		errno = ENOENT;		/* disinformation */
+-		ret = -1;
+-		goto bail;
+-	}
+-	ret = fchdir(newfd);
+-bail:
+-	oerrno = errno;
+-	if (fd < 0)
+-		(void)close(newfd);
+-	errno = oerrno;
+-	return (ret);
+-}
+diff --git a/lib/fts.h b/lib/fts.h
+deleted file mode 100644
+index 58846b9..0000000
+--- a/lib/fts.h
++++ /dev/null
+@@ -1,131 +0,0 @@
+-/*
+- * Copyright (c) 1989, 1993
+- *	The Regents of the University of California.  All rights reserved.
+- *
+- * Redistribution and use in source and binary forms, with or without
+- * modification, are permitted provided that the following conditions
+- * are met:
+- * 1. Redistributions of source code must retain the above copyright
+- *    notice, this list of conditions and the following disclaimer.
+- * 2. Redistributions in binary form must reproduce the above copyright
+- *    notice, this list of conditions and the following disclaimer in the
+- *    documentation and/or other materials provided with the distribution.
+- * 4. Neither the name of the University nor the names of its contributors
+- *    may be used to endorse or promote products derived from this software
+- *    without specific prior written permission.
+- *
+- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+- * SUCH DAMAGE.
+- *
+- *	@(#)fts.h	8.3 (Berkeley) 8/14/94
+- */
+-
+-#ifndef	_FTS_H
+-#define	_FTS_H 1
+-
+-#include <features.h>
+-#include <sys/types.h>
+-
+-typedef struct {
+-	struct _ftsent *fts_cur;	/* current node */
+-	struct _ftsent *fts_child;	/* linked list of children */
+-	struct _ftsent **fts_array;	/* sort array */
+-	dev_t fts_dev;			/* starting device # */
+-	char *fts_path;			/* path for this descent */
+-	int fts_rfd;			/* fd for root */
+-	int fts_pathlen;		/* sizeof(path) */
+-	int fts_nitems;			/* elements in the sort array */
+-	int (*fts_compar) (const void *, const void *); /* compare fn */
+-
+-#define	FTS_COMFOLLOW	0x0001		/* follow command line symlinks */
+-#define	FTS_LOGICAL	0x0002		/* logical walk */
+-#define	FTS_NOCHDIR	0x0004		/* don't change directories */
+-#define	FTS_NOSTAT	0x0008		/* don't get stat info */
+-#define	FTS_PHYSICAL	0x0010		/* physical walk */
+-#define	FTS_SEEDOT	0x0020		/* return dot and dot-dot */
+-#define	FTS_XDEV	0x0040		/* don't cross devices */
+-#define FTS_WHITEOUT	0x0080		/* return whiteout information */
+-#define	FTS_OPTIONMASK	0x00ff		/* valid user option mask */
+-
+-#define	FTS_NAMEONLY	0x0100		/* (private) child names only */
+-#define	FTS_STOP	0x0200		/* (private) unrecoverable error */
+-	int fts_options;		/* fts_open options, global flags */
+-} FTS;
+-
+-typedef struct _ftsent {
+-	struct _ftsent *fts_cycle;	/* cycle node */
+-	struct _ftsent *fts_parent;	/* parent directory */
+-	struct _ftsent *fts_link;	/* next file in directory */
+-	long fts_number;	        /* local numeric value */
+-	void *fts_pointer;	        /* local address value */
+-	char *fts_accpath;		/* access path */
+-	char *fts_path;			/* root path */
+-	int fts_errno;			/* errno for this node */
+-	int fts_symfd;			/* fd for symlink */
+-	u_short fts_pathlen;		/* strlen(fts_path) */
+-	u_short fts_namelen;		/* strlen(fts_name) */
+-
+-	ino_t fts_ino;			/* inode */
+-	dev_t fts_dev;			/* device */
+-	nlink_t fts_nlink;		/* link count */
+-
+-#define	FTS_ROOTPARENTLEVEL	-1
+-#define	FTS_ROOTLEVEL		 0
+-	short fts_level;		/* depth (-1 to N) */
+-
+-#define	FTS_D		 1		/* preorder directory */
+-#define	FTS_DC		 2		/* directory that causes cycles */
+-#define	FTS_DEFAULT	 3		/* none of the above */
+-#define	FTS_DNR		 4		/* unreadable directory */
+-#define	FTS_DOT		 5		/* dot or dot-dot */
+-#define	FTS_DP		 6		/* postorder directory */
+-#define	FTS_ERR		 7		/* error; errno is set */
+-#define	FTS_F		 8		/* regular file */
+-#define	FTS_INIT	 9		/* initialized only */
+-#define	FTS_NS		10		/* stat(2) failed */
+-#define	FTS_NSOK	11		/* no stat(2) requested */
+-#define	FTS_SL		12		/* symbolic link */
+-#define	FTS_SLNONE	13		/* symbolic link without target */
+-#define FTS_W		14		/* whiteout object */
+-	u_short fts_info;		/* user flags for FTSENT structure */
+-
+-#define	FTS_DONTCHDIR	 0x01		/* don't chdir .. to the parent */
+-#define	FTS_SYMFOLLOW	 0x02		/* followed a symlink to get here */
+-	u_short fts_flags;		/* private flags for FTSENT structure */
+-
+-#define	FTS_AGAIN	 1		/* read node again */
+-#define	FTS_FOLLOW	 2		/* follow symbolic link */
+-#define	FTS_NOINSTR	 3		/* no instructions */
+-#define	FTS_SKIP	 4		/* discard node */
+-	u_short fts_instr;		/* fts_set() instructions */
+-
+-	struct stat *fts_statp;		/* stat(2) information */
+-	char fts_name[1];		/* file name */
+-} FTSENT;
+-
+-__BEGIN_DECLS
+-
+-#define fts_children pax_fts_children
+-#define fts_close pax_fts_close
+-#define fts_open pax_fts_open
+-#define fts_read pax_fts_read
+-#define fts_set pax_fts_set
+-
+-FTSENT	*fts_children (FTS *, int);
+-int	 fts_close (FTS *);
+-FTS	*fts_open (char * const *, int,
+-		   int (*)(const FTSENT **, const FTSENT **));
+-FTSENT	*fts_read (FTS *);
+-int	 fts_set (FTS *, FTSENT *, int) __THROW;
+-__END_DECLS
+-
+-#endif /* fts.h */
+diff --git a/lib/vis.h b/lib/vis.h
+index d34d342..71fa5f4 100644
+--- a/lib/vis.h
++++ b/lib/vis.h
+@@ -73,14 +73,19 @@
+  */
+ #define	UNVIS_END	1	/* no more characters */
+ 
+-#include <sys/cdefs.h>
++#ifndef __P
++#define __P(x) x
++#endif
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ char	*vis __P((char *, int, int, int));
+ int	strvis __P((char *, const char *, int));
+ int	strvisx __P((char *, const char *, size_t, int));
+ int	strunvis __P((char *, const char *));
+ int	unvis __P((char *, char, int *, int));
+-__END_DECLS
+-
++#ifdef __cplusplus
++}
++#endif
+ #endif /* !_VIS_H_ */
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 5ef52a3..227cdef 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -22,4 +22,4 @@ pax_SOURCES = ar_io.c ar_subs.c buf_subs.c cache.c cpio.c\
+ 	file_subs.c ftree.c gen_subs.c getoldopt.c options.c\
+ 	pat_rep.c pax.c sel_subs.c tables.c tar.c tty_subs.c
+ 
+-pax_LDADD = $(top_builddir)/lib/libbsdfunc.a
++pax_LDADD = $(top_builddir)/lib/libbsdfunc.a -lfts
+diff --git a/src/extern.h b/src/extern.h
+index 361fa81..3ed365d 100644
+--- a/src/extern.h
++++ b/src/extern.h
+@@ -37,8 +37,6 @@
+  * External references from each source file
+  */
+ 
+-#include <sys/cdefs.h>
+-
+ /*
+  * ar_io.c
+  */
+diff --git a/src/file_subs.c b/src/file_subs.c
+index 5590ff1..15bc339 100644
+--- a/src/file_subs.c
++++ b/src/file_subs.c
+@@ -52,7 +52,7 @@
+ #include "extern.h"
+ 
+ static int
+-mk_link __P((register char *,register struct stat *,register char *, int));
++mk_link (register char *,register struct stat *,register char *, int);
+ 
+ /*
+  * routines that deal with file operations such as: creating, removing;
+diff --git a/src/tables.c b/src/tables.c
+index 2275bf7..8fddca4 100644
+--- a/src/tables.c
++++ b/src/tables.c
+@@ -39,7 +39,7 @@
+ #include <sys/time.h>
+ #include <sys/stat.h>
+ #include <sys/param.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch b/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
new file mode 100644
index 0000000..58ac9ce
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pax/pax/0001-use-strtoll-instead-of-strtoq.patch
@@ -0,0 +1,33 @@
+From b1f50320332c9c90fa33ab136ef0ec2d12cda461 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 6 Jan 2016 12:30:52 -0800
+Subject: [PATCH] use strtoll instead of strtoq
+
+Use LLONG_MAX instead of LONG_LONG_MAX
+LONG_LONG_MAX is GNU specific
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/options.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/options.c b/src/options.c
+index da8b4cf..c663b4e 100644
+--- a/src/options.c
++++ b/src/options.c
+@@ -1547,8 +1547,8 @@ str_offt (char *val)
+ 
+ #if (SIZEOF_LONG == 4 && SIZEOF_OFF_T == 8) \
+     || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64)
+-  num = strtoq (val, &expr, 0);
+-  if ((num == LONG_LONG_MAX) || (num <= 0) || (expr == val))
++  num = strtoll (val, &expr, 0);
++  if ((num == LLONG_MAX) || (num <= 0) || (expr == val))
+ #else
+   num = strtol (val, &expr, 0);
+   if ((num == LONG_MAX) || (num <= 0) || (expr == val))
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb b/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb
index ad04871..9d1abfb 100644
--- a/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb
+++ b/yocto-poky/meta/recipes-extended/pax/pax_3.4.bb
@@ -12,10 +12,16 @@
 SECTION = "base"
 PR = "r2"
 
+DEPENDS_append_libc-musl = " fts "
+
 SRC_URI = "http://pkgs.fedoraproject.org/repo/pkgs/${BPN}/${BP}.tar.bz2/fbd9023b590b45ac3ade95870702a0d6/${BP}.tar.bz2 \
 	file://fix_for_compile_with_gcc-4.6.0.patch \
 	file://pax-3.4_fix_for_x32.patch"
 
+SRC_URI_append_libc-musl = " file://0001-Fix-build-with-musl.patch \
+                             file://0001-use-strtoll-instead-of-strtoq.patch \
+                           "
+
 SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6"
 SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b"
 
diff --git a/yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb b/yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb
deleted file mode 100644
index 0330981..0000000
--- a/yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.12.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "PBZIP2 is a parallel implementation of bzip2"
-DESCRIPTION = "PBZIP2 is a parallel implementation of the bzip2 block-sorting \
-file compressor that uses pthreads and achieves near-linear speedup on SMP \
-machines. The output of this version is fully compatible with bzip2 v1.0.2 or \
-newer (ie: anything compressed with pbzip2 can be decompressed with bzip2)."
-HOMEPAGE = "http://compression.ca/pbzip2/"
-SECTION = "console/utils"
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4c4f2edec9679d5abef3514a816b54a4"
-
-DEPENDS = "bzip2"
-DEPENDS_append_class-native = " bzip2-replacement-native"
-
-SRC_URI = "https://launchpad.net/${BPN}/1.1/${PV}/+download/${BP}.tar.gz"
-
-SRC_URI[md5sum] = "91a4911b13305850423840eb0fa6f4f9"
-SRC_URI[sha256sum] = "573bb358a5a7d3bf5f42f881af324cedf960c786e8d66dd03d448ddd8a0166ee"
-
-do_configure[noexec] = "1"
-
-EXTRA_OEMAKE = "CXX='${CXX} ${CXXFLAGS}' LDFLAGS='${LDFLAGS}'"
-
-do_install() {
-    install -d ${D}${bindir}
-    install -m 0755 pbzip2 ${D}${bindir}/
-}
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb b/yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
new file mode 100644
index 0000000..06d37ad
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pbzip2/pbzip2_1.1.13.bb
@@ -0,0 +1,28 @@
+SUMMARY = "PBZIP2 is a parallel implementation of bzip2"
+DESCRIPTION = "PBZIP2 is a parallel implementation of the bzip2 block-sorting \
+file compressor that uses pthreads and achieves near-linear speedup on SMP \
+machines. The output of this version is fully compatible with bzip2 v1.0.2 or \
+newer (ie: anything compressed with pbzip2 can be decompressed with bzip2)."
+HOMEPAGE = "http://compression.ca/pbzip2/"
+SECTION = "console/utils"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=398b8832c6f840cfebd20ab2be6a3743"
+
+DEPENDS = "bzip2"
+DEPENDS_append_class-native = " bzip2-replacement-native"
+
+SRC_URI = "https://launchpad.net/${BPN}/1.1/${PV}/+download/${BP}.tar.gz"
+
+SRC_URI[md5sum] = "4cb87da2dba05540afce162f34b3a9a6"
+SRC_URI[sha256sum] = "8fd13eaaa266f7ee91f85c1ea97c86d9c9cc985969db9059cdebcb1e1b7bdbe6"
+
+UPSTREAM_CHECK_URI = "http://compression.ca/pbzip2/"
+
+EXTRA_OEMAKE = "CXX='${CXX} ${CXXFLAGS}' LDFLAGS='${LDFLAGS}'"
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 pbzip2 ${D}${bindir}/
+}
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-extended/pigz/pigz.inc b/yocto-poky/meta/recipes-extended/pigz/pigz.inc
index cb8991d..86f434c 100644
--- a/yocto-poky/meta/recipes-extended/pigz/pigz.inc
+++ b/yocto-poky/meta/recipes-extended/pigz/pigz.inc
@@ -13,6 +13,8 @@
 
 DEPENDS = "zlib"
 
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
 inherit update-alternatives
 
 do_install_class-target() {
diff --git a/yocto-poky/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch b/yocto-poky/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch
new file mode 100644
index 0000000..12bae28
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pixz/pixz/0001-configure-Detect-headers-before-using-them.patch
@@ -0,0 +1,51 @@
+From c84480be8df6966c538d1fb67ccae2f42cc46421 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Mar 2016 07:36:54 +0000
+Subject: [PATCH 1/2] configure: Detect headers before using them
+
+Current logic does not work when system does not have
+sys/endian.h, since it tried to reuse the cached results
+from first try of detecting htole64 in sys/endian.h which is
+'no' and hence the second try to look into endian.h also
+comes out negative.
+
+So we check for header and then run the test for symbols
+and these symbols are not standard and we need to define _GNU_SOURCE
+for it to work, this issue is exposed by systems using musl e.g.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ configure.ac | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4cb56bc..5e23c50 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -69,12 +69,17 @@ AC_FUNC_MALLOC
+ AC_FUNC_REALLOC
+ AC_FUNC_STRTOD
+ AC_CHECK_FUNCS([memchr memmove memset strerror strtol])
+-AC_CHECK_DECLS([htole64, le64toh],
+-               [],
++AC_CHECK_HEADER([sys/endian.h],
+                [
+-                 AC_CHECK_DECLS([htole64, le64toh], [], [], [#include <endian.h>])
++                 AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <sys/endian.h>])
+                ],
+-               [#include <sys/endian.h>])
++               [], [])
++
++AC_CHECK_HEADER([endian.h],
++               [
++                 AC_CHECK_DECLS([htole64, le64toh], [], [], [#define _GNU_SOURCE 1 #include <endian.h>])
++               ],
++               [], [])
+ 
+ AC_CONFIG_FILES([Makefile
+                  src/Makefile
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch b/yocto-poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch
new file mode 100644
index 0000000..6b61598
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pixz/pixz/0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch
@@ -0,0 +1,47 @@
+From 5f3a535987bae4c3e3d9e9079c7526e399f7aecd Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Mar 2016 07:42:39 +0000
+Subject: [PATCH 2/2] endian: Use macro bswap_64 instead of __bswap_64
+
+byteswap.h defines then as public APIs on all libc
+on linux including musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+ src/endian.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/endian.c b/src/endian.c
+index b7724f3..51aea58 100644
+--- a/src/endian.c
++++ b/src/endian.c
+@@ -15,6 +15,7 @@ void xle64enc(uint8_t *d, uint64_t n) {
+ #include <stdint.h>
+ #ifdef __linux__
+ 	#include <endian.h>
++	#include <byteswap.h>
+ #else
+ 	#include <sys/endian.h>
+ #endif
+@@ -23,7 +24,7 @@ void xle64enc(uint8_t *d, uint64_t n) {
+ # if __BYTE_ORDER == __LITTLE_ENDIAN
+ #  define htole64(x) (x)
+ # else
+-#  define htole64(x) __bswap_64 (x)
++#  define htole64(x) bswap_64 (x)
+ # endif
+ #endif
+ 
+@@ -31,7 +32,7 @@ void xle64enc(uint8_t *d, uint64_t n) {
+ # if __BYTE_ORDER == __LITTLE_ENDIAN
+ #  define le64toh(x) (x)
+ # else
+-#  define le64toh(x) __bswap_64 (x)
++#  define le64toh(x) bswap_64 (x)
+ # endif
+ #endif
+ 
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch b/yocto-poky/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch
new file mode 100644
index 0000000..e3489db
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pixz/pixz/936d8068ae19d95260d3058f41dd6cf718101cd6.patch
@@ -0,0 +1,68 @@
+From 936d8068ae19d95260d3058f41dd6cf718101cd6 Mon Sep 17 00:00:00 2001
+From: Christian Krause <kizkizzbangbang@googlemail.com>
+Date: Sat, 26 Dec 2015 14:36:17 +0100
+Subject: [PATCH] option to not build man page
+
+fixes #56
+---
+ configure.ac    | 23 +++++++++++++++++++----
+ src/Makefile.am |  2 ++
+ 2 files changed, 21 insertions(+), 4 deletions(-)
+
+Upstream-Status: Backport
+RP 2016/01/22
+
+diff --git a/configure.ac b/configure.ac
+index b437e56..4cb56bc 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,13 +20,28 @@ AC_CHECK_FILE(
+   [src/pixz.1],
+   [],
+   [
+-    AC_CHECK_PROG(A2X, a2x, a2x, [])
+-    if test "x$A2X" = x ; then
+-      AC_MSG_ERROR([AsciiDoc not found, not able to generate the man page.])
+-    fi
++    AC_ARG_WITH(
++      [manpage],
++      [  --without-manpage       don't build man page],
++      [case ${withval} in
++        yes) manpage=true ;;
++        no)  manpage=false ;;
++        *)   AC_MSG_ERROR([bad value ${withval} for --with-manpage]) ;;
++      esac],
++      [manpage=true]
++    )
+   ]
+ )
+ 
++AM_CONDITIONAL([MANPAGE], [test x$manpage = xtrue])
++
++if test x$manpage = xtrue ; then
++  AC_CHECK_PROG(A2X, a2x, a2x, [])
++  if test "x$A2X" = x ; then
++    AC_MSG_ERROR([AsciiDoc not found, not able to generate the man page.])
++  fi
++fi
++
+ # Checks for libraries.
+ AC_CHECK_LIB([m], [ceil])
+ AX_PTHREAD
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 600ec90..b98f450 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -15,6 +15,7 @@ pixz_SOURCES = \
+ 	read.c \
+ 	write.c
+ 
++if MANPAGE
+ # TODO remove when possible: This is a hack because a2x is not able to output the man pages to a
+ # specific directory, only to where the source is.
+ pixz.1: pixz.1.asciidoc
+@@ -26,3 +27,4 @@ man_MANS = pixz.1
+ CLEANFILES = pixz.1
+ 
+ EXTRA_DIST = $(man_MANS) pixz.1.asciidoc
++endif
diff --git a/yocto-poky/meta/recipes-extended/pixz/pixz_1.0.6.bb b/yocto-poky/meta/recipes-extended/pixz/pixz_1.0.6.bb
new file mode 100644
index 0000000..0e51472
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/pixz/pixz_1.0.6.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Parallel, indexed xz compressor"
+
+DEPENDS = "xz libarchive"
+
+SRC_URI = "https://github.com/vasi/pixz/releases/download/v${PV}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "f6dc5909c9a31b192f69aa397ae8df48"
+SRC_URI[sha256sum] = "02c50746b134fa1b1aae41fcc314d7c6f1919b3d48bcdea01bf11769f83f72e8"
+
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=5cf6d164086105f1512ccb81bfff1926"
+
+SRC_URI += "file://936d8068ae19d95260d3058f41dd6cf718101cd6.patch \
+            file://0001-configure-Detect-headers-before-using-them.patch \
+            file://0002-endian-Use-macro-bswap_64-instead-of-__bswap_64.patch \
+"
+UPSTREAM_CHECK_URI = "https://github.com/vasi/pixz/releases"
+
+EXTRA_OECONF += "--without-manpage"
+CFLAGS_append_libc-musl = " -D_GNU_SOURCE"
+CACHED_CONFIGUREVARS += "ac_cv_file_src_pixz_1=no"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-extended/procps/procps/fix-configure.patch b/yocto-poky/meta/recipes-extended/procps/procps/fix-configure.patch
deleted file mode 100644
index 934ae80..0000000
--- a/yocto-poky/meta/recipes-extended/procps/procps/fix-configure.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-
-exec_prefix is /usr default in OE-Core
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-Index: procps-ng-3.3.10/configure.ac
-===================================================================
---- procps-ng-3.3.10.orig/configure.ac
-+++ procps-ng-3.3.10/configure.ac
-@@ -70,7 +70,7 @@ AC_FUNC_MMAP
- AC_FUNC_REALLOC
- AC_FUNC_STRTOD
- 
--usrbin_execdir='${exec_prefix}/usr/bin'
-+usrbin_execdir='${exec_prefix}/bin'
- AC_SUBST([usrbin_execdir])
- 
- AM_GNU_GETTEXT_VERSION([0.14.1])
diff --git a/yocto-poky/meta/recipes-extended/procps/procps_3.3.10.bb b/yocto-poky/meta/recipes-extended/procps/procps_3.3.10.bb
deleted file mode 100644
index dcfaba7..0000000
--- a/yocto-poky/meta/recipes-extended/procps/procps_3.3.10.bb
+++ /dev/null
@@ -1,67 +0,0 @@
-SUMMARY = "System and process monitoring utilities"
-DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
-the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
-HOMEPAGE = "https://gitorious.org/procps"
-SECTION = "base"
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                  file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \
-                 "
-
-DEPENDS = "ncurses"
-
-inherit autotools gettext pkgconfig update-alternatives
-
-SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \
-           file://fix-configure.patch \
-           file://sysctl.conf \
-          "
-
-SRC_URI[md5sum] = "1fb7f3f6bf92ce6c5c9ed9949ae858fe"
-SRC_URI[sha256sum] = "a02e6f98974dfceab79884df902ca3df30b0e9bad6d76aee0fb5dce17f267f04"
-
-S = "${WORKDIR}/procps-ng-${PV}"
-
-EXTRA_OECONF = "--enable-skill --disable-modern-top"
-
-CPPFLAGS += "-I${S}"
-
-do_install_append () {
-	install -d ${D}${base_bindir}
-	[ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
-	install -d ${D}${base_sbindir}
-	[ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done
-        if [ "${base_sbindir}" != "${sbindir}" ]; then
-                rmdir ${D}${sbindir}
-        fi
-
-        install -d ${D}${sysconfdir}
-        install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
-        if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
-                install -d ${D}${sysconfdir}/sysctl.d
-                ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
-        fi
-}
-
-CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
-
-bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
-base_bindir_progs += "kill pidof ps watch"
-base_sbindir_progs += "sysctl"
-
-ALTERNATIVE_PRIORITY = "100"
-
-ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
-
-ALTERNATIVE_${PN}-doc = "kill.1 uptime.1"
-ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
-ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
-
-python __anonymous() {
-    for prog in d.getVar('base_bindir_progs', True).split():
-        d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
-
-    for prog in d.getVar('base_sbindir_progs', True).split():
-        d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
-}
-
diff --git a/yocto-poky/meta/recipes-extended/procps/procps_3.3.11.bb b/yocto-poky/meta/recipes-extended/procps/procps_3.3.11.bb
new file mode 100644
index 0000000..c6dccc6
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/procps/procps_3.3.11.bb
@@ -0,0 +1,66 @@
+SUMMARY = "System and process monitoring utilities"
+DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \
+the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill."
+HOMEPAGE = "https://gitorious.org/procps"
+SECTION = "base"
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                  file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \
+                 "
+
+DEPENDS = "ncurses"
+
+inherit autotools gettext pkgconfig update-alternatives
+
+SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \
+           file://sysctl.conf \
+          "
+
+SRC_URI[md5sum] = "6cc5b94c1c5b8cbc89ad345a7b522f74"
+SRC_URI[sha256sum] = "e9493169a2d2adc0bc045538707310c8e877b385e4e296143b62607d2bb044ed"
+
+S = "${WORKDIR}/procps-ng-${PV}"
+
+EXTRA_OECONF = "--enable-skill --disable-modern-top"
+
+CPPFLAGS += "-I${S}"
+
+do_install_append () {
+	install -d ${D}${base_bindir}
+	[ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done
+	install -d ${D}${base_sbindir}
+	[ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done
+        if [ "${base_sbindir}" != "${sbindir}" ]; then
+                rmdir ${D}${sbindir}
+        fi
+
+        install -d ${D}${sysconfdir}
+        install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf
+        if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+                install -d ${D}${sysconfdir}/sysctl.d
+                ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf
+        fi
+}
+
+CONFFILES_${PN} = "${sysconfdir}/sysctl.conf"
+
+bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime"
+base_bindir_progs += "kill pidof ps watch"
+base_sbindir_progs += "sysctl"
+
+ALTERNATIVE_PRIORITY = "200"
+
+ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}"
+
+ALTERNATIVE_${PN}-doc = "kill.1 uptime.1"
+ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
+ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1"
+
+python __anonymous() {
+    for prog in d.getVar('base_bindir_progs', True).split():
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog))
+
+    for prog in d.getVar('base_sbindir_progs', True).split():
+        d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog))
+}
+
diff --git a/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch b/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch
new file mode 100644
index 0000000..b57a006
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/psmisc/psmisc/0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch
@@ -0,0 +1,51 @@
+From 5dc872bb2fba6421cb8e1ee578f7bd4aaed55f61 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 24 Mar 2016 15:46:14 +0000
+Subject: [PATCH] Use UINTPTR_MAX instead of __WORDSIZE
+
+Do not include sys/user.h since it conflicts with
+pt_regs struct from kernel APIs in asm/ptrace.h
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/peekfd.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/src/peekfd.c b/src/peekfd.c
+index cba2130..0d39878 100644
+--- a/src/peekfd.c
++++ b/src/peekfd.c
+@@ -30,8 +30,11 @@
+ #include <asm/ptrace.h>
+ #include <byteswap.h>
+ #include <endian.h>
++#ifdef __GLIBC__
+ #include <sys/user.h>
++#endif
+ #include <stdlib.h>
++#include <stdint.h>
+ #include <getopt.h>
+ #include <ctype.h>
+ 
+@@ -228,11 +231,11 @@ int main(int argc, char **argv)
+ 		if (WIFSTOPPED(status)) {
+ #ifdef PPC
+ 			struct pt_regs regs;
+-			regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R0, 0);
+-			regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R3, 0);
+-			regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R4, 0);
+-			regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_R5, 0);
+-			regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, __WORDSIZE/8 * PT_ORIG_R3, 0);
++			regs.gpr[0] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R0, 0);
++			regs.gpr[3] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R3, 0);
++			regs.gpr[4] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R4, 0);
++			regs.gpr[5] = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_R5, 0);
++			regs.orig_gpr3 = ptrace(PTRACE_PEEKUSER, pid, UINTPTR_MAX/8 * PT_ORIG_R3, 0);
+ #elif defined(ARM)
+ 			struct pt_regs regs;
+ 			ptrace(PTRACE_GETREGS, pid, 0, &regs);
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb b/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb
index 66aba9e..1c6473e 100644
--- a/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb
+++ b/yocto-poky/meta/recipes-extended/psmisc/psmisc_22.21.bb
@@ -5,6 +5,8 @@
 SRC_URI[md5sum] = "935c0fd6eb208288262b385fa656f1bf"
 SRC_URI[sha256sum] = "97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a"
 
-SRC_URI += "file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \
-            file://0002-Include-limits.h-for-PATH_MAX.patch \
-            "
+SRC_URI = "${SOURCEFORGE_MIRROR}/psmisc/psmisc-${PV}.tar.gz \
+           file://0001-Typo-in-fuser-makes-M-on-all-the-time.patch \
+           file://0002-Include-limits.h-for-PATH_MAX.patch \
+           file://0001-Use-UINTPTR_MAX-instead-of-__WORDSIZE.patch \
+           "
diff --git a/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch b/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
new file mode 100644
index 0000000..6add470
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/quota/quota/0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch
@@ -0,0 +1,33 @@
+From 776757a23e9930588950c7fcbc7827ec7a3e51c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
+Date: Mon, 4 Jan 2016 15:48:19 +0100
+Subject: [PATCH] Do not accidentaly override commandline passed CFLAGS.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream-Status: Backport
+
+Signed-off-by: Tomáš Chvátal <tchvatal@suse.com>
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3ba1386..1552c15 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,7 +53,7 @@ AS_IF([test "x${prefix}" = "xNONE"], [
+ # ================
+ # Check for cflags
+ # ================
+-CFLAGS="-D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
++CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
+ AC_ARG_ENABLE([werror],
+     [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, useful for development])],
+     [enable_werror="$enableval"],
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch b/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
new file mode 100644
index 0000000..a79e477
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/quota/quota/0001-Fix-build-with-disabled-ldap.patch
@@ -0,0 +1,93 @@
+From 39fd30ce57e3c34c3649866bf9345a71f0b78667 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Mon, 4 Jan 2016 15:10:53 +0100
+Subject: [PATCH] Fix build with disabled ldap
+
+Upstream-Status: Backport
+
+Reported-by: Tomas Chvatal <tchvatal@suse.com>
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ warnquota.c | 36 ++++++++++++++++++------------------
+ 1 file changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/warnquota.c b/warnquota.c
+index 3734f0e..e9868c1 100644
+--- a/warnquota.c
++++ b/warnquota.c
+@@ -109,13 +109,13 @@ struct configparams {
+ 	char *user_signature;
+ 	char *group_message;
+ 	char *group_signature;
++	time_t cc_before;
++#ifdef USE_LDAP_MAIL_LOOKUP
+ 	int use_ldap_mail; /* 0 */
++	int ldap_is_setup; /* 0 */
+ 	int ldap_starttls; /* 0 */
+ 	int ldap_tls; /* LDAP_OPT_X_TLS_NEVER */
+ 	int ldap_vers; /* LDAP_VERSION3 */
+-	time_t cc_before;
+-#ifdef USE_LDAP_MAIL_LOOKUP
+-	int ldap_is_setup; /* 0 */
+ 	char ldap_host[CNF_BUFFER];
+ 	int ldap_port;
+ 	char ldap_uri[CNF_BUFFER];
+@@ -729,13 +729,13 @@ static int readconfigfile(const char *filename, struct configparams *config)
+ 	}
+ 	maildev[0] = 0;
+ 	config->user_signature = config->user_message = config->group_signature = config->group_message = NULL;
++	config->cc_before = -1;
++
++#ifdef USE_LDAP_MAIL_LOOKUP
+ 	config->use_ldap_mail = 0;
+ 	config->ldap_starttls = 0;
+ 	config->ldap_tls = LDAP_OPT_X_TLS_NEVER;
+ 	config->ldap_vers = LDAP_VERSION3;
+-	config->cc_before = -1;
+-
+-#ifdef USE_LDAP_MAIL_LOOKUP
+ 	config->ldap_port = config->ldap_is_setup = 0;
+ 	config->ldap_host[0] = 0;
+ 	config->ldap_uri[0] = 0;
+@@ -820,6 +820,18 @@ static int readconfigfile(const char *filename, struct configparams *config)
+ 				create_eoln(config->group_signature);
+ 				verify_format(config->group_signature, "GROUP_SIGNATURE");
+ 			}
++			else if (!strcmp(var, "CC_BEFORE")) {
++				int num;
++				char unit[10];
++
++				if (sscanf(value, "%d%s", &num, unit) != 2)
++					goto cc_parse_err;
++				if (str2timeunits(num, unit, &config->cc_before) < 0) {
++cc_parse_err:
++					die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
++				}
++			}
++#ifdef USE_LDAP_MAIL_LOOKUP
+ 			else if (!strcmp(var, "LDAP_MAIL")) {
+ 				if(strcasecmp(value, "true") == 0) 
+ 					config->use_ldap_mail = 1;
+@@ -846,18 +858,6 @@ static int readconfigfile(const char *filename, struct configparams *config)
+ 				else
+ 					config->ldap_starttls = 0;
+ 			}
+-			else if (!strcmp(var, "CC_BEFORE")) {
+-				int num;
+-				char unit[10];
+-
+-				if (sscanf(value, "%d%s", &num, unit) != 2)
+-					goto cc_parse_err;
+-				if (str2timeunits(num, unit, &config->cc_before) < 0) {
+-cc_parse_err:
+-					die(1, _("Cannot parse time at CC_BEFORE variable (line %d).\n"), line);
+-				}
+-			}
+-#ifdef USE_LDAP_MAIL_LOOKUP
+ 			else if (!strcmp(var, "LDAP_HOST"))
+ 				sstrncpy(config->ldap_host, value, CNF_BUFFER);
+ 			else if (!strcmp(var, "LDAP_PORT"))
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/quota/quota/config-tcpwrappers.patch b/yocto-poky/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
deleted file mode 100644
index 5f47fbd..0000000
--- a/yocto-poky/meta/recipes-extended/quota/quota/config-tcpwrappers.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Upstream-Status: Pending
-
---- quota-tools.orig/configure.in
-+++ quota-tools/configure.in
-@@ -151,33 +151,46 @@ AC_SUBST(QUOTA_NETLINK_PROG)
- AC_SUBST(NETLINKLIBS)
-
- AC_SEARCH_LIBS(gethostbyname, nsl)
--AC_MSG_CHECKING(for host_access in -lwrap)
--AC_CACHE_VAL(ac_cv_lib_wrap_main,
--	saved_LIBS="$LIBS"
--	LIBS="$LIBS -lwrap"
--	[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
--	#include <stdio.h>
--	#include <sys/types.h>
--	#include <sys/socket.h>
--	#include <netinet/in.h>
--	#include <tcpd.h>
--	struct request_info request;
--	int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
--	dnl We always restore LIBS as we add -lwrap in the next check
--	[ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
--	[ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
--	])
-
--if test ${ac_cv_lib_wrap_main} = yes; then
--	AC_CHECK_HEADER(tcpd.h,, [
--		echo 'ERROR: could not find tcpd.h - missing TCP wrappers package'
--		exit 1
--	])
--	LIBS="$LIBS -lwrap"
--	AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
--	COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
-+AC_ARG_WITH(tcpwrappers,
-+	[  --with-tcpwrappers=[yes/no/try]   Use hosts.allow and hosts.deny for access checking of rpc.rquota [default=yes, if available.]],
-+	,
-+	with_tcpwrappers="try")
-+
-+if test "x$with_tcpwrappers" != xno; then
-+	AC_MSG_CHECKING(for host_access in -lwrap)
-+	AC_CACHE_VAL(ac_cv_lib_wrap_main,
-+		saved_LIBS="$LIBS"
-+		LIBS="$LIBS -lwrap"
-+		[AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-+		#include <stdio.h>
-+		#include <sys/types.h>
-+		#include <sys/socket.h>
-+		#include <netinet/in.h>
-+		#include <tcpd.h>
-+		struct request_info request;
-+		int deny_severity, allow_severity;]],[[hosts_access(&request);]])],
-+		dnl We always restore LIBS as we add -lwrap in the next try
-+		[ac_cv_lib_wrap_main=yes; LIBS="$saved_LIBS"; AC_MSG_RESULT(yes)],
-+		[ac_cv_lib_wrap_main=no; LIBS="$saved_LIBS"; AC_MSG_RESULT(no)])
-+		])
-+
-+	if test "x$ac_cv_lib_wrap_main" = xyes; then
-+		AC_CHECK_HEADER(tcpd.h,, [
-+			if test "x$with_tcpwrappers" != xtry; then
-+				AC_MSG_ERROR([could not find tcpd.h - missing TCP wrappers package])
-+			fi
-+		])
-+
-+		LIBS="$LIBS -lwrap"
-+		AC_DEFINE([HOSTS_ACCESS], 1, [Use hosts.allow and hosts.deny for access checking of rpc.rquotad])
-+		COMPILE_OPTS="$COMPILE_OPTS HOSTS_ACCESS"
-+	elif test "x$with_tcpwrappers" != xtry; then
-+		AC_MSG_ERROR([could not find libwrap - missing TCP wrappers package])
-+	fi
- fi
-
-+
- dnl Checks for typedefs, structures, and compiler characteristics.
- AC_C_CONST
- AC_C_INLINE
diff --git a/yocto-poky/meta/recipes-extended/quota/quota_4.02.bb b/yocto-poky/meta/recipes-extended/quota/quota_4.02.bb
deleted file mode 100644
index 673d584..0000000
--- a/yocto-poky/meta/recipes-extended/quota/quota_4.02.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
-SECTION = "base"
-HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
-LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
-                    file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
-                    file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
-           file://config-tcpwrappers.patch \
-           file://fcntl.patch \
-           file://remove_non_posix_types.patch \
-	   "
-SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
-
-SRC_URI[md5sum] = "a8a5df262261e659716ccad2a5d6df0d"
-SRC_URI[sha256sum] = "f4c2f48abf94bbdc396df33d276f2e9d19af58c232cb85eef9c174a747c33795"
-
-S = "${WORKDIR}/quota-tools"
-
-DEPENDS = "gettext-native e2fsprogs"
-
-inherit autotools-brokensep gettext pkgconfig
-
-CFLAGS += "-I${STAGING_INCDIR}/tirpc"
-LDFLAGS += "-ltirpc"
-ASNEEDED = ""
-EXTRA_OEMAKE += 'STRIP=""'
-
-PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
-PACKAGECONFIG_libc-musl = "tcp-wrappers rpc"
-
-PACKAGECONFIG[tcp-wrappers] = "--with-tcpwrappers,--without-tcpwrappers,tcp-wrappers"
-PACKAGECONFIG[rpc] = "--enable-rpc=yes,--enable-rpc=no,libtirpc"
-PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
-
-do_install() {
-	oe_runmake ROOTDIR=${D} install
-}
diff --git a/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb b/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
new file mode 100644
index 0000000..4a98046
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/quota/quota_4.03.bb
@@ -0,0 +1,38 @@
+SUMMARY = "Tools for monitoring & limiting user disk usage per filesystem"
+SECTION = "base"
+HOMEPAGE = "http://sourceforge.net/projects/linuxquota/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=18136&atid=118136"
+LICENSE = "BSD & GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://quota.c;beginline=1;endline=33;md5=331c7d77744bfe0ad24027f0651028ec \
+                    file://rquota_server.c;beginline=1;endline=20;md5=fe7e0d7e11c6f820f8fa62a5af71230f \
+                    file://svc_socket.c;beginline=1;endline=17;md5=24d5a8792da45910786eeac750be8ceb"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/linuxquota/quota-tools/${PV}/quota-${PV}.tar.gz \
+           file://0001-Fix-build-with-disabled-ldap.patch \
+           file://0001-Do-not-accidentaly-override-commandline-passed-CFLAG.patch \
+           file://fcntl.patch \
+           file://remove_non_posix_types.patch \
+          "
+SRC_URI_append_libc-musl = " file://replace_getrpcbynumber_r.patch"
+
+SRC_URI[md5sum] = "6b09f9c93515c25a528be5754cdfb6f5"
+SRC_URI[sha256sum] = "9c6c4d9ae7bf30506dd2aa3d8056c4ff2f8d087930d7c721616f5c093bdc674b"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/linuxquota/files/quota-tools/"
+UPSTREAM_CHECK_REGEX = "/quota-tools/(?P<pver>(\d+[\.\-_]*)+)/"
+
+DEPENDS = "gettext-native e2fsprogs libnl dbus"
+
+inherit autotools-brokensep gettext pkgconfig
+
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
+LDFLAGS += "-ltirpc"
+ASNEEDED = ""
+
+PACKAGECONFIG ??= "tcp-wrappers rpc bsd"
+PACKAGECONFIG_libc-musl = "tcp-wrappers rpc"
+
+PACKAGECONFIG[tcp-wrappers] = "--enable-libwrap,--disable-libwrap,tcp-wrappers"
+PACKAGECONFIG[rpc] = "--enable-rpc,--disable-rpc,libtirpc"
+PACKAGECONFIG[bsd] = "--enable-bsd_behaviour=yes,--enable-bsd_behaviour=no,"
+PACKAGECONFIG[ldapmail] = "--enable-ldapmail,--disable-ldapmail,openldap"
diff --git a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
new file mode 100644
index 0000000..16b763e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch
@@ -0,0 +1,43 @@
+From 9194122389f2a56b1cd1f935e64307e2e963c2da Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Mon, 2 Nov 2015 17:05:18 -0500
+Subject: [PATCH] handle_reply: Don't use the xp_auth pointer directly
+
+In the latest libtirpc version to access the xp_auth
+one must use the SVC_XP_AUTH macro. To be backwards
+compatible a couple ifdefs were added to use the
+macro when it exists.
+
+Upstream-Status: Backport
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ src/rpcb_svc_com.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 4ae93f1..22d6c84 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -1295,10 +1295,17 @@ handle_reply(int fd, SVCXPRT *xprt)
+ 	a.rmt_localvers = fi->versnum;
+ 
+ 	xprt_set_caller(xprt, fi);
++#if defined(SVC_XP_AUTH)
++	SVC_XP_AUTH(xprt) = svc_auth_none;
++#else 
+ 	xprt->xp_auth = &svc_auth_none;
++#endif
+ 	svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a);
++#if !defined(SVC_XP_AUTH)
+ 	SVCAUTH_DESTROY(xprt->xp_auth);
+ 	xprt->xp_auth = NULL;
++#endif
++
+ done:
+ 	if (buffer)
+ 		free(buffer);
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch
index f156290..741a990 100644
--- a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch
+++ b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/cve-2015-7236.patch
@@ -36,6 +36,7 @@
     Signed-off-by: Olaf Kirch <okir@...e.de>
 
     Upstream-Status: Backport
+    CVE: CVE-2015-7236
 
     Signed-off-by: Li Zhou <li.zhou@windriver.com>
 ---
diff --git a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch
index 9c72a1b..6fbc636 100644
--- a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch
+++ b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/musl-sunrpc.patch
@@ -4,6 +4,7 @@
 ported from alpine linux
 
 Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
 
 Index: rpcbind-0.2.2/src/rpcbind.c
 ===================================================================
diff --git a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
index b3ae254..9cdade4 100644
--- a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
+++ b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind/rpcbind.service
@@ -5,7 +5,7 @@
 [Service]
 Type=forking
 EnvironmentFile=-@SYSCONFDIR@/rpcbind.conf
-ExecStart=@SBINDIR@/rpcbind -w $RPCBIND_OPTS
+ExecStart=@SBINDIR@/rpcbind $RPCBIND_OPTS
 SuccessExitStatus=2
 
 [Install]
diff --git a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb
index ecd3ba8..c19a197 100644
--- a/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb
+++ b/yocto-poky/meta/recipes-extended/rpcbind/rpcbind_0.2.3.bb
@@ -14,6 +14,7 @@
            file://init.d \
            file://0001-Avoid-use-of-glibc-sys-cdefs.h-header.patch \
            file://remove-sys-queue.patch \
+           file://0001-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch \
            ${UCLIBCPATCHES} \
            ${MUSLPATCHES} \
            file://rpcbind.conf \
diff --git a/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch b/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch
index 2bc9a59..4ac820f 100644
--- a/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch
+++ b/yocto-poky/meta/recipes-extended/screen/screen/0001-Fix-stack-overflow-due-to-too-deep-recursion.patch
@@ -10,6 +10,7 @@
 Fixes CVE-2015-6806
 
 Upstream-Status: Backport
+CVE: CVE-2015-6806
 
 Signed-off-by: Kuang-che Wu <kcwu@csie.org>
 Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
diff --git a/yocto-poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/yocto-poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
new file mode 100644
index 0000000..a6f604b
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch
@@ -0,0 +1,124 @@
+From 8cf3454d567f77233023be49a39a33e9f0836f89 Mon Sep 17 00:00:00 2001
+From: Scott Garman <scott.a.garman@intel.com>
+Date: Thu, 14 Apr 2016 12:28:57 +0200
+Subject: [PATCH] Disable use of syslog for sysroot
+
+Disable use of syslog to prevent sysroot user and group additions from
+writing entries to the host's syslog. This patch should only be used
+with the shadow-native recipe.
+
+Upstream-Status: Inappropriate [disable feature]
+
+Signed-off-by: Scott Garman <scott.a.garman@intel.com>
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
+---
+ src/groupadd.c  | 3 +++
+ src/groupdel.c  | 3 +++
+ src/groupmems.c | 3 +++
+ src/groupmod.c  | 3 +++
+ src/useradd.c   | 3 +++
+ src/userdel.c   | 3 +++
+ src/usermod.c   | 3 +++
+ 7 files changed, 21 insertions(+)
+
+diff --git a/src/groupadd.c b/src/groupadd.c
+index 39b4ec0..f716f57 100644
+--- a/src/groupadd.c
++++ b/src/groupadd.c
+@@ -34,6 +34,9 @@
+ 
+ #ident "$Id$"
+ 
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <getopt.h>
+diff --git a/src/groupdel.c b/src/groupdel.c
+index da99347..46a679c 100644
+--- a/src/groupdel.c
++++ b/src/groupdel.c
+@@ -34,6 +34,9 @@
+ 
+ #ident "$Id$"
+ 
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <grp.h>
+diff --git a/src/groupmems.c b/src/groupmems.c
+index e4f107f..95cb073 100644
+--- a/src/groupmems.c
++++ b/src/groupmems.c
+@@ -32,6 +32,9 @@
+ 
+ #include <config.h>
+ 
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <fcntl.h>
+ #include <getopt.h>
+ #include <grp.h>
+diff --git a/src/groupmod.c b/src/groupmod.c
+index d9d3807..6229737 100644
+--- a/src/groupmod.c
++++ b/src/groupmod.c
+@@ -34,6 +34,9 @@
+ 
+ #ident "$Id$"
+ 
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <ctype.h>
+ #include <fcntl.h>
+ #include <getopt.h>
+diff --git a/src/useradd.c b/src/useradd.c
+index e1ebf50..25679d8 100644
+--- a/src/useradd.c
++++ b/src/useradd.c
+@@ -34,6 +34,9 @@
+ 
+ #ident "$Id$"
+ 
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <assert.h>
+ #include <ctype.h>
+ #include <errno.h>
+diff --git a/src/userdel.c b/src/userdel.c
+index 19b12bc..a083929 100644
+--- a/src/userdel.c
++++ b/src/userdel.c
+@@ -34,6 +34,9 @@
+ 
+ #ident "$Id$"
+ 
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <getopt.h>
+diff --git a/src/usermod.c b/src/usermod.c
+index 685b50a..28e5cfc 100644
+--- a/src/usermod.c
++++ b/src/usermod.c
+@@ -34,6 +34,9 @@
+ 
+ #ident "$Id$"
+ 
++/* Disable use of syslog since we're running this command against a sysroot */
++#undef USE_SYSLOG
++
+ #include <ctype.h>
+ #include <errno.h>
+ #include <fcntl.h>
+-- 
+2.1.0
+
diff --git a/yocto-poky/meta/recipes-extended/shadow/files/disable-syslog.patch b/yocto-poky/meta/recipes-extended/shadow/files/disable-syslog.patch
deleted file mode 100644
index 1943fd6..0000000
--- a/yocto-poky/meta/recipes-extended/shadow/files/disable-syslog.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Disable use of syslog to prevent sysroot user and group additions from
-writing entries to the host's syslog. This patch should only be used
-with the shadow-native recipe.
-
-Upstream-Status: Inappropriate [disable feature]
-
-Signed-off-by: Scott Garman <scott.a.garman@intel.com>
-
-diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3/src/groupadd.c
---- shadow-4.1.4.3.orig//src/groupadd.c	2011-02-13 09:58:16.000000000 -0800
-+++ shadow-4.1.4.3/src/groupadd.c	2012-04-05 10:05:59.440001758 -0700
-@@ -34,6 +34,9 @@
- 
- #ident "$Id: groupadd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
- 
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <ctype.h>
- #include <fcntl.h>
- #include <getopt.h>
-diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3/src/useradd.c
---- shadow-4.1.4.3.orig//src/useradd.c	2011-02-13 09:58:16.000000000 -0800
-+++ shadow-4.1.4.3/src/useradd.c	2012-04-05 10:06:25.076001315 -0700
-@@ -34,6 +34,9 @@
- 
- #ident "$Id: useradd.c 3015 2009-06-05 22:16:56Z nekral-guest $"
- 
-+/* Disable use of syslog since we're running this command against a sysroot */
-+#undef USE_SYSLOG
-+
- #include <assert.h>
- #include <ctype.h>
- #include <errno.h>
diff --git a/yocto-poky/meta/recipes-extended/shadow/shadow.inc b/yocto-poky/meta/recipes-extended/shadow/shadow.inc
index 4313ffe..d024b01 100644
--- a/yocto-poky/meta/recipes-extended/shadow/shadow.inc
+++ b/yocto-poky/meta/recipes-extended/shadow/shadow.inc
@@ -25,13 +25,13 @@
            "
 
 SRC_URI_append_class-native = " \
-           file://disable-syslog.patch \
+           file://0001-Disable-use-of-syslog-for-sysroot.patch \
            file://allow-for-setting-password-in-clear-text.patch \
            file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \
            file://0001-useradd.c-create-parent-directories-when-necessary.patch \
            "
 SRC_URI_append_class-nativesdk = " \
-           file://disable-syslog.patch \
+           file://0001-Disable-use-of-syslog-for-sysroot.patch \
            "
 
 SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8"
diff --git a/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb b/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb
index 5122f53..237e9f2 100644
--- a/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb
+++ b/yocto-poky/meta/recipes-extended/slang/slang_2.2.4.bb
@@ -9,14 +9,14 @@
 
 HOMEPAGE = "http://www.jedsoft.org/slang/"
 SECTION = "libs"
-DEPENDS = "pcre"
+DEPENDS = "pcre ncurses"
 PR = "r12"
 
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=a52a18a472d4f7e45479b06563717c02"
 
 
-SRC_URI = "ftp://space.mit.edu/pub/davis/slang/v2.2/slang-${PV}.tar.bz2 \
+SRC_URI = "http://www.jedsoft.org/releases/slang/old/slang-${PV}.tar.bz2 \
            file://rpathfix.patch \
            file://fix-check-pcre.patch \
            file://change-char-type-to-signed-char-in-macros.patch \
@@ -24,6 +24,7 @@
            file://slang-fix-the-iconv-existence-checking.patch \
            file://0001-Fix-error-conflicting-types-for-posix_close.patch \
           "
+UPSTREAM_CHECK_URI = "http://www.jedsoft.org/releases/slang/"
 
 inherit autotools-brokensep
 
@@ -47,7 +48,6 @@
 }
 
 FILES_${PN} += "${libdir}/${BPN}/v2/modules/ ${datadir}/slsh/"
-FILES_${PN}-dbg += "${libdir}/${BPN}/v2/modules/.debug"
 
 PARALLEL_MAKE = ""
 
diff --git a/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb b/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
index 651831e..a5ece07 100644
--- a/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
+++ b/yocto-poky/meta/recipes-extended/stat/stat_3.3.bb
@@ -11,6 +11,8 @@
 SRC_URI[md5sum] = "37e247e8e400ad9205f1b0500b728fd3"
 SRC_URI[sha256sum] = "7071f0384a423a938dd542c1f08547a02824f6359acd3ef3f944b2c4c2d1ee09"
 
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
 do_install() {
 	install -d ${D}${base_bindir} ${D}${mandir}/man1
 	install -m 755 stat ${D}${base_bindir}/stat.stat
diff --git a/yocto-poky/meta/recipes-extended/stress/stress_1.0.4.bb b/yocto-poky/meta/recipes-extended/stress/stress_1.0.4.bb
index 4b7e4ba..e9179d3 100644
--- a/yocto-poky/meta/recipes-extended/stress/stress_1.0.4.bb
+++ b/yocto-poky/meta/recipes-extended/stress/stress_1.0.4.bb
@@ -1,3 +1,4 @@
+SUMMARY = "System load testing utility"
 DESCRIPTION = "Deliberately simple workload generator for POSIX systems. It \
 imposes a configurable amount of CPU, memory, I/O, and disk stress on the system."
 HOMEPAGE = "http://people.seas.harvard.edu/~apw/stress/"
diff --git a/yocto-poky/meta/recipes-extended/sudo/files/sudo.pam b/yocto-poky/meta/recipes-extended/sudo/files/sudo.pam
index 5bc26e7..515eab0 100644
--- a/yocto-poky/meta/recipes-extended/sudo/files/sudo.pam
+++ b/yocto-poky/meta/recipes-extended/sudo/files/sudo.pam
@@ -2,5 +2,5 @@
 auth       include      common-auth
 account    include      common-account
 password   include      common-password
-session    required     pam_keyinit.so revoke
+session    optional     pam_keyinit.so revoke
 session    required     pam_limits.so
diff --git a/yocto-poky/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch b/yocto-poky/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch
deleted file mode 100644
index 2418689..0000000
--- a/yocto-poky/meta/recipes-extended/sudo/sudo/0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-The makefile uses top_srcdir to find files that were created by configure, when
-it should use top_builddir.
-
-Upstream-Status: Submitted (http://bugzilla.sudo.ws/show_bug.cgi?id=708)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
----
- src/Makefile.in | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/Makefile.in b/src/Makefile.in
-index f009e10..7acfb2d 100644
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -165,11 +165,11 @@ install-dirs:
- 
- install-rc: install-dirs
- 	if [ -n "$(INIT_SCRIPT)" ]; then \
--	    $(INSTALL) $(INSTALL_OWNER) -m 0755 $(top_srcdir)/init.d/$(INIT_SCRIPT) $(DESTDIR)$(INIT_DIR)/sudo; \
-+	    $(INSTALL) $(INSTALL_OWNER) -m 0755 $(top_builddir)/init.d/$(INIT_SCRIPT) $(DESTDIR)$(INIT_DIR)/sudo; \
- 	    rm -f $(DESTDIR)$(RC_LINK); \
- 	    ln -s $(INIT_DIR)/sudo $(DESTDIR)$(RC_LINK); \
- 	elif test -n "$(tmpfiles_d)"; then \
--	    $(INSTALL) $(INSTALL_OWNER) -m 0644 $(top_srcdir)/init.d/sudo.conf $(DESTDIR)$(tmpfiles_d)/sudo.conf; \
-+	    $(INSTALL) $(INSTALL_OWNER) -m 0644 $(top_builddir)/init.d/sudo.conf $(DESTDIR)$(tmpfiles_d)/sudo.conf; \
- 	fi
- 
- install-binaries: install-dirs $(PROGS)
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.14p3.bb b/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.14p3.bb
deleted file mode 100644
index b93112f..0000000
--- a/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.14p3.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-require sudo.inc
-
-SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
-           file://0001-Use-correct-path-to-init.d-and-tmpfiles.d-files.patch \
-           file://0001-Include-sys-types.h-for-id_t-definition.patch \
-           "
-
-PAM_SRC_URI = "file://sudo.pam"
-
-SRC_URI[md5sum] = "93dbd1e47c136179ff1b01494c1c0e75"
-SRC_URI[sha256sum] = "a8a697cbb113859058944850d098464618254804cf97961dee926429f00a1237"
-
-DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
-
-EXTRA_OECONF += " \
-             ac_cv_type_rsize_t=no \
-             ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
-             ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
-             "
-
-do_install_append () {
-	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
-		install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
-	fi
-
-	chmod 4111 ${D}${bindir}/sudo
-	chmod 0440 ${D}${sysconfdir}/sudoers
-
-	# Explicitly remove the ${localstatedir}/run directory to avoid QA error
-	rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
-}
-
-FILES_${PN} += "${libdir}/tmpfiles.d"
-FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/*.la"
diff --git a/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.15.bb b/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.15.bb
new file mode 100644
index 0000000..042043ec
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/sudo/sudo_1.8.15.bb
@@ -0,0 +1,36 @@
+require sudo.inc
+
+SRC_URI = "http://ftp.sudo.ws/sudo/dist/sudo-${PV}.tar.gz \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
+           file://0001-Include-sys-types.h-for-id_t-definition.patch \
+           "
+
+PAM_SRC_URI = "file://sudo.pam"
+
+SRC_URI[md5sum] = "7cf6b9b76d0478a572432bed481dd7b5"
+SRC_URI[sha256sum] = "4316381708324da8b6cb151f655c1a11855207c7c02244d8ffdea5104d7cc308"
+
+DEPENDS += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
+RDEPENDS_${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
+
+EXTRA_OECONF += " \
+             ac_cv_type_rsize_t=no \
+             ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
+             ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--enable-tmpfiles.d=${libdir}/tmpfiles.d', '--disable-tmpfiles.d', d)} \
+             "
+
+do_install_append () {
+	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
+		install -D -m 644 ${WORKDIR}/sudo.pam ${D}/${sysconfdir}/pam.d/sudo
+	fi
+
+	chmod 4111 ${D}${bindir}/sudo
+	chmod 0440 ${D}${sysconfdir}/sudoers
+
+	# Explicitly remove the ${localstatedir}/run directory to avoid QA error
+	rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/run/sudo
+}
+
+FILES_${PN} += "${libdir}/tmpfiles.d"
+FILES_${PN}-dev += "${libexecdir}/${BPN}/lib*${SOLIBSDEV} ${libexecdir}/${BPN}/*.la \
+                    ${libexecdir}/lib*${SOLIBSDEV} ${libexecdir}/*.la"
diff --git a/yocto-poky/meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch b/yocto-poky/meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch
new file mode 100644
index 0000000..9567946
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/sysklogd/files/0001-Fix-build-with-musl.patch
@@ -0,0 +1,132 @@
+From f0af5bcfd753691652eac35efbcb208c933253f1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 31 Aug 2015 05:11:53 +0000
+Subject: [PATCH] Fix build with musl
+
+Explicitly include fcntl.h since with glibc is comes in as indirect
+include but not with musl
+
+linux/time.h inclusion is not required on musl so using !__GLIBC__ is
+not right for musl here
+
+wait type is glibc specific
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ klogd.c    | 10 +---------
+ ksym_mod.c |  5 +----
+ pidfile.c  |  1 +
+ syslog.c   |  3 ++-
+ syslogd.c  |  4 +---
+ 5 files changed, 6 insertions(+), 17 deletions(-)
+
+diff --git a/klogd.c b/klogd.c
+index 6cc80ed..9219671 100644
+--- a/klogd.c
++++ b/klogd.c
+@@ -260,11 +260,8 @@
+ #include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <sys/stat.h>
+-#if !defined(__GLIBC__)
+-#include <linux/time.h>
+-#endif /* __GLIBC__ */
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <stdlib.h>
+@@ -277,13 +274,8 @@
+ 
+ #define __LIBRARY__
+ #include <linux/unistd.h>
+-#if !defined(__GLIBC__)
+-# define __NR_ksyslog __NR_syslog
+-_syscall3(int,ksyslog,int, type, char *, buf, int, len);
+-#else
+ #include <sys/klog.h>
+ #define ksyslog klogctl
+-#endif
+ 
+ #define LOG_BUFFER_SIZE 4096
+ #define LOG_LINE_LENGTH 1000
+diff --git a/ksym_mod.c b/ksym_mod.c
+index 68cd6b6..6e26da1 100644
+--- a/ksym_mod.c
++++ b/ksym_mod.c
+@@ -113,12 +113,9 @@
+ #include <unistd.h>
+ #include <signal.h>
+ #include <errno.h>
+-#include <sys/fcntl.h>
++#include <fcntl.h>
+ #include <sys/stat.h>
+ #include "module.h"
+-#if !defined(__GLIBC__)
+-#include <linux/time.h>
+-#endif /* __GLIBC__ */
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <linux/version.h>
+diff --git a/pidfile.c b/pidfile.c
+index e0959a0..6daa2e0 100644
+--- a/pidfile.c
++++ b/pidfile.c
+@@ -31,6 +31,7 @@
+ #include <string.h>
+ #include <errno.h>
+ #include <signal.h>
++#include <fcntl.h>
+ 
+ /* read_pid
+  *
+diff --git a/syslog.c b/syslog.c
+index bdb3ff2..ef7b34e 100644
+--- a/syslog.c
++++ b/syslog.c
+@@ -55,7 +55,7 @@ static char sccsid[] = "@(#)syslog.c	5.28 (Berkeley) 6/27/90";
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/file.h>
+-#include <sys/signal.h>
++//#include <sys/signal.h>
+ #include <sys/syslog.h>
+ #if 0
+ #include "syslog.h"
+@@ -72,6 +72,7 @@ static char sccsid[] = "@(#)syslog.c	5.28 (Berkeley) 6/27/90";
+ #include <stdarg.h>
+ #include <paths.h>
+ #include <stdio.h>
++#include <fcntl.h>
+ 
+ #define	_PATH_LOGNAME	"/dev/log"
+ 
+diff --git a/syslogd.c b/syslogd.c
+index ea73ea5..1ca0595 100644
+--- a/syslogd.c
++++ b/syslogd.c
+@@ -818,9 +818,7 @@ void doexit(int sig);
+ void init();
+ void cfline(char *line, register struct filed *f);
+ int decode(char *name, struct code *codetab);
+-#if defined(__GLIBC__)
+ #define dprintf mydprintf
+-#endif /* __GLIBC__ */
+ static void dprintf(char *, ...);
+ static void allocate_log(void);
+ void sighup_handler();
+@@ -2094,7 +2092,7 @@ void reapchild()
+ 	(void) signal(SIGCHLD, reapchild);	/* reset signal handler -ASP */
+ 	wait ((int *)0);
+ #else
+-	union wait status;
++	int status;
+ 
+ 	while (wait3(&status, WNOHANG, (struct rusage *) NULL) > 0)
+ 		;
+-- 
+2.5.1
+
diff --git a/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc b/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc
index bcf8aa7..1e363db 100644
--- a/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/yocto-poky/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -15,6 +15,7 @@
 
 SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
            file://no-strip-install.patch \
+           file://0001-Fix-build-with-musl.patch \
            file://sysklogd \
            file://syslog.conf \
            "
@@ -24,6 +25,8 @@
 INITSCRIPT_NAME = "syslog"
 CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
 
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
 CFLAGS_append = " -DSYSV"
 
 do_install () {
@@ -56,3 +59,8 @@
 	fi
 	fi
 }
+
+python () {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
diff --git a/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc b/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc
index 5c761fa..c353291 100644
--- a/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc
+++ b/yocto-poky/meta/recipes-extended/sysstat/sysstat.inc
@@ -9,6 +9,9 @@
            file://sysstat.service \
           "
 
+UPSTREAM_CHECK_URI = "http://sebastien.godard.pagesperso-orange.fr/download.html"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.tar"
+
 DEPENDS += "base-passwd"
 
 inherit autotools-brokensep gettext systemd
@@ -49,7 +52,6 @@
 
 
 FILES_${PN} += "${libdir}/sa"
-FILES_${PN}-dbg += "${libdir}/sa/.debug/"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 LDFLAGS_append_libc-uclibc = " -lintl"
diff --git a/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.1.5.bb b/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.1.5.bb
deleted file mode 100644
index bff8616..0000000
--- a/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.1.5.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require sysstat.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
-
-SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
-
-SRC_URI[md5sum] = "4d8e6e72d057189a1660462a678d9ada"
-SRC_URI[sha256sum] = "feb3a90d86ffd69cf5b88144a8876ae05bd42384f559676f08100671589fa2bb"
-
diff --git a/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb b/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb
new file mode 100644
index 0000000..7a8eb96
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/sysstat/sysstat_11.2.0.bb
@@ -0,0 +1,8 @@
+require sysstat.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
+
+SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
+
+SRC_URI[md5sum] = "e8b615775ad98780e3f0675b91eddb19"
+SRC_URI[sha256sum] = "9806b9a662568796d3fb93ecd01ecea10d815e668337a646494953bff4bc4155"
diff --git a/yocto-poky/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch b/yocto-poky/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
index da2ae3c..af5026f 100644
--- a/yocto-poky/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
+++ b/yocto-poky/meta/recipes-extended/tar/tar-1.17/avoid_heap_overflow.patch
@@ -1,4 +1,5 @@
 Upstream-Status: Inappropriate [bugfix: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624]
+CVE: CVE-2010-0624
 
 This patch avoids heap overflow reported by :
 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-0624
diff --git a/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch b/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch
new file mode 100644
index 0000000..b0dc16c
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/tar/tar/musl_dirent.patch
@@ -0,0 +1,19 @@
+musl has valid d_ino implementation
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: tar-1.28/m4/d-ino.m4
+===================================================================
+--- tar-1.28.orig/m4/d-ino.m4
++++ tar-1.28/m4/d-ino.m4
+@@ -40,7 +40,8 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_
+            [gl_cv_struct_dirent_d_ino=no],
+            [case "$host_os" in
+                            # Guess yes on glibc systems with Linux kernel.
+-              linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
++              linux*-gnu*|linux*-musl*)
++                           gl_cv_struct_dirent_d_ino="guessing yes" ;;
+                            # If we don't know, assume the worst.
+               *)           gl_cv_struct_dirent_d_ino="guessing no" ;;
+             esac
diff --git a/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb b/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb
index 8816000..518e622 100644
--- a/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb
+++ b/yocto-poky/meta/recipes-extended/tar/tar_1.28.bb
@@ -7,6 +7,12 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
 SRC_URI += "file://remove-gets.patch \
+            file://musl_dirent.patch \
            "
 SRC_URI[md5sum] = "8f32b2bc1ed7ddf4cf4e4a39711341b0"
 SRC_URI[sha256sum] = "60e4bfe0602fef34cd908d91cf638e17eeb09394d7b98c2487217dc4d3147562"
+
+do_install_append_libc-musl() {
+	rm -f ${D}${libdir}/charset.alias
+	rmdir ${D}${libdir}
+}
diff --git a/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch b/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch
new file mode 100644
index 0000000..eee640e
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers-7.6/musl-decls.patch
@@ -0,0 +1,31 @@
+__BEGIN_DECLS/__END_DECLS are BSD specific and not defined in musl
+glibc and uclibc had sys/cdefs.h doing it.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: tcp_wrappers_7.6/tcpd.h
+===================================================================
+--- tcp_wrappers_7.6.orig/tcpd.h
++++ tcp_wrappers_7.6/tcpd.h
+@@ -11,7 +11,9 @@
+ #include <netinet/in.h>
+ #include <stdio.h>
+ 
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ /* Structure to describe one communications endpoint. */
+ 
+@@ -252,6 +254,8 @@ extern char *fix_strtok();
+ extern char *my_strtok();
+ #endif
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif
diff --git a/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb b/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
index 2630478..5fdbbce 100644
--- a/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
+++ b/yocto-poky/meta/recipes-extended/tcp-wrappers/tcp-wrappers_7.6.bb
@@ -43,6 +43,7 @@
            file://try-from.8 \
            file://safe_finger.8 \
            file://makefile-fix-parallel.patch \
+           file://musl-decls.patch \
            "
 
 SRC_URI[md5sum] = "e6fa25f71226d090f34de3f6b122fb5a"
@@ -73,6 +74,9 @@
 
 EXTRA_OEMAKE_NETGROUP = "-DNETGROUP -DUSE_GETDOMAIN"
 EXTRA_OEMAKE_NETGROUP_libc-uclibc = "-DUSE_GETDOMAIN"
+EXTRA_OEMAKE_NETGROUP_libc-musl = "-DUSE_GETDOMAIN"
+
+EXTRA_OEMAKE_append_libc-musl = " 'LIBS='"
 
 do_compile () {
 	oe_runmake 'TABLES=-DHOSTS_DENY=\"${sysconfdir}/hosts.deny\" -DHOSTS_ALLOW=\"${sysconfdir}/hosts.allow\"' \
diff --git a/yocto-poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb b/yocto-poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb
index b5420a3..1254bc8 100644
--- a/yocto-poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb
+++ b/yocto-poky/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb
@@ -1,4 +1,4 @@
-DESCRIPTION = "Fake version of the texinfo utility suite"
+SUMMARY = "Fake version of the texinfo utility suite"
 SECTION = "console/utils"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d6bb62e73ca8b901d3f2e9d71542f4bb"
diff --git a/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.0.bb b/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.0.bb
index a8702cf..8638bb1 100644
--- a/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.0.bb
+++ b/yocto-poky/meta/recipes-extended/texinfo/texinfo_6.0.bb
@@ -79,4 +79,4 @@
                    ${datadir}/${tex_texinfo} \
                    ${mandir}/man1 ${mandir}/man5"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016a.bb b/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016a.bb
deleted file mode 100644
index 76f97f0..0000000
--- a/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016a.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-# note that we allow for us to use data later than our code version
-#
-SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
-LICENSE = "PD & BSD & BSD-3-Clause"
-
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
-
-SRC_URI =" ftp://ftp.iana.org/tz/releases/tzcode${PV}.tar.gz;name=tzcode \
-           ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
-
-SRC_URI[tzcode.md5sum] = "f5e0299925631da7cf82d8ce1205111d"
-SRC_URI[tzcode.sha256sum] = "11ae66d59b844e8c6c81914c9dd73b666627bd7792855ba9de195eee4520c28d"
-SRC_URI[tzdata.md5sum] = "0d3123eb1b453ec0620822bd65be4c42"
-SRC_URI[tzdata.sha256sum] = "5efa6b324e64ef921ef700ac3273a51895f672684a30e342f68e47871c6a8cd1"
-
-S = "${WORKDIR}"
-
-inherit native
-
-do_install () {
-        install -d ${D}${bindir}/
-        install -m 755 zic ${D}${bindir}/
-        install -m 755 zdump ${D}${bindir}/
-        install -m 755 tzselect ${D}${bindir}/
-}
diff --git a/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb b/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb
new file mode 100644
index 0000000..06b92ea
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/tzcode/tzcode-native_2016c.bb
@@ -0,0 +1,25 @@
+# note that we allow for us to use data later than our code version
+#
+SUMMARY = "tzcode, timezone zoneinfo utils -- zic, zdump, tzselect"
+LICENSE = "PD & BSD & BSD-3-Clause"
+
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
+
+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"
+
+SRC_URI[tzcode.md5sum] = "ffb82ab0b588138759902b4627a6a80d"
+SRC_URI[tzcode.sha256sum] = "344b1bd486935bca2b7baa47db3b99b32211c45f31ec0d1ead8bacd103c5a416"
+SRC_URI[tzdata.md5sum] = "0330ccd16140d3b6438a18dae9b34b93"
+SRC_URI[tzdata.sha256sum] = "8700d981e6f2007ac037dabb5d2b12f390e8629bbc30e564bc21cf0c069a2d48"
+
+S = "${WORKDIR}"
+
+inherit native
+
+do_install () {
+        install -d ${D}${bindir}/
+        install -m 755 zic ${D}${bindir}/
+        install -m 755 zdump ${D}${bindir}/
+        install -m 755 tzselect ${D}${bindir}/
+}
diff --git a/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016a.bb b/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016a.bb
deleted file mode 100644
index 6ba5f81..0000000
--- a/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016a.bb
+++ /dev/null
@@ -1,208 +0,0 @@
-SUMMARY = "Timezone data"
-HOMEPAGE = "http://www.iana.org/time-zones"
-SECTION = "base"
-LICENSE = "PD & BSD & BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
-
-DEPENDS = "tzcode-native"
-
-SRC_URI = "ftp://ftp.iana.org/tz/releases/tzdata${PV}.tar.gz;name=tzdata"
-
-SRC_URI[tzdata.md5sum] = "0d3123eb1b453ec0620822bd65be4c42"
-SRC_URI[tzdata.sha256sum] = "5efa6b324e64ef921ef700ac3273a51895f672684a30e342f68e47871c6a8cd1"
-
-inherit allarch
-
-RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
-             timezone-arctic timezone-asia timezone-atlantic \
-             timezone-australia timezone-europe timezone-indian \
-             timezone-iso3166.tab timezone-pacific timezone-zone.tab"
-
-S = "${WORKDIR}"
-
-DEFAULT_TIMEZONE ?= "Universal"
-
-TZONES= "africa antarctica asia australasia europe northamerica southamerica  \
-         factory etcetera backward systemv \
-        "
-# pacificnew 
-
-do_compile () {
-        for zone in ${TZONES}; do \
-            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
-                -y ${S}/yearistype.sh ${S}/${zone} ; \
-            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
-                -y ${S}/yearistype.sh ${S}/${zone} ; \
-            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
-                -y ${S}/yearistype.sh ${S}/${zone} ; \
-        done
-}
-
-do_install () {
-        install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
-        cp -pPR ${S}/$exec_prefix ${D}/
-        # libc is removing zoneinfo files from package
-        cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
-        cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
-
-        # Install default timezone
-        if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
-            install -d ${D}${sysconfdir}
-            echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
-            ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
-        else
-            bberror "DEFAULT_TIMEZONE is set to an invalid value."
-            exit 1
-        fi
-
-        chown -R root:root ${D}
-}
-
-pkg_postinst_${PN} () {
-	etc_lt="$D${sysconfdir}/localtime"
-	src="$D${sysconfdir}/timezone"
-
-	if [ -e ${src} ] ; then
-		tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
-	fi
-	
-	if [ -z "${tz}" ] ; then
-		exit 0
-	fi
-	
-	if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
-		echo "You have an invalid TIMEZONE setting in ${src}"
-		echo "Your ${etc_lt} has been reset to Universal; enjoy!"
-		tz="Universal"
-		echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
-		if [ -L ${etc_lt} ] ; then
-			rm -f "${etc_lt}"
-		fi
-		ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
-	fi
-}
-
-# Packages primarily organized by directory with a major city
-# in most time zones in the base package
-
-PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
-    tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
-    tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
-
-FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
-RPROVIDES_tzdata-africa = "tzdata-africa"
-
-FILES_tzdata-americas += "${datadir}/zoneinfo/America/*  \
-                ${datadir}/zoneinfo/US/*                \
-                ${datadir}/zoneinfo/Brazil/*            \
-                ${datadir}/zoneinfo/Canada/*            \
-                ${datadir}/zoneinfo/Mexico/*            \
-                ${datadir}/zoneinfo/Chile/*"
-RPROVIDES_tzdata-americas = "tzdata-americas"
-
-FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
-RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
-
-FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
-RPROVIDES_tzdata-arctic = "tzdata-arctic"
-
-FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/*        \
-                ${datadir}/zoneinfo/Indian/*            \
-                ${datadir}/zoneinfo/Mideast/*"
-RPROVIDES_tzdata-asia = "tzdata-asia"
-
-FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
-RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
-
-FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
-RPROVIDES_tzdata-australia = "tzdata-australia"
-
-FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
-RPROVIDES_tzdata-europe = "tzdata-europe"
-
-FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
-RPROVIDES_tzdata-pacific = "tzdata-pacific"
-
-FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
-RPROVIDES_tzdata-posix = "tzdata-posix"
-
-FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
-RPROVIDES_tzdata-right = "tzdata-right"
-
-
-FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba           \
-                ${datadir}/zoneinfo/Egypt                \
-                ${datadir}/zoneinfo/Eire                 \
-                ${datadir}/zoneinfo/Factory              \
-                ${datadir}/zoneinfo/GB-Eire              \
-                ${datadir}/zoneinfo/Hongkong             \
-                ${datadir}/zoneinfo/Iceland              \
-                ${datadir}/zoneinfo/Iran                 \
-                ${datadir}/zoneinfo/Israel               \
-                ${datadir}/zoneinfo/Jamaica              \
-                ${datadir}/zoneinfo/Japan                \
-                ${datadir}/zoneinfo/Kwajalein            \
-                ${datadir}/zoneinfo/Libya                \
-                ${datadir}/zoneinfo/Navajo               \
-                ${datadir}/zoneinfo/Poland               \
-                ${datadir}/zoneinfo/Portugal             \
-                ${datadir}/zoneinfo/Singapore            \
-                ${datadir}/zoneinfo/Turkey"
-RPROVIDES_tzdata-misc = "tzdata-misc"
-
-
-FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu     \
-                ${datadir}/zoneinfo/America/Anchorage    \
-                ${datadir}/zoneinfo/America/Los_Angeles  \
-                ${datadir}/zoneinfo/America/Denver       \
-                ${datadir}/zoneinfo/America/Chicago      \
-                ${datadir}/zoneinfo/America/New_York     \
-                ${datadir}/zoneinfo/America/Caracas      \
-                ${datadir}/zoneinfo/America/Sao_Paulo    \
-                ${datadir}/zoneinfo/Europe/London        \
-                ${datadir}/zoneinfo/Europe/Paris         \
-                ${datadir}/zoneinfo/Africa/Cairo         \
-                ${datadir}/zoneinfo/Europe/Moscow        \
-                ${datadir}/zoneinfo/Asia/Dubai           \
-                ${datadir}/zoneinfo/Asia/Karachi         \
-                ${datadir}/zoneinfo/Asia/Dhaka           \
-                ${datadir}/zoneinfo/Asia/Bankok          \
-                ${datadir}/zoneinfo/Asia/Hong_Kong       \
-                ${datadir}/zoneinfo/Asia/Tokyo           \
-                ${datadir}/zoneinfo/Australia/Darwin     \
-                ${datadir}/zoneinfo/Australia/Adelaide   \
-                ${datadir}/zoneinfo/Australia/Brisbane   \
-                ${datadir}/zoneinfo/Australia/Sydney     \
-                ${datadir}/zoneinfo/Pacific/Noumea       \
-                ${datadir}/zoneinfo/CET                  \
-                ${datadir}/zoneinfo/CST6CDT              \
-                ${datadir}/zoneinfo/EET                  \
-                ${datadir}/zoneinfo/EST                  \
-                ${datadir}/zoneinfo/EST5EDT              \
-                ${datadir}/zoneinfo/GB                   \
-                ${datadir}/zoneinfo/GMT                  \
-                ${datadir}/zoneinfo/GMT+0                \
-                ${datadir}/zoneinfo/GMT-0                \
-                ${datadir}/zoneinfo/GMT0                 \
-                ${datadir}/zoneinfo/Greenwich            \
-                ${datadir}/zoneinfo/HST                  \
-                ${datadir}/zoneinfo/MET                  \
-                ${datadir}/zoneinfo/MST                  \
-                ${datadir}/zoneinfo/MST7MDT              \
-                ${datadir}/zoneinfo/NZ                   \
-                ${datadir}/zoneinfo/NZ-CHAT              \
-                ${datadir}/zoneinfo/PRC                  \
-                ${datadir}/zoneinfo/PST8PDT              \
-                ${datadir}/zoneinfo/ROC                  \
-                ${datadir}/zoneinfo/ROK                  \
-                ${datadir}/zoneinfo/UCT                  \
-                ${datadir}/zoneinfo/UTC                  \
-                ${datadir}/zoneinfo/Universal            \
-                ${datadir}/zoneinfo/W-SU                 \
-                ${datadir}/zoneinfo/WET                  \
-                ${datadir}/zoneinfo/Zulu                 \
-                ${datadir}/zoneinfo/zone.tab             \
-                ${datadir}/zoneinfo/iso3166.tab          \
-                ${datadir}/zoneinfo/Etc/*"
-
-CONFFILES_${PN} += "${sysconfdir}/timezone ${sysconfdir}/localtime"
diff --git a/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016c.bb b/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016c.bb
new file mode 100644
index 0000000..5eb85b7
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/tzdata/tzdata_2016c.bb
@@ -0,0 +1,212 @@
+SUMMARY = "Timezone data"
+HOMEPAGE = "http://www.iana.org/time-zones"
+SECTION = "base"
+LICENSE = "PD & BSD & BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76ae2becfcb9a685041c6f166b44c2c2"
+
+DEPENDS = "tzcode-native"
+
+SRC_URI = "http://www.iana.org/time-zones/repository/releases/tzdata${PV}.tar.gz;name=tzdata"
+
+SRC_URI[tzdata.md5sum] = "0330ccd16140d3b6438a18dae9b34b93"
+SRC_URI[tzdata.sha256sum] = "8700d981e6f2007ac037dabb5d2b12f390e8629bbc30e564bc21cf0c069a2d48"
+
+inherit allarch
+
+RCONFLICTS_${PN} = "timezones timezone-africa timezone-america timezone-antarctica \
+             timezone-arctic timezone-asia timezone-atlantic \
+             timezone-australia timezone-europe timezone-indian \
+             timezone-iso3166.tab timezone-pacific timezone-zone.tab"
+
+S = "${WORKDIR}"
+
+DEFAULT_TIMEZONE ?= "Universal"
+INSTALL_TIMEZONE_FILE ?= "1"
+
+TZONES= "africa antarctica asia australasia europe northamerica southamerica  \
+         factory etcetera backward systemv \
+        "
+# pacificnew 
+
+do_compile () {
+        for zone in ${TZONES}; do \
+            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo -L /dev/null \
+                -y ${S}/yearistype.sh ${S}/${zone} ; \
+            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/posix -L /dev/null \
+                -y ${S}/yearistype.sh ${S}/${zone} ; \
+            ${STAGING_BINDIR_NATIVE}/zic -d ${WORKDIR}${datadir}/zoneinfo/right -L ${S}/leapseconds \
+                -y ${S}/yearistype.sh ${S}/${zone} ; \
+        done
+}
+
+do_install () {
+        install -d ${D}/$exec_prefix ${D}${datadir}/zoneinfo
+        cp -pPR ${S}/$exec_prefix ${D}/
+        # libc is removing zoneinfo files from package
+        cp -pP "${S}/zone.tab" ${D}${datadir}/zoneinfo
+        cp -pP "${S}/iso3166.tab" ${D}${datadir}/zoneinfo
+
+        # Install default timezone
+        if [ -e ${D}${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ]; then
+            install -d ${D}${sysconfdir}
+            if [ "${INSTALL_TIMEZONE_FILE}" = "1" ]; then
+                echo ${DEFAULT_TIMEZONE} > ${D}${sysconfdir}/timezone
+            fi
+            ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}${sysconfdir}/localtime
+        else
+            bberror "DEFAULT_TIMEZONE is set to an invalid value."
+            exit 1
+        fi
+
+        chown -R root:root ${D}
+}
+
+pkg_postinst_${PN} () {
+	etc_lt="$D${sysconfdir}/localtime"
+	src="$D${sysconfdir}/timezone"
+
+	if [ -e ${src} ] ; then
+		tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
+	fi
+	
+	if [ -z "${tz}" ] ; then
+		exit 0
+	fi
+	
+	if [ ! -e "$D${datadir}/zoneinfo/${tz}" ] ; then
+		echo "You have an invalid TIMEZONE setting in ${src}"
+		echo "Your ${etc_lt} has been reset to Universal; enjoy!"
+		tz="Universal"
+		echo "Updating ${etc_lt} with $D${datadir}/zoneinfo/${tz}"
+		if [ -L ${etc_lt} ] ; then
+			rm -f "${etc_lt}"
+		fi
+		ln -s "${datadir}/zoneinfo/${tz}" "${etc_lt}"
+	fi
+}
+
+# Packages primarily organized by directory with a major city
+# in most time zones in the base package
+
+PACKAGES = "tzdata tzdata-misc tzdata-posix tzdata-right tzdata-africa \
+    tzdata-americas tzdata-antarctica tzdata-arctic tzdata-asia \
+    tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific"
+
+FILES_tzdata-africa += "${datadir}/zoneinfo/Africa/*"
+RPROVIDES_tzdata-africa = "tzdata-africa"
+
+FILES_tzdata-americas += "${datadir}/zoneinfo/America/*  \
+                ${datadir}/zoneinfo/US/*                \
+                ${datadir}/zoneinfo/Brazil/*            \
+                ${datadir}/zoneinfo/Canada/*            \
+                ${datadir}/zoneinfo/Mexico/*            \
+                ${datadir}/zoneinfo/Chile/*"
+RPROVIDES_tzdata-americas = "tzdata-americas"
+
+FILES_tzdata-antarctica += "${datadir}/zoneinfo/Antarctica/*"
+RPROVIDES_tzdata-antarctica = "tzdata-antarctica"
+
+FILES_tzdata-arctic += "${datadir}/zoneinfo/Arctic/*"
+RPROVIDES_tzdata-arctic = "tzdata-arctic"
+
+FILES_tzdata-asia += "${datadir}/zoneinfo/Asia/*        \
+                ${datadir}/zoneinfo/Indian/*            \
+                ${datadir}/zoneinfo/Mideast/*"
+RPROVIDES_tzdata-asia = "tzdata-asia"
+
+FILES_tzdata-atlantic += "${datadir}/zoneinfo/Atlantic/*"
+RPROVIDES_tzdata-atlantic = "tzdata-atlantic"
+
+FILES_tzdata-australia += "${datadir}/zoneinfo/Australia/*"
+RPROVIDES_tzdata-australia = "tzdata-australia"
+
+FILES_tzdata-europe += "${datadir}/zoneinfo/Europe/*"
+RPROVIDES_tzdata-europe = "tzdata-europe"
+
+FILES_tzdata-pacific += "${datadir}/zoneinfo/Pacific/*"
+RPROVIDES_tzdata-pacific = "tzdata-pacific"
+
+FILES_tzdata-posix += "${datadir}/zoneinfo/posix/*"
+RPROVIDES_tzdata-posix = "tzdata-posix"
+
+FILES_tzdata-right += "${datadir}/zoneinfo/right/*"
+RPROVIDES_tzdata-right = "tzdata-right"
+
+
+FILES_tzdata-misc += "${datadir}/zoneinfo/Cuba           \
+                ${datadir}/zoneinfo/Egypt                \
+                ${datadir}/zoneinfo/Eire                 \
+                ${datadir}/zoneinfo/Factory              \
+                ${datadir}/zoneinfo/GB-Eire              \
+                ${datadir}/zoneinfo/Hongkong             \
+                ${datadir}/zoneinfo/Iceland              \
+                ${datadir}/zoneinfo/Iran                 \
+                ${datadir}/zoneinfo/Israel               \
+                ${datadir}/zoneinfo/Jamaica              \
+                ${datadir}/zoneinfo/Japan                \
+                ${datadir}/zoneinfo/Kwajalein            \
+                ${datadir}/zoneinfo/Libya                \
+                ${datadir}/zoneinfo/Navajo               \
+                ${datadir}/zoneinfo/Poland               \
+                ${datadir}/zoneinfo/Portugal             \
+                ${datadir}/zoneinfo/Singapore            \
+                ${datadir}/zoneinfo/Turkey"
+RPROVIDES_tzdata-misc = "tzdata-misc"
+
+
+FILES_${PN} += "${datadir}/zoneinfo/Pacific/Honolulu     \
+                ${datadir}/zoneinfo/America/Anchorage    \
+                ${datadir}/zoneinfo/America/Los_Angeles  \
+                ${datadir}/zoneinfo/America/Denver       \
+                ${datadir}/zoneinfo/America/Chicago      \
+                ${datadir}/zoneinfo/America/New_York     \
+                ${datadir}/zoneinfo/America/Caracas      \
+                ${datadir}/zoneinfo/America/Sao_Paulo    \
+                ${datadir}/zoneinfo/Europe/London        \
+                ${datadir}/zoneinfo/Europe/Paris         \
+                ${datadir}/zoneinfo/Africa/Cairo         \
+                ${datadir}/zoneinfo/Europe/Moscow        \
+                ${datadir}/zoneinfo/Asia/Dubai           \
+                ${datadir}/zoneinfo/Asia/Karachi         \
+                ${datadir}/zoneinfo/Asia/Dhaka           \
+                ${datadir}/zoneinfo/Asia/Bankok          \
+                ${datadir}/zoneinfo/Asia/Hong_Kong       \
+                ${datadir}/zoneinfo/Asia/Tokyo           \
+                ${datadir}/zoneinfo/Australia/Darwin     \
+                ${datadir}/zoneinfo/Australia/Adelaide   \
+                ${datadir}/zoneinfo/Australia/Brisbane   \
+                ${datadir}/zoneinfo/Australia/Sydney     \
+                ${datadir}/zoneinfo/Pacific/Noumea       \
+                ${datadir}/zoneinfo/CET                  \
+                ${datadir}/zoneinfo/CST6CDT              \
+                ${datadir}/zoneinfo/EET                  \
+                ${datadir}/zoneinfo/EST                  \
+                ${datadir}/zoneinfo/EST5EDT              \
+                ${datadir}/zoneinfo/GB                   \
+                ${datadir}/zoneinfo/GMT                  \
+                ${datadir}/zoneinfo/GMT+0                \
+                ${datadir}/zoneinfo/GMT-0                \
+                ${datadir}/zoneinfo/GMT0                 \
+                ${datadir}/zoneinfo/Greenwich            \
+                ${datadir}/zoneinfo/HST                  \
+                ${datadir}/zoneinfo/MET                  \
+                ${datadir}/zoneinfo/MST                  \
+                ${datadir}/zoneinfo/MST7MDT              \
+                ${datadir}/zoneinfo/NZ                   \
+                ${datadir}/zoneinfo/NZ-CHAT              \
+                ${datadir}/zoneinfo/PRC                  \
+                ${datadir}/zoneinfo/PST8PDT              \
+                ${datadir}/zoneinfo/ROC                  \
+                ${datadir}/zoneinfo/ROK                  \
+                ${datadir}/zoneinfo/UCT                  \
+                ${datadir}/zoneinfo/UTC                  \
+                ${datadir}/zoneinfo/Universal            \
+                ${datadir}/zoneinfo/W-SU                 \
+                ${datadir}/zoneinfo/WET                  \
+                ${datadir}/zoneinfo/Zulu                 \
+                ${datadir}/zoneinfo/zone.tab             \
+                ${datadir}/zoneinfo/iso3166.tab          \
+                ${datadir}/zoneinfo/Etc/*"
+
+CONFFILES_${PN} += "${@ "${sysconfdir}/timezone" if bb.utils.to_boolean(d.getVar('INSTALL_TIMEZONE_FILE', True)) else "" }"
+CONFFILES_${PN} += "${sysconfdir}/localtime"
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch
index 9ba3c1d..afc4c73 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/06-unzip60-alt-iconv-utf8_CVE-2015-1315.patch
@@ -3,6 +3,7 @@
 Last-Update: 2015-02-11
 
 Upstream-Status: Backport
+CVE: CVE-2015-1315
 
 Updated 2015-02-11 by Marc Deslauriers <marc.deslauriers@canonical.com>
 to fix buffer overflow in charset_to_intern()
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch
index e137f0d..0e497cc 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/09-cve-2014-8139-crc-overflow.patch
@@ -5,6 +5,7 @@
 The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz
 
 Upstream-Status: Backport
+CVE: CVE-2014-8139
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
index edc7d51..c989df1 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/10-cve-2014-8140-test-compr-eb.patch
@@ -5,6 +5,7 @@
 The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz
 
 Upstream-Status: Backport
+CVE: CVE-2014-8140
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch
index d0c1db3..c48c23f 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/11-cve-2014-8141-getzip64data.patch
@@ -5,6 +5,7 @@
 The patch comes from unzip_6.0-8+deb7u2.debian.tar.gz
 
 Upstream-Status: Backport
+CVE: CVE-2014-8141
 
 Signed-off-by: Roy Li <rongqing.li@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch
index ea93823..87eed96 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7696.patch
@@ -1,4 +1,5 @@
 Upstream-Status: Backport
+CVE: CVE-2015-7696
 Signed-off-by: Tudor Florea <tudor.flore@enea.com>
 
 From 68efed87fabddd450c08f3112f62a73f61d493c9 Mon Sep 17 00:00:00 2001
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch
index da68988..a8f2936 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/CVE-2015-7697.patch
@@ -1,4 +1,5 @@
 Upstream-Status: Backport
+CVE: CVE-2015-7697
 Signed-off-by: Tudor Florea <tudor.flore@enea.com>
 
 From bd8a743ee0a77e65ad07ef4196c4cd366add3f26 Mon Sep 17 00:00:00 2001
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch b/yocto-poky/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch
index 0a0bfbb..5fcd318 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip/cve-2014-9636.patch
@@ -4,6 +4,7 @@
 Subject: Info-ZIP UnZip buffer overflow
 
 Upstream-Status: Backport
+CVE: CVE-2014-9636
 
 By carefully crafting a corrupt ZIP archive with "extra fields" that
 purport to have compressed blocks larger than the corresponding
diff --git a/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb b/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb
index b386323..9efe756 100644
--- a/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb
+++ b/yocto-poky/meta/recipes-extended/unzip/unzip_6.0.bb
@@ -20,13 +20,17 @@
 
 SRC_URI[md5sum] = "62b490407489521db863b523a7f86375"
 SRC_URI[sha256sum] = "036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37"
+
+# exclude version 5.5.2 which triggers a false positive
+UPSTREAM_CHECK_REGEX = "unzip(?P<pver>(?!552).+)\.tgz"
+
 S = "${WORKDIR}/unzip60"
 
 # Makefile uses CF_NOOPT instead of CFLAGS.  We lifted the values from
 # Makefile and add CFLAGS.  Optimization will be overriden by unzip
 # configure to be -O3.
 #
-EXTRA_OEMAKE += "STRIP=true LF2='' \
+EXTRA_OEMAKE = "-e MAKEFLAGS= STRIP=true LF2='' \
                 'CF_NOOPT=-I. -Ibzip2 -DUNIX ${CFLAGS}'"
 
 export LD = "${CC}"
diff --git a/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch b/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
new file mode 100644
index 0000000..8afed5c
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/watchdog/watchdog/0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch
@@ -0,0 +1,99 @@
+From 83ec34df357218a1c9cfc13a23d3367d333652c3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Dec 2015 01:01:15 +0000
+Subject: [PATCH] Fix build issues found with non glibc C libraries
+
+Add time.h for getting time_t definition
+limits.h for PATH_MAX
+linux/param.h for EXEC_PAGESIZE
+Replace deprecated MNTTAB with _PATH_MNTTAB
+include ext2_mnt.h for MNTOPT_USRQUOTA and MNTOPT_GRPQUOTA and
+MNTTYPE_EXT2
+Include sys/types.h for u_char definition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+
+Upstream-Status: Submitted
+
+ include/extern.h | 1 +
+ src/configfile.c | 1 +
+ src/memory.c     | 3 +++
+ src/net.c        | 1 +
+ src/shutdown.c   | 3 ++-
+ 5 files changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/include/extern.h b/include/extern.h
+index 21db11b..04b16bc 100644
+--- a/include/extern.h
++++ b/include/extern.h
+@@ -3,6 +3,7 @@
+ 
+ #include <netinet/in.h>
+ #include <stdio.h>
++#include <time.h>
+ 
+ #include "logmessage.h"
+ #include "xmalloc.h"
+diff --git a/src/configfile.c b/src/configfile.c
+index be5d7b3..7c1d1dd 100644
+--- a/src/configfile.c
++++ b/src/configfile.c
+@@ -16,6 +16,7 @@
+ #include <errno.h>
+ #include <string.h>
+ #include <dirent.h>
++#include <limits.h>
+ #include <sys/stat.h>
+ 
+ #include "extern.h"
+diff --git a/src/memory.c b/src/memory.c
+index e9607e4..b5e08aa 100644
+--- a/src/memory.c
++++ b/src/memory.c
+@@ -21,6 +21,9 @@
+ #include <sys/stat.h>
+ #include <sys/param.h>
+ #include <sys/mman.h>
++#ifdef __linux__
++#include <linux/param.h>
++#endif
+ 
+ #include "extern.h"
+ #include "watch_err.h"
+diff --git a/src/net.c b/src/net.c
+index 21823ae..8930caf 100644
+--- a/src/net.c
++++ b/src/net.c
+@@ -17,6 +17,7 @@
+ #include <string.h>
+ #include <unistd.h>		/* for gethostname() etc */
+ #include <netdb.h>		/* for gethostbyname() */
++#include <sys/types.h>
+ #include <sys/param.h>	/* for MAXHOSTNAMELEN */
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+diff --git a/src/shutdown.c b/src/shutdown.c
+index 74aafa5..46b99cf 100644
+--- a/src/shutdown.c
++++ b/src/shutdown.c
+@@ -25,6 +25,7 @@
+ 
+ #include "watch_err.h"
+ #include "extern.h"
++#include "ext2_mnt.h"
+ 
+ #if defined __GLIBC__
+ #include "ext2_mnt.h"
+@@ -123,7 +124,7 @@ static void mnt_off()
+ 	FILE *fp;
+ 	struct mntent *mnt;
+ 
+-	fp = setmntent(MNTTAB, "r");
++	fp = setmntent(_PATH_MNTTAB, "r");
+ 	/* in some rare cases fp might be NULL so be careful */
+ 	while (fp != NULL && ((mnt = getmntent(fp)) != (struct mntent *)0)) {
+ 		/* First check if swap */
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch b/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
index 36f2968..e68ad54 100644
--- a/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
+++ b/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-conf.patch
@@ -1,3 +1,6 @@
+Signed-off-by: Diego Rondini <diego.ml@zoho.com>
+Upstream-Status: Inappropriate
+
 --- watchdog-5.13.orig/watchdog.conf	2013-02-01 12:15:44.000000000 +0100
 +++ watchdog-5.13/watchdog.conf	2014-11-13 10:59:43.233943000 +0100
 @@ -20,7 +20,7 @@
diff --git a/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch b/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
index 0fa8ee9..b2765f1 100644
--- a/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
+++ b/yocto-poky/meta/recipes-extended/watchdog/watchdog/watchdog-init.patch
@@ -1,3 +1,6 @@
+Signed-off-by: Diego Rondini <diego.ml@zoho.com>
+Upstream-Status: Inappropriate
+
 --- watchdog-5.13.orig/redhat/watchdog.init	2014-11-12 17:18:39.125943000 +0100
 +++ watchdog-5.13/redhat/watchdog.init	2014-11-12 18:27:36.189943000 +0100
 @@ -7,7 +7,7 @@
diff --git a/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb b/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb
index 9ec0a8e..7330238 100644
--- a/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb
+++ b/yocto-poky/meta/recipes-extended/watchdog/watchdog_5.14.bb
@@ -12,14 +12,24 @@
            file://fixsepbuild.patch \
 	   file://fix-ping-failure.patch \
 	   file://watchdog-init.patch \
-	   file://watchdog-conf.patch"
+	   file://watchdog-conf.patch \
+	   file://0001-Fix-build-issues-found-with-non-glibc-C-libraries.patch \
+"
 
 SRC_URI[md5sum] = "5b2dba0c593942f4acc100bca0d560c4"
 SRC_URI[sha256sum] = "620b2f49e9879f2e85c73d4c1f422f9101e6b38e824fea2414befd8bb6866ad1"
 
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/watchdog/files/watchdog/"
+UPSTREAM_CHECK_REGEX = "/watchdog/(?P<pver>(\d+[\.\-_]*)+)/"
+
 inherit autotools
 inherit update-rc.d
 
+DEPENDS_append_libc-musl = " libtirpc "
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
+LDFLAGS_append_libc-musl = " -ltirpc "
+EXTRA_OECONF_append_libc-musl = " --disable-nfs "
+
 INITSCRIPT_NAME = "watchdog.sh"
 INITSCRIPT_PARAMS = "start 15 1 2 3 4 5 . stop 85 0 6 ."
 
diff --git a/yocto-poky/meta/recipes-extended/wget/wget.inc b/yocto-poky/meta/recipes-extended/wget/wget.inc
index 049b898..dc381a6 100644
--- a/yocto-poky/meta/recipes-extended/wget/wget.inc
+++ b/yocto-poky/meta/recipes-extended/wget/wget.inc
@@ -22,3 +22,8 @@
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[libuuid] = "--with-libuuid, --without-libuuid,util-linux"
+
+# Let aclocal use the relative path for the m4 file rather than
+# absolute, otherwise there might be an "Argument list too long" error
+# when it is built in a long/deep directory.
+acpaths = "-I ./m4"
diff --git a/yocto-poky/meta/recipes-extended/wget/wget/fix_makefile.patch b/yocto-poky/meta/recipes-extended/wget/wget/fix_makefile.patch
deleted file mode 100644
index eaa2e7e..0000000
--- a/yocto-poky/meta/recipes-extended/wget/wget/fix_makefile.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Upstream-Status: Pending
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: wget-1.12/configure.ac
-===================================================================
---- wget-1.12.orig/configure.ac	2009-09-22 09:39:49.000000000 -0700
-+++ wget-1.12/configure.ac	2011-10-19 20:32:53.714812160 -0700
-@@ -177,7 +177,7 @@
- dnl Gettext
- dnl
- AM_GNU_GETTEXT([external],[need-ngettext])
--AM_GNU_GETTEXT_VERSION([0.17])
-+AM_GNU_GETTEXT_VERSION([0.18])
- 
- AC_PROG_RANLIB
- 
diff --git a/yocto-poky/meta/recipes-extended/wget/wget_1.16.3.bb b/yocto-poky/meta/recipes-extended/wget/wget_1.16.3.bb
deleted file mode 100644
index 5c34a42..0000000
--- a/yocto-poky/meta/recipes-extended/wget/wget_1.16.3.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
-           file://fix_makefile.patch \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-          "
-
-SRC_URI[md5sum] = "f61d9011b99f824106a5d5a05dd0f63d"
-SRC_URI[sha256sum] = "9f1c6d09d7148c1c2d9fd0ea655dcf4dcc407deb2db32d4126251ca0245cb670"
-
-require wget.inc
diff --git a/yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb b/yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb
new file mode 100644
index 0000000..dca5d1f
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/wget/wget_1.17.1.bb
@@ -0,0 +1,8 @@
+SRC_URI = "${GNU_MIRROR}/wget/wget-${PV}.tar.gz \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+          "
+
+SRC_URI[md5sum] = "a6a908c9ae0e6a4194c628974cc3f05a"
+SRC_URI[sha256sum] = "029fbb93bdc1c0c5a7507b6076a6ec2f8d34204a85aa87e5b2f61a9405b290f5"
+
+require wget.inc
diff --git a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Don-t-build-the-in-script-manual.patch b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Don-t-build-the-in-script-manual.patch
new file mode 100644
index 0000000..14160bf
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Don-t-build-the-in-script-manual.patch
@@ -0,0 +1,30 @@
+From 33f42aa8d190b40be18cd0541b5881d46978b572 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 17 Dec 2015 11:50:05 +0200
+Subject: [PATCH] Don't build the in-script manual
+
+Building the contents for "--manual" option requires a web browser
+or java (these are the two options for "xmlto txt" support).
+That's bonkers so don't do it: the man pages are still available
+and contain the same info.
+
+Upstream-Status: Inappropriate [disables in-script docs]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ scripts/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/Makefile.in b/scripts/Makefile.in
+index 430032d..85359bc 100644
+--- a/scripts/Makefile.in
++++ b/scripts/Makefile.in
+@@ -112,5 +112,5 @@ html/%.html: desc/%.xml
+ 	(cd html;$(XMLTO) html-nochunks ../$<)
+ 
+ %.txt: desc/%.xml
+-	$(XMLTO) txt $<
++	echo "Please see the man pages." > $@
+ 
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch
index 4cd1baf..e9defad 100644
--- a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch
+++ b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils/0001-Reinstate-xdg-terminal.patch
@@ -1,22 +1,20 @@
-From 174aa7206f4b308d4d2292bb8067a07d8cc715c0 Mon Sep 17 00:00:00 2001
-From: Koen Kooi <koen@dominion.thruhere.net>
-Date: Tue, 29 Apr 2014 07:29:32 +0200
-Subject: [PATCH] Reinstate xdg-terminal
+From 37e227ae1766568d8de55e268bb69bc15eee3529 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Thu, 26 Nov 2015 16:01:47 +0200
+Subject: [PATCH] Enable xdg-terminal
 
-Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+Upstream-Status: Inappropriate [configuration]
 
-Upstream-Status: Inappropriate [Revert]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
 ---
- scripts/Makefile.in  |   6 +-
- scripts/xdg-terminal | 622 +++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 625 insertions(+), 3 deletions(-)
- create mode 100755 scripts/xdg-terminal
+ scripts/Makefile.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/scripts/Makefile.in b/scripts/Makefile.in
-index 2c7d2ac..bef10d1 100644
+index d167393..430032d 100644
 --- a/scripts/Makefile.in
 +++ b/scripts/Makefile.in
-@@ -20,11 +20,11 @@ SCRIPTS		= \
+@@ -20,7 +20,8 @@ SCRIPTS		= \
      xdg-open \
      xdg-email \
      xdg-screensaver \
@@ -26,647 +24,6 @@
  #    xdg-su
  #    xdg-copy \
  #    xdg-file-dialog
--#    xdg-terminal
- 
- MANPAGES=	$(SCRIPTS:%=man/%.1)
- WEBPAGES=	$(SCRIPTS:%=%.html)
-@@ -42,7 +42,7 @@ release:	scripts html man
- 	rm -f xdg-*.in *~ HACKING generate-help-script.awk
- 	rm -rf desc/
- 	rm -rf xsl/
--	rm -f xdg-file-dialog xdg-su xdg-copy xdg-terminal
-+	rm -f xdg-file-dialog xdg-su xdg-copy
- 
- distclean: clean
- 	rm -f Makefile
-diff --git a/scripts/xdg-terminal b/scripts/xdg-terminal
-new file mode 100755
-index 0000000..4bd9205
---- /dev/null
-+++ b/scripts/xdg-terminal
-@@ -0,0 +1,622 @@
-+#!/bin/sh
-+#---------------------------------------------
-+#   xdg-terminal
-+#
-+#   Utility script to open the registered terminal emulator
-+#
-+#   Refer to the usage() function below for usage.
-+#
-+#   Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
-+#   Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
-+#   Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
-+#
-+#   LICENSE:
-+#
-+#   Permission is hereby granted, free of charge, to any person obtaining a
-+#   copy of this software and associated documentation files (the "Software"),
-+#   to deal in the Software without restriction, including without limitation
-+#   the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+#   and/or sell copies of the Software, and to permit persons to whom the
-+#   Software is furnished to do so, subject to the following conditions:
-+#
-+#   The above copyright notice and this permission notice shall be included
-+#   in all copies or substantial portions of the Software.
-+#
-+#   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-+#   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+#   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-+#   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+#   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+#   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+#   OTHER DEALINGS IN THE SOFTWARE.
-+#
-+#---------------------------------------------
-+
-+manualpage()
-+{
-+cat << _MANUALPAGE
-+Name
-+
-+   xdg-terminal - opens the user's preferred terminal emulator application
-+
-+Synopsis
-+
-+   xdg-terminal [command]
-+
-+   xdg-terminal { --help | --manual | --version }
-+
-+Description
-+
-+   xdg-terminal opens the user's preferred terminal emulator application. If
-+   a command is provided the command will be executed by the shell within the
-+   newly opened terminal window.
-+
-+   xdg-terminal is for use inside a desktop session only. It is not
-+   recommended to use xdg-terminal as root.
-+
-+Options
-+
-+   --help
-+           Show command synopsis.
-+
-+   --manual
-+           Show this manual page.
-+
-+   --version
-+           Show the xdg-utils version information.
-+
-+Exit Codes
-+
-+   An exit code of 0 indicates success while a non-zero exit code indicates
-+   failure. The following failure codes can be returned:
-+
-+   1
-+           Error in command line syntax.
-+
-+   3
-+           A required tool could not be found.
-+
-+   4
-+           The action failed.
-+
-+Examples
-+
-+ xdg-terminal
-+
-+   Opens the user's default terminal emulator, just starting an interactive
-+   shell.
-+
-+ xdg-terminal top
-+
-+   Opens the user's default terminal emulator and lets it run the top
-+   executable.
-+_MANUALPAGE
-+}
-+
-+usage()
-+{
-+cat << _USAGE
-+   xdg-terminal - opens the user's preferred terminal emulator application
-+
-+Synopsis
-+
-+   xdg-terminal [command]
-+
-+   xdg-terminal { --help | --manual | --version }
-+
-+_USAGE
-+}
-+
-+#@xdg-utils-common@
-+
-+#----------------------------------------------------------------------------
-+#   Common utility functions included in all XDG wrapper scripts
-+#----------------------------------------------------------------------------
-+
-+DEBUG()
-+{
-+  [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
-+  [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
-+  shift
-+  echo "$@" >&2
-+}
-+
-+# This handles backslashes but not quote marks.
-+first_word()
-+{
-+    read first rest
-+    echo "$first"
-+}
-+
-+#-------------------------------------------------------------
-+# map a binary to a .desktop file
-+binary_to_desktop_file()
-+{
-+    search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
-+    binary="`which "$1"`"
-+    binary="`readlink -f "$binary"`"
-+    base="`basename "$binary"`"
-+    IFS=:
-+    for dir in $search; do
-+        unset IFS
-+        [ "$dir" ] || continue
-+        [ -d "$dir/applications" ] || [ -d "$dir/applnk" ] || continue
-+        for file in "$dir"/applications/*.desktop "$dir"/applications/*/*.desktop "$dir"/applnk/*.desktop "$dir"/applnk/*/*.desktop; do
-+            [ -r "$file" ] || continue
-+            # Check to make sure it's worth the processing.
-+            grep -q "^Exec.*$base" "$file" || continue
-+            # Make sure it's a visible desktop file (e.g. not "preferred-web-browser.desktop").
-+            grep -Eq "^(NoDisplay|Hidden)=true" "$file" && continue
-+            command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
-+            command="`which "$command"`"
-+            if [ x"`readlink -f "$command"`" = x"$binary" ]; then
-+                # Fix any double slashes that got added path composition
-+                echo "$file" | sed -e 's,//*,/,g'
-+                return
-+            fi
-+        done
-+    done
-+}
-+
-+#-------------------------------------------------------------
-+# map a .desktop file to a binary
-+## FIXME: handle vendor dir case
-+desktop_file_to_binary()
-+{
-+    search="${XDG_DATA_HOME:-$HOME/.local/share}:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
-+    desktop="`basename "$1"`"
-+    IFS=:
-+    for dir in $search; do
-+        unset IFS
-+        [ "$dir" ] && [ -d "$dir/applications" ] || continue
-+        file="$dir/applications/$desktop"
-+        [ -r "$file" ] || continue
-+        # Remove any arguments (%F, %f, %U, %u, etc.).
-+        command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`"
-+        command="`which "$command"`"
-+        readlink -f "$command"
-+        return
-+    done
-+}
-+
-+#-------------------------------------------------------------
-+# Exit script on successfully completing the desired operation
-+
-+exit_success()
-+{
-+    if [ $# -gt 0 ]; then
-+        echo "$@"
-+        echo
-+    fi
-+
-+    exit 0
-+}
-+
-+
-+#-----------------------------------------
-+# Exit script on malformed arguments, not enough arguments
-+# or missing required option.
-+# prints usage information
-+
-+exit_failure_syntax()
-+{
-+    if [ $# -gt 0 ]; then
-+        echo "xdg-terminal: $@" >&2
-+        echo "Try 'xdg-terminal --help' for more information." >&2
-+    else
-+        usage
-+        echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info."
-+    fi
-+
-+    exit 1
-+}
-+
-+#-------------------------------------------------------------
-+# Exit script on missing file specified on command line
-+
-+exit_failure_file_missing()
-+{
-+    if [ $# -gt 0 ]; then
-+        echo "xdg-terminal: $@" >&2
-+    fi
-+
-+    exit 2
-+}
-+
-+#-------------------------------------------------------------
-+# Exit script on failure to locate necessary tool applications
-+
-+exit_failure_operation_impossible()
-+{
-+    if [ $# -gt 0 ]; then
-+        echo "xdg-terminal: $@" >&2
-+    fi
-+
-+    exit 3
-+}
-+
-+#-------------------------------------------------------------
-+# Exit script on failure returned by a tool application
-+
-+exit_failure_operation_failed()
-+{
-+    if [ $# -gt 0 ]; then
-+        echo "xdg-terminal: $@" >&2
-+    fi
-+
-+    exit 4
-+}
-+
-+#------------------------------------------------------------
-+# Exit script on insufficient permission to read a specified file
-+
-+exit_failure_file_permission_read()
-+{
-+    if [ $# -gt 0 ]; then
-+        echo "xdg-terminal: $@" >&2
-+    fi
-+
-+    exit 5
-+}
-+
-+#------------------------------------------------------------
-+# Exit script on insufficient permission to write a specified file
-+
-+exit_failure_file_permission_write()
-+{
-+    if [ $# -gt 0 ]; then
-+        echo "xdg-terminal: $@" >&2
-+    fi
-+
-+    exit 6
-+}
-+
-+check_input_file()
-+{
-+    if [ ! -e "$1" ]; then
-+        exit_failure_file_missing "file '$1' does not exist"
-+    fi
-+    if [ ! -r "$1" ]; then
-+        exit_failure_file_permission_read "no permission to read file '$1'"
-+    fi
-+}
-+
-+check_vendor_prefix()
-+{
-+    file_label="$2"
-+    [ -n "$file_label" ] || file_label="filename"
-+    file=`basename "$1"`
-+    case "$file" in
-+       [[:alpha:]]*-*)
-+         return
-+         ;;
-+    esac
-+
-+    echo "xdg-terminal: $file_label '$file' does not have a proper vendor prefix" >&2
-+    echo 'A vendor prefix consists of alpha characters ([a-zA-Z]) and is terminated' >&2
-+    echo 'with a dash ("-"). An example '"$file_label"' is '"'example-$file'" >&2
-+    echo "Use --novendor to override or 'xdg-terminal --manual' for additional info." >&2
-+    exit 1
-+}
-+
-+check_output_file()
-+{
-+    # if the file exists, check if it is writeable
-+    # if it does not exists, check if we are allowed to write on the directory
-+    if [ -e "$1" ]; then
-+        if [ ! -w "$1" ]; then
-+            exit_failure_file_permission_write "no permission to write to file '$1'"
-+        fi
-+    else
-+        DIR=`dirname "$1"`
-+        if [ ! -w "$DIR" ] || [ ! -x "$DIR" ]; then
-+            exit_failure_file_permission_write "no permission to create file '$1'"
-+        fi
-+    fi
-+}
-+
-+#----------------------------------------
-+# Checks for shared commands, e.g. --help
-+
-+check_common_commands()
-+{
-+    while [ $# -gt 0 ] ; do
-+        parm="$1"
-+        shift
-+
-+        case "$parm" in
-+            --help)
-+            usage
-+            echo "Use 'man xdg-terminal' or 'xdg-terminal --manual' for additional info."
-+            exit_success
-+            ;;
-+
-+            --manual)
-+            manualpage
-+            exit_success
-+            ;;
-+
-+            --version)
-+            echo "xdg-terminal 1.1.0 rc1"
-+            exit_success
-+            ;;
-+        esac
-+    done
-+}
-+
-+check_common_commands "$@"
-+
-+[ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && unset XDG_UTILS_DEBUG_LEVEL;
-+if [ ${XDG_UTILS_DEBUG_LEVEL-0} -lt 1 ]; then
-+    # Be silent
-+    xdg_redirect_output=" > /dev/null 2> /dev/null"
-+else
-+    # All output to stderr
-+    xdg_redirect_output=" >&2"
-+fi
-+
-+#--------------------------------------
-+# Checks for known desktop environments
-+# set variable DE to the desktop environments name, lowercase
-+
-+detectDE()
-+{
-+    # see https://bugs.freedesktop.org/show_bug.cgi?id=34164
-+    unset GREP_OPTIONS
-+
-+    if [ -n "${XDG_CURRENT_DESKTOP}" ]; then
-+      case "${XDG_CURRENT_DESKTOP}" in
-+         ENLIGHTENMENT)
-+           DE=enlightenment;
-+           ;;
-+         GNOME)
-+           DE=gnome;
-+           ;;
-+         KDE)
-+           DE=kde;
-+           ;;
-+         LXDE)
-+           DE=lxde;
-+           ;;
-+         MATE)
-+           DE=mate;
-+           ;;
-+         XFCE)
-+           DE=xfce
-+           ;;
-+      esac
-+    fi
-+
-+    if [ x"$DE" = x"" ]; then
-+      # classic fallbacks
-+      if [ x"$KDE_FULL_SESSION" != x"" ]; then DE=kde;
-+      elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
-+      elif [ x"$MATE_DESKTOP_SESSION_ID" != x"" ]; then DE=mate;
-+      elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/null 2>&1` ; then DE=gnome;
-+      elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/null 2>&1; then DE=xfce;
-+      elif xprop -root 2> /dev/null | grep -i '^xfce_desktop_window' >/dev/null 2>&1; then DE=xfce
-+      elif echo $DESKTOP | grep -q '^Enlightenment'; then DE=enlightenment;
-+      fi
-+    fi
-+
-+    if [ x"$DE" = x"" ]; then
-+      # fallback to checking $DESKTOP_SESSION
-+      case "$DESKTOP_SESSION" in
-+         gnome)
-+           DE=gnome;
-+           ;;
-+         LXDE|Lubuntu)
-+           DE=lxde; 
-+           ;;
-+         MATE)
-+           DE=mate;
-+           ;;
-+         xfce|xfce4|'Xfce Session')
-+           DE=xfce;
-+           ;;
-+      esac
-+    fi
-+
-+    if [ x"$DE" = x"" ]; then
-+      # fallback to uname output for other platforms
-+      case "$(uname 2>/dev/null)" in 
-+        Darwin)
-+          DE=darwin;
-+          ;;
-+      esac
-+    fi
-+
-+    if [ x"$DE" = x"gnome" ]; then
-+      # gnome-default-applications-properties is only available in GNOME 2.x
-+      # but not in GNOME 3.x
-+      which gnome-default-applications-properties > /dev/null 2>&1  || DE="gnome3"
-+    fi
-+}
-+
-+#----------------------------------------------------------------------------
-+# kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
-+# It also always returns 1 in KDE 3.4 and earlier
-+# Simply return 0 in such case
-+
-+kfmclient_fix_exit_code()
-+{
-+    version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
-+    major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
-+    minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
-+    release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
-+    test "$major" -gt 3 && return $1
-+    test "$minor" -gt 5 && return $1
-+    test "$release" -gt 4 && return $1
-+    return 0
-+}
-+
-+terminal_kde()
-+{
-+    terminal=`kreadconfig --file kdeglobals --group General --key TerminalApplication --default konsole`
-+
-+    terminal_exec=`which $terminal 2>/dev/null`
-+
-+    if [ -x "$terminal_exec" ]; then
-+        if [ x"$1" = x"" ]; then
-+            $terminal_exec
-+        else
-+            $terminal_exec -e "$1"
-+        fi
-+
-+        if [ $? -eq 0 ]; then
-+            exit_success
-+        else
-+            exit_failure_operation_failed
-+        fi
-+    else
-+        exit_failure_operation_impossible "configured terminal program '$terminal' not found or not executable"
-+    fi
-+}
-+
-+terminal_gnome()
-+{
-+    term_exec_key="/desktop/gnome/applications/terminal/exec"
-+    term_exec_arg_key="/desktop/gnome/applications/terminal/exec_arg"
-+
-+    term_exec=`gconftool-2 --get ${term_exec_key}`
-+    term_exec_arg=`gconftool-2 --get ${term_exec_arg_key}`
-+
-+    terminal_exec=`which $term_exec 2>/dev/null`
-+
-+    if [ -x "$terminal_exec" ]; then
-+        if [ x"$1" = x"" ]; then
-+            $terminal_exec
-+        else
-+            if [ x"$term_exec_arg" = x"" ]; then
-+                $terminal_exec "$1"
-+            else
-+                $terminal_exec "$term_exec_arg" "$1"
-+            fi
-+        fi
-+
-+        if [ $? -eq 0 ]; then
-+            exit_success
-+        else
-+            exit_failure_operation_failed
-+        fi
-+    else
-+        exit_failure_operation_impossible "configured terminal program '$term_exec' not found or not executable"
-+    fi
-+}
-+
-+terminal_xfce()
-+{
-+    if [ x"$1" = x"" ]; then
-+        exo-open --launch TerminalEmulator
-+    else
-+        exo-open --launch TerminalEmulator "$1"
-+    fi
-+
-+    if [ $? -eq 0 ]; then
-+        exit_success
-+    else
-+        exit_failure_operation_failed
-+    fi
-+}
-+
-+terminal_generic()
-+{
-+    # if $TERM is a known non-command, use hard-coded fallbacks
-+    if [ x"$TERM" = x"" ] || [ x"$TERM" = x"linux" ] || [ x"$TERM" = x"vt100" ]; then
-+        TERM=xterm
-+    fi
-+
-+    terminal_exec=`which $TERM 2>/dev/null`
-+
-+    if [ -x "$terminal_exec" ]; then
-+        if [ x"$1" = x"" ]; then
-+            $terminal_exec
-+        else
-+            # screen and urxvt won't do their own parsing of quoted arguments
-+            if [ x"$TERM" = x"screen" ]; then
-+                # screen has an incompatible meaning for -e
-+                sh -c "exec $terminal_exec $1"
-+            elif [ x"$TERM" = x"urxvt" ] || [ x"$TERM" = x"rxvt-unicode" ] || [ x"$TERM" = x"rxvt" ]; then
-+                #TODO: Use whatever mechanism dash supports to test for
-+                #      rxvt-* to match things like rxvt-unicode-256color
-+                sh -c "exec $terminal_exec -e $1"
-+            else
-+                $terminal_exec -e "$1"
-+            fi
-+        fi
-+
-+        if [ $? -eq 0 ]; then
-+            exit_success
-+        else
-+            exit_failure_operation_failed
-+        fi
-+    else
-+        exit_failure_operation_impossible "configured terminal program '$TERM' not found or not executable"
-+    fi
-+}
-+
-+terminal_lxde()
-+{
-+    if which lxterminal &>/dev/null; then
-+        if [ x"$1" = x"" ]; then
-+            lxterminal
-+        else
-+            lxterminal -e "$1"
-+        fi
-+    else
-+        terminal_generic "$1"
-+    fi
-+}
-+
-+#[ x"$1" != x"" ] || exit_failure_syntax
-+
-+command=
-+while [ $# -gt 0 ] ; do
-+    parm="$1"
-+    shift
-+
-+    case "$parm" in
-+      -*)
-+        exit_failure_syntax "unexpected option '$parm'"
-+        ;;
-+
-+      *)
-+        if [ -n "$command" ] ; then
-+            exit_failure_syntax "unexpected argument '$parm'"
-+        fi
-+        command="$parm"
-+        ;;
-+    esac
-+done
-+
-+detectDE
-+
-+if [ x"$DE" = x"" ]; then
-+    DE=generic
-+fi
-+
-+case "$DE" in
-+    kde)
-+    terminal_kde "$command"
-+    ;;
-+
-+    gnome*)
-+    terminal_gnome "$command"
-+    ;;
-+
-+    xfce)
-+    terminal_xfce "$command"
-+    ;;
-+
-+    lxde)
-+    terminal_lxde "$command"
-+    ;;
-+
-+    generic)
-+    terminal_generic "$command"
-+    ;;
-+
-+    *)
-+    exit_failure_operation_impossible "no terminal emulator available"
-+    ;;
-+esac
 -- 
-1.9.0
+2.1.4
 
diff --git a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb
deleted file mode 100644
index 46f1e3c..0000000
--- a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.0-rc1.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Basic desktop integration functions"
-
-DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
-desktop integration functions for any Free Desktop, such as Linux. \
-They are intended to provide a set of defacto standards. \
-The following scripts are provided at this time: \
-xdg-desktop-icon \     
-xdg-desktop-menu \  
-xdg-email \ 
-xdg-icon-resource \
-xdg-mime \       
-xdg-open \     
-xdg-screensaver \ 
-xdg-terminal \
-"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
-
-SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
-           file://0001-Reinstate-xdg-terminal.patch \
-          "
-
-SRC_URI[md5sum] = "fadf5e7a08e0526fc60dbe3e5b7ef8d6"
-SRC_URI[sha256sum] = "7b05558ae4bb8ede356863cae8c42e3e012aa421bf9d45130a570fd209d79102"
-
-inherit autotools-brokensep distro_features_check
-
-# The xprop requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-RDEPENDS_${PN} += "xprop"
diff --git a/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
new file mode 100644
index 0000000..c1472cf
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/xdg-utils/xdg-utils_1.1.1.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Basic desktop integration functions"
+
+DESCRIPTION = "The xdg-utils package is a set of simple scripts that provide basic \
+desktop integration functions for any Free Desktop, such as Linux. \
+They are intended to provide a set of defacto standards. \
+The following scripts are provided at this time: \
+xdg-desktop-icon \
+xdg-desktop-menu \
+xdg-email \
+xdg-icon-resource \
+xdg-mime \
+xdg-open \
+xdg-screensaver \
+xdg-terminal \
+"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a5367a90934098d6b05af3b746405014"
+
+SRC_URI = "http://portland.freedesktop.org/download/${BPN}-${PV}.tar.gz \
+           file://0001-Reinstate-xdg-terminal.patch \
+           file://0001-Don-t-build-the-in-script-manual.patch \
+          "
+
+SRC_URI[md5sum] = "2d0aec6037769a5f138ff404b1bb4b15"
+SRC_URI[sha256sum] = "b0dd63a2576e0bb16f1aa78d6ddf7d6784784a098d4df17161cd6a17c7bc4125"
+
+UPSTREAM_CHECK_REGEX = "xdg-utils-(?P<pver>((\d+[\.\-_]*)+)((rc|alpha|beta)\d+)?)\.(tar\.gz|tgz)"
+
+inherit autotools-brokensep distro_features_check
+
+# The xprop requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+DEPENDS = "xmlto-native libxslt-native"
+RDEPENDS_${PN} += "xprop"
diff --git a/yocto-poky/meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch b/yocto-poky/meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch
new file mode 100644
index 0000000..3c1b2f6
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/xinetd/xinetd/0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch
@@ -0,0 +1,100 @@
+From e8b0ffc7ea04cc71dba97a38e1a134aaf2285c2d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Dec 2015 07:14:50 +0000
+Subject: [PATCH] configure: Use HAVE_SYS_RESOURCE_H to guard sys/resource.h
+ inclusion
+
+HAVE_RLIM_T check will not let sys/resource.h to be checked and
+rlim_t is defined in sys/resource.h so the check would fail.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ aclocal.m4 |  2 +-
+ configure  | 14 +++++++-------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 6e6f32c..70e7076 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -11,7 +11,7 @@ AC_CACHE_VAL(xinetd_cv_type_$1,
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+diff --git a/configure b/configure
+index b507d38..bec56ea 100755
+--- a/configure
++++ b/configure
+@@ -7640,7 +7640,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7686,7 +7686,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7732,7 +7732,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7778,7 +7778,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7824,7 +7824,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7870,7 +7870,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+@@ -7916,7 +7916,7 @@ cat >>conftest.$ac_ext <<_ACEOF
+ #if HAVE_NETDB_H
+ #include <netdb.h>
+ #endif
+-#if HAVE_RLIM_T
++#if HAVE_SYS_RESOURCE_H
+ #include <sys/resource.h>
+ #endif
+ #if HAVE_STDINT_H
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch b/yocto-poky/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
index 0542dbe..c44c5a1 100644
--- a/yocto-poky/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
+++ b/yocto-poky/meta/recipes-extended/xinetd/xinetd/xinetd-CVE-2013-4342.patch
@@ -9,6 +9,7 @@
 the patch come from:
 https://bugzilla.redhat.com/attachment.cgi?id=799732&action=diff
 
+CVE: CVE-2013-4342
 Signed-off-by: Li Wang <li.wang@windriver.com>
 ---
  xinetd/builtins.c |    2 +-
diff --git a/yocto-poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/yocto-poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
index ffc03e5..6bfaabe 100644
--- a/yocto-poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
+++ b/yocto-poky/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
@@ -7,8 +7,12 @@
 LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=8ad8615198542444f84d28a6cf226dd8"
 
 DEPENDS = ""
+DEPENDS_append_libc-musl = " libtirpc "
 PR = "r2"
 
+# Blacklist a bogus tag in upstream check
+UPSTREAM_CHECK_GITTAGREGEX = "xinetd-(?P<pver>(?!20030122).+)"
+
 SRC_URI = "git://github.com/xinetd-org/xinetd.git;protocol=https \
       file://xinetd.init \
       file://xinetd.conf \
@@ -17,6 +21,7 @@
       file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
       file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
       file://xinetd-CVE-2013-4342.patch \
+      file://0001-configure-Use-HAVE_SYS_RESOURCE_H-to-guard-sys-resou.patch \
       file://xinetd.service \
       "
 
@@ -36,6 +41,9 @@
 PACKAGECONFIG ??= "tcp-wrappers"
 PACKAGECONFIG[tcp-wrappers] = "--with-libwrap,,tcp-wrappers"
 
+CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc "
+LDFLAGS_append_libc-musl = " -ltirpc "
+
 do_configure() {
 	# Looks like configure.in is broken, so we are skipping
 	# rebuilding configure and are just using the shipped one
@@ -56,6 +64,7 @@
 	install -m 644 "${WORKDIR}/xinetd.default" "${D}${sysconfdir}/default/xinetd"
 	install -m 755 "${B}/xinetd/xinetd" "${D}${sbindir}"
 	install -m 755 "${B}/xinetd/itox" "${D}${sbindir}"
+	install -m 664 ${S}/contrib/xinetd.d/* ${D}${sysconfdir}/xinetd.d
 
 	# Install systemd unit files
 	install -d ${D}${systemd_unitdir}/system
diff --git a/yocto-poky/meta/recipes-extended/xz/xz_5.2.1.bb b/yocto-poky/meta/recipes-extended/xz/xz_5.2.1.bb
deleted file mode 100644
index cf7fba6..0000000
--- a/yocto-poky/meta/recipes-extended/xz/xz_5.2.1.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-SUMMARY = "Utilities for managing LZMA compressed files"
-HOMEPAGE = "http://tukaani.org/xz/"
-SECTION = "base"
-
-# The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file
-# which is GPLv3 is an m4 macro which isn't shipped in any of our packages,
-# and the LGPL bits are under lib/, which appears to be used for libgnu, which
-# appears to be used for DOS builds. So we're left with GPLv2+ and PD.
-LICENSE = "GPLv2+ & GPL-3.0-with-autoconf-exception & LGPLv2.1+ & PD"
-LICENSE_${PN} = "GPLv2+"
-LICENSE_${PN}-dev = "GPLv2+"
-LICENSE_${PN}-staticdev = "GPLv2+"
-LICENSE_${PN}-doc = "GPLv2+"
-LICENSE_${PN}-dbg = "GPLv2+"
-LICENSE_${PN}-locale = "GPLv2+"
-LICENSE_liblzma = "PD"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \
-                    file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \
-                    file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 "
-
-SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz"
-SRC_URI[md5sum] = "3e44c766c3fb4f19e348e646fcd5778a"
-SRC_URI[sha256sum] = "b918b6648076e74f8d7ae19db5ee663df800049e187259faf5eb997a7b974681"
-
-inherit autotools gettext
-
-PACKAGES =+ "liblzma"
-
-FILES_liblzma = "${libdir}/liblzma*${SOLIBS}"
-
-BBCLASSEXTEND = "native nativesdk"
-
-export CONFIG_SHELL="/bin/sh"
diff --git a/yocto-poky/meta/recipes-extended/xz/xz_5.2.2.bb b/yocto-poky/meta/recipes-extended/xz/xz_5.2.2.bb
new file mode 100644
index 0000000..d118f3a
--- /dev/null
+++ b/yocto-poky/meta/recipes-extended/xz/xz_5.2.2.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Utilities for managing LZMA compressed files"
+HOMEPAGE = "http://tukaani.org/xz/"
+SECTION = "base"
+
+# The source includes bits of PD, GPLv2, GPLv3, LGPLv2.1+, but the only file
+# which is GPLv3 is an m4 macro which isn't shipped in any of our packages,
+# and the LGPL bits are under lib/, which appears to be used for libgnu, which
+# appears to be used for DOS builds. So we're left with GPLv2+ and PD.
+LICENSE = "GPLv2+ & GPL-3.0-with-autoconf-exception & LGPLv2.1+ & PD"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_${PN}-dev = "GPLv2+"
+LICENSE_${PN}-staticdev = "GPLv2+"
+LICENSE_${PN}-doc = "GPLv2+"
+LICENSE_${PN}-dbg = "GPLv2+"
+LICENSE_${PN}-locale = "GPLv2+"
+LICENSE_liblzma = "PD"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c475b6c7dca236740ace4bba553e8e1c \
+                    file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \
+                    file://lib/getopt.c;endline=23;md5=2069b0ee710572c03bb3114e4532cd84 "
+
+SRC_URI = "http://tukaani.org/xz/xz-${PV}.tar.gz"
+SRC_URI[md5sum] = "7cf6a8544a7dae8e8106fdf7addfa28c"
+SRC_URI[sha256sum] = "73df4d5d34f0468bd57d09f2d8af363e95ed6cc3a4a86129d2f2c366259902a2"
+
+inherit autotools gettext
+
+PACKAGES =+ "liblzma"
+
+FILES_liblzma = "${libdir}/liblzma*${SOLIBS}"
+
+BBCLASSEXTEND = "native nativesdk"
+
+export CONFIG_SHELL="/bin/sh"
diff --git a/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb b/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb
index 1e96110..383da4b 100644
--- a/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb
+++ b/yocto-poky/meta/recipes-extended/zip/zip_3.0.bb
@@ -8,6 +8,9 @@
 SRC_URI[md5sum] = "7b74551e63f8ee6aab6fbc86676c0d37"
 SRC_URI[sha256sum] = "f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369"
 
+# exclude version 2.3.2 which triggers a false positive
+UPSTREAM_CHECK_REGEX = "^zip(?P<pver>(?!232).+)\.tgz"
+
 # zip.inc sets CFLAGS, but what Makefile actually uses is
 # CFLAGS_NOOPT.  It will also force -O3 optimization, overriding
 # whatever we set.
diff --git a/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.16.3.bb b/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.16.3.bb
deleted file mode 100644
index c3745c0..0000000
--- a/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.16.3.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "WebKit based web browser for GNOME"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes ca-certificates avahi libnotify gcr libwnck3 \
-	   gsettings-desktop-schemas gnome-desktop3"
-
-inherit gnomebase gsettings distro_features_check
-# libwnck3 is x11 only
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI += "file://0001-yelp.m4-drop-the-check-for-itstool.patch"
-SRC_URI[archive.md5sum] = "3296af4532b8019775f4b40d21a341ae"
-SRC_URI[archive.sha256sum] = "d527f1770779ec22d955aeb13b148a846a26144e433ff0480c981af80e2390b1"
-
-EXTRA_OECONF += " --disable-nss --with-distributor-name=${DISTRO}"
-
-do_configure_prepend() {
-    touch ${S}/gnome-doc-utils.make
-    sed -i -e s:help::g ${S}/Makefile.am
-}
-
-FILES_${PN} += "${datadir}/appdata ${datadir}/dbus-1 ${datadir}/gnome-shell/search-providers"
-FILES_${PN}-dbg += "${libdir}/epiphany/*/web-extensions/.debug/libephywebextension.so"
-RDEPENDS_${PN} = "iso-codes adwaita-icon-theme"
-RRECOMMENDS_${PN} = "ca-certificates"
-
diff --git a/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.18.4.bb b/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.18.4.bb
new file mode 100644
index 0000000..869569c
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/epiphany/epiphany_3.18.4.bb
@@ -0,0 +1,26 @@
+SUMMARY = "WebKit based web browser for GNOME"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+DEPENDS = "libsoup-2.4 webkitgtk gtk+3 iso-codes ca-certificates avahi libnotify gcr libwnck3 \
+	   gsettings-desktop-schemas gnome-desktop3 libxml2-native intltool-native"
+
+inherit gnomebase gsettings distro_features_check upstream-version-is-even
+# libwnck3 is x11 only
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI += "file://0001-yelp.m4-drop-the-check-for-itstool.patch"
+SRC_URI[archive.md5sum] = "172b78256100e8d3c629764abd0e1495"
+SRC_URI[archive.sha256sum] = "be699d484371111abae754e669187215df73e21533f461e513b79537d7a1c1c1"
+
+EXTRA_OECONF += " --disable-nss --with-distributor-name=${DISTRO}"
+
+do_configure_prepend() {
+    touch ${S}/gnome-doc-utils.make
+    sed -i -e s:help::g ${S}/Makefile.am
+}
+
+FILES_${PN} += "${datadir}/appdata ${datadir}/dbus-1 ${datadir}/gnome-shell/search-providers"
+RDEPENDS_${PN} = "iso-codes adwaita-icon-theme"
+RRECOMMENDS_${PN} = "ca-certificates"
+
diff --git a/yocto-poky/meta/recipes-gnome/gcr/gcr_3.16.0.bb b/yocto-poky/meta/recipes-gnome/gcr/gcr_3.16.0.bb
deleted file mode 100644
index e50b3a8..0000000
--- a/yocto-poky/meta/recipes-gnome/gcr/gcr_3.16.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "A library for bits of crypto UI and parsing etc"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
-
-DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt vala"
-
-inherit autotools gnomebase gtk-icon-cache gtk-doc distro_features_check
-# depends on gtk+3, but also x11 through gtk+-x11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-SRC_URI[archive.md5sum] = "d5835680be0b6a838e02a528d5378d9c"
-SRC_URI[archive.sha256sum] = "ecfe8df41cc88158364bb15addc670b11e539fe844742983629ba2323888d075"
-
-FILES_${PN} += " \
-    ${datadir}/dbus-1 \
-    ${datadir}/gcr-3 \
-"
-
-# http://errors.yoctoproject.org/Errors/Details/20229/
-ARM_INSTRUCTION_SET = "arm"
diff --git a/yocto-poky/meta/recipes-gnome/gcr/gcr_3.18.0.bb b/yocto-poky/meta/recipes-gnome/gcr/gcr_3.18.0.bb
new file mode 100644
index 0000000..32523a6
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gcr/gcr_3.18.0.bb
@@ -0,0 +1,41 @@
+SUMMARY = "A library for bits of crypto UI and parsing etc"
+HOMEPAGE = "http://www.gnome.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
+
+DEPENDS = "gtk+3 p11-kit glib-2.0 libgcrypt"
+
+inherit autotools gnomebase gtk-icon-cache gtk-doc distro_features_check upstream-version-is-even vala gobject-introspection
+# depends on gtk+3, but also x11 through gtk+-x11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+SRC_URI[archive.md5sum] = "b959bac99e17c9bb0990a15c9be11aed"
+SRC_URI[archive.sha256sum] = "d4d16da5af55148a694055835ccd07ad34daf0ad03bdad929bf7cad15637ce00"
+
+FILES_${PN} += " \
+    ${datadir}/dbus-1 \
+    ${datadir}/gcr-3 \
+"
+
+# http://errors.yoctoproject.org/Errors/Details/20229/
+ARM_INSTRUCTION_SET = "arm"
+
+# on x86-64 the introspection binary goes into 
+# an infinite loop under qemu during compilation, 
+# printing the following:
+# 
+# gcrypt-Message: select() error: Bad address
+#
+# gcrypt-Message: select() error: Bad address
+#
+# gcrypt-Message: select() error: Bad address
+#
+# This will be investigated later.
+EXTRA_OECONF_append_x86-64 = " --disable-introspection"
+
+# Gcr-3.broken: poky/build-mips64/tmp/work/mips64-poky-linux/libgpg-error/1.19-r0/libgpg-error-1.19/src/posix-lock.c:119: get_lock_object: Assertion `!"sizeof lock obj"' failed.
+# qemu: uncaught target signal 6 (Aborted) - core dumped
+EXTRA_OECONF_append_mips64 = " --disable-introspection"
+
diff --git a/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-pixops-Be-more-careful-about-integer-overflow.patch b/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-pixops-Be-more-careful-about-integer-overflow.patch
deleted file mode 100644
index fe7c1d5..0000000
--- a/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/0001-pixops-Be-more-careful-about-integer-overflow.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From ffec86ed5010c5a2be14f47b33bcf4ed3169a199 Mon Sep 17 00:00:00 2001
-From: Matthias Clasen <mclasen@redhat.com>
-Date: Mon, 13 Jul 2015 00:33:40 -0400
-Subject: [PATCH] pixops: Be more careful about integer overflow
-
-Our loader code is supposed to handle out-of-memory and overflow
-situations gracefully, reporting errors instead of aborting. But
-if you load an image at a specific size, we also execute our
-scaling code, which was not careful enough about overflow in some
-places.
-
-This commit makes the scaling code silently return if it fails to
-allocate filter tables. This is the best we can do, since
-gdk_pixbuf_scale() is not taking a GError.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=752297
-
-Upstream-Status: backport
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- gdk-pixbuf/pixops/pixops.c |   22 +++++++++++++++++-----
- 1 file changed, 17 insertions(+), 5 deletions(-)
-
-diff --git a/gdk-pixbuf/pixops/pixops.c b/gdk-pixbuf/pixops/pixops.c
-index 29a1c14..ce51745 100644
---- a/gdk-pixbuf/pixops/pixops.c
-+++ b/gdk-pixbuf/pixops/pixops.c
-@@ -1272,7 +1272,16 @@ make_filter_table (PixopsFilter *filter)
-   int i_offset, j_offset;
-   int n_x = filter->x.n;
-   int n_y = filter->y.n;
--  int *weights = g_new (int, SUBSAMPLE * SUBSAMPLE * n_x * n_y);
-+  gsize n_weights;
-+  int *weights;
-+
-+  n_weights = SUBSAMPLE * SUBSAMPLE * n_x * n_y;
-+  if (n_weights / (SUBSAMPLE * SUBSAMPLE * n_x) != n_y)
-+    return NULL; /* overflow, bail */
-+
-+  weights = g_try_new (int, n_weights);
-+  if (!weights)
-+    return NULL; /* overflow, bail */
- 
-   for (i_offset=0; i_offset < SUBSAMPLE; i_offset++)
-     for (j_offset=0; j_offset < SUBSAMPLE; j_offset++)
-@@ -1347,8 +1356,11 @@ pixops_process (guchar         *dest_buf,
-   if (x_step == 0 || y_step == 0)
-     return; /* overflow, bail out */
- 
--  line_bufs = g_new (guchar *, filter->y.n);
-   filter_weights = make_filter_table (filter);
-+  if (!filter_weights)
-+    return; /* overflow, bail out */
-+
-+  line_bufs = g_new (guchar *, filter->y.n);
- 
-   check_shift = check_size ? get_check_shift (check_size) : 0;
- 
-@@ -1468,7 +1480,7 @@ tile_make_weights (PixopsFilterDimension *dim,
- 		   double                 scale)
- {
-   int n = ceil (1 / scale + 1);
--  double *pixel_weights = g_new (double, SUBSAMPLE * n);
-+  double *pixel_weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n);
-   int offset;
-   int i;
- 
-@@ -1526,7 +1538,7 @@ bilinear_magnify_make_weights (PixopsFilterDimension *dim,
-     }
- 
-   dim->n = n;
--  dim->weights = g_new (double, SUBSAMPLE * n);
-+  dim->weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n);
- 
-   pixel_weights = dim->weights;
- 
-@@ -1617,7 +1629,7 @@ bilinear_box_make_weights (PixopsFilterDimension *dim,
- 			   double                 scale)
- {
-   int n = ceil (1/scale + 3.0);
--  double *pixel_weights = g_new (double, SUBSAMPLE * n);
-+  double *pixel_weights = g_malloc_n (sizeof (double) * SUBSAMPLE, n);
-   double w;
-   int offset, i;
- 
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2015-7674.patch b/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2015-7674.patch
deleted file mode 100644
index d516e88..0000000
--- a/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf/CVE-2015-7674.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From e9a5704edaa9aee9498f1fbf6e1b70fcce2e55aa Mon Sep 17 00:00:00 2001
-From: Benjamin Otte <otte@redhat.com>
-Date: Tue, 22 Sep 2015 22:44:51 +0200
-Subject: [PATCH] pixops: Don't overflow variables when shifting them
-
-If we shift by 16 bits we need to be sure those 16 bits actually exist.
-They do now.
-
-Upstream-status: Backport
-https://git.gnome.org/browse/gdk-pixbuf/commit/?id=e9a5704edaa9aee9498f1fbf6e1b70fcce2e55aa
-
-CVE:  CVE-2015-7674
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- gdk-pixbuf/pixops/pixops.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-Index: gdk-pixbuf-2.30.8/gdk-pixbuf/pixops/pixops.c
-===================================================================
---- gdk-pixbuf-2.30.8.orig/gdk-pixbuf/pixops/pixops.c
-+++ gdk-pixbuf-2.30.8/gdk-pixbuf/pixops/pixops.c
-@@ -264,11 +264,11 @@ pixops_scale_nearest (guchar        *des
- 		      double         scale_x,
- 		      double         scale_y)
- {
--  int i;
--  int x;
--  int x_step = (1 << SCALE_SHIFT) / scale_x;
--  int y_step = (1 << SCALE_SHIFT) / scale_y;
--  int xmax, xstart, xstop, x_pos, y_pos;
-+  gint64 i;
-+  gint64 x;
-+  gint64 x_step = (1 << SCALE_SHIFT) / scale_x;
-+  gint64 y_step = (1 << SCALE_SHIFT) / scale_y;
-+  gint64 xmax, xstart, xstop, x_pos, y_pos;
-   const guchar *p;
- 
- #define INNER_LOOP(SRC_CHANNELS,DEST_CHANNELS,ASSIGN_PIXEL)     \
diff --git a/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb b/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
deleted file mode 100644
index dcd01b1..0000000
--- a/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.30.8.bb
+++ /dev/null
@@ -1,113 +0,0 @@
-SUMMARY = "Image loading library for GTK+"
-HOMEPAGE = "http://www.gtk.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b"
-
-SECTION = "libs"
-
-DEPENDS = "glib-2.0"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
-           file://hardcoded_libtool.patch \
-           file://extending-libinstall-dependencies.patch \
-           file://run-ptest \
-           file://fatal-loader.patch \
-           file://0001-pixops-Be-more-careful-about-integer-overflow.patch \
-           file://CVE-2015-7674.patch \
-           "
-
-SRC_URI[md5sum] = "4fed0d54432f1b69fc6e66e608bd5542"
-SRC_URI[sha256sum] = "4853830616113db4435837992c0aebd94cbb993c44dc55063cee7f72a7bef8be"
-
-inherit autotools pkgconfig gettext pixbufcache ptest-gnome
-
-LIBV = "2.10.0"
-
-GDK_PIXBUF_LOADERS ?= "png jpeg"
-
-PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
-PACKAGECONFIG_linuxstdbase = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${GDK_PIXBUF_LOADERS}"
-PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
-
-PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
-PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
-PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
-PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
-
-# Use GIO to sniff image format instead of trying all loaders
-PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info"
-PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
-
-EXTRA_OECONF = "--disable-introspection"
-
-PACKAGES =+ "${PN}-xlib"
-
-FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
-ALLOW_EMPTY_${PN}-xlib = "1"
-
-FILES_${PN} = "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
-	${libdir}/lib*.so.*"
-
-FILES_${PN}-dev += " \
-	${bindir}/gdk-pixbuf-csource \
-	${bindir}/gdk-pixbuf-pixdata \
-	${includedir}/* \
-	${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
-"
-
-FILES_${PN}-dbg += " \
-	${libdir}/.debug/* \
-	${libdir}/gdk-pixbuf-2.0/.debug/* \
-	${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/.debug/* \
-"
-
-PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
-PACKAGES_DYNAMIC_class-native = ""
-
-python populate_packages_prepend () {
-    postinst_pixbufloader = d.getVar("postinst_pixbufloader", True)
-
-    loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
-
-    packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
-    d.setVar('PIXBUF_PACKAGES', packages)
-
-    # The test suite exercises all the loaders, so ensure they are all
-    # dependencies of the ptest package.
-    d.appendVar("RDEPENDS_gdk-pixbuf-ptest", " " + packages)
-}
-
-do_install_append() {
-	# Move gdk-pixbuf-query-loaders into libdir so it is always available
-	# in multilib builds.
-	mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
-}
-
-do_install_append_class-native() {
-	find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
-
-	create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
-	create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
-
-	create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
-		GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
-}
-BBCLASSEXTEND = "native"
-
-SSTATEPREINSTFUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
-SYSROOT_PREPROCESS_FUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
-
-gdkpixbuf_sstate_preinst() {
-	if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then
-		rm -rf ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/*
-	fi
-}
diff --git a/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.3.bb b/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.3.bb
new file mode 100644
index 0000000..ba94eec
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gdk-pixbuf/gdk-pixbuf_2.32.3.bb
@@ -0,0 +1,102 @@
+SUMMARY = "Image loading library for GTK+"
+HOMEPAGE = "http://www.gtk.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+                    file://gdk-pixbuf/gdk-pixbuf.h;endline=26;md5=72b39da7cbdde2e665329fef618e1d6b"
+
+SECTION = "libs"
+
+DEPENDS = "glib-2.0"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+           file://hardcoded_libtool.patch \
+           file://extending-libinstall-dependencies.patch \
+           file://run-ptest \
+           file://fatal-loader.patch \
+           "
+
+SRC_URI[md5sum] = "9275076639baa24a342f3e02c402920e"
+SRC_URI[sha256sum] = "2b6771f1ac72f687a8971e59810b8dc658e65e7d3086bd2e676e618fd541d031"
+
+inherit autotools pkgconfig gettext pixbufcache ptest-gnome upstream-version-is-even gobject-introspection
+
+LIBV = "2.10.0"
+
+GDK_PIXBUF_LOADERS ?= "png jpeg"
+
+PACKAGECONFIG ??= "${GDK_PIXBUF_LOADERS}"
+PACKAGECONFIG_linuxstdbase = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${GDK_PIXBUF_LOADERS}"
+PACKAGECONFIG_class-native = "${GDK_PIXBUF_LOADERS}"
+
+PACKAGECONFIG[png] = "--with-libpng,--without-libpng,libpng"
+PACKAGECONFIG[jpeg] = "--with-libjpeg,--without-libjpeg,jpeg"
+PACKAGECONFIG[tiff] = "--with-libtiff,--without-libtiff,tiff"
+PACKAGECONFIG[jpeg2000] = "--with-libjasper,--without-libjasper,jasper"
+
+# Use GIO to sniff image format instead of trying all loaders
+PACKAGECONFIG[gio-sniff] = "--enable-gio-sniffing,--disable-gio-sniffing,,shared-mime-info"
+PACKAGECONFIG[x11] = "--with-x11,--without-x11,virtual/libx11"
+
+PACKAGES =+ "${PN}-xlib"
+
+FILES_${PN}-xlib = "${libdir}/*pixbuf_xlib*${SOLIBS}"
+ALLOW_EMPTY_${PN}-xlib = "1"
+
+FILES_${PN} += "${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
+
+FILES_${PN}-dev += " \
+	${bindir}/gdk-pixbuf-csource \
+	${bindir}/gdk-pixbuf-pixdata \
+	${includedir}/* \
+	${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders/*.la \
+"
+
+PACKAGES_DYNAMIC += "^gdk-pixbuf-loader-.*"
+PACKAGES_DYNAMIC_class-native = ""
+
+python populate_packages_prepend () {
+    postinst_pixbufloader = d.getVar("postinst_pixbufloader", True)
+
+    loaders_root = d.expand('${libdir}/gdk-pixbuf-2.0/${LIBV}/loaders')
+
+    packages = ' '.join(do_split_packages(d, loaders_root, '^libpixbufloader-(.*)\.so$', 'gdk-pixbuf-loader-%s', 'GDK pixbuf loader for %s'))
+    d.setVar('PIXBUF_PACKAGES', packages)
+
+    # The test suite exercises all the loaders, so ensure they are all
+    # dependencies of the ptest package.
+    d.appendVar("RDEPENDS_gdk-pixbuf-ptest", " " + packages)
+}
+
+do_install_append() {
+	# Move gdk-pixbuf-query-loaders into libdir so it is always available
+	# in multilib builds.
+	mv ${D}/${bindir}/gdk-pixbuf-query-loaders ${D}/${libdir}/gdk-pixbuf-2.0/
+}
+
+do_install_append_class-native() {
+	find ${D}${libdir} -name "libpixbufloader-*.la" -exec rm \{\} \;
+
+	create_wrapper ${D}/${bindir}/gdk-pixbuf-csource \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+	create_wrapper ${D}/${bindir}/gdk-pixbuf-pixdata \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache
+
+	create_wrapper ${D}/${libdir}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders.cache \
+		GDK_PIXBUF_MODULEDIR=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/loaders
+}
+BBCLASSEXTEND = "native"
+
+SSTATEPREINSTFUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
+SYSROOT_PREPROCESS_FUNCS_append_class-native = " gdkpixbuf_sstate_preinst"
+
+gdkpixbuf_sstate_preinst() {
+	if [ "${BB_CURRENTTASK}" = "populate_sysroot" ]; then
+		rm -rf ${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/${LIBV}/*
+	fi
+}
diff --git a/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.16.2.bb b/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.16.2.bb
deleted file mode 100644
index 3765697..0000000
--- a/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.16.2.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "GNOME library for reading .desktop files"
-SECTION = "x11/gnome"
-LICENSE = "GPLv2 & LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-BPN = "gnome-desktop"
-
-inherit gnome pkgconfig
-SRC_URI[archive.md5sum] = "ab5bf4cc94ad63639f42adcc1542b1f0"
-SRC_URI[archive.sha256sum] = "3a8f196b46eb9dbd3ba2afb8fb5fef6a8825539d449a02181311242e22227bd0"
-
-DEPENDS += "gsettings-desktop-schemas gconf libxrandr virtual/libx11 gtk+3 glib-2.0 gnome-doc-utils gnome-common startup-notification xkeyboard-config iso-codes"
-
-inherit distro_features_check
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-desktop-docs"
-
-PACKAGES =+ "libgnome-desktop3"
-FILES_libgnome-desktop3 = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop*/pnp.ids ${datadir}/gnome/*xml"
-
-RRECOMMENDS_libgnome-desktop3 += "gsettings-desktop-schemas"
-
diff --git a/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.18.2.bb b/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.18.2.bb
new file mode 100644
index 0000000..ee460d9
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.18.2.bb
@@ -0,0 +1,24 @@
+SUMMARY = "GNOME library for reading .desktop files"
+SECTION = "x11/gnome"
+LICENSE = "GPLv2 & LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.LIB;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+BPN = "gnome-desktop"
+
+inherit gnome pkgconfig upstream-version-is-even gobject-introspection
+SRC_URI[archive.md5sum] = "9a5875247abdb99bad93f1c4230d1d6d"
+SRC_URI[archive.sha256sum] = "ddd46d022de137543a71f50c7392b32f9b98d5d3f2b53040b35f5802de2e7b56"
+
+DEPENDS += "gsettings-desktop-schemas gconf libxrandr virtual/libx11 gtk+3 glib-2.0 gnome-doc-utils gnome-common startup-notification xkeyboard-config iso-codes"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = "--disable-desktop-docs"
+
+PACKAGES =+ "libgnome-desktop3"
+FILES_libgnome-desktop3 = "${libdir}/lib*${SOLIBS} ${datadir}/libgnome-desktop*/pnp.ids ${datadir}/gnome/*xml"
+
+RRECOMMENDS_libgnome-desktop3 += "gsettings-desktop-schemas"
+
diff --git a/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/Create-symlinks-when-installing-cursors.patch b/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/Create-symlinks-when-installing-cursors.patch
deleted file mode 100644
index 446f9c9..0000000
--- a/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme/Create-symlinks-when-installing-cursors.patch
+++ /dev/null
@@ -1,178 +0,0 @@
-Create symlinks when installing cursors
-
-This cuts down the installed size by ~11MB.
-
-Upstream-Status: Backport
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-
-From 1e8c0dd0a2de5e1d5ff60ff11f131e88510c7f50 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?=
- =?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
-Date: Sat, 16 May 2015 07:49:19 +0000
-Subject: [PATCH] Create symlinks when installing cursors
-
-Also support creating symlinks for W32 cursors (including L and XL variants).
-
-https://bugzilla.gnome.org/show_bug.cgi?id=749223
----
- Makefile.am  | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- configure.ac | 24 ++++++++++++++++
- 2 files changed, 117 insertions(+)
-
-diff --git a/Makefile.am b/Makefile.am
-index fed3972..4d00268 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -6,6 +6,17 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
- 
- cursordir = $(datadir)/icons/Adwaita/cursors
- cursor_DATA = $(wildcard $(srcdir)/Adwaita/cursors/*)
-+if ENABLE_L_XL_VARIANTS
-+cursorldir = $(datadir)/icons/Adwaita-Large/cursors
-+cursorl_DATA = $(wildcard $(srcdir)/Adwaita-Large/cursors/*)
-+cursorxldir = $(datadir)/icons/Adwaita-ExtraLarge/cursors
-+cursorxl_DATA = $(wildcard $(srcdir)/Adwaita-ExtraLarge/cursors/*)
-+else
-+cursorldir =
-+cursorl_DATA =
-+cursorxldir =
-+cursorxl_DATA =
-+endif
- 
- theme_in_files = index.theme.in.in
- theme_DATA = $(theme_in_files:.theme.in.in=.theme)
-@@ -99,6 +110,88 @@ install-data-local:
- 	fi
- 
- install-data-hook:
-+	cd $(DESTDIR)$(cursordir) && \
-+	if test "x$(enable_w32_cursors)" = "xyes"; \
-+	then \
-+		cur=.cur && \
-+		ani=.ani; \
-+	else \
-+		cur= && \
-+		ani= ; \
-+	fi; \
-+	if test "x$(enable_l_xl_variants)" = "xyes"; \
-+	then \
-+		themedirs="$(cursordir) $(cursorldir) $(cursorxldir)"; \
-+	else \
-+		themedirs="$(cursordir)"; \
-+	fi; \
-+	for d in $$themedirs; \
-+	do \
-+		cd $(DESTDIR)$$d && \
-+		echo Creating symlinks in $(DESTDIR)$$d && \
-+		$(LN_S) -f  dotbox$$cur			draped_box$$cur && \
-+		$(LN_S) -f  dotbox$$cur			icon$$cur && \
-+		$(LN_S) -f  dotbox$$cur			target$$cur && \
-+		$(LN_S) -f  dotbox$$cur			dot_box_mask$$cur && \
-+		$(LN_S) -f  X_cursor$$cur		pirate$$cur && \
-+		$(LN_S) -f  left_ptr_watch$$ani		08e8e1c95fe2fc01f976f1e063a24ccd$$ani && \
-+		$(LN_S) -f  left_ptr_watch$$ani		3ecb610c1bf2410f44200f48c40d3599$$ani && \
-+		$(LN_S) -f  left_ptr$$cur		arrow$$cur && \
-+		$(LN_S) -f  left_ptr$$cur		top_left_arrow$$cur && \
-+		$(LN_S) -f  right_ptr$$cur		draft_large$$cur && \
-+		$(LN_S) -f  right_ptr$$cur		draft_small$$cur && \
-+		$(LN_S) -f  move$$cur			4498f0e0c1937ffe01fd06f973665830$$cur && \
-+		$(LN_S) -f  move$$cur			9081237383d90e509aa00f00170e968f$$cur && \
-+		$(LN_S) -f  copy$$cur			1081e37283d90000800003c07f3ef6bf$$cur && \
-+		$(LN_S) -f  copy$$cur			6407b0e94181790501fd1e167b474872$$cur && \
-+		$(LN_S) -f  cross$$cur			cross_reverse$$cur && \
-+		$(LN_S) -f  cross$$cur			diamond_cross$$cur && \
-+		$(LN_S) -f  hand1$$cur			grab$$cur && \
-+		$(LN_S) -f  hand2$$cur			9d800788f1b08800ae810202380a0822$$cur && \
-+		$(LN_S) -f  hand2$$cur			e29285e634086352946a0e7090d73106$$cur && \
-+		$(LN_S) -f  hand2$$cur			hand$$cur && \
-+		$(LN_S) -f  grabbing$$cur		fleur$$cur && \
-+		$(LN_S) -f  question_arrow$$cur		d9ce0ab605698f320427677b458ad60b$$cur && \
-+		$(LN_S) -f  question_arrow$$cur		5c6cd98b3f3ebcb1f9c7f1c204630408$$cur && \
-+		$(LN_S) -f  question_arrow$$cur		help$$cur && \
-+		$(LN_S) -f  question_arrow$$cur		left_ptr_help$$cur && \
-+		$(LN_S) -f  link$$cur			3085a0e285430894940527032f8b26df$$cur && \
-+		$(LN_S) -f  link$$cur			640fb0e74195791501fd1ed57b41487f$$cur && \
-+		$(LN_S) -f  crossed_circle$$cur		03b6e0fcb3499374a867c041f52298f0$$cur && \
-+		$(LN_S) -f  fd_double_arrow$$cur	fcf1c3c7cd4491d801f1e1c78f100000$$cur && \
-+		$(LN_S) -f  bd_double_arrow$$cur	c7088f0f3e6c8088236ef8e1e3e70000$$cur && \
-+		$(LN_S) -f  sb_h_double_arrow$$cur 	h_double_arrow$$cur && \
-+		$(LN_S) -f  sb_h_double_arrow$$cur	14fef782d02440884392942c11205230$$cur && \
-+		$(LN_S) -f  h_double_arrow$$cur		028006030e0e7ebffc7f7070c0600140$$cur && \
-+		$(LN_S) -f  sb_v_double_arrow$$cur 	double_arrow$$cur && \
-+		$(LN_S) -f  sb_v_double_arrow$$cur 	v_double_arrow$$cur && \
-+		$(LN_S) -f  sb_v_double_arrow$$cur	2870a09082c103050810ffdffffe0204$$cur && \
-+		$(LN_S) -f  v_double_arrow$$cur		00008160000006810000408080010102$$cur && \
-+		$(LN_S) -f  left_ptr$$cur		default$$cur && \
-+		$(LN_S) -f  hand$$cur			pointer$$cur && \
-+		$(LN_S) -f  left_ptr_watch$$ani		progress$$ani && \
-+		$(LN_S) -f  watch$$ani			wait$$ani && \
-+		$(LN_S) -f  cross$$cur			crosshair$$cur && \
-+		$(LN_S) -f  xterm$$cur			text$$cur && \
-+		$(LN_S) -f  dnd-link$$cur		alias$$cur && \
-+		$(LN_S) -f  dnd-copy$$cur		copy$$cur && \
-+		$(LN_S) -f  dnd-none$$cur		no-drop$$cur && \
-+		$(LN_S) -f  crossed_circle$$cur		not-allowed$$cur && \
-+		$(LN_S) -f  sb_h_double_arrow$$cur	col-resize$$cur && \
-+		$(LN_S) -f  sb_v_double_arrow$$cur	row-resize$$cur && \
-+		$(LN_S) -f  top_side$$cur		n-resize$$cur && \
-+		$(LN_S) -f  right_side$$cur		e-resize$$cur && \
-+		$(LN_S) -f  bottom_side$$cur		s-resize$$cur && \
-+		$(LN_S) -f  left_side$$cur		w-resize$$cur && \
-+		$(LN_S) -f  top_right_corner$$cur	ne-resize$$cur && \
-+		$(LN_S) -f  top_left_corner$$cur	nw-resize$$cur && \
-+		$(LN_S) -f  bottom_right_corner$$cur	se-resize$$cur && \
-+		$(LN_S) -f  bottom_left_corner$$cur	sw-resize$$cur && \
-+		$(LN_S) -f  sb_h_double_arrow$$cur	ew-resize$$cur && \
-+		$(LN_S) -f  sb_v_double_arrow$$cur	ns-resize$$cur && \
-+		$(LN_S) -f  fd_double_arrow$$cur	nesw-resize$$cur && \
-+		$(LN_S) -f  bd_double_arrow$$cur	nwse-resize$$cur; \
-+	done
- 	if test -z "$(DESTDIR)" && test -n "$(GTK_UPDATE_ICON_CACHE)" ; then \
- 		$(GTK_UPDATE_ICON_CACHE) -q $(DESTDIR)$(themedir); \
- 	fi
-diff --git a/configure.ac b/configure.ac
-index 9e4d8a0..312b24c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -31,6 +31,7 @@ AC_SUBST([render_sizes], ["8x8 16x16 22x22 24x24 32x32 48x48 256x256"])
- AC_SUBST([symbolic_render_sizes], [""])
- AC_SUBST([install_sizes], ["8x8 16x16 22x22 24x24 32x32 48x48 64x64 96x96 256x256"])
- 
-+AC_PROG_LN_S
- AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache)
- 
- # need git, icontool, and inkscape for rendering
-@@ -56,6 +57,29 @@ if test "x$GTK_ENCODE_SYMBOLIC_SVG" = "xfalse"; then
- fi
- AC_SUBST(symbolic_encode_sizes)
- 
-+AC_ARG_ENABLE([w32-cursors],
-+  [AS_HELP_STRING([--enable-w32-cursors],
-+    [Make and install Windows cursors (.cur and .ani) instead of X cursors])],
-+  [case "${enableval}" in
-+    yes) enable_w32_cursors=yes ;;
-+    no)  enable_w32_cursors=no ;;
-+    *) AC_MSG_ERROR([bad value ${enableval} for --enable-w32-cursors]) ;;
-+   esac],
-+  [enable_w32_cursors=no])
-+AC_SUBST(enable_w32_cursors)
-+
-+AC_ARG_ENABLE([l-xl-variants],
-+  [AS_HELP_STRING([--enable-l-xl-variants],
-+    [Also make and install Large and Extra Large Windows cursor versions])],
-+  [case "${enableval}" in
-+    yes) enable_l_xl_variants=yes ;;
-+    no)  enable_l_xl_variants=no ;;
-+    *) AC_MSG_ERROR([bad value ${enableval} for --enable-l-xl-variants]) ;;
-+   esac],
-+  [enable_l_xl_variants=no])
-+AC_SUBST(enable_l_xl_variants)
-+AM_CONDITIONAL([ENABLE_L_XL_VARIANTS], [test x$enable_l_xl_variants = xyes])
-+
- AC_CONFIG_FILES([
- Makefile
- adwaita-icon-theme.pc
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.16.2.1.bb b/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.16.2.1.bb
deleted file mode 100644
index 0d7fa0c..0000000
--- a/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.16.2.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "GTK+ icon theme"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/gnome"
-
-LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
-LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c"
-
-inherit allarch autotools pkgconfig gettext gtk-icon-cache
-
-DEPENDS += "intltool-native"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
-           file://Create-symlinks-when-installing-cursors.patch \
-          "
-
-SRC_URI[md5sum] = "9ef86952c947aa27a1a888b7735d60b3"
-SRC_URI[sha256sum] = "b4556dfbf555d4fac12d4d5c12f7519de0d43ec42a1b649611439a50bf7acb96"
-
-do_install_append() {
-	# Build uses gtk-encode-symbolic-svg to create png versions:
-        # no need to store the svgs anymore.
-	rm -f ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic.svg \
-	      ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic-rtl.svg
-}
-
-PACKAGES = "${PN}-cursors ${PN}-symbolic ${PN}-hires ${PN}"
-
-RREPLACES_${PN} = "gnome-icon-theme"
-RCONFLICTS_${PN} = "gnome-icon-theme"
-RPROVIDES_${PN} = "gnome-icon-theme"
-
-FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
-FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/*/*/*.symbolic.png"
-FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/"
-FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
-               ${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
diff --git a/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.18.0.bb b/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.18.0.bb
new file mode 100644
index 0000000..81c8845
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gnome/adwaita-icon-theme_3.18.0.bb
@@ -0,0 +1,37 @@
+SUMMARY = "GTK+ icon theme"
+HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/adwaita-icon-theme/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome"
+
+LICENSE = "LGPL-3.0 | CC-BY-SA-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c"
+
+inherit allarch autotools pkgconfig gettext gtk-icon-cache upstream-version-is-even
+
+DEPENDS += "intltool-native"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+          "
+
+SRC_URI[md5sum] = "ec1fa3fde83ad166ae7075a97dc1ec4b"
+SRC_URI[sha256sum] = "5e9ce726001fdd8ee93c394fdc3cdb9e1603bbed5b7c62df453ccf521ec50e58"
+
+do_install_append() {
+	# Build uses gtk-encode-symbolic-svg to create png versions:
+        # no need to store the svgs anymore.
+	rm -f ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic.svg \
+	      ${D}${prefix}/share/icons/Adwaita/scalable/*/*-symbolic-rtl.svg
+}
+
+PACKAGES = "${PN}-cursors ${PN}-symbolic ${PN}-hires ${PN}"
+
+RREPLACES_${PN} = "gnome-icon-theme"
+RCONFLICTS_${PN} = "gnome-icon-theme"
+RPROVIDES_${PN} = "gnome-icon-theme"
+
+FILES_${PN}-cursors = "${prefix}/share/icons/Adwaita/cursors/"
+FILES_${PN}-symbolic = "${prefix}/share/icons/Adwaita/*/*/*.symbolic.png"
+FILES_${PN}-hires = "${prefix}/share/icons/Adwaita/256x256/"
+FILES_${PN} = "${prefix}/share/icons/Adwaita/ \
+               ${prefix}/share/pkgconfig/adwaita-icon-theme.pc"
diff --git a/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb b/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
index 17fdafa..9e9f714 100644
--- a/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
+++ b/yocto-poky/meta/recipes-gnome/gnome/gconf_3.2.6.bb
@@ -3,11 +3,9 @@
 LICENSE = "LGPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
 
-DEPENDS = "glib-2.0 dbus dbus-glib libxml2 intltool-native gobject-introspection-stub"
-DEPENDS_class-native = "glib-2.0-native dbus-native dbus-glib-native libxml2-native intltool-native gnome-common-native gobject-introspection-stub-native"
+DEPENDS = "glib-2.0 dbus dbus-glib libxml2 intltool-native"
 
-
-inherit gnomebase gtk-doc gettext
+inherit gnomebase gtk-doc gettext gobject-introspection gio-module-cache
 
 SRC_URI = "${GNOME_MIRROR}/GConf/${@gnome_verdir("${PV}")}/GConf-${PV}.tar.xz;name=archive \
            file://remove_plus_from_invalid_characters_list.patch \
@@ -19,8 +17,8 @@
 
 S = "${WORKDIR}/GConf-${PV}"
 
-EXTRA_OECONF = "--enable-shared --disable-static --enable-debug=yes \
-                --disable-introspection --disable-orbit --with-openldap=no --disable-gtk"
+EXTRA_OECONF = "--enable-shared --disable-static \
+                --disable-orbit --with-openldap=no --disable-gtk"
 
 # Disable PolicyKit by default
 PACKAGECONFIG ??= ""
@@ -29,6 +27,7 @@
 PACKAGECONFIG_libc-uclibc = ""
 
 PACKAGECONFIG[policykit] = "--enable-defaults-service,--disable-defaults-service,polkit"
+PACKAGECONFIG[debug] = "--enable-debug=yes, --enable-debug=minimum"
 
 do_install_append() {
 	# this directory need to be created to avoid an Error 256 at gdm launch
@@ -44,17 +43,12 @@
 		GCONF_BACKEND_DIR=${STAGING_LIBDIR_NATIVE}/GConf/2
 }
 
-# disable dbus-x11 when x11 isn't in DISTRO_FEATURES
-RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'dbus-x11', '', d)}"
-RDEPENDS_${PN}_class-native = ""
-
 FILES_${PN} += "${libdir}/GConf/* \
                 ${libdir}/gio/*/*.so \
                 ${datadir}/polkit* \
                 ${datadir}/dbus-1/services/*.service \
                 ${datadir}/dbus-1/system-services/*.service \
                "
-FILES_${PN}-dbg += "${libdir}/*/*/.debug"
 FILES_${PN}-dev += "${datadir}/sgml/gconf/gconf-1.0.dtd"
 
 BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-gnome/gnome/gnome-common_3.14.0.bb b/yocto-poky/meta/recipes-gnome/gnome/gnome-common_3.14.0.bb
deleted file mode 100644
index 80b7033..0000000
--- a/yocto-poky/meta/recipes-gnome/gnome/gnome-common_3.14.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Common macros for building GNOME applications"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-SECTION = "x11/gnome"
-inherit gnomebase allarch
-
-SRC_URI[archive.md5sum] = "ba58c61d0d81b7c3ff8452c620513a9d"
-SRC_URI[archive.sha256sum] = "4c00242f781bb441289f49dd80ed1d895d84de0c94bfc2c6818a104c9e39262c"
-
-EXTRA_AUTORECONF = ""
-DEPENDS = ""
-
-FILES_${PN} += "${datadir}/aclocal"
-FILES_${PN}-dev = ""
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-gnome/gnome/gnome-common_3.18.0.bb b/yocto-poky/meta/recipes-gnome/gnome/gnome-common_3.18.0.bb
new file mode 100644
index 0000000..06f3bb3
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gnome/gnome-common_3.18.0.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Common macros for building GNOME applications"
+HOMEPAGE = "http://www.gnome.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SECTION = "x11/gnome"
+inherit gnomebase allarch
+
+SRC_URI[archive.md5sum] = "933258d9c23e218eb6eec9cc1951b053"
+SRC_URI[archive.sha256sum] = "22569e370ae755e04527b76328befc4c73b62bfd4a572499fde116b8318af8cf"
+
+EXTRA_AUTORECONF = ""
+DEPENDS = ""
+
+FILES_${PN} += "${datadir}/aclocal"
+FILES_${PN}-dev = ""
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-gnome/gnome/gnome-mime-data/pkgconfig.patch b/yocto-poky/meta/recipes-gnome/gnome/gnome-mime-data/pkgconfig.patch
deleted file mode 100644
index 0903425..0000000
--- a/yocto-poky/meta/recipes-gnome/gnome/gnome-mime-data/pkgconfig.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: gnome-mime-data-2.18.0/Makefile.am
-===================================================================
---- gnome-mime-data-2.18.0.orig/Makefile.am	2009-06-11 17:27:48.000000000 +0100
-+++ gnome-mime-data-2.18.0/Makefile.am	2009-06-11 17:27:59.000000000 +0100
-@@ -1,6 +1,6 @@
- SUBDIRS = man po
- 
--pkgconfigdir = $(datadir)/pkgconfig
-+pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = gnome-mime-data-2.0.pc
- 
- NULL=
diff --git a/yocto-poky/meta/recipes-gnome/gnome/gnome-mime-data_2.18.0.bb b/yocto-poky/meta/recipes-gnome/gnome/gnome-mime-data_2.18.0.bb
deleted file mode 100644
index a31eb55..0000000
--- a/yocto-poky/meta/recipes-gnome/gnome/gnome-mime-data_2.18.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Base MIME and Application database for GNOME"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-                    file://check-mime.pl;endline=26;md5=a95b63c92c33d4ca1af61a315888f450"
-
-inherit gnomebase mime
-PR = "r4"
-
-SRC_URI += "file://pkgconfig.patch"
-
-SRC_URI[archive.md5sum] = "541858188f80090d12a33b5a7c34d42c"
-SRC_URI[archive.sha256sum] = "37196b5b37085bbcd45c338c36e26898fe35dd5975295f69f48028b1e8436fd7"
-GNOME_COMPRESS_TYPE="bz2"
-
-DEPENDS += "shared-mime-info intltool-native"
-RDEPENDS_${PN} = "shared-mime-info"
diff --git a/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch b/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
new file mode 100644
index 0000000..5026d81
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch
@@ -0,0 +1,97 @@
+From a57604e205e6535acd9989444ad1f5f5038f4fba Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 8 Oct 2015 18:30:35 +0300
+Subject: [PATCH 1/4] Prefix pkg-config paths with PKG_CONFIG_SYSROOT_DIR
+ environment variable
+
+This environment variable sets the location of sysroot directory in cross-compilation
+environments; if the variable is not set, the prefix will be empty.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ Makefile-gir.am     | 18 +++++++++---------
+ m4/introspection.m4 |  8 ++++----
+ 2 files changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/Makefile-gir.am b/Makefile-gir.am
+index 9aca664..09b9360 100644
+--- a/Makefile-gir.am
++++ b/Makefile-gir.am
+@@ -55,8 +55,8 @@ else
+ endif
+ 
+ # glib
+-GLIB_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir glib-2.0)/glib-2.0
+-GLIB_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir glib-2.0)
++GLIB_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir glib-2.0)/glib-2.0
++GLIB_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir glib-2.0)
+ 
+ GLIB_LIBRARY=glib-2.0
+ 
+@@ -92,8 +92,8 @@ GLib-2.0.gir: g-ir-scanner g-ir-compiler$(EXEEXT)
+ gir/DBusGLib-1.0.typelib: GObject-2.0.gir
+ 
+ # gobject
+-GOBJECT_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gobject-2.0)/glib-2.0
+-GOBJECT_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gobject-2.0)
++GOBJECT_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gobject-2.0)/glib-2.0
++GOBJECT_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gobject-2.0)
+ 
+ GOBJECT_LIBRARY=gobject-2.0
+ 
+@@ -120,8 +120,8 @@ GObject_2_0_gir_FILES = \
+ BUILT_GIRSOURCES += GObject-2.0.gir
+ 
+ # gmodule
+-GMODULE_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gmodule-2.0)/glib-2.0
+-GMODULE_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gmodule-2.0)
++GMODULE_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gmodule-2.0)/glib-2.0
++GMODULE_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gmodule-2.0)
+ 
+ GMODULE_LIBRARY=gmodule-2.0
+ 
+@@ -146,13 +146,13 @@ GModule_2_0_gir_FILES = $(GLIB_INCLUDEDIR)/gmodule.h \
+ BUILT_GIRSOURCES += GModule-2.0.gir
+ 
+ # gio
+-GIO_INCLUDEDIR=$(shell "${PKG_CONFIG}" --variable=includedir gio-2.0)/glib-2.0
+-GIO_LIBDIR=$(shell "${PKG_CONFIG}" --variable=libdir gio-2.0)
++GIO_INCLUDEDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gio-2.0)/glib-2.0
++GIO_LIBDIR=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=libdir gio-2.0)
+ 
+ GIO_LIBRARY=gio-2.0
+ 
+ if HAVE_GIO_UNIX
+-GIO_UNIX_HDRS=$(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
++GIO_UNIX_HDRS=$(PKG_CONFIG_SYSROOT_DIR)$(shell "${PKG_CONFIG}" --variable=includedir gio-unix-2.0)/gio-unix-2.0/gio/*.h
+ GIO_UNIX_PACKAGES = gio-unix-2.0
+ else
+ GIO_UNIX_HDRS=
+diff --git a/m4/introspection.m4 b/m4/introspection.m4
+index d89c3d9..b562266 100644
+--- a/m4/introspection.m4
++++ b/m4/introspection.m4
+@@ -56,14 +56,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
+     INTROSPECTION_GIRDIR=
+     INTROSPECTION_TYPELIBDIR=
+     if test "x$found_introspection" = "xyes"; then
+-       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+-       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+-       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
++       INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
++       INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
++       INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+        INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+        INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+        INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+        INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+-       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
++       INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+     fi
+     AC_SUBST(INTROSPECTION_SCANNER)
+     AC_SUBST(INTROSPECTION_COMPILER)
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-configure.ac-add-host-gi-gi-cross-wrapper-and-gi-ldd.patch b/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-configure.ac-add-host-gi-gi-cross-wrapper-and-gi-ldd.patch
new file mode 100644
index 0000000..6afefab
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-configure.ac-add-host-gi-gi-cross-wrapper-and-gi-ldd.patch
@@ -0,0 +1,204 @@
+From c6e4f83c373b577166a7e46130ce8ff025ee8515 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 19 Oct 2015 18:29:21 +0300
+Subject: [PATCH] configure.ac: add host-gi, gi-cross-wrapper, gi-ldd-wrapper
+ and introspection-data options
+
+With the first option, gobject-introspection tools (g-ir-doc-tool and g-ir-scanner)
+that are already installed in the host system will be used for building the source tree.
+
+With the second option, g-ir-scanner will be instructed to use an executable
+wrapper to run binaries it's producing, and g-ir-compiler will be run
+through the same wrapper (host system's g-ir-compiler cannot be used because
+it's producing architecture-specific output).
+
+With the third option, giscanner will be instructed to use a special ldd
+command instead of system's ldd (which does not work when the binary to inspect
+is compiled for a different architecture).
+
+With the fourth option, it is possible to disable building of introspection data
+(.gir and .typelib files), which may be difficult or impossible in cross-compilation
+environments, because of lack of emulation (or native hardware) for the target architecture
+on which the target binaries can be run.
+
+These options are useful when cross-compiling for a different target architecture.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ Makefile.am       |  2 ++
+ common.mk         | 39 +++++++++++++++++++++++++++++++++++++++
+ configure.ac      | 42 ++++++++++++++++++++++++++++++++++++++++++
+ tests/Makefile.am |  5 ++++-
+ 4 files changed, 87 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 437c673..1eb3545 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -21,7 +21,9 @@ include Makefile-cmph.am
+ include Makefile-girepository.am
+ include Makefile-giscanner.am
+ include Makefile-examples.am
++if BUILD_INTROSPECTION_DATA
+ include Makefile-gir.am
++endif
+ include Makefile-tools.am
+ include Makefile-msvcproj.am
+ 
+diff --git a/common.mk b/common.mk
+index e26c637..9f3a65f 100644
+--- a/common.mk
++++ b/common.mk
+@@ -6,6 +6,15 @@
+ # module itself.
+ #
+ 
++if USE_HOST_GI
++INTROSPECTION_SCANNER = \
++    env PATH="$(PATH)" \
++        LPATH=.libs \
++        CC="$(CC)" \
++        PYTHONPATH=$(top_builddir):$(top_srcdir) \
++        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
++        g-ir-scanner
++else
+ INTROSPECTION_SCANNER = \
+     env PATH=".libs:$(PATH)" \
+         LPATH=.libs \
+@@ -14,9 +23,24 @@ INTROSPECTION_SCANNER = \
+         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+         $(top_builddir)/g-ir-scanner
++endif
++
++if USE_CROSS_WRAPPER
++CROSS_WRAPPER_ARG = --use-binary-wrapper=$(GI_CROSS_WRAPPER)
++else
++CROSS_WRAPPER_ARG =
++endif
++
++if USE_LDD_WRAPPER
++LDD_WRAPPER_ARG = --use-ldd-wrapper=$(GI_LDD_WRAPPER)
++else
++LDD_WRAPPER_ARG =
++endif
+ 
+ INTROSPECTION_SCANNER_ARGS = \
+     --verbose \
++    $(CROSS_WRAPPER_ARG) \
++    $(LDD_WRAPPER_ARG) \
+     -I$(top_srcdir) \
+     --add-include-path=$(srcdir) \
+     --add-include-path=$(top_srcdir)/gir \
+@@ -24,9 +48,15 @@ INTROSPECTION_SCANNER_ARGS = \
+     --add-include-path=$(top_builddir) \
+     --add-include-path=$(top_builddir)/gir
+ 
++if USE_CROSS_WRAPPER
++INTROSPECTION_COMPILER = \
++    env PATH=".libs:$(PATH)" \
++        $(GI_CROSS_WRAPPER) $(top_builddir)/.libs/g-ir-compiler$(EXEEXT)
++else
+ INTROSPECTION_COMPILER = \
+     env PATH=".libs:$(PATH)" \
+         $(top_builddir)/g-ir-compiler$(EXEEXT)
++endif
+ 
+ INTROSPECTION_COMPILER_ARGS = \
+     --includedir=$(srcdir) \
+@@ -35,6 +65,14 @@ INTROSPECTION_COMPILER_ARGS = \
+     --includedir=$(top_builddir) \
+     --includedir=$(top_builddir)/gir
+ 
++if USE_HOST_GI
++INTROSPECTION_DOCTOOL = \
++    env PATH="$(PATH)" \
++        LPATH=.libs \
++        PYTHONPATH=$(top_builddir):$(top_srcdir) \
++        UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
++        g-ir-doc-tool
++else
+ INTROSPECTION_DOCTOOL = \
+     env PATH=".libs:$(PATH)" \
+         LPATH=.libs \
+@@ -42,6 +80,7 @@ INTROSPECTION_DOCTOOL = \
+         UNINSTALLED_INTROSPECTION_SRCDIR=$(top_srcdir) \
+         UNINSTALLED_INTROSPECTION_BUILDDIR=$(top_builddir) \
+         $(top_builddir)/g-ir-doc-tool
++endif
+ 
+ INTROSPECTION_DOCTOOL_ARGS = \
+     --add-include-path=$(srcdir) \
+diff --git a/configure.ac b/configure.ac
+index b11596b..d78ae52 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -347,6 +347,48 @@ fi
+ 
+ AC_SUBST(EXTRA_LINK_FLAGS)
+ 
++AC_ARG_ENABLE([host-gi],
++[AS_HELP_STRING([--enable-host-gi],[Use gobject introspection tools installed in the host system (useful when cross-compiling)])],
++[case "${enableval}" in
++  yes) host_gi=true ;;
++  no)  host_gi=false ;;
++  *) AC_MSG_ERROR([bad value ${enableval} for --enable-host-gi]) ;;
++esac],[host_gi=false])
++AM_CONDITIONAL([USE_HOST_GI], [test x$host_gi = xtrue])
++
++AC_ARG_ENABLE([gi-cross-wrapper],
++[AS_HELP_STRING([--enable-gi-cross-wrapper=path],[Use a wrapper to run gicompiler and binaries produced by giscanner (useful when cross-compiling)])],
++[
++GI_CROSS_WRAPPER="${enableval}"
++use_wrapper=true
++],[
++GI_CROSS_WRAPPER=""
++use_wrapper=false
++])
++AC_SUBST(GI_CROSS_WRAPPER)
++AM_CONDITIONAL([USE_CROSS_WRAPPER], [test x$use_wrapper = xtrue])
++
++AC_ARG_ENABLE([gi-ldd-wrapper],
++[AS_HELP_STRING([--enable-gi-ldd-wrapper=path],[Use a ldd wrapper instead of system's ldd command in giscanner (useful when cross-compiling)])],
++[
++GI_LDD_WRAPPER="${enableval}"
++use_ldd_wrapper=true
++],[
++GI_LDD_WRAPPER=""
++use_ldd_wrapper=false
++])
++AC_SUBST(GI_LDD_WRAPPER)
++AM_CONDITIONAL([USE_LDD_WRAPPER], [test x$use_ldd_wrapper = xtrue])
++
++AC_ARG_ENABLE([introspection-data],
++[AS_HELP_STRING([--enable-introspection-data],[Build introspection data (.gir and .typelib files) in addition to library and tools])],
++[case "${enableval}" in
++  yes) introspection_data=true ;;
++  no)  introspection_data=false ;;
++  *) AC_MSG_ERROR([bad value ${enableval} for --enable-introspection-data]) ;;
++esac],[introspection_data=true])
++AM_CONDITIONAL([BUILD_INTROSPECTION_DATA], [test x$introspection_data = xtrue])
++
+ AC_CONFIG_FILES([
+ Makefile
+ tests/Makefile
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index bdd0fa7..75dd3c9 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -1,6 +1,9 @@
+ include $(top_srcdir)/common.mk
+ 
+-SUBDIRS = . scanner repository offsets warn
++SUBDIRS = . scanner repository warn
++if BUILD_INTROSPECTION_DATA
++SUBDIRS += offsets
++endif
+ 
+ EXTRA_DIST=
+ BUILT_SOURCES=
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-use-ldd-wrapper-option.patch b/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-use-ldd-wrapper-option.patch
new file mode 100644
index 0000000..f923dcc
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-a-use-ldd-wrapper-option.patch
@@ -0,0 +1,48 @@
+From 291a92f200981a772b2d03739dffb5926a82c5a5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 30 Oct 2015 16:28:46 +0200
+Subject: [PATCH 1/2] giscanner: add a --use-ldd-wrapper option
+
+This is useful in cross-compile environments where system's ldd
+command does not work on binaries built for a different architecture
+
+Upstream-Status: Pending [review in oe-core]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ giscanner/scannermain.py | 3 +++
+ giscanner/shlibs.py      | 4 +++-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index e37d3e3..b8fff5f 100755
+--- a/giscanner/scannermain.py
++++ b/giscanner/scannermain.py
+@@ -121,6 +121,9 @@ def _get_option_parser():
+     parser.add_option("", "--use-binary-wrapper",
+                       action="store", dest="wrapper", default=None,
+                       help="wrapper to use for running programs (useful when cross-compiling)")
++    parser.add_option("", "--use-ldd-wrapper",
++                      action="store", dest="ldd_wrapper", default=None,
++                      help="wrapper to use instead of ldd (useful when cross-compiling)")
+     parser.add_option("", "--program-arg",
+                       action="append", dest="program_args", default=[],
+                       help="extra arguments to program")
+diff --git a/giscanner/shlibs.py b/giscanner/shlibs.py
+index 1ad75ee..41117c6 100644
+--- a/giscanner/shlibs.py
++++ b/giscanner/shlibs.py
+@@ -100,7 +100,9 @@ def _resolve_non_libtool(options, binary, libraries):
+             args.extend(libtool)
+             args.append('--mode=execute')
+         platform_system = platform.system()
+-        if platform_system == 'Darwin':
++        if options.ldd_wrapper:
++            args.extend([options.ldd_wrapper, binary.args[0]])
++        elif platform_system == 'Darwin':
+             args.extend(['otool', '-L', binary.args[0]])
+         else:
+             args.extend(['ldd', binary.args[0]])
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch b/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch
new file mode 100644
index 0000000..e1241a9
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection/0001-giscanner-add-use-binary-wrapper-option.patch
@@ -0,0 +1,52 @@
+From 2322f36056265f809aaffb74fcf5ac0c83129752 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 19 Oct 2015 18:26:40 +0300
+Subject: [PATCH 2/4] giscanner: add --use-binary-wrapper option
+
+With this option, giscanner will use a wrapper executable to run
+binaries it's producing, instead of running them directly. This
+is useful when binaries are cross-compiled and cannot be run directly,
+but they can be run using for example QEMU emulation.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ giscanner/scannermain.py | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/giscanner/scannermain.py b/giscanner/scannermain.py
+index b36284d..e37d3e3 100755
+--- a/giscanner/scannermain.py
++++ b/giscanner/scannermain.py
+@@ -118,6 +118,9 @@ def _get_option_parser():
+     parser.add_option("", "--program",
+                       action="store", dest="program", default=None,
+                       help="program to execute")
++    parser.add_option("", "--use-binary-wrapper",
++                      action="store", dest="wrapper", default=None,
++                      help="wrapper to use for running programs (useful when cross-compiling)")
+     parser.add_option("", "--program-arg",
+                       action="append", dest="program_args", default=[],
+                       help="extra arguments to program")
+@@ -406,6 +409,17 @@ def create_binary(transformer, options, args):
+                                               gdump_parser.get_error_quark_functions())
+ 
+     shlibs = resolve_shlibs(options, binary, options.libraries)
++    if options.wrapper:
++        # The wrapper needs the binary itself, not the libtool wrapper script,
++        # so we check if libtool has sneaked the binary into .libs subdirectory
++        # and adjust the path accordingly
++	import os.path
++        dir_name, binary_name  = os.path.split(binary.args[0])
++        libtool_binary = os.path.join(dir_name, '.libs', binary_name)
++        if os.path.exists(libtool_binary):
++	    binary.args[0] = libtool_binary
++	# Then prepend the wrapper to the command line to execute
++        binary.args = [options.wrapper] + binary.args
+     gdump_parser.set_introspection_binary(binary)
+     gdump_parser.parse()
+     return shlibs
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb b/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb
new file mode 100644
index 0000000..9b16147
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb
@@ -0,0 +1,163 @@
+HOMEPAGE = "http://gnome.org"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "libs"
+LICENSE = "LGPLv2+ & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=90d577535a3898e1ae5dbf0ae3509a8c \
+                    file://tools/compiler.c;endline=20;md5=fc5007fc20022720e6c0b0cdde41fabd \
+                    file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39 \
+                    file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/1.46/${BPN}-${PV}.tar.xz \
+           file://0001-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
+           file://0001-giscanner-add-use-binary-wrapper-option.patch \
+           file://0001-giscanner-add-a-use-ldd-wrapper-option.patch \
+           file://0001-configure.ac-add-host-gi-gi-cross-wrapper-and-gi-ldd.patch \
+           "
+SRC_URI[md5sum] = "adb40a31c7c80b65b0f4c8fd71b493dc"
+SRC_URI[sha256sum] = "6658bd3c2b8813eb3e2511ee153238d09ace9d309e4574af27443d87423e4233"
+
+inherit autotools pkgconfig gtk-doc pythonnative qemu gobject-introspection-data
+BBCLASSEXTEND = "native"
+
+# necessary to let the call for python-config from configure.ac succeed
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
+
+# needed for writing out the qemu wrapper script
+export STAGING_DIR_HOST
+export B
+
+DEPENDS_append = " libffi zlib glib-2.0 python"
+
+# target build needs qemu to run temporary introspection binaries created
+# on the fly by g-ir-scanner and a native version of itself to run
+# native versions of its own tools during build.
+# Also prelink-rtld is used to find out library dependencies of introspection binaries
+# (standard ldd doesn't work when cross-compiling).
+DEPENDS_class-target_append = " gobject-introspection-native qemu-native prelink-native"
+
+SSTATE_SCAN_FILES += "g-ir-scanner-qemuwrapper g-ir-scanner-wrapper g-ir-compiler-wrapper g-ir-scanner-lddwrapper Gio-2.0.gir"
+
+do_configure_prepend_class-native() {
+        # Tweak the native python scripts so that they don't refer to the
+        # full path of native python binary (the solution is taken from glib-2.0 recipe)
+        # This removes the risk of exceeding Linux kernel's shebang line limit (128 bytes)
+        sed -i -e '1s,#!.*,#!${USRBINPATH}/env nativepython,' ${S}/tools/g-ir-tool-template.in
+}
+
+do_configure_prepend_class-target() {
+        # Write out a qemu wrapper that will be given to gi-scanner so that it
+        # can run target helper binaries through that.
+        qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
+        cat > ${B}/g-ir-scanner-qemuwrapper << EOF
+#!/bin/sh
+# Use a modules directory which doesn't exist so we don't load random things
+# which may then get deleted (or their dependencies) and potentially segfault
+export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
+
+$qemu_binary "\$@"
+if [ \$? -ne 0 ]; then
+    echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."
+    echo "(typically like this: GIR_EXTRA_LIBS_PATH=\"$""{B}/something/.libs\" )"
+    exit 1
+fi
+EOF
+        chmod +x ${B}/g-ir-scanner-qemuwrapper
+
+        # Write out a wrapper for g-ir-scanner itself, which will be used when building introspection files
+        # for glib-based packages. This wrapper calls the native version of the scanner, and tells it to use
+        # a qemu wrapper for running transient target binaries produced by the scanner, and an include directory 
+        # from the target sysroot.
+        cat > ${B}/g-ir-scanner-wrapper << EOF
+#!/bin/sh
+# This prevents g-ir-scanner from writing cache data to $HOME
+export GI_SCANNER_DISABLE_CACHE=1
+
+g-ir-scanner --use-binary-wrapper=${STAGING_BINDIR}/g-ir-scanner-qemuwrapper --use-ldd-wrapper=${STAGING_BINDIR}/g-ir-scanner-lddwrapper --add-include-path=${STAGING_DATADIR}/gir-1.0 "\$@"
+EOF
+        chmod +x ${B}/g-ir-scanner-wrapper
+
+        # Write out a wrapper for g-ir-compiler, which runs the target version of it through qemu.
+        # g-ir-compiler writes out the raw content of a C struct to disk, and therefore is architecture dependent.
+        cat > ${B}/g-ir-compiler-wrapper << EOF
+#!/bin/sh
+${STAGING_BINDIR}/g-ir-scanner-qemuwrapper ${STAGING_BINDIR}/g-ir-compiler "\$@"
+EOF
+        chmod +x ${B}/g-ir-compiler-wrapper
+
+        # Write out a wrapper to use instead of ldd, which does not work when a binary is built
+        # for a different architecture
+        cat > ${B}/g-ir-scanner-lddwrapper << EOF
+#!/bin/sh
+prelink-rtld --root=$STAGING_DIR_HOST "\$@"
+EOF
+        chmod +x ${B}/g-ir-scanner-lddwrapper
+
+        # Also tweak the target python scripts so that they don't refer to the
+        # native version of python binary (the solution is taken from glib-2.0 recipe)
+        sed -i -e '1s,#!.*,#!${USRBINPATH}/env python,' ${S}/tools/g-ir-tool-template.in
+}
+
+# Configure target build to use native tools of itself and to use a qemu wrapper
+# and optionally to generate introspection data
+EXTRA_OECONF_class-target += "--enable-host-gi \
+                              --enable-gi-cross-wrapper=${B}/g-ir-scanner-qemuwrapper \
+                              --enable-gi-ldd-wrapper=${B}/g-ir-scanner-lddwrapper \
+                              ${@bb.utils.contains('GI_DATA_ENABLED', 'True', '--enable-introspection-data', '--disable-introspection-data', d)} \
+                             "
+
+
+do_compile_prepend_class-target() {
+        # This prevents g-ir-scanner from writing cache data to $HOME
+        export GI_SCANNER_DISABLE_CACHE=1
+
+        # Needed to run g-ir unit tests, which won't be able to find the built libraries otherwise
+        export GIR_EXTRA_LIBS_PATH=$B/.libs
+}
+
+# Our wrappers need to be available system-wide, because they will be used 
+# to build introspection files for all other gobject-based packages
+do_install_append_class-target() {
+        install -d ${D}${bindir}/
+        install ${B}/g-ir-scanner-qemuwrapper ${D}${bindir}/
+        install ${B}/g-ir-scanner-wrapper ${D}${bindir}/
+        install ${B}/g-ir-compiler-wrapper ${D}${bindir}/
+        install ${B}/g-ir-scanner-lddwrapper ${D}${bindir}/
+}
+
+# .typelib files are needed at runtime and so they go to the main package
+FILES_${PN}_append = " ${libdir}/girepository-*/*.typelib"
+
+# .gir files go to dev package, as they're needed for developing (but not for running)
+# things that depends on introspection.
+FILES_${PN}-dev_append = " ${datadir}/gir-*/*.gir"
+
+# These are used by gobject-based packages
+# to generate transient introspection binaries
+FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/gdump.c \
+               ${datadir}/gobject-introspection-1.0/Makefile.introspection"
+
+# These are used by dependent packages (e.g. pygobject) to build their
+# testsuites.
+FILES_${PN}-dev_append = " ${datadir}/gobject-introspection-1.0/tests/*.c \
+                   ${datadir}/gobject-introspection-1.0/tests/*.h"
+
+FILES_${PN}-dbg += "${libdir}/gobject-introspection/giscanner/.debug/"
+FILES_${PN}-staticdev += "${libdir}/gobject-introspection/giscanner/*.a"
+
+# we need target versions of introspection tools in sysroot so that they can be run via qemu
+# when building introspection files in other packages
+SYSROOT_PREPROCESS_FUNCS_append_class-target += "gi_binaries_sysroot_preprocess"
+
+gi_binaries_sysroot_preprocess() {
+        sysroot_stage_dir ${D}${bindir} ${SYSROOT_DESTDIR}${bindir}
+
+        # Also, tweak the binary names in introspection pkgconfig file, so that it picks up our 
+        # wrappers which do the cross-compile and qemu magic.
+        sed -i \
+           -e "s|g_ir_scanner=.*|g_ir_scanner=${bindir}/g-ir-scanner-wrapper|" \
+           -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
+           ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
+}
diff --git a/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.16.1.bb b/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.16.1.bb
deleted file mode 100644
index f2f2c75..0000000
--- a/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.16.1.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-SUMMARY = "GNOME desktop-wide GSettings schemas"
-HOMEPAGE = "http://live.gnome.org/gsettings-desktop-schemas"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-DEPENDS = "glib-2.0 intltool-native gobject-introspection-stub-native"
-
-inherit gnomebase gsettings gettext
-
-SRC_URI[archive.md5sum] = "baebbcf3c20591f98876e42fb0a3fd35"
-SRC_URI[archive.sha256sum] = "74fe9fdad510c8a6666febeceb7ebafc581ef990b3afcc8c1e8b5d90b24b3461"
diff --git a/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.19.3.bb b/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.19.3.bb
new file mode 100644
index 0000000..25fdaba
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gsettings-desktop-schemas/gsettings-desktop-schemas_3.19.3.bb
@@ -0,0 +1,14 @@
+SUMMARY = "GNOME desktop-wide GSettings schemas"
+HOMEPAGE = "http://live.gnome.org/gsettings-desktop-schemas"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+DEPENDS = "glib-2.0 intltool-native"
+
+inherit gnomebase gsettings gettext gobject-introspection
+
+SRC_URI[archive.md5sum] = "fdc92abcffe46821be423193b275cf8b"
+SRC_URI[archive.sha256sum] = "9084989b75ca9b3fc5984c8a0d297a93d3d124f51cadd2bdaaaa75a783c80635"
+
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc b/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc
index a197b9d..5bbfe6b 100644
--- a/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+.inc
@@ -13,6 +13,10 @@
 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 docbook-utils-native \
  cairo gdk-pixbuf"
@@ -25,13 +29,12 @@
 # without --with-gdktarget=directfb it will check for cairo-xlib which isn't available without X11 DISTRO_FEATURE
 PACKAGECONFIG[directfb] = "--with-gdktarget=directfb,,directfb"
 
-inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache
+inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache gobject-introspection
 
 PACKAGES += "libgail gtk-demo"
 
-FILES_${PN} = "${bindir}/gtk-update-icon-cache-2.0 \
+FILES_${PN} += "${bindir}/gtk-update-icon-cache-2.0 \
 	${bindir}/gtk-query-immodules-2.0 \
-	${libdir}/lib*${SOLIBS} \
 	${datadir}/themes ${sysconfdir} \
 	${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so"
 
@@ -45,13 +48,6 @@
 	${libdir}/gtk-2.0/${LIBV}/engines/*.la \
 	${bindir}/gtk-builder-convert"
 
-FILES_${PN}-dbg += " \
-	${libdir}/gtk-2.0/modules/.debug/* \
-        ${libdir}/gtk-2.0/${LIBV}/loaders/.debug/* \
-	${libdir}/gtk-2.0/${LIBV}/immodules/.debug/* \
-	${libdir}/gtk-2.0/${LIBV}/engines/.debug/* \
-	${libdir}/gtk-2.0/${LIBV}/printbackends/.debug/*"
-
 FILES_gtk-demo = " \
  ${datadir}/gtk-2.0/demo/* \
  ${bindir}/gtk-demo \
@@ -71,6 +67,10 @@
 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
 
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
index 22a40d8..bd29300 100644
--- a/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -10,7 +10,7 @@
 
 LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
 
-inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings distro_features_check
+inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings distro_features_check upstream-version-is-even gobject-introspection
 ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 
 # This should be in autotools.bbclass, but until something elses uses it putting
@@ -28,16 +28,20 @@
                  --disable-xinerama \
                  --enable-modules \
                  --disable-cups \
-                 --disable-introspection \
+                 --disable-colord \
 "
 
+do_compile_prepend() {
+        export GIR_EXTRA_LIBS_PATH="${B}/gdk/.libs"
+}
+
 PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "x11", "x11", "", d)} \
                    ${@bb.utils.contains("DISTRO_FEATURES", "opengl x11", "glx", "", d)} \
                    ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}"
 
 PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes"
 PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,,libgl"
-PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon virtual/mesa"
+PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon virtual/mesa wayland-native"
 
 do_install_append() {
 	mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
@@ -61,10 +65,9 @@
 # dependencies are present.
 RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info"
 
-FILES_${PN} = "${bindir}/gtk-update-icon-cache-3.0 \
+FILES_${PN}_append = " ${bindir}/gtk-update-icon-cache-3.0 \
                ${bindir}/gtk-query-immodules-3.0 \
                ${bindir}/gtk-launch \
-               ${libdir}/lib*${SOLIBS} \
                ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \
                ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \
                ${libdir}/gtk-3.0/modules/*.so"
@@ -79,14 +82,9 @@
                     ${libdir}/gtk-3.0/${LIBV}/engines/*.la \
                     ${libdir}/gtk-3.0/modules/*.la \
                     ${bindir}/gtk-builder-convert \
-                    ${bindir}/gtk-encode-symbolic-svg"
-
-FILES_${PN}-dbg += " \
-                    ${libdir}/gtk-3.0/${LIBV}/loaders/.debug \
-                    ${libdir}/gtk-3.0/${LIBV}/immodules/.debug \
-                    ${libdir}/gtk-3.0/${LIBV}/engines/.debug \
-                    ${libdir}/gtk-3.0/${LIBV}/printbackends/.debug \
-                    ${libdir}/gtk-3.0/modules/.debug"
+                    ${bindir}/gtk-encode-symbolic-svg \
+                    ${bindir}/gtk-builder-tool \
+                    "
 
 RRECOMMENDS_${PN} = "adwaita-icon-theme-symbolic"
 
@@ -94,6 +92,7 @@
 
 ALTERNATIVE_${PN} = "gtk-update-icon-cache"
 ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0"
+ALTERNATIVE_PRIORITY = "30"
 
 python populate_packages_prepend () {
     import os.path
@@ -108,7 +107,7 @@
 
     do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
 
-    if (d.getVar('DEBIAN_NAMES', 1)):
-        d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-3.0')
+    if (d.getVar('DEBIAN_NAMES', True)):
+        d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-3.0')
 }
 
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb
deleted file mode 100644
index 381e607..0000000
--- a/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.16.6.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require gtk+3.inc
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
-           file://hardcoded_libtool.patch \
-           file://Dont-force-csd.patch \
-           file://Do-not-try-to-initialize-GL-without-libGL.patch \
-          "
-
-SRC_URI[md5sum] = "fc59e5c8b5a4585b60623dd708df400b"
-SRC_URI[sha256sum] = "4d12726d0856a968b41802ae5c5971d7e9bac532717e309d3f81b9989da5ffbe"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
-                    file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
-                    file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
-                    file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.18.8.bb b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.18.8.bb
new file mode 100644
index 0000000..b76c0cc
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+3_3.18.8.bb
@@ -0,0 +1,19 @@
+require gtk+3.inc
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+           file://hardcoded_libtool.patch \
+           file://Dont-force-csd.patch \
+           file://Do-not-try-to-initialize-GL-without-libGL.patch \
+          "
+
+SRC_URI[md5sum] = "9671acb41dc13561d19233f1a75cf184"
+SRC_URI[sha256sum] = "1c53ef1bb55364698f7183ecd185b547f92f4a3a7abfafd531400232e2e052f8"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+                    file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+                    file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+                    file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.28.bb b/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.28.bb
deleted file mode 100644
index e343773..0000000
--- a/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.28.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-require gtk+.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
-                    file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
-                    file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
-           file://xsettings.patch \
-           file://hardcoded_libtool.patch \
-           file://toggle-font.diff;striplevel=0 \
-           file://doc-fixes.patch \
-           file://strict-prototypes.patch \
-	  "
-
-SRC_URI[md5sum] = "bfacf87b2ea67e4e5c7866a9003e6526"
-SRC_URI[sha256sum] = "b2c6441e98bc5232e5f9bba6965075dcf580a8726398f7374d39f90b88ed4656"
-
-EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
-
-LIBV = "2.10.0"
-
-PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
-
-python populate_packages_prepend () {
-    gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
-    immodules_root = os.path.join(gtk_libdir, 'immodules')
-    printmodules_root = os.path.join(gtk_libdir, 'printbackends');
-
-    d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
-    do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
-
-    if (d.getVar('DEBIAN_NAMES', True)):
-        d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-2.0')
-}
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.29.bb b/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.29.bb
new file mode 100644
index 0000000..cf55d20
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk+_2.24.29.bb
@@ -0,0 +1,34 @@
+require gtk+.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+                    file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
+                    file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
+                    file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
+           file://xsettings.patch \
+           file://hardcoded_libtool.patch \
+           file://toggle-font.diff;striplevel=0 \
+           file://doc-fixes.patch \
+           file://strict-prototypes.patch \
+	  "
+
+SRC_URI[md5sum] = "1b7a3689f65617387b5b54520f4439e8"
+SRC_URI[sha256sum] = "0741c59600d3d810a223866453dc2bbb18ce4723828681ba24aa6519c37631b8"
+
+EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
+
+LIBV = "2.10.0"
+
+PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
+
+python populate_packages_prepend () {
+    gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
+    immodules_root = os.path.join(gtk_libdir, 'immodules')
+    printmodules_root = os.path.join(gtk_libdir, 'printbackends');
+
+    d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
+    do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
+
+    if (d.getVar('DEBIAN_NAMES', True)):
+        d.setVar(d.expand('PKG_${PN}'), '${MLPREFIX}libgtk-2.0')
+}
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.16.6.bb b/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.16.6.bb
deleted file mode 100644
index cba3815..0000000
--- a/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.16.6.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "Native icon utils for GTK+"
-DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution."
-SECTION = "libs"
-
-DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
-
-LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
-          file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
-SRC_URI[md5sum] = "fc59e5c8b5a4585b60623dd708df400b"
-SRC_URI[sha256sum] = "4d12726d0856a968b41802ae5c5971d7e9bac532717e309d3f81b9989da5ffbe"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
-                    file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
-                    file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
-                    file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
-
-S = "${WORKDIR}/gtk+-${PV}"
-
-inherit pkgconfig native
-
-PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
-
-do_configure() {
-	# Quite ugly but defines enough to compile the tools.
-	if ! test -f gtk/config.h; then
-		echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
-		echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
-		echo "#define HAVE_FTW_H 1" >> gtk/config.h
-	fi
-	if ! test -f gdk/config.h; then
-		touch gdk/config.h
-	fi
-}
-
-do_compile() {
-	${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
-		${S}/gtk/updateiconcache.c \
-		$(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
-		-o gtk-update-icon-cache
-
-	${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
-		${S}/gtk/encodesymbolic.c \
-		$(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \
-		-o gtk-encode-symbolic-svg
-}
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
-	install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
-
-	create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
-	create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
-		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
-}
-
-# Prevent bitbake from optimizing away the native librsvg sysroot population
-do_populate_sysroot_setscene[depends] += "librsvg-native:do_populate_sysroot_setscene"
diff --git a/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.18.8.bb b/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.18.8.bb
new file mode 100644
index 0000000..793f14a
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk+/gtk-icon-utils-native_3.18.8.bb
@@ -0,0 +1,60 @@
+SUMMARY = "Native icon utils for GTK+"
+DESCRIPTION = "gtk-update-icon-cache and gtk-encode-symbolic-svg built from GTK+ natively, for build time and on-host postinst script execution."
+SECTION = "libs"
+
+DEPENDS = "glib-2.0-native gdk-pixbuf-native librsvg-native"
+
+LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
+          file://Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch"
+SRC_URI[md5sum] = "9671acb41dc13561d19233f1a75cf184"
+SRC_URI[sha256sum] = "1c53ef1bb55364698f7183ecd185b547f92f4a3a7abfafd531400232e2e052f8"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
+                    file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
+                    file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
+                    file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
+inherit pkgconfig native upstream-version-is-even
+
+PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
+
+do_configure() {
+	# Quite ugly but defines enough to compile the tools.
+	if ! test -f gtk/config.h; then
+		echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
+		echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
+		echo "#define HAVE_FTW_H 1" >> gtk/config.h
+	fi
+	if ! test -f gdk/config.h; then
+		touch gdk/config.h
+	fi
+}
+
+do_compile() {
+	${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+		${S}/gtk/updateiconcache.c \
+		$(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
+		-o gtk-update-icon-cache
+
+	${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+		${S}/gtk/encodesymbolic.c \
+		$(${PKG_CONFIG_FOR_BUILD} --cflags --libs gio-2.0 gdk-pixbuf-2.0) \
+		-o gtk-encode-symbolic-svg
+}
+
+do_install() {
+	install -d ${D}${bindir}
+	install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
+	install -m 0755 ${B}/gtk-encode-symbolic-svg ${D}${bindir}
+
+	create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+	create_wrapper ${D}/${bindir}/gtk-encode-symbolic-svg \
+		GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
+}
diff --git a/yocto-poky/meta/recipes-gnome/gtk-doc-stub/files/0001-Revert-Import-introspection-stub-machinery-too.patch b/yocto-poky/meta/recipes-gnome/gtk-doc-stub/files/0001-Revert-Import-introspection-stub-machinery-too.patch
new file mode 100644
index 0000000..80b0521
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/gtk-doc-stub/files/0001-Revert-Import-introspection-stub-machinery-too.patch
@@ -0,0 +1,305 @@
+From d636be29bf95396b4e27fcd17ff84cb7091cca91 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Thu, 8 Oct 2015 15:37:40 +0300
+Subject: [PATCH] Revert "Import introspection stub machinery too"
+
+This reverts commit 3dfd0a09de696ec8c544762747f8a0f77153622e.
+As we provide the full introspection support, we need to remove
+the stubs from this package that conflict with it.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Makefile               |   4 --
+ Makefile.introspection | 163 -------------------------------------------------
+ introspection.m4       |  96 -----------------------------
+ 3 files changed, 263 deletions(-)
+ delete mode 100644 Makefile.introspection
+ delete mode 100644 introspection.m4
+
+diff --git a/Makefile b/Makefile
+index 7cb6ce5..ad4231a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -23,7 +23,3 @@ install: $(bin_programs)
+ 
+ 	mkdir -p $(DESTDIR)$(datarootdir)/aclocal/
+ 	install -m 0644 $(srcdir)/gtk-doc.m4 $(DESTDIR)$(datarootdir)/aclocal/gtk-doc.m4
+-
+-	mkdir -p $(DESTDIR)$(datarootdir)/gobject-introspection-1.0
+-	install -m 0644 $(srcdir)/Makefile.introspection $(DESTDIR)$(datarootdir)/gobject-introspection-1.0/Makefile.introspection
+-	install -m 0644 $(srcdir)/introspection.m4 $(DESTDIR)$(datarootdir)/aclocal/introspection.m4
+diff --git a/Makefile.introspection b/Makefile.introspection
+deleted file mode 100644
+index 755dd15..0000000
+--- a/Makefile.introspection
++++ /dev/null
+@@ -1,163 +0,0 @@
+-# -*- Mode: make -*-
+-# Copyright 2009-2010 Johan Dahlin
+-#
+-# This file is free software; the author(s) gives unlimited
+-# permission to copy and/or distribute it, with or without
+-# modifications, as long as this notice is preserved.
+-#
+-# * Input variables:
+-#
+-#   INTROSPECTION_GIRS - List of GIRS that should be generated
+-#   INTROSPECTION_SCANNER - Command to invoke scanner, normally set by
+-#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+-#   INTROSPECTION_SCANNER_ARGS - Additional args to pass in to the scanner
+-#   INTROSPECTION_SCANNER_ENV - Environment variables to set before running
+-#      the scanner
+-#   INTROSPECTION_COMPILER - Command to invoke compiler, normally set by
+-#      GOBJECT_INTROSPECTION_REQUIRE/CHECK() in introspection.m4
+-#   INTROSPECTION_COMPILER_ARGS - Additional args to pass in to the compiler
+-#
+-# * Simple tutorial
+-#
+-# Add this to configure.ac:
+-#   -Wno-portability to AM_INIT_AUTOMAKE
+-#   GOBJECT_INTROSPECTION_CHECK([0.6.7])
+-#
+-# Add this to Makefile.am where your library/program is built:
+-#   include $(INTROSPECTION_MAKEFILE)
+-#   INTROSPECTION_GIRS = YourLib-1.0.gir
+-#   YourLib_1_0_gir_NAMESPACE = YourLib
+-#   YourLib_1_0_gir_VERSION = 1.0
+-#   YourLib_1_0_gir_LIBS = libyourlib.la
+-#   YourLib_1_0_gir_FILES = $(libyourlib_1_0_SOURCES)
+-#   girdir = $(datadir)/gir-1.0
+-#   dist_gir_DATA = YourLib-1.0.gir
+-#   typelibdir = $(libdir)/girepository-1.0
+-#   typelib_DATA = YourLib-1.0.typelib
+-#   CLEANFILES = $(dist_gir_DATA) $(typelib_DATA)
+-#
+-
+-# Make sure the required variables are set, these should under normal
+-# circumstances come from introspection.m4
+-$(if $(INTROSPECTION_SCANNER),,$(error Need to define INTROSPECTION_SCANNER))
+-$(if $(INTROSPECTION_COMPILER),,$(error Need to define INTROSPECTION_COMPILER))
+-
+-# Private functions
+-
+-## Transform the gir filename to something which can reference through a variable
+-## without automake/make complaining, eg Gtk-2.0.gir -> Gtk_2_0_gir
+-_gir_name = $(subst /,_,$(subst -,_,$(subst .,_,$(1))))
+-
+-# Namespace and Version is either fetched from the gir filename
+-# or the _NAMESPACE/_VERSION variable combo
+-_gir_namespace = $(or $($(_gir_name)_NAMESPACE),$(firstword $(subst -, ,$(notdir $(1)))))
+-_gir_version = $(or $($(_gir_name)_VERSION),$(lastword $(subst -, ,$(1:.gir=))))
+-
+-# _PROGRAM is an optional variable which needs it's own --program argument
+-_gir_program = $(if $($(_gir_name)_PROGRAM),--program=$($(_gir_name)_PROGRAM))
+-
+-# Variables which provides a list of things
+-_gir_libraries = $(foreach lib,$($(_gir_name)_LIBS),--library=$(lib))
+-_gir_packages = $(foreach pkg,$($(_gir_name)_PACKAGES),--pkg=$(pkg))
+-_gir_includes = $(foreach include,$($(_gir_name)_INCLUDES),--include=$(include))
+-_gir_export_packages = $(foreach pkg,$($(_gir_name)_EXPORT_PACKAGES),--pkg-export=$(pkg))
+-
+-# Reuse the LIBTOOL variable from automake if it's set, but
+-# work around MSYS weirdness: When running g-ir-scanner, MSYS changes
+-# a command-line argument --libtool="/bin/sh ../../libtool" into
+-# --libtool=c:/opt/msys/1.0/bin/libtool. So just use sh.exe without path
+-# because we already "know" where the libtool configure produced is.
+-_gir_libtool = $(if $(findstring MINGW32,$(shell uname -s)),--libtool="$(top_builddir)/libtool",$(if $(LIBTOOL),--libtool="$(LIBTOOL)"))
+-
+-# Macros for AM_SILENT_RULES prettiness
+-_gir_verbosity = $(if $(AM_DEFAULT_VERBOSITY),$(AM_DEFAULT_VERBOSITY),1)
+-
+-_gir_silent_scanner_prefix = $(_gir_silent_scanner_prefix_$(V))
+-_gir_silent_scanner_prefix_ = $(_gir_silent_scanner_prefix_$(_gir_verbosity))
+-_gir_silent_scanner_prefix_0 = @echo "  GISCAN $(1)";
+-_gir_silent_scanner_opts = $(_gir_silent_scanner_opts_$(V))
+-_gir_silent_scanner_opts_ = $(_gir_silent_scanner_opts_$(_gir_verbosity))
+-_gir_silent_scanner_opts_0 = --quiet
+-
+-_gir_silent_compiler = $(_gir_silent_compiler_$(V))
+-_gir_silent_compiler_ = $(_gir_silent_compiler_$(_gir_verbosity))
+-_gir_silent_compiler_0 = @echo "  GICOMP $(1)";
+-
+-#
+-# Creates a GIR by scanning C headers/sources
+-# $(1) - Name of the gir file (output)
+-#
+-# If output is Gtk-2.0.gir then you should name the variables like
+-# Gtk_2_0_gir_NAMESPACE, Gtk_2_0_gir_VERSION etc.
+-# Required variables:
+-# FILES - C sources and headers which should be scanned
+-#
+-# One of these variables are required:
+-# LIBS - Library where the symbol represented in the gir can be found
+-# PROGRAM - Program where the symbol represented in the gir can be found
+-#
+-# Optional variables
+-# NAMESPACE - Namespace of the gir, first letter capital,
+-#   rest should be lower case, for instance: 'Gtk', 'Clutter', 'ClutterGtk'.
+-#   If not present the namespace will be fetched from the gir filename,
+-#   the part before the first dash. For 'Gtk-2.0', namespace will be 'Gtk'.
+-# VERSION - Version of the gir, if not present, will be fetched from gir
+-# filename, the part after the first dash. For 'Gtk-2.0', version will be '2.0'.
+-# LIBTOOL - Command to invoke libtool, usually set by automake
+-# SCANNERFLAGS - Flags to pass in to the scanner, see g-ir-scanner(1) for a list
+-# CFLAGS - Flags to pass in to the parser when scanning headers
+-# LDFLAGS - Linker flags used by the scanner
+-# PACKAGES - list of pkg-config names which cflags are required to parse
+-#   the headers of this gir
+-# INCLUDES - Gir files to include without the .gir suffix, for instance
+-#   GLib-2.0, Gtk-2.0. This is needed for all libraries which you depend on that
+-#   provides introspection information.
+-# EXPORT_PACKAGES - list of pkg-config names that are provided by this gir.
+-#   By default the names in the PACKAGES variable will be used.
+-#
+-
+-define introspection-scanner
+-
+-# Basic sanity check, to make sure required variables are set
+-$(if $($(_gir_name)_FILES),,$(error Need to define $(_gir_name)_FILES))
+-$(if $(or $(findstring --header-only,$($(_gir_name)_SCANNERFLAGS)),
+-          $($(_gir_name)_LIBS),
+-          $($(_gir_name)_PROGRAM)),,
+-    $(error Need to define $(_gir_name)_LIBS or $(_gir_name)_PROGRAM))
+-
+-# Only dependencies we know are actually filenames goes into _FILES, make
+-# sure these are built before running the scanner. Libraries and programs
+-# needs to be added manually.
+-$(1): $$($(_gir_name)_FILES)
+-	@ $(MKDIR_P) $(dir $(1))
+-	$(_gir_silent_scanner_prefix) $(INTROSPECTION_SCANNER_ENV) $(INTROSPECTION_SCANNER) $(_gir_silent_scanner_opts) \
+-	$(INTROSPECTION_SCANNER_ARGS) \
+-	  --namespace=$(_gir_namespace) \
+-	  --nsversion=$(_gir_version) \
+-	  $(_gir_libtool) \
+-	  $(_gir_packages) \
+-	  $(_gir_includes) \
+-	  $(_gir_export_packages) \
+-	  $(_gir_program) \
+-	  $(_gir_libraries) \
+-	  $($(_gir_name)_SCANNERFLAGS) \
+-	  $($(_gir_name)_CFLAGS) \
+-	  $($(_gir_name)_LDFLAGS) \
+-	  $$^ \
+-	  --output $(1)
+-endef
+-
+-$(foreach gir,$(INTROSPECTION_GIRS),$(eval $(call introspection-scanner,$(gir))))
+-
+-#
+-# Compiles a gir into a typelib
+-# $(1): gir filename (input)
+-# $(2): typelib filename (output)
+-#
+-define introspection-compiler
+-$(_gir_silent_compiler) $(INTROSPECTION_COMPILER) $(INTROSPECTION_COMPILER_ARGS) --includedir=. $(1) -o $(2)
+-endef
+-
+-# Simple rule to compile a typelib.
+-%.typelib: %.gir
+-	$(call introspection-compiler,$<,$@)
+diff --git a/introspection.m4 b/introspection.m4
+deleted file mode 100644
+index d89c3d9..0000000
+--- a/introspection.m4
++++ /dev/null
+@@ -1,96 +0,0 @@
+-dnl -*- mode: autoconf -*-
+-dnl Copyright 2009 Johan Dahlin
+-dnl
+-dnl This file is free software; the author(s) gives unlimited
+-dnl permission to copy and/or distribute it, with or without
+-dnl modifications, as long as this notice is preserved.
+-dnl
+-
+-# serial 1
+-
+-m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
+-[
+-    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+-    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+-    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
+-
+-    dnl enable/disable introspection
+-    m4_if([$2], [require],
+-    [dnl
+-        enable_introspection=yes
+-    ],[dnl
+-        AC_ARG_ENABLE(introspection,
+-                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
+-                                 [Enable introspection for this build]),, 
+-                                 [enable_introspection=auto])
+-    ])dnl
+-
+-    AC_MSG_CHECKING([for gobject-introspection])
+-
+-    dnl presence/version checking
+-    AS_CASE([$enable_introspection],
+-    [no], [dnl
+-        found_introspection="no (disabled, use --enable-introspection to enable)"
+-    ],dnl
+-    [yes],[dnl
+-        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
+-                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
+-        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
+-                         found_introspection=yes,
+-                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
+-    ],dnl
+-    [auto],[dnl
+-        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
+-	dnl Canonicalize enable_introspection
+-	enable_introspection=$found_introspection
+-    ],dnl
+-    [dnl	
+-        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
+-    ])dnl
+-
+-    AC_MSG_RESULT([$found_introspection])
+-
+-    INTROSPECTION_SCANNER=
+-    INTROSPECTION_COMPILER=
+-    INTROSPECTION_GENERATE=
+-    INTROSPECTION_GIRDIR=
+-    INTROSPECTION_TYPELIBDIR=
+-    if test "x$found_introspection" = "xyes"; then
+-       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+-       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+-       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+-       INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+-       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+-       INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+-       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+-       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+-    fi
+-    AC_SUBST(INTROSPECTION_SCANNER)
+-    AC_SUBST(INTROSPECTION_COMPILER)
+-    AC_SUBST(INTROSPECTION_GENERATE)
+-    AC_SUBST(INTROSPECTION_GIRDIR)
+-    AC_SUBST(INTROSPECTION_TYPELIBDIR)
+-    AC_SUBST(INTROSPECTION_CFLAGS)
+-    AC_SUBST(INTROSPECTION_LIBS)
+-    AC_SUBST(INTROSPECTION_MAKEFILE)
+-
+-    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
+-])
+-
+-
+-dnl Usage:
+-dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
+-
+-AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
+-[
+-  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
+-])
+-
+-dnl Usage:
+-dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
+-
+-
+-AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
+-[
+-  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
+-])
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb b/yocto-poky/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
index 40f3243..84e49c1 100644
--- a/yocto-poky/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
+++ b/yocto-poky/meta/recipes-gnome/gtk-doc-stub/gtk-doc-stub_git.bb
@@ -4,16 +4,29 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-PROVIDES = "gtk-doc gobject-introspection-stub"
+PROVIDES = "gtk-doc"
 
 SRCREV = "1dea266593edb766d6d898c79451ef193eb17cfa"
 PV = "1.1+git${SRCPV}"
 
-SRC_URI = "git://git.gnome.org/${BPN}"
+SRC_URI = "git://git.gnome.org/${BPN} \
+	   file://0001-Revert-Import-introspection-stub-machinery-too.patch \
+	  "
 
 S = "${WORKDIR}/git"
 
-inherit autotools
+do_configure() {
+	./configure --prefix=${prefix} \
+                    --sysconfdir=${sysconfdir} \
+                    --bindir=${bindir} \
+                    --libdir=${libdir} \
+                    --datadir=${datadir} \
+                    --datarootdir=${datadir}
+}
+
+do_install() {
+	oe_runmake install DESTDIR="${D}"
+}
 
 FILES_${PN} += "${datadir}"
 
diff --git a/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb b/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb
index 7c3a87e..c0ac911 100644
--- a/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb
+++ b/yocto-poky/meta/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb
@@ -24,7 +24,6 @@
 
 FILES_${PN} = ""
 FILES_${PN}-dev += "${libdir}/gtk-2.0/*/engines/*.la"
-FILES_${PN}-dbg += "${libdir}/gtk-2.0/*/engines/.debug"
 FILES_${PN}-schemas = "${datadir}/gtk-engines/*.xml"
 
 CFLAGS_prepend = "-DHAVE_ANIMATION "
@@ -37,6 +36,10 @@
 inherit distro_features_check
 ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
 
+# This picks stable releases in the 2.x series (but not 2.90 onwards,
+# which were GNOME 3 betas).
+UPSTREAM_CHECK_REGEX = "(?P<pver>2\.([0-8]*[02468])+(\.\d+)+)"
+
 python populate_packages_prepend() {
     engines_root = os.path.join(d.getVar('libdir', True), "gtk-2.0/2.10.0/engines")
     themes_root = os.path.join(d.getVar('datadir', True), "themes")
diff --git a/yocto-poky/meta/recipes-gnome/gtk-theme-torturer/gtk-theme-torturer_git.bb b/yocto-poky/meta/recipes-gnome/gtk-theme-torturer/gtk-theme-torturer_git.bb
deleted file mode 100644
index b67806d..0000000
--- a/yocto-poky/meta/recipes-gnome/gtk-theme-torturer/gtk-theme-torturer_git.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "GTK+ Theme benchmark program"
-DEPENDS = "gtk+"
-HOMEPAGE = "http://wiki.laptop.org/go/GTK_for_OLPC"
-SECTION = "devel"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://appwindow.c;endline=13;md5=8c09920de460c7ea1f64ee56986aabd9"
-
-SRCREV = "99962ae39bb5aadb31929b25c58e1a053f9c9545"
-PV = "0.0.0+git${SRCPV}"
-
-SRC_URI = "git://dev.laptop.org/projects/soc-gtk/"
-S = "${WORKDIR}/git/gtk-theme-torturer"
-
-CFLAGS += "-Wl,-rpath-link,${STAGING_LIBDIR}"
-
-inherit distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 torturer ${D}${bindir}
-}
-
-
diff --git a/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.0.4.bb b/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.0.4.bb
index 4908ac0..3ce38ce 100644
--- a/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.0.4.bb
+++ b/yocto-poky/meta/recipes-gnome/json-glib/json-glib_1.0.4.bb
@@ -13,6 +13,6 @@
 SRC_URI[archive.md5sum] = "3131b0417ecde3da1ae72acceaa375cf"
 SRC_URI[archive.sha256sum] = "80f3593cb6bd13f1465828e46a9f740e2e9bd3cd2257889442b3e62bd6de05cd"
 
-inherit gnomebase gettext lib_package
+inherit gnomebase gettext lib_package gobject-introspection
 
 BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-gnome/libffi/libffi/fix-libffi.la-location.patch b/yocto-poky/meta/recipes-gnome/libffi/libffi/fix-libffi.la-location.patch
deleted file mode 100644
index 775bffc..0000000
--- a/yocto-poky/meta/recipes-gnome/libffi/libffi/fix-libffi.la-location.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: libffi-3.0.13/Makefile.am
-===================================================================
---- libffi-3.0.13.orig/Makefile.am
-+++ libffi-3.0.13/Makefile.am
-@@ -98,7 +98,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS)
- 
- MAKEOVERRIDES=
- 
--toolexeclib_LTLIBRARIES = libffi.la
-+lib_LTLIBRARIES = libffi.la
- noinst_LTLIBRARIES = libffi_convenience.la
- 
- libffi_la_SOURCES = src/prep_cif.c src/types.c \
diff --git a/yocto-poky/meta/recipes-gnome/libffi/libffi_3.2.1.bb b/yocto-poky/meta/recipes-gnome/libffi/libffi_3.2.1.bb
deleted file mode 100644
index fd916ca..0000000
--- a/yocto-poky/meta/recipes-gnome/libffi/libffi_3.2.1.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-SUMMARY = "A portable foreign function interface library"
-DESCRIPTION = "The `libffi' library provides a portable, high level programming interface to various calling \
-conventions.  This allows a programmer to call any function specified by a call interface description at run \
-time. FFI stands for Foreign Function Interface.  A foreign function interface is the popular name for the \
-interface that allows code written in one language to call code written in another language.  The `libffi' \
-library really only provides the lowest, machine dependent layer of a fully featured foreign function interface.  \
-A layer must exist above `libffi' that handles type conversions for values passed between the two languages."
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
-
-SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
-           file://fix-libffi.la-location.patch \
-	   file://0001-mips-Use-compiler-internal-define-for-linux.patch \
-	   "
-
-SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43"
-SRC_URI[sha256sum] = "d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37"
-
-EXTRA_OECONF += "--disable-builddir"
-
-inherit autotools texinfo
-
-FILES_${PN}-dev += "${libdir}/libffi-${PV}"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-gnome/libgudev/libgudev_230.bb b/yocto-poky/meta/recipes-gnome/libgudev/libgudev_230.bb
new file mode 100644
index 0000000..6a10502
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/libgudev/libgudev_230.bb
@@ -0,0 +1,14 @@
+SUMMARY = "GObject wrapper for libudev"
+
+SRC_URI[archive.md5sum] = "e4dee8f3f349e9372213d33887819a4d"
+SRC_URI[archive.sha256sum] = "a2e77faced0c66d7498403adefcc0707105e03db71a2b2abd620025b86347c18"
+
+DEPENDS = "glib-2.0 udev"
+
+RCONFLICTS_${PN} = "systemd (<= 220)"
+
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+inherit gnomebase gobject-introspection
+
diff --git a/yocto-poky/meta/recipes-gnome/libnotify/libnotify_0.7.6.bb b/yocto-poky/meta/recipes-gnome/libnotify/libnotify_0.7.6.bb
index 41d188c..ce8e5ae 100644
--- a/yocto-poky/meta/recipes-gnome/libnotify/libnotify_0.7.6.bb
+++ b/yocto-poky/meta/recipes-gnome/libnotify/libnotify_0.7.6.bb
@@ -5,7 +5,9 @@
 
 DEPENDS = "dbus gtk+3 dbus-glib"
 
-inherit gnomebase gtk-doc
+inherit gnomebase gtk-doc distro_features_check gobject-introspection
+# depends on gtk+3
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 
 SRC_URI[archive.md5sum] = "a4997019d08f46f3bf57b78e6f795a59"
 SRC_URI[archive.sha256sum] = "0ef61ca400d30e28217979bfa0e73a7406b19c32dd76150654ec5b2bdf47d837"
diff --git a/yocto-poky/meta/recipes-gnome/librsvg/librsvg/CVE-2015-7558_1.patch b/yocto-poky/meta/recipes-gnome/librsvg/librsvg/CVE-2015-7558_1.patch
deleted file mode 100644
index a3ba41f..0000000
--- a/yocto-poky/meta/recipes-gnome/librsvg/librsvg/CVE-2015-7558_1.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From d1c9191949747f6dcfd207831d15dd4ba00e31f2 Mon Sep 17 00:00:00 2001
-From: Benjamin Otte <otte@redhat.com>
-Date: Wed, 7 Oct 2015 05:31:08 +0200
-Subject: [PATCH] state: Store mask as reference
-
-Instead of immediately looking up the mask, store the reference and look
-it up on use.
-
-Upstream-status: Backport
-
-supporting patch
-https://git.gnome.org/browse/librsvg/commit/rsvg-styles.c?id=d1c9191949747f6dcfd207831d15dd4ba00e31f2
-
-CVE: CVE-2015-7558
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- rsvg-cairo-draw.c |  6 +++++-
- rsvg-mask.c       | 17 -----------------
- rsvg-mask.h       |  2 --
- rsvg-styles.c     | 12 ++++++++----
- rsvg-styles.h     |  2 +-
- 5 files changed, 14 insertions(+), 25 deletions(-)
-
-Index: librsvg-2.40.10/rsvg-cairo-draw.c
-===================================================================
---- librsvg-2.40.10.orig/rsvg-cairo-draw.c
-+++ librsvg-2.40.10/rsvg-cairo-draw.c
-@@ -825,7 +825,11 @@ rsvg_cairo_pop_render_stack (RsvgDrawing
-     cairo_set_operator (render->cr, state->comp_op);
- 
-     if (state->mask) {
--        rsvg_cairo_generate_mask (render->cr, state->mask, ctx, &render->bbox);
-+        RsvgNode *mask;
-+
-+        mask = rsvg_defs_lookup (ctx->defs, state->mask);
-+        if (mask && RSVG_NODE_TYPE (mask) == RSVG_NODE_TYPE_MASK)
-+          rsvg_cairo_generate_mask (render->cr, (RsvgMask *) mask, ctx, &render->bbox);
-     } else if (state->opacity != 0xFF)
-         cairo_paint_with_alpha (render->cr, (double) state->opacity / 255.0);
-     else
-Index: librsvg-2.40.10/rsvg-mask.c
-===================================================================
---- librsvg-2.40.10.orig/rsvg-mask.c
-+++ librsvg-2.40.10/rsvg-mask.c
-@@ -103,23 +103,6 @@ rsvg_get_url_string (const char *str)
- }
- 
- RsvgNode *
--rsvg_mask_parse (const RsvgDefs * defs, const char *str)
--{
--    char *name;
--
--    name = rsvg_get_url_string (str);
--    if (name) {
--        RsvgNode *val;
--        val = rsvg_defs_lookup (defs, name);
--        g_free (name);
--
--        if (val && RSVG_NODE_TYPE (val) == RSVG_NODE_TYPE_MASK)
--            return val;
--    }
--    return NULL;
--}
--
--RsvgNode *
- rsvg_clip_path_parse (const RsvgDefs * defs, const char *str)
- {
-     char *name;
-Index: librsvg-2.40.10/rsvg-mask.h
-===================================================================
---- librsvg-2.40.10.orig/rsvg-mask.h
-+++ librsvg-2.40.10/rsvg-mask.h
-@@ -48,8 +48,6 @@ struct _RsvgMask {
- 
- G_GNUC_INTERNAL
- RsvgNode *rsvg_new_mask	    (void);
--G_GNUC_INTERNAL
--RsvgNode *rsvg_mask_parse   (const RsvgDefs * defs, const char *str);
- 
- typedef struct _RsvgClipPath RsvgClipPath;
- 
-Index: librsvg-2.40.10/rsvg-styles.c
-===================================================================
---- librsvg-2.40.10.orig/rsvg-styles.c
-+++ librsvg-2.40.10/rsvg-styles.c
-@@ -221,6 +221,7 @@ rsvg_state_clone (RsvgState * dst, const
- 
-     *dst = *src;
-     dst->parent = parent;
-+    dst->mask = g_strdup (src->mask);
-     dst->font_family = g_strdup (src->font_family);
-     dst->lang = g_strdup (src->lang);
-     rsvg_paint_server_ref (dst->fill);
-@@ -356,7 +357,8 @@ rsvg_state_inherit_run (RsvgState * dst,
- 
-     if (inherituninheritables) {
-         dst->clip_path_ref = src->clip_path_ref;
--        dst->mask = src->mask;
-+        g_free (dst->mask);
-+        dst->mask = g_strdup (src->mask);
-         dst->enable_background = src->enable_background;
-         dst->adobe_blend = src->adobe_blend;
-         dst->opacity = src->opacity;
-@@ -444,6 +446,7 @@ rsvg_state_inherit (RsvgState * dst, con
- void
- rsvg_state_finalize (RsvgState * state)
- {
-+    g_free (state->mask);
-     g_free (state->font_family);
-     g_free (state->lang);
-     rsvg_paint_server_unref (state->fill);
-@@ -517,9 +520,10 @@ rsvg_parse_style_pair (RsvgHandle * ctx,
-             state->adobe_blend = 11;
-         else
-             state->adobe_blend = 0;
--    } else if (g_str_equal (name, "mask"))
--        state->mask = rsvg_mask_parse (ctx->priv->defs, value);
--    else if (g_str_equal (name, "clip-path")) {
-+    } else if (g_str_equal (name, "mask")) {
-+        g_free (state->mask);
-+        state->mask = rsvg_get_url_string (value);
-+    } else if (g_str_equal (name, "clip-path")) {
-         state->clip_path_ref = rsvg_clip_path_parse (ctx->priv->defs, value);
-     } else if (g_str_equal (name, "overflow")) {
-         if (!g_str_equal (value, "inherit")) {
-Index: librsvg-2.40.10/rsvg-styles.h
-===================================================================
---- librsvg-2.40.10.orig/rsvg-styles.h
-+++ librsvg-2.40.10/rsvg-styles.h
-@@ -80,7 +80,7 @@ struct _RsvgState {
-     cairo_matrix_t personal_affine;
- 
-     RsvgFilter *filter;
--    void *mask;
-+    char *mask;
-     void *clip_path_ref;
-     guint8 adobe_blend;         /* 0..11 */
-     guint8 opacity;             /* 0..255 */
diff --git a/yocto-poky/meta/recipes-gnome/librsvg/librsvg/CVE-2015-7558_2.patch b/yocto-poky/meta/recipes-gnome/librsvg/librsvg/CVE-2015-7558_2.patch
deleted file mode 100644
index 9f6820e..0000000
--- a/yocto-poky/meta/recipes-gnome/librsvg/librsvg/CVE-2015-7558_2.patch
+++ /dev/null
@@ -1,230 +0,0 @@
-From 6cfaab12c70cd4a34c4730837f1ecdf792593c90 Mon Sep 17 00:00:00 2001
-From: Benjamin Otte <otte@redhat.com>
-Date: Wed, 7 Oct 2015 07:57:39 +0200
-Subject: [PATCH] state: Look up clip path lazily
-
-Upstream-status: Backport
-
-supporting patch
-https://git.gnome.org/browse/librsvg/commit/rsvg-styles.c?id=6cfaab12c70cd4a34c4730837f1ecdf792593c90
-
-CVE: CVE-2015-7558
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- rsvg-cairo-draw.c | 56 +++++++++++++++++++++++++++++++++----------------------
- rsvg-mask.c       | 17 -----------------
- rsvg-mask.h       |  2 --
- rsvg-styles.c     | 10 +++++++---
- rsvg-styles.h     |  2 +-
- 5 files changed, 42 insertions(+), 45 deletions(-)
-
-Index: librsvg-2.40.10/rsvg-cairo-draw.c
-===================================================================
---- librsvg-2.40.10.orig/rsvg-cairo-draw.c
-+++ librsvg-2.40.10/rsvg-cairo-draw.c
-@@ -461,7 +461,7 @@ rsvg_cairo_render_path (RsvgDrawingCtx *
-         return;
- 
-     need_tmpbuf = ((state->fill != NULL) && (state->stroke != NULL) && state->opacity != 0xff)
--        || state->clip_path_ref || state->mask || state->filter
-+        || state->clip_path || state->mask || state->filter
-         || (state->comp_op != CAIRO_OPERATOR_OVER);
- 
-     if (need_tmpbuf)
-@@ -708,18 +708,6 @@ rsvg_cairo_generate_mask (cairo_t * cr,
- }
- 
- static void
--rsvg_cairo_push_early_clips (RsvgDrawingCtx * ctx)
--{
--    RsvgCairoRender *render = RSVG_CAIRO_RENDER (ctx->render);
--  
--    cairo_save (render->cr);
--    if (rsvg_current_state (ctx)->clip_path_ref)
--        if (((RsvgClipPath *) rsvg_current_state (ctx)->clip_path_ref)->units == userSpaceOnUse)
--            rsvg_cairo_clip (ctx, rsvg_current_state (ctx)->clip_path_ref, NULL);
--
--}
--
--static void
- rsvg_cairo_push_render_stack (RsvgDrawingCtx * ctx)
- {
-     /* XXX: Untested, probably needs help wrt filters */
-@@ -731,9 +719,27 @@ rsvg_cairo_push_render_stack (RsvgDrawin
-     RsvgState *state = rsvg_current_state (ctx);
-     gboolean lateclip = FALSE;
- 
--    if (rsvg_current_state (ctx)->clip_path_ref)
--        if (((RsvgClipPath *) rsvg_current_state (ctx)->clip_path_ref)->units == objectBoundingBox)
--            lateclip = TRUE;
-+    if (rsvg_current_state (ctx)->clip_path) {
-+        RsvgNode *node;
-+        node = rsvg_defs_lookup (ctx->defs, rsvg_current_state (ctx)->clip_path);
-+        if (node && RSVG_NODE_TYPE (node) == RSVG_NODE_TYPE_CLIP_PATH) {
-+            RsvgClipPath *clip_path = (RsvgClipPath *) node;
-+
-+            switch (clip_path->units) {
-+            case userSpaceOnUse:
-+                rsvg_cairo_clip (ctx, clip_path, NULL);
-+                break;
-+            case objectBoundingBox:
-+                lateclip = TRUE;
-+                break;
-+
-+            default:
-+                g_assert_not_reached ();
-+                break;
-+            }
-+
-+        }
-+    }
- 
-     if (state->opacity == 0xFF
-         && !state->filter && !state->mask && !lateclip && (state->comp_op == CAIRO_OPERATOR_OVER)
-@@ -774,7 +780,9 @@ rsvg_cairo_push_render_stack (RsvgDrawin
- void
- rsvg_cairo_push_discrete_layer (RsvgDrawingCtx * ctx)
- {
--    rsvg_cairo_push_early_clips (ctx);
-+    RsvgCairoRender *render = RSVG_CAIRO_RENDER (ctx->render);
-+
-+    cairo_save (render->cr);
-     rsvg_cairo_push_render_stack (ctx);
- }
- 
-@@ -783,14 +791,18 @@ rsvg_cairo_pop_render_stack (RsvgDrawing
- {
-     RsvgCairoRender *render = RSVG_CAIRO_RENDER (ctx->render);
-     cairo_t *child_cr = render->cr;
--    gboolean lateclip = FALSE;
-+    RsvgClipPath *lateclip = NULL;
-     cairo_surface_t *surface = NULL;
-     RsvgState *state = rsvg_current_state (ctx);
-     gboolean nest;
- 
--    if (rsvg_current_state (ctx)->clip_path_ref)
--        if (((RsvgClipPath *) rsvg_current_state (ctx)->clip_path_ref)->units == objectBoundingBox)
--            lateclip = TRUE;
-+    if (rsvg_current_state (ctx)->clip_path) {
-+        RsvgNode *node;
-+        node = rsvg_defs_lookup (ctx->defs, rsvg_current_state (ctx)->clip_path);
-+        if (node && RSVG_NODE_TYPE (node) == RSVG_NODE_TYPE_CLIP_PATH
-+            && ((RsvgClipPath *) node)->units == objectBoundingBox)
-+            lateclip = (RsvgClipPath *) node;
-+    }
- 
-     if (state->opacity == 0xFF
-         && !state->filter && !state->mask && !lateclip && (state->comp_op == CAIRO_OPERATOR_OVER)
-@@ -820,7 +832,7 @@ rsvg_cairo_pop_render_stack (RsvgDrawing
-                               nest ? 0 : render->offset_y);
- 
-     if (lateclip)
--        rsvg_cairo_clip (ctx, rsvg_current_state (ctx)->clip_path_ref, &render->bbox);
-+        rsvg_cairo_clip (ctx, lateclip, &render->bbox);
- 
-     cairo_set_operator (render->cr, state->comp_op);
- 
-Index: librsvg-2.40.10/rsvg-mask.c
-===================================================================
---- librsvg-2.40.10.orig/rsvg-mask.c
-+++ librsvg-2.40.10/rsvg-mask.c
-@@ -102,23 +102,6 @@ rsvg_get_url_string (const char *str)
-     return NULL;
- }
- 
--RsvgNode *
--rsvg_clip_path_parse (const RsvgDefs * defs, const char *str)
--{
--    char *name;
--
--    name = rsvg_get_url_string (str);
--    if (name) {
--        RsvgNode *val;
--        val = rsvg_defs_lookup (defs, name);
--        g_free (name);
--
--        if (val && RSVG_NODE_TYPE (val) == RSVG_NODE_TYPE_CLIP_PATH)
--            return val;
--    }
--    return NULL;
--}
--
- static void
- rsvg_clip_path_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * atts)
- {
-Index: librsvg-2.40.10/rsvg-mask.h
-===================================================================
---- librsvg-2.40.10.orig/rsvg-mask.h
-+++ librsvg-2.40.10/rsvg-mask.h
-@@ -58,8 +58,6 @@ struct _RsvgClipPath {
- 
- G_GNUC_INTERNAL
- RsvgNode *rsvg_new_clip_path	(void);
--G_GNUC_INTERNAL
--RsvgNode *rsvg_clip_path_parse	(const RsvgDefs * defs, const char *str);
- 
- G_END_DECLS
- #endif
-Index: librsvg-2.40.10/rsvg-styles.c
-===================================================================
---- librsvg-2.40.10.orig/rsvg-styles.c
-+++ librsvg-2.40.10/rsvg-styles.c
-@@ -149,7 +149,7 @@ rsvg_state_init (RsvgState * state)
-     state->visible = TRUE;
-     state->cond_true = TRUE;
-     state->filter = NULL;
--    state->clip_path_ref = NULL;
-+    state->clip_path = NULL;
-     state->startMarker = NULL;
-     state->middleMarker = NULL;
-     state->endMarker = NULL;
-@@ -222,6 +222,7 @@ rsvg_state_clone (RsvgState * dst, const
-     *dst = *src;
-     dst->parent = parent;
-     dst->mask = g_strdup (src->mask);
-+    dst->clip_path = g_strdup (src->clip_path);
-     dst->font_family = g_strdup (src->font_family);
-     dst->lang = g_strdup (src->lang);
-     rsvg_paint_server_ref (dst->fill);
-@@ -356,7 +357,8 @@ rsvg_state_inherit_run (RsvgState * dst,
-     }
- 
-     if (inherituninheritables) {
--        dst->clip_path_ref = src->clip_path_ref;
-+        g_free (dst->clip_path);
-+        dst->clip_path = g_strdup (src->clip_path);
-         g_free (dst->mask);
-         dst->mask = g_strdup (src->mask);
-         dst->enable_background = src->enable_background;
-@@ -447,6 +449,7 @@ void
- rsvg_state_finalize (RsvgState * state)
- {
-     g_free (state->mask);
-+    g_free (state->clip_path);
-     g_free (state->font_family);
-     g_free (state->lang);
-     rsvg_paint_server_unref (state->fill);
-@@ -524,7 +527,8 @@ rsvg_parse_style_pair (RsvgHandle * ctx,
-         g_free (state->mask);
-         state->mask = rsvg_get_url_string (value);
-     } else if (g_str_equal (name, "clip-path")) {
--        state->clip_path_ref = rsvg_clip_path_parse (ctx->priv->defs, value);
-+        g_free (state->clip_path);
-+        state->clip_path = rsvg_get_url_string (value);
-     } else if (g_str_equal (name, "overflow")) {
-         if (!g_str_equal (value, "inherit")) {
-             state->overflow = rsvg_css_parse_overflow (value, &state->has_overflow);
-Index: librsvg-2.40.10/rsvg-styles.h
-===================================================================
---- librsvg-2.40.10.orig/rsvg-styles.h
-+++ librsvg-2.40.10/rsvg-styles.h
-@@ -81,7 +81,7 @@ struct _RsvgState {
- 
-     RsvgFilter *filter;
-     char *mask;
--    void *clip_path_ref;
-+    char *clip_path;
-     guint8 adobe_blend;         /* 0..11 */
-     guint8 opacity;             /* 0..255 */
- 
diff --git a/yocto-poky/meta/recipes-gnome/librsvg/librsvg/CVE-2015-7558_3.patch b/yocto-poky/meta/recipes-gnome/librsvg/librsvg/CVE-2015-7558_3.patch
deleted file mode 100644
index dd67ab7..0000000
--- a/yocto-poky/meta/recipes-gnome/librsvg/librsvg/CVE-2015-7558_3.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-From a51919f7e1ca9c535390a746fbf6e28c8402dc61 Mon Sep 17 00:00:00 2001
-From: Benjamin Otte <otte@redhat.com>
-Date: Wed, 7 Oct 2015 08:45:37 +0200
-Subject: [PATCH] rsvg: Add rsvg_acquire_node()
-
-This function does proper recursion checks when looking up resources
-from URLs and thereby helps avoiding infinite loops when cyclic
-references span multiple types of elements.
-
-Upstream-status: Backport
-
-https://git.gnome.org/browse/librsvg/commit/rsvg-styles.c?id=a51919f7e1ca9c535390a746fbf6e28c8402dc61
-
-CVE: CVE-2015-7558
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- rsvg-base.c         | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++
- rsvg-cairo-draw.c   | 15 +++++++++++----
- rsvg-cairo-render.c |  1 +
- rsvg-filter.c       |  9 +++++++--
- rsvg-private.h      |  5 +++++
- 5 files changed, 79 insertions(+), 6 deletions(-)
-
-Index: librsvg-2.40.10/rsvg-base.c
-===================================================================
---- librsvg-2.40.10.orig/rsvg-base.c
-+++ librsvg-2.40.10/rsvg-base.c
-@@ -1236,6 +1236,8 @@ rsvg_drawing_ctx_free (RsvgDrawingCtx *
- 	g_slist_free (handle->drawsub_stack);
- 
-     g_slist_free (handle->ptrs);
-+    g_warn_if_fail (handle->acquired_nodes == NULL);
-+    g_slist_free (handle->acquired_nodes);
- 	
-     if (handle->base_uri)
-         g_free (handle->base_uri);
-@@ -2018,6 +2020,59 @@ rsvg_push_discrete_layer (RsvgDrawingCtx
-     ctx->render->push_discrete_layer (ctx);
- }
- 
-+/*
-+ * rsvg_acquire_node:
-+ * @ctx: The drawing context in use
-+ * @url: The IRI to lookup
-+ *
-+ * Use this function when looking up urls to other nodes. This
-+ * function does proper recursion checking and thereby avoids
-+ * infinite loops.
-+ *
-+ * Nodes acquired by this function must be released using
-+ * rsvg_release_node() in reverse acquiring order.
-+ *
-+ * Returns: The node referenced by @url or %NULL if the @url
-+ *          does not reference a node.
-+ */
-+RsvgNode *
-+rsvg_acquire_node (RsvgDrawingCtx * ctx, const char *url)
-+{
-+  RsvgNode *node;
-+
-+  node = rsvg_defs_lookup (ctx->defs, url);
-+  if (node == NULL)
-+    return NULL;
-+
-+  if (g_slist_find (ctx->acquired_nodes, node))
-+    return NULL;
-+
-+  ctx->acquired_nodes = g_slist_prepend (ctx->acquired_nodes, node);
-+
-+  return node;
-+}
-+
-+/*
-+ * rsvg_release_node:
-+ * @ctx: The drawing context the node was acquired from
-+ * @node: Node to release
-+ *
-+ * Releases a node previously acquired via rsvg_acquire_node().
-+ *
-+ * if @node is %NULL, this function does nothing.
-+ */
-+void
-+rsvg_release_node (RsvgDrawingCtx * ctx, RsvgNode *node)
-+{
-+  if (node == NULL)
-+    return;
-+
-+  g_return_if_fail (ctx->acquired_nodes != NULL);
-+  g_return_if_fail (ctx->acquired_nodes->data == node);
-+
-+  ctx->acquired_nodes = g_slist_remove (ctx->acquired_nodes, node);
-+}
-+
- void
- rsvg_render_path (RsvgDrawingCtx * ctx, const cairo_path_t *path)
- {
-Index: librsvg-2.40.10/rsvg-cairo-draw.c
-===================================================================
---- librsvg-2.40.10.orig/rsvg-cairo-draw.c
-+++ librsvg-2.40.10/rsvg-cairo-draw.c
-@@ -721,7 +721,7 @@ rsvg_cairo_push_render_stack (RsvgDrawin
- 
-     if (rsvg_current_state (ctx)->clip_path) {
-         RsvgNode *node;
--        node = rsvg_defs_lookup (ctx->defs, rsvg_current_state (ctx)->clip_path);
-+        node = rsvg_acquire_node (ctx, rsvg_current_state (ctx)->clip_path);
-         if (node && RSVG_NODE_TYPE (node) == RSVG_NODE_TYPE_CLIP_PATH) {
-             RsvgClipPath *clip_path = (RsvgClipPath *) node;
- 
-@@ -739,6 +739,8 @@ rsvg_cairo_push_render_stack (RsvgDrawin
-             }
- 
-         }
-+        
-+        rsvg_release_node (ctx, node);
-     }
- 
-     if (state->opacity == 0xFF
-@@ -798,10 +800,12 @@ rsvg_cairo_pop_render_stack (RsvgDrawing
- 
-     if (rsvg_current_state (ctx)->clip_path) {
-         RsvgNode *node;
--        node = rsvg_defs_lookup (ctx->defs, rsvg_current_state (ctx)->clip_path);
-+        node = rsvg_acquire_node (ctx, rsvg_current_state (ctx)->clip_path);
-         if (node && RSVG_NODE_TYPE (node) == RSVG_NODE_TYPE_CLIP_PATH
-             && ((RsvgClipPath *) node)->units == objectBoundingBox)
-             lateclip = (RsvgClipPath *) node;
-+        else
-+            rsvg_release_node (ctx, node);
-     }
- 
-     if (state->opacity == 0xFF
-@@ -831,17 +835,20 @@ rsvg_cairo_pop_render_stack (RsvgDrawing
-                               nest ? 0 : render->offset_x,
-                               nest ? 0 : render->offset_y);
- 
--    if (lateclip)
-+    if (lateclip) {
-         rsvg_cairo_clip (ctx, lateclip, &render->bbox);
-+        rsvg_release_node (ctx, (RsvgNode *) lateclip);
-+    }
- 
-     cairo_set_operator (render->cr, state->comp_op);
- 
-     if (state->mask) {
-         RsvgNode *mask;
- 
--        mask = rsvg_defs_lookup (ctx->defs, state->mask);
-+        mask = rsvg_acquire_node (ctx, state->mask);
-         if (mask && RSVG_NODE_TYPE (mask) == RSVG_NODE_TYPE_MASK)
-           rsvg_cairo_generate_mask (render->cr, (RsvgMask *) mask, ctx, &render->bbox);
-+        rsvg_release_node (ctx, mask);
-     } else if (state->opacity != 0xFF)
-         cairo_paint_with_alpha (render->cr, (double) state->opacity / 255.0);
-     else
-Index: librsvg-2.40.10/rsvg-cairo-render.c
-===================================================================
---- librsvg-2.40.10.orig/rsvg-cairo-render.c
-+++ librsvg-2.40.10/rsvg-cairo-render.c
-@@ -155,6 +155,7 @@ rsvg_cairo_new_drawing_ctx (cairo_t * cr
-     draw->pango_context = NULL;
-     draw->drawsub_stack = NULL;
-     draw->ptrs = NULL;
-+    draw->acquired_nodes = NULL;
- 
-     rsvg_state_push (draw);
-     state = rsvg_current_state (draw);
-Index: librsvg-2.40.10/rsvg-filter.c
-===================================================================
---- librsvg-2.40.10.orig/rsvg-filter.c
-+++ librsvg-2.40.10/rsvg-filter.c
-@@ -3921,6 +3921,7 @@ rsvg_filter_primitive_image_render_in (R
-     RsvgDrawingCtx *ctx;
-     RsvgFilterPrimitiveImage *upself;
-     RsvgNode *drawable;
-+    cairo_surface_t *result;
- 
-     ctx = context->ctx;
- 
-@@ -3929,13 +3930,17 @@ rsvg_filter_primitive_image_render_in (R
-     if (!upself->href)
-         return NULL;
- 
--    drawable = rsvg_defs_lookup (ctx->defs, upself->href->str);
-+    drawable = rsvg_acquire_node (ctx, upself->href->str);
-     if (!drawable)
-         return NULL;
- 
-     rsvg_current_state (ctx)->affine = context->paffine;
- 
--    return rsvg_get_surface_of_node (ctx, drawable, context->width, context->height);
-+    result = rsvg_get_surface_of_node (ctx, drawable, context->width, context->height);
-+
-+    rsvg_release_node (ctx, drawable);
-+
-+    return result;
- }
- 
- static cairo_surface_t *
-Index: librsvg-2.40.10/rsvg-private.h
-===================================================================
---- librsvg-2.40.10.orig/rsvg-private.h
-+++ librsvg-2.40.10/rsvg-private.h
-@@ -200,6 +200,7 @@ struct RsvgDrawingCtx {
-     GSList *vb_stack;
-     GSList *drawsub_stack;
-     GSList *ptrs;
-+    GSList *acquired_nodes;
- };
- 
- /*Abstract base class for context for our backends (one as yet)*/
-@@ -360,6 +361,10 @@ void rsvg_pop_discrete_layer    (RsvgDra
- G_GNUC_INTERNAL
- void rsvg_push_discrete_layer   (RsvgDrawingCtx * ctx);
- G_GNUC_INTERNAL
-+RsvgNode *rsvg_acquire_node     (RsvgDrawingCtx * ctx, const char *url);
-+G_GNUC_INTERNAL
-+void rsvg_release_node          (RsvgDrawingCtx * ctx, RsvgNode *node);
-+G_GNUC_INTERNAL
- void rsvg_render_path           (RsvgDrawingCtx * ctx, const cairo_path_t *path);
- G_GNUC_INTERNAL
- void rsvg_render_surface        (RsvgDrawingCtx * ctx, cairo_surface_t *surface,
diff --git a/yocto-poky/meta/recipes-gnome/librsvg/librsvg/gtk-option.patch b/yocto-poky/meta/recipes-gnome/librsvg/librsvg/gtk-option.patch
index e6af481..6c23071 100644
--- a/yocto-poky/meta/recipes-gnome/librsvg/librsvg/gtk-option.patch
+++ b/yocto-poky/meta/recipes-gnome/librsvg/librsvg/gtk-option.patch
@@ -1,4 +1,4 @@
-From 1c38d570b33f2b036d4fa47e929bb2b3264e38bd Mon Sep 17 00:00:00 2001
+From 4e0ce3f22d45033a108cbacca3e5ec6728bd44f3 Mon Sep 17 00:00:00 2001
 From: Jussi Kukkonen <jussi.kukkonen@intel.com>
 Date: Tue, 11 Aug 2015 16:25:38 +0300
 Subject: [PATCH] configure: add option to enable/disable use of GTK+
@@ -10,19 +10,16 @@
 Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=712693]
 
 Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-Forward-ported to 2.40.10
-
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
 ---
  configure.ac | 17 +++++++++++------
  1 file changed, 11 insertions(+), 6 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index bf77f3a..ca77de8 100644
+index e61a952..c3aae84 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -128,17 +128,22 @@ AC_CHECK_FUNCS(strtok_r)
+@@ -130,17 +130,22 @@ AC_CHECK_FUNCS(strtok_r)
  # GTK
  # ===========================================================================
  
@@ -50,13 +47,13 @@
  
  dnl ===========================================================================
  dnl GDK-Pixbuf SVG loader
-@@ -289,6 +294,6 @@ librsvg-$VERSION
+@@ -298,6 +303,6 @@ librsvg-$VERSION
  	Build introspectable bindings:  ${found_introspection}
  	Build Vala bindings:            ${enable_vala}
  	Build GdkPixbuf loader:         ${enable_pixbuf_loader}
 -        GTK+ $GTK3_REQUIRED or later:           ${have_gtk_3}
 +        GTK+ $GTK3_REQUIRED or later:           ${with_gtk_3}
- 	Build miscellaenous tools:      ${build_misc_tools}
+ 	Build miscellaneous tools:      ${build_misc_tools}
  "
 -- 
 2.1.4
diff --git a/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.10.bb b/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.10.bb
deleted file mode 100644
index cb8a73c..0000000
--- a/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.10.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "Library for rendering SVG files"
-HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
-
-SECTION = "x11/utils"
-DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
-BBCLASSEXTEND = "native"
-
-inherit autotools pkgconfig gnomebase gtk-doc pixbufcache
-
-SRC_URI += "file://gtk-option.patch \
-            file://CVE-2015-7558_1.patch \
-            file://CVE-2015-7558_2.patch \
-            file://CVE-2015-7558_3.patch \
-            "
-
-SRC_URI[archive.md5sum] = "fadebe2e799ab159169ee3198415ff85"
-SRC_URI[archive.sha256sum] = "965c807438ce90b204e930ff80c92eba1606a2f6fd5ccfd09335c99896dd3479"
-
-CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
-
-EXTRA_OECONF = "--disable-introspection --disable-vala"
-
-# The older ld (2.22) on the host (Centos 6.5) doesn't have the
-# -Bsymbolic-functions option, we can disable it for native.
-EXTRA_OECONF_append_class-native = " --enable-Bsymbolic=auto"
-
-PACKAGECONFIG ??= "gdkpixbuf"
-# The gdk-pixbuf loader
-PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
-# GTK+ test application (rsvg-view)
-PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
-
-do_install_append() {
-	# Loadable modules don't need .a or .la on Linux
-	rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
-}
-
-PACKAGES =+ "librsvg-gtk rsvg"
-FILES_${PN} = "${libdir}/*.so.*"
-FILES_${PN}-dbg += "${libdir}/gdk-pixbuf-2.0/*/loaders/.debug"
-FILES_rsvg = "${bindir}/rsvg* \
-	      ${datadir}/pixmaps/svg-viewer.svg \
-	      ${datadir}/themes"
-FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so"
-
-PIXBUF_PACKAGES = "librsvg-gtk"
-
-PIXBUFCACHE_SYSROOT_DEPS_append_class-native = " harfbuzz-native:do_populate_sysroot_setscene pango-native:do_populate_sysroot_setscene icu-native:do_populate_sysroot_setscene"
diff --git a/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.13.bb b/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.13.bb
new file mode 100644
index 0000000..2ac52f7
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/librsvg/librsvg_2.40.13.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Library for rendering SVG files"
+HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/sources/librsvg/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://rsvg.h;beginline=3;endline=24;md5=20b4113c4909bbf0d67e006778302bc6"
+
+SECTION = "x11/utils"
+DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango"
+BBCLASSEXTEND = "native"
+
+inherit autotools pkgconfig gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection
+
+SRC_URI += "file://gtk-option.patch"
+
+SRC_URI[archive.md5sum] = "ad03780e12c56e52474d8edf86976c73"
+SRC_URI[archive.sha256sum] = "4d6ea93ec05f5dabe7262d711d246a0a99b2311e215360dd3dcabd6afe3b9804"
+
+CACHED_CONFIGUREVARS = "ac_cv_path_GDK_PIXBUF_QUERYLOADERS=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders"
+
+# The older ld (2.22) on the host (Centos 6.5) doesn't have the
+# -Bsymbolic-functions option, we can disable it for native.
+EXTRA_OECONF_append_class-native = " --enable-Bsymbolic=auto"
+
+PACKAGECONFIG ??= "gdkpixbuf"
+# The gdk-pixbuf loader
+PACKAGECONFIG[gdkpixbuf] = "--enable-pixbuf-loader,--disable-pixbuf-loader,gdk-pixbuf-native"
+# GTK+ test application (rsvg-view)
+PACKAGECONFIG[gtk] = "--with-gtk3,--without-gtk3,gtk+3"
+
+do_install_append() {
+	# Loadable modules don't need .a or .la on Linux
+	rm -f ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.a ${D}${libdir}/gdk-pixbuf-2.0/*/loaders/*.la
+}
+
+PACKAGES =+ "librsvg-gtk rsvg"
+FILES_rsvg = "${bindir}/rsvg* \
+	      ${datadir}/pixmaps/svg-viewer.svg \
+	      ${datadir}/themes"
+FILES_librsvg-gtk = "${libdir}/gdk-pixbuf-2.0/*/*/*.so"
+
+PIXBUF_PACKAGES = "librsvg-gtk"
+
+PIXBUFCACHE_SYSROOT_DEPS_append_class-native = " harfbuzz-native:do_populate_sysroot_setscene pango-native:do_populate_sysroot_setscene icu-native:do_populate_sysroot_setscene"
diff --git a/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.2.bb b/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.2.bb
deleted file mode 100644
index 8fc0018..0000000
--- a/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.2.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "libsecret is a library for storing and retrieving passwords and other secrets"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6"
-
-inherit gnomebase gtk-doc
-
-DEPENDS = "glib-2.0 libgcrypt gettext-native"
-
-EXTRA_OECONF += "--disable-manpages"
-
-SRC_URI[archive.md5sum] = "23cdf8267d11a26f88f0dbec1e2022ad"
-SRC_URI[archive.sha256sum] = "12fd288b012e1b2b1b54d586cd4c6507885715534644b4534b7ef7d7079ba443"
-
-# http://errors.yoctoproject.org/Errors/Details/20228/
-ARM_INSTRUCTION_SET = "arm"
diff --git a/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.4.bb b/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.4.bb
new file mode 100644
index 0000000..beaaba0
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/libsecret/libsecret_0.18.4.bb
@@ -0,0 +1,25 @@
+SUMMARY = "libsecret is a library for storing and retrieving passwords and other secrets"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6"
+
+inherit gnomebase gtk-doc vala gobject-introspection
+
+DEPENDS += "glib-2.0 libgcrypt gettext-native intltool-native"
+
+EXTRA_OECONF += "--disable-manpages"
+
+SRC_URI[archive.md5sum] = "5190da1ee686437046bc10068f120d1d"
+SRC_URI[archive.sha256sum] = "0f29b51698198e6999c91f4adce3119c8c457f546b133a85baea5ea9010a19ed"
+
+# http://errors.yoctoproject.org/Errors/Details/20228/
+ARM_INSTRUCTION_SET = "arm"
+
+# vapigen.m4 bundled with the tarball does not yet have our cross-compilation fixes
+do_configure_prepend() {
+    rm -f ${S}/build/m4/vapigen.m4
+}
+
+# Secret-1: poky/build-mips64/tmp/work/mips64-poky-linux/libgpg-error/1.19-r0/libgpg-error-1.19/src/posix-lock.c:119: get_lock_object: Assertion `!"sizeof lock obj"' failed.
+# qemu: uncaught target signal 6 (Aborted) - core dumped
+EXTRA_OECONF_append_mips64 = " --disable-introspection"
+
diff --git a/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.14.0.bb b/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.14.0.bb
deleted file mode 100644
index 3ee1ae9..0000000
--- a/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.14.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Window navigation construction toolkit"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-BPN = "libwnck"
-
-SECTION = "x11/libs"
-DEPENDS = "gobject-introspection-stub gtk+3 gdk-pixbuf-native libxres"
-
-PACKAGECONFIG ??= "startup-notification"
-PACKAGECONFIG[startup-notification] = "--enable-startup-notification,--disable-startup-notification,startup-notification"
-
-inherit gnomebase
-SRC_URI[archive.md5sum] = "4538672e0d775fadedf10abeb8020047"
-SRC_URI[archive.sha256sum] = "f5080076346609b4c36394b879f3a86b92ced3b90a37cb54c8e9a14f00e7921c"
-
-inherit distro_features_check
-# libxres means x11 only
-REQUIRED_DISTRO_FEATURES = "x11"
-
diff --git a/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.14.1.bb b/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.14.1.bb
new file mode 100644
index 0000000..495894b
--- /dev/null
+++ b/yocto-poky/meta/recipes-gnome/libwnck/libwnck3_3.14.1.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Window navigation construction toolkit"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+BPN = "libwnck"
+
+SECTION = "x11/libs"
+DEPENDS = "gtk+3 gdk-pixbuf-native libxres"
+
+PACKAGECONFIG ??= "startup-notification"
+PACKAGECONFIG[startup-notification] = "--enable-startup-notification,--disable-startup-notification,startup-notification"
+
+inherit gnomebase gobject-introspection
+SRC_URI[archive.md5sum] = "d96c0b74c4dc5fdae758964098603c90"
+SRC_URI[archive.sha256sum] = "bb643c9c423c8aa79c59973ce27ce91d3b180d1e9907902278fb79391f52befa"
+
+inherit distro_features_check
+# libxres means x11 only
+REQUIRED_DISTRO_FEATURES = "x11"
+
diff --git a/yocto-poky/meta/recipes-graphics/builder/builder_0.1.bb b/yocto-poky/meta/recipes-graphics/builder/builder_0.1.bb
index bb729fc..0a64c31 100644
--- a/yocto-poky/meta/recipes-graphics/builder/builder_0.1.bb
+++ b/yocto-poky/meta/recipes-graphics/builder/builder_0.1.bb
@@ -3,10 +3,9 @@
 SECTION = "x11"
 PR = "r6"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://builder_hob_start.sh;endline=5;md5=84796c3c41785d86100fdabcbdade00e"
+LIC_FILES_CHKSUM = "file://builder_session.sh;endline=5;md5=84796c3c41785d86100fdabcbdade00e"
 
-SRC_URI = "file://builder_hob_start.sh \
-           file://please_wait_dialog.py \
+SRC_URI = "file://builder_session.sh \
           "
 
 S = "${WORKDIR}"
@@ -25,9 +24,8 @@
 
 do_install () {
 	install -d -m 755 ${D}${sysconfdir}/mini_x/session.d
-	install -p -m 755 builder_hob_start.sh ${D}${sysconfdir}/mini_x/session.d/
+	install -p -m 755 builder_session.sh ${D}${sysconfdir}/mini_x/session.d/
 
-	chown  builder.builder ${D}${sysconfdir}/mini_x/session.d/builder_hob_start.sh
-        install -p -m 755 please_wait_dialog.py ${D}${sysconfdir}/mini_x
+	chown  builder.builder ${D}${sysconfdir}/mini_x/session.d/builder_session.sh
 }
 
diff --git a/yocto-poky/meta/recipes-graphics/builder/files/builder_hob_start.sh b/yocto-poky/meta/recipes-graphics/builder/files/builder_hob_start.sh
deleted file mode 100644
index b394b09..0000000
--- a/yocto-poky/meta/recipes-graphics/builder/files/builder_hob_start.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/sh
-#This script will be called via mini X session on behalf of file owner, after
-#installed in /etc/mini_x/session.d/. Any auto start jobs including X apps can
-#be put here
-
-# start hob here
-export PSEUDO_PREFIX=/usr
-export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo
-export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64
-export GIT_PROXY_COMMAND=/home/builder/poky/scripts/oe-git-proxy
-
-#start pcmanfm in daemon mode to allow asynchronous launch
-pcmanfm -d&
-
-#register handlers for some file types
-if [ ! -d /home/builder/.local/share/applications ]; then
-    mkdir -p /home/builder/.local/share/applications/
-    #register folders to open with PCManFM filemanager
-    xdg-mime default pcmanfm.desktop inode/directory
-
-    #register html links and files with epiphany
-    xdg-mime default epiphany.desktop x-scheme-handler/http
-    xdg-mime default epiphany.desktop x-scheme-handler/https
-    xdg-mime default epiphany.desktop text/html
-
-    #register text files with leafpad text editor
-    xdg-mime default leafpad.desktop text/plain
-fi
-
-cd /home/builder/poky
-. ./oe-init-build-env
-
-hob &
-
-matchbox-terminal&
-
-/etc/mini_x/please_wait_dialog.py &
diff --git a/yocto-poky/meta/recipes-graphics/builder/files/builder_session.sh b/yocto-poky/meta/recipes-graphics/builder/files/builder_session.sh
new file mode 100644
index 0000000..001a033
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/builder/files/builder_session.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+#This script will be called via mini X session on behalf of file owner, after
+#installed in /etc/mini_x/session.d/. Any auto start jobs including X apps can
+#be put here
+
+# start hob here
+export PSEUDO_PREFIX=/usr
+export PSEUDO_LOCALSTATEDIR=/home/builder/pseudo
+export PSEUDO_LIBDIR=/usr/lib/pseudo/lib64
+export GIT_PROXY_COMMAND=/home/builder/poky/scripts/oe-git-proxy
+
+#start pcmanfm in daemon mode to allow asynchronous launch
+pcmanfm -d&
+
+#register handlers for some file types
+if [ ! -d /home/builder/.local/share/applications ]; then
+    mkdir -p /home/builder/.local/share/applications/
+    #register folders to open with PCManFM filemanager
+    xdg-mime default pcmanfm.desktop inode/directory
+
+    #register html links and files with epiphany
+    xdg-mime default epiphany.desktop x-scheme-handler/http
+    xdg-mime default epiphany.desktop x-scheme-handler/https
+    xdg-mime default epiphany.desktop text/html
+
+    #register text files with leafpad text editor
+    xdg-mime default leafpad.desktop text/plain
+fi
+
+cd /home/builder/poky
+. ./oe-init-build-env
+
+matchbox-terminal&
diff --git a/yocto-poky/meta/recipes-graphics/builder/files/please_wait_dialog.py b/yocto-poky/meta/recipes-graphics/builder/files/please_wait_dialog.py
deleted file mode 100644
index fd2381b..0000000
--- a/yocto-poky/meta/recipes-graphics/builder/files/please_wait_dialog.py
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env python
-import glib
-import gtk
- 
-def destroy_window_cb(widget, event):
-    gtk.main_quit()
- 
-def all_done_cb():
-    gtk.main_quit()
- 
-def dialogue_ui():
-    window = gtk.Window()
-    window.set_title("Please wait...")
-    window.connect("delete-event", destroy_window_cb)
-    window.show()
-    window.set_border_width(12)
- 
-    msg = "Please wait while BitBake initializes Hob"
-    label = gtk.Label(msg)
-    label.show()
-    window.add(label)
- 
-    glib.timeout_add_seconds(10, all_done_cb)
- 
-if __name__ == "__main__":
-    dialogue_ui()
-    gtk.main()
-
diff --git a/yocto-poky/meta/recipes-graphics/cairo/cairo.inc b/yocto-poky/meta/recipes-graphics/cairo/cairo.inc
index 45651ba..c7e686d 100644
--- a/yocto-poky/meta/recipes-graphics/cairo/cairo.inc
+++ b/yocto-poky/meta/recipes-graphics/cairo/cairo.inc
@@ -44,5 +44,3 @@
 export ac_cv_lib_lzo2_lzo2a_decompress="no"
 
 BBCLASSEXTEND = "native"
-
-CFLAGS += "-ffat-lto-objects"
diff --git a/yocto-poky/meta/recipes-graphics/cairo/cairo/Manually-transpose-the-matrix-in-_cairo_gl_shader_bi.patch b/yocto-poky/meta/recipes-graphics/cairo/cairo/Manually-transpose-the-matrix-in-_cairo_gl_shader_bi.patch
deleted file mode 100644
index 955b7d4..0000000
--- a/yocto-poky/meta/recipes-graphics/cairo/cairo/Manually-transpose-the-matrix-in-_cairo_gl_shader_bi.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-Upstream-Status: Backport
-
-  http://lists.cairographics.org/archives/cairo/2015-May/026253.html
-  http://cgit.freedesktop.org/cairo/commit/?id=f52f0e2feb1ad0a4de23c475a8c020d41a1764a8
-
-Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
-
-
-From f52f0e2feb1ad0a4de23c475a8c020d41a1764a8 Mon Sep 17 00:00:00 2001
-From: Zan Dobersek <zdobersek@igalia.com>
-Date: Fri, 8 May 2015 01:50:25 -0700
-Subject: [PATCH] Manually transpose the matrix in _cairo_gl_shader_bind_matrix()
-
-To maintain compatibility with OpenGL ES 2.0, the matrix in
-_cairo_gl_shader_bind_matrix() should be manually transposed,
-and GL_FALSE passed as the transpose argument to the
-glUniformMatrix3fv() call as it is the only valid value for
-that parameter in OpenGL ES 2.0.
-
-Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
-Acked-by: "Henry (Yu) Song" <henry.song@samsung.com>
----
- src/cairo-gl-shaders.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/src/cairo-gl-shaders.c b/src/cairo-gl-shaders.c
-index 2710606..fe975d2 100644
---- a/src/cairo-gl-shaders.c
-+++ b/src/cairo-gl-shaders.c
-@@ -973,12 +973,12 @@ _cairo_gl_shader_bind_matrix (cairo_gl_context_t *ctx,
- {
-     cairo_gl_dispatch_t *dispatch = &ctx->dispatch;
-     float gl_m[9] = {
--	m->xx, m->xy, m->x0,
--	m->yx, m->yy, m->y0,
--	0,     0,     1
-+	m->xx, m->yx, 0,
-+	m->xy, m->yy, 0,
-+	m->x0, m->y0, 1
-     };
-     assert (location != -1);
--    dispatch->UniformMatrix3fv (location, 1, GL_TRUE, gl_m);
-+    dispatch->UniformMatrix3fv (location, 1, GL_FALSE, gl_m);
- }
- 
- void
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.2.bb b/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.2.bb
deleted file mode 100644
index 75cde0a..0000000
--- a/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.2.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-require cairo.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
-
-SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz"
-SRC_URI += "file://Manually-transpose-the-matrix-in-_cairo_gl_shader_bi.patch"
-
-SRC_URI[md5sum] = "e1cdfaf1c6c995c4d4c54e07215b0118"
-SRC_URI[sha256sum] = "c919d999ddb1bbbecd4bbe65299ca2abd2079c7e13d224577895afa7005ecceb"
-
-PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
-
-SUMMARY_${PN} = "The Cairo 2D vector graphics library"
-DESCRIPTION_${PN} = "Cairo is a multi-platform library providing anti-aliased \
-vector-based rendering for multiple target backends. Paths consist \
-of line segments and cubic splines and can be rendered at any width \
-with various join and cap styles. All colors may be specified with \
-optional translucence (opacity/alpha) and combined using the \
-extended Porter/Duff compositing algebra as found in the X Render \
-Extension."
-
-SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
-DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."
-
-SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter"
-DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \
-CairoScript.  CairoScript is used by tracing utilities to enable the ability \
-to replay rendering."
-
-DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"
-
-FILES_${PN} = "${libdir}/libcairo.so.*"
-FILES_${PN}-dev += "${libdir}/cairo/*.so"
-FILES_${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
-FILES_${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
-FILES_${PN}-perf-utils = "${bindir}/cairo-trace ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so.*"
-
-do_install_append () {
-	rm -rf ${D}${bindir}/cairo-sphinx
-	rm -rf ${D}${libdir}/cairo/cairo-fdr*
-	rm -rf ${D}${libdir}/cairo/cairo-sphinx*
-	rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
-	rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
-}
diff --git a/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb b/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb
new file mode 100644
index 0000000..20b4668
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/cairo/cairo_1.14.6.bb
@@ -0,0 +1,45 @@
+require cairo.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e73e999e0c72b5ac9012424fa157ad77"
+
+SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "23a0b2f0235431d35238df1d3a517fdb"
+SRC_URI[sha256sum] = "613cb38447b76a93ff7235e17acd55a78b52ea84a9df128c3f2257f8eaa7b252"
+
+UPSTREAM_CHECK_REGEX = "cairo-(?P<pver>\d+(\.\d+)+)\.tar"
+
+PACKAGES =+ "cairo-gobject cairo-script-interpreter cairo-perf-utils"
+
+SUMMARY_${PN} = "The Cairo 2D vector graphics library"
+DESCRIPTION_${PN} = "Cairo is a multi-platform library providing anti-aliased \
+vector-based rendering for multiple target backends. Paths consist \
+of line segments and cubic splines and can be rendered at any width \
+with various join and cap styles. All colors may be specified with \
+optional translucence (opacity/alpha) and combined using the \
+extended Porter/Duff compositing algebra as found in the X Render \
+Extension."
+
+SUMMARY_cairo-gobject = "The Cairo library GObject wrapper library"
+DESCRIPTION_cairo-gobject = "A GObject wrapper library for the Cairo API."
+
+SUMMARY_cairo-script-interpreter = "The Cairo library script interpreter"
+DESCRIPTION_cairo-script-interpreter = "The Cairo script interpreter implements \
+CairoScript.  CairoScript is used by tracing utilities to enable the ability \
+to replay rendering."
+
+DESCRIPTION_cairo-perf-utils = "The Cairo library performance utilities"
+
+FILES_${PN} = "${libdir}/libcairo.so.*"
+FILES_${PN}-dev += "${libdir}/cairo/*.so"
+FILES_${PN}-gobject = "${libdir}/libcairo-gobject.so.*"
+FILES_${PN}-script-interpreter = "${libdir}/libcairo-script-interpreter.so.*"
+FILES_${PN}-perf-utils = "${bindir}/cairo-trace ${libdir}/cairo/*.la ${libdir}/cairo/libcairo-trace.so.*"
+
+do_install_append () {
+	rm -rf ${D}${bindir}/cairo-sphinx
+	rm -rf ${D}${libdir}/cairo/cairo-fdr*
+	rm -rf ${D}${libdir}/cairo/cairo-sphinx*
+	rm -rf ${D}${libdir}/cairo/.debug/cairo-fdr*
+	rm -rf ${D}${libdir}/cairo/.debug/cairo-sphinx*
+}
diff --git a/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb b/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
new file mode 100644
index 0000000..127f0a1
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/cantarell-fonts/cantarell-fonts_git.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Cantarell, a Humanist sans-serif font family"
+
+DESCRIPTION = "The Cantarell font typeface is designed as a \
+               contemporary Humanist sans serif, and was developed for \
+               on-screen reading; in particular, reading web pages on an \
+               HTC Dream mobile phone."
+
+HOMEPAGE = "https://git.gnome.org/browse/cantarell-fonts/"
+SECTION = "fonts"
+LICENSE = "OFL-1.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=df91e3ffcab8cfb972a66bf11255188d"
+
+PV = "0.0.21+git${SRCPV}"
+
+SRCREV = "611c169df5287c059d63b0c8f0570647c75c9189"
+SRC_URI = "git://git.gnome.org/cantarell-fonts;protocol=git;branch=master"
+
+S = "${WORKDIR}/git"
+
+inherit autotools allarch fontcache
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[fontforge] = "--enable-source-rebuild=yes,--enable-source-rebuild=no,fontforge-native"
+FILES_${PN} = "${datadir}/fonts ${datadir}/fontconfig"
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0.inc b/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0.inc
index da21cee..c6ecd08 100644
--- a/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0.inc
+++ b/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0.inc
@@ -2,7 +2,9 @@
 HOMEPAGE = "http://www.clutter-project.org/"
 LICENSE = "LGPLv2.1+"
 
-inherit clutter ptest-gnome
+inherit clutter ptest-gnome distro_features_check upstream-version-is-even gobject-introspection
+# depends on cogl-1.0 which needs opengl
+REQUIRED_DISTRO_FEATURES ?= "opengl"
 
 DEPENDS = "pango glib-2.0 json-glib atk udev cogl-1.0"
 PACKAGE_BEFORE_PN += "${PN}-examples"
@@ -17,8 +19,7 @@
 ERDEPENDS_EVDEV = "xkeyboard-config"
 
 # Disable pretty much everything, override in platform specific set up
-EXTRA_OECONF += "--disable-introspection	\
-	     	 --disable-quartz-backend	\
+EXTRA_OECONF += "--disable-quartz-backend	\
 	     	 --disable-win32-backend	\
 	     	 --disable-gdk-backend		\
 	     	 --disable-cex100-backend	\
@@ -37,11 +38,8 @@
                    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx x11', '', d)}"
 
-FILES_${PN}-dbg += "${libdir}/clutter/examples/.debug"
 FILES_${PN}-examples = "${libdir}/clutter/examples"
 
-FILES_${PN}-dbg += "${libexecdir}/installed-tests/.debug"
-
 do_configure_prepend() {
 	# see https://bugzilla.gnome.org/show_bug.cgi?id=661128 for this
 	touch -t 200001010000 ${S}/po/clutter-1.0.pot
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch b/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch
new file mode 100644
index 0000000..c4edff3
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0/0001-build-Use-AC_COMPILE_IFELSE.patch
@@ -0,0 +1,105 @@
+From 483a4bb00e7dd2f14d86e167c8013c8638723c33 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Thu, 18 Feb 2016 17:19:09 +0000
+Subject: [PATCH] build: Use AC_COMPILE_IFELSE
+
+Instead of AC_TRY_COMPILE, which has been deprecated by newer autoconf.
+---
+Upstream-Status: Backport
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ configure.ac | 66 ++++++++++++++++++++++++++++++------------------------------
+ 1 file changed, 33 insertions(+), 33 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4d72e0c..8ca3f94 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -348,24 +348,25 @@ AS_IF([test "x$enable_wayland" != xno],
+         # We need to manually check for Wayland support in Cogl because
+         # the windowing systems are not exposed in the pkg-config file
+         saved_CFLAGS="${CFLAGS}"
+-        CFLAGS="`$PKG_CONFIG --cflags $CLUTTER_BASE_PC_FILES`"
++        CFLAGS="`$PKG_CONFIG --cflags cogl-1.0`"
+ 
+         AC_MSG_CHECKING([for Wayland Cogl backend])
+-        AC_TRY_COMPILE([#include <cogl/cogl.h>],
+-                       [
+-                         #ifndef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
+-                         #error "No Wayland support in Cogl"
+-                         #endif
+-                         int main (void) { return 0; }
+-                       ],
+-                       [
+-                         AC_MSG_RESULT(yes)
+-                         have_cogl_wayland=yes
+-                       ],
+-                       [
+-                         AC_MSG_RESULT(no)
+-                         have_cogl_wayland=no
+-                       ])
++
++        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#include <cogl/cogl.h>
++]],
++[[
++#ifndef COGL_HAS_EGL_PLATFORM_WAYLAND_SUPPORT
++#error Cogl compiled without Wayland support
++#endif
++]])], [
++          AC_MSG_RESULT(yes)
++          have_cogl_wayland=yes
++        ], [
++          AC_MSG_RESULT(no)
++          have_cogl_wayland=no
++        ])
++
+         CFLAGS="${saved_CFLAGS}"
+         AS_IF([test "x$have_cogl_wayland" = xyes],
+               [
+@@ -499,26 +500,25 @@ AS_IF([test "x$enable_mir" = "xyes"],
+         # We need to manually check for Mir support in Cogl because
+         # the windowing systems are not exposed in the pkg-config file
+         saved_CFLAGS="${CFLAGS}"
+-        CFLAGS="`$PKG_CONFIG --cflags $CLUTTER_BASE_PC_FILES`"
++        CFLAGS="`$PKG_CONFIG --cflags cogl-1.0`"
+ 
+         AC_MSG_CHECKING([for Mir Cogl backend])
+-        AC_TRY_COMPILE([#include <cogl/cogl.h>],
+-                       [
+-                        #ifndef COGL_HAS_EGL_PLATFORM_MIR_SUPPORT
+-                        #error "No Mir support in Cogl"
+-                        #endif
+-                        int main (void) { return 0; }
+-                       ],
+-                       [
+-                         AC_MSG_RESULT(yes)
+-                         have_cogl_mir=yes
+-                       ],
+-                       [
+-                         AC_MSG_RESULT(no)
+-                         have_cogl_mir=no
+-                       ])
+ 
+-        CFLAGS="${saved_CFLAGS}"
++        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
++#include <cogl/cogl.h>
++]],
++[[
++#ifndef COGL_HAS_EGL_PLATFORM_MIR_SUPPORT
++#error Cogl compiled without Mir support
++#endif
++]])], [
++          AC_MSG_RESULT(yes)
++          have_cogl_mir=yes
++        ], [
++          AC_MSG_RESULT(no)
++          have_cogl_mir=no
++        ])
++
+         AS_IF([test "x$have_cogl_mir" = xno], [AC_MSG_ERROR("*** Cogl is missing Mir support.")])
+ 
+         PKG_CHECK_EXISTS([mirclient],
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.22.4.bb b/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.22.4.bb
deleted file mode 100644
index 418cdfd..0000000
--- a/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.22.4.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require clutter-1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
-
-SRC_URI[archive.md5sum] = "26494256c980d49703a553916e3083cd"
-SRC_URI[archive.sha256sum] = "1d77ce16025f87667a1d00dc4fa617a1935156f63fd17635fdadf138866c9e1e"
-
-SRC_URI += "file://install-examples.patch \
-            file://run-installed-tests-with-tap-output.patch \
-            file://run-ptest"
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb b/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb
new file mode 100644
index 0000000..c53b3e7
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/clutter/clutter-1.0_1.24.2.bb
@@ -0,0 +1,10 @@
+require clutter-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
+
+SRC_URI[archive.md5sum] = "3b98e1b33719982a5736ae42cbf7183e"
+SRC_URI[archive.sha256sum] = "9631c98cb4bcbfec15e1bbe9eaa6eef0f127201552fce40d7d28f2133803cd63"
+SRC_URI += "file://install-examples.patch \
+            file://run-installed-tests-with-tap-output.patch \
+            file://0001-build-Use-AC_COMPILE_IFELSE.patch \
+            file://run-ptest"
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc b/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
index d4fed71..4c87798 100644
--- a/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
+++ b/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0.inc
@@ -2,17 +2,16 @@
 HOMEPAGE = "http://www.clutter-project.org/"
 LICENSE = "LGPLv2+"
 
-inherit clutter
+inherit clutter distro_features_check upstream-version-is-even gobject-introspection
+# depends on clutter-1.0 which depends on cogl-1.0
+REQUIRED_DISTRO_FEATURES ?= "opengl"
 
 SRC_URI += "file://0001-Install-example-binary-needed-for-core-image-clutter.patch"
 
-DEPENDS = "gstreamer1.0-plugins-base gstreamer1.0-plugins-bad clutter-1.0"
+DEPENDS = "gstreamer1.0-plugins-base gstreamer1.0-plugins-bad clutter-1.0 libgudev"
 RDEPENDS_${PN} += "gstreamer1.0-meta-base"
 PACKAGES  =+ "${PN}-examples"
 
-EXTRA_OECONF += "--disable-introspection"
-
 FILES_${PN}          += "${libdir}/gstreamer-1.0/lib*.so"
 FILES_${PN}-dev      += "${libdir}/gstreamer-1.0/*.la"
-FILES_${PN}-dbg      += "${libdir}/gstreamer-1.0/.debug/lib*.so"
 FILES_${PN}-examples  = "${bindir}/video-player ${bindir}/video-sink"
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0/enable-tests.patch b/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0/enable-tests.patch
deleted file mode 100644
index b3aec39..0000000
--- a/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0/enable-tests.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Install example binary needed for core-image-clutter
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
-
-Imported from clutter-gst-1.8 package, git://git.openembedded.org/openembedded,
-commit ae28ee3f7a060b9e0d13154a84f2444a98490b5b, updated for clutter-gst 1.6
-
-Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
-
-Index: git/examples/Makefile.am
-===================================================================
---- git.orig/examples/Makefile.am	2011-01-31 10:14:23.000000000 +0800
-+++ git/examples/Makefile.am	2011-01-31 10:14:34.000000000 +0800
-@@ -1,6 +1,6 @@
- NULL = #
- 
--noinst_PROGRAMS = video-player video-sink video-sink-navigation
-+bin_PROGRAMS = video-player video-sink video-sink-navigation
- 
- INCLUDES = -I$(top_srcdir) \
- 	   $(MAINTAINER_CFLAGS) \
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.16.bb b/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.16.bb
new file mode 100644
index 0000000..fcf5242
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.16.bb
@@ -0,0 +1,7 @@
+require clutter-gst-3.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
+                    file://clutter-gst/clutter-gst.h;beginline=1;endline=24;md5=95baacba194e814c110ea3bdf25ddbf4"
+
+SRC_URI[archive.md5sum] = "ca24eb92a0d34fc9e66fd686a965d51c"
+SRC_URI[archive.sha256sum] = "803e8b7265e63e0581e21fd0c6064792dfe951512e9f515e9e7a9b452caaf9f0"
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.8.bb b/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.8.bb
deleted file mode 100644
index 319a955..0000000
--- a/yocto-poky/meta/recipes-graphics/clutter/clutter-gst-3.0_3.0.8.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require clutter-gst-3.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
-                    file://clutter-gst/clutter-gst.h;beginline=1;endline=24;md5=95baacba194e814c110ea3bdf25ddbf4"
-
-SRC_URI[archive.md5sum] = "f7d97f96e7cca82f38317d1734d5dadb"
-SRC_URI[archive.sha256sum] = "582e85b88482e16f7ec719363e38fadf84fab4d4baaa21e5227a454b824f135c"
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc b/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc
index 45898b4..05c4e5f 100644
--- a/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc
+++ b/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0.inc
@@ -2,11 +2,14 @@
 HOMEPAGE = "http://www.clutter-project.org/"
 LICENSE = "LGPLv2+"
 
-inherit clutter
+inherit clutter distro_features_check upstream-version-is-even gobject-introspection
+# depends on clutter-1.0 which depends on cogl-1.0
+REQUIRED_DISTRO_FEATURES ?= "opengl"
+# depends on gtk+3
+ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
 
 DEPENDS = "clutter-1.0 gtk+3"
 PACKAGES  =+ "${PN}-examples"
 AUTOTOOLS_AUXDIR = "${S}/build"
 
-EXTRA_OECONF += "--disable-introspection"
 
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.6.2.bb b/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.6.2.bb
deleted file mode 100644
index 530ea18..0000000
--- a/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.6.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require clutter-gtk-1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-SRC_URI[archive.md5sum] = "557d814c3e70cc3a2d1cf3816919b14f"
-SRC_URI[archive.sha256sum] = "bbd03dfa9a20102d5cdb440513b0a035933da557ad7e9da31546034de2daf069"
diff --git a/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.6.6.bb b/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.6.6.bb
new file mode 100644
index 0000000..23257bb
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/clutter/clutter-gtk-1.0_1.6.6.bb
@@ -0,0 +1,6 @@
+require clutter-gtk-1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI[archive.md5sum] = "79dc3d7a8645f87d83a9ccca8a08aa8e"
+SRC_URI[archive.sha256sum] = "9440a68600f58d00fe0af35383738943e8ead9907f4cf507a102d96822434a28"
diff --git a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc
index 3da31c8..690ea3b 100644
--- a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc
+++ b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0.inc
@@ -2,7 +2,9 @@
 HOMEPAGE = "http://wiki.clutter-project.org/wiki/Cogl"
 LICENSE = "MIT"
 
-inherit clutter
+inherit clutter distro_features_check upstream-version-is-even gobject-introspection
+# cogl-1.0 needs opengl to build
+REQUIRED_DISTRO_FEATURES ?= "opengl"
 
 DEPENDS = "glib-2.0 gdk-pixbuf"
 PACKAGES =+ "${PN}-examples \
@@ -24,8 +26,7 @@
 ERDEPENDS_GLES2 = "libgles2"
 
 # GLESv1 is rarely tested, so disable it
-EXTRA_OECONF += "--disable-introspection	\
-	       	 --enable-examples-install	\
+EXTRA_OECONF += "--enable-examples-install	\
 	       	 --enable-debug		 	\
 	       	 --disable-gles1		\
 	         --disable-cairo                \
@@ -56,11 +57,15 @@
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glx egl-x11', '', d)} \
                    "
 
+do_compile_prepend() {
+        export GIR_EXTRA_LIBS_PATH="${B}/cogl/.libs"
+}
 
+FILES_${PN} = ""
 FILES_${PN}-examples = "${bindir}/* ${datadir}/cogl/examples-data/*"
-FILES_libcogl = "${libdir}/libcogl${SOLIBS}"
+FILES_libcogl = "${libdir}/libcogl${SOLIBS} ${libdir}/girepository-1.0/Cogl-*.typelib"
 FILES_libcogl-gles2 = "${libdir}/libcogl-gles2${SOLIBS}"
-FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS}"
+FILES_libcogl-pango = "${libdir}/libcogl-pango${SOLIBS} ${libdir}/girepository-1.0/CoglPango*.typelib"
 
 FILES_libcogl-path = "${libdir}/libcogl-path${SOLIBS}"
 
diff --git a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/cogl-framebuffer-gl-Work-again-on-GLESv2.patch b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/cogl-framebuffer-gl-Work-again-on-GLESv2.patch
deleted file mode 100644
index 8e83957..0000000
--- a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/cogl-framebuffer-gl-Work-again-on-GLESv2.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-
-
-
-From f8cce5f6cb2958a4074f87cd345bfe46e0dda6e1 Mon Sep 17 00:00:00 2001
-From: "Jasper St. Pierre" <jstpierre@mecheye.net>
-Date: Mon, 20 Apr 2015 12:08:29 -0700
-Subject: cogl-framebuffer-gl: Work again on GLESv2
-
-
-diff --git a/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/driver/gl/cogl-framebuffer-gl.c
-index 793b10b..609cfb3 100644
---- a/cogl/driver/gl/cogl-framebuffer-gl.c
-+++ b/cogl/driver/gl/cogl-framebuffer-gl.c
-@@ -107,6 +107,12 @@
- #ifndef GL_PACK_INVERT_MESA
- #define GL_PACK_INVERT_MESA 0x8758
- #endif
-+#ifndef GL_BACK_LEFT
-+#define GL_BACK_LEFT				0x0402
-+#endif
-+#ifndef GL_BACK_RIGHT
-+#define GL_BACK_RIGHT				0x0403
-+#endif
- 
- #ifndef GL_COLOR
- #define GL_COLOR 0x1800
-@@ -245,6 +251,9 @@ _cogl_framebuffer_gl_flush_stereo_mode_state (CoglFramebuffer *framebuffer)
-   if (framebuffer->type == COGL_FRAMEBUFFER_TYPE_OFFSCREEN)
-     return;
- 
-+  if (!ctx->glDrawBuffer)
-+    return;
-+
-   /* The one-shot default draw buffer setting in _cogl_framebuffer_gl_bind
-    * must have already happened. If not it would override what we set here. */
-   g_assert (ctx->was_bound_to_onscreen);
--- 
-cgit v0.10.2
-
diff --git a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch
new file mode 100644
index 0000000..479a0ff
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0/test-backface-culling.c-fix-may-be-used-uninitialize.patch
@@ -0,0 +1,35 @@
+From a51f61d675a0e7d6649182c6a1325ceab8342df2 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 4 Jan 2016 22:47:29 -0800
+Subject: [PATCH] test-backface-culling.c: fix may be used uninitialized error
+
+Fixed when gcc -O:
+test-backface-culling.c:206:7: error: 'cull_front' may be used uninitialized in this function [-Werror=maybe-uninitialized]
+|        validate_part (framebuffer,
+|        ^
+| cc1: some warnings being treated as errors
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ tests/conform/test-backface-culling.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/conform/test-backface-culling.c b/tests/conform/test-backface-culling.c
+index e90c2f5..7c45592 100644
+--- a/tests/conform/test-backface-culling.c
++++ b/tests/conform/test-backface-culling.c
+@@ -164,7 +164,8 @@ validate_result (CoglFramebuffer *framebuffer, int y_offset)
+ 
+   for (draw_num = 0; draw_num < 16; draw_num++)
+     {
+-      CoglBool cull_front, cull_back;
++      CoglBool cull_front = FALSE;
++      CoglBool cull_back = FALSE;
+       CoglPipelineCullFaceMode cull_mode;
+ 
+       if (USE_LEGACY_STATE (draw_num))
+-- 
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.20.0.bb b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.20.0.bb
deleted file mode 100644
index d20b814..0000000
--- a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.20.0.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require cogl-1.0.inc
-
-SRC_URI += "file://cogl-framebuffer-gl-Work-again-on-GLESv2.patch"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84"
-SRC_URI[archive.md5sum] = "5b28897194d9ff76a574a9493d1f7ee0"
-SRC_URI[archive.sha256sum] = "729e35495829e7d31fafa3358e47b743ba21a2b08ff9b6cd28fb74c0de91192b"
-
diff --git a/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb
new file mode 100644
index 0000000..ed10c7a
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/cogl/cogl-1.0_1.22.0.bb
@@ -0,0 +1,7 @@
+require cogl-1.0.inc
+
+SRC_URI += "file://test-backface-culling.c-fix-may-be-used-uninitialize.patch"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=1b1a508d91d25ca607c83f92f3e31c84"
+SRC_URI[archive.md5sum] = "ab684ec96848d79d22757fb3064820c8"
+SRC_URI[archive.sha256sum] = "689dfb5d14fc1106e9d2ded0f7930dcf7265d0bc84fa846b4f03941633eeaa91"
diff --git a/yocto-poky/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb b/yocto-poky/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
index 9c3e8bf..7907c5c 100644
--- a/yocto-poky/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
+++ b/yocto-poky/meta/recipes-graphics/directfb/directfb-examples_1.7.0.bb
@@ -7,7 +7,7 @@
 LICENSE = "MIT"
 
 SRC_URI = " \
-           http://www.directfb.org/downloads/Extras/DirectFB-examples-${PV}.tar.gz \
+           http://downloads.yoctoproject.org/mirror/sources/DirectFB-examples-${PV}.tar.gz \
            file://configure.in-Fix-string-argument-syntax.patch \
           "
 
diff --git a/yocto-poky/meta/recipes-graphics/directfb/directfb.inc b/yocto-poky/meta/recipes-graphics/directfb/directfb.inc
index cbd4014..f6b7cbe 100644
--- a/yocto-poky/meta/recipes-graphics/directfb/directfb.inc
+++ b/yocto-poky/meta/recipes-graphics/directfb/directfb.inc
@@ -11,11 +11,14 @@
 HOMEPAGE = "http://directfb.org"
 DEPENDS = "jpeg libpng freetype zlib tslib sysfsutils"
 
-SRC_URI = "http://www.directfb.org/downloads/Core/DirectFB-1.7/DirectFB-${PV}.tar.gz \
+SRC_URI = "http://downloads.yoctoproject.org/mirror/sources/DirectFB-${PV}.tar.gz \
            file://configurefix.patch \
            file://fusion.patch \
            file://bashism.patch \
            file://0001-gfx-direct-Aboid-usng-VLAs-and-printf-formats.patch \
+           file://compar_fn_t.patch \
+           file://union-sigval.patch \
+           file://use-PTHREAD_MUTEX_RECURSIVE.patch \
           "
 
 S = "${WORKDIR}/DirectFB-${PV}"
@@ -23,7 +26,7 @@
 LDFLAGS_append =" -lts -lm"
 
 # Workaround for linking issues seen with armv7a + gold
-LDFLAGS_append_armv7a = "${@base_contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
+LDFLAGS_append_arm = "${@base_contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
 
 BINCONFIG = "${bindir}/directfb-config"
 
@@ -59,13 +62,6 @@
 
 # NOTE: monolithic packaging for now, should improve that eventually
 
-
-
-FILES_${PN}-dbg += "\
-  ${libdir}/directfb-${RV}/*/*/.debug/*.so \
-  ${libdir}/directfb-${RV}/*/.debug/*.so \
-"
-
 FILES_${PN}-dev += "\
   ${bindir}/directfb-config \
   ${libdir}/directfb-${RV}/systems/*.la \
diff --git a/yocto-poky/meta/recipes-graphics/directfb/directfb/compar_fn_t.patch b/yocto-poky/meta/recipes-graphics/directfb/directfb/compar_fn_t.patch
new file mode 100644
index 0000000..ee4d900
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/directfb/directfb/compar_fn_t.patch
@@ -0,0 +1,62 @@
+test for __compar_fn_t and if not defined by libc then define it
+help make directfb compile with musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: DirectFB-1.7.7/configure.in
+===================================================================
+--- DirectFB-1.7.7.orig/configure.in
++++ DirectFB-1.7.7/configure.in
+@@ -112,6 +112,17 @@ AC_CHECK_SIZEOF(long)
+ AC_CHECK_SIZEOF(long long)
+ AC_CHECK_FUNCS(fork)
+ 
++AC_CACHE_CHECK([for compar_fn_t in stdlib.h],ccache_cv_COMPAR_FN_T, [
++    AC_TRY_COMPILE(
++        [#include <stdlib.h>],
++        [void test_fn(void) { qsort(NULL, 0, 0, (__compar_fn_t)NULL); }],
++        ccache_cv_COMPAR_FN_T=yes,
++        ccache_cv_COMPAR_FN_T=no)])
++if test x"$ccache_cv_COMPAR_FN_T" = x"yes"; then
++   AC_DEFINE(HAVE_COMPAR_FN_T, 1,
++             Define to 1 if you have the `__compar_fn_t' typedef.)
++fi
++
+ AC_PATH_PROGS(PERL, perl5 perl)
+ 
+ AC_PATH_PROG(MAN2HTML, man2html, no)
+Index: DirectFB-1.7.7/inputdrivers/lirc/lirc.c
+===================================================================
+--- DirectFB-1.7.7.orig/inputdrivers/lirc/lirc.c
++++ DirectFB-1.7.7/inputdrivers/lirc/lirc.c
+@@ -59,6 +59,11 @@
+ 
+ #include <core/input_driver.h>
+ 
++#if HAVE_COMPAR_FN_T
++#define COMPAR_FN_T __compar_fn_t
++#else
++typedef int (*COMPAR_FN_T)(const void *, const void *);
++#endif
+ 
+ DFB_INPUT_DRIVER( lirc )
+ 
+@@ -97,7 +102,7 @@ static DFBInputDeviceKeySymbol lirc_pars
+           qsort ( keynames,
+                   D_ARRAY_SIZE( keynames ),
+                   sizeof(keynames[0]),
+-                  (__compar_fn_t) keynames_sort_compare );
++                  (COMPAR_FN_T) keynames_sort_compare );
+           keynames_sorted = true;
+      }
+ 
+@@ -124,7 +129,7 @@ static DFBInputDeviceKeySymbol lirc_pars
+                symbol_name = bsearch( name, keynames,
+                                       D_ARRAY_SIZE( keynames ),
+                                       sizeof(keynames[0]),
+-                                      (__compar_fn_t) keynames_compare );
++                                      (COMPAR_FN_T) keynames_compare );
+                if (symbol_name)
+                     return symbol_name->symbol;
+                break;
diff --git a/yocto-poky/meta/recipes-graphics/directfb/directfb/union-sigval.patch b/yocto-poky/meta/recipes-graphics/directfb/directfb/union-sigval.patch
new file mode 100644
index 0000000..29f45c7
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/directfb/directfb/union-sigval.patch
@@ -0,0 +1,19 @@
+This patch is taken from gentoo musl overlay
+sigval_t is glibc only construct, we use a union of sigval
+which pretty much is same effect as sigval_t
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+diff -Naur DirectFB-1.7.6.orig/lib/direct/os/linux/glibc/system.c DirectFB-1.7.6/lib/direct/os/linux/glibc/system.c
+--- DirectFB-1.7.6.orig/lib/direct/os/linux/glibc/system.c	2014-07-15 02:54:58.000000000 -0400
++++ DirectFB-1.7.6/lib/direct/os/linux/glibc/system.c	2015-07-18 16:55:35.077989166 -0400
+@@ -111,7 +111,7 @@
+ void
+ direct_trap( const char *domain, int sig )
+ {
+-     sigval_t val;
++     union sigval val;
+ 
+      if (direct_config->delay_trap_ms) {
+           D_LOG( Direct_Trap, VERBOSE, "NOT RAISING signal %d from %s, waiting for %dms... attach gdb --pid=%d\n", sig, domain, direct_config->delay_trap_ms, getpid() );
diff --git a/yocto-poky/meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch b/yocto-poky/meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch
new file mode 100644
index 0000000..ac48f68
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/directfb/directfb/use-PTHREAD_MUTEX_RECURSIVE.patch
@@ -0,0 +1,116 @@
+Remove use of DIRECT_RECURSIVE_MUTEX_INITIALIZER its not portable
+use portable way to initialize recursive mutex using pthread_once() and direct_recursive_mutex_init()
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Index: DirectFB-1.7.7/lib/direct/os/linux/glibc/mutex.h
+===================================================================
+--- DirectFB-1.7.7.orig/lib/direct/os/linux/glibc/mutex.h
++++ DirectFB-1.7.7/lib/direct/os/linux/glibc/mutex.h
+@@ -46,7 +46,6 @@ struct __D_DirectMutex {
+ /**********************************************************************************************************************/
+ 
+ #define DIRECT_MUTEX_INITIALIZER(name)            { PTHREAD_MUTEX_INITIALIZER }
+-#define DIRECT_RECURSIVE_MUTEX_INITIALIZER(name)  { PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP }
+ 
+ #endif
+ 
+Index: DirectFB-1.7.7/lib/direct/trace.c
+===================================================================
+--- DirectFB-1.7.7.orig/lib/direct/trace.c
++++ DirectFB-1.7.7/lib/direct/trace.c
+@@ -89,8 +89,15 @@ struct __D_DirectTraceBuffer {
+ /**************************************************************************************************/
+ 
+ static DirectLink  *buffers;
+-static DirectMutex  buffers_lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(buffers_lock);
+ 
++static pthread_once_t buffers_lock_init_once = PTHREAD_ONCE_INIT;
++static DirectMutex buffers_lock;
++
++static void
++buffers_lock_init( void )
++{
++     direct_recursive_mutex_init(&buffers_lock);
++}
+ /**************************************************************************************************/
+ 
+ __dfb_no_instrument_function__
+@@ -113,6 +120,7 @@ get_trace_buffer( void )
+ 
+           D_MAGIC_SET( buffer, DirectTraceBuffer );
+ 
++          pthread_once(&buffers_lock_init_once, buffers_lock_init);
+           direct_mutex_lock( &buffers_lock );
+           direct_list_append( &buffers, &buffer->link );
+           direct_mutex_unlock( &buffers_lock );
+@@ -138,8 +146,14 @@ typedef struct {
+ } SymbolTable;
+ 
+ static DirectLink  *tables      = NULL;
+-static DirectMutex  tables_lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(tables_lock);
++static pthread_once_t tables_lock_init_once = PTHREAD_ONCE_INIT;
++static DirectMutex tables_lock;
+ 
++static void
++tables_lock_init( void )
++{
++     direct_recursive_mutex_init(&tabless_lock);
++}
+ 
+ __dfb_no_instrument_function__
+ static void
+@@ -370,6 +384,7 @@ direct_trace_lookup_symbol( const char *
+      Symbol      *symbol;
+      SymbolTable *table;
+ 
++     pthread_once(&tables_lock_init_once, tables_lock_init);
+      direct_mutex_lock( &tables_lock );
+ 
+      table = find_table( filename );
+@@ -514,6 +529,7 @@ direct_trace_print_stacks()
+      DirectTraceBuffer *b;
+      DirectTraceBuffer *buffer = get_trace_buffer();
+ 
++     pthread_once(&buffers_lock_init_once, buffers_lock_init);
+      direct_mutex_lock( &buffers_lock );
+ 
+      if (buffer && buffer->level)
+@@ -611,6 +627,7 @@ direct_trace_free_buffer( DirectTraceBuf
+      D_MAGIC_ASSERT( buffer, DirectTraceBuffer );
+ 
+      if (buffer->thread) {
++          pthread_once(&buffers_lock_init_once, buffers_lock_init);
+           direct_mutex_lock( &buffers_lock );
+           direct_list_remove( &buffers, &buffer->link );
+           direct_mutex_unlock( &buffers_lock );
+Index: DirectFB-1.7.7/src/directfb.c
+===================================================================
+--- DirectFB-1.7.7.orig/src/directfb.c
++++ DirectFB-1.7.7/src/directfb.c
+@@ -99,6 +99,15 @@ const unsigned int directfb_micro_versio
+ const unsigned int directfb_binary_age    = DIRECTFB_BINARY_AGE;
+ const unsigned int directfb_interface_age = DIRECTFB_INTERFACE_AGE;
+ 
++static pthread_once_t lock_init_once = PTHREAD_ONCE_INIT;
++static DirectMutex lock;
++
++static void
++lock_init( void )
++{
++     direct_recursive_mutex_init(&lock);
++}
++
+ const char *
+ DirectFBCheckVersion( unsigned int required_major,
+                       unsigned int required_minor,
+@@ -215,8 +224,7 @@ DirectFBCreate( IDirectFB **interface_pt
+      if (dfb_config->remote.host)
+           return CreateRemote( dfb_config->remote.host, dfb_config->remote.port, interface_ptr );
+ 
+-     static DirectMutex lock = DIRECT_RECURSIVE_MUTEX_INITIALIZER(lock);
+-
++     pthread_once(&lock_init_once, lock_init);
+      direct_mutex_lock( &lock );
+ 
+      if (!dfb_config->no_singleton && idirectfb_singleton) {
diff --git a/yocto-poky/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch b/yocto-poky/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch
new file mode 100644
index 0000000..286e548
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/drm/libdrm/fix_O_CLOEXEC_undeclared.patch
@@ -0,0 +1,24 @@
+drmdevice.c: define _GNU_SOURCE
+
+Include config.h to fix this build error with uclibc:
+
+libdrm-2.4.66/tests/drmdevice.c: In function 'main':
+libdrm-2.4.66/tests/drmdevice.c:96:60: error:
+'O_CLOEXEC' undeclared (first use in this function)
+fd = open(devices[i]->nodes[j],O_RDONLY | O_CLOEXEC, 0);
+
+Upstream-Status: Pending
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur libdrm-2.4.66-orig/tests/drmdevice.c libdrm-2.4.66/tests/drmdevice.c
+--- libdrm-2.4.66-orig/tests/drmdevice.c	2016-02-23 11:34:02.054904502 +0200
++++ libdrm-2.4.66/tests/drmdevice.c	2016-02-23 11:35:34.371750383 +0200
+@@ -21,6 +21,7 @@
+  *
+  */
+ 
++#include <config.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <sys/stat.h>
diff --git a/yocto-poky/meta/recipes-graphics/drm/libdrm/installtests.patch b/yocto-poky/meta/recipes-graphics/drm/libdrm/installtests.patch
index 1175dae..30e0a61 100644
--- a/yocto-poky/meta/recipes-graphics/drm/libdrm/installtests.patch
+++ b/yocto-poky/meta/recipes-graphics/drm/libdrm/installtests.patch
@@ -4,20 +4,12 @@
 
 Signed-off-by: Yu Ke <ke.yu@intel.com>
 
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index bf1987f..d909e19 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -27,10 +27,11 @@ AM_CPPFLAGS = \
- 
- LDADD = $(top_builddir)/libdrm.la
- 
--check_PROGRAMS = \
-+bin_PROGRAMS = \
- 	dristat \
- 	drmstat
- 
-+check_PROGRAMS =
- if HAVE_NOUVEAU
- SUBDIRS += nouveau
+Index: libdrm-2.4.66/tests/Makefile.am
+===================================================================
+--- libdrm-2.4.66.orig/tests/Makefile.am
++++ libdrm-2.4.66/tests/Makefile.am
+@@ -73,3 +73,4 @@ TESTS +=					\
  endif
+ 
+ check_PROGRAMS += $(TESTS)
++bin_PROGRAMS = $(check_PROGRAMS)
diff --git a/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.62.bb b/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.62.bb
deleted file mode 100644
index ea6305e..0000000
--- a/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.62.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Userspace interface to the kernel DRM services"
-DESCRIPTION = "The runtime library for accessing the kernel DRM services.  DRM \
-stands for \"Direct Rendering Manager\", which is the kernel portion of the \
-\"Direct Rendering Infrastructure\" (DRI).  DRI is required for many hardware \
-accelerated OpenGL drivers."
-HOMEPAGE = "http://dri.freedesktop.org"
-SECTION = "x11/base"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
-PROVIDES = "drm"
-DEPENDS = "libpthread-stubs udev libpciaccess"
-
-SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
-           file://installtests.patch "
-SRC_URI[md5sum] = "c9291bae0e5ca65d1483821d3698d3ab"
-SRC_URI[sha256sum] = "906c294bdbe1c94c3ca084305d61a6e5a8367f3b4986e6cc13b1e9b3f75931dc"
-
-inherit autotools pkgconfig
-
-EXTRA_OECONF += "--disable-cairo-tests \
-                 --enable-omap-experimental-api \
-                 --enable-install-test-programs \
-                 --disable-manpages \
-                 --disable-valgrind \
-                "
-
-ALLOW_EMPTY_${PN}-drivers = "1"
-PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
-             ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno"
-
-RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
-                             ${PN}-exynos ${PN}-freedreno"
-
-FILES_${PN}-tests = "${bindir}/dr* ${bindir}/mode* ${bindir}/*test"
-FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
-FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
-FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
-FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
-FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
-FILES_${PN}-kms = "${libdir}/libkms*.so.*"
-FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
-
diff --git a/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.67.bb b/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.67.bb
new file mode 100644
index 0000000..ddd697f
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/drm/libdrm_2.4.67.bb
@@ -0,0 +1,45 @@
+SUMMARY = "Userspace interface to the kernel DRM services"
+DESCRIPTION = "The runtime library for accessing the kernel DRM services.  DRM \
+stands for \"Direct Rendering Manager\", which is the kernel portion of the \
+\"Direct Rendering Infrastructure\" (DRI).  DRI is required for many hardware \
+accelerated OpenGL drivers."
+HOMEPAGE = "http://dri.freedesktop.org"
+SECTION = "x11/base"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
+PROVIDES = "drm"
+DEPENDS = "libpthread-stubs udev libpciaccess"
+
+SRC_URI = "http://dri.freedesktop.org/libdrm/${BP}.tar.bz2 \
+           file://installtests.patch \
+           file://fix_O_CLOEXEC_undeclared.patch \
+          "
+
+SRC_URI[md5sum] = "b844c6af34e613ebf52f80b3cd8d7055"
+SRC_URI[sha256sum] = "ee5b71e1113be37544d0752681c12f040c01f782e2933df7d7bc21fd0d10cebe"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF += "--disable-cairo-tests \
+                 --enable-omap-experimental-api \
+                 --enable-install-test-programs \
+                 --disable-manpages \
+                 --disable-valgrind \
+                "
+
+ALLOW_EMPTY_${PN}-drivers = "1"
+PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
+             ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu"
+
+RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
+                             ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu"
+
+FILES_${PN}-tests = "${bindir}/*"
+FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
+FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
+FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*"
+FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*"
+FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
+FILES_${PN}-kms = "${libdir}/libkms*.so.*"
+FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
+FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*"
diff --git a/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo.inc b/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo.inc
index b87688a..d0c0c27 100644
--- a/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo.inc
+++ b/yocto-poky/meta/recipes-graphics/eglinfo/eglinfo.inc
@@ -6,12 +6,16 @@
 
 DEPENDS = "virtual/egl"
 
-SRC_URI = "git://github.com/dv1/eglinfo.git;branch=master"
+SRC_URI = "git://github.com/dv1/eglinfo.git;branch=master \
+           file://0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch \
+          "
 SRCREV = "4b317648ec6cf39556a9e5d8078f605bc0edd5de"
 
 S = "${WORKDIR}/git"
 
-inherit waf
+inherit waf distro_features_check
+# depends on virtual/egl
+REQUIRED_DISTRO_FEATURES ?= "opengl"
 
 # BSP layers should add .bbappend files for the -x11 and -fb .bb recipes, which
 # append the respective EGL/OpenGLES/OpenVG libraries to DEPENDS and set
diff --git a/yocto-poky/meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch b/yocto-poky/meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch
new file mode 100644
index 0000000..ca9f55c
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/eglinfo/files/0001-Add-STAGING_INCDIR-to-searchpath-for-egl-headers.patch
@@ -0,0 +1,34 @@
+From 94b1e6daf7d70550b0e32fbb269fcf6887948d3f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jan 2016 16:08:22 -0800
+Subject: [PATCH] Add STAGING_INCDIR to searchpath for egl headers
+
+bcm_host.h is in standard includedir in sysroot
+add that to header search paths.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ wscript | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/wscript b/wscript
+index fcbb55b..cece8bf 100644
+--- a/wscript
++++ b/wscript
+@@ -163,9 +163,10 @@ def configure_raspberrypi_device(conf, platform):
+ 	conf.check_cxx(mandatory = 1, lib = ['GLESv2', 'EGL', 'bcm_host'], uselib_store = 'EGL')
+ 	import os
+ 	sysroot = conf.options.sysroot + conf.options.prefix
++        std_include_path = os.path.join(sysroot, 'include')
+ 	vcos_pthread_path = os.path.join(sysroot, 'include/interface/vcos/pthreads')
+ 	vcms_host_path = os.path.join(sysroot, 'include/interface/vmcs_host/linux')
+-	if not conf.check_cxx(mandatory = 0, header_name = ['vcos_platform_types.h', 'EGL/egl.h', 'bcm_host.h'], includes = [vcos_pthread_path, vcms_host_path], uselib_store = 'EGL'):
++	if not conf.check_cxx(mandatory = 0, header_name = ['vcos_platform_types.h', 'EGL/egl.h', 'bcm_host.h'], includes = [vcos_pthread_path, vcms_host_path, std_include_path], uselib_store = 'EGL'):
+ 		conf.fatal('Check if --prefix and --sysroot are set correctly.')
+ 	conf.env['WITH_APIS'] = []
+ 	if check_gles2(conf):
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-Revert-changes-made-to-FcConfigAppFontAddDir-recentl.patch b/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-Revert-changes-made-to-FcConfigAppFontAddDir-recentl.patch
new file mode 100644
index 0000000..f2fd5d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig/0001-Revert-changes-made-to-FcConfigAppFontAddDir-recentl.patch
@@ -0,0 +1,132 @@
+From 46ec6a52d4cc447cc3ff4a13b2067ecb76c9db2e Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad@behdad.org>
+Date: Fri, 26 Jun 2015 17:02:13 -0700
+Subject: [PATCH] Revert changes made to FcConfigAppFontAddDir() recently
+
+In 32ac7c75e8db0135ef37cf86f92d8b9be000c8bb the behavior of
+FcConfigAppFontAddFile/Dir() were changed to return false
+if not fonts were found.  While this is welldefined and useful
+for AddFile(), it's quite problematic for AddDir().  For example,
+if the directory is empty, is that a failure or success?  Worse,
+the false value from AddDir() was being propagated all the way
+to FcInit() returning false now.  This only happened upon memory
+allocation failure before, and some clients assert that FcInit()
+is successful.
+
+With this change, AddDir() is reverted back to what it was.
+AddFont() change (which was actually in fcdir.c) from the original
+commit is left in.
+
+Upstream-Status: backport
+
+Signed-off-by: Li Zhou <li.zhou@windriver.com>
+---
+ doc/fcconfig.fncs |    2 +-
+ src/fccfg.c       |   29 +++++++++++------------------
+ src/fcint.h       |    3 ---
+ src/fcstr.c       |    8 --------
+ 4 files changed, 12 insertions(+), 30 deletions(-)
+
+Index: fontconfig-2.11.94/doc/fcconfig.fncs
+===================================================================
+--- fontconfig-2.11.94.orig/doc/fcconfig.fncs
++++ fontconfig-2.11.94/doc/fcconfig.fncs
+@@ -232,7 +232,7 @@ the current configuration is used.
+ @DESC@
+ Scans the specified directory for fonts, adding each one found to the
+ application-specific set of fonts. Returns FcFalse
+-if the fonts cannot be added (due to allocation failure or no fonts found).
++if the fonts cannot be added (due to allocation failure).
+ Otherwise returns FcTrue. If <parameter>config</parameter> is NULL,
+ the current configuration is used.
+ @@
+Index: fontconfig-2.11.94/src/fccfg.c
+===================================================================
+--- fontconfig-2.11.94.orig/src/fccfg.c
++++ fontconfig-2.11.94/src/fccfg.c
+@@ -368,7 +368,6 @@ FcConfigAddDirList (FcConfig *config, Fc
+     FcStrList	    *dirlist;
+     FcChar8	    *dir;
+     FcCache	    *cache;
+-    FcBool	     ret = FcFalse;
+ 
+     dirlist = FcStrListCreate (dirSet);
+     if (!dirlist)
+@@ -383,10 +382,9 @@ FcConfigAddDirList (FcConfig *config, Fc
+ 	    continue;
+ 	FcConfigAddCache (config, cache, set, dirSet);
+ 	FcDirCacheUnload (cache);
+-	ret = FcTrue;
+     }
+     FcStrListDone (dirlist);
+-    return ret;
++    return FcTrue;
+ }
+ 
+ /*
+@@ -2199,7 +2197,6 @@ FcConfigAppFontAddFile (FcConfig    *con
+     FcStrSet	*subdirs;
+     FcStrList	*sublist;
+     FcChar8	*subdir;
+-    FcBool	 ret = FcFalse;
+ 
+     if (!config)
+     {
+@@ -2229,19 +2226,16 @@ FcConfigAppFontAddFile (FcConfig    *con
+ 	FcStrSetDestroy (subdirs);
+ 	return FcFalse;
+     }
+-    if (subdirs->num == 0)
+-	ret = FcTrue;
+-    else if ((sublist = FcStrListCreate (subdirs)))
++    if ((sublist = FcStrListCreate (subdirs)))
+     {
+ 	while ((subdir = FcStrListNext (sublist)))
+ 	{
+-	    if (FcConfigAppFontAddDir (config, subdir))
+-		ret = FcTrue;
++	    FcConfigAppFontAddDir (config, subdir);
+ 	}
+ 	FcStrListDone (sublist);
+     }
+     FcStrSetDestroy (subdirs);
+-    return ret;
++    return FcTrue;
+ }
+ 
+ FcBool
+@@ -2250,7 +2244,6 @@ FcConfigAppFontAddDir (FcConfig	    *con
+ {
+     FcFontSet	*set;
+     FcStrSet	*dirs;
+-    FcBool	 ret = FcTrue;
+ 
+     if (!config)
+     {
+@@ -2269,8 +2262,8 @@ FcConfigAppFontAddDir (FcConfig	    *con
+ 	set = FcFontSetCreate ();
+ 	if (!set)
+ 	{
+-	    ret = FcFalse;
+-	    goto bail;
++	    FcStrSetDestroy (dirs);
++	    return FcFalse;
+ 	}
+ 	FcConfigSetFonts (config, set, FcSetApplication);
+     }
+@@ -2278,10 +2271,12 @@ FcConfigAppFontAddDir (FcConfig	    *con
+     FcStrSetAddFilename (dirs, dir);
+ 
+     if (!FcConfigAddDirList (config, FcSetApplication, dirs))
+-	ret = FcFalse;
+-bail:
++    {
++	FcStrSetDestroy (dirs);
++	return FcFalse;
++    }
+     FcStrSetDestroy (dirs);
+-    return ret;
++    return FcTrue;
+ }
+ 
+ void
diff --git a/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.11.94.bb b/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.11.94.bb
index 9bbff20..b427947 100644
--- a/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.11.94.bb
+++ b/yocto-poky/meta/recipes-graphics/fontconfig/fontconfig_2.11.94.bb
@@ -22,6 +22,7 @@
 
 SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
            file://revert-static-pkgconfig.patch \
+           file://0001-Revert-changes-made-to-FcConfigAppFontAddDir-recentl.patch \
            "
 SRC_URI[md5sum] = "479be870c7f83f15f87bac085b61d641"
 SRC_URI[sha256sum] = "73f6d323c7bcfbde25d78397675191d55b8f4139132c6a9444410f3a2d8a9a95"
@@ -40,6 +41,10 @@
 
 FONTCONFIG_CACHE_DIR ?= "${localstatedir}/cache/fontconfig"
 
-EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR}"
+# comma separated list of additional directories
+# /usr/share/fonts is already included by default (you can change it with --with-default-fonts)
+FONTCONFIG_FONT_DIRS ?= "no"
+
+EXTRA_OECONF = " --disable-docs --with-default-fonts=${datadir}/fonts --with-cache-dir=${FONTCONFIG_CACHE_DIR} --with-add-fonts=${FONTCONFIG_FONT_DIRS}"
 
 BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch b/yocto-poky/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch
new file mode 100644
index 0000000..2083881
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/freetype/freetype/use-right-libtool.patch
@@ -0,0 +1,14 @@
+Freetype think that it knows best about where libtool is, and explicitly the
+libtool autoconf macros telling it where to find the libtool script.  Of course
+we prefix the script with the target triplet, so it's wrong.  Fix this by
+removing the forced assignment, so the configure script's knowledge of where it
+put libtool is used.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- freetype-2.6/builds/unix/unix-cc.in.orig	2016-01-07 19:21:45.244943479 +0000
++++ 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@
diff --git a/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.3.bb b/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.3.bb
new file mode 100644
index 0000000..3ed9070
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.3.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Freetype font rendering library"
+DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
+highly customizable, and portable while capable of producing high-quality output (glyph \
+images). It can be used in graphics libraries, display servers, font conversion tools, text \
+image generation tools, and many other products as well."
+HOMEPAGE = "http://www.freetype.org/"
+BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
+SECTION = "libs"
+
+LICENSE = "FreeType | GPLv2+"
+LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=4af6221506f202774ef74f64932878a1 \
+                    file://docs/FTL.TXT;md5=d479e83797f699fe873b38dadd0fcd4c \
+                    file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \
+           file://use-right-libtool.patch"
+
+SRC_URI[md5sum] = "0037b25a8c090bc8a1218e867b32beb1"
+SRC_URI[sha256sum] = "371e707aa522acf5b15ce93f11183c725b8ed1ee8546d7b3af549863045863a2"
+
+inherit autotools pkgconfig binconfig-disabled multilib_header
+
+# Adapt autotools to work with the minimal autoconf usage in freetype
+AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
+CONFIGURE_SCRIPT = "${S}/configure"
+EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake"
+
+PACKAGECONFIG ??= "zlib"
+
+PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
+# harfbuzz results in a circular dependency so enabling is non-trivial
+PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
+PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+
+EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
+
+TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
+
+do_install_append() {
+	oe_multilib_header freetype2/freetype/config/ftconfig.h
+}
+
+BINCONFIG = "${bindir}/freetype-config"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.bb b/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.bb
deleted file mode 100644
index 70599c6..0000000
--- a/yocto-poky/meta/recipes-graphics/freetype/freetype_2.6.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "Freetype font rendering library"
-DESCRIPTION = "FreeType is a software font engine that is designed to be small, efficient, \
-highly customizable, and portable while capable of producing high-quality output (glyph \
-images). It can be used in graphics libraries, display servers, font conversion tools, text \
-image generation tools, and many other products as well."
-HOMEPAGE = "http://www.freetype.org/"
-BUGTRACKER = "https://savannah.nongnu.org/bugs/?group=freetype"
-
-LICENSE = "FreeType | GPLv2+"
-LIC_FILES_CHKSUM = "file://docs/LICENSE.TXT;md5=c017ff17fc6f0794adf93db5559ccd56 \
-                    file://docs/FTL.TXT;md5=d479e83797f699fe873b38dadd0fcd4c \
-                    file://docs/GPLv2.TXT;md5=8ef380476f642c20ebf40fecb0add2ec"
-
-SECTION = "libs"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2"
-SRC_URI[md5sum] = "5682890cb0267f6671dd3de6eabd3e69"
-SRC_URI[sha256sum] = "8469fb8124764f85029cc8247c31e132a2c5e51084ddce2a44ea32ee4ae8347e"
-
-BINCONFIG = "${bindir}/freetype-config"
-
-inherit autotools-brokensep pkgconfig binconfig-disabled multilib_header
-
-LIBTOOL = "${S}/builds/unix/${HOST_SYS}-libtool"
-EXTRA_OEMAKE = "'LIBTOOL=${LIBTOOL}'"
-EXTRA_OEMAKE_class-native = ""
-EXTRA_OECONF = "--without-zlib --without-bzip2 CC_BUILD='${BUILD_CC}'"
-TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
-
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
-# This results in a circular dependency so enabling is non-trivial
-PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
-
-do_configure() {
-	cd builds/unix
-	libtoolize --force --copy
-	aclocal -I .
-	gnu-configize --force
-	autoconf
-	cd ${S}
-	oe_runconf
-}
-
-do_configure_class-native() {
-	(cd builds/unix && gnu-configize) || die "failure running gnu-configize"
-	oe_runconf
-}
-
-do_compile_prepend() {
-	${BUILD_CC} -o objs/apinames src/tools/apinames.c
-}
-
-do_install_append() {
-	oe_multilib_header freetype2/config/ftconfig.h
-}
-
-BBCLASSEXTEND = "native"
-
diff --git a/yocto-poky/meta/recipes-graphics/glew/glew/autotools.patch b/yocto-poky/meta/recipes-graphics/glew/glew/autotools.patch
deleted file mode 100644
index 7dfe087..0000000
--- a/yocto-poky/meta/recipes-graphics/glew/glew/autotools.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: glew/Makefile.am
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ glew/Makefile.am	2009-12-02 00:30:23.296641663 +0100
-@@ -0,0 +1,5 @@
-+
-+ACLOCAL_AMFLAGS = -I m4 --install
-+
-+SUBDIRS = include src
-+
-Index: glew/configure.ac
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ glew/configure.ac	2009-12-02 00:30:23.296641663 +0100
-@@ -0,0 +1,67 @@
-+#                                               -*- Autoconf -*-
-+# Process this file with autoconf to produce a configure script.
-+
-+AC_PREREQ([2.62])
-+AC_INIT([glew], [1.9.0], [BUG-REPORT-ADDRESS])
-+AC_CONFIG_SRCDIR([src/glew.c])
-+AC_CONFIG_HEADERS([config.h])
-+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
-+AC_CONFIG_MACRO_DIR([m4])
-+
-+LT_INIT
-+
-+# Checks for programs.
-+AC_PROG_CC
-+AC_PROG_INSTALL
-+AC_PROG_LN_S
-+
-+# Checks for libraries.
-+
-+# Checks for header files.
-+AC_CHECK_HEADERS([inttypes.h stddef.h stdint.h stdlib.h string.h])
-+
-+# Checks for typedefs, structures, and compiler characteristics.
-+AC_TYPE_INT32_T
-+AC_TYPE_INT64_T
-+AC_TYPE_UINT64_T
-+AC_CHECK_TYPES([ptrdiff_t])
-+
-+# Checks for library functions.
-+AC_FUNC_MALLOC
-+AC_CHECK_FUNCS([strtol])
-+
-+# Check for pkgconfig libs
-+
-+PKG_CHECK_MODULES([X11], [x11])
-+AC_SUBST([X11_LIBS])
-+AC_SUBST([X11_CFLAGS])
-+
-+PKG_CHECK_MODULES([XMU], [xmu])
-+AC_SUBST([XMU_LIBS])
-+AC_SUBST([XMU_CFLAGS])
-+
-+PKG_CHECK_MODULES([XI], [xi])
-+AC_SUBST([XI_LIBS])
-+AC_SUBST([XI_CFLAGS])
-+
-+PKG_CHECK_MODULES([XEXT], [xext])
-+AC_SUBST([XEXT_LIBS])
-+AC_SUBST([XEXT_CFLAGS])
-+
-+# Check for GLU is enough and imples gl so no doubled -lGL in LDFLAGS
-+PKG_CHECK_MODULES([GLU], [glu])
-+AC_SUBST([GLU_LIBS])
-+AC_SUBST([GLU_CFLAGS])
-+
-+# ENABLE option for Multiple Rendering Contexts support
-+AC_CHECK_ENABLE_GLEWMX
-+
-+# for now we use the same version as the package, but that should be avoided
-+# in the future
-+
-+AC_SUBST([LIBGLEW_SO_VERSION], [1:9:0])
-+
-+AC_CONFIG_FILES([Makefile
-+                 include/Makefile
-+                 src/Makefile])
-+AC_OUTPUT
-Index: glew/src/Makefile.am
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ glew/src/Makefile.am	2009-12-02 00:33:48.690786110 +0100
-@@ -0,0 +1,35 @@
-+
-+AM_CPPFLAGS = -I$(top_srcdir)/include
-+
-+if ENABLE_GLEWMX
-+AM_CPPFLAGS += -DGLEW_MX
-+endif
-+
-+AM_CFLAGS = @X11_CFLAGS@ \
-+            @XMU_CFLAGS@ \
-+            @XI_CFLAGS@ \
-+            @XEXT_CFLAGS@ \
-+            @GLU_CFLAGS@
-+
-+lib_LTLIBRARIES = libGLEW.la
-+
-+libGLEW_la_SOURCES = glew.c
-+
-+libGLEW_la_LIBADD = @X11_LIBS@ \
-+                    @XMU_LIBS@ \
-+                    @XI_LIBS@ \
-+                    @XEXT_LIBS@ \
-+                    @GLU_LIBS@
-+
-+libGLEW_la_LDFLAGS = -version-number @LIBGLEW_SO_VERSION@
-+
-+bin_PROGRAMS = glewinfo visualinfo
-+
-+glewinfo_SOURCES = glewinfo.c
-+
-+glewinfo_LDADD = libGLEW.la
-+
-+visualinfo_SOURCES =  visualinfo.c
-+
-+visualinfo_LDADD = libGLEW.la
-+
-Index: glew/m4/glewmx.m4
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ glew/m4/glewmx.m4	2009-12-02 00:30:23.296641663 +0100
-@@ -0,0 +1,11 @@
-+
-+AC_DEFUN([AC_CHECK_ENABLE_GLEWMX],[
-+AC_MSG_CHECKING([whether to include Multiple Rendering Contexts support])
-+AC_ARG_ENABLE([glewmx],
-+   [AS_HELP_STRING([--enable-glewmx], [enable GLEW Multiple Rendering Contexts (default is no)])],
-+   [ENABLE_GLEWMX="$enableval"],
-+   [ENABLE_GLEWMX="no"])
-+AC_MSG_RESULT([${ENABLE_GLEWMX}])
-+AM_CONDITIONAL([ENABLE_GLEWMX], [test x"${ENABLE_GLEWMX}" = "xyes"])
-+])
-+
-Index: glew/include/Makefile.am
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ glew/include/Makefile.am	2009-12-02 00:30:23.296641663 +0100
-@@ -0,0 +1,3 @@
-+
-+nobase_include_HEADERS = GL/glew.h  GL/glxew.h  GL/wglew.h
-+
diff --git a/yocto-poky/meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch b/yocto-poky/meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch
deleted file mode 100644
index 70a99ae..0000000
--- a/yocto-poky/meta/recipes-graphics/glew/glew/fix-glew.pc-install.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-
-We maintain the autotools configure.ac and Makefile.am, to correctly
-provide the glew.pc, the following patch is needed.
-
-Upstream-Status: Inappropriate
-
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
-
-Index: glew-1.11.0/Makefile.am
-===================================================================
---- glew-1.11.0.orig/Makefile.am
-+++ glew-1.11.0/Makefile.am
-@@ -3,3 +3,5 @@ ACLOCAL_AMFLAGS = -I m4 --install
- 
- SUBDIRS = include src
- 
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = glew.pc
-Index: glew-1.11.0/configure.ac
-===================================================================
---- glew-1.11.0.orig/configure.ac
-+++ glew-1.11.0/configure.ac
-@@ -66,5 +66,6 @@ AC_SUBST([LIBGLEW_SO_VERSION], [1:9:0])
- 
- AC_CONFIG_FILES([Makefile
-                  include/Makefile
--                 src/Makefile])
-+                 src/Makefile
-+                 glew.pc])
- AC_OUTPUT
-Index: glew-1.11.0/glew.pc.in
-===================================================================
---- glew-1.11.0.orig/glew.pc.in
-+++ glew-1.11.0/glew.pc.in
-@@ -5,7 +5,7 @@ includedir=${prefix}/include/GL
- 
- Name: glew
- Description: The OpenGL Extension Wrangler library
--Version: @version@
--Cflags: -I${includedir} @cflags@
--Libs: -L${libdir} -l@libname@
--Requires: @requireslib@
-+Version: @VERSION@
-+Cflags: -I${includedir} @CFLAGS@
-+Libs: -L${libdir} -lGLEW
-+Requires: glu
diff --git a/yocto-poky/meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch b/yocto-poky/meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch
deleted file mode 100644
index 0707efb..0000000
--- a/yocto-poky/meta/recipes-graphics/glew/glew/glew_fix_for_automake-1.12.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Upstream-Status: Pending
-
-This patch fixes following issue with automake 1.12
-
-| automake: warnings are treated as errors
-| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: warning: 'libGLEW.la': linking libtool libraries using a non-POSIX
-| /srv/home/nitin/builds/build-gcc47/tmp/sysroots/x86_64-linux/usr/share/automake-1.12/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2012/05/03
-
-Index: glew-1.7.0/configure.ac
-===================================================================
---- glew-1.7.0.orig/configure.ac
-+++ glew-1.7.0/configure.ac
-@@ -14,6 +14,9 @@ LT_INIT
- AC_PROG_CC
- AC_PROG_INSTALL
- AC_PROG_LN_S
-+# automake 1.12 seems to require this, but automake 1.11 doesn't recognize it
-+m4_pattern_allow([AM_PROG_AR])
-+AM_PROG_AR
- 
- # Checks for libraries.
- 
diff --git a/yocto-poky/meta/recipes-graphics/glew/glew/no-strip.patch b/yocto-poky/meta/recipes-graphics/glew/glew/no-strip.patch
new file mode 100644
index 0000000..e411f11
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/glew/glew/no-strip.patch
@@ -0,0 +1,12 @@
+Don't forcibly strip the binaries.
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Upstream-Status: Pending
+
+diff --git a/Makefile b/Makefile
+index 6a9803c..170c0ce 100644
+--- a/Makefile
++++ b/Makefile
+@@ -285 +285 @@ install.bin: glew.bin
+-	$(INSTALL) -s -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"
++	$(INSTALL) -m 0755 bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN) "$(DESTDIR)$(BINDIR)/"
diff --git a/yocto-poky/meta/recipes-graphics/glew/glew_1.12.0.bb b/yocto-poky/meta/recipes-graphics/glew/glew_1.12.0.bb
deleted file mode 100644
index eb28c4d..0000000
--- a/yocto-poky/meta/recipes-graphics/glew/glew_1.12.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "OpenGL extension loading library"
-DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
-HOMEPAGE = "http://glew.sourceforge.net/"
-BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
-SECTION = "x11"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
-
-DEPENDS = "virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
-
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
-           file://autotools.patch \
-           file://glew_fix_for_automake-1.12.patch \
-           file://fix-glew.pc-install.patch \
-          "
-
-SRC_URI[md5sum] = "01246c7ecd135d99be031aa63f86dca1"
-SRC_URI[sha256sum] = "af58103f4824b443e7fa4ed3af593b8edac6f3a7be3b30911edbc7344f48e4bf"
-
-inherit autotools lib_package pkgconfig distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
diff --git a/yocto-poky/meta/recipes-graphics/glew/glew_1.13.0.bb b/yocto-poky/meta/recipes-graphics/glew/glew_1.13.0.bb
new file mode 100644
index 0000000..a25c405
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/glew/glew_1.13.0.bb
@@ -0,0 +1,40 @@
+SUMMARY = "OpenGL extension loading library"
+DESCRIPTION = "The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library."
+HOMEPAGE = "http://glew.sourceforge.net/"
+BUGTRACKER = "http://sourceforge.net/tracker/?group_id=67586"
+SECTION = "x11"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=2ac251558de685c6b9478d89be3149c2"
+
+DEPENDS = "virtual/libx11 virtual/libgl libglu libxext libxi libxmu"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/project/glew/glew/${PV}/glew-${PV}.tgz \
+           file://no-strip.patch"
+
+SRC_URI[md5sum] = "7cbada3166d2aadfc4169c4283701066"
+SRC_URI[sha256sum] = "aa25dc48ed84b0b64b8d41cdd42c8f40f149c37fa2ffa39cd97f42c78d128bc7"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/glew/files/glew"
+UPSTREAM_CHECK_REGEX = "/glew/(?P<pver>(\d+[\.\-_]*)+)/"
+
+inherit lib_package pkgconfig distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+# Override SYSTEM to avoid calling config.guess, we're cross-compiling.  Pass
+# our CFLAGS via POPT as that's the optimisation variable and safely
+# overwritten.
+EXTRA_OEMAKE = "SYSTEM='linux' \
+                CC='${CC}' LD='${CC}' STRIP='' \
+                LDFLAGS.EXTRA='${LDFLAGS}' \
+                POPT='${CFLAGS}' \
+                GLEW_PREFIX='${prefix}' BINDIR='${bindir}' \
+                LIBDIR='${libdir}' INCDIR='${includedir}/GL'"
+
+do_compile() {
+	oe_runmake
+}
+
+do_install() {
+	oe_runmake 'DESTDIR=${D}' install.all
+}
diff --git a/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.0.2.bb b/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.0.2.bb
deleted file mode 100644
index 670bd98..0000000
--- a/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.0.2.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "Text shaping library"
-DESCRIPTION = "HarfBuzz is an OpenType text shaping engine."
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
-                    file://src/hb-ucdn/COPYING;md5=994ba0f1295f15b4bda4999a5bbeddef \
-"
-
-SECTION = "libs"
-
-SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
-SRC_URI[md5sum] = "e74f644045fe42c38a2641fc1e82a800"
-SRC_URI[sha256sum] = "beb3caf8654010fcdca61c810a3a7532237fc567ee4271deb674b5efbbe3b466"
-
-inherit autotools pkgconfig lib_package
-
-DEPENDS = "glib-2.0 cairo freetype"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF = "--with-glib --with-freetype --with-cairo --without-graphite2"
-
-PACKAGECONFIG ??= "icu"
-PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu"
-
-PACKAGES =+ "${PN}-icu ${PN}-icu-dbg ${PN}-icu-dev"
-
-FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"
-FILES_${PN}-icu-dbg = "${libdir}/.debug/libharfbuzz-icu.so*"
-FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
-                       ${libdir}/libharfbuzz-icu.so \
-                       ${libdir}/pkgconfig/harfbuzz-icu.pc \
-"
diff --git a/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.2.3.bb b/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.2.3.bb
new file mode 100644
index 0000000..cfe885f
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/harfbuzz/harfbuzz_1.2.3.bb
@@ -0,0 +1,39 @@
+SUMMARY = "Text shaping library"
+DESCRIPTION = "HarfBuzz is an OpenType text shaping engine."
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/HarfBuzz"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=HarfBuzz"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e021dd6dda6ff1e6b1044002fc662b9b \
+                    file://src/hb-ucdn/COPYING;md5=994ba0f1295f15b4bda4999a5bbeddef \
+"
+
+DEPENDS = "glib-2.0 cairo fontconfig freetype"
+
+SRC_URI = "http://www.freedesktop.org/software/harfbuzz/release/${BP}.tar.bz2"
+
+SRC_URI[md5sum] = "da8d97e262e6ef8288e1ae76369421bd"
+SRC_URI[sha256sum] = "8216d2404aaab7fde87be0365a90d64aa6c55928e104557cfcb37b54a096cb8c"
+
+inherit autotools pkgconfig lib_package
+
+PACKAGECONFIG ??= "icu"
+PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu"
+
+EXTRA_OECONF = " \
+    --with-cairo \
+    --with-fontconfig \
+    --with-freetype \
+    --with-glib \
+    --without-graphite2 \
+"
+
+PACKAGES =+ "${PN}-icu ${PN}-icu-dev"
+
+FILES_${PN}-icu = "${libdir}/libharfbuzz-icu.so.*"
+FILES_${PN}-icu-dev = "${libdir}/libharfbuzz-icu.la \
+                       ${libdir}/libharfbuzz-icu.so \
+                       ${libdir}/pkgconfig/harfbuzz-icu.pc \
+"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_8d+1.4.2.bb b/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_8d+1.4.2.bb
new file mode 100644
index 0000000..4859431
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/jpeg/libjpeg-turbo_8d+1.4.2.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression"
+HOMEPAGE = "http://libjpeg-turbo.org/"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://cdjpeg.h;endline=12;md5=cad955d15145c3fdceec6855e078e953 \
+                    file://jpeglib.h;endline=14;md5=dfc803dc51ae21178d1376ec73c4454d \
+                    file://djpeg.c;endline=9;md5=e93a8f2061e8a0ac71c7a485c10489e2 \
+"
+
+DEPENDS = "nasm-native"
+
+BASEPV = "${@d.getVar('PV',True).split('+')[1]}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${BASEPV}.tar.gz"
+SRC_URI[md5sum] = "86b0d5f7507c2e6c21c00219162c3c44"
+SRC_URI[sha256sum] = "521bb5d3043e7ac063ce3026d9a59cc2ab2e9636c655a2515af5f4706122233e"
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libjpeg-turbo/files/"
+UPSTREAM_CHECK_REGEX = "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"
+
+S = "${WORKDIR}/${BPN}-${BASEPV}"
+
+# Drop-in replacement for jpeg
+PROVIDES = "jpeg"
+RPROVIDES_${PN} += "jpeg"
+RREPLACES_${PN} += "jpeg"
+RCONFLICTS_${PN} += "jpeg"
+
+inherit autotools pkgconfig
+
+# Work around missing x32 ABI support
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--without-simd", "", d)}"
+
+PACKAGES =+ "jpeg-tools libturbojpeg"
+
+DESCRIPTION_jpeg-tools = "The jpeg-tools package includes client programs to access libjpeg functionality.  These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library."
+FILES_jpeg-tools = "${bindir}/*"
+
+DESCRIPTION_libturbojpeg = "A SIMD-accelerated JPEG codec which provides only TurboJPEG APIs"
+FILES_libturbojpeg = "${libdir}/libturbojpeg.so.*"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_git.bb b/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_git.bb
index ad17293..6c247cc 100644
--- a/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_git.bb
+++ b/yocto-poky/meta/recipes-graphics/libepoxy/libepoxy_git.bb
@@ -17,7 +17,9 @@
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+# depends on virtual/egl
+REQUIRED_DISTRO_FEATURES = "opengl"
 
 DEPENDS = "util-macros virtual/egl"
 
diff --git a/yocto-poky/meta/recipes-graphics/libsdl/libsdl-1.2.15/configure_tweak.patch b/yocto-poky/meta/recipes-graphics/libsdl/libsdl-1.2.15/configure_tweak.patch
deleted file mode 100644
index 3f97639..0000000
--- a/yocto-poky/meta/recipes-graphics/libsdl/libsdl-1.2.15/configure_tweak.patch
+++ /dev/null
@@ -1,1111 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Index: SDL-1.2.15/configure.in
-===================================================================
---- SDL-1.2.15.orig/configure.in
-+++ SDL-1.2.15/configure.in
-@@ -48,9 +48,9 @@ AC_CONFIG_AUX_DIR([build-scripts])
- dnl AC_CANONICAL_HOST
- AC_C_BIGENDIAN
- if test x$ac_cv_c_bigendian = xyes; then
--    AC_DEFINE(SDL_BYTEORDER, 4321)
-+    AC_DEFINE(SDL_BYTEORDER, 4321, "Byte Order")
- else
--    AC_DEFINE(SDL_BYTEORDER, 1234)
-+    AC_DEFINE(SDL_BYTEORDER, 1234, "Byte Order")
- fi
- 
- dnl Check for tools
-@@ -134,7 +134,7 @@ AC_ARG_ENABLE(libc,
- AC_HELP_STRING([--enable-libc], [Use the system C library [[default=yes]]]),
-               , enable_libc=yes)
- if test x$enable_libc = xyes; then
--    AC_DEFINE(HAVE_LIBC)
-+    AC_DEFINE(HAVE_LIBC,1,"")
- 
-     dnl Check for C library headers
-     AC_HEADER_STDC
-@@ -145,7 +145,7 @@ if test x$enable_libc = xyes; then
-     if test x$ac_cv_header_inttypes_h = xyes -o x$ac_cv_header_stdint_h = xyes; then
-         AC_CHECK_TYPE(int64_t)
-         if test x$ac_cv_type_int64_t = xyes; then
--            AC_DEFINE(SDL_HAS_64BIT_TYPE)
-+            AC_DEFINE(SDL_HAS_64BIT_TYPE,1,"")
-         fi
-         have_inttypes=yes
-     fi
-@@ -161,11 +161,11 @@ if test x$enable_libc = xyes; then
- 
-     AC_FUNC_MEMCMP
-     if test x$ac_cv_func_memcmp_working = xyes; then
--        AC_DEFINE(HAVE_MEMCMP)
-+        AC_DEFINE(HAVE_MEMCMP,1,"")
-     fi
-     AC_FUNC_STRTOD
-     if test x$ac_cv_func_strtod = xyes; then
--        AC_DEFINE(HAVE_STRTOD)
-+        AC_DEFINE(HAVE_STRTOD,1,"")
-     fi
-     AC_CHECK_FUNC(mprotect,
-         AC_TRY_COMPILE([
-@@ -191,40 +191,40 @@ if test x$have_inttypes != xyes; then
-     AC_CHECK_SIZEOF(long, 4)
-     AC_CHECK_SIZEOF(long long, 8)
-     if test x$ac_cv_sizeof_char = x1; then
--        AC_DEFINE(int8_t, signed char)
--        AC_DEFINE(uint8_t, unsigned char)
-+        AC_DEFINE(int8_t, signed char,"")
-+        AC_DEFINE(uint8_t, unsigned char,"")
-     fi
-     if test x$ac_cv_sizeof_short = x2; then
--        AC_DEFINE(int16_t, signed short)
--        AC_DEFINE(uint16_t, unsigned short)
-+        AC_DEFINE(int16_t, signed short,"")
-+        AC_DEFINE(uint16_t, unsigned short,"")
-     else
-         if test x$ac_cv_sizeof_int = x2; then
--            AC_DEFINE(int16_t, signed int)
--            AC_DEFINE(uint16_t, unsigned int)
-+            AC_DEFINE(int16_t, signed int,"")
-+            AC_DEFINE(uint16_t, unsigned int,"")
-         fi
-     fi
-     if test x$ac_cv_sizeof_int = x4; then
--        AC_DEFINE(int32_t, signed int)
--        AC_DEFINE(uint32_t, unsigned int)
-+        AC_DEFINE(int32_t, signed int,"")
-+        AC_DEFINE(uint32_t, unsigned int,"")
-     else
-         if test x$ac_cv_sizeof_long = x4; then
--            AC_DEFINE(int32_t, signed long)
--            AC_DEFINE(uint32_t, unsigned long)
-+            AC_DEFINE(int32_t, signed long,"")
-+            AC_DEFINE(uint32_t, unsigned long,"")
-         fi
-     fi
-     if test x$ac_cv_sizeof_long = x8; then
--        AC_DEFINE(int64_t, signed long)
--        AC_DEFINE(uint64_t, unsigned long)
--        AC_DEFINE(SDL_HAS_64BIT_TYPE)
-+        AC_DEFINE(int64_t, signed long,"")
-+        AC_DEFINE(uint64_t, unsigned long,"")
-+        AC_DEFINE(SDL_HAS_64BIT_TYPE,"")
-     else
-         if test x$ac_cv_sizeof_long_long = x8; then
--            AC_DEFINE(int64_t, signed long long)
--            AC_DEFINE(uint64_t, unsigned long long)
--            AC_DEFINE(SDL_HAS_64BIT_TYPE)
-+            AC_DEFINE(int64_t, signed long long,"")
-+            AC_DEFINE(uint64_t, unsigned long long,"")
-+            AC_DEFINE(SDL_HAS_64BIT_TYPE,"")
-         fi
-     fi
--    AC_DEFINE(size_t, unsigned int)
--    AC_DEFINE(uintptr_t, unsigned long)
-+    AC_DEFINE(size_t, unsigned int,"")
-+    AC_DEFINE(uintptr_t, unsigned long,"")
- fi
- 
- # Standard C sources
-@@ -245,25 +245,25 @@ AC_ARG_ENABLE(audio,
- AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
-               , enable_audio=yes)
- if test x$enable_audio != xyes; then
--    AC_DEFINE(SDL_AUDIO_DISABLED)
-+    AC_DEFINE(SDL_AUDIO_DISABLED,1,"")
- fi
- AC_ARG_ENABLE(video,
- AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
-               , enable_video=yes)
- if test x$enable_video != xyes; then
--    AC_DEFINE(SDL_VIDEO_DISABLED)
-+    AC_DEFINE(SDL_VIDEO_DISABLED,1,"")
- fi
- AC_ARG_ENABLE(events,
- AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
-               , enable_events=yes)
- if test x$enable_events != xyes; then
--    AC_DEFINE(SDL_EVENTS_DISABLED)
-+    AC_DEFINE(SDL_EVENTS_DISABLED,1,"")
- fi
- AC_ARG_ENABLE(joystick,
- AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
-               , enable_joystick=yes)
- if test x$enable_joystick != xyes; then
--    AC_DEFINE(SDL_JOYSTICK_DISABLED)
-+    AC_DEFINE(SDL_JOYSTICK_DISABLED,1,"")
- else
-     SOURCES="$SOURCES $srcdir/src/joystick/*.c"
- fi
-@@ -271,43 +271,43 @@ AC_ARG_ENABLE(cdrom,
- AC_HELP_STRING([--enable-cdrom], [Enable the cdrom subsystem [[default=yes]]]),
-               , enable_cdrom=yes)
- if test x$enable_cdrom != xyes; then
--    AC_DEFINE(SDL_CDROM_DISABLED)
-+    AC_DEFINE(SDL_CDROM_DISABLED,1,"")
- fi
- AC_ARG_ENABLE(threads,
- AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
-               , enable_threads=yes)
- if test x$enable_threads != xyes; then
--    AC_DEFINE(SDL_THREADS_DISABLED)
-+    AC_DEFINE(SDL_THREADS_DISABLED,1,"")
- fi
- AC_ARG_ENABLE(timers,
- AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
-               , enable_timers=yes)
- if test x$enable_timers != xyes; then
--    AC_DEFINE(SDL_TIMERS_DISABLED)
-+    AC_DEFINE(SDL_TIMERS_DISABLED,1,"")
- fi
- AC_ARG_ENABLE(file,
- AC_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
-               , enable_file=yes)
- if test x$enable_file != xyes; then
--    AC_DEFINE(SDL_FILE_DISABLED)
-+    AC_DEFINE(SDL_FILE_DISABLED,1,"")
- fi
- AC_ARG_ENABLE(loadso,
- AC_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [[default=yes]]]),
-               , enable_loadso=yes)
- if test x$enable_loadso != xyes; then
--    AC_DEFINE(SDL_LOADSO_DISABLED)
-+    AC_DEFINE(SDL_LOADSO_DISABLED,1,"")
- fi
- AC_ARG_ENABLE(cpuinfo,
- AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
-               , enable_cpuinfo=yes)
- if test x$enable_cpuinfo != xyes; then
--    AC_DEFINE(SDL_CPUINFO_DISABLED)
-+    AC_DEFINE(SDL_CPUINFO_DISABLED,1,"")
- fi
- AC_ARG_ENABLE(assembly,
- AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
-               , enable_assembly=yes)
- if test x$enable_assembly = xyes; then
--    AC_DEFINE(SDL_ASSEMBLY_ROUTINES)
-+    AC_DEFINE(SDL_ASSEMBLY_ROUTINES,1,"")
- fi
- 
- dnl See if the OSS audio interface is supported
-@@ -335,12 +335,12 @@ AC_HELP_STRING([--enable-oss], [support
-               int arg = SNDCTL_DSP_SETFRAGMENT;
-             ],[
-             have_oss=yes
--            AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H,1,"")
-             ])
-         fi
-         AC_MSG_RESULT($have_oss)
-         if test x$have_oss = xyes; then
--            AC_DEFINE(SDL_AUDIO_DRIVER_OSS)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_OSS,1,"")
-             SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
-             SOURCES="$SOURCES $srcdir/src/audio/dma/*.c"
-             have_audio=yes
-@@ -407,7 +407,7 @@ CheckDMEDIA()
-         AC_MSG_RESULT($have_dmedia)
-         # Set up files for the audio library
-         if test x$have_dmedia = xyes; then
--            AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA,1,"")
-             SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laudio"
-             have_audio=yes
-@@ -444,7 +444,7 @@ CheckMME()
-         AC_MSG_RESULT($have_mme)
-         # Set up files for the audio library
-         if test x$have_mme = xyes; then
--            AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO,1,"")
-             SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
-             EXTRA_CFLAGS="$EXTRA_CFLAGS $MME_CFLAGS"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MME_LIBS"
-@@ -467,7 +467,7 @@ AC_HELP_STRING([--enable-esd-shared], [d
-                           , enable_esd_shared=yes)
-             esd_lib=[`find_lib "libesd.so.*" "$ESD_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
- 
--            AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_ESD,1,"")
-             SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
-             EXTRA_CFLAGS="$EXTRA_CFLAGS $ESD_CFLAGS"
-             if test x$have_loadso != xyes && \
-@@ -477,7 +477,7 @@ AC_HELP_STRING([--enable-esd-shared], [d
-             if test x$have_loadso = xyes && \
-                test x$enable_esd_shared = xyes && test x$esd_lib != x; then
-                 echo "-- dynamic libesd -> $esd_lib"
--                AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
-+                AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib", "")
-             else
-                 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ESD_LIBS"
-             fi
-@@ -564,7 +564,7 @@ AC_HELP_STRING([--enable-arts-shared], [
-                               , enable_arts_shared=yes)
-                 arts_lib=[`find_lib "libartsc.so.*" "$ARTS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
- 
--                AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
-+                AC_DEFINE(SDL_AUDIO_DRIVER_ARTS,, "")
-                 SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
-                 EXTRA_CFLAGS="$EXTRA_CFLAGS $ARTS_CFLAGS"
-                 if test x$have_loadso != xyes && \
-@@ -574,7 +574,7 @@ AC_HELP_STRING([--enable-arts-shared], [
-                 if test x$have_loadso = xyes && \
-                    test x$enable_arts_shared = xyes && test x$arts_lib != x; then
-                     echo "-- dynamic libartsc -> $arts_lib"
--                    AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
-+                    AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib",1,"")
-                 else
-                     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARTS_LIBS"
-                 fi
-@@ -634,7 +634,7 @@ AC_HELP_STRING([--enable-nas-shared], [d
-                 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $NAS_LIBS"
-             fi
- 
--            AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_NAS,1,"")
-             SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
-             EXTRA_CFLAGS="$EXTRA_CFLAGS $NAS_CFLAGS"
-             have_audio=yes
-@@ -649,7 +649,7 @@ CheckDiskAudio()
- AC_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
-                   , enable_diskaudio=yes)
-     if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
--        AC_DEFINE(SDL_AUDIO_DRIVER_DISK)
-+        AC_DEFINE(SDL_AUDIO_DRIVER_DISK,1,"")
-         SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
-     fi
- }
-@@ -661,7 +661,7 @@ CheckDummyAudio()
- AC_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
-                   , enable_dummyaudio=yes)
-     if test x$enable_audio = xyes -a x$enable_dummyaudio = xyes; then
--        AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY)
-+        AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY,1,"")
-         SOURCES="$SOURCES $srcdir/src/audio/dummy/*.c"
-     fi
- }
-@@ -677,7 +677,7 @@ AC_HELP_STRING([--enable-mintaudio], [su
-         AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
-         if test x$have_mint_falcon_hdr = xyes; then
-             mintaudio=yes
--            AC_DEFINE(SDL_AUDIO_DRIVER_MINT)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_MINT,1,"")
-             SOURCES="$SOURCES $srcdir/src/audio/mint/*.c"
-             SOURCES="$SOURCES $srcdir/src/audio/mint/*.S"
-             have_audio=yes
-@@ -746,7 +746,7 @@ AC_HELP_STRING([--enable-nasm], [use nas
-         CompileNASM unquoted-sections || NASM=""
- 
-         if test "x$NASM" != x -a "x$NASM" != x'"$NASM"'; then
--            AC_DEFINE(SDL_HERMES_BLITTERS)
-+            AC_DEFINE(SDL_HERMES_BLITTERS,1,"")
-             SOURCES="$SOURCES $srcdir/src/hermes/*.asm"
-             NASMFLAGS="$NASMFLAGS -I $srcdir/src/hermes/"
- 
-@@ -840,9 +840,9 @@ AC_HELP_STRING([--enable-altivec], [use
-         CFLAGS="$save_CFLAGS"
- 
-         if test x$have_gcc_altivec = xyes; then
--            AC_DEFINE(SDL_ALTIVEC_BLITTERS)
-+            AC_DEFINE(SDL_ALTIVEC_BLITTERS,1,"")
-             if test x$have_altivec_h_hdr = xyes; then
--              AC_DEFINE(HAVE_ALTIVEC_H)
-+              AC_DEFINE(HAVE_ALTIVEC_H,1,"")
-             fi
-             EXTRA_CFLAGS="$EXTRA_CFLAGS $altivec_CFLAGS"
-         fi
-@@ -920,7 +920,7 @@ AC_HELP_STRING([--enable-ipod], [configu
- 
-     if test x$enable_ipod = xyes; then
-         EXTRA_CFLAGS="$EXTRA_CFLAGS -DIPOD"
--        AC_DEFINE(SDL_VIDEO_DRIVER_IPOD)
-+        AC_DEFINE(SDL_VIDEO_DRIVER_IPOD,1,"")
-         SOURCES="$SOURCES $srcdir/src/video/ipod/*.c"
-     fi
- }
-@@ -954,7 +954,7 @@ CheckNANOX()
-             EXTRA_CFLAGS="$EXTRA_CFLAGS -DENABLE_NANOX_DIRECT_FB"
-         fi
- 
--        AC_DEFINE(SDL_VIDEO_DRIVER_NANOX)
-+        AC_DEFINE(SDL_VIDEO_DRIVER_NANOX,1,"")
-         SOURCES="$SOURCES $srcdir/src/video/nanox/*.c"
-         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lnano-X"
-         have_video=yes
-@@ -1020,7 +1020,7 @@ AC_HELP_STRING([--enable-x11-shared], [d
-             CFLAGS="$CFLAGS $X_CFLAGS"
-             LDFLAGS="$LDFLAGS $X_LIBS"
- 
--            AC_DEFINE(SDL_VIDEO_DRIVER_X11)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_X11,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
-             EXTRA_CFLAGS="$EXTRA_CFLAGS $X_CFLAGS"
- 
-@@ -1042,8 +1042,8 @@ AC_HELP_STRING([--enable-x11-shared], [d
-                test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
-                 echo "-- dynamic libX11 -> $x11_lib"
-                 echo "-- dynamic libX11ext -> $x11ext_lib"
--                AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
--                AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
-+                AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib","")
-+                AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib","")
-             else
-                 enable_x11_shared=no
-                 EXTRA_LDFLAGS="$EXTRA_LDFLAGS $X_LIBS -lX11 -lXext"
-@@ -1060,20 +1060,20 @@ AC_HELP_STRING([--enable-dga], [allow us
- AC_HELP_STRING([--enable-video-dga], [use DGA 2.0 video driver [[default=yes]]]),
-                   , enable_video_dga=yes)
-             if test x$enable_dga = xyes -a x$enable_video_dga = xyes; then
--                AC_DEFINE(SDL_VIDEO_DRIVER_DGA)
-+                AC_DEFINE(SDL_VIDEO_DRIVER_DGA,1,"")
-                 SOURCES="$SOURCES $srcdir/src/video/dga/*.c"
-             fi
-             AC_ARG_ENABLE(video-x11-dgamouse,
- AC_HELP_STRING([--enable-video-x11-dgamouse], [use X11 DGA for mouse events [[default=yes]]]),
-                           , enable_video_x11_dgamouse=yes)
-             if test x$enable_dga = xyes -a x$enable_video_x11_dgamouse = xyes; then
--                AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE)
-+                AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE,1,"")
-             fi
-             AC_ARG_ENABLE(video-x11-vm,
- AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
-                           , enable_video_x11_vm=yes)
-             if test x$enable_video_x11_vm = xyes; then
--                AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
-+                AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE,1,"")
-                 SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
-             fi
-             AC_ARG_ENABLE(video-x11-xv,
-@@ -1087,14 +1087,14 @@ AC_HELP_STRING([--enable-video-x11-xv],
- AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
-                             , enable_video_x11_xinerama=yes)
-             if test x$enable_video_x11_xinerama = xyes; then
--                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
-+                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA,1,"")
-                 SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
-             fi
-             AC_ARG_ENABLE(video-x11-xme,
- AC_HELP_STRING([--enable-video-x11-xme], [enable Xi Graphics XME for fullscreen [[default=yes]]]),
-                             , enable_video_x11_xme=yes)
-             if test x$enable_video_x11_xme = xyes; then
--                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME)
-+                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME,1,"")
-                 SOURCES="$SOURCES $srcdir/src/video/Xext/XME/*.c"
-             fi
-             AC_ARG_ENABLE(video-x11-xrandr,
-@@ -1111,8 +1111,8 @@ AC_HELP_STRING([--enable-video-x11-xrand
-                     if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
-                         echo "-- dynamic libXrender -> $xrender_lib"
-                         echo "-- dynamic libXrandr -> $xrandr_lib"
--                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib")
--                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
-+                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER, "$xrender_lib","")
-+                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib","")
-                         definitely_enable_video_x11_xrandr=yes
-                     else
-                         AC_CHECK_LIB(Xrender, XRenderQueryExtension, have_xrender_lib=yes)
-@@ -1125,7 +1125,7 @@ AC_HELP_STRING([--enable-video-x11-xrand
-                 fi
-             fi
-             if test x$definitely_enable_video_x11_xrandr = xyes; then
--                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
-+                AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR,1,"")
-             fi
-         fi
-     fi
-@@ -1152,7 +1152,7 @@ AC_HELP_STRING([--enable-video-photon],
-         ])
-         AC_MSG_RESULT($video_photon)
-         if test x$video_photon = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/photon/*.c"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lph"
-             have_video=yes
-@@ -1166,7 +1166,7 @@ dnl Set up the BWindow video driver if e
- CheckBWINDOW()
- {
-     if test x$enable_video = xyes; then
--        AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW)
-+        AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW,1,"")
-         SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc"
-         have_video=yes
-     fi
-@@ -1189,7 +1189,7 @@ AC_HELP_STRING([--enable-video-carbon],
-         ])
-         AC_MSG_RESULT($have_carbon)
-         if test x$have_carbon = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/maccommon/*.c"
-             SOURCES="$SOURCES $srcdir/src/video/macrom/*.c"
-             have_video=yes
-@@ -1218,7 +1218,7 @@ AC_HELP_STRING([--enable-video-cocoa], [
-         AC_MSG_RESULT($have_cocoa)
-         CFLAGS="$save_CFLAGS"
-         if test x$have_cocoa = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/quartz/*.m"
-             have_video=yes
-         fi
-@@ -1245,7 +1245,7 @@ AC_HELP_STRING([--enable-video-fbcon], [
-         AC_MSG_RESULT($video_fbcon)
-         if test x$video_fbcon = xyes; then
-             AC_CHECK_FUNCS(getpagesize)
--            AC_DEFINE(SDL_VIDEO_DRIVER_FBCON)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_FBCON,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/fbcon/*.c"
-             have_video=yes
-         fi
-@@ -1296,7 +1296,7 @@ AC_HELP_STRING([--enable-video-directfb]
-         AC_MSG_RESULT($video_directfb)
- 
-         if test x$video_directfb = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
-             EXTRA_CFLAGS="$EXTRA_CFLAGS $DIRECTFB_CFLAGS"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS $DIRECTFB_LIBS"
-@@ -1323,7 +1323,7 @@ AC_HELP_STRING([--enable-video-ps2gs], [
-         ])
-         AC_MSG_RESULT($video_ps2gs)
-         if test x$video_ps2gs = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/ps2gs/*.c"
-             have_video=yes
-         fi
-@@ -1376,7 +1376,7 @@ AC_HELP_STRING([--enable-video-ggi], [us
-         ])
-         AC_MSG_RESULT($video_ggi)
-         if test x$video_ggi = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_GGI)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_GGI,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/ggi/*.c"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lggi -lgii -lgg"
-             have_video=yes
-@@ -1406,7 +1406,7 @@ AC_HELP_STRING([--enable-video-svga], [u
-         ])
-         AC_MSG_RESULT($video_svga)
-         if test x$video_svga = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/svga/*.c"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvga"
-             have_video=yes
-@@ -1438,7 +1438,7 @@ AC_HELP_STRING([--enable-video-vgl], [us
-         ])
-         AC_MSG_RESULT($video_vgl)
-         if test x$video_vgl = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_VGL)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_VGL,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/vgl/*.c"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lvgl"
-             have_video=yes
-@@ -1466,7 +1466,7 @@ AC_HELP_STRING([--enable-video-wscons],
-         ])
-         AC_MSG_RESULT($video_wscons)
-         if test x$video_wscons = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/wscons/*.c"
-             have_video=yes
-         fi
-@@ -1491,7 +1491,7 @@ AC_HELP_STRING([--enable-video-aalib], [
-         ])
-         AC_MSG_RESULT($video_aalib)
-         if test x$video_aalib = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_AALIB)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_AALIB,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/aalib/*.c"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -laa"
-             have_video=yes
-@@ -1553,7 +1553,7 @@ AC_HELP_STRING([--enable-video-qtopia],
-         CXXFLAGS="$OLD_CXX"
-         AC_MSG_RESULT($video_qtopia)
-         if test x$video_qtopia = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc"
-             SDLMAIN_SOURCES="$srcdir/src/main/qtopia/*.cc"
-             SDLMAIN_LDFLAGS="-static"
-@@ -1583,7 +1583,7 @@ AC_HELP_STRING([--enable-video-picogui],
-         ])
-         AC_MSG_RESULT($video_picogui)
-         if test x$video_picogui = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/picogui/*.c"
-             SDL_LIBS="$SDL_LIBS -lpgui"
-             have_video=yes
-@@ -1607,7 +1607,7 @@ AC_HELP_STRING([--enable-video-xbios], [
-     video_xbios=no
-     if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
-         video_xbios=yes
--        AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS)
-+        AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS,1,"")
-         SOURCES="$SOURCES $srcdir/src/video/xbios/*.c"
-         have_video=yes
-     fi
-@@ -1625,7 +1625,7 @@ AC_HELP_STRING([--enable-video-gem], [us
-         AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
-         if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
-             video_gem=yes
--            AC_DEFINE(SDL_VIDEO_DRIVER_GEM)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_GEM,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/gem/*.c"
-             SDL_LIBS="$SDL_LIBS -lgem"
-             have_video=yes
-@@ -1640,7 +1640,7 @@ CheckDummyVideo()
- AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
-                   , enable_video_dummy=yes)
-     if test x$enable_video_dummy = xyes; then
--        AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY)
-+        AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY,1,"")
-         SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
-         have_video=yes
-     fi
-@@ -1667,8 +1667,8 @@ CheckOpenGLX11()
-         ])
-         AC_MSG_RESULT($video_opengl)
-         if test x$video_opengl = xyes; then
--            AC_DEFINE(SDL_VIDEO_OPENGL)
--            AC_DEFINE(SDL_VIDEO_OPENGL_GLX)
-+            AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
-+            AC_DEFINE(SDL_VIDEO_OPENGL_GLX,1,"")
-         fi
-     fi
- }
-@@ -1687,7 +1687,7 @@ CheckOpenGLQNX()
-         ])
-         AC_MSG_RESULT($video_opengl)
-         if test x$video_opengl = xyes; then
--            AC_DEFINE(SDL_VIDEO_OPENGL)
-+            AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
-         fi
-     fi
-@@ -1697,8 +1697,8 @@ dnl Check for Win32 OpenGL
- CheckWIN32GL()
- {
-     if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
--        AC_DEFINE(SDL_VIDEO_OPENGL)
--        AC_DEFINE(SDL_VIDEO_OPENGL_WGL)
-+        AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
-+        AC_DEFINE(SDL_VIDEO_OPENGL_WGL,1,"")
-     fi
- }
- 
-@@ -1706,7 +1706,7 @@ dnl Check for BeOS OpenGL
- CheckBeGL()
- {
-     if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
--        AC_DEFINE(SDL_VIDEO_OPENGL)
-+        AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
-         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lGL"
-     fi
- }
-@@ -1715,7 +1715,7 @@ dnl Check for MacOS OpenGL
- CheckMacGL()
- {
-     if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
--        AC_DEFINE(SDL_VIDEO_OPENGL)
-+        AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
-         case "$host" in
-             *-*-darwin*)
-                 if test x$enable_video_cocoa = xyes; then
-@@ -1747,8 +1747,8 @@ CheckAtariOSMesa()
-             OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
-             OSMESA_LIBS=`$OSMESA_CONFIG --libs`
-         fi
--        AC_DEFINE(SDL_VIDEO_OPENGL)
--        AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA)
-+        AC_DEFINE(SDL_VIDEO_OPENGL,1,"")
-+        AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA,1,"")
-         SDL_CFLAGS="$SDL_CFLAGS $OSMESA_CFLAGS"
-         SDL_LIBS="$SDL_LIBS $OSMESA_LIBS"
- 
-@@ -1758,7 +1758,7 @@ AC_HELP_STRING([--enable-osmesa-shared],
-         if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
-             # Dynamic linking
-             if test "x$have_osmesa_hdr" = "xyes"; then
--                AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC)
-+                AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC,1,"")
-             fi
-         fi
-     fi
-@@ -1792,7 +1792,7 @@ AC_HELP_STRING([--enable-input-events],
-         ])
-         AC_MSG_RESULT($use_input_events)
-         if test x$use_input_events = xyes; then
--            AC_DEFINE(SDL_INPUT_LINUXEV)
-+            AC_DEFINE(SDL_INPUT_LINUXEV,1,"")
-         fi
-     fi
- }
-@@ -1814,7 +1814,7 @@ AC_HELP_STRING([--enable-input-tslib], [
-         ])
-         AC_MSG_RESULT($enable_input_tslib)
-         if test x$enable_input_tslib = xyes; then
--            AC_DEFINE(SDL_INPUT_TSLIB)
-+            AC_DEFINE(SDL_INPUT_TSLIB,1,"")
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lts"
-         fi
-     fi
-@@ -1837,7 +1837,7 @@ AC_HELP_STRING([--enable-pth], [use GNU
-         AC_MSG_CHECKING(pth)
-         AC_MSG_RESULT($use_pth)
-         if test "x$use_pth" = xyes; then
--            AC_DEFINE(SDL_THREAD_PTH)
-+            AC_DEFINE(SDL_THREAD_PTH,1,"")
-             SOURCES="$SOURCES $srcdir/src/thread/pth/*.c"
-             SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
-             SDL_CFLAGS="$SDL_CFLAGS `$PTH_CONFIG --cflags`"
-@@ -1943,7 +1943,7 @@ AC_HELP_STRING([--enable-pthread-sem], [
- 
-         # Do futher testing if we have pthread support...
-         if test x$use_pthreads = xyes; then
--            AC_DEFINE(SDL_THREAD_PTHREAD)
-+            AC_DEFINE(SDL_THREAD_PTHREAD,1,"")
-             EXTRA_CFLAGS="$EXTRA_CFLAGS $pthread_cflags"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS $pthread_lib"
-             SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
-@@ -1965,7 +1965,7 @@ AC_HELP_STRING([--enable-pthread-sem], [
-                   pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-                 ],[
-                 has_recursive_mutexes=yes
--                AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX)
-+                AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX,1,"")
-                 ])
-             fi
-             if test x$has_recursive_mutexes = xno; then
-@@ -1976,7 +1976,7 @@ AC_HELP_STRING([--enable-pthread-sem], [
-                   pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
-                 ],[
-                 has_recursive_mutexes=yes
--                AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP)
-+                AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP,1,"")
-                 ])
-             fi
-             AC_MSG_RESULT($has_recursive_mutexes)
-@@ -2065,7 +2065,7 @@ AC_HELP_STRING([--enable-stdio-redirect]
-     fi
- 
-     if test x$enable_video = xyes; then
--        AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
-+        AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB,1,"")
-         SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
-         SOURCES="$SOURCES $srcdir/src/video/windib/*.c"
-         have_video=yes
-@@ -2087,7 +2087,7 @@ AC_HELP_STRING([--enable-directx], [use
-             have_directx=yes
-         fi
-         if test x$enable_video = xyes -a x$have_directx = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/windx5/*.c"
-             have_video=yes
-         fi
-@@ -2118,7 +2118,7 @@ AC_HELP_STRING([--enable-sdl-dlopen], [u
-             AC_CHECK_LIB(c, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS",
-                AC_CHECK_LIB(dl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldl",
-                   AC_CHECK_LIB(ltdl, dlopen, EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lltdl")))
--            AC_DEFINE(SDL_LOADSO_DLOPEN)
-+            AC_DEFINE(SDL_LOADSO_DLOPEN,1,"")
-             SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
-             have_loadso=yes
-         fi
-@@ -2135,7 +2135,7 @@ AC_HELP_STRING([--enable-atari-ldg], [us
-         AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
-         AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
-         if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
--            AC_DEFINE(SDL_LOADSO_LDG)
-+            AC_DEFINE(SDL_LOADSO_LDG,1,"")
-             SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c"
-             SDL_LIBS="$SDL_LIBS -lldg -lgem"
-             have_loadso=yes
-@@ -2266,11 +2266,11 @@ CheckUSBHID()
-             have_machine_joystick=yes
-             ])
-             if test x$have_machine_joystick = xyes; then
--                AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H)
-+                AC_DEFINE(SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H,1,"")
-             fi
-             AC_MSG_RESULT($have_machine_joystick)
- 
--            AC_DEFINE(SDL_JOYSTICK_USBHID)
-+            AC_DEFINE(SDL_JOYSTICK_USBHID,1,"")
-             SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
-             EXTRA_CFLAGS="$EXTRA_CFLAGS $USB_CFLAGS"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS $USB_LIBS"
-@@ -2289,7 +2289,7 @@ AC_HELP_STRING([--enable-clock_gettime],
-     if test x$enable_clock_gettime = xyes; then
-         AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
-         if test x$have_clock_gettime = xyes; then
--            AC_DEFINE(HAVE_CLOCK_GETTIME)
-+            AC_DEFINE(HAVE_CLOCK_GETTIME,1,"")
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lrt"
-         fi
-     fi
-@@ -2320,7 +2320,7 @@ case "$host" in
-         CheckIPod
-         # Set up files for the timer library
-         if test x$enable_timers = xyes; then
--            AC_DEFINE(SDL_TIMER_UNIX)
-+            AC_DEFINE(SDL_TIMER_UNIX,1,"")
-             SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
-             have_timers=yes
-         fi
-@@ -2386,17 +2386,17 @@ case "$host" in
-         if test x$enable_audio = xyes; then
-           case $ARCH in
-             sysv5|solaris|hpux)
--                AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
-+                AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO,1,"")
-                 SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
-                 have_audio=yes
-             ;;
-             netbsd|openbsd)
--                AC_DEFINE(SDL_AUDIO_DRIVER_BSD)
-+                AC_DEFINE(SDL_AUDIO_DRIVER_BSD,1,"")
-                 SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
-                 have_audio=yes
-             ;;
-             aix)
--                AC_DEFINE(SDL_AUDIO_DRIVER_PAUD)
-+                AC_DEFINE(SDL_AUDIO_DRIVER_PAUD,1,"")
-                 SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
-                 have_audio=yes
-             ;;
-@@ -2406,7 +2406,7 @@ case "$host" in
-         if test x$enable_joystick = xyes; then
-           case $ARCH in
-             linux)
--                AC_DEFINE(SDL_JOYSTICK_LINUX)
-+                AC_DEFINE(SDL_JOYSTICK_LINUX,1,"")
-                 SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
-                 have_joystick=yes
-             ;;
-@@ -2416,32 +2416,32 @@ case "$host" in
-         if test x$enable_cdrom = xyes; then
-           case $ARCH in
-             linux|solaris)
--                AC_DEFINE(SDL_CDROM_LINUX)
-+                AC_DEFINE(SDL_CDROM_LINUX,1,"")
-                 SOURCES="$SOURCES $srcdir/src/cdrom/linux/*.c"
-                 have_cdrom=yes
-             ;;
-             *freebsd*)
--                AC_DEFINE(SDL_CDROM_FREEBSD)
-+                AC_DEFINE(SDL_CDROM_FREEBSD,1,"")
-                 SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c"
-                 have_cdrom=yes
-             ;;
-             *openbsd*|*netbsd*)
--                AC_DEFINE(SDL_CDROM_OPENBSD)
-+                AC_DEFINE(SDL_CDROM_OPENBSD,1,"")
-                 SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c"
-                 have_cdrom=yes
-             ;;
-             bsdi)
--                AC_DEFINE(SDL_CDROM_BSDI)
-+                AC_DEFINE(SDL_CDROM_BSDI,1,"")
-                 SOURCES="$SOURCES $srcdir/src/cdrom/bsdi/*.c"
-                 have_cdrom=yes
-             ;;
-             aix)
--                AC_DEFINE(SDL_CDROM_AIX)
-+                AC_DEFINE(SDL_CDROM_AIX,1,"")
-                 SOURCES="$SOURCES $srcdir/src/cdrom/aix/*.c"
-                 have_cdrom=yes
-             ;;
-             osf)
--                AC_DEFINE(SDL_CDROM_OSF)
-+                AC_DEFINE(SDL_CDROM_OSF,1,"")
-                 SOURCES="$SOURCES $srcdir/src/cdrom/osf/*.c"
-                 have_cdrom=yes
-             ;;
-@@ -2449,7 +2449,7 @@ case "$host" in
-         fi
-         # Set up files for the thread library
-         if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
--            AC_DEFINE(SDL_THREAD_SPROC)
-+            AC_DEFINE(SDL_THREAD_SPROC,1,"")
-             SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
-             SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
-             SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
-@@ -2457,7 +2457,7 @@ case "$host" in
-         fi
-         # Set up files for the timer library
-         if test x$enable_timers = xyes; then
--            AC_DEFINE(SDL_TIMER_UNIX)
-+            AC_DEFINE(SDL_TIMER_UNIX,1,"")
-             SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
-             have_timers=yes
-         fi
-@@ -2476,20 +2476,20 @@ case "$host" in
-         CheckPTHREAD
-         # Set up files for the audio library
-         if test x$enable_audio = xyes; then
--            AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO,1,"")
-             SOURCES="$SOURCES $srcdir/src/audio/nto/*.c"
-             EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lasound"
-             have_audio=yes
-         fi
-         # Set up files for the cdrom library
-         if test x$enable_cdrom = xyes; then
--            AC_DEFINE(SDL_CDROM_QNX)
-+            AC_DEFINE(SDL_CDROM_QNX,1,"")
-             SOURCES="$SOURCES $srcdir/src/cdrom/qnx/*.c"
-             have_cdrom=yes
-         fi
-         # Set up files for the timer library
-         if test x$enable_timers = xyes; then
--            AC_DEFINE(SDL_TIMER_UNIX)
-+            AC_DEFINE(SDL_TIMER_UNIX,1,"")
-             SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
-             have_timers=yes
-         fi
-@@ -2514,29 +2514,29 @@ case "$host" in
-         CheckNASM
-         # Set up files for the audio library
-         if test x$enable_audio = xyes; then
--            AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT,1,"")
-             SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
-             if test x$have_directx = xyes; then
--                AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
-+                AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND,1,"")
-                 SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
-             fi
-             have_audio=yes
-         fi
-         # Set up files for the joystick library
-         if test x$enable_joystick = xyes; then
--            AC_DEFINE(SDL_JOYSTICK_WINMM)
-+            AC_DEFINE(SDL_JOYSTICK_WINMM,1,"")
-             SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
-             have_joystick=yes
-         fi
-         # Set up files for the cdrom library
-         if test x$enable_cdrom = xyes; then
--            AC_DEFINE(SDL_CDROM_WIN32)
-+            AC_DEFINE(SDL_CDROM_WIN32,1,"")
-             SOURCES="$SOURCES $srcdir/src/cdrom/win32/*.c"
-             have_cdrom=yes
-         fi
-         # Set up files for the thread library
-         if test x$enable_threads = xyes; then
--            AC_DEFINE(SDL_THREAD_WIN32)
-+            AC_DEFINE(SDL_THREAD_WIN32,1,"")
-             SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_sysmutex.c"
-             SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_syssem.c"
-             SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_systhread.c"
-@@ -2545,13 +2545,13 @@ case "$host" in
-         fi
-         # Set up files for the timer library
-         if test x$enable_timers = xyes; then
--            AC_DEFINE(SDL_TIMER_WIN32)
-+            AC_DEFINE(SDL_TIMER_WIN32,1,"")
-             SOURCES="$SOURCES $srcdir/src/timer/win32/*.c"
-             have_timers=yes
-         fi
-         # Set up files for the shared object loading library
-         if test x$enable_loadso = xyes; then
--            AC_DEFINE(SDL_LOADSO_WIN32)
-+            AC_DEFINE(SDL_LOADSO_WIN32,1,"")
-             SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c"
-             have_loadso=yes
-         fi
-@@ -2622,25 +2622,25 @@ case "$host" in
-         CheckBeGL
-         # Set up files for the audio library
-         if test x$enable_audio = xyes; then
--            AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO,1,"")
-             SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
-             have_audio=yes
-         fi
-         # Set up files for the joystick library
-         if test x$enable_joystick = xyes; then
--            AC_DEFINE(SDL_JOYSTICK_BEOS)
-+            AC_DEFINE(SDL_JOYSTICK_BEOS,1,"")
-             SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
-             have_joystick=yes
-         fi
-         # Set up files for the cdrom library
-         if test x$enable_cdrom = xyes; then
--            AC_DEFINE(SDL_CDROM_BEOS)
-+            AC_DEFINE(SDL_CDROM_BEOS,1,"")
-             SOURCES="$SOURCES $srcdir/src/cdrom/beos/*.cc"
-             have_cdrom=yes
-         fi
-         # Set up files for the thread library
-         if test x$enable_threads = xyes; then
--            AC_DEFINE(SDL_THREAD_BEOS)
-+            AC_DEFINE(SDL_THREAD_BEOS,1,"")
-             SOURCES="$SOURCES $srcdir/src/thread/beos/*.c"
-             SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
-             SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
-@@ -2648,7 +2648,7 @@ case "$host" in
-         fi
-         # Set up files for the timer library
-         if test x$enable_timers = xyes; then
--            AC_DEFINE(SDL_TIMER_BEOS)
-+            AC_DEFINE(SDL_TIMER_BEOS,1,"")
-             SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
-             have_timers=yes
-         fi
-@@ -2656,11 +2656,11 @@ case "$host" in
-         if test x$enable_loadso = xyes; then
-             case "$host" in
-                 *-*-beos*)
--                    AC_DEFINE(SDL_LOADSO_BEOS)
-+                    AC_DEFINE(SDL_LOADSO_BEOS,1,"")
-                     SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
-                 ;;
-                 *-*-haiku*)
--                    AC_DEFINE(SDL_LOADSO_DLOPEN)
-+                    AC_DEFINE(SDL_LOADSO_DLOPEN,1,"")
-                     SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
-                 ;;
-             esac    
-@@ -2696,7 +2696,7 @@ case "$host" in
-         # Set up files for the shared object loading library
-         # (this needs to be done before the dynamic X11 check)
-         if test x$enable_loadso = xyes -a x$have_dlopen != xyes; then
--            AC_DEFINE(SDL_LOADSO_DLCOMPAT)
-+            AC_DEFINE(SDL_LOADSO_DLCOMPAT,1,"")
-             SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c"
-             have_loadso=yes
-         fi
-@@ -2714,26 +2714,26 @@ case "$host" in
- 
-         # Set up files for the audio library
-         if test x$enable_audio = xyes; then
--            AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO)
-+            AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO,1,"")
-             SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
-             have_audio=yes
-         fi
-         # Set up files for the joystick library
-         if test x$enable_joystick = xyes; then
--            AC_DEFINE(SDL_JOYSTICK_IOKIT)
-+            AC_DEFINE(SDL_JOYSTICK_IOKIT,1,"")
-             SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
-             have_joystick=yes
-             need_iokit_framework=yes
-         fi
-         # Set up files for the cdrom library
-         if test x$enable_cdrom = xyes; then
--            AC_DEFINE(SDL_CDROM_MACOSX)
-+            AC_DEFINE(SDL_CDROM_MACOSX,1,"")
-             SOURCES="$SOURCES $srcdir/src/cdrom/macosx/*.c"
-             have_cdrom=yes
-         fi
-         # Set up files for the timer library
-         if test x$enable_timers = xyes; then
--            AC_DEFINE(SDL_TIMER_UNIX)
-+            AC_DEFINE(SDL_TIMER_UNIX,1,"")
-             SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
-             have_timers=yes
-         fi
-@@ -2775,30 +2775,30 @@ case "$host" in
-         # Set up files for the audio library
-         if test x$enable_threads = xyes -a x$enable_pth = xyes; then
-             if test x$enable_audio = xyes; then
--                AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
-+                AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO,1,"")
-                 SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
-                 have_audio=yes
-             fi
-         fi
-         # Set up files for the joystick library
-         if test x$enable_joystick = xyes; then
--            AC_DEFINE(SDL_JOYSTICK_MINT)
-+            AC_DEFINE(SDL_JOYSTICK_MINT,1,"")
-             SOURCES="$SOURCES $srcdir/src/joystick/mint/*.c"
-             have_joystick=yes
-         fi
-         # Set up files for the cdrom library
-         if test x$enable_cdrom = xyes; then
--            AC_DEFINE(SDL_CDROM_MINT)
-+            AC_DEFINE(SDL_CDROM_MINT,1,"")
-             SOURCES="$SOURCES $srcdir/src/cdrom/mint/*.c"
-             have_cdrom=yes
-         fi
-         # Set up files for the timer library
-         if test x$enable_timers = xyes; then
-             if test x$enable_threads = xyes -a x$enable_pth = xyes; then
--                AC_DEFINE(SDL_TIMER_UNIX)
-+                AC_DEFINE(SDL_TIMER_UNIX,1,"")
-                 SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
-             else
--                AC_DEFINE(SDL_TIMER_MINT)
-+                AC_DEFINE(SDL_TIMER_MIN,1,""T)
-                 SOURCES="$SOURCES $srcdir/src/timer/mint/*.c"
-                 SOURCES="$SOURCES $srcdir/src/timer/mint/*.S"
-             fi
-@@ -2811,20 +2811,20 @@ case "$host" in
-         CheckPTHREAD
-         # Set up files for the video library
-         if test x$enable_video = xyes; then
--            AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS)
-+            AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS,1,"")
-             SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
-             SOURCES="$SOURCES $srcdir/src/video/riscos/*.S"
-             have_video=yes
-         fi
-         # Set up files for the joystick library
-         if test x$enable_joystick = xyes; then
--            AC_DEFINE(SDL_JOYSTICK_RISCOS)
-+            AC_DEFINE(SDL_JOYSTICK_RISCOS,1,"")
-             SOURCES="$SOURCES $srcdir/src/joystick/riscos/*.c"
-             have_joystick=yes
-         fi
-         # Set up files for the timer library
-         if test x$enable_timers = xyes; then
--            AC_DEFINE(SDL_TIMER_RISCOS)
-+            AC_DEFINE(SDL_TIMER_RISCOS,1,"")
-             SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c"
-             have_timers=yes
-         fi
-@@ -2846,31 +2846,31 @@ CheckWarnAll
- if test x$enable_joystick = xyes; then
-   if test x$have_joystick != xyes; then
-     # Wants joystick subsystem, but doesn't have a platform-specific backend...
--    AC_DEFINE(SDL_JOYSTICK_DUMMY)
-+    AC_DEFINE(SDL_JOYSTICK_DUMMY,1,"")
-     SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
-   fi
- fi
- if test x$have_cdrom != xyes; then
-     if test x$enable_cdrom = xyes; then
--        AC_DEFINE(SDL_CDROM_DISABLED)
-+        AC_DEFINE(SDL_CDROM_DISABLED,1,"")
-     fi
-     SOURCES="$SOURCES $srcdir/src/cdrom/dummy/*.c"
- fi
- if test x$have_threads != xyes; then
-     if test x$enable_threads = xyes; then
--        AC_DEFINE(SDL_THREADS_DISABLED)
-+        AC_DEFINE(SDL_THREADS_DISABLED,1,"")
-     fi
-     SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
- fi
- if test x$have_timers != xyes; then
-     if test x$enable_timers = xyes; then
--        AC_DEFINE(SDL_TIMERS_DISABLED)
-+        AC_DEFINE(SDL_TIMERS_DISABLED,1,"")
-     fi
-     SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
- fi
- if test x$have_loadso != xyes; then
-     if test x$enable_loadso = xyes; then
--        AC_DEFINE(SDL_LOADSO_DISABLED)
-+        AC_DEFINE(SDL_LOADSO_DISABLED,1,"")
-     fi
-     SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
- fi
diff --git a/yocto-poky/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb b/yocto-poky/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
index c0d5c6a..9c0ec54 100644
--- a/yocto-poky/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
+++ b/yocto-poky/meta/recipes-graphics/libsdl/libsdl_1.2.15.bb
@@ -12,21 +12,15 @@
 
 PROVIDES = "virtual/libsdl"
 
-DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxext libxrandr libxrender', '', d)} \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'libglu', '', d)} \
-           tslib"
-DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
-
 PR = "r3"
 
 SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
-           file://configure_tweak.patch \
            file://libsdl-1.2.15-xdata32.patch \
            file://pkgconfig.patch \
           "
 
+UPSTREAM_CHECK_REGEX = "SDL-(?P<pver>\d+(\.\d+)+)\.tar"
+
 S = "${WORKDIR}/SDL-${PV}"
 
 SRC_URI[md5sum] = "9d96df8417572a2afb781a7c4c811a85"
@@ -38,21 +32,29 @@
 
 EXTRA_OECONF = "--disable-static --enable-cdrom --enable-threads --enable-timers \
                 --enable-file --disable-oss --disable-esd --disable-arts \
-                --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
+                --disable-diskaudio --disable-nas \
                 --disable-mintaudio --disable-nasm --disable-video-dga \
                 --disable-video-fbcon --disable-video-ps2gs --disable-video-ps3 \
                 --disable-xbios --disable-gem --disable-video-dummy \
-                --enable-input-events --enable-input-tslib --enable-pthreads \
-                ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', '--enable-video-directfb', '--disable-video-directfb', d)} \
-                ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '--enable-video-opengl', '--disable-video-opengl', d)} \
-                ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '--enable-video-x11', '--disable-video-x11', d)} \
+                --enable-input-events --enable-pthreads \
                 --disable-video-svga \
                 --disable-video-picogui --disable-video-qtopia --enable-sdl-dlopen \
-                --disable-rpath \
-                --disable-pulseaudio"
+                --disable-rpath"
 
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
-PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'opengl', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG_class-native = "x11"
+PACKAGECONFIG_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+
+PACKAGECONFIG[alsa] = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[tslib] = "--enable-input-tslib, --disable-input-tslib, tslib"
+PACKAGECONFIG[directfb] = "--enable-video-directfb, --disable-video-directfb, directfb"
+PACKAGECONFIG[opengl] = "--enable-video-opengl, --disable-video-opengl, virtual/libgl libglu"
+PACKAGECONFIG[x11] = "--enable-video-x11 --disable-x11-shared, --disable-video-x11, virtual/libx11 libxext libxrandr libxrender"
 
 EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
 
@@ -65,4 +67,4 @@
         export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
 }
 
-BBCLASSEXTEND = "nativesdk"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch b/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch
new file mode 100644
index 0000000..60185b1
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2/linkage.patch
@@ -0,0 +1,46 @@
+When building use the libtool intermediate .lo files instead of explicitly using
+the .o files. Under libtool foo.lo is the libtool intermediate wrapper, foo.o is
+a static build, and .libs/foo.o is a shared build.
+
+If static libraries have been disabled globally then libtool won't generate them
+and explicit references to foo.o won't be satisfied.
+
+Upstream-Status: Pending
+RP
+2016/1/16
+
+
+Index: SDL2-2.0.4/configure.in
+===================================================================
+--- SDL2-2.0.4.orig/configure.in
++++ SDL2-2.0.4/configure.in
+@@ -3464,23 +3464,23 @@ done
+ 
+ VERSION_OBJECTS=`echo $VERSION_SOURCES`
+ VERSION_DEPENDS=`echo $VERSION_SOURCES`
+-VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
++VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'`
+ VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
+-\\$(objects)/\\2.o: \\1/\\2.rc\\\\
++\\$(objects)/\\2.lo: \\1/\\2.rc\\\\
+ 	\\$(WINDRES) \\$< \\$@,g"`
+ 
+ SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
+ SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
+-SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
++SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+ SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
+-\\$(objects)/\\2.o: \\1/\\2.c\\\\
++\\$(objects)/\\2.lo: \\1/\\2.c\\\\
+ 	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
+ 
+ SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
+ SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
+-SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.o,g'`
++SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
+ SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
+-\\$(objects)/\\2.o: \\1/\\2.c\\\\
++\\$(objects)/\\2.lo: \\1/\\2.c\\\\
+ 	\\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
+ 
+ # Set runtime shared library paths as needed
diff --git a/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb b/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb
deleted file mode 100644
index f138f97..0000000
--- a/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.3.bb
+++ /dev/null
@@ -1,63 +0,0 @@
-SUMMARY = "Simple DirectMedia Layer"
-DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
-library designed to provide low level access to audio, keyboard, mouse, \
-joystick, 3D hardware via OpenGL, and 2D video framebuffer."
-HOMEPAGE = "http://www.libsdl.org"
-BUGTRACKER = "http://bugzilla.libsdl.org/"
-
-SECTION = "libs"
-
-LICENSE = "Zlib"
-LIC_FILES_CHKSUM = "file://COPYING.txt;md5=67dcb7fae16952557bc5f96e9eb5d188"
-
-PROVIDES = "virtual/libsdl2"
-
-DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
-
-SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz"
-
-S = "${WORKDIR}/SDL2-${PV}"
-
-SRC_URI[md5sum] = "fe6c61d2e9df9ef570e7e80c6e822537"
-SRC_URI[sha256sum] = "a5a69a6abf80bcce713fa873607735fe712f44276a7f048d60a61bb2f6b3c90c"
-
-inherit autotools lib_package binconfig pkgconfig
-
-EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
-                --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
-                --disable-video-dummy \
-                --enable-pthreads \
-                --enable-sdl-dlopen \
-                --disable-rpath"
-
-# opengl packageconfig factored out to make it easy for distros
-# and BSP layers to pick either (desktop) opengl, gles2, or no GL
-PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)}"
-
-PACKAGECONFIG ??= " \
-    ${PACKAGECONFIG_GL} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-"
-PACKAGECONFIG[alsa]       = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
-PACKAGECONFIG[directfb]   = "--enable-video-directfb --disable-video-directfb,directfb"
-PACKAGECONFIG[gles2]      = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
-PACKAGECONFIG[opengl]     = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
-PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
-PACKAGECONFIG[tslib]      = "--enable-input-tslib,--disable-input-tslib,tslib"
-PACKAGECONFIG[wayland]    = "--enable-video-wayland,--disable-video-wayland,wayland"
-PACKAGECONFIG[x11]        = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
-
-EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
-
-do_configure_prepend() {
-        # Remove old libtool macros.
-        MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
-        for i in ${MACROS}; do
-               rm -f ${S}/acinclude/$i
-        done
-        export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
-}
diff --git a/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb b/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb
new file mode 100644
index 0000000..4282307
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/libsdl2/libsdl2_2.0.4.bb
@@ -0,0 +1,66 @@
+SUMMARY = "Simple DirectMedia Layer"
+DESCRIPTION = "Simple DirectMedia Layer is a cross-platform multimedia \
+library designed to provide low level access to audio, keyboard, mouse, \
+joystick, 3D hardware via OpenGL, and 2D video framebuffer."
+HOMEPAGE = "http://www.libsdl.org"
+BUGTRACKER = "http://bugzilla.libsdl.org/"
+
+SECTION = "libs"
+
+LICENSE = "Zlib"
+LIC_FILES_CHKSUM = "file://COPYING.txt;md5=b2304ad7e91711027590d3f102a754b7"
+
+PROVIDES = "virtual/libsdl2"
+
+DEPENDS_class-nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11 nativesdk-libxrandr nativesdk-libxrender nativesdk-libxext', '', d)}"
+
+SRC_URI = "http://www.libsdl.org/release/SDL2-${PV}.tar.gz \
+           file://linkage.patch"
+
+S = "${WORKDIR}/SDL2-${PV}"
+
+SRC_URI[md5sum] = "44fc4a023349933e7f5d7a582f7b886e"
+SRC_URI[sha256sum] = "da55e540bf6331824153805d58b590a29c39d2d506c6d02fa409aedeab21174b"
+
+inherit autotools lib_package binconfig pkgconfig
+
+EXTRA_OECONF = "--disable-oss --disable-esd --disable-arts \
+                --disable-diskaudio --disable-nas --disable-esd-shared --disable-esdtest \
+                --disable-video-dummy \
+                --enable-pthreads \
+                --enable-sdl-dlopen \
+                --disable-rpath"
+
+# opengl packageconfig factored out to make it easy for distros
+# and BSP layers to pick either (desktop) opengl, gles2, or no GL
+PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl', '', d)}"
+
+PACKAGECONFIG ??= " \
+    ${PACKAGECONFIG_GL} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland gles2', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+"
+PACKAGECONFIG[alsa]       = "--enable-alsa --disable-alsatest,--disable-alsa,alsa-lib,"
+PACKAGECONFIG[directfb]   = "--enable-video-directfb --disable-video-directfb,directfb"
+PACKAGECONFIG[gles2]      = "--enable-video-opengles,--disable-video-opengles,virtual/libgles2"
+PACKAGECONFIG[opengl]     = "--enable-video-opengl,--disable-video-opengl,virtual/libgl"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[tslib]      = "--enable-input-tslib,--disable-input-tslib,tslib"
+PACKAGECONFIG[wayland]    = "--enable-video-wayland,--disable-video-wayland,wayland libxkbcommon"
+PACKAGECONFIG[x11]        = "--enable-video-x11,--disable-video-x11,virtual/libx11 libxext libxrandr libxrender"
+
+EXTRA_AUTORECONF += "--include=acinclude --exclude=autoheader"
+
+do_configure_prepend() {
+        # Remove old libtool macros.
+        MACROS="libtool.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4"
+        for i in ${MACROS}; do
+               rm -f ${S}/acinclude/$i
+        done
+        export SYSROOT=$PKG_CONFIG_SYSROOT_DIR
+}
+
+FILES_${PN}-dev += "${libdir}/cmake"
diff --git a/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/disable_Os_option.patch b/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/disable_Os_option.patch
deleted file mode 100644
index 64b7efa..0000000
--- a/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client/disable_Os_option.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-Do not set Os optimization in target APP CFLAGS, since it may have potential
-error if "--enable-target-optspace" is not set when configuring GCC.
-
-Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
-
-diff -ruN Xsettings-client-0.10-orig/configure.ac Xsettings-client-0.10/configure.ac
---- Xsettings-client-0.10-orig/configure.ac	2010-09-21 14:01:47.000000000 +0800
-+++ Xsettings-client-0.10/configure.ac	2010-09-21 14:02:01.000000000 +0800
-@@ -3,7 +3,7 @@
- AM_INIT_AUTOMAKE(Xsettings-client, 0.10)
- AM_CONFIG_HEADER(config.h)
- 
--CFLAGS="-Os -Wall"
-+CFLAGS="-O2 -Wall"
- 
- # Checks for programs.
- AC_PROG_CC
diff --git a/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client_0.10.bb b/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client_0.10.bb
index 670d9fc..67c5e27 100644
--- a/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client_0.10.bb
+++ b/yocto-poky/meta/recipes-graphics/libxsettings-client/libxsettings-client_0.10.bb
@@ -19,7 +19,6 @@
 SRC_URI = "http://downloads.yoctoproject.org/releases/matchbox/optional-dependencies/Xsettings-client-0.10.tar.gz \
         file://MIT-style-license \
         file://link-x11.patch;apply=yes \
-        file://disable_Os_option.patch \
         file://obsolete_automake_macros.patch \
 "
 
diff --git a/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_git.bb b/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_git.bb
index 422d255..aa76828 100644
--- a/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_git.bb
+++ b/yocto-poky/meta/recipes-graphics/matchbox-wm/matchbox-wm_git.bb
@@ -10,7 +10,7 @@
 SECTION = "x11/wm"
 DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification expat gconf libxcursor libxfixes"
 
-SRCREV = "29544f0e61cc281fc60061443a537271e1081b78"
+SRCREV = "8178e70d5c742c4cd63b51df228cc8aa3594d518"
 PV = "1.2+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/matchbox-window-manager \
diff --git a/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb b/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb
deleted file mode 100644
index ab909f7..0000000
--- a/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-SUMMARY = "Library for caching application menus"
-DESCRIPTION = "A library creating and utilizing caches to speed up freedesktop.org application menus"
-HOMEPAGE = "http://lxde.sourceforge.net/"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0964c689fcf4c21c6797ea87408416b6"
-
-SECTION = "x11/libs"
-DEPENDS = "glib-2.0 intltool-native libfm-extra"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "4a8e6c1a86d5e64ec725d850a4abfbad"
-SRC_URI[sha256sum] = "ff7df437bbfd3119c5f662c6d209b98f15de03a7203308c6b56a4c1e1d419aaf"
-
-inherit autotools gettext pkgconfig gtk-doc
diff --git a/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb b/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb
new file mode 100644
index 0000000..eb80cd3
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/menu-cache/menu-cache_1.0.1.bb
@@ -0,0 +1,18 @@
+SUMMARY = "Library for caching application menus"
+DESCRIPTION = "A library creating and utilizing caches to speed up freedesktop.org application menus"
+HOMEPAGE = "http://lxde.sourceforge.net/"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0964c689fcf4c21c6797ea87408416b6"
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0 intltool-native libfm-extra"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "a856ba860b16fdc8c69ee784bc4ade36"
+SRC_URI[sha256sum] = "0ac72649919946070258320aafc320467dd040bcef7b3a225e2ab7241ddffd59"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lxde/files/menu-cache/1.0/"
+
+inherit autotools gettext pkgconfig gtk-doc
diff --git a/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch b/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
new file mode 100644
index 0000000..e4461ef
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/mesa/files/replace_glibc_check_with_linux.patch
@@ -0,0 +1,17 @@
+endianness check is OS wide and not specific to libc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: mesa-11.1.1/src/gallium/include/pipe/p_config.h
+===================================================================
+--- mesa-11.1.1.orig/src/gallium/include/pipe/p_config.h
++++ mesa-11.1.1/src/gallium/include/pipe/p_config.h
+@@ -130,7 +130,7 @@
+  * Endian detection.
+  */
+ 
+-#ifdef __GLIBC__
++#if defined(__linux__)
+ #include <endian.h>
+ 
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
diff --git a/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch b/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
index c96af12..09054cb 100644
--- a/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
+++ b/yocto-poky/meta/recipes-graphics/mesa/mesa-demos/0002-Correctly-implement-with-AC_WITH-glut-so-that-withou.patch
@@ -4,6 +4,9 @@
 Subject: [PATCH 2/9] Correctly implement with AC_WITH(glut) so that
  --without-glut works.
 
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Upstream-Status: Submitted (https://patchwork.freedesktop.org/patch/64417/)
+
 ---
  configure.ac | 26 +++++++++++++++-----------
  1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb b/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
index 0094f55..557b8c6 100644
--- a/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
+++ b/yocto-poky/meta/recipes-graphics/mesa/mesa-demos_8.2.0.bb
@@ -24,7 +24,9 @@
 SRC_URI[md5sum] = "72613a2c8c013716db02e3ff59d29061"
 SRC_URI[sha256sum] = "e4bfecb5816ddd4b7b37c1bc876b63f1f7f06fda5879221a9774d0952f90ba92"
 
-inherit autotools pkgconfig
+inherit autotools pkgconfig distro_features_check
+# depends on virtual/egl, virtual/libgl ...
+REQUIRED_DISTRO_FEATURES = "opengl"
 
 PACKAGECONFIG ?= "drm osmesa freetype2 gbm egl gles1 gles2 \
                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 glew glu', '', d)}"
diff --git a/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_10.6.3.bb b/yocto-poky/meta/recipes-graphics/mesa/mesa-gl_11.1.1.bb
similarity index 100%
rename from yocto-poky/meta/recipes-graphics/mesa/mesa-gl_10.6.3.bb
rename to yocto-poky/meta/recipes-graphics/mesa/mesa-gl_11.1.1.bb
diff --git a/yocto-poky/meta/recipes-graphics/mesa/mesa.inc b/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
index af7a2c4..442479a 100644
--- a/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
+++ b/yocto-poky/meta/recipes-graphics/mesa/mesa.inc
@@ -24,7 +24,7 @@
 
 EXTRA_OECONF = "--enable-shared-glapi"
 
-PACKAGECONFIG ??= "egl gles dri \
+PACKAGECONFIG ??= "egl gles dri ${MESA_CRYPTO} \
 		${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}\
 		${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}\
 		"
@@ -32,16 +32,14 @@
 X11_DEPS = "xf86driproto glproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes"
 PACKAGECONFIG[x11] = "--enable-glx-tls,--disable-glx,${X11_DEPS}"
 PACKAGECONFIG[xvmc] = "--enable-xvmc,--disable-xvmc,libxvmc"
-PACKAGECONFIG[wayland] = ",,wayland"
+PACKAGECONFIG[wayland] = ",,wayland-native wayland"
 
 DRIDRIVERS = "swrast"
 DRIDRIVERS_append_x86 = ",radeon,r200,nouveau,i965,i915"
 DRIDRIVERS_append_x86-64 = ",radeon,r200,nouveau,i965,i915"
-PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS}, --disable-dri, dri2proto libdrm"
+PACKAGECONFIG[dri] = "--enable-dri --with-dri-drivers=${DRIDRIVERS} --enable-gbm, --disable-dri, dri2proto libdrm"
 PACKAGECONFIG[dri3] = "--enable-dri3, --disable-dri3, dri3proto presentproto libxshmfence"
 
-EXTRA_OECONF += "--enable-gbm"
-
 PACKAGECONFIG[gles] = "--enable-gles1 --enable-gles2, --disable-gles1 --disable-gles2"
 
 EGL_PLATFORMS  = "drm"
@@ -64,6 +62,12 @@
 export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}"
 PACKAGECONFIG[xa]  = "--enable-xa, --disable-xa"
 
+# Mesa requires one of the following crypto implementation, pick one of them
+MESA_CRYPTO ??= "openssl"
+PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
+PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
+PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
+
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
 
@@ -116,7 +120,9 @@
         d.appendVar("RREPLACES_" + fullp, pkgs)
         d.appendVar("RPROVIDES_" + fullp, pkgs)
         d.appendVar("RCONFLICTS_" + fullp, pkgs)
-        
+
+        d.appendVar("RRECOMMENDS_" + fullp, " mesa-megadriver")
+
         # For -dev, the first element is both the Debian and original name
         fullp += "-dev"
         pkgs = p[1] + "-dev"
@@ -153,7 +159,6 @@
 
 PACKAGES_DYNAMIC += "^mesa-driver-.*"
 
-FILES_${PN}-dbg += "${libdir}/dri/.debug/*"
 FILES_${PN} += "${sysconfdir}/drirc"
 FILES_mesa-megadriver = "${libdir}/dri/*"
 FILES_libegl-mesa = "${libdir}/libEGL.so.*"
@@ -181,5 +186,3 @@
 FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
                           ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
                           ${libdir}/pkgconfig/xatracker.pc"
-
-FILES_${PN}-dbg += "${libdir}/dri/.debug/* ${libdir}/egl/.debug/* ${libdir}/gbm/.debug/* ${libdir}/gallium-pipe/.debug"
diff --git a/yocto-poky/meta/recipes-graphics/mesa/mesa_10.6.3.bb b/yocto-poky/meta/recipes-graphics/mesa/mesa_10.6.3.bb
deleted file mode 100644
index 8c55064..0000000
--- a/yocto-poky/meta/recipes-graphics/mesa/mesa_10.6.3.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require ${BPN}.inc
-
-SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "553e525d2f20ed48fca8f1ec3176fd83"
-SRC_URI[sha256sum] = "58592e07c350cd2e8969b73fa83048c657a39fe2f13f3b88f5e5818fe2e4676d"
-
-#because we cannot rely on the fact that all apps will use pkgconfig,
-#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
-do_install_append() {
-    if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
-        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
-    fi
-}
diff --git a/yocto-poky/meta/recipes-graphics/mesa/mesa_11.1.1.bb b/yocto-poky/meta/recipes-graphics/mesa/mesa_11.1.1.bb
new file mode 100644
index 0000000..502afcf
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/mesa/mesa_11.1.1.bb
@@ -0,0 +1,16 @@
+require ${BPN}.inc
+
+SRC_URI = "ftp://ftp.freedesktop.org/pub/mesa/${PV}/mesa-${PV}.tar.xz \
+           file://replace_glibc_check_with_linux.patch \
+"
+
+SRC_URI[md5sum] = "1043dfb907beecb2a761272455960427"
+SRC_URI[sha256sum] = "64db074fc514136b5fb3890111f0d50604db52f0b1e94ba3fcb0fe8668a7fd20"
+
+#because we cannot rely on the fact that all apps will use pkgconfig,
+#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER
+do_install_append() {
+    if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then
+        sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
+    fi
+}
diff --git a/yocto-poky/meta/recipes-graphics/mx/mx-1.0_1.4.7.bb b/yocto-poky/meta/recipes-graphics/mx/mx-1.0_1.4.7.bb
index ce35b61..5545c1e 100644
--- a/yocto-poky/meta/recipes-graphics/mx/mx-1.0_1.4.7.bb
+++ b/yocto-poky/meta/recipes-graphics/mx/mx-1.0_1.4.7.bb
@@ -4,6 +4,9 @@
 SRCREV = "9b1db6b8060bd00b121a692f942404a24ae2960f"
 PV = "1.4.7+git${SRCPV}"
 
+# Exclude x.99.x versions from upstream checks
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>^\d+(\.(?!99)\d+)+)"
+
 SRC_URI = "git://github.com/clutter-project/mx.git;branch=mx-1.4 \
 	   file://fix-build-dir.patch \
 	   file://fix-test-includes.patch \
diff --git a/yocto-poky/meta/recipes-graphics/mx/mx.inc b/yocto-poky/meta/recipes-graphics/mx/mx.inc
index ee7f186..4f10957 100644
--- a/yocto-poky/meta/recipes-graphics/mx/mx.inc
+++ b/yocto-poky/meta/recipes-graphics/mx/mx.inc
@@ -1,14 +1,15 @@
 SUMMARY = "Clutter based UI widget library"
 LICENSE = "LGPLv2.1"
 
-inherit clutter autotools-brokensep
+inherit clutter autotools-brokensep distro_features_check gobject-introspection
+# depends on clutter-1.0 which depends on cogl-1.0
+REQUIRED_DISTRO_FEATURES = "opengl"
 
 DEPENDS = "clutter-1.0 dbus-glib gdk-pixbuf"
 
 SRC_URI = "http://source.clutter-project.org/sources/mx/${@get_verdir("${PV}")}/mx-${PV}.tar.xz"
 
-EXTRA_OECONF = "--disable-introspection		\
-	        --disable-gtk-doc		\
+EXTRA_OECONF = "--disable-gtk-doc		\
 	        --disable-gtk-widgets		\
 		--with-dbus			\
 		--with-winsys=none		\
diff --git a/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb b/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
index 9d67e5f..5734b27 100644
--- a/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
+++ b/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-clutter.bb
@@ -7,7 +7,9 @@
 
 PR = "r6"
 
-inherit packagegroup
+inherit packagegroup distro_features_check
+# rdepends on clutter-*
+REQUIRED_DISTRO_FEATURES = "opengl"
 
 PACKAGES = "\
     ${PN}-core \
diff --git a/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb b/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
index 53dc0ae..a657a1a 100644
--- a/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
+++ b/yocto-poky/meta/recipes-graphics/packagegroups/packagegroup-core-directfb.bb
@@ -11,7 +11,6 @@
 		directfb \
 		directfb-examples \
 		pango \
-		pango-modules \
 		fontconfig \
 		${TOUCH} \
 "
diff --git a/yocto-poky/meta/recipes-graphics/pango/pango.inc b/yocto-poky/meta/recipes-graphics/pango/pango.inc
deleted file mode 100644
index df0fdf6..0000000
--- a/yocto-poky/meta/recipes-graphics/pango/pango.inc
+++ /dev/null
@@ -1,99 +0,0 @@
-SUMMARY = "Framework for layout and rendering of internationalized text"
-DESCRIPTION = "Pango is a library for laying out and rendering of text, \
-with an emphasis on internationalization. Pango can be used anywhere \
-that text layout is needed, though most of the work on Pango so far has \
-been done in the context of the GTK+ widget toolkit. Pango forms the \
-core of text and font handling for GTK+-2.x."
-HOMEPAGE = "http://www.pango.org/"
-BUGTRACKER = "http://bugzilla.gnome.org"
-SECTION = "libs"
-LICENSE = "LGPLv2.0+"
-
-X11DEPENDS = "virtual/libx11 libxft"
-DEPENDS = "glib-2.0 fontconfig freetype zlib virtual/libiconv cairo harfbuzz qemu-native"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'ptest', '', d)}"
-
-PACKAGECONFIG[x11] = "--with-xft,--without-xft,${X11DEPENDS}"
-PACKAGECONFIG[ptest] = "--enable-installed-tests,--disable-installed-tests,glib-2.0-native"
-
-BBCLASSEXTEND = "native"
-DEPENDS_class-native = "glib-2.0-native cairo-native harfbuzz-native"
-
-PACKAGES_DYNAMIC += "^pango-module-.*"
-
-RRECOMMENDS_${PN} = "pango-module-basic-fc"
-
-inherit gnomebase gtk-doc qemu ptest
-
-# Create a pango-modules package
-ALLOW_EMPTY_${BPN}-modules = "1"
-PACKAGES += "${BPN}-modules"
-RRECOMMENDS_${BPN}-modules =  "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("pango-module") != -1])}"
-
-
-EXTRA_AUTORECONF = ""
-
-# seems to go wrong with default cflags
-FULL_OPTIMIZATION_arm = "-O2"
-
-EXTRA_OECONF = "--disable-introspection \
-		--enable-explicit-deps=no \
-	        --disable-debug \
-	        --with-mlprefix=${MLPREFIX}"
-
-LEAD_SONAME = "libpango-1.0*"
-LIBV = "1.8.0"
-
-pango_postinst() {
-if ! [ -e $D${sysconfdir}/pango ] ; then
-	mkdir -p $D${sysconfdir}/pango
-fi
-
-if [ -n "$D" ]; then
-	${@qemu_run_binary(d, '$D','${bindir}/${MLPREFIX}pango-querymodules')} \
-		$D${libdir}/pango/${LIBV}/modules/*.so \
-		> $D${sysconfdir}/pango/${MLPREFIX}pango.modules 2>/dev/null
-
-	[ $? -ne 0 ] && exit 1
-
-	sed -i -e "s:$D::" $D${sysconfdir}/pango/${MLPREFIX}pango.modules
-
-	exit 0
-else
-	${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules
-fi
-}
-
-# This binary needs to be compiled for the host architecture.  This isn't pretty!
-do_compile_prepend () {
-	if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
-		make CC="${BUILD_CC}" CFLAGS="" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
-	fi
-}
-
-do_install_append () {
-	if [ "${MLPREFIX}" != "" ]; then
-		mv ${D}/${bindir}/pango-querymodules ${D}/${bindir}/${MLPREFIX}pango-querymodules 
-	fi
-}
-
-
-python populate_packages_prepend () {
-    pango_postinst = d.getVar("pango_postinst", True)
-
-    modules_root = d.expand('${libdir}/pango/${LIBV}/modules')
-
-    do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', pango_postinst)
-}
-
-FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/* ${libdir}/libpango*${SOLIBS}"
-FILES_${PN}-dbg += "${libdir}/pango/${LIBV}/modules/.debug"
-FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
-
-FILES_${PN}-ptest += "${libexecdir}/installed-tests/* \
-                      ${datadir}/installed-tests/pango"
-FILES_${PN}-dbg += "${libexecdir}/installed-tests/.debug"
-
-RDEPENDS_${PN}-ptest += "gnome-desktop-testing liberation-fonts"
diff --git a/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch b/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch
new file mode 100644
index 0000000..812da21
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/pango/pango/0001-Drop-introspection-macros-from-acinclude.m4.patch
@@ -0,0 +1,121 @@
+From 867a512eddbeb1899d3e7096df3da1dd0ce3e7b7 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 23 Oct 2015 14:06:17 +0300
+Subject: [PATCH] Drop introspection macros from acinclude.m4
+
+They take precendence over our customized macros, and so
+introspection doesn't work correctly.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ acinclude.m4 | 96 ------------------------------------------------------------
+ 1 file changed, 96 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 8899c7c..48fd5d8 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -55,99 +55,3 @@ AC_DEFUN([JH_CHECK_XML_CATALOG],
+ ])
+ 
+ 
+-dnl REMOVE THIS WHEN introspection.m4 is widely available
+-dnl
+-dnl -*- mode: autoconf -*-
+-dnl Copyright 2009 Johan Dahlin
+-dnl
+-dnl This file is free software; the author(s) gives unlimited
+-dnl permission to copy and/or distribute it, with or without
+-dnl modifications, as long as this notice is preserved.
+-dnl
+-
+-# serial 1
+-
+-m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
+-[
+-    AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+-    AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+-    AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
+-
+-    dnl enable/disable introspection
+-    m4_if([$2], [require],
+-    [dnl
+-        enable_introspection=yes
+-    ],[dnl
+-        AC_ARG_ENABLE(introspection,
+-                  AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
+-                                 [Enable introspection for this build]),, 
+-                                 [enable_introspection=auto])
+-    ])dnl
+-
+-    AC_MSG_CHECKING([for gobject-introspection])
+-
+-    dnl presence/version checking
+-    AS_CASE([$enable_introspection],
+-    [no], [dnl
+-        found_introspection="no (disabled, use --enable-introspection to enable)"
+-    ],dnl
+-    [yes],[dnl
+-        PKG_CHECK_EXISTS([gobject-introspection-1.0],,
+-                         AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
+-        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
+-                         found_introspection=yes,
+-                         AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
+-    ],dnl
+-    [auto],[dnl
+-        PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
+-    ],dnl
+-    [dnl	
+-        AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
+-    ])dnl
+-
+-    AC_MSG_RESULT([$found_introspection])
+-
+-    INTROSPECTION_SCANNER=
+-    INTROSPECTION_COMPILER=
+-    INTROSPECTION_GENERATE=
+-    INTROSPECTION_GIRDIR=
+-    INTROSPECTION_TYPELIBDIR=
+-    if test "x$found_introspection" = "xyes"; then
+-       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+-       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+-       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+-       INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+-       INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+-       INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+-       INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+-       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+-    fi
+-    AC_SUBST(INTROSPECTION_SCANNER)
+-    AC_SUBST(INTROSPECTION_COMPILER)
+-    AC_SUBST(INTROSPECTION_GENERATE)
+-    AC_SUBST(INTROSPECTION_GIRDIR)
+-    AC_SUBST(INTROSPECTION_TYPELIBDIR)
+-    AC_SUBST(INTROSPECTION_CFLAGS)
+-    AC_SUBST(INTROSPECTION_LIBS)
+-    AC_SUBST(INTROSPECTION_MAKEFILE)
+-
+-    AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
+-])
+-
+-
+-dnl Usage:
+-dnl   GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
+-
+-AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
+-[
+-  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
+-])
+-
+-dnl Usage:
+-dnl   GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
+-
+-
+-AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
+-[
+-  _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
+-])
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-graphics/pango/pango/multilib-fix-clean.patch b/yocto-poky/meta/recipes-graphics/pango/pango/multilib-fix-clean.patch
deleted file mode 100644
index ad414dd..0000000
--- a/yocto-poky/meta/recipes-graphics/pango/pango/multilib-fix-clean.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Upstream-Status: Pending
-
-Updated to apply to pango-1.32.5
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-diff -Nurd pango-1.32.5/configure.ac pango-1.32.5/configure.ac
---- pango-1.32.5/configure.ac	2012-12-07 04:43:25.000000000 +0200
-+++ pango-1.32.5/configure.ac	2013-01-09 08:27:40.328516792 +0200
-@@ -213,6 +213,11 @@
-
- AC_SUBST(PANGO_DEBUG_FLAGS)
-
-+AC_ARG_WITH(mlprefix,
-+            AC_HELP_STRING([--with-mlprefix=<ARG>], [multilib prefix]),
-+            mlprefix_str=$withval, mlprefix_str="")
-+AC_DEFINE_UNQUOTED([MLPREFIX], ["$mlprefix_str"], [multilib prefix.])
-+
- AC_ARG_ENABLE(rebuilds,
-               [AC_HELP_STRING([--disable-rebuilds],
-                               [disable all source autogeneration rules])],,
-diff -Nurd pango-1.32.5/pango/modules.c pango-1.32.5/pango/modules.c
---- pango-1.32.5/pango/modules.c	2012-12-17 20:27:56.000000000 +0200
-+++ pango-1.32.5/pango/modules.c	2013-01-09 08:31:16.336512052 +0200
-@@ -555,11 +555,11 @@
-       files = g_new (char *, 3);
-
-       files[0] = g_build_filename (pango_get_sysconf_subdirectory (),
--                                   "pango.modules",
-+                                   MLPREFIX "pango.modules",
-                                    NULL);
-       files[1] = g_build_filename (pango_get_lib_subdirectory (),
-                                    MODULE_VERSION,
--                                   "modules.cache",
-+                                   MLPREFIX "modules.cache",
-                                    NULL);
-       files[2] = NULL;
-     }
-@@ -674,7 +674,8 @@
-       if (!no_module_warning)
-	{
-	  gchar *filename = g_build_filename (pango_get_sysconf_subdirectory (),
--					      "pango.modules",
-+/* For multilib case, keep multiple config file for different libs */
-+					      MLPREFIX "pango.modules",
-					      NULL);
-	  g_critical ("No modules found:\n"
-		      "No builtin or dynamically loaded modules were found.\n"
-diff -Nurd pango-1.32.5/pango/modules.c.rej pango-1.32.5/pango/modules.c.rej
---- pango-1.32.5/pango/modules.c.rej	1970-01-01 02:00:00.000000000 +0200
-+++ pango-1.32.5/pango/modules.c.rej	2013-01-09 08:27:40.328516792 +0200
-@@ -0,0 +1,12 @@
-+--- pango/modules.c	2010-09-22 03:37:01.000000000 +0800
-++++ pango/modules.c	2012-05-08 21:21:02.000000000 +0800
-+@@ -529,7 +529,8 @@
-+
-+   if (!file_str)
-+     file_str = g_build_filename (pango_get_sysconf_subdirectory (),
-+-				 "pango.modules",
-++/* For multilib case, keep multiple config file for different libs */
-++				 MLPREFIX "pango.modules",
-+ 				 NULL);
-+
-+   files = pango_split_file_list (file_str);
-diff -Nurd pango-1.32.5/pango/querymodules.c pango-1.32.5/pango/querymodules.c
---- pango-1.32.5/pango/querymodules.c	2012-08-28 15:27:18.000000000 +0300
-+++ pango-1.32.5/pango/querymodules.c	2013-01-09 08:31:47.828511359 +0200
-@@ -304,7 +304,7 @@
-
-       cache_file = g_build_filename (pango_get_lib_subdirectory (),
-                                      MODULE_VERSION,
--                                     "modules.cache",
-+                                     MLPREFIX "modules.cache",
-                                      NULL);
-       err = NULL;
-       if (!g_file_set_contents (cache_file, contents->str, -1, &err))
diff --git a/yocto-poky/meta/recipes-graphics/pango/pango_1.36.8.bb b/yocto-poky/meta/recipes-graphics/pango/pango_1.36.8.bb
deleted file mode 100644
index f4e4250..0000000
--- a/yocto-poky/meta/recipes-graphics/pango/pango_1.36.8.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-require pango.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
-
-SRC_URI += "file://run-ptest \
-            file://multilib-fix-clean.patch \
-"
-
-SRC_URI[archive.md5sum] = "217a9a753006275215fa9fa127760ece"
-SRC_URI[archive.sha256sum] = "18dbb51b8ae12bae0ab7a958e7cf3317c9acfc8a1e1103ec2f147164a0fc2d07"
diff --git a/yocto-poky/meta/recipes-graphics/pango/pango_1.38.1.bb b/yocto-poky/meta/recipes-graphics/pango/pango_1.38.1.bb
new file mode 100644
index 0000000..7fc65fd
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/pango/pango_1.38.1.bb
@@ -0,0 +1,52 @@
+SUMMARY = "Framework for layout and rendering of internationalized text"
+DESCRIPTION = "Pango is a library for laying out and rendering of text, \
+with an emphasis on internationalization. Pango can be used anywhere \
+that text layout is needed, though most of the work on Pango so far has \
+been done in the context of the GTK+ widget toolkit. Pango forms the \
+core of text and font handling for GTK+-2.x."
+HOMEPAGE = "http://www.pango.org/"
+BUGTRACKER = "http://bugzilla.gnome.org"
+SECTION = "libs"
+LICENSE = "LGPLv2.0+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
+
+inherit gnomebase gtk-doc ptest-gnome upstream-version-is-even gobject-introspection
+
+SRC_URI += "file://run-ptest \
+            file://0001-Drop-introspection-macros-from-acinclude.m4.patch \
+"
+
+SRC_URI[archive.md5sum] = "7fde35d4a127b55ce8bbcefe109bc80d"
+SRC_URI[archive.sha256sum] = "1320569f6c6d75d6b66172b2d28e59c56ee864ee9df202b76799c4506a214eb7"
+
+DEPENDS = "glib-2.0 glib-2.0-native fontconfig freetype virtual/libiconv cairo harfbuzz"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
+PACKAGECONFIG[x11] = "--with-xft,--without-xft,virtual/libx11 libxft"
+
+EXTRA_AUTORECONF = ""
+
+EXTRA_OECONF = " \
+	        --disable-debug \
+	        "
+
+LEAD_SONAME = "libpango-1.0*"
+LIBV = "1.8.0"
+
+# This binary needs to be compiled for the host architecture.  This isn't pretty!
+do_compile_prepend_class-target () {
+	if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
+		make CC="${BUILD_CC}" CFLAGS="" LDFLAGS="" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
+	fi
+}
+
+FILES_${PN} = "${bindir}/* ${libdir}/libpango*${SOLIBS}"
+FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
+
+RDEPENDS_${PN}-ptest += "liberation-fonts cantarell-fonts"
+
+RPROVIDES_${PN} += "pango-modules pango-module-indic-lang \
+                    pango-module-basic-fc pango-module-arabic-lang"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb b/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
index 55ad78c..607f236 100644
--- a/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
+++ b/yocto-poky/meta/recipes-graphics/piglit/piglit_git.bb
@@ -5,8 +5,8 @@
 SRC_URI = "git://anongit.freedesktop.org/piglit \
            file://0001-tests-Fix-missing-include-of-Xutil.h.patch"
 
-# From 2014/12/04
-SRCREV = "126c7d049b8f32e541625d5a35fbc5f5e4e7fbf8"
+# From 2015-02-19
+SRCREV = "c4585427913e4cb28994b4bfb11d49778273aa2c"
 # (when PV goes above 1.0 remove the trailing r)
 PV = "1.0+gitr${SRCPV}"
 
@@ -34,10 +34,8 @@
    fi
 }
 
-FILES_${PN}-dbg += "${libdir}/piglit/*/.debug/"
-
 RDEPENDS_${PN} = "waffle python python-mako python-json python-subprocess \
-	python-argparse python-importlib python-unixadmin \
+	python-argparse python-importlib python-unixadmin python-xml \
 	python-multiprocessing python-textutils python-netserver python-shell \
 	mesa-demos bash \
 	"
diff --git a/yocto-poky/meta/recipes-graphics/tslib/tslib_1.1.bb b/yocto-poky/meta/recipes-graphics/tslib/tslib_1.1.bb
index 6d8c7dd..b0264c3 100644
--- a/yocto-poky/meta/recipes-graphics/tslib/tslib_1.1.bb
+++ b/yocto-poky/meta/recipes-graphics/tslib/tslib_1.1.bb
@@ -18,6 +18,7 @@
 SRC_URI[md5sum] = "14771f8607b341bb4b297819d37e837d"
 SRC_URI[sha256sum] = "fe35e5f710ea933b118f710e2ce4403ac076fe69926b570333867d4de082a51c"
 
+UPSTREAM_CHECK_URI = "https://github.com/kergoth/tslib/releases"
 
 inherit autotools pkgconfig
 
@@ -45,7 +46,6 @@
 RDEPENDS_${PN} = "tslib-conf"
 RRECOMMENDS_${PN} = "pointercal"
 
-FILES_${PN}-dbg += "${libdir}/ts/.debug*"
 FILES_${PN}-dev += "${libdir}/ts/*.la"
 FILES_tslib-conf = "${sysconfdir}/ts.conf ${sysconfdir}/profile.d/tslib.sh ${datadir}/tslib"
 FILES_${PN} = "${libdir}/*.so.* ${libdir}/ts/*.so*"
diff --git a/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.1.bb b/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.1.bb
deleted file mode 100644
index af84020..0000000
--- a/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.1.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "cross-platform C library to defer selection of GL API and of window system"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \
-                    file://include/waffle/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf"
-
-SRC_URI = "http://waffle-gl.org/files/release/${BPN}-${PV}/${BPN}-${PV}.tar.xz \
-           file://0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch \
-          "
-SRC_URI[md5sum] = "c0d802bc3d0aba87c51e423a3a8bdd69"
-SRC_URI[sha256sum] = "cbab0e926515064e818bf089a5af04be33307e5f40d07659fb40d59b2bfe20aa"
-
-inherit cmake distro_features_check lib_package
-
-# This should be overridden per-machine to reflect the capabilities of the GL
-# stack.
-PACKAGECONFIG ??= "glx"
-
-# libx11 requires x11 in DISTRO_FEATURES.
-REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'glx', 'x11', '', d)}"
-
-# I say virtual/libgl, actually wants gl.pc
-PACKAGECONFIG[glx] = "-Dwaffle_has_glx=1,-Dwaffle_has_glx=0,virtual/libgl libx11"
-
-# I say virtual/libgl, actually wants wayland-egl.pc, egl.pc, and the wayland
-# DISTRO_FEATURE.
-PACKAGECONFIG[wayland] = "-Dwaffle_has_wayland=1,-Dwaffle_has_wayland=0,virtual/libgl wayland"
-
-# I say virtual/libgl, actually wants gbm.pc egl.pc
-PACKAGECONFIG[gbm] = "-Dwaffle_has_gbm=1,-Dwaffle_has_gbm=0,virtual/libgl udev"
-
-# I say virtual/libgl, actually wants egl.pc
-PACKAGECONFIG[x11-egl] = "-Dwaffle_has_x11_egl=1,-Dwaffle_has_x11_egl=0,virtual/libgl libxcb"
-
-FILES_${PN}-dev += "${datadir}/cmake/Modules/FindWaffle.cmake \
-                    ${libdir}/cmake/Waffle/"
diff --git a/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb b/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb
new file mode 100644
index 0000000..f7db1bc
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/waffle/waffle_1.5.2.bb
@@ -0,0 +1,37 @@
+SUMMARY = "cross-platform C library to defer selection of GL API and of window system"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \
+                    file://include/waffle/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf"
+
+SRC_URI = "http://waffle-gl.org/files/release/${BPN}-${PV}/${BPN}-${PV}.tar.xz \
+           file://0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch \
+          "
+SRC_URI[md5sum] = "c669c91bf2f7e13a5d781c3dbb30fd8c"
+SRC_URI[sha256sum] = "d2c096cf654bf0061323a4b9231a1ef5b749a1e5c7c5bfe067e964219c2a851c"
+
+UPSTREAM_CHECK_URI = "http://www.waffle-gl.org/releases.html"
+
+inherit cmake distro_features_check lib_package
+
+# This should be overridden per-machine to reflect the capabilities of the GL
+# stack.
+PACKAGECONFIG ??= "glx"
+
+# libx11 requires x11 in DISTRO_FEATURES.
+REQUIRED_DISTRO_FEATURES = "${@bb.utils.contains('PACKAGECONFIG', 'glx', 'x11', '', d)}"
+
+# I say virtual/libgl, actually wants gl.pc
+PACKAGECONFIG[glx] = "-Dwaffle_has_glx=1,-Dwaffle_has_glx=0,virtual/libgl libx11"
+
+# I say virtual/libgl, actually wants wayland-egl.pc, egl.pc, and the wayland
+# DISTRO_FEATURE.
+PACKAGECONFIG[wayland] = "-Dwaffle_has_wayland=1,-Dwaffle_has_wayland=0,virtual/libgl wayland"
+
+# I say virtual/libgl, actually wants gbm.pc egl.pc
+PACKAGECONFIG[gbm] = "-Dwaffle_has_gbm=1,-Dwaffle_has_gbm=0,virtual/libgl udev"
+
+# I say virtual/libgl, actually wants egl.pc
+PACKAGECONFIG[x11-egl] = "-Dwaffle_has_x11_egl=1,-Dwaffle_has_x11_egl=0,virtual/libgl libxcb"
+
+FILES_${PN}-dev += "${datadir}/cmake/Modules/FindWaffle.cmake \
+                    ${libdir}/cmake/Waffle/"
diff --git a/yocto-poky/meta/recipes-graphics/wayland/libinput/libinput-configure.ac-add-arg-with-libunwind.patch b/yocto-poky/meta/recipes-graphics/wayland/libinput/libinput-configure.ac-add-arg-with-libunwind.patch
deleted file mode 100644
index df5ebcc..0000000
--- a/yocto-poky/meta/recipes-graphics/wayland/libinput/libinput-configure.ac-add-arg-with-libunwind.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From cc6fce587f2628c8b342764e06fb0fc27c1e8274 Mon Sep 17 00:00:00 2001
-From: Jackie Huang <jackie.huang@windriver.com>
-Date: Mon, 3 Aug 2015 20:33:44 -0700
-Subject: [PATCH] configure.ac: add arg --with-libunwind
-
-Add arg --with-libunwind for configure so it's optional to check
-libunwind, which is helpfull to make deterministic builds.
-
-Upstream-Status: Submitted [wayland-devel]
-
-Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
----
- configure.ac | 19 ++++++++++++++-----
- 1 file changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 314b0d4..242d251 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -60,13 +60,22 @@ PKG_PROG_PKG_CONFIG()
- PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0])
- PKG_CHECK_MODULES(LIBUDEV, [libudev])
- PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
--PKG_CHECK_MODULES(LIBUNWIND,
-+
-+AC_ARG_WITH(libunwind,
-+            AS_HELP_STRING([--without-libunwind],[Do not use libunwind]))
-+
-+AS_IF([test "x$with_libunwind" != "xno"],
-+	[PKG_CHECK_MODULES(LIBUNWIND,
- 		  [libunwind],
- 		  [HAVE_LIBUNWIND=yes],
--		  [HAVE_LIBUNWIND=no])
--if test "x$HAVE_LIBUNWIND" = "xyes"; then
--	AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
--fi
-+		  [HAVE_LIBUNWIND=no])],
-+	[HAVE_LIBUNWIND=no])
-+
-+AS_IF([test "x$HAVE_LIBUNWIND" = "xyes"],
-+	[AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])],
-+	[AS_IF([test "x$with_libunwind" = "xyes"],
-+		[AC_MSG_ERROR([libunwind requested but not found])])])
-+
- AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$HAVE_LIBUNWIND" = xyes])
- AC_PATH_PROG(ADDR2LINE, [addr2line])
- if test "x$ADDR2LINE" != "x"; then
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-graphics/wayland/libinput_0.21.0.bb b/yocto-poky/meta/recipes-graphics/wayland/libinput_0.21.0.bb
deleted file mode 100644
index ac5a249..0000000
--- a/yocto-poky/meta/recipes-graphics/wayland/libinput_0.21.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Library to handle input devices in Wayland compositors"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
-SECTION = "libs"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
-
-DEPENDS = "libevdev udev mtdev"
-
-SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
-           file://libinput-configure.ac-add-arg-with-libunwind.patch \
-           file://touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch \
-"
-SRC_URI[md5sum] = "f91d8f4ced986f1ae16d52ea02bc7837"
-SRC_URI[sha256sum] = "7cce7a9e510dfe5c4a19ad00e9350808d4f59f8611fd2b5e87213c507283f550"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
-PACKAGECONFIG[gui] = "--enable-event-gui,--disable-event-gui,cairo gtk+3"
-
-FILES_${PN} += "${libdir}/udev/"
-FILES_${PN}-dbg += "${libdir}/udev/.debug"
diff --git a/yocto-poky/meta/recipes-graphics/wayland/libinput_1.1.4.bb b/yocto-poky/meta/recipes-graphics/wayland/libinput_1.1.4.bb
new file mode 100644
index 0000000..4167679
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/wayland/libinput_1.1.4.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Library to handle input devices in Wayland compositors"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libinput/"
+SECTION = "libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2184aef38ff137ed33ce9a63b9d1eb8f"
+
+DEPENDS = "libevdev udev mtdev"
+
+SRC_URI = "http://www.freedesktop.org/software/${BPN}/${BP}.tar.xz \
+           file://touchpad-serial-synaptics-need-to-fake-new-touches-on-TRIPLETAP.patch \
+"
+SRC_URI[md5sum] = "0945318141c1a9f52857bbf65d175f32"
+SRC_URI[sha256sum] = "302cb76209b9c57a5a318e178f9bc446eede8ea79386103b5291cbfaa5fab5b6"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind"
+PACKAGECONFIG[gui] = "--enable-event-gui,--disable-event-gui,cairo gtk+3"
+
+FILES_${PN} += "${libdir}/udev/"
diff --git a/yocto-poky/meta/recipes-graphics/wayland/wayland/always-build-scanner.patch b/yocto-poky/meta/recipes-graphics/wayland/wayland/always-build-scanner.patch
deleted file mode 100644
index 5e0e6bf..0000000
--- a/yocto-poky/meta/recipes-graphics/wayland/wayland/always-build-scanner.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-build: always build wayland-scanner
-
-The previous idiom for building a cross-compiled Wayland is to build once for
-the build host (with --enable-scanner --disable-libraries) to get a
-wayland-scanner binary that can then be used in a cross-compile (with
---disable-scanner).  The problem with this is that the cross wayland is missing
-a wayland-scanner binary, which means you then can't do any Wayland development
-on the target.
-
-Instead, always build wayland-scanner for the target and change
---enable/disable-scanner to --with/without-host-scanner.  Normal builds use the
-default of --without-host-scanner and run the wayland-scanner it just built, and
-cross-compiled builds pass --with-host-scanner to use a previously built host
-scanner but still get a wayland-scanner to install.
-
-(a theoretically neater solution would be to build two scanners if required (one
-to run and one to install), but automake makes this overly complicated)
-
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-Upstream-Status: Submitted
-
-diff --git a/Makefile.am b/Makefile.am
-index c19494f..c2d929b 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -64,16 +64,17 @@ nodist_libwayland_client_la_SOURCES =		\
- 
- pkgconfig_DATA += src/wayland-client.pc src/wayland-server.pc
- 
--if ENABLE_SCANNER
--wayland_scanner = $(top_builddir)/wayland-scanner
- bin_PROGRAMS = wayland-scanner
- wayland_scanner_SOURCES = src/scanner.c
- wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(AM_CFLAGS)
- wayland_scanner_LDADD = $(EXPAT_LIBS) libwayland-util.la
--$(BUILT_SOURCES) : wayland-scanner
- pkgconfig_DATA += src/wayland-scanner.pc
--else
-+
-+if HOST_SCANNER
- wayland_scanner = wayland-scanner
-+else
-+$(BUILT_SOURCES) : wayland-scanner
-+wayland_scanner = $(top_builddir)/wayland-scanner
- endif
- 
- protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
-diff --git a/configure.ac b/configure.ac
-index c2a804e..de0b02f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -65,11 +65,11 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[],
- 	      [[#include <time.h>]])
- AC_CHECK_HEADERS([execinfo.h])
- 
--AC_ARG_ENABLE([scanner],
--              [AC_HELP_STRING([--disable-scanner],
--                              [Disable compilation of wayland-scanner])],
--              [],
--              [enable_scanner=yes])
-+AC_ARG_WITH([host-scanner],
-+            [AC_HELP_STRING([--with-host-scanner],
-+                            [Use a host wayland-scanner])],
-+            [],
-+            [with_host_scanner=no])
- 
- AC_ARG_ENABLE([documentation],
- 	      [AC_HELP_STRING([--disable-documentation],
-@@ -77,25 +77,23 @@ AC_ARG_ENABLE([documentation],
- 	      [],
- 	      [enable_documentation=yes])
- 
--AM_CONDITIONAL(ENABLE_SCANNER, test "x$enable_scanner" = xyes)
-+AM_CONDITIONAL(HOST_SCANNER, test "x$with_host_scanner" = xyes)
- 
- AC_ARG_WITH(icondir, [  --with-icondir=<dir>    Look for cursor icons here],
- 		     [  ICONDIR=$withval],
- 		     [  ICONDIR=${datadir}/icons])
- AC_SUBST([ICONDIR])
- 
--if test "x$enable_scanner" = "xyes"; then
--	PKG_CHECK_MODULES(EXPAT, [expat], [],
--		[AC_CHECK_HEADERS(expat.h, [],
--			[AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
--		 SAVE_LIBS="$LIBS"
--		 AC_SEARCH_LIBS(XML_ParserCreate, expat, [],
--			[AC_MSG_ERROR([Can't find expat library. Please install expat.])])
--		 EXPAT_LIBS="$LIBS"
--		 LIBS="$SAVE_LIBS"
--		 AC_SUBST(EXPAT_LIBS)
--		])
--fi
-+PKG_CHECK_MODULES(EXPAT, [expat], [],
-+	[AC_CHECK_HEADERS(expat.h, [],
-+		[AC_MSG_ERROR([Can't find expat.h. Please install expat.])])
-+	 SAVE_LIBS="$LIBS"
-+	 AC_SEARCH_LIBS(XML_ParserCreate, expat, [],
-+		[AC_MSG_ERROR([Can't find expat library. Please install expat.])])
-+	 EXPAT_LIBS="$LIBS"
-+	 LIBS="$SAVE_LIBS"
-+	 AC_SUBST(EXPAT_LIBS)
-+	])
- 
- AC_PATH_PROG(XSLTPROC, xsltproc)
- AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
diff --git a/yocto-poky/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch b/yocto-poky/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch
deleted file mode 100644
index cd8bc55..0000000
--- a/yocto-poky/meta/recipes-graphics/wayland/wayland/disable-macro-checks-not-used-for-scanner.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-disable macro checks not used for scanner
-
-We only build wayland-native for the scanner, so disable the bits we don't
-actually need. This avoid build issue on older distro such as Centos 5.x:
-| error: 'O_CLOEXEC' undeclared (first use in this function)
-| error: sys/timerfd.h: No such file or directory
-| error: 'CLOCK_MONOTONIC' undeclared (first use in this function)
-| error: 'TFD_CLOEXEC' undeclared (first use in this function)
-| error: 'SFD_CLOEXEC' undeclared (first use in this function)
-
-Upstream-Status: Pending
-
-Signed-off-by: Ting Liu <b28495@freescale.com>
----
- configure.ac | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
---- a/configure.ac
-+++ b/configure.ac
-@@ -41,16 +41,16 @@ AC_SUBST(GCC_CFLAGS)
- 
- AC_CHECK_FUNCS([accept4 mkostemp posix_fallocate])
- 
--AC_CHECK_DECL(SFD_CLOEXEC,[],
--	      [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland")],
--	      [[#include <sys/signalfd.h>]])
--AC_CHECK_DECL(TFD_CLOEXEC,[],
--	      [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland")],
--	      [[#include <sys/timerfd.h>]])
--AC_CHECK_DECL(CLOCK_MONOTONIC,[],
--	      [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland")],
--	      [[#include <time.h>]])
--AC_CHECK_HEADERS([execinfo.h])
-+##AC_CHECK_DECL(SFD_CLOEXEC,[],
-+#	      [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile wayland")],
-+#	      [[#include <sys/signalfd.h>]])
-+#AC_CHECK_DECL(TFD_CLOEXEC,[],
-+#	      [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile wayland")],
-+#	      [[#include <sys/timerfd.h>]])
-+#AC_CHECK_DECL(CLOCK_MONOTONIC,[],
-+#	      [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile wayland")],
-+#	      [[#include <time.h>]])
-+#AC_CHECK_HEADERS([execinfo.h])
- 
- AC_ARG_ENABLE([scanner],
-               [AC_HELP_STRING([--disable-scanner],
--- 
-1.8.3.2
-
diff --git a/yocto-poky/meta/recipes-graphics/wayland/wayland_1.8.1.bb b/yocto-poky/meta/recipes-graphics/wayland/wayland_1.8.1.bb
deleted file mode 100644
index 0f9a0aa..0000000
--- a/yocto-poky/meta/recipes-graphics/wayland/wayland_1.8.1.bb
+++ /dev/null
@@ -1,45 +0,0 @@
-SUMMARY = "Wayland, a protocol between a compositor and clients"
-DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
-as well as a C library implementation of that protocol. The compositor can be \
-a standalone display server running on Linux kernel modesetting and evdev \
-input devices, an X application, or a wayland client itself. The clients can \
-be traditional applications, X servers (rootless or fullscreen) or other \
-display servers."
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=1d4476a7d98dd5691c53d4d43a510c72 \
-                    file://src/wayland-server.c;endline=21;md5=079ae21dbf98ada52ec23744851b0a5c"
-
-SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
-           file://always-build-scanner.patch"
-SRC_URI[md5sum] = "6e877877c3e04cfb865cfcd0733c9ab1"
-SRC_URI[sha256sum] = "f17c938d1c24fd0a10f650a623a2775d329db3168b5732e498b08388ec776fc8"
-
-SRC_URI_append_class-native = " \
-    file://disable-macro-checks-not-used-for-scanner.patch \
-    "
-EXTRA_OECONF_class-native = "--disable-documentation"
-
-inherit autotools pkgconfig
-
-BBCLASSEXTEND = "native nativesdk"
-
-DEPENDS = "expat libffi wayland-native"
-
-EXTRA_OECONF = "--disable-documentation --with-host-scanner"
-
-# Wayland installs a M4 macro for other projects to use, which uses the target
-# pkg-config to find files.  Replace pkg-config with pkg-config-native.
-do_install_append_class-native() {
-  sed -e 's,PKG_CHECK_MODULES(.*),,g' \
-      -e 's,$PKG_CONFIG,pkg-config-native,g' \
-      -i ${D}/${datadir}/aclocal/wayland-scanner.m4
-}
-
-sysroot_stage_all_append_class-target () {
-	rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
-	cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
-}
-
-FILES_${PN} = "${libdir}/*${SOLIBS}"
-FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
diff --git a/yocto-poky/meta/recipes-graphics/wayland/wayland_1.9.0.bb b/yocto-poky/meta/recipes-graphics/wayland/wayland_1.9.0.bb
new file mode 100644
index 0000000..d12ac18
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/wayland/wayland_1.9.0.bb
@@ -0,0 +1,41 @@
+SUMMARY = "Wayland, a protocol between a compositor and clients"
+DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \
+as well as a C library implementation of that protocol. The compositor can be \
+a standalone display server running on Linux kernel modesetting and evdev \
+input devices, an X application, or a wayland client itself. The clients can \
+be traditional applications, X servers (rootless or fullscreen) or other \
+display servers."
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \
+                    file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce"
+
+SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "5e141b3f2a7005d6c89d6f233c87c317"
+SRC_URI[sha256sum] = "9c8770720aa0034479735f58a4dc4ca9b172ecfede28f5134312e135b7301efa"
+
+EXTRA_OECONF_class-native = "--disable-documentation --disable-libraries"
+
+inherit autotools pkgconfig
+
+BBCLASSEXTEND = "native nativesdk"
+
+DEPENDS = "expat libffi wayland-native"
+
+EXTRA_OECONF = "--disable-documentation --with-host-scanner"
+
+# Wayland installs a M4 macro for other projects to use, which uses the target
+# pkg-config to find files.  Replace pkg-config with pkg-config-native.
+do_install_append_class-native() {
+  sed -e 's,PKG_CHECK_MODULES(.*),,g' \
+      -e 's,$PKG_CONFIG,pkg-config-native,g' \
+      -i ${D}/${datadir}/aclocal/wayland-scanner.m4
+}
+
+sysroot_stage_all_append_class-target () {
+	rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4
+	cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/
+}
+
+FILES_${PN} = "${libdir}/*${SOLIBS}"
+FILES_${PN}-dev += "${bindir} ${datadir}/wayland"
diff --git a/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb b/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb
index 38b78bc..653541e 100644
--- a/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb
+++ b/yocto-poky/meta/recipes-graphics/wayland/weston-init.bb
@@ -1,19 +1,28 @@
-SUMMARY = "Startup script for the Weston Wayland compositor"
+SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
 
-SRC_URI = "file://init"
+SRC_URI = "file://init \
+           file://weston.service"
 
 S = "${WORKDIR}"
 
 do_install() {
 	install -d ${D}/${sysconfdir}/init.d
 	install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+
+	install -d ${D}${systemd_system_unitdir}
+	install -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}
 }
 
-inherit allarch update-rc.d
+inherit allarch update-rc.d distro_features_check systemd
+
+# rdepends on weston which depends on virtual/egl
+REQUIRED_DISTRO_FEATURES = "opengl"
 
 RDEPENDS_${PN} = "weston kbd"
 
 INITSCRIPT_NAME = "weston"
 INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
+
+SYSTEMD_SERVICE_${PN} = "weston.service"
diff --git a/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston.service b/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston.service
new file mode 100644
index 0000000..4f1f7ff
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/wayland/weston-init/weston.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Weston Wayland compositor startup
+RequiresMountsFor=/run
+
+[Service]
+User=root
+EnvironmentFile=-/etc/default/weston
+Environment="XDG_RUNTIME_DIR=/run/user/root"
+ExecStartPre=/bin/mkdir -p /run/user/root
+ExecStartPre=/bin/chmod 0700 /run/user/root
+ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/yocto-poky/meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch b/yocto-poky/meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch
deleted file mode 100644
index 68ba38b..0000000
--- a/yocto-poky/meta/recipes-graphics/wayland/weston/disable-wayland-scanner-pkg-check.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: git/configure.ac
-===================================================================
---- git.orig/configure.ac
-+++ git/configure.ac
-@@ -501,12 +501,6 @@ if test "x$have_lcms" = xyes; then
- fi
- AM_CONDITIONAL(HAVE_LCMS, [test "x$have_lcms" = xyes])
- 
--AC_PATH_PROG([wayland_scanner], [wayland-scanner])
--if test x$wayland_scanner = x; then
--	PKG_CHECK_MODULES(WAYLAND_SCANNER, [wayland-scanner])
--	wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
--fi
--
- AC_CONFIG_FILES([Makefile src/version.h src/weston.pc])
- 
- AM_CONDITIONAL([HAVE_GIT_REPO], [test -f $srcdir/.git/logs/HEAD])
diff --git a/yocto-poky/meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch b/yocto-poky/meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch
new file mode 100644
index 0000000..a40eaf1
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/wayland/weston/explicit-enable-disable-systemd.patch
@@ -0,0 +1,70 @@
+From 8e1efcd40b3bad81c83744e2e120d70c2b567ef2 Mon Sep 17 00:00:00 2001
+From: Frederico Cadete <frederico@cadete.eu>
+Date: Mon, 28 Sep 2015 00:30:10 +0200
+Subject: configure.ac: add explicit enable/disable for systemd-login support
+
+Otherwise, auto-enable depending on whether the system has the necessary
+libraries.
+
+[Updated help text as per pq suggestion -- bwh]
+
+Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
+Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
+Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
+
+Upstream-Status: Backport
+Backported from Weston git:
+http://cgit.freedesktop.org/wayland/weston/commit/?id=8e1efc
+
+Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
+
+diff --git a/configure.ac b/configure.ac
+index a9cd429..67e80d0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -380,18 +380,30 @@ AC_ARG_ENABLE(resize-optimization,
+ AS_IF([test "x$enable_resize_optimization" = "xyes"],
+       [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
+ 
+-PKG_CHECK_MODULES(SYSTEMD_LOGIN,
+-                  [libsystemd >= 209],
+-                  [have_systemd_login_209=yes;have_systemd_login=yes],
+-                  [have_systemd_login_209=no;have_systemd_login=no])
+-
+-# Older versions of systemd package systemd-login separately. Fall back on that
+-AS_IF([test x$have_systemd_login != xyes],[
+-      PKG_CHECK_MODULES(SYSTEMD_LOGIN,
+-                        [libsystemd-login >= 198],
+-                        [have_systemd_login=yes],
+-                        [have_systemd_login=no])
+-      ])
++AC_ARG_ENABLE(systemd-login,
++              AS_HELP_STRING([--enable-systemd-login],
++                             [Enable logind support]),,
++              enable_systemd_login=auto)
++if test x$enable_systemd_login != xno; then
++  PKG_CHECK_MODULES(SYSTEMD_LOGIN,
++                    [libsystemd >= 209],
++                    [have_systemd_login_209=yes;have_systemd_login=yes],
++                    [have_systemd_login_209=no;have_systemd_login=no])
++
++  # Older versions of systemd package systemd-login separately. Fall back on that
++  AS_IF([test x$have_systemd_login != xyes],[
++        PKG_CHECK_MODULES(SYSTEMD_LOGIN,
++                          [libsystemd-login >= 198],
++                          [have_systemd_login=yes],
++                          [have_systemd_login=no])
++        ])
++else
++  have_systemd_login=no
++fi
++
++if test "x$have_systemd_login" = "xno" -a "x$enable_systemd_login" = "xyes"; then
++  AC_MSG_ERROR([systemd-login support explicitly enabled, but can't find libsystemd>=209 or libsystemd-login])
++fi
+ 
+ AS_IF([test "x$have_systemd_login" = "xyes"],
+       [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
+-- 
+cgit v0.10.2
+
diff --git a/yocto-poky/meta/recipes-graphics/wayland/weston/libsystemd.patch b/yocto-poky/meta/recipes-graphics/wayland/weston/libsystemd.patch
new file mode 100644
index 0000000..2d28d56
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/wayland/weston/libsystemd.patch
@@ -0,0 +1,53 @@
+From 5eb025a867b42f8bc7bc73279eac8de58e51a13e Mon Sep 17 00:00:00 2001
+From: Frederico Cadete <frederico@cadete.eu>
+Date: Mon, 28 Sep 2015 00:30:09 +0200
+Subject: configure.ac: add support for new versions of systemd
+
+Starting from systemd version 209, a single libsystemd.pc is provided.
+For previous versions, fall back on libsystemd-login.pc.
+
+Signed-off-by: Frederico Cadete <frederico@cadete.eu>
+Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
+Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
+
+Upstream-Status: Backport
+Backported from Weston git:
+http://cgit.freedesktop.org/wayland/weston/commit/?id=5eb025
+
+Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk>
+
+diff --git a/configure.ac b/configure.ac
+index 045291c..a9cd429 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -380,14 +380,23 @@ AC_ARG_ENABLE(resize-optimization,
+ AS_IF([test "x$enable_resize_optimization" = "xyes"],
+       [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
+ 
+-PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libsystemd-login >= 198],
+-                  [have_systemd_login=yes], [have_systemd_login=no])
++PKG_CHECK_MODULES(SYSTEMD_LOGIN,
++                  [libsystemd >= 209],
++                  [have_systemd_login_209=yes;have_systemd_login=yes],
++                  [have_systemd_login_209=no;have_systemd_login=no])
++
++# Older versions of systemd package systemd-login separately. Fall back on that
++AS_IF([test x$have_systemd_login != xyes],[
++      PKG_CHECK_MODULES(SYSTEMD_LOGIN,
++                        [libsystemd-login >= 198],
++                        [have_systemd_login=yes],
++                        [have_systemd_login=no])
++      ])
++
+ AS_IF([test "x$have_systemd_login" = "xyes"],
+       [AC_DEFINE([HAVE_SYSTEMD_LOGIN], [1], [Have systemd-login])])
+ AM_CONDITIONAL(HAVE_SYSTEMD_LOGIN, test "x$have_systemd_login" = "xyes")
+ 
+-PKG_CHECK_MODULES(SYSTEMD_LOGIN_209, [libsystemd-login >= 209],
+-                  [have_systemd_login_209=yes], [have_systemd_login_209=no])
+ AS_IF([test "x$have_systemd_login_209" = "xyes"],
+       [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
+ 
+-- 
+cgit v0.10.2
+
diff --git a/yocto-poky/meta/recipes-graphics/wayland/weston/parallelmake.patch b/yocto-poky/meta/recipes-graphics/wayland/weston/parallelmake.patch
deleted file mode 100644
index 42b5efb..0000000
--- a/yocto-poky/meta/recipes-graphics/wayland/weston/parallelmake.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Backport two patches from upstream to fix parallel builds
-
-- mkdir races (2eff22b8e6f6e5255a1915c33dfd91cecf02cbbc)
-- weston.desktop race (315476fa7b1f1c44c1b35116036df54ac5cb9a03)
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/Makefile.am b/Makefile.am
-index 5819b19..ff13b19 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -20,7 +20,7 @@ weston.ini : $(srcdir)/weston.ini.in
- 		$< > $@
- 
- ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
--	$(AM_V_GEN)$(SED) \
-+	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
- 		-e 's|@bindir[@]|$(bindir)|g' \
- 		-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
- 		-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
-@@ -29,7 +29,7 @@ ivi-shell/weston.ini : $(srcdir)/ivi-shell/weston.ini.in
- 		$< > $@
- 
- tests/weston-ivi.ini : $(srcdir)/ivi-shell/weston.ini.in
--	$(AM_V_GEN)$(SED) \
-+	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
- 		-e 's|@bindir[@]|$(bindir)|g' \
- 		-e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
- 		-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
-@@ -179,8 +179,7 @@ pkgconfigdir = $(libdir)/pkgconfig
- pkgconfig_DATA = src/weston.pc
- 
- wayland_sessiondir = $(datadir)/wayland-sessions
--wayland_session_DATA = src/weston.desktop
--dist_wayland_session_DATA = $(wayland_session_DATA)
-+dist_wayland_session_DATA = src/weston.desktop
- 
- westonincludedir = $(includedir)/weston
- westoninclude_HEADERS =				\
diff --git a/yocto-poky/meta/recipes-graphics/wayland/weston_1.8.0.bb b/yocto-poky/meta/recipes-graphics/wayland/weston_1.8.0.bb
deleted file mode 100644
index 342c604..0000000
--- a/yocto-poky/meta/recipes-graphics/wayland/weston_1.8.0.bb
+++ /dev/null
@@ -1,94 +0,0 @@
-SUMMARY = "Weston, a Wayland compositor"
-DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=275efac2559a224527bd4fd593d38466 \
-                    file://src/compositor.c;endline=23;md5=a9793f1edc8d1a4c344ca8ae252352fb"
-
-SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
-           file://weston.png \
-           file://weston.desktop \
-           file://make-lcms-explicitly-configurable.patch \
-           file://make-libwebp-explicitly-configurable.patch \
-           file://0001-make-error-portable.patch \
-           file://parallelmake.patch \
-"
-SRC_URI[md5sum] = "24cb8a7ed0535b4fc3642643988dab36"
-SRC_URI[sha256sum] = "8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada5ad312"
-
-inherit autotools pkgconfig useradd
-
-DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
-DEPENDS += "wayland libinput virtual/egl pango"
-
-EXTRA_OECONF = "--enable-setuid-install \
-                --disable-xwayland \
-                --enable-simple-clients \
-                --enable-clients \
-                --enable-demo-clients-install \
-                --disable-rpi-compositor \
-                --disable-rdp-compositor \
-                "
-
-EXTRA_OECONF_append_qemux86 = "\
-		WESTON_NATIVE_BACKEND=fbdev-backend.so \
-		"
-EXTRA_OECONF_append_qemux86-64 = "\
-		WESTON_NATIVE_BACKEND=fbdev-backend.so \
-		"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
-                  "
-#
-# Compositor choices
-#
-# Weston on KMS
-PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
-# Weston on Wayland (nested Weston)
-PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
-# Weston on X11
-PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
-# Headless Weston
-PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
-# Weston on framebuffer
-PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
-# weston-launch
-PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,libpam drm"
-# VA-API desktop recorder
-PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
-# Weston with EGL support
-PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
-# Weston with cairo glesv2 support
-PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
-# Weston with lcms support
-PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
-# Weston with webp support
-PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
-# Weston with unwinding support
-PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
-
-do_install_append() {
-	# Weston doesn't need the .la files to load modules, so wipe them
-	rm -f ${D}/${libdir}/weston/*.la
-
-	# If X11, ship a desktop file to launch it
-	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
-		install -d ${D}${datadir}/applications
-		install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
-
-		install -d ${D}${datadir}/icons/hicolor/48x48/apps
-		install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
-        fi
-}
-
-PACKAGES += "${PN}-examples"
-
-FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
-FILES_${PN}-examples = "${bindir}/*"
-
-RDEPENDS_${PN} += "xkeyboard-config"
-RRECOMMENDS_${PN} = "liberation-fonts"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/yocto-poky/meta/recipes-graphics/wayland/weston_1.9.0.bb b/yocto-poky/meta/recipes-graphics/wayland/weston_1.9.0.bb
new file mode 100644
index 0000000..16a788d
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/wayland/weston_1.9.0.bb
@@ -0,0 +1,103 @@
+SUMMARY = "Weston, a Wayland compositor"
+DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
+                    file://src/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331"
+
+SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+           file://weston.png \
+           file://weston.desktop \
+           file://make-lcms-explicitly-configurable.patch \
+           file://make-libwebp-explicitly-configurable.patch \
+           file://0001-make-error-portable.patch \
+           file://libsystemd.patch \
+           file://explicit-enable-disable-systemd.patch \
+"
+SRC_URI[md5sum] = "66bbba12f546570b4d97f676bc79a28e"
+SRC_URI[sha256sum] = "9c1b03f3184fa0b0dfdf67e215048085156e1a2ca344af6613fed36794ac48cf"
+
+inherit autotools pkgconfig useradd distro_features_check
+# depends on virtual/egl
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
+DEPENDS += "wayland libinput virtual/egl pango wayland-native"
+
+EXTRA_OECONF = "--enable-setuid-install \
+                --enable-simple-clients \
+                --enable-clients \
+                --enable-demo-clients-install \
+                --disable-rpi-compositor \
+                --disable-rdp-compositor \
+                "
+
+EXTRA_OECONF_append_qemux86 = "\
+		WESTON_NATIVE_BACKEND=fbdev-backend.so \
+		"
+EXTRA_OECONF_append_qemux86-64 = "\
+		WESTON_NATIVE_BACKEND=fbdev-backend.so \
+		"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
+                  "
+#
+# Compositor choices
+#
+# Weston on KMS
+PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
+# Weston on Wayland (nested Weston)
+PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
+# Weston on X11
+PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
+# Headless Weston
+PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
+# Weston on framebuffer
+PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
+# weston-launch
+PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,libpam drm"
+# VA-API desktop recorder
+PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
+# Weston with EGL support
+PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
+# Weston with cairo glesv2 support
+PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
+# Weston with lcms support
+PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
+# Weston with webp support
+PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
+# Weston with unwinding support
+PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
+# Weston with systemd-login support
+PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
+# Weston with Xwayland support
+PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,libxcb libxcursor cairo"
+# colord CMS support
+PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
+
+do_install_append() {
+	# Weston doesn't need the .la files to load modules, so wipe them
+	rm -f ${D}/${libdir}/weston/*.la
+
+	# If X11, ship a desktop file to launch it
+	if [ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}" = "x11" ]; then
+		install -d ${D}${datadir}/applications
+		install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
+
+		install -d ${D}${datadir}/icons/hicolor/48x48/apps
+		install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
+        fi
+}
+
+PACKAGES += "${PN}-examples"
+
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
+FILES_${PN}-examples = "${bindir}/*"
+
+RDEPENDS_${PN} += "xkeyboard-config"
+RRECOMMENDS_${PN} = "liberation-fonts"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/yocto-poky/meta/recipes-graphics/x11-common/x11-common/Xserver.in b/yocto-poky/meta/recipes-graphics/x11-common/x11-common/Xserver.in
new file mode 100644
index 0000000..b8eed76
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/x11-common/x11-common/Xserver.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+
+XSERVER=/usr/bin/Xorg
+
+. /etc/profile
+
+ARGS=" -br -pn @BLANK_ARGS@"
+
+DISPLAY=':0'
+
+exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*
diff --git a/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver b/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
deleted file mode 100644
index 73570df..0000000
--- a/yocto-poky/meta/recipes-graphics/x11-common/x11-common/etc/X11/Xserver
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-#
-
-XSERVER=/usr/bin/Xorg
-
-. /etc/profile
-
-ARGS=" -br -pn"
-
-DISPLAY=':0'
-
-exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*
diff --git a/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb b/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb
index 156b329..6d7c347 100644
--- a/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb
+++ b/yocto-poky/meta/recipes-graphics/x11-common/x11-common_0.1.bb
@@ -9,14 +9,21 @@
 REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI = "file://etc \
+           file://Xserver.in \
            file://gplv2-license.patch"
 
 S = "${WORKDIR}"
 
+PACKAGECONFIG ??= "blank"
+# dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG
+PACKAGECONFIG[blank] = ""
+
 do_install() {
 	cp -R ${S}/etc ${D}${sysconfdir}
+	sed -e 's/@BLANK_ARGS@/${@bb.utils.contains('PACKAGECONFIG', 'blank', '', '-s 0 -dpms', d)}/' \
+		${S}/Xserver.in > ${D}${sysconfdir}/X11/Xserver
+
 	chmod -R 755 ${D}${sysconfdir}
-	find ${D}${sysconfdir} -type f -name \*~ -exec rm -rf {} \;
 }
 
 RDEPENDS_${PN} = "dbus-x11 xmodmap xdpyinfo xtscal xinit formfactor"
diff --git a/yocto-poky/meta/recipes-graphics/x11vnc/files/endian-fix.patch b/yocto-poky/meta/recipes-graphics/x11vnc/files/endian-fix.patch
deleted file mode 100644
index f2a538b..0000000
--- a/yocto-poky/meta/recipes-graphics/x11vnc/files/endian-fix.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-libvncserver: replace LIBVNCSERVER_WORDS_BIGENDIAN with WORDS_BIGENDIAN
-
-since macro AC_C_BIGENDIAN is used in autoconf and WORDS_BIGENDIAN is
-automatically set for different arch, it is better to use WORDS_BIGENDIAN
-instead of LIBVNCSERVER_WORDS_BIGENDIAN, which cuase issue in mips.
-
-Signed-off-by: Yu Ke <ke.yu@intel.com>
-
-Upstream-Status: Pending
-
-diff --git a/libvncserver/main.c b/libvncserver/main.c
-index b6bd930..8bbb7bf 100644
---- a/libvncserver/main.c
-+++ b/libvncserver/main.c
-@@ -47,7 +47,7 @@ static MUTEX(extMutex);
- 
- static int rfbEnableLogging=1;
- 
--#ifdef LIBVNCSERVER_WORDS_BIGENDIAN
-+#ifdef WORDS_BIGENDIAN
- char rfbEndianTest = (1==0);
- #else
- char rfbEndianTest = (1==1);
-
diff --git a/yocto-poky/meta/recipes-graphics/x11vnc/files/starting-fix.patch b/yocto-poky/meta/recipes-graphics/x11vnc/files/starting-fix.patch
deleted file mode 100644
index f62e405..0000000
--- a/yocto-poky/meta/recipes-graphics/x11vnc/files/starting-fix.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-"-gui" & "-rfbport" require "wish" installed, or else x11vnc fails to start.
-Removing these 2 parameters makes x11vnc works well on poky sato image.
-
-Add also -skip_lockkeys option to ignore all Caps_Lock, Shift_Lock, Num_Lock,
-Scroll_Lock keysyms received from viewers, in order to leave the lock state on
-the server side unchanged. Yet, the keys will appear correctly.
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: x11vnc-0.9.12/x11vnc/x11vnc.desktop
-===================================================================
---- x11vnc-0.9.12.orig/x11vnc/x11vnc.desktop	2011-03-03 10:33:18.000000000 +0800
-+++ x11vnc-0.9.12/x11vnc/x11vnc.desktop	2011-03-03 10:35:20.000000000 +0800
-@@ -1,7 +1,7 @@
- [Desktop Entry]
- Name=X11VNC Server
- Comment=Share this desktop by VNC
--Exec=x11vnc -gui tray=setpass -rfbport PROMPT -bg -o %%HOME/.x11vnc.log.%%VNCDISPLAY
-+Exec=x11vnc -bg -rfbport 5900 -skip_lockkeys -o %%HOME/.x11vnc.log.%%VNCDISPLAY
- Icon=computer
- Terminal=false
- Type=Application
diff --git a/yocto-poky/meta/recipes-graphics/x11vnc/x11vnc_0.9.13.bb b/yocto-poky/meta/recipes-graphics/x11vnc/x11vnc_0.9.13.bb
deleted file mode 100644
index ec0241f..0000000
--- a/yocto-poky/meta/recipes-graphics/x11vnc/x11vnc_0.9.13.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Exports your X session on-the-fly via VNC"
-HOMEPAGE = "http://www.karlrunge.com/x11vnc/"
-
-SECTION = "x11/utils"
-AUTHOR = "Karl Runge"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=361b6b837cad26c6900a926b62aada5f \
-                    file://x11vnc/x11vnc.h;endline=33;md5=6f95dc6535467d7ee1563fd434fb372e"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/libvncserver/x11vnc/${PV}/x11vnc-${PV}.tar.gz\
-           file://starting-fix.patch \
-           file://endian-fix.patch "
-
-SRC_URI[md5sum] = "a372ec4fe8211221547b1c108cf56e4c"
-SRC_URI[sha256sum] = "f6829f2e629667a5284de62b080b13126a0736499fe47cdb447aedb07a59f13b"
-
-DEPENDS = "openssl virtual/libx11 libxext jpeg zlib libxfixes libxrandr libxdamage libxtst"
-
-inherit autotools-brokensep distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)}"
-PACKAGECONFIG[avahi] = "--with-avahi,--without-avahi,avahi"
-PACKAGECONFIG[xinerama] = "--with-xinerama,--without-xinerama,libxinerama"
diff --git a/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme-0.1.1/fix_watch_cursor.patch b/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme-0.1.1/fix_watch_cursor.patch
deleted file mode 100644
index cfac55c..0000000
--- a/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme-0.1.1/fix_watch_cursor.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Fix typo in Makefile
-
-Upstream-Status: Pending
-
-Index: xcursor-transparent-theme-0.1.1/cursors/Makefile.am
-===================================================================
---- xcursor-transparent-theme-0.1.1.orig/cursors/Makefile.am	2013-03-07 22:25:04.001435305 +0000
-+++ xcursor-transparent-theme-0.1.1/cursors/Makefile.am	2013-03-07 22:25:04.061435302 +0000
-@@ -79,7 +79,7 @@
- 	ul_angle \
- 	ur_angle \
- 	v_double_arrow \
--	watcha \
-+	watch \
- 	xterm  
- 
- CURSOR_DIR = $(datadir)/icons/xcursor-transparent/cursors
diff --git a/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme-0.1.1/use-relative-symlinks.patch b/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme-0.1.1/use-relative-symlinks.patch
deleted file mode 100644
index 5028fd6..0000000
--- a/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme-0.1.1/use-relative-symlinks.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Use relative symlink for link rather than absolute path which 
-doesn't work well in DESTDIR setting.
-
-Also fix out of tree builds to use correct srcdir.
-
-Upstream-Status: Pending
-
-RP 2013/3/8
-
-Index: xcursor-transparent-theme-0.1.1/cursors/Makefile.am
-===================================================================
---- xcursor-transparent-theme-0.1.1.orig/cursors/Makefile.am	2013-03-07 22:25:03.933435307 +0000
-+++ xcursor-transparent-theme-0.1.1/cursors/Makefile.am	2013-03-07 22:25:27.293434755 +0000
-@@ -88,9 +88,9 @@
- 
- install-data-local:
- 	$(mkinstalldirs) $(DESTDIR)$(CURSOR_DIR); 
--	$(INSTALL_DATA) $(CURSOR_REAL) $(DESTDIR)$(CURSOR_DIR)/ 
-+	$(INSTALL_DATA) $(srcdir)/$(CURSOR_REAL) $(DESTDIR)$(CURSOR_DIR)/
- 	for CURSOR in $(CURSOR_NAMES); do \
- 		echo '-- Installing cursor '$$CURSOR; \
--		ln -s $(DESTDIR)$(CURSOR_DIR)/transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \
-+		ln -s transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \
- 	done
- 
diff --git a/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_0.1.1.bb b/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_0.1.1.bb
deleted file mode 100644
index 5e668ab..0000000
--- a/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_0.1.1.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Transparent X11 cursor theme for touchscreens"
-HOMEPAGE = "http://www.matchbox-project.org/"
-BUGTRACKER = "http://bugzilla.yoctoproject.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
-
-SECTION = "x11/base"
-PR = "r4"
-
-SRC_URI = "http://downloads.yoctoproject.org/releases/matchbox/utils/xcursor-transparent-theme-${PV}.tar.gz \
-	   file://use-relative-symlinks.patch \
-	   file://fix_watch_cursor.patch"
-
-SRC_URI[md5sum] = "7b0c623049d4aab20600d6473f8aab23"
-SRC_URI[sha256sum] = "b26adf2d503d01299718390ae39dab4691a67220de09423be0364e9a060bf7e4"
-FILES_${PN} = "${datadir}/icons/xcursor-transparent/cursors/*"
-
-inherit autotools allarch
diff --git a/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb b/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
new file mode 100644
index 0000000..b871d89
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xcursor-transparent-theme/xcursor-transparent-theme_git.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Transparent X11 cursor theme for touchscreens"
+HOMEPAGE = "http://www.matchbox-project.org/"
+BUGTRACKER = "http://bugzilla.yoctoproject.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+SECTION = "x11/base"
+
+SRCREV = "23c8af5ba4a1b7efbaf0bbca59a65ff7e10a1a06"
+PV = "0.1.1+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master"
+
+S = "${WORKDIR}/git"
+
+inherit autotools allarch
+
+FILES_${PN} = "${datadir}/icons/xcursor-transparent/cursors/*"
diff --git a/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch b/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
new file mode 100644
index 0000000..9351331
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator/add-geometry-input-when-calibrating.patch
@@ -0,0 +1,33 @@
+Upstream-Status: Inappropriate [no longer maintained]
+
+From 93abf28d602da637376b78de8c88b7ab5cf13b4f Mon Sep 17 00:00:00 2001
+From: Jonathan David <jonathan.david@ni.com>
+Date: Mon, 30 Nov 2015 12:12:20 -0600
+Subject: [PATCH] add geometry input when calibrating
+
+Send monitor geometry to xinput_calibrator when running the script
+
+Signed-off-by: Jonathan David <jonathan.david@ni.com>
+---
+ scripts/xinput_calibrator_pointercal.sh | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/xinput_calibrator_pointercal.sh b/scripts/xinput_calibrator_pointercal.sh
+index 0ada7da..6a3aded 100755
+--- a/scripts/xinput_calibrator_pointercal.sh
++++ b/scripts/xinput_calibrator_pointercal.sh
+@@ -37,7 +37,10 @@ done
+ 
+ [ "$USER" != "root" ] && CALFILE=$USER_CALFILE
+ 
+-CALDATA=`$BINARY --output-type xinput -v | tee $LOGFILE | grep '    xinput set' | sed 's/^    //g; s/$/;/g'`
++read RESOLUTION <<< $(xrandr | awk -F '[[:space:]+]' '/ connected/ \
++  { if ($3 != "primary") print $3; if ($3 == "primary") print $4 }')
++
++CALDATA=`$BINARY --geometry $RESOLUTION --output-type xinput -v | tee $LOGFILE | grep '    xinput set' | sed 's/^    //g; s/$/;/g'`
+ if [ ! -z "$CALDATA" ] ; then
+   echo $CALDATA > $CALFILE
+   echo "Calibration data stored in $CALFILE (log in $LOGFILE)"
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb b/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
index a9de3d7..ac5b70c 100644
--- a/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
+++ b/yocto-poky/meta/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bb
@@ -14,7 +14,8 @@
 SRCREV = "c01c5af807cb4b0157b882ab07a893df9a810111"
 SRC_URI = "git://github.com/tias/xinput_calibrator.git \
            file://30xinput_calibrate.sh \
-           file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch"
+           file://Allow-xinput_calibrator_pointercal.sh-to-be-run-as-n.patch \
+           file://add-geometry-input-when-calibrating.patch"
 
 S = "${WORKDIR}/git"
 
diff --git a/yocto-poky/meta/recipes-graphics/xorg-app/xinput_1.6.1.bb b/yocto-poky/meta/recipes-graphics/xorg-app/xinput_1.6.1.bb
deleted file mode 100644
index 5befcc8..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-app/xinput_1.6.1.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "Runtime configuration and test of XInput devices"
-
-DESCRIPTION = "Xinput is an utility for configuring and testing XInput devices"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=881525f89f99cad39c9832bcb72e6fa5"
-
-DEPENDS += " libxi libxrandr libxinerama"
-
-
-SRC_URI[md5sum] = "305980ac78a6954e306a14d80a54c441"
-SRC_URI[sha256sum] = "b7632d0f228a8a6be93b09857ea413940fcf44091e60f4a0fe9f5fd82efd871f"
-
diff --git a/yocto-poky/meta/recipes-graphics/xorg-app/xinput_1.6.2.bb b/yocto-poky/meta/recipes-graphics/xorg-app/xinput_1.6.2.bb
new file mode 100644
index 0000000..25cd047
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-app/xinput_1.6.2.bb
@@ -0,0 +1,12 @@
+require xorg-app-common.inc
+
+SUMMARY = "Runtime configuration and test of XInput devices"
+
+DESCRIPTION = "Xinput is an utility for configuring and testing XInput devices"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=881525f89f99cad39c9832bcb72e6fa5"
+
+DEPENDS += " libxi libxrandr libxinerama"
+
+SRC_URI[md5sum] = "6a889412eff2e3c1c6bb19146f6fe84c"
+SRC_URI[sha256sum] = "3694d29b4180952fbf13c6d4e59541310cbb11eef5bf888ff3d8b7f4e3aee5c4"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-app/xkbcomp_1.3.0.bb b/yocto-poky/meta/recipes-graphics/xorg-app/xkbcomp_1.3.0.bb
deleted file mode 100644
index efac069..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-app/xkbcomp_1.3.0.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require xorg-app-common.inc
-
-SUMMARY = "A program to compile XKB keyboard description"
-
-DESCRIPTION = "The xkbcomp keymap compiler converts a description of an \
-XKB keymap into one of several output formats. The most common use for \
-xkbcomp is to create a compiled keymap file (.xkm extension) which can \
-be read directly by XKB-capable X servers or utilities."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=08436e4f4476964e2e2dd7e7e41e076a"
-
-PR = "${INC_PR}.0"
-
-DEPENDS += "libxkbfile"
-
-BBCLASSEXTEND = "native"
-
-SRC_URI[md5sum] = "0012a8e3092cddf7f87b250f96bb38c5"
-SRC_URI[sha256sum] = "cfac973778fabf5216121ad60b7af8ab74ce7513af0f9260cf8c5309e1622b2a"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-app/xkbcomp_1.3.1.bb b/yocto-poky/meta/recipes-graphics/xorg-app/xkbcomp_1.3.1.bb
new file mode 100644
index 0000000..1c98359
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-app/xkbcomp_1.3.1.bb
@@ -0,0 +1,19 @@
+require xorg-app-common.inc
+
+SUMMARY = "A program to compile XKB keyboard description"
+
+DESCRIPTION = "The xkbcomp keymap compiler converts a description of an \
+XKB keymap into one of several output formats. The most common use for \
+xkbcomp is to create a compiled keymap file (.xkm extension) which can \
+be read directly by XKB-capable X servers or utilities."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=08436e4f4476964e2e2dd7e7e41e076a"
+
+PR = "${INC_PR}.0"
+
+DEPENDS += "libxkbfile"
+
+BBCLASSEXTEND = "native"
+
+SRC_URI[md5sum] = "a4d8353daf6cb0a9c47379b7413c42c6"
+SRC_URI[sha256sum] = "0304dc9e0d4ac10831a9ef5d5419722375ddbc3eac3ff4413094d57bc1f1923d"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb
new file mode 100644
index 0000000..cf77ad2
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.10.1.bb
@@ -0,0 +1,20 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- event devices (evdev) input driver"
+
+DESCRIPTION = "evdev is an Xorg input driver for Linux's generic event \
+devices. It therefore supports all input devices that the kernel knows \
+about, including most mice and keyboards. \
+\
+The evdev driver can serve as both a pointer and a keyboard input \
+device, and may be used as both the core keyboard and the core pointer. \
+Multiple input devices are supported by multiple instances of this \
+driver, with one Load directive for evdev in the Module section of your \
+xorg.conf for each input device that will use this driver. "
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=fefe33b1cf0cacba0e72e3b0fa0f0e16"
+
+DEPENDS += "mtdev libevdev"
+
+SRC_URI[md5sum] = "96d89d9406a02f5e36bdaa4edd9a243a"
+SRC_URI[sha256sum] = "af9c2b47f5b272ae56b45da6bd84610fc9a3d80a4b32c8215842a39d862de017"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.9.2.bb b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.9.2.bb
deleted file mode 100644
index 66428df..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-evdev_2.9.2.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- event devices (evdev) input driver"
-
-DESCRIPTION = "evdev is an Xorg input driver for Linux's generic event \
-devices. It therefore supports all input devices that the kernel knows \
-about, including most mice and keyboards. \
-\
-The evdev driver can serve as both a pointer and a keyboard input \
-device, and may be used as both the core keyboard and the core pointer. \
-Multiple input devices are supported by multiple instances of this \
-driver, with one Load directive for evdev in the Module section of your \
-xorg.conf for each input device that will use this driver. "
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=fefe33b1cf0cacba0e72e3b0fa0f0e16"
-
-DEPENDS += "mtdev libevdev"
-
-SRC_URI[md5sum] = "99eebf171e6c7bffc42d4fc430d47454"
-SRC_URI[sha256sum] = "792329b531afc6928ccda94e4b51a5520d4ddf8ef9a00890a5d0d31898acefec"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb
new file mode 100644
index 0000000..0252baf
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-libinput_0.16.0.bb
@@ -0,0 +1,11 @@
+require xorg-driver-input.inc
+
+SUMMARY = "Generic input driver for the X.Org server based on libinput"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5e6b20ea2ef94a998145f0ea3f788ee0"
+
+DEPENDS += "libinput"
+
+SRC_URI[md5sum] = "2c8cb520f88da7bafaceebc0b34ea1d4"
+SRC_URI[sha256sum] = "fdade531e91e79acf6dce8ac55fa4f65abe3f1358c5d3d777ae48dbc74b76f49"
+
+FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.2.bb b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.2.bb
deleted file mode 100644
index 19c122f..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.2.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require xorg-driver-input.inc
-
-SUMMARY = "X.Org X server -- synaptics touchpad input driver"
-
-DESCRIPTION = "synaptics is an Xorg input driver for the touchpads from \
-Synaptics Incorporated. Even though these touchpads (by default, \
-operating in a compatibility mode emulating a standard mouse) can be \
-handled by the normal evdev or mouse drivers, this driver allows more \
-advanced features of the touchpad to become available."
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398"
-
-SRC_URI[md5sum] = "8ed68e8cc674dd61adb280704764aafb"
-SRC_URI[sha256sum] = "7b0e164ebd02a680e0c695955e783059f37edb0c2656398e0a972adc8e698c80"
-
-DEPENDS += "libxi mtdev libxtst libevdev"
-
-FILES_${PN} += "${datadir}/X11/xorg.conf.d"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb
new file mode 100644
index 0000000..b47c82c
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-input-synaptics_1.8.3.bb
@@ -0,0 +1,16 @@
+require xorg-driver-input.inc
+
+SUMMARY = "X.Org X server -- synaptics touchpad input driver"
+
+DESCRIPTION = "synaptics is an Xorg input driver for the touchpads from \
+Synaptics Incorporated. Even though these touchpads (by default, \
+operating in a compatibility mode emulating a standard mouse) can be \
+handled by the normal evdev or mouse drivers, this driver allows more \
+advanced features of the touchpad to become available."
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=55aacd3535a741824955c5eb8f061398"
+
+SRC_URI[md5sum] = "4e3c8bed1ab4a67db2160c2c3d7e2a34"
+SRC_URI[sha256sum] = "d39f100c74f3673778b53f17bab7690161925e25dd998a15dd8cc69b52e83f01"
+
+DEPENDS += "libxi mtdev libxtst libevdev"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch
new file mode 100644
index 0000000..3576219
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-gen8-Fix-the-YUV-RGB-shader.patch
@@ -0,0 +1,65 @@
+From c43617b739e358064396912c7a7a8028ca91d201 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
+Date: Thu, 16 Apr 2015 20:40:39 +0300
+Subject: [PATCH] gen8: Fix the YUV->RGB shader
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Use the correct register (Yn_01) with first half of the
+Y samples instead of using the register (Yn_23) with the
+second half twice when computing the green channel.
+
+Also use the Yn_01 register name instead of Yn for the red
+channel as well, just for a bit of extra consistency.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89807
+Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
+
+Upstream-Status: Backport
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+
+---
+ src/render_program/exa_wm_yuv_rgb.g8a | 4 ++--
+ src/render_program/exa_wm_yuv_rgb.g8b | 2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/render_program/exa_wm_yuv_rgb.g8a b/src/render_program/exa_wm_yuv_rgb.g8a
+index 7def093..34973ba 100644
+--- a/src/render_program/exa_wm_yuv_rgb.g8a
++++ b/src/render_program/exa_wm_yuv_rgb.g8a
+@@ -76,7 +76,7 @@ add (16)    Cbn<1>F		Cb<8,8,1>F	-0.501961F  { compr align1 };
+     /* 
+      * R = Y + Cr * 1.596
+      */
+-mov (8)    acc0<1>F		Yn<8,8,1>F		    { compr align1 };
++mov (8)    acc0<1>F		Yn_01<8,8,1>F		    { compr align1 };
+ mac.sat(8) src_sample_r_01<1>F	Crn_01<8,8,1>F	1.596F	    { compr align1 };
+      
+ mov (8)    acc0<1>F		Yn_23<8,8,1>F		    { compr align1 };
+@@ -84,7 +84,7 @@ mac.sat(8) src_sample_r_23<1>F	Crn_23<8,8,1>F	1.596F	    { compr align1 };
+     /*
+      * G = Crn * -0.813 + Cbn * -0.392 + Y
+      */
+-mov (8)    acc0<1>F		Yn_23<8,8,1>F		    { compr align1 };
++mov (8)    acc0<1>F		Yn_01<8,8,1>F		    { compr align1 };
+ mac (8)    acc0<1>F		Crn_01<8,8,1>F    	-0.813F	    { compr align1 };
+ mac.sat(8) src_sample_g_01<1>F	Cbn_01<8,8,1>F    	-0.392F	    { compr align1 };
+ 
+diff --git a/src/render_program/exa_wm_yuv_rgb.g8b b/src/render_program/exa_wm_yuv_rgb.g8b
+index 4494953..2cd6fc4 100644
+--- a/src/render_program/exa_wm_yuv_rgb.g8b
++++ b/src/render_program/exa_wm_yuv_rgb.g8b
+@@ -6,7 +6,7 @@
+    { 0x80600048, 0x21c03ae8, 0x3e8d02c0, 0x3fcc49ba },
+    { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
+    { 0x80600048, 0x21e03ae8, 0x3e8d02e0, 0x3fcc49ba },
+-   { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
++   { 0x00600001, 0x24003ae0, 0x008d0300, 0x00000000 },
+    { 0x00600048, 0x24003ae0, 0x3e8d02c0, 0xbf5020c5 },
+    { 0x80600048, 0x22003ae8, 0x3e8d0340, 0xbec8b439 },
+    { 0x00600001, 0x24003ae0, 0x008d0320, 0x00000000 },
+-- 
+2.5.0
+
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
new file mode 100644
index 0000000..29924bb
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel/0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch
@@ -0,0 +1,30 @@
+From 2c5063938cc809f624e56efd4673041fa8141e81 Mon Sep 17 00:00:00 2001
+From: Martin Peres <martin.peres@linux.intel.com>
+Date: Thu, 9 Jul 2015 11:26:38 +0300
+Subject: [PATCH] uxa: fix the call to PixmapSyncDirtyHelper, broken by
+ xserver's 90db5ed
+
+[ickle: switch to HAS_DIRTYTRACKING_ROTATION as suggested by Dave Airlie]
+Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
+
+Upstream-Status: Backport
+Signed-off-by: Saul Wold <sgw@linux.intel.com>
+---
+ src/compat-api.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/compat-api.h b/src/compat-api.h
+index aa93bee..293e9d7 100644
+--- a/src/compat-api.h
++++ b/src/compat-api.h
+@@ -247,3 +247,7 @@ static inline void FreePixmap(PixmapPtr pixmap)
+ #endif
+ 
+ #endif
++
++#if HAS_DIRTYTRACKING_ROTATION
++#define PixmapSyncDirtyHelper(d, dd) PixmapSyncDirtyHelper(d)
++#endif
+-- 
+2.5.0
+
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
index a2f1456..d75b44f 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-intel_2.99.917.bb
@@ -13,6 +13,8 @@
             file://always_include_xorg_server.h.patch \
             file://sna-Protect-against-ABI-breakage-in-recent-versions-.patch \
             file://udev-fstat.patch \
+            file://0001-uxa-fix-the-call-to-PixmapSyncDirtyHelper-broken-by-.patch \
+            file://0001-gen8-Fix-the-YUV-RGB-shader.patch \
            "
 
 SRC_URI[md5sum] = "fa196a66e52c0c624fe5d350af7a5e7b"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap/0001-drmmode_output_dpms-Replace-logical-with-bitwise-ope.patch b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap/0001-drmmode_output_dpms-Replace-logical-with-bitwise-ope.patch
deleted file mode 100644
index 41e77d3..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap/0001-drmmode_output_dpms-Replace-logical-with-bitwise-ope.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From fc653ca3b36435aea281ae409fb90f85e1bc0d81 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 7 Sep 2015 08:44:13 +0000
-Subject: [freedreno][PATCH] drmmode_output_dpms: Replace logical && with bitwise &
- operation
-
-This is a mask calculation so bitbwise & should have been used
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- src/drmmode_display.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/drmmode_display.c b/src/drmmode_display.c
-index c3cf4f8..eb54b59 100644
---- a/src/drmmode_display.c
-+++ b/src/drmmode_display.c
-@@ -777,7 +777,7 @@ drmmode_output_dpms(xf86OutputPtr output, int mode)
- 
- 	for (i = 0; i < koutput->count_props; i++) {
- 		props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
--		if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
-+		if (props && (props->flags & DRM_MODE_PROP_ENUM)) {
- 			if (!strcmp(props->name, "DPMS")) {
- 				mode_id = koutput->props[i];
- 				drmModeFreeProperty(props);
--- 
-2.5.1
-
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.3.bb b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.3.bb
deleted file mode 100644
index 76682ed..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.3.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-require xorg-driver-video.inc
-
-SUMMARY = "X.Org X server -- Texas Instruments OMAP framebuffer driver"
-
-SUMMARY = "X.Org X server -- TI OMAP integrated graphics chipsets driver"
-
-DESCRIPTION = "Open-source X.org graphics driver for TI OMAP graphics \
-Currently relies on a closed-source submodule for EXA acceleration on \
-the following chipsets: \
-  + OMAP3430 \
-  + OMAP3630 \
-  + OMAP4430 \
-  + OMAP4460 \
-  + OMAP5430 \
-  + OMAP5432 \
-\
-NOTE: this driver is work in progress..  you probably don't want to try \
-and use it yet.  The API/ABI between driver and kernel, and driver and \
-acceleration submodules is not stable yet.  This driver requires the \
-omapdrm kernel driver w/ GEM support. \
-"
-
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=10ce5de3b111315ea652a5f74ec0c602"
-DEPENDS += "virtual/libx11 libdrm xf86driproto"
-
-SRC_URI += "file://0001-drmmode_output_dpms-Replace-logical-with-bitwise-ope.patch"
-
-SRC_URI[md5sum] = "be35daf6fa4b75092cc4a8978c437bc5"
-SRC_URI[sha256sum] = "db1e0e69fd4c4c8fdca5ef2cb0447bccd7518a718495876a6904bef57b39986d"
-
-CFLAGS += " -I${STAGING_INCDIR}/xorg "
-
-# Use overlay 2 on omap3 to enable other apps to use overlay 1 (e.g. dmai or omapfbplay)
-do_compile_prepend_armv7a () {
-        sed -i -e s:fb1:fb2:g ${S}/src/omap_xv.c
-}
-
-python () {
-    if not bb.utils.contains ('DISTRO_FEATURES', 'opengl', True, False, d):
-        raise bb.parse.SkipPackage("'opengl' not in DISTRO_FEATURES")
-}
-
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb
new file mode 100644
index 0000000..7895449
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.4.bb
@@ -0,0 +1,41 @@
+require xorg-driver-video.inc
+
+SUMMARY = "X.Org X server -- Texas Instruments OMAP framebuffer driver"
+
+SUMMARY = "X.Org X server -- TI OMAP integrated graphics chipsets driver"
+
+DESCRIPTION = "Open-source X.org graphics driver for TI OMAP graphics \
+Currently relies on a closed-source submodule for EXA acceleration on \
+the following chipsets: \
+  + OMAP3430 \
+  + OMAP3630 \
+  + OMAP4430 \
+  + OMAP4460 \
+  + OMAP5430 \
+  + OMAP5432 \
+\
+NOTE: this driver is work in progress..  you probably don't want to try \
+and use it yet.  The API/ABI between driver and kernel, and driver and \
+acceleration submodules is not stable yet.  This driver requires the \
+omapdrm kernel driver w/ GEM support. \
+"
+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=10ce5de3b111315ea652a5f74ec0c602"
+DEPENDS += "virtual/libx11 libdrm xf86driproto"
+
+SRC_URI[md5sum] = "a364e151a537948f75bb8c9b840a31da"
+SRC_URI[sha256sum] = "a7192690b8638f5c8d611a1bae07cc13081e22edd4070f37a2f5c3f8d79e7ebc"
+
+CFLAGS += " -I${STAGING_INCDIR}/xorg "
+
+# Use overlay 2 on omap3 to enable other apps to use overlay 1 (e.g. dmai or omapfbplay)
+do_compile_prepend_armv7a () {
+        sed -i -e s:fb1:fb2:g ${S}/src/omap_xv.c
+}
+
+python () {
+    if not bb.utils.contains ('DISTRO_FEATURES', 'opengl', True, False, d):
+        raise bb.parse.SkipPackage("'opengl' not in DISTRO_FEATURES")
+}
+
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
index 0eeb870..7ebb960 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-omapfb_git.bb
@@ -13,6 +13,9 @@
 PR = "${INC_PR}.7"
 PV = "0.1.1+gitr${SRCPV}"
 
+# Blacklist debian-specific tags in upstream version check
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)(?!-)"
+
 SRC_URI = "git://anonscm.debian.org/collab-maint/xf86-video-omapfb.git \
   file://0001-Prevents-omapfb-from-from-crashing-when-pixelclock-o.patch \
   file://0001-Revert-Set-a-large-CRTC-upper-limit-to-not-prune-lar.patch \
@@ -26,7 +29,6 @@
 
 S = "${WORKDIR}/git"
 
-EXTRA_OECONF_armv7a = " --enable-neon "
 CFLAGS += " -I${STAGING_INCDIR}/xorg "
 
 # Use overlay 2 on omap3 to enable other apps to use overlay 1 (e.g. dmai or omapfbplay)
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb
index 89b98ee..8c891e6 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xf86-video-vmware_13.1.0.bb
@@ -15,4 +15,5 @@
 
 COMPATIBLE_HOST = '(i.86.*-linux|x86_64.*-linux)'
 
-EXTRA_OECONF += "--disable-vmwgfx"
+PACKAGECONFIG ?= ""
+PACKAGECONFIG[vmwgfx] = "--enable-vmwgfx, --disable-vmwgfx, libdrm virtual/mesa"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc b/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
index 7ddd1c7..57a4c82 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-common.inc
@@ -12,7 +12,6 @@
 SRC_URI = "${XORG_MIRROR}/individual/driver/${BPN}-${PV}.tar.bz2"
 
 FILES_${PN} += " ${libdir}/xorg/modules/drivers/*.so"
-FILES_${PN}-dbg += " ${libdir}/xorg/modules/drivers/.debug"
 
 inherit autotools pkgconfig distro_features_check
 # depends on virtual/xserver
diff --git a/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc b/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
index fbec064..c4dba1b 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
+++ b/yocto-poky/meta/recipes-graphics/xorg-driver/xorg-driver-input.inc
@@ -7,5 +7,6 @@
 }
 PACKAGEFUNCS =+ "add_xorg_abi_depends"
 
-FILES_${PN} += " ${libdir}/xorg/modules/input/*.so"
-FILES_${PN}-dbg += " ${libdir}/xorg/modules/input/.debug"
+FILES_${PN} += " ${libdir}/xorg/modules/input/*.so \
+                 ${datadir}/X11/xorg.conf.d \
+                 "
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb.inc b/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb.inc
deleted file mode 100644
index e40ae77..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb.inc
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "XCB: The X protocol C binding library"
-DESCRIPTION = "The X protocol C-language Binding (XCB) is a replacement \
-for Xlib featuring a small footprint, latency hiding, direct access to \
-the protocol, improved threading support, and extensibility."
-HOMEPAGE = "http://xcb.freedesktop.org"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SECTION = "x11/libs"
-LICENSE = "MIT-X"
-
-DEPENDS = "xcb-proto xproto libxau xcb-proto-native libpthread-stubs"
-
-SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \
-           file://xcbincludedir.patch \
-           file://disable-check.patch \
-           file://gcc-mips-pr68302-mips-workaround.patch \
-          "
-
-PACKAGES_DYNAMIC = "^libxcb-.*"
-
-FILES_${PN} = "${libdir}/libxcb.so.*"
-
-inherit autotools pkgconfig pythonnative distro_features_check
-
-# The libxau and others requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-python populate_packages_prepend () {
-    do_split_packages(d, '${libdir}', '^libxcb-(.*)\.so\..*$', 'libxcb-%s', 'XCB library module for %s', allow_links=True)
-}
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.11.1.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.11.1.bb
new file mode 100644
index 0000000..0856c19
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.11.1.bb
@@ -0,0 +1,36 @@
+SUMMARY = "XCB: The X protocol C binding library"
+DESCRIPTION = "The X protocol C-language Binding (XCB) is a replacement \
+for Xlib featuring a small footprint, latency hiding, direct access to \
+the protocol, improved threading support, and extensibility."
+HOMEPAGE = "http://xcb.freedesktop.org"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=XCB"
+SECTION = "x11/libs"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7"
+
+SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \
+           file://xcbincludedir.patch \
+           file://disable-check.patch \
+           file://gcc-mips-pr68302-mips-workaround.patch \
+          "
+SRC_URI[md5sum] = "f97a65e6158775de518ac391935634c2"
+SRC_URI[sha256sum] = "b720fd6c7d200e5371affdb3f049cc8f88cff9aed942ff1b824d95eedbf69d30"
+
+BBCLASSEXTEND = "native nativesdk"
+
+DEPENDS = "xcb-proto xproto libxau libpthread-stubs libxdmcp"
+
+PACKAGES_DYNAMIC = "^libxcb-.*"
+
+FILES_${PN} = "${libdir}/libxcb.so.*"
+
+inherit autotools pkgconfig distro_features_check
+
+# The libxau and others requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+REQUIRED_DISTRO_FEATURES_class-native = ""
+
+python populate_packages_prepend () {
+    do_split_packages(d, '${libdir}', '^libxcb-(.*)\.so\..*$', 'libxcb-%s', 'XCB library module for %s', allow_links=True)
+}
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb
deleted file mode 100644
index c162702..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_1.11.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-include libxcb.inc
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d763b081cb10c223435b01e00dc0aba7"
-
-
-DEPENDS += "libxdmcp"
-
-SRC_URI[md5sum] = "5a873ebd383d1a60612dd6ec6b42c781"
-SRC_URI[sha256sum] = "03635d70045b9ede90778e67516135828a57de87ac508f987024f43c03620ff7"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_git.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_git.bb
deleted file mode 100644
index 186636e..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-lib/libxcb_git.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-DEFAULT_PREFERENCE = "-1"
-
-include libxcb.inc
-
-SRCREV = "625ed596cae6dd8175aeb6cb6f26784928042f22"
-PV = "1.1.90.1+gitr${SRCPV}"
-PR = "r1"
-
-SRC_URI = "git://anongit.freedesktop.org/git/xcb/libxcb"
-S = "${WORKDIR}/git"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.4.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.4.bb
deleted file mode 100644
index 07033a3..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.4.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require xorg-lib-common.inc
-
-SUMMARY = "XI: X Input extension library"
-
-DESCRIPTION = "libxi is an extension to the X11 protocol to support \
-input devices other than the core X keyboard and pointer.  It allows \
-client programs to select input from these devices independently from \
-each other and independently from the core devices."
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=17b064789fab936a1c58c4e13d965b0f \
-                    file://src/XIGetDevFocus.c;endline=23;md5=cdfb0d435a33ec57ea0d1e8e395b729f"
-
-DEPENDS += "libxext inputproto libxfixes"
-
-PE = "1"
-
-XORG_PN = "libXi"
-
-SRC_URI[md5sum] = "9c4a69c34b19ec1e4212e849549544cb"
-SRC_URI[sha256sum] = "2cffc2686618dc1803725636cd92b36342c512dc60a7a35cba34bf7192a42244"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.6.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.6.bb
new file mode 100644
index 0000000..7523479
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-lib/libxi_1.7.6.bb
@@ -0,0 +1,21 @@
+require xorg-lib-common.inc
+
+SUMMARY = "XI: X Input extension library"
+
+DESCRIPTION = "libxi is an extension to the X11 protocol to support \
+input devices other than the core X keyboard and pointer.  It allows \
+client programs to select input from these devices independently from \
+each other and independently from the core devices."
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=17b064789fab936a1c58c4e13d965b0f \
+                    file://src/XIGetDevFocus.c;endline=23;md5=cdfb0d435a33ec57ea0d1e8e395b729f"
+
+DEPENDS += "libxext inputproto libxfixes"
+
+PE = "1"
+
+XORG_PN = "libXi"
+
+SRC_URI[md5sum] = "510e555ecfffa8d2298a0f42b725e563"
+SRC_URI[sha256sum] = "1f32a552cec0f056c0260bdb32e853cec0673d2f40646ce932ad5a9f0205b7ac"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb
index a166b57..de22a81 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb
+++ b/yocto-poky/meta/recipes-graphics/xorg-lib/libxkbcommon_0.5.0.bb
@@ -12,6 +12,8 @@
 SRC_URI[md5sum] = "2e1faeafcc609c30af3a561a91e84158"
 SRC_URI[sha256sum] = "90bd7824742b9a6f52a6cf80e2cadd6f5349cf600a358d08260772615b89d19c"
 
+UPSTREAM_CHECK_URI = "http://xkbcommon.org/"
+
 inherit autotools pkgconfig
 
 EXTRA_OECONF = "--disable-docs"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch b/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch
index a60df5f..6b7c1e6 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch
+++ b/yocto-poky/meta/recipes-graphics/xorg-lib/pixman/0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch
@@ -11,7 +11,7 @@
 
 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Signed-off-by: Marek Vasut <marex@denx.de>
-Upstream-Status: Submitted
+Upstream-Status: Backport [commit 4297e9058]
 ---
 Changes v1 -> v2:
 
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb
deleted file mode 100644
index 317a568..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.32.6.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Pixman: Pixel Manipulation library"
-
-DESCRIPTION = "Pixman provides a library for manipulating pixel regions \
--- a set of Y-X banded rectangles, image compositing using the \
-Porter/Duff model and implicit mask generation for geometric primitives \
-including trapezoids, triangles, and rectangles."
-
-require xorg-lib-common.inc
-
-LICENSE = "MIT & MIT-style & PD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=14096c769ae0cbb5fcb94ec468be11b3 \
-                    file://pixman/pixman-matrix.c;endline=25;md5=ba6e8769bfaaee2c41698755af04c4be \
-                    file://pixman/pixman-arm-neon-asm.h;endline=24;md5=9a9cc1e51abbf1da58f4d9528ec9d49b \
-                   "
-DEPENDS += "zlib libpng"
-BBCLASSEXTEND = "native nativesdk"
-
-PE = "1"
-
-IWMMXT = "--disable-arm-iwmmxt"
-LOONGSON_MMI = "--disable-loongson-mmi"
-NEON = " --disable-arm-neon "
-NEON_class-nativesdk = " --disable-arm-neon "
-NEON_armv7a = " "
-NEON_armv7a-vfp-neon = " "
-
-EXTRA_OECONF = "--disable-gtk ${IWMMXT} ${LOONGSON_MMI} ${NEON}"
-EXTRA_OECONF_class-native = "--disable-gtk"
-
-SRC_URI += "\
-            file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
-            file://mips-export-revert.patch \
-	    file://asm_include.patch \
-	    file://0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch \
-"
-
-SRC_URI[md5sum] = "8a9e8f14743a39cf303803f369c1f344"
-SRC_URI[sha256sum] = "201fc0d7d6bc0017496f2bd27b3ca14224aea0df6b624c5ee2dc0307a4ff14a4"
-
-REQUIRED_DISTRO_FEATURES = ""
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.32.8.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.32.8.bb
new file mode 100644
index 0000000..553ce36
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-lib/pixman_0.32.8.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Pixman: Pixel Manipulation library"
+
+DESCRIPTION = "Pixman provides a library for manipulating pixel regions \
+-- a set of Y-X banded rectangles, image compositing using the \
+Porter/Duff model and implicit mask generation for geometric primitives \
+including trapezoids, triangles, and rectangles."
+
+require xorg-lib-common.inc
+
+# see http://cairographics.org/releases/ - only even minor versions are stable
+UPSTREAM_CHECK_REGEX = "pixman-(?P<pver>\d+\.(\d*[02468])+(\.\d+)+)"
+
+LICENSE = "MIT & MIT-style & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=14096c769ae0cbb5fcb94ec468be11b3 \
+                    file://pixman/pixman-matrix.c;endline=25;md5=ba6e8769bfaaee2c41698755af04c4be \
+                    file://pixman/pixman-arm-neon-asm.h;endline=24;md5=9a9cc1e51abbf1da58f4d9528ec9d49b \
+                   "
+DEPENDS += "zlib libpng"
+BBCLASSEXTEND = "native nativesdk"
+
+PE = "1"
+
+IWMMXT = "--disable-arm-iwmmxt"
+LOONGSON_MMI = "--disable-loongson-mmi"
+# If target supports neon then disable the 'simd' (ie VFPv2) fallback, otherwise disable neon.
+NEON = "${@bb.utils.contains("TUNE_FEATURES", "neon", "--disable-arm-simd", "--disable-arm-neon" ,d)}"
+
+EXTRA_OECONF = "--disable-gtk ${IWMMXT} ${LOONGSON_MMI} ${NEON}"
+EXTRA_OECONF_class-native = "--disable-gtk"
+EXTRA_OECONF_class-nativesdk = "--disable-gtk"
+
+SRC_URI += "\
+            file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
+            file://mips-export-revert.patch \
+	    file://asm_include.patch \
+	    file://0001-v3-test-add-a-check-for-FE_DIVBYZERO.patch \
+"
+
+SRC_URI[md5sum] = "18d6b62abdb7bc0f8e6b0ddf48986b2c"
+SRC_URI[sha256sum] = "5c63dbb3523fc4d86ed4186677815918a941b7cb390d5eec4f55cb5d66b59fb1"
+
+REQUIRED_DISTRO_FEATURES = ""
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/xcb-util-image/clang.patch b/yocto-poky/meta/recipes-graphics/xorg-lib/xcb-util-image/clang.patch
new file mode 100644
index 0000000..11e9094
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-lib/xcb-util-image/clang.patch
@@ -0,0 +1,24 @@
+Make clang happy since it squashes the control warning, ideally it will never reach that return value due to assert
+but there is a chance when NDEBUG is defined
+
+| In file included from ../../xcb-util-image-0.4.0/image/xcb_image.c:37:
+| ../../xcb-util-image-0.4.0/image/xcb_bitops.h:210:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
+| }
+| ^
+| 1 error generated.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: xcb-util-image-0.4.0/image/xcb_bitops.h
+===================================================================
+--- xcb-util-image-0.4.0.orig/image/xcb_bitops.h
++++ xcb-util-image-0.4.0/image/xcb_bitops.h
+@@ -207,6 +207,7 @@ xcb_host_byte_order(void) {
+       return XCB_IMAGE_ORDER_LSB_FIRST;
+   }
+   assert(0);
++  return -1;
+ }
+ 
+ #endif /* __XCB_BITOPS_H__ */
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb
index 91464b6..c6bb5a6 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb
+++ b/yocto-poky/meta/recipes-graphics/xorg-lib/xcb-util-image_0.4.0.bb
@@ -6,5 +6,8 @@
 LIC_FILES_CHKSUM = "file://image/xcb_image.c;endline=24;md5=eafdf965cfb89955fdedf75054223fb4 \
                     file://image/xcb_image.h;beginline=4;endline=27;md5=48cd25ae55e7de525fe1e1a3a7672e1c"
 
+SRC_URI += "file://clang.patch \
+"
+
 SRC_URI[md5sum] = "08fe8ffecc8d4e37c0ade7906b3f4c87"
-SRC_URI[sha256sum] = "2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc"
\ No newline at end of file
+SRC_URI[sha256sum] = "2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.15.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.15.bb
deleted file mode 100644
index f416990..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.15.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "Keyboard configuration database for X Window"
-
-DESCRIPTION = "The non-arch keyboard configuration database for X \
-Window.  The goal is to provide the consistent, well-structured, \
-frequently released open source of X keyboard configuration data for X \
-Window System implementations.  The project is targeted to XKB-based \
-systems."
-
-HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig"
-BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config"
-
-LICENSE = "MIT & MIT-style"
-LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
-
-SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
-SRC_URI[md5sum] = "4af1deeb7c5f4cad62e65957d98d6758"
-SRC_URI[sha256sum] = "0e443cf7ca2f0b40846472c029647a05933fc705d611e1478c4db8a48a6f38bf"
-
-SECTION = "x11/libs"
-DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
-
-EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
-
-FILES_${PN} += "${datadir}/X11/xkb"
-
-inherit autotools pkgconfig gettext
-
-do_install_append () {
-    install -d ${D}${datadir}/X11/xkb/compiled
-    cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
-}
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.16.bb b/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.16.bb
new file mode 100644
index 0000000..16a1f4f
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-lib/xkeyboard-config_2.16.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Keyboard configuration database for X Window"
+
+DESCRIPTION = "The non-arch keyboard configuration database for X \
+Window.  The goal is to provide the consistent, well-structured, \
+frequently released open source of X keyboard configuration data for X \
+Window System implementations.  The project is targeted to XKB-based \
+systems."
+
+HOMEPAGE = "http://freedesktop.org/wiki/Software/XKeyboardConfig"
+BUGTRACKER = "https://bugs.freedesktop.org/enter_bug.cgi?product=xkeyboard-config"
+
+LICENSE = "MIT & MIT-style"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0e7f21ca7db975c63467d2e7624a12f9"
+
+SRC_URI = "${XORG_MIRROR}/individual/data/xkeyboard-config/${BPN}-${PV}.tar.bz2"
+SRC_URI[md5sum] = "bf6aa31195584cfce01b2194c3e5ea26"
+SRC_URI[sha256sum] = "1e8a1f212c96b7f71ca0b05da361cac1816d27baae1d8e03e7b53049b58d1d58"
+
+SECTION = "x11/libs"
+DEPENDS = "intltool-native virtual/gettext util-macros libxslt-native"
+
+EXTRA_OECONF = "--with-xkb-rules-symlink=xorg --disable-runtime-deps"
+
+FILES_${PN} += "${datadir}/X11/xkb"
+
+inherit autotools pkgconfig gettext
+
+do_install_append () {
+    install -d ${D}${datadir}/X11/xkb/compiled
+    cd ${D}${datadir}/X11/xkb/rules && ln -sf base xorg
+}
diff --git a/yocto-poky/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc b/yocto-poky/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
index 09df010..6f4e444 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
+++ b/yocto-poky/meta/recipes-graphics/xorg-lib/xorg-lib-common.inc
@@ -24,3 +24,4 @@
 "
 
 REQUIRED_DISTRO_FEATURES ?= "x11"
+REQUIRED_DISTRO_FEATURES_class-native = ""
diff --git a/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto.inc b/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto.inc
index 2e1b57b..8703d63 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto.inc
+++ b/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto.inc
@@ -9,17 +9,18 @@
 SECTION = "x11/libs"
 LICENSE = "MIT-X"
 
-SRC_URI = "http://xcb.freedesktop.org/dist/xcb-proto-${PV}.tar.bz2"
+SRC_URI = "http://xcb.freedesktop.org/dist/xcb-proto-${PV}.tar.bz2 \
+           file://no-python-native.patch"
 
-inherit autotools pkgconfig pythonnative
+inherit autotools pkgconfig
 
 PACKAGES += "python-xcbgen"
 
+FILES_${PN} = ""
 FILES_${PN}-dev += "${datadir}/xcb/*.xml ${datadir}/xcb/*.xsd"
-FILES_python-xcbgen = "${libdir}/python*"
+FILES_python-xcbgen = "${libdir}/xcb-proto"
 
 RDEPENDS_${PN}-dev = ""
 RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
 
-DEPENDS_append_class-native = " python-native"
 BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch b/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
new file mode 100644
index 0000000..f808e19
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-proto/xcb-proto/no-python-native.patch
@@ -0,0 +1,27 @@
+Upstream uses AM_PATH_PYTHON to find a python binary and ask it where to install
+libraries.  This means we either need to depend on python-native (large build
+dependency, early in the build) or use the host python (pythondir reflects the
+host and not the target, breaks builds).
+
+The third option is to just hardcode the path where the module goes, as most
+callers of the code use pkg-config to find where it was installed anyway.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index d140bfe..c7b68da 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -14,7 +14,10 @@ if test "$XMLLINT" = "no"; then
+    AC_MSG_WARN([xmllint not found; unable to validate against schema.])
+ fi
+
+-AM_PATH_PYTHON([2.5])
++pythondir="${libdir}/xcb-proto"
++AC_SUBST(pythondir)
++PYTHON="python"
++AC_SUBST(PYTHON)
+
+ xcbincludedir='${datadir}/xcb'
+ AC_SUBST(xcbincludedir)
diff --git a/yocto-poky/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb b/yocto-poky/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb
index ccf2f4b..be3a667 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb
+++ b/yocto-poky/meta/recipes-graphics/xorg-util/gccmakedep_1.0.3.bb
@@ -14,4 +14,8 @@
 PE = "1"
 
 SRC_URI[md5sum] = "127ddb6131eb4a56fdf6644a63ade788"
-SRC_URI[sha256sum] = "f9e2e7a590e27f84b6708ab7a81e546399b949bf652fb9b95193e0e543e6a548"
\ No newline at end of file
+SRC_URI[sha256sum] = "f9e2e7a590e27f84b6708ab7a81e546399b949bf652fb9b95193e0e543e6a548"
+
+do_install_append() {
+	sed -i "s,--sysroot=${STAGING_DIR_TARGET},," ${D}${bindir}/gccmakedep
+}
diff --git a/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
index 9881c94..f4c5469 100644
--- a/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
+++ b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
@@ -27,7 +27,7 @@
 REQUIRED_DISTRO_FEATURES = "x11"
 
 PROTO_DEPS = "randrproto renderproto fixesproto damageproto xextproto xproto xf86dgaproto xf86miscproto xf86vidmodeproto compositeproto recordproto resourceproto videoproto scrnsaverproto  xineramaproto fontsproto kbproto inputproto bigreqsproto xcmiscproto presentproto"
-LIB_DEPS = "pixman libxfont xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess openssl libgcrypt"
+LIB_DEPS = "pixman libxfont xtrans libxau libxext libxdmcp libdrm libxkbfile libpciaccess"
 DEPENDS = "${PROTO_DEPS} ${LIB_DEPS} font-util"
 
 # Split out some modules and extensions from the main package
@@ -44,8 +44,7 @@
 #          libextmod.so
 #          libdbe.so
 
-PACKAGES =+ "${PN}-security-policy \
-             ${PN}-sdl \
+PACKAGES =+ "${PN}-sdl \
              ${PN}-fbdev \
              ${PN}-xvfb \
              ${PN}-utils \
@@ -72,18 +71,15 @@
 SUMMARY_xf86-video-modesetting = "X.Org X server -- modesetting display driver"
 INSANE_SKIP_xf86-video-modesetting = "xorg-driver-abi"
 
-RRECOMMENDS_${PN} += "${PN}-security-policy xkeyboard-config rgb xserver-xf86-config xkbcomp"
+XSERVER_RRECOMMENDS = "xkeyboard-config rgb xserver-xf86-config xkbcomp"
+RRECOMMENDS_${PN} += "${XSERVER_RRECOMMENDS}"
+RRECOMMENDS_${PN}-xwayland += "${XSERVER_RRECOMMENDS}"
 RDEPENDS_${PN}-xvfb += "xkeyboard-config"
 RDEPENDS_${PN}-module-exa = "${PN} (= ${EXTENDPKGV})"
 
 FILES_${PN} = "${bindir} ${libdir}/X11/Options ${libdir}/X11/Cards ${libdir}/X11/getconfig ${libdir}/X11/etc ${libdir}/modules/*.so ${libdir}/xorg/modules/*.so /etc/X11 ${libdir}/xorg/protocol.txt ${datadir}/X11/xorg.conf.d"
 FILES_${PN}-dev += "${libdir}/xorg/modules/*.la ${libdir}/xorg/modules/*/*.la"
 FILES_${PN}-doc += "${libdir}/X11/doc ${datadir}/X11/xkb/compiled/README.compiled ${localstatedir}/lib/xkb/README.compiled"
-FILES_${PN}-dbg += "${libdir}/xorg/modules/.debug \
-                    ${libdir}/xorg/modules/*/.debug \
-                    ${libdir}/xorg/modules/*/*/.debug \
-                    "
-FILES_${PN}-security-policy += "${libdir}/xserver/SecurityPolicy"
 FILES_${PN}-sdl = "${bindir}/Xsdl"
 FILES_${PN}-fbdev = "${bindir}/Xfbdev"
 FILES_${PN}-xvfb = "${bindir}/Xvfb"
@@ -121,11 +117,12 @@
                  --sysconfdir=/etc/X11 \
                  --localstatedir=/var \
                  --with-xkb-output=/var/lib/xkb \
-                 --with-sha1=libcrypto \
 "
 
-PACKAGECONFIG ??= "dri2 udev ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri glx', '', d)} \
+PACKAGECONFIG ??= "dri2 udev ${XORG_CRYPTO} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'dri glx', '', d)} \
                    ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "xwayland", "", d)} \
+                   ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd", "", d)} \
 "
 
 PACKAGECONFIG[udev] = "--enable-config-udev,--disable-config-udev,udev"
@@ -133,14 +130,21 @@
 PACKAGECONFIG[dri2] = "--enable-dri2,--disable-dri2,dri2proto"
 # DRI3 requires xshmfence to also be enabled
 PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto"
-PACKAGECONFIG[glx] = "--enable-glx --enable-glx-tls,--disable-glx,glproto virtual/libgl virtual/libx11"
+PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,glproto virtual/libgl virtual/libx11"
 PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
 PACKAGECONFIG[xshmfence] = "--enable-xshmfence,--disable-xshmfence,libxshmfence"
 PACKAGECONFIG[xmlto] = "--with-xmlto, --without-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
 PACKAGECONFIG[systemd-logind] = "--enable-systemd-logind=yes,--enable-systemd-logind=no,dbus,"
+PACKAGECONFIG[systemd] = "--with-systemd-daemon,--without-systemd-daemon,systemd"
 PACKAGECONFIG[xinerama] = "--enable-xinerama,--disable-xinerama,xineramaproto"
 PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,wayland libepoxy"
 
+# Xorg requires a SHA1 implementation, pick one
+XORG_CRYPTO ??= "openssl"
+PACKAGECONFIG[openssl] = "--with-sha1=libcrypto,,openssl"
+PACKAGECONFIG[nettle] = "--with-sha1=libnettle,,nettle"
+PACKAGECONFIG[gcrypt] = "--with-sha1=libgcrypt,,libgcrypt"
+
 do_install_append () {
 	# Its assumed base-files creates this for us
 	rmdir ${D}${localstatedir}/log/
diff --git a/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-use-__GLIBC__-guard-for-glibc-specific-code.patch b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-use-__GLIBC__-guard-for-glibc-specific-code.patch
deleted file mode 100644
index 21e4ed4..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-use-__GLIBC__-guard-for-glibc-specific-code.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From f242740f6488a25e6ca84968b0e2319a9a3975b4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 6 Apr 2015 20:52:50 -0700
-Subject: [PATCH] use __GLIBC__ guard for glibc specific code
-
-Using __linux__ is a tad bit wrong assumption since
-linux != glibc
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- hw/xfree86/os-support/xf86_OSlib.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/hw/xfree86/os-support/xf86_OSlib.h b/hw/xfree86/os-support/xf86_OSlib.h
-index eb0a338..c366ffc 100644
---- a/hw/xfree86/os-support/xf86_OSlib.h
-+++ b/hw/xfree86/os-support/xf86_OSlib.h
-@@ -178,7 +178,7 @@
- #include <sys/types.h>
- #include <assert.h>
- 
--#ifdef __linux__
-+#ifdef __GLIBC__
- #include <termio.h>
- #else                           /* __GLIBC__ */
- #include <termios.h>
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch
new file mode 100644
index 0000000..cd30999
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch
@@ -0,0 +1,50 @@
+From 0c2153d468229f56e6fef71d2f002e0cae14aa55 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Mon, 16 Nov 2015 16:18:40 +0200
+Subject: [PATCH] configure.ac: Use libsystemd in REQUIRED_LIBS check
+
+REQUIRED_LIBS needs to be set to the correct systemd library,
+otherwise the later check will either fail or use the wrong
+pc file.
+
+Upstream-Status: Submitted [xorg-devel@lists.x.org]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 96c0242..f63eca1 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -837,9 +837,16 @@ AC_ARG_WITH([systemd-daemon],
+ 		[support systemd socket activation (default: auto)]),
+ 	[WITH_SYSTEMD_DAEMON=$withval], [WITH_SYSTEMD_DAEMON=auto])
+ PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon],
+-                  [HAVE_SYSTEMD_DAEMON=yes],
++                  [REQUIRED_SYSTEMD_DAEMON=libsystemd-daemon],
+                   [PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd],
+-                                     [HAVE_SYSTEMD_DAEMON=yes], [HAVE_SYSTEMD_DAEMON=no])])
++                                     [REQUIRED_SYSTEMD_DAEMON=libsystemd],
++                                     [REQUIRED_SYSTEMD_DAEMON=])])
++if test "x$REQUIRED_SYSTEMD_DAEMON" = x; then
++        HAVE_SYSTEMD_DAEMON=no
++else
++        HAVE_SYSTEMD_DAEMON=yes
++fi
++
+ if test "x$WITH_SYSTEMD_DAEMON" = xauto; then
+ 	WITH_SYSTEMD_DAEMON="$HAVE_SYSTEMD_DAEMON"
+ fi
+@@ -848,7 +855,7 @@ if test "x$WITH_SYSTEMD_DAEMON" = xyes; then
+ 		AC_MSG_ERROR([systemd support requested but no library has been found])
+ 	fi
+ 	AC_DEFINE(HAVE_SYSTEMD_DAEMON, 1, [Define to 1 if libsystemd-daemon is available])
+-	REQUIRED_LIBS="$REQUIRED_LIBS libsystemd-daemon"
++	REQUIRED_LIBS="$REQUIRED_LIBS $REQUIRED_SYSTEMD_DAEMON"
+ fi
+ AM_CONDITIONAL([HAVE_SYSTEMD_DAEMON], [test "x$HAVE_SYSTEMD_DAEMON" = "xyes"])
+ 
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/modesetting_libdrm_requirements.patch b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/modesetting_libdrm_requirements.patch
new file mode 100644
index 0000000..5f186cb
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/modesetting_libdrm_requirements.patch
@@ -0,0 +1,30 @@
+From bf23db42a4e5943129501223a47b48884cdeb62f Mon Sep 17 00:00:00 2001
+From: Adam Jackson <ajax@redhat.com>
+Date: Wed, 27 Jan 2016 11:50:13 -0500
+Subject: modesetting: Require sufficiently new libdrm
+
+Bugzilla: https://bugs.freedesktop.org/93883
+Signed-off-by: Adam Jackson <ajax@redhat.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+Upstream-Status: Backport
+Signed-off-by: Johannes Pointner <johannes.pointner@gmail.com>
+
+diff --git a/configure.ac b/configure.ac
+index ac3bb64..312fc69 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2035,8 +2035,7 @@ if test "x$XORG" = xyes; then
+ 
+ 	if test "x$DRM" = xyes; then
+ 		dnl 2.4.46 is required for cursor hotspot support.
+-		PKG_CHECK_EXISTS(libdrm >= 2.4.46)
+-		XORG_DRIVER_MODESETTING=yes
++		PKG_CHECK_EXISTS(libdrm >= 2.4.46, XORG_DRIVER_MODESETTING=yes, XORG_DRIVER_MODESETTING=no)
+ 	fi
+ 
+ 	AC_SUBST([XORG_LIBS])
+-- 
+cgit v0.10.2
+
diff --git a/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch
new file mode 100644
index 0000000..4be441f
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg/musl-arm-inb-outb.patch
@@ -0,0 +1,18 @@
+inb/outb family for arm is only implemented on glibc
+so assumption across linux is wrong
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: xorg-server-1.18.0/hw/xfree86/common/compiler.h
+===================================================================
+--- xorg-server-1.18.0.orig/hw/xfree86/common/compiler.h
++++ xorg-server-1.18.0/hw/xfree86/common/compiler.h
+@@ -758,7 +758,7 @@ inl(unsigned short port)
+     return xf86ReadMmio32Le((void *) ioBase, port);
+ }
+ 
+-#elif defined(__arm__) && defined(__linux__)
++#elif defined(__arm__) && defined(__GLIBC__)
+ 
+ /* for Linux on ARM, we use the LIBC inx/outx routines */
+ /* note that the appropriate setup via "ioperm" needs to be done */
diff --git a/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.17.2.bb b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.17.2.bb
deleted file mode 100644
index 3039d30..0000000
--- a/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.17.2.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-require xserver-xorg.inc
-
-SRC_URI += "file://0001-use-__GLIBC__-guard-for-glibc-specific-code.patch \
-           "
-SRC_URI[md5sum] = "397e405566651150490ff493e463f1ad"
-SRC_URI[sha256sum] = "f61120612728f2c5034671d0ca3e2273438c60aba93b3dda4a8aa40e6a257993"
-
-# These extensions are now integrated into the server, so declare the migration
-# path for in-place upgrades.
-
-RREPLACES_${PN} =  "${PN}-extension-dri \
-                    ${PN}-extension-dri2 \
-                    ${PN}-extension-record \
-                    ${PN}-extension-extmod \
-                    ${PN}-extension-dbe \
-                   "
-RPROVIDES_${PN} =  "${PN}-extension-dri \
-                    ${PN}-extension-dri2 \
-                    ${PN}-extension-record \
-                    ${PN}-extension-extmod \
-                    ${PN}-extension-dbe \
-                   "
-RCONFLICTS_${PN} = "${PN}-extension-dri \
-                    ${PN}-extension-dri2 \
-                    ${PN}-extension-record \
-                    ${PN}-extension-extmod \
-                    ${PN}-extension-dbe \
-                   "
diff --git a/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.0.bb b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.0.bb
new file mode 100644
index 0000000..eb79b40
--- /dev/null
+++ b/yocto-poky/meta/recipes-graphics/xorg-xserver/xserver-xorg_1.18.0.bb
@@ -0,0 +1,30 @@
+require xserver-xorg.inc
+
+SRC_URI += "file://configure.ac-Use-libsystemd-in-REQUIRED_LIBS-check.patch \
+            file://musl-arm-inb-outb.patch \
+            file://modesetting_libdrm_requirements.patch \
+           "
+SRC_URI[md5sum] = "3c1c1057d3ad27380d8dd87ffcc182cd"
+SRC_URI[sha256sum] = "195670819695d9cedd8dde95fbe069be0d0f488a77797a2d409f9f702daf312e"
+
+# These extensions are now integrated into the server, so declare the migration
+# path for in-place upgrades.
+
+RREPLACES_${PN} =  "${PN}-extension-dri \
+                    ${PN}-extension-dri2 \
+                    ${PN}-extension-record \
+                    ${PN}-extension-extmod \
+                    ${PN}-extension-dbe \
+                   "
+RPROVIDES_${PN} =  "${PN}-extension-dri \
+                    ${PN}-extension-dri2 \
+                    ${PN}-extension-record \
+                    ${PN}-extension-extmod \
+                    ${PN}-extension-dbe \
+                   "
+RCONFLICTS_${PN} = "${PN}-extension-dri \
+                    ${PN}-extension-dri2 \
+                    ${PN}-extension-record \
+                    ${PN}-extension-extmod \
+                    ${PN}-extension-dbe \
+                   "
diff --git a/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb b/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
index 9b3c9e0..51839dd 100644
--- a/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
+++ b/yocto-poky/meta/recipes-graphics/xvideo-tests/xvideo-tests_git.bb
@@ -4,7 +4,7 @@
                     file://src/test-xvideo.c;beginline=1;endline=20;md5=6ae3b4c3c2ff9e51dbbc35bb237afa00"
 DEPENDS = "libxv"
 
-SRCREV = "f8f320d0254c09ce483fc1d8ee99ecf5bc940965"
+SRCREV = "7d38b881e99eb74169d292b40f7164e461a65092"
 PV = "0.1+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/test-xvideo"
diff --git a/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch b/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
new file mode 100644
index 0000000..a4b7157
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/blktrace/blktrace/0001-include-sys-types.h-for-dev_t-definition.patch
@@ -0,0 +1,30 @@
+From 6b5bbdfaac7f216fe8a02c4cf29e5eb2aee5a409 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 15 Sep 2015 00:01:00 +0000
+Subject: [PATCH] include sys/types.h for dev_t definition
+
+Avoids the build failures when sys/types.h does not get included
+indirectly through other headers.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ blktrace.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/blktrace.h b/blktrace.h
+index 380aec7..944fc08 100644
+--- a/blktrace.h
++++ b/blktrace.h
+@@ -5,6 +5,7 @@
+ #include <limits.h>
+ #include <byteswap.h>
+ #include <endian.h>
++#include <sys/types.h>
+ 
+ #include "blktrace_api.h"
+ #include "rbtree.h"
+-- 
+2.5.2
+
diff --git a/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch b/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
index 037d161..dea1aa2 100644
--- a/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
+++ b/yocto-poky/meta/recipes-kernel/blktrace/blktrace/ldflags.patch
@@ -9,11 +9,6 @@
 aed463414e2e2bf8ca44ba54ee5973e7ed599e57
 
 Signed-off-by: Fahad Usman <fahad_usman@mentor.com>
----
- Makefile          |   11 ++++++-----
- btreplay/Makefile |    3 ++-
- btt/Makefile      |    3 ++-
- 3 files changed, 10 insertions(+), 7 deletions(-)
 
 --- git.orig/Makefile
 +++ git/Makefile
@@ -91,3 +86,21 @@
  
  ifneq ($(wildcard .depend),)
  include .depend
+--- git.orig/iowatcher/Makefile
++++ git/iowatcher/Makefile
+@@ -1,5 +1,6 @@
+ C      = gcc
+ CFLAGS  = -Wall -O0 -g -W
++LDFLAGS =
+ ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+ 
+ PROGS = iowatcher
+@@ -19,7 +20,7 @@ all: $(ALL)
+ 	$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+ 
+ iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
+-	$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm
++	$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS)
+ 
+ depend:
+ 	@$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
diff --git a/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb b/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb
index 5b0be42..957cb70 100644
--- a/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb
+++ b/yocto-poky/meta/recipes-kernel/blktrace/blktrace_git.bb
@@ -9,7 +9,9 @@
 PV = "1.1.0+git${SRCPV}"
 
 SRC_URI = "git://git.kernel.dk/blktrace.git \
-           file://ldflags.patch"
+           file://ldflags.patch \
+           file://0001-include-sys-types.h-for-dev_t-definition.patch \
+"
 
 S = "${WORKDIR}/git"
 
diff --git a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb
deleted file mode 100644
index a33841d..0000000
--- a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.7.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-require cryptodev_${PV}.inc
-
-SUMMARY = "A /dev/crypto device driver header file"
-
-do_compile[noexec] = "1"
-
-# Just install cryptodev.h which is the only header file needed to be exported
-do_install() {
-	install -D ${S}/crypto/cryptodev.h ${D}${includedir}/crypto/cryptodev.h
-}
-
-ALLOW_EMPTY_${PN} = "1"
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.8.bb b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.8.bb
new file mode 100644
index 0000000..c55577c
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-linux_1.8.bb
@@ -0,0 +1,13 @@
+require cryptodev.inc
+
+SUMMARY = "A /dev/crypto device driver header file"
+
+do_compile[noexec] = "1"
+
+# Just install cryptodev.h which is the only header file needed to be exported
+do_install() {
+	install -D ${S}/crypto/cryptodev.h ${D}${includedir}/crypto/cryptodev.h
+}
+
+ALLOW_EMPTY_${PN} = "1"
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.7.bb b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.7.bb
deleted file mode 100644
index 5cd52eb..0000000
--- a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.7.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require cryptodev_${PV}.inc
-
-SUMMARY = "A /dev/crypto device driver kernel module"
-
-inherit module
-
-# Header file provided by a separate package
-DEPENDS += "cryptodev-linux"
-
-SRC_URI += " \
-file://0001-Disable-installing-header-file-provided-by-another-p.patch \
-file://0001-ioctl.c-Fix-build-on-3.19.patch \
-"
-
-EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
-
-RCONFLICTS_${PN} = "ocf-linux"
-RREPLACES_${PN} = "ocf-linux"
diff --git a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.8.bb b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.8.bb
new file mode 100644
index 0000000..552eb6a
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-module_1.8.bb
@@ -0,0 +1,17 @@
+require cryptodev.inc
+
+SUMMARY = "A /dev/crypto device driver kernel module"
+
+inherit module
+
+# Header file provided by a separate package
+DEPENDS += "cryptodev-linux"
+
+SRC_URI += " \
+file://0001-Disable-installing-header-file-provided-by-another-p.patch \
+"
+
+EXTRA_OEMAKE='KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
+
+RCONFLICTS_${PN} = "ocf-linux"
+RREPLACES_${PN} = "ocf-linux"
diff --git a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb
deleted file mode 100644
index be59a4a..0000000
--- a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.7.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-require cryptodev_${PV}.inc
-
-SUMMARY = "A test suite for /dev/crypto device driver"
-
-DEPENDS += "openssl"
-
-SRC_URI += " \
-file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \
-file://0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch \
-"
-
-EXTRA_OEMAKE='KERNEL_DIR="${STAGING_EXECPREFIXDIR}" PREFIX="${D}"'
-
-do_compile() {
-	oe_runmake testprogs
-}
-
-do_install() {
-	oe_runmake install_tests
-}
-
-FILES_${PN}-dbg += "${bindir}/tests_cryptodev/.debug"
-FILES_${PN} = "${bindir}/tests_cryptodev/*"
diff --git a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.8.bb b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.8.bb
new file mode 100644
index 0000000..c400524
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev-tests_1.8.bb
@@ -0,0 +1,21 @@
+require cryptodev.inc
+
+SUMMARY = "A test suite for /dev/crypto device driver"
+
+DEPENDS += "openssl"
+
+SRC_URI += " \
+file://0001-Add-the-compile-and-install-rules-for-cryptodev-test.patch \
+"
+
+EXTRA_OEMAKE='KERNEL_DIR="${STAGING_EXECPREFIXDIR}" PREFIX="${D}"'
+
+do_compile() {
+	oe_runmake testprogs
+}
+
+do_install() {
+	oe_runmake install_tests
+}
+
+FILES_${PN} = "${bindir}/tests_cryptodev/*"
diff --git a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
new file mode 100644
index 0000000..ade7ef9
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev.inc
@@ -0,0 +1,13 @@
+HOMEPAGE = "http://cryptodev-linux.org/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "02644cc4cd02301e0b503a332eb2f0b5"
+SRC_URI[sha256sum] = "67fabde9fb67b286a96c4f45b594b0eccd0f761b495705c18f2ae9461b831376"
+
+S = "${WORKDIR}/cryptodev-linux-${PV}"
+
+CLEANBROKEN = "1"
diff --git a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev_1.7.inc b/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev_1.7.inc
deleted file mode 100644
index cca6925..0000000
--- a/yocto-poky/meta/recipes-kernel/cryptodev/cryptodev_1.7.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-HOMEPAGE = "http://cryptodev-linux.org/"
-
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "0b63b3481cf2c90386b35f057481d36b"
-SRC_URI[sha256sum] = "41880533b53de4d7b3f054e230f576988dafb8eed7bef5ebcf6422bb2e3a3b25"
-
-S = "${WORKDIR}/cryptodev-linux-${PV}"
-
-CLEANBROKEN = "1"
diff --git a/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-on-3.19.patch b/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-on-3.19.patch
deleted file mode 100644
index 74c8972..0000000
--- a/yocto-poky/meta/recipes-kernel/cryptodev/files/0001-ioctl.c-Fix-build-on-3.19.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 7d71124991030f99965e6e6aaed421115f185adb Mon Sep 17 00:00:00 2001
-From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
-Date: Mon, 9 Feb 2015 13:51:56 +0100
-Subject: [PATCH] ioctl.c: Fix build on 3.19
-
-get_unused_fd() MACRO has been removed on kernel 3.19. Replace by the
-actual output of the macro.
-
-Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
----
- ioctl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/ioctl.c b/ioctl.c
-index f26cf93..cf8cc17 100644
---- a/ioctl.c
-+++ b/ioctl.c
-@@ -529,7 +529,7 @@ static int
- clonefd(struct file *filp)
- {
- 	int ret;
--	ret = get_unused_fd();
-+	ret = get_unused_fd_flags(0);
- 	if (ret >= 0) {
- 			get_file(filp);
- 			fd_install(ret, filp);
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch b/yocto-poky/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch
deleted file mode 100644
index f5ab8b4..0000000
--- a/yocto-poky/meta/recipes-kernel/cryptodev/files/0002-Fix-tests-Makefile-usage-of-LDLIBS-vs.-LDFLAGS.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 47ff1eb9bb4f872c1d731b93d334ee5865bf3439 Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <denys@ti.com>
-Date: Sun, 6 Apr 2014 22:16:30 -0400
-Subject: [PATCH] Fix tests Makefile usage of LDLIBS vs. LDFLAGS
-
-Libraries must come after objects, as link order matters, especially
-when using linker flags like -Wl,--as-needed.
-
-Signed-off-by: Denys Dmytriyenko <denys@ti.com>
-
-Upstream-Status: Pending
----
- tests/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/Makefile b/tests/Makefile
-index cd202af..67c3c83 100644
---- a/tests/Makefile
-+++ b/tests/Makefile
-@@ -39,5 +39,5 @@ testprogs: $(hostprogs)
- clean:
- 	rm -f *.o *~ $(hostprogs)
- 
--${comp_progs}: LDFLAGS += -lssl -lcrypto
-+${comp_progs}: LDLIBS += -lssl -lcrypto
- ${comp_progs}: %: %.o openssl_wrapper.o
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc
index 7797a25..758a3a7 100644
--- a/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc
+++ b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools.inc
@@ -8,7 +8,10 @@
                     file://kexec/kexec.c;beginline=1;endline=20;md5=af10f6ae4a8715965e648aa687ad3e09"
 DEPENDS = "zlib xz"
 
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz"
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz \
+           file://kdump \
+           file://kdump.conf \
+"
 
 PR = "r1"
 
diff --git a/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
new file mode 100644
index 0000000..90c2f6e
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch
@@ -0,0 +1,31 @@
+From d811875a41b4628040abaada3da29b7b9592e757 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 9 Jan 2016 17:16:16 -0800
+Subject: [PATCH] vmcore-dmesg: Define _GNU_SOURCE
+
+loff_t is guarded with _GNU_SOURCE on some C library implementations
+e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to
+include this define, it should help compiling on musl while nothing
+changes for glibc based systems since there _GNU_SOURCE is already
+defined
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ vmcore-dmesg/vmcore-dmesg.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c
+index 0364636..a8f56df 100644
+--- a/vmcore-dmesg/vmcore-dmesg.c
++++ b/vmcore-dmesg/vmcore-dmesg.c
+@@ -1,4 +1,5 @@
+ #define _XOPEN_SOURCE 600
++#define _GNU_SOURCE
+ #define _LARGEFILE_SOURCE 1
+ #define _FILE_OFFSET_BITS 64
+ #include <endian.h>
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump
new file mode 100755
index 0000000..3fb133f
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump
@@ -0,0 +1,163 @@
+#! /bin/sh
+#
+#  kdump
+#
+#  Description: The kdump script provides the support:
+#		1. Load a kdump kernel image into memory;
+#		2. Copy away vmcore when system panic.
+#
+
+#default
+KDUMP_KVER="`uname -r`"
+KDUMP_KIMAGE="/boot/bzImage-${KDUMP_KVER}"
+KDUMP_CMDLINE="`cat /proc/cmdline`"
+KDUMP_CMDLINE_APPEND="kdump_needed maxcpus=1 irqpoll reset_devices"
+KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`"
+
+#get right kernel image
+march="`uname -m`"
+case ${march} in
+	x86*|i?86)
+		;;
+		*)
+		KDUMP_KIMAGE="/boot/uImage-${KDUMP_KVER}"
+		;;
+esac
+
+KEXEC=usr/sbin/kexec
+KEXEC_ARGS="-p"
+
+MAKEDUMPFILE=/usr/bin/makedumpfile
+MAKEDUMPFILE_ARGS="-E -d 1"
+
+LOGGER="logger -p info -t kdump"
+
+if [ -f /etc/sysconfig/kdump.conf ]; then
+	. /etc/sysconfig/kdump.conf
+fi
+
+do_check()
+{
+	#check makedumpfile
+	if [ ! -e ${MAKEDUMPFILE} -o ! -x ${MAKEDUMPFILE} ] ;then
+		echo "No makedumpfile found."
+		return 1;
+	fi
+
+	#check kexec
+	if [ ! -e ${KEXEC} -o ! -x ${KEXEC} ] ;then
+		echo "No kexec found."
+		return 1;
+	fi
+
+	#check whether kdump kernel image exists on the system
+	if [ ! -f ${KDUMP_KIMAGE} ]; then
+		echo "No kdump kernel image found."
+		return 1
+	fi
+}
+
+do_save_vmcore()
+{
+	mkdir -p ${KDUMP_VMCORE_PATH}
+	echo "Saving a vmcore to ${KDUMP_VMCORE_PATH}."
+
+	${MAKEDUMPFILE} ${MAKEDUMPFILE_ARGS} /proc/vmcore ${KDUMP_VMCORE_PATH}/vmcore-"`date +"%H:%M:%S"`"
+#	cp --sparse=always /proc/vmcore ${KDUMP_VMCORE_PATH}/vmcore-"`date +"%H:%M:%S"`"
+	rc=$?
+	if [ ${rc} == 0 ]; then
+		${LOGGER} "Saved a vmcore to ${KDUMP_VMCORE_PATH}."
+	else
+		${LOGGER} "Failed to save vmcore!"
+	fi
+	return ${rc}
+}
+
+do_start()
+{
+	#check file
+	do_check
+
+	#check whether the running kernel supports kdump.
+	if [ ! -e /sys/kernel/kexec_crash_loaded ]; then
+		echo "Kdump isn't supported on the running kernel!!!"
+		${LOGGER} "Kdump isn't supported on the running kernel!!!"
+		return 1
+	fi
+
+	#check whether kdump kernel image has been loaded
+	rc=`cat /sys/kernel/kexec_crash_loaded`
+	if [ ${rc} != 0 ]; then
+		echo "Kdump is already running.";
+		${LOGGER} "Kdump is already running."
+		return 0
+	fi
+
+	#check the running kernel cmdline option,insure "crashkenrel=" always set.
+	grep -q crashkernel= /proc/cmdline
+	if [ $? != 0 ]; then
+		echo "Kdump isn't supported on the running kernel,please check boot option!!!"
+		${LOGGER} "Kdump isn't supported on the running kernel,please check boot option!!!"
+		return 1
+	fi
+
+	#handle kdump cmdline parameters, remove some useless options
+	kcmdline=""
+	for x in `cat /proc/cmdline`; do
+		case $x in
+			crashkernel*)
+				;;
+			*)
+				kcmdline="${kcmdline} $x"
+				;;
+		esac
+	done
+
+	KDUMP_CMDLINE="${kcmdline} ${KDUMP_CMDLINE_APPEND}"
+
+	#Load the kdump kernel image
+	${KEXEC} ${KEXEC_ARGS} "${KDUMP_KIMAGE}" --append="${KDUMP_CMDLINE}"
+	if [ $? != 0 ]; then
+		echo "Failed to load kdump kernel!"
+		${LOGGER} "Failed to load kdump kernel!"
+		return 1
+	fi
+
+	echo "Kdump started up."
+	${LOGGER} "Kdump started up."
+}
+
+do_stop()
+{
+	${KEXEC} -p -u 2>/dev/null
+	if [ $? == 0 ]; then
+		echo "Kdump has been stopped."
+		${LOGGER} "Kdump has been stopped."
+	else
+		echo "Failed to stop kdump!"
+		${LOGGER} "Failed to stop kdump!"
+	fi
+}
+
+case "$1" in
+  start)
+	if [ -s /proc/vmcore ]; then
+		do_save_vmcore
+		reboot
+	else
+		do_start
+	fi
+	;;
+ restart)
+	do_stop
+	do_start
+	;;
+  stop)
+	do_stop
+	;;
+   *)
+	echo $"Usage: $0 {start|stop|restart}"
+	exit 1
+esac
+
+exit $?
diff --git a/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump.conf b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump.conf
new file mode 100644
index 0000000..42a2435
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools/kdump.conf
@@ -0,0 +1,18 @@
+#the kdump kernel version string.
+#KDUMP_KVER="`uname -r`"
+
+#this will be passed to the kdump kernel as kdump kernel command line, it
+#usually comes from /proc/cmdline
+#KDUMP_CMDLINE="`cat /proc/cmdline`"
+
+# append arguments to the kdump commandline
+#KDUMP_CMDLINE_APPEND="kdump_needed maxcpus=1 irqpoll reset_devices"
+
+#the kernel image for kdump
+#KDUMP_KIMAGE="/boot/bzImage-${KDUMP_KVER}"
+
+#Where to save the vmcore
+#KDUMP_VMCORE_PATH="/var/crash/`date +"%Y-%m-%d"`"
+
+#the arguments to makedumpfile
+MAKEDUMPFILE_ARGS="--dump-dmesg -x /boot/vmlinux-`uname -r`"
diff --git a/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.10.bb b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.10.bb
deleted file mode 100644
index ffdb983..0000000
--- a/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.10.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-require kexec-tools.inc
-export LDFLAGS = "-L${STAGING_LIBDIR}"
-EXTRA_OECONF = " --with-zlib=yes"
-
-SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch \
-            file://kexec-aarch64.patch \
-            file://kexec-x32.patch \
-            file://0002-powerpc-change-the-memory-size-limit.patch \
-            file://0001-purgatory-Pass-r-directly-to-linker.patch \
-         "
-
-SRC_URI[md5sum] = "6cb4d22bcec71b6e070aa8e9d990a5e6"
-SRC_URI[sha256sum] = "c31bb83deef9547a28e8cfc1f0916e70f8e6b92a6bd2ef7077e12e3338239af3"
-
-PACKAGES =+ "kexec kdump vmcore-dmesg"
-
-ALLOW_EMPTY_${PN} = "1"
-RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
-
-FILES_kexec = "${sbindir}/kexec"
-FILES_kdump = "${sbindir}/kdump"
-FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
diff --git a/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb
new file mode 100644
index 0000000..c1c97af
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/kexec/kexec-tools_2.0.11.bb
@@ -0,0 +1,37 @@
+require kexec-tools.inc
+export LDFLAGS = "-L${STAGING_LIBDIR}"
+EXTRA_OECONF = " --with-zlib=yes"
+
+SRC_URI += "file://kexec-tools-Refine-kdump-device_tree-sort.patch \
+            file://kexec-aarch64.patch \
+            file://kexec-x32.patch \
+            file://0002-powerpc-change-the-memory-size-limit.patch \
+            file://0001-purgatory-Pass-r-directly-to-linker.patch \
+            file://0001-vmcore-dmesg-Define-_GNU_SOURCE.patch \
+         "
+
+SRC_URI[md5sum] = "86de066859f289048f1b286af6f03f78"
+SRC_URI[sha256sum] = "84f652ebf1de3f7b9de757a50cdbf6d5639d88c1d5b5ef9f525edde5ef9590c2"
+
+PACKAGES =+ "kexec kdump vmcore-dmesg"
+
+ALLOW_EMPTY_${PN} = "1"
+RRECOMMENDS_${PN} = "kexec kdump vmcore-dmesg"
+
+FILES_kexec = "${sbindir}/kexec"
+FILES_kdump = "${sbindir}/kdump ${sysconfdir}/init.d/kdump \
+               ${sysconfdir}/sysconfig/kdump.conf"
+FILES_vmcore-dmesg = "${sbindir}/vmcore-dmesg"
+
+inherit update-rc.d
+
+INITSCRIPT_PACKAGES = "kdump"
+INITSCRIPT_NAME_kdump = "kdump"
+INITSCRIPT_PARAMS_kdump = "start 56 2 3 4 5 . stop 56 0 1 6 ."
+
+do_install_append () {
+        install -d ${D}${sysconfdir}/init.d
+        install -m 0755 ${WORKDIR}/kdump ${D}${sysconfdir}/init.d/kdump
+        install -d ${D}${sysconfdir}/sysconfig
+        install -m 0644 ${WORKDIR}/kdump.conf ${D}${sysconfdir}/sysconfig
+}
diff --git a/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb b/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
index 8acb3a8..c2c2589 100644
--- a/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
+++ b/yocto-poky/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb
@@ -46,3 +46,5 @@
 depmodwrapper_sysroot_preprocess () {
 	sysroot_stage_dir ${D}${bindir_crossscripts} ${SYSROOT_DESTDIR}${bindir_crossscripts}
 }
+
+inherit nopackages
diff --git a/yocto-poky/meta/recipes-kernel/kmod/kmod.inc b/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
index 71ffdf8..0bcdcf6 100644
--- a/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
+++ b/yocto-poky/meta/recipes-kernel/kmod/kmod.inc
@@ -16,9 +16,9 @@
                    "
 inherit autotools gtk-doc
 
-SRCREV = "114ec87c85c35a2bd3682f9f891e494127be6fb5"
+SRCREV = "42f32b8ae45ad8e3a1da29c9b20af9b5e2e9e676"
 # Lookout for PV bump too when SRCREV is changed
-PV = "21+git${SRCPV}"
+PV = "22+git${SRCPV}"
 
 SRC_URI = "git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git \
            file://depmod-search.conf \
diff --git a/yocto-poky/meta/recipes-kernel/kmod/kmod_git.bb b/yocto-poky/meta/recipes-kernel/kmod/kmod_git.bb
index e0bb95c..69185b2 100644
--- a/yocto-poky/meta/recipes-kernel/kmod/kmod_git.bb
+++ b/yocto-poky/meta/recipes-kernel/kmod/kmod_git.bb
@@ -39,7 +39,7 @@
             sed -i 's/ac_pwd=/#ac_pwd=/' config.status ; sed -i "/#ac_pwd=/a\ac_pwd='.'" config.status
 }
 
-inherit update-alternatives
+inherit update-alternatives bash-completion
 
 ALTERNATIVE_PRIORITY = "60"
 
@@ -56,8 +56,7 @@
 
 ALTERNATIVE_LINK_NAME[depmod] = "${base_sbindir}/depmod"
 
-PACKAGES =+ "libkmod ${PN}-bash-completion"
+PACKAGES =+ "libkmod"
 
 FILES_libkmod = "${base_libdir}/libkmod*${SOLIBS} ${libdir}/libkmod*${SOLIBS}"
 FILES_${PN} += "${base_libdir}/depmod.d ${base_libdir}/modprobe.d"
-FILES_${PN}-bash-completion = "${datadir}/bash-completion"
diff --git a/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch b/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
index 0cf217f..af19b37 100644
--- a/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
+++ b/yocto-poky/meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch
@@ -12,7 +12,7 @@
  SBINDIR = /usr/sbin
  XCFLAGS = -W  -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
 -LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncursesw 
-+LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncurses
++LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncurses $(LDFLAGS)
 +CC ?= gcc
  
  OBJS= latencytop.o text_display.o translate.o fsync.o
diff --git a/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb b/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
index 2dfda90..0b024ad 100644
--- a/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
+++ b/yocto-poky/meta/recipes-kernel/libpfm/libpfm4_4.6.0.bb
@@ -19,6 +19,8 @@
 SRC_URI[md5sum] = "5077b9022440e4951d96f2d0e73bd487"
 SRC_URI[sha256sum] = "5ab1e5b0472550f9037a8800834f6bc3b927690070f69fac0b67284b4b05fd5f"
 
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/perfmon2/files/libpfm4/"
+
 EXTRA_OEMAKE = "DESTDIR=\"${D}\" PREFIX=\"${prefix}\" LIBDIR=\"${libdir}\" LDCONFIG=\"true\""
 EXTRA_OEMAKE_append_powerpc = " ARCH=\"powerpc\""
 EXTRA_OEMAKE_append_powerpc64 = " ARCH=\"powerpc\" BITMODE=\"64\""
diff --git a/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb b/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index 0878ab1..a4e64d5 100644
--- a/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/yocto-poky/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -3,128 +3,173 @@
 
 LICENSE = "\
     Firmware-Abilis \
+    & Firmware-adsp_sst \
     & Firmware-agere \
+    & Firmware-amdgpu \
     & Firmware-amd-ucode \
     & Firmware-atheros_firmware \
+    & Firmware-atmel \
     & Firmware-broadcom_bcm43xx \
     & Firmware-ca0132 \
+    & Firmware-cavium \
     & Firmware-chelsio_firmware \
     & Firmware-cw1200 \
     & Firmware-dib0700 \
+    & Firmware-e100 \
     & Firmware-ene_firmware \
     & Firmware-fw_sst_0f28 \
     & Firmware-go7007 \
+    & Firmware-hfi1_firmware \
     & Firmware-i2400m \
+    & Firmware-i915 \
     & Firmware-ibt_firmware \
     & Firmware-it913x \
     & Firmware-iwlwifi_firmware \
     & Firmware-IntcSST2 \
+    & Firmware-kaweth \
     & Firmware-Marvell \
+    & Firmware-moxa \
     & Firmware-mwl8335 \
     & Firmware-myri10ge_firmware \
+    & Firmware-nvidia \
     & Firmware-OLPC \
+    & Firmware-ath9k-htc \
     & Firmware-phanfw \
-    & Firmware-qat_dh895xcc_firmware \
+    & Firmware-qat \
+    & Firmware-qla1280 \
     & Firmware-qla2xxx \
+    & Firmware-qualcommAthos_ar3k \
+    & Firmware-qualcommAthos_ath10k \
     & Firmware-r8a779x_usb3 \
     & Firmware-radeon \
     & Firmware-ralink_a_mediatek_company_firmware \
     & Firmware-ralink-firmware \
     & Firmware-rtlwifi_firmware \
+    & Firmware-siano \
     & Firmware-tda7706-firmware \
     & Firmware-ti-connectivity \
+    & Firmware-ti-keystone \
     & Firmware-ueagle-atm4-firmware \
     & Firmware-via_vt6656 \
     & Firmware-wl1251 \
     & Firmware-xc4000 \
     & Firmware-xc5000 \
     & Firmware-xc5000c \
-    & Firmware-siano \
 "
 
 LIC_FILES_CHKSUM = "\
     file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
+    file://LICENCE.adsp_sst;md5=615c45b91a5a4a9fe046d6ab9a2df728 \
     file://LICENCE.agere;md5=af0133de6b4a9b2522defd5f188afd31 \
+    file://LICENSE.amdgpu;md5=a8592c24c2672062e03c7392fc7fe3bc \
+    file://LICENSE.amd-ucode;md5=3a0de451253cc1edbf30a3c621effee3 \
     file://LICENCE.atheros_firmware;md5=30a14c7823beedac9fa39c64fdd01a13 \
+    file://LICENSE.atmel;md5=aa74ac0c60595dee4d4e239107ea77a3 \
     file://LICENCE.broadcom_bcm43xx;md5=3160c14df7228891b868060e1951dfbc \
     file://LICENCE.ca0132;md5=209b33e66ee5be0461f13d31da392198 \
+    file://LICENCE.cavium;md5=c37aaffb1ebe5939b2580d073a95daea \
     file://LICENCE.chelsio_firmware;md5=819aa8c3fa453f1b258ed8d168a9d903 \
     file://LICENCE.cw1200;md5=f0f770864e7a8444a5c5aa9d12a3a7ed \
+    file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \
+    file://LICENCE.e100;md5=ec0f84136766df159a3ae6d02acdf5a8 \
     file://LICENCE.ene_firmware;md5=ed67f0f62f8f798130c296720b7d3921 \
     file://LICENCE.fw_sst_0f28;md5=6353931c988ad52818ae733ac61cd293 \
     file://LICENCE.go7007;md5=c0bb9f6aaaba55b0529ee9b30aa66beb \
+    file://LICENSE.hfi1_firmware;md5=5e7b6e586ce7339d12689e49931ad444 \
     file://LICENCE.i2400m;md5=14b901969e23c41881327c0d9e4b7d36 \
+    file://LICENSE.i915;md5=2b0b2e0d20984affd4490ba2cba02570 \
     file://LICENCE.ibt_firmware;md5=fdbee1ddfe0fb7ab0b2fcd6b454a366b \
+    file://LICENCE.IntcSST2;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
     file://LICENCE.it913x;md5=1fbf727bfb6a949810c4dbfa7e6ce4f8 \
     file://LICENCE.iwlwifi_firmware;md5=3fd842911ea93c29cd32679aa23e1c88 \
-    file://LICENCE.IntcSST2;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
+    file://LICENCE.kaweth;md5=b1d876e562f4b3b8d391ad8395dfe03f \
     file://LICENCE.Marvell;md5=9ddea1734a4baf3c78d845151f42a37a \
+    file://LICENCE.moxa;md5=1086614767d8ccf744a923289d3d4261 \
     file://LICENCE.mwl8335;md5=9a6271ee0e644404b2ff3c61fd070983 \
     file://LICENCE.myri10ge_firmware;md5=42e32fb89f6b959ca222e25ac8df8fed \
+    file://LICENCE.nvidia;md5=4428a922ed3ba2ceec95f076a488ce07 \
     file://LICENCE.OLPC;md5=5b917f9d8c061991be4f6f5f108719cd \
+    file://LICENCE.open-ath9k-htc-firmware;md5=1b33c9f4d17bc4d457bdb23727046837 \
     file://LICENCE.phanfw;md5=954dcec0e051f9409812b561ea743bfa \
-    file://LICENCE.qat_dh895xcc_firmware;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
+    file://LICENCE.qat_firmware;md5=9e7d8bea77612d7cc7d9e9b54b623062 \
+    file://LICENCE.qla1280;md5=d6895732e622d950609093223a2c4f5d \
     file://LICENCE.qla2xxx;md5=f5ce8529ec5c17cb7f911d2721d90e91 \
+    file://LICENSE.QualcommAtheros_ar3k;md5=b5fe244fb2b532311de1472a3bc06da5 \
+    file://LICENSE.QualcommAtheros_ath10k;md5=b5fe244fb2b532311de1472a3bc06da5 \
     file://LICENCE.r8a779x_usb3;md5=4c1671656153025d7076105a5da7e498 \
+    file://LICENSE.radeon;md5=6c7f97c6c62bdd9596d0238bb205118c \
     file://LICENCE.ralink_a_mediatek_company_firmware;md5=728f1a85fd53fd67fa8d7afb080bc435 \
     file://LICENCE.ralink-firmware.txt;md5=ab2c269277c45476fb449673911a2dfd \
     file://LICENCE.rtlwifi_firmware.txt;md5=00d06cfd3eddd5a2698948ead2ad54a5 \
+    file://LICENCE.siano;md5=602c79ae3f98f1e73d880fd9f940a418 \
     file://LICENCE.tda7706-firmware.txt;md5=835997cf5e3c131d0dddd695c7d9103e \
-    file://LICENCE.ti-connectivity;md5=186e7a43cf6c274283ad81272ca218ea \
+    file://LICENCE.ti-connectivity;md5=c5e02be633f1499c109d1652514d85ec \
+    file://LICENCE.ti-keystone;md5=3a86335d32864b0bef996bee26cc0f2c \
     file://LICENCE.ueagle-atm4-firmware;md5=4ed7ea6b507ccc583b9d594417714118 \
     file://LICENCE.via_vt6656;md5=e4159694cba42d4377a912e78a6e850f \
     file://LICENCE.wl1251;md5=ad3f81922bb9e197014bb187289d3b5b \
     file://LICENCE.xc4000;md5=0ff51d2dc49fce04814c9155081092f0 \
     file://LICENCE.xc5000;md5=1e170c13175323c32c7f4d0998d53f66 \
     file://LICENCE.xc5000c;md5=12b02efa3049db65d524aeb418dd87ca \
-    file://LICENSE.amd-ucode;md5=3a0de451253cc1edbf30a3c621effee3 \
-    file://LICENSE.dib0700;md5=f7411825c8a555a1a3e5eab9ca773431 \
-    file://LICENSE.radeon;md5=6c7f97c6c62bdd9596d0238bb205118c \
-    file://LICENCE.siano;md5=602c79ae3f98f1e73d880fd9f940a418 \
 "
 
 # These are not common licenses, set NO_GENERIC_LICENSE for them
 # so that the license files will be copied from fetched source
 NO_GENERIC_LICENSE[Firmware-Abilis] = "LICENCE.Abilis"
+NO_GENERIC_LICENSE[Firmware-adsp_sst] = "LICENCE.adsp_sst"
 NO_GENERIC_LICENSE[Firmware-agere] = "LICENCE.agere"
+NO_GENERIC_LICENSE[Firmware-amdgpu] = "LICENSE.amdgpu"
+NO_GENERIC_LICENSE[Firmware-amd-ucode] = "LICENSE.amd-ucode"
 NO_GENERIC_LICENSE[Firmware-atheros_firmware] = "LICENCE.atheros_firmware"
+NO_GENERIC_LICENSE[Firmware-atmel] = "LICENSE.atmel"
 NO_GENERIC_LICENSE[Firmware-broadcom_bcm43xx] = "LICENCE.broadcom_bcm43xx"
 NO_GENERIC_LICENSE[Firmware-ca0132] = "LICENCE.ca0132"
+NO_GENERIC_LICENSE[Firmware-cavium] = "LICENCE.cavium"
 NO_GENERIC_LICENSE[Firmware-chelsio_firmware] = "LICENCE.chelsio_firmware"
 NO_GENERIC_LICENSE[Firmware-cw1200] = "LICENCE.cw1200"
+NO_GENERIC_LICENSE[Firmware-dib0700] = "LICENSE.dib0700"
+NO_GENERIC_LICENSE[Firmware-e100] = "LICENCE.e100"
 NO_GENERIC_LICENSE[Firmware-ene_firmware] = "LICENCE.ene_firmware"
 NO_GENERIC_LICENSE[Firmware-fw_sst_0f28] = "LICENCE.fw_sst_0f28"
 NO_GENERIC_LICENSE[Firmware-go7007] = "LICENCE.go7007"
+NO_GENERIC_LICENSE[Firmware-hfi1_firmware] = "LICENSE.hfi1_firmware"
 NO_GENERIC_LICENSE[Firmware-i2400m] = "LICENCE.i2400m"
+NO_GENERIC_LICENSE[Firmware-i915] = "LICENSE.i915"
 NO_GENERIC_LICENSE[Firmware-ibt_firmware] = "LICENCE.ibt_firmware"
+NO_GENERIC_LICENSE[Firmware-IntcSST2] = "LICENCE.IntcSST2"
 NO_GENERIC_LICENSE[Firmware-it913x] = "LICENCE.it913x"
 NO_GENERIC_LICENSE[Firmware-iwlwifi_firmware] = "LICENCE.iwlwifi_firmware"
-NO_GENERIC_LICENSE[Firmware-IntcSST2] = "LICENCE.IntcSST2"
+NO_GENERIC_LICENSE[Firmware-kaweth] = "LICENCE.kaweth"
 NO_GENERIC_LICENSE[Firmware-Marvell] = "LICENCE.Marvell"
+NO_GENERIC_LICENSE[Firmware-moxa] = "LICENCE.moxa"
 NO_GENERIC_LICENSE[Firmware-mwl8335] = "LICENCE.mwl8335"
 NO_GENERIC_LICENSE[Firmware-myri10ge_firmware] = "LICENCE.myri10ge_firmware"
+NO_GENERIC_LICENSE[Firmware-nvidia] = "LICENCE.nvidia"
 NO_GENERIC_LICENSE[Firmware-OLPC] = "LICENCE.OLPC"
+NO_GENERIC_LICENSE[Firmware-ath9k-htc] = "LICENCE.open-ath9k-htc-firmware"
 NO_GENERIC_LICENSE[Firmware-phanfw] = "LICENCE.phanfw"
-NO_GENERIC_LICENSE[Firmware-qat_dh895xcc_firmware] = "LICENCE.qat_dh895xcc_firmware"
+NO_GENERIC_LICENSE[Firmware-qat] = "LICENCE.qat_firmware"
+NO_GENERIC_LICENSE[Firmware-qla1280] = "LICENCE.qla1280"
 NO_GENERIC_LICENSE[Firmware-qla2xxx] = "LICENCE.qla2xxx"
+NO_GENERIC_LICENSE[Firmware-qualcommAthos_ar3k] = "LICENSE.QualcommAtheros_ar3k"
+NO_GENERIC_LICENSE[Firmware-qualcommAthos_ath10k] = "LICENSE.QualcommAtheros_ath10k"
 NO_GENERIC_LICENSE[Firmware-r8a779x_usb3] = "LICENCE.r8a779x_usb3"
+NO_GENERIC_LICENSE[Firmware-radeon] = "LICENSE.radeon"
 NO_GENERIC_LICENSE[Firmware-ralink_a_mediatek_company_firmware] = "LICENCE.ralink_a_mediatek_company_firmware"
 NO_GENERIC_LICENSE[Firmware-ralink-firmware] = "LICENCE.ralink-firmware.txt"
 NO_GENERIC_LICENSE[Firmware-rtlwifi_firmware] = "LICENCE.rtlwifi_firmware.txt"
+NO_GENERIC_LICENSE[Firmware-siano] = "LICENCE.siano"
 NO_GENERIC_LICENSE[Firmware-tda7706-firmware] = "LICENCE.tda7706-firmware.txt"
 NO_GENERIC_LICENSE[Firmware-ti-connectivity] = "LICENCE.ti-connectivity"
+NO_GENERIC_LICENSE[Firmware-ti-keystone] = "LICENCE.ti-keystone"
 NO_GENERIC_LICENSE[Firmware-ueagle-atm4-firmware] = "LICENCE.ueagle-atm4-firmware"
 NO_GENERIC_LICENSE[Firmware-via_vt6656] = "LICENCE.via_vt6656"
 NO_GENERIC_LICENSE[Firmware-wl1251] = "LICENCE.wl1251"
 NO_GENERIC_LICENSE[Firmware-xc4000] = "LICENCE.xc4000"
 NO_GENERIC_LICENSE[Firmware-xc5000] = "LICENCE.xc5000"
 NO_GENERIC_LICENSE[Firmware-xc5000c] = "LICENCE.xc5000c"
-NO_GENERIC_LICENSE[Firmware-amd-ucode] = "LICENSE.amd-ucode"
-NO_GENERIC_LICENSE[Firmware-dib0700] = "LICENSE.dib0700"
-NO_GENERIC_LICENSE[Firmware-radeon] = "LICENSE.radeon"
-NO_GENERIC_LICENSE[Firmware-siano] = "LICENCE.siano"
 
-SRCREV = "75cc3ef8ba6712fd72c073b17a790282136cc743"
+SRCREV = "5f8ca0c1db6106a2d6d7e85eee778917ff03c3de"
 PE = "1"
 PV = "0.0+git${SRCPV}"
 
@@ -164,27 +209,29 @@
 
 PACKAGES =+ "${PN}-ralink-license ${PN}-ralink \
              ${PN}-radeon-license ${PN}-radeon \
-             ${PN}-marvell-license ${PN}-sd8686 ${PN}-sd8787 ${PN}-sd8797 \
+             ${PN}-marvell-license ${PN}-sd8686 ${PN}-sd8688 ${PN}-sd8787 ${PN}-sd8797 \
              ${PN}-ti-connectivity-license ${PN}-wl12xx ${PN}-wl18xx \
              ${PN}-vt6656-license ${PN}-vt6656 \
              ${PN}-rtl-license ${PN}-rtl8192cu ${PN}-rtl8192ce ${PN}-rtl8192su \
-             ${PN}-broadcom-license ${PN}-bcm4329 ${PN}-bcm4330 ${PN}-bcm4334 ${PN}-bcm4354 \
-             ${PN}-atheros-license ${PN}-ar9170 ${PN}-ar3k ${PN}-ath6k ${PN}-ath9k \
+             ${PN}-broadcom-license ${PN}-bcm4329 ${PN}-bcm4330 ${PN}-bcm4334 ${PN}-bcm43340 ${PN}-bcm4339 ${PN}-bcm4354 \
+             ${PN}-atheros-license ${PN}-ar9170 ${PN}-ath6k ${PN}-ath9k \
+             ${PN}-ar3k-license  ${PN}-ar3k  ${PN}-ath10k-license  ${PN}-ath10k  \
              \
              ${PN}-iwlwifi-license ${PN}-iwlwifi-135-6 \
              ${PN}-iwlwifi-3160-7 ${PN}-iwlwifi-3160-8 ${PN}-iwlwifi-3160-9 \
              ${PN}-iwlwifi-6000-4 ${PN}-iwlwifi-6000g2a-5 ${PN}-iwlwifi-6000g2a-6 \
              ${PN}-iwlwifi-6000g2b-5 ${PN}-iwlwifi-6000g2b-6 \
              ${PN}-iwlwifi-6050-4 ${PN}-iwlwifi-6050-5 \
-             ${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9 \
-             ${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9 \
-             \
+             ${PN}-iwlwifi-7260 \
+             ${PN}-iwlwifi-7265 \
+             ${PN}-iwlwifi-7265d ${PN}-iwlwifi-8000c ${PN}-iwlwifi-8265 \
+             ${PN}-i915-license ${PN}-i915 \
+             ${PN}-adsp-sst-license ${PN}-adsp-sst \
              ${PN}-license \
              "
 
 # For atheros
 LICENSE_${PN}-ar9170 = "Firmware-atheros_firmware"
-LICENSE_${PN}-ar3k = "Firmware-atheros_firmware"
 LICENSE_${PN}-ath6k = "Firmware-atheros_firmware"
 LICENSE_${PN}-ath9k = "Firmware-atheros_firmware"
 
@@ -192,9 +239,6 @@
 FILES_${PN}-ar9170 = " \
   /lib/firmware/ar9170*.fw \
 "
-FILES_${PN}-ar3k = " \
-  /lib/firmware/ar3k \
-"
 FILES_${PN}-ath6k = " \
   /lib/firmware/ath6k \
 "
@@ -206,10 +250,26 @@
 "
 
 RDEPENDS_${PN}-ar9170 += "${PN}-atheros-license"
-RDEPENDS_${PN}-ar3k += "${PN}-atheros-license"
 RDEPENDS_${PN}-ath6k += "${PN}-atheros-license"
 RDEPENDS_${PN}-ath9k += "${PN}-atheros-license"
 
+# For QualCommAthos
+LICENSE_${PN}-ar3k = "Firmware-qualcommAthos_ar3k"
+LICENSE_${PN}-ath10k = "Firmware-qualcommAthos_ath10k"
+
+FILES_${PN}-ar3k-license = "/lib/firmware/LICENSE.QualcommAtheros_ar3k"
+FILES_${PN}-ar3k = " \
+  /lib/firmware/ar3k \
+"
+
+FILES_${PN}-ath10k-license = "/lib/firmware/LICENSE.QualcommAtheros_ath10k"
+FILES_${PN}-ath10k = " \
+  /lib/firmware/ath10k \
+"
+
+RDEPENDS_${PN}-ar3k += "${PN}-ar3k-license"
+RDEPENDS_${PN}-ath10k += "${PN}-ath10k-license"
+
 # For ralink
 LICENSE_${PN}-ralink = "Firmware-ralink-firmware"
 
@@ -232,6 +292,7 @@
 
 # For marvell
 LICENSE_${PN}-sd8686 = "Firmware-Marvell"
+LICENSE_${PN}-sd8688 = "Firmware-Marvell"
 LICENSE_${PN}-sd8787 = "Firmware-Marvell"
 LICENSE_${PN}-sd8797 = "Firmware-Marvell"
 
@@ -240,6 +301,10 @@
   /lib/firmware/libertas/sd8686_v9* \
   /lib/firmware/sd8686* \
 "
+FILES_${PN}-sd8688 = " \
+  /lib/firmware/libertas/sd8688* \
+  /lib/firmware/mrvl/sd8688* \
+"
 FILES_${PN}-sd8787 = " \
   /lib/firmware/mrvl/sd8787_uapsta.bin \
 "
@@ -248,6 +313,7 @@
 "
 
 RDEPENDS_${PN}-sd8686 += "${PN}-marvell-license"
+RDEPENDS_${PN}-sd8688 += "${PN}-marvell-license"
 RDEPENDS_${PN}-sd8787 += "${PN}-marvell-license"
 RDEPENDS_${PN}-sd8797 += "${PN}-marvell-license"
 
@@ -311,6 +377,8 @@
 LICENSE_${PN}-bcm4329 = "Firmware-broadcom_bcm43xx"
 LICENSE_${PN}-bcm4330 = "Firmware-broadcom_bcm43xx"
 LICENSE_${PN}-bcm4334 = "Firmware-broadcom_bcm43xx"
+LICENSE_${PN}-bcm43340 = "Firmware-broadcom_bcm43xx"
+LICENSE_${PN}-bcm4339 = "Firmware-broadcom_bcm43xx"
 LICENSE_${PN}-bcm4354 = "Firmware-broadcom_bcm43xx"
 
 FILES_${PN}-broadcom-license = " \
@@ -325,6 +393,12 @@
 FILES_${PN}-bcm4334 = " \
   /lib/firmware/brcm/brcmfmac4334-sdio.bin \
 "
+FILES_${PN}-bcm43340 = " \
+  /lib/firmware/brcm/brcmfmac43340-sdio.bin \
+"
+FILES_${PN}-bcm4339 = " \
+  /lib/firmware/brcm/brcmfmac4339-sdio.bin \
+"
 FILES_${PN}-bcm4354 = " \
   /lib/firmware/brcm/brcmfmac4354-sdio.bin \
 "
@@ -333,16 +407,22 @@
 
 ALTERNATIVE_linux-firmware-bcm4334 = "brcmfmac-sdio.bin"
 ALTERNATIVE_TARGET_linux-firmware-bcm4334[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4334-sdio.bin"
+ALTERNATIVE_linux-firmware-bcm43340 = "brcmfmac-sdio.bin"
+ALTERNATIVE_TARGET_linux-firmware-bcm43340[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac43340-sdio.bin"
 ALTERNATIVE_linux_firmware-bcm4354 = "brcmfmac-sdio.bin"
 ALTERNATIVE_TARGET_linux-firmware-bcm4354[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4354-sdio.bin"
 ALTERNATIVE_linux-firmware-bcm4329 = "brcmfmac-sdio.bin"
 ALTERNATIVE_TARGET_linux-firmware-bcm4329[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4329-sdio.bin"
 ALTERNATIVE_linux-firmware-bcm4330 = "brcmfmac-sdio.bin"
 ALTERNATIVE_TARGET_linux-firmware-bcm4330[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4330-sdio.bin"
+ALTERNATIVE_linux-firmware-bcm4339 = "brcmfmac-sdio.bin"
+ALTERNATIVE_TARGET_linux-firmware-bcm4339[brcmfmac-sdio.bin] = "/lib/firmware/brcm/brcmfmac4339-sdio.bin"
 
 RDEPENDS_${PN}-bcm4329 += "${PN}-broadcom-license"
 RDEPENDS_${PN}-bcm4330 += "${PN}-broadcom-license"
 RDEPENDS_${PN}-bcm4334 += "${PN}-broadcom-license"
+RDEPENDS_${PN}-bcm43340 += "${PN}-broadcom-license"
+RDEPENDS_${PN}-bcm4339 += "${PN}-broadcom-license"
 RDEPENDS_${PN}-bcm4354 += "${PN}-broadcom-license"
 
 # For iwlwifi
@@ -357,11 +437,12 @@
 LICENSE_${PN}-iwlwifi-6000g2b-6 = "Firmware-iwlwifi_firmware"
 LICENSE_${PN}-iwlwifi-6050-4    = "Firmware-iwlwifi_firmware"
 LICENSE_${PN}-iwlwifi-6050-5    = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-7260-7    = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-7260-8    = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-7260-9    = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-7265-8    = "Firmware-iwlwifi_firmware"
-LICENSE_${PN}-iwlwifi-7265-9    = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-7260      = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-7265      = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-7265d     = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-8000c     = "Firmware-iwlwifi_firmware"
+LICENSE_${PN}-iwlwifi-8265      = "Firmware-iwlwifi_firmware"
+
 
 FILES_${PN}-iwlwifi-license = "/lib/firmware/LICENCE.iwlwifi_firmware"
 FILES_${PN}-iwlwifi-135-6 = "/lib/firmware/iwlwifi-135-6.ucode"
@@ -375,11 +456,11 @@
 FILES_${PN}-iwlwifi-6000g2b-6 = "/lib/firmware/iwlwifi-6000g2b-6.ucode"
 FILES_${PN}-iwlwifi-6050-4 = "/lib/firmware/iwlwifi-6050-4.ucode"
 FILES_${PN}-iwlwifi-6050-5 = "/lib/firmware/iwlwifi-6050-5.ucode"
-FILES_${PN}-iwlwifi-7260-7 = "/lib/firmware/iwlwifi-7260-7.ucode"
-FILES_${PN}-iwlwifi-7260-8 = "/lib/firmware/iwlwifi-7260-8.ucode"
-FILES_${PN}-iwlwifi-7260-9 = "/lib/firmware/iwlwifi-7260-9.ucode"
-FILES_${PN}-iwlwifi-7265-8 = "/lib/firmware/iwlwifi-7265-8.ucode"
-FILES_${PN}-iwlwifi-7265-9 = "/lib/firmware/iwlwifi-7265-9.ucode"
+FILES_${PN}-iwlwifi-7260   = "/lib/firmware/iwlwifi-7260-*.ucode"
+FILES_${PN}-iwlwifi-7265   = "/lib/firmware/iwlwifi-7265-*.ucode"
+FILES_${PN}-iwlwifi-7265d   = "/lib/firmware/iwlwifi-7265D-*.ucode"
+FILES_${PN}-iwlwifi-8000c   = "/lib/firmware/iwlwifi-8000C-*.ucode"
+FILES_${PN}-iwlwifi-8265   = "/lib/firmware/iwlwifi-8265-*.ucode"
 
 RDEPENDS_${PN}-iwlwifi-135-6     = "${PN}-iwlwifi-license"
 RDEPENDS_${PN}-iwlwifi-3160-7    = "${PN}-iwlwifi-license"
@@ -392,43 +473,78 @@
 RDEPENDS_${PN}-iwlwifi-6000g2b-6 = "${PN}-iwlwifi-license"
 RDEPENDS_${PN}-iwlwifi-6050-4    = "${PN}-iwlwifi-license"
 RDEPENDS_${PN}-iwlwifi-6050-5    = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7260-7    = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7260-8    = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7260-9    = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7265-8    = "${PN}-iwlwifi-license"
-RDEPENDS_${PN}-iwlwifi-7265-9    = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7260      = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7265      = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-7265d     = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-8000c     = "${PN}-iwlwifi-license"
+RDEPENDS_${PN}-iwlwifi-8265      = "${PN}-iwlwifi-license"
+
+# Handle package updating for the newly merged iwlwifi groupings
+RPROVIDES_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9"
+RREPLACES_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9"
+RCONFLICTS_${PN}-iwlwifi-7265 = "${PN}-iwlwifi-7265-8 ${PN}-iwlwifi-7265-9"
+
+RPROVIDES_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9"
+RREPLACES_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9"
+RCONFLICTS_${PN}-iwlwifi-7260 = "${PN}-iwlwifi-7260-7 ${PN}-iwlwifi-7260-8 ${PN}-iwlwifi-7260-9"
+
+LICENSE_${PN}-i915       = "Firmware-i915"
+FILES_${PN}-i915-license = "/lib/firmware/LICENSE.i915"
+FILES_${PN}-i915         = "/lib/firmware/i915"
+RDEPENDS_${PN}-i915      = "${PN}-i915-license"
+
+FILES_${PN}-adsp-sst-license      = "/lib/firmware/LICENCE.adsp_sst"
+LICENSE_${PN}-adsp-sst            = "Firmware-adsp_sst"
+FILES_${PN}-adsp-sst              = "/lib/firmware/intel/dsp_fw*"
+RDEPENDS_${PN}-adsp-sst           = "${PN}-adsp-sst-license"
 
 # For other firmwares
 # Maybe split out to separate packages when needed.
 LICENSE_${PN} = "\
     Firmware-Abilis \
     & Firmware-agere \
+    & Firmware-amdgpu \
     & Firmware-amd-ucode \
+    & Firmware-atmel \
     & Firmware-ca0132 \
+    & Firmware-cavium \
     & Firmware-chelsio_firmware \
     & Firmware-cw1200 \
     & Firmware-dib0700 \
+    & Firmware-e100 \
     & Firmware-ene_firmware \
     & Firmware-fw_sst_0f28 \
     & Firmware-go7007 \
+    & Firmware-hfi1_firmware \
     & Firmware-i2400m \
     & Firmware-ibt_firmware \
     & Firmware-it913x \
+    & Firmware-IntcSST2 \
+    & Firmware-kaweth \
+    & Firmware-moxa \
     & Firmware-mwl8335 \
     & Firmware-myri10ge_firmware \
+    & Firmware-nvidia \
     & Firmware-OLPC \
+    & Firmware-ath9k-htc \
     & Firmware-phanfw \
-    & Firmware-qat_dh895xcc_firmware \
+    & Firmware-qat \
+    & Firmware-qla1280 \
     & Firmware-qla2xxx \
     & Firmware-r8a779x_usb3 \
+    & Firmware-radeon \
     & Firmware-ralink_a_mediatek_company_firmware \
+    & Firmware-siano \
     & Firmware-tda7706-firmware \
+    & Firmware-ti-connectivity \
+    & Firmware-ti-keystone \
     & Firmware-ueagle-atm4-firmware \
     & Firmware-wl1251 \
     & Firmware-xc4000 \
     & Firmware-xc5000 \
     & Firmware-xc5000c \
 "
+
 FILES_${PN}-license += "/lib/firmware/LICEN*"
 FILES_${PN} += "/lib/firmware/*"
 RDEPENDS_${PN} += "${PN}-license"
diff --git a/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
index 566bc1e..2ba6ed5 100644
--- a/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -43,12 +43,15 @@
 
 inherit kernel-arch
 
-KORG_ARCHIVE_COMPRESSION ?= "bz2"
+KORG_ARCHIVE_COMPRESSION ?= "xz"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/kernel/v${HEADER_FETCH_VER}/linux-${PV}.tar.${KORG_ARCHIVE_COMPRESSION}"
 
 S = "${WORKDIR}/linux-${PV}"
 
+# For the kernel, we don't want the '-e MAKEFLAGS=' in EXTRA_OEMAKE.
+EXTRA_OEMAKE = ""
+
 do_configure() {
 	oe_runmake allnoconfig
 }
diff --git a/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
new file mode 100644
index 0000000..6ad4798
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch
@@ -0,0 +1,89 @@
+From 2872f5d8bcef84e62b15b37ba4ffeccfb6402dad Mon Sep 17 00:00:00 2001
+From: rofl0r <retnyg@gmx.net>
+Date: Wed, 22 Jan 2014 00:48:28 +0100
+Subject: [PATCH 1/3] libc-compat.h: fix some issues arising from in6.h
+
+namely redefinition of some structs provided by netinet/in.h.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Submitted
+
+ include/uapi/linux/libc-compat.h | 25 ++++++++-----------------
+ 1 file changed, 8 insertions(+), 17 deletions(-)
+
+Index: linux-4.4/include/uapi/linux/libc-compat.h
+===================================================================
+--- linux-4.4.orig/include/uapi/linux/libc-compat.h
++++ linux-4.4/include/uapi/linux/libc-compat.h
+@@ -48,13 +48,12 @@
+ #ifndef _UAPI_LIBC_COMPAT_H
+ #define _UAPI_LIBC_COMPAT_H
+ 
+-/* We have included glibc headers... */
+-#if defined(__GLIBC__)
++#ifndef __KERNEL__ /* we're used from userspace */
+ 
+-/* Coordinate with glibc netinet/in.h header. */
++/* Coordinate with libc netinet/in.h header. */
+ #if defined(_NETINET_IN_H)
+ 
+-/* GLIBC headers included first so don't define anything
++/* LIBC headers included first so don't define anything
+  * that would already be defined. */
+ #define __UAPI_DEF_IN_ADDR		0
+ #define __UAPI_DEF_IN_IPPROTO		0
+@@ -64,15 +63,7 @@
+ #define __UAPI_DEF_IN_CLASS		0
+ 
+ #define __UAPI_DEF_IN6_ADDR		0
+-/* The exception is the in6_addr macros which must be defined
+- * if the glibc code didn't define them. This guard matches
+- * the guard in glibc/inet/netinet/in.h which defines the
+- * additional in6_addr macros e.g. s6_addr16, and s6_addr32. */
+-#if defined(__USE_MISC) || defined (__USE_GNU)
+ #define __UAPI_DEF_IN6_ADDR_ALT		0
+-#else
+-#define __UAPI_DEF_IN6_ADDR_ALT		1
+-#endif
+ #define __UAPI_DEF_SOCKADDR_IN6		0
+ #define __UAPI_DEF_IPV6_MREQ		0
+ #define __UAPI_DEF_IPPROTO_V6		0
+@@ -80,10 +71,10 @@
+ #define __UAPI_DEF_IN6_PKTINFO		0
+ #define __UAPI_DEF_IP6_MTUINFO		0
+ 
+-#else
++#else /* defined(_NETINET_IN_H) */
+ 
+ /* Linux headers included first, and we must define everything
+- * we need. The expectation is that glibc will check the
++ * we need. The expectation is that libc will check the
+  * __UAPI_DEF_* defines and adjust appropriately. */
+ #define __UAPI_DEF_IN_ADDR		1
+ #define __UAPI_DEF_IN_IPPROTO		1
+@@ -93,7 +84,7 @@
+ #define __UAPI_DEF_IN_CLASS		1
+ 
+ #define __UAPI_DEF_IN6_ADDR		1
+-/* We unconditionally define the in6_addr macros and glibc must
++/* We unconditionally define the in6_addr macros and libc must
+  * coordinate. */
+ #define __UAPI_DEF_IN6_ADDR_ALT		1
+ #define __UAPI_DEF_SOCKADDR_IN6		1
+@@ -115,7 +106,7 @@
+ /* If we did not see any headers from any supported C libraries,
+  * or we are being included in the kernel, then define everything
+  * that we need. */
+-#else /* !defined(__GLIBC__) */
++#else /* __KERNEL__ */
+ 
+ /* Definitions for in.h */
+ #define __UAPI_DEF_IN_ADDR		1
+@@ -138,6 +129,6 @@
+ /* Definitions for xattr.h */
+ #define __UAPI_DEF_XATTR		1
+ 
+-#endif /* __GLIBC__ */
++#endif /* __KERNEL__ */
+ 
+ #endif /* _UAPI_LIBC_COMPAT_H */
diff --git a/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
new file mode 100644
index 0000000..c617093
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch
@@ -0,0 +1,59 @@
+From 75ba4a547282f91d653872a4bba5f5eae234ea6c Mon Sep 17 00:00:00 2001
+From: rofl0r <retnyg@gmx.net>
+Date: Wed, 22 Jan 2014 00:57:48 +0100
+Subject: [PATCH 2/3] libc-compat.h: prevent redefinition of struct ethhdr
+
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Submitted
+
+ include/uapi/linux/if_ether.h    | 4 +++-
+ include/uapi/linux/libc-compat.h | 6 ++++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h
+index aa63ed0..e94da57 100644
+--- a/include/uapi/linux/if_ether.h
++++ b/include/uapi/linux/if_ether.h
+@@ -22,6 +22,7 @@
+ #define _UAPI_LINUX_IF_ETHER_H
+ 
+ #include <linux/types.h>
++#include <linux/libc-compat.h>
+ 
+ /*
+  *	IEEE 802.3 Ethernet magic constants.  The frame sizes omit the preamble
+@@ -134,11 +135,12 @@
+  *	This is an Ethernet frame header.
+  */
+ 
++#if __UAPI_DEF_ETHHDR
+ struct ethhdr {
+ 	unsigned char	h_dest[ETH_ALEN];	/* destination eth addr	*/
+ 	unsigned char	h_source[ETH_ALEN];	/* source ether addr	*/
+ 	__be16		h_proto;		/* packet type ID field	*/
+ } __attribute__((packed));
+-
++#endif
+ 
+ #endif /* _UAPI_LINUX_IF_ETHER_H */
+diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
+index afe15c2..7d0c78a 100644
+--- a/include/uapi/linux/libc-compat.h
++++ b/include/uapi/linux/libc-compat.h
+@@ -50,6 +50,12 @@
+ 
+ #ifndef __KERNEL__ /* we're used from userspace */
+ 
++#ifdef _NETINET_IF_ETHER_H /* musl */
++#define __UAPI_DEF_ETHHDR 0
++#else /* glibc uses __NETINET_IF_ETHER_H, and includes the kernel header. */
++#define __UAPI_DEF_ETHHDR 1
++#endif
++
+ /* Coordinate with libc netinet/in.h header. */
+ #if defined(_NETINET_IN_H)
+ 
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
new file mode 100644
index 0000000..6d9e8d8
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch
@@ -0,0 +1,32 @@
+From 8e69b663d6ddef132041a1186f081fdd74d4a31d Mon Sep 17 00:00:00 2001
+From: rofl0r <retnyg@gmx.net>
+Date: Mon, 20 Jan 2014 21:31:34 +0100
+Subject: [PATCH 3/3] remove inclusion of sysinfo.h in kernel.h
+
+the declaration of struct sysinfo clashes with userspace.
+it's not quite clear why that header was included from kernel.h,
+as none of its functionality is needed.
+---
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Submitted
+
+ include/uapi/linux/kernel.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/include/uapi/linux/kernel.h b/include/uapi/linux/kernel.h
+index 321e399..e8ff821 100644
+--- a/include/uapi/linux/kernel.h
++++ b/include/uapi/linux/kernel.h
+@@ -1,7 +1,9 @@
+ #ifndef _UAPI_LINUX_KERNEL_H
+ #define _UAPI_LINUX_KERNEL_H
+ 
++#ifdef __GLIBC__
+ #include <linux/sysinfo.h>
++#endif
+ 
+ /*
+  * 'kernel.h' contains some often-used function prototypes etc
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.1.bb b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.1.bb
deleted file mode 100644
index d816e5e..0000000
--- a/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.1.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-KORG_ARCHIVE_COMPRESSION = "xz"
-
-require linux-libc-headers.inc
-
-SRC_URI[md5sum] = "fe9dc0f6729f36400ea81aa41d614c37"
-SRC_URI[sha256sum] = "caf51f085aac1e1cea4d00dbbf3093ead07b551fc07b31b2a989c05f8ea72d9f"
-
diff --git a/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.4.bb b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.4.bb
new file mode 100644
index 0000000..3763dc0
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.4.bb
@@ -0,0 +1,9 @@
+require linux-libc-headers.inc
+
+SRC_URI_append_libc-musl = "\
+    file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \
+    file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \
+    file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \
+   "
+SRC_URI[md5sum] = "9a78fa2eb6c68ca5a40ed5af08142599"
+SRC_URI[sha256sum] = "401d7c8fef594999a460d10c72c5a94e9c2e1022f16795ec51746b0d165418b2"
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc b/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc
index ee3a5e1..651a19e 100644
--- a/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc
+++ b/yocto-poky/meta/recipes-kernel/linux/linux-dtb.inc
@@ -5,75 +5,70 @@
     d.appendVar("PACKAGES", " kernel-devicetree")
 }
 
-do_compile_append() {
-	if test -n "${KERNEL_DEVICETREE}"; then
-		for DTB in ${KERNEL_DEVICETREE}; do
-			if echo ${DTB} | grep -q '/dts/'; then
-				bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
-				DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
-			fi
-			oe_runmake ${DTB}
-		done
+normalize_dtb () {
+	DTB="$1"
+	if echo ${DTB} | grep -q '/dts/'; then
+		bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
+		DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
 	fi
+	echo "${DTB}"
+}
+
+get_real_dtb_path_in_kernel () {
+	DTB="$1"
+	DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
+	if [ ! -e "${DTB_PATH}" ]; then
+		DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
+	fi
+	echo "${DTB_PATH}"
+}
+
+do_compile_append() {
+	for DTB in ${KERNEL_DEVICETREE}; do
+		DTB=`normalize_dtb "${DTB}"`
+		oe_runmake ${DTB}
+	done
 }
 
 do_install_append() {
-	if test -n "${KERNEL_DEVICETREE}"; then
-		for DTB in ${KERNEL_DEVICETREE}; do
-			if echo ${DTB} | grep -q '/dts/'; then
-				bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
-				DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
-			fi
-			DTB_BASE_NAME=`basename ${DTB} .dtb`
-			DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-			DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
-			if [ ! -e "${DTB_PATH}" ]; then
-				DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
-			fi
-			install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
-		done
-	fi
+	for DTB in ${KERNEL_DEVICETREE}; do
+		DTB=`normalize_dtb "${DTB}"`
+		DTB_BASE_NAME=`basename ${DTB} .dtb`
+		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+		DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
+		install -m 0644 ${DTB_PATH} ${D}/${KERNEL_IMAGEDEST}/devicetree-${DTB_SYMLINK_NAME}.dtb
+	done
 }
 
 do_deploy_append() {
-	if test -n "${KERNEL_DEVICETREE}"; then
-		for DTB in ${KERNEL_DEVICETREE}; do
-			if echo ${DTB} | grep -q '/dts/'; then
-				bbwarn "${DTB} contains the full path to the the dts file, but only the dtb name should be used."
-				DTB=`basename ${DTB} | sed 's,\.dts$,.dtb,g'`
-			fi
-			DTB_BASE_NAME=`basename ${DTB} .dtb`
-			DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-			DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-			DTB_PATH="${B}/arch/${ARCH}/boot/dts/${DTB}"
-			if [ ! -e "${DTB_PATH}" ]; then
-				DTB_PATH="${B}/arch/${ARCH}/boot/${DTB}"
-			fi
-			install -d ${DEPLOYDIR}
-			install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
-			cd ${DEPLOYDIR}
-			ln -sf ${DTB_NAME}.dtb ${DTB_SYMLINK_NAME}.dtb
-			cd -
-		done
-	fi
+	for DTB in ${KERNEL_DEVICETREE}; do
+		DTB=`normalize_dtb "${DTB}"`
+		DTB_BASE_NAME=`basename ${DTB} .dtb`
+		DTB_NAME=`echo ${KERNEL_IMAGE_BASE_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+		DTB_PATH=`get_real_dtb_path_in_kernel "${DTB}"`
+		install -d ${DEPLOYDIR}
+		install -m 0644 ${DTB_PATH} ${DEPLOYDIR}/${DTB_NAME}.dtb
+		ln -sf ${DTB_NAME}.dtb ${DEPLOYDIR}/${DTB_SYMLINK_NAME}.dtb
+	done
 }
 
 pkg_postinst_kernel-devicetree () {
 	cd /${KERNEL_IMAGEDEST}
-	for DTB_FILE in ${KERNEL_DEVICETREE}
+	for DTB in ${KERNEL_DEVICETREE}
 	do
-		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
+		DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
 		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-		update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+		update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.dtb ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
 	done
 }
 
 pkg_postrm_kernel-devicetree () {
 	cd /${KERNEL_IMAGEDEST}
-	for DTB_FILE in ${KERNEL_DEVICETREE}
+	for DTB in ${KERNEL_DEVICETREE}
 	do
-		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
+		DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
 		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-		update-alternatives --remove ${DTB_BASE_NAME}.dtb devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+		update-alternatives --remove ${DTB_BASE_NAME}.dtb /boot/devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
 	done
 }
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
index afe482a..3085263 100644
--- a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
+++ b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-dev.bb
@@ -36,7 +36,7 @@
 SRCREV_machine ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
 SRCREV_meta ?= '${@oe.utils.conditional("PREFERRED_PROVIDER_virtual/kernel", "linux-yocto-dev", "${AUTOREV}", "29594404d7fe73cd80eaa4ee8c43dcc53970c60e", d)}'
 
-LINUX_VERSION ?= "4.2-rc+"
+LINUX_VERSION ?= "4.6-rc+"
 LINUX_VERSION_EXTENSION ?= "-yoctodev-${LINUX_KERNEL_TYPE}"
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
deleted file mode 100644
index bfeabbe..0000000
--- a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-KBRANCH ?= "standard/preempt-rt/base"
-KBRANCH_qemuppc ?= "standard/preempt-rt/qemuppc"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-SRCREV_machine ?= "8281915527ba8d79e59906c02f28e7aa11424723"
-SRCREV_machine_qemuppc ?= "5e7d372ebc327f28656fc972fab55605eea8aec3"
-SRCREV_meta ?= "060fa80b7996250001ee90c50a4978c8fdb87fc4"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;branch=${KBRANCH};name=machine \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.14;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "3.14.36"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-LINUX_KERNEL_TYPE = "preempt-rt"
-
-COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
index b441bf6..a138957 100644
--- a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
+++ b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.1.bb
@@ -2,13 +2,13 @@
 
 require recipes-kernel/linux/linux-yocto.inc
 
-SRCREV_machine ?= "3188436876d5eaff8d48f82064367d4a65c3aa97"
-SRCREV_meta ?= "46bb64d605fd336d99fa05bab566b9553b40b4b4"
+SRCREV_machine ?= "28d8cfdbcb18a6eef202099cca66430fd3b6eae0"
+SRCREV_meta ?= "a4f88c3fad887e1c559d03ae1b531ca267137b69"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=${KMETA}"
 
-LINUX_VERSION ?= "4.1.15"
+LINUX_VERSION ?= "4.1.18"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
new file mode 100644
index 0000000..d81ca13
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-rt_4.4.bb
@@ -0,0 +1,27 @@
+KBRANCH ?= "standard/preempt-rt"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+SRCREV_machine ?= "2bc112a6ccd16800a4c45e47ccb3018a1042abdf"
+SRCREV_meta ?= "bcc65090840f51a6ac937297be5c22fe268d01ab"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.4.3"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+LINUX_KERNEL_TYPE = "preempt-rt"
+
+COMPATIBLE_MACHINE = "(qemux86|qemux86-64|qemuarm|qemuppc|qemumips)"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/taskstats/taskstats.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
deleted file mode 100644
index e13cb80..0000000
--- a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-KBRANCH ?= "standard/tiny/base"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "3.14.36"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "578602a722dbfb260801f3b37c6eafd2abb2340d"
-SRCREV_meta ?= "060fa80b7996250001ee90c50a4978c8fdb87fc4"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;branch=${KBRANCH};name=machine; \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.14;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "(qemux86)"
-
-# Functionality flags
-KERNEL_FEATURES = ""
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb
deleted file mode 100644
index a6a58a2..0000000
--- a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_3.19.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-KBRANCH ?= "standard/tiny/base"
-LINUX_KERNEL_TYPE = "tiny"
-KCONFIG_MODE = "--allnoconfig"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-LINUX_VERSION ?= "3.19.5"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-SRCREV_machine ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
-SRCREV_meta ?= "1016714868249d64fc16692fd7679672b1efa17b"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;branch=${KBRANCH};name=machine \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.19;destsuffix=${KMETA}"
-
-COMPATIBLE_MACHINE = "(qemux86)"
-
-# Functionality flags
-KERNEL_FEATURES = ""
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
index 4caa252..28c7213 100644
--- a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
+++ b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.1.bb
@@ -1,23 +1,23 @@
-KBRANCH ?= "standard/tiny/base"
+KBRANCH ?= "standard/tiny/common-pc"
 LINUX_KERNEL_TYPE = "tiny"
 KCONFIG_MODE = "--allnoconfig"
 
 require recipes-kernel/linux/linux-yocto.inc
 
-LINUX_VERSION ?= "4.1.15"
+LINUX_VERSION ?= "4.1.18"
 
 KMETA = "kernel-meta"
 KCONF_BSP_AUDIT_LEVEL = "2"
 
-SRCREV_machine ?= "788dfc9859321c09f1c58696bf8998f90ccb4f51"
-SRCREV_meta ?= "46bb64d605fd336d99fa05bab566b9553b40b4b4"
+SRCREV_machine ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
+SRCREV_meta ?= "a4f88c3fad887e1c559d03ae1b531ca267137b69"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;branch=${KBRANCH};name=machine \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=${KMETA}"
 
-COMPATIBLE_MACHINE = "(qemux86)"
+COMPATIBLE_MACHINE = "(qemux86$)"
 
 # Functionality flags
 KERNEL_FEATURES = ""
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
new file mode 100644
index 0000000..684e880
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/linux/linux-yocto-tiny_4.4.bb
@@ -0,0 +1,23 @@
+KBRANCH ?= "standard/tiny/common-pc"
+LINUX_KERNEL_TYPE = "tiny"
+KCONFIG_MODE = "--allnoconfig"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+LINUX_VERSION ?= "4.4.3"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+SRCREV_machine ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
+SRCREV_meta ?= "bcc65090840f51a6ac937297be5c22fe268d01ab"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;branch=${KBRANCH};name=machine \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
+
+COMPATIBLE_MACHINE = "(qemux86$)"
+
+# Functionality flags
+KERNEL_FEATURES = ""
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc b/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
index 81ffa24..6b161fc 100644
--- a/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
+++ b/yocto-poky/meta/recipes-kernel/linux/linux-yocto.inc
@@ -1,9 +1,11 @@
-DESCRIPTION = "Yocto Kernel"
+SUMMARY = "Linux kernel"
 SECTION = "kernel"
 LICENSE = "GPLv2"
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
 
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+\.\d+(\.\d+)*)"
+
 INC_PR = "r4"
 
 DEPENDS += "xz-native bc-native"
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto_3.14.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto_3.14.bb
deleted file mode 100644
index db93d23..0000000
--- a/yocto-poky/meta/recipes-kernel/linux/linux-yocto_3.14.bb
+++ /dev/null
@@ -1,44 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm  ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc  ?= "standard/qemuppc"
-KBRANCH_qemux86  ?= "standard/common-pc/base"
-KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "4817747912b5c50ce5c31ef25658340ca615e1b4"
-SRCREV_machine_qemuarm64 ?= "578602a722dbfb260801f3b37c6eafd2abb2340d"
-SRCREV_machine_qemumips ?= "6ed76ec26b120f65f8547c8612b7334bd2745ec9"
-SRCREV_machine_qemuppc ?= "a86ade84b2e142c0fd7536d96477107b6d07db5c"
-SRCREV_machine_qemux86 ?= "d9bf859dfae6f88b88b157119c20ae4d5e51420a"
-SRCREV_machine_qemux86-64 ?= "93b2b800d85c1565af7d96f3776dc38c85ae1902"
-SRCREV_machine_qemumips64 ?= "a63d40b860a6d255005a541894d53729090b40ea"
-SRCREV_machine ?= "578602a722dbfb260801f3b37c6eafd2abb2340d"
-SRCREV_meta ?= "060fa80b7996250001ee90c50a4978c8fdb87fc4"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.14.git;branch=${KBRANCH};name=machine; \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.14;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "3.14.36"
-LINUX_VERSION_qemux86 ?= "3.14.39"
-LINUX_VERSION_qemux86-64 ?= "3.14.39"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto_3.19.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto_3.19.bb
deleted file mode 100644
index baa575b..0000000
--- a/yocto-poky/meta/recipes-kernel/linux/linux-yocto_3.19.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-KBRANCH ?= "standard/base"
-
-require recipes-kernel/linux/linux-yocto.inc
-
-# board specific branches
-KBRANCH_qemuarm  ?= "standard/arm-versatile-926ejs"
-KBRANCH_qemuarm64 ?= "standard/qemuarm64"
-KBRANCH_qemumips ?= "standard/mti-malta32"
-KBRANCH_qemuppc  ?= "standard/qemuppc"
-KBRANCH_qemux86  ?= "standard/common-pc"
-KBRANCH_qemux86-64 ?= "standard/common-pc-64/base"
-KBRANCH_qemumips64 ?= "standard/mti-malta64"
-
-SRCREV_machine_qemuarm ?= "857048f10bfe7089ca6007e72431f1c098b07115"
-SRCREV_machine_qemuarm64 ?= "e152349de59b43b2a75f2c332b44171df461d5a0"
-SRCREV_machine_qemumips ?= "cedbbc7b5e72df2e820bb9e7885f12132c5e2fff"
-SRCREV_machine_qemuppc ?= "23a83386e10986a63e6cef712a045445499d002b"
-SRCREV_machine_qemux86 ?= "1583bf79b946cd5581d84d8c369b819a5ecb94b4"
-SRCREV_machine_qemux86-64 ?= "1583bf79b946cd5581d84d8c369b819a5ecb94b4"
-SRCREV_machine_qemumips64 ?= "3eb70cea3532e22ab1b6da9864446621229e6616"
-SRCREV_machine ?= "151571a39785218a57c3ae3355cd63694890cc8d"
-SRCREV_meta ?= "1016714868249d64fc16692fd7679672b1efa17b"
-
-SRC_URI = "git://git.yoctoproject.org/linux-yocto-3.19.git;name=machine;branch=${KBRANCH}; \
-           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-3.19;destsuffix=${KMETA}"
-
-LINUX_VERSION ?= "3.19.5"
-
-PV = "${LINUX_VERSION}+git${SRCPV}"
-
-KMETA = "kernel-meta"
-KCONF_BSP_AUDIT_LEVEL = "2"
-
-COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
-
-# Functionality flags
-KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
-KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
-KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
-KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
-KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.1.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.1.bb
index 1bb7336..aecb517 100644
--- a/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.1.bb
+++ b/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.1.bb
@@ -11,22 +11,20 @@
 KBRANCH_qemux86-64 ?= "standard/base"
 KBRANCH_qemumips64 ?= "standard/mti-malta64"
 
-SRCREV_machine_qemuarm ?= "cf760f381c5e1e58d0c3372d66f4dfdc33f0984c"
-SRCREV_machine_qemuarm64 ?= "788dfc9859321c09f1c58696bf8998f90ccb4f51"
-SRCREV_machine_qemumips ?= "aa46295ab927bd5c960930c377855dbc4e57b195"
-SRCREV_machine_qemuppc ?= "788dfc9859321c09f1c58696bf8998f90ccb4f51"
-SRCREV_machine_qemux86 ?= "2e0ac7b6c4e3ada23a84756287e9b7051ace939a"
-SRCREV_machine_qemux86-64 ?= "2e0ac7b6c4e3ada23a84756287e9b7051ace939a"
-SRCREV_machine_qemumips64 ?= "949c0f2cbb4cf902478d009a7d38b6e4fb29e7c4"
-SRCREV_machine ?= "788dfc9859321c09f1c58696bf8998f90ccb4f51"
-SRCREV_meta ?= "46bb64d605fd336d99fa05bab566b9553b40b4b4"
+SRCREV_machine_qemuarm ?= "232e2d88841c7e20857350275d80f5585ed93734"
+SRCREV_machine_qemuarm64 ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
+SRCREV_machine_qemumips ?= "7d3690c0762f11e038f14310a50ca1cdc813cc22"
+SRCREV_machine_qemuppc ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
+SRCREV_machine_qemux86 ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
+SRCREV_machine_qemux86-64 ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
+SRCREV_machine_qemumips64 ?= "b71e4cd7d45f03048ad31e2a36dfe5a43f021b51"
+SRCREV_machine ?= "91f62d4a0a31919d9b2ccdaf881130f99b61fc5e"
+SRCREV_meta ?= "a4f88c3fad887e1c559d03ae1b531ca267137b69"
 
 SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.1.git;name=machine;branch=${KBRANCH}; \
            git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.1;destsuffix=${KMETA}"
 
-LINUX_VERSION ?= "4.1.15"
-LINUX_VERSION_qemux86 ?= "4.1.17"
-LINUX_VERSION_qemux86-64 ?= "4.1.17"
+LINUX_VERSION ?= "4.1.18"
 
 PV = "${LINUX_VERSION}+git${SRCPV}"
 
diff --git a/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb b/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb
new file mode 100644
index 0000000..3c5ee1b
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/linux/linux-yocto_4.4.bb
@@ -0,0 +1,42 @@
+KBRANCH ?= "standard/base"
+
+require recipes-kernel/linux/linux-yocto.inc
+
+# board specific branches
+KBRANCH_qemuarm  ?= "standard/arm-versatile-926ejs"
+KBRANCH_qemuarm64 ?= "standard/qemuarm64"
+KBRANCH_qemumips ?= "standard/mti-malta32"
+KBRANCH_qemuppc  ?= "standard/qemuppc"
+KBRANCH_qemux86  ?= "standard/base"
+KBRANCH_qemux86-64 ?= "standard/base"
+KBRANCH_qemumips64 ?= "standard/mti-malta64"
+
+SRCREV_machine_qemuarm ?= "ec9167bcb0ccd4897177c5e235af68b5890aa326"
+SRCREV_machine_qemuarm64 ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
+SRCREV_machine_qemumips ?= "900f98d3ab6498bc7f4ff6b7a489db3bca4e6417"
+SRCREV_machine_qemuppc ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
+SRCREV_machine_qemux86 ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
+SRCREV_machine_qemux86-64 ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
+SRCREV_machine_qemumips64 ?= "4b08dfb1fb3bc7659e8f3e13665597d9a9f0816d"
+SRCREV_machine ?= "1a72cec834de2c80b5563f8afbeea7664fd5ee05"
+SRCREV_meta ?= "bcc65090840f51a6ac937297be5c22fe268d01ab"
+
+SRC_URI = "git://git.yoctoproject.org/linux-yocto-4.4.git;name=machine;branch=${KBRANCH}; \
+           git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.4;destsuffix=${KMETA}"
+
+LINUX_VERSION ?= "4.4.3"
+
+PV = "${LINUX_VERSION}+git${SRCPV}"
+
+KMETA = "kernel-meta"
+KCONF_BSP_AUDIT_LEVEL = "2"
+
+COMPATIBLE_MACHINE = "qemuarm|qemuarm64|qemux86|qemuppc|qemumips|qemumips64|qemux86-64"
+
+# Functionality flags
+KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc"
+KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}"
+KERNEL_FEATURES_append_qemuall=" cfg/virtio.scc"
+KERNEL_FEATURES_append_qemux86=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc cfg/paravirt_kvm.scc"
+KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}"
diff --git a/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch b/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch
new file mode 100644
index 0000000..eb16cd1
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/lttng/babeltrace/0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch
@@ -0,0 +1,29 @@
+From 8331b87845cafdda40e59a682f2ca8120ed0c472 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 08:17:40 +0000
+Subject: [PATCH] lttng-live: Include sys/param.h for MAXNAMLEN defintion
+
+exposed on musl based systems
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: pending
+
+ formats/lttng-live/lttng-live.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/formats/lttng-live/lttng-live.h b/formats/lttng-live/lttng-live.h
+index 4ab641d..808ed2b 100644
+--- a/formats/lttng-live/lttng-live.h
++++ b/formats/lttng-live/lttng-live.h
+@@ -25,6 +25,7 @@
+  */
+ 
+ #include <stdint.h>
++#include <sys/param.h>
+ #include "lttng-viewer-abi.h"
+ 
+ #define LTTNG_DEFAULT_NETWORK_VIEWER_PORT	5344
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb b/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
deleted file mode 100644
index 536be41..0000000
--- a/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.2.4.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "Babeltrace - Trace Format Babel Tower"
-DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
-HOMEPAGE = "http://www.efficios.com/babeltrace/"
-BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
-
-LICENSE = "MIT & GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
-
-inherit autotools pkgconfig
-
-DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
-
-SRCREV = "90395824efc007de88787a6b8e400a07c980be1c"
-PV = "1.2.4+git${SRCPV}"
-
-SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.2 \
-           file://0001-Fix-invalid-pointer-free-with-trace-collection.patch \
-"
-
-S = "${WORKDIR}/git"
-
-do_configure_prepend () {
-	( cd ${S}; ${S}/bootstrap )
-}
diff --git a/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.3.1.bb b/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.3.1.bb
new file mode 100644
index 0000000..1766026
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/lttng/babeltrace_1.3.1.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Babeltrace - Trace Format Babel Tower"
+DESCRIPTION = "Babeltrace provides trace read and write libraries in host side, as well as a trace converter, which used to convert LTTng 2.0 traces into human-readable log."
+HOMEPAGE = "http://www.efficios.com/babeltrace/"
+BUGTRACKER = "https://bugs.lttng.org/projects/babeltrace"
+
+LICENSE = "MIT & GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=76ba15dd76a248e1dd526bca0e2125fa"
+
+DEPENDS = "glib-2.0 util-linux popt bison-native flex-native"
+
+inherit autotools pkgconfig
+
+SRCREV = "6e2b9096c77138593097335b9b27202d98918089"
+
+SRC_URI = "git://git.efficios.com/babeltrace.git;branch=stable-1.3 \
+           file://0001-Fix-invalid-pointer-free-with-trace-collection.patch \
+           file://0001-lttng-live-Include-sys-param.h-for-MAXNAMLEN-definti.patch \
+"
+
+S = "${WORKDIR}/git"
+
+do_configure_prepend () {
+	( cd ${S}; ${S}/bootstrap )
+}
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb b/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb
index 54544fe..2eb1a51 100644
--- a/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb
+++ b/yocto-poky/meta/recipes-kernel/lttng/lttng-modules_git.bb
@@ -2,18 +2,18 @@
 SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
 DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
 LICENSE = "LGPLv2.1 & GPLv2 & MIT"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=1412caf5a1aa90d6a48588a4794c0eac \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=362844633a08753bd96ab322a6c7f9f6 \
                     file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \
                     file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad"
 
 inherit module
 
-SRCREV = "7a88f8b50696dd71e80c08661159caf8e119bf51"
-PV = "2.6.2+git${SRCPV}"
+SRCREV = "45e0ebd91f995cc73c2b0d5c60cf9d12e8c838bf"
+PV = "2.7.1+git${SRCPV}"
 
-COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|arm).*-linux'
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux'
 
-SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.6"
+SRC_URI = "git://git.lttng.org/lttng-modules.git;branch=stable-2.7"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-sessiond-disable-match-app-event-by-name.patch b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-sessiond-disable-match-app-event-by-name.patch
deleted file mode 100644
index ac1f34b..0000000
--- a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/0001-Fix-sessiond-disable-match-app-event-by-name.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 700c5a9d4dc7b552926b8ddcbba91cc13312aba0 Mon Sep 17 00:00:00 2001
-From: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
-Date: Wed, 9 Sep 2015 17:08:20 -0400
-Subject: [PATCH] Fix: sessiond: disable: match app event by name
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The use of a simple lookup and match on event name is insufficient
-to identify the corresponding ust app event.
-
-Fixes #914
-
-Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
-Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
-
-Upstream-Status: Backport
-
-Signed-off-by: Li Zhou <li.zhou@windriver.com>
----
- src/bin/lttng-sessiond/ust-app.c |   10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c
-index 4066b06..53a6f93 100644
---- a/src/bin/lttng-sessiond/ust-app.c
-+++ b/src/bin/lttng-sessiond/ust-app.c
-@@ -3873,7 +3873,7 @@ int ust_app_disable_event_glb(struct ltt_ust_session *usess,
- {
- 	int ret = 0;
- 	struct lttng_ht_iter iter, uiter;
--	struct lttng_ht_node_str *ua_chan_node, *ua_event_node;
-+	struct lttng_ht_node_str *ua_chan_node;
- 	struct ust_app *app;
- 	struct ust_app_session *ua_sess;
- 	struct ust_app_channel *ua_chan;
-@@ -3910,14 +3910,14 @@ int ust_app_disable_event_glb(struct ltt_ust_session *usess,
- 		}
- 		ua_chan = caa_container_of(ua_chan_node, struct ust_app_channel, node);
- 
--		lttng_ht_lookup(ua_chan->events, (void *)uevent->attr.name, &uiter);
--		ua_event_node = lttng_ht_iter_get_node_str(&uiter);
--		if (ua_event_node == NULL) {
-+		ua_event = find_ust_app_event(ua_chan->events, uevent->attr.name,
-+				uevent->filter, uevent->attr.loglevel,
-+				uevent->exclusion);
-+		if (ua_event == NULL) {
- 			DBG2("Event %s not found in channel %s for app pid %d."
- 					"Skipping", uevent->attr.name, uchan->name, app->pid);
- 			continue;
- 		}
--		ua_event = caa_container_of(ua_event_node, struct ust_app_event, node);
- 
- 		ret = disable_ust_app_event(ua_sess, ua_event, app);
- 		if (ret < 0) {
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch
new file mode 100644
index 0000000..d05c04c
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/Revert-Build-look-for-python-3.0-when-building-pytho.patch
@@ -0,0 +1,30 @@
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Fri, 4 Dec 2015 16:11:41 +0000
+Subject: [PATCH] Revert "Build: look for python >= 3.0 when building python bindings"
+Organization: O.S. Systems Software LTDA.
+
+This reverts commit 227703a2ceada3c104edd56756d48455ca4c271a.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 4dee4b4..6608bcd 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -339,7 +339,7 @@ AM_CONDITIONAL([PYTHON_BINDING], [test "x${enable_python_binding:-yes}" = xyes])
+ 
+ if test "x${enable_python_binding:-yes}" = xyes; then
+   AX_PKG_SWIG($swig_version, [], [ AC_MSG_ERROR([SWIG $swig_version or newer is needed]) ])
+-  AM_PATH_PYTHON([3.0])
++  AM_PATH_PYTHON
+ 
+   AC_ARG_VAR([PYTHON_INCLUDE], [Include flags for python, bypassing python-config])
+   AC_ARG_VAR([PYTHON_CONFIG], [Path to python-config])
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/extern-decls.patch b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/extern-decls.patch
deleted file mode 100644
index 199ef57..0000000
--- a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/extern-decls.patch
+++ /dev/null
@@ -1,442 +0,0 @@
-This make the declarations to be extern so they dont end up
-in duplicates in data.rel.ro sections
-
-avoid errors like
-
-| ../../../src/common/.libs/libcommon.a(mi-lttng.o):(.data.rel.ro.local+0x0): multiple definition of `mi_lttng_element_snapshots'
-| commands/enable_events.o:(.bss+0x48): first defined here
-| collect2: error: ld returned 1 exit status
-| Makefile:502: recipe for target 'lttng' failed
-| make[3]: *** [lttng] Error 1
-
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Index: git/src/common/config/config-session-abi.h
-===================================================================
---- git.orig/src/common/config/config-session-abi.h
-+++ git/src/common/config/config-session-abi.h
-@@ -18,95 +18,95 @@
- #ifndef CONFIG_SESSION_INTERNAL_H
- #define CONFIG_SESSION_INTERNAL_H
- 
--const char * const config_element_channel;
--const char * const config_element_channels;
--const char * const config_element_domain;
--const char * const config_element_domains;
--const char * const config_element_event;
--const char * const config_element_events;
--const char * const config_element_context;
--const char * const config_element_contexts;
--const char * const config_element_attributes;
--const char * const config_element_exclusion;
--const char * const config_element_exclusions;
--const char * const config_element_function_attributes;
--const char * const config_element_probe_attributes;
--const char * const config_element_symbol_name;
--const char * const config_element_address;
--const char * const config_element_offset;
--const char * const config_element_name;
--const char * const config_element_enabled;
--const char * const config_element_overwrite_mode;
--const char * const config_element_subbuf_size;
--const char * const config_element_num_subbuf;
--const char * const config_element_switch_timer_interval;
--const char * const config_element_read_timer_interval;
--const char * const config_element_output;
--const char * const config_element_output_type;
--const char * const config_element_tracefile_size;
--const char * const config_element_tracefile_count;
--const char * const config_element_live_timer_interval;
--const char * const config_element_type;
--const char * const config_element_buffer_type;
--const char * const config_element_session;
--const char * const config_element_sessions;
--const char * const config_element_perf;
--const char * const config_element_config;
--const char * const config_element_started;
--const char * const config_element_snapshot_mode;
--const char * const config_element_loglevel;
--const char * const config_element_loglevel_type;
--const char * const config_element_filter;
--const char * const config_element_snapshot_outputs;
--const char * const config_element_consumer_output;
--const char * const config_element_destination;
--const char * const config_element_path;
--const char * const config_element_net_output;
--const char * const config_element_control_uri;
--const char * const config_element_data_uri;
--const char * const config_element_max_size;
--
--const char * const config_domain_type_kernel;
--const char * const config_domain_type_ust;
--const char * const config_domain_type_jul;
--const char * const config_domain_type_log4j;
--
--const char * const config_buffer_type_per_pid;
--const char * const config_buffer_type_per_uid;
--const char * const config_buffer_type_global;
--
--const char * const config_overwrite_mode_discard;
--const char * const config_overwrite_mode_overwrite;
--
--const char * const config_output_type_splice;
--const char * const config_output_type_mmap;
--
--const char * const config_loglevel_type_all;
--const char * const config_loglevel_type_range;
--const char * const config_loglevel_type_single;
--
--const char * const config_event_type_all;
--const char * const config_event_type_tracepoint;
--const char * const config_event_type_probe;
--const char * const config_event_type_function;
--const char * const config_event_type_function_entry;
--const char * const config_event_type_noop;
--const char * const config_event_type_syscall;
--const char * const config_event_type_kprobe;
--const char * const config_event_type_kretprobe;
--
--const char * const config_event_context_pid;
--const char * const config_event_context_procname;
--const char * const config_event_context_prio;
--const char * const config_event_context_nice;
--const char * const config_event_context_vpid;
--const char * const config_event_context_tid;
--const char * const config_event_context_vtid;
--const char * const config_event_context_ppid;
--const char * const config_event_context_vppid;
--const char * const config_event_context_pthread_id;
--const char * const config_event_context_hostname;
--const char * const config_event_context_ip;
--const char * const config_event_context_perf_thread_counter;
-+extern const char * const config_element_channel;
-+extern const char * const config_element_channels;
-+extern const char * const config_element_domain;
-+extern const char * const config_element_domains;
-+extern const char * const config_element_event;
-+extern const char * const config_element_events;
-+extern const char * const config_element_context;
-+extern const char * const config_element_contexts;
-+extern const char * const config_element_attributes;
-+extern const char * const config_element_exclusion;
-+extern const char * const config_element_exclusions;
-+extern const char * const config_element_function_attributes;
-+extern const char * const config_element_probe_attributes;
-+extern const char * const config_element_symbol_name;
-+extern const char * const config_element_address;
-+extern const char * const config_element_offset;
-+extern const char * const config_element_name;
-+extern const char * const config_element_enabled;
-+extern const char * const config_element_overwrite_mode;
-+extern const char * const config_element_subbuf_size;
-+extern const char * const config_element_num_subbuf;
-+extern const char * const config_element_switch_timer_interval;
-+extern const char * const config_element_read_timer_interval;
-+extern const char * const config_element_output;
-+extern const char * const config_element_output_type;
-+extern const char * const config_element_tracefile_size;
-+extern const char * const config_element_tracefile_count;
-+extern const char * const config_element_live_timer_interval;
-+extern const char * const config_element_type;
-+extern const char * const config_element_buffer_type;
-+extern const char * const config_element_session;
-+extern const char * const config_element_sessions;
-+extern const char * const config_element_perf;
-+extern const char * const config_element_config;
-+extern const char * const config_element_started;
-+extern const char * const config_element_snapshot_mode;
-+extern const char * const config_element_loglevel;
-+extern const char * const config_element_loglevel_type;
-+extern const char * const config_element_filter;
-+extern const char * const config_element_snapshot_outputs;
-+extern const char * const config_element_consumer_output;
-+extern const char * const config_element_destination;
-+extern const char * const config_element_path;
-+extern const char * const config_element_net_output;
-+extern const char * const config_element_control_uri;
-+extern const char * const config_element_data_uri;
-+extern const char * const config_element_max_size;
-+
-+extern const char * const config_domain_type_kernel;
-+extern const char * const config_domain_type_ust;
-+extern const char * const config_domain_type_jul;
-+extern const char * const config_domain_type_log4j;
-+
-+extern const char * const config_buffer_type_per_pid;
-+extern const char * const config_buffer_type_per_uid;
-+extern const char * const config_buffer_type_global;
-+
-+extern const char * const config_overwrite_mode_discard;
-+extern const char * const config_overwrite_mode_overwrite;
-+
-+extern const char * const config_output_type_splice;
-+extern const char * const config_output_type_mmap;
-+
-+extern const char * const config_loglevel_type_all;
-+extern const char * const config_loglevel_type_range;
-+extern const char * const config_loglevel_type_single;
-+
-+extern const char * const config_event_type_all;
-+extern const char * const config_event_type_tracepoint;
-+extern const char * const config_event_type_probe;
-+extern const char * const config_event_type_function;
-+extern const char * const config_event_type_function_entry;
-+extern const char * const config_event_type_noop;
-+extern const char * const config_event_type_syscall;
-+extern const char * const config_event_type_kprobe;
-+extern const char * const config_event_type_kretprobe;
-+
-+extern const char * const config_event_context_pid;
-+extern const char * const config_event_context_procname;
-+extern const char * const config_event_context_prio;
-+extern const char * const config_event_context_nice;
-+extern const char * const config_event_context_vpid;
-+extern const char * const config_event_context_tid;
-+extern const char * const config_event_context_vtid;
-+extern const char * const config_event_context_ppid;
-+extern const char * const config_event_context_vppid;
-+extern const char * const config_event_context_pthread_id;
-+extern const char * const config_event_context_hostname;
-+extern const char * const config_event_context_ip;
-+extern const char * const config_event_context_perf_thread_counter;
- 
- #endif /* CONFIG_SESSION_INTERNAL_H */
-Index: git/src/common/mi-lttng.h
-===================================================================
---- git.orig/src/common/mi-lttng.h
-+++ git/src/common/mi-lttng.h
-@@ -49,133 +49,133 @@ struct mi_lttng_version {
- };
- 
- /* Strings related to command */
--const char * const mi_lttng_element_command;
--const char * const mi_lttng_element_command_action;
--const char * const mi_lttng_element_command_add_context;
--const char * const mi_lttng_element_command_calibrate;
--const char * const mi_lttng_element_command_create;
--const char * const mi_lttng_element_command_destroy;
--const char * const mi_lttng_element_command_disable_channel;
--const char * const mi_lttng_element_command_disable_event;
--const char * const mi_lttng_element_command_enable_channels;
--const char * const mi_lttng_element_command_enable_event;
--const char * const mi_lttng_element_command_list;
--const char * const mi_lttng_element_command_load;
--const char * const mi_lttng_element_command_name;
--const char * const mi_lttng_element_command_output;
--const char * const mi_lttng_element_command_save;
--const char * const mi_lttng_element_command_set_session;
--const char * const mi_lttng_element_command_snapshot;
--const char * const mi_lttng_element_command_snapshot_add;
--const char * const mi_lttng_element_command_snapshot_del;
--const char * const mi_lttng_element_command_snapshot_list;
--const char * const mi_lttng_element_command_snapshot_record;
--const char * const mi_lttng_element_command_start;
--const char * const mi_lttng_element_command_stop;
--const char * const mi_lttng_element_command_success;
--const char * const mi_lttng_element_command_version;
-+extern const char * const mi_lttng_element_command;
-+extern const char * const mi_lttng_element_command_action;
-+extern const char * const mi_lttng_element_command_add_context;
-+extern const char * const mi_lttng_element_command_calibrate;
-+extern const char * const mi_lttng_element_command_create;
-+extern const char * const mi_lttng_element_command_destroy;
-+extern const char * const mi_lttng_element_command_disable_channel;
-+extern const char * const mi_lttng_element_command_disable_event;
-+extern const char * const mi_lttng_element_command_enable_channels;
-+extern const char * const mi_lttng_element_command_enable_event;
-+extern const char * const mi_lttng_element_command_list;
-+extern const char * const mi_lttng_element_command_load;
-+extern const char * const mi_lttng_element_command_name;
-+extern const char * const mi_lttng_element_command_output;
-+extern const char * const mi_lttng_element_command_save;
-+extern const char * const mi_lttng_element_command_set_session;
-+extern const char * const mi_lttng_element_command_snapshot;
-+extern const char * const mi_lttng_element_command_snapshot_add;
-+extern const char * const mi_lttng_element_command_snapshot_del;
-+extern const char * const mi_lttng_element_command_snapshot_list;
-+extern const char * const mi_lttng_element_command_snapshot_record;
-+extern const char * const mi_lttng_element_command_start;
-+extern const char * const mi_lttng_element_command_stop;
-+extern const char * const mi_lttng_element_command_success;
-+extern const char * const mi_lttng_element_command_version;
- 
- /* Strings related to version command */
--const char * const mi_lttng_element_version;
--const char * const mi_lttng_element_version_commit;
--const char * const mi_lttng_element_version_description;
--const char * const mi_lttng_element_version_license;
--const char * const mi_lttng_element_version_major;
--const char * const mi_lttng_element_version_minor;
--const char * const mi_lttng_element_version_patch_level;
--const char * const mi_lttng_element_version_str;
--const char * const mi_lttng_element_version_web;
-+extern const char * const mi_lttng_element_version;
-+extern const char * const mi_lttng_element_version_commit;
-+extern const char * const mi_lttng_element_version_description;
-+extern const char * const mi_lttng_element_version_license;
-+extern const char * const mi_lttng_element_version_major;
-+extern const char * const mi_lttng_element_version_minor;
-+extern const char * const mi_lttng_element_version_patch_level;
-+extern const char * const mi_lttng_element_version_str;
-+extern const char * const mi_lttng_element_version_web;
- 
- /* String related to a lttng_event_field */
--const char * const mi_lttng_element_event_field;
--const char * const mi_lttng_element_event_fields;
-+extern const char * const mi_lttng_element_event_field;
-+extern const char * const mi_lttng_element_event_fields;
- 
- /* String related to lttng_event_context */
--const char * const mi_lttng_context_type_perf_counter;
--const char * const mi_lttng_context_type_perf_cpu_counter;
--const char * const mi_lttng_context_type_perf_thread_counter;
-+extern const char * const mi_lttng_context_type_perf_counter;
-+extern const char * const mi_lttng_context_type_perf_cpu_counter;
-+extern const char * const mi_lttng_context_type_perf_thread_counter;
- 
- /* String related to lttng_event_perf_counter_ctx */
--const char * const mi_lttng_element_perf_counter_context;
-+extern const char * const mi_lttng_element_perf_counter_context;
- 
- /* Strings related to pid */
--const char * const mi_lttng_element_pids;
--const char * const mi_lttng_element_pid;
--const char * const mi_lttng_element_pid_id;
-+extern const char * const mi_lttng_element_pids;
-+extern const char * const mi_lttng_element_pid;
-+extern const char * const mi_lttng_element_pid_id;
- 
- /* Strings related to save command */
--const char * const mi_lttng_element_save;
-+extern const char * const mi_lttng_element_save;
- 
- /* Strings related to load command */
--const char * const mi_lttng_element_load;
-+extern const char * const mi_lttng_element_load;
- 
- /* General element of mi_lttng */
--const char * const mi_lttng_element_empty;
--const char * const mi_lttng_element_id;
--const char * const mi_lttng_element_nowrite;
--const char * const mi_lttng_element_success;
--const char * const mi_lttng_element_type_enum;
--const char * const mi_lttng_element_type_float;
--const char * const mi_lttng_element_type_integer;
--const char * const mi_lttng_element_type_other;
--const char * const mi_lttng_element_type_string;
-+extern const char * const mi_lttng_element_empty;
-+extern const char * const mi_lttng_element_id;
-+extern const char * const mi_lttng_element_nowrite;
-+extern const char * const mi_lttng_element_success;
-+extern const char * const mi_lttng_element_type_enum;
-+extern const char * const mi_lttng_element_type_float;
-+extern const char * const mi_lttng_element_type_integer;
-+extern const char * const mi_lttng_element_type_other;
-+extern const char * const mi_lttng_element_type_string;
- 
- /* String related to loglevel */
--const char * const mi_lttng_loglevel_str_alert;
--const char * const mi_lttng_loglevel_str_crit;
--const char * const mi_lttng_loglevel_str_debug;
--const char * const mi_lttng_loglevel_str_debug_function;
--const char * const mi_lttng_loglevel_str_debug_line;
--const char * const mi_lttng_loglevel_str_debug_module;
--const char * const mi_lttng_loglevel_str_debug_process;
--const char * const mi_lttng_loglevel_str_debug_program;
--const char * const mi_lttng_loglevel_str_debug_system;
--const char * const mi_lttng_loglevel_str_debug_unit;
--const char * const mi_lttng_loglevel_str_emerg;
--const char * const mi_lttng_loglevel_str_err;
--const char * const mi_lttng_loglevel_str_info;
--const char * const mi_lttng_loglevel_str_notice;
--const char * const mi_lttng_loglevel_str_unknown;
--const char * const mi_lttng_loglevel_str_warning;
-+extern const char * const mi_lttng_loglevel_str_alert;
-+extern const char * const mi_lttng_loglevel_str_crit;
-+extern const char * const mi_lttng_loglevel_str_debug;
-+extern const char * const mi_lttng_loglevel_str_debug_function;
-+extern const char * const mi_lttng_loglevel_str_debug_line;
-+extern const char * const mi_lttng_loglevel_str_debug_module;
-+extern const char * const mi_lttng_loglevel_str_debug_process;
-+extern const char * const mi_lttng_loglevel_str_debug_program;
-+extern const char * const mi_lttng_loglevel_str_debug_system;
-+extern const char * const mi_lttng_loglevel_str_debug_unit;
-+extern const char * const mi_lttng_loglevel_str_emerg;
-+extern const char * const mi_lttng_loglevel_str_err;
-+extern const char * const mi_lttng_loglevel_str_info;
-+extern const char * const mi_lttng_loglevel_str_notice;
-+extern const char * const mi_lttng_loglevel_str_unknown;
-+extern const char * const mi_lttng_loglevel_str_warning;
- 
- /* String related to loglevel JUL */
--const char * const mi_lttng_loglevel_str_jul_all;
--const char * const mi_lttng_loglevel_str_jul_config;
--const char * const mi_lttng_loglevel_str_jul_fine;
--const char * const mi_lttng_loglevel_str_jul_finer;
--const char * const mi_lttng_loglevel_str_jul_finest;
--const char * const mi_lttng_loglevel_str_jul_info;
--const char * const mi_lttng_loglevel_str_jul_off;
--const char * const mi_lttng_loglevel_str_jul_severe;
--const char * const mi_lttng_loglevel_str_jul_warning;
-+extern const char * const mi_lttng_loglevel_str_jul_all;
-+extern const char * const mi_lttng_loglevel_str_jul_config;
-+extern const char * const mi_lttng_loglevel_str_jul_fine;
-+extern const char * const mi_lttng_loglevel_str_jul_finer;
-+extern const char * const mi_lttng_loglevel_str_jul_finest;
-+extern const char * const mi_lttng_loglevel_str_jul_info;
-+extern const char * const mi_lttng_loglevel_str_jul_off;
-+extern const char * const mi_lttng_loglevel_str_jul_severe;
-+extern const char * const mi_lttng_loglevel_str_jul_warning;
- 
- /* String related to loglevel Log4j */
--const char * const mi_lttng_loglevel_str_log4j_off;
--const char * const mi_lttng_loglevel_str_log4j_fatal;
--const char * const mi_lttng_loglevel_str_log4j_error;
--const char * const mi_lttng_loglevel_str_log4j_warn;
--const char * const mi_lttng_loglevel_str_log4j_info;
--const char * const mi_lttng_loglevel_str_log4j_debug;
--const char * const mi_lttng_loglevel_str_log4j_trace;
--const char * const mi_lttng_loglevel_str_log4j_all;
-+extern const char * const mi_lttng_loglevel_str_log4j_off;
-+extern const char * const mi_lttng_loglevel_str_log4j_fatal;
-+extern const char * const mi_lttng_loglevel_str_log4j_error;
-+extern const char * const mi_lttng_loglevel_str_log4j_warn;
-+extern const char * const mi_lttng_loglevel_str_log4j_info;
-+extern const char * const mi_lttng_loglevel_str_log4j_debug;
-+extern const char * const mi_lttng_loglevel_str_log4j_trace;
-+extern const char * const mi_lttng_loglevel_str_log4j_all;
- 
- /* String related to loglevel type */
--const char * const mi_lttng_loglevel_type_all;
--const char * const mi_lttng_loglevel_type_range;
--const char * const mi_lttng_loglevel_type_single;
--const char * const mi_lttng_loglevel_type_unknown;
-+extern const char * const mi_lttng_loglevel_type_all;
-+extern const char * const mi_lttng_loglevel_type_range;
-+extern const char * const mi_lttng_loglevel_type_single;
-+extern const char * const mi_lttng_loglevel_type_unknown;
- 
- /* Sting related to lttng_calibrate */
--const char * const mi_lttng_element_calibrate;
--const char * const mi_lttng_element_calibrate_function;
-+extern const char * const mi_lttng_element_calibrate;
-+extern const char * const mi_lttng_element_calibrate_function;
- 
- /* String related to a lttng_snapshot */
--const char * const mi_lttng_element_snapshot_ctrl_url;
--const char * const mi_lttng_element_snapshot_data_url;
--const char * const mi_lttng_element_snapshot_max_size;
--const char * const mi_lttng_element_snapshot_n_ptr;
--const char * const mi_lttng_element_snapshot_session_name;
--const char * const mi_lttng_element_snapshots;
-+extern const char * const mi_lttng_element_snapshot_ctrl_url;
-+extern const char * const mi_lttng_element_snapshot_data_url;
-+extern const char * const mi_lttng_element_snapshot_max_size;
-+extern const char * const mi_lttng_element_snapshot_n_ptr;
-+extern const char * const mi_lttng_element_snapshot_session_name;
-+extern const char * const mi_lttng_element_snapshots;
- 
- /* Utility string function  */
- const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain);
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/lttng-tools-Fix-live-timer-calculation-error.patch b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/lttng-tools-Fix-live-timer-calculation-error.patch
deleted file mode 100644
index 4719d95..0000000
--- a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/lttng-tools-Fix-live-timer-calculation-error.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 161496fbe1465817a77a50a1172734dae81a13ef Mon Sep 17 00:00:00 2001
-From: Mikael Beckius <mikael.beckius@windriver.com>
-Date: Tue, 12 May 2015 11:11:48 +0200
-Subject: [PATCH] lttng-tools: Fix live timer calculation error
-
-There is an calculation error for live timer. Variable switch_timer_interval is
-based on microsecond, and it is not right to assign switch_timer_interval mod
-1000000 to var tv_nsec which is based on nanosecond.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mikael Beckius <mikael.beckius@windriver.com>
-Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
----
- src/common/consumer-timer.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/common/consumer-timer.c b/src/common/consumer-timer.c
-index 1408052..c6202ba 100644
---- a/src/common/consumer-timer.c
-+++ b/src/common/consumer-timer.c
-@@ -368,7 +368,7 @@ void consumer_timer_switch_start(struct lttng_consumer_channel *channel,
- 	channel->switch_timer_enabled = 1;
- 
- 	its.it_value.tv_sec = switch_timer_interval / 1000000;
--	its.it_value.tv_nsec = switch_timer_interval % 1000000;
-+	its.it_value.tv_nsec = (switch_timer_interval % 1000000) * 1000;
- 	its.it_interval.tv_sec = its.it_value.tv_sec;
- 	its.it_interval.tv_nsec = its.it_value.tv_nsec;
- 
-@@ -425,7 +425,7 @@ void consumer_timer_live_start(struct lttng_consumer_channel *channel,
- 	channel->live_timer_enabled = 1;
- 
- 	its.it_value.tv_sec = live_timer_interval / 1000000;
--	its.it_value.tv_nsec = live_timer_interval % 1000000;
-+	its.it_value.tv_nsec = (live_timer_interval % 1000000) * 1000;
- 	its.it_interval.tv_sec = its.it_value.tv_sec;
- 	its.it_interval.tv_nsec = its.it_value.tv_nsec;
- 
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/runtest.patch b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/runtest.patch
deleted file mode 100644
index 545a5dc..0000000
--- a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/runtest.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/Makefile.am b/Makefile.am
-index 584f59b..c2bcabd 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -12,3 +12,9 @@ dist_doc_DATA = LICENSE \
- dist_noinst_DATA = CodingStyle
- 
- EXTRA_DIST = extras/lttng-bash_completion gpl-2.0.txt lgpl-2.1.txt
-+
-+install-ptest:
-+	cp -r $(srcdir)/tests $(DESTDIR)
-+	for m in $$(find $(DESTDIR)/tests -name Makefile); do \
-+          sed -i -e 's|^Makefile:|_Makefile:|' $$m; \
-+        done
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 6d5b00d..3774f9d 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -1,14 +1,17 @@
- SUBDIRS = utils regression unit stress
- 
--if USE_PYTHON
--check-am:
-+installcheck-am:
- 	./run.sh unit_tests
- 	./run.sh fast_regression
-+if USE_PYTHON
- 	./run.sh with_bindings_regression
--else
-+endif
-+
- check-am:
- 	./run.sh unit_tests
- 	./run.sh fast_regression
-+if USE_PYTHON
-+	./run.sh with_bindings_regression
- endif
- 
- dist_noinst_SCRIPTS = run.sh unit_tests fast_regression long_regression root_regression with_bindings_regression
-diff --git a/tests/run.sh b/tests/run.sh
-index c6c50fd..6455359 100755
---- a/tests/run.sh
-+++ b/tests/run.sh
-@@ -19,4 +19,7 @@
- 
- [ -z "$1" ] && echo "Error: No testlist. Please specify a testlist to run." && exit 1
- 
--prove --merge --exec '' - < $1
-+prove --merge -v --exec '' - < $1 | sed \
-+  -e 's|^ok \(.*\)|PASS: \1|' \
-+  -e 's|^not ok \(.*\)|FAIL: \1|' \
-+  | egrep -h 'PASS|FAIL'
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch
new file mode 100644
index 0000000..bd4f7d1
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools/stop-using-SIGUNUSED.patch
@@ -0,0 +1,51 @@
+From 1f54181c2df1fb92c3323a6dbf8273fb66b883b6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
+ <jeremie.galarneau@efficios.com>
+Date: Sat, 17 Oct 2015 19:41:47 -0400
+Subject: [PATCH] Port: Don't use SIGUNUSED which is not defined on Solaris
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Organization: O.S. Systems Software LTDA.
+
+Upstream-Status: Backport [2.8.0]
+
+Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
+---
+ src/common/runas.c | 18 +++++-------------
+ 1 file changed, 5 insertions(+), 13 deletions(-)
+
+diff --git a/src/common/runas.c b/src/common/runas.c
+index 57f7382..0825470 100644
+--- a/src/common/runas.c
++++ b/src/common/runas.c
+@@ -530,21 +530,13 @@ int run_as_rmdir_recursive(const char *path, uid_t uid, gid_t gid)
+ static
+ int reset_sighandler(void)
+ {
+-	int sig, ret = 0;
++	int sig;
+ 
+-	for (sig = SIGHUP; sig <= SIGUNUSED; sig++) {
+-		/* Skip unblockable signals. */
+-		if (sig == SIGKILL || sig == SIGSTOP) {
+-			continue;
+-		}
+-		if (signal(sig, SIG_DFL) == SIG_ERR) {
+-			PERROR("reset signal %d", sig);
+-			ret = -1;
+-			goto end;
+-		}
++	DBG("Resetting run_as worker signal handlers to default");
++	for (sig = 1; sig <= 31; sig++) {
++		(void) signal(sig, SIG_DFL);
+ 	}
+-end:
+-	return ret;
++	return 0;
+ }
+ 
+ static
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb
deleted file mode 100644
index 909acc3..0000000
--- a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb
+++ /dev/null
@@ -1,81 +0,0 @@
-SECTION = "devel"
-SUMMARY = "Linux Trace Toolkit Control"
-DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
-to extract program execution details from the Linux operating system \
-and interpret them."
-
-LICENSE = "GPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
-                    file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
-
-DEPENDS = "liburcu popt lttng-ust libxml2"
-RDEPENDS_${PN}-ptest += "make perl bash"
-
-SRCREV = "d522c1f14285e2e8b10b7c0cd011847696ffe779"
-
-PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
-                 am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
-                 PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \
-"
-PACKAGECONFIG ??= "lttng-ust"
-PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native"
-PACKAGECONFIG[lttng-ust] = "--enable-lttng-ust, --disable-lttng-ust, lttng-ust"
-PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
-
-SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.6 \
-           file://runtest-2.4.0.patch \
-           file://extern-decls.patch \
-           file://run-ptest \
-           file://lttng-tools-Fix-live-timer-calculation-error.patch \
-           file://0001-Fix-sessiond-disable-match-app-event-by-name.patch \
-	  "
-
-S = "${WORKDIR}/git"
-
-inherit autotools-brokensep ptest pkgconfig useradd
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "tracing"
-
-FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
-                ${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
-FILES_${PN}-dbg += "${libdir}/lttng/libexec/.debug \
-                    ${libdir}/python2.7/site-packages/.debug"
-FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a"
-FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la"
-
-# Since files are installed into ${libdir}/lttng/libexec we match 
-# the libexec insane test so skip it.
-# Python module needs to keep _lttng.so
-INSANE_SKIP_${PN} = "libexec dev-so"
-INSANE_SKIP_${PN}-dbg = "libexec"
-
-do_configure_prepend () {
-	# Delete a shipped m4 file that overrides our patched one
-	rm -f ${S}/config/libxml.m4
-}
-
-do_install_ptest () {
-	chmod +x ${D}${PTEST_PATH}/tests/utils/utils.sh
-	for i in `find ${D}${PTEST_PATH} -perm /u+x -type f`; do
-		sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \
-		  -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
-		  -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
-		  -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
-		  -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
-		  -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
-		  -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \
-		  -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
-		  -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
-		  -i $i
-	done
-
-	sed -e "s:src/bin/lttng-sessiond:$bindir:g" \
-	    -e "s:src/bin/lttng-consumerd:${libexecdir}/libexec/:g" \
-	-i ${D}${PTEST_PATH}/tests/regression/run-report.py
-	sed -e "s:src/bin:bin:g" -e "s:lt-::g" \
-	-i ${D}${PTEST_PATH}/tests/utils/utils.sh
-	sed -e "s:ini_config:\.libs\/ini_config:" \
-	-i ${D}${PTEST_PATH}/tests/unit/ini_config/test_ini_config
-}
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb
new file mode 100644
index 0000000..8bd0989
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/lttng/lttng-tools_git.bb
@@ -0,0 +1,82 @@
+SECTION = "devel"
+SUMMARY = "Linux Trace Toolkit Control"
+DESCRIPTION = "The Linux trace toolkit is a suite of tools designed \
+to extract program execution details from the Linux operating system \
+and interpret them."
+
+LICENSE = "GPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=01d7fc4496aacf37d90df90b90b0cac1 \
+                    file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://lgpl-2.1.txt;md5=0f0d71500e6a57fd24d825f33242b9ca"
+
+DEPENDS = "liburcu popt libxml2"
+RDEPENDS_${PN} = "libgcc"
+RDEPENDS_${PN}-ptest += "make perl bash"
+
+SRCREV = "a90f2c1e10b759782653a81815625e9d1bbb75ca"
+PV = "2.7.1+git${SRCPV}"
+
+PYTHON_OPTION = "am_cv_python_pyexecdir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
+                 am_cv_python_pythondir='${libdir}/python${PYTHON_BASEVERSION}/site-packages' \
+                 PYTHON_INCLUDE='-I${STAGING_INCDIR}/python${PYTHON_BASEVERSION}' \
+"
+PACKAGECONFIG ??= "lttng-ust"
+PACKAGECONFIG[python] = "--enable-python-bindings ${PYTHON_OPTION},,python swig-native"
+PACKAGECONFIG[lttng-ust] = "--enable-lttng-ust, --disable-lttng-ust, lttng-ust"
+PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
+PACKAGECONFIG_remove_libc-musl = "lttng-ust"
+
+SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.7 \
+           file://Revert-Build-look-for-python-3.0-when-building-pytho.patch \
+           file://stop-using-SIGUNUSED.patch \
+           file://runtest-2.4.0.patch \
+           file://run-ptest"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep ptest pkgconfig useradd
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "tracing"
+
+FILES_${PN} += "${libdir}/lttng/libexec/* ${datadir}/xml/lttng \
+                ${libdir}/python${PYTHON_BASEVERSION}/site-packages/*"
+FILES_${PN}-staticdev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.a"
+FILES_${PN}-dev += "${libdir}/python${PYTHON_BASEVERSION}/site-packages/*.la"
+
+# Since files are installed into ${libdir}/lttng/libexec we match 
+# the libexec insane test so skip it.
+# Python module needs to keep _lttng.so
+INSANE_SKIP_${PN} = "libexec dev-so"
+INSANE_SKIP_${PN}-dbg = "libexec"
+
+do_configure_prepend () {
+	# Delete a shipped m4 file that overrides our patched one
+	rm -f ${S}/config/libxml.m4
+}
+
+do_install_ptest () {
+	chmod +x ${D}${PTEST_PATH}/tests/utils/utils.sh
+	for i in `find ${D}${PTEST_PATH} -perm /u+x -type f`; do
+		sed -e "s:\$TESTDIR.*/src/bin/lttng/\$LTTNG_BIN:\$LTTNG_BIN:g" \
+		  -e "s:\$TESTDIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
+		  -e "s:\$DIR/../src/bin/lttng-sessiond/\$SESSIOND_BIN:\$SESSIOND_BIN:g" \
+		  -e "s:\$TESTDIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
+		  -e "s:\$DIR/../src/bin/lttng-consumerd/:${libdir}/lttng/libexec/:g" \
+		  -e "s:\$TESTDIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
+		  -e "s:\$DIR/../src/bin/lttng-sessiond/lttng-sessiond:\$SESSIOND_BIN:g" \
+		  -e "s:\$DIR/../src/bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
+		  -e "s:\$DIR/../bin/lttng-relayd/\$RELAYD_BIN:\$RELAYD_BIN:g" \
+		  -i $i
+	done
+
+	# Update libdir references in copied .la files
+	for i in `find ${D}${PTEST_PATH} -type f -name *.la`; do
+		sed -i -e 's#${S}/tests/#${STAGING_DIR}${PTEST_PATH}#g' $i
+	done
+
+	sed -e "s:src/bin:bin:g" -e "s:lt-::g" \
+	-i ${D}${PTEST_PATH}/tests/utils/utils.sh
+	sed -e "s:ini_config:\.libs\/ini_config:" \
+	-i ${D}${PTEST_PATH}/tests/unit/ini_config/test_ini_config
+}
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-Fix-live-timer-calculation-error.patch b/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-Fix-live-timer-calculation-error.patch
deleted file mode 100644
index 03120fe..0000000
--- a/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-Fix-live-timer-calculation-error.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 6d02a6c1aeb1d050ffe7c6624bab9acfa76fc05f Mon Sep 17 00:00:00 2001
-From: Mikael Beckius <mikael.beckius@windriver.com>
-Date: Tue, 12 May 2015 11:04:34 +0200
-Subject: [PATCH] lttng-ust:Fix live timer calculation error
-
-There is an calculation error for live timer. Variable chan->switch_timer_interval is
-based on microsecond, and it is not right to assign chan->switch_timer_interval mod
-1000000 to var tv_nsec which is based on nanosecond.
-
-Upstream-Status: Pending
-
-Signed-off-by: Mikael Beckius <mikael.beckius@windriver.com>
-Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
----
- libringbuffer/ring_buffer_frontend.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/libringbuffer/ring_buffer_frontend.c b/libringbuffer/ring_buffer_frontend.c
-index eb4e486..e0377a3 100644
---- a/libringbuffer/ring_buffer_frontend.c
-+++ b/libringbuffer/ring_buffer_frontend.c
-@@ -528,7 +528,7 @@ void lib_ring_buffer_channel_switch_timer_start(struct channel *chan)
- 	}
- 
- 	its.it_value.tv_sec = chan->switch_timer_interval / 1000000;
--	its.it_value.tv_nsec = chan->switch_timer_interval % 1000000;
-+	its.it_value.tv_nsec = (chan->switch_timer_interval % 1000000) * 1000;
- 	its.it_interval.tv_sec = its.it_value.tv_sec;
- 	its.it_interval.tv_nsec = its.it_value.tv_nsec;
- 
-@@ -582,7 +582,7 @@ void lib_ring_buffer_channel_read_timer_start(struct channel *chan)
- 	}
- 
- 	its.it_value.tv_sec = chan->read_timer_interval / 1000000;
--	its.it_value.tv_nsec = chan->read_timer_interval % 1000000;
-+	its.it_value.tv_nsec = (chan->read_timer_interval % 1000000) * 1000;
- 	its.it_interval.tv_sec = its.it_value.tv_sec;
- 	its.it_interval.tv_nsec = its.it_value.tv_nsec;
- 
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-add-support-for-aarch64_be.patch b/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-add-support-for-aarch64_be.patch
new file mode 100644
index 0000000..9b37a4a
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/lttng/lttng-ust/lttng-ust-add-support-for-aarch64_be.patch
@@ -0,0 +1,17 @@
+lttng-ust: add support for aarch64_be
+
+Upstream-Status: Pending
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+
+diff --ruN a/configure.ac b/configure.ac
+--- a/configure.ac	2016-02-18 14:54:54.651713647 +0100
++++ b/configure.ac	2016-02-18 14:56:11.057865297 +0100
+@@ -240,6 +240,7 @@
+ 	s390x) NO_UNALIGNED_ACCESS=1 ;;
+         arm*) NO_UNALIGNED_ACCESS=1 ;;
+ 	aarch64) NO_UNALIGNED_ACCESS=1 ;;
++        aarch64_be) NO_UNALIGNED_ACCESS=1 ;;
+ 	mips*) NO_UNALIGNED_ACCESS=1 ;;
+ 	tile*) NO_UNALIGNED_ACCESS=1 ;;
+ 	*)
diff --git a/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb b/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb
index ae4afd3..15d925d 100644
--- a/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb
+++ b/yocto-poky/meta/recipes-kernel/lttng/lttng-ust_git.bb
@@ -18,14 +18,14 @@
 RREPLACES_${PN} = "lttng2-ust"
 RCONFLICTS_${PN} = "lttng2-ust"
 
-SRCREV = "c49ee9040ada6984c880756614e8a6f7fd645bd6"
+SRCREV = "f89c1a3cf2b06a4970b9154c00ff6409870aefb5"
 PE = "2"
-PV = "2.6.2+git${SRCPV}"
+PV = "2.7.1+git${SRCPV}"
 
-SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.6 \
+SRC_URI = "git://git.lttng.org/lttng-ust.git;branch=stable-2.7 \
            file://lttng-ust-doc-examples-disable.patch \
-           file://lttng-ust-Fix-live-timer-calculation-error.patch \
-        "
+           file://lttng-ust-add-support-for-aarch64_be.patch \
+          "
 
 S = "${WORKDIR}/git"
 
diff --git a/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc b/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc
index 6ec56e7..cf3ad43 100644
--- a/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc
+++ b/yocto-poky/meta/recipes-kernel/oprofile/oprofile.inc
@@ -23,7 +23,10 @@
            file://automake-foreign.patch \
            file://oprofile-cross-compile-tests.patch \
            file://run-ptest \
-           file://root-home-dir.patch"
+           file://root-home-dir.patch \
+           file://0001-Add-rmb-definition-for-NIOS2-architecture.patch"
+
+SRC_URI_append_libc-musl = " file://musl.patch"
 
 inherit autotools pkgconfig ptest
 
diff --git a/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch b/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
new file mode 100644
index 0000000..ae8562a
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/oprofile/oprofile/0001-Add-rmb-definition-for-NIOS2-architecture.patch
@@ -0,0 +1,30 @@
+From 34b0d9b1a32fb404a30327a7ae8931c7c75583bf Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Tue, 9 Feb 2016 02:00:29 +0100
+Subject: [PATCH] Add rmb() definition for NIOS2 architecture
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Submitted [ http://marc.info/?l=oprofile-list&m=145501915931874&w=2 ]
+---
+ libperf_events/operf_utils.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libperf_events/operf_utils.h b/libperf_events/operf_utils.h
+index 32954cc..8270e53 100644
+--- a/libperf_events/operf_utils.h
++++ b/libperf_events/operf_utils.h
+@@ -178,6 +178,11 @@ void op_release_resources(void);
+ #define cpu_relax()	asm volatile("" ::: "memory")
+ #endif
+ 
++#ifdef __nios2__
++#define rmb()		asm volatile("" ::: "memory")
++#define cpu_relax()	asm volatile("" ::: "memory")
++#endif
++
+ #ifdef __tile__
+ #include <asm/unistd.h>
+ #define rmb()		__insn_mf()
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch b/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch
new file mode 100644
index 0000000..51db408
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/oprofile/oprofile/musl.patch
@@ -0,0 +1,46 @@
+Fix glibc-isms so that oprofile builds with musl.
+
+Patch taken from openwrt (https://github.com/openwrt-mirror/openwrt/blob/master/package/devel/oprofile/patches/100-musl.patch)
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- a/pe_profiling/operf.cpp
++++ b/pe_profiling/operf.cpp
+@@ -857,11 +857,14 @@ static int __delete_old_previous_sample_
+                                 int tflag  __attribute__((unused)),
+                                 struct FTW *ftwbuf __attribute__((unused)))
+ {
++	int err;
++
+ 	if (remove(fpath)) {
++		err = errno;
+ 		perror("sample data removal error");
+-		return FTW_STOP;
++		return err;
+ 	} else {
+-		return FTW_CONTINUE;
++		return 0;
+ 	}
+ }
+ 
+@@ -896,7 +899,7 @@ static void convert_sample_data(void)
+ 		return;
+ 
+ 	if (!operf_options::append) {
+-                int flags = FTW_DEPTH | FTW_ACTIONRETVAL;
++                int flags = FTW_DEPTH;
+ 		errno = 0;
+ 		if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 &&
+ 				errno != ENOENT) {
+--- a/libop/op_events.c
++++ b/libop/op_events.c
+@@ -83,7 +83,7 @@ static int parse_hex(char const * str)
+ static u64 parse_long_hex(char const * str)
+ {
+ 	u64 value;
+-	if (sscanf(str, "%Lx", &value) != 1)
++	if (sscanf(str, "0x%llx", &value) != 1)
+ 		parse_error("expected long hexadecimal value");
+ 
+ 	fflush(stderr);
diff --git a/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch b/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
index 20fc5e5..3eaf6a7 100644
--- a/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
+++ b/yocto-poky/meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
@@ -8,7 +8,7 @@
 patch is that the oprofile tools are adjusted to the current run-time
 path to ~root, not the build time path.
 
-Upstream-Status: inappropriate [OE specific]
+Upstream-Status: Inappropriate [OE specific]
 
 Signed-off-by: Dave Lerner <dave.lerner@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-kernel/perf/perf.bb b/yocto-poky/meta/recipes-kernel/perf/perf.bb
index 22bd3c8..3d6ffb3 100644
--- a/yocto-poky/meta/recipes-kernel/perf/perf.bb
+++ b/yocto-poky/meta/recipes-kernel/perf/perf.bb
@@ -88,6 +88,7 @@
 '
 
 EXTRA_OEMAKE += "\
+    'DESTDIR=${D}' \
     'prefix=${prefix}' \
     'bindir=${bindir}' \
     'sharedir=${datadir}' \
@@ -110,7 +111,7 @@
 do_install() {
 	# Linux kernel build system is expected to do the right thing
 	unset CFLAGS
-	oe_runmake DESTDIR=${D} install
+	oe_runmake install
 	# we are checking for this make target to be compatible with older perf versions
 	if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ] && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
 		oe_runmake DESTDIR=${D} install-python_ext
@@ -164,6 +165,10 @@
         sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/api/Makefile
         sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/api/Makefile
     fi
+    if [ -e "${S}/tools/lib/subcmd/Makefile" ]; then
+        sed -i 's,CC = $(CROSS_COMPILE)gcc,#CC,' ${S}/tools/lib/subcmd/Makefile
+        sed -i 's,AR = $(CROSS_COMPILE)ar,#AR,' ${S}/tools/lib/subcmd/Makefile
+    fi
     if [ -e "${S}/tools/perf/config/feature-checks/Makefile" ]; then
         sed -i 's,CC := $(CROSS_COMPILE)gcc -MD,CC += -MD,' ${S}/tools/perf/config/feature-checks/Makefile
     fi
@@ -179,6 +184,11 @@
         sed -i 's,#include "tests/tests.h",#include "tests/tests.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/tests/dwarf-unwind.c
         sed -i 's,#include "perf_regs.h",#include "perf_regs.h"\n#include "util/debug.h",' ${S}/tools/perf/arch/arm/util/unwind-libunwind.c
     fi
+
+    # use /usr/bin/env instead of version specific python
+    for s in `find ${S}/tools/perf/scripts/python/ -name '*.py'`; do
+        sed -i 's,/usr/bin/python2,/usr/bin/env python,' "${s}"
+    done
 }
 
 python do_package_prepend() {
@@ -192,7 +202,7 @@
 
 RDEPENDS_${PN} += "elfutils bash"
 RDEPENDS_${PN}-archive =+ "bash"
-RDEPENDS_${PN}-python =+ "bash python"
+RDEPENDS_${PN}-python =+ "bash python python-modules"
 RDEPENDS_${PN}-perl =+ "bash perl perl-modules"
 RDEPENDS_${PN}-tests =+ "python"
 
@@ -200,10 +210,10 @@
 RSUGGESTS_${PN} += "${PN}-archive ${PN}-tests ${RSUGGESTS_SCRIPTING}"
 
 FILES_${PN} += "${libexecdir}/perf-core ${exec_prefix}/libexec/perf-core ${libdir}/traceevent"
-FILES_${PN}-dbg += "${libdir}/python*/site-packages/.debug"
 FILES_${PN}-archive = "${libdir}/perf/perf-core/perf-archive"
-FILES_${PN}-tests = "${libdir}/perf/perf-core/tests"
+FILES_${PN}-tests = "${libdir}/perf/perf-core/tests ${libexecdir}/perf-core/tests"
 FILES_${PN}-python = "${libdir}/python*/site-packages ${libdir}/perf/perf-core/scripts/python"
+FILES_${PN}-python += "${libexecdir}/perf-core/scripts/python/*"
 FILES_${PN}-perl = "${libdir}/perf/perf-core/scripts/perl"
 
 
diff --git a/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch b/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
new file mode 100644
index 0000000..0fd6310
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/powertop/powertop/0001-include-rquired-headers-for-typedefs.patch
@@ -0,0 +1,47 @@
+From 0856d8145d187a7e5a49625247abe43a13f95acc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 15 Sep 2015 19:36:28 +0000
+Subject: [PATCH] include rquired headers for typedefs
+
+timeval struct needs to include sys/time.h and sprintf() usage requires
+to include stdio.h headers from system
+
+Fixes
+src/perf/perf_bundle.cpp:141:2: error: use of undeclared identifier 'sprintf'; did you mean 'vswprintf'?
+src/devices/devfreq.h:35:18: error: field has incomplete type 'struct timeval'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/devices/devfreq.h    | 1 +
+ src/perf/perf_bundle.cpp | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/src/devices/devfreq.h b/src/devices/devfreq.h
+index 16a60fb..4bede7c 100644
+--- a/src/devices/devfreq.h
++++ b/src/devices/devfreq.h
+@@ -25,6 +25,7 @@
+ #ifndef _INCLUDE_GUARD_DEVFREQ_H
+ #define _INCLUDE_GUARD_DEVFREQ_H
+ 
++#include <sys/time.h>
+ #include "device.h"
+ #include "../parameters/parameters.h"
+ 
+diff --git a/src/perf/perf_bundle.cpp b/src/perf/perf_bundle.cpp
+index cf1ae11..232f894 100644
+--- a/src/perf/perf_bundle.cpp
++++ b/src/perf/perf_bundle.cpp
+@@ -27,6 +27,7 @@
+ #include <algorithm>
+ #include <string.h>
+ #include <stdint.h>
++#include <stdio.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+-- 
+2.5.2
+
diff --git a/yocto-poky/meta/recipes-kernel/powertop/powertop_2.7.bb b/yocto-poky/meta/recipes-kernel/powertop/powertop_2.7.bb
deleted file mode 100644
index 5ba07e9..0000000
--- a/yocto-poky/meta/recipes-kernel/powertop/powertop_2.7.bb
+++ /dev/null
@@ -1,32 +0,0 @@
-SUMMARY = "Power usage tool"
-DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
-HOMEPAGE = "http://01.org/powertop/"
-BUGTRACKER = "http://bugzilla.lesswatts.org/"
-DEPENDS = "ncurses libnl pciutils"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
-
-SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz"
-
-SRC_URI[md5sum] = "e0d686e47daaf7e9d89031f7763432ef"
-SRC_URI[sha256sum] = "8d4b1490e2baad4467c0ded3c423db4472dcbf7b2dd8f8f2a928f54047c678ca"
-
-inherit autotools gettext pkgconfig
-
-# we need to explicitly link with libintl in uClibc systems
-EXTRA_LDFLAGS ?= ""
-EXTRA_LDFLAGS_libc-uclibc = "-lintl"
-LDFLAGS += "${EXTRA_LDFLAGS}"
-
-# we do not want libncursesw if we can
-do_configure_prepend() {
-    # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one
-    sed -i -e "s/ncursesw//g" ${S}/configure.ac
-    mkdir -p ${B}/src/tuning/
-}
-
-inherit update-alternatives
-ALTERNATIVE_${PN} = "powertop"
-ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop"
-ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop"
-ALTERNATIVE_PRIORITY = "100"
diff --git a/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb b/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb
new file mode 100644
index 0000000..1f2dfb8
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/powertop/powertop_2.8.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Power usage tool"
+DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
+HOMEPAGE = "http://01.org/powertop/"
+BUGTRACKER = "http://bugzilla.lesswatts.org/"
+DEPENDS = "ncurses libnl pciutils"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
+
+SRC_URI = "http://01.org/sites/default/files/downloads/powertop/powertop-${PV}.tar.gz \
+           file://0001-include-rquired-headers-for-typedefs.patch \
+"
+
+SRC_URI[md5sum] = "c55fedb69203e480801b18bd7b886241"
+SRC_URI[sha256sum] = "a87b563f73106babfa3e74dcf92f252938c061e309ace20a361358bbfa579c5a"
+
+UPSTREAM_CHECK_URI = "https://01.org/powertop/downloads"
+
+inherit autotools gettext pkgconfig
+
+# we need to explicitly link with libintl in uClibc systems
+EXTRA_LDFLAGS ?= ""
+EXTRA_LDFLAGS_libc-uclibc = "-lintl"
+LDFLAGS += "${EXTRA_LDFLAGS}"
+
+# we do not want libncursesw if we can
+do_configure_prepend() {
+    # configure.ac checks for delwin() in "ncursesw ncurses" so let's drop first one
+    sed -i -e "s/ncursesw//g" ${S}/configure.ac
+    mkdir -p ${B}/src/tuning/
+}
+
+inherit update-alternatives
+ALTERNATIVE_${PN} = "powertop"
+ALTERNATIVE_TARGET[powertop] = "${sbindir}/powertop"
+ALTERNATIVE_LINK_NAME[powertop] = "${sbindir}/powertop"
+ALTERNATIVE_PRIORITY = "100"
diff --git a/yocto-poky/meta/recipes-kernel/sysprof/files/gui-argument.patch b/yocto-poky/meta/recipes-kernel/sysprof/files/gui-argument.patch
new file mode 100644
index 0000000..d2c053e
--- /dev/null
+++ b/yocto-poky/meta/recipes-kernel/sysprof/files/gui-argument.patch
@@ -0,0 +1,35 @@
+Add the ability to explicitly enable/disable GUI support
+
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+Upstream-Status: Pending
+
+--- git.orig/configure.ac
++++ git/configure.ac
+@@ -62,12 +62,24 @@ KMICRO=`uname -r | cut -d"." -f 3 | cut
+ # Pkgconfig dependencies
+ 
+ core_dep="glib-2.0 >= 2.6.0"
+-gui_dep="gtk+-2.0 > 2.6.0 gdk-pixbuf-2.0 pangoft2 libglade-2.0"
+ 
+ PKG_CHECK_MODULES(CORE_DEP, $core_dep, [], AC_MSG_ERROR([sysprof dependencies not satisfied]))
+ 
+-build_gui=yes
+-PKG_CHECK_MODULES(GUI_DEP, $gui_dep, [], build_gui=no)
++gui_dep="gtk+-2.0 > 2.6.0 gdk-pixbuf-2.0 pangoft2 libglade-2.0"
++
++AC_ARG_ENABLE([gui],
++  [AS_HELP_STRING([--disable-gui],
++    [Disable GUI functionality (requires gtk+, gdk-pixbuf, pangoft2, libglade) @<:@default=auto@:>@])],
++  [],
++  [enable_gui=auto])
++
++build_gui=no
++AS_IF([test "x$enable_gui" != xno],
++  [PKG_CHECK_MODULES(GUI_DEP, $gui_dep, build_gui=yes,
++    [if test "x$enable_gui" != xauto; then
++       AC_MSG_FAILURE(
++         [--enable-gui was given, but gui dependencies were not satisfied])
++     fi])])
+ 
+ AM_CONDITIONAL([BUILD_GUI], [test "$build_gui" = yes])
+ 
diff --git a/yocto-poky/meta/recipes-kernel/sysprof/sysprof_git.bb b/yocto-poky/meta/recipes-kernel/sysprof/sysprof_git.bb
index 7d87efe..84c6aad 100644
--- a/yocto-poky/meta/recipes-kernel/sysprof/sysprof_git.bb
+++ b/yocto-poky/meta/recipes-kernel/sysprof/sysprof_git.bb
@@ -2,13 +2,14 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 
-DEPENDS = "gtk+ libglade"
+DEPENDS = "glib-2.0"
 
 SRCREV = "cd44ee6644c3641507fb53b8a2a69137f2971219"
 PV = "1.2.0+git${SRCPV}"
 
 SRC_URI = "git://git.gnome.org/sysprof \
            file://define-NT_GNU_BUILD_ID.patch \
+           file://gui-argument.patch \
           "
 
 SRC_URI_append_arm  = " file://rmb-arm.patch"
@@ -19,8 +20,10 @@
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+inherit autotools pkgconfig
+
+PACKAGECONFIG ?= "${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK2DISTROFEATURES}', 'gui', '', d)}"
+PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,gtk+ gdk-pixbuf pango libglade"
 
 # We do not yet work for aarch64.
 #
diff --git a/yocto-poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/yocto-poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
index 758908b..3686c2f 100644
--- a/yocto-poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
+++ b/yocto-poky/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
@@ -4,8 +4,6 @@
 
 DEPENDS = "systemtap virtual/kernel"
 
-PR = "r1"
-
 # On systems without CONFIG_UTRACE, this package is empty.
 ALLOW_EMPTY_${PN} = "1"
 
diff --git a/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb b/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
index d0dd42a..97064b8 100644
--- a/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -26,5 +26,3 @@
 inherit autotools gettext pkgconfig
 
 BBCLASSEXTEND = "native nativesdk"
-
-FILES_${PN}-dbg += "${libexecdir}/systemtap/.debug"
diff --git a/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc b/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
index 59a578d..656f15f 100644
--- a/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/yocto-poky/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -1,7 +1,7 @@
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRCREV = "bf16266782e1f2588b519a50d9684279d4e21036"
-PV = "2.7+git${SRCPV}"
+SRCREV = "7009f2f782e52d6105fe68d6ea2a9820a1099c06"
+PV = "2.9"
 
 SRC_URI = "git://sourceware.org/git/systemtap.git \
            file://docproc-build-fix.patch \
@@ -17,12 +17,8 @@
 S = "${WORKDIR}/git"
 
 # systemtap can't be built without optimization, if someone tries to compile an
-# entire image as -O0, we override it with -O2 here and give a note about it.
-def get_optimization(d):
-    selected_optimization = d.getVar("SELECTED_OPTIMIZATION", True)
+# entire image as -O0, break with fatal.
+python () {
     if bb.utils.contains("SELECTED_OPTIMIZATION", "-O0", "x", "", d) == "x":
-        bb.note("systemtap can't be built with -O0, -O2 will be used instead.")
-        return selected_optimization.replace("-O0", "-O2")
-    return selected_optimization
-
-SELECTED_OPTIMIZATION := "${@get_optimization(d)}"
+        bb.fatal("systemtap can't be built with -O0, using -O1 -Wno-error or -O1 instead.")
+}
diff --git a/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc b/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc
index 87e4a9c..3ad06fa 100644
--- a/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc
+++ b/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd.inc
@@ -1,11 +1,11 @@
-SRCREV = "0813335d2e49291e7ab6a4365cec2baa05813eda"
-PV = "2.5.3+git${SRCPV}"
+SRCREV = "9be5d74805830a291615f2f34a27c903f6a37b1e"
+PV = "2.6"
 
 inherit pkgconfig
 
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/trace-cmd:"
 
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=trace-cmd-stable-v2.5 \
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;branch=trace-cmd-stable-v2.6 \
            file://blktrace-api-compatibility.patch \
 "
 
diff --git a/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb b/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
index b1ac789..dd9a8a0 100644
--- a/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
+++ b/yocto-poky/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
@@ -22,8 +22,6 @@
     NO_PYTHON=1 \
 "
 
-FILES_${PN}-dbg += "${libdir}/trace-cmd/plugins/.debug"
-
 do_compile_prepend() {
     # Make sure the recompile is OK
     rm -f ${B}/.*.d
diff --git a/yocto-poky/meta/recipes-lsb4/libpng/libpng12_1.2.53.bb b/yocto-poky/meta/recipes-lsb4/libpng/libpng12_1.2.53.bb
deleted file mode 100644
index 24f6aff..0000000
--- a/yocto-poky/meta/recipes-lsb4/libpng/libpng12_1.2.53.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-SUMMARY = "PNG image format decoding library"
-HOMEPAGE = "http://www.libpng.org/"
-SECTION = "libs"
-LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=bd2a7a13355fcca92ad83bdf7e296011 \
-                    file://png.h;beginline=322;endline=436;md5=caf9ee541234c663aeecdcfef2f79ae1"
-DEPENDS = "zlib"
-
-PN = "libpng12"
-S = "${WORKDIR}/libpng-${PV}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng12/older-releases/${PV}/libpng-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "7d18a74e6fd2029aee76ccd00e00a9e6"
-SRC_URI[sha256sum] = "b45e49f689e7451bd576569e6a344f7e0d11c02ecbb797f4da0e431526765c0a"
-
-BINCONFIG_GLOB = "${PN}-config"
-
-inherit autotools binconfig pkgconfig
-
-do_install_append() {
-	# The follow link files link to corresponding png12*.h and libpng12* files
-	# They conflict with higher verison, so drop them
-	unlink ${D}/${includedir}/png.h
-	unlink ${D}/${includedir}/pngconf.h
-
-	unlink ${D}/${libdir}/libpng.la
-	unlink ${D}/${libdir}/libpng.so
-	unlink ${D}/${libdir}/libpng.a
-	unlink ${D}/${libdir}/pkgconfig/libpng.pc
-
-	unlink ${D}/${bindir}/libpng-config
-}
diff --git a/yocto-poky/meta/recipes-lsb4/libpng/libpng12_1.2.56.bb b/yocto-poky/meta/recipes-lsb4/libpng/libpng12_1.2.56.bb
new file mode 100644
index 0000000..10c350a
--- /dev/null
+++ b/yocto-poky/meta/recipes-lsb4/libpng/libpng12_1.2.56.bb
@@ -0,0 +1,36 @@
+SUMMARY = "PNG image format decoding library"
+HOMEPAGE = "http://www.libpng.org/"
+SECTION = "libs"
+LICENSE = "Libpng"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e7f289af309d98b46321d0f9892def16 \
+                    file://png.h;beginline=19;endline=109;md5=10c940148fe379a535b310c1c54e609c"
+DEPENDS = "zlib"
+
+PN = "libpng12"
+S = "${WORKDIR}/libpng-${PV}"
+
+SRC_URI = "${GENTOO_MIRROR}/libpng-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "868562bd1c58b76ed8703f135a2e439a"
+SRC_URI[sha256sum] = "24ce54581468b937734a6ecc86f7e121bc46a90d76a0d948dca08f32ee000dbe"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libpng/files/libpng12/"
+UPSTREAM_CHECK_REGEX = "/libpng12/(?P<pver>(\d+[\.\-_]*)+)/"
+
+BINCONFIG_GLOB = "${PN}-config"
+
+inherit autotools binconfig pkgconfig
+
+do_install_append() {
+	# The follow link files link to corresponding png12*.h and libpng12* files
+	# They conflict with higher verison, so drop them
+	unlink ${D}/${includedir}/png.h
+	unlink ${D}/${includedir}/pngconf.h
+
+	unlink ${D}/${libdir}/libpng.la
+	unlink ${D}/${libdir}/libpng.so
+	unlink ${D}/${libdir}/libpng.a || true
+	unlink ${D}/${libdir}/pkgconfig/libpng.pc
+
+	unlink ${D}/${bindir}/libpng-config
+}
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-build-Do-not-try-to-detect-cross-compiler.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-build-Do-not-try-to-detect-cross-compiler.patch
deleted file mode 100644
index 583bc3d..0000000
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-build-Do-not-try-to-detect-cross-compiler.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 17aeb3565f411e7796cabe403f92d15948a8ca95 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 21 Aug 2015 14:42:45 -0700
-Subject: [PATCH] build: Do not try to detect cross-compiler
-
-cross compilers are passed via path may not be a gcc based cross
-compiler in such cases this check fails and try's to force gcc based
-cross compiler detection, This code is a convenience that limits the
-build system
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 14 --------------
- 1 file changed, 14 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 3022cf8..9d77440 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -27,20 +27,6 @@ AC_PREFIX_DEFAULT(/usr)
- 
- dnl Checks for programs.
- 
--dnl try to gues cross-compiler if not set
--if test "x$host" != "x$build" -a -z "`echo $CC | grep -e '-gcc'`";
--then
--  AC_MSG_CHECKING(for cross-compiler)
--
--  which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
--  which ${host_cpu}-${host_os}-gcc >/dev/null 2>&1 \
--  && CC=${host_cpu}-${host_os}-gcc
--  which ${host_cpu}-${host_vendor}-${host_os}-gcc >/dev/null 2>&1 \
--  && CC=${host_cpu}-${host_vendor}-${host_os}-gcc
--
--  AC_MSG_RESULT($CC)
--fi
--	    
- CFLAGS="$CFLAGS -D_GNU_SOURCE"
- 
- 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch
new file mode 100644
index 0000000..0ead0cd
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/0001-topology-Add-missing-include-sys-stat.h.patch
@@ -0,0 +1,35 @@
+From 3f1dba9a821b53b42001605f9a126a958804884f Mon Sep 17 00:00:00 2001
+From: Takashi Iwai <tiwai@suse.de>
+Date: Mon, 9 Nov 2015 13:37:26 +0100
+Subject: [PATCH] topology: Add missing include sys/stat.h
+
+Necessary for proper definitions of S_IRUSR & co. Otherwise it
+results in compile errors with old glibc and uclibc:
+  parser.c: In function 'snd_tplg_build_file':
+  parser.c:262: error: 'S_IRUSR' undeclared (first use in this function)
+  parser.c:262: error: (Each undeclared identifier is reported only once
+  parser.c:262: error: for each function it appears in.)
+
+Upstream-Status: Backport
+
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+ src/topology/parser.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/topology/parser.c b/src/topology/parser.c
+index 80a0ae0..18bb9c7 100644
+--- a/src/topology/parser.c
++++ b/src/topology/parser.c
+@@ -16,6 +16,7 @@
+            Liam Girdwood <liam.r.girdwood@linux.intel.com>
+ */
+ 
++#include <sys/stat.h>
+ #include "list.h"
+ #include "tplg_local.h"
+ 
+-- 
+2.4.0
+
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
index 75a6eb8..795e48a 100644
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/Check-if-wordexp-function-is-supported.patch
@@ -1,4 +1,4 @@
-From e33357b59a10d44e9bec5d24100ce23ca300cc79 Mon Sep 17 00:00:00 2001
+From 3408f8e78776b12f131e433749721602f87e0a70 Mon Sep 17 00:00:00 2001
 From: "Hong H. Pham" <hong.pham@windriver.com>
 Date: Fri, 29 Aug 2014 17:13:55 +0300
 Subject: [PATCH] Check if wordexp function is supported
@@ -18,15 +18,15 @@
  2 files changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/configure.ac b/configure.ac
-index b8353a0..773b72f 100644
+index 9490d39..b08a90a 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -311,7 +311,10 @@ fi
+@@ -295,7 +295,10 @@ fi
  AC_SUBST(ALSA_DEPLIBS)
  
  dnl Check for headers
--AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h])
-+AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h],
+-AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h sys/shm.h])
++AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h sys/shm.h],
 +  dnl Make sure wordexp is supported by the C library
 +  AC_CHECK_FUNCS([wordexp])
 +)
@@ -34,7 +34,7 @@
  dnl Check for resmgr support...
  AC_MSG_CHECKING(for resmgr support)
 diff --git a/src/userfile.c b/src/userfile.c
-index 3a73836..b8ce809 100644
+index 72779da..e9d13e6 100644
 --- a/src/userfile.c
 +++ b/src/userfile.c
 @@ -32,7 +32,7 @@
@@ -47,5 +47,5 @@
  #include <assert.h>
  int snd_user_file(const char *file, char **result)
 -- 
-1.9.1
+2.6.4
 
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
new file mode 100644
index 0000000..161619b
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib/avoid-including-sys-poll.h-directly.patch
@@ -0,0 +1,183 @@
+From 7dcf46969e85c881c901df4b49309e9091cad16a Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 9 Feb 2016 14:01:18 -0800
+Subject: [PATCH] avoid including <sys/poll.h> directly
+
+Fixes compiler warnings when building with musl libc.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ aserver/aserver.c         | 2 +-
+ include/asoundlib-head.h  | 2 +-
+ include/asoundlib.h       | 2 +-
+ include/local.h           | 2 +-
+ src/control/control.c     | 2 +-
+ src/control/control_shm.c | 2 +-
+ src/pcm/pcm_direct.c      | 2 +-
+ src/pcm/pcm_mmap.c        | 2 +-
+ src/pcm/pcm_share.c       | 2 +-
+ src/pcm/pcm_shm.c         | 2 +-
+ src/seq/seq.c             | 2 +-
+ src/shmarea.c             | 2 +-
+ 12 files changed, 12 insertions(+), 12 deletions(-)
+
+diff --git a/aserver/aserver.c b/aserver/aserver.c
+index 1579da7..ef64248 100644
+--- a/aserver/aserver.c
++++ b/aserver/aserver.c
+@@ -20,7 +20,7 @@
+ 
+ #include <sys/shm.h>
+ #include <sys/socket.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/un.h>
+ #include <sys/uio.h>
+ #include <stdio.h>
+diff --git a/include/asoundlib-head.h b/include/asoundlib-head.h
+index 1ec611e..21e32c6 100644
+--- a/include/asoundlib-head.h
++++ b/include/asoundlib-head.h
+@@ -35,6 +35,6 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <assert.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <errno.h>
+ #include <stdarg.h>
+diff --git a/include/asoundlib.h b/include/asoundlib.h
+index 3c2766e..a546194 100644
+--- a/include/asoundlib.h
++++ b/include/asoundlib.h
+@@ -35,7 +35,7 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <assert.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <errno.h>
+ #include <stdarg.h>
+ #include <endian.h>
+diff --git a/include/local.h b/include/local.h
+index b429f5d..e05898f 100644
+--- a/include/local.h
++++ b/include/local.h
+@@ -47,7 +47,7 @@
+ #error Header defining endianness not defined
+ #endif
+ #include <stdarg.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/types.h>
+ #include <errno.h>
+ #include <linux/types.h>
+diff --git a/src/control/control.c b/src/control/control.c
+index 4a28cf6..071c5db 100644
+--- a/src/control/control.c
++++ b/src/control/control.c
+@@ -48,7 +48,7 @@ and IEC958 structure.
+ #include <string.h>
+ #include <fcntl.h>
+ #include <signal.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include "control_local.h"
+ 
+ /**
+diff --git a/src/control/control_shm.c b/src/control/control_shm.c
+index bd07d4a..9a2e268 100644
+--- a/src/control/control_shm.c
++++ b/src/control/control_shm.c
+@@ -27,7 +27,7 @@
+ #include <fcntl.h>
+ #include <sys/shm.h>
+ #include <sys/socket.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/un.h>
+ #include <sys/uio.h>
+ #include <sys/mman.h>
+diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
+index fd3877c..52ac093 100644
+--- a/src/pcm/pcm_direct.c
++++ b/src/pcm/pcm_direct.c
+@@ -30,7 +30,7 @@
+ #include <grp.h>
+ #include <sys/ioctl.h>
+ #include <sys/mman.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/shm.h>
+ #include <sys/sem.h>
+ #include <sys/wait.h>
+diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c
+index 5c4fbe1..2cfa7db 100644
+--- a/src/pcm/pcm_mmap.c
++++ b/src/pcm/pcm_mmap.c
+@@ -22,7 +22,7 @@
+ #include <stdio.h>
+ #include <malloc.h>
+ #include <string.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/mman.h>
+ #ifdef HAVE_SYS_SHM_H
+ #include <sys/shm.h>
+diff --git a/src/pcm/pcm_share.c b/src/pcm/pcm_share.c
+index 5d8aaf2..21a57fc 100644
+--- a/src/pcm/pcm_share.c
++++ b/src/pcm/pcm_share.c
+@@ -34,7 +34,7 @@
+ #include <signal.h>
+ #include <math.h>
+ #include <sys/socket.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <pthread.h>
+ #include "pcm_local.h"
+ 
+diff --git a/src/pcm/pcm_shm.c b/src/pcm/pcm_shm.c
+index a815ac6..4ee958c 100644
+--- a/src/pcm/pcm_shm.c
++++ b/src/pcm/pcm_shm.c
+@@ -36,7 +36,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/shm.h>
+ #include <sys/socket.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/un.h>
+ #include <sys/mman.h>
+ #include <netinet/in.h>
+diff --git a/src/seq/seq.c b/src/seq/seq.c
+index 620ca3f..681cef1 100644
+--- a/src/seq/seq.c
++++ b/src/seq/seq.c
+@@ -777,7 +777,7 @@ void event_filter(snd_seq_t *seq, snd_seq_event_t *ev)
+ 
+ */
+ 
+-#include <sys/poll.h>
++#include <poll.h>
+ #include "seq_local.h"
+ 
+ /****************************************************************************
+diff --git a/src/shmarea.c b/src/shmarea.c
+index 9843aa8..eaa71f0 100644
+--- a/src/shmarea.c
++++ b/src/shmarea.c
+@@ -27,7 +27,7 @@
+ #include <malloc.h>
+ #include <string.h>
+ #include <errno.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/mman.h>
+ #include <sys/shm.h>
+ #include "list.h"
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.0.29.bb b/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.0.29.bb
deleted file mode 100644
index 730f427..0000000
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.0.29.bb
+++ /dev/null
@@ -1,51 +0,0 @@
-SUMMARY = "ALSA sound library"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
-SECTION = "libs/multimedia"
-LICENSE = "LGPLv2.1 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
-                    file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
-
-BBCLASSEXTEND = "native nativesdk"
-
-# configure.in sets -D__arm__ on the command line for any arm system
-# (not just those with the ARM instruction set), this should be removed,
-# (or replaced by a permitted #define).
-#FIXME: remove the following
-ARM_INSTRUCTION_SET = "arm"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
-           file://Check-if-wordexp-function-is-supported.patch \
-           file://0001-build-Do-not-try-to-detect-cross-compiler.patch \
-"
-SRC_URI[md5sum] = "de67e0eca72474d6b1121037dafe1024"
-SRC_URI[sha256sum] = "73043c35eb9636be0f4af6a240235c213f12a25feb1f04aeeac8cb7e30fcbdd0"
-
-inherit autotools pkgconfig
-
-require alsa-fpu.inc
-EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
-
-EXTRA_OECONF = "--disable-python"
-
-EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
-
-PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc"
-FILES_${PN} += "${libdir}/${BPN}/smixer/*.so"
-FILES_${PN}-dbg += "${libdir}/${BPN}/smixer/.debug"
-FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la"
-FILES_libasound = "${libdir}/libasound.so.*"
-FILES_alsa-server = "${bindir}/*"
-FILES_alsa-conf = "${datadir}/alsa/"
-FILES_alsa-conf-base = "\
-${datadir}/alsa/alsa.conf \
-${datadir}/alsa/cards/aliases.conf \
-${datadir}/alsa/pcm/default.conf \
-${datadir}/alsa/pcm/dmix.conf \
-${datadir}/alsa/pcm/dsnoop.conf"
-
-RDEPENDS_libasound = "alsa-conf-base alsa-conf"
-# upgrade path
-RPROVIDES_${PN}-dev = "alsa-dev"
-RREPLACES_${PN}-dev = "alsa-dev"
-RCONFLICTS_${PN}-dev = "alsa-dev"
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb b/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb
new file mode 100644
index 0000000..a73da28
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.0.bb
@@ -0,0 +1,51 @@
+SUMMARY = "ALSA sound library"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+                    file://src/socket.c;beginline=1;endline=26;md5=11ff89a8a7a4a690a5c78effe8159545"
+
+BBCLASSEXTEND = "native nativesdk"
+
+# configure.in sets -D__arm__ on the command line for any arm system
+# (not just those with the ARM instruction set), this should be removed,
+# (or replaced by a permitted #define).
+#FIXME: remove the following
+ARM_INSTRUCTION_SET = "arm"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2 \
+           file://Check-if-wordexp-function-is-supported.patch \
+           file://avoid-including-sys-poll.h-directly.patch \
+           file://0001-topology-Add-missing-include-sys-stat.h.patch \
+"
+SRC_URI[md5sum] = "69515ca73c3c4a212ef45160dea846c1"
+SRC_URI[sha256sum] = "dfde65d11e82b68f82e562ab6228c1fb7c78854345d3c57e2c68a9dd3dae1f15"
+
+inherit autotools pkgconfig
+
+require alsa-fpu.inc
+EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} "
+
+EXTRA_OECONF = "--disable-python"
+
+EXTRA_OECONF_append_libc-uclibc = " --with-versioned=no "
+
+PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc"
+FILES_${PN} += "${libdir}/${BPN}/smixer/*.so"
+FILES_${PN}-dev += "${libdir}/${BPN}/smixer/*.la"
+FILES_libasound = "${libdir}/libasound.so.*"
+FILES_alsa-server = "${bindir}/*"
+FILES_alsa-conf = "${datadir}/alsa/"
+FILES_alsa-conf-base = "\
+${datadir}/alsa/alsa.conf \
+${datadir}/alsa/cards/aliases.conf \
+${datadir}/alsa/pcm/default.conf \
+${datadir}/alsa/pcm/dmix.conf \
+${datadir}/alsa/pcm/dsnoop.conf"
+
+RDEPENDS_libasound = "alsa-conf-base alsa-conf"
+# upgrade path
+RPROVIDES_${PN}-dev = "alsa-dev"
+RREPLACES_${PN}-dev = "alsa-dev"
+RCONFLICTS_${PN}-dev = "alsa-dev"
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam-av-Include-sys-select.h-for-fd_set-definition.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam-av-Include-sys-select.h-for-fd_set-definition.patch
deleted file mode 100644
index c70c72c..0000000
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-arcam-av-Include-sys-select.h-for-fd_set-definition.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d28c655be3ac4fcb8024555983884f832ee18787 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 29 May 2015 15:17:30 -0700
-Subject: [PATCH] arcam-av: Include sys/select.h for fd_set definition
-
-fixes build errors on non-glibc based systems
-
-arcam-av/arcam_av.c:389:2: error: unknown type name 'fd_set'
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- arcam-av/arcam_av.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arcam-av/arcam_av.c b/arcam-av/arcam_av.c
-index 0491fc6..fff96f9 100644
---- a/arcam-av/arcam_av.c
-+++ b/arcam-av/arcam_av.c
-@@ -31,6 +31,7 @@
- #include <unistd.h>
- 
- #include <sys/ipc.h>
-+#include <sys/select.h>
- #include <sys/shm.h>
- #include <sys/stat.h>
- #include <sys/stat.h>
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-include-speexdsp_types.h-not-speex_types.h.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-include-speexdsp_types.h-not-speex_types.h.patch
deleted file mode 100644
index e5199fb..0000000
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-include-speexdsp_types.h-not-speex_types.h.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From ca41e96a49a568128354f65f90a769debf5435f1 Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
-Date: Thu, 9 Jul 2015 11:58:12 +0300
-Subject: [PATCH] include speexdsp_types.h, not speex_types.h
-
-Speexdsp was separated from speex in 1.2rc2. speex_types.h is not
-shipped by speexdsp, so alsa-plugins shouldn't use that file. speexdsp
-has speexdsp_types.h, which has the same contents as speex_types.h.
-
-speexdsp_types.h is a new file introduced in 1.2rc2, so this change
-bumps the minimum supported speexdsp version. The version check in
-configure.ac will actually break if speexdsp 1.2 ever gets released,
-because pkg-config thinks that "1.2" < "1.2rc2", but I think it's
-useful to fail if the installed speexdsp version is 1.2rc1 (which I
-believe is very common on current distributions). If a non-rc version
-of speexdsp will ever get released, I hope version number 1.2 will be
-skipped for this reason. (A non-rc version seems unlikely, since
-1.2rc1 was released years ago, so it's pretty likely that the project
-is stuck on so called "release candidates" forever...)
-
-Upstream-Status: Submitted (http://thread.gmane.org/gmane.linux.alsa.devel/141149)
-
-Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
----
- configure.ac          | 2 +-
- pph/arch.h            | 2 +-
- pph/speex_resampler.h | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 902a6d7..c554d22 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -108,7 +108,7 @@ AC_SUBST(AVCODEC_CFLAGS)
- AC_SUBST(AVCODEC_LIBS)
- AC_SUBST(AVCODEC_HEADER)
- 
--PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""])
-+PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2rc2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""])
- AM_CONDITIONAL(HAVE_SPEEXDSP, test "$HAVE_SPEEXDSP" = "yes")
- 
- AC_ARG_WITH([speex],
-diff --git a/pph/arch.h b/pph/arch.h
-index e2d731a..a07d0d9 100644
---- a/pph/arch.h
-+++ b/pph/arch.h
-@@ -36,7 +36,7 @@
- #define ARCH_H
- 
- #ifndef OUTSIDE_SPEEX
--#include "speex/speex_types.h"
-+#include "speex/speexdsp_types.h"
- #endif
- 
- #define ABS(x) ((x) < 0 ? (-(x)) : (x))      /**< Absolute integer value. */
-diff --git a/pph/speex_resampler.h b/pph/speex_resampler.h
-index c44fbcd..aa85abb 100644
---- a/pph/speex_resampler.h
-+++ b/pph/speex_resampler.h
-@@ -82,7 +82,7 @@
-       
- #else /* OUTSIDE_SPEEX */
- 
--#include "speex/speex_types.h"
-+#include "speex/speexdsp_types.h"
- 
- #endif /* OUTSIDE_SPEEX */
- 
--- 
-1.9.3
-
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch
new file mode 100644
index 0000000..8e5b6a2
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins/0001-pph-include-config.h-from-rate_speexrate.c.patch
@@ -0,0 +1,35 @@
+From 4350314c941489833a8baa930e16512e55f72a13 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Wed, 27 Jan 2016 13:22:38 +0200
+Subject: [PATCH] pph: include config.h from rate_speexrate.c
+
+Fixes compilation against libspeexdsp 1.2rc3.
+
+rate_speexrate.c includes speex_resampler.h, which depends on config.h
+by referencing the HAVE_SPEEX_SPEEXDSP_TYPES_H macro. AFAIK it's not
+a good idea to include config.h from headers (I don't know/remember
+why, though), which is why I include config.h from rate_speexrate.c
+instead of speex_resampler.h.
+
+Upstream-Status: Accepted [expected in 1.1.1]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ pph/rate_speexrate.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pph/rate_speexrate.c b/pph/rate_speexrate.c
+index 0a1325c..8fc4cef 100644
+--- a/pph/rate_speexrate.c
++++ b/pph/rate_speexrate.c
+@@ -28,6 +28,7 @@
+    POSSIBILITY OF SUCH DAMAGE.
+ */
+ 
++#include "config.h"
+ #include <stdio.h>
+ #include <alsa/asoundlib.h>
+ #include <alsa/pcm_rate.h>
+-- 
+2.7.0.rc3
+
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb b/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb
deleted file mode 100644
index c928618..0000000
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.0.29.bb
+++ /dev/null
@@ -1,105 +0,0 @@
-DESCRIPTION = "ALSA Plugins"
-HOMEPAGE = "http://alsa-project.org"
-SECTION = "multimedia"
-
-# The primary license of alsa-plugins is LGPLv2.1.
-#
-# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
-# build system, and doesn't affect the licensing of the build result.
-#
-# The samplerate plugin source code is licensed under GPLv2+ to be consistent
-# with the libsamplerate license.
-LICENSE = "LGPLv2.1 & GPLv2+"
-LIC_FILES_CHKSUM = "\
-        file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
-        file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
-        file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
-        file://rate/rate_samplerate.c;endline=19;md5=f3d3ce0b189846a486517d97a854b276 \
-"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2 \
-           file://0001-arcam-av-Include-sys-select.h-for-fd_set-definition.patch \
-           file://0001-include-speexdsp_types.h-not-speex_types.h.patch \
-"
-SRC_URI[md5sum] = "a66797b4471e3cbe96575207bfbe252c"
-SRC_URI[sha256sum] = "325d85cac285f632b83e0191ae3f348bad03c1f007b937042f164abb81ea6532"
-
-DEPENDS += "alsa-lib"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "\
-        samplerate \
-        speexdsp \
-        ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
-"
-PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
-PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
-PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
-PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
-PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
-PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
-PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
-
-PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
-
-PACKAGES_DYNAMIC = "^libasound-module-.*"
-
-# The alsa-plugins package doesn't itself contain anything, it just depends on
-# all built plugins.
-ALLOW_EMPTY_${PN} = "1"
-
-do_install_append() {
-	rm ${D}${libdir}/alsa-lib/*.la
-
-	# We use the example as is, so just drop the .example suffix.
-	if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
-		mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
-	fi
-}
-
-python populate_packages_prepend() {
-    plugindir = bb.data.expand('${libdir}/alsa-lib/', d)
-    packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
-    d.setVar("RDEPENDS_alsa-plugins", packages)
-}
-
-# The rate plugins create some symlinks. For example, the samplerate plugin
-# creates these links to the main plugin file:
-#
-#   libasound_module_rate_samplerate_best.so
-#   libasound_module_rate_samplerate_linear.so
-#   libasound_module_rate_samplerate_medium.so
-#   libasound_module_rate_samplerate_order.so
-#
-# The other rate plugins create similar links. We have to add the links to
-# FILES manually, because do_split_packages() skips the links (which is good,
-# because we wouldn't want do_split_packages() to create separate packages for
-# the symlinks).
-#
-# The symlinks cause QA errors, because usually it's a bug if a non
-# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
-# the errors are false positives, so we disable the QA checks.
-FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
-FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
-FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
-INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
-
-FILES_${PN}-dbg += "${libdir}/alsa-lib/.debug"
-
-# 50-pulseaudio.conf defines a device named "pulse" that applications can use
-# if they explicitly want to use the PulseAudio plugin.
-# 99-pulseaudio-default.conf configures the "default" device to use the
-# PulseAudio plugin.
-FILES_${PN}-pulseaudio-conf += "\
-        ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
-        ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
-"
-
-RDEPENDS_${PN}-pulseaudio-conf += "\
-        libasound-module-conf-pulse \
-        libasound-module-ctl-pulse \
-        libasound-module-pcm-pulse \
-"
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb b/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb
new file mode 100644
index 0000000..fec6575
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.0.bb
@@ -0,0 +1,105 @@
+SUMMARY = "ALSA Plugins"
+HOMEPAGE = "http://alsa-project.org"
+SECTION = "multimedia"
+
+# The primary license of alsa-plugins is LGPLv2.1.
+#
+# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the
+# build system, and doesn't affect the licensing of the build result.
+#
+# The samplerate plugin source code is licensed under GPLv2+ to be consistent
+# with the libsamplerate license. However, if the licensee has a commercial
+# license for libsamplerate, the samplerate plugin may be used under the terms
+# of LGPLv2.1 like the rest of the plugins.
+LICENSE = "LGPLv2.1 & GPLv2+"
+LIC_FILES_CHKSUM = "\
+        file://COPYING;md5=7fbc338309ac38fefcd64b04bb903e34 \
+        file://COPYING.GPL;md5=94d55d512a9ba36caa9b7df079bae19f \
+        file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \
+        file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \
+"
+
+SRC_URI = "\
+        ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2 \
+        file://0001-pph-include-config.h-from-rate_speexrate.c.patch \
+"
+SRC_URI[md5sum] = "b123e42ed881b9adbc99e4040f257c39"
+SRC_URI[sha256sum] = "3b83c329953bef99f5fe25ae04ec4a455fe6514939f3b45a5321966652b2c9ee"
+
+DEPENDS += "alsa-lib"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "\
+        samplerate \
+        speexdsp \
+        ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
+"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav"
+PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack"
+PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin"
+PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus"
+PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio"
+PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0"
+PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp"
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
+
+PACKAGES_DYNAMIC = "^libasound-module-.*"
+
+# The alsa-plugins package doesn't itself contain anything, it just depends on
+# all built plugins.
+ALLOW_EMPTY_${PN} = "1"
+
+do_install_append() {
+	rm ${D}${libdir}/alsa-lib/*.la
+
+	# We use the example as is, so just drop the .example suffix.
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then
+		mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf
+	fi
+}
+
+python populate_packages_prepend() {
+    plugindir = bb.data.expand('${libdir}/alsa-lib/', d)
+    packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends=''))
+    d.setVar("RDEPENDS_alsa-plugins", packages)
+}
+
+# The rate plugins create some symlinks. For example, the samplerate plugin
+# creates these links to the main plugin file:
+#
+#   libasound_module_rate_samplerate_best.so
+#   libasound_module_rate_samplerate_linear.so
+#   libasound_module_rate_samplerate_medium.so
+#   libasound_module_rate_samplerate_order.so
+#
+# The other rate plugins create similar links. We have to add the links to
+# FILES manually, because do_split_packages() skips the links (which is good,
+# because we wouldn't want do_split_packages() to create separate packages for
+# the symlinks).
+#
+# The symlinks cause QA errors, because usually it's a bug if a non
+# -dev/-dbg/-nativesdk package contains links to .so files, but in this case
+# the errors are false positives, so we disable the QA checks.
+FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so"
+FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so"
+INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so"
+
+# 50-pulseaudio.conf defines a device named "pulse" that applications can use
+# if they explicitly want to use the PulseAudio plugin.
+# 99-pulseaudio-default.conf configures the "default" device to use the
+# PulseAudio plugin.
+FILES_${PN}-pulseaudio-conf += "\
+        ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \
+        ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \
+"
+
+RDEPENDS_${PN}-pulseaudio-conf += "\
+        libasound-module-conf-pulse \
+        libasound-module-ctl-pulse \
+        libasound-module-pcm-pulse \
+"
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
index 59391d6..319f25d 100644
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/autotools.patch
@@ -20,7 +20,7 @@
 --- alsa-tools-1.0.24.1-orig//Makefile	2011-07-06 11:27:40.207665000 +0800
 +++ alsa-tools-1.0.24.1/Makefile	2011-07-14 15:08:08.877665009 +0800
 @@ -1,8 +1,8 @@
- VERSION = 1.0.29
+ VERSION = 1.1.0
  TOP = .
 -SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \
 +SUBDIRS = as10k1 envy24control \
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
index c957609..9bd6848 100644
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools/makefile_no_gtk.patch
@@ -14,7 +14,7 @@
 --- a/Makefile
 +++ b/Makefile
 @@ -1,9 +1,9 @@
- VERSION = 1.0.29
+ VERSION = 1.1.0
  TOP = .
 -SUBDIRS = as10k1 envy24control \
 -	  mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.0.29.bb b/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.0.29.bb
deleted file mode 100644
index fdf396e..0000000
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.0.29.bb
+++ /dev/null
@@ -1,42 +0,0 @@
-SUMMARY = "Advanced tools for certain ALSA sound card drivers"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
-SECTION = "console/utils"
-LICENSE = "GPLv2 & LGPLv2+"
-DEPENDS = "alsa-lib ncurses glib-2.0"
-
-LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
-           file://autotools.patch \
-           ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
-                                'file://makefile_no_gtk.patch', d)} \
-           file://gitcompile_hdajacksensetest \
-           file://0001-as10k1-Make-output_tram_line-static-inline.patch \
-          "
-
-SRC_URI[md5sum] = "f339a3cd24f748c9d007bdff0e98775b"
-SRC_URI[sha256sum] = "94abf0ab5a73f0710c70d4fb3dc1003af5bae2d2ed721d59d245b41ad0f2fbd1"
-
-inherit autotools-brokensep pkgconfig
-
-CLEANBROKEN = "1"
-
-EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
-PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
-
-# configure.ac/.in doesn't exist so force copy
-AUTOTOOLS_COPYACLOCAL = "1"
-
-do_compile_prepend () {
-    #Automake dir is not correctly detected in cross compilation case
-    export AUTOMAKE_DIR="$(automake --print-libdir)"
-    export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/"
-
-    cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile
-}
-
-FILES_${PN} += "${datadir}/ld10k1"
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb b/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
new file mode 100644
index 0000000..9e633f1
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.0.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Advanced tools for certain ALSA sound card drivers"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
+SECTION = "console/utils"
+LICENSE = "GPLv2 & LGPLv2+"
+DEPENDS = "alsa-lib ncurses glib-2.0"
+
+LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://ld10k1/COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \
+           file://autotools.patch \
+           ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \
+                                'file://makefile_no_gtk.patch', d)} \
+           file://gitcompile_hdajacksensetest \
+           file://0001-as10k1-Make-output_tram_line-static-inline.patch \
+          "
+
+SRC_URI[md5sum] = "b476a5afaa3ea3230855553ad59d259d"
+SRC_URI[sha256sum] = "7d34558c590a50294b36576d257316a1ac5cd951eb8cd7d330e09f8cc757ab51"
+
+inherit autotools-brokensep pkgconfig
+
+CLEANBROKEN = "1"
+
+EXTRA_OEMAKE += "GITCOMPILE_ARGS='--host=${HOST_SYS} --build=${BUILD_SYS} --target=${TARGET_SYS} --with-libtool-sysroot=${STAGING_DIR_HOST} --prefix=${prefix}'"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gtk+', '', d)}"
+PACKAGECONFIG[gtk+] = ",,gtk+ gtk+3,"
+
+# configure.ac/.in doesn't exist so force copy
+AUTOTOOLS_COPYACLOCAL = "1"
+
+do_compile_prepend () {
+    #Automake dir is not correctly detected in cross compilation case
+    export AUTOMAKE_DIR="$(automake --print-libdir)"
+    export ACLOCAL_FLAGS="--system-acdir=${ACLOCALDIR}/"
+
+    cp ${WORKDIR}/gitcompile_hdajacksensetest ${S}/hdajacksensetest/gitcompile
+}
+
+FILES_${PN} += "${datadir}/ld10k1"
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.0.29.bb b/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb
similarity index 100%
rename from yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.0.29.bb
rename to yocto-poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.0.bb
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch
new file mode 100644
index 0000000..b6d7d4f
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsabat-rename-to-avoid-naming-conflict.patch
@@ -0,0 +1,153 @@
+From 28c29dece6c434e7d3d01e805555ba7ddf6fba65 Mon Sep 17 00:00:00 2001
+From: "Lu, Han" <han.lu@intel.com>
+Date: Wed, 3 Feb 2016 14:20:33 +0800
+Subject: [PATCH] alsabat: rename to avoid naming conflict
+
+alsa-utils as well as bareos-bat (as well a some Bacula packages)
+all contain a program called /usr/bin/bat, which causes conflicts on
+various distributions ("basic audio tester" vs "bareos administration
+tool"("bacula administration tool")).
+Rename to avoid conflict.
+
+Signed-off-by: Lu, Han <han.lu@intel.com>
+Signed-off-by: Takashi Iwai <tiwai@suse.de>
+
+Upstream-Status: Accepted [expected in version 1.1.1]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ bat/Makefile.am          | 10 +++++-----
+ bat/{bat.1 => alsabat.1} | 43 ++++++++++++++++++++++---------------------
+ bat/bat.c                |  2 +-
+ 3 files changed, 28 insertions(+), 27 deletions(-)
+ rename bat/{bat.1 => alsabat.1} (72%)
+
+diff --git a/bat/Makefile.am b/bat/Makefile.am
+index 842ae6b..985f00c 100644
+--- a/bat/Makefile.am
++++ b/bat/Makefile.am
+@@ -1,9 +1,9 @@
+-bin_PROGRAMS = bat
+-man_MANS = bat.1
++bin_PROGRAMS = alsabat
++man_MANS = alsabat.1
+ 
+-EXTRA_DIST = bat.1
++EXTRA_DIST = alsabat.1
+ 
+-bat_SOURCES = \
++alsabat_SOURCES = \
+ 	bat.c \
+ 	common.c \
+ 	analyze.c \
+@@ -21,4 +21,4 @@ noinst_HEADERS = \
+ AM_CPPFLAGS = \
+ 	      -Wall -I$(top_srcdir)/include
+ 
+-bat_LDADD = @FFTW_LIB@
++alsabat_LDADD = @FFTW_LIB@
+diff --git a/bat/bat.1 b/bat/alsabat.1
+similarity index 72%
+rename from bat/bat.1
+rename to bat/alsabat.1
+index e00fc27..8d0b9c0 100644
+--- a/bat/bat.1
++++ b/bat/alsabat.1
+@@ -1,23 +1,23 @@
+-.TH BAT 1 "20th October 2015"
++.TH ALSABAT 1 "20th October 2015"
+ .SH NAME
+-bat \- command\-line sound tester for ALSA sound card driver
++alsabat \- command\-line sound tester for ALSA sound card driver
+ 
+ .SH SYNOPSIS
+-\fBbat\fP [\fIflags\fP]
++\fBalsabat\fP [\fIflags\fP]
+ 
+ .SH DESCRIPTION
+-\fBBAT(Basic Audio Tester)\fP is a simple command\-line utility intended
+-to help automate audio driver and sound server testing with little human
+-interaction. BAT can be used to test audio quality, stress test features
+-and test audio before and after PM state changes.
++\fBALSABAT(ALSA Basic Audio Tester)\fP is a simple command\-line utility
++intended to help automate audio driver and sound server testing with little
++human interaction. ALSABAT can be used to test audio quality, stress test
++features and test audio before and after PM state changes.
+ 
+-BAT's design is relatively simple. BAT plays an audio stream and captures
+-the same stream in either a digital or analog loop back. It then compares
+-the captured stream using a FFT to the original to determine if the test
+-case passes or fails.
++ALSABAT's design is relatively simple. ALSABAT plays an audio stream and
++captures the same stream in either a digital or analog loop back. It then
++compares the captured stream using a FFT to the original to determine if
++the test case passes or fails.
+ 
+-BAT can either run wholly on the target machine being tested (standalone
+-mode) or can run as a client/server mode where by bat client runs on the
++ALSABAT can either run wholly on the target machine being tested (standalone
++mode) or can run as a client/server mode where by alsabat client runs on the
+ target and runs as a server on a separate tester machine. The client/server
+ mode still requires some manual interaction for synchronization, but this
+ is actively being developed for future releases.
+@@ -93,8 +93,8 @@ Frequencies with amplitude larger than threshold will be recognized as a
+ peak, and the frequency with largest peak value will be recognized as a
+ detected frequency.
+ .br
+-BAT then compares the detected frequency to target frequency, to decide
+-if the detecting passes or fails.
++ALSABAT then compares the detected frequency to target frequency, to
++decide if the detecting passes or fails.
+ .br
+ The default value is 3.0.
+ .TP
+@@ -117,18 +117,19 @@ Target WAV file to save capture test content.
+ .TP
+ \fI\-\-local\fP
+ Internal loopback mode.
+-Playback, capture and analysis internal to BAT only. This is intended for
+-developers to test new BAT features as no audio is routed outside of BAT.
++Playback, capture and analysis internal to ALSABAT only. This is intended
++for developers to test new ALSABAT features as no audio is routed outside
++of ALSABAT.
+ 
+ .SH EXAMPLES
+ 
+ .TP
+-\fBbat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR
++\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR
+ Generate and play a sine wave of 250 Hertz with 2 channel and S32_LE format,
+ and then capture and analyze.
+ 
+ .TP
+-\fBbat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR
++\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR
+ Play the RIFF WAV file "500Hz.wav" which contains 500 Hertz waveform LPCM
+ data, and then capture and analyze.
+ 
+@@ -152,7 +153,7 @@ Currently only support RIFF WAV format with PCM data. Please report any bugs to
+ the alsa-devel mailing list.
+ 
+ .SH AUTHOR
+-\fBbat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>, Bernard Gautier
+-<bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
++\fBalsabat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>, Bernard
++Gautier <bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
+ This document is by Liam Girdwood <liam.r.girdwood@linux.intel.com> and Han Lu
+ <han.lu@intel.com>.
+diff --git a/bat/bat.c b/bat/bat.c
+index 086b9fa..ddb60b7 100644
+--- a/bat/bat.c
++++ b/bat/bat.c
+@@ -272,7 +272,7 @@ static void test_capture(struct bat *bat)
+ static void usage(struct bat *bat)
+ {
+ 	fprintf(bat->log,
+-_("Usage: bat [-options]...\n"
++_("Usage: alsabat [-options]...\n"
+ "\n"
+ "  -h, --help             this help\n"
+ "  -D                     pcm device for both playback and capture\n"
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
index e99dd51..e578dfe 100644
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch
@@ -1,4 +1,4 @@
-From 43a56fa36a12f09ccd78b3cf5e6ae197fcab501f Mon Sep 17 00:00:00 2001
+From 8c3e0ef9625066c2bb67ee3d2b8cd37fd44eadac Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Fri, 29 Aug 2014 18:58:56 +0300
 Subject: [PATCH] alsactl: don't let systemd unit restore the volume when
@@ -12,16 +12,20 @@
 
 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
 Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
+
+Rebased on 1.1.0.
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
 ---
  alsactl/Makefile.am             | 7 ++++---
  alsactl/alsa-restore.service.in | 1 +
  2 files changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
-index 47f06e9..b728c06 100644
+index cac8094..ff865dc 100644
 --- a/alsactl/Makefile.am
 +++ b/alsactl/Makefile.am
-@@ -43,9 +43,10 @@ install-data-hook:
+@@ -38,9 +38,10 @@ install-data-hook:
  endif
  
  edit = \
@@ -36,17 +40,17 @@
  
  alsa-state.service: alsa-state.service.in
 diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
-index 245a439..b017854 100644
+index 2884098..bac3ccc 100644
 --- a/alsactl/alsa-restore.service.in
 +++ b/alsactl/alsa-restore.service.in
-@@ -10,6 +10,7 @@ DefaultDependencies=no
+@@ -8,6 +8,7 @@ Description=Save/Restore Sound Card State
+ ConditionPathExists=!@daemonswitch@
+ ConditionPathExistsGlob=/dev/snd/control*
  After=alsa-state.service
- Before=shutdown.target
- Conflicts=shutdown.target
 +ConditionPathExists=@localstatedir@/lib/alsa/asound.state
  
  [Service]
  Type=oneshot
 -- 
-1.9.1
+2.7.0.rc3
 
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
deleted file mode 100644
index 5df004a..0000000
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/alsa-utils-aplay-interrupt-signal-handling.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Upstream-Status: Pending
-
-aplay/arecord (alsa-utils v1.0.28) cannot interrupt streaming
-via CTRL-C. Fixed the issue by reverting buggy patches and
-properly handling 'in_aborting' flag in appropriate functions.
-
-Signed-off-by: Anant Agrawal <Anant_Agrawal@mentor.com>
-Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
-
---- a/aplay/aplay.c	2014-05-19 16:25:14.000000000 +0530
-+++ b/aplay/aplay.c	2014-05-20 15:17:14.364823007 +0530
-@@ -392,14 +392,22 @@
- 		putchar('\n');
- 	if (!quiet_mode)
- 		fprintf(stderr, _("Aborted by signal %s...\n"), strsignal(sig));
--	if (handle)
-+	if (stream == SND_PCM_STREAM_CAPTURE) {
-+		if (fmt_rec_table[file_type].end) {
-+			fmt_rec_table[file_type].end(fd);
-+			fd = -1;
-+		}
-+		stream = -1;
-+	}
-+	if (fd > 1) {
-+		close(fd);
-+		fd = -1;
-+	}
-+	if (handle && sig != SIGABRT) {
- 		snd_pcm_abort(handle);
--	if (sig == SIGABRT) {
--		/* do not call snd_pcm_close() and abort immediately */
- 		handle = NULL;
--		prg_exit(EXIT_FAILURE);
- 	}
--	signal(sig, signal_handler);
-+	prg_exit(EXIT_FAILURE);
- }
- 
- /* call on SIGUSR1 signal. */
-@@ -2096,7 +2104,7 @@
- 	ssize_t result = count, r;
- 	size_t size;
- 
--	while (count > 0) {
-+	while (count > 0 && !in_aborting) {
- 		size = count;
- 		if (size > chunk_bytes - buffer_pos)
- 			size = chunk_bytes - buffer_pos;
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/assume-storing-is-success-if-not-sound-card-device.patch b/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/assume-storing-is-success-if-not-sound-card-device.patch
deleted file mode 100644
index f67283d..0000000
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils/assume-storing-is-success-if-not-sound-card-device.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-[PATCH] assume storing is success if not sound card device
-
-Upstream-Statue: Pending
-
-Systemd will report failure when run alsa-*, if the machine has not the
-sound card. To void this annoyed message, alsa-restore/alsa-state ignore
-all the exit codes by prefixing "-" in ExecStart, like:
-
-   alsa-utils-1.0.29$ grep "=-" ./ -r|grep service.in
-   ./alsactl/alsa-restore.service.in:ExecStart=-@sbindir@/alsactl restore
-   ./alsactl/alsa-state.service.in:ExecStart=-@sbindir@/alsactl -s -n 19 -c rdaemon
-   ./alsactl/alsa-state.service.in:ExecStop=-@sbindir@/alsactl -s kill save_and_quit
-   lsa-utils-1.0.29$
-
-But alsa-store.service.in is missing, and better solution is to ignore
-the exit code 19 which means not sound card device, not all exit code
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- alsactl/alsa-store.service.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/alsactl/alsa-store.service.in b/alsactl/alsa-store.service.in
-index f1a56bb..68ca529 100644
---- a/alsactl/alsa-store.service.in
-+++ b/alsactl/alsa-store.service.in
-@@ -13,3 +13,4 @@ Before=shutdown.target
- Type=oneshot
- ExecStart=@sbindir@/alsactl store
- StandardOutput=syslog
-+SuccessExitStatus=0 19
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb b/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb
deleted file mode 100644
index 97fe4b2..0000000
--- a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.0.29.bb
+++ /dev/null
@@ -1,97 +0,0 @@
-SUMMARY = "ALSA sound utilities"
-HOMEPAGE = "http://www.alsa-project.org"
-BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
-SECTION = "console/utils"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-                    file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
-DEPENDS = "alsa-lib ncurses libsamplerate0"
-
-PACKAGECONFIG ??= "udev"
-PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
-PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
-
-SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
-           file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
-           file://alsa-utils-aplay-interrupt-signal-handling.patch \
-           file://assume-storing-is-success-if-not-sound-card-device.patch \
-          "
-
-SRC_URI[md5sum] = "6b289bf874c4c9a63f4b3973093dd404"
-SRC_URI[sha256sum] = "5160058f3e14483ced5de919dd473f93932059454530a9b7ef97dcabd6833e9b"
-
-# lazy hack. needs proper fixing in gettext.m4, see
-# http://bugs.openembedded.org/show_bug.cgi?id=2348
-# please close bug and remove this comment when properly fixed
-#
-EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
-
-inherit autotools gettext pkgconfig
-
-# This are all packages that we need to make. Also, the now empty alsa-utils
-# ipk depends on them.
-
-ALSA_UTILS_PKGS = "\
-             alsa-utils-alsamixer \
-             alsa-utils-midi \
-             alsa-utils-aplay \
-             alsa-utils-amixer \
-             alsa-utils-aconnect \
-             alsa-utils-iecset \
-             alsa-utils-speakertest \
-             alsa-utils-aseqnet \
-             alsa-utils-aseqdump \
-             alsa-utils-alsactl \
-             alsa-utils-alsaloop \
-             alsa-utils-alsaucm \
-            "
-
-PACKAGES += "${ALSA_UTILS_PKGS}"
-RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
-
-FILES_${PN} = ""
-FILES_alsa-utils-aplay       = "${bindir}/aplay ${bindir}/arecord"
-FILES_alsa-utils-amixer      = "${bindir}/amixer"
-FILES_alsa-utils-alsamixer   = "${bindir}/alsamixer"
-FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
-FILES_alsa-utils-midi        = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
-FILES_alsa-utils-aconnect    = "${bindir}/aconnect"
-FILES_alsa-utils-aseqnet     = "${bindir}/aseqnet"
-FILES_alsa-utils-iecset      = "${bindir}/iecset"
-FILES_alsa-utils-alsactl     = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
-FILES_alsa-utils-aseqdump    = "${bindir}/aseqdump"
-FILES_alsa-utils-alsaloop    = "${bindir}/alsaloop"
-FILES_alsa-utils-alsaucm     = "${bindir}/alsaucm"
-
-
-SUMMARY_alsa-utils-aplay        = "Play (and record) sound files using ALSA"
-SUMMARY_alsa-utils-amixer       = "Command-line control for ALSA mixer and settings"
-SUMMARY_alsa-utils-alsamixer    = "ncurses-based control for ALSA mixer and settings"
-SUMMARY_alsa-utils-speakertest  = "ALSA surround speaker test utility"
-SUMMARY_alsa-utils-midi         = "Miscellaneous MIDI utilities for ALSA"
-SUMMARY_alsa-utils-aconnect     = "ALSA sequencer connection manager"
-SUMMARY_alsa-utils-aseqnet      = "Network client/server for ALSA sequencer"
-SUMMARY_alsa-utils-iecset       = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
-SUMMARY_alsa-utils-alsactl      = "Saves/restores ALSA-settings in /etc/asound.state"
-SUMMARY_alsa-utils-aseqdump     = "Shows the events received at an ALSA sequencer port"
-SUMMARY_alsa-utils-alsaloop     = "ALSA PCM loopback utility"
-SUMMARY_alsa-utils-alsaucm      = "ALSA Use Case Manager"
-
-RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
-
-ALLOW_EMPTY_alsa-utils = "1"
-
-do_install() {
-	autotools_do_install
-
-	# We don't ship this here because it requires a dependency on bash.
-	# See alsa-utils-scripts_${PV}.bb
-	rm ${D}${sbindir}/alsaconf
-	rm ${D}${sbindir}/alsa-info.sh
-
-	if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then
-	   # This is where alsa-utils will install its rules if we don't tell it anything else.
-	   rm -rf ${D}/lib/udev
-	   rmdir --ignore-fail-on-non-empty ${D}/lib
-	fi
-}
diff --git a/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb b/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb
new file mode 100644
index 0000000..af40488
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.0.bb
@@ -0,0 +1,102 @@
+SUMMARY = "ALSA sound utilities"
+HOMEPAGE = "http://www.alsa-project.org"
+BUGTRACKER = "https://bugtrack.alsa-project.org/alsa-bug/login_page.php"
+SECTION = "console/utils"
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+                    file://alsactl/utils.c;beginline=1;endline=20;md5=fe9526b055e246b5558809a5ae25c0b9"
+DEPENDS = "alsa-lib ncurses libsamplerate0"
+
+PACKAGECONFIG ??= "udev"
+PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftw"
+PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,,udev"
+PACKAGECONFIG[xmlto] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native"
+
+SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \
+           file://0001-alsactl-don-t-let-systemd-unit-restore-the-volume-wh.patch \
+           file://0001-alsabat-rename-to-avoid-naming-conflict.patch \
+          "
+
+SRC_URI[md5sum] = "b9d6102fbbd0b68040bb77023ed30c0c"
+SRC_URI[sha256sum] = "3b1c3135b76e14532d3dd23fb15759ddd7daf9ffbc183f7a9a0a3a86374748f1"
+
+# lazy hack. needs proper fixing in gettext.m4, see
+# http://bugs.openembedded.org/show_bug.cgi?id=2348
+# please close bug and remove this comment when properly fixed
+#
+EXTRA_OECONF_append_libc-uclibc = " --disable-nls"
+
+inherit autotools gettext pkgconfig
+
+# This are all packages that we need to make. Also, the now empty alsa-utils
+# ipk depends on them.
+
+ALSA_UTILS_PKGS = "\
+             ${@bb.utils.contains('PACKAGECONFIG', 'bat', 'alsa-utils-alsabat', '', d)} \
+             alsa-utils-alsamixer \
+             alsa-utils-alsatplg \
+             alsa-utils-midi \
+             alsa-utils-aplay \
+             alsa-utils-amixer \
+             alsa-utils-aconnect \
+             alsa-utils-iecset \
+             alsa-utils-speakertest \
+             alsa-utils-aseqnet \
+             alsa-utils-aseqdump \
+             alsa-utils-alsactl \
+             alsa-utils-alsaloop \
+             alsa-utils-alsaucm \
+            "
+
+PACKAGES += "${ALSA_UTILS_PKGS}"
+RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}"
+
+FILES_${PN} = ""
+FILES_alsa-utils-alsabat     = "${bindir}/alsabat"
+FILES_alsa-utils-alsatplg    = "${bindir}/alsatplg"
+FILES_alsa-utils-aplay       = "${bindir}/aplay ${bindir}/arecord"
+FILES_alsa-utils-amixer      = "${bindir}/amixer"
+FILES_alsa-utils-alsamixer   = "${bindir}/alsamixer"
+FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/"
+FILES_alsa-utils-midi        = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi"
+FILES_alsa-utils-aconnect    = "${bindir}/aconnect"
+FILES_alsa-utils-aseqnet     = "${bindir}/aseqnet"
+FILES_alsa-utils-iecset      = "${bindir}/iecset"
+FILES_alsa-utils-alsactl     = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/"
+FILES_alsa-utils-aseqdump    = "${bindir}/aseqdump"
+FILES_alsa-utils-alsaloop    = "${bindir}/alsaloop"
+FILES_alsa-utils-alsaucm     = "${bindir}/alsaucm"
+
+SUMMARY_alsa-utils-alsabat      = "Command-line sound tester for ALSA sound card driver"
+SUMMARY_alsa-utils-alsatplg     = "Converts topology text files into binary format for kernel"
+SUMMARY_alsa-utils-aplay        = "Play (and record) sound files using ALSA"
+SUMMARY_alsa-utils-amixer       = "Command-line control for ALSA mixer and settings"
+SUMMARY_alsa-utils-alsamixer    = "ncurses-based control for ALSA mixer and settings"
+SUMMARY_alsa-utils-speakertest  = "ALSA surround speaker test utility"
+SUMMARY_alsa-utils-midi         = "Miscellaneous MIDI utilities for ALSA"
+SUMMARY_alsa-utils-aconnect     = "ALSA sequencer connection manager"
+SUMMARY_alsa-utils-aseqnet      = "Network client/server for ALSA sequencer"
+SUMMARY_alsa-utils-iecset       = "ALSA utility for setting/showing IEC958 (S/PDIF) status bits"
+SUMMARY_alsa-utils-alsactl      = "Saves/restores ALSA-settings in /etc/asound.state"
+SUMMARY_alsa-utils-aseqdump     = "Shows the events received at an ALSA sequencer port"
+SUMMARY_alsa-utils-alsaloop     = "ALSA PCM loopback utility"
+SUMMARY_alsa-utils-alsaucm      = "ALSA Use Case Manager"
+
+RRECOMMENDS_alsa-utils-alsactl = "alsa-states"
+
+ALLOW_EMPTY_alsa-utils = "1"
+
+do_install() {
+	autotools_do_install
+
+	# We don't ship this here because it requires a dependency on bash.
+	# See alsa-utils-scripts_${PV}.bb
+	rm ${D}${sbindir}/alsaconf
+	rm ${D}${sbindir}/alsa-info.sh
+
+	if ${@bb.utils.contains('PACKAGECONFIG', 'udev', 'false', 'true', d)}; then
+	   # This is where alsa-utils will install its rules if we don't tell it anything else.
+	   rm -rf ${D}/lib/udev
+	   rmdir --ignore-fail-on-non-empty ${D}/lib
+	fi
+}
diff --git a/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb b/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb
new file mode 100644
index 0000000..1dfbb9b
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/ffmpeg/ffmpeg_3.0.bb
@@ -0,0 +1,139 @@
+SUMMARY = "A complete, cross-platform solution to record, convert and stream audio and video."
+DESCRIPTION = "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, \
+               mux, demux, stream, filter and play pretty much anything that humans and machines \
+               have created. It supports the most obscure ancient formats up to the cutting edge."
+HOMEPAGE = "https://www.ffmpeg.org/"
+SECTION = "libs"
+
+LICENSE = "GPLv2+"
+LICENSE_FLAGS = "commercial"
+
+LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+                    file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "ef9b6634bb7c920efc940b4d55adf7b2"
+SRC_URI[sha256sum] = "12f32cee41c74435f608c30793fd616bdf53467bb513278e273e135a4c58e470"
+
+# Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
+ARM_INSTRUCTION_SET = "arm"
+
+# Should be API compatible with libav (which was a fork of ffmpeg)
+# libpostproc was previously packaged from a separate recipe
+PROVIDES = "libav libpostproc"
+
+DEPENDS = "alsa-lib zlib libogg yasm-native"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \
+                   bzlib gpl lzma theora x264 \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11 xv', '', d)}"
+
+# libraries to build in addition to avutil
+PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice"
+PACKAGECONFIG[avfilter] = "--enable-avfilter,--disable-avfilter"
+PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec"
+PACKAGECONFIG[avformat] = "--enable-avformat,--disable-avformat"
+PACKAGECONFIG[swresample] = "--enable-swresample,--disable-swresample"
+PACKAGECONFIG[swscale] = "--enable-swscale,--disable-swscale"
+PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc"
+PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample"
+
+# features to support
+PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2"
+PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl"
+PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
+PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
+PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz"
+PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
+PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
+PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
+PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
+PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
+PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
+PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
+PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
+PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
+PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv"
+
+# Check codecs that require --enable-nonfree
+USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
+
+EXTRA_OECONF = " \
+    --disable-stripping \
+    --enable-pic \
+    --enable-shared \
+    --enable-pthreads \
+    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
+    \
+    --cross-prefix=${TARGET_PREFIX} \
+    \
+    --ld="${CCLD}" \
+    --arch=${TARGET_ARCH} \
+    --target-os="linux" \
+    --enable-cross-compile \
+    --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
+    --extra-ldflags="${TARGET_LDFLAGS}" \
+    --sysroot="${STAGING_DIR_TARGET}" \
+    --enable-hardcoded-tables \
+    ${EXTRA_FFCONF} \
+    --libdir=${libdir} \
+    --shlibdir=${libdir} \
+    --datadir=${datadir}/ffmpeg \
+"
+
+do_configure() {
+    ${S}/configure ${EXTRA_OECONF}
+}
+
+PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util|resample)|swscale|swresample|postproc).*"
+
+# ffmpeg disables PIC on some platforms (e.g. x86-32)
+INSANE_SKIP_${MLPREFIX}libavcodec = "textrel"
+INSANE_SKIP_${MLPREFIX}libavdevice = "textrel"
+INSANE_SKIP_${MLPREFIX}libavfilter = "textrel"
+INSANE_SKIP_${MLPREFIX}libavformat = "textrel"
+INSANE_SKIP_${MLPREFIX}libavutil = "textrel"
+INSANE_SKIP_${MLPREFIX}libavresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libswscale = "textrel"
+INSANE_SKIP_${MLPREFIX}libswresample = "textrel"
+INSANE_SKIP_${MLPREFIX}libpostproc = "textrel"
+
+python populate_packages_prepend() {
+    av_libdir = d.expand('${libdir}')
+    av_pkgconfig = d.expand('${libdir}/pkgconfig')
+
+    # Runtime package
+    do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
+                      output_pattern='lib%s',
+                      description='libav %s library',
+                      extra_depends='',
+                      prepend=True,
+                      allow_links=True)
+
+    # Development packages (-dev, -staticdev)
+    do_split_packages(d, av_libdir, '^lib(.*)\.so$',
+                      output_pattern='lib%s-dev',
+                      description='libav %s development package',
+                      extra_depends='${PN}-dev',
+                      prepend=True,
+                      allow_links=True)
+    do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
+                      output_pattern='lib%s-dev',
+                      description='libav %s development package',
+                      extra_depends='${PN}-dev',
+                      prepend=True)
+    do_split_packages(d, av_libdir, '^lib(.*)\.a$',
+                      output_pattern='lib%s-staticdev',
+                      description='libav %s development package - static library',
+                      extra_depends='${PN}-dev',
+                      prepend=True,
+                      allow_links=True)
+
+}
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
new file mode 100644
index 0000000..2cab87f
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch
@@ -0,0 +1,42 @@
+From 90916f96262fa7b27a0a99788c69f9fd6df11000 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 24 Nov 2015 16:46:27 +0200
+Subject: [PATCH] introspection.m4: prefix pkgconfig paths with
+ PKG_CONFIG_SYSROOT_DIR
+
+We can't use our tweaked introspection.m4 from gobject-introspection tarball
+because gstreamer also defines INTROSPECTION_INIT in its introspection.m4, which
+is later supplied to g-ir-scanner.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ common/m4/introspection.m4 | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/common/m4/introspection.m4 b/common/m4/introspection.m4
+index 162be57..217a6ae 100644
+--- a/common/m4/introspection.m4
++++ b/common/m4/introspection.m4
+@@ -54,14 +54,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
+     INTROSPECTION_GIRDIR=
+     INTROSPECTION_TYPELIBDIR=
+     if test "x$found_introspection" = "xyes"; then
+-       INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
+-       INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
+-       INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
++       INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
++       INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
++       INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
+        INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
+        INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+        INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
+        INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
+-       INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
++       INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
+        INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);"
+     fi
+     AC_SUBST(INTROSPECTION_SCANNER)
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
index 9850242..8129169 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player_git.bb
@@ -1,5 +1,4 @@
-SUMMARY="GStreamer playback helper library and examples"
-
+SUMMARY = "GStreamer playback helper library and examples"
 LICENSE = "LGPL-2.0+"
 LIC_FILES_CHKSUM = "file://lib/gst/player/gstplayer.c;beginline=1;endline=19;md5=03aeca9d8295f811817909075a15ff65"
 
@@ -16,7 +15,7 @@
 
 S = "${WORKDIR}/git"
 
-inherit autotools gtk-doc lib_package pkgconfig distro_features_check
+inherit autotools gtk-doc lib_package pkgconfig distro_features_check gobject-introspection
 
 ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
 
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
index cb1be06..c24493e 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc
@@ -8,8 +8,9 @@
 
     do_split_packages(d, glibdir, '^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True)
     do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends='')
-    do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends=d.expand('${PN}-dev'))
-    do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends=d.expand('${PN}-staticdev'))
+    do_split_packages(d, glibdir+'/girepository-1.0', 'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer typelib file for %s', postinst=postinst, extra_depends='')
+    do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends='${PN}-dev')
+    do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends='${PN}-staticdev')
 }
 
 python set_metapkg_rdepends () {
@@ -47,12 +48,9 @@
 ALLOW_EMPTY_${PN}-staticdev = "1"
 
 PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib"
-FILES_${PN}-apps = "${bindir}"
-
-RDEPENDS_${PN}-apps += "perl"
-RRECOMMENDS_${PN} += "${PN}-meta"
 
 FILES_${PN} = ""
-FILES_${PN}-dbg += "${libdir}/gstreamer-${LIBV}/.debug"
+FILES_${PN}-apps = "${bindir}"
 FILES_${PN}-glib = "${datadir}/glib-2.0"
 
+RRECOMMENDS_${PN} += "${PN}-meta"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
index 84e6e95..363101e 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav.inc
@@ -1,32 +1,46 @@
 SUMMARY = "Libav-based GStreamer 1.x plugin"
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
 SECTION = "multimedia"
+
 LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )"
 LICENSE_FLAGS = "commercial"
-HOMEPAGE = "http://www.gstreamer.net/"
-DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2"
 
-inherit autotools pkgconfig
+DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz"
+
+inherit autotools pkgconfig upstream-version-is-even
 
 # CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time,
 # compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the
 # libav copy included in the gst-libav package.
-PACKAGECONFIG ??= " orc yasm "
-PACKAGECONFIG[libav] = "--with-system-libav,,libav"
-PACKAGECONFIG[lgpl]  = "--enable-lgpl,,"
-PACKAGECONFIG[yasm]  = "--enable-yasm,--disable-yasm,yasm-native"
-PACKAGECONFIG[orc]  = "--enable-orc,--disable-orc,orc"
+PACKAGECONFIG ??= "orc yasm"
 
+PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl,"
+PACKAGECONFIG[libav] = "--with-system-libav,,libav"
+PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc"
+PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,yasm-native"
 
 GSTREAMER_1_0_DEBUG ?= "--disable-debug"
 
 LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure"
+
+LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
+  --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
+  --ranlib='${RANLIB}' \
+  ${GSTREAMER_1_0_DEBUG} \
+  --cross-prefix='${HOST_PREFIX}'"
+
 LIBAV_EXTRA_CONFIGURE_COMMON = \
 '${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"'
 
 EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}"
 
 FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
-FILES_${PN}-dbg += "${libdir}/gstreamer-1.0/.debug"
 FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
 FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
 
+# http://errors.yoctoproject.org/Errors/Details/20493/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+# ffmpeg/libav disables PIC on some platforms (e.g. x86-32)
+INSANE_SKIP_${PN} = "textrel"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
index ccadea4..36abf86 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch
@@ -22,5 +22,5 @@
 +            ( (unsigned char*)(h->non_zero_count[mb_xy]) ) [i] = 16;
 +        }
          h->cur_pic.mb_type[mb_xy] = mb_type;
-         h->last_qscale_diff = 0;
+         sl->last_qscale_diff = 0;
          return 0;
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb
deleted file mode 100644
index 5d74a2e..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.4.5.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-include gstreamer1.0-libav.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
-                    file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
-                    file://gst-libs/ext/libav/LICENSE;md5=ea66e97a7ac1db978cf3529068a8c948 \
-                    file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
-                    file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-SRC_URI = " \
-    http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
-    file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
-    file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
-"
-SRC_URI[md5sum] = "f4922a46adbcbe7bd01331ff5dc7979d"
-SRC_URI[sha256sum] = "605c62624604f3bb5c870844cc1f2711779cc533b004c2aa1d8c0d58557afbbc"
-
-LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
-  --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
-  --ranlib='${RANLIB}' \
-  ${GSTREAMER_1_0_DEBUG} \
-  --cross-prefix='${HOST_PREFIX}'"
-
-S = "${WORKDIR}/gst-libav-${PV}"
-
-# http://errors.yoctoproject.org/Errors/Details/20493/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb
new file mode 100644
index 0000000..687230a
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.6.3.bb
@@ -0,0 +1,20 @@
+include gstreamer1.0-libav.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+                    file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
+                    file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
+                    file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \
+    file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
+    file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
+"
+
+SRC_URI[md5sum] = "cfe9a06913d4fd4067e9e47f6e05fac2"
+SRC_URI[sha256sum] = "857b9c060a0337de38c6d26238c47352433c02eabf26c2f860c854dbc35bd4ab"
+
+S = "${WORKDIR}/gst-libav-${PV}"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
index bf1b87e..ebc8a5e 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_git.bb
@@ -5,25 +5,34 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
                     file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \
-                    file://gst-libs/ext/libav/LICENSE;md5=23a54f59b82572c203a559346e89ed57 \
+                    file://gst-libs/ext/libav/LICENSE.md;md5=acda96fe91ccaabc9cd9d541806a0d37 \
                     file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                     file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
                     file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
                     file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
 
-SRC_URI = "git://anongit.freedesktop.org/gstreamer/gst-libav;branch=master"
+# To build using the system libav/ffmpeg, append "libav" to PACKAGECONFIG
+# and remove the ffmpeg sources from SRC_URI below. However, first note the
+# warnings in gstreamer1.0-libav.inc
+SRC_URI = " \
+    git://anongit.freedesktop.org/gstreamer/gst-libav;name=base \
+    git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+    git://source.ffmpeg.org/ffmpeg;destsuffix=git/gst-libs/ext/libav;name=ffmpeg;branch=release/3.0 \
+    file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \
+    file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "6c4878b6abc916b7f6f25b8926c4859119acf1ec"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_ffmpeg = "c40983a6f631d22fede713d535bb9c31d5c9740c"
+SRCREV_FORMAT = "base"
+
 S = "${WORKDIR}/git"
 
-SRCREV = "127202d6f65584891dabf92be031f0d170b0e7f1"
-
-LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \
-  --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \
-  ${GSTREAMER_1_0_DEBUG} \
-  --cross-prefix='${HOST_PREFIX}'"
-
 do_configure_prepend() {
-	cd ${S}
-	./autogen.sh --noconfigure
-	cd ${B}
+	${S}/autogen.sh --noconfigure
 }
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
index 3ef10c3..c542b13 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-meta-base.bb
@@ -1,6 +1,9 @@
-DESCRIPTION = "Gstreamer1.0 package groups"
+SUMMARY = "Gstreamer1.0 package groups"
 LICENSE = "MIT"
 
+# Due to use of COMBINED_FEATURES
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 inherit packagegroup
 
 COMMERCIAL_PLUGINS = "${COMMERCIAL_AUDIO_PLUGINS} ${COMMERCIAL_VIDEO_PLUGINS}"
@@ -26,7 +29,7 @@
     gstreamer1.0 \
     gstreamer1.0-plugins-base-playback \
     gstreamer1.0-plugins-base-gio \
-    gstreamer1.0-plugins-base-alsa \
+    ${@bb.utils.contains('COMBINED_FEATURES', 'alsa', 'gstreamer1.0-plugins-base-alsa', '',d)} \
     gstreamer1.0-plugins-base-volume \
     gstreamer1.0-plugins-base-audioconvert \
     gstreamer1.0-plugins-base-audioresample \
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
index 26c1336..0fff612 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx.inc
@@ -1,10 +1,11 @@
 SUMMARY = "OpenMAX IL plugins for GStreamer"
+HOMEPAGE = "http://gstreamer.freedesktop.org/"
 SECTION = "multimedia"
+
 LICENSE = "LGPLv2.1"
 LICENSE_FLAGS = "commercial"
-HOMEPAGE = "http://www.gstreamer.net/"
+
 DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad"
-RDEPENDS_${PN} = "libomxil"
 
 inherit autotools pkgconfig gettext
 
@@ -32,10 +33,11 @@
 set_omx_core_name() {
 	sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf"
 }
+
 do_install[postfuncs] += " set_omx_core_name "
 
 FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
-FILES_${PN}-dbg += "${libdir}/gstreamer-1.0/.debug"
 FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la"
 FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a"
 
+RDEPENDS_${PN} = "libomxil"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
index fe7c91c..74358a7 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.2.0.bb
@@ -9,4 +9,3 @@
 SRC_URI[sha256sum] = "0b4874961e6488ad9e5808114bd486ea981c540907262caab1419355fd82d745"
 
 S = "${WORKDIR}/gst-omx-${PV}"
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
index 99c8466..9705543 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_git.bb
@@ -9,18 +9,17 @@
     git://anongit.freedesktop.org/gstreamer/gst-omx;branch=master;name=gst-omx \
     git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;branch=master;name=common \
     file://0001-omx-fixed-type-error-in-printf-call.patch \
-    "
-
-S = "${WORKDIR}/git"
+"
 
 SRCREV_gst-omx = "a2db76b048db278ef0aa798e106b7594264e06c0"
 SRCREV_common = "5edcd857b2107cd8b78c16232dd10877513ec157"
 
 SRCREV_FORMAT = "gst-omx"
 
+S = "${WORKDIR}/git"
+
 do_configure_prepend() {
 	cd ${S}
 	./autogen.sh --noconfigure
 	cd ${B}
 }
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
index b4f01af..9e2b94e 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad.inc
@@ -1,136 +1,148 @@
 require gstreamer1.0-plugins.inc
 
-LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+ "
+LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+"
 
 DEPENDS += "gstreamer1.0-plugins-base libpng jpeg"
 
-S = "${WORKDIR}/gst-plugins-bad-${PV}"
-
-SRC_URI += "file://configure-allow-to-disable-libssh2.patch \
-           "
-
 inherit gettext bluetooth
 
+SRC_URI_append = " \
+    file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \
+"
+
 # opengl packageconfig factored out to make it easy for distros
 # and BSP layers to pick either (desktop) opengl, gles2, or no GL
 PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2', '', d)}"
 
+# gtk is not in the PACKAGECONFIG variable by default until
+# the transition to gtk+3 is finished
 PACKAGECONFIG ??= " \
+    ${GSTREAMER_ORC} \
     ${PACKAGECONFIG_GL} \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'directfb', 'directfb', '', d)} \
-    orc curl neon sndfile \
-    hls sbc dash bz2 smoothstreaming \
-    "
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
+    bz2 curl dash dtls hls neon rsvg sbc smoothstreaming sndfile uvch264 webp \
+"
 
-# dash = Dynamic Adaptive Streaming over HTTP
 PACKAGECONFIG[assrender]       = "--enable-assrender,--disable-assrender,libass"
+PACKAGECONFIG[bluez]           = "--enable-bluez,--disable-bluez,${BLUEZ}"
+PACKAGECONFIG[bz2]             = "--enable-bz2,--disable-bz2,bzip2"
 PACKAGECONFIG[curl]            = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[gles2]           = "--enable-gles2,--disable-gles2,virtual/libgles2"
-PACKAGECONFIG[opengl]          = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
+PACKAGECONFIG[dash]            = "--enable-dash,--disable-dash,libxml2"
+PACKAGECONFIG[directfb]        = "--enable-directfb,--disable-directfb,directfb"
+PACKAGECONFIG[dtls]            = "--enable-dtls,--disable-dtls,openssl"
 PACKAGECONFIG[faac]            = "--enable-faac,--disable-faac,faac"
 PACKAGECONFIG[faad]            = "--enable-faad,--disable-faad,faad2"
-PACKAGECONFIG[libmms]          = "--enable-libmms,--disable-libmms,libmms"
-PACKAGECONFIG[modplug]         = "--enable-modplug,--disable-modplug,libmodplug"
-PACKAGECONFIG[mpg123]          = "--enable-mpg123,--disable-mpg123,mpg123"
-PACKAGECONFIG[opus]            = "--enable-opus,--disable-opus,libopus"
 PACKAGECONFIG[flite]           = "--enable-flite,--disable-flite,flite-alsa"
-PACKAGECONFIG[opencv]          = "--enable-opencv,--disable-opencv,opencv"
-PACKAGECONFIG[wayland]         = "--enable-wayland --enable-egl,--disable-wayland --disable-egl,wayland virtual/egl"
-PACKAGECONFIG[uvch264]         = "--enable-uvch264,--disable-uvch264,libusb1 libgudev"
-PACKAGECONFIG[directfb]        = "--enable-directfb,--disable-directfb,directfb"
+PACKAGECONFIG[fluidsynth]      = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth"
+PACKAGECONFIG[gles2]           = "--enable-gles2,--disable-gles2,virtual/libgles2"
+PACKAGECONFIG[gtk]             = "--enable-gtk3,--disable-gtk3,gtk+3"
+PACKAGECONFIG[hls]             = "--enable-hls,--disable-hls,nettle"
+PACKAGECONFIG[libmms]          = "--enable-libmms,--disable-libmms,libmms"
+PACKAGECONFIG[libssh2]         = "--enable-libssh2,--disable-libssh2,libssh2"
+PACKAGECONFIG[modplug]         = "--enable-modplug,--disable-modplug,libmodplug"
 PACKAGECONFIG[neon]            = "--enable-neon,--disable-neon,neon"
 PACKAGECONFIG[openal]          = "--enable-openal,--disable-openal,openal-soft"
-PACKAGECONFIG[hls]             = "--enable-hls,--disable-hls,gnutls"
+PACKAGECONFIG[opencv]          = "--enable-opencv,--disable-opencv,opencv"
+PACKAGECONFIG[opengl]          = "--enable-opengl,--disable-opengl,virtual/libgl libglu"
+PACKAGECONFIG[opus]            = "--enable-opus,--disable-opus,libopus"
+PACKAGECONFIG[resindvd]        = "--enable-resindvd,--disable-resindvd,libdvdread libdvdnav"
+PACKAGECONFIG[rsvg]            = "--enable-rsvg,--disable-rsvg,librsvg"
+PACKAGECONFIG[rtmp]            = "--enable-rtmp,--disable-rtmp,rtmpdump"
 PACKAGECONFIG[sbc]             = "--enable-sbc,--disable-sbc,sbc"
-PACKAGECONFIG[dash]            = "--enable-dash,--disable-dash,libxml2"
-PACKAGECONFIG[bz2]             = "--enable-bz2,--disable-bz2,bzip2"
-PACKAGECONFIG[fluidsynth]      = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth"
 PACKAGECONFIG[schroedinger]    = "--enable-schro,--disable-schro,schroedinger"
 PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2"
-PACKAGECONFIG[bluez]           = "--enable-bluez,--disable-bluez,${BLUEZ}"
-PACKAGECONFIG[rsvg]            = "--enable-rsvg,--disable-rsvg,librsvg"
 PACKAGECONFIG[sndfile]         = "--enable-sndfile,--disable-sndfile,libsndfile1"
-PACKAGECONFIG[webp]            = "--enable-webp,--disable-webp,libwebp"
-PACKAGECONFIG[rtmp]            = "--enable-rtmp,--disable-rtmp,rtmpdump"
-PACKAGECONFIG[libssh2]         = "--enable-libssh2,--disable-libssh2,libssh2"
-PACKAGECONFIG[voamrwbenc]      = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc"
+PACKAGECONFIG[srtp]            = "--enable-srtp,--disable-srtp,libsrtp"
+PACKAGECONFIG[uvch264]         = "--enable-uvch264,--disable-uvch264,libusb1 libgudev"
 PACKAGECONFIG[voaacenc]        = "--enable-voaacenc,--disable-voaacenc,vo-aacenc"
-PACKAGECONFIG[resindvd]        = "--enable-resindvd,--disable-resindvd,libdvdnav libdvdread"
+PACKAGECONFIG[voamrwbenc]      = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc"
+PACKAGECONFIG[wayland]         = "--enable-wayland --enable-egl,--disable-wayland --disable-egl,wayland virtual/egl"
+PACKAGECONFIG[webp]            = "--enable-webp,--disable-webp,libwebp"
 
 # these plugins have not been ported to 1.0 (yet):
-#   directdraw vcd apexsink dc1394 lv2 linsys musepack mythtv
-#   nas timidity teletextdec sdl xvid wininet acm gsettings
-#   sndio qtwrapper cdxaparse dccp faceoverlay hdvparse tta
-#   mve nuvdemux osx_video patchdetect quicktime real sdi
-#   videomeasure gsettings
+#   apexsink dc1394 lv2 linsys musepack nas timidity teletextdec sdl xvid wininet
+#   acm gsettings sndio cdxaparse dccp faceoverlay hdvparse tta mve nuvdemux
+#   patchdetect real sdi videomeasure gsettings
 
 # these plugins have no corresponding library in OE-core or meta-openembedded:
-#   openni2 winks direct3d directdraw directsound winscreencap osx_video
-#   apple_media android_media avc chromaprint daala dts gme gsm kate ladspa mimic
-#   mpeg2enc mplex ofa openjpeg opensles pvr rtmp soundtouch spandsp spc
-#   srtp vdpau wasapi zbar
+#   openni2 winks direct3d directsound winscreencap
+#   apple_media android_media avc bs2b chromaprint daala dts gme gsm kate ladspa
+#   libde265 mimic mpeg2enc mplex ofa openh264 opensles pvr soundtouch spandsp
+#   spc vdpau wasapi x265 zbar
+
+# qt5 support is disabled, because it is not present in OE core, and requires more work than
+# just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths).
+# This is better done in a separate qt5 layer (which then should add a "qt5" packageconfig
+# in a gstreamer1.0-plugins-bad bbappend).
 
 EXTRA_OECONF += " \
-    --enable-dvb \
-    --enable-shm \
-    --enable-fbdev \
     --enable-decklink \
+    --enable-dvb \
+    --enable-fbdev \
+    --enable-shm \
+    --enable-vcd \
     --disable-acm \
     --disable-android_media \
     --disable-apexsink \
     --disable-apple_media \
     --disable-avc \
+    --disable-bs2b \
     --disable-chromaprint \
     --disable-cocoa \
     --disable-daala \
     --disable-dc1394 \
     --disable-direct3d \
-    --disable-directdraw \
     --disable-directsound \
     --disable-dts \
     --disable-gme \
-    --disable-gsettings \
     --disable-gsm \
     --disable-kate \
     --disable-ladspa \
+    --disable-libde265 \
+    --disable-libvisual \
     --disable-linsys \
     --disable-lv2 \
     --disable-mimic \
     --disable-mpeg2enc \
     --disable-mplex \
     --disable-musepack \
-    --disable-mythtv \
     --disable-nas \
     --disable-ofa \
+    --disable-openexr \
+    --disable-openh264 \
     --disable-openjpeg \
+    --disable-openni2 \
     --disable-opensles \
-    --disable-osx_video \
     --disable-pvr \
-    --disable-quicktime \
+    --disable-qt \
     --disable-sdl \
     --disable-sdltest \
     --disable-sndio \
     --disable-soundtouch \
     --disable-spandsp \
     --disable-spc \
-    --disable-srtp \
     --disable-teletextdec \
     --disable-timidity \
-    --disable-vcd \
     --disable-vdpau \
     --disable-wasapi \
     --disable-wildmidi \
     --disable-wininet \
+    --disable-winks \
     --disable-winscreencap \
+    --disable-x265 \
     --disable-xvid \
     --disable-zbar \
     ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--disable-yadif", "", d)} \
-    "
+"
 
-ARM_INSTRUCTION_SET = "arm"
+export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
 
-FILES_gstreamer1.0-plugins-bad-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
 
+FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h"
+FILES_${PN}-freeverb += "${datadir}/gstreamer-${LIBV}/presets/GstFreeverb.prs"
+FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/${LIBV}/opencv*"
 FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-${LIBV}/presets/GstVoAmrwbEnc.prs"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
new file mode 100644
index 0000000..154d340
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
@@ -0,0 +1,57 @@
+From cff6fbf555a072408c21da1e818209c9d3814dd3 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 27 Oct 2015 14:36:58 +0200
+Subject: [PATCH] Makefile.am: don't hardcode libtool name when running
+ introspection tools
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+
+---
+ gst-libs/gst/gl/Makefile.am        | 2 +-
+ gst-libs/gst/insertbin/Makefile.am | 2 +-
+ gst-libs/gst/mpegts/Makefile.am    | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am
+index f968357..7cc2c7a 100644
+--- a/gst-libs/gst/gl/Makefile.am
++++ b/gst-libs/gst/gl/Makefile.am
+@@ -149,7 +149,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@
+ 		--library=libgstgl-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-base-@GST_API_VERSION@ \
+ 		--pkg gstreamer-video-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am
+index 09eb97c..b746885 100644
+--- a/gst-libs/gst/insertbin/Makefile.am
++++ b/gst-libs/gst/insertbin/Makefile.am
+@@ -43,7 +43,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS
+ 		--library=libgstinsertbin-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-base-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-insertbin-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am
+index 2511d49..c1cbce6 100644
+--- a/gst-libs/gst/mpegts/Makefile.am
++++ b/gst-libs/gst/mpegts/Makefile.am
+@@ -78,7 +78,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_
+ 		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \
+ 		--library=libgstmpegts-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-video-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-mpegts-@GST_API_VERSION@ \
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch
deleted file mode 100644
index 042a32c..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From deba0da45ec821209a7ed148a4521d562e6512cd Mon Sep 17 00:00:00 2001
-From: Carlos Rafael Giani <dv@pseudoterminal.org>
-Date: Wed, 27 Aug 2014 14:47:25 +0200
-Subject: [PATCH] gl: do not check for GL/GLU/EGL/GLES2 libs if disabled in
- configuration
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=735522]
-
-Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>
----
- configure.ac | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 1a46afb..e85d4ba 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -661,10 +661,16 @@ case $host in
-     fi
-   ;;
-   *)
--    AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
--    AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h)
--    AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
--    AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
-+    if test "x$NEED_GL" != "xno"; then
-+      AG_GST_CHECK_LIBHEADER(GL, GL, glTexImage2D,, GL/gl.h)
-+      AG_GST_CHECK_LIBHEADER(GLU, GLU, gluSphere,, GL/glu.h)
-+    fi
-+    if test "x$NEED_GLES2" != "xno"; then
-+      AG_GST_CHECK_LIBHEADER(GLES2, GLESv2, glTexImage2D,, GLES2/gl2.h)
-+    fi
-+    if test "x$NEED_EGL" != "xno"; then
-+      AG_GST_CHECK_LIBHEADER(EGL, EGL, eglGetError,, EGL/egl.h)
-+    fi
- 
-     old_LIBS=$LIBS
-     old_CFLAGS=$CFLAGS
--- 
-1.8.3.2
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch
index f677603..1085e95 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-glimagesink-Downrank-to-marginal.patch
@@ -22,8 +22,8 @@
  #endif
  
    if (!gst_element_register (plugin, "glimagesink",
--          GST_RANK_SECONDARY, GST_TYPE_GLIMAGE_SINK)) {
-+          GST_RANK_MARGINAL, GST_TYPE_GLIMAGE_SINK)) {
+-          GST_RANK_SECONDARY, gst_gl_image_sink_bin_get_type ())) {
++          GST_RANK_MARGINAL, gst_gl_image_sink_bin_get_type ())) {
      return FALSE;
    }
  
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
new file mode 100644
index 0000000..e81b065
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch
@@ -0,0 +1,27 @@
+From a93ca63d01e7cd1e40b5be576992f77fac364bd5 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 21 Mar 2016 18:21:17 +0200
+Subject: [PATCH] gstreamer-gl.pc.in: don't append GL_CFLAGS to CFLAGS
+
+Dependencies' include directories should not be added in this way;
+it causes problems when cross-compiling in sysroot environments.
+
+Upstream-Status: Pending
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ pkgconfig/gstreamer-gl.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pkgconfig/gstreamer-gl.pc.in b/pkgconfig/gstreamer-gl.pc.in
+index 5589e2a..b986450 100644
+--- a/pkgconfig/gstreamer-gl.pc.in
++++ b/pkgconfig/gstreamer-gl.pc.in
+@@ -10,4 +10,4 @@ Version: @VERSION@
+ Requires: gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@
+ 
+ Libs: -L${libdir} -lgstgl-@GST_API_VERSION@ @GL_LIBS@
+-Cflags: -I${includedir} @GL_CFLAGS@
++Cflags: -I${includedir}
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
new file mode 100755
index 0000000..3491a15
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch
@@ -0,0 +1,35 @@
+From 95cda7fbcf1a81289d9315c801c8e2b3d896f4cb Mon Sep 17 00:00:00 2001
+From: Haihua Hu <b55597@freescale.com>
+Date: Mon, 30 Nov 2015 09:36:09 +0800
+Subject: [PATCH 2/5] [glplugin] glwindow: fix memory leak of navigation
+ thread
+
+When exit navigation thread, call g_thread_join() to release
+the resource hold by it.
+
+Upstream-Status: Backport [1.7.1]
+
+bugzilla URL: https://bugzilla.gnome.org/show_bug.cgi?id=758820
+
+Signed-off-by: Haihua Hu <b55597@freescale.com>
+---
+ gst-libs/gst/gl/gstglwindow.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/gst-libs/gst/gl/gstglwindow.c b/gst-libs/gst/gl/gstglwindow.c
+index 44b74ca..42ef296 100644
+--- a/gst-libs/gst/gl/gstglwindow.c
++++ b/gst-libs/gst/gl/gstglwindow.c
+@@ -343,6 +343,9 @@ gst_gl_window_finalize (GObject * object)
+     while (window->nav_alive) {
+       g_cond_wait (&window->nav_destroy_cond, &window->nav_lock);
+     }
++    /* release resource hold by navigation thread */
++    g_thread_join(window->priv->navigation_thread);
++    window->priv->navigation_thread = NULL;
+     g_mutex_unlock (&window->nav_lock);
+   }
+ 
+-- 
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
new file mode 100644
index 0000000..357fd78
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch
@@ -0,0 +1,30 @@
+From 72561a0fca562d03567ace7b4cfc94992cd6525c Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Wed, 3 Feb 2016 18:05:41 -0800
+Subject: [PATCH] avoid including <sys/poll.h> directly
+
+musl libc generates warnings if <sys/poll.h> is included directly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ sys/dvb/gstdvbsrc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
+index b93255f..49f145a 100644
+--- a/sys/dvb/gstdvbsrc.c
++++ b/sys/dvb/gstdvbsrc.c
+@@ -93,7 +93,7 @@
+ #include <gst/gst.h>
+ #include <gst/glib-compat-private.h>
+ #include <sys/ioctl.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <stdio.h>
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
new file mode 100644
index 0000000..369ff93
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch
@@ -0,0 +1,86 @@
+From 2262ba4b686d5cc0d3e894707fe1d31619a3a8f1 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 9 Feb 2016 14:00:00 -0800
+Subject: [PATCH] ensure valid sentinals for gst_structure_get() etc
+
+For GStreamer functions declared with G_GNUC_NULL_TERMINATED,
+ie __attribute__((__sentinel__)), gcc will generate a warning if the
+last parameter passed to the function is not NULL (where a valid NULL
+in this context is defined as zero with any pointer type).
+
+The C callers to such functions within gst-plugins-bad use the C NULL
+definition (ie ((void*)0)), which is a valid sentinel.
+
+However the C++ NULL definition (ie 0L), is not a valid sentinel
+without an explicit cast to a pointer type.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ sys/decklink/gstdecklink.cpp          | 10 +++++-----
+ sys/decklink/gstdecklinkaudiosrc.cpp  |  2 +-
+ sys/decklink/gstdecklinkvideosink.cpp |  2 +-
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
+index 64637f1..bac956f 100644
+--- a/sys/decklink/gstdecklink.cpp
++++ b/sys/decklink/gstdecklink.cpp
+@@ -324,22 +324,22 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e, BMDPixelFormat f)
+       "height", G_TYPE_INT, mode->height,
+       "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
+       "interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive",
+-      "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, NULL);
++      "framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d, (void *) NULL);
+ 
+   switch (f) {
+     case bmdFormat8BitYUV: /* '2vuy' */
+       gst_structure_set (s, "format", G_TYPE_STRING, "UYVY",
+           "colorimetry", G_TYPE_STRING, mode->colorimetry,
+-          "chroma-site", G_TYPE_STRING, "mpeg2", NULL);
++          "chroma-site", G_TYPE_STRING, "mpeg2", (void *) NULL);
+       break;
+     case bmdFormat10BitYUV: /* 'v210' */
+-      gst_structure_set (s, "format", G_TYPE_STRING, "v210", NULL);
++      gst_structure_set (s, "format", G_TYPE_STRING, "v210", (void *) NULL);
+       break;
+     case bmdFormat8BitARGB: /* 'ARGB' */
+-      gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", NULL);
++      gst_structure_set (s, "format", G_TYPE_STRING, "ARGB", (void *) NULL);
+       break;
+     case bmdFormat8BitBGRA: /* 'BGRA' */
+-      gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", NULL);
++      gst_structure_set (s, "format", G_TYPE_STRING, "BGRA", (void *) NULL);
+       break;
+     case bmdFormat10BitRGB: /* 'r210' Big-endian RGB 10-bit per component with SMPTE video levels (64-960). Packed as 2:10:10:10 */
+     case bmdFormat12BitRGB: /* 'R12B' Big-endian RGB 12-bit per component with full range (0-4095). Packed as 12-bit per component */
+diff --git a/sys/decklink/gstdecklinkaudiosrc.cpp b/sys/decklink/gstdecklinkaudiosrc.cpp
+index 9a701ee..26fb7ec 100644
+--- a/sys/decklink/gstdecklinkaudiosrc.cpp
++++ b/sys/decklink/gstdecklinkaudiosrc.cpp
+@@ -312,7 +312,7 @@ gst_decklink_audio_src_set_caps (GstBaseSrc * bsrc, GstCaps * caps)
+       g_mutex_unlock (&self->input->lock);
+ 
+       if (videosrc) {
+-        g_object_get (videosrc, "connection", &vconn, NULL);
++        g_object_get (videosrc, "connection", &vconn, (void *) NULL);
+         gst_object_unref (videosrc);
+ 
+         switch (vconn) {
+diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp
+index eebeff3..da6e486 100644
+--- a/sys/decklink/gstdecklinkvideosink.cpp
++++ b/sys/decklink/gstdecklinkvideosink.cpp
+@@ -158,7 +158,7 @@ reset_framerate (GstCapsFeatures * features, GstStructure * structure,
+     gpointer user_data)
+ {
+   gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1,
+-      G_MAXINT, 1, NULL);
++      G_MAXINT, 1, (void *) NULL);
+ 
+   return TRUE;
+ }
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
new file mode 100644
index 0000000..5ce5771
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch
@@ -0,0 +1,28 @@
+From a67781000e82bd9ae3813da29401e8c0c852328a Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 26 Jan 2016 15:16:01 -0800
+Subject: [PATCH] fix maybe-uninitialized warnings when compiling with -Os
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ gst-libs/gst/codecparsers/gstvc1parser.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparsers/gstvc1parser.c
+index fd16ee0..ddb890c 100644
+--- a/gst-libs/gst/codecparsers/gstvc1parser.c
++++ b/gst-libs/gst/codecparsers/gstvc1parser.c
+@@ -1729,7 +1729,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size,
+     GstVC1SeqLayer * seqlayer)
+ {
+   guint32 tmp;
+-  guint8 tmp8;
++  guint8 tmp8 = 0;
+   guint8 structA[8] = { 0, };
+   guint8 structB[12] = { 0, };
+   GstBitReader br;
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb
deleted file mode 100644
index 6873669..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.4.5.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-include gstreamer1.0-plugins-bad.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
-                    file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a \
-                    file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
-                    file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50"
-
-SRC_URI += "file://0001-gl-do-not-check-for-GL-GLU-EGL-GLES2-libs-if-disable.patch \
-           file://0001-glimagesink-Downrank-to-marginal.patch \
-           "
-
-SRC_URI[md5sum] = "e0bb39412cf4a48fe0397bcf3a7cd451"
-SRC_URI[sha256sum] = "152fad7250683d72f9deb36c5685428338365fe4a4c87ffe15e38783b14f983c"
-
-S = "${WORKDIR}/gst-plugins-bad-${PV}"
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb
new file mode 100644
index 0000000..8eb47c2
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.6.3.bb
@@ -0,0 +1,28 @@
+include gstreamer1.0-plugins-bad.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
+                    file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
+                    file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50 \
+                    file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a"
+
+# Note: The mpg123 plugin was moved to gst-plugins-ugly prior to the 1.7.2
+# release, so this line should be removed during the update to 1.8.x
+# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08d8aefcdaaf89ecb6dd53ec1e4f95cd42d01664
+PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
+
+# Note: The gsettings plug-in was dropped prior to the 1.7.2 release,
+# so this line should be removed during the update to 1.8.x
+# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=914291808ad10621d6a74031f3d46d45eef5a3a3
+EXTRA_OECONF += "--disable-gsettings"
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
+    file://configure-allow-to-disable-libssh2.patch \
+    file://0001-glimagesink-Downrank-to-marginal.patch \
+    file://0002-glplugin-glwindow-fix-memory-leak-of-navigation-thre.patch \
+"
+
+SRC_URI[md5sum] = "4857adcafe41e4b9b8805cf88303bd55"
+SRC_URI[sha256sum] = "971b29101d6a9c5e3fe94d99d977a227f58f0b2d29b6ca2c7f292052542b3a61"
+
+S = "${WORKDIR}/gst-plugins-bad-${PV}"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
index 309505f..ef6581b 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_git.bb
@@ -3,24 +3,63 @@
 include gstreamer1.0-plugins-bad.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \
-                    file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a \
                     file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 \
-                    file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50"
+                    file://gst/tta/crc32.h;beginline=12;endline=29;md5=27db269c575d1e5317fffca2d33b3b50 \
+                    file://gst/tta/filters.h;beginline=12;endline=29;md5=8a08270656f2f8ad7bb3655b83138e5a"
+
+SRC_URI = " \
+    git://anongit.freedesktop.org/gstreamer/gst-plugins-bad;name=base \
+    git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+    file://configure-allow-to-disable-libssh2.patch \
+    file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \
+    file://avoid-including-sys-poll.h-directly.patch \
+    file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \
+    file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "50ae46cc0f8827bf966920d9c221e5cf86e811ba"
+SRCREV_common = "a25397448942079002622be231e9ec49b985745a"
+SRCREV_FORMAT = "base"
 
 S = "${WORKDIR}/git"
 
-SRCREV = "6e5db57d2446a753aaa76bee268e1f95600b14ce"
+# over-ride the default hls PACKAGECONFIG in gstreamer1.0-plugins-bad.inc to
+# pass an additional --with-hls-crypto=XXX option (new in 1.7.x) and switch HLS
+# AES decryption from nettle to openssl (ie a shared dependency with dtls).
+# This should move back to the common .inc once the main recipe updates to 1.8.x
+PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=openssl,--disable-hls,openssl"
 
-PACKAGECONFIG[sbc] = "--enable-sbc,--disable-sbc,sbc"
-PACKAGECONFIG[hls] = "--enable-hls,--disable-hls,gnutls"
+# The tinyalsa plugin was added prior to the 1.7.2 release
+# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=c8bd74fa9a81398f57d976c478d2043f30188684
+PACKAGECONFIG[tinyalsa] = "--enable-tinyalsa,--disable-tinyalsa,tinyalsa"
 
+# The vulkan based video sink plugin was added prior to the 1.7.2 release
+# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=5de6dd9f40629562acf90e35e1fa58464d66617d
+PACKAGECONFIG[vulkan] = "--enable-vulkan,--disable-vulkan,libxcb"
+
+# The dependency-less netsim plugin was added prior to the 1.7.2 release
+# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=e3f9e854f08e82bfab11182c5a2aa6f9a0c73cd5
 EXTRA_OECONF += " \
-    -disable-openjpeg \
-    "
+    --enable-netsim \
+"
 
 do_configure_prepend() {
-	cd ${S}
-	./autogen.sh --noconfigure
-	cd ${B}
+	${S}/autogen.sh --noconfigure
 }
 
+# In 1.6.2, the "--enable-hls" configure option generated an installable package
+# called "gstreamer1.0-plugins-bad-fragmented". In 1.7.1 that HLS plugin package
+# has become "gstreamer1.0-plugins-bad-hls". See:
+# http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=efe62292a3d045126654d93239fdf4cc8e48ae08
+
+PACKAGESPLITFUNCS_append = " handle_hls_rename "
+
+python handle_hls_rename () {
+    d.setVar('RPROVIDES_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
+    d.setVar('RREPLACES_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
+    d.setVar('RCONFLICTS_gstreamer1.0-plugins-bad-hls', 'gstreamer1.0-plugins-bad-fragmented')
+}
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
index 4909b10..7381458 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base.inc
@@ -1,38 +1,50 @@
 require gstreamer1.0-plugins.inc
 
+SRC_URI_append = "\
+    file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \
+    file://0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch \
+    file://0003-riff-add-missing-include-directories-when-calling-in.patch \
+    file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \
+"
+
 LICENSE = "GPLv2+ & LGPLv2+"
 
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/libx11 libxv', '', d)}"
-DEPENDS += "freetype liboil util-linux"
+DEPENDS += "iso-codes util-linux zlib"
 
 inherit gettext
 
 PACKAGES_DYNAMIC =+ "^libgst.*"
 
 PACKAGECONFIG ??= " \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+    ${GSTREAMER_ORC} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
-    orc ivorbis ogg theora vorbis pango \
-    "
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+    gio-unix-2.0 ivorbis ogg pango theora vorbis \
+"
 
-X11DEPENDS = "virtual/libx11 libsm libxrender"
+X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
 X11ENABLEOPTS = "--enable-x --enable-xvideo --enable-xshm"
 X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm"
-PACKAGECONFIG[x11]     = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
-PACKAGECONFIG[alsa]    = "--enable-alsa,--disable-alsa,alsa-lib"
-PACKAGECONFIG[ivorbis] = "--enable-ivorbis,--disable-ivorbis,tremor"
-PACKAGECONFIG[ogg]     = "--enable-ogg,--disable-ogg,libogg"
-PACKAGECONFIG[theora]  = "--enable-theora,--disable-theora,libtheora"
-PACKAGECONFIG[vorbis]  = "--enable-vorbis,--disable-vorbis,libvorbis"
-PACKAGECONFIG[pango]   = "--enable-pango,--disable-pango,pango"
-# libvisual do not seem to exist anywhere in OE
-PACKAGECONFIG[visual]  = "--enable-libvisual,--disable-libvisual,libvisual"
-PACKAGECONFIG[cdparanoia] = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia"
+
+PACKAGECONFIG[alsa]         = "--enable-alsa,--disable-alsa,alsa-lib"
+PACKAGECONFIG[cdparanoia]   = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia"
+PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0"
+PACKAGECONFIG[ivorbis]      = "--enable-ivorbis,--disable-ivorbis,tremor"
+PACKAGECONFIG[ogg]          = "--enable-ogg,--disable-ogg,libogg"
+PACKAGECONFIG[pango]        = "--enable-pango,--disable-pango,pango"
+PACKAGECONFIG[theora]       = "--enable-theora,--disable-theora,libtheora"
+PACKAGECONFIG[visual]       = "--enable-libvisual,--disable-libvisual,libvisual"
+PACKAGECONFIG[vorbis]       = "--enable-vorbis,--disable-vorbis,libvorbis"
+PACKAGECONFIG[x11]          = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
 
 EXTRA_OECONF += " \
-    --disable-freetypetest \
+    --enable-zlib \
 "
 
+CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no"
+
 FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
 
-CACHED_CONFIGUREVARS_append_x86 = " ac_cv_header_emmintrin_h=no ac_cv_header_xmmintrin_h=no"
+do_compile_prepend() {
+        export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs"
+}
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
new file mode 100644
index 0000000..781e4d8
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch
@@ -0,0 +1,168 @@
+From f1d9652351e7754c63003104eceb526af424c7e0 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 20 Nov 2015 16:53:04 +0200
+Subject: [PATCH 1/4] Makefile.am: don't hardcode libtool name when running
+ introspection tools
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst-libs/gst/allocators/Makefile.am | 2 +-
+ gst-libs/gst/app/Makefile.am        | 2 +-
+ gst-libs/gst/audio/Makefile.am      | 2 +-
+ gst-libs/gst/fft/Makefile.am        | 2 +-
+ gst-libs/gst/pbutils/Makefile.am    | 2 +-
+ gst-libs/gst/riff/Makefile.am       | 2 +-
+ gst-libs/gst/rtp/Makefile.am        | 2 +-
+ gst-libs/gst/rtsp/Makefile.am       | 2 +-
+ gst-libs/gst/sdp/Makefile.am        | 2 +-
+ gst-libs/gst/tag/Makefile.am        | 2 +-
+ gst-libs/gst/video/Makefile.am      | 2 +-
+ 11 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am
+index 9361bf9..bc7f53a 100644
+--- a/gst-libs/gst/allocators/Makefile.am
++++ b/gst-libs/gst/allocators/Makefile.am
+@@ -37,7 +37,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
+ 		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		--library=libgstallocators-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-allocators-@GST_API_VERSION@ \
+ 		--output $@ \
+diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
+index 6d6de8d..dcc2fe0 100644
+--- a/gst-libs/gst/app/Makefile.am
++++ b/gst-libs/gst/app/Makefile.am
+@@ -52,7 +52,7 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
+ 		--library=libgstapp-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-base-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-app-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
+index 275d222..2374196 100644
+--- a/gst-libs/gst/audio/Makefile.am
++++ b/gst-libs/gst/audio/Makefile.am
+@@ -106,7 +106,7 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+ 		--include=GstTag-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-base-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-audio-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
+index 09b3d68..f545354 100644
+--- a/gst-libs/gst/fft/Makefile.am
++++ b/gst-libs/gst/fft/Makefile.am
+@@ -64,7 +64,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
+ 		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		--library=libgstfft-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-fft-@GST_API_VERSION@ \
+ 		--output $@ \
+diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
+index 64d5eb0..91dc214 100644
+--- a/gst-libs/gst/pbutils/Makefile.am
++++ b/gst-libs/gst/pbutils/Makefile.am
+@@ -94,7 +94,7 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
+ 		--include=GstTag-@GST_API_VERSION@ \
+ 		--include=GstVideo-@GST_API_VERSION@ \
+ 		--include=GstAudio-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-tag-@GST_API_VERSION@ \
+ 		--pkg gstreamer-video-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
+index 83d83cb..3bd8fc0 100644
+--- a/gst-libs/gst/riff/Makefile.am
++++ b/gst-libs/gst/riff/Makefile.am
+@@ -47,7 +47,7 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+ #		--include=GstAudio-@GST_API_VERSION@ \
+ #		--include=GstTag-@GST_API_VERSION@ \
+ #		--include=Gst-@GST_API_VERSION@ \
+-#		--libtool="$(top_builddir)/libtool" \
++#		--libtool="$(LIBTOOL)" \
+ #		--pkg gstreamer-@GST_API_VERSION@ \
+ #		--pkg gstreamer-tag-@GST_API_VERSION@ \
+ #		--pkg gstreamer-audio-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
+index fdd01c1..f5445c1 100644
+--- a/gst-libs/gst/rtp/Makefile.am
++++ b/gst-libs/gst/rtp/Makefile.am
+@@ -64,7 +64,7 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
+ 		--library=libgstrtp-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-base-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-rtp-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
+index ede5706..9b0b258 100644
+--- a/gst-libs/gst/rtsp/Makefile.am
++++ b/gst-libs/gst/rtsp/Makefile.am
+@@ -71,7 +71,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+ 		--include=Gio-2.0 \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstSdp-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gio-2.0 \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-sdp-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
+index a90f30b..0e149b8 100644
+--- a/gst-libs/gst/sdp/Makefile.am
++++ b/gst-libs/gst/sdp/Makefile.am
+@@ -31,7 +31,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
+ 		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		--library=libgstsdp-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-sdp-@GST_API_VERSION@ \
+ 		--output $@ \
+diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
+index c534a4d..cafafd3 100644
+--- a/gst-libs/gst/tag/Makefile.am
++++ b/gst-libs/gst/tag/Makefile.am
+@@ -44,7 +44,7 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
+ 		--library=libgsttag-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-base-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-tag-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
+index 5d31fa1..ac64eb3 100644
+--- a/gst-libs/gst/video/Makefile.am
++++ b/gst-libs/gst/video/Makefile.am
+@@ -113,7 +113,7 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
+ 		--library=libgstvideo-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-base-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-video-@GST_API_VERSION@ \
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
deleted file mode 100644
index 03dca95..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-From 3781d40940d46d7e6a502092d24aac7997f6da5b Mon Sep 17 00:00:00 2001
-From: Mingke Wang <mingke.wang@freescale.com>
-Date: Thu, 5 Mar 2015 12:06:23 +0800
-Subject: [PATCH 1/4] basetextoverlay: make memory copy when video buffer's
- memory is ready only
-
-1. since gst_buffer_make_writable just lookup the refcount to determine if
-   a buffer is writable, and it will use _gst_buffer_copy() which don't
-   perform a deep memory copy even if the flag of a memory is set to
-   GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use
-   gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform
-   deep memory copy. if the allocator of a memory don't support mem_copy
-   interface, the it will return NULL, if this case, we can use
-   gst_buffer_make_writable() to get a shared memory buffer or the orignal
-   buffer if the buffer's refcount is 1.
-2.  new feature is no added if caps has no feature during caps negotiation
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747495]
-
-Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
-
-diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
-index c919861..3c0a1d7 100755
---- a/ext/pango/gstbasetextoverlay.c
-+++ b/ext/pango/gstbasetextoverlay.c
-@@ -747,6 +747,7 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps)
-     if (f == NULL) {
-       f = gst_caps_features_new
-           (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL);
-+      gst_caps_set_features(overlay_caps, 0, f);
-     } else {
-       gst_caps_features_add (f,
-           GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
-@@ -1890,16 +1891,71 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * overlay,
-   if (gst_pad_check_reconfigure (overlay->srcpad))
-     gst_base_text_overlay_negotiate (overlay, NULL);
- 
--  video_frame = gst_buffer_make_writable (video_frame);
--
-   if (overlay->attach_compo_to_buffer) {
-     GST_DEBUG_OBJECT (overlay, "Attaching text overlay image to video buffer");
-+    video_frame = gst_buffer_make_writable (video_frame);
-     gst_buffer_add_video_overlay_composition_meta (video_frame,
-         overlay->composition);
-     /* FIXME: emulate shaded background box if want_shading=true */
-     goto done;
-   }
- 
-+  gint m = gst_buffer_n_memory(video_frame);
-+  gboolean mem_rdonly = FALSE;
-+  GstMemory *mem;
-+  GstBuffer *orig = video_frame;
-+
-+  while (--m>=0) {
-+    mem = gst_buffer_get_memory(video_frame, m);
-+    if (GST_MEMORY_IS_READONLY(mem)) {
-+      mem_rdonly = TRUE;
-+      gst_memory_unref (mem);
-+      break;
-+    }
-+    gst_memory_unref (mem);
-+  }
-+
-+  if (mem_rdonly) {
-+    // since gst_buffer_make_writable just lookup the refcount to determine if
-+    // a buffer is writable, and it will use _gst_buffer_copy() which don't
-+    // perform a deep memory copy even if the flag of a memory is set to
-+    // GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use
-+    // gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform
-+    // deep memory copy. if the allocator of a memory don't support mem_copy
-+    // interface, the it will return NULL, if this case, we can use
-+    // gst_buffer_make_writable() to get a shared memory buffer or the orignal
-+    // buffer if the buffer's refcount is 1.
-+    GstBuffer *new_buf = gst_buffer_copy_region (video_frame,
-+        GST_BUFFER_COPY_ALL | GST_BUFFER_COPY_DEEP, 0, -1);
-+
-+    GST_DEBUG_OBJECT (overlay, "copy %s video frame buffer %p -> %p",
-+        g_type_name (GST_MINI_OBJECT_TYPE (video_frame)), video_frame, new_buf);
-+
-+    if (!new_buf) {
-+      //maybe the allocator don't support mem_copy interface, the we just use
-+      //gst_buffer_make_writable() to get a writable buffer.
-+      video_frame = gst_buffer_make_writable (video_frame);
-+    } else {
-+      gst_mini_object_unref (video_frame);
-+      GST_BUFFER_FLAG_UNSET (new_buf, GST_BUFFER_FLAG_TAG_MEMORY);
-+      video_frame = new_buf;
-+    }
-+
-+    if (!video_frame) {
-+      GST_WARNING_OBJECT (overlay, "make writable buffer failed");
-+      return GST_FLOW_OK;
-+    }
-+
-+    m = gst_buffer_n_memory(video_frame);
-+    while (--m>=0) {
-+      mem = gst_buffer_get_memory(video_frame, m);
-+      GST_MEMORY_FLAG_UNSET (mem, GST_MEMORY_FLAG_READONLY);
-+      gst_memory_unref (mem);
-+    }
-+  } else {
-+    video_frame = gst_buffer_make_writable (video_frame);
-+  }
-+
-   if (!gst_video_frame_map (&frame, &overlay->info, video_frame,
-           GST_MAP_READWRITE))
-     goto invalid_frame;
-@@ -1918,6 +1974,18 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * overlay,
- 
-   gst_video_frame_unmap (&frame);
- 
-+  if (mem_rdonly && orig == video_frame) {
-+    //if we used the original buffer and it's mem is set to read only,
-+    //recover the memory ready only flag since we unset it before
-+    // gst_video_frame_map ()
-+    m = gst_buffer_n_memory(video_frame);
-+    while (--m>=0) {
-+      mem = gst_buffer_get_memory(video_frame, m);
-+      GST_MEMORY_FLAGS(mem) |= (GST_MEMORY_FLAG_READONLY);
-+      gst_memory_unref (mem);
-+    }
-+  }
-+
- done:
- 
-   return gst_pad_push (overlay->srcpad, video_frame);
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
deleted file mode 100644
index 3db4724..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 269f642c45d85cfd630ed490478e6bd6b71a767f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Tue, 16 Sep 2014 01:07:18 +0300
-Subject: [PATCH] video-frame: Don't ref buffers twice when mapping
-
-Upstream-Status: Backport [1.5.1]
----
- gst-libs/gst/video/video-frame.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/gst-libs/gst/video/video-frame.c b/gst-libs/gst/video/video-frame.c
-index 01f23c0..8a9ae96 100644
---- a/gst-libs/gst/video/video-frame.c
-+++ b/gst-libs/gst/video/video-frame.c
-@@ -105,7 +105,7 @@ gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info,
-       frame->data[i] = frame->map[0].data + info->offset[i];
-     }
-   }
--  frame->buffer = gst_buffer_ref (buffer);
-+  frame->buffer = buffer;
-   if ((flags & GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0)
-     gst_buffer_ref (frame->buffer);
- 
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
new file mode 100644
index 0000000..85fcacb
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch
@@ -0,0 +1,298 @@
+From 990b653c7b6de1937ec759019982d6c5f15770f7 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 26 Oct 2015 16:38:18 +0200
+Subject: [PATCH 2/4] Makefile.am: prefix calls to pkg-config with
+ PKG_CONFIG_SYSROOT_DIR
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst-libs/gst/allocators/Makefile.am |  4 ++--
+ gst-libs/gst/app/Makefile.am        |  4 ++--
+ gst-libs/gst/audio/Makefile.am      | 12 ++++++------
+ gst-libs/gst/fft/Makefile.am        |  4 ++--
+ gst-libs/gst/pbutils/Makefile.am    | 12 ++++++------
+ gst-libs/gst/riff/Makefile.am       |  8 ++++----
+ gst-libs/gst/rtp/Makefile.am        |  8 ++++----
+ gst-libs/gst/rtsp/Makefile.am       |  4 ++--
+ gst-libs/gst/sdp/Makefile.am        |  4 ++--
+ gst-libs/gst/tag/Makefile.am        |  8 ++++----
+ gst-libs/gst/video/Makefile.am      |  8 ++++----
+ 11 files changed, 38 insertions(+), 38 deletions(-)
+
+diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am
+index bc7f53a..0ef5f86 100644
+--- a/gst-libs/gst/allocators/Makefile.am
++++ b/gst-libs/gst/allocators/Makefile.am
+@@ -34,7 +34,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@
+ 		--c-include "gst/allocators/allocators.h" \
+ 		-I$(top_srcdir)/gst-libs \
+ 		-I$(top_builddir)/gst-libs \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		--library=libgstallocators-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--libtool="$(LIBTOOL)" \
+@@ -58,7 +58,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ 		$(INTROSPECTION_COMPILER) \
+ 		--includedir=$(srcdir) \
+ 		--includedir=$(builddir) \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ 
+ CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am
+index dcc2fe0..dc076cb 100644
+--- a/gst-libs/gst/app/Makefile.am
++++ b/gst-libs/gst/app/Makefile.am
+@@ -47,8 +47,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO
+ 		--c-include "gst/app/app.h" \
+ 		-I$(top_srcdir)/gst-libs \
+ 		-I$(top_builddir)/gst-libs \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		--library=libgstapp-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am
+index 2374196..295eb42 100644
+--- a/gst-libs/gst/audio/Makefile.am
++++ b/gst-libs/gst/audio/Makefile.am
+@@ -96,12 +96,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE
+ 		-I$(top_srcdir)/gst-libs \
+ 		-I$(top_builddir)/gst-libs \
+ 		--c-include "gst/audio/audio.h" \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		--add-include-path="$(top_builddir)/gst-libs/gst/tag/" \
+ 		--library=libgstaudio-@GST_API_VERSION@.la \
+-		--library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \
+-		--library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \
++		--library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \
++		--library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \
+ 		--library-path="$(top_builddir)/gst-libs/gst/tag/" \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+@@ -130,8 +130,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ 		--includedir=$(srcdir) \
+ 		--includedir=$(builddir) \
+ 		--includedir="$(top_builddir)/gst-libs/gst/tag/" \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ 
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
+diff --git a/gst-libs/gst/fft/Makefile.am b/gst-libs/gst/fft/Makefile.am
+index f545354..1bb6243 100644
+--- a/gst-libs/gst/fft/Makefile.am
++++ b/gst-libs/gst/fft/Makefile.am
+@@ -61,7 +61,7 @@ GstFft-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstfft-@GST_API_VERSIO
+ 		--c-include "gst/fft/fft.h" \
+ 		-I$(top_srcdir)/gst-libs \
+ 		-I$(top_builddir)/gst-libs \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		--library=libgstfft-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--libtool="$(LIBTOOL)" \
+@@ -85,7 +85,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ 		$(INTROSPECTION_COMPILER) \
+ 		--includedir=$(srcdir) \
+ 		--includedir=$(builddir) \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ 
+ CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am
+index 91dc214..dc8e1d3 100644
+--- a/gst-libs/gst/pbutils/Makefile.am
++++ b/gst-libs/gst/pbutils/Makefile.am
+@@ -79,14 +79,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP
+ 		--c-include "gst/pbutils/pbutils.h" \
+ 		-I$(top_srcdir)/gst-libs \
+ 		-I$(top_builddir)/gst-libs \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		--add-include-path="$(top_builddir)/gst-libs/gst/tag/" \
+ 		--add-include-path="$(top_builddir)/gst-libs/gst/video/" \
+ 		--add-include-path="$(top_builddir)/gst-libs/gst/audio/" \
+ 		--library=libgstpbutils-@GST_API_VERSION@.la \
+-		--library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \
+-		--library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \
++		--library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \
++		--library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \
+ 		--library-path="$(top_builddir)/gst-libs/gst/tag/" \
+ 		--library-path="$(top_builddir)/gst-libs/gst/video/" \
+ 		--library-path="$(top_builddir)/gst-libs/gst/audio/" \
+@@ -119,8 +119,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ 		$(INTROSPECTION_COMPILER) \
+ 		--includedir=$(srcdir) \
+ 		--includedir=$(builddir) \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		--includedir="$(top_builddir)/gst-libs/gst/tag/" \
+ 		--includedir="$(top_builddir)/gst-libs/gst/video/" \
+ 		--includedir="$(top_builddir)/gst-libs/gst/audio/" \
+diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
+index 3bd8fc0..0a115cc 100644
+--- a/gst-libs/gst/riff/Makefile.am
++++ b/gst-libs/gst/riff/Makefile.am
+@@ -41,8 +41,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+ #		--c-include "gst/riff/riff.h" \
+ #		--add-include-path=$(builddir)/../tag \
+ #		--add-include-path=$(builddir)/../audio \
+-#		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-#		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++#		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++#		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ #		--library=libgstriff-@GST_API_VERSION@.la \
+ #		--include=GstAudio-@GST_API_VERSION@ \
+ #		--include=GstTag-@GST_API_VERSION@ \
+@@ -73,8 +73,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+ #		--includedir=$(builddir) \
+ #		--includedir=$(builddir)/../tag \
+ #		--includedir=$(builddir)/../audio \
+-#		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-#		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++#		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++#		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ #		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ #
+ #CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am
+index f5445c1..527c0b4 100644
+--- a/gst-libs/gst/rtp/Makefile.am
++++ b/gst-libs/gst/rtp/Makefile.am
+@@ -59,8 +59,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO
+ 		--c-include "gst/rtp/rtp.h" \
+ 		-I$(top_builddir)/gst-libs \
+ 		-I$(top_srcdir)/gst-libs \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		--library=libgstrtp-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+@@ -87,8 +87,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ 		$(INTROSPECTION_COMPILER) \
+ 		--includedir=$(srcdir) \
+ 		--includedir=$(builddir) \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ 
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
+diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
+index 9b0b258..4f6d9f8 100644
+--- a/gst-libs/gst/rtsp/Makefile.am
++++ b/gst-libs/gst/rtsp/Makefile.am
+@@ -66,7 +66,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+ 		-I$(top_builddir)/gst-libs \
+ 		-I$(top_srcdir)/gst-libs \
+ 		--add-include-path=$(builddir)/../sdp \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		--library=libgstrtsp-@GST_API_VERSION@.la \
+ 		--include=Gio-2.0 \
+ 		--include=Gst-@GST_API_VERSION@ \
+@@ -96,7 +96,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ 		--includedir=$(srcdir) \
+ 		--includedir=$(builddir) \
+ 		--includedir=$(builddir)/../sdp \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ 
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
+diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am
+index 0e149b8..9aa0512 100644
+--- a/gst-libs/gst/sdp/Makefile.am
++++ b/gst-libs/gst/sdp/Makefile.am
+@@ -28,7 +28,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO
+ 		--warn-all \
+ 		--c-include "gst/sdp/sdp.h" \
+ 		-I$(top_srcdir)/gst-libs \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		--library=libgstsdp-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--libtool="$(LIBTOOL)" \
+@@ -52,7 +52,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ 		$(INTROSPECTION_COMPILER) \
+ 		--includedir=$(srcdir) \
+ 		--includedir=$(builddir) \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+ 		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ 
+ CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am
+index cafafd3..ba99279 100644
+--- a/gst-libs/gst/tag/Makefile.am
++++ b/gst-libs/gst/tag/Makefile.am
+@@ -39,8 +39,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO
+ 		--c-include "gst/tag/tag.h" \
+ 		-I$(top_srcdir)/gst-libs \
+ 		-I$(top_builddir)/gst-libs \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		--library=libgsttag-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+@@ -67,8 +67,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ 		$(INTROSPECTION_COMPILER) \
+ 		--includedir=$(srcdir) \
+ 		--includedir=$(builddir) \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ 
+ CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA)
+diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am
+index ac64eb3..342c8c6 100644
+--- a/gst-libs/gst/video/Makefile.am
++++ b/gst-libs/gst/video/Makefile.am
+@@ -108,8 +108,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE
+ 		--c-include "gst/video/video.h" \
+ 		-I$(top_srcdir)/gst-libs \
+ 		-I$(top_builddir)/gst-libs \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		--library=libgstvideo-@GST_API_VERSION@.la \
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstBase-@GST_API_VERSION@ \
+@@ -136,8 +136,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib)
+ 		$(INTROSPECTION_COMPILER) \
+ 		--includedir=$(srcdir) \
+ 		--includedir=$(builddir) \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-		--includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
++		--includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \
+ 		$(INTROSPECTION_COMPILER_OPTS) $< -o $(@F)
+ 
+ CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA)
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
deleted file mode 100644
index 39c146a..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 0a78555ea6c8c2f1ee27ee4707e8d7aa00ab7a66 Mon Sep 17 00:00:00 2001
-From: Mingke Wang <mingke.wang@freescale.com>
-Date: Thu, 19 Mar 2015 14:15:25 +0800
-Subject: [PATCH 2/4] gstplaysink: don't set async of custom text-sink to
- false
-
-set async to false lead to A/V sync problem when seeking.
-the preroll need use GAP event instead of set async to false.
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=747499]
-
-Signed-off-by: Mingke Wang <mingke.wang@freescale.com>
-
-diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c
-old mode 100644
-new mode 100755
-index f5a2d42..fba0172
---- a/gst/playback/gstplaysink.c
-+++ b/gst/playback/gstplaysink.c
-@@ -2408,7 +2408,7 @@ gen_text_chain (GstPlaySink * playsink)
-           G_TYPE_BOOLEAN);
-       if (elem) {
-         /* make sure the sparse subtitles don't participate in the preroll */
--        g_object_set (elem, "async", FALSE, NULL);
-+        //g_object_set (elem, "async", FALSE, NULL);
-         GST_DEBUG_OBJECT (playsink, "adding custom text sink");
-         gst_bin_add (bin, chain->sink);
-         /* NOTE streamsynchronizer needs streams decoupled */
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
deleted file mode 100644
index c465b5c..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 40a293d44d1aeccf5eb8e86f23a0b13666111c5c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Fri, 12 Sep 2014 14:39:16 +0300
-Subject: [PATCH 2/3] video-frame: Add GST_VIDEO_FRAME_MAP_FLAG_NO_REF
-
-This makes sure that the buffer is not reffed another time when
-storing it in the GstVideoFrame, keeping it writable if it was
-writable.
-
-Upstream-Status: Backport [1.5.1]
-https://bugzilla.gnome.org/show_bug.cgi?id=736118
----
- gst-libs/gst/video/video-frame.c |    9 ++++++++-
- gst-libs/gst/video/video-frame.h |   18 ++++++++++++++++++
- 2 files changed, 26 insertions(+), 1 deletion(-)
-
-diff --git a/gst-libs/gst/video/video-frame.c b/gst-libs/gst/video/video-frame.c
-index 537cf70..01f23c0 100644
---- a/gst-libs/gst/video/video-frame.c
-+++ b/gst-libs/gst/video/video-frame.c
-@@ -106,6 +106,9 @@ gst_video_frame_map_id (GstVideoFrame * frame, GstVideoInfo * info,
-     }
-   }
-   frame->buffer = gst_buffer_ref (buffer);
-+  if ((flags & GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0)
-+    gst_buffer_ref (frame->buffer);
-+
-   frame->meta = meta;
- 
-   /* buffer flags enhance the frame flags */
-@@ -189,11 +192,13 @@ gst_video_frame_unmap (GstVideoFrame * frame)
-   GstBuffer *buffer;
-   GstVideoMeta *meta;
-   gint i;
-+  GstMapFlags flags;
- 
-   g_return_if_fail (frame != NULL);
- 
-   buffer = frame->buffer;
-   meta = frame->meta;
-+  flags = frame->map[0].flags;
- 
-   if (meta) {
-     for (i = 0; i < frame->info.finfo->n_planes; i++) {
-@@ -202,7 +207,9 @@ gst_video_frame_unmap (GstVideoFrame * frame)
-   } else {
-     gst_buffer_unmap (buffer, &frame->map[0]);
-   }
--  gst_buffer_unref (buffer);
-+
-+  if ((flags & GST_VIDEO_FRAME_MAP_FLAG_NO_REF) == 0)
-+    gst_buffer_unref (frame->buffer);
- }
- 
- /**
-diff --git a/gst-libs/gst/video/video-frame.h b/gst-libs/gst/video/video-frame.h
-index 627fab0..f8e6304 100644
---- a/gst-libs/gst/video/video-frame.h
-+++ b/gst-libs/gst/video/video-frame.h
-@@ -149,6 +149,24 @@ typedef enum {
-   GST_VIDEO_BUFFER_FLAG_LAST        = (GST_BUFFER_FLAG_LAST << 8)
- } GstVideoBufferFlags;
- 
-+/**
-+ * GstVideoBufferFlags:
-+ * @GST_VIDEO_FRAME_MAP_FLAG_NO_REF:  Don't take another reference of the buffer and store it in
-+ *                                    the GstVideoFrame. This makes sure that the buffer stays
-+ *                                    writable while the frame is mapped, but requires that the
-+ *                                    buffer reference stays valid until the frame is unmapped again.
-+ * @GST_VIDEO_FRAME_MAP_FLAG_LAST:    Offset to define more flags
-+ *
-+ * Additional mapping flags for gst_video_frame_map().
-+ *
-+ * Since: 1.6
-+ */
-+typedef enum {
-+  GST_VIDEO_FRAME_MAP_FLAG_NO_REF   = (GST_MAP_FLAG_LAST << 0),
-+  GST_VIDEO_FRAME_MAP_FLAG_LAST     = (GST_MAP_FLAG_LAST << 8)
-+  /* 8 more flags possible afterwards */
-+} GstVideoFrameMapFlags;
-+
- G_END_DECLS
- 
- #endif /* __GST_VIDEO_FRAME_H__ */
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch
new file mode 100644
index 0000000..9b66f7f
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch
@@ -0,0 +1,28 @@
+From 3c2c2d5dd08aa30ed0e8acd8566ec99412bb8209 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 26 Oct 2015 17:29:37 +0200
+Subject: [PATCH 3/4] riff: add missing include directories when calling
+ introspection scanner
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst-libs/gst/riff/Makefile.am | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am
+index 0a115cc..5057a58 100644
+--- a/gst-libs/gst/riff/Makefile.am
++++ b/gst-libs/gst/riff/Makefile.am
+@@ -39,6 +39,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS)
+ #		--strip-prefix=Gst \
+ #		--warn-all \
+ #		--c-include "gst/riff/riff.h" \
++#               -I$(top_srcdir)/gst-libs \
++#               -I$(top_builddir)/gst-libs \
+ #		--add-include-path=$(builddir)/../tag \
+ #		--add-include-path=$(builddir)/../audio \
+ #		--add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
deleted file mode 100644
index 132bf06..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 3a7cdcdfc9c5b0d20394fe51b3b8cda23931ca6d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
-Date: Fri, 12 Sep 2014 14:41:01 +0300
-Subject: [PATCH 3/3] videofilter: Use new GST_VIDEO_FRAME_MAP_FLAG_NO_REF
-
-Upstream-Status: Backport [1.5.1]
-https://bugzilla.gnome.org/show_bug.cgi?id=736118
----
- gst-libs/gst/video/gstvideofilter.c |   23 ++++-------------------
- 1 file changed, 4 insertions(+), 19 deletions(-)
-
-diff --git a/gst-libs/gst/video/gstvideofilter.c b/gst-libs/gst/video/gstvideofilter.c
-index e1fa2c1..874b2e8 100644
---- a/gst-libs/gst/video/gstvideofilter.c
-+++ b/gst-libs/gst/video/gstvideofilter.c
-@@ -260,23 +260,15 @@ gst_video_filter_transform (GstBaseTransform * trans, GstBuffer * inbuf,
-   if (fclass->transform_frame) {
-     GstVideoFrame in_frame, out_frame;
- 
--    if (!gst_video_frame_map (&in_frame, &filter->in_info, inbuf, GST_MAP_READ))
-+    if (!gst_video_frame_map (&in_frame, &filter->in_info, inbuf,
-+            GST_MAP_READ | GST_VIDEO_FRAME_MAP_FLAG_NO_REF))
-       goto invalid_buffer;
- 
-     if (!gst_video_frame_map (&out_frame, &filter->out_info, outbuf,
--            GST_MAP_WRITE))
-+            GST_MAP_WRITE | GST_VIDEO_FRAME_MAP_FLAG_NO_REF))
-       goto invalid_buffer;
- 
--    /* GstVideoFrame has another reference, so the buffer looks unwriteable,
--     * meaning that we can't attach any metas or anything to it. Other
--     * map() functions like gst_buffer_map() don't get another reference
--     * of the buffer and expect the buffer reference to be kept until
--     * the buffer is unmapped again. */
--    gst_buffer_unref (inbuf);
--    gst_buffer_unref (outbuf);
-     res = fclass->transform_frame (filter, &in_frame, &out_frame);
--    gst_buffer_ref (inbuf);
--    gst_buffer_ref (outbuf);
- 
-     gst_video_frame_unmap (&out_frame);
-     gst_video_frame_unmap (&in_frame);
-@@ -317,7 +309,7 @@ gst_video_filter_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
-     GstVideoFrame frame;
-     GstMapFlags flags;
- 
--    flags = GST_MAP_READ;
-+    flags = GST_MAP_READ | GST_VIDEO_FRAME_MAP_FLAG_NO_REF;
- 
-     if (!gst_base_transform_is_passthrough (trans))
-       flags |= GST_MAP_WRITE;
-@@ -325,14 +317,7 @@ gst_video_filter_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
-     if (!gst_video_frame_map (&frame, &filter->in_info, buf, flags))
-       goto invalid_buffer;
- 
--    /* GstVideoFrame has another reference, so the buffer looks unwriteable,
--     * meaning that we can't attach any metas or anything to it. Other
--     * map() functions like gst_buffer_map() don't get another reference
--     * of the buffer and expect the buffer reference to be kept until
--     * the buffer is unmapped again. */
--    gst_buffer_unref (buf);
-     res = fclass->transform_frame_ip (filter, &frame);
--    gst_buffer_ref (buf);
- 
-     gst_video_frame_unmap (&frame);
-   } else {
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
new file mode 100644
index 0000000..42d99c1
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch
@@ -0,0 +1,27 @@
+From 4330915d88dc4dd46eb4c28d756482b767c2747f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 26 Oct 2015 17:30:14 +0200
+Subject: [PATCH 4/4] rtsp: drop incorrect reference to gstreamer-sdp in
+ Makefile.am
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst-libs/gst/rtsp/Makefile.am | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am
+index 4f6d9f8..0afa370 100644
+--- a/gst-libs/gst/rtsp/Makefile.am
++++ b/gst-libs/gst/rtsp/Makefile.am
+@@ -74,7 +74,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS
+ 		--libtool="$(LIBTOOL)" \
+ 		--pkg gio-2.0 \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+-		--pkg gstreamer-sdp-@GST_API_VERSION@ \
+ 		--pkg-export gstreamer-rtsp-@GST_API_VERSION@ \
+ 		--add-init-section="$(INTROSPECTION_INIT)" \
+ 		--output $@ \
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch
new file mode 100755
index 0000000..096a6f4
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-convertframe-Support-video-crop-when-convert-frame.patch
@@ -0,0 +1,143 @@
+From 5be6ed00aad028d9cbb4e0c63af0be69d335c71e Mon Sep 17 00:00:00 2001
+From: Song Bing <b06498@freescale.com>
+Date: Fri, 11 Dec 2015 21:42:00 +0800
+Subject: [PATCH] convertframe: Support video crop when convert frame
+
+Get thumbnail will user convertframe to convert video frame to
+desired video format and size. But haven't process crop meta on
+the video buffer. Add support video crop.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=759329
+
+Upstream-Status: Backport [1.7.1]
+
+---
+ gst-libs/gst/video/convertframe.c | 65 +++++++++++++++++++++++++++++++++------
+ 1 file changed, 56 insertions(+), 9 deletions(-)
+
+diff --git a/gst-libs/gst/video/convertframe.c b/gst-libs/gst/video/convertframe.c
+index aa9c3d3..942a51e 100644
+--- a/gst-libs/gst/video/convertframe.c
++++ b/gst-libs/gst/video/convertframe.c
+@@ -110,12 +110,23 @@ fail:
+ static GstElement *
+ build_convert_frame_pipeline (GstElement ** src_element,
+     GstElement ** sink_element, const GstCaps * from_caps,
+-    const GstCaps * to_caps, GError ** err)
++    GstVideoCropMeta * cmeta, const GstCaps * to_caps, GError ** err)
+ {
+-  GstElement *src = NULL, *csp = NULL, *vscale = NULL;
+-  GstElement *sink = NULL, *encoder = NULL, *pipeline;
++  GstElement *vcrop = NULL, *csp = NULL, *csp2 = NULL, *vscale = NULL;
++  GstElement *src = NULL, *sink = NULL, *encoder = NULL, *pipeline;
++  GstVideoInfo info;
+   GError *error = NULL;
+ 
++  if (cmeta) {
++    if (!create_element ("videocrop", &vcrop, &error)) {
++      g_warning
++          ("build_convert_frame_pipeline: Buffer has crop metadata but videocrop element is not found. Cropping will be disabled");
++    } else {
++      if (!create_element ("videoconvert", &csp2, &error))
++        goto no_elements;
++    }
++  }
++
+   /* videoscale is here to correct for the pixel-aspect-ratio for us */
+   GST_DEBUG ("creating elements");
+   if (!create_element ("appsrc", &src, &error) ||
+@@ -133,15 +144,42 @@ build_convert_frame_pipeline (GstElement ** src_element,
+ 
+   GST_DEBUG ("adding elements");
+   gst_bin_add_many (GST_BIN (pipeline), src, csp, vscale, sink, NULL);
++  if (vcrop)
++    gst_bin_add_many (GST_BIN (pipeline), vcrop, csp2, NULL);
+ 
+   /* set caps */
+   g_object_set (src, "caps", from_caps, NULL);
++  if (vcrop) {
++    gst_video_info_from_caps (&info, from_caps);
++    g_object_set (vcrop, "left", cmeta->x, NULL);
++    g_object_set (vcrop, "top", cmeta->y, NULL);
++    g_object_set (vcrop, "right", GST_VIDEO_INFO_WIDTH (&info) - cmeta->width,
++        NULL);
++    g_object_set (vcrop, "bottom",
++        GST_VIDEO_INFO_HEIGHT (&info) - cmeta->height, NULL);
++    GST_DEBUG ("crop meta [x,y,width,height]: %d %d %d %d", cmeta->x, cmeta->y,
++        cmeta->width, cmeta->height);
++  }
+   g_object_set (sink, "caps", to_caps, NULL);
+ 
+   /* FIXME: linking is still way too expensive, profile this properly */
+-  GST_DEBUG ("linking src->csp");
+-  if (!gst_element_link_pads (src, "src", csp, "sink"))
+-    goto link_failed;
++  if (vcrop) {
++    GST_DEBUG ("linking src->csp2");
++    if (!gst_element_link_pads (src, "src", csp2, "sink"))
++      goto link_failed;
++
++    GST_DEBUG ("linking csp2->vcrop");
++    if (!gst_element_link_pads (csp2, "src", vcrop, "sink"))
++      goto link_failed;
++
++    GST_DEBUG ("linking vcrop->csp");
++    if (!gst_element_link_pads (vcrop, "src", csp, "sink"))
++      goto link_failed;
++  } else {
++    GST_DEBUG ("linking src->csp");
++    if (!gst_element_link_pads (src, "src", csp, "sink"))
++      goto link_failed;
++  }
+ 
+   GST_DEBUG ("linking csp->vscale");
+   if (!gst_element_link_pads_full (csp, "src", vscale, "sink",
+@@ -193,8 +231,12 @@ no_elements:
+   {
+     if (src)
+       gst_object_unref (src);
++    if (vcrop)
++      gst_object_unref (vcrop);
+     if (csp)
+       gst_object_unref (csp);
++    if (csp2)
++      gst_object_unref (csp2);
+     if (vscale)
+       gst_object_unref (vscale);
+     if (sink)
+@@ -209,7 +251,11 @@ no_elements:
+ no_pipeline:
+   {
+     gst_object_unref (src);
++    if (vcrop)
++      gst_object_unref (vcrop);
+     gst_object_unref (csp);
++    if (csp2)
++      gst_object_unref (csp2);
+     gst_object_unref (vscale);
+     gst_object_unref (sink);
+ 
+@@ -282,7 +328,8 @@ gst_video_convert_sample (GstSample * sample, const GstCaps * to_caps,
+   }
+ 
+   pipeline =
+-      build_convert_frame_pipeline (&src, &sink, from_caps, to_caps_copy, &err);
++      build_convert_frame_pipeline (&src, &sink, from_caps,
++      gst_buffer_get_video_crop_meta (buf), to_caps_copy, &err);
+   if (!pipeline)
+     goto no_pipeline;
+ 
+@@ -646,8 +693,8 @@ gst_video_convert_sample_async (GstSample * sample,
+   }
+ 
+   pipeline =
+-      build_convert_frame_pipeline (&src, &sink, from_caps, to_caps_copy,
+-      &error);
++      build_convert_frame_pipeline (&src, &sink, from_caps,
++      gst_buffer_get_video_crop_meta (buf), to_caps_copy, &error);
+   if (!pipeline)
+     goto no_pipeline;
+ 
+-- 
+2.5.0
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch
deleted file mode 100644
index aa55de1..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event-if.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From b608d027fff6efc2d1988ebf169cbe3b2b44a61b Mon Sep 17 00:00:00 2001
-From: zhouming <b42586@freescale.com>
-Date: Thu, 8 May 2014 12:01:17 +0800
-Subject: [PATCH] ENGR00312034: do not change eos event to gap event if no
- data has passed to streamsynchronizer.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=727074
-
-Upstream-Status: Pending
-
-Signed-off-by: zhouming <b42586@freescale.com>
----
- gst/playback/gststreamsynchronizer.c |    5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c
-index 3997d1b..3e17c55 100644
---- a/gst/playback/gststreamsynchronizer.c
-+++ b/gst/playback/gststreamsynchronizer.c
-@@ -488,12 +488,11 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
-         }
-         g_slist_free (pads);
-       } else {
--        /* if EOS, but no data has passed, then send something to replace EOS
--         * for preroll purposes */
-+        /* if EOS, but no data has passed, then send EOS event */
-         if (!seen_data) {
-           GstEvent *gap_event;
- 
--          gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE);
-+          gap_event = gst_event_new_eos ();
-           ret = gst_pad_push_event (srcpad, gap_event);
-         } else {
-           GstEvent *gap_event;
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
deleted file mode 100755
index f24bc7c..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-commit f9536544f5ad182b4f78d0143d1daa45dd64e624
-Author: Song Bing <b06498@freescale.com>
-Date:   Thu Oct 9 17:37:43 2014 +0800
-
-[gststreamsynchronizer] send EOS event insterd of GAP event as GAP
-event has issue when A/V have different duration.
-    
-send EOS event insterd of GAP event as GAP event has issue when A/V have different duration.
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=736655]
-
-Signed-off-by: Song Bing <b06498@freescale.com>
-
-diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c
-index 3e17c55..ff42d72 100644
---- a/gst/playback/gststreamsynchronizer.c
-+++ b/gst/playback/gststreamsynchronizer.c
-@@ -488,19 +488,24 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
-         }
-         g_slist_free (pads);
-       } else {
--        /* if EOS, but no data has passed, then send EOS event */
-+        /* if EOS, but no data has passed, then send something to replace EOS
-+         * for preroll purposes */
-         if (!seen_data) {
--          GstEvent *gap_event;
-+          GstEvent *eos_event;
- 
--          gap_event = gst_event_new_eos ();
--          ret = gst_pad_push_event (srcpad, gap_event);
-+          /* FIXME: change to EOS event as GAP event has issue when A/V have
-+           * different duration */
-+          eos_event = gst_event_new_eos ();
-+          ret = gst_pad_push_event (srcpad, eos_event);
-         } else {
--          GstEvent *gap_event;
-+          GstEvent *eos_event;
- 
-           /* FIXME: Also send a GAP event to let audio sinks start their
-            * clock in case they did not have enough data yet */
--          gap_event = gst_event_new_gap (timestamp, GST_CLOCK_TIME_NONE);
--          ret = gst_pad_push_event (srcpad, gap_event);
-+          /* FIXME: change to EOS event as GAP event has issue when A/V have
-+           * different duration */
-+          eos_event = gst_event_new_eos ();
-+          ret = gst_pad_push_event (srcpad, eos_event);
-         }
-       }
-       gst_object_unref (srcpad);
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
deleted file mode 100755
index 731be68..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit 3f7052aac5e0118a9a9e09fff2f65091be448972
-Author: Song Bing <b06498@freescale.com>
-Date:   Thu Oct 23 13:35:13 2014 +0800
-
-[streamsynchronizer] One stream can finish playback.
-  
-As changed GAP event EOS event, so EOS will send more times, which will
-cause send function return error.
-Streamsynchronizer will don’t send second track EOS event if send the
-first track EOS return fail. Fixed by ignore the return error.
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=736655]
-
-Signed-off-by: Song Bing b06498@freescale.com
-
-diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c
-index ff42d72..d1732c3 100644
---- a/gst/playback/gststreamsynchronizer.c
-+++ b/gst/playback/gststreamsynchronizer.c
-@@ -482,7 +482,10 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
-         while (epad) {
-           pad = epad->data;
-           GST_DEBUG_OBJECT (pad, "Pushing EOS");
--          ret = ret && gst_pad_push_event (pad, gst_event_new_eos ());
-+          /* FIXME: remove error check as GAP changed to EOS will send EOS
-+           * more times, which will cause return error and then don't send
-+           * EOS event to following tracks. */
-+          gst_pad_push_event (pad, gst_event_new_eos ());
-           gst_object_unref (pad);
-           epad = g_slist_next (epad);
-         }
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
deleted file mode 100755
index ef3f75f..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/fix-id3demux-utf16-to-utf8-issue.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Author: Lyon Wang <b12696@freescale.com>
-Date:   Thu Oct 9 17:37:43 2014 +0800
-
-[id3v2frames] Bug fix for id3demux issue
-
-Fix the issue that id3 tags utf16 charaters cannot be extreacted in id3demux
-when I tried to get the id3v2 tag such as TIT2, TALB etc. it will return extrac
-failed.
-
-Checked in id3v2frame.c,  When parse the UTF-16 streams, it used g_convert() to
-convert the buffer from UTF-16 to UTF-8, however it will return err that this
-conversion is not supported which cause the extraction failed with these UTF-16
-characters.
-
-In the patch, use g_utf16_to_utf8() instead of g_convert, which can convert the
-character format successfully.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=741144
-
-Upstream-Status: Backport [1.5.1]
-
-Signed-off-by: Lyon Wang <b12696@freescale.com>
-
-diff --git a/gst-libs/gst/tag/id3v2frames.c b/gst-libs/gst/tag/id3v2frames.c
-old mode 100644
-new mode 100755
-index 3785c2a..7b9d8ac
---- a/gst-libs/gst/tag/id3v2frames.c
-+++ b/gst-libs/gst/tag/id3v2frames.c
-@@ -1057,14 +1057,17 @@ parse_insert_string_field (guint8 encoding, gchar * data, gint data_size,
-         data_size -= 2;
-       }
- 
--      field = g_convert (data, data_size, "UTF-8", in_encode, NULL, NULL, NULL);
--
--      if (field == NULL || g_utf8_validate (field, -1, NULL) == FALSE) {
--        /* As a fallback, try interpreting UTF-16 in the other endianness */
--        if (in_encode == utf16beenc)
--          field = g_convert (data, data_size, "UTF-8", utf16leenc,
--              NULL, NULL, NULL);
-+      if (in_encode == utf16beenc) {
-+           gunichar2 *data_utf16;
-+           guint i;
-+           data_utf16 =  (gunichar2 *) data;
-+          for (i=0; i<(data_size>>1); i++) {
-+            data_utf16[i] = GUINT16_TO_LE (data_utf16[i]);
-+          }
-       }
-+      //field = g_convert (data, data_size, "UTF-8", in_encode, NULL, NULL, NULL);
-+       field = g_utf16_to_utf8((gunichar2 *)data, (glong)(data_size>>1), NULL, NULL, NULL);
-+
-     }
- 
-       break;
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
deleted file mode 100755
index 833ce72..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/handle-audio-video-decoder-error.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From bcb2b8b6f49e7c66124a4f5e07dea829d5ebfe59 Mon Sep 17 00:00:00 2001
-From: Lyon Wang <lyon.wang@freescale.com>
-Date: Mon, 15 Dec 2014 16:52:07 +0800
-Subject: [PATCH] handle audio/video decoder error
-
-When there is input data and no output data to the end of the stream, it will
-send GST_ELEMENT_ERROR, So the clips playing will quit.
-However, if only one of the tracks is corrupt, there is no need to quit other
-tracks playing.
-
-The patch comments the GST_ELEMENT_ERROR() and just add GST_ERROR_OBJECT()
-information instead.
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=741542]
-
-Signed-off-by: Lyon Wang <lyon.wang@freescale.com>
----
- gst-libs/gst/audio/gstaudiodecoder.c |    5 +++--
- gst-libs/gst/video/gstvideodecoder.c |    5 +++--
- 2 files changed, 6 insertions(+), 4 deletions(-)
- mode change 100644 => 100755 gst-libs/gst/audio/gstaudiodecoder.c
- mode change 100644 => 100755 gst-libs/gst/video/gstvideodecoder.c
-
-diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c
-old mode 100644
-new mode 100755
-index c2e7a28..891df0a
---- a/gst-libs/gst/audio/gstaudiodecoder.c
-+++ b/gst-libs/gst/audio/gstaudiodecoder.c
-@@ -2123,9 +2123,10 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
-       GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
- 
-       if (dec->priv->ctx.had_input_data && !dec->priv->ctx.had_output_data) {
--        GST_ELEMENT_ERROR (dec, STREAM, DECODE,
-+        /* GST_ELEMENT_ERROR (dec, STREAM, DECODE,
-             ("No valid frames decoded before end of stream"),
--            ("no valid frames found"));
-+            ("no valid frames found")); */
-+        GST_ERROR_OBJECT(dec, "No valid frames decoded before end of stream");
-       }
- 
-       /* send taglist if no valid frame is decoded util EOS */
-diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c
-old mode 100644
-new mode 100755
-index ac581e1..4278bcd
---- a/gst-libs/gst/video/gstvideodecoder.c
-+++ b/gst-libs/gst/video/gstvideodecoder.c
-@@ -1068,9 +1068,10 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder,
- 
-       /* Error out even if EOS was ok when we had input, but no output */
-       if (ret && priv->had_input_data && !priv->had_output_data) {
--        GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
-+        /* GST_ELEMENT_ERROR (decoder, STREAM, DECODE,
-             ("No valid frames decoded before end of stream"),
--            ("no valid frames found"));
-+            ("no valid frames found")); */
-+        GST_ERROR_OBJECT(decoder, "No valid frames decoded before end of stream");
-       }
- 
-       /* Forward EOS immediately. This is required because no
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
new file mode 100644
index 0000000..01e944d
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch
@@ -0,0 +1,47 @@
+From 10d2a977ee1d469f0bf9059bb2d0b55fd2eecbac Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Wed, 20 Jan 2016 13:00:00 -0800
+Subject: [PATCH] make gio_unix_2_0 dependency configurable
+
+Prior to 1.7.1, gst-plugins-base accepted a configure option to
+disable gio_unix_2_0, however it was implemented incorrectly using
+AG_GST_CHECK_FEATURE. That was fixed in 1.7.1 by making the
+dependency unconditional.
+
+  http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=aadefefba88afe4acbe64454650f24e7ce7c8d70
+
+To make builds deterministic, re-instate support for
+--disable-gio_unix_2_0, but implement it using the AC_ARG_ENABLE
+instead of AG_GST_CHECK_FEATURE.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ configure.ac | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9c52aeb..26cacd6 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -747,9 +747,16 @@ AC_SUBST(FT2_CFLAGS)
+ AC_SUBST(FT2_LIBS)
+ 
+ dnl *** gio-unix-2.0 for tests/check/pipelines/tcp.c ***
++AC_ARG_ENABLE([gio_unix_2_0],
++  [AS_HELP_STRING([--disable-gio_unix_2_0],[disable use of gio_unix_2_0])],
++  [],
++  [enable_gio_unix_2_0=yes])
++
++if test "x${enable_gio_unix_2_0}" != "xno"; then
+ PKG_CHECK_MODULES(GIO_UNIX_2_0, gio-unix-2.0 >= 2.24,
+     HAVE_GIO_UNIX_2_0="yes",
+     HAVE_GIO_UNIX_2_0="no")
++fi
+ AM_CONDITIONAL(USE_GIO_UNIX_2_0, test "x$HAVE_GIO_UNIX_2_0" = "xyes")
+ 
+ dnl *** finalize CFLAGS, LDFLAGS, LIBS
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
deleted file mode 100644
index 62a52b0..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/taglist-not-send-to-down-stream-if-all-the-frame-cor.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 68fa1b1425ad2c5f7c5013d0943153a8a6d0934e Mon Sep 17 00:00:00 2001
-From: Jian Li <lj.qfy.sh@gmail.com>
-Date: Wed, 24 Sep 2014 17:21:02 +0800
-Subject: [PATCH] taglist not send to down stream if all the frame corrupted
-
-https://bugzilla.gnome.org/show_bug.cgi?id=737246
-
-Upstream-Status: Pending
-
-Signed-off-by: Jian Li <lj.qfy.sh@gmail.com>
----
- gst-libs/gst/audio/gstaudiodecoder.c |    9 +++++++++
- gst-libs/gst/video/gstvideodecoder.c |    8 ++++++++
- 2 files changed, 17 insertions(+)
-
-diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c
-index 3504678..3d69efe 100644
---- a/gst-libs/gst/audio/gstaudiodecoder.c
-+++ b/gst-libs/gst/audio/gstaudiodecoder.c
-@@ -2083,6 +2083,15 @@ gst_audio_decoder_sink_eventfunc (GstAudioDecoder * dec, GstEvent * event)
-       gst_audio_decoder_drain (dec);
-       GST_AUDIO_DECODER_STREAM_UNLOCK (dec);
- 
-+      /* send taglist if no valid frame is decoded util EOS */
-+      if (dec->priv->taglist && dec->priv->taglist_changed) {
-+        GST_DEBUG_OBJECT (dec, "codec tag %" GST_PTR_FORMAT, dec->priv->taglist);
-+        if (!gst_tag_list_is_empty (dec->priv->taglist))
-+          gst_audio_decoder_push_event (dec,
-+              gst_event_new_tag (gst_tag_list_ref (dec->priv->taglist)));
-+        dec->priv->taglist_changed = FALSE;
-+      }
-+
-       /* Forward EOS because no buffer or serialized event will come after
-        * EOS and nothing could trigger another _finish_frame() call. */
-       ret = gst_audio_decoder_push_event (dec, event);
-diff --git a/gst-libs/gst/video/gstvideodecoder.c b/gst-libs/gst/video/gstvideodecoder.c
-index dd8abe3..d9bfe4d 100644
---- a/gst-libs/gst/video/gstvideodecoder.c
-+++ b/gst-libs/gst/video/gstvideodecoder.c
-@@ -1024,6 +1024,14 @@ gst_video_decoder_sink_event_default (GstVideoDecoder * decoder,
-        * parent class' ::sink_event() until a later time.
-        */
-       forward_immediate = TRUE;
-+
-+      /* send taglist if no valid frame is decoded util EOS */
-+      if (decoder->priv->tags && decoder->priv->tags_changed) {
-+        gst_video_decoder_push_event (decoder,
-+            gst_event_new_tag (gst_tag_list_ref (decoder->priv->tags)));
-+        decoder->priv->tags_changed = FALSE;
-+      }
-+
-       break;
-     }
-     case GST_EVENT_GAP:
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
deleted file mode 100755
index 8cfda95..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videobuffer_updata_alignment_update.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-commit 88d253ea23b06289df40401160b606323f16c910
-Author: Song Bing <b06498@freescale.com>
-Date:   Mon Dec 15 09:34:35 2014 +0800
-
-videopool: update video alignment after video alignment
-
-Video buffer pool will update video alignment to respect stride alignment
-requirement. But haven't update it to video alignment in configure.
-Which will cause user get wrong video alignment.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=741501
-
-Upstream-Status: Backport [1.5.1]
-
-Signed-off-by: Song Bing <b06498@freescale.com>
-diff --git a/gst-libs/gst/video/gstvideopool.c b/gst-libs/gst/video/gstvideopool.c
-index 4475f45..acef594 100644
---- a/gst-libs/gst/video/gstvideopool.c
-+++ b/gst-libs/gst/video/gstvideopool.c
-@@ -167,6 +167,7 @@ video_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
-     /* get an apply the alignment to the info */
-     gst_buffer_pool_config_get_video_alignment (config, &priv->video_align);
-     gst_video_info_align (&info, &priv->video_align);
-+    gst_buffer_pool_config_set_video_alignment (config, &priv->video_align);
-   }
-   priv->info = info;
-
-diff --git a/sys/ximage/ximagepool.c b/sys/ximage/ximagepool.c
-index 6cc2cfa..6a1cbc9 100644
---- a/sys/ximage/ximagepool.c
-+++ b/sys/ximage/ximagepool.c
-@@ -597,6 +597,8 @@ ximage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
-     /* do padding and alignment */
-     gst_video_info_align (&info, &priv->align);
-
-+    gst_buffer_pool_config_set_video_alignment (config, &priv->align);
-+
-     /* we need the video metadata too now */
-     priv->add_metavideo = TRUE;
-   } else {
-diff --git a/sys/xvimage/xvimagepool.c b/sys/xvimage/xvimagepool.c
-index 244a51a..34b1ab2 100644
---- a/sys/xvimage/xvimagepool.c
-+++ b/sys/xvimage/xvimagepool.c
-@@ -124,6 +124,8 @@ xvimage_buffer_pool_set_config (GstBufferPool * pool, GstStructure * config)
-     /* do padding and alignment */
-     gst_video_info_align (&info, &priv->align);
-
-+    gst_buffer_pool_config_set_video_alignment (config, &priv->align);
-+
-     /* we need the video metadata too now */
-     priv->add_metavideo = TRUE;
-   } else {
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
deleted file mode 100644
index b476969..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From c3f7d36b992a3cbcee3386dea85720f3cb04e1ff Mon Sep 17 00:00:00 2001
-From: Song Bing <b06498@freescale.com>
-Date: Fri, 27 Mar 2015 13:39:43 +0800
-Subject: [PATCH] videoencoder: Keep sticky events around when doing a soft
- reset
-
-The current code will first discard all frames, and then tries to copy
-all sticky events from the (now discarded) frames. Let's change the order.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=746865
-
-Upstream-Status: Accepted 
-
----
- gst-libs/gst/video/gstvideoencoder.c |    8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/gst-libs/gst/video/gstvideoencoder.c b/gst-libs/gst/video/gstvideoencoder.c
-index 614ba2d..4c5b111 100644
---- a/gst-libs/gst/video/gstvideoencoder.c
-+++ b/gst-libs/gst/video/gstvideoencoder.c
-@@ -340,10 +340,6 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, gboolean hard)
- 
-   priv->drained = TRUE;
- 
--  g_list_foreach (priv->frames, (GFunc) gst_video_codec_frame_unref, NULL);
--  g_list_free (priv->frames);
--  priv->frames = NULL;
--
-   priv->bytes = 0;
-   priv->time = 0;
- 
-@@ -392,6 +388,10 @@ gst_video_encoder_reset (GstVideoEncoder * encoder, gboolean hard)
-         encoder->priv->current_frame_events);
-   }
- 
-+  g_list_foreach (priv->frames, (GFunc) gst_video_codec_frame_unref, NULL);
-+  g_list_free (priv->frames);
-+  priv->frames = NULL;
-+
-   GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
- 
-   return ret;
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
deleted file mode 100644
index b09c2cb..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.4.5.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-include gstreamer1.0-plugins-base.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
-                    file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
-                    file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
-                   "
-
-SRC_URI += "file://do-not-change-eos-event-to-gap-event-if.patch \
-            file://get-caps-from-src-pad-when-query-caps.patch \
-            file://taglist-not-send-to-down-stream-if-all-the-frame-cor.patch \
-            file://fix-id3demux-utf16-to-utf8-issue.patch \
-            file://handle-audio-video-decoder-error.patch \
-            file://videobuffer_updata_alignment_update.patch \
-            file://0002-video-frame-Add-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \
-            file://0001-video-frame-Don-t-ref-buffers-twice-when-mapping.patch \
-            file://0003-videofilter-Use-new-GST_VIDEO_FRAME_MAP_FLAG_NO_REF.patch \
-            file://videoencoder-Keep-sticky-events-around-when-doing-a-soft-.patch \
-            file://do-not-change-eos-event-to-gap-event2.patch \
-            file://do-not-change-eos-event-to-gap-event3.patch \
-            file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \
-            file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
-            file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
-            file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
-            file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
-"
-
-SRC_URI[md5sum] = "357165af625c0ca353ab47c5d843920e"
-SRC_URI[sha256sum] = "77bd8199e7a312d3d71de9b7ddf761a3b78560a2c2a80829d0815ca39cbd551d"
-
-S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb
new file mode 100644
index 0000000..429dc93
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.6.3.bb
@@ -0,0 +1,25 @@
+include gstreamer1.0-plugins-base.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
+                    file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
+                    file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
+
+# Note: The dependency on freetype was dropped shortly after the 1.7.1 release
+# so these lines should be removed during the update to 1.8.x
+# http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=183610c035dd6955c9b3540b940aec50474af031
+DEPENDS += "freetype"
+EXTRA_OECONF += "--disable-freetypetest"
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
+    file://get-caps-from-src-pad-when-query-caps.patch \
+    file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+    file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
+    file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
+    file://0005-convertframe-Support-video-crop-when-convert-frame.patch \
+"
+
+SRC_URI[md5sum] = "3ddde0ad598ef69f58d6a2e87f8b460f"
+SRC_URI[sha256sum] = "b6154f8fdba4877e95efd94610ef0ada4f0171cd12eb829a3c3c97345d9c7a75"
+
+S = "${WORKDIR}/gst-plugins-base-${PV}"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
index fbe3a42..38a9fcc 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_git.bb
@@ -3,17 +3,25 @@
 include gstreamer1.0-plugins-base.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \
-                    file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
                     file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \
-                   "
+                    file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607"
+
+SRC_URI = " \
+    git://anongit.freedesktop.org/gstreamer/gst-plugins-base;name=base \
+    git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+    file://make-gio_unix_2_0-dependency-configurable.patch \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "97e108bebaa58821f4566a74cbf0135e93407c01"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_FORMAT = "base"
 
 S = "${WORKDIR}/git"
 
-SRCREV = "8d4cb64a4b9d84b10076bf350f80a0d6ea68ec2d"
-
 do_configure_prepend() {
-	cd ${S}
-	./autogen.sh --noconfigure
-	cd ${B}
+	${S}/autogen.sh --noconfigure
 }
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
index edaafe8..4621bf8 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good.inc
@@ -2,52 +2,52 @@
 
 LICENSE = "GPLv2+ & LGPLv2.1+"
 
-# libid3tag
-DEPENDS += "gstreamer1.0-plugins-base zlib bzip2 libcap"
+DEPENDS += "gstreamer1.0-plugins-base libcap zlib bzip2"
 
 inherit gettext
 
-
 PACKAGECONFIG ??= " \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+    ${GSTREAMER_ORC} \
     ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)} \
-    orc cairo flac gdk-pixbuf jpeg libpng soup speex taglib v4l2\
-    "
+    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+    cairo flac gdk-pixbuf gudev jpeg libpng soup speex taglib v4l2 \
+"
 
 X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage"
-X11ENABLEOPTS = "--enable-x --enable-xshm"
-X11DISABLEOPTS = "--disable-x --disable-xshm"
-PACKAGECONFIG[x11]        = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
-PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
+
 PACKAGECONFIG[cairo]      = "--enable-cairo,--disable-cairo,cairo"
+PACKAGECONFIG[dv1394]     = "--enable-dv1394,--disable-dv1394,libiec61883 libavc1394 libraw1394"
 PACKAGECONFIG[flac]       = "--enable-flac,--disable-flac,flac"
 PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf"
 PACKAGECONFIG[gudev]      = "--with-gudev,--without-gudev,libgudev"
-PACKAGECONFIG[libv4l2]    = "--with-libv4l2,--without-libv4l2,libv4l2"
 PACKAGECONFIG[jack]       = "--enable-jack,--disable-jack,jack"
 PACKAGECONFIG[jpeg]       = "--enable-jpeg,--disable-jpeg,jpeg"
 PACKAGECONFIG[libpng]     = "--enable-libpng,--disable-libpng,libpng"
+PACKAGECONFIG[libv4l2]    = "--with-libv4l2,--without-libv4l2,libv4l2"
+PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
 PACKAGECONFIG[soup]       = "--enable-soup,--disable-soup,libsoup-2.4"
 PACKAGECONFIG[speex]      = "--enable-speex,--disable-speex,speex"
 PACKAGECONFIG[taglib]     = "--enable-taglib,--disable-taglib,taglib"
+PACKAGECONFIG[v4l2]       = "--enable-gst_v4l2,--disable-gst_v4l2"
 PACKAGECONFIG[vpx]        = "--enable-vpx,--disable-vpx,libvpx"
 PACKAGECONFIG[wavpack]    = "--enable-wavpack,--disable-wavpack,wavpack"
-PACKAGECONFIG[dv1394]     = "--enable-dv1394,--disable-dv1394,libraw1394 libiec61883 libavc1394"
-PACKAGECONFIG[v4l2]       = "--enable-gst_v4l2,--disable-gst_v4l2"
+PACKAGECONFIG[x11]        = "--enable-x,--disable-x,${X11DEPENDS}"
 
 EXTRA_OECONF += " \
+    --enable-bz2 \
     --enable-oss \
-    --disable-directsound \
-    --disable-waveform \
-    --disable-oss4 \
-    --disable-sunaudio \
-    --disable-osx_audio \
-    --disable-osx_video \
+    --enable-zlib \
     --disable-aalib \
+    --disable-aalibtest \
+    --disable-directsound \
     --disable-libcaca \
     --disable-libdv \
+    --disable-oss4 \
+    --disable-osx_audio \
+    --disable-osx_video \
     --disable-shout2 \
-    --disable-examples \
+    --disable-sunaudio \
+    --disable-waveform \
 "
 
 FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch
new file mode 100644
index 0000000..c7f3630
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch
@@ -0,0 +1,44 @@
+From 4bfe2c8570a4a7080ec662504882969054d8a072 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Wed, 3 Feb 2016 18:12:38 -0800
+Subject: [PATCH] avoid including <sys/poll.h> directly
+
+musl libc generates warnings if <sys/poll.h> is included directly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ ext/raw1394/gstdv1394src.c  | 2 +-
+ ext/raw1394/gsthdv1394src.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c
+index dbc7607..3c42b41 100644
+--- a/ext/raw1394/gstdv1394src.c
++++ b/ext/raw1394/gstdv1394src.c
+@@ -37,7 +37,7 @@
+ #include "config.h"
+ #endif
+ #include <unistd.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/socket.h>
+ #include <errno.h>
+ #include <fcntl.h>
+diff --git a/ext/raw1394/gsthdv1394src.c b/ext/raw1394/gsthdv1394src.c
+index 0b07a37..9785a15 100644
+--- a/ext/raw1394/gsthdv1394src.c
++++ b/ext/raw1394/gsthdv1394src.c
+@@ -36,7 +36,7 @@
+ #include "config.h"
+ #endif
+ #include <unistd.h>
+-#include <sys/poll.h>
++#include <poll.h>
+ #include <sys/socket.h>
+ #include <errno.h>
+ #include <fcntl.h>
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch
deleted file mode 100755
index 288631b..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/decrease_asteriskh263_rank.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-commit d71d74daac8ed54156ed103958ab455c63c72b0e
-Author: Song Bing <b06498@freescale.com>
-Date:   Mon Nov 10 11:25:47 2014 +0800
-
-[asteriskh263] decrease the rank as we havn't this kind of decoder.
-
-Decrease the rank as we havn't this kind of decoder.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=739935
-
-Upstream-Status: Pending
-
-Signed-off-by: Song Bing <b06498@freescale.com>
-
-diff --git a/gst/rtp/gstasteriskh263.c b/gst/rtp/gstasteriskh263.c
-index a01fbc8..8fa3194 100644
---- a/gst/rtp/gstasteriskh263.c
-+++ b/gst/rtp/gstasteriskh263.c
-@@ -226,5 +226,5 @@ gboolean
- gst_asteriskh263_plugin_init (GstPlugin * plugin)
- {
-   return gst_element_register (plugin, "asteriskh263",
--      GST_RANK_SECONDARY, GST_TYPE_ASTERISK_H263);
-+      GST_RANK_SECONDARY - 1, GST_TYPE_ASTERISK_H263);
- }
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch
new file mode 100644
index 0000000..bc7ac0b
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch
@@ -0,0 +1,40 @@
+From 2169f2205c0205a220d826d7573e5a863bd36e0a Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 9 Feb 2016 14:00:00 -0800
+Subject: [PATCH] ensure valid sentinal for gst_structure_get()
+
+gst_structure_get() is declared with G_GNUC_NULL_TERMINATED, ie
+__attribute__((__sentinel__)), which means gcc will generate a
+warning if the last parameter passed to the function is not NULL
+(where a valid NULL in this context is defined as zero with any
+pointer type).
+
+The C code callers to gst_structure_get() within gst-plugins-good
+use the C NULL definition (ie ((void*)0)), which is a valid sentinel.
+
+However gstid3v2mux.cc uses the C++ NULL definition (ie 0L), which
+is not a valid sentinel without an explicit cast to a pointer type.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ ext/taglib/gstid3v2mux.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ext/taglib/gstid3v2mux.cc b/ext/taglib/gstid3v2mux.cc
+index 8651e77..a87234f 100644
+--- a/ext/taglib/gstid3v2mux.cc
++++ b/ext/taglib/gstid3v2mux.cc
+@@ -465,7 +465,7 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list,
+ 
+           if (info_struct) {
+             if (gst_structure_get (info_struct, "image-type",
+-                    GST_TYPE_TAG_IMAGE_TYPE, &image_type, NULL)) {
++                    GST_TYPE_TAG_IMAGE_TYPE, &image_type, (void *) NULL)) {
+               if (image_type > 0 && image_type <= 18) {
+                 image_type += 2;
+               } else {
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb
deleted file mode 100644
index 943ab60..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.4.5.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-include gstreamer1.0-plugins-good.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
-                    file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
-                    file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
-
-SRC_URI += "file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
-            file://decrease_asteriskh263_rank.patch \
-"
-SRC_URI[md5sum] = "eaf1a6daf73749bc423feac301d60038"
-SRC_URI[sha256sum] = "79b1b5f3f7bcaa8a615202eb5e176121eeb8336960f70687e536ad78dbc7e641"
-
-S = "${WORKDIR}/gst-plugins-good-${PV}"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb
new file mode 100644
index 0000000..0b4f436
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.6.3.bb
@@ -0,0 +1,15 @@
+include gstreamer1.0-plugins-good.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+                    file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
+                    file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \
+    file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \
+"
+
+SRC_URI[md5sum] = "a1958df7aa498b42793e2f2048673815"
+SRC_URI[sha256sum] = "24b19db70b2a83461ebddfe20033db432dadfdb5d4b54ffb1dfa0d830134a177"
+
+S = "${WORKDIR}/gst-plugins-good-${PV}"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
index 2c0e0ef..9cadc9a 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_git.bb
@@ -6,13 +6,23 @@
                     file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \
                     file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe"
 
+SRC_URI = " \
+    git://anongit.freedesktop.org/gstreamer/gst-plugins-good;name=base \
+    git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+    file://avoid-including-sys-poll.h-directly.patch \
+    file://ensure-valid-sentinel-for-gst_structure_get.patch \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "1b6fdce67c15d59957e395b1957aa625322092d4"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_FORMAT = "base"
+
 S = "${WORKDIR}/git"
 
-SRCREV = "fd0123800c8c1cf1468c0fa5d592ad0d0d8b4140"
-
 do_configure_prepend() {
-	cd ${S}
-	./autogen.sh --noconfigure
-	cd ${B}
+	${S}/autogen.sh --noconfigure
 }
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
index 63ba316..aff2230 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly.inc
@@ -7,12 +7,14 @@
 
 inherit gettext
 
-
 PACKAGECONFIG ??= " \
-    orc a52dec lame mad mpeg2dec \
-    "
+    ${GSTREAMER_ORC} \
+    a52dec lame mad mpeg2dec \
+"
 
 PACKAGECONFIG[a52dec]   = "--enable-a52dec,--disable-a52dec,liba52"
+PACKAGECONFIG[amrnb]    = "--enable-amrnb,--disable-amrnb,opencore-amr"
+PACKAGECONFIG[amrwb]    = "--enable-amrwb,--disable-amrwb,opencore-amr"
 PACKAGECONFIG[cdio]     = "--enable-cdio,--disable-cdio,libcdio"
 PACKAGECONFIG[dvdread]  = "--enable-dvdread,--disable-dvdread,libdvdread"
 PACKAGECONFIG[lame]     = "--enable-lame,--disable-lame,lame"
@@ -20,11 +22,10 @@
 PACKAGECONFIG[mpeg2dec] = "--enable-mpeg2dec,--disable-mpeg2dec,mpeg2dec"
 PACKAGECONFIG[x264]     = "--enable-x264,--disable-x264,x264"
 
-
 EXTRA_OECONF += " \
-    --disable-amrnb \
-    --disable-amrwb \
     --disable-sidplay \
     --disable-twolame \
-    "
+"
 
+FILES_${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs"
+FILES_${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb
deleted file mode 100644
index 25cb28c..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.4.5.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-include gstreamer1.0-plugins-ugly.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
-                    file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068 "
-
-SRC_URI[md5sum] = "6954beed7bb9a93e426dee543ff46393"
-SRC_URI[sha256sum] = "5cd5e81cf618944f4dc935f1669b2125e8bb2fe9cc7dc8dc15b72237aca49067"
-
-S = "${WORKDIR}/gst-plugins-ugly-${PV}"
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb
new file mode 100644
index 0000000..7edfb81
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.6.3.bb
@@ -0,0 +1,13 @@
+include gstreamer1.0-plugins-ugly.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+                    file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \
+"
+
+SRC_URI[md5sum] = "dbd92afb3816cbfa90ab1f197144a2e2"
+SRC_URI[sha256sum] = "2fecf7b7c7882f8f62f1900048f4013f98c214fb3d3303d8d812245bb41fd064"
+
+S = "${WORKDIR}/gst-plugins-ugly-${PV}"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
index dcf5ffc..69afe4c 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_git.bb
@@ -3,15 +3,39 @@
 include gstreamer1.0-plugins-ugly.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
-                    file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068 "
+                    file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068"
+
+SRC_URI = " \
+    git://anongit.freedesktop.org/gstreamer/gst-plugins-ugly;name=base \
+    git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "8bdb68edbc605e21314b608e7a39bdbaab7302b8"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_FORMAT = "base"
 
 S = "${WORKDIR}/git"
 
-SRCREV = "06b8ac10cee85c5c304ca320997aa8f44295a66f"
+# The mpg123 plugin was added prior to the 1.7.2 release
+# https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1
+PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123"
 
 do_configure_prepend() {
-	cd ${S}
-	./autogen.sh --noconfigure
-	cd ${B}
+	${S}/autogen.sh --noconfigure
 }
 
+# In 1.7.2, the mpg123 plugin was moved from -bad to -ugly
+# https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=08d8aefcdaaf89ecb6dd53ec1e4f95cd42d01664
+# https://cgit.freedesktop.org/gstreamer/gst-plugins-ugly/commit/?id=43bd45ba991ef3247957ca37cdcb52f4b8c0acb1
+
+PACKAGESPLITFUNCS_append = " handle_mpg123_rename "
+
+python handle_mpg123_rename () {
+    d.setVar('RPROVIDES_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
+    d.setVar('RREPLACES_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
+    d.setVar('RCONFLICTS_gstreamer1.0-plugins-ugly-mpg123', 'gstreamer1.0-plugins-bad-mpg123')
+}
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
index f1783b7..2dcec50 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc
@@ -2,58 +2,39 @@
 HOMEPAGE = "http://gstreamer.freedesktop.org/"
 BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
 SECTION = "multimedia"
-DEPENDS = "gstreamer1.0"
 
-inherit autotools pkgconfig
+DEPENDS = "gstreamer1.0 glib-2.0-native"
 
-GSTREAMER_1_0_DEBUG ?= "--disable-debug"
-GSTREAMER_1_0_GIT_BRANCH ?= "master"
-EXTRA_OECONF = "--disable-valgrind ${GSTREAMER_1_0_DEBUG} --disable-examples "
+inherit autotools pkgconfig upstream-version-is-even gobject-introspection
 
 acpaths = "-I ${S}/common/m4 -I ${S}/m4"
 
 LIBV = "1.0"
 require gst-plugins-package.inc
 
+# Orc enables runtime JIT compilation of data processing routines from Orc
+# bytecode to SIMD instructions for various architectures (currently SSE, MMX,
+# MIPS, Altivec and NEON are supported).
+
+GSTREAMER_ORC ?= "orc"
+
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
 PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc orc-native"
+PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind"
 
 export ORCC = "${STAGING_DIR_NATIVE}${bindir}/orcc"
 
+EXTRA_OECONF = " \
+    --disable-examples \
+"
+
+SRC_URI_append = " file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch"
+
+delete_pkg_m4_file() {
+	# This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
+	rm "${S}/common/m4/pkg.m4" || true
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file"
+
 PACKAGES_DYNAMIC = "^${PN}-.*"
-
-# apply gstreamer hack after Makefile.in.in in source is replaced by our version from
-# ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in, but before configure is executed 
-# http://lists.linuxtogo.org/pipermail/openembedded-core/2012-November/032233.html
-oe_runconf_prepend() {
-	if [ -e ${S}/po/Makefile.in.in ]; then
-		sed -i -e "1a\\" -e 'GETTEXT_PACKAGE = @GETTEXT_PACKAGE@' ${S}/po/Makefile.in.in
-	fi
-}
-
-SRC_URI = "${@get_gst_srcuri(d)}"
-
-def get_gst_srcuri(d):
-    # check if expected prefix is present
-    prefix = "gstreamer1.0-"
-    bpn = d.getVar("BPN", True)
-    if not bpn.startswith(prefix):
-        bb.fatal('Invalid GStreamer 1.0 plugin package name "%s" : must start with "%s"' % (bpn, prefix))
-
-    # replaced prefix with "gst-", which is what is used for the tarball and repository filenames
-    gstpkg_basename = "gst-" + bpn[len(prefix):]
-    pv = d.getVar("PV", True)
-    branch = d.getVar("GSTREAMER_1_0_GIT_BRANCH", True)
-
-    if pv == "git":
-        s = "git://anongit.freedesktop.org/gstreamer/%s;branch=%s" % (gstpkg_basename, branch)
-    else:
-        s = "http://gstreamer.freedesktop.org/src/%s/%s-%s.tar.xz" % (gstpkg_basename, gstpkg_basename, pv)
-    return s
-
-delete_liblink_m4_file() {
-	# This m4 file contains nastiness which conflicts with libtool 2.2.2
-	rm "${S}/m4/lib-link.m4" || true
-}
-
-do_configure[prefuncs] += " delete_liblink_m4_file "
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
index 28a9420..ae6d364 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server.inc
@@ -1,14 +1,24 @@
 SUMMARY = "A library on top of GStreamer for building an RTSP server"
+HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
 SECTION = "multimedia"
 LICENSE = "LGPLv2"
-HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/"
+
 DEPENDS = "gstreamer1.0 libcgroup gstreamer1.0-plugins-base"
 
 PNREAL = "gst-rtsp-server"
 
-SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz"
+SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \
+           file://0001-Don-t-hardcode-libtool-name-when-using-introspection.patch \
+           file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch"
 
 S = "${WORKDIR}/${PNREAL}-${PV}"
 
-inherit autotools pkgconfig 
+inherit autotools pkgconfig upstream-version-is-even gobject-introspection
+
+delete_pkg_m4_file() {
+        # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
+        rm "${S}/common/m4/pkg.m4" || true
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file"
 
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch
new file mode 100644
index 0000000..89d6384
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch
@@ -0,0 +1,27 @@
+From 4a12569e5ae5be63cd92a9b178860026a99746b1 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 27 Oct 2015 16:55:45 +0200
+Subject: [PATCH] Don't hardcode libtool name when using introspection
+
+Upstream-Status: Pending [review on oe-core maillist]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ gst/rtsp-server/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gst/rtsp-server/Makefile.am b/gst/rtsp-server/Makefile.am
+index 4fcd366..c67f5ab 100644
+--- a/gst/rtsp-server/Makefile.am
++++ b/gst/rtsp-server/Makefile.am
+@@ -87,7 +87,7 @@ GstRtspServer-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtspserver-@
+ 		--include=Gst-@GST_API_VERSION@ \
+ 		--include=GstRtsp-@GST_API_VERSION@ \
+ 		--include=GstNet-@GST_API_VERSION@ \
+-		--libtool="$(top_builddir)/libtool" \
++		--libtool="$(LIBTOOL)" \
+ 		--pkg gstreamer-@GST_API_VERSION@ \
+ 		--pkg gstreamer-rtsp-@GST_API_VERSION@ \
+ 		--pkg gstreamer-net-@GST_API_VERSION@ \
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb
deleted file mode 100644
index bb9b42b..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.4.5.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-include gstreamer1.0-rtsp-server.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
-
-SRC_URI[md5sum] = "a9f9b8899ec7ab33663cda7627db40d3"
-SRC_URI[sha256sum] = "3089254bd31b7c1f1cf2c034a3b3551f92878f9e3cab65cef3a901a04c0f1d37"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb
new file mode 100644
index 0000000..5bdae6c
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.6.2.bb
@@ -0,0 +1,6 @@
+include gstreamer1.0-rtsp-server.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
+
+SRC_URI[md5sum] = "a1cafefb5fc14ac5d7e7d8cdbdfa9694"
+SRC_URI[sha256sum] = "0f51f9879556c0950203c766b09a1b62f1f25b17f9a7d516e01b13ecf93c8858"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
index be8aa8f..10b4668 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0.inc
@@ -5,25 +5,54 @@
 BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer"
 SECTION = "multimedia"
 LICENSE = "LGPLv2+"
-DEPENDS = "glib-2.0 libxml2 bison-native flex-native"
 
-inherit autotools pkgconfig gettext
+DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native"
 
-PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection
+
+# This way common/m4/introspection.m4 will come first
+# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file)
+acpaths = "-I ${S}/common/m4 -I ${S}/m4"
+
+SRC_URI_append = " \
+    file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \
+"
+
+PACKAGECONFIG ??= ""
+
 PACKAGECONFIG[check] = "--enable-check,--disable-check"
+PACKAGECONFIG[debug] = "--enable-debug,--disable-debug"
+PACKAGECONFIG[tests] = "--enable-tests,--disable-tests"
+PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
 
-EXTRA_OECONF = "--disable-docbook --disable-gtk-doc \
-                --disable-dependency-tracking \
-                --disable-examples --disable-tests \
-                --disable-valgrind \
-                "
-
-RRECOMMENDS_${PN}_qemux86    += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
-RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
+EXTRA_OECONF = " \
+    --disable-dependency-tracking \
+    --disable-docbook \
+    --disable-examples \
+    --disable-gtk-doc \
+"
 
 CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no"
 
-FILES_${PN} += " ${libdir}/gstreamer-1.0/*.so"
-FILES_${PN}-dev += " ${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a"
-FILES_${PN}-dbg += " ${libdir}/gstreamer-1.0/.debug/ ${libexecdir}/gstreamer-1.0/.debug/"
+# musl libc generates warnings if <sys/poll.h> is included directly
+CACHED_CONFIGUREVARS += "ac_cv_header_sys_poll_h=no"
 
+PACKAGES += "${PN}-bash-completion"
+
+FILES_${PN} += "${libdir}/gstreamer-1.0/*.so"
+FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include"
+FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*"
+
+RRECOMMENDS_${PN}_qemux86 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
+RRECOMMENDS_${PN}_qemux86-64 += "kernel-module-snd-ens1370 kernel-module-snd-rawmidi"
+
+delete_pkg_m4_file() {
+        # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection
+        rm "${S}/common/m4/pkg.m4" || true
+}
+
+do_configure[prefuncs] += " delete_pkg_m4_file"
+
+do_compile_prepend() {
+        export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs"
+}
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gstinfo-Shorten-__FILE__-on-all-platforms.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gstinfo-Shorten-__FILE__-on-all-platforms.patch
deleted file mode 100644
index 8213c4b..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gstinfo-Shorten-__FILE__-on-all-platforms.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 81fecd367b016e5ac4fb0c04b84da5c474f30da6 Mon Sep 17 00:00:00 2001
-From: Peter Urbanec <git.user@urbanec.net>
-Date: Fri, 27 Feb 2015 01:16:58 +1100
-Subject: [PATCH 1/1] gstinfo: Shorten __FILE__ on all platforms.
-
-This is useful not only for MSVC, but also with gcc/Linux when doing
-cross-compilation builds and out-of-tree builds.
-
-Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=745213]
-
-Signed-off-by: Peter Urbanec <git.user@urbanec.net>
----
- gst/gstinfo.c | 11 ++++-------
- 1 file changed, 4 insertions(+), 7 deletions(-)
-
-diff --git a/gst/gstinfo.c b/gst/gstinfo.c
-index b2a3005..8b61d09 100644
---- a/gst/gstinfo.c
-+++ b/gst/gstinfo.c
-@@ -444,7 +444,6 @@ gst_debug_log (GstDebugCategory * category, GstDebugLevel level,
-   va_end (var_args);
- }
- 
--#ifdef G_OS_WIN32
- /* based on g_basename(), which we can't use because it was deprecated */
- static inline const gchar *
- gst_path_basename (const gchar * file_name)
-@@ -467,7 +466,6 @@ gst_path_basename (const gchar * file_name)
- 
-   return file_name;
- }
--#endif
- 
- /**
-  * gst_debug_log_valist:
-@@ -497,12 +495,11 @@ gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level,
-   g_return_if_fail (function != NULL);
-   g_return_if_fail (format != NULL);
- 
--  /* The predefined macro __FILE__ is always the exact path given to the
--   * compiler with MSVC, which may or may not be the basename.  We work
--   * around it at runtime to improve the readability. */
--#ifdef G_OS_WIN32
-+  /* The predefined macro __FILE__ can be an absolute path in some build
-+   * environments, such as MSVC or out-of-tree cross-compiles. This may
-+   * be significantly longer than the filename.  We work around it at
-+   * runtime to improve the readability. */
-   file = gst_path_basename (file);
--#endif
- 
-   message.message = NULL;
-   message.format = format;
--- 
-2.3.0
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch
deleted file mode 100644
index 1505cbe..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 6914566ed6a89c96973a578aa5ecd01ee68cdcfd Mon Sep 17 00:00:00 2001
-From: Jian <Jian.Li@freescale.com>
-Date: Thu, 14 May 2015 15:49:43 +0800
-Subject: [PATCH] basesink: Fix QoS/lateness checking if subclass implements
- prepare/prepare_list vfuncs
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In basesink functions gst_base_sink_chain_unlocked(), below code is used to
-checking if buffer is late before doing prepare call to save some effort:
-    if (syncable && do_sync)
-      late =
-          gst_base_sink_is_too_late (basesink, obj, rstart, rstop,
-          GST_CLOCK_EARLY, 0, FALSE);
-
-    if (G_UNLIKELY (late))
-      goto dropped;
-
-But this code has problem, it should calculate jitter based on current media
-clock, rather than just passing 0. I found it will drop all the frames when
-rewind in slow speed, such as -2X.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=749258
-
-Upstream-Status: Backport [1.5.1]
----
- libs/gst/base/gstbasesink.c |   26 ++++++++++++++++++++++----
- 1 file changed, 22 insertions(+), 4 deletions(-)
-
-diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
-index a505695..5fb2d6a 100644
---- a/libs/gst/base/gstbasesink.c
-+++ b/libs/gst/base/gstbasesink.c
-@@ -3369,10 +3369,28 @@ gst_base_sink_chain_unlocked (GstBaseSink * basesink, GstPad * pad,
-     if (G_UNLIKELY (stepped))
-       goto dropped;
- 
--    if (syncable && do_sync)
--      late =
--          gst_base_sink_is_too_late (basesink, obj, rstart, rstop,
--          GST_CLOCK_EARLY, 0, FALSE);
-+    if (syncable && do_sync) {
-+      GstClock *clock;
-+
-+      GST_OBJECT_LOCK (basesink);
-+      clock = GST_ELEMENT_CLOCK (basesink);
-+      if (clock && GST_STATE (basesink) == GST_STATE_PLAYING) {
-+        GstClockTime base_time;
-+        GstClockTime stime;
-+        GstClockTime now;
-+
-+        base_time = GST_ELEMENT_CAST (basesink)->base_time;
-+        stime = base_time + gst_base_sink_adjust_time (basesink, rstart);
-+        now = gst_clock_get_time (clock);
-+        GST_OBJECT_UNLOCK (basesink);
-+
-+        late =
-+            gst_base_sink_is_too_late (basesink, obj, rstart, rstop,
-+            GST_CLOCK_EARLY, GST_CLOCK_DIFF (stime, now), FALSE);
-+      } else {
-+        GST_OBJECT_UNLOCK (basesink);
-+      }
-+    }
- 
-     if (G_UNLIKELY (late))
-       goto dropped;
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-basesink-Shouldn-t-drop-buffer-when-sync-false.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-basesink-Shouldn-t-drop-buffer-when-sync-false.patch
deleted file mode 100755
index d682ee6..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-basesink-Shouldn-t-drop-buffer-when-sync-false.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 73df2b5c0aea58015788f5a94a3ec65296a688d3 Mon Sep 17 00:00:00 2001
-From: Song Bing <b06498@freescale.com>
-Date: Thu, 2 Jul 2015 14:32:21 +0800
-Subject: [PATCH] basesink: Shouldn't drop buffer when sync=false
-
-Shouldn't drop buffer when sync=false
-
-Upstream-Status: Accepted
-
-https://bugzilla.gnome.org/show_bug.cgi?id=751819
----
- libs/gst/base/gstbasesink.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libs/gst/base/gstbasesink.c b/libs/gst/base/gstbasesink.c
-index d44e8fc..cd759ac 100644
---- a/libs/gst/base/gstbasesink.c
-+++ b/libs/gst/base/gstbasesink.c
-@@ -3423,7 +3423,7 @@ gst_base_sink_chain_unlocked (GstBaseSink * basesink, GstPad * pad,
-     if (G_UNLIKELY (stepped))
-       goto dropped;
- 
--    if (syncable && do_sync) {
-+    if (syncable && do_sync && gst_base_sink_get_sync (basesink)) {
-       GstClock *clock;
- 
-       GST_OBJECT_LOCK (basesink);
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch
deleted file mode 100755
index f50ce6f..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-From 83bed90c306ed3185d48febf6441177d638f7341 Mon Sep 17 00:00:00 2001
-From: Song Bing <b06498@freescale.com>
-Date: Wed, 24 Dec 2014 10:13:51 +0800
-Subject: [PATCH] inputselector: sticky events haven't send out when active
- track reach EOS
-
-EOS event hasn't been send to down-element. The resolution is block EOS event
-of inactive pad, send the event after the pad actived.
-
-https://bugzilla.gnome.org/show_bug.cgi?id=740949
-
-Upstream-Status: Backport [1.5.1]
-
-Signed-off-by: Song Bing <b06498@freescale.com>
----
- plugins/elements/gstinputselector.c |   58 ++++++++++++++++++++++++++---------
- plugins/elements/gstinputselector.h |    1 +
- 2 files changed, 45 insertions(+), 14 deletions(-)
-
-diff --git a/plugins/elements/gstinputselector.c b/plugins/elements/gstinputselector.c
-index fb50802..4461f7c 100644
---- a/plugins/elements/gstinputselector.c
-+++ b/plugins/elements/gstinputselector.c
-@@ -440,6 +440,17 @@ gst_selector_pad_iterate_linked_pads (GstPad * pad, GstObject * parent)
- }
- 
- static gboolean
-+gst_input_selector_eos_wait (GstInputSelector * self, GstSelectorPad * pad)
-+{
-+  while (!self->eos && !self->flushing && !pad->flushing) {
-+    /* we can be unlocked here when we are shutting down (flushing) or when we
-+     * get unblocked */
-+    GST_INPUT_SELECTOR_WAIT (self);
-+  }
-+  return self->flushing;
-+}
-+
-+static gboolean
- gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
- {
-   gboolean res = TRUE;
-@@ -486,6 +497,7 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
-     case GST_EVENT_FLUSH_START:
-       /* Unblock the pad if it's waiting */
-       selpad->flushing = TRUE;
-+      sel->eos = FALSE;
-       GST_INPUT_SELECTOR_BROADCAST (sel);
-       break;
-     case GST_EVENT_FLUSH_STOP:
-@@ -523,21 +535,12 @@ gst_selector_pad_event (GstPad * pad, GstObject * parent, GstEvent * event)
-     case GST_EVENT_EOS:
-       selpad->eos = TRUE;
- 
--      if (forward) {
--        selpad->eos_sent = TRUE;
--      } else {
--        GstSelectorPad *active_selpad;
--
--        /* If the active sinkpad is in EOS state but EOS
--         * was not sent downstream this means that the pad
--         * got EOS before it was set as active pad and that
--         * the previously active pad got EOS after it was
--         * active
--         */
--        active_selpad = GST_SELECTOR_PAD (active_sinkpad);
--        forward = (active_selpad->eos && !active_selpad->eos_sent);
--        active_selpad->eos_sent = TRUE;
-+      if (!forward) {
-+        /* blocked until active the sind pad or flush */
-+        gst_input_selector_eos_wait (sel, selpad);
-+        forward = TRUE;
-       }
-+      selpad->eos_sent = TRUE;
-       GST_DEBUG_OBJECT (pad, "received EOS");
-       break;
-     case GST_EVENT_GAP:{
-@@ -676,6 +679,12 @@ gst_input_selector_wait_running_time (GstInputSelector * sel,
-         gst_input_selector_activate_sinkpad (sel, GST_PAD_CAST (selpad));
-     active_selpad = GST_SELECTOR_PAD_CAST (active_sinkpad);
- 
-+    if (sel->eos) {
-+      GST_DEBUG_OBJECT (sel, "Not waiting because inputselector reach EOS.");
-+      GST_INPUT_SELECTOR_UNLOCK (sel);
-+      return FALSE;
-+    }
-+
-     if (seg->format != GST_FORMAT_TIME) {
-       GST_DEBUG_OBJECT (selpad,
-           "Not waiting because we don't have a TIME segment");
-@@ -971,6 +980,12 @@ gst_selector_pad_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
-       GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
- 
-   GST_INPUT_SELECTOR_LOCK (sel);
-+  if (sel->eos) {
-+    GST_DEBUG_OBJECT (pad, "inputselector eos.");
-+    GST_INPUT_SELECTOR_UNLOCK (sel);
-+    goto eos;
-+  }
-+
-   /* wait or check for flushing */
-   if (gst_input_selector_wait (sel, selpad)) {
-     GST_INPUT_SELECTOR_UNLOCK (sel);
-@@ -1151,6 +1166,13 @@ flushing:
-     res = GST_FLOW_FLUSHING;
-     goto done;
-   }
-+eos:
-+  {
-+    GST_DEBUG_OBJECT (pad, "We are eos, discard buffer %p", buf);
-+    gst_buffer_unref (buf);
-+    res = GST_FLOW_EOS;
-+    goto done;
-+  }
- }
- 
- static void gst_input_selector_dispose (GObject * object);
-@@ -1309,6 +1331,7 @@ gst_input_selector_init (GstInputSelector * sel)
-   g_mutex_init (&sel->lock);
-   g_cond_init (&sel->cond);
-   sel->blocked = FALSE;
-+  sel->eos = FALSE;
- 
-   /* lets give a change for downstream to do something on
-    * active-pad change before we start pushing new buffers */
-@@ -1377,6 +1400,11 @@ gst_input_selector_set_active_pad (GstInputSelector * self, GstPad * pad)
-   GST_DEBUG_OBJECT (self, "New active pad is %" GST_PTR_FORMAT,
-       self->active_sinkpad);
- 
-+  if (old != new && new->eos && !new->eos_sent) {
-+    self->eos = TRUE;
-+    GST_INPUT_SELECTOR_BROADCAST (self);
-+  }
-+
-   return TRUE;
- }
- 
-@@ -1771,6 +1799,7 @@ gst_input_selector_change_state (GstElement * element,
-   switch (transition) {
-     case GST_STATE_CHANGE_READY_TO_PAUSED:
-       GST_INPUT_SELECTOR_LOCK (self);
-+      self->eos = FALSE;
-       self->blocked = FALSE;
-       self->flushing = FALSE;
-       GST_INPUT_SELECTOR_UNLOCK (self);
-@@ -1779,6 +1808,7 @@ gst_input_selector_change_state (GstElement * element,
-       /* first unlock before we call the parent state change function, which
-        * tries to acquire the stream lock when going to ready. */
-       GST_INPUT_SELECTOR_LOCK (self);
-+      self->eos = TRUE;
-       self->blocked = FALSE;
-       self->flushing = TRUE;
-       GST_INPUT_SELECTOR_BROADCAST (self);
-diff --git a/plugins/elements/gstinputselector.h b/plugins/elements/gstinputselector.h
-index 96c680f..9bf924f 100644
---- a/plugins/elements/gstinputselector.h
-+++ b/plugins/elements/gstinputselector.h
-@@ -77,6 +77,7 @@ struct _GstInputSelector {
-   GMutex lock;
-   GCond cond;
-   gboolean blocked;
-+  gboolean eos;
-   gboolean flushing;
- };
- 
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
deleted file mode 100644
index 73a4a99..0000000
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.4.5.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-include gstreamer1.0.inc
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
-                    file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
-
-SRC_URI = " \
-    http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
-    file://0001-Fix-crash-with-gst-inspect.patch \
-    file://0001-gstinfo-Shorten-__FILE__-on-all-platforms.patch \
-    file://inputselector-sticky-events-haven-t-send-out-when-ac-1-4-1.patch \
-    file://0002-basesink-Fix-QoS-lateness-checking-if-subclass-imple.patch \
-    file://0003-basesink-Shouldn-t-drop-buffer-when-sync-false.patch \
-"
-SRC_URI[md5sum] = "88a9289c64a4950ebb4f544980234289"
-SRC_URI[sha256sum] = "40801aa7f979024526258a0e94707ba42b8ab6f7d2206e56adbc4433155cb0ae"
-
-S = "${WORKDIR}/gstreamer-${PV}"
-
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb
new file mode 100644
index 0000000..ba1b83b
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.6.3.bb
@@ -0,0 +1,14 @@
+include gstreamer1.0.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
+                    file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
+
+SRC_URI = " \
+    http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \
+    file://0001-Fix-crash-with-gst-inspect.patch \
+"
+
+SRC_URI[md5sum] = "b4cdeb2b9cb20dd6ac022a4f417eae0d"
+SRC_URI[sha256sum] = "22f9568d67b87cf700a111f381144bd37cb93790a77e4e331db01fe854a37f24"
+
+S = "${WORKDIR}/gstreamer-${PV}"
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
index cb00d31..7715bb2 100644
--- a/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
+++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_git.bb
@@ -5,14 +5,26 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \
                     file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d"
 
-SRC_URI = "git://anongit.freedesktop.org/gstreamer/gstreamer;branch=master"
+SRC_URI = " \
+    git://anongit.freedesktop.org/gstreamer/gstreamer;name=base \
+    git://anongit.freedesktop.org/gstreamer/common;destsuffix=git/common;name=common \
+"
+
+PV = "1.7.2+git${SRCPV}"
+
+UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+)+))"
+
+SRCREV_base = "9e33bfa2c7a5f43da2c49b0a8235fd43cba9feaf"
+SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
+SRCREV_FORMAT = "base"
+
 S = "${WORKDIR}/git"
 
-SRCREV = "3b8181a8c550e74acaba4e8c55bdc649fa551dc9"
+# The option to configure tracer hooks was added prior to the 1.7.2 release
+# https://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=e5ca47236e4df4683707f0bcf99181a937d358d5
+PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks,"
+PACKAGECONFIG[trace-historic] = "--enable-trace,--disable-trace,"
 
 do_configure_prepend() {
-	cd ${S}
-	./autogen.sh --noconfigure
-	cd ${B}
+	${S}/autogen.sh --noconfigure
 }
-
diff --git a/yocto-poky/meta/recipes-multimedia/liba52/liba52_0.7.4.bb b/yocto-poky/meta/recipes-multimedia/liba52/liba52_0.7.4.bb
index 94b66b1..8ff8889 100644
--- a/yocto-poky/meta/recipes-multimedia/liba52/liba52_0.7.4.bb
+++ b/yocto-poky/meta/recipes-multimedia/liba52/liba52_0.7.4.bb
@@ -13,6 +13,9 @@
 
 SRC_URI[md5sum] = "caa9f5bc44232dc8aeea773fea56be80"
 SRC_URI[sha256sum] = "a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33"
+
+UPSTREAM_CHECK_URI = "http://liba52.sourceforge.net/downloads.html"
+
 S = "${WORKDIR}/a52dec-${PV}"
 
 EXTRA_OECONF = " --enable-shared "
diff --git a/yocto-poky/meta/recipes-multimedia/libav/libav.inc b/yocto-poky/meta/recipes-multimedia/libav/libav.inc
deleted file mode 100644
index d3f4b1b..0000000
--- a/yocto-poky/meta/recipes-multimedia/libav/libav.inc
+++ /dev/null
@@ -1,146 +0,0 @@
-SUMMARY = "Open source audio and video processing tools and librairies"
-DESCRIPTION = "Libav is a friendly and community-driven effort to provide its users \
-               with a set of portable, functional and high-performance libraries for \
-               dealing with multimedia formats of all sorts. It originates from the \
-               FFmpeg codebase, but goes its own way these days, providing its users \
-               with reliable releases and a clear vision how to go forward."
-HOMEPAGE = "http://libav.org/"
-SECTION = "libs"
-
-LICENSE = "GPLv2+"
-LICENSE_FLAGS = "commercial"
-
-LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \
-                    file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
-
-SRC_URI = "http://libav.org/releases/${BP}.tar.xz"
-
-# Provides ffmpeg compat, see http://libav.org/about.html
-PROVIDES = "ffmpeg"
-
-ARM_INSTRUCTION_SET = "arm"
-
-DEPENDS = "alsa-lib zlib libogg yasm-native"
-
-inherit autotools pkgconfig
-
-B = "${S}/build.${HOST_SYS}.${TARGET_SYS}"
-
-FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
-BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
-
-EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
-EXTRA_FFCONF ?= ""
-
-PACKAGECONFIG ??= "bzip2 x264 theora ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
-PACKAGECONFIG[bzip2] = "--enable-bzlib,--disable-bzlib,bzip2"
-PACKAGECONFIG[faac] = "--enable-libfaac,--disable-libfaac,faac"
-PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm"
-PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack"
-PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis"
-PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame"
-PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
-PACKAGECONFIG[schroedinger] = "--enable-libschroedinger,--disable-libschroedinger,schroedinger"
-PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex"
-PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora"
-PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
-PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx"
-PACKAGECONFIG[x11] = "--enable-x11grab,--disable-x11grab,virtual/libx11 libxfixes libxext xproto virtual/libsdl"
-PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264"
-
-# Check codecs that require --enable-nonfree
-USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'faac', 'openssl' ], 'yes', '', d)}"
-
-EXTRA_OECONF = " \
-    --enable-shared \
-    --enable-pthreads \
-    --enable-gpl \
-    ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \
-    --enable-avfilter \
-    \
-    --cross-prefix=${TARGET_PREFIX} \
-    --prefix=${prefix} \
-    \
-    --enable-avserver \
-    --enable-avplay \
-    --ld="${CCLD}" \
-    --arch=${TARGET_ARCH} \
-    --target-os="linux" \
-    --enable-cross-compile \
-    --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
-    --extra-ldflags="${TARGET_LDFLAGS}" \
-    --sysroot="${STAGING_DIR_TARGET}" \
-    --enable-hardcoded-tables \
-    ${EXTRA_FFCONF} \
-    --libdir=${libdir} \
-    --shlibdir=${libdir} \
-"
-
-do_configure() {
-    # We don't have TARGET_PREFIX-pkgconfig
-    sed -i '/pkg_config_default="${cross_prefix}${pkg_config_default}"/d' ${S}/configure
-    mkdir -p ${B}
-    cd ${B}
-    ${S}/configure ${EXTRA_OECONF}
-    sed -i -e s:Os:O4:g ${B}/config.h
-}
-
-do_install_append() {
-    install -m 0644 ${S}/libavfilter/*.h ${D}${includedir}/libavfilter/
-}
-
-PACKAGES += "${PN}-vhook-dbg ${PN}-vhook ffmpeg-x264-presets"
-PACKAGES_DYNAMIC += "^lib(av(codec|device|filter|format|util)|swscale).*"
-
-RSUGGESTS_${PN} = "mplayer"
-FILES_${PN} = "${bindir}"
-FILES_${PN}-dev = "${includedir}/${PN}"
-
-FILES_${PN}-vhook = "${libdir}/vhook"
-FILES_${PN}-vhook-dbg += "${libdir}/vhook/.debug"
-
-FILES_ffmpeg-x264-presets = "${datadir}/*.avpreset"
-
-LEAD_SONAME = "libavcodec.so"
-
-FILES_${PN}-dev = "${includedir}"
-
-python populate_packages_prepend() {
-    av_libdir = d.expand('${libdir}')
-    av_pkgconfig = d.expand('${libdir}/pkgconfig')
-
-    # Runtime package
-    do_split_packages(d, av_libdir, '^lib(.*)\.so\..*',
-                      output_pattern='lib%s',
-                      description='libav %s library',
-                      extra_depends='',
-                      prepend=True,
-                      allow_links=True)
-
-    # Development packages (-dev, -staticdev)
-    do_split_packages(d, av_libdir, '^lib(.*)\.so$',
-                      output_pattern='lib%s-dev',
-                      description='libav %s development package',
-                      extra_depends='${PN}-dev',
-                      prepend=True,
-                      allow_links=True)
-    do_split_packages(d, av_pkgconfig, '^lib(.*)\.pc$',
-                      output_pattern='lib%s-dev',
-                      description='libav %s development package',
-                      extra_depends='${PN}-dev',
-                      prepend=True)
-    do_split_packages(d, av_libdir, '^lib(.*)\.a$',
-                      output_pattern='lib%s-staticdev',
-                      description='libav %s development package - static library',
-                      extra_depends='${PN}-dev',
-                      prepend=True,
-                      allow_links=True)
-
-    if d.getVar('TARGET_ARCH', True) in [ 'i586', 'i686' ]:
-        # libav can't be build with -fPIC for 32-bit x86
-        pkgs = d.getVar('PACKAGES', True).split()
-        for pkg in pkgs:
-            d.appendVar('INSANE_SKIP_%s' % pkg, ' textrel')
-}
diff --git a/yocto-poky/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch b/yocto-poky/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch
deleted file mode 100644
index 1e31caa..0000000
--- a/yocto-poky/meta/recipes-multimedia/libav/libav/libav-fix-CVE-2014-9676.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-Upstream-Status: Backport
-
-Backport patch to fix CVE-2014-9676.
-
-https://security-tracker.debian.org/tracker/CVE-2014-9676
-https://git.libav.org/?p=libav.git;a=commit;h=b3f04657368a32a9903406395f865e230b1de348
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-From b3f04657368a32a9903406395f865e230b1de348 Mon Sep 17 00:00:00 2001
-From: Luca Barbato <lu_zero@gentoo.org>
-Date: Mon, 5 Jan 2015 10:40:41 +0100
-Subject: [PATCH] segment: Fix the failure paths
-
-A failure in segment_end() or segment_start() would lead to freeing
-a dangling pointer and in general further calls to seg_write_packet()
-or to seg_write_trailer() would have the same faulty behaviour.
-
-CC: libav-stable@libav.org
-Reported-By: luodalongde@gmail.com
----
- libavformat/segment.c | 32 ++++++++++++++++++++------------
- 1 file changed, 20 insertions(+), 12 deletions(-)
-
-diff --git a/libavformat/segment.c b/libavformat/segment.c
-index 52da6b9..bcfd1f9 100644
---- a/libavformat/segment.c
-+++ b/libavformat/segment.c
-@@ -184,6 +184,13 @@ static void close_null_ctx(AVIOContext *pb)
-     av_free(pb);
- }
- 
-+static void seg_free_context(SegmentContext *seg)
-+{
-+    avio_closep(&seg->pb);
-+    avformat_free_context(seg->avf);
-+    seg->avf = NULL;
-+}
-+
- static int seg_write_header(AVFormatContext *s)
- {
-     SegmentContext *seg = s->priv_data;
-@@ -265,12 +272,9 @@ static int seg_write_header(AVFormatContext *s)
-     }
- 
- fail:
--    if (ret) {
--        if (seg->list)
--            avio_close(seg->pb);
--        if (seg->avf)
--            avformat_free_context(seg->avf);
--    }
-+    if (ret < 0)
-+        seg_free_context(seg);
-+
-     return ret;
- }
- 
-@@ -282,6 +286,9 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
-     int64_t end_pts = seg->recording_time * seg->number;
-     int ret, can_split = 1;
- 
-+    if (!oc)
-+        return AVERROR(EINVAL);
-+
-     if (seg->has_video) {
-         can_split = st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
-                     pkt->flags & AV_PKT_FLAG_KEY;
-@@ -322,11 +329,8 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
-     ret = ff_write_chained(oc, pkt->stream_index, pkt, s);
- 
- fail:
--    if (ret < 0) {
--        if (seg->list)
--            avio_close(seg->pb);
--        avformat_free_context(oc);
--    }
-+    if (ret < 0)
-+        seg_free_context(seg);
- 
-     return ret;
- }
-@@ -335,7 +339,11 @@ static int seg_write_trailer(struct AVFormatContext *s)
- {
-     SegmentContext *seg = s->priv_data;
-     AVFormatContext *oc = seg->avf;
--    int ret;
-+    int ret = 0;
-+
-+    if (!oc)
-+        goto fail;
-+
-     if (!seg->write_header_trailer) {
-         if ((ret = segment_end(oc, 0)) < 0)
-             goto fail;
--- 
-2.4.1.314.g9532ead
-
diff --git a/yocto-poky/meta/recipes-multimedia/libav/libav_9.18.bb b/yocto-poky/meta/recipes-multimedia/libav/libav_9.18.bb
deleted file mode 100644
index 210a649..0000000
--- a/yocto-poky/meta/recipes-multimedia/libav/libav_9.18.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require libav.inc
-
-SRC_URI[md5sum] = "75e838068a75fb88e1b4ea0546bc16f0"
-SRC_URI[sha256sum] = "0875e835da683eef1a7bac75e1884634194149d7479d1538ba9fbe1614d066d7"
-
-SRC_URI += "file://libav-fix-CVE-2014-9676.patch"
diff --git a/yocto-poky/meta/recipes-multimedia/libav/libpostproc_git.bb b/yocto-poky/meta/recipes-multimedia/libav/libpostproc_git.bb
deleted file mode 100644
index 4aaa50f..0000000
--- a/yocto-poky/meta/recipes-multimedia/libav/libpostproc_git.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "FFmpeg derived postprocessing library"
-HOMEPAGE = "http://git.videolan.org/?p=libpostproc.git;a=summary"
-SECTION = "libs"
-DEPENDS = "libav"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-
-# because it depends on libav which has commercial flag
-LICENSE_FLAGS = "commercial"
-
-PV = "52.3.0+git${SRCPV}"
-
-SRCREV = "811db3b957dfde24aef2d0f82e297e5bf552d873"
-SRC_URI = "git://github.com/lu-zero/postproc;protocol=https"
-
-S = "${WORKDIR}/git"
-
-inherit autotools lib_package pkgconfig
-
-FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
-BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
-
-EXTRA_FFCONF_armv7a = "--cpu=cortex-a8"
-EXTRA_FFCONF ?= ""
-
-EXTRA_OECONF = " \
-    --enable-shared \
-    --enable-pthreads \
-    --enable-gpl \
-    --enable-postproc \
-    \
-    --cross-prefix=${TARGET_PREFIX} \
-    --prefix=${prefix} \
-    \
-    --arch=${TARGET_ARCH} \
-    --target-os="linux" \
-    --enable-cross-compile \
-    --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \
-    --extra-ldflags="${TARGET_LDFLAGS}" \
-    --sysroot="${STAGING_DIR_TARGET}" \
-    --shlibdir="${libdir}" \
-    ${EXTRA_FFCONF} \
-"
-
-do_configure() {
-    ${S}/configure ${EXTRA_OECONF}
-}
diff --git a/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb b/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
index 9e08b16..d431abd 100644
--- a/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
+++ b/yocto-poky/meta/recipes-multimedia/libmad/libmad_0.15.1b.bb
@@ -26,8 +26,6 @@
 inherit autotools pkgconfig
 
 EXTRA_OECONF = "-enable-speed --enable-shared"
-# The ASO's don't take any account of thumb...
-EXTRA_OECONF_append_thumb = " --disable-aso --enable-fpm=default"
 EXTRA_OECONF_append_arm = " --enable-fpm=arm"
 
 do_configure_prepend () {
diff --git a/yocto-poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb b/yocto-poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
index 40d6df8..d83eb45 100644
--- a/yocto-poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
+++ b/yocto-poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb
@@ -35,5 +35,3 @@
 FILES_${PN}-dev += "${libdir}/bellagio/*.la \
                     ${libdir}/omxloaders/*.la \
                     ${libdir}/omxloaders/*${SOLIBSDEV}"
-FILES_${PN}-dbg += "${libdir}/bellagio/.debug/ \
-                    ${libdir}/omxloaders/.debug/"
diff --git a/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_1.patch b/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_1.patch
deleted file mode 100644
index 25fe136..0000000
--- a/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_1.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 81f44665cce4cb1373f049a76f3904e981b7a766 Mon Sep 17 00:00:00 2001
-From: Glenn Randers-Pehrson <glennrp at users.sourceforge.net>
-Date: Thu, 29 Oct 2015 09:26:41 -0500
-Subject: [PATCH] [libpng16] Reject attempt to write over-length PLTE chunk
-
-Upstream-Status: Backport
-https://github.com/glennrp/libpng/commit/81f44665cce4cb1373f049a76f3904e981b7a766
-
-CVE: CVE-2015-8126 patch #1
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- libpng-manual.txt | 5 +++++
- libpng.3          | 5 +++++
- pngwrite.c        | 4 ++--
- pngwutil.c        | 7 +++++--
- 4 files changed, 17 insertions(+), 4 deletions(-)
-
-Index: libpng-1.6.17/libpng-manual.txt
-===================================================================
---- libpng-1.6.17.orig/libpng-manual.txt
-+++ libpng-1.6.17/libpng-manual.txt
-@@ -5109,6 +5109,11 @@ length, which resulted in PNG files that
- chunk.  This error was fixed in libpng-1.6.3, and a tool (called
- contrib/tools/png-fix-itxt) has been added to the libpng distribution.
- 
-+Starting with libpng-1.6.19, attempting to write an over-length PLTE chunk
-+is an error. Previously this requirement of the PNG specification was not
-+enforced. Libpng continues to accept over-length PLTE chunks when reading,
-+but does not make any use of the extra entries.
-+
- XIII.  Detecting libpng
- 
- The png_get_io_ptr() function has been present since libpng-0.88, has never
-Index: libpng-1.6.17/libpng.3
-===================================================================
---- libpng-1.6.17.orig/libpng.3
-+++ libpng-1.6.17/libpng.3
-@@ -5613,6 +5613,11 @@ length, which resulted in PNG files that
- chunk.  This error was fixed in libpng-1.6.3, and a tool (called
- contrib/tools/png-fix-itxt) has been added to the libpng distribution.
- 
-+Starting with libpng-1.6.19, attempting to write an over-length PLTE chunk
-+is an error. Previously this requirement of the PNG specification was not
-+enforced. Libpng continues to accept over-length PLTE chunks when reading,
-+but does not make any use of the extra entries.
-+
- .SH XIII.  Detecting libpng
- 
- The png_get_io_ptr() function has been present since libpng-0.88, has never
-Index: libpng-1.6.17/pngwrite.c
-===================================================================
---- libpng-1.6.17.orig/pngwrite.c
-+++ libpng-1.6.17/pngwrite.c
-@@ -205,7 +205,7 @@ png_write_info(png_structrp png_ptr, png
-       png_write_PLTE(png_ptr, info_ptr->palette,
-           (png_uint_32)info_ptr->num_palette);
- 
--   else if ((info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) !=0)
-+   else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-       png_error(png_ptr, "Valid palette required for paletted images");
- 
- #ifdef PNG_WRITE_tRNS_SUPPORTED
-Index: libpng-1.6.17/pngwutil.c
-===================================================================
---- libpng-1.6.17.orig/pngwutil.c
-+++ libpng-1.6.17/pngwutil.c
-@@ -922,17 +922,20 @@ void /* PRIVATE */
- png_write_PLTE(png_structrp png_ptr, png_const_colorp palette,
-     png_uint_32 num_pal)
- {
--   png_uint_32 i;
-+   png_uint_32 max_num_pal, i;
-    png_const_colorp pal_ptr;
-    png_byte buf[3];
- 
-    png_debug(1, "in png_write_PLTE");
- 
-+   max_num_pal = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
-+      (1 << png_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH;
-+
-    if ((
- #ifdef PNG_MNG_FEATURES_SUPPORTED
-        (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0 &&
- #endif
--       num_pal == 0) || num_pal > 256)
-+       num_pal == 0) || num_pal > max_num_pal)
-    {
-       if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-       {
diff --git a/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_2.patch b/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_2.patch
deleted file mode 100644
index 4aa9170..0000000
--- a/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_2.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From a901eb3ce6087e0afeef988247f1a1aa208cb54d Mon Sep 17 00:00:00 2001
-From: Glenn Randers-Pehrson <glennrp at users.sourceforge.net>
-Date: Fri, 30 Oct 2015 07:57:49 -0500
-Subject: [PATCH] [libpng16] Prevent reading over-length PLTE chunk (Cosmin
- Truta).
-
-Upstream-Status: Backport
-https://github.com/glennrp/libpng/commit/a901eb3ce6087e0afeef988247f1a1aa208cb54d
-
-Many changes involved date and version updates with don't apply in this case.
-
-CVE: CVE-2015-8126 patch #2
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ANNOUNCE          |  6 +++---
- CHANGES           |  4 ++--
- libpng-manual.txt | 11 +++++------
- libpng.3          | 19 +++++++++----------
- pngrutil.c        |  3 +++
- pngset.c          | 13 +++++++++----
- pngwutil.c        |  6 +++---
- 7 files changed, 34 insertions(+), 28 deletions(-)
-
-Index: libpng-1.6.17/libpng-manual.txt
-===================================================================
---- libpng-1.6.17.orig/libpng-manual.txt
-+++ libpng-1.6.17/libpng-manual.txt
-@@ -5109,10 +5109,9 @@ length, which resulted in PNG files that
- chunk.  This error was fixed in libpng-1.6.3, and a tool (called
- contrib/tools/png-fix-itxt) has been added to the libpng distribution.
- 
--Starting with libpng-1.6.19, attempting to write an over-length PLTE chunk
-+Starting with libpng-1.6.19, attempting to set an over-length PLTE chunk
- is an error. Previously this requirement of the PNG specification was not
--enforced. Libpng continues to accept over-length PLTE chunks when reading,
--but does not make any use of the extra entries.
-+enforced, and the palette was always limited to 256 entries.
- 
- XIII.  Detecting libpng
- 
-Index: libpng-1.6.17/libpng.3
-===================================================================
---- libpng-1.6.17.orig/libpng.3
-+++ libpng-1.6.17/libpng.3
-@@ -5613,10 +5613,9 @@ length, which resulted in PNG files that
- chunk.  This error was fixed in libpng-1.6.3, and a tool (called
- contrib/tools/png-fix-itxt) has been added to the libpng distribution.
- 
--Starting with libpng-1.6.19, attempting to write an over-length PLTE chunk
-+Starting with libpng-1.6.19, attempting to set an over-length PLTE chunk
- is an error. Previously this requirement of the PNG specification was not
--enforced. Libpng continues to accept over-length PLTE chunks when reading,
--but does not make any use of the extra entries.
-+enforced, and the palette was always limited to 256 entries.
- 
- .SH XIII.  Detecting libpng
- 
-Index: libpng-1.6.17/pngrutil.c
-===================================================================
---- libpng-1.6.17.orig/pngrutil.c
-+++ libpng-1.6.17/pngrutil.c
-@@ -997,6 +997,9 @@ png_handle_PLTE(png_structrp png_ptr, pn
-     * confusing.
-     *
-     * Fix this by not sharing the palette in this way.
-+    *
-+    * Starting with libpng-1.6.19, png_set_PLTE() also issues a png_error() when
-+    * it attempts to set a palette length that is too large for the bit depth.
-     */
-    png_set_PLTE(png_ptr, info_ptr, palette, num);
- 
-Index: libpng-1.6.17/pngset.c
-===================================================================
---- libpng-1.6.17.orig/pngset.c
-+++ libpng-1.6.17/pngset.c
-@@ -513,12 +513,17 @@ png_set_PLTE(png_structrp png_ptr, png_i
-     png_const_colorp palette, int num_palette)
- {
- 
-+   png_uint_32 max_palette_length;
-+
-    png_debug1(1, "in %s storage function", "PLTE");
- 
-    if (png_ptr == NULL || info_ptr == NULL)
-       return;
- 
--   if (num_palette < 0 || num_palette > PNG_MAX_PALETTE_LENGTH)
-+   max_palette_length = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
-+      (1 << png_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH;
-+
-+   if (num_palette < 0 || num_palette > max_palette_length)
-    {
-       if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-          png_error(png_ptr, "Invalid palette length");
-@@ -551,8 +556,8 @@ png_set_PLTE(png_structrp png_ptr, png_i
-    png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0);
- 
-    /* Changed in libpng-1.2.1 to allocate PNG_MAX_PALETTE_LENGTH instead
--    * of num_palette entries, in case of an invalid PNG file that has
--    * too-large sample values.
-+    * of num_palette entries, in case of an invalid PNG file or incorrect
-+    * call to png_set_PLTE() with too-large sample values.
-     */
-    png_ptr->palette = png_voidcast(png_colorp, png_calloc(png_ptr,
-        PNG_MAX_PALETTE_LENGTH * (sizeof (png_color))));
-Index: libpng-1.6.17/pngwutil.c
-===================================================================
---- libpng-1.6.17.orig/pngwutil.c
-+++ libpng-1.6.17/pngwutil.c
-@@ -922,20 +922,20 @@ void /* PRIVATE */
- png_write_PLTE(png_structrp png_ptr, png_const_colorp palette,
-     png_uint_32 num_pal)
- {
--   png_uint_32 max_num_pal, i;
-+   png_uint_32 max_palette_length, i;
-    png_const_colorp pal_ptr;
-    png_byte buf[3];
- 
-    png_debug(1, "in png_write_PLTE");
- 
--   max_num_pal = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
-+   max_palette_length = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
-       (1 << png_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH;
- 
-    if ((
- #ifdef PNG_MNG_FEATURES_SUPPORTED
-        (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0 &&
- #endif
--       num_pal == 0) || num_pal > max_num_pal)
-+       num_pal == 0) || num_pal > max_palette_length)
-    {
-       if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-       {
diff --git a/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_3.patch b/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_3.patch
deleted file mode 100644
index 0e0ad23..0000000
--- a/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_3.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 1bef8e97995c33123665582e57d3ed40b57d5978 Mon Sep 17 00:00:00 2001
-From: Glenn Randers-Pehrson <glennrp at users.sourceforge.net>
-Date: Fri, 30 Oct 2015 11:34:37 -0500
-Subject: [PATCH] [libpng16] Silently truncate over-length PLTE chunk while
- reading.
-
-Upstream-Status: Backport
-https://github.com/glennrp/libpng/commit/1bef8e97995c33123665582e57d3ed40b57d5978
-
-Normal Issues is date and version conflicts not applied.
-
-CVE: CVE-2015-8i26 patch #3
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-
----
- ANNOUNCE   |  3 ++-
- CHANGES    |  3 ++-
- pngrutil.c | 15 +++++++++++----
- pngset.c   |  2 +-
- 4 files changed, 16 insertions(+), 7 deletions(-)
-
-Index: libpng-1.6.17/pngrutil.c
-===================================================================
---- libpng-1.6.17.orig/pngrutil.c
-+++ libpng-1.6.17/pngrutil.c
-@@ -867,7 +867,7 @@ void /* PRIVATE */
- png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
- {
-    png_color palette[PNG_MAX_PALETTE_LENGTH];
--   int num, i;
-+   int max_palette_length, num, i;
- #ifdef PNG_POINTER_INDEXING_SUPPORTED
-    png_colorp pal_ptr;
- #endif
-@@ -925,9 +925,19 @@ png_handle_PLTE(png_structrp png_ptr, pn
-       return;
-    }
- 
-+   max_palette_length = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
-+      (1 << png_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH;
-+
-    /* The cast is safe because 'length' is less than 3*PNG_MAX_PALETTE_LENGTH */
-    num = (int)length / 3;
- 
-+   /* If the palette has 256 or fewer entries but is too large for the bit depth,
-+    * we don't issue an error, to preserve the behavior of previous libpng versions.
-+    * We silently truncate the unused extra palette entries here.
-+    */
-+   if (num > max_palette_length)
-+     num = max_palette_length;
-+
- #ifdef PNG_POINTER_INDEXING_SUPPORTED
-    for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++)
-    {
-@@ -997,9 +1007,6 @@ png_handle_PLTE(png_structrp png_ptr, pn
-     * confusing.
-     *
-     * Fix this by not sharing the palette in this way.
--    *
--    * Starting with libpng-1.6.19, png_set_PLTE() also issues a png_error() when
--    * it attempts to set a palette length that is too large for the bit depth.
-     */
-    png_set_PLTE(png_ptr, info_ptr, palette, num);
- 
-Index: libpng-1.6.17/pngset.c
-===================================================================
---- libpng-1.6.17.orig/pngset.c
-+++ libpng-1.6.17/pngset.c
-@@ -523,7 +523,7 @@ png_set_PLTE(png_structrp png_ptr, png_i
-    max_palette_length = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
-       (1 << png_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH;
- 
--   if (num_palette < 0 || num_palette > max_palette_length)
-+   if (num_palette < 0 || num_palette > (int) max_palette_length)
-    {
-       if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-          png_error(png_ptr, "Invalid palette length");
diff --git a/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_4.patch b/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_4.patch
deleted file mode 100644
index 2622630..0000000
--- a/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8126_4.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 83f4c735c88e7f451541c1528d8043c31ba3b466 Mon Sep 17 00:00:00 2001
-From: Glenn Randers-Pehrson <glennrp at users.sourceforge.net>
-Date: Thu, 5 Nov 2015 11:18:44 -0600
-Subject: [PATCH] [libpng16] Clean up coding style in png_handle_PLTE()
-
-Upstream-Status: Backport
-https://github.com/glennrp/libpng/commit/83f4c735c88e7f451541c1528d8043c31ba3b466
-
-CVE:  CVE-2015-8126 patch #4
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- pngrutil.c | 17 ++++++++++-------
- 1 file changed, 10 insertions(+), 7 deletions(-)
-
-Index: libpng-1.6.17/pngrutil.c
-===================================================================
---- libpng-1.6.17.orig/pngrutil.c
-+++ libpng-1.6.17/pngrutil.c
-@@ -925,18 +925,21 @@ png_handle_PLTE(png_structrp png_ptr, pn
-       return;
-    }
- 
--   max_palette_length = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ?
--      (1 << png_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH;
--
-    /* The cast is safe because 'length' is less than 3*PNG_MAX_PALETTE_LENGTH */
-    num = (int)length / 3;
- 
--   /* If the palette has 256 or fewer entries but is too large for the bit depth,
--    * we don't issue an error, to preserve the behavior of previous libpng versions.
--    * We silently truncate the unused extra palette entries here.
-+   /* If the palette has 256 or fewer entries but is too large for the bit
-+    * depth, we don't issue an error, to preserve the behavior of previous
-+    * libpng versions. We silently truncate the unused extra palette entries
-+    * here.
-     */
-+   if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
-+      max_palette_length = (1 << png_ptr->bit_depth);
-+   else
-+      max_palette_length = PNG_MAX_PALETTE_LENGTH;
-+
-    if (num > max_palette_length)
--     num = max_palette_length;
-+      num = max_palette_length;
- 
- #ifdef PNG_POINTER_INDEXING_SUPPORTED
-    for (i = 0, pal_ptr = palette; i < num; i++, pal_ptr++)
diff --git a/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8472.patch b/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8472.patch
deleted file mode 100644
index 404f012..0000000
--- a/yocto-poky/meta/recipes-multimedia/libpng/libpng-1.6.17/CVE-2015-8472.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 9f2ad4928e47036cf1ac9b8fe45a491f15be2324 Mon Sep 17 00:00:00 2001
-From: Glenn Randers-Pehrson <glennrp at users.sourceforge.net>
-Date: Wed, 4 Nov 2015 23:47:42 -0600
-Subject: [PATCH] [libpng16] Fixed new bug with CRC error after reading an
- over-length palette.
-
-Upstream-Status: Backport
-CVE: CVE-2015-8472 
-
-https://github.com/glennrp/libpng/commit/9f2ad4928e47036cf1ac9b8fe45a491f15be2324
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- pngrutil.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: libpng-1.6.17/pngrutil.c
-===================================================================
---- libpng-1.6.17.orig/pngrutil.c
-+++ libpng-1.6.17/pngrutil.c
-@@ -973,7 +973,7 @@ png_handle_PLTE(png_structrp png_ptr, pn
-    if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
- #endif
-    {
--      png_crc_finish(png_ptr, 0);
-+      png_crc_finish(png_ptr, (int) length - num * 3);
-    }
- 
- #ifndef PNG_READ_OPT_PLTE_SUPPORTED
diff --git a/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.17.bb b/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.17.bb
deleted file mode 100644
index cc288c7..0000000
--- a/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.17.bb
+++ /dev/null
@@ -1,35 +0,0 @@
-SUMMARY = "PNG image format decoding library"
-HOMEPAGE = "http://www.libpng.org/"
-SECTION = "libs"
-LICENSE = "Libpng"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=b9b75399b72e4a8656cf3a6ddfc86d9a \
-                    file://png.h;endline=16;md5=cc9c2d1eafda17e1277a6f99a9fc29c4 \
-                    file://png.h;beginline=242;endline=356;md5=599316819d525dde2bfdf28fe3f323af"
-DEPENDS = "zlib"
-LIBV = "16"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/libpng/libpng${LIBV}/older-releases/${PV}/libpng-${PV}.tar.xz \
-          "
-SRC_URI += "\
-            file://CVE-2015-8126_1.patch \
-            file://CVE-2015-8126_2.patch \
-            file://CVE-2015-8126_3.patch \
-            file://CVE-2015-8126_4.patch \
-            file://CVE-2015-8472.patch \
-            "
-
-SRC_URI[md5sum] = "430a9b76b78533235cd4b9b26ce75c7e"
-SRC_URI[sha256sum] = "98507b55fbe5cd43c51981f2924e4671fd81fe35d52dc53357e20f2c77fa5dfd"
-
-BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
-
-inherit autotools binconfig-disabled pkgconfig
-
-# Work around missing symbols
-EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
-
-PACKAGES =+ "${PN}-tools"
-
-FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb b/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb
new file mode 100644
index 0000000..58cef1f
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/libpng/libpng_1.6.21.bb
@@ -0,0 +1,25 @@
+SUMMARY = "PNG image format decoding library"
+HOMEPAGE = "http://www.libpng.org/"
+SECTION = "libs"
+LICENSE = "Libpng"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=06a1b6fde6d93170bb72201c8000bf3d \
+                    file://png.h;endline=112;md5=9a8b5f83e1e8046df672deab87f235be"
+DEPENDS = "zlib"
+
+SRC_URI = "${GENTOO_MIRROR}/libpng-${PV}.tar.xz \
+          "
+SRC_URI[md5sum] = "3bacb4728f6694a64ad9052769d6a4ce"
+SRC_URI[sha256sum] = "6c8f1849eb9264219bf5d703601e5abe92a58651ecae927a03d1a1aa15ee2083"
+
+BINCONFIG = "${bindir}/libpng-config ${bindir}/libpng16-config"
+
+inherit autotools binconfig-disabled pkgconfig
+
+# Work around missing symbols
+EXTRA_OECONF_append_class-target = " ${@bb.utils.contains("TUNE_FEATURES", "neon", "--enable-arm-neon=on", "--enable-arm-neon=off" ,d)}"
+
+PACKAGES =+ "${PN}-tools"
+
+FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb b/yocto-poky/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb
index f06935c..1c37681 100644
--- a/yocto-poky/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb
+++ b/yocto-poky/meta/recipes-multimedia/libsamplerate/libsamplerate0_0.1.8.bb
@@ -11,6 +11,9 @@
 
 SRC_URI[md5sum] = "1c7fb25191b4e6e3628d198a66a84f47"
 SRC_URI[sha256sum] = "93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06"
+
+UPSTREAM_CHECK_URI = "http://www.mega-nerd.com/SRC/download.html"
+
 S = "${WORKDIR}/libsamplerate-${PV}"
 
 inherit autotools pkgconfig
diff --git a/yocto-poky/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-segfault-in-SD2-RSRC-parser.patch b/yocto-poky/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-segfault-in-SD2-RSRC-parser.patch
deleted file mode 100644
index cd48710..0000000
--- a/yocto-poky/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-segfault-in-SD2-RSRC-parser.patch
+++ /dev/null
@@ -1,211 +0,0 @@
-From 9341e9c6e70cd3ad76c901c3cf052d4cb52fd827 Mon Sep 17 00:00:00 2001
-From: Erik de Castro Lopo <erikd@mega-nerd.com>
-Date: Thu, 27 Jun 2013 18:04:03 +1000
-Subject: [PATCH] src/sd2.c : Fix segfault in SD2 RSRC parser.
-
-(Upstream commit 9341e9c6e70cd3ad76c901c3cf052d4cb52fd827)
-
-A specially crafted resource fork for an SD2 file can cause
-the SD2 RSRC parser to read data from outside a dynamically
-defined buffer. The data that is read is converted into a
-short or int and used during further processing.
-
-Since no write occurs, this is unlikely to be exploitable.
-
-Bug reported by The Mayhem Team from Cylab, Carnegie Mellon
-Univeristy. Paper is:
-http://users.ece.cmu.edu/~arebert/papers/mayhem-oakland-12.pdf
-
-Upstream-Status: Backport
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- src/sd2.c |   93 ++++++++++++++++++++++++++++++++++++-------------------------
- 1 file changed, 55 insertions(+), 38 deletions(-)
-
-diff --git a/src/sd2.c b/src/sd2.c
-index 35ce36b..6be150c 100644
---- a/src/sd2.c
-+++ b/src/sd2.c
-@@ -1,5 +1,5 @@
- /*
--** Copyright (C) 2001-2011 Erik de Castro Lopo <erikd@mega-nerd.com>
-+** Copyright (C) 2001-2013 Erik de Castro Lopo <erikd@mega-nerd.com>
- ** Copyright (C) 2004 Paavo Jumppanen
- **
- ** This program is free software; you can redistribute it and/or modify
-@@ -371,44 +371,61 @@ sd2_write_rsrc_fork (SF_PRIVATE *psf, int UNUSED (calc_length))
- */
- 
- static inline int
--read_char (const unsigned char * data, int offset)
--{	return data [offset] ;
--} /* read_char */
-+read_rsrc_char (const SD2_RSRC *prsrc, int offset)
-+{	const unsigned char * data = prsrc->rsrc_data ;
-+	if (offset < 0 || offset >= prsrc->rsrc_len)
-+		return 0 ;
-+	return data [offset] ;
-+} /* read_rsrc_char */
- 
- static inline int
--read_short (const unsigned char * data, int offset)
--{	return (data [offset] << 8) + data [offset + 1] ;
--} /* read_short */
-+read_rsrc_short (const SD2_RSRC *prsrc, int offset)
-+{	const unsigned char * data = prsrc->rsrc_data ;
-+	if (offset < 0 || offset + 1 >= prsrc->rsrc_len)
-+		return 0 ;
-+	return (data [offset] << 8) + data [offset + 1] ;
-+} /* read_rsrc_short */
- 
- static inline int
--read_int (const unsigned char * data, int offset)
--{	return (data [offset] << 24) + (data [offset + 1] << 16) + (data [offset + 2] << 8) + data [offset + 3] ;
--} /* read_int */
-+read_rsrc_int (const SD2_RSRC *prsrc, int offset)
-+{	const unsigned char * data = prsrc->rsrc_data ;
-+	if (offset < 0 || offset + 3 >= prsrc->rsrc_len)
-+		return 0 ;
-+	return (data [offset] << 24) + (data [offset + 1] << 16) + (data [offset + 2] << 8) + data [offset + 3] ;
-+} /* read_rsrc_int */
- 
- static inline int
--read_marker (const unsigned char * data, int offset)
--{
-+read_rsrc_marker (const SD2_RSRC *prsrc, int offset)
-+{	const unsigned char * data = prsrc->rsrc_data ;
-+
-+	if (offset < 0 || offset + 3 >= prsrc->rsrc_len)
-+		return 0 ;
-+
- 	if (CPU_IS_BIG_ENDIAN)
- 		return (data [offset] << 24) + (data [offset + 1] << 16) + (data [offset + 2] << 8) + data [offset + 3] ;
--	else if (CPU_IS_LITTLE_ENDIAN)
-+	if (CPU_IS_LITTLE_ENDIAN)
- 		return data [offset] + (data [offset + 1] << 8) + (data [offset + 2] << 16) + (data [offset + 3] << 24) ;
--	else
--		return 0x666 ;
--} /* read_marker */
-+
-+	return 0 ;
-+} /* read_rsrc_marker */
- 
- static void
--read_str (const unsigned char * data, int offset, char * buffer, int buffer_len)
--{	int k ;
-+read_rsrc_str (const SD2_RSRC *prsrc, int offset, char * buffer, int buffer_len)
-+{	const unsigned char * data = prsrc->rsrc_data ;
-+	int k ;
- 
- 	memset (buffer, 0, buffer_len) ;
- 
-+	if (offset < 0 || offset + buffer_len >= prsrc->rsrc_len)
-+		return ;
-+
- 	for (k = 0 ; k < buffer_len - 1 ; k++)
- 	{	if (psf_isprint (data [offset + k]) == 0)
- 			return ;
- 		buffer [k] = data [offset + k] ;
- 		} ;
- 	return ;
--} /* read_str */
-+} /* read_rsrc_str */
- 
- static int
- sd2_parse_rsrc_fork (SF_PRIVATE *psf)
-@@ -435,17 +452,17 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf)
- 	/* Reset the header storage because we have changed to the rsrcdes. */
- 	psf->headindex = psf->headend = rsrc.rsrc_len ;
- 
--	rsrc.data_offset = read_int (rsrc.rsrc_data, 0) ;
--	rsrc.map_offset = read_int (rsrc.rsrc_data, 4) ;
--	rsrc.data_length = read_int (rsrc.rsrc_data, 8) ;
--	rsrc.map_length = read_int (rsrc.rsrc_data, 12) ;
-+	rsrc.data_offset = read_rsrc_int (&rsrc, 0) ;
-+	rsrc.map_offset = read_rsrc_int (&rsrc, 4) ;
-+	rsrc.data_length = read_rsrc_int (&rsrc, 8) ;
-+	rsrc.map_length = read_rsrc_int (&rsrc, 12) ;
- 
- 	if (rsrc.data_offset == 0x51607 && rsrc.map_offset == 0x20000)
- 	{	psf_log_printf (psf, "Trying offset of 0x52 bytes.\n") ;
--		rsrc.data_offset = read_int (rsrc.rsrc_data, 0x52 + 0) + 0x52 ;
--		rsrc.map_offset = read_int (rsrc.rsrc_data, 0x52 + 4) + 0x52 ;
--		rsrc.data_length = read_int (rsrc.rsrc_data, 0x52 + 8) ;
--		rsrc.map_length = read_int (rsrc.rsrc_data, 0x52 + 12) ;
-+		rsrc.data_offset = read_rsrc_int (&rsrc, 0x52 + 0) + 0x52 ;
-+		rsrc.map_offset = read_rsrc_int (&rsrc, 0x52 + 4) + 0x52 ;
-+		rsrc.data_length = read_rsrc_int (&rsrc, 0x52 + 8) ;
-+		rsrc.map_length = read_rsrc_int (&rsrc, 0x52 + 12) ;
- 		} ;
- 
- 	psf_log_printf (psf, "  data offset : 0x%04X\n  map  offset : 0x%04X\n"
-@@ -488,7 +505,7 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf)
- 		goto parse_rsrc_fork_cleanup ;
- 		} ;
- 
--	rsrc.string_offset = rsrc.map_offset + read_short (rsrc.rsrc_data, rsrc.map_offset + 26) ;
-+	rsrc.string_offset = rsrc.map_offset + read_rsrc_short (&rsrc, rsrc.map_offset + 26) ;
- 	if (rsrc.string_offset > rsrc.rsrc_len)
- 	{	psf_log_printf (psf, "Bad string offset (%d).\n", rsrc.string_offset) ;
- 		error = SFE_SD2_BAD_RSRC ;
-@@ -497,7 +514,7 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf)
- 
- 	rsrc.type_offset = rsrc.map_offset + 30 ;
- 
--	rsrc.type_count = read_short (rsrc.rsrc_data, rsrc.map_offset + 28) + 1 ;
-+	rsrc.type_count = read_rsrc_short (&rsrc, rsrc.map_offset + 28) + 1 ;
- 	if (rsrc.type_count < 1)
- 	{	psf_log_printf (psf, "Bad type count.\n") ;
- 		error = SFE_SD2_BAD_RSRC ;
-@@ -513,11 +530,11 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf)
- 
- 	rsrc.str_index = -1 ;
- 	for (k = 0 ; k < rsrc.type_count ; k ++)
--	{	marker = read_marker (rsrc.rsrc_data, rsrc.type_offset + k * 8) ;
-+	{	marker = read_rsrc_marker (&rsrc, rsrc.type_offset + k * 8) ;
- 
- 		if (marker == STR_MARKER)
- 		{	rsrc.str_index = k ;
--			rsrc.str_count = read_short (rsrc.rsrc_data, rsrc.type_offset + k * 8 + 4) + 1 ;
-+			rsrc.str_count = read_rsrc_short (&rsrc, rsrc.type_offset + k * 8 + 4) + 1 ;
- 			error = parse_str_rsrc (psf, &rsrc) ;
- 			goto parse_rsrc_fork_cleanup ;
- 			} ;
-@@ -549,26 +566,26 @@ parse_str_rsrc (SF_PRIVATE *psf, SD2_RSRC * rsrc)
- 	for (k = 0 ; data_offset + data_len < rsrc->rsrc_len ; k++)
- 	{	int slen ;
- 
--		slen = read_char (rsrc->rsrc_data, str_offset) ;
--		read_str (rsrc->rsrc_data, str_offset + 1, name, SF_MIN (SIGNED_SIZEOF (name), slen + 1)) ;
-+		slen = read_rsrc_char (rsrc, str_offset) ;
-+		read_rsrc_str (rsrc, str_offset + 1, name, SF_MIN (SIGNED_SIZEOF (name), slen + 1)) ;
- 		str_offset += slen + 1 ;
- 
--		rsrc_id = read_short (rsrc->rsrc_data, rsrc->item_offset + k * 12) ;
-+		rsrc_id = read_rsrc_short (rsrc, rsrc->item_offset + k * 12) ;
- 
--		data_offset = rsrc->data_offset + read_int (rsrc->rsrc_data, rsrc->item_offset + k * 12 + 4) ;
-+		data_offset = rsrc->data_offset + read_rsrc_int (rsrc, rsrc->item_offset + k * 12 + 4) ;
- 		if (data_offset < 0 || data_offset > rsrc->rsrc_len)
- 		{	psf_log_printf (psf, "Exiting parser on data offset of %d.\n", data_offset) ;
- 			break ;
- 			} ;
- 
--		data_len = read_int (rsrc->rsrc_data, data_offset) ;
-+		data_len = read_rsrc_int (rsrc, data_offset) ;
- 		if (data_len < 0 || data_len > rsrc->rsrc_len)
- 		{	psf_log_printf (psf, "Exiting parser on data length of %d.\n", data_len) ;
- 			break ;
- 			} ;
- 
--		slen = read_char (rsrc->rsrc_data, data_offset + 4) ;
--		read_str (rsrc->rsrc_data, data_offset + 5, value, SF_MIN (SIGNED_SIZEOF (value), slen + 1)) ;
-+		slen = read_rsrc_char (rsrc, data_offset + 4) ;
-+		read_rsrc_str (rsrc, data_offset + 5, value, SF_MIN (SIGNED_SIZEOF (value), slen + 1)) ;
- 
- 		psf_log_printf (psf, "  0x%04x     %4d     %4d     %3d    '%s'\n", data_offset, rsrc_id, data_len, slen, value) ;
- 
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-two-potential-buffer-read-overflows.patch b/yocto-poky/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-two-potential-buffer-read-overflows.patch
deleted file mode 100644
index fa6473d..0000000
--- a/yocto-poky/meta/recipes-multimedia/libsndfile/files/0001-src-sd2.c-Fix-two-potential-buffer-read-overflows.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From dbe14f00030af5d3577f4cabbf9861db59e9c378 Mon Sep 17 00:00:00 2001
-From: Erik de Castro Lopo <erikd@mega-nerd.com>
-Date: Thu, 25 Dec 2014 19:23:12 +1100
-Subject: [PATCH] src/sd2.c : Fix two potential buffer read overflows.
-
-(Upstream commit dbe14f00030af5d3577f4cabbf9861db59e9c378)
-
-Closes: https://github.com/erikd/libsndfile/issues/93
-
-Upstream-Status: Backport
-
-Signed-off-by: Yue Tao <yue.tao@windriver.com>
----
- src/sd2.c |   12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/src/sd2.c b/src/sd2.c
-index 0b4e5af..a70a1f1 100644
---- a/src/sd2.c
-+++ b/src/sd2.c
-@@ -517,6 +517,11 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf)
- 
- 	rsrc.type_offset = rsrc.map_offset + 30 ;
- 
-+	if (rsrc.map_offset + 28 > rsrc.rsrc_len)
-+	{	psf_log_printf (psf, "Bad map offset.\n") ;
-+		goto parse_rsrc_fork_cleanup ;
-+		} ;
-+
- 	rsrc.type_count = read_rsrc_short (&rsrc, rsrc.map_offset + 28) + 1 ;
- 	if (rsrc.type_count < 1)
- 	{	psf_log_printf (psf, "Bad type count.\n") ;
-@@ -533,7 +538,12 @@ sd2_parse_rsrc_fork (SF_PRIVATE *psf)
- 
- 	rsrc.str_index = -1 ;
- 	for (k = 0 ; k < rsrc.type_count ; k ++)
--	{	marker = read_rsrc_marker (&rsrc, rsrc.type_offset + k * 8) ;
-+	{	if (rsrc.type_offset + k * 8 > rsrc.rsrc_len)
-+		{	psf_log_printf (psf, "Bad rsrc marker.\n") ;
-+			goto parse_rsrc_fork_cleanup ;
-+			} ;
-+
-+		marker = read_rsrc_marker (&rsrc, rsrc.type_offset + k * 8) ;
- 
- 		if (marker == STR_MARKER)
- 		{	rsrc.str_index = k ;
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-multimedia/libsndfile/files/libsndfile-fix-CVE-2014-9756.patch b/yocto-poky/meta/recipes-multimedia/libsndfile/files/libsndfile-fix-CVE-2014-9756.patch
deleted file mode 100644
index b54b3ba..0000000
--- a/yocto-poky/meta/recipes-multimedia/libsndfile/files/libsndfile-fix-CVE-2014-9756.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-src/file_io.c : Prevent potential divide-by-zero.
-
-Closes: https://github.com/erikd/libsndfile/issues/92
-
-Upstream-Status: Backport
-
-Fixes CVE-2014-9756
-
-Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
-Signed-off-by: Maxin B. John <maxin.john@intel.com>
----
-diff -Naur libsndfile-1.0.25-orig/src/file_io.c libsndfile-1.0.25/src/file_io.c
---- libsndfile-1.0.25-orig/src/file_io.c	2011-01-19 12:12:28.000000000 +0200
-+++ libsndfile-1.0.25/src/file_io.c	2015-11-04 15:02:04.337395618 +0200
-@@ -358,6 +358,9 @@
- {	sf_count_t total = 0 ;
- 	ssize_t	count ;
- 
-+    if (bytes == 0 || items == 0)
-+        return 0 ;
-+
- 	if (psf->virtual_io)
- 		return psf->vio.write (ptr, bytes*items, psf->vio_user_data) / bytes ;
- 
diff --git a/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.25.bb b/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.25.bb
deleted file mode 100644
index be875c2..0000000
--- a/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.25.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Audio format Conversion library"
-HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
-AUTHOR = "Erik de Castro Lopo"
-DEPENDS = "sqlite3"
-SECTION = "libs/multimedia"
-LICENSE = "LGPLv2.1"
-PR = "r2"
-
-SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \
-           file://0001-src-sd2.c-Fix-segfault-in-SD2-RSRC-parser.patch \
-           file://0001-src-sd2.c-Fix-two-potential-buffer-read-overflows.patch \
-           file://libsndfile-fix-CVE-2014-9756.patch \
-"
-
-SRC_URI[md5sum] = "e2b7bb637e01022c7d20f95f9c3990a2"
-SRC_URI[sha256sum] = "59016dbd326abe7e2366ded5c344c853829bebfd1702ef26a07ef662d6aa4882"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
-
-S = "${WORKDIR}/libsndfile-${PV}"
-
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
-PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
-
-EXTRA_OECONF = "--disable-external-libs"
-
-inherit autotools lib_package pkgconfig
-
-do_configure_prepend_arm() {
-	export ac_cv_sys_largefile_source=1
-	export ac_cv_sys_file_offset_bits=64
-	ac_cv_sizeof_off_t=8
-}
-
diff --git a/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb b/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb
new file mode 100644
index 0000000..80435d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.26.bb
@@ -0,0 +1,26 @@
+SUMMARY = "Audio format Conversion library"
+HOMEPAGE = "http://www.mega-nerd.com/libsndfile"
+AUTHOR = "Erik de Castro Lopo"
+DEPENDS = "flac libogg libvorbis sqlite3"
+SECTION = "libs/multimedia"
+LICENSE = "LGPLv2.1"
+
+SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "ec810a0c60c08772a8a5552704b63393"
+SRC_URI[sha256sum] = "cd6520ec763d1a45573885ecb1f8e4e42505ac12180268482a44b28484a25092"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=e77fe93202736b47c07035910f47974a"
+
+S = "${WORKDIR}/libsndfile-${PV}"
+
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)}"
+PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib"
+
+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/yocto-poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb b/yocto-poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
index 18cb168..664d848 100644
--- a/yocto-poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
+++ b/yocto-poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb
@@ -15,6 +15,8 @@
 SRC_URI[md5sum] = "292ab65cedd5021d6b7ddd117e07cd8e"
 SRC_URI[sha256sum] = "b6ae1ee2fa3d42ac489287d3ec34c5885730b1296f0801ae577a35193d3affbc"
 
+UPSTREAM_CHECK_REGEX = "libtheora-(?P<pver>\d+(\.\d)+)\.(tar\.gz|tgz)"
+
 inherit autotools pkgconfig
 
 EXTRA_OECONF = "--disable-examples"
diff --git a/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch b/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch
deleted file mode 100644
index bdbe696..0000000
--- a/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8781.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-From aaab5c3c9d2a2c6984f23ccbc79702610439bc65 Mon Sep 17 00:00:00 2001
-From: erouault <erouault>
-Date: Sun, 27 Dec 2015 16:25:11 +0000
-Subject: [PATCH] * libtiff/tif_luv.c: fix potential out-of-bound writes in
- decode functions in non debug builds by replacing assert()s by regular if
- checks (bugzilla #2522). Fix potential out-of-bound reads in case of short
- input data.
-
-Upstream-Status: Backport
-
-https://github.com/vadz/libtiff/commit/aaab5c3c9d2a2c6984f23ccbc79702610439bc65
-hand applied Changelog changes
-
-CVE: CVE-2015-8781
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
----
- ChangeLog         |  7 +++++++
- libtiff/tif_luv.c | 55 ++++++++++++++++++++++++++++++++++++++++++++-----------
- 2 files changed, 51 insertions(+), 11 deletions(-)
-
-Index: tiff-4.0.4/ChangeLog
-===================================================================
---- tiff-4.0.4.orig/ChangeLog
-+++ tiff-4.0.4/ChangeLog
-@@ -1,3 +1,11 @@
-+2015-12-27  Even Rouault <even.rouault at spatialys.com>
-+
-+   * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
-+   functions in non debug builds by replacing assert()s by regular if
-+   checks (bugzilla #2522).
-+   Fix potential out-of-bound reads in case of short input data.
-+
-+
- 2015-06-21  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
- 
- 	* libtiff 4.0.4 released.
-Index: tiff-4.0.4/libtiff/tif_luv.c
-===================================================================
---- tiff-4.0.4.orig/libtiff/tif_luv.c
-+++ tiff-4.0.4/libtiff/tif_luv.c
-@@ -202,7 +202,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
- 	if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
- 		tp = (int16*) op;
- 	else {
--		assert(sp->tbuflen >= npixels);
-+		if(sp->tbuflen < npixels) {
-+			TIFFErrorExt(tif->tif_clientdata, module,
-+						 "Translation buffer too short");
-+			return (0);
-+		}
- 		tp = (int16*) sp->tbuf;
- 	}
- 	_TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
-@@ -211,9 +215,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
- 	cc = tif->tif_rawcc;
- 	/* get each byte string */
- 	for (shft = 2*8; (shft -= 8) >= 0; ) {
--		for (i = 0; i < npixels && cc > 0; )
-+		for (i = 0; i < npixels && cc > 0; ) {
- 			if (*bp >= 128) {		/* run */
--				rc = *bp++ + (2-128);   /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
-+				if( cc < 2 )
-+					break;
-+				rc = *bp++ + (2-128);
- 				b = (int16)(*bp++ << shft);
- 				cc -= 2;
- 				while (rc-- && i < npixels)
-@@ -223,6 +229,7 @@ LogL16Decode(TIFF* tif, uint8* op, tmsiz
- 				while (--cc && rc-- && i < npixels)
- 					tp[i++] |= (int16)*bp++ << shft;
- 			}
-+		}
- 		if (i != npixels) {
- #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
- 			TIFFErrorExt(tif->tif_clientdata, module,
-@@ -268,13 +275,17 @@ LogLuvDecode24(TIFF* tif, uint8* op, tms
- 	if (sp->user_datafmt == SGILOGDATAFMT_RAW)
- 		tp = (uint32 *)op;
- 	else {
--		assert(sp->tbuflen >= npixels);
-+		if(sp->tbuflen < npixels) {
-+			TIFFErrorExt(tif->tif_clientdata, module,
-+						 "Translation buffer too short");
-+			return (0);
-+		}
- 		tp = (uint32 *) sp->tbuf;
- 	}
- 	/* copy to array of uint32 */
- 	bp = (unsigned char*) tif->tif_rawcp;
- 	cc = tif->tif_rawcc;
--	for (i = 0; i < npixels && cc > 0; i++) {
-+	for (i = 0; i < npixels && cc >= 3; i++) {
- 		tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2];
- 		bp += 3;
- 		cc -= 3;
-@@ -325,7 +336,11 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
- 	if (sp->user_datafmt == SGILOGDATAFMT_RAW)
- 		tp = (uint32*) op;
- 	else {
--		assert(sp->tbuflen >= npixels);
-+		if(sp->tbuflen < npixels) {
-+			TIFFErrorExt(tif->tif_clientdata, module,
-+						 "Translation buffer too short");
-+			return (0);
-+		}
- 		tp = (uint32*) sp->tbuf;
- 	}
- 	_TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
-@@ -334,11 +349,13 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
- 	cc = tif->tif_rawcc;
- 	/* get each byte string */
- 	for (shft = 4*8; (shft -= 8) >= 0; ) {
--		for (i = 0; i < npixels && cc > 0; )
-+		for (i = 0; i < npixels && cc > 0; ) {
- 			if (*bp >= 128) {		/* run */
-+				if( cc < 2 )
-+					break;
- 				rc = *bp++ + (2-128);
- 				b = (uint32)*bp++ << shft;
--				cc -= 2;                /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
-+				cc -= 2;
- 				while (rc-- && i < npixels)
- 					tp[i++] |= b;
- 			} else {			/* non-run */
-@@ -346,6 +363,7 @@ LogLuvDecode32(TIFF* tif, uint8* op, tms
- 				while (--cc && rc-- && i < npixels)
- 					tp[i++] |= (uint32)*bp++ << shft;
- 			}
-+		}
- 		if (i != npixels) {
- #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
- 			TIFFErrorExt(tif->tif_clientdata, module,
-@@ -413,6 +431,7 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, t
- static int
- LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
- {
-+	static const char module[] = "LogL16Encode";
- 	LogLuvState* sp = EncoderState(tif);
- 	int shft;
- 	tmsize_t i;
-@@ -433,7 +452,11 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsiz
- 		tp = (int16*) bp;
- 	else {
- 		tp = (int16*) sp->tbuf;
--		assert(sp->tbuflen >= npixels);
-+		if(sp->tbuflen < npixels) {
-+			TIFFErrorExt(tif->tif_clientdata, module,
-+						 "Translation buffer too short");
-+			return (0);
-+		}
- 		(*sp->tfunc)(sp, bp, npixels);
- 	}
- 	/* compress each byte string */
-@@ -506,6 +529,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsiz
- static int
- LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
- {
-+	static const char module[] = "LogLuvEncode24";
- 	LogLuvState* sp = EncoderState(tif);
- 	tmsize_t i;
- 	tmsize_t npixels;
-@@ -521,7 +545,11 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tms
- 		tp = (uint32*) bp;
- 	else {
- 		tp = (uint32*) sp->tbuf;
--		assert(sp->tbuflen >= npixels);
-+		if(sp->tbuflen < npixels) {
-+			TIFFErrorExt(tif->tif_clientdata, module,
-+						 "Translation buffer too short");
-+			return (0);
-+		}
- 		(*sp->tfunc)(sp, bp, npixels);
- 	}
- 	/* write out encoded pixels */
-@@ -553,6 +581,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tms
- static int
- LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
- {
-+	static const char module[] = "LogLuvEncode32";
- 	LogLuvState* sp = EncoderState(tif);
- 	int shft;
- 	tmsize_t i;
-@@ -574,7 +603,11 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tms
- 		tp = (uint32*) bp;
- 	else {
- 		tp = (uint32*) sp->tbuf;
--		assert(sp->tbuflen >= npixels);
-+		if(sp->tbuflen < npixels) {
-+			TIFFErrorExt(tif->tif_clientdata, module,
-+						 "Translation buffer too short");
-+			return (0);
-+		}
- 		(*sp->tfunc)(sp, bp, npixels);
- 	}
- 	/* compress each byte string */
diff --git a/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch b/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch
deleted file mode 100644
index cf37fd3..0000000
--- a/yocto-poky/meta/recipes-multimedia/libtiff/files/CVE-2015-8784.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From b18012dae552f85dcc5c57d3bf4e997a15b1cc1c Mon Sep 17 00:00:00 2001
-From: erouault <erouault>
-Date: Sun, 27 Dec 2015 16:55:20 +0000
-Subject: [PATCH] * libtiff/tif_next.c: fix potential out-of-bound write in
- NeXTDecode() triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
- (bugzilla #2508)
-
-Upstream-Status: Backport
-https://github.com/vadz/libtiff/commit/b18012dae552f85dcc5c57d3bf4e997a15b1cc1c
-hand applied Changelog changes
-
-CVE:  CVE-2015-8784
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- ChangeLog          |  6 ++++++
- libtiff/tif_next.c | 10 ++++++++--
- 2 files changed, 14 insertions(+), 2 deletions(-)
-
-Index: tiff-4.0.4/ChangeLog
-===================================================================
---- tiff-4.0.4.orig/ChangeLog
-+++ tiff-4.0.4/ChangeLog
-@@ -1,5 +1,11 @@
- 2015-12-27  Even Rouault <even.rouault at spatialys.com>
- 
-+   * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
-+   triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
-+   (bugzilla #2508)
-+
-+2015-12-27  Even Rouault <even.rouault at spatialys.com>
-+
-    * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
-    functions in non debug builds by replacing assert()s by regular if
-    checks (bugzilla #2522).
-Index: tiff-4.0.4/libtiff/tif_next.c
-===================================================================
---- tiff-4.0.4.orig/libtiff/tif_next.c
-+++ tiff-4.0.4/libtiff/tif_next.c
-@@ -37,7 +37,7 @@
- 	case 0:	op[0]  = (unsigned char) ((v) << 6); break;	\
- 	case 1:	op[0] |= (v) << 4; break;	\
- 	case 2:	op[0] |= (v) << 2; break;	\
--	case 3:	*op++ |= (v);	   break;	\
-+	case 3:	*op++ |= (v);	   op_offset++; break;	\
- 	}					\
- }
- 
-@@ -106,6 +106,7 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize
- 			uint32 imagewidth = tif->tif_dir.td_imagewidth;
-             if( isTiled(tif) )
-                 imagewidth = tif->tif_dir.td_tilewidth;
-+            tmsize_t op_offset = 0;
- 
- 			/*
- 			 * The scanline is composed of a sequence of constant
-@@ -122,10 +123,15 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize
- 				 * bounds, potentially resulting in a security
- 				 * issue.
- 				 */
--				while (n-- > 0 && npixels < imagewidth)
-+				while (n-- > 0 && npixels < imagewidth && op_offset < scanline)
- 					SETPIXEL(op, grey);
- 				if (npixels >= imagewidth)
- 					break;
-+                if (op_offset >= scanline ) {
-+                    TIFFErrorExt(tif->tif_clientdata, module, "Invalid data for scanline %ld",
-+                        (long) tif->tif_row);
-+                    return (0);
-+                }
- 				if (cc == 0)
- 					goto bad;
- 				n = *bp++, cc--;
diff --git a/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.4.bb b/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.4.bb
deleted file mode 100644
index f1f5a7e..0000000
--- a/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.4.bb
+++ /dev/null
@@ -1,46 +0,0 @@
-SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
-LICENSE = "BSD-2-Clause"
-LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
-HOMEPAGE = "http://www.remotesensing.org/libtiff/"
-
-SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \
-           file://libtool2.patch \
-           file://CVE-2015-8781.patch \
-           file://CVE-2015-8784.patch \
-          "
-
-SRC_URI[md5sum] = "9aee7107408a128c0c7b24286c0db900"
-SRC_URI[sha256sum] = "8cb1d90c96f61cdfc0bcf036acc251c9dbe6320334da941c7a83cfe1576ef890"
-
-inherit autotools
-
-CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
-
-PACKAGECONFIG ?= "cxx jpeg zlib lzma \
-                  strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
-
-PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
-PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
-PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
-
-# Convert single-strip uncompressed images to multiple strips of specified
-# size (default: 8192) to reduce memory usage
-PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
-
-# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
-PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
-
-# Control picking up YCbCr subsample info. Disable to support files lacking
-# the tag
-PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
-
-# Support a mechanism allowing reading large strips (usually one strip files)
-# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
-PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
-
-PACKAGES =+ "tiffxx tiff-utils"
-FILES_tiffxx = "${libdir}/libtiffxx.so.*"
-FILES_tiff-utils = "${bindir}/*"
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb b/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
new file mode 100644
index 0000000..e2e24e0
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
@@ -0,0 +1,47 @@
+SUMMARY = "Provides support for the Tag Image File Format (TIFF)"
+LICENSE = "BSD-2-Clause"
+LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf"
+HOMEPAGE = "http://www.remotesensing.org/libtiff/"
+
+SRC_URI = "ftp://ftp.remotesensing.org/pub/libtiff/tiff-${PV}.tar.gz \
+           file://libtool2.patch \
+          "
+
+SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72"
+SRC_URI[sha256sum] = "4d57a50907b510e3049a4bba0d7888930fdfc16ce49f1bf693e5b6247370d68c"
+
+# exclude betas
+UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar"
+
+inherit autotools
+
+CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no"
+
+PACKAGECONFIG ?= "cxx jpeg zlib lzma \
+                  strip-chopping extrasample-as-alpha check-ycbcr-subsampling"
+
+PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,,"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg,"
+PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
+PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz,"
+
+# Convert single-strip uncompressed images to multiple strips of specified
+# size (default: 8192) to reduce memory usage
+PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,,"
+
+# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA
+PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,,"
+
+# Control picking up YCbCr subsample info. Disable to support files lacking
+# the tag
+PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,,"
+
+# Support a mechanism allowing reading large strips (usually one strip files)
+# in chunks when using TIFFReadScanline. Experimental 4.0+ feature
+PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,,"
+
+PACKAGES =+ "tiffxx tiff-utils"
+FILES_tiffxx = "${libdir}/libtiffxx.so.*"
+FILES_tiff-utils = "${bindir}/*"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb b/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
index cede2bf..1666994 100644
--- a/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
+++ b/yocto-poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.4.1.bb
@@ -14,6 +14,8 @@
 SRC_URI[md5sum] = "7631b0a4bcfdd0d78c0bb0083080b0dc"
 SRC_URI[sha256sum] = "c74a76068f8ec36d4bb59a03bf1157be44118ca02252180e8b358b0b5e3edeee"
 
+UPSTREAM_CHECK_URI = "http://libmpeg2.sourceforge.net/downloads.html"
+
 inherit autotools pkgconfig
 
 EXTRA_OECONF = "--enable-shared --disable-sdl"
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 5b806d7..0b05ce4 100644
--- a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -7,12 +7,12 @@
                     file://LGPL;md5=2d5025d4aa3495befef8f17206a5b0a1 \
                     file://src/pulsecore/resampler.h;beginline=4;endline=21;md5=09794012ae16912c0270f3280cc8ff84"
 
-DEPENDS = "libatomic-ops liboil libsndfile1 libtool"
+DEPENDS = "libatomic-ops libsndfile1 libtool"
 # optional
 DEPENDS += "udev alsa-lib glib-2.0 gconf"
 DEPENDS += "json-c gdbm speexdsp libxml-parser-perl-native libcap"
 
-inherit autotools pkgconfig useradd gettext perlnative bluetooth systemd
+inherit autotools bash-completion pkgconfig useradd gettext perlnative bluetooth systemd
 
 # *.desktop rules wont be generated during configure and build will fail
 # if using --disable-nls
@@ -32,6 +32,10 @@
                 ac_cv_header_valgrind_memcheck_h=no \
 "
 
+# soxr (the SoX Resampler library) doesn't seem to be currently packaged in
+# oe-core nor meta-oe, so let's not add a PACKAGECONFIG entry for it for now.
+EXTRA_OECONF += "--without-soxr"
+
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
@@ -52,6 +56,7 @@
 # Since many embedded systems don't have non-root users, it's useful to be
 # able to use pulseaudio autospawn for root as well.
 PACKAGECONFIG[autospawn-for-root] = ",,,"
+PACKAGECONFIG[lirc] = "--enable-lirc,--disable-lirc,lirc"
 
 EXTRA_OECONF_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
 EXTRA_OECONF_append_armeb = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " --enable-neon-opt=no", d)}"
@@ -100,7 +105,7 @@
 
 PACKAGES_DYNAMIC += "^pulseaudio-lib-.* ^pulseaudio-module-.*"
 
-FILES_libpulsecore = "${libdir}/libpulsecore*.so"
+FILES_libpulsecore = "${libdir}/pulseaudio/libpulsecore*.so"
 FILES_libpulsecommon = "${libdir}/pulseaudio/libpulsecommon*.so"
 
 # client.conf configures the behaviour of libpulse, so it belongs in the same
@@ -110,8 +115,6 @@
 FILES_libpulse-simple = "${libdir}/libpulse-simple.so.*"
 FILES_libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*"
 
-FILES_${PN}-dbg += "${libexecdir}/pulse/.debug \
-                    ${libdir}/pulse-${PV}/modules/.debug"
 FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala ${libdir}/cmake"   
 FILES_${PN}-conf = "${sysconfdir}"
 FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse"
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch
new file mode 100644
index 0000000..1c1e2fb
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-Revert-module-switch-on-port-available-Route-to-pref.patch
@@ -0,0 +1,268 @@
+From b8b9b3da94a0c27090ceba243fdf54fb518c5489 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <tanuk@iki.fi>
+Date: Mon, 1 Feb 2016 15:34:59 +0200
+Subject: [PATCH] Revert "module-switch-on-port-available: Route to preferred
+ profile"
+
+This reverts commit e87100d41ef6d14f8dc7f803582191d9f8d8f183.
+
+The reverted commit had some unwanted consequences:
+https://bugs.freedesktop.org/show_bug.cgi?id=93903
+https://bugs.freedesktop.org/show_bug.cgi?id=93946
+
+The first regression has a fix here:
+https://patchwork.freedesktop.org/patch/72053/
+
+The second regression, however, doesn't have a fix yet. Therefore,
+it's best to revert the offending patch for now.
+
+Upstream-Status: Inappropriate [Upstream plans to fix the issues
+properly.]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
+---
+ src/modules/module-switch-on-port-available.c | 172 ++++++++++----------------
+ 1 file changed, 67 insertions(+), 105 deletions(-)
+
+diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c
+index 5dd9786..8de68a3 100644
+--- a/src/modules/module-switch-on-port-available.c
++++ b/src/modules/module-switch-on-port-available.c
+@@ -74,25 +74,22 @@ static bool profile_good_for_input(pa_card_profile *profile) {
+ static int try_to_switch_profile(pa_device_port *port) {
+     pa_card_profile *best_profile = NULL, *profile;
+     void *state;
+-    unsigned best_prio = 0;
+ 
+-    pa_log_debug("Finding best profile for port %s, preferred = %s",
+-                 port->name, pa_strnull(port->preferred_profile));
++    pa_log_debug("Finding best profile");
+ 
+     PA_HASHMAP_FOREACH(profile, port->profiles, state) {
+         bool good = false;
+-        const char *name;
+-        unsigned prio = profile->priority;
++
++        if (best_profile && best_profile->priority >= profile->priority)
++            continue;
+ 
+         /* We make a best effort to keep other direction unchanged */
+         switch (port->direction) {
+             case PA_DIRECTION_OUTPUT:
+-                name = profile->output_name;
+                 good = profile_good_for_output(profile);
+                 break;
+ 
+             case PA_DIRECTION_INPUT:
+-                name = profile->input_name;
+                 good = profile_good_for_input(profile);
+                 break;
+         }
+@@ -100,15 +97,7 @@ static int try_to_switch_profile(pa_device_port *port) {
+         if (!good)
+             continue;
+ 
+-        /* Give a high bonus in case this is the preferred profile */
+-        if (port->preferred_profile && pa_streq(name ? name : profile->name, port->preferred_profile))
+-            prio += 1000000;
+-
+-        if (best_profile && best_prio >= prio)
+-            continue;
+-
+         best_profile = profile;
+-        best_prio = prio;
+     }
+ 
+     if (!best_profile) {
+@@ -124,125 +113,98 @@ static int try_to_switch_profile(pa_device_port *port) {
+     return 0;
+ }
+ 
+-struct port_pointers {
+-    pa_device_port *port;
+-    pa_sink *sink;
+-    pa_source *source;
+-    bool is_possible_profile_active;
+-    bool is_preferred_profile_active;
+-    bool is_port_active;
+-};
+-
+-static const char* profile_name_for_dir(pa_card_profile *cp, pa_direction_t dir) {
+-    if (dir == PA_DIRECTION_OUTPUT && cp->output_name)
+-        return cp->output_name;
+-    if (dir == PA_DIRECTION_INPUT && cp->input_name)
+-        return cp->input_name;
+-    return cp->name;
+-}
+-
+-static struct port_pointers find_port_pointers(pa_device_port *port) {
+-    struct port_pointers pp = { .port = port };
++static void find_sink_and_source(pa_card *card, pa_device_port *port, pa_sink **si, pa_source **so) {
++    pa_sink *sink = NULL;
++    pa_source *source = NULL;
+     uint32_t state;
+-    pa_card *card;
+-
+-    pa_assert(port);
+-    pa_assert_se(card = port->card);
+ 
+     switch (port->direction) {
+         case PA_DIRECTION_OUTPUT:
+-            PA_IDXSET_FOREACH(pp.sink, card->sinks, state)
+-                if (port == pa_hashmap_get(pp.sink->ports, port->name))
++            PA_IDXSET_FOREACH(sink, card->sinks, state)
++                if (port == pa_hashmap_get(sink->ports, port->name))
+                     break;
+             break;
+ 
+         case PA_DIRECTION_INPUT:
+-            PA_IDXSET_FOREACH(pp.source, card->sources, state)
+-                if (port == pa_hashmap_get(pp.source->ports, port->name))
++            PA_IDXSET_FOREACH(source, card->sources, state)
++                if (port == pa_hashmap_get(source->ports, port->name))
+                     break;
+             break;
+     }
+ 
+-    pp.is_possible_profile_active =
+-        card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name);
+-    pp.is_preferred_profile_active = pp.is_possible_profile_active && (!port->preferred_profile ||
+-        pa_safe_streq(port->preferred_profile, profile_name_for_dir(card->active_profile, port->direction)));
+-    pp.is_port_active = (pp.sink && pp.sink->active_port == port) || (pp.source && pp.source->active_port == port);
+-
+-    return pp;
++    *si = sink;
++    *so = source;
+ }
+ 
+-/* Switches to a port, switching profiles if necessary or preferred */
+-static bool switch_to_port(pa_device_port *port) {
+-    struct port_pointers pp = find_port_pointers(port);
++static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port *port, void* userdata) {
++    pa_card* card;
++    pa_sink *sink;
++    pa_source *source;
++    bool is_active_profile, is_active_port;
+ 
+-    if (pp.is_port_active)
+-        return true; /* Already selected */
++    if (port->available == PA_AVAILABLE_UNKNOWN)
++        return PA_HOOK_OK;
+ 
+-    pa_log_debug("Trying to switch to port %s", port->name);
+-    if (!pp.is_preferred_profile_active) {
+-        if (try_to_switch_profile(port) < 0) {
+-            if (pp.is_possible_profile_active)
+-                return false;
+-        }
+-        else
+-            /* Now that profile has changed, our sink and source pointers must be updated */
+-            pp = find_port_pointers(port);
+-    }
++    card = port->card;
+ 
+-    if (pp.source)
+-        pa_source_set_port(pp.source, port->name, false);
+-    if (pp.sink)
+-        pa_sink_set_port(pp.sink, port->name, false);
+-    return true;
+-}
++    if (!card) {
++        pa_log_warn("Port %s does not have a card", port->name);
++        return PA_HOOK_OK;
++    }
+ 
+-/* Switches away from a port, switching profiles if necessary or preferred */
+-static bool switch_from_port(pa_device_port *port) {
+-    struct port_pointers pp = find_port_pointers(port);
+-    pa_device_port *p, *best_port = NULL;
+-    void *state;
++    if (pa_idxset_size(card->sinks) == 0 && pa_idxset_size(card->sources) == 0)
++        /* This card is not initialized yet. We'll handle it in
++           sink_new / source_new callbacks later. */
++        return PA_HOOK_OK;
+ 
+-    if (!pp.is_port_active)
+-        return true; /* Already deselected */
++    find_sink_and_source(card, port, &sink, &source);
+ 
+-    /* Try to find a good enough port to switch to */
+-    PA_HASHMAP_FOREACH(p, port->card->ports, state)
+-        if (p->direction == port->direction && p != port && p->available != PA_AVAILABLE_NO &&
+-           (!best_port || best_port->priority < p->priority))
+-           best_port = p;
++    is_active_profile = card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name);
++    is_active_port = (sink && sink->active_port == port) || (source && source->active_port == port);
+ 
+-    pa_log_debug("Trying to switch away from port %s, found %s", port->name, best_port ? best_port->name : "no better option");
++    if (port->available == PA_AVAILABLE_NO && !is_active_port)
++        return PA_HOOK_OK;
+ 
+-    if (best_port)
+-        return switch_to_port(best_port);
++    if (port->available == PA_AVAILABLE_YES) {
++        if (is_active_port)
++            return PA_HOOK_OK;
+ 
+-    return false;
+-}
++        if (!is_active_profile) {
++            if (try_to_switch_profile(port) < 0)
++                return PA_HOOK_OK;
+ 
++            pa_assert(card->active_profile == pa_hashmap_get(port->profiles, card->active_profile->name));
+ 
+-static pa_hook_result_t port_available_hook_callback(pa_core *c, pa_device_port *port, void* userdata) {
+-    pa_assert(port);
++            /* Now that profile has changed, our sink and source pointers must be updated */
++            find_sink_and_source(card, port, &sink, &source);
++        }
+ 
+-    if (!port->card) {
+-        pa_log_warn("Port %s does not have a card", port->name);
+-        return PA_HOOK_OK;
++        if (source)
++            pa_source_set_port(source, port->name, false);
++        if (sink)
++            pa_sink_set_port(sink, port->name, false);
+     }
+ 
+-    if (pa_idxset_size(port->card->sinks) == 0 && pa_idxset_size(port->card->sources) == 0)
+-        /* This card is not initialized yet. We'll handle it in
+-           sink_new / source_new callbacks later. */
+-        return PA_HOOK_OK;
++    if (port->available == PA_AVAILABLE_NO) {
++        if (sink) {
++            pa_device_port *p2 = pa_device_port_find_best(sink->ports);
++
++            if (p2 && p2->available != PA_AVAILABLE_NO)
++                pa_sink_set_port(sink, p2->name, false);
++            else {
++                /* Maybe try to switch to another profile? */
++            }
++        }
+ 
+-    switch (port->available) {
+-    case PA_AVAILABLE_YES:
+-        switch_to_port(port);
+-        break;
+-    case PA_AVAILABLE_NO:
+-        switch_from_port(port);
+-        break;
+-    default:
+-        break;
++        if (source) {
++            pa_device_port *p2 = pa_device_port_find_best(source->ports);
++
++            if (p2 && p2->available != PA_AVAILABLE_NO)
++                pa_source_set_port(source, p2->name, false);
++            else {
++                /* Maybe try to switch to another profile? */
++            }
++        }
+     }
+ 
+     return PA_HOOK_OK;
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
index 97b2e40..84c9519 100644
--- a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
+++ b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-card-add-pa_card_profile.ports.patch
@@ -1,4 +1,4 @@
-From 6f814b40a01d03f93b36184c19339033949de472 Mon Sep 17 00:00:00 2001
+From d1c02971867bea10afcafc82c965414012c4d6bd Mon Sep 17 00:00:00 2001
 From: Tanu Kaskinen <tanuk@iki.fi>
 Date: Fri, 23 Oct 2015 12:23:13 +0300
 Subject: [PATCH 1/4] card: add pa_card_profile.ports
@@ -9,23 +9,30 @@
 
 http://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
 
-Upstream-Status: Submitted [http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-October/024614.html]
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+Rebased on 8.0.
+
+Upstream-Status: Denied [The patch set needs some work to be accepted.
+The review thread:
+http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
 ---
  src/modules/alsa/alsa-mixer.c                |  4 +++-
  src/modules/alsa/alsa-ucm.c                  |  1 +
  src/modules/bluetooth/module-bluez4-device.c |  6 ++++++
  src/modules/bluetooth/module-bluez5-device.c |  6 ++++++
- src/pulsecore/card.c                         | 16 ++++++++++++++++
- src/pulsecore/card.h                         | 18 ++++++++++++------
+ src/pulsecore/card.c                         | 15 +++++++++++++++
+ src/pulsecore/card.h                         |  4 ++++
  src/pulsecore/device-port.c                  |  7 ++++++-
- 7 files changed, 50 insertions(+), 8 deletions(-)
+ 7 files changed, 41 insertions(+), 2 deletions(-)
 
 diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
-index 47cbd14..c5b82b0 100644
+index 1fe2a02..5b76b06 100644
 --- a/src/modules/alsa/alsa-mixer.c
 +++ b/src/modules/alsa/alsa-mixer.c
-@@ -4654,8 +4654,10 @@ static pa_device_port* device_port_alsa_init(pa_hashmap *ports, /* card ports */
+@@ -4783,8 +4783,10 @@ static pa_device_port* device_port_alsa_init(pa_hashmap *ports, /* card ports */
          path->port = p;
      }
  
@@ -38,10 +45,10 @@
      if (extra) {
          pa_hashmap_put(extra, p->name, p);
 diff --git a/src/modules/alsa/alsa-ucm.c b/src/modules/alsa/alsa-ucm.c
-index aa2d601..c8199d6 100644
+index 42f3242..68fcc26 100644
 --- a/src/modules/alsa/alsa-ucm.c
 +++ b/src/modules/alsa/alsa-ucm.c
-@@ -761,6 +761,7 @@ static void ucm_add_port_combination(
+@@ -791,6 +791,7 @@ static void ucm_add_port_combination(
      if (cp) {
          pa_log_debug("Adding profile %s to port %s.", cp->name, port->name);
          pa_hashmap_put(port->profiles, cp->name, cp);
@@ -50,10 +57,10 @@
  
      if (hash) {
 diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index db69d34..b40c6a0 100644
+index 9a921a5..adecb32 100644
 --- a/src/modules/bluetooth/module-bluez4-device.c
 +++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2183,6 +2183,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
+@@ -2180,6 +2180,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
          p->max_sink_channels = 2;
          p->max_source_channels = 0;
          pa_hashmap_put(output_port->profiles, p->name, p);
@@ -61,7 +68,7 @@
  
          d = PA_CARD_PROFILE_DATA(p);
          *d = PA_BLUEZ4_PROFILE_A2DP;
-@@ -2194,6 +2195,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
+@@ -2191,6 +2192,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
          p->max_sink_channels = 0;
          p->max_source_channels = 2;
          pa_hashmap_put(input_port->profiles, p->name, p);
@@ -69,7 +76,7 @@
  
          d = PA_CARD_PROFILE_DATA(p);
          *d = PA_BLUEZ4_PROFILE_A2DP_SOURCE;
-@@ -2206,6 +2208,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
+@@ -2203,6 +2205,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
          p->max_source_channels = 1;
          pa_hashmap_put(input_port->profiles, p->name, p);
          pa_hashmap_put(output_port->profiles, p->name, p);
@@ -78,7 +85,7 @@
  
          d = PA_CARD_PROFILE_DATA(p);
          *d = PA_BLUEZ4_PROFILE_HSP;
-@@ -2218,6 +2222,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
+@@ -2215,6 +2219,8 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
          p->max_source_channels = 1;
          pa_hashmap_put(input_port->profiles, p->name, p);
          pa_hashmap_put(output_port->profiles, p->name, p);
@@ -88,7 +95,7 @@
          d = PA_CARD_PROFILE_DATA(p);
          *d = PA_BLUEZ4_PROFILE_HFGW;
 diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
-index 7238e6f..3321785 100644
+index 84e6d55..b015c67 100644
 --- a/src/modules/bluetooth/module-bluez5-device.c
 +++ b/src/modules/bluetooth/module-bluez5-device.c
 @@ -1790,6 +1790,7 @@ static pa_card_profile *create_card_profile(struct userdata *u, const char *uuid
@@ -126,18 +133,18 @@
          p = PA_CARD_PROFILE_DATA(cp);
          *p = PA_BLUETOOTH_PROFILE_HEADSET_AUDIO_GATEWAY;
 diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
-index 6f9391e..cc4c784 100644
+index b6cbbf7..f92ac87 100644
 --- a/src/pulsecore/card.c
 +++ b/src/pulsecore/card.c
-@@ -50,6 +50,7 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
-     c->n_sinks = c->n_sources = 0;
-     c->max_sink_channels = c->max_source_channels = 0;
+@@ -45,6 +45,7 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
+     c->name = pa_xstrdup(name);
+     c->description = pa_xstrdup(description);
      c->available = PA_AVAILABLE_UNKNOWN;
 +    c->ports = pa_hashmap_new(pa_idxset_string_hash_func, pa_idxset_string_compare_func);
  
      return c;
  }
-@@ -57,11 +58,25 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
+@@ -52,6 +53,14 @@ pa_card_profile *pa_card_profile_new(const char *name, const char *description,
  void pa_card_profile_free(pa_card_profile *c) {
      pa_assert(c);
  
@@ -149,8 +156,10 @@
 +        pa_hashmap_free(c->ports);
 +    }
 +
+     pa_xfree(c->input_name);
+     pa_xfree(c->output_name);
      pa_xfree(c->name);
-     pa_xfree(c->description);
+@@ -59,6 +68,12 @@ void pa_card_profile_free(pa_card_profile *c) {
      pa_xfree(c);
  }
  
@@ -163,47 +172,11 @@
  void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available) {
      pa_core *core;
  
-@@ -198,6 +213,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
- 
-     c->userdata = NULL;
-     c->set_profile = NULL;
-+    c->active_profile = NULL;
- 
-     pa_device_init_description(c->proplist, c);
-     pa_device_init_icon(c->proplist, true);
 diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
-index 3e2c004..1c33958 100644
+index 30bfc0e..fff9057 100644
 --- a/src/pulsecore/card.h
 +++ b/src/pulsecore/card.h
-@@ -22,19 +22,21 @@
- 
- typedef struct pa_card pa_card;
- 
--#include <pulse/proplist.h>
--#include <pulsecore/core.h>
--#include <pulsecore/module.h>
--#include <pulsecore/idxset.h>
--
- /* This enum replaces pa_port_available_t (defined in pulse/def.h) for
-- * internal use, so make sure both enum types stay in sync. */
-+ * internal use, so make sure both enum types stay in sync. This is defined
-+ * before the #includes, because device-port.h depends on this enum. */
- typedef enum pa_available {
-     PA_AVAILABLE_UNKNOWN = 0,
-     PA_AVAILABLE_NO = 1,
-     PA_AVAILABLE_YES = 2,
- } pa_available_t;
- 
-+#include <pulse/proplist.h>
-+#include <pulsecore/core.h>
-+#include <pulsecore/device-port.h>
-+#include <pulsecore/module.h>
-+#include <pulsecore/idxset.h>
-+
- typedef struct pa_card_profile {
-     pa_card *card;
-     char *name;
-@@ -43,6 +45,8 @@ typedef struct pa_card_profile {
+@@ -50,6 +50,8 @@ struct pa_card_profile {
      unsigned priority;
      pa_available_t available; /* PA_AVAILABLE_UNKNOWN, PA_AVAILABLE_NO or PA_AVAILABLE_YES */
  
@@ -212,7 +185,7 @@
      /* We probably want to have different properties later on here */
      unsigned n_sinks;
      unsigned n_sources;
-@@ -100,6 +104,8 @@ typedef struct pa_card_new_data {
+@@ -107,6 +109,8 @@ typedef struct pa_card_new_data {
  pa_card_profile *pa_card_profile_new(const char *name, const char *description, size_t extra);
  void pa_card_profile_free(pa_card_profile *c);
  
@@ -222,10 +195,10 @@
  void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available);
  
 diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c
-index cfe2a80..f16ecef 100644
+index 5807d3e..d12dfbc 100644
 --- a/src/pulsecore/device-port.c
 +++ b/src/pulsecore/device-port.c
-@@ -95,8 +95,13 @@ static void device_port_free(pa_object *o) {
+@@ -107,8 +107,13 @@ static void device_port_free(pa_object *o) {
      if (p->proplist)
          pa_proplist_free(p->proplist);
  
@@ -238,8 +211,8 @@
          pa_hashmap_free(p->profiles);
 +    }
  
+     pa_xfree(p->preferred_profile);
      pa_xfree(p->name);
-     pa_xfree(p->description);
 -- 
-2.1.4
+2.7.0
 
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
index d19eb7c..bc32775 100644
--- a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
+++ b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-client-conf-Add-allow-autospawn-for-root.patch
@@ -7,7 +7,12 @@
 interfere with other users' PulseAudio instances, but in embedded
 environments where only root exists, autospawning is fine.
 
-Upstream-Status: Submitted [http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/23549]
+Upstream-Status: Denied [Upstream hasn't so far been convinced that
+this feature is needed. The view is that running the graphical session
+as root doesn't make sense even on embedded systems, or if it does,
+running PulseAudio in the system mode should be a good solution for
+that use case. If someone can prove otherwise, the patch would
+probably be accepted.]
 
 Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
 ---
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-conf-parser-add-support-for-.d-directories.patch b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-conf-parser-add-support-for-.d-directories.patch
deleted file mode 100644
index a9f1b2a..0000000
--- a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-conf-parser-add-support-for-.d-directories.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-From 8cb643bbf0a287d67794e680d26f49c503f31053 Mon Sep 17 00:00:00 2001
-From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
-Date: Thu, 21 May 2015 21:00:59 +0300
-Subject: [PATCH] conf-parser: add support for .d directories
-
-This allows a configuration scheme where prior to loading
-configuration from "somefile", the parser first loads configuration
-from files in directory "somefile.d". This feature is currently
-enabled only for client.conf and daemon.conf.
-
-This makes it easier to create configuration packages in distributions
-when there's need to have different configuration in different setups.
-For example, the graphical Sato environment in OpenEmbedded-core needs
-to set allow-autospawn-for-root=true in client.conf, but the default
-configuration in OpenEmbedded-core should not set that option. With
-this patch, I can create a Sato-specific package that simply installs
-50-sato.conf in /etc/pulse/client.conf.d without conflicting with the
-main client.conf file coming from a different package.
-
-Upstream-Status: Submitted [http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/23592]
-
-Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
----
- src/daemon/daemon-conf.c                |  2 +-
- src/modules/alsa/alsa-mixer.c           |  4 ++--
- src/modules/module-augment-properties.c |  2 +-
- src/pulse/client-conf.c                 |  2 +-
- src/pulsecore/conf-parser.c             | 42 +++++++++++++++++++++++++++++++--
- src/pulsecore/conf-parser.h             |  8 ++++++-
- 6 files changed, 52 insertions(+), 8 deletions(-)
-
-diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
-index 21a8edb..1332fc6 100644
---- a/src/daemon/daemon-conf.c
-+++ b/src/daemon/daemon-conf.c
-@@ -617,7 +617,7 @@ int pa_daemon_conf_load(pa_daemon_conf *c, const char *filename) {
-     ci.default_channel_map_set = ci.default_sample_spec_set = false;
-     ci.conf = c;
- 
--    r = f ? pa_config_parse(c->config_file, f, table, NULL, NULL) : 0;
-+    r = f ? pa_config_parse(c->config_file, f, table, NULL, true, NULL) : 0;
- 
-     if (r >= 0) {
- 
-diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
-index 2314612..988b4fe 100644
---- a/src/modules/alsa/alsa-mixer.c
-+++ b/src/modules/alsa/alsa-mixer.c
-@@ -2483,7 +2483,7 @@ pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa
- 
-     fn = pa_maybe_prefix_path(fname, paths_dir);
- 
--    r = pa_config_parse(fn, NULL, items, p->proplist, p);
-+    r = pa_config_parse(fn, NULL, items, p->proplist, false, p);
-     pa_xfree(fn);
- 
-     if (r < 0)
-@@ -4288,7 +4288,7 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel
-                               pa_run_from_build_tree() ? PA_SRCDIR "/modules/alsa/mixer/profile-sets/" :
-                               PA_ALSA_PROFILE_SETS_DIR);
- 
--    r = pa_config_parse(fn, NULL, items, NULL, ps);
-+    r = pa_config_parse(fn, NULL, items, NULL, false, ps);
-     pa_xfree(fn);
- 
-     if (r < 0)
-diff --git a/src/modules/module-augment-properties.c b/src/modules/module-augment-properties.c
-index 42b6fd9..541f0e7 100644
---- a/src/modules/module-augment-properties.c
-+++ b/src/modules/module-augment-properties.c
-@@ -204,7 +204,7 @@ static void update_rule(struct rule *r) {
-     table[0].data = &r->application_name;
-     table[1].data = &r->icon_name;
- 
--    if (pa_config_parse(fn, NULL, table, NULL, r) < 0)
-+    if (pa_config_parse(fn, NULL, table, NULL, false, r) < 0)
-         pa_log_warn("Failed to parse .desktop file %s.", fn);
- 
-     pa_xfree(fn);
-diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
-index 83331f8..3c3384d 100644
---- a/src/pulse/client-conf.c
-+++ b/src/pulse/client-conf.c
-@@ -149,7 +149,7 @@ void pa_client_conf_load(pa_client_conf *c, bool load_from_x11, bool load_from_e
- 
-     f = pa_open_config_file(DEFAULT_CLIENT_CONFIG_FILE, DEFAULT_CLIENT_CONFIG_FILE_USER, ENV_CLIENT_CONFIG_FILE, &fn);
-     if (f) {
--        pa_config_parse(fn, f, table, NULL, NULL);
-+        pa_config_parse(fn, f, table, NULL, true, NULL);
-         pa_xfree(fn);
-         fclose(f);
-     }
-diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c
-index 2dcd45a..d473232 100644
---- a/src/pulsecore/conf-parser.c
-+++ b/src/pulsecore/conf-parser.c
-@@ -21,6 +21,7 @@
- #include <config.h>
- #endif
- 
-+#include <dirent.h>
- #include <string.h>
- #include <stdio.h>
- #include <errno.h>
-@@ -103,7 +104,7 @@ static int parse_line(pa_config_parser_state *state) {
-             }
-         }
- 
--        r = pa_config_parse(fn, NULL, state->item_table, state->proplist, state->userdata);
-+        r = pa_config_parse(fn, NULL, state->item_table, state->proplist, false, state->userdata);
-         pa_xfree(path);
-         return r;
-     }
-@@ -152,8 +153,13 @@ static int parse_line(pa_config_parser_state *state) {
-         return normal_assignment(state);
- }
- 
-+static int conf_filter(const struct dirent *entry) {
-+    return pa_endswith(entry->d_name, ".conf");
-+}
-+
- /* Go through the file and parse each line */
--int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist, void *userdata) {
-+int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist, bool use_dot_d,
-+                    void *userdata) {
-     int r = -1;
-     bool do_close = !f;
-     pa_config_parser_state state;
-@@ -163,6 +169,38 @@ int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_p
- 
-     pa_zero(state);
- 
-+    if (use_dot_d) {
-+        char *dir_name;
-+        int n;
-+        struct dirent **entries = NULL;
-+
-+        dir_name = pa_sprintf_malloc("%s.d", filename);
-+
-+        n = scandir(dir_name, &entries, conf_filter, alphasort);
-+        if (n >= 0) {
-+            int i;
-+
-+            for (i = 0; i < n; i++) {
-+                char *filename2;
-+
-+                filename2 = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", dir_name, entries[i]->d_name);
-+                pa_config_parse(filename2, NULL, t, proplist, false, userdata);
-+                pa_xfree(filename2);
-+
-+                free(entries[i]);
-+            }
-+
-+            free(entries);
-+        } else {
-+            if (errno == ENOENT)
-+                pa_log_debug("scandir(\"%s\") failed: %s", dir_name, pa_cstrerror(errno));
-+            else
-+                pa_log_warn("scandir(\"%s\") failed: %s", dir_name, pa_cstrerror(errno));
-+        }
-+
-+        pa_xfree(dir_name);
-+    }
-+
-     if (!f && !(f = pa_fopen_cloexec(filename, "r"))) {
-         if (errno == ENOENT) {
-             pa_log_debug("Failed to open configuration file '%s': %s", filename, pa_cstrerror(errno));
-diff --git a/src/pulsecore/conf-parser.h b/src/pulsecore/conf-parser.h
-index dbb6f5c..cc20d7d 100644
---- a/src/pulsecore/conf-parser.h
-+++ b/src/pulsecore/conf-parser.h
-@@ -59,6 +59,11 @@ struct pa_config_parser_state {
-  * pa_config_items in *t that is terminated by an item where lvalue is
-  * NULL.
-  *
-+ * If use_dot_d is true, then before parsing the file named by the filename
-+ * argument, the function will parse all files ending with ".conf" in
-+ * alphabetical order from a directory whose name is filename + ".d", if such
-+ * directory exists.
-+ *
-  * Some configuration files may contain a Properties section, which
-  * is a bit special. Normally all accepted lvalues must be predefined
-  * in the pa_config_item table, but in the Properties section the
-@@ -68,7 +73,8 @@ struct pa_config_parser_state {
-  * properties, and those properties will be merged into the given
-  * proplist. If proplist is NULL, then sections named "Properties"
-  * are not allowed at all in the configuration file. */
--int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist, void *userdata);
-+int pa_config_parse(const char *filename, FILE *f, const pa_config_item *t, pa_proplist *proplist, bool use_dot_d,
-+                    void *userdata);
- 
- /* Generic parsers for integers, size_t, booleans and strings */
- int pa_config_parse_int(pa_config_parser_state *state);
--- 
-1.9.3
-
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
index c3f217b..be3655b 100644
--- a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
+++ b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch
@@ -10,8 +10,13 @@
 
 http://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
 
-Upstream-Status: Submitted [http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-October/024614.html]
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+Upstream-Status: Denied [The patch set needs some work to be accepted.
+The review thread:
+http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
 ---
  src/modules/alsa/module-alsa-card.c          | 10 ++++++++--
  src/modules/bluetooth/module-bluez4-device.c |  6 ++++--
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
index 9585f3d..0e77801 100644
--- a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
+++ b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0003-card-move-profile-selection-after-pa_card_new.patch
@@ -1,4 +1,4 @@
-From cc41c8a3149ef04d4aa2db3d15032605a5504658 Mon Sep 17 00:00:00 2001
+From 13e85dd1763e99d21a60323671b9a5df08bdae75 Mon Sep 17 00:00:00 2001
 From: Tanu Kaskinen <tanuk@iki.fi>
 Date: Fri, 23 Oct 2015 12:59:53 +0300
 Subject: [PATCH 3/4] card: move profile selection after pa_card_new()
@@ -32,23 +32,30 @@
 
 http://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
 
-Upstream-Status: Submitted [http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-October/024614.html]
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+Rebased on 8.0.
+
+Upstream-Status: Denied [The patch set needs some work to be accepted.
+The review thread:
+http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
 ---
- src/modules/alsa/module-alsa-card.c          | 19 +++---
- src/modules/bluetooth/module-bluez4-device.c | 18 +++---
+ src/modules/alsa/module-alsa-card.c          | 19 +++----
+ src/modules/bluetooth/module-bluez4-device.c | 18 +++----
  src/modules/bluetooth/module-bluez5-device.c |  1 +
  src/modules/macosx/module-coreaudio-device.c |  1 +
- src/modules/module-card-restore.c            | 24 ++++----
- src/pulsecore/card.c                         | 86 +++++++++++++++-------------
+ src/modules/module-card-restore.c            | 24 +++++----
+ src/pulsecore/card.c                         | 81 +++++++++++++++-------------
  src/pulsecore/card.h                         |  7 +++
- 7 files changed, 87 insertions(+), 69 deletions(-)
+ 7 files changed, 86 insertions(+), 65 deletions(-)
 
 diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index 32f517e..5b39654 100644
+index 9e8cde2..fe240f0 100644
 --- a/src/modules/alsa/module-alsa-card.c
 +++ b/src/modules/alsa/module-alsa-card.c
-@@ -754,15 +754,6 @@ int pa__init(pa_module *m) {
+@@ -770,15 +770,6 @@ int pa__init(pa_module *m) {
          goto fail;
      }
  
@@ -64,7 +71,7 @@
      u->card = pa_card_new(m->core, &data);
      pa_card_new_data_done(&data);
  
-@@ -773,6 +764,16 @@ int pa__init(pa_module *m) {
+@@ -789,6 +780,16 @@ int pa__init(pa_module *m) {
      u->card->set_profile = card_set_profile;
  
      init_jacks(u);
@@ -82,10 +89,10 @@
      init_eld_ctls(u);
  
 diff --git a/src/modules/bluetooth/module-bluez4-device.c b/src/modules/bluetooth/module-bluez4-device.c
-index 94e6988..5efc5dc 100644
+index dd18217..5d0d3db 100644
 --- a/src/modules/bluetooth/module-bluez4-device.c
 +++ b/src/modules/bluetooth/module-bluez4-device.c
-@@ -2307,15 +2307,6 @@ static int add_card(struct userdata *u) {
+@@ -2304,15 +2304,6 @@ static int add_card(struct userdata *u) {
      *d = PA_BLUEZ4_PROFILE_OFF;
      pa_hashmap_put(data.profiles, p->name, p);
  
@@ -101,7 +108,7 @@
      u->card = pa_card_new(u->core, &data);
      pa_card_new_data_done(&data);
  
-@@ -2326,6 +2317,15 @@ static int add_card(struct userdata *u) {
+@@ -2323,6 +2314,15 @@ static int add_card(struct userdata *u) {
  
      u->card->userdata = u;
      u->card->set_profile = card_set_profile;
@@ -118,7 +125,7 @@
      d = PA_CARD_PROFILE_DATA(u->card->active_profile);
  
 diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
-index 3321785..0081a21 100644
+index b015c67..7b90a31 100644
 --- a/src/modules/bluetooth/module-bluez5-device.c
 +++ b/src/modules/bluetooth/module-bluez5-device.c
 @@ -1959,6 +1959,7 @@ static int add_card(struct userdata *u) {
@@ -130,10 +137,10 @@
      p = PA_CARD_PROFILE_DATA(u->card->active_profile);
      u->profile = *p;
 diff --git a/src/modules/macosx/module-coreaudio-device.c b/src/modules/macosx/module-coreaudio-device.c
-index 4bbb5d5..41f151f 100644
+index 0c92d42..7190ee9 100644
 --- a/src/modules/macosx/module-coreaudio-device.c
 +++ b/src/modules/macosx/module-coreaudio-device.c
-@@ -764,6 +764,7 @@ int pa__init(pa_module *m) {
+@@ -807,6 +807,7 @@ int pa__init(pa_module *m) {
      pa_card_new_data_done(&card_new_data);
      u->card->userdata = u;
      u->card->set_profile = card_set_profile;
@@ -142,10 +149,10 @@
      u->rtpoll = pa_rtpoll_new();
      pa_thread_mq_init(&u->thread_mq, m->core->mainloop, u->rtpoll);
 diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c
-index baa2f4f..0501ac8 100644
+index f906843..dce6674 100644
 --- a/src/modules/module-card-restore.c
 +++ b/src/modules/module-card-restore.c
-@@ -485,34 +485,38 @@ static pa_hook_result_t port_offset_change_callback(pa_core *c, pa_device_port *
+@@ -515,34 +515,38 @@ static pa_hook_result_t port_offset_change_callback(pa_core *c, pa_device_port *
      return PA_HOOK_OK;
  }
  
@@ -189,24 +196,24 @@
 +    pa_log_info("Restoring port latency offsets for card %s.", card->name);
  
      PA_HASHMAP_FOREACH(p_info, e->ports, state)
--        if ((p = pa_hashmap_get(new_data->ports, p_info->name)))
-+        if ((p = pa_hashmap_get(card->ports, p_info->name)))
+-        if ((p = pa_hashmap_get(new_data->ports, p_info->name))) {
++        if ((p = pa_hashmap_get(card->ports, p_info->name))) {
              p->latency_offset = p_info->offset;
- 
-     entry_free(e);
+             if (!p->preferred_profile && p_info->profile)
+                 pa_device_port_set_preferred_profile(p, p_info->profile);
 diff --git a/src/pulsecore/card.c b/src/pulsecore/card.c
-index cc4c784..1b7f71b 100644
+index f92ac87..1a6e705 100644
 --- a/src/pulsecore/card.c
 +++ b/src/pulsecore/card.c
-@@ -151,6 +151,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
+@@ -148,6 +148,7 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
      pa_assert(!pa_hashmap_isempty(data->profiles));
  
-     c = pa_xnew(pa_card, 1);
+     c = pa_xnew0(pa_card, 1);
 +    c->state = PA_CARD_STATE_INIT;
  
      if (!(name = pa_namereg_register(core, data->name, PA_NAMEREG_CARD, c, data->namereg_fail))) {
          pa_xfree(c);
-@@ -159,12 +160,6 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
+@@ -156,12 +157,6 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
  
      pa_card_new_data_set_name(data, name);
  
@@ -219,22 +226,24 @@
      c->core = core;
      c->name = pa_xstrdup(data->name);
      c->proplist = pa_proplist_copy(data->proplist);
-@@ -187,30 +182,6 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
+@@ -184,38 +179,43 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
      PA_HASHMAP_FOREACH(port, c->ports, state)
          port->card = c;
  
--    c->active_profile = NULL;
--    c->save_profile = false;
--
 -    if (data->active_profile)
 -        if ((c->active_profile = pa_hashmap_get(c->profiles, data->active_profile)))
 -            c->save_profile = data->save_profile;
--
++    pa_device_init_description(c->proplist, c);
++    pa_device_init_icon(c->proplist, true);
++    pa_device_init_intended_roles(c->proplist);
+ 
 -    if (!c->active_profile) {
 -        PA_HASHMAP_FOREACH(profile, c->profiles, state) {
 -            if (profile->available == PA_AVAILABLE_NO)
 -                continue;
--
++    return c;
++}
+ 
 -            if (!c->active_profile || profile->priority > c->active_profile->priority)
 -                c->active_profile = profile;
 -        }
@@ -245,27 +254,10 @@
 -                    c->active_profile = profile;
 -        }
 -        pa_assert(c->active_profile);
--    }
--
-     c->userdata = NULL;
-     c->set_profile = NULL;
-     c->active_profile = NULL;
-@@ -219,13 +190,39 @@ pa_card *pa_card_new(pa_core *core, pa_card_new_data *data) {
-     pa_device_init_icon(c->proplist, true);
-     pa_device_init_intended_roles(c->proplist);
- 
--    pa_assert_se(pa_idxset_put(core->cards, c, &c->index) >= 0);
-+    return c;
-+}
- 
--    pa_log_info("Created %u \"%s\"", c->index, c->name);
--    pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_NEW, c->index);
 +void pa_card_put(pa_card *card) {
 +    pa_card_profile *profile;
 +    void *state;
- 
--    pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_PUT], c);
--    return c;
++
 +    pa_assert(card);
 +
 +    PA_HASHMAP_FOREACH(profile, card->profiles, state) {
@@ -274,8 +266,11 @@
 +
 +        if (!card->active_profile || profile->priority > card->active_profile->priority)
 +            card->active_profile = profile;
-+    }
-+
+     }
+ 
+-    pa_device_init_description(c->proplist, c);
+-    pa_device_init_icon(c->proplist, true);
+-    pa_device_init_intended_roles(c->proplist);
 +    /* If all profiles are unavailable, then we still need to pick one */
 +    if (!card->active_profile) {
 +        PA_HASHMAP_FOREACH(profile, card->profiles, state)
@@ -283,19 +278,24 @@
 +                card->active_profile = profile;
 +    }
 +    pa_assert(card->active_profile);
-+
+ 
+-    pa_assert_se(pa_idxset_put(core->cards, c, &c->index) >= 0);
 +    pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_NEW], card);
-+
+ 
+-    pa_log_info("Created %u \"%s\"", c->index, c->name);
+-    pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_NEW, c->index);
 +    pa_assert_se(pa_idxset_put(card->core->cards, card, &card->index) >= 0);
 +    card->state = PA_CARD_STATE_LINKED;
-+
+ 
+-    pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_PUT], c);
+-    return c;
 +    pa_log_info("Created %u \"%s\"", card->index, card->name);
 +    pa_hook_fire(&card->core->hooks[PA_CORE_HOOK_CARD_PUT], card);
 +    pa_subscription_post(card->core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_NEW, card->index);
  }
  
  void pa_card_free(pa_card *c) {
-@@ -292,17 +289,24 @@ int pa_card_set_profile(pa_card *c, pa_card_profile *profile, bool save) {
+@@ -306,20 +306,27 @@ int pa_card_set_profile(pa_card *c, pa_card_profile *profile, bool save) {
          return 0;
      }
  
@@ -317,6 +317,9 @@
      c->active_profile = profile;
      c->save_profile = save;
  
+     if (save)
+         update_port_preferred_profile(c);
+ 
 -    pa_hook_fire(&c->core->hooks[PA_CORE_HOOK_CARD_PROFILE_CHANGED], c);
 +    if (c->state != PA_CARD_STATE_INIT) {
 +        pa_log_info("Changed profile of card %u \"%s\" to %s", c->index, c->name, profile->name);
@@ -327,22 +330,22 @@
      return 0;
  }
 diff --git a/src/pulsecore/card.h b/src/pulsecore/card.h
-index 1c33958..dbbc1c2 100644
+index fff9057..a944301 100644
 --- a/src/pulsecore/card.h
 +++ b/src/pulsecore/card.h
-@@ -37,6 +37,11 @@ typedef enum pa_available {
- #include <pulsecore/module.h>
- #include <pulsecore/idxset.h>
+@@ -34,6 +34,11 @@ typedef enum pa_available {
+     PA_AVAILABLE_YES = 2,
+ } pa_available_t;
  
 +typedef enum pa_card_state {
 +    PA_CARD_STATE_INIT,
 +    PA_CARD_STATE_LINKED,
 +} pa_card_state_t;
 +
- typedef struct pa_card_profile {
+ struct pa_card_profile {
      pa_card *card;
      char *name;
-@@ -61,6 +66,7 @@ typedef struct pa_card_profile {
+@@ -66,6 +71,7 @@ struct pa_card_profile {
  
  struct pa_card {
      uint32_t index;
@@ -350,7 +353,7 @@
      pa_core *core;
  
      char *name;
-@@ -115,6 +121,7 @@ void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile);
+@@ -120,6 +126,7 @@ void pa_card_new_data_set_profile(pa_card_new_data *data, const char *profile);
  void pa_card_new_data_done(pa_card_new_data *data);
  
  pa_card *pa_card_new(pa_core *c, pa_card_new_data *data);
@@ -359,5 +362,5 @@
  
  void pa_card_add_profile(pa_card *c, pa_card_profile *profile);
 -- 
-2.1.4
+2.7.0
 
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch
index bb318aa..e0efa70 100644
--- a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch
+++ b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0004-alsa-set-availability-for-some-unavailable-profiles.patch
@@ -1,4 +1,4 @@
-From 0136b73158f60d5dc630ae348b18df3b59a2a5c2 Mon Sep 17 00:00:00 2001
+From 690d567e298f6687b61c82660b051df5b25482ee Mon Sep 17 00:00:00 2001
 From: Tanu Kaskinen <tanuk@iki.fi>
 Date: Fri, 23 Oct 2015 13:37:11 +0300
 Subject: [PATCH 4/4] alsa: set availability for (some) unavailable profiles
@@ -22,28 +22,36 @@
 
 BugLink: https://bugzilla.yoctoproject.org/show_bug.cgi?id=8448
 
-Upstream-Status: Submitted [http://lists.freedesktop.org/archives/pulseaudio-discuss/2015-October/024614.html]
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+Rebased on 8.0.
+
+Upstream-Status: Denied [The patch set needs some work to be accepted.
+The review thread:
+http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/24301]
+
+Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
 ---
- src/modules/alsa/module-alsa-card.c | 24 ++++++++++++++++++++++++
- 1 file changed, 24 insertions(+)
+ src/modules/alsa/module-alsa-card.c | 25 +++++++++++++++++++++++++
+ 1 file changed, 25 insertions(+)
 
 diff --git a/src/modules/alsa/module-alsa-card.c b/src/modules/alsa/module-alsa-card.c
-index 5b39654..73a846c 100644
+index fe240f0..bdbdc12 100644
 --- a/src/modules/alsa/module-alsa-card.c
 +++ b/src/modules/alsa/module-alsa-card.c
-@@ -366,6 +366,7 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
+@@ -366,6 +366,8 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
      void *state;
      pa_alsa_jack *jack;
-     pa_device_port *port;
+     struct temp_port_avail *tp, *tports;
++    pa_device_port *port;
 +    pa_card_profile *profile;
  
      pa_assert(u);
  
-@@ -396,6 +397,29 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
-             }
-             report_port_state(port, u);
-         }
+@@ -412,6 +414,29 @@ static int report_jack_state(snd_mixer_elem_t *melem, unsigned int mask) {
+            pa_device_port_set_available(tp->port, tp->avail);
+ 
+     pa_xfree(tports);
 +
 +    /* Update profile availabilities. The logic could be improved; for now we
 +     * only set obviously unavailable profiles (those that contain only
@@ -71,5 +79,5 @@
  }
  
 -- 
-2.1.4
+2.7.0
 
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/fix-git-version-gen.patch b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/fix-git-version-gen.patch
deleted file mode 100644
index ed94250..0000000
--- a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio/fix-git-version-gen.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-git-version-gen gets confused if a tarball is being built inside a git directory
-(ie your build directory is a subdirectory of a poky clone), and ends up calling
-the release 6.0-dirty.  Add a shortcut exit so if a tarball is detected it
-doesn't attempt to look at the git status.
-
-Upstream-Status: Submitted (https://bugs.freedesktop.org/show_bug.cgi?id=90936)
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-diff --git a/git-version-gen b/git-version-gen
-index 7546884..079b93e 100755
---- a/git-version-gen
-+++ b/git-version-gen
-@@ -84,7 +84,10 @@ then
-     v=`cat $tarball_version_file` || exit 1
-     case $v in
- 	*$nl*) v= ;; # reject multi-line output
--	[0-9]*) ;;
-+	[0-9]*)
-+		echo "$v" | tr -d '\012'
-+		exit 0
-+		;;
- 	*) v= ;;
-     esac
-     test -z "$v" \
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
deleted file mode 100644
index ec629aa..0000000
--- a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_6.0.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-require pulseaudio.inc
-
-SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
-           file://0001-padsp-Make-it-compile-on-musl.patch \
-           file://0001-client-conf-Add-allow-autospawn-for-root.patch \
-           file://0001-conf-parser-add-support-for-.d-directories.patch \
-           file://fix-git-version-gen.patch \
-           file://volatiles.04_pulse \
-           file://0001-card-add-pa_card_profile.ports.patch \
-           file://0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch \
-           file://0003-card-move-profile-selection-after-pa_card_new.patch \
-           file://0004-alsa-set-availability-for-some-unavailable-profiles.patch \
-"
-SRC_URI[md5sum] = "b691e83b7434c678dffacfa3a027750e"
-SRC_URI[sha256sum] = "b50640e0b80b1607600accfad2e45aabb79d379bf6354c9671efa2065477f6f6"
-
-do_compile_prepend() {
-    mkdir -p ${S}/libltdl
-    cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
-}
diff --git a/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb
new file mode 100644
index 0000000..b01ba8f
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/pulseaudio/pulseaudio_8.0.bb
@@ -0,0 +1,19 @@
+require pulseaudio.inc
+
+SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \
+           file://0001-padsp-Make-it-compile-on-musl.patch \
+           file://0001-client-conf-Add-allow-autospawn-for-root.patch \
+           file://volatiles.04_pulse \
+           file://0001-card-add-pa_card_profile.ports.patch \
+           file://0002-alsa-bluetooth-fail-if-user-requested-profile-doesn-.patch \
+           file://0003-card-move-profile-selection-after-pa_card_new.patch \
+           file://0004-alsa-set-availability-for-some-unavailable-profiles.patch \
+           file://0001-Revert-module-switch-on-port-available-Route-to-pref.patch \
+"
+SRC_URI[md5sum] = "8678442ba0bb4b4c33ac6f62542962df"
+SRC_URI[sha256sum] = "690eefe28633466cfd1ab9d85ebfa9376f6b622deec6bfee5091ac9737cd1989"
+
+do_compile_prepend() {
+    mkdir -p ${S}/libltdl
+    cp ${STAGING_LIBDIR}/libltdl* ${S}/libltdl
+}
diff --git a/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.4.3.bb b/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.4.3.bb
deleted file mode 100644
index c4b80f6..0000000
--- a/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.4.3.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "WebP is an image format designed for the Web"
-DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
-               used on a large variety of photographic, translucent and \
-               graphical images found on the web. The degree of lossy \
-               compression is adjustable so a user can choose the trade-off \
-               between file size and image quality. WebP typically achieves \
-               an average of 30% more compression than JPEG and JPEG 2000, \
-               without loss of image quality."
-HOMEPAGE = "https://developers.google.com/speed/webp/"
-SECTION = "libs"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
-                    file://PATENTS;md5=ad2580aee35468675c44d7bebba65ca8"
-
-SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
-SRC_URI[md5sum] = "08813525eeeffe7e305b4cbfade8ae9b"
-SRC_URI[sha256sum] = "efbe0d58fda936f2ed99d0b837ed7087d064d6838931f282c4618d2a3f7390c4"
-
-EXTRA_OECONF = " \
-    --disable-experimental \
-    --disable-wic \
-    --enable-libwebpmux \
-    --enable-libwebpdemux \
-    --enable-threading \
-"
-
-inherit autotools lib_package
-
-PACKAGECONFIG ??= ""
-
-# libwebpdecoder is a subset of libwebp, don't build it unless requested
-PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
-
-# Apply for examples programs: cwebp and dwebp
-PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
-PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
-PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
-PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
-
-# Apply only for example program vwebp
-PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
-
-PACKAGES =+ "${PN}-gif2webp"
-
-DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
-FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb b/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb
new file mode 100644
index 0000000..c89adac
--- /dev/null
+++ b/yocto-poky/meta/recipes-multimedia/webp/libwebp_0.5.0.bb
@@ -0,0 +1,49 @@
+SUMMARY = "WebP is an image format designed for the Web"
+DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \
+               used on a large variety of photographic, translucent and \
+               graphical images found on the web. The degree of lossy \
+               compression is adjustable so a user can choose the trade-off \
+               between file size and image quality. WebP typically achieves \
+               an average of 30% more compression than JPEG and JPEG 2000, \
+               without loss of image quality."
+HOMEPAGE = "https://developers.google.com/speed/webp/"
+SECTION = "libs"
+
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \
+                    file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7"
+
+SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz"
+SRC_URI[md5sum] = "ba81eb9bf23e3c69a2f5cc8dcdb5938f"
+SRC_URI[sha256sum] = "5cd3bb7b623aff1f4e70bd611dc8dbabbf7688fd5eb225b32e02e09e37dfb274"
+
+UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html"
+
+EXTRA_OECONF = " \
+    --disable-experimental \
+    --disable-wic \
+    --enable-libwebpmux \
+    --enable-libwebpdemux \
+    --enable-threading \
+"
+
+inherit autotools lib_package
+
+PACKAGECONFIG ??= ""
+
+# libwebpdecoder is a subset of libwebp, don't build it unless requested
+PACKAGECONFIG[decoder] = "--enable-libwebpdecoder,--disable-libwebpdecoder"
+
+# Apply for examples programs: cwebp and dwebp
+PACKAGECONFIG[gif] = "--enable-gif,--disable-gif,giflib"
+PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg"
+PACKAGECONFIG[png] = "--enable-png,--disable-png,,libpng"
+PACKAGECONFIG[tiff] = "--enable-tiff,--disable-tiff,tiff"
+
+# Apply only for example program vwebp
+PACKAGECONFIG[gl] = "--enable-gl,--disable-gl,mesa-glut"
+
+PACKAGES =+ "${PN}-gif2webp"
+
+DESCRIPTION_${PN}-gif2webp = "Simple tool to convert animated GIFs to WebP"
+FILES_${PN}-gif2webp = "${bindir}/gif2webp"
diff --git a/yocto-poky/meta/recipes-qt/images/qt4e-demo-image.bb b/yocto-poky/meta/recipes-qt/images/qt4e-demo-image.bb
deleted file mode 100644
index 4451848..0000000
--- a/yocto-poky/meta/recipes-qt/images/qt4e-demo-image.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-DESCRIPTION = "An image that will launch into the demo application for the embedded (not based on X11) version of Qt."
-LICENSE = "MIT"
-PR = "r3"
-
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
-                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-IMAGE_INSTALL += "\
-	${CORE_IMAGE_BASE_INSTALL} \
-	packagegroup-core-qt4e \
-"
-
-inherit core-image
-
diff --git a/yocto-poky/meta/recipes-qt/meta/meta-toolchain-qt.bb b/yocto-poky/meta/recipes-qt/meta/meta-toolchain-qt.bb
deleted file mode 100644
index a10103a..0000000
--- a/yocto-poky/meta/recipes-qt/meta/meta-toolchain-qt.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-# Qt toolchain
-QTNAME = "qt"
-QT_DIR_NAME = "qt4"
-
-require meta-toolchain-qt.inc
diff --git a/yocto-poky/meta/recipes-qt/meta/meta-toolchain-qt.inc b/yocto-poky/meta/recipes-qt/meta/meta-toolchain-qt.inc
deleted file mode 100644
index 7e75d93..0000000
--- a/yocto-poky/meta/recipes-qt/meta/meta-toolchain-qt.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-TOOLCHAIN_HOST_TASK = "nativesdk-packagegroup-${QTNAME}-toolchain-host packagegroup-cross-canadian-${MACHINE}"
-TOOLCHAIN_TARGET_TASK = "packagegroup-${QTNAME}-toolchain-target"
-TOOLCHAIN_OUTPUTNAME = "${SDK_NAME}-toolchain-${QTNAME}-${DISTRO_VERSION}"
-
-require recipes-core/meta/meta-toolchain.bb
-
-QT_TOOLS_PREFIX = "$OECORE_NATIVE_SYSROOT${bindir_nativesdk}"
-
-create_sdk_files_append() {
-    mkdir -p ${SDK_OUTPUT}${SDKPATHNATIVE}/environment-setup.d/
-    script=${SDK_OUTPUT}${SDKPATHNATIVE}/environment-setup.d/${QT_DIR_NAME}.sh
-
-    echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' > $script
-    echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script
-    echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script
-    echo 'export OE_QMAKE_CC=$CC' >> $script
-    echo 'export OE_QMAKE_CXX=$CXX' >> $script
-    echo 'export OE_QMAKE_LINK=$CXX' >> $script
-    echo 'export OE_QMAKE_AR=$AR' >> $script
-    echo 'export OE_QMAKE_LIBDIR_QT=$OECORE_TARGET_SYSROOT${libdir}' >> $script
-    echo 'export OE_QMAKE_INCDIR_QT=$OECORE_TARGET_SYSROOT${includedir}/${QT_DIR_NAME}' >> $script
-    echo 'export OE_QMAKE_MOC=${QT_TOOLS_PREFIX}/moc4' >> $script
-    echo 'export OE_QMAKE_UIC=${QT_TOOLS_PREFIX}/uic4' >> $script
-    echo 'export OE_QMAKE_UIC3=${QT_TOOLS_PREFIX}/uic34' >> $script
-    echo 'export OE_QMAKE_RCC=${QT_TOOLS_PREFIX}/rcc4' >> $script
-    echo 'export OE_QMAKE_QDBUSCPP2XML=${QT_TOOLS_PREFIX}/qdbuscpp2xml4' >> $script
-    echo 'export OE_QMAKE_QDBUSXML2CPP=${QT_TOOLS_PREFIX}/qdbusxml2cpp4' >> $script
-    echo 'export OE_QMAKE_QT_CONFIG=$OECORE_TARGET_SYSROOT${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
-    echo 'export QMAKESPEC=$OECORE_TARGET_SYSROOT${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
-    echo 'export QT_CONF_PATH=$OECORE_NATIVE_SYSROOT${sysconfdir}/qt.conf' >> $script
-
-    # make a symbolic link to mkspecs for compatibility with Qt SDK
-    # and Qt Creator
-    (cd ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/..; ln -s ${SDKTARGETSYSROOT}/usr/share/${QT_DIR_NAME}/mkspecs mkspecs;)
-}
diff --git a/yocto-poky/meta/recipes-qt/meta/meta-toolchain-qte.bb b/yocto-poky/meta/recipes-qt/meta/meta-toolchain-qte.bb
deleted file mode 100644
index 9113f48..0000000
--- a/yocto-poky/meta/recipes-qt/meta/meta-toolchain-qte.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-# Qt Embedded toolchain
-PR = "r6"
-QTNAME = "qte"
-QT_DIR_NAME = "qtopia"
-
-require meta-toolchain-qt.inc
diff --git a/yocto-poky/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.bb b/yocto-poky/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.bb
deleted file mode 100644
index b95cc5e..0000000
--- a/yocto-poky/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require nativesdk-packagegroup-qt-toolchain-host.inc
-
-SUMMARY = "Host packages for Qt SDK"
diff --git a/yocto-poky/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.inc b/yocto-poky/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.inc
deleted file mode 100644
index a3c275f..0000000
--- a/yocto-poky/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qt-toolchain-host.inc
+++ /dev/null
@@ -1,6 +0,0 @@
-require recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb
-
-DESCRIPTION = "Host packages for Qt Embedded SDK"
-LICENSE = "MIT"
-
-RDEPENDS_${PN} += "nativesdk-qt4-tools"
diff --git a/yocto-poky/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qte-toolchain-host.bb b/yocto-poky/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qte-toolchain-host.bb
deleted file mode 100644
index 296e4b8..0000000
--- a/yocto-poky/meta/recipes-qt/packagegroups/nativesdk-packagegroup-qte-toolchain-host.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require nativesdk-packagegroup-qt-toolchain-host.inc
-
-SUMMARY = "Host packages for Qt Embedded SDK"
diff --git a/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb b/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb
deleted file mode 100644
index b81f8a3..0000000
--- a/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-core-qt.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# Copyright (C) 2010  Intel Corporation. All rights reserved
-#
-
-SUMMARY = "Qt package groups"
-LICENSE = "MIT"
-PR = "r4"
-
-# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "null"
-
-inherit packagegroup distro_features_check
-
-# The quicky and fotowall requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-PACKAGES = "${PN}-demoapps"
-
-QTDEMOS ?= "quicky ${COMMERCIAL_QT} fotowall"
-
-SUMMARY_${PN}-demoapps = "Qt demo applications"
-RDEPENDS_${PN}-demoapps = "${QTDEMOS}"
diff --git a/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb b/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb
deleted file mode 100644
index eb5fa1f..0000000
--- a/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-core-qt4e.bb
+++ /dev/null
@@ -1,52 +0,0 @@
-SUMMARY = "Qt for Embedded Linux (Qt without X11)"
-PR = "r2"
-LICENSE = "MIT"
-
-# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "null"
-
-inherit packagegroup
-
-TOUCH = ' ${@bb.utils.contains("MACHINE_FEATURES", "touchscreen", "tslib tslib-calibrate tslib-tests", "",d)}'
-
-RDEPENDS_${PN} = " \
-	qt4-embedded \
-	libqt-embedded3support4 \
-	libqt-embeddedclucene4 \
-	libqt-embeddedcore4 \
-	libqt-embeddeddbus4 \
-	libqt-embeddedgui4 \
-	libqt-embeddedhelp4 \
-	libqt-embeddedmultimedia4 \
-	libqt-embeddednetwork4 \
-	libqt-embeddedscript4 \
-	libqt-embeddedscripttools4 \
-	libqt-embeddedsql4 \
-	libqt-embeddedsvg4 \
-	libqt-embeddedtest4 \
-	libqt-embeddedwebkit4 \
-	libqt-embeddedxml4 \
-	qt4-embedded-fonts-ttf-dejavu \
-	qt4-embedded-fonts-ttf-vera \
-	qt4-embedded-plugin-iconengine-svgicon \
-	qt4-embedded-plugin-imageformat-gif \
-	qt4-embedded-plugin-imageformat-ico \
-	qt4-embedded-plugin-imageformat-jpeg \
-	qt4-embedded-plugin-imageformat-mng \
-	qt4-embedded-plugin-imageformat-svg \
-	qt4-embedded-plugin-imageformat-tiff \
-	qt4-embedded-plugin-mousedriver-tslib \
-	qt4-embedded-plugin-script-dbus \
-	qt4-embedded-plugin-sqldriver-sqlite \
-	${TOUCH} \
-        qt4-embedded-demos \
-        qt4-embedded-examples \
-        qt-demo-init \
-        qt4-embedded-assistant \
-"
-
-RRECOMMENDS_${PN} = " \
-	libqt-embeddedxmlpatterns4 \
-	qt4-embedded-plugin-phonon-backend-gstreamer \
-"
-
diff --git a/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb b/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
deleted file mode 100644
index 772c151..0000000
--- a/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "Target packages for Qt SDK"
-
-QTLIBPREFIX = ""
-
-require packagegroup-qt-toolchain-target.inc
-
-inherit distro_features_check
-# depends on qt4-x11-free
-REQUIRED_DISTRO_FEATURES = "x11"
-
-RDEPENDS_${PN} += " \
-        qt4-x11-free-dev \
-        ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'libqtopengl4-dev', '', d)} \
-        ${@bb.utils.contains('DISTRO_FEATURES', 'openvg', 'libqtopenvg4-dev', '', d)} \
-        "
diff --git a/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc b/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc
deleted file mode 100644
index e09782d..0000000
--- a/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-qt-toolchain-target.inc
+++ /dev/null
@@ -1,39 +0,0 @@
-LICENSE = "MIT"
-
-# Qt4 could NOT be built on MIPS64 with 64 bits userspace
-COMPATIBLE_HOST_mips64 = "null"
-
-inherit packagegroup
-
-PACKAGEGROUP_DISABLE_COMPLEMENTARY = "1"
-
-RDEPENDS_${PN} += " \
-        packagegroup-core-standalone-sdk-target \
-        qt4${QTLIBPREFIX}-mkspecs \
-        libqt${QTLIBPREFIX}multimedia4-dev \
-        libqt${QTLIBPREFIX}3support4-dev \
-        libqt${QTLIBPREFIX}clucene4-dev \
-        libqt${QTLIBPREFIX}core4-dev \
-        libqt${QTLIBPREFIX}dbus4-dev \
-        libqt${QTLIBPREFIX}designercomponents4-dev \
-        libqt${QTLIBPREFIX}designer4-dev \
-        libqt${QTLIBPREFIX}uitools4-dev \
-        libqt${QTLIBPREFIX}gui4-dev \
-        libqt${QTLIBPREFIX}help4-dev \
-        libqt${QTLIBPREFIX}network4-dev \
-        libqt${QTLIBPREFIX}script4-dev \
-        libqt${QTLIBPREFIX}scripttools4-dev \
-        libqt${QTLIBPREFIX}sql4-dev \
-        libqt${QTLIBPREFIX}svg4-dev \
-        libqt${QTLIBPREFIX}test4-dev \
-        libqt${QTLIBPREFIX}webkit4-dev \
-        libqt${QTLIBPREFIX}xml4-dev \
-        libqt${QTLIBPREFIX}declarative4-dev \
-        libqt${QTLIBPREFIX}xmlpatterns4-dev \
-        libsqlite3-dev \
-        expat-dev \
-        "
-
-RRECOMMENDS_${PN} += " \
-        libqt${QTLIBPREFIX}phonon4-dev \
-        "
diff --git a/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-qte-toolchain-target.bb b/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-qte-toolchain-target.bb
deleted file mode 100644
index 92ed237..0000000
--- a/yocto-poky/meta/recipes-qt/packagegroups/packagegroup-qte-toolchain-target.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-SUMMARY = "Target packages for Qt Embedded SDK"
-
-PR = "r7"
-
-QTLIBPREFIX = "-embedded"
-
-require packagegroup-qt-toolchain-target.inc
diff --git a/yocto-poky/meta/recipes-qt/qt-apps/fotowall/ExportWizard-depends-on-ui_wizard.patch b/yocto-poky/meta/recipes-qt/qt-apps/fotowall/ExportWizard-depends-on-ui_wizard.patch
deleted file mode 100644
index d8b2b23..0000000
--- a/yocto-poky/meta/recipes-qt/qt-apps/fotowall/ExportWizard-depends-on-ui_wizard.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-App/ExportWizard.cpp depends on wizard.h which depends on ui_wizard. The last one
-should be already generated before compiling ExportWizard.cpp.
-
-Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-Upstream-Status: Pending
-
-Index: Fotowall-0.9/App/ExportWizard.cpp
-===================================================================
---- Fotowall-0.9.orig/App/ExportWizard.cpp	2009-11-30 13:21:31.000000000 +0200
-+++ Fotowall-0.9/App/ExportWizard.cpp	2012-05-10 17:12:06.765230830 +0300
-@@ -23,6 +23,7 @@
- #include "imageloaderqt.h"
- #include "posterazorcore.h"
- #include "wizard.h"
-+#include "ui_wizard.h"
- 
- #include <QDesktopServices>
- #include <QDesktopWidget>
diff --git a/yocto-poky/meta/recipes-qt/qt-apps/fotowall_0.9.bb b/yocto-poky/meta/recipes-qt/qt-apps/fotowall_0.9.bb
deleted file mode 100644
index 3af0265..0000000
--- a/yocto-poky/meta/recipes-qt/qt-apps/fotowall_0.9.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "Creative photo display application"
-DESCRIPTION = "Fotowall is a creative tool that allows you to layout your photos or pictures \
-in a personal way. You can add pictures, then resize, move, change colors, text, shadows, etc.."
-
-HOMEPAGE = "http://www.enricoros.com/opensource/fotowall"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://GPL_V2;md5=79808397c3355f163c012616125c9e26 \
-                    file://main.cpp;beginline=6;endline=11;md5=b569acc2bf8974a3082b58fc53b9d8dc"
-SECTION = "x11/apps"
-
-PR = "r4"
-
-SRCREV = "06d5a4142c599604d9a9fd64727b6945eb8cd3da"
-SRC_URI = "git://github.com/enricoros/fotowall.git \
-           file://ExportWizard-depends-on-ui_wizard.patch \
-           "
-
-S = "${WORKDIR}/git"
-
-inherit qt4x11
-
-EXTRA_QMAKEVARS_PRE = "CONFIG+=no-webcam"
-
-do_install() {
-	oe_runmake INSTALL_ROOT=${D} install
-}
-
-# Ensure we have some plugins for some useful image formats
-RRECOMMENDS_${PN} += "qt4-plugin-imageformat-gif qt4-plugin-imageformat-jpeg qt4-plugin-imageformat-tiff"
diff --git a/yocto-poky/meta/recipes-qt/qt-apps/qmmp/no-host-paths.patch b/yocto-poky/meta/recipes-qt/qt-apps/qmmp/no-host-paths.patch
deleted file mode 100644
index 2bb5bb1..0000000
--- a/yocto-poky/meta/recipes-qt/qt-apps/qmmp/no-host-paths.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Do not include /usr/include host paths
-
-These were added upstream apparently for freebsd support, but trigger
-compiler warnings during the build and could be dangerous, so remove
-them.
-
-Upstream-Status: Inappropriate [cross]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-
-Update patch for version 0.7.4.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
---- qmmp-0.7.4/CMakeLists.txt	2014-01-10 09:59:44.971837746 +0800
-+++ qmmp-0.7.4/CMakeLists.txt.new	2014-01-10 10:24:51.855837566 +0800
-@@ -1,9 +1,5 @@
- cmake_minimum_required(VERSION 2.6.0)
- 
--#freebsd support
--include_directories(SYSTEM /usr/local/include)
--SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} /usr/local/include)
--
- #extract version from qmmp.h
- FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/src/qmmp/qmmp.h"
-      QMMP_VERSION_DATA REGEX "^#define[ \t]+QMMP_VERSION_[A-Z]+[ \t]+[0-9]+.*$")
diff --git a/yocto-poky/meta/recipes-qt/qt-apps/qmmp_0.8.6.bb b/yocto-poky/meta/recipes-qt/qt-apps/qmmp_0.8.6.bb
deleted file mode 100644
index e68ad0f..0000000
--- a/yocto-poky/meta/recipes-qt/qt-apps/qmmp_0.8.6.bb
+++ /dev/null
@@ -1,76 +0,0 @@
-SUMMARY = "Qt-based Multimedia Player"
-DESCRIPTION = "Qmmp is an audio player, written with the help of the Qt library. The user interface is similar to Winamp or XMMS."
-HOMEPAGE = "http://qmmp.ylsoftware.com"
-LICENSE = "GPLv2"
-LICENSE_FLAGS = "commercial"
-LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SECTION = "multimedia"
-
-DEPENDS = "taglib libmad libvorbis libogg alsa-lib libsndfile1 libsamplerate0 curl"
-
-SRC_URI = "http://qmmp.ylsoftware.com/files/${BP}.tar.bz2 \
-           file://no-host-paths.patch \
-          "
-
-SRC_URI[md5sum] = "67e96e89c61b7432e5a12f555db702b1"
-SRC_URI[sha256sum] = "0daea3f0a0df7b34089513c2c57413c82816ab8892bddabf49c18a7956255449"
-inherit cmake qt4x11
-
-QMMP_PLUGIN_OPTIONS ??= "\
-                        -DUSE_MMS:BOOL=FALSE \
-                        -DUSE_MPC:BOOL=FALSE \
-                        -DUSE_MODPLUG:BOOL=FALSE \
-                        -DUSE_WAVPACK:BOOL=FALSE \
-                        -DUSE_FFMPEG:BOOL=FALSE \
-                        -DUSE_AAC:BOOL=FALSE \
-                        -DUSE_CDA:BOOL=FALSE \
-                        -DUSE_MIDI:BOOL=FALSE \
-                        -DUSE_GME:BOOL=FALSE \
-                        -DUSE_OSS4:BOOL=FALSE \
-                        -DUSE_JACK:BOOL=FALSE \
-                        -DUSE_BS2B:BOOL=FALSE \
-                        -DUSE_PROJECTM:BOOL=FALSE \
-                        -DUSE_ENCA:BOOL=FALSE \
-                        "
-
-export EXTRA_OECMAKE = "-DQT_QMAKE_EXECUTABLE=${OE_QMAKE_QMAKE} \
-                        -DQT_LRELEASE_EXECUTABLE=${OE_QMAKE_LRELEASE} \
-                        -DQT_MOC_EXECUTABLE=${OE_QMAKE_MOC} \
-                        -DQT_UIC_EXECUTABLE=${OE_QMAKE_UIC} \
-                        -DQT_RCC_EXECUTABLE=${OE_QMAKE_RCC} \
-                        -DQT_LIBRARY_DIR=${OE_QMAKE_LIBDIR_QT} \
-                        -DQT_HEADERS_DIR=${OE_QMAKE_INCDIR_QT} \
-                        -DQT_QTCORE_INCLUDE_DIR=${OE_QMAKE_INCDIR_QT}/QtCore \
-                        ${QMMP_PLUGIN_OPTIONS} \
-                        "
-
-do_configure() {
-	# Ensure we get the cmake configure and not qmake
-	cmake_do_configure
-}
-
-PACKAGES_DYNAMIC += "^qmmp-plugin-.* "
-
-python populate_packages_prepend () {
-    qmmp_libdir = d.expand('${libdir}/qmmp')
-    gd = d.expand('${D}/${libdir}/qmmp')
-    plug_dirs = os.listdir(gd)
-
-    for plug_dir in plug_dirs:
-        g_plug_dir = os.path.join(qmmp_libdir,plug_dir)
-        do_split_packages(d, g_plug_dir, '^lib(.*)\.so$', 'qmmp-plugin-' + plug_dir.lower() + '-%s', 'Qmmp ' + plug_dir  + ' plugin for %s')
-}
-
-FILES_${PN} = "\
-                ${bindir}/qmmp \
-                ${libdir}/lib*${SOLIBS} \
-                ${datadir}/icons/* \
-                ${datadir}/qmmp/images/* \
-                ${datadir}/applications/* \
-                "
-
-FILES_${PN}-dbg += "\
-                ${libdir}/qmmp/*/.debug/* \
-               "
-
-RDEPENDS_${PN} += "taglib alsa-lib libmad curl libicui18n"
diff --git a/yocto-poky/meta/recipes-qt/qt-apps/quicky_0.4.bb b/yocto-poky/meta/recipes-qt/qt-apps/quicky_0.4.bb
deleted file mode 100644
index bcaa562..0000000
--- a/yocto-poky/meta/recipes-qt/qt-apps/quicky_0.4.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "A simple note-taking application with Wiki-style syntax and behaviour"
-HOMEPAGE = "http://qt-apps.org/content/show.php/Quicky?content=80325"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://version.h;endline=19;md5=878bdaff438dab86298301fd1a210e14"
-SECTION = "x11/apps"
-
-PR = "r2"
-
-SRC_URI = "http://qt-apps.org/CONTENT/content-files/80325-quicky-0.4.tar.gz"
-
-SRC_URI[md5sum] = "824d9e477ee9c4994f73a3cb215161d9"
-SRC_URI[sha256sum] = "9c66376e0035d44547612bf629890769a6178c3e7eafbcf95f1c6207ac0f352a"
-
-inherit qt4x11
-
-do_install() {
-	install -d ${D}${bindir}
-	install -m 0755 ${S}/${BPN} ${D}${bindir}
-}
diff --git a/yocto-poky/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init b/yocto-poky/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init
deleted file mode 100644
index 21f0273..0000000
--- a/yocto-poky/meta/recipes-qt/qt-demo/qt-demo-init/qtdemo-init
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ -x /usr/bin/qtdemo ]; then
-	QTDEMO="qtdemo"
-else
-	QTDEMO="qtdemoE -qws"
-fi
-
-case "$1" in
-  start)
-	echo "Starting qtdemo"
-	if [ -f /etc/profile.d/tslib.sh ]; then
-		. /etc/profile.d/tslib.sh
-	fi
-	if [ -e "$TSLIB_TSDEVICE" ]; then
-		if [ ! -f /etc/pointercal ]; then
-			/usr/bin/ts_calibrate
-		fi
-		if [ "$QTDEMO" = "qtdemo" ]; then
-			Xorg &
-			export DISPLAY=:0
-			$QTDEMO &
-		else
-			QWS_MOUSE_PROTO=tslib:$TSLIB_TSDEVICE $QTDEMO &
-		fi
-	else
-		if [ "$QTDEMO" = "qtdemo" ]; then
-			Xorg &
-			export DISPLAY=:0
-		fi
-		$QTDEMO &
-	fi
-	;;
-  stop)
-	echo "Stopping qtdemo"
-	if [ "$QTDEMO" = "qtdemo" ]; then
-		killall Xorg
-		killall qtdemo
-	else
-		killall qtdemoE
-	fi
-	;;
-  restart)
-	$0 stop
-	$0 start
-	;;
-  *)
-	echo "usage: $0 { start | stop | restart }" >&2
-	exit 1
-	;;
-esac
-
-exit 0
diff --git a/yocto-poky/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb b/yocto-poky/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb
deleted file mode 100644
index aa1b0b6..0000000
--- a/yocto-poky/meta/recipes-qt/qt-demo/qt-demo-init_0.1.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-SUMMARY = "Init script for qtdemo"
-LICENSE = "MIT"
-SRC_URI = "file://qtdemo-init"
-PR = "r3"
-
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
-                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-S = "${WORKDIR}"
-
-do_install() {
-	install -d ${D}${sysconfdir}/init.d/
-	install -m 0755 ${WORKDIR}/qtdemo-init ${D}${sysconfdir}/init.d/qtdemo
-}
-
-inherit update-rc.d allarch
-
-INITSCRIPT_NAME = "qtdemo"
-INITSCRIPT_PARAMS = "start 99 5 2 . stop 19 0 1 6 ."
diff --git a/yocto-poky/meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb b/yocto-poky/meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb
deleted file mode 100644
index ff3f3da..0000000
--- a/yocto-poky/meta/recipes-qt/qt4-graphics-system/qt4-graphics-system_1.0.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Sets default Qt4 Graphics System to ${QT_GRAPHICS_SYSTEM}"
-SECTION = "x11/base"
-LICENSE = "MIT-X"
-LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-PR = "r1"
-
-QT_GRAPHICS_SYSTEM ?= "raster"
-
-def _get_extra_rdepends(d):
-    gs = d.getVar('QT_GRAPHICS_SYSTEM', True)
-    if gs == "opengl":
-        return "qt4-plugin-graphicssystems-glgraphicssystem"
-
-    return ""
-
-do_install () {
-	install -d ${D}/${sysconfdir}/profile.d/
-	cfg_file=${D}/${sysconfdir}/profile.d/qt-graphicssystem
-	echo "export QT_GRAPHICSSYSTEM=${QT_GRAPHICS_SYSTEM}" > $cfg_file
-}
-
-RDEPENDS_${PN} = "${@_get_extra_rdepends(d)}"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/yocto-poky/meta/recipes-qt/qt4/nativesdk-qt4-tools.inc b/yocto-poky/meta/recipes-qt/qt4/nativesdk-qt4-tools.inc
deleted file mode 100644
index 077008b..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/nativesdk-qt4-tools.inc
+++ /dev/null
@@ -1,125 +0,0 @@
-SUMMARY = "SDK tools for Qt version 4.x"
-DEPENDS = "nativesdk-zlib nativesdk-dbus qt4-native ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'virtual/nativesdk-libx11', '', d)}"
-SECTION = "libs"
-HOMEPAGE = "http://qt-project.org/"
-LICENSE = "LGPLv2.1 | GPLv3"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/qt4-${PV}:"
-
-inherit nativesdk qmake2
-
-SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-everywhere-opensource-src-${PV}.tar.gz \
-           file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
-           file://0004-configure-qmake-is-already-built-in-qt4-tools-native.patch \
-           file://0005-configure-set-LFLAGS-to-pick-up-zlib-from-staging.patch \
-           file://0006-configure-Use-OE_QMAKE_-values-to-specify-Qt-utility.patch \
-           file://0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch \
-           file://0008-qmake.pro-Allow-building-a-separate-qmake-for-the-ta.patch \
-           file://g++.conf \
-           file://linux.conf"
-
-S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
-
-LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
-                    file://LICENSE.GPL3;md5=6e1694ee338db410417517884918d4d2 \
-                    file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6"
-
-require qt4_arch.inc
-
-# FIXME: make it work with "${STAGING_BINDIR_NATIVE}/pkg-config --cflags dbus-1"
-EXTRA_OECONF = "-prefix ${prefix} \
-                -qt-libjpeg -system-zlib \
-                -no-libjpeg -no-libpng -no-libmng -no-libtiff \
-                -no-accessibility \
-                -no-cups \
-                -no-exceptions  \
-                -no-nas-sound \
-                -no-nis -no-openssl \
-                -verbose -release -fast -static \
-                -platform ${TARGET_OS}-oe-g++ \
-                -xplatform ${TARGET_OS}-oe-g++ \
-                -arch ${QT_ARCH} \
-                -embedded -no-freetype -no-glib -no-iconv \
-                -qt3support \
-                -I${STAGING_DIR_HOST}${SDKPATHNATIVE}/usr/include/dbus-1.0 \
-                -I${STAGING_DIR_HOST}${SDKPATHNATIVE}/usr/lib/dbus-1.0/include"
-
-# yank default -e, otherwise we get the following error:
-# moc_qbuffer.cpp: No such file or directory
-EXTRA_OEMAKE = " "
-
-do_configure() {
-    # Avoid problems with Qt 4.8.0 configure setting QMAKE_LINK from LD (since we want the linker to be g++)
-    unset LD
-
-    if [ ! -e mkspecs/${TARGET_OS}-oe-g++ ]; then
-        ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++
-    fi
-
-    cp ../g++.conf mkspecs/common
-    cp ../linux.conf mkspecs/common
-
-    if [ -f mkspecs/common/g++-base.conf ] ; then
-        # don't use host g++ even during configure (4.8.0+)
-        sed -i -e "s#= g++#= ${CXX}#" mkspecs/common/g++-base.conf
-        sed -i -e "s#= gcc#= ${CC}#" mkspecs/common/g++-base.conf
-    fi
-
-    # Use qmake from qt4-native for building
-    if [ ! -e bin/qmake ]; then
-        ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
-    fi
-    set_arch
-    (echo o; echo yes) | CC="${CC}" CXX="${CXX}" ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
-}
-
-TOBUILD = "\
-  src/tools/bootstrap \
-  src/tools/moc \
-  src/corelib \
-  src/sql \
-  src/dbus \
-  src/qt3support \
-  src/xml \
-  src/tools/uic \
-  src/tools/rcc \
-  src/network \
-  src/gui \
-  src/tools/uic3 \
-  tools/linguist/lrelease \
-  tools/linguist/lupdate \
-  tools/qdbus \
-"
-
-do_compile() {
-    for i in ${TOBUILD}; do
-        cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
-    done
-
-    # Build nativesdk qmake
-    export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
-    cd ${S}/qmake
-    ${OE_QMAKE_QMAKE}
-    oe_runmake CC="${CC}" CXX="${CXX}"
-    cd ${S}
-}
-
-do_install() {
-    install -d ${D}${bindir}
-    install -m 0755 bin/qmake2 ${D}${bindir}/qmake2
-    for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do
-        install -m 0755 bin/${i} ${D}${bindir}/${i}4
-    done
-
-    (cd ${D}${bindir}; \
-    ln -s qmake2 qmake; \
-    for i in moc uic uic3 rcc lrelease lupdate qdbuscpp2xml qdbusxml2cpp; do \
-        ln -s ${i}4 ${i}; \
-    done)
-
-    install -d ${D}${sysconfdir}
-    cat >${D}${sysconfdir}/qt.conf <<EOF
-[Paths]
-Prefix = ${prefix}
-EOF
-}
diff --git a/yocto-poky/meta/recipes-qt/qt4/nativesdk-qt4-tools_4.8.7.bb b/yocto-poky/meta/recipes-qt/qt4/nativesdk-qt4-tools_4.8.7.bb
deleted file mode 100644
index 90ba07c..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/nativesdk-qt4-tools_4.8.7.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require nativesdk-qt4-tools.inc
-
-SRC_URI += "file://0009-qmake-fix-source-file-references-in-qmake.pri.patch"
-
-SRC_URI[md5sum] = "d990ee66bf7ab0c785589776f35ba6ad"
-SRC_URI[sha256sum] = "e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0"
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7.inc b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7.inc
deleted file mode 100644
index d165514..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7.inc
+++ /dev/null
@@ -1,68 +0,0 @@
-LICENSE = "LGPLv2.1 | GPLv3"
-LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
-                    file://LICENSE.GPL3;md5=6e1694ee338db410417517884918d4d2 \
-                    file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6"
-
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/qt4-${PV}:"
-
-SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-everywhere-opensource-src-${PV}.tar.gz \
-           file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \
-           file://0004-configure-qmake-is-already-built-in-qt4-tools-native.patch \
-           file://0008-qmake.pro-Allow-building-a-separate-qmake-for-the-ta.patch \
-           file://0009-qmake-fix-source-file-references-in-qmake.pri.patch \
-           file://0010-configure-Hack-to-not-use-the-pg_config-of-the-host-.patch \
-           file://0011-freetype-host-includes.patch \
-           file://0012-Add-2bpp-support.patch \
-           file://0013-configure-add-crossarch-option.patch \
-           file://0014-translations-fix-phony-translation-linking-error.patch \
-           file://0015-configure-add-nostrip-for-debug-packages.patch \
-           file://0016-configure-eval-QMAKE_CXX.patch \
-           file://0017-configure-ensure-we-identify-the-compiler-as-g-in-co.patch \
-           file://0018-configure-make-pulseaudio-a-configurable-option.patch \
-           file://0019-Fixes-for-gcc-4.7.0-particularly-on-qemux86.patch \
-           file://0027-tools.pro-disable-qmeegographicssystemhelper.patch \
-           file://0030-aarch64_arm64_qatomic_support.patch \
-           file://0031-aarch64_arm64_mkspecs.patch \
-           file://0032-aarch64_add_header.patch \
-           file://0034-Fix-kmap2qmap-build-with-clang.patch \
-           file://Fix-QWSLock-invalid-argument-logs.patch \
-           file://add_check_for_aarch64_32.patch \
-           file://g++.conf \
-           file://linux.conf \
-           "
-
-SRC_URI[md5sum] = "d990ee66bf7ab0c785589776f35ba6ad"
-SRC_URI[sha256sum] = "e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0"
-
-S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
-
-# disable webkit for mips64 n32 temporarily that fails to compile,
-# qt upstream defect:
-# https://bugreports.qt-project.org/browse/QTBUG-39224
-QT_CONFIG_FLAGS_append_mips64n32 = " -no-webkit"
-
-# disable webkit for aarch64 temporarily that fails to compile
-QT_CONFIG_FLAGS_append_aarch64 = " -no-webkit"
-
-FILES_${QT_BASE_NAME}-tools_append     = " ${bindir}/qml ${bindir}/qmlplugindump"
-FILES_${QT_BASE_NAME}-tools-dbg_append = " ${bindir}/.debug/qml ${bindir}/.debug/qmlplugindump"
-
-PACKAGES_append = " ${QT_BASE_NAME}-tests-dbg ${QT_BASE_NAME}-tests"
-FILES_${QT_BASE_NAME}-tests-dbg        = "${prefix}/tests/qt4/*/.debug"
-FILES_${QT_BASE_NAME}-tests            = "${prefix}/tests/qt4/*"
-
-do_configure_prepend() {
-    sed -i 's:qtPrepareTool(LRELEASE, lrelease):LRELEASE = ${OE_QMAKE_LRELEASE}:g' \
-        ${S}/translations/translations.pro
-
-    sed -i \
-    -e /QMAKE_MOC\ /d \
-    -e /QMAKE_UIC\ /d \
-    -e /QMAKE_UIC3\ /d \
-    -e /QMAKE_RCC\ /d \
-    ${S}/configure
-
-    # Avoid problems with Qt 4.8.0 configure setting QMAKE_LINK from LD (since we want the linker to be g++)
-    unset LD
-}
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
deleted file mode 100644
index d8b0a09..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 55097d27e8b746b3d5ff437939caf1fa43c0d62b Mon Sep 17 00:00:00 2001
-From: Holger Freyther <zecke@selfish.org>
-Date: Wed, 26 Sep 2012 17:22:30 +0200
-Subject: [PATCH 01/21] qlibraryinfo: allow to set qt.conf from the outside
- using the environment
-
-Allow to set a qt.conf from the outside using the environment. This allows
-to inject new prefixes and other paths into qmake. This is needed when using
-the same qmake binary to build qt/x11 and qt/embedded
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/corelib/global/qlibraryinfo.cpp | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp
-index 180dc39..4adad35 100644
---- a/src/corelib/global/qlibraryinfo.cpp
-+++ b/src/corelib/global/qlibraryinfo.cpp
-@@ -54,6 +54,7 @@
- QT_BEGIN_NAMESPACE
- extern QString qmake_libraryInfoFile();
- QT_END_NAMESPACE
-+#include <stdlib.h>
- #else
- # include "qcoreapplication.h"
- #endif
-@@ -112,6 +113,10 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
- #ifdef BOOTSTRAPPING
-     if(!QFile::exists(qtconfig))
-         qtconfig = qmake_libraryInfoFile();
-+    if (!QFile::exists(qtconfig)) {
-+        QByteArray config = getenv("QT_CONF_PATH");
-+        qtconfig = QFile::decodeName(config);
-+    }
- #else
-     if (!QFile::exists(qtconfig) && QCoreApplication::instance()) {
- #ifdef Q_OS_MAC
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch
deleted file mode 100644
index 98fc887..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 5e6b1051afa3099a02a758b0596236759d70670e Mon Sep 17 00:00:00 2001
-From: Wenzong Fan <wenzong.fan@windriver.com>
-Date: Wed, 26 Sep 2012 20:18:08 +0200
-Subject: [PATCH 02/21] qkbdtty_qws: fix build with old kernel headers
-
-This issue is that with C++ compiler process an old version of kernel
-header file, coincidently that file has a variable named 'new':
-
-* 'embedded/qkbdtty_qws.cpp' include 'linux/vt.h';
-* '/usr/include/linux/vt.h' has below code on SLED-11.x:
-    + unsigned int new;
-
-On mostly hosts it has been changed to: new -> newev.
-
-Upstream-Status: Pending
-
-Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/gui/embedded/qkbdtty_qws.cpp | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/src/gui/embedded/qkbdtty_qws.cpp b/src/gui/embedded/qkbdtty_qws.cpp
-index a46811b..762138f 100644
---- a/src/gui/embedded/qkbdtty_qws.cpp
-+++ b/src/gui/embedded/qkbdtty_qws.cpp
-@@ -54,8 +54,20 @@
- 
- #if defined Q_OS_LINUX
- #  include <linux/kd.h>
-+
-+/* Workaround kernel headers using "new" as variable name. The problem
-+ is specific to SLED-11, other distros use "newev" rather than "new" */
-+#ifdef __cplusplus
-+#warning "workaround kernel headers using new as variable name on SLED 11"
-+#define new newev
-+#endif
-+
- #  include <linux/vt.h> //TODO: move vt handling somewhere else (QLinuxFbScreen?)
- 
-+#ifdef __cplusplus
-+#undef new
-+#endif
-+
- #  include "qscreen_qws.h"
- #  include "qwindowsystem_qws.h"
- #  include "qapplication.h"
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch
deleted file mode 100644
index ecaea51..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b6805e883c078f7647d9234aca4e3513ebd1c9bf Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Tue, 1 May 2012 07:48:15 +0200
-Subject: [PATCH 03/21] webkit2: set OUTPUT_DIR value if empty
-
-Without this do_configure was trying to create /include/WebCore/libdummy.prl in root of build host filesystem
-now it's in proper place ${WORKDIR}/qt-everywhere-opensource-src-4.8.1/src/3rdparty/webkit/include/WebCore/libdummy.prl
-
-First reported here:
-http://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg24436.html
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro b/src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro
-index 006a88c..5e17193 100644
---- a/src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro
-+++ b/src/3rdparty/webkit/Source/WebKit2/DerivedSources.pro
-@@ -3,6 +3,8 @@ TARGET = dummy
- 
- CONFIG -= debug_and_release
- 
-+isEmpty(OUTPUT_DIR): OUTPUT_DIR = ../..
-+
- CONFIG(standalone_package) {
-     isEmpty(WEBKIT2_GENERATED_SOURCES_DIR):WEBKIT2_GENERATED_SOURCES_DIR = $$PWD/generated
-     isEmpty(WC_GENERATED_SOURCES_DIR):WC_GENERATED_SOURCES_DIR = $$PWD/../WebCore/generated
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0004-configure-qmake-is-already-built-in-qt4-tools-native.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0004-configure-qmake-is-already-built-in-qt4-tools-native.patch
deleted file mode 100644
index 1eb8a58..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0004-configure-qmake-is-already-built-in-qt4-tools-native.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From af699c6e8cf9fb28d6f8b789bf33d53b47edaec7 Mon Sep 17 00:00:00 2001
-From: Michael Krelin <hacker@klever.net>
-Date: Wed, 26 Sep 2012 20:24:20 +0200
-Subject: [PATCH 04/21] configure: qmake is already built in qt4-tools-native,
- so disable it
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index e3d464b..cc04b27 100755
---- a/configure
-+++ b/configure
-@@ -4899,7 +4899,7 @@ setBootstrapVariable()
- }
- 
- # build qmake
--if true; then ###[ '!' -f "$outpath/bin/qmake" ];
-+if false; then ###[ '!' -f "$outpath/bin/qmake" ];
-     echo "Creating qmake. Please wait..."
- 
-     OLD_QCONFIG_H=
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0005-configure-set-LFLAGS-to-pick-up-zlib-from-staging.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0005-configure-set-LFLAGS-to-pick-up-zlib-from-staging.patch
deleted file mode 100644
index 1a8f2b7..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0005-configure-set-LFLAGS-to-pick-up-zlib-from-staging.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ac93237bc90ea7773c0ef5275962baba01d4a9c7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jeremy=20Lain=C3=A9?= <jeremy.laine@m4x.org>
-Date: Wed, 26 Sep 2012 20:27:44 +0200
-Subject: [PATCH 05/21] configure: set LFLAGS to pick up zlib from staging
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index cc04b27..5a7c4ee 100755
---- a/configure
-+++ b/configure
-@@ -690,7 +690,7 @@ fi
- # initalize variables
- #-------------------------------------------------------------------------------
- 
--SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
-+SYSTEM_VARIABLES="RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS LFLAGS"
- for varname in $SYSTEM_VARIABLES; do
-     qmakevarname="${varname}"
-     # use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0006-configure-Use-OE_QMAKE_-values-to-specify-Qt-utility.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0006-configure-Use-OE_QMAKE_-values-to-specify-Qt-utility.patch
deleted file mode 100644
index 90ebf75..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0006-configure-Use-OE_QMAKE_-values-to-specify-Qt-utility.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 0bc0db83812b5900dc4e6ffa96bdeab46b6adcae Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Wed, 26 Sep 2012 20:29:09 +0200
-Subject: [PATCH 06/21] configure: Use OE_QMAKE_* values to specify Qt utility
- paths
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/configure b/configure
-index 5a7c4ee..db4d044 100755
---- a/configure
-+++ b/configure
-@@ -8683,11 +8683,11 @@ QMAKE_ABSOLUTE_SOURCE_ROOT = \$\$QT_SOURCE_TREE
- QMAKE_MOC_SRC    = \$\$QT_BUILD_TREE/src/moc
- 
- #local paths that cannot be queried from the QT_INSTALL_* properties while building QTDIR
--QMAKE_MOC        = \$\$QT_BUILD_TREE/bin/moc
--QMAKE_UIC        = \$\$QT_BUILD_TREE/bin/uic
--QMAKE_UIC3       = \$\$QT_BUILD_TREE/bin/uic3
--QMAKE_RCC        = \$\$QT_BUILD_TREE/bin/rcc
--QMAKE_QDBUSXML2CPP = \$\$QT_BUILD_TREE/bin/qdbusxml2cpp
-+QMAKE_MOC        = \${OE_QMAKE_MOC}
-+QMAKE_UIC        = \${OE_QMAKE_UIC}
-+QMAKE_UIC3       = \${OE_QMAKE_UIC3}
-+QMAKE_RCC        = \${OE_QMAKE_RCC}
-+QMAKE_QDBUSXML2CPP = \${OE_QMAKE_QDBUSXML2CPP}
- QMAKE_INCDIR_QT  = \$\$QT_BUILD_TREE/include
- QMAKE_LIBDIR_QT  = \$\$QT_BUILD_TREE/lib
- 
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch
deleted file mode 100644
index 1d23c92..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0007-dbus-Remove-const-usage-that-causes-compile-failure-.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 2011bb8029480af1d1266f258e5a5f5cef7392d3 Mon Sep 17 00:00:00 2001
-From: Pavel Heimlich <tropikhajma@gmail.com>
-Date: Wed, 26 Sep 2012 20:31:10 +0200
-Subject: [PATCH 07/21] dbus: Remove "const" usage that causes compile failure
- building nativesdk-qt4-tools
-
-Patch has apparently been rejected upstream, not because it is invalid
-but because the submitter did not submit a merge request for it, so the
-validity of the patch upstream is uncertain. For further details see:
-https://bugreports.qt-project.org/browse/QTBUG-17962
-
-Upstream-Status: Denied [possible retry]
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/dbus/qdbusintegrator.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
-index 0f0b647..aa4cbab 100644
---- a/src/dbus/qdbusintegrator.cpp
-+++ b/src/dbus/qdbusintegrator.cpp
-@@ -73,7 +73,7 @@ QT_BEGIN_NAMESPACE
- static bool isDebugging;
- #define qDBusDebug              if (!::isDebugging); else qDebug
- 
--Q_GLOBAL_STATIC_WITH_ARGS(const QString, orgFreedesktopDBusString, (QLatin1String(DBUS_SERVICE_DBUS)))
-+Q_GLOBAL_STATIC_WITH_ARGS(QString, orgFreedesktopDBusString, (QLatin1String(DBUS_SERVICE_DBUS)))
- 
- static inline QString dbusServiceString()
- { return *orgFreedesktopDBusString(); }
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0008-qmake.pro-Allow-building-a-separate-qmake-for-the-ta.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0008-qmake.pro-Allow-building-a-separate-qmake-for-the-ta.patch
deleted file mode 100644
index ec07f41..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0008-qmake.pro-Allow-building-a-separate-qmake-for-the-ta.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 64ce5d0e7c19436b928a2a0d9d192f56be3c9bb2 Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Wed, 26 Sep 2012 20:32:41 +0200
-Subject: [PATCH 08/21] qmake.pro: Allow building a separate qmake for the
- target
-
-Upstream-Status: Inappropriate [config]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- qmake/qmake.pro | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/qmake/qmake.pro b/qmake/qmake.pro
-index 38e0fce..53b1ffb 100644
---- a/qmake/qmake.pro
-+++ b/qmake/qmake.pro
-@@ -7,6 +7,7 @@ CONFIG += console bootstrap
- CONFIG -= qt shared app_bundle uic
- DEFINES += QT_BUILD_QMAKE QT_BOOTSTRAPPED
- DESTDIR = ../bin/
-+TARGET = qmake2
- 
- OBJECTS_DIR = .
- MOC_DIR = .
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0009-qmake-fix-source-file-references-in-qmake.pri.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0009-qmake-fix-source-file-references-in-qmake.pri.patch
deleted file mode 100644
index 45b8c10..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0009-qmake-fix-source-file-references-in-qmake.pri.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From e129dc0d6cde69dd15d1836c4111e0526fc29161 Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Wed, 26 Sep 2012 20:33:49 +0200
-Subject: [PATCH 09/21] qmake: fix source file references in qmake.pri
-
-Fix duplicate entries in SOURCES and HEADERS, and fix the source file
-list for the split of qlocale.cpp.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- qmake/qmake.pri | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/qmake/qmake.pri b/qmake/qmake.pri
-index 31f67f4..9081669 100644
---- a/qmake/qmake.pri
-+++ b/qmake/qmake.pri
-@@ -22,8 +22,7 @@ SOURCES += project.cpp property.cpp main.cpp generators/makefile.cpp \
-            generators/symbian/initprojectdeploy_symbian.cpp \
-            generators/integrity/gbuild.cpp \
-            windows/registry.cpp \
--           symbian/epocroot.cpp \
--           generators/integrity/gbuild.cpp
-+           symbian/epocroot.cpp
- 
- HEADERS += project.h property.h generators/makefile.h \
-            generators/unix/unixmake.h meta.h option.h cachekeys.h \
-@@ -40,8 +39,7 @@ HEADERS += project.h property.h generators/makefile.h \
-            generators/symbian/initprojectdeploy_symbian.h \
-            generators/integrity/gbuild.h \
-            windows/registry_p.h \
--           symbian/epocroot_p.h \
--           generators/integrity/gbuild.h
-+           symbian/epocroot_p.h
- 
- contains(QT_EDITION, OpenSource) {
-    DEFINES += QMAKE_OPENSOURCE_EDITION
-@@ -72,6 +70,8 @@ bootstrap { #Qt code
-         qlist.cpp \
-         qlinkedlist.cpp \
-         qlocale.cpp \
-+        qlocale_tools.cpp \
-+        qlocale_unix.cpp \
-         qmalloc.cpp \
-         qmap.cpp \
-         qmetatype.cpp \
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0010-configure-Hack-to-not-use-the-pg_config-of-the-host-.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0010-configure-Hack-to-not-use-the-pg_config-of-the-host-.patch
deleted file mode 100644
index ca6a0b8..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0010-configure-Hack-to-not-use-the-pg_config-of-the-host-.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 4888791d1899f781af710dd8813887dea52fda59 Mon Sep 17 00:00:00 2001
-From: Holger Freyther <zecke@selfish.org>
-Date: Wed, 26 Sep 2012 20:36:38 +0200
-Subject: [PATCH 10/21] configure: Hack to not use the pg_config of the host
- system which will add /usr/include
-
-pg_config is a native binary so using that when cross compiling
-will always fail.  The commented out fix would do, but for OE
-our -platform and -xplatform is the same so we are actually not
-really cross compiling. Just comment out the test, we are passing
-the location to the postgres headers and if they are okay we
-will pad.
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Update for qt 4.8.7.
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- configure | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/configure b/configure
-index db4d044..35a8fe7 100755
---- a/configure
-+++ b/configure
-@@ -5574,10 +5574,10 @@
-             if [ "$CFG_SQL_psql" != "no" ]; then
-                 [ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config`
-                 # Be careful not to use native pg_config when cross building.
--                if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
--                    QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null`
--                    QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null`
--                fi
-+#                if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
-+#                    QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null`
-+#                    QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null`
-+#                fi
-                 [ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
-                 [ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
-                 # But, respect PSQL_LIBS if set
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0011-freetype-host-includes.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0011-freetype-host-includes.patch
deleted file mode 100644
index e0879c5..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0011-freetype-host-includes.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 3fcffa79e6a5f0448cbfe2bb33fe1218f5dae61d Mon Sep 17 00:00:00 2001
-From: Michael Krelin <hacker@klever.net>
-Date: Mon, 4 Jun 2007 14:48:50 +0200
-Subject: [PATCH 11/21] freetype host includes
-
-Host include path should not be used in cross compiling case.
-
-Ported from OE by: Yu Ke <ke.yu@intel.com>
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- config.tests/unix/freetype/freetype.pri | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/config.tests/unix/freetype/freetype.pri b/config.tests/unix/freetype/freetype.pri
-index 7ef1cf9..b362fcd 100644
---- a/config.tests/unix/freetype/freetype.pri
-+++ b/config.tests/unix/freetype/freetype.pri
-@@ -1,5 +1,5 @@
- !cross_compile {
--    TRY_INCLUDEPATHS = /include /usr/include $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
-+    TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
-     # LSB doesn't allow using headers from /include or /usr/include
-     linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH
-     for(p, TRY_INCLUDEPATHS) {
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0012-Add-2bpp-support.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0012-Add-2bpp-support.patch
deleted file mode 100644
index 8e411f3..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0012-Add-2bpp-support.patch
+++ /dev/null
@@ -1,318 +0,0 @@
-From 8744273fc452eb54bbeeb7d15823009ce926c6fa Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jeremy=20Lain=C3=A9?= <jeremy.laine@m4x.org>
-Date: Wed, 26 Sep 2012 20:39:21 +0200
-Subject: [PATCH 12/21] Add 2bpp support
-
-Submitted upstream but rejected as being "out of scope":
-https://bugreports.qt-project.org/browse/QTBUG-3468
-
-Upstream-Status: Denied
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure                               |   5 +-
- src/gui/embedded/qscreen_qws.cpp        | 211 ++++++++++++++++++++++++++++++++
- src/gui/embedded/qscreenlinuxfb_qws.cpp |   4 +-
- 3 files changed, 216 insertions(+), 4 deletions(-)
-
-diff --git a/configure b/configure
-index 35a8fe7..79c1c7b 100755
---- a/configure
-+++ b/configure
-@@ -7063,6 +7063,7 @@ if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
-     echo "Choose pixel-depths to support:"
-     echo
-     echo "   1. 1bpp, black/white"
-+    echo "   2. 2bpp, grayscale"
-     echo "   4. 4bpp, grayscale"
-     echo "   8. 8bpp, paletted"
-     echo "  12. 12bpp, rgb 4-4-4"
-@@ -7081,11 +7082,11 @@ if [ "$CFG_QWS_DEPTHS" = "prompted" -a "$PROMPT_FOR_DEPTHS" = "yes" ]; then
- fi
- if [ -n "$CFG_QWS_DEPTHS" -a "$PLATFORM_QWS" = "yes" ]; then
-     if [ "$CFG_QWS_DEPTHS" = "all" ]; then
--        CFG_QWS_DEPTHS="1 4 8 12 15 16 18 24 32 generic"
-+        CFG_QWS_DEPTHS="1 2 4 8 12 15 16 18 24 32 generic"
-     fi
-     for D in `echo "$CFG_QWS_DEPTHS" | sed -e 's/,/ /g'`; do
- 	case $D in
--	    1|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
-+	    1|2|4|8|12|15|16|18|24|32) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_$D";;
- 	    generic) QCONFIG_FLAGS="$QCONFIG_FLAGS QT_QWS_DEPTH_GENERIC";;
- 	esac
-     done
-diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp
-index b307bf2..88950b3 100644
---- a/src/gui/embedded/qscreen_qws.cpp
-+++ b/src/gui/embedded/qscreen_qws.cpp
-@@ -469,6 +469,58 @@ static void solidFill_gray4(QScreen *screen, const QColor &color,
- }
- #endif // QT_QWS_DEPTH_4
- 
-+#ifdef QT_QWS_DEPTH_2
-+static inline void qt_rectfill_gray2(quint8 *dest, quint8 value,
-+                                     int x, int y, int width, int height,
-+                                     int stride)
-+{
-+    const int pixelsPerByte = 4;
-+    const int alignWidth = qMin(width, (4 - (x & 3)) & 3);
-+    const int doAlign = (alignWidth > 0 ? 1 : 0);
-+    const int alignStart = pixelsPerByte - 1 - (x & 3);
-+    const int alignStop = alignStart - (alignWidth - 1);
-+    const quint8 alignMask = ((1 << (2 * alignWidth)) - 1) << (2 * alignStop);
-+    const int tailWidth = (width - alignWidth) & 3;
-+    const int doTail = (tailWidth > 0 ? 1 : 0);
-+    const quint8 tailMask = (1 << (2 * (pixelsPerByte - tailWidth))) - 1;
-+    const int width8 = (width - alignWidth) / pixelsPerByte;
-+
-+    dest += y * stride + x / pixelsPerByte;
-+    stride -= (doAlign + width8);
-+
-+    for (int j = 0; j < height; ++j) {
-+        if (doAlign) {
-+            *dest = (*dest & ~alignMask) | (value & alignMask);
-+            ++dest;
-+        }
-+        if (width8) {
-+            qt_memfill<quint8>(dest, value, width8);
-+            dest += width8;
-+        }
-+        if (doTail)
-+            *dest = (*dest & tailMask) | (value & ~tailMask);
-+        dest += stride;
-+    }
-+}
-+
-+static void solidFill_gray2(QScreen *screen, const QColor &color,
-+                            const QRegion &region)
-+{
-+    quint8 *dest = reinterpret_cast<quint8*>(screen->base());
-+    const quint8 c = qGray(color.rgba()) >> 6;
-+    const quint8 c8 = (c << 6) | (c << 4) | (c << 2) | c;
-+
-+    const int stride = screen->linestep();
-+    const QVector<QRect> rects = region.rects();
-+
-+    for (int i = 0; i < rects.size(); ++i) {
-+        const QRect r = rects.at(i);
-+        qt_rectfill_gray2(dest, c8, r.x(), r.y(), r.width(), r.height(),
-+                          stride);
-+    }
-+}
-+#endif // QT_QWS_DEPTH_2
-+
- #ifdef QT_QWS_DEPTH_1
- static inline void qt_rectfill_mono(quint8 *dest, quint8 value,
-                                     int x, int y, int width, int height,
-@@ -576,6 +628,11 @@ void qt_solidFill_setup(QScreen *screen, const QColor &color,
-         screen->d_ptr->solidFill = solidFill_gray4;
-         break;
- #endif
-+#ifdef QT_QWS_DEPTH_2
-+    case 2:
-+        screen->d_ptr->solidFill = solidFill_gray2;
-+        break;
-+#endif
- #ifdef QT_QWS_DEPTH_1
-     case 1:
-         screen->d_ptr->solidFill = solidFill_mono;
-@@ -1006,6 +1063,149 @@ static void blit_4(QScreen *screen, const QImage &image,
- }
- #endif // QT_QWS_DEPTH_4
- 
-+#ifdef QT_QWS_DEPTH_2
-+
-+struct qgray2 { quint8 dummy; } Q_PACKED;
-+
-+template <typename SRC>
-+static inline quint8 qt_convertToGray2(SRC color);
-+
-+template <>
-+inline quint8 qt_convertToGray2(quint32 color)
-+{
-+    return qGray(color) >> 6;
-+}
-+
-+template <>
-+inline quint8 qt_convertToGray2(quint16 color)
-+{
-+    const int r = (color & 0xf800) >> 11;
-+    const int g = (color & 0x07e0) >> 6; // only keep 5 bit
-+    const int b = (color & 0x001f);
-+    return (r * 11 + g * 16 + b * 5) >> 8;
-+}
-+
-+template <>
-+inline quint8 qt_convertToGray2(qrgb444 color)
-+{
-+    return qt_convertToGray2(quint32(color));
-+}
-+
-+template <>
-+inline quint8 qt_convertToGray2(qargb4444 color)
-+{
-+    return qt_convertToGray2(quint32(color));
-+}
-+
-+template <typename SRC>
-+static inline void qt_rectconvert_gray2(qgray2 *dest2, const SRC *src,
-+                                        int x, int y, int width, int height,
-+                                        int dstStride, int srcStride)
-+{
-+    const int pixelsPerByte = 4;
-+    quint8 *dest8 = reinterpret_cast<quint8*>(dest2)
-+                    + y * dstStride + x / pixelsPerByte;
-+    const int alignWidth = qMin(width, (4 - (x & 3)) & 3);
-+    const int doAlign = (alignWidth > 0 ? 1 : 0);
-+    const int alignStart = pixelsPerByte - 1 - (x & 3);
-+    const int alignStop = alignStart - (alignWidth - 1);
-+    const quint8 alignMask = ((1 << (2 * alignWidth)) - 1) << (2 * alignStop);
-+    const int tailWidth = (width - alignWidth) & 3;
-+    const int doTail = (tailWidth > 0 ? 1 : 0);
-+    const quint8 tailMask = (1 << (2 * (pixelsPerByte - tailWidth))) - 1;
-+    const int width8 = (width - alignWidth) / pixelsPerByte;
-+
-+    srcStride = srcStride / sizeof(SRC) - (width8 * pixelsPerByte + alignWidth);
-+    dstStride -= (width8 + doAlign);
-+
-+    for (int j = 0;  j < height; ++j) {
-+        if (doAlign) {
-+            quint8 d = *dest8 & ~alignMask;
-+            for (int i = alignStart; i >= alignStop; --i)
-+                d |= qt_convertToGray2<SRC>(*src++) << (2 * i);
-+            *dest8++ = d;
-+        }
-+        for (int i = 0; i < width8; ++i) {
-+            *dest8 = (qt_convertToGray2<SRC>(src[0]) << 6)
-+                     | (qt_convertToGray2<SRC>(src[1]) << 4)
-+                     | (qt_convertToGray2<SRC>(src[2]) << 2)
-+                     | (qt_convertToGray2<SRC>(src[3]));
-+            src += 4;
-+            ++dest8;
-+        }
-+        if (doTail) {
-+            quint8 d = *dest8 & tailMask;
-+            switch (tailWidth) {
-+            case 3: d |= qt_convertToGray2<SRC>(src[2]) << 2;
-+            case 2: d |= qt_convertToGray2<SRC>(src[1]) << 4;
-+            case 1: d |= qt_convertToGray2<SRC>(src[0]) << 6;
-+            }
-+            *dest8 = d;
-+        }
-+
-+        dest8 += dstStride;
-+        src += srcStride;
-+    }
-+}
-+
-+template <>
-+void qt_rectconvert(qgray2 *dest, const quint32 *src,
-+                    int x, int y, int width, int height,
-+                    int dstStride, int srcStride)
-+{
-+    qt_rectconvert_gray2<quint32>(dest, src, x, y, width, height,
-+                                  dstStride, srcStride);
-+}
-+
-+template <>
-+void qt_rectconvert(qgray2 *dest, const quint16 *src,
-+                    int x, int y, int width, int height,
-+                    int dstStride, int srcStride)
-+{
-+    qt_rectconvert_gray2<quint16>(dest, src, x, y, width, height,
-+                                  dstStride, srcStride);
-+}
-+
-+template <>
-+void qt_rectconvert(qgray2 *dest, const qrgb444 *src,
-+                    int x, int y, int width, int height,
-+                    int dstStride, int srcStride)
-+{
-+    qt_rectconvert_gray2<qrgb444>(dest, src, x, y, width, height,
-+                                  dstStride, srcStride);
-+}
-+
-+template <>
-+void qt_rectconvert(qgray2 *dest, const qargb4444 *src,
-+                    int x, int y, int width, int height,
-+                    int dstStride, int srcStride)
-+{
-+    qt_rectconvert_gray2<qargb4444>(dest, src, x, y, width, height,
-+                                    dstStride, srcStride);
-+}
-+
-+static void blit_2(QScreen *screen, const QImage &image,
-+                   const QPoint &topLeft, const QRegion &region)
-+{
-+    switch (image.format()) {
-+    case QImage::Format_ARGB32_Premultiplied:
-+        blit_template<qgray2, quint32>(screen, image, topLeft, region);
-+        return;
-+    case QImage::Format_RGB16:
-+        blit_template<qgray2, quint16>(screen, image, topLeft, region);
-+        return;
-+    case QImage::Format_RGB444:
-+        blit_template<qgray2, qrgb444>(screen, image, topLeft, region);
-+        return;
-+    case QImage::Format_ARGB4444_Premultiplied:
-+        blit_template<qgray2, qargb4444>(screen, image, topLeft, region);
-+        return;
-+    default:
-+        qCritical("blit_2(): Image format %d not supported!", image.format());
-+    }
-+}
-+#endif // QT_QWS_DEPTH_2
-+
- #ifdef QT_QWS_DEPTH_1
- 
- struct qmono { quint8 dummy; } Q_PACKED;
-@@ -1259,6 +1459,11 @@ void qt_blit_setup(QScreen *screen, const QImage &image,
-         screen->d_ptr->blit = blit_4;
-         break;
- #endif
-+#ifdef QT_QWS_DEPTH_2
-+    case 2:
-+        screen->d_ptr->blit = blit_2;
-+        break;
-+#endif
- #ifdef QT_QWS_DEPTH_1
-     case 1:
-         screen->d_ptr->blit = blit_1;
-@@ -2146,6 +2351,8 @@ int QScreen::alloc(unsigned int r,unsigned int g,unsigned int b)
-         }
-     } else if (d == 4) {
-         ret = qGray(r, g, b) >> 4;
-+    } else if (d == 2) {
-+        ret = qGray(r, g, b) >> 6;
-     } else if (d == 1) {
-         ret = qGray(r, g, b) >= 128;
-     } else {
-@@ -2216,6 +2423,10 @@ bool QScreen::supportsDepth(int d) const
-     } else if(d==1) {
-         return true;
- #endif
-+#ifdef QT_QWS_DEPTH_2
-+    } else if(d==2) {
-+        return true;
-+#endif
- #ifdef QT_QWS_DEPTH_4
-     } else if(d==4) {
-         return true;
-diff --git a/src/gui/embedded/qscreenlinuxfb_qws.cpp b/src/gui/embedded/qscreenlinuxfb_qws.cpp
-index 6f3caad..14159ee 100644
---- a/src/gui/embedded/qscreenlinuxfb_qws.cpp
-+++ b/src/gui/embedded/qscreenlinuxfb_qws.cpp
-@@ -466,8 +466,8 @@ bool QLinuxFbScreen::connect(const QString &displaySpec)
-         setupOffScreen();
- 
-     // Now read in palette
--    if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4)) {
--        screencols= (vinfo.bits_per_pixel==8) ? 256 : 16;
-+    if((vinfo.bits_per_pixel==8) || (vinfo.bits_per_pixel==4) || (vinfo.bits_per_pixel==2)) {
-+        screencols= 1 << vinfo.bits_per_pixel;
-         int loopc;
-         ::fb_cmap startcmap;
-         startcmap.start=0;
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0013-configure-add-crossarch-option.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0013-configure-add-crossarch-option.patch
deleted file mode 100644
index 762cdaf..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0013-configure-add-crossarch-option.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 549342fa380ed2a9ad41be3d04ee2f0585f6a465 Mon Sep 17 00:00:00 2001
-From: Michael Lauer <mickey@vanille-media.de>
-Date: Wed, 26 Sep 2012 20:41:32 +0200
-Subject: [PATCH 13/21] configure: add "-crossarch" option
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Update for qt 4.8.7
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
- configure | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index 4eb4a3d..a4dacec 100755
---- a/configure
-+++ b/configure
-@@ -1160,7 +1160,7 @@ while [ "$#" -gt 0 ]; do
-         shift
-         VAL=$1
-         ;;
--    -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-device-option|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-psql_config|-sysroot)
-+    -prefix|-docdir|-headerdir|-plugindir|-importdir|-datadir|-libdir|-bindir|-translationdir|-sysconfdir|-examplesdir|-demosdir|-depths|-make|-nomake|-platform|-xplatform|-device-option|-buildkey|-sdk|-arch|-host-arch|-mysql_config|-psql_config|-sysroot|-crossarch)
-         VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
-         shift
-         VAL="$1"
-@@ -1719,6 +1719,9 @@ while [ "$#" -gt 0 ]; do
-         DEV_VAL=`echo $VAL | sed "s,^.*=\(.*\),\1,"`
-         DeviceVar set $DEV_VAR $DEV_VAL
-         ;;
-+    crossarch)
-+        CROSSARCH="$VAL"
-+        ;;
-     debug-and-release)
-         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
-             CFG_DEBUG_RELEASE="$VAL"
-@@ -3333,6 +3336,8 @@ arm*)
-     ;;
- esac
- 
-+CFG_ARCH="$CROSSARCH"
-+
- if [ -d "$relpath/src/corelib/arch/$CFG_ARCH" ]; then
-     if [ "$OPT_VERBOSE" = "yes" ]; then
-         echo "    '$CFG_ARCH' is supported"
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0014-translations-fix-phony-translation-linking-error.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0014-translations-fix-phony-translation-linking-error.patch
deleted file mode 100644
index 66724a8..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0014-translations-fix-phony-translation-linking-error.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 21af8f6d21b28a53041affb11b58d6316023fa92 Mon Sep 17 00:00:00 2001
-From: Otavio Salvador <otavio@ossystems.com.br>
-Date: Wed, 26 Sep 2012 20:45:10 +0200
-Subject: [PATCH 14/21] translations: fix phony translation linking error
-
-  | .../usr/lib/crt1.o: In function `_start':
-  | .../../sysdeps/i386/elf/start.S:115: undefined reference to `main'
-  | collect2: ld returned 1 exit status
-
-Upstream-Status: Pending
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- translations/translations.pro | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/translations/translations.pro b/translations/translations.pro
-index dc99beb..0d98829 100644
---- a/translations/translations.pro
-+++ b/translations/translations.pro
-@@ -101,7 +101,7 @@ updateqm.name = LRELEASE ${QMAKE_FILE_IN}
- updateqm.CONFIG += no_link
- QMAKE_EXTRA_COMPILERS += updateqm
- 
--isEmpty(vcproj) {
-+!isEmpty(vcproj) {
-     QMAKE_LINK = @: IGNORE THIS LINE
-     OBJECTS_DIR =
-     win32:CONFIG -= embed_manifest_exe
-@@ -111,7 +111,7 @@ isEmpty(vcproj) {
-     phony_src.input = PHONY_DEPS
-     phony_src.output = phony.c
-     phony_src.variable_out = GENERATED_SOURCES
--    phony_src.commands = echo int main() { return 0; } > phony.c
-+    phony_src.commands = echo \"int main() { return 0; }\" > phony.c
-     phony_src.name = CREATE phony.c
-     phony_src.CONFIG += combine
-     QMAKE_EXTRA_COMPILERS += phony_src
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0015-configure-add-nostrip-for-debug-packages.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0015-configure-add-nostrip-for-debug-packages.patch
deleted file mode 100644
index b5db491..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0015-configure-add-nostrip-for-debug-packages.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 9250fed086a4a8a645a972764a9bf34e4566ec2e Mon Sep 17 00:00:00 2001
-From: Fathi Boudra <fabo@debian.org>
-Date: Wed, 26 Sep 2012 20:46:14 +0200
-Subject: [PATCH 15/21] configure: add nostrip for debug packages
-
-Qt is built in release mode and strip files by default.
-Set CONFIG+=nostrip to avoid the stripping and
-let dh_strip do it to generate debug packages.
-
-Upstream-Status: Inappropriate [Configuration]
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/configure b/configure
-index 7983c3d..d02824b 100755
---- a/configure
-+++ b/configure
-@@ -710,6 +710,8 @@ mkdir -p "$outpath/config.tests"
- rm -f "$outpath/config.tests/.qmake.cache"
- cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
- 
-+QMakeVar add CONFIG nostrip
-+
- QMakeVar add styles "cde mac motif plastique cleanlooks windows"
- QMakeVar add decorations "default windows styled"
- QMakeVar add mouse-drivers "pc"
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0016-configure-eval-QMAKE_CXX.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0016-configure-eval-QMAKE_CXX.patch
deleted file mode 100644
index 9c3de47..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0016-configure-eval-QMAKE_CXX.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 8403634a71f067eec514b6d2193cf41e281dff8e Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Wed, 26 Sep 2012 20:47:08 +0200
-Subject: [PATCH 16/21] configure: eval QMAKE_CXX
-
-Allow expansion of $(...) references in QMAKE_CXX (currently its value
-is $(OE_QMAKE_CXX)) in order to allow compiler version check to succeed
-which allows WebKit to be enabled.
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-Conflicts:
-	configure
----
- configure | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index d02824b..891d6e7 100755
---- a/configure
-+++ b/configure
-@@ -3409,7 +3409,8 @@ else
-     CFG_FRAMEWORK=no
- fi
- 
--QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
-+QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX | sed -n 's/$[(]\([0-9a-zA-Z_]*\)[)]/$\1/pg'`
-+QMAKE_CONF_COMPILER=`eval "echo $QMAKE_CONF_COMPILER"`
- TEST_COMPILER="$CXX"
- 
- [ -z "$TEST_COMPILER" ] && TEST_COMPILER=$QMAKE_CONF_COMPILER
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0017-configure-ensure-we-identify-the-compiler-as-g-in-co.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0017-configure-ensure-we-identify-the-compiler-as-g-in-co.patch
deleted file mode 100644
index 9471966..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0017-configure-ensure-we-identify-the-compiler-as-g-in-co.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From d2bb701b551402f0befddd0e906423596bdc0df7 Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Wed, 26 Sep 2012 20:48:37 +0200
-Subject: [PATCH 17/21] configure: ensure we identify the compiler as g++ in
- configure
-
-Our PLATFORM in OE is ${TARGET_OS}-oe-g++, and previously the configure
-script was interpreting from this that the compiler was "oe-g++" and
-thus
-g++ specific checks were not being run since this string did not match;
-among other things this resulted in a compiler version check in the
-QtWebKit build code not working, and hence the following error at build
-time:
-
-./wtf/NullPtr.h:48:1: error: identifier 'nullptr' will become a keyword
-in C++0x [-Werror=c++0x-compat]
-
-The easiest thing since our PLATFORM is entirely artificial is to just
-force COMPILER to "g++" in the configure script if it is detected as
-"oe-g++".
-
-Upstream-Status: Inappropriate [configuration]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/configure b/configure
-index 891d6e7..7031898 100755
---- a/configure
-+++ b/configure
-@@ -7592,6 +7592,9 @@ elif [ "$XPLATFORM" != "$PLATFORM" ]; then
- else
-     COMPILER=`echo $PLATFORM | cut -f 2- -d-`
- fi
-+case $COMPILER in
-+    *oe-g++) COMPILER="g++" ;;
-+esac
- if [ "$CFG_EXCEPTIONS" = "unspecified" -a "$PLATFORM_QWS" = "yes" ]; then
-     CFG_EXCEPTIONS=no
- fi
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0018-configure-make-pulseaudio-a-configurable-option.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0018-configure-make-pulseaudio-a-configurable-option.patch
deleted file mode 100644
index 19cdd4c..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0018-configure-make-pulseaudio-a-configurable-option.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From d6dc1a7d6594d7e395347732a3e553fc82ccab3d Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Tue, 28 Feb 2012 15:10:24 +0000
-Subject: [PATCH 18/21] configure: make pulseaudio a configurable option
-
-Allows disabling pulseaudio support within phonon at configure time.
-(This is the Qt 4.8.0 version.)
-
-Upstream-Status: Pending
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/configure b/configure
-index 7031898..a4a42f1 100755
---- a/configure
-+++ b/configure
-@@ -1139,7 +1139,7 @@ while [ "$#" -gt 0 ]; do
-         VAL=no
-         ;;
-     #Qt style yes options
--    -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu)
-+    -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-pulseaudio|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-harfbuzz|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-declarative-debug|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles|-icu)
-         VAR=`echo $1 | sed "s,^-\(.*\),\1,"`
-         VAL=yes
-         ;;
-@@ -2120,6 +2120,13 @@ while [ "$#" -gt 0 ]; do
-             UNKNOWN_OPT=yes
-         fi
-         ;;
-+    pulseaudio)
-+        if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
-+            CFG_PULSEAUDIO="$VAL"
-+        else
-+            UNKNOWN_OPT=yes
-+        fi
-+        ;;
-     gtkstyle)
-         if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
-             CFG_QGTKSTYLE="$VAL"
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0019-Fixes-for-gcc-4.7.0-particularly-on-qemux86.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0019-Fixes-for-gcc-4.7.0-particularly-on-qemux86.patch
deleted file mode 100644
index a83d247..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0019-Fixes-for-gcc-4.7.0-particularly-on-qemux86.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 1f1da2f24d3028b250dbc2e98e2b7e37862b3771 Mon Sep 17 00:00:00 2001
-From: Richard Purdie <richard.purdie@linuxfoundation.org>
-Date: Wed, 26 Sep 2012 20:54:38 +0200
-Subject: [PATCH 19/21] Fixes for gcc 4.7.0, particularly on qemux86
-
-Origin: upstream, http://trac.webkit.org/changeset/93631
-Origin: upstream, http://trac.webkit.org/changeset/113848
-
-Bug: https://bugs.webkit.org/show_bug.cgi?id=62168
-Bug: https://bugs.webkit.org/show_bug.cgi?id=83584
-
-RP 2012/04/30
-
-Upstream-Status: Backport
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- src/3rdparty/webkit/Source/WebCore/dom/Element.cpp                      | 2 +-
- src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp            | 2 +-
- .../webkit/Source/WebCore/platform/graphics/TiledBackingStoreClient.h   | 1 +
- 3 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/src/3rdparty/webkit/Source/WebCore/dom/Element.cpp b/src/3rdparty/webkit/Source/WebCore/dom/Element.cpp
-index 32e47ca..b8e7389 100644
---- a/src/3rdparty/webkit/Source/WebCore/dom/Element.cpp
-+++ b/src/3rdparty/webkit/Source/WebCore/dom/Element.cpp
-@@ -1080,7 +1080,7 @@ void Element::recalcStyle(StyleChange change)
- {
-     // Ref currentStyle in case it would otherwise be deleted when setRenderStyle() is called.
-     RefPtr<RenderStyle> currentStyle(renderStyle());
--    bool hasParentStyle = parentNodeForRenderingAndStyle() ? parentNodeForRenderingAndStyle()->renderStyle() : false;
-+    bool hasParentStyle = parentNodeForRenderingAndStyle() ? static_cast<bool>(parentNodeForRenderingAndStyle()->renderStyle()) : false;
-     bool hasDirectAdjacentRules = currentStyle && currentStyle->childrenAffectedByDirectAdjacentRules();
-     bool hasIndirectAdjacentRules = currentStyle && currentStyle->childrenAffectedByForwardPositionalRules();
- 
-diff --git a/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp b/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp
-index d66075e..ab8f111 100644
---- a/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp
-+++ b/src/3rdparty/webkit/Source/WebCore/html/HTMLImageElement.cpp
-@@ -74,7 +74,7 @@ PassRefPtr<HTMLImageElement> HTMLImageElement::createForJSConstructor(Document*
-     RefPtr<HTMLImageElement> image = adoptRef(new HTMLImageElement(imgTag, document));
-     if (optionalWidth)
-         image->setWidth(*optionalWidth);
--    if (optionalHeight > 0)
-+    if (optionalHeight)
-         image->setHeight(*optionalHeight);
-     return image.release();
- }
-diff --git a/src/3rdparty/webkit/Source/WebCore/platform/graphics/TiledBackingStoreClient.h b/src/3rdparty/webkit/Source/WebCore/platform/graphics/TiledBackingStoreClient.h
-index 6087ec3..6d748f6 100644
---- a/src/3rdparty/webkit/Source/WebCore/platform/graphics/TiledBackingStoreClient.h
-+++ b/src/3rdparty/webkit/Source/WebCore/platform/graphics/TiledBackingStoreClient.h
-@@ -25,6 +25,7 @@ namespace WebCore {
- #if ENABLE(TILED_BACKING_STORE)
- class TiledBackingStoreClient {
- public:
-+    virtual ~TiledBackingStoreClient() { }
-     virtual void tiledBackingStorePaintBegin() = 0;
-     virtual void tiledBackingStorePaint(GraphicsContext*, const IntRect&) = 0;
-     virtual void tiledBackingStorePaintEnd(const Vector<IntRect>& paintedArea) = 0;
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0021-configure-make-qt4-native-work-with-long-building-pa.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0021-configure-make-qt4-native-work-with-long-building-pa.patch
deleted file mode 100644
index dbc9022..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0021-configure-make-qt4-native-work-with-long-building-pa.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 6742ac7ea6fd1e9c82ecb5305f84e721242f857d Mon Sep 17 00:00:00 2001
-From: Chen Qi <Qi.Chen@windriver.com>
-Date: Wed, 5 Dec 2012 07:48:15 +0200
-Subject: [PATCH 21/21] configure: make qt4-native work with long building
- path.
-
-Upstream-Status: Submitted
-
-Reference: https://bugreports.qt-project.org/browse/QTBUG-28292
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- configure | 52 ++++++++++++++++++++++++++--------------------------
- 1 file changed, 26 insertions(+), 26 deletions(-)
-
-diff --git a/configure b/configure
-index a4a42f1..2358563 100755
---- a/configure
-+++ b/configure
-@@ -4779,8 +4779,8 @@ DEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INST
- TODAY=`date +%Y-%m-%d`
- cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
- /* License Info */
--static const char qt_configure_licensee_str          [256 + 12] = "$LICENSE_USER_STR";
--static const char qt_configure_licensed_products_str [256 + 12] = "$LICENSE_PRODUCTS_STR";
-+static const char qt_configure_licensee_str          [512 + 12] = "$LICENSE_USER_STR";
-+static const char qt_configure_licensed_products_str [512 + 12] = "$LICENSE_PRODUCTS_STR";
- 
- /* Installation date */
- static const char qt_configure_installation          [12+11]    = "qt_instdate=$TODAY";
-@@ -4805,36 +4805,36 @@ if [ ! -z "$QT_HOST_PREFIX" ]; then
- 
- #if defined(QT_BOOTSTRAPPED) || defined(QT_BUILD_QMAKE)
- /* Installation Info */
--static const char qt_configure_prefix_path_str       [256 + 12] = "$HOSTPREFIX_PATH_STR";
--static const char qt_configure_documentation_path_str[256 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
--static const char qt_configure_headers_path_str      [256 + 12] = "$HOSTHEADERS_PATH_STR";
--static const char qt_configure_libraries_path_str    [256 + 12] = "$HOSTLIBRARIES_PATH_STR";
--static const char qt_configure_binaries_path_str     [256 + 12] = "$HOSTBINARIES_PATH_STR";
--static const char qt_configure_plugins_path_str      [256 + 12] = "$HOSTPLUGINS_PATH_STR";
--static const char qt_configure_imports_path_str      [256 + 12] = "$HOSTIMPORTS_PATH_STR";
--static const char qt_configure_data_path_str         [256 + 12] = "$HOSTDATA_PATH_STR";
--static const char qt_configure_translations_path_str [256 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
--static const char qt_configure_settings_path_str     [256 + 12] = "$HOSTSETTINGS_PATH_STR";
--static const char qt_configure_examples_path_str     [256 + 12] = "$HOSTEXAMPLES_PATH_STR";
--static const char qt_configure_demos_path_str        [256 + 12] = "$HOSTDEMOS_PATH_STR";
-+static const char qt_configure_prefix_path_str       [512 + 12] = "$HOSTPREFIX_PATH_STR";
-+static const char qt_configure_documentation_path_str[512 + 12] = "$HOSTDOCUMENTATION_PATH_STR";
-+static const char qt_configure_headers_path_str      [512 + 12] = "$HOSTHEADERS_PATH_STR";
-+static const char qt_configure_libraries_path_str    [512 + 12] = "$HOSTLIBRARIES_PATH_STR";
-+static const char qt_configure_binaries_path_str     [512 + 12] = "$HOSTBINARIES_PATH_STR";
-+static const char qt_configure_plugins_path_str      [512 + 12] = "$HOSTPLUGINS_PATH_STR";
-+static const char qt_configure_imports_path_str      [512 + 12] = "$HOSTIMPORTS_PATH_STR";
-+static const char qt_configure_data_path_str         [512 + 12] = "$HOSTDATA_PATH_STR";
-+static const char qt_configure_translations_path_str [512 + 12] = "$HOSTTRANSLATIONS_PATH_STR";
-+static const char qt_configure_settings_path_str     [512 + 12] = "$HOSTSETTINGS_PATH_STR";
-+static const char qt_configure_examples_path_str     [512 + 12] = "$HOSTEXAMPLES_PATH_STR";
-+static const char qt_configure_demos_path_str        [512 + 12] = "$HOSTDEMOS_PATH_STR";
- #else // QT_BOOTSTRAPPED
- EOF
- fi
- 
- cat >> "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
- /* Installation Info */
--static const char qt_configure_prefix_path_str       [256 + 12] = "$PREFIX_PATH_STR";
--static const char qt_configure_documentation_path_str[256 + 12] = "$DOCUMENTATION_PATH_STR";
--static const char qt_configure_headers_path_str      [256 + 12] = "$HEADERS_PATH_STR";
--static const char qt_configure_libraries_path_str    [256 + 12] = "$LIBRARIES_PATH_STR";
--static const char qt_configure_binaries_path_str     [256 + 12] = "$BINARIES_PATH_STR";
--static const char qt_configure_plugins_path_str      [256 + 12] = "$PLUGINS_PATH_STR";
--static const char qt_configure_imports_path_str      [256 + 12] = "$IMPORTS_PATH_STR";
--static const char qt_configure_data_path_str         [256 + 12] = "$DATA_PATH_STR";
--static const char qt_configure_translations_path_str [256 + 12] = "$TRANSLATIONS_PATH_STR";
--static const char qt_configure_settings_path_str     [256 + 12] = "$SETTINGS_PATH_STR";
--static const char qt_configure_examples_path_str     [256 + 12] = "$EXAMPLES_PATH_STR";
--static const char qt_configure_demos_path_str        [256 + 12] = "$DEMOS_PATH_STR";
-+static const char qt_configure_prefix_path_str       [512 + 12] = "$PREFIX_PATH_STR";
-+static const char qt_configure_documentation_path_str[512 + 12] = "$DOCUMENTATION_PATH_STR";
-+static const char qt_configure_headers_path_str      [512 + 12] = "$HEADERS_PATH_STR";
-+static const char qt_configure_libraries_path_str    [512 + 12] = "$LIBRARIES_PATH_STR";
-+static const char qt_configure_binaries_path_str     [512 + 12] = "$BINARIES_PATH_STR";
-+static const char qt_configure_plugins_path_str      [512 + 12] = "$PLUGINS_PATH_STR";
-+static const char qt_configure_imports_path_str      [512 + 12] = "$IMPORTS_PATH_STR";
-+static const char qt_configure_data_path_str         [512 + 12] = "$DATA_PATH_STR";
-+static const char qt_configure_translations_path_str [512 + 12] = "$TRANSLATIONS_PATH_STR";
-+static const char qt_configure_settings_path_str     [512 + 12] = "$SETTINGS_PATH_STR";
-+static const char qt_configure_examples_path_str     [512 + 12] = "$EXAMPLES_PATH_STR";
-+static const char qt_configure_demos_path_str        [512 + 12] = "$DEMOS_PATH_STR";
- EOF
- 
- if [ ! -z "$QT_HOST_PREFIX" ]; then
--- 
-1.8.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0027-tools.pro-disable-qmeegographicssystemhelper.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0027-tools.pro-disable-qmeegographicssystemhelper.patch
deleted file mode 100644
index 6e30aee..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0027-tools.pro-disable-qmeegographicssystemhelper.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 0460e2a5f13aaf0081c3c9fec89280046842ddbb Mon Sep 17 00:00:00 2001
-From: Paul Eggleton <paul.eggleton@linux.intel.com>
-Date: Wed, 3 Jul 2013 17:48:30 +0100
-Subject: [PATCH] tools.pro: disable qmeegographicssystemhelper
-
-We don't want this enabled just because we have EGL and OpenGL ES 2.0
-enabled.
-
-Upstream-Status: Inappropriate [config]
-
-Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
----
- tools/tools.pro | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/tools.pro b/tools/tools.pro
-index 0e27053..2d3f36d 100644
---- a/tools/tools.pro
-+++ b/tools/tools.pro
-@@ -49,4 +49,4 @@ QTDIR_build:REQUIRES = "contains(QT_CONFIG, full-config)"
- 
- !win32:!embedded:!mac:!symbian:CONFIG += x11
- 
--x11:contains(QT_CONFIG, opengles2):contains(QT_CONFIG, egl):SUBDIRS += qmeegographicssystemhelper
-+#x11:contains(QT_CONFIG, opengles2):contains(QT_CONFIG, egl):SUBDIRS += qmeegographicssystemhelper
--- 
-1.8.1.2
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0030-aarch64_arm64_qatomic_support.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0030-aarch64_arm64_qatomic_support.patch
deleted file mode 100644
index ba4c2a6..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0030-aarch64_arm64_qatomic_support.patch
+++ /dev/null
@@ -1,491 +0,0 @@
-From 294010b562c9846bb2bc4ee9c63ff78adc7c1f4f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
- <perezmeyer@gmail.com>
-Date: Sat, 15 Mar 2014 15:40:49 -0300
-Subject: [PATCH] Add qatomic support for AArch64 (aka arm64).
-
-Patch by Mark Salter <msalter@redhat.com>
-licensed under BSD:
-
-<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#195>
-
-This patch is known to not be the most correct way
-to implement them, as it seems to be possible to do it in a faster way,
-but should work non the less until we can provide something better.
-
-Change-Id: Ib392b27dc54691fd4c2ea9896240ad71fb8128cc
-
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
----
- src/corelib/arch/aarch64/arch.pri            |   4 +
- src/corelib/arch/aarch64/qatomic_aarch64.cpp |  70 ++++++
- src/corelib/arch/arch.pri                    |   4 +-
- src/corelib/arch/qatomic_aarch64.h           | 335 +++++++++++++++++++++++++++
- src/corelib/arch/qatomic_arch.h              |   2 +
- 5 files changed, 414 insertions(+), 1 deletion(-)
- create mode 100644 src/corelib/arch/aarch64/arch.pri
- create mode 100644 src/corelib/arch/aarch64/qatomic_aarch64.cpp
- create mode 100644 src/corelib/arch/qatomic_aarch64.h
-
-diff --git a/src/corelib/arch/aarch64/arch.pri b/src/corelib/arch/aarch64/arch.pri
-new file mode 100644
-index 0000000..63523d9
---- /dev/null
-+++ b/src/corelib/arch/aarch64/arch.pri
-@@ -0,0 +1,4 @@
-+#
-+# AArch64 architecture
-+#
-+SOURCES += $$QT_ARCH_CPP/qatomic_aarch64.cpp
-diff --git a/src/corelib/arch/aarch64/qatomic_aarch64.cpp b/src/corelib/arch/aarch64/qatomic_aarch64.cpp
-new file mode 100644
-index 0000000..fc851b9
---- /dev/null
-+++ b/src/corelib/arch/aarch64/qatomic_aarch64.cpp
-@@ -0,0 +1,70 @@
-+/****************************************************************************
-+**
-+** Copyright (C) 2012, 2013 Digia Plc and/or its subsidiary(-ies).
-+** Contact: http://www.qt-project.org/legal
-+**
-+** This file is part of the QtCore module of the Qt Toolkit.
-+**
-+** $QT_BEGIN_LICENSE:LGPL$
-+** Commercial License Usage
-+** Licensees holding valid commercial Qt licenses may use this file in
-+** accordance with the commercial license agreement provided with the
-+** Software or, alternatively, in accordance with the terms contained in
-+** a written agreement between you and Digia.  For licensing terms and
-+** conditions see http://qt.digia.com/licensing.  For further information
-+** use the contact form at http://qt.digia.com/contact-us.
-+**
-+** GNU Lesser General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU Lesser
-+** General Public License version 2.1 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.LGPL included in the
-+** packaging of this file.  Please review the following information to
-+** ensure the GNU Lesser General Public License version 2.1 requirements
-+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-+**
-+** In addition, as a special exception, Digia gives you certain additional
-+** rights.  These rights are described in the Digia Qt LGPL Exception
-+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-+**
-+** GNU General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU
-+** General Public License version 3.0 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.GPL included in the
-+** packaging of this file.  Please review the following information to
-+** ensure the GNU General Public License version 3.0 requirements will be
-+** met: http://www.gnu.org/copyleft/gpl.html.
-+**
-+**
-+** $QT_END_LICENSE$
-+**
-+****************************************************************************/
-+
-+#include <QtCore/qglobal.h>
-+
-+#include <unistd.h>
-+#ifdef _POSIX_PRIORITY_SCHEDULING
-+# include <sched.h>
-+#endif
-+#include <time.h>
-+
-+QT_BEGIN_NAMESPACE
-+
-+QT_USE_NAMESPACE
-+
-+Q_CORE_EXPORT void qt_atomic_yield(int *count)
-+{
-+#ifdef _POSIX_PRIORITY_SCHEDULING
-+    if ((*count)++ < 50) {
-+        sched_yield();
-+    } else
-+#endif
-+    {
-+        struct timespec tm;
-+        tm.tv_sec = 0;
-+        tm.tv_nsec = 2000001;
-+        nanosleep(&tm, NULL);
-+        *count = 0;
-+    }
-+}
-+
-+QT_END_NAMESPACE
-diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri
-index cd23e5e..f50fca7 100644
---- a/src/corelib/arch/arch.pri
-+++ b/src/corelib/arch/arch.pri
-@@ -31,7 +31,9 @@ integrity:HEADERS += arch/qatomic_integrity.h
-                        arch/qatomic_s390.h \
-                        arch/qatomic_x86_64.h \
-                        arch/qatomic_sh.h \
--                       arch/qatomic_sh4a.h
-+                       arch/qatomic_sh4a.h \
-+                       arch/qatomic_aarch64.h \
-+
- 
- QT_ARCH_CPP = $$QT_SOURCE_TREE/src/corelib/arch/$$QT_ARCH
- DEPENDPATH += $$QT_ARCH_CPP
-diff --git a/src/corelib/arch/qatomic_aarch64.h b/src/corelib/arch/qatomic_aarch64.h
-new file mode 100644
-index 0000000..de61ca8
---- /dev/null
-+++ b/src/corelib/arch/qatomic_aarch64.h
-@@ -0,0 +1,335 @@
-+/****************************************************************************
-+**
-+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-+** Contact: http://www.qt-project.org/legal
-+**
-+** This file is part of the QtCore module of the Qt Toolkit.
-+**
-+** $QT_BEGIN_LICENSE:LGPL$
-+** Commercial License Usage
-+** Licensees holding valid commercial Qt licenses may use this file in
-+** accordance with the commercial license agreement provided with the
-+** Software or, alternatively, in accordance with the terms contained in
-+** a written agreement between you and Digia.  For licensing terms and
-+** conditions see http://qt.digia.com/licensing.  For further information
-+** use the contact form at http://qt.digia.com/contact-us.
-+**
-+** GNU Lesser General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU Lesser
-+** General Public License version 2.1 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.LGPL included in the
-+** packaging of this file.  Please review the following information to
-+** ensure the GNU Lesser General Public License version 2.1 requirements
-+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-+**
-+** In addition, as a special exception, Digia gives you certain additional
-+** rights.  These rights are described in the Digia Qt LGPL Exception
-+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-+**
-+** GNU General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU
-+** General Public License version 3.0 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.GPL included in the
-+** packaging of this file.  Please review the following information to
-+** ensure the GNU General Public License version 3.0 requirements will be
-+** met: http://www.gnu.org/copyleft/gpl.html.
-+**
-+**
-+** $QT_END_LICENSE$
-+**
-+****************************************************************************/
-+
-+#ifndef QATOMIC_AARCH64_H
-+#define QATOMIC_AARCH64_H
-+
-+QT_BEGIN_HEADER
-+
-+QT_BEGIN_NAMESPACE
-+
-+#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_ALWAYS_NATIVE
-+
-+inline bool QBasicAtomicInt::isReferenceCountingNative()
-+{ return true; }
-+inline bool QBasicAtomicInt::isReferenceCountingWaitFree()
-+{ return false; }
-+
-+#define Q_ATOMIC_INT_TEST_AND_SET_IS_ALWAYS_NATIVE
-+
-+inline bool QBasicAtomicInt::isTestAndSetNative()
-+{ return true; }
-+inline bool QBasicAtomicInt::isTestAndSetWaitFree()
-+{ return false; }
-+
-+#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE
-+
-+inline bool QBasicAtomicInt::isFetchAndStoreNative()
-+{ return true; }
-+inline bool QBasicAtomicInt::isFetchAndStoreWaitFree()
-+{ return false; }
-+
-+#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_ALWAYS_NATIVE
-+
-+inline bool QBasicAtomicInt::isFetchAndAddNative()
-+{ return true; }
-+inline bool QBasicAtomicInt::isFetchAndAddWaitFree()
-+{ return false; }
-+
-+#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_ALWAYS_NATIVE
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetNative()
-+{ return true; }
-+template <typename T>
-+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetWaitFree()
-+{ return false; }
-+
-+#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreNative()
-+{ return true; }
-+template <typename T>
-+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree()
-+{ return false; }
-+
-+#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_ALWAYS_NATIVE
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddNative()
-+{ return true; }
-+template <typename T>
-+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
-+{ return false; }
-+
-+#ifndef Q_DATA_MEMORY_BARRIER
-+# define Q_DATA_MEMORY_BARRIER asm volatile("dmb sy\n":::"memory")
-+#endif
-+#ifndef Q_COMPILER_MEMORY_BARRIER
-+# define Q_COMPILER_MEMORY_BARRIER asm volatile("":::"memory")
-+#endif
-+
-+inline bool QBasicAtomicInt::ref()
-+{
-+    int newValue;
-+
-+    Q_COMPILER_MEMORY_BARRIER;
-+    newValue = __atomic_add_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
-+    Q_COMPILER_MEMORY_BARRIER;
-+
-+    return newValue != 0;
-+}
-+
-+inline bool QBasicAtomicInt::deref()
-+{
-+    int newValue;
-+
-+    Q_COMPILER_MEMORY_BARRIER;
-+    newValue = __atomic_sub_fetch(&_q_value, 1, __ATOMIC_ACQ_REL);
-+    Q_COMPILER_MEMORY_BARRIER;
-+
-+    return newValue != 0;
-+}
-+
-+inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
-+{
-+    bool val;
-+
-+    Q_COMPILER_MEMORY_BARRIER;
-+    val =  __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
-+                                        false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return val;
-+}
-+
-+inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
-+{
-+    int val;
-+    Q_COMPILER_MEMORY_BARRIER;
-+    val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return val;
-+}
-+
-+inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
-+{
-+    int val;
-+    Q_COMPILER_MEMORY_BARRIER;
-+    val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return val;
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
-+{
-+    bool val;
-+    Q_COMPILER_MEMORY_BARRIER;
-+    val =  __atomic_compare_exchange_n (&_q_value, &expectedValue, newValue,
-+                                        false, __ATOMIC_RELAXED, __ATOMIC_RELAXED);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return val;
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
-+{
-+    T *val;
-+    Q_COMPILER_MEMORY_BARRIER;
-+    val = __atomic_exchange_n(&_q_value, newValue, __ATOMIC_RELAXED);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return val;
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
-+{
-+    T *val;
-+    Q_COMPILER_MEMORY_BARRIER;
-+    val = __atomic_fetch_add(&_q_value, valueToAdd, __ATOMIC_RELAXED);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return val;
-+}
-+
-+inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
-+{
-+    bool returnValue = testAndSetRelaxed(expectedValue, newValue);
-+    Q_DATA_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    return testAndSetRelaxed(expectedValue, newValue);
-+}
-+
-+inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    bool returnValue = testAndSetRelaxed(expectedValue, newValue);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
-+{
-+    int returnValue = fetchAndStoreRelaxed(newValue);
-+    Q_DATA_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    return fetchAndStoreRelaxed(newValue);
-+}
-+
-+inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    int returnValue = fetchAndStoreRelaxed(newValue);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
-+{
-+    int returnValue = fetchAndAddRelaxed(valueToAdd);
-+    Q_DATA_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    return fetchAndAddRelaxed(valueToAdd);
-+}
-+
-+inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    int returnValue = fetchAndAddRelaxed(valueToAdd);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
-+{
-+    bool returnValue = testAndSetRelaxed(expectedValue, newValue);
-+    Q_DATA_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    return testAndSetRelaxed(expectedValue, newValue);
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    bool returnValue = testAndSetAcquire(expectedValue, newValue);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
-+{
-+    T *returnValue = fetchAndStoreRelaxed(newValue);
-+    Q_DATA_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    return fetchAndStoreRelaxed(newValue);
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    T *returnValue = fetchAndStoreRelaxed(newValue);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd)
-+{
-+    T *returnValue = fetchAndAddRelaxed(valueToAdd);
-+    Q_DATA_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    return fetchAndAddRelaxed(valueToAdd);
-+}
-+
-+template <typename T>
-+Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd)
-+{
-+    Q_DATA_MEMORY_BARRIER;
-+    T *returnValue = fetchAndAddRelaxed(valueToAdd);
-+    Q_COMPILER_MEMORY_BARRIER;
-+    return returnValue;
-+}
-+
-+#undef Q_DATA_MEMORY_BARRIER
-+#undef Q_COMPILER_MEMORY_BARRIER
-+
-+QT_END_NAMESPACE
-+
-+QT_END_HEADER
-+
-+#endif // QATOMIC_AARCH64_H
-diff --git a/src/corelib/arch/qatomic_arch.h b/src/corelib/arch/qatomic_arch.h
-index 141726c..3e96926 100644
---- a/src/corelib/arch/qatomic_arch.h
-+++ b/src/corelib/arch/qatomic_arch.h
-@@ -94,6 +94,8 @@ QT_BEGIN_HEADER
- #  include "QtCore/qatomic_sh4a.h"
- #elif defined(QT_ARCH_NACL)
- #  include "QtCore/qatomic_generic.h"
-+#elif defined(QT_ARCH_AARCH64)
-+#  include "QtCore/qatomic_aarch64.h"
- #else
- #  error "Qt has not been ported to this architecture"
- #endif
--- 
-2.1.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0031-aarch64_arm64_mkspecs.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0031-aarch64_arm64_mkspecs.patch
deleted file mode 100644
index a01e7ad..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0031-aarch64_arm64_mkspecs.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 7090fc80ff630712a90de92403190f647dd38a39 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lisandro=20Dami=C3=A1n=20Nicanor=20P=C3=A9rez=20Meyer?=
- <perezmeyer@gmail.com>
-Date: Sat, 15 Mar 2014 15:35:00 -0300
-Subject: [PATCH] mkspecs for AArch64 (aka arm64).
-
-Patch by Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
-licensed under either Public Domain or BSD:
-
-<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=735488#179>
-
-Change-Id: I21f17953234cfb176bac023e52ecdc927fc5c1a9
-
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
-
----
- configure                                 |  3 +++
- mkspecs/linux-g++-aarch64/qmake.conf      | 27 ++++++++++++++++++++
- mkspecs/linux-g++-aarch64/qplatformdefs.h | 42 +++++++++++++++++++++++++++++++
- 3 files changed, 72 insertions(+)
- create mode 100644 mkspecs/linux-g++-aarch64/qmake.conf
- create mode 100644 mkspecs/linux-g++-aarch64/qplatformdefs.h
-
-diff --git a/configure b/configure
-index a9ba7c8..e57d053 100755
---- a/configure
-+++ b/configure
-@@ -2808,6 +2808,9 @@ if [ "$CFG_EMBEDDED" != "no" ]; then
-             *86_64)
-                 PLATFORM=qws/linux-x86_64-g++
-                 ;;
-+            aarch64)
-+                PLATFORM=linux-aarch64-g++
-+                ;;
-             *)
-                 PLATFORM=qws/linux-generic-g++
-                 ;;
-diff --git a/mkspecs/linux-g++-aarch64/qmake.conf b/mkspecs/linux-g++-aarch64/qmake.conf
-new file mode 100644
-index 0000000..ebc0a92
---- /dev/null
-+++ b/mkspecs/linux-g++-aarch64/qmake.conf
-@@ -0,0 +1,27 @@
-+#
-+# qmake configuration for linux-g++
-+#
-+# Written for GNU/Linux platforms that have both lib and lib64 directories,
-+# like the AMD Opteron.
-+#
-+
-+MAKEFILE_GENERATOR    = UNIX
-+TARGET_PLATFORM       = unix
-+TEMPLATE              = app
-+CONFIG               += qt warn_on release incremental link_prl gdb_dwarf_index
-+QT                   += core gui
-+QMAKE_INCREMENTAL_STYLE = sublib
-+
-+QMAKE_CFLAGS     =
-+QMAKE_LFLAGS     =
-+
-+QMAKE_CFLAGS_RELEASE   += -O2
-+
-+include(../common/linux.conf)
-+include(../common/gcc-base-unix.conf)
-+include(../common/g++-unix.conf)
-+
-+QMAKE_LIBDIR_X11      = /usr/X11R6/lib64
-+QMAKE_LIBDIR_OPENGL   = /usr/X11R6/lib64
-+
-+load(qt_config)
-diff --git a/mkspecs/linux-g++-aarch64/qplatformdefs.h b/mkspecs/linux-g++-aarch64/qplatformdefs.h
-new file mode 100644
-index 0000000..562128b
---- /dev/null
-+++ b/mkspecs/linux-g++-aarch64/qplatformdefs.h
-@@ -0,0 +1,42 @@
-+/****************************************************************************
-+**
-+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
-+** Contact: http://www.qt-project.org/legal
-+**
-+** This file is part of the qmake spec of the Qt Toolkit.
-+**
-+** $QT_BEGIN_LICENSE:LGPL$
-+** Commercial License Usage
-+** Licensees holding valid commercial Qt licenses may use this file in
-+** accordance with the commercial license agreement provided with the
-+** Software or, alternatively, in accordance with the terms contained in
-+** a written agreement between you and Digia.  For licensing terms and
-+** conditions see http://qt.digia.com/licensing.  For further information
-+** use the contact form at http://qt.digia.com/contact-us.
-+**
-+** GNU Lesser General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU Lesser
-+** General Public License version 2.1 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.LGPL included in the
-+** packaging of this file.  Please review the following information to
-+** ensure the GNU Lesser General Public License version 2.1 requirements
-+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-+**
-+** In addition, as a special exception, Digia gives you certain additional
-+** rights.  These rights are described in the Digia Qt LGPL Exception
-+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-+**
-+** GNU General Public License Usage
-+** Alternatively, this file may be used under the terms of the GNU
-+** General Public License version 3.0 as published by the Free Software
-+** Foundation and appearing in the file LICENSE.GPL included in the
-+** packaging of this file.  Please review the following information to
-+** ensure the GNU General Public License version 3.0 requirements will be
-+** met: http://www.gnu.org/copyleft/gpl.html.
-+**
-+**
-+** $QT_END_LICENSE$
-+**
-+****************************************************************************/
-+
-+#include "../linux-g++/qplatformdefs.h"
--- 
-2.1.0
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0032-aarch64_add_header.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0032-aarch64_add_header.patch
deleted file mode 100644
index 178f784..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0032-aarch64_add_header.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Add missing header for aarch64. And install ../corelib/arch/qatomic_aarch64.h.
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
-diff -Nru qt-everywhere-opensource-src-4.8.6.orig/include/QtCore/qatomic_aarch64.h qt-everywhere-opensource-src-4.8.6/include/QtCore/qatomic_aarch64.h
---- qt-everywhere-opensource-src-4.8.6.orig/include/QtCore/qatomic_aarch64.h	1970-01-01 08:30:00.000000000 +0830
-+++ qt-everywhere-opensource-src-4.8.6/include/QtCore/qatomic_aarch64.h	2014-09-09 17:18:03.768352551 +0800
-@@ -0,0 +1 @@
-+#include "../../src/corelib/arch/qatomic_aarch64.h"
---- qt-everywhere-opensource-src-4.8.6/include/QtCore/headers.pri.orig	2014-09-09 18:05:37.100430311 +0800
-+++ qt-everywhere-opensource-src-4.8.6/include/QtCore/headers.pri	2014-09-09 18:05:59.112430911 +0800
-@@ -1,3 +1,3 @@
--SYNCQT.HEADER_FILES = ../corelib/kernel/qabstracteventdispatcher.h ../corelib/kernel/qabstractitemmodel.h ../corelib/kernel/qbasictimer.h ../corelib/kernel/qcoreapplication.h ../corelib/kernel/qcoreevent.h ../corelib/kernel/qeventloop.h ../corelib/kernel/qfunctions_nacl.h ../corelib/kernel/qfunctions_vxworks.h ../corelib/kernel/qfunctions_wince.h ../corelib/kernel/qmath.h ../corelib/kernel/qmetaobject.h ../corelib/kernel/qmetatype.h ../corelib/kernel/qmimedata.h ../corelib/kernel/qobject.h ../corelib/kernel/qobjectcleanuphandler.h ../corelib/kernel/qobjectdefs.h ../corelib/kernel/qpointer.h ../corelib/kernel/qsharedmemory.h ../corelib/kernel/qsignalmapper.h ../corelib/kernel/qsocketnotifier.h ../corelib/kernel/qsystemsemaphore.h ../corelib/kernel/qtimer.h ../corelib/kernel/qtranslator.h ../corelib/kernel/qvariant.h ../corelib/animation/qabstractanimation.h ../corelib/animation/qanimationgroup.h ../corelib/animation/qparallelanimationgroup.h ../corelib/animation/qpauseanimation.h ../corelib/animation/qpropertyanimation.h ../corelib/animation/qsequentialanimationgroup.h ../corelib/animation/qvariantanimation.h ../corelib/arch/qatomic_alpha.h ../corelib/arch/qatomic_arch.h ../corelib/arch/qatomic_arm.h ../corelib/arch/qatomic_armv5.h ../corelib/arch/qatomic_armv6.h ../corelib/arch/qatomic_armv7.h ../corelib/arch/qatomic_avr32.h ../corelib/arch/qatomic_bfin.h ../corelib/arch/qatomic_bootstrap.h ../corelib/arch/qatomic_generic.h ../corelib/arch/qatomic_i386.h ../corelib/arch/qatomic_ia64.h ../corelib/arch/qatomic_integrity.h ../corelib/arch/qatomic_m68k.h ../corelib/arch/qatomic_macosx.h ../corelib/arch/qatomic_mips.h ../corelib/arch/qatomic_parisc.h ../corelib/arch/qatomic_powerpc.h ../corelib/arch/qatomic_s390.h ../corelib/arch/qatomic_sh.h ../corelib/arch/qatomic_sh4a.h ../corelib/arch/qatomic_sparc.h ../corelib/arch/qatomic_symbian.h ../corelib/arch/qatomic_vxworks.h ../corelib/arch/qatomic_windows.h ../corelib/arch/qatomic_windowsce.h ../corelib/arch/qatomic_x86_64.h ../corelib/tools/qalgorithms.h ../corelib/tools/qbitarray.h ../corelib/tools/qbytearray.h ../corelib/tools/qbytearraymatcher.h ../corelib/tools/qcache.h ../corelib/tools/qchar.h ../corelib/tools/qcontainerfwd.h ../corelib/tools/qcontiguouscache.h ../corelib/tools/qcryptographichash.h ../corelib/tools/qdatetime.h ../corelib/tools/qeasingcurve.h ../corelib/tools/qelapsedtimer.h ../corelib/tools/qhash.h ../corelib/tools/qiterator.h ../corelib/tools/qline.h ../corelib/tools/qlinkedlist.h ../corelib/tools/qlist.h ../corelib/tools/qlocale.h ../corelib/tools/qlocale_blackberry.h ../corelib/tools/qmap.h ../corelib/tools/qmargins.h ../corelib/tools/qpair.h ../corelib/tools/qpoint.h ../corelib/tools/qqueue.h ../corelib/tools/qrect.h ../corelib/tools/qregexp.h ../corelib/tools/qscopedpointer.h ../corelib/tools/qscopedvaluerollback.h ../corelib/tools/qset.h ../corelib/tools/qshareddata.h ../corelib/tools/qsharedpointer.h ../corelib/tools/qsharedpointer_impl.h ../corelib/tools/qsize.h ../corelib/tools/qstack.h ../corelib/tools/qstring.h ../corelib/tools/qstringbuilder.h ../corelib/tools/qstringlist.h ../corelib/tools/qstringmatcher.h ../corelib/tools/qtextboundaryfinder.h ../corelib/tools/qtimeline.h ../corelib/tools/qvarlengtharray.h ../corelib/tools/qvector.h ../corelib/plugin/qfactoryinterface.h ../corelib/plugin/qlibrary.h ../corelib/plugin/qplugin.h ../corelib/plugin/qpluginloader.h ../corelib/plugin/quuid.h ../corelib/xml/qxmlstream.h ../corelib/thread/qatomic.h ../corelib/thread/qbasicatomic.h ../corelib/thread/qmutex.h ../corelib/thread/qreadwritelock.h ../corelib/thread/qsemaphore.h ../corelib/thread/qthread.h ../corelib/thread/qthreadstorage.h ../corelib/thread/qwaitcondition.h ../corelib/statemachine/qabstractstate.h ../corelib/statemachine/qabstracttransition.h ../corelib/statemachine/qeventtransition.h ../corelib/statemachine/qfinalstate.h ../corelib/statemachine/qhistorystate.h ../corelib/statemachine/qsignaltransition.h ../corelib/statemachine/qstate.h ../corelib/statemachine/qstatemachine.h ../corelib/concurrent/qfuture.h ../corelib/concurrent/qfutureinterface.h ../corelib/concurrent/qfuturesynchronizer.h ../corelib/concurrent/qfuturewatcher.h ../corelib/concurrent/qrunnable.h ../corelib/concurrent/qtconcurrentcompilertest.h ../corelib/concurrent/qtconcurrentexception.h ../corelib/concurrent/qtconcurrentfilter.h ../corelib/concurrent/qtconcurrentfilterkernel.h ../corelib/concurrent/qtconcurrentfunctionwrappers.h ../corelib/concurrent/qtconcurrentiteratekernel.h ../corelib/concurrent/qtconcurrentmap.h ../corelib/concurrent/qtconcurrentmapkernel.h ../corelib/concurrent/qtconcurrentmedian.h ../corelib/concurrent/qtconcurrentreducekernel.h ../corelib/concurrent/qtconcurrentresultstore.h ../corelib/concurrent/qtconcurrentrun.h ../corelib/concurrent/qtconcurrentrunbase.h ../corelib/concurrent/qtconcurrentstoredfunctioncall.h ../corelib/concurrent/qtconcurrentthreadengine.h ../corelib/concurrent/qthreadpool.h ../corelib/io/qabstractfileengine.h ../corelib/io/qbuffer.h ../corelib/io/qdatastream.h ../corelib/io/qdebug.h ../corelib/io/qdir.h ../corelib/io/qdiriterator.h ../corelib/io/qfile.h ../corelib/io/qfileinfo.h ../corelib/io/qfilesystemwatcher.h ../corelib/io/qfsfileengine.h ../corelib/io/qiodevice.h ../corelib/io/qprocess.h ../corelib/io/qresource.h ../corelib/io/qsettings.h ../corelib/io/qtemporaryfile.h ../corelib/io/qtextstream.h ../corelib/io/qurl.h ../corelib/global/qconfig-dist.h ../corelib/global/qconfig-large.h ../corelib/global/qconfig-medium.h ../corelib/global/qconfig-minimal.h ../corelib/global/qconfig-nacl.h ../corelib/global/qconfig-small.h ../corelib/global/qendian.h ../corelib/global/qfeatures.h ../corelib/global/qglobal.h ../corelib/global/qlibraryinfo.h ../corelib/global/qnamespace.h ../corelib/global/qnumeric.h ../corelib/global/qt_windows.h ../corelib/global/qconfig.h ../corelib/codecs/qtextcodec.h ../corelib/codecs/qtextcodecplugin.h ../../include/QtCore/QtCore 
-+SYNCQT.HEADER_FILES = ../corelib/kernel/qabstracteventdispatcher.h ../corelib/kernel/qabstractitemmodel.h ../corelib/kernel/qbasictimer.h ../corelib/kernel/qcoreapplication.h ../corelib/kernel/qcoreevent.h ../corelib/kernel/qeventloop.h ../corelib/kernel/qfunctions_nacl.h ../corelib/kernel/qfunctions_vxworks.h ../corelib/kernel/qfunctions_wince.h ../corelib/kernel/qmath.h ../corelib/kernel/qmetaobject.h ../corelib/kernel/qmetatype.h ../corelib/kernel/qmimedata.h ../corelib/kernel/qobject.h ../corelib/kernel/qobjectcleanuphandler.h ../corelib/kernel/qobjectdefs.h ../corelib/kernel/qpointer.h ../corelib/kernel/qsharedmemory.h ../corelib/kernel/qsignalmapper.h ../corelib/kernel/qsocketnotifier.h ../corelib/kernel/qsystemsemaphore.h ../corelib/kernel/qtimer.h ../corelib/kernel/qtranslator.h ../corelib/kernel/qvariant.h ../corelib/animation/qabstractanimation.h ../corelib/animation/qanimationgroup.h ../corelib/animation/qparallelanimationgroup.h ../corelib/animation/qpauseanimation.h ../corelib/animation/qpropertyanimation.h ../corelib/animation/qsequentialanimationgroup.h ../corelib/animation/qvariantanimation.h ../corelib/arch/qatomic_alpha.h ../corelib/arch/qatomic_arch.h ../corelib/arch/qatomic_arm.h ../corelib/arch/qatomic_armv5.h ../corelib/arch/qatomic_armv6.h ../corelib/arch/qatomic_armv7.h ../corelib/arch/qatomic_aarch64.h ../corelib/arch/qatomic_avr32.h ../corelib/arch/qatomic_bfin.h ../corelib/arch/qatomic_bootstrap.h ../corelib/arch/qatomic_generic.h ../corelib/arch/qatomic_i386.h ../corelib/arch/qatomic_ia64.h ../corelib/arch/qatomic_integrity.h ../corelib/arch/qatomic_m68k.h ../corelib/arch/qatomic_macosx.h ../corelib/arch/qatomic_mips.h ../corelib/arch/qatomic_parisc.h ../corelib/arch/qatomic_powerpc.h ../corelib/arch/qatomic_s390.h ../corelib/arch/qatomic_sh.h ../corelib/arch/qatomic_sh4a.h ../corelib/arch/qatomic_sparc.h ../corelib/arch/qatomic_symbian.h ../corelib/arch/qatomic_vxworks.h ../corelib/arch/qatomic_windows.h ../corelib/arch/qatomic_windowsce.h ../corelib/arch/qatomic_x86_64.h ../corelib/tools/qalgorithms.h ../corelib/tools/qbitarray.h ../corelib/tools/qbytearray.h ../corelib/tools/qbytearraymatcher.h ../corelib/tools/qcache.h ../corelib/tools/qchar.h ../corelib/tools/qcontainerfwd.h ../corelib/tools/qcontiguouscache.h ../corelib/tools/qcryptographichash.h ../corelib/tools/qdatetime.h ../corelib/tools/qeasingcurve.h ../corelib/tools/qelapsedtimer.h ../corelib/tools/qhash.h ../corelib/tools/qiterator.h ../corelib/tools/qline.h ../corelib/tools/qlinkedlist.h ../corelib/tools/qlist.h ../corelib/tools/qlocale.h ../corelib/tools/qlocale_blackberry.h ../corelib/tools/qmap.h ../corelib/tools/qmargins.h ../corelib/tools/qpair.h ../corelib/tools/qpoint.h ../corelib/tools/qqueue.h ../corelib/tools/qrect.h ../corelib/tools/qregexp.h ../corelib/tools/qscopedpointer.h ../corelib/tools/qscopedvaluerollback.h ../corelib/tools/qset.h ../corelib/tools/qshareddata.h ../corelib/tools/qsharedpointer.h ../corelib/tools/qsharedpointer_impl.h ../corelib/tools/qsize.h ../corelib/tools/qstack.h ../corelib/tools/qstring.h ../corelib/tools/qstringbuilder.h ../corelib/tools/qstringlist.h ../corelib/tools/qstringmatcher.h ../corelib/tools/qtextboundaryfinder.h ../corelib/tools/qtimeline.h ../corelib/tools/qvarlengtharray.h ../corelib/tools/qvector.h ../corelib/plugin/qfactoryinterface.h ../corelib/plugin/qlibrary.h ../corelib/plugin/qplugin.h ../corelib/plugin/qpluginloader.h ../corelib/plugin/quuid.h ../corelib/xml/qxmlstream.h ../corelib/thread/qatomic.h ../corelib/thread/qbasicatomic.h ../corelib/thread/qmutex.h ../corelib/thread/qreadwritelock.h ../corelib/thread/qsemaphore.h ../corelib/thread/qthread.h ../corelib/thread/qthreadstorage.h ../corelib/thread/qwaitcondition.h ../corelib/statemachine/qabstractstate.h ../corelib/statemachine/qabstracttransition.h ../corelib/statemachine/qeventtransition.h ../corelib/statemachine/qfinalstate.h ../corelib/statemachine/qhistorystate.h ../corelib/statemachine/qsignaltransition.h ../corelib/statemachine/qstate.h ../corelib/statemachine/qstatemachine.h ../corelib/concurrent/qfuture.h ../corelib/concurrent/qfutureinterface.h ../corelib/concurrent/qfuturesynchronizer.h ../corelib/concurrent/qfuturewatcher.h ../corelib/concurrent/qrunnable.h ../corelib/concurrent/qtconcurrentcompilertest.h ../corelib/concurrent/qtconcurrentexception.h ../corelib/concurrent/qtconcurrentfilter.h ../corelib/concurrent/qtconcurrentfilterkernel.h ../corelib/concurrent/qtconcurrentfunctionwrappers.h ../corelib/concurrent/qtconcurrentiteratekernel.h ../corelib/concurrent/qtconcurrentmap.h ../corelib/concurrent/qtconcurrentmapkernel.h ../corelib/concurrent/qtconcurrentmedian.h ../corelib/concurrent/qtconcurrentreducekernel.h ../corelib/concurrent/qtconcurrentresultstore.h ../corelib/concurrent/qtconcurrentrun.h ../corelib/concurrent/qtconcurrentrunbase.h ../corelib/concurrent/qtconcurrentstoredfunctioncall.h ../corelib/concurrent/qtconcurrentthreadengine.h ../corelib/concurrent/qthreadpool.h ../corelib/io/qabstractfileengine.h ../corelib/io/qbuffer.h ../corelib/io/qdatastream.h ../corelib/io/qdebug.h ../corelib/io/qdir.h ../corelib/io/qdiriterator.h ../corelib/io/qfile.h ../corelib/io/qfileinfo.h ../corelib/io/qfilesystemwatcher.h ../corelib/io/qfsfileengine.h ../corelib/io/qiodevice.h ../corelib/io/qprocess.h ../corelib/io/qresource.h ../corelib/io/qsettings.h ../corelib/io/qtemporaryfile.h ../corelib/io/qtextstream.h ../corelib/io/qurl.h ../corelib/global/qconfig-dist.h ../corelib/global/qconfig-large.h ../corelib/global/qconfig-medium.h ../corelib/global/qconfig-minimal.h ../corelib/global/qconfig-nacl.h ../corelib/global/qconfig-small.h ../corelib/global/qendian.h ../corelib/global/qfeatures.h ../corelib/global/qglobal.h ../corelib/global/qlibraryinfo.h ../corelib/global/qnamespace.h ../corelib/global/qnumeric.h ../corelib/global/qt_windows.h ../corelib/global/qconfig.h ../corelib/codecs/qtextcodec.h ../corelib/codecs/qtextcodecplugin.h ../../include/QtCore/QtCore 
- SYNCQT.HEADER_CLASSES = ../../include/QtCore/QAbstractEventDispatcher ../../include/QtCore/QModelIndex ../../include/QtCore/QPersistentModelIndex ../../include/QtCore/QModelIndexList ../../include/QtCore/QAbstractItemModel ../../include/QtCore/QAbstractTableModel ../../include/QtCore/QAbstractListModel ../../include/QtCore/QBasicTimer ../../include/QtCore/QCoreApplication ../../include/QtCore/QtCleanUpFunction ../../include/QtCore/QEvent ../../include/QtCore/QTimerEvent ../../include/QtCore/QChildEvent ../../include/QtCore/QCustomEvent ../../include/QtCore/QDynamicPropertyChangeEvent ../../include/QtCore/QEventLoop ../../include/QtCore/QMetaMethod ../../include/QtCore/QMetaEnum ../../include/QtCore/QMetaProperty ../../include/QtCore/QMetaClassInfo ../../include/QtCore/QMetaType ../../include/QtCore/QMetaTypeId ../../include/QtCore/QMetaTypeId2 ../../include/QtCore/QMimeData ../../include/QtCore/QObjectList ../../include/QtCore/QObjectData ../../include/QtCore/QObject ../../include/QtCore/QObjectUserData ../../include/QtCore/QObjectCleanupHandler ../../include/QtCore/QGenericArgument ../../include/QtCore/QGenericReturnArgument ../../include/QtCore/QArgument ../../include/QtCore/QReturnArgument ../../include/QtCore/QMetaObject ../../include/QtCore/QMetaObjectAccessor ../../include/QtCore/QMetaObjectExtraData ../../include/QtCore/QPointer ../../include/QtCore/QSharedMemory ../../include/QtCore/QSignalMapper ../../include/QtCore/QSocketNotifier ../../include/QtCore/QSystemSemaphore ../../include/QtCore/QTimer ../../include/QtCore/QTranslator ../../include/QtCore/QVariant ../../include/QtCore/QVariantList ../../include/QtCore/QVariantMap ../../include/QtCore/QVariantHash ../../include/QtCore/QVariantComparisonHelper ../../include/QtCore/QAbstractAnimation ../../include/QtCore/QAnimationDriver ../../include/QtCore/QAnimationGroup ../../include/QtCore/QParallelAnimationGroup ../../include/QtCore/QPauseAnimation ../../include/QtCore/QPropertyAnimation ../../include/QtCore/QSequentialAnimationGroup ../../include/QtCore/QVariantAnimation ../../include/QtCore/QtAlgorithms ../../include/QtCore/QBitArray ../../include/QtCore/QBitRef ../../include/QtCore/QByteArray ../../include/QtCore/QByteRef ../../include/QtCore/QByteArrayMatcher ../../include/QtCore/QCache ../../include/QtCore/QLatin1Char ../../include/QtCore/QChar ../../include/QtCore/QtContainerFwd ../../include/QtCore/QContiguousCacheData ../../include/QtCore/QContiguousCacheTypedData ../../include/QtCore/QContiguousCache ../../include/QtCore/QCryptographicHash ../../include/QtCore/QDate ../../include/QtCore/QTime ../../include/QtCore/QDateTime ../../include/QtCore/QEasingCurve ../../include/QtCore/QElapsedTimer ../../include/QtCore/QHashData ../../include/QtCore/QHashDummyValue ../../include/QtCore/QHashDummyNode ../../include/QtCore/QHashNode ../../include/QtCore/QHash ../../include/QtCore/QMultiHash ../../include/QtCore/QHashIterator ../../include/QtCore/QMutableHashIterator ../../include/QtCore/QLine ../../include/QtCore/QLineF ../../include/QtCore/QLinkedListData ../../include/QtCore/QLinkedListNode ../../include/QtCore/QLinkedList ../../include/QtCore/QLinkedListIterator ../../include/QtCore/QMutableLinkedListIterator ../../include/QtCore/QListData ../../include/QtCore/QList ../../include/QtCore/QListIterator ../../include/QtCore/QMutableListIterator ../../include/QtCore/QSystemLocale ../../include/QtCore/QLocale ../../include/QtCore/QBBSystemLocaleData ../../include/QtCore/QMapData ../../include/QtCore/QMapNode ../../include/QtCore/QMapPayloadNode ../../include/QtCore/QMap ../../include/QtCore/QMultiMap ../../include/QtCore/QMapIterator ../../include/QtCore/QMutableMapIterator ../../include/QtCore/QMargins ../../include/QtCore/QPair ../../include/QtCore/QPoint ../../include/QtCore/QPointF ../../include/QtCore/QQueue ../../include/QtCore/QRect ../../include/QtCore/QRectF ../../include/QtCore/QRegExp ../../include/QtCore/QScopedPointerDeleter ../../include/QtCore/QScopedPointerArrayDeleter ../../include/QtCore/QScopedPointerPodDeleter ../../include/QtCore/QScopedPointer ../../include/QtCore/QScopedArrayPointer ../../include/QtCore/QScopedValueRollback ../../include/QtCore/QSet ../../include/QtCore/QSetIterator ../../include/QtCore/QMutableSetIterator ../../include/QtCore/QSharedData ../../include/QtCore/QSharedDataPointer ../../include/QtCore/QExplicitlySharedDataPointer ../../include/QtCore/QSharedPointer ../../include/QtCore/QWeakPointer ../../include/QtCore/QSize ../../include/QtCore/QSizeF ../../include/QtCore/QStack ../../include/QtCore/QStdWString ../../include/QtCore/QString ../../include/QtCore/QLatin1String ../../include/QtCore/QCharRef ../../include/QtCore/QConstString ../../include/QtCore/QStringRef ../../include/QtCore/QLatin1Literal ../../include/QtCore/QAbstractConcatenable ../../include/QtCore/QConcatenable ../../include/QtCore/QStringBuilder ../../include/QtCore/QStringListIterator ../../include/QtCore/QMutableStringListIterator ../../include/QtCore/QStringList ../../include/QtCore/QStringMatcher ../../include/QtCore/QTextBoundaryFinder ../../include/QtCore/QTimeLine ../../include/QtCore/QVarLengthArray ../../include/QtCore/QVectorData ../../include/QtCore/QVectorTypedData ../../include/QtCore/QVector ../../include/QtCore/QVectorIterator ../../include/QtCore/QMutableVectorIterator ../../include/QtCore/QFactoryInterface ../../include/QtCore/QLibrary ../../include/QtCore/QtPlugin ../../include/QtCore/QtPluginInstanceFunction ../../include/QtCore/QPluginLoader ../../include/QtCore/QUuid ../../include/QtCore/QXmlStreamStringRef ../../include/QtCore/QXmlStreamAttribute ../../include/QtCore/QXmlStreamAttributes ../../include/QtCore/QXmlStreamNamespaceDeclaration ../../include/QtCore/QXmlStreamNamespaceDeclarations ../../include/QtCore/QXmlStreamNotationDeclaration ../../include/QtCore/QXmlStreamNotationDeclarations ../../include/QtCore/QXmlStreamEntityDeclaration ../../include/QtCore/QXmlStreamEntityDeclarations ../../include/QtCore/QXmlStreamEntityResolver ../../include/QtCore/QXmlStreamReader ../../include/QtCore/QXmlStreamWriter ../../include/QtCore/QAtomicInt ../../include/QtCore/QAtomicPointer ../../include/QtCore/QBasicAtomicInt ../../include/QtCore/QBasicAtomicPointer ../../include/QtCore/QMutex ../../include/QtCore/QMutexLocker ../../include/QtCore/QMutexData ../../include/QtCore/QReadWriteLock ../../include/QtCore/QReadLocker ../../include/QtCore/QWriteLocker ../../include/QtCore/QSemaphore ../../include/QtCore/QThread ../../include/QtCore/QThreadStorageData ../../include/QtCore/QThreadStorage ../../include/QtCore/QWaitCondition ../../include/QtCore/QAbstractState ../../include/QtCore/QAbstractTransition ../../include/QtCore/QEventTransition ../../include/QtCore/QFinalState ../../include/QtCore/QHistoryState ../../include/QtCore/QSignalTransition ../../include/QtCore/QState ../../include/QtCore/QStateMachine ../../include/QtCore/QFuture ../../include/QtCore/QFutureIterator ../../include/QtCore/QMutableFutureIterator ../../include/QtCore/QFutureInterfaceBase ../../include/QtCore/QFutureInterface ../../include/QtCore/QFutureSynchronizer ../../include/QtCore/QFutureWatcherBase ../../include/QtCore/QFutureWatcher ../../include/QtCore/QRunnable ../../include/QtCore/QtConcurrentFilter ../../include/QtCore/QtConcurrentMap ../../include/QtCore/QtConcurrentRun ../../include/QtCore/QThreadPool ../../include/QtCore/QAbstractFileEngine ../../include/QtCore/QAbstractFileEngineHandler ../../include/QtCore/QAbstractFileEngineIterator ../../include/QtCore/QBuffer ../../include/QtCore/QDataStream ../../include/QtCore/QtDebug ../../include/QtCore/QDebug ../../include/QtCore/QNoDebug ../../include/QtCore/QDir ../../include/QtCore/QDirIterator ../../include/QtCore/QFile ../../include/QtCore/QFileInfo ../../include/QtCore/QFileInfoList ../../include/QtCore/QFileInfoListIterator ../../include/QtCore/QFileSystemWatcher ../../include/QtCore/QFSFileEngine ../../include/QtCore/QIODevice ../../include/QtCore/Q_PID ../../include/QtCore/QProcessEnvironment ../../include/QtCore/QProcess ../../include/QtCore/QResource ../../include/QtCore/QSettings ../../include/QtCore/QTemporaryFile ../../include/QtCore/QTextStream ../../include/QtCore/QTextStreamFunction ../../include/QtCore/QTextStreamManipulator ../../include/QtCore/QTS ../../include/QtCore/QTextIStream ../../include/QtCore/QTextOStream ../../include/QtCore/QUrl ../../include/QtCore/QtEndian ../../include/QtCore/QtGlobal ../../include/QtCore/QIntegerForSize ../../include/QtCore/QNoImplicitBoolCast ../../include/QtCore/Q_INT8 ../../include/QtCore/Q_UINT8 ../../include/QtCore/Q_INT16 ../../include/QtCore/Q_UINT16 ../../include/QtCore/Q_INT32 ../../include/QtCore/Q_UINT32 ../../include/QtCore/Q_INT64 ../../include/QtCore/Q_UINT64 ../../include/QtCore/Q_LLONG ../../include/QtCore/Q_ULLONG ../../include/QtCore/Q_LONG ../../include/QtCore/Q_ULONG ../../include/QtCore/QSysInfo ../../include/QtCore/QtMsgHandler ../../include/QtCore/QGlobalStatic ../../include/QtCore/QGlobalStaticDeleter ../../include/QtCore/QBool ../../include/QtCore/QTypeInfo ../../include/QtCore/QFlag ../../include/QtCore/QIncompatibleFlag ../../include/QtCore/QFlags ../../include/QtCore/QForeachContainer ../../include/QtCore/QForeachContainerBase ../../include/QtCore/QLibraryInfo ../../include/QtCore/Qt ../../include/QtCore/QInternal ../../include/QtCore/QCOORD ../../include/QtCore/QtConfig ../../include/QtCore/QTextCodec ../../include/QtCore/QTextEncoder ../../include/QtCore/QTextDecoder ../../include/QtCore/QTextCodecFactoryInterface ../../include/QtCore/QTextCodecPlugin 
- SYNCQT.PRIVATE_HEADER_FILES = ../corelib/kernel/qabstracteventdispatcher_p.h ../corelib/kernel/qabstractitemmodel_p.h ../corelib/kernel/qcore_mac_p.h ../corelib/kernel/qcore_symbian_p.h ../corelib/kernel/qcore_unix_p.h ../corelib/kernel/qcoreapplication_p.h ../corelib/kernel/qcorecmdlineargs_p.h ../corelib/kernel/qcoreglobaldata_p.h ../corelib/kernel/qcrashhandler_p.h ../corelib/kernel/qeventdispatcher_blackberry_p.h ../corelib/kernel/qeventdispatcher_glib_p.h ../corelib/kernel/qeventdispatcher_symbian_p.h ../corelib/kernel/qeventdispatcher_unix_p.h ../corelib/kernel/qeventdispatcher_win_p.h ../corelib/kernel/qfunctions_p.h ../corelib/kernel/qmetaobject_p.h ../corelib/kernel/qobject_p.h ../corelib/kernel/qsharedmemory_p.h ../corelib/kernel/qsystemerror_p.h ../corelib/kernel/qsystemsemaphore_p.h ../corelib/kernel/qtranslator_p.h ../corelib/kernel/qvariant_p.h ../corelib/kernel/qwineventnotifier_p.h ../corelib/animation/qabstractanimation_p.h ../corelib/animation/qanimationgroup_p.h ../corelib/animation/qparallelanimationgroup_p.h ../corelib/animation/qpropertyanimation_p.h ../corelib/animation/qsequentialanimationgroup_p.h ../corelib/animation/qvariantanimation_p.h ../corelib/tools/qbytedata_p.h ../corelib/tools/qdatetime_p.h ../corelib/tools/qharfbuzz_p.h ../corelib/tools/qlocale_data_p.h ../corelib/tools/qlocale_p.h ../corelib/tools/qlocale_tools_p.h ../corelib/tools/qpodlist_p.h ../corelib/tools/qringbuffer_p.h ../corelib/tools/qscopedpointer_p.h ../corelib/tools/qsimd_p.h ../corelib/tools/qtools_p.h ../corelib/tools/qunicodetables_p.h ../corelib/plugin/qelfparser_p.h ../corelib/plugin/qfactoryloader_p.h ../corelib/plugin/qlibrary_p.h ../corelib/plugin/qsystemlibrary_p.h ../corelib/xml/qxmlstream_p.h ../corelib/xml/qxmlutils_p.h ../corelib/thread/qmutex_p.h ../corelib/thread/qmutexpool_p.h ../corelib/thread/qorderedmutexlocker_p.h ../corelib/thread/qreadwritelock_p.h ../corelib/thread/qthread_p.h ../corelib/statemachine/qabstractstate_p.h ../corelib/statemachine/qabstracttransition_p.h ../corelib/statemachine/qeventtransition_p.h ../corelib/statemachine/qhistorystate_p.h ../corelib/statemachine/qsignaleventgenerator_p.h ../corelib/statemachine/qsignaltransition_p.h ../corelib/statemachine/qstate_p.h ../corelib/statemachine/qstatemachine_p.h ../corelib/concurrent/qfutureinterface_p.h ../corelib/concurrent/qfuturewatcher_p.h ../corelib/concurrent/qthreadpool_p.h ../corelib/io/qabstractfileengine_p.h ../corelib/io/qdatastream_p.h ../corelib/io/qdataurl_p.h ../corelib/io/qdir_p.h ../corelib/io/qfile_p.h ../corelib/io/qfileinfo_p.h ../corelib/io/qfilesystemengine_p.h ../corelib/io/qfilesystementry_p.h ../corelib/io/qfilesystemiterator_p.h ../corelib/io/qfilesystemmetadata_p.h ../corelib/io/qfilesystemwatcher_dnotify_p.h ../corelib/io/qfilesystemwatcher_fsevents_p.h ../corelib/io/qfilesystemwatcher_inotify_p.h ../corelib/io/qfilesystemwatcher_kqueue_p.h ../corelib/io/qfilesystemwatcher_p.h ../corelib/io/qfilesystemwatcher_symbian_p.h ../corelib/io/qfilesystemwatcher_win_p.h ../corelib/io/qfsfileengine_iterator_p.h ../corelib/io/qfsfileengine_p.h ../corelib/io/qiodevice_p.h ../corelib/io/qnoncontiguousbytedevice_p.h ../corelib/io/qprocess_p.h ../corelib/io/qresource_iterator_p.h ../corelib/io/qresource_p.h ../corelib/io/qsettings_p.h ../corelib/io/qtldurl_p.h ../corelib/io/qurltlds_p.h ../corelib/io/qwindowspipewriter_p.h ../corelib/global/qnumeric_p.h ../corelib/global/qt_pch.h ../corelib/codecs/qfontlaocodec_p.h ../corelib/codecs/qiconvcodec_p.h ../corelib/codecs/qisciicodec_p.h ../corelib/codecs/qlatincodec_p.h ../corelib/codecs/qsimplecodec_p.h ../corelib/codecs/qtextcodec_p.h ../corelib/codecs/qtsciicodec_p.h ../corelib/codecs/qutfcodec_p.h 
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0033-configure-support-c-0x-standard-for-directfd.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0033-configure-support-c-0x-standard-for-directfd.patch
deleted file mode 100644
index f3face5..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0033-configure-support-c-0x-standard-for-directfd.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-configure: support c++0x standard for directfd
-
-While directfd upgrade to 1.7.6, it always includes directfb++ utils
-when C++ is used and set c++0x as c++ standard.
-(In git://git.directfb.org/git/directfb/core/DirectFB.git
-commit b444bcae3197be9faf883460dcc239ef757d5922, and commit
-522beeb76f2a8d2dee30d928d2a5955bd06cf25c)
-
-The directfd in qt4 is c++, and there was a build failure:
-...
-| qdirectfbwindowsurface.cpp:336:69: error: in C++98 'rect' must be
-initialized by constructor, not by '{...}'
-|      const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() };
-...
-
-The g++ used c++98 as default c++ standard, we should
-explicitly set c++0x for directfd in qt4.
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- configure | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/configure b/configure
-index 5724bd6..ecc2f8b 100755
---- a/configure
-+++ b/configure
-@@ -6656,6 +6656,7 @@ if [ "$PLATFORM_QWS" = "yes" ]; then
-        if [ "${screen}" = "directfb" ] && [ "${CFG_CONFIGURE_EXIT_ON_ERROR}" = "yes" ]; then
-            if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists directfb 2>/dev/null; then
-                QT_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
-+               QT_CFLAGS_DIRECTFB="$QT_CFLAGS_DIRECTFB -std=c++0x"
-                QT_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
-            elif directfb-config --version >/dev/null 2>&1; then
-                QT_CFLAGS_DIRECTFB=`directfb-config --cflags 2>/dev/null`
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0034-Fix-kmap2qmap-build-with-clang.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0034-Fix-kmap2qmap-build-with-clang.patch
deleted file mode 100644
index f47a1d9..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/0034-Fix-kmap2qmap-build-with-clang.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From: Samuel Gaist <samuel.gaist@edeltech.ch>
-Date: Wed, 4 Mar 2015 20:16:50 +0000 (+0100)
-Subject: Fix kmap2qmap build on OS X
-X-Git-Tag: v5.4.2~6
-X-Git-Url: https://codereview.qt-project.org/gitweb?p=qt%2Fqttools.git;a=commitdiff_plain;h=cf196a2565235f649b88fac55b53270bea23458d;hp=3070815a24239bd0f469bfeb8d0a1f091974e28e
-
-Fix kmap2qmap build on OS X
-
-Currently kmap2qmap fails to build on OS X (clang) This patch aims to
-fix this.
-
-Change-Id: I61c985dc7ad1f2486368c39aa976599d274942ab
-Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
----
-Upstream-Status: Backport
-Index: qt-everywhere-opensource-src-4.8.7/tools/kmap2qmap/main.cpp
-===================================================================
---- qt-everywhere-opensource-src-4.8.7.orig/tools/kmap2qmap/main.cpp
-+++ qt-everywhere-opensource-src-4.8.7/tools/kmap2qmap/main.cpp
-@@ -385,9 +385,11 @@ static const int symbol_synonyms_size =
- 
- // makes the generated array in --header mode a bit more human readable
- QT_BEGIN_NAMESPACE
--static bool operator<(const QWSKeyboard::Mapping &m1, const QWSKeyboard::Mapping &m2)
--{
--    return m1.keycode != m2.keycode ? m1.keycode < m2.keycode : m1.modifiers < m2.modifiers;
-+namespace QWSKeyboard {
-+    static bool operator<(const Mapping &m1, const Mapping &m2)
-+    {
-+        return m1.keycode != m2.keycode ? m1.keycode < m2.keycode : m1.modifiers < m2.modifiers;
-+    }
- }
- QT_END_NAMESPACE
- 
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/Fix-QWSLock-invalid-argument-logs.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/Fix-QWSLock-invalid-argument-logs.patch
deleted file mode 100644
index 1f5f00f..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/Fix-QWSLock-invalid-argument-logs.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 52c34001bad85c3032618070b1d6b2a3c6880715 Mon Sep 17 00:00:00 2001
-From: Neil Jerram <n...@ossau.homelinux.net>
-Date: Thu, 8 Nov 2012 08:18:32 +0000
-Subject: [PATCH] Fix QWSLock "invalid argument" logs
-
-There was no known actual problem associated with these logs, but they
-were spamming the log, so I thought it worth trying to understand and
-fix them.
-
-The confusion is that there are two different ways of creating QWSLock
-objects.  "QWSLock()" creates an object that creates a new set of
-semaphores, whereas "QWSLock(id)" creates an object that aliases the
-existing set of semaphores with ID id.  What seems to happen is that
-each application creates a semaphore set scoped to that
-application (QWSDisplay::Data::clientLock in qapplication_qws.cpp),
-then this semaphore set is passed by complex means to
-places (QWSClientPrivate and QWSMemorySurface) that use the semaphores
-for a short period and then delete their QWSLock objects.
-
-The problem was that the QWSLock destructor always destroyed the
-semaphore set, even when that QWSLock hadn't create the semaphores
-itself, hence making the semaphores invalid for other QWSLock objects
-still referencing the same set.
-
-Clearly a QWSLock object shouldn't destroy the semaphore set if it
-didn't create it itself, and that is confirmed by the fact that one of
-the implementations inside QWSLock already implements this logic, with
-the 'owned' flag.  The fix is to implement this for the #ifndef
-QT_POSIX_IPC case - which is what is used in QtMoko - just as is
-already implemented for the #ifdef QT_POSIX_IPC case.
-
-Original patch can be found here:
- http://www.mail-archive.com/community@lists.openmoko.org/msg65512.html
-
-Upstream-Status: Submitted
-
-Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
- (Removed the commented-out debug statements from the original patch.)
-
----
-
-diff --git a/src/gui/embedded/qwslock.cpp b/src/gui/embedded/qwslock.cpp
-index 9914a24..1055785 100644
---- a/src/gui/embedded/qwslock.cpp
-+++ b/src/gui/embedded/qwslock.cpp
-@@ -83,9 +83,12 @@ QWSLock::QWSLock(int id) : semId(id)
-     QWSSignalHandler::instance()->addWSLock(this);
- #endif
- 
-+    owned = false;
-+
- #ifndef QT_POSIX_IPC
-     if (semId == -1) {
-         semId = semget(IPC_PRIVATE, 3, IPC_CREAT | 0666);
-+        owned = true;
-         if (semId == -1) {
-             perror("QWSLock::QWSLock");
-             qFatal("Unable to create semaphore");
-@@ -100,7 +104,6 @@ QWSLock::QWSLock(int id) : semId(id)
-     }
- #else
-     sems[0] = sems[1] = sems[2] = SEM_FAILED;
--    owned = false;
- 
-     if (semId == -1) {
-         // ### generate really unique IDs
-@@ -134,9 +137,11 @@ QWSLock::~QWSLock()
- 
-     if (semId != -1) {
- #ifndef QT_POSIX_IPC
--        qt_semun semval;
--        semval.val = 0;
--        semctl(semId, 0, IPC_RMID, semval);
-+	if (owned) {
-+	    qt_semun semval;
-+	    semval.val = 0;
-+	    semctl(semId, 0, IPC_RMID, semval);
-+	}
-         semId = -1;
- #else
-         // emulate the SEM_UNDO behavior for the BackingStore lock
-diff --git a/src/gui/embedded/qwslock_p.h b/src/gui/embedded/qwslock_p.h
-index d324e4f..d867d20 100644
---- a/src/gui/embedded/qwslock_p.h
-+++ b/src/gui/embedded/qwslock_p.h
-@@ -86,8 +86,8 @@ private:
-     int lockCount[2];
- #ifdef QT_POSIX_IPC
-     sem_t *sems[3];
--    bool owned;
- #endif
-+    bool owned;
- };
- 
- QT_END_NAMESPACE
- 
--- 
-1.7.10.4
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/add_check_for_aarch64_32.patch b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/add_check_for_aarch64_32.patch
deleted file mode 100644
index ad5103d..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/add_check_for_aarch64_32.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Author: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>
-Date:   Sun Apr 12 19:27:10 2015 +0530
-
-[PATCH] add checking for AArch64 ilp32
-
-Cross-compiling qt4-embedded and qt4-x11-free applications for AArch64 ilp32
-(both big and little endian) fails with below error,
-
-(snip)
-In file included from ../3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.h:31:0,
-                 from ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalData.h:32,
-                 from ../3rdparty/javascriptcore/JavaScriptCore/interpreter/CallFrame.h:26,
-                 from ../3rdparty/javascriptcore/JavaScriptCore/runtime/ClassInfo.h:26,
-                 from ../3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.h:27,
-                 from ../3rdparty/javascriptcore/JavaScriptCore/API/JSCallbackConstructor.h:30,
-                 from ../3rdparty/javascriptcore/JavaScriptCore/API/JSCallbackConstructor.cpp:27:
-../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h: In instantiation of 'TO QTWTF::bitwise_cast(FROM) [w
-../3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h:52:49: required from here
-../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h:63:1: error: size of array is negative
-../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h: In instantiation of 'TO QTWTF::bitwise_cast(FROM) [w
-../3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h:57:47: required from here
-../3rdparty/javascriptcore/JavaScriptCore/wtf/StdLibExtras.h:63:1: error: size of array is negative
-make[1]: *** [obj/release/JSCallbackConstructor.o] Error 1
--- CUT --
-
-the error is because of JSVALUE64 is being defined while compiling programs
-for AArch64 ilp32. This makes equal condition checking of intptr_t and double
-datatypes as false, and results in -1 (negative) as array size in bitwise_cast
-function.
-
-Upstream-Status: Pending
-
-Signed-off-by: Krishnanjanappa, Jagadeesh <jagadeesh.krishnanjanappa@caviumnetworks.com>
-
---- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h	2014-04-11 00:07:12.000000000 +0530
-+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h	2015-04-10 22:19:51.066279426 +0530
-@@ -214,6 +214,9 @@
- #define WTF_CPU_AARCH64 1
- #if defined(__AARCH64EB__)
- #define WTF_CPU_BIG_ENDIAN 1
-+#if !defined(__LP64__)
-+#define WTF_CPU_AARCH64_32 1
-+#endif
- #endif
- #endif
- 
-@@ -903,7 +906,7 @@
- #endif
- 
- #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
--#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || CPU(AARCH64)
-+#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(MIPS64) || (CPU(AARCH64) && !CPU(AARCH64_32))
- #define WTF_USE_JSVALUE64 1
- #elif CPU(ARM) || CPU(PPC64)
- #define WTF_USE_JSVALUE32 1
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/g++.conf b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/g++.conf
deleted file mode 100644
index be78c24..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/g++.conf
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# qmake configuration for common gcc
-#
-
-QMAKE_COMPILER = gcc
-
-QMAKE_CC       = $(OE_QMAKE_CC)
-QMAKE_CFLAGS       += $(OE_QMAKE_CFLAGS)
-QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += $(OE_QMAKE_CFLAGS)
-QMAKE_CFLAGS_PRECOMPILE += -x c-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CFLAGS_USE_PRECOMPILE += -include ${QMAKE_PCH_OUTPUT_BASE}
-
-QMAKE_CXX      = $(OE_QMAKE_CXX)
-QMAKE_CXXFLAGS     += $(OE_QMAKE_CXXFLAGS)
-QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
-QMAKE_CXXFLAGS_PRECOMPILE += -x c++-header -c ${QMAKE_PCH_INPUT} -o ${QMAKE_PCH_OUTPUT}
-QMAKE_CXXFLAGS_USE_PRECOMPILE = $$QMAKE_CFLAGS_USE_PRECOMPILE
-
-QMAKE_LINK     = $(OE_QMAKE_LINK)
-QMAKE_LINK_SHLIB   = $(OE_QMAKE_LINK)
-QMAKE_LINK_C		= $(OE_QMAKE_LINK)
-QMAKE_LINK_C_SHLIB	= $(OE_QMAKE_LINK)
-QMAKE_LFLAGS       += $(OE_QMAKE_LDFLAGS)
-QMAKE_LFLAGS_NOUNDEF	+= -Wl,--no-undefined
-QMAKE_LFLAGS_RPATH        = -Wl,-rpath-link,
-
-QMAKE_PCH_OUTPUT_EXT    = .gch
-
-# -Bsymbolic-functions (ld) support
-QMAKE_LFLAGS_BSYMBOLIC_FUNC = -Wl,-Bsymbolic-functions
-QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,
-
-# do not depend on gdb
-CONFIG -= gdb_dwarf_index
-
-# some linking helper...
-CONFIG += rpath_libdirs
-
-# for the SDK
-isEmpty(QMAKE_QT_CONFIG):QMAKE_QT_CONFIG = $(OE_QMAKE_QT_CONFIG)
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/linux.conf b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/linux.conf
deleted file mode 100644
index 8670381..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/linux.conf
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# qmake configuration for common linux
-#
-
-QMAKE_CFLAGS_THREAD	+= -D_REENTRANT
-QMAKE_CXXFLAGS_THREAD	+= $$QMAKE_CFLAGS_THREAD
-
-QMAKE_INCDIR          =
-QMAKE_LIBDIR          =
-QMAKE_INCDIR_X11      =
-QMAKE_LIBDIR_X11      =
-QMAKE_INCDIR_QT       = $(OE_QMAKE_INCDIR_QT)
-QMAKE_LIBDIR_QT       = $(OE_QMAKE_LIBDIR_QT)
-QMAKE_INCDIR_OPENGL   =
-QMAKE_LIBDIR_OPENGL   =
-QMAKE_INCDIR_OPENGL_ES1 = $$QMAKE_INCDIR_OPENGL
-QMAKE_LIBDIR_OPENGL_ES1 = $$QMAKE_LIBDIR_OPENGL
-QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
-QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
-QMAKE_INCDIR_EGL      =
-QMAKE_LIBDIR_EGL      =
-QMAKE_INCDIR_OPENVG   =
-QMAKE_LIBDIR_OPENVG   =
-
-
-QMAKE_LIBS            =
-QMAKE_LIBS_DYNLOAD    = -ldl
-QMAKE_LIBS_X11        = $(OE_QMAKE_LIBS_X11)
-QMAKE_LIBS_X11SM      = $(OE_QMAKE_LIBS_X11SM)
-QMAKE_LIBS_NIS        = -lnsl
-QMAKE_LIBS_EGL        = -lEGL
-QMAKE_LIBS_OPENGL     = -lGL
-QMAKE_LIBS_OPENGL_QT  = -lGL
-QMAKE_LIBS_OPENGL_ES1 = -lGLES_CM
-QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
-QMAKE_LIBS_OPENVG     = -lOpenVG
-QMAKE_LIBS_THREAD     = -lpthread
-
-QMAKE_MOC             = $(OE_QMAKE_MOC)
-QMAKE_UIC             = $(OE_QMAKE_UIC)
-QMAKE_UIC3            = $(OE_QMAKE_UIC3)
-QMAKE_RCC             = $(OE_QMAKE_RCC)
-QMAKE_QDBUSCPP2XML    = $(OE_QMAKE_QDBUSCPP2XML)
-QMAKE_QDBUSXML2CPP    = $(OE_QMAKE_QDBUSXML2CPP)
-
-QMAKE_AR              = $(OE_QMAKE_AR) cqs
-QMAKE_OBJCOPY         = objcopy
-QMAKE_RANLIB          =
-
-QMAKE_TAR             = tar -cf
-QMAKE_GZIP            = gzip -9f
-
-QMAKE_COPY            = cp -f
-QMAKE_COPY_FILE       = $(COPY)
-QMAKE_COPY_DIR        = $(COPY) -r
-QMAKE_MOVE            = mv -f
-QMAKE_DEL_FILE        = rm -f
-QMAKE_DEL_DIR         = rmdir
-QMAKE_STRIP           = $(OE_QMAKE_STRIP)
-QMAKE_STRIPFLAGS_LIB += --strip-unneeded
-QMAKE_CHK_DIR_EXISTS  = test -d
-QMAKE_MKDIR           = mkdir -p
-QMAKE_INSTALL_FILE    = install -m 644 -p
-QMAKE_INSTALL_PROGRAM = install -m 755 -p
-
-include(unix.conf)
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/qte.sh b/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/qte.sh
deleted file mode 100644
index 21d6ecb..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-4.8.7/qte.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-if [ -e /dev/input/touchscreen0 ]
-then
-    QWS_MOUSE_PROTO=Tslib:/dev/input/touchscreen0
-    export QWS_MOUSE_PROTO
-fi
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-embedded.inc b/yocto-poky/meta/recipes-qt/qt4/qt4-embedded.inc
deleted file mode 100644
index a769065..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-embedded.inc
+++ /dev/null
@@ -1,74 +0,0 @@
-SUMMARY = "Cross-platform UI toolkit and application framework (framebuffer version)"
-DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is the embedded (framebuffer) version."
-SECTION = "libs"
-HOMEPAGE = "http://qt-project.org/"
-DEPENDS += "directfb tslib"
-
-QT4EDEPENDS = ""
-QT_BASE_LIB  ?= "libqt-embedded"
-
-# Set necessary variables in the profile
-SRC_URI += "file://qte.sh \
-            file://0033-configure-support-c-0x-standard-for-directfd.patch \
-"
-
-QT_EMBEDDED_FLAGS ?= " \
-    -embedded $QT_ARCH \
-    -qtlibinfix ${QT_LIBINFIX} \
-"
-QT_EMBEDDED_EXTRA_FLAGS ?= " \
-    -plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc -plugin-gfx-directfb \
-    -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb -qt-mouse-linuxinput \
-    -qt-kbd-tty -qt-kbd-linuxinput \
-"
-QT_EMBEDDED_KEYPAD_FLAGS ?= " \
-    -DQT_KEYPAD_NAVIGATION \
-"
-
-QT_CONFIG_FLAGS += "${QT_EMBEDDED_FLAGS} ${QT_EMBEDDED_EXTRA_FLAGS} ${QT_EMBEDDED_KEYPAD_FLAGS}"
-
-require qt4.inc
-
-do_install_append() {
-    install -d ${D}/${libdir}/fonts
-    touch ${D}/${libdir}/fonts/fontdir
-
-    install -d ${D}${sysconfdir}/profile.d/
-    install -m 0755 ${WORKDIR}/qte.sh ${D}${sysconfdir}/profile.d/
-}
-
-# We put the qte profile into it's own package as we don't want to install all qt stuff
-# with depending on the global package qt4-embedded
-PACKAGES += " ${PN}-conf"
-FILES_${PN}-conf += " ${sysconfdir}/profile.d/qte.sh"
-RRECOMMENDS_${PN} += " ${PN}-conf"
-
-OTHER_PACKAGES += "\
-             ${QT_BASE_NAME}-fonts \
-             ${QT_BASE_NAME}-fonts-ttf-vera \
-             ${QT_BASE_NAME}-fonts-ttf-dejavu \
-             ${QT_BASE_NAME}-fonts-pfa \
-             ${QT_BASE_NAME}-fonts-pfb \
-             ${QT_BASE_NAME}-fonts-qpf"
-
-RRECOMMENDS_${QT_BASE_NAME}-fonts = " \
-             ${QT_BASE_NAME}-fonts-ttf-vera \
-             ${QT_BASE_NAME}-fonts-ttf-dejavu \
-             ${QT_BASE_NAME}-fonts-pfa \
-             ${QT_BASE_NAME}-fonts-pfb \
-             ${QT_BASE_NAME}-fonts-qpf"
-RRECOMMENDS_${QT_BASE_NAME}-demos += " \
-            ${QT_BASE_NAME}-fonts"
-
-ALLOW_EMPTY_${QT_BASE_NAME}-fonts = "1"
-PACKAGES_DYNAMIC += "^${QT_BASE_NAME}-fonts-.*"
-
-FILES_${QT_BASE_NAME}-fonts-ttf-vera       = "${libdir}/fonts/Vera*.ttf"
-FILES_${QT_BASE_NAME}-fonts-ttf-dejavu     = "${libdir}/fonts/DejaVu*.ttf"
-FILES_${QT_BASE_NAME}-fonts-pfa            = "${libdir}/fonts/*.pfa"
-FILES_${QT_BASE_NAME}-fonts-pfb            = "${libdir}/fonts/*.pfb"
-FILES_${QT_BASE_NAME}-fonts-qpf            = "${libdir}/fonts/*.qpf*"
-FILES_${QT_BASE_NAME}-fonts                = "${libdir}/fonts/README ${libdir}/fonts/fontdir"
-
-inherit qt4e
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-embedded_4.8.7.bb b/yocto-poky/meta/recipes-qt/qt4/qt4-embedded_4.8.7.bb
deleted file mode 100644
index 1435d85..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-embedded_4.8.7.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require qt4-${PV}.inc
-require qt4-embedded.inc
-
-QT_CONFIG_FLAGS_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " -no-neon" ,d)}"
-
-QT_CONFIG_FLAGS += " \
- -exceptions \
-"
-
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-native.inc b/yocto-poky/meta/recipes-qt/qt4/qt4-native.inc
deleted file mode 100644
index 2a41f8a..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-native.inc
+++ /dev/null
@@ -1,112 +0,0 @@
-SUMMARY = "Qt version 4 tools and support files for the build host"
-DEPENDS = "zlib-native dbus-native"
-SECTION = "libs"
-HOMEPAGE = "http://qt-project.org/"
-PROVIDES = "qt4-tools-native"
-
-LICENSE = "LGPLv2.1 | GPLv3"
-LIC_FILES_CHKSUM = "file://LICENSE.LGPL;md5=fbc093901857fcd118f065f900982c24 \
-                    file://LICENSE.GPL3;md5=6e1694ee338db410417517884918d4d2 \
-                    file://LGPL_EXCEPTION.txt;md5=0145c4d1b6f96a661c2c139dfb268fb6"
-
-inherit native
-
-SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-everywhere-opensource-src-${PV}.tar.gz \
-           file://0001-qlibraryinfo-allow-to-set-qt.conf-from-the-outside-u.patch \
-           file://0002-qkbdtty_qws-fix-build-with-old-kernel-headers.patch \
-           file://0003-webkit2-set-OUTPUT_DIR-value-if-empty.patch \
-           file://0021-configure-make-qt4-native-work-with-long-building-pa.patch \
-           file://g++.conf \
-           file://linux.conf \
-	"
-S = "${WORKDIR}/qt-everywhere-opensource-src-${PV}"
-
-EXTRA_OECONF = "-prefix ${prefix} \
-                -bindir ${bindir} \
-                -libdir ${libdir} \
-                -datadir ${datadir}/qt4 \
-                -sysconfdir ${sysconfdir}/qt4 \
-                -docdir ${docdir}/qt4 \
-                -headerdir ${includedir}/qt4 \
-                -plugindir ${libdir}/qt4/plugins \
-                -importdir ${libdir}/qt4/imports \
-                -translationdir ${datadir}/qt4/translations \
-                -examplesdir ${bindir}/qt4/examples \
-                -demosdir ${bindir}/qt4/demos \
-                -L ${STAGING_LIBDIR_NATIVE} \
-                -I ${STAGING_INCDIR_NATIVE} \
-                -qt-libjpeg -system-zlib \
-                -no-libjpeg -no-libpng -no-libmng -no-libtiff \
-                -no-accessibility \
-                -no-cups \
-                -no-nas-sound \
-                -no-nis -no-openssl \
-                -verbose -release \
-                -embedded -no-freetype -no-glib -no-iconv \
-                -exceptions -xmlpatterns \
-                -qt3support \
-                -no-fast -silent -no-rpath"
-
-# yank default -e, otherwise we get the following error:
-# moc_qbuffer.cpp: No such file or directory
-EXTRA_OEMAKE = " "
-
-do_configure() {
-	# Avoid problems with Qt 4.8.0 configure setting QMAKE_LINK from LD (since we want the linker to be g++)
-	unset LD
-
-	(echo o; echo yes) | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
-}
-
-TOBUILD = "\
-  src/tools/moc \
-  src/corelib \
-  src/sql \
-  src/xml \
-  src/network \
-  src/tools/uic \
-  src/tools/rcc \
-  src/xmlpatterns \
-  src/dbus \
-  src/gui \
-  src/testlib \
-  src/qt3support \
-  src/tools/uic3 \
-  tools/linguist/lconvert \
-  tools/linguist/lrelease \
-  tools/linguist/lupdate \
-  tools/qdbus/qdbuscpp2xml \
-  tools/qdbus/qdbusxml2cpp \
-  tools/xmlpatterns \
-"
-
-do_compile() {
-	for i in ${TOBUILD}; do
-		cd ${S}/$i && oe_runmake CC="${CC}" CXX="${CXX}"
-	done
-}
-
-do_install() {
-	install -d ${D}${bindir}/
-	install -m 0755 bin/qmake ${D}${bindir}/qmake2
-	for i in moc uic uic3 rcc lconvert lrelease lupdate qdbuscpp2xml qdbusxml2cpp xmlpatterns; do
-		install -m 0755 bin/${i} ${D}${bindir}/${i}4
-	done
-    
-	install -d ${D}${datadir}/qt4/
-	cp -PfR mkspecs ${D}${datadir}/qt4/
-	ln -sf linux-g++ ${D}${datadir}/qt4/mkspecs/${BUILD_OS}-oe-g++
-	if [ -f ${D}${datadir}/qt4/mkspecs/common/g++-unix.conf ] ; then
-		# mkspecs were refactored for 4.8.0
-		cp -f ${WORKDIR}/g++.conf ${D}${datadir}/qt4/mkspecs/common/g++-unix.conf
-	else
-		cp -f ${WORKDIR}/g++.conf ${D}${datadir}/qt4/mkspecs/common/g++.conf
-	fi
-	cp -f ${WORKDIR}/linux.conf ${D}${datadir}/qt4/mkspecs/common/
-
-	install -m 0644 tools/porting/src/q3porting.xml ${D}${datadir}/qt4/
-
-	for i in ${TOBUILD}; do
-		cd ${S}/$i && oe_runmake install INSTALL_ROOT=${D}
-	done
-}
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-native_4.8.7.bb b/yocto-poky/meta/recipes-qt/qt4/qt4-native_4.8.7.bb
deleted file mode 100644
index 494d663..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-native_4.8.7.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require qt4-native.inc
-
-TOBUILD := "src/tools/bootstrap ${TOBUILD}"
-
-SRC_URI[md5sum] = "d990ee66bf7ab0c785589776f35ba6ad"
-SRC_URI[sha256sum] = "e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0"
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-x11-free.inc b/yocto-poky/meta/recipes-qt/qt4/qt4-x11-free.inc
deleted file mode 100644
index f6a1737..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-x11-free.inc
+++ /dev/null
@@ -1,38 +0,0 @@
-require qt4.inc
-
-SUMMARY = "Cross-platform UI toolkit and application framework (X11 version)"
-DESCRIPTION = "Qt is a versatile cross-platform application framework -- this is the X11 version."
-HOMEPAGE = "http://qt-project.org/"
-SECTION = "x11/libs"
-DEPENDS += "virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor"
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virtual/libgl', '', d)}"
-PROVIDES += "qt4-x11"
-QT4DEPENDS = ""
-
-QT_GLFLAGS ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '-opengl', '-no-opengl', d)} "
-QT_GLFLAGS_qemux86 = "-opengl"
-QT_GLFLAGS_qemuppc = "-opengl"
-QT_X11_FLAGS ?= "-no-xinerama -no-xkb -no-gtkstyle"
-QT_CONFIG_FLAGS += "${QT_X11_FLAGS}"
-QT_BASE_LIB  ?= "libqt"
-
-# required by kdelibs4
-QT_KDE_FLAGS ?= "-accessibility -sm"
-QT_DISTRO_FLAGS ?= "${QT_KDE_FLAGS}"
-
-inherit qt4x11
-
-do_install_append() {
-  # fix pkgconfig, libtool and prl files
-  sed -i -e 's#I/usr/include#Iincludedir}#g' \ 
-    -e 's#Iin#I${in#g' \
-    ${D}${libdir}/*.la ${D}${libdir}/*.prl ${D}${libdir}/pkgconfig/*.pc
-
-  # QT abuses $includedir to point to its headers, which breaks pkgconfig sysroot, so
-  # manually fix it up here:
-  for pc in ${D}${libdir}/pkgconfig/*.pc ; do
-    sed -i -e "s:prefix}include/${QT_BASE_NAME}/$(basename $pc .pc):prefix}/include:" \
-      -e "s,Cflags: ,Cflags: -IP{includedir}/${QT_BASE_NAME}/$(basename $pc .pc) ," \
-      -e 's:IP{:I${:g' $pc
-  done
-}
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4-x11-free_4.8.7.bb b/yocto-poky/meta/recipes-qt/qt4/qt4-x11-free_4.8.7.bb
deleted file mode 100644
index 5cb5e68..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4-x11-free_4.8.7.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require qt4-x11-free.inc
-require qt4-${PV}.inc
-
-QT_CONFIG_FLAGS_append_arm = "${@bb.utils.contains("TUNE_FEATURES", "neon", "", " -no-neon" ,d)}"
-
-QT_CONFIG_FLAGS += " \
- -no-embedded \
- -xrandr \
- -x11"
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4.inc b/yocto-poky/meta/recipes-qt/qt4/qt4.inc
deleted file mode 100644
index 2058e54..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4.inc
+++ /dev/null
@@ -1,391 +0,0 @@
-inherit qmake_base
-
-DEPENDS += "qt4-tools-native freetype jpeg libpng zlib dbus openssl glib-2.0 sqlite3 tiff icu"
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio', '', d)}"
-
-require qt4_arch.inc
-
-QT_DISTRO_FLAGS ?= "-no-accessibility -no-sm"
-QT_DISTRO_FLAGS_linuxstdbase = "-sm"
-
-QT_SQL_DRIVER_FLAGS ?= "-no-sql-ibase -no-sql-mysql -no-sql-psql -no-sql-odbc -no-sql-sqlite2 -plugin-sql-sqlite -system-sqlite"
-
-QT_GLFLAGS ?= ""
-
-  
-QT_QT3SUPPORT ?= "-qt3support"
-QT_XML ?= "-xmlpatterns"
-QT_WEBKIT ?= "-webkit"
-QT_PHONON ?= "-no-phonon"
-QT_DBUS ?= "-qdbus"
-QT_MULTIMEDIA ?= "${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', '-pulseaudio', '-no-pulseaudio', d)}"
- 
-QT_CONFIG_FLAGS += "-release -no-cups -reduce-relocations \
-                    -shared -no-nas-sound -no-nis \
-                    -system-libjpeg -system-libpng -system-libtiff -system-zlib \
-                    -no-pch -stl -glib -icu \
-                    -no-rpath -silent \
-		    -D USE_QTMULTIMEDIA=1 \
-                    ${QT_DBUS} \
-                    ${QT_QT3SUPPORT} \
-                    ${QT_WEBKIT} \
-                    ${QT_PHONON} \
-                    ${QT_XML} \
-                    ${QT_MULTIMEDIA} \
-                    ${QT_SQL_DRIVER_FLAGS} \
-                    ${QT_DISTRO_FLAGS} \
-                    ${QT_GLFLAGS}"
-
-EXTRA_OEMAKE = "-e"
-
-EXTRA_ENV = 'QMAKE="${STAGING_BINDIR_NATIVE}/qmake2 -after \
-             INCPATH+=${STAGING_INCDIR}/freetype2 LIBS+=-L${STAGING_LIBDIR}" \
-             QMAKESPEC="${QMAKESPEC}" LINK="${CXX} -Wl,-rpath-link,${STAGING_LIBDIR}" \
-             AR="${TARGET_PREFIX}ar cqs" \
-             MOC="${STAGING_BINDIR_NATIVE}/moc4" UIC="${STAGING_BINDIR_NATIVE}/uic4" MAKE="make -e"'
-
-export QT_CONF_PATH="${WORKDIR}/qt.conf"
-
-# Library packages
-QT_LIB_NAMES = "Qt3Support QtAssistantClient QtCLucene QtCore QtDBus QtDesigner QtDesignerComponents QtGui QtHelp QtNetwork QtOpenGL QtScript QtScriptTools QtSql QtSvg QtTest QtUiTools QtWebKit QtXml QtXmlPatterns phonon QtMultimedia QtOpenVG QtMediaServices QtDeclarative"
-
-QT_EXTRA_LIBS = "pvrQWSWSEGL"
-
-python __anonymous () {
-    lib_packages = []
-    dev_packages = []
-    dbg_packages = []
-    staticdev_packages = []
-    for name in d.getVar("QT_LIB_NAMES", True).split():
-        pkg = d.getVar("QT_BASE_LIB", True) + name.lower().replace("qt", "").replace("_", "-") + "4"
-        # NOTE: the headers for QtAssistantClient are different
-        incname = name.replace("QtAssistantClient", "QtAssistant")
-        d.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.so.*" % locals())
-        d.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s${QT_LIBINFIX}.prl
-                  ${libdir}/lib%(name)s${QT_LIBINFIX}.la
-                  ${libdir}/lib%(name)s${QT_LIBINFIX}.so
-                  ${includedir}/${QT_DIR_NAME}/%(incname)s
-                  ${libdir}/pkgconfig/%(name)s${QT_LIBINFIX}.pc""" % locals())
-        d.setVar("FILES_%s-staticdev" % pkg, "${libdir}/lib%(name)s${QT_LIBINFIX}.a" % locals())
-        d.setVar("FILES_%s-dbg" % pkg, "${libdir}/.debug/lib%(name)s${QT_LIBINFIX}.so*" % locals())
-        d.setVar("RRECOMMENDS_%s-dbg" % pkg, "${PN}-dbg")
-        lib_packages.append(pkg)
-        dev_packages.append("%s-dev" % pkg)
-        dbg_packages.append("%s-dbg" % pkg)
-        staticdev_packages.append("%s-staticdev" % pkg)
-    for name in d.getVar("OTHER_PACKAGES", True).split():
-        dbg_packages.append("%s-dbg" % name)
-        staticdev_packages.append("%s-staticdev" % name)
-
-    for name in d.getVar("QT_EXTRA_LIBS", True).split():
-        pkg = d.getVar("QT_BASE_LIB", True) + name.lower().replace("qt", "").replace("_", "-") + "4"
-        d.setVar("FILES_%s" % pkg, "${libdir}/lib%(name)s.so.*" % locals())
-        d.setVar("FILES_%s-staticdev" % pkg, "${libdir}/lib%(name)s.a" % locals())
-        d.setVar("FILES_%s-dev" % pkg, """${libdir}/lib%(name)s.prl
-                  ${libdir}/lib%(name)s.la
-                  ${libdir}/lib%(name)s.so
-                  ${includedir}/${QT_DIR_NAME}/%(incname)s
-                  ${libdir}/pkgconfig/%(name)s.pc""" % locals())
-        d.setVar("FILES_%s-dbg" % pkg, "${libdir}/.debug/lib%(name)s.so*" % locals())
-        d.setVar("RRECOMMENDS_%s-dbg" % pkg, "${PN}-dbg")
-        lib_packages.append(pkg)
-        dev_packages.append("%s-dev" % pkg)
-        dbg_packages.append("%s-dbg" % pkg)
-        staticdev_packages.append("%s-staticdev" % pkg)
-
-    d.setVar("LIB_PACKAGES", " ".join(lib_packages))
-    d.setVar("DEV_PACKAGES", " ".join(dev_packages))
-    d.setVar("DBG_PACKAGES", " ".join(dbg_packages))
-    d.setVar("STATICDEV_PACKAGES", " ".join(staticdev_packages))
-}
-
-OTHER_PACKAGES = "\
-             ${QT_BASE_NAME}-tools \
-             ${QT_BASE_NAME}-assistant \
-             ${QT_BASE_NAME}-common \
-             ${QT_BASE_NAME}-dbus \
-             ${QT_BASE_NAME}-demos \
-             ${QT_BASE_NAME}-designer \
-             ${QT_BASE_NAME}-examples \
-             ${QT_BASE_NAME}-linguist \
-             ${QT_BASE_NAME}-makeqpf \
-             ${QT_BASE_NAME}-mkspecs \
-             ${QT_BASE_NAME}-pixeltool \
-             ${QT_BASE_NAME}-qmlviewer \
-             ${QT_BASE_NAME}-xmlpatterns \
-             ${QT_BASE_NAME}-qt3to4 \
-             ${QT_BASE_NAME}-qml-plugins"
-
-#We prepend so ${QT_BASE_NAME}-demos-doc comes before ${PN}-doc,so the packaging of FILES_ get done before.
-PACKAGES =+ "${QT_BASE_NAME}-demos-doc"
-PACKAGES += " \
-             ${LIB_PACKAGES} \
-             ${DEV_PACKAGES} \
-             ${DBG_PACKAGES} \
-             ${STATICDEV_PACKAGES} \
-             ${OTHER_PACKAGES}"
-
-PACKAGES_DYNAMIC += "^${QT_BASE_NAME}-plugin-.* ^${QT_BASE_NAME}-translation-.* ^${QT_BASE_NAME}-phrasebook-.*"
-
-ALLOW_EMPTY_${PN} = "1"
-FILES_${PN}     = ""
-FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
-FILES_${PN}-dbg = "/usr/src/debug/"
-FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"
-RRECOMMENDS_${PN} = "${LIB_PACKAGES} ${OTHER_PACKAGES}"
-RRECOMMENDS_${PN}-dev = "${DEV_PACKAGES}"
-RRECOMMENDS_${PN}-dbg = "${DBG_PACKAGES}"
-RRECOMMENDS_${QT_BASE_LIB}core4_append_libc-glibc = " glibc-gconv-utf-16"
-RRECOMMENDS_${QT_BASE_NAME}-demos += " \
-            ${QT_BASE_NAME}-examples \
-            ${QT_BASE_NAME}-plugin-sqldriver-sqlite \
-            ${QT_BASE_NAME}-plugin-imageformat-jpeg \
-            ${QT_BASE_NAME}-qml-plugins \
-            ${QT_BASE_NAME}-assistant \
-            ${QT_BASE_NAME}-demos-doc"
-RRECOMMENDS_${QT_BASE_NAME}-examples += " \
-            ${QT_BASE_NAME}-plugin-sqldriver-sqlite \
-            ${QT_BASE_NAME}-plugin-imageformat-jpeg \
-            ${QT_BASE_NAME}-qml-plugins"
-RRECOMMENDS_${QT_BASE_NAME}-qmlviewer += " \
-            ${QT_BASE_NAME}-qml-plugins"
-RRECOMMENDS_${QT_BASE_NAME}-doc += " \
-            ${QT_BASE_NAME}-demos-doc"
-
-RPROVIDES_${QT_BASE_NAME}-tools += "qmake2"
-RREPLACES_${QT_BASE_NAME}-tools += "qmake2"
-
-FILES_${QT_BASE_NAME}-tools                = "${bindir}/qttracereplay ${bindir}/qdoc* ${bindir}/qmake ${bindir}/moc ${bindir}/uic* ${bindir}/rcc"
-FILES_${QT_BASE_NAME}-tools-dbg            = "${bindir}/.debug/qttracereplay ${bindir}/.debug/qdoc* ${bindir}/.debug/qmake ${bindir}/.debug/uic* ${bindir}/.debug/moc ${bindir}/.debug/rcc"
-FILES_${QT_BASE_NAME}-assistant            = "${bindir}/*assistant* ${bindir}/qcollectiongenerator ${bindir}/qhelpconverter ${bindir}/qhelpgenerator"
-FILES_${QT_BASE_NAME}-assistant-dbg        = "${bindir}/.debug/*assistant* ${bindir}/.debug/qcollectiongenerator ${bindir}/.debug/qhelpconverter ${bindir}/.debug/qhelpgenerator"
-FILES_${QT_BASE_NAME}-common               = "${bindir}/qtconfig"
-FILES_${QT_BASE_NAME}-common-dbg           = "${bindir}/.debug/qtconfig"
-FILES_${QT_BASE_NAME}-dbus                 = "${bindir}/qdbus ${bindir}/qdbusxml2cpp ${bindir}/qdbuscpp2xml ${bindir}/qdbusviewer"
-FILES_${QT_BASE_NAME}-dbus-dbg             = "${bindir}/.debug/qdbus ${bindir}/.debug/qdbusxml2cpp ${bindir}/.debug/qdbuscpp2xml ${bindir}/.debug/qdbusviewer"
-FILES_${QT_BASE_NAME}-demos                = "${bindir}/qtdemo* ${bindir}/${QT_DIR_NAME}/demos/*"
-FILES_${QT_BASE_NAME}-demos-staticdev      = "${bindir}/${QT_DIR_NAME}/demos/shared/libdemo_shared.a"
-FILES_${QT_BASE_NAME}-demos-dbg            = "${bindir}/.debug/qtdemo* ${bindir}/${QT_DIR_NAME}/demos/.debug/*  ${bindir}/${QT_DIR_NAME}/demos/*/.debug  ${bindir}/${QT_DIR_NAME}/demos/*/*/.debug  ${bindir}/${QT_DIR_NAME}/demos/*/*/*/.debug"
-FILES_${QT_BASE_NAME}-designer             = "${bindir}/*designer*"
-FILES_${QT_BASE_NAME}-designer-dbg         = "${bindir}/.debug/*designer*"
-FILES_${QT_BASE_NAME}-examples             = "${bindir}/${QT_DIR_NAME}/examples/*"
-FILES_${QT_BASE_NAME}-examples-staticdev   = "${bindir}/${QT_DIR_NAME}/examples/tools/plugandpaint/plugins/libpnp_basictools.a"
-FILES_${QT_BASE_NAME}-examples-dbg         = "${bindir}/${QT_DIR_NAME}/examples/.debug ${bindir}/${QT_DIR_NAME}/examples/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/*/*/*/*/.debug ${bindir}/${QT_DIR_NAME}/examples/declarative/*/*/*/*/*/.debug/* ${bindir}/${QT_DIR_NAME}/examples/declarative/*/*/*/*/.debug/*"
-FILES_${QT_BASE_NAME}-linguist             = "${bindir}/*linguist* ${bindir}/lrelease ${bindir}/lupdate ${bindir}/lconvert ${bindir}/qm2ts"
-FILES_${QT_BASE_NAME}-linguist-dbg         = "${bindir}/.debug/*linguist* ${bindir}/.debug/lrelease ${bindir}/.debug/lupdate ${bindir}/.debug/lconvert ${bindir}/.debug/qm2ts"
-FILES_${QT_BASE_NAME}-pixeltool            = "${bindir}/pixeltool"
-FILES_${QT_BASE_NAME}-pixeltool-dbg        = "${bindir}/.debug/pixeltool"
-FILES_${QT_BASE_NAME}-qt3to4               = "${bindir}/qt3to4 ${datadir}/${QT_DIR_NAME}/q3porting.xml"
-FILES_${QT_BASE_NAME}-qt3to4-dbg           = "${bindir}/.debug/qt3to4"
-FILES_${QT_BASE_NAME}-qmlviewer            = "${bindir}/qmlviewer"
-FILES_${QT_BASE_NAME}-qmlviewer-dbg        = "${bindir}/.debug/qmlviewer"
-FILES_${QT_BASE_NAME}-makeqpf              = "${bindir}/makeqpf"
-FILES_${QT_BASE_NAME}-makeqpf-dbg          = "${bindir}/.debug/makeqpf"
-FILES_${QT_BASE_NAME}-mkspecs              = "${datadir}/${QT_DIR_NAME}/mkspecs/* ${datadir}/${QT_DIR_NAME}/environment-setup"
-FILES_${QT_BASE_NAME}-xmlpatterns          = "${bindir}/xmlpatterns*"
-FILES_${QT_BASE_NAME}-xmlpatterns-dbg      = "${bindir}/.debug/xmlpatterns*"
-FILES_${QT_BASE_NAME}-qml-plugins          = "${libdir}/${QT_DIR_NAME}/imports/* ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/*"
-FILES_${QT_BASE_NAME}-qml-plugins-dbg      = "${libdir}/${QT_DIR_NAME}/imports/*/*/*/.debug/* ${libdir}/${QT_DIR_NAME}/imports/*/.debug ${libdir}/${QT_DIR_NAME}/plugins/qmltooling/.debug"
-INSANE_SKIP_${MLPREFIX}${QT_BASE_NAME}-examples      += "libdir"
-INSANE_SKIP_${MLPREFIX}${QT_BASE_NAME}-examples-dbg  += "libdir"
-
-# License options, to be set by the recipe if different values are needed
-QT_LICENSE_FILE ?= ""
-QT_LICENSE_FLAGS ?= "-opensource"
-
-do_configure() {
-	unset QMAKESPEC
-	unset QTDIR
-
-	set_arch
-	set_endian
-
-	if [ ! -e bin/qmake ]; then
-		ln -sf ${STAGING_BINDIR_NATIVE}/qmake2 bin/qmake
-	fi
-
-	if [ ! -e mkspecs/${TARGET_OS}-oe-g++ ]; then
-		ln -sf linux-g++ mkspecs/${TARGET_OS}-oe-g++
-	fi
-
-	if [ -f mkspecs/common/g++-unix.conf ] ; then
-		# mkspecs were refactored for 4.8.0
-		cp -f ${WORKDIR}/g++.conf mkspecs/common/g++-unix.conf
-	else
-		cp -f ${WORKDIR}/g++.conf mkspecs/common/g++.conf
-	fi
-	cp -f ${WORKDIR}/linux.conf mkspecs/common/
-
-	echo "[Paths]"                                 > $QT_CONF_PATH
-	echo "Prefix=${prefix}"                       >> $QT_CONF_PATH
-	echo "Documentation=${docdir}/${QT_DIR_NAME}" >> $QT_CONF_PATH
-	echo "Headers=${includedir}/${QT_DIR_NAME}"   >> $QT_CONF_PATH
-	echo "Libraries=${libdir}"                    >> $QT_CONF_PATH
-	echo "Binaries=${bindir}"                     >> $QT_CONF_PATH
-	echo "Plugins=${libdir}/${QT_DIR_NAME}/plugins" >> $QT_CONF_PATH
-	echo "Imports=${libdir}/${QT_DIR_NAME}/imports" >> $QT_CONF_PATH
-	echo "Data=${datadir}/${QT_DIR_NAME}"         >> $QT_CONF_PATH
-	echo "Translations=${datadir}/${QT_DIR_NAME}/translations" >> $QT_CONF_PATH
-	echo "Settings=${sysconfdir}/${QT_DIR_NAME}"  >> $QT_CONF_PATH
-	echo "Examples=${bindir}/${QT_DIR_NAME}/examples" >> $QT_CONF_PATH
-	echo "Demos=${bindir}/${QT_DIR_NAME}/demos"   >> $QT_CONF_PATH
-
-	${EXTRA_QMAKE_MUNGE}|| true
-
-	echo yes | QT_LICENSE_FILE="${QT_LICENSE_FILE}" ./configure -v \
-			-prefix ${prefix} \
-			-bindir ${bindir} \
-			-libdir ${libdir} \
-			-datadir ${datadir}/${QT_DIR_NAME} \
-			-sysconfdir ${sysconfdir}/${QT_DIR_NAME} \
-			-docdir ${docdir}/${QT_DIR_NAME} \
-			-headerdir ${includedir}/${QT_DIR_NAME} \
-			-plugindir ${libdir}/${QT_DIR_NAME}/plugins \
-			-importdir ${libdir}/${QT_DIR_NAME}/imports \
-			-translationdir ${datadir}/${QT_DIR_NAME}/translations \
-			-examplesdir ${bindir}/${QT_DIR_NAME}/examples \
-			-demosdir ${bindir}/${QT_DIR_NAME}/demos \
-			-platform ${TARGET_OS}-oe-g++ \
-			-xplatform ${TARGET_OS}-oe-g++ \
-			${QT_ENDIAN} \
-			-crossarch ${QT_ARCH} \
-			${QT_LICENSE_FLAGS} \
-			${QT_CONFIG_FLAGS} -no-fast \
-			-L${STAGING_LIBDIR} -I${STAGING_INCDIR} \
-			-I${STAGING_INCDIR}/freetype2
-}
-
-do_compile() {
-    # Fixup missing wsegl header in some SGX SDKs
-    if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then
-        cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/
-    fi
-
-    unset CFLAGS CXXFLAGS
-
-    oe_runmake ${EXTRA_ENV}
-
-    # Build target qmake
-    export QMAKESPEC="${S}/mkspecs/${TARGET_OS}-oe-g++"
-    cd ${S}/qmake
-    ${OE_QMAKE_QMAKE}
-    oe_runmake CC="${CC}" CXX="${CXX}"
-    cd ${S}
-}
-
-python populate_packages_prepend() {
-    translation_dir = d.expand('${datadir}/${QT_DIR_NAME}/translations/')
-    translation_name = d.expand('${QT_BASE_NAME}-translation-%s')
-    do_split_packages(d, translation_dir, '^(assistant|designer|linguist|qt|qtconfig|qvfb|qtscript)_(.*)\.qm$', translation_name, '${PN} translation for %s', extra_depends='' )
- 
-    phrasebook_dir = d.expand('${datadir}/${QT_DIR_NAME}/phrasebooks/')
-    phrasebook_name = d.expand('${QT_BASE_NAME}-phrasebook-%s')
-
-    if os.path.exists("%s%s" % (d.expand('${D}'), phrasebook_dir)):
-        do_split_packages(d, phrasebook_dir, '^(.*)\.qph$', phrasebook_name, '${PN} phrasebook for %s', extra_depends='' )
-    else:
-        bb.note("The path does not exist:", d.expand('${D}'), phrasebook_dir)
- 
-    # Package all the plugins and their -dbg version and create a meta package
-    def qtopia_split(path, name, glob):
-        """
-        Split the package into a normal and -dbg package and then add the
-        new packages to the meta package.
-        """
-        plugin_dir = d.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/' % path)
-        if not os.path.exists("%s%s" % (d.expand('${D}'), plugin_dir)):
-            bb.note("The path does not exist:", d.expand('${D}'), plugin_dir)
-            return
- 
-        plugin_name = d.expand('${QT_BASE_NAME}-plugin-%s-%%s' % name)
-        dev_packages = []
-        dev_hook = lambda file,pkg,b,c,d:dev_packages.append((file,pkg))
-        do_split_packages(d, plugin_dir, glob, plugin_name, '${PN} %s for %%s' % name, extra_depends='', hook=dev_hook)
-        # Create a -dbg package as well
-        plugin_dir_dbg = d.expand('${libdir}/${QT_DIR_NAME}/plugins/%s/.debug' % path)
-        packages = d.getVar('PACKAGES', False)
-        for (file,package) in dev_packages:
-            packages = "%s %s-dbg" % (packages, package)
-            file_name = os.path.join(plugin_dir_dbg, os.path.basename(file))
-            d.setVar("FILES_%s-dbg" % package, file_name)
-            d.setVar("DESCRIPTION_%s-dbg" % package, "${PN} %s for %s" % (name, package))
-
-        d.setVar('PACKAGES', packages)
-
-    qtopia_split('accessible',    'accessible',    '^libq(.*)\.so$')
-    qtopia_split('codecs',        'codec',         '^libq(.*)\.so$')
-    qtopia_split('decorations',   'decoration',    '^libqdecoration(.*)\.so$')
-    qtopia_split('designer',      'designer',      '^lib(.*)\.so$')
-    qtopia_split('gfxdrivers',    'gfxdriver',     '^libq(.*)\.so$')
-    qtopia_split('graphicssystems','graphicssystems', '^libq(.*)\.so$')
-    qtopia_split('kbddrivers',    'kbddriver',     '^libq(.*)kbddriver\.so$')
-    qtopia_split('mousedrivers',  'mousedriver',   '^libq(.*)mousedriver\.so$')
-    qtopia_split('iconengines',   'iconengine',    '^libq(.*)\.so$')
-    qtopia_split('imageformats',  'imageformat',   '^libq(.*)\.so$')
-    qtopia_split('inputmethods',  'inputmethod',   '^libq(.*)\.so$')
-    qtopia_split('sqldrivers',    'sqldriver',     '^libq(.*)\.so$')
-    qtopia_split('script',        'script',        '^libqtscript(.*)\.so$')
-    qtopia_split('styles',        'style',         '^libq(.*)\.so$')
-    qtopia_split('phonon_backend','phonon-backend','^libphonon_(.*)\.so$')
-    qtopia_split('bearer',        'bearer',        '^libq(.*)bearer\.so$')
-}
-
-do_install() {
-	oe_runmake install INSTALL_ROOT=${D}
-
-	# Install a proper target version of qmake
-	rm ${D}/${bindir}/qmake
-	install -m 0755 bin/qmake2 ${D}${bindir}/qmake
-
-	# fix pkgconfig, libtool and prl files
-	sed -i -e 's#-L${S}/lib/\?##g' \
-			-e 's#-L${STAGING_LIBDIR}/\?##g' \
-			-e 's#STAGING_LIBDIR}#libdir}'#g \
-			-e 's#-L${libdir}/\?##g' \
-			-e s#'$(OE_QMAKE_LIBS_X11)'#"${OE_QMAKE_LIBS_X11}"#g \
-			-e 's#" -Wl,-rpath-link,${S}/lib/\?"##g' \
-			-e 's#" -Wl,-rpath-link,${libdir}/\?"##g' \
-			-e 's#Iin#I${in#g' \
-			-e 's#-L\.\./\.\./WebCore/release\s\+-L\.\./\.\./JavaScriptCore/release\s\+-lwebcore##g' \
-			-e 's#-ljscore##g' \
-			${D}${libdir}/*.la ${D}${libdir}/*.prl ${D}${libdir}/pkgconfig/*.pc
-
-	# fix pkgconfig files
-	sed -i -e s#"moc_location=.*$"#"moc_location=${bindir}/moc4"# \
-			-e s#"uic_location=.*$"#"uic_location=${bindir}/uic4"# \
-			${D}${libdir}/pkgconfig/*.pc
-	for name in ${QT_LIB_NAMES}; do
-		sed -i -e /Requires/s#"${name}"#"${name}${QT_LIBINFIX}"#g ${D}${libdir}/pkgconfig/*.pc
-	done
-
-	# QT abuses $includedir to point to its headers, which breaks pkgconfig sysroot, so manually fix it up here:
-	for pc in ${D}${libdir}/pkgconfig/*.pc ; do
-		sed -i -e "s:prefix}/include/${QT_DIR_NAME}/$(basename $pc .pc):prefix}/include:" \
-				-e 's:IP{:I${:g' $pc
-	done
-
-	#Append an E to the qtdemo file
-	if [ -n "${QT_LIBINFIX}" ] ; then
-		[ -f ${D}${bindir}/qtdemo ] && mv ${D}${bindir}/qtdemo ${D}${bindir}/qtdemo${QT_LIBINFIX}
-	fi
-
-	script="${D}/${datadir}/${QT_DIR_NAME}/environment-setup"
-	touch $script
-	echo 'export QT_DIR_NAME=${QT_DIR_NAME}' >> $script
-	echo 'export QT_LIBINFIX=${QT_LIBINFIX}' >> $script
-	echo 'export OE_QMAKE_AR=ar' >> $script
-	echo 'export OE_QMAKE_CC=gcc' >> $script
-	echo 'export OE_QMAKE_CXX=g++' >> $script
-	echo 'export OE_QMAKE_LINK=g++' >> $script
-	echo 'export OE_QMAKE_LIBDIR_QT=${libdir}' >> $script
-	echo 'export OE_QMAKE_INCDIR_QT=${includedir}/${QT_DIR_NAME}' >> $script
-	echo 'export OE_QMAKE_MOC=${bindir}/moc' >> $script
-	echo 'export OE_QMAKE_UIC=${bindir}/uic' >> $script
-	echo 'export OE_QMAKE_UIC3=${bindir}/uic3' >> $script
-	echo 'export OE_QMAKE_RCC=${bindir}/rcc' >> $script
-	echo 'export OE_QMAKE_QDBUSCPP2XML=${bindir}/qdbuscpp2xml' >> $script
-	echo 'export OE_QMAKE_QDBUSXML2CPP=${bindir}/qdbusxml2cpp' >> $script
-	echo 'export OE_QMAKE_QT_CONFIG=${datadir}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
-	echo 'export QMAKESPEC=${datadir}/${QT_DIR_NAME}/mkspecs/linux-g++' >> $script
-	chmod 0755 $script
-}
diff --git a/yocto-poky/meta/recipes-qt/qt4/qt4_arch.inc b/yocto-poky/meta/recipes-qt/qt4/qt4_arch.inc
deleted file mode 100644
index e94c284..0000000
--- a/yocto-poky/meta/recipes-qt/qt4/qt4_arch.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-inherit siteinfo
-
-ARM_INSTRUCTION_SET = "arm"
-
-set_arch() {
-   case ${TARGET_ARCH} in
-       aarch64*) QT_ARCH=aarch64 ;;
-       arm*)     QT_ARCH=arm ;;
-       i*86*)    QT_ARCH=i386 ;;
-       mips*)    QT_ARCH=mips ;;
-       powerpc*) QT_ARCH=powerpc ;;
-       x86_64*)  QT_ARCH=x86_64 ;;
-   esac
-}
-
-set_endian() {
-    if [ ${SITEINFO_ENDIANNESS} = "le" ] ; then
-        QT_ENDIAN="-little-endian"
-    elif [ ${SITEINFO_ENDIANNESS} = "be" ] ; then
-        QT_ENDIAN="-big-endian"
-    fi
-}
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch b/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch
new file mode 100644
index 0000000..00fcc7d
--- /dev/null
+++ b/yocto-poky/meta/recipes-rt/rt-tests/files/0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch
@@ -0,0 +1,30 @@
+From 9640dde4241e1314b8e8ea35b0c8dab0b30ae51f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 3 Jan 2016 10:50:56 -0800
+Subject: [PATCH] Makefile: Set CC/AR variable only if it doesn't have a value
+
+This helps it compile with clang or any other compilers besides gcc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 1e4b7d1..2c2d396 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,6 +1,6 @@
+ VERSION = 0.96
+-CC=$(CROSS_COMPILE)gcc
+-AR=$(CROSS_COMPILE)ar
++CC?=$(CROSS_COMPILE)gcc
++AR?=$(CROSS_COMPILE)ar
+ 
+ OBJDIR = bld
+ 
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/files/0001-rt-tests-Allow-for-user-specified-PYLIB.patch b/yocto-poky/meta/recipes-rt/rt-tests/files/0001-rt-tests-Allow-for-user-specified-PYLIB.patch
deleted file mode 100644
index 8b493eb..0000000
--- a/yocto-poky/meta/recipes-rt/rt-tests/files/0001-rt-tests-Allow-for-user-specified-PYLIB.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 66765522b634952346f1a3ab7d00c7222a1f9361 Mon Sep 17 00:00:00 2001
-Message-Id: <66765522b634952346f1a3ab7d00c7222a1f9361.1347419597.git.dvhart@linux.intel.com>
-From: Darren Hart <dvhart@linux.intel.com>
-Date: Tue, 11 Sep 2012 15:19:30 -0700
-Subject: [PATCH 1/2] rt-tests: Allow for user-specified PYLIB
-
-Upstream-Status: Submitted
-
-Allow users (build systems) to specify PYLIB. This allows for a
-cross-build-system to specify the target PYLIB rather than the host
-PYLIB.
-
-Signed-off-by: Darren Hart <dvhart@linux.intel.com>
-CC: Clark Williams <williams@redhat.com>
-CC: John Kacur <jkacur@redhat.com>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 3a82407..61e2f9f 100644
---- a/Makefile
-+++ b/Makefile
-@@ -23,7 +23,7 @@ endif
- CFLAGS ?= -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include
- LDFLAGS ?=
- 
--PYLIB  := $(shell python -c 'import distutils.sysconfig;  print distutils.sysconfig.get_python_lib()')
-+PYLIB  ?= $(shell python -c 'import distutils.sysconfig;  print distutils.sysconfig.get_python_lib()')
- 
- ifndef DEBUG
- 	CFLAGS	+= -O2
--- 
-1.7.11.4
-
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/files/0002-rt-tests-Break-out-install_hwlatdetect.patch b/yocto-poky/meta/recipes-rt/rt-tests/files/0002-rt-tests-Break-out-install_hwlatdetect.patch
deleted file mode 100644
index bc6136f..0000000
--- a/yocto-poky/meta/recipes-rt/rt-tests/files/0002-rt-tests-Break-out-install_hwlatdetect.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From af93e580d005a2bba6ed36528003af4cf631adb8 Mon Sep 17 00:00:00 2001
-Message-Id: <af93e580d005a2bba6ed36528003af4cf631adb8.1347419597.git.dvhart@linux.intel.com>
-In-Reply-To: <66765522b634952346f1a3ab7d00c7222a1f9361.1347419597.git.dvhart@linux.intel.com>
-References: <66765522b634952346f1a3ab7d00c7222a1f9361.1347419597.git.dvhart@linux.intel.com>
-From: Darren Hart <dvhart@linux.intel.com>
-Date: Tue, 11 Sep 2012 14:51:10 -0700
-Subject: [PATCH 2/2] rt-tests: Break out install_hwlatdetect
-
-Upstream-Status: Submitted
-
-Allow hwlatdetect to be installed independently of the rest of the
-tests. This is convenient for build systems that package it separately
-due to the python dependency.
-
-Signed-off-by: Darren Hart <dvhart@linux.intel.com>
-CC: Clark Williams <williams@redhat.com>
-CC: John Kacur <jkacur@redhat.com>
----
- Makefile | 18 +++++++++++-------
- 1 file changed, 11 insertions(+), 7 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 61e2f9f..636e63b 100644
---- a/Makefile
-+++ b/Makefile
-@@ -119,21 +119,15 @@ changelog:
- 	git log >ChangeLog
- 
- .PHONY: install
--install: all
-+install: all install_hwlatdetect
- 	mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man4"
- 	mkdir -p "$(DESTDIR)$(srcdir)" "$(DESTDIR)$(mandir)/man8"
- 	cp $(TARGETS) "$(DESTDIR)$(bindir)"
--	if test -n "$(PYLIB)" ; then \
--		install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
--		rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
--		ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
--	fi
- 	install -D -m 644 src/backfire/backfire.c "$(DESTDIR)$(srcdir)/backfire/backfire.c"
- 	install -m 644 src/backfire/Makefile "$(DESTDIR)$(srcdir)/backfire/Makefile"
- 	gzip src/backfire/backfire.4 -c >"$(DESTDIR)$(mandir)/man4/backfire.4.gz"
- 	gzip src/cyclictest/cyclictest.8 -c >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz"
- 	gzip src/pi_tests/pi_stress.8 -c >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz"
--	gzip src/hwlatdetect/hwlatdetect.8 -c >"$(DESTDIR)$(mandir)/man8/hwlatdetect.8.gz"
- 	gzip src/ptsematest/ptsematest.8 -c >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz"
- 	gzip src/sigwaittest/sigwaittest.8 -c >"$(DESTDIR)$(mandir)/man8/sigwaittest.8.gz"
- 	gzip src/svsematest/svsematest.8 -c >"$(DESTDIR)$(mandir)/man8/svsematest.8.gz"
-@@ -141,6 +135,16 @@ install: all
- 	gzip src/backfire/sendme.8 -c >"$(DESTDIR)$(mandir)/man8/sendme.8.gz"
- 	gzip src/hackbench/hackbench.8 -c >"$(DESTDIR)$(mandir)/man8/hackbench.8.gz"
- 
-+.PHONY: install_hwlatdetect
-+install_hwlatdetect: hwlatdetect
-+	if test -n "$(PYLIB)" ; then \
-+		mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(mandir)/man8" ; \
-+		install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
-+		rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
-+		ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
-+		gzip src/hwlatdetect/hwlatdetect.8 -c >"$(DESTDIR)$(mandir)/man8/hwlatdetect.8.gz" ; \
-+	fi
-+
- .PHONY: release
- release: clean changelog
- 	mkdir -p releases
--- 
-1.7.11.4
-
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/files/Makefile-fix-gzip-command.patch b/yocto-poky/meta/recipes-rt/rt-tests/files/Makefile-fix-gzip-command.patch
deleted file mode 100644
index 0a35ddc..0000000
--- a/yocto-poky/meta/recipes-rt/rt-tests/files/Makefile-fix-gzip-command.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 07b5ed42d7041ccc084889eaa96817aa097bf461 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Tue, 3 Feb 2015 03:10:25 +0000
-Subject: [PATCH] Makefile: fix gzip command
-
-The "-c" doesn't work in command "gzip file -c", need use "gzip -c file"
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 219a591..c7d147a 100644
---- a/Makefile
-+++ b/Makefile
-@@ -144,7 +144,7 @@ install_hwlatdetect: hwlatdetect
- 		install -D -m 755 src/hwlatdetect/hwlatdetect.py $(DESTDIR)$(PYLIB)/hwlatdetect.py ; \
- 		rm -f "$(DESTDIR)$(bindir)/hwlatdetect" ; \
- 		ln -s $(PYLIB)/hwlatdetect.py "$(DESTDIR)$(bindir)/hwlatdetect" ; \
--		gzip src/hwlatdetect/hwlatdetect.8 -c >"$(DESTDIR)$(mandir)/man8/hwlatdetect.8.gz" ; \
-+		gzip -c src/hwlatdetect/hwlatdetect.8 >"$(DESTDIR)$(mandir)/man8/hwlatdetect.8.gz" ; \
- 	fi
- 
- .PHONY: release
--- 
-2.0.1
-
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/files/fix-re-install-failure.patch b/yocto-poky/meta/recipes-rt/rt-tests/files/fix-re-install-failure.patch
deleted file mode 100644
index e38ec92..0000000
--- a/yocto-poky/meta/recipes-rt/rt-tests/files/fix-re-install-failure.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Currently gzip on host is used. If host gzip is provided by pigz, it fails to
-redo install that pigz can't handle the option after file name. When run:
-
-gzip src/backfire/backfire.4 -c > OUTPUT_FILE
-
-File src/backfire/backfire.4 is zipped into backfire.4.gz but the OUTPUT_FILE
-is empty. When rerun do_install, it shows warning:
-
-| gzip: src/backfire/backfire.4 does not exist -- skipping
-
-and empty manual gzip files are created:
-
-$ file image/usr/share/man/man4/backfire.4.gz
-image/usr/share/man/man4/backfire.4.gz: empty
-
-Fix it by putting option '-c' before the file name.
-
-Upstream-Status: Pending
-
-Signed-off-by: Kai Kang <kai.kang@windriver.com>
----
---- git/Makefile.orig	2014-11-14 15:47:26.406638419 +0800
-+++ git/Makefile	2014-11-14 15:46:53.890637533 +0800
-@@ -127,15 +127,15 @@
- 	cp $(TARGETS) "$(DESTDIR)$(bindir)"
- 	install -D -m 644 src/backfire/backfire.c "$(DESTDIR)$(srcdir)/backfire/backfire.c"
- 	install -m 644 src/backfire/Makefile "$(DESTDIR)$(srcdir)/backfire/Makefile"
--	gzip src/backfire/backfire.4 -c >"$(DESTDIR)$(mandir)/man4/backfire.4.gz"
--	gzip src/cyclictest/cyclictest.8 -c >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz"
--	gzip src/pi_tests/pi_stress.8 -c >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz"
--	gzip src/ptsematest/ptsematest.8 -c >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz"
--	gzip src/sigwaittest/sigwaittest.8 -c >"$(DESTDIR)$(mandir)/man8/sigwaittest.8.gz"
--	gzip src/svsematest/svsematest.8 -c >"$(DESTDIR)$(mandir)/man8/svsematest.8.gz"
--	gzip src/pmqtest/pmqtest.8 -c >"$(DESTDIR)$(mandir)/man8/pmqtest.8.gz"
--	gzip src/backfire/sendme.8 -c >"$(DESTDIR)$(mandir)/man8/sendme.8.gz"
--	gzip src/hackbench/hackbench.8 -c >"$(DESTDIR)$(mandir)/man8/hackbench.8.gz"
-+	gzip -c src/backfire/backfire.4 >"$(DESTDIR)$(mandir)/man4/backfire.4.gz"
-+	gzip -c src/cyclictest/cyclictest.8 >"$(DESTDIR)$(mandir)/man8/cyclictest.8.gz"
-+	gzip -c src/pi_tests/pi_stress.8 >"$(DESTDIR)$(mandir)/man8/pi_stress.8.gz"
-+	gzip -c src/ptsematest/ptsematest.8 >"$(DESTDIR)$(mandir)/man8/ptsematest.8.gz"
-+	gzip -c src/sigwaittest/sigwaittest.8 >"$(DESTDIR)$(mandir)/man8/sigwaittest.8.gz"
-+	gzip -c src/svsematest/svsematest.8 >"$(DESTDIR)$(mandir)/man8/svsematest.8.gz"
-+	gzip -c src/pmqtest/pmqtest.8 >"$(DESTDIR)$(mandir)/man8/pmqtest.8.gz"
-+	gzip -c src/backfire/sendme.8 >"$(DESTDIR)$(mandir)/man8/sendme.8.gz"
-+	gzip -c src/hackbench/hackbench.8 >"$(DESTDIR)$(mandir)/man8/hackbench.8.gz"
- 
- .PHONY: install_hwlatdetect
- install_hwlatdetect: hwlatdetect
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/files/hackbench-fix-error-check.patch b/yocto-poky/meta/recipes-rt/rt-tests/files/hackbench-fix-error-check.patch
deleted file mode 100644
index d17fdff..0000000
--- a/yocto-poky/meta/recipes-rt/rt-tests/files/hackbench-fix-error-check.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-childinfo_t is a union that contains both signed (error) and unsigned
-(threadid) members. Thus a large threadid could appear as a negative error
-value, which will cause unexpected failures.
-
-childinfo_t should be changed to a struct, but it could potentially affect the
-performance. So we keep it as a union but only check error against -1. There is
-still a chance of false alarm but it's small.
-
-Upstream-Status: Pending
-
-Signed-off-by: Song.Li <Song.Li@windriver.com>
-Signed-off-by: Jesse Zhang <sen.zhang@windriver.com>
----
- src/hackbench/hackbench.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/hackbench/hackbench.c b/src/hackbench/hackbench.c
-index 8baeb23..dc0de8f 100644
---- a/src/hackbench/hackbench.c
-+++ b/src/hackbench/hackbench.c
-@@ -317,7 +317,7 @@ static unsigned int group(childinfo_t *child,
- 		ctx->wakefd = wakefd;
- 
- 		child[tab_offset+i] = create_worker(ctx, (void *)(void *)receiver);
--		if( child[tab_offset+i].error < 0 ) {
-+		if( child[tab_offset+i].error == -1 ) {
- 			return (i > 0 ? i-1 : 0);
- 		}
- 		snd_ctx->out_fds[i] = fds[1];
-@@ -332,7 +332,7 @@ static unsigned int group(childinfo_t *child,
- 		snd_ctx->num_fds = num_fds;
- 
- 		child[tab_offset+num_fds+i] = create_worker(snd_ctx, (void *)(void *)sender);
--		if( child[tab_offset+num_fds+i].error < 0 ) {
-+		if( child[tab_offset+num_fds+i].error == -1 ) {
- 			return (num_fds+i)-1;
- 		}
- 	}
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.92.bb b/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.92.bb
deleted file mode 100644
index 8319eb9..0000000
--- a/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.92.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Hardware latency detector"
-DESCRIPTION = "Python utility for controlling the kernel hardware latency detection module (hwlat_detector.ko)."
-HOMEPAGE = "http://git.kernel.org/?p=linux/kernel/git/clrkwllms/rt-tests.git"
-SECTION = "tests"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
-
-require rt-tests.inc
-
-EXTRA_OEMAKE += "PYLIB=${libdir}/python${PYTHON_BASEVERSION}/dist-packages"
-
-do_compile() {
-	oe_runmake hwlatdetect
-}
-
-do_install() {
-        oe_runmake install_hwlatdetect DESTDIR=${D} SBINDIR=${sbindir} \
-	           MANDIR=${mandir} INCLUDEDIR=${includedir}
-}
-
-FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
-RDEPENDS_${PN} = "python python-subprocess python-textutils"
-RRECOMMENDS_${PN} = "kernel-module-hwlat-detector"
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb b/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb
new file mode 100644
index 0000000..962069e
--- /dev/null
+++ b/yocto-poky/meta/recipes-rt/rt-tests/hwlatdetect_0.96.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Hardware latency detector"
+DESCRIPTION = "Python utility for controlling the kernel hardware latency detection module (hwlat_detector.ko)."
+HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
+SECTION = "tests"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+require rt-tests.inc
+
+EXTRA_OEMAKE += "PYLIB=${libdir}/python${PYTHON_BASEVERSION}/dist-packages"
+
+do_compile() {
+	oe_runmake hwlatdetect
+}
+
+do_install() {
+        oe_runmake install_hwlatdetect DESTDIR=${D} SBINDIR=${sbindir} \
+	           MANDIR=${mandir} INCLUDEDIR=${includedir}
+}
+
+FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/dist-packages/hwlatdetect.py"
+RDEPENDS_${PN} = "python python-subprocess python-textutils"
+RRECOMMENDS_${PN} = "kernel-module-hwlat-detector"
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc b/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc
index 871db13..76f9b3a 100644
--- a/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc
+++ b/yocto-poky/meta/recipes-rt/rt-tests/rt-tests.inc
@@ -1,14 +1,8 @@
-# Version v0.92
-PV = "0.92"
-SRCREV = "5f9f1e3fe327440a9d405f4af8feb16ff7a909eb"
+# Version v0.96
+PV = "0.96"
+SRCREV = "24f8c0175e04bab78e7555698e34d7002b01c87f"
 
-SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git \
-           file://0001-rt-tests-Allow-for-user-specified-PYLIB.patch \
-           file://0002-rt-tests-Break-out-install_hwlatdetect.patch \
-           file://hackbench-fix-error-check.patch \
-           file://Makefile-fix-gzip-command.patch \
-           file://fix-re-install-failure.patch \
-"
+SRC_URI = "git://git.kernel.org/pub/scm/utils/rt-tests/rt-tests.git"
 
 S = "${WORKDIR}/git"
 
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.92.bb b/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.92.bb
deleted file mode 100644
index fbe2f66..0000000
--- a/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.92.bb
+++ /dev/null
@@ -1,30 +0,0 @@
-SUMMARY = "Real-Time preemption testcases"
-HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
-SECTION = "tests"
-DEPENDS = "linux-libc-headers virtual/libc"
-LICENSE = "GPLv2 & GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
-                    file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=e768b8da44555fe63f65e5c497844cb5 \
-                    file://src/pi_tests/pi_stress.c;beginline=6;endline=19;md5=bd426a634a43ec612e9fbf125dfcc949"
-
-require rt-tests.inc
-inherit ptest
-
-SRC_URI += "file://run-ptest \
-            file://rt_bmark.py \
-           "
-# Do not install hwlatdetect
-EXTRA_OEMAKE += "PYLIB=''"
-
-do_install() {
-        oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
-                           INCLUDEDIR=${includedir}
-}
-
-do_install_ptest() {
-        cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
-}
-
-RDEPENDS_${PN}-ptest += " stress python python-subprocess python-multiprocessing python-datetime python-re python-lang"
-
-FILES_${PN} += "${prefix}/src/backfire"
diff --git a/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.96.bb b/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.96.bb
new file mode 100644
index 0000000..2f96fea
--- /dev/null
+++ b/yocto-poky/meta/recipes-rt/rt-tests/rt-tests_0.96.bb
@@ -0,0 +1,33 @@
+SUMMARY = "Real-Time preemption testcases"
+HOMEPAGE = "https://rt.wiki.kernel.org/index.php/Cyclictest"
+SECTION = "tests"
+DEPENDS = "linux-libc-headers virtual/libc"
+LICENSE = "GPLv2 & GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+                    file://src/cyclictest/cyclictest.c;beginline=7;endline=9;md5=e768b8da44555fe63f65e5c497844cb5 \
+                    file://src/pi_tests/pi_stress.c;beginline=6;endline=19;md5=bd426a634a43ec612e9fbf125dfcc949"
+
+require rt-tests.inc
+inherit ptest
+
+SRC_URI += "file://0001-Makefile-Set-CC-AR-variable-only-if-it-doesn-t-have-.patch \
+            file://run-ptest \
+            file://rt_bmark.py \
+           "
+# Do not install hwlatdetect
+EXTRA_OEMAKE += "PYLIB='' CROSS_COMPILE=${TARGET_PREFIX}"
+
+CFLAGS_prepend = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
+
+do_install() {
+        oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
+                           INCLUDEDIR=${includedir}
+}
+
+do_install_ptest() {
+        cp ${WORKDIR}/rt_bmark.py ${D}${PTEST_PATH}
+}
+
+RDEPENDS_${PN}-ptest += " stress python python-subprocess python-multiprocessing python-datetime python-re python-lang"
+
+FILES_${PN} += "${prefix}/src/backfire"
diff --git a/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine.inc b/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine.inc
index fa6b2b2..93538ed 100644
--- a/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine.inc
+++ b/yocto-poky/meta/recipes-sato/gtk-engines/gtk-sato-engine.inc
@@ -14,7 +14,6 @@
 PACKAGES += "gtk-theme-sato"
 FILES_${PN} = "${libdir}/gtk-2.0/*/engines/*.so "
 FILES_${PN}-dev = "${libdir}/gtk-2.0/*/engines/*.la"
-FILES_${PN}-dbg += " ${libdir}/gtk-2.0/*/engines/.debug"
 FILES_gtk-theme-sato = "${datadir}/icons ${datadir}/themes"
 
 inherit autotools-brokensep pkgconfig
diff --git a/yocto-poky/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb b/yocto-poky/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
new file mode 100644
index 0000000..93e5a4e
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/images/core-image-sato-sdk-ptest.bb
@@ -0,0 +1,6 @@
+require core-image-sato-sdk.bb
+
+DESCRIPTION += "Also includes ptest packages."
+
+IMAGE_FEATURES += "ptest-pkgs"
+
diff --git a/yocto-poky/meta/recipes-sato/images/core-image-sato-sdk.bb b/yocto-poky/meta/recipes-sato/images/core-image-sato-sdk.bb
index 62836f9..d7cc52b 100644
--- a/yocto-poky/meta/recipes-sato/images/core-image-sato-sdk.bb
+++ b/yocto-poky/meta/recipes-sato/images/core-image-sato-sdk.bb
@@ -4,11 +4,7 @@
 core-image-sato plus meta-toolchain, development headers and libraries to \
 form a standalone SDK."
 
-QT4PKG = "qt4-pkgs"
-QT4PKG_mips64 = ""
-QT4PKG_mips64n32 = ""
-
-IMAGE_FEATURES += "dev-pkgs tools-sdk ${QT4PKG} \
+IMAGE_FEATURES += "dev-pkgs tools-sdk \
 	tools-debug eclipse-debug tools-profile tools-testapps debug-tweaks ssh-server-openssh"
 
 IMAGE_INSTALL += "kernel-devsrc"
diff --git a/yocto-poky/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch b/yocto-poky/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch
new file mode 100644
index 0000000..46397dc
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/matchbox-desktop/files/0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch
@@ -0,0 +1,60 @@
+From 5fe37ef38500f858a22ecdf9bf69bf06e213bf68 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 22 Mar 2016 12:41:35 +0200
+Subject: [PATCH] Do nothing on delete-event when not STANDALONE
+
+This prevents an opportunistic alt-F4 from closing the desktop.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+
+Upstream-Status: Backport
+---
+ src/desktop.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/desktop.c b/src/desktop.c
+index d4fc2fb..94b4ddf 100644
+--- a/src/desktop.c
++++ b/src/desktop.c
+@@ -122,6 +122,15 @@ load_items (TakuMenu *menu)
+ 
+ }
+ 
++#ifndef STANDALONE
++static gboolean
++delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
++{
++  /* prevent default handler from destroying the window */
++  return TRUE;
++}
++#endif
++
+ static void
+ workarea_changed (int x, int y, int w, int h)
+ {
+@@ -144,11 +153,11 @@ create_desktop (void)
+   gtk_icon_size_register ("taku-icon", 64, 64);
+ 
+   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+-  g_signal_connect (window, "delete-event", G_CALLBACK (gtk_main_quit), NULL);
+   gtk_widget_set_name (window, "TakuWindow");
+   gtk_window_set_title (GTK_WINDOW (window), _("Desktop"));
+ 
+ #ifndef STANDALONE
++  g_signal_connect (window, "delete-event", G_CALLBACK (delete_event_cb), NULL);
+   gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DESKTOP);
+   gtk_window_set_skip_taskbar_hint (GTK_WINDOW (window), TRUE);
+ 
+@@ -156,6 +165,7 @@ create_desktop (void)
+   screen_w = gdk_screen_get_width (screen);
+   screen_h = gdk_screen_get_height (screen);
+ #else
++  g_signal_connect (window, "delete-event", G_CALLBACK (gtk_main_quit), NULL);
+   screen_w = 640;
+   screen_h = 480;
+ #endif
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_git.bb b/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_git.bb
index 318d2e0..dbe8c11 100644
--- a/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_git.bb
+++ b/yocto-poky/meta/recipes-sato/matchbox-desktop/matchbox-desktop_git.bb
@@ -13,7 +13,9 @@
 SRCREV = "71e3e6e04271e9d5a14f1c231ef100c7f320134d"
 PV = "2.0+git${SRCPV}"
 
-SRC_URI = "git://git.yoctoproject.org/${BPN}-2"
+SRC_URI = "git://git.yoctoproject.org/${BPN}-2 \
+           file://0001-Do-nothing-on-delete-event-when-not-STANDALONE.patch \
+           "
 
 EXTRA_OECONF = "--enable-startup-notification --with-dbus"
 
diff --git a/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/0001-desktop-file-Hide-the-keyboard-from-app-list.patch b/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/0001-desktop-file-Hide-the-keyboard-from-app-list.patch
new file mode 100644
index 0000000..6b7a5cf
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/0001-desktop-file-Hide-the-keyboard-from-app-list.patch
@@ -0,0 +1,33 @@
+From 38da4cd575edb7463cfff241afff64c2f66ea09a Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Tue, 12 Apr 2016 09:40:37 +0300
+Subject: [PATCH] desktop file: Hide the keyboard from app list
+
+matchbox-keyboard is not a normal app and there's no need to start
+it via the desktop app grid when using Sato desktop:
+* when there's no hardware keyboard, the panel applet can be used to
+  show/hide the daemonized matchbox-keyboard
+* when there is a hardware keyboard, matchbox-keyboard can still be
+  started for debug purposes from command line or the applet can be
+  enabled by editing /etc/formfactor/machconfig
+
+So hide the keyboard from the desktop app list.
+
+Upstream-Status: Inappropriate [configuration]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ matchbox-keyboard.desktop | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/matchbox-keyboard.desktop b/matchbox-keyboard.desktop
+index c092bfe..613d349 100644
+--- a/matchbox-keyboard.desktop
++++ b/matchbox-keyboard.desktop
+@@ -6,3 +6,4 @@ Type=Application
+ Icon=matchbox-keyboard.png
+ Categories=Panel;Utility;MB
+ X-MB-INPUT-MECHANSIM=True
++NoDisplay=true
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/single-instance.patch b/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/single-instance.patch
deleted file mode 100644
index 18b6c41..0000000
--- a/yocto-poky/meta/recipes-sato/matchbox-keyboard/files/single-instance.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Multiple matchbox-keyboard instances would occupy whole screen and cause X
-window segfault(Bug 509). Making matchbox-keyboard singleton is one work
-around.
-
-This patch allow only one instance of matchbox-keyboard based on some mechanism
-in matchbox-desktop. In future, an applet and GTK-IM modules in
-matchbox-keyboard can be used to automatically map/unmap the virtual keyboard
-on demand.
-
-Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
-
-Upstream-Status: Inappropriate [configuration]
-
-Index: matchbox-keyboard/matchbox-keyboard.desktop
-===================================================================
---- matchbox-keyboard.orig/matchbox-keyboard.desktop	2010-12-22 20:41:40.000000000 +0800
-+++ matchbox-keyboard/matchbox-keyboard.desktop	2010-12-22 20:42:12.000000000 +0800
-@@ -6,3 +6,5 @@
- Icon=matchbox-keyboard.png
- Categories=Panel;Utility;MB
- X-MB-INPUT-MECHANSIM=True
-+X-MB-SingleInstance=true
-+StartupNotify=true
diff --git a/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb b/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
index 0d321d3..eba1970 100644
--- a/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
+++ b/yocto-poky/meta/recipes-sato/matchbox-keyboard/matchbox-keyboard_git.bb
@@ -10,12 +10,12 @@
 
 DEPENDS = "libfakekey expat libxft gtk+ matchbox-panel-2"
 
-SRCREV = "217f1bfe14c41cf7e291d04a63aa2d79cc13d063"
+SRCREV = "ebc330eac8b9d38e9aef9f01e7241c904bd01073"
 PV = "0.0+git${SRCPV}"
 PR = "r4"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN};branch=matchbox-keyboard-0-1 \
-           file://single-instance.patch \
+           file://0001-desktop-file-Hide-the-keyboard-from-app-list.patch \
            file://80matchboxkeyboard.sh"
 
 S = "${WORKDIR}/git"
@@ -35,8 +35,6 @@
 	       ${datadir}/pixmaps \
 	       ${datadir}/matchbox-keyboard"
 
-FILES_${PN}-dbg += "${libdir}/gtk-2.0/*/immodules/.debug"
-
 FILES_${PN}-im = "${libdir}/gtk-2.0/*/immodules/*.so"
 
 FILES_${PN}-applet = "${libdir}/matchbox-panel/*.so"
diff --git a/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-showdesktop-Make-sure-active-state-is-initialized.patch b/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-showdesktop-Make-sure-active-state-is-initialized.patch
new file mode 100644
index 0000000..3bab6d2
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/matchbox-panel-2/files/0001-showdesktop-Make-sure-active-state-is-initialized.patch
@@ -0,0 +1,50 @@
+From a0b5fca04da208990f3c40e65dbb045da4cdb35e Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Sun, 20 Mar 2016 13:24:37 +0200
+Subject: [PATCH] showdesktop: Make sure active state is initialized
+
+There are cases (in qemu at least) where set_active()
+is never called on startup. Make sure we initialize the active
+state so the icon gets loaded and the applet is not confused
+about the current state.
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+
+Upstream-Status: Backport
+---
+ applets/showdesktop/showdesktop.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/applets/showdesktop/showdesktop.c b/applets/showdesktop/showdesktop.c
+index 61dd5c2..33c13e1 100644
+--- a/applets/showdesktop/showdesktop.c
++++ b/applets/showdesktop/showdesktop.c
+@@ -181,6 +181,12 @@ button_clicked_cb (GtkButton         *button,
+ 	            &xev);
+ }
+ 
++static void
++realize_cb (GtkWidget *button, ShowDesktopApplet *applet)
++{
++        sync_applet (applet);
++}
++
+ G_MODULE_EXPORT GtkWidget *
+ mb_panel_applet_create (const char    *id,
+                         GtkOrientation orientation)
+@@ -216,6 +222,10 @@ mb_panel_applet_create (const char    *id,
+                           "clicked",
+                           G_CALLBACK (button_clicked_cb),
+                           applet);
++        g_signal_connect (button,
++                          "realize",
++                          G_CALLBACK (realize_cb),
++                          applet);
+ 
+         g_object_weak_ref (G_OBJECT (button),
+                            (GWeakNotify) show_desktop_applet_free,
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_git.bb b/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_git.bb
index 4ed7368..98c3ae4 100644
--- a/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_git.bb
+++ b/yocto-poky/meta/recipes-sato/matchbox-panel-2/matchbox-panel-2_git.bb
@@ -22,6 +22,7 @@
 RCONFLICTS_${PN} = "matchbox-panel"
 
 SRC_URI = "git://git.yoctoproject.org/${BPN} \
+           file://0001-showdesktop-Make-sure-active-state-is-initialized.patch \
            file://silence-warnings.patch"
 
 EXTRA_OECONF = "--enable-startup-notification --enable-dbus"
@@ -33,7 +34,6 @@
 FILES_${PN} += "${libdir}/matchbox-panel/*.so \
                 ${datadir}/matchbox-panel/brightness/*.png \
                 ${datadir}/matchbox-panel/startup/*.png "
-FILES_${PN}-dbg += "${libdir}/matchbox-panel/.debug"
 FILES_${PN}-dev += "${libdir}/matchbox-panel/*.la"
 
 inherit autotools pkgconfig distro_features_check
diff --git a/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb b/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
index 6679db8..8ba4923 100644
--- a/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
+++ b/yocto-poky/meta/recipes-sato/packagegroups/packagegroup-core-x11-sato.bb
@@ -9,7 +9,6 @@
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 inherit packagegroup distro_features_check
-# rdepends on x11vnc
 REQUIRED_DISTRO_FEATURES = "x11"
 
 PACKAGES = "${PN} ${PN}-base ${PN}-apps ${PN}-games"
@@ -39,12 +38,10 @@
     libsdl \
     ${NETWORK_MANAGER} \
     udev-extraconf \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-server pulseaudio-client-conf-sato', '', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'pulseaudio', 'pulseaudio-server pulseaudio-client-conf-sato pulseaudio-misc', '', d)} \
     "
 
-# pcmanfm doesn't work on mips
 FILEMANAGER ?= "pcmanfm"
-FILEMANAGER_mips ?= ""
 
 WEB ?= ""
 #WEB = "epiphany"
@@ -53,7 +50,6 @@
 RDEPENDS_${PN}-apps = "\
     leafpad \
     gst-player-bin \
-    x11vnc \
     matchbox-terminal \
     sato-screenshot \
     ${FILEMANAGER} \
diff --git a/yocto-poky/meta/recipes-sato/pcmanfm/files/no-desktop.patch b/yocto-poky/meta/recipes-sato/pcmanfm/files/no-desktop.patch
index 103d6d1..ae54dbd 100644
--- a/yocto-poky/meta/recipes-sato/pcmanfm/files/no-desktop.patch
+++ b/yocto-poky/meta/recipes-sato/pcmanfm/files/no-desktop.patch
@@ -11,5 +11,5 @@
 @@ -7,3 +7,4 @@ Exec=pcmanfm --desktop-pref
  StartupNotify=true
  Terminal=false
- NotShowIn=GNOME;XFCE;KDE;
+ NotShowIn=GNOME;XFCE;KDE;MATE;
 +NoDisplay=true
diff --git a/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb b/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb
deleted file mode 100644
index b63db87..0000000
--- a/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.3.bb
+++ /dev/null
@@ -1,40 +0,0 @@
-SUMMARY = "Fast lightweight tabbed filemanager"
-HOMEPAGE = "http://pcmanfm.sourceforge.net/"
-
-LICENSE = "GPLv2 & GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-                    file://src/pcmanfm.h;endline=22;md5=417b3855771a3a87f8ad753d994491f0 \
-                    file://src/gseal-gtk-compat.h;endline=21;md5=46922c8691f58d124f9420fe16149ce2"
-
-SECTION = "x11"
-DEPENDS = "gtk+ startup-notification libfm intltool-native gettext-native"
-DEPENDS_append_poky = " libowl"
-
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|aarch64.*|arm.*|mips.*|powerpc.*|sh.*)-(linux|freebsd.*)'
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.xz \
-	   file://gnome-fs-directory.png \
-	   file://gnome-fs-regular.png \
-	   file://gnome-mime-text-plain.png \
-	   file://emblem-symbolic-link.png \
-	   file://no-desktop.patch"
-
-SRC_URI[md5sum] = "c993402d407b0a3fc076f842ac1bc5c9"
-SRC_URI[sha256sum] = "cfa8d82fc63be147045174bef074807e1e32ce8c6bf4dbd8fad49e260bcf6380"
-
-inherit autotools pkgconfig distro_features_check
-
-# The startup-notification requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-do_install_append () {
-	install -d ${D}/${datadir}
-	install -d ${D}/${datadir}/pixmaps/
-
-	install -m 0644 ${WORKDIR}/*.png ${D}/${datadir}/pixmaps
-}
-
-FILES_${PN} += "${libdir}/pcmanfm"
-
-RRECOMMENDS_${PN} += "adwaita-icon-theme"
diff --git a/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb b/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb
new file mode 100644
index 0000000..a6b0aac
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/pcmanfm/pcmanfm_1.2.4.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Fast lightweight tabbed filemanager"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "GPLv2 & GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+                    file://src/pcmanfm.h;endline=22;md5=417b3855771a3a87f8ad753d994491f0 \
+                    file://src/gseal-gtk-compat.h;endline=21;md5=46922c8691f58d124f9420fe16149ce2"
+
+SECTION = "x11"
+DEPENDS = "gtk+ startup-notification libfm intltool-native gettext-native"
+DEPENDS_append_poky = " libowl"
+
+
+COMPATIBLE_HOST = '(x86_64.*|i.86.*|aarch64.*|arm.*|mips.*|powerpc.*|sh.*)-(linux|freebsd.*)'
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/pcmanfm-${PV}.tar.xz \
+	   file://gnome-fs-directory.png \
+	   file://gnome-fs-regular.png \
+	   file://gnome-mime-text-plain.png \
+	   file://emblem-symbolic-link.png \
+	   file://no-desktop.patch"
+
+SRC_URI[md5sum] = "19764c2f59653724c8713e0064fa6829"
+SRC_URI[sha256sum] = "38cdbb5f01d24483b41b8e6846e4aa66a5751bb3982a8618899e88a853dbe313"
+
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/pcmanfm/files/PCManFM%20%2B%20Libfm%20%28tarball%20release%29/PCManFM/"
+
+inherit autotools pkgconfig distro_features_check
+
+# The startup-notification requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+do_install_append () {
+	install -d ${D}/${datadir}
+	install -d ${D}/${datadir}/pixmaps/
+
+	install -m 0644 ${WORKDIR}/*.png ${D}/${datadir}/pixmaps
+}
+
+FILES_${PN} += "${libdir}/pcmanfm"
+
+RRECOMMENDS_${PN} += "adwaita-icon-theme"
diff --git a/yocto-poky/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch b/yocto-poky/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
new file mode 100644
index 0000000..5351f8e
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/puzzles/files/0001-palisade-Fix-warnings-with-clang-on-arm.patch
@@ -0,0 +1,72 @@
+From 6d8326275802a2e6e61d3e99460af6891ae8362f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 13 Jan 2016 23:10:19 -0800
+Subject: [puzzles][PATCH] palisade: Fix warnings with clang on arm
+
+ARM treats 'char' as unsigned char when 'char' is not qualified with
+'signed' or 'unsigned' explicitly.
+
+This results in warnings e.g.
+
+palisade.c:531:22: error: comparison of constant -1 with expression of
+type 'clue' (aka 'char') is always false
+[-Werror,-Wtautological-constant-out-of-range-compare]
+        if (clues[i] == EMPTY) continue;
+
+Therefore, typcast the contant to char in such places to be explicit
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ palisade.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/palisade.c b/palisade.c
+index 984e616..2b9c25c 100644
+--- a/palisade.c
++++ b/palisade.c
+@@ -295,11 +295,11 @@ static void solver_connected_clues_versus_region_size(solver_ctx *ctx)
+      * If p = q = 3 then the region has size exactly 2. */
+ 
+     for (i = 0; i < wh; ++i) {
+-        if (ctx->clues[i] == EMPTY) continue;
++        if (ctx->clues[i] == (char)EMPTY) continue;
+         for (dir = 0; dir < 4; ++dir) {
+             int j = i + dx[dir] + w*dy[dir];
+             if (disconnected(ctx, i, j, dir)) continue;
+-            if (ctx->clues[j] == EMPTY) continue;
++            if (ctx->clues[j] == (char)EMPTY) continue;
+             if ((8 - ctx->clues[i] - ctx->clues[j] > ctx->params->k) ||
+                 (ctx->clues[i] == 3 && ctx->clues[j] == 3 &&
+                  ctx->params->k != 2))
+@@ -317,7 +317,7 @@ static int solver_number_exhausted(solver_ctx *ctx)
+     int changed = FALSE;
+ 
+     for (i = 0; i < wh; ++i) {
+-        if (ctx->clues[i] == EMPTY) continue;
++        if (ctx->clues[i] == (char)EMPTY) continue;
+ 
+         if (bitcount[(ctx->borders[i] & BORDER_MASK)] == ctx->clues[i]) {
+             for (dir = 0; dir < 4; ++dir) {
+@@ -528,7 +528,7 @@ static int is_solved(const game_params *params, clue *clues,
+     for (i = 0; i < wh; ++i) {
+         if (dsf[i] == UNVISITED) dfs_dsf(i, params->w, border, dsf, TRUE);
+         if (dsf_size(dsf, i) != k) goto error;
+-        if (clues[i] == EMPTY) continue;
++        if (clues[i] == (char)EMPTY) continue;
+         if (clues[i] != bitcount[border[i] & BORDER_MASK]) goto error;
+     }
+ 
+@@ -674,7 +674,7 @@ static char *new_game_desc(const game_params *params, random_state *rs,
+     p = numbers;
+     r = 0;
+     for (i = 0; i < wh; ++i) {
+-        if (numbers[i] != EMPTY) {
++        if (numbers[i] != (char)EMPTY) {
+             while (r) {
+                 while (r > 26) {
+                     *p++ = 'z';
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch b/yocto-poky/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
new file mode 100644
index 0000000..0b971c4
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/puzzles/files/0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch
@@ -0,0 +1,32 @@
+From 78d6d1706c21ad467520075ff7a8bf15cfbd68b3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 30 Dec 2015 22:13:16 +0000
+Subject: [PATCH] rect: Fix compiler errors about uninitialized use of
+ variables
+
+error: 'r2.x' may be used uninitialized in this function
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ rect.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/rect.c b/rect.c
+index 55667c0..fa3a786 100644
+--- a/rect.c
++++ b/rect.c
+@@ -1317,7 +1317,8 @@ static char *new_game_desc(const game_params *params_in, random_state *rs,
+                     if (ndirs > 0) {
+                         int which, dir;
+                         struct rect r1, r2;
+-
++                        memset(&r1, 0, sizeof(struct rect));
++                        memset(&r2, 0, sizeof(struct rect));
+                         which = random_upto(rs, ndirs);
+                         dir = dirs[which];
+ 
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch b/yocto-poky/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
index d246fee..c134acd 100644
--- a/yocto-poky/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
+++ b/yocto-poky/meta/recipes-sato/puzzles/files/fix-compiling-failure-with-option-g-O.patch
@@ -29,15 +29,6 @@
 index a2eba2c..c54bf63 100644
 --- a/gtk.c
 +++ b/gtk.c
-@@ -381,7 +381,7 @@ static void clear_backing_store(frontend *fe)
- 
- static void setup_backing_store(frontend *fe)
- {
--    cairo_t *cr;
-+    cairo_t *cr = NULL;
-     int i;
- 
-     fe->pixmap = gdk_pixmap_new(fe->area->window, fe->pw, fe->ph, -1);
 @@ -2481,7 +2481,7 @@ char *fgetline(FILE *fp)
  int main(int argc, char **argv)
  {
diff --git a/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb b/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb
index 9876fe0..dfa68a6 100644
--- a/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb
+++ b/yocto-poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb
@@ -60,7 +60,6 @@
 RDEPENDS_${PN}-extra += "oh-puzzles"
 
 FILES_${PN} = "/usr/share/pixmaps /usr/share/oh-puzzles/"
-FILES_${PN}-dbg += "/usr/games/.debug/*"
 FILES_${PN}-extra = "/usr/games/ /usr/share/applications /etc/gconf/schemas"
 
 python __anonymous () {
diff --git a/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb b/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
index 95826c1..346f43b 100644
--- a/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
+++ b/yocto-poky/meta/recipes-sato/puzzles/puzzles_git.bb
@@ -1,7 +1,7 @@
 SUMMARY = "Simon Tatham's Portable Puzzle Collection"
 HOMEPAGE = "http://www.chiark.greenend.org.uk/~sgtatham/puzzles/"
 
-DEPENDS = "gtk+ libxt"
+DEPENDS = "libxt"
 
 # The libxt requires x11 in DISTRO_FEATURES
 REQUIRED_DISTRO_FEATURES = "x11"
@@ -12,21 +12,26 @@
 SRC_URI = "git://git.tartarus.org/simon/puzzles.git \
            file://fix-compiling-failure-with-option-g-O.patch \
            file://0001-Use-labs-instead-of-abs.patch \
+           file://0001-rect-Fix-compiler-errors-about-uninitialized-use-of-.patch \
+           file://0001-palisade-Fix-warnings-with-clang-on-arm.patch \
 "
-SRCREV = "c296301a06ce49b87c954c9d15452521dfeddf1a"
+SRCREV = "346584bf6e38232be8773c24fd7dedcbd7b3d9ed"
 PE = "1"
 PV = "0.0+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-inherit autotools-brokensep distro_features_check
+inherit autotools-brokensep distro_features_check pkgconfig
+
+PACKAGECONFIG ??= "gtk2"
+PACKAGECONFIG[gtk2] = "--with-gtk=2,,gtk+,"
+PACKAGECONFIG[gtk3] = "--with-gtk=3,,gtk+3,"
 
 do_configure_prepend () {
     ./mkfiles.pl
 }
 
 FILES_${PN} = "${prefix}/bin/* ${datadir}/applications/*"
-FILES_${PN}-dbg += "${prefix}/bin/.debug"
 
 do_install () {
     rm -rf ${D}/*
diff --git a/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc b/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
index 04a43c0..4d5daa6 100644
--- a/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
+++ b/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode.inc
@@ -5,7 +5,7 @@
 (either UCS-2 or UCS-4) and to use locale-correct input and \
 output. It also supports mixing multiple fonts at the \
 same time, including Xft fonts."
-DEPENDS = "virtual/libx11 libxt libxft gdk-pixbuf"
+DEPENDS = "virtual/libx11 libxt libxft gdk-pixbuf libxmu"
 
 SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \
 	   file://xwc.patch \
diff --git a/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb b/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb
deleted file mode 100644
index 7049495..0000000
--- a/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.21.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require rxvt-unicode.inc
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://src/main.C;beginline=1;endline=31;md5=7dac0395806570856e037f98aba8513b"
-
-SRC_URI[md5sum] = "a9a06c608258c5fd247c3725d8f44582"
-SRC_URI[sha256sum] = "75270ed72bc5895a64a1d7392bf45a622204192371c3965bd3dd978dc088956b"
diff --git a/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.22.bb b/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.22.bb
new file mode 100644
index 0000000..bfa8a61
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/rxvt-unicode/rxvt-unicode_9.22.bb
@@ -0,0 +1,8 @@
+require rxvt-unicode.inc
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://src/main.C;beginline=1;endline=31;md5=d3600d7ee1062667fcd1193fbe6485f6"
+
+SRC_URI[md5sum] = "93782dec27494eb079467dacf6e48185"
+SRC_URI[sha256sum] = "e94628e9bcfa0adb1115d83649f898d6edb4baced44f5d5b769c2eeb8b95addd"
diff --git a/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_git.bb b/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_git.bb
index 8794032..1b2b65d 100644
--- a/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_git.bb
+++ b/yocto-poky/meta/recipes-sato/sato-screenshot/sato-screenshot_git.bb
@@ -19,7 +19,6 @@
 inherit autotools pkgconfig distro_features_check
 
 FILES_${PN} += "${libdir}/matchbox-panel/*.so"
-FILES_${PN}-dbg += "${libdir}/matchbox-panel/.debug"
 
 do_install_append () {
 	rm ${D}${libdir}/matchbox-panel/*.la
diff --git a/yocto-poky/meta/recipes-sato/webkit/files/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch b/yocto-poky/meta/recipes-sato/webkit/files/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
new file mode 100644
index 0000000..fae3b0b
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/webkit/files/0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch
@@ -0,0 +1,27 @@
+From 317a5ac120c44987219bc03486cd2f2d1842c9b9 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Tue, 27 Oct 2015 16:02:19 +0200
+Subject: [PATCH] FindGObjectIntrospection.cmake: prefix variables obtained
+ from pkg-config with PKG_CONFIG_SYSROOT_DIR
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Source/cmake/FindGObjectIntrospection.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Source/cmake/FindGObjectIntrospection.cmake b/Source/cmake/FindGObjectIntrospection.cmake
+index e1f49b4..03a4446 100644
+--- a/Source/cmake/FindGObjectIntrospection.cmake
++++ b/Source/cmake/FindGObjectIntrospection.cmake
+@@ -26,6 +26,7 @@ macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname _extra_args)
+     else ()
+         string(REGEX REPLACE "[\r\n]" " " _result "${_result}")
+         string(REGEX REPLACE " +$" ""  _result "${_result}")
++        string(CONCAT _result $ENV{PKG_CONFIG_SYSROOT_DIR} "${_result}")
+         separate_arguments(_result)
+         set(${_outvar} ${_result} CACHE INTERNAL "")
+     endif ()
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch b/yocto-poky/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch
new file mode 100644
index 0000000..3d004db
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/webkit/files/0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch
@@ -0,0 +1,35 @@
+From 48648570e449cf7f84a26dc03c1e3f620fa69757 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 29 Feb 2016 18:13:39 +0200
+Subject: [PATCH] OptionsGTK.cmake: drop the hardcoded introspection/gtkdoc
+ disabling when cross-compiling
+
+This was not possible to override from the command line and in OpenEmbedded
+(one of the most prominent cross-compilation frameworks) introspection does work fine,
+through the use of qemu target emulation.
+
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Source/cmake/OptionsGTK.cmake | 6 ------
+ 1 file changed, 6 deletions(-)
+
+diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake
+index e5f1f5b..4698036 100644
+--- a/Source/cmake/OptionsGTK.cmake
++++ b/Source/cmake/OptionsGTK.cmake
+@@ -443,12 +443,6 @@ if (USE_LIBHYPHEN)
+     endif ()
+ endif ()
+ 
+-# Override the cached variables, gtk-doc and gobject-introspection do not really work when cross-building.
+-if (CMAKE_CROSSCOMPILING)
+-    set(ENABLE_GTKDOC OFF)
+-    set(ENABLE_INTROSPECTION OFF)
+-endif ()
+-
+ set(DERIVED_SOURCES_GOBJECT_DOM_BINDINGS_DIR ${DERIVED_SOURCES_DIR}/webkitdom)
+ set(DERIVED_SOURCES_WEBKITGTK_DIR ${DERIVED_SOURCES_DIR}/webkitgtk)
+ set(DERIVED_SOURCES_WEBKITGTK_API_DIR ${DERIVED_SOURCES_WEBKITGTK_DIR}/webkit)
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-sato/webkit/files/0001-This-patch-fixes-a-command-line-that-is-too-long-ove.patch b/yocto-poky/meta/recipes-sato/webkit/files/0001-This-patch-fixes-a-command-line-that-is-too-long-ove.patch
deleted file mode 100644
index 28b3420..0000000
--- a/yocto-poky/meta/recipes-sato/webkit/files/0001-This-patch-fixes-a-command-line-that-is-too-long-ove.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 22d5063c551d3c08c0a4ad8b80e08b793d53093d Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex.kanavin@gmail.com>
-Date: Thu, 10 Sep 2015 16:23:27 +0300
-Subject: [PATCH] This patch fixes a command line that is too long (over 100K!)
- and is rejected by /bin/sh.
-
-Upstream-Status: Backport [should appear in 2.10, http://trac.webkit.org/changeset/184856]
-Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
-
----
- Source/WebKit2/PlatformGTK.cmake                   | 11 ++++++-----
- Tools/gtk/generate-inspector-gresource-manifest.py | 16 ++++++++++++----
- 2 files changed, 18 insertions(+), 9 deletions(-)
-
-diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake
-index a13af7c..058c241 100644
---- a/Source/WebKit2/PlatformGTK.cmake
-+++ b/Source/WebKit2/PlatformGTK.cmake
-@@ -408,7 +408,7 @@ set(WebKit2WebExtension_INSTALLED_HEADERS
-     ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h
- )
- 
--file(GLOB InspectorFiles
-+set(InspectorFiles
-     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/*.html
-     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Base/*.js
-     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Controllers/*.css
-@@ -423,13 +423,14 @@ file(GLOB InspectorFiles
-     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Views/*.js
-     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.png
-     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/UserInterface/Images/gtk/*.svg
--)
--
--list(APPEND InspectorFiles
-     ${CMAKE_SOURCE_DIR}/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
-     ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol/InspectorBackendCommands.js
- )
- 
-+file(GLOB InspectorFilesDependencies
-+    ${InspectorFiles}
-+)
-+
- # This is necessary because of a conflict between the GTK+ API WebKitVersion.h and one generated by WebCore.
- list(INSERT WebKit2_INCLUDE_DIRECTORIES 0
-     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
-@@ -564,7 +565,7 @@ add_custom_command(
- 
- add_custom_command(
-     OUTPUT ${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml
--    DEPENDS ${InspectorFiles}
-+    DEPENDS ${InspectorFilesDependencies}
-             ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py
-     COMMAND ${TOOLS_DIR}/gtk/generate-inspector-gresource-manifest.py --output=${DERIVED_SOURCES_WEBKIT2GTK_DIR}/InspectorGResourceBundle.xml ${InspectorFiles}
-     VERBATIM
-diff --git a/Tools/gtk/generate-inspector-gresource-manifest.py b/Tools/gtk/generate-inspector-gresource-manifest.py
-index 0687c4c..03060cf 100755
---- a/Tools/gtk/generate-inspector-gresource-manifest.py
-+++ b/Tools/gtk/generate-inspector-gresource-manifest.py
-@@ -16,6 +16,7 @@
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- 
- import argparse
-+import glob
- import os
- import sys
- 
-@@ -26,10 +27,17 @@ BASE_DIR = 'WebInspectorUI/'
- def get_filenames(args):
-     filenames = []
- 
--    for filename in args:
--        base_dir_index = filename.rfind(BASE_DIR)
--        if base_dir_index != -1:
--            filenames.append(filename[base_dir_index + len(BASE_DIR):])
-+    for pattern in args:
-+        paths = glob.glob(pattern)
-+        for filename in paths:
-+            base_dir_index = filename.rfind(BASE_DIR)
-+            if base_dir_index != -1:
-+                name = filename[base_dir_index + len(BASE_DIR):]
-+                # The result should use forward slashes, thus make sure any os-specific
-+                # separator, added by the glob.glob() call, is properly replaced
-+                if os.sep != '/':
-+                    name = name.replace(os.sep, '/')
-+                filenames.append(name)
-     return filenames
- 
- 
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch b/yocto-poky/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
new file mode 100644
index 0000000..44b43cd
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/webkit/files/0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch
@@ -0,0 +1,40 @@
+From bae9f73b2c693b5aa156fed717d6481b60682786 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Wed, 28 Oct 2015 14:18:57 +0200
+Subject: [PATCH] When building introspection files, add CMAKE_C_FLAGS to the
+ compiler flags.
+
+g-ir-compiler is using a C compiler internally, so it needs to set
+the proper flags for it.
+
+Upstream-Status: Pending [review on oe-core list]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ Source/WebKit2/PlatformGTK.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Source/WebKit2/PlatformGTK.cmake b/Source/WebKit2/PlatformGTK.cmake
+index 706f1e8..14a1c3b 100644
+--- a/Source/WebKit2/PlatformGTK.cmake
++++ b/Source/WebKit2/PlatformGTK.cmake
+@@ -884,7 +884,7 @@ add_custom_command(
+     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
+     DEPENDS WebKit2
+     DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+-    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations LDFLAGS=
++    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS} LDFLAGS=
+         LD_LIBRARY_PATH="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+         ${INTROSPECTION_SCANNER}
+         --quiet
+@@ -930,7 +930,7 @@ add_custom_command(
+     OUTPUT ${CMAKE_BINARY_DIR}/WebKit2WebExtension-${WEBKITGTK_API_VERSION}.gir
+     DEPENDS ${CMAKE_BINARY_DIR}/JavaScriptCore-${WEBKITGTK_API_VERSION}.gir
+     DEPENDS ${CMAKE_BINARY_DIR}/WebKit2-${WEBKITGTK_API_VERSION}.gir
+-    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations
++    COMMAND CC=${CMAKE_C_COMPILER} CFLAGS=-Wno-deprecated-declarations\ ${CMAKE_C_FLAGS}
+         LDFLAGS="${INTROSPECTION_ADDITIONAL_LDFLAGS}"
+         LD_LIBRARY_PATH="${INTROSPECTION_ADDITIONAL_LIBRARY_PATH}"
+         ${INTROSPECTION_SCANNER}
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch b/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
new file mode 100644
index 0000000..d7e4ef6
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Enable-backtrace-on-linux-when-using-glibc.patch
@@ -0,0 +1,39 @@
+From 0b68ad206d2d90df78d91cad4da19152084014cf Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 16 Sep 2015 05:15:04 +0000
+Subject: [PATCH] Enable backtrace on linux when using glibc
+
+We dont have backtrace() implemented on non-glibc libc's on linux
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Accepted
+
+ Source/WTF/wtf/Assertions.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp
+index 191d53f..a4d86b5 100644
+--- a/Source/WTF/wtf/Assertions.cpp
++++ b/Source/WTF/wtf/Assertions.cpp
+@@ -68,7 +68,7 @@
+ #include <unistd.h>
+ #endif
+ 
+-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+ #include <cxxabi.h>
+ #include <dlfcn.h>
+ #include <execinfo.h>
+@@ -225,7 +225,7 @@ void WTFReportArgumentAssertionFailure(const char* file, int line, const char* f
+ 
+ void WTFGetBacktrace(void** stack, int* size)
+ {
+-#if OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))
++#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
+     *size = backtrace(stack, *size);
+ #elif OS(WINDOWS)
+     // The CaptureStackBackTrace function is available in XP, but it is not defined
+-- 
+2.5.2
+
diff --git a/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch b/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch
new file mode 100644
index 0000000..77ebf37
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/webkit/webkitgtk/0001-Fix-build-with-non-glibc-libraries-on-linux.patch
@@ -0,0 +1,61 @@
+From 30e2ef302a329850ba55c7c458c98cbf396186ec Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 21:47:34 +0000
+Subject: [PATCH] Fix build with non-glibc libraries on linux
+
+qualify isnan() calls with std namespace
+malloc_trim is glibc specific API so guard it with __GLIBC__
+let ctype be used on non-glibc ( musl ) C library
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Accepted
+
+ Source/JavaScriptCore/runtime/Options.cpp                    | 2 +-
+ Source/WTF/wtf/DisallowCType.h                               | 2 +-
+ Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp | 2 ++
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/Source/JavaScriptCore/runtime/Options.cpp b/Source/JavaScriptCore/runtime/Options.cpp
+index fe830b4..c49aade 100644
+--- a/Source/JavaScriptCore/runtime/Options.cpp
++++ b/Source/JavaScriptCore/runtime/Options.cpp
+@@ -610,7 +610,7 @@ bool Option::operator==(const Option& other) const
+     case Options::Type::unsignedType:
+         return m_entry.unsignedVal == other.m_entry.unsignedVal;
+     case Options::Type::doubleType:
+-        return (m_entry.doubleVal == other.m_entry.doubleVal) || (isnan(m_entry.doubleVal) && isnan(other.m_entry.doubleVal));
++        return (m_entry.doubleVal == other.m_entry.doubleVal) || (std::isnan(m_entry.doubleVal) && std::isnan(other.m_entry.doubleVal));
+     case Options::Type::int32Type:
+         return m_entry.int32Val == other.m_entry.int32Val;
+     case Options::Type::optionRangeType:
+diff --git a/Source/WTF/wtf/DisallowCType.h b/Source/WTF/wtf/DisallowCType.h
+index d85e767..dc6bcab 100644
+--- a/Source/WTF/wtf/DisallowCType.h
++++ b/Source/WTF/wtf/DisallowCType.h
+@@ -40,7 +40,7 @@
+ // are used from wx headers. On GTK+ for Mac many GTK+ files include <libintl.h>
+ // or <glib/gi18n-lib.h>, which in turn include <xlocale/_ctype.h> which uses
+ // isacii(). 
+-#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION)
++#if !(OS(DARWIN) && PLATFORM(GTK)) && !PLATFORM(EFL) && !defined(_LIBCPP_VERSION) && defined(__GLIBC__)
+ 
+ #include <ctype.h>
+ 
+diff --git a/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp b/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
+index ea61909..1495642 100644
+--- a/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
++++ b/Source/WebCore/platform/linux/MemoryPressureHandlerLinux.cpp
+@@ -202,7 +202,9 @@ void MemoryPressureHandler::respondToMemoryPressure(Critical critical, Synchrono
+ void MemoryPressureHandler::platformReleaseMemory(Critical)
+ {
+     ReliefLogger log("Run malloc_trim");
++#ifdef __GLIBC__
+     malloc_trim(0);
++#endif
+ }
+ 
+ void MemoryPressureHandler::ReliefLogger::platformLog()
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-sato/webkit/webkitgtk/clang.patch b/yocto-poky/meta/recipes-sato/webkit/webkitgtk/clang.patch
new file mode 100644
index 0000000..e526713
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/webkit/webkitgtk/clang.patch
@@ -0,0 +1,25 @@
+Clang's builtin for clear_cache accepts char* and errors out when using void*,
+using char* work on both gcc and clang since char* is auto-converted to void* in gcc case
+
+Source/JavaScriptCore/assembler/ARM64Assembler.h:2857:33: error: cannot initialize a parameter of type 'char *' with an rvalue of type 'void *'
+        __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
+                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+1 error generated.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Upstream-Status: Accepted
+
+Index: webkitgtk-2.8.5/Source/JavaScriptCore/assembler/ARM64Assembler.h
+===================================================================
+--- webkitgtk-2.8.5.orig/Source/JavaScriptCore/assembler/ARM64Assembler.h
++++ webkitgtk-2.8.5/Source/JavaScriptCore/assembler/ARM64Assembler.h
+@@ -2854,7 +2854,7 @@ public:
+ #if OS(LINUX) && COMPILER(GCC)
+     static inline void linuxPageFlush(uintptr_t begin, uintptr_t end)
+     {
+-        __builtin___clear_cache(reinterpret_cast<void*>(begin), reinterpret_cast<void*>(end));
++        __builtin___clear_cache(reinterpret_cast<char*>(begin), reinterpret_cast<char*>(end));
+     }
+ #endif
+ 
diff --git a/yocto-poky/meta/recipes-sato/webkit/webkitgtk/gcc5.patch b/yocto-poky/meta/recipes-sato/webkit/webkitgtk/gcc5.patch
deleted file mode 100644
index 5951a81..0000000
--- a/yocto-poky/meta/recipes-sato/webkit/webkitgtk/gcc5.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-JSObject: Create explicit instantiation of putByIndexBeyondVectorLengthWithoutAttributes
-
-Reason for change: newer gcc might optimize away the templates
-and they wont be available for other .cpp files to use as these
-are used in a different .cpp we need to tell compiler to explicitly
-instantiate them.
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Upstream-Status: Pending
-
-Index: webkitgtk-2.8.5/Source/JavaScriptCore/runtime/JSObject.cpp
-===================================================================
---- webkitgtk-2.8.5.orig/Source/JavaScriptCore/runtime/JSObject.cpp
-+++ webkitgtk-2.8.5/Source/JavaScriptCore/runtime/JSObject.cpp
-@@ -1965,6 +1965,10 @@ void JSObject::putByIndexBeyondVectorLen
-     }
- }
- 
-+template void JSObject::putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(ExecState* exec, unsigned i, JSValue value);
-+template void JSObject::putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(ExecState* exec, unsigned i, JSValue value);
-+template void JSObject::putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(ExecState* exec, unsigned i, JSValue value);
-+
- void JSObject::putByIndexBeyondVectorLengthWithArrayStorage(ExecState* exec, unsigned i, JSValue value, bool shouldThrow, ArrayStorage* storage)
- {
-     VM& vm = exec->vm();
diff --git a/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.10.7.bb b/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.10.7.bb
new file mode 100644
index 0000000..8eb6b9f
--- /dev/null
+++ b/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.10.7.bb
@@ -0,0 +1,88 @@
+SUMMARY = "WebKit web rendering engine for the GTK+ platform"
+HOMEPAGE = "http://www.webkitgtk.org/"
+BUGTRACKER = "http://bugs.webkit.org/"
+
+LICENSE = "BSD & LGPLv2+"
+LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \
+                    file://Source/WebKit/LICENSE;md5=4646f90082c40bcf298c285f8bab0b12 \
+                    file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \
+		    file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \
+		    file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \
+		   "
+
+SRC_URI = "\
+  http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
+  file://clang.patch \
+  file://0001-Enable-backtrace-on-linux-when-using-glibc.patch \
+  file://0001-Fix-build-with-non-glibc-libraries-on-linux.patch \
+  file://0001-FindGObjectIntrospection.cmake-prefix-variables-obta.patch \
+  file://0001-When-building-introspection-files-add-CMAKE_C_FLAGS-.patch \
+  file://0001-OptionsGTK.cmake-drop-the-hardcoded-introspection-gt.patch \
+  "
+SRC_URI[md5sum] = "84832b9d8329413b4f1d87df5f7e8efe"
+SRC_URI[sha256sum] = "990d62c82ed6dede31a6ff0a82d847f16b812842ff3e1093d17113627652864e"
+
+inherit cmake lib_package pkgconfig perlnative pythonnative distro_features_check upstream-version-is-even gobject-introspection
+
+# depends on libxt
+REQUIRED_DISTRO_FEATURES = "x11"
+
+DEPENDS = "zlib libsoup-2.4 curl libxml2 cairo libxslt libxt libidn gnutls \
+           gtk+3 gstreamer1.0 gstreamer1.0-plugins-base flex-native gperf-native sqlite3 \
+	   pango icu bison-native gnome-common gawk intltool-native libwebp \
+	   atk udev harfbuzz jpeg libpng pulseaudio librsvg libtheora libvorbis libxcomposite libxtst \
+	   ruby-native libnotify gstreamer1.0-plugins-bad \
+          "
+
+PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', 'wayland' ,d)} \
+                   ${@base_contains('DISTRO_FEATURES', 'opengl', 'webgl', '' ,d)} \
+                   enchant \
+                   gtk2 \
+                   libsecret \
+                  "
+
+PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland"
+PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11"
+PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue"
+PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant"
+PACKAGECONFIG[gtk2] = "-DENABLE_PLUGIN_PROCESS_GTK2=ON,-DENABLE_PLUGIN_PROCESS_GTK2=OFF,gtk+"
+PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2"
+PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl"
+PACKAGECONFIG[libsecret] = "-DENABLE_CREDENTIAL_STORAGE=ON,-DENABLE_CREDENTIAL_STORAGE=OFF,libsecret"
+PACKAGECONFIG[libhyphen] = "-DUSE_LIBHYPHEN=ON,-DUSE_LIBHYPHEN=OFF,libhyphen"
+
+EXTRA_OECMAKE = " \
+		-DPORT=GTK \
+		-DCMAKE_BUILD_TYPE=Release \
+		${@bb.utils.contains('GI_DATA_ENABLED', 'True', '-DENABLE_INTROSPECTION=ON', '-DENABLE_INTROSPECTION=OFF', d)} \
+		-DENABLE_GTKDOC=OFF \
+		-DENABLE_MINIBROWSER=ON \
+		"
+
+# Javascript JIT is not supported on powerpc
+EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_powerpc64 = " -DENABLE_JIT=OFF "
+
+# ARM JIT code does not build on ARMv5/6 anymore, apparently they test only on v7 onwards
+EXTRA_OECMAKE_append_armv5 = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_armv6 = " -DENABLE_JIT=OFF "
+
+# binutils 2.25.1 has a bug on aarch64:
+# https://sourceware.org/bugzilla/show_bug.cgi?id=18430
+EXTRA_OECMAKE_append_aarch64 = " -DUSE_LD_GOLD=OFF "
+
+# JIT not supported on MIPS either
+EXTRA_OECMAKE_append_mips = " -DENABLE_JIT=OFF "
+EXTRA_OECMAKE_append_mips64 = " -DENABLE_JIT=OFF "
+
+FILES_${PN} += "${libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so"
+
+# http://errors.yoctoproject.org/Errors/Details/20370/
+ARM_INSTRUCTION_SET = "arm"
+
+# Invalid data memory access: 0x00000000
+# ...
+# qemu: uncaught target signal 11 (Segmentation fault) - core dumped
+# Segmentation fault
+EXTRA_OECMAKE_append_powerpc = " -DENABLE_INTROSPECTION=OFF "
+
diff --git a/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.8.5.bb b/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.8.5.bb
deleted file mode 100644
index e29666a..0000000
--- a/yocto-poky/meta/recipes-sato/webkit/webkitgtk_2.8.5.bb
+++ /dev/null
@@ -1,74 +0,0 @@
-SUMMARY = "WebKit web rendering engine for the GTK+ platform"
-HOMEPAGE = "http://www.webkitgtk.org/"
-BUGTRACKER = "http://bugs.webkit.org/"
-
-LICENSE = "BSD & LGPLv2+"
-LIC_FILES_CHKSUM = "file://Source/JavaScriptCore/COPYING.LIB;md5=d0c6d6397a5d84286dda758da57bd691 \
-                    file://Source/WebKit/LICENSE;md5=4646f90082c40bcf298c285f8bab0b12 \
-                    file://Source/WebCore/LICENSE-APPLE;md5=4646f90082c40bcf298c285f8bab0b12 \
-		    file://Source/WebCore/LICENSE-LGPL-2;md5=36357ffde2b64ae177b2494445b79d21 \
-		    file://Source/WebCore/LICENSE-LGPL-2.1;md5=a778a33ef338abbaf8b8a7c36b6eec80 \
-		   "
-
-SRC_URI = "\
-  http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \
-  file://0001-This-patch-fixes-a-command-line-that-is-too-long-ove.patch \
-  file://gcc5.patch \
-  "
-SRC_URI[md5sum] = "df79991848a5096d3a75289ebce547ae"
-SRC_URI[sha256sum] = "3d1f0c534935f43fd74df90f2648fcee672d60f1f57a30fa557a77891ae04d20"
-
-inherit cmake lib_package pkgconfig perlnative pythonnative distro_features_check
-
-# depends on libxt
-REQUIRED_DISTRO_FEATURES = "x11"
-
-DEPENDS = "zlib enchant libsoup-2.4 curl libxml2 cairo libxslt libxt libidn gnutls \
-           gtk+ gtk+3 gstreamer1.0 gstreamer1.0-plugins-base flex-native gperf-native sqlite3 \
-	   pango icu bison-native gnome-common gawk intltool-native libwebp \
-	   atk udev harfbuzz jpeg libpng pulseaudio librsvg libtheora libvorbis libxcomposite libxtst \
-	   ruby-native libsecret libnotify gstreamer1.0-plugins-bad \
-          "
-
-PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', 'wayland' ,d)} \
-                   ${@base_contains('DISTRO_FEATURES', 'opengl', 'webgl', '' ,d)}"
-
-PACKAGECONFIG[wayland] = "-DENABLE_WAYLAND_TARGET=ON,-DENABLE_WAYLAND_TARGET=OFF,wayland"
-PACKAGECONFIG[x11] = "-DENABLE_X11_TARGET=ON,-DENABLE_X11_TARGET=OFF,virtual/libx11"
-PACKAGECONFIG[geoclue] = "-DENABLE_GEOLOCATION=ON,-DENABLE_GEOLOCATION=OFF,geoclue"
-PACKAGECONFIG[enchant] = "-DENABLE_SPELLCHECK=ON,-DENABLE_SPELLCHECK=OFF,enchant"
-PACKAGECONFIG[gtk2] = "-DENABLE_PLUGIN_PROCESS_GTK2=ON,-DENABLE_PLUGIN_PROCESS_GTK2=OFF,gtk+"
-PACKAGECONFIG[gles2] = "-DENABLE_GLES2=ON,-DENABLE_GLES2=OFF,virtual/libgles2"
-PACKAGECONFIG[webgl] = "-DENABLE_WEBGL=ON,-DENABLE_WEBGL=OFF,virtual/libgl"
-PACKAGECONFIG[libsecret] = "-DENABLE_CREDENTIAL_STORAGE=ON,-DENABLE_CREDENTIAL_STORAGE=OFF,libsecret"
-
-EXTRA_OECMAKE = " \
-		-DPORT=GTK \
-		-DCMAKE_BUILD_TYPE=Release \
-		-DENABLE_INTROSPECTION=OFF \
-		-DENABLE_GTKDOC=OFF \
-		-DENABLE_MINIBROWSER=ON \
-		"
-
-# Javascript JIT is not supported on powerpc
-EXTRA_OECMAKE_append_powerpc = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_powerpc64 = " -DENABLE_JIT=OFF "
-
-# ARM JIT code does not build on ARMv5/6 anymore, apparently they test only on v7 onwards
-EXTRA_OECMAKE_append_armv5 = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_armv6 = " -DENABLE_JIT=OFF "
-
-# binutils 2.25.1 has a bug on aarch64:
-# https://sourceware.org/bugzilla/show_bug.cgi?id=18430
-EXTRA_OECMAKE_append_aarch64 = " -DUSE_LD_GOLD=OFF "
-
-# JIT not supported on MIPS either
-EXTRA_OECMAKE_append_mips = " -DENABLE_JIT=OFF "
-EXTRA_OECMAKE_append_mips64 = " -DENABLE_JIT=OFF "
-
-FILES_${PN} += "${libdir}/webkit2gtk-4.0/injected-bundle/libwebkit2gtkinjectedbundle.so"
-FILES_${PN}-dbg += "${libdir}/webkit2gtk-4.0/injected-bundle/.debug/libwebkit2gtkinjectedbundle.so"
-FILES_${PN}-dbg += "${libdir}/webkitgtk/webkit2gtk-4.0/.debug/*"
-
-# http://errors.yoctoproject.org/Errors/Details/20370/
-ARM_INSTRUCTION_SET = "arm"
diff --git a/yocto-poky/meta/recipes-support/apr/apr-util_1.5.4.bb b/yocto-poky/meta/recipes-support/apr/apr-util_1.5.4.bb
index a36f13d..2b8676f 100644
--- a/yocto-poky/meta/recipes-support/apr/apr-util_1.5.4.bb
+++ b/yocto-poky/meta/recipes-support/apr/apr-util_1.5.4.bb
@@ -24,7 +24,6 @@
 		--with-dbm=gdbm \
 		--with-gdbm=${STAGING_DIR_HOST}${prefix} \
 		--without-sqlite2 \
-		--without-sqlite3 \
 		--with-expat=${STAGING_DIR_HOST}${prefix}"
 
 
@@ -54,10 +53,10 @@
 }
 
 do_configure_append_class-nativesdk() {
-	sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${S}/build/rules.mk
-	sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${S}/build/rules.mk
-	sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${S}/build/rules.mk
-	sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${S}/build/rules.mk
+	sed -i "s#\(apr_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+	sed -i "s#\(apr_builders\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+	sed -i "s#\(top_builddir\)=.*#\1=${STAGING_DATADIR}/build-1#" ${B}/build/rules.mk
+	sed -i "s#\(LIBTOOL=\$(apr_builddir)\).*#\1/libtool#" ${B}/build/rules.mk
 }
 
 do_install_append_class-target() {
@@ -66,13 +65,22 @@
 	       -e 's,APU_BUILD_DIR=.*,APR_BUILD_DIR=,g' ${D}${bindir}/apu-1-config
 }
 
-FILES_${PN}     += "${libdir}/apr-util-1/apr_dbm_gdbm-1.so"
-FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/apr_dbm_gdbm.so* ${libdir}/apr-util-1/apr_dbm_gdbm.la"
-FILES_${PN}-dbg += "${libdir}/apr-util-1/.debug/*"
-FILES_${PN}-staticdev += "${libdir}/apr-util-1/apr_dbm_gdbm.a"
+PACKAGECONFIG ??= "crypto"
+PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
+PACKAGECONFIG[crypto] = "--with-openssl=${STAGING_DIR_HOST}${prefix} --with-crypto,--without-crypto,openssl"
+PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_DIR_HOST}${prefix},--without-sqlite3,sqlite3"
+
+#files ${libdir}/apr-util-1/*.so are not symlinks but loadable modules thus they are packaged in ${PN}
+FILES_${PN}     += "${libdir}/apr-util-1/apr*${SOLIBS} ${libdir}/apr-util-1/apr*${SOLIBSDEV}"
+FILES_${PN}-dev += "${libdir}/aprutil.exp ${libdir}/apr-util-1/*.la"
+FILES_${PN}-staticdev += "${libdir}/apr-util-1/*.a"
+
+INSANE_SKIP_${PN} += "dev-so"
 
 inherit ptest
 
+RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-gconv-iso8859-1 glibc-gconv-iso8859-2 glibc-gconv-utf-7"
+
 do_compile_ptest() {
 	cd ${B}/test
 	oe_runmake
diff --git a/yocto-poky/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch b/yocto-poky/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
new file mode 100644
index 0000000..7521eeb
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/apr/apr/configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch
@@ -0,0 +1,36 @@
+From d439093aa07a486f559206ac9e5808a6a18218cd Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Thu, 19 Nov 2015 18:25:38 -0800
+Subject: [PATCH] configure.in: fix LTFLAGS to make it work with ccache
+
+When ccache is enabled, libtool requires --tag=CC when use ccache,
+otherwise when building apr-util with ccache enabled:
+
+| libtool: compile: unable to infer tagged configuration
+| libtool: error: specify a tag with '--tag'
+| libtool: compile: unable to infer tagged configuration
+| make[1]: *** [buckets/apr_buckets.lo] Error 1
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ configure.in |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.in b/configure.in
+index 5a4a988..9d57ae6 100644
+--- a/configure.in
++++ b/configure.in
+@@ -246,7 +246,7 @@ case $host in
+     ;;
+ *)
+     if test "x$LTFLAGS" = "x"; then
+-        LTFLAGS='--silent'
++        LTFLAGS='--silent --tag=CC'
+     fi
+     if test "$experimental_libtool" = "yes"; then
+         # Use a custom-made libtool replacement
+-- 
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch b/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
index 9569645..16499f5 100644
--- a/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
+++ b/yocto-poky/meta/recipes-support/apr/apr/upgrade-and-fix-1.5.1.patch
@@ -8,7 +8,7 @@
 And it caused gen_test_char unexpected rebuilt at
 do_install time.
 
-Upstream-Status: inappropriate [oe specific]
+Upstream-Status: Inappropriate [oe specific]
 
 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
 ---
diff --git a/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb b/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb
index 1c61e84..db15305 100644
--- a/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb
+++ b/yocto-poky/meta/recipes-support/apr/apr_1.5.2.bb
@@ -16,6 +16,7 @@
            file://run-ptest \
            file://upgrade-and-fix-1.5.1.patch \
            file://Fix-packet-discards-HTTP-redirect.patch \
+           file://configure.in-fix-LTFLAGS-to-make-it-work-with-ccache.patch \
 "
 
 SRC_URI[md5sum] = "4e9769f3349fe11fc0a5e1b224c236aa"
diff --git a/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb b/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
new file mode 100644
index 0000000..d61c8be
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/argp-standalone/argp-standalone_1.3.bb
@@ -0,0 +1,29 @@
+# Copyright (C) 2015 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Glibc hierarchical argument parsing standalone library"
+HOMEPAGE = "http://www.lysator.liu.se/~nisse/misc/"
+LICENSE = "LGPL-2.1"
+LIC_FILES_CHKSUM = "file://argp.h;beginline=1;endline=20;md5=008b7e53dea6f9e1d9fdef0d9cf3184a"
+SECTION = "libs"
+
+SRC_URI = "http://www.lysator.liu.se/~nisse/misc/argp-standalone-${PV}.tar.gz \
+           file://0001-throw-in-funcdef.patch \
+           file://0002-isprint.patch \
+           file://out_of_tree_build.patch \
+          "
+SRC_URI[md5sum] = "720704bac078d067111b32444e24ba69"
+SRC_URI[sha256sum] = "dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be"
+
+inherit autotools
+
+CFLAGS += "-fPIC -U__OPTIMIZE__"
+
+do_install() {
+	install -D -m 0644 ${B}/libargp.a ${D}${libdir}/libargp.a
+	install -D -m 0644 ${S}/argp.h ${D}${includedir}/argp.h
+}
+#
+# We will skip parsing for non-musl systems
+#
+COMPATIBLE_HOST = ".*-musl.*"
diff --git a/yocto-poky/meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch b/yocto-poky/meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch
new file mode 100644
index 0000000..a6e2759
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/argp-standalone/files/0001-throw-in-funcdef.patch
@@ -0,0 +1,84 @@
+# --- T2-COPYRIGHT-NOTE-BEGIN ---
+# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
+# 
+# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone
+# Copyright (C) 2006 The T2 SDE Project
+# 
+# More information can be found in the files COPYING and README.
+# 
+# This patch file is dual-licensed. It is available under the license the
+# patched project is licensed under, as long as it is an OpenSource license
+# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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.
+# --- T2-COPYRIGHT-NOTE-END ---
+
+
+No __THROW in function implementation.
+	--jsaw
+
+Taken from buildroot
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+--- argp-standalone-1.4-test2/argp.h.orig	2006-01-06 02:29:59.000000000 +0100
++++ argp-standalone-1.4-test2/argp.h	2006-01-06 02:41:10.000000000 +0100
+@@ -560,17 +560,17 @@
+ # endif
+ 
+ # ifndef ARGP_EI
+-#  define ARGP_EI extern __inline__
++#  define ARGP_EI extern inline
+ # endif
+ 
+ ARGP_EI void
+-__argp_usage (__const struct argp_state *__state) __THROW
++__argp_usage (__const struct argp_state *__state)
+ {
+   __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+ }
+ 
+ ARGP_EI int
+-__option_is_short (__const struct argp_option *__opt) __THROW
++__option_is_short (__const struct argp_option *__opt)
+ {
+   if (__opt->flags & OPTION_DOC)
+     return 0;
+@@ -582,7 +582,7 @@
+ }
+ 
+ ARGP_EI int
+-__option_is_end (__const struct argp_option *__opt) __THROW
++__option_is_end (__const struct argp_option *__opt)
+ {
+   return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+ }
+--- argp-standalone-1.4-test2/argp-parse.c.orig	2006-01-06 02:47:48.000000000 +0100
++++ argp-standalone-1.4-test2/argp-parse.c	2006-01-06 02:48:16.000000000 +0100
+@@ -1290,13 +1290,13 @@
+ /* Defined here, in case a user is not inlining the definitions in
+  * argp.h */
+ void
+-__argp_usage (__const struct argp_state *__state) __THROW
++__argp_usage (__const struct argp_state *__state)
+ {
+   __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+ }
+ 
+ int
+-__option_is_short (__const struct argp_option *__opt) __THROW
++__option_is_short (__const struct argp_option *__opt) 
+ {
+   if (__opt->flags & OPTION_DOC)
+     return 0;
+@@ -1310,7 +1310,7 @@
+ }
+ 
+ int
+-__option_is_end (__const struct argp_option *__opt) __THROW
++__option_is_end (__const struct argp_option *__opt) 
+ {
+   return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+ }
diff --git a/yocto-poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch b/yocto-poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch
new file mode 100644
index 0000000..1c07eea
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/argp-standalone/files/0002-isprint.patch
@@ -0,0 +1,51 @@
+Subject: restrict value range passed to isprint function
+
+According to C standards isprint argument shall be representable as an
+unsigned char or be equal to EOF, otherwise the behaviour is undefined.
+
+Passing arbitrary ints leads to segfault in nm program from elfutils.
+
+Restrict isprint argument range to values representable by unsigned char.
+
+Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
+
+Taken from buildroot
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+Index: b/argp.h
+===================================================================
+--- a/argp.h
++++ b/argp.h
+@@ -23,6 +23,7 @@
+ 
+ #include <stdio.h>
+ #include <ctype.h>
++#include <limits.h>
+ 
+ #define __need_error_t
+ #include <errno.h>
+@@ -577,7 +578,7 @@
+   else
+     {
+       int __key = __opt->key;
+-      return __key > 0 && isprint (__key);
++      return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
+     }
+ }
+ 
+Index: b/argp-parse.c
+===================================================================
+--- a/argp-parse.c
++++ b/argp-parse.c
+@@ -1292,7 +1292,7 @@
+       int __key = __opt->key;
+       /* FIXME: whether or not a particular key implies a short option
+        * ought not to be locale dependent. */
+-      return __key > 0 && isprint (__key);
++      return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
+     }
+ }
+ 
diff --git a/yocto-poky/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch b/yocto-poky/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch
new file mode 100644
index 0000000..b7777cb
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/argp-standalone/files/out_of_tree_build.patch
@@ -0,0 +1,19 @@
+Fix the testsuite to built out of tree
+in OE S != B
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+Index: argp-standalone-1.3/testsuite/Makefile.am
+===================================================================
+--- argp-standalone-1.3.orig/testsuite/Makefile.am
++++ argp-standalone-1.3/testsuite/Makefile.am
+@@ -5,7 +5,8 @@ TS_ALL = $(TS_PROGS) $(TS_SH)
+ 
+ noinst_PROGRAMS = $(TS_PROGS) ex1 ex3 ex4
+ 
+-LDADD = ../libargp.a
++AM_CPPFLAGS = -I$(top_srcdir)
++LDADD = $(top_builddir)/libargp.a
+ 
+ EXTRA_DIST = $(TS_SH) run-tests
+ CLEANFILES = test.out
diff --git a/yocto-poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb b/yocto-poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb
index 7cf17d6..5a23754 100644
--- a/yocto-poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb
+++ b/yocto-poky/meta/recipes-support/aspell/aspell_0.60.6.1.bb
@@ -17,7 +17,6 @@
 
 RDEPENDS_${PN}-utils += "perl"
 
-FILES_${PN}-dbg += "${libdir}/aspell-0.60/.debu*"
 FILES_libaspell = "${libdir}/libaspell.so.* ${libdir}/aspell*"
 FILES_aspell-utils = "${bindir}/word-list-compress ${bindir}/aspell-import ${bindir}/run-with-aspell ${bindir}/pre*"
 FILES_${PN} = "${bindir}/aspell"
diff --git a/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.16.0.bb b/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.16.0.bb
deleted file mode 100644
index 7d95fdb..0000000
--- a/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.16.0.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SUMMARY = "AT-SPI 2 Toolkit Bridge"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "8936488c8cdce0e158f80b2e247527f9"
-SRC_URI[sha256sum] = "78efc45ec36383bf785f8636e64a8d866defeb020e00a08f92978f1fc3772ff9"
-
-DEPENDS = "dbus glib-2.0 atk at-spi2-core"
-
-inherit autotools pkgconfig distro_features_check
-
-# The at-spi2-core requires x11 in DISTRO_FEATURES
-REQUIRED_DISTRO_FEATURES = "x11"
-
-PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
-
-FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
-FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
-FILES_${PN}-dbg += "${libdir}/gtk-2.0/modules/.debug"
diff --git a/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.18.1.bb b/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.18.1.bb
new file mode 100644
index 0000000..b8a93f3
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/atk/at-spi2-atk_2.18.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = "AT-SPI 2 Toolkit Bridge"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
+SRC_URI[md5sum] = "d7040a55df975865ab0d74a4b325afb5"
+SRC_URI[sha256sum] = "c4b15f9386d34d464ddad5f6cc85669742c016df87141ceee93513245979c12d"
+
+DEPENDS = "dbus glib-2.0 atk at-spi2-core"
+
+inherit autotools pkgconfig distro_features_check upstream-version-is-even
+
+# The at-spi2-core requires x11 in DISTRO_FEATURES
+REQUIRED_DISTRO_FEATURES = "x11"
+
+PACKAGES =+ "${PN}-gnome ${PN}-gtk2"
+
+FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules"
+FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*"
diff --git a/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.16.0.bb b/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.16.0.bb
deleted file mode 100644
index 7c12b54..0000000
--- a/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.16.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
-
-MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
-
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
-           file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
-          "
-
-SRC_URI[md5sum] = "be6eeea370f913b7639b609913b2cf02"
-SRC_URI[sha256sum] = "1c0b77fb8ce81abbf1d80c0afee9858b3f9229f673b7881995fe0fc16b1a74d0"
-
-DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native gettext-native"
-
-inherit autotools gtk-doc pkgconfig distro_features_check
-# depends on virtual/libx11
-REQUIRED_DISTRO_FEATURES = "x11"
-
-EXTRA_OECONF = "--disable-introspection --disable-xevie --with-dbus-daemondir=${bindir}"
-
-FILES_${PN} += "${datadir}/dbus-1/services/*.service \
-                ${datadir}/dbus-1/accessibility-services/*.service"
diff --git a/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.18.3.bb b/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.18.3.bb
new file mode 100644
index 0000000..eced597
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/atk/at-spi2-core_2.18.3.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Assistive Technology Service Provider Interface (dbus core)"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=e9f288ba982d60518f375b5898283886"
+
+MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
+
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \
+           file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
+          "
+
+SRC_URI[md5sum] = "fc18801e56f6ce6914126f837d42f556"
+SRC_URI[sha256sum] = "ada26add94155f97d0f601a20cb7a0e3fd3ba1588c3520b7288316494027d629"
+
+DEPENDS = "dbus glib-2.0 virtual/libx11 libxi libxtst intltool-native gettext-native"
+
+inherit autotools gtk-doc pkgconfig distro_features_check upstream-version-is-even gobject-introspection
+# depends on virtual/libx11
+REQUIRED_DISTRO_FEATURES = "x11"
+
+EXTRA_OECONF = "--disable-xevie --with-dbus-daemondir=${bindir}"
+
+FILES_${PN} += "${datadir}/dbus-1/services/*.service \
+                ${datadir}/dbus-1/accessibility-services/*.service"
diff --git a/yocto-poky/meta/recipes-support/atk/atk_2.16.0.bb b/yocto-poky/meta/recipes-support/atk/atk_2.16.0.bb
deleted file mode 100644
index 0f8f9b5..0000000
--- a/yocto-poky/meta/recipes-support/atk/atk_2.16.0.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Accessibility toolkit for GNOME"
-HOMEPAGE = "http://live.gnome.org/GAP/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-SECTION = "x11/libs"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
-                    file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
-                    file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
-
-DEPENDS = "glib-2.0"
-
-inherit gnomebase gtk-doc
-
-SRC_URI[archive.md5sum] = "c7c5002bd6e58b4723a165f1bf312116"
-SRC_URI[archive.sha256sum] = "095f986060a6a0b22eb15eef84ae9f14a1cf8082488faa6886d94c37438ae562"
-
-BBCLASSEXTEND = "native"
-
-EXTRA_OECONF = "--disable-glibtest \
-                --disable-introspection"
diff --git a/yocto-poky/meta/recipes-support/atk/atk_2.18.0.bb b/yocto-poky/meta/recipes-support/atk/atk_2.18.0.bb
new file mode 100644
index 0000000..3c0e82d
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/atk/atk_2.18.0.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Accessibility toolkit for GNOME"
+HOMEPAGE = "http://live.gnome.org/GAP/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/libs"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
+                    file://atk/atkutil.c;endline=18;md5=6fd31cd2fdc9b30f619ca8d819bc12d3 \
+                    file://atk/atk.h;endline=18;md5=fcd7710187e0eae485e356c30d1b0c3b"
+
+DEPENDS = "glib-2.0"
+
+inherit gnomebase gtk-doc upstream-version-is-even gobject-introspection
+
+SRC_URI[archive.md5sum] = "fd3678f35004b4c92e3da39356996054"
+SRC_URI[archive.sha256sum] = "ce6c48d77bf951083029d5a396dd552d836fff3c1715d3a7022e917e46d0c92b"
+
+BBCLASSEXTEND = "native"
+
+EXTRA_OECONF = "--disable-glibtest \
+               "
diff --git a/yocto-poky/meta/recipes-support/attr/acl.inc b/yocto-poky/meta/recipes-support/attr/acl.inc
index b2bc8ba..198fb4f 100644
--- a/yocto-poky/meta/recipes-support/attr/acl.inc
+++ b/yocto-poky/meta/recipes-support/attr/acl.inc
@@ -12,6 +12,8 @@
 SRC_URI = "${SAVANNAH_GNU_MIRROR}/acl/${BP}.src.tar.gz \
            file://run-ptest \
            file://acl-fix-the-order-of-expected-output-of-getfacl.patch \
+           file://test-fix-insufficient-quoting-of.patch \
+           file://test-fixups-on-SELinux-machines-for-root-testcases.patch \
 "
 
 require ea-acl.inc
diff --git a/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch b/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
new file mode 100644
index 0000000..0b350be
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/acl/test-fix-insufficient-quoting-of.patch
@@ -0,0 +1,108 @@
+From e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Mon, 20 May 2013 16:38:06 +0200
+Subject: [PATCH] test: fix insufficient quoting of '\'
+
+This is a follow-up to 7f2c91b8369242a8dbc2b304a5b71b2a85f5b855, which
+caused sbits-restore.test to fail in the following way in case SELinux
+was disabled:
+
+*** sbits-restore.test ***
+[3] $ umask 022 -- ok
+[4] $ mkdir d -- ok
+[5] $ touch d/g -- ok
+[6] $ touch d/u -- ok
+[7] $ chmod u+s d/u -- ok
+[8] $ chmod g+s d/g -- ok
+[9] $ chmod +t d -- ok
+[10] $ getfacl -R d > d.acl -- ok
+[11] $ rm -R d -- ok
+[12] $ mkdir d -- ok
+[13] $ touch d/g -- ok
+[14] $ touch d/u -- ok
+[15] $ setfacl --restore d.acl -- ok
+[16] $ ls -dl d | awk '{print $1}' | sed 's/.$//g' -- failed
+drwxr-xr-                             != drwxr-xr-t
+[18] $ ls -dl d/u | awk '{print $1}' | sed 's/.$//g' -- failed
+-rwSr--r-                             != -rwSr--r--
+[20] $ ls -dl d/g | awk '{print $1}' | sed 's/.$//g' -- failed
+-rw-r-Sr-                             != -rw-r-Sr--
+[22] $ rm -Rf d -- ok
+17 commands (14 passed, 3 failed)
+
+Upstream-Status: Backport
+http://git.savannah.gnu.org/cgit/acl.git/commit/?id=e98ce8acf84d12ea67a3ac76bf63c6d87d9af86d
+
+Signed-off-by: Kamil Dudka <kdudka@redhat.com>
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ test/cp.test            | 2 +-
+ test/misc.test          | 6 +++---
+ test/sbits-restore.test | 6 +++---
+ 3 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/test/cp.test b/test/cp.test
+index 0867f63..a927195 100644
+--- a/test/cp.test
++++ b/test/cp.test
+@@ -9,7 +9,7 @@ The cp utility should only copy ACLs if `-p' is given.
+ 	> -rw-rw-r--+
+
+ 	$ cp f g
+-	$ ls -l g | awk -- '{ print $1 }' | sed 's/\.$//g'
++	$ ls -l g | awk -- '{ print $1 }' | sed 's/\\.$//g'
+ 	> -rw-r--r--
+
+ 	$ rm g
+diff --git a/test/misc.test b/test/misc.test
+index 6e98053..29372b7 100644
+--- a/test/misc.test
++++ b/test/misc.test
+@@ -254,7 +254,7 @@ Add some users and groups
+ Symlink in directory with default ACL?
+
+ 	$ ln -s d d/l
+-	$ ls -dl d/l | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d/l | awk '{print $1}' | sed 's/\\.$//g'
+ 	> lrwxrwxrwx
+
+ 	$ ls -dl -L d/l | awk '{print $1}'
+@@ -343,7 +343,7 @@ Remove the default ACL
+ Reset to base entries
+
+ 	$ setfacl -b d
+-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+ 	> drwxr-x---
+
+ 	$ getfacl --omit-header d
+@@ -355,7 +355,7 @@ Reset to base entries
+ Now, chmod should change the group_obj entry
+
+ 	$ chmod 775 d
+-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+ 	> drwxrwxr-x
+
+ 	$ getfacl --omit-header d
+diff --git a/test/sbits-restore.test b/test/sbits-restore.test
+index de21340..5899b0a 100644
+--- a/test/sbits-restore.test
++++ b/test/sbits-restore.test
+@@ -13,10 +13,10 @@ Ensure setting of SUID/SGID/sticky via --restore works
+ 	$ touch d/g
+ 	$ touch d/u
+ 	$ setfacl --restore d.acl
+-	$ ls -dl d | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d | awk '{print $1}' | sed 's/\\.$//g'
+ 	> drwxr-xr-t
+-	$ ls -dl d/u | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d/u | awk '{print $1}' | sed 's/\\.$//g'
+ 	> -rwSr--r--
+-	$ ls -dl d/g | awk '{print $1}' | sed 's/\.$//g'
++	$ ls -dl d/g | awk '{print $1}' | sed 's/\\.$//g'
+ 	> -rw-r-Sr--
+ 	$ rm -Rf d
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch b/yocto-poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch
new file mode 100644
index 0000000..8cc11a6
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/acl/test-fixups-on-SELinux-machines-for-root-testcases.patch
@@ -0,0 +1,84 @@
+From d2f49ee6fe4850b8dda5b08676b36201d3c43710 Mon Sep 17 00:00:00 2001
+From: He Zhe <zhe.he@windriver.com>
+Date: Wed, 2 Mar 2016 15:46:57 +0800
+Subject: [PATCH] test: fixups on SELinux machines for root testcases
+
+ls adds a '.' at the end of the permission field list on SELinux
+machines, filter this out so root tests work on SELinux machines.
+
+Upstream-Status: Accepted
+http://git.savannah.gnu.org/cgit/acl.git/commit/?id=26a87d36f80d5e98bccb5878834d9e69dadfe3e9
+
+Signed-off-by: He Zhe <zhe.he@windriver.com>
+---
+ test/root/permissions.test | 8 ++++----
+ test/root/restore.test     | 2 +-
+ test/root/setfacl.test     | 2 +-
+ 3 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/test/root/permissions.test b/test/root/permissions.test
+index 9b9e3de..665339a 100644
+--- a/test/root/permissions.test
++++ b/test/root/permissions.test
+@@ -19,7 +19,7 @@ defined permissions.
+ 	$ cd d
+ 	$ umask 027
+ 	$ touch f
+-	$ ls -l f | awk -- '{ print $1, $3, $4 }'
++	$ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ 	> -rw-r----- root root
+
+
+@@ -39,7 +39,7 @@ Now, change the ownership of the file to bin:bin and verify that this
+ gives user bin write access.
+
+ 	$ chown bin:bin f
+-	$ ls -l f | awk -- '{ print $1, $3, $4 }'
++	$ ls -l f | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ 	> -rw-r----- bin bin
+ 	$ su bin
+ 	$ echo bin >> f
+@@ -256,12 +256,12 @@ directories if the file has an ACL and only CAP_FOWNER would grant them.
+ 	$ mkdir -m 600 x
+ 	$ chown daemon:daemon x
+ 	$ echo j > x/j
+-	$ ls -l x/j | awk -- '{ print $1, $3, $4 }'
++	$ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ 	> -rw-r----- root root
+
+ 	$ setfacl -m u:daemon:r x
+
+-	$ ls -l x/j | awk -- '{ print $1, $3, $4 }'
++	$ ls -l x/j | awk -- '{ print $1, $3, $4 }' | sed 's/\\.//g'
+ 	> -rw-r----- root root
+ 	(With the bug this gives: `ls: x/j: Permission denied'.)
+
+diff --git a/test/root/restore.test b/test/root/restore.test
+index 63a9d01..c85097c 100644
+--- a/test/root/restore.test
++++ b/test/root/restore.test
+@@ -21,7 +21,7 @@ Cry immediately if we are not running as root.
+ 	$ chown bin passwd
+ 	$ chmod u+s passwd
+ 	$ setfacl --restore passwd.acl
+-	$ ls -dl passwd | awk '{print $1 " " $3 " " $4}'
++	$ ls -dl passwd | awk '{print $1 " " $3 " " $4}' | sed 's/\\.//g'
+ 	> -rwsr-xr-x root root
+
+ 	$ rm passwd passwd.acl
+diff --git a/test/root/setfacl.test b/test/root/setfacl.test
+index a46a9f4..7efbad7 100644
+--- a/test/root/setfacl.test
++++ b/test/root/setfacl.test
+@@ -12,7 +12,7 @@ Cry immediately if we are not running as root.
+ 	$ sg bin
+ 	$ umask 027
+ 	$ touch g
+-	$ ls -dl g | awk '{print $1}'
++	$ ls -dl g | awk '{print $1}' | sed 's/\\.//g'
+ 	> -rw-r-----
+
+ 	$ setfacl -m m:- g
+--
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-support/attr/attr.inc b/yocto-poky/meta/recipes-support/attr/attr.inc
index 28c750f..6860978 100644
--- a/yocto-poky/meta/recipes-support/attr/attr.inc
+++ b/yocto-poky/meta/recipes-support/attr/attr.inc
@@ -34,6 +34,6 @@
 	sed -e 's|; @echo|; echo|' -i ${D}${PTEST_PATH}/test/Makefile
 }
 
-RDEPENDS_${PN}-ptest = "coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
+RDEPENDS_${PN}-ptest = "attr coreutils perl-module-filehandle perl-module-getopt-std perl-module-posix"
 
-BBCLASSEXTEND = "native nativesdk"
\ No newline at end of file
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb b/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb
index ad40c9b..44eee39 100644
--- a/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb
+++ b/yocto-poky/meta/recipes-support/attr/attr_2.4.47.bb
@@ -2,7 +2,9 @@
 
 # configure.ac was missing from the release tarball. This should be fixed in
 # future releases of attr, remove this when updating the recipe.
-SRC_URI_append += "file://attr-Missing-configure.ac.patch"
+SRC_URI_append += "file://attr-Missing-configure.ac.patch \
+                   file://dont-use-decl-macros.patch \
+                  "
 
 SRC_URI[md5sum] = "84f58dec00b60f2dc8fd1c9709291cc7"
 SRC_URI[sha256sum] = "25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859"
diff --git a/yocto-poky/meta/recipes-support/attr/files/dont-use-decl-macros.patch b/yocto-poky/meta/recipes-support/attr/files/dont-use-decl-macros.patch
new file mode 100644
index 0000000..9d4b892
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/attr/files/dont-use-decl-macros.patch
@@ -0,0 +1,56 @@
+Use extern "C" instead of __BEGIN_DECL/__END_DECL macros
+these macros are defined in sys/cdefs.h for glibc and this header is not available on all libc
+
+anyway they defined like below
+
+#ifdef __cplusplus
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
+#else
+# define __BEGIN_DECLS /* empty */
+# define __END_DECLS /* empty */
+#endif
+
+__THROW macro is also not available on musl, defined thusly
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Index: attr-2.4.47/include/xattr.h
+===================================================================
+--- attr-2.4.47.orig/include/xattr.h	2014-04-02 00:01:30.252091280 -0700
++++ attr-2.4.47/include/xattr.h	2014-04-02 00:12:57.985428099 -0700
+@@ -30,8 +30,20 @@
+ #define XATTR_CREATE  0x1       /* set value, fail if attr already exists */
+ #define XATTR_REPLACE 0x2       /* set value, fail if attr does not exist */
+ 
+-
+-__BEGIN_DECLS
++#ifndef __THROW
++# ifndef __GNUC_PREREQ
++#  define __GNUC_PREREQ(maj, min) (0)
++# endif
++# if defined __cplusplus && __GNUC_PREREQ (2,8)
++#  define __THROW       throw ()
++# else
++#  define __THROW
++# endif
++#endif
++
++#ifdef __cplusplus
++extern "C" {
++#endif
+ 
+ extern int setxattr (const char *__path, const char *__name,
+ 		      const void *__value, size_t __size, int __flags) __THROW;
+@@ -58,6 +70,8 @@
+ extern int lremovexattr (const char *__path, const char *__name) __THROW;
+ extern int fremovexattr (int __filedes,   const char *__name) __THROW;
+ 
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+ 
+ #endif	/* __XATTR_H__ */
diff --git a/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.1.bb b/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.1.bb
new file mode 100644
index 0000000..8b257d2
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/bash-completion/bash-completion_2.1.bb
@@ -0,0 +1,42 @@
+SUMMARY = "Programmable Completion for Bash 4"
+HOMEPAGE = "http://bash-completion.alioth.debian.org/"
+BUGTRACKER = "https://alioth.debian.org/projects/bash-completion/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+
+SECTION = "console/utils"
+
+SRC_URI="http://bash-completion.alioth.debian.org/files/${BPN}-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "4e2a9f11a4042a38ee79ddcd048e8b9e"
+SRC_URI[sha256sum] = "2b606804a7d5f823380a882e0f7b6c8a37b0e768e72c3d4107c51fbe8a46ae4f"
+UPSTREAM_CHECK_REGEX = "bash-completion-(?P<pver>(?!2008).+)\.tar"
+
+PARALLEL_MAKE = ""
+
+inherit autotools
+
+do_install_append() {
+	# compatdir
+	install -d ${D}${sysconfdir}/bash_completion.d/
+	echo '. ${datadir}/${BPN}/bash_completion' >${D}${sysconfdir}/bash_completion
+
+	# Delete files already provided by util-linux
+	local i
+	for i in cal dmesg eject hexdump hwclock ionice look renice rtcwake su; do
+		rm ${D}${datadir}/${BPN}/completions/$i
+	done
+
+	# Delete files for networkmanager
+	rm ${D}${datadir}/${BPN}/completions/nmcli
+}
+
+RDEPENDS_${PN} = "bash"
+
+# Some recipes are providing ${PN}-bash-completion packages
+PACKAGES =+ "${PN}-extra"
+FILES_${PN}-extra = "${datadir}/${BPN}/completions/ \
+    ${datadir}/${BPN}/helpers/"
+
+BBCLASSEXTEND = "nativesdk"
diff --git a/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch b/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch
new file mode 100644
index 0000000..8ef774f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch
@@ -0,0 +1,29 @@
+configure.ac: add check for NO_GETCONTEXT definition
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+[yann.morin.1998@free.fr: add a comment, change variable name, use
+ AS_IF, remove debug traces, use AC_CHECK_FUNCS (as suggested by
+ Thomas)]
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+---
+Upstream-Status: Pending
+ configure.ac | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- bdwgc-7.2f.orig/configure.ac	2014-06-01 19:00:47.000000000 +0200
++++ bdwgc-7.2f/configure.ac	2014-12-23 14:13:11.585716713 +0100
+@@ -365,6 +365,12 @@
+   AC_MSG_RESULT($ac_cv_fno_strict_aliasing)
+ fi
+ 
++# Check for getcontext (uClibc can be configured without it, for example)
++AC_CHECK_FUNCS([getcontext])
++AS_IF([test "$ac_cv_func_getcontext" = "no"],
++  [CFLAGS="$CFLAGS -DNO_GETCONTEXT"
++   CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"])
++
+ case "$host" in
+ # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64
+ # and unnecessary everywhere.
diff --git a/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch b/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch
new file mode 100644
index 0000000..c73c540
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/bdwgc/bdwgc/0002-Altera-NIOS2-support.patch
@@ -0,0 +1,71 @@
+From 2571df0e30b4976d7a12dbc6fbec4f1c4027924d Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Thu, 28 Jan 2016 04:13:13 +0100
+Subject: [PATCH] Altera NIOS2 support
+
+Add simple nios2 configuration support.
+
+* include/private/gcconfig.h (NIOS2): New macro.
+* include/private/gcconfig.h (mach_type_known, CPP_WORDSZ, MACH_TYPE,
+OS_TYPE, DYNAMIC_LOADING, _end, __data_start, DATASTART, DATAEND,
+ALIGNMENT, HBLKSIZE, HBLKSIZE, LINUX_STACKBOTTOM, NO_GETCONTEXT):
+Define for NIOS2.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport [ https://github.com/ivmai/bdwgc.git 2571df0e30b4976d7a12dbc6fbec4f1c4027924d ]
+---
+ include/private/gcconfig.h | 24 +++++++++++++++++++++++-
+ 1 file changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
+index c467c26..92d4727 100644
+--- a/include/private/gcconfig.h
++++ b/include/private/gcconfig.h
+@@ -181,6 +181,10 @@
+ #    endif
+ #    define mach_type_known
+ # endif
++# if defined(__NIOS2__) || defined(__NIOS2) || defined(__nios2__)
++#   define NIOS2 /* Altera NIOS2 */
++#   define mach_type_known
++# endif
+ # if defined(DGUX) && (defined(i386) || defined(__i386__))
+ #    define I386
+ #    ifndef _USING_DGUX
+@@ -1658,6 +1662,24 @@
+ #   endif
+ # endif
+ 
++# ifdef NIOS2
++#  define CPP_WORDSZ 32
++#  define MACH_TYPE "NIOS2"
++#  ifdef LINUX
++#    define OS_TYPE "LINUX"
++#    define DYNAMIC_LOADING
++     extern int _end[];
++     extern int __data_start[];
++#    define DATASTART ((ptr_t)(__data_start))
++#    define DATAEND ((ptr_t)(_end))
++#    define ALIGNMENT 4
++#    ifndef HBLKSIZE
++#      define HBLKSIZE 4096
++#    endif
++#    define LINUX_STACKBOTTOM
++#  endif /* Linux */
++# endif
++
+ # ifdef HP_PA
+ #   define MACH_TYPE "HP_PA"
+ #   ifdef __LP64__
+@@ -2622,6 +2644,7 @@
+ #if ((defined(UNIX_LIKE) && (defined(DARWIN) || defined(HURD) \
+                              || defined(OPENBSD) || defined(ARM32) \
+-                             || defined(MIPS) || defined(AVR32))) \
++                             || defined(MIPS) || defined(AVR32) \
++                             || defined(NIOS2))) \
+      || (defined(LINUX) && (defined(SPARC) || defined(M68K))) \
+      || ((defined(RTEMS) || defined(PLATFORM_ANDROID)) && defined(I386))) \
+     && !defined(NO_GETCONTEXT)
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb b/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
index 95e358f..8d4dab3 100644
--- a/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
+++ b/yocto-poky/meta/recipes-support/bdwgc/bdwgc_7.4.2.bb
@@ -21,16 +21,16 @@
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://README.QUICK;md5=55f5088f90a982fed7af9a4897047ef7"
 
-SRC_URI = "http://www.hboehm.info/gc/gc_source/gc-${PV}.tar.gz \
+SRCREV = "e31cdc288ffbee5bf25f948e19deb5a7ce846971"
+SRC_URI = "git://github.com/ivmai/bdwgc.git;branch=release-7_4 \
            file://0001-fix-build-with-musl.patch \
+           file://0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch \
+           file://0002-Altera-NIOS2-support.patch \
           "
 
-SRC_URI[md5sum] = "12c05fd2811d989341d8c6d81f66af87"
-SRC_URI[sha256sum] = "63320ad7c45460e4a40e03f5aa4c6893783f21a16416c3282b994f933312afa2"
-FILES_${PN}-doc = "/usr/share"
+FILES_${PN}-doc = "${datadir}"
 
-REAL_PV = "${@[d.getVar('PV',1)[:-1], d.getVar('PV',1)][(d.getVar('PV',1)[-1]).isdigit()]}"
-S = "${WORKDIR}/gc-${REAL_PV}"
+S = "${WORKDIR}/git"
 
 ARM_INSTRUCTION_SET = "arm"
 
diff --git a/yocto-poky/meta/recipes-support/boost/bjam-native_1.58.0.bb b/yocto-poky/meta/recipes-support/boost/bjam-native_1.60.0.bb
similarity index 100%
rename from yocto-poky/meta/recipes-support/boost/bjam-native_1.58.0.bb
rename to yocto-poky/meta/recipes-support/boost/bjam-native_1.60.0.bb
diff --git a/yocto-poky/meta/recipes-support/boost/boost-1.58.0.inc b/yocto-poky/meta/recipes-support/boost/boost-1.58.0.inc
deleted file mode 100644
index b47d091..0000000
--- a/yocto-poky/meta/recipes-support/boost/boost-1.58.0.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-# The Boost web site provides free peer-reviewed portable
-# C++ source libraries. The emphasis is on libraries which
-# work well with the C++ Standard Library. The libraries are
-# intended to be widely useful, and are in regular use by
-# thousands of programmers across a broad spectrum of applications.
-HOMEPAGE = "http://www.boost.org/"
-LICENSE = "BSL-1.0 & MIT & Python-2.0"
-LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
-
-BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}"
-BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}"
-BOOST_P = "boost_${BOOST_VER}"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2 \
-           file://0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch \
-           file://0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch \
-"
-
-SRC_URI[md5sum] = "b8839650e61e9c1c0a89f371dd475546"
-SRC_URI[sha256sum] = "fdfc204fc33ec79c99b9a74944c3e54bd78be4f7f15e260c0e2700a36dc7d3e5"
-
-S = "${WORKDIR}/${BOOST_P}"
diff --git a/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc b/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc
new file mode 100644
index 0000000..a38693e
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc
@@ -0,0 +1,19 @@
+# The Boost web site provides free peer-reviewed portable
+# C++ source libraries. The emphasis is on libraries which
+# work well with the C++ Standard Library. The libraries are
+# intended to be widely useful, and are in regular use by
+# thousands of programmers across a broad spectrum of applications.
+HOMEPAGE = "http://www.boost.org/"
+LICENSE = "BSL-1.0 & MIT & Python-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c"
+
+BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}"
+BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}"
+BOOST_P = "boost_${BOOST_VER}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2"
+
+SRC_URI[md5sum] = "65a840e1a0b13a558ff19eeb2c4f0cbe"
+SRC_URI[sha256sum] = "686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933fd3b"
+
+S = "${WORKDIR}/${BOOST_P}"
diff --git a/yocto-poky/meta/recipes-support/boost/boost.inc b/yocto-poky/meta/recipes-support/boost/boost.inc
index 3288e84..982446c 100644
--- a/yocto-poky/meta/recipes-support/boost/boost.inc
+++ b/yocto-poky/meta/recipes-support/boost/boost.inc
@@ -2,7 +2,8 @@
 SECTION = "libs"
 DEPENDS = "bjam-native zlib bzip2"
 
-ARM_INSTRUCTION_SET = "arm"
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
 
 BOOST_LIBS = "\
 	atomic \
@@ -18,6 +19,7 @@
 	serialization \
 	signals \
 	system \
+	timer \
 	test \
 	thread \
 	"
@@ -59,6 +61,7 @@
 
 # -dev last to pick up the remaining stuff
 PACKAGES += "${PN}-dev ${PN}-staticdev"
+FILES_${PN} = ""
 FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so"
 FILES_${PN}-staticdev = "${libdir}/libboost_*.a"
 
@@ -112,9 +115,9 @@
 		'--layout=system' \
 		"
 
-# use PARALLEL_MAKE to speed up the build, but limit it by -j 64, greater paralelism causes bjam to segfault or to ignore -j
+# use PARALLEL_MAKE to speed up the build, but limit it by -j 64, greater parallelism causes bjam to segfault or to ignore -j
 # https://svn.boost.org/trac/boost/ticket/7634
-def get_boost_parallel_make(bb, d):
+def get_boost_parallel_make(d):
     pm = d.getVar('PARALLEL_MAKE', True)
     if pm:
         # look for '-j' and throw other options (e.g. '-l') away
@@ -136,11 +139,11 @@
 
     return ""
 
-BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(bb, d)}"
-BJAM_OPTS    = '${BOOST_PARALLEL_MAKE} \
+BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(d)}"
+BJAM_OPTS    = '${BOOST_PARALLEL_MAKE} -d+2 -q \
 		${BJAM_TOOLS} \
 		-sBOOST_BUILD_USER_CONFIG=${S}/tools/build/example/user-config.jam \
-		--builddir=${S}/${TARGET_SYS} \
+		--build-dir=${S}/${TARGET_SYS} \
 		--disable-icu \
 		${BJAM_EXTRA}'
 
@@ -155,7 +158,7 @@
 	sed -i "/^using python : ${PYTHON_BASEVERSION}"/d ${S}/tools/build/example/user-config.jam
 	echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam
 	echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam
-	echo "using python : 3.4 : : ${STAGING_INCDIR}/python3.4m ;" >> ${S}/tools/build/example/user-config.jam
+	echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${S}/tools/build/example/user-config.jam
 
 	CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT}
 	sed -i '/^using python/d' project-config.jam
diff --git a/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch b/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch
new file mode 100644
index 0000000..df7e71f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch
@@ -0,0 +1,45 @@
+From f50e7bc9fed323c5705c0ed992c03e80eeec1dd6 Mon Sep 17 00:00:00 2001
+From: Jonathan Wakely <jwakely@redhat.com>
+Date: Mon, 14 Sep 2015 15:05:24 +0100
+Subject: [PATCH] Do not qualify <fenv.h> names that might be macros.
+
+The patch was imported from the boost-test git repository
+(https://github.com/boostorg/test) as of commit id
+f50e7bc9fed323c5705c0ed992c03e80eeec1dd6.
+  
+Upstream-Status: Accepted [commit f50e7bc9fed in develop branch]
+
+Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
+---
+ include/boost/test/impl/execution_monitor.ipp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/include/boost/test/impl/execution_monitor.ipp b/include/boost/test/impl/execution_monitor.ipp
+index b3e873e..a7bdce2 100644
+--- a/include/boost/test/impl/execution_monitor.ipp
++++ b/include/boost/test/impl/execution_monitor.ipp
+@@ -1380,8 +1380,8 @@ enable( unsigned mask )
+ 
+     return ~old_cw & BOOST_FPE_ALL;
+ #elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
+-    ::feclearexcept(BOOST_FPE_ALL);
+-    int res = ::feenableexcept( mask );
++    feclearexcept(BOOST_FPE_ALL);
++    int res = feenableexcept( mask );
+     return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
+ #else
+     /* Not Implemented  */
+@@ -1417,8 +1417,8 @@ disable( unsigned mask )
+ 
+     return ~old_cw & BOOST_FPE_ALL;
+ #elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H)
+-    ::feclearexcept(BOOST_FPE_ALL);
+-    int res = ::fedisableexcept( mask );
++    feclearexcept(BOOST_FPE_ALL);
++    int res = fedisableexcept( mask );
+     return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
+ #else
+     /* Not Implemented */
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-support/boost/boost/consider-hardfp.patch b/yocto-poky/meta/recipes-support/boost/boost/consider-hardfp.patch
new file mode 100644
index 0000000..66808a6
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/boost/boost/consider-hardfp.patch
@@ -0,0 +1,19 @@
+When using soft-float, on ARM we should not expect the FE_* symbols
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Upstream-Status: Pending
+
+Index: boost_1_60_0/boost/test/execution_monitor.hpp
+===================================================================
+--- boost_1_60_0.orig/boost/test/execution_monitor.hpp
++++ boost_1_60_0/boost/test/execution_monitor.hpp
+@@ -484,7 +484,8 @@ enum masks {
+     BOOST_FPE_UNDERFLOW = EM_UNDERFLOW|EM_DENORMAL,
+ 
+     BOOST_FPE_ALL       = MCW_EM,
+-#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG)
++#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \
++    || defined(__ARM_PCS)
+     BOOST_FPE_ALL       = 1,
+ #else
+     BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
diff --git a/yocto-poky/meta/recipes-support/boost/boost_1.58.0.bb b/yocto-poky/meta/recipes-support/boost/boost_1.58.0.bb
deleted file mode 100644
index c09d5f4..0000000
--- a/yocto-poky/meta/recipes-support/boost/boost_1.58.0.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-include boost-${PV}.inc
-include boost.inc
-
-SRC_URI += "\
-    file://arm-intrinsics.patch \
-"
diff --git a/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb b/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb
new file mode 100644
index 0000000..4d824c8
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb
@@ -0,0 +1,8 @@
+include boost-${PV}.inc
+include boost.inc
+
+SRC_URI += "\
+    file://arm-intrinsics.patch \
+    file://0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch;striplevel=2 \
+    file://consider-hardfp.patch \
+"
diff --git a/yocto-poky/meta/recipes-support/boost/files/0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch b/yocto-poky/meta/recipes-support/boost/files/0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch
deleted file mode 100644
index 329b4c3..0000000
--- a/yocto-poky/meta/recipes-support/boost/files/0001-mips1-fix-added-gcc.jam-was-passing-the-options-m32-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 817aed0d755bf8c0ba4ef6a77d41538e50b571fd Mon Sep 17 00:00:00 2001
-From: claymore <carlosmf.pt@gmail.com>
-Date: Fri, 24 Apr 2015 02:28:47 +0100
-Subject: [PATCH 1/2] mips1 fix added gcc.jam was passing the options -m32 and
- -m64 to mips cross-compilers, when those do not use
- such options This modification solves it by adding mips
- as an exception
-
-Signed-off-by: Carlos M. Ferreira carlosmf.pt@gmail.com
-
-Upstream-Status: Backport
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
----
- tools/build/src/tools/gcc.jam |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
-index db04534..eff95ae 100644
---- a/tools/build/src/tools/gcc.jam
-+++ b/tools/build/src/tools/gcc.jam
-@@ -451,7 +451,7 @@ rule setup-address-model ( targets * : sources * : properties * )
-         else
-         {
-             local arch = [ feature.get-values architecture : $(properties) ] ;
--            if $(arch) != arm
-+            if $(arch) != arm && $(arch) != mips1
-             {
-                 if $(model) = 32
-                 {
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-support/boost/files/0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch b/yocto-poky/meta/recipes-support/boost/files/0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch
deleted file mode 100644
index ecf7e55..0000000
--- a/yocto-poky/meta/recipes-support/boost/files/0002-Don-t-pass-m32-m64-where-it-s-not-supported.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From f825634a56b119dfa9d712119a66279cc7635978 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
-Date: Sat, 2 May 2015 14:24:02 +0200
-Subject: [PATCH 2/2] Don't pass -m32/-m64 where it's not supported.
-
-Only PowerPC, SPARC, and x86 do support the -m32 and -m64 compiler options [1].
-
-Rather then excluding all architectures not supporting these options as it is
-done in commit c0634341d9ee2c02d3a55c91dafb988afc066c49 [2], include all
-architectures that do support them.
-
-This will fix building Boost for the SuperH architecture with Buildroot [3].
-
-[1] https://gcc.gnu.org/onlinedocs/gcc/Option-Summary.html
-[2] https://github.com/boostorg/build/commit/c0634341d9ee2c02d3a55c91dafb988afc066c49
-[3] http://autobuild.buildroot.net/results/ccd/ccd5c83963032ba49b1627b1dff39e34a9486943/build-end.log
-
-Upstream-Status: Backport
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-
----
- tools/build/src/tools/gcc.jam |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam
-index eff95ae..2f6af93 100644
---- a/tools/build/src/tools/gcc.jam
-+++ b/tools/build/src/tools/gcc.jam
-@@ -451,7 +451,7 @@ rule setup-address-model ( targets * : sources * : properties * )
-         else
-         {
-             local arch = [ feature.get-values architecture : $(properties) ] ;
--            if $(arch) != arm && $(arch) != mips1
-+            if $(arch) = power || $(arch) = sparc || $(arch) = x86
-             {
-                 if $(model) = 32
-                 {
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch
new file mode 100644
index 0000000..6e2171f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates/update-ca-certificates-support-Toybox.patch
@@ -0,0 +1,34 @@
+From 30378026d136efa779732e3f6664e2ecf461e458 Mon Sep 17 00:00:00 2001
+From: Patrick Ohly <patrick.ohly@intel.com>
+Date: Thu, 17 Mar 2016 12:38:09 +0100
+Subject: [PATCH] update-ca-certificates: support Toybox
+
+"mktemp -t" is deprecated and does not work when using Toybox. Replace
+with something that works also with Toybox.
+
+Upstream-Status: Pending
+
+Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+---
+ sbin/update-ca-certificates | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
+index 79c41bb..ae9e3f1 100755
+--- a/sbin/update-ca-certificates
++++ b/sbin/update-ca-certificates
+@@ -113,9 +113,9 @@ trap cleanup 0
+ 
+ # Helper files.  (Some of them are not simple arrays because we spawn
+ # subshells later on.)
+-TEMPBUNDLE="$(mktemp -t "${CERTBUNDLE}.tmp.XXXXXX")"
+-ADDED="$(mktemp -t "ca-certificates.tmp.XXXXXX")"
+-REMOVED="$(mktemp -t "ca-certificates.tmp.XXXXXX")"
++TEMPBUNDLE="$(mktemp -p${TMPDIR:-/tmp} "${CERTBUNDLE}.tmp.XXXXXX")"
++ADDED="$(mktemp -p${TMPDIR:-/tmp} "ca-certificates.tmp.XXXXXX")"
++REMOVED="$(mktemp -p${TMPDIR:-/tmp} "ca-certificates.tmp.XXXXXX")"
+ 
+ # Adds a certificate to the list of trusted ones.  This includes a symlink
+ # in /etc/ssl/certs to the certificate file and its inclusion into the
+-- 
+2.1.4
diff --git a/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20150426.bb b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20150426.bb
deleted file mode 100644
index 716e3df..0000000
--- a/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20150426.bb
+++ /dev/null
@@ -1,80 +0,0 @@
-SUMMARY = "Common CA certificates"
-DESCRIPTION = "This package includes PEM files of CA certificates to allow \
-SSL-based applications to check for the authenticity of SSL connections. \
-This derived from Debian's CA Certificates."
-HOMEPAGE = "http://packages.debian.org/sid/ca-certificates"
-SECTION = "misc"
-LICENSE = "GPL-2.0+ & MPL-2.0"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=48d2baf97986999e776b43c8dd9e0c5a"
-
-# This is needed to ensure we can run the postinst at image creation time
-DEPENDS = "ca-certificates-native"
-DEPENDS_class-native = ""
-
-# tag: debian/20150426 + 2
-SRCREV = "d4790d2832aaac9152f450e06661511067592227"
-
-SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
-           file://0001-update-ca-certificates-remove-c-rehash.patch \
-           file://0002-update-ca-certificates-use-SYSROOT.patch \
-           file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
-           file://default-sysroot.patch \
-           file://sbindir.patch"
-
-S = "${WORKDIR}/git"
-
-inherit allarch
-
-EXTRA_OEMAKE = "\
-    'CERTSDIR=${datadir}/ca-certificates' \
-    'SBINDIR=${sbindir}' \
-"
-
-do_compile_prepend() {
-    oe_runmake clean
-}
-
-do_install () {
-    install -d ${D}${datadir}/ca-certificates \
-               ${D}${sysconfdir}/ssl/certs \
-               ${D}${sysconfdir}/ca-certificates/update.d
-    oe_runmake 'DESTDIR=${D}' install
-
-    install -d ${D}${mandir}/man8
-    install -m 0644 sbin/update-ca-certificates.8 ${D}${mandir}/man8/
-
-    install -d ${D}${sysconfdir}
-    {
-        echo "# Lines starting with # will be ignored"
-        echo "# Lines starting with ! will remove certificate on next update"
-        echo "#"
-        find ${D}${datadir}/ca-certificates -type f -name '*.crt' | \
-            sed 's,^${D}${datadir}/ca-certificates/,,'
-    } >${D}${sysconfdir}/ca-certificates.conf
-}
-
-do_install_append_class-target () {
-    sed -i -e 's,/etc/,${sysconfdir}/,' \
-           -e 's,/usr/share/,${datadir}/,' \
-           -e 's,/usr/local,${prefix}/local,' \
-        ${D}${sbindir}/update-ca-certificates \
-        ${D}${mandir}/man8/update-ca-certificates.8
-}
-
-pkg_postinst_${PN} () {
-    SYSROOT="$D" update-ca-certificates
-}
-
-CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf"
-
-# Postinsts don't seem to be run for nativesdk packages when populating SDKs.
-CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt"
-do_install_append_class-nativesdk () {
-    SYSROOT="${D}${SDKPATHNATIVE}" update-ca-certificates
-}
-
-do_install_append_class-native () {
-    SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
-}
-
-BBCLASSEXTEND += "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb
new file mode 100644
index 0000000..e0f1939
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb
@@ -0,0 +1,80 @@
+SUMMARY = "Common CA certificates"
+DESCRIPTION = "This package includes PEM files of CA certificates to allow \
+SSL-based applications to check for the authenticity of SSL connections. \
+This derived from Debian's CA Certificates."
+HOMEPAGE = "http://packages.debian.org/sid/ca-certificates"
+SECTION = "misc"
+LICENSE = "GPL-2.0+ & MPL-2.0"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=e7358b9541ccf3029e9705ed8de57968"
+
+# This is needed to ensure we can run the postinst at image creation time
+DEPENDS = "ca-certificates-native"
+DEPENDS_class-native = ""
+
+SRCREV = "f54715702c5c0581c9461f78fd84e2c8d2ec243c"
+
+SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
+           file://0001-update-ca-certificates-remove-c-rehash.patch \
+           file://0002-update-ca-certificates-use-SYSROOT.patch \
+           file://0001-update-ca-certificates-don-t-use-Debianisms-in-run-p.patch \
+           file://update-ca-certificates-support-Toybox.patch \
+           file://default-sysroot.patch \
+           file://sbindir.patch"
+
+S = "${WORKDIR}/git"
+
+inherit allarch
+
+EXTRA_OEMAKE = "\
+    'CERTSDIR=${datadir}/ca-certificates' \
+    'SBINDIR=${sbindir}' \
+"
+
+do_compile_prepend() {
+    oe_runmake clean
+}
+
+do_install () {
+    install -d ${D}${datadir}/ca-certificates \
+               ${D}${sysconfdir}/ssl/certs \
+               ${D}${sysconfdir}/ca-certificates/update.d
+    oe_runmake 'DESTDIR=${D}' install
+
+    install -d ${D}${mandir}/man8
+    install -m 0644 sbin/update-ca-certificates.8 ${D}${mandir}/man8/
+
+    install -d ${D}${sysconfdir}
+    {
+        echo "# Lines starting with # will be ignored"
+        echo "# Lines starting with ! will remove certificate on next update"
+        echo "#"
+        find ${D}${datadir}/ca-certificates -type f -name '*.crt' | \
+            sed 's,^${D}${datadir}/ca-certificates/,,'
+    } >${D}${sysconfdir}/ca-certificates.conf
+}
+
+do_install_append_class-target () {
+    sed -i -e 's,/etc/,${sysconfdir}/,' \
+           -e 's,/usr/share/,${datadir}/,' \
+           -e 's,/usr/local,${prefix}/local,' \
+        ${D}${sbindir}/update-ca-certificates \
+        ${D}${mandir}/man8/update-ca-certificates.8
+}
+
+pkg_postinst_${PN} () {
+    SYSROOT="$D" update-ca-certificates
+}
+
+CONFFILES_${PN} += "${sysconfdir}/ca-certificates.conf"
+
+# Postinsts don't seem to be run for nativesdk packages when populating SDKs.
+CONFFILES_${PN}_append_class-nativesdk = " ${sysconfdir}/ssl/certs/ca-certificates.crt"
+do_install_append_class-nativesdk () {
+    SYSROOT="${D}${SDKPATHNATIVE}" update-ca-certificates
+}
+
+do_install_append_class-native () {
+    SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
+}
+
+BBCLASSEXTEND += "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb b/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb
index 66a892a..2974e36 100644
--- a/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb
+++ b/yocto-poky/meta/recipes-support/consolekit/consolekit_0.4.6.bb
@@ -33,7 +33,6 @@
 FILES_${PN} += "${localstatedir}/log/ConsoleKit ${exec_prefix}/lib/ConsoleKit \
                 ${libdir}/ConsoleKit  ${systemd_unitdir} ${base_libdir} \
                 ${datadir}/dbus-1 ${datadir}/PolicyKit ${datadir}/polkit*"
-FILES_${PN}-dbg += "${base_libdir}/security/.debug"
 
 PACKAGES =+ "pam-plugin-ck-connector"
 FILES_pam-plugin-ck-connector += "${base_libdir}/security/*.so"
diff --git a/yocto-poky/meta/recipes-support/createrepo/createrepo/fixstat.patch b/yocto-poky/meta/recipes-support/createrepo/createrepo/fixstat.patch
new file mode 100644
index 0000000..d34eb56
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/createrepo/createrepo/fixstat.patch
@@ -0,0 +1,19 @@
+When reading the mtime from disk, the system can get a floating point 
+value. Convert this to an int for comparision purposes, else some
+packages always get reindexed as the value in the index is an int.
+RP 2016/3/2
+Upstream-Status: Pending
+
+Index: createrepo-0.4.11/readMetadata.py
+===================================================================
+--- createrepo-0.4.11.orig/readMetadata.py
++++ createrepo-0.4.11/readMetadata.py
+@@ -126,7 +126,7 @@ class MetadataIndex(object):
+             if self.opts.get('verbose'):
+                 print _("Size (%i -> %i) changed for file %s") % (size,st.st_size,filepath)
+             return
+-        if st.st_mtime != mtime:
++        if int(st.st_mtime) != mtime:
+             if self.opts.get('verbose'):
+                 print _("Modification time changed for %s") % filepath
+             return
diff --git a/yocto-poky/meta/recipes-support/createrepo/createrepo_0.4.11.bb b/yocto-poky/meta/recipes-support/createrepo/createrepo_0.4.11.bb
index 5f9ecf6..2a3231b 100644
--- a/yocto-poky/meta/recipes-support/createrepo/createrepo_0.4.11.bb
+++ b/yocto-poky/meta/recipes-support/createrepo/createrepo_0.4.11.bb
@@ -19,6 +19,7 @@
            file://createrepo-dbpath.patch \
            file://dumpMetadata-disable-signature-validation.patch \
            file://rpm-createsolvedb.py \
+           file://fixstat.patch \
            "
 
 SRC_URI[md5sum] = "3e9ccf4abcffe3f49af078c83611eda2"
diff --git a/yocto-poky/meta/recipes-support/curl/curl/CVE-2016-0754.patch b/yocto-poky/meta/recipes-support/curl/curl/CVE-2016-0754.patch
deleted file mode 100644
index f0402de..0000000
--- a/yocto-poky/meta/recipes-support/curl/curl/CVE-2016-0754.patch
+++ /dev/null
@@ -1,417 +0,0 @@
-From b1bb4ca6d8777683b6a549fb61dba36759da26f4 Mon Sep 17 00:00:00 2001
-From: Ray Satiro <raysatiro@yahoo.com>
-Date: Tue, 26 Jan 2016 23:23:15 +0100
-Subject: [PATCH] curl: avoid local drive traversal when saving file (Windows)
-
-curl does not sanitize colons in a remote file name that is used as the
-local file name. This may lead to a vulnerability on systems where the
-colon is a special path character. Currently Windows/DOS is the only OS
-where this vulnerability applies.
-
-CVE-2016-0754
-
-Bug: http://curl.haxx.se/docs/adv_20160127B.html
-
-Upstream-Status: Backport
-http://curl.haxx.se/CVE-2016-0754.patch
-
-CVE: CVE-2016-0754
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- src/tool_cb_hdr.c  |  40 ++++++------
- src/tool_doswin.c  | 174 ++++++++++++++++++++++++++++++++++++++++++++---------
- src/tool_doswin.h  |   2 +-
- src/tool_operate.c |  29 ++++++---
- 4 files changed, 187 insertions(+), 58 deletions(-)
-
-diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
-index fd208e8..0fca39f 100644
---- a/src/tool_cb_hdr.c
-+++ b/src/tool_cb_hdr.c
-@@ -26,10 +26,11 @@
- #define ENABLE_CURLX_PRINTF
- /* use our own printf() functions */
- #include "curlx.h"
- 
- #include "tool_cfgable.h"
-+#include "tool_doswin.h"
- #include "tool_msgs.h"
- #include "tool_cb_hdr.h"
- 
- #include "memdebug.h" /* keep this as LAST include */
- 
-@@ -112,22 +113,28 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata)
-       /* this expression below typecasts 'cb' only to avoid
-          warning: signed and unsigned type in conditional expression
-       */
-       len = (ssize_t)cb - (p - str);
-       filename = parse_filename(p, len);
--      if(filename) {
--        outs->filename = filename;
--        outs->alloc_filename = TRUE;
--        outs->is_cd_filename = TRUE;
--        outs->s_isreg = TRUE;
--        outs->fopened = FALSE;
--        outs->stream = NULL;
--        hdrcbdata->honor_cd_filename = FALSE;
--        break;
--      }
--      else
-+      if(!filename)
-+        return failure;
-+
-+#if defined(MSDOS) || defined(WIN32)
-+      if(sanitize_file_name(&filename)) {
-+        free(filename);
-         return failure;
-+      }
-+#endif /* MSDOS || WIN32 */
-+
-+      outs->filename = filename;
-+      outs->alloc_filename = TRUE;
-+      outs->is_cd_filename = TRUE;
-+      outs->s_isreg = TRUE;
-+      outs->fopened = FALSE;
-+      outs->stream = NULL;
-+      hdrcbdata->honor_cd_filename = FALSE;
-+      break;
-     }
-   }
- 
-   return cb;
- }
-@@ -179,19 +186,16 @@ static char *parse_filename(const char *ptr, size_t len)
-       return NULL;
-     }
-   }
- 
-   /* scan for the end letter and stop there */
--  q = p;
--  while(*q) {
--    if(q[1] && (q[0] == '\\'))
--      q++;
--    else if(q[0] == stop)
-+  for(q = p; *q; ++q) {
-+    if(*q == stop) {
-+      *q = '\0';
-       break;
--    q++;
-+    }
-   }
--  *q = '\0';
- 
-   /* make sure the file name doesn't end in \r or \n */
-   q = strchr(p, '\r');
-   if(q)
-     *q = '\0';
-diff --git a/src/tool_doswin.c b/src/tool_doswin.c
-index dd6e8bb..9c6a7a3 100644
---- a/src/tool_doswin.c
-+++ b/src/tool_doswin.c
-@@ -83,46 +83,110 @@ __pragma(warning(pop))
- #  define _use_lfn(f) ALWAYS_FALSE  /* long file names never available */
- #elif defined(__DJGPP__)
- #  include <fcntl.h>                /* _use_lfn(f) prototype */
- #endif
- 
--static const char *msdosify (const char *file_name);
--static char *rename_if_dos_device_name (char *file_name);
-+static char *msdosify(const char *file_name);
-+static char *rename_if_dos_device_name(const char *file_name);
- 
--/*
-- * sanitize_dos_name: returns a newly allocated string holding a
-- * valid file name which will be a transformation of given argument
-- * in case this wasn't already a valid file name.
-- *
-- * This function takes ownership of given argument, free'ing it before
-- * returning. Caller is responsible of free'ing returned string. Upon
-- * out of memory condition function returns NULL.
-- */
- 
--char *sanitize_dos_name(char *file_name)
-+/*
-+Sanitize *file_name.
-+Success: (CURLE_OK) *file_name points to a sanitized version of the original.
-+         This function takes ownership of the original *file_name and frees it.
-+Failure: (!= CURLE_OK) *file_name is unchanged.
-+*/
-+CURLcode sanitize_file_name(char **file_name)
- {
--  char new_name[PATH_MAX];
-+  size_t len;
-+  char *p, *sanitized;
-+
-+  /* Calculate the maximum length of a filename.
-+     FILENAME_MAX is often the same as PATH_MAX, in other words it does not
-+     discount the path information. PATH_MAX size is calculated based on:
-+     <drive-letter><colon><path-sep><max-filename-len><NULL> */
-+  const size_t max_filename_len = PATH_MAX - 3 - 1;
-+
-+  if(!file_name || !*file_name)
-+    return CURLE_BAD_FUNCTION_ARGUMENT;
-+
-+  len = strlen(*file_name);
-+
-+  if(len >= max_filename_len)
-+    len = max_filename_len - 1;
- 
--  if(!file_name)
--    return NULL;
-+  sanitized = malloc(len + 1);
- 
--  if(strlen(file_name) >= PATH_MAX)
--    file_name[PATH_MAX-1] = '\0'; /* truncate it */
-+  if(!sanitized)
-+    return CURLE_OUT_OF_MEMORY;
- 
--  strcpy(new_name, msdosify(file_name));
-+  strncpy(sanitized, *file_name, len);
-+  sanitized[len] = '\0';
- 
--  Curl_safefree(file_name);
-+  for(p = sanitized; *p; ++p ) {
-+    const char *banned;
-+    if(1 <= *p && *p <= 31) {
-+      *p = '_';
-+      continue;
-+    }
-+    for(banned = "|<>/\\\":?*"; *banned; ++banned) {
-+      if(*p == *banned) {
-+        *p = '_';
-+        break;
-+      }
-+    }
-+  }
- 
--  return strdup(rename_if_dos_device_name(new_name));
-+#ifdef MSDOS
-+  /* msdosify checks for more banned characters for MSDOS, however it allows
-+     for some path information to pass through. since we are sanitizing only a
-+     filename and cannot allow a path it's important this call be done in
-+     addition to and not instead of the banned character check above. */
-+  p = msdosify(sanitized);
-+  if(!p) {
-+    free(sanitized);
-+    return CURLE_BAD_FUNCTION_ARGUMENT;
-+  }
-+  sanitized = p;
-+  len = strlen(sanitized);
-+#endif
-+
-+  p = rename_if_dos_device_name(sanitized);
-+  if(!p) {
-+    free(sanitized);
-+    return CURLE_BAD_FUNCTION_ARGUMENT;
-+  }
-+  sanitized = p;
-+  len = strlen(sanitized);
-+
-+  /* dos_device_name rename will rename a device name, possibly changing the
-+     length. If the length is too long now we can't truncate it because we
-+     could end up with a device name. In practice this shouldn't be a problem
-+     because device names are short, but you never know. */
-+  if(len >= max_filename_len) {
-+    free(sanitized);
-+    return CURLE_BAD_FUNCTION_ARGUMENT;
-+  }
-+
-+  *file_name = sanitized;
-+  return CURLE_OK;
- }
- 
--/* The following functions are taken with modification from the DJGPP
-- * port of tar 1.12. They use algorithms originally from DJTAR. */
-+/* The functions msdosify, rename_if_dos_device_name and __crt0_glob_function
-+ * were taken with modification from the DJGPP port of tar 1.12. They use
-+ * algorithms originally from DJTAR.
-+ */
- 
--static const char *msdosify (const char *file_name)
-+/*
-+Extra sanitization MSDOS for file_name.
-+Returns a copy of file_name that is sanitized by MSDOS standards.
-+Warning: path information may pass through. For sanitizing a filename use
-+sanitize_file_name which calls this function after sanitizing path info.
-+*/
-+static char *msdosify(const char *file_name)
- {
--  static char dos_name[PATH_MAX];
-+  char dos_name[PATH_MAX];
-   static const char illegal_chars_dos[] = ".+, ;=[]" /* illegal in DOS */
-     "|<>\\\":?*"; /* illegal in DOS & W95 */
-   static const char *illegal_chars_w95 = &illegal_chars_dos[8];
-   int idx, dot_idx;
-   const char *s = file_name;
-@@ -199,39 +263,89 @@ static const char *msdosify (const char *file_name)
-     else
-       idx++;
-   }
- 
-   *d = '\0';
--  return dos_name;
-+  return strdup(dos_name);
- }
- 
--static char *rename_if_dos_device_name (char *file_name)
-+/*
-+Rename file_name if it's a representation of a device name.
-+Returns a copy of file_name, and the copy will have contents different from the
-+original if a device name was found.
-+*/
-+static char *rename_if_dos_device_name(const char *file_name)
- {
-   /* We could have a file whose name is a device on MS-DOS.  Trying to
-    * retrieve such a file would fail at best and wedge us at worst.  We need
-    * to rename such files. */
--  char *base;
-+  char *p, *base;
-   struct_stat st_buf;
-   char fname[PATH_MAX];
- 
-   strncpy(fname, file_name, PATH_MAX-1);
-   fname[PATH_MAX-1] = '\0';
-   base = basename(fname);
-   if(((stat(base, &st_buf)) == 0) && (S_ISCHR(st_buf.st_mode))) {
-     size_t blen = strlen(base);
- 
--    if(strlen(fname) >= PATH_MAX-1) {
-+    if(strlen(fname) == PATH_MAX-1) {
-       /* Make room for the '_' */
-       blen--;
-       base[blen] = '\0';
-     }
-     /* Prepend a '_'.  */
-     memmove(base + 1, base, blen + 1);
-     base[0] = '_';
--    strcpy(file_name, fname);
-   }
--  return file_name;
-+
-+  /* The above stat check does not identify devices for me in Windows 7. For
-+     example a stat on COM1 returns a regular file S_IFREG. According to MSDN
-+     stat doc that is the correct behavior, so I assume the above code is
-+     legacy, maybe MSDOS or DJGPP specific? */
-+
-+  /* Rename devices.
-+     Examples: CON => _CON, CON.EXT => CON_EXT, CON:ADS => CON_ADS */
-+  for(p = fname; p; p = (p == fname && fname != base ? base : NULL)) {
-+    size_t p_len;
-+    int x = (curl_strnequal(p, "CON", 3) ||
-+             curl_strnequal(p, "PRN", 3) ||
-+             curl_strnequal(p, "AUX", 3) ||
-+             curl_strnequal(p, "NUL", 3)) ? 3 :
-+            (curl_strnequal(p, "CLOCK$", 6)) ? 6 :
-+            (curl_strnequal(p, "COM", 3) || curl_strnequal(p, "LPT", 3)) ?
-+              (('1' <= p[3] && p[3] <= '9') ? 4 : 3) : 0;
-+
-+    if(!x)
-+      continue;
-+
-+    /* the devices may be accessible with an extension or ADS, for
-+       example CON.AIR and CON:AIR both access console */
-+    if(p[x] == '.' || p[x] == ':') {
-+      p[x] = '_';
-+      continue;
-+    }
-+    else if(p[x]) /* no match */
-+      continue;
-+
-+    p_len = strlen(p);
-+
-+    if(strlen(fname) == PATH_MAX-1) {
-+      /* Make room for the '_' */
-+      p_len--;
-+      p[p_len] = '\0';
-+    }
-+    /* Prepend a '_'.  */
-+    memmove(p + 1, p, p_len + 1);
-+    p[0] = '_';
-+
-+    /* if fname was just modified then the basename pointer must be updated */
-+    if(p == fname)
-+      base = basename(fname);
-+  }
-+
-+  return strdup(fname);
- }
- 
- #if defined(MSDOS) && (defined(__DJGPP__) || defined(__GO32__))
- 
- /*
-diff --git a/src/tool_doswin.h b/src/tool_doswin.h
-index cd216db..fc83f16 100644
---- a/src/tool_doswin.h
-+++ b/src/tool_doswin.h
-@@ -23,11 +23,11 @@
-  ***************************************************************************/
- #include "tool_setup.h"
- 
- #if defined(MSDOS) || defined(WIN32)
- 
--char *sanitize_dos_name(char *file_name);
-+CURLcode sanitize_file_name(char **filename);
- 
- #if defined(MSDOS) && (defined(__DJGPP__) || defined(__GO32__))
- 
- char **__crt0_glob_function(char *arg);
- 
-diff --git a/src/tool_operate.c b/src/tool_operate.c
-index 30d60cb..272ebd4 100644
---- a/src/tool_operate.c
-+++ b/src/tool_operate.c
-@@ -541,30 +541,41 @@ static CURLcode operate_do(struct GlobalConfig *global,
-           if(!outfile) {
-             /* extract the file name from the URL */
-             result = get_url_file_name(&outfile, this_url);
-             if(result)
-               goto show_error;
-+
-+#if defined(MSDOS) || defined(WIN32)
-+            result = sanitize_file_name(&outfile);
-+            if(result) {
-+              Curl_safefree(outfile);
-+              goto show_error;
-+            }
-+#endif /* MSDOS || WIN32 */
-+
-             if(!*outfile && !config->content_disposition) {
-               helpf(global->errors, "Remote file name has no length!\n");
-               result = CURLE_WRITE_ERROR;
-               goto quit_urls;
-             }
--#if defined(MSDOS) || defined(WIN32)
--            /* For DOS and WIN32, we do some major replacing of
--               bad characters in the file name before using it */
--            outfile = sanitize_dos_name(outfile);
--            if(!outfile) {
--              result = CURLE_OUT_OF_MEMORY;
--              goto show_error;
--            }
--#endif /* MSDOS || WIN32 */
-           }
-           else if(urls) {
-             /* fill '#1' ... '#9' terms from URL pattern */
-             char *storefile = outfile;
-             result = glob_match_url(&outfile, storefile, urls);
-             Curl_safefree(storefile);
-+
-+#if defined(MSDOS) || defined(WIN32)
-+            if(!result) {
-+              result = sanitize_file_name(&outfile);
-+              if(result) {
-+                Curl_safefree(outfile);
-+                goto show_error;
-+              }
-+            }
-+#endif /* MSDOS || WIN32 */
-+
-             if(result) {
-               /* bad globbing */
-               warnf(config->global, "bad output glob!\n");
-               goto quit_urls;
-             }
--- 
-2.7.0
-
diff --git a/yocto-poky/meta/recipes-support/curl/curl/CVE-2016-0755.patch b/yocto-poky/meta/recipes-support/curl/curl/CVE-2016-0755.patch
deleted file mode 100644
index 44b9d9a..0000000
--- a/yocto-poky/meta/recipes-support/curl/curl/CVE-2016-0755.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From d41dcba4e9b69d6b761e3460cc6ae7e8fd8f621f Mon Sep 17 00:00:00 2001
-From: Isaac Boukris <iboukris@gmail.com>
-Date: Wed, 13 Jan 2016 11:05:51 +0200
-Subject: [PATCH] NTLM: Fix ConnectionExists to compare Proxy credentials
-
-Proxy NTLM authentication should compare credentials when
-re-using a connection similar to host authentication, as it
-authenticate the connection.
-
-Example:
-curl -v -x http://proxy:port http://host/ -U good_user:good_pwd
-  --proxy-ntlm --next -x http://proxy:port http://host/
-    [-U fake_user:fake_pwd --proxy-ntlm]
-
-CVE-2016-0755
-
-Bug: http://curl.haxx.se/docs/adv_20160127A.html
-
-Upstream-Status: Backport
-http://curl.haxx.se/CVE-2016-0755.patch
-
-CVE: CVE-2016-0755
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- lib/url.c | 62 ++++++++++++++++++++++++++++++++++++++++----------------------
- 1 file changed, 40 insertions(+), 22 deletions(-)
-
-Index: curl-7.44.0/lib/url.c
-===================================================================
---- curl-7.44.0.orig/lib/url.c
-+++ curl-7.44.0/lib/url.c
-@@ -3107,12 +3107,17 @@ ConnectionExists(struct SessionHandle *d
-   struct connectdata *check;
-   struct connectdata *chosen = 0;
-   bool canPipeline = IsPipeliningPossible(data, needle);
-+  struct connectbundle *bundle;
-+
- #ifdef USE_NTLM
--  bool wantNTLMhttp = ((data->state.authhost.want & CURLAUTH_NTLM) ||
--                       (data->state.authhost.want & CURLAUTH_NTLM_WB)) &&
--    (needle->handler->protocol & PROTO_FAMILY_HTTP) ? TRUE : FALSE;
-+  bool wantNTLMhttp = ((data->state.authhost.want &
-+                      (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) &&
-+                      (needle->handler->protocol & PROTO_FAMILY_HTTP));
-+  bool wantProxyNTLMhttp = (needle->bits.proxy_user_passwd &&
-+                           ((data->state.authproxy.want &
-+                           (CURLAUTH_NTLM | CURLAUTH_NTLM_WB)) &&
-+                           (needle->handler->protocol & PROTO_FAMILY_HTTP)));
- #endif
--  struct connectbundle *bundle;
- 
-   *force_reuse = FALSE;
-   *waitpipe = FALSE;
-@@ -3152,9 +3157,6 @@ ConnectionExists(struct SessionHandle *d
-     curr = bundle->conn_list->head;
-     while(curr) {
-       bool match = FALSE;
--#if defined(USE_NTLM)
--      bool credentialsMatch = FALSE;
--#endif
-       size_t pipeLen;
- 
-       /*
-@@ -3262,21 +3264,14 @@ ConnectionExists(struct SessionHandle *d
-           continue;
-       }
- 
--      if((!(needle->handler->flags & PROTOPT_CREDSPERREQUEST))
--#ifdef USE_NTLM
--         || (wantNTLMhttp || check->ntlm.state != NTLMSTATE_NONE)
--#endif
--        ) {
--        /* This protocol requires credentials per connection or is HTTP+NTLM,
-+      if(!(needle->handler->flags & PROTOPT_CREDSPERREQUEST)) {
-+        /* This protocol requires credentials per connection,
-            so verify that we're using the same name and password as well */
-         if(!strequal(needle->user, check->user) ||
-            !strequal(needle->passwd, check->passwd)) {
-           /* one of them was different */
-           continue;
-         }
--#if defined(USE_NTLM)
--        credentialsMatch = TRUE;
--#endif
-       }
- 
-       if(!needle->bits.httpproxy || needle->handler->flags&PROTOPT_SSL ||
-@@ -3335,20 +3330,43 @@ ConnectionExists(struct SessionHandle *d
-            possible. (Especially we must not reuse the same connection if
-            partway through a handshake!) */
-         if(wantNTLMhttp) {
--          if(credentialsMatch && check->ntlm.state != NTLMSTATE_NONE) {
--            chosen = check;
-+          if(!strequal(needle->user, check->user) ||
-+             !strequal(needle->passwd, check->passwd))
-+            continue;
-+        }
-+        else if(check->ntlm.state != NTLMSTATE_NONE) {
-+          /* Connection is using NTLM auth but we don't want NTLM */
-+          continue;
-+        }
-+
-+        /* Same for Proxy NTLM authentication */
-+        if(wantProxyNTLMhttp) {
-+          if(!strequal(needle->proxyuser, check->proxyuser) ||
-+             !strequal(needle->proxypasswd, check->proxypasswd))
-+            continue;
-+        }
-+        else if(check->proxyntlm.state != NTLMSTATE_NONE) {
-+          /* Proxy connection is using NTLM auth but we don't want NTLM */
-+          continue;
-+        }
- 
-+        if(wantNTLMhttp || wantProxyNTLMhttp) {
-+          /* Credentials are already checked, we can use this connection */
-+          chosen = check;
-+
-+          if((wantNTLMhttp &&
-+             (check->ntlm.state != NTLMSTATE_NONE)) ||
-+              (wantProxyNTLMhttp &&
-+               (check->proxyntlm.state != NTLMSTATE_NONE))) {
-             /* We must use this connection, no other */
-             *force_reuse = TRUE;
-             break;
-           }
--          else if(credentialsMatch)
--            /* this is a backup choice */
--            chosen = check;
-+
-+          /* Continue look up for a better connection */
-           continue;
-         }
- #endif
--
-         if(canPipeline) {
-           /* We can pipeline if we want to. Let's continue looking for
-              the optimal connection to use, i.e the shortest pipe that is not
diff --git a/yocto-poky/meta/recipes-support/curl/curl/pkgconfig_fix.patch b/yocto-poky/meta/recipes-support/curl/curl/pkgconfig_fix.patch
deleted file mode 100644
index 5d8769d..0000000
--- a/yocto-poky/meta/recipes-support/curl/curl/pkgconfig_fix.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Upstream-Status: Inappropriate [packaging]
-
-diff -Nurd curl-7.29.0/configure.ac curl-7.29.0/configure.ac
---- curl-7.29.0/configure.ac	2013-02-06 11:47:19.000000000 +0200
-+++ curl-7.29.0/configure.ac	2013-02-16 12:32:22.132327764 +0200
-@@ -1883,6 +1883,7 @@
-        AC_SUBST(USE_GNUTLS, [1])
-        GNUTLS_ENABLED=1
-        USE_GNUTLS="yes"
-+       GNUTLS_REQUIRED="gnutls"
-        curl_ssl_msg="enabled (GnuTLS)"
-        ],
-        [
-@@ -1953,6 +1954,8 @@
-    ])
- fi
- 
-+AC_SUBST(GNUTLS_REQUIRED)
-+
- dnl ----------------------------------------------------
- dnl check for PolarSSL
- dnl ----------------------------------------------------
-diff -Nurd curl-7.29.0/libcurl.pc.in curl-7.29.0/libcurl.pc.in
---- curl-7.29.0/libcurl.pc.in	2012-12-12 00:32:22.000000000 +0200
-+++ curl-7.29.0/libcurl.pc.in	2013-02-16 12:33:27.063844337 +0200
-@@ -35,5 +35,5 @@
- Description: Library to transfer files with ftp, http, etc.
- Version: @CURLVERSION@
- Libs: -L${libdir} -lcurl
--Libs.private: @LIBCURL_LIBS@
-+Libs.private: -ldl -lz
- Cflags: -I${includedir} @CPPFLAG_CURL_STATICLIB@
diff --git a/yocto-poky/meta/recipes-support/curl/curl_7.44.0.bb b/yocto-poky/meta/recipes-support/curl/curl_7.44.0.bb
deleted file mode 100644
index 419ed83..0000000
--- a/yocto-poky/meta/recipes-support/curl/curl_7.44.0.bb
+++ /dev/null
@@ -1,60 +0,0 @@
-SUMMARY = "Command line tool and library for client-side URL transfers"
-HOMEPAGE = "http://curl.haxx.se/"
-BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
-SECTION = "console/network"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=7;md5=3a34942f4ae3fbf1a303160714e664ac"
-
-SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
-           file://pkgconfig_fix.patch \
-          "
-
-# curl likes to set -g0 in CFLAGS, so we stop it
-# from mucking around with debug options
-#
-SRC_URI += " file://configure_ac.patch \
-             file://CVE-2016-0754.patch \
-             file://CVE-2016-0755.patch"
-
-SRC_URI[md5sum] = "6b952ca00e5473b16a11f05f06aa8dae"
-SRC_URI[sha256sum] = "1e2541bae6582bb697c0fbae49e1d3e6fad5d05d5aa80dbd6f072e0a44341814"
-
-inherit autotools pkgconfig binconfig multilib_header
-
-PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)} gnutls zlib"
-PACKAGECONFIG_class-native = "ipv6 ssl zlib"
-PACKAGECONFIG_class-nativesdk = "ipv6 ssl zlib"
-
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
-PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
-PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
-PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
-PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
-PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
-PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
-
-EXTRA_OECONF = "--without-libidn \
-                --enable-crypto-auth \
-                --disable-ldap \
-                --disable-ldaps \
-                --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
-"
-# see https://lists.yoctoproject.org/pipermail/poky/2013-December/009435.html
-# We should ideally drop ac_cv_sizeof_off_t from site files but until then
-EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'ac_cv_sizeof_off_t=8', '', d)}"
-
-do_install_append() {
-	oe_multilib_header curl/curlbuild.h
-}
-
-do_install_append_class-target() {
-	# cleanup buildpaths from curl-config
-	sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/curl-config
-}
-
-PACKAGES =+ "lib${BPN}"
-
-FILES_lib${BPN} = "${libdir}/lib*.so.*"
-RRECOMMENDS_lib${BPN} += "ca-certificates"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/curl/curl_7.47.1.bb b/yocto-poky/meta/recipes-support/curl/curl_7.47.1.bb
new file mode 100644
index 0000000..c2173d8
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/curl/curl_7.47.1.bb
@@ -0,0 +1,68 @@
+SUMMARY = "Command line tool and library for client-side URL transfers"
+HOMEPAGE = "http://curl.haxx.se/"
+BUGTRACKER = "http://curl.haxx.se/mail/list.cgi?list=curl-tracker"
+SECTION = "console/network"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e664ac"
+
+SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2"
+
+# curl likes to set -g0 in CFLAGS, so we stop it
+# from mucking around with debug options
+#
+SRC_URI += " file://configure_ac.patch"
+
+SRC_URI[md5sum] = "9ea3123449439bbd960cd25cf98796fb"
+SRC_URI[sha256sum] = "ddc643ab9382e24bbe4747d43df189a0a6ce38fcb33df041b9cb0b3cd47ae98f"
+
+inherit autotools pkgconfig binconfig multilib_header
+
+PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", d)} gnutls proxy zlib"
+PACKAGECONFIG_class-native = "ipv6 proxy ssl zlib"
+PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl zlib"
+
+PACKAGECONFIG[dict] = "--enable-dict,--disable-dict,"
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[gopher] = "--enable-gopher,--disable-gopher,"
+PACKAGECONFIG[imap] = "--enable-imap,--disable-imap,"
+PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
+PACKAGECONFIG[ldap] = "--enable-ldap,--disable-ldap,"
+PACKAGECONFIG[ldaps] = "--enable-ldaps,--disable-ldaps,"
+PACKAGECONFIG[libidn] = "--with-libidn,--without-libidn,libidn"
+PACKAGECONFIG[libssh2] = "--with-libssh2,--without-libssh2,libssh2"
+PACKAGECONFIG[pop3] = "--enable-pop3,--disable-pop3,"
+PACKAGECONFIG[proxy] = "--enable-proxy,--disable-proxy,"
+PACKAGECONFIG[rtmpdump] = "--with-librtmp,--without-librtmp,rtmpdump"
+PACKAGECONFIG[rtsp] = "--enable-rtsp,--disable-rtsp,"
+PACKAGECONFIG[smb] = "--enable-smb,--disable-smb,"
+PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp,"
+PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl"
+PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet,"
+PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp,"
+PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib"
+
+EXTRA_OECONF = " \
+    --enable-crypto-auth \
+    --with-ca-bundle=${sysconfdir}/ssl/certs/ca-certificates.crt \
+    --without-libmetalink \
+    --without-libpsl \
+    --without-nghttp2 \
+"
+
+do_install_append() {
+	oe_multilib_header curl/curlbuild.h
+}
+
+do_install_append_class-target() {
+	# cleanup buildpaths from curl-config
+	sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/curl-config
+}
+
+PACKAGES =+ "lib${BPN}"
+
+FILES_lib${BPN} = "${libdir}/lib*.so.*"
+RRECOMMENDS_lib${BPN} += "ca-certificates"
+
+FILES_${PN} += "${datadir}/zsh"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch b/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
new file mode 100644
index 0000000..d4c6bb8
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/db/db/Makefile-let-libdb-6.0.la-depend-os_map.l.patch
@@ -0,0 +1,32 @@
+From 2902dda6e3f7b2cd5796a96af20deece610e2eb9 Mon Sep 17 00:00:00 2001
+From: Robert Yang <liezhi.yang@windriver.com>
+Date: Mon, 16 Nov 2015 22:20:49 -0800
+Subject: [PATCH] build_unix/Makefile: let libdb-6.0.la depend os_map.lo
+
+Fixed parallel issue:
+libtool: link: `os_map.lo' is not a valid libtool object
+Makefile:867: recipe for target 'libdb-6.0.la' failed
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+---
+ dist/Makefile.in |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/dist/Makefile.in b/dist/Makefile.in
+index 0a42375..d9e05b9 100644
+--- a/dist/Makefile.in
++++ b/dist/Makefile.in
+@@ -863,7 +863,7 @@ $(libdb_version): $(C_OBJS)
+ 	$(LN) -s $(libdb_version) $(libdb)
+ 
+ # Shared C library.
+-$(libso_target): $(C_OBJS) bt_rec@o@
++$(libso_target): $(C_OBJS) bt_rec@o@ os_map@o@
+ 	$(SOLINK) $(SOFLAGS) $(LDFLAGS) -o $@ $(C_OBJS) \
+ 		$(LIBCSO_LIBS)
+ 	$(RM) $(libdb)
+-- 
+1.7.9.5
+
diff --git a/yocto-poky/meta/recipes-support/db/db_5.3.28.bb b/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
index e8b814e..c724f04 100644
--- a/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
+++ b/yocto-poky/meta/recipes-support/db/db_5.3.28.bb
@@ -10,7 +10,7 @@
 # same system at the same time if really necessary.
 SECTION = "libs"
 SUMMARY = "Berkeley Database v5"
-HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
+HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
 LICENSE = "Sleepycat"
 VIRTUAL_NAME ?= "virtual/db"
 RCONFLICTS_${PN} = "db3"
@@ -76,6 +76,7 @@
 MUTEX_arm = "${ARM_MUTEX}"
 MUTEX_armeb = "${ARM_MUTEX}"
 EXTRA_OECONF += "${MUTEX}"
+EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
 
 # Cancel the site stuff - it's set for db3 and destroys the
 # configure.
diff --git a/yocto-poky/meta/recipes-support/db/db_6.0.30.bb b/yocto-poky/meta/recipes-support/db/db_6.0.30.bb
index d49df62..50a469b 100644
--- a/yocto-poky/meta/recipes-support/db/db_6.0.30.bb
+++ b/yocto-poky/meta/recipes-support/db/db_6.0.30.bb
@@ -10,22 +10,27 @@
 # same system at the same time if really necessary.
 SECTION = "libs"
 SUMMARY = "Berkeley Database v6"
-HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html"
+HOMEPAGE = "http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
 LICENSE = "AGPL-3.0"
 VIRTUAL_NAME ?= "virtual/db"
 RCONFLICTS_${PN} = "db3"
 
-RECIPE_NO_UPDATE_REASON = "Updating to 6.1.x requires also updating rpm to 5.4.15"
+# Note, when upgraded to 6.1.x, a patch in RPM will need to be removed to activate db 6.1 support.
 
 SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz"
 SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.. \
             file://fix-parallel-build.patch \
             file://Makefile-let-libso_target-depend-on-bt_rec.patch \
+            file://Makefile-let-libdb-6.0.la-depend-os_map.l.patch;patchdir=.. \
            "
 
 SRC_URI[md5sum] = "ad28eb86ad3203b5422844db179c585b"
 SRC_URI[sha256sum] = "608e4b1cf390e9bf54c0ef00c5bd9ca76d36e2261b9f4d33d54516f3f6a20fd2"
 
+# Exclude NC versions which lack AES encryption
+UPSTREAM_CHECK_REGEX = "db-(?P<pver>\d+\.\d+(\.\d+)?).tar"
+UPSTREAM_CHECK_URI = "http://www.oracle.com/technetwork/products/berkeleydb/downloads/index-082944.html"
+
 LIC_FILES_CHKSUM = "file://../LICENSE;md5=1ec8b0b17cc31513fe35ab10716f8490"
 
 inherit autotools
@@ -78,6 +83,7 @@
 MUTEX_arm = "${ARM_MUTEX}"
 MUTEX_armeb = "${ARM_MUTEX}"
 EXTRA_OECONF += "${MUTEX}"
+EXTRA_OEMAKE_class-target = "LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
 
 # Cancel the site stuff - it's set for db3 and destroys the
 # configure.
diff --git a/yocto-poky/meta/recipes-support/debianutils/debianutils_4.5.1.bb b/yocto-poky/meta/recipes-support/debianutils/debianutils_4.5.1.bb
deleted file mode 100644
index 6b665fb..0000000
--- a/yocto-poky/meta/recipes-support/debianutils/debianutils_4.5.1.bb
+++ /dev/null
@@ -1,47 +0,0 @@
-SUMMARY = "Miscellaneous utilities specific to Debian"
-SECTION = "base"
-LICENSE = "GPLv2 & SMAIL_GPL"
-LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
-
-SRC_URI = "${DEBIAN_MIRROR}/main/d/${BPN}/${BPN}_${PV}.tar.xz"
-
-SRC_URI[md5sum] = "487524518cd5833a6a4f7007b5d1bd5b"
-SRC_URI[sha256sum] = "a531c23e0105fe01cfa928457a8343a1e947e2621b3cd4d05f4e9656020c63b7"
-
-S = "${WORKDIR}/${BPN}"
-
-inherit autotools update-alternatives
-
-do_configure_prepend() {
-    sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
-}
-
-do_install_append() {
-    if [ "${base_bindir}" != "${bindir}" ]; then
-        # Debian places some utils into ${base_bindir} as does busybox
-        install -d ${D}${base_bindir}
-        for app in run-parts tempfile; do
-            mv ${D}${bindir}/$app ${D}${base_bindir}/$app
-        done
-    fi
-}
-
-# Note that we package the update-alternatives name.
-#
-PACKAGES =+ "${PN}-run-parts"
-FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
-
-RDEPENDS_${PN} += "${PN}-run-parts"
-
-
-ALTERNATIVE_PRIORITY="100"
-ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
-ALTERNATIVE_${PN}-run-parts = "run-parts"
-
-ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
-ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
-ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
-ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
-ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
-ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
-ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
diff --git a/yocto-poky/meta/recipes-support/debianutils/debianutils_4.7.bb b/yocto-poky/meta/recipes-support/debianutils/debianutils_4.7.bb
new file mode 100644
index 0000000..6a1d5bf
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/debianutils/debianutils_4.7.bb
@@ -0,0 +1,48 @@
+SUMMARY = "Miscellaneous utilities specific to Debian"
+SECTION = "base"
+LICENSE = "GPLv2 & SMAIL_GPL"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f01a5203d50512fc4830b4332b696a9f"
+
+SRC_URI = "http://snapshot.debian.org/archive/debian/20160204T040501Z/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] = "00186f527b35e2cecd4db593c6d512d0"
+SRC_URI[sha256sum] = "a269cacd40f52f2fa5d5636357714a49e8538459c16d77772efaa23711fe53d9"
+
+inherit autotools update-alternatives
+
+do_configure_prepend() {
+    sed -i -e 's:tempfile.1 which.1:which.1:g' ${S}/Makefile.am
+}
+
+do_install_append() {
+    if [ "${base_bindir}" != "${bindir}" ]; then
+        # Debian places some utils into ${base_bindir} as does busybox
+        install -d ${D}${base_bindir}
+        for app in run-parts tempfile; do
+            mv ${D}${bindir}/$app ${D}${base_bindir}/$app
+        done
+    fi
+}
+
+# Note that we package the update-alternatives name.
+#
+PACKAGES =+ "${PN}-run-parts"
+FILES_${PN}-run-parts = "${base_bindir}/run-parts.debianutils"
+
+RDEPENDS_${PN} += "${PN}-run-parts"
+
+
+ALTERNATIVE_PRIORITY="30"
+ALTERNATIVE_${PN} = "add-shell installkernel remove-shell savelog tempfile which"
+ALTERNATIVE_${PN}-run-parts = "run-parts"
+
+ALTERNATIVE_LINK_NAME[add-shell]="${sbindir}/add-shell"
+ALTERNATIVE_LINK_NAME[installkernel]="${sbindir}/installkernel"
+ALTERNATIVE_LINK_NAME[remove-shell]="${sbindir}/remove-shell"
+ALTERNATIVE_LINK_NAME[run-parts]="${base_bindir}/run-parts"
+ALTERNATIVE_LINK_NAME[savelog]="${bindir}/savelog"
+ALTERNATIVE_LINK_NAME[tempfile]="${base_bindir}/tempfile"
+ALTERNATIVE_LINK_NAME[which]="${bindir}/which"
diff --git a/yocto-poky/meta/recipes-support/gdbm/gdbm_1.8.3.bb b/yocto-poky/meta/recipes-support/gdbm/gdbm_1.8.3.bb
index af01b6c..b253dc1 100644
--- a/yocto-poky/meta/recipes-support/gdbm/gdbm_1.8.3.bb
+++ b/yocto-poky/meta/recipes-support/gdbm/gdbm_1.8.3.bb
@@ -19,6 +19,7 @@
 BBCLASSEXTEND = "native nativesdk"
 
 do_install_append () {
+    oe_runmake install-compat DESTDIR=${D}
     install -d ${D}${includedir}/gdbm
     install -m 0644 ${S}/dbm.h ${D}${includedir}/
     install -m 0644 ${S}/ndbm.h ${D}${includedir}/
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch b/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch
new file mode 100644
index 0000000..6da0be9
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp-4.2.1/avoid-h-asm-constraint-for-MIPS.patch
@@ -0,0 +1,57 @@
+From d50686de0406a88ef9112f5252103f799982e84a Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Thu, 4 Feb 2016 14:00:00 -0800
+Subject: [PATCH] avoid h asm constraint for MIPS
+
+The h asm constrain (to extract the high part of a multiplication
+result) has not been recognised since gcc 4.4:
+
+  https://gcc.gnu.org/gcc-4.4/changes.html
+
+Drop the MIPS umul_ppmm() implementations which rely on "=h" and fall
+back to the older implementations (which use explicit mfhi and mflo
+instructions to move the high and low parts of the multiplication
+result into their destinations).
+
+Upstream-Status: Inappropriate [upstream has a different solution]
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ longlong.h | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/longlong.h b/longlong.h
+index b53fbee..0193abb 100644
+--- a/longlong.h
++++ b/longlong.h
+@@ -1011,27 +1011,17 @@ extern UWtype __MPN(udiv_qrnnd) _PROTO ((UWtype *, UWtype, UWtype, UWtype));
+ #endif /* __m88000__ */
+ 
+ #if defined (__mips) && W_TYPE_SIZE == 32
+-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+-#define umul_ppmm(w1, w0, u, v) \
+-  __asm__ ("multu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
+-#else
+ #define umul_ppmm(w1, w0, u, v) \
+   __asm__ ("multu %2,%3\n\tmflo %0\n\tmfhi %1"				\
+ 	   : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
+-#endif
+ #define UMUL_TIME 10
+ #define UDIV_TIME 100
+ #endif /* __mips */
+ 
+ #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
+-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+-#define umul_ppmm(w1, w0, u, v) \
+-  __asm__ ("dmultu %2,%3" : "=l" (w0), "=h" (w1) : "d" (u), "d" (v))
+-#else
+ #define umul_ppmm(w1, w0, u, v) \
+   __asm__ ("dmultu %2,%3\n\tmflo %0\n\tmfhi %1"				\
+ 	   : "=d" (w0), "=d" (w1) : "d" (u), "d" (v))
+-#endif
+ #define UMUL_TIME 20
+ #define UDIV_TIME 140
+ #endif /* __mips */
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/append_user_provided_flags.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/append_user_provided_flags.patch
deleted file mode 100644
index ae1386c..0000000
--- a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/append_user_provided_flags.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Upstream-Status: Inappropriate
-
-Append the user provided flags to the auto-detected ones.
-
-Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
-
-Index: gmp-5.1.1/configure.ac
-===================================================================
---- gmp-5.1.1.orig/configure.ac	2014-02-11 15:05:44.925202403 +0200
-+++ gmp-5.1.1/configure.ac	2014-02-11 15:19:03.918511398 +0200
-@@ -1745,8 +1745,12 @@
- EOF
- 
- 
--test_CFLAGS=${CFLAGS+set}
--test_CPPFLAGS=${CPPFLAGS+set}
-+test_CFLAGS=
-+test_CPPFLAGS=
-+
-+user_CFLAGS=$CFLAGS
-+user_CPPFLAGS=$CPPFLAGS
-+user_CXXFLAGS=$CXXFLAGS
- 
- for abi in $abilist; do
-   abi_last="$abi"
-@@ -2175,7 +2179,7 @@
- want_cxx=no
- AC_PROG_CXX
- if test $enable_cxx != no; then
--  test_CXXFLAGS=${CXXFLAGS+set}
-+  test_CXXFLAGS=
- 
-   echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
-   cxxflags_ac_prog_cxx=$CXXFLAGS
-@@ -2202,7 +2206,7 @@
-   # Automake includes $CPPFLAGS in a C++ compile, so we do the same here.
-   #
-   for cxxflags_choice in $cxxflags_list; do
--    eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice\"
-+    eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice $user_CXXFLAGS\"
-     GMP_PROG_CXX_WORKS($CXX $CPPFLAGS $CXXFLAGS,
-       [want_cxx=yes
-       break])
-@@ -2292,6 +2296,8 @@
- #  done
- fi
- 
-+CFLAGS="$CFLAGS $user_CFLAGS"
-+CPPFLAGS="$CPPFLAGS $user_CPPFLAGS"
- 
- cat >&AS_MESSAGE_LOG_FD() <<EOF
- Decided:
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/configure.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/configure.patch
deleted file mode 100644
index 349da3c..0000000
--- a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/configure.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-Upstream-Status: Pending
-
-Updated to apply to gmp-5.1.0
-
-Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
-
----
- acinclude.m4 | 32 +++++++++++++++++---------------
- configure.ac | 26 +++++++++-----------------
- 2 files changed, 26 insertions(+), 32 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index 227712a..199aa6f 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -40,29 +40,29 @@ dnl    a_out.exe - OpenVMS DEC C called via GNV wrapper (gnv.sourceforge.net)
- dnl    conftest.exe - various DOS compilers
- 
- 
--define(IA64_PATTERN,
-+define([IA64_PATTERN],
- [[ia64*-*-* | itanium-*-* | itanium2-*-*]])
- 
- dnl  Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
- dnl  of which config.sub accepts.  (Though none of which are likely to work
- dnl  with GMP.)
- dnl
--define(M68K_PATTERN,
-+define([M68K_PATTERN],
- [[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
- 
--define(POWERPC64_PATTERN,
-+define([POWERPC64_PATTERN],
- [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
- 
--define(S390_PATTERN,
-+define([S390_PATTERN],
- [[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
- 
--define(S390X_PATTERN,
-+define([S390X_PATTERN],
- [[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
- 
--define(X86_PATTERN,
-+define([X86_PATTERN],
- [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
- 
--define(X86_64_PATTERN,
-+define([X86_64_PATTERN],
- [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | jaguar-*-* | bulldozer-*-* | piledriver-*-* | steamroller-*-* | excavator-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
- 
- dnl  GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
-@@ -80,7 +80,7 @@ dnl      x86         ->  x86
- dnl      x86/k6      ->  k6
- dnl      x86/k6/mmx  ->  k6_mmx
- 
--define(GMP_FAT_SUFFIX,
-+define([GMP_FAT_SUFFIX],
- [[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
- 
- 
-@@ -89,7 +89,7 @@ dnl  ----------------------------------
- dnl  Emit code to remove any occurrence of ITEM from $LISTVAR.  ITEM can be a
- dnl  shell expression like $foo if desired.
- 
--define(GMP_REMOVE_FROM_LIST,
-+define([GMP_REMOVE_FROM_LIST],
- [remove_from_list_tmp=
- for remove_from_list_i in $[][$1]; do
-   if test $remove_from_list_i = [$2]; then :;
-@@ -105,12 +105,12 @@ dnl  GMP_STRIP_PATH(subdir)
- dnl  ----------------------
- dnl  Strip entries */subdir from $path and $fat_path.
- 
--define(GMP_STRIP_PATH,
-+define([GMP_STRIP_PATH],
- [GMP_STRIP_PATH_VAR(path, [$1])
- GMP_STRIP_PATH_VAR(fat_path, [$1])
- ])
- 
--define(GMP_STRIP_PATH_VAR,
-+define([GMP_STRIP_PATH_VAR],
- [tmp_path=
- for i in $[][$1]; do
-   case $i in
-@@ -131,7 +131,7 @@ dnl
- dnl  Dummy value for GMP_LIMB_BITS is enough
- dnl  for all current configure-time uses of gmp.h.
- 
--define(GMP_INCLUDE_GMP_H,
-+define([GMP_INCLUDE_GMP_H],
- [[#define __GMP_WITHIN_CONFIGURE 1   /* ignore template stuff */
- #define GMP_NAIL_BITS $GMP_NAIL_BITS
- #define GMP_LIMB_BITS 123
-@@ -146,7 +146,7 @@ dnl  Expand at autoconf time to the value of a "#define NAME" from the given
- dnl  FILE.  The regexps here aren't very rugged, but are enough for gmp.
- dnl  /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
- 
--define(GMP_HEADER_GETVAL,
-+define([GMP_HEADER_GETVAL],
- [patsubst(patsubst(
- esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
- [^.*$1[ 	]+],[]),
-@@ -160,7 +160,7 @@ dnl  The gmp version number, extracted from the #defines in gmp-h.in at
- dnl  autoconf time.  Two digits like 3.0 if patchlevel <= 0, or three digits
- dnl  like 3.0.1 if patchlevel > 0.
- 
--define(GMP_VERSION,
-+define([GMP_VERSION],
- [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
- .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
- .GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
-@@ -1524,7 +1524,9 @@ esac
- echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
- 
- # All CPUs use asm-defs.m4
--echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
-+echo -n ["include("] >>$gmp_tmpconfigm4i
-+echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
-+echo [")"] >>$gmp_tmpconfigm4i
- ])
- 
- 
-diff --git a/configure.ac b/configure.ac
-index 64b2c50..f07b821 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -39,14 +39,6 @@ AC_REVISION($Revision$)
- AC_PREREQ(2.59)
- AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html], gmp)
- AC_CONFIG_SRCDIR(gmp-impl.h)
--m4_pattern_forbid([^[ \t]*GMP_])
--m4_pattern_allow(GMP_LDFLAGS)
--m4_pattern_allow(GMP_LIMB_BITS)
--m4_pattern_allow(GMP_MPARAM_H_SUGGEST)
--m4_pattern_allow(GMP_NAIL_BITS)
--m4_pattern_allow(GMP_NUMB_BITS)
--m4_pattern_allow(GMP_NONSTD_ABI)
--m4_pattern_allow(GMP_CPU_TYPE)
- 
- # If --target is not used then $target_alias is empty, but if say
- # "./configure athlon-pc-freebsd3.5" is used, then all three of
-@@ -348,7 +340,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
- # After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
- # called.  User selections of CC etc are respected.
- #
--# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
-+# Care is taken not to use macros like AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) during the GMP
- # pre-testing, since they of course depend on AC_PROG_CC, and also some of
- # them cache their results, which is not wanted.
- #
-@@ -440,7 +432,7 @@ abilist="standard"
- # FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
- # c89 over cc here.  But note that on HP-UX c89 provides a castrated
- # environment, and would want to be excluded somehow.  Maybe
--# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
-+#  already does enough to stick cc into ANSI mode and
- # we don't need to worry.
- #
- cclist="gcc cc"
-@@ -1843,7 +1835,7 @@ esac
- CFLAGS_or_unset=${CFLAGS-'(unset)'}
- CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
- 
--cat >&AC_FD_CC <<EOF
-+cat >&AS_MESSAGE_LOG_FD() <<EOF
- User:
- ABI=$ABI
- CC=$CC
-@@ -2264,7 +2256,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
- 
- # The C compiler and preprocessor, put into ANSI mode if possible.
- AC_PROG_CC
--AC_PROG_CC_STDC
- AC_PROG_CPP
- 
- 
-@@ -2286,11 +2277,11 @@ AC_SUBST(CCAS)
- 
- # The C++ compiler, if desired.
- want_cxx=no
-+AC_PROG_CXX
- if test $enable_cxx != no; then
-   test_CXXFLAGS=${CXXFLAGS+set}
--  AC_PROG_CXX
- 
--  echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
-+  echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
-   cxxflags_ac_prog_cxx=$CXXFLAGS
-   cxxflags_list=ac_prog_cxx
- 
-@@ -2412,7 +2403,7 @@ if test "$enable_assembly" = "no"; then
- fi
- 
- 
--cat >&AC_FD_CC <<EOF
-+cat >&AS_MESSAGE_LOG_FD() <<EOF
- Decided:
- ABI=$ABI
- CC=$CC
-@@ -3781,7 +3772,7 @@ GMP_FINISH
- # FIXME: Upcoming version of autoconf/automake may not like broken lines.
- #        Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
- 
--AC_OUTPUT(Makefile							\
-+AC_CONFIG_FILES([Makefile							\
-   mpf/Makefile mpn/Makefile mpq/Makefile				\
-   mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile \
-   tests/Makefile tests/devel/Makefile					\
-@@ -3790,7 +3781,8 @@ AC_OUTPUT(Makefile							\
-   tests/cxx/Makefile							\
-   doc/Makefile tune/Makefile						\
-   demos/Makefile demos/calc/Makefile demos/expr/Makefile		\
--  gmp.h:gmp-h.in)
-+  gmp.h:gmp-h.in])
-+AC_OUTPUT
- 
- AC_MSG_NOTICE([summary of build options:
- 
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/gmp-6.0.0-ppc64.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/gmp-6.0.0-ppc64.patch
deleted file mode 100644
index 1113b41..0000000
--- a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/gmp-6.0.0-ppc64.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Signed-off-by: Armin Kuster <akuster808@gmail.com>
-
-This patch with pulled from gmp.
-https://gmplib.org/repo/gmp/rev/4a6d258b467f
-Upstream-Status: Backport
-
-# HG changeset patch
-# User Torbjorn Granlund <tege@gmplib.org>
-# Date 1395835068 -3600
-# Node ID 4a6d258b467f661da0894cc60ecd060f2e3c67c7
-# Parent  301ce2788826a2d4d2725bd5cf01e998638db37a
-Provide default for BMOD_1_TO_MOD_1_THRESHOLD.
-
-diff -r 301ce2788826 -r 4a6d258b467f mpn/powerpc64/mode64/gcd_1.asm
---- a/mpn/powerpc64/mode64/gcd_1.asm    Tue Mar 25 15:34:52 2014 +0100
-+++ b/mpn/powerpc64/mode64/gcd_1.asm    Wed Mar 26 12:57:48 2014 +0100
-@@ -43,6 +43,9 @@
- define(`n',     `r4')
- define(`v0',    `r5')
-
-+ifdef(`BMOD_1_TO_MOD_1_THRESHOLD',,
-+  `define(`BMOD_1_TO_MOD_1_THRESHOLD',30)')
-+
- EXTERN_FUNC(mpn_mod_1)
- EXTERN_FUNC(mpn_modexact_1c_odd)
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch
new file mode 100644
index 0000000..325ffe4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/0001-Append-the-user-provided-flags-to-the-auto-detected-.patch
@@ -0,0 +1,61 @@
+From d3b9fc523fc11260ced890c35bc5c9e6391c8656 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 14 Dec 2015 14:19:49 +0200
+Subject: [PATCH] Append the user provided flags to the auto-detected ones.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 9cedfeb..87caee5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1921,8 +1921,12 @@ cclist=$cclist
+ EOF
+ 
+ 
+-test_CFLAGS=${CFLAGS+set}
+-test_CPPFLAGS=${CPPFLAGS+set}
++test_CFLAGS=
++test_CPPFLAGS=
++
++user_CFLAGS=$CFLAGS
++user_CPPFLAGS=$CPPFLAGS
++user_CXXFLAGS=$CXXFLAGS
+ 
+ for abi in $abilist; do
+   abi_last="$abi"
+@@ -2353,7 +2357,7 @@ AC_SUBST(CCAS)
+ # The C++ compiler, if desired.
+ want_cxx=no
+ if test $enable_cxx != no; then
+-  test_CXXFLAGS=${CXXFLAGS+set}
++  test_CXXFLAGS=
+   AC_PROG_CXX
+ 
+   echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
+@@ -2381,7 +2385,7 @@ if test $enable_cxx != no; then
+   # Automake includes $CPPFLAGS in a C++ compile, so we do the same here.
+   #
+   for cxxflags_choice in $cxxflags_list; do
+-    eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice\"
++    eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice $user_CXXFLAGS\"
+     GMP_PROG_CXX_WORKS($CXX $CPPFLAGS $CXXFLAGS,
+       [want_cxx=yes
+       break])
+@@ -2477,6 +2481,8 @@ if test "$enable_assembly" = "no"; then
+ #  done
+ fi
+ 
++CFLAGS="$CFLAGS $user_CFLAGS"
++CPPFLAGS="$CPPFLAGS $user_CPPFLAGS"
+ 
+ cat >&AC_FD_CC <<EOF
+ Decided:
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/amd64.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/amd64.patch
similarity index 100%
rename from yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/amd64.patch
rename to yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/amd64.patch
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/use-includedir.patch b/yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/use-includedir.patch
similarity index 100%
rename from yocto-poky/meta/recipes-support/gmp/gmp-6.0.0/use-includedir.patch
rename to yocto-poky/meta/recipes-support/gmp/gmp-6.1.0/use-includedir.patch
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp.inc b/yocto-poky/meta/recipes-support/gmp/gmp.inc
index 6752a39..abac8cf 100644
--- a/yocto-poky/meta/recipes-support/gmp/gmp.inc
+++ b/yocto-poky/meta/recipes-support/gmp/gmp.inc
@@ -1,16 +1,12 @@
-SECTION = "devel"
 SUMMARY = "GNU multiprecision arithmetic library"
 DESCRIPTION = "GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers"
 HOMEPAGE = "http://gmplib.org/"
-
-REVISION ?= ""
-SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2"
+SECTION = "devel"
 
 inherit autotools texinfo
 
-ARM_INSTRUCTION_SET = "arm"
-
-BBCLASSEXTEND = "native nativesdk"
-
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[readline] = "--with-readline=yes,--with-readline=no,readline"
+
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp_4.2.1.bb b/yocto-poky/meta/recipes-support/gmp/gmp_4.2.1.bb
index bfc6a38..5e8ee29 100644
--- a/yocto-poky/meta/recipes-support/gmp/gmp_4.2.1.bb
+++ b/yocto-poky/meta/recipes-support/gmp/gmp_4.2.1.bb
@@ -7,9 +7,11 @@
                     file://COPYING.LIB;md5=fbc093901857fcd118f065f900982c24 \
                     file://gmp-h.in;beginline=6;endline=21;md5=e056f74a12c3277d730dbcfb85d2ca34"
 
-SRC_URI += "file://Use-__gnu_inline__-attribute.patch \
-            file://gmp_fix_for_automake-1.12.patch \
-            "
+SRC_URI = "https://gmplib.org/download/${BPN}/archive/${BP}.tar.bz2 \
+           file://Use-__gnu_inline__-attribute.patch \
+           file://gmp_fix_for_automake-1.12.patch \
+           file://avoid-h-asm-constraint-for-MIPS.patch \
+"
 
 SRC_URI[md5sum] = "091c56e0e1cca6b09b17b69d47ef18e3"
 SRC_URI[sha256sum] = "d07ffcb37eecec35c5ec72516d10b35fdf6e6fef1fcf1dcd37e30b8cbf8bf941"
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp_6.0.0.bb b/yocto-poky/meta/recipes-support/gmp/gmp_6.0.0.bb
deleted file mode 100644
index 19b63e5..0000000
--- a/yocto-poky/meta/recipes-support/gmp/gmp_6.0.0.bb
+++ /dev/null
@@ -1,33 +0,0 @@
-require gmp.inc
-
-LICENSE="GPLv2+ | LGPLv3+"
-
-REVISION="a"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                   file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
-                   file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-"
-
-SRC_URI += "file://configure.patch \
-            file://amd64.patch \
-            file://use-includedir.patch \
-            file://append_user_provided_flags.patch \
-            file://gmp-6.0.0-ppc64.patch \
-            "
-SRC_URI[md5sum] = "b7ff2d88cae7f8085bd5006096eed470"
-SRC_URI[sha256sum] = "7f8e9a804b9c6d07164cf754207be838ece1219425d64e28cfa3e70d5c759aaf"
-
-acpaths = ""
-
-EXTRA_OECONF += " --enable-cxx=detect"
-
-PACKAGES =+ "libgmpxx"
-FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}"
-
-do_install_append_class-target() {
-        sed -i "s|--sysroot=${STAGING_DIR_HOST}||g" ${D}${includedir}/gmp.h
-}
-
-SSTATE_SCAN_FILES += "gmp.h"
-
diff --git a/yocto-poky/meta/recipes-support/gmp/gmp_6.1.0.bb b/yocto-poky/meta/recipes-support/gmp/gmp_6.1.0.bb
new file mode 100644
index 0000000..de827f5
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gmp/gmp_6.1.0.bb
@@ -0,0 +1,33 @@
+require gmp.inc
+
+LICENSE = "GPLv2+ | LGPLv3+"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                   file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+                   file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+"
+
+REVISION = ""
+SRC_URI = "https://gmplib.org/download/${BPN}/${BP}${REVISION}.tar.bz2 \
+           file://amd64.patch \
+           file://use-includedir.patch \
+           file://0001-Append-the-user-provided-flags-to-the-auto-detected-.patch \
+           "
+
+SRC_URI[md5sum] = "86ee6e54ebfc4a90b643a65e402c4048"
+SRC_URI[sha256sum] = "498449a994efeba527885c10405993427995d3f86b8768d8cdf8d9dd7c6b73e8"
+
+acpaths = ""
+
+EXTRA_OECONF += " --enable-cxx=detect"
+
+PACKAGES =+ "libgmpxx"
+FILES_libgmpxx = "${libdir}/libgmpxx${SOLIBS}"
+
+do_install_append_class-target() {
+        sed -i "s|--sysroot=${STAGING_DIR_HOST}||g" ${D}${includedir}/gmp.h
+}
+
+SSTATE_SCAN_FILES += "gmp.h"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch b/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch
new file mode 100644
index 0000000..5a178e2
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing/update-output-syntax.patch
@@ -0,0 +1,27 @@
+
+The terms `FAIL` instead of `FAILED` and `SKIP` instead of `SKIPPED`
+match what Automake does
+
+Upstream-Status: Accepted
+[ https://git.gnome.org/browse/gnome-desktop-testing/commit/?id=048850731a640532ef55a61df7357fcc6d2ad501 ]
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur gnome-desktop-testing-2014.1-orig/src/gnome-desktop-testing-runner.c gnome-desktop-testing-2014.1/src/gnome-desktop-testing-runner.c
+--- gnome-desktop-testing-2014.1-orig/src/gnome-desktop-testing-runner.c	2014-01-16 12:58:26.000000000 +0200
++++ gnome-desktop-testing-2014.1/src/gnome-desktop-testing-runner.c	2015-11-02 11:27:34.010594126 +0200
+@@ -280,12 +280,12 @@
+   else if (test->state == TEST_STATE_COMPLETE_FAILED)
+     {
+       msgid_value = ONE_TEST_FAILED_MSGID;
+-      msg = g_strconcat ("FAILED: ", test->name, " (", reason, ")", NULL);
++      msg = g_strconcat ("FAIL: ", test->name, " (", reason, ")", NULL);
+     }
+   else if (test->state == TEST_STATE_COMPLETE_SKIPPED)
+     {
+       msgid_value = ONE_TEST_SKIPPED_MSGID;
+-      msg = g_strconcat ("SKIPPED: ", test->name, NULL);
++      msg = g_strconcat ("SKIP: ", test->name, NULL);
+     }
+   else
+     g_assert_not_reached ();
diff --git a/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb b/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
index 482de99..ccb3d3b 100644
--- a/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
+++ b/yocto-poky/meta/recipes-support/gnome-desktop-testing/gnome-desktop-testing_2014.1.bb
@@ -4,6 +4,7 @@
 
 SRC_URI = "${GNOME_MIRROR}/${BPN}/${PV}/${BPN}-${PV}.tar.xz \
            file://0001-gsystem-subprocess.c-Enable-GNU-extensions-in-system.patch \
+           file://update-output-syntax.patch \
           "
 SRC_URI[md5sum] = "a608ad72a77e23a1aecdfd8d07a94baf"
 SRC_URI[sha256sum] = "1a3eed73678dd22d09d6a7ec4f899557df3e8b4a802affa76d0f163b31286539"
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
index c9addca..f066774 100644
--- a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4242.patch
@@ -11,6 +11,7 @@
 exponents in secure memory.
 
 Upstream-Status: Backport
+CVE: CVE-2013-4242
 
 Signed-off-by: Kai Kang <kai.kang@windriver.com>
 --
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch
index b29ede4..b50a32f 100644
--- a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4351.patch
@@ -1,4 +1,5 @@
 Upstream-Status: Backport
+CVE: CVE-2013-4351
 
 Index: gnupg-1.4.7/g10/getkey.c
 ===================================================================
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch
index b1a22f5..5dcde1f 100644
--- a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/CVE-2013-4576.patch
@@ -1,4 +1,5 @@
 Upstream-Status: Backport
+CVE: CVE-2013-4576
 
 Index: gnupg-1.4.7/cipher/dsa.c
 ===================================================================
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch
index 8b5d9a1..3627176 100644
--- a/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg-1.4.7/GnuPG1-CVE-2012-6085.patch
@@ -17,6 +17,7 @@
     (cherry-picked from commit f795a0d59e197455f8723c300eebf59e09853efa)
 
 Upstream-Status: Backport
+CVE: CVE-2012-6085
 
 Signed-off-by: Saul Wold <sgw@linux.intel.com>
 
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg/autogen.sh-fix-find-version-for-beta-checking.patch b/yocto-poky/meta/recipes-support/gnupg/gnupg/autogen.sh-fix-find-version-for-beta-checking.patch
new file mode 100644
index 0000000..4241bc3
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg/autogen.sh-fix-find-version-for-beta-checking.patch
@@ -0,0 +1,31 @@
+From 717f994be2466d378e6611a4739c606db6d0dc46 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Sun, 25 Oct 2015 22:44:47 -0400
+Subject: [PATCH] autogen.sh: fix find-version for beta checking
+
+find-version always assumes that gnupg is beta if autogen.sh is run
+out of git-repo. This doesn't work for users whom just take release
+tarball and re-run autoconf in their local build dir.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ autogen.sh | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/autogen.sh b/autogen.sh
+index 7effd56..d673432 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -228,7 +228,6 @@ if [ "$myhost" = "find-version" ]; then
+       rvd=$((0x$(echo ${rev} | head -c 4)))
+     else
+       ingit=no
+-      beta=yes
+       tmp="-unknown"
+       rev="0000000"
+       rvd="0"
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb b/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb
index 6999f81..b4ccbfe 100644
--- a/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg_1.4.7.bb
@@ -98,7 +98,6 @@
 
 # Exclude debug files from the main packages
 FILES_${PN} = "${bindir}/* ${datadir}/${BPN} ${libexecdir}/${BPN}/*"
-FILES_${PN}-dbg += "${libexecdir}/${BPN}/.debug"
 
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[curl] = "--with-libcurl=${STAGING_LIBDIR},--without-libcurl,curl"
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.11.bb b/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.11.bb
new file mode 100644
index 0000000..8e2189b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.11.bb
@@ -0,0 +1,45 @@
+SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
+HOMEPAGE = "http://www.gnupg.org/"
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+                    file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+
+DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
+
+inherit autotools gettext texinfo pkgconfig
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
+           file://pkgconfig.patch \
+           file://use-pkgconfig-instead-of-npth-config.patch \
+           file://dirmngr-uses-libgpg-error.patch \
+           file://autogen.sh-fix-find-version-for-beta-checking.patch \
+          "
+
+SRC_URI[md5sum] = "873302c475c4c90badb67daac90ebd5d"
+SRC_URI[sha256sum] = "b7b0fb2c8c5d47d7ec916d4a1097c0ddcb94a12bb1c0ac424ad86b1ee316b61a"
+
+EXTRA_OECONF = "--disable-ldap \
+		--disable-ccid-driver \
+		--with-zlib=${STAGING_LIBDIR}/.. \
+		--with-bzip2=${STAGING_LIBDIR}/.. \
+                --with-readline=${STAGING_LIBDIR}/.. \
+               "
+RRECOMMENDS_${PN} = "pinentry"
+
+do_configure_prepend () {
+	# Else these could be used in prefernce to those in aclocal-copy
+	rm -f ${S}/m4/gpg-error.m4
+	rm -f ${S}/m4/libassuan.m4
+	rm -f ${S}/m4/ksba.m4
+	rm -f ${S}/m4/libgcrypt.m4
+}
+
+do_install_append() {
+	ln -sf gpg2 ${D}${bindir}/gpg
+	ln -sf gpgv2 ${D}${bindir}/gpgv
+}
+
+RDEPENDS_${PN} = "gnutls"
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[sqlite3] = "--enable-sqlite, --disable-sqlite, sqlite3"
diff --git a/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.7.bb b/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.7.bb
deleted file mode 100644
index 48c7c96..0000000
--- a/yocto-poky/meta/recipes-support/gnupg/gnupg_2.1.7.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SUMMARY = "GNU Privacy Guard - encryption and signing tools (2.x)"
-HOMEPAGE = "http://www.gnupg.org/"
-LICENSE = "GPLv3 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
-                    file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
-
-DEPENDS = "npth libassuan libksba zlib bzip2 readline libgcrypt"
-
-inherit autotools gettext texinfo pkgconfig
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/${BPN}/${BPN}-${PV}.tar.bz2 \
-           file://pkgconfig.patch \
-           file://use-pkgconfig-instead-of-npth-config.patch \
-           file://dirmngr-uses-libgpg-error.patch \
-          "
-
-SRC_URI[md5sum] = "ebdf92b15b8bcd8579b643c7f41a3238"
-SRC_URI[sha256sum] = "c18a3776d47fec98892d51d28b6574ef16bf0a25eabb0956231058aaf2e7846e"
-
-EXTRA_OECONF = "--disable-ldap \
-		--disable-ccid-driver \
-		--with-zlib=${STAGING_LIBDIR}/.. \
-		--with-bzip2=${STAGING_LIBDIR}/.. \
-                --with-readline=${STAGING_LIBDIR}/.. \
-               "
-RRECOMMENDS_${PN} = "pinentry"
-
-do_configure_prepend () {
-	# Else these could be used in prefernce to those in aclocal-copy
-	rm -f ${S}/m4/gpg-error.m4
-	rm -f ${S}/m4/libassuan.m4
-	rm -f ${S}/m4/ksba.m4
-	rm -f ${S}/m4/libgcrypt.m4
-}
-
-do_install_append() {
-	ln -sf gpg2 ${D}${bindir}/gpg
-	ln -sf gpgv2 ${D}${bindir}/gpgv
-}
-
-RDEPENDS_${PN} = "gnutls"
diff --git a/yocto-poky/meta/recipes-support/gnutls/gnutls.inc b/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
index e9b138a..e7c91eb 100644
--- a/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
+++ b/yocto-poky/meta/recipes-support/gnutls/gnutls.inc
@@ -1,7 +1,6 @@
 SUMMARY = "GNU Transport Layer Security Library"
 HOMEPAGE = "http://www.gnu.org/software/gnutls/"
 BUGTRACKER = "https://savannah.gnu.org/support/?group=gnutls"
-DEPENDS = "nettle"
 
 LICENSE = "GPLv3+ & LGPLv2.1+"
 LICENSE_${PN} = "LGPLv2.1+"
@@ -12,21 +11,36 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
                     file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"
 
+DEPENDS = "nettle gmp virtual/libiconv"
+DEPENDS_append_libc-musl = " argp-standalone"
 
-SHRT_VER = "${@d.getVar('PV',1).split('.')[0]}.${@d.getVar('PV',1).split('.')[1]}"
+SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split('.')[1]}"
 
 SRC_URI = "ftp://ftp.gnutls.org/gcrypt/gnutls/v${SHRT_VER}/gnutls-${PV}.tar.xz"
 
 inherit autotools texinfo binconfig pkgconfig gettext lib_package
 
-EXTRA_OECONF="--disable-rpath \
-              --with-included-libtasn1 \
-              --enable-local-libopts \
-              --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
-              --disable-guile \
-              --disable-crywrap \
-              --without-p11-kit \
-              "
+PACKAGECONFIG ??= "libidn zlib"
+
+PACKAGECONFIG[docs] = "--enable-doc,--disable-doc"
+PACKAGECONFIG[libidn] = "--with-idn,--without-idn,libidn"
+PACKAGECONFIG[libtasn1] = "--with-included-libtasn1=no,--with-included-libtasn1,libtasn1"
+PACKAGECONFIG[p11-kit] = "--with-p11-kit,--without-p11-kit,p11-kit"
+PACKAGECONFIG[tpm] = "--with-tpm,--without-tpm,trousers"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+
+EXTRA_OECONF = " \
+    --disable-crywrap \
+    --disable-libdane \
+    --disable-guile \
+    --disable-rpath \
+    --enable-local-libopts \
+    --enable-openssl-compatibility \
+    --with-libpthread-prefix=${STAGING_DIR_HOST}${prefix} \
+"
+
+LDFLAGS_append_libc-musl = " -largp"
+LDFLAGS_append_libc-uclibc = " -luargp -pthread"
 
 do_configure_prepend() {
 	for dir in . lib; do
@@ -34,16 +48,10 @@
 	done
 }
 
-PACKAGECONFIG ??= "zlib"
-PACKAGECONFIG[tpm] = "--with-tpm, --without-tpm, trousers"
-PACKAGECONFIG[zlib] = "--with-zlib, --without-zlib, zlib"
-
 PACKAGES =+ "${PN}-openssl ${PN}-xx"
 
 FILES_${PN}-dev += "${bindir}/gnutls-cli-debug"
 FILES_${PN}-openssl = "${libdir}/libgnutls-openssl.so.*"
 FILES_${PN}-xx = "${libdir}/libgnutlsxx.so.*"
 
-LDFLAGS_append_libc-uclibc += " -pthread"
-
 BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch b/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
new file mode 100644
index 0000000..c5b95eb
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnutls/gnutls/0001-configure.ac-fix-sed-command.patch
@@ -0,0 +1,32 @@
+From 67c638c7e209554d9b19627e9402a20fdabead21 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Fri, 4 Dec 2015 13:19:28 +0200
+Subject: [PATCH] configure.ac: fix sed command
+
+The "sed 's/.bak//g'" matchs "bitbake", which would cause strange errors
+when the S contains "bitbake", fix to "sed 's/\.bak$//'`"
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index e634236..dc9e6a8 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -549,7 +549,7 @@ if test "$enable_tools" != "no" || test "$enable_doc" != "no"; then
+ 		dnl replace libopts-generated files with distributed backups, if present
+ 		missing_baks=
+ 		for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
+-			nam=`echo $i|sed 's/.bak//g'`
++                        nam=`echo $i|sed 's/\.bak$//'`
+ 			if test -f $i;then
+ 				cp -f $i $nam
+ 			else
+-- 
+2.6.2
+
diff --git a/yocto-poky/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch b/yocto-poky/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch
deleted file mode 100644
index 44a9934..0000000
--- a/yocto-poky/meta/recipes-support/gnutls/gnutls/configure.ac-fix-sed-command.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From eb93aa7b986c84da60a3db40afb29d1a70c50223 Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sat, 17 Jan 2015 17:02:15 +0000
-Subject: [PATCH] configure.ac: fix sed command
-
-The "sed 's/.bak//g'" matchs "bitbake", which would cause strange errors
-when the S contains "bitbake", fix to "sed 's/\.bak$//'`"
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index c6818a0..1c4582d 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -466,7 +466,7 @@ if test "$NEED_LIBOPTS_DIR" = "true";then
- 	dnl replace libopts-generated files with distributed backups, if present
- 	missing_baks=
- 	for i in ${srcdir}/src/*-args.c.bak ${srcdir}/src/*-args.h.bak; do
--		nam=`echo $i|sed 's/.bak//g'`
-+		nam=`echo $i|sed 's/\.bak$//'`
- 		if test -f $i;then
- 			cp -f $i $nam
- 		else
--- 
-2.0.1
-
diff --git a/yocto-poky/meta/recipes-support/gnutls/gnutls_3.3.17.1.bb b/yocto-poky/meta/recipes-support/gnutls/gnutls_3.3.17.1.bb
deleted file mode 100644
index 0185797..0000000
--- a/yocto-poky/meta/recipes-support/gnutls/gnutls_3.3.17.1.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require gnutls.inc
-
-SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
-            file://configure.ac-fix-sed-command.patch \
-            file://use-pkg-config-to-locate-zlib.patch \
-           "
-SRC_URI[md5sum] = "8d01c7e7f2cbc5871fdca832d2260b6b"
-SRC_URI[sha256sum] = "b40f158030a92f450a07b20300a3996710ca19800848d9f6fd62493170c5bbb4"
diff --git a/yocto-poky/meta/recipes-support/gnutls/gnutls_3.4.9.bb b/yocto-poky/meta/recipes-support/gnutls/gnutls_3.4.9.bb
new file mode 100644
index 0000000..b652f6f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnutls/gnutls_3.4.9.bb
@@ -0,0 +1,8 @@
+require gnutls.inc
+
+SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
+            file://0001-configure.ac-fix-sed-command.patch \
+            file://use-pkg-config-to-locate-zlib.patch \
+           "
+SRC_URI[md5sum] = "1b3b6d55d0e2b6d01a54f53129f1da9b"
+SRC_URI[sha256sum] = "48594fadba33d450f796ec69526cf2bce6ff9bc3dc90fbd7bf38dc3601f57c3f"
diff --git a/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.5.bb b/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.5.bb
deleted file mode 100644
index f874574..0000000
--- a/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.5.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SUMMARY = "Library for ASN.1 and DER manipulation"
-HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
-
-LICENSE = "GPLv3+ & LGPLv2.1+"
-LICENSE_${PN}-bin = "GPLv3+"
-LICENSE_${PN} = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
-                    file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
-
-SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
-           file://dont-depend-on-help2man.patch \
-           "
-
-SRC_URI[md5sum] = "81d272697545e82d39f6bd14854b68f0"
-SRC_URI[sha256sum] = "89b3b5dce119273431544ecb305081f3530911001bb12e5d76588907edb71bda"
-
-inherit autotools texinfo binconfig lib_package
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.7.bb b/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.7.bb
new file mode 100644
index 0000000..7f08569
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gnutls/libtasn1_4.7.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Library for ASN.1 and DER manipulation"
+HOMEPAGE = "http://www.gnu.org/software/libtasn1/"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN}-bin = "GPLv3+"
+LICENSE_${PN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
+                    file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
+
+SRC_URI = "${GNU_MIRROR}/libtasn1/libtasn1-${PV}.tar.gz \
+           file://dont-depend-on-help2man.patch \
+           "
+
+SRC_URI[md5sum] = "12d10ca4ae0a3b95f7aa06a076da39ec"
+SRC_URI[sha256sum] = "a40780dc93fc6d819170240e8ece25352058a85fd1d2347ce0f143667d8f11c9"
+
+inherit autotools texinfo binconfig lib_package
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/gpgme/gpgme_1.5.4.bb b/yocto-poky/meta/recipes-support/gpgme/gpgme_1.5.4.bb
deleted file mode 100644
index 1598377..0000000
--- a/yocto-poky/meta/recipes-support/gpgme/gpgme_1.5.4.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "High-level GnuPG encryption/signing API"
-DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
-HOMEPAGE = "http://www.gnupg.org/gpgme.html"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
-                    file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
-                    file://src/gpgme.h.in;endline=23;md5=71ba2ae8d6ca034ed10bd099a8cf473c \
-                    file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/${BP}.tar.bz2 \
-           file://gpgme.pc \
-           file://pkgconfig.patch \
-          "
-
-SRC_URI[md5sum] = "feafa03ea064e1d1dc11bc2b88404623"
-SRC_URI[sha256sum] = "bb38c0ec8815c9e94e6047b484984808a8dad9d6bec8df33dc5339fd55ffea6c"
-
-DEPENDS = "libgpg-error libassuan"
-
-BINCONFIG = "${bindir}/gpgme-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
-
-PACKAGES =+ "${PN}-pthread"
-FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*"
-FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/*"
-
-do_configure_prepend () {
-	# Else these could be used in preference to those in aclocal-copy
-	rm -f ${S}/m4/gpg-error.m4
-	rm -f ${S}/m4/libassuan.m4
-}
-
-do_install_append () {
-        install -d ${D}${libdir}/pkgconfig
-        install -m 0644 ${WORKDIR}/gpgme.pc ${D}${libdir}/pkgconfig/
-}
diff --git a/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb b/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb
new file mode 100644
index 0000000..86eda23
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/gpgme/gpgme_1.6.0.bb
@@ -0,0 +1,40 @@
+SUMMARY = "High-level GnuPG encryption/signing API"
+DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
+HOMEPAGE = "http://www.gnupg.org/gpgme.html"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
+                    file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
+                    file://src/gpgme.h.in;endline=23;md5=5027eec93a996272a9a0a6a86cf35775 \
+                    file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/${BP}.tar.bz2 \
+           file://gpgme.pc \
+           file://pkgconfig.patch \
+          "
+
+SRC_URI[md5sum] = "60d730d22e8065fd5de309e8b98e304b"
+SRC_URI[sha256sum] = "b09de4197ac280b102080e09eaec6211d081efff1963bf7821cf8f4f9916099d"
+
+DEPENDS = "libgpg-error libassuan"
+
+BINCONFIG = "${bindir}/gpgme-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+PACKAGES =+ "${PN}-pthread"
+FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*"
+FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/*"
+
+CFLAGS_append_libc-musl = " -D__error_t_defined "
+do_configure_prepend () {
+	# Else these could be used in preference to those in aclocal-copy
+	rm -f ${S}/m4/gpg-error.m4
+	rm -f ${S}/m4/libassuan.m4
+}
+
+do_install_append () {
+        install -d ${D}${libdir}/pkgconfig
+        install -m 0644 ${WORKDIR}/gpgme.pc ${D}${libdir}/pkgconfig/
+}
diff --git a/yocto-poky/meta/recipes-support/icu/icu/icu-release-56-1-flagparser-fix.patch b/yocto-poky/meta/recipes-support/icu/icu/icu-release-56-1-flagparser-fix.patch
new file mode 100644
index 0000000..1519d84
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/icu/icu/icu-release-56-1-flagparser-fix.patch
@@ -0,0 +1,24 @@
+icu: Ticket #11959: pkgdata dies when compiled with lots'o'flags
+
+See: http://bugs.icu-project.org/trac/ticket/11959
+
+The patch avoids premature failure which results in a segfault.
+
+Upstream-Status: Backport of r38081
+Signed-off-by: Mike Crowe <mac@mcrowe.com>
+
+Index: source/tools/toolutil/flagparser.c
+===================================================================
+--- source/tools/toolutil/flagparser.c	(revision 38046)
++++ source/tools/toolutil/flagparser.c	(working copy)
+@@ -96,8 +96,8 @@
+     uprv_free(buffer);
+ 
+     T_FileStream_close(f);
+-    
+-    if (U_FAILURE(*status)) {
++
++    if (U_FAILURE(*status) && *status != U_BUFFER_OVERFLOW_ERROR) {
+         return -1;
+     }
+ 
diff --git a/yocto-poky/meta/recipes-support/icu/icu_55.1.bb b/yocto-poky/meta/recipes-support/icu/icu_55.1.bb
deleted file mode 100644
index e91b6f3..0000000
--- a/yocto-poky/meta/recipes-support/icu/icu_55.1.bb
+++ /dev/null
@@ -1,26 +0,0 @@
-require icu.inc
-
-LIC_FILES_CHKSUM = "file://../license.html;md5=64eff4aadff4d104d6d437c4fde0e6d7"
-
-def icu_download_version(d):
-    pvsplit = d.getVar('PV', True).split('.')
-    return pvsplit[0] + "_" + pvsplit[1]
-
-ICU_PV = "${@icu_download_version(d)}"
-
-# http://errors.yoctoproject.org/Errors/Details/20486/
-ARM_INSTRUCTION_SET_armv4 = "arm"
-ARM_INSTRUCTION_SET_armv5 = "arm"
-
-BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
-SRC_URI = "${BASE_SRC_URI} \
-           file://icu-pkgdata-large-cmd.patch \
-           file://fix-install-manx.patch \
-          "
-
-SRC_URI_append_class-target = "\
-           file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
-          "
-SRC_URI[md5sum] = "e2d523df79d6cb7855c2fbe284f4db29"
-SRC_URI[sha256sum] = "e16b22cbefdd354bec114541f7849a12f8fc2015320ca5282ee4fd787571457b"
-
diff --git a/yocto-poky/meta/recipes-support/icu/icu_56.1.bb b/yocto-poky/meta/recipes-support/icu/icu_56.1.bb
new file mode 100644
index 0000000..db0de10
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/icu/icu_56.1.bb
@@ -0,0 +1,29 @@
+require icu.inc
+
+LIC_FILES_CHKSUM = "file://../license.html;md5=64eff4aadff4d104d6d437c4fde0e6d7"
+
+def icu_download_version(d):
+    pvsplit = d.getVar('PV', True).split('.')
+    return pvsplit[0] + "_" + pvsplit[1]
+
+ICU_PV = "${@icu_download_version(d)}"
+
+# http://errors.yoctoproject.org/Errors/Details/20486/
+ARM_INSTRUCTION_SET_armv4 = "arm"
+ARM_INSTRUCTION_SET_armv5 = "arm"
+
+BASE_SRC_URI = "http://download.icu-project.org/files/icu4c/${PV}/icu4c-${ICU_PV}-src.tgz"
+SRC_URI = "${BASE_SRC_URI} \
+           file://icu-pkgdata-large-cmd.patch \
+           file://fix-install-manx.patch \
+           file://icu-release-56-1-flagparser-fix.patch \
+          "
+
+SRC_URI_append_class-target = "\
+           file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
+          "
+SRC_URI[md5sum] = "c4a2d71ff56aec5ebfab2a3f059be99d"
+SRC_URI[sha256sum] = "3a64e9105c734dcf631c0b3ed60404531bce6c0f5a64bfe1a6402a4cc2314816"
+
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/"
+UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/"
diff --git a/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.58.bb b/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.58.bb
deleted file mode 100644
index 7112e46..0000000
--- a/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.58.bb
+++ /dev/null
@@ -1,15 +0,0 @@
-SUMMARY = "ISO language, territory, currency, script codes and their translations"
-LICENSE = "LGPLv2.1"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=fbc093901857fcd118f065f900982c24"
-
-SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
-SRC_URI[md5sum] = "34097a0085f0979e28f9db66ec274c5e"
-SRC_URI[sha256sum] = "86af5735dce6e4eff2b983e5d8aa9a3dea1b8db702333ff20be89e45f7f35a72"
-
-# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
-# are inhibited by allarch
-DEPENDS = "gettext-native"
-
-inherit allarch autotools
-
-FILES_${PN} += "${datadir}/xml/"
diff --git a/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.65.bb b/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.65.bb
new file mode 100644
index 0000000..0b78dc4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/iso-codes/iso-codes_3.65.bb
@@ -0,0 +1,15 @@
+SUMMARY = "ISO language, territory, currency, script codes and their translations"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=fbc093901857fcd118f065f900982c24"
+
+SRC_URI = "https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz"
+SRC_URI[md5sum] = "890a08d4f962748e0a0758a8aa471896"
+SRC_URI[sha256sum] = "834de5193c8489eedeaf6509457a9b13476702386ae1f3ed4f391a349d630320"
+
+# inherit gettext cannot be used, because it adds gettext-native to BASEDEPENDS which
+# are inhibited by allarch
+DEPENDS = "gettext-native"
+
+inherit allarch autotools
+
+FILES_${PN} += "${datadir}/xml/"
diff --git a/yocto-poky/meta/recipes-support/libassuan/libassuan_2.2.1.bb b/yocto-poky/meta/recipes-support/libassuan/libassuan_2.2.1.bb
deleted file mode 100644
index 75ae43f..0000000
--- a/yocto-poky/meta/recipes-support/libassuan/libassuan_2.2.1.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "IPC library used by GnuPG and GPGME"
-HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv3 & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
-                    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-                    file://src/assuan.c;endline=20;md5=0f465544183405055ec179869fc5b5ba \
-                    file://src/assuan-defs.h;endline=20;md5=20cd55535260ca1779edae5c7b80b21e"
-
-DEPENDS = "libgpg-error"
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-${PV}.tar.bz2 \
-	   file://libassuan-add-pkgconfig-support.patch"
-
-SRC_URI[md5sum] = "6290e750ee87be3bfd9579fc44c6a186"
-SRC_URI[sha256sum] = "949285bb79345362cb72a40c798defefc007031c60f2f10251720bf60a9de2de"
-
-BINCONFIG = "${bindir}/libassuan-config"
-
-inherit autotools texinfo binconfig-disabled pkgconfig
-
-do_configure_prepend () {
-	# Else these could be used in prefernce to those in aclocal-copy
-	rm -f ${S}/m4/*.m4
-}
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.2.bb b/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.2.bb
new file mode 100644
index 0000000..f376d63
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libassuan/libassuan_2.4.2.bb
@@ -0,0 +1,30 @@
+SUMMARY = "IPC library used by GnuPG and GPGME"
+HOMEPAGE = "http://www.gnupg.org/related_software/libassuan/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv3+ & LGPLv2.1+"
+LICENSE_${PN} = "LGPLv2.1+"
+LICENSE_${PN}-doc = "GPLv3+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949 \
+                    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+                    file://src/assuan.c;endline=20;md5=0f465544183405055ec179869fc5b5ba \
+                    file://src/assuan-defs.h;endline=20;md5=20cd55535260ca1779edae5c7b80b21e"
+
+DEPENDS = "libgpg-error"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libassuan/libassuan-${PV}.tar.bz2 \
+	   file://libassuan-add-pkgconfig-support.patch"
+
+SRC_URI[md5sum] = "70151995c2330ae1261c0a7ca34cf478"
+SRC_URI[sha256sum] = "bb06dc81380b74bf1b64d5849be5c0409a336f3b4c45f20ac688e86d1b5bcb20"
+
+BINCONFIG = "${bindir}/libassuan-config"
+
+inherit autotools texinfo binconfig-disabled pkgconfig
+
+do_configure_prepend () {
+	# Else these could be used in preference to those in aclocal-copy
+	rm -f ${S}/m4/*.m4
+}
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch b/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch
new file mode 100644
index 0000000..c051075
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops/0001-Add-initial-nios2-architecture-support.patch
@@ -0,0 +1,70 @@
+From 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Tue, 15 Mar 2016 10:09:26 +0300
+Subject: [PATCH] Add initial nios2 architecture support
+
+* src/Makefile.am (nobase_private_HEADERS): Add nios2.h.
+* src/atomic_ops.h: Include nios2.h if __nios2__.
+* src/atomic_ops/sysdeps/gcc/nios2.h: New file.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport [ https://github.com/ivmai/libatomic_ops.git 4b005ee56898309e8afba9b3c48cf94f0f5f78e4 ]
+---
+ src/Makefile.am                    |  1 +
+ src/atomic_ops.h                   |  3 +++
+ src/atomic_ops/sysdeps/gcc/nios2.h | 17 +++++++++++++++++
+ 3 files changed, 21 insertions(+)
+ create mode 100644 src/atomic_ops/sysdeps/gcc/nios2.h
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index fc09b27..d463427 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -79,6 +79,7 @@ nobase_private_HEADERS = atomic_ops/ao_version.h \
+           atomic_ops/sysdeps/gcc/ia64.h \
+           atomic_ops/sysdeps/gcc/m68k.h \
+           atomic_ops/sysdeps/gcc/mips.h \
++          atomic_ops/sysdeps/gcc/nios2.h \
+           atomic_ops/sysdeps/gcc/powerpc.h \
+           atomic_ops/sysdeps/gcc/s390.h \
+           atomic_ops/sysdeps/gcc/sh.h \
+diff --git a/src/atomic_ops.h b/src/atomic_ops.h
+index 33fe00e..ec02ba4 100644
+--- a/src/atomic_ops.h
++++ b/src/atomic_ops.h
+@@ -262,6 +262,9 @@
+ # if defined(__m68k__)
+ #   include "atomic_ops/sysdeps/gcc/m68k.h"
+ # endif /* __m68k__ */
++# if defined(__nios2__)
++#   include "atomic_ops/sysdeps/gcc/nios2.h"
++# endif /* __nios2__ */
+ # if defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
+      || defined(__powerpc64__) || defined(__ppc64__)
+ #   include "atomic_ops/sysdeps/gcc/powerpc.h"
+diff --git a/src/atomic_ops/sysdeps/gcc/nios2.h b/src/atomic_ops/sysdeps/gcc/nios2.h
+new file mode 100644
+index 0000000..f402cbb
+--- /dev/null
++++ b/src/atomic_ops/sysdeps/gcc/nios2.h
+@@ -0,0 +1,17 @@
++/*
++ * Copyright (C) 2016 Marek Vasut <marex@denx.de>
++ *
++ * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
++ * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
++ *
++ * Permission is hereby granted to use or copy this program
++ * for any purpose, provided the above notices are retained on all copies.
++ * Permission to modify the code and to distribute modified code is granted,
++ * provided the above notices are retained, and a notice that the code was
++ * modified is included with the above copyright notice.
++ */
++
++#include "../test_and_set_t_is_ao_t.h"
++#include "generic.h"
++
++#define AO_T_IS_INT
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb b/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb
index 4d0e299..fdb70d8 100644
--- a/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb
+++ b/yocto-poky/meta/recipes-support/libatomic-ops/libatomic-ops_7.4.2.bb
@@ -7,7 +7,10 @@
                     file://doc/LICENSING.txt;md5=e00dd5c8ac03a14c5ae5225a4525fa2d \
 		   "
 
-SRC_URI = "http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${PV}.tar.gz"
+SRC_URI = "\
+	http://www.ivmaisoft.com/_bin/atomic_ops/libatomic_ops-${PV}.tar.gz \
+	file://0001-Add-initial-nios2-architecture-support.patch \
+	"
 
 SRC_URI[md5sum] = "1d6538604b314d2fccdf86915e5c0857"
 SRC_URI[sha256sum] = "04fa615f62992547bcbda562260e28b504bc4c06e2f985f267f3ade30304b5dd"
diff --git a/yocto-poky/meta/recipes-support/libbsd/files/CVE-2016-2090.patch b/yocto-poky/meta/recipes-support/libbsd/files/CVE-2016-2090.patch
deleted file mode 100644
index 2eaae13..0000000
--- a/yocto-poky/meta/recipes-support/libbsd/files/CVE-2016-2090.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From c8f0723d2b4520bdd6b9eb7c3e7976de726d7ff7 Mon Sep 17 00:00:00 2001
-From: Hanno Boeck <hanno@hboeck.de>
-Date: Wed, 27 Jan 2016 15:10:11 +0100
-Subject: [PATCH] Fix heap buffer overflow in fgetwln()
-
-In the function fgetwln() there's a 4 byte heap overflow.
-
-There is a while loop that has this check to see whether there's still
-enough space in the buffer:
-
-		if (!fb->len || wused > fb->len) {
-
-If this is true more memory gets allocated. However this test won't be
-true if wused == fb->len, but at that point wused already points out
-of the buffer. Some lines later there's a write to the buffer:
-
-		fb->wbuf[wused++] = wc;
-
-This bug was found with the help of address sanitizer.
-
-Warned-by: ASAN
-Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93881
-Signed-off-by: Guillem Jover <guillem@hadrons.org>
-
-Upstream-Status: Backport
-http://cgit.freedesktop.org/libbsd/commit/?id=c8f0723d2b4520bdd6b9eb7c3e7976de726d7ff7
-
-CVE: CVE-2016-2090
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- src/fgetwln.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/fgetwln.c b/src/fgetwln.c
-index 9ee0776..aa3f927 100644
---- a/src/fgetwln.c
-+++ b/src/fgetwln.c
-@@ -60,7 +60,7 @@ fgetwln(FILE *stream, size_t *lenp)
- 	fb->fp = stream;
- 
- 	while ((wc = fgetwc(stream)) != WEOF) {
--		if (!fb->len || wused > fb->len) {
-+		if (!fb->len || wused >= fb->len) {
- 			wchar_t *wp;
- 
- 			if (fb->len)
--- 
-2.3.5
-
diff --git a/yocto-poky/meta/recipes-support/libbsd/libbsd_0.7.0.bb b/yocto-poky/meta/recipes-support/libbsd/libbsd_0.7.0.bb
deleted file mode 100644
index 8d9a708..0000000
--- a/yocto-poky/meta/recipes-support/libbsd/libbsd_0.7.0.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-SUMMARY = "Library of utility functions from BSD systems"
-DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
-               and lacking on others like GNU systems, thus making it easier to port \
-               projects with strong BSD origins, without needing to embed the same \
-               code over and over again on each project."
-
-HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
-LICENSE = "BSD-4-Clause & MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=f1530ea92aeaa1c5e2547cfd43905d8c"
-SECTION = "libs"
-DEPENDS = ""
-
-SRC_URI = "http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
-           file://CVE-2016-2090.patch \
-           "
-
-SRC_URI[md5sum] = "fcceb4e66fd448ca4ed42ba22a8babb0"
-SRC_URI[sha256sum] = "0f3b0e17e5c34c038126e0a04351b11e23c6101a7d0ce3beeab29bb6415c10bb"
-
-inherit autotools pkgconfig
diff --git a/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.2.bb b/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.2.bb
new file mode 100644
index 0000000..3335386
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libbsd/libbsd_0.8.2.bb
@@ -0,0 +1,43 @@
+# Copyright (C) 2013 Khem Raj <raj.khem@gmail.com>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SUMMARY = "Library of utility functions from BSD systems"
+DESCRIPTION = "This library provides useful functions commonly found on BSD systems, \
+               and lacking on others like GNU systems, thus making it easier to port \
+               projects with strong BSD origins, without needing to embed the same \
+               code over and over again on each project."
+
+HOMEPAGE = "http://libbsd.freedesktop.org/wiki/"
+# There seems to be more licenses used in the code, I don't think we want to list them all here, complete list:
+# OE @ ~/projects/libbsd $ grep ^License: COPYING  | sort
+# License: BSD-2-clause
+# License: BSD-2-clause
+# License: BSD-2-clause-NetBSD
+# License: BSD-2-clause-author
+# License: BSD-2-clause-verbatim
+# License: BSD-3-clause
+# License: BSD-3-clause
+# License: BSD-3-clause
+# License: BSD-3-clause-Peter-Wemm
+# License: BSD-3-clause-Regents
+# License: BSD-4-clause-Christopher-G-Demetriou
+# License: BSD-4-clause-Niels-Provos
+# License: BSD-5-clause-Peter-Wemm
+# License: Beerware
+# License: Expat
+# License: ISC
+# License: ISC-Original
+# License: public-domain
+# License: public-domain-Colin-Plumb
+LICENSE = "BSD-4-Clause & ISC & PD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=145ec05a217d8f879f29cfc5f83084be"
+SECTION = "libs"
+
+SRC_URI = " \
+    http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+"
+
+SRC_URI[md5sum] = "cdee252ccff978b50ad2336278c506c9"
+SRC_URI[sha256sum] = "b2f644cae94a6e2fe109449c20ad79a0f6ee4faec2205b07eefa0020565e250a"
+
+inherit autotools pkgconfig
diff --git a/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb b/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb
index a31d5dc..5715467 100644
--- a/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb
+++ b/yocto-poky/meta/recipes-support/libcap-ng/libcap-ng_0.7.7.bb
@@ -23,7 +23,6 @@
 
 PACKAGES += "${PN}-python"
 
-FILES_${PN}-dbg += "${libdir}/python${PYTHON_BASEVERSION}/*/.debug"
 FILES_${PN}-python = "${libdir}/python${PYTHON_BASEVERSION}"
 
 BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb b/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb
index 36b94ee..a701019 100644
--- a/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb
+++ b/yocto-poky/meta/recipes-support/libcap/libcap_2.24.bb
@@ -5,7 +5,7 @@
 LICENSE = "BSD | GPLv2"
 LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
 
-DEPENDS = "perl-native-runtime"
+DEPENDS = "hostperl-runtime-native"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${PV}.tar.xz"
 
@@ -72,6 +72,5 @@
 
 # pam files
 FILES_${PN} += "${base_libdir}/security/*.so"
-FILES_${PN}-dbg += "${base_libdir}/security/.debug/*.so"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.11.bb b/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.11.bb
new file mode 100644
index 0000000..9df7923
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.11.bb
@@ -0,0 +1,20 @@
+SUMMARY = "Cascading Style Sheet (CSS) parsing and manipulation toolkit"
+HOMEPAGE = "http://www.gnome.org/"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+
+LICENSE = "LGPLv2 & LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605 \
+                    file://src/cr-rgb.c;endline=22;md5=31d5f0944d556c8589d04ea6055fcc66 \
+                    file://tests/cr-test-utils.c;endline=21;md5=2382c27934cae1d3792fcb17a6142c4e"
+
+SECTION = "x11/utils"
+DEPENDS = "glib-2.0 libxml2 zlib"
+BBCLASSEXTEND = "native"
+EXTRA_OECONF += "--enable-Bsymbolic=auto"
+
+BINCONFIG = "${bindir}/croco-0.6-config"
+
+inherit autotools pkgconfig gnomebase gtk-doc binconfig-disabled
+
+SRC_URI[archive.md5sum] = "dabc1911dfbfa85f8e6859ca47863168"
+SRC_URI[archive.sha256sum] = "132b528a948586b0dfa05d7e9e059901bca5a3be675b6071a90a90b81ae5a056"
diff --git a/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.8.bb b/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.8.bb
deleted file mode 100644
index 2b1b910..0000000
--- a/yocto-poky/meta/recipes-support/libcroco/libcroco_0.6.8.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Cascading Style Sheet (CSS) parsing and manipulation toolkit"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2 & LGPLv2.1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605 \
-                    file://src/cr-rgb.c;endline=22;md5=31d5f0944d556c8589d04ea6055fcc66 \
-                    file://tests/cr-test-utils.c;endline=21;md5=2382c27934cae1d3792fcb17a6142c4e"
-
-SECTION = "x11/utils"
-DEPENDS = "glib-2.0 libxml2 zlib"
-BBCLASSEXTEND = "native"
-EXTRA_OECONF += "--enable-Bsymbolic=auto"
-PR = "r2"
-
-BINCONFIG = "${bindir}/croco-0.6-config"
-
-inherit autotools pkgconfig gnomebase gtk-doc binconfig-disabled
-
-SRC_URI[archive.md5sum] = "767e73c4174f75b99695d4530fd9bb80"
-SRC_URI[archive.sha256sum] = "ea6e1b858c55219cefd7109756bff5bc1a774ba7a55f7d3ccd734d6b871b8570"
diff --git a/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.2.bb b/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.2.bb
deleted file mode 100644
index f851305..0000000
--- a/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.2.bb
+++ /dev/null
@@ -1,14 +0,0 @@
-SUMMARY = "Wrapper library for evdev devices"
-HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
-SECTION = "libs"
-
-LICENSE = "MIT-X"
-LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
-                    file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
-
-SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
-
-SRC_URI[md5sum] = "debfcd5153558eba25a8e71eb2534ae8"
-SRC_URI[sha256sum] = "7c77b213f075706d428a2af54b66bf86b03a68e9fb390e7ec48cf55065970643"
-
-inherit autotools pkgconfig
diff --git a/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.6.bb b/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.6.bb
new file mode 100644
index 0000000..c8163e3
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libevdev/libevdev_1.4.6.bb
@@ -0,0 +1,14 @@
+SUMMARY = "Wrapper library for evdev devices"
+HOMEPAGE = "http://www.freedesktop.org/wiki/Software/libevdev/"
+SECTION = "libs"
+
+LICENSE = "MIT-X"
+LIC_FILES_CHKSUM = "file://COPYING;md5=75aae0d38feea6fda97ca381cb9132eb \
+                    file://libevdev/libevdev.h;endline=21;md5=7ff4f0b5113252c2f1a828e0bbad98d1"
+
+SRC_URI = "http://www.freedesktop.org/software/libevdev/${BP}.tar.xz"
+
+SRC_URI[md5sum] = "9b3f25bd8fb0f8efa4944d34668dddc0"
+SRC_URI[sha256sum] = "7b2ae1a0c7f9f7a96198ddc8fd167f090f233d6cbd8168b847e4f968445132d3"
+
+inherit autotools pkgconfig
diff --git a/yocto-poky/meta/recipes-support/libevent/libevent_2.0.22.bb b/yocto-poky/meta/recipes-support/libevent/libevent_2.0.22.bb
index 58c263c..df8a31c 100644
--- a/yocto-poky/meta/recipes-support/libevent/libevent_2.0.22.bb
+++ b/yocto-poky/meta/recipes-support/libevent/libevent_2.0.22.bb
@@ -14,6 +14,8 @@
 SRC_URI[md5sum] = "c4c56f986aa985677ca1db89630a2e11"
 SRC_URI[sha256sum] = "71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3"
 
+UPSTREAM_CHECK_URI = "http://libevent.org/"
+
 S = "${WORKDIR}/${BPN}-${PV}-stable"
 
 PACKAGECONFIG ??= ""
diff --git a/yocto-poky/meta/recipes-gnome/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch b/yocto-poky/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch
similarity index 100%
rename from yocto-poky/meta/recipes-gnome/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch
rename to yocto-poky/meta/recipes-support/libffi/libffi/0001-mips-Use-compiler-internal-define-for-linux.patch
diff --git a/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch b/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch
new file mode 100644
index 0000000..1e90125
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libffi/libffi/not-win32.patch
@@ -0,0 +1,22 @@
+libffi's configure assumes that cross-compiled builds are complicated and
+introduces convoluted path manipulation involving gcc search paths to the
+install paths, resulting in paths like -L/usr/lib/../lib/ appearing in
+libffi.pc.  When pkg-config is then used to obtain the linker flags for libffi
+it can't tell that this path is on the default search path and returns
+$SYSROOT/usr/lib/../lib which then gets written all over the target sysroot.
+This then means the sstate can't be shared and triggers QA errors.
+
+As this block is generally pointless, disable it.
+
+Upstream-Status: Inappropriate
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+--- a/configure.ac~	2014-11-12 11:56:51.000000000 +0000
++++ b/configure.ac	2016-02-04 14:02:53.765710532 +0000
+@@ -593,5 +593,5 @@
+ # These variables are only ever used when we cross-build to X86_WIN32.
+ # And we only support this with GCC, so...
+-if test "x$GCC" = "xyes"; then
++if false; then
+   if test -n "$with_cross_host" &&
+      test x"$with_cross_host" != x"no"; then
\ No newline at end of file
diff --git a/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb b/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb
new file mode 100644
index 0000000..72e25fb
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libffi/libffi_3.2.1.bb
@@ -0,0 +1,26 @@
+SUMMARY = "A portable foreign function interface library"
+DESCRIPTION = "The `libffi' library provides a portable, high level programming interface to various calling \
+conventions.  This allows a programmer to call any function specified by a call interface description at run \
+time. FFI stands for Foreign Function Interface.  A foreign function interface is the popular name for the \
+interface that allows code written in one language to call code written in another language.  The `libffi' \
+library really only provides the lowest, machine dependent layer of a fully featured foreign function interface.  \
+A layer must exist above `libffi' that handles type conversions for values passed between the two languages."
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3610bb17683a0089ed64055416b2ae1b"
+
+SRC_URI = "ftp://sourceware.org/pub/libffi/${BP}.tar.gz \
+           file://not-win32.patch \
+	   file://0001-mips-Use-compiler-internal-define-for-linux.patch \
+	   "
+
+SRC_URI[md5sum] = "83b89587607e3eb65c70d361f13bab43"
+SRC_URI[sha256sum] = "d06ebb8e1d9a22d19e38d63fdb83954253f39bedc5d46232a05645685722ca37"
+
+EXTRA_OECONF += "--disable-builddir"
+
+inherit autotools texinfo
+
+FILES_${PN}-dev += "${libdir}/libffi-${PV}"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.3.bb b/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.3.bb
deleted file mode 100644
index 3675269..0000000
--- a/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.3.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-SUMMARY = "Library for file management"
-HOMEPAGE = "http://pcmanfm.sourceforge.net/"
-
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://src/fm-extra.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007"
-
-SECTION = "x11/libs"
-DEPENDS = "glib-2.0 intltool-native gettext-native"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
-           file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
-          "
-
-SRC_URI[md5sum] = "3ff38200701658f7e80e25ed395d92dd"
-SRC_URI[sha256sum] = "c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9"
-
-S = "${WORKDIR}/libfm-${PV}"
-
-EXTRA_OECONF = "--with-extra-only --with-gtk=no"
-
-PR = "r1"
-
-inherit autotools pkgconfig gtk-doc
-
-do_configure[dirs] =+ "${S}/m4"
diff --git a/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.4.bb b/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.4.bb
new file mode 100644
index 0000000..f204968
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libfm/libfm-extra_1.2.4.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Library for file management"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://src/fm-extra.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007"
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0 intltool-native gettext-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz \
+           file://0001-nls.m4-Take-it-from-gettext-0.15.patch \
+          "
+
+SRC_URI[md5sum] = "74997d75e7e87dc73398746fd373bf52"
+SRC_URI[sha256sum] = "7804f6f28cb3d1bc8ffb3151ab7ff0c063b27c5f9b06c682eb903e01cf25502f"
+
+S = "${WORKDIR}/libfm-${PV}"
+
+EXTRA_OECONF = "--with-extra-only --with-gtk=no"
+
+inherit autotools pkgconfig gtk-doc
+
+do_configure[dirs] =+ "${S}/m4"
diff --git a/yocto-poky/meta/recipes-support/libfm/libfm_1.2.3.bb b/yocto-poky/meta/recipes-support/libfm/libfm_1.2.3.bb
deleted file mode 100644
index e9ff656..0000000
--- a/yocto-poky/meta/recipes-support/libfm/libfm_1.2.3.bb
+++ /dev/null
@@ -1,39 +0,0 @@
-SUMMARY = "Library for file management"
-HOMEPAGE = "http://pcmanfm.sourceforge.net/"
-
-LICENSE = "GPLv2+ & LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-                    file://src/fm.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007 \
-                    file://src/base/fm-config.h;beginline=10;endline=23;md5=ef1f84da64b3c01cca447212f7ef6007 \
-                    file://src/fm-gtk.h;beginline=6;endline=19;md5=646baa4955c04fe768f2ca27b92ac8dd"
-
-
-SECTION = "x11/libs"
-DEPENDS = "glib-2.0 pango gtk+ menu-cache intltool-native libexif libfm-extra gettext-native"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "3ff38200701658f7e80e25ed395d92dd"
-SRC_URI[sha256sum] = "c692f1624a4cbc8d1dd55f3b3f3369fbf5d26f63a916e2c295230b2344e1fbf9"
-
-PR = "r1"
-
-inherit autotools pkgconfig gtk-doc distro_features_check
-ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
-
-do_configure[dirs] =+ "${S}/m4"
-
-PACKAGES += "${PN}-mime"
-FILES_${PN}-mime = "${datadir}/mime/"
-FILES_${PN}-dbg += "${libdir}/libfm/modules/.debug"
-
-do_install_append () {
-    # remove files which are part of libfm-extra
-    rm -f ${D}${includedir}/libfm-1.0/fm-xml-file.h
-    rm -f ${D}${includedir}/libfm-1.0/fm-version.h
-    rm -f ${D}${includedir}/libfm-1.0/fm-extra.h
-    rm -f ${D}${libdir}/pkgconfig/libfm-extra.pc
-    rm -f ${D}${libdir}/libfm-extra.so*
-    rm -f ${D}${libdir}/libfm-extra.a
-    rm -f ${D}${libdir}/libfm-extra.la
-}
diff --git a/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb b/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb
new file mode 100644
index 0000000..866b11a
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libfm/libfm_1.2.4.bb
@@ -0,0 +1,36 @@
+SUMMARY = "Library for file management"
+HOMEPAGE = "http://pcmanfm.sourceforge.net/"
+
+LICENSE = "GPLv2+ & LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=4641e94ec96f98fabc56ff9cc48be14b \
+                    file://src/fm.h;beginline=8;endline=21;md5=ef1f84da64b3c01cca447212f7ef6007 \
+                    file://src/base/fm-config.h;beginline=10;endline=23;md5=ef1f84da64b3c01cca447212f7ef6007 \
+                    file://src/fm-gtk.h;beginline=6;endline=19;md5=646baa4955c04fe768f2ca27b92ac8dd"
+
+
+SECTION = "x11/libs"
+DEPENDS = "glib-2.0 pango gtk+ menu-cache intltool-native libexif libfm-extra gettext-native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pcmanfm/libfm-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "74997d75e7e87dc73398746fd373bf52"
+SRC_URI[sha256sum] = "7804f6f28cb3d1bc8ffb3151ab7ff0c063b27c5f9b06c682eb903e01cf25502f"
+
+inherit autotools pkgconfig gtk-doc distro_features_check
+ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
+
+do_configure[dirs] =+ "${S}/m4"
+
+PACKAGES += "${PN}-mime"
+FILES_${PN}-mime = "${datadir}/mime/"
+
+do_install_append () {
+    # remove files which are part of libfm-extra
+    rm -f ${D}${includedir}/libfm-1.0/fm-xml-file.h
+    rm -f ${D}${includedir}/libfm-1.0/fm-version.h
+    rm -f ${D}${includedir}/libfm-1.0/fm-extra.h
+    rm -f ${D}${libdir}/pkgconfig/libfm-extra.pc
+    rm -f ${D}${libdir}/libfm-extra.so*
+    rm -f ${D}${libdir}/libfm-extra.a
+    rm -f ${D}${libdir}/libfm-extra.la
+}
diff --git a/yocto-poky/meta/recipes-support/libgcrypt/files/CVE-2015-7511_1.patch b/yocto-poky/meta/recipes-support/libgcrypt/files/CVE-2015-7511_1.patch
deleted file mode 100644
index 14c25b9..0000000
--- a/yocto-poky/meta/recipes-support/libgcrypt/files/CVE-2015-7511_1.patch
+++ /dev/null
@@ -1,245 +0,0 @@
-From 2ef48ba59c32bfa1a9265d5eea8ab225a658903a Mon Sep 17 00:00:00 2001
-From: Werner Koch <wk@gnupg.org>
-Date: Thu, 9 Jan 2014 19:14:09 +0100
-Subject: [PATCH] ecc: Make a macro shorter.
-
-* src/mpi.h (MPI_EC_TWISTEDEDWARDS): Rename to MPI_EC_EDWARDS.  CHnage
-all users.
-* cipher/ecc-curves.c (domain_parms): Add parameters for Curve3617 as
-comment.
-* mpi/ec.c (dup_point_twistededwards): Rename to dup_point_edwards.
-(add_points_twistededwards): Rename to add_points_edwards.
-
-Signed-off-by: Werner Koch <wk@gnupg.org>
-
-Upstream-Status: Backport
-2ef48ba59c32bfa1a9265d5eea8ab225a658903a
-
-CVE: CVE-2015-7511 depend patch
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- cipher/ecc-curves.c | 22 +++++++++++++++++++---
- cipher/ecc-misc.c   |  4 ++--
- cipher/ecc.c        |  8 ++++----
- mpi/ec.c            | 22 +++++++++++-----------
- src/mpi.h           | 11 ++++++++---
- 5 files changed, 44 insertions(+), 23 deletions(-)
-
-Index: libgcrypt-1.6.3/cipher/ecc-curves.c
-===================================================================
---- libgcrypt-1.6.3.orig/cipher/ecc-curves.c
-+++ libgcrypt-1.6.3/cipher/ecc-curves.c
-@@ -105,7 +105,7 @@ static const ecc_domain_parms_t domain_p
-     {
-       /* (-x^2 + y^2 = 1 + dx^2y^2) */
-       "Ed25519", 256, 0,
--      MPI_EC_TWISTEDEDWARDS, ECC_DIALECT_ED25519,
-+      MPI_EC_EDWARDS, ECC_DIALECT_ED25519,
-       "0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFED",
-       "-0x01",
-       "-0x2DFC9311D490018C7338BF8688861767FF8FF5B2BEBE27548A14B235ECA6874A",
-@@ -113,6 +113,22 @@ static const ecc_domain_parms_t domain_p
-       "0x216936D3CD6E53FEC0A4E231FDD6DC5C692CC7609525A7B2C9562D608F25D51A",
-       "0x6666666666666666666666666666666666666666666666666666666666666658"
-     },
-+#if 0 /* No real specs yet found.  */
-+    {
-+      /* x^2 + y^2 = 1 + 3617x^2y^2 mod 2^414 - 17 */
-+      "Curve3617",
-+      "0x3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
-+      "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF",
-+      MPI_EC_EDWARDS, 0,
-+      "0x01",
-+      "0x0e21",
-+      "0x07FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEB3CC92414CF"
-+      "706022B36F1C0338AD63CF181B0E71A5E106AF79",
-+      "0x1A334905141443300218C0631C326E5FCD46369F44C03EC7F57FF35498A4AB4D"
-+      "6D6BA111301A73FAA8537C64C4FD3812F3CBC595",
-+      "0x22"
-+    },
-+#endif /*0*/
-     {
-       "NIST P-192", 192, 1,
-       MPI_EC_WEIERSTRASS, ECC_DIALECT_STANDARD,
-@@ -404,7 +420,7 @@ _gcry_ecc_fill_in_curve (unsigned int nb
-   switch (domain_parms[idx].model)
-     {
-     case MPI_EC_WEIERSTRASS:
--    case MPI_EC_TWISTEDEDWARDS:
-+    case MPI_EC_EDWARDS:
-       break;
-     case MPI_EC_MONTGOMERY:
-       return GPG_ERR_NOT_SUPPORTED;
-@@ -1039,7 +1055,7 @@ _gcry_ecc_get_mpi (const char *name, mpi
-       if (name[1] != '@')
-         return _gcry_mpi_ec_ec2os (ec->Q, ec);
- 
--      if (!strcmp (name+2, "eddsa") && ec->model == MPI_EC_TWISTEDEDWARDS)
-+      if (!strcmp (name+2, "eddsa") && ec->model == MPI_EC_EDWARDS)
-         {
-           unsigned char *encpk;
-           unsigned int encpklen;
-Index: libgcrypt-1.6.3/cipher/ecc-misc.c
-===================================================================
---- libgcrypt-1.6.3.orig/cipher/ecc-misc.c
-+++ libgcrypt-1.6.3/cipher/ecc-misc.c
-@@ -79,7 +79,7 @@ _gcry_ecc_model2str (enum gcry_mpi_ec_mo
-     {
-     case MPI_EC_WEIERSTRASS:    str = "Weierstrass"; break;
-     case MPI_EC_MONTGOMERY:     str = "Montgomery";  break;
--    case MPI_EC_TWISTEDEDWARDS: str = "Twisted Edwards"; break;
-+    case MPI_EC_EDWARDS:        str = "Edwards"; break;
-     }
-   return str;
- }
-@@ -252,7 +252,7 @@ _gcry_ecc_compute_public (mpi_point_t Q,
- 
-   if (!d || !G || !ec->p || !ec->a)
-     return NULL;
--  if (ec->model == MPI_EC_TWISTEDEDWARDS && !ec->b)
-+  if (ec->model == MPI_EC_EDWARDS && !ec->b)
-     return NULL;
- 
-   if (ec->dialect == ECC_DIALECT_ED25519
-Index: libgcrypt-1.6.3/cipher/ecc.c
-===================================================================
---- libgcrypt-1.6.3.orig/cipher/ecc.c
-+++ libgcrypt-1.6.3/cipher/ecc.c
-@@ -642,7 +642,7 @@ ecc_check_secret_key (gcry_sexp_t keypar
-   if (!curvename)
-     {
-       sk.E.model = ((flags & PUBKEY_FLAG_EDDSA)
--               ? MPI_EC_TWISTEDEDWARDS
-+               ? MPI_EC_EDWARDS
-                : MPI_EC_WEIERSTRASS);
-       sk.E.dialect = ((flags & PUBKEY_FLAG_EDDSA)
-                       ? ECC_DIALECT_ED25519
-@@ -774,7 +774,7 @@ ecc_sign (gcry_sexp_t *r_sig, gcry_sexp_
-   if (!curvename)
-     {
-       sk.E.model = ((ctx.flags & PUBKEY_FLAG_EDDSA)
--                    ? MPI_EC_TWISTEDEDWARDS
-+                    ? MPI_EC_EDWARDS
-                     : MPI_EC_WEIERSTRASS);
-       sk.E.dialect = ((ctx.flags & PUBKEY_FLAG_EDDSA)
-                       ? ECC_DIALECT_ED25519
-@@ -938,7 +938,7 @@ ecc_verify (gcry_sexp_t s_sig, gcry_sexp
-   if (!curvename)
-     {
-       pk.E.model = ((sigflags & PUBKEY_FLAG_EDDSA)
--                    ? MPI_EC_TWISTEDEDWARDS
-+                    ? MPI_EC_EDWARDS
-                     : MPI_EC_WEIERSTRASS);
-       pk.E.dialect = ((sigflags & PUBKEY_FLAG_EDDSA)
-                       ? ECC_DIALECT_ED25519
-@@ -1528,7 +1528,7 @@ compute_keygrip (gcry_md_hd_t md, gcry_s
-   if (!curvename)
-     {
-       model = ((flags & PUBKEY_FLAG_EDDSA)
--               ? MPI_EC_TWISTEDEDWARDS
-+               ? MPI_EC_EDWARDS
-                : MPI_EC_WEIERSTRASS);
-       dialect = ((flags & PUBKEY_FLAG_EDDSA)
-                  ? ECC_DIALECT_ED25519
-Index: libgcrypt-1.6.3/mpi/ec.c
-===================================================================
---- libgcrypt-1.6.3.orig/mpi/ec.c
-+++ libgcrypt-1.6.3/mpi/ec.c
-@@ -605,7 +605,7 @@ _gcry_mpi_ec_get_affine (gcry_mpi_t x, g
-       }
-       return -1;
- 
--    case MPI_EC_TWISTEDEDWARDS:
-+    case MPI_EC_EDWARDS:
-       {
-         gcry_mpi_t z;
- 
-@@ -725,7 +725,7 @@ dup_point_montgomery (mpi_point_t result
- 
- /*  RESULT = 2 * POINT  (Twisted Edwards version). */
- static void
--dup_point_twistededwards (mpi_point_t result, mpi_point_t point, mpi_ec_t ctx)
-+dup_point_edwards (mpi_point_t result, mpi_point_t point, mpi_ec_t ctx)
- {
- #define X1 (point->x)
- #define Y1 (point->y)
-@@ -811,8 +811,8 @@ _gcry_mpi_ec_dup_point (mpi_point_t resu
-     case MPI_EC_MONTGOMERY:
-       dup_point_montgomery (result, point, ctx);
-       break;
--    case MPI_EC_TWISTEDEDWARDS:
--      dup_point_twistededwards (result, point, ctx);
-+    case MPI_EC_EDWARDS:
-+      dup_point_edwards (result, point, ctx);
-       break;
-     }
- }
-@@ -977,9 +977,9 @@ add_points_montgomery (mpi_point_t resul
- 
- /* RESULT = P1 + P2  (Twisted Edwards version).*/
- static void
--add_points_twistededwards (mpi_point_t result,
--                           mpi_point_t p1, mpi_point_t p2,
--                           mpi_ec_t ctx)
-+add_points_edwards (mpi_point_t result,
-+                    mpi_point_t p1, mpi_point_t p2,
-+                    mpi_ec_t ctx)
- {
- #define X1 (p1->x)
- #define Y1 (p1->y)
-@@ -1087,8 +1087,8 @@ _gcry_mpi_ec_add_points (mpi_point_t res
-     case MPI_EC_MONTGOMERY:
-       add_points_montgomery (result, p1, p2, ctx);
-       break;
--    case MPI_EC_TWISTEDEDWARDS:
--      add_points_twistededwards (result, p1, p2, ctx);
-+    case MPI_EC_EDWARDS:
-+      add_points_edwards (result, p1, p2, ctx);
-       break;
-     }
- }
-@@ -1106,7 +1106,7 @@ _gcry_mpi_ec_mul_point (mpi_point_t resu
-   unsigned int i, loops;
-   mpi_point_struct p1, p2, p1inv;
- 
--  if (ctx->model == MPI_EC_TWISTEDEDWARDS)
-+  if (ctx->model == MPI_EC_EDWARDS)
-     {
-       /* Simple left to right binary method.  GECC Algorithm 3.27 */
-       unsigned int nbits;
-@@ -1269,7 +1269,7 @@ _gcry_mpi_ec_curve_point (gcry_mpi_point
-       log_fatal ("%s: %s not yet supported\n",
-                  "_gcry_mpi_ec_curve_point", "Montgomery");
-       break;
--    case MPI_EC_TWISTEDEDWARDS:
-+    case MPI_EC_EDWARDS:
-       {
-         /* a · x^2 + y^2 - 1 - b · x^2 · y^2 == 0 */
-         ec_pow2 (x, x, ctx);
-Index: libgcrypt-1.6.3/src/mpi.h
-===================================================================
---- libgcrypt-1.6.3.orig/src/mpi.h
-+++ libgcrypt-1.6.3/src/mpi.h
-@@ -245,13 +245,18 @@ void _gcry_mpi_snatch_point (gcry_mpi_t
- /* Models describing an elliptic curve.  */
- enum gcry_mpi_ec_models
-   {
--
-+    /* The Short Weierstrass equation is
-+          y^2 = x^3 + ax + b
-+     */
-     MPI_EC_WEIERSTRASS = 0,
-+    /* The Montgomery equation is
-+          by^2 = x^3 + ax^2 + x
-+     */
-     MPI_EC_MONTGOMERY,
--    MPI_EC_TWISTEDEDWARDS
--    /* The equation for Twisted Edwards curves is
-+    /* The Twisted Edwards equation is
-           ax^2 + y^2 = 1 + bx^2y^2
-        Note that we use 'b' instead of the commonly used 'd'.  */
-+    MPI_EC_EDWARDS
-   };
- 
- /* Dialects used with elliptic curves.  It is easier to keep the
diff --git a/yocto-poky/meta/recipes-support/libgcrypt/files/CVE-2015-7511_2.patch b/yocto-poky/meta/recipes-support/libgcrypt/files/CVE-2015-7511_2.patch
deleted file mode 100644
index 8093a18..0000000
--- a/yocto-poky/meta/recipes-support/libgcrypt/files/CVE-2015-7511_2.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 88e1358962e902ff1cbec8d53ba3eee46407851a Mon Sep 17 00:00:00 2001
-From: NIIBE Yutaka <gniibe@fsij.org>
-Date: Wed, 25 Nov 2015 12:46:19 +0900
-Subject: [PATCH] ecc: Constant-time multiplication for Weierstrass curve.
-
-* mpi/ec.c (_gcry_mpi_ec_mul_point): Use simple left-to-right binary
-method for Weierstrass curve when SCALAR is secure.
-
-Upstream-Status: Backport
-
-http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=88e1358962e902ff1cbec8d53ba3eee46407851a
-
-CVE: CVE-2015-7511 fix
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
----
- mpi/ec.c | 19 +++++++++++++++----
- 1 file changed, 15 insertions(+), 4 deletions(-)
-
-Index: libgcrypt-1.6.3/mpi/ec.c
-===================================================================
---- libgcrypt-1.6.3.orig/mpi/ec.c
-+++ libgcrypt-1.6.3/mpi/ec.c
-@@ -1106,16 +1106,27 @@ _gcry_mpi_ec_mul_point (mpi_point_t resu
-   unsigned int i, loops;
-   mpi_point_struct p1, p2, p1inv;
- 
--  if (ctx->model == MPI_EC_EDWARDS)
-+  if (ctx->model == MPI_EC_EDWARDS
-+      || (ctx->model == MPI_EC_WEIERSTRASS
-+          && mpi_is_secure (scalar)))
-     {
-       /* Simple left to right binary method.  GECC Algorithm 3.27 */
-       unsigned int nbits;
-       int j;
- 
-       nbits = mpi_get_nbits (scalar);
--      mpi_set_ui (result->x, 0);
--      mpi_set_ui (result->y, 1);
--      mpi_set_ui (result->z, 1);
-+      if (ctx->model == MPI_EC_WEIERSTRASS)
-+        {
-+          mpi_set_ui (result->x, 1);
-+          mpi_set_ui (result->y, 1);
-+          mpi_set_ui (result->z, 0);
-+        }
-+      else
-+        {
-+          mpi_set_ui (result->x, 0);
-+          mpi_set_ui (result->y, 1);
-+          mpi_set_ui (result->z, 1);
-+        }
- 
-       if (mpi_is_secure (scalar))
-         {
diff --git a/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc b/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc
index 683be78..5478253 100644
--- a/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc
+++ b/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -22,8 +22,6 @@
 
 BINCONFIG = "${bindir}/libgcrypt-config"
 
-PR = "r1"
-
 inherit autotools texinfo binconfig-disabled pkgconfig
 
 EXTRA_OECONF = "--disable-asm --with-capabilities"
diff --git a/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.3.bb b/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.3.bb
deleted file mode 100644
index db89faf..0000000
--- a/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.3.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-require libgcrypt.inc
-
-SRC_URI += "\
-        file://CVE-2015-7511_1.patch \
-        file://CVE-2015-7511_2.patch \
-        "
-SRC_URI[md5sum] = "de03b867d02fdf115a1bac8bb8b5c3a3"
-SRC_URI[sha256sum] = "69e94e1a7084d94e1a6ca26d436068cb74862d10a7353cfae579a2d88674ff09"
diff --git a/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.5.bb b/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.5.bb
new file mode 100644
index 0000000..717a23f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libgcrypt/libgcrypt_1.6.5.bb
@@ -0,0 +1,4 @@
+require libgcrypt.inc
+
+SRC_URI[md5sum] = "f24fcb684932d4b5ed85f2f05cb1d9f8"
+SRC_URI[sha256sum] = "202bf109ccf2d614565c849f3e5687b94cde972167b35261e094252367627bc6"
diff --git a/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.19.bb b/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.19.bb
deleted file mode 100644
index c69930a..0000000
--- a/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.19.bb
+++ /dev/null
@@ -1,53 +0,0 @@
-SUMMARY = "Small library that defines common error values for all GnuPG components"
-HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
-BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
-
-LICENSE = "GPLv2+ & LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
-                    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-                    file://src/gpg-error.h.in;endline=23;md5=8b204918f0ca707136394d8bb20c7ebc \
-                    file://src/init.c;endline=20;md5=8f5a9b59634f4aebcd0ec9d3ebd53bfe"
-
-
-SECTION = "libs"
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
-           file://pkgconfig.patch \
-	   file://0001-libgpg-error-Add-nios2-support.patch \
-	  "
-SRC_URI[md5sum] = "c04c16245b92829281f43b5bef7d16da"
-SRC_URI[sha256sum] = "53120e1333d5c5d28d87ff2854e9e98719c8e214152f17ad5291704d25c4978b"
-
-BINCONFIG = "${bindir}/gpg-error-config"
-
-inherit autotools binconfig-disabled pkgconfig gettext
-CPPFLAGS += "-P"
-do_compile_prepend() {
-	TARGET_FILE=linux-gnu
-	if [ ${TARGET_OS} != "linux" ]; then
-		TARGET_FILE=${TARGET_OS}
-	fi
-
-	case ${TARGET_ARCH} in
-	  aarch64_be) TUPLE=aarch64-unknown-linux-gnu ;;
-	  arm)	      TUPLE=arm-unknown-linux-gnueabi ;;
-	  armeb)      TUPLE=arm-unknown-linux-gnueabi ;;
-	  i586|i686)  TUPLE=i686-pc-linux-gnu ;;
-	  mips64el)   TUPLE=mipsel-unknown-linux-gnu ;;
-	  mips64)     TUPLE=mips-unknown-linux-gnu ;;
-	  x86_64)     TUPLE=x86_64-pc-linux-gnu ;;
-	  *)          TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;; 
-	esac
-
-	cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
-	  ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
-}
-
-do_install_append() {
-	# we don't have common lisp in OE
-	rm -rf "${D}${datadir}/common-lisp/"
-}
-
-FILES_${PN}-dev += "${bindir}/gpg-error"
-
-BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.21.bb b/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.21.bb
new file mode 100644
index 0000000..0dd1602
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libgpg-error/libgpg-error_1.21.bb
@@ -0,0 +1,53 @@
+SUMMARY = "Small library that defines common error values for all GnuPG components"
+HOMEPAGE = "http://www.gnupg.org/related_software/libgpg-error/"
+BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
+
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
+                    file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
+                    file://src/gpg-error.h.in;endline=23;md5=93d3155af141ae3b369a5d09ca9d6234 \
+                    file://src/init.c;endline=20;md5=8f5a9b59634f4aebcd0ec9d3ebd53bfe"
+
+
+SECTION = "libs"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-${PV}.tar.bz2 \
+           file://pkgconfig.patch \
+	   file://0001-libgpg-error-Add-nios2-support.patch \
+	  "
+SRC_URI[md5sum] = "ab0b5aba6d0a185b41d07bda804fd8b2"
+SRC_URI[sha256sum] = "b7dbdb3cad63a740e9f0c632a1da32d4afdb694ec86c8625c98ea0691713b84d"
+
+BINCONFIG = "${bindir}/gpg-error-config"
+
+inherit autotools binconfig-disabled pkgconfig gettext
+CPPFLAGS += "-P"
+do_compile_prepend() {
+	TARGET_FILE=linux-gnu
+	if [ ${TARGET_OS} != "linux" ]; then
+		TARGET_FILE=${TARGET_OS}
+	fi
+
+	case ${TARGET_ARCH} in
+	  aarch64_be) TUPLE=aarch64-unknown-linux-gnu ;;
+	  arm)	      TUPLE=arm-unknown-linux-gnueabi ;;
+	  armeb)      TUPLE=arm-unknown-linux-gnueabi ;;
+	  i586|i686)  TUPLE=i686-pc-linux-gnu ;;
+	  mips64el)   TUPLE=mipsel-unknown-linux-gnu ;;
+	  mips64)     TUPLE=mips-unknown-linux-gnu ;;
+	  x86_64)     TUPLE=x86_64-pc-linux-gnu ;;
+	  *)          TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;; 
+	esac
+
+	cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
+	  ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
+}
+
+do_install_append() {
+	# we don't have common lisp in OE
+	rm -rf "${D}${datadir}/common-lisp/"
+}
+
+FILES_${PN}-dev += "${bindir}/gpg-error"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch b/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
new file mode 100644
index 0000000..c5c0cb0
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libical/libical/Remove-cmake-check-for-Perl.patch
@@ -0,0 +1,33 @@
+From 918cd8764a845a9d25918a444fbaa5070d2be609 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 21 Aug 2015 16:38:05 +0300
+Subject: [PATCH] Remove cmake check for Perl
+
+We set "CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY" in cmake bbclass to
+make sure cmake does not find host programs. In this case we actually
+are fine with host perl: remove the check.
+
+Upstream-Status: Inappropriate [workaround]
+
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ CMakeLists.txt | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d5aad80..5cc9863 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -91,8 +91,7 @@ if(SHARED_ONLY)
+   set(LIBRARY_TYPE SHARED)
+ endif()
+ 
+-# must have Perl to create the derived stuff
+-find_package(Perl REQUIRED)
++set(PERL_EXECUTABLE perl)
+ 
+ # MSVC specific definitions
+ if(WIN32)
+-- 
+2.1.4
+
diff --git a/yocto-poky/meta/recipes-support/libical/libical_1.0.0.bb b/yocto-poky/meta/recipes-support/libical/libical_1.0.0.bb
deleted file mode 100644
index be6b635..0000000
--- a/yocto-poky/meta/recipes-support/libical/libical_1.0.0.bb
+++ /dev/null
@@ -1,13 +0,0 @@
-SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
-HOMEPAGE = "https://github.com/libical/libical"
-BUGTRACKER = "https://github.com/libical/libical/issues"
-LICENSE = "LGPLv2.1 | MPL-1"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d4fc58309d8ed46587ac63bb449d82f8 \
-                    file://LICENSE;md5=d1a0891cd3e582b3e2ec8fe63badbbb6"
-SECTION = "libs"
-
-SRC_URI = "https://github.com/${BPN}/${BPN}/archive/v${PV}.tar.gz"
-SRC_URI[md5sum] = "f4b8e33ae5efb2f025eb43ce69682a36"
-SRC_URI[sha256sum] = "0072e83834092315772e6719b85fc8b11530b1ff53f4d108315fb38cddbce8c2"
-
-inherit autotools
diff --git a/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb b/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
new file mode 100644
index 0000000..1042e6f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libical/libical_2.0.0.bb
@@ -0,0 +1,27 @@
+SUMMARY = "iCal and scheduling (RFC 2445, 2446, 2447) library"
+HOMEPAGE = "https://github.com/libical/libical"
+BUGTRACKER = "https://github.com/libical/libical/issues"
+LICENSE = "LGPLv2.1 | MPL-1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d4fc58309d8ed46587ac63bb449d82f8 \
+                    file://LICENSE;md5=d1a0891cd3e582b3e2ec8fe63badbbb6"
+SECTION = "libs"
+
+SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
+           file://Remove-cmake-check-for-Perl.patch \
+           "
+DEPENDS = "icu"
+
+SRC_URI[md5sum] = "6bf8e5f5a3ba88baf390d0134e05d76e"
+SRC_URI[sha256sum] = "654c11f759c19237be39f6ad401d917e5a05f36f1736385ed958e60cf21456da"
+UPSTREAM_CHECK_URI = "https://github.com/libical/libical/releases"
+
+inherit cmake
+
+FILES_${PN}-dev += "${libdir}/cmake/*"
+
+#
+# Turn specific library paths in the pkgconfig file into standard library entries
+#
+do_install_append () {
+	sed -i -e "s#${STAGING_LIBDIR}/lib\([a-z0-9]*\)\.so#-l\1#g" ${D}${libdir}/pkgconfig/libical.pc
+}
diff --git a/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb b/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb
index f3e5a18..4f1f524 100644
--- a/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb
+++ b/yocto-poky/meta/recipes-support/libmpc/libmpc_1.0.3.bb
@@ -8,6 +8,8 @@
 SRC_URI[md5sum] = "d6a1d5f8ddea3abd2cc3e98f58352d26"
 SRC_URI[sha256sum] = "617decc6ea09889fb08ede330917a00b16809b8db88c29c31bfbb49cbf88ecc3"
 
+UPSTREAM_CHECK_URI = "http://www.multiprecision.org/index.php?prog=mpc&page=download"
+
 S = "${WORKDIR}/mpc-${PV}"
 BBCLASSEXTEND = "native nativesdk"
 
diff --git a/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb b/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb
index 97814fb..cabe841 100644
--- a/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb
+++ b/yocto-poky/meta/recipes-support/libnl/libnl_3.2.25.bb
@@ -25,14 +25,12 @@
                ${sysconfdir}"
 RREPLACES_${PN} = "libnl2"
 RCONFLICTS_${PN} = "libnl2"
-FILES_${PN}-dbg += "${libdir}/libnl/cli/*/.debug"
-FILES_${PN}-dev += "${libdir}/libnl/cli/*/*.so \
-                    ${libdir}/libnl/cli/*/*.la"
 FILES_${PN}-staticdev += "${libdir}/libnl/cli/*/*.a"
 
 PACKAGES += "${PN}-cli ${PN}-route ${PN}-nf ${PN}-genl ${PN}-idiag"
 FILES_${PN}-cli   = "${libdir}/libnl-cli-3.so.* \
-                     ${libdir}/libnl/cli/*/*.so.* \
+                     ${libdir}/libnl/cli/*/*.so \
+                     ${libdir}/libnl/cli/*/*.la \
                      ${sbindir}/nl-*"
 FILES_${PN}-route = "${libdir}/libnl-route-3.so.*"
 FILES_${PN}-idiag = "${libdir}/libnl-idiag-3.so.*"
diff --git a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch
deleted file mode 100644
index aff1cb1..0000000
--- a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/0001-Fix-enable-vfp-flag.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Upstream-Status: Inappropriate [configuration]
-
-From 1921498bcc06408e8b051a3a9e9ce4182998f748 Mon Sep 17 00:00:00 2001
-From: David Schleef <ds@schleef.org>
-Date: Fri, 8 Apr 2011 10:05:49 -0700
-Subject: [PATCH 10/10] Fix --enable-vfp flag
-
-Patch from Christophe Lyon, fixes #36084.
----
- configure.ac           |    4 ++--
- liboil/arm/Makefile.am |    1 +
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 98c81fb..407d88c 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -188,8 +188,8 @@ fi
- AC_ARG_ENABLE(vfp,
-   AC_HELP_STRING([--enable-vfp],[compile with Vector Floating-point unit support]),
-   enable_vfp=$enableval,enable_vfp=yes)
--if test "x$enable-vfp" = xyes -a x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes; then
--  AS_COMPILER_FLAG(["-Wa,-mfpu=vfp"],
-+if test "x$enable_vfp" = xyes -a x$HAVE_GCC_ASM = xyes -a x$HAVE_ARM = xyes; then
-+  AS_COMPILER_FLAG(["-mfpu=vfp"],
-     [VFP_CFLAGS="$VFP_CFLAGS -mfpu=vfp"],
-     true)
-   #AS_COMPILER_FLAG(["-Wa,-mfloat-abi=softfp"],
-diff --git a/liboil/arm/Makefile.am b/liboil/arm/Makefile.am
-index ead08ed..cd8d9fa 100644
---- a/liboil/arm/Makefile.am
-+++ b/liboil/arm/Makefile.am
-@@ -6,4 +6,5 @@ libarm_la_SOURCES = \
- 	math_vfp_asm.S
- 
- libarm_la_CFLAGS = $(LIBOIL_CFLAGS) $(VFP_CFLAGS)
-+libarm_la_CCASFLAGS = $(LIBOIL_CFLAGS) $(VFP_CFLAGS)
- 
--- 
-1.7.6
-
diff --git a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch
deleted file mode 100644
index c8e3c1f..0000000
--- a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/fix-unaligned-whitelist.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Upstream: https://bugs.freedesktop.org/show_bug.cgi?id=31358
-
-configure: fix whitelisting of x86_64 unaligned memory access
-
-Fix typo in whitelist so cross-compile works for x86_64.
-
-Upstream-Status: Inappropriate [configuration]
-
---- liboil-0.3.17/m4/as-unaligned-access.m4.orig	2009-02-26 14:40:08.000000000 -0500
-+++ liboil-0.3.17/m4/as-unaligned-access.m4	2010-11-03 12:19:55.000000000 -0400
-@@ -9,7 +9,7 @@
-         _AS_ECHO_N([(blacklisted) ])
-         as_cv_unaligned_access=no
- 	;;
--      i?86*|x86_64|amd64|powerpc*|m68k*|cris*)
-+      i?86*|x86_64*|amd64*|powerpc*|m68k*|cris*)
-         _AS_ECHO_N([(whitelisted) ])
-         as_cv_unaligned_access=yes
- 	;;
diff --git a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch
deleted file mode 100644
index 473380e..0000000
--- a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/liboil_fix_for_x32.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-Upstream-Status: Pending
-
-Make the assembly syntax compatible with x32 gcc. Othewise x32 gcc throws errors.
-
-Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
-2011/12/01
-
-
-Index: liboil-0.3.17/liboil/amd64/wavelet.c
-===================================================================
---- liboil-0.3.17.orig/liboil/amd64/wavelet.c
-+++ liboil-0.3.17/liboil/amd64/wavelet.c
-@@ -21,14 +21,14 @@ deinterleave2_asm (int16_t *d1, int16_t 
-   asm volatile ("\n"
-       "  sub $2, %%rcx\n"
-       "1:\n"
--      "  movw (%1,%%rcx,4), %%ax\n"
--      "  movw %%ax, (%0,%%rcx,2)\n"
--      "  movw 2(%1,%%rcx,4), %%ax\n"
--      "  movw %%ax, (%2,%%rcx,2)\n"
--      "  movw 4(%1,%%rcx,4), %%ax\n"
--      "  movw %%ax, 2(%0,%%rcx,2)\n"
--      "  movw 6(%1,%%rcx,4), %%ax\n"
--      "  movw %%ax, 2(%2,%%rcx,2)\n"
-+      "  movw (%q1,%%rcx,4), %%ax\n"
-+      "  movw %%ax, (%q0,%%rcx,2)\n"
-+      "  movw 2(%q1,%%rcx,4), %%ax\n"
-+      "  movw %%ax, (%q2,%%rcx,2)\n"
-+      "  movw 4(%q1,%%rcx,4), %%ax\n"
-+      "  movw %%ax, 2(%q0,%%rcx,2)\n"
-+      "  movw 6(%q1,%%rcx,4), %%ax\n"
-+      "  movw %%ax, 2(%q2,%%rcx,2)\n"
-       "  sub $2, %%rcx\n"
-       "  jge 1b\n"
-       : "+r" (d1), "+r" (s_2xn), "+r" (d2), "+c" (n)
-@@ -53,20 +53,20 @@ deinterleave2_mmx (int16_t *d1, int16_t 
-   asm volatile ("\n"
-       "  xor %%rcx, %%rcx\n"
-       "1:\n"
--      "  movq (%1,%%rcx,4), %%mm0\n"
--      "  movq 8(%1,%%rcx,4), %%mm1\n"
-+      "  movq (%q1,%%rcx,4), %%mm0\n"
-+      "  movq 8(%q1,%%rcx,4), %%mm1\n"
-       "  pslld $16, %%mm0\n"
-       "  pslld $16, %%mm1\n"
-       "  psrad $16, %%mm0\n"
-       "  psrad $16, %%mm1\n"
-       "  packssdw %%mm1, %%mm0\n"
--      "  movq %%mm0, (%0,%%rcx,2)\n"
--      "  movq (%1,%%rcx,4), %%mm0\n"
--      "  movq 8(%1,%%rcx,4), %%mm1\n"
-+      "  movq %%mm0, (%q0,%%rcx,2)\n"
-+      "  movq (%q1,%%rcx,4), %%mm0\n"
-+      "  movq 8(%q1,%%rcx,4), %%mm1\n"
-       "  psrad $16, %%mm0\n"
-       "  psrad $16, %%mm1\n"
-       "  packssdw %%mm1, %%mm0\n"
--      "  movq %%mm0, (%2,%%rcx,2)\n"
-+      "  movq %%mm0, (%q2,%%rcx,2)\n"
-       "  add $4, %%rcx\n"
-       "  cmp %3, %%ecx\n"
-       "  jl 1b\n"
-@@ -93,10 +93,10 @@ deinterleave2_mmx_2 (int16_t *d1, int16_
-   asm volatile ("\n"
-       "  xor %%rcx, %%rcx\n"
-       "1:\n"
--      "  pshufw $0xd8, (%1,%%rcx,4), %%mm0\n"
--      "  movd %%mm0, (%0,%%rcx,2)\n"
--      "  pshufw $0x8d, (%1,%%rcx,4), %%mm0\n"
--      "  movd %%mm0, (%2,%%rcx,2)\n"
-+      "  pshufw $0xd8, (%q1,%%rcx,4), %%mm0\n"
-+      "  movd %%mm0, (%q0,%%rcx,2)\n"
-+      "  pshufw $0x8d, (%q1,%%rcx,4), %%mm0\n"
-+      "  movd %%mm0, (%q2,%%rcx,2)\n"
-       "  add $2, %%rcx\n"
-       "  cmp %3, %%ecx\n"
-       "  jl 1b\n"
-@@ -123,16 +123,16 @@ deinterleave2_mmx_3 (int16_t *d1, int16_
-   asm volatile ("\n"
-       "  xor %%rcx, %%rcx\n"
-       "1:\n"
--      "  movq (%1,%%rcx,4), %%mm1\n"
--      "  movq (%1,%%rcx,4), %%mm2\n"
--      "  movq 8(%1,%%rcx,4), %%mm0\n"
-+      "  movq (%q1,%%rcx,4), %%mm1\n"
-+      "  movq (%q1,%%rcx,4), %%mm2\n"
-+      "  movq 8(%q1,%%rcx,4), %%mm0\n"
-       "  punpcklwd %%mm0, %%mm1\n"
-       "  punpckhwd %%mm0, %%mm2\n"
-       "  movq %%mm1, %%mm0\n"
-       "  punpcklwd %%mm2, %%mm0\n"
-       "  punpckhwd %%mm2, %%mm1\n"
--      "  movq %%mm0, (%0,%%rcx,2)\n"
--      "  movq %%mm1, (%2,%%rcx,2)\n"
-+      "  movq %%mm0, (%q0,%%rcx,2)\n"
-+      "  movq %%mm1, (%q2,%%rcx,2)\n"
-       "  add $4, %%rcx\n"
-       "  cmp %3, %%ecx\n"
-       "  jl 1b\n"
-@@ -159,26 +159,26 @@ deinterleave2_mmx_4 (int16_t *d1, int16_
-   asm volatile ("\n"
-       "  xor %%rcx, %%rcx\n"
-       "1:\n"
--      "  movq (%1,%%rcx,4), %%mm1\n"
-+      "  movq (%q1,%%rcx,4), %%mm1\n"
-       "  movq %%mm1, %%mm2\n"
--      "  movq 8(%1,%%rcx,4), %%mm0\n"
--      "   movq 16(%1,%%rcx,4), %%mm5\n"
-+      "  movq 8(%q1,%%rcx,4), %%mm0\n"
-+      "   movq 16(%q1,%%rcx,4), %%mm5\n"
-       "  punpcklwd %%mm0, %%mm1\n"
-       "   movq %%mm5, %%mm6\n"
-       "  punpckhwd %%mm0, %%mm2\n"
--      "   movq 24(%1,%%rcx,4), %%mm4\n"
-+      "   movq 24(%q1,%%rcx,4), %%mm4\n"
-       "  movq %%mm1, %%mm0\n"
-       "   punpcklwd %%mm4, %%mm5\n"
-       "  punpcklwd %%mm2, %%mm0\n"
-       "   punpckhwd %%mm4, %%mm6\n"
-       "  punpckhwd %%mm2, %%mm1\n"
-       "   movq %%mm5, %%mm4\n"
--      "  movq %%mm0, (%0,%%rcx,2)\n"
-+      "  movq %%mm0, (%q0,%%rcx,2)\n"
-       "   punpcklwd %%mm6, %%mm4\n"
--      "  movq %%mm1, (%2,%%rcx,2)\n"
-+      "  movq %%mm1, (%q2,%%rcx,2)\n"
-       "   punpckhwd %%mm6, %%mm5\n"
--      "   movq %%mm4, 8(%0,%%rcx,2)\n"
--      "   movq %%mm5, 8(%2,%%rcx,2)\n"
-+      "   movq %%mm4, 8(%q0,%%rcx,2)\n"
-+      "   movq %%mm5, 8(%q2,%%rcx,2)\n"
-       "  add $8, %%rcx\n"
-       "  cmp %3, %%ecx\n"
-       "  jl 1b\n"
-@@ -252,13 +252,13 @@ interleave2_mmx (int16_t *d_2xn, int16_t
-   asm volatile ("\n"
-       "  xor %%rcx, %%rcx\n"
-       "1:\n"
--      "  movq (%1,%%rcx,2), %%mm0\n"
--      "  movq (%2,%%rcx,2), %%mm1\n"
-+      "  movq (%q1,%%rcx,2), %%mm0\n"
-+      "  movq (%q2,%%rcx,2), %%mm1\n"
-       "  movq %%mm0, %%mm2\n"
-       "  punpckhwd %%mm1, %%mm0\n"
-       "  punpcklwd %%mm1, %%mm2\n"
--      "  movq %%mm2, (%0,%%rcx,4)\n"
--      "  movq %%mm0, 8(%0,%%rcx,4)\n"
-+      "  movq %%mm2, (%q0,%%rcx,4)\n"
-+      "  movq %%mm0, 8(%q0,%%rcx,4)\n"
-       "  add $4, %%rcx\n"
-       "  cmp %3, %%ecx\n"
-       "  jl 1b\n"
-@@ -285,12 +285,12 @@ lift_add_shift1_mmx (int16_t *d, int16_t
-   asm volatile ("\n"
-       "  xor %%rcx, %%rcx\n"
-       "1:\n"
--      "  movq (%2,%%rcx,2), %%mm1\n"
--      "  movq (%3,%%rcx,2), %%mm2\n"
-+      "  movq (%q2,%%rcx,2), %%mm1\n"
-+      "  movq (%q3,%%rcx,2), %%mm2\n"
-       "  paddw %%mm2, %%mm1\n"
-       "  psraw $1, %%mm1\n"
--      "  paddw (%1,%%rcx,2), %%mm1\n"
--      "  movq %%mm1, (%0,%%rcx,2)\n"
-+      "  paddw (%q1,%%rcx,2), %%mm1\n"
-+      "  movq %%mm1, (%q0,%%rcx,2)\n"
-       "  add $4, %%rcx\n"
-       "  cmp %4, %%ecx\n"
-       "  jl 1b\n"
-@@ -317,13 +317,13 @@ lift_sub_shift1_mmx (int16_t *d, int16_t
-   asm volatile ("\n"
-       "  xor %%rcx, %%rcx\n"
-       "1:\n"
--      "  movq (%2,%%rcx,2), %%mm1\n"
--      "  movq (%3,%%rcx,2), %%mm2\n"
--      "  movq (%1,%%rcx,2), %%mm0\n"
-+      "  movq (%q2,%%rcx,2), %%mm1\n"
-+      "  movq (%q3,%%rcx,2), %%mm2\n"
-+      "  movq (%q1,%%rcx,2), %%mm0\n"
-       "  paddw %%mm2, %%mm1\n"
-       "  psraw $1, %%mm1\n"
-       "  psubw %%mm1, %%mm0\n"
--      "  movq %%mm0, (%0,%%rcx,2)\n"
-+      "  movq %%mm0, (%q0,%%rcx,2)\n"
-       "  add $4, %%rcx\n"
-       "  cmp %4, %%ecx\n"
-       "  jl 1b\n"
-@@ -350,12 +350,12 @@ lift_add_shift2_mmx (int16_t *d, int16_t
-   asm volatile ("\n"
-       "  xor %%rcx, %%rcx\n"
-       "1:\n"
--      "  movq (%2,%%rcx,2), %%mm1\n"
--      "  movq (%3,%%rcx,2), %%mm2\n"
-+      "  movq (%q2,%%rcx,2), %%mm1\n"
-+      "  movq (%q3,%%rcx,2), %%mm2\n"
-       "  paddw %%mm2, %%mm1\n"
-       "  psraw $2, %%mm1\n"
--      "  paddw (%1,%%rcx,2), %%mm1\n"
--      "  movq %%mm1, (%0,%%rcx,2)\n"
-+      "  paddw (%q1,%%rcx,2), %%mm1\n"
-+      "  movq %%mm1, (%q0,%%rcx,2)\n"
-       "  add $4, %%rcx\n"
-       "  cmp %4, %%ecx\n"
-       "  jl 1b\n"
-@@ -382,13 +382,13 @@ lift_sub_shift2_mmx (int16_t *d, int16_t
-   asm volatile ("\n"
-       "  xor %%rcx, %%rcx\n"
-       "1:\n"
--      "  movq (%2,%%rcx,2), %%mm1\n"
--      "  movq (%3,%%rcx,2), %%mm2\n"
--      "  movq (%1,%%rcx,2), %%mm0\n"
-+      "  movq (%q2,%%rcx,2), %%mm1\n"
-+      "  movq (%q3,%%rcx,2), %%mm2\n"
-+      "  movq (%q1,%%rcx,2), %%mm0\n"
-       "  paddw %%mm2, %%mm1\n"
-       "  psraw $2, %%mm1\n"
-       "  psubw %%mm1, %%mm0\n"
--      "  movq %%mm0, (%0,%%rcx,2)\n"
-+      "  movq %%mm0, (%q0,%%rcx,2)\n"
-       "  add $4, %%rcx\n"
-       "  cmp %4, %%ecx\n"
-       "  jl 1b\n"
diff --git a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch b/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch
deleted file mode 100644
index 892d441..0000000
--- a/yocto-poky/meta/recipes-support/liboil/liboil-0.3.17/no-tests.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Upstream-Status: Inappropriate [disable feature]
-
---- liboil-0.3.9/liboil/liboilfunction.c.old	2006-09-18 13:03:20.000000000 +0100
-+++ liboil-0.3.9/liboil/liboilfunction.c	2006-09-18 13:04:10.000000000 +0100
-@@ -345,7 +345,9 @@
-     return;
-   }
- 
--  test = oil_test_new (klass);
-+  klass->chosen_impl = klass->reference_impl;
-+  klass->func = klass->reference_impl->func;
-+/*  test = oil_test_new (klass);
-   if (test == NULL) {
-     OIL_ERROR ("failed to test function class %s", klass->name);
-     return;
-@@ -385,7 +387,7 @@
-   klass->chosen_impl = min_impl;
-   klass->func = min_impl->func;
- 
--  oil_test_free (test);
-+  oil_test_free (test);*/
- }
- 
- static void
diff --git a/yocto-poky/meta/recipes-support/liboil/liboil_0.3.17.bb b/yocto-poky/meta/recipes-support/liboil/liboil_0.3.17.bb
deleted file mode 100644
index 03b7785..0000000
--- a/yocto-poky/meta/recipes-support/liboil/liboil_0.3.17.bb
+++ /dev/null
@@ -1,27 +0,0 @@
-SUMMARY = "Library of simple functions optimized for various CPUs"
-HOMEPAGE = "http://liboil.freedesktop.org/"
-BUGTRACKER = "https://bugs.freedesktop.org/"
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=ad80780d9c5205d63481a0184e199a15 \
-                    file://liboil/liboil.h;endline=28;md5=95c794a66b88800d949fed17e437d9fb \
-                    file://liboil/liboilcpu.c;endline=28;md5=89da69a61d88eedcba066f42353fb75a \
-                    file://examples/example1.c;endline=29;md5=9d4dad9fcbbdf0441ee063f8af5170c9 \
-                    file://testsuite/trans.c;endline=29;md5=380ecd43121fe3dcc0d8d7e5984f283d"
-
-DEPENDS = "glib-2.0"
-PR = "r5"
-
-SRC_URI = "http://liboil.freedesktop.org/download/${BPN}-${PV}.tar.gz \
-           file://no-tests.patch \
-           file://fix-unaligned-whitelist.patch \
-           file://0001-Fix-enable-vfp-flag.patch \
-           file://liboil_fix_for_x32.patch \
-          "
-
-SRC_URI[md5sum] = "47dc734f82faeb2964d97771cfd2e701"
-SRC_URI[sha256sum] = "105f02079b0b50034c759db34b473ecb5704ffa20a5486b60a8b7698128bfc69"
-
-inherit autotools pkgconfig
-
-ARM_INSTRUCTION_SET = "arm"
diff --git a/yocto-poky/meta/recipes-support/libpcre/libpcre_8.38.bb b/yocto-poky/meta/recipes-support/libpcre/libpcre_8.38.bb
index c567607..384c2fe 100644
--- a/yocto-poky/meta/recipes-support/libpcre/libpcre_8.38.bb
+++ b/yocto-poky/meta/recipes-support/libpcre/libpcre_8.38.bb
@@ -7,7 +7,7 @@
 SECTION = "devel"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://LICENCE;md5=7e4937814aee14758c1c95b59c80c44d"
-SRC_URI = "${SOURCEFORGE_MIRROR}/project/pcre/pcre/${PV}/pcre-${PV}.tar.bz2 \
+SRC_URI = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PV}.tar.bz2 \
            file://pcre-cross.patch \
            file://fix-pcre-name-collision.patch \
            file://run-ptest \
@@ -22,12 +22,13 @@
 PROVIDES += "pcre"
 DEPENDS += "bzip2 zlib"
 
-PACKAGECONFIG ??= "pcre8"
+PACKAGECONFIG ??= "pcre8 unicode-properties"
 
 PACKAGECONFIG[pcre8] = "--enable-pcre8,--disable-pcre8"
 PACKAGECONFIG[pcre16] = "--enable-pcre16,--disable-pcre16"
 PACKAGECONFIG[pcre32] = "--enable-pcre32,--disable-pcre32"
 PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline,"
+PACKAGECONFIG[unicode-properties] = "--enable-unicode-properties,--disable-unicode-properties"
 
 BINCONFIG = "${bindir}/pcre-config"
 
@@ -36,7 +37,7 @@
 EXTRA_OECONF = "\
     --enable-newline-is-lf \
     --enable-rebuild-chartables \
-    --enable-utf8 \
+    --enable-utf \
     --with-link-size=2 \
     --with-match-limit=10000000 \
 "
diff --git a/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb b/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb
index 06d0b9b..8cc90bb 100644
--- a/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb
+++ b/yocto-poky/meta/recipes-support/libproxy/libproxy_0.4.11.bb
@@ -6,30 +6,31 @@
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \
                     file://utils/proxy.c;beginline=1;endline=18;md5=55152a1006d7dafbef32baf9c30a99c0"
 
-DEPENDS = "gconf glib-2.0"
+DEPENDS = "glib-2.0"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/libp/${BPN}/${BPN}_${PV}.orig.tar.gz \
            file://0001-test-Include-sys-select.h-for-select.patch \
           "
+
 SRC_URI[md5sum] = "3cd1ae2a4abecf44b3f24d6639d2cd84"
 SRC_URI[sha256sum] = "dc3f33de54163718f82b3e7c496a7de97f8862578414b8ecaad3cbfe4821864b"
 
 inherit cmake pkgconfig
 
-EXTRA_OECMAKE = "-DWITH_WEBKIT=no -DWITH_GNOME=yes -DWITH_KDE4=no \
-	      -DWITH_PYTHON=no -DWITH_PERL=no -DWITH_MOZJS=no -DWITH_NM=no -DLIB_INSTALL_DIR=${libdir} -DLIBEXEC_INSTALL_DIR=${libexecdir}"
+PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'gnome', '', d)} gnome3"
+PACKAGECONFIG[gnome] = "-DWITH_GNOME=yes,-DWITH_GNOME=no,gconf"
+PACKAGECONFIG[gnome3] = "-DWITH_GNOME3=yes,-DWITH_GNOME3=no"
+
+EXTRA_OECMAKE += " \
+    -DWITH_KDE4=no \
+    -DWITH_MOZJS=no \
+    -DWITH_NM=no \
+    -DWITH_PERL=no \
+    -DWITH_PYTHON=no \
+    -DWITH_WEBKIT=no \
+    -DLIB_INSTALL_DIR=${libdir} \
+    -DLIBEXEC_INSTALL_DIR=${libexecdir} \
+"
 
 FILES_${PN} += "${libdir}/${BPN}/${PV}/modules"
 FILES_${PN}-dev += "${datadir}/cmake"
-FILES_${PN}-dbg += "${libdir}/${BPN}/${PV}/plugins/.debug/ ${libdir}/${BPN}/${PV}/modules/.debug/"
-
-do_configure_prepend() {
-	export HOST_SYS=${HOST_SYS}
-	export BUILD_SYS=${BUILD_SYS}
-}
-
-python() {
-    if incompatible_license_contains("GPLv3", "x", "", d) == "x" or bb.utils.contains("DISTRO_FEATURES", "x11", "x", "", d) == "":
-        d.setVar("EXTRA_OECMAKE", d.getVar("EXTRA_OECMAKE", False).replace("-DWITH_GNOME=yes", "-DWITH_GNOME=no"))
-        d.setVar("DEPENDS", " ".join(i for i in d.getVar("DEPENDS", False).split() if i != "gconf"))
-}
diff --git a/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.50.0.bb b/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.50.0.bb
deleted file mode 100644
index 044db31..0000000
--- a/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.50.0.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "An HTTP library implementation in C"
-HOMEPAGE = "http://www.gnome.org/"
-BUGTRACKER = "https://bugzilla.gnome.org/"
-
-LICENSE = "LGPLv2"
-LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
-
-SECTION = "x11/gnome/libs"
-
-DEPENDS = "glib-2.0 gnutls libxml2 sqlite3 intltool-native"
-
-# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards.  Enable
-# by default but let it be easily disabled.
-PACKAGECONFIG ??= "gnome"
-PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
-
-SHRT_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
-SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
-
-SRC_URI[md5sum] = "9a84d66e1b7ccd3bd340574b11eccc15"
-SRC_URI[sha256sum] = "1e01365ac4af3817187ea847f9d3588c27eee01fc519a5a7cb212bb78b0f667b"
-
-S = "${WORKDIR}/libsoup-${PV}"
-
-inherit autotools gettext pkgconfig
-
-# glib-networking is needed for SSL, proxies, etc.
-RRECOMMENDS_${PN} = "glib-networking"
diff --git a/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.52.2.bb b/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.52.2.bb
new file mode 100644
index 0000000..f6e3db2
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libsoup/libsoup-2.4_2.52.2.bb
@@ -0,0 +1,34 @@
+SUMMARY = "An HTTP library implementation in C"
+HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
+BUGTRACKER = "https://bugzilla.gnome.org/"
+SECTION = "x11/gnome/libs"
+LICENSE = "LGPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
+
+DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 intltool-native"
+
+SHRT_VER = "${@d.getVar('PV', True).split('.')[0]}.${@d.getVar('PV', True).split('.')[1]}"
+
+SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz"
+
+SRC_URI[md5sum] = "e4757d09012ed93822b1ee41435fec24"
+SRC_URI[sha256sum] = "db55628b5c7d952945bb71b236469057c8dfb8dea0c271513579c6273c2093dc"
+
+S = "${WORKDIR}/libsoup-${PV}"
+
+inherit autotools gettext pkgconfig upstream-version-is-even gobject-introspection
+
+# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards. Disable by default.
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome"
+
+EXTRA_OECONF = "--disable-vala"
+
+# When built without gnome support, libsoup-2.4 will contain only one shared lib
+# and will therefore become subject to renaming by debian.bbclass. Prevent
+# renaming in order to keep the package name consistent regardless of whether
+# gnome support is enabled or disabled.
+DEBIAN_NOAUTONAME_${PN} = "1"
+
+# glib-networking is needed for SSL, proxies, etc.
+RRECOMMENDS_${PN} = "glib-networking"
diff --git a/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.5.bb b/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.5.bb
deleted file mode 100644
index 45cf633..0000000
--- a/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.5.bb
+++ /dev/null
@@ -1,28 +0,0 @@
-SUMMARY = "Library for manipulating C and Unicode strings"
-
-DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
- consist of very different scripts from Latin letters to Chinese Hanzi\
- with many kinds of special characters accents, right-to-left writing\
- marks, hyphens, Roman numbers, and much more. But the POSIX platform\
- APIs for text do not contain adequate functions for dealing with\
- particular properties of many Unicode characters. In fact, the POSIX\
- APIs for text have several assumptions at their base which don't hold\
- for Unicode text.  This library provides functions for manipulating\
- Unicode strings and for manipulating C strings according to the Unicode\
- standard.  This package contains documentation."
-
-HOMEPAGE = "http://www.gnu.org/software/libunistring/"
-SECTION = "devel"
-LICENSE = "GPLv3 & LGPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
-
-SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
-           file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
-           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
-"
-SRC_URI[md5sum] = "1a705bcdcb83799d544137617b377cfd"
-SRC_URI[sha256sum] = "1a8c0772467850bef7197318a95f44abbb678ea83cbf119a3500cc7848276a17"
-
-inherit autotools texinfo
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.6.bb b/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.6.bb
new file mode 100644
index 0000000..bb70122
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunistring/libunistring_0.9.6.bb
@@ -0,0 +1,28 @@
+SUMMARY = "Library for manipulating C and Unicode strings"
+
+DESCRIPTION = "Text files are nowadays usually encoded in Unicode, and may\
+ consist of very different scripts from Latin letters to Chinese Hanzi\
+ with many kinds of special characters accents, right-to-left writing\
+ marks, hyphens, Roman numbers, and much more. But the POSIX platform\
+ APIs for text do not contain adequate functions for dealing with\
+ particular properties of many Unicode characters. In fact, the POSIX\
+ APIs for text have several assumptions at their base which don't hold\
+ for Unicode text.  This library provides functions for manipulating\
+ Unicode strings and for manipulating C strings according to the Unicode\
+ standard.  This package contains documentation."
+
+HOMEPAGE = "http://www.gnu.org/software/libunistring/"
+SECTION = "devel"
+LICENSE = "GPLv3 & LGPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
+                    file://COPYING.LIB;md5=6a6a8e020838b23406c81b19c1d46df6"
+
+SRC_URI = "${GNU_MIRROR}/libunistring/libunistring-${PV}.tar.gz \
+           file://iconv-m4-remove-the-test-to-convert-euc-jp.patch \
+           file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
+"
+SRC_URI[md5sum] = "dfae4ff5583649ed24d8f368f1d0543b"
+SRC_URI[sha256sum] = "9625eec2507f4789ebb6fc48ebda98be0e0168979a2f68aa8b680bf8eeabbd47"
+
+inherit autotools texinfo
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch
new file mode 100644
index 0000000..5426fcc
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-Fix-build-on-mips-musl.patch
@@ -0,0 +1,90 @@
+From e623c7703945a5eb6c9a30586ec5e23b2f7396f6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 23 Mar 2016 06:08:59 +0000
+Subject: [PATCH] Fix build on mips/musl
+
+Do not include endian.h on musl it includes
+further headers which can not be compiled in __ASSEMBLER__
+ mode
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/coredump/_UCD_internal.h | 34 ++++++++++++++++++++++++++++++++++
+ src/mips/getcontext.S        |  3 +--
+ 2 files changed, 35 insertions(+), 2 deletions(-)
+
+diff --git a/src/coredump/_UCD_internal.h b/src/coredump/_UCD_internal.h
+index 3c95a2a..80acc15 100644
+--- a/src/coredump/_UCD_internal.h
++++ b/src/coredump/_UCD_internal.h
+@@ -34,6 +34,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+ #ifdef HAVE_SYS_PROCFS_H
+ #include <sys/procfs.h> /* struct elf_prstatus */
+ #endif
++#include <sys/reg.h>
+ #include <errno.h>
+ #include <string.h>
+ #include <limits.h>
+@@ -44,6 +45,39 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+ 
+ #include "libunwind_i.h"
+ 
++#ifndef __GLIBC__
++#define EF_REG0			6
++#define EF_REG1			7
++#define EF_REG2			8
++#define EF_REG3			9
++#define EF_REG4			10
++#define EF_REG5			11
++#define EF_REG6			12
++#define EF_REG7			13
++#define EF_REG8			14
++#define EF_REG9			15
++#define EF_REG10		16
++#define EF_REG11		17
++#define EF_REG12		18
++#define EF_REG13		19
++#define EF_REG14		20
++#define EF_REG15		21
++#define EF_REG16		22
++#define EF_REG17		23
++#define EF_REG18		24
++#define EF_REG19		25
++#define EF_REG20		26
++#define EF_REG21		27
++#define EF_REG22		28
++#define EF_REG23		29
++#define EF_REG24		30
++#define EF_REG25		31
++#define EF_REG28		34
++#define EF_REG29		35
++#define EF_REG30		36
++#define EF_REG31		37
++#endif
++
+ 
+ #if SIZEOF_OFF_T == 4
+ typedef uint32_t uoff_t;
+diff --git a/src/mips/getcontext.S b/src/mips/getcontext.S
+index d1dbd57..de9b681 100644
+--- a/src/mips/getcontext.S
++++ b/src/mips/getcontext.S
+@@ -24,12 +24,11 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+ 
+ #include "offsets.h"
+-#include <endian.h>
+ 
+ 	.text
+ 
+ #if _MIPS_SIM == _ABIO32
+-# if __BYTE_ORDER == __BIG_ENDIAN
++# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ #  define OFFSET 4
+ # else
+ #  define OFFSET 0
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
new file mode 100644
index 0000000..9aed419
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-backtrace-Use-only-with-glibc-and-uclibc.patch
@@ -0,0 +1,45 @@
+From 04437142399662b576bd55a85485c6dcc14d0812 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 31 Dec 2015 06:44:07 +0000
+Subject: [PATCH] backtrace: Use only with glibc and uclibc
+
+backtrace API is glibc specific not linux specific
+so make it behave so.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ tests/test-coredump-unwind.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test-coredump-unwind.c b/tests/test-coredump-unwind.c
+index 5254708..8767b42 100644
+--- a/tests/test-coredump-unwind.c
++++ b/tests/test-coredump-unwind.c
+@@ -57,7 +57,9 @@
+ #include <grp.h>
+ 
+ /* For SIGSEGV handler code */
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #include <sys/ucontext.h>
+ 
+ #include <libunwind-coredump.h>
+@@ -238,11 +240,11 @@ void handle_sigsegv(int sig, siginfo_t *info, void *ucontext)
+ 			ip);
+ 
+   {
++#ifdef __GLIBC__
+     /* glibc extension */
+     void *array[50];
+     int size;
+     size = backtrace(array, 50);
+-#ifdef __linux__
+     backtrace_symbols_fd(array, size, 2);
+ #endif
+   }
+-- 
+2.6.4
+
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-disable-tests.patch b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-disable-tests.patch
new file mode 100644
index 0000000..7309ffd
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-disable-tests.patch
@@ -0,0 +1,31 @@
+From b07435a90bd636ee718e2238fb46c74a6dd5e069 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Mar 2016 16:41:13 +0000
+Subject: [PATCH] disable tests
+
+Tests use getcontext() API which is
+not there on musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Inappropriate [MUSL-only]
+
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e24fe1e..15380e4 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -39,7 +39,7 @@ endif
+ 
+ nodist_include_HEADERS = include/libunwind-common.h
+ 
+-SUBDIRS = src tests doc
++SUBDIRS = src doc
+ 
+ noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h	\
+ 	include/compiler.h include/libunwind_i.h include/mempool.h	\
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-x86-Stub-out-x86_local_resume.patch b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-x86-Stub-out-x86_local_resume.patch
new file mode 100644
index 0000000..371013a
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/0001-x86-Stub-out-x86_local_resume.patch
@@ -0,0 +1,54 @@
+From f5df01655a4b76d4fe415747de581d94ac593e6a Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 22 Mar 2016 16:19:29 +0000
+Subject: [PATCH] x86: Stub out x86_local_resume()
+
+its purpose seems
+to be unwinding across signal handler boundaries, which cannot happen
+in correct programs anyway. Replacing the whole function with
+something like *(volatile char *)0=0; (i.e. crash), gets a working
+libunwind
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/x86/Gos-linux.c | 22 +---------------------
+ 1 file changed, 1 insertion(+), 21 deletions(-)
+
+diff --git a/src/x86/Gos-linux.c b/src/x86/Gos-linux.c
+index 31f83ba..3aaa34e 100644
+--- a/src/x86/Gos-linux.c
++++ b/src/x86/Gos-linux.c
+@@ -281,27 +281,7 @@ x86_r_uc_addr (ucontext_t *uc, int reg)
+ HIDDEN int
+ x86_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg)
+ {
+-  struct cursor *c = (struct cursor *) cursor;
+-  ucontext_t *uc = c->uc;
+-
+-  /* Ensure c->pi is up-to-date.  On x86, it's relatively common to be
+-     missing DWARF unwind info.  We don't want to fail in that case,
+-     because the frame-chain still would let us do a backtrace at
+-     least.  */
+-  dwarf_make_proc_info (&c->dwarf);
+-
+-  if (unlikely (c->sigcontext_format != X86_SCF_NONE))
+-    {
+-      struct sigcontext *sc = (struct sigcontext *) c->sigcontext_addr;
+-
+-      Debug (8, "resuming at ip=%x via sigreturn(%p)\n", c->dwarf.ip, sc);
+-      sigreturn (sc);
+-    }
+-  else
+-    {
+-      Debug (8, "resuming at ip=%x via setcontext()\n", c->dwarf.ip);
+-      setcontext (uc);
+-    }
++  *(volatile char *)0=0;
+   return -UNW_EINVAL;
+ }
+ #endif
+-- 
+1.8.3.1
+
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
index d552502..0dff2c8 100644
--- a/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind-1.1/Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch
@@ -17,6 +17,7 @@
 sure we link against libatomic_ops.
 
 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
 
 Upstream-Status: Pending
 Taken from:
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind.inc b/yocto-poky/meta/recipes-support/libunwind/libunwind.inc
index 6660af2..1c342d3 100644
--- a/yocto-poky/meta/recipes-support/libunwind/libunwind.inc
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind.inc
@@ -1,11 +1,10 @@
+SUMMARY = "Library for obtaining the call-chain of a program"
 DESCRIPTION = "a portable and efficient C programming interface (API) to determine the call-chain of a program"
 HOMEPAGE = "http://www.nongnu.org/libunwind"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3fced11d6df719b47505837a51c16ae5"
 DEPENDS += "libatomic-ops"
 
-SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
-
 inherit autotools
 
 PACKAGECONFIG ??= ""
@@ -25,7 +24,9 @@
 LDFLAGS_append_arm = " -fuse-ld=gold"
 LDFLAGS_append_aarch64 = " -fuse-ld=gold"
 
-LDFLAGS_append_powerpc = " -fuse-ld=gold"
-LDFLAGS_append_powerpc64 = " -fuse-ld=gold"
+LDFLAGS_append_powerpc = " -fuse-ld=gold -mbss-plt"
+LDFLAGS_append_powerpc64 = " -fuse-ld=gold -mbss-plt"
+
+SECURITY_LDFLAGS_append_libc-musl = " -lssp_nonshared -lssp"
 
 BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb b/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb
index aa62bcc..aff8409 100644
--- a/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb
+++ b/yocto-poky/meta/recipes-support/libunwind/libunwind_1.1.bb
@@ -1,14 +1,19 @@
 require libunwind.inc
 
-SRC_URI += "\
-    file://Support-building-with-older-compilers.patch \
-    file://AArch64-port.patch \
-    file://Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch \
-    file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \
-    file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \
-    file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
+SRC_URI = "${SAVANNAH_NONGNU_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
+           file://Support-building-with-older-compilers.patch \
+           file://AArch64-port.patch \
+           file://Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch \
+           file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \
+           file://0001-Invalid-dwarf-opcodes-can-cause-references-beyond-th.patch \
+           file://Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch \
+           file://0001-backtrace-Use-only-with-glibc-and-uclibc.patch \
 "
-
+SRC_URI_append_libc-musl = "\
+           file://0001-x86-Stub-out-x86_local_resume.patch \
+           file://0001-disable-tests.patch \
+           file://0001-Fix-build-on-mips-musl.patch \
+"
 SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
 SRC_URI[sha256sum] = "9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a"
 
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch b/yocto-poky/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch
new file mode 100644
index 0000000..690872b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liburcu/liburcu/0001-Support-for-NIOS2-architecture.patch
@@ -0,0 +1,144 @@
+From add566b913e1b5cd4974a2167157dc08d8245ab0 Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Tue, 9 Feb 2016 01:52:26 +0100
+Subject: [PATCH] Support for NIOS2 architecture
+
+Add support for the Altera NIOS2 CPU archirecture. The atomic operations
+are handled by the GCC. The memory barriers on this systems are entirely
+trivial too, since the CPU does not support SMP at all.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Backport [ http://git.lttng.org/?p=userspace-rcu.git;a=commit;h=859050b3088aa3f0cb59d7f51ce24b9a0f18faa5 ]
+---
+ LICENSE              |  1 +
+ README.md            |  1 +
+ configure.ac         |  1 +
+ urcu/arch/nios2.h    | 40 ++++++++++++++++++++++++++++++++++++++++
+ urcu/uatomic/nios2.h | 32 ++++++++++++++++++++++++++++++++
+ 5 files changed, 75 insertions(+)
+ create mode 100644 urcu/arch/nios2.h
+ create mode 100644 urcu/uatomic/nios2.h
+
+diff --git a/LICENSE b/LICENSE
+index 3147094..a06fdcc 100644
+--- a/LICENSE
++++ b/LICENSE
+@@ -45,6 +45,7 @@ compiler.h
+ arch/s390.h
+ uatomic/alpha.h
+ uatomic/mips.h
++uatomic/nios2.h
+ uatomic/s390.h
+ system.h
+ 
+diff --git a/README.md b/README.md
+index f6b290f..6fe9c1e 100644
+--- a/README.md
++++ b/README.md
+@@ -43,6 +43,7 @@ Currently, the following architectures are supported:
+   - S390, S390x
+   - ARM 32/64
+   - MIPS
++  - NIOS2
+   - Alpha
+   - ia64
+   - Sparcv9 32/64
+diff --git a/configure.ac b/configure.ac
+index 39a7777..71a7d71 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -124,6 +124,7 @@ AS_CASE([$host_cpu],
+ 	[arm*], [ARCHTYPE="arm"],
+ 	[aarch64], [ARCHTYPE="aarch64"],
+ 	[mips*], [ARCHTYPE="mips"],
++	[nios2*], [ARCHTYPE="nios2"],
+ 	[tile*], [ARCHTYPE="tile"],
+ 	[hppa*], [ARCHTYPE="hppa"],
+ 	[ARCHTYPE="unknown"]
+diff --git a/urcu/arch/nios2.h b/urcu/arch/nios2.h
+new file mode 100644
+index 0000000..030d1bc
+--- /dev/null
++++ b/urcu/arch/nios2.h
+@@ -0,0 +1,40 @@
++#ifndef _URCU_ARCH_NIOS2_H
++#define _URCU_ARCH_NIOS2_H
++
++/*
++ * arch_nios2.h: trivial definitions for the NIOS2 architecture.
++ *
++ * Copyright (c) 2016 Marek Vasut <marex@denx.de>
++ *
++ * This library is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU Lesser General Public
++ * License as published by the Free Software Foundation; either
++ * version 2.1 of the License, or (at your option) any later version.
++ *
++ * This library is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ * Lesser General Public License for more details.
++ *
++ * You should have received a copy of the GNU Lesser General Public
++ * License along with this library; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#include <urcu/compiler.h>
++#include <urcu/config.h>
++#include <urcu/syscall-compat.h>
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++#define cmm_mb()	cmm_barrier()
++
++#ifdef __cplusplus
++}
++#endif
++
++#include <urcu/arch/generic.h>
++
++#endif /* _URCU_ARCH_NIOS2_H */
+diff --git a/urcu/uatomic/nios2.h b/urcu/uatomic/nios2.h
+new file mode 100644
+index 0000000..5b3c303
+--- /dev/null
++++ b/urcu/uatomic/nios2.h
+@@ -0,0 +1,32 @@
++#ifndef _URCU_UATOMIC_ARCH_NIOS2_H
++#define _URCU_UATOMIC_ARCH_NIOS2_H
++
++/*
++ * Atomic exchange operations for the NIOS2 architecture. Let GCC do it.
++ *
++ * Copyright (c) 2016 Marek Vasut <marex@denx.de>
++ *
++ * Permission is hereby granted, free of charge, to any person obtaining a copy
++ * of this software and associated documentation files (the "Software"), to
++ * deal in the Software without restriction, including without limitation the
++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
++ * sell copies of the Software, and to permit persons to whom the Software is
++ * furnished to do so, subject to the following conditions:
++ *
++ * The above copyright notice and this permission notice shall be included in
++ * all copies or substantial portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
++ * IN THE SOFTWARE.
++ */
++
++#include <urcu/compiler.h>
++#include <urcu/system.h>
++#include <urcu/uatomic/generic.h>
++
++#endif /* _URCU_UATOMIC_ARCH_NIOS2_H */
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu/0001-uatomic-Specify-complete-types-for-atomic-function-c.patch b/yocto-poky/meta/recipes-support/liburcu/liburcu/0001-uatomic-Specify-complete-types-for-atomic-function-c.patch
deleted file mode 100644
index 5ad0bbd..0000000
--- a/yocto-poky/meta/recipes-support/liburcu/liburcu/0001-uatomic-Specify-complete-types-for-atomic-function-c.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-From 6af790818d074c103c4797f1ce764896f183e028 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 22 Aug 2015 21:35:03 -0700
-Subject: [PATCH] uatomic: Specify complete types for atomic function calls
-
-This was unearthed by clang compiler where it complained about parameter
-mismatch, gcc doesnt notice this
-
-urcu/uatomic/generic.h:190:10: error: address argument to atomic builtin
-must be a pointer to integer or pointer ('void *' invalid)
-                return __sync_add_and_fetch_4(addr, val);
-
-Fixed all instances thusly
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Submitted
-
- urcu/uatomic/generic.h | 40 ++++++++++++++++++++--------------------
- 1 file changed, 20 insertions(+), 20 deletions(-)
-
-diff --git a/urcu/uatomic/generic.h b/urcu/uatomic/generic.h
-index 37f59cc..0046ffd 100644
---- a/urcu/uatomic/generic.h
-+++ b/urcu/uatomic/generic.h
-@@ -65,17 +65,17 @@ unsigned long _uatomic_cmpxchg(void *addr, unsigned long old,
- 	switch (len) {
- #ifdef UATOMIC_HAS_ATOMIC_BYTE
- 	case 1:
--		return __sync_val_compare_and_swap_1(addr, old, _new);
-+		return __sync_val_compare_and_swap_1((unsigned char *)addr, old, _new);
- #endif
- #ifdef UATOMIC_HAS_ATOMIC_SHORT
- 	case 2:
--		return __sync_val_compare_and_swap_2(addr, old, _new);
-+		return __sync_val_compare_and_swap_2((unsigned short int *)addr, old, _new);
- #endif
- 	case 4:
--		return __sync_val_compare_and_swap_4(addr, old, _new);
-+		return __sync_val_compare_and_swap_4((unsigned int *)addr, old, _new);
- #if (CAA_BITS_PER_LONG == 64)
- 	case 8:
--		return __sync_val_compare_and_swap_8(addr, old, _new);
-+		return __sync_val_compare_and_swap_8((unsigned long *)addr, old, _new);
- #endif
- 	}
- 	_uatomic_link_error();
-@@ -100,20 +100,20 @@ void _uatomic_and(void *addr, unsigned long val,
- 	switch (len) {
- #ifdef UATOMIC_HAS_ATOMIC_BYTE
- 	case 1:
--		__sync_and_and_fetch_1(addr, val);
-+		__sync_and_and_fetch_1((unsigned char *)addr, val);
- 		return;
- #endif
- #ifdef UATOMIC_HAS_ATOMIC_SHORT
- 	case 2:
--		__sync_and_and_fetch_2(addr, val);
-+		__sync_and_and_fetch_2((unsigned short int *)addr, val);
- 		return;
- #endif
- 	case 4:
--		__sync_and_and_fetch_4(addr, val);
-+		__sync_and_and_fetch_4((unsigned int *)addr, val);
- 		return;
- #if (CAA_BITS_PER_LONG == 64)
- 	case 8:
--		__sync_and_and_fetch_8(addr, val);
-+		__sync_and_and_fetch_8((unsigned long *)addr, val);
- 		return;
- #endif
- 	}
-@@ -139,20 +139,20 @@ void _uatomic_or(void *addr, unsigned long val,
- 	switch (len) {
- #ifdef UATOMIC_HAS_ATOMIC_BYTE
- 	case 1:
--		__sync_or_and_fetch_1(addr, val);
-+		__sync_or_and_fetch_1((unsigned char *)addr, val);
- 		return;
- #endif
- #ifdef UATOMIC_HAS_ATOMIC_SHORT
- 	case 2:
--		__sync_or_and_fetch_2(addr, val);
-+		__sync_or_and_fetch_2((unsigned short int *)addr, val);
- 		return;
- #endif
- 	case 4:
--		__sync_or_and_fetch_4(addr, val);
-+		__sync_or_and_fetch_4((unsigned int *)addr, val);
- 		return;
- #if (CAA_BITS_PER_LONG == 64)
- 	case 8:
--		__sync_or_and_fetch_8(addr, val);
-+		__sync_or_and_fetch_8((unsigned long *)addr, val);
- 		return;
- #endif
- 	}
-@@ -180,17 +180,17 @@ unsigned long _uatomic_add_return(void *addr, unsigned long val,
- 	switch (len) {
- #ifdef UATOMIC_HAS_ATOMIC_BYTE
- 	case 1:
--		return __sync_add_and_fetch_1(addr, val);
-+		return __sync_add_and_fetch_1((unsigned char *)addr, val);
- #endif
- #ifdef UATOMIC_HAS_ATOMIC_SHORT
- 	case 2:
--		return __sync_add_and_fetch_2(addr, val);
-+		return __sync_add_and_fetch_2((unsigned short int *)addr, val);
- #endif
- 	case 4:
--		return __sync_add_and_fetch_4(addr, val);
-+		return __sync_add_and_fetch_4((unsigned int *)addr, val);
- #if (CAA_BITS_PER_LONG == 64)
- 	case 8:
--		return __sync_add_and_fetch_8(addr, val);
-+		return __sync_add_and_fetch_8((unsigned long *)addr, val);
- #endif
- 	}
- 	_uatomic_link_error();
-@@ -218,7 +218,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
- 
- 		do {
- 			old = uatomic_read((unsigned char *)addr);
--		} while (!__sync_bool_compare_and_swap_1(addr, old, val));
-+		} while (!__sync_bool_compare_and_swap_1((unsigned char *)addr, old, val));
- 
- 		return old;
- 	}
-@@ -230,7 +230,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
- 
- 		do {
- 			old = uatomic_read((unsigned short *)addr);
--		} while (!__sync_bool_compare_and_swap_2(addr, old, val));
-+		} while (!__sync_bool_compare_and_swap_2((unsigned short int *)addr, old, val));
- 
- 		return old;
- 	}
-@@ -241,7 +241,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
- 
- 		do {
- 			old = uatomic_read((unsigned int *)addr);
--		} while (!__sync_bool_compare_and_swap_4(addr, old, val));
-+		} while (!__sync_bool_compare_and_swap_4((unsigned int *)addr, old, val));
- 
- 		return old;
- 	}
-@@ -252,7 +252,7 @@ unsigned long _uatomic_exchange(void *addr, unsigned long val, int len)
- 
- 		do {
- 			old = uatomic_read((unsigned long *)addr);
--		} while (!__sync_bool_compare_and_swap_8(addr, old, val));
-+		} while (!__sync_bool_compare_and_swap_8((unsigned long *)addr, old, val));
- 
- 		return old;
- 	}
--- 
-2.1.4
-
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu/0002-Support-for-aarch64_be.patch b/yocto-poky/meta/recipes-support/liburcu/liburcu/0002-Support-for-aarch64_be.patch
new file mode 100644
index 0000000..a10ccd7
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liburcu/liburcu/0002-Support-for-aarch64_be.patch
@@ -0,0 +1,19 @@
+liburcu: add support for aarch64_be
+
+Upstream-Status: Pending
+
+Signed-off-by: Tudor Florea <tudor.florea@enea.com>
+
+diff --git a/configure.ac b/configure.ac
+index 8ebfa8b..fe1c55d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -121,7 +121,7 @@ AS_CASE([$host_cpu],
+ 	[alpha*], [ARCHTYPE="alpha"],
+ 	[ia64], [ARCHTYPE="ia64"],
+ 	[arm*], [ARCHTYPE="arm"],
+-	[aarch64], [ARCHTYPE="aarch64"],
++	[aarch64*], [ARCHTYPE="aarch64"],
+ 	[mips*], [ARCHTYPE="mips"],
+ 	[nios2*], [ARCHTYPE="nios2"],
+ 	[tile*], [ARCHTYPE="tile"],
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch b/yocto-poky/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch
deleted file mode 100644
index 535a738..0000000
--- a/yocto-poky/meta/recipes-support/liburcu/liburcu/Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 7b3df100346128d780f218b881d563d1fd12e310 Mon Sep 17 00:00:00 2001
-From: Jonathan Liu <net147@gmail.com>
-Date: Mon, 20 Oct 2014 13:46:10 +1100
-Subject: [PATCH] Revert "Blacklist ARM gcc 4.8.0, 4.8.1, 4.8.2"
-
-This reverts commit 4b79310aa3d408ba30fee02cc497a68072d38a99.
-OE-Core is using a patched GCC 4.8.2 which is able to compile liburcu
-properly.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Jonathan Liu <net147@gmail.com>
----
- urcu/compiler.h | 19 -------------------
- 1 file changed, 19 deletions(-)
-
-diff --git a/urcu/compiler.h b/urcu/compiler.h
-index 1e30903..19534f0 100644
---- a/urcu/compiler.h
-+++ b/urcu/compiler.h
-@@ -108,23 +108,4 @@
- 
- #define CAA_ARRAY_SIZE(x)	(sizeof(x) / sizeof((x)[0]))
- 
--/*
-- * Don't allow compiling with buggy compiler.
-- */
--
--#ifdef __GNUC__
--# define URCU_GCC_VERSION	(__GNUC__ * 10000 \
--				+ __GNUC_MINOR__ * 100 \
--				+ __GNUC_PATCHLEVEL__)
--
--/*
-- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854
-- */
--# ifdef __ARMEL__
--#  if URCU_GCC_VERSION >= 40800 && URCU_GCC_VERSION <= 40802
--#   error Your gcc version produces clobbered frame accesses
--#  endif
--# endif
--#endif
--
- #endif /* _URCU_COMPILER_H */
--- 
-2.1.2
-
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu/aarch64.patch b/yocto-poky/meta/recipes-support/liburcu/liburcu/aarch64.patch
deleted file mode 100644
index c6cc8c2..0000000
--- a/yocto-poky/meta/recipes-support/liburcu/liburcu/aarch64.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-libucru: recognize aarch64
-
-Make the same as "arm" internally.
-
-Upstream-Status: Pending
-
-Signed-off-by: joe.slater@windriver.com
-
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -77,6 +77,7 @@ AS_CASE([$host_cpu],
- 	[alpha*], [ARCHTYPE="alpha"],
- 	[ia64], [ARCHTYPE="gcc"],
- 	[arm*], [ARCHTYPE="arm"],
-+	[aarch64], [ARCHTYPE="arm"],
- 	[mips*], [ARCHTYPE="mips"],
- 	[tile*], [ARCHTYPE="gcc"],
- 	[ARCHTYPE="unknown"]
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu_0.8.7.bb b/yocto-poky/meta/recipes-support/liburcu/liburcu_0.8.7.bb
deleted file mode 100644
index a7f4f51..0000000
--- a/yocto-poky/meta/recipes-support/liburcu/liburcu_0.8.7.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-SUMMARY = "Userspace RCU (read-copy-update) library"
-HOMEPAGE = "http://lttng.org/urcu"
-BUGTRACKER = "http://lttng.org/project/issues"
-
-LICENSE = "LGPLv2.1+ & MIT-style"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0f060c30a27922ce9c0d557a639b4fa3 \
-                    file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
-                    file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=220552f72c55b102f2ee35929734ef42"
-
-SRC_URI = "http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
-           file://Revert-Blacklist-ARM-gcc-4.8.0-4.8.1-4.8.2.patch \
-           file://aarch64.patch \
-           file://0001-uatomic-Specify-complete-types-for-atomic-function-c.patch \
-          "
-
-SRC_URI[md5sum] = "7a6ee17871d31226db3f618e28351d22"
-SRC_URI[sha256sum] = "b523f22c4726ca6bb77a77d258e76d8c33c89724433bd65313024b98e55c4295"
-
-S = "${WORKDIR}/userspace-rcu-${PV}"
-CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
-inherit autotools
diff --git a/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.1.bb b/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.1.bb
new file mode 100644
index 0000000..aadc32f
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/liburcu/liburcu_0.9.1.bb
@@ -0,0 +1,21 @@
+SUMMARY = "Userspace RCU (read-copy-update) library"
+HOMEPAGE = "http://lttng.org/urcu"
+BUGTRACKER = "http://lttng.org/project/issues"
+
+LICENSE = "LGPLv2.1+ & MIT-style"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=e548d28737289d75a8f1e01ba2fd7825 \
+                    file://urcu.h;beginline=4;endline=32;md5=4de0d68d3a997643715036d2209ae1d9 \
+                    file://urcu/uatomic/x86.h;beginline=4;endline=21;md5=58e50bbd8a2f073bb5500e6554af0d0b"
+
+SRC_URI = " \
+	http://lttng.org/files/urcu/userspace-rcu-${PV}.tar.bz2 \
+	file://0001-Support-for-NIOS2-architecture.patch \
+        file://0002-Support-for-aarch64_be.patch \
+	"
+
+SRC_URI[md5sum] = "124eaeea06863271c0bdf2a0cc1d8e4b"
+SRC_URI[sha256sum] = "f8d278e9d95bec97c9ba954fc4c3fb584936bc0010713a8fe358b916bafd8715"
+
+S = "${WORKDIR}/userspace-rcu-${PV}"
+CFLAGS_append_libc-uclibc = " -D_GNU_SOURCE"
+inherit autotools
diff --git a/yocto-poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb b/yocto-poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
index 646872c..1ddbe23 100644
--- a/yocto-poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
+++ b/yocto-poky/meta/recipes-support/libusb/libusb-compat_0.1.5.bb
@@ -25,6 +25,9 @@
 SRC_URI[md5sum] = "2780b6a758a1e2c2943bdbf7faf740e4"
 SRC_URI[sha256sum] = "404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a"
 
+UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/"
+UPSTREAM_CHECK_REGEX = "/libusb-compat-(?P<pver>(\d+[\.\-_]*)+)/$"
+
 BINCONFIG = "${bindir}/libusb-config"
 
 inherit autotools pkgconfig binconfig-disabled lib_package
diff --git a/yocto-poky/meta/recipes-support/libusb/libusb1/no-dll.patch b/yocto-poky/meta/recipes-support/libusb/libusb1/no-dll.patch
new file mode 100644
index 0000000..6e6bb83
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libusb/libusb1/no-dll.patch
@@ -0,0 +1,19 @@
+As all invokes all-recursive which uses sub-makes to invoke all-am, the
+resulting makefile wants to build libusb-1.0.la twice. In non-parallel builds
+the second attempt is skipped as the target already exists, but in highly
+parallel builds it's likely that two makes will be building libusb-1.0.la at the
+same time.
+
+Solve this by removing the explicit all target, which as libusb-1.0.dll isn't
+built under Linux is redundant anyway.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/libusb/Makefile.am b/libusb/Makefile.am
+index 0cab0a0..c880213 100644
+--- a/libusb/Makefile.am
++++ b/libusb/Makefile.am
+@@ -1,2 +0,0 @@
+-all: libusb-1.0.la libusb-1.0.dll
+-
diff --git a/yocto-poky/meta/recipes-support/libusb/libusb1_1.0.19.bb b/yocto-poky/meta/recipes-support/libusb/libusb1_1.0.19.bb
deleted file mode 100644
index a20e1fc..0000000
--- a/yocto-poky/meta/recipes-support/libusb/libusb1_1.0.19.bb
+++ /dev/null
@@ -1,34 +0,0 @@
-SUMMARY = "Userspace library to access USB (version 1.0)"
-HOMEPAGE = "http://libusb.sf.net"
-BUGTRACKER = "http://www.libusb.org/report"
-SECTION = "libs"
-
-LICENSE = "LGPLv2.1+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
-
-BBCLASSEXTEND = "native nativesdk"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \
-          "
-
-SRC_URI[md5sum] = "f9e2bb5879968467e5ca756cb4e1fa7e"
-SRC_URI[sha256sum] = "6c502c816002f90d4f76050a6429c3a7e0d84204222cbff2dce95dd773ba6840"
-
-S = "${WORKDIR}/libusb-${PV}"
-
-inherit autotools pkgconfig
-
-# Don't configure udev by default since it will cause a circular
-# dependecy with udev package, which depends on libusb
-EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev"
-
-do_install_append() {
-	install -d ${D}${libdir}
-	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
-		mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
-	fi
-}
-
-FILES_${PN} += "${base_libdir}/*.so.*"
-
-FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la"
diff --git a/yocto-poky/meta/recipes-support/libusb/libusb1_1.0.20.bb b/yocto-poky/meta/recipes-support/libusb/libusb1_1.0.20.bb
new file mode 100644
index 0000000..4cad2d4
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/libusb/libusb1_1.0.20.bb
@@ -0,0 +1,35 @@
+SUMMARY = "Userspace library to access USB (version 1.0)"
+HOMEPAGE = "http://libusb.sf.net"
+BUGTRACKER = "http://www.libusb.org/report"
+SECTION = "libs"
+
+LICENSE = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
+
+BBCLASSEXTEND = "native nativesdk"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/libusb/libusb-${PV}.tar.bz2 \
+           file://no-dll.patch \
+          "
+
+SRC_URI[md5sum] = "1d4eb194eaaa2bcfbba28102768c7dbf"
+SRC_URI[sha256sum] = "cb057190ba0a961768224e4dc6883104c6f945b2bf2ef90d7da39e7c1834f7ff"
+
+S = "${WORKDIR}/libusb-${PV}"
+
+inherit autotools pkgconfig
+
+# Don't configure udev by default since it will cause a circular
+# dependecy with udev package, which depends on libusb
+EXTRA_OECONF = "--libdir=${base_libdir} --disable-udev"
+
+do_install_append() {
+	install -d ${D}${libdir}
+	if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
+		mv ${D}${base_libdir}/pkgconfig ${D}${libdir}
+	fi
+}
+
+FILES_${PN} += "${base_libdir}/*.so.*"
+
+FILES_${PN}-dev += "${base_libdir}/*.so ${base_libdir}/*.la"
diff --git a/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch b/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch
index e4d09c2..f4113ef 100644
--- a/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch
+++ b/yocto-poky/meta/recipes-support/libxslt/libxslt/CVE-2015-7995.patch
@@ -8,6 +8,7 @@
 its namespace
 
 Upstream-Status: Backport
+CVE: CVE-2015-7995
 
 https://git.gnome.org/browse/libxslt/commit/?id=7ca19df892ca22d9314e95d59ce2abdeff46b617
 
diff --git a/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb b/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb
index 87fabec..23ac599 100644
--- a/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb
+++ b/yocto-poky/meta/recipes-support/libxslt/libxslt_1.1.28.bb
@@ -8,13 +8,16 @@
 SECTION = "libs"
 DEPENDS = "libxml2"
 
-SRC_URI = "ftp://xmlsoft.org/libxslt//libxslt-${PV}.tar.gz \
+SRC_URI = "ftp://xmlsoft.org/libxslt/libxslt-${PV}.tar.gz \
            file://pkgconfig_fix.patch \
            file://pkgconfig.patch \
            file://CVE-2015-7995.patch"
 
 SRC_URI[md5sum] = "9667bf6f9310b957254fdcf6596600b7"
 SRC_URI[sha256sum] = "5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c"
+
+UPSTREAM_CHECK_REGEX = "libxslt-(?P<pver>\d+(\.\d+)+)\.tar"
+
 S = "${WORKDIR}/libxslt-${PV}"
 
 BINCONFIG = "${bindir}/xslt-config"
diff --git a/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch b/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch
index 3c4a00e..61fa7e5 100644
--- a/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch
+++ b/yocto-poky/meta/recipes-support/libyaml/files/libyaml-CVE-2014-9130.patch
@@ -10,6 +10,7 @@
 https://bitbucket.org/xi/libyaml/commits/2b9156756423e967cfd09a61d125d883fca6f4f2
 
 Upstream-Status: Backport
+CVE: CVE-2014-9130
 
 Signed-off-by: Yue Tao <yue.tao@windriver.com>
 
diff --git a/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb b/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb
index af19b54..ee8a238 100644
--- a/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb
+++ b/yocto-poky/meta/recipes-support/mpfr/mpfr_3.1.3.bb
@@ -12,6 +12,8 @@
 SRC_URI[md5sum] = "6969398cd2fbc56a6af570b5273c56a9"
 SRC_URI[sha256sum] = "6835a08bd992c8257641791e9a6a2b35b02336c8de26d0a8577953747e514a16"
 
+UPSTREAM_CHECK_URI = "http://www.mpfr.org/mpfr-current/"
+
 S = "${WORKDIR}/mpfr-${PV}"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/neon/neon_0.30.1.bb b/yocto-poky/meta/recipes-support/neon/neon_0.30.1.bb
index 0244314..b6cfd50 100644
--- a/yocto-poky/meta/recipes-support/neon/neon_0.30.1.bb
+++ b/yocto-poky/meta/recipes-support/neon/neon_0.30.1.bb
@@ -4,24 +4,35 @@
 LICENSE = "LGPLv2+"
 LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a \
                     file://src/ne_utils.h;beginline=1;endline=20;md5=2caca609538eddaa6f6adf120a218037"
-DEPENDS = "zlib libxml2 expat time gnutls libproxy"
-DEPENDS_class-native = "zlib-native libxml2-native expat-native gnutls-native"
-
-BBCLASSEXTEND = "native"
 
 SRC_URI = "http://www.webdav.org/${BPN}/${BPN}-${PV}.tar.gz \
            file://pkgconfig.patch \
            file://gnutls_4.3_fixup.patch"
+
 SRC_URI[md5sum] = "231adebe5c2f78fded3e3df6e958878e"
 SRC_URI[sha256sum] = "00c626c0dc18d094ab374dbd9a354915bfe4776433289386ed489c2ec0845cdd"
 
-BINCONFIG = "${bindir}/neon-config"
-
 inherit autotools binconfig-disabled lib_package pkgconfig
 
-EXTRA_OECONF = "--with-ssl=gnutls --with-libxml2 --with-expat --enable-shared"
-EXTRA_OECONF += "--without-gssapi"
+# Enable gnutls or openssl, not both
+PACKAGECONFIG ?= "expat gnutls libproxy webdav zlib"
+PACKAGECONFIG_class-native = "expat gnutls webdav zlib"
+
+PACKAGECONFIG[expat] = "--with-expat,--without-expat,expat"
+PACKAGECONFIG[gnutls] = "--with-ssl=gnutls,,gnutls"
+PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
+PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy"
+PACKAGECONFIG[libxml2] = "--with-libxml2,--without-libxml2,libxml2"
+PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
+PACKAGECONFIG[webdav] = "--enable-webdav,--disable-webdav,"
+PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
+
+EXTRA_OECONF += "--enable-shared"
 
 do_compile_append() {
 	oe_runmake -C test
 }
+
+BINCONFIG = "${bindir}/neon-config"
+
+BBCLASSEXTEND = "native"
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch b/yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch
new file mode 100644
index 0000000..a956f42
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8803_8805.patch
@@ -0,0 +1,71 @@
+Upstream-Status: Backport
+https://git.lysator.liu.se/nettle/nettle/commit/c71d2c9d20eeebb985e3872e4550137209e3ce4d
+
+CVE: CVE-2015-8803
+CVE: CVE-2015-8805
+
+Same fix for both.
+
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-2.7.1/ecc-256.c
+===================================================================
+--- nettle-2.7.1.orig/ecc-256.c
++++ nettle-2.7.1/ecc-256.c
+@@ -96,9 +96,19 @@ ecc_256_modp (const struct ecc_curve *ec
+       q2 += t + (q1 < t);
+ 
+       assert (q2 < 2);
++      /*
++   n-1 n-2 n-3 n-4
++        +---+---+---+---+
++        | u1| u0| u low |
++        +---+---+---+---+
++          - | q1(2^96-1)|
++            +-------+---+
++            |q2(2^.)|
++            +-------+
+ 
+-      /* We multiply by two low limbs of p, 2^96 - 1, so we could use
+-	 shifts rather than mul. */
++   We multiply by two low limbs of p, 2^96 - 1, so we could use
++   shifts rather than mul.
++      */
+       t = mpn_submul_1 (rp + n - 4, ecc->p, 2, q1);
+       t += cnd_sub_n (q2, rp + n - 3, ecc->p, 1);
+       t += (-q2) & 0xffffffff;
+@@ -108,7 +118,10 @@ ecc_256_modp (const struct ecc_curve *ec
+       u0 -= t;
+       t = (u1 < cy);
+       u1 -= cy;
+-      u1 += cnd_add_n (t, rp + n - 4, ecc->p, 3);
++
++      cy = cnd_add_n (t, rp + n - 4, ecc->p, 2);
++      u0 += cy;
++      u1 += (u0 < cy);
+       u1 -= (-t) & 0xffffffff;
+     }
+   rp[2] = u0;
+@@ -195,7 +208,7 @@ ecc_256_modq (const struct ecc_curve *ec
+ 
+       /* Conditional add of p */
+       u1 += t;
+-      u2 += (t<<32) + (u0 < t);
++      u2 += (t<<32) + (u1 < t);
+ 
+       t = cnd_add_n (t, rp + n - 4, ecc->q, 2);
+       u1 += t;
+Index: nettle-2.7.1/ChangeLog
+===================================================================
+--- nettle-2.7.1.orig/ChangeLog
++++ nettle-2.7.1/ChangeLog
+@@ -1,3 +1,9 @@
++2015-12-10  Niels Möller  <nisse@lysator.liu.se>
++
++   * ecc-256.c (ecc_256_modp): Fixed carry propagation bug. Problem
++   reported by Hanno Böck.
++   (ecc_256_modq): Fixed another carry propagation bug.
++
+ 2013-05-28  Niels Möller  <nisse@lysator.liu.se>
+ 
+ 	* Released nettle-2.7.1.
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8804.patch b/yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8804.patch
new file mode 100644
index 0000000..73723a9
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nettle/nettle-2.7.1/CVE-2015-8804.patch
@@ -0,0 +1,272 @@
+Upstream-Status: Backport
+ https://git.lysator.liu.se/nettle/nettle/commit/fa269b6ad06dd13c901dbd84a12e52b918a09cd7
+
+CVE: CVE-2015-8804
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+Index: nettle-2.7.1/ChangeLog
+===================================================================
+--- nettle-2.7.1.orig/ChangeLog
++++ nettle-2.7.1/ChangeLog
+@@ -1,3 +1,11 @@
++2015-12-15  Niels Möller  <nisse@lysator.liu.se>
++
++	* x86_64/ecc-384-modp.asm: Fixed carry propagation bug. Problem
++	reported by Hanno Böck. Simplified the folding to always use
++	non-negative carry, the old code attempted to add in a carry which
++	could be either positive or negative, but didn't get that case
++	right.
++
+ 2015-12-10  Niels Möller  <nisse@lysator.liu.se>
+ 
+    * ecc-256.c (ecc_256_modp): Fixed carry propagation bug. Problem
+Index: nettle-2.7.1/x86_64/ecc-384-modp.asm
+===================================================================
+--- nettle-2.7.1.orig/x86_64/ecc-384-modp.asm
++++ nettle-2.7.1/x86_64/ecc-384-modp.asm
+@@ -20,7 +20,7 @@ C MA 02111-1301, USA.
+ 	.file "ecc-384-modp.asm"
+ 
+ define(<RP>, <%rsi>)
+-define(<D4>, <%rax>)
++define(<D5>, <%rax>)
+ define(<T0>, <%rbx>)
+ define(<T1>, <%rcx>)
+ define(<T2>, <%rdx>)
+@@ -35,8 +35,8 @@ define(<H4>, <%r13>)
+ define(<H5>, <%r14>)
+ define(<C2>, <%r15>)
+ define(<C0>, H5)	C Overlap
+-define(<D0>, RP)	C Overlap
+-define(<TMP>, H4)	C Overlap
++define(<TMP>, RP)	C Overlap
++
+ 
+ PROLOGUE(nettle_ecc_384_modp)
+ 	W64_ENTRY(2, 0)
+@@ -48,34 +48,38 @@ PROLOGUE(nettle_ecc_384_modp)
+ 	push	%r14
+ 	push	%r15
+ 
+-	C First get top 2 limbs, which need folding twice
++	C First get top 2 limbs, which need folding twice.
++	C B^10 = B^6 + B^4 + 2^32 (B-1)B^4.
++	C We handle the terms as follow:
+ 	C
+-	C   H5 H4
+-	C     -H5
+-	C  ------
+-	C   H0 D4
++	C B^6: Folded immediatly.
+ 	C
+-	C Then shift right, (H1,H0,D4)  <--  (H0,D4) << 32
+-	C and add
++	C B^4: Delayed, added in in the next folding.
+ 	C
+-	C     H5 H4
+-	C     H1 H0
+-	C ----------
+-	C  C2 H1 H0
+-
+-	mov	80(RP), D4
+-	mov	88(RP), H0
+-	mov	D4, H4
+-	mov	H0, H5
+-	sub	H0, D4
+-	sbb	$0, H0
+-
+-	mov	D4, T2
+-	mov	H0, H1
+-	shl	$32, H0
+-	shr	$32, T2
++	C 2^32(B-1) B^4: Low half limb delayed until the next
++	C folding. Top 1.5 limbs subtracted and shifter now, resulting
++	C in 2.5 limbs. The low limb saved in D5, high 1.5 limbs added
++	C in.
++
++	mov	80(RP), H4
++	mov	88(RP), H5
++	C Shift right 32 bits, into H1, H0
++	mov	H4, H0
++	mov	H5, H1
++	mov	H5, D5
+ 	shr	$32, H1
+-	or	T2, H0
++	shl	$32, D5
++	shr	$32, H0
++	or	D5, H0
++
++	C	H1 H0
++	C       -  H1 H0
++	C       --------
++	C       H1 H0 D5
++	mov	H0, D5
++	neg	D5
++	sbb	H1, H0
++	sbb	$0, H1
+ 
+ 	xor	C2, C2
+ 	add	H4, H0
+@@ -114,118 +118,95 @@ PROLOGUE(nettle_ecc_384_modp)
+ 	adc	H3, T5
+ 	adc	$0, C0
+ 
+-	C   H3 H2 H1 H0  0
+-	C - H4 H3 H2 H1 H0
+-	C  ---------------
+-	C   H3 H2 H1 H0 D0
+-
+-	mov	XREG(D4), XREG(D4)
+-	mov	H0, D0
+-	neg	D0
+-	sbb	H1, H0
+-	sbb	H2, H1
+-	sbb	H3, H2
+-	sbb	H4, H3
+-	sbb	$0, D4
+-
+-	C Shift right. High bits are sign, to be added to C0.
+-	mov	D4, TMP
+-	sar	$32, TMP
+-	shl	$32, D4
+-	add	TMP, C0
+-
++	C Shift left, including low half of H4
+ 	mov	H3, TMP
++	shl	$32, H4
+ 	shr	$32, TMP
+-	shl	$32, H3
+-	or	TMP, D4
++	or	TMP, H4
+ 
+ 	mov	H2, TMP
++	shl	$32, H3
+ 	shr	$32, TMP
+-	shl	$32, H2
+ 	or	TMP, H3
+ 
+ 	mov	H1, TMP
++	shl	$32, H2
+ 	shr	$32, TMP
+-	shl	$32, H1
+ 	or	TMP, H2
+ 
+ 	mov	H0, TMP
++	shl	$32, H1
+ 	shr	$32, TMP
+-	shl	$32, H0
+ 	or	TMP, H1
+ 
+-	mov	D0, TMP
+-	shr	$32, TMP
+-	shl	$32, D0
+-	or	TMP, H0
++	shl	$32, H0
++
++	C   H4 H3 H2 H1 H0  0
++	C  -   H4 H3 H2 H1 H0
++	C  ---------------
++	C   H4 H3 H2 H1 H0 TMP
+ 
+-	add	D0, T0
++	mov	H0, TMP
++	neg	TMP
++	sbb	H1, H0
++	sbb	H2, H1
++	sbb	H3, H2
++	sbb	H4, H3
++	sbb	$0, H4
++
++	add	TMP, T0
+ 	adc	H0, T1
+ 	adc	H1, T2
+ 	adc	H2, T3
+ 	adc	H3, T4
+-	adc	D4, T5
++	adc	H4, T5
+ 	adc	$0, C0
+ 
+ 	C Remains to add in C2 and C0
+-	C                         C0  C0<<32  (-2^32+1)C0
+-	C    C2  C2<<32  (-2^32+1)C2
+-	C where C2 is always positive, while C0 may be -1.
++	C Set H1, H0 = (2^96 - 2^32 + 1) C0
+ 	mov	C0, H0
+ 	mov	C0, H1
+-	mov	C0, H2
+-	sar	$63, C0		C Get sign
+ 	shl	$32, H1
+-	sub	H1, H0		C Gives borrow iff C0 > 0
++	sub	H1, H0
+ 	sbb	$0, H1
+-	add	C0, H2
+ 
++	C Set H3, H2 = (2^96 - 2^32 + 1) C2
++	mov	C2, H2
++	mov	C2, H3
++	shl	$32, H3
++	sub	H3, H2
++	sbb	$0, H3
++	add	C0, H2		C No carry. Could use lea trick
++
++	xor	C0, C0
+ 	add	H0, T0
+ 	adc	H1, T1
+-	adc	$0, H2
+-	adc	$0, C0
+-
+-	C Set (H1 H0)  <-- C2 << 96 - C2 << 32 + 1
+-	mov	C2, H0
+-	mov	C2, H1
+-	shl	$32, H1
+-	sub	H1, H0
+-	sbb	$0, H1
+-
+-	add	H2, H0
+-	adc	C0, H1
+-	adc	C2, C0
+-	mov	C0, H2
+-	sar	$63, C0
+-	add	H0, T2
+-	adc	H1, T3
+-	adc	H2, T4
+-	adc	C0, T5
+-	sbb	C0, C0
++	adc	H2, T2
++	adc	H3, T3
++	adc	C2, T4
++	adc	D5, T5		C Value delayed from initial folding
++	adc	$0, C0		C Use sbb and switch sign?
+ 
+ 	C Final unlikely carry
+ 	mov	C0, H0
+ 	mov	C0, H1
+-	mov	C0, H2
+-	sar	$63, C0
+ 	shl	$32, H1
+ 	sub	H1, H0
+ 	sbb	$0, H1
+-	add	C0, H2
+ 
+ 	pop	RP
+ 
+-	sub	H0, T0
++	add	H0, T0
+ 	mov	T0, (RP)
+-	sbb	H1, T1
++	adc	H1, T1
+ 	mov	T1, 8(RP)
+-	sbb	H2, T2
++	adc	C0, T2
+ 	mov	T2, 16(RP)
+-	sbb	C0, T3
++	adc	$0, T3
+ 	mov	T3, 24(RP)
+-	sbb	C0, T4
++	adc	$0, T4
+ 	mov	T4, 32(RP)
+-	sbb	C0, T5
++	adc	$0, T5
+ 	mov	T5, 40(RP)
+ 
+ 	pop	%r15
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8803_8805.patch b/yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8803_8805.patch
deleted file mode 100644
index b4ff228..0000000
--- a/yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8803_8805.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Upstream-Status: Backport
-https://git.lysator.liu.se/nettle/nettle/commit/c71d2c9d20eeebb985e3872e4550137209e3ce4d
-
-CVE: CVE-2015-8803
-CVE: CVE-2015-8805
-
-Same fix for both.
-
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: nettle-3.1.1/ecc-256.c
-===================================================================
---- nettle-3.1.1.orig/ecc-256.c
-+++ nettle-3.1.1/ecc-256.c
-@@ -113,8 +113,19 @@ ecc_256_modp (const struct ecc_modulo *p
- 
-       assert (q2 < 2);
- 
--      /* We multiply by two low limbs of p, 2^96 - 1, so we could use
--	 shifts rather than mul. */
-+      /*
-+	 n-1 n-2 n-3 n-4
-+        +---+---+---+---+
-+        | u1| u0| u low |
-+        +---+---+---+---+
-+          - | q1(2^96-1)|
-+            +-------+---+
-+            |q2(2^.)|
-+            +-------+
-+
-+	 We multiply by two low limbs of p, 2^96 - 1, so we could use
-+	 shifts rather than mul.
-+      */
-       t = mpn_submul_1 (rp + n - 4, p->m, 2, q1);
-       t += cnd_sub_n (q2, rp + n - 3, p->m, 1);
-       t += (-q2) & 0xffffffff;
-@@ -124,7 +135,10 @@ ecc_256_modp (const struct ecc_modulo *p
-       u0 -= t;
-       t = (u1 < cy);
-       u1 -= cy;
--      u1 += cnd_add_n (t, rp + n - 4, p->m, 3);
-+
-+      cy = cnd_add_n (t, rp + n - 4, p->m, 2);
-+      u0 += cy;
-+      u1 += (u0 < cy);
-       u1 -= (-t) & 0xffffffff;
-     }
-   rp[2] = u0;
-@@ -211,7 +225,7 @@ ecc_256_modq (const struct ecc_modulo *q
- 
-       /* Conditional add of p */
-       u1 += t;
--      u2 += (t<<32) + (u0 < t);
-+      u2 += (t<<32) + (u1 < t);
- 
-       t = cnd_add_n (t, rp + n - 4, q->m, 2);
-       u1 += t;
-Index: nettle-3.1.1/ChangeLog
-===================================================================
---- nettle-3.1.1.orig/ChangeLog
-+++ nettle-3.1.1/ChangeLog
-@@ -1,3 +1,9 @@
-+2015-12-10  Niels Möller  <nisse@lysator.liu.se>
-+
-+   * ecc-256.c (ecc_256_modp): Fixed carry propagation bug. Problem
-+   reported by Hanno Böck.
-+   (ecc_256_modq): Fixed another carry propagation bug.
-+
- 2015-04-24  Niels Möller  <nisse@lysator.liu.se>
- 
- 	* Released nettle-3.1.1.
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8804.patch b/yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8804.patch
deleted file mode 100644
index 1d34db7..0000000
--- a/yocto-poky/meta/recipes-support/nettle/nettle-3.1.1/CVE-2015-8804.patch
+++ /dev/null
@@ -1,281 +0,0 @@
-Upstream-Status: Backport
- https://git.lysator.liu.se/nettle/nettle/commit/fa269b6ad06dd13c901dbd84a12e52b918a09cd7
-
-CVE: CVE-2015-8804
-Signed-off-by: Armin Kuster <akuster@mvista.com>
-
-Index: nettle-3.1.1/ChangeLog
-===================================================================
---- nettle-3.1.1.orig/ChangeLog
-+++ nettle-3.1.1/ChangeLog
-@@ -1,3 +1,11 @@
-+2015-12-15  Niels Möller  <nisse@lysator.liu.se>
-+
-+	* x86_64/ecc-384-modp.asm: Fixed carry propagation bug. Problem
-+	reported by Hanno Böck. Simplified the folding to always use
-+	non-negative carry, the old code attempted to add in a carry which
-+	could be either positive or negative, but didn't get that case
-+	right.
-+
- 2015-12-10  Niels Möller  <nisse@lysator.liu.se>
- 
-    * ecc-256.c (ecc_256_modp): Fixed carry propagation bug. Problem
-Index: nettle-3.1.1/x86_64/ecc-384-modp.asm
-===================================================================
---- nettle-3.1.1.orig/x86_64/ecc-384-modp.asm
-+++ nettle-3.1.1/x86_64/ecc-384-modp.asm
-@@ -1,7 +1,7 @@
- C x86_64/ecc-384-modp.asm
- 
- ifelse(<
--   Copyright (C) 2013 Niels Möller
-+   Copyright (C) 2013, 2015 Niels Möller
- 
-    This file is part of GNU Nettle.
- 
-@@ -33,7 +33,7 @@ ifelse(<
- 	.file "ecc-384-modp.asm"
- 
- define(<RP>, <%rsi>)
--define(<D4>, <%rax>)
-+define(<D5>, <%rax>)
- define(<T0>, <%rbx>)
- define(<T1>, <%rcx>)
- define(<T2>, <%rdx>)
-@@ -48,8 +48,8 @@ define(<H4>, <%r13>)
- define(<H5>, <%r14>)
- define(<C2>, <%r15>)
- define(<C0>, H5)	C Overlap
--define(<D0>, RP)	C Overlap
--define(<TMP>, H4)	C Overlap
-+define(<TMP>, RP)	C Overlap
-+
- 
- PROLOGUE(nettle_ecc_384_modp)
- 	W64_ENTRY(2, 0)
-@@ -61,34 +61,38 @@ PROLOGUE(nettle_ecc_384_modp)
- 	push	%r14
- 	push	%r15
- 
--	C First get top 2 limbs, which need folding twice
-+	C First get top 2 limbs, which need folding twice.
-+	C B^10 = B^6 + B^4 + 2^32 (B-1)B^4.
-+	C We handle the terms as follow:
- 	C
--	C   H5 H4
--	C     -H5
--	C  ------
--	C   H0 D4
-+	C B^6: Folded immediatly.
- 	C
--	C Then shift right, (H1,H0,D4)  <--  (H0,D4) << 32
--	C and add
-+	C B^4: Delayed, added in in the next folding.
- 	C
--	C     H5 H4
--	C     H1 H0
--	C ----------
--	C  C2 H1 H0
--
--	mov	80(RP), D4
--	mov	88(RP), H0
--	mov	D4, H4
--	mov	H0, H5
--	sub	H0, D4
--	sbb	$0, H0
--
--	mov	D4, T2
--	mov	H0, H1
--	shl	$32, H0
--	shr	$32, T2
-+	C 2^32(B-1) B^4: Low half limb delayed until the next
-+	C folding. Top 1.5 limbs subtracted and shifter now, resulting
-+	C in 2.5 limbs. The low limb saved in D5, high 1.5 limbs added
-+	C in.
-+
-+	mov	80(RP), H4
-+	mov	88(RP), H5
-+	C Shift right 32 bits, into H1, H0
-+	mov	H4, H0
-+	mov	H5, H1
-+	mov	H5, D5
- 	shr	$32, H1
--	or	T2, H0
-+	shl	$32, D5
-+	shr	$32, H0
-+	or	D5, H0
-+
-+	C	H1 H0
-+	C       -  H1 H0
-+	C       --------
-+	C       H1 H0 D5
-+	mov	H0, D5
-+	neg	D5
-+	sbb	H1, H0
-+	sbb	$0, H1
- 
- 	xor	C2, C2
- 	add	H4, H0
-@@ -127,118 +131,95 @@ PROLOGUE(nettle_ecc_384_modp)
- 	adc	H3, T5
- 	adc	$0, C0
- 
--	C   H3 H2 H1 H0  0
--	C - H4 H3 H2 H1 H0
--	C  ---------------
--	C   H3 H2 H1 H0 D0
--
--	mov	XREG(D4), XREG(D4)
--	mov	H0, D0
--	neg	D0
--	sbb	H1, H0
--	sbb	H2, H1
--	sbb	H3, H2
--	sbb	H4, H3
--	sbb	$0, D4
--
--	C Shift right. High bits are sign, to be added to C0.
--	mov	D4, TMP
--	sar	$32, TMP
--	shl	$32, D4
--	add	TMP, C0
--
-+	C Shift left, including low half of H4
- 	mov	H3, TMP
-+	shl	$32, H4
- 	shr	$32, TMP
--	shl	$32, H3
--	or	TMP, D4
-+	or	TMP, H4
- 
- 	mov	H2, TMP
-+	shl	$32, H3
- 	shr	$32, TMP
--	shl	$32, H2
- 	or	TMP, H3
- 
- 	mov	H1, TMP
-+	shl	$32, H2
- 	shr	$32, TMP
--	shl	$32, H1
- 	or	TMP, H2
- 
- 	mov	H0, TMP
-+	shl	$32, H1
- 	shr	$32, TMP
--	shl	$32, H0
- 	or	TMP, H1
- 
--	mov	D0, TMP
--	shr	$32, TMP
--	shl	$32, D0
--	or	TMP, H0
-+	shl	$32, H0
-+
-+	C   H4 H3 H2 H1 H0  0
-+	C  -   H4 H3 H2 H1 H0
-+	C  ---------------
-+	C   H4 H3 H2 H1 H0 TMP
- 
--	add	D0, T0
-+	mov	H0, TMP
-+	neg	TMP
-+	sbb	H1, H0
-+	sbb	H2, H1
-+	sbb	H3, H2
-+	sbb	H4, H3
-+	sbb	$0, H4
-+
-+	add	TMP, T0
- 	adc	H0, T1
- 	adc	H1, T2
- 	adc	H2, T3
- 	adc	H3, T4
--	adc	D4, T5
-+	adc	H4, T5
- 	adc	$0, C0
- 
- 	C Remains to add in C2 and C0
--	C                         C0  C0<<32  (-2^32+1)C0
--	C    C2  C2<<32  (-2^32+1)C2
--	C where C2 is always positive, while C0 may be -1.
-+	C Set H1, H0 = (2^96 - 2^32 + 1) C0
- 	mov	C0, H0
- 	mov	C0, H1
--	mov	C0, H2
--	sar	$63, C0		C Get sign
- 	shl	$32, H1
--	sub	H1, H0		C Gives borrow iff C0 > 0
-+	sub	H1, H0
- 	sbb	$0, H1
--	add	C0, H2
- 
-+	C Set H3, H2 = (2^96 - 2^32 + 1) C2
-+	mov	C2, H2
-+	mov	C2, H3
-+	shl	$32, H3
-+	sub	H3, H2
-+	sbb	$0, H3
-+	add	C0, H2		C No carry. Could use lea trick
-+
-+	xor	C0, C0
- 	add	H0, T0
- 	adc	H1, T1
--	adc	$0, H2
--	adc	$0, C0
--
--	C Set (H1 H0)  <-- C2 << 96 - C2 << 32 + 1
--	mov	C2, H0
--	mov	C2, H1
--	shl	$32, H1
--	sub	H1, H0
--	sbb	$0, H1
--
--	add	H2, H0
--	adc	C0, H1
--	adc	C2, C0
--	mov	C0, H2
--	sar	$63, C0
--	add	H0, T2
--	adc	H1, T3
--	adc	H2, T4
--	adc	C0, T5
--	sbb	C0, C0
-+	adc	H2, T2
-+	adc	H3, T3
-+	adc	C2, T4
-+	adc	D5, T5		C Value delayed from initial folding
-+	adc	$0, C0		C Use sbb and switch sign?
- 
- 	C Final unlikely carry
- 	mov	C0, H0
- 	mov	C0, H1
--	mov	C0, H2
--	sar	$63, C0
- 	shl	$32, H1
- 	sub	H1, H0
- 	sbb	$0, H1
--	add	C0, H2
- 
- 	pop	RP
- 
--	sub	H0, T0
-+	add	H0, T0
- 	mov	T0, (RP)
--	sbb	H1, T1
-+	adc	H1, T1
- 	mov	T1, 8(RP)
--	sbb	H2, T2
-+	adc	C0, T2
- 	mov	T2, 16(RP)
--	sbb	C0, T3
-+	adc	$0, T3
- 	mov	T3, 24(RP)
--	sbb	C0, T4
-+	adc	$0, T4
- 	mov	T4, 32(RP)
--	sbb	C0, T5
-+	adc	$0, T5
- 	mov	T5, 40(RP)
- 
- 	pop	%r15
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle.inc b/yocto-poky/meta/recipes-support/nettle/nettle.inc
index fafff6d..af51fb6 100644
--- a/yocto-poky/meta/recipes-support/nettle/nettle.inc
+++ b/yocto-poky/meta/recipes-support/nettle/nettle.inc
@@ -2,10 +2,6 @@
 HOMEPAGE = "http://www.lysator.liu.se/~nisse/nettle/"
 SECTION = "libs"
 
-LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
-                    file://serpent-decrypt.c;beginline=53;endline=67;md5=bcfd4745d53ca57f82907089898e390d \
-                    file://serpent-set-key.c;beginline=56;endline=70;md5=bcfd4745d53ca57f82907089898e390d"
-
 DEPENDS += "gmp"
 
 SRC_URI = "http://www.lysator.liu.se/~nisse/archive/${BP}.tar.gz \
@@ -13,13 +9,12 @@
            file://run-ptest \
            "
 
-SRC_URI[md5sum] = "003d5147911317931dd453520eb234a5"
-SRC_URI[sha256sum] = "bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40"
-
-EXTRA_OECONF = "--disable-openssl"
+UPSTREAM_CHECK_REGEX = "nettle-(?P<pver>\d+(\.\d+)+)\.tar"
 
 inherit autotools ptest
 
+EXTRA_OECONF = "--disable-openssl"
+
 do_configure_prepend() {
        if [ ! -e ${S}/acinclude.m4 -a -e ${S}/aclocal.m4 ]; then
                cp ${S}/aclocal.m4 ${S}/acinclude.m4
@@ -39,5 +34,4 @@
         install ${B}/testsuite/*-test ${D}${PTEST_PATH}/testsuite/
 }
 
-
 BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb b/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
index ae2574a..d4df0a3 100644
--- a/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
+++ b/yocto-poky/meta/recipes-support/nettle/nettle_2.7.1.bb
@@ -10,3 +10,9 @@
 SRC_URI[md5sum] = "003d5147911317931dd453520eb234a5"
 SRC_URI[sha256sum] = "bc71ebd43435537d767799e414fce88e521b7278d48c860651216e1fc6555b40"
 
+SRC_URI += "\
+            file://CVE-2015-8803_8805.patch \
+            file://CVE-2015-8804.patch \
+            "
+
+DISABLE_STATIC = ""
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle_3.1.1.bb b/yocto-poky/meta/recipes-support/nettle/nettle_3.1.1.bb
deleted file mode 100644
index 4a40e9a..0000000
--- a/yocto-poky/meta/recipes-support/nettle/nettle_3.1.1.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-require nettle.inc
-
-LICENSE = "LGPLv3+ | GPLv2+"
-
-LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
-                    file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
-                    file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
-                    file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
-
-SRC_URI += "\
-            file://CVE-2015-8803_8805.patch \
-            file://CVE-2015-8804.patch \
-            "
-
-SRC_URI[md5sum] = "b40fa88dc32f37a182b6b42092ebb144"
-SRC_URI[sha256sum] = "5fd4d25d64d8ddcb85d0d897572af73b05b4d163c6cc49438a5bfbb8ff293d4c"
diff --git a/yocto-poky/meta/recipes-support/nettle/nettle_3.2.bb b/yocto-poky/meta/recipes-support/nettle/nettle_3.2.bb
new file mode 100644
index 0000000..2b79779
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nettle/nettle_3.2.bb
@@ -0,0 +1,11 @@
+require nettle.inc
+
+LICENSE = "LGPLv3+ | GPLv2+"
+
+LIC_FILES_CHKSUM = "file://COPYING.LESSERv3;md5=6a6a8e020838b23406c81b19c1d46df6 \
+                    file://COPYINGv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
+                    file://serpent-decrypt.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e \
+                    file://serpent-set-key.c;beginline=14;endline=36;md5=ca0d220bc413e1842ecc507690ce416e"
+
+SRC_URI[md5sum] = "afb15b4764ebf1b4e6d06c62bd4d29e4"
+SRC_URI[sha256sum] = "ea4283def236413edab5a4cf9cf32adf540c8df1b9b67641cfc2302fca849d97"
diff --git a/yocto-poky/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch b/yocto-poky/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
new file mode 100644
index 0000000..2322806
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nspr/nspr/0002-Add-nios2-support.patch
@@ -0,0 +1,105 @@
+From 95bda64fb4cf1825fea745e918cfe8202843f0ba Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex@denx.de>
+Date: Sat, 30 Jan 2016 07:18:02 +0100
+Subject: [PATCH] Add nios2 support
+
+Add support for the nios2 CPU.
+
+Signed-off-by: Marek Vasut <marex@denx.de>
+Upstream-Status: Submitted [ https://bugzilla.mozilla.org/show_bug.cgi?id=1244421 ]
+---
+ nspr/pr/include/md/_linux.cfg | 45 +++++++++++++++++++++++++++++++++++++++++++
+ nspr/pr/include/md/_linux.h   | 14 ++++++++++++++
+ 2 files changed, 59 insertions(+)
+
+diff --git a/pr/include/md/_linux.cfg b/nspr/pr/include/md/_linux.cfg
+index 8cbf0cb..150676b 100644
+--- a/pr/include/md/_linux.cfg
++++ b/pr/include/md/_linux.cfg
+@@ -972,6 +972,51 @@
+ #define PR_BYTES_PER_WORD_LOG2   2
+ #define PR_BYTES_PER_DWORD_LOG2  3
+ 
++#elif defined(__nios2__)
++
++#define IS_LITTLE_ENDIAN    1
++#undef  IS_BIG_ENDIAN
++
++#define PR_BYTES_PER_BYTE   1
++#define PR_BYTES_PER_SHORT  2
++#define PR_BYTES_PER_INT    4
++#define PR_BYTES_PER_INT64  8
++#define PR_BYTES_PER_LONG   4
++#define PR_BYTES_PER_FLOAT  4
++#define PR_BYTES_PER_DOUBLE 8
++#define PR_BYTES_PER_WORD   4
++#define PR_BYTES_PER_DWORD  8
++
++#define PR_BITS_PER_BYTE    8
++#define PR_BITS_PER_SHORT   16
++#define PR_BITS_PER_INT     32
++#define PR_BITS_PER_INT64   64
++#define PR_BITS_PER_LONG    32
++#define PR_BITS_PER_FLOAT   32
++#define PR_BITS_PER_DOUBLE  64
++#define PR_BITS_PER_WORD    32
++
++#define PR_BITS_PER_BYTE_LOG2   3
++#define PR_BITS_PER_SHORT_LOG2  4
++#define PR_BITS_PER_INT_LOG2    5
++#define PR_BITS_PER_INT64_LOG2  6
++#define PR_BITS_PER_LONG_LOG2   5
++#define PR_BITS_PER_FLOAT_LOG2  5
++#define PR_BITS_PER_DOUBLE_LOG2 6
++#define PR_BITS_PER_WORD_LOG2   5
++
++#define PR_ALIGN_OF_SHORT   2
++#define PR_ALIGN_OF_INT     4
++#define PR_ALIGN_OF_LONG    4
++#define PR_ALIGN_OF_INT64   4
++#define PR_ALIGN_OF_FLOAT   4
++#define PR_ALIGN_OF_DOUBLE  4
++#define PR_ALIGN_OF_POINTER 4
++#define PR_ALIGN_OF_WORD    4
++
++#define PR_BYTES_PER_WORD_LOG2   2
++#define PR_BYTES_PER_DWORD_LOG2  3
++
+ #elif defined(__or1k__)
+ 
+ #undef  IS_LITTLE_ENDIAN
+diff --git a/pr/include/md/_linux.h b/nspr/pr/include/md/_linux.h
+index d378db5..18260be 100644
+--- a/pr/include/md/_linux.h
++++ b/pr/include/md/_linux.h
+@@ -55,6 +55,8 @@
+ #define _PR_SI_ARCHITECTURE "avr32"
+ #elif defined(__m32r__)
+ #define _PR_SI_ARCHITECTURE "m32r"
++#elif defined(__nios2__)
++#define _PR_SI_ARCHITECTURE "nios2"
+ #elif defined(__or1k__)
+ #define _PR_SI_ARCHITECTURE "or1k"
+ #else
+@@ -125,6 +127,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
+ #define _MD_ATOMIC_SET                _PR_x86_64_AtomicSet
+ #endif
+ 
++#if defined(__nios2__)
++#if defined(__GNUC__)
++/* Use GCC built-in functions */
++#define _PR_HAVE_ATOMIC_OPS
++#define _MD_INIT_ATOMIC()
++#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
++#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
++#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
++#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
++#endif
++#endif
++
+ #if defined(__or1k__)
+ #if defined(__GNUC__)
+ /* Use GCC built-in functions */
+-- 
+2.7.0.rc3
+
diff --git a/yocto-poky/meta/recipes-support/nspr/nspr_4.10.8.bb b/yocto-poky/meta/recipes-support/nspr/nspr_4.10.8.bb
deleted file mode 100644
index bc60018..0000000
--- a/yocto-poky/meta/recipes-support/nspr/nspr_4.10.8.bb
+++ /dev/null
@@ -1,176 +0,0 @@
-SUMMARY = "Netscape Portable Runtime Library"
-HOMEPAGE =  "http://www.mozilla.org/projects/nspr/"
-LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
-LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
-                    file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
-SECTION = "libs/network"
-
-SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
-           file://remove-rpath-from-tests.patch \
-           file://fix-build-on-x86_64.patch \
-           file://remove-srcdir-from-configure-in.patch \
-          "
-
-SRC_URI += "file://nspr.pc.in"
-
-SRC_URI[md5sum] = "8d7c5bd0a5b0a7d0e705be66479030a0"
-SRC_URI[sha256sum] = "507ea57c525c0c524dae4857a642b4ef5c9d795518754c7f83422d22fe544a15"
-
-S = "${WORKDIR}/nspr-${PV}/nspr"
-
-RDEPENDS_${PN}-dev += "perl"
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-TESTS = " \
-    accept \
-    acceptread \
-    acceptreademu \
-    affinity \
-    alarm \
-    anonfm \
-    atomic \
-    attach \
-    bigfile \
-    cleanup \
-    cltsrv  \
-    concur \
-    cvar \
-    cvar2 \
-    dlltest \
-    dtoa \
-    errcodes \
-    exit \
-    fdcach \
-    fileio \
-    foreign \
-    formattm \
-    fsync \
-    gethost \
-    getproto \
-    i2l \
-    initclk \
-    inrval \
-    instrumt \
-    intrio \
-    intrupt \
-    io_timeout \
-    ioconthr \
-    join \
-    joinkk \
-    joinku \
-    joinuk \
-    joinuu \
-    layer \
-    lazyinit \
-    libfilename \
-    lltest \
-    lock \
-    lockfile \
-    logfile \
-    logger \
-    many_cv \
-    multiwait \
-    nameshm1 \
-    nblayer \
-    nonblock \
-    ntioto \
-    ntoh \
-    op_2long \
-    op_excl \
-    op_filnf \
-    op_filok \
-    op_nofil \
-    parent \
-    parsetm \
-    peek \
-    perf \
-    pipeping \
-    pipeping2 \
-    pipeself \
-    poll_nm \
-    poll_to \
-    pollable \
-    prftest \
-    primblok \
-    provider \
-    prpollml \
-    ranfile \
-    randseed \
-    reinit \
-    rwlocktest \
-    sel_spd \
-    selct_er \
-    selct_nm \
-    selct_to \
-    selintr \
-    sema \
-    semaerr \
-    semaping \
-    sendzlf \
-    server_test \
-    servr_kk \
-    servr_uk \
-    servr_ku \
-    servr_uu \
-    short_thread \
-    sigpipe \
-    socket \
-    sockopt \
-    sockping \
-    sprintf \
-    stack \
-    stdio \
-    str2addr \
-    strod \
-    switch \
-    system \
-    testbit \
-    testfile \
-    threads \
-    timemac \
-    timetest \
-    tpd \
-    udpsrv \
-    vercheck \
-    version \
-    writev \
-    xnotify \
-    zerolen"
-
-PR = "r1"
-
-inherit autotools
-
-do_compile_prepend() {
-	oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -C config export
-}
-
-do_compile_append() {
-	oe_runmake -C pr/tests
-}
-
-do_install_append() {
-    install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
-    sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
-    sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nspr.pc
-    sed -i s:OEINCDIR:${includedir}:g ${D}${libdir}/pkgconfig/nspr.pc
-    sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
-
-    mkdir -p ${D}${libdir}/nspr/tests
-    install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
-    install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
-    cd ${B}/pr/tests
-    install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
-
-    # delete compile-et.pl and perr.properties from ${bindir} because these are
-    # only used to generate prerr.c and prerr.h files from prerr.et at compile
-    # time
-    rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
-}
-
-FILES_${PN} = "${libdir}/lib*.so"
-FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
-                ${includedir}/* ${datadir}/aclocal/* "
-FILES_${PN}-dbg += "${libdir}/nspr/tests/.debug/*"
-
-BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb b/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb
new file mode 100644
index 0000000..168341b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nspr/nspr_4.12.bb
@@ -0,0 +1,181 @@
+SUMMARY = "Netscape Portable Runtime Library"
+HOMEPAGE =  "http://www.mozilla.org/projects/nspr/"
+LICENSE = "GPL-2.0 | MPL-2.0 | LGPL-2.1"
+LIC_FILES_CHKSUM = "file://configure.in;beginline=3;endline=6;md5=90c2fdee38e45d6302abcfe475c8b5c5 \
+                    file://Makefile.in;beginline=4;endline=38;md5=beda1dbb98a515f557d3e58ef06bca99"
+SECTION = "libs/network"
+
+SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz \
+           file://remove-rpath-from-tests.patch \
+           file://fix-build-on-x86_64.patch \
+           file://remove-srcdir-from-configure-in.patch \
+           file://0002-Add-nios2-support.patch \
+           file://nspr.pc.in \
+"
+
+CACHED_CONFIGUREVARS_append_libc-musl = " CFLAGS='${CFLAGS} -D_PR_POLL_AVAILABLE \
+                                          -D_PR_HAVE_OFF64_T -D_PR_INET6 -D_PR_HAVE_INET_NTOP \
+                                          -D_PR_HAVE_GETHOSTBYNAME2 -D_PR_HAVE_GETADDRINFO \
+                                          -D_PR_INET6_PROBE'"
+
+UPSTREAM_CHECK_URI = "http://ftp.mozilla.org/pub/nspr/releases/"
+UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)/"
+
+SRC_URI[md5sum] = "0de760c1e00a92e180e611cf06ce9589"
+SRC_URI[sha256sum] = "e0b10a1e569153668ff8bdea6c7e491b389fab69c2f18285a1ebf7c2ea4269de"
+
+S = "${WORKDIR}/nspr-${PV}/nspr"
+
+RDEPENDS_${PN}-dev += "perl"
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+TESTS = " \
+    accept \
+    acceptread \
+    acceptreademu \
+    affinity \
+    alarm \
+    anonfm \
+    atomic \
+    attach \
+    bigfile \
+    cleanup \
+    cltsrv  \
+    concur \
+    cvar \
+    cvar2 \
+    dlltest \
+    dtoa \
+    errcodes \
+    exit \
+    fdcach \
+    fileio \
+    foreign \
+    formattm \
+    fsync \
+    gethost \
+    getproto \
+    i2l \
+    initclk \
+    inrval \
+    instrumt \
+    intrio \
+    intrupt \
+    io_timeout \
+    ioconthr \
+    join \
+    joinkk \
+    joinku \
+    joinuk \
+    joinuu \
+    layer \
+    lazyinit \
+    libfilename \
+    lltest \
+    lock \
+    lockfile \
+    logfile \
+    logger \
+    many_cv \
+    multiwait \
+    nameshm1 \
+    nblayer \
+    nonblock \
+    ntioto \
+    ntoh \
+    op_2long \
+    op_excl \
+    op_filnf \
+    op_filok \
+    op_nofil \
+    parent \
+    parsetm \
+    peek \
+    perf \
+    pipeping \
+    pipeping2 \
+    pipeself \
+    poll_nm \
+    poll_to \
+    pollable \
+    prftest \
+    primblok \
+    provider \
+    prpollml \
+    ranfile \
+    randseed \
+    reinit \
+    rwlocktest \
+    sel_spd \
+    selct_er \
+    selct_nm \
+    selct_to \
+    selintr \
+    sema \
+    semaerr \
+    semaping \
+    sendzlf \
+    server_test \
+    servr_kk \
+    servr_uk \
+    servr_ku \
+    servr_uu \
+    short_thread \
+    sigpipe \
+    socket \
+    sockopt \
+    sockping \
+    sprintf \
+    stack \
+    stdio \
+    str2addr \
+    strod \
+    switch \
+    system \
+    testbit \
+    testfile \
+    threads \
+    timemac \
+    timetest \
+    tpd \
+    udpsrv \
+    vercheck \
+    version \
+    writev \
+    xnotify \
+    zerolen"
+
+inherit autotools
+
+do_compile_prepend() {
+	oe_runmake CROSS_COMPILE=1 CFLAGS="-DXP_UNIX" LDFLAGS="" CC=gcc -C config export
+}
+
+do_compile_append() {
+	oe_runmake -C pr/tests
+}
+
+do_install_append() {
+    install -D ${WORKDIR}/nspr.pc.in ${D}${libdir}/pkgconfig/nspr.pc
+    sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
+    sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nspr.pc
+    sed -i s:OEINCDIR:${includedir}:g ${D}${libdir}/pkgconfig/nspr.pc
+    sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nspr.pc
+
+    mkdir -p ${D}${libdir}/nspr/tests
+    install -m 0755 ${S}/pr/tests/runtests.pl ${D}${libdir}/nspr/tests
+    install -m 0755 ${S}/pr/tests/runtests.sh ${D}${libdir}/nspr/tests
+    cd ${B}/pr/tests
+    install -m 0755 ${TESTS} ${D}${libdir}/nspr/tests
+
+    # delete compile-et.pl and perr.properties from ${bindir} because these are
+    # only used to generate prerr.c and prerr.h files from prerr.et at compile
+    # time
+    rm ${D}${bindir}/compile-et.pl ${D}${bindir}/prerr.properties
+}
+
+FILES_${PN} = "${libdir}/lib*.so"
+FILES_${PN}-dev = "${bindir}/* ${libdir}/nspr/tests/* ${libdir}/pkgconfig \
+                ${includedir}/* ${datadir}/aclocal/* "
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch b/yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch
new file mode 100644
index 0000000..82f2574
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname/0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch
@@ -0,0 +1,53 @@
+From d1345871b992f9a055c968963967e728da1a7ffb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Jan 2016 20:29:06 +0000
+Subject: [PATCH] nss-myhostname: Check for nss.h presense before use
+
+We do not have nss.h on musl e.g. and configury is already checking for
+nss.h presence, use this to define needed data structures if nss.h is
+missing on a given libc implementation on a platform
+
+include stdint.h for uint32_h definition
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ nss-myhostname.c | 20 ++++++++++++++++++++
+ 1 file changed, 20 insertions(+)
+
+diff --git a/nss-myhostname.c b/nss-myhostname.c
+index 293166c..6f287f5 100644
+--- a/nss-myhostname.c
++++ b/nss-myhostname.c
+@@ -21,7 +21,27 @@
+ ***/
+ 
+ #include <limits.h>
++#include <stdint.h>
++#ifdef HAVE_NSS_H
+ #include <nss.h>
++#else
++enum nss_status {
++    NSS_STATUS_TRYAGAIN = -2,
++    NSS_STATUS_UNAVAIL,
++    NSS_STATUS_NOTFOUND,
++    NSS_STATUS_SUCCESS,
++    NSS_STATUS_RETURN
++};
++/* Data structure used for the 'gethostbyname4_r' function.  */
++struct gaih_addrtuple
++  {
++    struct gaih_addrtuple *next;
++    char *name;
++    int family;
++    uint32_t addr[4];
++    uint32_t scopeid;
++  };
++#endif
+ #include <sys/types.h>
+ #include <netdb.h>
+ #include <errno.h>
+-- 
+2.7.0
+
diff --git a/yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb b/yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
index bbce9e9..de5b7cf 100644
--- a/yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
+++ b/yocto-poky/meta/recipes-support/nss-myhostname/nss-myhostname_0.3.bb
@@ -6,7 +6,9 @@
 LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
-SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${PV}.tar.gz"
+SRC_URI = "http://0pointer.de/lennart/projects/nss-myhostname/nss-myhostname-${PV}.tar.gz \
+           file://0001-nss-myhostname-Check-for-nss.h-presense-before-use.patch \
+           "
 
 SRC_URI[md5sum] = "d4ab9ac36c053ab8fb836db1cbd4a48f"
 SRC_URI[sha256sum] = "2ba744ea8d578d1c57c85884e94a3042ee17843a5294434d3a7f6c4d67e7caf2"
diff --git a/yocto-poky/meta/recipes-support/nss/nss/0001-Fix-build-failure-on-opensuse-13.1.patch b/yocto-poky/meta/recipes-support/nss/nss/0001-Fix-build-failure-on-opensuse-13.1.patch
new file mode 100644
index 0000000..cb3ad00
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nss/nss/0001-Fix-build-failure-on-opensuse-13.1.patch
@@ -0,0 +1,27 @@
+From 8758c6a4508a5ca01505a8d69a269c912ce10bee Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin@gmail.com>
+Date: Mon, 18 Jan 2016 18:26:16 +0000
+Subject: [PATCH] Fix build failure on opensuse 13.1
+
+Upstream-Status: Inappropriate [gcc 4.8 specific issue]
+Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
+---
+ nss/cmd/modutil/install-ds.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nss/cmd/modutil/install-ds.h b/nss/cmd/modutil/install-ds.h
+index 3a3afb3..433efe0 100644
+--- a/nss/cmd/modutil/install-ds.h
++++ b/nss/cmd/modutil/install-ds.h
+@@ -243,7 +243,7 @@ struct Pk11Install_Info_str {
+ Pk11Install_Info*
+ Pk11Install_Info_new();
+ void
+-Pk11Install_Info_init();
++Pk11Install_Info_init(Pk11Install_Info* _this);
+ void
+ Pk11Install_Info_delete(Pk11Install_Info* _this);
+ /*// Returns NULL for success, error message if parse error.*/
+-- 
+1.8.4.5
+
diff --git a/yocto-poky/meta/recipes-support/nss/nss_3.19.2.bb b/yocto-poky/meta/recipes-support/nss/nss_3.19.2.bb
deleted file mode 100644
index 23a4a1f..0000000
--- a/yocto-poky/meta/recipes-support/nss/nss_3.19.2.bb
+++ /dev/null
@@ -1,223 +0,0 @@
-SUMMARY = "Mozilla's SSL and TLS implementation"
-DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
-designed to support cross-platform development of \
-security-enabled client and server applications. \
-Applications built with NSS can support SSL v2 and v3, \
-TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
-v3 certificates, and other security standards."
-HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
-SECTION = "libs"
-
-LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
-
-LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
-                    file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
-                    file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
-
-SRC_URI = "\
-    http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_2_RTM/src/${BP}.tar.gz \
-    file://nss-fix-support-cross-compiling.patch \
-    file://nss-no-rpath-for-cross-compiling.patch \
-    file://nss-fix-incorrect-shebang-of-perl.patch \
-    file://nss-fix-nsinstall-build.patch \
-    file://nss.pc.in \
-    file://signlibs.sh \
-"
-
-SRC_URI[md5sum] = "b02ffd1e8e8ef5f8512fa02d8ca9db3d"
-SRC_URI[sha256sum] = "1306663e8f61d8449ad8cbcffab743a604dcd9f6f34232c210847c51dce2c9ae"
-
-inherit siteinfo
-
-DEPENDS = "sqlite3 nspr zlib nss-native"
-DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
-RDEPENDS_${PN}-smime = "perl"
-
-TD = "${S}/tentative-dist"
-TDS = "${S}/tentative-dist-staging"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_compile_prepend_class-native() {
-    export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
-    export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
-}
-
-do_compile_prepend_class-nativesdk() {
-    export LDFLAGS=""
-}
-
-do_compile() {
-    export CROSS_COMPILE=1
-    export NATIVE_CC="gcc"
-    export BUILD_OPT=1
-
-    export FREEBL_NO_DEPEND=1
-    export FREEBL_LOWHASH=1
-
-    export LIBDIR=${libdir}
-    export MOZILLA_CLIENT=1
-    export NS_USE_GCC=1
-    export NSS_USE_SYSTEM_SQLITE=1
-    export NSS_ENABLE_ECC=1
-
-    export OS_RELEASE=3.4
-    export OS_TARGET=Linux
-    export OS_ARCH=Linux
-
-    if [ "${TARGET_ARCH}" = "powerpc" ]; then
-        OS_TEST=ppc
-    elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
-        OS_TEST=ppc64
-    elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
-        OS_TEST=mips
-    else
-        OS_TEST="${TARGET_ARCH}"
-    fi
-
-    if [ "${SITEINFO_BITS}" = "64" ]; then
-        export USE_64=1
-    elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
-        export USE_X32=1
-    fi
-
-    # We can modify CC in the environment, but if we set it via an
-    # argument to make, nsinstall, a host program, will also build with it!
-    #
-    export CC="${CC} -g"
-    make -C ./nss CCC="${CXX} -g" \
-        OS_TEST=${OS_TEST}
-}
-
-
-do_install_prepend_class-nativesdk() {
-    export LDFLAGS=""
-}
-
-do_install() {
-    export CROSS_COMPILE=1
-    export NATIVE_CC="gcc"
-    export BUILD_OPT=1
-
-    export FREEBL_NO_DEPEND=1
-
-    export LIBDIR=${libdir}
-    export MOZILLA_CLIENT=1
-    export NS_USE_GCC=1
-    export NSS_USE_SYSTEM_SQLITE=1
-    export NSS_ENABLE_ECC=1
-
-    export OS_RELEASE=3.4
-    export OS_TARGET=Linux
-    export OS_ARCH=Linux
-
-    if [ "${TARGET_ARCH}" = "powerpc" ]; then
-        OS_TEST=ppc
-    elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
-        OS_TEST=ppc64
-    elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
-        OS_TEST=mips
-    else
-        OS_TEST="${TARGET_ARCH}"
-    fi
-    if [ "${SITEINFO_BITS}" = "64" ]; then
-        export USE_64=1
-    elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
-        export USE_X32=1
-    fi
-
-    make -C ./nss \
-        CCC="${CXX}" \
-        OS_TEST=${OS_TEST} \
-        SOURCE_LIB_DIR="${TD}/${libdir}" \
-        SOURCE_BIN_DIR="${TD}/${bindir}" \
-        install
-
-    install -d ${D}/${libdir}/
-    for file in ${S}/dist/*.OBJ/lib/*.so; do
-        echo "Installing `basename $file`..."
-        cp $file  ${D}/${libdir}/
-    done
-
-    for shared_lib in ${TD}/${libdir}/*.so.*; do
-        if [ -f $shared_lib ]; then
-            cp $shared_lib ${D}/${libdir}
-            ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
-        fi
-    done
-    for shared_lib in ${TD}/${libdir}/*.so; do
-        if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
-            cp $shared_lib ${D}/${libdir}
-        fi
-    done
-
-    install -d ${D}/${includedir}/nss3
-    install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
-
-    install -d ${D}/${bindir}
-    for binary in ${TD}/${bindir}/*; do
-        install -m 755 -t ${D}/${bindir} $binary
-    done
-}
-
-do_install_append() {
-    # Create empty .chk files for the NSS libraries at build time. They could
-    # be regenerated at target's boot time.
-    for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
-        touch ${D}/${libdir}/$file
-        chmod 755 ${D}/${libdir}/$file
-    done
-    install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
-
-    install -d ${D}${libdir}/pkgconfig/
-    sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
-    sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
-    sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
-    sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
-    sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
-}
-
-do_install_append_class-target() {
-    # Create a blank certificate
-    mkdir -p ${D}${sysconfdir}/pki/nssdb/
-    touch ./empty_password
-    certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
-    chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
-    rm ./empty_password
-}
-
-pkg_postinst_${PN} () {
-    if [ -n "$D" ]; then
-        for I in $D/${libdir}/lib*.chk; do
-            DN=`dirname $I`
-            BN=`basename $I .chk`
-            FN=$DN/$BN.so
-            shlibsign -i $FN
-	    if [ $? -ne 0 ]; then
-	       exit 1
-	    fi
-        done
-        exit 0
-    fi
-    signlibs.sh
-}
-
-PACKAGES =+ "${PN}-smime"
-FILES_${PN}-smime = "\
-    ${bindir}/smime \
-"
-FILES_${PN} = "\
-    ${sysconfdir} \
-    ${bindir} \
-    ${libdir}/lib*.chk \
-    ${libdir}/lib*.so \
-    "
-FILES_${PN}-dev = "\
-    ${libdir}/nss \
-    ${libdir}/pkgconfig/* \
-    ${includedir}/* \
-    "
-# FILES_${PN}-dbg is populated automatically
-
-BBCLASSEXTEND = "native nativesdk"
-
diff --git a/yocto-poky/meta/recipes-support/nss/nss_3.21.bb b/yocto-poky/meta/recipes-support/nss/nss_3.21.bb
new file mode 100644
index 0000000..d2e2411
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/nss/nss_3.21.bb
@@ -0,0 +1,240 @@
+SUMMARY = "Mozilla's SSL and TLS implementation"
+DESCRIPTION = "Network Security Services (NSS) is a set of libraries \
+designed to support cross-platform development of \
+security-enabled client and server applications. \
+Applications built with NSS can support SSL v2 and v3, \
+TLS, PKCS 5, PKCS 7, PKCS 11, PKCS 12, S/MIME, X.509 \
+v3 certificates, and other security standards."
+HOMEPAGE = "http://www.mozilla.org/projects/security/pki/nss/"
+SECTION = "libs"
+
+LICENSE = "MPL-2.0 | (MPL-2.0 & GPL-2.0+) | (MPL-2.0 & LGPL-2.1+)"
+
+LIC_FILES_CHKSUM = "file://nss/COPYING;md5=3b1e88e1b9c0b5a4b2881d46cce06a18 \
+                    file://nss/lib/freebl/mpi/doc/LICENSE;md5=491f158d09d948466afce85d6f1fe18f \
+                    file://nss/lib/freebl/mpi/doc/LICENSE-MPL;md5=5d425c8f3157dbf212db2ec53d9e5132"
+
+SRC_URI = "\
+    http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_21_RTM/src/${BP}.tar.gz \
+    file://nss-fix-support-cross-compiling.patch \
+    file://nss-no-rpath-for-cross-compiling.patch \
+    file://nss-fix-incorrect-shebang-of-perl.patch \
+    file://nss-fix-nsinstall-build.patch \
+    file://0001-Fix-build-failure-on-opensuse-13.1.patch \
+    file://nss.pc.in \
+    file://signlibs.sh \
+"
+
+SRC_URI[md5sum] = "3c8b2ed880dd3a8d86c9e0151afe6eba"
+SRC_URI[sha256sum] = "3f7a5b027d7cdd5c0e4ff7544da33fdc6f56c2f8c27fff02938fd4a6fbe87239"
+
+UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
+UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
+
+inherit siteinfo
+
+DEPENDS = "sqlite3 nspr zlib nss-native"
+DEPENDS_class-native = "sqlite3-native nspr-native zlib-native"
+RDEPENDS_${PN}-smime = "perl"
+
+TD = "${S}/tentative-dist"
+TDS = "${S}/tentative-dist-staging"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+do_configure_prepend_libc-musl () {
+    sed -i -e '/-DHAVE_SYS_CDEFS_H/d' ${S}/nss/lib/dbm/config/config.mk
+}
+
+do_compile_prepend_class-native() {
+    export NSPR_INCLUDE_DIR=${STAGING_INCDIR_NATIVE}
+    export NSPR_LIB_DIR=${STAGING_LIBDIR_NATIVE}
+}
+
+do_compile_prepend_class-nativesdk() {
+    export LDFLAGS=""
+}
+
+do_compile_prepend_class-native() {
+    # Need to set RPATH so that chrpath will do its job correctly
+    RPATH="-Wl,-rpath-link,${STAGING_LIBDIR_NATIVE} -Wl,-rpath-link,${STAGING_BASE_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_LIBDIR_NATIVE} -Wl,-rpath,${STAGING_BASE_LIBDIR_NATIVE}"
+}
+
+do_compile() {
+    export CROSS_COMPILE=1
+    export NATIVE_CC="gcc"
+    export BUILD_OPT=1
+
+    export FREEBL_NO_DEPEND=1
+    export FREEBL_LOWHASH=1
+
+    export LIBDIR=${libdir}
+    export MOZILLA_CLIENT=1
+    export NS_USE_GCC=1
+    export NSS_USE_SYSTEM_SQLITE=1
+    export NSS_ENABLE_ECC=1
+
+    export OS_RELEASE=3.4
+    export OS_TARGET=Linux
+    export OS_ARCH=Linux
+
+    if [ "${TARGET_ARCH}" = "powerpc" ]; then
+        OS_TEST=ppc
+    elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+        OS_TEST=ppc64
+    elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+        OS_TEST=mips
+    else
+        OS_TEST="${TARGET_ARCH}"
+    fi
+
+    if [ "${SITEINFO_BITS}" = "64" ]; then
+        export USE_64=1
+    elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+        export USE_X32=1
+    fi
+
+    export NSS_DISABLE_GTESTS=1
+
+    # We can modify CC in the environment, but if we set it via an
+    # argument to make, nsinstall, a host program, will also build with it!
+    #
+    export CC="${CC} -g"
+    make -C ./nss CCC="${CXX} -g" \
+        OS_TEST=${OS_TEST} \
+        RPATH="${RPATH}"
+}
+
+
+do_install_prepend_class-nativesdk() {
+    export LDFLAGS=""
+}
+
+do_install() {
+    export CROSS_COMPILE=1
+    export NATIVE_CC="gcc"
+    export BUILD_OPT=1
+
+    export FREEBL_NO_DEPEND=1
+
+    export LIBDIR=${libdir}
+    export MOZILLA_CLIENT=1
+    export NS_USE_GCC=1
+    export NSS_USE_SYSTEM_SQLITE=1
+    export NSS_ENABLE_ECC=1
+
+    export OS_RELEASE=3.4
+    export OS_TARGET=Linux
+    export OS_ARCH=Linux
+
+    if [ "${TARGET_ARCH}" = "powerpc" ]; then
+        OS_TEST=ppc
+    elif [ "${TARGET_ARCH}" = "powerpc64" ]; then
+        OS_TEST=ppc64
+    elif [ "${TARGET_ARCH}" = "mips" -o "${TARGET_ARCH}" = "mipsel" -o "${TARGET_ARCH}" = "mips64" -o "${TARGET_ARCH}" = "mips64el" ]; then
+        OS_TEST=mips
+    else
+        OS_TEST="${TARGET_ARCH}"
+    fi
+    if [ "${SITEINFO_BITS}" = "64" ]; then
+        export USE_64=1
+    elif [ "${TARGET_ARCH}" = "x86_64" -a "${SITEINFO_BITS}" = "32" ]; then
+        export USE_X32=1
+    fi
+
+    export NSS_DISABLE_GTESTS=1
+
+    make -C ./nss \
+        CCC="${CXX}" \
+        OS_TEST=${OS_TEST} \
+        SOURCE_LIB_DIR="${TD}/${libdir}" \
+        SOURCE_BIN_DIR="${TD}/${bindir}" \
+        install
+
+    install -d ${D}/${libdir}/
+    for file in ${S}/dist/*.OBJ/lib/*.so; do
+        echo "Installing `basename $file`..."
+        cp $file  ${D}/${libdir}/
+    done
+
+    for shared_lib in ${TD}/${libdir}/*.so.*; do
+        if [ -f $shared_lib ]; then
+            cp $shared_lib ${D}/${libdir}
+            ln -sf $(basename $shared_lib) ${D}/${libdir}/$(basename $shared_lib .1oe)
+        fi
+    done
+    for shared_lib in ${TD}/${libdir}/*.so; do
+        if [ -f $shared_lib -a ! -e ${D}/${libdir}/$shared_lib ]; then
+            cp $shared_lib ${D}/${libdir}
+        fi
+    done
+
+    install -d ${D}/${includedir}/nss3
+    install -m 644 -t ${D}/${includedir}/nss3 dist/public/nss/*
+
+    install -d ${D}/${bindir}
+    for binary in ${TD}/${bindir}/*; do
+        install -m 755 -t ${D}/${bindir} $binary
+    done
+}
+
+do_install_append() {
+    # Create empty .chk files for the NSS libraries at build time. They could
+    # be regenerated at target's boot time.
+    for file in libsoftokn3.chk libfreebl3.chk libnssdbm3.chk; do
+        touch ${D}/${libdir}/$file
+        chmod 755 ${D}/${libdir}/$file
+    done
+    install -D -m 755 ${WORKDIR}/signlibs.sh ${D}/${bindir}/signlibs.sh
+
+    install -d ${D}${libdir}/pkgconfig/
+    sed 's/%NSS_VERSION%/${PV}/' ${WORKDIR}/nss.pc.in | sed 's/%NSPR_VERSION%/4.9.2/' > ${D}${libdir}/pkgconfig/nss.pc
+    sed -i s:OEPREFIX:${prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+    sed -i s:OEEXECPREFIX:${exec_prefix}:g ${D}${libdir}/pkgconfig/nss.pc
+    sed -i s:OELIBDIR:${libdir}:g ${D}${libdir}/pkgconfig/nss.pc
+    sed -i s:OEINCDIR:${includedir}/nss3:g ${D}${libdir}/pkgconfig/nss.pc
+}
+
+do_install_append_class-target() {
+    # Create a blank certificate
+    mkdir -p ${D}${sysconfdir}/pki/nssdb/
+    touch ./empty_password
+    certutil -N -d ${D}${sysconfdir}/pki/nssdb/ -f ./empty_password
+    chmod 644 ${D}${sysconfdir}/pki/nssdb/*.db
+    rm ./empty_password
+}
+
+pkg_postinst_${PN} () {
+    if [ -n "$D" ]; then
+        for I in $D/${libdir}/lib*.chk; do
+            DN=`dirname $I`
+            BN=`basename $I .chk`
+            FN=$DN/$BN.so
+            shlibsign -i $FN
+	    if [ $? -ne 0 ]; then
+	       exit 1
+	    fi
+        done
+        exit 0
+    fi
+    signlibs.sh
+}
+
+PACKAGES =+ "${PN}-smime"
+FILES_${PN}-smime = "\
+    ${bindir}/smime \
+"
+FILES_${PN} = "\
+    ${sysconfdir} \
+    ${bindir} \
+    ${libdir}/lib*.chk \
+    ${libdir}/lib*.so \
+    "
+FILES_${PN}-dev = "\
+    ${libdir}/nss \
+    ${libdir}/pkgconfig/* \
+    ${includedir}/* \
+    "
+
+BBCLASSEXTEND = "native nativesdk"
+
diff --git a/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb b/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
index ee77951..a4efff1 100644
--- a/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
+++ b/yocto-poky/meta/recipes-support/p11-kit/p11-kit_0.22.1.bb
@@ -2,7 +2,7 @@
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=02933887f609807fbb57aa4237d14a50"
 
-inherit autotools gettext pkgconfig
+inherit autotools gettext pkgconfig upstream-version-is-even
 
 DEPENDS = "libtasn1 libffi"
 
@@ -12,9 +12,10 @@
 
 EXTRA_OECONF = "--without-trust-paths"
 
-FILES_${PN}-dev += " \
+FILES_${PN} += " \
     ${libdir}/p11-kit-proxy.so \
-    ${libdir}/pkcs11/p11-kit-trust.so \
-"
-FILES_${PN}-dev += "${libdir}/pkcs11/*.la"
-FILES_${PN}-dbg += "${libdir}/pkcs11/.debug"
+    ${libdir}/pkcs11/*.so \
+    ${libdir}/pkcs11/*.la"
+
+# PN contains p11-kit-proxy.so, a symlink to a loadable module
+INSANE_SKIP_${PN} = "dev-so"
diff --git a/yocto-poky/meta/recipes-support/ptest-runner/files/ptest-runner b/yocto-poky/meta/recipes-support/ptest-runner/files/ptest-runner
deleted file mode 100644
index c618f11..0000000
--- a/yocto-poky/meta/recipes-support/ptest-runner/files/ptest-runner
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-ANYFAILED=no
-echo "START: $0"
-
-for libdir in /usr/lib*
-do
-
-    [ ! -d "$libdir" ] && continue
-
-    for x in `ls -d $libdir/*/ptest 2>/dev/null`
-    do
-        [ ! -f $x/run-ptest ] && continue
-        [ -h `dirname $x` ] && continue
-
-        date "+%Y-%m-%dT%H:%M"
-        echo "BEGIN: $x"
-        cd "$x"
-        ./run-ptest || ANYFAILED=yes
-        echo "END: $x"
-        date "+%Y-%m-%dT%H:%M"
-    done
-done
-echo "STOP: $0"
-if [ "$ANYFAILED" = "yes"  ]; then
-    exit 1
-fi
-exit 0
diff --git a/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb b/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
deleted file mode 100644
index bc1b0a4..0000000
--- a/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_1.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-SUMMARY = "A simple shell script to run all installed ptests"
-DESCRIPTION = "The ptest-runner package installs a ptest-runner \
-shell script which loops through all installed ptest test suites and \
-runs them in sequence."
-HOMEPAGE = "https://wiki.yoctoproject.org/wiki/Ptest"
-SRC_URI += "file://ptest-runner"
-
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \
-                    file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
-
-INHIBIT_DEFAULT_DEPS = "1"
-
-S = "${WORKDIR}"
-
-do_install () {
-    mkdir -p ${D}${bindir}
-    install -m 0755 ${WORKDIR}/ptest-runner ${D}${bindir}
-}
-
-do_patch[noexec] = "1"
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-do_build[noexec] = "1"
diff --git a/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb b/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb
new file mode 100644
index 0000000..7081afb
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/ptest-runner/ptest-runner_2.0.bb
@@ -0,0 +1,26 @@
+SUMMARY = "A C program to run all installed ptests"
+DESCRIPTION = "The ptest-runner2 package installs a ptest-runner \
+program which loops through all installed ptest test suites and \
+runs them in sequence."
+HOMEPAGE = "http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/about/"
+
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe"
+
+SRCREV = "8bfdf946e784f4d5757bebee1fbc4b4a3d7a95c4"
+PV = "2.0+git${SRCPV}"
+
+SRC_URI = "git://git.yoctoproject.org/ptest-runner2"
+S = "${WORKDIR}/git"
+
+FILES_${PN} = "${bindir}/ptest-runner"
+
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_compile () {
+	oe_runmake
+}
+
+do_install () {
+	install -D -m 0755 ${WORKDIR}/git/ptest-runner ${D}${bindir}/ptest-runner
+}
diff --git a/yocto-poky/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch b/yocto-poky/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch
deleted file mode 100644
index 67a28ab..0000000
--- a/yocto-poky/meta/recipes-support/pth/files/pth-add-pkgconfig-support.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-Upstream-Status: Pending
-
-Add pkgconfig support to pth.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
-Index: Makefile.in
-===========================================================
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -47,6 +47,9 @@ datadir     = @datadir@
- 
- DESTDIR     =
- 
-+pkgconfigdir = ${libdir}/pkgconfig
-+pkgconfig_DATA = pth.pc
-+
- ##
- ##  ____ TOOL DEFINITIONS ___________________________________________
- ##
-@@ -216,7 +219,7 @@ test_pthread: test_pthread.o test_common.o libpthread.la
- 
- #   install the package
- install: all-for-install
--	@$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@
-+	@$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@ install-pkgconfigDATA
- 	@touch .done-install >/dev/null 2>&1 || $(TRUE)
- 	@$(MAKE) $(MKFLAGS) what-next
- install-dirs:
-@@ -227,6 +230,7 @@ install-dirs:
- 	$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
- 	$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3
- 	$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(datadir)/aclocal
-+	$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(pkgconfigdir)
- install-pth:
- 	$(SHTOOL) install -c -m 755 pth-config $(DESTDIR)$(bindir)/pth-config
- 	$(SHTOOL) install -c -m 644 $(S)pth-config.1 $(DESTDIR)$(mandir)/man1/pth-config.1
-@@ -242,12 +246,16 @@ install-pthread:
- 	$(SHTOOL) install -c -m 644 $(S)pthread.3 $(DESTDIR)$(mandir)/man3/pthread.3
- 	@umask 022; $(LIBTOOL) --mode=install \
- 	$(SHTOOL) install -c libpthread.la $(DESTDIR)$(libdir)/libpthread.la
-+install-pkgconfigDATA: $(pkgconfig_DATA)
-+	$(SHTOOL) install -c -m 644 $(pkgconfig_DATA) $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA)
- 
- #   uninstall the package
- uninstall:
--	@$(MAKE) $(MKFLAGS) @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs
-+	@$(MAKE) $(MKFLAGS) uninstall-pkgconfigDATA @UNINSTALL_PTHREAD@ uninstall-pth uninstall-dirs
- 	@touch .done-uninstall >/dev/null 2>&1 || $(TRUE)
- 	@$(MAKE) $(MKFLAGS) what-next
-+uninstall-pkgconfigDATA:
-+	$(RM) $(DESTDIR)$(pkgconfigdir)/$(pkgconfig_DATA)
- uninstall-pthread:
- 	$(RM) $(DESTDIR)$(bindir)/pthread-config
- 	$(RM) $(DESTDIR)$(mandir)/man1/pthread-config.1
-@@ -271,6 +279,7 @@ uninstall-dirs:
- 	-$(RMDIR) $(DESTDIR)$(includedir) >/dev/null 2>&1 || $(TRUE)
- 	-$(RMDIR) $(DESTDIR)$(bindir) >/dev/null 2>&1 || $(TRUE)
- 	-$(RMDIR) $(DESTDIR)$(prefix) >/dev/null 2>&1 || $(TRUE)
-+	-$(RMDIR) $(DESTDIR)$(pkgconfigdir) > /dev/null 2>&1 ||$(TRUE)
- 
- #   strip down the source tree to its minimum
- striptease:
-Index: configure.ac
-===========================================================
---- a/configure.ac
-+++ b/configure.ac
-@@ -656,6 +656,13 @@ pth_acmac.h dnl
- chmod +rx pthread-config
- chmod +rx pth-config
- )dnl
-+
-+PTH_VERSION=`echo $PTH_VERSION_STR | cut -d' ' -f1`
-+AC_SUBST(PTH_VERSION)
-+
-+AC_CONFIG_FILES([pth.pc])
-+AC_OUTPUT
-+
- if test ".$enable_pthread" = .no; then
-     rm -f pthread-config
-     rm -f pthread.h
-Index: pth.pc.in
-===========================================================
---- /dev/null
-+++ b/pth.pc.in
-@@ -0,0 +1,16 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@
-+bindir=@bindir@
-+mandir=@mandir@
-+datadir=@datadir@
-+acdir=@datadir@/aclocal
-+
-+Name: pth
-+Description: GNU Portable Threads
-+Requires:
-+Version: @PTH_VERSION@
-+Libs: -L${libdir} -lpth
-+Libs.private: 
-+Cflags: -I${includedir}
--- 
-1.7.5.4
-
diff --git a/yocto-poky/meta/recipes-support/pth/files/pth-fix-parallel.patch b/yocto-poky/meta/recipes-support/pth/files/pth-fix-parallel.patch
deleted file mode 100644
index 08edaff..0000000
--- a/yocto-poky/meta/recipes-support/pth/files/pth-fix-parallel.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From df06b8170745eac347acb95f9f374f257621254f Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Thu, 29 Jan 2015 18:11:00 -0800
-Subject: [PATCH] Makefile.in: fix for parallel build
-
-Fixed:
-* do_compile
- pth_uctx.c:31:19: fatal error: pth_p.h: No such file or directory
- #include "pth_p.h"
-                   ^
-compilation terminated.
-make: *** [pth_uctx.lo] Error 1
-
-* do_install:
-  cp: cannot create regular file `image/usr/lib/pkgconfig/#INST@15507#': No such file or directory
-
-Upstream-Status: Pending
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- Makefile.in |    5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index de0390d..381a0ee 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -219,7 +219,8 @@ test_pthread: test_pthread.o test_common.o libpthread.la
- 
- #   install the package
- install: all-for-install
--	@$(MAKE) $(MKFLAGS) install-dirs install-pth @INSTALL_PTHREAD@ install-pkgconfigDATA
-+	@$(MAKE) $(MKFLAGS) install-dirs
-+	@$(MAKE) $(MKFLAGS) install-pth @INSTALL_PTHREAD@ install-pkgconfigDATA
- 	@touch .done-install >/dev/null 2>&1 || $(TRUE)
- 	@$(MAKE) $(MKFLAGS) what-next
- install-dirs:
-@@ -432,7 +433,7 @@ TAGS:
- ##  (AUTOMATICALLY UPDATED - DO NOT EDIT)
- ##
- 
--$(LOBJS): Makefile
-+$(LOBJS): Makefile pth_p.h
- 
- # DO NOT REMOVE
- pth_attr.lo: pth_attr.c pth_p.h pth_vers.c pth.h pth_acdef.h pth_acmac.h
--- 
-1.7.9.5
-
diff --git a/yocto-poky/meta/recipes-support/pth/pth_2.0.7.bb b/yocto-poky/meta/recipes-support/pth/pth_2.0.7.bb
deleted file mode 100644
index 9037769..0000000
--- a/yocto-poky/meta/recipes-support/pth/pth_2.0.7.bb
+++ /dev/null
@@ -1,31 +0,0 @@
-SUMMARY = "GNU Portable Threads library"
-HOMEPAGE = "http://www.gnu.org/software/pth/"
-SECTION = "libs"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;beginline=12;endline=15;md5=a48af114a80c222cafd37f24370a77b1"
-PR = "r3"
-
-python __anonymous () {
-    import re
-    uc_os = (re.match('.*uclibc*', d.getVar('TARGET_OS', True)) != None)
-    if uc_os:
-        raise bb.parse.SkipPackage("incompatible with uClibc")
-}
-
-SRC_URI = "${GNU_MIRROR}/pth/pth-${PV}.tar.gz \
-          file://pth-add-pkgconfig-support.patch \
-          file://pth-fix-parallel.patch \
-          "
-
-SRC_URI[md5sum] = "9cb4a25331a4c4db866a31cbe507c793"
-SRC_URI[sha256sum] = "72353660c5a2caafd601b20e12e75d865fd88f6cf1a088b306a3963f0bc77232"
-
-BINCONFIG = "${bindir}/pth-config"
-
-inherit autotools binconfig-disabled pkgconfig
-
-do_configure() {
-	( cd ${S}; gnu-configize )
-	( cd ${S}; autoconf )
-	oe_runconf
-}
diff --git a/yocto-poky/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch
new file mode 100644
index 0000000..4bd9d31
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/0001-If-the-libc-is-lacking-argp-use-libargp.patch
@@ -0,0 +1,60 @@
+From 99679fda405e535a282f04a4decc2381154a749f Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Mon, 15 Feb 2016 15:59:58 -0700
+Subject: [PATCH 1/2] If the libc is lacking argp, use libargp
+
+Patch pulled from Gentoo:
+
+    On glibc systems, argp is provided by libc.  However, on
+    uclibc and other systems which lack argp in their C library,
+    argp might be provided by a stand alone library, libargp.
+    This patch adds tests to the build system to find who provides
+    argp.
+
+    X-Gentoo-Bug: 292191
+    X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=292191
+    Reported-by: Ed Wildgoose <gentoo@wildgooses.com>
+    Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ configure.ac | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 27a2dba..04fcd25 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -82,6 +82,28 @@ AS_IF(
+ 	]
+ )
+ 
++dnl First check if we have argp available from libc
++AC_LINK_IFELSE(
++	[AC_LANG_PROGRAM(
++		[#include <argp.h>],
++		[int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
++		)],
++	[libc_has_argp="true"],
++	[libc_has_argp="false"]
++)
++
++dnl If libc doesn't provide argp, then test for libargp
++if test "$libc_has_argp" = "false" ; then
++	AC_MSG_WARN("libc does not have argp")
++	AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
++
++	if test "$have_argp" = "false"; then
++		AC_MSG_ERROR("no libargp found")
++	else
++		LIBS+=" -largp"
++	fi
++fi
++
+ dnl -----------------
+ dnl Configure options
+ dnl -----------------
+-- 
+2.2.1
+
diff --git a/yocto-poky/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch
new file mode 100644
index 0000000..1c8a79c
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/0002-Add-argument-to-control-the-libargp-dependency.patch
@@ -0,0 +1,92 @@
+From afc8712a9e6c72fbd03c36f84ecf8703e5d22a8c Mon Sep 17 00:00:00 2001
+From: Christopher Larson <chris_larson@mentor.com>
+Date: Mon, 15 Feb 2016 16:11:32 -0700
+Subject: [PATCH 2/2] Add argument to control the libargp dependency
+
+This ensures that the builds are always deterministic. If the argument isn't
+passed, the default behavior is to use libargp if the libc doesn't have argp.
+
+Upstream-Status: Pending
+Signed-off-by: Christopher Larson <chris_larson@mentor.com>
+---
+ configure.ac | 55 ++++++++++++++++++++++++++++++++++++-------------------
+ 1 file changed, 36 insertions(+), 19 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 04fcd25..11a5321 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,6 +32,13 @@ AC_ARG_WITH([libgcrypt],
+ 	[with_libgcrypt=check]
+ )
+ 
++AC_ARG_WITH([libargp],
++	AS_HELP_STRING([--without-libargp],
++		[Disable libargp support. Systems whose libc lacks argp can use libargp instead. (Default: check if libc lacks argp)]),
++	[with_libargp=$withval],
++	[with_libargp=check]
++)
++
+ dnl Make sure anyone changing configure.ac/Makefile.am has a clue
+ AM_MAINTAINER_MODE
+ 
+@@ -82,27 +89,37 @@ AS_IF(
+ 	]
+ )
+ 
+-dnl First check if we have argp available from libc
+-AC_LINK_IFELSE(
+-	[AC_LANG_PROGRAM(
+-		[#include <argp.h>],
+-		[int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
+-		)],
+-	[libc_has_argp="true"],
+-	[libc_has_argp="false"]
++dnl Determine if we need libargp: either user requested, or libc has no argp
++AS_IF(
++	[test "x$with_libargp" != "xyes"],
++	[
++		AC_LINK_IFELSE(
++			[AC_LANG_PROGRAM(
++				[#include <argp.h>],
++				[int argc=1; char *argv[]={"test"}; argp_parse(0,argc,argv,0,0,0); return 0;]
++				)],
++			[need_libargp=no],
++			[need_libargp=yes
++			 if test "x$with_libargp" = "xno"; then
++				AC_MSG_FAILURE([libargp disabled and libc does not have argp])
++			 fi]
++		)
++	],
++	[need_libargp=yes],
+ )
+ 
+-dnl If libc doesn't provide argp, then test for libargp
+-if test "$libc_has_argp" = "false" ; then
+-	AC_MSG_WARN("libc does not have argp")
+-	AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
+-
+-	if test "$have_argp" = "false"; then
+-		AC_MSG_ERROR("no libargp found")
+-	else
+-		LIBS+=" -largp"
+-	fi
+-fi
++dnl Check for libargp
++AS_IF(
++	[test "x$need_libargp" = "xyes"],
++	[
++		AC_CHECK_LIB(
++			[argp],
++			[argp_parse],
++			[LIBS="$LIBS -largp"],
++			[AC_MSG_FAILURE([libargp not found])]
++		)
++	]
++)
+ 
+ dnl -----------------
+ dnl Configure options
+-- 
+2.2.1
+
diff --git a/yocto-poky/meta/recipes-support/rng-tools/rng-tools/default b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/default
new file mode 100644
index 0000000..7aede9b
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/default
@@ -0,0 +1,3 @@
+# Specify rng device
+#RNG_DEVICE=/dev/hwrng
+RNG_DEVICE=/dev/urandom
diff --git a/yocto-poky/meta/recipes-support/rng-tools/rng-tools/init b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/init
new file mode 100644
index 0000000..7cf7839
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/init
@@ -0,0 +1,49 @@
+#! /bin/sh 
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/rng-tools and type
+# > update-rc.d rng-tools defaults 60
+#
+
+rngd=/usr/sbin/rngd
+test -x "$rngd" || exit 1
+
+if [ -e /etc/default/rng-tools ]; then
+    . /etc/default/rng-tools
+fi
+
+if [ -n "$RNG_DEVICE" ]; then
+    EXTRA_ARGS="-- -r $RNG_DEVICE"
+fi
+
+
+case "$1" in
+  start)
+    echo -n "Starting random number generator daemon"
+    start-stop-daemon -S -q -x $rngd $EXTRA_ARGS
+    echo "."
+    ;;
+  stop)
+    echo -n "Stopping random number generator daemon"
+    start-stop-daemon -K -q -n rngd
+    echo "."
+    ;;
+  reload|force-reload)
+    echo -n "Signalling rng daemon restart"
+    start-stop-daemon -K -q -s 1 -x $rngd
+    start-stop-daemon -K -q -s 1 -x $rngd
+    ;;
+  restart)
+    echo -n "Stopping random number generator daemon"
+    start-stop-daemon -K -q -n rngd
+    echo "."
+    echo -n "Starting random number generator daemon"
+    start-stop-daemon -S -q -x $rngd $EXTRA_ARGS
+    echo "."
+    ;;
+  *)
+    echo "Usage: /etc/init.d/rng-tools {start|stop|reload|restart|force-reload}"
+    exit 1
+esac
+
+exit 0
diff --git a/yocto-poky/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch
new file mode 100644
index 0000000..e691315
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/uclibc-libuargp-configure.patch
@@ -0,0 +1,63 @@
+In case of uclibc, use libuargp
+
+If we use uclibc for system libraries, select libuargp
+
+Upstream-Status: Pending
+
+Signed-off-by: Maxin B. John <maxin.john@intel.com>
+---
+diff -Naur rng-tools-5-orig/configure.ac rng-tools-5/configure.ac
+--- rng-tools-5-orig/configure.ac	2016-02-24 18:11:24.023690235 +0200
++++ rng-tools-5/configure.ac	2016-02-24 18:14:49.763118138 +0200
+@@ -39,6 +39,13 @@
+ 	[with_libargp=check]
+ )
+ 
++AC_ARG_ENABLE([uclibc],
++    AS_HELP_STRING([--enable-uclibc], [Use uclibc for system libraries]),
++        use_uclibc=yes, use_uclibc=no)
++AM_CONDITIONAL(USE_UCLIBC, test "x$use_uclibc" = "xyes")
++AS_IF([test "x$use_uclibc" = "xyes"], [AC_DEFINE(USE_UCLIBC)])
++AH_TEMPLATE([USE_UCLIBC], [Defined if uclibc libraries are used.])
++
+ dnl Make sure anyone changing configure.ac/Makefile.am has a clue
+ AM_MAINTAINER_MODE
+ 
+@@ -101,7 +108,7 @@
+ 			[need_libargp=no],
+ 			[need_libargp=yes
+ 			 if test "x$with_libargp" = "xno"; then
+-				AC_MSG_FAILURE([libargp disabled and libc does not have argp])
++				AC_MSG_WARN([libargp disabled and libc does not have argp])
+ 			 fi]
+ 		)
+ 	],
+@@ -110,7 +117,7 @@
+ 
+ dnl Check for libargp
+ AS_IF(
+-	[test "x$need_libargp" = "xyes"],
++	[test "x$need_libargp" = "xyes" -a "x$use_uclibc" = "xno"],
+ 	[
+ 		AC_CHECK_LIB(
+ 			[argp],
+@@ -120,6 +127,19 @@
+ 		)
+ 	]
+ )
++
++dnl Check for libuargp
++AS_IF(
++	[test "x$use_uclibc" = "xyes"],
++	[
++		AC_CHECK_LIB(
++			[uargp],
++			[argp_parse],
++			[LIBS="$LIBS -luargp"],
++			[AC_MSG_FAILURE([libuargp not found])]
++		)
++	]
++)
+ 
+ dnl -----------------
+ dnl Configure options
diff --git a/yocto-poky/meta/recipes-support/rng-tools/rng-tools/underquote.patch b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/underquote.patch
new file mode 100644
index 0000000..1422571
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/rng-tools/rng-tools/underquote.patch
@@ -0,0 +1,31 @@
+Fix underquoted m4 entry. This causes a failure if gcrypt isn't present:
+
+| configure: libgcrypt support disabled
+| ../rng-tools-5/configure: line 4345: ac_fn_c_try_link: command not found
+| configure: error: in `/media/build1/poky/build/tmp/work/i586-poky-linux/rng-tools/5-r0/build':
+
+RP
+2016/2/16
+
+Index: rng-tools-5/configure.ac
+===================================================================
+--- rng-tools-5.orig/configure.ac
++++ rng-tools-5/configure.ac
+@@ -71,7 +71,7 @@ AS_IF(
+ 	[test "x$with_libgcrypt" != "xno"],
+ 	[
+ 		AC_CHECK_HEADER([gcrypt.h],
+-			AC_CHECK_LIB(
++			[AC_CHECK_LIB(
+ 				[gcrypt],
+ 				[gcry_check_version], ,
+ 				[
+@@ -80,7 +80,7 @@ AS_IF(
+ 						AC_MSG_NOTICE([libgcrypt support disabled])
+ 					fi
+ 				]
+-			),
++			)],
+ 			[if test "x$with_libgcrypt" != "xcheck"; then
+ 				AC_MSG_FAILURE([libgcrypt headers not found]); else
+ 				AC_MSG_NOTICE([libgcrypt support disabled])
diff --git a/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb b/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb
new file mode 100644
index 0000000..913a092
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/rng-tools/rng-tools_5.bb
@@ -0,0 +1,46 @@
+SUMMARY = "Random number generator daemon"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0b6f033afe6db235e559456585dc8cdc"
+
+SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/gkernel/${BP}.tar.gz \
+           file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \
+           file://0002-Add-argument-to-control-the-libargp-dependency.patch \
+           file://underquote.patch \
+           file://uclibc-libuargp-configure.patch \
+           file://init \
+           file://default"
+
+SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68"
+SRC_URI[sha256sum] = "60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e"
+
+# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
+# manually to avoid unnecessary postinst/preinst generated.
+python () {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
+inherit autotools update-rc.d
+
+PACKAGECONFIG = "libgcrypt"
+PACKAGECONFIG_libc-musl = "libargp"
+PACKAGECONFIG_libc-uclibc = "libuargp"
+PACKAGECONFIG[libargp] = "--with-libargp,--without-libargp,argp-standalone,"
+PACKAGECONFIG[libuargp] = "--enable-uclibc,,,"
+PACKAGECONFIG[libgcrypt] = "--with-libgcrypt,--without-libgcrypt,libgcrypt,"
+
+do_install_append() {
+    # Only install the init script when 'sysvinit' is in DISTRO_FEATURES.
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+        install -d "${D}${sysconfdir}/init.d"
+        install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools
+        sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir}/,' \
+            ${D}${sysconfdir}/init.d/rng-tools
+
+        install -d "${D}${sysconfdir}/default"
+        install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools
+    fi
+}
+
+INITSCRIPT_NAME = "rng-tools"
+INITSCRIPT_PARAMS = "start 30 2 3 4 5 . stop 30 0 6 1 ."
diff --git a/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.4.bb b/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.4.bb
deleted file mode 100644
index 8c4fde8..0000000
--- a/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.4.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require shared-mime-info.inc
-
-SRC_URI += "file://parallelmake.patch \
-	    file://install-data-hook.patch"
-
-SRC_URI[md5sum] = "16c02f7b658fff2a9c207406d388ea31"
-SRC_URI[sha256sum] = "bbc0bd023f497dfd75e1ca73441cbbb5a63617d9e14f2790b868361cc055b5b1"
diff --git a/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.6.bb b/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.6.bb
new file mode 100644
index 0000000..2cf5041
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/shared-mime-info/shared-mime-info_1.6.bb
@@ -0,0 +1,7 @@
+require shared-mime-info.inc
+
+SRC_URI += "file://parallelmake.patch \
+	    file://install-data-hook.patch"
+
+SRC_URI[md5sum] = "10abc5c4e6b22223ff05c3bd70ff9e8f"
+SRC_URI[sha256sum] = "b2f8f85b6467933824180d0252bbcaee523f550a8fbc95cc4391bd43c03bc34c"
diff --git a/yocto-poky/meta/recipes-support/sqlite/files/0001-using-the-dynamic-library.patch b/yocto-poky/meta/recipes-support/sqlite/files/0001-using-the-dynamic-library.patch
deleted file mode 100644
index e3bfd5f..0000000
--- a/yocto-poky/meta/recipes-support/sqlite/files/0001-using-the-dynamic-library.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-[PATCH] using the dynamic library
-
-Upstream-Status:  Inappropriate [configuration]
-
-building statically-linked sqlite3 failed since sqlite3.o is generated in 
-different dir, even if link successes, the size of sqlite3 is become larger,
-so use the dynamic link, ref: http://patchwork.openembedded.org/patch/93293/
-
-Signed-off-by: Roy Li <rongqing.li@windriver.com>
----
- Makefile.am | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 88bc23d..fe50f20 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -7,7 +7,8 @@ libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
- 
- bin_PROGRAMS = sqlite3
- sqlite3_SOURCES = shell.c sqlite3.h
--sqlite3_LDADD = sqlite3.$(OBJEXT) @READLINE_LIBS@
-+sqlite3_LDADD = @READLINE_LIBS@ libsqlite3.la
-+
- 
- include_HEADERS = sqlite3.h sqlite3ext.h
- 
--- 
-1.9.1
-
diff --git a/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc b/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc
index 2e3791b..5bff33b 100644
--- a/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc
+++ b/yocto-poky/meta/recipes-support/sqlite/sqlite3.inc
@@ -1,34 +1,53 @@
 SUMMARY = "Embeddable SQL database engine"
 HOMEPAGE = "http://www.sqlite.org"
 SECTION = "libs"
-DEPENDS = "readline ncurses"
-DEPENDS_class-native = ""
-LICENSE = "PD"
+
+PE = "3"
+
+def sqlite_download_version(d):
+    pvsplit = d.getVar('PV', True).split('.')
+    if len(pvsplit) < 4:
+        pvsplit.append('0')
+    return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
+
+SQLITE_PV = "${@sqlite_download_version(d)}"
+
+S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
+
+UPSTREAM_CHECK_URI = "http://www.sqlite.org/"
+UPSTREAM_CHECK_REGEX = "releaselog/(?P<pver>(\d+[\.\-_]*)+)\.html"
 
 inherit autotools pkgconfig
 
-EXTRA_OECONF = "--enable-shared --enable-threadsafe"
-EXTRA_OECONF_class-native = "--enable-shared --enable-threadsafe --disable-readline"
-export config_BUILD_CC = "${BUILD_CC}"
-export config_BUILD_CFLAGS = "${BUILD_CFLAGS}"
-export config_BUILD_LIBS = "${BUILD_LDFLAGS}"
-export config_TARGET_CC = "${CC}"
-export config_TARGET_LINK = "${CCLD}"
-export config_TARGET_CFLAGS = "${CFLAGS}"
-export config_TARGET_LFLAGS = "${LDFLAGS}"
+PACKAGECONFIG ?= ""
+PACKAGECONFIG_class-native = ""
+
+PACKAGECONFIG[editline] = "--enable-editline,--disable-editline,libedit"
+PACKAGECONFIG[readline] = "--enable-readline,--disable-readline,readline ncurses"
+
+EXTRA_OECONF = " \
+    --enable-shared \
+    --enable-threadsafe \
+    --disable-static-shell \
+"
 
 # pread() is in POSIX.1-2001 so any reasonable system must surely support it
 BUILD_CFLAGS += "-DUSE_PREAD"
 TARGET_CFLAGS += "-DUSE_PREAD"
 
+# Provide column meta-data API
+BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+TARGET_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
+
 PACKAGES = "lib${BPN} lib${BPN}-dev lib${BPN}-doc ${PN}-dbg lib${BPN}-staticdev ${PN}"
 
 FILES_${PN} = "${bindir}/*"
 FILES_lib${BPN} = "${libdir}/*.so.*"
 FILES_lib${BPN}-dev = "${libdir}/*.la ${libdir}/*.so \
-	                	   ${libdir}/pkgconfig ${includedir}"
+                       ${libdir}/pkgconfig ${includedir}"
 FILES_lib${BPN}-doc = "${docdir} ${mandir} ${infodir}"
 FILES_lib${BPN}-staticdev = "${libdir}/lib*.a"
+
 AUTO_LIBNAME_PKGS = "${MLPREFIX}lib${BPN}"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch b/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch
new file mode 100644
index 0000000..6f39ae2
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/sqlite/sqlite3/fix-disable-static-shell.patch
@@ -0,0 +1,61 @@
+From ede5db83e38cc8ad8c9be291cd8985f7ad99f291 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <armccurdy@gmail.com>
+Date: Tue, 16 Feb 2016 14:00:00 -0800
+Subject: [PATCH] fix --disable-static-shell
+
+Upstream sqlite seems to be moving further and further away from
+allowing the sqlite3 command line tool to be dynamically linked with
+sqlite.
+
+The --disable-static-shell configure option added in 3.10.0 no longer
+has any effect in 3.11.0. For now patch things up and make it work.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
+---
+ Makefile.am  | 13 +++++++++++--
+ configure.ac |  2 +-
+ 2 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 0e09cfc..608c0fd 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -6,9 +6,18 @@ libsqlite3_la_SOURCES = sqlite3.c
+ libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
+ 
+ bin_PROGRAMS = sqlite3
+-sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h
+-sqlite3_LDADD = @READLINE_LIBS@
++sqlite3_SOURCES = shell.c sqlite3.h
++EXTRA_sqlite3_SOURCES = sqlite3.c
++sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@
+ sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@
++
++# Warning: Adding SQLITE_ENABLE_EXPLAIN_COMMENTS to sqlite3_CFLAGS doesn't
++# actually have any effect if we link the sqlite3 command line tool with the
++# libsqlite3.so shared library (which will contain a version of sqlite3.c
++# compiled with the default AM_CFLAGS above). If SQLITE_ENABLE_EXPLAIN_COMMENTS
++# debug is required, then sqlite3 must not be configured with
++# --disable-static-shell
++
+ sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS
+ 
+ include_HEADERS = sqlite3.h sqlite3ext.h
+diff --git a/configure.ac b/configure.ac
+index 8e7fd69..ada559e 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -130,7 +130,7 @@ AC_ARG_ENABLE(static-shell, [AS_HELP_STRING(
+   [statically link libsqlite3 into shell tool [default=yes]])], 
+   [], [enable_static_shell=yes])
+ if test x"$enable_static_shell" == "xyes"; then
+-  EXTRA_SHELL_OBJ=sqlite3.$OBJEXT
++  EXTRA_SHELL_OBJ=sqlite3-sqlite3.$OBJEXT
+ else
+   EXTRA_SHELL_OBJ=libsqlite3.la
+ fi
+-- 
+1.9.1
+
diff --git a/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb b/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb
new file mode 100644
index 0000000..992d20c
--- /dev/null
+++ b/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.11.0.bb
@@ -0,0 +1,11 @@
+require sqlite3.inc
+
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0"
+
+SRC_URI = "http://www.sqlite.org/2016/sqlite-autoconf-${SQLITE_PV}.tar.gz \
+           file://fix-disable-static-shell.patch \
+"
+
+SRC_URI[md5sum] = "a6cdc3e0a6e5087d620037ae0c48720d"
+SRC_URI[sha256sum] = "508d4dcbcf7a7181e95c717a1dc4ae3c0880b3d593be0c4b40abb6c3a0e201fb"
diff --git a/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.8.10.2.bb b/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.8.10.2.bb
deleted file mode 100644
index c72ad50..0000000
--- a/yocto-poky/meta/recipes-support/sqlite/sqlite3_3.8.10.2.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-require sqlite3.inc
-
-LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=65f0a57ca6928710b418c094b3570bb0"
-
-def sqlite_download_version(d):
-    pvsplit = d.getVar('PV', True).split('.')
-    return pvsplit[0] + ''.join([part.rjust(2,'0') for part in pvsplit[1:]])
-
-PE = "3"
-SQLITE_PV = "${@sqlite_download_version(d)}"
-SRC_URI = "http://www.sqlite.org/2015/sqlite-autoconf-${SQLITE_PV}.tar.gz \
-           file://0001-using-the-dynamic-library.patch \
-"
-
-SRC_URI[md5sum] = "a18bfc015cd49a1e7a961b7b77bc3b37"
-SRC_URI[sha256sum] = "8382e55a4e7d853c93038562ca3dd00307937fccf1c6b65ddd813e503a56d626"
-
-S = "${WORKDIR}/sqlite-autoconf-${SQLITE_PV}"
-
-# Provide column meta-data API
-BUILD_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
-TARGET_CFLAGS += "-DSQLITE_ENABLE_COLUMN_METADATA"
-
diff --git a/yocto-poky/meta/recipes-support/taglib/taglib_1.9.1.bb b/yocto-poky/meta/recipes-support/taglib/taglib_1.9.1.bb
index 1f27814..d125308 100644
--- a/yocto-poky/meta/recipes-support/taglib/taglib_1.9.1.bb
+++ b/yocto-poky/meta/recipes-support/taglib/taglib_1.9.1.bb
@@ -12,6 +12,8 @@
 SRC_URI[md5sum] = "0d35df96822bbd564c5504cb3c2e4d86"
 SRC_URI[sha256sum] = "72d371cd1419a87ae200447a53bff2be219283071e80fd12337928cc967dc71a"
 
+UPSTREAM_CHECK_URI = "http://github.com/taglib/taglib/releases/"
+
 BINCONFIG = "${bindir}/taglib-config"
 
 inherit cmake pkgconfig binconfig-disabled
diff --git a/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch b/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch
index 2407771..9b99803 100644
--- a/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch
+++ b/yocto-poky/meta/recipes-support/vte/vte-0.28.2/cve-2012-2738.patch
@@ -1,4 +1,5 @@
 Upstream-Status: Backport
+CVE: CVE-2012-2738
 Signed-off-by: Ross Burton <ross.burton@intel.com>
 
 From e524b0b3bd8fad844ffa73927c199545b892cdbd Mon Sep 17 00:00:00 2001
diff --git a/yocto-poky/meta/recipes-support/vte/vte.inc b/yocto-poky/meta/recipes-support/vte/vte.inc
index 07b9e10..8565cc2 100644
--- a/yocto-poky/meta/recipes-support/vte/vte.inc
+++ b/yocto-poky/meta/recipes-support/vte/vte.inc
@@ -1,17 +1,15 @@
 SUMMARY = "Virtual terminal emulator GTK+ widget library"
 BUGTRACKER = "https://bugzilla.gnome.org/buglist.cgi?product=vte"
 LICENSE = "LGPLv2.0"
-DEPENDS = " glib-2.0 gtk+ intltool-native ncurses gobject-introspection-stub"
+DEPENDS = " glib-2.0 gtk+ intltool-native ncurses"
 RDEPENDS_libvte = "vte-termcap"
 
-inherit gnome gtk-doc distro_features_check
+inherit gnome gtk-doc distro_features_check upstream-version-is-even gobject-introspection
 ANY_OF_DISTRO_FEATURES = "${GTK2DISTROFEATURES}"
 
-EXTRA_OECONF = "--disable-python --disable-introspection"
+EXTRA_OECONF = "--disable-python"
 
 PACKAGES =+ "libvte vte-termcap"
 FILES_libvte = "${libdir}/*.so.* ${libexecdir}/gnome-pty-helper"
-FILES_${PN}-dbg =+ "${libexecdir}/.debug ${prefix}/src ${bindir}/.debug \
-               ${libdir}/.debug"
 FILES_vte-termcap = "${datadir}/vte/termcap-0.0"
 
diff --git a/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb b/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb
index 8b4e7f7..74087ca 100644
--- a/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb
+++ b/yocto-poky/meta/recipes-support/vte/vte_0.28.2.bb
@@ -5,7 +5,8 @@
 PR = "r6"
 
 SRC_URI += "file://obsolete_automake_macros.patch \
-            file://cve-2012-2738.patch"
+            file://cve-2012-2738.patch \
+           "
 
 CFLAGS += "-D_GNU_SOURCE"
 
diff --git a/yocto-poky/meta/recipes.txt b/yocto-poky/meta/recipes.txt
index 705386d..9e178d6 100644
--- a/yocto-poky/meta/recipes.txt
+++ b/yocto-poky/meta/recipes.txt
@@ -10,6 +10,5 @@
 recipes-lsb4         - Recipes added for the sole purpose of supporting the Linux Standard Base (LSB) 4.x
 recipes-multimedia   - Codecs and support utilties for audio, images and video
 recipes-rt           - Provides package and image recipes for using and testing the PREEMPT_RT kernel
-recipes-qt           - All things related to the Qt application framework
 recipes-sato         - The Sato demo/reference UI/UX, its associated apps and configuration 
 recipes-support      - Recipes used by other recipes but that are not directly included in images
diff --git a/yocto-poky/meta/site/arm-common b/yocto-poky/meta/site/arm-common
index 12e5d45..a3c979f 100644
--- a/yocto-poky/meta/site/arm-common
+++ b/yocto-poky/meta/site/arm-common
@@ -8,11 +8,6 @@
 ac_cv_header_netinet_sctp_uio_h=${ac_cv_header_netinet_sctp_uio_h=no}
 ac_cv_sctp=${ac_cv_sctp=no}
 
-# apache
-ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes}
-apr_cv_process_shared_works=${apr_cv_process_shared_works=no}
-apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes}
-
 # bash
 ac_cv_c_long_double=${ac_cv_c_long_double=yes}
 bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=missing}
diff --git a/yocto-poky/meta/site/arm-linux b/yocto-poky/meta/site/arm-linux
index 14b1889..e6b9a72 100644
--- a/yocto-poky/meta/site/arm-linux
+++ b/yocto-poky/meta/site/arm-linux
@@ -10,7 +10,6 @@
 ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
 ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=4}
 ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
-ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=4}
 ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
 ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2}
 ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
diff --git a/yocto-poky/meta/site/common-linux b/yocto-poky/meta/site/common-linux
index 8b5be68..0a752a4 100644
--- a/yocto-poky/meta/site/common-linux
+++ b/yocto-poky/meta/site/common-linux
@@ -1,6 +1,13 @@
+# gettext - these add sleep delays otherwise
+gl_cv_func_sleep_works=${gl_cv_func_sleep_works=yes}
+gl_cv_header_working_fcntl_h=${gl_cv_header_working_fcntl_h=yes}
+
 # apr
 ac_cv_file__dev_zero=${ac_cv_file__dev_zero=yes}
 ac_cv_sizeof_pid_t=${ac_cv_sizeof_pid_t=4}
+ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes}
+apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes}
+apr_cv_process_shared_works=${apr_cv_process_shared_works=no}
 
 # samba
 samba_cv_HAVE_IFACE_AIX=${samba_cv_HAVE_IFACE_AIX=no}
@@ -35,6 +42,10 @@
 bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes=present}
 bash_cv_unusable_rtsigs=${bash_cv_unusable_rtsigs=no}
 
+# ccache
+hw_cv_func_snprintf_c99=${hw_cv_func_snprintf_c99=yes}
+hw_cv_func_vsnprintf_c99=${hw_cv_func_vsnprintf_c99=yes}
+
 # coreutils
 gl_cv_func_fstatat_zero_flag=${gl_cv_func_fstatat_zero_flag=yes}
 
diff --git a/yocto-poky/meta/site/ix86-common b/yocto-poky/meta/site/ix86-common
index 5cd2ce2..23b8e8b 100644
--- a/yocto-poky/meta/site/ix86-common
+++ b/yocto-poky/meta/site/ix86-common
@@ -17,14 +17,12 @@
 ac_cv_sizeof_void_p=${ac_cv_sizeof_void_p=4}
 ac_cv_sizeof_long_p=${ac_cv_sizeof_long_p=4}
 ac_cv_sizeof_float=${ac_cv_sizeof_float=4}
-ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=4}
 ac_cv_sizeof_uid_t=${ac_cv_sizeof_uid_t=4}
 ac_cv_sizeof_gid_t=${ac_cv_sizeof_gid_t=4}
 ac_cv_sizeof_ino_t=${ac_cv_sizeof_ino_t=4}
 ac_cv_sizeof_dev_t=${ac_cv_sizeof_dev_t=8}
 ac_cv_func_lstat_dereferences_slashed_symlink=${ac_cv_func_lstat_dereferences_slashed_symlink=yes}
 ac_cv_func_lstat_empty_string_bug=${ac_cv_func_lstat_empty_string_bug=no}
-ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes}
 ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
 ac_cv_func_stat_empty_string_bug=${ac_cv_func_stat_empty_string_bug=no}
 ac_cv_func_stat_ignores_trailing_slash=${ac_cv_func_stat_ignores_trailing_slash=no}
@@ -35,9 +33,6 @@
 ac_cv_linux_vers=${ac_cv_linux_vers=2}
 ac_cv_sctp=${ac_cv_sctp=no}
 
-apr_cv_process_shared_works=${apr_cv_process_shared_works=no}
-apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes}
-
 ac_cv_path_ESD_CONFIG=no
 lf_cv_sane_realloc=yes
 jm_cv_func_gettimeofday_clobber=no
diff --git a/yocto-poky/meta/site/mips-common b/yocto-poky/meta/site/mips-common
index 89d72cb..5858dfb 100644
--- a/yocto-poky/meta/site/mips-common
+++ b/yocto-poky/meta/site/mips-common
@@ -30,10 +30,7 @@
 ac_cv_alignof_CORBA_struct=1
 
 # apache
-ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes}
-apr_cv_process_shared_works=${apr_cv_process_shared_works=no}
 ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4}
-apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes}
 
 # glib
 glib_cv_va_val_copy=${glib_cv_va_val_copy=yes}
diff --git a/yocto-poky/meta/site/nios2-linux b/yocto-poky/meta/site/nios2-linux
index 9e53e5d..95c09d3 100644
--- a/yocto-poky/meta/site/nios2-linux
+++ b/yocto-poky/meta/site/nios2-linux
@@ -7,10 +7,7 @@
 ac_cv_sctp=${ac_cv_sctp=no}
 
 # apache
-ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes}
-apr_cv_process_shared_works=${apr_cv_process_shared_works=no}
 ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4}
-apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes}
 
 # bash
 ac_cv_c_long_double=${ac_cv_c_long_double=yes}
@@ -244,7 +241,6 @@
 ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
 ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=4}
 ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
-ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=4}
 ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
 ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2}
 ac_cv_sizeof_size_t=${ac_cv_sizeof_size_t=4}
diff --git a/yocto-poky/meta/site/powerpc32-linux b/yocto-poky/meta/site/powerpc32-linux
index e3929ac..06d961f 100644
--- a/yocto-poky/meta/site/powerpc32-linux
+++ b/yocto-poky/meta/site/powerpc32-linux
@@ -38,8 +38,6 @@
 
 
 # apache
-ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes}
-apr_cv_process_shared_works=${apr_cv_process_shared_works=no}
 ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4}
 
 ac_cv_header_netinet_sctp_h=${ac_cv_header_netinet_sctp_h=no}
@@ -205,7 +203,6 @@
 apr_cv_pthreads_lib=${apr_cv_pthreads_lib=-lpthread}
 ac_cv_func_mmap=${ac_cv_func_mmap=yes}
 ac_cv_file__dev_zero=${ac_cv_file__dev_zero=yes}
-ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=4}
 ac_cv_sizeof_pid_t=${ac_cv_sizeof_pid_t=4}
 ac_cv_socklen_t=${ac_cv_socklen_t=yes}
 ac_cv_struct_rlimit=${ac_cv_struct_rlimit=yes}
diff --git a/yocto-poky/meta/site/sh-common b/yocto-poky/meta/site/sh-common
index bde416a..5cbf36a 100644
--- a/yocto-poky/meta/site/sh-common
+++ b/yocto-poky/meta/site/sh-common
@@ -29,9 +29,6 @@
 ac_cv_time_r_type=${ac_cv_time_r_type=POSIX}
 
 # apache
-ac_cv_func_pthread_key_delete=${ac_cv_func_pthread_key_delete=yes}
-apr_cv_process_shared_works=${apr_cv_process_shared_works=no}
-apr_cv_tcp_nodelay_with_cork=${apr_cv_tcp_nodelay_with_cork=yes}
 ac_cv_sizeof_ssize_t=${ac_cv_sizeof_ssize_t=4}
 
 ac_cv_header_netinet_sctp_h=${ac_cv_header_netinet_sctp_h=no}
diff --git a/yocto-poky/meta/site/x32-linux b/yocto-poky/meta/site/x32-linux
index 36ee68b..308d6e2 100644
--- a/yocto-poky/meta/site/x32-linux
+++ b/yocto-poky/meta/site/x32-linux
@@ -1,6 +1,5 @@
 # general
 ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=16}
-ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=8}
 ac_cv_sizeof_ino_t=${ac_cv_sizeof_ino_t=8}
 ac_cv_sizeof_dev_t=${ac_cv_sizeof_dev_t=8}
 ac_cv_sys_file_offset_bits=${ac_cv_sys_file_offset_bits=64}
diff --git a/yocto-poky/meta/site/x86_64-linux b/yocto-poky/meta/site/x86_64-linux
index 573a907..ebdcf69 100644
--- a/yocto-poky/meta/site/x86_64-linux
+++ b/yocto-poky/meta/site/x86_64-linux
@@ -18,7 +18,6 @@
 ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double=16}
 ac_cv_sizeof_long_int=${ac_cv_sizeof_long_int=8}
 ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long=8}
-ac_cv_sizeof_off_t=${ac_cv_sizeof_off_t=8}
 ac_cv_sizeof_short=${ac_cv_sizeof_short=2}
 ac_cv_sizeof_unsigned_short=${ac_cv_sizeof_unsigned_short=2}
 ac_cv_sizeof_short_int=${ac_cv_sizeof_short_int=2}
diff --git a/yocto-poky/oe-init-build-env b/yocto-poky/oe-init-build-env
index 6fee5f7..5fe68d1 100755
--- a/yocto-poky/oe-init-build-env
+++ b/yocto-poky/oe-init-build-env
@@ -19,44 +19,49 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 #
-# Normally this is called as '. ./oe-init-build-env builddir'
+# Normally this is called as '. ./oe-init-build-env <builddir>'
 #
-# This works in most shells (not dash), but not all of them pass arg1 when
-# being sourced.   To workaround the shell limitation use "set arg1" prior 
-# to sourcing this script.
+# This works in most shells (not dash), but not all of them pass the arguments
+# when being sourced.  To workaround the shell limitation use "set <builddir>"
+# prior to sourcing this script.
 #
 if [ -n "$BASH_SOURCE" ]; then
-   OEROOT="`dirname $BASH_SOURCE`"
+    THIS_SCRIPT=$BASH_SOURCE
 elif [ -n "$ZSH_NAME" ]; then
-   OEROOT="`dirname $0`"
+    THIS_SCRIPT=$0
 else
-   OEROOT="`pwd`"
+    THIS_SCRIPT="$(pwd)/oe-init-build-env"
 fi
 if [ -n "$BBSERVER" ]; then
-   unset BBSERVER
+    unset BBSERVER
 fi
-THIS_SCRIPT=$OEROOT/oe-init-build-env
 
 if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then
-   echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
-   exit 1
+    echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
+    exit 1
 fi
 
-OEROOT=`readlink -f "$OEROOT"`
-export OEROOT
-. $OEROOT/scripts/oe-buildenv-internal && \
-     $OEROOT/scripts/oe-setup-builddir && \
-     [ -n "$BUILDDIR" ] && cd "$BUILDDIR"
-unset OEROOT
-unset BBPATH
+if [ -z "$OEROOT" ]; then
+    OEROOT=$(dirname "$THIS_SCRIPT")
+    OEROOT=$(readlink -f "$OEROOT")
+fi
 unset THIS_SCRIPT
 
+export OEROOT
+. $OEROOT/scripts/oe-buildenv-internal &&
+    TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir || {
+    unset OEROOT
+    return 1
+}
+unset OEROOT
+
+[ -z "$BUILDDIR" ] || cd "$BUILDDIR"
+
 # Shutdown any bitbake server if the BBSERVER variable is not set
-if [ -z "$BBSERVER" ] && [ -f bitbake.lock ] ; then
-    grep ":" bitbake.lock > /dev/null && BBSERVER=`cat bitbake.lock` bitbake --status-only
-    if [ $? = 0 ] ; then
-	echo "Shutting down bitbake memory resident server with bitbake -m"
-	BBSERVER=`cat bitbake.lock` bitbake -m
+if [ -z "$BBSERVER" ] && [ -f bitbake.lock ]; then
+    grep ":" bitbake.lock > /dev/null && BBSERVER=$(cat bitbake.lock) bitbake --status-only
+    if [ $? = 0 ]; then
+        echo "Shutting down bitbake memory resident server with bitbake -m"
+        BBSERVER=$(cat bitbake.lock) bitbake -m
     fi
 fi
-
diff --git a/yocto-poky/oe-init-build-env-memres b/yocto-poky/oe-init-build-env-memres
index c1dc4fe..9e1425e 100755
--- a/yocto-poky/oe-init-build-env-memres
+++ b/yocto-poky/oe-init-build-env-memres
@@ -19,11 +19,11 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 #
-# Normally this is called as '. ./oe-init-build-env builddir <portnumber> <builddir>'
+# Normally this is called as '. ./oe-init-build-env-memres <portnumber> <builddir>'
 #
-# This works in most shells (not dash), but not all of them pass arg1 when
-# being sourced.   To workaround the shell limitation use "set arg1" prior 
-# to sourcing this script.
+# This works in most shells (not dash), but not all of them pass the arguments
+# when being sourced.  To workaround the shell limitation use "set <portnumber>
+# <builddir>" prior to sourcing this script.
 #
 if [ -z "$1" ]; then
     echo "No port specified, using dynamically selected port"
@@ -34,51 +34,57 @@
 fi
 
 if [ -n "$BASH_SOURCE" ]; then
-  OEROOT="`dirname $BASH_SOURCE`"
+    THIS_SCRIPT=$BASH_SOURCE
 elif [ -n "$ZSH_NAME" ]; then
-  OEROOT="`dirname $0`"
+    THIS_SCRIPT=$0
 else
-  OEROOT="`pwd`"
+    THIS_SCRIPT="$(pwd)/oe-init-build-env"
 fi
 if [ -n "$BBSERVER" ]; then
-  unset BBSERVER
+    unset BBSERVER
 fi
 
-THIS_SCRIPT=$OEROOT/oe-init-build-env-memres
-if [ -z "$ZSH_NAME" ] && [ "x$0" = "x$THIS_SCRIPT" ]; then
-   echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
-   exit 1
+if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then
+    echo "Error: This script needs to be sourced. Please run as '. $THIS_SCRIPT'"
+    exit 1
 fi
 
-OEROOT=`readlink -f "$OEROOT"`
-export OEROOT
-. $OEROOT/scripts/oe-buildenv-internal && \
-    $OEROOT/scripts/oe-setup-builddir && \
-    [ -n "$BUILDDIR" ] && cd $BUILDDIR
-unset OEROOT
-unset BBPATH
+if [ -z "$OEROOT" ]; then
+    OEROOT=$(dirname "$THIS_SCRIPT")
+    OEROOT=$(readlink -f "$OEROOT")
+fi
 unset THIS_SCRIPT
 
+export OEROOT
+. $OEROOT/scripts/oe-buildenv-internal &&
+    TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir || {
+    unset OEROOT
+    return 1
+}
+unset OEROOT
+
+[ -z "$BUILDDIR" ] || cd "$BUILDDIR"
+
 res=1
-if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null ; then
-    BBSERVER=`cat bitbake.lock` bitbake --status-only
+if [ -e bitbake.lock ] && grep : bitbake.lock > /dev/null; then
+    BBSERVER=$(cat bitbake.lock) bitbake --status-only
     res=$?
 fi
 
-if [ $res != 0 ] ; then
+if [ $res != 0 ]; then
     bitbake --server-only -t xmlrpc -B localhost:$port
 fi
 
-if [ $port = -1 ] ; then
+if [ $port = -1 ]; then
     export BBSERVER=localhost:-1
     echo "Bitbake server started on demand as needed, use bitbake -m to shut it down"
 else
-    export BBSERVER=`cat bitbake.lock`
+    export BBSERVER=$(cat bitbake.lock)
 
-    if [ $res = 0 ] ; then
-	echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down"
+    if [ $res = 0 ]; then
+        echo "Using existing bitbake server at: $BBSERVER, use bitbake -m to shut it down"
     else
-	echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down"
+        echo "Bitbake server started at: $BBSERVER, use bitbake -m to shut it down"
     fi
-    unset res
 fi
+unset port res
diff --git a/yocto-poky/scripts/bitbake-prserv-tool b/yocto-poky/scripts/bitbake-prserv-tool
index 28c2416..fa31b52 100755
--- a/yocto-poky/scripts/bitbake-prserv-tool
+++ b/yocto-poky/scripts/bitbake-prserv-tool
@@ -86,6 +86,15 @@
 
 [ $# -eq 0 ] && help  && exit 1
 
+case $2 in
+*.conf|*.inc)
+    ;;
+*)
+    echo ERROR: $2 must end with .conf or .inc!
+    exit 1
+    ;;
+esac
+
 case $1 in
 export)
     do_export $2
diff --git a/yocto-poky/scripts/bitbake-whatchanged b/yocto-poky/scripts/bitbake-whatchanged
index 55cfe4b..af54d16 100755
--- a/yocto-poky/scripts/bitbake-whatchanged
+++ b/yocto-poky/scripts/bitbake-whatchanged
@@ -190,7 +190,7 @@
             if sigdata_re.match(full_path_old) and sigdata_re.match(full_path_new):
                 output = bb.siggen.compare_sigfiles(full_path_old, full_path_new)
                 if output:
-                    print("\n=== The verbose changes of %s.do_%s:" % (pn, task))
+                    print("\n=== The verbose changes of %s.%s:" % (pn, task))
                     print('\n'.join(output))
         else:
             # Format the output, the format is:
diff --git a/yocto-poky/scripts/buildhistory-collect-srcrevs b/yocto-poky/scripts/buildhistory-collect-srcrevs
index 58a2708..f3eb76b 100755
--- a/yocto-poky/scripts/buildhistory-collect-srcrevs
+++ b/yocto-poky/scripts/buildhistory-collect-srcrevs
@@ -18,7 +18,9 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-import os, sys
+import collections
+import os
+import sys
 import optparse
 import logging
 
@@ -65,16 +67,13 @@
     else:
         forcevariable = ''
 
-    lastdir = ''
+    all_srcrevs = collections.defaultdict(list)
     for root, dirs, files in os.walk(options.buildhistory_dir):
         if '.git' in dirs:
             dirs.remove('.git')
         for fn in files:
             if fn == 'latest_srcrev':
                 curdir = os.path.basename(os.path.dirname(root))
-                if lastdir != curdir:
-                    print('# %s' % curdir)
-                    lastdir = curdir
                 fullpath = os.path.join(root, fn)
                 pn = os.path.basename(root)
                 srcrev = None
@@ -98,11 +97,20 @@
                             name = splitval[0].split('_')[1].strip()
                             srcrevs[name] = value
                 if srcrev and (options.reportall or srcrev != orig_srcrev):
-                    print('SRCREV_pn-%s%s = "%s"' % (pn, forcevariable, srcrev))
+                    all_srcrevs[curdir].append((pn, None, srcrev))
                 for name, value in srcrevs.items():
                     orig = orig_srcrevs.get(name, orig_srcrev)
                     if options.reportall or value != orig:
-                        print('SRCREV_%s_pn-%s%s = "%s"' % (name, pn, forcevariable, value))
+                        all_srcrevs[curdir].append((pn, name, srcrev))
+
+    for curdir, srcrevs in sorted(all_srcrevs.iteritems()):
+        if srcrevs:
+            print('# %s' % curdir)
+            for pn, name, srcrev in srcrevs:
+                if name:
+                    print('SRCREV_%s_pn-%s%s = "%s"' % (name, pn, forcevariable, srcrev))
+                else:
+                    print('SRCREV_pn-%s%s = "%s"' % (pn, forcevariable, srcrev))
 
 
 if __name__ == "__main__":
diff --git a/yocto-poky/scripts/cleanup-workdir b/yocto-poky/scripts/cleanup-workdir
index a7f5a3a..01ebd52 100755
--- a/yocto-poky/scripts/cleanup-workdir
+++ b/yocto-poky/scripts/cleanup-workdir
@@ -194,5 +194,5 @@
     except Exception:
         ret = 2
         import traceback
-        traceback.print_exc(3)
+        traceback.print_exc()
     sys.exit(ret)
diff --git a/yocto-poky/scripts/combo-layer b/yocto-poky/scripts/combo-layer
index 7435a17..9127041 100755
--- a/yocto-poky/scripts/combo-layer
+++ b/yocto-poky/scripts/combo-layer
@@ -73,7 +73,7 @@
                 else:
                     # Apply special type transformations for some properties.
                     # Type matches the RawConfigParser.get*() methods.
-                    types = {'signoff': 'boolean'}
+                    types = {'signoff': 'boolean', 'update': 'boolean'}
                     if name in types:
                         value = getattr(parser, 'get' + types[name])(section, name)
                     self.repos[repo][name] = value
@@ -380,7 +380,7 @@
                             if not parent:
                                 parent = '.'
                             # May run outside of the current directory, so do not assume that .git exists.
-                            filter_branch.extend(['--tree-filter', 'mkdir -p .git/tmptree && mv $(ls -1 -a | grep -v -e ^.git$ -e ^.$ -e ^..$) .git/tmptree && mkdir -p %s && mv .git/tmptree %s' % (parent, dest_dir)])
+                            filter_branch.extend(['--tree-filter', 'mkdir -p .git/tmptree && find . -mindepth 1 -maxdepth 1 ! -name .git -print0 | xargs -0 -I SOURCE mv SOURCE .git/tmptree && mkdir -p %s && mv .git/tmptree %s' % (parent, dest_dir)])
                         filter_branch.append('HEAD')
                         runcmd(filter_branch)
                         runcmd('git update-ref -d refs/original/refs/heads/%s' % name)
@@ -567,7 +567,7 @@
             sys.exit(1)
 
     if not repos:
-        repos = conf.repos
+        repos = [ repo for repo in conf.repos if conf.repos[repo].get("update", True) ]
 
     return repos
 
@@ -662,7 +662,14 @@
             patch_cmd_range = "%s..%s" % (repo['last_revision'], top_revision)
             rev_cmd_range = patch_cmd_range
 
-        file_filter = repo.get('file_filter',"")
+        file_filter = repo.get('file_filter',".")
+
+        # Filter out unwanted files
+        exclude = repo.get('file_exclude', '')
+        if exclude:
+            for path in exclude.split():
+                p = "%s/%s" % (dest_dir, path) if dest_dir != '.' else path
+                file_filter += " ':!%s'" % p
 
         patch_cmd = "git format-patch -N %s --output-directory %s %s -- %s" % \
             (prefix,repo_patch_dir, patch_cmd_range, file_filter)
@@ -681,38 +688,6 @@
                 runcmd("%s %s %s %s" % (repo['hook'], patch, revlist[count], name))
                 count=count-1
 
-        # Step 3a: Filter out unwanted files and patches.
-        exclude = repo.get('file_exclude', '')
-        if exclude:
-            filter = ['filterdiff', '-p1']
-            for path in exclude.split():
-                filter.append('-x')
-                filter.append('%s/%s' % (dest_dir, path) if dest_dir != '.' else path)
-            for patch in patchlist[:]:
-                filtered = patch + '.tmp'
-                with open(filtered, 'w') as f:
-                    runcmd(filter + [patch], out=f)
-                # Now check for empty patches.
-                if runcmd(['filterdiff', '--list', filtered]):
-                    # Possibly modified.
-                    os.unlink(patch)
-                    os.rename(filtered, patch)
-                else:
-                    # Empty, ignore it. Must also remove from revlist.
-                    with open(patch, 'r') as f:
-                        fromline = f.readline()
-                    if not fromline:
-                        # Patch must have been empty to start with. No need
-                        # to remove it.
-                        continue
-                    m = re.match(r'''^From ([0-9a-fA-F]+) .*\n''', fromline)
-                    rev = m.group(1)
-                    logger.debug('skipping empty patch %s = %s' % (patch, rev))
-                    os.unlink(patch)
-                    os.unlink(filtered)
-                    patchlist.remove(patch)
-                    revlist.remove(rev)
-
         # Step 4: write patch list and revision list to file, for user to edit later
         patchlist_file = os.path.join(os.getcwd(), patch_dir, "patchlist-%s" % name)
         repo['patchlist'] = patchlist_file
@@ -945,5 +920,5 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
diff --git a/yocto-poky/scripts/contrib/build-perf-test.sh b/yocto-poky/scripts/contrib/build-perf-test.sh
index cdd7885..7d99228 100755
--- a/yocto-poky/scripts/contrib/build-perf-test.sh
+++ b/yocto-poky/scripts/contrib/build-perf-test.sh
@@ -128,7 +128,7 @@
 OUTDIR="$clonedir/build-perf-test/results-$rev-`date "+%Y%m%d%H%M%S"`"
 BUILDDIR="$OUTDIR/build"
 resultsfile="$OUTDIR/results.log"
-bboutput="$OUTDIR/bitbake.log"
+cmdoutput="$OUTDIR/commands.log"
 myoutput="$OUTDIR/output.log"
 globalres="$clonedir/build-perf-test/globalres.log"
 
@@ -180,14 +180,13 @@
 declare -a SIZES
 size_count=0
 
-bbtime () {
-    local arg="$@"
-    log "   Timing: bitbake ${arg}"
+time_cmd () {
+    log "   Timing: $*"
 
     if [ $verbose -eq 0 ]; then 
-        /usr/bin/time -v -o $resultsfile bitbake ${arg} >> $bboutput
+        /usr/bin/time -v -o $resultsfile "$@" >> $cmdoutput
     else
-        /usr/bin/time -v -o $resultsfile bitbake ${arg}
+        /usr/bin/time -v -o $resultsfile "$@"
     fi
     ret=$?
     if [ $ret -eq 0 ]; then
@@ -206,12 +205,16 @@
     log "More stats can be found in ${resultsfile}.${i}"    
 }
 
+bbtime () {
+    time_cmd bitbake "$@"
+}
+
 #we don't time bitbake here
 bbnotime () {
     local arg="$@"
     log "   Running: bitbake ${arg}"
     if [ $verbose -eq 0 ]; then
-        bitbake ${arg} >> $bboutput
+        bitbake ${arg} >> $cmdoutput
     else
         bitbake ${arg}
     fi
@@ -350,6 +353,33 @@
     bbtime -p
 }
 
+#
+# Test 4 - eSDK
+# Measure: eSDK size and installation time
+test4 () {
+    log "Running Test 4: eSDK size and installation time"
+    bbnotime $IMAGE -c do_populate_sdk_ext
+
+    esdk_installer=(tmp/deploy/sdk/*-toolchain-ext-*.sh)
+
+    if [ ${#esdk_installer[*]} -eq 1 ]; then
+        s=$((`stat -c %s "$esdk_installer"` / 1024))
+        SIZES[(( size_count++ ))]="$s"
+        log "Download SIZE of eSDK is: $s kB"
+
+        do_sync
+        time_cmd "$esdk_installer" -y -d "tmp/esdk-deploy"
+
+        s=$((`du -sb "tmp/esdk-deploy" | cut -f1` / 1024))
+        SIZES[(( size_count++ ))]="$s"
+        log "Install SIZE of eSDK is: $s kB"
+    else
+        log "ERROR: other than one sdk found (${esdk_installer[*]}), reporting size and time as 0."
+        SIZES[(( size_count++ ))]="0"
+        TIMES[(( time_count++ ))]="0"
+    fi
+
+}
 
 
 # RUN!
@@ -359,6 +389,7 @@
 test1_p3
 test2
 test3
+test4
 
 # if we got til here write to global results
 write_results
diff --git a/yocto-poky/scripts/contrib/devtool-stress.py b/yocto-poky/scripts/contrib/devtool-stress.py
index 4b35fc9..8cf92ca 100755
--- a/yocto-poky/scripts/contrib/devtool-stress.py
+++ b/yocto-poky/scripts/contrib/devtool-stress.py
@@ -35,6 +35,7 @@
 scripts_lib_path = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'lib'))
 sys.path.insert(0, scripts_lib_path)
 import scriptutils
+import argparse_oe
 logger = scriptutils.logger_create('devtool-stress')
 
 def select_recipes(args):
@@ -204,8 +205,8 @@
 
 
 def main():
-    parser = argparse.ArgumentParser(description="devtool stress tester",
-                                     epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
+    parser = argparse_oe.ArgumentParser(description="devtool stress tester",
+                                        epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
     parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
     parser.add_argument('-r', '--resume-from', help='Resume from specified recipe', metavar='PN')
     parser.add_argument('-o', '--only', help='Only test specified recipes (comma-separated without spaces, wildcards allowed)', metavar='PNLIST')
diff --git a/yocto-poky/scripts/contrib/mkefidisk.sh b/yocto-poky/scripts/contrib/mkefidisk.sh
index cd4de05..333284f 100755
--- a/yocto-poky/scripts/contrib/mkefidisk.sh
+++ b/yocto-poky/scripts/contrib/mkefidisk.sh
@@ -402,7 +402,7 @@
 	sed -i "s/ LABEL=[^ ]*/ /" $GRUB_CFG
 
 	sed -i "s@ root=[^ ]*@ @" $GRUB_CFG
-	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait quiet @" $GRUB_CFG
+	sed -i "s@vmlinuz @vmlinuz root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $GRUB_CFG
 fi
 
 # Look for a gummiboot installation
@@ -419,7 +419,7 @@
 
 	sed -i "/initrd /d" $GUMMI_CFG
 	sed -i "s@ root=[^ ]*@ @" $GUMMI_CFG
-	sed -i "s@options *LABEL=boot @options LABEL=Boot root=$TARGET_ROOTFS ro rootwait quiet @" $GUMMI_CFG
+	sed -i "s@options *LABEL=boot @options LABEL=Boot root=$TARGET_ROOTFS ro rootwait console=ttyS0 console=tty0 @" $GUMMI_CFG
 fi
 
 # Ensure we have at least one EFI bootloader configured
@@ -438,6 +438,9 @@
 	echo "$TARGET_DEVICE" >> $ROOTFS_MNT/etc/udev/mount.blacklist
 fi
 
+# Add startup.nsh script for automated boot
+echo "fs0:\EFI\BOOT\bootx64.efi" > $BOOTFS_MNT/startup.nsh
+
 
 # Call cleanup to unmount devices and images and remove the TMPDIR
 cleanup
diff --git a/yocto-poky/scripts/contrib/python/generate-manifest-2.7.py b/yocto-poky/scripts/contrib/python/generate-manifest-2.7.py
index 936522e..d93c943 100755
--- a/yocto-poky/scripts/contrib/python/generate-manifest-2.7.py
+++ b/yocto-poky/scripts/contrib/python/generate-manifest-2.7.py
@@ -164,7 +164,7 @@
     #
 
     m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re",
-    "__future__.* _abcoll.* abc.* copy.* copy_reg.* ConfigParser.* " +
+    "__future__.* _abcoll.* abc.* ast.* copy.* copy_reg.* ConfigParser.* " +
     "genericpath.* getopt.* linecache.* new.* " +
     "os.* posixpath.* struct.* " +
     "warnings.* site.* stat.* " +
@@ -244,16 +244,12 @@
     m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils",
     "config/lib*.a" ) # package
 
-    m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core",
+    m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core ${PN}-email",
     "config distutils" ) # package
 
     m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
     "doctest.*" )
 
-    # FIXME consider adding to some higher level package
-    m.addPackage( "${PN}-elementtree", "Python elementree", "${PN}-core",
-    "lib-dynload/_elementtree.so" )
-
     m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
     "imaplib.* email" ) # package
 
@@ -322,6 +318,9 @@
     m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core",
     "pkgutil.*")
 
+    m.addPackage( "${PN}-plistlib", "Generate and parse Mac OS X .plist files", "${PN}-core ${PN}-datetime ${PN}-io",
+    "plistlib.*")
+
     m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io",
     "pprint.*" )
 
@@ -376,8 +375,8 @@
     m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core",
     "lib-dynload/nis.so lib-dynload/grp.so lib-dynload/pwd.so getpass.*" )
 
-    m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-elementtree ${PN}-re",
-    "lib-dynload/pyexpat.so xml xmllib.*" ) # package
+    m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-re",
+    "lib-dynload/_elementtree.so lib-dynload/pyexpat.so xml xmllib.*" ) # package
 
     m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang",
     "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.*" )
diff --git a/yocto-poky/scripts/contrib/python/generate-manifest-3.4.py b/yocto-poky/scripts/contrib/python/generate-manifest-3.4.py
deleted file mode 100755
index ca2fa61..0000000
--- a/yocto-poky/scripts/contrib/python/generate-manifest-3.4.py
+++ /dev/null
@@ -1,388 +0,0 @@
-#!/usr/bin/env python
-
-# generate Python Manifest for the OpenEmbedded build system
-# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# (C) 2007 Jeremy Laine
-# licensed under MIT, see COPYING.MIT
-#
-# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
-#  * Updated to no longer generate special -dbg package, instead use the
-#    single system -dbg
-#  * Update version with ".1" to indicate this change
-#
-# 2014 Khem Raj <raj.khem@gmail.com>
-# Added python3 support
-#
-import os
-import sys
-import time
-
-VERSION = "3.4.2"
-
-__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
-__version__ = "20140131"
-
-class MakefileMaker:
-
-    def __init__( self, outfile ):
-        """initialize"""
-        self.packages = {}
-        self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
-        self.output = outfile
-        self.out( """
-# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: '%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
-# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
-""" % ( sys.argv[0], __version__ ) )
-
-    #
-    # helper functions
-    #
-
-    def out( self, data ):
-        """print a line to the output file"""
-        self.output.write( "%s\n" % data )
-
-    def setPrefix( self, targetPrefix ):
-        """set a file prefix for addPackage files"""
-        self.targetPrefix = targetPrefix
-
-    def doProlog( self ):
-        self.out( """ """ )
-        self.out( "" )
-
-    def addPackage( self, name, description, dependencies, filenames ):
-        """add a package to the Makefile"""
-        if type( filenames ) == type( "" ):
-            filenames = filenames.split()
-        fullFilenames = []
-        for filename in filenames:
-            if filename[0] != "$":
-                fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
-            else:
-                fullFilenames.append( filename )
-        self.packages[name] = description, dependencies, fullFilenames
-
-    def doBody( self ):
-        """generate body of Makefile"""
-
-        global VERSION
-
-        #
-        # generate provides line
-        #
-
-        provideLine = 'PROVIDES+="'
-        for name in sorted(self.packages):
-            provideLine += "%s " % name
-        provideLine += '"'
-
-        self.out( provideLine )
-        self.out( "" )
-
-        #
-        # generate package line
-        #
-
-        packageLine = 'PACKAGES="${PN}-dbg '
-        for name in sorted(self.packages):
-            if name.startswith("${PN}-distutils"):
-                if name == "${PN}-distutils":
-                    packageLine += "%s-staticdev %s " % (name, name)
-            elif name != '${PN}-dbg':
-                packageLine += "%s " % name
-        packageLine += '${PN}-modules"'
-
-        self.out( packageLine )
-        self.out( "" )
-
-        #
-        # generate package variables
-        #
-
-        for name, data in sorted(self.packages.iteritems()):
-            desc, deps, files = data
-
-            #
-            # write out the description, revision and dependencies
-            #
-            self.out( 'SUMMARY_%s="%s"' % ( name, desc ) )
-            self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) )
-
-            line = 'FILES_%s="' % name
-
-            #
-            # check which directories to make in the temporary directory
-            #
-
-            dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
-            for target in files:
-                dirset[os.path.dirname( target )] = True
-
-            #
-            # generate which files to copy for the target (-dfR because whole directories are also allowed)
-            #
-
-            for target in files:
-                line += "%s " % target
-
-            line += '"'
-            self.out( line )
-            self.out( "" )
-
-        self.out( 'SUMMARY_${PN}-modules="All Python modules"' )
-        line = 'RDEPENDS_${PN}-modules="'
-
-        for name, data in sorted(self.packages.iteritems()):
-            if name not in ['${PN}-dev', '${PN}-distutils-staticdev']:
-                line += "%s " % name
-
-        self.out( "%s \"" % line )
-        self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' )
-
-    def doEpilog( self ):
-        self.out( """""" )
-        self.out( "" )
-
-    def make( self ):
-        self.doProlog()
-        self.doBody()
-        self.doEpilog()
-
-if __name__ == "__main__":
-
-    if len( sys.argv ) > 1:
-        try:
-            os.unlink(sys.argv[1])
-        except Exception:
-            sys.exc_clear()
-        outfile = file( sys.argv[1], "w" )
-    else:
-        outfile = sys.stdout
-
-    m = MakefileMaker( outfile )
-
-    # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
-    # Parameters: revision, name, description, dependencies, filenames
-    #
-
-    m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math",
-    "__future__.* _abcoll.* abc.* copy.* copyreg.* ConfigParser.* " +
-    "genericpath.* getopt.* linecache.* new.* " +
-    "os.* posixpath.* struct.* " +
-    "warnings.* site.* stat.* " +
-    "UserDict.* UserList.* UserString.* " +
-    "lib-dynload/binascii.*.so lib-dynload/_struct.*.so lib-dynload/time.*.so " +
-    "lib-dynload/xreadlines.*.so types.* platform.* ${bindir}/python* "  + 
-    "_weakrefset.* sysconfig.* _sysconfigdata.* config/Makefile " +
-    "${includedir}/python${PYTHON_BINABI}/pyconfig*.h " +
-    "${libdir}/python${PYTHON_MAJMIN}/collections " +
-    "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* " +
-    "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* " +
-    "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
-
-    m.addPackage( "${PN}-dev", "Python development package", "${PN}-core",
-    "${includedir} " +
-    "${libdir}/lib*${SOLIBSDEV} " +
-    "${libdir}/*.la " +
-    "${libdir}/*.a " +
-    "${libdir}/*.o " +
-    "${libdir}/pkgconfig " +
-    "${base_libdir}/*.a " +
-    "${base_libdir}/*.o " +
-    "${datadir}/aclocal " +
-    "${datadir}/pkgconfig " )
-
-    m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core",
-    "lib2to3" ) # package
-
-    m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter",
-    "${bindir}/idle idlelib" ) # package
-
-    m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re",
-    "${bindir}/pydoc pydoc.* pydoc_data" )
-
-    m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime",
-    "${bindir}/smtpd.* smtpd.*" )
-
-    m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core",
-    "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.*.so lib-dynload/audioop.*.so audiodev.* sunaudio.* sunau.* toaiff.*" )
-
-    m.addPackage( "${PN}-asyncio", "Python Asynchronous I/O, event loop, coroutines and tasks", "${PN}-core",
-    "asyncio" )
-
-    m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang",
-    "codecs.* encodings gettext.* locale.* lib-dynload/_locale.*.so lib-dynload/_codecs* lib-dynload/_multibytecodec.*.so lib-dynload/unicodedata.*.so stringprep.* xdrlib.*" )
-
-    m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core",
-    "py_compile.* compileall.*" )
-
-    m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-codecs",
-    "gzip.* zipfile.* tarfile.* lib-dynload/bz2.*.so" )
-
-    m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core",
-    "hashlib.* md5.* sha.* lib-dynload/crypt.*.so lib-dynload/_hashlib.*.so lib-dynload/_sha256.*.so lib-dynload/_sha512.*.so" )
-
-    m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold",
-    "lib-dynload/_csv.*.so csv.* optparse.* textwrap.*" )
-
-    m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core",
-    "curses lib-dynload/_curses.*.so lib-dynload/_curses_panel.*.so" ) # directory + low level module
-
-    m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core",
-    "ctypes lib-dynload/_ctypes.*.so lib-dynload/_ctypes_test.*.so" ) # directory + low level module
-
-    m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs",
-    "_strptime.* calendar.* lib-dynload/datetime.*.so" )
-
-    m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core",
-    "anydbm.* dumbdbm.* whichdb.* dbm lib-dynload/_dbm.*.so" )
-
-    m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil",
-    "bdb.* pdb.*" )
-
-    m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re",
-    "difflib.*" )
-
-    m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils",
-    "config/lib*.a" ) # package
-
-    m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core",
-    "config distutils" ) # package
-
-    m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
-    "doctest.*" )
-
-    # FIXME consider adding to some higher level package
-    m.addPackage( "${PN}-elementtree", "Python elementree", "${PN}-core",
-    "lib-dynload/_elementtree.*.so" )
-
-    m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
-    "imaplib.* email" ) # package
-
-    m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core",
-    "lib-dynload/fcntl.*.so" )
-
-    m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
-    "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " )
-
-    m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core",
-    "importlib" )
-
-    m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
-    "lib-dynload/_gdbm.*.so" )
-
-    m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core",
-    "colorsys.* imghdr.* lib-dynload/imageop.*.so lib-dynload/rgbimg.*.so" )
-
-    m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math",
-    "lib-dynload/_socket.*.so lib-dynload/_io.*.so lib-dynload/_ssl.*.so lib-dynload/select.*.so lib-dynload/termios.*.so lib-dynload/cStringIO.*.so " +
-    "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
-
-    m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re",
-    "json lib-dynload/_json.*.so" ) # package
-
-    m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core",
-    "lib-dynload/_bisect.*.so lib-dynload/_collections.*.so lib-dynload/_heapq.*.so lib-dynload/_weakref.*.so lib-dynload/_functools.*.so " +
-    "lib-dynload/array.*.so lib-dynload/itertools.*.so lib-dynload/operator.*.so lib-dynload/parser.*.so " +
-    "atexit.* bisect.* code.* codeop.* collections.* _collections_abc.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* repr.* token.* " +
-    "tokenize.* traceback.* weakref.*" )
-
-    m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold",
-    "logging" ) # package
-
-    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
-    "mailbox.*" )
-
-    m.addPackage( "${PN}-math", "Python math support", "${PN}-core",
-    "lib-dynload/cmath.*.so lib-dynload/math.*.so lib-dynload/_random.*.so random.* sets.*" )
-
-    m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io",
-    "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" )
-
-    m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io",
-    "lib-dynload/mmap.*.so " )
-
-    m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap",
-    "lib-dynload/_multiprocessing.*.so multiprocessing" ) # package
-
-    m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime",
-    "*Cookie*.* " +
-    "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib  uuid.* rfc822.* mimetools.*" )
-
-    m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
-    "cgi.* *HTTPServer.* SocketServer.*" )
-
-    m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re",
-    "decimal.* fractions.* numbers.*" )
-
-    m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
-    "pickle.* shelve.* lib-dynload/cPickle.*.so pickletools.*" )
-
-    m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core",
-    "pkgutil.*")
-
-    m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io",
-    "pprint.*" )
-
-    m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils",
-    "profile.* pstats.* cProfile.* lib-dynload/_lsprof.*.so" )
-
-    m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core",
-    "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
-
-    m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core",
-    "lib-dynload/readline.*.so rlcompleter.*" )
-
-    m.addPackage( "${PN}-reprlib", "Python alternate repr() implementation", "${PN}-core",
-    "reprlib.py" )
-
-    m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core",
-    "lib-dynload/resource.*.so" )
-
-    m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re",
-    "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" )
-
-    m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle",
-    "subprocess.*" )
-
-    m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading",
-    "lib-dynload/_sqlite3.*.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" )
-
-    m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3",
-    "sqlite3/test" )
-
-    m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re",
-    "lib-dynload/strop.*.so string.* stringold.*" )
-
-    m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core",
-    "lib-dynload/syslog.*.so" )
-
-    m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io",
-    "pty.* tty.*" )
-
-    m.addPackage( "${PN}-tests", "Python tests", "${PN}-core",
-    "test" ) # package
-
-    m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang",
-    "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* Queue.*" )
-
-    m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core",
-    "lib-dynload/_tkinter.*.so lib-tk tkinter" ) # package
-
-    m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell",
-    "unittest/" )
-
-    m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core",
-    "lib-dynload/nis.*.so lib-dynload/grp.*.so lib-dynload/pwd.*.so getpass.*" )
-
-    m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-elementtree ${PN}-re",
-    "lib-dynload/pyexpat.*.so xml xmllib.*" ) # package
-
-    m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang",
-    "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.* xmlrpc" )
-
-    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
-    "mailbox.*" )
-
-    m.make()
diff --git a/yocto-poky/scripts/contrib/python/generate-manifest-3.5.py b/yocto-poky/scripts/contrib/python/generate-manifest-3.5.py
new file mode 100755
index 0000000..367b4b8
--- /dev/null
+++ b/yocto-poky/scripts/contrib/python/generate-manifest-3.5.py
@@ -0,0 +1,384 @@
+#!/usr/bin/env python
+
+# generate Python Manifest for the OpenEmbedded build system
+# (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# (C) 2007 Jeremy Laine
+# licensed under MIT, see COPYING.MIT
+#
+# June 22, 2011 -- Mark Hatle <mark.hatle@windriver.com>
+#  * Updated to no longer generate special -dbg package, instead use the
+#    single system -dbg
+#  * Update version with ".1" to indicate this change
+#
+# 2014 Khem Raj <raj.khem@gmail.com>
+# Added python3 support
+#
+import os
+import sys
+import time
+
+VERSION = "3.5.0"
+
+__author__ = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
+__version__ = "20140131"
+
+class MakefileMaker:
+
+    def __init__( self, outfile ):
+        """initialize"""
+        self.packages = {}
+        self.targetPrefix = "${libdir}/python%s/" % VERSION[:3]
+        self.output = outfile
+        self.out( """
+# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
+# Generator: '%s' Version %s (C) 2002-2010 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
+""" % ( sys.argv[0], __version__ ) )
+
+    #
+    # helper functions
+    #
+
+    def out( self, data ):
+        """print a line to the output file"""
+        self.output.write( "%s\n" % data )
+
+    def setPrefix( self, targetPrefix ):
+        """set a file prefix for addPackage files"""
+        self.targetPrefix = targetPrefix
+
+    def doProlog( self ):
+        self.out( """ """ )
+        self.out( "" )
+
+    def addPackage( self, name, description, dependencies, filenames ):
+        """add a package to the Makefile"""
+        if type( filenames ) == type( "" ):
+            filenames = filenames.split()
+        fullFilenames = []
+        for filename in filenames:
+            if filename[0] != "$":
+                fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
+            else:
+                fullFilenames.append( filename )
+        self.packages[name] = description, dependencies, fullFilenames
+
+    def doBody( self ):
+        """generate body of Makefile"""
+
+        global VERSION
+
+        #
+        # generate provides line
+        #
+
+        provideLine = 'PROVIDES+="'
+        for name in sorted(self.packages):
+            provideLine += "%s " % name
+        provideLine += '"'
+
+        self.out( provideLine )
+        self.out( "" )
+
+        #
+        # generate package line
+        #
+
+        packageLine = 'PACKAGES="${PN}-dbg '
+        for name in sorted(self.packages):
+            if name.startswith("${PN}-distutils"):
+                if name == "${PN}-distutils":
+                    packageLine += "%s-staticdev %s " % (name, name)
+            elif name != '${PN}-dbg':
+                packageLine += "%s " % name
+        packageLine += '${PN}-modules"'
+
+        self.out( packageLine )
+        self.out( "" )
+
+        #
+        # generate package variables
+        #
+
+        for name, data in sorted(self.packages.iteritems()):
+            desc, deps, files = data
+
+            #
+            # write out the description, revision and dependencies
+            #
+            self.out( 'SUMMARY_%s="%s"' % ( name, desc ) )
+            self.out( 'RDEPENDS_%s="%s"' % ( name, deps ) )
+
+            line = 'FILES_%s="' % name
+
+            #
+            # check which directories to make in the temporary directory
+            #
+
+            dirset = {} # if python had a set-datatype this would be sufficient. for now, we're using a dict instead.
+            for target in files:
+                dirset[os.path.dirname( target )] = True
+
+            #
+            # generate which files to copy for the target (-dfR because whole directories are also allowed)
+            #
+
+            for target in files:
+                line += "%s " % target
+
+            line += '"'
+            self.out( line )
+            self.out( "" )
+
+        self.out( 'SUMMARY_${PN}-modules="All Python modules"' )
+        line = 'RDEPENDS_${PN}-modules="'
+
+        for name, data in sorted(self.packages.iteritems()):
+            if name not in ['${PN}-dev', '${PN}-distutils-staticdev']:
+                line += "%s " % name
+
+        self.out( "%s \"" % line )
+        self.out( 'ALLOW_EMPTY_${PN}-modules = "1"' )
+
+    def doEpilog( self ):
+        self.out( """""" )
+        self.out( "" )
+
+    def make( self ):
+        self.doProlog()
+        self.doBody()
+        self.doEpilog()
+
+if __name__ == "__main__":
+
+    if len( sys.argv ) > 1:
+        try:
+            os.unlink(sys.argv[1])
+        except Exception:
+            sys.exc_clear()
+        outfile = file( sys.argv[1], "w" )
+    else:
+        outfile = sys.stdout
+
+    m = MakefileMaker( outfile )
+
+    # Add packages here. Only specify dlopen-style library dependencies here, no ldd-style dependencies!
+    # Parameters: revision, name, description, dependencies, filenames
+    #
+
+    m.addPackage( "${PN}-core", "Python interpreter and core modules", "${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math",
+    "__future__.* _abcoll.* abc.* ast.* copy.* copyreg.* ConfigParser.* " +
+    "genericpath.* getopt.* linecache.* new.* " +
+    "os.* posixpath.* struct.* " +
+    "warnings.* site.* stat.* " +
+    "UserDict.* UserList.* UserString.* " +
+    "lib-dynload/binascii.*.so lib-dynload/_struct.*.so lib-dynload/time.*.so " +
+    "lib-dynload/xreadlines.*.so types.* platform.* ${bindir}/python* "  + 
+    "_weakrefset.* sysconfig.* _sysconfigdata.* config/Makefile " +
+    "${includedir}/python${PYTHON_BINABI}/pyconfig*.h " +
+    "${libdir}/python${PYTHON_MAJMIN}/collections " +
+    "${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* " +
+    "${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* " +
+    "${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py ")
+
+    m.addPackage( "${PN}-dev", "Python development package", "${PN}-core",
+    "${includedir} " +
+    "${libdir}/lib*${SOLIBSDEV} " +
+    "${libdir}/*.la " +
+    "${libdir}/*.a " +
+    "${libdir}/*.o " +
+    "${libdir}/pkgconfig " +
+    "${base_libdir}/*.a " +
+    "${base_libdir}/*.o " +
+    "${datadir}/aclocal " +
+    "${datadir}/pkgconfig " )
+
+    m.addPackage( "${PN}-2to3", "Python automated Python 2 to 3 code translator", "${PN}-core",
+    "lib2to3" ) # package
+
+    m.addPackage( "${PN}-idle", "Python Integrated Development Environment", "${PN}-core ${PN}-tkinter",
+    "${bindir}/idle idlelib" ) # package
+
+    m.addPackage( "${PN}-pydoc", "Python interactive help support", "${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re",
+    "${bindir}/pydoc pydoc.* pydoc_data" )
+
+    m.addPackage( "${PN}-smtpd", "Python Simple Mail Transport Daemon", "${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime",
+    "${bindir}/smtpd.* smtpd.*" )
+
+    m.addPackage( "${PN}-audio", "Python Audio Handling", "${PN}-core",
+    "wave.* chunk.* sndhdr.* lib-dynload/ossaudiodev.*.so lib-dynload/audioop.*.so audiodev.* sunaudio.* sunau.* toaiff.*" )
+
+    m.addPackage( "${PN}-asyncio", "Python Asynchronous I/O, event loop, coroutines and tasks", "${PN}-core",
+    "asyncio" )
+
+    m.addPackage( "${PN}-codecs", "Python codecs, encodings & i18n support", "${PN}-core ${PN}-lang",
+    "codecs.* encodings gettext.* locale.* lib-dynload/_locale.*.so lib-dynload/_codecs* lib-dynload/_multibytecodec.*.so lib-dynload/unicodedata.*.so stringprep.* xdrlib.*" )
+
+    m.addPackage( "${PN}-compile", "Python bytecode compilation support", "${PN}-core",
+    "py_compile.* compileall.*" )
+
+    m.addPackage( "${PN}-compression", "Python high-level compression support", "${PN}-core ${PN}-codecs",
+    "gzip.* zipfile.* tarfile.* lib-dynload/bz2.*.so" )
+
+    m.addPackage( "${PN}-crypt", "Python basic cryptographic and hashing support", "${PN}-core",
+    "hashlib.* md5.* sha.* lib-dynload/crypt.*.so lib-dynload/_hashlib.*.so lib-dynload/_sha256.*.so lib-dynload/_sha512.*.so" )
+
+    m.addPackage( "${PN}-textutils", "Python option parsing, text wrapping and CSV support", "${PN}-core ${PN}-io ${PN}-re ${PN}-stringold",
+    "lib-dynload/_csv.*.so csv.* optparse.* textwrap.*" )
+
+    m.addPackage( "${PN}-curses", "Python curses support", "${PN}-core",
+    "curses lib-dynload/_curses.*.so lib-dynload/_curses_panel.*.so" ) # directory + low level module
+
+    m.addPackage( "${PN}-ctypes", "Python C types support", "${PN}-core",
+    "ctypes lib-dynload/_ctypes.*.so lib-dynload/_ctypes_test.*.so" ) # directory + low level module
+
+    m.addPackage( "${PN}-datetime", "Python calendar and time support", "${PN}-core ${PN}-codecs",
+    "_strptime.* calendar.* lib-dynload/datetime.*.so" )
+
+    m.addPackage( "${PN}-db", "Python file-based database support", "${PN}-core",
+    "anydbm.* dumbdbm.* whichdb.* dbm lib-dynload/_dbm.*.so" )
+
+    m.addPackage( "${PN}-debugger", "Python debugger", "${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil",
+    "bdb.* pdb.*" )
+
+    m.addPackage( "${PN}-difflib", "Python helpers for computing deltas between objects", "${PN}-lang ${PN}-re",
+    "difflib.*" )
+
+    m.addPackage( "${PN}-distutils-staticdev", "Python distribution utilities (static libraries)", "${PN}-distutils",
+    "config/lib*.a" ) # package
+
+    m.addPackage( "${PN}-distutils", "Python Distribution Utilities", "${PN}-core ${PN}-email",
+    "config distutils" ) # package
+
+    m.addPackage( "${PN}-doctest", "Python framework for running examples in docstrings", "${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib",
+    "doctest.*" )
+
+    m.addPackage( "${PN}-email", "Python email support", "${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient",
+    "imaplib.* email" ) # package
+
+    m.addPackage( "${PN}-fcntl", "Python's fcntl interface", "${PN}-core",
+    "lib-dynload/fcntl.*.so" )
+
+    m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
+    "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* HTMLParser.* " )
+
+    m.addPackage( "${PN}-importlib", "Python import implementation library", "${PN}-core",
+    "importlib" )
+
+    m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
+    "lib-dynload/_gdbm.*.so" )
+
+    m.addPackage( "${PN}-image", "Python graphical image handling", "${PN}-core",
+    "colorsys.* imghdr.* lib-dynload/imageop.*.so lib-dynload/rgbimg.*.so" )
+
+    m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math",
+    "lib-dynload/_socket.*.so lib-dynload/_io.*.so lib-dynload/_ssl.*.so lib-dynload/select.*.so lib-dynload/termios.*.so lib-dynload/cStringIO.*.so " +
+    "pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
+
+    m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math ${PN}-re",
+    "json lib-dynload/_json.*.so" ) # package
+
+    m.addPackage( "${PN}-lang", "Python low-level language support", "${PN}-core",
+    "lib-dynload/_bisect.*.so lib-dynload/_collections.*.so lib-dynload/_heapq.*.so lib-dynload/_weakref.*.so lib-dynload/_functools.*.so " +
+    "lib-dynload/array.*.so lib-dynload/itertools.*.so lib-dynload/operator.*.so lib-dynload/parser.*.so " +
+    "atexit.* bisect.* code.* codeop.* collections.* _collections_abc.* dis.* functools.* heapq.* inspect.* keyword.* opcode.* symbol.* repr.* token.* " +
+    "tokenize.* traceback.* weakref.*" )
+
+    m.addPackage( "${PN}-logging", "Python logging support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold",
+    "logging" ) # package
+
+    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
+    "mailbox.*" )
+
+    m.addPackage( "${PN}-math", "Python math support", "${PN}-core",
+    "lib-dynload/cmath.*.so lib-dynload/math.*.so lib-dynload/_random.*.so random.* sets.*" )
+
+    m.addPackage( "${PN}-mime", "Python MIME handling APIs", "${PN}-core ${PN}-io",
+    "mimetools.* uu.* quopri.* rfc822.* MimeWriter.*" )
+
+    m.addPackage( "${PN}-mmap", "Python memory-mapped file support", "${PN}-core ${PN}-io",
+    "lib-dynload/mmap.*.so " )
+
+    m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", "${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap",
+    "lib-dynload/_multiprocessing.*.so multiprocessing" ) # package
+
+    m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", "${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime",
+    "*Cookie*.* " +
+    "base64.* cookielib.* ftplib.* gopherlib.* hmac.* httplib.* mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib  uuid.* rfc822.* mimetools.*" )
+
+    m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", "${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
+    "cgi.* *HTTPServer.* SocketServer.*" )
+
+    m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core ${PN}-lang ${PN}-re",
+    "decimal.* fractions.* numbers.*" )
+
+    m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", "${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
+    "pickle.* shelve.* lib-dynload/cPickle.*.so pickletools.*" )
+
+    m.addPackage( "${PN}-pkgutil", "Python package extension utility support", "${PN}-core",
+    "pkgutil.*")
+
+    m.addPackage( "${PN}-pprint", "Python pretty-print support", "${PN}-core ${PN}-io",
+    "pprint.*" )
+
+    m.addPackage( "${PN}-profile", "Python basic performance profiling support", "${PN}-core ${PN}-textutils",
+    "profile.* pstats.* cProfile.* lib-dynload/_lsprof.*.so" )
+
+    m.addPackage( "${PN}-re", "Python Regular Expression APIs", "${PN}-core",
+    "re.* sre.* sre_compile.* sre_constants* sre_parse.*" ) # _sre is builtin
+
+    m.addPackage( "${PN}-readline", "Python readline support", "${PN}-core",
+    "lib-dynload/readline.*.so rlcompleter.*" )
+
+    m.addPackage( "${PN}-reprlib", "Python alternate repr() implementation", "${PN}-core",
+    "reprlib.py" )
+
+    m.addPackage( "${PN}-resource", "Python resource control interface", "${PN}-core",
+    "lib-dynload/resource.*.so" )
+
+    m.addPackage( "${PN}-shell", "Python shell-like functionality", "${PN}-core ${PN}-re",
+    "cmd.* commands.* dircache.* fnmatch.* glob.* popen2.* shlex.* shutil.*" )
+
+    m.addPackage( "${PN}-subprocess", "Python subprocess support", "${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle",
+    "subprocess.*" )
+
+    m.addPackage( "${PN}-sqlite3", "Python Sqlite3 database support", "${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading",
+    "lib-dynload/_sqlite3.*.so sqlite3/dbapi2.* sqlite3/__init__.* sqlite3/dump.*" )
+
+    m.addPackage( "${PN}-sqlite3-tests", "Python Sqlite3 database support tests", "${PN}-core ${PN}-sqlite3",
+    "sqlite3/test" )
+
+    m.addPackage( "${PN}-stringold", "Python string APIs [deprecated]", "${PN}-core ${PN}-re",
+    "lib-dynload/strop.*.so string.* stringold.*" )
+
+    m.addPackage( "${PN}-syslog", "Python syslog interface", "${PN}-core",
+    "lib-dynload/syslog.*.so" )
+
+    m.addPackage( "${PN}-terminal", "Python terminal controlling support", "${PN}-core ${PN}-io",
+    "pty.* tty.*" )
+
+    m.addPackage( "${PN}-tests", "Python tests", "${PN}-core",
+    "test" ) # package
+
+    m.addPackage( "${PN}-threading", "Python threading & synchronization support", "${PN}-core ${PN}-lang",
+    "_threading_local.* dummy_thread.* dummy_threading.* mutex.* threading.* Queue.*" )
+
+    m.addPackage( "${PN}-tkinter", "Python Tcl/Tk bindings", "${PN}-core",
+    "lib-dynload/_tkinter.*.so lib-tk tkinter" ) # package
+
+    m.addPackage( "${PN}-unittest", "Python unit testing framework", "${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell",
+    "unittest/" )
+
+    m.addPackage( "${PN}-unixadmin", "Python Unix administration support", "${PN}-core",
+    "lib-dynload/nis.*.so lib-dynload/grp.*.so lib-dynload/pwd.*.so getpass.*" )
+
+    m.addPackage( "${PN}-xml", "Python basic XML support", "${PN}-core ${PN}-re",
+    "lib-dynload/_elementtree.*.so lib-dynload/pyexpat.*.so xml xmllib.*" ) # package
+
+    m.addPackage( "${PN}-xmlrpc", "Python XML-RPC support", "${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang",
+    "xmlrpclib.* SimpleXMLRPCServer.* DocXMLRPCServer.* xmlrpc" )
+
+    m.addPackage( "${PN}-mailbox", "Python mailbox format support", "${PN}-core ${PN}-mime",
+    "mailbox.*" )
+
+    m.make()
diff --git a/yocto-poky/scripts/contrib/verify-homepage.py b/yocto-poky/scripts/contrib/verify-homepage.py
index 86cc82b..265ff65 100755
--- a/yocto-poky/scripts/contrib/verify-homepage.py
+++ b/yocto-poky/scripts/contrib/verify-homepage.py
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 
-# This script is used for verify HOMEPAGE.
+# This script can be used to verify HOMEPAGE values for all recipes in
+# the current configuration.
 # The result is influenced by network environment, since the timeout of connect url is 5 seconds as default.
 
 import sys
@@ -8,32 +9,25 @@
 import subprocess
 import urllib2
 
-def search_bitbakepath():
-    bitbakepath = ""
 
-    # Search path to bitbake lib dir in order to load bb modules
-    if os.path.exists(os.path.join(os.path.dirname(sys.argv[0]), '../../bitbake/lib/bb')):
-        bitbakepath = os.path.join(os.path.dirname(sys.argv[0]), '../../bitbake/lib')
-        bitbakepath = os.path.abspath(bitbakepath)
-    else:
-        # Look for bitbake/bin dir in PATH
-        for pth in os.environ['PATH'].split(':'):
-            if os.path.exists(os.path.join(pth, '../lib/bb')):
-                bitbakepath = os.path.abspath(os.path.join(pth, '../lib'))
-                break
-        if not bitbakepath:
-            sys.stderr.write("Unable to find bitbake by searching parent directory of this script or PATH\n")
-            sys.exit(1)
-    return bitbakepath
+# Allow importing scripts/lib modules
+scripts_path = os.path.abspath(os.path.dirname(os.path.realpath(__file__)) + '/..')
+lib_path = scripts_path + '/lib'
+sys.path = sys.path + [lib_path]
+import scriptpath
+import scriptutils
 
-# For importing the following modules
-sys.path.insert(0, search_bitbakepath())
+# Allow importing bitbake modules
+bitbakepath = scriptpath.add_bitbake_lib_path()
+
 import bb.tinfoil
 
+logger = scriptutils.logger_create('verify_homepage')
+
 def wgetHomepage(pn, homepage):
     result = subprocess.call('wget ' + '-q -T 5 -t 1 --spider ' + homepage, shell = True)
     if result:
-        bb.warn("Failed to verify HOMEPAGE (%s) of %s" % (homepage, pn))
+        logger.warn("%s: failed to verify HOMEPAGE: %s " % (pn, homepage))
         return 1
     else:
         return 0
@@ -42,22 +36,27 @@
     pkg_pn = bbhandler.cooker.recipecache.pkg_pn
     pnlist = sorted(pkg_pn)
     count = 0
+    checked = []
     for pn in pnlist:
-        fn = pkg_pn[pn].pop()
-        data = bb.cache.Cache.loadDataFull(fn, bbhandler.cooker.collection.get_file_appends(fn), bbhandler.config_data)
-        homepage = data.getVar("HOMEPAGE")
-        if homepage:
-            try:
-                urllib2.urlopen(homepage, timeout=5)
-            except Exception:
-                count = count + wgetHomepage(pn, homepage)
+        for fn in pkg_pn[pn]:
+            # There's no point checking multiple BBCLASSEXTENDed variants of the same recipe
+            realfn, _ = bb.cache.Cache.virtualfn2realfn(fn)
+            if realfn in checked:
+                continue
+            data = bb.cache.Cache.loadDataFull(realfn, bbhandler.cooker.collection.get_file_appends(realfn), bbhandler.config_data)
+            homepage = data.getVar("HOMEPAGE", True)
+            if homepage:
+                try:
+                    urllib2.urlopen(homepage, timeout=5)
+                except Exception:
+                    count = count + wgetHomepage(os.path.basename(realfn), homepage)
+            checked.append(realfn)
     return count
 
 if __name__=='__main__':
-    failcount = 0
     bbhandler = bb.tinfoil.Tinfoil()
     bbhandler.prepare()
-    print "Start to verify HOMEPAGE:"
+    logger.info("Start verifying HOMEPAGE:")
     failcount = verifyHomepage(bbhandler)
-    print "finish to verify HOMEPAGE."
-    print "Summary: %s failed" % failcount
+    logger.info("Finished verifying HOMEPAGE.")
+    logger.info("Summary: %s failed" % failcount)
diff --git a/yocto-poky/scripts/create-pull-request b/yocto-poky/scripts/create-pull-request
index 19ba588..479ad6e 100755
--- a/yocto-poky/scripts/create-pull-request
+++ b/yocto-poky/scripts/create-pull-request
@@ -36,6 +36,7 @@
 cat <<EOM
 Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] [-d relative_dir] -u remote [-b branch]
   -b branch           Branch name in the specified remote (default: current branch)
+  -l local branch     Local branch name (default: HEAD)
   -c                  Create an RFC (Request for Comment) patch series
   -h                  Display this help message
   -i commit_id        Ending commit (default: HEAD)
@@ -50,6 +51,7 @@
  Examples:
    $CMD -u contrib -b nitin/basic
    $CMD -u contrib -r distro/master -i nitin/distro -b nitin/distro
+   $CMD -u contrib -r distro/master -i nitin/distro -b nitin/distro -l distro
    $CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc
    $CMD -u contrib -p "RFC PATCH" -b nitin/experimental
    $CMD -u contrib -i misc -b nitin/misc -d ./bitbake
@@ -57,11 +59,14 @@
 }
 
 # Parse and validate arguments
-while getopts "b:cd:hi:m:o:p:r:s:u:" OPT; do
+while getopts "b:cd:hi:m:o:p:r:s:u:l:" OPT; do
 	case $OPT in
 	b)
 		BRANCH="$OPTARG"
 		;;
+	l)
+		L_BRANCH="$OPTARG"
+		;;
 	c)
 		RFC=1
 		;;
@@ -130,6 +135,11 @@
 	echo "NOTE: Assuming remote branch '$BRANCH', use -b to override."
 fi
 
+if [ -z "$L_BRANCH" ]; then
+	L_BRANCH=HEAD
+	echo "NOTE: Assuming local branch HEAD, use -l to override."
+fi
+
 if [ -z "$REMOTE_URL" ]; then
 	echo "ERROR: Missing parameter -u, no git remote!"
 	usage
@@ -185,6 +195,14 @@
 # Generate the patches and cover letter
 git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID > /dev/null
 
+if [ -z "$(ls -A $ODIR 2> /dev/null)" ]; then
+    echo "ERROR: $ODIR is empty, no cover letter and patches was generated!"
+    echo "       This is most likely due to that \$RRELATIVE_TO..\$COMMIT_ID"
+    echo "       ($RELATIVE_TO..$COMMIT_ID) don't contain any differences."
+    rmdir $ODIR
+    exit 1
+fi
+
 [ -n "$RELDIR" ] && cd $pdir
 
 # Customize the cover letter
@@ -195,7 +213,7 @@
 if [ $GIT_VERSION -lt $NEWER_GIT_VERSION ]; then
 	git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID >> "$PM"
 else
-	git request-pull $RELATIVE_TO $REMOTE_URL :$BRANCH >> "$PM"
+	git request-pull $RELATIVE_TO $REMOTE_URL $L_BRANCH:$BRANCH >> "$PM"
 fi
 if [ $? -ne 0 ]; then
 	echo "ERROR: git request-pull reported an error"
diff --git a/yocto-poky/scripts/devtool b/yocto-poky/scripts/devtool
index e4d9db3..4780390 100755
--- a/yocto-poky/scripts/devtool
+++ b/yocto-poky/scripts/devtool
@@ -37,6 +37,7 @@
 sys.path = sys.path + [lib_path]
 from devtool import DevtoolError, setup_tinfoil
 import scriptutils
+import argparse_oe
 logger = scriptutils.logger_create('devtool')
 
 plugins = []
@@ -111,8 +112,37 @@
                 res = externalsrc_re.match(line.rstrip())
                 if res:
                     pn = res.group(2) or os.path.splitext(os.path.basename(fn))[0].split('_')[0]
+                    # Find the recipe file within the workspace, if any
+                    bbfile = os.path.basename(fn).replace('.bbappend', '.bb').replace('%', '*')
+                    recipefile = glob.glob(os.path.join(config.workspace_path,
+                                                        'recipes',
+                                                        pn,
+                                                        bbfile))
+                    if recipefile:
+                        recipefile = recipefile[0]
                     workspace[pn] = {'srctree': res.group(3),
-                                     'bbappend': fn}
+                                     'bbappend': fn,
+                                     'recipefile': recipefile}
+                    logger.debug('Found recipe %s' % workspace[pn])
+
+def create_unlockedsigs():
+    """ This function will make unlocked-sigs.inc match the recipes in the
+    workspace. This runs on every run of devtool, but it lets us ensure
+    the unlocked items are in sync with the workspace. """
+
+    confdir = os.path.join(basepath, 'conf')
+    unlockedsigs = os.path.join(confdir, 'unlocked-sigs.inc')
+    bb.utils.mkdirhier(confdir)
+    with open(os.path.join(confdir, 'unlocked-sigs.inc'), 'w') as f:
+        f.write("# DO NOT MODIFY! YOUR CHANGES WILL BE LOST.\n" +
+                "# This layer was created by the OpenEmbedded devtool" +
+                " utility in order to\n" +
+                "# contain recipes that are unlocked.\n")
+
+        f.write('SIGGEN_UNLOCKED_RECIPES += "\\\n')
+        for pn in workspace:
+            f.write('    ' + pn)
+        f.write('"')
 
 def create_workspace(args, config, basepath, workspace):
     if args.layerpath:
@@ -151,6 +181,10 @@
             f.write('\nIf you no longer need to use devtool you can remove the path to this\n')
             f.write('workspace layer from your conf/bblayers.conf file (and then delete the\n')
             f.write('layer, if you wish).\n')
+            f.write('\nNote that by default, if devtool fetches and unpacks source code, it\n')
+            f.write('will place it in a subdirectory of a "sources" subdirectory of the\n')
+            f.write('layer. If you prefer it to be elsewhere you can specify the source\n')
+            f.write('tree path on the command line.\n')
 
 def _enable_workspace_layer(workspacedir, config, basepath):
     """Ensure the workspace layer is in bblayers.conf"""
@@ -177,17 +211,10 @@
 
     # Default basepath
     basepath = os.path.dirname(os.path.abspath(__file__))
-    pth = basepath
-    while pth != '' and pth != os.sep:
-        if os.path.exists(os.path.join(pth, '.devtoolbase')):
-            context.fixed_setup = True
-            basepath = pth
-            break
-        pth = os.path.dirname(pth)
 
-    parser = argparse.ArgumentParser(description="OpenEmbedded development tool",
-                                     add_help=False,
-                                     epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
+    parser = argparse_oe.ArgumentParser(description="OpenEmbedded development tool",
+                                        add_help=False,
+                                        epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
     parser.add_argument('--basepath', help='Base directory of SDK / build directory')
     parser.add_argument('--bbpath', help='Explicitly specify the BBPATH, rather than getting it from the metadata')
     parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
@@ -209,17 +236,29 @@
     if global_args.basepath:
         # Override
         basepath = global_args.basepath
-    elif not context.fixed_setup:
-        basepath = os.environ.get('BUILDDIR')
-        if not basepath:
-            logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)")
-            sys.exit(1)
+        if os.path.exists(os.path.join(basepath, '.devtoolbase')):
+            context.fixed_setup = True
+    else:
+        pth = basepath
+        while pth != '' and pth != os.sep:
+            if os.path.exists(os.path.join(pth, '.devtoolbase')):
+                context.fixed_setup = True
+                basepath = pth
+                break
+            pth = os.path.dirname(pth)
+
+        if not context.fixed_setup:
+            basepath = os.environ.get('BUILDDIR')
+            if not basepath:
+                logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)")
+                sys.exit(1)
 
     logger.debug('Using basepath %s' % basepath)
 
     config = ConfigHandler(os.path.join(basepath, 'conf', 'devtool.conf'))
     if not config.read():
         return -1
+    context.config = config
 
     bitbake_subdir = config.get('General', 'bitbake_subdir', '')
     if bitbake_subdir:
@@ -255,13 +294,21 @@
 
     subparsers = parser.add_subparsers(dest="subparser_name", title='subcommands', metavar='<subcommand>')
 
+    subparsers.add_subparser_group('sdk', 'SDK maintenance', -2)
+    subparsers.add_subparser_group('advanced', 'Advanced', -1)
+    subparsers.add_subparser_group('starting', 'Beginning work on a recipe', 100)
+    subparsers.add_subparser_group('info', 'Getting information')
+    subparsers.add_subparser_group('working', 'Working on a recipe in the workspace')
+    subparsers.add_subparser_group('testbuild', 'Testing changes on target')
+
     if not context.fixed_setup:
         parser_create_workspace = subparsers.add_parser('create-workspace',
-                                                        help='Set up a workspace',
-                                                        description='Sets up a new workspace. NOTE: other devtool subcommands will create a workspace automatically as needed, so you only need to use %(prog)s if you want to specify where the workspace should be located.')
+                                                        help='Set up workspace in an alternative location',
+                                                        description='Sets up a new workspace. NOTE: other devtool subcommands will create a workspace automatically as needed, so you only need to use %(prog)s if you want to specify where the workspace should be located.',
+                                                        group='advanced')
         parser_create_workspace.add_argument('layerpath', nargs='?', help='Path in which the workspace layer should be created')
         parser_create_workspace.add_argument('--create-only', action="store_true", help='Only create the workspace layer, do not alter configuration')
-        parser_create_workspace.set_defaults(func=create_workspace)
+        parser_create_workspace.set_defaults(func=create_workspace, no_workspace=True)
 
     for plugin in plugins:
         if hasattr(plugin, 'register_commands'):
@@ -269,8 +316,9 @@
 
     args = parser.parse_args(unparsed_args, namespace=global_args)
 
-    if args.subparser_name != 'create-workspace':
+    if not getattr(args, 'no_workspace', False):
         read_workspace()
+        create_unlockedsigs()
 
     try:
         ret = args.func(args, config, basepath, workspace)
@@ -278,6 +326,8 @@
         if str(err):
             logger.error(str(err))
         ret = 1
+    except argparse_oe.ArgumentUsageError as ae:
+        parser.error_subcommand(ae.message, ae.subcommand)
 
     return ret
 
@@ -288,5 +338,5 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
diff --git a/yocto-poky/scripts/gen-lockedsig-cache b/yocto-poky/scripts/gen-lockedsig-cache
index 6aa3614..0986a21 100755
--- a/yocto-poky/scripts/gen-lockedsig-cache
+++ b/yocto-poky/scripts/gen-lockedsig-cache
@@ -13,9 +13,9 @@
         if e.errno != errno.EEXIST:
             raise e
 
-if len(sys.argv) < 3:
+if len(sys.argv) < 5:
     print("Incorrect number of arguments specified")
-    print("syntax: gen-lockedsig-cache <locked-sigs.inc> <input-cachedir> <output-cachedir>")
+    print("syntax: gen-lockedsig-cache <locked-sigs.inc> <input-cachedir> <output-cachedir> <nativelsbstring>")
     sys.exit(1)
 
 print('Reading %s' % sys.argv[1])
@@ -30,7 +30,7 @@
 for s in sigs:
     p = sys.argv[2] + "/" + s[:2] + "/*" + s + "*"
     files |= set(glob.glob(p))
-    p = sys.argv[2] + "/*/" + s[:2] + "/*" + s + "*"
+    p = sys.argv[2] + "/%s/" % sys.argv[4] + s[:2] + "/*" + s + "*"
     files |= set(glob.glob(p))
 
 print('Processing files')
diff --git a/yocto-poky/scripts/hob b/yocto-poky/scripts/hob
deleted file mode 100755
index 8d33ab1..0000000
--- a/yocto-poky/scripts/hob
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env bash
-export BB_ENV_EXTRAWHITE="DISABLE_SANITY_CHECKS $BB_ENV_EXTRAWHITE"
-DISABLE_SANITY_CHECKS=1 bitbake -u hob $@
-
-ret=$?
-exit $ret
diff --git a/yocto-poky/scripts/lib/argparse_oe.py b/yocto-poky/scripts/lib/argparse_oe.py
new file mode 100644
index 0000000..bf3ebad
--- /dev/null
+++ b/yocto-poky/scripts/lib/argparse_oe.py
@@ -0,0 +1,129 @@
+import sys
+import argparse
+from collections import defaultdict, OrderedDict
+
+class ArgumentUsageError(Exception):
+    """Exception class you can raise (and catch) in order to show the help"""
+    def __init__(self, message, subcommand=None):
+        self.message = message
+        self.subcommand = subcommand
+
+class ArgumentParser(argparse.ArgumentParser):
+    """Our own version of argparse's ArgumentParser"""
+    def __init__(self, *args, **kwargs):
+        kwargs.setdefault('formatter_class', OeHelpFormatter)
+        self._subparser_groups = OrderedDict()
+        super(ArgumentParser, self).__init__(*args, **kwargs)
+
+    def error(self, message):
+        sys.stderr.write('ERROR: %s\n' % message)
+        self.print_help()
+        sys.exit(2)
+
+    def error_subcommand(self, message, subcommand):
+        if subcommand:
+            for action in self._actions:
+                if isinstance(action, argparse._SubParsersAction):
+                    for choice, subparser in action.choices.items():
+                        if choice == subcommand:
+                            subparser.error(message)
+                            return
+        self.error(message)
+
+    def add_subparsers(self, *args, **kwargs):
+        ret = super(ArgumentParser, self).add_subparsers(*args, **kwargs)
+        # Need a way of accessing the parent parser
+        ret._parent_parser = self
+        # Ensure our class gets instantiated
+        ret._parser_class = ArgumentSubParser
+        # Hacky way of adding a method to the subparsers object
+        ret.add_subparser_group = self.add_subparser_group
+        return ret
+
+    def add_subparser_group(self, groupname, groupdesc, order=0):
+        self._subparser_groups[groupname] = (groupdesc, order)
+
+
+class ArgumentSubParser(ArgumentParser):
+    def __init__(self, *args, **kwargs):
+        if 'group' in kwargs:
+            self._group = kwargs.pop('group')
+        if 'order' in kwargs:
+            self._order = kwargs.pop('order')
+        super(ArgumentSubParser, self).__init__(*args, **kwargs)
+        for agroup in self._action_groups:
+            if agroup.title == 'optional arguments':
+                agroup.title = 'options'
+                break
+
+    def parse_known_args(self, args=None, namespace=None):
+        # This works around argparse not handling optional positional arguments being
+        # intermixed with other options. A pretty horrible hack, but we're not left
+        # with much choice given that the bug in argparse exists and it's difficult
+        # to subclass.
+        # Borrowed from http://stackoverflow.com/questions/20165843/argparse-how-to-handle-variable-number-of-arguments-nargs
+        # with an extra workaround (in format_help() below) for the positional
+        # arguments disappearing from the --help output, as well as structural tweaks.
+        # Originally simplified from http://bugs.python.org/file30204/test_intermixed.py
+        positionals = self._get_positional_actions()
+        for action in positionals:
+            # deactivate positionals
+            action.save_nargs = action.nargs
+            action.nargs = 0
+
+        namespace, remaining_args = super(ArgumentSubParser, self).parse_known_args(args, namespace)
+        for action in positionals:
+            # remove the empty positional values from namespace
+            if hasattr(namespace, action.dest):
+                delattr(namespace, action.dest)
+        for action in positionals:
+            action.nargs = action.save_nargs
+        # parse positionals
+        namespace, extras = super(ArgumentSubParser, self).parse_known_args(remaining_args, namespace)
+        return namespace, extras
+
+    def format_help(self):
+        # Quick, restore the positionals!
+        positionals = self._get_positional_actions()
+        for action in positionals:
+            if hasattr(action, 'save_nargs'):
+                action.nargs = action.save_nargs
+        return super(ArgumentParser, self).format_help()
+
+
+class OeHelpFormatter(argparse.HelpFormatter):
+    def _format_action(self, action):
+        if hasattr(action, '_get_subactions'):
+            # subcommands list
+            groupmap = defaultdict(list)
+            ordermap = {}
+            subparser_groups = action._parent_parser._subparser_groups
+            groups = sorted(subparser_groups.keys(), key=lambda item: subparser_groups[item][1], reverse=True)
+            for subaction in self._iter_indented_subactions(action):
+                parser = action._name_parser_map[subaction.dest]
+                group = getattr(parser, '_group', None)
+                groupmap[group].append(subaction)
+                if group not in groups:
+                    groups.append(group)
+                order = getattr(parser, '_order', 0)
+                ordermap[subaction.dest] = order
+
+            lines = []
+            if len(groupmap) > 1:
+                groupindent = '  '
+            else:
+                groupindent = ''
+            for group in groups:
+                subactions = groupmap[group]
+                if not subactions:
+                    continue
+                if groupindent:
+                    if not group:
+                        group = 'other'
+                    groupdesc = subparser_groups.get(group, (group, 0))[0]
+                    lines.append('  %s:' % groupdesc)
+                for subaction in sorted(subactions, key=lambda item: ordermap[item.dest], reverse=True):
+                    lines.append('%s%s' % (groupindent, self._format_action(subaction).rstrip()))
+            return '\n'.join(lines)
+        else:
+            return super(OeHelpFormatter, self)._format_action(action)
diff --git a/yocto-poky/scripts/lib/bsp/engine.py b/yocto-poky/scripts/lib/bsp/engine.py
index d0d5d72..66e2162 100644
--- a/yocto-poky/scripts/lib/bsp/engine.py
+++ b/yocto-poky/scripts/lib/bsp/engine.py
@@ -438,7 +438,7 @@
                 self.parse_error("No entries available for input list",
                                  self.lineno, self.line)
             choicepairs = self.gen_choicepair_list()
-            
+
         return choicepairs
 
     def gen_choices(self, context = None, checklist = False):
@@ -1598,7 +1598,7 @@
     yocto_common_create(layer_name, "layer", scripts_path, layer_output_dir, codedump, properties_file, properties, False)
 
     print "\nNew layer created in %s.\n" % (layer_output_dir)
-    print "Don't forget to add it to your BBLAYERS (for details see %s\README)." % (layer_output_dir)
+    print "Don't forget to add it to your BBLAYERS (for details see %s/README)." % (layer_output_dir)
 
 
 def yocto_bsp_create(machine, arch, scripts_path, bsp_output_dir, codedump, properties_file, properties=None):
@@ -1822,7 +1822,7 @@
             sys.exit(1)
 
         json.dump(values_list, of)
-    
+
     print_values(type, values_list)
 
 
diff --git a/yocto-poky/scripts/lib/bsp/help.py b/yocto-poky/scripts/lib/bsp/help.py
index 4cce100..85a09dd 100644
--- a/yocto-poky/scripts/lib/bsp/help.py
+++ b/yocto-poky/scripts/lib/bsp/help.py
@@ -103,6 +103,7 @@
 
  usage: yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
             [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
+            [-c | --codedump] [-s | --skip-git-check]
 
  This command creates a Yocto BSP based on the specified parameters.
  The new BSP will be a new Yocto BSP layer contained by default within
@@ -113,7 +114,7 @@
  The value of the 'karch' parameter determines the set of files that
  will be generated for the BSP, along with the specific set of
  'properties' that will be used to fill out the BSP-specific portions
- of the BSP.  The possible values for the 'karch' paramter can be
+ of the BSP.  The possible values for the 'karch' parameter can be
  listed via 'yocto-bsp list karch'.
 
  NOTE: Once created, you should add your new layer to your
@@ -131,6 +132,7 @@
 SYNOPSIS
     yocto-bsp create <bsp-name> <karch> [-o <DIRNAME> | --outdir <DIRNAME>]
         [-i <JSON PROPERTY FILE> | --infile <JSON PROPERTY_FILE>]
+        [-c | --codedump] [-s | --skip-git-check]
 
 DESCRIPTION
     This command creates a Yocto BSP based on the specified
@@ -142,7 +144,7 @@
     The value of the 'karch' parameter determines the set of files
     that will be generated for the BSP, along with the specific set of
     'properties' that will be used to fill out the BSP-specific
-    portions of the BSP.  The possible values for the 'karch' paramter
+    portions of the BSP.  The possible values for the 'karch' parameter
     can be listed via 'yocto-bsp list karch'.
 
     The BSP-specific properties that define the values that will be
@@ -173,7 +175,7 @@
 
     BBLAYERS ?= " \\
       /path/to/poky/meta \\
-      /path/to/poky/meta-yocto \\
+      /path/to/poky/meta-poky \\
       /path/to/poky/meta-mybsp \\
       "
 """
@@ -756,7 +758,7 @@
     or config items along with patches.  The named feature must end
     with .scc and must not contain a feature directory to contain the
     feature (this will be determined automatically), and a feature
-    decription in double-quotes along with a capabilities string
+    description in double-quotes along with a capabilities string
     (which for the time being can be one of: 'all' or 'board').
 """
 
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall
index 7676ca8..00cf360 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/kernel-list.noinstall
@@ -1,5 +1,5 @@
 {{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.1) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
 
 {{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.1"}}
+{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.4"}}
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
deleted file mode 100644
index c56e9e5..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-preempt-rt.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
deleted file mode 100644
index 15b9b1b..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
deleted file mode 100644
index caefcfc..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
new file mode 100644
index 0000000..815c77b
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-patches.scc \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.14.bbappend
deleted file mode 100644
index 5af490d..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.14.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.19.bbappend
deleted file mode 100644
index c327d16..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_3.19.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.4.bbappend
new file mode 100644
index 0000000..b88a06c
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/arm/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf
index 1739ab3..d5abe4f 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/conf/machine/machine.conf
@@ -33,7 +33,7 @@
 
 {{ input type:"boolean" name:"xserver" prio:"50" msg:"Do you need support for X? (y/n)" default:"y" }}
 
-{{ if xserver == "y" and (kernel_choice == "linux-yocto_4.1" or kernel_choice == "linux-yocto_3.19" or kernel_choice == "linux-yocto_3.14"): }}
+{{ if xserver == "y" and (kernel_choice == "linux-yocto_4.4" or kernel_choice == "linux-yocto_4.1"): }}
 {{ input type:"choicelist" name:"xserver_choice" prio:"50" msg:"Please select an xserver for this machine:" default:"xserver_vesa" }}
 {{ input type:"choice" val:"xserver_vesa" msg:"VESA xserver support" }}
 {{ input type:"choice" val:"xserver_i915" msg:"i915 xserver support" }}
@@ -49,7 +49,7 @@
 {{ input type:"choice" val:"xserver_fbdev" msg:"fbdev xserver support" }}
 {{ input type:"choice" val:"xserver_modesetting" msg:"modesetting xserver support" }}
 
-{{ if xserver == "y" and kernel_choice != "linux-yocto_4.1" and kernel_choice != "linux-yocto_3.19" and kernel_choice != "linux-yocto_3.14" and kernel_choice != "custom": xserver_choice = "xserver_i915" }}
+{{ if xserver == "y" and kernel_choice != "linux-yocto_4.4" and kernel_choice != "linux-yocto_4.1" and kernel_choice != "custom": xserver_choice = "xserver_i915" }}
 
 {{ if xserver == "y": }}
 XSERVER ?= "${XSERVER_X86_BASE} \
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall
index 7676ca8..00cf360 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/kernel-list.noinstall
@@ -1,5 +1,5 @@
 {{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.1) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
 
 {{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.1"}}
+{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.4"}}
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
deleted file mode 100644
index c56e9e5..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-preempt-rt.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
deleted file mode 100644
index 15b9b1b..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
deleted file mode 100644
index caefcfc..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
new file mode 100644
index 0000000..815c77b
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-patches.scc \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.14.bbappend
deleted file mode 100644
index 41325ca..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.14.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.19.bbappend
deleted file mode 100644
index b471742..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_3.19.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.1.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.1.bbappend
index 761b9c6..aecdff0 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.1.bbappend
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.1.bbappend
@@ -8,10 +8,10 @@
 {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
 
 {{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "n": }}
 KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.4.bbappend
new file mode 100644
index 0000000..dd4de31
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/i386/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/README b/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/README
index 943dfc4..ca6527c 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/README
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/layer/README
@@ -52,7 +52,7 @@
 
   BBLAYERS ?= " \
     /path/to/yocto/meta \
-    /path/to/yocto/meta-yocto \
+    /path/to/yocto/meta-poky \
     /path/to/yocto/meta-yocto-bsp \
     /path/to/yocto/meta-{{=layer_name}} \
     "
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall
index 7676ca8..00cf360 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/kernel-list.noinstall
@@ -1,5 +1,5 @@
 {{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.1) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
 
 {{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.1"}}
+{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.4"}}
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
deleted file mode 100644
index c56e9e5..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-preempt-rt.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
deleted file mode 100644
index 7c6bc7f..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
deleted file mode 100644
index 7f20379..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
new file mode 100644
index 0000000..815c77b
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-patches.scc \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.14.bbappend
deleted file mode 100644
index 5af490d..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.14.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.19.bbappend
deleted file mode 100644
index c327d16..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_3.19.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.4.bbappend
new file mode 100644
index 0000000..b88a06c
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall
index 7676ca8..00cf360 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/kernel-list.noinstall
@@ -1,5 +1,5 @@
 {{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.1) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
 
 {{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.1"}}
+{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.4"}}
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
deleted file mode 100644
index c56e9e5..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-preempt-rt.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
deleted file mode 100644
index 7c6bc7f..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
deleted file mode 100644
index 7f20379..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
new file mode 100644
index 0000000..815c77b
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-patches.scc \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.14.bbappend
deleted file mode 100644
index 858d5fc..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.14.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "dbe5b52e93ff114b2c0f5da6f6af91f52c18f2b8"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "6eddbf47875ef48ddc5864957a7b63363100782b"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.19.bbappend
deleted file mode 100644
index f084531..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_3.19.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.4.bbappend
new file mode 100644
index 0000000..57c90fa
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/mips64/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/edgerouter" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf
index 018146f..583c5e4 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/conf/machine/machine.conf
@@ -74,7 +74,7 @@
            xf86-input-evdev \
            xf86-video-fbdev"
 
-PREFERRED_VERSION_u-boot ?= "v2015.07%"
+PREFERRED_VERSION_u-boot ?= "v2016.01%"
 {{ input type:"edit" name:"uboot_entrypoint" prio:"40" msg:"Please specify a value for UBOOT_ENTRYPOINT:" default:"0x00000000" }}
 UBOOT_ENTRYPOINT = "{{=uboot_entrypoint}}"
 
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall
index 7676ca8..00cf360 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/kernel-list.noinstall
@@ -1,5 +1,5 @@
 {{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.1) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
 
 {{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.1"}}
+{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.4"}}
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
deleted file mode 100644
index 4700d98..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-preempt-rt.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
deleted file mode 100644
index 15b9b1b..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
deleted file mode 100644
index caefcfc..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
new file mode 100644
index 0000000..815c77b
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-patches.scc \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.14.bbappend
deleted file mode 100644
index 6f1e7b0..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.14.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.19.bbappend
deleted file mode 100644
index 44086af..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_3.19.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.4.bbappend
new file mode 100644
index 0000000..b88a06c
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/powerpc/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall
index 7676ca8..00cf360 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/kernel-list.noinstall
@@ -1,5 +1,5 @@
 {{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.1) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
 
 {{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.1"}}
+{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.4"}}
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend
index 3555285..7e3ce5b 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-dev.bbappend
@@ -19,16 +19,16 @@
 {{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
 
 {{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc" }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc" }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "y" and qemuarch == "mips": }}
 {{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
deleted file mode 100644
index 9e5aa97..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
+++ /dev/null
@@ -1,62 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-preempt-rt.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
deleted file mode 100644
index 1faac44..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
+++ /dev/null
@@ -1,62 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
deleted file mode 100644
index 51fc7d0..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
+++ /dev/null
@@ -1,62 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
new file mode 100644
index 0000000..e256e08
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
@@ -0,0 +1,62 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"arm" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/common-pc" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-patches.scc \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.14.bbappend
deleted file mode 100644
index fbaed33..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.14.bbappend
+++ /dev/null
@@ -1,61 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.19.bbappend
deleted file mode 100644
index 7b590ad..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_3.19.bbappend
+++ /dev/null
@@ -1,61 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
-
-{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.1.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.1.bbappend
index 82bb970..fce67b4 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.1.bbappend
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.1.bbappend
@@ -19,16 +19,16 @@
 {{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
 
 {{ if need_new_kbranch == "y" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc" }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "n" and qemuarch == "i386": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc" }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
-{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "n" and qemuarch == "mips": }}
 {{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.4.bbappend
new file mode 100644
index 0000000..4097932
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/qemu/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -0,0 +1,61 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "arm": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base your new BSP branch on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "arm": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose an existing machine branch to use for this BSP:" default:"standard/arm-versatile-926ejs" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "powerpc": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "powerpc": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"powerpc" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/qemuppc" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "i386": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "i386": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"i386" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "x86_64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "x86_64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"x86_64" gen:"bsp.kernel.all_branches" branches_base:"standard"  prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta32" }}
+
+{{ if need_new_kbranch == "n" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"existing_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/mti-malta64" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "mips": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "y" and qemuarch == "mips64": }}
+{{ input type:"choicelist" name:"new_kbranch" nameappend:"mips64" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Would you like SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall
index dbbe934..00cf360 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/kernel-list.noinstall
@@ -1,5 +1,5 @@
 {{ if kernel_choice != "custom": }}
-{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.1) kernel? (y/n)" default:"y"}}
+{{ input type:"boolean" name:"use_default_kernel" prio:"10" msg:"Would you like to use the default (4.4) kernel? (y/n)" default:"y"}}
 
 {{ if kernel_choice != "custom" and use_default_kernel == "n": }}
-{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_3.19"}}
+{{ input type:"choicelist" name:"kernel_choice" gen:"bsp.kernel.kernels" prio:"10" msg:"Please choose the kernel to use in this BSP:" default:"linux-yocto_4.4"}}
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
deleted file mode 100644
index 4700d98..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-rt_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-rt_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/preempt-rt" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/preempt-rt/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-preempt-rt.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-rt_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
\ No newline at end of file
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
deleted file mode 100644
index 15b9b1b..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.14.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
deleted file mode 100644
index caefcfc..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_3.19.bbappend
+++ /dev/null
@@ -1,33 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-tiny.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-patches.scc \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
new file mode 100644
index 0000000..815c77b
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto-tiny_4.4.bbappend
@@ -0,0 +1,33 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto-tiny_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard/tiny" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/tiny/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-tiny.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-patches.scc \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto-tiny_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.14.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.14.bbappend
deleted file mode 100644
index 62a99d5..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.14.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.14": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.14"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.19.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.19.bbappend
deleted file mode 100644
index a5dd37d..0000000
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_3.19.bbappend
+++ /dev/null
@@ -1,32 +0,0 @@
-# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_3.19": }} this
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-
-PR := "${PR}.1"
-
-COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
-
-{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
-
-{{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
-
-{{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
-
-{{ if need_new_kbranch == "n": }}
-KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
-
-{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
-{{ if smp == "y": }}
-KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
-
-SRC_URI += "file://{{=machine}}-standard.scc \
-            file://{{=machine}}-user-config.cfg \
-            file://{{=machine}}-user-features.scc \
-           "
-
-# replace these SRCREVs with the real commit ids once you've had
-# the appropriate changes committed to the upstream linux-yocto repo
-SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
-#LINUX_VERSION = "3.19"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.1.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.1.bbappend
index 8d0bc97..1e99a04 100644
--- a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.1.bbappend
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.1.bbappend
@@ -8,10 +8,10 @@
 {{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
 
 {{ if need_new_kbranch == "y": }}
-{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "n": }}
-{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard:standard/common-pc-64" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/common-pc-64/base" }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
 
 {{ if need_new_kbranch == "n": }}
 KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
diff --git a/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend
new file mode 100644
index 0000000..b88a06c
--- /dev/null
+++ b/yocto-poky/scripts/lib/bsp/substrate/target/arch/x86_64/recipes-kernel/linux/linux-yocto_4.4.bbappend
@@ -0,0 +1,32 @@
+# yocto-bsp-filename {{ if kernel_choice == "linux-yocto_4.4": }} this
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+PR := "${PR}.1"
+
+COMPATIBLE_MACHINE_{{=machine}} = "{{=machine}}"
+
+{{ input type:"boolean" name:"need_new_kbranch" prio:"20" msg:"Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n]" default:"y" }}
+
+{{ if need_new_kbranch == "y": }}
+{{ input type:"choicelist" name:"new_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+{{ input type:"choicelist" name:"existing_kbranch" gen:"bsp.kernel.all_branches" branches_base:"standard" prio:"20" msg:"Please choose a machine branch to base this BSP on:" default:"standard/base" }}
+
+{{ if need_new_kbranch == "n": }}
+KBRANCH_{{=machine}}  = "{{=existing_kbranch}}"
+
+{{ input type:"boolean" name:"smp" prio:"30" msg:"Do you need SMP support? (y/n)" default:"y"}}
+{{ if smp == "y": }}
+KERNEL_FEATURES_append_{{=machine}} += " cfg/smp.scc"
+
+SRC_URI += "file://{{=machine}}-standard.scc \
+            file://{{=machine}}-user-config.cfg \
+            file://{{=machine}}-user-features.scc \
+           "
+
+# replace these SRCREVs with the real commit ids once you've had
+# the appropriate changes committed to the upstream linux-yocto repo
+SRCREV_machine_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+SRCREV_meta_pn-linux-yocto_{{=machine}} ?= "${AUTOREV}"
+#LINUX_VERSION = "4.4"
diff --git a/yocto-poky/scripts/lib/devtool/__init__.py b/yocto-poky/scripts/lib/devtool/__init__.py
index 50604e6..ff97dfc 100644
--- a/yocto-poky/scripts/lib/devtool/__init__.py
+++ b/yocto-poky/scripts/lib/devtool/__init__.py
@@ -22,6 +22,7 @@
 import sys
 import subprocess
 import logging
+import re
 
 logger = logging.getLogger('devtool')
 
@@ -100,18 +101,20 @@
     """Initialize tinfoil api from bitbake"""
     import scriptpath
     orig_cwd = os.path.abspath(os.curdir)
-    if basepath:
-        os.chdir(basepath)
-    bitbakepath = scriptpath.add_bitbake_lib_path()
-    if not bitbakepath:
-        logger.error("Unable to find bitbake by searching parent directory of this script or PATH")
-        sys.exit(1)
+    try:
+        if basepath:
+            os.chdir(basepath)
+        bitbakepath = scriptpath.add_bitbake_lib_path()
+        if not bitbakepath:
+            logger.error("Unable to find bitbake by searching parent directory of this script or PATH")
+            sys.exit(1)
 
-    import bb.tinfoil
-    tinfoil = bb.tinfoil.Tinfoil(tracking=tracking)
-    tinfoil.prepare(config_only)
-    tinfoil.logger.setLevel(logger.getEffectiveLevel())
-    os.chdir(orig_cwd)
+        import bb.tinfoil
+        tinfoil = bb.tinfoil.Tinfoil(tracking=tracking)
+        tinfoil.prepare(config_only)
+        tinfoil.logger.setLevel(logger.getEffectiveLevel())
+    finally:
+        os.chdir(orig_cwd)
     return tinfoil
 
 def get_recipe_file(cooker, pn):
@@ -126,7 +129,7 @@
             logger.error("Unable to find any recipe file matching %s" % pn)
     return recipefile
 
-def parse_recipe(config, tinfoil, pn, appends):
+def parse_recipe(config, tinfoil, pn, appends, filter_workspace=True):
     """Parse recipe of a package"""
     import oe.recipeutils
     recipefile = get_recipe_file(tinfoil.cooker, pn)
@@ -135,27 +138,44 @@
         return None
     if appends:
         append_files = tinfoil.cooker.collection.get_file_appends(recipefile)
-        # Filter out appends from the workspace
-        append_files = [path for path in append_files if
-                        not path.startswith(config.workspace_path)]
+        if filter_workspace:
+            # Filter out appends from the workspace
+            append_files = [path for path in append_files if
+                            not path.startswith(config.workspace_path)]
     else:
         append_files = None
     return oe.recipeutils.parse_recipe(recipefile, append_files,
                                        tinfoil.config_data)
 
-def check_workspace_recipe(workspace, pn, checksrc=True):
+def check_workspace_recipe(workspace, pn, checksrc=True, bbclassextend=False):
     """
     Check that a recipe is in the workspace and (optionally) that source
     is present.
     """
-    if not pn in workspace:
+
+    workspacepn = pn
+
+    for recipe, value in workspace.iteritems():
+        if recipe == pn:
+            break
+        if bbclassextend:
+            recipefile = value['recipefile']
+            if recipefile:
+                targets = get_bbclassextend_targets(recipefile, recipe)
+                if pn in targets:
+                    workspacepn = recipe
+                    break
+    else:
         raise DevtoolError("No recipe named '%s' in your workspace" % pn)
+
     if checksrc:
-        srctree = workspace[pn]['srctree']
+        srctree = workspace[workspacepn]['srctree']
         if not os.path.exists(srctree):
-            raise DevtoolError("Source tree %s for recipe %s does not exist" % (srctree, pn))
+            raise DevtoolError("Source tree %s for recipe %s does not exist" % (srctree, workspacepn))
         if not os.listdir(srctree):
-            raise DevtoolError("Source tree %s for recipe %s is empty" % (srctree, pn))
+            raise DevtoolError("Source tree %s for recipe %s is empty" % (srctree, workspacepn))
+
+    return workspacepn
 
 def use_external_build(same_dir, no_same_dir, d):
     """
@@ -197,3 +217,41 @@
 
     bb.process.run('git checkout -b %s' % devbranch, cwd=repodir)
     bb.process.run('git tag -f %s' % basetag, cwd=repodir)
+
+def recipe_to_append(recipefile, config, wildcard=False):
+    """
+    Convert a recipe file to a bbappend file path within the workspace.
+    NOTE: if the bbappend already exists, you should be using
+    workspace[args.recipename]['bbappend'] instead of calling this
+    function.
+    """
+    appendname = os.path.splitext(os.path.basename(recipefile))[0]
+    if wildcard:
+        appendname = re.sub(r'_.*', '_%', appendname)
+    appendpath = os.path.join(config.workspace_path, 'appends')
+    appendfile = os.path.join(appendpath, appendname + '.bbappend')
+    return appendfile
+
+def get_bbclassextend_targets(recipefile, pn):
+    """
+    Cheap function to get BBCLASSEXTEND and then convert that to the
+    list of targets that would result.
+    """
+    import bb.utils
+
+    values = {}
+    def get_bbclassextend_varfunc(varname, origvalue, op, newlines):
+        values[varname] = origvalue
+        return origvalue, None, 0, True
+    with open(recipefile, 'r') as f:
+        bb.utils.edit_metadata(f, ['BBCLASSEXTEND'], get_bbclassextend_varfunc)
+
+    targets = []
+    bbclassextend = values.get('BBCLASSEXTEND', '').split()
+    if bbclassextend:
+        for variant in bbclassextend:
+            if variant == 'nativesdk':
+                targets.append('%s-%s' % (variant, pn))
+            elif variant in ['native', 'cross', 'crosssdk']:
+                targets.append('%s-%s' % (pn, variant))
+    return targets
diff --git a/yocto-poky/scripts/lib/devtool/build-image.py b/yocto-poky/scripts/lib/devtool/build-image.py
deleted file mode 100644
index e53239d..0000000
--- a/yocto-poky/scripts/lib/devtool/build-image.py
+++ /dev/null
@@ -1,111 +0,0 @@
-# Development tool - build-image plugin
-#
-# Copyright (C) 2015 Intel Corporation
-#
-# 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 plugin containing the build-image subcommand."""
-
-import os
-import logging
-
-from bb.process import ExecutionError
-from devtool import exec_build_env_command, setup_tinfoil, parse_recipe, DevtoolError
-
-logger = logging.getLogger('devtool')
-
-def _get_packages(tinfoil, workspace, config):
-    """Get list of packages from recipes in the workspace."""
-    result = []
-    for recipe in workspace:
-        data = parse_recipe(config, tinfoil, recipe, True)
-        if 'class-target' in data.getVar('OVERRIDES', True).split(':'):
-            if recipe in data.getVar('PACKAGES', True):
-                result.append(recipe)
-            else:
-                logger.warning("Skipping recipe %s as it doesn't produce a "
-                               "package with the same name", recipe)
-    return result
-
-def build_image(args, config, basepath, workspace):
-    """Entry point for the devtool 'build-image' subcommand."""
-
-    image = args.imagename
-    auto_image = False
-    if not image:
-        sdk_targets = config.get('SDK', 'sdk_targets', '').split()
-        if sdk_targets:
-            image = sdk_targets[0]
-            auto_image = True
-    if not image:
-        raise DevtoolError('Unable to determine image to build, please specify one')
-
-    appendfile = os.path.join(config.workspace_path, 'appends',
-                              '%s.bbappend' % image)
-
-    # remove <image>.bbappend to make sure setup_tinfoil doesn't
-    # break because of it
-    if os.path.isfile(appendfile):
-        os.unlink(appendfile)
-
-    tinfoil = setup_tinfoil(basepath=basepath)
-    rd = parse_recipe(config, tinfoil, image, True)
-    if not rd:
-        # Error already shown
-        return 1
-    if not bb.data.inherits_class('image', rd):
-        if auto_image:
-            raise DevtoolError('Unable to determine image to build, please specify one')
-        else:
-            raise DevtoolError('Specified recipe %s is not an image recipe' % image)
-
-    try:
-        if workspace:
-            packages = _get_packages(tinfoil, workspace, config)
-            if packages:
-                with open(appendfile, 'w') as afile:
-                    # include packages from workspace recipes into the image
-                    afile.write('IMAGE_INSTALL_append = " %s"\n' % ' '.join(packages))
-                    logger.info('Building image %s with the following '
-                                'additional packages: %s', image, ' '.join(packages))
-            else:
-                logger.warning('No packages to add, building image %s unmodified', image)
-        else:
-            logger.warning('No recipes in workspace, building image %s unmodified', image)
-
-        deploy_dir_image = tinfoil.config_data.getVar('DEPLOY_DIR_IMAGE', True)
-
-        tinfoil.shutdown()
-
-        # run bitbake to build image
-        try:
-            exec_build_env_command(config.init_path, basepath,
-                                'bitbake %s' % image, watch=True)
-        except ExecutionError as err:
-            return err.exitcode
-    finally:
-        if os.path.isfile(appendfile):
-            os.unlink(appendfile)
-
-    logger.info('Successfully built %s. You can find output files in %s'
-                % (image, deploy_dir_image))
-
-def register_commands(subparsers, context):
-    """Register devtool subcommands from the build-image plugin"""
-    parser = subparsers.add_parser('build-image',
-                                   help='Build image including workspace recipe packages',
-                                   description='Builds an image, extending it to include '
-                                   'packages from recipes in the workspace')
-    parser.add_argument('imagename', help='Image recipe to build', nargs='?')
-    parser.set_defaults(func=build_image)
diff --git a/yocto-poky/scripts/lib/devtool/build.py b/yocto-poky/scripts/lib/devtool/build.py
index 9b58858..48f6fe1 100644
--- a/yocto-poky/scripts/lib/devtool/build.py
+++ b/yocto-poky/scripts/lib/devtool/build.py
@@ -25,51 +25,62 @@
 
 logger = logging.getLogger('devtool')
 
-def plugin_init(pluginlist):
-    """Plugin initialization"""
-    pass
 
-def _create_conf_file(values, conf_file=None):
-    if not conf_file:
-        fd, conf_file = tempfile.mkstemp(suffix='.conf')
-    elif not os.path.exists(os.path.dirname(conf_file)):
-        logger.debug("Creating folder %s" % os.path.dirname(conf_file))
-        bb.utils.mkdirhier(os.path.dirname(conf_file))
-    with open(conf_file, 'w') as f:
-        for key, value in values.iteritems():
-            f.write('%s = "%s"\n' % (key, value))
-    return conf_file
+def _set_file_values(fn, values):
+    remaining = values.keys()
+
+    def varfunc(varname, origvalue, op, newlines):
+        newvalue = values.get(varname, origvalue)
+        remaining.remove(varname)
+        return (newvalue, '=', 0, True)
+
+    with open(fn, 'r') as f:
+        (updated, newlines) = bb.utils.edit_metadata(f, values, varfunc)
+
+    for item in remaining:
+        updated = True
+        newlines.append('%s = "%s"' % (item, values[item]))
+
+    if updated:
+        with open(fn, 'w') as f:
+            f.writelines(newlines)
+    return updated
+
+def _get_build_tasks(config):
+    tasks = config.get('Build', 'build_task', 'populate_sysroot,packagedata').split(',')
+    return ['do_%s' % task.strip() for task in tasks]
 
 def build(args, config, basepath, workspace):
     """Entry point for the devtool 'build' subcommand"""
-    check_workspace_recipe(workspace, args.recipename)
+    workspacepn = check_workspace_recipe(workspace, args.recipename, bbclassextend=True)
 
-    build_task = config.get('Build', 'build_task', 'populate_sysroot')
+    build_tasks = _get_build_tasks(config)
 
-    postfile_param = ""
-    postfile = ""
+    bbappend = workspace[workspacepn]['bbappend']
     if args.disable_parallel_make:
         logger.info("Disabling 'make' parallelism")
-        postfile = os.path.join(basepath, 'conf', 'disable_parallelism.conf')
-        _create_conf_file({'PARALLEL_MAKE':''}, postfile)
-        postfile_param = "-R %s" % postfile
+        _set_file_values(bbappend, {'PARALLEL_MAKE': ''})
     try:
-        exec_build_env_command(config.init_path, basepath, 'bitbake -c %s %s %s' % (build_task, postfile_param, args.recipename), watch=True)
+        bbargs = []
+        for task in build_tasks:
+            if args.recipename.endswith('-native') and 'package' in task:
+                continue
+            bbargs.append('%s:%s' % (args.recipename, task))
+        exec_build_env_command(config.init_path, basepath, 'bitbake %s' % ' '.join(bbargs), watch=True)
     except bb.process.ExecutionError as e:
         # We've already seen the output since watch=True, so just ensure we return something to the user
         return e.exitcode
     finally:
-        if postfile:
-            logger.debug('Removing postfile')
-            os.remove(postfile)
+        if args.disable_parallel_make:
+            _set_file_values(bbappend, {'PARALLEL_MAKE': None})
 
     return 0
 
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
     parser_build = subparsers.add_parser('build', help='Build a recipe',
-                                         description='Builds the specified recipe using bitbake',
-                                         formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+                                         description='Builds the specified recipe using bitbake (up to and including %s)' % ', '.join(_get_build_tasks(context.config)),
+                                         group='working')
     parser_build.add_argument('recipename', help='Recipe to build')
     parser_build.add_argument('-s', '--disable-parallel-make', action="store_true", help='Disable make parallelism')
     parser_build.set_defaults(func=build)
diff --git a/yocto-poky/scripts/lib/devtool/build_image.py b/yocto-poky/scripts/lib/devtool/build_image.py
new file mode 100644
index 0000000..e51d766
--- /dev/null
+++ b/yocto-poky/scripts/lib/devtool/build_image.py
@@ -0,0 +1,154 @@
+# Development tool - build-image plugin
+#
+# Copyright (C) 2015 Intel Corporation
+#
+# 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 plugin containing the build-image subcommand."""
+
+import os
+import logging
+
+from bb.process import ExecutionError
+from devtool import exec_build_env_command, setup_tinfoil, parse_recipe, DevtoolError
+
+logger = logging.getLogger('devtool')
+
+class TargetNotImageError(Exception):
+    pass
+
+def _get_packages(tinfoil, workspace, config):
+    """Get list of packages from recipes in the workspace."""
+    result = []
+    for recipe in workspace:
+        data = parse_recipe(config, tinfoil, recipe, True)
+        if 'class-target' in data.getVar('OVERRIDES', True).split(':'):
+            if recipe in data.getVar('PACKAGES', True):
+                result.append(recipe)
+            else:
+                logger.warning("Skipping recipe %s as it doesn't produce a "
+                               "package with the same name", recipe)
+    return result
+
+def build_image(args, config, basepath, workspace):
+    """Entry point for the devtool 'build-image' subcommand."""
+
+    image = args.imagename
+    auto_image = False
+    if not image:
+        sdk_targets = config.get('SDK', 'sdk_targets', '').split()
+        if sdk_targets:
+            image = sdk_targets[0]
+            auto_image = True
+    if not image:
+        raise DevtoolError('Unable to determine image to build, please specify one')
+
+    try:
+        if args.add_packages:
+            add_packages = args.add_packages.split(',')
+        else:
+            add_packages = None
+        result, outputdir = build_image_task(config, basepath, workspace, image, add_packages)
+    except TargetNotImageError:
+        if auto_image:
+            raise DevtoolError('Unable to determine image to build, please specify one')
+        else:
+            raise DevtoolError('Specified recipe %s is not an image recipe' % image)
+
+    if result == 0:
+        logger.info('Successfully built %s. You can find output files in %s'
+                    % (image, outputdir))
+    return result
+
+def build_image_task(config, basepath, workspace, image, add_packages=None, task=None, extra_append=None):
+    appendfile = os.path.join(config.workspace_path, 'appends',
+                              '%s.bbappend' % image)
+
+    # remove <image>.bbappend to make sure setup_tinfoil doesn't
+    # break because of it
+    if os.path.isfile(appendfile):
+        os.unlink(appendfile)
+
+    tinfoil = setup_tinfoil(basepath=basepath)
+    rd = parse_recipe(config, tinfoil, image, True)
+    if not rd:
+        # Error already shown
+        return (1, None)
+    if not bb.data.inherits_class('image', rd):
+        raise TargetNotImageError()
+
+    outputdir = None
+    try:
+        if workspace or add_packages:
+            if add_packages:
+                packages = add_packages
+            else:
+                packages = _get_packages(tinfoil, workspace, config)
+        else:
+            packages = None
+        if not task:
+            if not packages and not add_packages and workspace:
+                logger.warning('No recipes in workspace, building image %s unmodified', image)
+            elif not packages:
+                logger.warning('No packages to add, building image %s unmodified', image)
+
+        if packages or extra_append:
+            bb.utils.mkdirhier(os.path.dirname(appendfile))
+            with open(appendfile, 'w') as afile:
+                if packages:
+                    # include packages from workspace recipes into the image
+                    afile.write('IMAGE_INSTALL_append = " %s"\n' % ' '.join(packages))
+                    if not task:
+                        logger.info('Building image %s with the following '
+                                    'additional packages: %s', image, ' '.join(packages))
+                if extra_append:
+                    for line in extra_append:
+                        afile.write('%s\n' % line)
+
+        if task in ['populate_sdk', 'populate_sdk_ext']:
+            outputdir = rd.getVar('SDK_DEPLOY', True)
+        else:
+            outputdir = rd.getVar('DEPLOY_DIR_IMAGE', True)
+
+        tinfoil.shutdown()
+
+        options = ''
+        if task:
+            options += '-c %s' % task
+
+        # run bitbake to build image (or specified task)
+        try:
+            exec_build_env_command(config.init_path, basepath,
+                                   'bitbake %s %s' % (options, image), watch=True)
+        except ExecutionError as err:
+            return (err.exitcode, None)
+    finally:
+        if os.path.isfile(appendfile):
+            os.unlink(appendfile)
+    return (0, outputdir)
+
+
+def register_commands(subparsers, context):
+    """Register devtool subcommands from the build-image plugin"""
+    parser = subparsers.add_parser('build-image',
+                                   help='Build image including workspace recipe packages',
+                                   description='Builds an image, extending it to include '
+                                   'packages from recipes in the workspace',
+                                   group='testbuild', order=-10)
+    parser.add_argument('imagename', help='Image recipe to build', nargs='?')
+    parser.add_argument('-p', '--add-packages', help='Instead of adding packages for the '
+                        'entire workspace, specify packages to be added to the image '
+                        '(separate multiple packages by commas)',
+                        metavar='PACKAGES')
+    parser.set_defaults(func=build_image)
diff --git a/yocto-poky/scripts/lib/devtool/build_sdk.py b/yocto-poky/scripts/lib/devtool/build_sdk.py
new file mode 100644
index 0000000..b89d65b
--- /dev/null
+++ b/yocto-poky/scripts/lib/devtool/build_sdk.py
@@ -0,0 +1,65 @@
+# Development tool - build-sdk command plugin
+#
+# Copyright (C) 2015-2016 Intel Corporation
+#
+# 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.
+
+import os
+import subprocess
+import logging
+import glob
+import shutil
+import errno
+import sys
+import tempfile
+from devtool import exec_build_env_command, setup_tinfoil, parse_recipe, DevtoolError
+from devtool import build_image
+
+logger = logging.getLogger('devtool')
+
+
+def build_sdk(args, config, basepath, workspace):
+    """Entry point for the devtool build-sdk command"""
+
+    sdk_targets = config.get('SDK', 'sdk_targets', '').split()
+    if sdk_targets:
+        image = sdk_targets[0]
+    else:
+        raise DevtoolError('Unable to determine image to build SDK for')
+
+    extra_append = ['SDK_DERIVATIVE = "1"']
+    try:
+        result, outputdir = build_image.build_image_task(config,
+                                                         basepath,
+                                                         workspace,
+                                                         image,
+                                                         task='populate_sdk_ext',
+                                                         extra_append=extra_append)
+    except build_image.TargetNotImageError:
+        raise DevtoolError('Unable to determine image to build SDK for')
+
+    if result == 0:
+        logger.info('Successfully built SDK. You can find output files in %s'
+                    % outputdir)
+    return result
+
+
+def register_commands(subparsers, context):
+    """Register devtool subcommands"""
+    if context.fixed_setup:
+        parser_build_sdk = subparsers.add_parser('build-sdk',
+                                                 help='Build a derivative SDK of this one',
+                                                 description='Builds an extensible SDK based upon this one and the items in your workspace',
+                                                 group='advanced')
+        parser_build_sdk.set_defaults(func=build_sdk)
diff --git a/yocto-poky/scripts/lib/devtool/deploy.py b/yocto-poky/scripts/lib/devtool/deploy.py
index c90c6b1..66644cc 100644
--- a/yocto-poky/scripts/lib/devtool/deploy.py
+++ b/yocto-poky/scripts/lib/devtool/deploy.py
@@ -1,6 +1,6 @@
 # Development tool - deploy/undeploy command plugin
 #
-# Copyright (C) 2014-2015 Intel Corporation
+# Copyright (C) 2014-2016 Intel Corporation
 #
 # 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
@@ -19,13 +19,127 @@
 import os
 import subprocess
 import logging
+import tempfile
+import shutil
+import argparse_oe
 from devtool import exec_fakeroot, setup_tinfoil, check_workspace_recipe, DevtoolError
 
 logger = logging.getLogger('devtool')
 
+deploylist_path = '/.devtool'
+
+def _prepare_remote_script(deploy, verbose=False, dryrun=False, undeployall=False, nopreserve=False, nocheckspace=False):
+    """
+    Prepare a shell script for running on the target to
+    deploy/undeploy files. We have to be careful what we put in this
+    script - only commands that are likely to be available on the
+    target are suitable (the target might be constrained, e.g. using
+    busybox rather than bash with coreutils).
+    """
+    lines = []
+    lines.append('#!/bin/sh')
+    lines.append('set -e')
+    if undeployall:
+        # Yes, I know this is crude - but it does work
+        lines.append('for entry in %s/*.list; do' % deploylist_path)
+        lines.append('[ ! -f $entry ] && exit')
+        lines.append('set `basename $entry | sed "s/.list//"`')
+    if dryrun:
+        if not deploy:
+            lines.append('echo "Previously deployed files for $1:"')
+    lines.append('manifest="%s/$1.list"' % deploylist_path)
+    lines.append('preservedir="%s/$1.preserve"' % deploylist_path)
+    lines.append('if [ -f $manifest ] ; then')
+    # Read manifest in reverse and delete files / remove empty dirs
+    lines.append('    sed \'1!G;h;$!d\' $manifest | while read file')
+    lines.append('    do')
+    if dryrun:
+        lines.append('        if [ ! -d $file ] ; then')
+        lines.append('            echo $file')
+        lines.append('        fi')
+    else:
+        lines.append('        if [ -d $file ] ; then')
+        # Avoid deleting a preserved directory in case it has special perms
+        lines.append('            if [ ! -d $preservedir/$file ] ; then')
+        lines.append('                rmdir $file > /dev/null 2>&1 || true')
+        lines.append('            fi')
+        lines.append('        else')
+        lines.append('            rm $file')
+        lines.append('        fi')
+    lines.append('    done')
+    if not dryrun:
+        lines.append('    rm $manifest')
+    if not deploy and not dryrun:
+        # May as well remove all traces
+        lines.append('    rmdir `dirname $manifest` > /dev/null 2>&1 || true')
+    lines.append('fi')
+
+    if deploy:
+        if not nocheckspace:
+            # Check for available space
+            # FIXME This doesn't take into account files spread across multiple
+            # partitions, but doing that is non-trivial
+            # Find the part of the destination path that exists
+            lines.append('checkpath="$2"')
+            lines.append('while [ "$checkpath" != "/" ] && [ ! -e $checkpath ]')
+            lines.append('do')
+            lines.append('    checkpath=`dirname "$checkpath"`')
+            lines.append('done')
+            lines.append('freespace=`df -P $checkpath | sed "1d" | awk \'{ print $4 }\'`')
+            # First line of the file is the total space
+            lines.append('total=`head -n1 $3`')
+            lines.append('if [ $total -gt $freespace ] ; then')
+            lines.append('    echo "ERROR: insufficient space on target (available ${freespace}, needed ${total})"')
+            lines.append('    exit 1')
+            lines.append('fi')
+        if not nopreserve:
+            # Preserve any files that exist. Note that this will add to the
+            # preserved list with successive deployments if the list of files
+            # deployed changes, but because we've deleted any previously
+            # deployed files at this point it will never preserve anything
+            # that was deployed, only files that existed prior to any deploying
+            # (which makes the most sense)
+            lines.append('cat $3 | sed "1d" | while read file fsize')
+            lines.append('do')
+            lines.append('    if [ -e $file ] ; then')
+            lines.append('    dest="$preservedir/$file"')
+            lines.append('    mkdir -p `dirname $dest`')
+            lines.append('    mv $file $dest')
+            lines.append('    fi')
+            lines.append('done')
+            lines.append('rm $3')
+        lines.append('mkdir -p `dirname $manifest`')
+        lines.append('mkdir -p $2')
+        if verbose:
+            lines.append('    tar xv -C $2 -f - | tee $manifest')
+        else:
+            lines.append('    tar xv -C $2 -f - > $manifest')
+        lines.append('sed -i "s!^./!$2!" $manifest')
+    elif not dryrun:
+        # Put any preserved files back
+        lines.append('if [ -d $preservedir ] ; then')
+        lines.append('    cd $preservedir')
+        lines.append('    find . -type f -exec mv {} /{} \;')
+        lines.append('    cd /')
+        lines.append('    rm -rf $preservedir')
+        lines.append('fi')
+
+    if undeployall:
+        if not dryrun:
+            lines.append('echo "NOTE: Successfully undeployed $1"')
+        lines.append('done')
+
+    # Delete the script itself
+    lines.append('rm $0')
+    lines.append('')
+
+    return '\n'.join(lines)
+
+
 def deploy(args, config, basepath, workspace):
     """Entry point for the devtool 'deploy' subcommand"""
     import re
+    import math
     import oe.recipeutils
 
     check_workspace_recipe(workspace, args.recipename, checksrc=False)
@@ -36,9 +150,8 @@
         destdir = '/'
     else:
         args.target = host
-
-    deploy_dir = os.path.join(basepath, 'target_deploy', args.target)
-    deploy_file = os.path.join(deploy_dir, args.recipename + '.list')
+    if not destdir.endswith('/'):
+        destdir += '/'
 
     tinfoil = setup_tinfoil(basepath=basepath)
     try:
@@ -52,60 +165,25 @@
                            'recipe? If so, the install step has not installed '
                            'any files.' % args.recipename)
 
+    filelist = []
+    ftotalsize = 0
+    for root, _, files in os.walk(recipe_outdir):
+        for fn in files:
+            # Get the size in kiB (since we'll be comparing it to the output of du -k)
+            # MUST use lstat() here not stat() or getfilesize() since we don't want to
+            # dereference symlinks
+            fsize = int(math.ceil(float(os.lstat(os.path.join(root, fn)).st_size)/1024))
+            ftotalsize += fsize
+            # The path as it would appear on the target
+            fpath = os.path.join(destdir, os.path.relpath(root, recipe_outdir), fn)
+            filelist.append((fpath, fsize))
+
     if args.dry_run:
         print('Files to be deployed for %s on target %s:' % (args.recipename, args.target))
-        for root, _, files in os.walk(recipe_outdir):
-            for fn in files:
-                print('  %s' % os.path.join(destdir, os.path.relpath(root, recipe_outdir), fn))
+        for item, _ in filelist:
+            print('  %s' % item)
         return 0
 
-    if os.path.exists(deploy_file):
-        if undeploy(args, config, basepath, workspace):
-            # Error already shown
-            return 1
-
-    extraoptions = ''
-    if args.no_host_check:
-        extraoptions += '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
-    if args.show_status:
-        tarextractopts = 'xv'
-    else:
-        tarextractopts = 'x'
-        extraoptions += ' -q'
-    # We cannot use scp here, because it doesn't preserve symlinks
-    ret = exec_fakeroot(rd, 'tar cf - . | ssh %s %s \'tar %s -C %s -f -\'' % (extraoptions, args.target, tarextractopts, destdir), cwd=recipe_outdir, shell=True)
-    if ret != 0:
-        raise DevtoolError('Deploy failed - rerun with -s to get a complete '
-                           'error message')
-
-    logger.info('Successfully deployed %s' % recipe_outdir)
-
-    if not os.path.exists(deploy_dir):
-        os.makedirs(deploy_dir)
-
-    files_list = []
-    for root, _, files in os.walk(recipe_outdir):
-        for filename in files:
-            filename = os.path.relpath(os.path.join(root, filename), recipe_outdir)
-            files_list.append(os.path.join(destdir, filename))
-
-    with open(deploy_file, 'w') as fobj:
-        fobj.write('\n'.join(files_list))
-
-    return 0
-
-def undeploy(args, config, basepath, workspace):
-    """Entry point for the devtool 'undeploy' subcommand"""
-    deploy_file = os.path.join(basepath, 'target_deploy', args.target, args.recipename + '.list')
-    if not os.path.exists(deploy_file):
-        raise DevtoolError('%s has not been deployed' % args.recipename)
-
-    if args.dry_run:
-        print('Previously deployed files to be un-deployed for %s on target %s:' % (args.recipename, args.target))
-        with open(deploy_file, 'r') as f:
-            for line in f:
-                print('  %s' % line.rstrip())
-        return 0
 
     extraoptions = ''
     if args.no_host_check:
@@ -113,36 +191,114 @@
     if not args.show_status:
         extraoptions += ' -q'
 
-    ret = subprocess.call("scp %s %s %s:/tmp" % (extraoptions, deploy_file, args.target), shell=True)
-    if ret != 0:
-        raise DevtoolError('Failed to copy file list to %s - rerun with -s to '
-                           'get a complete error message' % args.target)
+    # In order to delete previously deployed files and have the manifest file on
+    # the target, we write out a shell script and then copy it to the target
+    # so we can then run it (piping tar output to it).
+    # (We cannot use scp here, because it doesn't preserve symlinks.)
+    tmpdir = tempfile.mkdtemp(prefix='devtool')
+    try:
+        tmpscript = '/tmp/devtool_deploy.sh'
+        tmpfilelist = os.path.join(os.path.dirname(tmpscript), 'devtool_deploy.list')
+        shellscript = _prepare_remote_script(deploy=True,
+                                             verbose=args.show_status,
+                                             nopreserve=args.no_preserve,
+                                             nocheckspace=args.no_check_space)
+        # Write out the script to a file
+        with open(os.path.join(tmpdir, os.path.basename(tmpscript)), 'w') as f:
+            f.write(shellscript)
+        # Write out the file list
+        with open(os.path.join(tmpdir, os.path.basename(tmpfilelist)), 'w') as f:
+            f.write('%d\n' % ftotalsize)
+            for fpath, fsize in filelist:
+                f.write('%s %d\n' % (fpath, fsize))
+        # Copy them to the target
+        ret = subprocess.call("scp %s %s/* %s:%s" % (extraoptions, tmpdir, args.target, os.path.dirname(tmpscript)), shell=True)
+        if ret != 0:
+            raise DevtoolError('Failed to copy script to %s - rerun with -s to '
+                            'get a complete error message' % args.target)
+    finally:
+        shutil.rmtree(tmpdir)
 
-    ret = subprocess.call("ssh %s %s 'xargs -n1 rm -f </tmp/%s'" % (extraoptions, args.target, os.path.basename(deploy_file)), shell=True)
-    if ret == 0:
-        logger.info('Successfully undeployed %s' % args.recipename)
-        os.remove(deploy_file)
-    else:
+    # Now run the script
+    ret = exec_fakeroot(rd, 'tar cf - . | ssh %s %s \'sh %s %s %s %s\'' % (extraoptions, args.target, tmpscript, args.recipename, destdir, tmpfilelist), cwd=recipe_outdir, shell=True)
+    if ret != 0:
+        raise DevtoolError('Deploy failed - rerun with -s to get a complete '
+                           'error message')
+
+    logger.info('Successfully deployed %s' % recipe_outdir)
+
+    files_list = []
+    for root, _, files in os.walk(recipe_outdir):
+        for filename in files:
+            filename = os.path.relpath(os.path.join(root, filename), recipe_outdir)
+            files_list.append(os.path.join(destdir, filename))
+
+    return 0
+
+def undeploy(args, config, basepath, workspace):
+    """Entry point for the devtool 'undeploy' subcommand"""
+    if args.all and args.recipename:
+        raise argparse_oe.ArgumentUsageError('Cannot specify -a/--all with a recipe name', 'undeploy-target')
+    elif not args.recipename and not args.all:
+        raise argparse_oe.ArgumentUsageError('If you don\'t specify a recipe, you must specify -a/--all', 'undeploy-target')
+
+    extraoptions = ''
+    if args.no_host_check:
+        extraoptions += '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
+    if not args.show_status:
+        extraoptions += ' -q'
+
+    args.target = args.target.split(':')[0]
+
+    tmpdir = tempfile.mkdtemp(prefix='devtool')
+    try:
+        tmpscript = '/tmp/devtool_undeploy.sh'
+        shellscript = _prepare_remote_script(deploy=False, dryrun=args.dry_run, undeployall=args.all)
+        # Write out the script to a file
+        with open(os.path.join(tmpdir, os.path.basename(tmpscript)), 'w') as f:
+            f.write(shellscript)
+        # Copy it to the target
+        ret = subprocess.call("scp %s %s/* %s:%s" % (extraoptions, tmpdir, args.target, os.path.dirname(tmpscript)), shell=True)
+        if ret != 0:
+            raise DevtoolError('Failed to copy script to %s - rerun with -s to '
+                                'get a complete error message' % args.target)
+    finally:
+        shutil.rmtree(tmpdir)
+
+    # Now run the script
+    ret = subprocess.call('ssh %s %s \'sh %s %s\'' % (extraoptions, args.target, tmpscript, args.recipename), shell=True)
+    if ret != 0:
         raise DevtoolError('Undeploy failed - rerun with -s to get a complete '
                            'error message')
 
-    return ret
+    if not args.all and not args.dry_run:
+        logger.info('Successfully undeployed %s' % args.recipename)
+    return 0
 
 
 def register_commands(subparsers, context):
     """Register devtool subcommands from the deploy plugin"""
-    parser_deploy = subparsers.add_parser('deploy-target', help='Deploy recipe output files to live target machine')
+    parser_deploy = subparsers.add_parser('deploy-target',
+                                          help='Deploy recipe output files to live target machine',
+                                          description='Deploys a recipe\'s build output (i.e. the output of the do_install task) to a live target machine over ssh. By default, any existing files will be preserved instead of being overwritten and will be restored if you run devtool undeploy-target. Note: this only deploys the recipe itself and not any runtime dependencies, so it is assumed that those have been installed on the target beforehand.',
+                                          group='testbuild')
     parser_deploy.add_argument('recipename', help='Recipe to deploy')
     parser_deploy.add_argument('target', help='Live target machine running an ssh server: user@hostname[:destdir]')
     parser_deploy.add_argument('-c', '--no-host-check', help='Disable ssh host key checking', action='store_true')
     parser_deploy.add_argument('-s', '--show-status', help='Show progress/status output', action='store_true')
     parser_deploy.add_argument('-n', '--dry-run', help='List files to be deployed only', action='store_true')
+    parser_deploy.add_argument('-p', '--no-preserve', help='Do not preserve existing files', action='store_true')
+    parser_deploy.add_argument('--no-check-space', help='Do not check for available space before deploying', action='store_true')
     parser_deploy.set_defaults(func=deploy)
 
-    parser_undeploy = subparsers.add_parser('undeploy-target', help='Undeploy recipe output files in live target machine')
-    parser_undeploy.add_argument('recipename', help='Recipe to undeploy')
+    parser_undeploy = subparsers.add_parser('undeploy-target',
+                                            help='Undeploy recipe output files in live target machine',
+                                            description='Un-deploys recipe output files previously deployed to a live target machine by devtool deploy-target.',
+                                            group='testbuild')
+    parser_undeploy.add_argument('recipename', help='Recipe to undeploy (if not using -a/--all)', nargs='?')
     parser_undeploy.add_argument('target', help='Live target machine running an ssh server: user@hostname')
     parser_undeploy.add_argument('-c', '--no-host-check', help='Disable ssh host key checking', action='store_true')
     parser_undeploy.add_argument('-s', '--show-status', help='Show progress/status output', action='store_true')
+    parser_undeploy.add_argument('-a', '--all', help='Undeploy all recipes deployed on the target', action='store_true')
     parser_undeploy.add_argument('-n', '--dry-run', help='List files to be undeployed only', action='store_true')
     parser_undeploy.set_defaults(func=undeploy)
diff --git a/yocto-poky/scripts/lib/devtool/package.py b/yocto-poky/scripts/lib/devtool/package.py
index b8d8423..afb5809 100644
--- a/yocto-poky/scripts/lib/devtool/package.py
+++ b/yocto-poky/scripts/lib/devtool/package.py
@@ -24,22 +24,21 @@
 
 logger = logging.getLogger('devtool')
 
-def plugin_init(pluginlist):
-    """Plugin initialization"""
-    pass
-
 def package(args, config, basepath, workspace):
     """Entry point for the devtool 'package' subcommand"""
     check_workspace_recipe(workspace, args.recipename)
 
-    image_pkgtype = config.get('Package', 'image_pkgtype', '')
-    if not image_pkgtype:
-        tinfoil = setup_tinfoil(basepath=basepath)
-        try:
-            tinfoil.prepare(config_only=True)
+    tinfoil = setup_tinfoil(basepath=basepath)
+    try:
+        tinfoil.prepare(config_only=True)
+
+        image_pkgtype = config.get('Package', 'image_pkgtype', '')
+        if not image_pkgtype:
             image_pkgtype = tinfoil.config_data.getVar('IMAGE_PKGTYPE', True)
-        finally:
-            tinfoil.shutdown()
+
+        deploy_dir_pkg = tinfoil.config_data.getVar('DEPLOY_DIR_%s' % image_pkgtype.upper(), True)
+    finally:
+        tinfoil.shutdown()
 
     package_task = config.get('Package', 'package_task', 'package_write_%s' % image_pkgtype)
     try:
@@ -47,13 +46,17 @@
     except bb.process.ExecutionError as e:
         # We've already seen the output since watch=True, so just ensure we return something to the user
         return e.exitcode
-    logger.info('Your packages are in %s/tmp/deploy/%s' % (basepath, image_pkgtype))
+
+    logger.info('Your packages are in %s' % deploy_dir_pkg)
 
     return 0
 
 def register_commands(subparsers, context):
     """Register devtool subcommands from the package plugin"""
     if context.fixed_setup:
-        parser_package = subparsers.add_parser('package', help='Build packages for a recipe', description='Builds packages for a recipe\'s output files')
+        parser_package = subparsers.add_parser('package',
+                                               help='Build packages for a recipe',
+                                               description='Builds packages for a recipe\'s output files',
+                                               group='testbuild', order=-5)
         parser_package.add_argument('recipename', help='Recipe to package')
         parser_package.set_defaults(func=package)
diff --git a/yocto-poky/scripts/lib/devtool/runqemu.py b/yocto-poky/scripts/lib/devtool/runqemu.py
index 5282afb..daee7fb 100644
--- a/yocto-poky/scripts/lib/devtool/runqemu.py
+++ b/yocto-poky/scripts/lib/devtool/runqemu.py
@@ -57,7 +57,8 @@
     """Register devtool subcommands from this plugin"""
     if context.fixed_setup:
         parser_runqemu = subparsers.add_parser('runqemu', help='Run QEMU on the specified image',
-                                               description='Runs QEMU to boot the specified image')
+                                               description='Runs QEMU to boot the specified image',
+                                               group='testbuild', order=-20)
         parser_runqemu.add_argument('imagename', help='Name of built image to boot within QEMU', nargs='?')
         parser_runqemu.add_argument('args', help='Any remaining arguments are passed to the runqemu script (pass --help after imagename to see what these are)',
                                     nargs=argparse.REMAINDER)
diff --git a/yocto-poky/scripts/lib/devtool/sdk.py b/yocto-poky/scripts/lib/devtool/sdk.py
index f15a6a9..46fd12b 100644
--- a/yocto-poky/scripts/lib/devtool/sdk.py
+++ b/yocto-poky/scripts/lib/devtool/sdk.py
@@ -1,4 +1,19 @@
 # Development tool - sdk-update command plugin
+#
+# Copyright (C) 2015-2016 Intel Corporation
+#
+# 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.
 
 import os
 import subprocess
@@ -7,14 +22,12 @@
 import shutil
 import errno
 import sys
-from devtool import exec_build_env_command, setup_tinfoil, DevtoolError
+import tempfile
+import re
+from devtool import exec_build_env_command, setup_tinfoil, parse_recipe, DevtoolError
 
 logger = logging.getLogger('devtool')
 
-def plugin_init(pluginlist):
-    """Plugin initialization"""
-    pass
-
 def parse_locked_sigs(sigfile_path):
     """Return <pn:task>:<hash> dictionary"""
     sig_dict = {}
@@ -78,13 +91,26 @@
         logger.debug("Copying %s to %s" % (sb, dst))
         shutil.copy(sb, dst)
 
+def check_manifest(fn, basepath):
+    import bb.utils
+    changedfiles = []
+    with open(fn, 'r') as f:
+        for line in f:
+            splitline = line.split()
+            if len(splitline) > 1:
+                chksum = splitline[0]
+                fpath = splitline[1]
+                curr_chksum = bb.utils.sha256_file(os.path.join(basepath, fpath))
+                if chksum != curr_chksum:
+                    logger.debug('File %s changed: old csum = %s, new = %s' % (os.path.join(basepath, fpath), curr_chksum, chksum))
+                    changedfiles.append(fpath)
+    return changedfiles
+
 def sdk_update(args, config, basepath, workspace):
     # Fetch locked-sigs.inc file from remote/local destination
     updateserver = args.updateserver
     if not updateserver:
         updateserver = config.get('SDK', 'updateserver', '')
-    if not updateserver:
-        raise DevtoolError("Update server not specified in config file, you must specify it on the command line")
     logger.debug("updateserver: %s" % updateserver)
 
     # Make sure we are using sdk-update from within SDK
@@ -101,6 +127,18 @@
     else:
         is_remote = False
 
+    layers_dir = os.path.join(basepath, 'layers')
+    conf_dir = os.path.join(basepath, 'conf')
+
+    # Grab variable values
+    tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
+    try:
+        stamps_dir = tinfoil.config_data.getVar('STAMPS_DIR', True)
+        sstate_mirrors = tinfoil.config_data.getVar('SSTATE_MIRRORS', True)
+        site_conf_version = tinfoil.config_data.getVar('SITE_CONF_VERSION', True)
+    finally:
+        tinfoil.shutdown()
+
     if not is_remote:
         # devtool sdk-update /local/path/to/latest/sdk
         new_locked_sig_file_path = os.path.join(updateserver, 'conf/locked-sigs.inc')
@@ -111,6 +149,7 @@
             logger.debug("Found conf/locked-sigs.inc in %s" % updateserver)
         update_dict = generate_update_dict(new_locked_sig_file_path, old_locked_sig_file_path)
         logger.debug("update_dict = %s" % update_dict)
+        newsdk_path = updateserver
         sstate_dir = os.path.join(newsdk_path, 'sstate-cache')
         if not os.path.exists(sstate_dir):
             logger.error("sstate-cache directory not found under %s" % newsdk_path)
@@ -124,72 +163,204 @@
         install_sstate_objects(sstate_objects, updateserver.rstrip('/'), basepath)
         logger.info("Updating configuration files")
         new_conf_dir = os.path.join(updateserver, 'conf')
-        old_conf_dir = os.path.join(basepath, 'conf')
-        shutil.rmtree(old_conf_dir)
-        shutil.copytree(new_conf_dir, old_conf_dir)
+        shutil.rmtree(conf_dir)
+        shutil.copytree(new_conf_dir, conf_dir)
         logger.info("Updating layers")
         new_layers_dir = os.path.join(updateserver, 'layers')
-        old_layers_dir = os.path.join(basepath, 'layers')
-        shutil.rmtree(old_layers_dir)
-        ret = subprocess.call("cp -a %s %s" % (new_layers_dir, old_layers_dir), shell=True)
+        shutil.rmtree(layers_dir)
+        ret = subprocess.call("cp -a %s %s" % (new_layers_dir, layers_dir), shell=True)
         if ret != 0:
-            logger.error("Copying %s to %s failed" % (new_layers_dir, old_layers_dir))
+            logger.error("Copying %s to %s failed" % (new_layers_dir, layers_dir))
             return ret
     else:
         # devtool sdk-update http://myhost/sdk
-        tmpsdk_dir = '/tmp/sdk-ext'
-        if os.path.exists(tmpsdk_dir):
-            shutil.rmtree(tmpsdk_dir)
-        os.makedirs(tmpsdk_dir)
-        os.makedirs(os.path.join(tmpsdk_dir, 'conf'))
-        # Fetch locked-sigs.inc from update server
-        ret = subprocess.call("wget -q -O - %s/conf/locked-sigs.inc > %s/locked-sigs.inc" % (updateserver, os.path.join(tmpsdk_dir, 'conf')), shell=True)
-        if ret != 0:
-            logger.error("Fetching conf/locked-sigs.inc from %s to %s/locked-sigs.inc failed" % (updateserver, os.path.join(tmpsdk_dir, 'conf')))
-            return ret
-        else:
-            logger.info("Fetching conf/locked-sigs.inc from %s to %s/locked-sigs.inc succeeded" % (updateserver, os.path.join(tmpsdk_dir, 'conf')))
-        new_locked_sig_file_path = os.path.join(tmpsdk_dir, 'conf/locked-sigs.inc')
-        update_dict = generate_update_dict(new_locked_sig_file_path, old_locked_sig_file_path)
-        logger.debug("update_dict = %s" % update_dict)
-        if len(update_dict) == 0:
-            logger.info("No need to update.")
-            return 0
-        # Update metadata
-        logger.debug("Updating meta data via git ...")
-        # Try using 'git pull', if failed, use 'git clone'
-        if os.path.exists(os.path.join(basepath, 'layers/.git')):
-            ret = subprocess.call("cd layers && git pull %s/layers/.git" % updateserver, shell=True)
-        else:
-            ret = -1
-        if ret != 0:
-            ret = subprocess.call("rm -rf layers && git clone %s/layers/.git" % updateserver, shell=True)
-        if ret != 0:
-            logger.error("Updating meta data via git failed")
-            return ret
-        logger.debug("Updating conf files ...")
-        conf_files = ['local.conf', 'bblayers.conf', 'devtool.conf', 'locked-sigs.inc']
-        for conf in conf_files:
-            ret = subprocess.call("wget -q -O - %s/conf/%s > conf/%s" % (updateserver, conf, conf), shell=True)
+        tmpsdk_dir = tempfile.mkdtemp()
+        try:
+            os.makedirs(os.path.join(tmpsdk_dir, 'conf'))
+            new_locked_sig_file_path = os.path.join(tmpsdk_dir, 'conf', 'locked-sigs.inc')
+            # Fetch manifest from server
+            tmpmanifest = os.path.join(tmpsdk_dir, 'conf', 'sdk-conf-manifest')
+            ret = subprocess.call("wget -q -O %s %s/conf/sdk-conf-manifest" % (tmpmanifest, updateserver), shell=True)
+            changedfiles = check_manifest(tmpmanifest, basepath)
+            if not changedfiles:
+                logger.info("Already up-to-date")
+                return 0
+            # Update metadata
+            logger.debug("Updating metadata via git ...")
+            #Check for the status before doing a fetch and reset
+            if os.path.exists(os.path.join(basepath, 'layers/.git')):
+                out = subprocess.check_output("git status --porcelain", shell=True, cwd=layers_dir)
+                if not out:
+                    ret = subprocess.call("git fetch --all; git reset --hard", shell=True, cwd=layers_dir)
+                else:
+                    logger.error("Failed to update metadata as there have been changes made to it. Aborting.");
+                    logger.error("Changed files:\n%s" % out);
+                    return -1
+            else:
+                ret = -1
             if ret != 0:
-                logger.error("Update %s failed" % conf)
-                return ret
-        with open(os.path.join(basepath, 'conf/local.conf'), 'a') as f:
-            f.write('SSTATE_MIRRORS_append = " file://.* %s/sstate-cache/PATH \\n "\n' % updateserver)
+                ret = subprocess.call("git clone %s/layers/.git" % updateserver, shell=True, cwd=tmpsdk_dir)
+                if ret != 0:
+                    logger.error("Updating metadata via git failed")
+                    return ret
+            logger.debug("Updating conf files ...")
+            for changedfile in changedfiles:
+                ret = subprocess.call("wget -q -O %s %s/%s" % (changedfile, updateserver, changedfile), shell=True, cwd=tmpsdk_dir)
+                if ret != 0:
+                    logger.error("Updating %s failed" % changedfile)
+                    return ret
 
-    # Run bitbake command for the whole SDK
-    sdk_targets = config.get('SDK', 'sdk_targets')
-    logger.info("Executing 'bitbake %s' ... (This may take some time.)" % sdk_targets)
-    try:
-        exec_build_env_command(config.init_path, basepath, 'bitbake %s' % sdk_targets)
-    except:
-        logger.error('bitbake %s failed' % sdk_targets)
-        return -1
+            # Check if UNINATIVE_CHECKSUM changed
+            uninative = False
+            if 'conf/local.conf' in changedfiles:
+                def read_uninative_checksums(fn):
+                    chksumitems = []
+                    with open(fn, 'r') as f:
+                        for line in f:
+                            if line.startswith('UNINATIVE_CHECKSUM'):
+                                splitline = re.split(r'[\[\]"\']', line)
+                                if len(splitline) > 3:
+                                    chksumitems.append((splitline[1], splitline[3]))
+                    return chksumitems
+
+                oldsums = read_uninative_checksums(os.path.join(basepath, 'conf/local.conf'))
+                newsums = read_uninative_checksums(os.path.join(tmpsdk_dir, 'conf/local.conf'))
+                if oldsums != newsums:
+                    uninative = True
+                    for buildarch, chksum in newsums:
+                        uninative_file = os.path.join('downloads', 'uninative', chksum, '%s-nativesdk-libc.tar.bz2' % buildarch)
+                        mkdir(os.path.join(tmpsdk_dir, os.path.dirname(uninative_file)))
+                        ret = subprocess.call("wget -q -O %s %s/%s" % (uninative_file, updateserver, uninative_file), shell=True, cwd=tmpsdk_dir)
+
+            # Ok, all is well at this point - move everything over
+            tmplayers_dir = os.path.join(tmpsdk_dir, 'layers')
+            if os.path.exists(tmplayers_dir):
+                shutil.rmtree(layers_dir)
+                shutil.move(tmplayers_dir, layers_dir)
+            for changedfile in changedfiles:
+                destfile = os.path.join(basepath, changedfile)
+                os.remove(destfile)
+                shutil.move(os.path.join(tmpsdk_dir, changedfile), destfile)
+            os.remove(os.path.join(conf_dir, 'sdk-conf-manifest'))
+            shutil.move(tmpmanifest, conf_dir)
+            if uninative:
+                shutil.rmtree(os.path.join(basepath, 'downloads', 'uninative'))
+                shutil.move(os.path.join(tmpsdk_dir, 'downloads', 'uninative'), os.path.join(basepath, 'downloads'))
+
+            if not sstate_mirrors:
+                with open(os.path.join(conf_dir, 'site.conf'), 'a') as f:
+                    f.write('SCONF_VERSION = "%s"\n' % site_conf_version)
+                    f.write('SSTATE_MIRRORS_append = " file://.* %s/sstate-cache/PATH \\n "\n' % updateserver)
+        finally:
+            shutil.rmtree(tmpsdk_dir)
+
+    if not args.skip_prepare:
+        # Find all potentially updateable tasks
+        sdk_update_targets = []
+        tasks = ['do_populate_sysroot', 'do_packagedata']
+        for root, _, files in os.walk(stamps_dir):
+            for fn in files:
+                if not '.sigdata.' in fn:
+                    for task in tasks:
+                        if '.%s.' % task in fn or '.%s_setscene.' % task in fn:
+                            sdk_update_targets.append('%s:%s' % (os.path.basename(root), task))
+        # Run bitbake command for the whole SDK
+        logger.info("Preparing build system... (This may take some time.)")
+        try:
+            exec_build_env_command(config.init_path, basepath, 'bitbake --setscene-only %s' % ' '.join(sdk_update_targets), stderr=subprocess.STDOUT)
+            output, _ = exec_build_env_command(config.init_path, basepath, 'bitbake -n %s' % ' '.join(sdk_update_targets), stderr=subprocess.STDOUT)
+            runlines = []
+            for line in output.splitlines():
+                if 'Running task ' in line:
+                    runlines.append(line)
+            if runlines:
+                logger.error('Unexecuted tasks found in preparation log:\n  %s' % '\n  '.join(runlines))
+                return -1
+        except bb.process.ExecutionError as e:
+            logger.error('Preparation failed:\n%s' % e.stdout)
+            return -1
     return 0
 
+def sdk_install(args, config, basepath, workspace):
+    """Entry point for the devtool sdk-install command"""
+
+    import oe.recipeutils
+    import bb.process
+
+    for recipe in args.recipename:
+        if recipe in workspace:
+            raise DevtoolError('recipe %s is a recipe in your workspace' % recipe)
+
+    tasks = ['do_populate_sysroot', 'do_packagedata']
+    stampprefixes = {}
+    def checkstamp(recipe):
+        stampprefix = stampprefixes[recipe]
+        stamps = glob.glob(stampprefix + '*')
+        for stamp in stamps:
+            if '.sigdata.' not in stamp and stamp.startswith((stampprefix + '.', stampprefix + '_setscene.')):
+                return True
+        else:
+            return False
+
+    install_recipes = []
+    tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
+    try:
+        for recipe in args.recipename:
+            rd = parse_recipe(config, tinfoil, recipe, True)
+            if not rd:
+                return 1
+            stampprefixes[recipe] = '%s.%s' % (rd.getVar('STAMP', True), tasks[0])
+            if checkstamp(recipe):
+                logger.info('%s is already installed' % recipe)
+            else:
+                install_recipes.append(recipe)
+    finally:
+        tinfoil.shutdown()
+
+    if install_recipes:
+        logger.info('Installing %s...' % ', '.join(install_recipes))
+        install_tasks = []
+        for recipe in install_recipes:
+            for task in tasks:
+                if recipe.endswith('-native') and 'package' in task:
+                    continue
+                install_tasks.append('%s:%s' % (recipe, task))
+        options = ''
+        if not args.allow_build:
+            options += ' --setscene-only'
+        try:
+            exec_build_env_command(config.init_path, basepath, 'bitbake %s %s' % (options, ' '.join(install_tasks)), watch=True)
+        except bb.process.ExecutionError as e:
+            raise DevtoolError('Failed to install %s:\n%s' % (recipe, str(e)))
+        failed = False
+        for recipe in install_recipes:
+            if checkstamp(recipe):
+                logger.info('Successfully installed %s' % recipe)
+            else:
+                raise DevtoolError('Failed to install %s - unavailable' % recipe)
+                failed = True
+        if failed:
+            return 2
+
 def register_commands(subparsers, context):
     """Register devtool subcommands from the sdk plugin"""
     if context.fixed_setup:
-        parser_sdk = subparsers.add_parser('sdk-update', help='Update SDK components from a nominated location')
-        parser_sdk.add_argument('updateserver', help='The update server to fetch latest SDK components from', nargs='?')
+        parser_sdk = subparsers.add_parser('sdk-update',
+                                           help='Update SDK components',
+                                           description='Updates installed SDK components from a remote server',
+                                           group='sdk')
+        updateserver = context.config.get('SDK', 'updateserver', '')
+        if updateserver:
+            parser_sdk.add_argument('updateserver', help='The update server to fetch latest SDK components from (default %s)' % updateserver, nargs='?')
+        else:
+            parser_sdk.add_argument('updateserver', help='The update server to fetch latest SDK components from')
+        parser_sdk.add_argument('--skip-prepare', action="store_true", help='Skip re-preparing the build system after updating (for debugging only)')
         parser_sdk.set_defaults(func=sdk_update)
+
+        parser_sdk_install = subparsers.add_parser('sdk-install',
+                                                   help='Install additional SDK components',
+                                                   description='Installs additional recipe development files into the SDK. (You can use "devtool search" to find available recipes.)',
+                                                   group='sdk')
+        parser_sdk_install.add_argument('recipename', help='Name of the recipe to install the development artifacts for', nargs='+')
+        parser_sdk_install.add_argument('-s', '--allow-build', help='Allow building requested item(s) from source', action='store_true')
+        parser_sdk_install.set_defaults(func=sdk_install)
diff --git a/yocto-poky/scripts/lib/devtool/search.py b/yocto-poky/scripts/lib/devtool/search.py
index c2f420c..b44bed7 100644
--- a/yocto-poky/scripts/lib/devtool/search.py
+++ b/yocto-poky/scripts/lib/devtool/search.py
@@ -22,59 +22,67 @@
 import logging
 import argparse
 import re
-from devtool import setup_tinfoil, DevtoolError
+from devtool import setup_tinfoil, parse_recipe, DevtoolError
 
 logger = logging.getLogger('devtool')
 
 def search(args, config, basepath, workspace):
     """Entry point for the devtool 'search' subcommand"""
 
-    tinfoil = setup_tinfoil(config_only=True, basepath=basepath)
-    pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
-    tinfoil.shutdown()
+    tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
+    try:
+        pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
+        defsummary = tinfoil.config_data.getVar('SUMMARY', False) or ''
 
-    keyword_rc = re.compile(args.keyword)
+        keyword_rc = re.compile(args.keyword)
 
-    for fn in os.listdir(pkgdata_dir):
-        pfn = os.path.join(pkgdata_dir, fn)
-        if not os.path.isfile(pfn):
-            continue
+        for fn in os.listdir(pkgdata_dir):
+            pfn = os.path.join(pkgdata_dir, fn)
+            if not os.path.isfile(pfn):
+                continue
 
-        packages = []
-        match = False
-        if keyword_rc.search(fn):
-            match = True
+            packages = []
+            match = False
+            if keyword_rc.search(fn):
+                match = True
 
-        if not match:
-            with open(pfn, 'r') as f:
-                for line in f:
-                    if line.startswith('PACKAGES:'):
-                        packages = line.split(':', 1)[1].strip().split()
+            if not match:
+                with open(pfn, 'r') as f:
+                    for line in f:
+                        if line.startswith('PACKAGES:'):
+                            packages = line.split(':', 1)[1].strip().split()
 
-            for pkg in packages:
-                if keyword_rc.search(pkg):
-                    match = True
-                    break
-                if os.path.exists(os.path.join(pkgdata_dir, 'runtime', pkg + '.packaged')):
-                    with open(os.path.join(pkgdata_dir, 'runtime', pkg), 'r') as f:
-                        for line in f:
-                            if ': ' in line:
-                                splitline = line.split(':', 1)
-                                key = splitline[0]
-                                value = splitline[1].strip()
-                            if key in ['PKG_%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'):
-                                if keyword_rc.search(value):
-                                    match = True
-                                    break
+                for pkg in packages:
+                    if keyword_rc.search(pkg):
+                        match = True
+                        break
+                    if os.path.exists(os.path.join(pkgdata_dir, 'runtime', pkg + '.packaged')):
+                        with open(os.path.join(pkgdata_dir, 'runtime', pkg), 'r') as f:
+                            for line in f:
+                                if ': ' in line:
+                                    splitline = line.split(':', 1)
+                                    key = splitline[0]
+                                    value = splitline[1].strip()
+                                if key in ['PKG_%s' % pkg, 'DESCRIPTION', 'FILES_INFO'] or key.startswith('FILERPROVIDES_'):
+                                    if keyword_rc.search(value):
+                                        match = True
+                                        break
 
-        if match:
-            print(fn)
+            if match:
+                rd = parse_recipe(config, tinfoil, fn, True)
+                summary = rd.getVar('SUMMARY', True)
+                if summary == rd.expand(defsummary):
+                    summary = ''
+                print("%s  %s" % (fn.ljust(20), summary))
+    finally:
+        tinfoil.shutdown()
 
     return 0
 
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
     parser_search = subparsers.add_parser('search', help='Search available recipes',
-                                            description='Searches for available target recipes. Matches on recipe name, package name, description and installed files, and prints the recipe name on match.')
+                                            description='Searches for available target recipes. Matches on recipe name, package name, description and installed files, and prints the recipe name on match.',
+                                            group='info')
     parser_search.add_argument('keyword', help='Keyword to search for (regular expression syntax allowed)')
-    parser_search.set_defaults(func=search)
+    parser_search.set_defaults(func=search, no_workspace=True)
diff --git a/yocto-poky/scripts/lib/devtool/standard.py b/yocto-poky/scripts/lib/devtool/standard.py
index 5464d7b..77a82d5 100644
--- a/yocto-poky/scripts/lib/devtool/standard.py
+++ b/yocto-poky/scripts/lib/devtool/standard.py
@@ -20,13 +20,16 @@
 import sys
 import re
 import shutil
+import subprocess
 import tempfile
 import logging
 import argparse
+import argparse_oe
 import scriptutils
 import errno
+import glob
 from collections import OrderedDict
-from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, DevtoolError
+from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, use_external_build, setup_git_repo, recipe_to_append, get_bbclassextend_targets, DevtoolError
 from devtool import parse_recipe
 
 logger = logging.getLogger('devtool')
@@ -37,21 +40,62 @@
     import bb
     import oe.recipeutils
 
-    if args.recipename in workspace:
-        raise DevtoolError("recipe %s is already in your workspace" %
-                            args.recipename)
+    if not args.recipename and not args.srctree and not args.fetch and not args.fetchuri:
+        raise argparse_oe.ArgumentUsageError('At least one of recipename, srctree, fetchuri or -f/--fetch must be specified', 'add')
 
-    reason = oe.recipeutils.validate_pn(args.recipename)
-    if reason:
-        raise DevtoolError(reason)
+    # These are positional arguments, but because we're nice, allow
+    # specifying e.g. source tree without name, or fetch URI without name or
+    # source tree (if we can detect that that is what the user meant)
+    if '://' in args.recipename:
+        if not args.fetchuri:
+            if args.fetch:
+                raise DevtoolError('URI specified as positional argument as well as -f/--fetch')
+            args.fetchuri = args.recipename
+            args.recipename = ''
+    elif args.srctree and '://' in args.srctree:
+        if not args.fetchuri:
+            if args.fetch:
+                raise DevtoolError('URI specified as positional argument as well as -f/--fetch')
+            args.fetchuri = args.srctree
+            args.srctree = ''
+    elif args.recipename and not args.srctree:
+        if os.sep in args.recipename:
+            args.srctree = args.recipename
+            args.recipename = None
+        elif os.path.isdir(args.recipename):
+            logger.warn('Ambiguous argument %s - assuming you mean it to be the recipe name')
 
-    # FIXME this ought to be in validate_pn but we're using that in other contexts
-    if '/' in args.recipename:
-        raise DevtoolError('"/" is not a valid character in recipe names')
+    if args.fetch:
+        if args.fetchuri:
+            raise DevtoolError('URI specified as positional argument as well as -f/--fetch')
+        else:
+            # FIXME should show a warning that -f/--fetch is deprecated here
+            args.fetchuri = args.fetch
 
-    srctree = os.path.abspath(args.srctree)
-    if os.path.exists(srctree):
-        if args.fetch:
+    if args.recipename:
+        if args.recipename in workspace:
+            raise DevtoolError("recipe %s is already in your workspace" %
+                               args.recipename)
+        reason = oe.recipeutils.validate_pn(args.recipename)
+        if reason:
+            raise DevtoolError(reason)
+
+        # FIXME this ought to be in validate_pn but we're using that in other contexts
+        if '/' in args.recipename:
+            raise DevtoolError('"/" is not a valid character in recipe names')
+
+    if args.srctree:
+        srctree = os.path.abspath(args.srctree)
+        srctreeparent = None
+        tmpsrcdir = None
+    else:
+        srctree = None
+        srctreeparent = get_default_srctree(config)
+        bb.utils.mkdirhier(srctreeparent)
+        tmpsrcdir = tempfile.mkdtemp(prefix='devtoolsrc', dir=srctreeparent)
+
+    if srctree and os.path.exists(srctree):
+        if args.fetchuri:
             if not os.path.isdir(srctree):
                 raise DevtoolError("Cannot fetch into source tree path %s as "
                                    "it exists and is not a directory" %
@@ -60,55 +104,108 @@
                 raise DevtoolError("Cannot fetch into source tree path %s as "
                                    "it already exists and is non-empty" %
                                    srctree)
-    elif not args.fetch:
-        raise DevtoolError("Specified source tree %s could not be found" %
-                           srctree)
+    elif not args.fetchuri:
+        if args.srctree:
+            raise DevtoolError("Specified source tree %s could not be found" %
+                               args.srctree)
+        elif srctree:
+            raise DevtoolError("No source tree exists at default path %s - "
+                               "either create and populate this directory, "
+                               "or specify a path to a source tree, or a "
+                               "URI to fetch source from" % srctree)
+        else:
+            raise DevtoolError("You must either specify a source tree "
+                               "or a URI to fetch source from")
 
-    appendpath = os.path.join(config.workspace_path, 'appends')
-    if not os.path.exists(appendpath):
-        os.makedirs(appendpath)
-
-    recipedir = os.path.join(config.workspace_path, 'recipes', args.recipename)
-    bb.utils.mkdirhier(recipedir)
-    rfv = None
     if args.version:
         if '_' in args.version or ' ' in args.version:
             raise DevtoolError('Invalid version string "%s"' % args.version)
-        rfv = args.version
-    if args.fetch:
-        if args.fetch.startswith('git://'):
-            rfv = 'git'
-        elif args.fetch.startswith('svn://'):
-            rfv = 'svn'
-        elif args.fetch.startswith('hg://'):
-            rfv = 'hg'
-    if rfv:
-        bp = "%s_%s" % (args.recipename, rfv)
-    else:
-        bp = args.recipename
-    recipefile = os.path.join(recipedir, "%s.bb" % bp)
+
     if args.color == 'auto' and sys.stdout.isatty():
         color = 'always'
     else:
         color = args.color
     extracmdopts = ''
-    if args.fetch:
-        source = args.fetch
-        extracmdopts = '-x %s' % srctree
+    if args.fetchuri:
+        source = args.fetchuri
+        if srctree:
+            extracmdopts += ' -x %s' % srctree
+        else:
+            extracmdopts += ' -x %s' % tmpsrcdir
     else:
         source = srctree
+    if args.recipename:
+        extracmdopts += ' -N %s' % args.recipename
     if args.version:
         extracmdopts += ' -V %s' % args.version
     if args.binary:
         extracmdopts += ' -b'
+    if args.also_native:
+        extracmdopts += ' --also-native'
+    if args.src_subdir:
+        extracmdopts += ' --src-subdir "%s"' % args.src_subdir
+
+    tempdir = tempfile.mkdtemp(prefix='devtool')
     try:
-        stdout, _ = exec_build_env_command(config.init_path, basepath, 'recipetool --color=%s create -o %s "%s" %s' % (color, recipefile, source, extracmdopts))
-    except bb.process.ExecutionError as e:
-        raise DevtoolError('Command \'%s\' failed:\n%s' % (e.command, e.stdout))
+        try:
+            stdout, _ = exec_build_env_command(config.init_path, basepath, 'recipetool --color=%s create -o %s "%s" %s' % (color, tempdir, source, extracmdopts))
+        except bb.process.ExecutionError as e:
+            if e.exitcode == 15:
+                raise DevtoolError('Could not auto-determine recipe name, please specify it on the command line')
+            else:
+                raise DevtoolError('Command \'%s\' failed:\n%s' % (e.command, e.stdout))
 
-    _add_md5(config, args.recipename, recipefile)
+        recipes = glob.glob(os.path.join(tempdir, '*.bb'))
+        if recipes:
+            recipename = os.path.splitext(os.path.basename(recipes[0]))[0].split('_')[0]
+            if recipename in workspace:
+                raise DevtoolError('A recipe with the same name as the one being created (%s) already exists in your workspace' % recipename)
+            recipedir = os.path.join(config.workspace_path, 'recipes', recipename)
+            bb.utils.mkdirhier(recipedir)
+            recipefile = os.path.join(recipedir, os.path.basename(recipes[0]))
+            appendfile = recipe_to_append(recipefile, config)
+            if os.path.exists(appendfile):
+                # This shouldn't be possible, but just in case
+                raise DevtoolError('A recipe with the same name as the one being created already exists in your workspace')
+            if os.path.exists(recipefile):
+                raise DevtoolError('A recipe file %s already exists in your workspace; this shouldn\'t be there - please delete it before continuing' % recipefile)
+            if tmpsrcdir:
+                srctree = os.path.join(srctreeparent, recipename)
+                if os.path.exists(tmpsrcdir):
+                    if os.path.exists(srctree):
+                        if os.path.isdir(srctree):
+                            try:
+                                os.rmdir(srctree)
+                            except OSError as e:
+                                if e.errno == errno.ENOTEMPTY:
+                                    raise DevtoolError('Source tree path %s already exists and is not empty' % srctree)
+                                else:
+                                    raise
+                        else:
+                            raise DevtoolError('Source tree path %s already exists and is not a directory' % srctree)
+                    logger.info('Using default source tree path %s' % srctree)
+                    shutil.move(tmpsrcdir, srctree)
+                else:
+                    raise DevtoolError('Couldn\'t find source tree created by recipetool')
+            bb.utils.mkdirhier(recipedir)
+            shutil.move(recipes[0], recipefile)
+            # Move any additional files created by recipetool
+            for fn in os.listdir(tempdir):
+                shutil.move(os.path.join(tempdir, fn), recipedir)
+        else:
+            raise DevtoolError('Command \'%s\' did not create any recipe file:\n%s' % (e.command, e.stdout))
+        attic_recipe = os.path.join(config.workspace_path, 'attic', recipename, os.path.basename(recipefile))
+        if os.path.exists(attic_recipe):
+            logger.warn('A modified recipe from a previous invocation exists in %s - you may wish to move this over the top of the new recipe if you had changes in it that you want to continue with' % attic_recipe)
+    finally:
+        if tmpsrcdir and os.path.exists(tmpsrcdir):
+            shutil.rmtree(tmpsrcdir)
+        shutil.rmtree(tempdir)
 
-    if args.fetch and not args.no_git:
+    for fn in os.listdir(recipedir):
+        _add_md5(config, recipename, os.path.join(recipedir, fn))
+
+    if args.fetchuri and not args.no_git:
         setup_git_repo(srctree, args.version, 'devtool')
 
     initial_rev = None
@@ -121,7 +218,10 @@
     if not rd:
         return 1
 
-    appendfile = os.path.join(appendpath, '%s.bbappend' % bp)
+    if args.src_subdir:
+        srctree = os.path.join(srctree, args.src_subdir)
+
+    bb.utils.mkdirhier(os.path.dirname(appendfile))
     with open(appendfile, 'w') as f:
         f.write('inherit externalsrc\n')
         f.write('EXTERNALSRC = "%s"\n' % srctree)
@@ -138,7 +238,18 @@
             f.write('    rm -f ${D}/singletask.lock\n')
             f.write('}\n')
 
-    _add_md5(config, args.recipename, appendfile)
+        if bb.data.inherits_class('npm', rd):
+            f.write('do_install_append() {\n')
+            f.write('    # Remove files added to source dir by devtool/externalsrc\n')
+            f.write('    rm -f ${NPM_INSTALLDIR}/singletask.lock\n')
+            f.write('    rm -rf ${NPM_INSTALLDIR}/.git\n')
+            f.write('    rm -rf ${NPM_INSTALLDIR}/oe-local-files\n')
+            f.write('    for symlink in ${EXTERNALSRC_SYMLINKS} ; do\n')
+            f.write('        rm -f ${NPM_INSTALLDIR}/${symlink%%:*}\n')
+            f.write('    done\n')
+            f.write('}\n')
+
+    _add_md5(config, recipename, appendfile)
 
     logger.info('Recipe %s has been automatically created; further editing may be required to make it fully functional' % recipefile)
 
@@ -238,7 +349,7 @@
         return 1
 
     srctree = os.path.abspath(args.srctree)
-    initial_rev = _extract_source(srctree, args.keep_temp, args.branch, rd)
+    initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, rd)
     logger.info('Source tree extracted to %s' % srctree)
 
     if initial_rev:
@@ -246,6 +357,28 @@
     else:
         return 1
 
+def sync(args, config, basepath, workspace):
+    """Entry point for the devtool 'sync' subcommand"""
+    import bb
+
+    tinfoil = _prep_extract_operation(config, basepath, args.recipename)
+    if not tinfoil:
+        # Error already shown
+        return 1
+
+    rd = parse_recipe(config, tinfoil, args.recipename, True)
+    if not rd:
+        return 1
+
+    srctree = os.path.abspath(args.srctree)
+    initial_rev = _extract_source(srctree, args.keep_temp, args.branch, True, rd)
+    logger.info('Source tree %s synchronized' % srctree)
+
+    if initial_rev:
+        return 0
+    else:
+        return 1
+
 class BbTaskExecutor(object):
     """Class for executing bitbake tasks for a recipe
 
@@ -261,7 +394,7 @@
     def exec_func(self, func, report):
         """Run bitbake task function"""
         if not func in self.executed:
-            deps = self.rdata.getVarFlag(func, 'deps')
+            deps = self.rdata.getVarFlag(func, 'deps', False)
             if deps:
                 for taskdepfunc in deps:
                     self.exec_func(taskdepfunc, True)
@@ -269,14 +402,51 @@
                 logger.info('Executing %s...' % func)
             fn = self.rdata.getVar('FILE', True)
             localdata = bb.build._task_data(fn, func, self.rdata)
-            bb.build.exec_func(func, localdata)
+            try:
+                bb.build.exec_func(func, localdata)
+            except bb.build.FuncFailed as e:
+                raise DevtoolError(str(e))
             self.executed.append(func)
 
 
-def _prep_extract_operation(config, basepath, recipename):
+class PatchTaskExecutor(BbTaskExecutor):
+    def __init__(self, rdata):
+        self.check_git = False
+        super(PatchTaskExecutor, self).__init__(rdata)
+
+    def exec_func(self, func, report):
+        from oe.patch import GitApplyTree
+        srcsubdir = self.rdata.getVar('S', True)
+        haspatches = False
+        if func == 'do_patch':
+            patchdir = os.path.join(srcsubdir, 'patches')
+            if os.path.exists(patchdir):
+                if os.listdir(patchdir):
+                    haspatches = True
+                else:
+                    os.rmdir(patchdir)
+
+        super(PatchTaskExecutor, self).exec_func(func, report)
+        if self.check_git and os.path.exists(srcsubdir):
+            if func == 'do_patch':
+                if os.path.exists(patchdir):
+                    shutil.rmtree(patchdir)
+                    if haspatches:
+                        stdout, _ = bb.process.run('git status --porcelain patches', cwd=srcsubdir)
+                        if stdout:
+                            bb.process.run('git checkout patches', cwd=srcsubdir)
+
+            stdout, _ = bb.process.run('git status --porcelain', cwd=srcsubdir)
+            if stdout:
+                bb.process.run('git add .; git commit -a -m "Committing changes from %s\n\n%s"' % (func, GitApplyTree.ignore_commit_prefix + ' - from %s' % func), cwd=srcsubdir)
+
+
+def _prep_extract_operation(config, basepath, recipename, tinfoil=None):
     """HACK: Ugly workaround for making sure that requirements are met when
        trying to extract a package. Returns the tinfoil instance to be used."""
-    tinfoil = setup_tinfoil(basepath=basepath)
+    if not tinfoil:
+        tinfoil = setup_tinfoil(basepath=basepath)
+
     rd = parse_recipe(config, tinfoil, recipename, True)
     if not rd:
         return None
@@ -293,7 +463,7 @@
     return tinfoil
 
 
-def _extract_source(srctree, keep_temp, devbranch, d):
+def _extract_source(srctree, keep_temp, devbranch, sync, d):
     """Extract sources of a recipe"""
     import bb.event
     import oe.recipeutils
@@ -312,21 +482,26 @@
 
     _check_compatible_recipe(pn, d)
 
-    if os.path.exists(srctree):
-        if not os.path.isdir(srctree):
-            raise DevtoolError("output path %s exists and is not a directory" %
-                               srctree)
-        elif os.listdir(srctree):
-            raise DevtoolError("output path %s already exists and is "
-                               "non-empty" % srctree)
+    if sync:
+        if not os.path.exists(srctree):
+                raise DevtoolError("output path %s does not exist" % srctree)
+    else:
+        if os.path.exists(srctree):
+            if not os.path.isdir(srctree):
+                raise DevtoolError("output path %s exists and is not a directory" %
+                                   srctree)
+            elif os.listdir(srctree):
+                raise DevtoolError("output path %s already exists and is "
+                                   "non-empty" % srctree)
 
-    if 'noexec' in (d.getVarFlags('do_unpack', False) or []):
-        raise DevtoolError("The %s recipe has do_unpack disabled, unable to "
-                           "extract source" % pn)
+        if 'noexec' in (d.getVarFlags('do_unpack', False) or []):
+            raise DevtoolError("The %s recipe has do_unpack disabled, unable to "
+                               "extract source" % pn)
 
-    # Prepare for shutil.move later on
-    bb.utils.mkdirhier(srctree)
-    os.rmdir(srctree)
+    if not sync:
+        # Prepare for shutil.move later on
+        bb.utils.mkdirhier(srctree)
+        os.rmdir(srctree)
 
     # We don't want notes to be printed, they are too verbose
     origlevel = bb.logger.getEffectiveLevel()
@@ -352,7 +527,7 @@
             # We don't want to move the source to STAGING_KERNEL_DIR here
             crd.setVar('STAGING_KERNEL_DIR', '${S}')
 
-        task_executor = BbTaskExecutor(crd)
+        task_executor = PatchTaskExecutor(crd)
 
         crd.setVar('EXTERNALSRC_forcevariable', '')
 
@@ -366,6 +541,8 @@
             task_executor.exec_func('do_kernel_checkout', False)
         srcsubdir = crd.getVar('S', True)
 
+        task_executor.check_git = True
+
         # Move local source files into separate subdir
         recipe_patches = [os.path.basename(patch) for patch in
                           oe.recipeutils.get_recipe_patches(crd)]
@@ -399,13 +576,6 @@
 
         scriptutils.git_convert_standalone_clone(srcsubdir)
 
-        patchdir = os.path.join(srcsubdir, 'patches')
-        haspatches = False
-        if os.path.exists(patchdir):
-            if os.listdir(patchdir):
-                haspatches = True
-            else:
-                os.rmdir(patchdir)
         # Make sure that srcsubdir exists
         bb.utils.mkdirhier(srcsubdir)
         if not os.path.exists(srcsubdir) or not os.listdir(srcsubdir):
@@ -425,18 +595,47 @@
 
         bb.process.run('git tag -f devtool-patched', cwd=srcsubdir)
 
-        if os.path.exists(patchdir):
-            shutil.rmtree(patchdir)
-            if haspatches:
-                bb.process.run('git checkout patches', cwd=srcsubdir)
-
-        # Move oe-local-files directory to srctree
-        if os.path.exists(os.path.join(tempdir, 'oe-local-files')):
-            logger.info('Adding local source files to srctree...')
-            shutil.move(os.path.join(tempdir, 'oe-local-files'), srcsubdir)
+        kconfig = None
+        if bb.data.inherits_class('kernel-yocto', d):
+            # Store generate and store kernel config
+            logger.info('Generating kernel config')
+            task_executor.exec_func('do_configure', False)
+            kconfig = os.path.join(crd.getVar('B', True), '.config')
 
 
-        shutil.move(srcsubdir, srctree)
+        tempdir_localdir = os.path.join(tempdir, 'oe-local-files')
+        srctree_localdir = os.path.join(srctree, 'oe-local-files')
+
+        if sync:
+            bb.process.run('git fetch file://' + srcsubdir + ' ' + devbranch + ':' + devbranch, cwd=srctree)
+
+            # Move oe-local-files directory to srctree
+            # As the oe-local-files is not part of the constructed git tree,
+            # remove them directly during the synchrounizating might surprise
+            # the users.  Instead, we move it to oe-local-files.bak and remind
+            # user in the log message.
+            if os.path.exists(srctree_localdir + '.bak'):
+                shutil.rmtree(srctree_localdir, srctree_localdir + '.bak')
+
+            if os.path.exists(srctree_localdir):
+                logger.info('Backing up current local file directory %s' % srctree_localdir)
+                shutil.move(srctree_localdir, srctree_localdir + '.bak')
+
+            if os.path.exists(tempdir_localdir):
+                logger.info('Syncing local source files to srctree...')
+                shutil.copytree(tempdir_localdir, srctree_localdir)
+        else:
+            # Move oe-local-files directory to srctree
+            if os.path.exists(tempdir_localdir):
+                logger.info('Adding local source files to srctree...')
+                shutil.move(tempdir_localdir, srcsubdir)
+
+            shutil.move(srcsubdir, srctree)
+
+        if kconfig:
+            logger.info('Copying kernel config to srctree')
+            shutil.copy2(kconfig, srctree)
+
     finally:
         bb.logger.setLevel(origlevel)
 
@@ -468,7 +667,7 @@
     import bb.utils
     origfile = os.path.join(config.workspace_path, '.devtool_md5')
     newfile = os.path.join(config.workspace_path, '.devtool_md5_new')
-    preservepath = os.path.join(config.workspace_path, 'attic')
+    preservepath = os.path.join(config.workspace_path, 'attic', recipename)
     with open(origfile, 'r') as f:
         with open(newfile, 'w') as tf:
             for line in f.readlines():
@@ -503,18 +702,7 @@
         raise DevtoolError("recipe %s is already in your workspace" %
                            args.recipename)
 
-    if not args.extract and not os.path.isdir(args.srctree):
-        raise DevtoolError("directory %s does not exist or not a directory "
-                           "(specify -x to extract source from recipe)" %
-                           args.srctree)
-    if args.extract:
-        tinfoil = _prep_extract_operation(config, basepath, args.recipename)
-        if not tinfoil:
-            # Error already shown
-            return 1
-    else:
-        tinfoil = setup_tinfoil(basepath=basepath)
-
+    tinfoil = setup_tinfoil(basepath=basepath)
     rd = parse_recipe(config, tinfoil, args.recipename, True)
     if not rd:
         return 1
@@ -526,12 +714,23 @@
         raise DevtoolError("recipe %s is already in your workspace" %
                            pn)
 
+    if args.srctree:
+        srctree = os.path.abspath(args.srctree)
+    else:
+        srctree = get_default_srctree(config, pn)
+
+    if args.no_extract and not os.path.isdir(srctree):
+        raise DevtoolError("--no-extract specified and source path %s does "
+                           "not exist or is not a directory" %
+                           srctree)
+    if not args.no_extract:
+        tinfoil = _prep_extract_operation(config, basepath, pn, tinfoil)
+        if not tinfoil:
+            # Error already shown
+            return 1
+
     recipefile = rd.getVar('FILE', True)
-    appendname = os.path.splitext(os.path.basename(recipefile))[0]
-    if args.wildcard:
-        appendname = re.sub(r'_.*', '_%', appendname)
-    appendpath = os.path.join(config.workspace_path, 'appends')
-    appendfile = os.path.join(appendpath, appendname + '.bbappend')
+    appendfile = recipe_to_append(recipefile, config, args.wildcard)
     if os.path.exists(appendfile):
         raise DevtoolError("Another variant of recipe %s is already in your "
                            "workspace (only one variant of a recipe can "
@@ -542,29 +741,28 @@
 
     initial_rev = None
     commits = []
-    srctree = os.path.abspath(args.srctree)
-    if args.extract:
-        initial_rev = _extract_source(args.srctree, False, args.branch, rd)
+    if not args.no_extract:
+        initial_rev = _extract_source(srctree, False, args.branch, False, rd)
         if not initial_rev:
             return 1
         logger.info('Source tree extracted to %s' % srctree)
         # Get list of commits since this revision
-        (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=args.srctree)
+        (stdout, _) = bb.process.run('git rev-list --reverse %s..HEAD' % initial_rev, cwd=srctree)
         commits = stdout.split()
     else:
-        if os.path.exists(os.path.join(args.srctree, '.git')):
+        if os.path.exists(os.path.join(srctree, '.git')):
             # Check if it's a tree previously extracted by us
             try:
-                (stdout, _) = bb.process.run('git branch --contains devtool-base', cwd=args.srctree)
+                (stdout, _) = bb.process.run('git branch --contains devtool-base', cwd=srctree)
             except bb.process.ExecutionError:
                 stdout = ''
             for line in stdout.splitlines():
                 if line.startswith('*'):
-                    (stdout, _) = bb.process.run('git rev-parse devtool-base', cwd=args.srctree)
+                    (stdout, _) = bb.process.run('git rev-parse devtool-base', cwd=srctree)
                     initial_rev = stdout.rstrip()
             if not initial_rev:
                 # Otherwise, just grab the head revision
-                (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=args.srctree)
+                (stdout, _) = bb.process.run('git rev-parse HEAD', cwd=srctree)
                 initial_rev = stdout.rstrip()
 
     # Check that recipe isn't using a shared workdir
@@ -575,8 +773,7 @@
         srcsubdir = os.path.relpath(s, workdir).split(os.sep, 1)[1]
         srctree = os.path.join(srctree, srcsubdir)
 
-    if not os.path.exists(appendpath):
-        os.makedirs(appendpath)
+    bb.utils.mkdirhier(os.path.dirname(appendfile))
     with open(appendfile, 'w') as f:
         f.write('FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"\n')
         # Local files can be modified/tracked in separate subdir under srctree
@@ -593,7 +790,12 @@
             f.write('EXTERNALSRC_BUILD_pn-%s = "%s"\n' % (pn, srctree))
 
         if bb.data.inherits_class('kernel', rd):
-            f.write('SRCTREECOVEREDTASKS = "do_validate_branches do_kernel_checkout do_fetch do_unpack do_patch"\n')
+            f.write('SRCTREECOVEREDTASKS = "do_validate_branches do_kernel_checkout '
+                    'do_fetch do_unpack do_patch do_kernel_configme do_kernel_configcheck"\n')
+            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:
@@ -603,6 +805,8 @@
 
     logger.info('Recipe %s now set up to build from %s' % (pn, srctree))
 
+    tinfoil.shutdown()
+
     return 0
 
 def _get_patchset_revs(args, srctree, recipe_path):
@@ -735,6 +939,33 @@
     return (updated, added, existing_patches)
 
 
+def _create_kconfig_diff(srctree, rd, outfile):
+    """Create a kconfig fragment"""
+    # Only update config fragment if both config files exist
+    orig_config = os.path.join(srctree, '.config.baseline')
+    new_config = os.path.join(srctree, '.config.new')
+    if os.path.exists(orig_config) and os.path.exists(new_config):
+        cmd = ['diff', '--new-line-format=%L', '--old-line-format=',
+               '--unchanged-line-format=', orig_config, new_config]
+        pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+                                stderr=subprocess.PIPE)
+        stdout, stderr = pipe.communicate()
+        if pipe.returncode == 1:
+            logger.info("Updating config fragment %s" % outfile)
+            with open(outfile, 'w') as fobj:
+                fobj.write(stdout)
+        elif pipe.returncode == 0:
+            logger.info("Would remove config fragment %s" % outfile)
+            if os.path.exists(outfile):
+                # Remove fragment file in case of empty diff
+                logger.info("Removing config fragment %s" % outfile)
+                os.unlink(outfile)
+        else:
+            raise bb.process.ExecutionError(cmd, pipe.returncode, stdout, stderr)
+        return True
+    return False
+
+
 def _export_local_files(srctree, rd, destdir):
     """Copy local files from srctree to given location.
        Returns three-tuple of dicts:
@@ -755,6 +986,7 @@
     updated = OrderedDict()
     added = OrderedDict()
     removed = OrderedDict()
+    local_files_dir = os.path.join(srctree, 'oe-local-files')
     git_files = _git_ls_tree(srctree)
     if 'oe-local-files' in git_files:
         # If tracked by Git, take the files from srctree HEAD. First get
@@ -765,11 +997,32 @@
                         env=dict(os.environ, GIT_WORK_TREE=destdir,
                                  GIT_INDEX_FILE=tmp_index))
         new_set = _git_ls_tree(srctree, tree, True).keys()
-    elif os.path.isdir(os.path.join(srctree, 'oe-local-files')):
+    elif os.path.isdir(local_files_dir):
         # If not tracked by Git, just copy from working copy
         new_set = _ls_tree(os.path.join(srctree, 'oe-local-files'))
         bb.process.run(['cp', '-ax',
                         os.path.join(srctree, 'oe-local-files', '.'), destdir])
+    else:
+        new_set = []
+
+    # Special handling for kernel config
+    if bb.data.inherits_class('kernel-yocto', rd):
+        fragment_fn = 'devtool-fragment.cfg'
+        fragment_path = os.path.join(destdir, fragment_fn)
+        if _create_kconfig_diff(srctree, rd, fragment_path):
+            if os.path.exists(fragment_path):
+                if fragment_fn not in new_set:
+                    new_set.append(fragment_fn)
+                # Copy fragment to local-files
+                if os.path.isdir(local_files_dir):
+                    shutil.copy2(fragment_path, local_files_dir)
+            else:
+                if fragment_fn in new_set:
+                    new_set.remove(fragment_fn)
+                # Remove fragment from local-files
+                if os.path.exists(os.path.join(local_files_dir, fragment_fn)):
+                    os.unlink(os.path.join(local_files_dir, fragment_fn))
+
     if new_set is not None:
         for fname in new_set:
             if fname in existing_files:
@@ -857,15 +1110,15 @@
                     'changes')
 
     _remove_source_files(args, remove_files, destpath)
+    return True
 
-def _update_recipe_patch(args, config, srctree, rd, config_data):
+def _update_recipe_patch(args, config, workspace, srctree, rd, config_data):
     """Implement the 'patch' mode of update-recipe"""
     import bb
     import oe.recipeutils
 
     recipefile = rd.getVar('FILE', True)
-    append = os.path.join(config.workspace_path, 'appends', '%s.bbappend' %
-                          os.path.splitext(os.path.basename(recipefile))[0])
+    append = workspace[args.recipename]['bbappend']
     if not os.path.exists(append):
         raise DevtoolError('unable to find workspace bbappend for recipe %s' %
                            args.recipename)
@@ -959,10 +1212,12 @@
             elif not updatefiles:
                 # Neither patches nor recipe were updated
                 logger.info('No patches or files need updating')
+                return False
     finally:
         shutil.rmtree(tempdir)
 
     _remove_source_files(args, remove_files, destpath)
+    return True
 
 def _guess_recipe_update_mode(srctree, rdata):
     """Guess the recipe update mode to use"""
@@ -1011,15 +1266,16 @@
         mode = args.mode
 
     if mode == 'srcrev':
-        _update_recipe_srcrev(args, srctree, rd, tinfoil.config_data)
+        updated = _update_recipe_srcrev(args, srctree, rd, tinfoil.config_data)
     elif mode == 'patch':
-        _update_recipe_patch(args, config, srctree, rd, tinfoil.config_data)
+        updated = _update_recipe_patch(args, config, workspace, srctree, rd, tinfoil.config_data)
     else:
         raise DevtoolError('update_recipe: invalid mode %s' % mode)
 
-    rf = rd.getVar('FILE', True)
-    if rf.startswith(config.workspace_path):
-        logger.warn('Recipe file %s has been updated but is inside the workspace - you will need to move it (and any associated files next to it) out to the desired layer before using "devtool reset" in order to keep any changes' % rf)
+    if updated:
+        rf = rd.getVar('FILE', True)
+        if rf.startswith(config.workspace_path):
+            logger.warn('Recipe file %s has been updated but is inside the workspace - you will need to move it (and any associated files next to it) out to the desired layer before using "devtool reset" in order to keep any changes' % rf)
 
     return 0
 
@@ -1028,7 +1284,12 @@
     """Entry point for the devtool 'status' subcommand"""
     if workspace:
         for recipe, value in workspace.iteritems():
-            print("%s: %s" % (recipe, value['srctree']))
+            recipefile = value['recipefile']
+            if recipefile:
+                recipestr = ' (%s)' % recipefile
+            else:
+                recipestr = ''
+            print("%s: %s%s" % (recipe, value['srctree'], recipestr))
     else:
         logger.info('No recipes currently in your workspace - you can use "devtool modify" to work on an existing recipe or "devtool add" to add a new one')
     return 0
@@ -1055,8 +1316,17 @@
             logger.info('Cleaning sysroot for recipe %s...' % recipes[0])
         else:
             logger.info('Cleaning sysroot for recipes %s...' % ', '.join(recipes))
+        # If the recipe file itself was created in the workspace, and
+        # it uses BBCLASSEXTEND, then we need to also clean the other
+        # variants
+        targets = []
+        for recipe in recipes:
+            targets.append(recipe)
+            recipefile = workspace[recipe]['recipefile']
+            if recipefile:
+                targets.extend(get_bbclassextend_targets(recipefile, recipe))
         try:
-            exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % ' '.join(recipes))
+            exec_build_env_command(config.init_path, basepath, 'bitbake -c clean %s' % ' '.join(targets))
         except bb.process.ExecutionError as e:
             raise DevtoolError('Command \'%s\' failed, output:\n%s\nIf you '
                                 'wish, you may specify -n/--no-clean to '
@@ -1066,7 +1336,7 @@
     for pn in recipes:
         _check_preserve(config, pn)
 
-        preservepath = os.path.join(config.workspace_path, 'attic', pn)
+        preservepath = os.path.join(config.workspace_path, 'attic', pn, pn)
         def preservedir(origdir):
             if os.path.exists(origdir):
                 for root, dirs, files in os.walk(origdir):
@@ -1075,58 +1345,96 @@
                         _move_file(os.path.join(origdir, fn),
                                    os.path.join(preservepath, fn))
                     for dn in dirs:
-                        os.rmdir(os.path.join(root, dn))
+                        preservedir(os.path.join(root, dn))
                 os.rmdir(origdir)
 
         preservedir(os.path.join(config.workspace_path, 'recipes', pn))
         # We don't automatically create this dir next to appends, but the user can
         preservedir(os.path.join(config.workspace_path, 'appends', pn))
 
+        srctree = workspace[pn]['srctree']
+        if os.path.isdir(srctree):
+            if os.listdir(srctree):
+                # We don't want to risk wiping out any work in progress
+                logger.info('Leaving source tree %s as-is; if you no '
+                            'longer need it then please delete it manually'
+                            % srctree)
+            else:
+                # This is unlikely, but if it's empty we can just remove it
+                os.rmdir(srctree)
+
     return 0
 
 
+def get_default_srctree(config, recipename=''):
+    """Get the default srctree path"""
+    srctreeparent = config.get('General', 'default_source_parent_dir', config.workspace_path)
+    if recipename:
+        return os.path.join(srctreeparent, 'sources', recipename)
+    else:
+        return os.path.join(srctreeparent, 'sources')
+
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
+
+    defsrctree = get_default_srctree(context.config)
     parser_add = subparsers.add_parser('add', help='Add a new recipe',
-                                       description='Adds a new recipe')
-    parser_add.add_argument('recipename', help='Name for new recipe to add')
-    parser_add.add_argument('srctree', help='Path to external source tree')
+                                       description='Adds a new recipe to the workspace to build a specified source tree. Can optionally fetch a remote URI and unpack it to create the source tree.',
+                                       group='starting', order=100)
+    parser_add.add_argument('recipename', nargs='?', help='Name for new recipe to add (just name - no version, path or extension). If not specified, will attempt to auto-detect it.')
+    parser_add.add_argument('srctree', nargs='?', help='Path to external source tree. If not specified, a subdirectory of %s will be used.' % defsrctree)
+    parser_add.add_argument('fetchuri', nargs='?', help='Fetch the specified URI and extract it to create the source tree')
     group = parser_add.add_mutually_exclusive_group()
     group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
     group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
-    parser_add.add_argument('--fetch', '-f', help='Fetch the specified URI and extract it to create the source tree', metavar='URI')
+    parser_add.add_argument('--fetch', '-f', help='Fetch the specified URI and extract it to create the source tree (deprecated - pass as positional argument instead)', metavar='URI')
     parser_add.add_argument('--version', '-V', help='Version to use within recipe (PV)')
-    parser_add.add_argument('--no-git', '-g', help='If -f/--fetch is specified, do not set up source tree as a git repository', action="store_true")
-    parser_add.add_argument('--binary', '-b', help='Treat the source tree as something that should be installed verbatim (no compilation, same directory structure)', action='store_true')
+    parser_add.add_argument('--no-git', '-g', help='If fetching source, do not set up source tree as a git repository', action="store_true")
+    parser_add.add_argument('--binary', '-b', help='Treat the source tree as something that should be installed verbatim (no compilation, same directory structure). Useful with binary packages e.g. RPMs.', action='store_true')
+    parser_add.add_argument('--also-native', help='Also add native variant (i.e. support building recipe for the build host as well as the target machine)', action='store_true')
+    parser_add.add_argument('--src-subdir', help='Specify subdirectory within source tree to use', metavar='SUBDIR')
     parser_add.set_defaults(func=add)
 
     parser_modify = subparsers.add_parser('modify', help='Modify the source for an existing recipe',
-                                       description='Enables modifying the source for an existing recipe',
-                                       formatter_class=argparse.ArgumentDefaultsHelpFormatter)
-    parser_modify.add_argument('recipename', help='Name for recipe to edit')
-    parser_modify.add_argument('srctree', help='Path to external source tree')
+                                       description='Sets up the build environment to modify the source for an existing recipe. The default behaviour is to extract the source being fetched by the recipe into a git tree so you can work on it; alternatively if you already have your own pre-prepared source tree you can specify -n/--no-extract.',
+                                       group='starting', order=90)
+    parser_modify.add_argument('recipename', help='Name of existing recipe to edit (just name - no version, path or extension)')
+    parser_modify.add_argument('srctree', nargs='?', help='Path to external source tree. If not specified, a subdirectory of %s will be used.' % defsrctree)
     parser_modify.add_argument('--wildcard', '-w', action="store_true", help='Use wildcard for unversioned bbappend')
-    parser_modify.add_argument('--extract', '-x', action="store_true", help='Extract source as well')
+    group = parser_modify.add_mutually_exclusive_group()
+    group.add_argument('--extract', '-x', action="store_true", help='Extract source for recipe (default)')
+    group.add_argument('--no-extract', '-n', action="store_true", help='Do not extract source, expect it to exist')
     group = parser_modify.add_mutually_exclusive_group()
     group.add_argument('--same-dir', '-s', help='Build in same directory as source', action="store_true")
     group.add_argument('--no-same-dir', help='Force build in a separate build directory', action="store_true")
-    parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (only when using -x)')
+    parser_modify.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (when not using -n/--no-extract) (default "%(default)s")')
     parser_modify.set_defaults(func=modify)
 
     parser_extract = subparsers.add_parser('extract', help='Extract the source for an existing recipe',
                                        description='Extracts the source for an existing recipe',
-                                       formatter_class=argparse.ArgumentDefaultsHelpFormatter)
-    parser_extract.add_argument('recipename', help='Name for recipe to extract the source for')
+                                       group='advanced')
+    parser_extract.add_argument('recipename', help='Name of recipe to extract the source for')
     parser_extract.add_argument('srctree', help='Path to where to extract the source tree')
-    parser_extract.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout')
+    parser_extract.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout (default "%(default)s")')
     parser_extract.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
-    parser_extract.set_defaults(func=extract)
+    parser_extract.set_defaults(func=extract, no_workspace=True)
+
+    parser_sync = subparsers.add_parser('sync', help='Synchronize the source tree for an existing recipe',
+                                       description='Synchronize the previously extracted source tree for an existing recipe',
+                                       formatter_class=argparse.ArgumentDefaultsHelpFormatter,
+                                       group='advanced')
+    parser_sync.add_argument('recipename', help='Name of recipe to sync the source for')
+    parser_sync.add_argument('srctree', help='Path to the source tree')
+    parser_sync.add_argument('--branch', '-b', default="devtool", help='Name for development branch to checkout')
+    parser_sync.add_argument('--keep-temp', action="store_true", help='Keep temporary directory (for debugging)')
+    parser_sync.set_defaults(func=sync)
 
     parser_update_recipe = subparsers.add_parser('update-recipe', help='Apply changes from external source tree to recipe',
-                                       description='Applies changes from external source tree to a recipe (updating/adding/removing patches as necessary, or by updating SRCREV)')
+                                       description='Applies changes from external source tree to a recipe (updating/adding/removing patches as necessary, or by updating SRCREV). Note that these changes need to have been committed to the git repository in order to be recognised.',
+                                       group='working', order=-90)
     parser_update_recipe.add_argument('recipename', help='Name of recipe to update')
     parser_update_recipe.add_argument('--mode', '-m', choices=['patch', 'srcrev', 'auto'], default='auto', help='Update mode (where %(metavar)s is %(choices)s; default is %(default)s)', metavar='MODE')
-    parser_update_recipe.add_argument('--initial-rev', help='Starting revision for patches')
+    parser_update_recipe.add_argument('--initial-rev', help='Override starting revision for patches')
     parser_update_recipe.add_argument('--append', '-a', help='Write changes to a bbappend in the specified layer instead of the recipe', metavar='LAYERDIR')
     parser_update_recipe.add_argument('--wildcard-version', '-w', help='In conjunction with -a/--append, use a wildcard to make the bbappend apply to any recipe version', action='store_true')
     parser_update_recipe.add_argument('--no-remove', '-n', action="store_true", help='Don\'t remove patches, only add or update')
@@ -1134,12 +1442,12 @@
 
     parser_status = subparsers.add_parser('status', help='Show workspace status',
                                           description='Lists recipes currently in your workspace and the paths to their respective external source trees',
-                                          formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+                                          group='info', order=100)
     parser_status.set_defaults(func=status)
 
     parser_reset = subparsers.add_parser('reset', help='Remove a recipe from your workspace',
                                          description='Removes the specified recipe from your workspace (resetting its state)',
-                                         formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+                                         group='working', order=-100)
     parser_reset.add_argument('recipename', nargs='?', help='Recipe to reset')
     parser_reset.add_argument('--all', '-a', action="store_true", help='Reset all recipes (clear workspace)')
     parser_reset.add_argument('--no-clean', '-n', action="store_true", help='Don\'t clean the sysroot to remove recipe output')
diff --git a/yocto-poky/scripts/lib/devtool/upgrade.py b/yocto-poky/scripts/lib/devtool/upgrade.py
index 6bac44b..a085f78 100644
--- a/yocto-poky/scripts/lib/devtool/upgrade.py
+++ b/yocto-poky/scripts/lib/devtool/upgrade.py
@@ -33,10 +33,6 @@
 
 logger = logging.getLogger('devtool')
 
-def plugin_init(pluginlist):
-    """Plugin initialization"""
-    pass
-
 def _run(cmd, cwd=''):
     logger.debug("Running command %s> %s" % (cwd,cmd))
     return bb.process.run('%s' % cmd, cwd=cwd)
@@ -66,26 +62,6 @@
                     checksums[cs] = m.group(1)
     return checksums
 
-def _replace_checksums(rf, md5, sha256):
-    if not md5 and not sha256:
-        return
-    checksums = {'md5sum':md5, 'sha256sum':sha256}
-    with open(rf + ".tmp", "w+") as tmprf:
-        with open(rf) as f:
-            for line in f:
-                m = None
-                for cs in checksums.keys():
-                    m = re.match("^SRC_URI\[%s\].*=.*\"(.*)\"" % cs, line)
-                    if m:
-                        if checksums[cs]:
-                            oldcheck = m.group(1)
-                            newcheck = checksums[cs]
-                            line = line.replace(oldcheck, newcheck)
-                        break
-                tmprf.write(line)
-    os.rename(rf + ".tmp", rf)
-
-
 def _remove_patch_dirs(recipefolder):
     for root, dirs, files in os.walk(recipefolder):
         for d in dirs:
@@ -105,23 +81,21 @@
             if olddir.find(oldpv) != -1:
                 newdir = olddir.replace(oldpv, newpv)
                 if olddir != newdir:
-                    _run('mv %s %s' % (olddir, newdir))
+                    shutil.move(os.path.join(path, olddir), os.path.join(path, newdir))
 
-def _rename_recipe_file(bpn, oldpv, newpv, path):
-    oldrecipe = "%s_%s.bb" % (bpn, oldpv)
-    newrecipe = "%s_%s.bb" % (bpn, newpv)
-    if os.path.isfile(os.path.join(path, oldrecipe)):
+def _rename_recipe_file(oldrecipe, bpn, oldpv, newpv, path):
+    oldrecipe = os.path.basename(oldrecipe)
+    if oldrecipe.endswith('_%s.bb' % oldpv):
+        newrecipe = '%s_%s.bb' % (bpn, newpv)
         if oldrecipe != newrecipe:
-            _run('mv %s %s' % (oldrecipe, newrecipe), cwd=path)
+            shutil.move(os.path.join(path, oldrecipe), os.path.join(path, newrecipe))
     else:
-        recipe = "%s_git.bb" % bpn
-        if os.path.isfile(os.path.join(path, recipe)):
-            newrecipe = recipe
+        newrecipe = oldrecipe
     return os.path.join(path, newrecipe)
 
-def _rename_recipe_files(bpn, oldpv, newpv, path):
+def _rename_recipe_files(oldrecipe, bpn, oldpv, newpv, path):
     _rename_recipe_dirs(oldpv, newpv, path)
-    return _rename_recipe_file(bpn, oldpv, newpv, path)
+    return _rename_recipe_file(oldrecipe, bpn, oldpv, newpv, path)
 
 def _write_append(rc, srctree, same_dir, no_same_dir, rev, workspace, d):
     """Writes an append file"""
@@ -171,7 +145,15 @@
     srcuris = rd.getVar('SRC_URI', True).split()
     if not len(srcuris):
         raise DevtoolError('SRC_URI not found on recipe')
-    srcuri = srcuris[0] # it is assumed, URI is at first position
+    # Get first non-local entry in SRC_URI - usually by convention it's
+    # the first entry, but not always!
+    srcuri = None
+    for entry in srcuris:
+        if not entry.startswith('file://'):
+            srcuri = entry
+            break
+    if not srcuri:
+        raise DevtoolError('Unable to find non-local entry in SRC_URI')
     srcrev = '${AUTOREV}'
     if '://' in srcuri:
         # Fetch a URL
@@ -205,7 +187,7 @@
         md5 = None
         sha256 = None
     else:
-        __run('git checkout -b devtool-%s' % newpv)
+        __run('git checkout devtool-base -b devtool-%s' % newpv)
 
         tmpdir = tempfile.mkdtemp(prefix='devtool')
         try:
@@ -214,9 +196,19 @@
             raise DevtoolError(e)
 
         tmpsrctree = _get_srctree(tmpdir)
+        srctree = os.path.abspath(srctree)
 
-        scrtree = os.path.abspath(srctree)
+        # Delete all sources so we ensure no stray files are left over
+        for item in os.listdir(srctree):
+            if item in ['.git', 'oe-local-files']:
+                continue
+            itempath = os.path.join(srctree, item)
+            if os.path.isdir(itempath):
+                shutil.rmtree(itempath)
+            else:
+                os.remove(itempath)
 
+        # Copy in new ones
         _copy_source_code(tmpsrctree, srctree)
 
         (stdout,_) = __run('git ls-files --modified --others --exclude-standard')
@@ -255,19 +247,20 @@
 
     return (rev, md5, sha256)
 
-def _create_new_recipe(newpv, md5, sha256, srcrev, workspace, tinfoil, rd):
+def _create_new_recipe(newpv, md5, sha256, srcrev, srcbranch, workspace, tinfoil, rd):
     """Creates the new recipe under workspace"""
-    crd = rd.createCopy()
 
-    bpn = crd.getVar('BPN', True)
+    bpn = rd.getVar('BPN', True)
     path = os.path.join(workspace, 'recipes', bpn)
     bb.utils.mkdirhier(path)
-    oe.recipeutils.copy_recipe_files(crd, path)
+    oe.recipeutils.copy_recipe_files(rd, path)
 
-    oldpv = crd.getVar('PV', True)
+    oldpv = rd.getVar('PV', True)
     if not newpv:
         newpv = oldpv
-    fullpath = _rename_recipe_files(bpn, oldpv, newpv, path)
+    origpath = rd.getVar('FILE', True)
+    fullpath = _rename_recipe_files(origpath, bpn, oldpv, newpv, path)
+    logger.debug('Upgraded %s => %s' % (origpath, fullpath))
 
     newvalues = {}
     if _recipe_contains(rd, 'PV') and newpv != oldpv:
@@ -276,15 +269,39 @@
     if srcrev:
         newvalues['SRCREV'] = srcrev
 
-    if newvalues:
-        rd = oe.recipeutils.parse_recipe(fullpath, None, tinfoil.config_data)
-        oe.recipeutils.patch_recipe(rd, fullpath, newvalues)
+    if srcbranch:
+        src_uri = oe.recipeutils.split_var_value(rd.getVar('SRC_URI', False) or '')
+        changed = False
+        replacing = True
+        new_src_uri = []
+        for entry in src_uri:
+            scheme, network, path, user, passwd, params = bb.fetch2.decodeurl(entry)
+            if replacing and scheme in ['git', 'gitsm']:
+                branch = params.get('branch', 'master')
+                if rd.expand(branch) != srcbranch:
+                    # Handle case where branch is set through a variable
+                    res = re.match(r'\$\{([^}@]+)\}', branch)
+                    if res:
+                        newvalues[res.group(1)] = srcbranch
+                        # We know we won't change SRC_URI now, so break out
+                        break
+                    else:
+                        params['branch'] = srcbranch
+                        entry = bb.fetch2.encodeurl((scheme, network, path, user, passwd, params))
+                        changed = True
+                replacing = False
+            new_src_uri.append(entry)
+        if changed:
+            newvalues['SRC_URI'] = ' '.join(new_src_uri)
+
+    newvalues['PR'] = None
 
     if md5 and sha256:
-        # Unfortunately, oe.recipeutils.patch_recipe cannot update flags.
-        # once the latter feature is implemented, we should call patch_recipe
-        # instead of the following function
-        _replace_checksums(fullpath, md5, sha256)
+        newvalues['SRC_URI[md5sum]'] = md5
+        newvalues['SRC_URI[sha256sum]'] = sha256
+
+    rd = oe.recipeutils.parse_recipe(fullpath, None, tinfoil.config_data)
+    oe.recipeutils.patch_recipe(rd, fullpath, newvalues)
 
     return fullpath
 
@@ -295,13 +312,10 @@
         raise DevtoolError("recipe %s is already in your workspace" % args.recipename)
     if not args.version and not args.srcrev:
         raise DevtoolError("You must provide a version using the --version/-V option, or for recipes that fetch from an SCM such as git, the --srcrev/-S option")
-
-    reason = oe.recipeutils.validate_pn(args.recipename)
-    if reason:
-        raise DevtoolError(reason)
+    if args.srcbranch and not args.srcrev:
+        raise DevtoolError("If you specify --srcbranch/-B then you must use --srcrev/-S to specify the revision" % args.recipename)
 
     tinfoil = setup_tinfoil(basepath=basepath, tracking=True)
-
     rd = parse_recipe(config, tinfoil, args.recipename, True)
     if not rd:
         return 1
@@ -312,37 +326,53 @@
     if pn in workspace:
         raise DevtoolError("recipe %s is already in your workspace" % pn)
 
+    if args.srctree:
+        srctree = os.path.abspath(args.srctree)
+    else:
+        srctree = standard.get_default_srctree(config, pn)
+
     standard._check_compatible_recipe(pn, rd)
-    if rd.getVar('PV', True) == args.version and rd.getVar('SRCREV', True) == args.srcrev:
-        raise DevtoolError("Current and upgrade versions are the same version" % version)
+    old_srcrev = rd.getVar('SRCREV', True)
+    if old_srcrev == 'INVALID':
+        old_srcrev = None
+    if old_srcrev and not args.srcrev:
+        raise DevtoolError("Recipe specifies a SRCREV value; you must specify a new one when upgrading")
+    if rd.getVar('PV', True) == args.version and old_srcrev == args.srcrev:
+        raise DevtoolError("Current and upgrade versions are the same version")
 
     rf = None
     try:
-        rev1 = standard._extract_source(args.srctree, False, 'devtool-orig', rd)
-        rev2, md5, sha256 = _extract_new_source(args.version, args.srctree, args.no_patch,
+        rev1 = standard._extract_source(srctree, False, 'devtool-orig', False, rd)
+        rev2, md5, sha256 = _extract_new_source(args.version, srctree, args.no_patch,
                                                 args.srcrev, args.branch, args.keep_temp,
                                                 tinfoil, rd)
-        rf = _create_new_recipe(args.version, md5, sha256, args.srcrev, config.workspace_path, tinfoil, rd)
+        rf = _create_new_recipe(args.version, md5, sha256, args.srcrev, args.srcbranch, config.workspace_path, tinfoil, rd)
     except bb.process.CmdError as e:
-        _upgrade_error(e, rf, args.srctree)
+        _upgrade_error(e, rf, srctree)
     except DevtoolError as e:
-        _upgrade_error(e, rf, args.srctree)
+        _upgrade_error(e, rf, srctree)
     standard._add_md5(config, pn, os.path.dirname(rf))
 
-    af = _write_append(rf, args.srctree, args.same_dir, args.no_same_dir, rev2,
+    af = _write_append(rf, srctree, args.same_dir, args.no_same_dir, rev2,
                        config.workspace_path, rd)
     standard._add_md5(config, pn, af)
-    logger.info('Upgraded source extracted to %s' % args.srctree)
+    logger.info('Upgraded source extracted to %s' % srctree)
+    logger.info('New recipe is %s' % rf)
     return 0
 
 def register_commands(subparsers, context):
     """Register devtool subcommands from this plugin"""
+
+    defsrctree = standard.get_default_srctree(context.config)
+
     parser_upgrade = subparsers.add_parser('upgrade', help='Upgrade an existing recipe',
-                                           description='Upgrades an existing recipe to a new upstream version')
-    parser_upgrade.add_argument('recipename', help='Name for recipe to extract the source for')
-    parser_upgrade.add_argument('srctree', help='Path to where to extract the source tree')
+                                           description='Upgrades an existing recipe to a new upstream version. Puts the upgraded recipe file into the workspace along with any associated files, and extracts the source tree to a specified location (in case patches need rebasing or adding to as a result of the upgrade).',
+                                           group='starting')
+    parser_upgrade.add_argument('recipename', help='Name of recipe to upgrade (just name - no version, path or extension)')
+    parser_upgrade.add_argument('srctree',  nargs='?', help='Path to where to extract the source tree. If not specified, a subdirectory of %s will be used.' % defsrctree)
     parser_upgrade.add_argument('--version', '-V', help='Version to upgrade to (PV)')
     parser_upgrade.add_argument('--srcrev', '-S', help='Source revision to upgrade to (if fetching from an SCM such as git)')
+    parser_upgrade.add_argument('--srcbranch', '-B', help='Branch in source repository containing the revision to use (if fetching from an SCM such as git)')
     parser_upgrade.add_argument('--branch', '-b', default="devtool", help='Name for new development branch to checkout (default "%(default)s")')
     parser_upgrade.add_argument('--no-patch', action="store_true", help='Do not apply patches from the recipe to the new source code')
     group = parser_upgrade.add_mutually_exclusive_group()
diff --git a/yocto-poky/scripts/lib/devtool/utilcmds.py b/yocto-poky/scripts/lib/devtool/utilcmds.py
new file mode 100644
index 0000000..b761a80
--- /dev/null
+++ b/yocto-poky/scripts/lib/devtool/utilcmds.py
@@ -0,0 +1,233 @@
+# Development tool - utility commands plugin
+#
+# Copyright (C) 2015-2016 Intel Corporation
+#
+# 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 utility plugins"""
+
+import os
+import sys
+import shutil
+import tempfile
+import logging
+import argparse
+import subprocess
+import scriptutils
+from devtool import exec_build_env_command, setup_tinfoil, check_workspace_recipe, DevtoolError
+from devtool import parse_recipe
+
+logger = logging.getLogger('devtool')
+
+
+def edit_recipe(args, config, basepath, workspace):
+    """Entry point for the devtool 'edit-recipe' subcommand"""
+    if args.any_recipe:
+        tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
+        try:
+            rd = parse_recipe(config, tinfoil, args.recipename, True)
+            if not rd:
+                return 1
+            recipefile = rd.getVar('FILE', True)
+        finally:
+            tinfoil.shutdown()
+    else:
+        check_workspace_recipe(workspace, args.recipename)
+        recipefile = workspace[args.recipename]['recipefile']
+        if not recipefile:
+            raise DevtoolError("Recipe file for %s is not under the workspace" %
+                               args.recipename)
+
+    return scriptutils.run_editor(recipefile)
+
+
+def configure_help(args, config, basepath, workspace):
+    """Entry point for the devtool 'configure-help' subcommand"""
+    import oe.utils
+
+    check_workspace_recipe(workspace, args.recipename)
+    tinfoil = setup_tinfoil(config_only=False, basepath=basepath)
+    try:
+        rd = parse_recipe(config, tinfoil, args.recipename, appends=True, filter_workspace=False)
+        if not rd:
+            return 1
+        b = rd.getVar('B', True)
+        s = rd.getVar('S', True)
+        configurescript = os.path.join(s, 'configure')
+        confdisabled = 'noexec' in rd.getVarFlags('do_configure') or 'do_configure' not in (rd.getVar('__BBTASKS', False) or [])
+        configureopts = oe.utils.squashspaces(rd.getVar('CONFIGUREOPTS', True) or '')
+        extra_oeconf = oe.utils.squashspaces(rd.getVar('EXTRA_OECONF', True) or '')
+        extra_oecmake = oe.utils.squashspaces(rd.getVar('EXTRA_OECMAKE', True) or '')
+        do_configure = rd.getVar('do_configure', True) or ''
+        do_configure_noexpand = rd.getVar('do_configure', False) or ''
+        packageconfig = rd.getVarFlags('PACKAGECONFIG') or []
+        autotools = bb.data.inherits_class('autotools', rd) and ('oe_runconf' in do_configure or 'autotools_do_configure' in do_configure)
+        cmake = bb.data.inherits_class('cmake', rd) and ('cmake_do_configure' in do_configure)
+        cmake_do_configure = rd.getVar('cmake_do_configure', True)
+        pn = rd.getVar('PN', True)
+    finally:
+        tinfoil.shutdown()
+
+    if 'doc' in packageconfig:
+        del packageconfig['doc']
+
+    if autotools and not os.path.exists(configurescript):
+        logger.info('Running do_configure to generate configure script')
+        try:
+            stdout, _ = exec_build_env_command(config.init_path, basepath,
+                                               'bitbake -c configure %s' % args.recipename,
+                                               stderr=subprocess.STDOUT)
+        except bb.process.ExecutionError:
+            pass
+
+    if confdisabled or do_configure.strip() in ('', ':'):
+        raise DevtoolError("do_configure task has been disabled for this recipe")
+    elif args.no_pager and not os.path.exists(configurescript):
+        raise DevtoolError("No configure script found and no other information to display")
+    else:
+        configopttext = ''
+        if autotools and configureopts:
+            configopttext = '''
+Arguments currently passed to the configure script:
+
+%s
+
+Some of those are fixed.''' % (configureopts + ' ' + extra_oeconf)
+            if extra_oeconf:
+                configopttext += ''' The ones that are specified through EXTRA_OECONF (which you can change or add to easily):
+
+%s''' % extra_oeconf
+
+        elif cmake:
+            in_cmake = False
+            cmake_cmd = ''
+            for line in cmake_do_configure.splitlines():
+                if in_cmake:
+                    cmake_cmd = cmake_cmd + ' ' + line.strip().rstrip('\\')
+                    if not line.endswith('\\'):
+                        break
+                if line.lstrip().startswith('cmake '):
+                    cmake_cmd = line.strip().rstrip('\\')
+                    if line.endswith('\\'):
+                        in_cmake = True
+                    else:
+                        break
+            if cmake_cmd:
+                configopttext = '''
+The current cmake command line:
+
+%s
+
+Arguments specified through EXTRA_OECMAKE (which you can change or add to easily)
+
+%s''' % (oe.utils.squashspaces(cmake_cmd), extra_oecmake)
+            else:
+                configopttext = '''
+The current implementation of cmake_do_configure:
+
+cmake_do_configure() {
+%s
+}
+
+Arguments specified through EXTRA_OECMAKE (which you can change or add to easily)
+
+%s''' % (cmake_do_configure.rstrip(), extra_oecmake)
+
+        elif do_configure:
+            configopttext = '''
+The current implementation of do_configure:
+
+do_configure() {
+%s
+}''' % do_configure.rstrip()
+            if '${EXTRA_OECONF}' in do_configure_noexpand:
+                configopttext += '''
+
+Arguments specified through EXTRA_OECONF (which you can change or add to easily):
+
+%s''' % extra_oeconf
+
+        if packageconfig:
+            configopttext += '''
+
+Some of these options may be controlled through PACKAGECONFIG; for more details please see the recipe.'''
+
+        if args.arg:
+            helpargs = ' '.join(args.arg)
+        elif cmake:
+            helpargs = '-LH'
+        else:
+            helpargs = '--help'
+
+        msg = '''configure information for %s
+------------------------------------------
+%s''' % (pn, configopttext)
+
+        if cmake:
+            msg += '''
+
+The cmake %s output for %s follows. After "-- Cache values" you should see a list of variables you can add to EXTRA_OECMAKE (prefixed with -D and suffixed with = followed by the desired value, without any spaces).
+------------------------------------------''' % (helpargs, pn)
+        elif os.path.exists(configurescript):
+            msg += '''
+
+The ./configure %s output for %s follows.
+------------------------------------------''' % (helpargs, pn)
+
+        olddir = os.getcwd()
+        tmppath = tempfile.mkdtemp()
+        with tempfile.NamedTemporaryFile('w', delete=False) as tf:
+            if not args.no_header:
+                tf.write(msg + '\n')
+            tf.close()
+            try:
+                try:
+                    cmd = 'cat %s' % tf.name
+                    if cmake:
+                        cmd += '; cmake %s %s 2>&1' % (helpargs, s)
+                        os.chdir(b)
+                    elif os.path.exists(configurescript):
+                        cmd += '; %s %s' % (configurescript, helpargs)
+                    if sys.stdout.isatty() and not args.no_pager:
+                        pager = os.environ.get('PAGER', 'less')
+                        cmd = '(%s) | %s' % (cmd, pager)
+                    subprocess.check_call(cmd, shell=True)
+                except subprocess.CalledProcessError as e:
+                    return e.returncode
+            finally:
+                os.chdir(olddir)
+                shutil.rmtree(tmppath)
+                os.remove(tf.name)
+
+
+def register_commands(subparsers, context):
+    """Register devtool subcommands from this plugin"""
+    parser_edit_recipe = subparsers.add_parser('edit-recipe', help='Edit a recipe file in your workspace',
+                                         description='Runs the default editor (as specified by the EDITOR variable) on the specified recipe. Note that the recipe file itself must be in the workspace (i.e. as a result of "devtool add" or "devtool upgrade"); you can override this with the -a/--any-recipe option.',
+                                         group='working')
+    parser_edit_recipe.add_argument('recipename', help='Recipe to edit')
+    parser_edit_recipe.add_argument('--any-recipe', '-a', action="store_true", help='Edit any recipe, not just where the recipe file itself is in the workspace')
+    parser_edit_recipe.set_defaults(func=edit_recipe)
+
+    # NOTE: Needed to override the usage string here since the default
+    # gets the order wrong - recipename must come before --arg
+    parser_configure_help = subparsers.add_parser('configure-help', help='Get help on configure script options',
+                                         usage='devtool configure-help [options] recipename [--arg ...]',
+                                         description='Displays the help for the configure script for the specified recipe (i.e. runs ./configure --help) prefaced by a header describing the current options being specified. Output is piped through less (or whatever PAGER is set to, if set) for easy browsing.',
+                                         group='working')
+    parser_configure_help.add_argument('recipename', help='Recipe to show configure help for')
+    parser_configure_help.add_argument('-p', '--no-pager', help='Disable paged output', action="store_true")
+    parser_configure_help.add_argument('-n', '--no-header', help='Disable explanatory header text', action="store_true")
+    parser_configure_help.add_argument('--arg', help='Pass remaining arguments to the configure script instead of --help (useful if the script has additional help options)', nargs=argparse.REMAINDER)
+    parser_configure_help.set_defaults(func=configure_help)
diff --git a/yocto-poky/scripts/lib/recipetool/append.py b/yocto-poky/scripts/lib/recipetool/append.py
index 7fe4115..558fd25 100644
--- a/yocto-poky/scripts/lib/recipetool/append.py
+++ b/yocto-poky/scripts/lib/recipetool/append.py
@@ -343,6 +343,8 @@
     simplified = {}
     src_uri = rd.getVar('SRC_URI', True).split()
     for uri in src_uri:
+        if uri.endswith(';'):
+            uri = uri[:-1]
         simple_uri = bb.fetch.URI(uri)
         simple_uri.params = {}
         simplified[str(simple_uri)] = uri
@@ -433,7 +435,7 @@
     return targetpath
 
 
-def register_command(subparsers):
+def register_commands(subparsers):
     common = argparse.ArgumentParser(add_help=False)
     common.add_argument('-m', '--machine', help='Make bbappend changes specific to a machine only', metavar='MACHINE')
     common.add_argument('-w', '--wildcard-version', help='Use wildcard to make the bbappend apply to any recipe version', action='store_true')
diff --git a/yocto-poky/scripts/lib/recipetool/create.py b/yocto-poky/scripts/lib/recipetool/create.py
index 8305e43..bb9fb9b 100644
--- a/yocto-poky/scripts/lib/recipetool/create.py
+++ b/yocto-poky/scripts/lib/recipetool/create.py
@@ -1,6 +1,6 @@
 # Recipe creation tool - create command plugin
 #
-# Copyright (C) 2014-2015 Intel Corporation
+# Copyright (C) 2014-2016 Intel Corporation
 #
 # 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
@@ -21,9 +21,11 @@
 import glob
 import fnmatch
 import re
+import json
 import logging
 import scriptutils
 import urlparse
+import hashlib
 
 logger = logging.getLogger('recipetool')
 
@@ -39,14 +41,187 @@
     global tinfoil
     tinfoil = instance
 
-class RecipeHandler():
+class RecipeHandler(object):
+    recipelibmap = {}
+    recipeheadermap = {}
+    recipecmakefilemap = {}
+    recipebinmap = {}
+
     @staticmethod
-    def checkfiles(path, speclist):
+    def load_libmap(d):
+        '''Load library->recipe mapping'''
+        import oe.package
+
+        if RecipeHandler.recipelibmap:
+            return
+        # First build up library->package mapping
+        shlib_providers = oe.package.read_shlib_providers(d)
+        libdir = d.getVar('libdir', True)
+        base_libdir = d.getVar('base_libdir', True)
+        libpaths = list(set([base_libdir, libdir]))
+        libname_re = re.compile('^lib(.+)\.so.*$')
+        pkglibmap = {}
+        for lib, item in shlib_providers.iteritems():
+            for path, pkg in item.iteritems():
+                if path in libpaths:
+                    res = libname_re.match(lib)
+                    if res:
+                        libname = res.group(1)
+                        if not libname in pkglibmap:
+                            pkglibmap[libname] = pkg[0]
+                    else:
+                        logger.debug('unable to extract library name from %s' % lib)
+
+        # Now turn it into a library->recipe mapping
+        pkgdata_dir = d.getVar('PKGDATA_DIR', True)
+        for libname, pkg in pkglibmap.iteritems():
+            try:
+                with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
+                    for line in f:
+                        if line.startswith('PN:'):
+                            RecipeHandler.recipelibmap[libname] = line.split(':', 1)[-1].strip()
+                            break
+            except IOError as ioe:
+                if ioe.errno == 2:
+                    logger.warn('unable to find a pkgdata file for package %s' % pkg)
+                else:
+                    raise
+
+        # Some overrides - these should be mapped to the virtual
+        RecipeHandler.recipelibmap['GL'] = 'virtual/libgl'
+        RecipeHandler.recipelibmap['EGL'] = 'virtual/egl'
+        RecipeHandler.recipelibmap['GLESv2'] = 'virtual/libgles2'
+
+    @staticmethod
+    def load_devel_filemap(d):
+        '''Build up development file->recipe mapping'''
+        if RecipeHandler.recipeheadermap:
+            return
+        pkgdata_dir = d.getVar('PKGDATA_DIR', True)
+        includedir = d.getVar('includedir', True)
+        cmakedir = os.path.join(d.getVar('libdir', True), 'cmake')
+        for pkg in glob.glob(os.path.join(pkgdata_dir, 'runtime', '*-dev')):
+            with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
+                pn = None
+                headers = []
+                cmakefiles = []
+                for line in f:
+                    if line.startswith('PN:'):
+                        pn = line.split(':', 1)[-1].strip()
+                    elif line.startswith('FILES_INFO:'):
+                        val = line.split(':', 1)[1].strip()
+                        dictval = json.loads(val)
+                        for fullpth in sorted(dictval):
+                            if fullpth.startswith(includedir) and fullpth.endswith('.h'):
+                                headers.append(os.path.relpath(fullpth, includedir))
+                            elif fullpth.startswith(cmakedir) and fullpth.endswith('.cmake'):
+                                cmakefiles.append(os.path.relpath(fullpth, cmakedir))
+                if pn and headers:
+                    for header in headers:
+                        RecipeHandler.recipeheadermap[header] = pn
+                if pn and cmakefiles:
+                    for fn in cmakefiles:
+                        RecipeHandler.recipecmakefilemap[fn] = pn
+
+    @staticmethod
+    def load_binmap(d):
+        '''Build up native binary->recipe mapping'''
+        if RecipeHandler.recipebinmap:
+            return
+        sstate_manifests = d.getVar('SSTATE_MANIFESTS', True)
+        staging_bindir_native = d.getVar('STAGING_BINDIR_NATIVE', True)
+        build_arch = d.getVar('BUILD_ARCH', True)
+        fileprefix = 'manifest-%s-' % build_arch
+        for fn in glob.glob(os.path.join(sstate_manifests, '%s*-native.populate_sysroot' % fileprefix)):
+            with open(fn, 'r') as f:
+                pn = os.path.basename(fn).rsplit('.', 1)[0][len(fileprefix):]
+                for line in f:
+                    if line.startswith(staging_bindir_native):
+                        prog = os.path.basename(line.rstrip())
+                        RecipeHandler.recipebinmap[prog] = pn
+
+    @staticmethod
+    def checkfiles(path, speclist, recursive=False):
         results = []
-        for spec in speclist:
-            results.extend(glob.glob(os.path.join(path, spec)))
+        if recursive:
+            for root, _, files in os.walk(path):
+                for fn in files:
+                    for spec in speclist:
+                        if fnmatch.fnmatch(fn, spec):
+                            results.append(os.path.join(root, fn))
+        else:
+            for spec in speclist:
+                results.extend(glob.glob(os.path.join(path, spec)))
         return results
 
+    @staticmethod
+    def handle_depends(libdeps, pcdeps, deps, outlines, values, d):
+        if pcdeps:
+            recipemap = read_pkgconfig_provides(d)
+        if libdeps:
+            RecipeHandler.load_libmap(d)
+
+        ignorelibs = ['socket']
+        ignoredeps = ['gcc-runtime', 'glibc', 'uclibc', 'musl', 'tar-native', 'binutils-native', 'coreutils-native']
+
+        unmappedpc = []
+        pcdeps = list(set(pcdeps))
+        for pcdep in pcdeps:
+            if isinstance(pcdep, basestring):
+                recipe = recipemap.get(pcdep, None)
+                if recipe:
+                    deps.append(recipe)
+                else:
+                    if not pcdep.startswith('$'):
+                        unmappedpc.append(pcdep)
+            else:
+                for item in pcdep:
+                    recipe = recipemap.get(pcdep, None)
+                    if recipe:
+                        deps.append(recipe)
+                        break
+                else:
+                    unmappedpc.append('(%s)' % ' or '.join(pcdep))
+
+        unmappedlibs = []
+        for libdep in libdeps:
+            if isinstance(libdep, tuple):
+                lib, header = libdep
+            else:
+                lib = libdep
+                header = None
+
+            if lib in ignorelibs:
+                logger.debug('Ignoring library dependency %s' % lib)
+                continue
+
+            recipe = RecipeHandler.recipelibmap.get(lib, None)
+            if recipe:
+                deps.append(recipe)
+            elif recipe is None:
+                if header:
+                    RecipeHandler.load_devel_filemap(d)
+                    recipe = RecipeHandler.recipeheadermap.get(header, None)
+                    if recipe:
+                        deps.append(recipe)
+                    elif recipe is None:
+                        unmappedlibs.append(lib)
+                else:
+                    unmappedlibs.append(lib)
+
+        deps = set(deps).difference(set(ignoredeps))
+
+        if unmappedpc:
+            outlines.append('# NOTE: unable to map the following pkg-config dependencies: %s' % ' '.join(unmappedpc))
+            outlines.append('#       (this is based on recipes that have previously been built and packaged)')
+
+        if unmappedlibs:
+            outlines.append('# NOTE: the following library dependencies are unknown, ignoring: %s' % ' '.join(list(set(unmappedlibs))))
+            outlines.append('#       (this is based on recipes that have previously been built and packaged)')
+
+        if deps:
+            values['DEPENDS'] = ' '.join(deps)
+
     def genfunction(self, outlines, funcname, content, python=False, forcespace=False):
         if python:
             prefix = 'python '
@@ -70,10 +245,64 @@
         outlines.append('}')
         outlines.append('')
 
-    def process(self, srctree, classes, lines_before, lines_after, handled):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
         return False
 
 
+def validate_pv(pv):
+    if not pv or '_version' in pv.lower() or pv[0] not in '0123456789':
+        return False
+    return True
+
+def determine_from_filename(srcfile):
+    """Determine name and version from a filename"""
+    part = ''
+    if '.tar.' in srcfile:
+        namepart = srcfile.split('.tar.')[0].lower()
+    else:
+        namepart = os.path.splitext(srcfile)[0].lower()
+    splitval = namepart.rsplit('_', 1)
+    if len(splitval) == 1:
+        splitval = namepart.rsplit('-', 1)
+    pn = splitval[0].replace('_', '-')
+    if len(splitval) > 1:
+        if splitval[1][0] in '0123456789':
+            pv = splitval[1]
+        else:
+            pn = '-'.join(splitval).replace('_', '-')
+            pv = None
+    else:
+        pv = None
+    return (pn, pv)
+
+def determine_from_url(srcuri):
+    """Determine name and version from a URL"""
+    pn = None
+    pv = None
+    parseres = urlparse.urlparse(srcuri.lower().split(';', 1)[0])
+    if parseres.path:
+        if 'github.com' in parseres.netloc:
+            res = re.search(r'.*/(.*?)/archive/(.*)-final\.(tar|zip)', parseres.path)
+            if res:
+                pn = res.group(1).strip().replace('_', '-')
+                pv = res.group(2).strip().replace('_', '.')
+            else:
+                res = re.search(r'.*/(.*?)/archive/v?(.*)\.(tar|zip)', parseres.path)
+                if res:
+                    pn = res.group(1).strip().replace('_', '-')
+                    pv = res.group(2).strip().replace('_', '.')
+        elif 'bitbucket.org' in parseres.netloc:
+            res = re.search(r'.*/(.*?)/get/[a-zA-Z_-]*([0-9][0-9a-zA-Z_.]*)\.(tar|zip)', parseres.path)
+            if res:
+                pn = res.group(1).strip().replace('_', '-')
+                pv = res.group(2).strip().replace('_', '.')
+
+        if not pn and not pv:
+            srcfile = os.path.basename(parseres.path.rstrip('/'))
+            pn, pv = determine_from_filename(srcfile)
+
+    logger.debug('Determined from source URL: name = "%s", version = "%s"' % (pn, pv))
+    return (pn, pv)
 
 def supports_srcrev(uri):
     localdata = bb.data.createCopy(tinfoil.config_data)
@@ -88,6 +317,16 @@
             return True
     return False
 
+def reformat_git_uri(uri):
+    '''Convert any http[s]://....git URI into git://...;protocol=http[s]'''
+    checkuri = uri.split(';', 1)[0]
+    if checkuri.endswith('.git') or '/git/' in checkuri:
+        res = re.match('(https?)://([^;]+(\.git)?)(;.*)?$', uri)
+        if res:
+            # Need to switch the URI around so that the git fetcher is used
+            return 'git://%s;protocol=%s%s' % (res.group(2), res.group(1), res.group(4) or '')
+    return uri
+
 def create_recipe(args):
     import bb.process
     import tempfile
@@ -103,16 +342,11 @@
     srcrev = '${AUTOREV}'
     if '://' in args.source:
         # Fetch a URL
-        fetchuri = urlparse.urldefrag(args.source)[0]
+        fetchuri = reformat_git_uri(urlparse.urldefrag(args.source)[0])
         if args.binary:
             # Assume the archive contains the directory structure verbatim
             # so we need to extract to a subdirectory
             fetchuri += ';subdir=%s' % os.path.splitext(os.path.basename(urlparse.urlsplit(fetchuri).path))[0]
-        git_re = re.compile('(https?)://([^;]+\.git)(;.*)?')
-        res = git_re.match(fetchuri)
-        if res:
-            # Need to switch the URI around so that the git fetcher is used
-            fetchuri = 'git://%s;protocol=%s%s' % (res.group(2), res.group(1), res.group(3) or '')
         srcuri = fetchuri
         rev_re = re.compile(';rev=([^;]+)')
         res = rev_re.search(srcuri)
@@ -121,11 +355,17 @@
             srcuri = rev_re.sub('', srcuri)
         tempsrc = tempfile.mkdtemp(prefix='recipetool-')
         srctree = tempsrc
+        if fetchuri.startswith('npm://'):
+            # Check if npm is available
+            npm = bb.utils.which(tinfoil.config_data.getVar('PATH', True), 'npm')
+            if not npm:
+                logger.error('npm:// URL requested but npm is not available - you need to either build nodejs-native or install npm using your package manager')
+                sys.exit(1)
         logger.info('Fetching %s...' % srcuri)
         try:
             checksums = scriptutils.fetch_uri(tinfoil.config_data, fetchuri, srctree, srcrev)
-        except bb.fetch2.FetchError:
-            # Error already printed
+        except bb.fetch2.BBFetchException as e:
+            logger.error(str(e).rstrip())
             sys.exit(1)
         dirlist = os.listdir(srctree)
         if 'git.indirectionsymlink' in dirlist:
@@ -149,10 +389,35 @@
         if not os.path.isdir(args.source):
             logger.error('Invalid source directory %s' % args.source)
             sys.exit(1)
-        srcuri = ''
         srctree = args.source
+        srcuri = ''
+        if os.path.exists(os.path.join(srctree, '.git')):
+            # Try to get upstream repo location from origin remote
+            try:
+                stdout, _ = bb.process.run('git remote -v', cwd=srctree, shell=True)
+            except bb.process.ExecutionError as e:
+                stdout = None
+            if stdout:
+                for line in stdout.splitlines():
+                    splitline = line.split()
+                    if len(splitline) > 1:
+                        if splitline[0] == 'origin' and '://' in splitline[1]:
+                            srcuri = reformat_git_uri(splitline[1])
+                            srcsubdir = 'git'
+                            break
 
-    outfile = args.outfile
+    if args.src_subdir:
+        srcsubdir = os.path.join(srcsubdir, args.src_subdir)
+        srctree_use = os.path.join(srctree, args.src_subdir)
+    else:
+        srctree_use = srctree
+
+    if args.outfile and os.path.isdir(args.outfile):
+        outfile = None
+        outdir = args.outfile
+    else:
+        outfile = args.outfile
+        outdir = None
     if outfile and outfile != '-':
         if os.path.exists(outfile):
             logger.error('Output file %s already exists' % outfile)
@@ -166,7 +431,7 @@
     lines_before.append('# (Feel free to remove these comments when editing.)')
     lines_before.append('#')
 
-    licvalues = guess_license(srctree)
+    licvalues = guess_license(srctree_use)
     lic_files_chksum = []
     if licvalues:
         licenses = []
@@ -195,29 +460,50 @@
     lines_before.append('LIC_FILES_CHKSUM = "%s"' % ' \\\n                    '.join(lic_files_chksum))
     lines_before.append('')
 
+    classes = []
+
     # FIXME This is kind of a hack, we probably ought to be using bitbake to do this
-    # we'd also want a way to automatically set outfile based upon auto-detecting these values from the source if possible
-    recipefn = os.path.splitext(os.path.basename(outfile))[0]
-    fnsplit = recipefn.split('_')
-    if len(fnsplit) > 1:
-        pn = fnsplit[0]
-        pv = fnsplit[1]
-    else:
-        pn = recipefn
-        pv = None
+    pn = None
+    pv = None
+    if outfile:
+        recipefn = os.path.splitext(os.path.basename(outfile))[0]
+        fnsplit = recipefn.split('_')
+        if len(fnsplit) > 1:
+            pn = fnsplit[0]
+            pv = fnsplit[1]
+        else:
+            pn = recipefn
 
     if args.version:
         pv = args.version
 
+    if args.name:
+        pn = args.name
+        if args.name.endswith('-native'):
+            if args.also_native:
+                logger.error('--also-native cannot be specified for a recipe named *-native (*-native denotes a recipe that is already only for native) - either remove the -native suffix from the name or drop --also-native')
+                sys.exit(1)
+            classes.append('native')
+        elif args.name.startswith('nativesdk-'):
+            if args.also_native:
+                logger.error('--also-native cannot be specified for a recipe named nativesdk-* (nativesdk-* denotes a recipe that is already only for nativesdk)')
+                sys.exit(1)
+            classes.append('nativesdk')
+
     if pv and pv not in 'git svn hg'.split():
         realpv = pv
     else:
         realpv = None
 
-    if srcuri:
-        if realpv:
-            srcuri = srcuri.replace(realpv, '${PV}')
-    else:
+    if srcuri and not realpv or not pn:
+        name_pn, name_pv = determine_from_url(srcuri)
+        if name_pn and not pn:
+            pn = name_pn
+        if name_pv and not realpv:
+            realpv = name_pv
+
+
+    if not srcuri:
         lines_before.append('# No information for SRC_URI yet (only an external source tree was specified)')
     lines_before.append('SRC_URI = "%s"' % srcuri)
     (md5value, sha256value) = checksums
@@ -232,13 +518,7 @@
         lines_before.append('SRCREV = "%s"' % srcrev)
     lines_before.append('')
 
-    if srcsubdir and pv:
-        if srcsubdir == "%s-%s" % (pn, pv):
-            # This would be the default, so we don't need to set S in the recipe
-            srcsubdir = ''
     if srcsubdir:
-        if pv and pv not in 'git svn hg'.split():
-            srcsubdir = srcsubdir.replace(pv, '${PV}')
         lines_before.append('S = "${WORKDIR}/%s"' % srcsubdir)
         lines_before.append('')
 
@@ -251,25 +531,133 @@
         lines_after.append('')
 
     # Find all plugins that want to register handlers
-    handlers = []
+    logger.debug('Loading recipe handlers')
+    raw_handlers = []
     for plugin in plugins:
         if hasattr(plugin, 'register_recipe_handlers'):
-            plugin.register_recipe_handlers(handlers)
+            plugin.register_recipe_handlers(raw_handlers)
+    # Sort handlers by priority
+    handlers = []
+    for i, handler in enumerate(raw_handlers):
+        if isinstance(handler, tuple):
+            handlers.append((handler[0], handler[1], i))
+        else:
+            handlers.append((handler, 0, i))
+    handlers.sort(key=lambda item: (item[1], -item[2]), reverse=True)
+    for handler, priority, _ in handlers:
+        logger.debug('Handler: %s (priority %d)' % (handler.__class__.__name__, priority))
+    handlers = [item[0] for item in handlers]
 
     # Apply the handlers
-    classes = []
     handled = []
+    handled.append(('license', licvalues))
 
     if args.binary:
         classes.append('bin_package')
         handled.append('buildsystem')
 
+    extravalues = {}
     for handler in handlers:
-        handler.process(srctree, classes, lines_before, lines_after, handled)
+        handler.process(srctree_use, classes, lines_before, lines_after, handled, extravalues)
+
+    extrafiles = extravalues.pop('extrafiles', {})
+
+    if not realpv:
+        realpv = extravalues.get('PV', None)
+        if realpv:
+            if not validate_pv(realpv):
+                realpv = None
+            else:
+                realpv = realpv.lower().split()[0]
+                if '_' in realpv:
+                    realpv = realpv.replace('_', '-')
+    if not pn:
+        pn = extravalues.get('PN', None)
+        if pn:
+            if pn.startswith('GNU '):
+                pn = pn[4:]
+            if ' ' in pn:
+                # Probably a descriptive identifier rather than a proper name
+                pn = None
+            else:
+                pn = pn.lower()
+                if '_' in pn:
+                    pn = pn.replace('_', '-')
+
+    if not outfile:
+        if not pn:
+            logger.error('Unable to determine short program name from source tree - please specify name with -N/--name or output file name with -o/--outfile')
+            # devtool looks for this specific exit code, so don't change it
+            sys.exit(15)
+        else:
+            if srcuri and srcuri.startswith(('git://', 'hg://', 'svn://')):
+                outfile = '%s_%s.bb' % (pn, srcuri.split(':', 1)[0])
+            elif realpv:
+                outfile = '%s_%s.bb' % (pn, realpv)
+            else:
+                outfile = '%s.bb' % pn
+            if outdir:
+                outfile = os.path.join(outdir, outfile)
+            # We need to check this again
+            if os.path.exists(outfile):
+                logger.error('Output file %s already exists' % outfile)
+                sys.exit(1)
+
+    # Move any extra files the plugins created to a directory next to the recipe
+    if extrafiles:
+        if outfile == '-':
+            extraoutdir = pn
+        else:
+            extraoutdir = os.path.join(os.path.dirname(outfile), pn)
+        bb.utils.mkdirhier(extraoutdir)
+        for destfn, extrafile in extrafiles.iteritems():
+            shutil.move(extrafile, os.path.join(extraoutdir, destfn))
+
+    lines = lines_before
+    lines_before = []
+    skipblank = True
+    for line in lines:
+        if skipblank:
+            skipblank = False
+            if not line:
+                continue
+        if line.startswith('S = '):
+            if realpv and pv not in 'git svn hg'.split():
+                line = line.replace(realpv, '${PV}')
+            if pn:
+                line = line.replace(pn, '${BPN}')
+            if line == 'S = "${WORKDIR}/${BPN}-${PV}"':
+                skipblank = True
+                continue
+        elif line.startswith('SRC_URI = '):
+            if realpv:
+                line = line.replace(realpv, '${PV}')
+        elif line.startswith('PV = '):
+            if realpv:
+                line = re.sub('"[^+]*\+', '"%s+' % realpv, line)
+        lines_before.append(line)
+
+    if args.also_native:
+        lines = lines_after
+        lines_after = []
+        bbclassextend = None
+        for line in lines:
+            if line.startswith('BBCLASSEXTEND ='):
+                splitval = line.split('"')
+                if len(splitval) > 1:
+                    bbclassextend = splitval[1].split()
+                    if not 'native' in bbclassextend:
+                        bbclassextend.insert(0, 'native')
+                line = 'BBCLASSEXTEND = "%s"' % ' '.join(bbclassextend)
+            lines_after.append(line)
+        if not bbclassextend:
+            lines_after.append('BBCLASSEXTEND = "native"')
 
     outlines = []
     outlines.extend(lines_before)
     if classes:
+        if outlines[-1] and not outlines[-1].startswith('#'):
+            outlines.append('')
         outlines.append('inherit %s' % ' '.join(classes))
         outlines.append('')
     outlines.extend(lines_after)
@@ -339,19 +727,92 @@
     md5sums['5f30f0716dfdd0d91eb439ebec522ec2'] = 'LGPLv2'
     md5sums['55ca817ccb7d5b5b66355690e9abc605'] = 'LGPLv2'
     md5sums['252890d9eee26aab7b432e8b8a616475'] = 'LGPLv2'
+    md5sums['3214f080875748938ba060314b4f727d'] = 'LGPLv2'
+    md5sums['db979804f025cf55aabec7129cb671ed'] = 'LGPLv2'
     md5sums['d32239bcb673463ab874e80d47fae504'] = 'GPLv3'
     md5sums['f27defe1e96c2e1ecd4e0c9be8967949'] = 'GPLv3'
     md5sums['6a6a8e020838b23406c81b19c1d46df6'] = 'LGPLv3'
     md5sums['3b83ef96387f14655fc854ddc3c6bd57'] = 'Apache-2.0'
     md5sums['385c55653886acac3821999a3ccd17b3'] = 'Artistic-1.0 | GPL-2.0' # some perl modules
+    md5sums['54c7042be62e169199200bc6477f04d1'] = 'BSD-3-Clause'
     return md5sums
 
+def crunch_license(licfile):
+    '''
+    Remove non-material text from a license file and then check
+    its md5sum against a known list. This works well for licenses
+    which contain a copyright statement, but is also a useful way
+    to handle people's insistence upon reformatting the license text
+    slightly (with no material difference to the text of the
+    license).
+    '''
+
+    import oe.utils
+
+    # Note: these are carefully constructed!
+    license_title_re = re.compile('^\(?(#+ *)?(The )?.{1,10} [Ll]icen[sc]e( \(.{1,10}\))?\)?:?$')
+    license_statement_re = re.compile('^This (project|software) is( free software)? released under the .{1,10} [Ll]icen[sc]e:?$')
+    copyright_re = re.compile('^(#+)? *Copyright .*$')
+
+    crunched_md5sums = {}
+    # The following two were gleaned from the "forever" npm package
+    crunched_md5sums['0a97f8e4cbaf889d6fa51f84b89a79f6'] = 'ISC'
+    crunched_md5sums['eecf6429523cbc9693547cf2db790b5c'] = 'MIT'
+    # https://github.com/vasi/pixz/blob/master/LICENSE
+    crunched_md5sums['2f03392b40bbe663597b5bd3cc5ebdb9'] = 'BSD-2-Clause'
+    # https://github.com/waffle-gl/waffle/blob/master/LICENSE.txt
+    crunched_md5sums['e72e5dfef0b1a4ca8a3d26a60587db66'] = 'BSD-2-Clause'
+    # https://github.com/spigwitmer/fakeds1963s/blob/master/LICENSE
+    crunched_md5sums['8be76ac6d191671f347ee4916baa637e'] = 'GPLv2'
+    # https://github.com/datto/dattobd/blob/master/COPYING
+    # http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/GPLv2.TXT
+    crunched_md5sums['1d65c5ad4bf6489f85f4812bf08ae73d'] = 'GPLv2'
+    # http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
+    # http://git.neil.brown.name/?p=mdadm.git;a=blob;f=COPYING;h=d159169d1050894d3ea3b98e1c965c4058208fe1;hb=HEAD
+    crunched_md5sums['fb530f66a7a89ce920f0e912b5b66d4b'] = 'GPLv2'
+    # https://github.com/gkos/nrf24/blob/master/COPYING
+    crunched_md5sums['7b6aaa4daeafdfa6ed5443fd2684581b'] = 'GPLv2'
+    # https://github.com/josch09/resetusb/blob/master/COPYING
+    crunched_md5sums['8b8ac1d631a4d220342e83bcf1a1fbc3'] = 'GPLv3'
+    # https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv2.1
+    crunched_md5sums['2ea316ed973ae176e502e2297b574bb3'] = 'LGPLv2.1'
+    # unixODBC-2.3.4 COPYING
+    crunched_md5sums['1daebd9491d1e8426900b4fa5a422814'] = 'LGPLv2.1'
+    # https://github.com/FFmpeg/FFmpeg/blob/master/COPYING.LGPLv3
+    crunched_md5sums['2ebfb3bb49b9a48a075cc1425e7f4129'] = 'LGPLv3'
+    lictext = []
+    with open(licfile, 'r') as f:
+        for line in f:
+            # Drop opening statements
+            if copyright_re.match(line):
+                continue
+            elif license_title_re.match(line):
+                continue
+            elif license_statement_re.match(line):
+                continue
+            # Squash spaces, and replace smart quotes, double quotes
+            # and backticks with single quotes
+            line = oe.utils.squashspaces(line.strip()).decode("utf-8")
+            line = line.replace(u"\u2018", "'").replace(u"\u2019", "'").replace(u"\u201c","'").replace(u"\u201d", "'").replace('"', '\'').replace('`', '\'')
+            if line:
+                lictext.append(line)
+
+    m = hashlib.md5()
+    try:
+        m.update(' '.join(lictext))
+        md5val = m.hexdigest()
+    except UnicodeEncodeError:
+        md5val = None
+        lictext = ''
+    license = crunched_md5sums.get(md5val, None)
+    return license, md5val, lictext
+
 def guess_license(srctree):
     import bb
     md5sums = get_license_md5sums(tinfoil.config_data)
 
     licenses = []
-    licspecs = ['LICENSE*', 'COPYING*', '*[Ll]icense*', 'LICENCE*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*']
+    licspecs = ['*LICEN[CS]E*', 'COPYING*', '*[Ll]icense*', 'LEGAL*', '[Ll]egal*', '*GPL*', 'README.lic*', 'COPYRIGHT*', '[Cc]opyright*']
     licfiles = []
     for root, dirs, files in os.walk(srctree):
         for fn in files:
@@ -362,13 +823,44 @@
                         licfiles.append(fullpath)
     for licfile in licfiles:
         md5value = bb.utils.md5_file(licfile)
-        license = md5sums.get(md5value, 'Unknown')
+        license = md5sums.get(md5value, None)
+        if not license:
+            license, crunched_md5, lictext = crunch_license(licfile)
+            if not license:
+                license = 'Unknown'
         licenses.append((license, os.path.relpath(licfile, srctree), md5value))
 
     # FIXME should we grab at least one source file with a license header and add that too?
 
     return licenses
 
+def split_pkg_licenses(licvalues, packages, outlines, fallback_licenses=None, pn='${PN}'):
+    """
+    Given a list of (license, path, md5sum) as returned by guess_license(),
+    a dict of package name to path mappings, write out a set of
+    package-specific LICENSE values.
+    """
+    pkglicenses = {pn: []}
+    for license, licpath, _ in licvalues:
+        for pkgname, pkgpath in packages.iteritems():
+            if licpath.startswith(pkgpath + '/'):
+                if pkgname in pkglicenses:
+                    pkglicenses[pkgname].append(license)
+                else:
+                    pkglicenses[pkgname] = [license]
+                break
+        else:
+            # Accumulate on the main package
+            pkglicenses[pn].append(license)
+    outlicenses = {}
+    for pkgname in packages:
+        license = ' '.join(list(set(pkglicenses.get(pkgname, ['Unknown']))))
+        if license == 'Unknown' and pkgname in fallback_licenses:
+            license = fallback_licenses[pkgname]
+        outlines.append('LICENSE_%s = "%s"' % (pkgname, license))
+        outlicenses[pkgname] = license.split()
+    return outlicenses
+
 def read_pkgconfig_provides(d):
     pkgdatadir = d.getVar('PKGDATA_DIR', True)
     pkgmap = {}
@@ -454,15 +946,18 @@
     return values
 
 
-def register_command(subparsers):
+def register_commands(subparsers):
     parser_create = subparsers.add_parser('create',
                                           help='Create a new recipe',
                                           description='Creates a new recipe from a source tree')
     parser_create.add_argument('source', help='Path or URL to source')
-    parser_create.add_argument('-o', '--outfile', help='Specify filename for recipe to create', required=True)
+    parser_create.add_argument('-o', '--outfile', help='Specify filename for recipe to create')
     parser_create.add_argument('-m', '--machine', help='Make recipe machine-specific as opposed to architecture-specific', action='store_true')
     parser_create.add_argument('-x', '--extract-to', metavar='EXTRACTPATH', help='Assuming source is a URL, fetch it and extract it to the directory specified as %(metavar)s')
+    parser_create.add_argument('-N', '--name', help='Name to use within recipe (PN)')
     parser_create.add_argument('-V', '--version', help='Version to use within recipe (PV)')
     parser_create.add_argument('-b', '--binary', help='Treat the source tree as something that should be installed verbatim (no compilation, same directory structure)', action='store_true')
+    parser_create.add_argument('--also-native', help='Also add native variant (i.e. support building recipe for the build host as well as the target machine)', action='store_true')
+    parser_create.add_argument('--src-subdir', help='Specify subdirectory within source tree to use', metavar='SUBDIR')
     parser_create.set_defaults(func=create_recipe)
 
diff --git a/yocto-poky/scripts/lib/recipetool/create_buildsys.py b/yocto-poky/scripts/lib/recipetool/create_buildsys.py
index 931ef3b..f84ec3d 100644
--- a/yocto-poky/scripts/lib/recipetool/create_buildsys.py
+++ b/yocto-poky/scripts/lib/recipetool/create_buildsys.py
@@ -1,6 +1,6 @@
 # Recipe creation tool - create command build system handlers
 #
-# Copyright (C) 2014 Intel Corporation
+# Copyright (C) 2014-2016 Intel Corporation
 #
 # 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
@@ -17,23 +17,35 @@
 
 import re
 import logging
-from recipetool.create import RecipeHandler, read_pkgconfig_provides
+import glob
+from recipetool.create import RecipeHandler, validate_pv
 
 logger = logging.getLogger('recipetool')
 
 tinfoil = None
+plugins = None
+
+def plugin_init(pluginlist):
+    # Take a reference to the list so we can use it later
+    global plugins
+    plugins = pluginlist
 
 def tinfoil_init(instance):
     global tinfoil
     tinfoil = instance
 
+
 class CmakeRecipeHandler(RecipeHandler):
-    def process(self, srctree, classes, lines_before, lines_after, handled):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
         if 'buildsystem' in handled:
             return False
 
         if RecipeHandler.checkfiles(srctree, ['CMakeLists.txt']):
             classes.append('cmake')
+            values = CmakeRecipeHandler.extract_cmake_deps(lines_before, srctree, extravalues)
+            classes.extend(values.pop('inherit', '').split())
+            for var, value in values.iteritems():
+                lines_before.append('%s = "%s"' % (var, value))
             lines_after.append('# Specify any options you want to pass to cmake using EXTRA_OECMAKE:')
             lines_after.append('EXTRA_OECMAKE = ""')
             lines_after.append('')
@@ -41,8 +53,266 @@
             return True
         return False
 
+    @staticmethod
+    def extract_cmake_deps(outlines, srctree, extravalues, cmakelistsfile=None):
+        # Find all plugins that want to register handlers
+        logger.debug('Loading cmake handlers')
+        handlers = []
+        for plugin in plugins:
+            if hasattr(plugin, 'register_cmake_handlers'):
+                plugin.register_cmake_handlers(handlers)
+
+        values = {}
+        inherits = []
+
+        if cmakelistsfile:
+            srcfiles = [cmakelistsfile]
+        else:
+            srcfiles = RecipeHandler.checkfiles(srctree, ['CMakeLists.txt'])
+
+        # Note that some of these are non-standard, but probably better to
+        # be able to map them anyway if we see them
+        cmake_pkgmap = {'alsa': 'alsa-lib',
+                        'aspell': 'aspell',
+                        'atk': 'atk',
+                        'bison': 'bison-native',
+                        'boost': 'boost',
+                        'bzip2': 'bzip2',
+                        'cairo': 'cairo',
+                        'cups': 'cups',
+                        'curl': 'curl',
+                        'curses': 'ncurses',
+                        'cvs': 'cvs',
+                        'drm': 'libdrm',
+                        'dbus': 'dbus',
+                        'dbusglib': 'dbus-glib',
+                        'egl': 'virtual/egl',
+                        'expat': 'expat',
+                        'flex': 'flex-native',
+                        'fontconfig': 'fontconfig',
+                        'freetype': 'freetype',
+                        'gettext': '',
+                        'git': '',
+                        'gio': 'glib-2.0',
+                        'giounix': 'glib-2.0',
+                        'glew': 'glew',
+                        'glib': 'glib-2.0',
+                        'glib2': 'glib-2.0',
+                        'glu': 'libglu',
+                        'glut': 'freeglut',
+                        'gobject': 'glib-2.0',
+                        'gperf': 'gperf-native',
+                        'gnutls': 'gnutls',
+                        'gtk2': 'gtk+',
+                        'gtk3': 'gtk+3',
+                        'gtk': 'gtk+3',
+                        'harfbuzz': 'harfbuzz',
+                        'icu': 'icu',
+                        'intl': 'virtual/libintl',
+                        'jpeg': 'jpeg',
+                        'libarchive': 'libarchive',
+                        'libiconv': 'virtual/libiconv',
+                        'liblzma': 'xz',
+                        'libxml2': 'libxml2',
+                        'libxslt': 'libxslt',
+                        'opengl': 'virtual/libgl',
+                        'openmp': '',
+                        'openssl': 'openssl',
+                        'pango': 'pango',
+                        'perl': '',
+                        'perllibs': '',
+                        'pkgconfig': '',
+                        'png': 'libpng',
+                        'pthread': '',
+                        'pythoninterp': '',
+                        'pythonlibs': '',
+                        'ruby': 'ruby-native',
+                        'sdl': 'libsdl',
+                        'sdl2': 'libsdl2',
+                        'subversion': 'subversion-native',
+                        'swig': 'swig-native',
+                        'tcl': 'tcl-native',
+                        'threads': '',
+                        'tiff': 'tiff',
+                        'wget': 'wget',
+                        'x11': 'libx11',
+                        'xcb': 'libxcb',
+                        'xext': 'libxext',
+                        'xfixes': 'libxfixes',
+                        'zlib': 'zlib',
+                        }
+
+        pcdeps = []
+        libdeps = []
+        deps = []
+        unmappedpkgs = []
+
+        proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE)
+        pkgcm_re = re.compile('pkg_check_modules\s*\(\s*[a-zA-Z0-9-_]+\s*(REQUIRED)?\s+([^)\s]+)\s*\)', re.IGNORECASE)
+        pkgsm_re = re.compile('pkg_search_module\s*\(\s*[a-zA-Z0-9-_]+\s*(REQUIRED)?((\s+[^)\s]+)+)\s*\)', re.IGNORECASE)
+        findpackage_re = re.compile('find_package\s*\(\s*([a-zA-Z0-9-_]+)\s*.*', re.IGNORECASE)
+        findlibrary_re = re.compile('find_library\s*\(\s*[a-zA-Z0-9-_]+\s*(NAMES\s+)?([a-zA-Z0-9-_ ]+)\s*.*')
+        checklib_re = re.compile('check_library_exists\s*\(\s*([^\s)]+)\s*.*', re.IGNORECASE)
+        include_re = re.compile('include\s*\(\s*([^)\s]*)\s*\)', re.IGNORECASE)
+        subdir_re = re.compile('add_subdirectory\s*\(\s*([^)\s]*)\s*([^)\s]*)\s*\)', re.IGNORECASE)
+        dep_re = re.compile('([^ ><=]+)( *[<>=]+ *[^ ><=]+)?')
+
+        def find_cmake_package(pkg):
+            RecipeHandler.load_devel_filemap(tinfoil.config_data)
+            for fn, pn in RecipeHandler.recipecmakefilemap.iteritems():
+                splitname = fn.split('/')
+                if len(splitname) > 1:
+                    if splitname[0].lower().startswith(pkg.lower()):
+                        if splitname[1] == '%s-config.cmake' % pkg.lower() or splitname[1] == '%sConfig.cmake' % pkg or splitname[1] == 'Find%s.cmake' % pkg:
+                            return pn
+            return None
+
+        def interpret_value(value):
+            return value.strip('"')
+
+        def parse_cmake_file(fn, paths=None):
+            searchpaths = (paths or []) + [os.path.dirname(fn)]
+            logger.debug('Parsing file %s' % fn)
+            with open(fn, 'r') as f:
+                for line in f:
+                    line = line.strip()
+                    for handler in handlers:
+                        if handler.process_line(srctree, fn, line, libdeps, pcdeps, deps, outlines, inherits, values):
+                            continue
+                    res = include_re.match(line)
+                    if res:
+                        includefn = bb.utils.which(':'.join(searchpaths), res.group(1))
+                        if includefn:
+                            parse_cmake_file(includefn, searchpaths)
+                        else:
+                            logger.debug('Unable to recurse into include file %s' % res.group(1))
+                        continue
+                    res = subdir_re.match(line)
+                    if res:
+                        subdirfn = os.path.join(os.path.dirname(fn), res.group(1), 'CMakeLists.txt')
+                        if os.path.exists(subdirfn):
+                            parse_cmake_file(subdirfn, searchpaths)
+                        else:
+                            logger.debug('Unable to recurse into subdirectory file %s' % subdirfn)
+                        continue
+                    res = proj_re.match(line)
+                    if res:
+                        extravalues['PN'] = interpret_value(res.group(1).split()[0])
+                        continue
+                    res = pkgcm_re.match(line)
+                    if res:
+                        res = dep_re.findall(res.group(2))
+                        if res:
+                            pcdeps.extend([interpret_value(x[0]) for x in res])
+                        inherits.append('pkgconfig')
+                        continue
+                    res = pkgsm_re.match(line)
+                    if res:
+                        res = dep_re.findall(res.group(2))
+                        if res:
+                            # Note: appending a tuple here!
+                            item = tuple((interpret_value(x[0]) for x in res))
+                            if len(item) == 1:
+                                item = item[0]
+                            pcdeps.append(item)
+                        inherits.append('pkgconfig')
+                        continue
+                    res = findpackage_re.match(line)
+                    if res:
+                        origpkg = res.group(1)
+                        pkg = interpret_value(origpkg)
+                        found = False
+                        for handler in handlers:
+                            if handler.process_findpackage(srctree, fn, pkg, deps, outlines, inherits, values):
+                                logger.debug('Mapped CMake package %s via handler %s' % (pkg, handler.__class__.__name__))
+                                found = True
+                                break
+                        if found:
+                            continue
+                        elif pkg == 'Gettext':
+                            inherits.append('gettext')
+                        elif pkg == 'Perl':
+                            inherits.append('perlnative')
+                        elif pkg == 'PkgConfig':
+                            inherits.append('pkgconfig')
+                        elif pkg == 'PythonInterp':
+                            inherits.append('pythonnative')
+                        elif pkg == 'PythonLibs':
+                            inherits.append('python-dir')
+                        else:
+                            # Try to map via looking at installed CMake packages in pkgdata
+                            dep = find_cmake_package(pkg)
+                            if dep:
+                                logger.debug('Mapped CMake package %s to recipe %s via pkgdata' % (pkg, dep))
+                                deps.append(dep)
+                            else:
+                                dep = cmake_pkgmap.get(pkg.lower(), None)
+                                if dep:
+                                    logger.debug('Mapped CMake package %s to recipe %s via internal list' % (pkg, dep))
+                                    deps.append(dep)
+                                elif dep is None:
+                                    unmappedpkgs.append(origpkg)
+                        continue
+                    res = checklib_re.match(line)
+                    if res:
+                        lib = interpret_value(res.group(1))
+                        if not lib.startswith('$'):
+                            libdeps.append(lib)
+                    res = findlibrary_re.match(line)
+                    if res:
+                        libs = res.group(2).split()
+                        for lib in libs:
+                            if lib in ['HINTS', 'PATHS', 'PATH_SUFFIXES', 'DOC', 'NAMES_PER_DIR'] or lib.startswith(('NO_', 'CMAKE_', 'ONLY_CMAKE_')):
+                                break
+                            lib = interpret_value(lib)
+                            if not lib.startswith('$'):
+                                libdeps.append(lib)
+                    if line.lower().startswith('useswig'):
+                        deps.append('swig-native')
+                        continue
+
+        parse_cmake_file(srcfiles[0])
+
+        if unmappedpkgs:
+            outlines.append('# NOTE: unable to map the following CMake package dependencies: %s' % ' '.join(list(set(unmappedpkgs))))
+
+        RecipeHandler.handle_depends(libdeps, pcdeps, deps, outlines, values, tinfoil.config_data)
+
+        for handler in handlers:
+            handler.post_process(srctree, libdeps, pcdeps, deps, outlines, inherits, values)
+
+        if inherits:
+            values['inherit'] = ' '.join(list(set(inherits)))
+
+        return values
+
+
+class CmakeExtensionHandler(object):
+    '''Base class for CMake extension handlers'''
+    def process_line(self, srctree, fn, line, libdeps, pcdeps, deps, outlines, inherits, values):
+        '''
+        Handle a line parsed out of an CMake file.
+        Return True if you've completely handled the passed in line, otherwise return False.
+        '''
+        return False
+
+    def process_findpackage(self, srctree, fn, pkg, deps, outlines, inherits, values):
+        '''
+        Handle a find_package package parsed out of a CMake file.
+        Return True if you've completely handled the passed in package, otherwise return False.
+        '''
+        return False
+
+    def post_process(self, srctree, fn, pkg, deps, outlines, inherits, values):
+        '''
+        Apply any desired post-processing on the output
+        '''
+        return
+
+
+
 class SconsRecipeHandler(RecipeHandler):
-    def process(self, srctree, classes, lines_before, lines_after, handled):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
         if 'buildsystem' in handled:
             return False
 
@@ -55,8 +325,9 @@
             return True
         return False
 
+
 class QmakeRecipeHandler(RecipeHandler):
-    def process(self, srctree, classes, lines_before, lines_after, handled):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
         if 'buildsystem' in handled:
             return False
 
@@ -66,15 +337,16 @@
             return True
         return False
 
+
 class AutotoolsRecipeHandler(RecipeHandler):
-    def process(self, srctree, classes, lines_before, lines_after, handled):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
         if 'buildsystem' in handled:
             return False
 
         autoconf = False
         if RecipeHandler.checkfiles(srctree, ['configure.ac', 'configure.in']):
             autoconf = True
-            values = AutotoolsRecipeHandler.extract_autotools_deps(lines_before, srctree)
+            values = AutotoolsRecipeHandler.extract_autotools_deps(lines_before, srctree, extravalues)
             classes.extend(values.pop('inherit', '').split())
             for var, value in values.iteritems():
                 lines_before.append('%s = "%s"' % (var, value))
@@ -88,7 +360,24 @@
                             autoconf = True
                             break
 
+        if autoconf and not ('PV' in extravalues and 'PN' in extravalues):
+            # Last resort
+            conffile = RecipeHandler.checkfiles(srctree, ['configure'])
+            if conffile:
+                with open(conffile[0], 'r') as f:
+                    for line in f:
+                        line = line.strip()
+                        if line.startswith('VERSION=') or line.startswith('PACKAGE_VERSION='):
+                            pv = line.split('=')[1].strip('"\'')
+                            if pv and not 'PV' in extravalues and validate_pv(pv):
+                                extravalues['PV'] = pv
+                        elif line.startswith('PACKAGE_NAME=') or line.startswith('PACKAGE='):
+                            pn = line.split('=')[1].strip('"\'')
+                            if pn and not 'PN' in extravalues:
+                                extravalues['PN'] = pn
+
         if autoconf:
+            lines_before.append('')
             lines_before.append('# NOTE: if this software is not capable of being built in a separate build directory')
             lines_before.append('# from the source, you should replace autotools with autotools-brokensep in the')
             lines_before.append('# inherit line')
@@ -102,136 +391,311 @@
         return False
 
     @staticmethod
-    def extract_autotools_deps(outlines, srctree, acfile=None):
+    def extract_autotools_deps(outlines, srctree, extravalues=None, acfile=None):
         import shlex
-        import oe.package
+
+        # Find all plugins that want to register handlers
+        logger.debug('Loading autotools handlers')
+        handlers = []
+        for plugin in plugins:
+            if hasattr(plugin, 'register_autotools_handlers'):
+                plugin.register_autotools_handlers(handlers)
 
         values = {}
         inherits = []
 
-        # FIXME this mapping is very thin
+        # Hardcoded map, we also use a dynamic one based on what's in the sysroot
         progmap = {'flex': 'flex-native',
                 'bison': 'bison-native',
-                'm4': 'm4-native'}
+                'm4': 'm4-native',
+                'tar': 'tar-native',
+                'ar': 'binutils-native',
+                'ranlib': 'binutils-native',
+                'ld': 'binutils-native',
+                'strip': 'binutils-native',
+                'libtool': '',
+                'autoconf': '',
+                'autoheader': '',
+                'automake': '',
+                'uname': '',
+                'rm': '',
+                'cp': '',
+                'mv': '',
+                'find': '',
+                'awk': '',
+                'sed': '',
+                }
         progclassmap = {'gconftool-2': 'gconf',
-                'pkg-config': 'pkgconfig'}
+                'pkg-config': 'pkgconfig',
+                'python': 'pythonnative',
+                'python3': 'python3native',
+                'perl': 'perlnative',
+                'makeinfo': 'texinfo',
+                }
 
-        ignoredeps = ['gcc-runtime', 'glibc', 'uclibc']
-
-        pkg_re = re.compile('PKG_CHECK_MODULES\(\[?[a-zA-Z0-9]*\]?, \[?([^,\]]*)[),].*')
-        lib_re = re.compile('AC_CHECK_LIB\(\[?([a-zA-Z0-9]*)\]?, .*')
-        progs_re = re.compile('_PROGS?\(\[?[a-zA-Z0-9]*\]?, \[?([^,\]]*)\]?[),].*')
+        pkg_re = re.compile('PKG_CHECK_MODULES\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*')
+        pkgce_re = re.compile('PKG_CHECK_EXISTS\(\s*\[?([^,\]]*)\]?[),].*')
+        lib_re = re.compile('AC_CHECK_LIB\(\s*\[?([^,\]]*)\]?,.*')
+        libx_re = re.compile('AX_CHECK_LIBRARY\(\s*\[?[^,\]]*\]?,\s*\[?([^,\]]*)\]?,\s*\[?([a-zA-Z0-9-]*)\]?,.*')
+        progs_re = re.compile('_PROGS?\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*')
         dep_re = re.compile('([^ ><=]+)( [<>=]+ [^ ><=]+)?')
+        ac_init_re = re.compile('AC_INIT\(\s*([^,]+),\s*([^,]+)[,)].*')
+        am_init_re = re.compile('AM_INIT_AUTOMAKE\(\s*([^,]+),\s*([^,]+)[,)].*')
+        define_re = re.compile('\s*(m4_)?define\(\s*([^,]+),\s*([^,]+)\)')
 
-        # Build up lib library->package mapping
-        shlib_providers = oe.package.read_shlib_providers(tinfoil.config_data)
-        libdir = tinfoil.config_data.getVar('libdir', True)
-        base_libdir = tinfoil.config_data.getVar('base_libdir', True)
-        libpaths = list(set([base_libdir, libdir]))
-        libname_re = re.compile('^lib(.+)\.so.*$')
-        pkglibmap = {}
-        for lib, item in shlib_providers.iteritems():
-            for path, pkg in item.iteritems():
-                if path in libpaths:
-                    res = libname_re.match(lib)
-                    if res:
-                        libname = res.group(1)
-                        if not libname in pkglibmap:
-                            pkglibmap[libname] = pkg[0]
-                    else:
-                        logger.debug('unable to extract library name from %s' % lib)
+        defines = {}
+        def subst_defines(value):
+            newvalue = value
+            for define, defval in defines.iteritems():
+                newvalue = newvalue.replace(define, defval)
+            if newvalue != value:
+                return subst_defines(newvalue)
+            return value
 
-        # Now turn it into a library->recipe mapping
-        recipelibmap = {}
-        pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR', True)
-        for libname, pkg in pkglibmap.iteritems():
-            try:
-                with open(os.path.join(pkgdata_dir, 'runtime', pkg)) as f:
-                    for line in f:
-                        if line.startswith('PN:'):
-                            recipelibmap[libname] = line.split(':', 1)[-1].strip()
-                            break
-            except IOError as ioe:
-                if ioe.errno == 2:
-                    logger.warn('unable to find a pkgdata file for package %s' % pkg)
-                else:
-                    raise
+        def process_value(value):
+            value = value.replace('[', '').replace(']', '')
+            if value.startswith('m4_esyscmd(') or value.startswith('m4_esyscmd_s('):
+                cmd = subst_defines(value[value.index('(')+1:-1])
+                try:
+                    if '|' in cmd:
+                        cmd = 'set -o pipefail; ' + cmd
+                    stdout, _ = bb.process.run(cmd, cwd=srctree, shell=True)
+                    ret = stdout.rstrip()
+                except bb.process.ExecutionError as e:
+                    ret = ''
+            elif value.startswith('m4_'):
+                return None
+            ret = subst_defines(value)
+            if ret:
+                ret = ret.strip('"\'')
+            return ret
 
         # Since a configure.ac file is essentially a program, this is only ever going to be
         # a hack unfortunately; but it ought to be enough of an approximation
         if acfile:
             srcfiles = [acfile]
         else:
-            srcfiles = RecipeHandler.checkfiles(srctree, ['configure.ac', 'configure.in'])
+            srcfiles = RecipeHandler.checkfiles(srctree, ['acinclude.m4', 'configure.ac', 'configure.in'])
+
         pcdeps = []
+        libdeps = []
         deps = []
         unmapped = []
-        unmappedlibs = []
-        with open(srcfiles[0], 'r') as f:
-            for line in f:
-                if 'PKG_CHECK_MODULES' in line:
-                    res = pkg_re.search(line)
+
+        RecipeHandler.load_binmap(tinfoil.config_data)
+
+        def process_macro(keyword, value):
+            for handler in handlers:
+                if handler.process_macro(srctree, keyword, value, process_value, libdeps, pcdeps, deps, outlines, inherits, values):
+                    return
+            if keyword == 'PKG_CHECK_MODULES':
+                res = pkg_re.search(value)
+                if res:
+                    res = dep_re.findall(res.group(1))
                     if res:
-                        res = dep_re.findall(res.group(1))
-                        if res:
-                            pcdeps.extend([x[0] for x in res])
-                    inherits.append('pkgconfig')
-                if line.lstrip().startswith('AM_GNU_GETTEXT'):
-                    inherits.append('gettext')
-                elif 'AC_CHECK_PROG' in line or 'AC_PATH_PROG' in line:
-                    res = progs_re.search(line)
+                        pcdeps.extend([x[0] for x in res])
+                inherits.append('pkgconfig')
+            elif keyword == 'PKG_CHECK_EXISTS':
+                res = pkgce_re.search(value)
+                if res:
+                    res = dep_re.findall(res.group(1))
                     if res:
-                        for prog in shlex.split(res.group(1)):
-                            prog = prog.split()[0]
-                            progclass = progclassmap.get(prog, None)
-                            if progclass:
-                                inherits.append(progclass)
-                            else:
-                                progdep = progmap.get(prog, None)
-                                if progdep:
-                                    deps.append(progdep)
-                                else:
-                                    if not prog.startswith('$'):
-                                        unmapped.append(prog)
-                elif 'AC_CHECK_LIB' in line:
-                    res = lib_re.search(line)
-                    if res:
-                        lib = res.group(1)
-                        libdep = recipelibmap.get(lib, None)
-                        if libdep:
-                            deps.append(libdep)
+                        pcdeps.extend([x[0] for x in res])
+                inherits.append('pkgconfig')
+            elif keyword in ('AM_GNU_GETTEXT', 'AM_GLIB_GNU_GETTEXT', 'GETTEXT_PACKAGE'):
+                inherits.append('gettext')
+            elif keyword in ('AC_PROG_INTLTOOL', 'IT_PROG_INTLTOOL'):
+                deps.append('intltool-native')
+            elif keyword == 'AM_PATH_GLIB_2_0':
+                deps.append('glib-2.0')
+            elif keyword in ('AC_CHECK_PROG', 'AC_PATH_PROG', 'AX_WITH_PROG'):
+                res = progs_re.search(value)
+                if res:
+                    for prog in shlex.split(res.group(1)):
+                        prog = prog.split()[0]
+                        for handler in handlers:
+                            if handler.process_prog(srctree, keyword, value, prog, deps, outlines, inherits, values):
+                                return
+                        progclass = progclassmap.get(prog, None)
+                        if progclass:
+                            inherits.append(progclass)
                         else:
-                            if libdep is None:
-                                if not lib.startswith('$'):
-                                    unmappedlibs.append(lib)
-                elif 'AC_PATH_X' in line:
-                    deps.append('libx11')
+                            progdep = RecipeHandler.recipebinmap.get(prog, None)
+                            if not progdep:
+                                progdep = progmap.get(prog, None)
+                            if progdep:
+                                deps.append(progdep)
+                            elif progdep is None:
+                                if not prog.startswith('$'):
+                                    unmapped.append(prog)
+            elif keyword == 'AC_CHECK_LIB':
+                res = lib_re.search(value)
+                if res:
+                    lib = res.group(1)
+                    if not lib.startswith('$'):
+                        libdeps.append(lib)
+            elif keyword == 'AX_CHECK_LIBRARY':
+                res = libx_re.search(value)
+                if res:
+                    lib = res.group(2)
+                    if not lib.startswith('$'):
+                        header = res.group(1)
+                        libdeps.append((lib, header))
+            elif keyword == 'AC_PATH_X':
+                deps.append('libx11')
+            elif keyword in ('AX_BOOST', 'BOOST_REQUIRE'):
+                deps.append('boost')
+            elif keyword in ('AC_PROG_LEX', 'AM_PROG_LEX', 'AX_PROG_FLEX'):
+                deps.append('flex-native')
+            elif keyword in ('AC_PROG_YACC', 'AX_PROG_BISON'):
+                deps.append('bison-native')
+            elif keyword == 'AX_CHECK_ZLIB':
+                deps.append('zlib')
+            elif keyword in ('AX_CHECK_OPENSSL', 'AX_LIB_CRYPTO'):
+                deps.append('openssl')
+            elif keyword == 'AX_LIB_CURL':
+                deps.append('curl')
+            elif keyword == 'AX_LIB_BEECRYPT':
+                deps.append('beecrypt')
+            elif keyword == 'AX_LIB_EXPAT':
+                deps.append('expat')
+            elif keyword == 'AX_LIB_GCRYPT':
+                deps.append('libgcrypt')
+            elif keyword == 'AX_LIB_NETTLE':
+                deps.append('nettle')
+            elif keyword == 'AX_LIB_READLINE':
+                deps.append('readline')
+            elif keyword == 'AX_LIB_SQLITE3':
+                deps.append('sqlite3')
+            elif keyword == 'AX_LIB_TAGLIB':
+                deps.append('taglib')
+            elif keyword == 'AX_PKG_SWIG':
+                deps.append('swig')
+            elif keyword == 'AX_PROG_XSLTPROC':
+                deps.append('libxslt-native')
+            elif keyword == 'AX_WITH_CURSES':
+                deps.append('ncurses')
+            elif keyword == 'AX_PATH_BDB':
+                deps.append('db')
+            elif keyword == 'AX_PATH_LIB_PCRE':
+                deps.append('libpcre')
+            elif keyword == 'AC_INIT':
+                if extravalues is not None:
+                    res = ac_init_re.match(value)
+                    if res:
+                        extravalues['PN'] = process_value(res.group(1))
+                        pv = process_value(res.group(2))
+                        if validate_pv(pv):
+                            extravalues['PV'] = pv
+            elif keyword == 'AM_INIT_AUTOMAKE':
+                if extravalues is not None:
+                    if 'PN' not in extravalues:
+                        res = am_init_re.match(value)
+                        if res:
+                            if res.group(1) != 'AC_PACKAGE_NAME':
+                                extravalues['PN'] = process_value(res.group(1))
+                            pv = process_value(res.group(2))
+                            if validate_pv(pv):
+                                extravalues['PV'] = pv
+            elif keyword == 'define(':
+                res = define_re.match(value)
+                if res:
+                    key = res.group(2).strip('[]')
+                    value = process_value(res.group(3))
+                    if value is not None:
+                        defines[key] = value
+
+        keywords = ['PKG_CHECK_MODULES',
+                    'PKG_CHECK_EXISTS',
+                    'AM_GNU_GETTEXT',
+                    'AM_GLIB_GNU_GETTEXT',
+                    'GETTEXT_PACKAGE',
+                    'AC_PROG_INTLTOOL',
+                    'IT_PROG_INTLTOOL',
+                    'AM_PATH_GLIB_2_0',
+                    'AC_CHECK_PROG',
+                    'AC_PATH_PROG',
+                    'AX_WITH_PROG',
+                    'AC_CHECK_LIB',
+                    'AX_CHECK_LIBRARY',
+                    'AC_PATH_X',
+                    'AX_BOOST',
+                    'BOOST_REQUIRE',
+                    'AC_PROG_LEX',
+                    'AM_PROG_LEX',
+                    'AX_PROG_FLEX',
+                    'AC_PROG_YACC',
+                    'AX_PROG_BISON',
+                    'AX_CHECK_ZLIB',
+                    'AX_CHECK_OPENSSL',
+                    'AX_LIB_CRYPTO',
+                    'AX_LIB_CURL',
+                    'AX_LIB_BEECRYPT',
+                    'AX_LIB_EXPAT',
+                    'AX_LIB_GCRYPT',
+                    'AX_LIB_NETTLE',
+                    'AX_LIB_READLINE'
+                    'AX_LIB_SQLITE3',
+                    'AX_LIB_TAGLIB',
+                    'AX_PKG_SWIG',
+                    'AX_PROG_XSLTPROC',
+                    'AX_WITH_CURSES',
+                    'AX_PATH_BDB',
+                    'AX_PATH_LIB_PCRE',
+                    'AC_INIT',
+                    'AM_INIT_AUTOMAKE',
+                    'define(',
+                    ]
+
+        for handler in handlers:
+            handler.extend_keywords(keywords)
+
+        for srcfile in srcfiles:
+            nesting = 0
+            in_keyword = ''
+            partial = ''
+            with open(srcfile, 'r') as f:
+                for line in f:
+                    if in_keyword:
+                        partial += ' ' + line.strip()
+                        if partial.endswith('\\'):
+                            partial = partial[:-1]
+                        nesting = nesting + line.count('(') - line.count(')')
+                        if nesting == 0:
+                            process_macro(in_keyword, partial)
+                            partial = ''
+                            in_keyword = ''
+                    else:
+                        for keyword in keywords:
+                            if keyword in line:
+                                nesting = line.count('(') - line.count(')')
+                                if nesting > 0:
+                                    partial = line.strip()
+                                    if partial.endswith('\\'):
+                                        partial = partial[:-1]
+                                    in_keyword = keyword
+                                else:
+                                    process_macro(keyword, line.strip())
+                                break
+
+            if in_keyword:
+                process_macro(in_keyword, partial)
+
+        if extravalues:
+            for k,v in extravalues.items():
+                if v:
+                    if v.startswith('$') or v.startswith('@') or v.startswith('%'):
+                        del extravalues[k]
+                    else:
+                        extravalues[k] = v.strip('"\'').rstrip('()')
 
         if unmapped:
-            outlines.append('# NOTE: the following prog dependencies are unknown, ignoring: %s' % ' '.join(unmapped))
+            outlines.append('# NOTE: the following prog dependencies are unknown, ignoring: %s' % ' '.join(list(set(unmapped))))
 
-        if unmappedlibs:
-            outlines.append('# NOTE: the following library dependencies are unknown, ignoring: %s' % ' '.join(unmappedlibs))
-            outlines.append('#       (this is based on recipes that have previously been built and packaged)')
+        RecipeHandler.handle_depends(libdeps, pcdeps, deps, outlines, values, tinfoil.config_data)
 
-        recipemap = read_pkgconfig_provides(tinfoil.config_data)
-        unmapped = []
-        for pcdep in pcdeps:
-            recipe = recipemap.get(pcdep, None)
-            if recipe:
-                deps.append(recipe)
-            else:
-                if not pcdep.startswith('$'):
-                    unmapped.append(pcdep)
-
-        deps = set(deps).difference(set(ignoredeps))
-
-        if unmapped:
-            outlines.append('# NOTE: unable to map the following pkg-config dependencies: %s' % ' '.join(unmapped))
-            outlines.append('#       (this is based on recipes that have previously been built and packaged)')
-
-        if deps:
-            values['DEPENDS'] = ' '.join(deps)
+        for handler in handlers:
+            handler.post_process(srctree, libdeps, pcdeps, deps, outlines, inherits, values)
 
         if inherits:
             values['inherit'] = ' '.join(list(set(inherits)))
@@ -239,8 +703,37 @@
         return values
 
 
+class AutotoolsExtensionHandler(object):
+    '''Base class for Autotools extension handlers'''
+    def process_macro(self, srctree, keyword, value, process_value, libdeps, pcdeps, deps, outlines, inherits, values):
+        '''
+        Handle a macro parsed out of an autotools file. Note that if you want this to be called
+        for any macro other than the ones AutotoolsRecipeHandler already looks for, you'll need
+        to add it to the keywords list in extend_keywords().
+        Return True if you've completely handled the passed in macro, otherwise return False.
+        '''
+        return False
+
+    def extend_keywords(self, keywords):
+        '''Adds keywords to be recognised by the parser (so that you get a call to process_macro)'''
+        return
+
+    def process_prog(self, srctree, keyword, value, prog, deps, outlines, inherits, values):
+        '''
+        Handle an AC_PATH_PROG, AC_CHECK_PROG etc. line
+        Return True if you've completely handled the passed in macro, otherwise return False.
+        '''
+        return False
+
+    def post_process(self, srctree, fn, pkg, deps, outlines, inherits, values):
+        '''
+        Apply any desired post-processing on the output
+        '''
+        return
+
+
 class MakefileRecipeHandler(RecipeHandler):
-    def process(self, srctree, classes, lines_before, lines_after, handled):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
         if 'buildsystem' in handled:
             return False
 
@@ -307,10 +800,60 @@
             self.genfunction(lines_after, 'do_install', ['# Specify install commands here'])
 
 
+class VersionFileRecipeHandler(RecipeHandler):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
+        if 'PV' not in extravalues:
+            # Look for a VERSION or version file containing a single line consisting
+            # only of a version number
+            filelist = RecipeHandler.checkfiles(srctree, ['VERSION', 'version'])
+            version = None
+            for fileitem in filelist:
+                linecount = 0
+                with open(fileitem, 'r') as f:
+                    for line in f:
+                        line = line.rstrip().strip('"\'')
+                        linecount += 1
+                        if line:
+                            if linecount > 1:
+                                version = None
+                                break
+                            else:
+                                if validate_pv(line):
+                                    version = line
+                if version:
+                    extravalues['PV'] = version
+                    break
+
+
+class SpecFileRecipeHandler(RecipeHandler):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
+        if 'PV' in extravalues and 'PN' in extravalues:
+            return
+        filelist = RecipeHandler.checkfiles(srctree, ['*.spec'], recursive=True)
+        pn = None
+        pv = None
+        for fileitem in filelist:
+            linecount = 0
+            with open(fileitem, 'r') as f:
+                for line in f:
+                    if line.startswith('Name:') and not pn:
+                        pn = line.split(':')[1].strip()
+                    if line.startswith('Version:') and not pv:
+                        pv = line.split(':')[1].strip()
+            if pv or pn:
+                if pv and not 'PV' in extravalues and validate_pv(pv):
+                    extravalues['PV'] = pv
+                if pn and not 'PN' in extravalues:
+                    extravalues['PN'] = pn
+                break
+
 def register_recipe_handlers(handlers):
-    # These are in a specific order so that the right one is detected first
-    handlers.append(CmakeRecipeHandler())
-    handlers.append(AutotoolsRecipeHandler())
-    handlers.append(SconsRecipeHandler())
-    handlers.append(QmakeRecipeHandler())
-    handlers.append(MakefileRecipeHandler())
+    # Set priorities with some gaps so that other plugins can insert
+    # their own handlers (so avoid changing these numbers)
+    handlers.append((CmakeRecipeHandler(), 50))
+    handlers.append((AutotoolsRecipeHandler(), 40))
+    handlers.append((SconsRecipeHandler(), 30))
+    handlers.append((QmakeRecipeHandler(), 20))
+    handlers.append((MakefileRecipeHandler(), 10))
+    handlers.append((VersionFileRecipeHandler(), -1))
+    handlers.append((SpecFileRecipeHandler(), -1))
diff --git a/yocto-poky/scripts/lib/recipetool/create_buildsys_python.py b/yocto-poky/scripts/lib/recipetool/create_buildsys_python.py
index e0af2a0..c382330 100644
--- a/yocto-poky/scripts/lib/recipetool/create_buildsys_python.py
+++ b/yocto-poky/scripts/lib/recipetool/create_buildsys_python.py
@@ -159,7 +159,7 @@
     def __init__(self):
         pass
 
-    def process(self, srctree, classes, lines_before, lines_after, handled):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
         if 'buildsystem' in handled:
             return False
 
@@ -278,7 +278,10 @@
             for k in sorted(bbinfo):
                 v = bbinfo[k]
                 mdinfo.append('{} = "{}"'.format(k, v))
-            lines_before[src_uri_line-1:src_uri_line-1] = mdinfo
+            if src_uri_line:
+                lines_before[src_uri_line-1:src_uri_line-1] = mdinfo
+            else:
+                lines_before.extend(mdinfo)
 
         mapped_deps, unmapped_deps = self.scan_setup_python_deps(srctree, setup_info, setup_non_literals)
 
@@ -713,4 +716,4 @@
 
 def register_recipe_handlers(handlers):
     # We need to make sure this is ahead of the makefile fallback handler
-    handlers.insert(0, PythonRecipeHandler())
+    handlers.append((PythonRecipeHandler(), 70))
diff --git a/yocto-poky/scripts/lib/recipetool/create_kernel.py b/yocto-poky/scripts/lib/recipetool/create_kernel.py
new file mode 100644
index 0000000..c6e86bd
--- /dev/null
+++ b/yocto-poky/scripts/lib/recipetool/create_kernel.py
@@ -0,0 +1,99 @@
+# Recipe creation tool - kernel support plugin
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# 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.
+
+import re
+import logging
+from recipetool.create import RecipeHandler, read_pkgconfig_provides, validate_pv
+
+logger = logging.getLogger('recipetool')
+
+tinfoil = None
+
+def tinfoil_init(instance):
+    global tinfoil
+    tinfoil = instance
+
+
+class KernelRecipeHandler(RecipeHandler):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
+        import bb.process
+        if 'buildsystem' in handled:
+            return False
+
+        for tell in ['arch', 'firmware', 'Kbuild', 'Kconfig']:
+            if not os.path.exists(os.path.join(srctree, tell)):
+                return False
+
+        handled.append('buildsystem')
+        del lines_after[:]
+        del classes[:]
+        template = os.path.join(tinfoil.config_data.getVar('COREBASE', True), 'meta-skeleton', 'recipes-kernel', 'linux', 'linux-yocto-custom.bb')
+        def handle_var(varname, origvalue, op, newlines):
+            if varname in ['SRCREV', 'SRCREV_machine']:
+                while newlines[-1].startswith('#'):
+                    del newlines[-1]
+                try:
+                    stdout, _ = bb.process.run('git rev-parse HEAD', cwd=srctree, shell=True)
+                except bb.process.ExecutionError as e:
+                    stdout = None
+                if stdout:
+                    return stdout.strip(), op, 0, True
+            elif varname == 'LINUX_VERSION':
+                makefile = os.path.join(srctree, 'Makefile')
+                if os.path.exists(makefile):
+                    kversion = -1
+                    kpatchlevel = -1
+                    ksublevel = -1
+                    kextraversion = ''
+                    with open(makefile, 'r') as f:
+                        for i, line in enumerate(f):
+                            if i > 10:
+                                break
+                            if line.startswith('VERSION ='):
+                                kversion = int(line.split('=')[1].strip())
+                            elif line.startswith('PATCHLEVEL ='):
+                                kpatchlevel = int(line.split('=')[1].strip())
+                            elif line.startswith('SUBLEVEL ='):
+                                ksublevel = int(line.split('=')[1].strip())
+                            elif line.startswith('EXTRAVERSION ='):
+                                kextraversion = line.split('=')[1].strip()
+                    version = ''
+                    if kversion > -1 and kpatchlevel > -1:
+                        version = '%d.%d' % (kversion, kpatchlevel)
+                        if ksublevel > -1:
+                            version += '.%d' % ksublevel
+                        version += kextraversion
+                    if version:
+                        return version, op, 0, True
+            elif varname == 'SRC_URI':
+                while newlines[-1].startswith('#'):
+                    del newlines[-1]
+            elif varname == 'COMPATIBLE_MACHINE':
+                while newlines[-1].startswith('#'):
+                    del newlines[-1]
+                machine = tinfoil.config_data.getVar('MACHINE', True)
+                return machine, op, 0, True
+            return origvalue, op, 0, True
+        with open(template, 'r') as f:
+            varlist = ['SRCREV', 'SRCREV_machine', 'SRC_URI', 'LINUX_VERSION', 'COMPATIBLE_MACHINE']
+            (_, newlines) = bb.utils.edit_metadata(f, varlist, handle_var)
+        lines_before[:] = [line.rstrip('\n') for line in newlines]
+
+        return True
+
+def register_recipe_handlers(handlers):
+    handlers.append((KernelRecipeHandler(), 100))
diff --git a/yocto-poky/scripts/lib/recipetool/create_kmod.py b/yocto-poky/scripts/lib/recipetool/create_kmod.py
new file mode 100644
index 0000000..fe39edb
--- /dev/null
+++ b/yocto-poky/scripts/lib/recipetool/create_kmod.py
@@ -0,0 +1,152 @@
+# Recipe creation tool - kernel module support plugin
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# 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.
+
+import re
+import logging
+from recipetool.create import RecipeHandler, read_pkgconfig_provides, validate_pv
+
+logger = logging.getLogger('recipetool')
+
+tinfoil = None
+
+def tinfoil_init(instance):
+    global tinfoil
+    tinfoil = instance
+
+
+class KernelModuleRecipeHandler(RecipeHandler):
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
+        import bb.process
+        if 'buildsystem' in handled:
+            return False
+
+        module_inc_re = re.compile(r'^#include\s+<linux/module.h>$')
+        makefiles = []
+        is_module = False
+
+        makefiles = []
+
+        files = RecipeHandler.checkfiles(srctree, ['*.c', '*.h'], recursive=True)
+        if files:
+            for cfile in files:
+                # Look in same dir or parent for Makefile
+                for makefile in [os.path.join(os.path.dirname(cfile), 'Makefile'), os.path.join(os.path.dirname(os.path.dirname(cfile)), 'Makefile')]:
+                    if makefile in makefiles:
+                        break
+                    else:
+                        if os.path.exists(makefile):
+                            makefiles.append(makefile)
+                            break
+                else:
+                    continue
+                with open(cfile, 'r') as f:
+                    for line in f:
+                        if module_inc_re.match(line.strip()):
+                            is_module = True
+                            break
+                if is_module:
+                    break
+
+        if is_module:
+            classes.append('module')
+            handled.append('buildsystem')
+            # module.bbclass and the classes it inherits do most of the hard
+            # work, but we need to tweak it slightly depending on what the
+            # Makefile does (and there is a range of those)
+            # Check the makefile for the appropriate install target
+            install_lines = []
+            compile_lines = []
+            in_install = False
+            in_compile = False
+            install_target = None
+            with open(makefile, 'r') as f:
+                for line in f:
+                    if line.startswith('install:'):
+                        if not install_lines:
+                            in_install = True
+                            install_target = 'install'
+                    elif line.startswith('modules_install:'):
+                        install_lines = []
+                        in_install = True
+                        install_target = 'modules_install'
+                    elif line.startswith('modules:'):
+                        compile_lines = []
+                        in_compile = True
+                    elif line.startswith(('all:', 'default:')):
+                        if not compile_lines:
+                            in_compile = True
+                    elif line:
+                        if line[0] == '\t':
+                            if in_install:
+                                install_lines.append(line)
+                            elif in_compile:
+                                compile_lines.append(line)
+                        elif ':' in line:
+                            in_install = False
+                            in_compile = False
+
+            def check_target(lines, install):
+                kdirpath = ''
+                manual_install = False
+                for line in lines:
+                    splitline = line.split()
+                    if splitline[0] in ['make', 'gmake', '$(MAKE)']:
+                        if '-C' in splitline:
+                            idx = splitline.index('-C') + 1
+                            if idx < len(splitline):
+                                kdirpath = splitline[idx]
+                                break
+                    elif install and splitline[0] == 'install':
+                        if '.ko' in line:
+                            manual_install = True
+                return kdirpath, manual_install
+
+            kdirpath = None
+            manual_install = False
+            if install_lines:
+                kdirpath, manual_install = check_target(install_lines, install=True)
+            if compile_lines and not kdirpath:
+                kdirpath, _ = check_target(compile_lines, install=False)
+
+            if manual_install or not install_lines:
+                lines_after.append('EXTRA_OEMAKE_append_task-install = " -C ${STAGING_KERNEL_DIR} M=${S}"')
+            elif install_target and install_target != 'modules_install':
+                lines_after.append('MODULES_INSTALL_TARGET = "install"')
+
+            warnmsg = None
+            kdirvar = None
+            if kdirpath:
+                res = re.match(r'\$\(([^$)]+)\)', kdirpath)
+                if res:
+                    kdirvar = res.group(1)
+                    if kdirvar != 'KERNEL_SRC':
+                        lines_after.append('EXTRA_OEMAKE += "%s=${STAGING_KERNEL_DIR}"' % kdirvar)
+                elif kdirpath.startswith('/lib/'):
+                    warnmsg = 'Kernel path in install makefile is hardcoded - you will need to patch the makefile'
+            if not kdirvar and not warnmsg:
+                warnmsg = 'Unable to find means of passing kernel path into install makefile - if kernel path is hardcoded you will need to patch the makefile'
+            if warnmsg:
+                warnmsg += '. Note that the variable KERNEL_SRC will be passed in as the kernel source path.'
+                logger.warn(warnmsg)
+                lines_after.append('# %s' % warnmsg)
+
+            return True
+
+        return False
+
+def register_recipe_handlers(handlers):
+    handlers.append((KernelModuleRecipeHandler(), 15))
diff --git a/yocto-poky/scripts/lib/recipetool/create_npm.py b/yocto-poky/scripts/lib/recipetool/create_npm.py
new file mode 100644
index 0000000..b3ffcdb
--- /dev/null
+++ b/yocto-poky/scripts/lib/recipetool/create_npm.py
@@ -0,0 +1,156 @@
+# Recipe creation tool - node.js NPM module support plugin
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# 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.
+
+import os
+import logging
+import subprocess
+import tempfile
+import shutil
+import json
+from recipetool.create import RecipeHandler, split_pkg_licenses
+
+logger = logging.getLogger('recipetool')
+
+
+tinfoil = None
+
+def tinfoil_init(instance):
+    global tinfoil
+    tinfoil = instance
+
+
+class NpmRecipeHandler(RecipeHandler):
+    lockdownpath = None
+
+    def _handle_license(self, data):
+        '''
+        Handle the license value from an npm package.json file
+        '''
+        license = None
+        if 'license' in data:
+            license = data['license']
+            if isinstance(license, dict):
+                license = license.get('type', None)
+        return None
+
+    def _shrinkwrap(self, srctree, localfilesdir, extravalues, lines_before):
+        try:
+            runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH', True))
+            bb.process.run('npm shrinkwrap', cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True)
+        except bb.process.ExecutionError as e:
+            logger.warn('npm shrinkwrap failed:\n%s' % e.stdout)
+            return
+
+        tmpfile = os.path.join(localfilesdir, 'npm-shrinkwrap.json')
+        shutil.move(os.path.join(srctree, 'npm-shrinkwrap.json'), tmpfile)
+        extravalues.setdefault('extrafiles', {})
+        extravalues['extrafiles']['npm-shrinkwrap.json'] = tmpfile
+        lines_before.append('NPM_SHRINKWRAP := "${THISDIR}/${PN}/npm-shrinkwrap.json"')
+
+    def _lockdown(self, srctree, localfilesdir, extravalues, lines_before):
+        runenv = dict(os.environ, PATH=tinfoil.config_data.getVar('PATH', True))
+        if not NpmRecipeHandler.lockdownpath:
+            NpmRecipeHandler.lockdownpath = tempfile.mkdtemp('recipetool-npm-lockdown')
+            bb.process.run('npm install lockdown --prefix %s' % NpmRecipeHandler.lockdownpath,
+                           cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True)
+        relockbin = os.path.join(NpmRecipeHandler.lockdownpath, 'node_modules', 'lockdown', 'relock.js')
+        if not os.path.exists(relockbin):
+            logger.warn('Could not find relock.js within lockdown directory; skipping lockdown')
+            return
+        try:
+            bb.process.run('node %s' % relockbin, cwd=srctree, stderr=subprocess.STDOUT, env=runenv, shell=True)
+        except bb.process.ExecutionError as e:
+            logger.warn('lockdown-relock failed:\n%s' % e.stdout)
+            return
+
+        tmpfile = os.path.join(localfilesdir, 'lockdown.json')
+        shutil.move(os.path.join(srctree, 'lockdown.json'), tmpfile)
+        extravalues.setdefault('extrafiles', {})
+        extravalues['extrafiles']['lockdown.json'] = tmpfile
+        lines_before.append('NPM_LOCKDOWN := "${THISDIR}/${PN}/lockdown.json"')
+
+    def process(self, srctree, classes, lines_before, lines_after, handled, extravalues):
+        import bb.utils
+        import oe
+        from collections import OrderedDict
+
+        if 'buildsystem' in handled:
+            return False
+
+        def read_package_json(fn):
+            with open(fn, 'r') as f:
+                return json.loads(f.read())
+
+        files = RecipeHandler.checkfiles(srctree, ['package.json'])
+        if files:
+            data = read_package_json(files[0])
+            if 'name' in data and 'version' in data:
+                extravalues['PN'] = data['name']
+                extravalues['PV'] = data['version']
+                classes.append('npm')
+                handled.append('buildsystem')
+                if 'description' in data:
+                    lines_before.append('SUMMARY = "%s"' % data['description'])
+                if 'homepage' in data:
+                    lines_before.append('HOMEPAGE = "%s"' % data['homepage'])
+
+                # Shrinkwrap
+                localfilesdir = tempfile.mkdtemp(prefix='recipetool-npm')
+                self._shrinkwrap(srctree, localfilesdir, extravalues, lines_before)
+
+                # Lockdown
+                self._lockdown(srctree, localfilesdir, extravalues, lines_before)
+
+                # Split each npm module out to is own package
+                npmpackages = oe.package.npm_split_package_dirs(srctree)
+                for item in handled:
+                    if isinstance(item, tuple):
+                        if item[0] == 'license':
+                            licvalues = item[1]
+                            break
+                if licvalues:
+                    # Augment the license list with information we have in the packages
+                    licenses = {}
+                    license = self._handle_license(data)
+                    if license:
+                        licenses['${PN}'] = license
+                    for pkgname, pkgitem in npmpackages.iteritems():
+                        _, pdata = pkgitem
+                        license = self._handle_license(pdata)
+                        if license:
+                            licenses[pkgname] = license
+                    # Now write out the package-specific license values
+                    # We need to strip out the json data dicts for this since split_pkg_licenses
+                    # isn't expecting it
+                    packages = OrderedDict((x,y[0]) for x,y in npmpackages.iteritems())
+                    packages['${PN}'] = ''
+                    pkglicenses = split_pkg_licenses(licvalues, packages, lines_after, licenses)
+                    all_licenses = list(set([item for pkglicense in pkglicenses.values() for item in pkglicense]))
+                    # Go back and update the LICENSE value since we have a bit more
+                    # information than when that was written out (and we know all apply
+                    # vs. there being a choice, so we can join them with &)
+                    for i, line in enumerate(lines_before):
+                        if line.startswith('LICENSE = '):
+                            lines_before[i] = 'LICENSE = "%s"' % ' & '.join(all_licenses)
+                            break
+
+                return True
+
+        return False
+
+def register_recipe_handlers(handlers):
+    handlers.append((NpmRecipeHandler(), 60))
diff --git a/yocto-poky/scripts/lib/recipetool/newappend.py b/yocto-poky/scripts/lib/recipetool/newappend.py
index 77b74cb..bdf0693 100644
--- a/yocto-poky/scripts/lib/recipetool/newappend.py
+++ b/yocto-poky/scripts/lib/recipetool/newappend.py
@@ -25,18 +25,15 @@
 import logging
 import os
 import re
+import subprocess
 import sys
+import scriptutils
 
 
 logger = logging.getLogger('recipetool')
 tinfoil = None
 
 
-def plugin_init(pluginlist):
-    # Don't need to do anything here right now, but plugins must have this function defined
-    pass
-
-
 def tinfoil_init(instance):
     global tinfoil
     tinfoil = instance
@@ -94,17 +91,21 @@
         bb.utils.mkdirhier(os.path.dirname(append_path))
 
         try:
-            open(append_path, 'a')
+            open(append_path, 'a').close()
         except (OSError, IOError) as exc:
             logger.critical(str(exc))
             return 1
 
-    print(append_path)
+    if args.edit:
+        return scriptutils.run_editor([append_path, recipe_path])
+    else:
+        print(append_path)
 
 
-def register_command(subparsers):
+def register_commands(subparsers):
     parser = subparsers.add_parser('newappend',
                                    help='Create a bbappend for the specified target in the specified layer')
+    parser.add_argument('-e', '--edit', help='Edit the new append. This obeys $VISUAL if set, otherwise $EDITOR, otherwise vi.', action='store_true')
     parser.add_argument('-w', '--wildcard-version', help='Use wildcard to make the bbappend apply to any recipe version', action='store_true')
     parser.add_argument('destlayer', help='Base directory of the destination layer to write the bbappend to', type=layer)
     parser.add_argument('target', help='Target recipe/provide to append')
diff --git a/yocto-poky/scripts/lib/recipetool/setvar.py b/yocto-poky/scripts/lib/recipetool/setvar.py
new file mode 100644
index 0000000..657d2b6
--- /dev/null
+++ b/yocto-poky/scripts/lib/recipetool/setvar.py
@@ -0,0 +1,75 @@
+# Recipe creation tool - set variable plugin
+#
+# Copyright (C) 2015 Intel Corporation
+#
+# 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.
+
+import sys
+import os
+import argparse
+import glob
+import fnmatch
+import re
+import logging
+import scriptutils
+
+logger = logging.getLogger('recipetool')
+
+tinfoil = None
+plugins = None
+
+def tinfoil_init(instance):
+    global tinfoil
+    tinfoil = instance
+
+def setvar(args):
+    import oe.recipeutils
+
+    if args.delete:
+        if args.value:
+            logger.error('-D/--delete and specifying a value are mutually exclusive')
+            return 1
+        value = None
+    else:
+        if args.value is None:
+            logger.error('You must specify a value if not using -D/--delete')
+            return 1
+        value = args.value
+    varvalues = {args.varname: value}
+
+    if args.recipe_only:
+        patches = [oe.recipeutils.patch_recipe_file(args.recipefile, varvalues, patch=args.patch)]
+    else:
+        rd = oe.recipeutils.parse_recipe(args.recipefile, None, tinfoil.config_data)
+        if not rd:
+            return 1
+        patches = oe.recipeutils.patch_recipe(rd, args.recipefile, varvalues, patch=args.patch)
+    if args.patch:
+        for patch in patches:
+            for line in patch:
+                sys.stdout.write(line)
+    return 0
+
+
+def register_commands(subparsers):
+    parser_setvar = subparsers.add_parser('setvar',
+                                          help='Set a variable within a recipe',
+                                          description='Adds/updates the value a variable is set to in a recipe')
+    parser_setvar.add_argument('recipefile', help='Recipe file to update')
+    parser_setvar.add_argument('varname', help='Variable name to set')
+    parser_setvar.add_argument('value', nargs='?', help='New value to set the variable to')
+    parser_setvar.add_argument('--recipe-only', '-r', help='Do not set variable in any include file if present', action='store_true')
+    parser_setvar.add_argument('--patch', '-p', help='Create a patch to make the change instead of modifying the recipe', action='store_true')
+    parser_setvar.add_argument('--delete', '-D', help='Delete the specified value instead of setting it', action='store_true')
+    parser_setvar.set_defaults(func=setvar)
diff --git a/yocto-poky/scripts/lib/scriptutils.py b/yocto-poky/scripts/lib/scriptutils.py
index e79a195..aef19d3 100644
--- a/yocto-poky/scripts/lib/scriptutils.py
+++ b/yocto-poky/scripts/lib/scriptutils.py
@@ -19,6 +19,8 @@
 import os
 import logging
 import glob
+import argparse
+import subprocess
 
 def logger_create(name):
     logger = logging.getLogger(name)
@@ -100,3 +102,17 @@
         os.chdir(olddir)
     return ret
 
+def run_editor(fn):
+    if isinstance(fn, basestring):
+        params = '"%s"' % fn
+    else:
+        params = ''
+        for fnitem in fn:
+            params += ' "%s"' % fnitem
+
+    editor = os.getenv('VISUAL', os.getenv('EDITOR', 'vi'))
+    try:
+        return subprocess.check_call('%s %s' % (editor, params), shell=True)
+    except OSError as exc:
+        logger.error("Execution of editor '%s' failed: %s", editor, exc)
+        return 1
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/base.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/base.py
deleted file mode 100644
index e6c8f56..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/base.py
+++ /dev/null
@@ -1,466 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2006, 2007, 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-"""
-Base classes for creating commands and syntax version object.
-
-This module exports several important base classes:
-
-    BaseData - The base abstract class for all data objects.  Data objects
-               are contained within a BaseHandler object.
-
-    BaseHandler - The base abstract class from which versioned kickstart
-                  handler are derived.  Subclasses of BaseHandler hold
-                  BaseData and KickstartCommand objects.
-
-    DeprecatedCommand - An abstract subclass of KickstartCommand that should
-                        be further subclassed by users of this module.  When
-                        a subclass is used, a warning message will be
-                        printed.
-
-    KickstartCommand - The base abstract class for all kickstart commands.
-                       Command objects are contained within a BaseHandler
-                       object.
-"""
-import gettext
-gettext.textdomain("pykickstart")
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-import types
-import warnings
-from pykickstart.errors import *
-from pykickstart.ko import *
-from pykickstart.parser import Packages
-from pykickstart.version import versionToString
-
-###
-### COMMANDS
-###
-class KickstartCommand(KickstartObject):
-    """The base class for all kickstart commands.  This is an abstract class."""
-    removedKeywords = []
-    removedAttrs = []
-
-    def __init__(self, writePriority=0, *args, **kwargs):
-        """Create a new KickstartCommand instance.  This method must be
-           provided by all subclasses, but subclasses must call
-           KickstartCommand.__init__ first.  Instance attributes:
-
-           currentCmd    -- The name of the command in the input file that
-                            caused this handler to be run.
-           currentLine   -- The current unprocessed line from the input file
-                            that caused this handler to be run.
-           handler       -- A reference to the BaseHandler subclass this
-                            command is contained withing.  This is needed to
-                            allow referencing of Data objects.
-           lineno        -- The current line number in the input file.
-           writePriority -- An integer specifying when this command should be
-                            printed when iterating over all commands' __str__
-                            methods.  The higher the number, the later this
-                            command will be written.  All commands with the
-                            same priority will be written alphabetically.
-        """
-
-        # We don't want people using this class by itself.
-        if self.__class__ is KickstartCommand:
-            raise TypeError, "KickstartCommand is an abstract class."
-
-        KickstartObject.__init__(self, *args, **kwargs)
-
-        self.writePriority = writePriority
-
-        # These will be set by the dispatcher.
-        self.currentCmd = ""
-        self.currentLine = ""
-        self.handler = None
-        self.lineno = 0
-
-        # If a subclass provides a removedKeywords list, remove all the
-        # members from the kwargs list before we start processing it.  This
-        # ensures that subclasses don't continue to recognize arguments that
-        # were removed.
-        for arg in filter(kwargs.has_key, self.removedKeywords):
-            kwargs.pop(arg)
-
-    def __call__(self, *args, **kwargs):
-        """Set multiple attributes on a subclass of KickstartCommand at once
-           via keyword arguments.  Valid attributes are anything specified in
-           a subclass, but unknown attributes will be ignored.
-        """
-        for (key, val) in kwargs.items():
-            # Ignore setting attributes that were removed in a subclass, as
-            # if they were unknown attributes.
-            if key in self.removedAttrs:
-                continue
-
-            if hasattr(self, key):
-                setattr(self, key, val)
-
-    def __str__(self):
-        """Return a string formatted for output to a kickstart file.  This
-           method must be provided by all subclasses.
-        """
-        return KickstartObject.__str__(self)
-
-    def parse(self, args):
-        """Parse the list of args and set data on the KickstartCommand object.
-           This method must be provided by all subclasses.
-        """
-        raise TypeError, "parse() not implemented for KickstartCommand"
-
-    def apply(self, instroot="/"):
-        """Write out the configuration related to the KickstartCommand object.
-           Subclasses which do not provide this method will not have their
-           configuration written out.
-        """
-        return
-
-    def dataList(self):
-        """For commands that can occur multiple times in a single kickstart
-           file (like network, part, etc.), return the list that we should
-           append more data objects to.
-        """
-        return None
-
-    def deleteRemovedAttrs(self):
-        """Remove all attributes from self that are given in the removedAttrs
-           list.  This method should be called from __init__ in a subclass,
-           but only after the superclass's __init__ method has been called.
-        """
-        for attr in filter(lambda k: hasattr(self, k), self.removedAttrs):
-            delattr(self, attr)
-
-    # Set the contents of the opts object (an instance of optparse.Values
-    # returned by parse_args) as attributes on the KickstartCommand object.
-    # It's useful to call this from KickstartCommand subclasses after parsing
-    # the arguments.
-    def _setToSelf(self, optParser, opts):
-        self._setToObj(optParser, opts, self)
-
-    # Sets the contents of the opts object (an instance of optparse.Values
-    # returned by parse_args) as attributes on the provided object obj.  It's
-    # useful to call this from KickstartCommand subclasses that handle lists
-    # of objects (like partitions, network devices, etc.) and need to populate
-    # a Data object.
-    def _setToObj(self, optParser, opts, obj):
-        for key in filter (lambda k: getattr(opts, k) != None, optParser.keys()):
-            setattr(obj, key, getattr(opts, key))
-
-class DeprecatedCommand(KickstartCommand):
-    """Specify that a command is deprecated and no longer has any function.
-       Any command that is deprecated should be subclassed from this class,
-       only specifying an __init__ method that calls the superclass's __init__.
-       This is an abstract class.
-    """
-    def __init__(self, writePriority=None, *args, **kwargs):
-        # We don't want people using this class by itself.
-        if self.__class__ is KickstartCommand:
-            raise TypeError, "DeprecatedCommand is an abstract class."
-
-        # Create a new DeprecatedCommand instance.
-        KickstartCommand.__init__(self, writePriority, *args, **kwargs)
-
-    def __str__(self):
-        """Placeholder since DeprecatedCommands don't work anymore."""
-        return ""
-
-    def parse(self, args):
-        """Print a warning message if the command is seen in the input file."""
-        mapping = {"lineno": self.lineno, "cmd": self.currentCmd}
-        warnings.warn(_("Ignoring deprecated command on line %(lineno)s:  The %(cmd)s command has been deprecated and no longer has any effect.  It may be removed from future releases, which will result in a fatal error from kickstart.  Please modify your kickstart file to remove this command.") % mapping, DeprecationWarning)
-
-
-###
-### HANDLERS
-###
-class BaseHandler(KickstartObject):
-    """Each version of kickstart syntax is provided by a subclass of this
-       class.  These subclasses are what users will interact with for parsing,
-       extracting data, and writing out kickstart files.  This is an abstract
-       class.
-
-       version -- The version this syntax handler supports.  This is set by
-                  a class attribute of a BaseHandler subclass and is used to
-                  set up the command dict.  It is for read-only use.
-    """
-    version = None
-
-    def __init__(self, mapping=None, dataMapping=None, commandUpdates=None,
-                 dataUpdates=None, *args, **kwargs):
-        """Create a new BaseHandler instance.  This method must be provided by
-           all subclasses, but subclasses must call BaseHandler.__init__ first.
-
-           mapping          -- A custom map from command strings to classes,
-                               useful when creating your own handler with
-                               special command objects.  It is otherwise unused
-                               and rarely needed.  If you give this argument,
-                               the mapping takes the place of the default one
-                               and so must include all commands you want
-                               recognized.
-           dataMapping      -- This is the same as mapping, but for data
-                               objects.  All the same comments apply.
-           commandUpdates   -- This is similar to mapping, but does not take
-                               the place of the defaults entirely.  Instead,
-                               this mapping is applied after the defaults and
-                               updates it with just the commands you want to
-                               modify.
-           dataUpdates      -- This is the same as commandUpdates, but for
-                               data objects.
-
-
-           Instance attributes:
-
-           commands -- A mapping from a string command to a KickstartCommand
-                       subclass object that handles it.  Multiple strings can
-                       map to the same object, but only one instance of the
-                       command object should ever exist.  Most users should
-                       never have to deal with this directly, as it is
-                       manipulated internally and called through dispatcher.
-           currentLine -- The current unprocessed line from the input file
-                          that caused this handler to be run.
-           packages -- An instance of pykickstart.parser.Packages which
-                       describes the packages section of the input file.
-           platform -- A string describing the hardware platform, which is
-                       needed only by system-config-kickstart.
-           scripts  -- A list of pykickstart.parser.Script instances, which is
-                       populated by KickstartParser.addScript and describes the
-                       %pre/%post/%traceback script section of the input file.
-        """
-
-        # We don't want people using this class by itself.
-        if self.__class__ is BaseHandler:
-            raise TypeError, "BaseHandler is an abstract class."
-
-        KickstartObject.__init__(self, *args, **kwargs)
-
-        # This isn't really a good place for these, but it's better than
-        # everything else I can think of.
-        self.scripts = []
-        self.packages = Packages()
-        self.platform = ""
-
-        # These will be set by the dispatcher.
-        self.commands = {}
-        self.currentLine = 0
-
-        # A dict keyed by an integer priority number, with each value being a
-        # list of KickstartCommand subclasses.  This dict is maintained by
-        # registerCommand and used in __str__.  No one else should be touching
-        # it.
-        self._writeOrder = {}
-
-        self._registerCommands(mapping, dataMapping, commandUpdates, dataUpdates)
-
-    def __str__(self):
-        """Return a string formatted for output to a kickstart file."""
-        retval = ""
-
-        if self.platform != "":
-            retval += "#platform=%s\n" % self.platform
-
-        retval += "#version=%s\n" % versionToString(self.version)
-
-        lst = self._writeOrder.keys()
-        lst.sort()
-
-        for prio in lst:
-            for obj in self._writeOrder[prio]:
-                retval += obj.__str__()
-
-        for script in self.scripts:
-            retval += script.__str__()
-
-        retval += self.packages.__str__()
-
-        return retval
-
-    def _insertSorted(self, lst, obj):
-        length = len(lst)
-        i = 0
-
-        while i < length:
-            # If the two classes have the same name, it's because we are
-            # overriding an existing class with one from a later kickstart
-            # version, so remove the old one in favor of the new one.
-            if obj.__class__.__name__ > lst[i].__class__.__name__:
-                i += 1
-            elif obj.__class__.__name__ == lst[i].__class__.__name__:
-                lst[i] = obj
-                return
-            elif obj.__class__.__name__ < lst[i].__class__.__name__:
-                break
-
-        if i >= length:
-            lst.append(obj)
-        else:
-            lst.insert(i, obj)
-
-    def _setCommand(self, cmdObj):
-        # Add an attribute on this version object.  We need this to provide a
-        # way for clients to access the command objects.  We also need to strip
-        # off the version part from the front of the name.
-        if cmdObj.__class__.__name__.find("_") != -1:
-            name = unicode(cmdObj.__class__.__name__.split("_", 1)[1])
-        else:
-            name = unicode(cmdObj.__class__.__name__).lower()
-
-        setattr(self, name.lower(), cmdObj)
-
-        # Also, add the object into the _writeOrder dict in the right place.
-        if cmdObj.writePriority is not None:
-            if self._writeOrder.has_key(cmdObj.writePriority):
-                self._insertSorted(self._writeOrder[cmdObj.writePriority], cmdObj)
-            else:
-                self._writeOrder[cmdObj.writePriority] = [cmdObj]
-
-    def _registerCommands(self, mapping=None, dataMapping=None, commandUpdates=None,
-                          dataUpdates=None):
-        if mapping == {} or mapping == None:
-            from pykickstart.handlers.control import commandMap
-            cMap = commandMap[self.version]
-        else:
-            cMap = mapping
-
-        if dataMapping == {} or dataMapping == None:
-            from pykickstart.handlers.control import dataMap
-            dMap = dataMap[self.version]
-        else:
-            dMap = dataMapping
-
-        if type(commandUpdates) == types.DictType:
-            cMap.update(commandUpdates)
-
-        if type(dataUpdates) == types.DictType:
-            dMap.update(dataUpdates)
-
-        for (cmdName, cmdClass) in cMap.iteritems():
-            # First make sure we haven't instantiated this command handler
-            # already.  If we have, we just need to make another mapping to
-            # it in self.commands.
-            cmdObj = None
-
-            for (key, val) in self.commands.iteritems():
-                if val.__class__.__name__ == cmdClass.__name__:
-                    cmdObj = val
-                    break
-
-            # If we didn't find an instance in self.commands, create one now.
-            if cmdObj == None:
-                cmdObj = cmdClass()
-                self._setCommand(cmdObj)
-
-            # Finally, add the mapping to the commands dict.
-            self.commands[cmdName] = cmdObj
-            self.commands[cmdName].handler = self
-
-        # We also need to create attributes for the various data objects.
-        # No checks here because dMap is a bijection.  At least, that's what
-        # the comment says.  Hope no one screws that up.
-        for (dataName, dataClass) in dMap.iteritems():
-            setattr(self, dataName, dataClass)
-
-    def dispatcher(self, args, lineno):
-        """Call the appropriate KickstartCommand handler for the current line
-           in the kickstart file.  A handler for the current command should
-           be registered, though a handler of None is not an error.  Returns
-           the data object returned by KickstartCommand.parse.
-
-           args    -- A list of arguments to the current command
-           lineno  -- The line number in the file, for error reporting
-        """
-        cmd = args[0]
-
-        if not self.commands.has_key(cmd):
-            raise KickstartParseError, formatErrorMsg(lineno, msg=_("Unknown command: %s" % cmd))
-        elif self.commands[cmd] != None:
-            self.commands[cmd].currentCmd = cmd
-            self.commands[cmd].currentLine = self.currentLine
-            self.commands[cmd].lineno = lineno
-
-            # The parser returns the data object that was modified.  This could
-            # be a BaseData subclass that should be put into a list, or it
-            # could be the command handler object itself.
-            obj = self.commands[cmd].parse(args[1:])
-            lst = self.commands[cmd].dataList()
-            if lst is not None:
-                lst.append(obj)
-
-            return obj
-
-    def maskAllExcept(self, lst):
-        """Set all entries in the commands dict to None, except the ones in
-           the lst.  All other commands will not be processed.
-        """
-        self._writeOrder = {}
-
-        for (key, val) in self.commands.iteritems():
-            if not key in lst:
-                self.commands[key] = None
-
-    def hasCommand(self, cmd):
-        """Return true if there is a handler for the string cmd."""
-        return hasattr(self, cmd)
-
-
-###
-### DATA
-###
-class BaseData(KickstartObject):
-    """The base class for all data objects.  This is an abstract class."""
-    removedKeywords = []
-    removedAttrs = []
-
-    def __init__(self, *args, **kwargs):
-        """Create a new BaseData instance.
-        
-           lineno -- Line number in the ks-file where this object was defined
-        """
-
-        # We don't want people using this class by itself.
-        if self.__class__ is BaseData:
-            raise TypeError, "BaseData is an abstract class."
-
-        KickstartObject.__init__(self, *args, **kwargs)
-        self.lineno = 0
-
-    def __str__(self):
-        """Return a string formatted for output to a kickstart file."""
-        return ""
-
-    def __call__(self, *args, **kwargs):
-        """Set multiple attributes on a subclass of BaseData at once via
-           keyword arguments.  Valid attributes are anything specified in a
-           subclass, but unknown attributes will be ignored.
-        """
-        for (key, val) in kwargs.items():
-            # Ignore setting attributes that were removed in a subclass, as
-            # if they were unknown attributes.
-            if key in self.removedAttrs:
-                continue
-
-            if hasattr(self, key):
-                setattr(self, key, val)
-
-    def deleteRemovedAttrs(self):
-        """Remove all attributes from self that are given in the removedAttrs
-           list.  This method should be called from __init__ in a subclass,
-           but only after the superclass's __init__ method has been called.
-        """
-        for attr in filter(lambda k: hasattr(self, k), self.removedAttrs):
-            delattr(self, attr)
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/commands/__init__.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/commands/__init__.py
deleted file mode 100644
index 2d94550..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/commands/__init__.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-import bootloader, partition
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/commands/bootloader.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/commands/bootloader.py
deleted file mode 100644
index c2b552f..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/commands/bootloader.py
+++ /dev/null
@@ -1,216 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-from pykickstart.base import *
-from pykickstart.options import *
-
-class FC3_Bootloader(KickstartCommand):
-    removedKeywords = KickstartCommand.removedKeywords
-    removedAttrs = KickstartCommand.removedAttrs
-
-    def __init__(self, writePriority=10, *args, **kwargs):
-        KickstartCommand.__init__(self, writePriority, *args, **kwargs)
-        self.op = self._getParser()
-
-        self.driveorder = kwargs.get("driveorder", [])
-        self.appendLine = kwargs.get("appendLine", "")
-        self.forceLBA = kwargs.get("forceLBA", False)
-        self.linear = kwargs.get("linear", True)
-        self.location = kwargs.get("location", "")
-        self.md5pass = kwargs.get("md5pass", "")
-        self.password = kwargs.get("password", "")
-        self.upgrade = kwargs.get("upgrade", False)
-        self.useLilo = kwargs.get("useLilo", False)
-
-        self.deleteRemovedAttrs()
-
-    def _getArgsAsStr(self):
-        retval = ""
-
-        if self.appendLine != "":
-            retval += " --append=\"%s\"" % self.appendLine
-        if self.linear:
-            retval += " --linear"
-        if self.location:
-            retval += " --location=%s" % self.location
-        if hasattr(self, "forceLBA") and self.forceLBA:
-            retval += " --lba32"
-        if self.password != "":
-            retval += " --password=\"%s\"" % self.password
-        if self.md5pass != "":
-            retval += " --md5pass=\"%s\"" % self.md5pass
-        if self.upgrade:
-            retval += " --upgrade"
-        if self.useLilo:
-            retval += " --useLilo"
-        if len(self.driveorder) > 0:
-            retval += " --driveorder=\"%s\"" % ",".join(self.driveorder)
-
-        return retval
-
-    def __str__(self):
-        retval = KickstartCommand.__str__(self)
-
-        if self.location != "":
-            retval += "# System bootloader configuration\nbootloader"
-            retval += self._getArgsAsStr() + "\n"
-
-        return retval
-
-    def _getParser(self):
-        def driveorder_cb (option, opt_str, value, parser):
-            for d in value.split(','):
-                parser.values.ensure_value(option.dest, []).append(d)
-
-        op = KSOptionParser()
-        op.add_option("--append", dest="appendLine")
-        op.add_option("--linear", dest="linear", action="store_true",
-                      default=True)
-        op.add_option("--nolinear", dest="linear", action="store_false")
-        op.add_option("--location", dest="location", type="choice",
-                      default="mbr",
-                      choices=["mbr", "partition", "none", "boot"])
-        op.add_option("--lba32", dest="forceLBA", action="store_true",
-                      default=False)
-        op.add_option("--password", dest="password", default="")
-        op.add_option("--md5pass", dest="md5pass", default="")
-        op.add_option("--upgrade", dest="upgrade", action="store_true",
-                      default=False)
-        op.add_option("--useLilo", dest="useLilo", action="store_true",
-                      default=False)
-        op.add_option("--driveorder", dest="driveorder", action="callback",
-                      callback=driveorder_cb, nargs=1, type="string")
-        return op
-
-    def parse(self, args):
-        (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-        self._setToSelf(self.op, opts)
-
-        if self.currentCmd == "lilo":
-            self.useLilo = True
-
-        return self
-
-class FC4_Bootloader(FC3_Bootloader):
-    removedKeywords = FC3_Bootloader.removedKeywords + ["linear", "useLilo"]
-    removedAttrs = FC3_Bootloader.removedAttrs + ["linear", "useLilo"]
-
-    def __init__(self, writePriority=10, *args, **kwargs):
-        FC3_Bootloader.__init__(self, writePriority, *args, **kwargs)
-
-    def _getArgsAsStr(self):
-        retval = ""
-        if self.appendLine != "":
-            retval += " --append=\"%s\"" % self.appendLine
-        if self.location:
-            retval += " --location=%s" % self.location
-        if hasattr(self, "forceLBA") and self.forceLBA:
-            retval += " --lba32"
-        if self.password != "":
-            retval += " --password=\"%s\"" % self.password
-        if self.md5pass != "":
-            retval += " --md5pass=\"%s\"" % self.md5pass
-        if self.upgrade:
-            retval += " --upgrade"
-        if len(self.driveorder) > 0:
-            retval += " --driveorder=\"%s\"" % ",".join(self.driveorder)
-        return retval
-
-    def _getParser(self):
-        op = FC3_Bootloader._getParser(self)
-        op.remove_option("--linear")
-        op.remove_option("--nolinear")
-        op.remove_option("--useLilo")
-        return op
-
-    def parse(self, args):
-        (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-        self._setToSelf(self.op, opts)
-        return self
-
-class F8_Bootloader(FC4_Bootloader):
-    removedKeywords = FC4_Bootloader.removedKeywords
-    removedAttrs = FC4_Bootloader.removedAttrs
-
-    def __init__(self, writePriority=10, *args, **kwargs):
-        FC4_Bootloader.__init__(self, writePriority, *args, **kwargs)
-
-        self.timeout = kwargs.get("timeout", None)
-        self.default = kwargs.get("default", "")
-
-    def _getArgsAsStr(self):
-        ret = FC4_Bootloader._getArgsAsStr(self)
-
-        if self.timeout is not None:
-            ret += " --timeout=%d" %(self.timeout,)
-        if self.default:
-            ret += " --default=%s" %(self.default,)
-
-        return ret
-
-    def _getParser(self):
-        op = FC4_Bootloader._getParser(self)
-        op.add_option("--timeout", dest="timeout", type="int")
-        op.add_option("--default", dest="default")
-        return op
-
-class F12_Bootloader(F8_Bootloader):
-    removedKeywords = F8_Bootloader.removedKeywords
-    removedAttrs = F8_Bootloader.removedAttrs
-
-    def _getParser(self):
-        op = F8_Bootloader._getParser(self)
-        op.add_option("--lba32", dest="forceLBA", deprecated=1, action="store_true")
-        return op
-
-class F14_Bootloader(F12_Bootloader):
-    removedKeywords = F12_Bootloader.removedKeywords + ["forceLBA"]
-    removedAttrs = F12_Bootloader.removedKeywords + ["forceLBA"]
-
-    def _getParser(self):
-        op = F12_Bootloader._getParser(self)
-        op.remove_option("--lba32")
-        return op
-
-class F15_Bootloader(F14_Bootloader):
-    removedKeywords = F14_Bootloader.removedKeywords
-    removedAttrs = F14_Bootloader.removedAttrs
-
-    def __init__(self, writePriority=10, *args, **kwargs):
-        F14_Bootloader.__init__(self, writePriority, *args, **kwargs)
-
-        self.isCrypted = kwargs.get("isCrypted", False)
-
-    def _getArgsAsStr(self):
-        ret = F14_Bootloader._getArgsAsStr(self)
-
-        if self.isCrypted:
-            ret += " --iscrypted"
-
-        return ret
-
-    def _getParser(self):
-        def password_cb(option, opt_str, value, parser):
-            parser.values.isCrypted = True
-            parser.values.password = value
-
-        op = F14_Bootloader._getParser(self)
-        op.add_option("--iscrypted", dest="isCrypted", action="store_true", default=False)
-        op.add_option("--md5pass", action="callback", callback=password_cb, nargs=1, type="string")
-        return op
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/commands/partition.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/commands/partition.py
deleted file mode 100644
index b564b1a..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/commands/partition.py
+++ /dev/null
@@ -1,314 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007, 2008 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-from pykickstart.base import *
-from pykickstart.errors import *
-from pykickstart.options import *
-
-import gettext
-import warnings
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class FC3_PartData(BaseData):
-    removedKeywords = BaseData.removedKeywords
-    removedAttrs = BaseData.removedAttrs
-
-    def __init__(self, *args, **kwargs):
-        BaseData.__init__(self, *args, **kwargs)
-        self.active = kwargs.get("active", False)
-        self.primOnly = kwargs.get("primOnly", False)
-        self.end = kwargs.get("end", 0)
-        self.fstype = kwargs.get("fstype", "")
-        self.grow = kwargs.get("grow", False)
-        self.maxSizeMB = kwargs.get("maxSizeMB", 0)
-        self.format = kwargs.get("format", True)
-        self.onbiosdisk = kwargs.get("onbiosdisk", "")
-        self.disk = kwargs.get("disk", "")
-        self.onPart = kwargs.get("onPart", "")
-        self.recommended = kwargs.get("recommended", False)
-        self.size = kwargs.get("size", None)
-        self.start = kwargs.get("start", 0)
-        self.mountpoint = kwargs.get("mountpoint", "")
-
-    def __eq__(self, y):
-        if self.mountpoint:
-            return self.mountpoint == y.mountpoint
-        else:
-            return False
-
-    def _getArgsAsStr(self):
-        retval = ""
-
-        if self.active:
-            retval += " --active"
-        if self.primOnly:
-            retval += " --asprimary"
-        if hasattr(self, "end") and self.end != 0:
-            retval += " --end=%s" % self.end
-        if self.fstype != "":
-            retval += " --fstype=\"%s\"" % self.fstype
-        if self.grow:
-            retval += " --grow"
-        if self.maxSizeMB > 0:
-            retval += " --maxsize=%d" % self.maxSizeMB
-        if not self.format:
-            retval += " --noformat"
-        if self.onbiosdisk != "":
-            retval += " --onbiosdisk=%s" % self.onbiosdisk
-        if self.disk != "":
-            retval += " --ondisk=%s" % self.disk
-        if self.onPart != "":
-            retval += " --onpart=%s" % self.onPart
-        if self.recommended:
-            retval += " --recommended"
-        if self.size and self.size != 0:
-            retval += " --size=%sk" % self.size
-        if hasattr(self, "start") and self.start != 0:
-            retval += " --start=%s" % self.start
-
-        return retval
-
-    def __str__(self):
-        retval = BaseData.__str__(self)
-        if self.mountpoint:
-            mountpoint_str = "%s" % self.mountpoint
-        else:
-            mountpoint_str = "(No mount point)"
-        retval += "part %s%s\n" % (mountpoint_str, self._getArgsAsStr())
-        return retval
-
-class FC4_PartData(FC3_PartData):
-    removedKeywords = FC3_PartData.removedKeywords
-    removedAttrs = FC3_PartData.removedAttrs
-
-    def __init__(self, *args, **kwargs):
-        FC3_PartData.__init__(self, *args, **kwargs)
-        self.bytesPerInode = kwargs.get("bytesPerInode", 4096)
-        self.fsopts = kwargs.get("fsopts", "")
-        self.label = kwargs.get("label", "")
-
-    def _getArgsAsStr(self):
-        retval = FC3_PartData._getArgsAsStr(self)
-
-        if hasattr(self, "bytesPerInode") and self.bytesPerInode != 0:
-            retval += " --bytes-per-inode=%d" % self.bytesPerInode
-        if self.fsopts != "":
-            retval += " --fsoptions=\"%s\"" % self.fsopts
-        if self.label != "":
-            retval += " --label=%s" % self.label
-
-        return retval
-
-class F9_PartData(FC4_PartData):
-    removedKeywords = FC4_PartData.removedKeywords + ["bytesPerInode"]
-    removedAttrs = FC4_PartData.removedAttrs + ["bytesPerInode"]
-
-    def __init__(self, *args, **kwargs):
-        FC4_PartData.__init__(self, *args, **kwargs)
-        self.deleteRemovedAttrs()
-
-        self.fsopts = kwargs.get("fsopts", "")
-        self.label = kwargs.get("label", "")
-        self.fsprofile = kwargs.get("fsprofile", "")
-        self.encrypted = kwargs.get("encrypted", False)
-        self.passphrase = kwargs.get("passphrase", "")
-
-    def _getArgsAsStr(self):
-        retval = FC4_PartData._getArgsAsStr(self)
-
-        if self.fsprofile != "":
-            retval += " --fsprofile=\"%s\"" % self.fsprofile
-        if self.encrypted:
-            retval += " --encrypted"
-
-            if self.passphrase != "":
-                retval += " --passphrase=\"%s\"" % self.passphrase
-
-        return retval
-
-class F11_PartData(F9_PartData):
-    removedKeywords = F9_PartData.removedKeywords + ["start", "end"]
-    removedAttrs = F9_PartData.removedAttrs + ["start", "end"]
-
-class F12_PartData(F11_PartData):
-    removedKeywords = F11_PartData.removedKeywords
-    removedAttrs = F11_PartData.removedAttrs
-
-    def __init__(self, *args, **kwargs):
-        F11_PartData.__init__(self, *args, **kwargs)
-
-        self.escrowcert = kwargs.get("escrowcert", "")
-        self.backuppassphrase = kwargs.get("backuppassphrase", False)
-
-    def _getArgsAsStr(self):
-        retval = F11_PartData._getArgsAsStr(self)
-
-        if self.encrypted and self.escrowcert != "":
-            retval += " --escrowcert=\"%s\"" % self.escrowcert
-
-            if self.backuppassphrase:
-                retval += " --backuppassphrase"
-
-        return retval
-
-F14_PartData = F12_PartData
-
-class FC3_Partition(KickstartCommand):
-    removedKeywords = KickstartCommand.removedKeywords
-    removedAttrs = KickstartCommand.removedAttrs
-
-    def __init__(self, writePriority=130, *args, **kwargs):
-        KickstartCommand.__init__(self, writePriority, *args, **kwargs)
-        self.op = self._getParser()
-
-        self.partitions = kwargs.get("partitions", [])
-
-    def __str__(self):
-        retval = ""
-
-        for part in self.partitions:
-            retval += part.__str__()
-
-        if retval != "":
-            return "# Disk partitioning information\n" + retval
-        else:
-            return ""
-
-    def _getParser(self):
-        def part_cb (option, opt_str, value, parser):
-            if value.startswith("/dev/"):
-                parser.values.ensure_value(option.dest, value[5:])
-            else:
-                parser.values.ensure_value(option.dest, value)
-
-        op = KSOptionParser()
-        op.add_option("--active", dest="active", action="store_true",
-                      default=False)
-        op.add_option("--asprimary", dest="primOnly", action="store_true",
-                      default=False)
-        op.add_option("--end", dest="end", action="store", type="int",
-                      nargs=1)
-        op.add_option("--fstype", "--type", dest="fstype")
-        op.add_option("--grow", dest="grow", action="store_true", default=False)
-        op.add_option("--maxsize", dest="maxSizeMB", action="store", type="int",
-                      nargs=1)
-        op.add_option("--noformat", dest="format", action="store_false",
-                      default=True)
-        op.add_option("--onbiosdisk", dest="onbiosdisk")
-        op.add_option("--ondisk", "--ondrive", dest="disk")
-        op.add_option("--onpart", "--usepart", dest="onPart", action="callback",
-                      callback=part_cb, nargs=1, type="string")
-        op.add_option("--recommended", dest="recommended", action="store_true",
-                      default=False)
-        op.add_option("--size", dest="size", action="store", type="size",
-                      nargs=1)
-        op.add_option("--start", dest="start", action="store", type="int",
-                      nargs=1)
-        return op
-
-    def parse(self, args):
-        (opts, extra) = self.op.parse_args(args=args, lineno=self.lineno)
-
-        pd = self.handler.PartData()
-        self._setToObj(self.op, opts, pd)
-        pd.lineno = self.lineno
-        if extra:
-            pd.mountpoint = extra[0]
-            if pd in self.dataList():
-                warnings.warn(_("A partition with the mountpoint %s has already been defined.") % pd.mountpoint)
-        else:
-            pd.mountpoint = None
-
-        return pd
-
-    def dataList(self):
-        return self.partitions
-
-class FC4_Partition(FC3_Partition):
-    removedKeywords = FC3_Partition.removedKeywords
-    removedAttrs = FC3_Partition.removedAttrs
-
-    def __init__(self, writePriority=130, *args, **kwargs):
-        FC3_Partition.__init__(self, writePriority, *args, **kwargs)
-
-        def part_cb (option, opt_str, value, parser):
-            if value.startswith("/dev/"):
-                parser.values.ensure_value(option.dest, value[5:])
-            else:
-                parser.values.ensure_value(option.dest, value)
-
-    def _getParser(self):
-        op = FC3_Partition._getParser(self)
-        op.add_option("--bytes-per-inode", dest="bytesPerInode", action="store",
-                      type="int", nargs=1)
-        op.add_option("--fsoptions", dest="fsopts")
-        op.add_option("--label", dest="label")
-        return op
-
-class F9_Partition(FC4_Partition):
-    removedKeywords = FC4_Partition.removedKeywords
-    removedAttrs = FC4_Partition.removedAttrs
-
-    def __init__(self, writePriority=130, *args, **kwargs):
-        FC4_Partition.__init__(self, writePriority, *args, **kwargs)
-
-        def part_cb (option, opt_str, value, parser):
-            if value.startswith("/dev/"):
-                parser.values.ensure_value(option.dest, value[5:])
-            else:
-                parser.values.ensure_value(option.dest, value)
-
-    def _getParser(self):
-        op = FC4_Partition._getParser(self)
-        op.add_option("--bytes-per-inode", deprecated=1)
-        op.add_option("--fsprofile")
-        op.add_option("--encrypted", action="store_true", default=False)
-        op.add_option("--passphrase")
-        return op
-
-class F11_Partition(F9_Partition):
-    removedKeywords = F9_Partition.removedKeywords
-    removedAttrs = F9_Partition.removedAttrs
-
-    def _getParser(self):
-        op = F9_Partition._getParser(self)
-        op.add_option("--start", deprecated=1)
-        op.add_option("--end", deprecated=1)
-        return op
-
-class F12_Partition(F11_Partition):
-    removedKeywords = F11_Partition.removedKeywords
-    removedAttrs = F11_Partition.removedAttrs
-
-    def _getParser(self):
-        op = F11_Partition._getParser(self)
-        op.add_option("--escrowcert")
-        op.add_option("--backuppassphrase", action="store_true", default=False)
-        return op
-
-class F14_Partition(F12_Partition):
-    removedKeywords = F12_Partition.removedKeywords
-    removedAttrs = F12_Partition.removedAttrs
-
-    def _getParser(self):
-        op = F12_Partition._getParser(self)
-        op.remove_option("--bytes-per-inode")
-        op.remove_option("--start")
-        op.remove_option("--end")
-        return op
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/constants.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/constants.py
deleted file mode 100644
index 5e12fc8..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/constants.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005-2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-CLEARPART_TYPE_LINUX = 0
-CLEARPART_TYPE_ALL = 1
-CLEARPART_TYPE_NONE = 2
-
-DISPLAY_MODE_CMDLINE = 0
-DISPLAY_MODE_GRAPHICAL = 1
-DISPLAY_MODE_TEXT = 2
-
-FIRSTBOOT_DEFAULT = 0
-FIRSTBOOT_SKIP = 1
-FIRSTBOOT_RECONFIG = 2
-
-KS_MISSING_PROMPT = 0
-KS_MISSING_IGNORE = 1
-
-SELINUX_DISABLED = 0
-SELINUX_ENFORCING = 1
-SELINUX_PERMISSIVE = 2
-
-KS_SCRIPT_PRE = 0
-KS_SCRIPT_POST = 1
-KS_SCRIPT_TRACEBACK = 2
-
-KS_WAIT = 0
-KS_REBOOT = 1
-KS_SHUTDOWN = 2
-
-KS_INSTKEY_SKIP = -99
-
-BOOTPROTO_DHCP = "dhcp"
-BOOTPROTO_BOOTP = "bootp"
-BOOTPROTO_STATIC = "static"
-BOOTPROTO_QUERY = "query"
-BOOTPROTO_IBFT = "ibft"
-
-GROUP_REQUIRED = 0
-GROUP_DEFAULT = 1
-GROUP_ALL = 2
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/errors.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/errors.py
deleted file mode 100644
index a234d99..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/errors.py
+++ /dev/null
@@ -1,103 +0,0 @@
-#
-# errors.py:  Kickstart error handling.
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-"""
-Error handling classes and functions.
-
-This module exports a single function:
-
-    formatErrorMsg - Properly formats an error message.
-
-It also exports several exception classes:
-
-    KickstartError - A generic exception class.
-
-    KickstartParseError - An exception for errors relating to parsing.
-
-    KickstartValueError - An exception for errors relating to option
-                          processing.
-
-    KickstartVersionError - An exception for errors relating to unsupported
-                            syntax versions.
-"""
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-def formatErrorMsg(lineno, msg=""):
-    """Properly format the error message msg for inclusion in an exception."""
-    if msg != "":
-        mapping = {"lineno": lineno, "msg": msg}
-        return _("The following problem occurred on line %(lineno)s of the kickstart file:\n\n%(msg)s\n") % mapping
-    else:
-        return _("There was a problem reading from line %s of the kickstart file") % lineno
-
-class KickstartError(Exception):
-    """A generic exception class for unspecific error conditions."""
-    def __init__(self, val = ""):
-        """Create a new KickstartError exception instance with the descriptive
-           message val.  val should be the return value of formatErrorMsg.
-        """
-        Exception.__init__(self)
-        self.value = val
-
-    def __str__ (self):
-        return self.value
-
-class KickstartParseError(KickstartError):
-    """An exception class for errors when processing the input file, such as
-       unknown options, commands, or sections.
-    """
-    def __init__(self, msg):
-        """Create a new KickstartParseError exception instance with the
-           descriptive message val.  val should be the return value of
-           formatErrorMsg.
-        """
-        KickstartError.__init__(self, msg)
-
-    def __str__(self):
-        return self.value
-
-class KickstartValueError(KickstartError):
-    """An exception class for errors when processing arguments to commands,
-       such as too many arguments, too few arguments, or missing required
-       arguments.
-    """
-    def __init__(self, msg):
-        """Create a new KickstartValueError exception instance with the
-           descriptive message val.  val should be the return value of
-           formatErrorMsg.
-        """
-        KickstartError.__init__(self, msg)
-
-    def __str__ (self):
-        return self.value
-
-class KickstartVersionError(KickstartError):
-    """An exception class for errors related to using an incorrect version of
-       kickstart syntax.
-    """
-    def __init__(self, msg):
-        """Create a new KickstartVersionError exception instance with the
-           descriptive message val.  val should be the return value of
-           formatErrorMsg.
-        """
-        KickstartError.__init__(self, msg)
-
-    def __str__ (self):
-        return self.value
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/handlers/__init__.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/handlers/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/handlers/__init__.py
+++ /dev/null
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/handlers/control.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/handlers/control.py
deleted file mode 100644
index 8dc80d1..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/handlers/control.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-from pykickstart.version import *
-from pykickstart.commands import *
-
-# This map is keyed on kickstart syntax version as provided by
-# pykickstart.version.  Within each sub-dict is a mapping from command name
-# to the class that handles it.  This is an onto mapping - that is, multiple
-# command names can map to the same class.  However, the Handler will ensure
-# that only one instance of each class ever exists.
-commandMap = {
-    # based on f15
-    F16: {
-        "bootloader": bootloader.F15_Bootloader,
-        "part": partition.F14_Partition,
-        "partition": partition.F14_Partition,
-    },
-}
-
-# This map is keyed on kickstart syntax version as provided by
-# pykickstart.version.  Within each sub-dict is a mapping from a data object
-# name to the class that provides it.  This is a bijective mapping - that is,
-# each name maps to exactly one data class and all data classes have a name.
-# More than one instance of each class is allowed to exist, however.
-dataMap = {
-    F16: {
-        "PartData": partition.F14_PartData,
-    },
-}
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/handlers/f16.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/handlers/f16.py
deleted file mode 100644
index 3c52f8d..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/handlers/f16.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2011 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-from pykickstart.base import *
-from pykickstart.version import *
-
-class F16Handler(BaseHandler):
-    version = F16
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/ko.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/ko.py
deleted file mode 100644
index 1350d19..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/ko.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2009 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-"""
-Base classes for internal pykickstart use.
-
-The module exports the following important classes:
-
-    KickstartObject - The base class for all classes in pykickstart
-"""
-
-class KickstartObject(object):
-    """The base class for all other classes in pykickstart."""
-    def __init__(self, *args, **kwargs):
-        """Create a new KickstartObject instance.  All other classes in
-           pykickstart should be derived from this one.  Instance attributes:
-        """
-        pass
-
-    def __str__(self):
-        return ""
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/options.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/options.py
deleted file mode 100644
index ebc23ed..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/options.py
+++ /dev/null
@@ -1,223 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-"""
-Specialized option handling.
-
-This module exports two classes:
-
-    KSOptionParser - A specialized subclass of OptionParser to be used
-                     in BaseHandler subclasses.
-
-    KSOption - A specialized subclass of Option.
-"""
-import warnings
-from copy import copy
-from optparse import *
-
-from constants import *
-from errors import *
-from version import *
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-class KSOptionParser(OptionParser):
-    """A specialized subclass of optparse.OptionParser to handle extra option
-       attribute checking, work error reporting into the KickstartParseError
-       framework, and to turn off the default help.
-    """
-    def exit(self, status=0, msg=None):
-        pass
-
-    def error(self, msg):
-        if self.lineno != None:
-            raise KickstartParseError, formatErrorMsg(self.lineno, msg=msg)
-        else:
-            raise KickstartParseError, msg
-
-    def keys(self):
-        retval = []
-
-        for opt in self.option_list:
-            if opt not in retval:
-                retval.append(opt.dest)
-
-        return retval
-
-    def _init_parsing_state (self):
-        OptionParser._init_parsing_state(self)
-        self.option_seen = {}
-
-    def check_values (self, values, args):
-        def seen(self, option):
-            return self.option_seen.has_key(option)
-
-        def usedTooNew(self, option):
-            return option.introduced and option.introduced > self.version
-
-        def usedDeprecated(self, option):
-            return option.deprecated
-
-        def usedRemoved(self, option):
-            return option.removed and option.removed <= self.version
-
-        for option in filter(lambda o: isinstance(o, Option), self.option_list):
-            if option.required and not seen(self, option):
-                raise KickstartValueError, formatErrorMsg(self.lineno, _("Option %s is required") % option)
-            elif seen(self, option) and usedTooNew(self, option):
-                mapping = {"option": option, "intro": versionToString(option.introduced),
-                           "version": versionToString(self.version)}
-                self.error(_("The %(option)s option was introduced in version %(intro)s, but you are using kickstart syntax version %(version)s.") % mapping)
-            elif seen(self, option) and usedRemoved(self, option):
-                mapping = {"option": option, "removed": versionToString(option.removed),
-                           "version": versionToString(self.version)}
-
-                if option.removed == self.version:
-                    self.error(_("The %(option)s option is no longer supported.") % mapping)
-                else:
-                    self.error(_("The %(option)s option was removed in version %(removed)s, but you are using kickstart syntax version %(version)s.") % mapping)
-            elif seen(self, option) and usedDeprecated(self, option):
-                mapping = {"lineno": self.lineno, "option": option}
-                warnings.warn(_("Ignoring deprecated option on line %(lineno)s:  The %(option)s option has been deprecated and no longer has any effect.  It may be removed from future releases, which will result in a fatal error from kickstart.  Please modify your kickstart file to remove this option.") % mapping, DeprecationWarning)
-
-        return (values, args)
-
-    def parse_args(self, *args, **kwargs):
-        if kwargs.has_key("lineno"):
-            self.lineno = kwargs.pop("lineno")
-
-        return OptionParser.parse_args(self, **kwargs)
-
-    def __init__(self, mapping=None, version=None):
-        """Create a new KSOptionParser instance.  Each KickstartCommand
-           subclass should create one instance of KSOptionParser, providing
-           at least the lineno attribute.  mapping and version are not required.
-           Instance attributes:
-
-           mapping -- A mapping from option strings to different values.
-           version -- The version of the kickstart syntax we are checking
-                      against.
-        """
-        OptionParser.__init__(self, option_class=KSOption,
-                              add_help_option=False,
-                              conflict_handler="resolve")
-        if mapping is None:
-            self.map = {}
-        else:
-            self.map = mapping
-
-        self.lineno = None
-        self.option_seen = {}
-        self.version = version
-
-def _check_ksboolean(option, opt, value):
-    if value.lower() in ("on", "yes", "true", "1"):
-        return True
-    elif value.lower() in ("off", "no", "false", "0"):
-        return False
-    else:
-        mapping = {"opt": opt, "value": value}
-        raise OptionValueError(_("Option %(opt)s: invalid boolean value: %(value)r") % mapping)
-
-def _check_string(option, opt, value):
-    if len(value) > 2 and value.startswith("--"):
-        mapping = {"opt": opt, "value": value}
-        raise OptionValueError(_("Option %(opt)s: invalid string value: %(value)r") % mapping)
-    else:
-        return value
-
-def _check_size(option, opt, value):
-    # Former default was MB
-    if value.isdigit():
-        return int(value) * 1024L
-
-    mapping = {"opt": opt, "value": value}
-    if not value[:-1].isdigit():
-        raise OptionValueError(_("Option %(opt)s: invalid size value: %(value)r") % mapping)
-
-    size = int(value[:-1])
-    if value.endswith("k") or value.endswith("K"):
-        return size
-    if value.endswith("M"):
-        return size * 1024L
-    if value.endswith("G"):
-        return size * 1024L * 1024L
-    raise OptionValueError(_("Option %(opt)s: invalid size value: %(value)r") % mapping)
-
-# Creates a new Option class that supports several new attributes:
-# - required:  any option with this attribute must be supplied or an exception
-#              is thrown
-# - introduced:  the kickstart syntax version that this option first appeared
-#                in - an exception will be raised if the option is used and
-#                the specified syntax version is less than the value of this
-#                attribute
-# - deprecated:  the kickstart syntax version that this option was deprecated
-#                in - a DeprecationWarning will be thrown if the option is
-#                used and the specified syntax version is greater than the
-#                value of this attribute
-# - removed:  the kickstart syntax version that this option was removed in - an
-#             exception will be raised if the option is used and the specified
-#             syntax version is greated than the value of this attribute
-# Also creates a new type:
-# - ksboolean:  support various kinds of boolean values on an option
-# And two new actions:
-# - map :  allows you to define an opt -> val mapping such that dest gets val
-#          when opt is seen
-# - map_extend:  allows you to define an opt -> [val1, ... valn] mapping such
-#                that dest gets a list of vals built up when opt is seen
-class KSOption (Option):
-    ATTRS = Option.ATTRS + ['introduced', 'deprecated', 'removed', 'required']
-    ACTIONS = Option.ACTIONS + ("map", "map_extend",)
-    STORE_ACTIONS = Option.STORE_ACTIONS + ("map", "map_extend",)
-
-    TYPES = Option.TYPES + ("ksboolean", "string", "size")
-    TYPE_CHECKER = copy(Option.TYPE_CHECKER)
-    TYPE_CHECKER["ksboolean"] = _check_ksboolean
-    TYPE_CHECKER["string"] = _check_string
-    TYPE_CHECKER["size"] = _check_size
-
-    def _check_required(self):
-        if self.required and not self.takes_value():
-            raise OptionError(_("Required flag set for option that doesn't take a value"), self)
-
-    # Make sure _check_required() is called from the constructor!
-    CHECK_METHODS = Option.CHECK_METHODS + [_check_required]
-
-    def process (self, opt, value, values, parser):
-        Option.process(self, opt, value, values, parser)
-        parser.option_seen[self] = 1
-
-    # Override default take_action method to handle our custom actions.
-    def take_action(self, action, dest, opt, value, values, parser):
-        if action == "map":
-            values.ensure_value(dest, parser.map[opt.lstrip('-')])
-        elif action == "map_extend":
-            values.ensure_value(dest, []).extend(parser.map[opt.lstrip('-')])
-        else:
-            Option.take_action(self, action, dest, opt, value, values, parser)
-
-    def takes_value(self):
-        # Deprecated options don't take a value.
-        return Option.takes_value(self) and not self.deprecated
-
-    def __init__(self, *args, **kwargs):
-        self.deprecated = False
-        self.required = False
-        Option.__init__(self, *args, **kwargs)
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/parser.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/parser.py
deleted file mode 100644
index 9c9674b..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/parser.py
+++ /dev/null
@@ -1,619 +0,0 @@
-#
-# parser.py:  Kickstart file parser.
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2005, 2006, 2007, 2008, 2011 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-"""
-Main kickstart file processing module.
-
-This module exports several important classes:
-
-    Script - Representation of a single %pre, %post, or %traceback script.
-
-    Packages - Representation of the %packages section.
-
-    KickstartParser - The kickstart file parser state machine.
-"""
-
-from collections import Iterator
-import os
-import shlex
-import sys
-import tempfile
-from copy import copy
-from optparse import *
-
-import constants
-from errors import KickstartError, KickstartParseError, KickstartValueError, formatErrorMsg
-from ko import KickstartObject
-from sections import *
-import version
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-STATE_END = "end"
-STATE_COMMANDS = "commands"
-
-ver = version.DEVEL
-
-
-class PutBackIterator(Iterator):
-    def __init__(self, iterable):
-        self._iterable = iter(iterable)
-        self._buf = None
-
-    def __iter__(self):
-        return self
-
-    def put(self, s):
-        self._buf = s
-
-    def next(self):
-        if self._buf:
-            retval = self._buf
-            self._buf = None
-            return retval
-        else:
-            return self._iterable.next()
-
-###
-### SCRIPT HANDLING
-###
-class Script(KickstartObject):
-    """A class representing a single kickstart script.  If functionality beyond
-       just a data representation is needed (for example, a run method in
-       anaconda), Script may be subclassed.  Although a run method is not
-       provided, most of the attributes of Script have to do with running the
-       script.  Instances of Script are held in a list by the Version object.
-    """
-    def __init__(self, script, *args , **kwargs):
-        """Create a new Script instance.  Instance attributes:
-
-           errorOnFail -- If execution of the script fails, should anaconda
-                          stop, display an error, and then reboot without
-                          running any other scripts?
-           inChroot    -- Does the script execute in anaconda's chroot
-                          environment or not?
-           interp      -- The program that should be used to interpret this
-                          script.
-           lineno      -- The line number this script starts on.
-           logfile     -- Where all messages from the script should be logged.
-           script      -- A string containing all the lines of the script.
-           type        -- The type of the script, which can be KS_SCRIPT_* from
-                          pykickstart.constants.
-        """
-        KickstartObject.__init__(self, *args, **kwargs)
-        self.script = "".join(script)
-
-        self.interp = kwargs.get("interp", "/bin/sh")
-        self.inChroot = kwargs.get("inChroot", False)
-        self.lineno = kwargs.get("lineno", None)
-        self.logfile = kwargs.get("logfile", None)
-        self.errorOnFail = kwargs.get("errorOnFail", False)
-        self.type = kwargs.get("type", constants.KS_SCRIPT_PRE)
-
-    def __str__(self):
-        """Return a string formatted for output to a kickstart file."""
-        retval = ""
-
-        if self.type == constants.KS_SCRIPT_PRE:
-            retval += '\n%pre'
-        elif self.type == constants.KS_SCRIPT_POST:
-            retval += '\n%post'
-        elif self.type == constants.KS_SCRIPT_TRACEBACK:
-            retval += '\n%traceback'
-
-        if self.interp != "/bin/sh" and self.interp != "":
-            retval += " --interpreter=%s" % self.interp
-        if self.type == constants.KS_SCRIPT_POST and not self.inChroot:
-            retval += " --nochroot"
-        if self.logfile != None:
-            retval += " --logfile %s" % self.logfile
-        if self.errorOnFail:
-            retval += " --erroronfail"
-
-        if self.script.endswith("\n"):
-            if ver >= version.F8:
-                return retval + "\n%s%%end\n" % self.script
-            else:
-                return retval + "\n%s\n" % self.script
-        else:
-            if ver >= version.F8:
-                return retval + "\n%s\n%%end\n" % self.script
-            else:
-                return retval + "\n%s\n" % self.script
-
-
-##
-## PACKAGE HANDLING
-##
-class Group:
-    """A class representing a single group in the %packages section."""
-    def __init__(self, name="", include=constants.GROUP_DEFAULT):
-        """Create a new Group instance.  Instance attributes:
-
-           name    -- The group's identifier
-           include -- The level of how much of the group should be included.
-                      Values can be GROUP_* from pykickstart.constants.
-        """
-        self.name = name
-        self.include = include
-
-    def __str__(self):
-        """Return a string formatted for output to a kickstart file."""
-        if self.include == constants.GROUP_REQUIRED:
-            return "@%s --nodefaults" % self.name
-        elif self.include == constants.GROUP_ALL:
-            return "@%s --optional" % self.name
-        else:
-            return "@%s" % self.name
-
-    def __cmp__(self, other):
-        if self.name < other.name:
-            return -1
-        elif self.name > other.name:
-            return 1
-        return 0
-
-class Packages(KickstartObject):
-    """A class representing the %packages section of the kickstart file."""
-    def __init__(self, *args, **kwargs):
-        """Create a new Packages instance.  Instance attributes:
-
-           addBase       -- Should the Base group be installed even if it is
-                            not specified?
-           default       -- Should the default package set be selected?
-           excludedList  -- A list of all the packages marked for exclusion in
-                            the %packages section, without the leading minus
-                            symbol.
-           excludeDocs   -- Should documentation in each package be excluded?
-           groupList     -- A list of Group objects representing all the groups
-                            specified in the %packages section.  Names will be
-                            stripped of the leading @ symbol.
-           excludedGroupList -- A list of Group objects representing all the
-                                groups specified for removal in the %packages
-                                section.  Names will be stripped of the leading
-                                -@ symbols.
-           handleMissing -- If unknown packages are specified in the %packages
-                            section, should it be ignored or not?  Values can
-                            be KS_MISSING_* from pykickstart.constants.
-           packageList   -- A list of all the packages specified in the
-                            %packages section.
-           instLangs     -- A list of languages to install.
-        """
-        KickstartObject.__init__(self, *args, **kwargs)
-
-        self.addBase = True
-        self.default = False
-        self.excludedList = []
-        self.excludedGroupList = []
-        self.excludeDocs = False
-        self.groupList = []
-        self.handleMissing = constants.KS_MISSING_PROMPT
-        self.packageList = []
-        self.instLangs = None
-
-    def __str__(self):
-        """Return a string formatted for output to a kickstart file."""
-        pkgs = ""
-
-        if not self.default:
-            grps = self.groupList
-            grps.sort()
-            for grp in grps:
-                pkgs += "%s\n" % grp.__str__()
-
-            p = self.packageList
-            p.sort()
-            for pkg in p:
-                pkgs += "%s\n" % pkg
-
-            grps = self.excludedGroupList
-            grps.sort()
-            for grp in grps:
-                pkgs += "-%s\n" % grp.__str__()
-
-            p = self.excludedList
-            p.sort()
-            for pkg in p:
-                pkgs += "-%s\n" % pkg
-
-            if pkgs == "":
-                return ""
-
-        retval = "\n%packages"
-
-        if self.default:
-            retval += " --default"
-        if self.excludeDocs:
-            retval += " --excludedocs"
-        if not self.addBase:
-            retval += " --nobase"
-        if self.handleMissing == constants.KS_MISSING_IGNORE:
-            retval += " --ignoremissing"
-        if self.instLangs:
-            retval += " --instLangs=%s" % self.instLangs
-
-        if ver >= version.F8:
-            return retval + "\n" + pkgs + "\n%end\n"
-        else:
-            return retval + "\n" + pkgs + "\n"
-
-    def _processGroup (self, line):
-        op = OptionParser()
-        op.add_option("--nodefaults", action="store_true", default=False)
-        op.add_option("--optional", action="store_true", default=False)
-
-        (opts, extra) = op.parse_args(args=line.split())
-
-        if opts.nodefaults and opts.optional:
-            raise KickstartValueError, _("Group cannot specify both --nodefaults and --optional")
-
-        # If the group name has spaces in it, we have to put it back together
-        # now.
-        grp = " ".join(extra)
-
-        if opts.nodefaults:
-            self.groupList.append(Group(name=grp, include=constants.GROUP_REQUIRED))
-        elif opts.optional:
-            self.groupList.append(Group(name=grp, include=constants.GROUP_ALL))
-        else:
-            self.groupList.append(Group(name=grp, include=constants.GROUP_DEFAULT))
-
-    def add (self, pkgList):
-        """Given a list of lines from the input file, strip off any leading
-           symbols and add the result to the appropriate list.
-        """
-        existingExcludedSet = set(self.excludedList)
-        existingPackageSet = set(self.packageList)
-        newExcludedSet = set()
-        newPackageSet = set()
-
-        excludedGroupList = []
-
-        for pkg in pkgList:
-            stripped = pkg.strip()
-
-            if stripped[0] == "@":
-                self._processGroup(stripped[1:])
-            elif stripped[0] == "-":
-                if stripped[1] == "@":
-                    excludedGroupList.append(Group(name=stripped[2:]))
-                else:
-                    newExcludedSet.add(stripped[1:])
-            else:
-                newPackageSet.add(stripped)
-
-        # Groups have to be excluded in two different ways (note: can't use
-        # sets here because we have to store objects):
-        excludedGroupNames = map(lambda g: g.name, excludedGroupList)
-
-        # First, an excluded group may be cancelling out a previously given
-        # one.  This is often the case when using %include.  So there we should
-        # just remove the group from the list.
-        self.groupList = filter(lambda g: g.name not in excludedGroupNames, self.groupList)
-
-        # Second, the package list could have included globs which are not
-        # processed by pykickstart.  In that case we need to preserve a list of
-        # excluded groups so whatever tool doing package/group installation can
-        # take appropriate action.
-        self.excludedGroupList.extend(excludedGroupList)
-
-        existingPackageSet = (existingPackageSet - newExcludedSet) | newPackageSet
-        existingExcludedSet = (existingExcludedSet - existingPackageSet) | newExcludedSet
-
-        self.packageList = list(existingPackageSet)
-        self.excludedList = list(existingExcludedSet)
-
-
-###
-### PARSER
-###
-class KickstartParser:
-    """The kickstart file parser class as represented by a basic state
-       machine.  To create a specialized parser, make a subclass and override
-       any of the methods you care about.  Methods that don't need to do
-       anything may just pass.  However, _stateMachine should never be
-       overridden.
-    """
-    def __init__ (self, handler, followIncludes=True, errorsAreFatal=True,
-                  missingIncludeIsFatal=True):
-        """Create a new KickstartParser instance.  Instance attributes:
-
-           errorsAreFatal        -- Should errors cause processing to halt, or
-                                    just print a message to the screen?  This
-                                    is most useful for writing syntax checkers
-                                    that may want to continue after an error is
-                                    encountered.
-           followIncludes        -- If %include is seen, should the included
-                                    file be checked as well or skipped?
-           handler               -- An instance of a BaseHandler subclass.  If
-                                    None, the input file will still be parsed
-                                    but no data will be saved and no commands
-                                    will be executed.
-           missingIncludeIsFatal -- Should missing include files be fatal, even
-                                    if errorsAreFatal is False?
-        """
-        self.errorsAreFatal = errorsAreFatal
-        self.followIncludes = followIncludes
-        self.handler = handler
-        self.currentdir = {}
-        self.missingIncludeIsFatal = missingIncludeIsFatal
-
-        self._state = STATE_COMMANDS
-        self._includeDepth = 0
-        self._line = ""
-
-        self.version = self.handler.version
-
-        global ver
-        ver = self.version
-
-        self._sections = {}
-        self.setupSections()
-
-    def _reset(self):
-        """Reset the internal variables of the state machine for a new kickstart file."""
-        self._state = STATE_COMMANDS
-        self._includeDepth = 0
-
-    def getSection(self, s):
-        """Return a reference to the requested section (s must start with '%'s),
-           or raise KeyError if not found.
-        """
-        return self._sections[s]
-
-    def handleCommand (self, lineno, args):
-        """Given the list of command and arguments, call the Version's
-           dispatcher method to handle the command.  Returns the command or
-           data object returned by the dispatcher.  This method may be
-           overridden in a subclass if necessary.
-        """
-        if self.handler:
-            self.handler.currentCmd = args[0]
-            self.handler.currentLine = self._line
-            retval = self.handler.dispatcher(args, lineno)
-
-            return retval
-
-    def registerSection(self, obj):
-        """Given an instance of a Section subclass, register the new section
-           with the parser.  Calling this method means the parser will
-           recognize your new section and dispatch into the given object to
-           handle it.
-        """
-        if not obj.sectionOpen:
-            raise TypeError, "no sectionOpen given for section %s" % obj
-
-        if not obj.sectionOpen.startswith("%"):
-            raise TypeError, "section %s tag does not start with a %%" % obj.sectionOpen
-
-        self._sections[obj.sectionOpen] = obj
-
-    def _finalize(self, obj):
-        """Called at the close of a kickstart section to take any required
-           actions.  Internally, this is used to add scripts once we have the
-           whole body read.
-        """
-        obj.finalize()
-        self._state = STATE_COMMANDS
-
-    def _handleSpecialComments(self, line):
-        """Kickstart recognizes a couple special comments."""
-        if self._state != STATE_COMMANDS:
-            return
-
-        # Save the platform for s-c-kickstart.
-        if line[:10] == "#platform=":
-            self.handler.platform = self._line[11:]
-
-    def _readSection(self, lineIter, lineno):
-        obj = self._sections[self._state]
-
-        while True:
-            try:
-                line = lineIter.next()
-                if line == "":
-                    # This section ends at the end of the file.
-                    if self.version >= version.F8:
-                        raise KickstartParseError, formatErrorMsg(lineno, msg=_("Section does not end with %%end."))
-
-                    self._finalize(obj)
-            except StopIteration:
-                break
-
-            lineno += 1
-
-            # Throw away blank lines and comments, unless the section wants all
-            # lines.
-            if self._isBlankOrComment(line) and not obj.allLines:
-                continue
-
-            if line.startswith("%"):
-                args = shlex.split(line)
-
-                if args and args[0] == "%end":
-                    # This is a properly terminated section.
-                    self._finalize(obj)
-                    break
-                elif args and args[0] == "%ksappend":
-                    continue
-                elif args and (self._validState(args[0]) or args[0] in ["%include", "%ksappend"]):
-                    # This is an unterminated section.
-                    if self.version >= version.F8:
-                        raise KickstartParseError, formatErrorMsg(lineno, msg=_("Section does not end with %%end."))
-
-                    # Finish up.  We do not process the header here because
-                    # kicking back out to STATE_COMMANDS will ensure that happens.
-                    lineIter.put(line)
-                    lineno -= 1
-                    self._finalize(obj)
-                    break
-            else:
-                # This is just a line within a section.  Pass it off to whatever
-                # section handles it.
-                obj.handleLine(line)
-
-        return lineno
-
-    def _validState(self, st):
-        """Is the given section tag one that has been registered with the parser?"""
-        return st in self._sections.keys()
-
-    def _tryFunc(self, fn):
-        """Call the provided function (which doesn't take any arguments) and
-           do the appropriate error handling.  If errorsAreFatal is False, this
-           function will just print the exception and keep going.
-        """
-        try:
-            fn()
-        except Exception, msg:
-            if self.errorsAreFatal:
-                raise
-            else:
-                print msg
-
-    def _isBlankOrComment(self, line):
-        return line.isspace() or line == "" or line.lstrip()[0] == '#'
-
-    def _stateMachine(self, lineIter):
-        # For error reporting.
-        lineno = 0
-
-        while True:
-            # Get the next line out of the file, quitting if this is the last line.
-            try:
-                self._line = lineIter.next()
-                if self._line == "":
-                    break
-            except StopIteration:
-                break
-
-            lineno += 1
-
-            # Eliminate blank lines, whitespace-only lines, and comments.
-            if self._isBlankOrComment(self._line):
-                self._handleSpecialComments(self._line)
-                continue
-
-            # Remove any end-of-line comments.
-            sanitized = self._line.split("#")[0]
-
-            # Then split the line.
-            args = shlex.split(sanitized.rstrip())
-
-            if args[0] == "%include":
-                # This case comes up primarily in ksvalidator.
-                if not self.followIncludes:
-                    continue
-
-                if len(args) == 1 or not args[1]:
-                    raise KickstartParseError, formatErrorMsg(lineno)
-
-                self._includeDepth += 1
-
-                try:
-                    self.readKickstart(args[1], reset=False)
-                except KickstartError:
-                    # Handle the include file being provided over the
-                    # network in a %pre script.  This case comes up in the
-                    # early parsing in anaconda.
-                    if self.missingIncludeIsFatal:
-                        raise
-
-                self._includeDepth -= 1
-                continue
-
-            # Now on to the main event.
-            if self._state == STATE_COMMANDS:
-                if args[0] == "%ksappend":
-                    # This is handled by the preprocess* functions, so continue.
-                    continue
-                elif args[0][0] == '%':
-                    # This is the beginning of a new section.  Handle its header
-                    # here.
-                    newSection = args[0]
-                    if not self._validState(newSection):
-                        raise KickstartParseError, formatErrorMsg(lineno, msg=_("Unknown kickstart section: %s" % newSection))
-
-                    self._state = newSection
-                    obj = self._sections[self._state]
-                    self._tryFunc(lambda: obj.handleHeader(lineno, args))
-
-                    # This will handle all section processing, kicking us back
-                    # out to STATE_COMMANDS at the end with the current line
-                    # being the next section header, etc.
-                    lineno = self._readSection(lineIter, lineno)
-                else:
-                    # This is a command in the command section.  Dispatch to it.
-                    self._tryFunc(lambda: self.handleCommand(lineno, args))
-            elif self._state == STATE_END:
-                break
-
-    def readKickstartFromString (self, s, reset=True):
-        """Process a kickstart file, provided as the string str."""
-        if reset:
-            self._reset()
-
-        # Add a "" to the end of the list so the string reader acts like the
-        # file reader and we only get StopIteration when we're after the final
-        # line of input.
-        i = PutBackIterator(s.splitlines(True) + [""])
-        self._stateMachine (i)
-
-    def readKickstart(self, f, reset=True):
-        """Process a kickstart file, given by the filename f."""
-        if reset:
-            self._reset()
-
-        # an %include might not specify a full path.  if we don't try to figure
-        # out what the path should have been, then we're unable to find it
-        # requiring full path specification, though, sucks.  so let's make
-        # the reading "smart" by keeping track of what the path is at each
-        # include depth.
-        if not os.path.exists(f):
-            if self.currentdir.has_key(self._includeDepth - 1):
-                if os.path.exists(os.path.join(self.currentdir[self._includeDepth - 1], f)):
-                    f = os.path.join(self.currentdir[self._includeDepth - 1], f)
-
-        cd = os.path.dirname(f)
-        if not cd.startswith("/"):
-            cd = os.path.abspath(cd)
-        self.currentdir[self._includeDepth] = cd
-
-        try:
-            s = file(f).read()
-        except IOError, e:
-            raise KickstartError, formatErrorMsg(0, msg=_("Unable to open input kickstart file: %s") % e.strerror)
-
-        self.readKickstartFromString(s, reset=False)
-
-    def setupSections(self):
-        """Install the sections all kickstart files support.  You may override
-           this method in a subclass, but should avoid doing so unless you know
-           what you're doing.
-        """
-        self._sections = {}
-
-        # Install the sections all kickstart files support.
-        self.registerSection(PreScriptSection(self.handler, dataObj=Script))
-        self.registerSection(PostScriptSection(self.handler, dataObj=Script))
-        self.registerSection(TracebackScriptSection(self.handler, dataObj=Script))
-        self.registerSection(PackageSection(self.handler))
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/sections.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/sections.py
deleted file mode 100644
index 44df856..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/sections.py
+++ /dev/null
@@ -1,244 +0,0 @@
-#
-# sections.py:  Kickstart file sections.
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2011 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-"""
-This module exports the classes that define a section of a kickstart file.  A
-section is a chunk of the file starting with a %tag and ending with a %end.
-Examples of sections include %packages, %pre, and %post.
-
-You may use this module to define your own custom sections which will be
-treated just the same as a predefined one by the kickstart parser.  All that
-is necessary is to create a new subclass of Section and call
-parser.registerSection with an instance of your new class.
-"""
-from constants import *
-from options import KSOptionParser
-from version import *
-
-class Section(object):
-    """The base class for defining kickstart sections.  You are free to
-       subclass this as appropriate.
-
-       Class attributes:
-
-       allLines    -- Does this section require the parser to call handleLine
-                      for every line in the section, even blanks and comments?
-       sectionOpen -- The string that denotes the start of this section.  You
-                      must start your tag with a percent sign.
-       timesSeen   -- This attribute is for informational purposes only.  It is
-                      incremented every time handleHeader is called to keep
-                      track of the number of times a section of this type is
-                      seen.
-    """
-    allLines = False
-    sectionOpen = ""
-    timesSeen = 0
-
-    def __init__(self, handler, **kwargs):
-        """Create a new Script instance.  At the least, you must pass in an
-           instance of a baseHandler subclass.
-
-           Valid kwargs:
-
-           dataObj --
-        """
-        self.handler = handler
-
-        self.version = self.handler.version
-
-        self.dataObj = kwargs.get("dataObj", None)
-
-    def finalize(self):
-        """This method is called when the %end tag for a section is seen.  It
-           is not required to be provided.
-        """
-        pass
-
-    def handleLine(self, line):
-        """This method is called for every line of a section.  Take whatever
-           action is appropriate.  While this method is not required to be
-           provided, not providing it does not make a whole lot of sense.
-
-           Arguments:
-
-           line -- The complete line, with any trailing newline.
-        """
-        pass
-
-    def handleHeader(self, lineno, args):
-        """This method is called when the opening tag for a section is seen.
-           Not all sections will need this method, though all provided with
-           kickstart include one.
-
-           Arguments:
-
-           args -- A list of all strings passed as arguments to the section
-                   opening tag.
-        """
-        self.timesSeen += 1
-
-class NullSection(Section):
-    """This defines a section that pykickstart will recognize but do nothing
-       with.  If the parser runs across a %section that has no object registered,
-       it will raise an error.  Sometimes, you may want to simply ignore those
-       sections instead.  This class is useful for that purpose.
-    """
-    def __init__(self, *args, **kwargs):
-        """Create a new NullSection instance.  You must pass a sectionOpen
-           parameter (including a leading '%') for the section you wish to
-           ignore.
-        """
-        Section.__init__(self, *args, **kwargs)
-        self.sectionOpen = kwargs.get("sectionOpen")
-
-class ScriptSection(Section):
-    allLines = True
-
-    def __init__(self, *args, **kwargs):
-        Section.__init__(self, *args, **kwargs)
-        self._script = {}
-        self._resetScript()
-
-    def _getParser(self):
-        op = KSOptionParser(self.version)
-        op.add_option("--erroronfail", dest="errorOnFail", action="store_true",
-                      default=False)
-        op.add_option("--interpreter", dest="interpreter", default="/bin/sh")
-        op.add_option("--log", "--logfile", dest="log")
-        return op
-
-    def _resetScript(self):
-        self._script = {"interp": "/bin/sh", "log": None, "errorOnFail": False,
-                        "lineno": None, "chroot": False, "body": []}
-
-    def handleLine(self, line):
-        self._script["body"].append(line)
-
-    def finalize(self):
-        if " ".join(self._script["body"]).strip() == "":
-            return
-
-        kwargs = {"interp": self._script["interp"],
-                  "inChroot": self._script["chroot"],
-                  "lineno": self._script["lineno"],
-                  "logfile": self._script["log"],
-                  "errorOnFail": self._script["errorOnFail"],
-                  "type": self._script["type"]}
-
-        s = self.dataObj (self._script["body"], **kwargs)
-        self._resetScript()
-
-        if self.handler:
-            self.handler.scripts.append(s)
-
-    def handleHeader(self, lineno, args):
-        """Process the arguments to a %pre/%post/%traceback header for later
-           setting on a Script instance once the end of the script is found.
-           This method may be overridden in a subclass if necessary.
-        """
-        Section.handleHeader(self, lineno, args)
-        op = self._getParser()
-
-        (opts, extra) = op.parse_args(args=args[1:], lineno=lineno)
-
-        self._script["interp"] = opts.interpreter
-        self._script["lineno"] = lineno
-        self._script["log"] = opts.log
-        self._script["errorOnFail"] = opts.errorOnFail
-        if hasattr(opts, "nochroot"):
-            self._script["chroot"] = not opts.nochroot
-
-class PreScriptSection(ScriptSection):
-    sectionOpen = "%pre"
-
-    def _resetScript(self):
-        ScriptSection._resetScript(self)
-        self._script["type"] = KS_SCRIPT_PRE
-
-class PostScriptSection(ScriptSection):
-    sectionOpen = "%post"
-
-    def _getParser(self):
-        op = ScriptSection._getParser(self)
-        op.add_option("--nochroot", dest="nochroot", action="store_true",
-                      default=False)
-        return op
-
-    def _resetScript(self):
-        ScriptSection._resetScript(self)
-        self._script["chroot"] = True
-        self._script["type"] = KS_SCRIPT_POST
-
-class TracebackScriptSection(ScriptSection):
-    sectionOpen = "%traceback"
-
-    def _resetScript(self):
-        ScriptSection._resetScript(self)
-        self._script["type"] = KS_SCRIPT_TRACEBACK
-
-class PackageSection(Section):
-    sectionOpen = "%packages"
-
-    def handleLine(self, line):
-        if not self.handler:
-            return
-
-        (h, s, t) = line.partition('#')
-        line = h.rstrip()
-
-        self.handler.packages.add([line])
-
-    def handleHeader(self, lineno, args):
-        """Process the arguments to the %packages header and set attributes
-           on the Version's Packages instance appropriate.  This method may be
-           overridden in a subclass if necessary.
-        """
-        Section.handleHeader(self, lineno, args)
-        op = KSOptionParser(version=self.version)
-        op.add_option("--excludedocs", dest="excludedocs", action="store_true",
-                      default=False)
-        op.add_option("--ignoremissing", dest="ignoremissing",
-                      action="store_true", default=False)
-        op.add_option("--nobase", dest="nobase", action="store_true",
-                      default=False)
-        op.add_option("--ignoredeps", dest="resolveDeps", action="store_false",
-                      deprecated=FC4, removed=F9)
-        op.add_option("--resolvedeps", dest="resolveDeps", action="store_true",
-                      deprecated=FC4, removed=F9)
-        op.add_option("--default", dest="defaultPackages", action="store_true",
-                      default=False, introduced=F7)
-        op.add_option("--instLangs", dest="instLangs", type="string",
-                      default="", introduced=F9)
-
-        (opts, extra) = op.parse_args(args=args[1:], lineno=lineno)
-
-        self.handler.packages.excludeDocs = opts.excludedocs
-        self.handler.packages.addBase = not opts.nobase
-        if opts.ignoremissing:
-            self.handler.packages.handleMissing = KS_MISSING_IGNORE
-        else:
-            self.handler.packages.handleMissing = KS_MISSING_PROMPT
-
-        if opts.defaultPackages:
-            self.handler.packages.default = True
-
-        if opts.instLangs:
-            self.handler.packages.instLangs = opts.instLangs
diff --git a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/version.py b/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/version.py
deleted file mode 100644
index 8a8e6aa..0000000
--- a/yocto-poky/scripts/lib/wic/3rdparty/pykickstart/version.py
+++ /dev/null
@@ -1,168 +0,0 @@
-#
-# Chris Lumens <clumens@redhat.com>
-#
-# Copyright 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
-#
-# This copyrighted material is made available to anyone wishing to use, modify,
-# copy, or redistribute it subject to the terms and conditions of the GNU
-# General Public License v.2.  This program is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
-# implied warranties 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.  Any Red Hat
-# trademarks that are incorporated in the source code or documentation are not
-# subject to the GNU General Public License and may only be used or replicated
-# with the express permission of Red Hat, Inc. 
-#
-"""
-Methods for working with kickstart versions.
-
-This module defines several symbolic constants that specify kickstart syntax
-versions.  Each version corresponds roughly to one release of Red Hat Linux,
-Red Hat Enterprise Linux, or Fedora Core as these are where most syntax
-changes take place.
-
-This module also exports several functions:
-
-    makeVersion - Given a version number, return an instance of the
-                  matching handler class.
-
-    returnClassForVersion - Given a version number, return the matching
-                            handler class.  This does not return an
-                            instance of that class, however.
-
-    stringToVersion - Convert a string representation of a version number
-                      into the symbolic constant.
-
-    versionToString - Perform the reverse mapping.
-
-    versionFromFile - Read a kickstart file and determine the version of
-                      syntax it uses.  This requires the kickstart file to
-                      have a version= comment in it.
-"""
-import imputil, re, sys
-
-import gettext
-_ = lambda x: gettext.ldgettext("pykickstart", x)
-
-from pykickstart.errors import KickstartVersionError
-
-# Symbolic names for internal version numbers.
-RHEL3 = 900
-FC3 = 1000
-RHEL4 = 1100
-FC4 = 2000
-FC5 = 3000
-FC6 = 4000
-RHEL5 = 4100
-F7  = 5000
-F8 = 6000
-F9 = 7000
-F10 = 8000
-F11 = 9000
-F12 = 10000
-F13 = 11000
-RHEL6 = 11100
-F14 = 12000
-F15 = 13000
-F16 = 14000
-
-# This always points at the latest version and is the default.
-DEVEL = F16
-
-# A one-to-one mapping from string representations to version numbers.
-versionMap = {
-        "DEVEL": DEVEL,
-        "FC3": FC3, "FC4": FC4, "FC5": FC5, "FC6": FC6, "F7": F7, "F8": F8,
-        "F9": F9, "F10": F10, "F11": F11, "F12": F12, "F13": F13,
-        "F14": F14, "F15": F15, "F16": F16,
-        "RHEL3": RHEL3, "RHEL4": RHEL4, "RHEL5": RHEL5, "RHEL6": RHEL6
-}
-
-def stringToVersion(s):
-    """Convert string into one of the provided version constants.  Raises
-       KickstartVersionError if string does not match anything.
-    """
-    # First try these short forms.
-    try:
-        return versionMap[s.upper()]
-    except KeyError:
-        pass
-
-    # Now try the Fedora versions.
-    m = re.match("^fedora.* (\d+)$", s, re.I)
-
-    if m and m.group(1):
-        if versionMap.has_key("FC" + m.group(1)):
-            return versionMap["FC" + m.group(1)]
-        elif versionMap.has_key("F" + m.group(1)):
-            return versionMap["F" + m.group(1)]
-        else:
-            raise KickstartVersionError(_("Unsupported version specified: %s") % s)
-
-    # Now try the RHEL versions.
-    m = re.match("^red hat enterprise linux.* (\d+)([\.\d]*)$", s, re.I)
-
-    if m and m.group(1):
-        if versionMap.has_key("RHEL" + m.group(1)):
-            return versionMap["RHEL" + m.group(1)]
-        else:
-            raise KickstartVersionError(_("Unsupported version specified: %s") % s)
-
-    # If nothing else worked, we're out of options.
-    raise KickstartVersionError(_("Unsupported version specified: %s") % s)
-
-def versionToString(version, skipDevel=False):
-    """Convert version into a string representation of the version number.
-       This is the reverse operation of stringToVersion.  Raises
-       KickstartVersionError if version does not match anything.
-    """
-    if not skipDevel and version == versionMap["DEVEL"]:
-        return "DEVEL"
-
-    for (key, val) in versionMap.iteritems():
-        if key == "DEVEL":
-            continue
-        elif val == version:
-            return key
-
-    raise KickstartVersionError(_("Unsupported version specified: %s") % version)
-
-def returnClassForVersion(version=DEVEL):
-    """Return the class of the syntax handler for version.  version can be
-       either a string or the matching constant.  Raises KickstartValueError
-       if version does not match anything.
-    """
-    try:
-        version = int(version)
-        module = "%s" % versionToString(version, skipDevel=True)
-    except ValueError:
-        module = "%s" % version
-        version = stringToVersion(version)
-
-    module = module.lower()
-
-    try:
-        import pykickstart.handlers
-        sys.path.extend(pykickstart.handlers.__path__)
-        found = imputil.imp.find_module(module)
-        loaded = imputil.imp.load_module(module, found[0], found[1], found[2])
-
-        for (k, v) in loaded.__dict__.iteritems():
-            if k.lower().endswith("%shandler" % module):
-                return v
-    except:
-        raise KickstartVersionError(_("Unsupported version specified: %s") % version)
-
-def makeVersion(version=DEVEL):
-    """Return a new instance of the syntax handler for version.  version can be
-       either a string or the matching constant.  This function is useful for
-       standalone programs which just need to handle a specific version of
-       kickstart syntax (as provided by a command line argument, for example)
-       and need to instantiate the correct object.
-    """
-    cl = returnClassForVersion(version)
-    return cl()
diff --git a/yocto-poky/scripts/lib/wic/canned-wks/common.wks.inc b/yocto-poky/scripts/lib/wic/canned-wks/common.wks.inc
new file mode 100644
index 0000000..5cf2fd1
--- /dev/null
+++ b/yocto-poky/scripts/lib/wic/canned-wks/common.wks.inc
@@ -0,0 +1,3 @@
+# This file is included into 3 canned wks files from this directory
+part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
+part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
diff --git a/yocto-poky/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg b/yocto-poky/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg
new file mode 100644
index 0000000..a16bd6a
--- /dev/null
+++ b/yocto-poky/scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg
@@ -0,0 +1,11 @@
+# This is an example configuration file for syslinux.
+PROMPT 0
+TIMEOUT 10
+
+ALLOWOPTIONS 1
+SERIAL 0 115200
+
+DEFAULT boot
+LABEL boot
+KERNEL /vmlinuz
+APPEND label=boot root=/dev/sda2 rootwait rootfstype=ext4 video=vesafb vga=0x318 console=tty0
diff --git a/yocto-poky/scripts/lib/wic/canned-wks/directdisk-bootloader-config.wks b/yocto-poky/scripts/lib/wic/canned-wks/directdisk-bootloader-config.wks
new file mode 100644
index 0000000..3529e05
--- /dev/null
+++ b/yocto-poky/scripts/lib/wic/canned-wks/directdisk-bootloader-config.wks
@@ -0,0 +1,8 @@
+# short-description: Create a 'pcbios' direct disk image with custom bootloader config
+# long-description: Creates a partitioned legacy BIOS disk image that the user
+# can directly dd to boot media. The bootloader configuration source is a user file.
+
+include common.wks.inc
+
+bootloader --configfile="directdisk-bootloader-config.cfg"
+
diff --git a/yocto-poky/scripts/lib/wic/canned-wks/directdisk.wks b/yocto-poky/scripts/lib/wic/canned-wks/directdisk.wks
index af4c9ea..6db74a7 100644
--- a/yocto-poky/scripts/lib/wic/canned-wks/directdisk.wks
+++ b/yocto-poky/scripts/lib/wic/canned-wks/directdisk.wks
@@ -2,9 +2,7 @@
 # long-description: Creates a partitioned legacy BIOS disk image that the user
 # can directly dd to boot media.
 
-
-part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
-part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
+include common.wks.inc
 
 bootloader  --timeout=0  --append="rootwait rootfstype=ext4 video=vesafb vga=0x318 console=tty0"
 
diff --git a/yocto-poky/scripts/lib/wic/canned-wks/qemux86-directdisk.wks b/yocto-poky/scripts/lib/wic/canned-wks/qemux86-directdisk.wks
index 8fc38b5..a6518a0 100644
--- a/yocto-poky/scripts/lib/wic/canned-wks/qemux86-directdisk.wks
+++ b/yocto-poky/scripts/lib/wic/canned-wks/qemux86-directdisk.wks
@@ -2,9 +2,7 @@
 # long-description: Creates a partitioned legacy BIOS disk image that the user
 # can directly use to boot a qemu machine.
 
-
-part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024
-part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024
+include common.wks.inc
 
 bootloader  --timeout=0  --append="vga=0 uvesafb.mode_option=640x480-32 root=/dev/vda2 rw mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 oprofile.timer=1 rootfstype=ext4 "
 
diff --git a/yocto-poky/scripts/lib/wic/conf.py b/yocto-poky/scripts/lib/wic/conf.py
index 1d4363a..f7d56d0 100644
--- a/yocto-poky/scripts/lib/wic/conf.py
+++ b/yocto-poky/scripts/lib/wic/conf.py
@@ -17,8 +17,8 @@
 
 import os
 
+from wic.ksparser import KickStart, KickStartError
 from wic import msger
-from wic import kickstart
 from wic.utils import misc
 
 
@@ -87,7 +87,10 @@
         if not ksconf:
             return
 
-        ksobj = kickstart.read_kickstart(ksconf)
+        try:
+            ksobj = KickStart(ksconf)
+        except KickStartError as err:
+            msger.error(str(err))
 
         self.create['ks'] = ksobj
         self.create['name'] = os.path.splitext(os.path.basename(ksconf))[0]
diff --git a/yocto-poky/scripts/lib/wic/help.py b/yocto-poky/scripts/lib/wic/help.py
index 9a778b6..405d25a 100644
--- a/yocto-poky/scripts/lib/wic/help.py
+++ b/yocto-poky/scripts/lib/wic/help.py
@@ -617,7 +617,7 @@
        This command creates a partition on the system and uses the
        following syntax:
 
-         part <mountpoint>
+         part [<mountpoint>]
 
        The <mountpoint> is where the partition will be mounted and
        must take of one of the following forms:
@@ -626,6 +626,16 @@
 
          swap: The partition will be used as swap space.
 
+       If a <mountpoint> is not specified the partition will be created
+       but will not be mounted.
+
+       Partitions with a <mountpoint> specified will be automatically mounted.
+       This is achieved by wic adding entries to the fstab during image
+       generation. In order for a valid fstab to be generated one of the
+       --ondrive, --ondisk or --use-uuid partition options must be used for
+       each partition that specifies a mountpoint.
+
+
        The following are supported 'part' options:
 
          --size: The minimum partition size. Specify an integer value
@@ -740,8 +750,28 @@
                   bootloader command-line - for example, the syslinux
                   APPEND or grub kernel command line.
 
+        --configfile: Specifies a user defined configuration file for
+                      the bootloader. This file must be located in the
+                      canned-wks folder or could be the full path to the
+                      file. Using this option will override any other
+                      bootloader option.
+
       Note that bootloader functionality and boot partitions are
       implemented by the various --source plugins that implement
       bootloader functionality; the bootloader command essentially
       provides a means of modifying bootloader configuration.
+
+    * include
+
+      This command allows the user to include the content of .wks file
+      into original .wks file.
+
+      Command uses the following syntax:
+
+         include <file>
+
+      The <file> is either path to the file or its name. If name is
+      specified wic will try to find file in the directories with canned
+      .wks files.
+
 """
diff --git a/yocto-poky/scripts/lib/wic/imager/baseimager.py b/yocto-poky/scripts/lib/wic/imager/baseimager.py
index acbe948..760cf8a 100644
--- a/yocto-poky/scripts/lib/wic/imager/baseimager.py
+++ b/yocto-poky/scripts/lib/wic/imager/baseimager.py
@@ -85,7 +85,7 @@
         # No ks provided when called by convertor, so skip the dependency check
         if self.ks:
             # If we have btrfs partition we need to check necessary tools
-            for part in self.ks.handler.partition.partitions:
+            for part in self.ks.partitions:
                 if part.fstype and part.fstype == "btrfs":
                     self._dep_checks.append("mkfs.btrfs")
                     break
diff --git a/yocto-poky/scripts/lib/wic/imager/direct.py b/yocto-poky/scripts/lib/wic/imager/direct.py
index d5603fa..a1b4249 100644
--- a/yocto-poky/scripts/lib/wic/imager/direct.py
+++ b/yocto-poky/scripts/lib/wic/imager/direct.py
@@ -27,7 +27,7 @@
 import os
 import shutil
 
-from wic import kickstart, msger
+from wic import msger
 from wic.utils import fs_related
 from wic.utils.oe.misc import get_bitbake_var
 from wic.utils.partitionedfs import Image
@@ -64,7 +64,7 @@
         self.__disks = {}
         self.__disk_format = "direct"
         self._disk_names = []
-        self.ptable_format = self.ks.handler.bootloader.ptable
+        self.ptable_format = self.ks.bootloader.ptable
 
         self.oe_builddir = oe_builddir
         if image_output_dir:
@@ -151,15 +151,15 @@
                                "please check your kickstart setting.")
 
         # Set a default partition if no partition is given out
-        if not self.ks.handler.partition.partitions:
+        if not self.ks.partitions:
             partstr = "part / --size 1900 --ondisk sda --fstype=ext3"
             args = partstr.split()
-            part = self.ks.handler.partition.parse(args[1:])
-            if part not in self.ks.handler.partition.partitions:
-                self.ks.handler.partition.partitions.append(part)
+            part = self.ks.parse(args[1:])
+            if part not in self.ks.partitions:
+                self.ks.partitions.append(part)
 
         # partitions list from kickstart file
-        return kickstart.get_partitions(self.ks)
+        return self.ks.partitions
 
     def get_disk_names(self):
         """ Returns a list of physical target disk names (e.g., 'sdb') which
@@ -206,7 +206,7 @@
         bootloader object, the default can be explicitly set using the
         --source bootloader param.
         """
-        return self.ks.handler.bootloader.source
+        return self.ks.bootloader.source
 
     #
     # Actual implemention
@@ -224,16 +224,19 @@
         for part in parts:
             # as a convenience, set source to the boot partition source
             # instead of forcing it to be set via bootloader --source
-            if not self.ks.handler.bootloader.source and part.mountpoint == "/boot":
-                self.ks.handler.bootloader.source = part.source
+            if not self.ks.bootloader.source and part.mountpoint == "/boot":
+                self.ks.bootloader.source = part.source
 
         fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
 
+        shutil.rmtree(self.workdir)
+        os.mkdir(self.workdir)
+
         for part in parts:
             # get rootfs size from bitbake variable if it's not set in .ks file
             if not part.size:
                 # and if rootfs name is specified for the partition
-                image_name = part.get_rootfs()
+                image_name = part.rootfs_dir
                 if image_name:
                     # Bitbake variable ROOTFS_SIZE is calculated in
                     # Image._get_rootfs_size method from meta/lib/oe/image.py
@@ -336,13 +339,13 @@
 
         msg += 'The following build artifacts were used to create the image(s):\n'
         for part in parts:
-            if part.get_rootfs() is None:
+            if part.rootfs_dir is None:
                 continue
             if part.mountpoint == '/':
                 suffix = ':'
             else:
                 suffix = '["%s"]:' % (part.mountpoint or part.label)
-            msg += '  ROOTFS_DIR%s%s\n' % (suffix.ljust(20), part.get_rootfs())
+            msg += '  ROOTFS_DIR%s%s\n' % (suffix.ljust(20), part.rootfs_dir)
 
         msg += '  BOOTIMG_DIR:                  %s\n' % self.bootimg_dir
         msg += '  KERNEL_DIR:                   %s\n' % self.kernel_dir
diff --git a/yocto-poky/scripts/lib/wic/kickstart/__init__.py b/yocto-poky/scripts/lib/wic/kickstart/__init__.py
deleted file mode 100644
index c9b0e51..0000000
--- a/yocto-poky/scripts/lib/wic/kickstart/__init__.py
+++ /dev/null
@@ -1,122 +0,0 @@
-#!/usr/bin/env python -tt
-#
-# Copyright (c) 2007 Red Hat, Inc.
-# Copyright (c) 2009, 2010, 2011 Intel, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; version 2 of the License
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc., 59
-# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import os, sys, re
-import shutil
-import subprocess
-import string
-
-import pykickstart.sections as kssections
-import pykickstart.commands as kscommands
-import pykickstart.constants as ksconstants
-import pykickstart.errors as kserrors
-import pykickstart.parser as ksparser
-import pykickstart.version as ksversion
-from pykickstart.handlers.control import commandMap
-from pykickstart.handlers.control import dataMap
-
-from wic import msger
-from wic.utils import errors, misc, runner, fs_related as fs
-from custom_commands import wicboot, partition
-
-def read_kickstart(path):
-    """Parse a kickstart file and return a KickstartParser instance.
-
-    This is a simple utility function which takes a path to a kickstart file,
-    parses it and returns a pykickstart KickstartParser instance which can
-    be then passed to an ImageCreator constructor.
-
-    If an error occurs, a CreatorError exception is thrown.
-    """
-
-    #version = ksversion.makeVersion()
-    #ks = ksparser.KickstartParser(version)
-
-    using_version = ksversion.DEVEL
-    commandMap[using_version]["bootloader"] = wicboot.Wic_Bootloader
-    commandMap[using_version]["part"] = partition.Wic_Partition
-    commandMap[using_version]["partition"] = partition.Wic_Partition
-    dataMap[using_version]["PartData"] = partition.Wic_PartData
-    superclass = ksversion.returnClassForVersion(version=using_version)
-
-    class KSHandlers(superclass):
-        def __init__(self):
-            superclass.__init__(self, mapping=commandMap[using_version])
-
-    kickstart = ksparser.KickstartParser(KSHandlers(), errorsAreFatal=True)
-
-    try:
-        kickstart.readKickstart(path)
-    except (kserrors.KickstartParseError, kserrors.KickstartError), err:
-        msger.warning("Errors occurred when parsing kickstart file: %s\n" % path)
-        msger.error("%s" % err)
-
-    return kickstart
-
-def get_image_size(kickstart, default=None):
-    __size = 0
-    for part in kickstart.handler.partition.partitions:
-        if part.mountpoint == "/" and part.size:
-            __size = part.size
-    if __size > 0:
-        return int(__size) * 1024L
-    else:
-        return default
-
-def get_image_fstype(kickstart, default=None):
-    for part in kickstart.handler.partition.partitions:
-        if part.mountpoint == "/" and part.fstype:
-            return part.fstype
-    return default
-
-def get_image_fsopts(kickstart, default=None):
-    for part in kickstart.handler.partition.partitions:
-        if part.mountpoint == "/" and part.fsopts:
-            return part.fsopts
-    return default
-
-def get_timeout(kickstart, default=None):
-    if not hasattr(kickstart.handler.bootloader, "timeout"):
-        return default
-    if kickstart.handler.bootloader.timeout is None:
-        return default
-    return int(kickstart.handler.bootloader.timeout)
-
-def get_kernel_args(kickstart, default="ro rd.live.image"):
-    if not hasattr(kickstart.handler.bootloader, "appendLine"):
-        return default
-    if kickstart.handler.bootloader.appendLine is None:
-        return default
-    return "%s %s" %(default, kickstart.handler.bootloader.appendLine)
-
-def get_menu_args(kickstart, default=""):
-    if not hasattr(kickstart.handler.bootloader, "menus"):
-        return default
-    if kickstart.handler.bootloader.menus in (None, ""):
-        return default
-    return "%s" % kickstart.handler.bootloader.menus
-
-def get_default_kernel(kickstart, default=None):
-    if not hasattr(kickstart.handler.bootloader, "default"):
-        return default
-    if not kickstart.handler.bootloader.default:
-        return default
-    return kickstart.handler.bootloader.default
-
-def get_partitions(kickstart):
-    return kickstart.handler.partition.partitions
diff --git a/yocto-poky/scripts/lib/wic/kickstart/custom_commands/__init__.py b/yocto-poky/scripts/lib/wic/kickstart/custom_commands/__init__.py
deleted file mode 100644
index e4ae406..0000000
--- a/yocto-poky/scripts/lib/wic/kickstart/custom_commands/__init__.py
+++ /dev/null
@@ -1,7 +0,0 @@
-from partition import Wic_Partition
-from partition import Wic_PartData
-
-__all__ = (
-    "Wic_Partition",
-    "Wic_PartData",
-)
diff --git a/yocto-poky/scripts/lib/wic/kickstart/custom_commands/partition.py b/yocto-poky/scripts/lib/wic/kickstart/custom_commands/partition.py
deleted file mode 100644
index eee25a4..0000000
--- a/yocto-poky/scripts/lib/wic/kickstart/custom_commands/partition.py
+++ /dev/null
@@ -1,526 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2013, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# This module provides the OpenEmbedded partition object definitions.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] linux.intel.com>
-#
-
-import os
-import tempfile
-import uuid
-from optparse import OptionValueError
-
-from pykickstart.commands.partition import FC4_PartData, FC4_Partition
-from wic.utils.oe.misc import msger, parse_sourceparams
-from wic.utils.oe.misc import exec_cmd, exec_native_cmd
-from wic.plugin import pluginmgr
-
-partition_methods = {
-    "do_stage_partition":None,
-    "do_prepare_partition":None,
-    "do_configure_partition":None,
-}
-
-class Wic_PartData(FC4_PartData):
-    removedKeywords = FC4_PartData.removedKeywords
-    removedAttrs = FC4_PartData.removedAttrs
-
-    def __init__(self, *args, **kwargs):
-        FC4_PartData.__init__(self, *args, **kwargs)
-        self.deleteRemovedAttrs()
-        self.align = kwargs.get("align", None)
-        self.extopts = kwargs.get("extopts", None)
-        self.part_type = kwargs.get("part_type", None)
-        self.source = kwargs.get("source", None)
-        self.sourceparams = kwargs.get("sourceparams", None)
-        self.rootfs = kwargs.get("rootfs-dir", None)
-        self.no_table = kwargs.get("no-table", False)
-        self.extra_space = kwargs.get("extra-space", "10M")
-        self.overhead_factor = kwargs.get("overhead-factor", 1.3)
-        self._use_uuid = False
-        self.uuid = kwargs.get("uuid", None)
-        self.use_uuid = kwargs.get("use-uuid", False)
-        self.source_file = ""
-        self.size = 0
-
-    def _getArgsAsStr(self):
-        retval = FC4_PartData._getArgsAsStr(self)
-
-        if self.align:
-            retval += " --align=%d" % self.align
-        if self.extopts:
-            retval += " --extoptions=%s" % self.extopts
-        if self.part_type:
-            retval += " --part-type=%s" % self.part_type
-        if self.source:
-            retval += " --source=%s" % self.source
-            if self.sourceparams:
-                retval += " --sourceparams=%s" % self.sourceparams
-            if self.rootfs:
-                retval += " --rootfs-dir=%s" % self.rootfs
-        if self.no_table:
-            retval += " --no-table"
-        if self.use_uuid:
-            retval += " --use-uuid"
-        if self.uuid:
-            retval += " --uuid=%s" % self.uuid
-        retval += " --extra-space=%s" % self.extra_space
-        retval += " --overhead-factor=%f" % self.overhead_factor
-
-        return retval
-
-    @property
-    def use_uuid(self):
-        return self._use_uuid
-
-    @use_uuid.setter
-    def use_uuid(self, value):
-        self._use_uuid = value
-        if value and not self.uuid:
-            self.uuid = str(uuid.uuid4())
-
-    def get_rootfs(self):
-        """
-        Acessor for rootfs dir
-        """
-        return self.rootfs
-
-    def set_rootfs(self, rootfs):
-        """
-        Acessor for actual rootfs dir, which must be set by source
-        plugins.
-        """
-        self.rootfs = rootfs
-
-    def get_size(self):
-        """
-        Accessor for partition size, 0 or --size before set_size().
-        """
-        return self.size
-
-    def set_size(self, size):
-        """
-        Accessor for actual partition size, which must be set by source
-        plugins.
-        """
-        self.size = size
-
-    def set_source_file(self, source_file):
-        """
-        Accessor for source_file, the location of the generated partition
-        image, which must be set by source plugins.
-        """
-        self.source_file = source_file
-
-    def get_extra_block_count(self, current_blocks):
-        """
-        The --size param is reflected in self.size (in kB), and we already
-        have current_blocks (1k) blocks, calculate and return the
-        number of (1k) blocks we need to add to get to --size, 0 if
-        we're already there or beyond.
-        """
-        msger.debug("Requested partition size for %s: %d" % \
-                    (self.mountpoint, self.size))
-
-        if not self.size:
-            return 0
-
-        requested_blocks = self.size
-
-        msger.debug("Requested blocks %d, current_blocks %d" % \
-                    (requested_blocks, current_blocks))
-
-        if requested_blocks > current_blocks:
-            return requested_blocks - current_blocks
-        else:
-            return 0
-
-    def prepare(self, creator, cr_workdir, oe_builddir, rootfs_dir, bootimg_dir,
-                kernel_dir, native_sysroot):
-        """
-        Prepare content for individual partitions, depending on
-        partition command parameters.
-        """
-        self.sourceparams_dict = {}
-
-        if self.sourceparams:
-            self.sourceparams_dict = parse_sourceparams(self.sourceparams)
-
-        if not self.source:
-            if not self.size:
-                msger.error("The %s partition has a size of zero.  Please "
-                            "specify a non-zero --size for that partition." % \
-                            self.mountpoint)
-            if self.fstype and self.fstype == "swap":
-                self.prepare_swap_partition(cr_workdir, oe_builddir,
-                                            native_sysroot)
-            elif self.fstype:
-                rootfs = "%s/fs_%s.%s.%s" % (cr_workdir, self.label,
-                                             self.lineno, self.fstype)
-                if os.path.isfile(rootfs):
-                    os.remove(rootfs)
-                for prefix in ("ext", "btrfs", "vfat", "squashfs"):
-                    if self.fstype.startswith(prefix):
-                        method = getattr(self,
-                                         "prepare_empty_partition_" + prefix)
-                        method(rootfs, oe_builddir, native_sysroot)
-                        self.source_file = rootfs
-                        break
-            return
-
-        plugins = pluginmgr.get_source_plugins()
-
-        if self.source not in plugins:
-            msger.error("The '%s' --source specified for %s doesn't exist.\n\t"
-                        "See 'wic list source-plugins' for a list of available"
-                        " --sources.\n\tSee 'wic help source-plugins' for "
-                        "details on adding a new source plugin." % \
-                        (self.source, self.mountpoint))
-
-        self._source_methods = pluginmgr.get_source_plugin_methods(\
-                                   self.source, partition_methods)
-        self._source_methods["do_configure_partition"](self, self.sourceparams_dict,
-                                                       creator, cr_workdir,
-                                                       oe_builddir,
-                                                       bootimg_dir,
-                                                       kernel_dir,
-                                                       native_sysroot)
-        self._source_methods["do_stage_partition"](self, self.sourceparams_dict,
-                                                   creator, cr_workdir,
-                                                   oe_builddir,
-                                                   bootimg_dir, kernel_dir,
-                                                   native_sysroot)
-        self._source_methods["do_prepare_partition"](self, self.sourceparams_dict,
-                                                     creator, cr_workdir,
-                                                     oe_builddir,
-                                                     bootimg_dir, kernel_dir, rootfs_dir,
-                                                     native_sysroot)
-
-    def prepare_rootfs_from_fs_image(self, cr_workdir, oe_builddir,
-                                     rootfs_dir):
-        """
-        Handle an already-created partition e.g. xxx.ext3
-        """
-        rootfs = oe_builddir
-        du_cmd = "du -Lbks %s" % rootfs
-        out = exec_cmd(du_cmd)
-        rootfs_size = out.split()[0]
-
-        self.size = rootfs_size
-        self.source_file = rootfs
-
-    def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir,
-                       native_sysroot):
-        """
-        Prepare content for a rootfs partition i.e. create a partition
-        and fill it from a /rootfs dir.
-
-        Currently handles ext2/3/4, btrfs and vfat.
-        """
-        p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot)
-        p_localstatedir = os.environ.get("PSEUDO_LOCALSTATEDIR",
-                                         "%s/../pseudo" % rootfs_dir)
-        p_passwd = os.environ.get("PSEUDO_PASSWD", rootfs_dir)
-        p_nosymlinkexp = os.environ.get("PSEUDO_NOSYMLINKEXP", "1")
-        pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix
-        pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % p_localstatedir
-        pseudo += "export PSEUDO_PASSWD=%s;" % p_passwd
-        pseudo += "export PSEUDO_NOSYMLINKEXP=%s;" % p_nosymlinkexp
-        pseudo += "%s/usr/bin/pseudo " % native_sysroot
-
-        rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label,
-                                         self.lineno, self.fstype)
-        if os.path.isfile(rootfs):
-            os.remove(rootfs)
-
-        for prefix in ("ext", "btrfs", "vfat", "squashfs"):
-            if self.fstype.startswith(prefix):
-                method = getattr(self, "prepare_rootfs_" + prefix)
-                method(rootfs, oe_builddir, rootfs_dir, native_sysroot, pseudo)
-
-                self.source_file = rootfs
-
-                # get the rootfs size in the right units for kickstart (kB)
-                du_cmd = "du -Lbks %s" % rootfs
-                out = exec_cmd(du_cmd)
-                self.size = out.split()[0]
-
-                break
-
-    def prepare_rootfs_ext(self, rootfs, oe_builddir, rootfs_dir,
-                           native_sysroot, pseudo):
-        """
-        Prepare content for an ext2/3/4 rootfs partition.
-        """
-        du_cmd = "du -ks %s" % rootfs_dir
-        out = exec_cmd(du_cmd)
-        actual_rootfs_size = int(out.split()[0])
-
-        extra_blocks = self.get_extra_block_count(actual_rootfs_size)
-        if extra_blocks < self.extra_space:
-            extra_blocks = self.extra_space
-
-        rootfs_size = actual_rootfs_size + extra_blocks
-        rootfs_size *= self.overhead_factor
-
-        msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
-                    (extra_blocks, self.mountpoint, rootfs_size))
-
-        dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=0 bs=1k" % \
-            (rootfs, rootfs_size)
-        exec_cmd(dd_cmd)
-
-        extra_imagecmd = "-i 8192"
-
-        label_str = ""
-        if self.label:
-            label_str = "-L %s" % self.label
-
-        mkfs_cmd = "mkfs.%s -F %s %s %s -d %s" % \
-            (self.fstype, extra_imagecmd, rootfs, label_str, rootfs_dir)
-        exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
-
-    def prepare_rootfs_btrfs(self, rootfs, oe_builddir, rootfs_dir,
-                             native_sysroot, pseudo):
-        """
-        Prepare content for a btrfs rootfs partition.
-
-        Currently handles ext2/3/4 and btrfs.
-        """
-        du_cmd = "du -ks %s" % rootfs_dir
-        out = exec_cmd(du_cmd)
-        actual_rootfs_size = int(out.split()[0])
-
-        extra_blocks = self.get_extra_block_count(actual_rootfs_size)
-        if extra_blocks < self.extra_space:
-            extra_blocks = self.extra_space
-
-        rootfs_size = actual_rootfs_size + extra_blocks
-        rootfs_size *= self.overhead_factor
-
-        msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
-                    (extra_blocks, self.mountpoint, rootfs_size))
-
-        dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=0 bs=1k" % \
-            (rootfs, rootfs_size)
-        exec_cmd(dd_cmd)
-
-        label_str = ""
-        if self.label:
-            label_str = "-L %s" % self.label
-
-        mkfs_cmd = "mkfs.%s -b %d -r %s %s %s" % \
-            (self.fstype, rootfs_size * 1024, rootfs_dir, label_str, rootfs)
-        exec_native_cmd(pseudo + mkfs_cmd, native_sysroot)
-
-    def prepare_rootfs_vfat(self, rootfs, oe_builddir, rootfs_dir,
-                            native_sysroot, pseudo):
-        """
-        Prepare content for a vfat rootfs partition.
-        """
-        du_cmd = "du -bks %s" % rootfs_dir
-        out = exec_cmd(du_cmd)
-        blocks = int(out.split()[0])
-
-        extra_blocks = self.get_extra_block_count(blocks)
-        if extra_blocks < self.extra_space:
-            extra_blocks = self.extra_space
-
-        blocks += extra_blocks
-
-        msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
-                    (extra_blocks, self.mountpoint, blocks))
-
-        # Ensure total sectors is an integral number of sectors per
-        # track or mcopy will complain. Sectors are 512 bytes, and we
-        # generate images with 32 sectors per track. This calculation
-        # is done in blocks, thus the mod by 16 instead of 32. Apply
-        # sector count fix only when needed.
-        if blocks % 16 != 0:
-            blocks += (16 - (blocks % 16))
-
-        label_str = "-n boot"
-        if self.label:
-            label_str = "-n %s" % self.label
-
-        dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, blocks)
-        exec_native_cmd(dosfs_cmd, native_sysroot)
-
-        mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir)
-        exec_native_cmd(mcopy_cmd, native_sysroot)
-
-        chmod_cmd = "chmod 644 %s" % rootfs
-        exec_cmd(chmod_cmd)
-
-    def prepare_rootfs_squashfs(self, rootfs, oe_builddir, rootfs_dir,
-                                native_sysroot, pseudo):
-        """
-        Prepare content for a squashfs rootfs partition.
-        """
-        squashfs_cmd = "mksquashfs %s %s -noappend" % \
-                       (rootfs_dir, rootfs)
-        exec_native_cmd(pseudo + squashfs_cmd, native_sysroot)
-
-    def prepare_empty_partition_ext(self, rootfs, oe_builddir,
-                                    native_sysroot):
-        """
-        Prepare an empty ext2/3/4 partition.
-        """
-        dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
-            (rootfs, self.size)
-        exec_cmd(dd_cmd)
-
-        extra_imagecmd = "-i 8192"
-
-        label_str = ""
-        if self.label:
-            label_str = "-L %s" % self.label
-
-        mkfs_cmd = "mkfs.%s -F %s %s %s" % \
-            (self.fstype, extra_imagecmd, label_str, rootfs)
-        exec_native_cmd(mkfs_cmd, native_sysroot)
-
-    def prepare_empty_partition_btrfs(self, rootfs, oe_builddir,
-                                      native_sysroot):
-        """
-        Prepare an empty btrfs partition.
-        """
-        dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
-            (rootfs, self.size)
-        exec_cmd(dd_cmd)
-
-        label_str = ""
-        if self.label:
-            label_str = "-L %s" % self.label
-
-        mkfs_cmd = "mkfs.%s -b %d %s %s" % \
-            (self.fstype, self.size * 1024, label_str, rootfs)
-        exec_native_cmd(mkfs_cmd, native_sysroot)
-
-    def prepare_empty_partition_vfat(self, rootfs, oe_builddir,
-                                     native_sysroot):
-        """
-        Prepare an empty vfat partition.
-        """
-        blocks = self.size
-
-        label_str = "-n boot"
-        if self.label:
-            label_str = "-n %s" % self.label
-
-        dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, blocks)
-        exec_native_cmd(dosfs_cmd, native_sysroot)
-
-        chmod_cmd = "chmod 644 %s" % rootfs
-        exec_cmd(chmod_cmd)
-
-    def prepare_empty_partition_squashfs(self, cr_workdir, oe_builddir,
-                                         native_sysroot):
-        """
-        Prepare an empty squashfs partition.
-        """
-        msger.warning("Creating of an empty squashfs %s partition was attempted. " \
-                      "Proceeding as requested." % self.mountpoint)
-
-        path = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
-        os.path.isfile(path) and os.remove(path)
-
-        # it is not possible to create a squashfs without source data,
-        # thus prepare an empty temp dir that is used as source
-        tmpdir = tempfile.mkdtemp()
-
-        squashfs_cmd = "mksquashfs %s %s -noappend" % \
-                       (tmpdir, path)
-        exec_native_cmd(squashfs_cmd, native_sysroot)
-
-        os.rmdir(tmpdir)
-
-        # get the rootfs size in the right units for kickstart (kB)
-        du_cmd = "du -Lbks %s" % path
-        out = exec_cmd(du_cmd)
-        fs_size = out.split()[0]
-
-        self.size = fs_size
-
-    def prepare_swap_partition(self, cr_workdir, oe_builddir, native_sysroot):
-        """
-        Prepare a swap partition.
-        """
-        path = "%s/fs.%s" % (cr_workdir, self.fstype)
-
-        dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
-            (path, self.size)
-        exec_cmd(dd_cmd)
-
-        import uuid
-        label_str = ""
-        if self.label:
-            label_str = "-L %s" % self.label
-        mkswap_cmd = "mkswap %s -U %s %s" % (label_str, str(uuid.uuid1()), path)
-        exec_native_cmd(mkswap_cmd, native_sysroot)
-
-
-class Wic_Partition(FC4_Partition):
-    removedKeywords = FC4_Partition.removedKeywords
-    removedAttrs = FC4_Partition.removedAttrs
-
-    def _getParser(self):
-        def overhead_cb(option, opt_str, value, parser):
-            if value < 1:
-                raise OptionValueError("Option %s: invalid value: %r" % \
-                                       (option, value))
-            setattr(parser.values, option.dest, value)
-
-        parser = FC4_Partition._getParser(self)
-
-        # The alignment value is given in kBytes. e.g., value 8 means that
-        # the partition is aligned to start from 8096 byte boundary.
-        parser.add_option("--align", type="int", action="store", dest="align",
-                          default=None)
-        parser.add_option("--extoptions", type="string", action="store", dest="extopts",
-                          default=None)
-        parser.add_option("--part-type", type="string", action="store", dest="part_type",
-                          default=None)
-        # use specified source file to fill the partition
-        # and calculate partition size
-        parser.add_option("--source", type="string", action="store",
-                          dest="source", default=None)
-        # comma-separated list of param=value pairs
-        parser.add_option("--sourceparams", type="string", action="store",
-                          dest="sourceparams", default=None)
-        # use specified rootfs path to fill the partition
-        parser.add_option("--rootfs-dir", type="string", action="store",
-                          dest="rootfs", default=None)
-        # wether to add the partition in the partition table
-        parser.add_option("--no-table", dest="no_table", action="store_true",
-                          default=False)
-        # extra space beyond the partition size
-        parser.add_option("--extra-space", dest="extra_space", action="store",
-                          type="size", nargs=1, default="10M")
-        parser.add_option("--overhead-factor", dest="overhead_factor",
-                          action="callback", callback=overhead_cb, type="float",
-                          nargs=1, default=1.3)
-        parser.add_option("--use-uuid", dest="use_uuid", action="store_true",
-                          default=False)
-        parser.add_option("--uuid")
-
-        return parser
diff --git a/yocto-poky/scripts/lib/wic/kickstart/custom_commands/wicboot.py b/yocto-poky/scripts/lib/wic/kickstart/custom_commands/wicboot.py
deleted file mode 100644
index a3e1852..0000000
--- a/yocto-poky/scripts/lib/wic/kickstart/custom_commands/wicboot.py
+++ /dev/null
@@ -1,60 +0,0 @@
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (c) 2014, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# DESCRIPTION
-# This module provides the OpenEmbedded bootloader object definitions.
-#
-# AUTHORS
-# Tom Zanussi <tom.zanussi (at] linux.intel.com>
-#
-from pykickstart.commands.bootloader import F8_Bootloader
-
-class Wic_Bootloader(F8_Bootloader):
-    def __init__(self, writePriority=10, appendLine="", driveorder=None,
-                 forceLBA=False, location="", md5pass="", password="",
-                 upgrade=False, menus=""):
-        F8_Bootloader.__init__(self, writePriority, appendLine, driveorder,
-                               forceLBA, location, md5pass, password, upgrade)
-
-        self.menus = ""
-        self.ptable = "msdos"
-        self.source = ""
-
-    def _getArgsAsStr(self):
-        retval = F8_Bootloader._getArgsAsStr(self)
-
-        if self.menus == "":
-            retval += " --menus=%s" %(self.menus,)
-        if self.ptable:
-            retval += " --ptable=\"%s\"" %(self.ptable,)
-        if self.source:
-            retval += " --source=%s" % self.source
-
-        return retval
-
-    def _getParser(self):
-        parser = F8_Bootloader._getParser(self)
-        parser.add_option("--menus", dest="menus")
-        parser.add_option("--ptable", dest="ptable", choices=("msdos", "gpt"),
-                          default="msdos")
-        # use specified source plugin to implement bootloader-specific methods
-        parser.add_option("--source", type="string", action="store",
-                      dest="source", default=None)
-        return parser
-
diff --git a/yocto-poky/scripts/lib/wic/ksparser.py b/yocto-poky/scripts/lib/wic/ksparser.py
new file mode 100644
index 0000000..8c3f808
--- /dev/null
+++ b/yocto-poky/scripts/lib/wic/ksparser.py
@@ -0,0 +1,169 @@
+#!/usr/bin/env python -tt
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# Copyright (c) 2016 Intel, Inc.
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the Free
+# Software Foundation; version 2 of the License
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc., 59
+# Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# DESCRIPTION
+# This module provides parser for kickstart format
+#
+# AUTHORS
+# Ed Bartosh <ed.bartosh> (at] linux.intel.com>
+
+"""Kickstart parser module."""
+
+import os
+import shlex
+from argparse import ArgumentParser, ArgumentError, ArgumentTypeError
+
+from wic import msger
+from wic.partition import Partition
+from wic.utils.misc import find_canned
+
+class KickStartError(Exception):
+    """Custom exception."""
+    pass
+
+class KickStartParser(ArgumentParser):
+    """
+    This class overwrites error method to throw exception
+    instead of producing usage message(default argparse behavior).
+    """
+    def error(self, message):
+        raise ArgumentError(None, message)
+
+def sizetype(arg):
+    """
+    Custom type for ArgumentParser
+    Converts size string in <num>[K|k|M|G] format into the integer value
+    """
+    if arg.isdigit():
+        return int(arg) * 1024L
+
+    if not arg[:-1].isdigit():
+        raise ArgumentTypeError("Invalid size: %r" % arg)
+
+    size = int(arg[:-1])
+    if arg.endswith("k") or arg.endswith("K"):
+        return size
+    if arg.endswith("M"):
+        return size * 1024L
+    if arg.endswith("G"):
+        return size * 1024L * 1024L
+
+    raise ArgumentTypeError("Invalid size: %r" % arg)
+
+def overheadtype(arg):
+    """
+    Custom type for ArgumentParser
+    Converts overhead string to float and checks if it's bigger than 1.0
+    """
+    try:
+        result = float(arg)
+    except ValueError:
+        raise ArgumentTypeError("Invalid value: %r" % arg)
+
+    if result < 1.0:
+        raise ArgumentTypeError("Overhead factor should be > 1.0" % arg)
+
+    return result
+
+def cannedpathtype(arg):
+    """
+    Custom type for ArgumentParser
+    Tries to find file in the list of canned wks paths
+    """
+    scripts_path = os.path.abspath(os.path.dirname(__file__) + '../../..')
+    result = find_canned(scripts_path, arg)
+    if not result:
+        raise ArgumentTypeError("file not found: %s" % arg)
+    return result
+
+class KickStart(object):
+    """"Kickstart parser implementation."""
+
+    def __init__(self, confpath):
+
+        self.partitions = []
+        self.bootloader = None
+        self.lineno = 0
+        self.partnum = 0
+
+        parser = KickStartParser()
+        subparsers = parser.add_subparsers()
+
+        part = subparsers.add_parser('part')
+        part.add_argument('mountpoint')
+        part.add_argument('--active', action='store_true')
+        part.add_argument('--align', type=int)
+        part.add_argument("--extra-space", type=sizetype, default=10*1024L)
+        part.add_argument('--fsoptions', dest='fsopts')
+        part.add_argument('--fstype')
+        part.add_argument('--label')
+        part.add_argument('--no-table', action='store_true')
+        part.add_argument('--ondisk', '--ondrive', dest='disk')
+        part.add_argument("--overhead-factor", type=overheadtype, default=1.3)
+        part.add_argument('--part-type')
+        part.add_argument('--rootfs-dir')
+        part.add_argument('--size', type=sizetype, default=0)
+        part.add_argument('--source')
+        part.add_argument('--sourceparams')
+        part.add_argument('--use-uuid', action='store_true')
+        part.add_argument('--uuid')
+
+        bootloader = subparsers.add_parser('bootloader')
+        bootloader.add_argument('--append')
+        bootloader.add_argument('--configfile')
+        bootloader.add_argument('--ptable', choices=('msdos', 'gpt'),
+                                default='msdos')
+        bootloader.add_argument('--timeout', type=int)
+        bootloader.add_argument('--source')
+
+        include = subparsers.add_parser('include')
+        include.add_argument('path', type=cannedpathtype)
+
+        self._parse(parser, confpath)
+        if not self.bootloader:
+            msger.warning('bootloader config not specified, using defaults')
+            self.bootloader = bootloader.parse_args([])
+
+    def _parse(self, parser, confpath):
+        """
+        Parse file in .wks format using provided parser.
+        """
+        with open(confpath) as conf:
+            lineno = 0
+            for line in conf:
+                line = line.strip()
+                lineno += 1
+                if line and line[0] != '#':
+                    try:
+                        parsed = parser.parse_args(shlex.split(line))
+                    except ArgumentError as err:
+                        raise KickStartError('%s:%d: %s' % \
+                                             (confpath, lineno, err))
+                    if line.startswith('part'):
+                        self.partnum += 1
+                        self.partitions.append(Partition(parsed, self.partnum))
+                    elif line.startswith('include'):
+                        self._parse(parser, parsed.path)
+                    elif line.startswith('bootloader'):
+                        if not self.bootloader:
+                            self.bootloader = parsed
+                        else:
+                            err = "%s:%d: more than one bootloader specified" \
+                                      % (confpath, lineno)
+                            raise KickStartError(err)
diff --git a/yocto-poky/scripts/lib/wic/partition.py b/yocto-poky/scripts/lib/wic/partition.py
new file mode 100644
index 0000000..f40d1bc
--- /dev/null
+++ b/yocto-poky/scripts/lib/wic/partition.py
@@ -0,0 +1,414 @@
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# Copyright (c) 2013-2016 Intel Corporation.
+# All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# DESCRIPTION
+# This module provides the OpenEmbedded partition object definitions.
+#
+# AUTHORS
+# Tom Zanussi <tom.zanussi (at] linux.intel.com>
+# Ed Bartosh <ed.bartosh> (at] linux.intel.com>
+
+import os
+import tempfile
+import uuid
+
+from wic.utils.oe.misc import msger, parse_sourceparams
+from wic.utils.oe.misc import exec_cmd, exec_native_cmd
+from wic.plugin import pluginmgr
+
+partition_methods = {
+    "do_stage_partition":None,
+    "do_prepare_partition":None,
+    "do_configure_partition":None,
+}
+
+class Partition(object):
+
+    def __init__(self, args, lineno):
+        self.args = args
+        self.active = args.active
+        self.align = args.align
+        self.disk = args.disk
+        self.extra_space = args.extra_space
+        self.fsopts = args.fsopts
+        self.fstype = args.fstype
+        self.label = args.label
+        self.mountpoint = args.mountpoint
+        self.no_table = args.no_table
+        self.overhead_factor = args.overhead_factor
+        self.part_type = args.part_type
+        self.rootfs_dir = args.rootfs_dir
+        self.size = args.size
+        self.source = args.source
+        self.sourceparams = args.sourceparams
+        self.use_uuid = args.use_uuid
+        self.uuid = args.uuid
+        if args.use_uuid and not self.uuid:
+            self.uuid = str(uuid.uuid4())
+
+        self.lineno = lineno
+        self.source_file = ""
+        self.sourceparams_dict = {}
+
+    def get_extra_block_count(self, current_blocks):
+        """
+        The --size param is reflected in self.size (in kB), and we already
+        have current_blocks (1k) blocks, calculate and return the
+        number of (1k) blocks we need to add to get to --size, 0 if
+        we're already there or beyond.
+        """
+        msger.debug("Requested partition size for %s: %d" % \
+                    (self.mountpoint, self.size))
+
+        if not self.size:
+            return 0
+
+        requested_blocks = self.size
+
+        msger.debug("Requested blocks %d, current_blocks %d" % \
+                    (requested_blocks, current_blocks))
+
+        if requested_blocks > current_blocks:
+            return requested_blocks - current_blocks
+        else:
+            return 0
+
+    def prepare(self, creator, cr_workdir, oe_builddir, rootfs_dir,
+                bootimg_dir, kernel_dir, native_sysroot):
+        """
+        Prepare content for individual partitions, depending on
+        partition command parameters.
+        """
+        if self.sourceparams:
+            self.sourceparams_dict = parse_sourceparams(self.sourceparams)
+
+        if not self.source:
+            if not self.size:
+                msger.error("The %s partition has a size of zero.  Please "
+                            "specify a non-zero --size for that partition." % \
+                            self.mountpoint)
+            if self.fstype and self.fstype == "swap":
+                self.prepare_swap_partition(cr_workdir, oe_builddir,
+                                            native_sysroot)
+                self.source_file = "%s/fs.%s" % (cr_workdir, self.fstype)
+            elif self.fstype:
+                rootfs = "%s/fs_%s.%s.%s" % (cr_workdir, self.label,
+                                             self.lineno, self.fstype)
+                if os.path.isfile(rootfs):
+                    os.remove(rootfs)
+                for prefix in ("ext", "btrfs", "vfat", "squashfs"):
+                    if self.fstype.startswith(prefix):
+                        method = getattr(self,
+                                         "prepare_empty_partition_" + prefix)
+                        method(rootfs, oe_builddir, native_sysroot)
+                        self.source_file = rootfs
+                        break
+            return
+
+        plugins = pluginmgr.get_source_plugins()
+
+        if self.source not in plugins:
+            msger.error("The '%s' --source specified for %s doesn't exist.\n\t"
+                        "See 'wic list source-plugins' for a list of available"
+                        " --sources.\n\tSee 'wic help source-plugins' for "
+                        "details on adding a new source plugin." % \
+                        (self.source, self.mountpoint))
+
+        self._source_methods = pluginmgr.get_source_plugin_methods(\
+                                   self.source, partition_methods)
+        self._source_methods["do_configure_partition"](self, self.sourceparams_dict,
+                                                       creator, cr_workdir,
+                                                       oe_builddir,
+                                                       bootimg_dir,
+                                                       kernel_dir,
+                                                       native_sysroot)
+        self._source_methods["do_stage_partition"](self, self.sourceparams_dict,
+                                                   creator, cr_workdir,
+                                                   oe_builddir,
+                                                   bootimg_dir, kernel_dir,
+                                                   native_sysroot)
+        self._source_methods["do_prepare_partition"](self, self.sourceparams_dict,
+                                                     creator, cr_workdir,
+                                                     oe_builddir,
+                                                     bootimg_dir, kernel_dir, rootfs_dir,
+                                                     native_sysroot)
+
+    def prepare_rootfs_from_fs_image(self, cr_workdir, oe_builddir,
+                                     rootfs_dir):
+        """
+        Handle an already-created partition e.g. xxx.ext3
+        """
+        rootfs = oe_builddir
+        du_cmd = "du -Lbks %s" % rootfs
+        out = exec_cmd(du_cmd)
+        rootfs_size = out.split()[0]
+
+        self.size = rootfs_size
+        self.source_file = rootfs
+
+    def prepare_rootfs(self, cr_workdir, oe_builddir, rootfs_dir,
+                       native_sysroot):
+        """
+        Prepare content for a rootfs partition i.e. create a partition
+        and fill it from a /rootfs dir.
+
+        Currently handles ext2/3/4, btrfs and vfat.
+        """
+        p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot)
+        p_localstatedir = os.environ.get("PSEUDO_LOCALSTATEDIR",
+                                         "%s/../pseudo" % rootfs_dir)
+        p_passwd = os.environ.get("PSEUDO_PASSWD", rootfs_dir)
+        p_nosymlinkexp = os.environ.get("PSEUDO_NOSYMLINKEXP", "1")
+        pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix
+        pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % p_localstatedir
+        pseudo += "export PSEUDO_PASSWD=%s;" % p_passwd
+        pseudo += "export PSEUDO_NOSYMLINKEXP=%s;" % p_nosymlinkexp
+        pseudo += "%s/usr/bin/pseudo " % native_sysroot
+
+        rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label,
+                                         self.lineno, self.fstype)
+        if os.path.isfile(rootfs):
+            os.remove(rootfs)
+
+        for prefix in ("ext", "btrfs", "vfat", "squashfs"):
+            if self.fstype.startswith(prefix):
+                method = getattr(self, "prepare_rootfs_" + prefix)
+                method(rootfs, oe_builddir, rootfs_dir, native_sysroot, pseudo)
+
+                self.source_file = rootfs
+
+                # get the rootfs size in the right units for kickstart (kB)
+                du_cmd = "du -Lbks %s" % rootfs
+                out = exec_cmd(du_cmd)
+                self.size = out.split()[0]
+
+                break
+
+    def prepare_rootfs_ext(self, rootfs, oe_builddir, rootfs_dir,
+                           native_sysroot, pseudo):
+        """
+        Prepare content for an ext2/3/4 rootfs partition.
+        """
+        du_cmd = "du -ks %s" % rootfs_dir
+        out = exec_cmd(du_cmd)
+        actual_rootfs_size = int(out.split()[0])
+
+        extra_blocks = self.get_extra_block_count(actual_rootfs_size)
+        if extra_blocks < self.extra_space:
+            extra_blocks = self.extra_space
+
+        rootfs_size = actual_rootfs_size + extra_blocks
+        rootfs_size *= self.overhead_factor
+
+        msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
+                    (extra_blocks, self.mountpoint, rootfs_size))
+
+        dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=0 bs=1k" % \
+            (rootfs, rootfs_size)
+        exec_cmd(dd_cmd)
+
+        extra_imagecmd = "-i 8192"
+
+        label_str = ""
+        if self.label:
+            label_str = "-L %s" % self.label
+
+        mkfs_cmd = "mkfs.%s -F %s %s %s -d %s" % \
+            (self.fstype, extra_imagecmd, rootfs, label_str, rootfs_dir)
+        exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
+
+    def prepare_rootfs_btrfs(self, rootfs, oe_builddir, rootfs_dir,
+                             native_sysroot, pseudo):
+        """
+        Prepare content for a btrfs rootfs partition.
+
+        Currently handles ext2/3/4 and btrfs.
+        """
+        du_cmd = "du -ks %s" % rootfs_dir
+        out = exec_cmd(du_cmd)
+        actual_rootfs_size = int(out.split()[0])
+
+        extra_blocks = self.get_extra_block_count(actual_rootfs_size)
+        if extra_blocks < self.extra_space:
+            extra_blocks = self.extra_space
+
+        rootfs_size = actual_rootfs_size + extra_blocks
+        rootfs_size *= self.overhead_factor
+
+        msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
+                    (extra_blocks, self.mountpoint, rootfs_size))
+
+        dd_cmd = "dd if=/dev/zero of=%s bs=1024 seek=%d count=0 bs=1k" % \
+            (rootfs, rootfs_size)
+        exec_cmd(dd_cmd)
+
+        label_str = ""
+        if self.label:
+            label_str = "-L %s" % self.label
+
+        mkfs_cmd = "mkfs.%s -b %d -r %s %s %s" % \
+            (self.fstype, rootfs_size * 1024, rootfs_dir, label_str, rootfs)
+        exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
+
+    def prepare_rootfs_vfat(self, rootfs, oe_builddir, rootfs_dir,
+                            native_sysroot, pseudo):
+        """
+        Prepare content for a vfat rootfs partition.
+        """
+        du_cmd = "du -bks %s" % rootfs_dir
+        out = exec_cmd(du_cmd)
+        blocks = int(out.split()[0])
+
+        extra_blocks = self.get_extra_block_count(blocks)
+        if extra_blocks < self.extra_space:
+            extra_blocks = self.extra_space
+
+        blocks += extra_blocks
+
+        msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
+                    (extra_blocks, self.mountpoint, blocks))
+
+        # Ensure total sectors is an integral number of sectors per
+        # track or mcopy will complain. Sectors are 512 bytes, and we
+        # generate images with 32 sectors per track. This calculation
+        # is done in blocks, thus the mod by 16 instead of 32. Apply
+        # sector count fix only when needed.
+        if blocks % 16 != 0:
+            blocks += (16 - (blocks % 16))
+
+        label_str = "-n boot"
+        if self.label:
+            label_str = "-n %s" % self.label
+
+        dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, blocks)
+        exec_native_cmd(dosfs_cmd, native_sysroot)
+
+        mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir)
+        exec_native_cmd(mcopy_cmd, native_sysroot)
+
+        chmod_cmd = "chmod 644 %s" % rootfs
+        exec_cmd(chmod_cmd)
+
+    def prepare_rootfs_squashfs(self, rootfs, oe_builddir, rootfs_dir,
+                                native_sysroot, pseudo):
+        """
+        Prepare content for a squashfs rootfs partition.
+        """
+        squashfs_cmd = "mksquashfs %s %s -noappend" % \
+                       (rootfs_dir, rootfs)
+        exec_native_cmd(squashfs_cmd, native_sysroot, pseudo=pseudo)
+
+    def prepare_empty_partition_ext(self, rootfs, oe_builddir,
+                                    native_sysroot):
+        """
+        Prepare an empty ext2/3/4 partition.
+        """
+        dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
+            (rootfs, self.size)
+        exec_cmd(dd_cmd)
+
+        extra_imagecmd = "-i 8192"
+
+        label_str = ""
+        if self.label:
+            label_str = "-L %s" % self.label
+
+        mkfs_cmd = "mkfs.%s -F %s %s %s" % \
+            (self.fstype, extra_imagecmd, label_str, rootfs)
+        exec_native_cmd(mkfs_cmd, native_sysroot)
+
+    def prepare_empty_partition_btrfs(self, rootfs, oe_builddir,
+                                      native_sysroot):
+        """
+        Prepare an empty btrfs partition.
+        """
+        dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
+            (rootfs, self.size)
+        exec_cmd(dd_cmd)
+
+        label_str = ""
+        if self.label:
+            label_str = "-L %s" % self.label
+
+        mkfs_cmd = "mkfs.%s -b %d %s %s" % \
+            (self.fstype, self.size * 1024, label_str, rootfs)
+        exec_native_cmd(mkfs_cmd, native_sysroot)
+
+    def prepare_empty_partition_vfat(self, rootfs, oe_builddir,
+                                     native_sysroot):
+        """
+        Prepare an empty vfat partition.
+        """
+        blocks = self.size
+
+        label_str = "-n boot"
+        if self.label:
+            label_str = "-n %s" % self.label
+
+        dosfs_cmd = "mkdosfs %s -S 512 -C %s %d" % (label_str, rootfs, blocks)
+        exec_native_cmd(dosfs_cmd, native_sysroot)
+
+        chmod_cmd = "chmod 644 %s" % rootfs
+        exec_cmd(chmod_cmd)
+
+    def prepare_empty_partition_squashfs(self, cr_workdir, oe_builddir,
+                                         native_sysroot):
+        """
+        Prepare an empty squashfs partition.
+        """
+        msger.warning("Creating of an empty squashfs %s partition was attempted. " \
+                      "Proceeding as requested." % self.mountpoint)
+
+        path = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
+        os.path.isfile(path) and os.remove(path)
+
+        # it is not possible to create a squashfs without source data,
+        # thus prepare an empty temp dir that is used as source
+        tmpdir = tempfile.mkdtemp()
+
+        squashfs_cmd = "mksquashfs %s %s -noappend" % \
+                       (tmpdir, path)
+        exec_native_cmd(squashfs_cmd, native_sysroot)
+
+        os.rmdir(tmpdir)
+
+        # get the rootfs size in the right units for kickstart (kB)
+        du_cmd = "du -Lbks %s" % path
+        out = exec_cmd(du_cmd)
+        fs_size = out.split()[0]
+
+        self.size = fs_size
+
+    def prepare_swap_partition(self, cr_workdir, oe_builddir, native_sysroot):
+        """
+        Prepare a swap partition.
+        """
+        path = "%s/fs.%s" % (cr_workdir, self.fstype)
+
+        dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
+            (path, self.size)
+        exec_cmd(dd_cmd)
+
+        import uuid
+        label_str = ""
+        if self.label:
+            label_str = "-L %s" % self.label
+        mkswap_cmd = "mkswap %s -U %s %s" % (label_str, str(uuid.uuid1()), path)
+        exec_native_cmd(mkswap_cmd, native_sysroot)
+
diff --git a/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py b/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py
index fa63c6a..a4734c9 100644
--- a/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/yocto-poky/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -27,8 +27,9 @@
 import os
 import shutil
 
-from wic import kickstart, msger
+from wic import msger
 from wic.pluginbase import SourcePlugin
+from wic.utils.misc import get_custom_config
 from wic.utils.oe.misc import exec_cmd, exec_native_cmd, get_bitbake_var, \
                               BOOTDD_EXTRA_SPACE
 
@@ -45,22 +46,34 @@
         """
         Create loader-specific (grub-efi) config
         """
-        options = creator.ks.handler.bootloader.appendLine
+        configfile = creator.ks.bootloader.configfile
+        custom_cfg = None
+        if configfile:
+            custom_cfg = get_custom_config(configfile)
+            if custom_cfg:
+                # Use a custom configuration for grub
+                grubefi_conf = custom_cfg
+                msger.debug("Using custom configuration file "
+                        "%s for grub.cfg" % configfile)
+            else:
+                msger.error("configfile is specified but failed to "
+                        "get it from %s." % configfile)
 
-        grubefi_conf = ""
-        grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n"
-        grubefi_conf += "default=boot\n"
-        timeout = kickstart.get_timeout(creator.ks)
-        if not timeout:
-            timeout = 0
-        grubefi_conf += "timeout=%s\n" % timeout
-        grubefi_conf += "menuentry 'boot'{\n"
+        if not custom_cfg:
+            # Create grub configuration using parameters from wks file
+            bootloader = creator.ks.bootloader
 
-        kernel = "/bzImage"
+            grubefi_conf = ""
+            grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n"
+            grubefi_conf += "default=boot\n"
+            grubefi_conf += "timeout=%s\n" % bootloader.timeout
+            grubefi_conf += "menuentry 'boot'{\n"
 
-        grubefi_conf += "linux %s root=%s rootwait %s\n" \
-            % (kernel, creator.rootdev, options)
-        grubefi_conf += "}\n"
+            kernel = "/bzImage"
+
+            grubefi_conf += "linux %s root=%s rootwait %s\n" \
+                % (kernel, creator.rootdev, bootloader.append)
+            grubefi_conf += "}\n"
 
         msger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg" \
                         % cr_workdir)
@@ -79,15 +92,11 @@
         install_cmd = "install -d %s/loader/entries" % hdddir
         exec_cmd(install_cmd)
 
-        options = creator.ks.handler.bootloader.appendLine
-
-        timeout = kickstart.get_timeout(creator.ks)
-        if not timeout:
-            timeout = 0
+        bootloader = creator.ks.bootloader
 
         loader_conf = ""
         loader_conf += "default boot\n"
-        loader_conf += "timeout %d\n" % timeout
+        loader_conf += "timeout %d\n" % bootloader.timeout
 
         msger.debug("Writing gummiboot config %s/hdd/boot/loader/loader.conf" \
                         % cr_workdir)
@@ -95,12 +104,28 @@
         cfg.write(loader_conf)
         cfg.close()
 
-        kernel = "/bzImage"
+        configfile = creator.ks.bootloader.configfile
+        custom_cfg = None
+        if configfile:
+            custom_cfg = get_custom_config(configfile)
+            if custom_cfg:
+                # Use a custom configuration for gummiboot
+                boot_conf = custom_cfg
+                msger.debug("Using custom configuration file "
+                        "%s for gummiboots's boot.conf" % configfile)
+            else:
+                msger.error("configfile is specified but failed to "
+                        "get it from %s." % configfile)
 
-        boot_conf = ""
-        boot_conf += "title boot\n"
-        boot_conf += "linux %s\n" % kernel
-        boot_conf += "options LABEL=Boot root=%s %s\n" % (creator.rootdev, options)
+        if not custom_cfg:
+            # Create gummiboot configuration using parameters from wks file
+            kernel = "/bzImage"
+
+            boot_conf = ""
+            boot_conf += "title boot\n"
+            boot_conf += "linux %s\n" % kernel
+            boot_conf += "options LABEL=Boot root=%s %s\n" % \
+                             (creator.rootdev, bootloader.append)
 
         msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \
                         % cr_workdir)
@@ -117,8 +142,6 @@
         Called before do_prepare_partition(), creates loader-specific config
         """
         hdddir = "%s/hdd/boot" % cr_workdir
-        rm_cmd = "rm -rf %s" % cr_workdir
-        exec_cmd(rm_cmd)
 
         install_cmd = "install -d %s/EFI/BOOT" % hdddir
         exec_cmd(install_cmd)
@@ -210,5 +233,5 @@
         out = exec_cmd(du_cmd)
         bootimg_size = out.split()[0]
 
-        part.set_size(bootimg_size)
-        part.set_source_file(bootimg)
+        part.size = bootimg_size
+        part.source_file = bootimg
diff --git a/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py b/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py
index bc2ca0f..b76c121 100644
--- a/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/yocto-poky/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -71,9 +71,6 @@
         - copies all files listed in IMAGE_BOOT_FILES variable
         """
         hdddir = "%s/boot" % cr_workdir
-        rm_cmd = "rm -rf %s/boot" % cr_workdir
-        exec_cmd(rm_cmd)
-
         install_cmd = "install -d %s" % hdddir
         exec_cmd(install_cmd)
 
diff --git a/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 96ed54d..5b719bf 100644
--- a/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/yocto-poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -27,8 +27,9 @@
 import os
 
 from wic.utils.errors import ImageError
-from wic import kickstart, msger
+from wic import msger
 from wic.utils import runner
+from wic.utils.misc import get_custom_config
 from wic.pluginbase import SourcePlugin
 from wic.utils.oe.misc import exec_cmd, exec_native_cmd, \
                               get_bitbake_var, BOOTDD_EXTRA_SPACE
@@ -77,40 +78,49 @@
         Called before do_prepare_partition(), creates syslinux config
         """
         hdddir = "%s/hdd/boot" % cr_workdir
-        rm_cmd = "rm -rf " + cr_workdir
-        exec_cmd(rm_cmd)
 
         install_cmd = "install -d %s" % hdddir
         exec_cmd(install_cmd)
 
-        splash = os.path.join(cr_workdir, "/hdd/boot/splash.jpg")
-        if os.path.exists(splash):
-            splashline = "menu background splash.jpg"
-        else:
-            splashline = ""
+        bootloader = creator.ks.bootloader
 
-        options = creator.ks.handler.bootloader.appendLine
+        custom_cfg = None
+        if bootloader.configfile:
+            custom_cfg = get_custom_config(bootloader.configfile)
+            if custom_cfg:
+                # Use a custom configuration for grub
+                syslinux_conf = custom_cfg
+                msger.debug("Using custom configuration file "
+                            "%s for syslinux.cfg" % bootloader.configfile)
+            else:
+                msger.error("configfile is specified but failed to "
+                            "get it from %s." % bootloader.configfile)
 
-        syslinux_conf = ""
-        syslinux_conf += "PROMPT 0\n"
-        timeout = kickstart.get_timeout(creator.ks)
-        if not timeout:
-            timeout = 0
-        syslinux_conf += "TIMEOUT " + str(timeout) + "\n"
-        syslinux_conf += "\n"
-        syslinux_conf += "ALLOWOPTIONS 1\n"
-        syslinux_conf += "SERIAL 0 115200\n"
-        syslinux_conf += "\n"
-        if splashline:
-            syslinux_conf += "%s\n" % splashline
-        syslinux_conf += "DEFAULT boot\n"
-        syslinux_conf += "LABEL boot\n"
+        if not custom_cfg:
+            # Create syslinux configuration using parameters from wks file
+            splash = os.path.join(cr_workdir, "/hdd/boot/splash.jpg")
+            if os.path.exists(splash):
+                splashline = "menu background splash.jpg"
+            else:
+                splashline = ""
 
-        kernel = "/vmlinuz"
-        syslinux_conf += "KERNEL " + kernel + "\n"
+            syslinux_conf = ""
+            syslinux_conf += "PROMPT 0\n"
+            syslinux_conf += "TIMEOUT " + str(bootloader.timeout) + "\n"
+            syslinux_conf += "\n"
+            syslinux_conf += "ALLOWOPTIONS 1\n"
+            syslinux_conf += "SERIAL 0 115200\n"
+            syslinux_conf += "\n"
+            if splashline:
+                syslinux_conf += "%s\n" % splashline
+            syslinux_conf += "DEFAULT boot\n"
+            syslinux_conf += "LABEL boot\n"
 
-        syslinux_conf += "APPEND label=boot root=%s %s\n" % \
-                             (creator.rootdev, options)
+            kernel = "/vmlinuz"
+            syslinux_conf += "KERNEL " + kernel + "\n"
+
+            syslinux_conf += "APPEND label=boot root=%s %s\n" % \
+                             (creator.rootdev, bootloader.append)
 
         msger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg" \
                     % cr_workdir)
@@ -194,7 +204,7 @@
         out = exec_cmd(du_cmd)
         bootimg_size = out.split()[0]
 
-        part.set_size(bootimg_size)
-        part.set_source_file(bootimg)
+        part.size = int(out.split()[0])
+        part.source_file = bootimg
 
 
diff --git a/yocto-poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py b/yocto-poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
index 9472d8a..bc99283 100644
--- a/yocto-poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
+++ b/yocto-poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py
@@ -23,8 +23,9 @@
 import os
 import re
 import shutil
+import glob
 
-from wic import kickstart, msger
+from wic import msger
 from wic.pluginbase import SourcePlugin
 from wic.utils.oe.misc import exec_cmd, exec_native_cmd, get_bitbake_var
 
@@ -64,13 +65,11 @@
         else:
             splashline = ""
 
-        options = creator.ks.handler.bootloader.appendLine
-
-        timeout = kickstart.get_timeout(creator.ks, 10)
+        bootloader = creator.ks.bootloader
 
         syslinux_conf = ""
         syslinux_conf += "PROMPT 0\n"
-        syslinux_conf += "TIMEOUT %s \n" % timeout
+        syslinux_conf += "TIMEOUT %s \n" % (bootloader.timeout or 10)
         syslinux_conf += "\n"
         syslinux_conf += "ALLOWOPTIONS 1\n"
         syslinux_conf += "SERIAL 0 115200\n"
@@ -82,7 +81,8 @@
 
         kernel = "/bzImage"
         syslinux_conf += "KERNEL " + kernel + "\n"
-        syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" % options
+        syslinux_conf += "APPEND initrd=/initrd LABEL=boot %s\n" \
+                             % bootloader.append
 
         msger.debug("Writing syslinux config %s/ISO/isolinux/isolinux.cfg" \
                     % cr_workdir)
@@ -100,14 +100,13 @@
         else:
             splashline = ""
 
-        options = creator.ks.handler.bootloader.appendLine
+        bootloader = creator.ks.bootloader
 
         grubefi_conf = ""
         grubefi_conf += "serial --unit=0 --speed=115200 --word=8 "
         grubefi_conf += "--parity=no --stop=1\n"
         grubefi_conf += "default=boot\n"
-        timeout = kickstart.get_timeout(creator.ks, 10)
-        grubefi_conf += "timeout=%s\n" % timeout
+        grubefi_conf += "timeout=%s\n" % (bootloader.timeout or 10)
         grubefi_conf += "\n"
         grubefi_conf += "search --set=root --label %s " % part.label
         grubefi_conf += "\n"
@@ -116,7 +115,7 @@
         kernel = "/bzImage"
 
         grubefi_conf += "linux %s rootwait %s\n" \
-            % (kernel, options)
+            % (kernel, bootloader.append)
         grubefi_conf += "initrd /initrd \n"
         grubefi_conf += "}\n"
 
@@ -152,8 +151,7 @@
             if not machine_arch:
                 msger.error("Couldn't find MACHINE_ARCH, exiting.\n")
 
-            initrd = "%s/%s-initramfs-%s.%s" \
-                    % (initrd_dir, image_name, machine_arch, image_type)
+            initrd = glob.glob('%s/%s*%s.%s' % (initrd_dir, image_name, machine_arch, image_type))[0]
 
         if not os.path.exists(initrd):
             # Create initrd from rootfs directory
@@ -176,8 +174,8 @@
             else:
                 msger.error("Couldn't find or build initrd, exiting.\n")
 
-            exec_cmd("cd %s && find . | cpio -o -H newc >%s/initrd.cpio " \
-                    % (initrd_dir, cr_workdir), as_shell=True)
+            exec_cmd("cd %s && find . | cpio -o -H newc -R +0:+0 >./initrd.cpio " \
+                    % initrd_dir, as_shell=True)
             exec_cmd("gzip -f -9 -c %s/initrd.cpio > %s" \
                     % (cr_workdir, initrd), as_shell=True)
             shutil.rmtree(initrd_dir)
@@ -210,11 +208,14 @@
         if not os.path.exists("%s/syslinux" % syslinux_dir):
             msger.info("Building syslinux...\n")
             exec_cmd("bitbake syslinux")
-            msger.info("Building syslinux-native...\n")
-            exec_cmd("bitbake syslinux-native")
         if not os.path.exists("%s/syslinux" % syslinux_dir):
             msger.error("Please build syslinux first\n")
 
+        # Make sure syslinux is available in native sysroot
+        if not os.path.exists("%s/usr/bin/syslinux" % native_sysroot):
+            msger.info("Building syslinux-native...\n")
+            exec_cmd("bitbake syslinux-native")
+
         #Make sure mkisofs is available in native sysroot
         if not os.path.isfile("%s/usr/bin/mkisofs" % native_sysroot):
             msger.info("Building cdrtools-native...\n")
@@ -264,26 +265,26 @@
 
         isodir = "%s/ISO" % cr_workdir
 
-        if part.rootfs is None:
+        if part.rootfs_dir is None:
             if not 'ROOTFS_DIR' in rootfs_dir:
                 msger.error("Couldn't find --rootfs-dir, exiting.\n")
             rootfs_dir = rootfs_dir['ROOTFS_DIR']
         else:
-            if part.rootfs in rootfs_dir:
-                rootfs_dir = rootfs_dir[part.rootfs]
-            elif part.rootfs:
-                rootfs_dir = part.rootfs
+            if part.rootfs_dir in rootfs_dir:
+                rootfs_dir = rootfs_dir[part.rootfs_dir]
+            elif part.rootfs_dir:
+                rootfs_dir = part.rootfs_dir
             else:
                 msg = "Couldn't find --rootfs-dir=%s connection "
                 msg += "or it is not a valid path, exiting.\n"
-                msger.error(msg % part.rootfs)
+                msger.error(msg % part.rootfs_dir)
 
         if not os.path.isdir(rootfs_dir):
             rootfs_dir = get_bitbake_var("IMAGE_ROOTFS")
         if not os.path.isdir(rootfs_dir):
             msger.error("Couldn't find IMAGE_ROOTFS, exiting.\n")
 
-        part.set_rootfs(rootfs_dir)
+        part.rootfs_dir = rootfs_dir
 
         # Prepare rootfs.img
         hdd_dir = get_bitbake_var("HDDDIR")
@@ -304,7 +305,7 @@
             # which contains rootfs
             du_cmd = "du -bks %s" % rootfs_dir
             out = exec_cmd(du_cmd)
-            part.set_size(int(out.split()[0]))
+            part.size = int(out.split()[0])
             part.extra_space = 0
             part.overhead_factor = 1.2
             part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, \
@@ -504,8 +505,8 @@
         out = exec_cmd(du_cmd)
         isoimg_size = int(out.split()[0])
 
-        part.set_size(isoimg_size)
-        part.set_source_file(iso_img)
+        part.size = isoimg_size
+        part.source_file = iso_img
 
     @classmethod
     def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir,
diff --git a/yocto-poky/scripts/lib/wic/plugins/source/rawcopy.py b/yocto-poky/scripts/lib/wic/plugins/source/rawcopy.py
index f0691ba..0472f53 100644
--- a/yocto-poky/scripts/lib/wic/plugins/source/rawcopy.py
+++ b/yocto-poky/scripts/lib/wic/plugins/source/rawcopy.py
@@ -67,13 +67,14 @@
             return
 
         src = os.path.join(bootimg_dir, source_params['file'])
-        dst = src
+        dst = os.path.join(cr_workdir, source_params['file'])
 
         if 'skip' in source_params:
-            dst = os.path.join(cr_workdir, source_params['file'])
             dd_cmd = "dd if=%s of=%s ibs=%s skip=1 conv=notrunc" % \
                     (src, dst, source_params['skip'])
-            exec_cmd(dd_cmd)
+        else:
+            dd_cmd = "cp %s %s" % (src, dst)
+        exec_cmd(dd_cmd)
 
         # get the size in the right units for kickstart (kB)
         du_cmd = "du -Lbks %s" % dst
diff --git a/yocto-poky/scripts/lib/wic/plugins/source/rootfs.py b/yocto-poky/scripts/lib/wic/plugins/source/rootfs.py
index a90712b..425da8b 100644
--- a/yocto-poky/scripts/lib/wic/plugins/source/rootfs.py
+++ b/yocto-poky/scripts/lib/wic/plugins/source/rootfs.py
@@ -61,23 +61,23 @@
         'prepares' the partition to be incorporated into the image.
         In this case, prepare content for legacy bios boot partition.
         """
-        if part.rootfs is None:
+        if part.rootfs_dir is None:
             if not 'ROOTFS_DIR' in krootfs_dir:
                 msg = "Couldn't find --rootfs-dir, exiting"
                 msger.error(msg)
             rootfs_dir = krootfs_dir['ROOTFS_DIR']
         else:
-            if part.rootfs in krootfs_dir:
-                rootfs_dir = krootfs_dir[part.rootfs]
-            elif part.rootfs:
-                rootfs_dir = part.rootfs
+            if part.rootfs_dir in krootfs_dir:
+                rootfs_dir = krootfs_dir[part.rootfs_dir]
+            elif part.rootfs_dir:
+                rootfs_dir = part.rootfs_dir
             else:
                 msg = "Couldn't find --rootfs-dir=%s connection"
                 msg += " or it is not a valid path, exiting"
-                msger.error(msg % part.rootfs)
+                msger.error(msg % part.rootfs_dir)
 
         real_rootfs_dir = cls.__get_rootfs_dir(rootfs_dir)
 
-        part.set_rootfs(real_rootfs_dir)
+        part.rootfs_dir = real_rootfs_dir
         part.prepare_rootfs(cr_workdir, oe_builddir, real_rootfs_dir, native_sysroot)
 
diff --git a/yocto-poky/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py b/yocto-poky/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
index 76e7b03..3d60e6f 100644
--- a/yocto-poky/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
+++ b/yocto-poky/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py
@@ -19,7 +19,6 @@
 #
 
 import os
-from wic import kickstart
 from wic import msger
 from wic.utils import syslinux
 from wic.utils import runner
@@ -78,15 +77,12 @@
 
         Called before do_prepare_partition()
         """
-        options = image_creator.ks.handler.bootloader.appendLine
+        bootloader = image_creator.ks.bootloader
 
         syslinux_conf = ""
         syslinux_conf += "PROMPT 0\n"
 
-        timeout = kickstart.get_timeout(image_creator.ks)
-        if not timeout:
-            timeout = 0
-        syslinux_conf += "TIMEOUT " + str(timeout) + "\n"
+        syslinux_conf += "TIMEOUT " + str(bootloader.timeout) + "\n"
         syslinux_conf += "ALLOWOPTIONS 1\n"
 
         # Derive SERIAL... line from from kernel boot parameters
@@ -97,7 +93,7 @@
         syslinux_conf += "  KERNEL /boot/bzImage\n"
 
         syslinux_conf += "  APPEND label=boot root=%s %s\n" % \
-                             (image_creator.rootdev, options)
+                             (image_creator.rootdev, bootloader.append)
 
         syslinux_cfg = os.path.join(image_creator.rootfs_dir['ROOTFS_DIR'], "boot", "syslinux.cfg")
         msger.debug("Writing syslinux config %s" % syslinux_cfg)
@@ -144,7 +140,7 @@
 
         real_rootfs_dir = cls._get_rootfs_dir(rootfs_dir)
 
-        part.set_rootfs(real_rootfs_dir)
+        part.rootfs_dir = real_rootfs_dir
         part.prepare_rootfs(image_creator_workdir, oe_builddir, real_rootfs_dir, native_sysroot)
 
         # install syslinux into rootfs partition
diff --git a/yocto-poky/scripts/lib/wic/utils/misc.py b/yocto-poky/scripts/lib/wic/utils/misc.py
index 9d75069..1415ae9 100644
--- a/yocto-poky/scripts/lib/wic/utils/misc.py
+++ b/yocto-poky/scripts/lib/wic/utils/misc.py
@@ -17,6 +17,7 @@
 
 import os
 import time
+import wic.engine
 
 def build_name(kscfg, release=None, prefix=None, suffix=None):
     """Construct and return an image name string.
@@ -56,3 +57,39 @@
     ret = prefix + name + suffix
 
     return ret
+
+def find_canned(scripts_path, file_name):
+    """
+    Find a file either by its path or by name in the canned files dir.
+
+    Return None if not found
+    """
+    if os.path.exists(file_name):
+        return file_name
+
+    layers_canned_wks_dir = wic.engine.build_canned_image_list(scripts_path)
+    for canned_wks_dir in layers_canned_wks_dir:
+        for root, dirs, files in os.walk(canned_wks_dir):
+            for fname in files:
+                if fname == file_name:
+                    fullpath = os.path.join(canned_wks_dir, fname)
+                    return fullpath
+
+def get_custom_config(boot_file):
+    """
+    Get the custom configuration to be used for the bootloader.
+
+    Return None if the file can't be found.
+    """
+    scripts_path = os.path.abspath(os.path.dirname(__file__))
+    # Get the scripts path of poky
+    for x in range(0, 3):
+        scripts_path = os.path.dirname(scripts_path)
+
+    cfg_file = find_canned(scripts_path, boot_file)
+    if cfg_file:
+        with open(cfg_file, "r") as f:
+            config = f.read()
+        return config
+
+    return None
diff --git a/yocto-poky/scripts/lib/wic/utils/oe/misc.py b/yocto-poky/scripts/lib/wic/utils/oe/misc.py
index c6d2e5f..81239ac 100644
--- a/yocto-poky/scripts/lib/wic/utils/oe/misc.py
+++ b/yocto-poky/scripts/lib/wic/utils/oe/misc.py
@@ -89,7 +89,7 @@
 
     return bb.utils.which(path, cmd) != "" or False
 
-def exec_native_cmd(cmd_and_args, native_sysroot, catch=3):
+def exec_native_cmd(cmd_and_args, native_sysroot, catch=3, pseudo=""):
     """
     Execute native command, catching stderr, stdout
 
@@ -97,6 +97,12 @@
 
     Always need to execute native commands as_shell
     """
+    # The reason -1 is used is because there may be "export" commands.
+    args = cmd_and_args.split(';')[-1].split()
+    msger.debug(args)
+
+    if pseudo:
+        cmd_and_args = pseudo + cmd_and_args
     native_paths = \
         "%s/sbin:%s/usr/sbin:%s/usr/bin" % \
         (native_sysroot, native_sysroot, native_sysroot)
@@ -104,18 +110,16 @@
                            (native_paths, cmd_and_args)
     msger.debug("exec_native_cmd: %s" % cmd_and_args)
 
-    # The reason -1 is used is because there may be "export" commands.
-    args = cmd_and_args.split(';')[-1].split()
-    msger.debug(args)
-
     # If the command isn't in the native sysroot say we failed.
     if cmd_in_path(args[0], native_paths):
         ret, out = _exec_cmd(native_cmd_and_args, True, catch)
     else:
         ret = 127
 
-    if ret == 127: # shell command-not-found
-        prog = args[0]
+    prog = args[0]
+    # shell command-not-found
+    if ret == 127 \
+       or (pseudo and ret == 1 and out == "Can't find '%s' in $PATH." % prog):
         msg = "A native program %s required to build the image "\
               "was not found (see details above).\n\n" % prog
         recipe = NATIVE_RECIPES.get(prog)
diff --git a/yocto-poky/scripts/lib/wic/utils/partitionedfs.py b/yocto-poky/scripts/lib/wic/utils/partitionedfs.py
index 5a103bb..ad596d2 100644
--- a/yocto-poky/scripts/lib/wic/utils/partitionedfs.py
+++ b/yocto-poky/scripts/lib/wic/utils/partitionedfs.py
@@ -96,25 +96,23 @@
         # Converting kB to sectors for parted
         size = size * 1024 / self.sector_size
 
-        # We still need partition for "/" or non-subvolume
-        if mountpoint == "/" or not fsopts:
-            part = {'ks_pnum': ks_pnum, # Partition number in the KS file
-                    'size': size, # In sectors
-                    'mountpoint': mountpoint, # Mount relative to chroot
-                    'source_file': source_file, # partition contents
-                    'fstype': fstype, # Filesystem type
-                    'fsopts': fsopts, # Filesystem mount options
-                    'label': label, # Partition label
-                    'disk_name': disk_name, # physical disk name holding partition
-                    'device': None, # kpartx device node for partition
-                    'num': None, # Partition number
-                    'boot': boot, # Bootable flag
-                    'align': align, # Partition alignment
-                    'no_table' : no_table, # Partition does not appear in partition table
-                    'part_type' : part_type, # Partition type
-                    'uuid': uuid} # Partition UUID
+        part = {'ks_pnum': ks_pnum, # Partition number in the KS file
+                'size': size, # In sectors
+                'mountpoint': mountpoint, # Mount relative to chroot
+                'source_file': source_file, # partition contents
+                'fstype': fstype, # Filesystem type
+                'fsopts': fsopts, # Filesystem mount options
+                'label': label, # Partition label
+                'disk_name': disk_name, # physical disk name holding partition
+                'device': None, # kpartx device node for partition
+                'num': None, # Partition number
+                'boot': boot, # Bootable flag
+                'align': align, # Partition alignment
+                'no_table' : no_table, # Partition does not appear in partition table
+                'part_type' : part_type, # Partition type
+                'uuid': uuid} # Partition UUID
 
-            self.__add_partition(part)
+        self.__add_partition(part)
 
     def layout_partitions(self, ptable_format="msdos"):
         """ Layout the partitions, meaning calculate the position of every
diff --git a/yocto-poky/scripts/oe-buildenv-internal b/yocto-poky/scripts/oe-buildenv-internal
index 9ed2721..e04db03 100755
--- a/yocto-poky/scripts/oe-buildenv-internal
+++ b/yocto-poky/scripts/oe-buildenv-internal
@@ -24,7 +24,7 @@
     return 1
 fi
 
-if [ -z "$OE_SKIP_SDK_CHECK" -a ! -z "$OECORE_SDK_VERSION" ]; then
+if [ -z "$OE_SKIP_SDK_CHECK" ] && [ -n "$OECORE_SDK_VERSION" ]; then
     echo >&2 "Error: The OE SDK/ADT was detected as already being present in this shell environment. Please use a clean shell when sourcing this environment script."
     return 1
 fi
@@ -33,24 +33,26 @@
 # sanity.bbclass because bitbake's source code doesn't even pass
 # parsing stage when used with python v3, so we catch it here so we
 # can offer a meaningful error message.
-py_v3_check=`/usr/bin/env python --version 2>&1 | grep "Python 3"`
-if [ "$py_v3_check" != "" ]; then
-	echo >&2 "Bitbake is not compatible with python v3"
-	echo >&2 "Please set up python v2 as your default python interpreter"
-	return 1
+py_v3_check=$(/usr/bin/env python --version 2>&1 | grep "Python 3")
+if [ -n "$py_v3_check" ]; then
+    echo >&2 "Bitbake is not compatible with python v3"
+    echo >&2 "Please set up python v2 as your default python interpreter"
+    return 1
 fi
+unset py_v3_check
 
 # Similarly, we now have code that doesn't parse correctly with older
 # versions of Python, and rather than fixing that and being eternally
 # vigilant for any other new feature use, just check the version here.
-py_v26_check=`python -c 'import sys; print sys.version_info >= (2,7,3)'`
+py_v26_check=$(python -c 'import sys; print sys.version_info >= (2,7,3)')
 if [ "$py_v26_check" != "True" ]; then
-	echo >&2 "BitBake requires Python 2.7.3 or later"
-	return 1
+    echo >&2 "BitBake requires Python 2.7.3 or later"
+    return 1
 fi
+unset py_v26_check
 
-if [ "x$BDIR" = "x" ]; then
-    if [ "x$1" = "x" ]; then
+if [ -z "$BDIR" ]; then
+    if [ -z "$1" ]; then
         BDIR="build"
     else
         BDIR="$1"
@@ -62,48 +64,58 @@
         # Remove any possible trailing slashes. This is used to work around
         # buggy readlink in Ubuntu 10.04 that doesn't ignore trailing slashes
         # and hence "readlink -f new_dir_to_be_created/" returns empty.
-        BDIR=`echo $BDIR | sed -re 's|/+$||'`
+        BDIR=$(echo $BDIR | sed -re 's|/+$||')
 
-        BDIR=`readlink -f "$BDIR"`
+        BDIR=$(readlink -f "$BDIR")
         if [ -z "$BDIR" ]; then
-            PARENTDIR=`dirname "$1"`
+            PARENTDIR=$(dirname "$1")
             echo >&2 "Error: the directory $PARENTDIR does not exist?"
             return 1
         fi
     fi
-    if [ "x$2" != "x" ]; then
+    if [ -n "$2" ]; then
         BITBAKEDIR="$2"
     fi
 fi
-if expr "$BDIR" : '/.*' > /dev/null ; then
+if [ "${BDIR#/}" != "$BDIR" ]; then
     BUILDDIR="$BDIR"
 else
-    BUILDDIR="`pwd`/$BDIR"
+    BUILDDIR="$(pwd)/$BDIR"
 fi
 unset BDIR
 
-if [ "x$BITBAKEDIR" = "x" ]; then
-    BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
+if [ -z "$BITBAKEDIR" ]; then
+    BITBAKEDIR="$OEROOT/bitbake$BBEXTRA"
 fi
 
-BITBAKEDIR=`readlink -f "$BITBAKEDIR"`
-BUILDDIR=`readlink -f "$BUILDDIR"`
+BITBAKEDIR=$(readlink -f "$BITBAKEDIR")
+BUILDDIR=$(readlink -f "$BUILDDIR")
 
-if ! (test -d "$BITBAKEDIR"); then
+if [ ! -d "$BITBAKEDIR" ]; then
     echo >&2 "Error: The bitbake directory ($BITBAKEDIR) does not exist!  Please ensure a copy of bitbake exists at this location"
     return 1
 fi
 
 # Make sure our paths are at the beginning of $PATH
-NEWPATHS="${OEROOT}/scripts:$BITBAKEDIR/bin:"
-PATH=$NEWPATHS$(echo $PATH | sed -e "s|:$NEWPATHS|:|g" -e "s|^$NEWPATHS||")
-unset BITBAKEDIR NEWPATHS
+for newpath in "$BITBAKEDIR/bin" "$OEROOT/scripts"; do
+    # Remove any existences of $newpath from $PATH
+    PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\2#g;s#^:##")
+
+    # Add $newpath to $PATH
+    PATH="$newpath:$PATH"
+done
+unset BITBAKEDIR newpath
 
 # Used by the runqemu script
 export BUILDDIR
 export PATH
-export BB_ENV_EXTRAWHITE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \
+
+BB_ENV_EXTRAWHITE_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \
 HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \
 all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \
 SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \
 SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR"
+
+BB_ENV_EXTRAWHITE="$(echo $BB_ENV_EXTRAWHITE $BB_ENV_EXTRAWHITE_OE | tr ' ' '\n' | LC_ALL=C sort --unique | tr '\n' ' ')"
+
+export BB_ENV_EXTRAWHITE
diff --git a/yocto-poky/scripts/oe-git-proxy b/yocto-poky/scripts/oe-git-proxy
index d2e9f92..1247902 100755
--- a/yocto-poky/scripts/oe-git-proxy
+++ b/yocto-poky/scripts/oe-git-proxy
@@ -1,10 +1,12 @@
 #!/bin/bash
 
 # oe-git-proxy is a simple tool to be via GIT_PROXY_COMMAND. It uses socat
-# to make SOCKS5 or HTTPS proxy connections. It uses ALL_PROXY to determine the
-# proxy server, protocol, and port. It uses NO_PROXY to skip using the proxy for
-# a comma delimited list of hosts, host globs (*.example.com), IPs, or CIDR
-# masks (192.168.1.0/24). It is known to work with both bash and dash shells.
+# to make SOCKS5 or HTTPS proxy connections.
+# It uses ALL_PROXY or all_proxy or http_proxy to determine the proxy server,
+# protocol, and port.
+# It uses NO_PROXY to skip using the proxy for a comma delimited list of
+# hosts, host globs (*.example.com), IPs, or CIDR masks (192.168.1.0/24). It
+# is known to work with both bash and dash shells.
 #
 # Example ALL_PROXY values:
 # ALL_PROXY=socks://socks.example.com:1080
@@ -99,6 +101,9 @@
 # If no proxy is set or needed, just connect directly
 METHOD="TCP:$1:$2"
 
+[ -z "${ALL_PROXY}" ] && ALL_PROXY=$all_proxy
+[ -z "${ALL_PROXY}" ] && ALL_PROXY=$http_proxy
+
 if [ -z "$ALL_PROXY" ]; then
 	exec $SOCAT STDIO $METHOD
 fi
@@ -111,14 +116,27 @@
 done
 
 # Proxy is necessary, determine protocol, server, and port
-PROTO=$(echo $ALL_PROXY | sed -e 's/\([^:]*\):\/\/.*/\1/')
-PROXY=$(echo $ALL_PROXY | sed -e 's/.*:\/\/\([^:]*\).*/\1/')
-# For backwards compatibility, this allows the port number to be followed by /?
-# in addition to the customary optional /
-PORT=$(echo $ALL_PROXY | sed -e 's/.*:\([0-9]*\)\(\/?\?\)\?$/\1/')
-if [ "$PORT" = "$ALL_PROXY" ]; then
+# extract protocol
+PROTO=${ALL_PROXY%://*}
+# strip protocol:// from string
+ALL_PROXY=${ALL_PROXY#*://}
+# extract host & port parts:
+#   1) drop username/password
+PROXY=${ALL_PROXY##*@}
+#   2) remove optional trailing /?
+PROXY=${PROXY%%/*}
+#   3) extract optional port
+PORT=${PROXY##*:}
+if [ "$PORT" = "$PROXY" ]; then
 	PORT=""
 fi
+#   4) remove port
+PROXY=${PROXY%%:*}
+
+# extract username & password
+PROXYAUTH="${ALL_PROXY%@*}"
+[ "$PROXYAUTH" = "$ALL_PROXY" ] && PROXYAUTH=
+[ -n "${PROXYAUTH}" ] && PROXYAUTH=",proxyauth=${PROXYAUTH}"
 
 if [ "$PROTO" = "socks" ] || [ "$PROTO" = "socks4a" ]; then
 	if [ -z "$PORT" ]; then
@@ -135,7 +153,7 @@
 	if [ -z "$PORT" ]; then
 		PORT="8080"
 	fi
-	METHOD="PROXY:$PROXY:$1:$2,proxyport=$PORT"
+	METHOD="PROXY:$PROXY:$1:$2,proxyport=${PORT}${PROXYAUTH}"
 fi
 
-exec $SOCAT STDIO $METHOD
+exec $SOCAT STDIO "$METHOD"
diff --git a/yocto-poky/scripts/oe-pkgdata-util b/yocto-poky/scripts/oe-pkgdata-util
index cb19cc4..a04e44d 100755
--- a/yocto-poky/scripts/oe-pkgdata-util
+++ b/yocto-poky/scripts/oe-pkgdata-util
@@ -33,6 +33,7 @@
 lib_path = scripts_path + '/lib'
 sys.path = sys.path + [lib_path]
 import scriptutils
+import argparse_oe
 logger = scriptutils.logger_create('pkgdatautil')
 
 def tinfoil_init():
@@ -160,8 +161,18 @@
 def read_value(args):
     # Handle both multiple arguments and multiple values within an arg (old syntax)
     packages = []
-    for pkgitem in args.pkg:
-        packages.extend(pkgitem.split())
+    if args.file:
+        with open(args.file, 'r') as f:
+            for line in f:
+                splitline = line.split()
+                if splitline:
+                    packages.append(splitline[0])
+    else:
+        for pkgitem in args.pkg:
+            packages.extend(pkgitem.split())
+        if not packages:
+            logger.error("No packages specified")
+            sys.exit(1)
 
     def readvar(pkgdata_file, valuename):
         val = ""
@@ -186,9 +197,13 @@
                 qvar = "%s_%s" % (args.valuename, mappedpkg)
                 # PKGSIZE is now in bytes, but we we want it in KB
                 pkgsize = (int(readvar(revlink, qvar)) + 1024 // 2) // 1024
-                print("%d" % pkgsize)
+                value = "%d" % pkgsize
             else:
-                print(readvar(revlink, qvar))
+                value = readvar(revlink, qvar)
+            if args.prefix_name:
+                print('%s %s' % (pkg_name, value))
+            else:
+                print(value)
 
 def lookup_pkglist(pkgs, pkgdata_dir, reverse):
     if reverse:
@@ -365,7 +380,7 @@
             sys.exit(1)
         pkglist = args.pkg
 
-    for pkg in pkglist:
+    for pkg in sorted(pkglist):
         print("%s:" % pkg)
         if args.runtime:
             pkgdatafile = os.path.join(args.pkgdata_dir, "runtime-reverse", pkg)
@@ -417,8 +432,8 @@
 
 
 def main():
-    parser = argparse.ArgumentParser(description="OpenEmbedded pkgdata tool - queries the pkgdata files written out during do_package",
-                                     epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
+    parser = argparse_oe.ArgumentParser(description="OpenEmbedded pkgdata tool - queries the pkgdata files written out during do_package",
+                                        epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
     parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
     parser.add_argument('-p', '--pkgdata-dir', help='Path to pkgdata directory (determined automatically if not specified)')
     subparsers = parser.add_subparsers(title='subcommands', metavar='<subcommand>')
@@ -464,7 +479,9 @@
                                           help='Read any pkgdata value for one or more packages',
                                           description='Reads the named value from the pkgdata files for the specified packages')
     parser_read_value.add_argument('valuename', help='Name of the value to look up')
-    parser_read_value.add_argument('pkg', nargs='+', help='Runtime package name to look up')
+    parser_read_value.add_argument('pkg', nargs='*', help='Runtime package name to look up')
+    parser_read_value.add_argument('-f', '--file', help='Read package names from the specified file (one per line, first field only)')
+    parser_read_value.add_argument('-n', '--prefix-name', help='Prefix output with package name', action='store_true')
     parser_read_value.set_defaults(func=read_value)
 
     parser_glob = subparsers.add_parser('glob',
diff --git a/yocto-poky/scripts/oe-publish-sdk b/yocto-poky/scripts/oe-publish-sdk
index ee4169a..55872f2 100755
--- a/yocto-poky/scripts/oe-publish-sdk
+++ b/yocto-poky/scripts/oe-publish-sdk
@@ -2,13 +2,20 @@
 
 # OpenEmbedded SDK publishing tool
 
-# oe-publish-sdk publish <ext-sdk> <destination>
-# <ext-sdk>: extensible SDK to publish (path to the installer shell script)
-# <destination>: local or remote location which servers as an SDK update server
-# e.g.
-# oe-publish-sdk /path/to/sdk-ext.sh /mnt/poky/sdk-ext
-# oe-publish-sdk /path/to/sdk-ext.sh user@host:/opt/poky/sdk-ext
+# Copyright (C) 2015-2016 Intel Corporation
 #
+# 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.
 
 import sys
 import os
@@ -24,6 +31,7 @@
 lib_path = scripts_path + '/lib'
 sys.path = sys.path + [lib_path]
 import scriptutils
+import argparse_oe
 logger = scriptutils.logger_create('sdktool')
 
 def mkdir(d):
@@ -42,7 +50,10 @@
 
     # Ensure the SDK exists
     if not os.path.exists(target_sdk):
-        logger.error("%s doesn't exist" % target_sdk)
+        logger.error("Specified SDK %s doesn't exist" % target_sdk)
+        return -1
+    if os.path.isdir(target_sdk):
+        logger.error("%s is a directory - expected path to SDK installer file" % target_sdk)
         return -1
 
     if ':' in destination:
@@ -52,6 +63,7 @@
     else:
         is_remote = False
         dest_sdk = os.path.join(destination, sdk_basename)
+        destdir = destination
 
     # Making sure the directory exists
     logger.debug("Making sure the destination directory exists")
@@ -83,15 +95,16 @@
     # Unpack the SDK
     logger.info("Unpacking SDK")
     if not is_remote:
-        cmd = "sh %s -n -y -d %s" % (dest_sdk, destination)
+        cmd = "sh %s -p -y -d %s" % (dest_sdk, destination)
         ret = subprocess.call(cmd, shell=True)
         if ret == 0:
             logger.info('Successfully unpacked %s to %s' % (dest_sdk, destination))
+            os.remove(dest_sdk)
         else:
             logger.error('Failed to unpack %s to %s' % (dest_sdk, destination))
             return ret
     else:
-        cmd = "ssh %s 'sh %s -n -y -d %s'" % (host, dest_sdk, destdir)
+        cmd = "ssh %s 'sh %s -p -y -d %s && rm -f %s'" % (host, dest_sdk, destdir, dest_sdk)
         ret = subprocess.call(cmd, shell=True)
         if ret == 0:
             logger.info('Successfully unpacked %s to %s' % (dest_sdk, destdir))
@@ -101,9 +114,9 @@
 
     # Setting up the git repo
     if not is_remote:
-        cmd = 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; fi; git add -A .; git commit -q -m "init repo" || true; git update-server-info' % (destination, destination)
+        cmd = 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; echo "*.pyc\n*.pyo" > .gitignore; fi; git add -A .; git config user.email "oe@oe.oe" && git config user.name "OE" && git commit -q -m "init repo" || true; git update-server-info' % (destination, destination)
     else:
-        cmd = "ssh %s 'set -e; mkdir-p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; fi; git add -A .; git commit -q -m \"init repo\" || true; git update-server-info'" % (host, destdir, destdir)
+        cmd = "ssh %s 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; echo '*.pyc\n*.pyo' > .gitignore; fi; git add -A .; git config user.email 'oe@oe.oe' && git config user.name 'OE' && git commit -q -m \"init repo\" || true; git update-server-info'" % (host, destdir, destdir)
     ret = subprocess.call(cmd, shell=True)
     if ret == 0:
         logger.info('SDK published successfully')
@@ -113,13 +126,12 @@
 
 
 def main():
-    parser = argparse.ArgumentParser(description="OpenEmbedded development tool",
-                                     epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
+    parser = argparse_oe.ArgumentParser(description="OpenEmbedded extensible SDK publishing tool - writes server-side data to support the extensible SDK update process to a specified location")
     parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
     parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
 
-    parser.add_argument('sdk', help='Extensible SDK to publish')
-    parser.add_argument('dest', help='Destination to publish SDK to')
+    parser.add_argument('sdk', help='Extensible SDK to publish (path to .sh installer file)')
+    parser.add_argument('dest', help='Destination to publish SDK to; can be local path or remote in the form of user@host:/path (in the latter case ssh/scp will be used).')
 
     parser.set_defaults(func=publish)
 
@@ -139,5 +151,5 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
diff --git a/yocto-poky/scripts/oe-selftest b/yocto-poky/scripts/oe-selftest
index 91e2dd2..5e23ef0 100755
--- a/yocto-poky/scripts/oe-selftest
+++ b/yocto-poky/scripts/oe-selftest
@@ -16,13 +16,13 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 # DESCRIPTION
-# This script runs tests defined in meta/lib/selftest/
+# This script runs tests defined in meta/lib/oeqa/selftest/
 # It's purpose is to automate the testing of different bitbake tools.
 # To use it you just need to source your build environment setup script and
 # add the meta-selftest layer to your BBLAYERS.
-# Call the script as: "oe-selftest" to run all the tests in in meta/lib/selftest/
-# Call the script as: "oe-selftest <module>.<Class>.<method>" to run just a single test
-# E.g: "oe-selftest bboutput.BitbakeLayers" will run just the BitbakeLayers class from meta/lib/selftest/bboutput.py
+# Call the script as: "oe-selftest -a" to run all the tests in meta/lib/oeqa/selftest/
+# Call the script as: "oe-selftest -r <module>.<Class>.<method>" to run just a single test
+# E.g: "oe-selftest -r bblayers.BitbakeLayers" will run just the BitbakeLayers class from meta/lib/oeqa/selftest/bblayers.py
 
 
 import os
@@ -30,22 +30,31 @@
 import unittest
 import logging
 import argparse
+import subprocess
+import time as t
+import re
+import fnmatch
 
 sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '/lib')
 import scriptpath
 scriptpath.add_bitbake_lib_path()
 scriptpath.add_oe_lib_path()
+import argparse_oe
 
 import oeqa.selftest
 import oeqa.utils.ftools as ftools
 from oeqa.utils.commands import runCmd, get_bb_var, get_test_layer
-from oeqa.selftest.base import oeSelfTest
+from oeqa.selftest.base import oeSelfTest, get_available_machines
 
 def logger_create():
+    log_file = "oe-selftest-" + t.strftime("%Y-%m-%d_%H:%M:%S") + ".log"
+    if os.path.exists("oe-selftest.log"): os.remove("oe-selftest.log")
+    os.symlink(log_file, "oe-selftest.log")
+
     log = logging.getLogger("selftest")
     log.setLevel(logging.DEBUG)
 
-    fh = logging.FileHandler(filename='oe-selftest.log', mode='w')
+    fh = logging.FileHandler(filename=log_file, mode='w')
     fh.setLevel(logging.DEBUG)
 
     ch = logging.StreamHandler(sys.stdout)
@@ -64,12 +73,26 @@
 
 def get_args_parser():
     description = "Script that runs unit tests agains bitbake and other Yocto related tools. The goal is to validate tools functionality and metadata integrity. Refer to https://wiki.yoctoproject.org/wiki/Oe-selftest for more information."
-    parser = argparse.ArgumentParser(description=description)
+    parser = argparse_oe.ArgumentParser(description=description)
     group = parser.add_mutually_exclusive_group(required=True)
-    group.add_argument('--run-tests', required=False, action='store', nargs='*', dest="run_tests", default=None, help='Select what tests to run (modules, classes or test methods). Format should be: <module>.<class>.<test_method>')
-    group.add_argument('--run-all-tests', required=False, action="store_true", dest="run_all_tests", default=False, help='Run all (unhidden) tests')
-    group.add_argument('--list-modules', required=False, action="store_true", dest="list_modules", default=False, help='List all available test modules.')
+    group.add_argument('-r', '--run-tests', required=False, action='store', nargs='*', dest="run_tests", default=None, help='Select what tests to run (modules, classes or test methods). Format should be: <module>.<class>.<test_method>')
+    group.add_argument('-a', '--run-all-tests', required=False, action="store_true", dest="run_all_tests", default=False, help='Run all (unhidden) tests')
+    group.add_argument('-m', '--list-modules', required=False, action="store_true", dest="list_modules", default=False, help='List all available test modules.')
     group.add_argument('--list-classes', required=False, action="store_true", dest="list_allclasses", default=False, help='List all available test classes.')
+    parser.add_argument('--coverage', action="store_true", help="Run code coverage when testing")
+    parser.add_argument('--coverage-source', dest="coverage_source", nargs="+", help="Specifiy the directories to take coverage from")
+    parser.add_argument('--coverage-include', dest="coverage_include", nargs="+", help="Specify extra patterns to include into the coverage measurement")
+    parser.add_argument('--coverage-omit', dest="coverage_omit", nargs="+", help="Specify with extra patterns to exclude from the coverage measurement")
+    group.add_argument('--run-tests-by', required=False, dest='run_tests_by', default=False, nargs='*',
+                       help='run-tests-by <name|class|module|id|tag> <list of tests|classes|modules|ids|tags>')
+    group.add_argument('--list-tests-by', required=False, dest='list_tests_by', default=False, nargs='*',
+                       help='list-tests-by <name|class|module|id|tag> <list of tests|classes|modules|ids|tags>')
+    group.add_argument('-l', '--list-tests', required=False,  action="store_true", dest="list_tests", default=False,
+                       help='List all available tests.')
+    group.add_argument('--list-tags', required=False, dest='list_tags', default=False, action="store_true",
+                       help='List all tags that have been set to test cases.')
+    parser.add_argument('--machine', required=False, dest='machine', choices=['random', 'all'], default=None,
+                        help='Run tests on different machines (random/all).')
     return parser
 
 
@@ -101,7 +124,7 @@
         not in ftools.read_file(os.path.join(builddir, "conf/local.conf")):
             log.info("Adding: \"include selftest.inc\" in local.conf")
             ftools.append_file(os.path.join(builddir, "conf/local.conf"), \
-                    "\n#include added by oe-selftest.py\ninclude selftest.inc")
+                    "\n#include added by oe-selftest.py\ninclude machine.inc\ninclude selftest.inc")
 
     if "#include added by oe-selftest.py" \
         not in ftools.read_file(os.path.join(builddir, "conf/bblayers.conf")):
@@ -117,13 +140,13 @@
         in ftools.read_file(os.path.join(builddir, "conf/local.conf")):
             log.info("Removing the include from local.conf")
             ftools.remove_from_file(os.path.join(builddir, "conf/local.conf"), \
-                    "#include added by oe-selftest.py\ninclude selftest.inc")
+                    "\n#include added by oe-selftest.py\ninclude machine.inc\ninclude selftest.inc")
 
     if "#include added by oe-selftest.py" \
         in ftools.read_file(os.path.join(builddir, "conf/bblayers.conf")):
             log.info("Removing the include from bblayers.conf")
             ftools.remove_from_file(os.path.join(builddir, "conf/bblayers.conf"), \
-                    "#include added by oe-selftest.py\ninclude bblayers.inc")
+                    "\n#include added by oe-selftest.py\ninclude bblayers.inc")
 
 def remove_inc_files():
     try:
@@ -135,24 +158,281 @@
     except (AttributeError, OSError,) as e:    # AttributeError may happen if BUILDDIR is not set
         pass
 
+    for incl_file in ['conf/bblayers.inc', 'conf/machine.inc']:
+        try:
+            os.remove(os.path.join(os.environ.get("BUILDDIR"), incl_file))
+        except:
+            pass
+
+
+def get_tests_modules(include_hidden=False):
+    modules_list = list()
+    for modules_path in oeqa.selftest.__path__:
+        for (p, d, f) in os.walk(modules_path):
+            files = sorted([f for f in os.listdir(p) if f.endswith('.py') and not (f.startswith('_') and not include_hidden) and not f.startswith('__') and f != 'base.py'])
+            for f in files:
+                submodules = p.split("selftest")[-1]
+                module = ""
+                if submodules:
+                    module = 'oeqa.selftest' + submodules.replace("/",".") + "." + f.split('.py')[0]
+                else:
+                    module = 'oeqa.selftest.' + f.split('.py')[0]
+                if module not in modules_list:
+                    modules_list.append(module)
+    return modules_list
+
+
+def get_tests(exclusive_modules=[], include_hidden=False):
+    test_modules = list()
+    for x in exclusive_modules:
+        test_modules.append('oeqa.selftest.' + x)
+    if not test_modules:
+        inc_hidden = include_hidden
+        test_modules = get_tests_modules(inc_hidden)
+
+    return test_modules
+
+
+class Tc:
+    def __init__(self, tcname, tcclass, tcmodule, tcid=None, tctag=None):
+        self.tcname = tcname
+        self.tcclass = tcclass
+        self.tcmodule = tcmodule
+        self.tcid = tcid
+        # A test case can have multiple tags (as tuples) otherwise str will suffice
+        self.tctag = tctag
+        self.fullpath = '.'.join(['oeqa', 'selftest', tcmodule, tcclass, tcname])
+
+
+def get_tests_from_module(tmod):
+    tlist = []
+    prefix = 'oeqa.selftest.'
+
     try:
-        os.remove(os.path.join(os.environ.get("BUILDDIR"), "conf/bblayers.inc"))
+        import importlib
+        modlib = importlib.import_module(tmod)
+        for mod in vars(modlib).values():
+            if isinstance(mod, type(oeSelfTest)) and issubclass(mod, oeSelfTest) and mod is not oeSelfTest:
+                for test in dir(mod):
+                    if test.startswith('test_') and hasattr(vars(mod)[test], '__call__'):
+                        # Get test case id and feature tag
+                        # NOTE: if testcase decorator or feature tag not set will throw error
+                        try:
+                            tid = vars(mod)[test].test_case
+                        except:
+                            print 'DEBUG: tc id missing for ' + str(test)
+                            tid = None
+                        try:
+                            ttag = vars(mod)[test].tag__feature
+                        except:
+                            # print 'DEBUG: feature tag missing for ' + str(test)
+                            ttag = None
+
+                        # NOTE: for some reason lstrip() doesn't work for mod.__module__
+                        tlist.append(Tc(test, mod.__name__, mod.__module__.replace(prefix, ''), tid, ttag))
     except:
         pass
 
-def get_tests(exclusive_modules=[], include_hidden=False):
-    testslist = []
-    for x in exclusive_modules:
-        testslist.append('oeqa.selftest.' + x)
-    if not testslist:
-        for testpath in oeqa.selftest.__path__:
-            files = sorted([f for f in os.listdir(testpath) if f.endswith('.py') and not (f.startswith('_') and not include_hidden) and not f.startswith('__') and f != 'base.py'])
-            for f in files:
-                module = 'oeqa.selftest.' + f[:-3]
-                if module not in testslist:
-                    testslist.append(module)
+    return tlist
 
-    return testslist
+
+def get_all_tests():
+    # Get all the test modules (except the hidden ones)
+    testlist = []
+    tests_modules = get_tests_modules()
+    # Get all the tests from modules
+    for tmod in sorted(tests_modules):
+        testlist += get_tests_from_module(tmod)
+    return testlist
+
+
+def get_testsuite_by(criteria, keyword):
+    # Get a testsuite based on 'keyword'
+    # criteria: name, class, module, id, tag
+    # keyword: a list of tests, classes, modules, ids, tags
+
+    ts = []
+    all_tests = get_all_tests()
+
+    def get_matches(values):
+        # Get an item and return the ones that match with keyword(s)
+        # values: the list of items (names, modules, classes...)
+        result = []
+        remaining = values[:]
+        for key in keyword:
+            if key in remaining:
+                # Regular matching of exact item
+                result.append(key)
+                remaining.remove(key)
+            else:
+                # Wildcard matching
+                pattern = re.compile(fnmatch.translate(r"%s" % key))
+                added = [x for x in remaining if pattern.match(x)]
+                result.extend(added)
+                remaining = [x for x in remaining if x not in added]
+
+        return result
+
+    if criteria == 'name':
+        names = get_matches([ tc.tcname for tc in all_tests ])
+        ts = [ tc for tc in all_tests if tc.tcname in names ]
+
+    elif criteria == 'class':
+        classes = get_matches([ tc.tcclass for tc in all_tests ])
+        ts = [ tc for tc in all_tests if tc.tcclass in classes ]
+
+    elif criteria == 'module':
+        modules = get_matches([ tc.tcmodule for tc in all_tests ])
+        ts = [ tc for tc in all_tests if tc.tcmodule in modules ]
+
+    elif criteria == 'id':
+        ids = get_matches([ str(tc.tcid) for tc in all_tests ])
+        ts = [ tc for tc in all_tests if str(tc.tcid) in ids ]
+
+    elif criteria == 'tag':
+        values = set()
+        for tc in all_tests:
+            # tc can have multiple tags (as tuple) otherwise str will suffice
+            if isinstance(tc.tctag, tuple):
+                values |= { str(tag) for tag in tc.tctag }
+            else:
+                values.add(str(tc.tctag))
+
+        tags = get_matches(list(values))
+
+        for tc in all_tests:
+            for tag in tags:
+                if isinstance(tc.tctag, tuple) and tag in tc.tctag:
+                    ts.append(tc)
+                elif tag == tc.tctag:
+                    ts.append(tc)
+
+        # Remove duplicates from the list
+        ts = list(set(ts))
+
+    return ts
+
+
+def list_testsuite_by(criteria, keyword):
+    # Get a testsuite based on 'keyword'
+    # criteria: name, class, module, id, tag
+    # keyword: a list of tests, classes, modules, ids, tags
+
+    ts = sorted([ (tc.tcid, tc.tctag, tc.tcname, tc.tcclass, tc.tcmodule) for tc in get_testsuite_by(criteria, keyword) ])
+
+    print '%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % ('id', 'tag', 'name', 'class', 'module')
+    print '_' * 150
+    for t in ts:
+        if isinstance(t[1], (tuple, list)):
+            print '%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % (t[0], ', '.join(t[1]), t[2], t[3], t[4])
+        else:
+            print '%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % t
+    print '_' * 150
+    print 'Filtering by:\t %s' % criteria
+    print 'Looking for:\t %s' % ', '.join(str(x) for x in keyword)
+    print 'Total found:\t %s' % len(ts)
+
+
+def list_tests():
+    # List all available oe-selftest tests
+
+    ts = get_all_tests()
+
+    print '%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % ('id', 'tag', 'name', 'class', 'module')
+    print '_' * 150
+    for t in ts:
+        if isinstance(t.tctag, (tuple, list)):
+            print '%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % (t.tcid, ', '.join(t.tctag), t.tcname, t.tcclass, t.tcmodule)
+        else:
+            print '%-4s\t%-20s\t%-60s\t%-25s\t%-20s' % (t.tcid, t.tctag, t.tcname, t.tcclass, t.tcmodule)
+    print '_' * 150
+    print 'Total found:\t %s' % len(ts)
+
+
+def list_tags():
+    # Get all tags set to test cases
+    # This is useful when setting tags to test cases
+    # The list of tags should be kept as minimal as possible
+    tags = set()
+    all_tests = get_all_tests()
+
+    for tc in all_tests:
+        if isinstance(tc.tctag, (tuple, list)):
+            tags.update(set(tc.tctag))
+        else:
+            tags.add(tc.tctag)
+
+    print 'Tags:\t%s' % ', '.join(str(x) for x in tags)
+
+def coverage_setup(coverage_source, coverage_include, coverage_omit):
+    """ Set up the coverage measurement for the testcases to be run """
+    import datetime
+    import subprocess
+    builddir = os.environ.get("BUILDDIR")
+    pokydir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+    curcommit= subprocess.check_output(["git", "--git-dir", os.path.join(pokydir, ".git"), "rev-parse", "HEAD"])
+    coveragerc = "%s/.coveragerc" % builddir
+    data_file = "%s/.coverage." % builddir
+    data_file += datetime.datetime.now().strftime('%Y%m%dT%H%M%S')
+    if os.path.isfile(data_file):
+        os.remove(data_file)
+    with open(coveragerc, 'w') as cps:
+        cps.write("# Generated with command '%s'\n" % " ".join(sys.argv))
+        cps.write("# HEAD commit %s\n" % curcommit.strip())
+        cps.write("[run]\n")
+        cps.write("data_file = %s\n" % data_file)
+        cps.write("branch = True\n")
+        # Measure just BBLAYERS, scripts and bitbake folders
+        cps.write("source = \n")
+        if coverage_source:
+            for directory in coverage_source:
+                if not os.path.isdir(directory):
+                    log.warn("Directory %s is not valid.", directory)
+                cps.write("    %s\n" % directory)
+        else:
+            for layer in get_bb_var('BBLAYERS').split():
+                cps.write("    %s\n" % layer)
+            cps.write("    %s\n" % os.path.dirname(os.path.realpath(__file__)))
+            cps.write("    %s\n" % os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))),'bitbake'))
+
+        if coverage_include:
+            cps.write("include = \n")
+            for pattern in coverage_include:
+                cps.write("    %s\n" % pattern)
+        if coverage_omit:
+            cps.write("omit = \n")
+            for pattern in coverage_omit:
+                cps.write("    %s\n" % pattern)
+
+        return coveragerc
+
+def coverage_report():
+    """ Loads the coverage data gathered and reports it back """
+    try:
+        # Coverage4 uses coverage.Coverage
+        from coverage import Coverage
+    except:
+        # Coverage under version 4 uses coverage.coverage
+        from coverage import coverage as Coverage
+
+    import cStringIO as StringIO
+    from coverage.misc import CoverageException
+
+    cov_output = StringIO.StringIO()
+    # Creating the coverage data with the setting from the configuration file
+    cov = Coverage(config_file = os.environ.get('COVERAGE_PROCESS_START'))
+    try:
+        # Load data from the data file specified in the configuration
+        cov.load()
+        # Store report data in a StringIO variable
+        cov.report(file = cov_output, show_missing=False)
+        log.info("\n%s" % cov_output.getvalue())
+    except CoverageException as e:
+        # Show problems with the reporting. Since Coverage4 not finding  any data to report raises an exception
+        log.warn("%s" % str(e))
+    finally:
+        cov_output.close()
+
 
 def main():
     parser = get_args_parser()
@@ -165,6 +445,32 @@
     sys.path.extend(layer_libdirs)
     reload(oeqa.selftest)
 
+    if args.run_tests_by and len(args.run_tests_by) >= 2:
+        valid_options = ['name', 'class', 'module', 'id', 'tag']
+        if args.run_tests_by[0] not in valid_options:
+            print '--run-tests-by %s not a valid option. Choose one of <name|class|module|id|tag>.' % args.run_tests_by[0]
+            return 1
+        else:
+            criteria = args.run_tests_by[0]
+            keyword = args.run_tests_by[1:]
+            ts = sorted([ tc.fullpath for tc in get_testsuite_by(criteria, keyword) ])
+
+    if args.list_tests_by and len(args.list_tests_by) >= 2:
+        valid_options = ['name', 'class', 'module', 'id', 'tag']
+        if args.list_tests_by[0] not in valid_options:
+            print '--list-tests-by %s not a valid option. Choose one of <name|class|module|id|tag>.' % args.list_tests_by[0]
+            return 1
+        else:
+            criteria = args.list_tests_by[0]
+            keyword = args.list_tests_by[1:]
+            list_testsuite_by(criteria, keyword)
+
+    if args.list_tests:
+        list_tests()
+
+    if args.list_tags:
+        list_tags()
+
     if args.list_allclasses:
         args.list_modules = True
 
@@ -172,7 +478,7 @@
         log.info('Listing all available test modules:')
         testslist = get_tests(include_hidden=True)
         for test in testslist:
-            module = test.split('.')[-1]
+            module = test.split('oeqa.selftest.')[-1]
             info = ''
             if module.startswith('_'):
                 info = ' (hidden)'
@@ -186,22 +492,26 @@
                         if isinstance(t, type(oeSelfTest)) and issubclass(t, oeSelfTest) and t!=oeSelfTest:
                             print " --", v
                             for method in dir(t):
-                                if method.startswith("test_"):
+                                if method.startswith("test_") and callable(vars(t)[method]):
                                     print " --  --", method
 
                 except (AttributeError, ImportError) as e:
                     print e
                     pass
 
-    if args.run_tests or args.run_all_tests:
+    if args.run_tests or args.run_all_tests or args.run_tests_by:
         if not preflight_check():
             return 1
 
-        testslist = get_tests(exclusive_modules=(args.run_tests or []), include_hidden=False)
+        if args.run_tests_by:
+            testslist = ts
+        else:
+            testslist = get_tests(exclusive_modules=(args.run_tests or []), include_hidden=False)
+
         suite = unittest.TestSuite()
         loader = unittest.TestLoader()
         loader.sortTestMethodsUsing = None
-        runner = unittest.TextTestRunner(verbosity=2, resultclass=StampedResult)
+        runner = unittest.TextTestRunner(verbosity=2, resultclass=buildResultClass(args))
         # we need to do this here, otherwise just loading the tests
         # will take 2 minutes (bitbake -e calls)
         oeSelfTest.testlayer_path = get_test_layer()
@@ -214,23 +524,104 @@
                 log.error(e)
                 return 1
         add_include()
-        result = runner.run(suite)
+
+        if args.machine:
+            # Custom machine sets only weak default values (??=) for MACHINE in machine.inc
+            # This let test cases that require a specific MACHINE to be able to override it, using (?= or =)
+            log.info('Custom machine mode enabled. MACHINE set to %s' % args.machine)
+            if args.machine == 'random':
+                os.environ['CUSTOMMACHINE'] = 'random'
+                result = runner.run(suite)
+            else:  # all
+                machines = get_available_machines()
+                for m in machines:
+                    log.info('Run tests with custom MACHINE set to: %s' % m)
+                    os.environ['CUSTOMMACHINE'] = m
+                    result = runner.run(suite)
+        else:
+            result = runner.run(suite)
+
         log.info("Finished")
+
         if result.wasSuccessful():
             return 0
         else:
             return 1
 
-class StampedResult(unittest.TextTestResult):
-    """
-    Custom TestResult that prints the time when a test starts.  As oe-selftest
-    can take a long time (ie a few hours) to run, timestamps help us understand
-    what tests are taking a long time to execute.
-    """
-    def startTest(self, test):
-        import time
-        self.stream.write(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + " - ")
-        super(StampedResult, self).startTest(test)
+def buildResultClass(args):
+    """Build a Result Class to use in the testcase execution"""
+    import site
+
+    class StampedResult(unittest.TextTestResult):
+        """
+        Custom TestResult that prints the time when a test starts.  As oe-selftest
+        can take a long time (ie a few hours) to run, timestamps help us understand
+        what tests are taking a long time to execute.
+        If coverage is required, this class executes the coverage setup and reporting.
+        """
+        def startTest(self, test):
+            import time
+            self.stream.write(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + " - ")
+            super(StampedResult, self).startTest(test)
+
+        def startTestRun(self):
+            """ Setup coverage before running any testcase """
+
+            # variable holding the coverage configuration file allowing subprocess to be measured
+            self.coveragepth = None
+
+            # indicates the system if coverage is currently installed
+            self.coverage_installed = True
+
+            if args.coverage or args.coverage_source or args.coverage_include or args.coverage_omit:
+                try:
+                    # check if user can do coverage
+                    import coverage
+                except:
+                    log.warn("python coverage is not installed. More info on https://pypi.python.org/pypi/coverage")
+                    self.coverage_installed = False
+
+                if self.coverage_installed:
+                    log.info("Coverage is enabled")
+
+                    # In case the user has not set the variable COVERAGE_PROCESS_START,
+                    # create a default one and export it. The COVERAGE_PROCESS_START
+                    # value indicates where the coverage configuration file resides
+                    # More info on https://pypi.python.org/pypi/coverage
+                    if not os.environ.get('COVERAGE_PROCESS_START'):
+                        os.environ['COVERAGE_PROCESS_START'] = coverage_setup(args.coverage_source, args.coverage_include, args.coverage_omit)
+
+                    # Use default site.USER_SITE and write corresponding config file
+                    site.ENABLE_USER_SITE = True
+                    if not os.path.exists(site.USER_SITE):
+                        os.makedirs(site.USER_SITE)
+                    self.coveragepth = os.path.join(site.USER_SITE, "coverage.pth")
+                    with open(self.coveragepth, 'w') as cps:
+                        cps.write('import sys,site; sys.path.extend(site.getsitepackages()); import coverage; coverage.process_startup();')
+
+        def stopTestRun(self):
+            """ Report coverage data after the testcases are run """
+
+            if args.coverage or args.coverage_source or args.coverage_include or args.coverage_omit:
+                if self.coverage_installed:
+                    with open(os.environ['COVERAGE_PROCESS_START']) as ccf:
+                        log.info("Coverage configuration file (%s)" % os.environ.get('COVERAGE_PROCESS_START'))
+                        log.info("===========================")
+                        log.info("\n%s" % "".join(ccf.readlines()))
+
+                    log.info("Coverage Report")
+                    log.info("===============")
+                    try:
+                        coverage_report()
+                    finally:
+                        # remove the pth file
+                        try:
+                            os.remove(self.coveragepth)
+                        except OSError:
+                            log.warn("Expected temporal file from coverage is missing, ignoring removal.")
+
+    return StampedResult
+
 
 if __name__ == "__main__":
     try:
@@ -238,7 +629,7 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     finally:
         remove_include()
         remove_inc_files()
diff --git a/yocto-poky/scripts/oe-setup-builddir b/yocto-poky/scripts/oe-setup-builddir
index 2598ba8..93722e0 100755
--- a/yocto-poky/scripts/oe-setup-builddir
+++ b/yocto-poky/scripts/oe-setup-builddir
@@ -75,12 +75,11 @@
     OECORELOCALCONF="$OEROOT/meta/conf/local.conf.sample"
 fi
 if [ ! -r "$BUILDDIR/conf/local.conf" ]; then
-cat <<EOM
+    cat <<EOM
 You had no conf/local.conf file. This configuration file has therefore been
-created for you with some default values. You may wish to edit it to use a 
-different MACHINE (target hardware) or enable parallel build options to take 
-advantage of multiple cores for example. See the file for more information as 
-common configuration options are commented.
+created for you with some default values. You may wish to edit it to, for
+example, select a different MACHINE (target hardware). See conf/local.conf
+for more information as common configuration options are commented.
 
 EOM
     cp -f $OECORELOCALCONF "$BUILDDIR/conf/local.conf"
@@ -92,9 +91,9 @@
 fi
 if [ ! -r "$BUILDDIR/conf/bblayers.conf" ]; then
     cat <<EOM
-You had no conf/bblayers.conf file. The configuration file has been created for
-you with some default values. To add additional metadata layers into your
-configuration please add entries to this file.
+You had no conf/bblayers.conf file. This configuration file has therefore been
+created for you with some default values. To add additional metadata layers
+into your configuration please add entries to conf/bblayers.conf.
 
 EOM
 
diff --git a/yocto-poky/scripts/postinst-intercepts/update_font_cache b/yocto-poky/scripts/postinst-intercepts/update_font_cache
index 0deab3c..bf65e19 100644
--- a/yocto-poky/scripts/postinst-intercepts/update_font_cache
+++ b/yocto-poky/scripts/postinst-intercepts/update_font_cache
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -e
+
 PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir} \
-					-E ${fontconfigcacheenv} $D${bindir}/fc-cache --sysroot=$D ${fontconfigcacheparams}
+					-E ${fontconfigcacheenv} $D${bindir}/fc-cache --sysroot=$D --system-only ${fontconfigcacheparams}
 chown -R root:root $D${fontconfigcachedir}
diff --git a/yocto-poky/scripts/postinst-intercepts/update_gio_module_cache b/yocto-poky/scripts/postinst-intercepts/update_gio_module_cache
new file mode 100644
index 0000000..fe46809
--- /dev/null
+++ b/yocto-poky/scripts/postinst-intercepts/update_gio_module_cache
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D${libdir}:$D${base_libdir} \
+        $D${libexecdir}/${binprefix}gio-querymodules $D${libdir}/gio/modules/
+
diff --git a/yocto-poky/scripts/postinst-intercepts/update_pixbuf_cache b/yocto-poky/scripts/postinst-intercepts/update_pixbuf_cache
index a8b4001..5d44075 100644
--- a/yocto-poky/scripts/postinst-intercepts/update_pixbuf_cache
+++ b/yocto-poky/scripts/postinst-intercepts/update_pixbuf_cache
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -e
+
 export GDK_PIXBUF_MODULEDIR=$D${libdir}/gdk-pixbuf-2.0/2.10.0/loaders
 export GDK_PIXBUF_FATAL_LOADER=1
 
diff --git a/yocto-poky/scripts/recipetool b/yocto-poky/scripts/recipetool
index 87fb35e..6c66487 100755
--- a/yocto-poky/scripts/recipetool
+++ b/yocto-poky/scripts/recipetool
@@ -27,6 +27,7 @@
 lib_path = scripts_path + '/lib'
 sys.path = sys.path + [lib_path]
 import scriptutils
+import argparse_oe
 logger = scriptutils.logger_create('recipetool')
 
 plugins = []
@@ -34,7 +35,7 @@
 def tinfoil_init(parserecipes):
     import bb.tinfoil
     import logging
-    tinfoil = bb.tinfoil.Tinfoil()
+    tinfoil = bb.tinfoil.Tinfoil(tracking=True)
     tinfoil.prepare(not parserecipes)
     tinfoil.logger.setLevel(logger.getEffectiveLevel())
     return tinfoil
@@ -45,9 +46,9 @@
         logger.error("This script can only be run after initialising the build environment (e.g. by using oe-init-build-env)")
         sys.exit(1)
 
-    parser = argparse.ArgumentParser(description="OpenEmbedded recipe tool",
-                                     add_help=False,
-                                     epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
+    parser = argparse_oe.ArgumentParser(description="OpenEmbedded recipe tool",
+                                        add_help=False,
+                                        epilog="Use %(prog)s <subcommand> --help to get help on a specific command")
     parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true')
     parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true')
     parser.add_argument('--color', choices=['auto', 'always', 'never'], default='auto', help='Colorize output (where %(metavar)s is %(choices)s)', metavar='COLOR')
@@ -82,7 +83,11 @@
 
     registered = False
     for plugin in plugins:
-        if hasattr(plugin, 'register_command'):
+        if hasattr(plugin, 'register_commands'):
+            registered = True
+            plugin.register_commands(subparsers)
+        elif hasattr(plugin, 'register_command'):
+            # Legacy function name
             registered = True
             plugin.register_command(subparsers)
         if hasattr(plugin, 'tinfoil_init'):
@@ -96,7 +101,9 @@
 
     try:
         if getattr(args, 'parserecipes', False):
+            tinfoil.config_data.disableTracking()
             tinfoil.parseRecipes()
+            tinfoil.config_data.enableTracking()
         ret = args.func(args)
     except bb.BBHandledException:
         ret = 1
@@ -110,5 +117,5 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
diff --git a/yocto-poky/scripts/relocate_sdk.py b/yocto-poky/scripts/relocate_sdk.py
index 992db5c..99fca86 100755
--- a/yocto-poky/scripts/relocate_sdk.py
+++ b/yocto-poky/scripts/relocate_sdk.py
@@ -112,7 +112,7 @@
             f.write(dl_path)
             break
 
-def change_dl_sysdirs():
+def change_dl_sysdirs(elf_file_name):
     if arch == 32:
         sh_fmt = "<IIIIIIIIII"
     else:
@@ -156,6 +156,11 @@
             elif name == b(".ldsocache"):
                 ldsocache_path = f.read(sh_size)
                 new_ldsocache_path = old_prefix.sub(new_prefix, ldsocache_path)
+                new_ldsocache_path = new_ldsocache_path.rstrip(b("\0"))
+                if (len(new_ldsocache_path) >= sh_size):
+                    print("ERROR: could not relocate %s, .ldsocache section size = %i and %i is needed." \
+                    % (elf_file_name, sh_size, len(new_ldsocache_path)))
+                    sys.exit(-1)
                 # pad with zeros
                 new_ldsocache_path += b("\0") * (sh_size - len(new_ldsocache_path))
                 # write it back
@@ -166,6 +171,11 @@
                 while (offset + 4096) <= sh_size:
                     path = f.read(4096)
                     new_path = old_prefix.sub(new_prefix, path)
+                    new_path = new_path.rstrip(b("\0"))
+                    if (len(new_path) >= 4096):
+                        print("ERROR: could not relocate %s, max path size = 4096 and %i is needed." \
+                        % (elf_file_name, len(new_path)))
+                        sys.exit(-1)
                     # pad with zeros
                     new_path += b("\0") * (4096 - len(new_path))
                     #print "Changing %s to %s at %s" % (str(path), str(new_path), str(offset))
@@ -240,7 +250,7 @@
         if arch:
             parse_elf_header()
             change_interpreter(e)
-            change_dl_sysdirs()
+            change_dl_sysdirs(e)
 
     """ change permissions back """
     if perms:
diff --git a/yocto-poky/scripts/runqemu b/yocto-poky/scripts/runqemu
index e01d276..d7fa941 100755
--- a/yocto-poky/scripts/runqemu
+++ b/yocto-poky/scripts/runqemu
@@ -19,34 +19,33 @@
 
 usage() {
     MYNAME=`basename $0`
-    echo ""
-    echo "Usage: you can run this script with any valid combination"
-    echo "of the following environment variables (in any order):"
-    echo "  QEMUARCH - the qemu machine architecture to use"
-    echo "  KERNEL - the kernel image file to use"
-    echo "  ROOTFS - the rootfs image file or nfsroot directory to use"
-    echo "  MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)"
-    echo "  RAMFS - boot a ramfs-based image"
-    echo "  ISO - boot an ISO image"
-    echo "  VM - boot a virtual machine image (= a file representing a full disk with boot loader)"
-    echo "  Simplified QEMU command-line options can be passed with:"
-    echo "    nographic - disables video console"
-    echo "    serial - enables a serial console on /dev/ttyS0"
-    echo "    kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)"
-    echo "    kvm-vhost - enables KVM with vhost support when running qemux86/qemux86-64 (VT-capable CPU required)"
-    echo "    publicvnc - enable a VNC server open to all hosts"
-    echo "  qemuparams=\"xyz\" - specify custom parameters to QEMU"
-    echo "  bootparams=\"xyz\" - specify custom kernel parameters during boot"
-    echo ""
-    echo "Examples:"
-    echo "  $MYNAME qemuarm"
-    echo "  $MYNAME qemux86-64 core-image-sato ext4"
-    echo "  $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial"
-    echo "  $MYNAME qemux86 ramfs"
-    echo "  $MYNAME qemux86 iso"
-    echo "  $MYNAME qemux86 qemuparams=\"-m 256\""
-    echo "  $MYNAME qemux86 bootparams=\"psplash=false\""
-    echo "  $MYNAME path/to/<image>-<machine>.vmdk"
+cat <<_EOF
+
+Usage: you can run this script with any valid combination
+of the following environment variables (in any order):
+  KERNEL - the kernel image file to use
+  ROOTFS - the rootfs image file or nfsroot directory to use
+  MACHINE - the machine name (optional, autodetected from KERNEL filename if unspecified)
+  Simplified QEMU command-line options can be passed with:
+    nographic - disables video console
+    serial - enables a serial console on /dev/ttyS0
+    kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)
+    kvm-vhost - enables KVM with vhost support when running qemux86/qemux86-64 (VT-capable CPU required)
+    publicvnc - enable a VNC server open to all hosts
+  qemuparams="xyz" - specify custom parameters to QEMU
+  bootparams="xyz" - specify custom kernel parameters during boot
+
+Examples:
+  $MYNAME qemuarm
+  $MYNAME qemux86-64 core-image-sato ext4
+  $MYNAME qemux86-64 wic-image-minimal wic
+  $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial
+  $MYNAME qemux86 iso/hddimg/vmdk/qcow2/vdi/ramfs/cpio.gz...
+  $MYNAME qemux86 qemuparams="-m 256"
+  $MYNAME qemux86 bootparams="psplash=false"
+  $MYNAME path/to/<image>-<machine>.vmdk
+  $MYNAME path/to/<image>-<machine>.wic
+_EOF
     exit 1
 }
 
@@ -62,7 +61,6 @@
 MACHINE=${MACHINE:=""}
 KERNEL=${KERNEL:=""}
 ROOTFS=${ROOTFS:=""}
-VM=${VM:=""}
 FSTYPE=${FSTYPE:=""}
 LAZY_ROOTFS=""
 SCRIPT_QEMU_OPT=""
@@ -74,6 +72,7 @@
 KVM_ACTIVE="no"
 VHOST_ENABLED="no"
 VHOST_ACTIVE="no"
+IS_VM="false"
 
 # Determine whether the file is a kernel or QEMU image, and set the
 # appropriate variables
@@ -97,9 +96,11 @@
 		    error "conflicting FSTYPE types [$FSTYPE] and [$EXT]"
 		fi
 		;;
-	/hddimg/|/hdddirect/|/vmdk/)
+	/hddimg/|/hdddirect/|/vmdk/|/wic/|/qcow2/|/vdi/)
 		FSTYPE=$EXT
 		VM=$filename
+		ROOTFS=$filename
+		IS_VM="true"
 		;;
 	*)
 		error "unknown file arg [$filename]"
@@ -107,6 +108,13 @@
     esac
 }
 
+check_fstype_conflicts() {
+    if [ -z "$FSTYPE" -o "$FSTYPE" = "$1" ]; then
+        FSTYPE=$1
+    else
+        error "conflicting FSTYPE types [$FSTYPE] and [$1]"
+    fi
+}
 # Parse command line args without requiring specific ordering. It's a
 # bit more complex, but offers a great user experience.
 while true; do
@@ -117,18 +125,16 @@
             [ -z "$MACHINE" -o "$MACHINE" = "$arg" ] && MACHINE=$arg || \
                 error "conflicting MACHINE types [$MACHINE] and [$arg]"
             ;;
-        "ext2" | "ext3" | "ext4" | "jffs2" | "nfs" | "btrfs" | "hddimg" | "hdddirect" )
-            [ -z "$FSTYPE" -o "$FSTYPE" = "$arg" ] && FSTYPE=$arg || \
-                error "conflicting FSTYPE types [$FSTYPE] and [$arg]"
+        "ext"[234] | "jffs2" | "nfs" | "btrfs")
+            check_fstype_conflicts $arg
             ;;
-        "ramfs")
+        "hddimg" | "hdddirect" | "wic" | "vmdk" | "qcow2" | "vdi" | "iso")
+            check_fstype_conflicts $arg
+            IS_VM="true"
+            ;;
+        "ramfs" | "cpio.gz")
             FSTYPE=cpio.gz
-            RAMFS=true
             ;;
-        "iso")
-	    FSTYPE=iso
-	    ISOFS=true
-	    ;;
         "nographic")
             SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic"
             SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
@@ -141,7 +147,7 @@
         "tcpserial="*)
             TCPSERIAL_PORTNUM=${arg##tcpserial=}
             ;;
-	"biosdir="*)
+        "biosdir="*)
             CUSTOMBIOSDIR="${arg##biosdir=}"
 	    ;;
         "biosfilename="*)
@@ -182,11 +188,11 @@
             SLIRP_ENABLED="yes"
             ;;
         "publicvnc")
-            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -vnc 0.0.0.0:0"
+            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -vnc :0"
             ;;
         *-image*)
             [ -z "$ROOTFS" ] || \
-		error "conflicting ROOTFS args [$ROOTFS] and [$arg]"
+        		error "conflicting ROOTFS args [$ROOTFS] and [$arg]"
             if [ -f "$arg" ]; then
                 process_filename $arg
             elif [ -d "$arg" ]; then
@@ -235,16 +241,17 @@
 fi
 
 # Report errors for missing combinations of options
-if [ -z "$MACHINE" -a -z "$KERNEL" -a -z "$VM" ]; then
-    error "you must specify at least a MACHINE, VM, or KERNEL argument"
+if [ -z "$MACHINE" -a -z "$KERNEL" -a -z "$VM" -a "$FSTYPE" != "wic" ]; then
+    error "you must specify at least a MACHINE or KERNEL argument"
 fi
 if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then
     error "NFS booting without an explicit ROOTFS path is not yet supported"
 fi
 
 if [ -z "$MACHINE" ]; then
-    if [ "x$FSTYPE" = "xvmdk" ] || [ "x$FSTYPE" = "xhddimg" ] || [ "x$FSTYPE" = "xhdddirect" ]; then
-        MACHINE=`basename $VM | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
+    if [ "$IS_VM" = "true" ]; then
+        [ "x$FSTYPE" = "xwic" ] && filename=$ROOTFS || filename=$VM
+        MACHINE=`basename $filename | sed -n 's/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p'`
         if [ -z "$MACHINE" ]; then
             error "Unable to set MACHINE from image filename [$VM]"
         fi
@@ -343,12 +350,6 @@
 QEMUZYNQ_DEFAULT_KERNEL=uImage
 QEMUZYNQ_DEFAULT_FSTYPE=cpio
 
-AKITA_DEFAULT_KERNEL=zImage-akita.bin
-AKITA_DEFAULT_FSTYPE=jffs2
-
-SPITZ_DEFAULT_KERNEL=zImage-spitz.bin
-SPITZ_DEFAULT_FSTYPE=ext3
-
 setup_path_vars() {
     if [ -z "$OE_TMPDIR" ] ; then
         PATHS_REQUIRED=true
@@ -454,7 +455,7 @@
     fi
 fi
 
-if [ -z "$KERNEL" -a "x$FSTYPE" != "xvmdk" -a "x$FSTYPE" != "xhddimg" -a "x$FSTYPE" != "xhdddirect" ]; then
+if [ -z "$KERNEL" -a "$IS_VM" = "false" ]; then \
     setup_path_vars 1
     eval kernel_file=\$${machine2}_DEFAULT_KERNEL
     KERNEL=$DEPLOY_DIR_IMAGE/$kernel_file
@@ -480,14 +481,14 @@
 if [ "$LAZY_ROOTFS" = "true" ]; then
     setup_path_vars 1
     echo "Assuming $ROOTFS really means $DEPLOY_DIR_IMAGE/$ROOTFS-$MACHINE.$FSTYPE"
-    if [ "$FSTYPE" = "hddimg" -o "x$FSTYPE" = "xhdddirect" ]; then
+    if [ "$IS_VM" = "true" ]; then
         VM=$DEPLOY_DIR_IMAGE/$ROOTFS-$MACHINE.$FSTYPE
     else
         ROOTFS=$DEPLOY_DIR_IMAGE/$ROOTFS-$MACHINE.$FSTYPE
     fi
 fi
 
-if [ -z "$ROOTFS" -a "x$FSTYPE" != "xvmdk" -a "x$FSTYPE" != "xhddimg" -a "x$FSTYPE" != "xhdddirect" ]; then
+if [ -z "$ROOTFS" ]; then
     setup_path_vars 1
     T=$DEPLOY_DIR_IMAGE
     eval rootfs_list=\$${machine2}_DEFAULT_ROOTFS
@@ -495,6 +496,8 @@
 
     if [ -z "$ROOTFS" ]; then
         error "Unable to determine default rootfs for MACHINE [$MACHINE]"
+    elif [ "$IS_VM" = "true" ]; then
+		VM=$ROOTFS
     fi
 fi
 # ROOTFS is now set for all cases, now expand it to be an absolute path, it should exist at this point
@@ -503,11 +506,11 @@
 
 echo ""
 echo "Continuing with the following parameters:"
-if [ "x$FSTYPE" != "xvmdk" -a "x$FSTYPE" != "xhddimg" -a "x$FSTYPE" != "xhdddirect" ]; then
+if [ "$IS_VM" = "false" ]; then
     echo "KERNEL: [$KERNEL]"
     echo "ROOTFS: [$ROOTFS]"
 else
-    echo "VMDK:   [$VM]"
+    echo "VM:   [$VM]"
 fi
 echo "FSTYPE: [$FSTYPE]"
 
diff --git a/yocto-poky/scripts/runqemu-gen-tapdevs b/yocto-poky/scripts/runqemu-gen-tapdevs
index d3b27be..624deac 100755
--- a/yocto-poky/scripts/runqemu-gen-tapdevs
+++ b/yocto-poky/scripts/runqemu-gen-tapdevs
@@ -85,6 +85,15 @@
 	fi
 done
 
+if [ $COUNT -gt 0 ]; then
+	echo "Note: For systems running NetworkManager, it's recommended"
+	echo "Note: that the tap devices be set as unmanaged in the"
+	echo "Note: NetworkManager.conf file. Add the following lines to"
+	echo "Note: /etc/NetworkManager/NetworkManager.conf"
+	echo "[keyfile]"
+	echo "unmanaged-devices=interface-name:tap*"
+fi
+
 # The runqemu script will check for this file, and if it exists,
 # will use the existing bank of tap devices without creating
 # additional ones via sudo.
diff --git a/yocto-poky/scripts/runqemu-internal b/yocto-poky/scripts/runqemu-internal
index 3b0e54c..ac1c703 100755
--- a/yocto-poky/scripts/runqemu-internal
+++ b/yocto-poky/scripts/runqemu-internal
@@ -28,7 +28,6 @@
 #   ROOTFS - the disk image file to use
 #
 
-
 mem_size=-1
 
 #Get rid of <> and get the contents of extra qemu running params
@@ -39,62 +38,8 @@
 if [ ! -z "$mem_set" ] ; then
 #Get memory setting size from user input
   mem_size=`echo $mem_set | sed 's/-m[[:space:]] *//'`
-else
-    case "$MACHINE" in
-        "qemux86")
-            mem_size=256
-            ;;
-        "qemux86-64")
-            mem_size=256
-            ;;
-        "qemuarm")
-            mem_size=128
-            ;;
-        "qemuarm64")
-            mem_size=512
-            ;;
-        "qemumicroblaze")
-            mem_size=256
-            ;;
-        "qemumips"|"qemumips64")
-            mem_size=256
-            ;;
-        "qemuppc")
-            mem_size=256
-            ;;
-        "qemush4")
-            mem_size=1024
-            ;;
-        "qemuzynq")
-            mem_size=1024
-            ;;
-        *)
-            mem_size=64
-            ;;
-    esac
-
 fi
 
-# QEMU_MEMORY has 'M' appended to mem_size
-QEMU_MEMORY="$mem_size"M
-
-# Bug 433: qemuarm cannot use > 256 MB RAM
-if [ "$MACHINE" = "qemuarm" ]; then
-    if [ -z "$mem_size" -o $mem_size -gt 256 ]; then
-        echo "WARNING: qemuarm does not support > 256M of RAM."
-        echo "Changing QEMU_MEMORY to default of 256M."
-        QEMU_MEMORY="256M"
-	mem_size="256"
-        SCRIPT_QEMU_EXTRA_OPT=`echo $SCRIPT_QEMU_EXTRA_OPT | sed -e "s/$mem_set/-m 256/" `
-    fi
-fi
-
-# We need to specify -m <mem_size> to overcome a bug in qemu 0.14.0
-# https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/584480
-
-if [ -z "$mem_set" ] ; then
-  SCRIPT_QEMU_EXTRA_OPT="$SCRIPT_QEMU_EXTRA_OPT -m $mem_size"
-fi
 # This file is created when runqemu-gen-tapdevs creates a bank of tap
 # devices, indicating that the user should not bring up new ones using
 # sudo.
@@ -119,7 +64,7 @@
 if [ "$SLIRP_ENABLED" = "yes" ]; then
     KERNEL_NETWORK_CMD="ip=dhcp"
     QEMU_TAP_CMD=""
-    QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet"
+    QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice tablet"
     QEMU_NETWORK_CMD=""
     DROOT="/dev/vda"
     ROOTFS_OPTIONS="-drive file=$ROOTFS,if=virtio,format=raw"
@@ -268,7 +213,7 @@
         ROOTFS_OPTIONS="-drive file=$ROOTFS,if=virtio,format=raw"
 
         KERNCMDLINE="mem=$QEMU_MEMORY"
-        QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice wacom-tablet"
+        QEMU_UI_OPTIONS="-show-cursor -usb -usbdevice tablet"
 
         NFS_INSTANCE=`echo $TAP | sed 's/tap//'`
         export NFS_INSTANCE
@@ -279,35 +224,13 @@
         fi
 fi
 
-case "$MACHINE" in
-    "qemuarm") ;;
-    "qemuarm64") ;;
-    "qemumicroblaze") ;;
-    "qemumips") ;;
-    "qemumipsel") ;;
-    "qemumips64") ;;
-    "qemush4") ;;
-    "qemuppc") ;;
-    "qemuarmv6") ;;
-    "qemuarmv7") ;;
-    "qemux86") ;;
-    "qemux86-64") ;;
-    "qemuzynq") ;;
-    "akita") ;;
-    "spitz") ;;
-    *)
-        echo "Error: Unsupported machine type $MACHINE"
-        return 1
-    ;;
-esac
-
-if [ ! -f "$KERNEL" -a "x$FSTYPE" != "xvmdk" -a "x$FSTYPE" != "xhddimg" -a "x$FSTYPE" != "xhdddirect" ]; then
+if [ ! -f "$KERNEL" -a "$IS_VM" = "false" ]; then
     echo "Error: Kernel image file $KERNEL doesn't exist"
     cleanup
     return 1
 fi
 
-if [ "$FSTYPE" != "nfs" -a "$FSTYPE" != "vmdk" -a "$FSTYPE" != "hddimg" -a "$FSTYPE" != "hdddirect" -a ! -f "$ROOTFS" ]; then
+if [ "$FSTYPE" != "nfs" -a "$IS_VM" = "false" -a ! -f "$ROOTFS" ]; then
     echo "Error: Image file $ROOTFS doesn't exist"
     cleanup
     return 1
@@ -343,13 +266,26 @@
     NFSRUNNING="true"
 fi
 
-if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then
+
+set_mem_size() {
+    if [ ! -z "$mem_set" ] ; then
+        #Get memory setting size from user input
+        mem_size=`echo $mem_set | sed 's/-m[[:space:]] *//'`
+    else
+        mem_size=$1
+    fi
+    # QEMU_MEMORY has 'M' appended to mem_size
+    QEMU_MEMORY="$mem_size"M
+
+}
+
+config_qemuarm() {
+    set_mem_size 128
     QEMU=qemu-system-arm
     MACHINE_SUBTYPE=versatilepb
     export QEMU_AUDIO_DRV="none"
     QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
-    # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer"
-    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
         KERNCMDLINE="root=$DROOT rw console=ttyAMA0,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS"
     fi
@@ -368,9 +304,10 @@
     if [ "$MACHINE" = "qemuarmv7" ]; then
         QEMUOPTIONS="$QEMUOPTIONS -cpu cortex-a8"
     fi
-fi
+}
 
-if [ "$MACHINE" = "qemuarm64" ]; then
+config_qemuarm64() {
+    set_mem_size 512
     QEMU=qemu-system-aarch64
 
     QEMU_NETWORK_CMD="-netdev tap,id=net0,ifname=$TAP,script=no,downscript=no -device virtio-net-device,netdev=net0 "
@@ -383,7 +320,7 @@
     else
         QEMU_UI_OPTIONS=""
     fi
-    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
         KERNCMDLINE="root=$DROOT rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off $KERNEL_NETWORK_CMD"
         # qemu-system-aarch64 only support '-machine virt -cpu cortex-a57' for now
         QEMUOPTIONS="$QEMU_NETWORK_CMD -machine virt -cpu cortex-a57 $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
@@ -397,9 +334,10 @@
         KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off $KERNEL_NETWORK_CMD"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -machine virt -cpu cortex-a57 $QEMU_UI_OPTIONS"
     fi
-fi
+}
 
-if [ "$MACHINE" = "qemux86" ]; then
+config_qemux86() {
+    set_mem_size 256
     QEMU=qemu-system-i386
     if [ "$KVM_ACTIVE" = "yes" ]; then
         CPU_SUBTYPE=kvm32
@@ -411,7 +349,7 @@
     else
         QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
     fi
-    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
         KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
     fi
@@ -429,15 +367,16 @@
         KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
     fi
-    if [ "$FSTYPE" = "vmdk" -o "$FSTYPE" = "hddimg" -o "$FSTYPE" = "hdddirect" ]; then
+    if [ "$IS_VM" = "true" ]; then
         QEMUOPTIONS="$QEMU_NETWORK_CMD $QEMU_UI_OPTIONS"
     fi
     # Currently oprofile's event based interrupt mode doesn't work(Bug #828) in
     # qemux86 and qemux86-64. We can use timer interrupt mode for now.
     KERNCMDLINE="$KERNCMDLINE oprofile.timer=1"
-fi
+}
 
-if [ "$MACHINE" = "qemux86-64" ]; then
+config_qemux86_64() {
+    set_mem_size 256
     QEMU=qemu-system-x86_64
     if [ "$KVM_ACTIVE" = "yes" ]; then
         CPU_SUBTYPE=kvm64
@@ -449,7 +388,7 @@
     else
         QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
     fi
-    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
         KERNCMDLINE="vga=0 uvesafb.mode_option=640x480-32 root=$DROOT rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $ROOTFS_OPTIONS $QEMU_UI_OPTIONS"
     fi
@@ -465,29 +404,16 @@
         KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $QEMU_UI_OPTIONS"
     fi
-    if [ "$FSTYPE" = "vmdk" -o "$FSTYPE" = "hddimg" -o "$FSTYPE" = "hdddirect" ]; then
+    if [ "$IS_VM" = "true" ]; then
         QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE $QEMU_UI_OPTIONS"
     fi
     # Currently oprofile's event based interrupt mode doesn't work(Bug #828) in
     # qemux86 and qemux86-64. We can use timer interrupt mode for now.
     KERNCMDLINE="$KERNCMDLINE oprofile.timer=1"
-fi
+}
 
-if [ "$MACHINE" = "spitz" ]; then
-    QEMU=qemu-system-arm
-    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
-        echo $ROOTFS
-        ROOTFS=`readlink -f $ROOTFS`
-        echo $ROOTFS
-        if [ ! -e "$ROOTFS.qemudisk" ]; then
-            echo "Adding a partition table to the ext3 image for use by QEMU, please wait..."
-            runqemu-addptable2image $ROOTFS $ROOTFS.qemudisk
-        fi
-        QEMUOPTIONS="$QEMU_NETWORK_CMD -M spitz -hda $ROOTFS.qemudisk -portrait"
-    fi
-fi
-
-if [ "$MACHINE" = "qemumips" -o "$MACHINE" = "qemumipsel" -o "$MACHINE" = "qemumips64" ]; then
+config_qemumips() {
+    set_mem_size 256
     case "$MACHINE" in
        qemumips)   QEMU=qemu-system-mips ;;
        qemumipsel) QEMU=qemu-system-mipsel ;;
@@ -495,7 +421,7 @@
     esac
     MACHINE_SUBTYPE=malta
     QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS"
-    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
         #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         KERNCMDLINE="root=$DROOT rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS"
@@ -509,9 +435,10 @@
         KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS"
     fi
-fi
+}
 
-if [ "$MACHINE" = "qemuppc" ]; then
+config_qemuppc() {
+    set_mem_size 256
     QEMU=qemu-system-ppc
     MACHINE_SUBTYPE=mac99
     CPU_SUBTYPE=G4
@@ -521,7 +448,7 @@
     else
         QEMU_NETWORK_CMD="-net nic,model=pcnet $QEMU_TAP_CMD"
     fi
-    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
         KERNCMDLINE="root=$DROOT rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE $ROOTFS_OPTIONS -no-reboot $QEMU_UI_OPTIONS"
     fi
@@ -534,13 +461,14 @@
         KERNCMDLINE="root=/dev/nfs console=ttyS0 console=tty nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS"
     fi
-fi
+}
 
-if [ "$MACHINE" = "qemush4" ]; then
+config_qemush4() {
+    set_mem_size 1024
     QEMU=qemu-system-sh4
     MACHINE_SUBTYPE=r2d
     QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
-    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+    if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" -o "$FSTYPE" = "wic" ]; then
         #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         KERNCMDLINE="root=/dev/hda rw console=ttySC1 noiotrap earlyprintk=sh-sci.1 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio"
@@ -556,34 +484,10 @@
         QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -no-reboot $QEMU_UI_OPTIONS -monitor null -serial vc -serial stdio"
         SERIALSTDIO="1"
     fi
-fi
+}
 
-if [ "${FSTYPE:0:3}" = "ext" ]; then
-    KERNCMDLINE="$KERNCMDLINE rootfstype=$FSTYPE"
-fi
-
-if [ "$MACHINE" = "akita" ]; then
-    QEMU=qemu-system-arm
-    if [ "$FSTYPE" = "jffs2" ]; then
-        ROOTFS=`readlink -f $ROOTFS`
-        if [ ! -e "$ROOTFS.qemuflash" ]; then
-            echo "Converting raw image into flash image format for use by QEMU, please wait..."
-        raw2flash.akita < $ROOTFS > $ROOTFS.qemuflash
-        fi
-        QEMUOPTIONS="$QEMU_NETWORK_CMD -M akita -mtdblock $ROOTFS.qemuflash -portrait"
-    fi
-fi
-
-if [ "$MACHINE" = "qemumicroblaze" ]; then
-    QEMU=qemu-system-microblazeel
-    QEMU_SYSTEM_OPTIONS="$QEMU_NETWORK_CMD -M petalogix-ml605 -serial mon:stdio"
-    if [ "${FSTYPE:0:3}" = "ext" -o "${FSTYPE:0:4}" = "cpio" ]; then
-        KERNCMDLINE="earlyprintk root=/dev/ram rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
-        QEMUOPTIONS="$QEMU_SYSTEM_OPTIONS -initrd $ROOTFS"
-    fi
-fi
-
-if [ "$MACHINE" = "qemuzynq" ]; then
+config_qemuzynq() {
+    set_mem_size 1024
     QEMU=qemu-system-arm
     QEMU_SYSTEM_OPTIONS="$QEMU_NETWORK_CMD -M xilinx-zynq-a9 -serial null -serial mon:stdio -dtb $KERNEL-$MACHINE.dtb"
     # zynq serial ports are named 'ttyPS0' and 'ttyPS1', fixup the default values
@@ -592,14 +496,68 @@
         KERNCMDLINE="earlyprintk root=/dev/ram rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_SYSTEM_OPTIONS -initrd $ROOTFS"
     fi
+}
+
+config_qemumicroblaze() {
+    set_mem_size 256
+    QEMU=qemu-system-microblazeel
+    QEMU_SYSTEM_OPTIONS="$QEMU_NETWORK_CMD -M petalogix-ml605 -serial mon:stdio"
+    if [ "${FSTYPE:0:3}" = "ext" -o "${FSTYPE:0:4}" = "cpio" ]; then
+        KERNCMDLINE="earlyprintk root=/dev/ram rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
+        QEMUOPTIONS="$QEMU_SYSTEM_OPTIONS -initrd $ROOTFS"
+    fi
+}
+
+case "$MACHINE" in
+    "qemuarm" | "qemuarmv6" | "qemuarmv7")
+        config_qemuarm
+        ;;
+    "qemuarm64")
+        config_qemuarm64
+        ;;
+    "qemux86")
+        config_qemux86
+        ;;
+    "qemux86-64")
+        config_qemux86_64
+        ;;
+    "qemumips" | "qemumipsel" | "qemumips64")
+        config_qemumips
+        ;;
+    "qemuppc")
+        config_qemuppc
+        ;;
+    "qemush4")
+        config_qemush4
+        ;;
+    "qemuzynq")
+        config_qemuzynq
+        ;;
+    "qemumicroblaze")
+        config_qemumicroblaze
+        ;;
+    *)
+        echo "Error: Unsupported machine type $MACHINE"
+        return 1
+    ;;
+esac
+
+# We need to specify -m <mem_size> to overcome a bug in qemu 0.14.0
+# https://bugs.launchpad.net/ubuntu/+source/qemu-kvm/+bug/584480
+if [ -z "$mem_set" ] ; then
+  SCRIPT_QEMU_EXTRA_OPT="$SCRIPT_QEMU_EXTRA_OPT -m $mem_size"
 fi
 
-if [ "x$RAMFS" = "xtrue" ]; then
+if [ "${FSTYPE:0:3}" = "ext" ]; then
+    KERNCMDLINE="$KERNCMDLINE rootfstype=$FSTYPE"
+fi
+
+if [ "$FSTYPE" = "cpio.gz" ]; then
     QEMUOPTIONS="-initrd $ROOTFS -nographic"
     KERNCMDLINE="root=/dev/ram0 console=ttyS0 debugshell"
 fi
 
-if [ "x$ISOFS" = "xtrue" ]; then
+if [ "$FSTYPE" = "iso" ]; then
     QEMUOPTIONS="$QEMU_NETWORK_CMD -cdrom $ROOTFS $QEMU_UI_OPTIONS"
 fi
 
@@ -720,18 +678,32 @@
     SCRIPT_QEMU_EXTRA_OPT="$SCRIPT_QEMU_EXTRA_OPT $SECOND_SERIAL_OPT"
 fi
 
-
 echo "Running $QEMU..."
 # -no-reboot is a mandatory option - see bug #100
-if [ "$FSTYPE" = "vmdk" -o "$FSTYPE" = "hddimg" -o "$FSTYPE" = "hdddirect" ]; then
-    echo $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
-    LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $VM $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
-elif [ "$FSTYPE" = "iso" ]; then
-    echo $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
-    LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT
+if [ "$IS_VM" = "true" ]; then
+    # Check root=/dev/sdX or root=/dev/vdX
+    [ ! -e "$VM" ] && error "VM image is not found!"
+    if grep -q 'root=/dev/sd' $VM; then
+        echo "Using scsi drive"
+        VM_DRIVE="-drive if=none,id=hd,file=$VM -device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd"
+    elif grep -q 'root=/dev/hd' $VM; then
+        echo "Using ide drive"
+        VM_DRIVE="$VM"
+    else
+        echo "Using virtio block drive"
+        VM_DRIVE="-drive if=virtio,file=$VM"
+    fi
+    QEMU_FIRE="$QEMUBIN $VM_DRIVE $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT"
+    echo $QEMU_FIRE
+    LD_PRELOAD="$GL_LD_PRELOAD" $QEMU_FIRE
+elif [ "$FSTYPE" = "iso" -o "$FSTYPE" = "wic" ]; then
+    QEMU_FIRE="$QEMUBIN $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT"
+    echo $QEMU_FIRE
+    LD_PRELOAD="$GL_LD_PRELOAD" $QEMU_FIRE
 else
-    echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SLIRP_CMD $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
-    LD_PRELOAD="$GL_LD_PRELOAD" $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT"
+    QEMU_FIRE="$QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SLIRP_CMD $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT $SCRIPT_QEMU_EXTRA_OPT"
+    echo $QEMU_FIRE -append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
+    LD_PRELOAD="$GL_LD_PRELOAD" $QEMU_FIRE -append "$KERNCMDLINE $SCRIPT_KERNEL_OPT"
 fi
 ret=$?
 if [ "$SLIRP_ENABLED" != "yes" ]; then
diff --git a/yocto-poky/scripts/send-error-report b/yocto-poky/scripts/send-error-report
index 1a1b965..a29feff 100755
--- a/yocto-poky/scripts/send-error-report
+++ b/yocto-poky/scripts/send-error-report
@@ -15,6 +15,10 @@
 import argparse
 import logging
 
+scripts_lib_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lib')
+sys.path.insert(0, scripts_lib_path)
+import argparse_oe
+
 version = "0.3"
 
 log = logging.getLogger("send-error-report")
@@ -143,7 +147,7 @@
 
 
 if __name__ == '__main__':
-    arg_parse = argparse.ArgumentParser(description="This scripts will send an error report to your specified error-report-web server.")
+    arg_parse = argparse_oe.ArgumentParser(description="This scripts will send an error report to your specified error-report-web server.")
 
     arg_parse.add_argument("error_file",
                            help="Generated error report file location",
diff --git a/yocto-poky/scripts/sstate-cache-management.sh b/yocto-poky/scripts/sstate-cache-management.sh
index 2286765..2ab450a 100755
--- a/yocto-poky/scripts/sstate-cache-management.sh
+++ b/yocto-poky/scripts/sstate-cache-management.sh
@@ -101,7 +101,7 @@
 
 # Read the input "y"
 read_confirm () {
-  echo "$total_deleted from $total_files files will be removed! "
+  echo "$total_deleted out of $total_files files will be removed! "
   if [ "$confirm" != "y" ]; then
       echo "Do you want to continue (y/n)? "
       while read confirm; do
@@ -282,7 +282,7 @@
       deleted_tgz=`cat $rm_list.* 2>/dev/null | grep ".tgz$" | wc -l`
       deleted_files=`cat $rm_list.* 2>/dev/null | wc -l`
       [ "$deleted_files" -gt 0 -a $debug -gt 0 ] && cat $rm_list.*
-      echo "($deleted_tgz from $total_tgz_suffix .tgz files for $suffix suffix will be removed or $deleted_files from $total_files_suffix when counting also .siginfo and .done files)"
+      echo "($deleted_tgz out of $total_tgz_suffix .tgz files for $suffix suffix will be removed or $deleted_files out of $total_files_suffix when counting also .siginfo and .done files)"
       let total_deleted=$total_deleted+$deleted_files
   done
   deleted_tgz=0
diff --git a/yocto-poky/scripts/sstate-sysroot-cruft.sh b/yocto-poky/scripts/sstate-sysroot-cruft.sh
index f62485e..b7ed8ea 100755
--- a/yocto-poky/scripts/sstate-sysroot-cruft.sh
+++ b/yocto-poky/scripts/sstate-sysroot-cruft.sh
@@ -90,6 +90,12 @@
 WHITELIST="${WHITELIST} \
   .*\.pyc \
   .*\.pyo \
+  .*/__pycache__ \
+"
+
+# generated by lua
+WHITELIST="${WHITELIST} \
+  .*\.luac \
 "
 
 # generated by sgml-common-native
@@ -97,6 +103,16 @@
   .*/etc/sgml/sgml-docbook.bak \
 "
 
+# generated by php
+WHITELIST="${WHITELIST} \
+  .*/usr/lib/php5/php/.channels/.* \
+  .*/usr/lib/php5/php/.registry/.* \
+  .*/usr/lib/php5/php/.depdb \
+  .*/usr/lib/php5/php/.depdblock \
+  .*/usr/lib/php5/php/.filemap \
+  .*/usr/lib/php5/php/.lock \
+"
+
 # generated by toolchain
 WHITELIST="${WHITELIST} \
   [^/]*-tcbootstrap/lib \
@@ -106,6 +122,23 @@
 WHITELIST="${WHITELIST} \
   [^/]*/home \
   [^/]*/home/xuser \
+  [^/]*/home/xuser/.bashrc \
+  [^/]*/home/xuser/.profile \
+  [^/]*/home/builder \
+  [^/]*/home/builder/.bashrc \
+  [^/]*/home/builder/.profile \
+"
+
+# generated by image.py for WIC
+# introduced in oe-core commit 861ce6c5d4836df1a783be3b01d2de56117c9863
+WHITELIST="${WHITELIST} \
+  [^/]*/imgdata \
+  [^/]*/imgdata/[^/]*\.env \
+"
+
+# generated by fontcache.bbclass
+WHITELIST="${WHITELIST} \
+  .*/var/cache/fontconfig/ \
 "
 
 SYSROOTS="`readlink -f ${tmpdir}`/sysroots/"
diff --git a/yocto-poky/scripts/test-remote-image b/yocto-poky/scripts/test-remote-image
index f3a44eb..9c5b015 100755
--- a/yocto-poky/scripts/test-remote-image
+++ b/yocto-poky/scripts/test-remote-image
@@ -38,6 +38,7 @@
 sys.path = sys.path + [lib_path]
 
 import scriptpath
+import argparse_oe
 
 # Add meta/lib to sys.path
 scriptpath.add_oe_lib_path()
@@ -82,7 +83,7 @@
 # Define and return the arguments parser for the script
 def get_args_parser():
     description = "This script is used to run automated runtime tests using remotely published image files. You should prepare the build environment just like building local images and running the tests."
-    parser = argparse.ArgumentParser(description=description)
+    parser = argparse_oe.ArgumentParser(description=description)
     parser.add_argument('--image-types', required=True, action="store", nargs='*', dest="image_types", default=None, help='The image types to test(ex: core-image-minimal).')
     parser.add_argument('--repo-link', required=True, action="store", type=str, dest="repo_link", default=None, help='The link to the remote images repository.')
     parser.add_argument('--required-packages', required=False, action="store", nargs='*', dest="required_packages", default=None, help='Required packages for the tests. They will be built before the testing begins.')
@@ -356,5 +357,5 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
diff --git a/yocto-poky/scripts/wic b/yocto-poky/scripts/wic
index 7ad2b19..2286f20 100755
--- a/yocto-poky/scripts/wic
+++ b/yocto-poky/scripts/wic
@@ -41,12 +41,12 @@
 # External modules
 scripts_path = os.path.abspath(os.path.dirname(__file__))
 lib_path = scripts_path + '/lib'
-sys.path.append(lib_path)
+sys.path.insert(0, lib_path)
 
 bitbake_exe = spawn.find_executable('bitbake')
 if bitbake_exe:
     bitbake_path = os.path.join(os.path.dirname(bitbake_exe), '../lib')
-    sys.path.append(bitbake_path)
+    sys.path.insert(0, bitbake_path)
     from bb import cookerdata
     from bb.main import bitbake_main, BitBakeConfigParameters
 else:
diff --git a/yocto-poky/scripts/wipe-sysroot b/yocto-poky/scripts/wipe-sysroot
index c22d39a..9e067e8 100755
--- a/yocto-poky/scripts/wipe-sysroot
+++ b/yocto-poky/scripts/wipe-sysroot
@@ -42,7 +42,7 @@
 echo "Deleting the sysroots in $STAGING_DIR, and selected stamps in $SSTATE_MANIFESTS and $STAMPS_DIR."
 
 # The sysroots themselves
-rm -rf $STAGING_DIR
+rm -rf $STAGING_DIR ${STAGING_DIR}-uninative
 
 # The stamps that said the sysroot was populated
 rm -rf $STAMPS_DIR/*/*/*.do_populate_sysroot.*
diff --git a/yocto-poky/scripts/yocto-bsp b/yocto-poky/scripts/yocto-bsp
index 2d9453f..82a050e 100755
--- a/yocto-poky/scripts/yocto-bsp
+++ b/yocto-poky/scripts/yocto-bsp
@@ -151,6 +151,6 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
 
diff --git a/yocto-poky/scripts/yocto-kernel b/yocto-poky/scripts/yocto-kernel
index c9b2821..daaad07 100755
--- a/yocto-poky/scripts/yocto-kernel
+++ b/yocto-poky/scripts/yocto-kernel
@@ -395,5 +395,5 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)
diff --git a/yocto-poky/scripts/yocto-layer b/yocto-poky/scripts/yocto-layer
index 53d2aab..356972e 100755
--- a/yocto-poky/scripts/yocto-layer
+++ b/yocto-poky/scripts/yocto-layer
@@ -75,7 +75,11 @@
     if options.outdir:
         layer_output_dir = options.outdir
     else:
-        layer_output_dir = "meta-" + layer_name
+        prefix="meta-"
+        if not layer_name.startswith(prefix):
+            layer_output_dir="%s%s"%(prefix,layer_name)
+        else:
+            layer_output_dir=layer_name
 
     yocto_layer_create(layer_name, scripts_path, layer_output_dir, options.codedump, options.properties_file, properties)
 
@@ -142,6 +146,6 @@
     except Exception:
         ret = 1
         import traceback
-        traceback.print_exc(5)
+        traceback.print_exc()
     sys.exit(ret)